summaryrefslogtreecommitdiffstats
path: root/examples/sql/cachedtable
Commit message (Expand)AuthorAgeFilesLines
* Update license headers again.Jason McDonald2009-09-093-12/+12
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-313-39/+39
|\
| * Update tech preview license header.Jason McDonald2009-08-313-39/+39
| * Update license headers.Jason McDonald2009-08-113-3/+3
* | renamed examplebase.pri to symbianpkgrules.priEspen Riskedal2009-08-211-1/+1
* | Merge commit 'qt/master'Jason Barron2009-08-133-3/+3
|\ \
| * | Update contact URL in license headers.Jason McDonald2009-08-123-3/+3
| |/
* | Merge commit 'qt/master-stable' into 4.6-mergedJason Barron2009-06-303-6/+6
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-163-6/+6
| * Long live Qt 4.5!Lars Knoll2009-03-234-0/+248
* Long live Qt for S60!axis2009-04-244-0/+250
> -rwxr-xr-xbin/setcepaths.bat113
-rwxr-xr-xbin/syncqt1049
-rwxr-xr-xbin/syncqt.bat2
-rwxr-xr-xconfig.tests/mac/crc.test71
-rw-r--r--config.tests/mac/crc/crc.pro2
-rw-r--r--config.tests/mac/crc/main.cpp67
-rwxr-xr-xconfig.tests/mac/defaultarch.test33
-rwxr-xr-xconfig.tests/mac/dwarf2.test42
-rwxr-xr-xconfig.tests/mac/xarch.test26
-rw-r--r--config.tests/mac/xcodeversion.cpp58
-rw-r--r--config.tests/qws/ahi/ahi.cpp9
-rw-r--r--config.tests/qws/ahi/ahi.pro3
-rw-r--r--config.tests/qws/directfb/directfb.cpp9
-rw-r--r--config.tests/qws/directfb/directfb.pro5
-rw-r--r--config.tests/qws/sound/sound.cpp8
-rw-r--r--config.tests/qws/sound/sound.pro2
-rw-r--r--config.tests/qws/svgalib/svgalib.cpp10
-rw-r--r--config.tests/qws/svgalib/svgalib.pro3
-rw-r--r--config.tests/unix/3dnow/3dnow.cpp10
-rw-r--r--config.tests/unix/3dnow/3dnow.pro3
-rwxr-xr-xconfig.tests/unix/bsymbolic_functions.test21
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.cpp16
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.pri2
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.pro4
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.cpp16
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.pro4
-rwxr-xr-xconfig.tests/unix/compile.test73
-rw-r--r--config.tests/unix/cups/cups.cpp8
-rw-r--r--config.tests/unix/cups/cups.pro4
-rw-r--r--config.tests/unix/db2/db2.cpp7
-rw-r--r--config.tests/unix/db2/db2.pro4
-rw-r--r--config.tests/unix/dbus/dbus.cpp12
-rw-r--r--config.tests/unix/dbus/dbus.pro3
-rwxr-xr-xconfig.tests/unix/doubleformat.test63
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.cpp25
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.pro3
-rwxr-xr-xconfig.tests/unix/endian.test55
-rw-r--r--config.tests/unix/endian/endiantest.cpp15
-rw-r--r--config.tests/unix/endian/endiantest.pro3
-rw-r--r--config.tests/unix/floatmath/floatmath.cpp17
-rw-r--r--config.tests/unix/floatmath/floatmath.pro3
-rw-r--r--config.tests/unix/freetype/freetype.cpp13
-rw-r--r--config.tests/unix/freetype/freetype.pri9
-rw-r--r--config.tests/unix/freetype/freetype.pro5
-rwxr-xr-xconfig.tests/unix/fvisibility.test54
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfo.pro4
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp16
-rw-r--r--config.tests/unix/getifaddrs/getifaddrs.cpp19
-rw-r--r--config.tests/unix/getifaddrs/getifaddrs.pro5
-rw-r--r--config.tests/unix/glib/glib.cpp16
-rw-r--r--config.tests/unix/glib/glib.pro2
-rw-r--r--config.tests/unix/gnu-libiconv/gnu-libiconv.cpp19
-rw-r--r--config.tests/unix/gnu-libiconv/gnu-libiconv.pro4
-rw-r--r--config.tests/unix/gstreamer/gstreamer.cpp14
-rw-r--r--config.tests/unix/gstreamer/gstreamer.pro3
-rw-r--r--config.tests/unix/ibase/ibase.cpp6
-rw-r--r--config.tests/unix/ibase/ibase.pro4
-rw-r--r--config.tests/unix/iconv/iconv.cpp19
-rw-r--r--config.tests/unix/iconv/iconv.pro3
-rw-r--r--config.tests/unix/inotify/inotify.pro3
-rw-r--r--config.tests/unix/inotify/inotifytest.cpp9
-rw-r--r--config.tests/unix/ipv6/ipv6.pro3
-rw-r--r--config.tests/unix/ipv6/ipv6test.cpp23
-rw-r--r--config.tests/unix/ipv6ifname/ipv6ifname.cpp18
-rw-r--r--config.tests/unix/ipv6ifname/ipv6ifname.pro5
-rw-r--r--config.tests/unix/iwmmxt/iwmmxt.cpp7
-rw-r--r--config.tests/unix/iwmmxt/iwmmxt.pro3
-rw-r--r--config.tests/unix/largefile/largefile.pro3
-rw-r--r--config.tests/unix/largefile/largefiletest.cpp32
-rw-r--r--config.tests/unix/libjpeg/libjpeg.cpp12
-rw-r--r--config.tests/unix/libjpeg/libjpeg.pro4
-rw-r--r--config.tests/unix/libmng/libmng.cpp13
-rw-r--r--config.tests/unix/libmng/libmng.pro4
-rw-r--r--config.tests/unix/libpng/libpng.cpp12
-rw-r--r--config.tests/unix/libpng/libpng.pro4
-rw-r--r--config.tests/unix/libtiff/libtiff.cpp19
-rw-r--r--config.tests/unix/libtiff/libtiff.pro4
-rwxr-xr-xconfig.tests/unix/makeabs19
-rw-r--r--config.tests/unix/mmx/mmx.cpp10
-rw-r--r--config.tests/unix/mmx/mmx.pro3
-rw-r--r--config.tests/unix/mremap/mremap.cpp10
-rw-r--r--config.tests/unix/mremap/mremap.pro3
-rw-r--r--config.tests/unix/mysql/mysql.cpp6
-rw-r--r--config.tests/unix/mysql/mysql.pro4
-rw-r--r--config.tests/unix/mysql_r/mysql_r.pro4
-rw-r--r--config.tests/unix/nis/nis.cpp11
-rw-r--r--config.tests/unix/nis/nis.pro5
-rwxr-xr-xconfig.tests/unix/objcopy.test29
-rw-r--r--config.tests/unix/oci/oci.cpp6
-rw-r--r--config.tests/unix/oci/oci.pro4
-rw-r--r--config.tests/unix/odbc/odbc.cpp7
-rw-r--r--config.tests/unix/odbc/odbc.pro4
-rw-r--r--config.tests/unix/opengles1/opengles1.cpp12
-rw-r--r--config.tests/unix/opengles1/opengles1.pro9
-rw-r--r--config.tests/unix/opengles1cl/opengles1cl.cpp12
-rw-r--r--config.tests/unix/opengles1cl/opengles1cl.pro9
-rw-r--r--config.tests/unix/opengles2/opengles2.cpp11
-rw-r--r--config.tests/unix/opengles2/opengles2.pro9
-rw-r--r--config.tests/unix/openssl/openssl.cpp9
-rw-r--r--config.tests/unix/openssl/openssl.pri9
-rw-r--r--config.tests/unix/openssl/openssl.pro4
-rwxr-xr-xconfig.tests/unix/padstring22
-rwxr-xr-xconfig.tests/unix/precomp.test54
-rw-r--r--config.tests/unix/psql/psql.cpp8
-rw-r--r--config.tests/unix/psql/psql.pro4
-rwxr-xr-xconfig.tests/unix/ptrsize.test32
-rw-r--r--config.tests/unix/ptrsize/ptrsizetest.cpp20
-rw-r--r--config.tests/unix/ptrsize/ptrsizetest.pro3
-rw-r--r--config.tests/unix/sqlite/sqlite.cpp6
-rw-r--r--config.tests/unix/sqlite/sqlite.pro3
-rw-r--r--config.tests/unix/sqlite2/sqlite2.cpp6
-rw-r--r--config.tests/unix/sqlite2/sqlite2.pro4
-rw-r--r--config.tests/unix/sse/sse.cpp11
-rw-r--r--config.tests/unix/sse/sse.pro3
-rw-r--r--config.tests/unix/sse2/sse2.cpp11
-rw-r--r--config.tests/unix/sse2/sse2.pro3
-rw-r--r--config.tests/unix/stdint/main.cpp8
-rw-r--r--config.tests/unix/stdint/stdint.pro4
-rw-r--r--config.tests/unix/stl/stl.pro3
-rw-r--r--config.tests/unix/stl/stltest.cpp68
-rw-r--r--config.tests/unix/tds/tds.cpp7
-rw-r--r--config.tests/unix/tds/tds.pro4
-rw-r--r--config.tests/unix/tslib/tslib.cpp7
-rw-r--r--config.tests/unix/tslib/tslib.pro3
-rwxr-xr-xconfig.tests/unix/which.test39
-rw-r--r--config.tests/unix/zlib/zlib.cpp13
-rw-r--r--config.tests/unix/zlib/zlib.pro4
-rw-r--r--config.tests/x11/fontconfig/fontconfig.cpp20
-rw-r--r--config.tests/x11/fontconfig/fontconfig.pro5
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.cpp10
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.pro10
-rw-r--r--config.tests/x11/mitshm/mitshm.cpp22
-rw-r--r--config.tests/x11/mitshm/mitshm.pro5
-rwxr-xr-xconfig.tests/x11/notype.test49
-rw-r--r--config.tests/x11/notype/notypetest.cpp11
-rw-r--r--config.tests/x11/notype/notypetest.pro5
-rw-r--r--config.tests/x11/opengl/opengl.cpp13
-rw-r--r--config.tests/x11/opengl/opengl.pro10
-rw-r--r--config.tests/x11/sm/sm.cpp8
-rw-r--r--config.tests/x11/sm/sm.pro4
-rw-r--r--config.tests/x11/xcursor/xcursor.cpp25
-rw-r--r--config.tests/x11/xcursor/xcursor.pro4
-rw-r--r--config.tests/x11/xfixes/xfixes.cpp14
-rw-r--r--config.tests/x11/xfixes/xfixes.pro3
-rw-r--r--config.tests/x11/xinerama/xinerama.cpp9
-rw-r--r--config.tests/x11/xinerama/xinerama.pro4
-rw-r--r--config.tests/x11/xinput/xinput.cpp18
-rw-r--r--config.tests/x11/xinput/xinput.pro6
-rw-r--r--config.tests/x11/xkb/xkb.cpp30
-rw-r--r--config.tests/x11/xkb/xkb.pro3
-rw-r--r--config.tests/x11/xrandr/xrandr.cpp13
-rw-r--r--config.tests/x11/xrandr/xrandr.pro4
-rw-r--r--config.tests/x11/xrender/xrender.cpp13
-rw-r--r--config.tests/x11/xrender/xrender.pro4
-rw-r--r--config.tests/x11/xshape/xshape.cpp10
-rw-r--r--config.tests/x11/xshape/xshape.pro3
-rwxr-xr-xconfigure7265
-rw-r--r--configure.exebin0 -> 1939968 bytes-rw-r--r--demos/README39
-rw-r--r--demos/affine/affine.pro23
-rw-r--r--demos/affine/affine.qrc7
-rw-r--r--demos/affine/bg1.jpgbin0 -> 23771 bytes-rw-r--r--demos/affine/main.cpp63
-rw-r--r--demos/affine/xform.cpp902
-rw-r--r--demos/affine/xform.h141
-rw-r--r--demos/affine/xform.html23
-rw-r--r--demos/arthurplugin/arthur_plugin.qrc7
-rw-r--r--demos/arthurplugin/arthurplugin.pro51
-rw-r--r--demos/arthurplugin/bg1.jpgbin0 -> 23771 bytes-rw-r--r--demos/arthurplugin/flower.jpgbin0 -> 49616 bytes-rw-r--r--demos/arthurplugin/flower_alpha.jpgbin0 -> 67326 bytes-rw-r--r--demos/arthurplugin/plugin.cpp296
-rw-r--r--demos/books/bookdelegate.cpp126
-rw-r--r--demos/books/bookdelegate.h73
-rw-r--r--demos/books/books.pro21
-rw-r--r--demos/books/books.qrc5
-rw-r--r--demos/books/bookwindow.cpp121
-rw-r--r--demos/books/bookwindow.h64
-rw-r--r--demos/books/bookwindow.ui149
-rw-r--r--demos/books/images/star.pngbin0 -> 782 bytes-rw-r--r--demos/books/initdb.h125
-rw-r--r--demos/books/main.cpp56
-rw-r--r--demos/boxes/3rdparty/fbm.c207
-rw-r--r--demos/boxes/3rdparty/fbm.h40
-rw-r--r--demos/boxes/basic.fsh73
-rw-r--r--demos/boxes/basic.vsh61
-rw-r--r--demos/boxes/boxes.pro50
-rw-r--r--demos/boxes/boxes.qrc25
-rw-r--r--demos/boxes/cubemap_negx.jpgbin0 -> 41060 bytes-rw-r--r--demos/boxes/cubemap_negy.jpgbin0 -> 15520 bytes-rw-r--r--demos/boxes/cubemap_negz.jpgbin0 -> 68911 bytes-rw-r--r--demos/boxes/cubemap_posx.jpgbin0 -> 74915 bytes-rw-r--r--demos/boxes/cubemap_posy.jpgbin0 -> 24193 bytes-rw-r--r--demos/boxes/cubemap_posz.jpgbin0 -> 57881 bytes-rw-r--r--demos/boxes/dotted.fsh66
-rw-r--r--demos/boxes/fresnel.fsh79
-rw-r--r--demos/boxes/glass.fsh76
-rw-r--r--demos/boxes/glbuffers.cpp390
-rw-r--r--demos/boxes/glbuffers.h362
-rw-r--r--demos/boxes/glextensions.cpp135
-rw-r--r--demos/boxes/glextensions.h284
-rw-r--r--demos/boxes/glshaders.cpp266
-rw-r--r--demos/boxes/glshaders.h108
-rw-r--r--demos/boxes/gltrianglemesh.h91
-rw-r--r--demos/boxes/granite.fsh76
-rw-r--r--demos/boxes/main.cpp149
-rw-r--r--demos/boxes/marble.fsh71
-rw-r--r--demos/boxes/parameters.par5
-rw-r--r--demos/boxes/qt-logo.jpgbin0 -> 40886 bytes-rw-r--r--demos/boxes/qt-logo.pngbin0 -> 13923 bytes-rw-r--r--demos/boxes/qtbox.cpp469
-rw-r--r--demos/boxes/qtbox.h116
-rw-r--r--demos/boxes/reflection.fsh54
-rw-r--r--demos/boxes/refraction.fsh70
-rw-r--r--demos/boxes/roundedbox.cpp160
-rw-r--r--demos/boxes/roundedbox.h71
-rw-r--r--demos/boxes/scene.cpp1057
-rw-r--r--demos/boxes/scene.h243
-rw-r--r--demos/boxes/smiley.pngbin0 -> 14508 bytes-rw-r--r--demos/boxes/square.jpgbin0 -> 14542 bytes-rw-r--r--demos/boxes/trackball.cpp158
-rw-r--r--demos/boxes/trackball.h78
-rw-r--r--demos/boxes/vector.h602
-rw-r--r--demos/boxes/wood.fsh70
-rw-r--r--demos/browser/Info_mac.plist43
-rw-r--r--demos/browser/addbookmarkdialog.ui98
-rw-r--r--demos/browser/autosaver.cpp94
-rw-r--r--demos/browser/autosaver.h76
-rw-r--r--demos/browser/bookmarks.cpp987
-rw-r--r--demos/browser/bookmarks.h310
-rw-r--r--demos/browser/bookmarks.ui106
-rw-r--r--demos/browser/browser.icnsbin0 -> 50218 bytes-rw-r--r--demos/browser/browser.icobin0 -> 15374 bytes-rw-r--r--demos/browser/browser.pro91
-rw-r--r--demos/browser/browser.rc2
-rw-r--r--demos/browser/browserapplication.cpp456
-rw-r--r--demos/browser/browserapplication.h119
-rw-r--r--demos/browser/browsermainwindow.cpp991
-rw-r--r--demos/browser/browsermainwindow.h169
-rw-r--r--demos/browser/chasewidget.cpp142
-rw-r--r--demos/browser/chasewidget.h85
-rw-r--r--demos/browser/cookiejar.cpp733
-rw-r--r--demos/browser/cookiejar.h204
-rw-r--r--demos/browser/cookies.ui106
-rw-r--r--demos/browser/cookiesexceptions.ui184
-rw-r--r--demos/browser/data/addtab.pngbin0 -> 469 bytes-rw-r--r--demos/browser/data/browser.svg411
-rw-r--r--demos/browser/data/closetab.pngbin0 -> 516 bytes-rw-r--r--demos/browser/data/data.qrc11
-rw-r--r--demos/browser/data/defaultbookmarks.xbel40
-rw-r--r--demos/browser/data/defaulticon.pngbin0 -> 1473 bytes-rw-r--r--demos/browser/data/history.pngbin0 -> 1527 bytes-rw-r--r--demos/browser/data/loading.gifbin0 -> 847 bytes-rw-r--r--demos/browser/downloaditem.ui134
-rw-r--r--demos/browser/downloadmanager.cpp579
-rw-r--r--demos/browser/downloadmanager.h162
-rw-r--r--demos/browser/downloads.ui83
-rw-r--r--demos/browser/edittableview.cpp78
-rw-r--r--demos/browser/edittableview.h61
-rw-r--r--demos/browser/edittreeview.cpp77
-rw-r--r--demos/browser/edittreeview.h61
-rw-r--r--demos/browser/history.cpp1282
-rw-r--r--demos/browser/history.h350
-rw-r--r--demos/browser/history.ui106
-rw-r--r--demos/browser/htmls/htmls.qrc5
-rw-r--r--demos/browser/htmls/notfound.html63
-rw-r--r--demos/browser/main.cpp53
-rw-r--r--demos/browser/modelmenu.cpp227
-rw-r--r--demos/browser/modelmenu.h105
-rw-r--r--demos/browser/networkaccessmanager.cpp171
-rw-r--r--demos/browser/networkaccessmanager.h68
-rw-r--r--demos/browser/passworddialog.ui111
-rw-r--r--demos/browser/proxy.ui104
-rw-r--r--demos/browser/searchlineedit.cpp238
-rw-r--r--demos/browser/searchlineedit.h103
-rw-r--r--demos/browser/settings.cpp324
-rw-r--r--demos/browser/settings.h74
-rw-r--r--demos/browser/settings.ui614
-rw-r--r--demos/browser/squeezelabel.cpp61
-rw-r--r--demos/browser/squeezelabel.h60
-rw-r--r--demos/browser/tabwidget.cpp830
-rw-r--r--demos/browser/tabwidget.h224
-rw-r--r--demos/browser/toolbarsearch.cpp161
-rw-r--r--demos/browser/toolbarsearch.h84
-rw-r--r--demos/browser/urllineedit.cpp340
-rw-r--r--demos/browser/urllineedit.h115
-rw-r--r--demos/browser/webview.cpp304
-rw-r--r--demos/browser/webview.h119
-rw-r--r--demos/browser/xbel.cpp320
-rw-r--r--demos/browser/xbel.h113
-rw-r--r--demos/chip/chip.cpp182
-rw-r--r--demos/chip/chip.h68
-rw-r--r--demos/chip/chip.pro19
-rw-r--r--demos/chip/fileprint.pngbin0 -> 1456 bytes-rw-r--r--demos/chip/images.qrc10
-rw-r--r--demos/chip/main.cpp57
-rw-r--r--demos/chip/mainwindow.cpp109
-rw-r--r--demos/chip/mainwindow.h68
-rw-r--r--demos/chip/qt4logo.pngbin0 -> 48333 bytes-rw-r--r--demos/chip/rotateleft.pngbin0 -> 1754 bytes-rw-r--r--demos/chip/rotateright.pngbin0 -> 1732 bytes-rw-r--r--demos/chip/view.cpp234
-rw-r--r--demos/chip/view.h84
-rw-r--r--demos/chip/zoomin.pngbin0 -> 1622 bytes-rw-r--r--demos/chip/zoomout.pngbin0 -> 1601 bytes-rw-r--r--demos/composition/composition.cpp511
-rw-r--r--demos/composition/composition.h190
-rw-r--r--demos/composition/composition.html23
-rw-r--r--demos/composition/composition.pro27
-rw-r--r--demos/composition/composition.qrc8
-rw-r--r--demos/composition/flower.jpgbin0 -> 49616 bytes-rw-r--r--demos/composition/flower_alpha.jpgbin0 -> 67326 bytes-rw-r--r--demos/composition/main.cpp62
-rw-r--r--demos/deform/deform.pro19
-rw-r--r--demos/deform/deform.qrc6
-rw-r--r--demos/deform/main.cpp72
-rw-r--r--demos/deform/pathdeform.cpp647
-rw-r--r--demos/deform/pathdeform.h153
-rw-r--r--demos/deform/pathdeform.html24
-rw-r--r--demos/demos.pro73
-rw-r--r--demos/embedded/embedded.pro13
-rw-r--r--demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp181
-rw-r--r--demos/embedded/embeddedsvgviewer/embeddedsvgviewer.h87
-rw-r--r--demos/embedded/embeddedsvgviewer/embeddedsvgviewer.pro16
-rw-r--r--demos/embedded/embeddedsvgviewer/embeddedsvgviewer.qrc7
-rw-r--r--demos/embedded/embeddedsvgviewer/files/default.svg86
-rw-r--r--demos/embedded/embeddedsvgviewer/files/v-slider-handle.svg100
-rw-r--r--demos/embedded/embeddedsvgviewer/main.cpp68
-rw-r--r--demos/embedded/embeddedsvgviewer/shapes.svg86
-rw-r--r--demos/embedded/embeddedsvgviewer/spheres.svg81
-rw-r--r--demos/embedded/fluidlauncher/config.xml26
-rw-r--r--demos/embedded/fluidlauncher/config_wince/config.xml13
-rw-r--r--demos/embedded/fluidlauncher/demoapplication.cpp116
-rw-r--r--demos/embedded/fluidlauncher/demoapplication.h82
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.cpp221
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.h81
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro56
-rw-r--r--demos/embedded/fluidlauncher/main.cpp60
-rw-r--r--demos/embedded/fluidlauncher/pictureflow.cpp1420
-rw-r--r--demos/embedded/fluidlauncher/pictureflow.h237
-rw-r--r--demos/embedded/fluidlauncher/screenshots/concentriccircles.pngbin0 -> 29623 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/deform.pngbin0 -> 18393 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/elasticnodes.pngbin0 -> 13312 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer.pngbin0 -> 7482 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/mediaplayer.pngbin0 -> 7217 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/pathstroke.pngbin0 -> 14216 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/styledemo.pngbin0 -> 26891 bytes-rw-r--r--demos/embedded/fluidlauncher/screenshots/wiggly.pngbin0 -> 6546 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_1.pngbin0 -> 23539 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_2.pngbin0 -> 11745 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_3.pngbin0 -> 19791 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_4.pngbin0 -> 5505 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_5.pngbin0 -> 15890 bytes-rw-r--r--demos/embedded/fluidlauncher/slides/demo_6.pngbin0 -> 14992 bytes-rw-r--r--demos/embedded/fluidlauncher/slideshow.cpp233
-rw-r--r--demos/embedded/fluidlauncher/slideshow.h97
-rwxr-xr-xdemos/embedded/styledemo/files/add.pngbin0 -> 1474 bytes-rw-r--r--demos/embedded/styledemo/files/application.qss125
-rw-r--r--demos/embedded/styledemo/files/blue.qss39
-rw-r--r--demos/embedded/styledemo/files/khaki.qss100
-rw-r--r--demos/embedded/styledemo/files/nature_1.jpgbin0 -> 167443 bytes-rw-r--r--demos/embedded/styledemo/files/nostyle.qss0
-rwxr-xr-xdemos/embedded/styledemo/files/remove.pngbin0 -> 865 bytes-rw-r--r--demos/embedded/styledemo/files/transparent.qss140
-rw-r--r--demos/embedded/styledemo/main.cpp59
-rw-r--r--demos/embedded/styledemo/styledemo.pro12
-rw-r--r--demos/embedded/styledemo/styledemo.qrc13
-rw-r--r--demos/embedded/styledemo/stylewidget.cpp112
-rw-r--r--demos/embedded/styledemo/stylewidget.h65
-rw-r--r--demos/embedded/styledemo/stylewidget.ui429
-rw-r--r--demos/embeddeddialogs/No-Ones-Laughing-3.jpgbin0 -> 30730 bytes-rw-r--r--demos/embeddeddialogs/customproxy.cpp156
-rw-r--r--demos/embeddeddialogs/customproxy.h75
-rw-r--r--demos/embeddeddialogs/embeddeddialog.cpp106
-rw-r--r--demos/embeddeddialogs/embeddeddialog.h66
-rw-r--r--demos/embeddeddialogs/embeddeddialog.ui87
-rw-r--r--demos/embeddeddialogs/embeddeddialogs.pro17
-rw-r--r--demos/embeddeddialogs/embeddeddialogs.qrc5
-rw-r--r--demos/embeddeddialogs/main.cpp85
-rw-r--r--demos/gradients/gradients.cpp516
-rw-r--r--demos/gradients/gradients.h170
-rw-r--r--demos/gradients/gradients.html31
-rw-r--r--demos/gradients/gradients.pro18
-rw-r--r--demos/gradients/gradients.qrc6
-rw-r--r--demos/gradients/main.cpp61
-rw-r--r--demos/interview/README2
-rw-r--r--demos/interview/images/folder.pngbin0 -> 3910 bytes-rw-r--r--demos/interview/images/interview.pngbin0 -> 174 bytes-rw-r--r--demos/interview/images/services.pngbin0 -> 3749 bytes-rw-r--r--demos/interview/interview.pro18
-rw-r--r--demos/interview/interview.qrc7
-rw-r--r--demos/interview/main.cpp95
-rw-r--r--demos/interview/model.cpp147
-rw-r--r--demos/interview/model.h88
-rw-r--r--demos/macmainwindow/macmainwindow.h137
-rw-r--r--demos/macmainwindow/macmainwindow.mm347
-rw-r--r--demos/macmainwindow/macmainwindow.pro23
-rw-r--r--demos/macmainwindow/main.cpp66
-rw-r--r--demos/mainwindow/colorswatch.cpp746
-rw-r--r--demos/mainwindow/colorswatch.h136
-rw-r--r--demos/mainwindow/main.cpp164
-rw-r--r--demos/mainwindow/mainwindow.cpp510
-rw-r--r--demos/mainwindow/mainwindow.h90
-rw-r--r--demos/mainwindow/mainwindow.pro16
-rw-r--r--demos/mainwindow/mainwindow.qrc8
-rw-r--r--demos/mainwindow/qt.pngbin0 -> 2037 bytes-rw-r--r--demos/mainwindow/titlebarCenter.pngbin0 -> 146 bytes-rw-r--r--demos/mainwindow/titlebarLeft.pngbin0 -> 5148 bytes-rw-r--r--demos/mainwindow/titlebarRight.pngbin0 -> 2704 bytes-rw-r--r--demos/mainwindow/toolbar.cpp383
-rw-r--r--demos/mainwindow/toolbar.h118
-rw-r--r--demos/mediaplayer/images/screen.pngbin0 -> 4358 bytes-rw-r--r--demos/mediaplayer/main.cpp59
-rw-r--r--demos/mediaplayer/mediaplayer.cpp840
-rw-r--r--demos/mediaplayer/mediaplayer.h137
-rw-r--r--demos/mediaplayer/mediaplayer.pro28
-rw-r--r--demos/mediaplayer/mediaplayer.qrc5
-rw-r--r--demos/mediaplayer/settings.ui464
-rw-r--r--demos/pathstroke/main.cpp69
-rw-r--r--demos/pathstroke/pathstroke.cpp599
-rw-r--r--demos/pathstroke/pathstroke.h168
-rw-r--r--demos/pathstroke/pathstroke.html20
-rw-r--r--demos/pathstroke/pathstroke.pro20
-rw-r--r--demos/pathstroke/pathstroke.qrc6
-rw-r--r--demos/qtdemo/Info_mac.plist18
-rw-r--r--demos/qtdemo/colors.cpp390
-rw-r--r--demos/qtdemo/colors.h130
-rw-r--r--demos/qtdemo/demoitem.cpp280
-rw-r--r--demos/qtdemo/demoitem.h124
-rw-r--r--demos/qtdemo/demoitemanimation.cpp219
-rw-r--r--demos/qtdemo/demoitemanimation.h101
-rw-r--r--demos/qtdemo/demoscene.cpp54
-rw-r--r--demos/qtdemo/demoscene.h57
-rw-r--r--demos/qtdemo/demotextitem.cpp123
-rw-r--r--demos/qtdemo/demotextitem.h74
-rw-r--r--demos/qtdemo/dockitem.cpp108
-rw-r--r--demos/qtdemo/dockitem.h69
-rw-r--r--demos/qtdemo/examplecontent.cpp158
-rw-r--r--demos/qtdemo/examplecontent.h77
-rw-r--r--demos/qtdemo/guide.cpp144
-rw-r--r--demos/qtdemo/guide.h73
-rw-r--r--demos/qtdemo/guidecircle.cpp88
-rw-r--r--demos/qtdemo/guidecircle.h72
-rw-r--r--demos/qtdemo/guideline.cpp81
-rw-r--r--demos/qtdemo/guideline.h65
-rw-r--r--demos/qtdemo/headingitem.cpp104
-rw-r--r--demos/qtdemo/headingitem.h63
-rw-r--r--demos/qtdemo/imageitem.cpp114
-rw-r--r--demos/qtdemo/imageitem.h66
-rwxr-xr-xdemos/qtdemo/images/demobg.pngbin0 -> 20675 bytes-rw-r--r--demos/qtdemo/images/qtlogo_small.pngbin0 -> 3546 bytes-rw-r--r--demos/qtdemo/images/trolltech-logo.pngbin0 -> 23547 bytes-rw-r--r--demos/qtdemo/itemcircleanimation.cpp507
-rw-r--r--demos/qtdemo/itemcircleanimation.h110
-rw-r--r--demos/qtdemo/letteritem.cpp85
-rw-r--r--demos/qtdemo/letteritem.h62
-rw-r--r--demos/qtdemo/main.cpp74
-rw-r--r--demos/qtdemo/mainwindow.cpp483
-rw-r--r--demos/qtdemo/mainwindow.h109
-rw-r--r--demos/qtdemo/menucontent.cpp140
-rw-r--r--demos/qtdemo/menucontent.h77
-rw-r--r--demos/qtdemo/menumanager.cpp876
-rw-r--r--demos/qtdemo/menumanager.h134
-rw-r--r--demos/qtdemo/qtdemo.icnsbin0 -> 129539 bytes-rw-r--r--demos/qtdemo/qtdemo.icobin0 -> 355574 bytes-rw-r--r--demos/qtdemo/qtdemo.pro72
-rw-r--r--demos/qtdemo/qtdemo.qrc8
-rw-r--r--demos/qtdemo/qtdemo.rc2
-rw-r--r--demos/qtdemo/scanitem.cpp80
-rw-r--r--demos/qtdemo/scanitem.h60
-rw-r--r--demos/qtdemo/score.cpp149
-rw-r--r--demos/qtdemo/score.h86
-rw-r--r--demos/qtdemo/textbutton.cpp384
-rw-r--r--demos/qtdemo/textbutton.h100
-rw-r--r--demos/qtdemo/xml/examples.xml227
-rw-r--r--demos/shared/arthurstyle.cpp452
-rw-r--r--demos/shared/arthurstyle.h79
-rw-r--r--demos/shared/arthurwidgets.cpp371
-rw-r--r--demos/shared/arthurwidgets.h118
-rw-r--r--demos/shared/hoverpoints.cpp333
-rw-r--r--demos/shared/hoverpoints.h160
-rw-r--r--demos/shared/images/bg_pattern.pngbin0 -> 104 bytes-rw-r--r--demos/shared/images/button_normal_cap_left.pngbin0 -> 654 bytes-rw-r--r--demos/shared/images/button_normal_cap_right.pngbin0 -> 674 bytes-rw-r--r--demos/shared/images/button_normal_stretch.pngbin0 -> 185 bytes-rw-r--r--demos/shared/images/button_pressed_cap_left.pngbin0 -> 710 bytes-rw-r--r--demos/shared/images/button_pressed_cap_right.pngbin0 -> 785 bytes-rw-r--r--demos/shared/images/button_pressed_stretch.pngbin0 -> 217 bytes-rw-r--r--demos/shared/images/curve_thing_edit-6.pngbin0 -> 58097 bytes-rw-r--r--demos/shared/images/frame_bottom.pngbin0 -> 166 bytes-rw-r--r--demos/shared/images/frame_bottomleft.pngbin0 -> 602 bytes-rw-r--r--demos/shared/images/frame_bottomright.pngbin0 -> 553 bytes-rw-r--r--demos/shared/images/frame_left.pngbin0 -> 182 bytes-rw-r--r--demos/shared/images/frame_right.pngbin0 -> 175 bytes-rw-r--r--demos/shared/images/frame_top.pngbin0 -> 188 bytes-rw-r--r--demos/shared/images/frame_topleft.pngbin0 -> 801 bytes-rw-r--r--demos/shared/images/frame_topright.pngbin0 -> 851 bytes-rw-r--r--demos/shared/images/groupframe_bottom_left.pngbin0 -> 397 bytes-rw-r--r--demos/shared/images/groupframe_bottom_right.pngbin0 -> 383 bytes-rw-r--r--demos/shared/images/groupframe_bottom_stretch.pngbin0 -> 141 bytes-rw-r--r--demos/shared/images/groupframe_left_stretch.pngbin0 -> 132 bytes-rw-r--r--demos/shared/images/groupframe_right_stretch.pngbin0 -> 113 bytes-rw-r--r--demos/shared/images/groupframe_top_stretch.pngbin0 -> 115 bytes-rw-r--r--demos/shared/images/groupframe_topleft.pngbin0 -> 412 bytes-rw-r--r--demos/shared/images/groupframe_topright.pngbin0 -> 449 bytes-rw-r--r--demos/shared/images/line_dash_dot.pngbin0 -> 151 bytes-rw-r--r--demos/shared/images/line_dash_dot_dot.pngbin0 -> 155 bytes-rw-r--r--demos/shared/images/line_dashed.pngbin0 -> 121 bytes-rw-r--r--demos/shared/images/line_dotted.pngbin0 -> 116 bytes-rw-r--r--demos/shared/images/line_solid.pngbin0 -> 110 bytes-rw-r--r--demos/shared/images/radiobutton-off.pngbin0 -> 442 bytes-rw-r--r--demos/shared/images/radiobutton-on.pngbin0 -> 474 bytes-rw-r--r--demos/shared/images/radiobutton_off.pngbin0 -> 442 bytes-rw-r--r--demos/shared/images/radiobutton_on.pngbin0 -> 499 bytes-rw-r--r--demos/shared/images/slider_bar.pngbin0 -> 748 bytes-rw-r--r--demos/shared/images/slider_thumb_off.pngbin0 -> 823 bytes-rw-r--r--demos/shared/images/slider_thumb_on.pngbin0 -> 798 bytes-rw-r--r--demos/shared/images/title_cap_left.pngbin0 -> 179 bytes-rw-r--r--demos/shared/images/title_cap_right.pngbin0 -> 184 bytes-rw-r--r--demos/shared/images/title_stretch.pngbin0 -> 106 bytes-rw-r--r--demos/shared/shared.pri20
-rw-r--r--demos/shared/shared.pro33
-rw-r--r--demos/shared/shared.qrc39
-rw-r--r--demos/spreadsheet/images/interview.pngbin0 -> 174 bytes-rw-r--r--demos/spreadsheet/main.cpp55
-rw-r--r--demos/spreadsheet/printview.cpp59
-rw-r--r--demos/spreadsheet/printview.h60
-rw-r--r--demos/spreadsheet/spreadsheet.cpp631
-rw-r--r--demos/spreadsheet/spreadsheet.h124
-rw-r--r--demos/spreadsheet/spreadsheet.pro33
-rw-r--r--demos/spreadsheet/spreadsheet.qrc5
-rw-r--r--demos/spreadsheet/spreadsheetdelegate.cpp114
-rw-r--r--demos/spreadsheet/spreadsheetdelegate.h65
-rw-r--r--demos/spreadsheet/spreadsheetitem.cpp167
-rw-r--r--demos/spreadsheet/spreadsheetitem.h73
-rw-r--r--demos/sqlbrowser/browser.cpp247
-rw-r--r--demos/sqlbrowser/browser.h99
-rw-r--r--demos/sqlbrowser/browserwidget.ui199
-rw-r--r--demos/sqlbrowser/connectionwidget.cpp165
-rw-r--r--demos/sqlbrowser/connectionwidget.h79
-rw-r--r--demos/sqlbrowser/main.cpp91
-rw-r--r--demos/sqlbrowser/qsqlconnectiondialog.cpp115
-rw-r--r--demos/sqlbrowser/qsqlconnectiondialog.h74
-rw-r--r--demos/sqlbrowser/qsqlconnectiondialog.ui224
-rw-r--r--demos/sqlbrowser/sqlbrowser.pro23
-rw-r--r--demos/textedit/example.html79
-rw-r--r--demos/textedit/images/logo32.pngbin0 -> 1410 bytes-rw-r--r--demos/textedit/images/mac/editcopy.pngbin0 -> 1468 bytes-rw-r--r--demos/textedit/images/mac/editcut.pngbin0 -> 1512 bytes-rw-r--r--demos/textedit/images/mac/editpaste.pngbin0 -> 1906 bytes-rw-r--r--demos/textedit/images/mac/editredo.pngbin0 -> 1752 bytes-rw-r--r--demos/textedit/images/mac/editundo.pngbin0 -> 1746 bytes-rw-r--r--demos/textedit/images/mac/exportpdf.pngbin0 -> 1215 bytes-rw-r--r--demos/textedit/images/mac/filenew.pngbin0 -> 1172 bytes-rw-r--r--demos/textedit/images/mac/fileopen.pngbin0 -> 2168 bytes-rw-r--r--demos/textedit/images/mac/fileprint.pngbin0 -> 2087 bytes-rw-r--r--demos/textedit/images/mac/filesave.pngbin0 -> 1206 bytes-rw-r--r--demos/textedit/images/mac/textbold.pngbin0 -> 1611 bytes-rw-r--r--demos/textedit/images/mac/textcenter.pngbin0 -> 1404 bytes-rw-r--r--demos/textedit/images/mac/textitalic.pngbin0 -> 1164 bytes-rw-r--r--demos/textedit/images/mac/textjustify.pngbin0 -> 1257 bytes-rw-r--r--demos/textedit/images/mac/textleft.pngbin0 -> 1235 bytes-rw-r--r--demos/textedit/images/mac/textright.pngbin0 -> 1406 bytes-rw-r--r--demos/textedit/images/mac/textunder.pngbin0 -> 1183 bytes-rw-r--r--demos/textedit/images/mac/zoomin.pngbin0 -> 1696 bytes-rw-r--r--demos/textedit/images/mac/zoomout.pngbin0 -> 1662 bytes-rw-r--r--demos/textedit/images/win/editcopy.pngbin0 -> 1325 bytes-rw-r--r--demos/textedit/images/win/editcut.pngbin0 -> 1896 bytes-rw-r--r--demos/textedit/images/win/editpaste.pngbin0 -> 1482 bytes-rw-r--r--demos/textedit/images/win/editredo.pngbin0 -> 1787 bytes-rw-r--r--demos/textedit/images/win/editundo.pngbin0 -> 1768 bytes-rw-r--r--demos/textedit/images/win/exportpdf.pngbin0 -> 1059 bytes-rw-r--r--demos/textedit/images/win/filenew.pngbin0 -> 768 bytes-rw-r--r--demos/textedit/images/win/fileopen.pngbin0 -> 1662 bytes-rw-r--r--demos/textedit/images/win/fileprint.pngbin0 -> 1456 bytes-rw-r--r--demos/textedit/images/win/filesave.pngbin0 -> 1205 bytes-rw-r--r--demos/textedit/images/win/textbold.pngbin0 -> 1134 bytes-rw-r--r--demos/textedit/images/win/textcenter.pngbin0 -> 627 bytes-rw-r--r--demos/textedit/images/win/textitalic.pngbin0 -> 829 bytes-rw-r--r--demos/textedit/images/win/textjustify.pngbin0 -> 695 bytes-rw-r--r--demos/textedit/images/win/textleft.pngbin0 -> 673 bytes-rw-r--r--demos/textedit/images/win/textright.pngbin0 -> 677 bytes-rw-r--r--demos/textedit/images/win/textunder.pngbin0 -> 971 bytes-rw-r--r--demos/textedit/images/win/zoomin.pngbin0 -> 1208 bytes-rw-r--r--demos/textedit/images/win/zoomout.pngbin0 -> 1226 bytes-rw-r--r--demos/textedit/main.cpp54
-rw-r--r--demos/textedit/textedit.cpp688
-rw-r--r--demos/textedit/textedit.doc18
-rw-r--r--demos/textedit/textedit.h129
-rw-r--r--demos/textedit/textedit.pro21
-rw-r--r--demos/textedit/textedit.qrc44
-rw-r--r--demos/undo/commands.cpp180
-rw-r--r--demos/undo/commands.h112
-rw-r--r--demos/undo/document.cpp445
-rw-r--r--demos/undo/document.h125
-rw-r--r--demos/undo/icons/background.pngbin0 -> 93 bytes-rw-r--r--demos/undo/icons/blue.pngbin0 -> 1659 bytes-rw-r--r--demos/undo/icons/circle.pngbin0 -> 1359 bytes-rw-r--r--demos/undo/icons/exit.pngbin0 -> 1731 bytes-rw-r--r--demos/undo/icons/fileclose.pngbin0 -> 1121 bytes-rw-r--r--demos/undo/icons/filenew.pngbin0 -> 1266 bytes-rw-r--r--demos/undo/icons/fileopen.pngbin0 -> 1771 bytes-rw-r--r--demos/undo/icons/filesave.pngbin0 -> 1022 bytes-rw-r--r--demos/undo/icons/green.pngbin0 -> 1766 bytes-rw-r--r--demos/undo/icons/ok.pngbin0 -> 979 bytes-rw-r--r--demos/undo/icons/rectangle.pngbin0 -> 690 bytes-rw-r--r--demos/undo/icons/red.pngbin0 -> 1653 bytes-rw-r--r--demos/undo/icons/redo.pngbin0 -> 985 bytes-rw-r--r--demos/undo/icons/remove.pngbin0 -> 1833 bytes-rw-r--r--demos/undo/icons/triangle.pngbin0 -> 850 bytes-rw-r--r--demos/undo/icons/undo.pngbin0 -> 962 bytes-rw-r--r--demos/undo/main.cpp56
-rw-r--r--demos/undo/mainwindow.cpp446
-rw-r--r--demos/undo/mainwindow.h87
-rw-r--r--demos/undo/mainwindow.ui322
-rw-r--r--demos/undo/undo.pro17
-rw-r--r--demos/undo/undo.qrc20
-rw-r--r--dist/README134
-rw-r--r--dist/changes-0.92101
-rw-r--r--dist/changes-0.9374
-rw-r--r--dist/changes-0.9433
-rw-r--r--dist/changes-0.9554
-rw-r--r--dist/changes-0.96263
-rw-r--r--dist/changes-0.9898
-rw-r--r--dist/changes-0.9960
-rw-r--r--dist/changes-1.062
-rw-r--r--dist/changes-1.1110
-rw-r--r--dist/changes-1.2119
-rw-r--r--dist/changes-1.30278
-rw-r--r--dist/changes-1.3134
-rw-r--r--dist/changes-1.39-19980327963
-rw-r--r--dist/changes-1.39-19980406286
-rw-r--r--dist/changes-1.39-19980414173
-rw-r--r--dist/changes-1.39-19980506555
-rw-r--r--dist/changes-1.39-19980529232
-rw-r--r--dist/changes-1.39-19980611194
-rw-r--r--dist/changes-1.39-19980616810
-rw-r--r--dist/changes-1.39-19980623545
-rw-r--r--dist/changes-1.39-19980625119
-rw-r--r--dist/changes-1.39-19980706320
-rw-r--r--dist/changes-1.40291
-rw-r--r--dist/changes-1.4176
-rw-r--r--dist/changes-1.4271
-rw-r--r--dist/changes-2.0.1101
-rw-r--r--dist/changes-2.00151
-rw-r--r--dist/changes-2.00beta161
-rw-r--r--dist/changes-2.00beta285
-rw-r--r--dist/changes-2.00beta335
-rw-r--r--dist/changes-2.1.0314
-rw-r--r--dist/changes-2.1.171
-rw-r--r--dist/changes-2.2.0223
-rw-r--r--dist/changes-2.2.1160
-rw-r--r--dist/changes-2.2.2154
-rw-r--r--dist/changes-3.0.0720
-rw-r--r--dist/changes-3.0.0-beta11239
-rw-r--r--dist/changes-3.0.0-beta2363
-rw-r--r--dist/changes-3.0.0-beta3278
-rw-r--r--dist/changes-3.0.0-beta4688
-rw-r--r--dist/changes-3.0.0-beta5316
-rw-r--r--dist/changes-3.0.0-beta6272
-rw-r--r--dist/changes-3.0.1540
-rw-r--r--dist/changes-3.0.2325
-rw-r--r--dist/changes-3.0.4214
-rw-r--r--dist/changes-3.0.7375
-rw-r--r--dist/changes-3.1.0334
-rw-r--r--dist/changes-3.1.0-b1692
-rw-r--r--dist/changes-3.1.0-b2220
-rw-r--r--dist/changes-3.1.1212
-rw-r--r--dist/changes-3.1.2631
-rw-r--r--dist/changes-3.2.0327
-rw-r--r--dist/changes-3.2.0-b1296
-rw-r--r--dist/changes-3.2.0-b2121
-rw-r--r--dist/changes-3.2.1143
-rw-r--r--dist/changes-3.2.2155
-rw-r--r--dist/changes-3.2.3150
-rw-r--r--dist/changes-3.3.0313
-rw-r--r--dist/changes-3.3.0-b1284
-rw-r--r--dist/changes-3.3.1141
-rw-r--r--dist/changes-3.3.2390
-rw-r--r--dist/changes-3.3.3442
-rw-r--r--dist/changes-3.3.5617
-rw-r--r--dist/changes-3.3.627
-rw-r--r--dist/changes-3.3.712
-rw-r--r--dist/changes-3.3.8273
-rw-r--r--dist/changes-4.0.1786
-rw-r--r--dist/changes-4.1.0573
-rw-r--r--dist/changes-4.1.0-rc1554
-rw-r--r--dist/changes-4.1.1693
-rw-r--r--dist/changes-4.1.1141
-rw-r--r--dist/changes-4.1.3879
-rw-r--r--dist/changes-4.1.4125
-rw-r--r--dist/changes-4.1.514
-rw-r--r--dist/changes-4.2.02506
-rw-r--r--dist/changes-4.2.0-tp120
-rw-r--r--dist/changes-4.2.114
-rw-r--r--dist/changes-4.2.2827
-rw-r--r--dist/changes-4.2.3373
-rw-r--r--dist/changes-4.2CEping73
-rw-r--r--dist/changes-4.3.02445
-rw-r--r--dist/changes-4.3.1519
-rw-r--r--dist/changes-4.3.2604
-rw-r--r--dist/changes-4.3.3358
-rw-r--r--dist/changes-4.3.4112
-rw-r--r--dist/changes-4.3.5109
-rw-r--r--dist/changes-4.3CE-tp153
-rw-r--r--dist/changes-4.3CEconan72
-rw-r--r--dist/changes-4.3CEkicker53
-rw-r--r--dist/changes-4.3CEsweetandsour43
-rw-r--r--dist/changes-4.4.02419
-rw-r--r--dist/changes-4.4.1619
-rw-r--r--dist/changes-4.4.2512
-rw-r--r--dist/changes-4.4.331
-rw-r--r--dist/changes-4.5.01496
-rw-r--r--doc/doc.pri72
-rw-r--r--doc/src/3rdparty.qdoc272
-rw-r--r--doc/src/accelerators.qdoc137
-rw-r--r--doc/src/accessible.qdoc600
-rw-r--r--doc/src/activeqt-dumpcpp.qdoc143
-rw-r--r--doc/src/activeqt-dumpdoc.qdoc83
-rw-r--r--doc/src/activeqt-idc.qdoc82
-rw-r--r--doc/src/activeqt-testcon.qdoc77
-rw-r--r--doc/src/activeqt.qdoc88
-rw-r--r--doc/src/annotated.qdoc62
-rw-r--r--doc/src/appicon.qdoc226
-rw-r--r--doc/src/assistant-manual.qdoc810
-rw-r--r--doc/src/atomic-operations.qdoc89
-rw-r--r--doc/src/bughowto.qdoc71
-rw-r--r--doc/src/classes.qdoc68
-rw-r--r--doc/src/codecs.qdoc534
-rw-r--r--doc/src/commercialeditions.qdoc135
-rw-r--r--doc/src/compatclasses.qdoc54
-rw-r--r--doc/src/containers.qdoc775
-rw-r--r--doc/src/coordsys.qdoc486
-rw-r--r--doc/src/credits.qdoc348
-rw-r--r--doc/src/custom-types.qdoc178
-rw-r--r--doc/src/datastreamformat.qdoc312
-rw-r--r--doc/src/debug.qdoc256
-rw-r--r--doc/src/demos.qdoc151
-rw-r--r--doc/src/demos/affine.qdoc62
-rw-r--r--doc/src/demos/arthurplugin.qdoc56
-rw-r--r--doc/src/demos/books.qdoc60
-rw-r--r--doc/src/demos/boxes.qdoc63
-rw-r--r--doc/src/demos/browser.qdoc53
-rw-r--r--doc/src/demos/chip.qdoc52
-rw-r--r--doc/src/demos/composition.qdoc58
-rw-r--r--doc/src/demos/deform.qdoc65
-rw-r--r--doc/src/demos/embeddeddialogs.qdoc51
-rw-r--r--doc/src/demos/gradients.qdoc69
-rw-r--r--doc/src/demos/interview.qdoc51
-rw-r--r--doc/src/demos/macmainwindow.qdoc56
-rw-r--r--doc/src/demos/mainwindow.qdoc50
-rw-r--r--doc/src/demos/mediaplayer.qdoc50
-rw-r--r--doc/src/demos/pathstroke.qdoc61
-rw-r--r--doc/src/demos/spreadsheet.qdoc51
-rw-r--r--doc/src/demos/sqlbrowser.qdoc50
-rw-r--r--doc/src/demos/textedit.qdoc50
-rw-r--r--doc/src/demos/undo.qdoc57
-rw-r--r--doc/src/deployment.qdoc1472
-rw-r--r--doc/src/designer-manual.qdoc2856
-rw-r--r--doc/src/desktop-integration.qdoc90
-rw-r--r--doc/src/developing-on-mac.qdoc254
-rw-r--r--doc/src/diagrams/arthurplugin-demo.pngbin0 -> 60226 bytes-rw-r--r--doc/src/diagrams/arthurplugin-demo.ui58
-rw-r--r--doc/src/diagrams/assistant-manual/assistant-assistant.pngbin0 -> 119764 bytes-rw-r--r--doc/src/diagrams/assistant-manual/assistant-assistant.zipbin0 -> 71811 bytes-rw-r--r--doc/src/diagrams/assistant-manual/assistant-temp-toolbar.pngbin0 -> 12602 bytes-rw-r--r--doc/src/diagrams/boat.pngbin0 -> 2506 bytes-rw-r--r--doc/src/diagrams/boat.sk65
-rw-r--r--doc/src/diagrams/car.pngbin0 -> 2030 bytes-rw-r--r--doc/src/diagrams/car.sk69
-rw-r--r--doc/src/diagrams/chip-demo.pngbin0 -> 145269 bytes-rw-r--r--doc/src/diagrams/chip-demo.zipbin0 -> 204025 bytes-rw-r--r--doc/src/diagrams/cleanlooks-dialogbuttonbox.pngbin0 -> 1462 bytes-rw-r--r--doc/src/diagrams/clock.pngbin0 -> 2901 bytes-rw-r--r--doc/src/diagrams/completer-example-shaped.pngbin0 -> 16734 bytes-rw-r--r--doc/src/diagrams/complexwizard-flow.sk62
-rw-r--r--doc/src/diagrams/composition-demo.pngbin0 -> 268282 bytes-rw-r--r--doc/src/diagrams/contentspropagation/background.pngbin0 -> 530823 bytes-rw-r--r--doc/src/diagrams/contentspropagation/base.pngbin0 -> 173 bytes-rwxr-xr-xdoc/src/diagrams/contentspropagation/customwidget.py135
-rw-r--r--doc/src/diagrams/contentspropagation/lightbackground.pngbin0 -> 528522 bytes-rwxr-xr-xdoc/src/diagrams/contentspropagation/standardwidgets.py144
-rw-r--r--doc/src/diagrams/coordinatesystem-line-antialias.sk310
-rw-r--r--doc/src/diagrams/coordinatesystem-line-raster.sk301
-rw-r--r--doc/src/diagrams/coordinatesystem-line.sk297
-rw-r--r--doc/src/diagrams/coordinatesystem-rect-antialias.sk334
-rw-r--r--doc/src/diagrams/coordinatesystem-rect-raster.sk314
-rw-r--r--doc/src/diagrams/coordinatesystem-rect.sk305
-rw-r--r--doc/src/diagrams/coordinatesystem-transformations.sk121
-rw-r--r--doc/src/diagrams/customcompleter-example.pngbin0 -> 11636 bytes-rw-r--r--doc/src/diagrams/customcompleter-example.zipbin0 -> 20617 bytes-rw-r--r--doc/src/diagrams/customwidgetplugin-example.pngbin0 -> 1919 bytes-rw-r--r--doc/src/diagrams/datetimewidgets.ui116
-rw-r--r--doc/src/diagrams/datetimewidgets.zipbin0 -> 8503 bytes-rw-r--r--doc/src/diagrams/dbus-chat-example.pngbin0 -> 23785 bytes-rw-r--r--doc/src/diagrams/dependencies.lout106
-rw-r--r--doc/src/diagrams/designer-adding-actions.txt15
-rw-r--r--doc/src/diagrams/designer-adding-dockwidget.txt8
-rw-r--r--doc/src/diagrams/designer-adding-dockwidget1.pngbin0 -> 8897 bytes-rw-r--r--doc/src/diagrams/designer-adding-dockwidget1.zipbin0 -> 12252 bytes-rw-r--r--doc/src/diagrams/designer-adding-dynamic-property.pngbin0 -> 9568 bytes-rw-r--r--doc/src/diagrams/designer-adding-menu-action1.pngbin0 -> 16173 bytes-rw-r--r--doc/src/diagrams/designer-adding-menu-action1.zipbin0 -> 19245 bytes-rw-r--r--doc/src/diagrams/designer-adding-menu-action2.zipbin0 -> 19587 bytes-rw-r--r--doc/src/diagrams/designer-adding-toolbar-action1.pngbin0 -> 14911 bytes-rw-r--r--doc/src/diagrams/designer-adding-toolbar-action1.zipbin0 -> 17515 bytes-rw-r--r--doc/src/diagrams/designer-adding-toolbar-action2.zipbin0 -> 15433 bytes-rw-r--r--doc/src/diagrams/designer-creating-dynamic-property.pngbin0 -> 7561 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry1.pngbin0 -> 9618 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry1.zipbin0 -> 11753 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry2.pngbin0 -> 9090 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry2.zipbin0 -> 11709 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry3.pngbin0 -> 5435 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry3.zipbin0 -> 11520 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry4.pngbin0 -> 10141 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu-entry4.zipbin0 -> 12473 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu.txt49
-rw-r--r--doc/src/diagrams/designer-creating-menu1.pngbin0 -> 4733 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu1.zipbin0 -> 5279 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu2.pngbin0 -> 4296 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu2.zipbin0 -> 5295 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu3.pngbin0 -> 5053 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu3.zipbin0 -> 6197 bytes-rw-r--r--doc/src/diagrams/designer-creating-menu4.pngbin0 -> 5274 bytes-rw-r--r--doc/src/diagrams/designer-creating-menubar.pngbin0 -> 7024 bytes-rw-r--r--doc/src/diagrams/designer-creating-menubar.zipbin0 -> 10485 bytes-rw-r--r--doc/src/diagrams/designer-edit-resource.zipbin0 -> 11195 bytes-rw-r--r--doc/src/diagrams/designer-find-icon.zipbin0 -> 47820 bytes-rw-r--r--doc/src/diagrams/designer-form-layoutfunction-crop.pngbin0 -> 5132 bytes-rw-r--r--doc/src/diagrams/designer-form-layoutfunction.pngbin0 -> 15912 bytes-rw-r--r--doc/src/diagrams/designer-form-layoutfunction.zipbin0 -> 21179 bytes-rw-r--r--doc/src/diagrams/designer-main-window.zipbin0 -> 35959 bytes-rw-r--r--doc/src/diagrams/designer-mainwindow-actions.ui88
-rw-r--r--doc/src/diagrams/designer-palette-brush-editor.zipbin0 -> 17703 bytes-rw-r--r--doc/src/diagrams/designer-palette-editor.zipbin0 -> 30588 bytes-rw-r--r--doc/src/diagrams/designer-palette-gradient-editor.zipbin0 -> 55456 bytes-rw-r--r--doc/src/diagrams/designer-palette-pattern-editor.zipbin0 -> 15845 bytes-rw-r--r--doc/src/diagrams/designer-resource-editor.zipbin0 -> 12287 bytes-rw-r--r--doc/src/diagrams/designer-widget-box.zipbin0 -> 30530 bytes-rw-r--r--doc/src/diagrams/diagrams.txt16
-rw-r--r--doc/src/diagrams/dockwidget-cross.sk110
-rw-r--r--doc/src/diagrams/dockwidget-neighbors.sk136
-rw-r--r--doc/src/diagrams/fontsampler-example.zipbin0 -> 36245 bytes-rw-r--r--doc/src/diagrams/framebufferobject-example.pngbin0 -> 256882 bytes-rw-r--r--doc/src/diagrams/framebufferobject2-example.pngbin0 -> 90661 bytes-rw-r--r--doc/src/diagrams/ftp-example.zipbin0 -> 14383 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-calendarwidget.pngbin0 -> 9161 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-checkbox.pngbin0 -> 825 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-combobox.pngbin0 -> 1269 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-dateedit.pngbin0 -> 702 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-datetimeedit.pngbin0 -> 1132 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-dial.pngbin0 -> 3184 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-doublespinbox.pngbin0 -> 530 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-fontcombobox.pngbin0 -> 1040 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-frame.pngbin0 -> 2298 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-groupbox.pngbin0 -> 1839 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-horizontalscrollbar.pngbin0 -> 194 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-label.pngbin0 -> 606 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-lcdnumber.pngbin0 -> 161 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-lineedit.pngbin0 -> 830 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-listview.pngbin0 -> 2906 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-progressbar.pngbin0 -> 517 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-pushbutton.pngbin0 -> 639 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-radiobutton.pngbin0 -> 1045 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-slider.pngbin0 -> 136 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-spinbox.pngbin0 -> 407 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-tableview.pngbin0 -> 1872 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-tabwidget.pngbin0 -> 1820 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-textedit.pngbin0 -> 3442 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-timeedit.pngbin0 -> 702 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-toolbox.pngbin0 -> 1217 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-toolbutton.pngbin0 -> 706 bytes-rw-r--r--doc/src/diagrams/gallery-images/cde-treeview.pngbin0 -> 5320 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-calendarwidget.pngbin0 -> 8767 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-checkbox.pngbin0 -> 875 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-combobox.pngbin0 -> 1475 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-dateedit.pngbin0 -> 810 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-datetimeedit.pngbin0 -> 1257 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-dial.pngbin0 -> 2795 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-doublespinbox.pngbin0 -> 610 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-fontcombobox.pngbin0 -> 1249 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-frame.pngbin0 -> 2313 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-groupbox.pngbin0 -> 1924 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-horizontalscrollbar.pngbin0 -> 389 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-label.pngbin0 -> 606 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-lcdnumber.pngbin0 -> 161 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-lineedit.pngbin0 -> 888 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-listview.pngbin0 -> 6221 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-progressbar.pngbin0 -> 780 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-pushbutton.pngbin0 -> 903 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-radiobutton.pngbin0 -> 1208 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-slider.pngbin0 -> 246 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-spinbox.pngbin0 -> 485 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-tableview.pngbin0 -> 2225 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-tabwidget.pngbin0 -> 3852 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-textedit.pngbin0 -> 3517 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-timeedit.pngbin0 -> 814 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-toolbox.pngbin0 -> 833 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-toolbutton.pngbin0 -> 1039 bytes-rw-r--r--doc/src/diagrams/gallery-images/cleanlooks-treeview.pngbin0 -> 5686 bytes-rw-r--r--doc/src/diagrams/gallery-images/designer-creating-menubar.pngbin0 -> 7687 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-calendarwidget.pngbin0 -> 11754 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-checkbox.pngbin0 -> 1450 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-columnview.pngbin0 -> 577 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-combobox.pngbin0 -> 1910 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-dateedit.pngbin0 -> 1210 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-datetimeedit.pngbin0 -> 1861 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-dial.pngbin0 -> 4589 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-doublespinbox.pngbin0 -> 1342 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-fontcombobox.pngbin0 -> 1840 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-frame.pngbin0 -> 1139 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-groupbox.pngbin0 -> 4188 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-horizontalscrollbar.pngbin0 -> 903 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-label.pngbin0 -> 761 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-lcdnumber.pngbin0 -> 334 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-lineedit.pngbin0 -> 1435 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-listview.pngbin0 -> 5531 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-progressbar.pngbin0 -> 1318 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-pushbutton.pngbin0 -> 1251 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-radiobutton.pngbin0 -> 2074 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-slider.pngbin0 -> 583 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-spinbox.pngbin0 -> 1139 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-tableview.pngbin0 -> 5418 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-tabwidget.pngbin0 -> 5278 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-textedit.pngbin0 -> 8068 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-timeedit.pngbin0 -> 1582 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-toolbox.pngbin0 -> 1940 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-toolbutton.pngbin0 -> 1299 bytes-rw-r--r--doc/src/diagrams/gallery-images/gtk-treeview.pngbin0 -> 6284 bytes-rw-r--r--doc/src/diagrams/gallery-images/linguist-menubar.pngbin0 -> 1301 bytes-rw-r--r--doc/src/diagrams/gallery-images/macintosh-tabwidget.pngbin0 -> 7673 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-calendarwidget.pngbin0 -> 8892 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-checkbox.pngbin0 -> 775 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-combobox.pngbin0 -> 1276 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-dateedit.pngbin0 -> 706 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-datetimeedit.pngbin0 -> 1145 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-dial.pngbin0 -> 2212 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-doublespinbox.pngbin0 -> 525 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-fontcombobox.pngbin0 -> 1052 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-frame.pngbin0 -> 2225 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-groupbox.pngbin0 -> 1772 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-horizontalscrollbar.pngbin0 -> 216 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-label.pngbin0 -> 349 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-lcdnumber.pngbin0 -> 161 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-lineedit.pngbin0 -> 835 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-listview.pngbin0 -> 2844 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-menubar.pngbin0 -> 936 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-progressbar.pngbin0 -> 505 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-pushbutton.pngbin0 -> 609 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-radiobutton.pngbin0 -> 1017 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-slider.pngbin0 -> 154 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-spinbox.pngbin0 -> 402 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-tableview.pngbin0 -> 1885 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-tabwidget.pngbin0 -> 1849 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-textedit.pngbin0 -> 3534 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-timeedit.pngbin0 -> 704 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-toolbox.pngbin0 -> 883 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-toolbutton.pngbin0 -> 681 bytes-rw-r--r--doc/src/diagrams/gallery-images/motif-treeview.pngbin0 -> 5049 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-calendarwidget.pngbin0 -> 9185 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-checkbox.pngbin0 -> 590 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-colordialog.pngbin0 -> 20896 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-combobox.pngbin0 -> 1714 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-dateedit.pngbin0 -> 834 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-datetimeedit.pngbin0 -> 1276 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-dial.pngbin0 -> 2286 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-doublespinbox.pngbin0 -> 685 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-fontcombobox.pngbin0 -> 1320 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-fontdialog.pngbin0 -> 19414 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-frame.pngbin0 -> 1888 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-groupbox.pngbin0 -> 1629 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-horizontalscrollbar.pngbin0 -> 398 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-label.pngbin0 -> 351 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-lcdnumber.pngbin0 -> 161 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-lineedit.pngbin0 -> 534 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-listview.pngbin0 -> 4741 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-menubar.pngbin0 -> 570 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-messagebox.pngbin0 -> 6502 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-progressbar.pngbin0 -> 561 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-progressdialog.pngbin0 -> 5359 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-pushbutton.pngbin0 -> 913 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-radiobutton.pngbin0 -> 781 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-sizegrip.pngbin0 -> 9289 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-slider.pngbin0 -> 216 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-spinbox.pngbin0 -> 558 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-statusbar.pngbin0 -> 442 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-tabbar-truncated.pngbin0 -> 2318 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-tabbar.pngbin0 -> 2116 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-tableview.pngbin0 -> 2639 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-tabwidget.pngbin0 -> 3833 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-textedit.pngbin0 -> 3032 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-timeedit.pngbin0 -> 844 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-toolbox.pngbin0 -> 1281 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-toolbutton.pngbin0 -> 828 bytes-rw-r--r--doc/src/diagrams/gallery-images/plastique-treeview.pngbin0 -> 6365 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-calendarwidget.pngbin0 -> 9206 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-checkbox.pngbin0 -> 835 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-combobox.pngbin0 -> 920 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-dateedit.pngbin0 -> 654 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-datetimeedit.pngbin0 -> 1093 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-dial.pngbin0 -> 3073 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-doublespinbox.pngbin0 -> 492 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-fontcombobox.pngbin0 -> 1039 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-frame.pngbin0 -> 2303 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-groupbox.pngbin0 -> 1855 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-horizontalscrollbar.pngbin0 -> 177 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-label.pngbin0 -> 602 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-lcdnumber.pngbin0 -> 161 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-lineedit.pngbin0 -> 837 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-listview.pngbin0 -> 2950 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-progressbar.pngbin0 -> 520 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-pushbutton.pngbin0 -> 618 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-radiobutton.pngbin0 -> 1072 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-slider.pngbin0 -> 142 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-spinbox.pngbin0 -> 366 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-tableview.pngbin0 -> 1899 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-tabwidget.pngbin0 -> 1860 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-textedit.pngbin0 -> 3461 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-timeedit.pngbin0 -> 664 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-toolbox.pngbin0 -> 819 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-toolbutton.pngbin0 -> 713 bytes-rw-r--r--doc/src/diagrams/gallery-images/windows-treeview.pngbin0 -> 5186 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-calendarwidget.pngbin0 -> 4161 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-checkbox.pngbin0 -> 694 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-combobox.pngbin0 -> 873 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-dateedit.pngbin0 -> 489 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-datetimeedit.pngbin0 -> 640 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-dial.pngbin0 -> 1656 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-doublespinbox.pngbin0 -> 480 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-fontcombobox.pngbin0 -> 524 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-frame.pngbin0 -> 1413 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-groupbox.pngbin0 -> 1568 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-horizontalscrollbar.pngbin0 -> 743 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-label.pngbin0 -> 290 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-lcdnumber.pngbin0 -> 167 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-lineedit.pngbin0 -> 482 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-listview.pngbin0 -> 5783 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-progressbar.pngbin0 -> 1070 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-pushbutton.pngbin0 -> 735 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-radiobutton.pngbin0 -> 877 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-slider.pngbin0 -> 350 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-spinbox.pngbin0 -> 405 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-tableview.pngbin0 -> 2502 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-tabwidget.pngbin0 -> 2490 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-textedit.pngbin0 -> 2691 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-timeedit.pngbin0 -> 405 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-toolbox.pngbin0 -> 503 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-toolbutton.pngbin0 -> 543 bytes-rw-r--r--doc/src/diagrams/gallery-images/windowsvista-treeview.pngbin0 -> 4721 bytes-rw-r--r--doc/src/diagrams/graphicsview-map.pngbin0 -> 168801 bytes-rw-r--r--doc/src/diagrams/graphicsview-map.zipbin0 -> 259717 bytes-rw-r--r--doc/src/diagrams/graphicsview-shapes.pngbin0 -> 474377 bytes-rw-r--r--doc/src/diagrams/graphicsview-text.pngbin0 -> 96354 bytes-rw-r--r--doc/src/diagrams/hellogl-example.pngbin0 -> 7711 bytes-rw-r--r--doc/src/diagrams/house.pngbin0 -> 2035 bytes-rw-r--r--doc/src/diagrams/house.sk33
-rw-r--r--doc/src/diagrams/httpstack.sk112
-rw-r--r--doc/src/diagrams/itemviews/editabletreemodel-indexes.sk92
-rw-r--r--doc/src/diagrams/itemviews/editabletreemodel-items.sk119
-rw-r--r--doc/src/diagrams/itemviews/editabletreemodel-model.sk392
-rw-r--r--doc/src/diagrams/itemviews/editabletreemodel-values.sk263
-rw-r--r--doc/src/diagrams/licensewizard-flow.sk54
-rw-r--r--doc/src/diagrams/linguist-icons/appicon.pngbin0 -> 2238 bytes-rw-r--r--doc/src/diagrams/linguist-icons/linguist.qrc51
-rw-r--r--doc/src/diagrams/linguist-icons/pagecurl.pngbin0 -> 1247 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_danger.pngbin0 -> 304 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_empty.pngbin0 -> 404 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_obsolete.pngbin0 -> 192 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_off.pngbin0 -> 434 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_on.pngbin0 -> 192 bytes-rw-r--r--doc/src/diagrams/linguist-icons/s_check_warning.pngbin0 -> 192 bytes-rw-r--r--doc/src/diagrams/linguist-icons/splash.pngbin0 -> 35908 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/accelerator.pngbin0 -> 2159 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/book.pngbin0 -> 1571 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/doneandnext.pngbin0 -> 1849 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/editcopy.pngbin0 -> 1614 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/editcut.pngbin0 -> 1896 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/editpaste.pngbin0 -> 1989 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/filenew.pngbin0 -> 977 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/fileopen.pngbin0 -> 2309 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/fileprint.pngbin0 -> 741 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/filesave.pngbin0 -> 1894 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/next.pngbin0 -> 908 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/nextunfinished.pngbin0 -> 1928 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/phrase.pngbin0 -> 2251 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/prev.pngbin0 -> 911 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/prevunfinished.pngbin0 -> 1883 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/print.pngbin0 -> 1732 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/punctuation.pngbin0 -> 1851 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/redo.pngbin0 -> 1787 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/searchfind.pngbin0 -> 1944 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/undo.pngbin0 -> 1768 bytes-rw-r--r--doc/src/diagrams/linguist-icons/win/whatsthis.pngbin0 -> 1948 bytes-rw-r--r--doc/src/diagrams/linguist-linguist.pngbin0 -> 112638 bytes-rw-r--r--doc/src/diagrams/linguist-menubar.ui123
-rw-r--r--doc/src/diagrams/linguist-previewtool.pngbin0 -> 46784 bytes-rw-r--r--doc/src/diagrams/linguist-toolbar.pngbin0 -> 18680 bytes-rw-r--r--doc/src/diagrams/linguist-toolbar.ui252
-rw-r--r--doc/src/diagrams/linguist-toolbar.zipbin0 -> 25052 bytes-rw-r--r--doc/src/diagrams/macintosh-menu.pngbin0 -> 6440 bytes-rw-r--r--doc/src/diagrams/macintosh-unified-toolbar.pngbin0 -> 29365 bytes-rw-r--r--doc/src/diagrams/mainwindow-contextmenu.pngbin0 -> 4198 bytes-rw-r--r--doc/src/diagrams/mainwindow-custom-dock.pngbin0 -> 37420 bytes-rw-r--r--doc/src/diagrams/mainwindow-docks.sk78
-rw-r--r--doc/src/diagrams/mainwindow-vertical-dock.pngbin0 -> 13088 bytes-rw-r--r--doc/src/diagrams/mainwindow-vertical-tabs.pngbin0 -> 28949 bytes-rw-r--r--doc/src/diagrams/modelview-begin-append-columns.sk176
-rw-r--r--doc/src/diagrams/modelview-begin-append-rows.sk122
-rw-r--r--doc/src/diagrams/modelview-begin-insert-columns.sk193
-rw-r--r--doc/src/diagrams/modelview-begin-insert-rows.sk157
-rw-r--r--doc/src/diagrams/modelview-begin-remove-columns.sk193
-rw-r--r--doc/src/diagrams/modelview-begin-remove-rows.sk130
-rw-r--r--doc/src/diagrams/modelview-listmodel.sk87
-rw-r--r--doc/src/diagrams/modelview-models.pngbin0 -> 25109 bytes-rw-r--r--doc/src/diagrams/modelview-models.sk287
-rw-r--r--doc/src/diagrams/modelview-overview.sk82
-rw-r--r--doc/src/diagrams/modelview-tablemodel.sk142
-rw-r--r--doc/src/diagrams/modelview-treemodel.sk139
-rw-r--r--doc/src/diagrams/paintsystem-core.sk76
-rw-r--r--doc/src/diagrams/paintsystem-devices.sk220
-rw-r--r--doc/src/diagrams/paintsystem-gradients.sk94
-rw-r--r--doc/src/diagrams/paintsystem-stylepainter.sk58
-rw-r--r--doc/src/diagrams/palette-diagram/dialog-crop-fade.pngbin0 -> 14239 bytes-rw-r--r--doc/src/diagrams/palette-diagram/dialog-crop.pngbin0 -> 9776 bytes-rw-r--r--doc/src/diagrams/palette-diagram/dialog.pngbin0 -> 23016 bytes-rw-r--r--doc/src/diagrams/palette-diagram/palette.sk95
-rw-r--r--doc/src/diagrams/parent-child-widgets.pngbin0 -> 8016 bytes-rw-r--r--doc/src/diagrams/parent-child-widgets.sk130
-rw-r--r--doc/src/diagrams/pathstroke-demo.pngbin0 -> 72909 bytes-rw-r--r--doc/src/diagrams/patternist-importFlow.odgbin0 -> 13718 bytes-rw-r--r--doc/src/diagrams/patternist-wordProcessor.odgbin0 -> 14221 bytes-rw-r--r--doc/src/diagrams/pbuffers-example.pngbin0 -> 87330 bytes-rw-r--r--doc/src/diagrams/pbuffers2-example.pngbin0 -> 317052 bytes-rw-r--r--doc/src/diagrams/plaintext-layout.pngbin0 -> 19745 bytes-rw-r--r--doc/src/diagrams/plastique-dialogbuttonbox.pngbin0 -> 1443 bytes-rw-r--r--doc/src/diagrams/plastique-filedialog.pngbin0 -> 16844 bytes-rw-r--r--doc/src/diagrams/plastique-fontcombobox-open.pngbin0 -> 20164 bytes-rw-r--r--doc/src/diagrams/plastique-fontcombobox-open.zipbin0 -> 34573 bytes-rw-r--r--doc/src/diagrams/plastique-menu.pngbin0 -> 3044 bytes-rw-r--r--doc/src/diagrams/plastique-printdialog-properties.pngbin0 -> 13230 bytes-rw-r--r--doc/src/diagrams/plastique-printdialog.pngbin0 -> 19863 bytes-rw-r--r--doc/src/diagrams/plastique-sizegrip.pngbin0 -> 31932 bytes-rw-r--r--doc/src/diagrams/printer-rects.sk114
-rw-r--r--doc/src/diagrams/programs/mdiarea.py71
-rw-r--r--doc/src/diagrams/programs/qpen-dashpattern.py70
-rw-r--r--doc/src/diagrams/qactiongroup-align.pngbin0 -> 2787 bytes-rw-r--r--doc/src/diagrams/qcolor-cmyk.sk77
-rw-r--r--doc/src/diagrams/qcolor-hsv.sk77
-rw-r--r--doc/src/diagrams/qcolor-hue.sk71
-rw-r--r--doc/src/diagrams/qcolor-rgb.sk77
-rw-r--r--doc/src/diagrams/qcolor-saturation.sk26
-rw-r--r--doc/src/diagrams/qcolor-value.sk26
-rw-r--r--doc/src/diagrams/qfiledialog-expanded.pngbin0 -> 21291 bytes-rw-r--r--doc/src/diagrams/qfiledialog-small.pngbin0 -> 8979 bytes-rw-r--r--doc/src/diagrams/qframe-shapes-table.ui12964
-rw-r--r--doc/src/diagrams/qimage-32bit.sk18
-rw-r--r--doc/src/diagrams/qimage-8bit.sk50
-rw-r--r--doc/src/diagrams/qline-coordinates.sk61
-rw-r--r--doc/src/diagrams/qline-point.sk61
-rw-r--r--doc/src/diagrams/qlinef-angle-identicaldirection.sk28
-rw-r--r--doc/src/diagrams/qlinef-angle-oppositedirection.sk28
-rw-r--r--doc/src/diagrams/qlistview.pngbin0 -> 3826 bytes-rw-r--r--doc/src/diagrams/qmatrix.sk74
-rw-r--r--doc/src/diagrams/qpainter-pathstroking.pngbin0 -> 215825 bytes-rw-r--r--doc/src/diagrams/qrect-coordinates.sk102
-rw-r--r--doc/src/diagrams/qrect-diagram-one.sk69
-rw-r--r--doc/src/diagrams/qrect-diagram-three.sk67
-rw-r--r--doc/src/diagrams/qrect-diagram-two.sk67
-rw-r--r--doc/src/diagrams/qrect-diagram-zero.sk48
-rw-r--r--doc/src/diagrams/qrect-intersect.sk62
-rw-r--r--doc/src/diagrams/qrect-unite.sk63
-rw-r--r--doc/src/diagrams/qrectf-coordinates.sk102
-rw-r--r--doc/src/diagrams/qrectf-diagram-one.sk69
-rw-r--r--doc/src/diagrams/qrectf-diagram-three.sk67
-rw-r--r--doc/src/diagrams/qrectf-diagram-two.sk67
-rw-r--r--doc/src/diagrams/qstyleoptiontoolbar-position.sk125
-rw-r--r--doc/src/diagrams/qt-embedded-vnc-screen.pngbin0 -> 36094 bytes-rw-r--r--doc/src/diagrams/qtableview-resized.pngbin0 -> 21066 bytes-rw-r--r--doc/src/diagrams/qtableview-small.pngbin0 -> 17120 bytes-rw-r--r--doc/src/diagrams/qtableview-stretched.pngbin0 -> 17044 bytes-rw-r--r--doc/src/diagrams/qtableview.pngbin0 -> 7701 bytes-rw-r--r--doc/src/diagrams/qtconfig-appearance.pngbin0 -> 57484 bytes-rw-r--r--doc/src/diagrams/qtdemo-example.pngbin0 -> 66312 bytes-rw-r--r--doc/src/diagrams/qtdemo.pngbin0 -> 158843 bytes-rw-r--r--doc/src/diagrams/qtdesignerextensions.sk254
-rw-r--r--doc/src/diagrams/qtexttable-cells.sk107
-rw-r--r--doc/src/diagrams/qtexttableformat-cell.sk67
-rw-r--r--doc/src/diagrams/qtopiacore/architecture-emb.sk425
-rw-r--r--doc/src/diagrams/qtopiacore/clamshell-phone.pngbin0 -> 50799 bytes-rw-r--r--doc/src/diagrams/qtopiacore/launcher.pngbin0 -> 107532 bytes-rw-r--r--doc/src/diagrams/qtopiacore/qt-embedded-opengl1.sk410
-rw-r--r--doc/src/diagrams/qtopiacore/qt-embedded-opengl2.sk592
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-accelerateddriver.sk70
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-architecture-emb.svg257
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-architecture.sk136
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-characterinputlayer.sk118
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-client.sk51
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-clientrendering.sk166
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-clientservercommunication.sk130
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-drawingonscreen.sk144
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-opengl.sk38
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-pointerhandlinglayer.sk94
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-reserveregion.sk89
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-setwindowattribute.sk102
-rw-r--r--doc/src/diagrams/qtopiacore/qtopiacore-vanilla.sk43
-rw-r--r--doc/src/diagrams/qtreeview.pngbin0 -> 7490 bytes-rw-r--r--doc/src/diagrams/qtscript-calculator.pngbin0 -> 9015 bytes-rw-r--r--doc/src/diagrams/qtscript-context2d.pngbin0 -> 14722 bytes-rw-r--r--doc/src/diagrams/qtwizard-page.sk144
-rw-r--r--doc/src/diagrams/qwsserver_keyboardfilter.sk39
-rw-r--r--doc/src/diagrams/resources.sk125
-rw-r--r--doc/src/diagrams/shapedclock.sk46
-rw-r--r--doc/src/diagrams/sharedmodel-tableviews.zipbin0 -> 22069 bytes-rw-r--r--doc/src/diagrams/sharedselection-tableviews.zipbin0 -> 19208 bytes-rw-r--r--doc/src/diagrams/standard-views.sk16
-rw-r--r--doc/src/diagrams/standarddialogs-example.pngbin0 -> 38484 bytes-rw-r--r--doc/src/diagrams/standarddialogs-example.zipbin0 -> 47130 bytes-rw-r--r--doc/src/diagrams/stylesheet/coffee-plastique.pngbin0 -> 14902 bytes-rw-r--r--doc/src/diagrams/stylesheet/coffee-windows.pngbin0 -> 10399 bytes-rw-r--r--doc/src/diagrams/stylesheet/coffee-xp.pngbin0 -> 15249 bytes-rw-r--r--doc/src/diagrams/stylesheet/pagefold.pngbin0 -> 17797 bytes-rw-r--r--doc/src/diagrams/stylesheet/pagefold.svg1678
-rw-r--r--doc/src/diagrams/stylesheet/stylesheet-boxmodel.svg220
-rw-r--r--doc/src/diagrams/stylesheet/treeview.svg284
-rw-r--r--doc/src/diagrams/tcpstream.sk48
-rw-r--r--doc/src/diagrams/threadsandobjects.sk149
-rw-r--r--doc/src/diagrams/treemodel-structure.sk114
-rw-r--r--doc/src/diagrams/tutorial8-layout.sk55
-rw-r--r--doc/src/diagrams/udppackets.sk128
-rw-r--r--doc/src/diagrams/wVista-Cert-border.pngbin0 -> 20044 bytes-rw-r--r--doc/src/diagrams/widgetmapper/sql-widget-mapper.pngbin0 -> 11459 bytes-rw-r--r--doc/src/diagrams/widgetmapper/widgetmapper-sql-mapping.sk246
-rw-r--r--doc/src/diagrams/windowsxp-menu.pngbin0 -> 1060 bytes-rw-r--r--doc/src/diagrams/worldtimeclock-connection.zipbin0 -> 15307 bytes-rw-r--r--doc/src/diagrams/worldtimeclockplugin-example.zipbin0 -> 17816 bytes-rw-r--r--doc/src/diagrams/x11_dependencies.sk1416
-rw-r--r--doc/src/diagrams/xmlpatterns-qobjectxmlmodel.pngbin0 -> 52489 bytes-rw-r--r--doc/src/distributingqt.qdoc154
-rw-r--r--doc/src/dnd.qdoc543
-rw-r--r--doc/src/ecmascript.qdoc313
-rw-r--r--doc/src/editions.qdoc76
-rw-r--r--doc/src/emb-accel.qdoc143
-rw-r--r--doc/src/emb-charinput.qdoc126
-rw-r--r--doc/src/emb-crosscompiling.qdoc191
-rw-r--r--doc/src/emb-deployment.qdoc111
-rw-r--r--doc/src/emb-differences.qdoc72
-rw-r--r--doc/src/emb-envvars.qdoc168
-rw-r--r--doc/src/emb-features.qdoc147
-rw-r--r--doc/src/emb-fonts.qdoc201
-rw-r--r--doc/src/emb-framebuffer-howto.qdoc53
-rw-r--r--doc/src/emb-install.qdoc197
-rw-r--r--doc/src/emb-makeqpf.qdoc50
-rw-r--r--doc/src/emb-performance.qdoc152
-rw-r--r--doc/src/emb-pointer.qdoc216
-rw-r--r--doc/src/emb-porting.qdoc193
-rw-r--r--doc/src/emb-qvfb.qdoc296
-rw-r--r--doc/src/emb-running.qdoc210
-rw-r--r--doc/src/emb-vnc.qdoc141
-rw-r--r--doc/src/eventsandfilters.qdoc221
-rw-r--r--doc/src/examples-overview.qdoc348
-rw-r--r--doc/src/examples.qdoc402
-rw-r--r--doc/src/examples/2dpainting.qdoc224
-rw-r--r--doc/src/examples/activeqt/comapp.qdoc124
-rw-r--r--doc/src/examples/activeqt/dotnet.qdoc355
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo.qdocinc43
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc102
-rw-r--r--doc/src/examples/activeqt/menus.qdoc74
-rw-r--r--doc/src/examples/activeqt/multiple-demo.qdocinc39
-rw-r--r--doc/src/examples/activeqt/multiple.qdoc84
-rw-r--r--doc/src/examples/activeqt/opengl-demo.qdocinc27
-rw-r--r--doc/src/examples/activeqt/opengl.qdoc145
-rw-r--r--doc/src/examples/activeqt/qutlook.qdoc116
-rw-r--r--doc/src/examples/activeqt/simple-demo.qdocinc45
-rw-r--r--doc/src/examples/activeqt/simple.qdoc130
-rw-r--r--doc/src/examples/activeqt/webbrowser.qdoc87
-rw-r--r--doc/src/examples/activeqt/wrapper-demo.qdocinc51
-rw-r--r--doc/src/examples/activeqt/wrapper.qdoc77
-rw-r--r--doc/src/examples/addressbook.qdoc456
-rw-r--r--doc/src/examples/ahigl.qdoc572
-rw-r--r--doc/src/examples/analogclock.qdoc168
-rw-r--r--doc/src/examples/application.qdoc410
-rw-r--r--doc/src/examples/arrowpad.qdoc237
-rw-r--r--doc/src/examples/basicdrawing.qdoc468
-rw-r--r--doc/src/examples/basicgraphicslayouts.qdoc151
-rw-r--r--doc/src/examples/basiclayouts.qdoc204
-rw-r--r--doc/src/examples/basicsortfiltermodel.qdoc51
-rw-r--r--doc/src/examples/blockingfortuneclient.qdoc230
-rw-r--r--doc/src/examples/borderlayout.qdoc50
-rw-r--r--doc/src/examples/broadcastreceiver.qdoc50
-rw-r--r--doc/src/examples/broadcastsender.qdoc50
-rw-r--r--doc/src/examples/cachedtable.qdoc211
-rw-r--r--doc/src/examples/calculator.qdoc389
-rw-r--r--doc/src/examples/calculatorbuilder.qdoc133
-rw-r--r--doc/src/examples/calculatorform.qdoc126
-rw-r--r--doc/src/examples/calendar.qdoc237
-rw-r--r--doc/src/examples/calendarwidget.qdoc305
-rw-r--r--doc/src/examples/capabilitiesexample.qdoc171
-rw-r--r--doc/src/examples/charactermap.qdoc288
-rw-r--r--doc/src/examples/chart.qdoc96
-rw-r--r--doc/src/examples/classwizard.qdoc204
-rw-r--r--doc/src/examples/codecs.qdoc51
-rw-r--r--doc/src/examples/codeeditor.qdoc209
-rw-r--r--doc/src/examples/collidingmice-example.qdoc279
-rw-r--r--doc/src/examples/coloreditorfactory.qdoc169
-rw-r--r--doc/src/examples/combowidgetmapper.qdoc181
-rw-r--r--doc/src/examples/completer.qdoc255
-rw-r--r--doc/src/examples/complexpingpong.qdoc50
-rw-r--r--doc/src/examples/concentriccircles.qdoc245
-rw-r--r--doc/src/examples/configdialog.qdoc50
-rw-r--r--doc/src/examples/containerextension.qdoc518
-rw-r--r--doc/src/examples/context2d.qdoc353
-rw-r--r--doc/src/examples/customcompleter.qdoc201
-rw-r--r--doc/src/examples/customsortfiltermodel.qdoc303
-rw-r--r--doc/src/examples/customtype.qdoc157
-rw-r--r--doc/src/examples/customtypesending.qdoc128
-rw-r--r--doc/src/examples/customwidgetplugin.qdoc252
-rw-r--r--doc/src/examples/dbscreen.qdoc200
-rw-r--r--doc/src/examples/dbus-chat.qdoc50
-rw-r--r--doc/src/examples/dbus-listnames.qdoc47
-rw-r--r--doc/src/examples/dbus-pingpong.qdoc9
-rw-r--r--doc/src/examples/dbus-remotecontrolledcar.qdoc50
-rw-r--r--doc/src/examples/defaultprototypes.qdoc138
-rw-r--r--doc/src/examples/delayedencoding.qdoc125
-rw-r--r--doc/src/examples/diagramscene.qdoc846
-rw-r--r--doc/src/examples/digitalclock.qdoc88
-rw-r--r--doc/src/examples/dirview.qdoc50
-rw-r--r--doc/src/examples/dockwidgets.qdoc177
-rw-r--r--doc/src/examples/dombookmarks.qdoc54
-rw-r--r--doc/src/examples/draganddroppuzzle.qdoc56
-rw-r--r--doc/src/examples/dragdroprobot.qdoc51
-rw-r--r--doc/src/examples/draggableicons.qdoc104
-rw-r--r--doc/src/examples/draggabletext.qdoc50
-rw-r--r--doc/src/examples/drilldown.qdoc552
-rw-r--r--doc/src/examples/dropsite.qdoc263
-rw-r--r--doc/src/examples/dynamiclayouts.qdoc48
-rw-r--r--doc/src/examples/echoplugin.qdoc222
-rw-r--r--doc/src/examples/editabletreemodel.qdoc459
-rw-r--r--doc/src/examples/elasticnodes.qdoc49
-rw-r--r--doc/src/examples/extension.qdoc153
-rw-r--r--doc/src/examples/fetchmore.qdoc84
-rw-r--r--doc/src/examples/filetree.qdoc421
-rw-r--r--doc/src/examples/findfiles.qdoc263
-rw-r--r--doc/src/examples/flowlayout.qdoc50
-rw-r--r--doc/src/examples/fontsampler.qdoc49
-rw-r--r--doc/src/examples/formextractor.qdoc51
-rw-r--r--doc/src/examples/fortuneclient.qdoc174
-rw-r--r--doc/src/examples/fortuneserver.qdoc119
-rw-r--r--doc/src/examples/framebufferobject.qdoc51
-rw-r--r--doc/src/examples/framebufferobject2.qdoc51
-rw-r--r--doc/src/examples/fridgemagnets.qdoc374
-rw-r--r--doc/src/examples/ftp.qdoc211
-rw-r--r--doc/src/examples/globalVariables.qdoc238
-rw-r--r--doc/src/examples/grabber.qdoc49
-rw-r--r--doc/src/examples/groupbox.qdoc154
-rw-r--r--doc/src/examples/hellogl.qdoc272
-rw-r--r--doc/src/examples/hellogl_es.qdoc124
-rw-r--r--doc/src/examples/helloscript.qdoc142
-rw-r--r--doc/src/examples/hellotr.qdoc188
-rw-r--r--doc/src/examples/http.qdoc50
-rw-r--r--doc/src/examples/i18n.qdoc51
-rw-r--r--doc/src/examples/icons.qdoc794
-rw-r--r--doc/src/examples/imagecomposition.qdoc179
-rw-r--r--doc/src/examples/imageviewer.qdoc340
-rw-r--r--doc/src/examples/itemviewspuzzle.qdoc57
-rw-r--r--doc/src/examples/licensewizard.qdoc232
-rw-r--r--doc/src/examples/lineedits.qdoc175
-rw-r--r--doc/src/examples/localfortuneclient.qdoc52
-rw-r--r--doc/src/examples/localfortuneserver.qdoc51
-rw-r--r--doc/src/examples/loopback.qdoc50
-rw-r--r--doc/src/examples/mandelbrot.qdoc382
-rw-r--r--doc/src/examples/masterdetail.qdoc57
-rw-r--r--doc/src/examples/mdi.qdoc51
-rw-r--r--doc/src/examples/menus.qdoc232
-rw-r--r--doc/src/examples/mousecalibration.qdoc207
-rw-r--r--doc/src/examples/movie.qdoc53
-rw-r--r--doc/src/examples/multipleinheritance.qdoc108
-rw-r--r--doc/src/examples/musicplayerexample.qdoc248
-rw-r--r--doc/src/examples/network-chat.qdoc51
-rw-r--r--doc/src/examples/orderform.qdoc378
-rw-r--r--doc/src/examples/overpainting.qdoc249
-rw-r--r--doc/src/examples/padnavigator.qdoc51
-rw-r--r--doc/src/examples/painterpaths.qdoc432
-rw-r--r--doc/src/examples/pbuffers.qdoc51
-rw-r--r--doc/src/examples/pbuffers2.qdoc51
-rw-r--r--doc/src/examples/pixelator.qdoc271
-rw-r--r--doc/src/examples/plugandpaint.qdoc554
-rw-r--r--doc/src/examples/portedasteroids.qdoc50
-rw-r--r--doc/src/examples/portedcanvas.qdoc52
-rw-r--r--doc/src/examples/previewer.qdoc181
-rw-r--r--doc/src/examples/qobjectxmlmodel.qdoc353
-rw-r--r--doc/src/examples/qtconcurrent-imagescaling.qdoc48
-rw-r--r--doc/src/examples/qtconcurrent-map.qdoc48
-rw-r--r--doc/src/examples/qtconcurrent-progressdialog.qdoc50
-rw-r--r--doc/src/examples/qtconcurrent-runfunction.qdoc49
-rw-r--r--doc/src/examples/qtconcurrent-wordcount.qdoc49
-rw-r--r--doc/src/examples/qtscriptcalculator.qdoc105
-rw-r--r--doc/src/examples/qtscriptcustomclass.qdoc198
-rw-r--r--doc/src/examples/qtscripttetrix.qdoc92
-rw-r--r--doc/src/examples/querymodel.qdoc51
-rw-r--r--doc/src/examples/queuedcustomtype.qdoc177
-rw-r--r--doc/src/examples/qxmlstreambookmarks.qdoc200
-rw-r--r--doc/src/examples/recentfiles.qdoc50
-rw-r--r--doc/src/examples/recipes.qdoc164
-rw-r--r--doc/src/examples/regexp.qdoc51
-rw-r--r--doc/src/examples/relationaltablemodel.qdoc50
-rw-r--r--doc/src/examples/remotecontrol.qdoc48
-rw-r--r--doc/src/examples/rsslisting.qdoc50
-rw-r--r--doc/src/examples/samplebuffers.qdoc50
-rw-r--r--doc/src/examples/saxbookmarks.qdoc54
-rw-r--r--doc/src/examples/screenshot.qdoc262
-rw-r--r--doc/src/examples/scribble.qdoc432
-rw-r--r--doc/src/examples/sdi.qdoc50
-rw-r--r--doc/src/examples/securesocketclient.qdoc53
-rw-r--r--doc/src/examples/semaphores.qdoc159
-rw-r--r--doc/src/examples/settingseditor.qdoc51
-rw-r--r--doc/src/examples/shapedclock.qdoc145
-rw-r--r--doc/src/examples/sharedmemory.qdoc142
-rw-r--r--doc/src/examples/simpledecoration.qdoc266
-rw-r--r--doc/src/examples/simpledommodel.qdoc294
-rw-r--r--doc/src/examples/simpletextviewer.qdoc466
-rw-r--r--doc/src/examples/simpletreemodel.qdoc346
-rw-r--r--doc/src/examples/simplewidgetmapper.qdoc139
-rw-r--r--doc/src/examples/sipdialog.qdoc141
-rw-r--r--doc/src/examples/sliders.qdoc269
-rw-r--r--doc/src/examples/spinboxdelegate.qdoc151
-rw-r--r--doc/src/examples/spinboxes.qdoc205
-rw-r--r--doc/src/examples/sqlwidgetmapper.qdoc199
-rw-r--r--doc/src/examples/standarddialogs.qdoc49
-rw-r--r--doc/src/examples/stardelegate.qdoc310
-rw-r--r--doc/src/examples/styleplugin.qdoc147
-rw-r--r--doc/src/examples/styles.qdoc486
-rw-r--r--doc/src/examples/stylesheet.qdoc50
-rw-r--r--doc/src/examples/svgalib.qdoc360
-rw-r--r--doc/src/examples/svgviewer.qdoc60
-rw-r--r--doc/src/examples/syntaxhighlighter.qdoc256
-rw-r--r--doc/src/examples/systray.qdoc197
-rw-r--r--doc/src/examples/tabdialog.qdoc148
-rw-r--r--doc/src/examples/tablemodel.qdoc50
-rw-r--r--doc/src/examples/tablet.qdoc380
-rw-r--r--doc/src/examples/taskmenuextension.qdoc457
-rw-r--r--doc/src/examples/tetrix.qdoc445
-rw-r--r--doc/src/examples/textfinder.qdoc173
-rw-r--r--doc/src/examples/textobject.qdoc170
-rw-r--r--doc/src/examples/textures.qdoc50
-rw-r--r--doc/src/examples/threadedfortuneserver.qdoc121
-rw-r--r--doc/src/examples/tooltips.qdoc408
-rw-r--r--doc/src/examples/torrent.qdoc83
-rw-r--r--doc/src/examples/trafficinfo.qdoc163
-rw-r--r--doc/src/examples/transformations.qdoc385
-rw-r--r--doc/src/examples/treemodelcompleter.qdoc185
-rw-r--r--doc/src/examples/trivialwizard.qdoc96
-rw-r--r--doc/src/examples/trollprint.qdoc275
-rw-r--r--doc/src/examples/undoframework.qdoc306
-rw-r--r--doc/src/examples/waitconditions.qdoc166
-rw-r--r--doc/src/examples/wiggly.qdoc181
-rw-r--r--doc/src/examples/windowflags.qdoc230
-rw-r--r--doc/src/examples/worldtimeclockbuilder.qdoc111
-rw-r--r--doc/src/examples/worldtimeclockplugin.qdoc210
-rw-r--r--doc/src/examples/xmlstreamlint.qdoc86
-rw-r--r--doc/src/exportedfunctions.qdoc136
-rw-r--r--doc/src/external-resources.qdoc349
-rw-r--r--doc/src/focus.qdoc213
-rw-r--r--doc/src/functions.qdoc63
-rw-r--r--doc/src/gallery-cde.qdoc392
-rw-r--r--doc/src/gallery-cleanlooks.qdoc392
-rw-r--r--doc/src/gallery-gtk.qdoc358
-rw-r--r--doc/src/gallery-macintosh.qdoc392
-rw-r--r--doc/src/gallery-motif.qdoc392
-rw-r--r--doc/src/gallery-plastique.qdoc392
-rw-r--r--doc/src/gallery-windows.qdoc392
-rw-r--r--doc/src/gallery-windowsvista.qdoc392
-rw-r--r--doc/src/gallery-windowsxp.qdoc392
-rw-r--r--doc/src/gallery.qdoc151
-rw-r--r--doc/src/geometry.qdoc150
-rw-r--r--doc/src/gpl.qdoc84
-rw-r--r--doc/src/graphicsview.qdoc544
-rw-r--r--doc/src/groups.qdoc599
-rw-r--r--doc/src/guibooks.qdoc121
-rw-r--r--doc/src/hierarchy.qdoc52
-rw-r--r--doc/src/how-to-learn-qt.qdoc115
-rw-r--r--doc/src/i18n.qdoc508
-rw-r--r--doc/src/images/2dpainting-example.pngbin0 -> 32682 bytes-rw-r--r--doc/src/images/abstract-connections.pngbin0 -> 19849 bytes-rw-r--r--doc/src/images/accessibilityarchitecture.pngbin0 -> 6871 bytes-rw-r--r--doc/src/images/accessibleobjecttree.pngbin0 -> 3306 bytes-rw-r--r--doc/src/images/addressbook-adddialog.pngbin0 -> 27516 bytes-rw-r--r--doc/src/images/addressbook-classes.pngbin0 -> 2685 bytes-rw-r--r--doc/src/images/addressbook-editdialog.pngbin0 -> 8669 bytes-rw-r--r--doc/src/images/addressbook-example.pngbin0 -> 12388 bytes-rw-r--r--doc/src/images/addressbook-filemenu.pngbin0 -> 20278 bytes-rw-r--r--doc/src/images/addressbook-newaddresstab.pngbin0 -> 12556 bytes-rw-r--r--doc/src/images/addressbook-signals.pngbin0 -> 4713 bytes-rw-r--r--doc/src/images/addressbook-toolsmenu.pngbin0 -> 20979 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part1-labeled-layout.pngbin0 -> 20739 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part1-labeled-screenshot.pngbin0 -> 26594 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part1-screenshot.pngbin0 -> 7180 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-add-contact.pngbin0 -> 10255 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-add-flowchart.pngbin0 -> 23533 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-add-successful.pngbin0 -> 8089 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-labeled-layout.pngbin0 -> 31947 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-signals-and-slots.pngbin0 -> 9968 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part2-stretch-effects.pngbin0 -> 12268 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part3-labeled-layout.pngbin0 -> 39500 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part3-linkedlist.pngbin0 -> 10209 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part3-screenshot.pngbin0 -> 10460 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part4-remove.pngbin0 -> 13860 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part5-finddialog.pngbin0 -> 6982 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part5-notfound.pngbin0 -> 8177 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part5-screenshot.pngbin0 -> 12557 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part5-signals-and-slots.pngbin0 -> 5542 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part6-load.pngbin0 -> 40623 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part6-save.pngbin0 -> 40406 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part6-screenshot.pngbin0 -> 13598 bytes-rw-r--r--doc/src/images/addressbook-tutorial-part7-screenshot.pngbin0 -> 14822 bytes-rw-r--r--doc/src/images/addressbook-tutorial-screenshot.pngbin0 -> 11916 bytes-rw-r--r--doc/src/images/addressbook-tutorial.pngbin0 -> 11481 bytes-rw-r--r--doc/src/images/affine-demo.pngbin0 -> 63959 bytes-rw-r--r--doc/src/images/alphachannelimage.pngbin0 -> 4105 bytes-rw-r--r--doc/src/images/alphafill.pngbin0 -> 156 bytes-rw-r--r--doc/src/images/analogclock-example.pngbin0 -> 2383 bytes-rw-r--r--doc/src/images/analogclock-viewport.pngbin0 -> 29668 bytes-rw-r--r--doc/src/images/antialiased.pngbin0 -> 398 bytes-rw-r--r--doc/src/images/application-menus.pngbin0 -> 8864 bytes-rw-r--r--doc/src/images/application.pngbin0 -> 26272 bytes-rw-r--r--doc/src/images/arthurplugin-demo.pngbin0 -> 77481 bytes-rw-r--r--doc/src/images/assistant-address-toolbar.pngbin0 -> 3130 bytes-rw-r--r--doc/src/images/assistant-assistant.pngbin0 -> 119764 bytes-rw-r--r--doc/src/images/assistant-dockwidgets.pngbin0 -> 50554 bytes-rw-r--r--doc/src/images/assistant-docwindow.pngbin0 -> 55582 bytes-rw-r--r--doc/src/images/assistant-examples.pngbin0 -> 9799 bytes-rw-r--r--doc/src/images/assistant-filter-toolbar.pngbin0 -> 1939 bytes-rw-r--r--doc/src/images/assistant-preferences-documentation.pngbin0 -> 21663 bytes-rw-r--r--doc/src/images/assistant-preferences-filters.pngbin0 -> 23997 bytes-rw-r--r--doc/src/images/assistant-preferences-fonts.pngbin0 -> 19652 bytes-rw-r--r--doc/src/images/assistant-preferences-options.pngbin0 -> 20264 bytes-rw-r--r--doc/src/images/assistant-search.pngbin0 -> 59254 bytes-rw-r--r--doc/src/images/assistant-toolbar.pngbin0 -> 6532 bytes-rw-r--r--doc/src/images/basicdrawing-example.pngbin0 -> 19371 bytes-rw-r--r--doc/src/images/basicgraphicslayouts-example.pngbin0 -> 119062 bytes-rw-r--r--doc/src/images/basiclayouts-example.pngbin0 -> 28406 bytes-rw-r--r--doc/src/images/basicsortfiltermodel-example.pngbin0 -> 81912 bytes-rw-r--r--doc/src/images/bearings.pngbin0 -> 1133 bytes-rw-r--r--doc/src/images/blockingfortuneclient-example.pngbin0 -> 9199 bytes-rw-r--r--doc/src/images/books-demo.pngbin0 -> 29155 bytes-rw-r--r--doc/src/images/borderlayout-example.pngbin0 -> 6163 bytes-rw-r--r--doc/src/images/boxes-demo.pngbin0 -> 216134 bytes-rw-r--r--doc/src/images/broadcastreceiver-example.pngbin0 -> 7447 bytes-rw-r--r--doc/src/images/broadcastsender-example.pngbin0 -> 5688 bytes-rw-r--r--doc/src/images/browser-demo.pngbin0 -> 157205 bytes-rw-r--r--doc/src/images/brush-outline.pngbin0 -> 452 bytes-rw-r--r--doc/src/images/brush-styles.pngbin0 -> 13980 bytes-rw-r--r--doc/src/images/buttonbox-gnomelayout-horizontal.pngbin0 -> 4188 bytes-rw-r--r--doc/src/images/buttonbox-gnomelayout-vertical.pngbin0 -> 5027 bytes-rw-r--r--doc/src/images/buttonbox-kdelayout-horizontal.pngbin0 -> 2862 bytes-rw-r--r--doc/src/images/buttonbox-kdelayout-vertical.pngbin0 -> 3298 bytes-rw-r--r--doc/src/images/buttonbox-mac-modeless-horizontal.pngbin0 -> 4123 bytes-rw-r--r--doc/src/images/buttonbox-mac-modeless-vertical.pngbin0 -> 5177 bytes-rw-r--r--doc/src/images/buttonbox-maclayout-horizontal.pngbin0 -> 5409 bytes-rw-r--r--doc/src/images/buttonbox-maclayout-vertical.pngbin0 -> 7340 bytes-rw-r--r--doc/src/images/buttonbox-winlayout-horizontal.pngbin0 -> 2780 bytes-rw-r--r--doc/src/images/buttonbox-winlayout-vertical.pngbin0 -> 3184 bytes-rw-r--r--doc/src/images/cachedtable-example.pngbin0 -> 15908 bytes-rw-r--r--doc/src/images/calculator-example.pngbin0 -> 10742 bytes-rw-r--r--doc/src/images/calculator-ugly.pngbin0 -> 9774 bytes-rw-r--r--doc/src/images/calculatorbuilder-example.pngbin0 -> 4326 bytes-rw-r--r--doc/src/images/calculatorform-example.pngbin0 -> 3967 bytes-rw-r--r--doc/src/images/calendar-example.pngbin0 -> 13539 bytes-rw-r--r--doc/src/images/calendarwidgetexample.pngbin0 -> 38434 bytes-rw-r--r--doc/src/images/cannon-tutorial.pngbin0 -> 1237 bytes-rw-r--r--doc/src/images/capabilitiesexample.pngbin0 -> 18955 bytes-rw-r--r--doc/src/images/cde-calendarwidget.pngbin0 -> 10187 bytes-rw-r--r--doc/src/images/cde-checkbox.pngbin0 -> 1331 bytes-rw-r--r--doc/src/images/cde-combobox.pngbin0 -> 1269 bytes-rw-r--r--doc/src/images/cde-dateedit.pngbin0 -> 1183 bytes-rw-r--r--doc/src/images/cde-datetimeedit.pngbin0 -> 1701 bytes-rw-r--r--doc/src/images/cde-dial.pngbin0 -> 4481 bytes-rw-r--r--doc/src/images/cde-doublespinbox.pngbin0 -> 1007 bytes-rw-r--r--doc/src/images/cde-fontcombobox.pngbin0 -> 1603 bytes-rw-r--r--doc/src/images/cde-frame.pngbin0 -> 2976 bytes-rw-r--r--doc/src/images/cde-groupbox.pngbin0 -> 2592 bytes-rw-r--r--doc/src/images/cde-horizontalscrollbar.pngbin0 -> 569 bytes-rw-r--r--doc/src/images/cde-label.pngbin0 -> 1043 bytes-rw-r--r--doc/src/images/cde-lcdnumber.pngbin0 -> 538 bytes-rw-r--r--doc/src/images/cde-lineedit.pngbin0 -> 1355 bytes-rw-r--r--doc/src/images/cde-listview.pngbin0 -> 5166 bytes-rw-r--r--doc/src/images/cde-progressbar.pngbin0 -> 934 bytes-rw-r--r--doc/src/images/cde-pushbutton.pngbin0 -> 1099 bytes-rw-r--r--doc/src/images/cde-radiobutton.pngbin0 -> 1562 bytes-rw-r--r--doc/src/images/cde-slider.pngbin0 -> 526 bytes-rw-r--r--doc/src/images/cde-spinbox.pngbin0 -> 863 bytes-rw-r--r--doc/src/images/cde-tableview.pngbin0 -> 2467 bytes-rw-r--r--doc/src/images/cde-tabwidget.pngbin0 -> 2483 bytes-rw-r--r--doc/src/images/cde-textedit.pngbin0 -> 7374 bytes-rw-r--r--doc/src/images/cde-timeedit.pngbin0 -> 1248 bytes-rw-r--r--doc/src/images/cde-toolbox.pngbin0 -> 1813 bytes-rw-r--r--doc/src/images/cde-toolbutton.pngbin0 -> 1169 bytes-rw-r--r--doc/src/images/cde-treeview.pngbin0 -> 6703 bytes-rw-r--r--doc/src/images/charactermap-example.pngbin0 -> 27937 bytes-rw-r--r--doc/src/images/chart-example.pngbin0 -> 51979 bytes-rw-r--r--doc/src/images/chip-demo.pngbin0 -> 223121 bytes-rw-r--r--doc/src/images/classwizard-flow.pngbin0 -> 9745 bytes-rw-r--r--doc/src/images/classwizard.pngbin0 -> 8348 bytes-rw-r--r--doc/src/images/cleanlooks-calendarwidget.pngbin0 -> 9748 bytes-rw-r--r--doc/src/images/cleanlooks-checkbox.pngbin0 -> 1416 bytes-rw-r--r--doc/src/images/cleanlooks-combobox.pngbin0 -> 2348 bytes-rw-r--r--doc/src/images/cleanlooks-dateedit.pngbin0 -> 1369 bytes-rw-r--r--doc/src/images/cleanlooks-datetimeedit.pngbin0 -> 1892 bytes-rw-r--r--doc/src/images/cleanlooks-dial.pngbin0 -> 4297 bytes-rw-r--r--doc/src/images/cleanlooks-dialogbuttonbox.pngbin0 -> 2293 bytes-rw-r--r--doc/src/images/cleanlooks-doublespinbox.pngbin0 -> 1141 bytes-rw-r--r--doc/src/images/cleanlooks-fontcombobox.pngbin0 -> 1835 bytes-rw-r--r--doc/src/images/cleanlooks-frame.pngbin0 -> 2989 bytes-rw-r--r--doc/src/images/cleanlooks-groupbox.pngbin0 -> 2630 bytes-rw-r--r--doc/src/images/cleanlooks-horizontalscrollbar.pngbin0 -> 837 bytes-rw-r--r--doc/src/images/cleanlooks-label.pngbin0 -> 1043 bytes-rw-r--r--doc/src/images/cleanlooks-lcdnumber.pngbin0 -> 538 bytes-rw-r--r--doc/src/images/cleanlooks-lineedit.pngbin0 -> 1406 bytes-rw-r--r--doc/src/images/cleanlooks-listview.pngbin0 -> 5559 bytes-rw-r--r--doc/src/images/cleanlooks-progressbar.pngbin0 -> 1292 bytes-rw-r--r--doc/src/images/cleanlooks-pushbutton-menu.pngbin0 -> 3177 bytes-rw-r--r--doc/src/images/cleanlooks-pushbutton.pngbin0 -> 1332 bytes-rw-r--r--doc/src/images/cleanlooks-radiobutton.pngbin0 -> 1782 bytes-rw-r--r--doc/src/images/cleanlooks-slider.pngbin0 -> 671 bytes-rw-r--r--doc/src/images/cleanlooks-spinbox.pngbin0 -> 983 bytes-rw-r--r--doc/src/images/cleanlooks-tableview.pngbin0 -> 2465 bytes-rw-r--r--doc/src/images/cleanlooks-tabwidget.pngbin0 -> 5007 bytes-rw-r--r--doc/src/images/cleanlooks-textedit.pngbin0 -> 7560 bytes-rw-r--r--doc/src/images/cleanlooks-timeedit.pngbin0 -> 1388 bytes-rw-r--r--doc/src/images/cleanlooks-toolbox.pngbin0 -> 1445 bytes-rw-r--r--doc/src/images/cleanlooks-toolbutton.pngbin0 -> 1469 bytes-rw-r--r--doc/src/images/cleanlooks-treeview.pngbin0 -> 6981 bytes-rw-r--r--doc/src/images/codecs-example.pngbin0 -> 20593 bytes-rw-r--r--doc/src/images/codeeditor-example.pngbin0 -> 9202 bytes-rw-r--r--doc/src/images/collidingmice-example.pngbin0 -> 59824 bytes-rw-r--r--doc/src/images/coloreditorfactoryimage.pngbin0 -> 12209 bytes-rw-r--r--doc/src/images/combo-widget-mapper.pngbin0 -> 10801 bytes-rw-r--r--doc/src/images/completer-example-country.pngbin0 -> 12387 bytes-rw-r--r--doc/src/images/completer-example-dirmodel.pngbin0 -> 14389 bytes-rw-r--r--doc/src/images/completer-example-qdirmodel.pngbin0 -> 13896 bytes-rw-r--r--doc/src/images/completer-example-word.pngbin0 -> 11702 bytes-rw-r--r--doc/src/images/completer-example.pngbin0 -> 10486 bytes-rw-r--r--doc/src/images/complexwizard-detailspage.pngbin0 -> 3525 bytes-rw-r--r--doc/src/images/complexwizard-evaluatepage.pngbin0 -> 4324 bytes-rw-r--r--doc/src/images/complexwizard-finishpage.pngbin0 -> 4640 bytes-rw-r--r--doc/src/images/complexwizard-flow.pngbin0 -> 32766 bytes-rw-r--r--doc/src/images/complexwizard-registerpage.pngbin0 -> 4326 bytes-rw-r--r--doc/src/images/complexwizard-titlepage.pngbin0 -> 4952 bytes-rw-r--r--doc/src/images/complexwizard.pngbin0 -> 4952 bytes-rw-r--r--doc/src/images/composition-demo.pngbin0 -> 210701 bytes-rw-r--r--doc/src/images/concentriccircles-example.pngbin0 -> 29623 bytes-rw-r--r--doc/src/images/conceptaudio.pngbin0 -> 10708 bytes-rw-r--r--doc/src/images/conceptprocessor.png1
-rw-r--r--doc/src/images/conceptvideo.pngbin0 -> 15989 bytes-rw-r--r--doc/src/images/configdialog-example.pngbin0 -> 35741 bytes-rw-r--r--doc/src/images/conicalGradient.pngbin0 -> 5152 bytes-rw-r--r--doc/src/images/containerextension-example.pngbin0 -> 43032 bytes-rw-r--r--doc/src/images/context2d-example-smileysmile.pngbin0 -> 3457 bytes-rw-r--r--doc/src/images/context2d-example.pngbin0 -> 14160 bytes-rw-r--r--doc/src/images/coordinatesystem-analogclock.pngbin0 -> 9762 bytes-rw-r--r--doc/src/images/coordinatesystem-line-antialias.pngbin0 -> 17979 bytes-rw-r--r--doc/src/images/coordinatesystem-line-raster.pngbin0 -> 18152 bytes-rw-r--r--doc/src/images/coordinatesystem-line.pngbin0 -> 26694 bytes-rw-r--r--doc/src/images/coordinatesystem-rect-antialias.pngbin0 -> 19058 bytes-rw-r--r--doc/src/images/coordinatesystem-rect-raster.pngbin0 -> 18455 bytes-rw-r--r--doc/src/images/coordinatesystem-rect.pngbin0 -> 32307 bytes-rw-r--r--doc/src/images/coordinatesystem-transformations.pngbin0 -> 59180 bytes-rw-r--r--doc/src/images/coordsys.pngbin0 -> 718 bytes-rw-r--r--doc/src/images/cursor-arrow.pngbin0 -> 171 bytes-rw-r--r--doc/src/images/cursor-busy.pngbin0 -> 201 bytes-rw-r--r--doc/src/images/cursor-closedhand.pngbin0 -> 147 bytes-rw-r--r--doc/src/images/cursor-cross.pngbin0 -> 130 bytes-rw-r--r--doc/src/images/cursor-forbidden.pngbin0 -> 199 bytes-rw-r--r--doc/src/images/cursor-hand.pngbin0 -> 159 bytes-rw-r--r--doc/src/images/cursor-hsplit.pngbin0 -> 161 bytes-rw-r--r--doc/src/images/cursor-ibeam.pngbin0 -> 124 bytes-rw-r--r--doc/src/images/cursor-openhand.pngbin0 -> 160 bytes-rw-r--r--doc/src/images/cursor-sizeall.pngbin0 -> 174 bytes-rw-r--r--doc/src/images/cursor-sizeb.pngbin0 -> 161 bytes-rw-r--r--doc/src/images/cursor-sizef.pngbin0 -> 161 bytes-rw-r--r--doc/src/images/cursor-sizeh.pngbin0 -> 145 bytes-rw-r--r--doc/src/images/cursor-sizev.pngbin0 -> 141 bytes-rw-r--r--doc/src/images/cursor-uparrow.pngbin0 -> 132 bytes-rw-r--r--doc/src/images/cursor-vsplit.pngbin0 -> 155 bytes-rw-r--r--doc/src/images/cursor-wait.pngbin0 -> 172 bytes-rw-r--r--doc/src/images/cursor-whatsthis.pngbin0 -> 191 bytes-rw-r--r--doc/src/images/customcompleter-example.pngbin0 -> 11636 bytes-rw-r--r--doc/src/images/customcompleter-insertcompletion.pngbin0 -> 1371 bytes-rw-r--r--doc/src/images/customsortfiltermodel-example.pngbin0 -> 74359 bytes-rw-r--r--doc/src/images/customtypesending-example.pngbin0 -> 13305 bytes-rw-r--r--doc/src/images/customwidgetplugin-example.pngbin0 -> 2175 bytes-rw-r--r--doc/src/images/datetimewidgets.pngbin0 -> 6434 bytes-rw-r--r--doc/src/images/dbus-chat-example.pngbin0 -> 38530 bytes-rw-r--r--doc/src/images/defaultprototypes-example.pngbin0 -> 5840 bytes-rw-r--r--doc/src/images/deform-demo.pngbin0 -> 88656 bytes-rw-r--r--doc/src/images/delayedecoding-example.pngbin0 -> 22793 bytes-rw-r--r--doc/src/images/deployment-mac-application.pngbin0 -> 88074 bytes-rw-r--r--doc/src/images/deployment-mac-bundlestructure.pngbin0 -> 37382 bytes-rw-r--r--doc/src/images/deployment-windows-depends.pngbin0 -> 106931 bytes-rw-r--r--doc/src/images/designer-action-editor.pngbin0 -> 46233 bytes-rw-r--r--doc/src/images/designer-add-custom-toolbar.pngbin0 -> 940 bytes-rw-r--r--doc/src/images/designer-add-files-button.pngbin0 -> 1130 bytes-rw-r--r--doc/src/images/designer-add-resource-entry-button.pngbin0 -> 899 bytes-rw-r--r--doc/src/images/designer-adding-dockwidget.pngbin0 -> 7138 bytes-rw-r--r--doc/src/images/designer-adding-dynamic-property.pngbin0 -> 9658 bytes-rw-r--r--doc/src/images/designer-adding-menu-action.pngbin0 -> 6168 bytes-rw-r--r--doc/src/images/designer-adding-toolbar-action.pngbin0 -> 5644 bytes-rw-r--r--doc/src/images/designer-buddy-making.pngbin0 -> 8885 bytes-rw-r--r--doc/src/images/designer-buddy-mode.pngbin0 -> 8008 bytes-rw-r--r--doc/src/images/designer-buddy-tool.pngbin0 -> 2046 bytes-rw-r--r--doc/src/images/designer-choosing-form.pngbin0 -> 38078 bytes-rw-r--r--doc/src/images/designer-code-viewer.pngbin0 -> 107457 bytes-rw-r--r--doc/src/images/designer-connection-dialog.pngbin0 -> 31669 bytes-rw-r--r--doc/src/images/designer-connection-editing.pngbin0 -> 9350 bytes-rw-r--r--doc/src/images/designer-connection-editor.pngbin0 -> 8650 bytes-rw-r--r--doc/src/images/designer-connection-highlight.pngbin0 -> 5297 bytes-rw-r--r--doc/src/images/designer-connection-making.pngbin0 -> 6869 bytes-rw-r--r--doc/src/images/designer-connection-mode.pngbin0 -> 9727 bytes-rw-r--r--doc/src/images/designer-connection-to-form.pngbin0 -> 4504 bytes-rw-r--r--doc/src/images/designer-connection-tool.pngbin0 -> 1989 bytes-rw-r--r--doc/src/images/designer-containers-dockwidget.pngbin0 -> 3259 bytes-rw-r--r--doc/src/images/designer-containers-frame.pngbin0 -> 744 bytes-rw-r--r--doc/src/images/designer-containers-groupbox.pngbin0 -> 1969 bytes-rw-r--r--doc/src/images/designer-containers-stackedwidget.pngbin0 -> 2192 bytes-rw-r--r--doc/src/images/designer-containers-tabwidget.pngbin0 -> 1681 bytes-rw-r--r--doc/src/images/designer-containers-toolbox.pngbin0 -> 6279 bytes-rw-r--r--doc/src/images/designer-creating-dynamic-property.pngbin0 -> 8640 bytes-rw-r--r--doc/src/images/designer-creating-menu-entry1.pngbin0 -> 5397 bytes-rw-r--r--doc/src/images/designer-creating-menu-entry2.pngbin0 -> 5479 bytes-rw-r--r--doc/src/images/designer-creating-menu-entry3.pngbin0 -> 6097 bytes-rw-r--r--doc/src/images/designer-creating-menu-entry4.pngbin0 -> 7307 bytes-rw-r--r--doc/src/images/designer-creating-menu.pngbin0 -> 2806 bytes-rw-r--r--doc/src/images/designer-creating-menu1.pngbin0 -> 2733 bytes-rw-r--r--doc/src/images/designer-creating-menu2.pngbin0 -> 2806 bytes-rw-r--r--doc/src/images/designer-creating-menu3.pngbin0 -> 2587 bytes-rw-r--r--doc/src/images/designer-creating-menu4.pngbin0 -> 2897 bytes-rw-r--r--doc/src/images/designer-creating-menubar.pngbin0 -> 7687 bytes-rw-r--r--doc/src/images/designer-custom-widget-box.pngbin0 -> 10330 bytes-rw-r--r--doc/src/images/designer-customize-toolbar.pngbin0 -> 98083 bytes-rw-r--r--doc/src/images/designer-dialog-final.pngbin0 -> 7464 bytes-rw-r--r--doc/src/images/designer-dialog-initial.pngbin0 -> 26582 bytes-rw-r--r--doc/src/images/designer-dialog-layout.pngbin0 -> 18892 bytes-rw-r--r--doc/src/images/designer-dialog-preview.pngbin0 -> 11766 bytes-rw-r--r--doc/src/images/designer-disambiguation.pngbin0 -> 5844 bytes-rw-r--r--doc/src/images/designer-dragging-onto-form.pngbin0 -> 6291 bytes-rw-r--r--doc/src/images/designer-edit-resource.pngbin0 -> 18989 bytes-rw-r--r--doc/src/images/designer-edit-resources-button.pngbin0 -> 850 bytes-rw-r--r--doc/src/images/designer-editing-mode.pngbin0 -> 8131 bytes-rw-r--r--doc/src/images/designer-embedded-preview.pngbin0 -> 6494 bytes-rw-r--r--doc/src/images/designer-english-dialog.pngbin0 -> 22253 bytes-rw-r--r--doc/src/images/designer-examples.pngbin0 -> 8936 bytes-rw-r--r--doc/src/images/designer-file-menu.pngbin0 -> 4992 bytes-rw-r--r--doc/src/images/designer-find-icon.pngbin0 -> 52951 bytes-rw-r--r--doc/src/images/designer-form-layout-cleanlooks.pngbin0 -> 8296 bytes-rw-r--r--doc/src/images/designer-form-layout-macintosh.pngbin0 -> 6720 bytes-rw-r--r--doc/src/images/designer-form-layout-windowsXP.pngbin0 -> 8269 bytes-rw-r--r--doc/src/images/designer-form-layout.pngbin0 -> 8065 bytes-rw-r--r--doc/src/images/designer-form-layoutfunction.pngbin0 -> 6890 bytes-rw-r--r--doc/src/images/designer-form-settings.pngbin0 -> 15262 bytes-rw-r--r--doc/src/images/designer-form-viewcode.pngbin0 -> 21674 bytes-rw-r--r--doc/src/images/designer-french-dialog.pngbin0 -> 25444 bytes-rw-r--r--doc/src/images/designer-getting-started.pngbin0 -> 8643 bytes-rw-r--r--doc/src/images/designer-layout-inserting.pngbin0 -> 7763 bytes-rw-r--r--doc/src/images/designer-main-window.pngbin0 -> 38403 bytes-rw-r--r--doc/src/images/designer-making-connection.pngbin0 -> 9580 bytes-rw-r--r--doc/src/images/designer-manual-containerextension.pngbin0 -> 12183 bytes-rw-r--r--doc/src/images/designer-manual-membersheetextension.pngbin0 -> 19526 bytes-rw-r--r--doc/src/images/designer-manual-propertysheetextension.pngbin0 -> 28707 bytes-rw-r--r--doc/src/images/designer-manual-taskmenuextension.pngbin0 -> 12821 bytes-rw-r--r--doc/src/images/designer-multiple-screenshot.pngbin0 -> 182639 bytes-rw-r--r--doc/src/images/designer-object-inspector.pngbin0 -> 8529 bytes-rw-r--r--doc/src/images/designer-palette-brush-editor.pngbin0 -> 31141 bytes-rw-r--r--doc/src/images/designer-palette-editor.pngbin0 -> 46052 bytes-rw-r--r--doc/src/images/designer-palette-gradient-editor.pngbin0 -> 73055 bytes-rw-r--r--doc/src/images/designer-palette-pattern-editor.pngbin0 -> 29948 bytes-rw-r--r--doc/src/images/designer-preview-device-skin.pngbin0 -> 65513 bytes-rw-r--r--doc/src/images/designer-preview-deviceskin-selection.pngbin0 -> 7562 bytes-rw-r--r--doc/src/images/designer-preview-style-selection.pngbin0 -> 5913 bytes-rw-r--r--doc/src/images/designer-preview-style.pngbin0 -> 40601 bytes-rw-r--r--doc/src/images/designer-preview-stylesheet.pngbin0 -> 33386 bytes-rw-r--r--doc/src/images/designer-promoting-widgets.pngbin0 -> 16816 bytes-rw-r--r--doc/src/images/designer-property-editor-add-dynamic.pngbin0 -> 807 bytes-rw-r--r--doc/src/images/designer-property-editor-configure.pngbin0 -> 981 bytes-rw-r--r--doc/src/images/designer-property-editor-link.pngbin0 -> 18143 bytes-rw-r--r--doc/src/images/designer-property-editor-remove-dynamic.pngbin0 -> 362 bytes-rw-r--r--doc/src/images/designer-property-editor-toolbar.pngbin0 -> 3409 bytes-rw-r--r--doc/src/images/designer-property-editor.pngbin0 -> 45934 bytes-rw-r--r--doc/src/images/designer-reload-resources-button.pngbin0 -> 1107 bytes-rw-r--r--doc/src/images/designer-remove-custom-toolbar.pngbin0 -> 751 bytes-rw-r--r--doc/src/images/designer-remove-resource-entry-button.pngbin0 -> 680 bytes-rw-r--r--doc/src/images/designer-resource-browser.pngbin0 -> 13610 bytes-rw-r--r--doc/src/images/designer-resource-selector.pngbin0 -> 16664 bytes-rw-r--r--doc/src/images/designer-resource-tool.pngbin0 -> 2171 bytes-rw-r--r--doc/src/images/designer-resources-adding.pngbin0 -> 12014 bytes-rw-r--r--doc/src/images/designer-resources-editing.pngbin0 -> 16219 bytes-rw-r--r--doc/src/images/designer-resources-empty.pngbin0 -> 8297 bytes-rw-r--r--doc/src/images/designer-resources-using.pngbin0 -> 4311 bytes-rw-r--r--doc/src/images/designer-screenshot-small.pngbin0 -> 109684 bytes-rw-r--r--doc/src/images/designer-screenshot.pngbin0 -> 169618 bytes-rw-r--r--doc/src/images/designer-selecting-widget.pngbin0 -> 7266 bytes-rw-r--r--doc/src/images/designer-selecting-widgets.pngbin0 -> 8095 bytes-rw-r--r--doc/src/images/designer-set-layout.pngbin0 -> 4126 bytes-rw-r--r--doc/src/images/designer-set-layout2.pngbin0 -> 8356 bytes-rw-r--r--doc/src/images/designer-splitter-layout.pngbin0 -> 81481 bytes-rw-r--r--doc/src/images/designer-stylesheet-options.pngbin0 -> 18914 bytes-rw-r--r--doc/src/images/designer-stylesheet-usage.pngbin0 -> 8128 bytes-rw-r--r--doc/src/images/designer-tab-order-mode.pngbin0 -> 9744 bytes-rw-r--r--doc/src/images/designer-tab-order-tool.pngbin0 -> 1963 bytes-rw-r--r--doc/src/images/designer-validator-highlighter.pngbin0 -> 27153 bytes-rw-r--r--doc/src/images/designer-widget-box.pngbin0 -> 13120 bytes-rw-r--r--doc/src/images/designer-widget-filter.pngbin0 -> 16325 bytes-rw-r--r--doc/src/images/designer-widget-final.pngbin0 -> 9462 bytes-rw-r--r--doc/src/images/designer-widget-initial.pngbin0 -> 15323 bytes-rw-r--r--doc/src/images/designer-widget-layout.pngbin0 -> 14885 bytes-rw-r--r--doc/src/images/designer-widget-morph.pngbin0 -> 21957 bytes-rw-r--r--doc/src/images/designer-widget-preview.pngbin0 -> 9991 bytes-rw-r--r--doc/src/images/designer-widget-tool.pngbin0 -> 1874 bytes-rw-r--r--doc/src/images/desktop-examples.pngbin0 -> 6430 bytes-rw-r--r--doc/src/images/diagonalGradient.pngbin0 -> 611 bytes-rw-r--r--doc/src/images/diagramscene.pngbin0 -> 21070 bytes-rw-r--r--doc/src/images/dialog-examples.pngbin0 -> 7049 bytes-rw-r--r--doc/src/images/dialogbuttonboxexample.pngbin0 -> 16426 bytes-rw-r--r--doc/src/images/dialogs-examples.pngbin0 -> 7049 bytes-rw-r--r--doc/src/images/digitalclock-example.pngbin0 -> 6142 bytes-rw-r--r--doc/src/images/directapproach-calculatorform.pngbin0 -> 7978 bytes-rw-r--r--doc/src/images/dirview-example.pngbin0 -> 22348 bytes-rw-r--r--doc/src/images/dockwidget-cross.pngbin0 -> 28926 bytes-rw-r--r--doc/src/images/dockwidget-neighbors.pngbin0 -> 21011 bytes-rw-r--r--doc/src/images/dockwidgets-example.pngbin0 -> 17312 bytes-rw-r--r--doc/src/images/dombookmarks-example.pngbin0 -> 19405 bytes-rw-r--r--doc/src/images/draganddrop-examples.pngbin0 -> 14216 bytes-rw-r--r--doc/src/images/draganddroppuzzle-example.pngbin0 -> 191122 bytes-rw-r--r--doc/src/images/dragdroprobot-example.pngbin0 -> 28679 bytes-rw-r--r--doc/src/images/draggableicons-example.pngbin0 -> 20277 bytes-rw-r--r--doc/src/images/draggabletext-example.pngbin0 -> 10616 bytes-rw-r--r--doc/src/images/draw_arc.pngbin0 -> 2268 bytes-rw-r--r--doc/src/images/draw_chord.pngbin0 -> 2232 bytes-rw-r--r--doc/src/images/drilldown-example.pngbin0 -> 128081 bytes-rw-r--r--doc/src/images/dropsite-example.pngbin0 -> 118905 bytes-rw-r--r--doc/src/images/dynamiclayouts-example.pngbin0 -> 11597 bytes-rw-r--r--doc/src/images/echopluginexample.pngbin0 -> 5921 bytes-rw-r--r--doc/src/images/effectwidget.pngbin0 -> 6125 bytes-rw-r--r--doc/src/images/elasticnodes-example.pngbin0 -> 20101 bytes-rw-r--r--doc/src/images/embedded-demo-launcher.pngbin0 -> 92072 bytes-rw-r--r--doc/src/images/embedded-simpledecoration-example-styles.pngbin0 -> 17654 bytes-rw-r--r--doc/src/images/embedded-simpledecoration-example.pngbin0 -> 41636 bytes-rw-r--r--doc/src/images/embeddeddialogs-demo.pngbin0 -> 126932 bytes-rw-r--r--doc/src/images/extension-example.pngbin0 -> 7676 bytes-rw-r--r--doc/src/images/extension_more.pngbin0 -> 9309 bytes-rw-r--r--doc/src/images/fetchmore-example.pngbin0 -> 13407 bytes-rw-r--r--doc/src/images/filedialogurls.pngbin0 -> 29132 bytes-rw-r--r--doc/src/images/filetree_1-example.pngbin0 -> 116931 bytes-rw-r--r--doc/src/images/filetree_2-example.pngbin0 -> 121356 bytes-rw-r--r--doc/src/images/findfiles-example.pngbin0 -> 11219 bytes-rw-r--r--doc/src/images/findfiles_progress_dialog.pngbin0 -> 6759 bytes-rw-r--r--doc/src/images/flowlayout-example.pngbin0 -> 5054 bytes-rw-r--r--doc/src/images/fontsampler-example.pngbin0 -> 56819 bytes-rw-r--r--doc/src/images/foreignkeys.pngbin0 -> 3739 bytes-rw-r--r--doc/src/images/formextractor-example.pngbin0 -> 80692 bytes-rw-r--r--doc/src/images/fortuneclient-example.pngbin0 -> 8282 bytes-rw-r--r--doc/src/images/fortuneserver-example.pngbin0 -> 7883 bytes-rw-r--r--doc/src/images/framebufferobject-example.pngbin0 -> 117430 bytes-rw-r--r--doc/src/images/framebufferobject2-example.pngbin0 -> 203754 bytes-rw-r--r--doc/src/images/frames.pngbin0 -> 25735 bytes-rw-r--r--doc/src/images/fridgemagnets-example.pngbin0 -> 33012 bytes-rw-r--r--doc/src/images/ftp-example.pngbin0 -> 12371 bytes-rw-r--r--doc/src/images/geometry.pngbin0 -> 7847 bytes-rw-r--r--doc/src/images/grabber-example.pngbin0 -> 9893 bytes-rw-r--r--doc/src/images/gradientText.pngbin0 -> 11155 bytes-rw-r--r--doc/src/images/gradients-demo.pngbin0 -> 93147 bytes-rw-r--r--doc/src/images/graphicsview-ellipseitem-pie.pngbin0 -> 6683 bytes-rw-r--r--doc/src/images/graphicsview-ellipseitem.pngbin0 -> 5801 bytes-rw-r--r--doc/src/images/graphicsview-examples.pngbin0 -> 26994 bytes-rw-r--r--doc/src/images/graphicsview-items.pngbin0 -> 62593 bytes-rw-r--r--doc/src/images/graphicsview-lineitem.pngbin0 -> 3685 bytes-rw-r--r--doc/src/images/graphicsview-map.pngbin0 -> 116541 bytes-rw-r--r--doc/src/images/graphicsview-parentchild.pngbin0 -> 7944 bytes-rw-r--r--doc/src/images/graphicsview-pathitem.pngbin0 -> 5710 bytes-rw-r--r--doc/src/images/graphicsview-pixmapitem.pngbin0 -> 10764 bytes-rw-r--r--doc/src/images/graphicsview-polygonitem.pngbin0 -> 5829 bytes-rw-r--r--doc/src/images/graphicsview-rectitem.pngbin0 -> 3305 bytes-rw-r--r--doc/src/images/graphicsview-shapes.pngbin0 -> 232704 bytes-rw-r--r--doc/src/images/graphicsview-simpletextitem.pngbin0 -> 7297 bytes-rw-r--r--doc/src/images/graphicsview-text.pngbin0 -> 82252 bytes-rw-r--r--doc/src/images/graphicsview-textitem.pngbin0 -> 6950 bytes-rw-r--r--doc/src/images/graphicsview-view.pngbin0 -> 53967 bytes-rw-r--r--doc/src/images/graphicsview-zorder.pngbin0 -> 6724 bytes-rw-r--r--doc/src/images/gridlayout.pngbin0 -> 1445 bytes-rw-r--r--doc/src/images/groupbox-example.pngbin0 -> 18620 bytes-rw-r--r--doc/src/images/gtk-calendarwidget.pngbin0 -> 16761 bytes-rw-r--r--doc/src/images/gtk-checkbox.pngbin0 -> 2323 bytes-rw-r--r--doc/src/images/gtk-columnview.pngbin0 -> 2889 bytes-rw-r--r--doc/src/images/gtk-combobox.pngbin0 -> 2730 bytes-rw-r--r--doc/src/images/gtk-dateedit.pngbin0 -> 2163 bytes-rw-r--r--doc/src/images/gtk-datetimeedit.pngbin0 -> 2923 bytes-rw-r--r--doc/src/images/gtk-dial.pngbin0 -> 7221 bytes-rw-r--r--doc/src/images/gtk-doublespinbox.pngbin0 -> 2325 bytes-rw-r--r--doc/src/images/gtk-fontcombobox.pngbin0 -> 3022 bytes-rw-r--r--doc/src/images/gtk-frame.pngbin0 -> 2340 bytes-rw-r--r--doc/src/images/gtk-groupbox.pngbin0 -> 6650 bytes-rw-r--r--doc/src/images/gtk-horizontalscrollbar.pngbin0 -> 1701 bytes-rw-r--r--doc/src/images/gtk-label.pngbin0 -> 1582 bytes-rw-r--r--doc/src/images/gtk-lcdnumber.pngbin0 -> 1193 bytes-rw-r--r--doc/src/images/gtk-lineedit.pngbin0 -> 2528 bytes-rw-r--r--doc/src/images/gtk-listview.pngbin0 -> 8493 bytes-rw-r--r--doc/src/images/gtk-progressbar.pngbin0 -> 2228 bytes-rw-r--r--doc/src/images/gtk-pushbutton.pngbin0 -> 2153 bytes-rw-r--r--doc/src/images/gtk-radiobutton.pngbin0 -> 3142 bytes-rw-r--r--doc/src/images/gtk-slider.pngbin0 -> 1359 bytes-rw-r--r--doc/src/images/gtk-spinbox.pngbin0 -> 2078 bytes-rw-r--r--doc/src/images/gtk-style-screenshot.pngbin0 -> 24295 bytes-rw-r--r--doc/src/images/gtk-tableview.pngbin0 -> 8364 bytes-rw-r--r--doc/src/images/gtk-tabwidget.pngbin0 -> 8179 bytes-rw-r--r--doc/src/images/gtk-textedit.pngbin0 -> 12641 bytes-rw-r--r--doc/src/images/gtk-timeedit.pngbin0 -> 2621 bytes-rw-r--r--doc/src/images/gtk-toolbox.pngbin0 -> 4240 bytes-rw-r--r--doc/src/images/gtk-toolbutton.pngbin0 -> 2260 bytes-rw-r--r--doc/src/images/gtk-treeview.pngbin0 -> 9722 bytes-rw-r--r--doc/src/images/hellogl-es-example.pngbin0 -> 61110 bytes-rw-r--r--doc/src/images/hellogl-example.pngbin0 -> 9520 bytes-rw-r--r--doc/src/images/http-example.pngbin0 -> 7006 bytes-rw-r--r--doc/src/images/httpstack.pngbin0 -> 29855 bytes-rw-r--r--doc/src/images/i18n-example.pngbin0 -> 22531 bytes-rw-r--r--doc/src/images/icon.pngbin0 -> 40790 bytes-rw-r--r--doc/src/images/icons-example.pngbin0 -> 60906 bytes-rw-r--r--doc/src/images/icons-view-menu.pngbin0 -> 2392 bytes-rw-r--r--doc/src/images/icons_find_normal.pngbin0 -> 25313 bytes-rw-r--r--doc/src/images/icons_find_normal_disabled.pngbin0 -> 27271 bytes-rw-r--r--doc/src/images/icons_images_groupbox.pngbin0 -> 2316 bytes-rw-r--r--doc/src/images/icons_monkey.pngbin0 -> 43975 bytes-rw-r--r--doc/src/images/icons_monkey_active.pngbin0 -> 37222 bytes-rw-r--r--doc/src/images/icons_monkey_mess.pngbin0 -> 42785 bytes-rw-r--r--doc/src/images/icons_preview_area.pngbin0 -> 2315 bytes-rw-r--r--doc/src/images/icons_qt_extended_16x16.pngbin0 -> 1184 bytes-rw-r--r--doc/src/images/icons_qt_extended_17x17.pngbin0 -> 1219 bytes-rw-r--r--doc/src/images/icons_qt_extended_32x32.pngbin0 -> 2185 bytes-rw-r--r--doc/src/images/icons_qt_extended_33x33.pngbin0 -> 2435 bytes-rw-r--r--doc/src/images/icons_qt_extended_48x48.pngbin0 -> 3805 bytes-rw-r--r--doc/src/images/icons_qt_extended_64x64.pngbin0 -> 3805 bytes-rw-r--r--doc/src/images/icons_qt_extended_8x8.pngbin0 -> 685 bytes-rw-r--r--doc/src/images/icons_size_groupbox.pngbin0 -> 2651 bytes-rw-r--r--doc/src/images/icons_size_spinbox.pngbin0 -> 561 bytes-rw-r--r--doc/src/images/imagecomposition-example.pngbin0 -> 32905 bytes-rw-r--r--doc/src/images/imageviewer-example.pngbin0 -> 168586 bytes-rw-r--r--doc/src/images/imageviewer-fit_to_window_1.pngbin0 -> 84584 bytes-rw-r--r--doc/src/images/imageviewer-fit_to_window_2.pngbin0 -> 145998 bytes-rw-r--r--doc/src/images/imageviewer-original_size.pngbin0 -> 61567 bytes-rw-r--r--doc/src/images/imageviewer-zoom_in_1.pngbin0 -> 84559 bytes-rw-r--r--doc/src/images/imageviewer-zoom_in_2.pngbin0 -> 85537 bytes-rw-r--r--doc/src/images/inputdialogs.pngbin0 -> 4244 bytes-rw-r--r--doc/src/images/insertrowinmodelview.pngbin0 -> 3867 bytes-rw-r--r--doc/src/images/interview-demo.pngbin0 -> 29651 bytes-rw-r--r--doc/src/images/interview-shareddirmodel.pngbin0 -> 10153 bytes-rw-r--r--doc/src/images/itemview-examples.pngbin0 -> 15264 bytes-rw-r--r--doc/src/images/itemviews-editabletreemodel-indexes.pngbin0 -> 23239 bytes-rw-r--r--doc/src/images/itemviews-editabletreemodel-items.pngbin0 -> 26317 bytes-rw-r--r--doc/src/images/itemviews-editabletreemodel-model.pngbin0 -> 18629 bytes-rw-r--r--doc/src/images/itemviews-editabletreemodel-values.pngbin0 -> 22202 bytes-rw-r--r--doc/src/images/itemviews-editabletreemodel.pngbin0 -> 32534 bytes-rw-r--r--doc/src/images/itemviews-examples.pngbin0 -> 15264 bytes-rw-r--r--doc/src/images/itemviewspuzzle-example.pngbin0 -> 211091 bytes-rw-r--r--doc/src/images/javaiterators1.pngbin0 -> 1062 bytes-rw-r--r--doc/src/images/javaiterators2.pngbin0 -> 2011 bytes-rw-r--r--doc/src/images/javastyle/branchindicatorimage.pngbin0 -> 18867 bytes-rw-r--r--doc/src/images/javastyle/button.pngbin0 -> 5475 bytes-rw-r--r--doc/src/images/javastyle/checkbox.pngbin0 -> 3634 bytes-rw-r--r--doc/src/images/javastyle/checkboxexample.pngbin0 -> 911 bytes-rw-r--r--doc/src/images/javastyle/checkingsomestuff.pngbin0 -> 14952 bytes-rw-r--r--doc/src/images/javastyle/combobox.pngbin0 -> 3537 bytes-rw-r--r--doc/src/images/javastyle/comboboximage.pngbin0 -> 6527 bytes-rw-r--r--doc/src/images/javastyle/conceptualpushbuttontree.pngbin0 -> 3590 bytes-rw-r--r--doc/src/images/javastyle/dockwidget.pngbin0 -> 7181 bytes-rw-r--r--doc/src/images/javastyle/dockwidgetimage.pngbin0 -> 21774 bytes-rw-r--r--doc/src/images/javastyle/groupbox.pngbin0 -> 2010 bytes-rw-r--r--doc/src/images/javastyle/groupboximage.pngbin0 -> 7067 bytes-rw-r--r--doc/src/images/javastyle/header.pngbin0 -> 4399 bytes-rw-r--r--doc/src/images/javastyle/headerimage.pngbin0 -> 6474 bytes-rw-r--r--doc/src/images/javastyle/menu.pngbin0 -> 6508 bytes-rw-r--r--doc/src/images/javastyle/menubar.pngbin0 -> 4315 bytes-rw-r--r--doc/src/images/javastyle/menubarimage.pngbin0 -> 4487 bytes-rw-r--r--doc/src/images/javastyle/menuimage.pngbin0 -> 5584 bytes-rw-r--r--doc/src/images/javastyle/plastiquetabimage.pngbin0 -> 6061 bytes-rw-r--r--doc/src/images/javastyle/plastiquetabtest.pngbin0 -> 5798 bytes-rw-r--r--doc/src/images/javastyle/progressbar.pngbin0 -> 4493 bytes-rw-r--r--doc/src/images/javastyle/progressbarimage.pngbin0 -> 6921 bytes-rw-r--r--doc/src/images/javastyle/pushbutton.pngbin0 -> 6820 bytes-rw-r--r--doc/src/images/javastyle/rubberband.pngbin0 -> 765 bytes-rw-r--r--doc/src/images/javastyle/rubberbandimage.pngbin0 -> 6452 bytes-rw-r--r--doc/src/images/javastyle/scrollbar.pngbin0 -> 7199 bytes-rw-r--r--doc/src/images/javastyle/scrollbarimage.pngbin0 -> 6196 bytes-rw-r--r--doc/src/images/javastyle/sizegrip.pngbin0 -> 708 bytes-rw-r--r--doc/src/images/javastyle/sizegripimage.pngbin0 -> 1793 bytes-rw-r--r--doc/src/images/javastyle/slider.pngbin0 -> 2844 bytes-rw-r--r--doc/src/images/javastyle/sliderhandle.pngbin0 -> 6304 bytes-rw-r--r--doc/src/images/javastyle/sliderimage.pngbin0 -> 3442 bytes-rw-r--r--doc/src/images/javastyle/slidertroubble.pngbin0 -> 23927 bytes-rw-r--r--doc/src/images/javastyle/spinbox.pngbin0 -> 2864 bytes-rw-r--r--doc/src/images/javastyle/spinboximage.pngbin0 -> 4544 bytes-rw-r--r--doc/src/images/javastyle/splitter.pngbin0 -> 817 bytes-rw-r--r--doc/src/images/javastyle/tab.pngbin0 -> 12176 bytes-rw-r--r--doc/src/images/javastyle/tabwidget.pngbin0 -> 4725 bytes-rw-r--r--doc/src/images/javastyle/titlebar.pngbin0 -> 2609 bytes-rw-r--r--doc/src/images/javastyle/titlebarimage.pngbin0 -> 6882 bytes-rw-r--r--doc/src/images/javastyle/toolbar.pngbin0 -> 6303 bytes-rw-r--r--doc/src/images/javastyle/toolbarimage.pngbin0 -> 8245 bytes-rw-r--r--doc/src/images/javastyle/toolbox.pngbin0 -> 3211 bytes-rw-r--r--doc/src/images/javastyle/toolboximage.pngbin0 -> 5580 bytes-rw-r--r--doc/src/images/javastyle/toolbutton.pngbin0 -> 4487 bytes-rw-r--r--doc/src/images/javastyle/toolbuttonimage.pngbin0 -> 5124 bytes-rw-r--r--doc/src/images/javastyle/windowstabimage.pngbin0 -> 6898 bytes-rw-r--r--doc/src/images/layout-examples.pngbin0 -> 13670 bytes-rw-r--r--doc/src/images/layout1.pngbin0 -> 106 bytes-rw-r--r--doc/src/images/layout2.pngbin0 -> 233 bytes-rw-r--r--doc/src/images/layouts-examples.pngbin0 -> 13670 bytes-rw-r--r--doc/src/images/licensewizard-example.pngbin0 -> 65778 bytes-rw-r--r--doc/src/images/licensewizard-flow.pngbin0 -> 15306 bytes-rw-r--r--doc/src/images/licensewizard.pngbin0 -> 43131 bytes-rw-r--r--doc/src/images/lineedits-example.pngbin0 -> 14584 bytes-rw-r--r--doc/src/images/linguist-arrowpad_en.pngbin0 -> 1429 bytes-rw-r--r--doc/src/images/linguist-arrowpad_fr.pngbin0 -> 1671 bytes-rw-r--r--doc/src/images/linguist-arrowpad_nl.pngbin0 -> 1706 bytes-rw-r--r--doc/src/images/linguist-auxlanguages.pngbin0 -> 13023 bytes-rw-r--r--doc/src/images/linguist-batchtranslation.pngbin0 -> 17116 bytes-rw-r--r--doc/src/images/linguist-check-empty.pngbin0 -> 404 bytes-rw-r--r--doc/src/images/linguist-check-obsolete.pngbin0 -> 192 bytes-rw-r--r--doc/src/images/linguist-check-off.pngbin0 -> 434 bytes-rw-r--r--doc/src/images/linguist-check-on.pngbin0 -> 192 bytes-rw-r--r--doc/src/images/linguist-check-warning.pngbin0 -> 192 bytes-rw-r--r--doc/src/images/linguist-danger.pngbin0 -> 304 bytes-rw-r--r--doc/src/images/linguist-doneandnext.pngbin0 -> 1849 bytes-rw-r--r--doc/src/images/linguist-editcopy.pngbin0 -> 1614 bytes-rw-r--r--doc/src/images/linguist-editcut.pngbin0 -> 1896 bytes-rw-r--r--doc/src/images/linguist-editfind.pngbin0 -> 1944 bytes-rw-r--r--doc/src/images/linguist-editpaste.pngbin0 -> 1989 bytes-rw-r--r--doc/src/images/linguist-editredo.pngbin0 -> 1787 bytes-rw-r--r--doc/src/images/linguist-editundo.pngbin0 -> 1768 bytes-rw-r--r--doc/src/images/linguist-examples.pngbin0 -> 8571 bytes-rw-r--r--doc/src/images/linguist-fileopen.pngbin0 -> 2309 bytes-rw-r--r--doc/src/images/linguist-fileprint.pngbin0 -> 1732 bytes-rw-r--r--doc/src/images/linguist-filesave.pngbin0 -> 1894 bytes-rw-r--r--doc/src/images/linguist-finddialog.pngbin0 -> 12457 bytes-rw-r--r--doc/src/images/linguist-hellotr_en.pngbin0 -> 3367 bytes-rw-r--r--doc/src/images/linguist-hellotr_la.pngbin0 -> 753 bytes-rw-r--r--doc/src/images/linguist-linguist.pngbin0 -> 201717 bytes-rw-r--r--doc/src/images/linguist-linguist_2.pngbin0 -> 260946 bytes-rw-r--r--doc/src/images/linguist-menubar.pngbin0 -> 1492 bytes-rw-r--r--doc/src/images/linguist-next.pngbin0 -> 908 bytes-rw-r--r--doc/src/images/linguist-nextunfinished.pngbin0 -> 1928 bytes-rw-r--r--doc/src/images/linguist-phrasebookdialog.pngbin0 -> 36034 bytes-rw-r--r--doc/src/images/linguist-phrasebookopen.pngbin0 -> 1571 bytes-rw-r--r--doc/src/images/linguist-prev.pngbin0 -> 911 bytes-rw-r--r--doc/src/images/linguist-previewtool.pngbin0 -> 74735 bytes-rw-r--r--doc/src/images/linguist-prevunfinished.pngbin0 -> 1883 bytes-rw-r--r--doc/src/images/linguist-toolbar.pngbin0 -> 19941 bytes-rw-r--r--doc/src/images/linguist-translationfilesettings.pngbin0 -> 49604 bytes-rw-r--r--doc/src/images/linguist-trollprint_10_en.pngbin0 -> 1951 bytes-rw-r--r--doc/src/images/linguist-trollprint_10_pt_bad.pngbin0 -> 2073 bytes-rw-r--r--doc/src/images/linguist-trollprint_10_pt_good.pngbin0 -> 2120 bytes-rw-r--r--doc/src/images/linguist-trollprint_11_en.pngbin0 -> 2019 bytes-rw-r--r--doc/src/images/linguist-trollprint_11_pt.pngbin0 -> 2152 bytes-rw-r--r--doc/src/images/linguist-validateaccelerators.pngbin0 -> 2159 bytes-rw-r--r--doc/src/images/linguist-validatephrases.pngbin0 -> 2251 bytes-rw-r--r--doc/src/images/linguist-validateplacemarkers.pngbin0 -> 1994 bytes-rw-r--r--doc/src/images/linguist-validatepunctuation.pngbin0 -> 1851 bytes-rw-r--r--doc/src/images/linguist-whatsthis.pngbin0 -> 1948 bytes-rw-r--r--doc/src/images/localfortuneclient-example.pngbin0 -> 8402 bytes-rw-r--r--doc/src/images/localfortuneserver-example.pngbin0 -> 5715 bytes-rw-r--r--doc/src/images/loopback-example.pngbin0 -> 6195 bytes-rw-r--r--doc/src/images/mac-cocoa.pngbin0 -> 7229 bytes-rw-r--r--doc/src/images/macintosh-calendarwidget.pngbin0 -> 13560 bytes-rw-r--r--doc/src/images/macintosh-checkbox.pngbin0 -> 2473 bytes-rw-r--r--doc/src/images/macintosh-combobox.pngbin0 -> 3273 bytes-rw-r--r--doc/src/images/macintosh-dateedit.pngbin0 -> 1703 bytes-rw-r--r--doc/src/images/macintosh-datetimeedit.pngbin0 -> 2633 bytes-rw-r--r--doc/src/images/macintosh-dial.pngbin0 -> 2563 bytes-rw-r--r--doc/src/images/macintosh-doublespinbox.pngbin0 -> 2306 bytes-rw-r--r--doc/src/images/macintosh-fontcombobox.pngbin0 -> 2967 bytes-rw-r--r--doc/src/images/macintosh-frame.pngbin0 -> 6187 bytes-rw-r--r--doc/src/images/macintosh-groupbox.pngbin0 -> 6469 bytes-rw-r--r--doc/src/images/macintosh-horizontalscrollbar.pngbin0 -> 2242 bytes-rw-r--r--doc/src/images/macintosh-label.pngbin0 -> 1450 bytes-rw-r--r--doc/src/images/macintosh-lcdnumber.pngbin0 -> 492 bytes-rw-r--r--doc/src/images/macintosh-lineedit.pngbin0 -> 1854 bytes-rw-r--r--doc/src/images/macintosh-listview.pngbin0 -> 9987 bytes-rw-r--r--doc/src/images/macintosh-menu.pngbin0 -> 6891 bytes-rw-r--r--doc/src/images/macintosh-progressbar.pngbin0 -> 1127 bytes-rw-r--r--doc/src/images/macintosh-pushbutton.pngbin0 -> 2966 bytes-rw-r--r--doc/src/images/macintosh-radiobutton.pngbin0 -> 2914 bytes-rw-r--r--doc/src/images/macintosh-slider.pngbin0 -> 1694 bytes-rw-r--r--doc/src/images/macintosh-spinbox.pngbin0 -> 1964 bytes-rw-r--r--doc/src/images/macintosh-tableview.pngbin0 -> 10024 bytes-rw-r--r--doc/src/images/macintosh-tabwidget.pngbin0 -> 9562 bytes-rw-r--r--doc/src/images/macintosh-textedit.pngbin0 -> 7845 bytes-rw-r--r--doc/src/images/macintosh-timeedit.pngbin0 -> 2244 bytes-rw-r--r--doc/src/images/macintosh-toolbox.pngbin0 -> 2576 bytes-rw-r--r--doc/src/images/macintosh-toolbutton.pngbin0 -> 2003 bytes-rw-r--r--doc/src/images/macintosh-treeview.pngbin0 -> 11728 bytes-rw-r--r--doc/src/images/macintosh-unified-toolbar.pngbin0 -> 28974 bytes-rw-r--r--doc/src/images/macmainwindow.pngbin0 -> 39579 bytes-rw-r--r--doc/src/images/mainwindow-contextmenu.pngbin0 -> 4971 bytes-rw-r--r--doc/src/images/mainwindow-custom-dock.pngbin0 -> 37983 bytes-rw-r--r--doc/src/images/mainwindow-demo.pngbin0 -> 62759 bytes-rw-r--r--doc/src/images/mainwindow-docks-example.pngbin0 -> 14427 bytes-rw-r--r--doc/src/images/mainwindow-docks.pngbin0 -> 37240 bytes-rw-r--r--doc/src/images/mainwindow-examples.pngbin0 -> 10271 bytes-rw-r--r--doc/src/images/mainwindow-vertical-dock.pngbin0 -> 14773 bytes-rw-r--r--doc/src/images/mainwindow-vertical-tabs.pngbin0 -> 29591 bytes-rw-r--r--doc/src/images/mainwindowlayout.pngbin0 -> 6782 bytes-rw-r--r--doc/src/images/mainwindows-examples.pngbin0 -> 7049 bytes-rw-r--r--doc/src/images/mandelbrot-example.pngbin0 -> 84202 bytes-rw-r--r--doc/src/images/mandelbrot_scroll1.pngbin0 -> 19615 bytes-rw-r--r--doc/src/images/mandelbrot_scroll2.pngbin0 -> 13901 bytes-rw-r--r--doc/src/images/mandelbrot_scroll3.pngbin0 -> 18976 bytes-rw-r--r--doc/src/images/mandelbrot_zoom1.pngbin0 -> 16000 bytes-rw-r--r--doc/src/images/mandelbrot_zoom2.pngbin0 -> 8163 bytes-rw-r--r--doc/src/images/mandelbrot_zoom3.pngbin0 -> 9848 bytes-rw-r--r--doc/src/images/masterdetail-example.pngbin0 -> 104228 bytes-rw-r--r--doc/src/images/mdi-cascade.pngbin0 -> 14590 bytes-rw-r--r--doc/src/images/mdi-example.pngbin0 -> 33375 bytes-rw-r--r--doc/src/images/mdi-tile.pngbin0 -> 31624 bytes-rw-r--r--doc/src/images/mediaplayer-demo.pngbin0 -> 12868 bytes-rw-r--r--doc/src/images/menus-example.pngbin0 -> 12487 bytes-rw-r--r--doc/src/images/modelindex-no-parent.pngbin0 -> 7407 bytes-rw-r--r--doc/src/images/modelindex-parent.pngbin0 -> 50172 bytes-rw-r--r--doc/src/images/modelview-begin-append-columns.pngbin0 -> 12798 bytes-rw-r--r--doc/src/images/modelview-begin-append-rows.pngbin0 -> 8967 bytes-rw-r--r--doc/src/images/modelview-begin-insert-columns.pngbin0 -> 14476 bytes-rw-r--r--doc/src/images/modelview-begin-insert-rows.pngbin0 -> 12565 bytes-rw-r--r--doc/src/images/modelview-begin-remove-columns.pngbin0 -> 14518 bytes-rw-r--r--doc/src/images/modelview-begin-remove-rows.pngbin0 -> 10896 bytes-rw-r--r--doc/src/images/modelview-listmodel.pngbin0 -> 5478 bytes-rw-r--r--doc/src/images/modelview-models.pngbin0 -> 20540 bytes-rw-r--r--doc/src/images/modelview-overview.pngbin0 -> 15042 bytes-rw-r--r--doc/src/images/modelview-roles.pngbin0 -> 24954 bytes-rw-r--r--doc/src/images/modelview-tablemodel.pngbin0 -> 12256 bytes-rw-r--r--doc/src/images/modelview-treemodel.pngbin0 -> 9193 bytes-rw-r--r--doc/src/images/motif-calendarwidget.pngbin0 -> 9989 bytes-rw-r--r--doc/src/images/motif-checkbox.pngbin0 -> 1284 bytes-rw-r--r--doc/src/images/motif-combobox.pngbin0 -> 1276 bytes-rw-r--r--doc/src/images/motif-dateedit.pngbin0 -> 1214 bytes-rw-r--r--doc/src/images/motif-datetimeedit.pngbin0 -> 1730 bytes-rw-r--r--doc/src/images/motif-dial.pngbin0 -> 2017 bytes-rw-r--r--doc/src/images/motif-doublespinbox.pngbin0 -> 1019 bytes-rw-r--r--doc/src/images/motif-fontcombobox.pngbin0 -> 1633 bytes-rw-r--r--doc/src/images/motif-frame.pngbin0 -> 5631 bytes-rw-r--r--doc/src/images/motif-groupbox.pngbin0 -> 2514 bytes-rw-r--r--doc/src/images/motif-horizontalscrollbar.pngbin0 -> 628 bytes-rw-r--r--doc/src/images/motif-label.pngbin0 -> 699 bytes-rw-r--r--doc/src/images/motif-lcdnumber.pngbin0 -> 538 bytes-rw-r--r--doc/src/images/motif-lineedit.pngbin0 -> 1360 bytes-rw-r--r--doc/src/images/motif-listview.pngbin0 -> 5189 bytes-rw-r--r--doc/src/images/motif-menubar.pngbin0 -> 1350 bytes-rw-r--r--doc/src/images/motif-progressbar.pngbin0 -> 927 bytes-rw-r--r--doc/src/images/motif-pushbutton.pngbin0 -> 1045 bytes-rw-r--r--doc/src/images/motif-radiobutton.pngbin0 -> 1545 bytes-rw-r--r--doc/src/images/motif-slider.pngbin0 -> 543 bytes-rw-r--r--doc/src/images/motif-spinbox.pngbin0 -> 875 bytes-rw-r--r--doc/src/images/motif-tableview.pngbin0 -> 3102 bytes-rw-r--r--doc/src/images/motif-tabwidget.pngbin0 -> 2490 bytes-rw-r--r--doc/src/images/motif-textedit.pngbin0 -> 7378 bytes-rw-r--r--doc/src/images/motif-timeedit.pngbin0 -> 1280 bytes-rw-r--r--doc/src/images/motif-todo.pngbin0 -> 4075 bytes-rw-r--r--doc/src/images/motif-toolbox.pngbin0 -> 1667 bytes-rw-r--r--doc/src/images/motif-toolbutton.pngbin0 -> 1152 bytes-rw-r--r--doc/src/images/motif-treeview.pngbin0 -> 6386 bytes-rw-r--r--doc/src/images/movie-example.pngbin0 -> 12361 bytes-rw-r--r--doc/src/images/msgbox1.pngbin0 -> 4529 bytes-rw-r--r--doc/src/images/msgbox2.pngbin0 -> 9175 bytes-rw-r--r--doc/src/images/msgbox3.pngbin0 -> 9589 bytes-rw-r--r--doc/src/images/msgbox4.pngbin0 -> 17520 bytes-rw-r--r--doc/src/images/multipleinheritance-example.pngbin0 -> 6974 bytes-rw-r--r--doc/src/images/musicplayer.pngbin0 -> 10714 bytes-rw-r--r--doc/src/images/network-chat-example.pngbin0 -> 17453 bytes-rw-r--r--doc/src/images/network-examples.pngbin0 -> 8946 bytes-rw-r--r--doc/src/images/noforeignkeys.pngbin0 -> 3282 bytes-rw-r--r--doc/src/images/opengl-examples.pngbin0 -> 25685 bytes-rw-r--r--doc/src/images/orderform-example-detailsdialog.pngbin0 -> 13070 bytes-rw-r--r--doc/src/images/orderform-example.pngbin0 -> 17404 bytes-rw-r--r--doc/src/images/overpainting-example.pngbin0 -> 67841 bytes-rw-r--r--doc/src/images/padnavigator-example.pngbin0 -> 219818 bytes-rw-r--r--doc/src/images/painterpaths-example.pngbin0 -> 28285 bytes-rw-r--r--doc/src/images/painting-examples.pngbin0 -> 10442 bytes-rw-r--r--doc/src/images/paintsystem-antialiasing.pngbin0 -> 995 bytes-rw-r--r--doc/src/images/paintsystem-core.pngbin0 -> 22101 bytes-rw-r--r--doc/src/images/paintsystem-devices.pngbin0 -> 47404 bytes-rw-r--r--doc/src/images/paintsystem-fancygradient.pngbin0 -> 39213 bytes-rw-r--r--doc/src/images/paintsystem-gradients.pngbin0 -> 16931 bytes-rw-r--r--doc/src/images/paintsystem-icon.pngbin0 -> 5458 bytes-rw-r--r--doc/src/images/paintsystem-movie.pngbin0 -> 4992 bytes-rw-r--r--doc/src/images/paintsystem-painterpath.pngbin0 -> 7503 bytes-rw-r--r--doc/src/images/paintsystem-stylepainter.pngbin0 -> 16572 bytes-rw-r--r--doc/src/images/paintsystem-svg.pngbin0 -> 66692 bytes-rw-r--r--doc/src/images/palette.pngbin0 -> 66359 bytes-rw-r--r--doc/src/images/parent-child-widgets.pngbin0 -> 47824 bytes-rw-r--r--doc/src/images/pathexample.pngbin0 -> 1516 bytes-rw-r--r--doc/src/images/pathstroke-demo.pngbin0 -> 90746 bytes-rw-r--r--doc/src/images/patternist-importFlow.pngbin0 -> 12832 bytes-rw-r--r--doc/src/images/patternist-wordProcessor.pngbin0 -> 10264 bytes-rw-r--r--doc/src/images/pbuffers-example.pngbin0 -> 203754 bytes-rw-r--r--doc/src/images/pbuffers2-example.pngbin0 -> 176171 bytes-rw-r--r--doc/src/images/phonon-examples.pngbin0 -> 41140 bytes-rw-r--r--doc/src/images/pixelator-example.pngbin0 -> 45506 bytes-rw-r--r--doc/src/images/pixmapfilter-example.pngbin0 -> 18249 bytes-rw-r--r--doc/src/images/pixmapfilterexample-colorize.pngbin0 -> 17271 bytes-rw-r--r--doc/src/images/pixmapfilterexample-dropshadow.pngbin0 -> 23930 bytes-rw-r--r--doc/src/images/plaintext-layout.pngbin0 -> 46384 bytes-rw-r--r--doc/src/images/plastique-calendarwidget.pngbin0 -> 9629 bytes-rw-r--r--doc/src/images/plastique-checkbox.pngbin0 -> 1069 bytes-rw-r--r--doc/src/images/plastique-colordialog.pngbin0 -> 22595 bytes-rw-r--r--doc/src/images/plastique-combobox.pngbin0 -> 1714 bytes-rw-r--r--doc/src/images/plastique-dateedit.pngbin0 -> 1271 bytes-rw-r--r--doc/src/images/plastique-datetimeedit.pngbin0 -> 1771 bytes-rw-r--r--doc/src/images/plastique-dial.pngbin0 -> 2995 bytes-rw-r--r--doc/src/images/plastique-dialogbuttonbox.pngbin0 -> 2269 bytes-rw-r--r--doc/src/images/plastique-doublespinbox.pngbin0 -> 1102 bytes-rw-r--r--doc/src/images/plastique-filedialog.pngbin0 -> 19125 bytes-rw-r--r--doc/src/images/plastique-fontcombobox-open.pngbin0 -> 21720 bytes-rw-r--r--doc/src/images/plastique-fontcombobox.pngbin0 -> 1904 bytes-rw-r--r--doc/src/images/plastique-fontdialog.pngbin0 -> 23835 bytes-rw-r--r--doc/src/images/plastique-frame.pngbin0 -> 5616 bytes-rw-r--r--doc/src/images/plastique-groupbox.pngbin0 -> 2704 bytes-rw-r--r--doc/src/images/plastique-horizontalscrollbar.pngbin0 -> 868 bytes-rw-r--r--doc/src/images/plastique-label.pngbin0 -> 696 bytes-rw-r--r--doc/src/images/plastique-lcdnumber.pngbin0 -> 470 bytes-rw-r--r--doc/src/images/plastique-lineedit.pngbin0 -> 1015 bytes-rw-r--r--doc/src/images/plastique-listview.pngbin0 -> 4895 bytes-rw-r--r--doc/src/images/plastique-menu.pngbin0 -> 3867 bytes-rw-r--r--doc/src/images/plastique-menubar.pngbin0 -> 1030 bytes-rw-r--r--doc/src/images/plastique-messagebox.pngbin0 -> 7536 bytes-rw-r--r--doc/src/images/plastique-printdialog-properties.pngbin0 -> 27720 bytes-rw-r--r--doc/src/images/plastique-printdialog.pngbin0 -> 44150 bytes-rw-r--r--doc/src/images/plastique-progressbar.pngbin0 -> 1044 bytes-rw-r--r--doc/src/images/plastique-progressdialog.pngbin0 -> 6311 bytes-rw-r--r--doc/src/images/plastique-pushbutton-menu.pngbin0 -> 3354 bytes-rw-r--r--doc/src/images/plastique-pushbutton.pngbin0 -> 1409 bytes-rw-r--r--doc/src/images/plastique-radiobutton.pngbin0 -> 1667 bytes-rw-r--r--doc/src/images/plastique-sizegrip.pngbin0 -> 8168 bytes-rw-r--r--doc/src/images/plastique-slider.pngbin0 -> 632 bytes-rw-r--r--doc/src/images/plastique-spinbox.pngbin0 -> 968 bytes-rw-r--r--doc/src/images/plastique-statusbar.pngbin0 -> 878 bytes-rw-r--r--doc/src/images/plastique-tabbar-truncated.pngbin0 -> 2986 bytes-rw-r--r--doc/src/images/plastique-tabbar.pngbin0 -> 2721 bytes-rw-r--r--doc/src/images/plastique-tableview.pngbin0 -> 6052 bytes-rw-r--r--doc/src/images/plastique-tabwidget.pngbin0 -> 4705 bytes-rw-r--r--doc/src/images/plastique-textedit.pngbin0 -> 5141 bytes-rw-r--r--doc/src/images/plastique-timeedit.pngbin0 -> 1336 bytes-rw-r--r--doc/src/images/plastique-toolbox.pngbin0 -> 1858 bytes-rw-r--r--doc/src/images/plastique-toolbutton.pngbin0 -> 1254 bytes-rw-r--r--doc/src/images/plastique-treeview.pngbin0 -> 8453 bytes-rw-r--r--doc/src/images/plugandpaint-plugindialog.pngbin0 -> 8706 bytes-rw-r--r--doc/src/images/plugandpaint.pngbin0 -> 7540 bytes-rw-r--r--doc/src/images/portedasteroids-example.pngbin0 -> 27086 bytes-rw-r--r--doc/src/images/portedcanvas-example.pngbin0 -> 259679 bytes-rw-r--r--doc/src/images/previewer-example.pngbin0 -> 16323 bytes-rw-r--r--doc/src/images/previewer-ui.pngbin0 -> 10345 bytes-rw-r--r--doc/src/images/printer-rects.pngbin0 -> 30319 bytes-rw-r--r--doc/src/images/progressBar-stylesheet.pngbin0 -> 455 bytes-rw-r--r--doc/src/images/progressBar2-stylesheet.pngbin0 -> 494 bytes-rw-r--r--doc/src/images/propagation-custom.pngbin0 -> 163413 bytes-rw-r--r--doc/src/images/propagation-standard.pngbin0 -> 83382 bytes-rw-r--r--doc/src/images/q3painter_rationale.pngbin0 -> 1526 bytes-rw-r--r--doc/src/images/qactiongroup-align.pngbin0 -> 3550 bytes-rw-r--r--doc/src/images/qcalendarwidget-grid.pngbin0 -> 9601 bytes-rw-r--r--doc/src/images/qcalendarwidget-maximum.pngbin0 -> 9709 bytes-rw-r--r--doc/src/images/qcalendarwidget-minimum.pngbin0 -> 9770 bytes-rw-r--r--doc/src/images/qcalendarwidget.pngbin0 -> 1223 bytes-rw-r--r--doc/src/images/qcanvasellipse.pngbin0 -> 2251 bytes-rw-r--r--doc/src/images/qcdestyle.pngbin0 -> 25954 bytes-rw-r--r--doc/src/images/qcolor-cmyk.pngbin0 -> 18878 bytes-rw-r--r--doc/src/images/qcolor-hsv.pngbin0 -> 21046 bytes-rw-r--r--doc/src/images/qcolor-hue.pngbin0 -> 26820 bytes-rw-r--r--doc/src/images/qcolor-rgb.pngbin0 -> 17798 bytes-rw-r--r--doc/src/images/qcolor-saturation.pngbin0 -> 2150 bytes-rw-r--r--doc/src/images/qcolor-value.pngbin0 -> 1241 bytes-rw-r--r--doc/src/images/qcolumnview.pngbin0 -> 3075 bytes-rw-r--r--doc/src/images/qconicalgradient.pngbin0 -> 52823 bytes-rw-r--r--doc/src/images/qdatawidgetmapper-simple.pngbin0 -> 26994 bytes-rw-r--r--doc/src/images/qdesktopwidget.pngbin0 -> 42328 bytes-rw-r--r--doc/src/images/qdockwindow.pngbin0 -> 1177 bytes-rw-r--r--doc/src/images/qerrormessage.pngbin0 -> 7100 bytes-rw-r--r--doc/src/images/qfiledialog-expanded.pngbin0 -> 32017 bytes-rw-r--r--doc/src/images/qfiledialog-small.pngbin0 -> 12273 bytes-rw-r--r--doc/src/images/qformlayout-kde.pngbin0 -> 1703 bytes-rw-r--r--doc/src/images/qformlayout-mac.pngbin0 -> 1706 bytes-rw-r--r--doc/src/images/qformlayout-qpe.pngbin0 -> 1764 bytes-rw-r--r--doc/src/images/qformlayout-win.pngbin0 -> 1743 bytes-rw-r--r--doc/src/images/qformlayout-with-6-children.pngbin0 -> 3264 bytes-rw-r--r--doc/src/images/qgradient-conical.pngbin0 -> 3995 bytes-rw-r--r--doc/src/images/qgradient-linear.pngbin0 -> 714 bytes-rw-r--r--doc/src/images/qgradient-radial.pngbin0 -> 2352 bytes-rw-r--r--doc/src/images/qgraphicsproxywidget-embed.pngbin0 -> 2199 bytes-rw-r--r--doc/src/images/qgridlayout-with-5-children.pngbin0 -> 3201 bytes-rw-r--r--doc/src/images/qhbox-m.pngbin0 -> 303 bytes-rw-r--r--doc/src/images/qhboxlayout-with-5-children.pngbin0 -> 2652 bytes-rw-r--r--doc/src/images/qimage-32bit.pngbin0 -> 20018 bytes-rw-r--r--doc/src/images/qimage-32bit_scaled.pngbin0 -> 25098 bytes-rw-r--r--doc/src/images/qimage-8bit.pngbin0 -> 22490 bytes-rw-r--r--doc/src/images/qimage-8bit_scaled.pngbin0 -> 24761 bytes-rw-r--r--doc/src/images/qimage-scaling.pngbin0 -> 34785 bytes-rw-r--r--doc/src/images/qline-coordinates.pngbin0 -> 9459 bytes-rw-r--r--doc/src/images/qline-point.pngbin0 -> 8484 bytes-rw-r--r--doc/src/images/qlineargradient-pad.pngbin0 -> 2260 bytes-rw-r--r--doc/src/images/qlineargradient-reflect.pngbin0 -> 2746 bytes-rw-r--r--doc/src/images/qlineargradient-repeat.pngbin0 -> 2590 bytes-rw-r--r--doc/src/images/qlinef-angle-identicaldirection.pngbin0 -> 6004 bytes-rw-r--r--doc/src/images/qlinef-angle-oppositedirection.pngbin0 -> 5834 bytes-rw-r--r--doc/src/images/qlinef-bounded.pngbin0 -> 4183 bytes-rw-r--r--doc/src/images/qlinef-normalvector.pngbin0 -> 9432 bytes-rw-r--r--doc/src/images/qlinef-unbounded.pngbin0 -> 3992 bytes-rw-r--r--doc/src/images/qlistbox-m.pngbin0 -> 805 bytes-rw-r--r--doc/src/images/qlistbox-w.pngbin0 -> 810 bytes-rw-r--r--doc/src/images/qlistviewitems.pngbin0 -> 8523 bytes-rw-r--r--doc/src/images/qmacstyle.pngbin0 -> 56256 bytes-rw-r--r--doc/src/images/qmainwindow-qdockareas.pngbin0 -> 5351 bytes-rw-r--r--doc/src/images/qmatrix-combinedtransformation.pngbin0 -> 1707 bytes-rw-r--r--doc/src/images/qmatrix-representation.pngbin0 -> 10410 bytes-rw-r--r--doc/src/images/qmatrix-simpletransformation.pngbin0 -> 2047 bytes-rw-r--r--doc/src/images/qmdiarea-arrange.pngbin0 -> 45629 bytes-rw-r--r--doc/src/images/qmdisubwindowlayout.pngbin0 -> 3153 bytes-rw-r--r--doc/src/images/qmessagebox-crit.pngbin0 -> 237 bytes-rw-r--r--doc/src/images/qmessagebox-info.pngbin0 -> 242 bytes-rw-r--r--doc/src/images/qmessagebox-quest.pngbin0 -> 253 bytes-rw-r--r--doc/src/images/qmessagebox-warn.pngbin0 -> 219 bytes-rw-r--r--doc/src/images/qmotifstyle.pngbin0 -> 25573 bytes-rw-r--r--doc/src/images/qobjectxmlmodel-example.pngbin0 -> 111515 bytes-rw-r--r--doc/src/images/qpainter-affinetransformations.pngbin0 -> 66241 bytes-rw-r--r--doc/src/images/qpainter-angles.pngbin0 -> 7450 bytes-rw-r--r--doc/src/images/qpainter-arc.pngbin0 -> 635 bytes-rw-r--r--doc/src/images/qpainter-basicdrawing.pngbin0 -> 18164 bytes-rw-r--r--doc/src/images/qpainter-chord.pngbin0 -> 632 bytes-rw-r--r--doc/src/images/qpainter-clock.pngbin0 -> 3128 bytes-rw-r--r--doc/src/images/qpainter-compositiondemo.pngbin0 -> 61015 bytes-rw-r--r--doc/src/images/qpainter-compositionmode.pngbin0 -> 3858 bytes-rw-r--r--doc/src/images/qpainter-compositionmode1.pngbin0 -> 2418 bytes-rw-r--r--doc/src/images/qpainter-compositionmode2.pngbin0 -> 2131 bytes-rw-r--r--doc/src/images/qpainter-concentriccircles.pngbin0 -> 31294 bytes-rw-r--r--doc/src/images/qpainter-ellipse.pngbin0 -> 1022 bytes-rw-r--r--doc/src/images/qpainter-gradients.pngbin0 -> 24231 bytes-rw-r--r--doc/src/images/qpainter-line.pngbin0 -> 759 bytes-rw-r--r--doc/src/images/qpainter-painterpaths.pngbin0 -> 31985 bytes-rw-r--r--doc/src/images/qpainter-path.pngbin0 -> 963 bytes-rw-r--r--doc/src/images/qpainter-pathstroking.pngbin0 -> 30794 bytes-rw-r--r--doc/src/images/qpainter-pie.pngbin0 -> 1018 bytes-rw-r--r--doc/src/images/qpainter-polygon.pngbin0 -> 699 bytes-rw-r--r--doc/src/images/qpainter-rectangle.pngbin0 -> 194 bytes-rw-r--r--doc/src/images/qpainter-rotation.pngbin0 -> 3768 bytes-rw-r--r--doc/src/images/qpainter-roundrect.pngbin0 -> 433 bytes-rw-r--r--doc/src/images/qpainter-scale.pngbin0 -> 2828 bytes-rw-r--r--doc/src/images/qpainter-text.pngbin0 -> 791 bytes-rw-r--r--doc/src/images/qpainter-translation.pngbin0 -> 3909 bytes-rw-r--r--doc/src/images/qpainter-vectordeformation.pngbin0 -> 30591 bytes-rw-r--r--doc/src/images/qpainterpath-addellipse.pngbin0 -> 3509 bytes-rw-r--r--doc/src/images/qpainterpath-addpolygon.pngbin0 -> 7625 bytes-rw-r--r--doc/src/images/qpainterpath-addrectangle.pngbin0 -> 1839 bytes-rw-r--r--doc/src/images/qpainterpath-addtext.pngbin0 -> 7406 bytes-rw-r--r--doc/src/images/qpainterpath-arcto.pngbin0 -> 5063 bytes-rw-r--r--doc/src/images/qpainterpath-construction.pngbin0 -> 2523 bytes-rw-r--r--doc/src/images/qpainterpath-cubicto.pngbin0 -> 4749 bytes-rw-r--r--doc/src/images/qpainterpath-demo.pngbin0 -> 51334 bytes-rw-r--r--doc/src/images/qpainterpath-example.pngbin0 -> 38746 bytes-rw-r--r--doc/src/images/qpen-bevel.pngbin0 -> 11527 bytes-rw-r--r--doc/src/images/qpen-custom.pngbin0 -> 6254 bytes-rw-r--r--doc/src/images/qpen-dash.pngbin0 -> 8221 bytes-rw-r--r--doc/src/images/qpen-dashdot.pngbin0 -> 5961 bytes-rw-r--r--doc/src/images/qpen-dashdotdot.pngbin0 -> 5999 bytes-rw-r--r--doc/src/images/qpen-dashpattern.pngbin0 -> 1605 bytes-rw-r--r--doc/src/images/qpen-demo.pngbin0 -> 49784 bytes-rw-r--r--doc/src/images/qpen-dot.pngbin0 -> 5386 bytes-rw-r--r--doc/src/images/qpen-flat.pngbin0 -> 1885 bytes-rw-r--r--doc/src/images/qpen-miter.pngbin0 -> 11734 bytes-rw-r--r--doc/src/images/qpen-miterlimit.pngbin0 -> 24816 bytes-rw-r--r--doc/src/images/qpen-roundcap.pngbin0 -> 1920 bytes-rw-r--r--doc/src/images/qpen-roundjoin.pngbin0 -> 11878 bytes-rw-r--r--doc/src/images/qpen-solid.pngbin0 -> 7416 bytes-rw-r--r--doc/src/images/qpen-square.pngbin0 -> 2651 bytes-rw-r--r--doc/src/images/qplastiquestyle.pngbin0 -> 31420 bytes-rw-r--r--doc/src/images/qprintpreviewdialog.pngbin0 -> 44891 bytes-rw-r--r--doc/src/images/qprogbar-m.pngbin0 -> 193 bytes-rw-r--r--doc/src/images/qprogbar-w.pngbin0 -> 198 bytes-rw-r--r--doc/src/images/qprogdlg-m.pngbin0 -> 826 bytes-rw-r--r--doc/src/images/qprogdlg-w.pngbin0 -> 830 bytes-rw-r--r--doc/src/images/qradialgradient-pad.pngbin0 -> 11385 bytes-rw-r--r--doc/src/images/qradialgradient-reflect.pngbin0 -> 33668 bytes-rw-r--r--doc/src/images/qradialgradient-repeat.pngbin0 -> 40528 bytes-rw-r--r--doc/src/images/qrect-coordinates.pngbin0 -> 22218 bytes-rw-r--r--doc/src/images/qrect-diagram-one.pngbin0 -> 9616 bytes-rw-r--r--doc/src/images/qrect-diagram-three.pngbin0 -> 9458 bytes-rw-r--r--doc/src/images/qrect-diagram-two.pngbin0 -> 9378 bytes-rw-r--r--doc/src/images/qrect-diagram-zero.pngbin0 -> 5198 bytes-rw-r--r--doc/src/images/qrect-intersect.pngbin0 -> 8742 bytes-rw-r--r--doc/src/images/qrect-unite.pngbin0 -> 4626 bytes-rw-r--r--doc/src/images/qrectf-coordinates.pngbin0 -> 21749 bytes-rw-r--r--doc/src/images/qrectf-diagram-one.pngbin0 -> 9594 bytes-rw-r--r--doc/src/images/qrectf-diagram-three.pngbin0 -> 9392 bytes-rw-r--r--doc/src/images/qrectf-diagram-two.pngbin0 -> 9387 bytes-rw-r--r--doc/src/images/qscrollarea-noscrollbars.pngbin0 -> 54671 bytes-rw-r--r--doc/src/images/qscrollarea-onescrollbar.pngbin0 -> 77476 bytes-rw-r--r--doc/src/images/qscrollarea-twoscrollbars.pngbin0 -> 78046 bytes-rw-r--r--doc/src/images/qscrollbar-picture.pngbin0 -> 6568 bytes-rw-r--r--doc/src/images/qscrollbar-values.pngbin0 -> 15902 bytes-rw-r--r--doc/src/images/qscrollview-cl.pngbin0 -> 8579 bytes-rw-r--r--doc/src/images/qscrollview-vp.pngbin0 -> 6302 bytes-rw-r--r--doc/src/images/qscrollview-vp2.pngbin0 -> 7720 bytes-rw-r--r--doc/src/images/qsortfilterproxymodel-sorting.pngbin0 -> 11005 bytes-rw-r--r--doc/src/images/qspinbox-plusminus.pngbin0 -> 375 bytes-rw-r--r--doc/src/images/qspinbox-updown.pngbin0 -> 402 bytes-rw-r--r--doc/src/images/qstatustipevent-action.pngbin0 -> 10741 bytes-rw-r--r--doc/src/images/qstatustipevent-widget.pngbin0 -> 9417 bytes-rw-r--r--doc/src/images/qstyle-comboboxes.pngbin0 -> 19437 bytes-rw-r--r--doc/src/images/qstyleoptiontoolbar-position.pngbin0 -> 13707 bytes-rw-r--r--doc/src/images/qt-colors.pngbin0 -> 3711 bytes-rw-r--r--doc/src/images/qt-embedded-accelerateddriver.pngbin0 -> 22753 bytes-rw-r--r--doc/src/images/qt-embedded-architecture.pngbin0 -> 37198 bytes-rw-r--r--doc/src/images/qt-embedded-architecture2.pngbin0 -> 98633 bytes-rw-r--r--doc/src/images/qt-embedded-characterinputlayer.pngbin0 -> 46629 bytes-rw-r--r--doc/src/images/qt-embedded-clamshellphone-closed.pngbin0 -> 19313 bytes-rw-r--r--doc/src/images/qt-embedded-clamshellphone-pressed.pngbin0 -> 74449 bytes-rw-r--r--doc/src/images/qt-embedded-clamshellphone.pngbin0 -> 71951 bytes-rw-r--r--doc/src/images/qt-embedded-client.pngbin0 -> 16899 bytes-rw-r--r--doc/src/images/qt-embedded-clientrendering.pngbin0 -> 56074 bytes-rw-r--r--doc/src/images/qt-embedded-clientservercommunication.pngbin0 -> 45973 bytes-rw-r--r--doc/src/images/qt-embedded-drawingonscreen.pngbin0 -> 60716 bytes-rw-r--r--doc/src/images/qt-embedded-examples.pngbin0 -> 18243 bytes-rw-r--r--doc/src/images/qt-embedded-fontfeatures.pngbin0 -> 50773 bytes-rw-r--r--doc/src/images/qt-embedded-opengl1.pngbin0 -> 26209 bytes-rw-r--r--doc/src/images/qt-embedded-opengl2.pngbin0 -> 31047 bytes-rw-r--r--doc/src/images/qt-embedded-opengl3.pngbin0 -> 15287 bytes-rw-r--r--doc/src/images/qt-embedded-pda.pngbin0 -> 67286 bytes-rw-r--r--doc/src/images/qt-embedded-phone.pngbin0 -> 60687 bytes-rw-r--r--doc/src/images/qt-embedded-pointerhandlinglayer.pngbin0 -> 43394 bytes-rw-r--r--doc/src/images/qt-embedded-qconfigtool.pngbin0 -> 108429 bytes-rw-r--r--doc/src/images/qt-embedded-qvfbfilemenu.pngbin0 -> 24405 bytes-rw-r--r--doc/src/images/qt-embedded-qvfbviewmenu.pngbin0 -> 28380 bytes-rw-r--r--doc/src/images/qt-embedded-reserveregion.pngbin0 -> 71553 bytes-rw-r--r--doc/src/images/qt-embedded-runningapplication.pngbin0 -> 43384 bytes-rw-r--r--doc/src/images/qt-embedded-setwindowattribute.pngbin0 -> 52808 bytes-rw-r--r--doc/src/images/qt-embedded-virtualframebuffer.pngbin0 -> 102022 bytes-rw-r--r--doc/src/images/qt-embedded-vnc-screen.pngbin0 -> 51386 bytes-rw-r--r--doc/src/images/qt-fillrule-oddeven.pngbin0 -> 7057 bytes-rw-r--r--doc/src/images/qt-fillrule-winding.pngbin0 -> 7205 bytes-rw-r--r--doc/src/images/qt-for-wince-landscape.pngbin0 -> 115052 bytes-rw-r--r--doc/src/images/qt-logo.pngbin0 -> 5149 bytes-rw-r--r--doc/src/images/qt.pngbin0 -> 514 bytes-rw-r--r--doc/src/images/qtableitems.pngbin0 -> 2958 bytes-rw-r--r--doc/src/images/qtabletevent-tilt.pngbin0 -> 8312 bytes-rw-r--r--doc/src/images/qtableview-resized.pngbin0 -> 42232 bytes-rw-r--r--doc/src/images/qtconcurrent-progressdialog.pngbin0 -> 4608 bytes-rw-r--r--doc/src/images/qtconfig-appearance.pngbin0 -> 135939 bytes-rw-r--r--doc/src/images/qtdemo-small.pngbin0 -> 23755 bytes-rw-r--r--doc/src/images/qtdemo.pngbin0 -> 243710 bytes-rw-r--r--doc/src/images/qtdesignerextensions.pngbin0 -> 52694 bytes-rw-r--r--doc/src/images/qtdesignerscreenshot.pngbin0 -> 144869 bytes-rw-r--r--doc/src/images/qtextblock-fragments.pngbin0 -> 7910 bytes-rw-r--r--doc/src/images/qtextblock-sequence.pngbin0 -> 17445 bytes-rw-r--r--doc/src/images/qtextdocument-frames.pngbin0 -> 56766 bytes-rw-r--r--doc/src/images/qtextfragment-split.pngbin0 -> 18109 bytes-rw-r--r--doc/src/images/qtextframe-style.pngbin0 -> 29420 bytes-rw-r--r--doc/src/images/qtexttable-cells.pngbin0 -> 9080 bytes-rw-r--r--doc/src/images/qtexttableformat-cell.pngbin0 -> 24454 bytes-rw-r--r--doc/src/images/qtransform-combinedtransformation.pngbin0 -> 935 bytes-rw-r--r--doc/src/images/qtransform-combinedtransformation2.pngbin0 -> 930 bytes-rw-r--r--doc/src/images/qtransform-representation.pngbin0 -> 17892 bytes-rw-r--r--doc/src/images/qtransform-simpletransformation.pngbin0 -> 1201 bytes-rw-r--r--doc/src/images/qtscript-calculator-example.pngbin0 -> 8807 bytes-rw-r--r--doc/src/images/qtscript-calculator.pngbin0 -> 13259 bytes-rw-r--r--doc/src/images/qtscript-context2d.pngbin0 -> 21838 bytes-rw-r--r--doc/src/images/qtscript-debugger-small.pngbin0 -> 61249 bytes-rw-r--r--doc/src/images/qtscript-debugger.pngbin0 -> 127509 bytes-rw-r--r--doc/src/images/qtscript-examples.pngbin0 -> 6213 bytes-rw-r--r--doc/src/images/qtscripttools-examples.pngbin0 -> 3457 bytes-rw-r--r--doc/src/images/qtwizard-aero1.pngbin0 -> 11749 bytes-rw-r--r--doc/src/images/qtwizard-aero2.pngbin0 -> 16560 bytes-rw-r--r--doc/src/images/qtwizard-classic1.pngbin0 -> 39640 bytes-rw-r--r--doc/src/images/qtwizard-classic2.pngbin0 -> 8616 bytes-rw-r--r--doc/src/images/qtwizard-mac1.pngbin0 -> 25478 bytes-rw-r--r--doc/src/images/qtwizard-mac2.pngbin0 -> 29591 bytes-rw-r--r--doc/src/images/qtwizard-macpage.pngbin0 -> 23095 bytes-rw-r--r--doc/src/images/qtwizard-modern1.pngbin0 -> 45093 bytes-rw-r--r--doc/src/images/qtwizard-modern2.pngbin0 -> 15081 bytes-rw-r--r--doc/src/images/qtwizard-nonmacpage.pngbin0 -> 26557 bytes-rw-r--r--doc/src/images/querymodel-example.pngbin0 -> 30882 bytes-rw-r--r--doc/src/images/queuedcustomtype-example.pngbin0 -> 44851 bytes-rw-r--r--doc/src/images/qundoview.pngbin0 -> 5993 bytes-rw-r--r--doc/src/images/qurl-authority.pngbin0 -> 5099 bytes-rw-r--r--doc/src/images/qurl-authority2.pngbin0 -> 2350 bytes-rw-r--r--doc/src/images/qurl-authority3.pngbin0 -> 3552 bytes-rw-r--r--doc/src/images/qurl-fragment.pngbin0 -> 2333 bytes-rw-r--r--doc/src/images/qurl-ftppath.pngbin0 -> 1974 bytes-rw-r--r--doc/src/images/qurl-mailtopath.pngbin0 -> 1679 bytes-rw-r--r--doc/src/images/qurl-querystring.pngbin0 -> 2955 bytes-rw-r--r--doc/src/images/qvbox-m.pngbin0 -> 274 bytes-rw-r--r--doc/src/images/qvboxlayout-with-5-children.pngbin0 -> 2974 bytes-rw-r--r--doc/src/images/qwebview-diagram.pngbin0 -> 9036 bytes-rw-r--r--doc/src/images/qwebview-url.pngbin0 -> 191610 bytes-rw-r--r--doc/src/images/qwindowsstyle.pngbin0 -> 26349 bytes-rw-r--r--doc/src/images/qwindowsxpstyle.pngbin0 -> 20847 bytes-rw-r--r--doc/src/images/qwsserver_keyboardfilter.pngbin0 -> 15553 bytes-rw-r--r--doc/src/images/radialGradient.pngbin0 -> 5692 bytes-rw-r--r--doc/src/images/recentfiles-example.pngbin0 -> 5400 bytes-rw-r--r--doc/src/images/recipes-example.pngbin0 -> 44457 bytes-rw-r--r--doc/src/images/regexp-example.pngbin0 -> 16250 bytes-rw-r--r--doc/src/images/relationaltable.pngbin0 -> 4274 bytes-rw-r--r--doc/src/images/relationaltablemodel-example.pngbin0 -> 10188 bytes-rw-r--r--doc/src/images/remotecontrolledcar-car-example.pngbin0 -> 8833 bytes-rw-r--r--doc/src/images/remotecontrolledcar-controller-example.pngbin0 -> 6535 bytes-rw-r--r--doc/src/images/resources.pngbin0 -> 49998 bytes-rw-r--r--doc/src/images/richtext-document.pngbin0 -> 8126 bytes-rw-r--r--doc/src/images/richtext-examples.pngbin0 -> 6173 bytes-rw-r--r--doc/src/images/rintersect.pngbin0 -> 221 bytes-rw-r--r--doc/src/images/rsslistingexample.pngbin0 -> 35923 bytes-rw-r--r--doc/src/images/rsubtract.pngbin0 -> 224 bytes-rw-r--r--doc/src/images/runion.pngbin0 -> 221 bytes-rw-r--r--doc/src/images/rxor.pngbin0 -> 222 bytes-rw-r--r--doc/src/images/samplebuffers-example.pngbin0 -> 16292 bytes-rw-r--r--doc/src/images/saxbookmarks-example.pngbin0 -> 26219 bytes-rw-r--r--doc/src/images/screenshot-example.pngbin0 -> 24606 bytes-rw-r--r--doc/src/images/scribble-example.pngbin0 -> 9053 bytes-rw-r--r--doc/src/images/sdi-example.pngbin0 -> 28749 bytes-rw-r--r--doc/src/images/securesocketclient.pngbin0 -> 12056 bytes-rw-r--r--doc/src/images/securesocketclient2.pngbin0 -> 15532 bytes-rw-r--r--doc/src/images/selected-items1.pngbin0 -> 31870 bytes-rw-r--r--doc/src/images/selected-items2.pngbin0 -> 32025 bytes-rw-r--r--doc/src/images/selected-items3.pngbin0 -> 32100 bytes-rw-r--r--doc/src/images/selection-extended.pngbin0 -> 11401 bytes-rw-r--r--doc/src/images/selection-multi.pngbin0 -> 13058 bytes-rw-r--r--doc/src/images/selection-single.pngbin0 -> 7849 bytes-rw-r--r--doc/src/images/session.pngbin0 -> 6265 bytes-rw-r--r--doc/src/images/settingseditor-example.pngbin0 -> 19473 bytes-rw-r--r--doc/src/images/shapedclock-dragging.pngbin0 -> 18913 bytes-rw-r--r--doc/src/images/shapedclock-example.pngbin0 -> 15701 bytes-rw-r--r--doc/src/images/shareddirmodel.pngbin0 -> 33024 bytes-rw-r--r--doc/src/images/sharedmemory-example_1.pngbin0 -> 14926 bytes-rw-r--r--doc/src/images/sharedmemory-example_2.pngbin0 -> 21976 bytes-rw-r--r--doc/src/images/sharedmodel-tableviews.pngbin0 -> 16811 bytes-rw-r--r--doc/src/images/sharedselection-tableviews.pngbin0 -> 14212 bytes-rw-r--r--doc/src/images/signals-n-slots-aw-nat.pngbin0 -> 9393 bytes-rw-r--r--doc/src/images/simpledommodel-example.pngbin0 -> 18442 bytes-rw-r--r--doc/src/images/simpletextviewer-example.pngbin0 -> 63132 bytes-rw-r--r--doc/src/images/simpletextviewer-findfiledialog.pngbin0 -> 12421 bytes-rw-r--r--doc/src/images/simpletextviewer-mainwindow.pngbin0 -> 14167 bytes-rw-r--r--doc/src/images/simpletreemodel-example.pngbin0 -> 21791 bytes-rw-r--r--doc/src/images/simplewidgetmapper-example.pngbin0 -> 9848 bytes-rw-r--r--doc/src/images/simplewizard-page1.pngbin0 -> 12994 bytes-rw-r--r--doc/src/images/simplewizard-page2.pngbin0 -> 12041 bytes-rw-r--r--doc/src/images/simplewizard-page3.pngbin0 -> 10619 bytes-rw-r--r--doc/src/images/simplewizard.pngbin0 -> 7053 bytes-rw-r--r--doc/src/images/sipdialog-closed.pngbin0 -> 9275 bytes-rw-r--r--doc/src/images/sipdialog-opened.pngbin0 -> 11220 bytes-rw-r--r--doc/src/images/sliders-example.pngbin0 -> 9317 bytes-rw-r--r--doc/src/images/smooth.pngbin0 -> 371 bytes-rw-r--r--doc/src/images/sortingmodel-example.pngbin0 -> 41115 bytes-rw-r--r--doc/src/images/spinboxdelegate-example.pngbin0 -> 4762 bytes-rw-r--r--doc/src/images/spinboxes-example.pngbin0 -> 24842 bytes-rw-r--r--doc/src/images/spreadsheet-demo.pngbin0 -> 40187 bytes-rw-r--r--doc/src/images/sql-examples.pngbin0 -> 17669 bytes-rw-r--r--doc/src/images/sql-widget-mapper.pngbin0 -> 13040 bytes-rw-r--r--doc/src/images/sqlbrowser-demo.pngbin0 -> 20671 bytes-rw-r--r--doc/src/images/standard-views.pngbin0 -> 78278 bytes-rw-r--r--doc/src/images/standarddialogs-example.pngbin0 -> 18852 bytes-rw-r--r--doc/src/images/stardelegate.pngbin0 -> 12230 bytes-rw-r--r--doc/src/images/stliterators1.pngbin0 -> 1671 bytes-rw-r--r--doc/src/images/stringlistmodel.pngbin0 -> 4849 bytes-rw-r--r--doc/src/images/stylepluginexample.pngbin0 -> 5259 bytes-rw-r--r--doc/src/images/styles-3d.pngbin0 -> 10753 bytes-rw-r--r--doc/src/images/styles-aliasing.pngbin0 -> 10078 bytes-rw-r--r--doc/src/images/styles-disabledwood.pngbin0 -> 134596 bytes-rw-r--r--doc/src/images/styles-enabledwood.pngbin0 -> 130767 bytes-rw-r--r--doc/src/images/styles-woodbuttons.pngbin0 -> 25032 bytes-rw-r--r--doc/src/images/stylesheet-border-image-normal.pngbin0 -> 5769 bytes-rw-r--r--doc/src/images/stylesheet-border-image-stretched.pngbin0 -> 12170 bytes-rw-r--r--doc/src/images/stylesheet-border-image-wrong.pngbin0 -> 12887 bytes-rw-r--r--doc/src/images/stylesheet-boxmodel.pngbin0 -> 18144 bytes-rw-r--r--doc/src/images/stylesheet-branch-closed.pngbin0 -> 334 bytes-rw-r--r--doc/src/images/stylesheet-branch-end.pngbin0 -> 182 bytes-rw-r--r--doc/src/images/stylesheet-branch-more.pngbin0 -> 136 bytes-rw-r--r--doc/src/images/stylesheet-branch-open.pngbin0 -> 346 bytes-rw-r--r--doc/src/images/stylesheet-coffee-cleanlooks.pngbin0 -> 14820 bytes-rw-r--r--doc/src/images/stylesheet-coffee-plastique.pngbin0 -> 18179 bytes-rw-r--r--doc/src/images/stylesheet-coffee-xp.pngbin0 -> 14200 bytes-rw-r--r--doc/src/images/stylesheet-designer-options.pngbin0 -> 8421 bytes-rw-r--r--doc/src/images/stylesheet-pagefold-mac.pngbin0 -> 20618 bytes-rw-r--r--doc/src/images/stylesheet-pagefold.pngbin0 -> 15989 bytes-rw-r--r--doc/src/images/stylesheet-redbutton1.pngbin0 -> 378 bytes-rw-r--r--doc/src/images/stylesheet-redbutton2.pngbin0 -> 410 bytes-rw-r--r--doc/src/images/stylesheet-redbutton3.pngbin0 -> 664 bytes-rw-r--r--doc/src/images/stylesheet-scrollbar1.pngbin0 -> 150 bytes-rw-r--r--doc/src/images/stylesheet-scrollbar2.pngbin0 -> 169 bytes-rw-r--r--doc/src/images/stylesheet-treeview.pngbin0 -> 2412 bytes-rw-r--r--doc/src/images/stylesheet-vline.pngbin0 -> 124 bytes-rw-r--r--doc/src/images/svg-image.pngbin0 -> 42578 bytes-rw-r--r--doc/src/images/svgviewer-example.pngbin0 -> 48184 bytes-rw-r--r--doc/src/images/syntaxhighlighter-example.pngbin0 -> 12398 bytes-rw-r--r--doc/src/images/system-tray.pngbin0 -> 6326 bytes-rw-r--r--doc/src/images/systemtray-editor.pngbin0 -> 18147 bytes-rw-r--r--doc/src/images/systemtray-example.pngbin0 -> 47588 bytes-rw-r--r--doc/src/images/t1.pngbin0 -> 1002 bytes-rw-r--r--doc/src/images/t10.pngbin0 -> 3006 bytes-rw-r--r--doc/src/images/t11.pngbin0 -> 3530 bytes-rw-r--r--doc/src/images/t12.pngbin0 -> 3928 bytes-rw-r--r--doc/src/images/t13.pngbin0 -> 5452 bytes-rw-r--r--doc/src/images/t14.pngbin0 -> 5490 bytes-rw-r--r--doc/src/images/t2.pngbin0 -> 1328 bytes-rw-r--r--doc/src/images/t3.pngbin0 -> 1908 bytes-rw-r--r--doc/src/images/t4.pngbin0 -> 1751 bytes-rw-r--r--doc/src/images/t5.pngbin0 -> 1977 bytes-rw-r--r--doc/src/images/t6.pngbin0 -> 2634 bytes-rw-r--r--doc/src/images/t7.pngbin0 -> 2676 bytes-rw-r--r--doc/src/images/t8.pngbin0 -> 3435 bytes-rw-r--r--doc/src/images/t9.pngbin0 -> 2983 bytes-rw-r--r--doc/src/images/t9_1.pngbin0 -> 141 bytes-rw-r--r--doc/src/images/t9_2.pngbin0 -> 162 bytes-rw-r--r--doc/src/images/tabWidget-stylesheet1.pngbin0 -> 1321 bytes-rw-r--r--doc/src/images/tabWidget-stylesheet2.pngbin0 -> 1434 bytes-rw-r--r--doc/src/images/tabWidget-stylesheet3.pngbin0 -> 1206 bytes-rw-r--r--doc/src/images/tabdialog-example.pngbin0 -> 11885 bytes-rw-r--r--doc/src/images/tableWidget-stylesheet.pngbin0 -> 3478 bytes-rw-r--r--doc/src/images/tablemodel-example.pngbin0 -> 20904 bytes-rw-r--r--doc/src/images/tabletexample.pngbin0 -> 9900 bytes-rw-r--r--doc/src/images/taskmenuextension-dialog.pngbin0 -> 15163 bytes-rw-r--r--doc/src/images/taskmenuextension-example-faded.pngbin0 -> 5596 bytes-rw-r--r--doc/src/images/taskmenuextension-example.pngbin0 -> 5014 bytes-rw-r--r--doc/src/images/taskmenuextension-menu.pngbin0 -> 3067 bytes-rw-r--r--doc/src/images/tcpstream.pngbin0 -> 11470 bytes-rw-r--r--doc/src/images/tetrix-example.pngbin0 -> 9980 bytes-rw-r--r--doc/src/images/textedit-demo.pngbin0 -> 46980 bytes-rw-r--r--doc/src/images/textfinder-example-find.pngbin0 -> 15837 bytes-rw-r--r--doc/src/images/textfinder-example-find2.pngbin0 -> 15745 bytes-rw-r--r--doc/src/images/textfinder-example-userinterface.pngbin0 -> 7900 bytes-rw-r--r--doc/src/images/textfinder-example.pngbin0 -> 15424 bytes-rw-r--r--doc/src/images/textobject-example.pngbin0 -> 16591 bytes-rw-r--r--doc/src/images/texttable-merge.pngbin0 -> 746 bytes-rw-r--r--doc/src/images/texttable-split.pngbin0 -> 753 bytes-rw-r--r--doc/src/images/textures-example.pngbin0 -> 46640 bytes-rw-r--r--doc/src/images/thread-examples.pngbin0 -> 30113 bytes-rw-r--r--doc/src/images/threadedfortuneserver-example.pngbin0 -> 8528 bytes-rw-r--r--doc/src/images/threadsandobjects.pngbin0 -> 66096 bytes-rw-r--r--doc/src/images/tool-examples.pngbin0 -> 5958 bytes-rw-r--r--doc/src/images/tooltips-example.pngbin0 -> 12479 bytes-rw-r--r--doc/src/images/torrent-example.pngbin0 -> 18915 bytes-rw-r--r--doc/src/images/trafficinfo-example.pngbin0 -> 28082 bytes-rw-r--r--doc/src/images/transformations-example.pngbin0 -> 15993 bytes-rw-r--r--doc/src/images/treemodel-structure.pngbin0 -> 8362 bytes-rw-r--r--doc/src/images/treemodelcompleter-example.pngbin0 -> 25235 bytes-rw-r--r--doc/src/images/trivialwizard-example-conclusion.pngbin0 -> 9859 bytes-rw-r--r--doc/src/images/trivialwizard-example-flow.pngbin0 -> 12730 bytes-rw-r--r--doc/src/images/trivialwizard-example-introduction.pngbin0 -> 9994 bytes-rw-r--r--doc/src/images/trivialwizard-example-registration.pngbin0 -> 10644 bytes-rw-r--r--doc/src/images/trolltech-logo.pngbin0 -> 1512 bytes-rw-r--r--doc/src/images/tutorial8-layout.pngbin0 -> 6703 bytes-rw-r--r--doc/src/images/tutorial8-reallayout.pngbin0 -> 1254 bytes-rw-r--r--doc/src/images/udppackets.pngbin0 -> 24707 bytes-rw-r--r--doc/src/images/uitools-examples.pngbin0 -> 12021 bytes-rw-r--r--doc/src/images/undodemo.pngbin0 -> 84941 bytes-rw-r--r--doc/src/images/undoframeworkexample.pngbin0 -> 18026 bytes-rw-r--r--doc/src/images/unsmooth.pngbin0 -> 272 bytes-rw-r--r--doc/src/images/wVista-Cert-border-small.pngbin0 -> 12371 bytes-rw-r--r--doc/src/images/webkit-examples.pngbin0 -> 26874 bytes-rw-r--r--doc/src/images/webkit-netscape-plugin.pngbin0 -> 176059 bytes-rw-r--r--doc/src/images/whatsthis.pngbin0 -> 2983 bytes-rw-r--r--doc/src/images/widget-examples.pngbin0 -> 6128 bytes-rw-r--r--doc/src/images/widgetdelegate.pngbin0 -> 7449 bytes-rw-r--r--doc/src/images/widgetmapper-combo-mapping.pngbin0 -> 63045 bytes-rw-r--r--doc/src/images/widgetmapper-simple-mapping.pngbin0 -> 55498 bytes-rw-r--r--doc/src/images/widgetmapper-sql-mapping-table.pngbin0 -> 39681 bytes-rw-r--r--doc/src/images/widgetmapper-sql-mapping.pngbin0 -> 60265 bytes-rw-r--r--doc/src/images/widgets-examples.pngbin0 -> 6128 bytes-rw-r--r--doc/src/images/widgets-tutorial-childwidget.pngbin0 -> 8547 bytes-rw-r--r--doc/src/images/widgets-tutorial-nestedlayouts.pngbin0 -> 23287 bytes-rw-r--r--doc/src/images/widgets-tutorial-toplevel.pngbin0 -> 6087 bytes-rw-r--r--doc/src/images/widgets-tutorial-windowlayout.pngbin0 -> 5849 bytes-rw-r--r--doc/src/images/wiggly-example.pngbin0 -> 6546 bytes-rw-r--r--doc/src/images/windowflags-example.pngbin0 -> 22945 bytes-rw-r--r--doc/src/images/windowflags_controllerwindow.pngbin0 -> 20898 bytes-rw-r--r--doc/src/images/windowflags_previewwindow.pngbin0 -> 4716 bytes-rw-r--r--doc/src/images/windows-calendarwidget.pngbin0 -> 5055 bytes-rw-r--r--doc/src/images/windows-checkbox.pngbin0 -> 929 bytes-rw-r--r--doc/src/images/windows-combobox.pngbin0 -> 1002 bytes-rw-r--r--doc/src/images/windows-dateedit.pngbin0 -> 817 bytes-rw-r--r--doc/src/images/windows-datetimeedit.pngbin0 -> 1026 bytes-rw-r--r--doc/src/images/windows-dial.pngbin0 -> 4598 bytes-rw-r--r--doc/src/images/windows-doublespinbox.pngbin0 -> 762 bytes-rw-r--r--doc/src/images/windows-fontcombobox.pngbin0 -> 1022 bytes-rw-r--r--doc/src/images/windows-frame.pngbin0 -> 1837 bytes-rw-r--r--doc/src/images/windows-groupbox.pngbin0 -> 1617 bytes-rw-r--r--doc/src/images/windows-horizontalscrollbar.pngbin0 -> 566 bytes-rw-r--r--doc/src/images/windows-label.pngbin0 -> 696 bytes-rw-r--r--doc/src/images/windows-lcdnumber.pngbin0 -> 491 bytes-rw-r--r--doc/src/images/windows-lineedit.pngbin0 -> 884 bytes-rw-r--r--doc/src/images/windows-listview.pngbin0 -> 2781 bytes-rw-r--r--doc/src/images/windows-progressbar.pngbin0 -> 674 bytes-rw-r--r--doc/src/images/windows-pushbutton.pngbin0 -> 722 bytes-rw-r--r--doc/src/images/windows-radiobutton.pngbin0 -> 1005 bytes-rw-r--r--doc/src/images/windows-slider.pngbin0 -> 485 bytes-rw-r--r--doc/src/images/windows-spinbox.pngbin0 -> 667 bytes-rw-r--r--doc/src/images/windows-tableview.pngbin0 -> 1738 bytes-rw-r--r--doc/src/images/windows-tabwidget.pngbin0 -> 1707 bytes-rw-r--r--doc/src/images/windows-textedit.pngbin0 -> 3192 bytes-rw-r--r--doc/src/images/windows-timeedit.pngbin0 -> 873 bytes-rw-r--r--doc/src/images/windows-toolbox.pngbin0 -> 925 bytes-rw-r--r--doc/src/images/windows-toolbutton.pngbin0 -> 771 bytes-rw-r--r--doc/src/images/windows-treeview.pngbin0 -> 2723 bytes-rw-r--r--doc/src/images/windowsvista-calendarwidget.pngbin0 -> 5144 bytes-rw-r--r--doc/src/images/windowsvista-checkbox.pngbin0 -> 1115 bytes-rw-r--r--doc/src/images/windowsvista-combobox.pngbin0 -> 1457 bytes-rw-r--r--doc/src/images/windowsvista-dateedit.pngbin0 -> 855 bytes-rw-r--r--doc/src/images/windowsvista-datetimeedit.pngbin0 -> 1034 bytes-rw-r--r--doc/src/images/windowsvista-dial.pngbin0 -> 2431 bytes-rw-r--r--doc/src/images/windowsvista-doublespinbox.pngbin0 -> 852 bytes-rw-r--r--doc/src/images/windowsvista-fontcombobox.pngbin0 -> 919 bytes-rw-r--r--doc/src/images/windowsvista-frame.pngbin0 -> 1800 bytes-rw-r--r--doc/src/images/windowsvista-groupbox.pngbin0 -> 1991 bytes-rw-r--r--doc/src/images/windowsvista-horizontalscrollbar.pngbin0 -> 1049 bytes-rw-r--r--doc/src/images/windowsvista-label.pngbin0 -> 599 bytes-rw-r--r--doc/src/images/windowsvista-lcdnumber.pngbin0 -> 491 bytes-rw-r--r--doc/src/images/windowsvista-lineedit.pngbin0 -> 873 bytes-rw-r--r--doc/src/images/windowsvista-listview.pngbin0 -> 6872 bytes-rw-r--r--doc/src/images/windowsvista-progressbar.pngbin0 -> 1437 bytes-rw-r--r--doc/src/images/windowsvista-pushbutton.pngbin0 -> 1085 bytes-rw-r--r--doc/src/images/windowsvista-radiobutton.pngbin0 -> 1266 bytes-rw-r--r--doc/src/images/windowsvista-slider.pngbin0 -> 624 bytes-rw-r--r--doc/src/images/windowsvista-spinbox.pngbin0 -> 767 bytes-rw-r--r--doc/src/images/windowsvista-tableview.pngbin0 -> 3941 bytes-rw-r--r--doc/src/images/windowsvista-tabwidget.pngbin0 -> 3286 bytes-rw-r--r--doc/src/images/windowsvista-textedit.pngbin0 -> 3122 bytes-rw-r--r--doc/src/images/windowsvista-timeedit.pngbin0 -> 764 bytes-rw-r--r--doc/src/images/windowsvista-toolbox.pngbin0 -> 891 bytes-rw-r--r--doc/src/images/windowsvista-toolbutton.pngbin0 -> 981 bytes-rw-r--r--doc/src/images/windowsvista-treeview.pngbin0 -> 5760 bytes-rw-r--r--doc/src/images/windowsxp-calendarwidget.pngbin0 -> 5009 bytes-rw-r--r--doc/src/images/windowsxp-checkbox.pngbin0 -> 1006 bytes-rw-r--r--doc/src/images/windowsxp-combobox.pngbin0 -> 1450 bytes-rw-r--r--doc/src/images/windowsxp-dateedit.pngbin0 -> 1107 bytes-rw-r--r--doc/src/images/windowsxp-datetimeedit.pngbin0 -> 1321 bytes-rw-r--r--doc/src/images/windowsxp-dial.pngbin0 -> 4598 bytes-rw-r--r--doc/src/images/windowsxp-doublespinbox.pngbin0 -> 1065 bytes-rw-r--r--doc/src/images/windowsxp-fontcombobox.pngbin0 -> 1408 bytes-rw-r--r--doc/src/images/windowsxp-frame.pngbin0 -> 1837 bytes-rw-r--r--doc/src/images/windowsxp-groupbox.pngbin0 -> 2016 bytes-rw-r--r--doc/src/images/windowsxp-horizontalscrollbar.pngbin0 -> 1498 bytes-rw-r--r--doc/src/images/windowsxp-label.pngbin0 -> 696 bytes-rw-r--r--doc/src/images/windowsxp-lcdnumber.pngbin0 -> 493 bytes-rw-r--r--doc/src/images/windowsxp-lineedit.pngbin0 -> 861 bytes-rw-r--r--doc/src/images/windowsxp-listview.pngbin0 -> 5391 bytes-rw-r--r--doc/src/images/windowsxp-menu.pngbin0 -> 1442 bytes-rw-r--r--doc/src/images/windowsxp-progressbar.pngbin0 -> 1007 bytes-rw-r--r--doc/src/images/windowsxp-pushbutton.pngbin0 -> 1462 bytes-rw-r--r--doc/src/images/windowsxp-radiobutton.pngbin0 -> 1270 bytes-rw-r--r--doc/src/images/windowsxp-slider.pngbin0 -> 732 bytes-rw-r--r--doc/src/images/windowsxp-spinbox.pngbin0 -> 974 bytes-rw-r--r--doc/src/images/windowsxp-tableview.pngbin0 -> 3204 bytes-rw-r--r--doc/src/images/windowsxp-tabwidget.pngbin0 -> 5220 bytes-rw-r--r--doc/src/images/windowsxp-textedit.pngbin0 -> 3159 bytes-rw-r--r--doc/src/images/windowsxp-timeedit.pngbin0 -> 1172 bytes-rw-r--r--doc/src/images/windowsxp-toolbox.pngbin0 -> 925 bytes-rw-r--r--doc/src/images/windowsxp-toolbutton.pngbin0 -> 1549 bytes-rw-r--r--doc/src/images/windowsxp-treeview.pngbin0 -> 5795 bytes-rw-r--r--doc/src/images/worldtimeclock-connection.pngbin0 -> 12119 bytes-rw-r--r--doc/src/images/worldtimeclock-signalandslot.pngbin0 -> 9907 bytes-rw-r--r--doc/src/images/worldtimeclockbuilder-example.pngbin0 -> 8168 bytes-rw-r--r--doc/src/images/worldtimeclockplugin-example.pngbin0 -> 13232 bytes-rw-r--r--doc/src/images/x11_dependencies.pngbin0 -> 93480 bytes-rw-r--r--doc/src/images/xform.pngbin0 -> 50488 bytes-rw-r--r--doc/src/images/xml-examples.pngbin0 -> 8947 bytes-rw-r--r--doc/src/images/xmlstreamexample-filemenu.pngbin0 -> 9380 bytes-rw-r--r--doc/src/images/xmlstreamexample-helpmenu.pngbin0 -> 10856 bytes-rw-r--r--doc/src/images/xmlstreamexample-screenshot.pngbin0 -> 22323 bytes-rw-r--r--doc/src/index.qdoc244
-rw-r--r--doc/src/installation.qdoc759
-rw-r--r--doc/src/introtodbus.qdoc212
-rw-r--r--doc/src/ipc.qdoc91
-rw-r--r--doc/src/known-issues.qdoc151
-rw-r--r--doc/src/layout.qdoc381
-rw-r--r--doc/src/licenses.qdoc465
-rw-r--r--doc/src/linguist-manual.qdoc1513
-rw-r--r--doc/src/mac-differences.qdoc339
-rw-r--r--doc/src/mainclasses.qdoc51
-rw-r--r--doc/src/metaobjects.qdoc149
-rw-r--r--doc/src/moc.qdoc336
-rw-r--r--doc/src/model-view-programming.qdoc2447
-rw-r--r--doc/src/modules.qdoc105
-rw-r--r--doc/src/object.qdoc132
-rw-r--r--doc/src/objecttrees.qdoc117
-rw-r--r--doc/src/opensourceedition.qdoc91
-rw-r--r--doc/src/overviews.qdoc48
-rw-r--r--doc/src/paintsystem.qdoc485
-rw-r--r--doc/src/phonon-api.qdoc4993
-rw-r--r--doc/src/phonon.qdoc642
-rw-r--r--doc/src/platform-notes.qdoc740
-rw-r--r--doc/src/plugins-howto.qdoc471
-rw-r--r--doc/src/porting-qsa.qdoc475
-rw-r--r--doc/src/porting4-canvas.qdoc703
-rw-r--r--doc/src/porting4-designer.qdoc349
-rw-r--r--doc/src/porting4-modifiedvirtual.qdocinc63
-rw-r--r--doc/src/porting4-obsoletedmechanism.qdocinc3
-rw-r--r--doc/src/porting4-overview.qdoc367
-rw-r--r--doc/src/porting4-removedenumvalues.qdocinc6
-rw-r--r--doc/src/porting4-removedtypes.qdocinc1
-rw-r--r--doc/src/porting4-removedvariantfunctions.qdocinc16
-rw-r--r--doc/src/porting4-removedvirtual.qdocinc605
-rw-r--r--doc/src/porting4-renamedclasses.qdocinc3
-rw-r--r--doc/src/porting4-renamedenumvalues.qdocinc234
-rw-r--r--doc/src/porting4-renamedfunctions.qdocinc6
-rw-r--r--doc/src/porting4-renamedstatic.qdocinc3
-rw-r--r--doc/src/porting4-renamedtypes.qdocinc26
-rw-r--r--doc/src/porting4.qdoc4215
-rw-r--r--doc/src/printing.qdoc175
-rw-r--r--doc/src/properties.qdoc263
-rw-r--r--doc/src/q3asciicache.qdoc465
-rw-r--r--doc/src/q3asciidict.qdoc416
-rw-r--r--doc/src/q3cache.qdoc461
-rw-r--r--doc/src/q3dict.qdoc446
-rw-r--r--doc/src/q3intcache.qdoc446
-rw-r--r--doc/src/q3intdict.qdoc390
-rw-r--r--doc/src/q3memarray.qdoc523
-rw-r--r--doc/src/q3popupmenu.qdoc76
-rw-r--r--doc/src/q3ptrdict.qdoc388
-rw-r--r--doc/src/q3ptrlist.qdoc1157
-rw-r--r--doc/src/q3ptrqueue.qdoc230
-rw-r--r--doc/src/q3ptrstack.qdoc217
-rw-r--r--doc/src/q3ptrvector.qdoc427
-rw-r--r--doc/src/q3sqlfieldinfo.qdoc234
-rw-r--r--doc/src/q3sqlrecordinfo.qdoc89
-rw-r--r--doc/src/q3valuelist.qdoc569
-rw-r--r--doc/src/q3valuestack.qdoc149
-rw-r--r--doc/src/q3valuevector.qdoc274
-rw-r--r--doc/src/qalgorithms.qdoc648
-rw-r--r--doc/src/qaxcontainer.qdoc260
-rw-r--r--doc/src/qaxserver.qdoc898
-rw-r--r--doc/src/qcache.qdoc244
-rw-r--r--doc/src/qcolormap.qdoc152
-rw-r--r--doc/src/qdbusadaptors.qdoc518
-rw-r--r--doc/src/qdesktopwidget.qdoc240
-rw-r--r--doc/src/qiterator.qdoc1431
-rw-r--r--doc/src/qmake-manual.qdoc4175
-rw-r--r--doc/src/qmsdev.qdoc137
-rw-r--r--doc/src/qnamespace.qdoc2660
-rw-r--r--doc/src/qpagesetupdialog.qdoc84
-rw-r--r--doc/src/qpaintdevice.qdoc289
-rw-r--r--doc/src/qpair.qdoc229
-rw-r--r--doc/src/qpatternistdummy.cpp1010
-rw-r--r--doc/src/qplugin.qdoc135
-rw-r--r--doc/src/qprintdialog.qdoc64
-rw-r--r--doc/src/qprinterinfo.qdoc137
-rw-r--r--doc/src/qset.qdoc952
-rw-r--r--doc/src/qsignalspy.qdoc98
-rw-r--r--doc/src/qsizepolicy.qdoc522
-rw-r--r--doc/src/qsql.qdoc138
-rw-r--r--doc/src/qt-conf.qdoc136
-rw-r--r--doc/src/qt-embedded.qdoc76
-rw-r--r--doc/src/qt3support.qdoc81
-rw-r--r--doc/src/qt3to4.qdoc179
-rw-r--r--doc/src/qt4-accessibility.qdoc163
-rw-r--r--doc/src/qt4-arthur.qdoc336
-rw-r--r--doc/src/qt4-designer.qdoc298
-rw-r--r--doc/src/qt4-interview.qdoc293
-rw-r--r--doc/src/qt4-intro.qdoc641
-rw-r--r--doc/src/qt4-mainwindow.qdoc250
-rw-r--r--doc/src/qt4-network.qdoc243
-rw-r--r--doc/src/qt4-scribe.qdoc257
-rw-r--r--doc/src/qt4-sql.qdoc175
-rw-r--r--doc/src/qt4-styles.qdoc157
-rw-r--r--doc/src/qt4-threads.qdoc101
-rw-r--r--doc/src/qt4-tulip.qdoc200
-rw-r--r--doc/src/qtassistant.qdoc54
-rw-r--r--doc/src/qtcocoa-known-issues.qdoc168
-rw-r--r--doc/src/qtconfig.qdoc56
-rw-r--r--doc/src/qtcore.qdoc60
-rw-r--r--doc/src/qtdbus.qdoc124
-rw-r--r--doc/src/qtdemo.qdoc67
-rw-r--r--doc/src/qtdesigner.qdoc1541
-rw-r--r--doc/src/qtendian.qdoc168
-rw-r--r--doc/src/qtestevent.qdoc191
-rw-r--r--doc/src/qtestlib.qdoc779
-rw-r--r--doc/src/qtgui.qdoc59
-rw-r--r--doc/src/qthelp.qdoc403
-rw-r--r--doc/src/qtmac-as-native.qdoc202
-rw-r--r--doc/src/qtmain.qdoc93
-rw-r--r--doc/src/qtnetwork.qdoc358
-rw-r--r--doc/src/qtopengl.qdoc163
-rw-r--r--doc/src/qtopiacore-architecture.qdoc338
-rw-r--r--doc/src/qtopiacore-displaymanagement.qdoc205
-rw-r--r--doc/src/qtopiacore-opengl.qdoc227
-rw-r--r--doc/src/qtopiacore.qdoc114
-rw-r--r--doc/src/qtscript.qdoc1934
-rw-r--r--doc/src/qtscriptdebugger-manual.qdoc437
-rw-r--r--doc/src/qtscriptextensions.qdoc126
-rw-r--r--doc/src/qtscripttools.qdoc72
-rw-r--r--doc/src/qtsql.qdoc568
-rw-r--r--doc/src/qtsvg.qdoc135
-rw-r--r--doc/src/qttest.qdoc70
-rw-r--r--doc/src/qtuiloader.qdoc82
-rw-r--r--doc/src/qtwebkit.qdoc189
-rw-r--r--doc/src/qtxml.qdoc615
-rw-r--r--doc/src/qtxmlpatterns.qdoc893
-rw-r--r--doc/src/qundo.qdoc113
-rw-r--r--doc/src/qvarlengtharray.qdoc274
-rw-r--r--doc/src/qwaitcondition.qdoc188
-rw-r--r--doc/src/rcc.qdoc96
-rw-r--r--doc/src/resources.qdoc192
-rw-r--r--doc/src/richtext.qdoc1073
-rw-r--r--doc/src/session.qdoc177
-rw-r--r--doc/src/signalsandslots.qdoc418
-rw-r--r--doc/src/snippets/accessibilityfactorysnippet.cpp68
-rw-r--r--doc/src/snippets/accessibilitypluginsnippet.cpp75
-rw-r--r--doc/src/snippets/accessibilityslidersnippet.cpp262
-rw-r--r--doc/src/snippets/alphachannel.cpp114
-rw-r--r--doc/src/snippets/audioeffects.cpp42
-rw-r--r--doc/src/snippets/brush/brush.cpp87
-rw-r--r--doc/src/snippets/brush/brush.pro1
-rw-r--r--doc/src/snippets/brush/gradientcreationsnippet.cpp63
-rw-r--r--doc/src/snippets/brushstyles/brushstyles.pro12
-rw-r--r--doc/src/snippets/brushstyles/main.cpp52
-rw-r--r--doc/src/snippets/brushstyles/qt-logo.pngbin0 -> 1422 bytes-rw-r--r--doc/src/snippets/brushstyles/renderarea.cpp79
-rw-r--r--doc/src/snippets/brushstyles/renderarea.h62
-rw-r--r--doc/src/snippets/brushstyles/stylewidget.cpp145
-rw-r--r--doc/src/snippets/brushstyles/stylewidget.h99
-rw-r--r--doc/src/snippets/buffer/buffer.cpp125
-rw-r--r--doc/src/snippets/buffer/buffer.pro14
-rw-r--r--doc/src/snippets/clipboard/clipboard.pro3
-rw-r--r--doc/src/snippets/clipboard/clipwindow.cpp104
-rw-r--r--doc/src/snippets/clipboard/clipwindow.h73
-rw-r--r--doc/src/snippets/clipboard/main.cpp53
-rw-r--r--doc/src/snippets/code/doc.src.qtscripttools.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc25
-rw-r--r--doc/src/snippets/code/doc_src_appicon.qdoc23
-rw-r--r--doc/src/snippets/code/doc_src_assistant-manual.qdoc110
-rw-r--r--doc/src/snippets/code/doc_src_atomic-operations.qdoc71
-rw-r--r--doc/src/snippets/code/doc_src_compiler-notes.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_containers.qdoc235
-rw-r--r--doc/src/snippets/code/doc_src_coordsys.qdoc47
-rw-r--r--doc/src/snippets/code/doc_src_debug.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc414
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.qdoc98
-rw-r--r--doc/src/snippets/code/doc_src_dnd.qdoc34
-rw-r--r--doc/src/snippets/code/doc_src_emb-charinput.qdoc20
-rw-r--r--doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc36
-rw-r--r--doc/src/snippets/code/doc_src_emb-envvars.qdoc38
-rw-r--r--doc/src/snippets/code/doc_src_emb-features.qdoc18
-rw-r--r--doc/src/snippets/code/doc_src_emb-fonts.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_emb-install.qdoc37
-rw-r--r--doc/src/snippets/code/doc_src_emb-performance.qdoc36
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc68
-rw-r--r--doc/src/snippets/code/doc_src_emb-qvfb.qdoc70
-rw-r--r--doc/src/snippets/code/doc_src_emb-running.qdoc61
-rw-r--r--doc/src/snippets/code/doc_src_emb-vnc.qdoc25
-rw-r--r--doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc39
-rw-r--r--doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_examples_ahigl.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_examples_application.qdoc5
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.qdoc19
-rw-r--r--doc/src/snippets/code/doc_src_examples_containerextension.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_examples_dropsite.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_examples_hellotr.qdoc31
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.qdoc14
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc35
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc20
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc12
-rw-r--r--doc/src/snippets/code/doc_src_examples_svgalib.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_examples_textfinder.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_examples_trollprint.qdoc35
-rw-r--r--doc/src/snippets/code/doc_src_examples_tutorial.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_exportedfunctions.qdoc17
-rw-r--r--doc/src/snippets/code/doc_src_gpl.qdoc679
-rw-r--r--doc/src/snippets/code/doc_src_graphicsview.qdoc77
-rw-r--r--doc/src/snippets/code/doc_src_groups.qdoc26
-rw-r--r--doc/src/snippets/code/doc_src_i18n.qdoc155
-rw-r--r--doc/src/snippets/code/doc_src_installation.qdoc127
-rw-r--r--doc/src/snippets/code/doc_src_introtodbus.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_layout.qdoc119
-rw-r--r--doc/src/snippets/code/doc_src_lgpl.qdoc507
-rw-r--r--doc/src/snippets/code/doc_src_licenses.qdoc108
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.qdoc183
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.qdoc36
-rw-r--r--doc/src/snippets/code/doc_src_moc.qdoc124
-rw-r--r--doc/src/snippets/code/doc_src_model-view-programming.qdoc36
-rw-r--r--doc/src/snippets/code/doc_src_modules.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_objecttrees.qdoc20
-rw-r--r--doc/src/snippets/code/doc_src_phonon-api.qdoc224
-rw-r--r--doc/src/snippets/code/doc_src_phonon.qdoc13
-rw-r--r--doc/src/snippets/code/doc_src_platform-notes.qdoc39
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.qdoc67
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.qdoc187
-rw-r--r--doc/src/snippets/code/doc_src_porting4-canvas.qdoc116
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.qdoc159
-rw-r--r--doc/src/snippets/code/doc_src_porting4.qdoc473
-rw-r--r--doc/src/snippets/code/doc_src_properties.qdoc77
-rw-r--r--doc/src/snippets/code/doc_src_q3asciidict.qdoc52
-rw-r--r--doc/src/snippets/code/doc_src_q3dict.qdoc29
-rw-r--r--doc/src/snippets/code/doc_src_q3intdict.qdoc51
-rw-r--r--doc/src/snippets/code/doc_src_q3memarray.qdoc80
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrdict.qdoc66
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrlist.qdoc82
-rw-r--r--doc/src/snippets/code/doc_src_q3valuelist.qdoc95
-rw-r--r--doc/src/snippets/code/doc_src_q3valuestack.qdoc13
-rw-r--r--doc/src/snippets/code/doc_src_q3valuevector.qdoc85
-rw-r--r--doc/src/snippets/code/doc_src_qalgorithms.qdoc314
-rw-r--r--doc/src/snippets/code/doc_src_qaxcontainer.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.qdoc223
-rw-r--r--doc/src/snippets/code/doc_src_qcache.qdoc17
-rw-r--r--doc/src/snippets/code/doc_src_qdbusadaptors.qdoc253
-rw-r--r--doc/src/snippets/code/doc_src_qiterator.qdoc380
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.qdoc813
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_qpair.qdoc15
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_qset.qdoc126
-rw-r--r--doc/src/snippets/code/doc_src_qsignalspy.qdoc41
-rw-r--r--doc/src/snippets/code/doc_src_qt-conf.qdoc14
-rw-r--r--doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc51
-rw-r--r--doc/src/snippets/code/doc_src_qt3support.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qt3to4.qdoc26
-rw-r--r--doc/src/snippets/code/doc_src_qt4-accessibility.qdoc59
-rw-r--r--doc/src/snippets/code/doc_src_qt4-arthur.qdoc104
-rw-r--r--doc/src/snippets/code/doc_src_qt4-intro.qdoc101
-rw-r--r--doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc70
-rw-r--r--doc/src/snippets/code/doc_src_qt4-sql.qdoc19
-rw-r--r--doc/src/snippets/code/doc_src_qt4-styles.qdoc42
-rw-r--r--doc/src/snippets/code/doc_src_qt4-tulip.qdoc100
-rw-r--r--doc/src/snippets/code/doc_src_qtcore.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_qtdbus.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtdesigner.qdoc293
-rw-r--r--doc/src/snippets/code/doc_src_qtestevent.qdoc11
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.qdoc102
-rw-r--r--doc/src/snippets/code/doc_src_qtgui.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_qthelp.qdoc161
-rw-r--r--doc/src/snippets/code/doc_src_qtmac-as-native.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtopengl.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.qdoc948
-rw-r--r--doc/src/snippets/code/doc_src_qtscriptextensions.qdoc7
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtsvg.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qttest.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtuiloader.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtwebkit.qdoc8
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.qdoc77
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc349
-rw-r--r--doc/src/snippets/code/doc_src_qvarlengtharray.qdoc38
-rw-r--r--doc/src/snippets/code/doc_src_rcc.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_resources.qdoc41
-rw-r--r--doc/src/snippets/code/doc_src_richtext.qdoc50
-rw-r--r--doc/src/snippets/code/doc_src_session.qdoc3
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.qdoc239
-rw-r--r--doc/src/snippets/code/doc_src_styles.qdoc94
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.qdoc1911
-rw-r--r--doc/src/snippets/code/doc_src_uic.qdoc15
-rw-r--r--doc/src/snippets/code/doc_src_unicode.qdoc18
-rw-r--r--doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc110
-rw-r--r--doc/src/snippets/code/doc_src_wince-customization.qdoc70
-rw-r--r--doc/src/snippets/code/doc_src_wince-introduction.qdoc9
-rw-r--r--doc/src/snippets/code/doc_src_wince-opengl.qdoc3
-rw-r--r--doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp5
-rw-r--r--doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp24
-rw-r--r--doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp23
-rw-r--r--doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp9
-rw-r--r--doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp35
-rw-r--r--doc/src/snippets/code/src_activeqt_container_qaxbase.cpp159
-rw-r--r--doc/src/snippets/code/src_activeqt_container_qaxscript.cpp18
-rw-r--r--doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp60
-rw-r--r--doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp155
-rw-r--r--doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp34
-rw-r--r--doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp16
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp24
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp13
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp10
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp35
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp131
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp144
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp60
-rw-r--r--doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp13
-rw-r--r--doc/src/snippets/code/src_corelib_global_qglobal.cpp458
-rw-r--r--doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp80
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdatastream.cpp81
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdir.cpp135
-rw-r--r--doc/src/snippets/code/src_corelib_io_qdiriterator.cpp12
-rw-r--r--doc/src/snippets/code/src_corelib_io_qfile.cpp35
-rw-r--r--doc/src/snippets/code/src_corelib_io_qfileinfo.cpp106
-rw-r--r--doc/src/snippets/code/src_corelib_io_qiodevice.cpp59
-rw-r--r--doc/src/snippets/code/src_corelib_io_qprocess.cpp94
-rw-r--r--doc/src/snippets/code/src_corelib_io_qsettings.cpp276
-rw-r--r--doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp13
-rw-r--r--doc/src/snippets/code/src_corelib_io_qtextstream.cpp89
-rw-r--r--doc/src/snippets/code/src_corelib_io_qurl.cpp47
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp3
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp28
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp86
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp96
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp69
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp68
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp381
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp21
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qtimer.cpp12
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qvariant.cpp97
-rw-r--r--doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp44
-rw-r--r--doc/src/snippets/code/src_corelib_plugin_quuid.cpp4
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qatomic.cpp58
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qmutex.cpp153
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp21
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp69
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp33
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qthread.cpp16
-rw-r--r--doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp49
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbitarray.cpp136
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbytearray.cpp364
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qdatetime.cpp106
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qhash.cpp259
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp164
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlistdata.cpp227
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qlocale.cpp55
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qmap.cpp273
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qpoint.cpp109
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qqueue.cpp8
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qrect.cpp10
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qregexp.cpp184
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qsize.cpp96
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qstring.cpp47
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qtimeline.cpp15
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qvector.cpp143
-rw-r--r--doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp27
-rw-r--r--doc/src/snippets/code/src_gui_accessible_qaccessible.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp6
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp91
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp45
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp108
-rw-r--r--doc/src/snippets/code/src_gui_dialogs_qwizard.cpp40
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp26
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp4
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp9
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp47
-rw-r--r--doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp45
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp221
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp47
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp82
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp5
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp92
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp26
-rw-r--r--doc/src/snippets/code/src_gui_image_qbitmap.cpp4
-rw-r--r--doc/src/snippets/code/src_gui_image_qicon.cpp22
-rw-r--r--doc/src/snippets/code/src_gui_image_qimage.cpp42
-rw-r--r--doc/src/snippets/code/src_gui_image_qimagereader.cpp26
-rw-r--r--doc/src/snippets/code/src_gui_image_qimagewriter.cpp19
-rw-r--r--doc/src/snippets/code/src_gui_image_qmovie.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmap.cpp18
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmapcache.cpp21
-rw-r--r--doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp22
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp18
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp23
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp23
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp10
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp42
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp5
-rw-r--r--doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qaction.cpp9
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qapplication.cpp143
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp5
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qclipboard.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qevent.cpp14
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qformlayout.cpp36
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp19
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qlayout.cpp27
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qshortcut.cpp15
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qsound.cpp9
-rw-r--r--doc/src/snippets/code/src_gui_kernel_qwidget.cpp97
-rw-r--r--doc/src/snippets/code/src_gui_painting_qbrush.cpp11
-rw-r--r--doc/src/snippets/code/src_gui_painting_qcolor.cpp9
-rw-r--r--doc/src/snippets/code/src_gui_painting_qdrawutil.cpp58
-rw-r--r--doc/src/snippets/code/src_gui_painting_qmatrix.cpp22
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpainter.cpp202
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpainterpath.cpp109
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpen.cpp41
-rw-r--r--doc/src/snippets/code/src_gui_painting_qregion.cpp13
-rw-r--r--doc/src/snippets/code/src_gui_painting_qregion_unix.cpp18
-rw-r--r--doc/src/snippets/code/src_gui_painting_qtransform.cpp42
-rw-r--r--doc/src/snippets/code/src_gui_styles_qstyle.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_styles_qstyleoption.cpp14
-rw-r--r--doc/src/snippets/code/src_gui_text_qfont.cpp27
-rw-r--r--doc/src/snippets/code/src_gui_text_qfontmetrics.cpp14
-rw-r--r--doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp86
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextcursor.cpp40
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextdocument.cpp10
-rw-r--r--doc/src/snippets/code/src_gui_text_qtextlayout.cpp24
-rw-r--r--doc/src/snippets/code/src_gui_util_qcompleter.cpp23
-rw-r--r--doc/src/snippets/code/src_gui_util_qdesktopservices.cpp17
-rw-r--r--doc/src/snippets/code/src_gui_util_qundostack.cpp69
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp20
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp39
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp39
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qframe.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qlabel.cpp24
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qlineedit.cpp10
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qmenu.cpp37
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qmenubar.cpp8
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp15
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qrubberband.cpp22
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp9
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qspinbox.cpp40
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp15
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qsplitter.cpp7
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp3
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp4
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qtextedit.cpp20
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qvalidator.cpp95
-rw-r--r--doc/src/snippets/code/src_gui_widgets_qworkspace.cpp8
-rw-r--r--doc/src/snippets/code/src_network_access_qftp.cpp59
-rw-r--r--doc/src/snippets/code/src_network_access_qhttp.cpp85
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp21
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkrequest.cpp3
-rw-r--r--doc/src/snippets/code/src_network_kernel_qhostaddress.cpp8
-rw-r--r--doc/src/snippets/code/src_network_kernel_qhostinfo.cpp50
-rw-r--r--doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp14
-rw-r--r--doc/src/snippets/code/src_network_socket_qabstractsocket.cpp30
-rw-r--r--doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp12
-rw-r--r--doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp21
-rw-r--r--doc/src/snippets/code/src_network_socket_qtcpserver.cpp3
-rw-r--r--doc/src/snippets/code/src_network_socket_qudpsocket.cpp25
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp6
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp5
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslsocket.cpp56
-rw-r--r--doc/src/snippets/code/src_opengl_qgl.cpp132
-rw-r--r--doc/src/snippets/code/src_opengl_qglcolormap.cpp21
-rw-r--r--doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp19
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp20
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusargument.cpp151
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbuscontext.cpp32
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusinterface.cpp11
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp3
-rw-r--r--doc/src/snippets/code/src_qdbus_qdbusreply.cpp14
-rw-r--r--doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp51
-rw-r--r--doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp229
-rw-r--r--doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp41
-rw-r--r--doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp75
-rw-r--r--doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp73
-rw-r--r--doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp57
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3dns.cpp58
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3ftp.cpp65
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3http.cpp74
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3localfs.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp8
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3socket.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3url.cpp43
-rw-r--r--doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp37
-rw-r--r--doc/src/snippets/code/src_qt3support_other_q3accel.cpp40
-rw-r--r--doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp32
-rw-r--r--doc/src/snippets/code/src_qt3support_other_q3process.cpp8
-rw-r--r--doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_painting_q3painter.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_painting_q3picture.cpp14
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp8
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp8
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp100
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp26
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp11
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp35
-rw-r--r--doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp11
-rw-r--r--doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp3
-rw-r--r--doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp3
-rw-r--r--doc/src/snippets/code/src_qt3support_text_q3textedit.cpp31
-rw-r--r--doc/src/snippets/code/src_qt3support_text_q3textstream.cpp29
-rw-r--r--doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp40
-rw-r--r--doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp58
-rw-r--r--doc/src/snippets/code/src_qt3support_tools_q3garray.cpp20
-rw-r--r--doc/src/snippets/code/src_qt3support_tools_q3signal.cpp38
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp15
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp28
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp8
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp4
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp6
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3header.cpp6
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp45
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp61
-rw-r--r--doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp3
-rw-r--r--doc/src/snippets/code/src_qtestlib_qtestcase.cpp188
-rw-r--r--doc/src/snippets/code/src_script_qscriptable.cpp25
-rw-r--r--doc/src/snippets/code/src_script_qscriptclass.cpp10
-rw-r--r--doc/src/snippets/code/src_script_qscriptcontext.cpp28
-rw-r--r--doc/src/snippets/code/src_script_qscriptengine.cpp292
-rw-r--r--doc/src/snippets/code/src_script_qscriptengineagent.cpp12
-rw-r--r--doc/src/snippets/code/src_script_qscriptvalue.cpp40
-rw-r--r--doc/src/snippets/code/src_script_qscriptvalueiterator.cpp32
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp95
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp24
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp6
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp8
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp40
-rw-r--r--doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp45
-rw-r--r--doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp12
-rw-r--r--doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp11
-rw-r--r--doc/src/snippets/code/src_xml_dom_qdom.cpp178
-rw-r--r--doc/src/snippets/code/src_xml_sax_qxml.cpp3
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp3
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp3
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp22
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp7
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp19
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp8
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp8
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp152
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp16
-rw-r--r--doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp7
-rw-r--r--doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp25
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp35
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp15
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp17
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp11
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp25
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp8
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp11
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp11
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp23
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp30
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp17
-rw-r--r--doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp26
-rw-r--r--doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp5
-rw-r--r--doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp44
-rw-r--r--doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp47
-rw-r--r--doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp16
-rw-r--r--doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp12
-rw-r--r--doc/src/snippets/complexpingpong-example.qdoc4
-rw-r--r--doc/src/snippets/console/dbus_pingpong.txt3
-rw-r--r--doc/src/snippets/coordsys/coordsys.cpp77
-rw-r--r--doc/src/snippets/coordsys/coordsys.pro1
-rw-r--r--doc/src/snippets/customstyle/customstyle.cpp93
-rw-r--r--doc/src/snippets/customstyle/customstyle.h61
-rw-r--r--doc/src/snippets/customstyle/customstyle.pro2
-rw-r--r--doc/src/snippets/customstyle/main.cpp55
-rw-r--r--doc/src/snippets/customviewstyle.cpp29
-rw-r--r--doc/src/snippets/dbus-pingpong-example.qdoc3
-rw-r--r--doc/src/snippets/designer/autoconnection/autoconnection.pro5
-rw-r--r--doc/src/snippets/designer/autoconnection/imagedialog.cpp70
-rw-r--r--doc/src/snippets/designer/autoconnection/imagedialog.h60
-rw-r--r--doc/src/snippets/designer/autoconnection/imagedialog.ui389
-rw-r--r--doc/src/snippets/designer/autoconnection/main.cpp52
-rw-r--r--doc/src/snippets/designer/designer.pro6
-rw-r--r--doc/src/snippets/designer/imagedialog/imagedialog.pro3
-rw-r--r--doc/src/snippets/designer/imagedialog/imagedialog.ui389
-rw-r--r--doc/src/snippets/designer/imagedialog/main.cpp54
-rw-r--r--doc/src/snippets/designer/multipleinheritance/imagedialog.cpp60
-rw-r--r--doc/src/snippets/designer/multipleinheritance/imagedialog.h55
-rw-r--r--doc/src/snippets/designer/multipleinheritance/imagedialog.ui389
-rw-r--r--doc/src/snippets/designer/multipleinheritance/main.cpp52
-rw-r--r--doc/src/snippets/designer/multipleinheritance/multipleinheritance.pro5
-rw-r--r--doc/src/snippets/designer/noautoconnection/imagedialog.cpp77
-rw-r--r--doc/src/snippets/designer/noautoconnection/imagedialog.h60
-rw-r--r--doc/src/snippets/designer/noautoconnection/imagedialog.ui389
-rw-r--r--doc/src/snippets/designer/noautoconnection/main.cpp52
-rw-r--r--doc/src/snippets/designer/noautoconnection/noautoconnection.pro5
-rw-r--r--doc/src/snippets/designer/singleinheritance/imagedialog.cpp60
-rw-r--r--doc/src/snippets/designer/singleinheritance/imagedialog.h58
-rw-r--r--doc/src/snippets/designer/singleinheritance/imagedialog.ui389
-rw-r--r--doc/src/snippets/designer/singleinheritance/main.cpp52
-rw-r--r--doc/src/snippets/designer/singleinheritance/singleinheritance.pro5
-rw-r--r--doc/src/snippets/dialogs/dialogs.cpp269
-rw-r--r--doc/src/snippets/dialogs/dialogs.pro1
-rw-r--r--doc/src/snippets/dockwidgets/Resources/modules.html28
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtcore.html122
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtgui.html276
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtnetwork.html35
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtopengl.html27
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtsql.html39
-rw-r--r--doc/src/snippets/dockwidgets/Resources/qtxml.html53
-rw-r--r--doc/src/snippets/dockwidgets/Resources/titles.txt7
-rw-r--r--doc/src/snippets/dockwidgets/dockwidgets.pro4
-rw-r--r--doc/src/snippets/dockwidgets/dockwidgets.qrc12
-rw-r--r--doc/src/snippets/dockwidgets/main.cpp53
-rw-r--r--doc/src/snippets/dockwidgets/mainwindow.cpp123
-rw-r--r--doc/src/snippets/dockwidgets/mainwindow.h71
-rw-r--r--doc/src/snippets/draganddrop/draganddrop.pro5
-rw-r--r--doc/src/snippets/draganddrop/dragwidget.cpp154
-rw-r--r--doc/src/snippets/draganddrop/dragwidget.h80
-rw-r--r--doc/src/snippets/draganddrop/main.cpp54
-rw-r--r--doc/src/snippets/draganddrop/mainwindow.cpp85
-rw-r--r--doc/src/snippets/draganddrop/mainwindow.h72
-rw-r--r--doc/src/snippets/dragging/dragging.pro4
-rw-r--r--doc/src/snippets/dragging/images.qrc5
-rw-r--r--doc/src/snippets/dragging/images/file.pngbin0 -> 313 bytes-rw-r--r--doc/src/snippets/dragging/main.cpp52
-rw-r--r--doc/src/snippets/dragging/mainwindow.cpp111
-rw-r--r--doc/src/snippets/dragging/mainwindow.h72
-rw-r--r--doc/src/snippets/dropactions/dropactions.pro3
-rw-r--r--doc/src/snippets/dropactions/main.cpp52
-rw-r--r--doc/src/snippets/dropactions/window.cpp106
-rw-r--r--doc/src/snippets/dropactions/window.h72
-rw-r--r--doc/src/snippets/droparea.cpp139
-rw-r--r--doc/src/snippets/dropevents/dropevents.pro3
-rw-r--r--doc/src/snippets/dropevents/main.cpp53
-rw-r--r--doc/src/snippets/dropevents/window.cpp88
-rw-r--r--doc/src/snippets/dropevents/window.h72
-rw-r--r--doc/src/snippets/droprectangle/droprectangle.pro3
-rw-r--r--doc/src/snippets/droprectangle/main.cpp52
-rw-r--r--doc/src/snippets/droprectangle/window.cpp97
-rw-r--r--doc/src/snippets/droprectangle/window.h72
-rw-r--r--doc/src/snippets/eventfilters/eventfilters.pro3
-rw-r--r--doc/src/snippets/eventfilters/filterobject.cpp75
-rw-r--r--doc/src/snippets/eventfilters/filterobject.h60
-rw-r--r--doc/src/snippets/eventfilters/main.cpp55
-rw-r--r--doc/src/snippets/events/events.cpp98
-rw-r--r--doc/src/snippets/events/events.pro1
-rw-r--r--doc/src/snippets/explicitlysharedemployee/employee.cpp110
-rw-r--r--doc/src/snippets/explicitlysharedemployee/employee.h75
-rw-r--r--doc/src/snippets/explicitlysharedemployee/explicitlysharedemployee.pro3
-rw-r--r--doc/src/snippets/explicitlysharedemployee/main.cpp51
-rw-r--r--doc/src/snippets/file/file.cpp124
-rw-r--r--doc/src/snippets/file/file.pro14
-rw-r--r--doc/src/snippets/filedialogurls.cpp22
-rw-r--r--doc/src/snippets/fileinfo/fileinfo.pro11
-rw-r--r--doc/src/snippets/fileinfo/main.cpp93
-rw-r--r--doc/src/snippets/graphicssceneadditemsnippet.cpp81
-rw-r--r--doc/src/snippets/i18n-non-qt-class/i18n-non-qt-class.pro7
-rw-r--r--doc/src/snippets/i18n-non-qt-class/main.cpp55
-rw-r--r--doc/src/snippets/i18n-non-qt-class/myclass.cpp48
-rw-r--r--doc/src/snippets/i18n-non-qt-class/myclass.h60
-rw-r--r--doc/src/snippets/i18n-non-qt-class/myclass.ts12
-rw-r--r--doc/src/snippets/i18n-non-qt-class/resources.qrc6
-rw-r--r--doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts12
-rw-r--r--doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts13
-rw-r--r--doc/src/snippets/image/image.cpp105
-rw-r--r--doc/src/snippets/image/image.pro1
-rw-r--r--doc/src/snippets/image/supportedformat.cpp53
-rw-r--r--doc/src/snippets/inherited-slot/button.cpp54
-rw-r--r--doc/src/snippets/inherited-slot/button.h60
-rw-r--r--doc/src/snippets/inherited-slot/inherited-slot.pro3
-rw-r--r--doc/src/snippets/inherited-slot/main.cpp67
-rw-r--r--doc/src/snippets/itemselection/itemselection.pro3
-rw-r--r--doc/src/snippets/itemselection/main.cpp116
-rw-r--r--doc/src/snippets/itemselection/model.cpp239
-rw-r--r--doc/src/snippets/itemselection/model.h75
-rw-r--r--doc/src/snippets/javastyle.cpp2746
-rw-r--r--doc/src/snippets/layouts/layouts.cpp130
-rw-r--r--doc/src/snippets/layouts/layouts.pro12
-rw-r--r--doc/src/snippets/mainwindowsnippet.cpp93
-rw-r--r--doc/src/snippets/matrix/matrix.cpp141
-rw-r--r--doc/src/snippets/matrix/matrix.pro11
-rw-r--r--doc/src/snippets/mdiareasnippets.cpp98
-rw-r--r--doc/src/snippets/medianodesnippet.cpp29
-rw-r--r--doc/src/snippets/moc/main.cpp66
-rw-r--r--doc/src/snippets/moc/moc.pro2
-rw-r--r--doc/src/snippets/moc/myclass1.h66
-rw-r--r--doc/src/snippets/moc/myclass2.h67
-rw-r--r--doc/src/snippets/moc/myclass3.h60
-rw-r--r--doc/src/snippets/modelview-subclasses/main.cpp69
-rw-r--r--doc/src/snippets/modelview-subclasses/model.cpp153
-rw-r--r--doc/src/snippets/modelview-subclasses/model.h71
-rw-r--r--doc/src/snippets/modelview-subclasses/view.cpp315
-rw-r--r--doc/src/snippets/modelview-subclasses/view.h91
-rw-r--r--doc/src/snippets/modelview-subclasses/window.cpp113
-rw-r--r--doc/src/snippets/modelview-subclasses/window.h69
-rw-r--r--doc/src/snippets/myscrollarea.cpp129
-rw-r--r--doc/src/snippets/network/tcpwait.cpp70
-rw-r--r--doc/src/snippets/ntfsp.cpp11
-rw-r--r--doc/src/snippets/painterpath/painterpath.cpp77
-rw-r--r--doc/src/snippets/painterpath/painterpath.pro1
-rw-r--r--doc/src/snippets/patternist/anyHTMLElement.xq1
-rw-r--r--doc/src/snippets/patternist/anyXLinkAttribute.xq2
-rw-r--r--doc/src/snippets/patternist/bracesIncluded.xq1
-rw-r--r--doc/src/snippets/patternist/bracesIncludedResult.xml1
-rw-r--r--doc/src/snippets/patternist/bracesOmitted.xq1
-rw-r--r--doc/src/snippets/patternist/bracesOmittedResult.xml2
-rw-r--r--doc/src/snippets/patternist/computedTreeFragment.xq14
-rw-r--r--doc/src/snippets/patternist/copyAttribute.xq9
-rw-r--r--doc/src/snippets/patternist/copyID.xq3
-rw-r--r--doc/src/snippets/patternist/directTreeFragment.xq7
-rw-r--r--doc/src/snippets/patternist/doc.txt35
-rw-r--r--doc/src/snippets/patternist/docPlainHTML.xq1
-rw-r--r--doc/src/snippets/patternist/docPlainHTML2.xq1
-rw-r--r--doc/src/snippets/patternist/embedDataInXHTML.xq10
-rw-r--r--doc/src/snippets/patternist/embedDataInXHTML2.xq10
-rw-r--r--doc/src/snippets/patternist/emptyParagraphs.xq1
-rw-r--r--doc/src/snippets/patternist/escapeCurlyBraces.xq4
-rw-r--r--doc/src/snippets/patternist/escapeStringLiterals.xml2
-rw-r--r--doc/src/snippets/patternist/escapeStringLiterals.xq7
-rw-r--r--doc/src/snippets/patternist/expressionInsideAttribute.xq2
-rw-r--r--doc/src/snippets/patternist/filterOnPath.xq2
-rw-r--r--doc/src/snippets/patternist/filterOnStep.xq2
-rw-r--r--doc/src/snippets/patternist/firstParagraph.xq1
-rw-r--r--doc/src/snippets/patternist/fnStringOnAttribute.xq9
-rw-r--r--doc/src/snippets/patternist/forClause.xq3
-rw-r--r--doc/src/snippets/patternist/forClause2.xq3
-rw-r--r--doc/src/snippets/patternist/forClauseOnFeed.xq6
-rw-r--r--doc/src/snippets/patternist/indented.xml5
-rw-r--r--doc/src/snippets/patternist/introAcneRemover.xq8
-rw-r--r--doc/src/snippets/patternist/introExample2.xq5
-rw-r--r--doc/src/snippets/patternist/introFileHierarchy.xml14
-rw-r--r--doc/src/snippets/patternist/introNavigateFS.xq12
-rw-r--r--doc/src/snippets/patternist/introductionExample.xq3
-rw-r--r--doc/src/snippets/patternist/invalidLetOrderBy.xq3
-rw-r--r--doc/src/snippets/patternist/items.xq5
-rw-r--r--doc/src/snippets/patternist/letOrderBy.xq4
-rw-r--r--doc/src/snippets/patternist/literalsAndOperators.xq2
-rw-r--r--doc/src/snippets/patternist/mobeyDick.xml4
-rw-r--r--doc/src/snippets/patternist/nextLastParagraph.xq1
-rw-r--r--doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq4
-rw-r--r--doc/src/snippets/patternist/nodeConstructorsInPaths.xq1
-rw-r--r--doc/src/snippets/patternist/nodeTestChildElement.xq1
-rw-r--r--doc/src/snippets/patternist/notIndented.xml1
-rw-r--r--doc/src/snippets/patternist/oneElementConstructor.xq1
-rw-r--r--doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq1
-rw-r--r--doc/src/snippets/patternist/paragraphsWithTables.xq1
-rw-r--r--doc/src/snippets/patternist/pathAB.xq1
-rw-r--r--doc/src/snippets/patternist/pathsAllParagraphs.xq1
-rw-r--r--doc/src/snippets/patternist/simpleHTML.xq1
-rw-r--r--doc/src/snippets/patternist/simpleXHTML.xq2
-rw-r--r--doc/src/snippets/patternist/svgDocumentElement.xml1
-rw-r--r--doc/src/snippets/patternist/tablesInParagraphs.xq1
-rw-r--r--doc/src/snippets/patternist/twoSVGElements.xq5
-rw-r--r--doc/src/snippets/patternist/xmlStylesheet.xq1
-rw-r--r--doc/src/snippets/patternist/xsBooleanTrue.xq1
-rw-r--r--doc/src/snippets/patternist/xsvgDocumentElement.xml1
-rw-r--r--doc/src/snippets/persistentindexes/main.cpp52
-rw-r--r--doc/src/snippets/persistentindexes/mainwindow.cpp121
-rw-r--r--doc/src/snippets/persistentindexes/mainwindow.h71
-rw-r--r--doc/src/snippets/persistentindexes/model.cpp169
-rw-r--r--doc/src/snippets/persistentindexes/model.h72
-rw-r--r--doc/src/snippets/persistentindexes/persistentindexes.pro5
-rw-r--r--doc/src/snippets/phonon.cpp96
-rw-r--r--doc/src/snippets/phonon/samplebackend/main.cpp115
-rw-r--r--doc/src/snippets/phononeffectparameter.cpp35
-rw-r--r--doc/src/snippets/phononobjectdescription.cpp40
-rw-r--r--doc/src/snippets/picture/picture.cpp152
-rw-r--r--doc/src/snippets/picture/picture.pro12
-rw-r--r--doc/src/snippets/plaintextlayout/main.cpp53
-rw-r--r--doc/src/snippets/plaintextlayout/plaintextlayout.pro3
-rw-r--r--doc/src/snippets/plaintextlayout/window.cpp109
-rw-r--r--doc/src/snippets/plaintextlayout/window.h62
-rw-r--r--doc/src/snippets/pointer/pointer.cpp61
-rw-r--r--doc/src/snippets/polygon/polygon.cpp113
-rw-r--r--doc/src/snippets/polygon/polygon.pro1
-rw-r--r--doc/src/snippets/porting4-dropevents/main.cpp53
-rw-r--r--doc/src/snippets/porting4-dropevents/porting4-dropevents.pro3
-rw-r--r--doc/src/snippets/porting4-dropevents/window.cpp125
-rw-r--r--doc/src/snippets/porting4-dropevents/window.h73
-rw-r--r--doc/src/snippets/printing-qprinter/errors.cpp25
-rw-r--r--doc/src/snippets/printing-qprinter/main.cpp54
-rw-r--r--doc/src/snippets/printing-qprinter/object.cpp72
-rw-r--r--doc/src/snippets/printing-qprinter/object.h53
-rw-r--r--doc/src/snippets/printing-qprinter/printing-qprinter.pro3
-rw-r--r--doc/src/snippets/process/process.cpp77
-rw-r--r--doc/src/snippets/process/process.pro1
-rw-r--r--doc/src/snippets/qabstractsliderisnippet.cpp510
-rw-r--r--doc/src/snippets/qcalendarwidget/main.cpp65
-rw-r--r--doc/src/snippets/qcalendarwidget/qcalendarwidget.pro1
-rw-r--r--doc/src/snippets/qcolumnview/main.cpp80
-rw-r--r--doc/src/snippets/qcolumnview/qcolumnview.pro1
-rw-r--r--doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp67
-rw-r--r--doc/src/snippets/qdbusextratypes/qdbusextratypes.pro2
-rw-r--r--doc/src/snippets/qdebug/qdebug.pro1
-rw-r--r--doc/src/snippets/qdebug/qdebugsnippet.cpp74
-rw-r--r--doc/src/snippets/qdir-filepaths/main.cpp55
-rw-r--r--doc/src/snippets/qdir-filepaths/qdir-filepaths.pro1
-rw-r--r--doc/src/snippets/qdir-listfiles/main.cpp63
-rw-r--r--doc/src/snippets/qdir-listfiles/qdir-listfiles.pro1
-rw-r--r--doc/src/snippets/qdir-namefilters/main.cpp66
-rw-r--r--doc/src/snippets/qdir-namefilters/qdir-namefilters.pro1
-rw-r--r--doc/src/snippets/qfontdatabase/main.cpp75
-rw-r--r--doc/src/snippets/qfontdatabase/qfontdatabase.pro1
-rw-r--r--doc/src/snippets/qgl-namespace/main.cpp47
-rw-r--r--doc/src/snippets/qgl-namespace/qgl-namespace.pro2
-rw-r--r--doc/src/snippets/qlabel/main.cpp89
-rw-r--r--doc/src/snippets/qlabel/qlabel.pro1
-rw-r--r--doc/src/snippets/qlineargradient/main.cpp51
-rw-r--r--doc/src/snippets/qlineargradient/paintwidget.cpp68
-rw-r--r--doc/src/snippets/qlineargradient/paintwidget.h60
-rw-r--r--doc/src/snippets/qlineargradient/qlineargradient.pro3
-rw-r--r--doc/src/snippets/qlistview-dnd/main.cpp52
-rw-r--r--doc/src/snippets/qlistview-dnd/mainwindow.cpp84
-rw-r--r--doc/src/snippets/qlistview-dnd/mainwindow.h62
-rw-r--r--doc/src/snippets/qlistview-dnd/model.cpp168
-rw-r--r--doc/src/snippets/qlistview-dnd/model.h74
-rw-r--r--doc/src/snippets/qlistview-dnd/qlistview-dnd.pro5
-rw-r--r--doc/src/snippets/qlistview-using/main.cpp52
-rw-r--r--doc/src/snippets/qlistview-using/mainwindow.cpp138
-rw-r--r--doc/src/snippets/qlistview-using/mainwindow.h73
-rw-r--r--doc/src/snippets/qlistview-using/model.cpp175
-rw-r--r--doc/src/snippets/qlistview-using/model.h83
-rw-r--r--doc/src/snippets/qlistview-using/qlistview-using.pro5
-rw-r--r--doc/src/snippets/qlistwidget-dnd/main.cpp52
-rw-r--r--doc/src/snippets/qlistwidget-dnd/mainwindow.cpp88
-rw-r--r--doc/src/snippets/qlistwidget-dnd/mainwindow.h63
-rw-r--r--doc/src/snippets/qlistwidget-dnd/qlistwidget-dnd.pro3
-rw-r--r--doc/src/snippets/qlistwidget-using/main.cpp52
-rw-r--r--doc/src/snippets/qlistwidget-using/mainwindow.cpp159
-rw-r--r--doc/src/snippets/qlistwidget-using/mainwindow.h73
-rw-r--r--doc/src/snippets/qlistwidget-using/qlistwidget-using.pro3
-rw-r--r--doc/src/snippets/qmacnativewidget/main.mm94
-rw-r--r--doc/src/snippets/qmacnativewidget/qmacnativewidget.pro8
-rw-r--r--doc/src/snippets/qmake/comments.pro10
-rw-r--r--doc/src/snippets/qmake/configscopes.pro23
-rw-r--r--doc/src/snippets/qmake/debug_and_release.pro14
-rw-r--r--doc/src/snippets/qmake/delegate.h41
-rw-r--r--doc/src/snippets/qmake/dereferencing.pro5
-rw-r--r--doc/src/snippets/qmake/destdir.pro2
-rw-r--r--doc/src/snippets/qmake/dirname.pro6
-rw-r--r--doc/src/snippets/qmake/environment.pro9
-rw-r--r--doc/src/snippets/qmake/functions.pro34
-rw-r--r--doc/src/snippets/qmake/include.pro3
-rw-r--r--doc/src/snippets/qmake/main.cpp41
-rw-r--r--doc/src/snippets/qmake/model.cpp41
-rw-r--r--doc/src/snippets/qmake/model.h41
-rw-r--r--doc/src/snippets/qmake/other.pro0
-rw-r--r--doc/src/snippets/qmake/paintwidget_mac.cpp41
-rw-r--r--doc/src/snippets/qmake/paintwidget_unix.cpp45
-rw-r--r--doc/src/snippets/qmake/paintwidget_win.cpp41
-rw-r--r--doc/src/snippets/qmake/project_location.pro6
-rw-r--r--doc/src/snippets/qmake/qtconfiguration.pro19
-rw-r--r--doc/src/snippets/qmake/quoting.pro8
-rw-r--r--doc/src/snippets/qmake/replace.pro4
-rw-r--r--doc/src/snippets/qmake/replacefunction.pro46
-rw-r--r--doc/src/snippets/qmake/scopes.pro42
-rw-r--r--doc/src/snippets/qmake/shared_or_static.pro8
-rw-r--r--doc/src/snippets/qmake/specifications.pro7
-rw-r--r--doc/src/snippets/qmake/testfunction.pro20
-rw-r--r--doc/src/snippets/qmake/variables.pro7
-rw-r--r--doc/src/snippets/qmake/view.h41
-rw-r--r--doc/src/snippets/qmetaobject-invokable/main.cpp53
-rw-r--r--doc/src/snippets/qmetaobject-invokable/qmetaobject-invokable.pro3
-rw-r--r--doc/src/snippets/qmetaobject-invokable/window.cpp58
-rw-r--r--doc/src/snippets/qmetaobject-invokable/window.h59
-rw-r--r--doc/src/snippets/qprocess-environment/main.cpp74
-rw-r--r--doc/src/snippets/qprocess-environment/qprocess-environment.pro1
-rw-r--r--doc/src/snippets/qprocess/qprocess-simpleexecution.cpp67
-rw-r--r--doc/src/snippets/qprocess/qprocess.pro11
-rw-r--r--doc/src/snippets/qsignalmapper/buttonwidget.cpp67
-rw-r--r--doc/src/snippets/qsignalmapper/buttonwidget.h68
-rw-r--r--doc/src/snippets/qsignalmapper/main.cpp62
-rw-r--r--doc/src/snippets/qsignalmapper/mainwindow.h60
-rw-r--r--doc/src/snippets/qsignalmapper/qsignalmapper.pro10
-rw-r--r--doc/src/snippets/qsortfilterproxymodel-details/main.cpp100
-rw-r--r--doc/src/snippets/qsortfilterproxymodel-details/qsortfilterproxymodel-details.pro1
-rw-r--r--doc/src/snippets/qsortfilterproxymodel/main.cpp78
-rw-r--r--doc/src/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro1
-rw-r--r--doc/src/snippets/qsplashscreen/main.cpp64
-rw-r--r--doc/src/snippets/qsplashscreen/mainwindow.cpp51
-rw-r--r--doc/src/snippets/qsplashscreen/mainwindow.h55
-rw-r--r--doc/src/snippets/qsplashscreen/qsplashscreen.pro4
-rw-r--r--doc/src/snippets/qsplashscreen/qsplashscreen.qrc5
-rw-r--r--doc/src/snippets/qsplashscreen/splash.pngbin0 -> 27926 bytes-rw-r--r--doc/src/snippets/qsql-namespace/main.cpp47
-rw-r--r--doc/src/snippets/qsql-namespace/qsql-namespace.pro2
-rw-r--r--doc/src/snippets/qstack/main.cpp56
-rw-r--r--doc/src/snippets/qstack/qstack.pro11
-rw-r--r--doc/src/snippets/qstackedlayout/main.cpp90
-rw-r--r--doc/src/snippets/qstackedlayout/qstackedlayout.pro11
-rw-r--r--doc/src/snippets/qstackedwidget/main.cpp88
-rw-r--r--doc/src/snippets/qstackedwidget/qstackedwidget.pro11
-rw-r--r--doc/src/snippets/qstandarditemmodel/main.cpp72
-rw-r--r--doc/src/snippets/qstandarditemmodel/qstandarditemmodel.pro11
-rw-r--r--doc/src/snippets/qstatustipevent/main.cpp83
-rw-r--r--doc/src/snippets/qstatustipevent/qstatustipevent.pro11
-rw-r--r--doc/src/snippets/qstring/main.cpp942
-rw-r--r--doc/src/snippets/qstring/qstring.pro11
-rw-r--r--doc/src/snippets/qstringlist/main.cpp156
-rw-r--r--doc/src/snippets/qstringlist/qstringlist.pro11
-rw-r--r--doc/src/snippets/qstringlistmodel/main.cpp67
-rw-r--r--doc/src/snippets/qstringlistmodel/qstringlistmodel.pro11
-rw-r--r--doc/src/snippets/qstyleoption/main.cpp140
-rw-r--r--doc/src/snippets/qstyleoption/qstyleoption.pro11
-rw-r--r--doc/src/snippets/qstyleplugin/main.cpp98
-rw-r--r--doc/src/snippets/qstyleplugin/qstyleplugin.pro11
-rw-r--r--doc/src/snippets/qsvgwidget/main.cpp60
-rw-r--r--doc/src/snippets/qsvgwidget/qsvgwidget.pro3
-rw-r--r--doc/src/snippets/qsvgwidget/qsvgwidget.qrc5
-rw-r--r--doc/src/snippets/qsvgwidget/spheres.svg79
-rw-r--r--doc/src/snippets/qsvgwidget/sunflower.svg188
-rw-r--r--doc/src/snippets/qt-namespace/main.cpp47
-rw-r--r--doc/src/snippets/qt-namespace/qt-namespace.pro1
-rw-r--r--doc/src/snippets/qtablewidget-dnd/Images/cubed.pngbin0 -> 437 bytes-rw-r--r--doc/src/snippets/qtablewidget-dnd/Images/squared.pngbin0 -> 440 bytes-rw-r--r--doc/src/snippets/qtablewidget-dnd/images.qrc6
-rw-r--r--doc/src/snippets/qtablewidget-dnd/main.cpp52
-rw-r--r--doc/src/snippets/qtablewidget-dnd/mainwindow.cpp144
-rw-r--r--doc/src/snippets/qtablewidget-dnd/mainwindow.h69
-rw-r--r--doc/src/snippets/qtablewidget-dnd/qtablewidget-dnd.pro4
-rw-r--r--doc/src/snippets/qtablewidget-resizing/main.cpp52
-rw-r--r--doc/src/snippets/qtablewidget-resizing/mainwindow.cpp116
-rw-r--r--doc/src/snippets/qtablewidget-resizing/mainwindow.h68
-rw-r--r--doc/src/snippets/qtablewidget-resizing/qtablewidget-resizing.pro3
-rw-r--r--doc/src/snippets/qtablewidget-using/Images/cubed.pngbin0 -> 437 bytes-rw-r--r--doc/src/snippets/qtablewidget-using/Images/squared.pngbin0 -> 440 bytes-rw-r--r--doc/src/snippets/qtablewidget-using/images.qrc6
-rw-r--r--doc/src/snippets/qtablewidget-using/main.cpp52
-rw-r--r--doc/src/snippets/qtablewidget-using/mainwindow.cpp151
-rw-r--r--doc/src/snippets/qtablewidget-using/mainwindow.h71
-rw-r--r--doc/src/snippets/qtablewidget-using/qtablewidget-using.pro4
-rw-r--r--doc/src/snippets/qtcast/qtcast.cpp80
-rw-r--r--doc/src/snippets/qtcast/qtcast.h55
-rw-r--r--doc/src/snippets/qtcast/qtcast.pro2
-rw-r--r--doc/src/snippets/qtest-namespace/main.cpp48
-rw-r--r--doc/src/snippets/qtest-namespace/qtest-namespace.pro2
-rw-r--r--doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp147
-rw-r--r--doc/src/snippets/qtreeview-dnd/dragdropmodel.h73
-rw-r--r--doc/src/snippets/qtreeview-dnd/main.cpp52
-rw-r--r--doc/src/snippets/qtreeview-dnd/mainwindow.cpp91
-rw-r--r--doc/src/snippets/qtreeview-dnd/mainwindow.h62
-rw-r--r--doc/src/snippets/qtreeview-dnd/qtreeview-dnd.pro9
-rw-r--r--doc/src/snippets/qtreeview-dnd/treeitem.cpp126
-rw-r--r--doc/src/snippets/qtreeview-dnd/treeitem.h72
-rw-r--r--doc/src/snippets/qtreeview-dnd/treemodel.cpp263
-rw-r--r--doc/src/snippets/qtreeview-dnd/treemodel.h80
-rw-r--r--doc/src/snippets/qtreewidget-using/main.cpp52
-rw-r--r--doc/src/snippets/qtreewidget-using/mainwindow.cpp231
-rw-r--r--doc/src/snippets/qtreewidget-using/mainwindow.h78
-rw-r--r--doc/src/snippets/qtreewidget-using/qtreewidget-using.pro3
-rw-r--r--doc/src/snippets/qtreewidgetitemiterator-using/main.cpp52
-rw-r--r--doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp198
-rw-r--r--doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h78
-rw-r--r--doc/src/snippets/qtreewidgetitemiterator-using/qtreewidgetitemiterator-using.pro3
-rw-r--r--doc/src/snippets/qtscript/evaluation/evaluation.pro2
-rw-r--r--doc/src/snippets/qtscript/evaluation/main.cpp51
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/main.cpp57
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/myobject.cpp54
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/myobject.h58
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/registeringobjects.pro4
-rw-r--r--doc/src/snippets/qtscript/registeringvalues/main.cpp53
-rw-r--r--doc/src/snippets/qtscript/registeringvalues/registeringvalues.pro2
-rw-r--r--doc/src/snippets/qtscript/scriptedslot/main.cpp73
-rw-r--r--doc/src/snippets/qtscript/scriptedslot/object.js18
-rw-r--r--doc/src/snippets/qtscript/scriptedslot/scriptedslot.pro3
-rw-r--r--doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc5
-rw-r--r--doc/src/snippets/quiloader/main.cpp71
-rw-r--r--doc/src/snippets/quiloader/myform.ui130
-rw-r--r--doc/src/snippets/quiloader/mywidget.cpp61
-rw-r--r--doc/src/snippets/quiloader/mywidget.h53
-rw-r--r--doc/src/snippets/quiloader/mywidget.qrc5
-rw-r--r--doc/src/snippets/quiloader/quiloader.pro4
-rw-r--r--doc/src/snippets/qx11embedcontainer/main.cpp68
-rw-r--r--doc/src/snippets/qx11embedcontainer/qx11embedcontainer.pro1
-rw-r--r--doc/src/snippets/qx11embedwidget/embedwidget.cpp67
-rw-r--r--doc/src/snippets/qx11embedwidget/embedwidget.h66
-rw-r--r--doc/src/snippets/qx11embedwidget/main.cpp62
-rw-r--r--doc/src/snippets/qx11embedwidget/qx11embedwidget.pro3
-rw-r--r--doc/src/snippets/qxmlquery/bindingExample.cpp9
-rw-r--r--doc/src/snippets/qxmlstreamwriter/main.cpp77
-rw-r--r--doc/src/snippets/qxmlstreamwriter/qxmlstreamwriter.pro2
-rw-r--r--doc/src/snippets/reading-selections/main.cpp60
-rw-r--r--doc/src/snippets/reading-selections/model.cpp239
-rw-r--r--doc/src/snippets/reading-selections/model.h75
-rw-r--r--doc/src/snippets/reading-selections/reading-selections.pro2
-rw-r--r--doc/src/snippets/reading-selections/window.cpp121
-rw-r--r--doc/src/snippets/reading-selections/window.h68
-rw-r--r--doc/src/snippets/scribe-overview/main.cpp74
-rw-r--r--doc/src/snippets/scribe-overview/scribe-overview.pro1
-rw-r--r--doc/src/snippets/scriptdebugger.cpp64
-rw-r--r--doc/src/snippets/seekslider.cpp26
-rw-r--r--doc/src/snippets/separations/finalwidget.cpp127
-rw-r--r--doc/src/snippets/separations/finalwidget.h78
-rw-r--r--doc/src/snippets/separations/main.cpp51
-rw-r--r--doc/src/snippets/separations/screenwidget.cpp218
-rw-r--r--doc/src/snippets/separations/screenwidget.h87
-rw-r--r--doc/src/snippets/separations/separations.pro7
-rw-r--r--doc/src/snippets/separations/separations.qdoc55
-rw-r--r--doc/src/snippets/separations/viewer.cpp329
-rw-r--r--doc/src/snippets/separations/viewer.h90
-rw-r--r--doc/src/snippets/settings/settings.cpp185
-rw-r--r--doc/src/snippets/shareddirmodel/main.cpp81
-rw-r--r--doc/src/snippets/shareddirmodel/shareddirmodel.pro1
-rw-r--r--doc/src/snippets/sharedemployee/employee.cpp42
-rw-r--r--doc/src/snippets/sharedemployee/employee.h95
-rw-r--r--doc/src/snippets/sharedemployee/main.cpp51
-rw-r--r--doc/src/snippets/sharedemployee/sharedemployee.pro3
-rw-r--r--doc/src/snippets/sharedtablemodel/main.cpp90
-rw-r--r--doc/src/snippets/sharedtablemodel/model.cpp237
-rw-r--r--doc/src/snippets/sharedtablemodel/model.h75
-rw-r--r--doc/src/snippets/sharedtablemodel/sharedtablemodel.pro2
-rw-r--r--doc/src/snippets/signalmapper/accountsfile.txt1
-rw-r--r--doc/src/snippets/signalmapper/filereader.cpp59
-rw-r--r--doc/src/snippets/signalmapper/filereader.h28
-rw-r--r--doc/src/snippets/signalmapper/main.cpp13
-rw-r--r--doc/src/snippets/signalmapper/reportfile.txt2
-rw-r--r--doc/src/snippets/signalmapper/signalmapper.pro12
-rw-r--r--doc/src/snippets/signalmapper/taxfile.txt1
-rw-r--r--doc/src/snippets/signalsandslots/lcdnumber.cpp78
-rw-r--r--doc/src/snippets/signalsandslots/lcdnumber.h89
-rw-r--r--doc/src/snippets/signalsandslots/signalsandslots.cpp85
-rw-r--r--doc/src/snippets/signalsandslots/signalsandslots.h90
-rw-r--r--doc/src/snippets/simplemodel-use/main.cpp96
-rw-r--r--doc/src/snippets/simplemodel-use/simplemodel-use.pro1
-rw-r--r--doc/src/snippets/snippets.pro109
-rw-r--r--doc/src/snippets/splitter/splitter.cpp85
-rw-r--r--doc/src/snippets/splitter/splitter.pro1
-rw-r--r--doc/src/snippets/splitterhandle/main.cpp58
-rw-r--r--doc/src/snippets/splitterhandle/splitter.cpp79
-rw-r--r--doc/src/snippets/splitterhandle/splitter.h74
-rw-r--r--doc/src/snippets/splitterhandle/splitterhandle.pro3
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.cpp560
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.pro2
-rw-r--r--doc/src/snippets/streaming/main.cpp109
-rw-r--r--doc/src/snippets/streaming/streaming.pro2
-rw-r--r--doc/src/snippets/stringlistmodel/main.cpp84
-rw-r--r--doc/src/snippets/stringlistmodel/model.cpp182
-rw-r--r--doc/src/snippets/stringlistmodel/model.h83
-rw-r--r--doc/src/snippets/stringlistmodel/stringlistmodel.pro3
-rw-r--r--doc/src/snippets/styles/styles.cpp92
-rw-r--r--doc/src/snippets/stylesheet/common-mistakes.cpp12
-rw-r--r--doc/src/snippets/textblock-formats/main.cpp119
-rw-r--r--doc/src/snippets/textblock-formats/textblock-formats.pro2
-rw-r--r--doc/src/snippets/textblock-fragments/main.cpp53
-rw-r--r--doc/src/snippets/textblock-fragments/mainwindow.cpp149
-rw-r--r--doc/src/snippets/textblock-fragments/mainwindow.h66
-rw-r--r--doc/src/snippets/textblock-fragments/textblock-fragments.pro6
-rw-r--r--doc/src/snippets/textblock-fragments/xmlwriter.cpp119
-rw-r--r--doc/src/snippets/textblock-fragments/xmlwriter.h65
-rw-r--r--doc/src/snippets/textdocument-blocks/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-blocks/mainwindow.cpp157
-rw-r--r--doc/src/snippets/textdocument-blocks/mainwindow.h66
-rw-r--r--doc/src/snippets/textdocument-blocks/textdocument-blocks.pro6
-rw-r--r--doc/src/snippets/textdocument-blocks/xmlwriter.cpp85
-rw-r--r--doc/src/snippets/textdocument-blocks/xmlwriter.h62
-rw-r--r--doc/src/snippets/textdocument-charformats/main.cpp93
-rw-r--r--doc/src/snippets/textdocument-charformats/textdocument-charformats.pro1
-rw-r--r--doc/src/snippets/textdocument-css/main.cpp60
-rw-r--r--doc/src/snippets/textdocument-css/textdocument-css.pro1
-rw-r--r--doc/src/snippets/textdocument-cursors/main.cpp80
-rw-r--r--doc/src/snippets/textdocument-cursors/textdocument-cursors.pro1
-rw-r--r--doc/src/snippets/textdocument-find/main.cpp92
-rw-r--r--doc/src/snippets/textdocument-find/textdocument-find.pro1
-rw-r--r--doc/src/snippets/textdocument-frames/main.cpp54
-rw-r--r--doc/src/snippets/textdocument-frames/mainwindow.cpp162
-rw-r--r--doc/src/snippets/textdocument-frames/mainwindow.h65
-rw-r--r--doc/src/snippets/textdocument-frames/textdocument-frames.pro6
-rw-r--r--doc/src/snippets/textdocument-frames/xmlwriter.cpp117
-rw-r--r--doc/src/snippets/textdocument-frames/xmlwriter.h65
-rw-r--r--doc/src/snippets/textdocument-imagedrop/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-imagedrop/textdocument-imagedrop.pro2
-rw-r--r--doc/src/snippets/textdocument-imagedrop/textedit.cpp72
-rw-r--r--doc/src/snippets/textdocument-imagedrop/textedit.h57
-rw-r--r--doc/src/snippets/textdocument-imageformat/images.qrc6
-rw-r--r--doc/src/snippets/textdocument-imageformat/images/advert.pngbin0 -> 16291 bytes-rw-r--r--doc/src/snippets/textdocument-imageformat/images/newimage.pngbin0 -> 5490 bytes-rw-r--r--doc/src/snippets/textdocument-imageformat/main.cpp99
-rw-r--r--doc/src/snippets/textdocument-imageformat/textdocument-imageformat.pro2
-rw-r--r--doc/src/snippets/textdocument-images/images.qrc5
-rw-r--r--doc/src/snippets/textdocument-images/images/advert.pngbin0 -> 16291 bytes-rw-r--r--doc/src/snippets/textdocument-images/main.cpp73
-rw-r--r--doc/src/snippets/textdocument-images/textdocument-images.pro2
-rw-r--r--doc/src/snippets/textdocument-listitems/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-listitems/mainwindow.cpp198
-rw-r--r--doc/src/snippets/textdocument-listitems/mainwindow.h76
-rw-r--r--doc/src/snippets/textdocument-listitems/textdocument-listitems.pro3
-rw-r--r--doc/src/snippets/textdocument-lists/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-lists/mainwindow.cpp193
-rw-r--r--doc/src/snippets/textdocument-lists/mainwindow.h80
-rw-r--r--doc/src/snippets/textdocument-lists/textdocument-lists.pro3
-rw-r--r--doc/src/snippets/textdocument-printing/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-printing/mainwindow.cpp125
-rw-r--r--doc/src/snippets/textdocument-printing/mainwindow.h73
-rw-r--r--doc/src/snippets/textdocument-printing/textdocument-printing.pro3
-rw-r--r--doc/src/snippets/textdocument-resources/main.cpp84
-rw-r--r--doc/src/snippets/textdocument-resources/textdocument-resources.pro1
-rw-r--r--doc/src/snippets/textdocument-selections/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-selections/mainwindow.cpp204
-rw-r--r--doc/src/snippets/textdocument-selections/mainwindow.h80
-rw-r--r--doc/src/snippets/textdocument-selections/textdocument-selections.pro4
-rw-r--r--doc/src/snippets/textdocument-tables/main.cpp53
-rw-r--r--doc/src/snippets/textdocument-tables/mainwindow.cpp205
-rw-r--r--doc/src/snippets/textdocument-tables/mainwindow.h66
-rw-r--r--doc/src/snippets/textdocument-tables/textdocument-tables.pro6
-rw-r--r--doc/src/snippets/textdocument-tables/xmlwriter.cpp154
-rw-r--r--doc/src/snippets/textdocument-tables/xmlwriter.h65
-rw-r--r--doc/src/snippets/textdocument-texttable/main.cpp85
-rw-r--r--doc/src/snippets/textdocumentendsnippet.cpp57
-rw-r--r--doc/src/snippets/threads/threads.cpp121
-rw-r--r--doc/src/snippets/threads/threads.h52
-rw-r--r--doc/src/snippets/timeline/main.cpp73
-rw-r--r--doc/src/snippets/timeline/timeline.pro1
-rw-r--r--doc/src/snippets/timers/timers.cpp79
-rw-r--r--doc/src/snippets/timers/timers.pro1
-rw-r--r--doc/src/snippets/transform/main.cpp141
-rw-r--r--doc/src/snippets/transform/transform.pro1
-rw-r--r--doc/src/snippets/uitools/calculatorform/calculatorform.pro5
-rw-r--r--doc/src/snippets/uitools/calculatorform/calculatorform.ui303
-rw-r--r--doc/src/snippets/uitools/calculatorform/main.cpp58
-rw-r--r--doc/src/snippets/updating-selections/main.cpp60
-rw-r--r--doc/src/snippets/updating-selections/model.cpp237
-rw-r--r--doc/src/snippets/updating-selections/model.h75
-rw-r--r--doc/src/snippets/updating-selections/updating-selections.pro2
-rw-r--r--doc/src/snippets/updating-selections/window.cpp110
-rw-r--r--doc/src/snippets/updating-selections/window.h68
-rw-r--r--doc/src/snippets/videomedia.cpp19
-rw-r--r--doc/src/snippets/volumeslider.cpp29
-rw-r--r--doc/src/snippets/webkit/simple/main.cpp56
-rw-r--r--doc/src/snippets/webkit/simple/simple.pro2
-rw-r--r--doc/src/snippets/webkit/webpage/main.cpp62
-rw-r--r--doc/src/snippets/webkit/webpage/webpage.pro3
-rw-r--r--doc/src/snippets/whatsthis/whatsthis.cpp65
-rw-r--r--doc/src/snippets/whatsthis/whatsthis.pro1
-rw-r--r--doc/src/snippets/widget-mask/main.cpp55
-rw-r--r--doc/src/snippets/widget-mask/mask.qrc5
-rw-r--r--doc/src/snippets/widget-mask/tux.pngbin0 -> 12191 bytes-rw-r--r--doc/src/snippets/widget-mask/widget-mask.pro3
-rw-r--r--doc/src/snippets/widgetdelegate.cpp27
-rw-r--r--doc/src/snippets/widgets-tutorial/childwidget/childwidget.pro1
-rw-r--r--doc/src/snippets/widgets-tutorial/childwidget/main.cpp17
-rw-r--r--doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp48
-rw-r--r--doc/src/snippets/widgets-tutorial/nestedlayouts/nestedlayouts.pro1
-rw-r--r--doc/src/snippets/widgets-tutorial/toplevel/main.cpp13
-rw-r--r--doc/src/snippets/widgets-tutorial/toplevel/toplevel.pro1
-rw-r--r--doc/src/snippets/widgets-tutorial/windowlayout/main.cpp19
-rw-r--r--doc/src/snippets/widgets-tutorial/windowlayout/windowlayout.pro1
-rw-r--r--doc/src/snippets/xml/prettyprint/main.cpp144
-rw-r--r--doc/src/snippets/xml/prettyprint/prettyprint.pro4
-rw-r--r--doc/src/snippets/xml/rsslisting/handler.cpp183
-rw-r--r--doc/src/snippets/xml/rsslisting/handler.h75
-rw-r--r--doc/src/snippets/xml/rsslisting/main.cpp64
-rw-r--r--doc/src/snippets/xml/rsslisting/rsslisting.cpp252
-rw-r--r--doc/src/snippets/xml/rsslisting/rsslisting.h87
-rw-r--r--doc/src/snippets/xml/simpleparse/handler.cpp139
-rw-r--r--doc/src/snippets/xml/simpleparse/handler.h68
-rw-r--r--doc/src/snippets/xml/simpleparse/main.cpp88
-rw-r--r--doc/src/snippets/xml/simpleparse/simpleparse.pro4
-rw-r--r--doc/src/snippets/xml/xml.pro8
-rw-r--r--doc/src/sql-driver.qdoc762
-rw-r--r--doc/src/styles.qdoc2059
-rw-r--r--doc/src/stylesheet.qdoc3964
-rw-r--r--doc/src/tech-preview/images/mainwindow-docks-example.pngbin0 -> 14427 bytes-rw-r--r--doc/src/tech-preview/images/mainwindow-docks.pngbin0 -> 10168 bytes-rw-r--r--doc/src/tech-preview/images/plaintext-layout.pngbin0 -> 40981 bytes-rw-r--r--doc/src/tech-preview/known-issues.html110
-rw-r--r--doc/src/templates.qdoc230
-rw-r--r--doc/src/threads.qdoc609
-rw-r--r--doc/src/timers.qdoc136
-rw-r--r--doc/src/tools-list.qdoc87
-rw-r--r--doc/src/topics.qdoc304
-rw-r--r--doc/src/trademarks.qdoc75
-rw-r--r--doc/src/trolltech-webpages.qdoc245
-rw-r--r--doc/src/tutorials/addressbook-fr.qdoc1064
-rw-r--r--doc/src/tutorials/addressbook-sdk.qdoc179
-rw-r--r--doc/src/tutorials/addressbook.qdoc1006
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc193
-rw-r--r--doc/src/uic.qdoc89
-rw-r--r--doc/src/unicode.qdoc165
-rw-r--r--doc/src/unix-signal-handlers.qdoc103
-rw-r--r--doc/src/wince-customization.qdoc264
-rw-r--r--doc/src/wince-introduction.qdoc110
-rw-r--r--doc/src/wince-opengl.qdoc98
-rw-r--r--doc/src/winsystem.qdoc99
-rw-r--r--doc/src/xquery-introduction.qdoc1024
-rw-r--r--examples/README39
-rw-r--r--examples/activeqt/README39
-rw-r--r--examples/activeqt/activeqt.pro20
-rw-r--r--examples/activeqt/comapp/comapp.pro13
-rw-r--r--examples/activeqt/comapp/comapp.rc1
-rw-r--r--examples/activeqt/comapp/main.cpp272
-rw-r--r--examples/activeqt/dotnet/walkthrough/Form1.cs127
-rw-r--r--examples/activeqt/dotnet/walkthrough/Form1.resx131
-rw-r--r--examples/activeqt/dotnet/walkthrough/Form1.vb88
-rw-r--r--examples/activeqt/dotnet/walkthrough/csharp.csproj143
-rw-r--r--examples/activeqt/dotnet/walkthrough/vb.vbproj147
-rw-r--r--examples/activeqt/dotnet/wrapper/app.csproj93
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/lib.vcproj149
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/networker.cpp70
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/networker.h67
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/tools.cpp61
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/tools.h54
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/worker.cpp59
-rw-r--r--examples/activeqt/dotnet/wrapper/lib/worker.h69
-rw-r--r--examples/activeqt/dotnet/wrapper/main.cs40
-rw-r--r--examples/activeqt/dotnet/wrapper/wrapper.sln28
-rw-r--r--examples/activeqt/hierarchy/hierarchy.inf9
-rw-r--r--examples/activeqt/hierarchy/hierarchy.pro16
-rw-r--r--examples/activeqt/hierarchy/main.cpp50
-rw-r--r--examples/activeqt/hierarchy/objects.cpp108
-rw-r--r--examples/activeqt/hierarchy/objects.h100
-rw-r--r--examples/activeqt/menus/fileopen.xpm22
-rw-r--r--examples/activeqt/menus/filesave.xpm22
-rw-r--r--examples/activeqt/menus/main.cpp64
-rw-r--r--examples/activeqt/menus/menus.cpp178
-rw-r--r--examples/activeqt/menus/menus.h76
-rw-r--r--examples/activeqt/menus/menus.inf9
-rw-r--r--examples/activeqt/menus/menus.pro14
-rw-r--r--examples/activeqt/multiple/ax1.h87
-rw-r--r--examples/activeqt/multiple/ax2.h94
-rw-r--r--examples/activeqt/multiple/main.cpp53
-rw-r--r--examples/activeqt/multiple/multiple.inf9
-rw-r--r--examples/activeqt/multiple/multiple.pro16
-rw-r--r--examples/activeqt/multiple/multipleax.rc32
-rw-r--r--examples/activeqt/opengl/glbox.cpp250
-rw-r--r--examples/activeqt/opengl/glbox.h90
-rw-r--r--examples/activeqt/opengl/globjwin.cpp111
-rw-r--r--examples/activeqt/opengl/globjwin.h62
-rw-r--r--examples/activeqt/opengl/main.cpp91
-rw-r--r--examples/activeqt/opengl/opengl.inf9
-rw-r--r--examples/activeqt/opengl/opengl.pro19
-rw-r--r--examples/activeqt/qutlook/addressview.cpp289
-rw-r--r--examples/activeqt/qutlook/addressview.h79
-rw-r--r--examples/activeqt/qutlook/fileopen.xpm22
-rw-r--r--examples/activeqt/qutlook/fileprint.xpm24
-rw-r--r--examples/activeqt/qutlook/filesave.xpm22
-rw-r--r--examples/activeqt/qutlook/main.cpp56
-rw-r--r--examples/activeqt/qutlook/qutlook.pro23
-rw-r--r--examples/activeqt/simple/main.cpp137
-rw-r--r--examples/activeqt/simple/simple.inf11
-rw-r--r--examples/activeqt/simple/simple.pro13
-rw-r--r--examples/activeqt/webbrowser/main.cpp189
-rw-r--r--examples/activeqt/webbrowser/mainwindow.ui306
-rw-r--r--examples/activeqt/webbrowser/webaxwidget.h67
-rw-r--r--examples/activeqt/webbrowser/webbrowser.pro17
-rw-r--r--examples/activeqt/webbrowser/wincemainwindow.ui299
-rw-r--r--examples/activeqt/wrapper/main.cpp161
-rw-r--r--examples/activeqt/wrapper/wrapper.inf9
-rw-r--r--examples/activeqt/wrapper/wrapper.pro15
-rw-r--r--examples/activeqt/wrapper/wrapperax.rc32
-rw-r--r--examples/assistant/README38
-rw-r--r--examples/assistant/assistant.pro8
-rw-r--r--examples/assistant/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/assistant/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/assistant/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/assistant/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/browse.pngbin0 -> 21553 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.pngbin0 -> 9589 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/filedialog.pngbin0 -> 12318 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/handbook.pngbin0 -> 1060 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/mainwindow.pngbin0 -> 12769 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/open.pngbin0 -> 11697 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/wildcard.pngbin0 -> 11266 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/index.html41
-rw-r--r--examples/assistant/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/assistant/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/assistant/simpletextviewer/documentation/simpletextviewer.adp40
-rw-r--r--examples/assistant/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp221
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/assistant/simpletextviewer/main.cpp52
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp154
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h91
-rw-r--r--examples/assistant/simpletextviewer/simpletextviewer.pro16
-rw-r--r--examples/dbus/complexpingpong/complexping.cpp118
-rw-r--r--examples/dbus/complexpingpong/complexping.h59
-rw-r--r--examples/dbus/complexpingpong/complexping.pro16
-rw-r--r--examples/dbus/complexpingpong/complexpingpong.pro4
-rw-r--r--examples/dbus/complexpingpong/complexpong.cpp105
-rw-r--r--examples/dbus/complexpingpong/complexpong.h68
-rw-r--r--examples/dbus/complexpingpong/complexpong.pro16
-rw-r--r--examples/dbus/complexpingpong/ping-common.h42
-rw-r--r--examples/dbus/dbus-chat/chat.cpp164
-rw-r--r--examples/dbus/dbus-chat/chat.h82
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.cpp35
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.h57
-rw-r--r--examples/dbus/dbus-chat/chat_interface.cpp25
-rw-r--r--examples/dbus/dbus-chat/chat_interface.h49
-rw-r--r--examples/dbus/dbus-chat/chatmainwindow.ui185
-rw-r--r--examples/dbus/dbus-chat/chatsetnickname.ui149
-rw-r--r--examples/dbus/dbus-chat/com.trolltech.chat.xml15
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.pro19
-rw-r--r--examples/dbus/dbus.pro12
-rw-r--r--examples/dbus/listnames/listnames.cpp92
-rw-r--r--examples/dbus/listnames/listnames.pro17
-rw-r--r--examples/dbus/pingpong/ping-common.h42
-rw-r--r--examples/dbus/pingpong/ping.cpp75
-rw-r--r--examples/dbus/pingpong/ping.pro16
-rw-r--r--examples/dbus/pingpong/pingpong.pro4
-rw-r--r--examples/dbus/pingpong/pong.cpp80
-rw-r--r--examples/dbus/pingpong/pong.h54
-rw-r--r--examples/dbus/pingpong/pong.pro16
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.cpp138
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.h76
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.pro20
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.xml11
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.cpp59
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor_p.h57
-rw-r--r--examples/dbus/remotecontrolledcar/car/main.cpp73
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car.xml11
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.cpp26
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface_p.h74
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.cpp83
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.h71
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro21
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.ui64
-rw-r--r--examples/dbus/remotecontrolledcar/controller/main.cpp53
-rw-r--r--examples/dbus/remotecontrolledcar/remotecontrolledcar.pro8
-rw-r--r--examples/designer/README37
-rw-r--r--examples/designer/calculatorbuilder/calculatorbuilder.pro14
-rw-r--r--examples/designer/calculatorbuilder/calculatorbuilder.qrc5
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.cpp92
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.h71
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.ui303
-rw-r--r--examples/designer/calculatorbuilder/main.cpp54
-rw-r--r--examples/designer/calculatorform/calculatorform.cpp66
-rw-r--r--examples/designer/calculatorform/calculatorform.h66
-rw-r--r--examples/designer/calculatorform/calculatorform.pro13
-rw-r--r--examples/designer/calculatorform/calculatorform.ui284
-rw-r--r--examples/designer/calculatorform/main.cpp53
-rw-r--r--examples/designer/containerextension/containerextension.pro26
-rw-r--r--examples/designer/containerextension/multipagewidget.cpp131
-rw-r--r--examples/designer/containerextension/multipagewidget.h88
-rw-r--r--examples/designer/containerextension/multipagewidgetcontainerextension.cpp101
-rw-r--r--examples/designer/containerextension/multipagewidgetcontainerextension.h75
-rw-r--r--examples/designer/containerextension/multipagewidgetextensionfactory.cpp65
-rw-r--r--examples/designer/containerextension/multipagewidgetextensionfactory.h64
-rw-r--r--examples/designer/containerextension/multipagewidgetplugin.cpp197
-rw-r--r--examples/designer/containerextension/multipagewidgetplugin.h81
-rw-r--r--examples/designer/customwidgetplugin/analogclock.cpp111
-rw-r--r--examples/designer/customwidgetplugin/analogclock.h59
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.cpp156
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.h73
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.pro21
-rw-r--r--examples/designer/designer.pro19
-rw-r--r--examples/designer/taskmenuextension/taskmenuextension.pro25
-rw-r--r--examples/designer/taskmenuextension/tictactoe.cpp176
-rw-r--r--examples/designer/taskmenuextension/tictactoe.h83
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.cpp99
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.h73
-rw-r--r--examples/designer/taskmenuextension/tictactoeplugin.cpp142
-rw-r--r--examples/designer/taskmenuextension/tictactoeplugin.h78
-rw-r--r--examples/designer/taskmenuextension/tictactoetaskmenu.cpp104
-rw-r--r--examples/designer/taskmenuextension/tictactoetaskmenu.h88
-rw-r--r--examples/designer/worldtimeclockbuilder/form.ui162
-rw-r--r--examples/designer/worldtimeclockbuilder/main.cpp70
-rw-r--r--examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro11
-rw-r--r--examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc5
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclock.cpp122
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclock.h73
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp124
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.h74
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro21
-rw-r--r--examples/desktop/README41
-rw-r--r--examples/desktop/desktop.pro11
-rw-r--r--examples/desktop/screenshot/main.cpp52
-rw-r--r--examples/desktop/screenshot/screenshot.cpp198
-rw-r--r--examples/desktop/screenshot/screenshot.h100
-rw-r--r--examples/desktop/screenshot/screenshot.pro9
-rw-r--r--examples/desktop/systray/images/bad.svg64
-rw-r--r--examples/desktop/systray/images/heart.svg55
-rw-r--r--examples/desktop/systray/images/trash.svg58
-rw-r--r--examples/desktop/systray/main.cpp63
-rw-r--r--examples/desktop/systray/systray.pro22
-rw-r--r--examples/desktop/systray/systray.qrc7
-rw-r--r--examples/desktop/systray/window.cpp259
-rw-r--r--examples/desktop/systray/window.h113
-rw-r--r--examples/dialogs/README40
-rw-r--r--examples/dialogs/classwizard/classwizard.cpp431
-rw-r--r--examples/dialogs/classwizard/classwizard.h157
-rw-r--r--examples/dialogs/classwizard/classwizard.pro10
-rw-r--r--examples/dialogs/classwizard/classwizard.qrc11
-rw-r--r--examples/dialogs/classwizard/images/background.pngbin0 -> 22578 bytes-rw-r--r--examples/dialogs/classwizard/images/banner.pngbin0 -> 3947 bytes-rw-r--r--examples/dialogs/classwizard/images/logo1.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/logo2.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/logo3.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/watermark1.pngbin0 -> 14516 bytes-rw-r--r--examples/dialogs/classwizard/images/watermark2.pngbin0 -> 14912 bytes-rw-r--r--examples/dialogs/classwizard/main.cpp64
-rw-r--r--examples/dialogs/configdialog/configdialog.cpp117
-rw-r--r--examples/dialogs/configdialog/configdialog.h70
-rw-r--r--examples/dialogs/configdialog/configdialog.pro14
-rw-r--r--examples/dialogs/configdialog/configdialog.qrc7
-rw-r--r--examples/dialogs/configdialog/images/config.pngbin0 -> 6758 bytes-rw-r--r--examples/dialogs/configdialog/images/query.pngbin0 -> 2116 bytes-rw-r--r--examples/dialogs/configdialog/images/update.pngbin0 -> 7890 bytes-rw-r--r--examples/dialogs/configdialog/main.cpp53
-rw-r--r--examples/dialogs/configdialog/pages.cpp152
-rw-r--r--examples/dialogs/configdialog/pages.h65
-rw-r--r--examples/dialogs/dialogs.pro17
-rw-r--r--examples/dialogs/extension/extension.pro9
-rw-r--r--examples/dialogs/extension/finddialog.cpp113
-rw-r--r--examples/dialogs/extension/finddialog.h79
-rw-r--r--examples/dialogs/extension/main.cpp51
-rw-r--r--examples/dialogs/findfiles/findfiles.pro9
-rw-r--r--examples/dialogs/findfiles/main.cpp52
-rw-r--r--examples/dialogs/findfiles/window.cpp250
-rw-r--r--examples/dialogs/findfiles/window.h91
-rw-r--r--examples/dialogs/licensewizard/images/logo.pngbin0 -> 1810 bytes-rw-r--r--examples/dialogs/licensewizard/images/watermark.pngbin0 -> 34998 bytes-rw-r--r--examples/dialogs/licensewizard/licensewizard.cpp360
-rw-r--r--examples/dialogs/licensewizard/licensewizard.h164
-rw-r--r--examples/dialogs/licensewizard/licensewizard.pro10
-rw-r--r--examples/dialogs/licensewizard/licensewizard.qrc6
-rw-r--r--examples/dialogs/licensewizard/main.cpp64
-rw-r--r--examples/dialogs/sipdialog/dialog.cpp124
-rw-r--r--examples/dialogs/sipdialog/dialog.h64
-rw-r--r--examples/dialogs/sipdialog/main.cpp53
-rw-r--r--examples/dialogs/sipdialog/sipdialog.pro12
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp390
-rw-r--r--examples/dialogs/standarddialogs/dialog.h99
-rw-r--r--examples/dialogs/standarddialogs/main.cpp61
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.pro11
-rw-r--r--examples/dialogs/tabdialog/main.cpp58
-rw-r--r--examples/dialogs/tabdialog/tabdialog.cpp196
-rw-r--r--examples/dialogs/tabdialog/tabdialog.h100
-rw-r--r--examples/dialogs/tabdialog/tabdialog.pro10
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.cpp136
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.pro7
-rw-r--r--examples/draganddrop/README40
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.pro14
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.qrc6
-rw-r--r--examples/draganddrop/delayedencoding/images/drag.pngbin0 -> 977 bytes-rw-r--r--examples/draganddrop/delayedencoding/images/example.svg59
-rw-r--r--examples/draganddrop/delayedencoding/main.cpp52
-rw-r--r--examples/draganddrop/delayedencoding/mimedata.cpp66
-rw-r--r--examples/draganddrop/delayedencoding/mimedata.h64
-rw-r--r--examples/draganddrop/delayedencoding/sourcewidget.cpp115
-rw-r--r--examples/draganddrop/delayedencoding/sourcewidget.h71
-rw-r--r--examples/draganddrop/draganddrop.pro15
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.pro10
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.qrc7
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.cpp169
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.h66
-rw-r--r--examples/draganddrop/draggableicons/images/boat.pngbin0 -> 2772 bytes-rw-r--r--examples/draganddrop/draggableicons/images/car.pngbin0 -> 2963 bytes-rw-r--r--examples/draganddrop/draggableicons/images/house.pngbin0 -> 3292 bytes-rw-r--r--examples/draganddrop/draggableicons/main.cpp62
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.pro12
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.qrc5
-rw-r--r--examples/draganddrop/draggabletext/draglabel.cpp52
-rw-r--r--examples/draganddrop/draggabletext/draglabel.h59
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp164
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.h63
-rw-r--r--examples/draganddrop/draggabletext/main.cpp53
-rw-r--r--examples/draganddrop/draggabletext/words.txt41
-rw-r--r--examples/draganddrop/dropsite/droparea.cpp127
-rw-r--r--examples/draganddrop/dropsite/droparea.h78
-rw-r--r--examples/draganddrop/dropsite/dropsite.pro12
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.cpp144
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.h78
-rw-r--r--examples/draganddrop/dropsite/main.cpp54
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.cpp90
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.h65
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp212
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.h66
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.pro12
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.qrc5
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp53
-rw-r--r--examples/draganddrop/fridgemagnets/words.txt48
-rw-r--r--examples/draganddrop/puzzle/example.jpgbin0 -> 42654 bytes-rw-r--r--examples/draganddrop/puzzle/main.cpp55
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp151
-rw-r--r--examples/draganddrop/puzzle/mainwindow.h77
-rw-r--r--examples/draganddrop/puzzle/pieceslist.cpp122
-rw-r--r--examples/draganddrop/puzzle/pieceslist.h62
-rw-r--r--examples/draganddrop/puzzle/puzzle.pro20
-rw-r--r--examples/draganddrop/puzzle/puzzle.qrc5
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.cpp205
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.h86
-rw-r--r--examples/examples.pro43
-rw-r--r--examples/graphicsview/README40
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro12
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc5
-rw-r--r--examples/graphicsview/basicgraphicslayouts/images/block.pngbin0 -> 2146 bytes-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.cpp99
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.h62
-rw-r--r--examples/graphicsview/basicgraphicslayouts/main.cpp59
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.cpp91
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.h58
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.pro14
-rw-r--r--examples/graphicsview/collidingmice/images/cheese.jpgbin0 -> 3029 bytes-rw-r--r--examples/graphicsview/collidingmice/main.cpp88
-rw-r--r--examples/graphicsview/collidingmice/mice.qrc5
-rw-r--r--examples/graphicsview/collidingmice/mouse.cpp200
-rw-r--r--examples/graphicsview/collidingmice/mouse.h72
-rw-r--r--examples/graphicsview/diagramscene/arrow.cpp147
-rw-r--r--examples/graphicsview/diagramscene/arrow.h94
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.cpp152
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.h97
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.cpp241
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.h113
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.pro20
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.qrc20
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.cpp82
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.h79
-rw-r--r--examples/graphicsview/diagramscene/images/background1.pngbin0 -> 112 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background2.pngbin0 -> 114 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background3.pngbin0 -> 116 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background4.pngbin0 -> 96 bytes-rw-r--r--examples/graphicsview/diagramscene/images/bold.pngbin0 -> 274 bytes-rw-r--r--examples/graphicsview/diagramscene/images/bringtofront.pngbin0 -> 293 bytes-rw-r--r--examples/graphicsview/diagramscene/images/delete.pngbin0 -> 831 bytes-rw-r--r--examples/graphicsview/diagramscene/images/floodfill.pngbin0 -> 282 bytes-rw-r--r--examples/graphicsview/diagramscene/images/italic.pngbin0 -> 247 bytes-rw-r--r--examples/graphicsview/diagramscene/images/linecolor.pngbin0 -> 145 bytes-rw-r--r--examples/graphicsview/diagramscene/images/linepointer.pngbin0 -> 141 bytes-rw-r--r--examples/graphicsview/diagramscene/images/pointer.pngbin0 -> 173 bytes-rw-r--r--examples/graphicsview/diagramscene/images/sendtoback.pngbin0 -> 318 bytes-rw-r--r--examples/graphicsview/diagramscene/images/textpointer.pngbin0 -> 753 bytes-rw-r--r--examples/graphicsview/diagramscene/images/underline.pngbin0 -> 250 bytes-rw-r--r--examples/graphicsview/diagramscene/main.cpp56
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp651
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.h151
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.cpp129
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.h64
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.pro18
-rw-r--r--examples/graphicsview/dragdroprobot/images/head.pngbin0 -> 14972 bytes-rw-r--r--examples/graphicsview/dragdroprobot/main.cpp78
-rw-r--r--examples/graphicsview/dragdroprobot/robot.cpp273
-rw-r--r--examples/graphicsview/dragdroprobot/robot.h110
-rw-r--r--examples/graphicsview/dragdroprobot/robot.qrc5
-rw-r--r--examples/graphicsview/elasticnodes/edge.cpp144
-rw-r--r--examples/graphicsview/elasticnodes/edge.h78
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.pro16
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.cpp224
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.h71
-rw-r--r--examples/graphicsview/elasticnodes/main.cpp54
-rw-r--r--examples/graphicsview/elasticnodes/node.cpp185
-rw-r--r--examples/graphicsview/elasticnodes/node.h84
-rw-r--r--examples/graphicsview/graphicsview.pro18
-rw-r--r--examples/graphicsview/padnavigator/backside.ui208
-rw-r--r--examples/graphicsview/padnavigator/images/artsfftscope.pngbin0 -> 1291 bytes-rw-r--r--examples/graphicsview/padnavigator/images/blue_angle_swirl.jpgbin0 -> 11826 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_contacts.pngbin0 -> 4382 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_journal.pngbin0 -> 3261 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_mail.pngbin0 -> 3202 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_notes.pngbin0 -> 3893 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kopeteavailable.pngbin0 -> 2380 bytes-rw-r--r--examples/graphicsview/padnavigator/images/metacontact_online.pngbin0 -> 2545 bytes-rw-r--r--examples/graphicsview/padnavigator/images/minitools.pngbin0 -> 2087 bytes-rw-r--r--examples/graphicsview/padnavigator/main.cpp59
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.pro24
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.qrc14
-rw-r--r--examples/graphicsview/padnavigator/panel.cpp238
-rw-r--r--examples/graphicsview/padnavigator/panel.h92
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.cpp164
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.h83
-rw-r--r--examples/graphicsview/padnavigator/splashitem.cpp92
-rw-r--r--examples/graphicsview/padnavigator/splashitem.h63
-rw-r--r--examples/graphicsview/portedasteroids/animateditem.cpp95
-rw-r--r--examples/graphicsview/portedasteroids/animateditem.h84
-rw-r--r--examples/graphicsview/portedasteroids/bg.pngbin0 -> 3793 bytes-rw-r--r--examples/graphicsview/portedasteroids/ledmeter.cpp161
-rw-r--r--examples/graphicsview/portedasteroids/ledmeter.h96
-rw-r--r--examples/graphicsview/portedasteroids/main.cpp60
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.pro19
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.qrc163
-rw-r--r--examples/graphicsview/portedasteroids/sounds/Explosion.wavbin0 -> 18427 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites.h170
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits.pov31
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0000.pngbin0 -> 215 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0001.pngbin0 -> 236 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0002.pngbin0 -> 244 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0003.pngbin0 -> 277 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0004.pngbin0 -> 259 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0005.pngbin0 -> 251 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0006.pngbin0 -> 214 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0007.pngbin0 -> 177 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0008.pngbin0 -> 175 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0009.pngbin0 -> 221 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0010.pngbin0 -> 243 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0011.pngbin0 -> 272 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0012.pngbin0 -> 265 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0013.pngbin0 -> 253 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0014.pngbin0 -> 214 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0015.pngbin0 -> 196 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/exhaust/exhaust.pngbin0 -> 92 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/missile/missile.pngbin0 -> 89 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/brake.pngbin0 -> 151 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/energy.pngbin0 -> 134 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/shield.pngbin0 -> 171 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/shoot.pngbin0 -> 181 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/teleport.pngbin0 -> 160 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock1.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock1.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10000.pngbin0 -> 2502 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10001.pngbin0 -> 2483 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10002.pngbin0 -> 2519 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10003.pngbin0 -> 2460 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10004.pngbin0 -> 2486 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10005.pngbin0 -> 2416 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10006.pngbin0 -> 2419 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10007.pngbin0 -> 2374 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10008.pngbin0 -> 2329 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10009.pngbin0 -> 2227 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10010.pngbin0 -> 2218 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10011.pngbin0 -> 2178 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10012.pngbin0 -> 2172 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10013.pngbin0 -> 2229 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10014.pngbin0 -> 2270 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10015.pngbin0 -> 2348 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10016.pngbin0 -> 2402 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10017.pngbin0 -> 2489 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10018.pngbin0 -> 2530 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10019.pngbin0 -> 2591 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10020.pngbin0 -> 2540 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10021.pngbin0 -> 2606 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10022.pngbin0 -> 2591 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10023.pngbin0 -> 2566 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10024.pngbin0 -> 2512 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10025.pngbin0 -> 2456 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10026.pngbin0 -> 2420 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10027.pngbin0 -> 2557 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10028.pngbin0 -> 2567 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10029.pngbin0 -> 2572 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10030.pngbin0 -> 2620 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10031.pngbin0 -> 2558 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock2.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock2.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20000.pngbin0 -> 1338 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20001.pngbin0 -> 1363 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20002.pngbin0 -> 1385 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20003.pngbin0 -> 1389 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20004.pngbin0 -> 1361 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20005.pngbin0 -> 1393 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20006.pngbin0 -> 1361 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20007.pngbin0 -> 1369 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20008.pngbin0 -> 1368 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20009.pngbin0 -> 1311 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20010.pngbin0 -> 1340 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20011.pngbin0 -> 1322 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20012.pngbin0 -> 1350 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20013.pngbin0 -> 1337 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20014.pngbin0 -> 1341 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20015.pngbin0 -> 1373 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20016.pngbin0 -> 1357 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20017.pngbin0 -> 1354 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20018.pngbin0 -> 1320 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20019.pngbin0 -> 1356 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20020.pngbin0 -> 1379 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20021.pngbin0 -> 1401 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20022.pngbin0 -> 1418 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20023.pngbin0 -> 1401 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20024.pngbin0 -> 1383 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20025.pngbin0 -> 1360 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20026.pngbin0 -> 1376 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20027.pngbin0 -> 1331 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20028.pngbin0 -> 1353 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20029.pngbin0 -> 1376 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20030.pngbin0 -> 1290 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20031.pngbin0 -> 1313 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock3.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock3.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30000.pngbin0 -> 738 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30001.pngbin0 -> 730 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30002.pngbin0 -> 769 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30003.pngbin0 -> 766 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30004.pngbin0 -> 770 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30005.pngbin0 -> 756 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30006.pngbin0 -> 760 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30007.pngbin0 -> 750 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30008.pngbin0 -> 747 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30009.pngbin0 -> 752 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30010.pngbin0 -> 727 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30011.pngbin0 -> 737 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30012.pngbin0 -> 724 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30013.pngbin0 -> 751 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30014.pngbin0 -> 720 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30015.pngbin0 -> 741 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30016.pngbin0 -> 723 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30017.pngbin0 -> 722 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30018.pngbin0 -> 716 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30019.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30020.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30021.pngbin0 -> 731 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30022.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30023.pngbin0 -> 732 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30024.pngbin0 -> 727 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30025.pngbin0 -> 721 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30026.pngbin0 -> 716 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30027.pngbin0 -> 721 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30028.pngbin0 -> 739 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30029.pngbin0 -> 740 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30030.pngbin0 -> 725 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30031.pngbin0 -> 715 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0000.pngbin0 -> 1702 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0001.pngbin0 -> 1690 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0002.pngbin0 -> 1849 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0003.pngbin0 -> 1858 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0004.pngbin0 -> 1725 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0005.pngbin0 -> 1876 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0006.pngbin0 -> 1848 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship.pov128
-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0000.pngbin0 -> 1772 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0001.pngbin0 -> 1893 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0002.pngbin0 -> 1899 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0003.pngbin0 -> 1878 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0004.pngbin0 -> 1979 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0005.pngbin0 -> 2054 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0006.pngbin0 -> 1956 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0007.pngbin0 -> 1929 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0008.pngbin0 -> 1790 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0009.pngbin0 -> 1913 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0010.pngbin0 -> 1954 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0011.pngbin0 -> 1975 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0012.pngbin0 -> 1953 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0013.pngbin0 -> 1924 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0014.pngbin0 -> 1900 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0015.pngbin0 -> 1799 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0016.pngbin0 -> 1738 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0017.pngbin0 -> 1868 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0018.pngbin0 -> 1945 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0019.pngbin0 -> 1972 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0020.pngbin0 -> 2014 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0021.pngbin0 -> 2002 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0022.pngbin0 -> 1920 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0023.pngbin0 -> 1840 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0024.pngbin0 -> 1733 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0025.pngbin0 -> 1880 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0026.pngbin0 -> 1951 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0027.pngbin0 -> 2014 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0028.pngbin0 -> 2019 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0029.pngbin0 -> 2022 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0030.pngbin0 -> 1969 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0031.pngbin0 -> 1880 bytes-rw-r--r--examples/graphicsview/portedasteroids/toplevel.cpp543
-rw-r--r--examples/graphicsview/portedasteroids/toplevel.h126
-rw-r--r--examples/graphicsview/portedasteroids/view.cpp967
-rw-r--r--examples/graphicsview/portedasteroids/view.h184
-rw-r--r--examples/graphicsview/portedcanvas/blendshadow.cpp94
-rw-r--r--examples/graphicsview/portedcanvas/butterfly.pngbin0 -> 36868 bytes-rw-r--r--examples/graphicsview/portedcanvas/canvas.cpp733
-rw-r--r--examples/graphicsview/portedcanvas/canvas.doc29
-rw-r--r--examples/graphicsview/portedcanvas/canvas.h131
-rw-r--r--examples/graphicsview/portedcanvas/main.cpp92
-rw-r--r--examples/graphicsview/portedcanvas/makeimg.cpp133
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.pro16
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.qrc7
-rw-r--r--examples/graphicsview/portedcanvas/qt-trans.xpm54
-rw-r--r--examples/graphicsview/portedcanvas/qtlogo.pngbin0 -> 21921 bytes-rw-r--r--examples/help/README38
-rw-r--r--examples/help/contextsensitivehelp/contextsensitivehelp.pro18
-rw-r--r--examples/help/contextsensitivehelp/doc/amount.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/filter.html12
-rw-r--r--examples/help/contextsensitivehelp/doc/plants.html44
-rw-r--r--examples/help/contextsensitivehelp/doc/rain.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/source.html33
-rw-r--r--examples/help/contextsensitivehelp/doc/temperature.html13
-rw-r--r--examples/help/contextsensitivehelp/doc/time.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qchbin0 -> 27648 bytes-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhcbin0 -> 10240 bytes-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhcp14
-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhp25
-rw-r--r--examples/help/contextsensitivehelp/helpbrowser.cpp81
-rw-r--r--examples/help/contextsensitivehelp/helpbrowser.h65
-rw-r--r--examples/help/contextsensitivehelp/main.cpp51
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.cpp69
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.h62
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.ui446
-rw-r--r--examples/help/help.pro11
-rw-r--r--examples/help/remotecontrol/enter.pngbin0 -> 315 bytes-rw-r--r--examples/help/remotecontrol/main.cpp54
-rw-r--r--examples/help/remotecontrol/remotecontrol.cpp175
-rw-r--r--examples/help/remotecontrol/remotecontrol.h79
-rw-r--r--examples/help/remotecontrol/remotecontrol.pro13
-rw-r--r--examples/help/remotecontrol/remotecontrol.qrc5
-rw-r--r--examples/help/remotecontrol/remotecontrol.ui228
-rw-r--r--examples/help/simpletextviewer/assistant.cpp110
-rw-r--r--examples/help/simpletextviewer/assistant.h63
-rw-r--r--examples/help/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/help/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/help/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/help/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/help/simpletextviewer/documentation/images/browse.pngbin0 -> 21553 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/fadedfilemenu.pngbin0 -> 9589 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/filedialog.pngbin0 -> 12318 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/handbook.pngbin0 -> 1060 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/icon.pngbin0 -> 5513 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/mainwindow.pngbin0 -> 12769 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/open.pngbin0 -> 11697 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/wildcard.pngbin0 -> 11266 bytes-rw-r--r--examples/help/simpletextviewer/documentation/index.html41
-rw-r--r--examples/help/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/help/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qchbin0 -> 108544 bytes-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhcbin0 -> 18432 bytes-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhcp30
-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhp49
-rw-r--r--examples/help/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/help/simpletextviewer/findfiledialog.cpp222
-rw-r--r--examples/help/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/help/simpletextviewer/main.cpp52
-rw-r--r--examples/help/simpletextviewer/mainwindow.cpp147
-rw-r--r--examples/help/simpletextviewer/mainwindow.h84
-rw-r--r--examples/help/simpletextviewer/simpletextviewer.pro16
-rw-r--r--examples/help/simpletextviewer/textedit.cpp75
-rw-r--r--examples/help/simpletextviewer/textedit.h61
-rw-r--r--examples/ipc/README35
-rw-r--r--examples/ipc/ipc.pro8
-rw-r--r--examples/ipc/localfortuneclient/client.cpp153
-rw-r--r--examples/ipc/localfortuneclient/client.h82
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro12
-rw-r--r--examples/ipc/localfortuneclient/main.cpp52
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.pro12
-rw-r--r--examples/ipc/localfortuneserver/main.cpp56
-rw-r--r--examples/ipc/localfortuneserver/server.cpp111
-rw-r--r--examples/ipc/localfortuneserver/server.h70
-rw-r--r--examples/ipc/sharedmemory/dialog.cpp189
-rw-r--r--examples/ipc/sharedmemory/dialog.h71
-rw-r--r--examples/ipc/sharedmemory/dialog.ui47
-rw-r--r--examples/ipc/sharedmemory/image.pngbin0 -> 10199 bytes-rw-r--r--examples/ipc/sharedmemory/main.cpp54
-rw-r--r--examples/ipc/sharedmemory/qt.pngbin0 -> 2383 bytes-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro13
-rw-r--r--examples/itemviews/README39
-rw-r--r--examples/itemviews/addressbook/adddialog.cpp83
-rw-r--r--examples/itemviews/addressbook/adddialog.h72
-rw-r--r--examples/itemviews/addressbook/addressbook.pro17
-rw-r--r--examples/itemviews/addressbook/addresswidget.cpp238
-rw-r--r--examples/itemviews/addressbook/addresswidget.h83
-rw-r--r--examples/itemviews/addressbook/main.cpp53
-rw-r--r--examples/itemviews/addressbook/mainwindow.cpp138
-rw-r--r--examples/itemviews/addressbook/mainwindow.h76
-rw-r--r--examples/itemviews/addressbook/newaddresstab.cpp78
-rw-r--r--examples/itemviews/addressbook/newaddresstab.h75
-rw-r--r--examples/itemviews/addressbook/tablemodel.cpp185
-rw-r--r--examples/itemviews/addressbook/tablemodel.h73
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro10
-rw-r--r--examples/itemviews/basicsortfiltermodel/main.cpp94
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.cpp157
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.h89
-rw-r--r--examples/itemviews/chart/chart.pro13
-rw-r--r--examples/itemviews/chart/chart.qrc5
-rw-r--r--examples/itemviews/chart/main.cpp54
-rw-r--r--examples/itemviews/chart/mainwindow.cpp173
-rw-r--r--examples/itemviews/chart/mainwindow.h73
-rw-r--r--examples/itemviews/chart/mydata.cht8
-rw-r--r--examples/itemviews/chart/pieview.cpp562
-rw-r--r--examples/itemviews/chart/pieview.h115
-rw-r--r--examples/itemviews/chart/qtdata.cht14
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.pro11
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.cpp77
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.h70
-rw-r--r--examples/itemviews/coloreditorfactory/main.cpp54
-rw-r--r--examples/itemviews/coloreditorfactory/window.cpp95
-rw-r--r--examples/itemviews/coloreditorfactory/window.h58
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.pro9
-rw-r--r--examples/itemviews/combowidgetmapper/main.cpp52
-rw-r--r--examples/itemviews/combowidgetmapper/window.cpp137
-rw-r--r--examples/itemviews/combowidgetmapper/window.h87
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro12
-rw-r--r--examples/itemviews/customsortfiltermodel/main.cpp96
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp116
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h74
-rw-r--r--examples/itemviews/customsortfiltermodel/window.cpp168
-rw-r--r--examples/itemviews/customsortfiltermodel/window.h91
-rw-r--r--examples/itemviews/dirview/dirview.pro7
-rw-r--r--examples/itemviews/dirview/main.cpp62
-rw-r--r--examples/itemviews/editabletreemodel/default.txt40
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.pro16
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.qrc5
-rw-r--r--examples/itemviews/editabletreemodel/main.cpp54
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.cpp181
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.h72
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.ui128
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.cpp180
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.h75
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.cpp289
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.h98
-rw-r--r--examples/itemviews/fetchmore/fetchmore.pro12
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.cpp116
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.h76
-rw-r--r--examples/itemviews/fetchmore/main.cpp51
-rw-r--r--examples/itemviews/fetchmore/window.cpp82
-rw-r--r--examples/itemviews/fetchmore/window.h65
-rw-r--r--examples/itemviews/itemviews.pro22
-rw-r--r--examples/itemviews/pixelator/imagemodel.cpp92
-rw-r--r--examples/itemviews/pixelator/imagemodel.h69
-rw-r--r--examples/itemviews/pixelator/images.qrc5
-rw-r--r--examples/itemviews/pixelator/images/qt.pngbin0 -> 656 bytes-rw-r--r--examples/itemviews/pixelator/main.cpp55
-rw-r--r--examples/itemviews/pixelator/mainwindow.cpp245
-rw-r--r--examples/itemviews/pixelator/mainwindow.h75
-rw-r--r--examples/itemviews/pixelator/pixelator.pro14
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.cpp108
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.h80
-rw-r--r--examples/itemviews/puzzle/example.jpgbin0 -> 42654 bytes-rw-r--r--examples/itemviews/puzzle/main.cpp55
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp150
-rw-r--r--examples/itemviews/puzzle/mainwindow.h78
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp204
-rw-r--r--examples/itemviews/puzzle/piecesmodel.h81
-rw-r--r--examples/itemviews/puzzle/puzzle.pro14
-rw-r--r--examples/itemviews/puzzle/puzzle.qrc5
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.cpp205
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.h86
-rw-r--r--examples/itemviews/simpledommodel/domitem.cpp102
-rw-r--r--examples/itemviews/simpledommodel/domitem.h67
-rw-r--r--examples/itemviews/simpledommodel/dommodel.cpp190
-rw-r--r--examples/itemviews/simpledommodel/dommodel.h77
-rw-r--r--examples/itemviews/simpledommodel/main.cpp53
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.cpp85
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.h71
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.pro15
-rw-r--r--examples/itemviews/simpletreemodel/default.txt40
-rw-r--r--examples/itemviews/simpletreemodel/main.cpp62
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.pro13
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.qrc5
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.cpp117
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.h71
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.cpp219
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.h77
-rw-r--r--examples/itemviews/simplewidgetmapper/main.cpp52
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro9
-rw-r--r--examples/itemviews/simplewidgetmapper/window.cpp134
-rw-r--r--examples/itemviews/simplewidgetmapper/window.h85
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.cpp103
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.h71
-rw-r--r--examples/itemviews/spinboxdelegate/main.cpp87
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.pro9
-rw-r--r--examples/itemviews/stardelegate/main.cpp108
-rw-r--r--examples/itemviews/stardelegate/stardelegate.cpp130
-rw-r--r--examples/itemviews/stardelegate/stardelegate.h70
-rw-r--r--examples/itemviews/stardelegate/stardelegate.pro14
-rw-r--r--examples/itemviews/stardelegate/stareditor.cpp99
-rw-r--r--examples/itemviews/stardelegate/stareditor.h78
-rw-r--r--examples/itemviews/stardelegate/starrating.cpp103
-rw-r--r--examples/itemviews/stardelegate/starrating.h77
-rw-r--r--examples/layouts/README41
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.pro9
-rw-r--r--examples/layouts/basiclayouts/dialog.cpp150
-rw-r--r--examples/layouts/basiclayouts/dialog.h91
-rw-r--r--examples/layouts/basiclayouts/main.cpp51
-rw-r--r--examples/layouts/borderlayout/borderlayout.cpp214
-rw-r--r--examples/layouts/borderlayout/borderlayout.h89
-rw-r--r--examples/layouts/borderlayout/borderlayout.pro11
-rw-r--r--examples/layouts/borderlayout/main.cpp52
-rw-r--r--examples/layouts/borderlayout/window.cpp69
-rw-r--r--examples/layouts/borderlayout/window.h62
-rw-r--r--examples/layouts/dynamiclayouts/dialog.cpp170
-rw-r--r--examples/layouts/dynamiclayouts/dialog.h91
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.pro9
-rw-r--r--examples/layouts/dynamiclayouts/main.cpp51
-rw-r--r--examples/layouts/flowlayout/flowlayout.cpp154
-rw-r--r--examples/layouts/flowlayout/flowlayout.h73
-rw-r--r--examples/layouts/flowlayout/flowlayout.pro11
-rw-r--r--examples/layouts/flowlayout/main.cpp52
-rw-r--r--examples/layouts/flowlayout/window.cpp59
-rw-r--r--examples/layouts/flowlayout/window.h59
-rw-r--r--examples/layouts/layouts.pro10
-rw-r--r--examples/linguist/README37
-rw-r--r--examples/linguist/arrowpad/arrowpad.cpp65
-rw-r--r--examples/linguist/arrowpad/arrowpad.h69
-rw-r--r--examples/linguist/arrowpad/arrowpad.pro16
-rw-r--r--examples/linguist/arrowpad/main.cpp64
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp62
-rw-r--r--examples/linguist/arrowpad/mainwindow.h69
-rw-r--r--examples/linguist/hellotr/hellotr.pro11
-rw-r--r--examples/linguist/hellotr/main.cpp71
-rw-r--r--examples/linguist/linguist.pro9
-rw-r--r--examples/linguist/trollprint/main.cpp61
-rw-r--r--examples/linguist/trollprint/mainwindow.cpp96
-rw-r--r--examples/linguist/trollprint/mainwindow.h75
-rw-r--r--examples/linguist/trollprint/printpanel.cpp86
-rw-r--r--examples/linguist/trollprint/printpanel.h70
-rw-r--r--examples/linguist/trollprint/trollprint.pro12
-rw-r--r--examples/linguist/trollprint/trollprint_pt.ts65
-rw-r--r--examples/mainwindows/README40
-rw-r--r--examples/mainwindows/application/application.pro12
-rw-r--r--examples/mainwindows/application/application.qrc10
-rw-r--r--examples/mainwindows/application/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/application/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/application/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/application/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/application/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/application/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/application/main.cpp56
-rw-r--r--examples/mainwindows/application/mainwindow.cpp388
-rw-r--r--examples/mainwindows/application/mainwindow.h106
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro10
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.qrc8
-rw-r--r--examples/mainwindows/dockwidgets/images/new.pngbin0 -> 977 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/print.pngbin0 -> 1732 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/save.pngbin0 -> 1894 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/undo.pngbin0 -> 1768 bytes-rw-r--r--examples/mainwindows/dockwidgets/main.cpp53
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp343
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.h98
-rw-r--r--examples/mainwindows/mainwindows.pro13
-rw-r--r--examples/mainwindows/mdi/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/mdi/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/mdi/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/mdi/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/mdi/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/mdi/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/mdi/main.cpp54
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp399
-rw-r--r--examples/mainwindows/mdi/mainwindow.h119
-rw-r--r--examples/mainwindows/mdi/mdi.pro12
-rw-r--r--examples/mainwindows/mdi/mdi.qrc10
-rw-r--r--examples/mainwindows/mdi/mdichild.cpp176
-rw-r--r--examples/mainwindows/mdi/mdichild.h77
-rw-r--r--examples/mainwindows/menus/main.cpp52
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp371
-rw-r--r--examples/mainwindows/menus/mainwindow.h125
-rw-r--r--examples/mainwindows/menus/menus.pro9
-rw-r--r--examples/mainwindows/recentfiles/main.cpp52
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp256
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.h97
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.pro9
-rw-r--r--examples/mainwindows/sdi/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/sdi/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/sdi/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/sdi/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/sdi/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/sdi/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/sdi/main.cpp53
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp375
-rw-r--r--examples/mainwindows/sdi/mainwindow.h109
-rw-r--r--examples/mainwindows/sdi/sdi.pro10
-rw-r--r--examples/mainwindows/sdi/sdi.qrc10
-rw-r--r--examples/network/README40
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.cpp154
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.h85
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.pro12
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.cpp138
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.h74
-rw-r--r--examples/network/blockingfortuneclient/main.cpp52
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro10
-rw-r--r--examples/network/broadcastreceiver/main.cpp52
-rw-r--r--examples/network/broadcastreceiver/receiver.cpp88
-rw-r--r--examples/network/broadcastreceiver/receiver.h69
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro10
-rw-r--r--examples/network/broadcastsender/main.cpp52
-rw-r--r--examples/network/broadcastsender/sender.cpp92
-rw-r--r--examples/network/broadcastsender/sender.h76
-rw-r--r--examples/network/download/download.pro19
-rw-r--r--examples/network/download/main.cpp176
-rw-r--r--examples/network/downloadmanager/downloadmanager.cpp173
-rw-r--r--examples/network/downloadmanager/downloadmanager.h85
-rw-r--r--examples/network/downloadmanager/downloadmanager.pro20
-rw-r--r--examples/network/downloadmanager/main.cpp68
-rw-r--r--examples/network/downloadmanager/textprogressbar.cpp99
-rw-r--r--examples/network/downloadmanager/textprogressbar.h64
-rw-r--r--examples/network/fortuneclient/client.cpp191
-rw-r--r--examples/network/fortuneclient/client.h86
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro10
-rw-r--r--examples/network/fortuneclient/main.cpp52
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro10
-rw-r--r--examples/network/fortuneserver/main.cpp56
-rw-r--r--examples/network/fortuneserver/server.cpp123
-rw-r--r--examples/network/fortuneserver/server.h72
-rw-r--r--examples/network/ftp/ftp.pro11
-rw-r--r--examples/network/ftp/ftp.qrc7
-rw-r--r--examples/network/ftp/ftpwindow.cpp349
-rw-r--r--examples/network/ftp/ftpwindow.h104
-rw-r--r--examples/network/ftp/images/cdtoparent.pngbin0 -> 139 bytes-rw-r--r--examples/network/ftp/images/dir.pngbin0 -> 154 bytes-rw-r--r--examples/network/ftp/images/file.pngbin0 -> 129 bytes-rw-r--r--examples/network/ftp/main.cpp54
-rw-r--r--examples/network/http/authenticationdialog.ui129
-rw-r--r--examples/network/http/http.pro11
-rw-r--r--examples/network/http/httpwindow.cpp262
-rw-r--r--examples/network/http/httpwindow.h94
-rw-r--r--examples/network/http/main.cpp52
-rw-r--r--examples/network/loopback/dialog.cpp187
-rw-r--r--examples/network/loopback/dialog.h90
-rw-r--r--examples/network/loopback/loopback.pro10
-rw-r--r--examples/network/loopback/main.cpp52
-rw-r--r--examples/network/network-chat/chatdialog.cpp141
-rw-r--r--examples/network/network-chat/chatdialog.h70
-rw-r--r--examples/network/network-chat/chatdialog.ui79
-rw-r--r--examples/network/network-chat/client.cpp140
-rw-r--r--examples/network/network-chat/client.h83
-rw-r--r--examples/network/network-chat/connection.cpp276
-rw-r--r--examples/network/network-chat/connection.h108
-rw-r--r--examples/network/network-chat/main.cpp52
-rw-r--r--examples/network/network-chat/network-chat.pro19
-rw-r--r--examples/network/network-chat/peermanager.cpp170
-rw-r--r--examples/network/network-chat/peermanager.h85
-rw-r--r--examples/network/network-chat/server.cpp58
-rw-r--r--examples/network/network-chat/server.h63
-rw-r--r--examples/network/network.pro21
-rw-r--r--examples/network/securesocketclient/certificateinfo.cpp100
-rw-r--r--examples/network/securesocketclient/certificateinfo.h69
-rw-r--r--examples/network/securesocketclient/certificateinfo.ui85
-rw-r--r--examples/network/securesocketclient/encrypted.pngbin0 -> 750 bytes-rw-r--r--examples/network/securesocketclient/main.cpp63
-rw-r--r--examples/network/securesocketclient/securesocketclient.pro16
-rw-r--r--examples/network/securesocketclient/securesocketclient.qrc5
-rw-r--r--examples/network/securesocketclient/sslclient.cpp218
-rw-r--r--examples/network/securesocketclient/sslclient.h81
-rw-r--r--examples/network/securesocketclient/sslclient.ui190
-rw-r--r--examples/network/securesocketclient/sslerrors.ui110
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp82
-rw-r--r--examples/network/threadedfortuneserver/dialog.h66
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.cpp69
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h64
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.cpp77
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.h67
-rw-r--r--examples/network/threadedfortuneserver/main.cpp56
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.pro14
-rw-r--r--examples/network/torrent/addtorrentdialog.cpp170
-rw-r--r--examples/network/torrent/addtorrentdialog.h74
-rw-r--r--examples/network/torrent/bencodeparser.cpp235
-rw-r--r--examples/network/torrent/bencodeparser.h81
-rw-r--r--examples/network/torrent/connectionmanager.cpp89
-rw-r--r--examples/network/torrent/connectionmanager.h66
-rw-r--r--examples/network/torrent/filemanager.cpp447
-rw-r--r--examples/network/torrent/filemanager.h144
-rw-r--r--examples/network/torrent/forms/addtorrentform.ui266
-rw-r--r--examples/network/torrent/icons.qrc12
-rw-r--r--examples/network/torrent/icons/1downarrow.pngbin0 -> 895 bytes-rw-r--r--examples/network/torrent/icons/1uparrow.pngbin0 -> 822 bytes-rw-r--r--examples/network/torrent/icons/bottom.pngbin0 -> 1632 bytes-rw-r--r--examples/network/torrent/icons/edit_add.pngbin0 -> 394 bytes-rw-r--r--examples/network/torrent/icons/edit_remove.pngbin0 -> 368 bytes-rw-r--r--examples/network/torrent/icons/exit.pngbin0 -> 1426 bytes-rw-r--r--examples/network/torrent/icons/peertopeer.pngbin0 -> 10072 bytes-rw-r--r--examples/network/torrent/icons/player_pause.pngbin0 -> 690 bytes-rw-r--r--examples/network/torrent/icons/player_play.pngbin0 -> 900 bytes-rw-r--r--examples/network/torrent/icons/player_stop.pngbin0 -> 627 bytes-rw-r--r--examples/network/torrent/icons/stop.pngbin0 -> 1252 bytes-rw-r--r--examples/network/torrent/main.cpp57
-rw-r--r--examples/network/torrent/mainwindow.cpp713
-rw-r--r--examples/network/torrent/mainwindow.h132
-rw-r--r--examples/network/torrent/metainfo.cpp218
-rw-r--r--examples/network/torrent/metainfo.h122
-rw-r--r--examples/network/torrent/peerwireclient.cpp665
-rw-r--r--examples/network/torrent/peerwireclient.h210
-rw-r--r--examples/network/torrent/ratecontroller.cpp156
-rw-r--r--examples/network/torrent/ratecontroller.h80
-rw-r--r--examples/network/torrent/torrent.pro37
-rw-r--r--examples/network/torrent/torrentclient.cpp1529
-rw-r--r--examples/network/torrent/torrentclient.h205
-rw-r--r--examples/network/torrent/torrentserver.cpp104
-rw-r--r--examples/network/torrent/torrentserver.h72
-rw-r--r--examples/network/torrent/trackerclient.cpp237
-rw-r--r--examples/network/torrent/trackerclient.h104
-rw-r--r--examples/opengl/2dpainting/2dpainting.pro17
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp73
-rw-r--r--examples/opengl/2dpainting/glwidget.h73
-rw-r--r--examples/opengl/2dpainting/helper.cpp91
-rw-r--r--examples/opengl/2dpainting/helper.h72
-rw-r--r--examples/opengl/2dpainting/main.cpp51
-rw-r--r--examples/opengl/2dpainting/widget.cpp73
-rw-r--r--examples/opengl/2dpainting/widget.h72
-rw-r--r--examples/opengl/2dpainting/window.cpp72
-rw-r--r--examples/opengl/2dpainting/window.h67
-rw-r--r--examples/opengl/README41
-rw-r--r--examples/opengl/framebufferobject/bubbles.svg215
-rw-r--r--examples/opengl/framebufferobject/designer.pngbin0 -> 2810 bytes-rw-r--r--examples/opengl/framebufferobject/framebufferobject.pro22
-rw-r--r--examples/opengl/framebufferobject/framebufferobject.qrc6
-rw-r--r--examples/opengl/framebufferobject/glwidget.cpp309
-rw-r--r--examples/opengl/framebufferobject/glwidget.h82
-rw-r--r--examples/opengl/framebufferobject/main.cpp62
-rw-r--r--examples/opengl/framebufferobject2/cubelogo.pngbin0 -> 5920 bytes-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.pro11
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.qrc5
-rw-r--r--examples/opengl/framebufferobject2/glwidget.cpp249
-rw-r--r--examples/opengl/framebufferobject2/glwidget.h66
-rw-r--r--examples/opengl/framebufferobject2/main.cpp62
-rw-r--r--examples/opengl/grabber/glwidget.cpp284
-rw-r--r--examples/opengl/grabber/glwidget.h98
-rw-r--r--examples/opengl/grabber/grabber.pro12
-rw-r--r--examples/opengl/grabber/main.cpp52
-rw-r--r--examples/opengl/grabber/mainwindow.cpp207
-rw-r--r--examples/opengl/grabber/mainwindow.h95
-rw-r--r--examples/opengl/hellogl/glwidget.cpp266
-rw-r--r--examples/opengl/hellogl/glwidget.h99
-rw-r--r--examples/opengl/hellogl/hellogl.pro12
-rw-r--r--examples/opengl/hellogl/main.cpp52
-rw-r--r--examples/opengl/hellogl/window.cpp90
-rw-r--r--examples/opengl/hellogl/window.h70
-rw-r--r--examples/opengl/hellogl_es/bubble.cpp140
-rw-r--r--examples/opengl/hellogl_es/bubble.h77
-rw-r--r--examples/opengl/hellogl_es/cl_helper.h133
-rw-r--r--examples/opengl/hellogl_es/glwidget.cpp457
-rw-r--r--examples/opengl/hellogl_es/glwidget.h87
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.pro34
-rw-r--r--examples/opengl/hellogl_es/main.cpp53
-rw-r--r--examples/opengl/hellogl_es/mainwindow.cpp108
-rw-r--r--examples/opengl/hellogl_es/mainwindow.h60
-rw-r--r--examples/opengl/hellogl_es/qt.pngbin0 -> 5174 bytes-rw-r--r--examples/opengl/hellogl_es/texture.qrc5
-rw-r--r--examples/opengl/hellogl_es2/bubble.cpp140
-rw-r--r--examples/opengl/hellogl_es2/bubble.h77
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp642
-rw-r--r--examples/opengl/hellogl_es2/glwidget.h94
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.pro27
-rw-r--r--examples/opengl/hellogl_es2/main.cpp53
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.cpp108
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.h60
-rw-r--r--examples/opengl/hellogl_es2/qt.pngbin0 -> 5174 bytes-rw-r--r--examples/opengl/hellogl_es2/texture.qrc5
-rw-r--r--examples/opengl/opengl.pro29
-rw-r--r--examples/opengl/overpainting/bubble.cpp113
-rw-r--r--examples/opengl/overpainting/bubble.h76
-rw-r--r--examples/opengl/overpainting/glwidget.cpp360
-rw-r--r--examples/opengl/overpainting/glwidget.h114
-rw-r--r--examples/opengl/overpainting/main.cpp51
-rw-r--r--examples/opengl/overpainting/overpainting.pro13
-rw-r--r--examples/opengl/pbuffers/cubelogo.pngbin0 -> 5920 bytes-rw-r--r--examples/opengl/pbuffers/glwidget.cpp260
-rw-r--r--examples/opengl/pbuffers/glwidget.h70
-rw-r--r--examples/opengl/pbuffers/main.cpp62
-rw-r--r--examples/opengl/pbuffers/pbuffers.pro11
-rw-r--r--examples/opengl/pbuffers/pbuffers.qrc5
-rw-r--r--examples/opengl/pbuffers2/bubbles.svg215
-rw-r--r--examples/opengl/pbuffers2/designer.pngbin0 -> 2810 bytes-rw-r--r--examples/opengl/pbuffers2/glwidget.cpp326
-rw-r--r--examples/opengl/pbuffers2/glwidget.h85
-rw-r--r--examples/opengl/pbuffers2/main.cpp62
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.pro21
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.qrc6
-rw-r--r--examples/opengl/samplebuffers/glwidget.cpp165
-rw-r--r--examples/opengl/samplebuffers/glwidget.h62
-rw-r--r--examples/opengl/samplebuffers/main.cpp72
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.pro10
-rw-r--r--examples/opengl/textures/glwidget.cpp182
-rw-r--r--examples/opengl/textures/glwidget.h84
-rw-r--r--examples/opengl/textures/images/side1.pngbin0 -> 935 bytes-rw-r--r--examples/opengl/textures/images/side2.pngbin0 -> 1622 bytes-rw-r--r--examples/opengl/textures/images/side3.pngbin0 -> 2117 bytes-rw-r--r--examples/opengl/textures/images/side4.pngbin0 -> 1222 bytes-rw-r--r--examples/opengl/textures/images/side5.pngbin0 -> 1806 bytes-rw-r--r--examples/opengl/textures/images/side6.pngbin0 -> 2215 bytes-rw-r--r--examples/opengl/textures/main.cpp54
-rw-r--r--examples/opengl/textures/textures.pro13
-rw-r--r--examples/opengl/textures/textures.qrc10
-rw-r--r--examples/opengl/textures/window.cpp89
-rw-r--r--examples/opengl/textures/window.h67
-rw-r--r--examples/painting/README42
-rw-r--r--examples/painting/basicdrawing/basicdrawing.pro12
-rw-r--r--examples/painting/basicdrawing/basicdrawing.qrc6
-rw-r--r--examples/painting/basicdrawing/images/brick.pngbin0 -> 767 bytes-rw-r--r--examples/painting/basicdrawing/images/qt-logo.pngbin0 -> 3696 bytes-rw-r--r--examples/painting/basicdrawing/main.cpp54
-rw-r--r--examples/painting/basicdrawing/renderarea.cpp209
-rw-r--r--examples/painting/basicdrawing/renderarea.h84
-rw-r--r--examples/painting/basicdrawing/window.cpp262
-rw-r--r--examples/painting/basicdrawing/window.h88
-rw-r--r--examples/painting/concentriccircles/circlewidget.cpp125
-rw-r--r--examples/painting/concentriccircles/circlewidget.h74
-rw-r--r--examples/painting/concentriccircles/concentriccircles.pro11
-rw-r--r--examples/painting/concentriccircles/main.cpp52
-rw-r--r--examples/painting/concentriccircles/window.cpp94
-rw-r--r--examples/painting/concentriccircles/window.h71
-rw-r--r--examples/painting/fontsampler/fontsampler.pro10
-rw-r--r--examples/painting/fontsampler/main.cpp52
-rw-r--r--examples/painting/fontsampler/mainwindow.cpp373
-rw-r--r--examples/painting/fontsampler/mainwindow.h83
-rw-r--r--examples/painting/fontsampler/mainwindowbase.ui140
-rw-r--r--examples/painting/imagecomposition/imagecomposer.cpp209
-rw-r--r--examples/painting/imagecomposition/imagecomposer.h88
-rw-r--r--examples/painting/imagecomposition/imagecomposition.pro11
-rw-r--r--examples/painting/imagecomposition/imagecomposition.qrc6
-rw-r--r--examples/painting/imagecomposition/images/background.pngbin0 -> 18579 bytes-rw-r--r--examples/painting/imagecomposition/images/blackrectangle.pngbin0 -> 90 bytes-rw-r--r--examples/painting/imagecomposition/images/butterfly.pngbin0 -> 36868 bytes-rw-r--r--examples/painting/imagecomposition/images/checker.pngbin0 -> 10384 bytes-rw-r--r--examples/painting/imagecomposition/main.cpp56
-rw-r--r--examples/painting/painterpaths/main.cpp52
-rw-r--r--examples/painting/painterpaths/painterpaths.pro12
-rw-r--r--examples/painting/painterpaths/renderarea.cpp131
-rw-r--r--examples/painting/painterpaths/renderarea.h81
-rw-r--r--examples/painting/painterpaths/window.cpp289
-rw-r--r--examples/painting/painterpaths/window.h93
-rw-r--r--examples/painting/painting.pro16
-rw-r--r--examples/painting/svgviewer/files/bubbles.svg215
-rw-r--r--examples/painting/svgviewer/files/cubic.svg77
-rw-r--r--examples/painting/svgviewer/files/spheres.svg72
-rw-r--r--examples/painting/svgviewer/main.cpp63
-rw-r--r--examples/painting/svgviewer/mainwindow.cpp164
-rw-r--r--examples/painting/svgviewer/mainwindow.h81
-rw-r--r--examples/painting/svgviewer/svgview.cpp188
-rw-r--r--examples/painting/svgviewer/svgview.h84
-rw-r--r--examples/painting/svgviewer/svgviewer.pro23
-rw-r--r--examples/painting/svgviewer/svgviewer.qrc6
-rw-r--r--examples/painting/transformations/main.cpp52
-rw-r--r--examples/painting/transformations/renderarea.cpp173
-rw-r--r--examples/painting/transformations/renderarea.h91
-rw-r--r--examples/painting/transformations/transformations.pro11
-rw-r--r--examples/painting/transformations/window.cpp181
-rw-r--r--examples/painting/transformations/window.h81
-rw-r--r--examples/phonon/README39
-rw-r--r--examples/phonon/capabilities/capabilities.pro16
-rw-r--r--examples/phonon/capabilities/main.cpp58
-rw-r--r--examples/phonon/capabilities/window.cpp166
-rw-r--r--examples/phonon/capabilities/window.h97
-rw-r--r--examples/phonon/musicplayer/main.cpp57
-rw-r--r--examples/phonon/musicplayer/mainwindow.cpp352
-rw-r--r--examples/phonon/musicplayer/mainwindow.h112
-rw-r--r--examples/phonon/musicplayer/musicplayer.pro16
-rw-r--r--examples/phonon/phonon.pro10
-rw-r--r--examples/qmake/precompile/main.cpp61
-rw-r--r--examples/qmake/precompile/mydialog.cpp48
-rw-r--r--examples/qmake/precompile/mydialog.h55
-rw-r--r--examples/qmake/precompile/mydialog.ui47
-rw-r--r--examples/qmake/precompile/myobject.cpp58
-rw-r--r--examples/qmake/precompile/myobject.h56
-rw-r--r--examples/qmake/precompile/precompile.pro22
-rw-r--r--examples/qmake/precompile/stable.h53
-rw-r--r--examples/qmake/precompile/util.cpp50
-rw-r--r--examples/qmake/tutorial/hello.cpp50
-rw-r--r--examples/qmake/tutorial/hello.h48
-rw-r--r--examples/qmake/tutorial/hellounix.cpp43
-rw-r--r--examples/qmake/tutorial/hellowin.cpp43
-rw-r--r--examples/qmake/tutorial/main.cpp54
-rw-r--r--examples/qtconcurrent/README38
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.cpp147
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.h82
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.pro13
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp64
-rw-r--r--examples/qtconcurrent/map/main.cpp82
-rw-r--r--examples/qtconcurrent/map/map.pro14
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp100
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.pro14
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro12
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp73
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.pro14
-rw-r--r--examples/qtconcurrent/wordcount/main.cpp167
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.pro14
-rw-r--r--examples/qtestlib/README38
-rw-r--r--examples/qtestlib/qtestlib.pro8
-rw-r--r--examples/qtestlib/tutorial1/testqstring.cpp65
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.pro8
-rw-r--r--examples/qtestlib/tutorial2/testqstring.cpp81
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.pro8
-rw-r--r--examples/qtestlib/tutorial3/testgui.cpp71
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.pro8
-rw-r--r--examples/qtestlib/tutorial4/testgui.cpp91
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.pro8
-rw-r--r--examples/qtestlib/tutorial5/benchmarking.cpp135
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.pro8
-rw-r--r--examples/qws/README38
-rw-r--r--examples/qws/ahigl/ahigl.pro16
-rw-r--r--examples/qws/ahigl/qscreenahigl_qws.cpp963
-rw-r--r--examples/qws/ahigl/qscreenahigl_qws.h91
-rw-r--r--examples/qws/ahigl/qscreenahiglplugin.cpp97
-rw-r--r--examples/qws/ahigl/qwindowsurface_ahigl.cpp349
-rw-r--r--examples/qws/ahigl/qwindowsurface_ahigl_p.h92
-rw-r--r--examples/qws/dbscreen/dbscreen.cpp99
-rw-r--r--examples/qws/dbscreen/dbscreen.h70
-rw-r--r--examples/qws/dbscreen/dbscreen.pro11
-rw-r--r--examples/qws/dbscreen/dbscreendriverplugin.cpp80
-rw-r--r--examples/qws/framebuffer/framebuffer.pro11
-rw-r--r--examples/qws/framebuffer/main.c586
-rw-r--r--examples/qws/mousecalibration/calibration.cpp145
-rw-r--r--examples/qws/mousecalibration/calibration.h68
-rw-r--r--examples/qws/mousecalibration/main.cpp93
-rw-r--r--examples/qws/mousecalibration/mousecalibration.pro11
-rw-r--r--examples/qws/mousecalibration/scribblewidget.cpp93
-rw-r--r--examples/qws/mousecalibration/scribblewidget.h71
-rw-r--r--examples/qws/qws.pro7
-rw-r--r--examples/qws/simpledecoration/analogclock.cpp111
-rw-r--r--examples/qws/simpledecoration/analogclock.h58
-rw-r--r--examples/qws/simpledecoration/main.cpp60
-rw-r--r--examples/qws/simpledecoration/mydecoration.cpp375
-rw-r--r--examples/qws/simpledecoration/mydecoration.h73
-rw-r--r--examples/qws/simpledecoration/simpledecoration.pro12
-rw-r--r--examples/qws/svgalib/README5
-rw-r--r--examples/qws/svgalib/svgalib.pro19
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.cpp67
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.h66
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.cpp192
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.h79
-rw-r--r--examples/qws/svgalib/svgalibplugin.cpp75
-rw-r--r--examples/qws/svgalib/svgalibscreen.cpp354
-rw-r--r--examples/qws/svgalib/svgalibscreen.h84
-rw-r--r--examples/qws/svgalib/svgalibsurface.cpp87
-rw-r--r--examples/qws/svgalib/svgalibsurface.h76
-rw-r--r--examples/richtext/README42
-rw-r--r--examples/richtext/calendar/calendar.pro9
-rw-r--r--examples/richtext/calendar/main.cpp53
-rw-r--r--examples/richtext/calendar/mainwindow.cpp215
-rw-r--r--examples/richtext/calendar/mainwindow.h74
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp157
-rw-r--r--examples/richtext/orderform/detailsdialog.h91
-rw-r--r--examples/richtext/orderform/main.cpp56
-rw-r--r--examples/richtext/orderform/mainwindow.cpp250
-rw-r--r--examples/richtext/orderform/mainwindow.h77
-rw-r--r--examples/richtext/orderform/orderform.pro11
-rw-r--r--examples/richtext/richtext.pro12
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.cpp148
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.h85
-rw-r--r--examples/richtext/syntaxhighlighter/main.cpp53
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.cpp130
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.h76
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro17
-rw-r--r--examples/richtext/textobject/files/heart.svg55
-rw-r--r--examples/richtext/textobject/main.cpp55
-rw-r--r--examples/richtext/textobject/svgtextobject.cpp72
-rw-r--r--examples/richtext/textobject/svgtextobject.h70
-rw-r--r--examples/richtext/textobject/textobject.pro14
-rw-r--r--examples/richtext/textobject/window.cpp117
-rw-r--r--examples/richtext/textobject/window.h81
-rw-r--r--examples/script/README40
-rw-r--r--examples/script/calculator/calculator.js264
-rw-r--r--examples/script/calculator/calculator.pro12
-rw-r--r--examples/script/calculator/calculator.qrc6
-rw-r--r--examples/script/calculator/calculator.ui406
-rw-r--r--examples/script/calculator/main.cpp101
-rw-r--r--examples/script/context2d/context2d.cpp825
-rw-r--r--examples/script/context2d/context2d.h261
-rw-r--r--examples/script/context2d/context2d.pro23
-rw-r--r--examples/script/context2d/context2d.qrc5
-rw-r--r--examples/script/context2d/domimage.cpp157
-rw-r--r--examples/script/context2d/domimage.h87
-rw-r--r--examples/script/context2d/environment.cpp561
-rw-r--r--examples/script/context2d/environment.h145
-rw-r--r--examples/script/context2d/main.cpp53
-rw-r--r--examples/script/context2d/qcontext2dcanvas.cpp143
-rw-r--r--examples/script/context2d/qcontext2dcanvas.h98
-rw-r--r--examples/script/context2d/scripts/alpha.js21
-rw-r--r--examples/script/context2d/scripts/arc.js30
-rw-r--r--examples/script/context2d/scripts/bezier.js26
-rw-r--r--examples/script/context2d/scripts/clock.js99
-rw-r--r--examples/script/context2d/scripts/fill1.js8
-rw-r--r--examples/script/context2d/scripts/grad.js20
-rw-r--r--examples/script/context2d/scripts/linecap.js24
-rw-r--r--examples/script/context2d/scripts/linestye.js10
-rw-r--r--examples/script/context2d/scripts/moveto.js20
-rw-r--r--examples/script/context2d/scripts/moveto2.js24
-rw-r--r--examples/script/context2d/scripts/pacman.js83
-rw-r--r--examples/script/context2d/scripts/plasma.js58
-rw-r--r--examples/script/context2d/scripts/pong.js235
-rw-r--r--examples/script/context2d/scripts/quad.js21
-rw-r--r--examples/script/context2d/scripts/rgba.js19
-rw-r--r--examples/script/context2d/scripts/rotate.js16
-rw-r--r--examples/script/context2d/scripts/scale.js67
-rw-r--r--examples/script/context2d/scripts/stroke1.js10
-rw-r--r--examples/script/context2d/scripts/translate.js29
-rw-r--r--examples/script/context2d/window.cpp174
-rw-r--r--examples/script/context2d/window.h81
-rw-r--r--examples/script/customclass/bytearrayclass.cpp304
-rw-r--r--examples/script/customclass/bytearrayclass.h90
-rw-r--r--examples/script/customclass/bytearrayclass.pri6
-rw-r--r--examples/script/customclass/bytearrayprototype.cpp136
-rw-r--r--examples/script/customclass/bytearrayprototype.h80
-rw-r--r--examples/script/customclass/customclass.pro13
-rw-r--r--examples/script/customclass/main.cpp70
-rw-r--r--examples/script/defaultprototypes/code.js20
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.pro10
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.qrc5
-rw-r--r--examples/script/defaultprototypes/main.cpp84
-rw-r--r--examples/script/defaultprototypes/prototypes.cpp110
-rw-r--r--examples/script/defaultprototypes/prototypes.h78
-rw-r--r--examples/script/helloscript/helloscript.pro9
-rw-r--r--examples/script/helloscript/helloscript.qrc5
-rw-r--r--examples/script/helloscript/helloscript.qs5
-rw-r--r--examples/script/helloscript/main.cpp97
-rw-r--r--examples/script/marshal/main.cpp106
-rw-r--r--examples/script/marshal/marshal.pro9
-rw-r--r--examples/script/qscript/main.cpp221
-rw-r--r--examples/script/qscript/qscript.pro14
-rw-r--r--examples/script/qsdbg/example.qs17
-rw-r--r--examples/script/qsdbg/main.cpp74
-rw-r--r--examples/script/qsdbg/qsdbg.pri9
-rw-r--r--examples/script/qsdbg/qsdbg.pro19
-rw-r--r--examples/script/qsdbg/scriptbreakpointmanager.cpp159
-rw-r--r--examples/script/qsdbg/scriptbreakpointmanager.h122
-rw-r--r--examples/script/qsdbg/scriptdebugger.cpp737
-rw-r--r--examples/script/qsdbg/scriptdebugger.h85
-rw-r--r--examples/script/qstetrix/main.cpp142
-rw-r--r--examples/script/qstetrix/qstetrix.pro17
-rw-r--r--examples/script/qstetrix/tetrix.qrc8
-rw-r--r--examples/script/qstetrix/tetrixboard.cpp139
-rw-r--r--examples/script/qstetrix/tetrixboard.h102
-rw-r--r--examples/script/qstetrix/tetrixboard.js261
-rw-r--r--examples/script/qstetrix/tetrixpiece.js131
-rw-r--r--examples/script/qstetrix/tetrixwindow.js16
-rw-r--r--examples/script/qstetrix/tetrixwindow.ui175
-rw-r--r--examples/script/script.pro11
-rw-r--r--examples/sql/README40
-rw-r--r--examples/sql/cachedtable/cachedtable.pro11
-rw-r--r--examples/sql/cachedtable/main.cpp58
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp106
-rw-r--r--examples/sql/cachedtable/tableeditor.h73
-rw-r--r--examples/sql/connection.h136
-rw-r--r--examples/sql/drilldown/drilldown.pro16
-rw-r--r--examples/sql/drilldown/drilldown.qrc11
-rw-r--r--examples/sql/drilldown/imageitem.cpp124
-rw-r--r--examples/sql/drilldown/imageitem.h75
-rw-r--r--examples/sql/drilldown/images/beijing.pngbin0 -> 99093 bytes-rw-r--r--examples/sql/drilldown/images/berlin.pngbin0 -> 81944 bytes-rw-r--r--examples/sql/drilldown/images/brisbane.pngbin0 -> 57785 bytes-rw-r--r--examples/sql/drilldown/images/munich.pngbin0 -> 59769 bytes-rw-r--r--examples/sql/drilldown/images/oslo.pngbin0 -> 41781 bytes-rw-r--r--examples/sql/drilldown/images/redwood.pngbin0 -> 39050 bytes-rw-r--r--examples/sql/drilldown/informationwindow.cpp170
-rw-r--r--examples/sql/drilldown/informationwindow.h91
-rw-r--r--examples/sql/drilldown/logo.pngbin0 -> 13378 bytes-rw-r--r--examples/sql/drilldown/main.cpp59
-rw-r--r--examples/sql/drilldown/view.cpp179
-rw-r--r--examples/sql/drilldown/view.h81
-rw-r--r--examples/sql/masterdetail/albumdetails.xml98
-rw-r--r--examples/sql/masterdetail/database.h97
-rw-r--r--examples/sql/masterdetail/dialog.cpp283
-rw-r--r--examples/sql/masterdetail/dialog.h83
-rw-r--r--examples/sql/masterdetail/images/icon.pngbin0 -> 30095 bytes-rw-r--r--examples/sql/masterdetail/images/image.pngbin0 -> 166692 bytes-rw-r--r--examples/sql/masterdetail/main.cpp60
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp430
-rw-r--r--examples/sql/masterdetail/mainwindow.h104
-rw-r--r--examples/sql/masterdetail/masterdetail.pro16
-rw-r--r--examples/sql/masterdetail/masterdetail.qrc6
-rw-r--r--examples/sql/querymodel/customsqlmodel.cpp65
-rw-r--r--examples/sql/querymodel/customsqlmodel.h59
-rw-r--r--examples/sql/querymodel/editablesqlmodel.cpp110
-rw-r--r--examples/sql/querymodel/editablesqlmodel.h63
-rw-r--r--examples/sql/querymodel/main.cpp87
-rw-r--r--examples/sql/querymodel/querymodel.pro13
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.cpp115
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.pro9
-rw-r--r--examples/sql/sql.pro12
-rw-r--r--examples/sql/sqlwidgetmapper/main.cpp52
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro10
-rw-r--r--examples/sql/sqlwidgetmapper/window.cpp159
-rw-r--r--examples/sql/sqlwidgetmapper/window.h90
-rw-r--r--examples/sql/tablemodel/tablemodel.cpp84
-rw-r--r--examples/sql/tablemodel/tablemodel.pro9
-rw-r--r--examples/threads/README40
-rw-r--r--examples/threads/mandelbrot/main.cpp54
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro13
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp240
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h85
-rw-r--r--examples/threads/mandelbrot/renderthread.cpp216
-rw-r--r--examples/threads/mandelbrot/renderthread.h89
-rw-r--r--examples/threads/queuedcustomtype/block.cpp74
-rw-r--r--examples/threads/queuedcustomtype/block.h71
-rw-r--r--examples/threads/queuedcustomtype/main.cpp129
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.pro7
-rw-r--r--examples/threads/queuedcustomtype/renderthread.cpp110
-rw-r--r--examples/threads/queuedcustomtype/renderthread.h77
-rw-r--r--examples/threads/queuedcustomtype/window.cpp137
-rw-r--r--examples/threads/queuedcustomtype/window.h77
-rw-r--r--examples/threads/semaphores/semaphores.cpp107
-rw-r--r--examples/threads/semaphores/semaphores.pro10
-rw-r--r--examples/threads/threads.pro10
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp126
-rw-r--r--examples/threads/waitconditions/waitconditions.pro20
-rw-r--r--examples/tools/README40
-rw-r--r--examples/tools/codecs/codecs.pro11
-rw-r--r--examples/tools/codecs/encodedfiles/.gitattributes2
-rw-r--r--examples/tools/codecs/encodedfiles/iso-8859-1.txt6
-rw-r--r--examples/tools/codecs/encodedfiles/iso-8859-15.txt8
-rw-r--r--examples/tools/codecs/encodedfiles/utf-16.txtbin0 -> 162 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-16be.txtbin0 -> 160 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-16le.txtbin0 -> 160 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-8.txt6
-rw-r--r--examples/tools/codecs/main.cpp52
-rw-r--r--examples/tools/codecs/mainwindow.cpp203
-rw-r--r--examples/tools/codecs/mainwindow.h88
-rw-r--r--examples/tools/codecs/previewform.cpp102
-rw-r--r--examples/tools/codecs/previewform.h80
-rw-r--r--examples/tools/completer/completer.pro12
-rw-r--r--examples/tools/completer/completer.qrc6
-rw-r--r--examples/tools/completer/dirmodel.cpp63
-rw-r--r--examples/tools/completer/dirmodel.h61
-rw-r--r--examples/tools/completer/main.cpp55
-rw-r--r--examples/tools/completer/mainwindow.cpp264
-rw-r--r--examples/tools/completer/mainwindow.h87
-rw-r--r--examples/tools/completer/resources/countries.txt241
-rw-r--r--examples/tools/completer/resources/wordlist.txt1486
-rw-r--r--examples/tools/customcompleter/customcompleter.pro12
-rw-r--r--examples/tools/customcompleter/customcompleter.qrc5
-rw-r--r--examples/tools/customcompleter/main.cpp55
-rw-r--r--examples/tools/customcompleter/mainwindow.cpp118
-rw-r--r--examples/tools/customcompleter/mainwindow.h77
-rw-r--r--examples/tools/customcompleter/resources/wordlist.txt1455
-rw-r--r--examples/tools/customcompleter/textedit.cpp174
-rw-r--r--examples/tools/customcompleter/textedit.h79
-rw-r--r--examples/tools/customtype/customtype.pro3
-rw-r--r--examples/tools/customtype/main.cpp74
-rw-r--r--examples/tools/customtype/message.cpp90
-rw-r--r--examples/tools/customtype/message.h76
-rw-r--r--examples/tools/customtypesending/customtypesending.pro5
-rw-r--r--examples/tools/customtypesending/main.cpp68
-rw-r--r--examples/tools/customtypesending/message.cpp72
-rw-r--r--examples/tools/customtypesending/message.h72
-rw-r--r--examples/tools/customtypesending/window.cpp80
-rw-r--r--examples/tools/customtypesending/window.h73
-rw-r--r--examples/tools/echoplugin/echoplugin.pro11
-rw-r--r--examples/tools/echoplugin/echowindow/echointerface.h62
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.cpp119
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.h80
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.pro18
-rw-r--r--examples/tools/echoplugin/echowindow/main.cpp57
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.cpp55
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.h60
-rw-r--r--examples/tools/echoplugin/plugin/plugin.pro15
-rw-r--r--examples/tools/i18n/i18n.pro26
-rw-r--r--examples/tools/i18n/i18n.qrc18
-rw-r--r--examples/tools/i18n/languagechooser.cpp167
-rw-r--r--examples/tools/i18n/languagechooser.h86
-rw-r--r--examples/tools/i18n/main.cpp55
-rw-r--r--examples/tools/i18n/mainwindow.cpp96
-rw-r--r--examples/tools/i18n/mainwindow.h77
-rw-r--r--examples/tools/i18n/translations/i18n_ar.qmbin0 -> 736 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ar.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_cs.qmbin0 -> 796 bytes-rw-r--r--examples/tools/i18n/translations/i18n_cs.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_de.qmbin0 -> 848 bytes-rw-r--r--examples/tools/i18n/translations/i18n_de.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_el.qmbin0 -> 804 bytes-rw-r--r--examples/tools/i18n/translations/i18n_el.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_en.qmbin0 -> 810 bytes-rw-r--r--examples/tools/i18n/translations/i18n_en.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_eo.qmbin0 -> 806 bytes-rw-r--r--examples/tools/i18n/translations/i18n_eo.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_fr.qmbin0 -> 844 bytes-rw-r--r--examples/tools/i18n/translations/i18n_fr.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_it.qmbin0 -> 808 bytes-rw-r--r--examples/tools/i18n/translations/i18n_it.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_jp.qmbin0 -> 722 bytes-rw-r--r--examples/tools/i18n/translations/i18n_jp.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ko.qmbin0 -> 690 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ko.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_no.qmbin0 -> 804 bytes-rw-r--r--examples/tools/i18n/translations/i18n_no.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ru.qmbin0 -> 806 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ru.ts59
-rw-r--r--examples/tools/i18n/translations/i18n_sv.qmbin0 -> 814 bytes-rw-r--r--examples/tools/i18n/translations/i18n_sv.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_zh.qmbin0 -> 700 bytes-rw-r--r--examples/tools/i18n/translations/i18n_zh.ts57
-rw-r--r--examples/tools/plugandpaint/interfaces.h111
-rw-r--r--examples/tools/plugandpaint/main.cpp58
-rw-r--r--examples/tools/plugandpaint/mainwindow.cpp310
-rw-r--r--examples/tools/plugandpaint/mainwindow.h104
-rw-r--r--examples/tools/plugandpaint/paintarea.cpp196
-rw-r--r--examples/tools/plugandpaint/paintarea.h92
-rw-r--r--examples/tools/plugandpaint/plugandpaint.pro22
-rw-r--r--examples/tools/plugandpaint/plugindialog.cpp157
-rw-r--r--examples/tools/plugandpaint/plugindialog.h77
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictools.pro15
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp198
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h88
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro15
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp125
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h64
-rw-r--r--examples/tools/plugandpaintplugins/plugandpaintplugins.pro9
-rw-r--r--examples/tools/regexp/main.cpp52
-rw-r--r--examples/tools/regexp/regexp.pro9
-rw-r--r--examples/tools/regexp/regexpdialog.cpp188
-rw-r--r--examples/tools/regexp/regexpdialog.h86
-rw-r--r--examples/tools/settingseditor/inifiles/licensepage.ini46
-rw-r--r--examples/tools/settingseditor/inifiles/qsa.ini26
-rw-r--r--examples/tools/settingseditor/locationdialog.cpp217
-rw-r--r--examples/tools/settingseditor/locationdialog.h85
-rw-r--r--examples/tools/settingseditor/main.cpp52
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp223
-rw-r--r--examples/tools/settingseditor/mainwindow.h92
-rw-r--r--examples/tools/settingseditor/settingseditor.pro15
-rw-r--r--examples/tools/settingseditor/settingstree.cpp263
-rw-r--r--examples/tools/settingseditor/settingstree.h91
-rw-r--r--examples/tools/settingseditor/variantdelegate.cpp317
-rw-r--r--examples/tools/settingseditor/variantdelegate.h82
-rw-r--r--examples/tools/styleplugin/plugin/plugin.pro21
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.cpp49
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.h61
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.cpp65
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.h65
-rw-r--r--examples/tools/styleplugin/styleplugin.pro9
-rw-r--r--examples/tools/styleplugin/stylewindow/main.cpp58
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.cpp61
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.h55
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.pro17
-rw-r--r--examples/tools/tools.pro22
-rw-r--r--examples/tools/treemodelcompleter/main.cpp55
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp247
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.h89
-rw-r--r--examples/tools/treemodelcompleter/resources/treemodel.txt20
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.cpp98
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.h71
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.pro12
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.qrc5
-rw-r--r--examples/tools/undoframework/commands.cpp163
-rw-r--r--examples/tools/undoframework/commands.h104
-rw-r--r--examples/tools/undoframework/diagramitem.cpp66
-rw-r--r--examples/tools/undoframework/diagramitem.h73
-rw-r--r--examples/tools/undoframework/diagramscene.cpp76
-rw-r--r--examples/tools/undoframework/diagramscene.h75
-rw-r--r--examples/tools/undoframework/images/cross.pngbin0 -> 114 bytes-rw-r--r--examples/tools/undoframework/main.cpp58
-rw-r--r--examples/tools/undoframework/mainwindow.cpp209
-rw-r--r--examples/tools/undoframework/mainwindow.h100
-rw-r--r--examples/tools/undoframework/undoframework.pro16
-rw-r--r--examples/tools/undoframework/undoframework.qrc6
-rw-r--r--examples/tutorials/README37
-rw-r--r--examples/tutorials/addressbook-fr/README42
-rw-r--r--examples/tutorials/addressbook-fr/addressbook-fr.pro8
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.cpp68
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.h67
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp55
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.cpp158
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.h85
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp55
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.cpp217
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.h87
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.cpp291
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.h100
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.cpp315
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.h103
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.cpp87
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.pro11
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.cpp396
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.h104
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.pro11
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.cpp449
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.h106
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.pro11
-rw-r--r--examples/tutorials/addressbook/README42
-rw-r--r--examples/tutorials/addressbook/addressbook.pro8
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.cpp68
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.h67
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp55
-rw-r--r--examples/tutorials/addressbook/part1/part1.pro9
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.cpp158
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.h85
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp55
-rw-r--r--examples/tutorials/addressbook/part2/part2.pro9
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp217
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.h87
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part3/part3.pro9
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp291
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.h100
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part4/part4.pro9
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp315
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.h103
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.cpp87
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part5/part5.pro11
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp396
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.h104
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part6/part6.pro11
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp449
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.h106
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part7/part7.pro11
-rw-r--r--examples/tutorials/tutorials.pro8
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.cpp66
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.h63
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.ui303
-rw-r--r--examples/uitools/multipleinheritance/main.cpp53
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.pro11
-rw-r--r--examples/uitools/textfinder/forms/input.txt9
-rw-r--r--examples/uitools/textfinder/forms/textfinder.ui89
-rw-r--r--examples/uitools/textfinder/main.cpp56
-rw-r--r--examples/uitools/textfinder/textfinder.cpp156
-rw-r--r--examples/uitools/textfinder/textfinder.h75
-rw-r--r--examples/uitools/textfinder/textfinder.pro10
-rw-r--r--examples/uitools/textfinder/textfinder.qrc6
-rw-r--r--examples/uitools/uitools.pro10
-rwxr-xr-xexamples/webkit/formextractor/form.html64
-rw-r--r--examples/webkit/formextractor/formextractor.cpp74
-rw-r--r--examples/webkit/formextractor/formextractor.h67
-rw-r--r--examples/webkit/formextractor/formextractor.pro16
-rw-r--r--examples/webkit/formextractor/formextractor.qrc5
-rw-r--r--examples/webkit/formextractor/formextractor.ui159
-rw-r--r--examples/webkit/formextractor/main.cpp53
-rw-r--r--examples/webkit/formextractor/mainwindow.cpp87
-rw-r--r--examples/webkit/formextractor/mainwindow.h75
-rw-r--r--examples/webkit/previewer/main.cpp53
-rw-r--r--examples/webkit/previewer/mainwindow.cpp197
-rw-r--r--examples/webkit/previewer/mainwindow.h87
-rw-r--r--examples/webkit/previewer/previewer.cpp65
-rw-r--r--examples/webkit/previewer/previewer.h65
-rw-r--r--examples/webkit/previewer/previewer.pro13
-rw-r--r--examples/webkit/previewer/previewer.ui99
-rw-r--r--examples/webkit/webkit.pro9
-rw-r--r--examples/widgets/README44
-rw-r--r--examples/widgets/analogclock/analogclock.cpp146
-rw-r--r--examples/widgets/analogclock/analogclock.h60
-rw-r--r--examples/widgets/analogclock/analogclock.pro9
-rw-r--r--examples/widgets/analogclock/main.cpp52
-rw-r--r--examples/widgets/calculator/button.cpp64
-rw-r--r--examples/widgets/calculator/button.h59
-rw-r--r--examples/widgets/calculator/calculator.cpp398
-rw-r--r--examples/widgets/calculator/calculator.h108
-rw-r--r--examples/widgets/calculator/calculator.pro11
-rw-r--r--examples/widgets/calculator/main.cpp52
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.pro9
-rw-r--r--examples/widgets/calendarwidget/main.cpp52
-rw-r--r--examples/widgets/calendarwidget/window.cpp462
-rw-r--r--examples/widgets/calendarwidget/window.h128
-rw-r--r--examples/widgets/charactermap/charactermap.pro11
-rw-r--r--examples/widgets/charactermap/characterwidget.cpp178
-rw-r--r--examples/widgets/charactermap/characterwidget.h87
-rw-r--r--examples/widgets/charactermap/main.cpp52
-rw-r--r--examples/widgets/charactermap/mainwindow.cpp196
-rw-r--r--examples/widgets/charactermap/mainwindow.h84
-rw-r--r--examples/widgets/codeeditor/codeeditor.cpp171
-rw-r--r--examples/widgets/codeeditor/codeeditor.h106
-rw-r--r--examples/widgets/codeeditor/codeeditor.pro9
-rw-r--r--examples/widgets/codeeditor/main.cpp56
-rw-r--r--examples/widgets/digitalclock/digitalclock.cpp73
-rw-r--r--examples/widgets/digitalclock/digitalclock.h60
-rw-r--r--examples/widgets/digitalclock/digitalclock.pro9
-rw-r--r--examples/widgets/digitalclock/main.cpp52
-rw-r--r--examples/widgets/groupbox/groupbox.pro9
-rw-r--r--examples/widgets/groupbox/main.cpp52
-rw-r--r--examples/widgets/groupbox/window.cpp190
-rw-r--r--examples/widgets/groupbox/window.h67
-rw-r--r--examples/widgets/icons/iconpreviewarea.cpp142
-rw-r--r--examples/widgets/icons/iconpreviewarea.h78
-rw-r--r--examples/widgets/icons/icons.pro25
-rw-r--r--examples/widgets/icons/iconsizespinbox.cpp71
-rw-r--r--examples/widgets/icons/iconsizespinbox.h60
-rw-r--r--examples/widgets/icons/imagedelegate.cpp106
-rw-r--r--examples/widgets/icons/imagedelegate.h69
-rw-r--r--examples/widgets/icons/images/designer.pngbin0 -> 4205 bytes-rw-r--r--examples/widgets/icons/images/find_disabled.pngbin0 -> 501 bytes-rw-r--r--examples/widgets/icons/images/find_normal.pngbin0 -> 838 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_128x128.pngbin0 -> 7045 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_16x16.pngbin0 -> 683 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_32x32.pngbin0 -> 1609 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_64x64.pngbin0 -> 3533 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_128x128.pngbin0 -> 6909 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_16x16.pngbin0 -> 681 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_32x32.pngbin0 -> 1577 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_64x64.pngbin0 -> 3479 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_16x16.pngbin0 -> 834 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_32x32.pngbin0 -> 1892 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_48x48.pngbin0 -> 3672 bytes-rw-r--r--examples/widgets/icons/main.cpp52
-rw-r--r--examples/widgets/icons/mainwindow.cpp443
-rw-r--r--examples/widgets/icons/mainwindow.h117
-rw-r--r--examples/widgets/imageviewer/imageviewer.cpp278
-rw-r--r--examples/widgets/imageviewer/imageviewer.h104
-rw-r--r--examples/widgets/imageviewer/imageviewer.pro13
-rw-r--r--examples/widgets/imageviewer/main.cpp52
-rw-r--r--examples/widgets/lineedits/lineedits.pro9
-rw-r--r--examples/widgets/lineedits/main.cpp52
-rw-r--r--examples/widgets/lineedits/window.cpp257
-rw-r--r--examples/widgets/lineedits/window.h76
-rw-r--r--examples/widgets/movie/animation.mngbin0 -> 5464 bytes-rw-r--r--examples/widgets/movie/main.cpp52
-rw-r--r--examples/widgets/movie/movie.pro9
-rw-r--r--examples/widgets/movie/movieplayer.cpp211
-rw-r--r--examples/widgets/movie/movieplayer.h97
-rw-r--r--examples/widgets/scribble/main.cpp52
-rw-r--r--examples/widgets/scribble/mainwindow.cpp251
-rw-r--r--examples/widgets/scribble/mainwindow.h93
-rw-r--r--examples/widgets/scribble/scribble.pro11
-rw-r--r--examples/widgets/scribble/scribblearea.cpp215
-rw-r--r--examples/widgets/scribble/scribblearea.h91
-rw-r--r--examples/widgets/shapedclock/main.cpp52
-rw-r--r--examples/widgets/shapedclock/shapedclock.cpp159
-rw-r--r--examples/widgets/shapedclock/shapedclock.h67
-rw-r--r--examples/widgets/shapedclock/shapedclock.pro9
-rw-r--r--examples/widgets/sliders/main.cpp52
-rw-r--r--examples/widgets/sliders/sliders.pro11
-rw-r--r--examples/widgets/sliders/slidersgroup.cpp133
-rw-r--r--examples/widgets/sliders/slidersgroup.h79
-rw-r--r--examples/widgets/sliders/window.cpp146
-rw-r--r--examples/widgets/sliders/window.h85
-rw-r--r--examples/widgets/spinboxes/main.cpp52
-rw-r--r--examples/widgets/spinboxes/spinboxes.pro9
-rw-r--r--examples/widgets/spinboxes/window.cpp252
-rw-r--r--examples/widgets/spinboxes/window.h82
-rw-r--r--examples/widgets/styles/images/woodbackground.pngbin0 -> 7691 bytes-rw-r--r--examples/widgets/styles/images/woodbutton.pngbin0 -> 7689 bytes-rw-r--r--examples/widgets/styles/main.cpp54
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.cpp331
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.h79
-rw-r--r--examples/widgets/styles/styles.pro14
-rw-r--r--examples/widgets/styles/styles.qrc6
-rw-r--r--examples/widgets/styles/widgetgallery.cpp276
-rw-r--r--examples/widgets/styles/widgetgallery.h122
-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked.pngbin0 -> 263 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked_hover.pngbin0 -> 266 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked_pressed.pngbin0 -> 425 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked.pngbin0 -> 159 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked_hover.pngbin0 -> 159 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked_pressed.pngbin0 -> 320 bytes-rw-r--r--examples/widgets/stylesheet/images/down_arrow.pngbin0 -> 175 bytes-rw-r--r--examples/widgets/stylesheet/images/down_arrow_disabled.pngbin0 -> 174 bytes-rw-r--r--examples/widgets/stylesheet/images/frame.pngbin0 -> 253 bytes-rw-r--r--examples/widgets/stylesheet/images/pagefold.pngbin0 -> 1545 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton.pngbin0 -> 533 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton_hover.pngbin0 -> 525 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton_pressed.pngbin0 -> 513 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked.pngbin0 -> 355 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked_hover.pngbin0 -> 532 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked_pressed.pngbin0 -> 599 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked.pngbin0 -> 240 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked_hover.pngbin0 -> 492 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.pngbin0 -> 556 bytes-rw-r--r--examples/widgets/stylesheet/images/sizegrip.pngbin0 -> 129 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown.pngbin0 -> 276 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_hover.pngbin0 -> 268 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_off.pngbin0 -> 249 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_pressed.pngbin0 -> 264 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup.pngbin0 -> 283 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_hover.pngbin0 -> 277 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_off.pngbin0 -> 274 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_pressed.pngbin0 -> 277 bytes-rw-r--r--examples/widgets/stylesheet/images/up_arrow.pngbin0 -> 197 bytes-rw-r--r--examples/widgets/stylesheet/images/up_arrow_disabled.pngbin0 -> 172 bytes-rw-r--r--examples/widgets/stylesheet/layouts/default.ui329
-rw-r--r--examples/widgets/stylesheet/layouts/pagefold.ui349
-rw-r--r--examples/widgets/stylesheet/main.cpp54
-rw-r--r--examples/widgets/stylesheet/mainwindow.cpp75
-rw-r--r--examples/widgets/stylesheet/mainwindow.h67
-rw-r--r--examples/widgets/stylesheet/mainwindow.ui356
-rw-r--r--examples/widgets/stylesheet/qss/coffee.qss112
-rw-r--r--examples/widgets/stylesheet/qss/default.qss1
-rw-r--r--examples/widgets/stylesheet/qss/pagefold.qss299
-rw-r--r--examples/widgets/stylesheet/stylesheet.pro14
-rw-r--r--examples/widgets/stylesheet/stylesheet.qrc39
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.cpp94
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.h68
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.ui171
-rw-r--r--examples/widgets/tablet/main.cpp61
-rw-r--r--examples/widgets/tablet/mainwindow.cpp275
-rw-r--r--examples/widgets/tablet/mainwindow.h114
-rw-r--r--examples/widgets/tablet/tablet.pro13
-rw-r--r--examples/widgets/tablet/tabletapplication.cpp57
-rw-r--r--examples/widgets/tablet/tabletapplication.h67
-rw-r--r--examples/widgets/tablet/tabletcanvas.cpp257
-rw-r--r--examples/widgets/tablet/tabletcanvas.h115
-rw-r--r--examples/widgets/tetrix/main.cpp55
-rw-r--r--examples/widgets/tetrix/tetrix.pro13
-rw-r--r--examples/widgets/tetrix/tetrixboard.cpp409
-rw-r--r--examples/widgets/tetrix/tetrixboard.h117
-rw-r--r--examples/widgets/tetrix/tetrixpiece.cpp146
-rw-r--r--examples/widgets/tetrix/tetrixpiece.h76
-rw-r--r--examples/widgets/tetrix/tetrixwindow.cpp116
-rw-r--r--examples/widgets/tetrix/tetrixwindow.h77
-rw-r--r--examples/widgets/tooltips/images/circle.pngbin0 -> 165 bytes-rw-r--r--examples/widgets/tooltips/images/square.pngbin0 -> 94 bytes-rw-r--r--examples/widgets/tooltips/images/triangle.pngbin0 -> 170 bytes-rw-r--r--examples/widgets/tooltips/main.cpp55
-rw-r--r--examples/widgets/tooltips/shapeitem.cpp100
-rw-r--r--examples/widgets/tooltips/shapeitem.h71
-rw-r--r--examples/widgets/tooltips/sortingbox.cpp302
-rw-r--r--examples/widgets/tooltips/sortingbox.h107
-rw-r--r--examples/widgets/tooltips/tooltips.pro12
-rw-r--r--examples/widgets/tooltips/tooltips.qrc7
-rw-r--r--examples/widgets/validators/ledoff.pngbin0 -> 562 bytes-rw-r--r--examples/widgets/validators/ledon.pngbin0 -> 486 bytes-rw-r--r--examples/widgets/validators/ledwidget.cpp63
-rw-r--r--examples/widgets/validators/ledwidget.h65
-rw-r--r--examples/widgets/validators/localeselector.cpp313
-rw-r--r--examples/widgets/validators/localeselector.h61
-rw-r--r--examples/widgets/validators/main.cpp137
-rw-r--r--examples/widgets/validators/validators.pro21
-rw-r--r--examples/widgets/validators/validators.qrc6
-rw-r--r--examples/widgets/validators/validators.ui467
-rw-r--r--examples/widgets/widgets.pro31
-rw-r--r--examples/widgets/wiggly/dialog.cpp67
-rw-r--r--examples/widgets/wiggly/dialog.h57
-rw-r--r--examples/widgets/wiggly/main.cpp53
-rw-r--r--examples/widgets/wiggly/wiggly.pro11
-rw-r--r--examples/widgets/wiggly/wigglywidget.cpp101
-rw-r--r--examples/widgets/wiggly/wigglywidget.h70
-rw-r--r--examples/widgets/windowflags/controllerwindow.cpp221
-rw-r--r--examples/widgets/windowflags/controllerwindow.h105
-rw-r--r--examples/widgets/windowflags/main.cpp52
-rw-r--r--examples/widgets/windowflags/previewwindow.cpp119
-rw-r--r--examples/widgets/windowflags/previewwindow.h68
-rw-r--r--examples/widgets/windowflags/windowflags.pro11
-rw-r--r--examples/xml/README40
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro18
-rw-r--r--examples/xml/dombookmarks/frank.xbel230
-rw-r--r--examples/xml/dombookmarks/jennifer.xbel93
-rw-r--r--examples/xml/dombookmarks/main.cpp53
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp146
-rw-r--r--examples/xml/dombookmarks/mainwindow.h76
-rw-r--r--examples/xml/dombookmarks/xbeltree.cpp187
-rw-r--r--examples/xml/dombookmarks/xbeltree.h75
-rw-r--r--examples/xml/rsslisting/main.cpp64
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp239
-rw-r--r--examples/xml/rsslisting/rsslisting.h87
-rw-r--r--examples/xml/rsslisting/rsslisting.pro10
-rw-r--r--examples/xml/saxbookmarks/frank.xbel230
-rw-r--r--examples/xml/saxbookmarks/jennifer.xbel93
-rw-r--r--examples/xml/saxbookmarks/main.cpp53
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp161
-rw-r--r--examples/xml/saxbookmarks/mainwindow.h78
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.pro20
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.cpp115
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.h69
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.cpp147
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.h79
-rw-r--r--examples/xml/streambookmarks/frank.xbel230
-rw-r--r--examples/xml/streambookmarks/jennifer.xbel93
-rw-r--r--examples/xml/streambookmarks/main.cpp55
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp177
-rw-r--r--examples/xml/streambookmarks/mainwindow.h80
-rw-r--r--examples/xml/streambookmarks/streambookmarks.pro14
-rw-r--r--examples/xml/streambookmarks/xbelreader.cpp205
-rw-r--r--examples/xml/streambookmarks/xbelreader.h82
-rw-r--r--examples/xml/streambookmarks/xbelwriter.cpp93
-rw-r--r--examples/xml/streambookmarks/xbelwriter.h65
-rw-r--r--examples/xml/xml.pro12
-rw-r--r--examples/xml/xmlstreamlint/main.cpp128
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.pro10
-rw-r--r--examples/xmlpatterns/README38
-rw-r--r--examples/xmlpatterns/filetree/filetree.cpp372
-rw-r--r--examples/xmlpatterns/filetree/filetree.h103
-rw-r--r--examples/xmlpatterns/filetree/filetree.pro13
-rw-r--r--examples/xmlpatterns/filetree/forms/mainwindow.ui200
-rw-r--r--examples/xmlpatterns/filetree/main.cpp54
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.cpp166
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.h73
-rw-r--r--examples/xmlpatterns/filetree/queries.qrc7
-rw-r--r--examples/xmlpatterns/filetree/queries/listCPPFiles.xq19
-rw-r--r--examples/xmlpatterns/filetree/queries/wholeTree.xq1
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui196
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/main.cpp53
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/mainwindow.cpp135
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/mainwindow.h64
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp459
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h139
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro13
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries.qrc7
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq58
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq3
-rw-r--r--examples/xmlpatterns/recipes/files/allRecipes.xq4
-rw-r--r--examples/xmlpatterns/recipes/files/cookbook.xml62
-rw-r--r--examples/xmlpatterns/recipes/files/liquidIngredientsInSoup.xq5
-rw-r--r--examples/xmlpatterns/recipes/files/mushroomSoup.xq5
-rw-r--r--examples/xmlpatterns/recipes/files/preparationLessThan30.xq9
-rw-r--r--examples/xmlpatterns/recipes/files/preparationTimes.xq5
-rw-r--r--examples/xmlpatterns/recipes/forms/querywidget.ui151
-rw-r--r--examples/xmlpatterns/recipes/main.cpp54
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.cpp124
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.h72
-rw-r--r--examples/xmlpatterns/recipes/recipes.pro11
-rw-r--r--examples/xmlpatterns/recipes/recipes.qrc11
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp106
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.h72
-rw-r--r--examples/xmlpatterns/trafficinfo/main.cpp54
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp181
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.h77
-rw-r--r--examples/xmlpatterns/trafficinfo/station_example.wml31
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp164
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.h70
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.ui104
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.cpp94
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.h74
-rw-r--r--examples/xmlpatterns/trafficinfo/time_example.wml56
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.cpp116
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.h74
-rw-r--r--examples/xmlpatterns/trafficinfo/trafficinfo.pro9
-rw-r--r--examples/xmlpatterns/xmlpatterns.pro14
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globalVariables.pro9
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.cpp67
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.gccxml33
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.html40
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq110
-rw-r--r--examples/xmlpatterns/xquery/xquery.pro8
-rw-r--r--lib/README1
-rw-r--r--lib/fonts/DejaVuSans-Bold.ttfbin0 -> 466696 bytes-rw-r--r--lib/fonts/DejaVuSans-BoldOblique.ttfbin0 -> 441736 bytes-rw-r--r--lib/fonts/DejaVuSans-Oblique.ttfbin0 -> 434576 bytes-rw-r--r--lib/fonts/DejaVuSans.ttfbin0 -> 493564 bytes-rw-r--r--lib/fonts/DejaVuSansMono-Bold.ttfbin0 -> 229460 bytes-rw-r--r--lib/fonts/DejaVuSansMono-BoldOblique.ttfbin0 -> 177780 bytes-rw-r--r--lib/fonts/DejaVuSansMono-Oblique.ttfbin0 -> 184896 bytes-rw-r--r--lib/fonts/DejaVuSansMono.ttfbin0 -> 237788 bytes-rw-r--r--lib/fonts/DejaVuSerif-Bold.ttfbin0 -> 201516 bytes-rw-r--r--lib/fonts/DejaVuSerif-BoldOblique.ttfbin0 -> 180948 bytes-rw-r--r--lib/fonts/DejaVuSerif-Oblique.ttfbin0 -> 179872 bytes-rw-r--r--lib/fonts/DejaVuSerif.ttfbin0 -> 210416 bytes-rw-r--r--lib/fonts/README21
-rw-r--r--lib/fonts/UTBI____.pfa1172
-rw-r--r--lib/fonts/UTB_____.pfa1134
-rw-r--r--lib/fonts/UTI_____.pfa1165
-rw-r--r--lib/fonts/UTRG____.pfa1126
-rw-r--r--lib/fonts/Vera.ttfbin0 -> 65932 bytes-rw-r--r--lib/fonts/VeraBI.ttfbin0 -> 63208 bytes-rw-r--r--lib/fonts/VeraBd.ttfbin0 -> 58716 bytes-rw-r--r--lib/fonts/VeraIt.ttfbin0 -> 63684 bytes-rw-r--r--lib/fonts/VeraMoBI.ttfbin0 -> 55032 bytes-rw-r--r--lib/fonts/VeraMoBd.ttfbin0 -> 49052 bytes-rw-r--r--lib/fonts/VeraMoIt.ttfbin0 -> 54508 bytes-rw-r--r--lib/fonts/VeraMono.ttfbin0 -> 49224 bytes-rw-r--r--lib/fonts/VeraSe.ttfbin0 -> 60280 bytes-rw-r--r--lib/fonts/VeraSeBd.ttfbin0 -> 58736 bytes-rw-r--r--lib/fonts/c0419bt_.pfbbin0 -> 40766 bytes-rw-r--r--lib/fonts/c0582bt_.pfbbin0 -> 39511 bytes-rw-r--r--lib/fonts/c0583bt_.pfbbin0 -> 40008 bytes-rw-r--r--lib/fonts/c0611bt_.pfbbin0 -> 39871 bytes-rw-r--r--lib/fonts/c0632bt_.pfbbin0 -> 33799 bytes-rw-r--r--lib/fonts/c0633bt_.pfbbin0 -> 35229 bytes-rw-r--r--lib/fonts/c0648bt_.pfbbin0 -> 34869 bytes-rw-r--r--lib/fonts/c0649bt_.pfbbin0 -> 35118 bytes-rw-r--r--lib/fonts/cour.pfa1954
-rw-r--r--lib/fonts/courb.pfa1966
-rw-r--r--lib/fonts/courbi.pfa1940
-rw-r--r--lib/fonts/couri.pfa1893
-rw-r--r--lib/fonts/cursor.pfa954
-rw-r--r--lib/fonts/fixed_120_50.qpfbin0 -> 3109 bytes-rw-r--r--lib/fonts/fixed_70_50.qpfbin0 -> 2567 bytes-rw-r--r--lib/fonts/helvetica_100_50.qpfbin0 -> 3046 bytes-rw-r--r--lib/fonts/helvetica_100_50i.qpfbin0 -> 3052 bytes-rw-r--r--lib/fonts/helvetica_100_75.qpfbin0 -> 3040 bytes-rw-r--r--lib/fonts/helvetica_100_75i.qpfbin0 -> 3081 bytes-rw-r--r--lib/fonts/helvetica_120_50.qpfbin0 -> 3301 bytes-rw-r--r--lib/fonts/helvetica_120_50i.qpfbin0 -> 3560 bytes-rw-r--r--lib/fonts/helvetica_120_75.qpfbin0 -> 3326 bytes-rw-r--r--lib/fonts/helvetica_120_75i.qpfbin0 -> 3759 bytes-rw-r--r--lib/fonts/helvetica_140_50.qpfbin0 -> 3860 bytes-rw-r--r--lib/fonts/helvetica_140_50i.qpfbin0 -> 4208 bytes-rw-r--r--lib/fonts/helvetica_140_75.qpfbin0 -> 4035 bytes-rw-r--r--lib/fonts/helvetica_140_75i.qpfbin0 -> 4498 bytes-rw-r--r--lib/fonts/helvetica_180_50.qpfbin0 -> 5179 bytes-rw-r--r--lib/fonts/helvetica_180_50i.qpfbin0 -> 5778 bytes-rw-r--r--lib/fonts/helvetica_180_75.qpfbin0 -> 5712 bytes-rw-r--r--lib/fonts/helvetica_180_75i.qpfbin0 -> 5977 bytes-rw-r--r--lib/fonts/helvetica_240_50.qpfbin0 -> 7691 bytes-rw-r--r--lib/fonts/helvetica_240_50i.qpfbin0 -> 8333 bytes-rw-r--r--lib/fonts/helvetica_240_75.qpfbin0 -> 7912 bytes-rw-r--r--lib/fonts/helvetica_240_75i.qpfbin0 -> 8588 bytes-rw-r--r--lib/fonts/helvetica_80_50.qpfbin0 -> 2735 bytes-rw-r--r--lib/fonts/helvetica_80_50i.qpfbin0 -> 2742 bytes-rw-r--r--lib/fonts/helvetica_80_75.qpfbin0 -> 2745 bytes-rw-r--r--lib/fonts/helvetica_80_75i.qpfbin0 -> 2750 bytes-rw-r--r--lib/fonts/japanese_230_50.qpfbin0 -> 263331 bytes-rw-r--r--lib/fonts/l047013t.pfa1346
-rw-r--r--lib/fonts/l047016t.pfa1356
-rw-r--r--lib/fonts/l047033t.pfa1353
-rw-r--r--lib/fonts/l047036t.pfa1361
-rw-r--r--lib/fonts/l048013t.pfa1233
-rw-r--r--lib/fonts/l048016t.pfa1269
-rw-r--r--lib/fonts/l048033t.pfa1267
-rw-r--r--lib/fonts/l048036t.pfa1260
-rw-r--r--lib/fonts/l049013t.pfa1598
-rw-r--r--lib/fonts/l049016t.pfa1582
-rw-r--r--lib/fonts/l049033t.pfa1735
-rw-r--r--lib/fonts/l049036t.pfa1613
-rw-r--r--lib/fonts/micro_40_50.qpfbin0 -> 1602 bytes-rw-r--r--lib/fonts/unifont_160_50.qpfbin0 -> 1215089 bytes-rw-r--r--mkspecs/aix-g++-64/qmake.conf86
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h170
-rw-r--r--mkspecs/aix-g++/qmake.conf86
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h170
-rw-r--r--mkspecs/aix-xlc-64/qmake.conf85
-rw-r--r--mkspecs/aix-xlc-64/qplatformdefs.h156
-rw-r--r--mkspecs/aix-xlc/qmake.conf86
-rw-r--r--mkspecs/aix-xlc/qplatformdefs.h166
-rw-r--r--mkspecs/common/g++.conf52
-rw-r--r--mkspecs/common/linux.conf49
-rw-r--r--mkspecs/common/llvm.conf49
-rw-r--r--mkspecs/common/mac-g++.conf76
-rw-r--r--mkspecs/common/mac-llvm.conf76
-rw-r--r--mkspecs/common/mac.conf45
-rw-r--r--mkspecs/common/qws.conf19
-rw-r--r--mkspecs/common/unix.conf11
-rw-r--r--mkspecs/common/wince.conf87
-rw-r--r--mkspecs/cygwin-g++/qmake.conf87
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h137
-rw-r--r--mkspecs/darwin-g++/qmake.conf105
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h126
-rw-r--r--mkspecs/features/assistant.prf9
-rw-r--r--mkspecs/features/build_pass.prf1
-rw-r--r--mkspecs/features/dbusadaptors.prf44
-rw-r--r--mkspecs/features/dbusinterfaces.prf45
-rw-r--r--mkspecs/features/debug.prf8
-rw-r--r--mkspecs/features/debug_and_release.prf1
-rw-r--r--mkspecs/features/default_post.prf10
-rw-r--r--mkspecs/features/default_pre.prf2
-rw-r--r--mkspecs/features/designer.prf6
-rw-r--r--mkspecs/features/dll.prf2
-rw-r--r--mkspecs/features/exclusive_builds.prf100
-rw-r--r--mkspecs/features/help.prf4
-rw-r--r--mkspecs/features/incredibuild_xge.prf11
-rw-r--r--mkspecs/features/lex.prf24
-rw-r--r--mkspecs/features/link_pkgconfig.prf6
-rw-r--r--mkspecs/features/mac/default_post.prf2
-rw-r--r--mkspecs/features/mac/default_pre.prf3
-rw-r--r--mkspecs/features/mac/dwarf2.prf6
-rw-r--r--mkspecs/features/mac/objective_c.prf24
-rw-r--r--mkspecs/features/mac/ppc.prf7
-rw-r--r--mkspecs/features/mac/ppc64.prf7
-rw-r--r--mkspecs/features/mac/rez.prf16
-rw-r--r--mkspecs/features/mac/sdk.prf8
-rw-r--r--mkspecs/features/mac/x86.prf7
-rw-r--r--mkspecs/features/mac/x86_64.prf7
-rw-r--r--mkspecs/features/moc.prf86
-rw-r--r--mkspecs/features/no_debug_info.prf5
-rw-r--r--mkspecs/features/qdbus.prf2
-rw-r--r--mkspecs/features/qt.prf183
-rw-r--r--mkspecs/features/qt_config.prf14
-rw-r--r--mkspecs/features/qt_functions.prf66
-rw-r--r--mkspecs/features/qtestlib.prf4
-rw-r--r--mkspecs/features/qtopia.prf1
-rw-r--r--mkspecs/features/qtopiainc.prf1
-rw-r--r--mkspecs/features/qtopialib.prf2
-rw-r--r--mkspecs/features/qttest_p4.prf28
-rw-r--r--mkspecs/features/release.prf7
-rw-r--r--mkspecs/features/resources.prf31
-rw-r--r--mkspecs/features/shared.prf7
-rw-r--r--mkspecs/features/silent.prf6
-rw-r--r--mkspecs/features/static.prf9
-rw-r--r--mkspecs/features/static_and_shared.prf3
-rw-r--r--mkspecs/features/staticlib.prf1
-rw-r--r--mkspecs/features/uic.prf111
-rw-r--r--mkspecs/features/uitools.prf12
-rw-r--r--mkspecs/features/unix/bsymbolic_functions.prf6
-rw-r--r--mkspecs/features/unix/dylib.prf1
-rw-r--r--mkspecs/features/unix/hide_symbols.prf4
-rw-r--r--mkspecs/features/unix/largefile.prf2
-rw-r--r--mkspecs/features/unix/opengl.prf4
-rw-r--r--mkspecs/features/unix/separate_debug_info.prf17
-rw-r--r--mkspecs/features/unix/thread.prf14
-rw-r--r--mkspecs/features/unix/x11.prf1
-rw-r--r--mkspecs/features/unix/x11inc.prf3
-rw-r--r--mkspecs/features/unix/x11lib.prf2
-rw-r--r--mkspecs/features/unix/x11sm.prf2
-rw-r--r--mkspecs/features/use_c_linker.prf5
-rw-r--r--mkspecs/features/warn_off.prf4
-rw-r--r--mkspecs/features/warn_on.prf5
-rw-r--r--mkspecs/features/win32/console.prf2
-rw-r--r--mkspecs/features/win32/default_post.prf11
-rw-r--r--mkspecs/features/win32/default_pre.prf3
-rw-r--r--mkspecs/features/win32/dumpcpp.prf11
-rw-r--r--mkspecs/features/win32/embed_manifest_dll.prf11
-rw-r--r--mkspecs/features/win32/embed_manifest_exe.prf11
-rw-r--r--mkspecs/features/win32/exceptions.prf5
-rw-r--r--mkspecs/features/win32/exceptions_off.prf5
-rw-r--r--mkspecs/features/win32/opengl.prf3
-rw-r--r--mkspecs/features/win32/qaxcontainer.prf34
-rw-r--r--mkspecs/features/win32/qaxserver.prf64
-rw-r--r--mkspecs/features/win32/qt_dll.prf1
-rw-r--r--mkspecs/features/win32/rtti.prf3
-rw-r--r--mkspecs/features/win32/rtti_off.prf3
-rw-r--r--mkspecs/features/win32/stl.prf3
-rw-r--r--mkspecs/features/win32/stl_off.prf3
-rw-r--r--mkspecs/features/win32/thread.prf30
-rw-r--r--mkspecs/features/win32/thread_off.prf2
-rw-r--r--mkspecs/features/win32/windows.prf15
-rw-r--r--mkspecs/features/yacc.prf42
-rw-r--r--mkspecs/freebsd-g++/qmake.conf52
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h146
-rw-r--r--mkspecs/freebsd-g++34/qmake.conf86
-rw-r--r--mkspecs/freebsd-g++34/qplatformdefs.h42
-rw-r--r--mkspecs/freebsd-g++40/qmake.conf86
-rw-r--r--mkspecs/freebsd-g++40/qplatformdefs.h42
-rw-r--r--mkspecs/freebsd-icc/qmake.conf109
-rw-r--r--mkspecs/freebsd-icc/qplatformdefs.h42
-rw-r--r--mkspecs/hpux-acc-64/qmake.conf130
-rw-r--r--mkspecs/hpux-acc-64/qplatformdefs.h149
-rw-r--r--mkspecs/hpux-acc-o64/qmake.conf128
-rw-r--r--mkspecs/hpux-acc-o64/qplatformdefs.h150
-rw-r--r--mkspecs/hpux-acc/qmake.conf109
-rw-r--r--mkspecs/hpux-acc/qplatformdefs.h158
-rw-r--r--mkspecs/hpux-g++-64/qmake.conf92
-rw-r--r--mkspecs/hpux-g++-64/qplatformdefs.h149
-rw-r--r--mkspecs/hpux-g++/qmake.conf92
-rw-r--r--mkspecs/hpux-g++/qplatformdefs.h157
-rw-r--r--mkspecs/hpuxi-acc-32/qmake.conf84
-rw-r--r--mkspecs/hpuxi-acc-32/qplatformdefs.h149
-rw-r--r--mkspecs/hpuxi-acc-64/qmake.conf127
-rw-r--r--mkspecs/hpuxi-acc-64/qplatformdefs.h149
-rw-r--r--mkspecs/hpuxi-g++-64/qmake.conf95
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h148
-rw-r--r--mkspecs/hurd-g++/qmake.conf89
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h137
-rw-r--r--mkspecs/irix-cc-64/qmake.conf119
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h158
-rw-r--r--mkspecs/irix-cc/qmake.conf119
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h158
-rw-r--r--mkspecs/irix-g++-64/qmake.conf92
-rw-r--r--mkspecs/irix-g++-64/qplatformdefs.h42
-rw-r--r--mkspecs/irix-g++/qmake.conf92
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h163
-rw-r--r--mkspecs/linux-cxx/qmake.conf81
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h164
-rw-r--r--mkspecs/linux-ecc-64/qmake.conf88
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h164
-rw-r--r--mkspecs/linux-g++-32/qmake.conf16
-rw-r--r--mkspecs/linux-g++-32/qplatformdefs.h42
-rw-r--r--mkspecs/linux-g++-64/qmake.conf23
-rw-r--r--mkspecs/linux-g++-64/qplatformdefs.h42
-rw-r--r--mkspecs/linux-g++/qmake.conf13
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h164
-rw-r--r--mkspecs/linux-icc-32/qmake.conf10
-rw-r--r--mkspecs/linux-icc-32/qplatformdefs.h42
-rw-r--r--mkspecs/linux-icc-64/qmake.conf16
-rw-r--r--mkspecs/linux-icc-64/qplatformdefs.h42
-rw-r--r--mkspecs/linux-icc/qmake.conf109
-rw-r--r--mkspecs/linux-icc/qplatformdefs.h42
-rw-r--r--mkspecs/linux-kcc/qmake.conf97
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h167
-rw-r--r--mkspecs/linux-llvm/qmake.conf13
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h164
-rw-r--r--mkspecs/linux-lsb-g++/qmake.conf96
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h173
-rw-r--r--mkspecs/linux-pgcc/qmake.conf86
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h164
-rw-r--r--mkspecs/lynxos-g++/qmake.conf91
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h134
-rw-r--r--mkspecs/macx-g++/Info.plist.app20
-rw-r--r--mkspecs/macx-g++/Info.plist.lib18
-rw-r--r--mkspecs/macx-g++/qmake.conf20
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h132
-rw-r--r--mkspecs/macx-g++42/Info.plist.app20
-rw-r--r--mkspecs/macx-g++42/Info.plist.lib18
-rw-r--r--mkspecs/macx-g++42/qmake.conf21
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h132
-rw-r--r--mkspecs/macx-icc/qmake.conf81
-rw-r--r--mkspecs/macx-icc/qplatformdefs.h43
-rw-r--r--mkspecs/macx-llvm/Info.plist.app20
-rw-r--r--mkspecs/macx-llvm/Info.plist.lib18
-rw-r--r--mkspecs/macx-llvm/qmake.conf19
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h132
-rwxr-xr-xmkspecs/macx-pbuilder/Info.plist.app20
-rwxr-xr-xmkspecs/macx-pbuilder/qmake.conf7
-rw-r--r--mkspecs/macx-pbuilder/qplatformdefs.h132
-rwxr-xr-xmkspecs/macx-xcode/Info.plist.app20
-rw-r--r--mkspecs/macx-xcode/Info.plist.lib18
-rwxr-xr-xmkspecs/macx-xcode/qmake.conf26
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h132
-rw-r--r--mkspecs/macx-xlc/qmake.conf98
-rw-r--r--mkspecs/macx-xlc/qplatformdefs.h128
-rw-r--r--mkspecs/netbsd-g++/qmake.conf87
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h135
-rw-r--r--mkspecs/openbsd-g++/qmake.conf88
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h151
-rw-r--r--mkspecs/qws/freebsd-generic-g++/qmake.conf84
-rw-r--r--mkspecs/qws/freebsd-generic-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-arm-g++/qmake.conf20
-rw-r--r--mkspecs/qws/linux-arm-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-armv6-g++/qmake.conf22
-rw-r--r--mkspecs/qws/linux-armv6-g++/qplatformdefs.h1
-rw-r--r--mkspecs/qws/linux-avr32-g++/qmake.conf20
-rw-r--r--mkspecs/qws/linux-avr32-g++/qplatformdefs.h1
-rw-r--r--mkspecs/qws/linux-cellon-g++/qmake.conf29
-rw-r--r--mkspecs/qws/linux-cellon-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-dm7000-g++/qmake.conf26
-rw-r--r--mkspecs/qws/linux-dm7000-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-dm800-g++/qmake.conf24
-rw-r--r--mkspecs/qws/linux-dm800-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-generic-g++-32/qmake.conf14
-rw-r--r--mkspecs/qws/linux-generic-g++-32/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-generic-g++/qmake.conf9
-rw-r--r--mkspecs/qws/linux-generic-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-ipaq-g++/qmake.conf21
-rw-r--r--mkspecs/qws/linux-ipaq-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-lsb-g++/qmake.conf22
-rw-r--r--mkspecs/qws/linux-lsb-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-mips-g++/qmake.conf22
-rw-r--r--mkspecs/qws/linux-mips-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-ppc-g++/qmake.conf9
-rw-r--r--mkspecs/qws/linux-ppc-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-sh-g++/qmake.conf20
-rw-r--r--mkspecs/qws/linux-sh-g++/qplatformdefs.h1
-rw-r--r--mkspecs/qws/linux-sh4al-g++/qmake.conf23
-rw-r--r--mkspecs/qws/linux-sh4al-g++/qplatformdefs.h1
-rw-r--r--mkspecs/qws/linux-sharp-g++/qmake.conf23
-rw-r--r--mkspecs/qws/linux-sharp-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-x86-g++/qmake.conf9
-rw-r--r--mkspecs/qws/linux-x86-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-x86_64-g++/qmake.conf14
-rw-r--r--mkspecs/qws/linux-x86_64-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/linux-zylonite-g++/qmake.conf25
-rw-r--r--mkspecs/qws/linux-zylonite-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/macx-generic-g++/qmake.conf87
-rw-r--r--mkspecs/qws/macx-generic-g++/qplatformdefs.h42
-rw-r--r--mkspecs/qws/solaris-generic-g++/qmake.conf88
-rw-r--r--mkspecs/qws/solaris-generic-g++/qplatformdefs.h42
-rw-r--r--mkspecs/sco-cc/qmake.conf82
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h129
-rw-r--r--mkspecs/sco-g++/qmake.conf83
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h133
-rw-r--r--mkspecs/solaris-cc-64/qmake.conf107
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h161
-rw-r--r--mkspecs/solaris-cc/qmake.conf90
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h183
-rw-r--r--mkspecs/solaris-g++-64/qmake.conf111
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h170
-rw-r--r--mkspecs/solaris-g++/qmake.conf94
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h192
-rw-r--r--mkspecs/tru64-cxx/qmake.conf83
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h146
-rw-r--r--mkspecs/tru64-g++/qmake.conf85
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h146
-rw-r--r--mkspecs/unixware-cc/qmake.conf88
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h129
-rw-r--r--mkspecs/unixware-g++/qmake.conf87
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h129
-rw-r--r--mkspecs/win32-borland/qmake.conf90
-rw-r--r--mkspecs/win32-borland/qplatformdefs.h215
-rw-r--r--mkspecs/win32-g++/qmake.conf106
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h164
-rw-r--r--mkspecs/win32-icc/qmake.conf89
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h151
-rw-r--r--mkspecs/win32-msvc.net/qmake.conf89
-rw-r--r--mkspecs/win32-msvc.net/qplatformdefs.h145
-rw-r--r--mkspecs/win32-msvc/features/incremental.prf2
-rw-r--r--mkspecs/win32-msvc/features/incremental_off.prf2
-rw-r--r--mkspecs/win32-msvc/qmake.conf86
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h148
-rw-r--r--mkspecs/win32-msvc2002/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2002/qplatformdefs.h42
-rw-r--r--mkspecs/win32-msvc2003/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2003/qplatformdefs.h42
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2005/qplatformdefs.h147
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2008/qplatformdefs.h42
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2005/qmake.conf23
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wince50standard-armv4i-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2005/qmake.conf24
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf24
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wince50standard-mipsiv-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wince50standard-sh4-msvc2005/qmake.conf23
-rw-r--r--mkspecs/wince50standard-sh4-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wince50standard-sh4-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wince50standard-sh4-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wince50standard-x86-msvc2005/default_post.prf6
-rw-r--r--mkspecs/wince50standard-x86-msvc2005/qmake.conf21
-rw-r--r--mkspecs/wince50standard-x86-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wince50standard-x86-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wince50standard-x86-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wince50standard-x86-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wince60standard-armv4i-msvc2005/qmake.conf94
-rw-r--r--mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wincewm50pocket-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wincewm50pocket-msvc2005/qmake.conf21
-rw-r--r--mkspecs/wincewm50pocket-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wincewm50pocket-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wincewm50pocket-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wincewm50pocket-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wincewm50smart-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wincewm50smart-msvc2005/qmake.conf21
-rw-r--r--mkspecs/wincewm50smart-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wincewm50smart-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wincewm50smart-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wincewm50smart-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wincewm60professional-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wincewm60professional-msvc2005/qmake.conf13
-rw-r--r--mkspecs/wincewm60professional-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wincewm60professional-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wincewm60professional-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wincewm60professional-msvc2008/qplatformdefs.h43
-rw-r--r--mkspecs/wincewm60standard-msvc2005/default_post.prf7
-rw-r--r--mkspecs/wincewm60standard-msvc2005/qmake.conf18
-rw-r--r--mkspecs/wincewm60standard-msvc2005/qplatformdefs.h131
-rw-r--r--mkspecs/wincewm60standard-msvc2008/default_post.prf1
-rw-r--r--mkspecs/wincewm60standard-msvc2008/qmake.conf3
-rw-r--r--mkspecs/wincewm60standard-msvc2008/qplatformdefs.h43
-rw-r--r--projects.pro142
-rw-r--r--qmake/CHANGES99
-rw-r--r--qmake/Makefile.unix416
-rw-r--r--qmake/Makefile.win32591
-rw-r--r--qmake/Makefile.win32-g++439
-rw-r--r--qmake/Makefile.win32-g++-sh438
-rw-r--r--qmake/cachekeys.h183
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp1860
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h88
-rw-r--r--qmake/generators/makefile.cpp3023
-rw-r--r--qmake/generators/makefile.h267
-rw-r--r--qmake/generators/makefiledeps.cpp963
-rw-r--r--qmake/generators/makefiledeps.h132
-rw-r--r--qmake/generators/metamakefile.cpp490
-rw-r--r--qmake/generators/metamakefile.h77
-rw-r--r--qmake/generators/projectgenerator.cpp510
-rw-r--r--qmake/generators/projectgenerator.h71
-rw-r--r--qmake/generators/unix/unixmake.cpp865
-rw-r--r--qmake/generators/unix/unixmake.h88
-rw-r--r--qmake/generators/unix/unixmake2.cpp1478
-rw-r--r--qmake/generators/win32/borland_bmake.cpp177
-rw-r--r--qmake/generators/win32/borland_bmake.h68
-rw-r--r--qmake/generators/win32/mingw_make.cpp460
-rw-r--r--qmake/generators/win32/mingw_make.h87
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp1207
-rw-r--r--qmake/generators/win32/msvc_dsp.h122
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp322
-rw-r--r--qmake/generators/win32/msvc_nmake.h76
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp2636
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h1078
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp1785
-rw-r--r--qmake/generators/win32/msvc_vcproj.h152
-rw-r--r--qmake/generators/win32/winmakefile.cpp821
-rw-r--r--qmake/generators/win32/winmakefile.h96
-rw-r--r--qmake/generators/xmloutput.cpp340
-rw-r--r--qmake/generators/xmloutput.h210
-rw-r--r--qmake/main.cpp196
-rw-r--r--qmake/meta.cpp206
-rw-r--r--qmake/meta.h103
-rw-r--r--qmake/option.cpp776
-rw-r--r--qmake/option.h214
-rw-r--r--qmake/project.cpp3201
-rw-r--r--qmake/project.h208
-rw-r--r--qmake/property.cpp234
-rw-r--r--qmake/property.h71
-rw-r--r--qmake/qmake.pri131
-rw-r--r--qmake/qmake.pro25
-rw-r--r--qmake/qmake_pch.h71
-rw-r--r--src/3rdparty/.gitattributes19
-rw-r--r--src/3rdparty/Makefile9
-rw-r--r--src/3rdparty/README22
-rw-r--r--src/3rdparty/clucene/APACHE.license201
-rw-r--r--src/3rdparty/clucene/AUTHORS22
-rw-r--r--src/3rdparty/clucene/COPYING30
-rw-r--r--src/3rdparty/clucene/ChangeLog0
-rw-r--r--src/3rdparty/clucene/LGPL.license475
-rw-r--r--src/3rdparty/clucene/README92
-rw-r--r--src/3rdparty/clucene/src/CLucene.h38
-rw-r--r--src/3rdparty/clucene/src/CLucene/CLBackwards.h87
-rw-r--r--src/3rdparty/clucene/src/CLucene/CLConfig.h304
-rw-r--r--src/3rdparty/clucene/src/CLucene/CLMonolithic.cpp115
-rw-r--r--src/3rdparty/clucene/src/CLucene/LuceneThreads.h72
-rw-r--r--src/3rdparty/clucene/src/CLucene/StdHeader.cpp132
-rw-r--r--src/3rdparty/clucene/src/CLucene/StdHeader.h491
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/AnalysisHeader.cpp200
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/AnalysisHeader.h234
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/Analyzers.cpp389
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/Analyzers.h309
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardAnalyzer.cpp46
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardAnalyzer.h47
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardFilter.cpp58
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardFilter.h37
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardTokenizer.cpp446
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardTokenizer.h88
-rw-r--r--src/3rdparty/clucene/src/CLucene/analysis/standard/StandardTokenizerConstants.h30
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/CompilerAcc.h166
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/CompilerBcb.h68
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/CompilerGcc.h175
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/CompilerMsvc.h134
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/PlatformMac.h19
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/PlatformUnix.h12
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/PlatformWin32.h11
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/compiler.h259
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/define_std.h110
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/gunichartables.cpp386
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/gunichartables.h11264
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_lltot.cpp47
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tchar.h106
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tcscasecmp.cpp21
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tcslwr.cpp15
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tcstod.cpp23
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tcstoll.cpp46
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp149
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_wchar.h121
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/threadCSection.h71
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/threadPthread.h59
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/threads.cpp162
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/utf8.cpp237
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/condition.cpp80
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/condition.h64
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/error.cpp73
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/error.h74
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/lucenebase.h75
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/mem.h130
-rw-r--r--src/3rdparty/clucene/src/CLucene/debug/memtracking.cpp371
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/DateField.cpp60
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/DateField.h64
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/Document.cpp237
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/Document.h158
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/Field.cpp315
-rw-r--r--src/3rdparty/clucene/src/CLucene/document/Field.h261
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/CompoundFile.cpp380
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/CompoundFile.h219
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/DocumentWriter.cpp571
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/DocumentWriter.h107
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldInfo.h16
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldInfos.cpp236
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldInfos.h171
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldsReader.cpp231
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldsReader.h60
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldsWriter.cpp186
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/FieldsWriter.h49
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexModifier.cpp254
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexModifier.h316
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexReader.cpp668
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexReader.h485
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexWriter.cpp697
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/IndexWriter.h425
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/MultiReader.cpp722
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/MultiReader.h202
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentHeader.h314
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentInfos.cpp259
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentInfos.h128
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMergeInfo.cpp104
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMergeInfo.h47
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMergeQueue.cpp74
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMergeQueue.h38
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMerger.cpp723
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentMerger.h169
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentReader.cpp816
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermDocs.cpp212
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermEnum.cpp389
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermEnum.h138
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermPositions.cpp101
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/SegmentTermVector.cpp188
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/Term.cpp179
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/Term.h146
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfo.cpp53
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfo.h61
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfosReader.cpp443
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfosReader.h106
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfosWriter.cpp185
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermInfosWriter.h89
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermVector.h418
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermVectorReader.cpp393
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/TermVectorWriter.cpp349
-rw-r--r--src/3rdparty/clucene/src/CLucene/index/Terms.h174
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/Lexer.cpp371
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/Lexer.h67
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.cpp204
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/MultiFieldQueryParser.h136
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryParser.cpp509
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryParser.h165
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryParserBase.cpp369
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryParserBase.h204
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryToken.cpp73
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/QueryToken.h76
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/TokenList.cpp79
-rw-r--r--src/3rdparty/clucene/src/CLucene/queryParser/TokenList.h38
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/BooleanClause.h90
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/BooleanQuery.cpp363
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/BooleanQuery.h126
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/BooleanScorer.cpp248
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/BooleanScorer.h99
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/CachingWrapperFilter.cpp86
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/CachingWrapperFilter.h80
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ChainedFilter.cpp213
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ChainedFilter.h86
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Compare.h161
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ConjunctionScorer.cpp144
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ConjunctionScorer.h50
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/DateFilter.cpp93
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/DateFilter.h59
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ExactPhraseScorer.cpp85
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/ExactPhraseScorer.h31
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Explanation.cpp133
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Explanation.h66
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldCache.cpp55
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldCache.h182
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp529
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.h144
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldDoc.h70
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldDocSortedHitQueue.cpp171
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldDocSortedHitQueue.h159
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldSortedHitQueue.cpp212
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FieldSortedHitQueue.h216
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Filter.h46
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FilteredTermEnum.cpp136
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FilteredTermEnum.h61
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FuzzyQuery.cpp357
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/FuzzyQuery.h156
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/HitQueue.cpp107
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/HitQueue.h55
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Hits.cpp174
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/IndexSearcher.cpp362
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/IndexSearcher.h73
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/MultiSearcher.cpp227
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/MultiSearcher.h95
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/MultiTermQuery.cpp98
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/MultiTermQuery.h62
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhrasePositions.cpp116
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhrasePositions.h41
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhraseQuery.cpp463
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhraseQuery.h127
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhraseQueue.h36
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhraseScorer.cpp225
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PhraseScorer.h65
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PrefixQuery.cpp273
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/PrefixQuery.h75
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/QueryFilter.cpp73
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/QueryFilter.h44
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/RangeFilter.cpp150
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/RangeFilter.h51
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/RangeQuery.cpp204
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/RangeQuery.h71
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Scorer.h80
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/SearchHeader.cpp141
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/SearchHeader.h456
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Similarity.cpp233
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Similarity.h268
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/SloppyPhraseScorer.cpp106
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/SloppyPhraseScorer.h34
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Sort.cpp345
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/Sort.h356
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/TermQuery.cpp213
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/TermQuery.h81
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/TermScorer.cpp120
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/TermScorer.h53
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/WildcardQuery.cpp147
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/WildcardQuery.h69
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/WildcardTermEnum.cpp150
-rw-r--r--src/3rdparty/clucene/src/CLucene/search/WildcardTermEnum.h67
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/Directory.h108
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp637
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/FSDirectory.h216
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/IndexInput.cpp233
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/IndexInput.h190
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/IndexOutput.cpp163
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/IndexOutput.h152
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/InputStream.h21
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/Lock.cpp27
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/Lock.h106
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/MMapInput.cpp203
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/OutputStream.h23
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/RAMDirectory.cpp446
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/RAMDirectory.h195
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/TransactionalRAMDirectory.cpp212
-rw-r--r--src/3rdparty/clucene/src/CLucene/store/TransactionalRAMDirectory.h76
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Arrays.h164
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/BitSet.cpp119
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/BitSet.h62
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Equators.cpp180
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Equators.h274
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/FastCharStream.cpp107
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/FastCharStream.h55
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Misc.cpp288
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Misc.h75
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/PriorityQueue.h177
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Reader.cpp186
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Reader.h138
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/StringBuffer.cpp335
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/StringBuffer.h77
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/StringIntern.cpp158
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/StringIntern.h61
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/ThreadLocal.cpp55
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/ThreadLocal.h143
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/VoidList.h175
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/VoidMap.h270
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/bufferedstream.h155
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/dirent.cpp221
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/dirent.h105
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp98
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/fileinputstream.h38
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/inputstreambuffer.h126
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/jstreamsconfig.h9
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/streambase.h148
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/stringreader.h124
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/subinputstream.h141
-rw-r--r--src/3rdparty/des/des.cpp602
-rw-r--r--src/3rdparty/freetype/ChangeLog3368
-rw-r--r--src/3rdparty/freetype/ChangeLog.202613
-rw-r--r--src/3rdparty/freetype/ChangeLog.219439
-rw-r--r--src/3rdparty/freetype/ChangeLog.222837
-rw-r--r--src/3rdparty/freetype/Jamfile203
-rw-r--r--src/3rdparty/freetype/Jamrules71
-rw-r--r--src/3rdparty/freetype/Makefile34
-rw-r--r--src/3rdparty/freetype/README64
-rw-r--r--src/3rdparty/freetype/README.CVS50
-rw-r--r--src/3rdparty/freetype/autogen.sh61
-rw-r--r--src/3rdparty/freetype/builds/amiga/README110
-rw-r--r--src/3rdparty/freetype/builds/amiga/include/freetype/config/ftconfig.h55
-rw-r--r--src/3rdparty/freetype/builds/amiga/include/freetype/config/ftmodule.h160
-rw-r--r--src/3rdparty/freetype/builds/amiga/makefile284
-rw-r--r--src/3rdparty/freetype/builds/amiga/makefile.os4287
-rw-r--r--src/3rdparty/freetype/builds/amiga/smakefile291
-rw-r--r--src/3rdparty/freetype/builds/amiga/src/base/ftdebug.c279
-rw-r--r--src/3rdparty/freetype/builds/amiga/src/base/ftsystem.c522
-rw-r--r--src/3rdparty/freetype/builds/ansi/ansi-def.mk74
-rw-r--r--src/3rdparty/freetype/builds/ansi/ansi.mk21
-rw-r--r--src/3rdparty/freetype/builds/atari/ATARI.H16
-rw-r--r--src/3rdparty/freetype/builds/atari/FNames.SIC37
-rw-r--r--src/3rdparty/freetype/builds/atari/FREETYPE.PRJ32
-rw-r--r--src/3rdparty/freetype/builds/atari/README.TXT51
-rw-r--r--src/3rdparty/freetype/builds/beos/beos-def.mk76
-rw-r--r--src/3rdparty/freetype/builds/beos/beos.mk19
-rw-r--r--src/3rdparty/freetype/builds/beos/detect.mk41
-rw-r--r--src/3rdparty/freetype/builds/compiler/ansi-cc.mk80
-rw-r--r--src/3rdparty/freetype/builds/compiler/bcc-dev.mk78
-rw-r--r--src/3rdparty/freetype/builds/compiler/bcc.mk78
-rw-r--r--src/3rdparty/freetype/builds/compiler/emx.mk77
-rw-r--r--src/3rdparty/freetype/builds/compiler/gcc-dev.mk95
-rw-r--r--src/3rdparty/freetype/builds/compiler/gcc.mk77
-rw-r--r--src/3rdparty/freetype/builds/compiler/intelc.mk85
-rw-r--r--src/3rdparty/freetype/builds/compiler/unix-lcc.mk83
-rw-r--r--src/3rdparty/freetype/builds/compiler/visualage.mk76
-rw-r--r--src/3rdparty/freetype/builds/compiler/visualc.mk82
-rw-r--r--src/3rdparty/freetype/builds/compiler/watcom.mk81
-rw-r--r--src/3rdparty/freetype/builds/compiler/win-lcc.mk81
-rw-r--r--src/3rdparty/freetype/builds/detect.mk154
-rw-r--r--src/3rdparty/freetype/builds/dos/detect.mk142
-rw-r--r--src/3rdparty/freetype/builds/dos/dos-def.mk45
-rw-r--r--src/3rdparty/freetype/builds/dos/dos-emx.mk21
-rw-r--r--src/3rdparty/freetype/builds/dos/dos-gcc.mk21
-rw-r--r--src/3rdparty/freetype/builds/dos/dos-wat.mk20
-rw-r--r--src/3rdparty/freetype/builds/exports.mk76
-rw-r--r--src/3rdparty/freetype/builds/freetype.mk361
-rw-r--r--src/3rdparty/freetype/builds/link_dos.mk42
-rw-r--r--src/3rdparty/freetype/builds/link_std.mk42
-rw-r--r--src/3rdparty/freetype/builds/mac/FreeType.m68k_cfm.make.txt202
-rw-r--r--src/3rdparty/freetype/builds/mac/FreeType.m68k_far.make.txt201
-rw-r--r--src/3rdparty/freetype/builds/mac/FreeType.ppc_carbon.make.txt202
-rw-r--r--src/3rdparty/freetype/builds/mac/FreeType.ppc_classic.make.txt203
-rw-r--r--src/3rdparty/freetype/builds/mac/README403
-rwxr-xr-xsrc/3rdparty/freetype/builds/mac/ascii2mpw.py24
-rw-r--r--src/3rdparty/freetype/builds/mac/ftlib.prj.xml1194
-rw-r--r--src/3rdparty/freetype/builds/mac/ftmac.c1600
-rw-r--r--src/3rdparty/freetype/builds/modules.mk79
-rw-r--r--src/3rdparty/freetype/builds/newline1
-rw-r--r--src/3rdparty/freetype/builds/os2/detect.mk73
-rw-r--r--src/3rdparty/freetype/builds/os2/os2-def.mk44
-rw-r--r--src/3rdparty/freetype/builds/os2/os2-dev.mk30
-rw-r--r--src/3rdparty/freetype/builds/os2/os2-gcc.mk26
-rw-r--r--src/3rdparty/freetype/builds/symbian/bld.inf66
-rw-r--r--src/3rdparty/freetype/builds/symbian/freetype.mmp136
-rw-r--r--src/3rdparty/freetype/builds/toplevel.mk245
-rw-r--r--src/3rdparty/freetype/builds/unix/aclocal.m47912
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/config.guess1526
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/config.sub1669
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/configure15767
-rw-r--r--src/3rdparty/freetype/builds/unix/configure.ac540
-rw-r--r--src/3rdparty/freetype/builds/unix/configure.raw540
-rw-r--r--src/3rdparty/freetype/builds/unix/detect.mk91
-rw-r--r--src/3rdparty/freetype/builds/unix/freetype-config.in157
-rw-r--r--src/3rdparty/freetype/builds/unix/freetype2.in11
-rw-r--r--src/3rdparty/freetype/builds/unix/freetype2.m4192
-rw-r--r--src/3rdparty/freetype/builds/unix/ft-munmap.m432
-rw-r--r--src/3rdparty/freetype/builds/unix/ft2unix.h61
-rw-r--r--src/3rdparty/freetype/builds/unix/ftconfig.h262
-rw-r--r--src/3rdparty/freetype/builds/unix/ftconfig.in349
-rw-r--r--src/3rdparty/freetype/builds/unix/ftsystem.c414
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/install-sh519
-rw-r--r--src/3rdparty/freetype/builds/unix/install.mk97
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/ltmain.sh7874
-rwxr-xr-xsrc/3rdparty/freetype/builds/unix/mkinstalldirs161
-rw-r--r--src/3rdparty/freetype/builds/unix/unix-cc.in113
-rw-r--r--src/3rdparty/freetype/builds/unix/unix-def.in81
-rw-r--r--src/3rdparty/freetype/builds/unix/unix-dev.mk26
-rw-r--r--src/3rdparty/freetype/builds/unix/unix-lcc.mk24
-rw-r--r--src/3rdparty/freetype/builds/unix/unix.mk62
-rw-r--r--src/3rdparty/freetype/builds/unix/unixddef.mk45
-rw-r--r--src/3rdparty/freetype/builds/vms/ftconfig.h338
-rw-r--r--src/3rdparty/freetype/builds/vms/ftsystem.c321
-rw-r--r--src/3rdparty/freetype/builds/win32/detect.mk183
-rw-r--r--src/3rdparty/freetype/builds/win32/ftdebug.c248
-rw-r--r--src/3rdparty/freetype/builds/win32/visualc/freetype.dsp396
-rw-r--r--src/3rdparty/freetype/builds/win32/visualc/freetype.dsw29
-rw-r--r--src/3rdparty/freetype/builds/win32/visualc/freetype.sln31
-rw-r--r--src/3rdparty/freetype/builds/win32/visualc/freetype.vcproj2155
-rw-r--r--src/3rdparty/freetype/builds/win32/visualc/index.html37
-rw-r--r--src/3rdparty/freetype/builds/win32/visualce/freetype.dsp396
-rw-r--r--src/3rdparty/freetype/builds/win32/visualce/freetype.dsw29
-rw-r--r--src/3rdparty/freetype/builds/win32/visualce/freetype.vcproj13861
-rw-r--r--src/3rdparty/freetype/builds/win32/visualce/index.html47
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-bcc.mk28
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-bccd.mk26
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-dev.mk32
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-gcc.mk31
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-icc.mk28
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-intl.mk28
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-lcc.mk24
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-mingw32.mk33
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-vcc.mk28
-rw-r--r--src/3rdparty/freetype/builds/win32/w32-wat.mk28
-rw-r--r--src/3rdparty/freetype/builds/win32/win32-def.mk46
-rwxr-xr-xsrc/3rdparty/freetype/configure100
-rw-r--r--src/3rdparty/freetype/devel/ft2build.h41
-rw-r--r--src/3rdparty/freetype/devel/ftoption.h672
-rw-r--r--src/3rdparty/freetype/docs/CHANGES3148
-rw-r--r--src/3rdparty/freetype/docs/CUSTOMIZE150
-rw-r--r--src/3rdparty/freetype/docs/DEBUG199
-rw-r--r--src/3rdparty/freetype/docs/FTL.TXT169
-rw-r--r--src/3rdparty/freetype/docs/GPL.TXT340
-rw-r--r--src/3rdparty/freetype/docs/INSTALL89
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.ANY139
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.CROSS135
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.GNU159
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.MAC32
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.UNIX96
-rw-r--r--src/3rdparty/freetype/docs/INSTALL.VMS62
-rw-r--r--src/3rdparty/freetype/docs/LICENSE.TXT28
-rw-r--r--src/3rdparty/freetype/docs/MAKEPP5
-rw-r--r--src/3rdparty/freetype/docs/PATENTS27
-rw-r--r--src/3rdparty/freetype/docs/PROBLEMS77
-rw-r--r--src/3rdparty/freetype/docs/TODO40
-rw-r--r--src/3rdparty/freetype/docs/TRUETYPE40
-rw-r--r--src/3rdparty/freetype/docs/UPGRADE.UNIX137
-rw-r--r--src/3rdparty/freetype/docs/VERSION.DLL132
-rw-r--r--src/3rdparty/freetype/docs/formats.txt154
-rw-r--r--src/3rdparty/freetype/docs/raster.txt635
-rw-r--r--src/3rdparty/freetype/docs/reference/README5
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-base_interface.html3425
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-basic_types.html1160
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-bdf_fonts.html254
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-bitmap_handling.html264
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-cache_subsystem.html1165
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-cid_fonts.html102
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-computations.html828
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-font_formats.html79
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-gasp_table.html137
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-glyph_management.html633
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-glyph_stroker.html924
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-glyph_variants.html263
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-gx_validation.html352
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-gzip.html90
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-header_file_macros.html816
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-incremental.html393
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-index.html279
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-lcd_filtering.html145
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-list_processing.html479
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-lzw.html90
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-mac_specific.html364
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-module_management.html622
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-multiple_masters.html507
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-ot_validation.html204
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-outline_processing.html1086
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-pfr_fonts.html202
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-raster.html602
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-sfnt_names.html186
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-sizes_management.html160
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-system_interface.html411
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-toc.html203
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-truetype_engine.html128
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-truetype_tables.html1213
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-type1_tables.html518
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-user_allocation.html43
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-version.html209
-rw-r--r--src/3rdparty/freetype/docs/reference/ft2-winfnt_fonts.html274
-rw-r--r--src/3rdparty/freetype/docs/release166
-rw-r--r--src/3rdparty/freetype/include/freetype/config/ftconfig.h415
-rw-r--r--src/3rdparty/freetype/include/freetype/config/ftheader.h768
-rw-r--r--src/3rdparty/freetype/include/freetype/config/ftmodule.h32
-rw-r--r--src/3rdparty/freetype/include/freetype/config/ftoption.h671
-rw-r--r--src/3rdparty/freetype/include/freetype/config/ftstdlib.h180
-rw-r--r--src/3rdparty/freetype/include/freetype/freetype.h3706
-rw-r--r--src/3rdparty/freetype/include/freetype/ftbbox.h94
-rw-r--r--src/3rdparty/freetype/include/freetype/ftbdf.h200
-rw-r--r--src/3rdparty/freetype/include/freetype/ftbitmap.h206
-rw-r--r--src/3rdparty/freetype/include/freetype/ftcache.h1121
-rw-r--r--src/3rdparty/freetype/include/freetype/ftchapters.h102
-rw-r--r--src/3rdparty/freetype/include/freetype/ftcid.h98
-rw-r--r--src/3rdparty/freetype/include/freetype/fterrdef.h239
-rw-r--r--src/3rdparty/freetype/include/freetype/fterrors.h206
-rw-r--r--src/3rdparty/freetype/include/freetype/ftgasp.h113
-rw-r--r--src/3rdparty/freetype/include/freetype/ftglyph.h575
-rw-r--r--src/3rdparty/freetype/include/freetype/ftgxval.h358
-rw-r--r--src/3rdparty/freetype/include/freetype/ftgzip.h102
-rw-r--r--src/3rdparty/freetype/include/freetype/ftimage.h1246
-rw-r--r--src/3rdparty/freetype/include/freetype/ftincrem.h349
-rw-r--r--src/3rdparty/freetype/include/freetype/ftlcdfil.h166
-rw-r--r--src/3rdparty/freetype/include/freetype/ftlist.h273
-rw-r--r--src/3rdparty/freetype/include/freetype/ftlzw.h99
-rw-r--r--src/3rdparty/freetype/include/freetype/ftmac.h274
-rw-r--r--src/3rdparty/freetype/include/freetype/ftmm.h378
-rw-r--r--src/3rdparty/freetype/include/freetype/ftmodapi.h441
-rw-r--r--src/3rdparty/freetype/include/freetype/ftmoderr.h155
-rw-r--r--src/3rdparty/freetype/include/freetype/ftotval.h203
-rw-r--r--src/3rdparty/freetype/include/freetype/ftoutln.h526
-rw-r--r--src/3rdparty/freetype/include/freetype/ftpfr.h172
-rw-r--r--src/3rdparty/freetype/include/freetype/ftrender.h234
-rw-r--r--src/3rdparty/freetype/include/freetype/ftsizes.h159
-rw-r--r--src/3rdparty/freetype/include/freetype/ftsnames.h170
-rw-r--r--src/3rdparty/freetype/include/freetype/ftstroke.h716
-rw-r--r--src/3rdparty/freetype/include/freetype/ftsynth.h73
-rw-r--r--src/3rdparty/freetype/include/freetype/ftsystem.h346
-rw-r--r--src/3rdparty/freetype/include/freetype/fttrigon.h350
-rw-r--r--src/3rdparty/freetype/include/freetype/fttypes.h587
-rw-r--r--src/3rdparty/freetype/include/freetype/ftwinfnt.h274
-rw-r--r--src/3rdparty/freetype/include/freetype/ftxf86.h80
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/autohint.h205
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftcalc.h178
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftdebug.h250
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftdriver.h248
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftgloadr.h168
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftmemory.h368
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftobjs.h875
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftrfork.h196
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftserv.h328
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftstream.h539
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/fttrace.h134
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/ftvalid.h150
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/internal.h50
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/pcftypes.h56
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/psaux.h871
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/pshints.h687
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svbdf.h57
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svcid.h49
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svgldict.h60
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svgxval.h72
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svkern.h51
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svmm.h79
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svotval.h55
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svpfr.h66
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svpostnm.h58
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svpscmap.h129
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h60
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svsfnt.h80
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svttcmap.h78
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svtteng.h53
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svttglyf.h48
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h50
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/services/svxf86nm.h55
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/sfnt.h762
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/t1types.h252
-rw-r--r--src/3rdparty/freetype/include/freetype/internal/tttypes.h1543
-rw-r--r--src/3rdparty/freetype/include/freetype/t1tables.h504
-rw-r--r--src/3rdparty/freetype/include/freetype/ttnameid.h1146
-rw-r--r--src/3rdparty/freetype/include/freetype/tttables.h756
-rw-r--r--src/3rdparty/freetype/include/freetype/tttags.h100
-rw-r--r--src/3rdparty/freetype/include/freetype/ttunpat.h59
-rw-r--r--src/3rdparty/freetype/include/ft2build.h39
-rw-r--r--src/3rdparty/freetype/modules.cfg245
-rw-r--r--src/3rdparty/freetype/objs/README2
-rw-r--r--src/3rdparty/freetype/src/Jamfile25
-rw-r--r--src/3rdparty/freetype/src/autofit/Jamfile39
-rw-r--r--src/3rdparty/freetype/src/autofit/afangles.c292
-rw-r--r--src/3rdparty/freetype/src/autofit/afangles.h7
-rw-r--r--src/3rdparty/freetype/src/autofit/afcjk.c1508
-rw-r--r--src/3rdparty/freetype/src/autofit/afcjk.h58
-rw-r--r--src/3rdparty/freetype/src/autofit/afdummy.c62
-rw-r--r--src/3rdparty/freetype/src/autofit/afdummy.h43
-rw-r--r--src/3rdparty/freetype/src/autofit/aferrors.h40
-rw-r--r--src/3rdparty/freetype/src/autofit/afglobal.c289
-rw-r--r--src/3rdparty/freetype/src/autofit/afglobal.h67
-rw-r--r--src/3rdparty/freetype/src/autofit/afhints.c1264
-rw-r--r--src/3rdparty/freetype/src/autofit/afhints.h333
-rw-r--r--src/3rdparty/freetype/src/autofit/afindic.c134
-rw-r--r--src/3rdparty/freetype/src/autofit/afindic.h41
-rw-r--r--src/3rdparty/freetype/src/autofit/aflatin.c2168
-rw-r--r--src/3rdparty/freetype/src/autofit/aflatin.h209
-rw-r--r--src/3rdparty/freetype/src/autofit/aflatin2.c2286
-rw-r--r--src/3rdparty/freetype/src/autofit/aflatin2.h40
-rw-r--r--src/3rdparty/freetype/src/autofit/afloader.c535
-rw-r--r--src/3rdparty/freetype/src/autofit/afloader.h73
-rw-r--r--src/3rdparty/freetype/src/autofit/afmodule.c97
-rw-r--r--src/3rdparty/freetype/src/autofit/afmodule.h37
-rw-r--r--src/3rdparty/freetype/src/autofit/aftypes.h349
-rw-r--r--src/3rdparty/freetype/src/autofit/afwarp.c338
-rw-r--r--src/3rdparty/freetype/src/autofit/afwarp.h64
-rw-r--r--src/3rdparty/freetype/src/autofit/autofit.c40
-rw-r--r--src/3rdparty/freetype/src/autofit/module.mk23
-rw-r--r--src/3rdparty/freetype/src/autofit/rules.mk78
-rw-r--r--src/3rdparty/freetype/src/base/Jamfile50
-rw-r--r--src/3rdparty/freetype/src/base/ftapi.c121
-rw-r--r--src/3rdparty/freetype/src/base/ftbase.c38
-rw-r--r--src/3rdparty/freetype/src/base/ftbbox.c659
-rw-r--r--src/3rdparty/freetype/src/base/ftbdf.c88
-rw-r--r--src/3rdparty/freetype/src/base/ftbitmap.c630
-rw-r--r--src/3rdparty/freetype/src/base/ftcalc.c873
-rw-r--r--src/3rdparty/freetype/src/base/ftcid.c63
-rw-r--r--src/3rdparty/freetype/src/base/ftdbgmem.c998
-rw-r--r--src/3rdparty/freetype/src/base/ftdebug.c246
-rw-r--r--src/3rdparty/freetype/src/base/ftgasp.c61
-rw-r--r--src/3rdparty/freetype/src/base/ftgloadr.c394
-rw-r--r--src/3rdparty/freetype/src/base/ftglyph.c688
-rw-r--r--src/3rdparty/freetype/src/base/ftgxval.c129
-rw-r--r--src/3rdparty/freetype/src/base/ftinit.c163
-rw-r--r--src/3rdparty/freetype/src/base/ftlcdfil.c351
-rw-r--r--src/3rdparty/freetype/src/base/ftmac.c1130
-rw-r--r--src/3rdparty/freetype/src/base/ftmm.c202
-rw-r--r--src/3rdparty/freetype/src/base/ftnames.c94
-rw-r--r--src/3rdparty/freetype/src/base/ftobjs.c4198
-rw-r--r--src/3rdparty/freetype/src/base/ftotval.c83
-rw-r--r--src/3rdparty/freetype/src/base/ftoutln.c1090
-rw-r--r--src/3rdparty/freetype/src/base/ftpatent.c281
-rw-r--r--src/3rdparty/freetype/src/base/ftpfr.c132
-rw-r--r--src/3rdparty/freetype/src/base/ftrfork.c811
-rw-r--r--src/3rdparty/freetype/src/base/ftstream.c845
-rw-r--r--src/3rdparty/freetype/src/base/ftstroke.c2010
-rw-r--r--src/3rdparty/freetype/src/base/ftsynth.c159
-rw-r--r--src/3rdparty/freetype/src/base/ftsystem.c301
-rw-r--r--src/3rdparty/freetype/src/base/fttrigon.c546
-rw-r--r--src/3rdparty/freetype/src/base/fttype1.c94
-rw-r--r--src/3rdparty/freetype/src/base/ftutil.c501
-rw-r--r--src/3rdparty/freetype/src/base/ftwinfnt.c51
-rw-r--r--src/3rdparty/freetype/src/base/ftxf86.c40
-rw-r--r--src/3rdparty/freetype/src/base/rules.mk90
-rw-r--r--src/3rdparty/freetype/src/bdf/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/bdf/README148
-rw-r--r--src/3rdparty/freetype/src/bdf/bdf.c34
-rw-r--r--src/3rdparty/freetype/src/bdf/bdf.h295
-rw-r--r--src/3rdparty/freetype/src/bdf/bdfdrivr.c850
-rw-r--r--src/3rdparty/freetype/src/bdf/bdfdrivr.h76
-rw-r--r--src/3rdparty/freetype/src/bdf/bdferror.h44
-rw-r--r--src/3rdparty/freetype/src/bdf/bdflib.c2472
-rw-r--r--src/3rdparty/freetype/src/bdf/module.mk34
-rw-r--r--src/3rdparty/freetype/src/bdf/rules.mk80
-rw-r--r--src/3rdparty/freetype/src/cache/Jamfile43
-rw-r--r--src/3rdparty/freetype/src/cache/ftcache.c31
-rw-r--r--src/3rdparty/freetype/src/cache/ftcbasic.c811
-rw-r--r--src/3rdparty/freetype/src/cache/ftccache.c592
-rw-r--r--src/3rdparty/freetype/src/cache/ftccache.h317
-rw-r--r--src/3rdparty/freetype/src/cache/ftccback.h90
-rw-r--r--src/3rdparty/freetype/src/cache/ftccmap.c413
-rw-r--r--src/3rdparty/freetype/src/cache/ftcerror.h40
-rw-r--r--src/3rdparty/freetype/src/cache/ftcglyph.c211
-rw-r--r--src/3rdparty/freetype/src/cache/ftcglyph.h322
-rw-r--r--src/3rdparty/freetype/src/cache/ftcimage.c163
-rw-r--r--src/3rdparty/freetype/src/cache/ftcimage.h107
-rw-r--r--src/3rdparty/freetype/src/cache/ftcmanag.c732
-rw-r--r--src/3rdparty/freetype/src/cache/ftcmanag.h175
-rw-r--r--src/3rdparty/freetype/src/cache/ftcmru.c357
-rw-r--r--src/3rdparty/freetype/src/cache/ftcmru.h247
-rw-r--r--src/3rdparty/freetype/src/cache/ftcsbits.c401
-rw-r--r--src/3rdparty/freetype/src/cache/ftcsbits.h98
-rw-r--r--src/3rdparty/freetype/src/cache/rules.mk78
-rw-r--r--src/3rdparty/freetype/src/cff/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/cff/cff.c29
-rw-r--r--src/3rdparty/freetype/src/cff/cffcmap.c224
-rw-r--r--src/3rdparty/freetype/src/cff/cffcmap.h69
-rw-r--r--src/3rdparty/freetype/src/cff/cffdrivr.c585
-rw-r--r--src/3rdparty/freetype/src/cff/cffdrivr.h39
-rw-r--r--src/3rdparty/freetype/src/cff/cfferrs.h41
-rw-r--r--src/3rdparty/freetype/src/cff/cffgload.c2701
-rw-r--r--src/3rdparty/freetype/src/cff/cffgload.h202
-rw-r--r--src/3rdparty/freetype/src/cff/cffload.c1605
-rw-r--r--src/3rdparty/freetype/src/cff/cffload.h79
-rw-r--r--src/3rdparty/freetype/src/cff/cffobjs.c962
-rw-r--r--src/3rdparty/freetype/src/cff/cffobjs.h181
-rw-r--r--src/3rdparty/freetype/src/cff/cffparse.c843
-rw-r--r--src/3rdparty/freetype/src/cff/cffparse.h69
-rw-r--r--src/3rdparty/freetype/src/cff/cfftoken.h97
-rw-r--r--src/3rdparty/freetype/src/cff/cfftypes.h274
-rw-r--r--src/3rdparty/freetype/src/cff/module.mk23
-rw-r--r--src/3rdparty/freetype/src/cff/rules.mk72
-rw-r--r--src/3rdparty/freetype/src/cid/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/cid/ciderrs.h40
-rw-r--r--src/3rdparty/freetype/src/cid/cidgload.c433
-rw-r--r--src/3rdparty/freetype/src/cid/cidgload.h51
-rw-r--r--src/3rdparty/freetype/src/cid/cidload.c644
-rw-r--r--src/3rdparty/freetype/src/cid/cidload.h53
-rw-r--r--src/3rdparty/freetype/src/cid/cidobjs.c480
-rw-r--r--src/3rdparty/freetype/src/cid/cidobjs.h154
-rw-r--r--src/3rdparty/freetype/src/cid/cidparse.c226
-rw-r--r--src/3rdparty/freetype/src/cid/cidparse.h123
-rw-r--r--src/3rdparty/freetype/src/cid/cidriver.c198
-rw-r--r--src/3rdparty/freetype/src/cid/cidriver.h39
-rw-r--r--src/3rdparty/freetype/src/cid/cidtoken.h103
-rw-r--r--src/3rdparty/freetype/src/cid/module.mk23
-rw-r--r--src/3rdparty/freetype/src/cid/rules.mk70
-rw-r--r--src/3rdparty/freetype/src/cid/type1cid.c29
-rw-r--r--src/3rdparty/freetype/src/gxvalid/Jamfile33
-rw-r--r--src/3rdparty/freetype/src/gxvalid/README532
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvalid.c46
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvalid.h107
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvbsln.c333
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvcommn.c1758
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvcommn.h560
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxverror.h51
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvfeat.c344
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvfeat.h172
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvfgen.c482
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvjust.c630
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvkern.c876
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvlcar.c223
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmod.c285
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmod.h46
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort.c285
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort.h93
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort0.c137
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort1.c258
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort2.c282
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort4.c125
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmort5.c226
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx.c183
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx.h67
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx0.c103
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx1.c274
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx2.c285
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx4.c55
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvmorx5.c217
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvopbd.c217
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvprop.c301
-rw-r--r--src/3rdparty/freetype/src/gxvalid/gxvtrak.c277
-rw-r--r--src/3rdparty/freetype/src/gxvalid/module.mk23
-rw-r--r--src/3rdparty/freetype/src/gxvalid/rules.mk94
-rw-r--r--src/3rdparty/freetype/src/gzip/Jamfile16
-rw-r--r--src/3rdparty/freetype/src/gzip/adler32.c48
-rw-r--r--src/3rdparty/freetype/src/gzip/ftgzip.c682
-rw-r--r--src/3rdparty/freetype/src/gzip/infblock.c387
-rw-r--r--src/3rdparty/freetype/src/gzip/infblock.h36
-rw-r--r--src/3rdparty/freetype/src/gzip/infcodes.c250
-rw-r--r--src/3rdparty/freetype/src/gzip/infcodes.h31
-rw-r--r--src/3rdparty/freetype/src/gzip/inffixed.h151
-rw-r--r--src/3rdparty/freetype/src/gzip/inflate.c273
-rw-r--r--src/3rdparty/freetype/src/gzip/inftrees.c465
-rw-r--r--src/3rdparty/freetype/src/gzip/inftrees.h63
-rw-r--r--src/3rdparty/freetype/src/gzip/infutil.c86
-rw-r--r--src/3rdparty/freetype/src/gzip/infutil.h98
-rw-r--r--src/3rdparty/freetype/src/gzip/rules.mk75
-rw-r--r--src/3rdparty/freetype/src/gzip/zconf.h278
-rw-r--r--src/3rdparty/freetype/src/gzip/zlib.h830
-rw-r--r--src/3rdparty/freetype/src/gzip/zutil.c181
-rw-r--r--src/3rdparty/freetype/src/gzip/zutil.h215
-rw-r--r--src/3rdparty/freetype/src/lzw/Jamfile16
-rw-r--r--src/3rdparty/freetype/src/lzw/ftlzw.c413
-rw-r--r--src/3rdparty/freetype/src/lzw/ftzopen.c398
-rw-r--r--src/3rdparty/freetype/src/lzw/ftzopen.h171
-rw-r--r--src/3rdparty/freetype/src/lzw/rules.mk70
-rw-r--r--src/3rdparty/freetype/src/otvalid/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/otvalid/module.mk23
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvalid.c31
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvalid.h77
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvbase.c318
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvcommn.c1086
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvcommn.h437
-rw-r--r--src/3rdparty/freetype/src/otvalid/otverror.h43
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvgdef.c219
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvgpos.c1013
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvgpos.h36
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvgsub.c584
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvjstf.c258
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvmath.c450
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvmod.c267
-rw-r--r--src/3rdparty/freetype/src/otvalid/otvmod.h39
-rw-r--r--src/3rdparty/freetype/src/otvalid/rules.mk78
-rw-r--r--src/3rdparty/freetype/src/pcf/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/pcf/README114
-rw-r--r--src/3rdparty/freetype/src/pcf/module.mk34
-rw-r--r--src/3rdparty/freetype/src/pcf/pcf.c36
-rw-r--r--src/3rdparty/freetype/src/pcf/pcf.h237
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfdrivr.c674
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfdrivr.h44
-rw-r--r--src/3rdparty/freetype/src/pcf/pcferror.h40
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfread.c1267
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfread.h45
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfutil.c104
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfutil.h55
-rw-r--r--src/3rdparty/freetype/src/pcf/rules.mk80
-rw-r--r--src/3rdparty/freetype/src/pfr/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/pfr/module.mk23
-rw-r--r--src/3rdparty/freetype/src/pfr/pfr.c29
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrcmap.c167
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrcmap.h46
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrdrivr.c207
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrdrivr.h39
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrerror.h40
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrgload.c828
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrgload.h49
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrload.c938
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrload.h118
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrobjs.c576
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrobjs.h96
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrsbit.c680
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrsbit.h36
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrtypes.h362
-rw-r--r--src/3rdparty/freetype/src/pfr/rules.mk73
-rw-r--r--src/3rdparty/freetype/src/psaux/Jamfile31
-rw-r--r--src/3rdparty/freetype/src/psaux/afmparse.c960
-rw-r--r--src/3rdparty/freetype/src/psaux/afmparse.h87
-rw-r--r--src/3rdparty/freetype/src/psaux/module.mk23
-rw-r--r--src/3rdparty/freetype/src/psaux/psaux.c34
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxerr.h41
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxmod.c139
-rw-r--r--src/3rdparty/freetype/src/psaux/psauxmod.h38
-rw-r--r--src/3rdparty/freetype/src/psaux/psconv.c474
-rw-r--r--src/3rdparty/freetype/src/psaux/psconv.h71
-rw-r--r--src/3rdparty/freetype/src/psaux/psobjs.c1692
-rw-r--r--src/3rdparty/freetype/src/psaux/psobjs.h212
-rw-r--r--src/3rdparty/freetype/src/psaux/rules.mk73
-rw-r--r--src/3rdparty/freetype/src/psaux/t1cmap.c341
-rw-r--r--src/3rdparty/freetype/src/psaux/t1cmap.h105
-rw-r--r--src/3rdparty/freetype/src/psaux/t1decode.c1475
-rw-r--r--src/3rdparty/freetype/src/psaux/t1decode.h64
-rw-r--r--src/3rdparty/freetype/src/pshinter/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/pshinter/module.mk23
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshalgo.c2302
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshalgo.h255
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshglob.c750
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshglob.h196
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshinter.c28
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshmod.c121
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshmod.h39
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshnterr.h40
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshrec.c1215
-rw-r--r--src/3rdparty/freetype/src/pshinter/pshrec.h176
-rw-r--r--src/3rdparty/freetype/src/pshinter/rules.mk72
-rw-r--r--src/3rdparty/freetype/src/psnames/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/psnames/module.mk23
-rw-r--r--src/3rdparty/freetype/src/psnames/psmodule.c565
-rw-r--r--src/3rdparty/freetype/src/psnames/psmodule.h38
-rw-r--r--src/3rdparty/freetype/src/psnames/psnamerr.h41
-rw-r--r--src/3rdparty/freetype/src/psnames/psnames.c25
-rw-r--r--src/3rdparty/freetype/src/psnames/pstables.h4090
-rw-r--r--src/3rdparty/freetype/src/psnames/rules.mk70
-rw-r--r--src/3rdparty/freetype/src/raster/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/raster/ftmisc.h83
-rw-r--r--src/3rdparty/freetype/src/raster/ftraster.c3382
-rw-r--r--src/3rdparty/freetype/src/raster/ftraster.h46
-rw-r--r--src/3rdparty/freetype/src/raster/ftrend1.c273
-rw-r--r--src/3rdparty/freetype/src/raster/ftrend1.h44
-rw-r--r--src/3rdparty/freetype/src/raster/module.mk23
-rw-r--r--src/3rdparty/freetype/src/raster/raster.c26
-rw-r--r--src/3rdparty/freetype/src/raster/rasterrs.h41
-rw-r--r--src/3rdparty/freetype/src/raster/rules.mk69
-rw-r--r--src/3rdparty/freetype/src/sfnt/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/sfnt/module.mk23
-rw-r--r--src/3rdparty/freetype/src/sfnt/rules.mk76
-rw-r--r--src/3rdparty/freetype/src/sfnt/sfdriver.c618
-rw-r--r--src/3rdparty/freetype/src/sfnt/sfdriver.h38
-rw-r--r--src/3rdparty/freetype/src/sfnt/sferrors.h41
-rw-r--r--src/3rdparty/freetype/src/sfnt/sfnt.c41
-rw-r--r--src/3rdparty/freetype/src/sfnt/sfobjs.c1116
-rw-r--r--src/3rdparty/freetype/src/sfnt/sfobjs.h54
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttbdf.c250
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttbdf.h46
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttcmap.c3123
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttcmap.h85
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttkern.c292
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttkern.h52
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttload.c1185
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttload.h112
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttmtx.c466
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttmtx.h55
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttpost.c521
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttpost.h46
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttsbit.c1502
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttsbit.h79
-rw-r--r--src/3rdparty/freetype/src/sfnt/ttsbit0.c996
-rw-r--r--src/3rdparty/freetype/src/smooth/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/smooth/ftgrays.c1986
-rw-r--r--src/3rdparty/freetype/src/smooth/ftgrays.h57
-rw-r--r--src/3rdparty/freetype/src/smooth/ftsmerrs.h41
-rw-r--r--src/3rdparty/freetype/src/smooth/ftsmooth.c467
-rw-r--r--src/3rdparty/freetype/src/smooth/ftsmooth.h49
-rw-r--r--src/3rdparty/freetype/src/smooth/module.mk27
-rw-r--r--src/3rdparty/freetype/src/smooth/rules.mk69
-rw-r--r--src/3rdparty/freetype/src/smooth/smooth.c26
-rw-r--r--src/3rdparty/freetype/src/tools/Jamfile5
-rw-r--r--src/3rdparty/freetype/src/tools/apinames.c443
-rw-r--r--src/3rdparty/freetype/src/tools/cordic.py79
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/content.py582
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/docbeauty.py113
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/docmaker.py106
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/formatter.py188
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/sources.py347
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/tohtml.py527
-rw-r--r--src/3rdparty/freetype/src/tools/docmaker/utils.py132
-rw-r--r--src/3rdparty/freetype/src/tools/ftrandom/Makefile35
-rw-r--r--src/3rdparty/freetype/src/tools/ftrandom/README48
-rw-r--r--src/3rdparty/freetype/src/tools/ftrandom/ftrandom.c659
-rw-r--r--src/3rdparty/freetype/src/tools/glnames.py5282
-rw-r--r--src/3rdparty/freetype/src/tools/test_afm.c157
-rw-r--r--src/3rdparty/freetype/src/tools/test_bbox.c160
-rw-r--r--src/3rdparty/freetype/src/tools/test_trig.c236
-rw-r--r--src/3rdparty/freetype/src/truetype/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/truetype/module.mk23
-rw-r--r--src/3rdparty/freetype/src/truetype/rules.mk72
-rw-r--r--src/3rdparty/freetype/src/truetype/truetype.c36
-rw-r--r--src/3rdparty/freetype/src/truetype/ttdriver.c418
-rw-r--r--src/3rdparty/freetype/src/truetype/ttdriver.h38
-rw-r--r--src/3rdparty/freetype/src/truetype/tterrors.h40
-rw-r--r--src/3rdparty/freetype/src/truetype/ttgload.c1976
-rw-r--r--src/3rdparty/freetype/src/truetype/ttgload.h49
-rw-r--r--src/3rdparty/freetype/src/truetype/ttgxvar.c1539
-rw-r--r--src/3rdparty/freetype/src/truetype/ttgxvar.h182
-rw-r--r--src/3rdparty/freetype/src/truetype/ttinterp.c7837
-rw-r--r--src/3rdparty/freetype/src/truetype/ttinterp.h311
-rw-r--r--src/3rdparty/freetype/src/truetype/ttobjs.c943
-rw-r--r--src/3rdparty/freetype/src/truetype/ttobjs.h459
-rw-r--r--src/3rdparty/freetype/src/truetype/ttpload.c523
-rw-r--r--src/3rdparty/freetype/src/truetype/ttpload.h75
-rw-r--r--src/3rdparty/freetype/src/type1/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/type1/module.mk23
-rw-r--r--src/3rdparty/freetype/src/type1/rules.mk73
-rw-r--r--src/3rdparty/freetype/src/type1/t1afm.c385
-rw-r--r--src/3rdparty/freetype/src/type1/t1afm.h54
-rw-r--r--src/3rdparty/freetype/src/type1/t1driver.c313
-rw-r--r--src/3rdparty/freetype/src/type1/t1driver.h38
-rw-r--r--src/3rdparty/freetype/src/type1/t1errors.h40
-rw-r--r--src/3rdparty/freetype/src/type1/t1gload.c422
-rw-r--r--src/3rdparty/freetype/src/type1/t1gload.h46
-rw-r--r--src/3rdparty/freetype/src/type1/t1load.c2233
-rw-r--r--src/3rdparty/freetype/src/type1/t1load.h102
-rw-r--r--src/3rdparty/freetype/src/type1/t1objs.c568
-rw-r--r--src/3rdparty/freetype/src/type1/t1objs.h171
-rw-r--r--src/3rdparty/freetype/src/type1/t1parse.c484
-rw-r--r--src/3rdparty/freetype/src/type1/t1parse.h135
-rw-r--r--src/3rdparty/freetype/src/type1/t1tokens.h134
-rw-r--r--src/3rdparty/freetype/src/type1/type1.c33
-rw-r--r--src/3rdparty/freetype/src/type42/Jamfile29
-rw-r--r--src/3rdparty/freetype/src/type42/module.mk23
-rw-r--r--src/3rdparty/freetype/src/type42/rules.mk69
-rw-r--r--src/3rdparty/freetype/src/type42/t42drivr.c232
-rw-r--r--src/3rdparty/freetype/src/type42/t42drivr.h38
-rw-r--r--src/3rdparty/freetype/src/type42/t42error.h40
-rw-r--r--src/3rdparty/freetype/src/type42/t42objs.c647
-rw-r--r--src/3rdparty/freetype/src/type42/t42objs.h124
-rw-r--r--src/3rdparty/freetype/src/type42/t42parse.c1167
-rw-r--r--src/3rdparty/freetype/src/type42/t42parse.h90
-rw-r--r--src/3rdparty/freetype/src/type42/t42types.h54
-rw-r--r--src/3rdparty/freetype/src/type42/type42.c25
-rw-r--r--src/3rdparty/freetype/src/winfonts/Jamfile16
-rw-r--r--src/3rdparty/freetype/src/winfonts/fnterrs.h41
-rw-r--r--src/3rdparty/freetype/src/winfonts/module.mk23
-rw-r--r--src/3rdparty/freetype/src/winfonts/rules.mk65
-rw-r--r--src/3rdparty/freetype/src/winfonts/winfnt.c1130
-rw-r--r--src/3rdparty/freetype/src/winfonts/winfnt.h167
-rw-r--r--src/3rdparty/freetype/version.sed5
-rw-r--r--src/3rdparty/freetype/vms_make.com1286
-rw-r--r--src/3rdparty/harfbuzz/.gitignore20
-rw-r--r--src/3rdparty/harfbuzz/AUTHORS6
-rw-r--r--src/3rdparty/harfbuzz/COPYING24
-rw-r--r--src/3rdparty/harfbuzz/ChangeLog0
-rw-r--r--src/3rdparty/harfbuzz/Makefile.am2
-rw-r--r--src/3rdparty/harfbuzz/NEWS0
-rw-r--r--src/3rdparty/harfbuzz/README7
-rwxr-xr-xsrc/3rdparty/harfbuzz/autogen.sh116
-rw-r--r--src/3rdparty/harfbuzz/configure.ac54
-rw-r--r--src/3rdparty/harfbuzz/src/.gitignore7
-rw-r--r--src/3rdparty/harfbuzz/src/Makefile.am68
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-arabic.c1090
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-buffer-private.h107
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-buffer.c383
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-buffer.h94
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-dump-main.c97
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-dump.c765
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-dump.h41
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-external.h157
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h124
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef.c1159
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gdef.h135
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-global.h118
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h712
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.c6053
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.h149
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h476
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub.c4329
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gsub.h141
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-hangul.c268
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-hebrew.c188
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-impl.c84
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-impl.h131
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp1852
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-khmer.c667
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-myanmar.c542
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open-private.h102
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.c1414
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-open.h282
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shape.h199
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp36
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h167
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp1312
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h271
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream-private.h81
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.c114
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-stream.h45
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c87
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c274
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz.c32
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz.h38
-rw-r--r--src/3rdparty/harfbuzz/tests/Makefile.am7
-rw-r--r--src/3rdparty/harfbuzz/tests/linebreaking/.gitignore4
-rw-r--r--src/3rdparty/harfbuzz/tests/linebreaking/Makefile.am12
-rw-r--r--src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp108
-rw-r--r--src/3rdparty/harfbuzz/tests/linebreaking/main.cpp230
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/.gitignore2
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/Makefile.am14
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/README9
-rw-r--r--src/3rdparty/harfbuzz/tests/shaping/main.cpp1035
-rw-r--r--src/3rdparty/libjpeg/README385
-rw-r--r--src/3rdparty/libjpeg/change.log217
-rw-r--r--src/3rdparty/libjpeg/coderules.doc118
-rw-r--r--src/3rdparty/libjpeg/filelist.doc210
-rw-r--r--src/3rdparty/libjpeg/install.doc1063
-rw-r--r--src/3rdparty/libjpeg/jcapimin.c280
-rw-r--r--src/3rdparty/libjpeg/jcapistd.c161
-rw-r--r--src/3rdparty/libjpeg/jccoefct.c449
-rw-r--r--src/3rdparty/libjpeg/jccolor.c459
-rw-r--r--src/3rdparty/libjpeg/jcdctmgr.c387
-rw-r--r--src/3rdparty/libjpeg/jchuff.c909
-rw-r--r--src/3rdparty/libjpeg/jchuff.h47
-rw-r--r--src/3rdparty/libjpeg/jcinit.c72
-rw-r--r--src/3rdparty/libjpeg/jcmainct.c293
-rw-r--r--src/3rdparty/libjpeg/jcmarker.c664
-rw-r--r--src/3rdparty/libjpeg/jcmaster.c590
-rw-r--r--src/3rdparty/libjpeg/jcomapi.c106
-rw-r--r--src/3rdparty/libjpeg/jconfig.bcc48
-rw-r--r--src/3rdparty/libjpeg/jconfig.cfg44
-rw-r--r--src/3rdparty/libjpeg/jconfig.dj38
-rw-r--r--src/3rdparty/libjpeg/jconfig.doc155
-rw-r--r--src/3rdparty/libjpeg/jconfig.h47
-rw-r--r--src/3rdparty/libjpeg/jconfig.mac43
-rw-r--r--src/3rdparty/libjpeg/jconfig.manx43
-rw-r--r--src/3rdparty/libjpeg/jconfig.mc652
-rw-r--r--src/3rdparty/libjpeg/jconfig.sas43
-rw-r--r--src/3rdparty/libjpeg/jconfig.st42
-rw-r--r--src/3rdparty/libjpeg/jconfig.vc45
-rw-r--r--src/3rdparty/libjpeg/jconfig.vms37
-rw-r--r--src/3rdparty/libjpeg/jconfig.wat38
-rw-r--r--src/3rdparty/libjpeg/jcparam.c610
-rw-r--r--src/3rdparty/libjpeg/jcphuff.c833
-rw-r--r--src/3rdparty/libjpeg/jcprepct.c354
-rw-r--r--src/3rdparty/libjpeg/jcsample.c519
-rw-r--r--src/3rdparty/libjpeg/jctrans.c388
-rw-r--r--src/3rdparty/libjpeg/jdapimin.c395
-rw-r--r--src/3rdparty/libjpeg/jdapistd.c275
-rw-r--r--src/3rdparty/libjpeg/jdatadst.c151
-rw-r--r--src/3rdparty/libjpeg/jdatasrc.c212
-rw-r--r--src/3rdparty/libjpeg/jdcoefct.c736
-rw-r--r--src/3rdparty/libjpeg/jdcolor.c396
-rw-r--r--src/3rdparty/libjpeg/jdct.h176
-rw-r--r--src/3rdparty/libjpeg/jddctmgr.c269
-rw-r--r--src/3rdparty/libjpeg/jdhuff.c651
-rw-r--r--src/3rdparty/libjpeg/jdhuff.h201
-rw-r--r--src/3rdparty/libjpeg/jdinput.c381
-rw-r--r--src/3rdparty/libjpeg/jdmainct.c512
-rw-r--r--src/3rdparty/libjpeg/jdmarker.c1360
-rw-r--r--src/3rdparty/libjpeg/jdmaster.c557
-rw-r--r--src/3rdparty/libjpeg/jdmerge.c400
-rw-r--r--src/3rdparty/libjpeg/jdphuff.c668
-rw-r--r--src/3rdparty/libjpeg/jdpostct.c290
-rw-r--r--src/3rdparty/libjpeg/jdsample.c478
-rw-r--r--src/3rdparty/libjpeg/jdtrans.c143
-rw-r--r--src/3rdparty/libjpeg/jerror.c252
-rw-r--r--src/3rdparty/libjpeg/jerror.h291
-rw-r--r--src/3rdparty/libjpeg/jfdctflt.c168
-rw-r--r--src/3rdparty/libjpeg/jfdctfst.c224
-rw-r--r--src/3rdparty/libjpeg/jfdctint.c283
-rw-r--r--src/3rdparty/libjpeg/jidctflt.c242
-rw-r--r--src/3rdparty/libjpeg/jidctfst.c368
-rw-r--r--src/3rdparty/libjpeg/jidctint.c389
-rw-r--r--src/3rdparty/libjpeg/jidctred.c398
-rw-r--r--src/3rdparty/libjpeg/jinclude.h91
-rw-r--r--src/3rdparty/libjpeg/jmemmgr.c1118
-rw-r--r--src/3rdparty/libjpeg/jmemnobs.c109
-rw-r--r--src/3rdparty/libjpeg/jmemsys.h198
-rw-r--r--src/3rdparty/libjpeg/jmorecfg.h363
-rw-r--r--src/3rdparty/libjpeg/jpegint.h392
-rw-r--r--src/3rdparty/libjpeg/jpeglib.h1096
-rw-r--r--src/3rdparty/libjpeg/jquant1.c856
-rw-r--r--src/3rdparty/libjpeg/jquant2.c1310
-rw-r--r--src/3rdparty/libjpeg/jutils.c179
-rw-r--r--src/3rdparty/libjpeg/jversion.h14
-rw-r--r--src/3rdparty/libjpeg/libjpeg.doc3006
-rw-r--r--src/3rdparty/libjpeg/makefile.ansi214
-rw-r--r--src/3rdparty/libjpeg/makefile.bcc285
-rw-r--r--src/3rdparty/libjpeg/makefile.cfg319
-rw-r--r--src/3rdparty/libjpeg/makefile.dj220
-rw-r--r--src/3rdparty/libjpeg/makefile.manx214
-rw-r--r--src/3rdparty/libjpeg/makefile.mc6249
-rw-r--r--src/3rdparty/libjpeg/makefile.mms218
-rw-r--r--src/3rdparty/libjpeg/makefile.sas252
-rw-r--r--src/3rdparty/libjpeg/makefile.unix228
-rw-r--r--src/3rdparty/libjpeg/makefile.vc211
-rw-r--r--src/3rdparty/libjpeg/makefile.vms142
-rw-r--r--src/3rdparty/libjpeg/makefile.wat233
-rw-r--r--src/3rdparty/libjpeg/structure.doc948
-rw-r--r--src/3rdparty/libjpeg/usage.doc562
-rw-r--r--src/3rdparty/libjpeg/wizard.doc211
-rw-r--r--src/3rdparty/libmng/CHANGES1447
-rw-r--r--src/3rdparty/libmng/LICENSE57
-rw-r--r--src/3rdparty/libmng/README36
-rw-r--r--src/3rdparty/libmng/README.autoconf213
-rw-r--r--src/3rdparty/libmng/README.config104
-rw-r--r--src/3rdparty/libmng/README.contrib95
-rw-r--r--src/3rdparty/libmng/README.dll41
-rw-r--r--src/3rdparty/libmng/README.examples48
-rw-r--r--src/3rdparty/libmng/README.footprint46
-rw-r--r--src/3rdparty/libmng/README.packaging24
-rw-r--r--src/3rdparty/libmng/doc/Plan1.pngbin0 -> 9058 bytes-rw-r--r--src/3rdparty/libmng/doc/Plan2.pngbin0 -> 8849 bytes-rw-r--r--src/3rdparty/libmng/doc/doc.readme19
-rw-r--r--src/3rdparty/libmng/doc/libmng.txt1107
-rw-r--r--src/3rdparty/libmng/doc/man/jng.537
-rw-r--r--src/3rdparty/libmng/doc/man/libmng.31146
-rw-r--r--src/3rdparty/libmng/doc/man/mng.542
-rw-r--r--src/3rdparty/libmng/doc/misc/magic.dif30
-rw-r--r--src/3rdparty/libmng/doc/rpm/libmng-1.0.10-rhconf.patch38
-rw-r--r--src/3rdparty/libmng/doc/rpm/libmng.spec116
-rw-r--r--src/3rdparty/libmng/libmng.h2932
-rw-r--r--src/3rdparty/libmng/libmng_callback_xs.c1239
-rw-r--r--src/3rdparty/libmng/libmng_chunk_descr.c6090
-rw-r--r--src/3rdparty/libmng/libmng_chunk_descr.h146
-rw-r--r--src/3rdparty/libmng/libmng_chunk_io.c10740
-rw-r--r--src/3rdparty/libmng/libmng_chunk_io.h415
-rw-r--r--src/3rdparty/libmng/libmng_chunk_prc.c4452
-rw-r--r--src/3rdparty/libmng/libmng_chunk_prc.h381
-rw-r--r--src/3rdparty/libmng/libmng_chunk_xs.c7016
-rw-r--r--src/3rdparty/libmng/libmng_chunks.h1026
-rw-r--r--src/3rdparty/libmng/libmng_cms.c758
-rw-r--r--src/3rdparty/libmng/libmng_cms.h92
-rw-r--r--src/3rdparty/libmng/libmng_conf.h295
-rw-r--r--src/3rdparty/libmng/libmng_data.h1032
-rw-r--r--src/3rdparty/libmng/libmng_display.c7140
-rw-r--r--src/3rdparty/libmng/libmng_display.h343
-rw-r--r--src/3rdparty/libmng/libmng_dither.c58
-rw-r--r--src/3rdparty/libmng/libmng_dither.h45
-rw-r--r--src/3rdparty/libmng/libmng_error.c326
-rw-r--r--src/3rdparty/libmng/libmng_error.h119
-rw-r--r--src/3rdparty/libmng/libmng_filter.c978
-rw-r--r--src/3rdparty/libmng/libmng_filter.h69
-rw-r--r--src/3rdparty/libmng/libmng_hlapi.c3001
-rw-r--r--src/3rdparty/libmng/libmng_jpeg.c1088
-rw-r--r--src/3rdparty/libmng/libmng_jpeg.h57
-rw-r--r--src/3rdparty/libmng/libmng_memory.h64
-rw-r--r--src/3rdparty/libmng/libmng_object_prc.c6998
-rw-r--r--src/3rdparty/libmng/libmng_object_prc.h690
-rw-r--r--src/3rdparty/libmng/libmng_objects.h635
-rw-r--r--src/3rdparty/libmng/libmng_pixels.c24610
-rw-r--r--src/3rdparty/libmng/libmng_pixels.h1147
-rw-r--r--src/3rdparty/libmng/libmng_prop_xs.c2799
-rw-r--r--src/3rdparty/libmng/libmng_read.c1369
-rw-r--r--src/3rdparty/libmng/libmng_read.h53
-rw-r--r--src/3rdparty/libmng/libmng_trace.c1683
-rw-r--r--src/3rdparty/libmng/libmng_trace.h1474
-rw-r--r--src/3rdparty/libmng/libmng_types.h574
-rw-r--r--src/3rdparty/libmng/libmng_write.c198
-rw-r--r--src/3rdparty/libmng/libmng_write.h49
-rw-r--r--src/3rdparty/libmng/libmng_zlib.c607
-rw-r--r--src/3rdparty/libmng/libmng_zlib.h60
-rw-r--r--src/3rdparty/libmng/makefiles/Makefile.am29
-rw-r--r--src/3rdparty/libmng/makefiles/README27
-rw-r--r--src/3rdparty/libmng/makefiles/configure.in193
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.bcb3108
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.dj155
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.linux180
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.mingw164
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.mingwdll158
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.qnx160
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.unix67
-rw-r--r--src/3rdparty/libmng/makefiles/makefile.vcwin3299
-rwxr-xr-xsrc/3rdparty/libmng/unmaintained/autogen.sh50
-rw-r--r--src/3rdparty/libpng/ANNOUNCE61
-rw-r--r--src/3rdparty/libpng/CHANGES2173
-rw-r--r--src/3rdparty/libpng/INSTALL199
-rw-r--r--src/3rdparty/libpng/KNOWNBUG22
-rw-r--r--src/3rdparty/libpng/LICENSE109
-rw-r--r--src/3rdparty/libpng/README264
-rw-r--r--src/3rdparty/libpng/TODO24
-rw-r--r--src/3rdparty/libpng/Y2KINFO55
-rwxr-xr-xsrc/3rdparty/libpng/configure13
-rw-r--r--src/3rdparty/libpng/example.c814
-rw-r--r--src/3rdparty/libpng/libpng-1.2.29.txt2906
-rw-r--r--src/3rdparty/libpng/libpng.33680
-rw-r--r--src/3rdparty/libpng/libpngpf.3274
-rw-r--r--src/3rdparty/libpng/png.574
-rw-r--r--src/3rdparty/libpng/png.c798
-rw-r--r--src/3rdparty/libpng/png.h3569
-rw-r--r--src/3rdparty/libpng/pngbar.jpgbin0 -> 2498 bytes-rw-r--r--src/3rdparty/libpng/pngbar.pngbin0 -> 2399 bytes-rw-r--r--src/3rdparty/libpng/pngconf.h1492
-rw-r--r--src/3rdparty/libpng/pngerror.c343
-rw-r--r--src/3rdparty/libpng/pnggccrd.c103
-rw-r--r--src/3rdparty/libpng/pngget.c901
-rw-r--r--src/3rdparty/libpng/pngmem.c608
-rw-r--r--src/3rdparty/libpng/pngnow.pngbin0 -> 2069 bytes-rw-r--r--src/3rdparty/libpng/pngpread.c1598
-rw-r--r--src/3rdparty/libpng/pngread.c1479
-rw-r--r--src/3rdparty/libpng/pngrio.c167
-rw-r--r--src/3rdparty/libpng/pngrtran.c4292
-rw-r--r--src/3rdparty/libpng/pngrutil.c3183
-rw-r--r--src/3rdparty/libpng/pngset.c1268
-rw-r--r--src/3rdparty/libpng/pngtest.c1563
-rw-r--r--src/3rdparty/libpng/pngtest.pngbin0 -> 8574 bytes-rw-r--r--src/3rdparty/libpng/pngtrans.c662
-rw-r--r--src/3rdparty/libpng/pngvcrd.c1
-rw-r--r--src/3rdparty/libpng/pngwio.c234
-rw-r--r--src/3rdparty/libpng/pngwrite.c1532
-rw-r--r--src/3rdparty/libpng/pngwtran.c572
-rw-r--r--src/3rdparty/libpng/pngwutil.c2802
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-shared.projbin0 -> 17031 bytes-rw-r--r--src/3rdparty/libpng/projects/beos/x86-shared.txt22
-rw-r--r--src/3rdparty/libpng/projects/beos/x86-static.projbin0 -> 16706 bytes-rw-r--r--src/3rdparty/libpng/projects/beos/x86-static.txt22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpf22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpg25
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpr157
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.cpp29
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.readme.txt25
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpf22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpr109
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/zlib.readme.txt14
-rw-r--r--src/3rdparty/libpng/projects/netware.txt6
-rw-r--r--src/3rdparty/libpng/projects/visualc6/README.txt57
-rw-r--r--src/3rdparty/libpng/projects/visualc6/libpng.dsp472
-rw-r--r--src/3rdparty/libpng/projects/visualc6/libpng.dsw59
-rw-r--r--src/3rdparty/libpng/projects/visualc6/pngtest.dsp314
-rw-r--r--src/3rdparty/libpng/projects/visualc71/PRJ0041.mak21
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README.txt57
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README_zlib.txt44
-rw-r--r--src/3rdparty/libpng/projects/visualc71/libpng.sln88
-rw-r--r--src/3rdparty/libpng/projects/visualc71/libpng.vcproj702
-rw-r--r--src/3rdparty/libpng/projects/visualc71/pngtest.vcproj459
-rw-r--r--src/3rdparty/libpng/projects/visualc71/zlib.vcproj670
-rw-r--r--src/3rdparty/libpng/projects/wince.txt6
-rw-r--r--src/3rdparty/libpng/scripts/CMakeLists.txt210
-rw-r--r--src/3rdparty/libpng/scripts/SCOPTIONS.ppc7
-rw-r--r--src/3rdparty/libpng/scripts/descrip.mms52
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-body.in96
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-head.in21
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config.in124
-rw-r--r--src/3rdparty/libpng/scripts/libpng.icc44
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc-configure.in10
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc.in10
-rw-r--r--src/3rdparty/libpng/scripts/makefile.32sunu254
-rw-r--r--src/3rdparty/libpng/scripts/makefile.64sunu254
-rw-r--r--src/3rdparty/libpng/scripts/makefile.acorn51
-rw-r--r--src/3rdparty/libpng/scripts/makefile.aix113
-rw-r--r--src/3rdparty/libpng/scripts/makefile.amiga48
-rw-r--r--src/3rdparty/libpng/scripts/makefile.atari51
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bc32152
-rw-r--r--src/3rdparty/libpng/scripts/makefile.beos226
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bor162
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cygwin299
-rw-r--r--src/3rdparty/libpng/scripts/makefile.darwin234
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dec214
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dj255
-rw-r--r--src/3rdparty/libpng/scripts/makefile.elf275
-rw-r--r--src/3rdparty/libpng/scripts/makefile.freebsd48
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcc79
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcmmx271
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hp64235
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpgcc245
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpux232
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ibmc71
-rw-r--r--src/3rdparty/libpng/scripts/makefile.intel102
-rw-r--r--src/3rdparty/libpng/scripts/makefile.knr99
-rw-r--r--src/3rdparty/libpng/scripts/makefile.linux249
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mingw289
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mips83
-rw-r--r--src/3rdparty/libpng/scripts/makefile.msc86
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ne12bsd45
-rw-r--r--src/3rdparty/libpng/scripts/makefile.netbsd45
-rw-r--r--src/3rdparty/libpng/scripts/makefile.nommx252
-rw-r--r--src/3rdparty/libpng/scripts/makefile.openbsd73
-rw-r--r--src/3rdparty/libpng/scripts/makefile.os269
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sco229
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sggcc242
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sgi245
-rw-r--r--src/3rdparty/libpng/scripts/makefile.so9251
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris249
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris-x86248
-rw-r--r--src/3rdparty/libpng/scripts/makefile.std92
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sunos97
-rw-r--r--src/3rdparty/libpng/scripts/makefile.tc389
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcawin3299
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcwin3299
-rw-r--r--src/3rdparty/libpng/scripts/makefile.watcom109
-rw-r--r--src/3rdparty/libpng/scripts/makevms.com144
-rw-r--r--src/3rdparty/libpng/scripts/pngos2.def257
-rw-r--r--src/3rdparty/libpng/scripts/pngw32.def238
-rw-r--r--src/3rdparty/libpng/scripts/pngw32.rc112
-rw-r--r--src/3rdparty/libpng/scripts/smakefile.ppc30
-rw-r--r--src/3rdparty/libtiff/COPYRIGHT21
-rw-r--r--src/3rdparty/libtiff/ChangeLog3698
-rw-r--r--src/3rdparty/libtiff/HOWTO-RELEASE57
-rw-r--r--src/3rdparty/libtiff/Makefile.am54
-rw-r--r--src/3rdparty/libtiff/Makefile.in724
-rw-r--r--src/3rdparty/libtiff/Makefile.vc59
-rw-r--r--src/3rdparty/libtiff/README59
-rw-r--r--src/3rdparty/libtiff/RELEASE-DATE1
-rw-r--r--src/3rdparty/libtiff/SConstruct169
-rw-r--r--src/3rdparty/libtiff/TODO12
-rw-r--r--src/3rdparty/libtiff/VERSION1
-rw-r--r--src/3rdparty/libtiff/aclocal.m47281
-rwxr-xr-xsrc/3rdparty/libtiff/autogen.sh8
-rwxr-xr-xsrc/3rdparty/libtiff/config/compile142
-rwxr-xr-xsrc/3rdparty/libtiff/config/config.guess1497
-rwxr-xr-xsrc/3rdparty/libtiff/config/config.sub1608
-rwxr-xr-xsrc/3rdparty/libtiff/config/depcomp530
-rwxr-xr-xsrc/3rdparty/libtiff/config/install-sh323
-rwxr-xr-xsrc/3rdparty/libtiff/config/ltmain.sh7339
-rwxr-xr-xsrc/3rdparty/libtiff/config/missing360
-rwxr-xr-xsrc/3rdparty/libtiff/config/mkinstalldirs150
-rwxr-xr-xsrc/3rdparty/libtiff/configure22598
-rw-r--r--src/3rdparty/libtiff/configure.ac568
-rw-r--r--src/3rdparty/libtiff/html/Makefile.am81
-rw-r--r--src/3rdparty/libtiff/html/Makefile.in626
-rw-r--r--src/3rdparty/libtiff/html/TIFFTechNote2.html707
-rw-r--r--src/3rdparty/libtiff/html/addingtags.html292
-rw-r--r--src/3rdparty/libtiff/html/bugs.html53
-rw-r--r--src/3rdparty/libtiff/html/build.html880
-rw-r--r--src/3rdparty/libtiff/html/contrib.html209
-rw-r--r--src/3rdparty/libtiff/html/document.html52
-rw-r--r--src/3rdparty/libtiff/html/images.html41
-rw-r--r--src/3rdparty/libtiff/html/images/Makefile.am46
-rw-r--r--src/3rdparty/libtiff/html/images/Makefile.in436
-rw-r--r--src/3rdparty/libtiff/html/images/back.gifbin0 -> 1000 bytes-rw-r--r--src/3rdparty/libtiff/html/images/bali.jpgbin0 -> 26152 bytes-rw-r--r--src/3rdparty/libtiff/html/images/cat.gifbin0 -> 12477 bytes-rw-r--r--src/3rdparty/libtiff/html/images/cover.jpgbin0 -> 20189 bytes-rw-r--r--src/3rdparty/libtiff/html/images/cramps.gifbin0 -> 13137 bytes-rw-r--r--src/3rdparty/libtiff/html/images/dave.gifbin0 -> 8220 bytes-rw-r--r--src/3rdparty/libtiff/html/images/info.gifbin0 -> 131 bytes-rw-r--r--src/3rdparty/libtiff/html/images/jello.jpgbin0 -> 13744 bytes-rw-r--r--src/3rdparty/libtiff/html/images/jim.gifbin0 -> 14493 bytes-rw-r--r--src/3rdparty/libtiff/html/images/note.gifbin0 -> 264 bytes-rw-r--r--src/3rdparty/libtiff/html/images/oxford.gifbin0 -> 6069 bytes-rw-r--r--src/3rdparty/libtiff/html/images/quad.jpgbin0 -> 23904 bytes-rw-r--r--src/3rdparty/libtiff/html/images/ring.gifbin0 -> 4275 bytes-rw-r--r--src/3rdparty/libtiff/html/images/smallliz.jpgbin0 -> 16463 bytes-rw-r--r--src/3rdparty/libtiff/html/images/strike.gifbin0 -> 5610 bytes-rw-r--r--src/3rdparty/libtiff/html/images/warning.gifbin0 -> 287 bytes-rw-r--r--src/3rdparty/libtiff/html/index.html121
-rw-r--r--src/3rdparty/libtiff/html/internals.html572
-rw-r--r--src/3rdparty/libtiff/html/intro.html68
-rw-r--r--src/3rdparty/libtiff/html/libtiff.html747
-rw-r--r--src/3rdparty/libtiff/html/man/Makefile.am118
-rw-r--r--src/3rdparty/libtiff/html/man/Makefile.in504
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFClose.3tiff.html87
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFDataWidth.3tiff.html98
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFError.3tiff.html106
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFFlush.3tiff.html113
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFGetField.3tiff.html1446
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFOpen.3tiff.html421
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFPrintDirectory.3tiff.html225
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFRGBAImage.3tiff.html319
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadDirectory.3tiff.html218
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html133
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadEncodedTile.3tiff.html130
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBAImage.3tiff.html301
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html208
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRGBATile.3tiff.html261
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRawStrip.3tiff.html109
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadRawTile.3tiff.html111
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadScanline.3tiff.html157
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFReadTile.3tiff.html133
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFSetDirectory.3tiff.html122
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFSetField.3tiff.html1362
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWarning.3tiff.html108
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteDirectory.3tiff.html176
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html153
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html147
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteRawStrip.3tiff.html144
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteRawTile.3tiff.html128
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteScanline.3tiff.html206
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFWriteTile.3tiff.html115
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFbuffer.3tiff.html116
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFcodec.3tiff.html116
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFcolor.3tiff.html975
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFmemory.3tiff.html110
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFquery.3tiff.html148
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFsize.3tiff.html95
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFstrip.3tiff.html129
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFswab.3tiff.html110
-rw-r--r--src/3rdparty/libtiff/html/man/TIFFtile.3tiff.html141
-rw-r--r--src/3rdparty/libtiff/html/man/fax2ps.1.html254
-rw-r--r--src/3rdparty/libtiff/html/man/fax2tiff.1.html607
-rw-r--r--src/3rdparty/libtiff/html/man/gif2tiff.1.html141
-rw-r--r--src/3rdparty/libtiff/html/man/index.html64
-rw-r--r--src/3rdparty/libtiff/html/man/libtiff.3tiff.html3137
-rw-r--r--src/3rdparty/libtiff/html/man/pal2rgb.1.html189
-rw-r--r--src/3rdparty/libtiff/html/man/ppm2tiff.1.html141
-rw-r--r--src/3rdparty/libtiff/html/man/ras2tiff.1.html139
-rw-r--r--src/3rdparty/libtiff/html/man/raw2tiff.1.html553
-rw-r--r--src/3rdparty/libtiff/html/man/rgb2ycbcr.1.html154
-rw-r--r--src/3rdparty/libtiff/html/man/sgi2tiff.1.html147
-rw-r--r--src/3rdparty/libtiff/html/man/thumbnail.1.html148
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2bw.1.html160
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2pdf.1.html599
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2ps.1.html536
-rw-r--r--src/3rdparty/libtiff/html/man/tiff2rgba.1.html161
-rw-r--r--src/3rdparty/libtiff/html/man/tiffcmp.1.html156
-rw-r--r--src/3rdparty/libtiff/html/man/tiffcp.1.html484
-rw-r--r--src/3rdparty/libtiff/html/man/tiffdither.1.html182
-rw-r--r--src/3rdparty/libtiff/html/man/tiffdump.1.html145
-rw-r--r--src/3rdparty/libtiff/html/man/tiffgt.1.html551
-rw-r--r--src/3rdparty/libtiff/html/man/tiffinfo.1.html196
-rw-r--r--src/3rdparty/libtiff/html/man/tiffmedian.1.html183
-rw-r--r--src/3rdparty/libtiff/html/man/tiffset.1.html174
-rw-r--r--src/3rdparty/libtiff/html/man/tiffsplit.1.html102
-rw-r--r--src/3rdparty/libtiff/html/man/tiffsv.1.html207
-rw-r--r--src/3rdparty/libtiff/html/misc.html112
-rw-r--r--src/3rdparty/libtiff/html/support.html655
-rw-r--r--src/3rdparty/libtiff/html/tools.html155
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta007.html112
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta016.html122
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta018.html84
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta024.html139
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta028.html146
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta029.html86
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta031.html94
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta032.html90
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta033.html82
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta034.html68
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta035.html63
-rw-r--r--src/3rdparty/libtiff/html/v3.4beta036.html117
-rw-r--r--src/3rdparty/libtiff/html/v3.5.1.html75
-rw-r--r--src/3rdparty/libtiff/html/v3.5.2.html108
-rw-r--r--src/3rdparty/libtiff/html/v3.5.3.html132
-rw-r--r--src/3rdparty/libtiff/html/v3.5.4.html88
-rw-r--r--src/3rdparty/libtiff/html/v3.5.5.html155
-rw-r--r--src/3rdparty/libtiff/html/v3.5.6-beta.html185
-rw-r--r--src/3rdparty/libtiff/html/v3.5.7.html259
-rw-r--r--src/3rdparty/libtiff/html/v3.6.0.html434
-rw-r--r--src/3rdparty/libtiff/html/v3.6.1.html199
-rw-r--r--src/3rdparty/libtiff/html/v3.7.0.html144
-rw-r--r--src/3rdparty/libtiff/html/v3.7.0alpha.html249
-rw-r--r--src/3rdparty/libtiff/html/v3.7.0beta.html162
-rw-r--r--src/3rdparty/libtiff/html/v3.7.0beta2.html131
-rw-r--r--src/3rdparty/libtiff/html/v3.7.1.html233
-rw-r--r--src/3rdparty/libtiff/html/v3.7.2.html222
-rw-r--r--src/3rdparty/libtiff/html/v3.7.3.html230
-rw-r--r--src/3rdparty/libtiff/html/v3.7.4.html133
-rw-r--r--src/3rdparty/libtiff/html/v3.8.0.html199
-rw-r--r--src/3rdparty/libtiff/html/v3.8.1.html217
-rw-r--r--src/3rdparty/libtiff/html/v3.8.2.html137
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.am138
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.in763
-rw-r--r--src/3rdparty/libtiff/libtiff/Makefile.vc98
-rw-r--r--src/3rdparty/libtiff/libtiff/SConstruct71
-rw-r--r--src/3rdparty/libtiff/libtiff/libtiff.def140
-rw-r--r--src/3rdparty/libtiff/libtiff/mkg3states.c440
-rw-r--r--src/3rdparty/libtiff/libtiff/t4.h285
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_acorn.c519
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_apple.c274
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_atari.c243
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_aux.c267
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_close.c119
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_codec.c150
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_color.c275
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_compress.c286
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h296
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h.in260
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h.vc44
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dir.c1350
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dir.h199
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirinfo.c846
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirread.c1789
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dirwrite.c1243
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_dumpmode.c117
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_error.c73
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_extension.c111
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_fax3.c1566
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_fax3.h525
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_fax3sm.c1253
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_flush.c67
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_getimage.c2598
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_jpeg.c1942
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_luv.c1606
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_lzw.c1084
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_msdos.c179
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_next.c144
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_ojpeg.c2629
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_open.c683
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_packbits.c293
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_pixarlog.c1342
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_predict.c626
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_predict.h64
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_print.c639
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_read.c650
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_stream.cxx289
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_strip.c294
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_swab.c235
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_thunder.c158
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_tile.c273
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_unix.c293
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_version.c33
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_warning.c74
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_win3.c225
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_win32.c393
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_write.c725
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_zip.c378
-rw-r--r--src/3rdparty/libtiff/libtiff/tiff.h647
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h110
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h.in100
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffconf.h.vc97
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffio.h515
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffio.hxx42
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffiop.h328
-rw-r--r--src/3rdparty/libtiff/libtiff/tiffvers.h9
-rw-r--r--src/3rdparty/libtiff/libtiff/uvcode.h173
-rw-r--r--src/3rdparty/libtiff/m4/acinclude.m4669
-rw-r--r--src/3rdparty/libtiff/m4/libtool.m46883
-rw-r--r--src/3rdparty/libtiff/m4/ltoptions.m4380
-rw-r--r--src/3rdparty/libtiff/m4/ltsugar.m4111
-rw-r--r--src/3rdparty/libtiff/m4/ltversion.m423
-rw-r--r--src/3rdparty/libtiff/nmake.opt214
-rw-r--r--src/3rdparty/libtiff/port/Makefile.am31
-rw-r--r--src/3rdparty/libtiff/port/Makefile.in501
-rw-r--r--src/3rdparty/libtiff/port/Makefile.vc43
-rw-r--r--src/3rdparty/libtiff/port/dummy.c12
-rw-r--r--src/3rdparty/libtiff/port/getopt.c124
-rw-r--r--src/3rdparty/libtiff/port/lfind.c58
-rw-r--r--src/3rdparty/libtiff/port/strcasecmp.c50
-rw-r--r--src/3rdparty/libtiff/port/strtoul.c109
-rw-r--r--src/3rdparty/libtiff/test/Makefile.am44
-rw-r--r--src/3rdparty/libtiff/test/Makefile.in607
-rw-r--r--src/3rdparty/libtiff/test/ascii_tag.c170
-rw-r--r--src/3rdparty/libtiff/test/check_tag.c72
-rw-r--r--src/3rdparty/libtiff/test/long_tag.c154
-rw-r--r--src/3rdparty/libtiff/test/short_tag.c179
-rw-r--r--src/3rdparty/libtiff/test/strip.c289
-rw-r--r--src/3rdparty/libtiff/test/strip_rw.c155
-rw-r--r--src/3rdparty/libtiff/test/test_arrays.c829
-rw-r--r--src/3rdparty/libtiff/test/test_arrays.h63
-rw-r--r--src/3rdparty/md4/md4.cpp265
-rw-r--r--src/3rdparty/md4/md4.h31
-rw-r--r--src/3rdparty/md5/md5.cpp246
-rw-r--r--src/3rdparty/md5/md5.h48
-rw-r--r--src/3rdparty/patches/freetype-2.3.5-config.patch265
-rw-r--r--src/3rdparty/patches/freetype-2.3.6-ascii.patch174
-rw-r--r--src/3rdparty/patches/libjpeg-6b-config.patch50
-rw-r--r--src/3rdparty/patches/libmng-1.0.10-endless-loop.patch65
-rw-r--r--src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch17
-rw-r--r--src/3rdparty/patches/libtiff-3.8.2-config.patch374
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-config.patch38
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-wince.patch19
-rw-r--r--src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch433
-rw-r--r--src/3rdparty/phonon/CMakeLists.txt272
-rw-r--r--src/3rdparty/phonon/COPYING.LIB510
-rw-r--r--src/3rdparty/phonon/ds9/CMakeLists.txt53
-rw-r--r--src/3rdparty/phonon/ds9/ConfigureChecks.cmake44
-rw-r--r--src/3rdparty/phonon/ds9/abstractvideorenderer.cpp118
-rw-r--r--src/3rdparty/phonon/ds9/abstractvideorenderer.h73
-rw-r--r--src/3rdparty/phonon/ds9/audiooutput.cpp111
-rw-r--r--src/3rdparty/phonon/ds9/audiooutput.h68
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp343
-rw-r--r--src/3rdparty/phonon/ds9/backend.h83
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.cpp115
-rw-r--r--src/3rdparty/phonon/ds9/backendnode.h73
-rw-r--r--src/3rdparty/phonon/ds9/compointer.h114
-rw-r--r--src/3rdparty/phonon/ds9/ds9.desktop51
-rw-r--r--src/3rdparty/phonon/ds9/effect.cpp153
-rw-r--r--src/3rdparty/phonon/ds9/effect.h59
-rw-r--r--src/3rdparty/phonon/ds9/fakesource.cpp166
-rw-r--r--src/3rdparty/phonon/ds9/fakesource.h54
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.cpp228
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.h57
-rw-r--r--src/3rdparty/phonon/ds9/lgpl-2.1.txt504
-rw-r--r--src/3rdparty/phonon/ds9/lgpl-3.txt165
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.cpp1099
-rw-r--r--src/3rdparty/phonon/ds9/mediagraph.h148
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp1208
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.h313
-rw-r--r--src/3rdparty/phonon/ds9/phononds9_namespace.h33
-rw-r--r--src/3rdparty/phonon/ds9/qasyncreader.cpp198
-rw-r--r--src/3rdparty/phonon/ds9/qasyncreader.h77
-rw-r--r--src/3rdparty/phonon/ds9/qaudiocdreader.cpp332
-rw-r--r--src/3rdparty/phonon/ds9/qaudiocdreader.h58
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.cpp831
-rw-r--r--src/3rdparty/phonon/ds9/qbasefilter.h136
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.cpp357
-rw-r--r--src/3rdparty/phonon/ds9/qmeminputpin.h82
-rw-r--r--src/3rdparty/phonon/ds9/qpin.cpp653
-rw-r--r--src/3rdparty/phonon/ds9/qpin.h121
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.cpp1011
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_soft.h68
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp333
-rw-r--r--src/3rdparty/phonon/ds9/videorenderer_vmr9.h56
-rw-r--r--src/3rdparty/phonon/ds9/videowidget.cpp397
-rw-r--r--src/3rdparty/phonon/ds9/videowidget.h96
-rw-r--r--src/3rdparty/phonon/ds9/volumeeffect.cpp296
-rw-r--r--src/3rdparty/phonon/ds9/volumeeffect.h71
-rw-r--r--src/3rdparty/phonon/gstreamer/CMakeLists.txt72
-rw-r--r--src/3rdparty/phonon/gstreamer/ConfigureChecks.cmake37
-rw-r--r--src/3rdparty/phonon/gstreamer/Messages.sh5
-rw-r--r--src/3rdparty/phonon/gstreamer/abstractrenderer.cpp56
-rw-r--r--src/3rdparty/phonon/gstreamer/abstractrenderer.h62
-rw-r--r--src/3rdparty/phonon/gstreamer/alsasink2.c1756
-rw-r--r--src/3rdparty/phonon/gstreamer/alsasink2.h87
-rw-r--r--src/3rdparty/phonon/gstreamer/artssink.cpp277
-rw-r--r--src/3rdparty/phonon/gstreamer/artssink.h91
-rw-r--r--src/3rdparty/phonon/gstreamer/audioeffect.cpp78
-rw-r--r--src/3rdparty/phonon/gstreamer/audioeffect.h55
-rw-r--r--src/3rdparty/phonon/gstreamer/audiooutput.cpp257
-rw-r--r--src/3rdparty/phonon/gstreamer/audiooutput.h82
-rw-r--r--src/3rdparty/phonon/gstreamer/backend.cpp455
-rw-r--r--src/3rdparty/phonon/gstreamer/backend.h101
-rw-r--r--src/3rdparty/phonon/gstreamer/common.h51
-rw-r--r--src/3rdparty/phonon/gstreamer/devicemanager.cpp357
-rw-r--r--src/3rdparty/phonon/gstreamer/devicemanager.h80
-rw-r--r--src/3rdparty/phonon/gstreamer/effect.cpp246
-rw-r--r--src/3rdparty/phonon/gstreamer/effect.h64
-rw-r--r--src/3rdparty/phonon/gstreamer/effectmanager.cpp105
-rw-r--r--src/3rdparty/phonon/gstreamer/effectmanager.h91
-rw-r--r--src/3rdparty/phonon/gstreamer/glrenderer.cpp339
-rw-r--r--src/3rdparty/phonon/gstreamer/glrenderer.h101
-rw-r--r--src/3rdparty/phonon/gstreamer/gsthelper.cpp170
-rw-r--r--src/3rdparty/phonon/gstreamer/gsthelper.h49
-rw-r--r--src/3rdparty/phonon/gstreamer/gstreamer.desktop51
-rw-r--r--src/3rdparty/phonon/gstreamer/lgpl-2.1.txt504
-rw-r--r--src/3rdparty/phonon/gstreamer/lgpl-3.txt165
-rw-r--r--src/3rdparty/phonon/gstreamer/medianode.cpp456
-rw-r--r--src/3rdparty/phonon/gstreamer/medianode.h128
-rw-r--r--src/3rdparty/phonon/gstreamer/medianodeevent.cpp38
-rw-r--r--src/3rdparty/phonon/gstreamer/medianodeevent.h70
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.cpp1479
-rw-r--r--src/3rdparty/phonon/gstreamer/mediaobject.h294
-rw-r--r--src/3rdparty/phonon/gstreamer/message.cpp75
-rw-r--r--src/3rdparty/phonon/gstreamer/message.h58
-rw-r--r--src/3rdparty/phonon/gstreamer/phononsrc.cpp257
-rw-r--r--src/3rdparty/phonon/gstreamer/phononsrc.h69
-rw-r--r--src/3rdparty/phonon/gstreamer/qwidgetvideosink.cpp221
-rw-r--r--src/3rdparty/phonon/gstreamer/qwidgetvideosink.h97
-rw-r--r--src/3rdparty/phonon/gstreamer/streamreader.cpp53
-rw-r--r--src/3rdparty/phonon/gstreamer/streamreader.h96
-rw-r--r--src/3rdparty/phonon/gstreamer/videowidget.cpp387
-rw-r--r--src/3rdparty/phonon/gstreamer/videowidget.h106
-rw-r--r--src/3rdparty/phonon/gstreamer/volumefadereffect.cpp162
-rw-r--r--src/3rdparty/phonon/gstreamer/volumefadereffect.h70
-rw-r--r--src/3rdparty/phonon/gstreamer/widgetrenderer.cpp150
-rw-r--r--src/3rdparty/phonon/gstreamer/widgetrenderer.h63
-rw-r--r--src/3rdparty/phonon/gstreamer/x11renderer.cpp194
-rw-r--r--src/3rdparty/phonon/gstreamer/x11renderer.h68
-rw-r--r--src/3rdparty/phonon/includes/CMakeLists.txt49
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AbstractAudioOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AbstractMediaStream1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AbstractVideoOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AddonInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioDevice1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioDeviceEnumerator1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioOutputDevice1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioOutputDeviceModel1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/AudioOutputInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/BackendCapabilities1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/BackendInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Effect1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/EffectDescription1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/EffectDescriptionModel1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/EffectInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/EffectParameter1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/EffectWidget1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/AbstractVideoDataOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/AudioDataOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/SnapshotInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/VideoDataOutput1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/VideoDataOutputInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/VideoFrame1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/VideoFrame21
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Experimental/Visualization1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Global1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/MediaController1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/MediaNode1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/MediaObject1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/MediaObjectInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/MediaSource1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/ObjectDescription1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/ObjectDescriptionModel1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/Path1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/PlatformPlugin1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/SeekSlider1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/StreamInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VideoPlayer1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VideoWidget1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VideoWidgetInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VolumeFaderEffect1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VolumeFaderInterface1
-rw-r--r--src/3rdparty/phonon/includes/Phonon/VolumeSlider1
-rw-r--r--src/3rdparty/phonon/phonon.pc.cmake11
-rw-r--r--src/3rdparty/phonon/phonon/.krazy2
-rw-r--r--src/3rdparty/phonon/phonon/BUGS9
-rw-r--r--src/3rdparty/phonon/phonon/CMakeLists.txt104
-rw-r--r--src/3rdparty/phonon/phonon/IDEAS70
-rw-r--r--src/3rdparty/phonon/phonon/Messages.sh6
-rw-r--r--src/3rdparty/phonon/phonon/TODO31
-rw-r--r--src/3rdparty/phonon/phonon/abstractaudiooutput.cpp50
-rw-r--r--src/3rdparty/phonon/phonon/abstractaudiooutput.h57
-rw-r--r--src/3rdparty/phonon/phonon/abstractaudiooutput_p.cpp44
-rw-r--r--src/3rdparty/phonon/phonon/abstractaudiooutput_p.h50
-rw-r--r--src/3rdparty/phonon/phonon/abstractmediastream.cpp198
-rw-r--r--src/3rdparty/phonon/phonon/abstractmediastream.h227
-rw-r--r--src/3rdparty/phonon/phonon/abstractmediastream_p.h83
-rw-r--r--src/3rdparty/phonon/phonon/abstractvideooutput.cpp41
-rw-r--r--src/3rdparty/phonon/phonon/abstractvideooutput.h74
-rw-r--r--src/3rdparty/phonon/phonon/abstractvideooutput_p.cpp41
-rw-r--r--src/3rdparty/phonon/phonon/abstractvideooutput_p.h48
-rw-r--r--src/3rdparty/phonon/phonon/addoninterface.h103
-rw-r--r--src/3rdparty/phonon/phonon/audiooutput.cpp418
-rw-r--r--src/3rdparty/phonon/phonon/audiooutput.h179
-rw-r--r--src/3rdparty/phonon/phonon/audiooutput_p.h95
-rw-r--r--src/3rdparty/phonon/phonon/audiooutputadaptor.cpp101
-rw-r--r--src/3rdparty/phonon/phonon/audiooutputadaptor_p.h109
-rw-r--r--src/3rdparty/phonon/phonon/audiooutputinterface.cpp40
-rw-r--r--src/3rdparty/phonon/phonon/audiooutputinterface.h151
-rw-r--r--src/3rdparty/phonon/phonon/backend.dox107
-rw-r--r--src/3rdparty/phonon/phonon/backendcapabilities.cpp121
-rw-r--r--src/3rdparty/phonon/phonon/backendcapabilities.h213
-rw-r--r--src/3rdparty/phonon/phonon/backendcapabilities_p.h50
-rw-r--r--src/3rdparty/phonon/phonon/backendinterface.h287
-rw-r--r--src/3rdparty/phonon/phonon/effect.cpp136
-rw-r--r--src/3rdparty/phonon/phonon/effect.h119
-rw-r--r--src/3rdparty/phonon/phonon/effect_p.h61
-rw-r--r--src/3rdparty/phonon/phonon/effectinterface.h68
-rw-r--r--src/3rdparty/phonon/phonon/effectparameter.cpp142
-rw-r--r--src/3rdparty/phonon/phonon/effectparameter.h237
-rw-r--r--src/3rdparty/phonon/phonon/effectparameter_p.h56
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget.cpp254
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget.h76
-rw-r--r--src/3rdparty/phonon/phonon/effectwidget_p.h64
-rwxr-xr-xsrc/3rdparty/phonon/phonon/extractmethodcalls.rb527
-rw-r--r--src/3rdparty/phonon/phonon/factory.cpp457
-rw-r--r--src/3rdparty/phonon/phonon/factory_p.h196
-rw-r--r--src/3rdparty/phonon/phonon/frontendinterface_p.h68
-rw-r--r--src/3rdparty/phonon/phonon/globalconfig.cpp243
-rw-r--r--src/3rdparty/phonon/phonon/globalconfig_p.h65
-rw-r--r--src/3rdparty/phonon/phonon/globalstatic_p.h293
-rw-r--r--src/3rdparty/phonon/phonon/iodevicestream.cpp100
-rw-r--r--src/3rdparty/phonon/phonon/iodevicestream_p.h58
-rw-r--r--src/3rdparty/phonon/phonon/mediacontroller.cpp239
-rw-r--r--src/3rdparty/phonon/phonon/mediacontroller.h188
-rw-r--r--src/3rdparty/phonon/phonon/medianode.cpp130
-rw-r--r--src/3rdparty/phonon/phonon/medianode.h69
-rw-r--r--src/3rdparty/phonon/phonon/medianode_p.h145
-rw-r--r--src/3rdparty/phonon/phonon/medianodedestructionhandler_p.h62
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject.cpp572
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject.dox71
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject.h625
-rw-r--r--src/3rdparty/phonon/phonon/mediaobject_p.h113
-rw-r--r--src/3rdparty/phonon/phonon/mediaobjectinterface.h242
-rw-r--r--src/3rdparty/phonon/phonon/mediasource.cpp232
-rw-r--r--src/3rdparty/phonon/phonon/mediasource.h279
-rw-r--r--src/3rdparty/phonon/phonon/mediasource_p.h89
-rw-r--r--src/3rdparty/phonon/phonon/objectdescription.cpp140
-rw-r--r--src/3rdparty/phonon/phonon/objectdescription.h342
-rw-r--r--src/3rdparty/phonon/phonon/objectdescription_p.h64
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.cpp392
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h380
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel_p.h65
-rw-r--r--src/3rdparty/phonon/phonon/org.kde.Phonon.AudioOutput.xml32
-rw-r--r--src/3rdparty/phonon/phonon/path.cpp472
-rw-r--r--src/3rdparty/phonon/phonon/path.h243
-rw-r--r--src/3rdparty/phonon/phonon/path_p.h79
-rw-r--r--src/3rdparty/phonon/phonon/phonon_export.h58
-rw-r--r--src/3rdparty/phonon/phonon/phonondefs.h144
-rw-r--r--src/3rdparty/phonon/phonon/phonondefs_p.h369
-rw-r--r--src/3rdparty/phonon/phonon/phononnamespace.cpp92
-rw-r--r--src/3rdparty/phonon/phonon/phononnamespace.h306
-rw-r--r--src/3rdparty/phonon/phonon/phononnamespace.h.in306
-rw-r--r--src/3rdparty/phonon/phonon/phononnamespace_p.h38
-rw-r--r--src/3rdparty/phonon/phonon/platform.cpp144
-rw-r--r--src/3rdparty/phonon/phonon/platform_p.h62
-rw-r--r--src/3rdparty/phonon/phonon/platformplugin.h118
-rwxr-xr-xsrc/3rdparty/phonon/phonon/preprocessandextract.sh39
-rw-r--r--src/3rdparty/phonon/phonon/qsettingsgroup_p.h91
-rw-r--r--src/3rdparty/phonon/phonon/seekslider.cpp263
-rw-r--r--src/3rdparty/phonon/phonon/seekslider.h157
-rw-r--r--src/3rdparty/phonon/phonon/seekslider_p.h101
-rw-r--r--src/3rdparty/phonon/phonon/stream-thoughts72
-rw-r--r--src/3rdparty/phonon/phonon/streaminterface.cpp114
-rw-r--r--src/3rdparty/phonon/phonon/streaminterface.h123
-rw-r--r--src/3rdparty/phonon/phonon/streaminterface_p.h59
-rw-r--r--src/3rdparty/phonon/phonon/videoplayer.cpp184
-rw-r--r--src/3rdparty/phonon/phonon/videoplayer.h207
-rw-r--r--src/3rdparty/phonon/phonon/videowidget.cpp183
-rw-r--r--src/3rdparty/phonon/phonon/videowidget.h219
-rw-r--r--src/3rdparty/phonon/phonon/videowidget_p.h84
-rw-r--r--src/3rdparty/phonon/phonon/videowidgetinterface.h65
-rw-r--r--src/3rdparty/phonon/phonon/volumefadereffect.cpp108
-rw-r--r--src/3rdparty/phonon/phonon/volumefadereffect.h178
-rw-r--r--src/3rdparty/phonon/phonon/volumefadereffect_p.h58
-rw-r--r--src/3rdparty/phonon/phonon/volumefaderinterface.h58
-rw-r--r--src/3rdparty/phonon/phonon/volumeslider.cpp262
-rw-r--r--src/3rdparty/phonon/phonon/volumeslider.h155
-rw-r--r--src/3rdparty/phonon/phonon/volumeslider_p.h101
-rw-r--r--src/3rdparty/phonon/qt7/CMakeLists.txt58
-rw-r--r--src/3rdparty/phonon/qt7/ConfigureChecks.cmake16
-rw-r--r--src/3rdparty/phonon/qt7/audioconnection.h84
-rw-r--r--src/3rdparty/phonon/qt7/audioconnection.mm152
-rw-r--r--src/3rdparty/phonon/qt7/audiodevice.h52
-rw-r--r--src/3rdparty/phonon/qt7/audiodevice.mm177
-rw-r--r--src/3rdparty/phonon/qt7/audioeffects.h80
-rw-r--r--src/3rdparty/phonon/qt7/audioeffects.mm254
-rw-r--r--src/3rdparty/phonon/qt7/audiograph.h86
-rw-r--r--src/3rdparty/phonon/qt7/audiograph.mm320
-rw-r--r--src/3rdparty/phonon/qt7/audiomixer.h91
-rw-r--r--src/3rdparty/phonon/qt7/audiomixer.mm181
-rw-r--r--src/3rdparty/phonon/qt7/audionode.h86
-rw-r--r--src/3rdparty/phonon/qt7/audionode.mm240
-rw-r--r--src/3rdparty/phonon/qt7/audiooutput.h88
-rw-r--r--src/3rdparty/phonon/qt7/audiooutput.mm168
-rw-r--r--src/3rdparty/phonon/qt7/audiopartoutput.h47
-rw-r--r--src/3rdparty/phonon/qt7/audiopartoutput.mm69
-rw-r--r--src/3rdparty/phonon/qt7/audiosplitter.h50
-rw-r--r--src/3rdparty/phonon/qt7/audiosplitter.mm52
-rw-r--r--src/3rdparty/phonon/qt7/backend.h61
-rw-r--r--src/3rdparty/phonon/qt7/backend.mm276
-rw-r--r--src/3rdparty/phonon/qt7/backendheader.h184
-rw-r--r--src/3rdparty/phonon/qt7/backendheader.mm127
-rw-r--r--src/3rdparty/phonon/qt7/backendinfo.h48
-rw-r--r--src/3rdparty/phonon/qt7/backendinfo.mm311
-rw-r--r--src/3rdparty/phonon/qt7/lgpl-2.1.txt504
-rw-r--r--src/3rdparty/phonon/qt7/lgpl-3.txt165
-rw-r--r--src/3rdparty/phonon/qt7/medianode.h85
-rw-r--r--src/3rdparty/phonon/qt7/medianode.mm261
-rw-r--r--src/3rdparty/phonon/qt7/medianodeevent.h71
-rw-r--r--src/3rdparty/phonon/qt7/medianodeevent.mm37
-rw-r--r--src/3rdparty/phonon/qt7/medianodevideopart.h42
-rw-r--r--src/3rdparty/phonon/qt7/medianodevideopart.mm37
-rw-r--r--src/3rdparty/phonon/qt7/mediaobject.h187
-rw-r--r--src/3rdparty/phonon/qt7/mediaobject.mm945
-rw-r--r--src/3rdparty/phonon/qt7/mediaobjectaudionode.h75
-rw-r--r--src/3rdparty/phonon/qt7/mediaobjectaudionode.mm207
-rw-r--r--src/3rdparty/phonon/qt7/quicktimeaudioplayer.h112
-rw-r--r--src/3rdparty/phonon/qt7/quicktimeaudioplayer.mm491
-rw-r--r--src/3rdparty/phonon/qt7/quicktimemetadata.h67
-rw-r--r--src/3rdparty/phonon/qt7/quicktimemetadata.mm185
-rw-r--r--src/3rdparty/phonon/qt7/quicktimestreamreader.h71
-rw-r--r--src/3rdparty/phonon/qt7/quicktimestreamreader.mm137
-rw-r--r--src/3rdparty/phonon/qt7/quicktimevideoplayer.h175
-rw-r--r--src/3rdparty/phonon/qt7/quicktimevideoplayer.mm1020
-rw-r--r--src/3rdparty/phonon/qt7/videoeffect.h63
-rw-r--r--src/3rdparty/phonon/qt7/videoeffect.mm76
-rw-r--r--src/3rdparty/phonon/qt7/videoframe.h98
-rw-r--r--src/3rdparty/phonon/qt7/videoframe.mm398
-rw-r--r--src/3rdparty/phonon/qt7/videowidget.h71
-rw-r--r--src/3rdparty/phonon/qt7/videowidget.mm883
-rw-r--r--src/3rdparty/phonon/waveout/audiooutput.cpp78
-rw-r--r--src/3rdparty/phonon/waveout/audiooutput.h65
-rw-r--r--src/3rdparty/phonon/waveout/backend.cpp131
-rw-r--r--src/3rdparty/phonon/waveout/backend.h69
-rw-r--r--src/3rdparty/phonon/waveout/mediaobject.cpp686
-rw-r--r--src/3rdparty/phonon/waveout/mediaobject.h162
-rw-r--r--src/3rdparty/ptmalloc/COPYRIGHT19
-rw-r--r--src/3rdparty/ptmalloc/ChangeLog33
-rw-r--r--src/3rdparty/ptmalloc/Makefile211
-rw-r--r--src/3rdparty/ptmalloc/README186
-rw-r--r--src/3rdparty/ptmalloc/lran2.h51
-rw-r--r--src/3rdparty/ptmalloc/malloc-2.8.3.h534
-rw-r--r--src/3rdparty/ptmalloc/malloc-private.h170
-rw-r--r--src/3rdparty/ptmalloc/malloc.c5515
-rw-r--r--src/3rdparty/ptmalloc/ptmalloc3.c1135
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/generic/atomic.h1
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/generic/malloc-machine.h68
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/generic/thread-st.h48
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/pthread/malloc-machine.h131
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/pthread/thread-st.h111
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/solaris/malloc-machine.h51
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/solaris/thread-st.h72
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/sproc/malloc-machine.h51
-rw-r--r--src/3rdparty/ptmalloc/sysdeps/sproc/thread-st.h85
-rw-r--r--src/3rdparty/sha1/sha1.cpp263
-rw-r--r--src/3rdparty/sqlite/shell.c2093
-rw-r--r--src/3rdparty/sqlite/sqlite3.c87017
-rw-r--r--src/3rdparty/sqlite/sqlite3.h5638
-rw-r--r--src/3rdparty/webkit/ChangeLog3103
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/APICast.h119
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp116
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSBase.h130
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSBasePrivate.h52
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp79
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h57
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp70
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h58
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.cpp41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h114
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h496
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp244
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h122
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp152
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.h132
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp507
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.h694
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSProfilerPrivate.cpp46
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSProfilerPrivate.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSRetainPtr.h173
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.cpp109
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h144
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRefBSTR.cpp42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRefBSTR.h62
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRefCF.cpp52
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSStringRefCF.h60
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.cpp270
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.h278
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JavaScript.h36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JavaScriptCore.h32
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.cpp55
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.h81
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/WebKitAvailability.h763
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/AUTHORS2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/COPYING.LIB488
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog26053
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog-2002-12-032271
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog-2003-10-251483
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog-2007-10-1426221
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog-2008-08-1031482
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/DerivedSources.make75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSRetainPtr.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/OpaqueJSString.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/Info.plist24
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.order1526
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri215
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCorePrefix.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/THANKS8
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h160
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h1929
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h1675
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp1605
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h553
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h80
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h146
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/JumpTable.cpp45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/JumpTable.h102
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.cpp186
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h231
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp300
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h214
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.cpp80
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.h156
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp1778
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h479
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/Label.h92
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/LabelScope.h79
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h121
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/SegmentedVector.h170
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/config.h66
-rwxr-xr-xsrc/3rdparty/webkit/JavaScriptCore/create_hash_table278
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp54
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h59
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp81
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.h67
-rwxr-xr-xsrc/3rdparty/webkit/JavaScriptCore/docs/make-bytecode-docs.pl42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h37
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h62
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp5106
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h232
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h54
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h23
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h39
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h23
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h50
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/chartables.c96
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/headers.pri9
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.cpp38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h147
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp6108
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h375
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Register.h299
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h222
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.cpp38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h179
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp56
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocatorWin.cpp56
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp1907
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.h530
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp769
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp353
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h406
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp704
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jsc.cpp490
-rwxr-xr-xsrc/3rdparty/webkit/JavaScriptCore/make-generated-sources.sh11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/os-win32/stdbool.h45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/os-win32/stdint.h66
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/os-wince/ce_time.cpp677
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/os-wince/ce_time.h16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y2084
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Keywords.table72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Lexer.cpp900
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h171
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/NodeInfo.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp2721
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h2418
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Parser.cpp104
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Parser.h123
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/ResultType.h159
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/SourceCode.h91
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/SourceProvider.h79
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/AUTHORS12
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/COPYING35
-rwxr-xr-xsrc/3rdparty/webkit/JavaScriptCore/pcre/dftables272
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre.h68
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre.pri35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_compile.cpp2699
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp2176
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_internal.h423
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_tables.cpp72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp99
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_xclass.cpp115
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/ucpinternal.h126
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/ucptable.cpp2968
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/CallIdentifier.h95
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/HeavyProfile.cpp115
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/HeavyProfile.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/Profile.cpp137
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/Profile.h83
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfileGenerator.cpp169
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfileGenerator.h76
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfileNode.cpp352
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfileNode.h178
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.cpp153
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.h35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm106
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/TreeProfile.cpp51
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/TreeProfile.h51
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.cpp84
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h161
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.cpp232
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h227
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArrayConstructor.cpp84
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArrayConstructor.h40
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArrayPrototype.cpp794
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArrayPrototype.h41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h55
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanConstructor.cpp78
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanConstructor.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanObject.cpp35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanObject.h46
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanPrototype.cpp82
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BooleanPrototype.h35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ByteArray.cpp38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ByteArray.h70
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CallData.cpp42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CallData.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ClassInfo.h62
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp1223
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h287
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CollectorHeapIterator.h90
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.cpp38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Completion.cpp77
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Completion.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.cpp42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ConstructData.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.cpp175
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateConstructor.h43
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp116
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.h65
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateMath.cpp1067
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateMath.h191
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.cpp1056
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DatePrototype.h47
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Error.cpp127
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Error.h65
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorConstructor.cpp73
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorConstructor.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorInstance.cpp33
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorInstance.h38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorPrototype.cpp67
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ErrorPrototype.h37
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ExceptionHelpers.cpp234
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ExceptionHelpers.h57
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp128
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.cpp136
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/FunctionPrototype.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/GetterSetter.cpp84
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/GetterSetter.h75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/GlobalEvalFunction.cpp49
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/GlobalEvalFunction.h46
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp268
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.h144
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/InitializeThreading.cpp72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/InitializeThreading.h40
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp51
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.h64
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp184
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.h96
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp1005
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h126
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.cpp95
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSByteArray.h111
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.cpp223
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h311
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.cpp174
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSFunction.h103
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp188
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h138
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp460
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h380
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp432
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.h58
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSImmediate.cpp96
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSImmediate.h601
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp200
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h102
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSNotAnObject.cpp125
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSNotAnObject.h97
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSNumberCell.cpp124
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSNumberCell.h262
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp518
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h554
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp90
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.h116
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSStaticScopeObject.cpp84
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSStaticScopeObject.h69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSString.cpp152
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSString.h214
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSType.h42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.cpp104
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSValue.h223
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.cpp70
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSVariableObject.h164
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSWrapperObject.cpp36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSWrapperObject.h60
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.cpp98
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h276
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/MathObject.cpp240
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/MathObject.h45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NativeErrorConstructor.cpp73
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NativeErrorConstructor.h51
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NativeErrorPrototype.cpp39
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NativeErrorPrototype.h35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberConstructor.cpp123
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberConstructor.h55
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberObject.cpp58
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberObject.h47
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberPrototype.cpp441
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/NumberPrototype.h35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.cpp72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.h41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ObjectPrototype.cpp134
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ObjectPrototype.h37
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Operations.cpp75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Operations.h137
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertyMapHashTable.h87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.cpp50
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertyNameArray.h112
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.cpp45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PropertySlot.h213
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Protect.h217
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PrototypeFunction.cpp57
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PrototypeFunction.h45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/PutPropertySlot.h81
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp181
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h78
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp385
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.h82
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpMatchesArray.h87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpObject.cpp167
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpObject.h83
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.cpp118
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/RegExpPrototype.h38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp68
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h225
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChainMark.h39
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp112
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringConstructor.cpp90
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringConstructor.h40
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.cpp101
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringObject.h72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h55
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp779
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.h42
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp1047
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h228
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp73
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.h54
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/StructureTransitionTable.h72
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/SymbolTable.h126
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Tracing.d40
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Tracing.h50
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TypeInfo.h63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp1638
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/UString.h385
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/CharacterClass.cpp140
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/CharacterClass.h68
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/CharacterClassConstructor.cpp257
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/CharacterClassConstructor.h99
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/Escapes.h150
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/Quantifier.h66
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WREC.cpp89
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WREC.h54
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECFunctors.cpp80
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECFunctors.h109
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECGenerator.cpp665
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECGenerator.h112
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECParser.cpp637
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wrec/WRECParser.h214
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ASCIICType.h152
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/AVLTree.h959
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/AlwaysInline.h55
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp186
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h245
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Deque.h592
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/DisallowCType.h74
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp3851
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h97
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h43
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.cpp59
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h97
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/GetPtr.h33
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h204
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashFunctions.h186
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashIterators.h216
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h334
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h271
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashTable.cpp69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashTable.h1158
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashTraits.h156
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ListHashSet.h616
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ListRefPtr.h61
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h47
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.cpp142
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MainThread.h57
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MallocZoneSupport.h65
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MathExtras.h180
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h136
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/NotFound.h35
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h71
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h129
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/PassRefPtr.h195
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h505
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.h36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h66
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h107
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefCountedLeakCounter.cpp100
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefCountedLeakCounter.h48
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h205
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefPtrHashMap.h336
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RetainPtr.h210
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/StdLibExtras.h38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/StringExtras.h84
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCPackedCache.h234
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCPageMap.h289
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h239
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCSystemAlloc.cpp437
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCSystemAlloc.h71
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h229
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecificWin.cpp45
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp81
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h276
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingGtk.cpp244
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingNone.cpp58
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp275
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingQt.cpp257
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp472
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/UnusedParam.h29
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h950
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/VectorTraits.h119
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp2439
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.h38
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h67
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/CollatorDefault.cpp75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/UTF8.cpp303
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/UTF8.h75
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Unicode.h37
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp144
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h219
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h526
-rw-r--r--src/3rdparty/webkit/VERSION11
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog41598
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2002-12-0317943
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2003-10-2518662
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2005-08-2358892
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2005-12-1927451
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2006-05-1039107
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2006-12-3156037
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2007-10-1470865
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog-2008-08-1082205
-rw-r--r--src/3rdparty/webkit/WebCore/DerivedSources.cpp338
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/debugger/Debugger.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/debugger/DebuggerCallFrame.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/interpreter/CallFrame.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/interpreter/Interpreter.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/masm/X86Assembler.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/parser/Parser.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/parser/SourceCode.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/parser/SourceProvider.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/pcre/pcre.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/profiler/Profile.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/profiler/ProfileNode.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/profiler/Profiler.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/ArgList.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/ArrayPrototype.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/BooleanObject.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/ByteArray.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/CallData.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Collector.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/CollectorHeapIterator.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Completion.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/ConstructData.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/DateInstance.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Error.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/FunctionConstructor.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/FunctionPrototype.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Identifier.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/InitializeThreading.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/InternalFunction.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSArray.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSByteArray.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSFunction.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSGlobalData.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSGlobalObject.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSLock.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSNumberCell.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSObject.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSString.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSValue.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Lookup.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/ObjectPrototype.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Operations.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/PropertyMap.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/PropertyNameArray.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Protect.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/PrototypeFunction.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/StringObject.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/StringPrototype.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/Structure.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/SymbolTable.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/UString.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wrec/WREC.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/ASCIICType.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/AlwaysInline.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Assertions.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Deque.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/DisallowCType.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/FastMalloc.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Forward.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/GetPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashCountedSet.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashFunctions.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashMap.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashSet.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashTable.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/HashTraits.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/ListHashSet.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/ListRefPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Locker.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/MainThread.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/MathExtras.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/MessageQueue.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Noncopyable.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/NotFound.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/OwnArrayPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/OwnPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/PassRefPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Platform.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/RandomNumber.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/RefCounted.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/RefCountedLeakCounter.h2
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/RefPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/RetainPtr.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/StdLibExtras.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/StringExtras.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/ThreadSpecific.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Threading.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/UnusedParam.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/Vector.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/VectorTraits.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/dtoa.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/unicode/Collator.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/unicode/UTF8.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/unicode/Unicode.h1
-rw-r--r--src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h1
-rw-r--r--src/3rdparty/webkit/WebCore/Info.plist24
-rw-r--r--src/3rdparty/webkit/WebCore/LICENSE-APPLE22
-rw-r--r--src/3rdparty/webkit/WebCore/LICENSE-LGPL-2481
-rw-r--r--src/3rdparty/webkit/WebCore/LICENSE-LGPL-2.1502
-rw-r--r--src/3rdparty/webkit/WebCore/Resources/aliasCursor.pngbin0 -> 752 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/cellCursor.pngbin0 -> 183 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/contextMenuCursor.pngbin0 -> 523 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/copyCursor.pngbin0 -> 1652 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/crossHairCursor.pngbin0 -> 319 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/deleteButton.pngbin0 -> 2230 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/deleteButton.tiffbin0 -> 2546 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/deleteButtonPressed.pngbin0 -> 2319 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/deleteButtonPressed.tiffbin0 -> 2550 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/eastResizeCursor.pngbin0 -> 123 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/eastWestResizeCursor.pngbin0 -> 126 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/helpCursor.pngbin0 -> 239 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/linkCursor.pngbin0 -> 341 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/missingImage.pngbin0 -> 411 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/missingImage.tiffbin0 -> 654 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/moveCursor.pngbin0 -> 175 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/noDropCursor.pngbin0 -> 1455 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/noneCursor.pngbin0 -> 90 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northEastResizeCursor.pngbin0 -> 209 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northEastSouthWestResizeCursor.pngbin0 -> 212 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northResizeCursor.pngbin0 -> 125 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northSouthResizeCursor.pngbin0 -> 144 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northWestResizeCursor.pngbin0 -> 174 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/northWestSouthEastResizeCursor.pngbin0 -> 193 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/notAllowedCursor.pngbin0 -> 1101 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/nullPlugin.pngbin0 -> 1286 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/progressCursor.pngbin0 -> 1791 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/southEastResizeCursor.pngbin0 -> 166 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/southResizeCursor.pngbin0 -> 128 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/southWestResizeCursor.pngbin0 -> 177 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/textAreaResizeCorner.pngbin0 -> 146 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/textAreaResizeCorner.tiffbin0 -> 254 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/urlIcon.pngbin0 -> 819 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/verticalTextCursor.pngbin0 -> 120 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/waitCursor.pngbin0 -> 125 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/westResizeCursor.pngbin0 -> 122 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/zoomInCursor.pngbin0 -> 199 bytes-rw-r--r--src/3rdparty/webkit/WebCore/Resources/zoomOutCursor.pngbin0 -> 182 bytes-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.DashboardSupport.exp3
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.JNI.exp10
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.LP64.exp3
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.NPAPI.exp23
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.SVG.Animation.exp2
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.SVG.Filters.exp24
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.SVG.ForeignObject.exp1
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.SVG.exp95
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.Tiger.exp13
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.order14111
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2038
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.qrc19
-rw-r--r--src/3rdparty/webkit/WebCore/WebCorePrefix.cpp27
-rw-r--r--src/3rdparty/webkit/WebCore/WebCorePrefix.h126
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/CachedScriptSourceProvider.h67
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/DOMTimer.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/DOMTimer.h68
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/GCController.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/GCController.h55
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSAudioConstructor.h58
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCSSStyleDeclarationCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCSSValueCustom.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp389
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSClipboardCustom.cpp142
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSConsoleCustom.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionCallback.h58
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp84
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomPositionErrorCallback.h58
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementCallback.h62
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.h63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp139
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionCallback.h63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.h62
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.cpp102
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomVoidCallback.h62
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomXPathNSResolver.h64
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp146
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.cpp538
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMBinding.h188
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMGlobalObject.h125
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMStringListCustom.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.cpp875
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowBase.h130
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.cpp325
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowCustom.h202
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowShell.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDOMWindowShell.h92
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDatabaseCustom.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDocumentCustom.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSDocumentFragmentCustom.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSElementCustom.cpp151
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventCustom.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.cpp340
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventListener.h125
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.h43
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventTargetBase.h92
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSEventTargetNodeCustom.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSGeolocationCustom.cpp143
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAllCollection.h56
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAppletElementCustom.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLAppletElementCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCollectionCustom.cpp151
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDocumentCustom.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLElementCustom.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLEmbedElementCustom.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLEmbedElementCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFormElementCustom.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLInputElementCustom.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLInputElementCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLObjectElementCustom.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLObjectElementCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLSelectElementCustom.h40
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHistoryCustom.cpp119
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHistoryCustom.h33
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSImageConstructor.h45
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSImageDataCustom.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSInspectedObjectWrapper.cpp127
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSInspectedObjectWrapper.h59
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSInspectorCallbackWrapper.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSInspectorCallbackWrapper.h53
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSLocationCustom.cpp309
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSLocationCustom.h33
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelConstructor.h55
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMessageChannelCustom.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.cpp100
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSMimeTypeArrayCustom.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h66
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNavigatorCustom.cpp125
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeCustom.cpp241
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCondition.h49
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeFilterCustom.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeIteratorCustom.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNodeListCustom.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSOptionConstructor.h46
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSPluginArrayCustom.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSPluginCustom.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp122
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.h41
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp278
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSQuarantinedObjectWrapper.h101
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSRGBColor.h59
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSQLTransactionCustom.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGLengthCustom.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGMatrixCustom.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGPODTypeWrapper.h411
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegCustom.cpp119
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGPathSegListCustom.cpp166
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp153
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp153
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSStorageCustom.cpp103
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSStorageCustom.h31
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetCustom.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSStyleSheetListCustom.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSTextCustom.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSTreeWalkerCustom.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerConstructor.h51
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextBase.h59
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerContextCustom.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSWorkerCustom.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestConstructor.h44
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp208
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXMLHttpRequestUploadCustom.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorConstructor.h49
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSXSLTProcessorCustom.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.cpp105
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScheduledAction.h56
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedPageData.cpp93
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCachedPageData.h56
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCallFrame.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCallFrame.h74
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCallStack.cpp103
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptCallStack.h67
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptController.cpp355
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptController.h166
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerGtk.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerMac.mm172
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerQt.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerWin.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptControllerWx.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptInstance.h44
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptSourceCode.h62
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptState.h49
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptString.h86
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/ScriptValue.h55
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/StringSourceProvider.h61
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/WorkerScriptController.h83
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGenerator.pm393
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm1313
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorJS.pm2044
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorObjC.pm1731
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/IDLParser.pm416
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/IDLStructure.pm107
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/InFilesParser.pm140
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/bindings/scripts/generate-bindings.pl69
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp460
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/NP_jsobject.h55
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_class.cpp124
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_class.h61
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_instance.cpp234
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_instance.h86
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_runtime.h67
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_utility.cpp152
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/c/c_utility.h76
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp143
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_class.h66
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp330
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.h110
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.h129
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_jsobject.mm720
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm83
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp547
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h191
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp584
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.h288
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/bridge/make_testbindings2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npapi.h830
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npruntime.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npruntime.h357
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npruntime_impl.h66
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npruntime_internal.h51
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/npruntime_priv.h41
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp217
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h60
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp372
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h90
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp1772
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h231
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime.h166
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_array.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_array.h73
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_method.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_method.h63
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_object.cpp270
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_object.h82
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_root.cpp174
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/runtime_root.h89
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/test.js19
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/testC.js21
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/testM.js29
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/testbindings.cpp421
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/testbindings.mm289
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/testqtbindings.cpp142
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/combine-javascript-resources79
-rw-r--r--src/3rdparty/webkit/WebCore/config.h159
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSBorderImageValue.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSBorderImageValue.h62
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCanvasValue.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCanvasValue.h68
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCharsetRule.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCharsetRule.h57
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCharsetRule.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp1381
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h79
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCursorImageValue.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSCursorImageValue.h63
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFace.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFace.h96
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceRule.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceRule.h67
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceRule.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceSource.cpp193
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceSource.h83
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceSrcValue.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontFaceSrcValue.h92
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontSelector.cpp537
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFontSelector.h77
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFunctionValue.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSFunctionValue.h58
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSGradientValue.cpp164
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSGradientValue.h112
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSGrammar.y1501
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSHelper.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSHelper.h42
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImageGeneratorValue.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImageGeneratorValue.h73
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImageValue.cpp93
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImageValue.h59
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImportRule.h77
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImportRule.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSInheritedValue.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSInheritedValue.h45
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSInitialValue.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSInitialValue.h58
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSMediaRule.cpp133
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSMediaRule.h69
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSMediaRule.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.cpp951
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSMutableStyleDeclaration.h222
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSNamespace.h59
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPageRule.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPageRule.h60
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPageRule.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParser.cpp4849
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParser.h306
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParserValues.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParserValues.h100
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.cpp955
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h212
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.idl79
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPrimitiveValueMappings.h2204
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSProperty.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSProperty.h81
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSPropertyNames.in240
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSQuirkPrimitiveValue.h50
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSReflectValue.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSReflectValue.h70
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSReflectionDirection.h35
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRule.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRule.h72
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRule.idl53
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRuleList.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRuleList.h68
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSRuleList.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSegmentedFontFace.cpp135
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSegmentedFontFace.h70
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelector.cpp555
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelector.h259
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelectorList.h55
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.h78
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.idl54
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleRule.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleRule.h75
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleRule.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp5894
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h327
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp236
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h113
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSheet.idl49
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSTimingFunctionValue.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSTimingFunctionValue.h67
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSUnicodeRangeValue.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSUnicodeRangeValue.h62
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSUnknownRule.h36
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSUnknownRule.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValue.h78
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValue.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in601
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueList.cpp109
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueList.h77
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueList.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariableDependentValue.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariableDependentValue.h57
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesDeclaration.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesDeclaration.h82
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesDeclaration.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesRule.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesRule.h70
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSVariablesRule.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/css/Counter.h61
-rw-r--r--src/3rdparty/webkit/WebCore/css/Counter.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/css/DashboardRegion.h48
-rw-r--r--src/3rdparty/webkit/WebCore/css/DashboardSupportCSSPropertyNames.in1
-rw-r--r--src/3rdparty/webkit/WebCore/css/FontFamilyValue.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/css/FontFamilyValue.h50
-rw-r--r--src/3rdparty/webkit/WebCore/css/FontValue.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/css/FontValue.h57
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaFeatureNames.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaFeatureNames.h73
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaList.cpp258
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaList.h92
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaList.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQuery.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQuery.h62
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp455
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.h91
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp83
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryExp.h68
-rw-r--r--src/3rdparty/webkit/WebCore/css/Pair.h65
-rw-r--r--src/3rdparty/webkit/WebCore/css/RGBColor.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/css/Rect.h62
-rw-r--r--src/3rdparty/webkit/WebCore/css/Rect.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/css/SVGCSSComputedStyleDeclaration.cpp188
-rw-r--r--src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp359
-rw-r--r--src/3rdparty/webkit/WebCore/css/SVGCSSPropertyNames.in48
-rw-r--r--src/3rdparty/webkit/WebCore/css/SVGCSSStyleSelector.cpp608
-rw-r--r--src/3rdparty/webkit/WebCore/css/SVGCSSValueKeywords.in287
-rw-r--r--src/3rdparty/webkit/WebCore/css/ShadowValue.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/css/ShadowValue.h59
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleBase.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleBase.h86
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleList.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleList.h49
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheet.cpp84
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheet.h77
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheet.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheetList.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheetList.h63
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleSheetList.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframeRule.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframeRule.h85
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframeRule.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframesRule.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframesRule.h95
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSKeyframesRule.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSTransformValue.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSTransformValue.h74
-rw-r--r--src/3rdparty/webkit/WebCore/css/WebKitCSSTransformValue.idl55
-rw-r--r--src/3rdparty/webkit/WebCore/css/html4.css596
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/css/make-css-file-arrays.pl88
-rw-r--r--src/3rdparty/webkit/WebCore/css/makegrammar.pl55
-rw-r--r--src/3rdparty/webkit/WebCore/css/makeprop.pl119
-rw-r--r--src/3rdparty/webkit/WebCore/css/maketokenizer128
-rw-r--r--src/3rdparty/webkit/WebCore/css/makevalues.pl108
-rw-r--r--src/3rdparty/webkit/WebCore/css/mediaControls.css102
-rw-r--r--src/3rdparty/webkit/WebCore/css/qt/mediaControls-extras.css101
-rw-r--r--src/3rdparty/webkit/WebCore/css/quirks.css54
-rw-r--r--src/3rdparty/webkit/WebCore/css/svg.css65
-rw-r--r--src/3rdparty/webkit/WebCore/css/themeWin.css94
-rw-r--r--src/3rdparty/webkit/WebCore/css/themeWinQuirks.css38
-rw-r--r--src/3rdparty/webkit/WebCore/css/tokenizer.flex110
-rw-r--r--src/3rdparty/webkit/WebCore/css/view-source.css158
-rw-r--r--src/3rdparty/webkit/WebCore/css/wml.css249
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ActiveDOMObject.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ActiveDOMObject.h80
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attr.cpp160
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attr.h96
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attr.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attribute.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attribute.h91
-rw-r--r--src/3rdparty/webkit/WebCore/dom/BeforeTextInsertedEvent.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/dom/BeforeTextInsertedEvent.h53
-rw-r--r--src/3rdparty/webkit/WebCore/dom/BeforeUnloadEvent.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/dom/BeforeUnloadEvent.h53
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CDATASection.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CDATASection.h48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CDATASection.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CSSMappedAttributeDeclaration.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CSSMappedAttributeDeclaration.h65
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CharacterData.cpp236
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CharacterData.h75
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CharacterData.idl55
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ChildNodeList.cpp109
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ChildNodeList.h50
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClassNames.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClassNames.h89
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClassNodeList.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClassNodeList.h55
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Clipboard.cpp142
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Clipboard.h100
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Clipboard.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClipboardAccessPolicy.h37
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClipboardEvent.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ClipboardEvent.h56
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Comment.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Comment.h51
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Comment.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp935
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ContainerNode.h126
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ContainerNodeAlgorithms.h149
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMCoreException.h52
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMCoreException.idl71
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMImplementation.cpp377
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMImplementation.h72
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMImplementation.idl58
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMStringList.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMStringList.h46
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DOMStringList.idl41
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocPtr.h114
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.cpp4388
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.h1121
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.idl248
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentFragment.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentFragment.h46
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentFragment.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentMarker.h60
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentType.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentType.h70
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DocumentType.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DynamicNodeList.cpp172
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h81
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EditingText.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EditingText.h44
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp1241
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.h250
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.idl128
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ElementRareData.h60
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Entity.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Entity.h43
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Entity.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EntityReference.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EntityReference.h43
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EntityReference.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Event.cpp190
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Event.h170
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Event.idl83
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventException.h59
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventException.idl50
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventListener.h40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventListener.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventNames.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventNames.h149
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.cpp111
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.h105
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTargetNode.cpp1166
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTargetNode.h206
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTargetNode.idl84
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ExceptionBase.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ExceptionBase.h57
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ExceptionCode.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ExceptionCode.h81
-rw-r--r--src/3rdparty/webkit/WebCore/dom/FormControlElement.h39
-rw-r--r--src/3rdparty/webkit/WebCore/dom/KeyboardEvent.cpp164
-rw-r--r--src/3rdparty/webkit/WebCore/dom/KeyboardEvent.h116
-rw-r--r--src/3rdparty/webkit/WebCore/dom/KeyboardEvent.idl80
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MappedAttribute.cpp34
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MappedAttribute.h68
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MappedAttributeEntry.h55
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageChannel.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageChannel.h56
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageChannel.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageEvent.cpp73
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageEvent.h73
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessageEvent.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessagePort.cpp344
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessagePort.h136
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MessagePort.idl60
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MouseEvent.cpp118
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MouseEvent.h87
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MouseEvent.idl66
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MouseRelatedEvent.cpp184
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MouseRelatedEvent.h78
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MutationEvent.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MutationEvent.h77
-rw-r--r--src/3rdparty/webkit/WebCore/dom/MutationEvent.idl49
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NameNodeList.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NameNodeList.h52
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp313
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h110
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedMappedAttrMap.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedMappedAttrMap.h62
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedNodeMap.h64
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl60
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.cpp2125
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.h580
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.idl136
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeFilter.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeFilter.h88
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeFilter.idl50
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeFilterCondition.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeFilterCondition.h44
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeIterator.cpp228
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeIterator.h82
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeIterator.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeList.h46
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeList.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeRareData.h118
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeRenderStyle.h40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NodeWithIndex.h64
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Notation.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Notation.h55
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Notation.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/dom/OverflowEvent.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/dom/OverflowEvent.h69
-rw-r--r--src/3rdparty/webkit/WebCore/dom/OverflowEvent.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Position.cpp1002
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Position.h135
-rw-r--r--src/3rdparty/webkit/WebCore/dom/PositionIterator.cpp160
-rw-r--r--src/3rdparty/webkit/WebCore/dom/PositionIterator.h74
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp275
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h100
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProgressEvent.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProgressEvent.h69
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ProgressEvent.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/dom/QualifiedName.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/dom/QualifiedName.h169
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.cpp1800
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.h145
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.idl120
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RangeBoundaryPoint.h182
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RangeException.h58
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RangeException.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h58
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ScriptElement.cpp272
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ScriptElement.h98
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.cpp182
-rw-r--r--src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h111
-rw-r--r--src/3rdparty/webkit/WebCore/dom/SelectorNodeList.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/dom/SelectorNodeList.h42
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StaticNodeList.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StaticNodeList.h63
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StaticStringList.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StaticStringList.h61
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StyleElement.cpp103
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StyleElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StyledElement.cpp505
-rw-r--r--src/3rdparty/webkit/WebCore/dom/StyledElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TagNodeList.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TagNodeList.h51
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.cpp351
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.h77
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TextEvent.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TextEvent.h71
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TextEvent.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Tokenizer.h78
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Traversal.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Traversal.h57
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TreeWalker.cpp277
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TreeWalker.h75
-rw-r--r--src/3rdparty/webkit/WebCore/dom/TreeWalker.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/dom/UIEvent.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/dom/UIEvent.h75
-rw-r--r--src/3rdparty/webkit/WebCore/dom/UIEvent.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/dom/UIEventWithKeyState.cpp34
-rw-r--r--src/3rdparty/webkit/WebCore/dom/UIEventWithKeyState.h68
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitAnimationEvent.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitAnimationEvent.h67
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitAnimationEvent.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitTransitionEvent.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitTransitionEvent.h67
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WebKitTransitionEvent.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WheelEvent.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WheelEvent.h71
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WheelEvent.idl64
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Worker.cpp202
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Worker.h113
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Worker.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerContext.cpp195
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerContext.h122
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerContext.idl61
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerLocation.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerLocation.h73
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerLocation.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerMessagingProxy.cpp311
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerMessagingProxy.h93
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerTask.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerTask.h48
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerThread.cpp154
-rw-r--r--src/3rdparty/webkit/WebCore/dom/WorkerThread.h79
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp348
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h187
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerLibxml2.cpp1349
-rw-r--r--src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp763
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/dom/make_names.pl842
-rw-r--r--src/3rdparty/webkit/WebCore/editing/AppendNodeCommand.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/editing/AppendNodeCommand.h52
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp1608
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.h121
-rw-r--r--src/3rdparty/webkit/WebCore/editing/BreakBlockquoteCommand.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/editing/BreakBlockquoteCommand.h47
-rw-r--r--src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp1041
-rw-r--r--src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.h120
-rw-r--r--src/3rdparty/webkit/WebCore/editing/CreateLinkCommand.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/editing/CreateLinkCommand.h51
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteButton.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteButton.h42
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteButtonController.cpp308
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteButtonController.h77
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteFromTextNodeCommand.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteFromTextNodeCommand.h56
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.cpp801
-rw-r--r--src/3rdparty/webkit/WebCore/editing/DeleteSelectionCommand.h97
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditAction.h71
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditCommand.cpp230
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditCommand.h96
-rw-r--r--src/3rdparty/webkit/WebCore/editing/Editor.cpp2187
-rw-r--r--src/3rdparty/webkit/WebCore/editing/Editor.h307
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditorCommand.cpp1474
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditorDeleteAction.h40
-rw-r--r--src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h40
-rw-r--r--src/3rdparty/webkit/WebCore/editing/FormatBlockCommand.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/editing/FormatBlockCommand.h52
-rw-r--r--src/3rdparty/webkit/WebCore/editing/HTMLInterchange.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/editing/HTMLInterchange.h46
-rw-r--r--src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.cpp301
-rw-r--r--src/3rdparty/webkit/WebCore/editing/IndentOutdentCommand.h60
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertIntoTextNodeCommand.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertIntoTextNodeCommand.h55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertLineBreakCommand.cpp187
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertLineBreakCommand.h54
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertListCommand.cpp265
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertListCommand.h64
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertNodeBeforeCommand.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertNodeBeforeCommand.h52
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp338
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h59
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertTextCommand.cpp248
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertTextCommand.h61
-rw-r--r--src/3rdparty/webkit/WebCore/editing/JoinTextNodesCommand.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/editing/JoinTextNodesCommand.h54
-rw-r--r--src/3rdparty/webkit/WebCore/editing/MergeIdenticalElementsCommand.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/editing/MergeIdenticalElementsCommand.h53
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ModifySelectionListLevel.cpp295
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ModifySelectionListLevel.h80
-rw-r--r--src/3rdparty/webkit/WebCore/editing/MoveSelectionCommand.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/editing/MoveSelectionCommand.h55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveCSSPropertyCommand.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveCSSPropertyCommand.h55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveFormatCommand.h49
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodeAttributeCommand.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodeAttributeCommand.h1
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodeCommand.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodeCommand.h53
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodePreservingChildrenCommand.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/RemoveNodePreservingChildrenCommand.h50
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.cpp1058
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ReplaceSelectionCommand.h93
-rw-r--r--src/3rdparty/webkit/WebCore/editing/Selection.cpp605
-rw-r--r--src/3rdparty/webkit/WebCore/editing/Selection.h136
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SelectionController.cpp1238
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SelectionController.h189
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SetNodeAttributeCommand.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SetNodeAttributeCommand.h55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SmartReplace.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SmartReplace.h35
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SmartReplaceCF.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SmartReplaceICU.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitElementCommand.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitElementCommand.h53
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitTextNodeCommand.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitTextNodeCommand.h55
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitTextNodeContainingElementCommand.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/editing/SplitTextNodeContainingElementCommand.h51
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TextAffinity.h57
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TextGranularity.h47
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TextIterator.cpp1677
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TextIterator.h253
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TypingCommand.cpp562
-rw-r--r--src/3rdparty/webkit/WebCore/editing/TypingCommand.h104
-rw-r--r--src/3rdparty/webkit/WebCore/editing/UnlinkCommand.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/editing/UnlinkCommand.h49
-rw-r--r--src/3rdparty/webkit/WebCore/editing/VisiblePosition.cpp680
-rw-r--r--src/3rdparty/webkit/WebCore/editing/VisiblePosition.h147
-rw-r--r--src/3rdparty/webkit/WebCore/editing/WrapContentsInDummySpanCommand.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/editing/WrapContentsInDummySpanCommand.h54
-rw-r--r--src/3rdparty/webkit/WebCore/editing/htmlediting.cpp1011
-rw-r--r--src/3rdparty/webkit/WebCore/editing/htmlediting.h137
-rw-r--r--src/3rdparty/webkit/WebCore/editing/markup.cpp1224
-rw-r--r--src/3rdparty/webkit/WebCore/editing/markup.h56
-rw-r--r--src/3rdparty/webkit/WebCore/editing/qt/EditorQt.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/editing/visible_units.cpp958
-rw-r--r--src/3rdparty/webkit/WebCore/editing/visible_units.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h37
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp4081
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSGrammar.h211
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.cpp1262
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h286
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c2359
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h543
-rw-r--r--src/3rdparty/webkit/WebCore/generated/ColorData.c441
-rw-r--r--src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h62
-rw-r--r--src/3rdparty/webkit/WebCore/generated/DocTypeStrings.cpp1083
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Grammar.cpp5106
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Grammar.h232
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLEntityNames.c549
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLNames.cpp1313
-rw-r--r--src/3rdparty/webkit/WebCore/generated/HTMLNames.h364
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSAttr.cpp193
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSAttr.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSBarInfo.cpp111
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSBarInfo.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCDATASection.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCDATASection.h62
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.cpp159
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSCharsetRule.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.cpp148
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.h63
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.cpp164
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSImportRule.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.cpp194
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSMediaRule.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPageRule.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.cpp450
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSPrimitiveValue.h105
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRule.cpp271
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRule.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.cpp216
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSRuleList.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.cpp357
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleDeclaration.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleRule.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSStyleSheet.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValue.cpp212
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValue.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValueList.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSValueList.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.cpp289
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesDeclaration.h90
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCSSVariablesRule.h64
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.cpp108
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasGradient.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasPattern.h61
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp968
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h172
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCharacterData.cpp283
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCharacterData.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSClipboard.cpp233
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSClipboard.h97
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSComment.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSComment.h62
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSConsole.cpp328
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSConsole.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCounter.cpp176
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCounter.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.cpp404
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMApplicationCache.h122
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.cpp316
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMCoreException.h101
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.cpp250
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMImplementation.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMParser.cpp186
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMParser.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMSelection.cpp407
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMSelection.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMStringList.cpp212
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMStringList.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp4435
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h570
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindowBase.lut.h31
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDatabase.cpp137
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDatabase.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocument.cpp1049
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocument.h165
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.cpp181
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentFragment.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentType.cpp189
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocumentType.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSElement.cpp660
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSElement.h136
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntity.cpp160
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntity.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntityReference.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEntityReference.h62
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEvent.cpp434
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEvent.h119
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEventException.cpp204
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEventException.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEventTargetNode.cpp944
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSEventTargetNode.h162
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFile.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFile.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFileList.cpp221
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSFileList.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp150
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeolocation.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeoposition.cpp182
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSGeoposition.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.cpp363
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAnchorElement.h101
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.cpp298
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAppletElement.h93
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.cpp285
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAreaElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.cpp143
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBRElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp184
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBlockquoteElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.cpp263
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLBodyElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.cpp251
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLButtonElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.cpp208
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCanvasElement.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.cpp242
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLCollection.h95
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDListElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDirectoryElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDivElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.cpp399
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLDocument.h113
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElement.cpp397
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElement.h106
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.cpp572
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLElementWrapperFactory.h48
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.cpp259
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLEmbedElement.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.cpp154
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFieldSetElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.cpp184
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFontElement.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.cpp312
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFormElement.h93
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.cpp318
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameElement.h97
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.cpp176
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLFrameSetElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.cpp197
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHRElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHeadingElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.cpp318
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIFrameElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.cpp349
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLImageElement.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.cpp474
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLInputElement.h121
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLIsIndexElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLIElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.cpp180
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLabelElement.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.cpp180
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLegendElement.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.cpp271
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLLinkElement.h82
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMapElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.cpp168
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMarqueeElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.cpp543
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMediaElement.h129
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMenuElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.cpp197
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLMetaElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLModElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.cpp184
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOListElement.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.cpp407
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLObjectElement.h113
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptGroupElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.cpp245
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionElement.h82
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.cpp159
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLOptionsCollection.h89
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParagraphElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.cpp197
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLParamElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLPreElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLQuoteElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.cpp236
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLScriptElement.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.cpp396
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSelectElement.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.cpp189
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLSourceElement.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.cpp193
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLStyleElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.cpp162
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCaptionElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.cpp334
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableCellElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.cpp223
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableColElement.h75
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.cpp441
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableElement.h104
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.cpp272
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableRowElement.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.cpp249
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTableSectionElement.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.cpp343
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTextAreaElement.h97
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLTitleElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLUListElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.cpp203
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHTMLVideoElement.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHistory.cpp172
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSHistory.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSImageData.cpp163
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSImageData.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSJavaScriptCallFrame.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.cpp219
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSKeyboardEvent.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSLocation.cpp261
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSLocation.h118
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaError.cpp193
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaError.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaList.cpp265
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMediaList.h88
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageChannel.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageChannel.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageEvent.cpp213
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessageEvent.h75
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessagePort.cpp318
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMessagePort.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeType.cpp185
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeType.h75
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.cpp235
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMimeTypeArray.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMouseEvent.cpp298
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMouseEvent.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMutationEvent.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMutationEvent.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.cpp319
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNavigator.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNavigator.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNode.cpp623
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNode.h152
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeFilter.cpp278
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeFilter.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeIterator.cpp235
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeIterator.h93
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeList.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNodeList.h89
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNotation.cpp153
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNotation.h64
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.cpp203
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSOverflowEvent.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp258
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPlugin.h90
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPluginArray.cpp248
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPluginArray.h88
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPositionError.cpp204
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSPositionError.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProcessingInstruction.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProgressEvent.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSProgressEvent.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRGBColor.lut.h21
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRange.cpp638
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRange.h117
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRangeException.cpp211
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRangeException.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRect.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRect.h75
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLError.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLError.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSet.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.cpp127
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLResultSetRowList.h81
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.cpp100
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSQLTransaction.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAElement.cpp313
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAElement.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.cpp141
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAltGlyphElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAngle.cpp289
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateColorElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimateTransformElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedAngle.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.cpp137
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedBoolean.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedEnumeration.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedInteger.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.cpp125
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLength.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumber.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedNumberList.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedPreserveAspectRatio.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedRect.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedString.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedTransformList.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.cpp260
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGAnimationElement.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.cpp322
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCircleElement.h95
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.cpp306
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGClipPathElement.h93
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGColor.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGColor.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.cpp252
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGComponentTransferFunctionElement.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.cpp173
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGCursorElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.cpp297
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDefsElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDescElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDocument.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGDocument.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElement.cpp153
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElement.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.cpp1024
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstance.h179
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementInstanceList.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.cpp634
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGElementWrapperFactory.h51
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.cpp330
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGEllipseElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGException.cpp225
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGException.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.cpp295
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEBlendElement.h93
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.cpp289
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEColorMatrixElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.cpp185
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEComponentTransferElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.cpp335
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFECompositeElement.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.cpp218
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDiffuseLightingElement.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.cpp305
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDisplacementMapElement.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEDistantLightElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFloodElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncAElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncBElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncGElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEFuncRElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.cpp216
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEGaussianBlurElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.cpp227
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEImageElement.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEMergeNodeElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.cpp202
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEOffsetElement.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.cpp120
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFEPointLightElement.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.cpp210
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpecularLightingElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.cpp160
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFESpotLightElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.cpp185
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETileElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.cpp321
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFETurbulenceElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.cpp267
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFilterElement.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceFormatElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceNameElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceSrcElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGFontFaceUriElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.cpp330
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGForeignObjectElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGElement.cpp297
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGlyphElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.cpp258
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGGradientElement.h88
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGHKernElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.cpp347
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGImageElement.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLength.cpp326
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLength.h114
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.cpp239
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLengthList.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.cpp330
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLineElement.h96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGLinearGradientElement.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.cpp374
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMarkerElement.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.cpp265
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMaskElement.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp305
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.h120
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMetadataElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGMissingGlyphElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumber.cpp130
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumber.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.cpp238
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGNumberList.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPaint.cpp269
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h90
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.cpp713
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathElement.h119
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.cpp319
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSeg.h107
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.cpp206
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcAbs.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.cpp206
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegArcRel.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegClosePath.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.cpp191
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicAbs.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.cpp191
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicRel.h78
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothAbs.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoCubicSmoothRel.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticAbs.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticRel.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothAbs.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegCurvetoQuadraticSmoothRel.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoAbs.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalAbs.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoHorizontalRel.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoRel.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalAbs.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegLinetoVerticalRel.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.cpp189
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegList.h100
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoAbs.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPathSegMovetoRel.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.cpp300
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPatternElement.h95
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPoint.cpp168
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h89
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPointList.cpp188
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPointList.h100
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.cpp313
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolygonElement.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.cpp313
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPolylineElement.h94
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.cpp300
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGPreserveAspectRatio.h104
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.cpp136
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRadialGradientElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRect.cpp173
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRect.h85
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.cpp346
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRectElement.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.cpp209
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGRenderingIntent.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.cpp772
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSVGElement.h140
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.cpp133
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGScriptElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSetElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.cpp145
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStopElement.h76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStringList.cpp239
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStringList.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.cpp162
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGStyleElement.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.cpp297
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSwitchElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.cpp196
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGSymbolElement.h83
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTRefElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTSpanElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.cpp445
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextContentElement.h103
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextElement.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.cpp228
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPathElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.cpp137
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTextPositioningElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTitleElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransform.cpp333
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransform.h103
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.cpp218
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGTransformList.h102
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.cpp188
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUnitTypes.h88
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.cpp354
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGUseElement.h99
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGViewElement.h82
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.cpp133
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSSVGZoomEvent.h70
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSScreen.cpp161
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSScreen.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorage.cpp264
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorage.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorageEvent.cpp203
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStorageEvent.h75
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheet.cpp215
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheet.h82
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.cpp221
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleSheetList.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSText.cpp191
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSText.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextEvent.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextEvent.h71
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextMetrics.cpp160
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTextMetrics.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTimeRanges.cpp150
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTimeRanges.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTreeWalker.cpp274
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSTreeWalker.h103
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSUIEvent.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSUIEvent.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSVoidCallback.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSVoidCallback.h69
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitAnimationEvent.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.cpp168
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframeRule.h66
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.cpp248
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSKeyframesRule.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.cpp229
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitCSSTransformValue.h81
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWebKitTransitionEvent.h72
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWheelEvent.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWheelEvent.h77
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorker.cpp225
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorker.h97
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerContext.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerContext.h99
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerContextBase.lut.h18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerLocation.h92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.cpp154
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSWorkerNavigator.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.cpp433
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequest.h126
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.cpp211
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestException.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp152
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestProgressEvent.h64
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.cpp304
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLHttpRequestUpload.h98
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.cpp187
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXMLSerializer.h79
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.cpp247
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathEvaluator.h86
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathException.cpp216
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathException.h91
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathExpression.cpp185
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathExpression.h84
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.cpp113
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathNSResolver.h74
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathResult.cpp335
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXPathResult.h104
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.h89
-rw-r--r--src/3rdparty/webkit/WebCore/generated/Lexer.lut.h54
-rw-r--r--src/3rdparty/webkit/WebCore/generated/MathObject.lut.h36
-rw-r--r--src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h23
-rw-r--r--src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h39
-rw-r--r--src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h23
-rw-r--r--src/3rdparty/webkit/WebCore/generated/SVGElementFactory.cpp607
-rw-r--r--src/3rdparty/webkit/WebCore/generated/SVGElementFactory.h56
-rw-r--r--src/3rdparty/webkit/WebCore/generated/SVGNames.cpp1377
-rw-r--r--src/3rdparty/webkit/WebCore/generated/SVGNames.h700
-rw-r--r--src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h50
-rw-r--r--src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheets.h8
-rw-r--r--src/3rdparty/webkit/WebCore/generated/UserAgentStyleSheetsData.cpp985
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XLinkNames.cpp108
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XLinkNames.h68
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XMLNames.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XMLNames.h57
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp2150
-rw-r--r--src/3rdparty/webkit/WebCore/generated/XPathGrammar.h109
-rw-r--r--src/3rdparty/webkit/WebCore/generated/chartables.c96
-rw-r--r--src/3rdparty/webkit/WebCore/generated/tokenizer.cpp2200
-rw-r--r--src/3rdparty/webkit/WebCore/history/BackForwardList.cpp282
-rw-r--r--src/3rdparty/webkit/WebCore/history/BackForwardList.h95
-rw-r--r--src/3rdparty/webkit/WebCore/history/CachedPage.cpp191
-rw-r--r--src/3rdparty/webkit/WebCore/history/CachedPage.h84
-rw-r--r--src/3rdparty/webkit/WebCore/history/CachedPagePlatformData.h45
-rw-r--r--src/3rdparty/webkit/WebCore/history/HistoryItem.cpp435
-rw-r--r--src/3rdparty/webkit/WebCore/history/HistoryItem.h219
-rw-r--r--src/3rdparty/webkit/WebCore/history/PageCache.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/history/PageCache.h83
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasGradient.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasGradient.h66
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasGradient.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasPattern.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasPattern.h62
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasPattern.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp1470
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h263
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.idl123
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp222
-rw-r--r--src/3rdparty/webkit/WebCore/html/CanvasStyle.h89
-rw-r--r--src/3rdparty/webkit/WebCore/html/DocTypeStrings.gperf89
-rw-r--r--src/3rdparty/webkit/WebCore/html/File.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/html/File.h56
-rw-r--r--src/3rdparty/webkit/WebCore/html/File.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/html/FileList.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/html/FileList.h59
-rw-r--r--src/3rdparty/webkit/WebCore/html/FileList.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/html/FormDataList.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/html/FormDataList.h69
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.cpp507
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.h107
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAnchorElement.idl60
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAppletElement.cpp230
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAppletElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAppletElement.idl53
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAreaElement.cpp228
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h85
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAreaElement.idl51
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAttributeNames.in203
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAudioElement.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAudioElement.h46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLAudioElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBRElement.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBRElement.h51
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseElement.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBaseFontElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBlockquoteElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.cpp306
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLBodyElement.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLButtonElement.cpp194
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLButtonElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLButtonElement.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp288
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.h131
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.idl46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCollection.cpp458
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCollection.h159
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLCollection.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDListElement.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDListElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDListElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDirectoryElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDivElement.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDivElement.h46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDivElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp425
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDocument.h112
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLDocument.idl67
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.cpp1022
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.h119
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElement.idl72
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElementFactory.cpp509
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLElementFactory.h47
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.cpp258
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.h71
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLEmbedElement.idl55
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLEntityNames.gperf296
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFieldSetElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFontElement.cpp176
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFontElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFontElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormCollection.cpp245
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormCollection.h66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp291
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h132
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp641
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.h161
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormElement.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElement.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElement.h60
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElement.idl57
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp326
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.h109
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameOwnerElement.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameOwnerElement.h68
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.cpp216
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.h91
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameSetElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHRElement.cpp141
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHRElement.h55
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHRElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadElement.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadingElement.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadingElement.h45
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHeadingElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIFrameElement.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIFrameElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIFrameElement.idl55
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp437
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.h130
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageElement.idl56
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageLoader.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLImageLoader.h45
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp1692
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.h258
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.idl76
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLKeygenElement.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLKeygenElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLIElement.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLIElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLIElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLabelElement.cpp164
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLabelElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLabelElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLegendElement.cpp124
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLegendElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLegendElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp403
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h119
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLLinkElement.idl49
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMapElement.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMapElement.h59
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMapElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.cpp122
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMarqueeElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.cpp1073
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.h212
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMediaElement.idl88
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMenuElement.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMenuElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMenuElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMetaElement.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLMetaElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLModElement.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLModElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLModElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLNameCollection.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLNameCollection.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOListElement.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOListElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOListElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLObjectElement.cpp449
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLObjectElement.h119
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLObjectElement.idl66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptGroupElement.cpp191
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptGroupElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptGroupElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionElement.cpp262
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionElement.h92
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionElement.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.h55
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLOptionsCollection.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParagraphElement.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParagraphElement.h46
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParagraphElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParamElement.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParamElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParamElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.cpp1603
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParser.h184
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParserErrorCodes.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLParserErrorCodes.h60
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPlugInElement.cpp200
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPlugInElement.h84
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPlugInImageElement.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPlugInImageElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPreElement.cpp83
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPreElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLPreElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.h45
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLQuoteElement.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLScriptElement.cpp226
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLScriptElement.h93
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLScriptElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.cpp1124
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.h184
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSelectElement.idl72
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSourceElement.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSourceElement.h59
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLSourceElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLStyleElement.cpp145
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLStyleElement.h74
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLStyleElement.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCaptionElement.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.cpp271
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.h118
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableCellElement.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableColElement.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableColElement.h77
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableColElement.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableElement.cpp758
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableElement.h131
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableElement.idl67
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.cpp100
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTablePartElement.h47
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableRowElement.cpp229
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableRowElement.h72
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableRowElement.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableRowsCollection.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableRowsCollection.h54
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.cpp173
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTableSectionElement.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTagNames.in111
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp389
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h109
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.idl50
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTitleElement.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTitleElement.h52
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTitleElement.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp2043
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h422
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLUListElement.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLUListElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLUListElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.h74
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLVideoElement.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.cpp294
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLViewSourceDocument.h65
-rw-r--r--src/3rdparty/webkit/WebCore/html/ImageData.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/html/ImageData.h55
-rw-r--r--src/3rdparty/webkit/WebCore/html/ImageData.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/html/MediaError.h52
-rw-r--r--src/3rdparty/webkit/WebCore/html/MediaError.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/html/PreloadScanner.cpp853
-rw-r--r--src/3rdparty/webkit/WebCore/html/PreloadScanner.h144
-rw-r--r--src/3rdparty/webkit/WebCore/html/TextMetrics.h50
-rw-r--r--src/3rdparty/webkit/WebCore/html/TextMetrics.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/html/TimeRanges.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/html/TimeRanges.h74
-rw-r--r--src/3rdparty/webkit/WebCore/html/TimeRanges.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/html/VoidCallback.h45
-rw-r--r--src/3rdparty/webkit/WebCore/html/VoidCallback.idl30
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorClient.h67
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp2928
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.h328
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.cpp101
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.h78
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptCallFrame.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugListener.h54
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp615
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.h130
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptProfile.cpp294
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptProfile.h42
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.h44
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Breakpoint.js54
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/BreakpointsSidebarPane.js85
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/CallStackSidebarPane.js110
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Console.js949
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/DataGrid.js844
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Database.js95
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/DatabaseQueryView.js199
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/DatabaseTableView.js82
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js357
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js1206
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ElementsTreeOutline.js626
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/FontView.js104
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ImageView.js74
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/back.pngbin0 -> 4205 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/checker.pngbin0 -> 3471 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/clearConsoleButtons.pngbin0 -> 5224 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/closeButtons.pngbin0 -> 4355 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/consoleButtons.pngbin0 -> 5197 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/database.pngbin0 -> 2329 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/databaseTable.pngbin0 -> 4325 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/databasesIcon.pngbin0 -> 7148 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/debuggerContinue.pngbin0 -> 4190 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/debuggerPause.pngbin0 -> 4081 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/debuggerStepInto.pngbin0 -> 4282 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/debuggerStepOut.pngbin0 -> 4271 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/debuggerStepOver.pngbin0 -> 4366 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallDown.pngbin0 -> 3919 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallDownBlack.pngbin0 -> 3802 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallDownWhite.pngbin0 -> 3820 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRight.pngbin0 -> 3898 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRightBlack.pngbin0 -> 3807 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRightDown.pngbin0 -> 3953 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRightDownBlack.pngbin0 -> 3816 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRightDownWhite.pngbin0 -> 3838 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/disclosureTriangleSmallRightWhite.pngbin0 -> 3818 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/dockButtons.pngbin0 -> 1274 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/elementsIcon.pngbin0 -> 6639 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/enableButtons.pngbin0 -> 5543 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/errorIcon.pngbin0 -> 4337 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/errorMediumIcon.pngbin0 -> 4059 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/excludeButtons.pngbin0 -> 4562 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/focusButtons.pngbin0 -> 4919 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/forward.pngbin0 -> 4202 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/glossyHeader.pngbin0 -> 3720 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/glossyHeaderPressed.pngbin0 -> 3721 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/glossyHeaderSelected.pngbin0 -> 3738 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/glossyHeaderSelectedPressed.pngbin0 -> 3739 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/goArrow.pngbin0 -> 3591 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/graphLabelCalloutLeft.pngbin0 -> 3790 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/graphLabelCalloutRight.pngbin0 -> 3789 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/largerResourcesButtons.pngbin0 -> 1596 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/nodeSearchButtons.pngbin0 -> 5708 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/paneBottomGrow.pngbin0 -> 3457 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/paneBottomGrowActive.pngbin0 -> 3457 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/paneGrowHandleLine.pngbin0 -> 3443 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/pauseOnExceptionButtons.pngbin0 -> 2305 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/percentButtons.pngbin0 -> 5771 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/profileGroupIcon.pngbin0 -> 5126 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/profileIcon.pngbin0 -> 4953 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/profileSmallIcon.pngbin0 -> 579 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/profilesIcon.pngbin0 -> 4158 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/profilesSilhouette.pngbin0 -> 48600 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/recordButtons.pngbin0 -> 5716 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/reloadButtons.pngbin0 -> 4544 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourceCSSIcon.pngbin0 -> 1066 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourceDocumentIcon.pngbin0 -> 4959 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourceDocumentIconSmall.pngbin0 -> 787 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourceJSIcon.pngbin0 -> 879 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourcePlainIcon.pngbin0 -> 4321 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourcePlainIconSmall.pngbin0 -> 731 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourcesIcon.pngbin0 -> 6431 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourcesSizeGraphIcon.pngbin0 -> 5606 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/resourcesTimeGraphIcon.pngbin0 -> 5743 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/scriptsIcon.pngbin0 -> 7428 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/scriptsSilhouette.pngbin0 -> 49028 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/searchSmallBlue.pngbin0 -> 3968 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/searchSmallBrightBlue.pngbin0 -> 3966 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/searchSmallGray.pngbin0 -> 3936 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/searchSmallWhite.pngbin0 -> 3844 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segment.pngbin0 -> 4349 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segmentEnd.pngbin0 -> 4070 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segmentHover.pngbin0 -> 4310 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segmentHoverEnd.pngbin0 -> 4074 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segmentSelected.pngbin0 -> 4302 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/segmentSelectedEnd.pngbin0 -> 4070 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/splitviewDimple.pngbin0 -> 216 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/splitviewDividerBackground.pngbin0 -> 149 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarBackground.pngbin0 -> 4024 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarBottomBackground.pngbin0 -> 4021 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarButtons.pngbin0 -> 4175 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarMenuButton.pngbin0 -> 4293 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarMenuButtonSelected.pngbin0 -> 4291 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarResizerHorizontal.pngbin0 -> 4026 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/statusbarResizerVertical.pngbin0 -> 4036 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillBlue.pngbin0 -> 3450 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillGray.pngbin0 -> 3392 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillGreen.pngbin0 -> 3452 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillOrange.pngbin0 -> 3452 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillPurple.pngbin0 -> 3453 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillRed.pngbin0 -> 3460 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelineHollowPillYellow.pngbin0 -> 3444 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillBlue.pngbin0 -> 3346 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillGray.pngbin0 -> 3297 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillGreen.pngbin0 -> 3350 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillOrange.pngbin0 -> 3352 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillPurple.pngbin0 -> 3353 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillRed.pngbin0 -> 3343 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/timelinePillYellow.pngbin0 -> 3336 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipBalloon.pngbin0 -> 3689 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipBalloonBottom.pngbin0 -> 3139 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipIcon.pngbin0 -> 1212 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipIconPressed.pngbin0 -> 1224 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/toolbarItemSelected.pngbin0 -> 4197 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeDownTriangleBlack.pngbin0 -> 3570 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeDownTriangleWhite.pngbin0 -> 3531 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeRightTriangleBlack.pngbin0 -> 3561 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeRightTriangleWhite.pngbin0 -> 3535 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeUpTriangleBlack.pngbin0 -> 3584 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/treeUpTriangleWhite.pngbin0 -> 3558 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/userInputIcon.pngbin0 -> 777 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/userInputPreviousIcon.pngbin0 -> 765 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/warningIcon.pngbin0 -> 4244 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/warningMediumIcon.pngbin0 -> 3833 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Images/warningsErrors.pngbin0 -> 5192 bytes-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/MetricsSidebarPane.js195
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Object.js82
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ObjectPropertiesSection.js276
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Panel.js273
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/PanelEnablerView.js76
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Placard.js106
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ProfileView.js642
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ProfilesPanel.js504
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/PropertiesSection.js145
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/PropertiesSidebarPane.js54
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Resource.js625
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourceCategory.js68
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js140
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js1649
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ScopeChainSidebarPane.js156
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/Script.js37
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ScriptView.js103
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ScriptsPanel.js810
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/SidebarPane.js125
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/SidebarTreeElement.js201
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/SourceFrame.js699
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/SourceView.js303
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/StylesSidebarPane.js927
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/TextPrompt.js312
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/View.js74
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc158
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css2996
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.html91
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js1267
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/treeoutline.js846
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js1098
-rw-r--r--src/3rdparty/webkit/WebCore/loader/Cache.cpp753
-rw-r--r--src/3rdparty/webkit/WebCore/loader/Cache.h210
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachePolicy.h40
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp148
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h68
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedFont.cpp203
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedFont.h89
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedImage.cpp382
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedImage.h103
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResource.cpp397
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResource.h250
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h80
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResourceClientWalker.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResourceClientWalker.h49
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedResourceHandle.h92
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedScript.cpp131
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedScript.h67
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedXBLDocument.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedXBLDocument.h67
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp101
-rw-r--r--src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.h64
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocLoader.cpp429
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocLoader.h138
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp945
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocumentLoader.h317
-rw-r--r--src/3rdparty/webkit/WebCore/loader/EmptyClients.h413
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FTPDirectoryDocument.cpp496
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FTPDirectoryDocument.h48
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp1624
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.h157
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FormState.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FormState.h59
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp5310
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.h688
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoaderClient.h222
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h79
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ImageDocument.cpp371
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ImageDocument.h76
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ImageLoader.cpp153
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ImageLoader.h77
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp519
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MainResourceLoader.h104
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MediaDocument.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MediaDocument.h54
-rw-r--r--src/3rdparty/webkit/WebCore/loader/NavigationAction.cpp83
-rw-r--r--src/3rdparty/webkit/WebCore/loader/NavigationAction.h61
-rw-r--r--src/3rdparty/webkit/WebCore/loader/NetscapePlugInStreamLoader.cpp130
-rw-r--r--src/3rdparty/webkit/WebCore/loader/NetscapePlugInStreamLoader.h70
-rw-r--r--src/3rdparty/webkit/WebCore/loader/PluginDocument.cpp151
-rw-r--r--src/3rdparty/webkit/WebCore/loader/PluginDocument.h48
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ProgressTracker.cpp253
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ProgressTracker.h80
-rw-r--r--src/3rdparty/webkit/WebCore/loader/Request.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/loader/Request.h63
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ResourceLoader.cpp480
-rw-r--r--src/3rdparty/webkit/WebCore/loader/ResourceLoader.h157
-rw-r--r--src/3rdparty/webkit/WebCore/loader/SubresourceLoader.cpp268
-rw-r--r--src/3rdparty/webkit/WebCore/loader/SubresourceLoader.h66
-rw-r--r--src/3rdparty/webkit/WebCore/loader/SubresourceLoaderClient.h61
-rw-r--r--src/3rdparty/webkit/WebCore/loader/SubstituteData.h69
-rw-r--r--src/3rdparty/webkit/WebCore/loader/SubstituteResource.h64
-rw-r--r--src/3rdparty/webkit/WebCore/loader/TextDocument.cpp187
-rw-r--r--src/3rdparty/webkit/WebCore/loader/TextDocument.h51
-rw-r--r--src/3rdparty/webkit/WebCore/loader/TextResourceDecoder.cpp800
-rw-r--r--src/3rdparty/webkit/WebCore/loader/TextResourceDecoder.h80
-rw-r--r--src/3rdparty/webkit/WebCore/loader/UserStyleSheetLoader.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/loader/UserStyleSheetLoader.h57
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp210
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h113
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp719
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.h154
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp69
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h73
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp796
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.h100
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp292
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h141
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl74
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ManifestParser.cpp187
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ManifestParser.h49
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/Archive.h62
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.h50
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.h65
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/ArchiveResourceCollection.h59
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/cf/LegacyWebArchive.cpp578
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/cf/LegacyWebArchive.h67
-rw-r--r--src/3rdparty/webkit/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm74
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp2047
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.h243
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseClient.h49
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconDatabaseNone.cpp174
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconFetcher.cpp236
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconFetcher.h78
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconLoader.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconLoader.h70
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconRecord.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/IconRecord.h117
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/loader/icon/PageURLRecord.h85
-rw-r--r--src/3rdparty/webkit/WebCore/loader/loader.cpp487
-rw-r--r--src/3rdparty/webkit/WebCore/loader/loader.h115
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/make-generated-sources.sh8
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/move-js-headers.sh6
-rw-r--r--src/3rdparty/webkit/WebCore/page/AXObjectCache.cpp239
-rw-r--r--src/3rdparty/webkit/WebCore/page/AXObjectCache.h113
-rw-r--r--src/3rdparty/webkit/WebCore/page/AbstractView.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityImageMapLink.cpp130
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityImageMapLink.h72
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityList.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityList.h56
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityListBox.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityListBox.h66
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityListBoxOption.cpp207
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityListBoxOption.h79
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityObject.cpp1031
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityObject.h424
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityRenderObject.cpp2387
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityRenderObject.h237
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTable.cpp491
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTable.h86
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableCell.cpp157
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableCell.h65
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableColumn.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableColumn.h75
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableHeaderContainer.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableHeaderContainer.h67
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableRow.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/page/AccessibilityTableRow.h65
-rw-r--r--src/3rdparty/webkit/WebCore/page/BarInfo.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/page/BarInfo.h57
-rw-r--r--src/3rdparty/webkit/WebCore/page/BarInfo.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/page/Chrome.cpp505
-rw-r--r--src/3rdparty/webkit/WebCore/page/Chrome.h134
-rw-r--r--src/3rdparty/webkit/WebCore/page/ChromeClient.h172
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.cpp369
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.h122
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.idl59
-rw-r--r--src/3rdparty/webkit/WebCore/page/ContextMenuClient.h59
-rw-r--r--src/3rdparty/webkit/WebCore/page/ContextMenuController.cpp310
-rw-r--r--src/3rdparty/webkit/WebCore/page/ContextMenuController.h61
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMSelection.cpp424
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMSelection.h102
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMSelection.idl70
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.cpp1244
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.h307
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.idl431
-rw-r--r--src/3rdparty/webkit/WebCore/page/DragActions.h66
-rw-r--r--src/3rdparty/webkit/WebCore/page/DragClient.h81
-rw-r--r--src/3rdparty/webkit/WebCore/page/DragController.cpp781
-rw-r--r--src/3rdparty/webkit/WebCore/page/DragController.h132
-rw-r--r--src/3rdparty/webkit/WebCore/page/EditorClient.h143
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.cpp2275
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.h352
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.cpp307
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.h64
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusDirection.h36
-rw-r--r--src/3rdparty/webkit/WebCore/page/Frame.cpp1880
-rw-r--r--src/3rdparty/webkit/WebCore/page/Frame.h328
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameLoadRequest.h73
-rw-r--r--src/3rdparty/webkit/WebCore/page/FramePrivate.h99
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameTree.cpp314
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameTree.h86
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.cpp1303
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h200
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geolocation.cpp222
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geolocation.h104
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geolocation.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geoposition.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geoposition.h77
-rw-r--r--src/3rdparty/webkit/WebCore/page/Geoposition.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/page/History.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/page/History.h56
-rw-r--r--src/3rdparty/webkit/WebCore/page/History.idl41
-rw-r--r--src/3rdparty/webkit/WebCore/page/Location.cpp135
-rw-r--r--src/3rdparty/webkit/WebCore/page/Location.h71
-rw-r--r--src/3rdparty/webkit/WebCore/page/Location.idl57
-rw-r--r--src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/page/MouseEventWithHitTestResults.h51
-rw-r--r--src/3rdparty/webkit/WebCore/page/Navigator.cpp144
-rw-r--r--src/3rdparty/webkit/WebCore/page/Navigator.h68
-rw-r--r--src/3rdparty/webkit/WebCore/page/Navigator.idl46
-rw-r--r--src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/page/NavigatorBase.h54
-rw-r--r--src/3rdparty/webkit/WebCore/page/Page.cpp632
-rw-r--r--src/3rdparty/webkit/WebCore/page/Page.h265
-rw-r--r--src/3rdparty/webkit/WebCore/page/PageGroup.cpp194
-rw-r--r--src/3rdparty/webkit/WebCore/page/PageGroup.h87
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionCallback.h44
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionCallback.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionError.h62
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionError.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionErrorCallback.h44
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionErrorCallback.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/page/PositionOptions.h56
-rw-r--r--src/3rdparty/webkit/WebCore/page/PrintContext.cpp137
-rw-r--r--src/3rdparty/webkit/WebCore/page/PrintContext.h57
-rw-r--r--src/3rdparty/webkit/WebCore/page/Screen.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/page/Screen.h62
-rw-r--r--src/3rdparty/webkit/WebCore/page/Screen.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp297
-rw-r--r--src/3rdparty/webkit/WebCore/page/SecurityOrigin.h141
-rw-r--r--src/3rdparty/webkit/WebCore/page/SecurityOriginHash.h81
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.cpp408
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.h261
-rw-r--r--src/3rdparty/webkit/WebCore/page/WindowFeatures.cpp188
-rw-r--r--src/3rdparty/webkit/WebCore/page/WindowFeatures.h83
-rw-r--r--src/3rdparty/webkit/WebCore/page/WorkerNavigator.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/page/WorkerNavigator.h56
-rw-r--r--src/3rdparty/webkit/WebCore/page/WorkerNavigator.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp860
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationBase.h199
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationController.cpp456
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/AnimationController.h91
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.cpp706
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/CompositeAnimation.h95
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.cpp212
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/ImplicitAnimation.h86
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/KeyframeAnimation.cpp293
-rw-r--r--src/3rdparty/webkit/WebCore/page/animation/KeyframeAnimation.h91
-rw-r--r--src/3rdparty/webkit/WebCore/page/chromium/AccessibilityObjectChromium.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/page/chromium/AccessibilityObjectWrapper.h50
-rw-r--r--src/3rdparty/webkit/WebCore/page/qt/AccessibilityObjectQt.cpp34
-rw-r--r--src/3rdparty/webkit/WebCore/page/qt/DragControllerQt.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/page/qt/EventHandlerQt.cpp138
-rw-r--r--src/3rdparty/webkit/WebCore/page/qt/FrameQt.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/AXObjectCacheWin.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/AccessibilityObjectWin.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/AccessibilityObjectWrapperWin.h54
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/DragControllerWin.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/EventHandlerWin.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/FrameCGWin.cpp111
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/FrameCairoWin.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/FrameWin.cpp101
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/FrameWin.h41
-rw-r--r--src/3rdparty/webkit/WebCore/page/win/PageWin.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Arena.cpp281
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Arena.h130
-rw-r--r--src/3rdparty/webkit/WebCore/platform/AutodrainedPool.h67
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ColorData.gperf151
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ContextMenu.cpp656
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ContextMenu.h89
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ContextMenuItem.h238
-rw-r--r--src/3rdparty/webkit/WebCore/platform/CookieJar.h41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Cursor.h153
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DeprecatedPtrList.h113
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DeprecatedPtrListImpl.cpp514
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DeprecatedPtrListImpl.h122
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DragData.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DragData.h114
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DragImage.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/DragImage.h91
-rw-r--r--src/3rdparty/webkit/WebCore/platform/EventLoop.h49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FileChooser.cpp93
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FileChooser.h80
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FileSystem.h176
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FloatConversion.h61
-rw-r--r--src/3rdparty/webkit/WebCore/platform/GeolocationService.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/GeolocationService.h71
-rw-r--r--src/3rdparty/webkit/WebCore/platform/HostWindow.h66
-rw-r--r--src/3rdparty/webkit/WebCore/platform/KURL.cpp1594
-rw-r--r--src/3rdparty/webkit/WebCore/platform/KURL.h364
-rw-r--r--src/3rdparty/webkit/WebCore/platform/KURLHash.h61
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Language.h37
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Length.cpp151
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Length.h197
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LengthBox.h85
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LengthSize.h58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LinkHash.cpp221
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LinkHash.h73
-rw-r--r--src/3rdparty/webkit/WebCore/platform/LocalizedStrings.h124
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Logging.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Logging.h62
-rw-r--r--src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.cpp342
-rw-r--r--src/3rdparty/webkit/WebCore/platform/MIMETypeRegistry.h77
-rw-r--r--src/3rdparty/webkit/WebCore/platform/NotImplemented.h55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Pasteboard.h135
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h185
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformMenuDescription.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformMouseEvent.h168
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformScreen.h66
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h142
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PopupMenu.h186
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PopupMenuClient.h67
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PopupMenuStyle.h58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PurgeableBuffer.h76
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SSLKeyGenerator.h41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollTypes.h85
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp927
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h328
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp452
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Scrollbar.h168
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollbarClient.h51
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollbarTheme.h94
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollbarThemeComposite.cpp304
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollbarThemeComposite.h71
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SearchPopupMenu.h46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SharedBuffer.cpp147
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SharedBuffer.h111
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SharedTimer.h44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Sound.h35
-rw-r--r--src/3rdparty/webkit/WebCore/platform/StaticConstructors.h76
-rw-r--r--src/3rdparty/webkit/WebCore/platform/SystemTime.h40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Theme.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Theme.h122
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ThemeTypes.h75
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ThreadCheck.h44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ThreadGlobalData.h75
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Timer.cpp396
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Timer.h112
-rw-r--r--src/3rdparty/webkit/WebCore/platform/TreeShared.h108
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Widget.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Widget.h203
-rw-r--r--src/3rdparty/webkit/WebCore/platform/animation/Animation.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/platform/animation/Animation.h146
-rw-r--r--src/3rdparty/webkit/WebCore/platform/animation/AnimationList.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/platform/animation/AnimationList.h60
-rw-r--r--src/3rdparty/webkit/WebCore/platform/animation/TimingFunction.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp427
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h254
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Color.cpp315
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Color.h152
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/DashArray.h39
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint.h158
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint3D.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatPoint3D.h58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatQuad.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatQuad.h138
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatRect.h188
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatSize.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FloatSize.h132
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Font.cpp317
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Font.h196
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontCache.cpp429
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontCache.h95
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontData.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontData.h60
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontDescription.cpp101
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontDescription.h139
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFallbackList.h79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFamily.cpp59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFamily.h88
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontFastPath.cpp367
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontRenderingMode.h37
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontSelector.h47
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/FontTraitsMask.h70
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GeneratedImage.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GeneratedImage.h76
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Generator.h45
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphBuffer.h182
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.cpp384
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphPageTreeNode.h177
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GlyphWidthMap.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Gradient.cpp149
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Gradient.h114
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.cpp512
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext.h353
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContextPrivate.h118
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsTypes.cpp189
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsTypes.h80
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Icon.h86
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Image.cpp199
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Image.h179
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.h90
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/ImageObserver.h51
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h141
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntPoint.h180
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntRect.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntRect.h210
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntSize.h163
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/IntSizeHash.h46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp272
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.h140
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Path.cpp276
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Path.h135
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/PathTraversalState.cpp207
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/PathTraversalState.h72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Pattern.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Pattern.h82
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Pen.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/Pen.h72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/SegmentedFontData.h75
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.cpp163
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/SimpleFontData.h211
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/StringTruncator.cpp198
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/StringTruncator.h46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/StrokeStyleApplier.h38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/TextRun.h126
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/UnitBezier.h123
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/WidthIterator.cpp230
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/WidthIterator.h56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEBlend.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEColorMatrix.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComponentTransfer.h99
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.cpp108
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.h81
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ColorQt.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FloatPointQt.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FloatRectQt.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCustomPlatformData.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCustomPlatformData.h46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformData.h53
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp188
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp356
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GlyphPageTreeNodeQt.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp1206
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/IconQt.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferData.h48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp330
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h96
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageQt.cpp165
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageSourceQt.cpp171
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/IntPointQt.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/IntRectQt.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/IntSizeQt.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp481
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h148
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp306
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/PatternQt.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/StillImageQt.h59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/TransformationMatrixQt.cpp202
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/IdentityTransformOperation.h67
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/MatrixTransformOperation.h82
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/RotateTransformOperation.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/ScaleTransformOperation.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/ScaleTransformOperation.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/SkewTransformOperation.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/SkewTransformOperation.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformOperation.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformOperations.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformOperations.h59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.cpp205
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TransformationMatrix.h140
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TranslateTransformOperation.cpp41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/transforms/TranslateTransformOperation.h75
-rw-r--r--src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h170
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/AutodrainedPool.mm55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/BlockExceptions.h32
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/BlockExceptions.mm38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ClipboardMac.h88
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ClipboardMac.mm360
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ContextMenuItemMac.mm155
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ContextMenuMac.mm154
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/CookieJar.mm118
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/CursorMac.mm356
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/DragDataMac.mm131
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/DragImageMac.mm102
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/EventLoopMac.mm39
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/FileChooserMac.mm55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/FileSystemMac.mm40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/FoundationExtras.h72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/KURLMac.mm71
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/KeyEventMac.mm876
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/Language.mm43
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.h40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/LocalCurrentGraphicsContext.mm53
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/LocalizedStringsMac.mm596
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/LoggingMac.mm74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/MIMETypeRegistryMac.mm59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PasteboardHelper.h60
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm378
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PlatformMouseEventMac.mm177
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PlatformScreenMac.mm108
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PopupMenuMac.mm195
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PurgeableBufferMac.cpp164
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SSLKeyGeneratorMac.mm49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SchedulePairMac.mm43
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ScrollViewMac.mm220
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ScrollbarThemeMac.h70
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ScrollbarThemeMac.mm404
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SearchPopupMenuMac.mm74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SharedBufferMac.mm130
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SharedTimerMac.mm117
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SoftLinking.h119
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SoundMac.mm33
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/SystemTimeMac.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.h56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ThemeMac.mm545
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/ThreadCheck.mm100
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreKeyGenerator.h32
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreKeyGenerator.m58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreNSStringExtras.h51
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreNSStringExtras.mm119
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreObjCExtras.h43
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreObjCExtras.mm79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.h151
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreSystemInterface.mm95
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreTextRenderer.h40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreTextRenderer.mm93
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreView.h28
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebCoreView.m65
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebFontCache.h34
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WebFontCache.mm301
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WheelEventMac.mm52
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/WidgetMac.mm353
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/AuthenticationChallengeBase.cpp113
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/AuthenticationChallengeBase.h70
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/Credential.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/Credential.h59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/DNS.h36
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/FormData.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/FormData.h109
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.cpp238
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/FormDataBuilder.h77
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/HTTPHeaderMap.h40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/HTTPParsers.cpp186
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/HTTPParsers.h42
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h100
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.cpp119
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceErrorBase.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceErrorBase.h88
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.cpp202
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h195
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h93
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceHandleInternal.h213
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.cpp287
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h147
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.cpp380
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/ResourceResponseBase.h151
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/chromium/ResourceResponse.h83
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/AuthenticationChallenge.h46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp435
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h118
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceError.h48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceHandleQt.cpp208
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequest.h74
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/ResourceResponse.h47
-rw-r--r--src/3rdparty/webkit/WebCore/platform/posix/FileSystemPOSIX.cpp168
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp305
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h87
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp117
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ContextMenuQt.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/CookieJarQt.cpp133
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp372
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp142
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/EventLoopQt.cpp32
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/FileChooserQt.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp175
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp102
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/KeyboardCodes.h561
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp357
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/LoggingQt.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/MenuEventProxy.h54
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp172
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp527
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp122
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.h49
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp958
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h180
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp251
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SearchPopupMenuQt.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp52
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SoundQt.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/SystemTimeQt.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp130
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/WheelEventQt.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/WidgetQt.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLValue.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLValue.h58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteAuthorizer.cpp39
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.cpp353
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteDatabase.h130
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteStatement.cpp453
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteStatement.h102
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteTransaction.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/platform/sql/SQLiteTransaction.h56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/AtomicString.cpp308
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/AtomicString.h159
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/AtomicStringHash.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/AtomicStringImpl.h36
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/Base64.cpp184
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/Base64.h41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/BidiContext.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/BidiContext.h69
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h937
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/CString.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/CString.h80
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/CharacterNames.h61
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/ParserUtilities.h54
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/PlatformString.h373
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/RegularExpression.cpp213
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/RegularExpression.h63
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/SegmentedString.cpp202
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/SegmentedString.h176
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/String.cpp845
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringBuffer.h77
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringBuilder.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringBuilder.h57
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringHash.h248
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringImpl.cpp991
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/StringImpl.h290
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBoundaries.h38
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBoundariesICU.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBreakIterator.h48
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorICU.cpp117
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextBreakIteratorInternalICU.h32
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodec.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodec.h84
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecICU.cpp473
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecICU.h79
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecLatin1.cpp199
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecLatin1.h44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecUTF16.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecUTF16.h51
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecUserDefined.cpp111
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextCodecUserDefined.h44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextDecoder.cpp129
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextDecoder.h64
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextDirection.h35
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextEncoding.cpp239
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextEncoding.h78
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextEncodingRegistry.cpp262
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextEncodingRegistry.h53
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextStream.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/TextStream.h59
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/UnicodeRange.cpp462
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/UnicodeRange.h120
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/cf/StringCF.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/cf/StringImplCF.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/CharsetData.h37
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/ShapeArabic.c555
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/ShapeArabic.h44
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/StringImplMac.mm33
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/StringMac.mm41
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/TextBoundaries.mm54
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm72
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/TextCodecMac.cpp329
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/TextCodecMac.h73
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/character-sets.txt1868
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/mac/mac-encodings.txt45
-rwxr-xr-xsrc/3rdparty/webkit/WebCore/platform/text/mac/make-charset-table.pl225
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/StringQt.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp125
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp297
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.h54
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/symbian/StringImplSymbian.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/symbian/StringSymbian.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp31
-rw-r--r--src/3rdparty/webkit/WebCore/platform/win/SystemTimeWin.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeType.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeType.h52
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeType.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeTypeArray.cpp95
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeTypeArray.h56
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/MimeTypeArray.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/Plugin.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/Plugin.h57
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/Plugin.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginArray.cpp100
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginArray.h58
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginArray.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginData.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginData.h74
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp375
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginDatabase.h84
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginDebug.h57
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginInfoStore.cpp103
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginInfoStore.h48
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginMainThreadScheduler.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginMainThreadScheduler.h86
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp240
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginPackage.h118
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h62
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginStream.cpp476
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginStream.h123
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.cpp938
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/PluginView.h302
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/mac/PluginDataMac.mm76
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/mac/PluginPackageMac.cpp378
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp704
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/npapi.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/npfunctions.h204
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginDataQt.cpp108
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp200
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp488
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginDataWin.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginDatabaseWin.cpp354
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginMessageThrottlerWin.h72
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginPackageWin.cpp375
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp841
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.cpp785
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/AutoTableLayout.h87
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/CounterNode.cpp192
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/CounterNode.h81
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/EllipsisBox.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/EllipsisBox.h53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp309
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.h49
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/GapRects.h62
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/HitTestRequest.h44
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/HitTestResult.cpp334
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/HitTestResult.h94
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineBox.cpp258
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineBox.h316
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.cpp1064
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineFlowBox.h171
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineRunBox.h54
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineTextBox.cpp909
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/InlineTextBox.h139
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/LayoutState.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/LayoutState.h71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/ListMarkerBox.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/ListMarkerBox.h41
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp254
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h136
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/PointerEventsHitRules.cpp110
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/PointerEventsHitRules.h50
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderApplet.cpp98
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderApplet.h52
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderArena.cpp135
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderArena.h64
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBR.cpp111
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBR.h71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp4671
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.h504
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp2768
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBox.h257
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderButton.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderButton.h77
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderContainer.cpp701
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderContainer.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderCounter.cpp306
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderCounter.h54
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFieldset.cpp282
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFieldset.h60
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFileUploadControl.cpp298
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFileUploadControl.h70
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.cpp1157
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFlexibleBox.h66
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFlow.cpp883
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFlow.h146
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderForeignObject.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderForeignObject.h61
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrame.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrame.h50
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.cpp669
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderFrameSet.h122
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderHTMLCanvas.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderHTMLCanvas.h52
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderImage.cpp577
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderImage.h107
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderImageGeneratedContent.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderImageGeneratedContent.h64
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp399
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderInline.h84
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp2609
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.h523
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLegend.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLegend.h42
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListBox.cpp649
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListBox.h132
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListItem.cpp335
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListItem.h83
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp905
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderListMarker.h85
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMarquee.cpp311
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMarquee.h97
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMedia.cpp424
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMedia.h118
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMenuList.cpp441
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderMenuList.h119
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp3303
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderObject.h991
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPart.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPart.h62
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPartObject.cpp317
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPartObject.h47
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPath.cpp484
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderPath.h95
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplaced.cpp416
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplaced.h87
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplica.h53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGBlock.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGBlock.h41
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGContainer.cpp438
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGContainer.h122
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGGradientStop.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGGradientStop.h59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGHiddenContainer.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGHiddenContainer.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp280
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInline.h41
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.cpp180
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGInlineText.h59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGRoot.cpp347
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGRoot.h82
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTSpan.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTSpan.h41
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp242
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTextPath.cpp122
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTextPath.h55
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGTransformableContainer.h39
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGViewportContainer.cpp198
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGViewportContainer.h64
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp320
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.h83
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbarPart.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbarPart.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbarTheme.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderScrollbarTheme.h82
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSlider.cpp402
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSlider.h73
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTable.cpp1152
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTable.h226
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableCell.cpp882
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableCell.h133
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableCol.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableCol.h61
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableRow.cpp219
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableRow.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableSection.cpp1080
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTableSection.h154
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderText.cpp1216
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderText.h183
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp591
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h121
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp157
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h54
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp759
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h123
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.h64
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp776
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTheme.h234
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeMac.h177
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.cpp1235
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeSafari.h181
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeWin.cpp852
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderThemeWin.h147
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTreeAsText.cpp512
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTreeAsText.h43
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderVideo.cpp239
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderVideo.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderView.cpp611
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderView.h226
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp278
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.h77
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWordBreak.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWordBreak.h46
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RootInlineBox.cpp405
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RootInlineBox.h206
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.cpp535
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGCharacterLayoutInfo.h416
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineFlowBox.h48
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.cpp548
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGInlineTextBox.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRenderSupport.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRenderSupport.h42
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.cpp562
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRenderTreeAsText.h111
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.cpp1718
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/SVGRootInlineBox.h99
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TableLayout.h48
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp178
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.h73
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/bidi.cpp2222
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/bidi.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/break_lines.cpp120
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/break_lines.h41
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/BindingURI.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/BindingURI.h59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/BorderData.h109
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/BorderValue.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CollapsedBorderValue.h66
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/ContentData.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/ContentData.h62
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CounterContent.h62
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CounterDirectives.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CounterDirectives.h54
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CursorData.h56
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/CursorList.h59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/DataRef.h71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/FillLayer.cpp254
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/FillLayer.h161
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/KeyframeList.cpp88
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/KeyframeList.h90
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/NinePieceImage.cpp35
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/NinePieceImage.h70
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/OutlineValue.h56
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.cpp844
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h1129
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/RenderStyleConstants.h268
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.cpp146
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyle.h215
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.cpp218
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/SVGRenderStyleDefs.h292
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/ShadowData.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/ShadowData.h71
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.h59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleBoxData.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleBoxData.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleCachedImage.cpp92
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleCachedImage.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleDashboardRegion.h61
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleFlexibleBoxData.cpp59
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleFlexibleBoxData.h60
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleGeneratedImage.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleGeneratedImage.h69
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleImage.h81
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.cpp91
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleInheritedData.h80
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleMarqueeData.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleMarqueeData.h61
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleMultiColData.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleMultiColData.h75
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleRareInheritedData.cpp95
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleRareInheritedData.h76
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleRareNonInheritedData.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleRareNonInheritedData.h120
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleReflection.h70
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleSurroundData.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleSurroundData.h58
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleTransformData.cpp49
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleTransformData.h57
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleVisualData.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/style/StyleVisualData.h67
-rw-r--r--src/3rdparty/webkit/WebCore/storage/ChangeVersionWrapper.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/storage/ChangeVersionWrapper.h55
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Database.cpp597
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Database.h148
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Database.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseAuthorizer.cpp212
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseAuthorizer.h105
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseDetails.h67
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTask.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTask.h151
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseThread.cpp136
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseThread.h74
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTracker.cpp830
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTracker.h133
-rw-r--r--src/3rdparty/webkit/WebCore/storage/DatabaseTrackerClient.h45
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorage.cpp172
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorage.h81
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageArea.cpp416
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageArea.h105
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageTask.cpp84
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageTask.h64
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageThread.cpp139
-rw-r--r--src/3rdparty/webkit/WebCore/storage/LocalStorageThread.h74
-rw-r--r--src/3rdparty/webkit/WebCore/storage/OriginQuotaManager.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/storage/OriginQuotaManager.h70
-rw-r--r--src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/storage/OriginUsageRecord.h67
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLError.h52
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLError.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSet.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSet.h63
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSet.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSetRowList.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSetRowList.h58
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLResultSetRowList.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatement.cpp197
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatement.h83
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatementCallback.h48
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatementCallback.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatementErrorCallback.h49
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLStatementErrorCallback.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransaction.cpp550
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransaction.h131
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransaction.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransactionCallback.h47
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransactionCallback.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransactionErrorCallback.h48
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SQLTransactionErrorCallback.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SessionStorage.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SessionStorage.h64
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SessionStorageArea.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/storage/SessionStorageArea.h57
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Storage.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Storage.h65
-rw-r--r--src/3rdparty/webkit/WebCore/storage/Storage.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageArea.cpp125
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageArea.h83
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageEvent.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageEvent.h72
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageEvent.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageMap.cpp158
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageMap.h65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/ColorDistance.cpp94
-rw-r--r--src/3rdparty/webkit/WebCore/svg/ColorDistance.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/ElementTimeControl.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/ElementTimeControl.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/Filter.cpp39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/Filter.h46
-rw-r--r--src/3rdparty/webkit/WebCore/svg/FilterBuilder.h51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/FilterEffect.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/FilterEffect.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/GradientAttributes.h74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/LinearGradientAttributes.h78
-rw-r--r--src/3rdparty/webkit/WebCore/svg/PatternAttributes.h103
-rw-r--r--src/3rdparty/webkit/WebCore/svg/RadialGradientAttributes.h85
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp213
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAElement.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAltGlyphElement.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAltGlyphElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAltGlyphElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAngle.cpp150
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAngle.h79
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAngle.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateColorElement.cpp39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateColorElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateColorElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateElement.cpp289
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateMotionElement.cpp245
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateMotionElement.h79
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateTransformElement.cpp207
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateTransformElement.h69
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimateTransformElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedAngle.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedBoolean.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedEnumeration.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedInteger.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedLength.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedLengthList.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedNumber.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedNumberList.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPathData.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPoints.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedPreserveAspectRatio.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedProperty.h460
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedRect.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedString.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedTemplate.h258
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimatedTransformList.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.cpp534
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.h125
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGAnimationElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCircleElement.cpp99
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCircleElement.h62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCircleElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGClipPathElement.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGColor.cpp119
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGColor.h93
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGColor.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGComponentTransferFunctionElement.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGComponentTransferFunctionElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGComponentTransferFunctionElement.idl46
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCursorElement.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCursorElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGCursorElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.h39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefsElement.cpp56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefsElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDefsElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDescElement.cpp48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDescElement.h46
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDescElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocument.cpp105
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocument.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocument.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.cpp137
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGDocumentExtensions.h131
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElement.cpp298
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElement.h145
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstance.cpp577
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstance.h211
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstance.idl103
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstanceList.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstanceList.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElementInstanceList.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGEllipseElement.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGEllipseElement.h63
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGEllipseElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGException.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGException.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGExternalResourcesRequired.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGExternalResourcesRequired.h63
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGExternalResourcesRequired.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.h55
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEBlendElement.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEColorMatrixElement.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEComponentTransferElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.cpp106
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFECompositeElement.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDiffuseLightingElement.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.cpp102
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDisplacementMapElement.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEDistantLightElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFloodElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.h41
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncAElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.h41
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncBElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.h41
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncGElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.h41
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEFuncRElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.cpp89
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEGaussianBlurElement.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEImageElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFELightElement.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFELightElement.h60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.h47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeNodeElement.cpp51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeNodeElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEMergeNodeElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.cpp79
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.h52
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEOffsetElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFEPointLightElement.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.cpp115
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpecularLightingElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.cpp54
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFESpotLightElement.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETileElement.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETileElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETileElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETurbulenceElement.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETurbulenceElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFETurbulenceElement.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterElement.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterElement.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp128
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFilterPrimitiveStandardAttributes.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFitToViewBox.cpp121
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFitToViewBox.h57
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFitToViewBox.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFont.cpp595
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontData.cpp45
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontData.h65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontElement.cpp243
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp368
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceFormatElement.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceFormatElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceFormatElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceNameElement.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceNameElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceNameElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceSrcElement.cpp62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceSrcElement.h42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceSrcElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceUriElement.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceUriElement.h42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceUriElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp167
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGElement.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGlyphElement.cpp178
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGlyphElement.h131
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGlyphElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGlyphMap.h109
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGradientElement.cpp169
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGradientElement.h74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGGradientElement.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGHKernElement.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGHKernElement.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGHKernElement.idl27
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGImageElement.cpp166
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGImageElement.h79
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGImageElement.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGImageLoader.h44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLangSpace.cpp88
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLangSpace.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLangSpace.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLength.cpp323
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLength.h105
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLength.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLengthList.cpp80
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLengthList.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLengthList.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp103
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLineElement.h67
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLineElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLinearGradientElement.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLinearGradientElement.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLinearGradientElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGList.h256
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGListTraits.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLocatable.cpp159
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLocatable.h64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGLocatable.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMPathElement.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h54
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMarkerElement.cpp195
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMarkerElement.h89
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMarkerElement.idl55
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMaskElement.cpp214
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMaskElement.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMaskElement.idl42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMatrix.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMetadataElement.idl29
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMissingGlyphElement.cpp34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMissingGlyphElement.h39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGMissingGlyphElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGNumber.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGNumberList.cpp75
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGNumberList.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGNumberList.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPaint.cpp117
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPaint.h100
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPaint.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.cpp873
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGParserUtilities.h71
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathElement.cpp242
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathElement.h115
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathElement.idl112
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSeg.h95
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegArc.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegArc.h104
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegArcAbs.idl46
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegArcRel.idl46
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.h51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegClosePath.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubic.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubic.h98
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicAbs.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicRel.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicSmooth.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h85
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicSmoothAbs.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoCubicSmoothRel.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadratic.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadratic.h85
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticAbs.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticRel.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h59
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLineto.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLineto.h59
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoAbs.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoHorizontal.cpp44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoHorizontal.h72
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoHorizontalAbs.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoHorizontalRel.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoRel.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoVertical.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoVertical.h72
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoVerticalAbs.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegLinetoVerticalRel.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegList.cpp260
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegList.h51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegList.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegMoveto.cpp43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegMoveto.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegMovetoAbs.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPathSegMovetoRel.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPatternElement.cpp322
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPatternElement.h85
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPatternElement.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPoint.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPointList.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPointList.h49
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPointList.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolyElement.cpp130
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h68
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolygonElement.cpp61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolygonElement.h42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolygonElement.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolylineElement.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolylineElement.h42
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPolylineElement.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPreserveAspectRatio.cpp261
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPreserveAspectRatio.h92
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGPreserveAspectRatio.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRadialGradientElement.cpp210
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRadialGradientElement.h59
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRadialGradientElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRect.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRectElement.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRectElement.h65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRectElement.idl43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRenderingIntent.h51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGRenderingIntent.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp538
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h167
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.idl88
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGScriptElement.cpp211
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGScriptElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGScriptElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSetElement.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSetElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSetElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStopElement.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStopElement.h49
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStopElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStringList.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStringList.h47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStringList.idl47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStylable.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStylable.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStylable.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyleElement.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyleElement.h70
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyleElement.idl40
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledElement.cpp281
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledLocatableElement.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledLocatableElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledTransformableElement.cpp126
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGStyledTransformableElement.h75
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.cpp66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSymbolElement.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSymbolElement.h54
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSymbolElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTRefElement.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTRefElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTRefElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTSpanElement.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTSpanElement.h43
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTSpanElement.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTests.cpp120
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTests.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTests.idl37
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextContentElement.cpp530
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextContentElement.h80
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextContentElement.idl60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextElement.cpp134
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextElement.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.h81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPathElement.idl45
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPositioningElement.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPositioningElement.h55
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTextPositioningElement.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTitleElement.cpp59
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTitleElement.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransform.cpp156
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransform.h99
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransform.idl48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.cpp278
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformDistance.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformList.cpp97
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformList.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformList.idl50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformable.cpp233
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformable.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGTransformable.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGURIReference.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGURIReference.h54
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGURIReference.idl33
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUnitTypes.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUnitTypes.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp880
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUseElement.h112
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUseElement.idl44
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewElement.cpp73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewElement.h59
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewElement.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp179
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewSpec.h67
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGViewSpec.idl38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.h60
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.idl39
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomEvent.cpp84
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomEvent.h68
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGZoomEvent.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h180
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SMILTime.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SMILTime.h74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SMILTimeContainer.cpp286
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SMILTimeContainer.h95
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.cpp930
-rw-r--r--src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.h197
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp257
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.h87
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.cpp183
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServer.h99
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerGradient.cpp310
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerGradient.h103
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerLinearGradient.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerLinearGradient.h62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerPattern.cpp101
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerPattern.h88
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerRadialGradient.cpp87
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerRadialGradient.h66
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerSolid.cpp104
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGPaintServerSolid.h61
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.cpp185
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResource.h101
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceClipper.cpp139
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceClipper.h93
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceFilter.cpp123
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceFilter.h99
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceListener.h0
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMarker.cpp140
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMarker.h78
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMasker.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMasker.h73
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGDistantLightSource.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp177
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.h95
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.cpp135
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.h78
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEDisplacementMap.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEDisplacementMap.h72
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEFlood.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEFlood.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEGaussianBlur.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEGaussianBlur.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEImage.cpp84
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEImage.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEMerge.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEMerge.h53
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEMorphology.cpp107
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEMorphology.h65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEOffset.cpp81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFEOffset.h56
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFESpecularLighting.cpp147
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFESpecularLighting.h81
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFETile.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFETile.h48
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFETurbulence.cpp145
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFETurbulence.h79
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFilterEffect.cpp133
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGFilterEffect.h99
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGLightSource.cpp65
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGLightSource.h58
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGPointLightSource.h51
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/filters/SVGSpotLightSource.h62
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/qt/RenderPathQt.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/qt/SVGPaintServerPatternQt.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/qt/SVGPaintServerQt.cpp72
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/qt/SVGResourceFilterQt.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/qt/SVGResourceMaskerQt.cpp38
-rw-r--r--src/3rdparty/webkit/WebCore/svg/svgattrs.in253
-rw-r--r--src/3rdparty/webkit/WebCore/svg/svgtags.in116
-rw-r--r--src/3rdparty/webkit/WebCore/svg/xlinkattrs.in11
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp178
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAElement.h55
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAccessElement.cpp70
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAccessElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAnchorElement.cpp67
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAnchorElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAttributeNames.in24
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLBRElement.cpp76
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLBRElement.h46
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp329
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLCardElement.h76
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp152
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDoElement.h64
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDocument.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDocument.h52
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLElement.cpp116
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLElement.h53
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.cpp105
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLErrorHandling.h51
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLEventHandlingElement.cpp68
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLEventHandlingElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLFieldSetElement.cpp86
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLFieldSetElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp214
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLGoElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLImageElement.cpp148
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLImageElement.h58
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp82
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLImageLoader.h45
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLInsertedLegendElement.cpp46
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLInsertedLegendElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLIntrinsicEvent.cpp53
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLIntrinsicEvent.h59
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLIntrinsicEventHandler.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLIntrinsicEventHandler.h58
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLMetaElement.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLMetaElement.h45
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp63
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLNoopElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLOnEventElement.cpp88
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLOnEventElement.h47
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPElement.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp132
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPageState.h81
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.cpp78
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPostfieldElement.h50
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPrevElement.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPrevElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLRefreshElement.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLRefreshElement.h40
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.h48
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTableElement.cpp269
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTableElement.h57
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTagNames.in34
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTaskElement.cpp95
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTaskElement.h56
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTemplateElement.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTemplateElement.h42
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp141
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLTimerElement.h55
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLVariables.cpp288
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLVariables.h46
-rw-r--r--src/3rdparty/webkit/WebCore/xml/DOMParser.cpp42
-rw-r--r--src/3rdparty/webkit/WebCore/xml/DOMParser.h41
-rw-r--r--src/3rdparty/webkit/WebCore/xml/DOMParser.idl24
-rw-r--r--src/3rdparty/webkit/WebCore/xml/NativeXPathNSResolver.cpp58
-rw-r--r--src/3rdparty/webkit/WebCore/xml/NativeXPathNSResolver.h53
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp1443
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h237
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.idl99
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestException.h60
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestException.idl49
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestProgressEvent.h61
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestProgressEvent.idl36
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestUpload.cpp144
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestUpload.h110
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequestUpload.idl54
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLSerializer.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLSerializer.h44
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLSerializer.idl28
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathEvaluator.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathEvaluator.h62
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathEvaluator.idl35
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathException.h64
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathException.idl50
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathExpression.cpp93
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathExpression.h66
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathExpression.idl34
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.cpp57
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathExpressionNode.h85
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathFunctions.cpp683
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathFunctions.h62
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathGrammar.y554
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNSResolver.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNSResolver.h51
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNSResolver.idl27
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNamespace.cpp85
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNamespace.h66
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNodeSet.cpp206
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathNodeSet.h82
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathParser.cpp636
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathParser.h131
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathPath.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathPath.h93
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathPredicate.cpp284
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathPredicate.h111
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathResult.cpp245
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathResult.h94
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathResult.idl57
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathStep.cpp306
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathStep.h104
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathUtil.cpp96
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathUtil.h56
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathValue.cpp129
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathValue.h106
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathVariableReference.cpp55
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XPathVariableReference.h50
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp117
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLImportRule.h72
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp316
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h100
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTExtensions.cpp88
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTExtensions.h40
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp461
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h81
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessor.idl52
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTUnicodeSort.cpp352
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTUnicodeSort.h42
-rw-r--r--src/3rdparty/webkit/WebCore/xml/xmlattrs.in6
-rw-r--r--src/3rdparty/webkit/WebKit.pri95
-rw-r--r--src/3rdparty/webkit/WebKit/ChangeLog714
-rw-r--r--src/3rdparty/webkit/WebKit/LICENSE25
-rw-r--r--src/3rdparty/webkit/WebKit/StringsNotToBeLocalized.txt666
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/headers.pri8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp148
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.h59
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase_p.h38
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp1311
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h204
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h116
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp443
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.h107
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h59
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp118
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.h43
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h62
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp2757
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h334
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h173
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp216
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.h74
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp176
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.h67
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin_p.h40
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp781
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h130
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp962
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.h159
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog11466
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Plugins/ICOHandler.cpp459
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Plugins/ICOHandler.h52
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Plugins/Plugins.pro14
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp431
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h134
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp81
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h52
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp80
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.h46
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp57
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.h50
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp596
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.h121
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp1172
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h220
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp206
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h80
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebKit_pch.h83
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/image.pngbin0 -> 14743 bytes-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp2355
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp94
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp986
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/tests.pro3
-rw-r--r--src/3rdparty/wintab/pktdef.h233
-rw-r--r--src/3rdparty/wintab/wintab.h864
-rw-r--r--src/3rdparty/xorg/wacomcfg.h138
-rw-r--r--src/3rdparty/zlib/ChangeLog855
-rw-r--r--src/3rdparty/zlib/FAQ339
-rw-r--r--src/3rdparty/zlib/INDEX51
-rw-r--r--src/3rdparty/zlib/Makefile154
-rw-r--r--src/3rdparty/zlib/Makefile.in154
-rw-r--r--src/3rdparty/zlib/README125
-rw-r--r--src/3rdparty/zlib/adler32.c149
-rw-r--r--src/3rdparty/zlib/algorithm.txt209
-rw-r--r--src/3rdparty/zlib/compress.c79
-rwxr-xr-xsrc/3rdparty/zlib/configure459
-rw-r--r--src/3rdparty/zlib/crc32.c423
-rw-r--r--src/3rdparty/zlib/crc32.h441
-rw-r--r--src/3rdparty/zlib/deflate.c1736
-rw-r--r--src/3rdparty/zlib/deflate.h331
-rw-r--r--src/3rdparty/zlib/example.c565
-rw-r--r--src/3rdparty/zlib/examples/README.examples42
-rw-r--r--src/3rdparty/zlib/examples/fitblk.c233
-rw-r--r--src/3rdparty/zlib/examples/gun.c693
-rw-r--r--src/3rdparty/zlib/examples/gzappend.c500
-rw-r--r--src/3rdparty/zlib/examples/gzjoin.c448
-rw-r--r--src/3rdparty/zlib/examples/gzlog.c413
-rw-r--r--src/3rdparty/zlib/examples/gzlog.h58
-rw-r--r--src/3rdparty/zlib/examples/zlib_how.html523
-rw-r--r--src/3rdparty/zlib/examples/zpipe.c191
-rw-r--r--src/3rdparty/zlib/examples/zran.c404
-rw-r--r--src/3rdparty/zlib/gzio.c1026
-rw-r--r--src/3rdparty/zlib/infback.c623
-rw-r--r--src/3rdparty/zlib/inffast.c318
-rw-r--r--src/3rdparty/zlib/inffast.h11
-rw-r--r--src/3rdparty/zlib/inffixed.h94
-rw-r--r--src/3rdparty/zlib/inflate.c1368
-rw-r--r--src/3rdparty/zlib/inflate.h115
-rw-r--r--src/3rdparty/zlib/inftrees.c329
-rw-r--r--src/3rdparty/zlib/inftrees.h55
-rw-r--r--src/3rdparty/zlib/make_vms.com461
-rw-r--r--src/3rdparty/zlib/minigzip.c322
-rw-r--r--src/3rdparty/zlib/projects/README.projects41
-rw-r--r--src/3rdparty/zlib/projects/visualc6/README.txt73
-rw-r--r--src/3rdparty/zlib/projects/visualc6/example.dsp278
-rw-r--r--src/3rdparty/zlib/projects/visualc6/minigzip.dsp278
-rw-r--r--src/3rdparty/zlib/projects/visualc6/zlib.dsp609
-rw-r--r--src/3rdparty/zlib/projects/visualc6/zlib.dsw59
-rw-r--r--src/3rdparty/zlib/trees.c1219
-rw-r--r--src/3rdparty/zlib/trees.h128
-rw-r--r--src/3rdparty/zlib/uncompr.c61
-rw-r--r--src/3rdparty/zlib/win32/DLL_FAQ.txt397
-rw-r--r--src/3rdparty/zlib/win32/Makefile.bor107
-rw-r--r--src/3rdparty/zlib/win32/Makefile.emx69
-rw-r--r--src/3rdparty/zlib/win32/Makefile.gcc141
-rw-r--r--src/3rdparty/zlib/win32/Makefile.msc126
-rw-r--r--src/3rdparty/zlib/win32/VisualC.txt3
-rw-r--r--src/3rdparty/zlib/win32/zlib.def60
-rw-r--r--src/3rdparty/zlib/win32/zlib1.rc39
-rw-r--r--src/3rdparty/zlib/zconf.h332
-rw-r--r--src/3rdparty/zlib/zconf.in.h332
-rw-r--r--src/3rdparty/zlib/zlib.3159
-rw-r--r--src/3rdparty/zlib/zlib.h1368
-rw-r--r--src/3rdparty/zlib/zutil.c318
-rw-r--r--src/3rdparty/zlib/zutil.h269
-rw-r--r--src/activeqt/activeqt.pro5
-rw-r--r--src/activeqt/container/container.pro45
-rw-r--r--src/activeqt/container/qaxbase.cpp4465
-rw-r--r--src/activeqt/container/qaxbase.h226
-rw-r--r--src/activeqt/container/qaxdump.cpp404
-rw-r--r--src/activeqt/container/qaxobject.cpp213
-rw-r--r--src/activeqt/container/qaxobject.h105
-rw-r--r--src/activeqt/container/qaxscript.cpp1293
-rw-r--r--src/activeqt/container/qaxscript.h248
-rw-r--r--src/activeqt/container/qaxscriptwrapper.cpp64
-rw-r--r--src/activeqt/container/qaxselect.cpp164
-rw-r--r--src/activeqt/container/qaxselect.h75
-rw-r--r--src/activeqt/container/qaxselect.ui173
-rw-r--r--src/activeqt/container/qaxwidget.cpp2228
-rw-r--r--src/activeqt/container/qaxwidget.h125
-rw-r--r--src/activeqt/control/control.pro43
-rw-r--r--src/activeqt/control/qaxaggregated.h93
-rw-r--r--src/activeqt/control/qaxbindable.cpp324
-rw-r--r--src/activeqt/control/qaxbindable.h87
-rw-r--r--src/activeqt/control/qaxfactory.cpp591
-rw-r--r--src/activeqt/control/qaxfactory.h310
-rw-r--r--src/activeqt/control/qaxmain.cpp54
-rw-r--r--src/activeqt/control/qaxserver.cpp1251
-rw-r--r--src/activeqt/control/qaxserver.def8
-rw-r--r--src/activeqt/control/qaxserver.icobin0 -> 766 bytes-rw-r--r--src/activeqt/control/qaxserver.rc2
-rw-r--r--src/activeqt/control/qaxserverbase.cpp4490
-rw-r--r--src/activeqt/control/qaxserverdll.cpp138
-rw-r--r--src/activeqt/control/qaxservermain.cpp279
-rw-r--r--src/activeqt/shared/qaxtypes.cpp1486
-rw-r--r--src/activeqt/shared/qaxtypes.h97
-rw-r--r--src/corelib/QtCore.dynlist10
-rw-r--r--src/corelib/arch/alpha/arch.pri4
-rw-r--r--src/corelib/arch/alpha/qatomic_alpha.s199
-rw-r--r--src/corelib/arch/arch.pri26
-rw-r--r--src/corelib/arch/arm/arch.pri4
-rw-r--r--src/corelib/arch/arm/qatomic_arm.cpp72
-rw-r--r--src/corelib/arch/armv6/arch.pri3
-rw-r--r--src/corelib/arch/avr32/arch.pri3
-rw-r--r--src/corelib/arch/bfin/arch.pri3
-rw-r--r--src/corelib/arch/generic/arch.pri6
-rw-r--r--src/corelib/arch/generic/qatomic_generic_unix.cpp118
-rw-r--r--src/corelib/arch/generic/qatomic_generic_windows.cpp131
-rw-r--r--src/corelib/arch/i386/arch.pri4
-rw-r--r--src/corelib/arch/i386/qatomic_i386.s103
-rw-r--r--src/corelib/arch/ia64/arch.pri4
-rw-r--r--src/corelib/arch/ia64/qatomic_ia64.s34
-rw-r--r--src/corelib/arch/macosx/arch.pri7
-rw-r--r--src/corelib/arch/macosx/qatomic32_ppc.s129
-rw-r--r--src/corelib/arch/mips/arch.pri8
-rw-r--r--src/corelib/arch/mips/qatomic_mips32.s110
-rw-r--r--src/corelib/arch/mips/qatomic_mips64.s98
-rw-r--r--src/corelib/arch/parisc/arch.pri5
-rw-r--r--src/corelib/arch/parisc/q_ldcw.s22
-rw-r--r--src/corelib/arch/parisc/qatomic_parisc.cpp88
-rw-r--r--src/corelib/arch/powerpc/arch.pri10
-rw-r--r--src/corelib/arch/powerpc/qatomic32.s485
-rw-r--r--src/corelib/arch/powerpc/qatomic64.s493
-rw-r--r--src/corelib/arch/qatomic_alpha.h642
-rw-r--r--src/corelib/arch/qatomic_arch.h93
-rw-r--r--src/corelib/arch/qatomic_arm.h401
-rw-r--r--src/corelib/arch/qatomic_armv6.h360
-rw-r--r--src/corelib/arch/qatomic_avr32.h252
-rw-r--r--src/corelib/arch/qatomic_bfin.h343
-rw-r--r--src/corelib/arch/qatomic_bootstrap.h99
-rw-r--r--src/corelib/arch/qatomic_generic.h282
-rw-r--r--src/corelib/arch/qatomic_i386.h361
-rw-r--r--src/corelib/arch/qatomic_ia64.h813
-rw-r--r--src/corelib/arch/qatomic_macosx.h57
-rw-r--r--src/corelib/arch/qatomic_mips.h826
-rw-r--r--src/corelib/arch/qatomic_parisc.h305
-rw-r--r--src/corelib/arch/qatomic_powerpc.h650
-rw-r--r--src/corelib/arch/qatomic_s390.h430
-rw-r--r--src/corelib/arch/qatomic_sh.h330
-rw-r--r--src/corelib/arch/qatomic_sh4a.h537
-rw-r--r--src/corelib/arch/qatomic_sparc.h525
-rw-r--r--src/corelib/arch/qatomic_windows.h564
-rw-r--r--src/corelib/arch/qatomic_windowsce.h56
-rw-r--r--src/corelib/arch/qatomic_x86_64.h363
-rw-r--r--src/corelib/arch/s390/arch.pri3
-rw-r--r--src/corelib/arch/sh/arch.pri4
-rw-r--r--src/corelib/arch/sh/qatomic_sh.cpp72
-rw-r--r--src/corelib/arch/sh4a/arch.pri3
-rw-r--r--src/corelib/arch/sparc/arch.pri10
-rw-r--r--src/corelib/arch/sparc/qatomic32.s63
-rw-r--r--src/corelib/arch/sparc/qatomic64.s287
-rw-r--r--src/corelib/arch/sparc/qatomic_sparc.cpp92
-rw-r--r--src/corelib/arch/windows/arch.pri3
-rw-r--r--src/corelib/arch/x86_64/arch.pri4
-rw-r--r--src/corelib/arch/x86_64/qatomic_sun.s91
-rw-r--r--src/corelib/codecs/codecs.pri53
-rw-r--r--src/corelib/codecs/qfontlaocodec.cpp124
-rw-r--r--src/corelib/codecs/qfontlaocodec_p.h78
-rw-r--r--src/corelib/codecs/qiconvcodec.cpp536
-rw-r--r--src/corelib/codecs/qiconvcodec_p.h104
-rw-r--r--src/corelib/codecs/qisciicodec.cpp288
-rw-r--r--src/corelib/codecs/qisciicodec_p.h81
-rw-r--r--src/corelib/codecs/qlatincodec.cpp246
-rw-r--r--src/corelib/codecs/qlatincodec_p.h94
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp733
-rw-r--r--src/corelib/codecs/qsimplecodec_p.h87
-rw-r--r--src/corelib/codecs/qtextcodec.cpp1598
-rw-r--r--src/corelib/codecs/qtextcodec.h189
-rw-r--r--src/corelib/codecs/qtextcodec_p.h84
-rw-r--r--src/corelib/codecs/qtextcodecplugin.cpp161
-rw-r--r--src/corelib/codecs/qtextcodecplugin.h96
-rw-r--r--src/corelib/codecs/qtsciicodec.cpp500
-rw-r--r--src/corelib/codecs/qtsciicodec_p.h106
-rw-r--r--src/corelib/codecs/qutfcodec.cpp634
-rw-r--r--src/corelib/codecs/qutfcodec_p.h155
-rw-r--r--src/corelib/concurrent/concurrent.pri42
-rw-r--r--src/corelib/concurrent/qfuture.cpp695
-rw-r--r--src/corelib/concurrent/qfuture.h278
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp564
-rw-r--r--src/corelib/concurrent/qfutureinterface.h311
-rw-r--r--src/corelib/concurrent/qfutureinterface_p.h168
-rw-r--r--src/corelib/concurrent/qfuturesynchronizer.cpp154
-rw-r--r--src/corelib/concurrent/qfuturesynchronizer.h121
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp574
-rw-r--r--src/corelib/concurrent/qfuturewatcher.h222
-rw-r--r--src/corelib/concurrent/qfuturewatcher_p.h90
-rw-r--r--src/corelib/concurrent/qrunnable.cpp105
-rw-r--r--src/corelib/concurrent/qrunnable.h73
-rw-r--r--src/corelib/concurrent/qtconcurrentcompilertest.h71
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.cpp228
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.h128
-rw-r--r--src/corelib/concurrent/qtconcurrentfilter.cpp330
-rw-r--r--src/corelib/concurrent/qtconcurrentfilter.h736
-rw-r--r--src/corelib/concurrent/qtconcurrentfilterkernel.h351
-rw-r--r--src/corelib/concurrent/qtconcurrentfunctionwrappers.h173
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp194
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.h324
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp401
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.h780
-rw-r--r--src/corelib/concurrent/qtconcurrentmapkernel.h273
-rw-r--r--src/corelib/concurrent/qtconcurrentmedian.h130
-rw-r--r--src/corelib/concurrent/qtconcurrentreducekernel.h253
-rw-r--r--src/corelib/concurrent/qtconcurrentresultstore.cpp256
-rw-r--r--src/corelib/concurrent/qtconcurrentresultstore.h239
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.cpp150
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.h297
-rw-r--r--src/corelib/concurrent/qtconcurrentrunbase.h134
-rw-r--r--src/corelib/concurrent/qtconcurrentstoredfunctioncall.h1328
-rw-r--r--src/corelib/concurrent/qtconcurrentthreadengine.cpp219
-rw-r--r--src/corelib/concurrent/qtconcurrentthreadengine.h306
-rw-r--r--src/corelib/concurrent/qthreadpool.cpp614
-rw-r--r--src/corelib/concurrent/qthreadpool.h95
-rw-r--r--src/corelib/concurrent/qthreadpool_p.h107
-rw-r--r--src/corelib/corelib.pro28
-rw-r--r--src/corelib/global/global.pri21
-rw-r--r--src/corelib/global/qconfig-dist.h50
-rw-r--r--src/corelib/global/qconfig-large.h173
-rw-r--r--src/corelib/global/qconfig-medium.h294
-rw-r--r--src/corelib/global/qconfig-minimal.h603
-rw-r--r--src/corelib/global/qconfig-small.h332
-rw-r--r--src/corelib/global/qendian.h347
-rw-r--r--src/corelib/global/qfeatures.h843
-rw-r--r--src/corelib/global/qfeatures.txt1407
-rw-r--r--src/corelib/global/qglobal.cpp2969
-rw-r--r--src/corelib/global/qglobal.h2371
-rw-r--r--src/corelib/global/qlibraryinfo.cpp584
-rw-r--r--src/corelib/global/qlibraryinfo.h89
-rw-r--r--src/corelib/global/qmalloc.cpp68
-rw-r--r--src/corelib/global/qnamespace.h1625
-rw-r--r--src/corelib/global/qnumeric.cpp58
-rw-r--r--src/corelib/global/qnumeric.h71
-rw-r--r--src/corelib/global/qnumeric_p.h243
-rw-r--r--src/corelib/global/qt_pch.h67
-rw-r--r--src/corelib/global/qt_windows.h113
-rw-r--r--src/corelib/io/io.pri82
-rw-r--r--src/corelib/io/qabstractfileengine.cpp1219
-rw-r--r--src/corelib/io/qabstractfileengine.h247
-rw-r--r--src/corelib/io/qabstractfileengine_p.h79
-rw-r--r--src/corelib/io/qbuffer.cpp475
-rw-r--r--src/corelib/io/qbuffer.h112
-rw-r--r--src/corelib/io/qdatastream.cpp1260
-rw-r--r--src/corelib/io/qdatastream.h428
-rw-r--r--src/corelib/io/qdebug.cpp308
-rw-r--r--src/corelib/io/qdebug.h262
-rw-r--r--src/corelib/io/qdir.cpp2472
-rw-r--r--src/corelib/io/qdir.h264
-rw-r--r--src/corelib/io/qdiriterator.cpp559
-rw-r--r--src/corelib/io/qdiriterator.h97
-rw-r--r--src/corelib/io/qfile.cpp1638
-rw-r--r--src/corelib/io/qfile.h204
-rw-r--r--src/corelib/io/qfile_p.h95
-rw-r--r--src/corelib/io/qfileinfo.cpp1427
-rw-r--r--src/corelib/io/qfileinfo.h187
-rw-r--r--src/corelib/io/qfileinfo_p.h145
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp620
-rw-r--r--src/corelib/io/qfilesystemwatcher.h89
-rw-r--r--src/corelib/io/qfilesystemwatcher_dnotify.cpp461
-rw-r--r--src/corelib/io/qfilesystemwatcher_dnotify_p.h131
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp376
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify_p.h95
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue.cpp334
-rw-r--r--src/corelib/io/qfilesystemwatcher_kqueue_p.h95
-rw-r--r--src/corelib/io/qfilesystemwatcher_p.h120
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp333
-rw-r--r--src/corelib/io/qfilesystemwatcher_win_p.h143
-rw-r--r--src/corelib/io/qfsfileengine.cpp873
-rw-r--r--src/corelib/io/qfsfileengine.h121
-rw-r--r--src/corelib/io/qfsfileengine_iterator.cpp82
-rw-r--r--src/corelib/io/qfsfileengine_iterator_p.h92
-rw-r--r--src/corelib/io/qfsfileengine_iterator_unix.cpp140
-rw-r--r--src/corelib/io/qfsfileengine_iterator_win.cpp183
-rw-r--r--src/corelib/io/qfsfileengine_p.h174
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp1021
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2242
-rw-r--r--src/corelib/io/qiodevice.cpp1748
-rw-r--r--src/corelib/io/qiodevice.h253
-rw-r--r--src/corelib/io/qiodevice_p.h109
-rw-r--r--src/corelib/io/qprocess.cpp1918
-rw-r--r--src/corelib/io/qprocess.h207
-rw-r--r--src/corelib/io/qprocess_p.h230
-rw-r--r--src/corelib/io/qprocess_unix.cpp1386
-rw-r--r--src/corelib/io/qprocess_win.cpp934
-rw-r--r--src/corelib/io/qresource.cpp1460
-rw-r--r--src/corelib/io/qresource.h104
-rw-r--r--src/corelib/io/qresource_iterator.cpp92
-rw-r--r--src/corelib/io/qresource_iterator_p.h80
-rw-r--r--src/corelib/io/qresource_p.h119
-rw-r--r--src/corelib/io/qsettings.cpp3822
-rw-r--r--src/corelib/io/qsettings.h313
-rw-r--r--src/corelib/io/qsettings_mac.cpp654
-rw-r--r--src/corelib/io/qsettings_p.h313
-rw-r--r--src/corelib/io/qsettings_win.cpp962
-rw-r--r--src/corelib/io/qtemporaryfile.cpp706
-rw-r--r--src/corelib/io/qtemporaryfile.h108
-rw-r--r--src/corelib/io/qtextstream.cpp3387
-rw-r--r--src/corelib/io/qtextstream.h375
-rw-r--r--src/corelib/io/qurl.cpp5999
-rw-r--r--src/corelib/io/qurl.h281
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp170
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h161
-rw-r--r--src/corelib/kernel/kernel.pri111
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp461
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.h107
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher_p.h77
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp2783
-rw-r--r--src/corelib/kernel/qabstractitemmodel.h390
-rw-r--r--src/corelib/kernel/qabstractitemmodel_p.h150
-rw-r--r--src/corelib/kernel/qbasictimer.cpp138
-rw-r--r--src/corelib/kernel/qbasictimer.h74
-rw-r--r--src/corelib/kernel/qcore_mac.cpp82
-rw-r--r--src/corelib/kernel/qcore_mac_p.h155
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2406
-rw-r--r--src/corelib/kernel/qcoreapplication.h279
-rw-r--r--src/corelib/kernel/qcoreapplication_mac.cpp66
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h126
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp1042
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h171
-rw-r--r--src/corelib/kernel/qcoreevent.cpp599
-rw-r--r--src/corelib/kernel/qcoreevent.h363
-rw-r--r--src/corelib/kernel/qcoreglobaldata.cpp55
-rw-r--r--src/corelib/kernel/qcoreglobaldata_p.h72
-rw-r--r--src/corelib/kernel/qcrashhandler.cpp420
-rw-r--r--src/corelib/kernel/qcrashhandler_p.h81
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp501
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h115
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp957
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h246
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp1076
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h109
-rw-r--r--src/corelib/kernel/qeventloop.cpp323
-rw-r--r--src/corelib/kernel/qeventloop.h101
-rw-r--r--src/corelib/kernel/qfunctions_p.h75
-rw-r--r--src/corelib/kernel/qfunctions_wince.cpp453
-rw-r--r--src/corelib/kernel/qfunctions_wince.h396
-rw-r--r--src/corelib/kernel/qmath.h139
-rw-r--r--src/corelib/kernel/qmetaobject.cpp2555
-rw-r--r--src/corelib/kernel/qmetaobject.h233
-rw-r--r--src/corelib/kernel/qmetaobject_p.h208
-rw-r--r--src/corelib/kernel/qmetatype.cpp1355
-rw-r--r--src/corelib/kernel/qmetatype.h351
-rw-r--r--src/corelib/kernel/qmimedata.cpp627
-rw-r--r--src/corelib/kernel/qmimedata.h104
-rw-r--r--src/corelib/kernel/qobject.cpp3818
-rw-r--r--src/corelib/kernel/qobject.h480
-rw-r--r--src/corelib/kernel/qobject_p.h225
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.cpp148
-rw-r--r--src/corelib/kernel/qobjectcleanuphandler.h78
-rw-r--r--src/corelib/kernel/qobjectdefs.h465
-rw-r--r--src/corelib/kernel/qpointer.cpp260
-rw-r--r--src/corelib/kernel/qpointer.h168
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp541
-rw-r--r--src/corelib/kernel/qsharedmemory.h119
-rw-r--r--src/corelib/kernel/qsharedmemory_p.h169
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp305
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp208
-rw-r--r--src/corelib/kernel/qsignalmapper.cpp321
-rw-r--r--src/corelib/kernel/qsignalmapper.h100
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp322
-rw-r--r--src/corelib/kernel/qsocketnotifier.h93
-rw-r--r--src/corelib/kernel/qsystemsemaphore.cpp360
-rw-r--r--src/corelib/kernel/qsystemsemaphore.h102
-rw-r--r--src/corelib/kernel/qsystemsemaphore_p.h109
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp242
-rw-r--r--src/corelib/kernel/qsystemsemaphore_win.cpp140
-rw-r--r--src/corelib/kernel/qtimer.cpp372
-rw-r--r--src/corelib/kernel/qtimer.h116
-rw-r--r--src/corelib/kernel/qtranslator.cpp827
-rw-r--r--src/corelib/kernel/qtranslator.h98
-rw-r--r--src/corelib/kernel/qtranslator_p.h78
-rw-r--r--src/corelib/kernel/qvariant.cpp3098
-rw-r--r--src/corelib/kernel/qvariant.h605
-rw-r--r--src/corelib/kernel/qvariant_p.h124
-rw-r--r--src/corelib/kernel/qwineventnotifier_p.cpp136
-rw-r--r--src/corelib/kernel/qwineventnotifier_p.h94
-rw-r--r--src/corelib/plugin/plugin.pri24
-rw-r--r--src/corelib/plugin/qfactoryinterface.h67
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp256
-rw-r--r--src/corelib/plugin/qfactoryloader_p.h89
-rw-r--r--src/corelib/plugin/qlibrary.cpp1130
-rw-r--r--src/corelib/plugin/qlibrary.h120
-rw-r--r--src/corelib/plugin/qlibrary_p.h122
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp266
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp147
-rw-r--r--src/corelib/plugin/qplugin.h141
-rw-r--r--src/corelib/plugin/qpluginloader.cpp371
-rw-r--r--src/corelib/plugin/qpluginloader.h100
-rw-r--r--src/corelib/plugin/quuid.cpp624
-rw-r--r--src/corelib/plugin/quuid.h190
-rw-r--r--src/corelib/thread/qatomic.cpp1127
-rw-r--r--src/corelib/thread/qatomic.h227
-rw-r--r--src/corelib/thread/qbasicatomic.h210
-rw-r--r--src/corelib/thread/qmutex.cpp515
-rw-r--r--src/corelib/thread/qmutex.h193
-rw-r--r--src/corelib/thread/qmutex_p.h88
-rw-r--r--src/corelib/thread/qmutex_unix.cpp113
-rw-r--r--src/corelib/thread/qmutex_win.cpp81
-rw-r--r--src/corelib/thread/qmutexpool.cpp165
-rw-r--r--src/corelib/thread/qmutexpool_p.h85
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h119
-rw-r--r--src/corelib/thread/qreadwritelock.cpp584
-rw-r--r--src/corelib/thread/qreadwritelock.h244
-rw-r--r--src/corelib/thread/qreadwritelock_p.h87
-rw-r--r--src/corelib/thread/qsemaphore.cpp235
-rw-r--r--src/corelib/thread/qsemaphore.h83
-rw-r--r--src/corelib/thread/qthread.cpp730
-rw-r--r--src/corelib/thread/qthread.h163
-rw-r--r--src/corelib/thread/qthread_p.h215
-rw-r--r--src/corelib/thread/qthread_unix.cpp562
-rw-r--r--src/corelib/thread/qthread_win.cpp620
-rw-r--r--src/corelib/thread/qthreadstorage.cpp320
-rw-r--r--src/corelib/thread/qthreadstorage.h157
-rw-r--r--src/corelib/thread/qwaitcondition.h105
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp193
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp237
-rw-r--r--src/corelib/thread/thread.pri33
-rw-r--r--src/corelib/tools/qalgorithms.h565
-rw-r--r--src/corelib/tools/qbitarray.cpp728
-rw-r--r--src/corelib/tools/qbitarray.h174
-rw-r--r--src/corelib/tools/qbytearray.cpp4240
-rw-r--r--src/corelib/tools/qbytearray.h589
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp323
-rw-r--r--src/corelib/tools/qbytearraymatcher.h93
-rw-r--r--src/corelib/tools/qcache.h216
-rw-r--r--src/corelib/tools/qchar.cpp1618
-rw-r--r--src/corelib/tools/qchar.h397
-rw-r--r--src/corelib/tools/qcontainerfwd.h71
-rw-r--r--src/corelib/tools/qcryptographichash.cpp196
-rw-r--r--src/corelib/tools/qcryptographichash.h84
-rw-r--r--src/corelib/tools/qdatetime.cpp5506
-rw-r--r--src/corelib/tools/qdatetime.h333
-rw-r--r--src/corelib/tools/qdatetime_p.h285
-rw-r--r--src/corelib/tools/qdumper.cpp1157
-rw-r--r--src/corelib/tools/qharfbuzz.cpp169
-rw-r--r--src/corelib/tools/qharfbuzz_p.h77
-rw-r--r--src/corelib/tools/qhash.cpp1843
-rw-r--r--src/corelib/tools/qhash.h1017
-rw-r--r--src/corelib/tools/qiterator.h202
-rw-r--r--src/corelib/tools/qline.cpp867
-rw-r--r--src/corelib/tools/qline.h424
-rw-r--r--src/corelib/tools/qlinkedlist.cpp1158
-rw-r--r--src/corelib/tools/qlinkedlist.h504
-rw-r--r--src/corelib/tools/qlist.h691
-rw-r--r--src/corelib/tools/qlistdata.cpp1742
-rw-r--r--src/corelib/tools/qlocale.cpp7220
-rw-r--r--src/corelib/tools/qlocale.h678
-rw-r--r--src/corelib/tools/qlocale_data_p.h3391
-rw-r--r--src/corelib/tools/qlocale_p.h206
-rw-r--r--src/corelib/tools/qmap.cpp1588
-rw-r--r--src/corelib/tools/qmap.h1026
-rw-r--r--src/corelib/tools/qpair.h127
-rw-r--r--src/corelib/tools/qpodlist_p.h263
-rw-r--r--src/corelib/tools/qpoint.cpp665
-rw-r--r--src/corelib/tools/qpoint.h361
-rw-r--r--src/corelib/tools/qqueue.cpp129
-rw-r--r--src/corelib/tools/qqueue.h69
-rw-r--r--src/corelib/tools/qrect.cpp2471
-rw-r--r--src/corelib/tools/qrect.h858
-rw-r--r--src/corelib/tools/qregexp.cpp4070
-rw-r--r--src/corelib/tools/qregexp.h155
-rw-r--r--src/corelib/tools/qringbuffer_p.h319
-rw-r--r--src/corelib/tools/qset.h366
-rw-r--r--src/corelib/tools/qshareddata.cpp550
-rw-r--r--src/corelib/tools/qshareddata.h242
-rw-r--r--src/corelib/tools/qsharedpointer.cpp868
-rw-r--r--src/corelib/tools/qsharedpointer.h148
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h585
-rw-r--r--src/corelib/tools/qsize.cpp824
-rw-r--r--src/corelib/tools/qsize.h364
-rw-r--r--src/corelib/tools/qstack.cpp129
-rw-r--r--src/corelib/tools/qstack.h82
-rw-r--r--src/corelib/tools/qstring.cpp8083
-rw-r--r--src/corelib/tools/qstring.h1234
-rw-r--r--src/corelib/tools/qstringlist.cpp673
-rw-r--r--src/corelib/tools/qstringlist.h259
-rw-r--r--src/corelib/tools/qstringmatcher.cpp323
-rw-r--r--src/corelib/tools/qstringmatcher.h98
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp476
-rw-r--r--src/corelib/tools/qtextboundaryfinder.h114
-rw-r--r--src/corelib/tools/qtimeline.cpp773
-rw-r--r--src/corelib/tools/qtimeline.h142
-rw-r--r--src/corelib/tools/qtools_p.h65
-rw-r--r--src/corelib/tools/qunicodetables.cpp9404
-rw-r--r--src/corelib/tools/qunicodetables_p.h231
-rw-r--r--src/corelib/tools/qvarlengtharray.h238
-rw-r--r--src/corelib/tools/qvector.cpp968
-rw-r--r--src/corelib/tools/qvector.h776
-rw-r--r--src/corelib/tools/qvsnprintf.cpp133
-rw-r--r--src/corelib/tools/tools.pri104
-rw-r--r--src/corelib/xml/.gitignore1
-rwxr-xr-xsrc/corelib/xml/make-parser.sh13
-rw-r--r--src/corelib/xml/qxmlstream.cpp3849
-rw-r--r--src/corelib/xml/qxmlstream.g1846
-rw-r--r--src/corelib/xml/qxmlstream.h477
-rw-r--r--src/corelib/xml/qxmlstream_p.h1963
-rw-r--r--src/corelib/xml/qxmlutils.cpp390
-rw-r--r--src/corelib/xml/qxmlutils_p.h92
-rw-r--r--src/corelib/xml/xml.pri10
-rw-r--r--src/dbus/dbus.pro78
-rw-r--r--src/dbus/qdbus_symbols.cpp114
-rw-r--r--src/dbus/qdbus_symbols_p.h362
-rw-r--r--src/dbus/qdbusabstractadaptor.cpp380
-rw-r--r--src/dbus/qdbusabstractadaptor.h76
-rw-r--r--src/dbus/qdbusabstractadaptor_p.h135
-rw-r--r--src/dbus/qdbusabstractinterface.cpp729
-rw-r--r--src/dbus/qdbusabstractinterface.h146
-rw-r--r--src/dbus/qdbusabstractinterface_p.h97
-rw-r--r--src/dbus/qdbusargument.cpp1331
-rw-r--r--src/dbus/qdbusargument.h383
-rw-r--r--src/dbus/qdbusargument_p.h208
-rw-r--r--src/dbus/qdbusconnection.cpp1045
-rw-r--r--src/dbus/qdbusconnection.h178
-rw-r--r--src/dbus/qdbusconnection_p.h318
-rw-r--r--src/dbus/qdbusconnectioninterface.cpp403
-rw-r--r--src/dbus/qdbusconnectioninterface.h129
-rw-r--r--src/dbus/qdbuscontext.cpp204
-rw-r--r--src/dbus/qdbuscontext.h84
-rw-r--r--src/dbus/qdbuscontext_p.h78
-rw-r--r--src/dbus/qdbusdemarshaller.cpp342
-rw-r--r--src/dbus/qdbuserror.cpp349
-rw-r--r--src/dbus/qdbuserror.h119
-rw-r--r--src/dbus/qdbusextratypes.cpp239
-rw-r--r--src/dbus/qdbusextratypes.h187
-rw-r--r--src/dbus/qdbusintegrator.cpp2170
-rw-r--r--src/dbus/qdbusintegrator_p.h160
-rw-r--r--src/dbus/qdbusinterface.cpp232
-rw-r--r--src/dbus/qdbusinterface.h79
-rw-r--r--src/dbus/qdbusinterface_p.h79
-rw-r--r--src/dbus/qdbusinternalfilters.cpp394
-rw-r--r--src/dbus/qdbusintrospection.cpp425
-rw-r--r--src/dbus/qdbusintrospection_p.h180
-rw-r--r--src/dbus/qdbusmacros.h73
-rw-r--r--src/dbus/qdbusmarshaller.cpp547
-rw-r--r--src/dbus/qdbusmessage.cpp719
-rw-r--r--src/dbus/qdbusmessage.h128
-rw-r--r--src/dbus/qdbusmessage_p.h95
-rw-r--r--src/dbus/qdbusmetaobject.cpp679
-rw-r--r--src/dbus/qdbusmetaobject_p.h94
-rw-r--r--src/dbus/qdbusmetatype.cpp464
-rw-r--r--src/dbus/qdbusmetatype.h97
-rw-r--r--src/dbus/qdbusmetatype_p.h74
-rw-r--r--src/dbus/qdbusmisc.cpp150
-rw-r--r--src/dbus/qdbuspendingcall.cpp472
-rw-r--r--src/dbus/qdbuspendingcall.h119
-rw-r--r--src/dbus/qdbuspendingcall_p.h122
-rw-r--r--src/dbus/qdbuspendingreply.cpp277
-rw-r--r--src/dbus/qdbuspendingreply.h213
-rw-r--r--src/dbus/qdbusreply.cpp244
-rw-r--r--src/dbus/qdbusreply.h196
-rw-r--r--src/dbus/qdbusserver.cpp121
-rw-r--r--src/dbus/qdbusserver.h80
-rw-r--r--src/dbus/qdbusthread.cpp171
-rw-r--r--src/dbus/qdbusthreaddebug_p.h229
-rw-r--r--src/dbus/qdbusutil.cpp468
-rw-r--r--src/dbus/qdbusutil_p.h92
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp341
-rw-r--r--src/dbus/qdbusxmlparser.cpp369
-rw-r--r--src/dbus/qdbusxmlparser_p.h85
-rw-r--r--src/gui/QtGui.dynlist8
-rw-r--r--src/gui/accessible/accessible.pri24
-rw-r--r--src/gui/accessible/qaccessible.cpp1079
-rw-r--r--src/gui/accessible/qaccessible.h417
-rw-r--r--src/gui/accessible/qaccessible2.cpp181
-rw-r--r--src/gui/accessible/qaccessible2.h217
-rw-r--r--src/gui/accessible/qaccessible_mac.mm2608
-rw-r--r--src/gui/accessible/qaccessible_mac_carbon.cpp119
-rw-r--r--src/gui/accessible/qaccessible_mac_cocoa.mm0
-rw-r--r--src/gui/accessible/qaccessible_mac_p.h479
-rw-r--r--src/gui/accessible/qaccessible_unix.cpp134
-rw-r--r--src/gui/accessible/qaccessible_win.cpp1219
-rw-r--r--src/gui/accessible/qaccessiblebridge.cpp158
-rw-r--r--src/gui/accessible/qaccessiblebridge.h92
-rw-r--r--src/gui/accessible/qaccessibleobject.cpp410
-rw-r--r--src/gui/accessible/qaccessibleobject.h140
-rw-r--r--src/gui/accessible/qaccessibleplugin.cpp107
-rw-r--r--src/gui/accessible/qaccessibleplugin.h87
-rw-r--r--src/gui/accessible/qaccessiblewidget.cpp1041
-rw-r--r--src/gui/accessible/qaccessiblewidget.h141
-rw-r--r--src/gui/dialogs/dialogs.pri97
-rw-r--r--src/gui/dialogs/images/fit-page-24.pngbin0 -> 985 bytes-rw-r--r--src/gui/dialogs/images/fit-page-32.pngbin0 -> 1330 bytes-rw-r--r--src/gui/dialogs/images/fit-width-24.pngbin0 -> 706 bytes-rw-r--r--src/gui/dialogs/images/fit-width-32.pngbin0 -> 1004 bytes-rw-r--r--src/gui/dialogs/images/go-first-24.pngbin0 -> 796 bytes-rw-r--r--src/gui/dialogs/images/go-first-32.pngbin0 -> 985 bytes-rw-r--r--src/gui/dialogs/images/go-last-24.pngbin0 -> 792 bytes-rw-r--r--src/gui/dialogs/images/go-last-32.pngbin0 -> 984 bytes-rw-r--r--src/gui/dialogs/images/go-next-24.pngbin0 -> 782 bytes-rw-r--r--src/gui/dialogs/images/go-next-32.pngbin0 -> 948 bytes-rw-r--r--src/gui/dialogs/images/go-previous-24.pngbin0 -> 797 bytes-rw-r--r--src/gui/dialogs/images/go-previous-32.pngbin0 -> 945 bytes-rw-r--r--src/gui/dialogs/images/layout-landscape-24.pngbin0 -> 820 bytes-rw-r--r--src/gui/dialogs/images/layout-landscape-32.pngbin0 -> 1353 bytes-rw-r--r--src/gui/dialogs/images/layout-portrait-24.pngbin0 -> 817 bytes-rw-r--r--src/gui/dialogs/images/layout-portrait-32.pngbin0 -> 1330 bytes-rw-r--r--src/gui/dialogs/images/page-setup-24.pngbin0 -> 620 bytes-rw-r--r--src/gui/dialogs/images/page-setup-32.pngbin0 -> 1154 bytes-rw-r--r--src/gui/dialogs/images/print-24.pngbin0 -> 914 bytes-rw-r--r--src/gui/dialogs/images/print-32.pngbin0 -> 1202 bytes-rw-r--r--src/gui/dialogs/images/qtlogo-64.pngbin0 -> 2991 bytes-rw-r--r--src/gui/dialogs/images/status-color.pngbin0 -> 1475 bytes-rw-r--r--src/gui/dialogs/images/status-gray-scale.pngbin0 -> 1254 bytes-rw-r--r--src/gui/dialogs/images/view-page-multi-24.pngbin0 -> 390 bytes-rw-r--r--src/gui/dialogs/images/view-page-multi-32.pngbin0 -> 556 bytes-rw-r--r--src/gui/dialogs/images/view-page-one-24.pngbin0 -> 662 bytes-rw-r--r--src/gui/dialogs/images/view-page-one-32.pngbin0 -> 810 bytes-rw-r--r--src/gui/dialogs/images/view-page-sided-24.pngbin0 -> 700 bytes-rw-r--r--src/gui/dialogs/images/view-page-sided-32.pngbin0 -> 908 bytes-rw-r--r--src/gui/dialogs/images/zoom-in-24.pngbin0 -> 1302 bytes-rw-r--r--src/gui/dialogs/images/zoom-in-32.pngbin0 -> 1873 bytes-rw-r--r--src/gui/dialogs/images/zoom-out-24.pngbin0 -> 1247 bytes-rw-r--r--src/gui/dialogs/images/zoom-out-32.pngbin0 -> 1749 bytes-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog.cpp139
-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog.h82
-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog_p.h88
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp500
-rw-r--r--src/gui/dialogs/qabstractprintdialog.h127
-rw-r--r--src/gui/dialogs/qabstractprintdialog_p.h95
-rw-r--r--src/gui/dialogs/qcolordialog.cpp1903
-rw-r--r--src/gui/dialogs/qcolordialog.h150
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm426
-rw-r--r--src/gui/dialogs/qcolordialog_p.h144
-rw-r--r--src/gui/dialogs/qdialog.cpp1159
-rw-r--r--src/gui/dialogs/qdialog.h136
-rw-r--r--src/gui/dialogs/qdialog_p.h113
-rw-r--r--src/gui/dialogs/qdialogsbinarycompat_win.cpp137
-rw-r--r--src/gui/dialogs/qerrormessage.cpp403
-rw-r--r--src/gui/dialogs/qerrormessage.h88
-rw-r--r--src/gui/dialogs/qfiledialog.cpp3299
-rw-r--r--src/gui/dialogs/qfiledialog.h330
-rw-r--r--src/gui/dialogs/qfiledialog.ui320
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm1113
-rw-r--r--src/gui/dialogs/qfiledialog_p.h458
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp821
-rw-r--r--src/gui/dialogs/qfiledialog_wince.ui342
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp365
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h210
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp1911
-rw-r--r--src/gui/dialogs/qfilesystemmodel.h179
-rw-r--r--src/gui/dialogs/qfilesystemmodel_p.h305
-rw-r--r--src/gui/dialogs/qfontdialog.cpp1070
-rw-r--r--src/gui/dialogs/qfontdialog.h144
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm625
-rw-r--r--src/gui/dialogs/qfontdialog_p.h164
-rw-r--r--src/gui/dialogs/qinputdialog.cpp1429
-rw-r--r--src/gui/dialogs/qinputdialog.h237
-rw-r--r--src/gui/dialogs/qmessagebox.cpp2688
-rw-r--r--src/gui/dialogs/qmessagebox.h363
-rw-r--r--src/gui/dialogs/qmessagebox.qrc5
-rw-r--r--src/gui/dialogs/qnspanelproxy_mac.mm246
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp185
-rw-r--r--src/gui/dialogs/qpagesetupdialog.h112
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm313
-rw-r--r--src/gui/dialogs/qpagesetupdialog_unix.cpp620
-rw-r--r--src/gui/dialogs/qpagesetupdialog_unix_p.h105
-rw-r--r--src/gui/dialogs/qpagesetupdialog_win.cpp169
-rw-r--r--src/gui/dialogs/qpagesetupwidget.ui353
-rw-r--r--src/gui/dialogs/qprintdialog.h174
-rw-r--r--src/gui/dialogs/qprintdialog.qrc38
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm428
-rw-r--r--src/gui/dialogs/qprintdialog_qws.cpp556
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp1266
-rw-r--r--src/gui/dialogs/qprintdialog_win.cpp318
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp793
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.h107
-rw-r--r--src/gui/dialogs/qprintpropertieswidget.ui70
-rw-r--r--src/gui/dialogs/qprintsettingsoutput.ui371
-rw-r--r--src/gui/dialogs/qprintwidget.ui116
-rw-r--r--src/gui/dialogs/qprogressdialog.cpp865
-rw-r--r--src/gui/dialogs/qprogressdialog.h145
-rw-r--r--src/gui/dialogs/qsidebar.cpp485
-rw-r--r--src/gui/dialogs/qsidebar_p.h147
-rw-r--r--src/gui/dialogs/qwizard.cpp3765
-rw-r--r--src/gui/dialogs/qwizard.h262
-rw-r--r--src/gui/dialogs/qwizard_win.cpp739
-rw-r--r--src/gui/dialogs/qwizard_win_p.h148
-rw-r--r--src/gui/embedded/embedded.pri226
-rw-r--r--src/gui/embedded/qcopchannel_qws.cpp608
-rw-r--r--src/gui/embedded/qcopchannel_qws.h108
-rw-r--r--src/gui/embedded/qdecoration_qws.cpp404
-rw-r--r--src/gui/embedded/qdecoration_qws.h124
-rw-r--r--src/gui/embedded/qdecorationdefault_qws.cpp803
-rw-r--r--src/gui/embedded/qdecorationdefault_qws.h101
-rw-r--r--src/gui/embedded/qdecorationfactory_qws.cpp156
-rw-r--r--src/gui/embedded/qdecorationfactory_qws.h66
-rw-r--r--src/gui/embedded/qdecorationplugin_qws.cpp116
-rw-r--r--src/gui/embedded/qdecorationplugin_qws.h80
-rw-r--r--src/gui/embedded/qdecorationstyled_qws.cpp313
-rw-r--r--src/gui/embedded/qdecorationstyled_qws.h73
-rw-r--r--src/gui/embedded/qdecorationwindows_qws.cpp407
-rw-r--r--src/gui/embedded/qdecorationwindows_qws.h77
-rw-r--r--src/gui/embedded/qdirectpainter_qws.cpp682
-rw-r--r--src/gui/embedded/qdirectpainter_qws.h112
-rw-r--r--src/gui/embedded/qkbd_qws.cpp248
-rw-r--r--src/gui/embedded/qkbd_qws.h81
-rw-r--r--src/gui/embedded/qkbddriverfactory_qws.cpp193
-rw-r--r--src/gui/embedded/qkbddriverfactory_qws.h70
-rw-r--r--src/gui/embedded/qkbddriverplugin_qws.cpp124
-rw-r--r--src/gui/embedded/qkbddriverplugin_qws.h84
-rw-r--r--src/gui/embedded/qkbdpc101_qws.cpp485
-rw-r--r--src/gui/embedded/qkbdpc101_qws.h95
-rw-r--r--src/gui/embedded/qkbdsl5000_qws.cpp356
-rw-r--r--src/gui/embedded/qkbdsl5000_qws.h79
-rw-r--r--src/gui/embedded/qkbdtty_qws.cpp263
-rw-r--r--src/gui/embedded/qkbdtty_qws.h81
-rw-r--r--src/gui/embedded/qkbdum_qws.cpp143
-rw-r--r--src/gui/embedded/qkbdum_qws.h77
-rw-r--r--src/gui/embedded/qkbdusb_qws.cpp401
-rw-r--r--src/gui/embedded/qkbdusb_qws.h77
-rw-r--r--src/gui/embedded/qkbdvfb_qws.cpp123
-rw-r--r--src/gui/embedded/qkbdvfb_qws.h86
-rw-r--r--src/gui/embedded/qkbdvr41xx_qws.cpp185
-rw-r--r--src/gui/embedded/qkbdvr41xx_qws.h73
-rw-r--r--src/gui/embedded/qkbdyopy_qws.cpp209
-rw-r--r--src/gui/embedded/qkbdyopy_qws.h73
-rw-r--r--src/gui/embedded/qlock.cpp318
-rw-r--r--src/gui/embedded/qlock_p.h100
-rw-r--r--src/gui/embedded/qmouse_qws.cpp653
-rw-r--r--src/gui/embedded/qmouse_qws.h123
-rw-r--r--src/gui/embedded/qmousebus_qws.cpp238
-rw-r--r--src/gui/embedded/qmousebus_qws.h76
-rw-r--r--src/gui/embedded/qmousedriverfactory_qws.cpp195
-rw-r--r--src/gui/embedded/qmousedriverfactory_qws.h67
-rw-r--r--src/gui/embedded/qmousedriverplugin_qws.cpp124
-rw-r--r--src/gui/embedded/qmousedriverplugin_qws.h84
-rw-r--r--src/gui/embedded/qmouselinuxtp_qws.cpp334
-rw-r--r--src/gui/embedded/qmouselinuxtp_qws.h77
-rw-r--r--src/gui/embedded/qmousepc_qws.cpp793
-rw-r--r--src/gui/embedded/qmousepc_qws.h76
-rw-r--r--src/gui/embedded/qmousetslib_qws.cpp371
-rw-r--r--src/gui/embedded/qmousetslib_qws.h80
-rw-r--r--src/gui/embedded/qmousevfb_qws.cpp132
-rw-r--r--src/gui/embedded/qmousevfb_qws.h83
-rw-r--r--src/gui/embedded/qmousevr41xx_qws.cpp250
-rw-r--r--src/gui/embedded/qmousevr41xx_qws.h80
-rw-r--r--src/gui/embedded/qmouseyopy_qws.cpp184
-rw-r--r--src/gui/embedded/qmouseyopy_qws.h80
-rw-r--r--src/gui/embedded/qscreen_qws.cpp3317
-rw-r--r--src/gui/embedded/qscreen_qws.h387
-rw-r--r--src/gui/embedded/qscreendriverfactory_qws.cpp183
-rw-r--r--src/gui/embedded/qscreendriverfactory_qws.h67
-rw-r--r--src/gui/embedded/qscreendriverplugin_qws.cpp123
-rw-r--r--src/gui/embedded/qscreendriverplugin_qws.h84
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp1324
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.h129
-rw-r--r--src/gui/embedded/qscreenmulti_qws.cpp482
-rw-r--r--src/gui/embedded/qscreenmulti_qws_p.h114
-rw-r--r--src/gui/embedded/qscreenproxy_qws.cpp631
-rw-r--r--src/gui/embedded/qscreenproxy_qws.h153
-rw-r--r--src/gui/embedded/qscreentransformed_qws.cpp734
-rw-r--r--src/gui/embedded/qscreentransformed_qws.h103
-rw-r--r--src/gui/embedded/qscreenvfb_qws.cpp444
-rw-r--r--src/gui/embedded/qscreenvfb_qws.h86
-rw-r--r--src/gui/embedded/qsoundqss_qws.cpp1498
-rw-r--r--src/gui/embedded/qsoundqss_qws.h177
-rw-r--r--src/gui/embedded/qtransportauth_qws.cpp1562
-rw-r--r--src/gui/embedded/qtransportauth_qws.h281
-rw-r--r--src/gui/embedded/qtransportauth_qws_p.h189
-rw-r--r--src/gui/embedded/qtransportauthdefs_qws.h174
-rw-r--r--src/gui/embedded/qunixsocket.cpp1794
-rw-r--r--src/gui/embedded/qunixsocket_p.h202
-rw-r--r--src/gui/embedded/qunixsocketserver.cpp376
-rw-r--r--src/gui/embedded/qunixsocketserver_p.h98
-rw-r--r--src/gui/embedded/qvfbhdr.h89
-rw-r--r--src/gui/embedded/qwindowsystem_p.h315
-rw-r--r--src/gui/embedded/qwindowsystem_qws.cpp4947
-rw-r--r--src/gui/embedded/qwindowsystem_qws.h508
-rw-r--r--src/gui/embedded/qwscommand_qws.cpp610
-rw-r--r--src/gui/embedded/qwscommand_qws_p.h853
-rw-r--r--src/gui/embedded/qwscursor_qws.cpp654
-rw-r--r--src/gui/embedded/qwscursor_qws.h83
-rw-r--r--src/gui/embedded/qwsdisplay_qws.h185
-rw-r--r--src/gui/embedded/qwsdisplay_qws_p.h161
-rw-r--r--src/gui/embedded/qwsembedwidget.cpp227
-rw-r--r--src/gui/embedded/qwsembedwidget.h82
-rw-r--r--src/gui/embedded/qwsevent_qws.cpp216
-rw-r--r--src/gui/embedded/qwsevent_qws.h459
-rw-r--r--src/gui/embedded/qwslock.cpp243
-rw-r--r--src/gui/embedded/qwslock_p.h85
-rw-r--r--src/gui/embedded/qwsmanager_p.h122
-rw-r--r--src/gui/embedded/qwsmanager_qws.cpp535
-rw-r--r--src/gui/embedded/qwsmanager_qws.h122
-rw-r--r--src/gui/embedded/qwsproperty_qws.cpp145
-rw-r--r--src/gui/embedded/qwsproperty_qws.h96
-rw-r--r--src/gui/embedded/qwsprotocolitem_qws.h100
-rw-r--r--src/gui/embedded/qwssharedmemory.cpp185
-rw-r--r--src/gui/embedded/qwssharedmemory_p.h105
-rw-r--r--src/gui/embedded/qwssignalhandler.cpp134
-rw-r--r--src/gui/embedded/qwssignalhandler_p.h99
-rw-r--r--src/gui/embedded/qwssocket_qws.cpp280
-rw-r--r--src/gui/embedded/qwssocket_qws.h120
-rw-r--r--src/gui/embedded/qwsutils_qws.h98
-rw-r--r--src/gui/graphicsview/graphicsview.pri46
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp651
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.h143
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp8917
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h1016
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h287
-rw-r--r--src/gui/graphicsview/qgraphicsitemanimation.cpp599
-rw-r--r--src/gui/graphicsview/qgraphicsitemanimation.h120
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp423
-rw-r--r--src/gui/graphicsview/qgraphicslayout.h95
-rw-r--r--src/gui/graphicsview/qgraphicslayout_p.cpp198
-rw-r--r--src/gui/graphicsview/qgraphicslayout_p.h103
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp852
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.h152
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem_p.h91
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp547
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.h121
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.cpp1494
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.h145
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget_p.h125
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5377
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h301
-rw-r--r--src/gui/graphicsview/qgraphicsscene_bsp.cpp328
-rw-r--r--src/gui/graphicsview/qgraphicsscene_bsp_p.h137
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h268
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp1678
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.h311
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp3871
-rw-r--r--src/gui/graphicsview/qgraphicsview.h314
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h191
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp2273
-rw-r--r--src/gui/graphicsview/qgraphicswidget.h249
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp740
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.h232
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp1542
-rw-r--r--src/gui/graphicsview/qgridlayoutengine_p.h449
-rw-r--r--src/gui/gui.pro45
-rw-r--r--src/gui/image/image.pri108
-rw-r--r--src/gui/image/qbitmap.cpp403
-rw-r--r--src/gui/image/qbitmap.h106
-rw-r--r--src/gui/image/qbmphandler.cpp833
-rw-r--r--src/gui/image/qbmphandler_p.h117
-rw-r--r--src/gui/image/qicon.cpp1128
-rw-r--r--src/gui/image/qicon.h144
-rw-r--r--src/gui/image/qiconengine.cpp304
-rw-r--r--src/gui/image/qiconengine.h101
-rw-r--r--src/gui/image/qiconengineplugin.cpp171
-rw-r--r--src/gui/image/qiconengineplugin.h104
-rw-r--r--src/gui/image/qimage.cpp6119
-rw-r--r--src/gui/image/qimage.h352
-rw-r--r--src/gui/image/qimage_p.h110
-rw-r--r--src/gui/image/qimageiohandler.cpp571
-rw-r--r--src/gui/image/qimageiohandler.h151
-rw-r--r--src/gui/image/qimagereader.cpp1376
-rw-r--r--src/gui/image/qimagereader.h144
-rw-r--r--src/gui/image/qimagewriter.cpp690
-rw-r--r--src/gui/image/qimagewriter.h116
-rw-r--r--src/gui/image/qmovie.cpp1081
-rw-r--r--src/gui/image/qmovie.h177
-rw-r--r--src/gui/image/qnativeimage.cpp279
-rw-r--r--src/gui/image/qnativeimage_p.h110
-rw-r--r--src/gui/image/qpaintengine_pic.cpp519
-rw-r--r--src/gui/image/qpaintengine_pic_p.h120
-rw-r--r--src/gui/image/qpicture.cpp1968
-rw-r--r--src/gui/image/qpicture.h196
-rw-r--r--src/gui/image/qpicture_p.h170
-rw-r--r--src/gui/image/qpictureformatplugin.cpp139
-rw-r--r--src/gui/image/qpictureformatplugin.h94
-rw-r--r--src/gui/image/qpixmap.cpp2053
-rw-r--r--src/gui/image/qpixmap.h312
-rw-r--r--src/gui/image/qpixmap_mac.cpp1339
-rw-r--r--src/gui/image/qpixmap_mac_p.h137
-rw-r--r--src/gui/image/qpixmap_qws.cpp164
-rw-r--r--src/gui/image/qpixmap_raster.cpp360
-rw-r--r--src/gui/image/qpixmap_raster_p.h106
-rw-r--r--src/gui/image/qpixmap_win.cpp481
-rw-r--r--src/gui/image/qpixmap_x11.cpp2301
-rw-r--r--src/gui/image/qpixmap_x11_p.h132
-rw-r--r--src/gui/image/qpixmapcache.cpp320
-rw-r--r--src/gui/image/qpixmapcache.h69
-rw-r--r--src/gui/image/qpixmapdata.cpp187
-rw-r--r--src/gui/image/qpixmapdata_p.h141
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp105
-rw-r--r--src/gui/image/qpixmapdatafactory_p.h81
-rw-r--r--src/gui/image/qpixmapfilter.cpp849
-rw-r--r--src/gui/image/qpixmapfilter_p.h165
-rw-r--r--src/gui/image/qpnghandler.cpp973
-rw-r--r--src/gui/image/qpnghandler_p.h88
-rw-r--r--src/gui/image/qppmhandler.cpp531
-rw-r--r--src/gui/image/qppmhandler_p.h98
-rw-r--r--src/gui/image/qxbmhandler.cpp350
-rw-r--r--src/gui/image/qxbmhandler_p.h95
-rw-r--r--src/gui/image/qxpmhandler.cpp1309
-rw-r--r--src/gui/image/qxpmhandler_p.h100
-rw-r--r--src/gui/inputmethod/inputmethod.pri26
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp464
-rw-r--r--src/gui/inputmethod/qinputcontext.h134
-rw-r--r--src/gui/inputmethod/qinputcontext_p.h98
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.cpp287
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.h88
-rw-r--r--src/gui/inputmethod/qinputcontextplugin.cpp178
-rw-r--r--src/gui/inputmethod/qinputcontextplugin.h106
-rw-r--r--src/gui/inputmethod/qmacinputcontext_mac.cpp349
-rw-r--r--src/gui/inputmethod/qmacinputcontext_p.h92
-rw-r--r--src/gui/inputmethod/qwininputcontext_p.h96
-rw-r--r--src/gui/inputmethod/qwininputcontext_win.cpp861
-rw-r--r--src/gui/inputmethod/qwsinputcontext_p.h96
-rw-r--r--src/gui/inputmethod/qwsinputcontext_qws.cpp239
-rw-r--r--src/gui/inputmethod/qximinputcontext_p.h141
-rw-r--r--src/gui/inputmethod/qximinputcontext_x11.cpp832
-rw-r--r--src/gui/itemviews/itemviews.pri70
-rw-r--r--src/gui/itemviews/qabstractitemdelegate.cpp387
-rw-r--r--src/gui/itemviews/qabstractitemdelegate.h134
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3918
-rw-r--r--src/gui/itemviews/qabstractitemview.h370
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h410
-rw-r--r--src/gui/itemviews/qabstractproxymodel.cpp282
-rw-r--r--src/gui/itemviews/qabstractproxymodel.h101
-rw-r--r--src/gui/itemviews/qabstractproxymodel_p.h76
-rw-r--r--src/gui/itemviews/qbsptree.cpp145
-rw-r--r--src/gui/itemviews/qbsptree_p.h119
-rw-r--r--src/gui/itemviews/qcolumnview.cpp1128
-rw-r--r--src/gui/itemviews/qcolumnview.h125
-rw-r--r--src/gui/itemviews/qcolumnview_p.h184
-rw-r--r--src/gui/itemviews/qcolumnviewgrip.cpp194
-rw-r--r--src/gui/itemviews/qcolumnviewgrip_p.h104
-rw-r--r--src/gui/itemviews/qdatawidgetmapper.cpp849
-rw-r--r--src/gui/itemviews/qdatawidgetmapper.h128
-rw-r--r--src/gui/itemviews/qdirmodel.cpp1410
-rw-r--r--src/gui/itemviews/qdirmodel.h160
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp449
-rw-r--r--src/gui/itemviews/qfileiconprovider.h81
-rw-r--r--src/gui/itemviews/qheaderview.cpp3558
-rw-r--r--src/gui/itemviews/qheaderview.h251
-rw-r--r--src/gui/itemviews/qheaderview_p.h370
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp1337
-rw-r--r--src/gui/itemviews/qitemdelegate.h141
-rw-r--r--src/gui/itemviews/qitemeditorfactory.cpp566
-rw-r--r--src/gui/itemviews/qitemeditorfactory.h124
-rw-r--r--src/gui/itemviews/qitemeditorfactory_p.h99
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp1570
-rw-r--r--src/gui/itemviews/qitemselectionmodel.h229
-rw-r--r--src/gui/itemviews/qitemselectionmodel_p.h111
-rw-r--r--src/gui/itemviews/qlistview.cpp3001
-rw-r--r--src/gui/itemviews/qlistview.h203
-rw-r--r--src/gui/itemviews/qlistview_p.h450
-rw-r--r--src/gui/itemviews/qlistwidget.cpp1865
-rw-r--r--src/gui/itemviews/qlistwidget.h335
-rw-r--r--src/gui/itemviews/qlistwidget_p.h175
-rw-r--r--src/gui/itemviews/qproxymodel.cpp547
-rw-r--r--src/gui/itemviews/qproxymodel.h142
-rw-r--r--src/gui/itemviews/qproxymodel_p.h100
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp2392
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.h199
-rw-r--r--src/gui/itemviews/qstandarditemmodel.cpp3108
-rw-r--r--src/gui/itemviews/qstandarditemmodel.h456
-rw-r--r--src/gui/itemviews/qstandarditemmodel_p.h189
-rw-r--r--src/gui/itemviews/qstringlistmodel.cpp307
-rw-r--r--src/gui/itemviews/qstringlistmodel.h91
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp763
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.h116
-rw-r--r--src/gui/itemviews/qtableview.cpp2515
-rw-r--r--src/gui/itemviews/qtableview.h193
-rw-r--r--src/gui/itemviews/qtableview_p.h210
-rw-r--r--src/gui/itemviews/qtablewidget.cpp2703
-rw-r--r--src/gui/itemviews/qtablewidget.h377
-rw-r--r--src/gui/itemviews/qtablewidget_p.h223
-rw-r--r--src/gui/itemviews/qtreeview.cpp3851
-rw-r--r--src/gui/itemviews/qtreeview.h241
-rw-r--r--src/gui/itemviews/qtreeview_p.h240
-rw-r--r--src/gui/itemviews/qtreewidget.cpp3437
-rw-r--r--src/gui/itemviews/qtreewidget.h432
-rw-r--r--src/gui/itemviews/qtreewidget_p.h249
-rw-r--r--src/gui/itemviews/qtreewidgetitemiterator.cpp459
-rw-r--r--src/gui/itemviews/qtreewidgetitemiterator.h158
-rw-r--r--src/gui/itemviews/qtreewidgetitemiterator_p.h109
-rw-r--r--src/gui/itemviews/qwidgetitemdata_p.h88
-rw-r--r--src/gui/kernel/kernel.pri209
-rw-r--r--src/gui/kernel/mac.pri4
-rw-r--r--src/gui/kernel/qaction.cpp1398
-rw-r--r--src/gui/kernel/qaction.h246
-rw-r--r--src/gui/kernel/qaction_p.h129
-rw-r--r--src/gui/kernel/qactiongroup.cpp416
-rw-r--r--src/gui/kernel/qactiongroup.h112
-rw-r--r--src/gui/kernel/qapplication.cpp5051
-rw-r--r--src/gui/kernel/qapplication.h391
-rw-r--r--src/gui/kernel/qapplication_mac.mm2976
-rw-r--r--src/gui/kernel/qapplication_p.h438
-rw-r--r--src/gui/kernel/qapplication_qws.cpp3817
-rw-r--r--src/gui/kernel/qapplication_win.cpp3956
-rw-r--r--src/gui/kernel/qapplication_x11.cpp5919
-rw-r--r--src/gui/kernel/qboxlayout.cpp1534
-rw-r--r--src/gui/kernel/qboxlayout.h173
-rw-r--r--src/gui/kernel/qclipboard.cpp651
-rw-r--r--src/gui/kernel/qclipboard.h130
-rw-r--r--src/gui/kernel/qclipboard_mac.cpp612
-rw-r--r--src/gui/kernel/qclipboard_p.h131
-rw-r--r--src/gui/kernel/qclipboard_qws.cpp304
-rw-r--r--src/gui/kernel/qclipboard_win.cpp389
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp1498
-rw-r--r--src/gui/kernel/qcocoaapplication_mac.mm114
-rw-r--r--src/gui/kernel/qcocoaapplication_mac_p.h103
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm282
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac_p.h119
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm215
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac_p.h90
-rw-r--r--src/gui/kernel/qcocoapanel_mac.mm79
-rw-r--r--src/gui/kernel/qcocoapanel_mac_p.h65
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm1254
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h109
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm185
-rw-r--r--src/gui/kernel/qcocoawindow_mac_p.h72
-rw-r--r--src/gui/kernel/qcocoawindowcustomthemeframe_mac.mm62
-rw-r--r--src/gui/kernel/qcocoawindowcustomthemeframe_mac_p.h61
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm349
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac_p.h95
-rw-r--r--src/gui/kernel/qcursor.cpp565
-rw-r--r--src/gui/kernel/qcursor.h160
-rw-r--r--src/gui/kernel/qcursor_mac.mm556
-rw-r--r--src/gui/kernel/qcursor_p.h121
-rw-r--r--src/gui/kernel/qcursor_qws.cpp136
-rw-r--r--src/gui/kernel/qcursor_win.cpp493
-rw-r--r--src/gui/kernel/qcursor_x11.cpp594
-rw-r--r--src/gui/kernel/qdesktopwidget.h104
-rw-r--r--src/gui/kernel/qdesktopwidget_mac.mm244
-rw-r--r--src/gui/kernel/qdesktopwidget_mac_p.h74
-rw-r--r--src/gui/kernel/qdesktopwidget_qws.cpp159
-rw-r--r--src/gui/kernel/qdesktopwidget_win.cpp412
-rw-r--r--src/gui/kernel/qdesktopwidget_x11.cpp380
-rw-r--r--src/gui/kernel/qdnd.cpp697
-rw-r--r--src/gui/kernel/qdnd_mac.mm749
-rw-r--r--src/gui/kernel/qdnd_p.h333
-rw-r--r--src/gui/kernel/qdnd_qws.cpp422
-rw-r--r--src/gui/kernel/qdnd_win.cpp1036
-rw-r--r--src/gui/kernel/qdnd_x11.cpp2064
-rw-r--r--src/gui/kernel/qdrag.cpp357
-rw-r--r--src/gui/kernel/qdrag.h105
-rw-r--r--src/gui/kernel/qevent.cpp3509
-rw-r--r--src/gui/kernel/qevent.h726
-rw-r--r--src/gui/kernel/qevent_p.h94
-rw-r--r--src/gui/kernel/qeventdispatcher_glib_qws.cpp195
-rw-r--r--src/gui/kernel/qeventdispatcher_glib_qws_p.h78
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm926
-rw-r--r--src/gui/kernel/qeventdispatcher_mac_p.h197
-rw-r--r--src/gui/kernel/qeventdispatcher_qws.cpp168
-rw-r--r--src/gui/kernel/qeventdispatcher_qws_p.h86
-rw-r--r--src/gui/kernel/qeventdispatcher_x11.cpp191
-rw-r--r--src/gui/kernel/qeventdispatcher_x11_p.h86
-rw-r--r--src/gui/kernel/qformlayout.cpp2080
-rw-r--r--src/gui/kernel/qformlayout.h163
-rw-r--r--src/gui/kernel/qgridlayout.cpp1889
-rw-r--r--src/gui/kernel/qgridlayout.h176
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib.cpp217
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib_p.h78
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp377
-rw-r--r--src/gui/kernel/qguifunctions_wince.h157
-rw-r--r--src/gui/kernel/qguivariant.cpp669
-rw-r--r--src/gui/kernel/qkeymapper.cpp121
-rw-r--r--src/gui/kernel/qkeymapper_mac.cpp931
-rw-r--r--src/gui/kernel/qkeymapper_p.h213
-rw-r--r--src/gui/kernel/qkeymapper_qws.cpp77
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp1259
-rw-r--r--src/gui/kernel/qkeymapper_x11.cpp1678
-rw-r--r--src/gui/kernel/qkeymapper_x11_p.cpp488
-rw-r--r--src/gui/kernel/qkeysequence.cpp1469
-rw-r--r--src/gui/kernel/qkeysequence.h231
-rw-r--r--src/gui/kernel/qkeysequence_p.h98
-rw-r--r--src/gui/kernel/qlayout.cpp1585
-rw-r--r--src/gui/kernel/qlayout.h242
-rw-r--r--src/gui/kernel/qlayout_p.h101
-rw-r--r--src/gui/kernel/qlayoutengine.cpp436
-rw-r--r--src/gui/kernel/qlayoutengine_p.h140
-rw-r--r--src/gui/kernel/qlayoutitem.cpp837
-rw-r--r--src/gui/kernel/qlayoutitem.h182
-rw-r--r--src/gui/kernel/qmacdefines_mac.h192
-rw-r--r--src/gui/kernel/qmime.cpp97
-rw-r--r--src/gui/kernel/qmime.h176
-rw-r--r--src/gui/kernel/qmime_mac.cpp1268
-rw-r--r--src/gui/kernel/qmime_win.cpp1594
-rw-r--r--src/gui/kernel/qmotifdnd_x11.cpp1028
-rw-r--r--src/gui/kernel/qnsframeview_mac_p.h154
-rw-r--r--src/gui/kernel/qnsthemeframe_mac_p.h246
-rw-r--r--src/gui/kernel/qnstitledframe_mac_p.h205
-rw-r--r--src/gui/kernel/qole_win.cpp255
-rw-r--r--src/gui/kernel/qpalette.cpp1396
-rw-r--r--src/gui/kernel/qpalette.h262
-rw-r--r--src/gui/kernel/qsessionmanager.h111
-rw-r--r--src/gui/kernel/qsessionmanager_qws.cpp171
-rw-r--r--src/gui/kernel/qshortcut.cpp408
-rw-r--r--src/gui/kernel/qshortcut.h107
-rw-r--r--src/gui/kernel/qshortcutmap.cpp901
-rw-r--r--src/gui/kernel/qshortcutmap_p.h122
-rw-r--r--src/gui/kernel/qsizepolicy.h225
-rw-r--r--src/gui/kernel/qsound.cpp386
-rw-r--r--src/gui/kernel/qsound.h95
-rw-r--r--src/gui/kernel/qsound_mac.mm184
-rw-r--r--src/gui/kernel/qsound_p.h100
-rw-r--r--src/gui/kernel/qsound_qws.cpp350
-rw-r--r--src/gui/kernel/qsound_win.cpp219
-rw-r--r--src/gui/kernel/qsound_x11.cpp296
-rw-r--r--src/gui/kernel/qstackedlayout.cpp545
-rw-r--r--src/gui/kernel/qstackedlayout.h115
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm1096
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac_p.h174
-rw-r--r--src/gui/kernel/qt_gui_pch.h85
-rw-r--r--src/gui/kernel/qt_mac.cpp144
-rw-r--r--src/gui/kernel/qt_mac_p.h265
-rw-r--r--src/gui/kernel/qt_x11_p.h723
-rw-r--r--src/gui/kernel/qtooltip.cpp609
-rw-r--r--src/gui/kernel/qtooltip.h84
-rw-r--r--src/gui/kernel/qwhatsthis.cpp772
-rw-r--r--src/gui/kernel/qwhatsthis.h88
-rw-r--r--src/gui/kernel/qwidget.cpp11398
-rw-r--r--src/gui/kernel/qwidget.h1045
-rw-r--r--src/gui/kernel/qwidget_mac.mm4842
-rw-r--r--src/gui/kernel/qwidget_p.h712
-rw-r--r--src/gui/kernel/qwidget_qws.cpp1198
-rw-r--r--src/gui/kernel/qwidget_win.cpp2124
-rw-r--r--src/gui/kernel/qwidget_wince.cpp707
-rw-r--r--src/gui/kernel/qwidget_x11.cpp2891
-rw-r--r--src/gui/kernel/qwidgetaction.cpp288
-rw-r--r--src/gui/kernel/qwidgetaction.h91
-rw-r--r--src/gui/kernel/qwidgetaction_p.h77
-rw-r--r--src/gui/kernel/qwidgetcreate_x11.cpp79
-rw-r--r--src/gui/kernel/qwindowdefs.h152
-rw-r--r--src/gui/kernel/qwindowdefs_win.h132
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp1807
-rw-r--r--src/gui/kernel/qx11embed_x11.h132
-rw-r--r--src/gui/kernel/qx11info_x11.cpp542
-rw-r--r--src/gui/kernel/qx11info_x11.h123
-rw-r--r--src/gui/kernel/win.pri4
-rw-r--r--src/gui/kernel/x11.pri4
-rw-r--r--src/gui/mac/images/copyarrowcursor.pngbin0 -> 1976 bytes-rw-r--r--src/gui/mac/images/forbiddencursor.pngbin0 -> 1745 bytes-rw-r--r--src/gui/mac/images/pluscursor.pngbin0 -> 688 bytes-rw-r--r--src/gui/mac/images/spincursor.pngbin0 -> 748 bytes-rw-r--r--src/gui/mac/images/waitcursor.pngbin0 -> 724 bytes-rw-r--r--src/gui/mac/maccursors.qrc9
-rw-r--r--src/gui/mac/qt_menu.nib/classes.nib59
-rw-r--r--src/gui/mac/qt_menu.nib/info.nib18
-rw-r--r--src/gui/mac/qt_menu.nib/keyedobjects.nibbin0 -> 5567 bytes-rw-r--r--src/gui/math3d/math3d.pri20
-rw-r--r--src/gui/math3d/qfixedpt.cpp681
-rw-r--r--src/gui/math3d/qfixedpt.h521
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp221
-rw-r--r--src/gui/math3d/qgenericmatrix.h341
-rw-r--r--src/gui/math3d/qmath3dglobal.h72
-rw-r--r--src/gui/math3d/qmath3dutil.cpp164
-rw-r--r--src/gui/math3d/qmath3dutil_p.h66
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp1649
-rw-r--r--src/gui/math3d/qmatrix4x4.h954
-rw-r--r--src/gui/math3d/qquaternion.cpp513
-rw-r--r--src/gui/math3d/qquaternion.h313
-rw-r--r--src/gui/math3d/qvector2d.cpp386
-rw-r--r--src/gui/math3d/qvector2d.h237
-rw-r--r--src/gui/math3d/qvector3d.cpp535
-rw-r--r--src/gui/math3d/qvector3d.h266
-rw-r--r--src/gui/math3d/qvector4d.cpp491
-rw-r--r--src/gui/math3d/qvector4d.h270
-rwxr-xr-xsrc/gui/painting/makepsheader.pl155
-rw-r--r--src/gui/painting/painting.pri369
-rw-r--r--src/gui/painting/qbackingstore.cpp1548
-rw-r--r--src/gui/painting/qbackingstore_p.h268
-rw-r--r--src/gui/painting/qbezier.cpp1245
-rw-r--r--src/gui/painting/qbezier_p.h280
-rw-r--r--src/gui/painting/qblendfunctions.cpp1419
-rw-r--r--src/gui/painting/qbrush.cpp2148
-rw-r--r--src/gui/painting/qbrush.h321
-rw-r--r--src/gui/painting/qcolor.cpp2244
-rw-r--r--src/gui/painting/qcolor.h275
-rw-r--r--src/gui/painting/qcolor_p.cpp390
-rw-r--r--src/gui/painting/qcolor_p.h71
-rw-r--r--src/gui/painting/qcolormap.h97
-rw-r--r--src/gui/painting/qcolormap_mac.cpp111
-rw-r--r--src/gui/painting/qcolormap_qws.cpp185
-rw-r--r--src/gui/painting/qcolormap_win.cpp197
-rw-r--r--src/gui/painting/qcolormap_x11.cpp674
-rw-r--r--src/gui/painting/qcssutil.cpp408
-rw-r--r--src/gui/painting/qcssutil_p.h84
-rw-r--r--src/gui/painting/qcups.cpp398
-rw-r--r--src/gui/painting/qcups_p.h120
-rw-r--r--src/gui/painting/qdatabuffer_p.h127
-rw-r--r--src/gui/painting/qdrawhelper.cpp8248
-rw-r--r--src/gui/painting/qdrawhelper_iwmmxt.cpp127
-rw-r--r--src/gui/painting/qdrawhelper_mmx.cpp134
-rw-r--r--src/gui/painting/qdrawhelper_mmx3dnow.cpp106
-rw-r--r--src/gui/painting/qdrawhelper_mmx_p.h893
-rw-r--r--src/gui/painting/qdrawhelper_p.h1910
-rw-r--r--src/gui/painting/qdrawhelper_sse.cpp147
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp211
-rw-r--r--src/gui/painting/qdrawhelper_sse3dnow.cpp122
-rw-r--r--src/gui/painting/qdrawhelper_sse_p.h182
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h130
-rw-r--r--src/gui/painting/qdrawutil.cpp1041
-rw-r--r--src/gui/painting/qdrawutil.h140
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp229
-rw-r--r--src/gui/painting/qemulationpaintengine_p.h107
-rw-r--r--src/gui/painting/qfixed_p.h219
-rw-r--r--src/gui/painting/qgraphicssystem.cpp78
-rw-r--r--src/gui/painting/qgraphicssystem_mac.cpp59
-rw-r--r--src/gui/painting/qgraphicssystem_mac_p.h69
-rw-r--r--src/gui/painting/qgraphicssystem_p.h78
-rw-r--r--src/gui/painting/qgraphicssystem_qws.cpp62
-rw-r--r--src/gui/painting/qgraphicssystem_qws_p.h79
-rw-r--r--src/gui/painting/qgraphicssystem_raster.cpp59
-rw-r--r--src/gui/painting/qgraphicssystem_raster_p.h69
-rw-r--r--src/gui/painting/qgraphicssystemfactory.cpp110
-rw-r--r--src/gui/painting/qgraphicssystemfactory_p.h78
-rw-r--r--src/gui/painting/qgraphicssystemplugin.cpp56
-rw-r--r--src/gui/painting/qgraphicssystemplugin_p.h92
-rw-r--r--src/gui/painting/qgrayraster.c1937
-rw-r--r--src/gui/painting/qgrayraster_p.h101
-rw-r--r--src/gui/painting/qimagescale.cpp1031
-rw-r--r--src/gui/painting/qimagescale_p.h66
-rw-r--r--src/gui/painting/qmath_p.h66
-rw-r--r--src/gui/painting/qmatrix.cpp1180
-rw-r--r--src/gui/painting/qmatrix.h175
-rw-r--r--src/gui/painting/qmemrotate.cpp547
-rw-r--r--src/gui/painting/qmemrotate_p.h103
-rw-r--r--src/gui/painting/qoutlinemapper.cpp412
-rw-r--r--src/gui/painting/qoutlinemapper_p.h238
-rw-r--r--src/gui/painting/qpaintdevice.h173
-rw-r--r--src/gui/painting/qpaintdevice_mac.cpp185
-rw-r--r--src/gui/painting/qpaintdevice_qws.cpp92
-rw-r--r--src/gui/painting/qpaintdevice_win.cpp88
-rw-r--r--src/gui/painting/qpaintdevice_x11.cpp435
-rw-r--r--src/gui/painting/qpaintengine.cpp1026
-rw-r--r--src/gui/painting/qpaintengine.h359
-rw-r--r--src/gui/painting/qpaintengine_alpha.cpp510
-rw-r--r--src/gui/painting/qpaintengine_alpha_p.h134
-rw-r--r--src/gui/painting/qpaintengine_d3d.cpp4576
-rw-r--r--src/gui/painting/qpaintengine_d3d.fx608
-rw-r--r--src/gui/painting/qpaintengine_d3d.qrc5
-rw-r--r--src/gui/painting/qpaintengine_d3d_p.h120
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp1789
-rw-r--r--src/gui/painting/qpaintengine_mac_p.h359
-rw-r--r--src/gui/painting/qpaintengine_p.h125
-rw-r--r--src/gui/painting/qpaintengine_preview.cpp223
-rw-r--r--src/gui/painting/qpaintengine_preview_p.h106
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6058
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h550
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp2451
-rw-r--r--src/gui/painting/qpaintengine_x11_p.h245
-rw-r--r--src/gui/painting/qpaintengineex.cpp804
-rw-r--r--src/gui/painting/qpaintengineex_p.h240
-rw-r--r--src/gui/painting/qpainter.cpp8533
-rw-r--r--src/gui/painting/qpainter.h953
-rw-r--r--src/gui/painting/qpainter_p.h260
-rw-r--r--src/gui/painting/qpainterpath.cpp3365
-rw-r--r--src/gui/painting/qpainterpath.h421
-rw-r--r--src/gui/painting/qpainterpath_p.h211
-rw-r--r--src/gui/painting/qpathclipper.cpp2042
-rw-r--r--src/gui/painting/qpathclipper_p.h519
-rw-r--r--src/gui/painting/qpdf.cpp2087
-rw-r--r--src/gui/painting/qpdf_p.h303
-rw-r--r--src/gui/painting/qpen.cpp1005
-rw-r--r--src/gui/painting/qpen.h140
-rw-r--r--src/gui/painting/qpen_p.h78
-rw-r--r--src/gui/painting/qpolygon.cpp987
-rw-r--r--src/gui/painting/qpolygon.h186
-rw-r--r--src/gui/painting/qpolygonclipper_p.h316
-rw-r--r--src/gui/painting/qprintengine.h117
-rw-r--r--src/gui/painting/qprintengine_mac.mm926
-rw-r--r--src/gui/painting/qprintengine_mac_p.h165
-rw-r--r--src/gui/painting/qprintengine_pdf.cpp1225
-rw-r--r--src/gui/painting/qprintengine_pdf_p.h194
-rw-r--r--src/gui/painting/qprintengine_ps.cpp969
-rw-r--r--src/gui/painting/qprintengine_ps_p.h137
-rw-r--r--src/gui/painting/qprintengine_qws.cpp881
-rw-r--r--src/gui/painting/qprintengine_qws_p.h213
-rw-r--r--src/gui/painting/qprintengine_win.cpp1968
-rw-r--r--src/gui/painting/qprintengine_win_p.h272
-rw-r--r--src/gui/painting/qprinter.cpp2377
-rw-r--r--src/gui/painting/qprinter.h330
-rw-r--r--src/gui/painting/qprinter_p.h140
-rw-r--r--src/gui/painting/qprinterinfo.h88
-rw-r--r--src/gui/painting/qprinterinfo_mac.cpp241
-rw-r--r--src/gui/painting/qprinterinfo_unix.cpp1141
-rw-r--r--src/gui/painting/qprinterinfo_unix_p.h125
-rw-r--r--src/gui/painting/qprinterinfo_win.cpp279
-rw-r--r--src/gui/painting/qpsprinter.agl452
-rw-r--r--src/gui/painting/qpsprinter.ps449
-rw-r--r--src/gui/painting/qrasterdefs_p.h1280
-rw-r--r--src/gui/painting/qrasterizer.cpp1249
-rw-r--r--src/gui/painting/qrasterizer_p.h91
-rw-r--r--src/gui/painting/qregion.cpp4318
-rw-r--r--src/gui/painting/qregion.h231
-rw-r--r--src/gui/painting/qregion_mac.cpp249
-rw-r--r--src/gui/painting/qregion_qws.cpp3183
-rw-r--r--src/gui/painting/qregion_win.cpp576
-rw-r--r--src/gui/painting/qregion_wince.cpp119
-rw-r--r--src/gui/painting/qregion_x11.cpp92
-rw-r--r--src/gui/painting/qrgb.h88
-rw-r--r--src/gui/painting/qstroker.cpp1136
-rw-r--r--src/gui/painting/qstroker_p.h378
-rw-r--r--src/gui/painting/qstylepainter.cpp176
-rw-r--r--src/gui/painting/qstylepainter.h112
-rw-r--r--src/gui/painting/qtessellator.cpp1499
-rw-r--r--src/gui/painting/qtessellator_p.h102
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp316
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h141
-rw-r--r--src/gui/painting/qtransform.cpp2111
-rw-r--r--src/gui/painting/qtransform.h354
-rw-r--r--src/gui/painting/qvectorpath_p.h166
-rw-r--r--src/gui/painting/qwindowsurface.cpp349
-rw-r--r--src/gui/painting/qwindowsurface_d3d.cpp169
-rw-r--r--src/gui/painting/qwindowsurface_d3d_p.h84
-rw-r--r--src/gui/painting/qwindowsurface_mac.cpp137
-rw-r--r--src/gui/painting/qwindowsurface_mac_p.h84
-rw-r--r--src/gui/painting/qwindowsurface_p.h112
-rw-r--r--src/gui/painting/qwindowsurface_qws.cpp1411
-rw-r--r--src/gui/painting/qwindowsurface_qws_p.h353
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp413
-rw-r--r--src/gui/painting/qwindowsurface_raster_p.h120
-rw-r--r--src/gui/painting/qwindowsurface_x11.cpp244
-rw-r--r--src/gui/painting/qwindowsurface_x11_p.h90
-rw-r--r--src/gui/painting/qwmatrix.h61
-rw-r--r--src/gui/styles/gtksymbols.cpp904
-rw-r--r--src/gui/styles/gtksymbols_p.h335
-rw-r--r--src/gui/styles/images/cdr-128.pngbin0 -> 16418 bytes-rw-r--r--src/gui/styles/images/cdr-16.pngbin0 -> 845 bytes-rw-r--r--src/gui/styles/images/cdr-32.pngbin0 -> 2016 bytes-rw-r--r--src/gui/styles/images/closedock-16.pngbin0 -> 516 bytes-rw-r--r--src/gui/styles/images/closedock-down-16.pngbin0 -> 578 bytes-rw-r--r--src/gui/styles/images/computer-16.pngbin0 -> 782 bytes-rw-r--r--src/gui/styles/images/computer-32.pngbin0 -> 1807 bytes-rw-r--r--src/gui/styles/images/desktop-16.pngbin0 -> 773 bytes-rw-r--r--src/gui/styles/images/desktop-32.pngbin0 -> 1103 bytes-rw-r--r--src/gui/styles/images/dirclosed-128.pngbin0 -> 1386 bytes-rw-r--r--src/gui/styles/images/dirclosed-16.pngbin0 -> 231 bytes-rw-r--r--src/gui/styles/images/dirclosed-32.pngbin0 -> 474 bytes-rw-r--r--src/gui/styles/images/dirlink-128.pngbin0 -> 5155 bytes-rw-r--r--src/gui/styles/images/dirlink-16.pngbin0 -> 416 bytes-rw-r--r--src/gui/styles/images/dirlink-32.pngbin0 -> 1046 bytes-rw-r--r--src/gui/styles/images/diropen-128.pngbin0 -> 2075 bytes-rw-r--r--src/gui/styles/images/diropen-16.pngbin0 -> 248 bytes-rw-r--r--src/gui/styles/images/diropen-32.pngbin0 -> 633 bytes-rw-r--r--src/gui/styles/images/dockdock-16.pngbin0 -> 438 bytes-rw-r--r--src/gui/styles/images/dockdock-down-16.pngbin0 -> 406 bytes-rw-r--r--src/gui/styles/images/down-128.pngbin0 -> 9550 bytes-rw-r--r--src/gui/styles/images/down-16.pngbin0 -> 817 bytes-rw-r--r--src/gui/styles/images/down-32.pngbin0 -> 1820 bytes-rw-r--r--src/gui/styles/images/dvd-128.pngbin0 -> 14941 bytes-rw-r--r--src/gui/styles/images/dvd-16.pngbin0 -> 892 bytes-rw-r--r--src/gui/styles/images/dvd-32.pngbin0 -> 2205 bytes-rw-r--r--src/gui/styles/images/file-128.pngbin0 -> 3997 bytes-rw-r--r--src/gui/styles/images/file-16.pngbin0 -> 423 bytes-rw-r--r--src/gui/styles/images/file-32.pngbin0 -> 713 bytes-rw-r--r--src/gui/styles/images/filecontents-128.pngbin0 -> 8109 bytes-rw-r--r--src/gui/styles/images/filecontents-16.pngbin0 -> 766 bytes-rw-r--r--src/gui/styles/images/filecontents-32.pngbin0 -> 1712 bytes-rw-r--r--src/gui/styles/images/fileinfo-128.pngbin0 -> 12002 bytes-rw-r--r--src/gui/styles/images/fileinfo-16.pngbin0 -> 849 bytes-rw-r--r--src/gui/styles/images/fileinfo-32.pngbin0 -> 2010 bytes-rw-r--r--src/gui/styles/images/filelink-128.pngbin0 -> 5601 bytes-rw-r--r--src/gui/styles/images/filelink-16.pngbin0 -> 566 bytes-rw-r--r--src/gui/styles/images/filelink-32.pngbin0 -> 1192 bytes-rw-r--r--src/gui/styles/images/floppy-128.pngbin0 -> 5074 bytes-rw-r--r--src/gui/styles/images/floppy-16.pngbin0 -> 602 bytes-rw-r--r--src/gui/styles/images/floppy-32.pngbin0 -> 1019 bytes-rw-r--r--src/gui/styles/images/fontbitmap-16.pngbin0 -> 537 bytes-rw-r--r--src/gui/styles/images/fonttruetype-16.pngbin0 -> 442 bytes-rw-r--r--src/gui/styles/images/harddrive-128.pngbin0 -> 11250 bytes-rw-r--r--src/gui/styles/images/harddrive-16.pngbin0 -> 802 bytes-rw-r--r--src/gui/styles/images/harddrive-32.pngbin0 -> 1751 bytes-rw-r--r--src/gui/styles/images/left-128.pngbin0 -> 9432 bytes-rw-r--r--src/gui/styles/images/left-16.pngbin0 -> 826 bytes-rw-r--r--src/gui/styles/images/left-32.pngbin0 -> 1799 bytes-rw-r--r--src/gui/styles/images/media-pause-16.pngbin0 -> 229 bytes-rw-r--r--src/gui/styles/images/media-pause-32.pngbin0 -> 185 bytes-rw-r--r--src/gui/styles/images/media-play-16.pngbin0 -> 262 bytes-rw-r--r--src/gui/styles/images/media-play-32.pngbin0 -> 413 bytes-rw-r--r--src/gui/styles/images/media-seek-backward-16.pngbin0 -> 384 bytes-rw-r--r--src/gui/styles/images/media-seek-backward-32.pngbin0 -> 548 bytes-rw-r--r--src/gui/styles/images/media-seek-forward-16.pngbin0 -> 370 bytes-rw-r--r--src/gui/styles/images/media-seek-forward-32.pngbin0 -> 524 bytes-rw-r--r--src/gui/styles/images/media-skip-backward-16.pngbin0 -> 396 bytes-rw-r--r--src/gui/styles/images/media-skip-backward-32.pngbin0 -> 570 bytes-rw-r--r--src/gui/styles/images/media-skip-forward-16.pngbin0 -> 384 bytes-rw-r--r--src/gui/styles/images/media-skip-forward-32.pngbin0 -> 549 bytes-rw-r--r--src/gui/styles/images/media-stop-16.pngbin0 -> 166 bytes-rw-r--r--src/gui/styles/images/media-stop-32.pngbin0 -> 176 bytes-rw-r--r--src/gui/styles/images/media-volume-16.pngbin0 -> 799 bytes-rw-r--r--src/gui/styles/images/media-volume-muted-16.pngbin0 -> 668 bytes-rw-r--r--src/gui/styles/images/networkdrive-128.pngbin0 -> 18075 bytes-rw-r--r--src/gui/styles/images/networkdrive-16.pngbin0 -> 885 bytes-rw-r--r--src/gui/styles/images/networkdrive-32.pngbin0 -> 2245 bytes-rw-r--r--src/gui/styles/images/newdirectory-128.pngbin0 -> 7503 bytes-rw-r--r--src/gui/styles/images/newdirectory-16.pngbin0 -> 870 bytes-rw-r--r--src/gui/styles/images/newdirectory-32.pngbin0 -> 1590 bytes-rw-r--r--src/gui/styles/images/parentdir-128.pngbin0 -> 8093 bytes-rw-r--r--src/gui/styles/images/parentdir-16.pngbin0 -> 938 bytes-rw-r--r--src/gui/styles/images/parentdir-32.pngbin0 -> 1603 bytes-rw-r--r--src/gui/styles/images/refresh-24.pngbin0 -> 1654 bytes-rw-r--r--src/gui/styles/images/refresh-32.pngbin0 -> 2431 bytes-rw-r--r--src/gui/styles/images/right-128.pngbin0 -> 9367 bytes-rw-r--r--src/gui/styles/images/right-16.pngbin0 -> 811 bytes-rw-r--r--src/gui/styles/images/right-32.pngbin0 -> 1804 bytes-rw-r--r--src/gui/styles/images/standardbutton-apply-128.pngbin0 -> 5395 bytes-rw-r--r--src/gui/styles/images/standardbutton-apply-16.pngbin0 -> 611 bytes-rw-r--r--src/gui/styles/images/standardbutton-apply-32.pngbin0 -> 1279 bytes-rw-r--r--src/gui/styles/images/standardbutton-cancel-128.pngbin0 -> 7039 bytes-rw-r--r--src/gui/styles/images/standardbutton-cancel-16.pngbin0 -> 689 bytes-rw-r--r--src/gui/styles/images/standardbutton-cancel-32.pngbin0 -> 1573 bytes-rw-r--r--src/gui/styles/images/standardbutton-clear-128.pngbin0 -> 3094 bytes-rw-r--r--src/gui/styles/images/standardbutton-clear-16.pngbin0 -> 456 bytes-rw-r--r--src/gui/styles/images/standardbutton-clear-32.pngbin0 -> 866 bytes-rw-r--r--src/gui/styles/images/standardbutton-close-128.pngbin0 -> 4512 bytes-rw-r--r--src/gui/styles/images/standardbutton-close-16.pngbin0 -> 366 bytes-rw-r--r--src/gui/styles/images/standardbutton-close-32.pngbin0 -> 780 bytes-rw-r--r--src/gui/styles/images/standardbutton-closetab-16.pngbin0 -> 406 bytes-rw-r--r--src/gui/styles/images/standardbutton-closetab-down-16.pngbin0 -> 481 bytes-rw-r--r--src/gui/styles/images/standardbutton-closetab-hover-16.pngbin0 -> 570 bytes-rw-r--r--src/gui/styles/images/standardbutton-delete-128.pngbin0 -> 5414 bytes-rw-r--r--src/gui/styles/images/standardbutton-delete-16.pngbin0 -> 722 bytes-rw-r--r--src/gui/styles/images/standardbutton-delete-32.pngbin0 -> 1541 bytes-rw-r--r--src/gui/styles/images/standardbutton-help-128.pngbin0 -> 10765 bytes-rw-r--r--src/gui/styles/images/standardbutton-help-16.pngbin0 -> 840 bytes-rw-r--r--src/gui/styles/images/standardbutton-help-32.pngbin0 -> 2066 bytes-rw-r--r--src/gui/styles/images/standardbutton-no-128.pngbin0 -> 6520 bytes-rw-r--r--src/gui/styles/images/standardbutton-no-16.pngbin0 -> 701 bytes-rw-r--r--src/gui/styles/images/standardbutton-no-32.pngbin0 -> 1445 bytes-rw-r--r--src/gui/styles/images/standardbutton-ok-128.pngbin0 -> 4232 bytes-rw-r--r--src/gui/styles/images/standardbutton-ok-16.pngbin0 -> 584 bytes-rw-r--r--src/gui/styles/images/standardbutton-ok-32.pngbin0 -> 1246 bytes-rw-r--r--src/gui/styles/images/standardbutton-open-128.pngbin0 -> 5415 bytes-rw-r--r--src/gui/styles/images/standardbutton-open-16.pngbin0 -> 629 bytes-rw-r--r--src/gui/styles/images/standardbutton-open-32.pngbin0 -> 1154 bytes-rw-r--r--src/gui/styles/images/standardbutton-save-128.pngbin0 -> 4398 bytes-rw-r--r--src/gui/styles/images/standardbutton-save-16.pngbin0 -> 583 bytes-rw-r--r--src/gui/styles/images/standardbutton-save-32.pngbin0 -> 1092 bytes-rw-r--r--src/gui/styles/images/standardbutton-yes-128.pngbin0 -> 6554 bytes-rw-r--r--src/gui/styles/images/standardbutton-yes-16.pngbin0 -> 687 bytes-rw-r--r--src/gui/styles/images/standardbutton-yes-32.pngbin0 -> 1504 bytes-rw-r--r--src/gui/styles/images/stop-24.pngbin0 -> 1267 bytes-rw-r--r--src/gui/styles/images/stop-32.pngbin0 -> 1878 bytes-rw-r--r--src/gui/styles/images/trash-128.pngbin0 -> 3296 bytes-rw-r--r--src/gui/styles/images/trash-16.pngbin0 -> 419 bytes-rw-r--r--src/gui/styles/images/trash-32.pngbin0 -> 883 bytes-rw-r--r--src/gui/styles/images/up-128.pngbin0 -> 9363 bytes-rw-r--r--src/gui/styles/images/up-16.pngbin0 -> 814 bytes-rw-r--r--src/gui/styles/images/up-32.pngbin0 -> 1798 bytes-rw-r--r--src/gui/styles/images/viewdetailed-128.pngbin0 -> 4743 bytes-rw-r--r--src/gui/styles/images/viewdetailed-16.pngbin0 -> 499 bytes-rw-r--r--src/gui/styles/images/viewdetailed-32.pngbin0 -> 1092 bytes-rw-r--r--src/gui/styles/images/viewlist-128.pngbin0 -> 4069 bytes-rw-r--r--src/gui/styles/images/viewlist-16.pngbin0 -> 490 bytes-rw-r--r--src/gui/styles/images/viewlist-32.pngbin0 -> 1006 bytes-rw-r--r--src/gui/styles/qcdestyle.cpp305
-rw-r--r--src/gui/styles/qcdestyle.h82
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp4945
-rw-r--r--src/gui/styles/qcleanlooksstyle.h114
-rw-r--r--src/gui/styles/qcleanlooksstyle_p.h82
-rw-r--r--src/gui/styles/qcommonstyle.cpp6357
-rw-r--r--src/gui/styles/qcommonstyle.h109
-rw-r--r--src/gui/styles/qcommonstyle_p.h142
-rw-r--r--src/gui/styles/qcommonstylepixmaps_p.h186
-rw-r--r--src/gui/styles/qgtkpainter.cpp705
-rw-r--r--src/gui/styles/qgtkpainter_p.h129
-rw-r--r--src/gui/styles/qgtkstyle.cpp3280
-rw-r--r--src/gui/styles/qgtkstyle.h118
-rw-r--r--src/gui/styles/qmacstyle_mac.h144
-rw-r--r--src/gui/styles/qmacstyle_mac.mm6394
-rw-r--r--src/gui/styles/qmacstylepixmaps_mac_p.h1467
-rw-r--r--src/gui/styles/qmotifstyle.cpp2719
-rw-r--r--src/gui/styles/qmotifstyle.h128
-rw-r--r--src/gui/styles/qmotifstyle_p.h82
-rw-r--r--src/gui/styles/qplastiquestyle.cpp6024
-rw-r--r--src/gui/styles/qplastiquestyle.h119
-rw-r--r--src/gui/styles/qstyle.cpp2445
-rw-r--r--src/gui/styles/qstyle.h875
-rw-r--r--src/gui/styles/qstyle.qrc135
-rw-r--r--src/gui/styles/qstyle_p.h104
-rw-r--r--src/gui/styles/qstyle_wince.qrc97
-rw-r--r--src/gui/styles/qstylefactory.cpp259
-rw-r--r--src/gui/styles/qstylefactory.h66
-rw-r--r--src/gui/styles/qstyleoption.cpp5353
-rw-r--r--src/gui/styles/qstyleoption.h949
-rw-r--r--src/gui/styles/qstyleplugin.cpp115
-rw-r--r--src/gui/styles/qstyleplugin.h81
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp5946
-rw-r--r--src/gui/styles/qstylesheetstyle_default.cpp554
-rw-r--r--src/gui/styles/qstylesheetstyle_p.h191
-rw-r--r--src/gui/styles/qwindowscestyle.cpp2422
-rw-r--r--src/gui/styles/qwindowscestyle.h103
-rw-r--r--src/gui/styles/qwindowscestyle_p.h118
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp3503
-rw-r--r--src/gui/styles/qwindowsmobilestyle.h116
-rw-r--r--src/gui/styles/qwindowsmobilestyle_p.h93
-rw-r--r--src/gui/styles/qwindowsstyle.cpp3408
-rw-r--r--src/gui/styles/qwindowsstyle.h111
-rw-r--r--src/gui/styles/qwindowsstyle_p.h96
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp2650
-rw-r--r--src/gui/styles/qwindowsvistastyle.h108
-rw-r--r--src/gui/styles/qwindowsvistastyle_p.h217
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp4205
-rw-r--r--src/gui/styles/qwindowsxpstyle.h107
-rw-r--r--src/gui/styles/qwindowsxpstyle_p.h356
-rw-r--r--src/gui/styles/styles.pri157
-rw-r--r--src/gui/text/qabstractfontengine_p.h110
-rw-r--r--src/gui/text/qabstractfontengine_qws.cpp776
-rw-r--r--src/gui/text/qabstractfontengine_qws.h221
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp622
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.h149
-rw-r--r--src/gui/text/qabstracttextdocumentlayout_p.h100
-rw-r--r--src/gui/text/qcssparser.cpp2808
-rw-r--r--src/gui/text/qcssparser_p.h835
-rw-r--r--src/gui/text/qcssscanner.cpp1146
-rw-r--r--src/gui/text/qfont.cpp3018
-rw-r--r--src/gui/text/qfont.h354
-rw-r--r--src/gui/text/qfont_mac.cpp158
-rw-r--r--src/gui/text/qfont_p.h278
-rw-r--r--src/gui/text/qfont_qws.cpp134
-rw-r--r--src/gui/text/qfont_win.cpp178
-rw-r--r--src/gui/text/qfont_x11.cpp370
-rw-r--r--src/gui/text/qfontdatabase.cpp2435
-rw-r--r--src/gui/text/qfontdatabase.h176
-rw-r--r--src/gui/text/qfontdatabase_mac.cpp509
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp1062
-rw-r--r--src/gui/text/qfontdatabase_win.cpp1288
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp2064
-rw-r--r--src/gui/text/qfontengine.cpp1623
-rw-r--r--src/gui/text/qfontengine_ft.cpp1904
-rw-r--r--src/gui/text/qfontengine_ft_p.h323
-rw-r--r--src/gui/text/qfontengine_mac.mm1701
-rw-r--r--src/gui/text/qfontengine_p.h617
-rw-r--r--src/gui/text/qfontengine_qpf.cpp1161
-rw-r--r--src/gui/text/qfontengine_qpf_p.h298
-rw-r--r--src/gui/text/qfontengine_qws.cpp625
-rw-r--r--src/gui/text/qfontengine_win.cpp1575
-rw-r--r--src/gui/text/qfontengine_win_p.h156
-rw-r--r--src/gui/text/qfontengine_x11.cpp1180
-rw-r--r--src/gui/text/qfontengine_x11_p.h177
-rw-r--r--src/gui/text/qfontengineglyphcache_p.h95
-rw-r--r--src/gui/text/qfontinfo.h87
-rw-r--r--src/gui/text/qfontmetrics.cpp1739
-rw-r--r--src/gui/text/qfontmetrics.h197
-rw-r--r--src/gui/text/qfontsubset.cpp1743
-rw-r--r--src/gui/text/qfontsubset_p.h99
-rw-r--r--src/gui/text/qfragmentmap.cpp46
-rw-r--r--src/gui/text/qfragmentmap_p.h872
-rw-r--r--src/gui/text/qpfutil.cpp66
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp618
-rw-r--r--src/gui/text/qsyntaxhighlighter.h111
-rw-r--r--src/gui/text/qtextcontrol.cpp2981
-rw-r--r--src/gui/text/qtextcontrol_p.h303
-rw-r--r--src/gui/text/qtextcontrol_p_p.h219
-rw-r--r--src/gui/text/qtextcursor.cpp2420
-rw-r--r--src/gui/text/qtextcursor.h232
-rw-r--r--src/gui/text/qtextcursor_p.h120
-rw-r--r--src/gui/text/qtextdocument.cpp2929
-rw-r--r--src/gui/text/qtextdocument.h298
-rw-r--r--src/gui/text/qtextdocument_p.cpp1600
-rw-r--r--src/gui/text/qtextdocument_p.h398
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp1217
-rw-r--r--src/gui/text/qtextdocumentfragment.h92
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h236
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp3224
-rw-r--r--src/gui/text/qtextdocumentlayout_p.h119
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp372
-rw-r--r--src/gui/text/qtextdocumentwriter.h93
-rw-r--r--src/gui/text/qtextengine.cpp2648
-rw-r--r--src/gui/text/qtextengine_mac.cpp656
-rw-r--r--src/gui/text/qtextengine_p.h608
-rw-r--r--src/gui/text/qtextformat.cpp3063
-rw-r--r--src/gui/text/qtextformat.h902
-rw-r--r--src/gui/text/qtextformat_p.h111
-rw-r--r--src/gui/text/qtexthtmlparser.cpp1881
-rw-r--r--src/gui/text/qtexthtmlparser_p.h342
-rw-r--r--src/gui/text/qtextimagehandler.cpp234
-rw-r--r--src/gui/text/qtextimagehandler_p.h80
-rw-r--r--src/gui/text/qtextlayout.cpp2453
-rw-r--r--src/gui/text/qtextlayout.h243
-rw-r--r--src/gui/text/qtextlist.cpp261
-rw-r--r--src/gui/text/qtextlist.h94
-rw-r--r--src/gui/text/qtextobject.cpp1711
-rw-r--r--src/gui/text/qtextobject.h328
-rw-r--r--src/gui/text/qtextobject_p.h103
-rw-r--r--src/gui/text/qtextodfwriter.cpp818
-rw-r--r--src/gui/text/qtextodfwriter_p.h115
-rw-r--r--src/gui/text/qtextoption.cpp414
-rw-r--r--src/gui/text/qtextoption.h161
-rw-r--r--src/gui/text/qtexttable.cpp1290
-rw-r--r--src/gui/text/qtexttable.h145
-rw-r--r--src/gui/text/qtexttable_p.h89
-rw-r--r--src/gui/text/qzip.cpp1208
-rw-r--r--src/gui/text/qzipreader_p.h119
-rw-r--r--src/gui/text/qzipwriter_p.h114
-rw-r--r--src/gui/text/text.pri177
-rw-r--r--src/gui/util/qcompleter.cpp1712
-rw-r--r--src/gui/util/qcompleter.h166
-rw-r--r--src/gui/util/qcompleter_p.h262
-rw-r--r--src/gui/util/qdesktopservices.cpp307
-rw-r--r--src/gui/util/qdesktopservices.h91
-rw-r--r--src/gui/util/qdesktopservices_mac.cpp182
-rw-r--r--src/gui/util/qdesktopservices_qws.cpp93
-rw-r--r--src/gui/util/qdesktopservices_win.cpp249
-rw-r--r--src/gui/util/qdesktopservices_x11.cpp234
-rw-r--r--src/gui/util/qsystemtrayicon.cpp675
-rw-r--r--src/gui/util/qsystemtrayicon.h132
-rw-r--r--src/gui/util/qsystemtrayicon_mac.mm547
-rw-r--r--src/gui/util/qsystemtrayicon_p.h181
-rw-r--r--src/gui/util/qsystemtrayicon_qws.cpp91
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp748
-rw-r--r--src/gui/util/qsystemtrayicon_x11.cpp394
-rw-r--r--src/gui/util/qundogroup.cpp500
-rw-r--r--src/gui/util/qundogroup.h110
-rw-r--r--src/gui/util/qundostack.cpp1129
-rw-r--r--src/gui/util/qundostack.h158
-rw-r--r--src/gui/util/qundostack_p.h111
-rw-r--r--src/gui/util/qundoview.cpp476
-rw-r--r--src/gui/util/qundoview.h102
-rw-r--r--src/gui/util/util.pri40
-rw-r--r--src/gui/widgets/qabstractbutton.cpp1470
-rw-r--r--src/gui/widgets/qabstractbutton.h183
-rw-r--r--src/gui/widgets/qabstractbutton_p.h109
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp1303
-rw-r--r--src/gui/widgets/qabstractscrollarea.h141
-rw-r--r--src/gui/widgets/qabstractscrollarea_p.h139
-rw-r--r--src/gui/widgets/qabstractslider.cpp914
-rw-r--r--src/gui/widgets/qabstractslider.h184
-rw-r--r--src/gui/widgets/qabstractslider_p.h113
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp2049
-rw-r--r--src/gui/widgets/qabstractspinbox.h177
-rw-r--r--src/gui/widgets/qabstractspinbox_p.h171
-rw-r--r--src/gui/widgets/qbuttongroup.cpp260
-rw-r--r--src/gui/widgets/qbuttongroup.h112
-rw-r--r--src/gui/widgets/qcalendartextnavigator_p.h112
-rw-r--r--src/gui/widgets/qcalendarwidget.cpp3091
-rw-r--r--src/gui/widgets/qcalendarwidget.h204
-rw-r--r--src/gui/widgets/qcheckbox.cpp425
-rw-r--r--src/gui/widgets/qcheckbox.h113
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm187
-rw-r--r--src/gui/widgets/qcocoamenu_mac_p.h72
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm153
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac_p.h71
-rw-r--r--src/gui/widgets/qcombobox.cpp3186
-rw-r--r--src/gui/widgets/qcombobox.h338
-rw-r--r--src/gui/widgets/qcombobox_p.h410
-rw-r--r--src/gui/widgets/qcommandlinkbutton.cpp384
-rw-r--r--src/gui/widgets/qcommandlinkbutton.h85
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp2647
-rw-r--r--src/gui/widgets/qdatetimeedit.h232
-rw-r--r--src/gui/widgets/qdatetimeedit_p.h184
-rw-r--r--src/gui/widgets/qdial.cpp530
-rw-r--r--src/gui/widgets/qdial.h122
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp1136
-rw-r--r--src/gui/widgets/qdialogbuttonbox.h168
-rw-r--r--src/gui/widgets/qdockarealayout.cpp3316
-rw-r--r--src/gui/widgets/qdockarealayout_p.h303
-rw-r--r--src/gui/widgets/qdockwidget.cpp1594
-rw-r--r--src/gui/widgets/qdockwidget.h146
-rw-r--r--src/gui/widgets/qdockwidget_p.h207
-rw-r--r--src/gui/widgets/qeffects.cpp632
-rw-r--r--src/gui/widgets/qeffects_p.h84
-rw-r--r--src/gui/widgets/qfocusframe.cpp267
-rw-r--r--src/gui/widgets/qfocusframe.h82
-rw-r--r--src/gui/widgets/qfontcombobox.cpp467
-rw-r--r--src/gui/widgets/qfontcombobox.h112
-rw-r--r--src/gui/widgets/qframe.cpp566
-rw-r--r--src/gui/widgets/qframe.h148
-rw-r--r--src/gui/widgets/qframe_p.h85
-rw-r--r--src/gui/widgets/qgroupbox.cpp788
-rw-r--r--src/gui/widgets/qgroupbox.h122
-rw-r--r--src/gui/widgets/qlabel.cpp1606
-rw-r--r--src/gui/widgets/qlabel.h175
-rw-r--r--src/gui/widgets/qlabel_p.h152
-rw-r--r--src/gui/widgets/qlcdnumber.cpp1282
-rw-r--r--src/gui/widgets/qlcdnumber.h140
-rw-r--r--src/gui/widgets/qlineedit.cpp3696
-rw-r--r--src/gui/widgets/qlineedit.h283
-rw-r--r--src/gui/widgets/qlineedit_p.h250
-rw-r--r--src/gui/widgets/qmaccocoaviewcontainer_mac.h73
-rw-r--r--src/gui/widgets/qmaccocoaviewcontainer_mac.mm190
-rw-r--r--src/gui/widgets/qmacnativewidget_mac.h74
-rw-r--r--src/gui/widgets/qmacnativewidget_mac.mm136
-rw-r--r--src/gui/widgets/qmainwindow.cpp1591
-rw-r--r--src/gui/widgets/qmainwindow.h217
-rw-r--r--src/gui/widgets/qmainwindowlayout.cpp1986
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm469
-rw-r--r--src/gui/widgets/qmainwindowlayout_p.h374
-rw-r--r--src/gui/widgets/qmdiarea.cpp2597
-rw-r--r--src/gui/widgets/qmdiarea.h169
-rw-r--r--src/gui/widgets/qmdiarea_p.h281
-rw-r--r--src/gui/widgets/qmdisubwindow.cpp3552
-rw-r--r--src/gui/widgets/qmdisubwindow.h159
-rw-r--r--src/gui/widgets/qmdisubwindow_p.h348
-rw-r--r--src/gui/widgets/qmenu.cpp3467
-rw-r--r--src/gui/widgets/qmenu.h428
-rw-r--r--src/gui/widgets/qmenu_mac.mm2038
-rw-r--r--src/gui/widgets/qmenu_p.h329
-rw-r--r--src/gui/widgets/qmenu_wince.cpp608
-rw-r--r--src/gui/widgets/qmenu_wince.rc231
-rw-r--r--src/gui/widgets/qmenu_wince_resource_p.h94
-rw-r--r--src/gui/widgets/qmenubar.cpp2405
-rw-r--r--src/gui/widgets/qmenubar.h363
-rw-r--r--src/gui/widgets/qmenubar_p.h230
-rw-r--r--src/gui/widgets/qmenudata.cpp96
-rw-r--r--src/gui/widgets/qmenudata.h78
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2893
-rw-r--r--src/gui/widgets/qplaintextedit.h326
-rw-r--r--src/gui/widgets/qplaintextedit_p.h182
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp829
-rw-r--r--src/gui/widgets/qprintpreviewwidget.h124
-rw-r--r--src/gui/widgets/qprogressbar.cpp592
-rw-r--r--src/gui/widgets/qprogressbar.h130
-rw-r--r--src/gui/widgets/qpushbutton.cpp732
-rw-r--r--src/gui/widgets/qpushbutton.h124
-rw-r--r--src/gui/widgets/qpushbutton_p.h82
-rw-r--r--src/gui/widgets/qradiobutton.cpp288
-rw-r--r--src/gui/widgets/qradiobutton.h88
-rw-r--r--src/gui/widgets/qrubberband.cpp339
-rw-r--r--src/gui/widgets/qrubberband.h104
-rw-r--r--src/gui/widgets/qscrollarea.cpp522
-rw-r--r--src/gui/widgets/qscrollarea.h101
-rw-r--r--src/gui/widgets/qscrollarea_p.h81
-rw-r--r--src/gui/widgets/qscrollbar.cpp740
-rw-r--r--src/gui/widgets/qscrollbar.h104
-rw-r--r--src/gui/widgets/qsizegrip.cpp566
-rw-r--r--src/gui/widgets/qsizegrip.h95
-rw-r--r--src/gui/widgets/qslider.cpp676
-rw-r--r--src/gui/widgets/qslider.h134
-rw-r--r--src/gui/widgets/qspinbox.cpp1536
-rw-r--r--src/gui/widgets/qspinbox.h188
-rw-r--r--src/gui/widgets/qsplashscreen.cpp350
-rw-r--r--src/gui/widgets/qsplashscreen.h99
-rw-r--r--src/gui/widgets/qsplitter.cpp1831
-rw-r--r--src/gui/widgets/qsplitter.h191
-rw-r--r--src/gui/widgets/qsplitter_p.h148
-rw-r--r--src/gui/widgets/qstackedwidget.cpp294
-rw-r--r--src/gui/widgets/qstackedwidget.h100
-rw-r--r--src/gui/widgets/qstatusbar.cpp847
-rw-r--r--src/gui/widgets/qstatusbar.h116
-rw-r--r--src/gui/widgets/qtabbar.cpp2301
-rw-r--r--src/gui/widgets/qtabbar.h228
-rw-r--r--src/gui/widgets/qtabbar_p.h265
-rw-r--r--src/gui/widgets/qtabwidget.cpp1450
-rw-r--r--src/gui/widgets/qtabwidget.h252
-rw-r--r--src/gui/widgets/qtextbrowser.cpp1275
-rw-r--r--src/gui/widgets/qtextbrowser.h140
-rw-r--r--src/gui/widgets/qtextedit.cpp2783
-rw-r--r--src/gui/widgets/qtextedit.h430
-rw-r--r--src/gui/widgets/qtextedit_p.h141
-rw-r--r--src/gui/widgets/qtoolbar.cpp1291
-rw-r--r--src/gui/widgets/qtoolbar.h187
-rw-r--r--src/gui/widgets/qtoolbar_p.h135
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp1370
-rw-r--r--src/gui/widgets/qtoolbararealayout_p.h199
-rw-r--r--src/gui/widgets/qtoolbarextension.cpp90
-rw-r--r--src/gui/widgets/qtoolbarextension_p.h80
-rw-r--r--src/gui/widgets/qtoolbarlayout.cpp752
-rw-r--r--src/gui/widgets/qtoolbarlayout_p.h136
-rw-r--r--src/gui/widgets/qtoolbarseparator.cpp91
-rw-r--r--src/gui/widgets/qtoolbarseparator_p.h88
-rw-r--r--src/gui/widgets/qtoolbox.cpp822
-rw-r--r--src/gui/widgets/qtoolbox.h148
-rw-r--r--src/gui/widgets/qtoolbutton.cpp1250
-rw-r--r--src/gui/widgets/qtoolbutton.h199
-rw-r--r--src/gui/widgets/qvalidator.cpp909
-rw-r--r--src/gui/widgets/qvalidator.h215
-rw-r--r--src/gui/widgets/qwidgetanimator.cpp198
-rw-r--r--src/gui/widgets/qwidgetanimator_p.h102
-rw-r--r--src/gui/widgets/qwidgetresizehandler.cpp547
-rw-r--r--src/gui/widgets/qwidgetresizehandler_p.h141
-rw-r--r--src/gui/widgets/qworkspace.cpp3382
-rw-r--r--src/gui/widgets/qworkspace.h137
-rw-r--r--src/gui/widgets/widgets.pri162
-rw-r--r--src/network/access/access.pri53
-rw-r--r--src/network/access/qabstractnetworkcache.cpp532
-rw-r--r--src/network/access/qabstractnetworkcache.h141
-rw-r--r--src/network/access/qabstractnetworkcache_p.h66
-rw-r--r--src/network/access/qftp.cpp2407
-rw-r--r--src/network/access/qftp.h180
-rw-r--r--src/network/access/qhttp.cpp3120
-rw-r--r--src/network/access/qhttp.h311
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp2464
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h290
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp318
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h202
-rw-r--r--src/network/access/qnetworkaccesscache.cpp379
-rw-r--r--src/network/access/qnetworkaccesscache_p.h127
-rw-r--r--src/network/access/qnetworkaccesscachebackend.cpp143
-rw-r--r--src/network/access/qnetworkaccesscachebackend_p.h86
-rw-r--r--src/network/access/qnetworkaccessdatabackend.cpp150
-rw-r--r--src/network/access/qnetworkaccessdatabackend_p.h82
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend.cpp346
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend_p.h111
-rw-r--r--src/network/access/qnetworkaccessfilebackend.cpp270
-rw-r--r--src/network/access/qnetworkaccessfilebackend_p.h95
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp441
-rw-r--r--src/network/access/qnetworkaccessftpbackend_p.h126
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp1052
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h140
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp961
-rw-r--r--src/network/access/qnetworkaccessmanager.h129
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h121
-rw-r--r--src/network/access/qnetworkcookie.cpp932
-rw-r--r--src/network/access/qnetworkcookie.h141
-rw-r--r--src/network/access/qnetworkcookie_p.h99
-rw-r--r--src/network/access/qnetworkdiskcache.cpp666
-rw-r--r--src/network/access/qnetworkdiskcache.h94
-rw-r--r--src/network/access/qnetworkdiskcache_p.h122
-rw-r--r--src/network/access/qnetworkreply.cpp691
-rw-r--r--src/network/access/qnetworkreply.h171
-rw-r--r--src/network/access/qnetworkreply_p.h83
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp598
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h181
-rw-r--r--src/network/access/qnetworkrequest.cpp803
-rw-r--r--src/network/access/qnetworkrequest.h131
-rw-r--r--src/network/access/qnetworkrequest_p.h96
-rw-r--r--src/network/kernel/kernel.pri30
-rw-r--r--src/network/kernel/qauthenticator.cpp1026
-rw-r--r--src/network/kernel/qauthenticator.h87
-rw-r--r--src/network/kernel/qauthenticator_p.h111
-rw-r--r--src/network/kernel/qhostaddress.cpp1166
-rw-r--r--src/network/kernel/qhostaddress.h154
-rw-r--r--src/network/kernel/qhostaddress_p.h76
-rw-r--r--src/network/kernel/qhostinfo.cpp479
-rw-r--r--src/network/kernel/qhostinfo.h101
-rw-r--r--src/network/kernel/qhostinfo_p.h196
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp379
-rw-r--r--src/network/kernel/qhostinfo_win.cpp295
-rw-r--r--src/network/kernel/qnetworkinterface.cpp615
-rw-r--r--src/network/kernel/qnetworkinterface.h135
-rw-r--r--src/network/kernel/qnetworkinterface_p.h123
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp448
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp327
-rw-r--r--src/network/kernel/qnetworkinterface_win_p.h266
-rw-r--r--src/network/kernel/qnetworkproxy.cpp1255
-rw-r--r--src/network/kernel/qnetworkproxy.h185
-rw-r--r--src/network/kernel/qnetworkproxy_generic.cpp59
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp240
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp415
-rw-r--r--src/network/kernel/qurlinfo.cpp731
-rw-r--r--src/network/kernel/qurlinfo.h131
-rw-r--r--src/network/network.pro17
-rw-r--r--src/network/network.qrc5
-rw-r--r--src/network/socket/qabstractsocket.cpp2631
-rw-r--r--src/network/socket/qabstractsocket.h248
-rw-r--r--src/network/socket/qabstractsocket_p.h163
-rw-r--r--src/network/socket/qabstractsocketengine.cpp254
-rw-r--r--src/network/socket/qabstractsocketengine_p.h217
-rw-r--r--src/network/socket/qhttpsocketengine.cpp773
-rw-r--r--src/network/socket/qhttpsocketengine_p.h188
-rw-r--r--src/network/socket/qlocalserver.cpp395
-rw-r--r--src/network/socket/qlocalserver.h107
-rw-r--r--src/network/socket/qlocalserver_p.h165
-rw-r--r--src/network/socket/qlocalserver_tcp.cpp129
-rw-r--r--src/network/socket/qlocalserver_unix.cpp251
-rw-r--r--src/network/socket/qlocalserver_win.cpp252
-rw-r--r--src/network/socket/qlocalsocket.cpp504
-rw-r--r--src/network/socket/qlocalsocket.h157
-rw-r--r--src/network/socket/qlocalsocket_p.h212
-rw-r--r--src/network/socket/qlocalsocket_tcp.cpp437
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp566
-rw-r--r--src/network/socket/qlocalsocket_win.cpp537
-rw-r--r--src/network/socket/qnativesocketengine.cpp1140
-rw-r--r--src/network/socket/qnativesocketengine_p.h250
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp949
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp1211
-rw-r--r--src/network/socket/qsocks5socketengine.cpp1850
-rw-r--r--src/network/socket/qsocks5socketengine_p.h288
-rw-r--r--src/network/socket/qtcpserver.cpp643
-rw-r--r--src/network/socket/qtcpserver.h109
-rw-r--r--src/network/socket/qtcpsocket.cpp114
-rw-r--r--src/network/socket/qtcpsocket.h74
-rw-r--r--src/network/socket/qtcpsocket_p.h68
-rw-r--r--src/network/socket/qudpsocket.cpp424
-rw-r--r--src/network/socket/qudpsocket.h99
-rw-r--r--src/network/socket/socket.pri46
-rw-r--r--src/network/ssl/qssl.cpp117
-rw-r--r--src/network/ssl/qssl.h88
-rw-r--r--src/network/ssl/qsslcertificate.cpp795
-rw-r--r--src/network/ssl/qsslcertificate.h138
-rw-r--r--src/network/ssl/qsslcertificate_p.h108
-rw-r--r--src/network/ssl/qsslcipher.cpp239
-rw-r--r--src/network/ssl/qsslcipher.h97
-rw-r--r--src/network/ssl/qsslcipher_p.h78
-rw-r--r--src/network/ssl/qsslconfiguration.cpp545
-rw-r--r--src/network/ssl/qsslconfiguration.h137
-rw-r--r--src/network/ssl/qsslconfiguration_p.h115
-rw-r--r--src/network/ssl/qsslerror.cpp293
-rw-r--r--src/network/ssl/qsslerror.h117
-rw-r--r--src/network/ssl/qsslkey.cpp468
-rw-r--r--src/network/ssl/qsslkey.h110
-rw-r--r--src/network/ssl/qsslkey_p.h98
-rw-r--r--src/network/ssl/qsslsocket.cpp2072
-rw-r--r--src/network/ssl/qsslsocket.h218
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp929
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h116
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp650
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h394
-rw-r--r--src/network/ssl/qsslsocket_p.h134
-rw-r--r--src/network/ssl/qt-ca-bundle.crt1984
-rw-r--r--src/network/ssl/ssl.pri33
-rw-r--r--src/opengl/gl2paintengineex/glgc_shader_source.h289
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp156
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h121
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache.cpp185
-rw-r--r--src/opengl/gl2paintengineex/qglgradientcache_p.h108
-rw-r--r--src/opengl/gl2paintengineex/qglpexshadermanager.cpp450
-rw-r--r--src/opengl/gl2paintengineex/qglpexshadermanager_p.h156
-rw-r--r--src/opengl/gl2paintengineex/qglshader.cpp605
-rw-r--r--src/opengl/gl2paintengineex/qglshader_p.h260
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp1278
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h125
-rw-r--r--src/opengl/opengl.pro135
-rw-r--r--src/opengl/qegl.cpp787
-rw-r--r--src/opengl/qegl_p.h188
-rw-r--r--src/opengl/qegl_qws.cpp125
-rw-r--r--src/opengl/qegl_wince.cpp105
-rw-r--r--src/opengl/qegl_x11egl.cpp130
-rw-r--r--src/opengl/qgl.cpp4205
-rw-r--r--src/opengl/qgl.h566
-rw-r--r--src/opengl/qgl_cl_p.h141
-rw-r--r--src/opengl/qgl_egl.cpp131
-rw-r--r--src/opengl/qgl_egl_p.h68
-rw-r--r--src/opengl/qgl_mac.mm982
-rw-r--r--src/opengl/qgl_p.h396
-rw-r--r--src/opengl/qgl_qws.cpp364
-rw-r--r--src/opengl/qgl_win.cpp1499
-rw-r--r--src/opengl/qgl_wince.cpp739
-rw-r--r--src/opengl/qgl_x11.cpp1425
-rw-r--r--src/opengl/qgl_x11egl.cpp378
-rw-r--r--src/opengl/qglcolormap.cpp287
-rw-r--r--src/opengl/qglcolormap.h105
-rw-r--r--src/opengl/qglextensions.cpp185
-rw-r--r--src/opengl/qglextensions_p.h516
-rw-r--r--src/opengl/qglframebufferobject.cpp749
-rw-r--r--src/opengl/qglframebufferobject.h126
-rw-r--r--src/opengl/qglpaintdevice_qws.cpp98
-rw-r--r--src/opengl/qglpaintdevice_qws_p.h85
-rw-r--r--src/opengl/qglpixelbuffer.cpp582
-rw-r--r--src/opengl/qglpixelbuffer.h119
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp211
-rw-r--r--src/opengl/qglpixelbuffer_mac.mm338
-rw-r--r--src/opengl/qglpixelbuffer_p.h193
-rw-r--r--src/opengl/qglpixelbuffer_win.cpp390
-rw-r--r--src/opengl/qglpixelbuffer_x11.cpp301
-rw-r--r--src/opengl/qglpixmapfilter.cpp409
-rw-r--r--src/opengl/qglpixmapfilter_p.h123
-rw-r--r--src/opengl/qglscreen_qws.cpp242
-rw-r--r--src/opengl/qglscreen_qws.h127
-rw-r--r--src/opengl/qglwindowsurface_qws.cpp134
-rw-r--r--src/opengl/qglwindowsurface_qws_p.h90
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp72
-rw-r--r--src/opengl/qgraphicssystem_gl_p.h74
-rw-r--r--src/opengl/qpaintengine_opengl.cpp5787
-rw-r--r--src/opengl/qpaintengine_opengl_p.h155
-rw-r--r--src/opengl/qpixmapdata_gl.cpp321
-rw-r--r--src/opengl/qpixmapdata_gl_p.h109
-rw-r--r--src/opengl/qwindowsurface_gl.cpp661
-rw-r--r--src/opengl/qwindowsurface_gl_p.h102
-rw-r--r--src/opengl/util/README-GLSL18
-rw-r--r--src/opengl/util/brush_painter.glsl7
-rw-r--r--src/opengl/util/brushes.conf6
-rw-r--r--src/opengl/util/composition_mode_colorburn.glsl13
-rw-r--r--src/opengl/util/composition_mode_colordodge.glsl15
-rw-r--r--src/opengl/util/composition_mode_darken.glsl9
-rw-r--r--src/opengl/util/composition_mode_difference.glsl9
-rw-r--r--src/opengl/util/composition_mode_exclusion.glsl9
-rw-r--r--src/opengl/util/composition_mode_hardlight.glsl14
-rw-r--r--src/opengl/util/composition_mode_lighten.glsl9
-rw-r--r--src/opengl/util/composition_mode_multiply.glsl9
-rw-r--r--src/opengl/util/composition_mode_overlay.glsl13
-rw-r--r--src/opengl/util/composition_mode_screen.glsl6
-rw-r--r--src/opengl/util/composition_mode_softlight.glsl18
-rw-r--r--src/opengl/util/composition_modes.conf12
-rw-r--r--src/opengl/util/conical_brush.glsl27
-rw-r--r--src/opengl/util/ellipse.glsl6
-rw-r--r--src/opengl/util/ellipse_aa.glsl6
-rw-r--r--src/opengl/util/ellipse_aa_copy.glsl11
-rw-r--r--src/opengl/util/ellipse_aa_radial.glsl24
-rw-r--r--src/opengl/util/ellipse_functions.glsl63
-rw-r--r--src/opengl/util/fast_painter.glsl19
-rw-r--r--src/opengl/util/fragmentprograms_p.h7372
-rw-r--r--src/opengl/util/generator.cpp435
-rw-r--r--src/opengl/util/generator.pro11
-rwxr-xr-xsrc/opengl/util/glsl_to_include.sh33
-rw-r--r--src/opengl/util/linear_brush.glsl22
-rw-r--r--src/opengl/util/masks.conf3
-rw-r--r--src/opengl/util/painter.glsl21
-rw-r--r--src/opengl/util/painter_nomask.glsl9
-rw-r--r--src/opengl/util/pattern_brush.glsl25
-rw-r--r--src/opengl/util/radial_brush.glsl28
-rw-r--r--src/opengl/util/simple_porter_duff.glsl16
-rw-r--r--src/opengl/util/solid_brush.glsl4
-rw-r--r--src/opengl/util/texture_brush.glsl23
-rw-r--r--src/opengl/util/trap_exact_aa.glsl58
-rw-r--r--src/phonon/phonon.pro115
-rw-r--r--src/plugins/accessible/accessible.pro6
-rw-r--r--src/plugins/accessible/compat/compat.pro20
-rw-r--r--src/plugins/accessible/compat/main.cpp130
-rw-r--r--src/plugins/accessible/compat/q3complexwidgets.cpp340
-rw-r--r--src/plugins/accessible/compat/q3complexwidgets.h88
-rw-r--r--src/plugins/accessible/compat/q3simplewidgets.cpp133
-rw-r--r--src/plugins/accessible/compat/q3simplewidgets.h63
-rw-r--r--src/plugins/accessible/compat/qaccessiblecompat.cpp843
-rw-r--r--src/plugins/accessible/compat/qaccessiblecompat.h168
-rw-r--r--src/plugins/accessible/qaccessiblebase.pri2
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp2163
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.h293
-rw-r--r--src/plugins/accessible/widgets/main.cpp339
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.cpp678
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.h140
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp1667
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.h318
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.cpp991
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h233
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp762
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h156
-rw-r--r--src/plugins/accessible/widgets/widgets.pro20
-rw-r--r--src/plugins/codecs/cn/cn.pro14
-rw-r--r--src/plugins/codecs/cn/main.cpp145
-rw-r--r--src/plugins/codecs/cn/qgb18030codec.cpp9233
-rw-r--r--src/plugins/codecs/cn/qgb18030codec.h159
-rw-r--r--src/plugins/codecs/codecs.pro4
-rw-r--r--src/plugins/codecs/jp/jp.pro25
-rw-r--r--src/plugins/codecs/jp/main.cpp149
-rw-r--r--src/plugins/codecs/jp/qeucjpcodec.cpp262
-rw-r--r--src/plugins/codecs/jp/qeucjpcodec.h106
-rw-r--r--src/plugins/codecs/jp/qfontjpcodec.cpp145
-rw-r--r--src/plugins/codecs/jp/qfontjpcodec.h93
-rw-r--r--src/plugins/codecs/jp/qjiscodec.cpp367
-rw-r--r--src/plugins/codecs/jp/qjiscodec.h106
-rw-r--r--src/plugins/codecs/jp/qjpunicode.cpp10700
-rw-r--r--src/plugins/codecs/jp/qjpunicode.h174
-rw-r--r--src/plugins/codecs/jp/qsjiscodec.cpp227
-rw-r--r--src/plugins/codecs/jp/qsjiscodec.h106
-rw-r--r--src/plugins/codecs/kr/cp949codetbl.h632
-rw-r--r--src/plugins/codecs/kr/kr.pro18
-rw-r--r--src/plugins/codecs/kr/main.cpp131
-rw-r--r--src/plugins/codecs/kr/qeuckrcodec.cpp3583
-rw-r--r--src/plugins/codecs/kr/qeuckrcodec.h129
-rw-r--r--src/plugins/codecs/tw/main.cpp138
-rw-r--r--src/plugins/codecs/tw/qbig5codec.cpp12788
-rw-r--r--src/plugins/codecs/tw/qbig5codec.h124
-rw-r--r--src/plugins/codecs/tw/tw.pro14
-rw-r--r--src/plugins/decorations/decorations.pro4
-rw-r--r--src/plugins/decorations/default/default.pro10
-rw-r--r--src/plugins/decorations/default/main.cpp76
-rw-r--r--src/plugins/decorations/styled/main.cpp77
-rw-r--r--src/plugins/decorations/styled/styled.pro13
-rw-r--r--src/plugins/decorations/windows/main.cpp76
-rw-r--r--src/plugins/decorations/windows/windows.pro10
-rw-r--r--src/plugins/gfxdrivers/ahi/ahi.pro14
-rw-r--r--src/plugins/gfxdrivers/ahi/qscreenahi_qws.cpp598
-rw-r--r--src/plugins/gfxdrivers/ahi/qscreenahi_qws.h84
-rw-r--r--src/plugins/gfxdrivers/ahi/qscreenahiplugin.cpp74
-rw-r--r--src/plugins/gfxdrivers/directfb/directfb.pro40
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.cpp321
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h69
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.cpp272
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbmouse.h73
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp201
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h84
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp1274
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h114
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp363
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h83
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp1067
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.h136
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.cpp75
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp393
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.h102
-rw-r--r--src/plugins/gfxdrivers/gfxdrivers.pro10
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybrid.pro16
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybridplugin.cpp75
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybridscreen.cpp382
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybridscreen.h97
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybridsurface.cpp300
-rw-r--r--src/plugins/gfxdrivers/hybrid/hybridsurface.h90
-rw-r--r--src/plugins/gfxdrivers/linuxfb/linuxfb.pro14
-rw-r--r--src/plugins/gfxdrivers/linuxfb/main.cpp79
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro24
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c856
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h181
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable_p.h129
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c384
-rw-r--r--src/plugins/gfxdrivers/powervr/README56
-rw-r--r--src/plugins/gfxdrivers/powervr/powervr.pro3
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp390
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.h113
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.pro24
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreenplugin.cpp74
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp219
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h83
-rw-r--r--src/plugins/gfxdrivers/qvfb/main.cpp80
-rw-r--r--src/plugins/gfxdrivers/qvfb/qvfb.pro19
-rw-r--r--src/plugins/gfxdrivers/transformed/main.cpp80
-rw-r--r--src/plugins/gfxdrivers/transformed/transformed.pro13
-rw-r--r--src/plugins/gfxdrivers/vnc/main.cpp80
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_p.h522
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp2297
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.h88
-rw-r--r--src/plugins/gfxdrivers/vnc/vnc.pro16
-rw-r--r--src/plugins/graphicssystems/graphicssystems.pro2
-rw-r--r--src/plugins/graphicssystems/opengl/main.cpp69
-rw-r--r--src/plugins/graphicssystems/opengl/opengl.pro11
-rw-r--r--src/plugins/iconengines/iconengines.pro3
-rw-r--r--src/plugins/iconengines/svgiconengine/main.cpp84
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp363
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.h84
-rw-r--r--src/plugins/iconengines/svgiconengine/svgiconengine.pro11
-rw-r--r--src/plugins/imageformats/gif/gif.pro10
-rw-r--r--src/plugins/imageformats/gif/main.cpp98
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp892
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.h95
-rw-r--r--src/plugins/imageformats/ico/ico.pro12
-rw-r--r--src/plugins/imageformats/ico/main.cpp96
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp862
-rw-r--r--src/plugins/imageformats/ico/qicohandler.h72
-rw-r--r--src/plugins/imageformats/imageformats.pro8
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro73
-rw-r--r--src/plugins/imageformats/jpeg/main.cpp97
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp1264
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.h75
-rw-r--r--src/plugins/imageformats/mng/main.cpp98
-rw-r--r--src/plugins/imageformats/mng/mng.pro49
-rw-r--r--src/plugins/imageformats/mng/qmnghandler.cpp500
-rw-r--r--src/plugins/imageformats/mng/qmnghandler.h82
-rw-r--r--src/plugins/imageformats/svg/main.cpp102
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp191
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.h77
-rw-r--r--src/plugins/imageformats/svg/svg.pro11
-rw-r--r--src/plugins/imageformats/tiff/main.cpp97
-rw-r--r--src/plugins/imageformats/tiff/qtiffhandler.cpp328
-rw-r--r--src/plugins/imageformats/tiff/qtiffhandler.h78
-rw-r--r--src/plugins/imageformats/tiff/tiff.pro70
-rw-r--r--src/plugins/inputmethods/imsw-multi/imsw-multi.pro13
-rw-r--r--src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp212
-rw-r--r--src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h117
-rw-r--r--src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp111
-rw-r--r--src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.h85
-rw-r--r--src/plugins/inputmethods/inputmethods.pro3
-rw-r--r--src/plugins/kbddrivers/kbddrivers.pro6
-rw-r--r--src/plugins/kbddrivers/linuxis/README1
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxis.pro11
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.cpp87
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.h58
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp171
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbdhandler.h80
-rw-r--r--src/plugins/kbddrivers/sl5000/main.cpp77
-rw-r--r--src/plugins/kbddrivers/sl5000/sl5000.pro16
-rw-r--r--src/plugins/kbddrivers/usb/main.cpp77
-rw-r--r--src/plugins/kbddrivers/usb/usb.pro14
-rw-r--r--src/plugins/kbddrivers/vr41xx/main.cpp77
-rw-r--r--src/plugins/kbddrivers/vr41xx/vr41xx.pro14
-rw-r--r--src/plugins/kbddrivers/yopy/main.cpp77
-rw-r--r--src/plugins/kbddrivers/yopy/yopy.pro14
-rw-r--r--src/plugins/mousedrivers/bus/bus.pro14
-rw-r--r--src/plugins/mousedrivers/bus/main.cpp76
-rw-r--r--src/plugins/mousedrivers/linuxis/linuxis.pro10
-rw-r--r--src/plugins/mousedrivers/linuxis/linuxismousedriverplugin.cpp83
-rw-r--r--src/plugins/mousedrivers/linuxis/linuxismousedriverplugin.h58
-rw-r--r--src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp180
-rw-r--r--src/plugins/mousedrivers/linuxis/linuxismousehandler.h72
-rw-r--r--src/plugins/mousedrivers/linuxtp/linuxtp.pro14
-rw-r--r--src/plugins/mousedrivers/linuxtp/main.cpp76
-rw-r--r--src/plugins/mousedrivers/mousedrivers.pro8
-rw-r--r--src/plugins/mousedrivers/pc/main.cpp81
-rw-r--r--src/plugins/mousedrivers/pc/pc.pro14
-rw-r--r--src/plugins/mousedrivers/tslib/main.cpp77
-rw-r--r--src/plugins/mousedrivers/tslib/tslib.pro16
-rw-r--r--src/plugins/mousedrivers/vr41xx/main.cpp76
-rw-r--r--src/plugins/mousedrivers/vr41xx/vr41xx.pro14
-rw-r--r--src/plugins/mousedrivers/yopy/main.cpp76
-rw-r--r--src/plugins/mousedrivers/yopy/yopy.pro14
-rw-r--r--src/plugins/phonon/ds9/ds9.pro60
-rw-r--r--src/plugins/phonon/gstreamer/gstreamer.pro67
-rw-r--r--src/plugins/phonon/phonon.pro9
-rw-r--r--src/plugins/phonon/qt7/qt7.pro76
-rw-r--r--src/plugins/phonon/waveout/waveout.pro23
-rw-r--r--src/plugins/plugins.pro12
-rw-r--r--src/plugins/qpluginbase.pri15
-rw-r--r--src/plugins/script/qtdbus/main.cpp396
-rw-r--r--src/plugins/script/qtdbus/main.h176
-rw-r--r--src/plugins/script/qtdbus/qtdbus.pro11
-rw-r--r--src/plugins/script/script.pro2
-rw-r--r--src/plugins/sqldrivers/README5
-rw-r--r--src/plugins/sqldrivers/db2/README6
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro10
-rw-r--r--src/plugins/sqldrivers/db2/main.cpp81
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro14
-rw-r--r--src/plugins/sqldrivers/ibase/main.cpp81
-rw-r--r--src/plugins/sqldrivers/mysql/README6
-rw-r--r--src/plugins/sqldrivers/mysql/main.cpp82
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro23
-rw-r--r--src/plugins/sqldrivers/oci/README6
-rw-r--r--src/plugins/sqldrivers/oci/main.cpp82
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro13
-rw-r--r--src/plugins/sqldrivers/odbc/README6
-rw-r--r--src/plugins/sqldrivers/odbc/main.cpp82
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro24
-rw-r--r--src/plugins/sqldrivers/psql/README6
-rw-r--r--src/plugins/sqldrivers/psql/main.cpp82
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro21
-rw-r--r--src/plugins/sqldrivers/qsqldriverbase.pri8
-rw-r--r--src/plugins/sqldrivers/sqldrivers.pro11
-rw-r--r--src/plugins/sqldrivers/sqlite/README6
-rw-r--r--src/plugins/sqldrivers/sqlite/smain.cpp81
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro17
-rw-r--r--src/plugins/sqldrivers/sqlite2/README6
-rw-r--r--src/plugins/sqldrivers/sqlite2/smain.cpp81
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro9
-rw-r--r--src/plugins/sqldrivers/tds/README6
-rw-r--r--src/plugins/sqldrivers/tds/main.cpp89
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro15
-rw-r--r--src/qbase.pri154
-rw-r--r--src/qt3support/canvas/canvas.pri2
-rw-r--r--src/qt3support/canvas/q3canvas.cpp5165
-rw-r--r--src/qt3support/canvas/q3canvas.h787
-rw-r--r--src/qt3support/dialogs/dialogs.pri16
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp6203
-rw-r--r--src/qt3support/dialogs/q3filedialog.h346
-rw-r--r--src/qt3support/dialogs/q3filedialog_mac.cpp569
-rw-r--r--src/qt3support/dialogs/q3filedialog_win.cpp749
-rw-r--r--src/qt3support/dialogs/q3progressdialog.cpp850
-rw-r--r--src/qt3support/dialogs/q3progressdialog.h149
-rw-r--r--src/qt3support/dialogs/q3tabdialog.cpp1087
-rw-r--r--src/qt3support/dialogs/q3tabdialog.h143
-rw-r--r--src/qt3support/dialogs/q3wizard.cpp906
-rw-r--r--src/qt3support/dialogs/q3wizard.h141
-rw-r--r--src/qt3support/itemviews/itemviews.pri11
-rw-r--r--src/qt3support/itemviews/q3iconview.cpp6203
-rw-r--r--src/qt3support/itemviews/q3iconview.h519
-rw-r--r--src/qt3support/itemviews/q3listbox.cpp4687
-rw-r--r--src/qt3support/itemviews/q3listbox.h429
-rw-r--r--src/qt3support/itemviews/q3listview.cpp7949
-rw-r--r--src/qt3support/itemviews/q3listview.h609
-rw-r--r--src/qt3support/itemviews/q3table.cpp7333
-rw-r--r--src/qt3support/itemviews/q3table.h548
-rw-r--r--src/qt3support/network/network.pri30
-rw-r--r--src/qt3support/network/q3dns.cpp2620
-rw-r--r--src/qt3support/network/q3dns.h174
-rw-r--r--src/qt3support/network/q3ftp.cpp2378
-rw-r--r--src/qt3support/network/q3ftp.h204
-rw-r--r--src/qt3support/network/q3http.cpp2322
-rw-r--r--src/qt3support/network/q3http.h278
-rw-r--r--src/qt3support/network/q3localfs.cpp404
-rw-r--r--src/qt3support/network/q3localfs.h84
-rw-r--r--src/qt3support/network/q3network.cpp73
-rw-r--r--src/qt3support/network/q3network.h63
-rw-r--r--src/qt3support/network/q3networkprotocol.cpp1209
-rw-r--r--src/qt3support/network/q3networkprotocol.h250
-rw-r--r--src/qt3support/network/q3serversocket.cpp298
-rw-r--r--src/qt3support/network/q3serversocket.h94
-rw-r--r--src/qt3support/network/q3socket.cpp1518
-rw-r--r--src/qt3support/network/q3socket.h157
-rw-r--r--src/qt3support/network/q3socketdevice.cpp757
-rw-r--r--src/qt3support/network/q3socketdevice.h177
-rw-r--r--src/qt3support/network/q3socketdevice_unix.cpp926
-rw-r--r--src/qt3support/network/q3socketdevice_win.cpp1068
-rw-r--r--src/qt3support/network/q3url.cpp1319
-rw-r--r--src/qt3support/network/q3url.h139
-rw-r--r--src/qt3support/network/q3urloperator.cpp1212
-rw-r--r--src/qt3support/network/q3urloperator.h138
-rw-r--r--src/qt3support/other/other.pri24
-rw-r--r--src/qt3support/other/q3accel.cpp982
-rw-r--r--src/qt3support/other/q3accel.h110
-rw-r--r--src/qt3support/other/q3boxlayout.cpp132
-rw-r--r--src/qt3support/other/q3boxlayout.h122
-rw-r--r--src/qt3support/other/q3dragobject.cpp1577
-rw-r--r--src/qt3support/other/q3dragobject.h218
-rw-r--r--src/qt3support/other/q3dropsite.cpp82
-rw-r--r--src/qt3support/other/q3dropsite.h65
-rw-r--r--src/qt3support/other/q3gridlayout.h78
-rw-r--r--src/qt3support/other/q3membuf.cpp171
-rw-r--r--src/qt3support/other/q3membuf_p.h103
-rw-r--r--src/qt3support/other/q3mimefactory.cpp546
-rw-r--r--src/qt3support/other/q3mimefactory.h102
-rw-r--r--src/qt3support/other/q3polygonscanner.cpp939
-rw-r--r--src/qt3support/other/q3polygonscanner.h70
-rw-r--r--src/qt3support/other/q3process.cpp927
-rw-r--r--src/qt3support/other/q3process.h186
-rw-r--r--src/qt3support/other/q3process_unix.cpp1282
-rw-r--r--src/qt3support/other/q3process_win.cpp676
-rw-r--r--src/qt3support/other/qiconset.h48
-rw-r--r--src/qt3support/other/qt_compat_pch.h66
-rw-r--r--src/qt3support/painting/painting.pri15
-rw-r--r--src/qt3support/painting/q3paintdevicemetrics.cpp149
-rw-r--r--src/qt3support/painting/q3paintdevicemetrics.h77
-rw-r--r--src/qt3support/painting/q3paintengine_svg.cpp1538
-rw-r--r--src/qt3support/painting/q3paintengine_svg_p.h128
-rw-r--r--src/qt3support/painting/q3painter.cpp240
-rw-r--r--src/qt3support/painting/q3painter.h121
-rw-r--r--src/qt3support/painting/q3picture.cpp235
-rw-r--r--src/qt3support/painting/q3picture.h68
-rw-r--r--src/qt3support/painting/q3pointarray.cpp189
-rw-r--r--src/qt3support/painting/q3pointarray.h74
-rw-r--r--src/qt3support/qt3support.pro39
-rw-r--r--src/qt3support/sql/q3databrowser.cpp1281
-rw-r--r--src/qt3support/sql/q3databrowser.h183
-rw-r--r--src/qt3support/sql/q3datatable.cpp2335
-rw-r--r--src/qt3support/sql/q3datatable.h251
-rw-r--r--src/qt3support/sql/q3dataview.cpp208
-rw-r--r--src/qt3support/sql/q3dataview.h90
-rw-r--r--src/qt3support/sql/q3editorfactory.cpp202
-rw-r--r--src/qt3support/sql/q3editorfactory.h77
-rw-r--r--src/qt3support/sql/q3sqlcursor.cpp1519
-rw-r--r--src/qt3support/sql/q3sqlcursor.h167
-rw-r--r--src/qt3support/sql/q3sqleditorfactory.cpp229
-rw-r--r--src/qt3support/sql/q3sqleditorfactory.h78
-rw-r--r--src/qt3support/sql/q3sqlfieldinfo.h167
-rw-r--r--src/qt3support/sql/q3sqlform.cpp378
-rw-r--r--src/qt3support/sql/q3sqlform.h109
-rw-r--r--src/qt3support/sql/q3sqlmanager_p.cpp961
-rw-r--r--src/qt3support/sql/q3sqlmanager_p.h160
-rw-r--r--src/qt3support/sql/q3sqlpropertymap.cpp276
-rw-r--r--src/qt3support/sql/q3sqlpropertymap.h86
-rw-r--r--src/qt3support/sql/q3sqlrecordinfo.h122
-rw-r--r--src/qt3support/sql/q3sqlselectcursor.cpp263
-rw-r--r--src/qt3support/sql/q3sqlselectcursor.h115
-rw-r--r--src/qt3support/sql/sql.pri25
-rw-r--r--src/qt3support/text/q3multilineedit.cpp535
-rw-r--r--src/qt3support/text/q3multilineedit.h143
-rw-r--r--src/qt3support/text/q3richtext.cpp8353
-rw-r--r--src/qt3support/text/q3richtext_p.cpp636
-rw-r--r--src/qt3support/text/q3richtext_p.h2102
-rw-r--r--src/qt3support/text/q3simplerichtext.cpp421
-rw-r--r--src/qt3support/text/q3simplerichtext.h109
-rw-r--r--src/qt3support/text/q3stylesheet.cpp1471
-rw-r--r--src/qt3support/text/q3stylesheet.h235
-rw-r--r--src/qt3support/text/q3syntaxhighlighter.cpp223
-rw-r--r--src/qt3support/text/q3syntaxhighlighter.h89
-rw-r--r--src/qt3support/text/q3syntaxhighlighter_p.h114
-rw-r--r--src/qt3support/text/q3textbrowser.cpp526
-rw-r--r--src/qt3support/text/q3textbrowser.h108
-rw-r--r--src/qt3support/text/q3textedit.cpp7244
-rw-r--r--src/qt3support/text/q3textedit.h613
-rw-r--r--src/qt3support/text/q3textstream.cpp2436
-rw-r--r--src/qt3support/text/q3textstream.h297
-rw-r--r--src/qt3support/text/q3textview.cpp84
-rw-r--r--src/qt3support/text/q3textview.h76
-rw-r--r--src/qt3support/text/text.pri25
-rw-r--r--src/qt3support/tools/q3asciicache.h132
-rw-r--r--src/qt3support/tools/q3asciidict.h130
-rw-r--r--src/qt3support/tools/q3cache.h130
-rw-r--r--src/qt3support/tools/q3cleanuphandler.h110
-rw-r--r--src/qt3support/tools/q3cstring.cpp1050
-rw-r--r--src/qt3support/tools/q3cstring.h273
-rw-r--r--src/qt3support/tools/q3deepcopy.cpp123
-rw-r--r--src/qt3support/tools/q3deepcopy.h89
-rw-r--r--src/qt3support/tools/q3dict.h130
-rw-r--r--src/qt3support/tools/q3garray.cpp797
-rw-r--r--src/qt3support/tools/q3garray.h140
-rw-r--r--src/qt3support/tools/q3gcache.cpp867
-rw-r--r--src/qt3support/tools/q3gcache.h137
-rw-r--r--src/qt3support/tools/q3gdict.cpp1154
-rw-r--r--src/qt3support/tools/q3gdict.h233
-rw-r--r--src/qt3support/tools/q3glist.cpp1270
-rw-r--r--src/qt3support/tools/q3glist.h279
-rw-r--r--src/qt3support/tools/q3gvector.cpp597
-rw-r--r--src/qt3support/tools/q3gvector.h132
-rw-r--r--src/qt3support/tools/q3intcache.h131
-rw-r--r--src/qt3support/tools/q3intdict.h126
-rw-r--r--src/qt3support/tools/q3memarray.h144
-rw-r--r--src/qt3support/tools/q3objectdict.h74
-rw-r--r--src/qt3support/tools/q3ptrcollection.cpp186
-rw-r--r--src/qt3support/tools/q3ptrcollection.h83
-rw-r--r--src/qt3support/tools/q3ptrdict.h127
-rw-r--r--src/qt3support/tools/q3ptrlist.h198
-rw-r--r--src/qt3support/tools/q3ptrqueue.h99
-rw-r--r--src/qt3support/tools/q3ptrstack.h99
-rw-r--r--src/qt3support/tools/q3ptrvector.h121
-rw-r--r--src/qt3support/tools/q3semaphore.cpp254
-rw-r--r--src/qt3support/tools/q3semaphore.h83
-rw-r--r--src/qt3support/tools/q3shared.cpp72
-rw-r--r--src/qt3support/tools/q3shared.h65
-rw-r--r--src/qt3support/tools/q3signal.cpp226
-rw-r--r--src/qt3support/tools/q3signal.h97
-rw-r--r--src/qt3support/tools/q3sortedlist.h71
-rw-r--r--src/qt3support/tools/q3strlist.h137
-rw-r--r--src/qt3support/tools/q3strvec.h93
-rw-r--r--src/qt3support/tools/q3tl.h212
-rw-r--r--src/qt3support/tools/q3valuelist.h238
-rw-r--r--src/qt3support/tools/q3valuestack.h75
-rw-r--r--src/qt3support/tools/q3valuevector.h113
-rw-r--r--src/qt3support/tools/tools.pri44
-rw-r--r--src/qt3support/widgets/q3action.cpp2236
-rw-r--r--src/qt3support/widgets/q3action.h225
-rw-r--r--src/qt3support/widgets/q3button.cpp127
-rw-r--r--src/qt3support/widgets/q3button.h71
-rw-r--r--src/qt3support/widgets/q3buttongroup.cpp565
-rw-r--r--src/qt3support/widgets/q3buttongroup.h152
-rw-r--r--src/qt3support/widgets/q3combobox.cpp2356
-rw-r--r--src/qt3support/widgets/q3combobox.h224
-rw-r--r--src/qt3support/widgets/q3datetimeedit.cpp2826
-rw-r--r--src/qt3support/widgets/q3datetimeedit.h288
-rw-r--r--src/qt3support/widgets/q3dockarea.cpp1349
-rw-r--r--src/qt3support/widgets/q3dockarea.h199
-rw-r--r--src/qt3support/widgets/q3dockwindow.cpp2115
-rw-r--r--src/qt3support/widgets/q3dockwindow.h239
-rw-r--r--src/qt3support/widgets/q3frame.cpp200
-rw-r--r--src/qt3support/widgets/q3frame.h90
-rw-r--r--src/qt3support/widgets/q3grid.cpp138
-rw-r--r--src/qt3support/widgets/q3grid.h79
-rw-r--r--src/qt3support/widgets/q3gridview.cpp367
-rw-r--r--src/qt3support/widgets/q3gridview.h137
-rw-r--r--src/qt3support/widgets/q3groupbox.cpp964
-rw-r--r--src/qt3support/widgets/q3groupbox.h159
-rw-r--r--src/qt3support/widgets/q3hbox.cpp145
-rw-r--r--src/qt3support/widgets/q3hbox.h77
-rw-r--r--src/qt3support/widgets/q3header.cpp2040
-rw-r--r--src/qt3support/widgets/q3header.h225
-rw-r--r--src/qt3support/widgets/q3hgroupbox.cpp92
-rw-r--r--src/qt3support/widgets/q3hgroupbox.h69
-rw-r--r--src/qt3support/widgets/q3mainwindow.cpp2427
-rw-r--r--src/qt3support/widgets/q3mainwindow.h267
-rw-r--r--src/qt3support/widgets/q3mainwindow_p.h116
-rw-r--r--src/qt3support/widgets/q3popupmenu.cpp153
-rw-r--r--src/qt3support/widgets/q3popupmenu.h93
-rw-r--r--src/qt3support/widgets/q3progressbar.cpp464
-rw-r--r--src/qt3support/widgets/q3progressbar.h148
-rw-r--r--src/qt3support/widgets/q3rangecontrol.cpp550
-rw-r--r--src/qt3support/widgets/q3rangecontrol.h194
-rw-r--r--src/qt3support/widgets/q3scrollview.cpp2803
-rw-r--r--src/qt3support/widgets/q3scrollview.h253
-rw-r--r--src/qt3support/widgets/q3spinwidget.cpp473
-rw-r--r--src/qt3support/widgets/q3titlebar.cpp645
-rw-r--r--src/qt3support/widgets/q3titlebar_p.h134
-rw-r--r--src/qt3support/widgets/q3toolbar.cpp840
-rw-r--r--src/qt3support/widgets/q3toolbar.h122
-rw-r--r--src/qt3support/widgets/q3vbox.cpp72
-rw-r--r--src/qt3support/widgets/q3vbox.h67
-rw-r--r--src/qt3support/widgets/q3vgroupbox.cpp92
-rw-r--r--src/qt3support/widgets/q3vgroupbox.h69
-rw-r--r--src/qt3support/widgets/q3whatsthis.cpp220
-rw-r--r--src/qt3support/widgets/q3whatsthis.h89
-rw-r--r--src/qt3support/widgets/q3widgetstack.cpp571
-rw-r--r--src/qt3support/widgets/q3widgetstack.h112
-rw-r--r--src/qt3support/widgets/widgets.pri58
-rw-r--r--src/qt_install.pri32
-rw-r--r--src/qt_targets.pri4
-rw-r--r--src/script/instruction.table87
-rw-r--r--src/script/qscript.g2123
-rw-r--r--src/script/qscriptable.cpp195
-rw-r--r--src/script/qscriptable.h89
-rw-r--r--src/script/qscriptable_p.h84
-rw-r--r--src/script/qscriptarray_p.h428
-rw-r--r--src/script/qscriptasm.cpp108
-rw-r--r--src/script/qscriptasm_p.h183
-rw-r--r--src/script/qscriptast.cpp789
-rw-r--r--src/script/qscriptast_p.h1502
-rw-r--r--src/script/qscriptastfwd_p.h146
-rw-r--r--src/script/qscriptastvisitor.cpp58
-rw-r--r--src/script/qscriptastvisitor_p.h295
-rw-r--r--src/script/qscriptbuffer_p.h206
-rw-r--r--src/script/qscriptclass.cpp684
-rw-r--r--src/script/qscriptclass.h121
-rw-r--r--src/script/qscriptclass_p.h91
-rw-r--r--src/script/qscriptclassdata.cpp117
-rw-r--r--src/script/qscriptclassdata_p.h119
-rw-r--r--src/script/qscriptclassinfo_p.h122
-rw-r--r--src/script/qscriptclasspropertyiterator.cpp225
-rw-r--r--src/script/qscriptclasspropertyiterator.h96
-rw-r--r--src/script/qscriptclasspropertyiterator_p.h81
-rw-r--r--src/script/qscriptcompiler.cpp2111
-rw-r--r--src/script/qscriptcompiler_p.h377
-rw-r--r--src/script/qscriptcontext.cpp571
-rw-r--r--src/script/qscriptcontext.h125
-rw-r--r--src/script/qscriptcontext_p.cpp2598
-rw-r--r--src/script/qscriptcontext_p.h361
-rw-r--r--src/script/qscriptcontextfwd_p.h257
-rw-r--r--src/script/qscriptcontextinfo.cpp553
-rw-r--r--src/script/qscriptcontextinfo.h125
-rw-r--r--src/script/qscriptcontextinfo_p.h99
-rw-r--r--src/script/qscriptecmaarray.cpp777
-rw-r--r--src/script/qscriptecmaarray_p.h141
-rw-r--r--src/script/qscriptecmaboolean.cpp137
-rw-r--r--src/script/qscriptecmaboolean_p.h89
-rw-r--r--src/script/qscriptecmacore.cpp120
-rw-r--r--src/script/qscriptecmacore_p.h115
-rw-r--r--src/script/qscriptecmadate.cpp1281
-rw-r--r--src/script/qscriptecmadate_p.h234
-rw-r--r--src/script/qscriptecmaerror.cpp368
-rw-r--r--src/script/qscriptecmaerror_p.h121
-rw-r--r--src/script/qscriptecmafunction.cpp459
-rw-r--r--src/script/qscriptecmafunction_p.h105
-rw-r--r--src/script/qscriptecmaglobal.cpp572
-rw-r--r--src/script/qscriptecmaglobal_p.h141
-rw-r--r--src/script/qscriptecmamath.cpp391
-rw-r--r--src/script/qscriptecmamath_p.h158
-rw-r--r--src/script/qscriptecmanumber.cpp268
-rw-r--r--src/script/qscriptecmanumber_p.h89
-rw-r--r--src/script/qscriptecmaobject.cpp238
-rw-r--r--src/script/qscriptecmaobject_p.h109
-rw-r--r--src/script/qscriptecmaregexp.cpp339
-rw-r--r--src/script/qscriptecmaregexp_p.h142
-rw-r--r--src/script/qscriptecmastring.cpp778
-rw-r--r--src/script/qscriptecmastring_p.h128
-rw-r--r--src/script/qscriptengine.cpp1879
-rw-r--r--src/script/qscriptengine.h481
-rw-r--r--src/script/qscriptengine_p.cpp2724
-rw-r--r--src/script/qscriptengine_p.h828
-rw-r--r--src/script/qscriptengineagent.cpp444
-rw-r--r--src/script/qscriptengineagent.h112
-rw-r--r--src/script/qscriptengineagent_p.h81
-rw-r--r--src/script/qscriptenginefwd_p.h559
-rw-r--r--src/script/qscriptextensioninterface.h73
-rw-r--r--src/script/qscriptextensionplugin.cpp147
-rw-r--r--src/script/qscriptextensionplugin.h79
-rw-r--r--src/script/qscriptextenumeration.cpp209
-rw-r--r--src/script/qscriptextenumeration_p.h126
-rw-r--r--src/script/qscriptextqobject.cpp2209
-rw-r--r--src/script/qscriptextqobject_p.h447
-rw-r--r--src/script/qscriptextvariant.cpp169
-rw-r--r--src/script/qscriptextvariant_p.h106
-rw-r--r--src/script/qscriptfunction.cpp171
-rw-r--r--src/script/qscriptfunction_p.h219
-rw-r--r--src/script/qscriptgc_p.h317
-rw-r--r--src/script/qscriptglobals_p.h104
-rw-r--r--src/script/qscriptgrammar.cpp975
-rw-r--r--src/script/qscriptgrammar_p.h208
-rw-r--r--src/script/qscriptlexer.cpp1122
-rw-r--r--src/script/qscriptlexer_p.h246
-rw-r--r--src/script/qscriptmember_p.h191
-rw-r--r--src/script/qscriptmemberfwd_p.h126
-rw-r--r--src/script/qscriptmemorypool_p.h130
-rw-r--r--src/script/qscriptnameid_p.h77
-rw-r--r--src/script/qscriptnodepool_p.h139
-rw-r--r--src/script/qscriptobject_p.h188
-rw-r--r--src/script/qscriptobjectdata_p.h81
-rw-r--r--src/script/qscriptobjectfwd_p.h112
-rw-r--r--src/script/qscriptparser.cpp1172
-rw-r--r--src/script/qscriptparser_p.h167
-rw-r--r--src/script/qscriptprettypretty.cpp1334
-rw-r--r--src/script/qscriptprettypretty_p.h329
-rw-r--r--src/script/qscriptrepository_p.h91
-rw-r--r--src/script/qscriptstring.cpp227
-rw-r--r--src/script/qscriptstring.h86
-rw-r--r--src/script/qscriptstring_p.h86
-rw-r--r--src/script/qscriptsyntaxchecker.cpp218
-rw-r--r--src/script/qscriptsyntaxchecker_p.h118
-rw-r--r--src/script/qscriptsyntaxcheckresult_p.h80
-rw-r--r--src/script/qscriptvalue.cpp1595
-rw-r--r--src/script/qscriptvalue.h238
-rw-r--r--src/script/qscriptvalue_p.h108
-rw-r--r--src/script/qscriptvaluefwd_p.h89
-rw-r--r--src/script/qscriptvalueimpl.cpp448
-rw-r--r--src/script/qscriptvalueimpl_p.h786
-rw-r--r--src/script/qscriptvalueimplfwd_p.h237
-rw-r--r--src/script/qscriptvalueiterator.cpp328
-rw-r--r--src/script/qscriptvalueiterator.h99
-rw-r--r--src/script/qscriptvalueiterator_p.h75
-rw-r--r--src/script/qscriptvalueiteratorimpl.cpp415
-rw-r--r--src/script/qscriptvalueiteratorimpl_p.h127
-rw-r--r--src/script/qscriptxmlgenerator.cpp1118
-rw-r--r--src/script/qscriptxmlgenerator_p.h330
-rw-r--r--src/script/script.pri124
-rw-r--r--src/script/script.pro12
-rw-r--r--src/scripttools/debugging/debugging.pri157
-rw-r--r--src/scripttools/debugging/images/breakpoint.pngbin0 -> 1046 bytes-rw-r--r--src/scripttools/debugging/images/breakpoint.svg154
-rw-r--r--src/scripttools/debugging/images/d_breakpoint.pngbin0 -> 1056 bytes-rw-r--r--src/scripttools/debugging/images/d_breakpoint.svg154
-rw-r--r--src/scripttools/debugging/images/d_interrupt.pngbin0 -> 367 bytes-rw-r--r--src/scripttools/debugging/images/d_play.pngbin0 -> 376 bytes-rw-r--r--src/scripttools/debugging/images/delete.pngbin0 -> 833 bytes-rw-r--r--src/scripttools/debugging/images/find.pngbin0 -> 843 bytes-rw-r--r--src/scripttools/debugging/images/interrupt.pngbin0 -> 578 bytes-rw-r--r--src/scripttools/debugging/images/location.pngbin0 -> 748 bytes-rw-r--r--src/scripttools/debugging/images/location.svg121
-rw-r--r--src/scripttools/debugging/images/mac/closetab.pngbin0 -> 516 bytes-rw-r--r--src/scripttools/debugging/images/mac/next.pngbin0 -> 1310 bytes-rw-r--r--src/scripttools/debugging/images/mac/plus.pngbin0 -> 810 bytes-rw-r--r--src/scripttools/debugging/images/mac/previous.pngbin0 -> 1080 bytes-rw-r--r--src/scripttools/debugging/images/new.pngbin0 -> 313 bytes-rw-r--r--src/scripttools/debugging/images/play.pngbin0 -> 620 bytes-rw-r--r--src/scripttools/debugging/images/reload.pngbin0 -> 1363 bytes-rw-r--r--src/scripttools/debugging/images/return.pngbin0 -> 694 bytes-rw-r--r--src/scripttools/debugging/images/runtocursor.pngbin0 -> 436 bytes-rw-r--r--src/scripttools/debugging/images/runtonewscript.pngbin0 -> 534 bytes-rw-r--r--src/scripttools/debugging/images/stepinto.pngbin0 -> 419 bytes-rw-r--r--src/scripttools/debugging/images/stepout.pngbin0 -> 408 bytes-rw-r--r--src/scripttools/debugging/images/stepover.pngbin0 -> 487 bytes-rw-r--r--src/scripttools/debugging/images/win/closetab.pngbin0 -> 375 bytes-rw-r--r--src/scripttools/debugging/images/win/next.pngbin0 -> 1038 bytes-rw-r--r--src/scripttools/debugging/images/win/plus.pngbin0 -> 709 bytes-rw-r--r--src/scripttools/debugging/images/win/previous.pngbin0 -> 898 bytes-rw-r--r--src/scripttools/debugging/images/wrap.pngbin0 -> 500 bytes-rw-r--r--src/scripttools/debugging/qscriptbreakpointdata.cpp393
-rw-r--r--src/scripttools/debugging/qscriptbreakpointdata_p.h129
-rw-r--r--src/scripttools/debugging/qscriptbreakpointsmodel.cpp497
-rw-r--r--src/scripttools/debugging/qscriptbreakpointsmodel_p.h107
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidget.cpp393
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidget_p.h90
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidgetinterface_p.h92
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptcompletionproviderinterface_p.h78
-rw-r--r--src/scripttools/debugging/qscriptcompletiontask.cpp305
-rw-r--r--src/scripttools/debugging/qscriptcompletiontask_p.h89
-rw-r--r--src/scripttools/debugging/qscriptcompletiontaskinterface.cpp110
-rw-r--r--src/scripttools/debugging/qscriptcompletiontaskinterface_p.h106
-rw-r--r--src/scripttools/debugging/qscriptcompletiontaskinterface_p_p.h81
-rw-r--r--src/scripttools/debugging/qscriptdebugger.cpp1828
-rw-r--r--src/scripttools/debugging/qscriptdebugger_p.h178
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent.cpp748
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent_p.h137
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent_p_p.h136
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend.cpp998
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend_p.h156
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend_p_p.h133
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp249
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodefinderwidget_p.h92
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p.h93
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodefinderwidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodeview.cpp261
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodeview_p.h96
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodeviewinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodeviewinterface_p.h106
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodeviewinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodewidget.cpp316
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodewidget_p.h99
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p.h101
-rw-r--r--src/scripttools/debugging/qscriptdebuggercodewidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommand.cpp690
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommand_p.h263
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp423
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h86
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend.cpp309
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h145
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h75
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerjob.cpp82
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h87
-rw-r--r--src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p_p.h76
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsole.cpp387
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsole_p.h120
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommand.cpp148
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommand_p.h105
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommand_p_p.h73
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata.cpp138
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandgroupdata_p.h95
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandjob.cpp85
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p.h86
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandjob_p_p.h78
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandmanager.cpp245
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolecommandmanager_p.h96
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsoleglobalobject.cpp465
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsoleglobalobject_p.h172
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolehistorianinterface_p.h74
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidget.cpp444
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidget_p.h98
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface.cpp94
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p.h103
-rw-r--r--src/scripttools/debugging/qscriptdebuggerconsolewidgetinterface_p_p.h78
-rw-r--r--src/scripttools/debugging/qscriptdebuggerevent.cpp320
-rw-r--r--src/scripttools/debugging/qscriptdebuggerevent_p.h163
-rw-r--r--src/scripttools/debugging/qscriptdebuggereventhandlerinterface_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggerfrontend.cpp236
-rw-r--r--src/scripttools/debugging/qscriptdebuggerfrontend_p.h102
-rw-r--r--src/scripttools/debugging/qscriptdebuggerfrontend_p_p.h93
-rw-r--r--src/scripttools/debugging/qscriptdebuggerjob.cpp111
-rw-r--r--src/scripttools/debugging/qscriptdebuggerjob_p.h88
-rw-r--r--src/scripttools/debugging/qscriptdebuggerjob_p_p.h78
-rw-r--r--src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h74
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp931
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h102
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp429
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidget_p.h85
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface.cpp79
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p.h92
-rw-r--r--src/scripttools/debugging/qscriptdebuggerlocalswidgetinterface_p_p.h76
-rw-r--r--src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h73
-rw-r--r--src/scripttools/debugging/qscriptdebuggerresponse.cpp350
-rw-r--r--src/scripttools/debugging/qscriptdebuggerresponse_p.h140
-rw-r--r--src/scripttools/debugging/qscriptdebuggerresponsehandlerinterface_p.h73
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand.cpp665
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptedconsolecommand_p.h106
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptsmodel.cpp335
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptsmodel_p.h101
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptswidget.cpp154
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptswidget_p.h84
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p.h92
-rw-r--r--src/scripttools/debugging/qscriptdebuggerscriptswidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackmodel.cpp166
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackmodel_p.h87
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackwidget.cpp142
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackwidget_p.h84
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackwidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p.h91
-rw-r--r--src/scripttools/debugging/qscriptdebuggerstackwidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalue.cpp417
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalue_p.h118
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalueproperty.cpp228
-rw-r--r--src/scripttools/debugging/qscriptdebuggervalueproperty_p.h100
-rw-r--r--src/scripttools/debugging/qscriptdebuggerwidgetfactoryinterface_p.h78
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidget.cpp159
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidget_p.h83
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p.h84
-rw-r--r--src/scripttools/debugging/qscriptdebugoutputwidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptedit.cpp453
-rw-r--r--src/scripttools/debugging/qscriptedit_p.h131
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp792
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.h130
-rw-r--r--src/scripttools/debugging/qscriptenginedebuggerfrontend.cpp335
-rw-r--r--src/scripttools/debugging/qscriptenginedebuggerfrontend_p.h89
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidget.cpp135
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidget_p.h83
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidgetinterface.cpp66
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidgetinterface_p.h84
-rw-r--r--src/scripttools/debugging/qscripterrorlogwidgetinterface_p_p.h72
-rw-r--r--src/scripttools/debugging/qscriptmessagehandlerinterface_p.h75
-rw-r--r--src/scripttools/debugging/qscriptobjectsnapshot.cpp146
-rw-r--r--src/scripttools/debugging/qscriptobjectsnapshot_p.h86
-rw-r--r--src/scripttools/debugging/qscriptscriptdata.cpp222
-rw-r--r--src/scripttools/debugging/qscriptscriptdata_p.h106
-rw-r--r--src/scripttools/debugging/qscriptstdmessagehandler.cpp111
-rw-r--r--src/scripttools/debugging/qscriptstdmessagehandler_p.h83
-rw-r--r--src/scripttools/debugging/qscriptsyntaxhighlighter.cpp544
-rw-r--r--src/scripttools/debugging/qscriptsyntaxhighlighter_p.h95
-rw-r--r--src/scripttools/debugging/qscripttooltipproviderinterface_p.h73
-rw-r--r--src/scripttools/debugging/qscriptvalueproperty.cpp173
-rw-r--r--src/scripttools/debugging/qscriptvalueproperty_p.h93
-rw-r--r--src/scripttools/debugging/qscriptxmlparser.cpp176
-rw-r--r--src/scripttools/debugging/qscriptxmlparser_p.h81
-rw-r--r--src/scripttools/debugging/scripts/commands/advance.qs41
-rw-r--r--src/scripttools/debugging/scripts/commands/backtrace.qs26
-rw-r--r--src/scripttools/debugging/scripts/commands/break.qs59
-rw-r--r--src/scripttools/debugging/scripts/commands/clear.qs59
-rw-r--r--src/scripttools/debugging/scripts/commands/complete.qs14
-rw-r--r--src/scripttools/debugging/scripts/commands/condition.qs52
-rw-r--r--src/scripttools/debugging/scripts/commands/continue.qs22
-rw-r--r--src/scripttools/debugging/scripts/commands/delete.qs36
-rw-r--r--src/scripttools/debugging/scripts/commands/disable.qs56
-rw-r--r--src/scripttools/debugging/scripts/commands/down.qs33
-rw-r--r--src/scripttools/debugging/scripts/commands/enable.qs56
-rw-r--r--src/scripttools/debugging/scripts/commands/eval.qs21
-rw-r--r--src/scripttools/debugging/scripts/commands/finish.qs16
-rw-r--r--src/scripttools/debugging/scripts/commands/frame.qs36
-rw-r--r--src/scripttools/debugging/scripts/commands/help.qs71
-rw-r--r--src/scripttools/debugging/scripts/commands/ignore.qs51
-rw-r--r--src/scripttools/debugging/scripts/commands/info.qs128
-rw-r--r--src/scripttools/debugging/scripts/commands/interrupt.qs14
-rw-r--r--src/scripttools/debugging/scripts/commands/list.qs90
-rw-r--r--src/scripttools/debugging/scripts/commands/next.qs27
-rw-r--r--src/scripttools/debugging/scripts/commands/print.qs23
-rw-r--r--src/scripttools/debugging/scripts/commands/return.qs20
-rw-r--r--src/scripttools/debugging/scripts/commands/step.qs26
-rw-r--r--src/scripttools/debugging/scripts/commands/tbreak.qs59
-rw-r--r--src/scripttools/debugging/scripts/commands/up.qs37
-rw-r--r--src/scripttools/debugging/scripttools_debugging.qrc63
-rw-r--r--src/scripttools/scripttools.pro12
-rw-r--r--src/sql/README.module37
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp1597
-rw-r--r--src/sql/drivers/db2/qsql_db2.h122
-rw-r--r--src/sql/drivers/drivers.pri123
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp1813
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.h131
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp1446
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.h139
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp2428
-rw-r--r--src/sql/drivers/oci/qsql_oci.h130
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp2312
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.h164
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp1250
-rw-r--r--src/sql/drivers/psql/qsql_psql.h155
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp695
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.h123
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.cpp558
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.h126
-rw-r--r--src/sql/drivers/tds/qsql_tds.cpp797
-rw-r--r--src/sql/drivers/tds/qsql_tds.h132
-rw-r--r--src/sql/kernel/kernel.pri24
-rw-r--r--src/sql/kernel/qsql.h113
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp297
-rw-r--r--src/sql/kernel/qsqlcachedresult_p.h99
-rw-r--r--src/sql/kernel/qsqldatabase.cpp1487
-rw-r--r--src/sql/kernel/qsqldatabase.h159
-rw-r--r--src/sql/kernel/qsqldriver.cpp803
-rw-r--r--src/sql/kernel/qsqldriver.h151
-rw-r--r--src/sql/kernel/qsqldriverplugin.cpp108
-rw-r--r--src/sql/kernel/qsqldriverplugin.h81
-rw-r--r--src/sql/kernel/qsqlerror.cpp253
-rw-r--r--src/sql/kernel/qsqlerror.h104
-rw-r--r--src/sql/kernel/qsqlfield.cpp557
-rw-r--r--src/sql/kernel/qsqlfield.h119
-rw-r--r--src/sql/kernel/qsqlindex.cpp256
-rw-r--r--src/sql/kernel/qsqlindex.h92
-rw-r--r--src/sql/kernel/qsqlnulldriver_p.h114
-rw-r--r--src/sql/kernel/qsqlquery.cpp1220
-rw-r--r--src/sql/kernel/qsqlquery.h130
-rw-r--r--src/sql/kernel/qsqlrecord.cpp605
-rw-r--r--src/sql/kernel/qsqlrecord.h123
-rw-r--r--src/sql/kernel/qsqlresult.cpp1013
-rw-r--r--src/sql/kernel/qsqlresult.h152
-rw-r--r--src/sql/models/models.pri12
-rw-r--r--src/sql/models/qsqlquerymodel.cpp592
-rw-r--r--src/sql/models/qsqlquerymodel.h105
-rw-r--r--src/sql/models/qsqlquerymodel_p.h87
-rw-r--r--src/sql/models/qsqlrelationaldelegate.cpp101
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h129
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp717
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.h112
-rw-r--r--src/sql/models/qsqltablemodel.cpp1332
-rw-r--r--src/sql/models/qsqltablemodel.h141
-rw-r--r--src/sql/models/qsqltablemodel_p.h118
-rw-r--r--src/sql/sql.pro19
-rw-r--r--src/src.pro168
-rw-r--r--src/svg/qgraphicssvgitem.cpp376
-rw-r--r--src/svg/qgraphicssvgitem.h105
-rw-r--r--src/svg/qsvgfont.cpp142
-rw-r--r--src/svg/qsvgfont_p.h103
-rw-r--r--src/svg/qsvggenerator.cpp1052
-rw-r--r--src/svg/qsvggenerator.h111
-rw-r--r--src/svg/qsvggraphics.cpp642
-rw-r--r--src/svg/qsvggraphics_p.h247
-rw-r--r--src/svg/qsvghandler.cpp3697
-rw-r--r--src/svg/qsvghandler_p.h185
-rw-r--r--src/svg/qsvgnode.cpp330
-rw-r--r--src/svg/qsvgnode_p.h205
-rw-r--r--src/svg/qsvgrenderer.cpp501
-rw-r--r--src/svg/qsvgrenderer.h120
-rw-r--r--src/svg/qsvgstructure.cpp424
-rw-r--r--src/svg/qsvgstructure_p.h120
-rw-r--r--src/svg/qsvgstyle.cpp820
-rw-r--r--src/svg/qsvgstyle_p.h564
-rw-r--r--src/svg/qsvgtinydocument.cpp459
-rw-r--r--src/svg/qsvgtinydocument_p.h195
-rw-r--r--src/svg/qsvgwidget.cpp183
-rw-r--r--src/svg/qsvgwidget.h85
-rw-r--r--src/svg/svg.pro48
-rw-r--r--src/testlib/3rdparty/callgrind_p.h147
-rw-r--r--src/testlib/3rdparty/cycle_p.h494
-rw-r--r--src/testlib/3rdparty/valgrind_p.h3926
-rw-r--r--src/testlib/qabstracttestlogger.cpp109
-rw-r--r--src/testlib/qabstracttestlogger_p.h104
-rw-r--r--src/testlib/qasciikey.cpp505
-rw-r--r--src/testlib/qbenchmark.cpp281
-rw-r--r--src/testlib/qbenchmark.h83
-rw-r--r--src/testlib/qbenchmark_p.h193
-rw-r--r--src/testlib/qbenchmarkevent.cpp112
-rw-r--r--src/testlib/qbenchmarkevent_p.h81
-rw-r--r--src/testlib/qbenchmarkmeasurement.cpp142
-rw-r--r--src/testlib/qbenchmarkmeasurement_p.h115
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp275
-rw-r--r--src/testlib/qbenchmarkvalgrind_p.h93
-rw-r--r--src/testlib/qplaintestlogger.cpp439
-rw-r--r--src/testlib/qplaintestlogger_p.h82
-rw-r--r--src/testlib/qsignaldumper.cpp212
-rw-r--r--src/testlib/qsignaldumper_p.h74
-rw-r--r--src/testlib/qsignalspy.h148
-rw-r--r--src/testlib/qtest.h251
-rw-r--r--src/testlib/qtest_global.h91
-rw-r--r--src/testlib/qtest_gui.h109
-rw-r--r--src/testlib/qtestaccessible.h165
-rw-r--r--src/testlib/qtestassert.h61
-rw-r--r--src/testlib/qtestbasicstreamer.cpp173
-rw-r--r--src/testlib/qtestbasicstreamer.h36
-rw-r--r--src/testlib/qtestcase.cpp1939
-rw-r--r--src/testlib/qtestcase.h340
-rw-r--r--src/testlib/qtestcoreelement.h120
-rw-r--r--src/testlib/qtestcorelist.h83
-rw-r--r--src/testlib/qtestdata.cpp122
-rw-r--r--src/testlib/qtestdata.h97
-rw-r--r--src/testlib/qtestelement.cpp42
-rw-r--r--src/testlib/qtestelement.h24
-rw-r--r--src/testlib/qtestelementattribute.cpp71
-rw-r--r--src/testlib/qtestelementattribute.h59
-rw-r--r--src/testlib/qtestevent.h214
-rw-r--r--src/testlib/qtesteventloop.h136
-rw-r--r--src/testlib/qtestfilelogger.cpp49
-rw-r--r--src/testlib/qtestfilelogger.h14
-rw-r--r--src/testlib/qtestkeyboard.h194
-rw-r--r--src/testlib/qtestlightxmlstreamer.cpp139
-rw-r--r--src/testlib/qtestlightxmlstreamer.h21
-rw-r--r--src/testlib/qtestlog.cpp381
-rw-r--r--src/testlib/qtestlog_p.h108
-rw-r--r--src/testlib/qtestlogger.cpp335
-rw-r--r--src/testlib/qtestlogger_p.h74
-rw-r--r--src/testlib/qtestmouse.h142
-rw-r--r--src/testlib/qtestresult.cpp349
-rw-r--r--src/testlib/qtestresult_p.h112
-rw-r--r--src/testlib/qtestspontaneevent.h118
-rw-r--r--src/testlib/qtestsystem.h74
-rw-r--r--src/testlib/qtesttable.cpp266
-rw-r--r--src/testlib/qtesttable_p.h93
-rw-r--r--src/testlib/qtestxmlstreamer.cpp173
-rw-r--r--src/testlib/qtestxmlstreamer.h21
-rw-r--r--src/testlib/qtestxunitstreamer.cpp136
-rw-r--r--src/testlib/qtestxunitstreamer.h26
-rw-r--r--src/testlib/qxmltestlogger.cpp391
-rw-r--r--src/testlib/qxmltestlogger_p.h91
-rw-r--r--src/testlib/testlib.pro68
-rw-r--r--src/tools/bootstrap/bootstrap.pri64
-rw-r--r--src/tools/bootstrap/bootstrap.pro114
-rw-r--r--src/tools/idc/idc.pro14
-rw-r--r--src/tools/idc/main.cpp369
-rw-r--r--src/tools/moc/generator.cpp1312
-rw-r--r--src/tools/moc/generator.h81
-rw-r--r--src/tools/moc/keywords.cpp979
-rw-r--r--src/tools/moc/main.cpp459
-rw-r--r--src/tools/moc/moc.cpp1230
-rw-r--r--src/tools/moc/moc.h247
-rw-r--r--src/tools/moc/moc.pri16
-rw-r--r--src/tools/moc/moc.pro18
-rw-r--r--src/tools/moc/mwerks_mac.cpp240
-rw-r--r--src/tools/moc/mwerks_mac.h67
-rw-r--r--src/tools/moc/outputrevision.h48
-rw-r--r--src/tools/moc/parser.cpp81
-rw-r--r--src/tools/moc/parser.h108
-rw-r--r--src/tools/moc/ppkeywords.cpp248
-rw-r--r--src/tools/moc/preprocessor.cpp978
-rw-r--r--src/tools/moc/preprocessor.h102
-rw-r--r--src/tools/moc/symbols.h147
-rw-r--r--src/tools/moc/token.cpp222
-rw-r--r--src/tools/moc/token.h274
-rwxr-xr-xsrc/tools/moc/util/generate.sh7
-rw-r--r--src/tools/moc/util/generate_keywords.cpp468
-rw-r--r--src/tools/moc/util/generate_keywords.pro13
-rw-r--r--src/tools/moc/util/licenseheader.txt41
-rw-r--r--src/tools/moc/utils.h111
-rw-r--r--src/tools/rcc/main.cpp262
-rw-r--r--src/tools/rcc/rcc.cpp967
-rw-r--r--src/tools/rcc/rcc.h153
-rw-r--r--src/tools/rcc/rcc.pri3
-rw-r--r--src/tools/rcc/rcc.pro16
-rw-r--r--src/tools/uic/cpp/cpp.pri20
-rw-r--r--src/tools/uic/cpp/cppextractimages.cpp148
-rw-r--r--src/tools/uic/cpp/cppextractimages.h77
-rw-r--r--src/tools/uic/cpp/cppwritedeclaration.cpp279
-rw-r--r--src/tools/uic/cpp/cppwritedeclaration.h81
-rw-r--r--src/tools/uic/cpp/cppwriteicondata.cpp181
-rw-r--r--src/tools/uic/cpp/cppwriteicondata.h80
-rw-r--r--src/tools/uic/cpp/cppwriteicondeclaration.cpp80
-rw-r--r--src/tools/uic/cpp/cppwriteicondeclaration.h76
-rw-r--r--src/tools/uic/cpp/cppwriteiconinitialization.cpp115
-rw-r--r--src/tools/uic/cpp/cppwriteiconinitialization.h81
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp340
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.h116
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp2919
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.h371
-rw-r--r--src/tools/uic/customwidgetsinfo.cpp119
-rw-r--r--src/tools/uic/customwidgetsinfo.h89
-rw-r--r--src/tools/uic/databaseinfo.cpp96
-rw-r--r--src/tools/uic/databaseinfo.h79
-rw-r--r--src/tools/uic/driver.cpp378
-rw-r--r--src/tools/uic/driver.h140
-rw-r--r--src/tools/uic/globaldefs.h54
-rw-r--r--src/tools/uic/main.cpp197
-rw-r--r--src/tools/uic/option.h96
-rw-r--r--src/tools/uic/treewalker.cpp328
-rw-r--r--src/tools/uic/treewalker.h137
-rw-r--r--src/tools/uic/ui4.cpp11132
-rw-r--r--src/tools/uic/ui4.h3791
-rw-r--r--src/tools/uic/uic.cpp382
-rw-r--r--src/tools/uic/uic.h144
-rw-r--r--src/tools/uic/uic.pri21
-rw-r--r--src/tools/uic/uic.pro23
-rw-r--r--src/tools/uic/utils.h128
-rw-r--r--src/tools/uic/validator.cpp94
-rw-r--r--src/tools/uic/validator.h74
-rw-r--r--src/tools/uic3/converter.cpp1305
-rw-r--r--src/tools/uic3/deps.cpp132
-rw-r--r--src/tools/uic3/domtool.cpp587
-rw-r--r--src/tools/uic3/domtool.h275
-rw-r--r--src/tools/uic3/embed.cpp336
-rw-r--r--src/tools/uic3/form.cpp921
-rw-r--r--src/tools/uic3/main.cpp414
-rw-r--r--src/tools/uic3/object.cpp66
-rw-r--r--src/tools/uic3/parser.cpp85
-rw-r--r--src/tools/uic3/parser.h57
-rw-r--r--src/tools/uic3/qt3to4.cpp225
-rw-r--r--src/tools/uic3/qt3to4.h82
-rw-r--r--src/tools/uic3/subclassing.cpp362
-rw-r--r--src/tools/uic3/ui3reader.cpp639
-rw-r--r--src/tools/uic3/ui3reader.h233
-rw-r--r--src/tools/uic3/uic.cpp341
-rw-r--r--src/tools/uic3/uic.h142
-rw-r--r--src/tools/uic3/uic3.pro43
-rw-r--r--src/tools/uic3/widgetinfo.cpp285
-rw-r--r--src/tools/uic3/widgetinfo.h77
-rw-r--r--src/winmain/qtmain_win.cpp141
-rw-r--r--src/winmain/winmain.pro22
-rw-r--r--src/xml/dom/dom.pri2
-rw-r--r--src/xml/dom/qdom.cpp7563
-rw-r--r--src/xml/dom/qdom.h681
-rw-r--r--src/xml/sax/qxml.cpp8114
-rw-r--r--src/xml/sax/qxml.h425
-rw-r--r--src/xml/sax/sax.pri2
-rw-r--r--src/xml/stream/qxmlstream.h73
-rw-r--r--src/xml/stream/stream.pri9
-rw-r--r--src/xml/xml.pro20
-rw-r--r--src/xmlpatterns/.gitignore1
-rw-r--r--src/xmlpatterns/Doxyfile1196
-rw-r--r--src/xmlpatterns/Mainpage.dox96
-rw-r--r--src/xmlpatterns/acceltree/acceltree.pri10
-rw-r--r--src/xmlpatterns/acceltree/qacceliterators.cpp181
-rw-r--r--src/xmlpatterns/acceltree/qacceliterators_p.h413
-rw-r--r--src/xmlpatterns/acceltree/qacceltree.cpp706
-rw-r--r--src/xmlpatterns/acceltree/qacceltree_p.h404
-rw-r--r--src/xmlpatterns/acceltree/qacceltreebuilder.cpp429
-rw-r--r--src/xmlpatterns/acceltree/qacceltreebuilder_p.h187
-rw-r--r--src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp411
-rw-r--r--src/xmlpatterns/acceltree/qacceltreeresourceloader_p.h195
-rw-r--r--src/xmlpatterns/acceltree/qcompressedwhitespace.cpp197
-rw-r--r--src/xmlpatterns/acceltree/qcompressedwhitespace_p.h186
-rw-r--r--src/xmlpatterns/api/api.pri48
-rw-r--r--src/xmlpatterns/api/qabstractmessagehandler.cpp149
-rw-r--r--src/xmlpatterns/api/qabstractmessagehandler.h81
-rw-r--r--src/xmlpatterns/api/qabstracturiresolver.cpp111
-rw-r--r--src/xmlpatterns/api/qabstracturiresolver.h74
-rw-r--r--src/xmlpatterns/api/qabstractxmlforwarditerator.cpp269
-rw-r--r--src/xmlpatterns/api/qabstractxmlforwarditerator_p.h328
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.cpp1669
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.h423
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel_p.h71
-rw-r--r--src/xmlpatterns/api/qabstractxmlreceiver.cpp476
-rw-r--r--src/xmlpatterns/api/qabstractxmlreceiver.h106
-rw-r--r--src/xmlpatterns/api/qabstractxmlreceiver_p.h71
-rw-r--r--src/xmlpatterns/api/qdeviceresourceloader_p.h88
-rw-r--r--src/xmlpatterns/api/qiodevicedelegate.cpp166
-rw-r--r--src/xmlpatterns/api/qiodevicedelegate_p.h108
-rw-r--r--src/xmlpatterns/api/qnetworkaccessdelegator.cpp80
-rw-r--r--src/xmlpatterns/api/qnetworkaccessdelegator_p.h106
-rw-r--r--src/xmlpatterns/api/qreferencecountedvalue_p.h106
-rw-r--r--src/xmlpatterns/api/qresourcedelegator.cpp111
-rw-r--r--src/xmlpatterns/api/qresourcedelegator_p.h119
-rw-r--r--src/xmlpatterns/api/qsimplexmlnodemodel.cpp184
-rw-r--r--src/xmlpatterns/api/qsimplexmlnodemodel.h77
-rw-r--r--src/xmlpatterns/api/qsourcelocation.cpp240
-rw-r--r--src/xmlpatterns/api/qsourcelocation.h101
-rw-r--r--src/xmlpatterns/api/quriloader.cpp84
-rw-r--r--src/xmlpatterns/api/quriloader_p.h86
-rw-r--r--src/xmlpatterns/api/qvariableloader.cpp264
-rw-r--r--src/xmlpatterns/api/qvariableloader_p.h118
-rw-r--r--src/xmlpatterns/api/qxmlformatter.cpp338
-rw-r--r--src/xmlpatterns/api/qxmlformatter.h94
-rw-r--r--src/xmlpatterns/api/qxmlname.cpp511
-rw-r--r--src/xmlpatterns/api/qxmlname.h142
-rw-r--r--src/xmlpatterns/api/qxmlnamepool.cpp109
-rw-r--r--src/xmlpatterns/api/qxmlnamepool.h88
-rw-r--r--src/xmlpatterns/api/qxmlquery.cpp1179
-rw-r--r--src/xmlpatterns/api/qxmlquery.h147
-rw-r--r--src/xmlpatterns/api/qxmlquery_p.h330
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.cpp149
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.h76
-rw-r--r--src/xmlpatterns/api/qxmlresultitems_p.h87
-rw-r--r--src/xmlpatterns/api/qxmlserializer.cpp653
-rw-r--r--src/xmlpatterns/api/qxmlserializer.h158
-rw-r--r--src/xmlpatterns/api/qxmlserializer_p.h130
-rw-r--r--src/xmlpatterns/common.pri17
-rw-r--r--src/xmlpatterns/data/data.pri78
-rw-r--r--src/xmlpatterns/data/qabstractdatetime.cpp400
-rw-r--r--src/xmlpatterns/data/qabstractdatetime_p.h261
-rw-r--r--src/xmlpatterns/data/qabstractduration.cpp235
-rw-r--r--src/xmlpatterns/data/qabstractduration_p.h192
-rw-r--r--src/xmlpatterns/data/qabstractfloat.cpp321
-rw-r--r--src/xmlpatterns/data/qabstractfloat_p.h174
-rw-r--r--src/xmlpatterns/data/qabstractfloatcasters.cpp71
-rw-r--r--src/xmlpatterns/data/qabstractfloatcasters_p.h175
-rw-r--r--src/xmlpatterns/data/qabstractfloatmathematician.cpp97
-rw-r--r--src/xmlpatterns/data/qabstractfloatmathematician_p.h104
-rw-r--r--src/xmlpatterns/data/qanyuri.cpp104
-rw-r--r--src/xmlpatterns/data/qanyuri_p.h212
-rw-r--r--src/xmlpatterns/data/qatomiccaster.cpp56
-rw-r--r--src/xmlpatterns/data/qatomiccaster_p.h94
-rw-r--r--src/xmlpatterns/data/qatomiccasters.cpp336
-rw-r--r--src/xmlpatterns/data/qatomiccasters_p.h705
-rw-r--r--src/xmlpatterns/data/qatomiccomparator.cpp118
-rw-r--r--src/xmlpatterns/data/qatomiccomparator_p.h223
-rw-r--r--src/xmlpatterns/data/qatomiccomparators.cpp386
-rw-r--r--src/xmlpatterns/data/qatomiccomparators_p.h298
-rw-r--r--src/xmlpatterns/data/qatomicmathematician.cpp73
-rw-r--r--src/xmlpatterns/data/qatomicmathematician_p.h136
-rw-r--r--src/xmlpatterns/data/qatomicmathematicians.cpp352
-rw-r--r--src/xmlpatterns/data/qatomicmathematicians_p.h249
-rw-r--r--src/xmlpatterns/data/qatomicstring.cpp74
-rw-r--r--src/xmlpatterns/data/qatomicstring_p.h123
-rw-r--r--src/xmlpatterns/data/qatomicvalue.cpp228
-rw-r--r--src/xmlpatterns/data/qbase64binary.cpp216
-rw-r--r--src/xmlpatterns/data/qbase64binary_p.h118
-rw-r--r--src/xmlpatterns/data/qboolean.cpp137
-rw-r--r--src/xmlpatterns/data/qboolean_p.h126
-rw-r--r--src/xmlpatterns/data/qcommonvalues.cpp123
-rw-r--r--src/xmlpatterns/data/qcommonvalues_p.h228
-rw-r--r--src/xmlpatterns/data/qdate.cpp115
-rw-r--r--src/xmlpatterns/data/qdate_p.h95
-rw-r--r--src/xmlpatterns/data/qdaytimeduration.cpp242
-rw-r--r--src/xmlpatterns/data/qdaytimeduration_p.h154
-rw-r--r--src/xmlpatterns/data/qdecimal.cpp234
-rw-r--r--src/xmlpatterns/data/qdecimal_p.h156
-rw-r--r--src/xmlpatterns/data/qderivedinteger_p.h624
-rw-r--r--src/xmlpatterns/data/qderivedstring_p.h341
-rw-r--r--src/xmlpatterns/data/qduration.cpp244
-rw-r--r--src/xmlpatterns/data/qduration_p.h136
-rw-r--r--src/xmlpatterns/data/qgday.cpp96
-rw-r--r--src/xmlpatterns/data/qgday_p.h94
-rw-r--r--src/xmlpatterns/data/qgmonth.cpp95
-rw-r--r--src/xmlpatterns/data/qgmonth_p.h94
-rw-r--r--src/xmlpatterns/data/qgmonthday.cpp98
-rw-r--r--src/xmlpatterns/data/qgmonthday_p.h95
-rw-r--r--src/xmlpatterns/data/qgyear.cpp101
-rw-r--r--src/xmlpatterns/data/qgyear_p.h94
-rw-r--r--src/xmlpatterns/data/qgyearmonth.cpp103
-rw-r--r--src/xmlpatterns/data/qgyearmonth_p.h94
-rw-r--r--src/xmlpatterns/data/qhexbinary.cpp151
-rw-r--r--src/xmlpatterns/data/qhexbinary_p.h109
-rw-r--r--src/xmlpatterns/data/qinteger.cpp164
-rw-r--r--src/xmlpatterns/data/qinteger_p.h141
-rw-r--r--src/xmlpatterns/data/qitem.cpp58
-rw-r--r--src/xmlpatterns/data/qitem_p.h542
-rw-r--r--src/xmlpatterns/data/qnodebuilder.cpp48
-rw-r--r--src/xmlpatterns/data/qnodebuilder_p.h111
-rw-r--r--src/xmlpatterns/data/qnodemodel.cpp52
-rw-r--r--src/xmlpatterns/data/qqnamevalue.cpp75
-rw-r--r--src/xmlpatterns/data/qqnamevalue_p.h113
-rw-r--r--src/xmlpatterns/data/qresourceloader.cpp134
-rw-r--r--src/xmlpatterns/data/qresourceloader_p.h320
-rw-r--r--src/xmlpatterns/data/qschemadatetime.cpp117
-rw-r--r--src/xmlpatterns/data/qschemadatetime_p.h101
-rw-r--r--src/xmlpatterns/data/qschemanumeric.cpp92
-rw-r--r--src/xmlpatterns/data/qschemanumeric_p.h235
-rw-r--r--src/xmlpatterns/data/qschematime.cpp121
-rw-r--r--src/xmlpatterns/data/qschematime_p.h98
-rw-r--r--src/xmlpatterns/data/qsequencereceiver.cpp126
-rw-r--r--src/xmlpatterns/data/qsequencereceiver_p.h192
-rw-r--r--src/xmlpatterns/data/qsorttuple.cpp89
-rw-r--r--src/xmlpatterns/data/qsorttuple_p.h148
-rw-r--r--src/xmlpatterns/data/quntypedatomic.cpp64
-rw-r--r--src/xmlpatterns/data/quntypedatomic_p.h97
-rw-r--r--src/xmlpatterns/data/qvalidationerror.cpp90
-rw-r--r--src/xmlpatterns/data/qvalidationerror_p.h123
-rw-r--r--src/xmlpatterns/data/qyearmonthduration.cpp186
-rw-r--r--src/xmlpatterns/data/qyearmonthduration_p.h151
-rw-r--r--src/xmlpatterns/documentationGroups.dox150
-rwxr-xr-xsrc/xmlpatterns/environment/createReportContext.sh12
-rw-r--r--src/xmlpatterns/environment/createReportContext.xsl554
-rw-r--r--src/xmlpatterns/environment/environment.pri32
-rw-r--r--src/xmlpatterns/environment/qcurrentitemcontext.cpp62
-rw-r--r--src/xmlpatterns/environment/qcurrentitemcontext_p.h93
-rw-r--r--src/xmlpatterns/environment/qdelegatingdynamiccontext.cpp212
-rw-r--r--src/xmlpatterns/environment/qdelegatingdynamiccontext_p.h130
-rw-r--r--src/xmlpatterns/environment/qdelegatingstaticcontext.cpp261
-rw-r--r--src/xmlpatterns/environment/qdelegatingstaticcontext_p.h147
-rw-r--r--src/xmlpatterns/environment/qdynamiccontext.cpp68
-rw-r--r--src/xmlpatterns/environment/qdynamiccontext_p.h231
-rw-r--r--src/xmlpatterns/environment/qfocus.cpp107
-rw-r--r--src/xmlpatterns/environment/qfocus_p.h103
-rw-r--r--src/xmlpatterns/environment/qgenericdynamiccontext.cpp205
-rw-r--r--src/xmlpatterns/environment/qgenericdynamiccontext_p.h155
-rw-r--r--src/xmlpatterns/environment/qgenericstaticcontext.cpp340
-rw-r--r--src/xmlpatterns/environment/qgenericstaticcontext_p.h199
-rw-r--r--src/xmlpatterns/environment/qreceiverdynamiccontext.cpp61
-rw-r--r--src/xmlpatterns/environment/qreceiverdynamiccontext_p.h89
-rw-r--r--src/xmlpatterns/environment/qreportcontext.cpp478
-rw-r--r--src/xmlpatterns/environment/qreportcontext_p.h2460
-rw-r--r--src/xmlpatterns/environment/qstackcontextbase.cpp153
-rw-r--r--src/xmlpatterns/environment/qstackcontextbase_p.h136
-rw-r--r--src/xmlpatterns/environment/qstaticbaseuricontext.cpp62
-rw-r--r--src/xmlpatterns/environment/qstaticbaseuricontext_p.h91
-rw-r--r--src/xmlpatterns/environment/qstaticcompatibilitycontext.cpp57
-rw-r--r--src/xmlpatterns/environment/qstaticcompatibilitycontext_p.h84
-rw-r--r--src/xmlpatterns/environment/qstaticcontext.cpp61
-rw-r--r--src/xmlpatterns/environment/qstaticcontext_p.h299
-rw-r--r--src/xmlpatterns/environment/qstaticcurrentcontext.cpp60
-rw-r--r--src/xmlpatterns/environment/qstaticcurrentcontext_p.h90
-rw-r--r--src/xmlpatterns/environment/qstaticfocuscontext.cpp59
-rw-r--r--src/xmlpatterns/environment/qstaticfocuscontext_p.h91
-rw-r--r--src/xmlpatterns/environment/qstaticnamespacecontext.cpp60
-rw-r--r--src/xmlpatterns/environment/qstaticnamespacecontext_p.h89
-rw-r--r--src/xmlpatterns/expr/expr.pri173
-rw-r--r--src/xmlpatterns/expr/qandexpression.cpp97
-rw-r--r--src/xmlpatterns/expr/qandexpression_p.h98
-rw-r--r--src/xmlpatterns/expr/qapplytemplate.cpp211
-rw-r--r--src/xmlpatterns/expr/qapplytemplate_p.h144
-rw-r--r--src/xmlpatterns/expr/qargumentreference.cpp86
-rw-r--r--src/xmlpatterns/expr/qargumentreference_p.h94
-rw-r--r--src/xmlpatterns/expr/qarithmeticexpression.cpp363
-rw-r--r--src/xmlpatterns/expr/qarithmeticexpression_p.h133
-rw-r--r--src/xmlpatterns/expr/qattributeconstructor.cpp127
-rw-r--r--src/xmlpatterns/expr/qattributeconstructor_p.h108
-rw-r--r--src/xmlpatterns/expr/qattributenamevalidator.cpp109
-rw-r--r--src/xmlpatterns/expr/qattributenamevalidator_p.h99
-rw-r--r--src/xmlpatterns/expr/qaxisstep.cpp247
-rw-r--r--src/xmlpatterns/expr/qaxisstep_p.h168
-rw-r--r--src/xmlpatterns/expr/qcachecells_p.h157
-rw-r--r--src/xmlpatterns/expr/qcallsite.cpp68
-rw-r--r--src/xmlpatterns/expr/qcallsite_p.h111
-rw-r--r--src/xmlpatterns/expr/qcalltargetdescription.cpp107
-rw-r--r--src/xmlpatterns/expr/qcalltargetdescription_p.h120
-rw-r--r--src/xmlpatterns/expr/qcalltemplate.cpp153
-rw-r--r--src/xmlpatterns/expr/qcalltemplate_p.h117
-rw-r--r--src/xmlpatterns/expr/qcastableas.cpp157
-rw-r--r--src/xmlpatterns/expr/qcastableas_p.h111
-rw-r--r--src/xmlpatterns/expr/qcastas.cpp204
-rw-r--r--src/xmlpatterns/expr/qcastas_p.h148
-rw-r--r--src/xmlpatterns/expr/qcastingplatform.cpp219
-rw-r--r--src/xmlpatterns/expr/qcastingplatform_p.h197
-rw-r--r--src/xmlpatterns/expr/qcollationchecker.cpp79
-rw-r--r--src/xmlpatterns/expr/qcollationchecker_p.h99
-rw-r--r--src/xmlpatterns/expr/qcombinenodes.cpp172
-rw-r--r--src/xmlpatterns/expr/qcombinenodes_p.h116
-rw-r--r--src/xmlpatterns/expr/qcommentconstructor.cpp124
-rw-r--r--src/xmlpatterns/expr/qcommentconstructor_p.h100
-rw-r--r--src/xmlpatterns/expr/qcomparisonplatform.cpp199
-rw-r--r--src/xmlpatterns/expr/qcomparisonplatform_p.h208
-rw-r--r--src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp136
-rw-r--r--src/xmlpatterns/expr/qcomputednamespaceconstructor_p.h102
-rw-r--r--src/xmlpatterns/expr/qcontextitem.cpp114
-rw-r--r--src/xmlpatterns/expr/qcontextitem_p.h128
-rw-r--r--src/xmlpatterns/expr/qcopyof.cpp134
-rw-r--r--src/xmlpatterns/expr/qcopyof_p.h121
-rw-r--r--src/xmlpatterns/expr/qcurrentitemstore.cpp139
-rw-r--r--src/xmlpatterns/expr/qcurrentitemstore_p.h104
-rw-r--r--src/xmlpatterns/expr/qdocumentconstructor.cpp116
-rw-r--r--src/xmlpatterns/expr/qdocumentconstructor_p.h103
-rw-r--r--src/xmlpatterns/expr/qdocumentcontentvalidator.cpp148
-rw-r--r--src/xmlpatterns/expr/qdocumentcontentvalidator_p.h117
-rw-r--r--src/xmlpatterns/expr/qdynamiccontextstore.cpp96
-rw-r--r--src/xmlpatterns/expr/qdynamiccontextstore_p.h97
-rw-r--r--src/xmlpatterns/expr/qelementconstructor.cpp160
-rw-r--r--src/xmlpatterns/expr/qelementconstructor_p.h107
-rw-r--r--src/xmlpatterns/expr/qemptycontainer.cpp69
-rw-r--r--src/xmlpatterns/expr/qemptycontainer_p.h101
-rw-r--r--src/xmlpatterns/expr/qemptysequence.cpp112
-rw-r--r--src/xmlpatterns/expr/qemptysequence_p.h136
-rw-r--r--src/xmlpatterns/expr/qevaluationcache.cpp274
-rw-r--r--src/xmlpatterns/expr/qevaluationcache_p.h146
-rw-r--r--src/xmlpatterns/expr/qexpression.cpp414
-rw-r--r--src/xmlpatterns/expr/qexpression_p.h909
-rw-r--r--src/xmlpatterns/expr/qexpressiondispatch_p.h241
-rw-r--r--src/xmlpatterns/expr/qexpressionfactory.cpp480
-rw-r--r--src/xmlpatterns/expr/qexpressionfactory_p.h187
-rw-r--r--src/xmlpatterns/expr/qexpressionsequence.cpp206
-rw-r--r--src/xmlpatterns/expr/qexpressionsequence_p.h127
-rw-r--r--src/xmlpatterns/expr/qexpressionvariablereference.cpp93
-rw-r--r--src/xmlpatterns/expr/qexpressionvariablereference_p.h114
-rw-r--r--src/xmlpatterns/expr/qexternalvariableloader.cpp94
-rw-r--r--src/xmlpatterns/expr/qexternalvariableloader_p.h139
-rw-r--r--src/xmlpatterns/expr/qexternalvariablereference.cpp88
-rw-r--r--src/xmlpatterns/expr/qexternalvariablereference_p.h103
-rw-r--r--src/xmlpatterns/expr/qfirstitempredicate.cpp97
-rw-r--r--src/xmlpatterns/expr/qfirstitempredicate_p.h114
-rw-r--r--src/xmlpatterns/expr/qforclause.cpp200
-rw-r--r--src/xmlpatterns/expr/qforclause_p.h122
-rw-r--r--src/xmlpatterns/expr/qgeneralcomparison.cpp297
-rw-r--r--src/xmlpatterns/expr/qgeneralcomparison_p.h136
-rw-r--r--src/xmlpatterns/expr/qgenericpredicate.cpp218
-rw-r--r--src/xmlpatterns/expr/qgenericpredicate_p.h148
-rw-r--r--src/xmlpatterns/expr/qifthenclause.cpp152
-rw-r--r--src/xmlpatterns/expr/qifthenclause_p.h101
-rw-r--r--src/xmlpatterns/expr/qinstanceof.cpp129
-rw-r--r--src/xmlpatterns/expr/qinstanceof_p.h101
-rw-r--r--src/xmlpatterns/expr/qletclause.cpp142
-rw-r--r--src/xmlpatterns/expr/qletclause_p.h109
-rw-r--r--src/xmlpatterns/expr/qliteral.cpp114
-rw-r--r--src/xmlpatterns/expr/qliteral_p.h148
-rw-r--r--src/xmlpatterns/expr/qliteralsequence.cpp92
-rw-r--r--src/xmlpatterns/expr/qliteralsequence_p.h104
-rw-r--r--src/xmlpatterns/expr/qnamespaceconstructor.cpp87
-rw-r--r--src/xmlpatterns/expr/qnamespaceconstructor_p.h109
-rw-r--r--src/xmlpatterns/expr/qncnameconstructor.cpp96
-rw-r--r--src/xmlpatterns/expr/qncnameconstructor_p.h154
-rw-r--r--src/xmlpatterns/expr/qnodecomparison.cpp184
-rw-r--r--src/xmlpatterns/expr/qnodecomparison_p.h127
-rw-r--r--src/xmlpatterns/expr/qnodesort.cpp142
-rw-r--r--src/xmlpatterns/expr/qnodesort_p.h98
-rw-r--r--src/xmlpatterns/expr/qoperandsiterator_p.h193
-rw-r--r--src/xmlpatterns/expr/qoptimizationpasses.cpp182
-rw-r--r--src/xmlpatterns/expr/qoptimizationpasses_p.h143
-rw-r--r--src/xmlpatterns/expr/qoptimizerblocks.cpp179
-rw-r--r--src/xmlpatterns/expr/qoptimizerblocks_p.h226
-rw-r--r--src/xmlpatterns/expr/qoptimizerframework.cpp71
-rw-r--r--src/xmlpatterns/expr/qoptimizerframework_p.h294
-rw-r--r--src/xmlpatterns/expr/qorderby.cpp261
-rw-r--r--src/xmlpatterns/expr/qorderby_p.h183
-rw-r--r--src/xmlpatterns/expr/qorexpression.cpp83
-rw-r--r--src/xmlpatterns/expr/qorexpression_p.h88
-rw-r--r--src/xmlpatterns/expr/qpaircontainer.cpp85
-rw-r--r--src/xmlpatterns/expr/qpaircontainer_p.h89
-rw-r--r--src/xmlpatterns/expr/qparentnodeaxis.cpp77
-rw-r--r--src/xmlpatterns/expr/qparentnodeaxis_p.h103
-rw-r--r--src/xmlpatterns/expr/qpath.cpp271
-rw-r--r--src/xmlpatterns/expr/qpath_p.h176
-rw-r--r--src/xmlpatterns/expr/qpositionalvariablereference.cpp84
-rw-r--r--src/xmlpatterns/expr/qpositionalvariablereference_p.h100
-rw-r--r--src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp144
-rw-r--r--src/xmlpatterns/expr/qprocessinginstructionconstructor_p.h109
-rw-r--r--src/xmlpatterns/expr/qqnameconstructor.cpp114
-rw-r--r--src/xmlpatterns/expr/qqnameconstructor_p.h182
-rw-r--r--src/xmlpatterns/expr/qquantifiedexpression.cpp140
-rw-r--r--src/xmlpatterns/expr/qquantifiedexpression_p.h114
-rw-r--r--src/xmlpatterns/expr/qrangeexpression.cpp170
-rw-r--r--src/xmlpatterns/expr/qrangeexpression_p.h112
-rw-r--r--src/xmlpatterns/expr/qrangevariablereference.cpp92
-rw-r--r--src/xmlpatterns/expr/qrangevariablereference_p.h100
-rw-r--r--src/xmlpatterns/expr/qreturnorderby.cpp133
-rw-r--r--src/xmlpatterns/expr/qreturnorderby_p.h136
-rw-r--r--src/xmlpatterns/expr/qsimplecontentconstructor.cpp114
-rw-r--r--src/xmlpatterns/expr/qsimplecontentconstructor_p.h96
-rw-r--r--src/xmlpatterns/expr/qsinglecontainer.cpp76
-rw-r--r--src/xmlpatterns/expr/qsinglecontainer_p.h88
-rw-r--r--src/xmlpatterns/expr/qsourcelocationreflection.cpp65
-rw-r--r--src/xmlpatterns/expr/qsourcelocationreflection_p.h131
-rw-r--r--src/xmlpatterns/expr/qstaticbaseuristore.cpp82
-rw-r--r--src/xmlpatterns/expr/qstaticbaseuristore_p.h96
-rw-r--r--src/xmlpatterns/expr/qstaticcompatibilitystore.cpp79
-rw-r--r--src/xmlpatterns/expr/qstaticcompatibilitystore_p.h92
-rw-r--r--src/xmlpatterns/expr/qtemplate.cpp232
-rw-r--r--src/xmlpatterns/expr/qtemplate_p.h146
-rw-r--r--src/xmlpatterns/expr/qtemplateinvoker.cpp106
-rw-r--r--src/xmlpatterns/expr/qtemplateinvoker_p.h119
-rw-r--r--src/xmlpatterns/expr/qtemplatemode.cpp61
-rw-r--r--src/xmlpatterns/expr/qtemplatemode_p.h128
-rw-r--r--src/xmlpatterns/expr/qtemplateparameterreference.cpp91
-rw-r--r--src/xmlpatterns/expr/qtemplateparameterreference_p.h105
-rw-r--r--src/xmlpatterns/expr/qtemplatepattern_p.h161
-rw-r--r--src/xmlpatterns/expr/qtextnodeconstructor.cpp115
-rw-r--r--src/xmlpatterns/expr/qtextnodeconstructor_p.h97
-rw-r--r--src/xmlpatterns/expr/qtreatas.cpp92
-rw-r--r--src/xmlpatterns/expr/qtreatas_p.h122
-rw-r--r--src/xmlpatterns/expr/qtriplecontainer.cpp87
-rw-r--r--src/xmlpatterns/expr/qtriplecontainer_p.h92
-rw-r--r--src/xmlpatterns/expr/qtruthpredicate.cpp71
-rw-r--r--src/xmlpatterns/expr/qtruthpredicate_p.h112
-rw-r--r--src/xmlpatterns/expr/qunaryexpression.cpp79
-rw-r--r--src/xmlpatterns/expr/qunaryexpression_p.h114
-rw-r--r--src/xmlpatterns/expr/qunlimitedcontainer.cpp79
-rw-r--r--src/xmlpatterns/expr/qunlimitedcontainer_p.h149
-rw-r--r--src/xmlpatterns/expr/qunresolvedvariablereference.cpp91
-rw-r--r--src/xmlpatterns/expr/qunresolvedvariablereference_p.h111
-rw-r--r--src/xmlpatterns/expr/quserfunction.cpp62
-rw-r--r--src/xmlpatterns/expr/quserfunction_p.h135
-rw-r--r--src/xmlpatterns/expr/quserfunctioncallsite.cpp245
-rw-r--r--src/xmlpatterns/expr/quserfunctioncallsite_p.h182
-rw-r--r--src/xmlpatterns/expr/qvalidate.cpp77
-rw-r--r--src/xmlpatterns/expr/qvalidate_p.h106
-rw-r--r--src/xmlpatterns/expr/qvaluecomparison.cpp163
-rw-r--r--src/xmlpatterns/expr/qvaluecomparison_p.h138
-rw-r--r--src/xmlpatterns/expr/qvariabledeclaration.cpp63
-rw-r--r--src/xmlpatterns/expr/qvariabledeclaration_p.h203
-rw-r--r--src/xmlpatterns/expr/qvariablereference.cpp58
-rw-r--r--src/xmlpatterns/expr/qvariablereference_p.h121
-rw-r--r--src/xmlpatterns/expr/qwithparam_p.h123
-rw-r--r--src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp158
-rw-r--r--src/xmlpatterns/expr/qxsltsimplecontentconstructor_p.h89
-rw-r--r--src/xmlpatterns/functions/functions.pri96
-rw-r--r--src/xmlpatterns/functions/qabstractfunctionfactory.cpp103
-rw-r--r--src/xmlpatterns/functions/qabstractfunctionfactory_p.h157
-rw-r--r--src/xmlpatterns/functions/qaccessorfns.cpp159
-rw-r--r--src/xmlpatterns/functions/qaccessorfns_p.h138
-rw-r--r--src/xmlpatterns/functions/qaggregatefns.cpp316
-rw-r--r--src/xmlpatterns/functions/qaggregatefns_p.h156
-rw-r--r--src/xmlpatterns/functions/qaggregator.cpp69
-rw-r--r--src/xmlpatterns/functions/qaggregator_p.h94
-rw-r--r--src/xmlpatterns/functions/qassemblestringfns.cpp115
-rw-r--r--src/xmlpatterns/functions/qassemblestringfns_p.h103
-rw-r--r--src/xmlpatterns/functions/qbooleanfns.cpp71
-rw-r--r--src/xmlpatterns/functions/qbooleanfns_p.h119
-rw-r--r--src/xmlpatterns/functions/qcomparescaseaware.cpp71
-rw-r--r--src/xmlpatterns/functions/qcomparescaseaware_p.h98
-rw-r--r--src/xmlpatterns/functions/qcomparestringfns.cpp102
-rw-r--r--src/xmlpatterns/functions/qcomparestringfns_p.h102
-rw-r--r--src/xmlpatterns/functions/qcomparingaggregator.cpp211
-rw-r--r--src/xmlpatterns/functions/qcomparingaggregator_p.h146
-rw-r--r--src/xmlpatterns/functions/qconstructorfunctionsfactory.cpp114
-rw-r--r--src/xmlpatterns/functions/qconstructorfunctionsfactory_p.h95
-rw-r--r--src/xmlpatterns/functions/qcontextfns.cpp102
-rw-r--r--src/xmlpatterns/functions/qcontextfns_p.h195
-rw-r--r--src/xmlpatterns/functions/qcontextnodechecker.cpp63
-rw-r--r--src/xmlpatterns/functions/qcontextnodechecker_p.h85
-rw-r--r--src/xmlpatterns/functions/qcurrentfn.cpp75
-rw-r--r--src/xmlpatterns/functions/qcurrentfn_p.h89
-rw-r--r--src/xmlpatterns/functions/qdatetimefn.cpp96
-rw-r--r--src/xmlpatterns/functions/qdatetimefn_p.h82
-rw-r--r--src/xmlpatterns/functions/qdatetimefns.cpp145
-rw-r--r--src/xmlpatterns/functions/qdatetimefns_p.h305
-rw-r--r--src/xmlpatterns/functions/qdeepequalfn.cpp162
-rw-r--r--src/xmlpatterns/functions/qdeepequalfn_p.h94
-rw-r--r--src/xmlpatterns/functions/qdocumentfn.cpp115
-rw-r--r--src/xmlpatterns/functions/qdocumentfn_p.h124
-rw-r--r--src/xmlpatterns/functions/qelementavailablefn.cpp120
-rw-r--r--src/xmlpatterns/functions/qelementavailablefn_p.h87
-rw-r--r--src/xmlpatterns/functions/qerrorfn.cpp113
-rw-r--r--src/xmlpatterns/functions/qerrorfn_p.h91
-rw-r--r--src/xmlpatterns/functions/qfunctionargument.cpp66
-rw-r--r--src/xmlpatterns/functions/qfunctionargument_p.h98
-rw-r--r--src/xmlpatterns/functions/qfunctionavailablefn.cpp91
-rw-r--r--src/xmlpatterns/functions/qfunctionavailablefn_p.h92
-rw-r--r--src/xmlpatterns/functions/qfunctioncall.cpp160
-rw-r--r--src/xmlpatterns/functions/qfunctioncall_p.h102
-rw-r--r--src/xmlpatterns/functions/qfunctionfactory.cpp79
-rw-r--r--src/xmlpatterns/functions/qfunctionfactory_p.h168
-rw-r--r--src/xmlpatterns/functions/qfunctionfactorycollection.cpp138
-rw-r--r--src/xmlpatterns/functions/qfunctionfactorycollection_p.h118
-rw-r--r--src/xmlpatterns/functions/qfunctionsignature.cpp158
-rw-r--r--src/xmlpatterns/functions/qfunctionsignature_p.h213
-rw-r--r--src/xmlpatterns/functions/qgenerateidfn.cpp63
-rw-r--r--src/xmlpatterns/functions/qgenerateidfn_p.h83
-rw-r--r--src/xmlpatterns/functions/qnodefns.cpp209
-rw-r--r--src/xmlpatterns/functions/qnodefns_p.h176
-rw-r--r--src/xmlpatterns/functions/qnumericfns.cpp107
-rw-r--r--src/xmlpatterns/functions/qnumericfns_p.h140
-rw-r--r--src/xmlpatterns/functions/qpatternmatchingfns.cpp230
-rw-r--r--src/xmlpatterns/functions/qpatternmatchingfns_p.h139
-rw-r--r--src/xmlpatterns/functions/qpatternplatform.cpp300
-rw-r--r--src/xmlpatterns/functions/qpatternplatform_p.h183
-rw-r--r--src/xmlpatterns/functions/qqnamefns.cpp189
-rw-r--r--src/xmlpatterns/functions/qqnamefns_p.h162
-rw-r--r--src/xmlpatterns/functions/qresolveurifn.cpp87
-rw-r--r--src/xmlpatterns/functions/qresolveurifn_p.h82
-rw-r--r--src/xmlpatterns/functions/qsequencefns.cpp353
-rw-r--r--src/xmlpatterns/functions/qsequencefns_p.h338
-rw-r--r--src/xmlpatterns/functions/qsequencegeneratingfns.cpp304
-rw-r--r--src/xmlpatterns/functions/qsequencegeneratingfns_p.h167
-rw-r--r--src/xmlpatterns/functions/qstaticbaseuricontainer_p.h107
-rw-r--r--src/xmlpatterns/functions/qstaticnamespacescontainer.cpp57
-rw-r--r--src/xmlpatterns/functions/qstaticnamespacescontainer_p.h115
-rw-r--r--src/xmlpatterns/functions/qstringvaluefns.cpp373
-rw-r--r--src/xmlpatterns/functions/qstringvaluefns_p.h293
-rw-r--r--src/xmlpatterns/functions/qsubstringfns.cpp173
-rw-r--r--src/xmlpatterns/functions/qsubstringfns_p.h136
-rw-r--r--src/xmlpatterns/functions/qsystempropertyfn.cpp101
-rw-r--r--src/xmlpatterns/functions/qsystempropertyfn_p.h92
-rw-r--r--src/xmlpatterns/functions/qtimezonefns.cpp166
-rw-r--r--src/xmlpatterns/functions/qtimezonefns_p.h136
-rw-r--r--src/xmlpatterns/functions/qtracefn.cpp140
-rw-r--r--src/xmlpatterns/functions/qtracefn_p.h94
-rw-r--r--src/xmlpatterns/functions/qtypeavailablefn.cpp74
-rw-r--r--src/xmlpatterns/functions/qtypeavailablefn_p.h92
-rw-r--r--src/xmlpatterns/functions/qunparsedentitypublicidfn.cpp56
-rw-r--r--src/xmlpatterns/functions/qunparsedentitypublicidfn_p.h82
-rw-r--r--src/xmlpatterns/functions/qunparsedentityurifn.cpp56
-rw-r--r--src/xmlpatterns/functions/qunparsedentityurifn_p.h82
-rw-r--r--src/xmlpatterns/functions/qunparsedtextavailablefn.cpp85
-rw-r--r--src/xmlpatterns/functions/qunparsedtextavailablefn_p.h83
-rw-r--r--src/xmlpatterns/functions/qunparsedtextfn.cpp82
-rw-r--r--src/xmlpatterns/functions/qunparsedtextfn_p.h83
-rw-r--r--src/xmlpatterns/functions/qxpath10corefunctions.cpp300
-rw-r--r--src/xmlpatterns/functions/qxpath10corefunctions_p.h93
-rw-r--r--src/xmlpatterns/functions/qxpath20corefunctions.cpp748
-rw-r--r--src/xmlpatterns/functions/qxpath20corefunctions_p.h96
-rw-r--r--src/xmlpatterns/functions/qxslt20corefunctions.cpp175
-rw-r--r--src/xmlpatterns/functions/qxslt20corefunctions_p.h94
-rw-r--r--src/xmlpatterns/iterators/iterators.pri29
-rw-r--r--src/xmlpatterns/iterators/qcachingiterator.cpp130
-rw-r--r--src/xmlpatterns/iterators/qcachingiterator_p.h129
-rw-r--r--src/xmlpatterns/iterators/qdeduplicateiterator.cpp95
-rw-r--r--src/xmlpatterns/iterators/qdeduplicateiterator_p.h103
-rw-r--r--src/xmlpatterns/iterators/qdistinctiterator.cpp112
-rw-r--r--src/xmlpatterns/iterators/qdistinctiterator_p.h128
-rw-r--r--src/xmlpatterns/iterators/qemptyiterator_p.h146
-rw-r--r--src/xmlpatterns/iterators/qexceptiterator.cpp122
-rw-r--r--src/xmlpatterns/iterators/qexceptiterator_p.h101
-rw-r--r--src/xmlpatterns/iterators/qindexofiterator.cpp115
-rw-r--r--src/xmlpatterns/iterators/qindexofiterator_p.h129
-rw-r--r--src/xmlpatterns/iterators/qinsertioniterator.cpp128
-rw-r--r--src/xmlpatterns/iterators/qinsertioniterator_p.h120
-rw-r--r--src/xmlpatterns/iterators/qintersectiterator.cpp115
-rw-r--r--src/xmlpatterns/iterators/qintersectiterator_p.h107
-rw-r--r--src/xmlpatterns/iterators/qitemmappingiterator_p.h190
-rw-r--r--src/xmlpatterns/iterators/qrangeiterator.cpp126
-rw-r--r--src/xmlpatterns/iterators/qrangeiterator_p.h141
-rw-r--r--src/xmlpatterns/iterators/qremovaliterator.cpp109
-rw-r--r--src/xmlpatterns/iterators/qremovaliterator_p.h122
-rw-r--r--src/xmlpatterns/iterators/qsequencemappingiterator_p.h237
-rw-r--r--src/xmlpatterns/iterators/qsingletoniterator_p.h177
-rw-r--r--src/xmlpatterns/iterators/qsubsequenceiterator.cpp110
-rw-r--r--src/xmlpatterns/iterators/qsubsequenceiterator_p.h118
-rw-r--r--src/xmlpatterns/iterators/qtocodepointsiterator.cpp95
-rw-r--r--src/xmlpatterns/iterators/qtocodepointsiterator_p.h103
-rw-r--r--src/xmlpatterns/iterators/qunioniterator.cpp131
-rw-r--r--src/xmlpatterns/iterators/qunioniterator_p.h107
-rw-r--r--src/xmlpatterns/janitors/janitors.pri13
-rw-r--r--src/xmlpatterns/janitors/qargumentconverter.cpp104
-rw-r--r--src/xmlpatterns/janitors/qargumentconverter_p.h103
-rw-r--r--src/xmlpatterns/janitors/qatomizer.cpp125
-rw-r--r--src/xmlpatterns/janitors/qatomizer_p.h110
-rw-r--r--src/xmlpatterns/janitors/qcardinalityverifier.cpp224
-rw-r--r--src/xmlpatterns/janitors/qcardinalityverifier_p.h128
-rw-r--r--src/xmlpatterns/janitors/qebvextractor.cpp90
-rw-r--r--src/xmlpatterns/janitors/qebvextractor_p.h109
-rw-r--r--src/xmlpatterns/janitors/qitemverifier.cpp122
-rw-r--r--src/xmlpatterns/janitors/qitemverifier_p.h103
-rw-r--r--src/xmlpatterns/janitors/quntypedatomicconverter.cpp113
-rw-r--r--src/xmlpatterns/janitors/quntypedatomicconverter_p.h127
-rw-r--r--src/xmlpatterns/parser/.gitattributes4
-rw-r--r--src/xmlpatterns/parser/.gitignore1
-rw-r--r--src/xmlpatterns/parser/TokenLookup.gperf223
-rwxr-xr-xsrc/xmlpatterns/parser/createParser.sh15
-rwxr-xr-xsrc/xmlpatterns/parser/createTokenLookup.sh5
-rwxr-xr-xsrc/xmlpatterns/parser/createXSLTTokenLookup.sh3
-rw-r--r--src/xmlpatterns/parser/parser.pri19
-rw-r--r--src/xmlpatterns/parser/qmaintainingreader.cpp273
-rw-r--r--src/xmlpatterns/parser/qmaintainingreader_p.h233
-rw-r--r--src/xmlpatterns/parser/qparsercontext.cpp100
-rw-r--r--src/xmlpatterns/parser/qparsercontext_p.h433
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser.cpp7976
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser_p.h307
-rw-r--r--src/xmlpatterns/parser/qtokenizer_p.h216
-rw-r--r--src/xmlpatterns/parser/qtokenlookup.cpp404
-rw-r--r--src/xmlpatterns/parser/qtokenrevealer.cpp111
-rw-r--r--src/xmlpatterns/parser/qtokenrevealer_p.h97
-rw-r--r--src/xmlpatterns/parser/qtokensource.cpp53
-rw-r--r--src/xmlpatterns/parser/qtokensource_p.h169
-rw-r--r--src/xmlpatterns/parser/querytransformparser.ypp4572
-rw-r--r--src/xmlpatterns/parser/qxquerytokenizer.cpp2249
-rw-r--r--src/xmlpatterns/parser/qxquerytokenizer_p.h332
-rw-r--r--src/xmlpatterns/parser/qxslttokenizer.cpp2717
-rw-r--r--src/xmlpatterns/parser/qxslttokenizer_p.h481
-rw-r--r--src/xmlpatterns/parser/qxslttokenlookup.cpp3006
-rw-r--r--src/xmlpatterns/parser/qxslttokenlookup.xml167
-rw-r--r--src/xmlpatterns/parser/qxslttokenlookup_p.h213
-rw-r--r--src/xmlpatterns/parser/trolltechHeader.txt51
-rw-r--r--src/xmlpatterns/parser/winCEWorkaround.sed20
-rw-r--r--src/xmlpatterns/projection/projection.pri4
-rw-r--r--src/xmlpatterns/projection/qdocumentprojector.cpp214
-rw-r--r--src/xmlpatterns/projection/qdocumentprojector_p.h107
-rw-r--r--src/xmlpatterns/projection/qprojectedexpression_p.h165
-rw-r--r--src/xmlpatterns/qtokenautomaton/README66
-rw-r--r--src/xmlpatterns/qtokenautomaton/exampleFile.xml65
-rw-r--r--src/xmlpatterns/qtokenautomaton/qautomaton2cpp.xsl298
-rw-r--r--src/xmlpatterns/qtokenautomaton/qtokenautomaton.xsd89
-rw-r--r--src/xmlpatterns/query.pri14
-rw-r--r--src/xmlpatterns/type/qabstractnodetest.cpp78
-rw-r--r--src/xmlpatterns/type/qabstractnodetest_p.h87
-rw-r--r--src/xmlpatterns/type/qanyitemtype.cpp90
-rw-r--r--src/xmlpatterns/type/qanyitemtype_p.h119
-rw-r--r--src/xmlpatterns/type/qanynodetype.cpp98
-rw-r--r--src/xmlpatterns/type/qanynodetype_p.h113
-rw-r--r--src/xmlpatterns/type/qanysimpletype.cpp83
-rw-r--r--src/xmlpatterns/type/qanysimpletype_p.h118
-rw-r--r--src/xmlpatterns/type/qanytype.cpp93
-rw-r--r--src/xmlpatterns/type/qanytype_p.h132
-rw-r--r--src/xmlpatterns/type/qatomiccasterlocator.cpp82
-rw-r--r--src/xmlpatterns/type/qatomiccasterlocator_p.h126
-rw-r--r--src/xmlpatterns/type/qatomiccasterlocators.cpp252
-rw-r--r--src/xmlpatterns/type/qatomiccasterlocators_p.h909
-rw-r--r--src/xmlpatterns/type/qatomiccomparatorlocator.cpp91
-rw-r--r--src/xmlpatterns/type/qatomiccomparatorlocator_p.h132
-rw-r--r--src/xmlpatterns/type/qatomiccomparatorlocators.cpp232
-rw-r--r--src/xmlpatterns/type/qatomiccomparatorlocators_p.h356
-rw-r--r--src/xmlpatterns/type/qatomicmathematicianlocator.cpp85
-rw-r--r--src/xmlpatterns/type/qatomicmathematicianlocator_p.h158
-rw-r--r--src/xmlpatterns/type/qatomicmathematicianlocators.cpp168
-rw-r--r--src/xmlpatterns/type/qatomicmathematicianlocators_p.h249
-rw-r--r--src/xmlpatterns/type/qatomictype.cpp118
-rw-r--r--src/xmlpatterns/type/qatomictype_p.h160
-rw-r--r--src/xmlpatterns/type/qatomictypedispatch_p.h277
-rw-r--r--src/xmlpatterns/type/qbasictypesfactory.cpp128
-rw-r--r--src/xmlpatterns/type/qbasictypesfactory_p.h121
-rw-r--r--src/xmlpatterns/type/qbuiltinatomictype.cpp94
-rw-r--r--src/xmlpatterns/type/qbuiltinatomictype_p.h130
-rw-r--r--src/xmlpatterns/type/qbuiltinatomictypes.cpp226
-rw-r--r--src/xmlpatterns/type/qbuiltinatomictypes_p.h789
-rw-r--r--src/xmlpatterns/type/qbuiltinnodetype.cpp165
-rw-r--r--src/xmlpatterns/type/qbuiltinnodetype_p.h110
-rw-r--r--src/xmlpatterns/type/qbuiltintypes.cpp161
-rw-r--r--src/xmlpatterns/type/qbuiltintypes_p.h174
-rw-r--r--src/xmlpatterns/type/qcardinality.cpp102
-rw-r--r--src/xmlpatterns/type/qcardinality_p.h544
-rw-r--r--src/xmlpatterns/type/qcommonsequencetypes.cpp132
-rw-r--r--src/xmlpatterns/type/qcommonsequencetypes_p.h414
-rw-r--r--src/xmlpatterns/type/qebvtype.cpp123
-rw-r--r--src/xmlpatterns/type/qebvtype_p.h135
-rw-r--r--src/xmlpatterns/type/qemptysequencetype.cpp101
-rw-r--r--src/xmlpatterns/type/qemptysequencetype_p.h124
-rw-r--r--src/xmlpatterns/type/qgenericsequencetype.cpp72
-rw-r--r--src/xmlpatterns/type/qgenericsequencetype_p.h115
-rw-r--r--src/xmlpatterns/type/qitemtype.cpp103
-rw-r--r--src/xmlpatterns/type/qitemtype_p.h286
-rw-r--r--src/xmlpatterns/type/qlocalnametest.cpp99
-rw-r--r--src/xmlpatterns/type/qlocalnametest_p.h102
-rw-r--r--src/xmlpatterns/type/qmultiitemtype.cpp140
-rw-r--r--src/xmlpatterns/type/qmultiitemtype_p.h146
-rw-r--r--src/xmlpatterns/type/qnamespacenametest.cpp95
-rw-r--r--src/xmlpatterns/type/qnamespacenametest_p.h101
-rw-r--r--src/xmlpatterns/type/qnonetype.cpp104
-rw-r--r--src/xmlpatterns/type/qnonetype_p.h155
-rw-r--r--src/xmlpatterns/type/qnumerictype.cpp142
-rw-r--r--src/xmlpatterns/type/qnumerictype_p.h174
-rw-r--r--src/xmlpatterns/type/qprimitives_p.h202
-rw-r--r--src/xmlpatterns/type/qqnametest.cpp99
-rw-r--r--src/xmlpatterns/type/qqnametest_p.h103
-rw-r--r--src/xmlpatterns/type/qschemacomponent.cpp56
-rw-r--r--src/xmlpatterns/type/qschemacomponent_p.h85
-rw-r--r--src/xmlpatterns/type/qschematype.cpp75
-rw-r--r--src/xmlpatterns/type/qschematype_p.h222
-rw-r--r--src/xmlpatterns/type/qschematypefactory.cpp56
-rw-r--r--src/xmlpatterns/type/qschematypefactory_p.h102
-rw-r--r--src/xmlpatterns/type/qsequencetype.cpp65
-rw-r--r--src/xmlpatterns/type/qsequencetype_p.h138
-rw-r--r--src/xmlpatterns/type/qtypechecker.cpp296
-rw-r--r--src/xmlpatterns/type/qtypechecker_p.h185
-rw-r--r--src/xmlpatterns/type/quntyped.cpp79
-rw-r--r--src/xmlpatterns/type/quntyped_p.h112
-rw-r--r--src/xmlpatterns/type/qxsltnodetest.cpp72
-rw-r--r--src/xmlpatterns/type/qxsltnodetest_p.h100
-rw-r--r--src/xmlpatterns/type/type.pri70
-rw-r--r--src/xmlpatterns/utils/qautoptr.cpp50
-rw-r--r--src/xmlpatterns/utils/qautoptr_p.h177
-rw-r--r--src/xmlpatterns/utils/qcommonnamespaces_p.h152
-rw-r--r--src/xmlpatterns/utils/qcppcastinghelper_p.h161
-rw-r--r--src/xmlpatterns/utils/qdebug_p.h107
-rw-r--r--src/xmlpatterns/utils/qdelegatingnamespaceresolver.cpp92
-rw-r--r--src/xmlpatterns/utils/qdelegatingnamespaceresolver_p.h96
-rw-r--r--src/xmlpatterns/utils/qgenericnamespaceresolver.cpp96
-rw-r--r--src/xmlpatterns/utils/qgenericnamespaceresolver_p.h113
-rw-r--r--src/xmlpatterns/utils/qnamepool.cpp418
-rw-r--r--src/xmlpatterns/utils/qnamepool_p.h556
-rw-r--r--src/xmlpatterns/utils/qnamespacebinding_p.h143
-rw-r--r--src/xmlpatterns/utils/qnamespaceresolver.cpp57
-rw-r--r--src/xmlpatterns/utils/qnamespaceresolver_p.h119
-rw-r--r--src/xmlpatterns/utils/qnodenamespaceresolver.cpp83
-rw-r--r--src/xmlpatterns/utils/qnodenamespaceresolver_p.h91
-rw-r--r--src/xmlpatterns/utils/qoutputvalidator.cpp162
-rw-r--r--src/xmlpatterns/utils/qoutputvalidator_p.h127
-rw-r--r--src/xmlpatterns/utils/qpatternistlocale.cpp91
-rw-r--r--src/xmlpatterns/utils/qpatternistlocale_p.h273
-rw-r--r--src/xmlpatterns/utils/qxpathhelper.cpp128
-rw-r--r--src/xmlpatterns/utils/qxpathhelper_p.h174
-rw-r--r--src/xmlpatterns/utils/utils.pri21
-rw-r--r--src/xmlpatterns/xmlpatterns.pro35
-rw-r--r--tests/README18
-rw-r--r--tests/arthur/.gitattributes2
-rw-r--r--tests/arthur/README84
-rw-r--r--tests/arthur/arthurtester.pri21
-rw-r--r--tests/arthur/arthurtester.pro6
-rw-r--r--tests/arthur/common/common.pri18
-rw-r--r--tests/arthur/common/common.pro20
-rw-r--r--tests/arthur/common/framework.cpp130
-rw-r--r--tests/arthur/common/framework.h76
-rw-r--r--tests/arthur/common/images.qrc33
-rw-r--r--tests/arthur/common/images/alpha.pngbin0 -> 2422 bytes-rw-r--r--tests/arthur/common/images/alpha2x2.pngbin0 -> 169 bytes-rw-r--r--tests/arthur/common/images/bitmap.pngbin0 -> 254 bytes-rw-r--r--tests/arthur/common/images/border.pngbin0 -> 182 bytes-rw-r--r--tests/arthur/common/images/dome_argb32.pngbin0 -> 18234 bytes-rw-r--r--tests/arthur/common/images/dome_indexed.pngbin0 -> 7946 bytes-rw-r--r--tests/arthur/common/images/dome_indexed_mask.pngbin0 -> 5411 bytes-rw-r--r--tests/arthur/common/images/dome_mono.pngbin0 -> 1391 bytes-rw-r--r--tests/arthur/common/images/dome_mono_128.pngbin0 -> 2649 bytes-rw-r--r--tests/arthur/common/images/dome_mono_palette.pngbin0 -> 1404 bytes-rw-r--r--tests/arthur/common/images/dome_rgb32.pngbin0 -> 17890 bytes-rw-r--r--tests/arthur/common/images/dot.pngbin0 -> 287 bytes-rw-r--r--tests/arthur/common/images/face.pngbin0 -> 2414 bytes-rw-r--r--tests/arthur/common/images/gam030.pngbin0 -> 213 bytes-rw-r--r--tests/arthur/common/images/gam045.pngbin0 -> 216 bytes-rw-r--r--tests/arthur/common/images/gam056.pngbin0 -> 216 bytes-rw-r--r--tests/arthur/common/images/gam100.pngbin0 -> 205 bytes-rw-r--r--tests/arthur/common/images/gam200.pngbin0 -> 187 bytes-rw-r--r--tests/arthur/common/images/image.pngbin0 -> 169554 bytes-rw-r--r--tests/arthur/common/images/mask.pngbin0 -> 274 bytes-rw-r--r--tests/arthur/common/images/mask_100.pngbin0 -> 319 bytes-rw-r--r--tests/arthur/common/images/masked.pngbin0 -> 788 bytes-rw-r--r--tests/arthur/common/images/sign.pngbin0 -> 10647 bytes-rw-r--r--tests/arthur/common/images/solid.pngbin0 -> 607 bytes-rw-r--r--tests/arthur/common/images/solid2x2.pngbin0 -> 169 bytes-rw-r--r--tests/arthur/common/images/struct-image-01.jpgbin0 -> 4751 bytes-rw-r--r--tests/arthur/common/images/struct-image-01.pngbin0 -> 63238 bytes-rw-r--r--tests/arthur/common/images/zebra.pngbin0 -> 426 bytes-rw-r--r--tests/arthur/common/paintcommands.cpp2657
-rw-r--r--tests/arthur/common/paintcommands.h332
-rw-r--r--tests/arthur/common/qengines.cpp733
-rw-r--r--tests/arthur/common/qengines.h240
-rw-r--r--tests/arthur/common/xmldata.cpp110
-rw-r--r--tests/arthur/common/xmldata.h153
-rw-r--r--tests/arthur/data/1.1/color-prop-03-t.svg101
-rw-r--r--tests/arthur/data/1.1/coords-trans-01-b.svg240
-rw-r--r--tests/arthur/data/1.1/coords-trans-02-t.svg178
-rw-r--r--tests/arthur/data/1.1/coords-trans-03-t.svg100
-rw-r--r--tests/arthur/data/1.1/coords-trans-04-t.svg69
-rw-r--r--tests/arthur/data/1.1/coords-trans-05-t.svg89
-rw-r--r--tests/arthur/data/1.1/coords-trans-06-t.svg83
-rw-r--r--tests/arthur/data/1.1/fonts-elem-01-t.svg103
-rw-r--r--tests/arthur/data/1.1/fonts-elem-02-t.svg107
-rw-r--r--tests/arthur/data/1.1/interact-zoom-01-t.svg71
-rw-r--r--tests/arthur/data/1.1/linking-a-04-t.svg124
-rw-r--r--tests/arthur/data/1.1/linking-uri-03-t.svg74
-rw-r--r--tests/arthur/data/1.1/metadata-example-01-b.svg175
-rw-r--r--tests/arthur/data/1.1/painting-fill-01-t.svg80
-rw-r--r--tests/arthur/data/1.1/painting-fill-02-t.svg80
-rw-r--r--tests/arthur/data/1.1/painting-fill-03-t.svg77
-rw-r--r--tests/arthur/data/1.1/painting-fill-04-t.svg57
-rw-r--r--tests/arthur/data/1.1/painting-stroke-01-t.svg55
-rw-r--r--tests/arthur/data/1.1/painting-stroke-02-t.svg56
-rw-r--r--tests/arthur/data/1.1/painting-stroke-03-t.svg57
-rw-r--r--tests/arthur/data/1.1/painting-stroke-04-t.svg71
-rw-r--r--tests/arthur/data/1.1/paths-data-01-t.svg158
-rw-r--r--tests/arthur/data/1.1/paths-data-02-t.svg132
-rw-r--r--tests/arthur/data/1.1/paths-data-04-t.svg92
-rw-r--r--tests/arthur/data/1.1/paths-data-05-t.svg89
-rw-r--r--tests/arthur/data/1.1/paths-data-06-t.svg72
-rw-r--r--tests/arthur/data/1.1/paths-data-07-t.svg72
-rw-r--r--tests/arthur/data/1.1/pservers-grad-07-b.svg74
-rw-r--r--tests/arthur/data/1.1/pservers-grad-11-b.svg100
-rw-r--r--tests/arthur/data/1.1/render-elems-01-t.svg54
-rw-r--r--tests/arthur/data/1.1/render-elems-02-t.svg75
-rw-r--r--tests/arthur/data/1.1/render-elems-03-t.svg57
-rw-r--r--tests/arthur/data/1.1/render-elems-06-t.svg75
-rw-r--r--tests/arthur/data/1.1/render-elems-07-t.svg76
-rw-r--r--tests/arthur/data/1.1/render-elems-08-t.svg78
-rw-r--r--tests/arthur/data/1.1/render-groups-03-t.svg117
-rw-r--r--tests/arthur/data/1.1/shapes-circle-01-t.svg56
-rw-r--r--tests/arthur/data/1.1/shapes-ellipse-01-t.svg72
-rw-r--r--tests/arthur/data/1.1/shapes-line-01-t.svg80
-rw-r--r--tests/arthur/data/1.1/shapes-polygon-01-t.svg73
-rw-r--r--tests/arthur/data/1.1/shapes-polyline-01-t.svg84
-rw-r--r--tests/arthur/data/1.1/shapes-rect-01-t.svg72
-rw-r--r--tests/arthur/data/1.1/struct-cond-01-t.svg75
-rw-r--r--tests/arthur/data/1.1/struct-cond-02-t.svg574
-rw-r--r--tests/arthur/data/1.1/struct-defs-01-t.svg85
-rw-r--r--tests/arthur/data/1.1/struct-group-01-t.svg71
-rw-r--r--tests/arthur/data/1.1/struct-image-01-t.svg65
-rw-r--r--tests/arthur/data/1.1/struct-image-03-t.svg54
-rw-r--r--tests/arthur/data/1.1/struct-image-04-t.svg126
-rw-r--r--tests/arthur/data/1.1/styling-pres-01-t.svg38
-rw-r--r--tests/arthur/data/1.1/text-fonts-01-t.svg98
-rw-r--r--tests/arthur/data/1.1/text-fonts-02-t.svg73
-rw-r--r--tests/arthur/data/1.1/text-intro-01-t.svg69
-rw-r--r--tests/arthur/data/1.1/text-intro-04-t.svg68
-rw-r--r--tests/arthur/data/1.1/text-ws-01-t.svg99
-rw-r--r--tests/arthur/data/1.1/text-ws-02-t.svg104
-rw-r--r--tests/arthur/data/1.2/07_07.svg40
-rw-r--r--tests/arthur/data/1.2/07_12.svg21
-rw-r--r--tests/arthur/data/1.2/08_02.svg26
-rw-r--r--tests/arthur/data/1.2/08_03.svg28
-rw-r--r--tests/arthur/data/1.2/08_04.svg19
-rw-r--r--tests/arthur/data/1.2/09_02.svg14
-rw-r--r--tests/arthur/data/1.2/09_03.svg10
-rw-r--r--tests/arthur/data/1.2/09_04.svg15
-rw-r--r--tests/arthur/data/1.2/09_05.svg20
-rw-r--r--tests/arthur/data/1.2/09_06.svg16
-rw-r--r--tests/arthur/data/1.2/09_07.svg15
-rw-r--r--tests/arthur/data/1.2/10_03.svg15
-rw-r--r--tests/arthur/data/1.2/10_04.svg20
-rw-r--r--tests/arthur/data/1.2/10_05.svg21
-rw-r--r--tests/arthur/data/1.2/10_06.svg20
-rw-r--r--tests/arthur/data/1.2/10_07.svg20
-rw-r--r--tests/arthur/data/1.2/10_08.svg23
-rw-r--r--tests/arthur/data/1.2/10_09.svg30
-rw-r--r--tests/arthur/data/1.2/10_10.svg23
-rw-r--r--tests/arthur/data/1.2/10_11.svg24
-rw-r--r--tests/arthur/data/1.2/11_01.svg20
-rw-r--r--tests/arthur/data/1.2/11_02.svg9
-rw-r--r--tests/arthur/data/1.2/11_03.svg11
-rw-r--r--tests/arthur/data/1.2/13_01.svg20
-rw-r--r--tests/arthur/data/1.2/13_02.svg22
-rw-r--r--tests/arthur/data/1.2/19_01.svg51
-rw-r--r--tests/arthur/data/1.2/19_02.svg25
-rw-r--r--tests/arthur/data/1.2/animation.svg11
-rw-r--r--tests/arthur/data/1.2/cubic02.svg77
-rw-r--r--tests/arthur/data/1.2/fillrule-evenodd.svg38
-rw-r--r--tests/arthur/data/1.2/fillrule-nonzero.svg38
-rw-r--r--tests/arthur/data/1.2/linecap.svg32
-rw-r--r--tests/arthur/data/1.2/linejoin.svg29
-rw-r--r--tests/arthur/data/1.2/media01.svg20
-rw-r--r--tests/arthur/data/1.2/media02.svg13
-rw-r--r--tests/arthur/data/1.2/media03.svg13
-rw-r--r--tests/arthur/data/1.2/media04.svg24
-rw-r--r--tests/arthur/data/1.2/media05.svg27
-rw-r--r--tests/arthur/data/1.2/mpath01.svg10
-rw-r--r--tests/arthur/data/1.2/non-scaling-stroke.svg15
-rw-r--r--tests/arthur/data/1.2/noonoo.svg13
-rw-r--r--tests/arthur/data/1.2/referencedRect.svg9
-rw-r--r--tests/arthur/data/1.2/referencedRect2.svg9
-rw-r--r--tests/arthur/data/1.2/solidcolor.svg16
-rw-r--r--tests/arthur/data/1.2/textArea01.svg10
-rw-r--r--tests/arthur/data/1.2/timed-lyrics.svg22
-rw-r--r--tests/arthur/data/1.2/use.svg22
-rw-r--r--tests/arthur/data/bugs/.gitattributes2
-rw-r--r--tests/arthur/data/bugs/gradient-defaults.svg18
-rw-r--r--tests/arthur/data/bugs/gradient_pen_fill.svg32
-rw-r--r--tests/arthur/data/bugs/openglcurve.svg35
-rw-r--r--tests/arthur/data/bugs/org_module.svg389
-rw-r--r--tests/arthur/data/bugs/resolve_linear.svg29
-rw-r--r--tests/arthur/data/bugs/resolve_radial.svg36
-rw-r--r--tests/arthur/data/bugs/text_pens.svg7
-rw-r--r--tests/arthur/data/framework.ini22
-rw-r--r--tests/arthur/data/images/alpha.pngbin0 -> 2422 bytes-rw-r--r--tests/arthur/data/images/bitmap.pngbin0 -> 254 bytes-rw-r--r--tests/arthur/data/images/border.pngbin0 -> 182 bytes-rw-r--r--tests/arthur/data/images/dome_argb32.pngbin0 -> 18234 bytes-rw-r--r--tests/arthur/data/images/dome_indexed.pngbin0 -> 7946 bytes-rw-r--r--tests/arthur/data/images/dome_indexed_mask.pngbin0 -> 5411 bytes-rw-r--r--tests/arthur/data/images/dome_mono.pngbin0 -> 1391 bytes-rw-r--r--tests/arthur/data/images/dome_mono_128.pngbin0 -> 2649 bytes-rw-r--r--tests/arthur/data/images/dome_mono_palette.pngbin0 -> 1404 bytes-rw-r--r--tests/arthur/data/images/dome_rgb32.pngbin0 -> 17890 bytes-rw-r--r--tests/arthur/data/images/dot.pngbin0 -> 287 bytes-rw-r--r--tests/arthur/data/images/face.pngbin0 -> 2414 bytes-rw-r--r--tests/arthur/data/images/gam030.pngbin0 -> 213 bytes-rw-r--r--tests/arthur/data/images/gam045.pngbin0 -> 216 bytes-rw-r--r--tests/arthur/data/images/gam056.pngbin0 -> 216 bytes-rw-r--r--tests/arthur/data/images/gam100.pngbin0 -> 205 bytes-rw-r--r--tests/arthur/data/images/gam200.pngbin0 -> 187 bytes-rw-r--r--tests/arthur/data/images/image.pngbin0 -> 169554 bytes-rw-r--r--tests/arthur/data/images/mask.pngbin0 -> 274 bytes-rw-r--r--tests/arthur/data/images/mask_100.pngbin0 -> 319 bytes-rw-r--r--tests/arthur/data/images/masked.pngbin0 -> 788 bytes-rw-r--r--tests/arthur/data/images/paths.qps32
-rw-r--r--tests/arthur/data/images/pens.qps96
-rw-r--r--tests/arthur/data/images/sign.pngbin0 -> 10647 bytes-rw-r--r--tests/arthur/data/images/solid.pngbin0 -> 607 bytes-rw-r--r--tests/arthur/data/images/struct-image-01.jpgbin0 -> 4751 bytes-rw-r--r--tests/arthur/data/images/struct-image-01.pngbin0 -> 63238 bytes-rw-r--r--tests/arthur/data/qps/alphas.qps63
-rw-r--r--tests/arthur/data/qps/alphas_qps.pngbin0 -> 45840 bytes-rw-r--r--tests/arthur/data/qps/arcs.qps65
-rw-r--r--tests/arthur/data/qps/arcs2.qps44
-rw-r--r--tests/arthur/data/qps/arcs2_qps.pngbin0 -> 9136 bytes-rw-r--r--tests/arthur/data/qps/arcs_qps.pngbin0 -> 110658 bytes-rw-r--r--tests/arthur/data/qps/background.qps133
-rw-r--r--tests/arthur/data/qps/background_brush.qps2
-rw-r--r--tests/arthur/data/qps/background_brush_qps.pngbin0 -> 62149 bytes-rw-r--r--tests/arthur/data/qps/background_qps.pngbin0 -> 53461 bytes-rw-r--r--tests/arthur/data/qps/beziers.qps144
-rw-r--r--tests/arthur/data/qps/beziers_qps.pngbin0 -> 57610 bytes-rw-r--r--tests/arthur/data/qps/bitmaps.qps163
-rw-r--r--tests/arthur/data/qps/bitmaps_qps.pngbin0 -> 89888 bytes-rw-r--r--tests/arthur/data/qps/brush_pens.qps101
-rw-r--r--tests/arthur/data/qps/brush_pens_qps.pngbin0 -> 77823 bytes-rw-r--r--tests/arthur/data/qps/brushes.qps77
-rw-r--r--tests/arthur/data/qps/brushes_qps.pngbin0 -> 134906 bytes-rw-r--r--tests/arthur/data/qps/clippaths.qps58
-rw-r--r--tests/arthur/data/qps/clippaths_qps.pngbin0 -> 6484 bytes-rw-r--r--tests/arthur/data/qps/clipping.qps179
-rw-r--r--tests/arthur/data/qps/clipping_qps.pngbin0 -> 14424 bytes-rw-r--r--tests/arthur/data/qps/clipping_state.qps57
-rw-r--r--tests/arthur/data/qps/clipping_state_qps.pngbin0 -> 5089 bytes-rw-r--r--tests/arthur/data/qps/cliprects.qps57
-rw-r--r--tests/arthur/data/qps/cliprects_qps.pngbin0 -> 6484 bytes-rw-r--r--tests/arthur/data/qps/conical_gradients.qps82
-rw-r--r--tests/arthur/data/qps/conical_gradients_perspectives.qps61
-rw-r--r--tests/arthur/data/qps/conical_gradients_perspectives_qps.pngbin0 -> 115264 bytes-rw-r--r--tests/arthur/data/qps/conical_gradients_qps.pngbin0 -> 108982 bytes-rw-r--r--tests/arthur/data/qps/dashes.qps265
-rw-r--r--tests/arthur/data/qps/dashes_qps.pngbin0 -> 48344 bytes-rw-r--r--tests/arthur/data/qps/degeneratebeziers.qps7
-rw-r--r--tests/arthur/data/qps/degeneratebeziers_qps.pngbin0 -> 5503 bytes-rw-r--r--tests/arthur/data/qps/deviceclipping.qps45
-rw-r--r--tests/arthur/data/qps/deviceclipping_qps.pngbin0 -> 12919 bytes-rw-r--r--tests/arthur/data/qps/drawpoints.qps98
-rw-r--r--tests/arthur/data/qps/drawpoints_qps.pngbin0 -> 8224 bytes-rw-r--r--tests/arthur/data/qps/drawtext.qps85
-rw-r--r--tests/arthur/data/qps/drawtext_qps.pngbin0 -> 55646 bytes-rw-r--r--tests/arthur/data/qps/ellipses.qps83
-rw-r--r--tests/arthur/data/qps/ellipses_qps.pngbin0 -> 36197 bytes-rw-r--r--tests/arthur/data/qps/filltest.qps410
-rw-r--r--tests/arthur/data/qps/filltest_qps.pngbin0 -> 22602 bytes-rw-r--r--tests/arthur/data/qps/fonts.qps64
-rw-r--r--tests/arthur/data/qps/fonts_qps.pngbin0 -> 75853 bytes-rw-r--r--tests/arthur/data/qps/gradients.qps41
-rw-r--r--tests/arthur/data/qps/gradients_qps.pngbin0 -> 41596 bytes-rw-r--r--tests/arthur/data/qps/image_formats.qps78
-rw-r--r--tests/arthur/data/qps/image_formats_qps.pngbin0 -> 275242 bytes-rw-r--r--tests/arthur/data/qps/images.qps103
-rw-r--r--tests/arthur/data/qps/images2.qps143
-rw-r--r--tests/arthur/data/qps/images2_qps.pngbin0 -> 182146 bytes-rw-r--r--tests/arthur/data/qps/images_qps.pngbin0 -> 322000 bytes-rw-r--r--tests/arthur/data/qps/join_cap_styles.qps60
-rw-r--r--tests/arthur/data/qps/join_cap_styles_duplicate_control_points.qps65
-rw-r--r--tests/arthur/data/qps/join_cap_styles_duplicate_control_points_qps.pngbin0 -> 42237 bytes-rw-r--r--tests/arthur/data/qps/join_cap_styles_qps.pngbin0 -> 37518 bytes-rw-r--r--tests/arthur/data/qps/linear_gradients.qps141
-rw-r--r--tests/arthur/data/qps/linear_gradients_perspectives.qps60
-rw-r--r--tests/arthur/data/qps/linear_gradients_perspectives_qps.pngbin0 -> 78017 bytes-rw-r--r--tests/arthur/data/qps/linear_gradients_qps.pngbin0 -> 82119 bytes-rw-r--r--tests/arthur/data/qps/linear_resolving_gradients.qps75
-rw-r--r--tests/arthur/data/qps/linear_resolving_gradients_qps.pngbin0 -> 76697 bytes-rw-r--r--tests/arthur/data/qps/lineconsistency.qps70
-rw-r--r--tests/arthur/data/qps/lineconsistency_qps.pngbin0 -> 12500 bytes-rw-r--r--tests/arthur/data/qps/linedashes.qps92
-rw-r--r--tests/arthur/data/qps/linedashes2.qps151
-rw-r--r--tests/arthur/data/qps/linedashes2_aa.qps2
-rw-r--r--tests/arthur/data/qps/linedashes2_aa_qps.pngbin0 -> 28956 bytes-rw-r--r--tests/arthur/data/qps/linedashes2_qps.pngbin0 -> 12182 bytes-rw-r--r--tests/arthur/data/qps/linedashes_qps.pngbin0 -> 11801 bytes-rw-r--r--tests/arthur/data/qps/lines.qps555
-rw-r--r--tests/arthur/data/qps/lines2.qps176
-rw-r--r--tests/arthur/data/qps/lines2_qps.pngbin0 -> 36623 bytes-rw-r--r--tests/arthur/data/qps/lines_qps.pngbin0 -> 113575 bytes-rw-r--r--tests/arthur/data/qps/object_bounding_mode.qps35
-rw-r--r--tests/arthur/data/qps/object_bounding_mode_qps.pngbin0 -> 85460 bytes-rw-r--r--tests/arthur/data/qps/pathfill.qps35
-rw-r--r--tests/arthur/data/qps/pathfill_qps.pngbin0 -> 198538 bytes-rw-r--r--tests/arthur/data/qps/paths.qps32
-rw-r--r--tests/arthur/data/qps/paths_aa.qps2
-rw-r--r--tests/arthur/data/qps/paths_aa_qps.pngbin0 -> 92711 bytes-rw-r--r--tests/arthur/data/qps/paths_qps.pngbin0 -> 20637 bytes-rw-r--r--tests/arthur/data/qps/pens.qps130
-rw-r--r--tests/arthur/data/qps/pens_aa.qps3
-rw-r--r--tests/arthur/data/qps/pens_aa_qps.pngbin0 -> 30813 bytes-rw-r--r--tests/arthur/data/qps/pens_cosmetic.qps107
-rw-r--r--tests/arthur/data/qps/pens_cosmetic_qps.pngbin0 -> 47487 bytes-rw-r--r--tests/arthur/data/qps/pens_qps.pngbin0 -> 11822 bytes-rw-r--r--tests/arthur/data/qps/perspectives.qps70
-rw-r--r--tests/arthur/data/qps/perspectives2.qps307
-rw-r--r--tests/arthur/data/qps/perspectives2_qps.pngbin0 -> 234054 bytes-rw-r--r--tests/arthur/data/qps/perspectives_qps.pngbin0 -> 491494 bytes-rw-r--r--tests/arthur/data/qps/pixmap_rotation.qps27
-rw-r--r--tests/arthur/data/qps/pixmap_rotation_qps.pngbin0 -> 8141 bytes-rw-r--r--tests/arthur/data/qps/pixmap_scaling.qps219
-rw-r--r--tests/arthur/data/qps/pixmap_subpixel.qps115
-rw-r--r--tests/arthur/data/qps/pixmap_subpixel_qps.pngbin0 -> 5317 bytes-rw-r--r--tests/arthur/data/qps/pixmaps.qps103
-rw-r--r--tests/arthur/data/qps/pixmaps_qps.pngbin0 -> 321685 bytes-rw-r--r--tests/arthur/data/qps/porter_duff.qps248
-rw-r--r--tests/arthur/data/qps/porter_duff2.qps256
-rw-r--r--tests/arthur/data/qps/porter_duff2_qps.pngbin0 -> 99167 bytes-rw-r--r--tests/arthur/data/qps/porter_duff_qps.pngbin0 -> 39375 bytes-rw-r--r--tests/arthur/data/qps/primitives.qps179
-rw-r--r--tests/arthur/data/qps/primitives_qps.pngbin0 -> 104235 bytes-rw-r--r--tests/arthur/data/qps/radial_gradients.qps96
-rw-r--r--tests/arthur/data/qps/radial_gradients_perspectives.qps60
-rw-r--r--tests/arthur/data/qps/radial_gradients_perspectives_qps.pngbin0 -> 133150 bytes-rw-r--r--tests/arthur/data/qps/radial_gradients_qps.pngbin0 -> 156036 bytes-rw-r--r--tests/arthur/data/qps/rasterops.qps83
-rw-r--r--tests/arthur/data/qps/rasterops_qps.pngbin0 -> 20400 bytes-rw-r--r--tests/arthur/data/qps/sizes.qps147
-rw-r--r--tests/arthur/data/qps/sizes_qps.pngbin0 -> 42355 bytes-rw-r--r--tests/arthur/data/qps/text.qps122
-rw-r--r--tests/arthur/data/qps/text_perspectives.qps100
-rw-r--r--tests/arthur/data/qps/text_perspectives_qps.pngbin0 -> 112750 bytes-rw-r--r--tests/arthur/data/qps/text_qps.pngbin0 -> 72027 bytes-rw-r--r--tests/arthur/data/qps/tiled_pixmap.qps82
-rw-r--r--tests/arthur/data/qps/tiled_pixmap_qps.pngbin0 -> 376370 bytes-rw-r--r--tests/arthur/data/random/arcs02.svg59
-rw-r--r--tests/arthur/data/random/atop.svg55
-rw-r--r--tests/arthur/data/random/clinton.svg370
-rw-r--r--tests/arthur/data/random/cowboy.svg4110
-rw-r--r--tests/arthur/data/random/gear_is_rising.svg702
-rw-r--r--tests/arthur/data/random/gearflowers.svg8342
-rw-r--r--tests/arthur/data/random/kde-look.svg16674
-rw-r--r--tests/arthur/data/random/linear_grad_transform.svg51
-rw-r--r--tests/arthur/data/random/longhorn.svg1595
-rw-r--r--tests/arthur/data/random/multiply.svg48
-rw-r--r--tests/arthur/data/random/picasso.svg2842
-rw-r--r--tests/arthur/data/random/porterduff.svg298
-rw-r--r--tests/arthur/data/random/radial_grad_transform.svg59
-rw-r--r--tests/arthur/data/random/solidcolor.svg15
-rw-r--r--tests/arthur/data/random/spiral.svg536
-rw-r--r--tests/arthur/data/random/tests.svg36
-rw-r--r--tests/arthur/data/random/tests2.svg12
-rw-r--r--tests/arthur/data/random/tiger.svg728
-rw-r--r--tests/arthur/data/random/uluru.pngbin0 -> 11749 bytes-rw-r--r--tests/arthur/data/random/worldcup.svg14668
-rw-r--r--tests/arthur/datagenerator/datagenerator.cpp481
-rw-r--r--tests/arthur/datagenerator/datagenerator.h103
-rw-r--r--tests/arthur/datagenerator/datagenerator.pri2
-rw-r--r--tests/arthur/datagenerator/datagenerator.pro20
-rw-r--r--tests/arthur/datagenerator/main.cpp54
-rw-r--r--tests/arthur/datagenerator/xmlgenerator.cpp262
-rw-r--r--tests/arthur/datagenerator/xmlgenerator.h73
-rw-r--r--tests/arthur/htmlgenerator/htmlgenerator.cpp518
-rw-r--r--tests/arthur/htmlgenerator/htmlgenerator.h126
-rw-r--r--tests/arthur/htmlgenerator/htmlgenerator.pro18
-rw-r--r--tests/arthur/htmlgenerator/main.cpp54
-rw-r--r--tests/arthur/lance/enum.pngbin0 -> 4619 bytes-rw-r--r--tests/arthur/lance/icons.qrc6
-rw-r--r--tests/arthur/lance/interactivewidget.cpp202
-rw-r--r--tests/arthur/lance/interactivewidget.h80
-rw-r--r--tests/arthur/lance/lance.pro17
-rw-r--r--tests/arthur/lance/main.cpp682
-rw-r--r--tests/arthur/lance/tools.pngbin0 -> 4424 bytes-rw-r--r--tests/arthur/lance/widgets.h211
-rw-r--r--tests/arthur/performancediff/main.cpp54
-rw-r--r--tests/arthur/performancediff/performancediff.cpp219
-rw-r--r--tests/arthur/performancediff/performancediff.h73
-rw-r--r--tests/arthur/performancediff/performancediff.pro18
-rw-r--r--tests/arthur/shower/main.cpp99
-rw-r--r--tests/arthur/shower/shower.cpp125
-rw-r--r--tests/arthur/shower/shower.h73
-rw-r--r--tests/arthur/shower/shower.pro16
-rw-r--r--tests/auto/atwrapper/.gitignore1
-rw-r--r--tests/auto/atwrapper/TODO17
-rw-r--r--tests/auto/atwrapper/atWrapper.cpp648
-rw-r--r--tests/auto/atwrapper/atWrapper.h93
-rw-r--r--tests/auto/atwrapper/atWrapper.pro25
-rw-r--r--tests/auto/atwrapper/atWrapperAutotest.cpp78
-rw-r--r--tests/auto/atwrapper/desert.ini14
-rw-r--r--tests/auto/atwrapper/ephron.ini14
-rw-r--r--tests/auto/atwrapper/gullgubben.ini12
-rw-r--r--tests/auto/atwrapper/honshu.ini16
-rw-r--r--tests/auto/atwrapper/kramer.ini12
-rw-r--r--tests/auto/atwrapper/scruffy.ini15
-rw-r--r--tests/auto/atwrapper/spareribs.ini14
-rw-r--r--tests/auto/atwrapper/titan.ini13
-rw-r--r--tests/auto/auto.pro435
-rw-r--r--tests/auto/bic/.gitignore3
-rw-r--r--tests/auto/bic/bic.pro4
-rw-r--r--tests/auto/bic/data/Qt3Support.4.0.0.aix-gcc-power32.txt19881
-rw-r--r--tests/auto/bic/data/Qt3Support.4.0.0.linux-gcc-amd64.txt20531
-rw-r--r--tests/auto/bic/data/Qt3Support.4.0.0.linux-gcc-ia32.txt20531
-rw-r--r--tests/auto/bic/data/Qt3Support.4.0.0.linux-gcc-ppc32.txt20531
-rw-r--r--tests/auto/bic/data/Qt3Support.4.0.0.macx-gcc-ppc32.txt20565
-rw-r--r--tests/auto/bic/data/Qt3Support.4.1.0.linux-gcc-ia32.txt21355
-rw-r--r--tests/auto/bic/data/Qt3Support.4.1.0.linux-gcc-ppc32.txt21360
-rw-r--r--tests/auto/bic/data/Qt3Support.4.1.0.macx-gcc-ia32.txt21364
-rw-r--r--tests/auto/bic/data/Qt3Support.4.1.0.macx-gcc-ppc32.txt21374
-rw-r--r--tests/auto/bic/data/Qt3Support.4.1.0.win32-gcc-ia32.txt21652
-rw-r--r--tests/auto/bic/data/Qt3Support.4.2.0.linux-gcc-ia32.txt23700
-rw-r--r--tests/auto/bic/data/Qt3Support.4.2.0.linux-gcc-ppc32.txt23690
-rw-r--r--tests/auto/bic/data/Qt3Support.4.2.0.macx-gcc-ia32.txt23733
-rw-r--r--tests/auto/bic/data/Qt3Support.4.2.0.macx-gcc-ppc32.txt23748
-rw-r--r--tests/auto/bic/data/Qt3Support.4.2.0.win32-gcc-ia32.txt24014
-rw-r--r--tests/auto/bic/data/Qt3Support.4.3.0.linux-gcc-ia32.txt24704
-rw-r--r--tests/auto/bic/data/Qt3Support.4.3.1.linux-gcc-ia32.txt24704
-rw-r--r--tests/auto/bic/data/Qt3Support.4.3.2.linux-gcc-ia32.txt24704
-rw-r--r--tests/auto/bic/data/QtCore.4.0.0.aix-gcc-power32.txt2044
-rw-r--r--tests/auto/bic/data/QtCore.4.0.0.linux-gcc-amd64.txt2074
-rw-r--r--tests/auto/bic/data/QtCore.4.0.0.linux-gcc-ia32.txt2074
-rw-r--r--tests/auto/bic/data/QtCore.4.0.0.linux-gcc-ppc32.txt4324
-rw-r--r--tests/auto/bic/data/QtCore.4.0.0.macx-gcc-ppc32.txt2089
-rw-r--r--tests/auto/bic/data/QtCore.4.1.0.linux-gcc-ia32.txt2267
-rw-r--r--tests/auto/bic/data/QtCore.4.1.0.linux-gcc-ppc32.txt2272
-rw-r--r--tests/auto/bic/data/QtCore.4.1.0.macx-gcc-ia32.txt2257
-rw-r--r--tests/auto/bic/data/QtCore.4.1.0.macx-gcc-ppc32.txt2267
-rw-r--r--tests/auto/bic/data/QtCore.4.1.0.win32-gcc-ia32.txt2103
-rw-r--r--tests/auto/bic/data/QtCore.4.2.0.linux-gcc-ia32.txt2615
-rw-r--r--tests/auto/bic/data/QtCore.4.2.0.linux-gcc-ppc32.txt2605
-rw-r--r--tests/auto/bic/data/QtCore.4.2.0.macx-gcc-ia32.txt2590
-rw-r--r--tests/auto/bic/data/QtCore.4.2.0.macx-gcc-ppc32.txt2605
-rw-r--r--tests/auto/bic/data/QtCore.4.2.0.win32-gcc-ia32.txt2436
-rw-r--r--tests/auto/bic/data/QtCore.4.3.0.linux-gcc-ia32.txt2661
-rw-r--r--tests/auto/bic/data/QtCore.4.3.1.linux-gcc-ia32.txt2661
-rw-r--r--tests/auto/bic/data/QtCore.4.3.2.linux-gcc-ia32.txt2661
-rw-r--r--tests/auto/bic/data/QtDBus.4.2.0.linux-gcc-ia32.txt1127
-rw-r--r--tests/auto/bic/data/QtDBus.4.2.0.linux-gcc-ppc32.txt1127
-rw-r--r--tests/auto/bic/data/QtDBus.4.2.0.macx-gcc-ia32.txt1187
-rw-r--r--tests/auto/bic/data/QtDBus.4.2.0.macx-gcc-ppc32.txt1187
-rw-r--r--tests/auto/bic/data/QtDBus.4.2.0.win32-gcc-ia32.txt1122
-rw-r--r--tests/auto/bic/data/QtDBus.4.3.0.linux-gcc-ia32.txt1192
-rw-r--r--tests/auto/bic/data/QtDBus.4.3.1.linux-gcc-ia32.txt1192
-rw-r--r--tests/auto/bic/data/QtDBus.4.3.2.linux-gcc-ia32.txt1192
-rw-r--r--tests/auto/bic/data/QtDesigner.4.2.0.linux-gcc-ia32.txt2987
-rw-r--r--tests/auto/bic/data/QtDesigner.4.3.0.linux-gcc-ia32.txt3216
-rw-r--r--tests/auto/bic/data/QtDesigner.4.3.1.linux-gcc-ia32.txt3216
-rw-r--r--tests/auto/bic/data/QtDesigner.4.3.2.linux-gcc-ia32.txt3216
-rw-r--r--tests/auto/bic/data/QtGui.4.0.0.aix-gcc-power32.txt11603
-rw-r--r--tests/auto/bic/data/QtGui.4.0.0.linux-gcc-amd64.txt12019
-rw-r--r--tests/auto/bic/data/QtGui.4.0.0.linux-gcc-ia32.txt12019
-rw-r--r--tests/auto/bic/data/QtGui.4.0.0.linux-gcc-ppc32.txt11870
-rw-r--r--tests/auto/bic/data/QtGui.4.0.0.macx-gcc-ppc32.txt12053
-rw-r--r--tests/auto/bic/data/QtGui.4.1.0.linux-gcc-ia32.txt12480
-rw-r--r--tests/auto/bic/data/QtGui.4.1.0.linux-gcc-ppc32.txt12485
-rw-r--r--tests/auto/bic/data/QtGui.4.1.0.macx-gcc-ia32.txt12489
-rw-r--r--tests/auto/bic/data/QtGui.4.1.0.macx-gcc-ppc32.txt12499
-rw-r--r--tests/auto/bic/data/QtGui.4.1.0.win32-gcc-ia32.txt12609
-rw-r--r--tests/auto/bic/data/QtGui.4.2.0.linux-gcc-ia32.txt14616
-rw-r--r--tests/auto/bic/data/QtGui.4.2.0.linux-gcc-ppc32.txt14606
-rw-r--r--tests/auto/bic/data/QtGui.4.2.0.macx-gcc-ia32.txt14649
-rw-r--r--tests/auto/bic/data/QtGui.4.2.0.macx-gcc-ppc32.txt14664
-rw-r--r--tests/auto/bic/data/QtGui.4.2.0.win32-gcc-ia32.txt14754
-rw-r--r--tests/auto/bic/data/QtGui.4.3.0.linux-gcc-ia32.txt15523
-rw-r--r--tests/auto/bic/data/QtGui.4.3.1.linux-gcc-ia32.txt15523
-rw-r--r--tests/auto/bic/data/QtGui.4.3.2.linux-gcc-ia32.txt15523
-rw-r--r--tests/auto/bic/data/QtNetwork.4.0.0.aix-gcc-power32.txt2336
-rw-r--r--tests/auto/bic/data/QtNetwork.4.0.0.linux-gcc-amd64.txt2379
-rw-r--r--tests/auto/bic/data/QtNetwork.4.0.0.linux-gcc-ia32.txt2379
-rw-r--r--tests/auto/bic/data/QtNetwork.4.0.0.linux-gcc-ppc32.txt2283
-rw-r--r--tests/auto/bic/data/QtNetwork.4.0.0.macx-gcc-ppc32.txt2394
-rw-r--r--tests/auto/bic/data/QtNetwork.4.1.0.linux-gcc-ia32.txt2577
-rw-r--r--tests/auto/bic/data/QtNetwork.4.1.0.linux-gcc-ppc32.txt2582
-rw-r--r--tests/auto/bic/data/QtNetwork.4.1.0.macx-gcc-ia32.txt2567
-rw-r--r--tests/auto/bic/data/QtNetwork.4.1.0.macx-gcc-ppc32.txt2577
-rw-r--r--tests/auto/bic/data/QtNetwork.4.1.0.win32-gcc-ia32.txt2413
-rw-r--r--tests/auto/bic/data/QtNetwork.4.2.0.linux-gcc-ia32.txt2950
-rw-r--r--tests/auto/bic/data/QtNetwork.4.2.0.linux-gcc-ppc32.txt2940
-rw-r--r--tests/auto/bic/data/QtNetwork.4.2.0.macx-gcc-ia32.txt2925
-rw-r--r--tests/auto/bic/data/QtNetwork.4.2.0.macx-gcc-ppc32.txt2940
-rw-r--r--tests/auto/bic/data/QtNetwork.4.2.0.win32-gcc-ia32.txt2771
-rw-r--r--tests/auto/bic/data/QtNetwork.4.3.0.linux-gcc-ia32.txt3093
-rw-r--r--tests/auto/bic/data/QtNetwork.4.3.1.linux-gcc-ia32.txt3093
-rw-r--r--tests/auto/bic/data/QtNetwork.4.3.2.linux-gcc-ia32.txt3093
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.0.0.aix-gcc-power32.txt11725
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.0.0.linux-gcc-amd64.txt12147
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.0.0.linux-gcc-ia32.txt12147
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.0.0.linux-gcc-ppc32.txt11998
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.0.0.macx-gcc-ppc32.txt12180
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.1.0.linux-gcc-ia32.txt12626
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.1.0.linux-gcc-ppc32.txt12631
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.1.0.macx-gcc-ia32.txt12634
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.1.0.macx-gcc-ppc32.txt12644
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.1.0.win32-gcc-ia32.txt19390
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.2.0.linux-gcc-ia32.txt14785
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.2.0.linux-gcc-ppc32.txt14775
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.2.0.macx-gcc-ia32.txt14817
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.2.0.macx-gcc-ppc32.txt14832
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.2.0.win32-gcc-ia32.txt21560
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.3.0.linux-gcc-ia32.txt15697
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.3.1.linux-gcc-ia32.txt15697
-rw-r--r--tests/auto/bic/data/QtOpenGL.4.3.2.linux-gcc-ia32.txt15697
-rw-r--r--tests/auto/bic/data/QtScript.4.3.0.linux-gcc-ia32.txt2780
-rw-r--r--tests/auto/bic/data/QtScript.4.3.0.macx-gcc-ia32.txt2835
-rw-r--r--tests/auto/bic/data/QtSql.4.0.0.aix-gcc-power32.txt2433
-rw-r--r--tests/auto/bic/data/QtSql.4.0.0.linux-gcc-amd64.txt2481
-rw-r--r--tests/auto/bic/data/QtSql.4.0.0.linux-gcc-ia32.txt2481
-rw-r--r--tests/auto/bic/data/QtSql.4.0.0.linux-gcc-ppc32.txt2385
-rw-r--r--tests/auto/bic/data/QtSql.4.0.0.macx-gcc-ppc32.txt2496
-rw-r--r--tests/auto/bic/data/QtSql.4.1.0.linux-gcc-ia32.txt2674
-rw-r--r--tests/auto/bic/data/QtSql.4.1.0.linux-gcc-ppc32.txt2679
-rw-r--r--tests/auto/bic/data/QtSql.4.1.0.macx-gcc-ia32.txt2664
-rw-r--r--tests/auto/bic/data/QtSql.4.1.0.macx-gcc-ppc32.txt2674
-rw-r--r--tests/auto/bic/data/QtSql.4.1.0.win32-gcc-ia32.txt2510
-rw-r--r--tests/auto/bic/data/QtSql.4.2.0.linux-gcc-ia32.txt3022
-rw-r--r--tests/auto/bic/data/QtSql.4.2.0.linux-gcc-ppc32.txt3012
-rw-r--r--tests/auto/bic/data/QtSql.4.2.0.macx-gcc-ia32.txt2997
-rw-r--r--tests/auto/bic/data/QtSql.4.2.0.macx-gcc-ppc32.txt3012
-rw-r--r--tests/auto/bic/data/QtSql.4.2.0.win32-gcc-ia32.txt2843
-rw-r--r--tests/auto/bic/data/QtSql.4.3.0.linux-gcc-ia32.txt3068
-rw-r--r--tests/auto/bic/data/QtSql.4.3.1.linux-gcc-ia32.txt3068
-rw-r--r--tests/auto/bic/data/QtSql.4.3.2.linux-gcc-ia32.txt3068
-rw-r--r--tests/auto/bic/data/QtSvg.4.1.0.linux-gcc-ia32.txt12598
-rw-r--r--tests/auto/bic/data/QtSvg.4.1.0.win32-gcc-ia32.txt12716
-rw-r--r--tests/auto/bic/data/QtSvg.4.2.0.linux-gcc-ia32.txt14788
-rw-r--r--tests/auto/bic/data/QtSvg.4.2.0.linux-gcc-ppc32.txt14778
-rw-r--r--tests/auto/bic/data/QtSvg.4.2.0.macx-gcc-ia32.txt14821
-rw-r--r--tests/auto/bic/data/QtSvg.4.2.0.macx-gcc-ppc32.txt14836
-rw-r--r--tests/auto/bic/data/QtSvg.4.2.0.win32-gcc-ia32.txt14930
-rw-r--r--tests/auto/bic/data/QtSvg.4.3.0.linux-gcc-ia32.txt15713
-rw-r--r--tests/auto/bic/data/QtSvg.4.3.1.linux-gcc-ia32.txt15713
-rw-r--r--tests/auto/bic/data/QtSvg.4.3.2.linux-gcc-ia32.txt15713
-rw-r--r--tests/auto/bic/data/QtTest.4.1.0.linux-gcc-ia32.txt2388
-rw-r--r--tests/auto/bic/data/QtTest.4.1.0.win32-gcc-ia32.txt2209
-rw-r--r--tests/auto/bic/data/QtTest.4.2.0.linux-gcc-ia32.txt2716
-rw-r--r--tests/auto/bic/data/QtTest.4.2.0.linux-gcc-ppc32.txt2706
-rw-r--r--tests/auto/bic/data/QtTest.4.2.0.macx-gcc-ia32.txt2691
-rw-r--r--tests/auto/bic/data/QtTest.4.2.0.macx-gcc-ppc32.txt2706
-rw-r--r--tests/auto/bic/data/QtTest.4.2.0.win32-gcc-ia32.txt2537
-rw-r--r--tests/auto/bic/data/QtTest.4.3.0.linux-gcc-ia32.txt2762
-rw-r--r--tests/auto/bic/data/QtTest.4.3.1.linux-gcc-ia32.txt2762
-rw-r--r--tests/auto/bic/data/QtTest.4.3.2.linux-gcc-ia32.txt2762
-rw-r--r--tests/auto/bic/data/QtXml.4.0.0.aix-gcc-power32.txt2468
-rw-r--r--tests/auto/bic/data/QtXml.4.0.0.linux-gcc-amd64.txt2534
-rw-r--r--tests/auto/bic/data/QtXml.4.0.0.linux-gcc-ia32.txt2534
-rw-r--r--tests/auto/bic/data/QtXml.4.0.0.linux-gcc-ppc32.txt2438
-rw-r--r--tests/auto/bic/data/QtXml.4.0.0.macx-gcc-ppc32.txt2549
-rw-r--r--tests/auto/bic/data/QtXml.4.1.0.linux-gcc-ia32.txt2727
-rw-r--r--tests/auto/bic/data/QtXml.4.1.0.linux-gcc-ppc32.txt2732
-rw-r--r--tests/auto/bic/data/QtXml.4.1.0.macx-gcc-ia32.txt2717
-rw-r--r--tests/auto/bic/data/QtXml.4.1.0.macx-gcc-ppc32.txt2727
-rw-r--r--tests/auto/bic/data/QtXml.4.1.0.win32-gcc-ia32.txt2563
-rw-r--r--tests/auto/bic/data/QtXml.4.2.0.linux-gcc-ia32.txt3075
-rw-r--r--tests/auto/bic/data/QtXml.4.2.0.linux-gcc-ppc32.txt3065
-rw-r--r--tests/auto/bic/data/QtXml.4.2.0.macx-gcc-ia32.txt3050
-rw-r--r--tests/auto/bic/data/QtXml.4.2.0.macx-gcc-ppc32.txt3065
-rw-r--r--tests/auto/bic/data/QtXml.4.2.0.win32-gcc-ia32.txt2896
-rw-r--r--tests/auto/bic/data/QtXml.4.3.0.linux-gcc-ia32.txt3192
-rw-r--r--tests/auto/bic/data/QtXml.4.3.1.linux-gcc-ia32.txt3192
-rw-r--r--tests/auto/bic/data/QtXml.4.3.2.linux-gcc-ia32.txt3192
-rw-r--r--tests/auto/bic/data/QtXmlPatterns.4.4.1.linux-gcc-ia32.txt6300
-rwxr-xr-xtests/auto/bic/gen.sh22
-rw-r--r--tests/auto/bic/qbic.cpp246
-rw-r--r--tests/auto/bic/qbic.h91
-rw-r--r--tests/auto/bic/tst_bic.cpp388
-rw-r--r--tests/auto/checkxmlfiles/.gitignore1
-rw-r--r--tests/auto/checkxmlfiles/checkxmlfiles.pro19
-rw-r--r--tests/auto/checkxmlfiles/tst_checkxmlfiles.cpp126
-rw-r--r--tests/auto/collections/.gitignore1
-rw-r--r--tests/auto/collections/collections.pro7
-rw-r--r--tests/auto/collections/tst_collections.cpp3483
-rw-r--r--tests/auto/compile/.gitignore1
-rw-r--r--tests/auto/compile/baseclass.cpp51
-rw-r--r--tests/auto/compile/baseclass.h60
-rw-r--r--tests/auto/compile/compile.pro7
-rw-r--r--tests/auto/compile/derivedclass.cpp48
-rw-r--r--tests/auto/compile/derivedclass.h52
-rw-r--r--tests/auto/compile/tst_compile.cpp656
-rw-r--r--tests/auto/compilerwarnings/.gitignore1
-rw-r--r--tests/auto/compilerwarnings/compilerwarnings.pro5
-rw-r--r--tests/auto/compilerwarnings/compilerwarnings.qrc5
-rw-r--r--tests/auto/compilerwarnings/test.cpp67
-rw-r--r--tests/auto/compilerwarnings/tst_compilerwarnings.cpp253
-rw-r--r--tests/auto/exceptionsafety/.gitignore1
-rw-r--r--tests/auto/exceptionsafety/exceptionsafety.pro3
-rw-r--r--tests/auto/exceptionsafety/tst_exceptionsafety.cpp91
-rw-r--r--tests/auto/headers/.gitignore1
-rw-r--r--tests/auto/headers/headers.pro5
-rw-r--r--tests/auto/headers/tst_headers.cpp219
-rw-r--r--tests/auto/languagechange/.gitignore1
-rw-r--r--tests/auto/languagechange/languagechange.pro3
-rw-r--r--tests/auto/languagechange/tst_languagechange.cpp288
-rw-r--r--tests/auto/macgui/.gitignore1
-rw-r--r--tests/auto/macgui/guitest.cpp350
-rw-r--r--tests/auto/macgui/guitest.h186
-rw-r--r--tests/auto/macgui/macgui.pro15
-rw-r--r--tests/auto/macgui/tst_gui.cpp282
-rw-r--r--tests/auto/macplist/app/app.pro11
-rw-r--r--tests/auto/macplist/app/main.cpp50
-rw-r--r--tests/auto/macplist/macplist.pro7
-rw-r--r--tests/auto/macplist/test/test.pro11
-rw-r--r--tests/auto/macplist/tst_macplist.cpp195
-rw-r--r--tests/auto/math3d/math3d.pro3
-rw-r--r--tests/auto/math3d/qfixedpt/qfixedpt.pro2
-rw-r--r--tests/auto/math3d/qfixedpt/tst_qfixedpt.cpp613
-rw-r--r--tests/auto/math3d/qmatrixnxn/qmatrixnxn.pro5
-rw-r--r--tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp3218
-rw-r--r--tests/auto/math3d/qmatrixnxn_fixed/qmatrixnxn_fixed.pro8
-rw-r--r--tests/auto/math3d/qquaternion/qquaternion.pro5
-rw-r--r--tests/auto/math3d/qquaternion/tst_qquaternion.cpp761
-rw-r--r--tests/auto/math3d/qquaternion_fixed/qquaternion_fixed.pro8
-rw-r--r--tests/auto/math3d/qvectornd/qvectornd.pro5
-rw-r--r--tests/auto/math3d/qvectornd/tst_qvectornd.cpp2033
-rw-r--r--tests/auto/math3d/qvectornd_fixed/qvectornd_fixed.pro8
-rw-r--r--tests/auto/math3d/shared/math3dincludes.cpp24
-rw-r--r--tests/auto/math3d/shared/math3dincludes.h57
-rw-r--r--tests/auto/mediaobject/.gitignore1
-rw-r--r--tests/auto/mediaobject/media/sax.mp3bin0 -> 417844 bytes-rw-r--r--tests/auto/mediaobject/media/sax.oggbin0 -> 358374 bytes-rw-r--r--tests/auto/mediaobject/media/sax.wavbin0 -> 756236 bytes-rwxr-xr-xtests/auto/mediaobject/mediaobject.pro16
-rw-r--r--tests/auto/mediaobject/mediaobject.qrc7
-rw-r--r--tests/auto/mediaobject/qtesthelper.h223
-rw-r--r--tests/auto/mediaobject/tst_mediaobject.cpp932
-rw-r--r--tests/auto/mediaobject_wince_ds9/dummy.cpp44
-rw-r--r--tests/auto/mediaobject_wince_ds9/mediaobject_wince_ds9.pro18
-rw-r--r--tests/auto/moc/.gitattributes1
-rw-r--r--tests/auto/moc/.gitignore1
-rw-r--r--tests/auto/moc/Header6
-rw-r--r--tests/auto/moc/Test.framework/Headers/testinterface.h55
-rw-r--r--tests/auto/moc/assign-namespace.h52
-rw-r--r--tests/auto/moc/backslash-newlines.h63
-rw-r--r--tests/auto/moc/c-comments.h55
-rw-r--r--tests/auto/moc/cstyle-enums.h50
-rw-r--r--tests/auto/moc/dir-in-include-path.h47
-rw-r--r--tests/auto/moc/escapes-in-string-literals.h49
-rw-r--r--tests/auto/moc/extraqualification.h57
-rw-r--r--tests/auto/moc/forgotten-qinterface.h53
-rw-r--r--tests/auto/moc/gadgetwithnoenums.h62
-rw-r--r--tests/auto/moc/interface-from-framework.h55
-rw-r--r--tests/auto/moc/macro-on-cmdline.h50
-rw-r--r--tests/auto/moc/moc.pro30
-rw-r--r--tests/auto/moc/namespaced-flags.h75
-rw-r--r--tests/auto/moc/no-keywords.h88
-rw-r--r--tests/auto/moc/oldstyle-casts.h56
-rw-r--r--tests/auto/moc/os9-newlines.h1
-rw-r--r--tests/auto/moc/parse-boost.h126
-rw-r--r--tests/auto/moc/pure-virtual-signals.h60
-rw-r--r--tests/auto/moc/qinvokable.h57
-rw-r--r--tests/auto/moc/qprivateslots.h60
-rw-r--r--tests/auto/moc/single_function_keyword.h75
-rw-r--r--tests/auto/moc/slots-with-void-template.h59
-rw-r--r--tests/auto/moc/task189996.h58
-rw-r--r--tests/auto/moc/task192552.h55
-rw-r--r--tests/auto/moc/task234909.h73
-rw-r--r--tests/auto/moc/task240368.h72
-rw-r--r--tests/auto/moc/task71021/dummy0
-rw-r--r--tests/auto/moc/task87883.h57
-rw-r--r--tests/auto/moc/template-gtgt.h60
-rw-r--r--tests/auto/moc/testproject/Plugin/Plugin.h50
-rw-r--r--tests/auto/moc/testproject/include/Plugin1
-rw-r--r--tests/auto/moc/trigraphs.h63
-rw-r--r--tests/auto/moc/tst_moc.cpp1205
-rw-r--r--tests/auto/moc/using-namespaces.h56
-rw-r--r--tests/auto/moc/warn-on-multiple-qobject-subclasses.h55
-rw-r--r--tests/auto/moc/warn-on-property-without-read.h48
-rw-r--r--tests/auto/moc/win-newlines.h49
-rw-r--r--tests/auto/modeltest/modeltest.cpp566
-rw-r--r--tests/auto/modeltest/modeltest.h94
-rw-r--r--tests/auto/modeltest/modeltest.pro6
-rw-r--r--tests/auto/modeltest/tst_modeltest.cpp150
-rw-r--r--tests/auto/network-settings.h66
-rw-r--r--tests/auto/patternistexamplefiletree/.gitignore1
-rw-r--r--tests/auto/patternistexamplefiletree/patternistexamplefiletree.pro4
-rw-r--r--tests/auto/patternistexamplefiletree/tst_patternistexamplefiletree.cpp74
-rw-r--r--tests/auto/patternistexamples/.gitignore1
-rw-r--r--tests/auto/patternistexamples/patternistexamples.pro22
-rw-r--r--tests/auto/patternistexamples/tst_patternistexamples.cpp373
-rw-r--r--tests/auto/patternistheaders/.gitignore1
-rw-r--r--tests/auto/patternistheaders/patternistheaders.pro4
-rw-r--r--tests/auto/patternistheaders/tst_patternistheaders.cpp135
-rw-r--r--tests/auto/q3accel/.gitignore1
-rw-r--r--tests/auto/q3accel/q3accel.pro8
-rw-r--r--tests/auto/q3accel/tst_q3accel.cpp1053
-rw-r--r--tests/auto/q3action/.gitignore1
-rw-r--r--tests/auto/q3action/q3action.pro3
-rw-r--r--tests/auto/q3action/tst_q3action.cpp138
-rw-r--r--tests/auto/q3actiongroup/.gitignore1
-rw-r--r--tests/auto/q3actiongroup/q3actiongroup.pro5
-rw-r--r--tests/auto/q3actiongroup/tst_q3actiongroup.cpp238
-rw-r--r--tests/auto/q3buttongroup/.gitignore3
-rw-r--r--tests/auto/q3buttongroup/clickLock/clickLock.pro14
-rw-r--r--tests/auto/q3buttongroup/clickLock/main.cpp70
-rw-r--r--tests/auto/q3buttongroup/q3buttongroup.pro3
-rw-r--r--tests/auto/q3buttongroup/tst_q3buttongroup.cpp314
-rw-r--r--tests/auto/q3buttongroup/tst_q3buttongroup.pro7
-rw-r--r--tests/auto/q3canvas/.gitignore1
-rw-r--r--tests/auto/q3canvas/backgroundrect.pngbin0 -> 409 bytes-rw-r--r--tests/auto/q3canvas/q3canvas.pro7
-rw-r--r--tests/auto/q3canvas/tst_q3canvas.cpp239
-rw-r--r--tests/auto/q3checklistitem/.gitignore1
-rw-r--r--tests/auto/q3checklistitem/q3checklistitem.pro7
-rw-r--r--tests/auto/q3checklistitem/tst_q3checklistitem.cpp371
-rw-r--r--tests/auto/q3combobox/.gitignore1
-rw-r--r--tests/auto/q3combobox/q3combobox.pro3
-rw-r--r--tests/auto/q3combobox/tst_q3combobox.cpp1041
-rw-r--r--tests/auto/q3cstring/.gitignore2
-rw-r--r--tests/auto/q3cstring/q3cstring.pro7
-rw-r--r--tests/auto/q3cstring/tst_q3cstring.cpp885
-rw-r--r--tests/auto/q3databrowser/.gitignore1
-rw-r--r--tests/auto/q3databrowser/q3databrowser.pro6
-rw-r--r--tests/auto/q3databrowser/tst_q3databrowser.cpp85
-rw-r--r--tests/auto/q3dateedit/.gitignore1
-rw-r--r--tests/auto/q3dateedit/q3dateedit.pro6
-rw-r--r--tests/auto/q3dateedit/tst_q3dateedit.cpp186
-rw-r--r--tests/auto/q3datetimeedit/.gitignore1
-rw-r--r--tests/auto/q3datetimeedit/q3datetimeedit.pro10
-rw-r--r--tests/auto/q3datetimeedit/tst_q3datetimeedit.cpp89
-rw-r--r--tests/auto/q3deepcopy/.gitignore1
-rw-r--r--tests/auto/q3deepcopy/q3deepcopy.pro7
-rw-r--r--tests/auto/q3deepcopy/tst_q3deepcopy.cpp243
-rw-r--r--tests/auto/q3dict/.gitignore1
-rw-r--r--tests/auto/q3dict/q3dict.pro7
-rw-r--r--tests/auto/q3dict/tst_q3dict.cpp169
-rw-r--r--tests/auto/q3dns/.gitignore1
-rw-r--r--tests/auto/q3dns/q3dns.pro7
-rw-r--r--tests/auto/q3dns/tst_q3dns.cpp227
-rw-r--r--tests/auto/q3dockwindow/.gitignore1
-rw-r--r--tests/auto/q3dockwindow/q3dockwindow.pro8
-rw-r--r--tests/auto/q3dockwindow/tst_q3dockwindow.cpp170
-rw-r--r--tests/auto/q3filedialog/.gitignore1
-rw-r--r--tests/auto/q3filedialog/q3filedialog.pro10
-rw-r--r--tests/auto/q3filedialog/tst_q3filedialog.cpp130
-rw-r--r--tests/auto/q3frame/.gitignore1
-rw-r--r--tests/auto/q3frame/q3frame.pro4
-rw-r--r--tests/auto/q3frame/tst_q3frame.cpp146
-rw-r--r--tests/auto/q3groupbox/.gitignore1
-rw-r--r--tests/auto/q3groupbox/q3groupbox.pro7
-rw-r--r--tests/auto/q3groupbox/tst_q3groupbox.cpp118
-rw-r--r--tests/auto/q3hbox/.gitignore1
-rw-r--r--tests/auto/q3hbox/q3hbox.pro7
-rw-r--r--tests/auto/q3hbox/tst_q3hbox.cpp91
-rw-r--r--tests/auto/q3header/.gitignore1
-rw-r--r--tests/auto/q3header/q3header.pro7
-rw-r--r--tests/auto/q3header/tst_q3header.cpp130
-rw-r--r--tests/auto/q3iconview/.gitignore1
-rw-r--r--tests/auto/q3iconview/q3iconview.pro7
-rw-r--r--tests/auto/q3iconview/tst_q3iconview.cpp83
-rw-r--r--tests/auto/q3listbox/q3listbox.pro7
-rw-r--r--tests/auto/q3listbox/tst_qlistbox.cpp676
-rw-r--r--tests/auto/q3listview/.gitignore1
-rw-r--r--tests/auto/q3listview/q3listview.pro5
-rw-r--r--tests/auto/q3listview/tst_q3listview.cpp1276
-rw-r--r--tests/auto/q3listviewitemiterator/.gitignore1
-rw-r--r--tests/auto/q3listviewitemiterator/q3listviewitemiterator.pro7
-rw-r--r--tests/auto/q3listviewitemiterator/tst_q3listviewitemiterator.cpp567
-rw-r--r--tests/auto/q3mainwindow/.gitignore1
-rw-r--r--tests/auto/q3mainwindow/q3mainwindow.pro8
-rw-r--r--tests/auto/q3mainwindow/tst_q3mainwindow.cpp298
-rw-r--r--tests/auto/q3popupmenu/.gitignore1
-rw-r--r--tests/auto/q3popupmenu/q3popupmenu.pro8
-rw-r--r--tests/auto/q3popupmenu/tst_q3popupmenu.cpp362
-rw-r--r--tests/auto/q3process/.gitignore5
-rw-r--r--tests/auto/q3process/cat/cat.pro12
-rw-r--r--tests/auto/q3process/cat/main.cpp89
-rw-r--r--tests/auto/q3process/echo/echo.pro9
-rw-r--r--tests/auto/q3process/echo/main.cpp57
-rw-r--r--tests/auto/q3process/q3process.pro12
-rw-r--r--tests/auto/q3process/tst/tst.pro16
-rw-r--r--tests/auto/q3process/tst_q3process.cpp448
-rw-r--r--tests/auto/q3progressbar/.gitignore1
-rw-r--r--tests/auto/q3progressbar/q3progressbar.pro10
-rw-r--r--tests/auto/q3progressbar/tst_q3progressbar.cpp125
-rw-r--r--tests/auto/q3progressdialog/.gitignore1
-rw-r--r--tests/auto/q3progressdialog/q3progressdialog.pro10
-rw-r--r--tests/auto/q3progressdialog/tst_q3progressdialog.cpp113
-rw-r--r--tests/auto/q3ptrlist/.gitignore1
-rw-r--r--tests/auto/q3ptrlist/q3ptrlist.pro6
-rw-r--r--tests/auto/q3ptrlist/tst_q3ptrlist.cpp219
-rw-r--r--tests/auto/q3richtext/.gitignore1
-rw-r--r--tests/auto/q3richtext/q3richtext.pro8
-rw-r--r--tests/auto/q3richtext/tst_q3richtext.cpp467
-rw-r--r--tests/auto/q3scrollview/q3scrollview.pro7
-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Motif-32x96x96_0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Motif-32x96x96_1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Motif-32x96x96_2.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-16x96x96_0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-16x96x96_1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-16x96x96_2.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-32x96x96_0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-32x96x96_1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/center/pix_Windows-32x96x96_2.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Motif-32x96x96_win32_data0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Motif-32x96x96_win32_data1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Windows-16x96x96_win32_data0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Windows-16x96x96_win32_data1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Windows-32x96x96_win32_data0.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/testdata/drawContents/res_Windows-32x96x96_win32_data1.pngbin0 -> 120451 bytes-rw-r--r--tests/auto/q3scrollview/tst_qscrollview.cpp594
-rw-r--r--tests/auto/q3semaphore/.gitignore1
-rw-r--r--tests/auto/q3semaphore/q3semaphore.pro5
-rw-r--r--tests/auto/q3semaphore/tst_q3semaphore.cpp162
-rw-r--r--tests/auto/q3serversocket/.gitignore1
-rw-r--r--tests/auto/q3serversocket/q3serversocket.pro7
-rw-r--r--tests/auto/q3serversocket/tst_q3serversocket.cpp153
-rw-r--r--tests/auto/q3socket/.gitignore1
-rw-r--r--tests/auto/q3socket/q3socket.pro6
-rw-r--r--tests/auto/q3socket/tst_qsocket.cpp286
-rw-r--r--tests/auto/q3socketdevice/.gitignore1
-rw-r--r--tests/auto/q3socketdevice/q3socketdevice.pro6
-rw-r--r--tests/auto/q3socketdevice/tst_q3socketdevice.cpp142
-rw-r--r--tests/auto/q3sqlcursor/.gitignore1
-rw-r--r--tests/auto/q3sqlcursor/q3sqlcursor.pro9
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp779
-rw-r--r--tests/auto/q3sqlselectcursor/q3sqlselectcursor.pro9
-rw-r--r--tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp207
-rw-r--r--tests/auto/q3stylesheet/.gitignore1
-rw-r--r--tests/auto/q3stylesheet/q3stylesheet.pro10
-rw-r--r--tests/auto/q3stylesheet/tst_q3stylesheet.cpp178
-rw-r--r--tests/auto/q3tabdialog/.gitignore1
-rw-r--r--tests/auto/q3tabdialog/q3tabdialog.pro10
-rw-r--r--tests/auto/q3tabdialog/tst_q3tabdialog.cpp127
-rw-r--r--tests/auto/q3table/.gitignore1
-rw-r--r--tests/auto/q3table/q3table.pro6
-rw-r--r--tests/auto/q3table/tst_q3table.cpp1559
-rw-r--r--tests/auto/q3textbrowser/.gitignore1
-rw-r--r--tests/auto/q3textbrowser/anchor.html8
-rw-r--r--tests/auto/q3textbrowser/q3textbrowser.pro8
-rw-r--r--tests/auto/q3textbrowser/tst_q3textbrowser.cpp107
-rw-r--r--tests/auto/q3textedit/.gitignore1
-rw-r--r--tests/auto/q3textedit/q3textedit.pro8
-rw-r--r--tests/auto/q3textedit/tst_q3textedit.cpp1118
-rw-r--r--tests/auto/q3textstream/.gitignore2
-rw-r--r--tests/auto/q3textstream/q3textstream.pro6
-rw-r--r--tests/auto/q3textstream/tst_q3textstream.cpp1347
-rw-r--r--tests/auto/q3timeedit/.gitignore1
-rw-r--r--tests/auto/q3timeedit/q3timeedit.pro6
-rw-r--r--tests/auto/q3timeedit/tst_q3timeedit.cpp939
-rw-r--r--tests/auto/q3toolbar/.gitignore1
-rw-r--r--tests/auto/q3toolbar/q3toolbar.pro6
-rw-r--r--tests/auto/q3toolbar/tst_q3toolbar.cpp168
-rw-r--r--tests/auto/q3uridrag/q3uridrag.pro7
-rw-r--r--tests/auto/q3uridrag/tst_q3uridrag.cpp248
-rw-r--r--tests/auto/q3urloperator/.gitattributes3
-rw-r--r--tests/auto/q3urloperator/.gitignore2
-rw-r--r--tests/auto/q3urloperator/copy.res/rfc3252.txt899
-rwxr-xr-xtests/auto/q3urloperator/listData/executable.exe0
-rw-r--r--tests/auto/q3urloperator/listData/readOnly0
-rwxr-xr-xtests/auto/q3urloperator/listData/readWriteExec.exe0
-rw-r--r--tests/auto/q3urloperator/q3urloperator.pro9
-rw-r--r--tests/auto/q3urloperator/stop/bigfile17980
-rw-r--r--tests/auto/q3urloperator/tst_q3urloperator.cpp783
-rw-r--r--tests/auto/q3valuelist/.gitignore1
-rw-r--r--tests/auto/q3valuelist/q3valuelist.pro7
-rw-r--r--tests/auto/q3valuelist/tst_q3valuelist.cpp903
-rw-r--r--tests/auto/q3valuevector/.gitignore1
-rw-r--r--tests/auto/q3valuevector/q3valuevector.pro7
-rw-r--r--tests/auto/q3valuevector/tst_q3valuevector.cpp662
-rw-r--r--tests/auto/q3widgetstack/q3widgetstack.pro7
-rw-r--r--tests/auto/q3widgetstack/tst_q3widgetstack.cpp257
-rw-r--r--tests/auto/q_func_info/.gitignore1
-rw-r--r--tests/auto/q_func_info/q_func_info.pro3
-rw-r--r--tests/auto/q_func_info/tst_q_func_info.cpp145
-rw-r--r--tests/auto/qabstractbutton/.gitignore1
-rw-r--r--tests/auto/qabstractbutton/qabstractbutton.pro4
-rw-r--r--tests/auto/qabstractbutton/tst_qabstractbutton.cpp718
-rw-r--r--tests/auto/qabstractitemmodel/.gitignore1
-rw-r--r--tests/auto/qabstractitemmodel/qabstractitemmodel.pro6
-rw-r--r--tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp824
-rw-r--r--tests/auto/qabstractitemview/.gitignore1
-rw-r--r--tests/auto/qabstractitemview/qabstractitemview.pro4
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp1187
-rw-r--r--tests/auto/qabstractmessagehandler/.gitignore1
-rw-r--r--tests/auto/qabstractmessagehandler/qabstractmessagehandler.pro4
-rw-r--r--tests/auto/qabstractmessagehandler/tst_qabstractmessagehandler.cpp192
-rw-r--r--tests/auto/qabstractnetworkcache/.gitignore1
-rw-r--r--tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro10
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_cachecontrol-expire.cgi7
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_cachecontrol.cgi13
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_etag200.cgi5
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_etag304.cgi11
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_expires200.cgi5
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_expires304.cgi11
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_expires500.cgi11
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_lastModified200.cgi5
-rw-r--r--tests/auto/qabstractnetworkcache/tests/httpcachetest_lastModified304.cgi11
-rw-r--r--tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp275
-rw-r--r--tests/auto/qabstractprintdialog/.gitignore1
-rw-r--r--tests/auto/qabstractprintdialog/qabstractprintdialog.pro9
-rw-r--r--tests/auto/qabstractprintdialog/tst_qabstractprintdialog.cpp143
-rw-r--r--tests/auto/qabstractproxymodel/.gitignore1
-rw-r--r--tests/auto/qabstractproxymodel/qabstractproxymodel.pro2
-rw-r--r--tests/auto/qabstractproxymodel/tst_qabstractproxymodel.cpp367
-rw-r--r--tests/auto/qabstractscrollarea/.gitignore1
-rw-r--r--tests/auto/qabstractscrollarea/qabstractscrollarea.pro9
-rw-r--r--tests/auto/qabstractscrollarea/tst_qabstractscrollarea.cpp354
-rw-r--r--tests/auto/qabstractslider/.gitignore1
-rw-r--r--tests/auto/qabstractslider/qabstractslider.pro4
-rw-r--r--tests/auto/qabstractslider/tst_qabstractslider.cpp1235
-rw-r--r--tests/auto/qabstractsocket/.gitignore1
-rw-r--r--tests/auto/qabstractsocket/qabstractsocket.pro10
-rw-r--r--tests/auto/qabstractsocket/tst_qabstractsocket.cpp109
-rw-r--r--tests/auto/qabstractspinbox/.gitignore1
-rw-r--r--tests/auto/qabstractspinbox/qabstractspinbox.pro9
-rw-r--r--tests/auto/qabstractspinbox/tst_qabstractspinbox.cpp163
-rw-r--r--tests/auto/qabstracttextdocumentlayout/.gitignore1
-rw-r--r--tests/auto/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro9
-rw-r--r--tests/auto/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp159
-rw-r--r--tests/auto/qabstracturiresolver/.gitignore1
-rw-r--r--tests/auto/qabstracturiresolver/TestURIResolver.h70
-rw-r--r--tests/auto/qabstracturiresolver/qabstracturiresolver.pro5
-rw-r--r--tests/auto/qabstracturiresolver/tst_qabstracturiresolver.cpp132
-rw-r--r--tests/auto/qabstractxmlforwarditerator/.gitignore1
-rw-r--r--tests/auto/qabstractxmlforwarditerator/qabstractxmlforwarditerator.pro4
-rw-r--r--tests/auto/qabstractxmlforwarditerator/tst_qabstractxmlforwarditerator.cpp87
-rw-r--r--tests/auto/qabstractxmlnodemodel/.gitignore1
-rw-r--r--tests/auto/qabstractxmlnodemodel/LoadingModel.cpp360
-rw-r--r--tests/auto/qabstractxmlnodemodel/LoadingModel.h99
-rw-r--r--tests/auto/qabstractxmlnodemodel/TestNodeModel.h139
-rw-r--r--tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro14
-rw-r--r--tests/auto/qabstractxmlnodemodel/tree.xml15
-rw-r--r--tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp399
-rw-r--r--tests/auto/qabstractxmlreceiver/.gitignore1
-rw-r--r--tests/auto/qabstractxmlreceiver/TestAbstractXmlReceiver.h138
-rw-r--r--tests/auto/qabstractxmlreceiver/qabstractxmlreceiver.pro4
-rw-r--r--tests/auto/qabstractxmlreceiver/tst_qabstractxmlreceiver.cpp95
-rw-r--r--tests/auto/qaccessibility/.gitignore1
-rw-r--r--tests/auto/qaccessibility/qaccessibility.pro11
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp4058
-rw-r--r--tests/auto/qaccessibility_mac/.gitignore1
-rw-r--r--tests/auto/qaccessibility_mac/buttons.ui83
-rw-r--r--tests/auto/qaccessibility_mac/combobox.ui50
-rw-r--r--tests/auto/qaccessibility_mac/form.ui22
-rw-r--r--tests/auto/qaccessibility_mac/groups.ui100
-rw-r--r--tests/auto/qaccessibility_mac/label.ui35
-rw-r--r--tests/auto/qaccessibility_mac/lineedit.ui35
-rw-r--r--tests/auto/qaccessibility_mac/listview.ui89
-rw-r--r--tests/auto/qaccessibility_mac/qaccessibility_mac.pro24
-rw-r--r--tests/auto/qaccessibility_mac/qaccessibility_mac.qrc15
-rw-r--r--tests/auto/qaccessibility_mac/radiobutton.ui38
-rw-r--r--tests/auto/qaccessibility_mac/scrollbar.ui38
-rw-r--r--tests/auto/qaccessibility_mac/splitters.ui52
-rw-r--r--tests/auto/qaccessibility_mac/tableview.ui114
-rw-r--r--tests/auto/qaccessibility_mac/tabs.ui68
-rw-r--r--tests/auto/qaccessibility_mac/textBrowser.ui40
-rw-r--r--tests/auto/qaccessibility_mac/tst_qaccessibility_mac.cpp1960
-rw-r--r--tests/auto/qaction/.gitignore1
-rw-r--r--tests/auto/qaction/qaction.pro4
-rw-r--r--tests/auto/qaction/tst_qaction.cpp369
-rw-r--r--tests/auto/qactiongroup/.gitignore1
-rw-r--r--tests/auto/qactiongroup/qactiongroup.pro4
-rw-r--r--tests/auto/qactiongroup/tst_qactiongroup.cpp274
-rw-r--r--tests/auto/qalgorithms/.gitignore1
-rw-r--r--tests/auto/qalgorithms/qalgorithms.pro5
-rw-r--r--tests/auto/qalgorithms/tst_qalgorithms.cpp1193
-rw-r--r--tests/auto/qapplication/.gitignore3
-rw-r--r--tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro15
-rw-r--r--tests/auto/qapplication/desktopsettingsaware/main.cpp54
-rw-r--r--tests/auto/qapplication/qapplication.pro6
-rw-r--r--tests/auto/qapplication/test/test.pro22
-rw-r--r--tests/auto/qapplication/tmp/README3
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp1784
-rw-r--r--tests/auto/qapplication/wincmdline/main.cpp53
-rw-r--r--tests/auto/qapplication/wincmdline/wincmdline.pro7
-rw-r--r--tests/auto/qapplicationargumentparser/.gitignore3
-rw-r--r--tests/auto/qapplicationargumentparser/qapplicationargumentparser.pro6
-rw-r--r--tests/auto/qapplicationargumentparser/tst_qapplicationargumentparser.cpp160
-rw-r--r--tests/auto/qatomicint/.gitignore1
-rw-r--r--tests/auto/qatomicint/qatomicint.pro6
-rw-r--r--tests/auto/qatomicint/tst_qatomicint.cpp748
-rw-r--r--tests/auto/qatomicpointer/.gitignore1
-rw-r--r--tests/auto/qatomicpointer/qatomicpointer.pro5
-rw-r--r--tests/auto/qatomicpointer/tst_qatomicpointer.cpp627
-rw-r--r--tests/auto/qautoptr/.gitignore1
-rw-r--r--tests/auto/qautoptr/qautoptr.pro4
-rw-r--r--tests/auto/qautoptr/tst_qautoptr.cpp339
-rw-r--r--tests/auto/qbitarray/.gitignore1
-rw-r--r--tests/auto/qbitarray/qbitarray.pro7
-rw-r--r--tests/auto/qbitarray/tst_qbitarray.cpp644
-rw-r--r--tests/auto/qboxlayout/.gitignore1
-rw-r--r--tests/auto/qboxlayout/qboxlayout.pro4
-rw-r--r--tests/auto/qboxlayout/tst_qboxlayout.cpp174
-rw-r--r--tests/auto/qbrush/.gitignore1
-rw-r--r--tests/auto/qbrush/qbrush.pro5
-rw-r--r--tests/auto/qbrush/tst_qbrush.cpp383
-rw-r--r--tests/auto/qbuffer/.gitignore1
-rw-r--r--tests/auto/qbuffer/qbuffer.pro7
-rw-r--r--tests/auto/qbuffer/tst_qbuffer.cpp533
-rw-r--r--tests/auto/qbuttongroup/.gitignore1
-rw-r--r--tests/auto/qbuttongroup/qbuttongroup.pro5
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp494
-rw-r--r--tests/auto/qbytearray/.gitignore1
-rw-r--r--tests/auto/qbytearray/qbytearray.pro14
-rw-r--r--tests/auto/qbytearray/rfc3252.txt899
-rw-r--r--tests/auto/qbytearray/tst_qbytearray.cpp1424
-rw-r--r--tests/auto/qcache/.gitignore1
-rw-r--r--tests/auto/qcache/qcache.pro7
-rw-r--r--tests/auto/qcache/tst_qcache.cpp441
-rw-r--r--tests/auto/qcalendarwidget/.gitignore1
-rw-r--r--tests/auto/qcalendarwidget/qcalendarwidget.pro4
-rw-r--r--tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp244
-rw-r--r--tests/auto/qchar/.gitignore1
-rw-r--r--tests/auto/qchar/NormalizationTest.txt17650
-rw-r--r--tests/auto/qchar/qchar.pro10
-rw-r--r--tests/auto/qchar/tst_qchar.cpp643
-rw-r--r--tests/auto/qcheckbox/.gitignore1
-rw-r--r--tests/auto/qcheckbox/qcheckbox.pro5
-rw-r--r--tests/auto/qcheckbox/tst_qcheckbox.cpp433
-rw-r--r--tests/auto/qclipboard/.gitignore5
-rw-r--r--tests/auto/qclipboard/copier/copier.pro9
-rw-r--r--tests/auto/qclipboard/copier/main.cpp54
-rw-r--r--tests/auto/qclipboard/paster/main.cpp54
-rw-r--r--tests/auto/qclipboard/paster/paster.pro11
-rw-r--r--tests/auto/qclipboard/qclipboard.pro4
-rw-r--r--tests/auto/qclipboard/test/test.pro19
-rw-r--r--tests/auto/qclipboard/tst_qclipboard.cpp336
-rw-r--r--tests/auto/qcolor/.gitignore1
-rw-r--r--tests/auto/qcolor/qcolor.pro5
-rw-r--r--tests/auto/qcolor/tst_qcolor.cpp1305
-rw-r--r--tests/auto/qcolordialog/.gitignore1
-rw-r--r--tests/auto/qcolordialog/qcolordialog.pro5
-rw-r--r--tests/auto/qcolordialog/tst_qcolordialog.cpp165
-rw-r--r--tests/auto/qcolumnview/.gitignore1
-rw-r--r--tests/auto/qcolumnview/qcolumnview.pro8
-rw-r--r--tests/auto/qcolumnview/tst_qcolumnview.cpp1008
-rw-r--r--tests/auto/qcombobox/.gitignore1
-rw-r--r--tests/auto/qcombobox/qcombobox.pro6
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp2182
-rw-r--r--tests/auto/qcommandlinkbutton/.gitignore1
-rw-r--r--tests/auto/qcommandlinkbutton/qcommandlinkbutton.pro5
-rw-r--r--tests/auto/qcommandlinkbutton/tst_qcommandlinkbutton.cpp564
-rw-r--r--tests/auto/qcompleter/.gitignore1
-rw-r--r--tests/auto/qcompleter/qcompleter.pro16
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp1097
-rw-r--r--tests/auto/qcomplextext/.gitignore1
-rw-r--r--tests/auto/qcomplextext/bidireorderstring.h150
-rw-r--r--tests/auto/qcomplextext/qcomplextext.pro5
-rw-r--r--tests/auto/qcomplextext/tst_qcomplextext.cpp167
-rw-r--r--tests/auto/qcopchannel/.gitignore2
-rw-r--r--tests/auto/qcopchannel/qcopchannel.pro6
-rw-r--r--tests/auto/qcopchannel/test/test.pro14
-rw-r--r--tests/auto/qcopchannel/testSend/main.cpp64
-rw-r--r--tests/auto/qcopchannel/testSend/testSend.pro5
-rw-r--r--tests/auto/qcopchannel/tst_qcopchannel.cpp173
-rw-r--r--tests/auto/qcoreapplication/.gitignore1
-rw-r--r--tests/auto/qcoreapplication/qcoreapplication.pro6
-rw-r--r--tests/auto/qcoreapplication/tst_qcoreapplication.cpp475
-rw-r--r--tests/auto/qcryptographichash/.gitignore1
-rw-r--r--tests/auto/qcryptographichash/qcryptographichash.pro6
-rw-r--r--tests/auto/qcryptographichash/tst_qcryptographichash.cpp154
-rw-r--r--tests/auto/qcssparser/.gitignore1
-rw-r--r--tests/auto/qcssparser/qcssparser.pro11
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments/output4
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments2/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments2/output12
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments3/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments3/output4
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments4/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/comments4/output3
-rw-r--r--tests/auto/qcssparser/testdata/scanner/quotedstring/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/quotedstring/output5
-rw-r--r--tests/auto/qcssparser/testdata/scanner/simple/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/simple/output9
-rw-r--r--tests/auto/qcssparser/testdata/scanner/unicode/input1
-rw-r--r--tests/auto/qcssparser/testdata/scanner/unicode/output3
-rw-r--r--tests/auto/qcssparser/tst_cssparser.cpp1615
-rw-r--r--tests/auto/qdatastream/.gitignore2
-rw-r--r--tests/auto/qdatastream/datastream.q42bin0 -> 668 bytes-rw-r--r--tests/auto/qdatastream/gearflowers.svg8342
-rw-r--r--tests/auto/qdatastream/qdatastream.pro20
-rw-r--r--tests/auto/qdatastream/tests2.svg12
-rw-r--r--tests/auto/qdatastream/tst_qdatastream.cpp3345
-rw-r--r--tests/auto/qdatawidgetmapper/.gitignore1
-rw-r--r--tests/auto/qdatawidgetmapper/qdatawidgetmapper.pro4
-rw-r--r--tests/auto/qdatawidgetmapper/tst_qdatawidgetmapper.cpp410
-rw-r--r--tests/auto/qdate/.gitignore1
-rw-r--r--tests/auto/qdate/qdate.pro7
-rw-r--r--tests/auto/qdate/tst_qdate.cpp909
-rw-r--r--tests/auto/qdatetime/.gitignore1
-rw-r--r--tests/auto/qdatetime/qdatetime.pro14
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp1511
-rw-r--r--tests/auto/qdatetimeedit/.gitignore1
-rw-r--r--tests/auto/qdatetimeedit/qdatetimeedit.pro7
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp3429
-rw-r--r--tests/auto/qdbusabstractadaptor/.gitignore1
-rw-r--r--tests/auto/qdbusabstractadaptor/qdbusabstractadaptor.pro10
-rw-r--r--tests/auto/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp1440
-rw-r--r--tests/auto/qdbusconnection/.gitignore1
-rw-r--r--tests/auto/qdbusconnection/qdbusconnection.pro11
-rw-r--r--tests/auto/qdbusconnection/tst_qdbusconnection.cpp542
-rw-r--r--tests/auto/qdbuscontext/.gitignore1
-rw-r--r--tests/auto/qdbuscontext/qdbuscontext.pro11
-rw-r--r--tests/auto/qdbuscontext/tst_qdbuscontext.cpp93
-rw-r--r--tests/auto/qdbusinterface/.gitignore1
-rw-r--r--tests/auto/qdbusinterface/qdbusinterface.pro10
-rw-r--r--tests/auto/qdbusinterface/tst_qdbusinterface.cpp328
-rw-r--r--tests/auto/qdbuslocalcalls/.gitignore1
-rw-r--r--tests/auto/qdbuslocalcalls/qdbuslocalcalls.pro11
-rw-r--r--tests/auto/qdbuslocalcalls/tst_qdbuslocalcalls.cpp277
-rw-r--r--tests/auto/qdbusmarshall/.gitignore2
-rw-r--r--tests/auto/qdbusmarshall/common.h651
-rw-r--r--tests/auto/qdbusmarshall/dummy.cpp44
-rw-r--r--tests/auto/qdbusmarshall/qdbusmarshall.pro10
-rw-r--r--tests/auto/qdbusmarshall/qpong/qpong.cpp81
-rw-r--r--tests/auto/qdbusmarshall/qpong/qpong.pro6
-rw-r--r--tests/auto/qdbusmarshall/test/test.pro8
-rw-r--r--tests/auto/qdbusmarshall/tst_qdbusmarshall.cpp786
-rw-r--r--tests/auto/qdbusmetaobject/.gitignore1
-rw-r--r--tests/auto/qdbusmetaobject/qdbusmetaobject.pro10
-rw-r--r--tests/auto/qdbusmetaobject/tst_qdbusmetaobject.cpp688
-rw-r--r--tests/auto/qdbusmetatype/.gitignore1
-rw-r--r--tests/auto/qdbusmetatype/qdbusmetatype.pro10
-rw-r--r--tests/auto/qdbusmetatype/tst_qdbusmetatype.cpp383
-rw-r--r--tests/auto/qdbuspendingcall/.gitignore1
-rw-r--r--tests/auto/qdbuspendingcall/qdbuspendingcall.pro4
-rw-r--r--tests/auto/qdbuspendingcall/tst_qdbuspendingcall.cpp430
-rw-r--r--tests/auto/qdbuspendingreply/.gitignore1
-rw-r--r--tests/auto/qdbuspendingreply/qdbuspendingreply.pro4
-rw-r--r--tests/auto/qdbuspendingreply/tst_qdbuspendingreply.cpp572
-rw-r--r--tests/auto/qdbusperformance/.gitignore2
-rw-r--r--tests/auto/qdbusperformance/qdbusperformance.pro8
-rw-r--r--tests/auto/qdbusperformance/server/server.cpp64
-rw-r--r--tests/auto/qdbusperformance/server/server.pro5
-rw-r--r--tests/auto/qdbusperformance/serverobject.h115
-rw-r--r--tests/auto/qdbusperformance/test/test.pro7
-rw-r--r--tests/auto/qdbusperformance/tst_qdbusperformance.cpp234
-rw-r--r--tests/auto/qdbusreply/.gitignore1
-rw-r--r--tests/auto/qdbusreply/qdbusreply.pro10
-rw-r--r--tests/auto/qdbusreply/tst_qdbusreply.cpp361
-rw-r--r--tests/auto/qdbusserver/.gitignore1
-rw-r--r--tests/auto/qdbusserver/qdbusserver.pro11
-rw-r--r--tests/auto/qdbusserver/server.cpp49
-rw-r--r--tests/auto/qdbusserver/tst_qdbusserver.cpp78
-rw-r--r--tests/auto/qdbusthreading/.gitignore1
-rw-r--r--tests/auto/qdbusthreading/qdbusthreading.pro11
-rw-r--r--tests/auto/qdbusthreading/tst_qdbusthreading.cpp608
-rw-r--r--tests/auto/qdbusxmlparser/.gitignore1
-rw-r--r--tests/auto/qdbusxmlparser/qdbusxmlparser.pro10
-rw-r--r--tests/auto/qdbusxmlparser/tst_qdbusxmlparser.cpp599
-rw-r--r--tests/auto/qdebug/.gitignore1
-rw-r--r--tests/auto/qdebug/qdebug.pro7
-rw-r--r--tests/auto/qdebug/tst_qdebug.cpp158
-rw-r--r--tests/auto/qdesktopservices/.gitignore1
-rw-r--r--tests/auto/qdesktopservices/qdesktopservices.pro8
-rw-r--r--tests/auto/qdesktopservices/tst_qdesktopservices.cpp176
-rw-r--r--tests/auto/qdesktopwidget/.gitignore1
-rw-r--r--tests/auto/qdesktopwidget/qdesktopwidget.pro5
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp155
-rw-r--r--tests/auto/qdial/.gitignore1
-rw-r--r--tests/auto/qdial/qdial.pro4
-rw-r--r--tests/auto/qdial/tst_qdial.cpp147
-rw-r--r--tests/auto/qdialog/.gitignore1
-rw-r--r--tests/auto/qdialog/qdialog.pro5
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp600
-rw-r--r--tests/auto/qdialogbuttonbox/.gitignore1
-rw-r--r--tests/auto/qdialogbuttonbox/qdialogbuttonbox.pro6
-rw-r--r--tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp761
-rw-r--r--tests/auto/qdir/.gitignore1
-rw-r--r--tests/auto/qdir/entrylist/directory/dummy0
-rw-r--r--tests/auto/qdir/entrylist/file0
-rw-r--r--tests/auto/qdir/qdir.pro16
-rw-r--r--tests/auto/qdir/qdir.qrc5
-rw-r--r--tests/auto/qdir/resources/entryList/file1.data0
-rw-r--r--tests/auto/qdir/resources/entryList/file2.data0
-rw-r--r--tests/auto/qdir/resources/entryList/file3.data0
-rw-r--r--tests/auto/qdir/resources/entryList/file4.nothing0
-rw-r--r--tests/auto/qdir/searchdir/subdir1/picker.png1
-rw-r--r--tests/auto/qdir/searchdir/subdir2/picker.png1
-rw-r--r--tests/auto/qdir/testData/empty1
-rw-r--r--tests/auto/qdir/testdir/dir/Makefile0
-rw-r--r--tests/auto/qdir/testdir/dir/qdir.pro2
-rw-r--r--tests/auto/qdir/testdir/dir/qrc_qdir.cpp42
-rw-r--r--tests/auto/qdir/testdir/dir/tmp/empty0
-rw-r--r--tests/auto/qdir/testdir/dir/tst_qdir.cpp42
-rw-r--r--tests/auto/qdir/testdir/spaces/foo. bar0
-rw-r--r--tests/auto/qdir/testdir/spaces/foo.bar0
-rw-r--r--tests/auto/qdir/tst_qdir.cpp1327
-rw-r--r--tests/auto/qdir/types/a0
-rw-r--r--tests/auto/qdir/types/a.a1
-rw-r--r--tests/auto/qdir/types/a.b1
-rw-r--r--tests/auto/qdir/types/a.c1
-rw-r--r--tests/auto/qdir/types/b0
-rw-r--r--tests/auto/qdir/types/b.a1
-rw-r--r--tests/auto/qdir/types/b.b1
-rw-r--r--tests/auto/qdir/types/b.c1
-rw-r--r--tests/auto/qdir/types/c0
-rw-r--r--tests/auto/qdir/types/c.a1
-rw-r--r--tests/auto/qdir/types/c.b1
-rw-r--r--tests/auto/qdir/types/c.c1
-rw-r--r--tests/auto/qdir/types/d.a/dummy0
-rw-r--r--tests/auto/qdir/types/d.b/dummy0
-rw-r--r--tests/auto/qdir/types/d.c/dummy0
-rw-r--r--tests/auto/qdir/types/d/dummy0
-rw-r--r--tests/auto/qdir/types/e.a/dummy0
-rw-r--r--tests/auto/qdir/types/e.b/dummy0
-rw-r--r--tests/auto/qdir/types/e.c/dummy0
-rw-r--r--tests/auto/qdir/types/e/dummy0
-rw-r--r--tests/auto/qdir/types/f.a/dummy0
-rw-r--r--tests/auto/qdir/types/f.b/dummy0
-rw-r--r--tests/auto/qdir/types/f.c/dummy0
-rw-r--r--tests/auto/qdir/types/f/dummy0
-rw-r--r--tests/auto/qdirectpainter/.gitignore2
-rw-r--r--tests/auto/qdirectpainter/qdirectpainter.pro7
-rw-r--r--tests/auto/qdirectpainter/runDirectPainter/main.cpp81
-rw-r--r--tests/auto/qdirectpainter/runDirectPainter/runDirectPainter.pro5
-rw-r--r--tests/auto/qdirectpainter/test/test.pro14
-rw-r--r--tests/auto/qdirectpainter/tst_qdirectpainter.cpp247
-rw-r--r--tests/auto/qdiriterator/.gitignore1
-rw-r--r--tests/auto/qdiriterator/entrylist/directory/dummy0
-rw-r--r--tests/auto/qdiriterator/entrylist/file0
-rw-r--r--tests/auto/qdiriterator/foo/bar/readme.txt0
-rw-r--r--tests/auto/qdiriterator/qdiriterator.pro12
-rw-r--r--tests/auto/qdiriterator/qdiriterator.qrc6
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/dir1/aPage.html8
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/dir1/textFileB.txt1
-rw-r--r--tests/auto/qdiriterator/recursiveDirs/textFileA.txt1
-rw-r--r--tests/auto/qdiriterator/tst_qdiriterator.cpp427
-rw-r--r--tests/auto/qdirmodel/.gitignore1
-rw-r--r--tests/auto/qdirmodel/dirtest/test1/dummy1
-rw-r--r--tests/auto/qdirmodel/dirtest/test1/test0
-rw-r--r--tests/auto/qdirmodel/qdirmodel.pro16
-rw-r--r--tests/auto/qdirmodel/test/file01.tst0
-rw-r--r--tests/auto/qdirmodel/test/file02.tst0
-rw-r--r--tests/auto/qdirmodel/test/file03.tst0
-rw-r--r--tests/auto/qdirmodel/test/file04.tst0
-rw-r--r--tests/auto/qdirmodel/tst_qdirmodel.cpp669
-rw-r--r--tests/auto/qdockwidget/.gitignore1
-rw-r--r--tests/auto/qdockwidget/qdockwidget.pro5
-rw-r--r--tests/auto/qdockwidget/tst_qdockwidget.cpp802
-rw-r--r--tests/auto/qdom/.gitattributes4
-rw-r--r--tests/auto/qdom/.gitignore1
-rw-r--r--tests/auto/qdom/doubleNamespaces.xml1
-rw-r--r--tests/auto/qdom/qdom.pro13
-rw-r--r--tests/auto/qdom/testdata/excludedCodecs.txt135
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc01.xml1
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc02.xml1
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc03.xml6
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc04.xml510
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc05.xml3554
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc_euc-jp.xml78
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc_iso-2022-jp.xml78
-rw-r--r--tests/auto/qdom/testdata/toString_01/doc_little-endian.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qdom/testdata/toString_01/doc_utf-16.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qdom/testdata/toString_01/doc_utf-8.xml77
-rw-r--r--tests/auto/qdom/tst_qdom.cpp1897
-rw-r--r--tests/auto/qdom/umlaut.xml2
-rw-r--r--tests/auto/qdoublespinbox/.gitignore1
-rw-r--r--tests/auto/qdoublespinbox/qdoublespinbox.pro5
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp1008
-rw-r--r--tests/auto/qdoublevalidator/.gitignore1
-rw-r--r--tests/auto/qdoublevalidator/qdoublevalidator.pro4
-rw-r--r--tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp318
-rw-r--r--tests/auto/qdrag/.gitignore1
-rw-r--r--tests/auto/qdrag/qdrag.pro9
-rw-r--r--tests/auto/qdrag/tst_qdrag.cpp94
-rw-r--r--tests/auto/qerrormessage/.gitignore1
-rw-r--r--tests/auto/qerrormessage/qerrormessage.pro15
-rw-r--r--tests/auto/qerrormessage/tst_qerrormessage.cpp158
-rw-r--r--tests/auto/qevent/.gitignore1
-rw-r--r--tests/auto/qevent/qevent.pro6
-rw-r--r--tests/auto/qevent/tst_qevent.cpp92
-rw-r--r--tests/auto/qeventloop/.gitignore1
-rw-r--r--tests/auto/qeventloop/qeventloop.pro7
-rw-r--r--tests/auto/qeventloop/tst_qeventloop.cpp733
-rw-r--r--tests/auto/qexplicitlyshareddatapointer/.gitignore1
-rw-r--r--tests/auto/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro3
-rw-r--r--tests/auto/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp239
-rw-r--r--tests/auto/qfile/.gitattributes2
-rw-r--r--tests/auto/qfile/.gitignore8
-rw-r--r--tests/auto/qfile/dosfile.txt14
-rw-r--r--tests/auto/qfile/forCopying.txt1
-rw-r--r--tests/auto/qfile/forRenaming.txt7
-rw-r--r--tests/auto/qfile/noendofline.txt3
-rw-r--r--tests/auto/qfile/qfile.pro9
-rw-r--r--tests/auto/qfile/qfile.qrc5
-rw-r--r--tests/auto/qfile/resources/file1.ext11
-rw-r--r--tests/auto/qfile/stdinprocess/main.cpp72
-rw-r--r--tests/auto/qfile/stdinprocess/stdinprocess.pro6
-rw-r--r--tests/auto/qfile/test/test.pro33
-rw-r--r--tests/auto/qfile/testfile.txt6
-rw-r--r--tests/auto/qfile/testlog.txt144
-rw-r--r--tests/auto/qfile/tst_qfile.cpp2532
-rw-r--r--tests/auto/qfile/two.dots.file1
-rw-r--r--tests/auto/qfiledialog/.gitignore1
-rw-r--r--tests/auto/qfiledialog/qfiledialog.pro15
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp1793
-rw-r--r--tests/auto/qfileiconprovider/.gitignore1
-rw-r--r--tests/auto/qfileiconprovider/qfileiconprovider.pro4
-rw-r--r--tests/auto/qfileiconprovider/tst_qfileiconprovider.cpp181
-rw-r--r--tests/auto/qfileinfo/.gitignore1
-rw-r--r--tests/auto/qfileinfo/qfileinfo.pro15
-rw-r--r--tests/auto/qfileinfo/qfileinfo.qrc5
-rw-r--r--tests/auto/qfileinfo/resources/file10
-rw-r--r--tests/auto/qfileinfo/resources/file1.ext10
-rw-r--r--tests/auto/qfileinfo/resources/file1.ext1.ext20
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp1108
-rw-r--r--tests/auto/qfilesystemmodel/.gitignore1
-rw-r--r--tests/auto/qfilesystemmodel/qfilesystemmodel.pro9
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp814
-rw-r--r--tests/auto/qfilesystemwatcher/.gitignore1
-rw-r--r--tests/auto/qfilesystemwatcher/qfilesystemwatcher.pro5
-rw-r--r--tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp407
-rw-r--r--tests/auto/qflags/.gitignore1
-rw-r--r--tests/auto/qflags/qflags.pro6
-rw-r--r--tests/auto/qflags/tst_qflags.cpp76
-rw-r--r--tests/auto/qfocusevent/.gitignore1
-rw-r--r--tests/auto/qfocusevent/qfocusevent.pro6
-rw-r--r--tests/auto/qfocusevent/tst_qfocusevent.cpp426
-rw-r--r--tests/auto/qfocusframe/.gitignore1
-rw-r--r--tests/auto/qfocusframe/qfocusframe.pro9
-rw-r--r--tests/auto/qfocusframe/tst_qfocusframe.cpp89
-rw-r--r--tests/auto/qfont/.gitignore1
-rw-r--r--tests/auto/qfont/qfont.pro4
-rw-r--r--tests/auto/qfont/tst_qfont.cpp593
-rw-r--r--tests/auto/qfontcombobox/.gitignore1
-rw-r--r--tests/auto/qfontcombobox/qfontcombobox.pro4
-rw-r--r--tests/auto/qfontcombobox/tst_qfontcombobox.cpp291
-rw-r--r--tests/auto/qfontdatabase/.gitignore1
-rw-r--r--tests/auto/qfontdatabase/FreeMono.ttfbin0 -> 267400 bytes-rw-r--r--tests/auto/qfontdatabase/qfontdatabase.pro10
-rw-r--r--tests/auto/qfontdatabase/tst_qfontdatabase.cpp248
-rw-r--r--tests/auto/qfontdialog/.gitignore1
-rw-r--r--tests/auto/qfontdialog/qfontdialog.pro7
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog.cpp156
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog_mac_helpers.mm26
-rw-r--r--tests/auto/qfontmetrics/.gitignore1
-rw-r--r--tests/auto/qfontmetrics/qfontmetrics.pro4
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp205
-rw-r--r--tests/auto/qformlayout/.gitignore1
-rw-r--r--tests/auto/qformlayout/qformlayout.pro2
-rw-r--r--tests/auto/qformlayout/tst_qformlayout.cpp910
-rw-r--r--tests/auto/qftp/.gitattributes1
-rw-r--r--tests/auto/qftp/.gitignore2
-rw-r--r--tests/auto/qftp/qftp.pro14
-rw-r--r--tests/auto/qftp/rfc3252.txt899
-rw-r--r--tests/auto/qftp/tst_qftp.cpp2045
-rw-r--r--tests/auto/qfuture/.gitignore1
-rw-r--r--tests/auto/qfuture/qfuture.pro4
-rw-r--r--tests/auto/qfuture/tst_qfuture.cpp1440
-rw-r--r--tests/auto/qfuture/versioncheck.h49
-rw-r--r--tests/auto/qfuturewatcher/.gitignore1
-rw-r--r--tests/auto/qfuturewatcher/qfuturewatcher.pro3
-rw-r--r--tests/auto/qfuturewatcher/tst_qfuturewatcher.cpp893
-rw-r--r--tests/auto/qgetputenv/.gitignore1
-rw-r--r--tests/auto/qgetputenv/qgetputenv.pro7
-rw-r--r--tests/auto/qgetputenv/tst_qgetputenv.cpp84
-rw-r--r--tests/auto/qgl/.gitignore1
-rw-r--r--tests/auto/qgl/qgl.pro10
-rw-r--r--tests/auto/qgl/tst_qgl.cpp408
-rw-r--r--tests/auto/qglobal/.gitignore1
-rw-r--r--tests/auto/qglobal/qglobal.pro6
-rw-r--r--tests/auto/qglobal/tst_qglobal.cpp194
-rw-r--r--tests/auto/qgraphicsgridlayout/.gitignore1
-rw-r--r--tests/auto/qgraphicsgridlayout/qgraphicsgridlayout.pro4
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2095
-rw-r--r--tests/auto/qgraphicsitem/.gitignore1
-rw-r--r--tests/auto/qgraphicsitem/nestedClipping_reference.pngbin0 -> 638 bytes-rw-r--r--tests/auto/qgraphicsitem/qgraphicsitem.pro7
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp5904
-rw-r--r--tests/auto/qgraphicsitemanimation/.gitignore1
-rw-r--r--tests/auto/qgraphicsitemanimation/qgraphicsitemanimation.pro5
-rw-r--r--tests/auto/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp198
-rw-r--r--tests/auto/qgraphicslayout/.gitignore1
-rw-r--r--tests/auto/qgraphicslayout/qgraphicslayout.pro8
-rw-r--r--tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp694
-rw-r--r--tests/auto/qgraphicslayoutitem/.gitignore1
-rw-r--r--tests/auto/qgraphicslayoutitem/qgraphicslayoutitem.pro4
-rw-r--r--tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp368
-rw-r--r--tests/auto/qgraphicslinearlayout/.gitignore1
-rw-r--r--tests/auto/qgraphicslinearlayout/qgraphicslinearlayout.pro4
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp1412
-rw-r--r--tests/auto/qgraphicspixmapitem/.gitignore1
-rw-r--r--tests/auto/qgraphicspixmapitem/qgraphicspixmapitem.pro4
-rw-r--r--tests/auto/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp427
-rw-r--r--tests/auto/qgraphicspolygonitem/.gitignore1
-rw-r--r--tests/auto/qgraphicspolygonitem/qgraphicspolygonitem.pro4
-rw-r--r--tests/auto/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp349
-rw-r--r--tests/auto/qgraphicsproxywidget/.gitignore1
-rw-r--r--tests/auto/qgraphicsproxywidget/qgraphicsproxywidget.pro4
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp3159
-rw-r--r--tests/auto/qgraphicsscene/.gitignore1
-rw-r--r--tests/auto/qgraphicsscene/Ash_European.jpgbin0 -> 4751 bytes-rw-r--r--tests/auto/qgraphicsscene/graphicsScene_selection.databin0 -> 854488 bytes-rw-r--r--tests/auto/qgraphicsscene/images.qrc5
-rw-r--r--tests/auto/qgraphicsscene/qgraphicsscene.pro17
-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-45-deg-left.pngbin0 -> 2181 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-45-deg-right.pngbin0 -> 1953 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-scale-2x.pngbin0 -> 2399 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-translate-0-50.pngbin0 -> 1872 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-translate-50-0.pngbin0 -> 1884 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-all-untransformed.pngbin0 -> 1896 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-bottomleft-untransformed.pngbin0 -> 1560 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-bottomright-untransformed.pngbin0 -> 1550 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-topleft-untransformed.pngbin0 -> 1566 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/all-topright-untransformed.pngbin0 -> 1547 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottom-bottomright-untransformed.pngbin0 -> 1172 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottom-topleft-untransformed.pngbin0 -> 1690 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottomleft-all-untransformed.pngbin0 -> 1736 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottomleft-topleft-untransformed.pngbin0 -> 1642 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottomright-all-untransformed.pngbin0 -> 1093 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/bottomright-topleft-untransformed.pngbin0 -> 1661 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/left-bottomright-untransformed.pngbin0 -> 1289 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/left-topleft-untransformed.pngbin0 -> 1823 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/right-bottomright-untransformed.pngbin0 -> 1236 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/right-topleft-untransformed.pngbin0 -> 1839 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/top-bottomright-untransformed.pngbin0 -> 1174 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/top-topleft-untransformed.pngbin0 -> 1703 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/topleft-all-untransformed.pngbin0 -> 1973 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/topleft-topleft-untransformed.pngbin0 -> 1650 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/topright-all-untransformed.pngbin0 -> 2018 bytes-rw-r--r--tests/auto/qgraphicsscene/testData/render/topright-topleft-untransformed.pngbin0 -> 1669 bytes-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp3566
-rw-r--r--tests/auto/qgraphicsview/.gitignore1
-rw-r--r--tests/auto/qgraphicsview/qgraphicsview.pro5
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp2992
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview_2.cpp956
-rw-r--r--tests/auto/qgraphicswidget/.gitignore1
-rw-r--r--tests/auto/qgraphicswidget/qgraphicswidget.pro4
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp1834
-rw-r--r--tests/auto/qgridlayout/.gitignore1
-rw-r--r--tests/auto/qgridlayout/qgridlayout.pro6
-rw-r--r--tests/auto/qgridlayout/sortdialog.ui135
-rw-r--r--tests/auto/qgridlayout/tst_qgridlayout.cpp1637
-rw-r--r--tests/auto/qgroupbox/.gitignore1
-rw-r--r--tests/auto/qgroupbox/qgroupbox.pro5
-rw-r--r--tests/auto/qgroupbox/tst_qgroupbox.cpp463
-rw-r--r--tests/auto/qguivariant/.gitignore1
-rw-r--r--tests/auto/qguivariant/qguivariant.pro5
-rw-r--r--tests/auto/qguivariant/tst_qguivariant.cpp72
-rw-r--r--tests/auto/qhash/.gitignore1
-rw-r--r--tests/auto/qhash/qhash.pro7
-rw-r--r--tests/auto/qhash/tst_qhash.cpp1233
-rw-r--r--tests/auto/qheaderview/.gitignore1
-rw-r--r--tests/auto/qheaderview/qheaderview.pro4
-rw-r--r--tests/auto/qheaderview/tst_qheaderview.cpp1923
-rw-r--r--tests/auto/qhelpcontentmodel/.gitignore2
-rw-r--r--tests/auto/qhelpcontentmodel/data/collection.qhcbin0 -> 10240 bytes-rw-r--r--tests/auto/qhelpcontentmodel/data/qmake-3.3.8.qchbin0 -> 61440 bytes-rw-r--r--tests/auto/qhelpcontentmodel/data/qmake-4.3.0.qchbin0 -> 93184 bytes-rw-r--r--tests/auto/qhelpcontentmodel/data/test.qchbin0 -> 22528 bytes-rw-r--r--tests/auto/qhelpcontentmodel/qhelpcontentmodel.pro10
-rw-r--r--tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.cpp182
-rw-r--r--tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.pro8
-rw-r--r--tests/auto/qhelpenginecore/.gitignore3
-rw-r--r--tests/auto/qhelpenginecore/data/collection.qhcbin0 -> 10240 bytes-rw-r--r--tests/auto/qhelpenginecore/data/collection1.qhcbin0 -> 10240 bytes-rw-r--r--tests/auto/qhelpenginecore/data/linguist-3.3.8.qchbin0 -> 131072 bytes-rw-r--r--tests/auto/qhelpenginecore/data/qmake-3.3.8.qchbin0 -> 61440 bytes-rw-r--r--tests/auto/qhelpenginecore/data/qmake-4.3.0.qchbin0 -> 93184 bytes-rw-r--r--tests/auto/qhelpenginecore/data/test.html11
-rw-r--r--tests/auto/qhelpenginecore/data/test.qchbin0 -> 22528 bytes-rw-r--r--tests/auto/qhelpenginecore/qhelpenginecore.pro10
-rw-r--r--tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp460
-rw-r--r--tests/auto/qhelpenginecore/tst_qhelpenginecore.pro8
-rw-r--r--tests/auto/qhelpgenerator/.gitignore1
-rw-r--r--tests/auto/qhelpgenerator/data/cars.html11
-rw-r--r--tests/auto/qhelpgenerator/data/classic.css92
-rw-r--r--tests/auto/qhelpgenerator/data/fancy.html11
-rw-r--r--tests/auto/qhelpgenerator/data/people.html11
-rw-r--r--tests/auto/qhelpgenerator/data/sub/about.html11
-rw-r--r--tests/auto/qhelpgenerator/data/test.html11
-rw-r--r--tests/auto/qhelpgenerator/data/test.qhp72
-rw-r--r--tests/auto/qhelpgenerator/qhelpgenerator.pro10
-rw-r--r--tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp218
-rw-r--r--tests/auto/qhelpgenerator/tst_qhelpgenerator.pro9
-rw-r--r--tests/auto/qhelpindexmodel/.gitignore2
-rw-r--r--tests/auto/qhelpindexmodel/data/collection.qhcbin0 -> 10240 bytes-rw-r--r--tests/auto/qhelpindexmodel/data/collection1.qhcbin0 -> 10240 bytes-rw-r--r--tests/auto/qhelpindexmodel/data/linguist-3.3.8.qchbin0 -> 131072 bytes-rw-r--r--tests/auto/qhelpindexmodel/data/qmake-3.3.8.qchbin0 -> 61440 bytes-rw-r--r--tests/auto/qhelpindexmodel/data/qmake-4.3.0.qchbin0 -> 93184 bytes-rw-r--r--tests/auto/qhelpindexmodel/data/test.html11
-rw-r--r--tests/auto/qhelpindexmodel/data/test.qchbin0 -> 22528 bytes-rw-r--r--tests/auto/qhelpindexmodel/qhelpindexmodel.pro10
-rw-r--r--tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp219
-rw-r--r--tests/auto/qhelpindexmodel/tst_qhelpindexmodel.pro9
-rw-r--r--tests/auto/qhelpprojectdata/.gitignore1
-rw-r--r--tests/auto/qhelpprojectdata/data/test.qhp72
-rw-r--r--tests/auto/qhelpprojectdata/qhelpprojectdata.pro10
-rw-r--r--tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp193
-rw-r--r--tests/auto/qhelpprojectdata/tst_qhelpprojectdata.pro9
-rw-r--r--tests/auto/qhostaddress/.gitignore1
-rw-r--r--tests/auto/qhostaddress/qhostaddress.pro14
-rw-r--r--tests/auto/qhostaddress/tst_qhostaddress.cpp601
-rw-r--r--tests/auto/qhostinfo/.gitignore1
-rw-r--r--tests/auto/qhostinfo/qhostinfo.pro13
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp409
-rw-r--r--tests/auto/qhttp/.gitattributes1
-rw-r--r--tests/auto/qhttp/.gitignore1
-rw-r--r--tests/auto/qhttp/dummyserver.h114
-rw-r--r--tests/auto/qhttp/qhttp.pro18
-rw-r--r--tests/auto/qhttp/rfc3252.txt899
-rw-r--r--tests/auto/qhttp/trolltech8
-rw-r--r--tests/auto/qhttp/tst_qhttp.cpp1530
-rwxr-xr-xtests/auto/qhttp/webserver/cgi-bin/retrieve_testfile.cgi6
-rwxr-xr-xtests/auto/qhttp/webserver/cgi-bin/rfc.cgi5
-rwxr-xr-xtests/auto/qhttp/webserver/cgi-bin/store_testfile.cgi6
-rw-r--r--tests/auto/qhttp/webserver/index.html899
-rw-r--r--tests/auto/qhttp/webserver/rfc3252899
-rw-r--r--tests/auto/qhttp/webserver/rfc3252.txt899
-rw-r--r--tests/auto/qhttpnetworkconnection/.gitignore1
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro4
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp765
-rw-r--r--tests/auto/qhttpnetworkreply/.gitignore1
-rw-r--r--tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro4
-rw-r--r--tests/auto/qhttpnetworkreply/tst_qhttpnetworkreply.cpp134
-rw-r--r--tests/auto/qhttpsocketengine/.gitignore1
-rw-r--r--tests/auto/qhttpsocketengine/qhttpsocketengine.pro12
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp747
-rw-r--r--tests/auto/qicoimageformat/.gitignore1
-rw-r--r--tests/auto/qicoimageformat/icons/invalid/35floppy.icobin0 -> 1078 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/35FLOPPY.ICObin0 -> 1078 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/AddPerfMon.icobin0 -> 1078 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/App.icobin0 -> 318 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/Obj_N2_Internal_Mem.icobin0 -> 25214 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/Status_Play.icobin0 -> 2862 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/TIMER01.ICObin0 -> 1078 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/WORLD.icobin0 -> 3310 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/WORLDH.icobin0 -> 3310 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/abcardWindow.icobin0 -> 22486 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/semitransparent.icobin0 -> 25214 bytes-rw-r--r--tests/auto/qicoimageformat/icons/valid/trolltechlogo_tiny.icobin0 -> 3006 bytes-rw-r--r--tests/auto/qicoimageformat/qicoimageformat.pro17
-rw-r--r--tests/auto/qicoimageformat/tst_qticoimageformat.cpp305
-rw-r--r--tests/auto/qicon/.gitignore1
-rw-r--r--tests/auto/qicon/heart.svg55
-rw-r--r--tests/auto/qicon/heart.svgzbin0 -> 1506 bytes-rw-r--r--tests/auto/qicon/image.pngbin0 -> 14743 bytes-rw-r--r--tests/auto/qicon/image.tgabin0 -> 51708 bytes-rw-r--r--tests/auto/qicon/qicon.pro18
-rw-r--r--tests/auto/qicon/rect.pngbin0 -> 175 bytes-rw-r--r--tests/auto/qicon/rect.svg76
-rw-r--r--tests/auto/qicon/trash.svg58
-rw-r--r--tests/auto/qicon/tst_qicon.cpp614
-rw-r--r--tests/auto/qicon/tst_qicon.qrc6
-rw-r--r--tests/auto/qimage/.gitignore1
-rw-r--r--tests/auto/qimage/images/image.bmpbin0 -> 306 bytes-rw-r--r--tests/auto/qimage/images/image.gifbin0 -> 1089 bytes-rw-r--r--tests/auto/qimage/images/image.icobin0 -> 10134 bytes-rw-r--r--tests/auto/qimage/images/image.jpgbin0 -> 696 bytes-rw-r--r--tests/auto/qimage/images/image.pbm8
-rw-r--r--tests/auto/qimage/images/image.pgm10
-rw-r--r--tests/auto/qimage/images/image.pngbin0 -> 549 bytes-rw-r--r--tests/auto/qimage/images/image.ppm7
-rw-r--r--tests/auto/qimage/images/image.xbm5
-rw-r--r--tests/auto/qimage/images/image.xpm261
-rw-r--r--tests/auto/qimage/qimage.pro12
-rw-r--r--tests/auto/qimage/tst_qimage.cpp1766
-rw-r--r--tests/auto/qimageiohandler/.gitignore1
-rw-r--r--tests/auto/qimageiohandler/qimageiohandler.pro9
-rw-r--r--tests/auto/qimageiohandler/tst_qimageiohandler.cpp96
-rw-r--r--tests/auto/qimagereader/.gitignore2
-rw-r--r--tests/auto/qimagereader/images/16bpp.bmpbin0 -> 153654 bytes-rw-r--r--tests/auto/qimagereader/images/4bpp-rle.bmpbin0 -> 23662 bytes-rw-r--r--tests/auto/qimagereader/images/YCbCr_cmyk.jpgbin0 -> 3699 bytes-rw-r--r--tests/auto/qimagereader/images/YCbCr_cmyk.pngbin0 -> 230 bytes-rw-r--r--tests/auto/qimagereader/images/YCbCr_rgb.jpgbin0 -> 2045 bytes-rw-r--r--tests/auto/qimagereader/images/away.pngbin0 -> 753 bytes-rw-r--r--tests/auto/qimagereader/images/ball.mngbin0 -> 34394 bytes-rw-r--r--tests/auto/qimagereader/images/bat1.gifbin0 -> 953 bytes-rw-r--r--tests/auto/qimagereader/images/bat2.gifbin0 -> 980 bytes-rw-r--r--tests/auto/qimagereader/images/beavis.jpgbin0 -> 20688 bytes-rw-r--r--tests/auto/qimagereader/images/black.pngbin0 -> 697 bytes-rw-r--r--tests/auto/qimagereader/images/black.xpm65
-rw-r--r--tests/auto/qimagereader/images/colorful.bmpbin0 -> 65002 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt-colors.xpm26
-rw-r--r--tests/auto/qimagereader/images/corrupt-data.tifbin0 -> 8590 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt-pixels.xpm7
-rw-r--r--tests/auto/qimagereader/images/corrupt.bmpbin0 -> 116 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt.gifbin0 -> 2608 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt.jpgbin0 -> 18 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt.mngbin0 -> 183 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt.pngbin0 -> 95 bytes-rw-r--r--tests/auto/qimagereader/images/corrupt.xbm5
-rw-r--r--tests/auto/qimagereader/images/crash-signed-char.bmpbin0 -> 45748 bytes-rw-r--r--tests/auto/qimagereader/images/earth.gifbin0 -> 51712 bytes-rw-r--r--tests/auto/qimagereader/images/fire.mngbin0 -> 44430 bytes-rw-r--r--tests/auto/qimagereader/images/font.bmpbin0 -> 1026 bytes-rw-r--r--tests/auto/qimagereader/images/gnus.xbm622
-rw-r--r--tests/auto/qimagereader/images/image.pbm8
-rw-r--r--tests/auto/qimagereader/images/image.pgm10
-rw-r--r--tests/auto/qimagereader/images/image.pngbin0 -> 549 bytes-rw-r--r--tests/auto/qimagereader/images/image.ppm7
-rw-r--r--tests/auto/qimagereader/images/kollada-noextbin0 -> 13907 bytes-rw-r--r--tests/auto/qimagereader/images/kollada.pngbin0 -> 13907 bytes-rw-r--r--tests/auto/qimagereader/images/marble.xpm470
-rw-r--r--tests/auto/qimagereader/images/namedcolors.xpm18
-rw-r--r--tests/auto/qimagereader/images/negativeheight.bmpbin0 -> 24630 bytes-rw-r--r--tests/auto/qimagereader/images/noclearcode.bmpbin0 -> 326 bytes-rw-r--r--tests/auto/qimagereader/images/noclearcode.gifbin0 -> 130 bytes-rw-r--r--tests/auto/qimagereader/images/nontransparent.xpm788
-rw-r--r--tests/auto/qimagereader/images/pngwithcompressedtext.pngbin0 -> 757 bytes-rw-r--r--tests/auto/qimagereader/images/pngwithtext.pngbin0 -> 796 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_adobedeflate_littleendian.tifbin0 -> 4784 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_lzw_littleendian.tifbin0 -> 26690 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_nocompression_bigendian.tifbin0 -> 160384 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_nocompression_littleendian.tifbin0 -> 160388 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_packbits_littleendian.tifbin0 -> 161370 bytes-rw-r--r--tests/auto/qimagereader/images/rgba_zipdeflate_littleendian.tifbin0 -> 14728 bytes-rw-r--r--tests/auto/qimagereader/images/runners.ppmbin0 -> 960016 bytes-rw-r--r--tests/auto/qimagereader/images/teapot.ppm31
-rw-r--r--tests/auto/qimagereader/images/test.ppm2
-rw-r--r--tests/auto/qimagereader/images/test.xpm260
-rw-r--r--tests/auto/qimagereader/images/transparent.xpm788
-rw-r--r--tests/auto/qimagereader/images/trolltech.gifbin0 -> 42629 bytes-rw-r--r--tests/auto/qimagereader/images/tst7.bmpbin0 -> 582 bytes-rw-r--r--tests/auto/qimagereader/images/tst7.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qimagereader/qimagereader.pro26
-rw-r--r--tests/auto/qimagereader/qimagereader.qrc51
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp1397
-rw-r--r--tests/auto/qimagewriter/.gitignore1
-rw-r--r--tests/auto/qimagewriter/images/YCbCr_cmyk.jpgbin0 -> 3699 bytes-rw-r--r--tests/auto/qimagewriter/images/YCbCr_rgb.jpgbin0 -> 2045 bytes-rw-r--r--tests/auto/qimagewriter/images/beavis.jpgbin0 -> 20688 bytes-rw-r--r--tests/auto/qimagewriter/images/colorful.bmpbin0 -> 65002 bytes-rw-r--r--tests/auto/qimagewriter/images/earth.gifbin0 -> 51712 bytes-rw-r--r--tests/auto/qimagewriter/images/font.bmpbin0 -> 1026 bytes-rw-r--r--tests/auto/qimagewriter/images/gnus.xbm622
-rw-r--r--tests/auto/qimagewriter/images/kollada.pngbin0 -> 13907 bytes-rw-r--r--tests/auto/qimagewriter/images/marble.xpm329
-rw-r--r--tests/auto/qimagewriter/images/ship63.pbmbin0 -> 111 bytes-rw-r--r--tests/auto/qimagewriter/images/teapot.ppm31
-rw-r--r--tests/auto/qimagewriter/images/teapot.tiffbin0 -> 262274 bytes-rw-r--r--tests/auto/qimagewriter/images/trolltech.gifbin0 -> 42629 bytes-rw-r--r--tests/auto/qimagewriter/qimagewriter.pro15
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp586
-rw-r--r--tests/auto/qinputdialog/.gitignore1
-rw-r--r--tests/auto/qinputdialog/qinputdialog.pro4
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp372
-rw-r--r--tests/auto/qintvalidator/.gitignore1
-rw-r--r--tests/auto/qintvalidator/qintvalidator.pro4
-rw-r--r--tests/auto/qintvalidator/tst_qintvalidator.cpp198
-rw-r--r--tests/auto/qiodevice/.gitignore2
-rw-r--r--tests/auto/qiodevice/qiodevice.pro18
-rw-r--r--tests/auto/qiodevice/tst_qiodevice.cpp458
-rw-r--r--tests/auto/qitemdelegate/.gitignore1
-rw-r--r--tests/auto/qitemdelegate/qitemdelegate.pro5
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp1070
-rw-r--r--tests/auto/qitemeditorfactory/.gitignore1
-rw-r--r--tests/auto/qitemeditorfactory/qitemeditorfactory.pro4
-rw-r--r--tests/auto/qitemeditorfactory/tst_qitemeditorfactory.cpp84
-rw-r--r--tests/auto/qitemmodel/.gitignore1
-rw-r--r--tests/auto/qitemmodel/README3
-rw-r--r--tests/auto/qitemmodel/modelstotest.cpp415
-rw-r--r--tests/auto/qitemmodel/qitemmodel.pro16
-rw-r--r--tests/auto/qitemmodel/tst_qitemmodel.cpp1397
-rw-r--r--tests/auto/qitemselectionmodel/.gitignore1
-rw-r--r--tests/auto/qitemselectionmodel/qitemselectionmodel.pro4
-rw-r--r--tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp2145
-rw-r--r--tests/auto/qitemview/.gitignore1
-rw-r--r--tests/auto/qitemview/qitemview.pro4
-rw-r--r--tests/auto/qitemview/tst_qitemview.cpp922
-rw-r--r--tests/auto/qitemview/viewstotest.cpp165
-rw-r--r--tests/auto/qkeyevent/.gitignore1
-rw-r--r--tests/auto/qkeyevent/qkeyevent.pro5
-rw-r--r--tests/auto/qkeyevent/tst_qkeyevent.cpp228
-rw-r--r--tests/auto/qkeysequence/.gitignore1
-rw-r--r--tests/auto/qkeysequence/keys_de.qmbin0 -> 721 bytes-rw-r--r--tests/auto/qkeysequence/keys_de.ts61
-rw-r--r--tests/auto/qkeysequence/qkeysequence.pro6
-rw-r--r--tests/auto/qkeysequence/tst_qkeysequence.cpp531
-rw-r--r--tests/auto/qlabel/.gitignore1
-rw-r--r--tests/auto/qlabel/green.pngbin0 -> 97 bytes-rw-r--r--tests/auto/qlabel/qlabel.pro16
-rw-r--r--tests/auto/qlabel/red.pngbin0 -> 105 bytes-rw-r--r--tests/auto/qlabel/testdata/acc_01/res_Windows_data0.qsnapbin0 -> 328 bytes-rw-r--r--tests/auto/qlabel/testdata/acc_01/res_Windows_win32_data0.qsnapbin0 -> 330 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data0.qsnapbin0 -> 322 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data1.qsnapbin0 -> 328 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data10.qsnapbin0 -> 330 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data2.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data3.qsnapbin0 -> 320 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data4.qsnapbin0 -> 322 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data5.qsnapbin0 -> 328 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data6.qsnapbin0 -> 330 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data7.qsnapbin0 -> 318 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data8.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Motif_data9.qsnapbin0 -> 332 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data0.qsnapbin0 -> 316 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data1.qsnapbin0 -> 322 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data10.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data2.qsnapbin0 -> 318 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data3.qsnapbin0 -> 314 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data4.qsnapbin0 -> 316 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data5.qsnapbin0 -> 322 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data6.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data7.qsnapbin0 -> 312 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data8.qsnapbin0 -> 318 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_data9.qsnapbin0 -> 326 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data0.qsnapbin0 -> 318 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data1.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data10.qsnapbin0 -> 326 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data2.qsnapbin0 -> 320 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data3.qsnapbin0 -> 316 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data4.qsnapbin0 -> 318 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data5.qsnapbin0 -> 324 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data6.qsnapbin0 -> 326 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data7.qsnapbin0 -> 314 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data8.qsnapbin0 -> 320 bytes-rw-r--r--tests/auto/qlabel/testdata/setAlignment/alignRes_Windows_win32_data9.qsnapbin0 -> 328 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Motif_data0.qsnapbin0 -> 344 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Motif_data1.qsnapbin0 -> 346 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Motif_data2.qsnapbin0 -> 346 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_data0.qsnapbin0 -> 338 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_data1.qsnapbin0 -> 340 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_data2.qsnapbin0 -> 340 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_win32_data0.qsnapbin0 -> 340 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_win32_data1.qsnapbin0 -> 342 bytes-rw-r--r--tests/auto/qlabel/testdata/setIndent/indentRes_Windows_win32_data2.qsnapbin0 -> 342 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/Vpix_Motif_data0.qsnapbin0 -> 405 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/Vpix_Windows_data0.qsnapbin0 -> 399 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/Vpix_Windows_win32_data0.qsnapbin0 -> 397 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/empty_Motif_data0.qsnapbin0 -> 257 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/empty_Windows_data0.qsnapbin0 -> 251 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/empty_Windows_win32_data0.qsnapbin0 -> 249 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/scaledVpix_Motif_data0.qsnapbin0 -> 1040 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/scaledVpix_Windows_data0.qsnapbin0 -> 1034 bytes-rw-r--r--tests/auto/qlabel/testdata/setPixmap/scaledVpix_Windows_win32_data0.qsnapbin0 -> 984 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Motif_data0.qsnapbin0 -> 352 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Motif_data1.qsnapbin0 -> 398 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Motif_data2.qsnapbin0 -> 448 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Motif_data3.qsnapbin0 -> 744 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_data0.qsnapbin0 -> 346 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_data1.qsnapbin0 -> 392 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_data2.qsnapbin0 -> 442 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_data3.qsnapbin0 -> 738 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_win32_data0.qsnapbin0 -> 344 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_win32_data1.qsnapbin0 -> 390 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_win32_data2.qsnapbin0 -> 440 bytes-rw-r--r--tests/auto/qlabel/testdata/setText/res_Windows_win32_data3.qsnapbin0 -> 736 bytes-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp451
-rw-r--r--tests/auto/qlayout/.gitignore1
-rw-r--r--tests/auto/qlayout/baseline/smartmaxsize1792
-rw-r--r--tests/auto/qlayout/qlayout.pro14
-rw-r--r--tests/auto/qlayout/tst_qlayout.cpp337
-rw-r--r--tests/auto/qlcdnumber/.gitignore1
-rw-r--r--tests/auto/qlcdnumber/qlcdnumber.pro9
-rw-r--r--tests/auto/qlcdnumber/tst_qlcdnumber.cpp88
-rw-r--r--tests/auto/qlibrary/.gitignore10
-rw-r--r--tests/auto/qlibrary/lib/lib.pro30
-rw-r--r--tests/auto/qlibrary/lib/mylib.c19
-rw-r--r--tests/auto/qlibrary/lib2/lib2.pro30
-rw-r--r--tests/auto/qlibrary/lib2/mylib.c19
-rw-r--r--tests/auto/qlibrary/library_path/invalid.so1
-rw-r--r--tests/auto/qlibrary/qlibrary.pro9
-rw-r--r--tests/auto/qlibrary/tst/tst.pro23
-rw-r--r--tests/auto/qlibrary/tst_qlibrary.cpp558
-rw-r--r--tests/auto/qline/.gitignore1
-rw-r--r--tests/auto/qline/qline.pro6
-rw-r--r--tests/auto/qline/tst_qline.cpp492
-rw-r--r--tests/auto/qlineedit/.gitignore1
-rw-r--r--tests/auto/qlineedit/qlineedit.pro5
-rw-r--r--tests/auto/qlineedit/testdata/frame/noFrame_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/frame/noFrame_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/frame/useFrame_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/frame/useFrame_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/auto_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/auto_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/hcenter_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/hcenter_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/left_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/left_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/right_Motif-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/testdata/setAlignment/right_Windows-32x96x96_win.pngbin0 -> 30154 bytes-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp3491
-rw-r--r--tests/auto/qlist/.gitignore1
-rw-r--r--tests/auto/qlist/qlist.pro5
-rw-r--r--tests/auto/qlist/tst_qlist.cpp133
-rw-r--r--tests/auto/qlistview/.gitignore1
-rw-r--r--tests/auto/qlistview/qlistview.pro5
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp1532
-rw-r--r--tests/auto/qlistwidget/.gitignore1
-rw-r--r--tests/auto/qlistwidget/qlistwidget.pro4
-rw-r--r--tests/auto/qlistwidget/tst_qlistwidget.cpp1502
-rw-r--r--tests/auto/qlocale/.gitignore3
-rw-r--r--tests/auto/qlocale/qlocale.pro4
-rw-r--r--tests/auto/qlocale/syslocaleapp/syslocaleapp.cpp53
-rw-r--r--tests/auto/qlocale/syslocaleapp/syslocaleapp.pro8
-rw-r--r--tests/auto/qlocale/test/test.pro31
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp1995
-rw-r--r--tests/auto/qlocalsocket/.gitignore2
-rw-r--r--tests/auto/qlocalsocket/example/client/client.pro16
-rw-r--r--tests/auto/qlocalsocket/example/client/main.cpp84
-rw-r--r--tests/auto/qlocalsocket/example/example.pro3
-rw-r--r--tests/auto/qlocalsocket/example/server/main.cpp97
-rw-r--r--tests/auto/qlocalsocket/example/server/server.pro19
-rw-r--r--tests/auto/qlocalsocket/lackey/lackey.pro18
-rw-r--r--tests/auto/qlocalsocket/lackey/main.cpp294
-rwxr-xr-xtests/auto/qlocalsocket/lackey/scripts/client.js35
-rw-r--r--tests/auto/qlocalsocket/lackey/scripts/server.js19
-rw-r--r--tests/auto/qlocalsocket/qlocalsocket.pro3
-rw-r--r--tests/auto/qlocalsocket/test/test.pro35
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp831
-rw-r--r--tests/auto/qmacstyle/.gitignore1
-rw-r--r--tests/auto/qmacstyle/qmacstyle.pro4
-rw-r--r--tests/auto/qmacstyle/tst_qmacstyle.cpp422
-rw-r--r--tests/auto/qmainwindow/.gitignore1
-rw-r--r--tests/auto/qmainwindow/qmainwindow.pro5
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp1660
-rw-r--r--tests/auto/qmake/.gitignore1
-rw-r--r--tests/auto/qmake/qmake.pro9
-rw-r--r--tests/auto/qmake/testcompiler.cpp390
-rw-r--r--tests/auto/qmake/testcompiler.h110
-rw-r--r--tests/auto/qmake/testdata/bundle-spaces/bundle-spaces.pro13
-rw-r--r--tests/auto/qmake/testdata/bundle-spaces/existing file0
-rw-r--r--tests/auto/qmake/testdata/bundle-spaces/main.cpp0
-rw-r--r--tests/auto/qmake/testdata/bundle-spaces/some-file0
-rw-r--r--tests/auto/qmake/testdata/comments/comments.pro33
-rw-r--r--tests/auto/qmake/testdata/duplicateLibraryEntries/duplib.pro10
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/.qmake.cache0
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/features/default_pre.prf7
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/foo.pro17
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/oink.pri1
-rw-r--r--tests/auto/qmake/testdata/findDeps/findDeps.pro20
-rw-r--r--tests/auto/qmake/testdata/findDeps/main.cpp61
-rw-r--r--tests/auto/qmake/testdata/findDeps/object1.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object2.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object3.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object4.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object5.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object6.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object7.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object8.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object9.h49
-rw-r--r--tests/auto/qmake/testdata/findMocs/findMocs.pro12
-rw-r--r--tests/auto/qmake/testdata/findMocs/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/findMocs/object1.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object2.h49
-rw-r--r--tests/auto/qmake/testdata/findMocs/object3.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object4.h61
-rw-r--r--tests/auto/qmake/testdata/findMocs/object5.h48
-rw-r--r--tests/auto/qmake/testdata/findMocs/object6.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object7.h50
-rw-r--r--tests/auto/qmake/testdata/func_export/func_export.pro22
-rw-r--r--tests/auto/qmake/testdata/func_variables/func_variables.pro52
-rw-r--r--tests/auto/qmake/testdata/functions/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/functions.pro91
-rw-r--r--tests/auto/qmake/testdata/functions/infiletest.pro2
-rw-r--r--tests/auto/qmake/testdata/functions/one/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/one/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/three/wildcard21.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/three/wildcard22.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/two/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/two/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/wildcard21.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/wildcard22.cpp40
-rw-r--r--tests/auto/qmake/testdata/include_dir/foo.pro12
-rw-r--r--tests/auto/qmake/testdata/include_dir/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/include_dir/test_file.cpp48
-rw-r--r--tests/auto/qmake/testdata/include_dir/test_file.h52
-rw-r--r--tests/auto/qmake/testdata/include_dir/untitled.ui22
-rw-r--r--tests/auto/qmake/testdata/include_dir_build/README1
-rw-r--r--tests/auto/qmake/testdata/install_depends/foo.pro23
-rw-r--r--tests/auto/qmake/testdata/install_depends/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/install_depends/test10
-rw-r--r--tests/auto/qmake/testdata/install_depends/test20
-rw-r--r--tests/auto/qmake/testdata/install_depends/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/install_depends/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/one_space/main.cpp50
-rw-r--r--tests/auto/qmake/testdata/one_space/one_space.pro10
-rw-r--r--tests/auto/qmake/testdata/operators/operators.pro24
-rw-r--r--tests/auto/qmake/testdata/prompt/prompt.pro2
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/quotedfilenames.pro22
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/rc folder/logo.pngbin0 -> 16715 bytes-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/rc folder/test.qrc5
-rw-r--r--tests/auto/qmake/testdata/shadow_files/foo.pro17
-rw-r--r--tests/auto/qmake/testdata/shadow_files/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test.txt0
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/shadow_files_build/README1
-rw-r--r--tests/auto/qmake/testdata/shadow_files_build/foo.bar0
-rw-r--r--tests/auto/qmake/testdata/simple_app/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/simple_app/simple_app.pro12
-rw-r--r--tests/auto/qmake/testdata/simple_app/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/simple_app/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple.h59
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple_dll.pro19
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple.h58
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple_lib.pro14
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/simple_app.pro12
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple.h59
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple_dll.pro20
-rw-r--r--tests/auto/qmake/testdata/subdirs/subdirs.pro6
-rw-r--r--tests/auto/qmake/testdata/variables/variables.pro14
-rw-r--r--tests/auto/qmake/tst_qmake.cpp437
-rw-r--r--tests/auto/qmap/.gitignore1
-rw-r--r--tests/auto/qmap/qmap.pro8
-rw-r--r--tests/auto/qmap/tst_qmap.cpp852
-rw-r--r--tests/auto/qmdiarea/.gitignore1
-rw-r--r--tests/auto/qmdiarea/qmdiarea.pro9
-rw-r--r--tests/auto/qmdiarea/tst_qmdiarea.cpp2700
-rw-r--r--tests/auto/qmdisubwindow/.gitignore1
-rw-r--r--tests/auto/qmdisubwindow/qmdisubwindow.pro6
-rw-r--r--tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp2025
-rw-r--r--tests/auto/qmenu/.gitignore1
-rw-r--r--tests/auto/qmenu/qmenu.pro7
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp683
-rw-r--r--tests/auto/qmenubar/.gitignore1
-rw-r--r--tests/auto/qmenubar/qmenubar.pro6
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp1567
-rw-r--r--tests/auto/qmessagebox/.gitignore1
-rw-r--r--tests/auto/qmessagebox/qmessagebox.pro16
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp718
-rw-r--r--tests/auto/qmetaobject/.gitignore1
-rw-r--r--tests/auto/qmetaobject/qmetaobject.pro5
-rw-r--r--tests/auto/qmetaobject/tst_qmetaobject.cpp791
-rw-r--r--tests/auto/qmetatype/.gitignore1
-rw-r--r--tests/auto/qmetatype/qmetatype.pro6
-rw-r--r--tests/auto/qmetatype/tst_qmetatype.cpp314
-rw-r--r--tests/auto/qmouseevent/.gitignore1
-rw-r--r--tests/auto/qmouseevent/qmouseevent.pro5
-rw-r--r--tests/auto/qmouseevent/tst_qmouseevent.cpp291
-rw-r--r--tests/auto/qmouseevent_modal/.gitignore1
-rw-r--r--tests/auto/qmouseevent_modal/qmouseevent_modal.pro5
-rw-r--r--tests/auto/qmouseevent_modal/tst_qmouseevent_modal.cpp227
-rw-r--r--tests/auto/qmovie/.gitignore1
-rw-r--r--tests/auto/qmovie/animations/comicsecard.gifbin0 -> 12112 bytes-rw-r--r--tests/auto/qmovie/animations/dutch.mngbin0 -> 18534 bytes-rw-r--r--tests/auto/qmovie/animations/trolltech.gifbin0 -> 70228 bytes-rw-r--r--tests/auto/qmovie/qmovie.pro14
-rw-r--r--tests/auto/qmovie/tst_qmovie.cpp217
-rw-r--r--tests/auto/qmultiscreen/.gitignore1
-rw-r--r--tests/auto/qmultiscreen/qmultiscreen.pro5
-rw-r--r--tests/auto/qmultiscreen/tst_qmultiscreen.cpp172
-rw-r--r--tests/auto/qmutex/.gitignore1
-rw-r--r--tests/auto/qmutex/qmutex.pro5
-rw-r--r--tests/auto/qmutex/tst_qmutex.cpp468
-rw-r--r--tests/auto/qmutexlocker/.gitignore1
-rw-r--r--tests/auto/qmutexlocker/qmutexlocker.pro5
-rw-r--r--tests/auto/qmutexlocker/tst_qmutexlocker.cpp240
-rw-r--r--tests/auto/qnativesocketengine/.gitignore1
-rw-r--r--tests/auto/qnativesocketengine/qnativesocketengine.pro10
-rw-r--r--tests/auto/qnativesocketengine/qsocketengine.pri19
-rw-r--r--tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp700
-rw-r--r--tests/auto/qnetworkaddressentry/.gitignore1
-rw-r--r--tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro4
-rw-r--r--tests/auto/qnetworkaddressentry/tst_qnetworkaddressentry.cpp185
-rw-r--r--tests/auto/qnetworkcachemetadata/.gitignore1
-rw-r--r--tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro5
-rw-r--r--tests/auto/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp373
-rw-r--r--tests/auto/qnetworkcookie/.gitignore1
-rw-r--r--tests/auto/qnetworkcookie/qnetworkcookie.pro4
-rw-r--r--tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp434
-rw-r--r--tests/auto/qnetworkcookiejar/.gitignore1
-rw-r--r--tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro4
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp280
-rw-r--r--tests/auto/qnetworkdiskcache/.gitignore1
-rw-r--r--tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro5
-rw-r--r--tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp603
-rw-r--r--tests/auto/qnetworkinterface/.gitignore1
-rw-r--r--tests/auto/qnetworkinterface/qnetworkinterface.pro6
-rw-r--r--tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp214
-rw-r--r--tests/auto/qnetworkproxy/.gitignore1
-rw-r--r--tests/auto/qnetworkproxy/qnetworkproxy.pro10
-rw-r--r--tests/auto/qnetworkproxy/tst_qnetworkproxy.cpp85
-rw-r--r--tests/auto/qnetworkreply/.gitattributes2
-rw-r--r--tests/auto/qnetworkreply/.gitignore3
-rw-r--r--tests/auto/qnetworkreply/bigfile17980
-rw-r--r--tests/auto/qnetworkreply/echo/echo.pro6
-rw-r--r--tests/auto/qnetworkreply/echo/main.cpp62
-rw-r--r--tests/auto/qnetworkreply/empty0
-rw-r--r--tests/auto/qnetworkreply/qnetworkreply.pro4
-rw-r--r--tests/auto/qnetworkreply/qnetworkreply.qrc5
-rw-r--r--tests/auto/qnetworkreply/resource283
-rw-r--r--tests/auto/qnetworkreply/rfc3252.txt899
-rw-r--r--tests/auto/qnetworkreply/test/test.pro22
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp2971
-rw-r--r--tests/auto/qnetworkrequest/.gitignore1
-rw-r--r--tests/auto/qnetworkrequest/qnetworkrequest.pro4
-rw-r--r--tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp480
-rw-r--r--tests/auto/qnumeric/.gitignore1
-rw-r--r--tests/auto/qnumeric/qnumeric.pro7
-rw-r--r--tests/auto/qnumeric/tst_qnumeric.cpp119
-rw-r--r--tests/auto/qobject/.gitignore3
-rw-r--r--tests/auto/qobject/qobject.pro4
-rw-r--r--tests/auto/qobject/signalbug.cpp151
-rw-r--r--tests/auto/qobject/signalbug.h103
-rw-r--r--tests/auto/qobject/signalbug.pro19
-rw-r--r--tests/auto/qobject/tst_qobject.cpp2793
-rw-r--r--tests/auto/qobject/tst_qobject.pro12
-rw-r--r--tests/auto/qobjectperformance/.gitignore1
-rw-r--r--tests/auto/qobjectperformance/qobjectperformance.pro6
-rw-r--r--tests/auto/qobjectperformance/tst_qobjectperformance.cpp126
-rw-r--r--tests/auto/qobjectrace/.gitignore1
-rw-r--r--tests/auto/qobjectrace/qobjectrace.pro6
-rw-r--r--tests/auto/qobjectrace/tst_qobjectrace.cpp151
-rw-r--r--tests/auto/qpaintengine/.gitignore1
-rw-r--r--tests/auto/qpaintengine/qpaintengine.pro9
-rw-r--r--tests/auto/qpaintengine/tst_qpaintengine.cpp99
-rw-r--r--tests/auto/qpainter/.gitignore2
-rw-r--r--tests/auto/qpainter/drawEllipse/10x10SizeAt0x0.pngbin0 -> 243 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/10x10SizeAt100x100.pngbin0 -> 245 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/10x10SizeAt200x200.pngbin0 -> 195 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/13x100SizeAt0x0.pngbin0 -> 461 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/13x100SizeAt100x100.pngbin0 -> 470 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/13x100SizeAt200x200.pngbin0 -> 195 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/200x200SizeAt0x0.pngbin0 -> 1294 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/200x200SizeAt100x100.pngbin0 -> 619 bytes-rw-r--r--tests/auto/qpainter/drawEllipse/200x200SizeAt200x200.pngbin0 -> 195 bytes-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/dst.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_AndNotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_AndROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_ClearROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_CopyROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NandROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NopROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NotAndROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NotCopyROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NotOrROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_NotXorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_OrNotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_OrROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_SetROP.xbm6
-rw-r--r--tests/auto/qpainter/drawLine_rop_bitmap/res/res_XorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop/dst1.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/dst2.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/dst3.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP0.pngbin0 -> 214 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP1.pngbin0 -> 247 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP2.pngbin0 -> 258 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP3.pngbin0 -> 253 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP4.pngbin0 -> 237 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP5.pngbin0 -> 260 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP6.pngbin0 -> 258 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndNotROP7.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP0.pngbin0 -> 173 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP1.pngbin0 -> 203 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP2.pngbin0 -> 217 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP3.pngbin0 -> 207 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP4.pngbin0 -> 196 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP5.pngbin0 -> 213 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP6.pngbin0 -> 218 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_AndROP7.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP0.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP1.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP2.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP3.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP4.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP5.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP6.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_ClearROP7.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP0.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP1.pngbin0 -> 176 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP2.pngbin0 -> 175 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP3.pngbin0 -> 177 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP4.pngbin0 -> 176 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP5.pngbin0 -> 176 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP6.pngbin0 -> 176 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_CopyROP7.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP0.pngbin0 -> 217 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP1.pngbin0 -> 242 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP2.pngbin0 -> 249 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP3.pngbin0 -> 244 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP4.pngbin0 -> 234 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP5.pngbin0 -> 254 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP6.pngbin0 -> 251 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NandROP7.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP0.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP1.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP2.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP3.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP4.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP5.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP6.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NopROP7.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP0.pngbin0 -> 211 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP1.pngbin0 -> 208 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP2.pngbin0 -> 215 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP3.pngbin0 -> 187 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP4.pngbin0 -> 213 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP5.pngbin0 -> 204 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP6.pngbin0 -> 198 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NorROP7.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP0.pngbin0 -> 177 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP1.pngbin0 -> 198 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP2.pngbin0 -> 195 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP3.pngbin0 -> 185 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP4.pngbin0 -> 188 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP5.pngbin0 -> 198 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP6.pngbin0 -> 185 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotAndROP7.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP0.pngbin0 -> 168 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP1.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP2.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP3.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP4.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP5.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP6.pngbin0 -> 167 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotCopyROP7.pngbin0 -> 155 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP0.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP1.pngbin0 -> 224 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP2.pngbin0 -> 229 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP3.pngbin0 -> 224 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP4.pngbin0 -> 198 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP5.pngbin0 -> 229 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP6.pngbin0 -> 227 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotOrROP7.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP0.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP1.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP2.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP3.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP4.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP5.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP6.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotROP7.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP0.pngbin0 -> 239 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP1.pngbin0 -> 237 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP2.pngbin0 -> 243 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP3.pngbin0 -> 226 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP4.pngbin0 -> 235 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP5.pngbin0 -> 230 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP6.pngbin0 -> 232 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_NotXorROP7.pngbin0 -> 184 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP0.pngbin0 -> 217 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP1.pngbin0 -> 213 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP2.pngbin0 -> 222 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP3.pngbin0 -> 194 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP4.pngbin0 -> 219 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP5.pngbin0 -> 215 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP6.pngbin0 -> 212 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrNotROP7.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP0.pngbin0 -> 186 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP1.pngbin0 -> 212 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP2.pngbin0 -> 216 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP3.pngbin0 -> 194 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP4.pngbin0 -> 207 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP5.pngbin0 -> 214 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP6.pngbin0 -> 208 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_OrROP7.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP0.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP1.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP2.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP3.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP4.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP5.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP6.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_SetROP7.pngbin0 -> 169 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP0.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP1.pngbin0 -> 255 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP2.pngbin0 -> 260 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP3.pngbin0 -> 251 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP4.pngbin0 -> 251 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP5.pngbin0 -> 261 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP6.pngbin0 -> 264 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/res/res_XorROP7.pngbin0 -> 228 bytes-rw-r--r--tests/auto/qpainter/drawPixmap_rop/src1.xbm12
-rw-r--r--tests/auto/qpainter/drawPixmap_rop/src2-mask.xbm16
-rw-r--r--tests/auto/qpainter/drawPixmap_rop/src2.xbm16
-rw-r--r--tests/auto/qpainter/drawPixmap_rop/src3.xbm12
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/dst.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_AndNotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_AndROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_ClearROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_CopyROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NandROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NopROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NotAndROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NotCopyROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NotOrROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_NotXorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_OrNotROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_OrROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_SetROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/res/res_XorROP.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/src1-mask.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/src1.xbm6
-rw-r--r--tests/auto/qpainter/drawPixmap_rop_bitmap/src2.xbm5
-rw-r--r--tests/auto/qpainter/qpainter.pro13
-rw-r--r--tests/auto/qpainter/task217400.pngbin0 -> 526 bytes-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp4073
-rw-r--r--tests/auto/qpainter/utils/createImages/createImages.pro11
-rw-r--r--tests/auto/qpainter/utils/createImages/main.cpp194
-rw-r--r--tests/auto/qpainterpath/.gitignore2
-rw-r--r--tests/auto/qpainterpath/qpainterpath.pro5
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp1214
-rw-r--r--tests/auto/qpainterpathstroker/.gitignore1
-rw-r--r--tests/auto/qpainterpathstroker/qpainterpathstroker.pro5
-rw-r--r--tests/auto/qpainterpathstroker/tst_qpainterpathstroker.cpp75
-rw-r--r--tests/auto/qpalette/.gitignore1
-rw-r--r--tests/auto/qpalette/qpalette.pro5
-rw-r--r--tests/auto/qpalette/tst_qpalette.cpp132
-rw-r--r--tests/auto/qpathclipper/.gitignore1
-rw-r--r--tests/auto/qpathclipper/paths.cpp734
-rw-r--r--tests/auto/qpathclipper/paths.h95
-rw-r--r--tests/auto/qpathclipper/qpathclipper.pro8
-rw-r--r--tests/auto/qpathclipper/tst_qpathclipper.cpp1403
-rw-r--r--tests/auto/qpen/.gitignore1
-rw-r--r--tests/auto/qpen/qpen.pro5
-rw-r--r--tests/auto/qpen/tst_qpen.cpp218
-rw-r--r--tests/auto/qpicture/.gitignore1
-rw-r--r--tests/auto/qpicture/qpicture.pro5
-rw-r--r--tests/auto/qpicture/tst_qpicture.cpp278
-rw-r--r--tests/auto/qpixmap/.gitignore1
-rw-r--r--tests/auto/qpixmap/convertFromImage/task31722_0/img1.pngbin0 -> 26622 bytes-rw-r--r--tests/auto/qpixmap/convertFromImage/task31722_0/img2.pngbin0 -> 149 bytes-rw-r--r--tests/auto/qpixmap/convertFromImage/task31722_1/img1.pngbin0 -> 26532 bytes-rw-r--r--tests/auto/qpixmap/convertFromImage/task31722_1/img2.pngbin0 -> 160 bytes-rw-r--r--tests/auto/qpixmap/images/designer.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-10_dy_-10_50_50_100_100.pngbin0 -> 4385 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-10_dy_-10_x_y_w_h.pngbin0 -> 4104 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-10_dy_0_50_50_100_100.pngbin0 -> 4243 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-10_dy_0_x_y_w_h.pngbin0 -> 4116 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-128_dy_-128_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_-128_dy_0_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_-10_50_50_100_100.pngbin0 -> 4367 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_-10_x_y_w_h.pngbin0 -> 4157 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_-128_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_0_50_50_100_100.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_0_null.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_0_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_10_50_50_100_100.pngbin0 -> 4271 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_10_x_y_w_h.pngbin0 -> 4188 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_128_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_0_dy_1_null.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_10_dy_0_50_50_100_100.pngbin0 -> 4248 bytes-rw-r--r--tests/auto/qpixmap/images/dx_10_dy_0_x_y_w_h.pngbin0 -> 4196 bytes-rw-r--r--tests/auto/qpixmap/images/dx_10_dy_10_50_50_100_100.pngbin0 -> 4243 bytes-rw-r--r--tests/auto/qpixmap/images/dx_10_dy_10_x_y_w_h.pngbin0 -> 4220 bytes-rw-r--r--tests/auto/qpixmap/images/dx_128_dy_0_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_128_dy_128_64_64_128_128.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_128_dy_128_x_y_w_h.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/images/dx_1_dy_0_null.pngbin0 -> 4282 bytes-rw-r--r--tests/auto/qpixmap/qpixmap.pro16
-rw-r--r--tests/auto/qpixmap/qpixmap.qrc29
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp1115
-rw-r--r--tests/auto/qpixmapcache/.gitignore1
-rw-r--r--tests/auto/qpixmapcache/qpixmapcache.pro5
-rw-r--r--tests/auto/qpixmapcache/tst_qpixmapcache.cpp220
-rw-r--r--tests/auto/qpixmapfilter/noise.pngbin0 -> 7517 bytes-rw-r--r--tests/auto/qpixmapfilter/qpixmapfilter.pro9
-rw-r--r--tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp382
-rw-r--r--tests/auto/qplaintextedit/.gitignore1
-rw-r--r--tests/auto/qplaintextedit/qplaintextedit.pro7
-rw-r--r--tests/auto/qplaintextedit/tst_qplaintextedit.cpp1475
-rw-r--r--tests/auto/qplugin/.gitignore2
-rw-r--r--tests/auto/qplugin/debugplugin/debugplugin.pro7
-rw-r--r--tests/auto/qplugin/debugplugin/main.cpp43
-rw-r--r--tests/auto/qplugin/qplugin.pro26
-rw-r--r--tests/auto/qplugin/releaseplugin/main.cpp43
-rw-r--r--tests/auto/qplugin/releaseplugin/releaseplugin.pro7
-rw-r--r--tests/auto/qplugin/tst_qplugin.cpp120
-rw-r--r--tests/auto/qplugin/tst_qplugin.pro10
-rw-r--r--tests/auto/qpluginloader/.gitignore2
-rw-r--r--tests/auto/qpluginloader/almostplugin/almostplugin.cpp51
-rw-r--r--tests/auto/qpluginloader/almostplugin/almostplugin.h57
-rw-r--r--tests/auto/qpluginloader/almostplugin/almostplugin.pro7
-rw-r--r--tests/auto/qpluginloader/lib/lib.pro15
-rw-r--r--tests/auto/qpluginloader/lib/mylib.c19
-rw-r--r--tests/auto/qpluginloader/qpluginloader.pro12
-rw-r--r--tests/auto/qpluginloader/theplugin/plugininterface.h51
-rw-r--r--tests/auto/qpluginloader/theplugin/theplugin.cpp51
-rw-r--r--tests/auto/qpluginloader/theplugin/theplugin.h57
-rw-r--r--tests/auto/qpluginloader/theplugin/theplugin.pro7
-rw-r--r--tests/auto/qpluginloader/tst/tst.pro20
-rw-r--r--tests/auto/qpluginloader/tst_qpluginloader.cpp291
-rw-r--r--tests/auto/qpoint/.gitignore1
-rw-r--r--tests/auto/qpoint/qpoint.pro10
-rw-r--r--tests/auto/qpoint/tst_qpoint.cpp131
-rw-r--r--tests/auto/qpointarray/.gitignore1
-rw-r--r--tests/auto/qpointarray/qpointarray.pro6
-rw-r--r--tests/auto/qpointarray/tst_qpointarray.cpp95
-rw-r--r--tests/auto/qpointer/.gitignore1
-rw-r--r--tests/auto/qpointer/qpointer.pro4
-rw-r--r--tests/auto/qpointer/tst_qpointer.cpp349
-rw-r--r--tests/auto/qprinter/.gitignore4
-rw-r--r--tests/auto/qprinter/qprinter.pro8
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp964
-rw-r--r--tests/auto/qprinterinfo/.gitignore1
-rw-r--r--tests/auto/qprinterinfo/qprinterinfo.pro7
-rw-r--r--tests/auto/qprinterinfo/tst_qprinterinfo.cpp398
-rw-r--r--tests/auto/qprocess/.gitignore22
-rw-r--r--tests/auto/qprocess/fileWriterProcess/fileWriterProcess.pro10
-rw-r--r--tests/auto/qprocess/fileWriterProcess/main.cpp59
-rw-r--r--tests/auto/qprocess/qprocess.pro28
-rw-r--r--tests/auto/qprocess/test/test.pro49
-rwxr-xr-xtests/auto/qprocess/testBatFiles/simple.bat2
-rwxr-xr-xtests/auto/qprocess/testBatFiles/with space.bat2
-rw-r--r--tests/auto/qprocess/testDetached/main.cpp84
-rw-r--r--tests/auto/qprocess/testDetached/testDetached.pro7
-rw-r--r--tests/auto/qprocess/testExitCodes/main.cpp48
-rw-r--r--tests/auto/qprocess/testExitCodes/testExitCodes.pro5
-rw-r--r--tests/auto/qprocess/testGuiProcess/main.cpp57
-rw-r--r--tests/auto/qprocess/testGuiProcess/testGuiProcess.pro4
-rw-r--r--tests/auto/qprocess/testProcessCrash/main.cpp53
-rw-r--r--tests/auto/qprocess/testProcessCrash/testProcessCrash.pro8
-rw-r--r--tests/auto/qprocess/testProcessDeadWhileReading/main.cpp52
-rw-r--r--tests/auto/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro10
-rw-r--r--tests/auto/qprocess/testProcessEOF/main.cpp58
-rw-r--r--tests/auto/qprocess/testProcessEOF/testProcessEOF.pro9
-rw-r--r--tests/auto/qprocess/testProcessEcho/main.cpp59
-rw-r--r--tests/auto/qprocess/testProcessEcho/testProcessEcho.pro8
-rw-r--r--tests/auto/qprocess/testProcessEcho2/main.cpp58
-rw-r--r--tests/auto/qprocess/testProcessEcho2/testProcessEcho2.pro10
-rw-r--r--tests/auto/qprocess/testProcessEcho3/main.cpp61
-rw-r--r--tests/auto/qprocess/testProcessEcho3/testProcessEcho3.pro9
-rw-r--r--tests/auto/qprocess/testProcessEchoGui/main_win.cpp67
-rw-r--r--tests/auto/qprocess/testProcessEchoGui/testProcessEchoGui.pro13
-rw-r--r--tests/auto/qprocess/testProcessEnvironment/main.cpp27
-rw-r--r--tests/auto/qprocess/testProcessEnvironment/testProcessEnvironment.pro12
-rw-r--r--tests/auto/qprocess/testProcessLoopback/main.cpp57
-rw-r--r--tests/auto/qprocess/testProcessLoopback/testProcessLoopback.pro8
-rw-r--r--tests/auto/qprocess/testProcessNormal/main.cpp46
-rw-r--r--tests/auto/qprocess/testProcessNormal/testProcessNormal.pro9
-rw-r--r--tests/auto/qprocess/testProcessOutput/main.cpp56
-rw-r--r--tests/auto/qprocess/testProcessOutput/testProcessOutput.pro9
-rw-r--r--tests/auto/qprocess/testProcessSpacesArgs/main.cpp54
-rw-r--r--tests/auto/qprocess/testProcessSpacesArgs/nospace.pro9
-rw-r--r--tests/auto/qprocess/testProcessSpacesArgs/onespace.pro11
-rw-r--r--tests/auto/qprocess/testProcessSpacesArgs/twospaces.pro12
-rw-r--r--tests/auto/qprocess/testSetWorkingDirectory/main.cpp51
-rw-r--r--tests/auto/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro7
-rw-r--r--tests/auto/qprocess/testSoftExit/main_unix.cpp62
-rw-r--r--tests/auto/qprocess/testSoftExit/main_win.cpp58
-rw-r--r--tests/auto/qprocess/testSoftExit/testSoftExit.pro16
-rw-r--r--tests/auto/qprocess/testSpaceInName/main.cpp56
-rw-r--r--tests/auto/qprocess/testSpaceInName/testSpaceInName.pro13
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp2110
-rw-r--r--tests/auto/qprogressbar/.gitignore1
-rw-r--r--tests/auto/qprogressbar/qprogressbar.pro5
-rw-r--r--tests/auto/qprogressbar/tst_qprogressbar.cpp244
-rw-r--r--tests/auto/qprogressdialog/.gitignore1
-rw-r--r--tests/auto/qprogressdialog/qprogressdialog.pro9
-rw-r--r--tests/auto/qprogressdialog/tst_qprogressdialog.cpp157
-rw-r--r--tests/auto/qpushbutton/.gitignore1
-rw-r--r--tests/auto/qpushbutton/qpushbutton.pro5
-rw-r--r--tests/auto/qpushbutton/testdata/setEnabled/disabled_Windows_win32_data0.qsnapbin0 -> 890 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setEnabled/enabled_Motif_data0.qsnapbin0 -> 758 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setEnabled/enabled_Windows_data0.qsnapbin0 -> 725 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setEnabled/enabled_Windows_win32_data0.qsnapbin0 -> 735 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setPixmap/Vpix_Motif_data0.qsnapbin0 -> 829 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setPixmap/Vpix_Windows_data0.qsnapbin0 -> 796 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setPixmap/Vpix_Windows_win32_data0.qsnapbin0 -> 796 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setText/simple_Motif_data0.qsnapbin0 -> 742 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setText/simple_Windows_data0.qsnapbin0 -> 709 bytes-rw-r--r--tests/auto/qpushbutton/testdata/setText/simple_Windows_win32_data0.qsnapbin0 -> 719 bytes-rw-r--r--tests/auto/qpushbutton/tst_qpushbutton.cpp598
-rw-r--r--tests/auto/qqueue/.gitignore1
-rw-r--r--tests/auto/qqueue/qqueue.pro7
-rwxr-xr-xtests/auto/qqueue/tst_qqueue.cpp100
-rw-r--r--tests/auto/qradiobutton/.gitignore1
-rw-r--r--tests/auto/qradiobutton/qradiobutton.pro5
-rw-r--r--tests/auto/qradiobutton/tst_qradiobutton.cpp102
-rw-r--r--tests/auto/qrand/.gitignore1
-rw-r--r--tests/auto/qrand/qrand.pro5
-rw-r--r--tests/auto/qrand/tst_qrand.cpp87
-rw-r--r--tests/auto/qreadlocker/.gitignore1
-rw-r--r--tests/auto/qreadlocker/qreadlocker.pro5
-rw-r--r--tests/auto/qreadlocker/tst_qreadlocker.cpp235
-rw-r--r--tests/auto/qreadwritelock/.gitignore1
-rw-r--r--tests/auto/qreadwritelock/qreadwritelock.pro5
-rw-r--r--tests/auto/qreadwritelock/tst_qreadwritelock.cpp1125
-rw-r--r--tests/auto/qrect/.gitignore1
-rw-r--r--tests/auto/qrect/qrect.pro5
-rw-r--r--tests/auto/qrect/tst_qrect.cpp4470
-rw-r--r--tests/auto/qregexp/.gitignore1
-rw-r--r--tests/auto/qregexp/qregexp.pro8
-rw-r--r--tests/auto/qregexp/tst_qregexp.cpp1282
-rw-r--r--tests/auto/qregexpvalidator/.gitignore1
-rw-r--r--tests/auto/qregexpvalidator/qregexpvalidator.pro4
-rw-r--r--tests/auto/qregexpvalidator/tst_qregexpvalidator.cpp124
-rw-r--r--tests/auto/qregion/.gitignore1
-rw-r--r--tests/auto/qregion/qregion.pro5
-rw-r--r--tests/auto/qregion/tst_qregion.cpp1021
-rw-r--r--tests/auto/qresourceengine/.gitattributes1
-rw-r--r--tests/auto/qresourceengine/.gitignore1
-rw-r--r--tests/auto/qresourceengine/parentdir.txt1
-rw-r--r--tests/auto/qresourceengine/qresourceengine.pro40
-rw-r--r--tests/auto/qresourceengine/testqrc/aliasdir/aliasdir.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/aliasdir/compressme.txt322
-rw-r--r--tests/auto/qresourceengine/testqrc/blahblah.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/currentdir.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/currentdir2.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/otherdir/otherdir.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/search_file.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/searchpath1/search_file.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/searchpath2/search_file.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/subdir/subdir.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/test.qrc30
-rw-r--r--tests/auto/qresourceengine/testqrc/test/german.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/test/test/test1.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/test/test/test2.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/test/testdir.txt1
-rw-r--r--tests/auto/qresourceengine/testqrc/test/testdir2.txt1
-rw-r--r--tests/auto/qresourceengine/tst_resourceengine.cpp461
-rw-r--r--tests/auto/qscriptable/.gitignore1
-rw-r--r--tests/auto/qscriptable/qscriptable.pro5
-rw-r--r--tests/auto/qscriptable/tst_qscriptable.cpp373
-rw-r--r--tests/auto/qscriptclass/.gitignore1
-rw-r--r--tests/auto/qscriptclass/qscriptclass.pro3
-rw-r--r--tests/auto/qscriptclass/tst_qscriptclass.cpp838
-rw-r--r--tests/auto/qscriptcontext/.gitignore1
-rw-r--r--tests/auto/qscriptcontext/qscriptcontext.pro5
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp691
-rw-r--r--tests/auto/qscriptcontextinfo/.gitignore1
-rw-r--r--tests/auto/qscriptcontextinfo/qscriptcontextinfo.pro5
-rw-r--r--tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp557
-rw-r--r--tests/auto/qscriptengine/.gitignore1
-rw-r--r--tests/auto/qscriptengine/qscriptengine.pro10
-rw-r--r--tests/auto/qscriptengine/script/com/__init__.js5
-rw-r--r--tests/auto/qscriptengine/script/com/trolltech/__init__.js5
-rw-r--r--tests/auto/qscriptengine/script/com/trolltech/recursive/__init__.js1
-rw-r--r--tests/auto/qscriptengine/script/com/trolltech/syntaxerror/__init__.js5
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp3379
-rw-r--r--tests/auto/qscriptengineagent/.gitignore1
-rw-r--r--tests/auto/qscriptengineagent/qscriptengineagent.pro5
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp1819
-rw-r--r--tests/auto/qscriptenginedebugger/.gitignore1
-rw-r--r--tests/auto/qscriptenginedebugger/qscriptenginedebugger.pro3
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp744
-rw-r--r--tests/auto/qscriptjstestsuite/.gitignore1
-rw-r--r--tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro11
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4-1.js135
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4-2.js114
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.1.1.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.1.2.js162
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.1.3.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.1.js132
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.1-1.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.1-2.js101
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.1-3.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.2-1.js183
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.2-2.js118
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.2.3.js101
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.3.1-2.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.3.2.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.1.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.2.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.3-1.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.4-1.js294
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.4-2.js169
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.5-1.js225
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.5-2.js227
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.5-3.js182
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.4.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.5.1-1.js170
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.5.1-2.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.5.2-1.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/15.4.5.2-2.js127
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Array/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.1.js96
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.2.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.3.1-1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.3.1-2.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.3.1-3.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.3.1-4.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.3.1.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4-1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.1.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.2-1.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.2-2.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.2-3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.2-4-n.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.3-1.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.3-2.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.3-3.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.3-4-n.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.3.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/15.6.4.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Boolean/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.1.1-1.js96
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.1.1-2.js91
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.1.13-1.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.1.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-1.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-3.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-4.js68
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-5.js68
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.2.2-6.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.1-1.js239
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.1-2.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.1-3.js141
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.1-4.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.1-5.js140
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.2-1.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.2-2.js142
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.2-3.js146
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.2-4.js143
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.2-5.js140
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.8-1.js155
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.8-2.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.8-3.js160
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.8-4.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.3.8-5.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.4.2-1.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.4.2.js191
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.4.3.js186
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.1.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-1.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-10.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-11.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-12.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-13.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-2.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-3.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-4.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-5.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-6.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-7.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-8.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.10-9.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-1.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-2.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-3.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-4.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-5.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-6.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.11-7.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-1.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-2.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-3.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-4.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-5.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-6.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-7.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.12-8.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-1.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-2.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-3.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-4.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-5.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-6.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-7.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.13-8.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.14.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.15.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.16.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.17.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.18.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.19.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.2-1.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.2-2-n.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.2.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.20.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-1.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-3.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-4.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-5.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-6.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-7.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.21-8.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-1.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-2.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-3.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-4.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-5.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-6.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-7.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.22-8.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-1.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-10.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-11.js140
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-12.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-13.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-14.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-15.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-16.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-17.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-18.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-2.js109
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-3-n.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-4.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-5.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-6.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-7.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-8.js103
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.23-9.js103
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-1.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-2.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-3.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-4.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-5.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-6.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-7.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.24-8.js133
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.25-1.js174
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.26-1.js183
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.27-1.js183
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.28-1.js196
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.29-1.js191
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.3-1-n.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.3-2.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.30-1.js192
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.31-1.js221
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.32-1.js141
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.33-1.js145
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.34-1.js182
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.35-1.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-1.js165
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-2.js164
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-3.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-4.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-5.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-6.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.36-7.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.37-1.js173
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.37-2.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.37-3.js164
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.37-4.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.37-5.js159
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.4-1.js93
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.4-2-n.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.5.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.6.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.7.js105
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.8.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.9.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/15.9.5.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Date/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.3-1.js107
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.3-2.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.3.js170
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-1.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-10.js105
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-2.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-3.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-4.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-5.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-6.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-7.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.4-8.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.5-1.js118
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.5-2.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.5-3.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.5-4.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.8-2.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.1.8-3.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.2.1.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.2.2-1.js122
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.2.2-2.js133
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.2.3-1.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/10.2.3-2.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ExecutionContexts/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.1.1.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.10-1.js270
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.10-2.js269
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.10-3.js268
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.12-1.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.12-2-n.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.12-3.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.12-4.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.2-1.js231
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.2-2.js253
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.2-3.js300
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.2-4.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.2-5.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.13.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.14-1.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.1-1.js272
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.1-2.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.1-3-n.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.1-4-n.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.1-5.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-1-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-1.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-10-n.js102
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-11.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-2-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-3-n.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-4-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-5-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-6-n.js103
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-7-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-8-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.2-9-n.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.3-1.js125
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.3-2-n.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.3-3-n.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.3-4-n.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.2.3-5.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.3.1.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.3.2.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.1.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.2.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.3.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.4.js156
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.5.js154
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.6.js299
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-01.js299
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.8.js215
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.9.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.5.1.js115
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.5.2.js154
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.5.3.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.6.1-1.js160
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.6.1-2.js164
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.6.1-3.js150
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.6.2-1.js165
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.6.3.js115
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.7.1.js228
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.7.2.js246
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.7.3.js230
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.8.1.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.8.2.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.8.3.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.8.4.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.9.1.js159
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.9.2.js159
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.9.3.js159
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Expressions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.1.1-1.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.1.1-2.js183
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.1.1-3.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.2.1-1.js132
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.2.1-2.js107
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.2.1-3.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.3.1-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.3.1-3.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.3.1-4.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.3.2.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.4-1.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.4.1.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.4.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.5-1.js117
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.5-2.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.5.1.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/15.3.5.3.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/FunctionObjects/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1-1-n.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1-2-n.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.1.1.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.1.2.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.1-2.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.2-1.js410
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.2-2.js238
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.3-1.js441
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.3-2.js291
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.4.js205
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.5-1.js206
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.5-2.js183
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.5-3.js207
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.6.js125
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/15.1.2.7.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/GlobalObject/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.1-1.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.1-2.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.1-3.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-1.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-2-n.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-3-n.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-4-n.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-5-n.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.2-6.js68
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-1.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-10.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-11.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-12.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-13-n.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-2.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-4.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-5.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-6.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-7.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-8.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.3-9.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.1-1-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.1-2-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.1-3-n.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-1-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-10-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-11-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-12-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-13-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-14-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-15-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-16-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-2-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-3-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-4-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-5-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-6-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-7-n.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-8-n.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.2-9-n.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-1-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-10-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-11-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-12-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-13-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-14-n.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-15-n.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-16-n.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-2-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-3-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-4-n.js96
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-5-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-6-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-7-n.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-8-n.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.4.3-9-n.js98
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-1.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-10-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-2-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-3-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-4-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-5-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-6.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-7.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-8-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.5-9-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.6.js313
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.2.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.3-1.js198
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.3-2.js93
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.3.js331
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.7.4.js269
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/7.8.2-n.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/LexicalConventions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8-2-n.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8-3-n.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.1-1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.1-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.2-1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.2-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.3-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.3-2.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.4-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.4-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.5-1.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.5-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.6-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.6-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.7-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.7-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.8-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.8-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.8-3.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.1.js149
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.1.js226
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.10.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.11.js200
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.12.js177
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.13.js385
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.14.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.15.js202
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.16.js132
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.17.js217
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.18.js165
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.2.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.3.js158
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.4.js156
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.5.js244
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.6.js232
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.7.js283
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.8.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/15.8.2.9.js191
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Math/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/NativeObjects/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/NativeObjects/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.1.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.2.js168
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.1-1.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.1-2.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.1-3.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.2-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.2-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.2-3.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.2-4.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.3-1.js68
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.3-2.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.3-3.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.3-4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.4-1.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.4-2.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.4-3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.4-4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.5-1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.5-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.5-3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.5-4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.6-1.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.6-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.6-3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.6-4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.3.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4-1.js60
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.1.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.2-1.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.2-2-n.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.2-3-n.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.2-4.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.3-1.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.3-2.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/15.7.4.3-3-n.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Number/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.1.1.js146
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.1.2.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.2.1.js138
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.2.2.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3-1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3.1-1.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3.1-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3.1-3.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3.1-4.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.3.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.4.1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.4.2.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/15.2.4.3.js117
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/ObjectObjects/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma/README1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/SourceText/6-1.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/SourceText/6-2.js131
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/SourceText/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/SourceText/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.10-1.js151
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.10.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.2-1.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.5-1.js102
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.5-2.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.1-1.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-1.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-2.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-3.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-4.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-5.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-6.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-7.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-8.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.2-9-n.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-1.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-10.js115
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-11.js98
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-12.js103
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-19.js117
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-2.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-3.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-4.js202
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-5-n.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-6-n.js109
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-7-n.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-8-n.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.6.3-9-n.js109
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.7-1-n.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.8-1-n.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/12.9-1-n.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Statements/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.1.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.2.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.1-1.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.1-2.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.1-3.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.1-4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.2-1.js190
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.2-2.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.2-3.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.3.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.1.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.10-1.js217
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-1.js518
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-2.js515
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-3.js514
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-4.js507
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-5.js520
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.11-6.js516
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.12-1.js520
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.12-2.js518
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.12-3.js559
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.12-4.js515
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.12-5.js515
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.2-1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.2-2-n.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.2-3.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.2.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.3-1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.3-2.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.3-3-n.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.4-1.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.4-2.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.4-3.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.4-4.js124
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.5-1.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.5-2.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.5-3.js131
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.5-4.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.5-5.js106
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.6-1.js155
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.6-2.js259
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.7-1.js219
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.7-2.js217
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.8-1.js232
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.8-2.js247
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.8-3.js204
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.9-1.js202
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.4.js108
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/15.5.5.1.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/String/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.2.js138
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3-1.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-1.js323
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-2.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js743
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.4-1.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.4-2.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.5-2.js173
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.6.js140
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.7.js160
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.8.1.js167
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.9-1.js119
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Types/8.1.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Types/8.4.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Types/8.6.2.1-1.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Types/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/Types/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/browser.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/10.1.4-9.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/10.1.6.js127
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/10.1.8-1.js135
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/11.6.1-1.js145
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/11.6.1-2.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/11.6.1-3.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/11.6.2-1.js124
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15-1.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15-2.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.1.2.1-1.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.2.1.1.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.2.3-1.js64
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.2.4.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.3.1.1-1.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.3.1.1-2.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.3.2.1-1.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.3.2.1-2.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.3.3.1-1.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.4.3.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.5.3.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.5.4.2.js59
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.5.4.4-4.js107
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.5.4.5-6.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.5.4.7-3.js161
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.6.3.1-5.js58
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.6.3.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.6.4-2.js66
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.7.3.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.7.4.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.8-1.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/15.9.5.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/8.6.2.1-1.js98
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/9.9-1.js102
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/extensions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/jsref.js634
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/shell.js577
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma/template.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/boolean-001.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/boolean-002.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/date-001.js93
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/date-002.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/date-003.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/date-004.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-001.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-002.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-003.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-004.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-005.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-006.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-007.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-008.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-009.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-010-n.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/exception-011-n.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-001.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-002.js93
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-003.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-004.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-005.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-006.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-007.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-008.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-009.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-010.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-011.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-012.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-013.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-014.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-015.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-016.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-017.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/expression-019.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/function-001.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/global-001.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/global-002.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-001.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-002.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-003.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-004.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-005.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-006.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-007.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-008.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-009.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-010.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-011.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-012.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-013.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-014.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-015.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-016.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-017.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-018.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-019.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-020.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-021.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-022.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-023.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-024.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-025.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-026.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-027.js94
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-028.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-029.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-030.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-031.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-032.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-033.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-034.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-035.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-036.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-037.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-038.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-039.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-040.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-041.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-042.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-047.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-048.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-049.js82
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-050.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-051.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-052.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-053.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/lexical-054.js79
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/number-001.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/number-002.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/number-003.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-001.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-002.js102
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-003.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-004.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-005.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-006.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-007.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-008.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/statement-009.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/string-001.js86
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Exceptions/string-002.js85
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Expressions/StrictEquality-001.js106
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Expressions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Expressions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/FunctionObjects/apply-001-n.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/FunctionObjects/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/FunctionObjects/call-1.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/FunctionObjects/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/LexicalConventions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/LexicalConventions/keywords-001.js81
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/LexicalConventions/regexp-literals-001.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/LexicalConventions/regexp-literals-002.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/LexicalConventions/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/README1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/constructor-001.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/exec-001.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/exec-002.js221
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/function-001.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/hex-001.js102
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/multiline-001.js101
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/octal-001.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/octal-002.js126
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/octal-003.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/properties-001.js124
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/properties-002.js162
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/regexp-enumerate-001.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/regress-001.js78
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/RegExp/unicode-001.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-001.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-002.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-003.js96
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-004.js100
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-005.js106
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-006.js122
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/dowhile-007.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/forin-001.js330
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/forin-002.js109
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/if-001.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/label-001.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/label-002.js89
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/switch-001.js98
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/switch-002.js96
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/switch-003.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/switch-004.js127
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-001.js118
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-003.js115
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-004.js87
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-005.js90
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-006.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-007.js125
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-008.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-009.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-010.js106
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/try-012.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/while-001.js75
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/while-002.js119
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/while-003.js120
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/Statements/while-004.js250
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/match-001.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/match-002.js207
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/match-003.js165
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/match-004.js206
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/replace-001.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/split-001.js145
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/split-002.js303
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/String/split-003.js156
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/browser.js37
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/extensions/browser.js0
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/constructor-001.js74
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/function-001.js74
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-001.js144
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-002.js160
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-003-n.js121
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-004-n.js121
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-005-n.js122
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_2/extensions/instanceof-006.js119
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/extensions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/instanceof-001.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/instanceof-002.js84
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/instanceof-003.js98
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/regress-7635.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/instanceof/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/jsref.js591
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/shell.js51
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_2/template.js57
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/15.4.4.11-01.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/15.4.4.3-1.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/15.4.4.4-001.js153
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/15.4.5.1-01.js93
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-101488.js172
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-130451.js219
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-322135-01.js73
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-322135-02.js65
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-322135-03.js73
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-322135-04.js71
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-387501.js94
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-421325.js67
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Array/regress-430717.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Array/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.1.2-01.js62
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.3.2-1.js91
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.4.3.js233
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.3.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.4.js185
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.5-02.js88
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.5.js144
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.6.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/15.9.5.7.js142
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/browser.js37
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Date/shell.js564
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/15.11.1.1.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/15.11.4.4-1.js174
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/15.11.7.6-001.js130
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/15.11.7.6-002.js132
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/15.11.7.6-003.js132
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/binding-001.js128
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/regress-181654.js155
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/regress-181914.js194
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/regress-58946.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/regress-95101.js118
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Exceptions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/10.1.3-1.js201
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/10.1.3-2.js70
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/10.1.3.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/10.1.4-1.js85
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/10.6.1-01.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/regress-23346.js71
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/regress-448595-01.js91
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/ExecutionContexts/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.10-01.js76
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.10-02.js76
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.10-03.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.6.1-1.js176
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.7.1-01.js76
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.7.2-01.js76
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.7.3-01.js76
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/11.9.6-1.js213
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Expressions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/FunExpr/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/FunExpr/fe-001-n.js58
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/FunExpr/fe-001.js57
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/FunExpr/fe-002.js61
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/FunExpr/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/15.3.4.3-1.js210
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/15.3.4.4-1.js185
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/arguments-001.js169
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Function/arguments-002.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/call-001.js153
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-131964.js196
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-137181.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-193555.js136
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-313570.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-49286.js137
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-58274.js226
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-85880.js173
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-94506.js163
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/regress-97921.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/scope-001.js265
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/scope-002.js245
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Function/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/LexicalConventions/7.9.1.js157
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/LexicalConventions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/LexicalConventions/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.2-01.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.3-01.js69
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.3-02.js53
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.5-1.js145
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.6-1.js134
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.7-1.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/15.7.4.7-2.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/browser.js0
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Number/regress-442242-01.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Number/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/NumberFormatting/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/NumberFormatting/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/NumberFormatting/tostring-001.js60
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Object/8.6.1-01.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/8.6.2.6-001.js113
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/browser.js7
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/class-001.js156
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/class-002.js146
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/class-003.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/class-004.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/class-005.js124
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Object/regress-361274.js66
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Object/regress-385393-07.js67
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/regress-72773.js97
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/regress-79129-001.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Object/shell.js105
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Operators/11.13.1-001.js152
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Operators/11.13.1-002.js57
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Operators/11.4.1-001.js120
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Operators/11.4.1-002.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Operators/browser.js0
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Operators/order-01.js108
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Operators/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/README1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.2-1.js181
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.2.12.js63
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.3.1-1.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.3.1-2.js144
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.4.1-1.js127
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.4.1-2.js133
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.4.1-3.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.4.1-4.js146
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.4.1-5-n.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.6.2-1.js140
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/15.10.6.2-2.js367
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/octal-001.js136
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/octal-002.js218
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/perlstress-001.js3230
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/perlstress-002.js1842
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-100199.js307
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-105972.js157
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-119909.js92
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-122076.js110
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-123437.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-165353.js122
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-169497.js105
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-169534.js95
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-187133.js142
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-188206.js219
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-191479.js198
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-202564.js101
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-209067.js1106
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-209919.js174
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-216591.js117
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-220367-001.js104
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-223273.js279
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-223535.js133
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-224676.js232
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-225289.js176
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-225343.js125
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-24712.js59
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-285219.js51
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-28686.js57
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-289669.js88
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-307456.js54
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-309840.js58
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-311414.js101
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-312351.js50
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-31316.js96
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-330684.js53
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-334158.js58
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-346090.js63
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-367888.js62
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375642.js61
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375711.js118
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375715-01-n.js63
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375715-02.js60
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375715-03.js60
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-375715-04.js68
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-57572.js150
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-57631.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-67773.js211
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-72964.js121
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-76683.js114
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-78156.js123
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-85721.js276
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-87231.js145
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/regress-98306.js99
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/RegExp/shell.js266
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Regress/browser.js0
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Regress/regress-385393-04.js66
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Regress/regress-419152.js90
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Regress/regress-420087.js64
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Regress/regress-420610.js50
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Regress/regress-441477-01.js73
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Regress/shell.js1
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Statements/12.6.3.js80
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-121744.js217
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-131348.js184
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-157509.js111
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-194364.js152
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-226517.js112
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-302439.js1368
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-324650.js5461
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-74474-001.js139
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-74474-002.js9097
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-74474-003.js9099
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-83532-001.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/regress-83532-002.js74
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Statements/switch-001.js143
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/15.5.4.11.js532
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/15.5.4.14.js50
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-104375.js116
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-189898.js157
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-304376.js68
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-313567.js56
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-392378.js77
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/regress-83293.js216
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/String/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/browser.js0
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/regress-352044-01.js72
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/regress-352044-02-n.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/shell.js1
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-001-n.js62
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-001.js56
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-002-n.js55
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-002.js60
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-003.js71
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-004.js65
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/Unicode/uc-005.js276
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/browser.js36
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/10.1.3-2.js162
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/7.9.1.js83
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/browser.js0
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-103087.js178
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-188206-01.js108
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-188206-02.js158
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-220367-002.js112
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-228087.js352
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-274152.js83
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-320854.js53
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-327170.js58
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-368516.js78
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-385393-03.js63
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-429248.js67
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/extensions/regress-430740.js72
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/extensions/shell.js266
-rw-r--r--tests/auto/qscriptjstestsuite/tests/ecma_3/shell.js40
-rwxr-xr-xtests/auto/qscriptjstestsuite/tests/ecma_3/template.js59
-rw-r--r--tests/auto/qscriptjstestsuite/tests/shell.js886
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp907
-rw-r--r--tests/auto/qscriptqobject/.gitignore1
-rw-r--r--tests/auto/qscriptqobject/qscriptqobject.pro5
-rw-r--r--tests/auto/qscriptqobject/tst_qscriptqobject.cpp2734
-rw-r--r--tests/auto/qscriptstring/.gitignore1
-rw-r--r--tests/auto/qscriptstring/qscriptstring.pro3
-rw-r--r--tests/auto/qscriptstring/tst_qscriptstring.cpp138
-rw-r--r--tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro11
-rw-r--r--tests/auto/qscriptv8testsuite/tests/apply.js187
-rw-r--r--tests/auto/qscriptv8testsuite/tests/arguments-call-apply.js41
-rw-r--r--tests/auto/qscriptv8testsuite/tests/arguments-enum.js52
-rw-r--r--tests/auto/qscriptv8testsuite/tests/arguments-indirect.js47
-rw-r--r--tests/auto/qscriptv8testsuite/tests/arguments-opt.js130
-rw-r--r--tests/auto/qscriptv8testsuite/tests/arguments.js97
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-concat.js101
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-functions-prototype.js159
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-indexing.js66
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-iteration.js228
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-join.js45
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-length.js111
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-sort.js66
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-splice-webkit.js60
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array-splice.js313
-rw-r--r--tests/auto/qscriptv8testsuite/tests/array_length.js53
-rw-r--r--tests/auto/qscriptv8testsuite/tests/ascii-regexp-subject.js45
-rw-r--r--tests/auto/qscriptv8testsuite/tests/binary-operation-overwrite.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/body-not-visible.js39
-rw-r--r--tests/auto/qscriptv8testsuite/tests/call-non-function-call.js38
-rw-r--r--tests/auto/qscriptv8testsuite/tests/call-non-function.js54
-rw-r--r--tests/auto/qscriptv8testsuite/tests/call.js87
-rw-r--r--tests/auto/qscriptv8testsuite/tests/char-escape.js53
-rw-r--r--tests/auto/qscriptv8testsuite/tests/class-of-builtins.js50
-rw-r--r--tests/auto/qscriptv8testsuite/tests/closure.js37
-rw-r--r--tests/auto/qscriptv8testsuite/tests/compare-nan.js44
-rw-r--r--tests/auto/qscriptv8testsuite/tests/const-redecl.js220
-rw-r--r--tests/auto/qscriptv8testsuite/tests/const.js68
-rw-r--r--tests/auto/qscriptv8testsuite/tests/cyclic-array-to-string.js65
-rw-r--r--tests/auto/qscriptv8testsuite/tests/date-parse.js265
-rw-r--r--tests/auto/qscriptv8testsuite/tests/date.js126
-rw-r--r--tests/auto/qscriptv8testsuite/tests/declare-locally.js43
-rw-r--r--tests/auto/qscriptv8testsuite/tests/deep-recursion.js64
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delay-syntax-error.js41
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delete-global-properties.js37
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delete-in-eval.js32
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delete-in-with.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delete-vars-from-eval.js40
-rw-r--r--tests/auto/qscriptv8testsuite/tests/delete.js163
-rw-r--r--tests/auto/qscriptv8testsuite/tests/do-not-strip-fc.js31
-rw-r--r--tests/auto/qscriptv8testsuite/tests/dont-enum-array-holes.js35
-rw-r--r--tests/auto/qscriptv8testsuite/tests/dont-reinit-global-var.js47
-rw-r--r--tests/auto/qscriptv8testsuite/tests/double-equals.js114
-rw-r--r--tests/auto/qscriptv8testsuite/tests/dtoa.js32
-rw-r--r--tests/auto/qscriptv8testsuite/tests/enumeration_order.js59
-rw-r--r--tests/auto/qscriptv8testsuite/tests/escape.js118
-rw-r--r--tests/auto/qscriptv8testsuite/tests/eval-typeof-non-existing.js32
-rw-r--r--tests/auto/qscriptv8testsuite/tests/execScript-case-insensitive.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/extra-arguments.js54
-rw-r--r--tests/auto/qscriptv8testsuite/tests/extra-commas.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/for-in-null-or-undefined.js33
-rw-r--r--tests/auto/qscriptv8testsuite/tests/for-in-special-cases.js64
-rw-r--r--tests/auto/qscriptv8testsuite/tests/for-in.js69
-rw-r--r--tests/auto/qscriptv8testsuite/tests/fun-as-prototype.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/fun_name.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function-arguments-null.js30
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function-caller.js48
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function-property.js29
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function-prototype.js97
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function-source.js49
-rw-r--r--tests/auto/qscriptv8testsuite/tests/function.js72
-rw-r--r--tests/auto/qscriptv8testsuite/tests/fuzz-accessors.js85
-rw-r--r--tests/auto/qscriptv8testsuite/tests/getter-in-value-prototype.js35
-rw-r--r--tests/auto/qscriptv8testsuite/tests/global-const-var-conflicts.js57
-rw-r--r--tests/auto/qscriptv8testsuite/tests/global-vars-eval.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/global-vars-with.js43
-rw-r--r--tests/auto/qscriptv8testsuite/tests/has-own-property.js38
-rw-r--r--tests/auto/qscriptv8testsuite/tests/html-comments.js57
-rw-r--r--tests/auto/qscriptv8testsuite/tests/html-string-funcs.js47
-rw-r--r--tests/auto/qscriptv8testsuite/tests/if-in-undefined.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/in.js158
-rw-r--r--tests/auto/qscriptv8testsuite/tests/instanceof.js32
-rw-r--r--tests/auto/qscriptv8testsuite/tests/integer-to-string.js35
-rw-r--r--tests/auto/qscriptv8testsuite/tests/invalid-lhs.js68
-rw-r--r--tests/auto/qscriptv8testsuite/tests/keyed-ic.js207
-rw-r--r--tests/auto/qscriptv8testsuite/tests/large-object-literal.js49
-rw-r--r--tests/auto/qscriptv8testsuite/tests/lazy-load.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/length.js78
-rw-r--r--tests/auto/qscriptv8testsuite/tests/math-min-max.js72
-rw-r--r--tests/auto/qscriptv8testsuite/tests/megamorphic-callbacks.js70
-rw-r--r--tests/auto/qscriptv8testsuite/tests/mjsunit.js125
-rw-r--r--tests/auto/qscriptv8testsuite/tests/mul-exhaustive.js4511
-rw-r--r--tests/auto/qscriptv8testsuite/tests/negate-zero.js42
-rw-r--r--tests/auto/qscriptv8testsuite/tests/negate.js59
-rw-r--r--tests/auto/qscriptv8testsuite/tests/nested-repetition-count-overflow.js43
-rw-r--r--tests/auto/qscriptv8testsuite/tests/new.js56
-rw-r--r--tests/auto/qscriptv8testsuite/tests/newline-in-string.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/no-branch-elimination.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/no-octal-constants-above-256.js32
-rw-r--r--tests/auto/qscriptv8testsuite/tests/no-semicolon.js45
-rw-r--r--tests/auto/qscriptv8testsuite/tests/non-ascii-replace.js30
-rw-r--r--tests/auto/qscriptv8testsuite/tests/nul-characters.js38
-rw-r--r--tests/auto/qscriptv8testsuite/tests/number-limits.js43
-rw-r--r--tests/auto/qscriptv8testsuite/tests/number-tostring.js338
-rw-r--r--tests/auto/qscriptv8testsuite/tests/obj-construct.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/parse-int-float.js82
-rw-r--r--tests/auto/qscriptv8testsuite/tests/property-object-key.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/proto.js33
-rw-r--r--tests/auto/qscriptv8testsuite/tests/prototype.js93
-rw-r--r--tests/auto/qscriptv8testsuite/tests/regexp-multiline-stack-trace.js114
-rw-r--r--tests/auto/qscriptv8testsuite/tests/regexp-multiline.js112
-rw-r--r--tests/auto/qscriptv8testsuite/tests/regexp-standalones.js78
-rw-r--r--tests/auto/qscriptv8testsuite/tests/regexp-static.js122
-rw-r--r--tests/auto/qscriptv8testsuite/tests/regexp.js243
-rw-r--r--tests/auto/qscriptv8testsuite/tests/scanner.js30
-rw-r--r--tests/auto/qscriptv8testsuite/tests/smi-negative-zero.js100
-rw-r--r--tests/auto/qscriptv8testsuite/tests/smi-ops.js102
-rw-r--r--tests/auto/qscriptv8testsuite/tests/sparse-array-reverse.js123
-rw-r--r--tests/auto/qscriptv8testsuite/tests/sparse-array.js41
-rw-r--r--tests/auto/qscriptv8testsuite/tests/str-to-num.js158
-rw-r--r--tests/auto/qscriptv8testsuite/tests/stress-array-push.js34
-rw-r--r--tests/auto/qscriptv8testsuite/tests/strict-equals.js90
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-case.js28
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-charat.js53
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-charcodeat.js189
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-flatten.js37
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-index.js154
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-indexof.js49
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-lastindexof.js51
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-localecompare.js40
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-search.js30
-rw-r--r--tests/auto/qscriptv8testsuite/tests/string-split.js126
-rw-r--r--tests/auto/qscriptv8testsuite/tests/substr.js65
-rw-r--r--tests/auto/qscriptv8testsuite/tests/this-in-callbacks.js47
-rw-r--r--tests/auto/qscriptv8testsuite/tests/this.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/throw-exception-for-null-access.js37
-rw-r--r--tests/auto/qscriptv8testsuite/tests/to-precision.js82
-rw-r--r--tests/auto/qscriptv8testsuite/tests/tobool.js36
-rw-r--r--tests/auto/qscriptv8testsuite/tests/toint32.js80
-rw-r--r--tests/auto/qscriptv8testsuite/tests/touint32.js72
-rw-r--r--tests/auto/qscriptv8testsuite/tests/try-finally-nested.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/try.js349
-rw-r--r--tests/auto/qscriptv8testsuite/tests/try_catch_scopes.js42
-rw-r--r--tests/auto/qscriptv8testsuite/tests/unicode-string-to-number.js46
-rw-r--r--tests/auto/qscriptv8testsuite/tests/unicode-test.js9143
-rw-r--r--tests/auto/qscriptv8testsuite/tests/unusual-constructor.js38
-rw-r--r--tests/auto/qscriptv8testsuite/tests/uri.js78
-rw-r--r--tests/auto/qscriptv8testsuite/tests/value-callic-prototype-change.js94
-rw-r--r--tests/auto/qscriptv8testsuite/tests/var.js37
-rw-r--r--tests/auto/qscriptv8testsuite/tests/with-leave.js61
-rw-r--r--tests/auto/qscriptv8testsuite/tests/with-parameter-access.js47
-rw-r--r--tests/auto/qscriptv8testsuite/tests/with-value.js38
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp340
-rw-r--r--tests/auto/qscriptvalue/.gitignore1
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro5
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp3134
-rw-r--r--tests/auto/qscriptvalueiterator/.gitignore1
-rw-r--r--tests/auto/qscriptvalueiterator/qscriptvalueiterator.pro5
-rw-r--r--tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp566
-rw-r--r--tests/auto/qscrollarea/.gitignore1
-rw-r--r--tests/auto/qscrollarea/qscrollarea.pro9
-rw-r--r--tests/auto/qscrollarea/tst_qscrollarea.cpp185
-rw-r--r--tests/auto/qscrollbar/.gitignore1
-rw-r--r--tests/auto/qscrollbar/qscrollbar.pro4
-rw-r--r--tests/auto/qscrollbar/tst_qscrollbar.cpp147
-rw-r--r--tests/auto/qsemaphore/.gitignore1
-rw-r--r--tests/auto/qsemaphore/qsemaphore.pro5
-rw-r--r--tests/auto/qsemaphore/tst_qsemaphore.cpp403
-rw-r--r--tests/auto/qset/.gitignore1
-rw-r--r--tests/auto/qset/qset.pro7
-rw-r--r--tests/auto/qset/tst_qset.cpp917
-rw-r--r--tests/auto/qsettings/.gitignore1
-rw-r--r--tests/auto/qsettings/qsettings.pro7
-rw-r--r--tests/auto/qsettings/qsettings.qrc9
-rw-r--r--tests/auto/qsettings/resourcefile.ini46
-rw-r--r--tests/auto/qsettings/resourcefile2.ini46
-rw-r--r--tests/auto/qsettings/resourcefile3.ini50
-rw-r--r--tests/auto/qsettings/resourcefile4.ini2
-rw-r--r--tests/auto/qsettings/resourcefile5.ini2
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp3808
-rw-r--r--tests/auto/qsharedmemory/.gitignore3
-rw-r--r--tests/auto/qsharedmemory/lackey/lackey.pro18
-rw-r--r--tests/auto/qsharedmemory/lackey/main.cpp368
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/consumer.js41
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/producer.js36
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/readonly_segfault.js4
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/systemlock_read.js11
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/systemlock_readwrite.js11
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/systemsemaphore_acquire.js18
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/systemsemaphore_acquirerelease.js11
-rw-r--r--tests/auto/qsharedmemory/lackey/scripts/systemsemaphore_release.js11
-rw-r--r--tests/auto/qsharedmemory/qsharedmemory.pro4
-rw-r--r--tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro16
-rw-r--r--tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp222
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock.cpp246
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock.h135
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock_p.h106
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock_unix.cpp209
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock_win.cpp190
-rw-r--r--tests/auto/qsharedmemory/src/src.pri10
-rw-r--r--tests/auto/qsharedmemory/test/test.pro29
-rw-r--r--tests/auto/qsharedmemory/tst_qsharedmemory.cpp744
-rw-r--r--tests/auto/qsharedpointer/.gitignore1
-rw-r--r--tests/auto/qsharedpointer/externaltests.cpp674
-rw-r--r--tests/auto/qsharedpointer/externaltests.h132
-rw-r--r--tests/auto/qsharedpointer/externaltests.pri6
-rw-r--r--tests/auto/qsharedpointer/qsharedpointer.pro7
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp915
-rw-r--r--tests/auto/qshortcut/.gitignore1
-rw-r--r--tests/auto/qshortcut/qshortcut.pro10
-rw-r--r--tests/auto/qshortcut/tst_qshortcut.cpp1272
-rw-r--r--tests/auto/qsidebar/.gitignore1
-rw-r--r--tests/auto/qsidebar/qsidebar.pro8
-rw-r--r--tests/auto/qsidebar/tst_qsidebar.cpp199
-rw-r--r--tests/auto/qsignalmapper/.gitignore1
-rw-r--r--tests/auto/qsignalmapper/qsignalmapper.pro5
-rw-r--r--tests/auto/qsignalmapper/tst_qsignalmapper.cpp156
-rw-r--r--tests/auto/qsignalspy/.gitignore1
-rw-r--r--tests/auto/qsignalspy/qsignalspy.pro6
-rw-r--r--tests/auto/qsignalspy/tst_qsignalspy.cpp221
-rw-r--r--tests/auto/qsimplexmlnodemodel/.gitignore1
-rw-r--r--tests/auto/qsimplexmlnodemodel/TestSimpleNodeModel.h132
-rw-r--r--tests/auto/qsimplexmlnodemodel/qsimplexmlnodemodel.pro4
-rw-r--r--tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp172
-rw-r--r--tests/auto/qsize/.gitignore1
-rw-r--r--tests/auto/qsize/qsize.pro5
-rw-r--r--tests/auto/qsize/tst_qsize.cpp254
-rw-r--r--tests/auto/qsizef/.gitignore1
-rw-r--r--tests/auto/qsizef/qsizef.pro4
-rw-r--r--tests/auto/qsizef/tst_qsizef.cpp204
-rw-r--r--tests/auto/qsizegrip/.gitignore1
-rw-r--r--tests/auto/qsizegrip/qsizegrip.pro5
-rw-r--r--tests/auto/qsizegrip/tst_qsizegrip.cpp201
-rw-r--r--tests/auto/qslider/.gitignore1
-rw-r--r--tests/auto/qslider/qslider.pro9
-rw-r--r--tests/auto/qslider/tst_qslider.cpp98
-rw-r--r--tests/auto/qsocketnotifier/.gitignore1
-rw-r--r--tests/auto/qsocketnotifier/qsocketnotifier.pro8
-rw-r--r--tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp179
-rw-r--r--tests/auto/qsocks5socketengine/.gitignore1
-rw-r--r--tests/auto/qsocks5socketengine/qsocks5socketengine.pro13
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp958
-rw-r--r--tests/auto/qsortfilterproxymodel/.gitignore1
-rw-r--r--tests/auto/qsortfilterproxymodel/qsortfilterproxymodel.pro6
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp2483
-rw-r--r--tests/auto/qsound/.gitignore1
-rw-r--r--tests/auto/qsound/4.wavbin0 -> 5538 bytes-rw-r--r--tests/auto/qsound/qsound.pro7
-rw-r--r--tests/auto/qsound/tst_qsound.cpp71
-rw-r--r--tests/auto/qsourcelocation/.gitignore1
-rw-r--r--tests/auto/qsourcelocation/qsourcelocation.pro4
-rw-r--r--tests/auto/qsourcelocation/tst_qsourcelocation.cpp398
-rw-r--r--tests/auto/qspinbox/.gitignore1
-rw-r--r--tests/auto/qspinbox/qspinbox.pro5
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp954
-rw-r--r--tests/auto/qsplitter/.gitignore1
-rw-r--r--tests/auto/qsplitter/extradata.txt10067
-rw-r--r--tests/auto/qsplitter/qsplitter.pro11
-rw-r--r--tests/auto/qsplitter/setSizes3.dat2250
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp1404
-rw-r--r--tests/auto/qsql/.gitignore1
-rw-r--r--tests/auto/qsql/qsql.pro10
-rw-r--r--tests/auto/qsql/tst_qsql.cpp321
-rw-r--r--tests/auto/qsqldatabase/.gitignore1
-rw-r--r--tests/auto/qsqldatabase/qsqldatabase.pro20
-rwxr-xr-xtests/auto/qsqldatabase/testdata/qtest.mdbbin0 -> 65536 bytes-rw-r--r--tests/auto/qsqldatabase/tst_databases.h454
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp2319
-rw-r--r--tests/auto/qsqlerror/.gitignore1
-rw-r--r--tests/auto/qsqlerror/qsqlerror.pro10
-rw-r--r--tests/auto/qsqlerror/tst_qsqlerror.cpp129
-rw-r--r--tests/auto/qsqlfield/.gitignore1
-rw-r--r--tests/auto/qsqlfield/qsqlfield.pro7
-rw-r--r--tests/auto/qsqlfield/tst_qsqlfield.cpp360
-rw-r--r--tests/auto/qsqlquery/.gitignore1
-rw-r--r--tests/auto/qsqlquery/qsqlquery.pro14
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp2730
-rw-r--r--tests/auto/qsqlquerymodel/.gitignore1
-rw-r--r--tests/auto/qsqlquerymodel/qsqlquerymodel.pro11
-rw-r--r--tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp564
-rw-r--r--tests/auto/qsqlrecord/.gitignore1
-rw-r--r--tests/auto/qsqlrecord/qsqlrecord.pro7
-rw-r--r--tests/auto/qsqlrecord/tst_qsqlrecord.cpp587
-rw-r--r--tests/auto/qsqlrelationaltablemodel/.gitignore1
-rw-r--r--tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro16
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp810
-rw-r--r--tests/auto/qsqltablemodel/.gitignore1
-rw-r--r--tests/auto/qsqltablemodel/qsqltablemodel.pro13
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp915
-rw-r--r--tests/auto/qsqlthread/.gitignore1
-rw-r--r--tests/auto/qsqlthread/qsqlthread.pro14
-rw-r--r--tests/auto/qsqlthread/tst_qsqlthread.cpp524
-rw-r--r--tests/auto/qsslcertificate/.gitignore1
-rw-r--r--tests/auto/qsslcertificate/certificates/ca-cert.pem33
-rw-r--r--tests/auto/qsslcertificate/certificates/ca-cert.pem.digest-md51
-rw-r--r--tests/auto/qsslcertificate/certificates/ca-cert.pem.digest-sha11
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss-san.pem13
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss-san.pem.san5
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.derbin0 -> 461 bytes-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.der.pubkeybin0 -> 162 bytes-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.pem12
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.pem.digest-md51
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.pem.digest-sha11
-rw-r--r--tests/auto/qsslcertificate/certificates/cert-ss.pem.pubkey6
-rw-r--r--tests/auto/qsslcertificate/certificates/cert.derbin0 -> 503 bytes-rw-r--r--tests/auto/qsslcertificate/certificates/cert.der.pubkeybin0 -> 162 bytes-rw-r--r--tests/auto/qsslcertificate/certificates/cert.pem13
-rw-r--r--tests/auto/qsslcertificate/certificates/cert.pem.digest-md51
-rw-r--r--tests/auto/qsslcertificate/certificates/cert.pem.digest-sha11
-rw-r--r--tests/auto/qsslcertificate/certificates/cert.pem.pubkey6
-rwxr-xr-xtests/auto/qsslcertificate/certificates/gencertificates.sh54
-rw-r--r--tests/auto/qsslcertificate/certificates/san.cnf5
-rw-r--r--tests/auto/qsslcertificate/more-certificates/trailing-whitespace.pem13
-rw-r--r--tests/auto/qsslcertificate/qsslcertificate.pro26
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp695
-rw-r--r--tests/auto/qsslcipher/.gitignore1
-rw-r--r--tests/auto/qsslcipher/qsslcipher.pro17
-rw-r--r--tests/auto/qsslcipher/tst_qsslcipher.cpp101
-rw-r--r--tests/auto/qsslerror/.gitignore1
-rw-r--r--tests/auto/qsslerror/qsslerror.pro17
-rw-r--r--tests/auto/qsslerror/tst_qsslerror.cpp122
-rw-r--r--tests/auto/qsslkey/.gitignore1
-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-1024.derbin0 -> 447 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-1024.pem12
-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-512.derbin0 -> 251 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-512.pem8
-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-576.derbin0 -> 275 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-576.pem8
-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-960.derbin0 -> 419 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pri-960.pem11
-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-1024.derbin0 -> 442 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-1024.pem12
-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-512.derbin0 -> 244 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-512.pem8
-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-576.derbin0 -> 268 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-576.pem8
-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-960.derbin0 -> 414 bytes-rw-r--r--tests/auto/qsslkey/keys/dsa-pub-960.pem11
-rwxr-xr-xtests/auto/qsslkey/keys/genkeys.sh42
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-1023.derbin0 -> 605 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-1023.pem15
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-1024.derbin0 -> 608 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-1024.pem15
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-2048.derbin0 -> 1190 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-2048.pem27
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-40.derbin0 -> 49 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-40.pem4
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-511.derbin0 -> 316 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-511.pem9
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-512.derbin0 -> 320 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-512.pem9
-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-999.derbin0 -> 591 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pri-999.pem15
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-1023.derbin0 -> 161 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-1023.pem6
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-1024.derbin0 -> 162 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-1024.pem6
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-2048.derbin0 -> 294 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-2048.pem9
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-40.derbin0 -> 35 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-40.pem3
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-511.derbin0 -> 93 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-511.pem4
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-512.derbin0 -> 94 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-512.pem4
-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-999.derbin0 -> 157 bytes-rw-r--r--tests/auto/qsslkey/keys/rsa-pub-999.pem6
-rw-r--r--tests/auto/qsslkey/qsslkey.pro24
-rw-r--r--tests/auto/qsslkey/tst_qsslkey.cpp371
-rw-r--r--tests/auto/qsslsocket/.gitignore1
-rw-r--r--tests/auto/qsslsocket/certs/fluke.cert75
-rw-r--r--tests/auto/qsslsocket/certs/fluke.key15
-rw-r--r--tests/auto/qsslsocket/certs/qt-test-server-cacert.pem22
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro22
-rw-r--r--tests/auto/qsslsocket/ssl.tar.gzbin0 -> 36299 bytes-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp1540
-rw-r--r--tests/auto/qstackedlayout/.gitignore1
-rw-r--r--tests/auto/qstackedlayout/qstackedlayout.pro5
-rw-r--r--tests/auto/qstackedlayout/tst_qstackedlayout.cpp368
-rw-r--r--tests/auto/qstackedwidget/.gitignore1
-rw-r--r--tests/auto/qstackedwidget/qstackedwidget.pro9
-rw-r--r--tests/auto/qstackedwidget/tst_qstackedwidget.cpp124
-rw-r--r--tests/auto/qstandarditem/.gitignore1
-rw-r--r--tests/auto/qstandarditem/qstandarditem.pro4
-rw-r--r--tests/auto/qstandarditem/tst_qstandarditem.cpp1106
-rw-r--r--tests/auto/qstandarditemmodel/.gitignore1
-rw-r--r--tests/auto/qstandarditemmodel/qstandarditemmodel.pro4
-rw-r--r--tests/auto/qstandarditemmodel/tst_qstandarditemmodel.cpp1623
-rw-r--r--tests/auto/qstatusbar/.gitignore1
-rw-r--r--tests/auto/qstatusbar/qstatusbar.pro5
-rw-r--r--tests/auto/qstatusbar/tst_qstatusbar.cpp263
-rw-r--r--tests/auto/qstl/.gitignore1
-rw-r--r--tests/auto/qstl/qstl.pro7
-rw-r--r--tests/auto/qstl/tst_qstl.cpp98
-rw-r--r--tests/auto/qstring/.gitignore1
-rw-r--r--tests/auto/qstring/double_data.h10036
-rw-r--r--tests/auto/qstring/qstring.pro11
-rw-r--r--tests/auto/qstring/tst_qstring.cpp4670
-rw-r--r--tests/auto/qstringlist/.gitignore1
-rw-r--r--tests/auto/qstringlist/qstringlist.pro7
-rw-r--r--tests/auto/qstringlist/tst_qstringlist.cpp315
-rw-r--r--tests/auto/qstringlistmodel/.gitignore1
-rw-r--r--tests/auto/qstringlistmodel/qmodellistener.h75
-rw-r--r--tests/auto/qstringlistmodel/qstringlistmodel.pro7
-rw-r--r--tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp287
-rw-r--r--tests/auto/qstringmatcher/.gitignore1
-rw-r--r--tests/auto/qstringmatcher/qstringmatcher.pro5
-rw-r--r--tests/auto/qstringmatcher/tst_qstringmatcher.cpp163
-rw-r--r--tests/auto/qstyle/.gitignore1
-rw-r--r--tests/auto/qstyle/images/mac/button.pngbin0 -> 1785 bytes-rw-r--r--tests/auto/qstyle/images/mac/combobox.pngbin0 -> 1808 bytes-rw-r--r--tests/auto/qstyle/images/mac/lineedit.pngbin0 -> 953 bytes-rw-r--r--tests/auto/qstyle/images/mac/mdi.pngbin0 -> 3092 bytes-rw-r--r--tests/auto/qstyle/images/mac/menu.pngbin0 -> 1139 bytes-rw-r--r--tests/auto/qstyle/images/mac/radiobutton.pngbin0 -> 1498 bytes-rw-r--r--tests/auto/qstyle/images/mac/slider.pngbin0 -> 1074 bytes-rw-r--r--tests/auto/qstyle/images/mac/spinbox.pngbin0 -> 1299 bytes-rw-r--r--tests/auto/qstyle/images/vista/button.pngbin0 -> 722 bytes-rw-r--r--tests/auto/qstyle/images/vista/combobox.pngbin0 -> 809 bytes-rw-r--r--tests/auto/qstyle/images/vista/lineedit.pngbin0 -> 530 bytes-rw-r--r--tests/auto/qstyle/images/vista/menu.pngbin0 -> 646 bytes-rw-r--r--tests/auto/qstyle/images/vista/radiobutton.pngbin0 -> 844 bytes-rw-r--r--tests/auto/qstyle/images/vista/slider.pngbin0 -> 575 bytes-rw-r--r--tests/auto/qstyle/images/vista/spinbox.pngbin0 -> 583 bytes-rw-r--r--tests/auto/qstyle/qstyle.pro10
-rw-r--r--tests/auto/qstyle/task_25863.pngbin0 -> 910 bytes-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp685
-rw-r--r--tests/auto/qstyleoption/.gitignore1
-rw-r--r--tests/auto/qstyleoption/qstyleoption.pro11
-rw-r--r--tests/auto/qstyleoption/tst_qstyleoption.cpp164
-rw-r--r--tests/auto/qstylesheetstyle/.gitignore1
-rw-r--r--tests/auto/qstylesheetstyle/images/testimage.pngbin0 -> 299 bytes-rw-r--r--tests/auto/qstylesheetstyle/qstylesheetstyle.pro15
-rw-r--r--tests/auto/qstylesheetstyle/resources.qrc6
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp1361
-rw-r--r--tests/auto/qsvgdevice/.gitignore1
-rw-r--r--tests/auto/qsvgdevice/qsvgdevice.pro6
-rw-r--r--tests/auto/qsvgdevice/tst_qsvgdevice.cpp398
-rw-r--r--tests/auto/qsvggenerator/.gitignore1
-rw-r--r--tests/auto/qsvggenerator/qsvggenerator.pro17
-rw-r--r--tests/auto/qsvggenerator/referenceSvgs/fileName_output.svg15
-rw-r--r--tests/auto/qsvggenerator/referenceSvgs/radial_gradient.svg30
-rw-r--r--tests/auto/qsvggenerator/tst_qsvggenerator.cpp439
-rw-r--r--tests/auto/qsvgrenderer/.gitattributes1
-rw-r--r--tests/auto/qsvgrenderer/.gitignore1
-rw-r--r--tests/auto/qsvgrenderer/heart.svgzbin0 -> 1505 bytes-rw-r--r--tests/auto/qsvgrenderer/large.svg462
-rw-r--r--tests/auto/qsvgrenderer/large.svgzbin0 -> 5082 bytes-rw-r--r--tests/auto/qsvgrenderer/qsvgrenderer.pro18
-rw-r--r--tests/auto/qsvgrenderer/resources.qrc5
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp649
-rw-r--r--tests/auto/qsyntaxhighlighter/.gitignore1
-rw-r--r--tests/auto/qsyntaxhighlighter/qsyntaxhighlighter.pro4
-rw-r--r--tests/auto/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp522
-rw-r--r--tests/auto/qsysinfo/.gitignore1
-rw-r--r--tests/auto/qsysinfo/qsysinfo.pro6
-rw-r--r--tests/auto/qsysinfo/tst_qsysinfo.cpp52
-rw-r--r--tests/auto/qsystemsemaphore/.gitignore1
-rw-r--r--tests/auto/qsystemsemaphore/files.qrc7
-rw-r--r--tests/auto/qsystemsemaphore/qsystemsemaphore.pro4
-rw-r--r--tests/auto/qsystemsemaphore/test/test.pro29
-rw-r--r--tests/auto/qsystemsemaphore/tst_qsystemsemaphore.cpp293
-rw-r--r--tests/auto/qsystemtrayicon/.gitignore1
-rw-r--r--tests/auto/qsystemtrayicon/icons/icon.pngbin0 -> 1086 bytes-rw-r--r--tests/auto/qsystemtrayicon/qsystemtrayicon.pro9
-rw-r--r--tests/auto/qsystemtrayicon/tst_qsystemtrayicon.cpp153
-rw-r--r--tests/auto/qtabbar/.gitignore1
-rw-r--r--tests/auto/qtabbar/qtabbar.pro5
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp507
-rw-r--r--tests/auto/qtableview/.gitignore1
-rw-r--r--tests/auto/qtableview/qtableview.pro4
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp3208
-rw-r--r--tests/auto/qtablewidget/.gitignore1
-rw-r--r--tests/auto/qtablewidget/qtablewidget.pro4
-rw-r--r--tests/auto/qtablewidget/tst_qtablewidget.cpp1479
-rw-r--r--tests/auto/qtabwidget/.gitignore1
-rw-r--r--tests/auto/qtabwidget/qtabwidget.pro11
-rw-r--r--tests/auto/qtabwidget/tst_qtabwidget.cpp624
-rw-r--r--tests/auto/qtconcurrentfilter/.gitignore1
-rw-r--r--tests/auto/qtconcurrentfilter/qtconcurrentfilter.pro4
-rw-r--r--tests/auto/qtconcurrentfilter/tst_qtconcurrentfilter.cpp1546
-rw-r--r--tests/auto/qtconcurrentiteratekernel/.gitignore1
-rw-r--r--tests/auto/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro3
-rw-r--r--tests/auto/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp332
-rw-r--r--tests/auto/qtconcurrentmap/.gitignore1
-rw-r--r--tests/auto/qtconcurrentmap/functions.h130
-rw-r--r--tests/auto/qtconcurrentmap/qtconcurrentmap.pro4
-rw-r--r--tests/auto/qtconcurrentmap/tst_qtconcurrentmap.cpp2396
-rw-r--r--tests/auto/qtconcurrentrun/.gitignore1
-rw-r--r--tests/auto/qtconcurrentrun/qtconcurrentrun.pro3
-rw-r--r--tests/auto/qtconcurrentrun/tst_qtconcurrentrun.cpp413
-rw-r--r--tests/auto/qtconcurrentthreadengine/.gitignore1
-rw-r--r--tests/auto/qtconcurrentthreadengine/qtconcurrentthreadengine.pro3
-rw-r--r--tests/auto/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp536
-rw-r--r--tests/auto/qtcpserver/.gitignore3
-rw-r--r--tests/auto/qtcpserver/crashingServer/crashingServer.pro8
-rw-r--r--tests/auto/qtcpserver/crashingServer/main.cpp70
-rw-r--r--tests/auto/qtcpserver/qtcpserver.pro5
-rw-r--r--tests/auto/qtcpserver/test/test.pro32
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp844
-rw-r--r--tests/auto/qtcpsocket/.gitignore3
-rw-r--r--tests/auto/qtcpsocket/qtcpsocket.pro5
-rw-r--r--tests/auto/qtcpsocket/stressTest/Test.cpp240
-rw-r--r--tests/auto/qtcpsocket/stressTest/Test.h137
-rw-r--r--tests/auto/qtcpsocket/stressTest/main.cpp73
-rw-r--r--tests/auto/qtcpsocket/stressTest/stressTest.pro12
-rw-r--r--tests/auto/qtcpsocket/test/test.pro27
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp2345
-rw-r--r--tests/auto/qtemporaryfile/.gitignore1
-rw-r--r--tests/auto/qtemporaryfile/qtemporaryfile.pro6
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp339
-rw-r--r--tests/auto/qtessellator/.gitignore1
-rw-r--r--tests/auto/qtessellator/XrenderFake.h110
-rw-r--r--tests/auto/qtessellator/arc.cpp49
-rw-r--r--tests/auto/qtessellator/arc.data2
-rw-r--r--tests/auto/qtessellator/arc.h48
-rw-r--r--tests/auto/qtessellator/datafiles.qrc6
-rw-r--r--tests/auto/qtessellator/dataparser.cpp161
-rw-r--r--tests/auto/qtessellator/dataparser.h51
-rw-r--r--tests/auto/qtessellator/oldtessellator.cpp446
-rw-r--r--tests/auto/qtessellator/oldtessellator.h52
-rw-r--r--tests/auto/qtessellator/qnum.h145
-rw-r--r--tests/auto/qtessellator/qtessellator.pro7
-rw-r--r--tests/auto/qtessellator/sample_data.h51
-rw-r--r--tests/auto/qtessellator/simple.cpp49
-rw-r--r--tests/auto/qtessellator/simple.data195
-rw-r--r--tests/auto/qtessellator/simple.h48
-rw-r--r--tests/auto/qtessellator/testtessellator.cpp114
-rw-r--r--tests/auto/qtessellator/testtessellator.h59
-rw-r--r--tests/auto/qtessellator/tst_tessellator.cpp378
-rw-r--r--tests/auto/qtessellator/utils.cpp93
-rw-r--r--tests/auto/qtessellator/utils.h56
-rw-r--r--tests/auto/qtextblock/.gitignore1
-rw-r--r--tests/auto/qtextblock/qtextblock.pro5
-rw-r--r--tests/auto/qtextblock/tst_qtextblock.cpp178
-rw-r--r--tests/auto/qtextboundaryfinder/.gitignore1
-rw-r--r--tests/auto/qtextboundaryfinder/data/GraphemeBreakTest.txt123
-rw-r--r--tests/auto/qtextboundaryfinder/data/SentenceBreakTest.txt307
-rw-r--r--tests/auto/qtextboundaryfinder/data/WordBreakTest.txt517
-rw-r--r--tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro10
-rw-r--r--tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp313
-rw-r--r--tests/auto/qtextbrowser.html1
-rw-r--r--tests/auto/qtextbrowser/.gitignore1
-rw-r--r--tests/auto/qtextbrowser/anchor.html11
-rw-r--r--tests/auto/qtextbrowser/bigpage.html934
-rw-r--r--tests/auto/qtextbrowser/firstpage.html2
-rw-r--r--tests/auto/qtextbrowser/pagewithbg.html1
-rw-r--r--tests/auto/qtextbrowser/pagewithimage.html1
-rw-r--r--tests/auto/qtextbrowser/pagewithoutbg.html1
-rw-r--r--tests/auto/qtextbrowser/qtextbrowser.pro17
-rw-r--r--tests/auto/qtextbrowser/secondpage.html1
-rw-r--r--tests/auto/qtextbrowser/subdir/index.html1
-rw-r--r--tests/auto/qtextbrowser/thirdpage.html1
-rw-r--r--tests/auto/qtextbrowser/tst_qtextbrowser.cpp663
-rw-r--r--tests/auto/qtextcodec/.gitattributes1
-rw-r--r--tests/auto/qtextcodec/.gitignore1
-rw-r--r--tests/auto/qtextcodec/QT4-crashtest.txtbin0 -> 34 bytes-rw-r--r--tests/auto/qtextcodec/echo/echo.pro6
-rw-r--r--tests/auto/qtextcodec/echo/main.cpp60
-rw-r--r--tests/auto/qtextcodec/korean.txt1
-rw-r--r--tests/auto/qtextcodec/qtextcodec.pro4
-rw-r--r--tests/auto/qtextcodec/test/test.pro11
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp1751
-rw-r--r--tests/auto/qtextcodec/utf8.txt1
-rw-r--r--tests/auto/qtextcursor/.gitignore1
-rw-r--r--tests/auto/qtextcursor/qtextcursor.pro5
-rw-r--r--tests/auto/qtextcursor/tst_qtextcursor.cpp1672
-rw-r--r--tests/auto/qtextdocument/.gitignore1
-rw-r--r--tests/auto/qtextdocument/common.h93
-rw-r--r--tests/auto/qtextdocument/qtextdocument.pro5
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp2518
-rw-r--r--tests/auto/qtextdocumentfragment/.gitignore1
-rw-r--r--tests/auto/qtextdocumentfragment/qtextdocumentfragment.pro5
-rw-r--r--tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp4025
-rw-r--r--tests/auto/qtextdocumentlayout/.gitignore1
-rw-r--r--tests/auto/qtextdocumentlayout/qtextdocumentlayout.pro4
-rw-r--r--tests/auto/qtextdocumentlayout/tst_qtextdocumentlayout.cpp254
-rw-r--r--tests/auto/qtextedit/.gitignore2
-rw-r--r--tests/auto/qtextedit/fullWidthSelection/centered-fully-selected.pngbin0 -> 1232 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/centered-partly-selected.pngbin0 -> 1231 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/last-char-on-line.pngbin0 -> 1220 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/last-char-on-parag.pngbin0 -> 1222 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/multiple-full-width-lines.pngbin0 -> 1236 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/nowrap_long.pngbin0 -> 1199 bytes-rw-r--r--tests/auto/qtextedit/fullWidthSelection/single-full-width-line.pngbin0 -> 1235 bytes-rw-r--r--tests/auto/qtextedit/qtextedit.pro17
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp2152
-rw-r--r--tests/auto/qtextformat/.gitignore1
-rw-r--r--tests/auto/qtextformat/qtextformat.pro9
-rw-r--r--tests/auto/qtextformat/tst_qtextformat.cpp377
-rw-r--r--tests/auto/qtextlayout/.gitignore1
-rw-r--r--tests/auto/qtextlayout/qtextlayout.pro6
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp1284
-rw-r--r--tests/auto/qtextlist/.gitignore1
-rw-r--r--tests/auto/qtextlist/qtextlist.pro6
-rw-r--r--tests/auto/qtextlist/tst_qtextlist.cpp304
-rw-r--r--tests/auto/qtextobject/.gitignore1
-rw-r--r--tests/auto/qtextobject/qtextobject.pro9
-rw-r--r--tests/auto/qtextobject/tst_qtextobject.cpp109
-rw-r--r--tests/auto/qtextodfwriter/.gitignore1
-rw-r--r--tests/auto/qtextodfwriter/qtextodfwriter.pro5
-rw-r--r--tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp420
-rw-r--r--tests/auto/qtextpiecetable/.gitignore1
-rw-r--r--tests/auto/qtextpiecetable/qtextpiecetable.pro8
-rw-r--r--tests/auto/qtextpiecetable/tst_qtextpiecetable.cpp1174
-rw-r--r--tests/auto/qtextscriptengine/.gitignore1
-rw-r--r--tests/auto/qtextscriptengine/generate/generate.pro13
-rw-r--r--tests/auto/qtextscriptengine/generate/main.cpp129
-rw-r--r--tests/auto/qtextscriptengine/qtextscriptengine.pro6
-rw-r--r--tests/auto/qtextscriptengine/tst_qtextscriptengine.cpp913
-rw-r--r--tests/auto/qtextstream/.gitattributes3
-rw-r--r--tests/auto/qtextstream/.gitignore11
-rw-r--r--tests/auto/qtextstream/qtextstream.pro5
-rw-r--r--tests/auto/qtextstream/qtextstream.qrc6
-rw-r--r--tests/auto/qtextstream/readAllStdinProcess/main.cpp50
-rw-r--r--tests/auto/qtextstream/readAllStdinProcess/readAllStdinProcess.pro7
-rw-r--r--tests/auto/qtextstream/readLineStdinProcess/main.cpp57
-rw-r--r--tests/auto/qtextstream/readLineStdinProcess/readLineStdinProcess.pro7
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeReverse_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeReverse_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeReverse_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeReverse_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeReverse_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Unicode_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Unicode_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QByteArray_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeReverse_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeReverse_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeReverse_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeReverse_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeReverse_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QChar_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeNetworkOrder_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeNetworkOrder_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeNetworkOrder_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeNetworkOrder_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeNetworkOrder_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeReverse_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeReverse_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeReverse_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeReverse_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeReverse_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Unicode_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Unicode_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_QString_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeNetworkOrder_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeNetworkOrder_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeNetworkOrder_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeNetworkOrder_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeNetworkOrder_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeReverse_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeReverse_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeReverse_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeReverse_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeReverse_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_char_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_RawUnicode_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeNetworkOrder_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeReverse_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_double_resource_Unicode_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeNetworkOrder_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeNetworkOrder_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeNetworkOrder_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeNetworkOrder_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeReverse_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeReverse_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeReverse_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeReverse_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_float_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_RawUnicode_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeNetworkOrder_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeReverse_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_int_resource_Unicode_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_RawUnicode_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeNetworkOrder_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeReverse_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_long_resource_Unicode_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_RawUnicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_RawUnicode_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_RawUnicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeNetworkOrder_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeReverse_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Unicode_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Unicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_short_resource_Unicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_uint_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeReverse_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ulong_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shift_ushort_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource10.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource11.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource12.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource20.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource21.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/operator_shiftright_resource9.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Unicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Unicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QByteArray_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QChar_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeReverse_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeReverse_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeReverse_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeReverse_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeReverse_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Unicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Unicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_QString_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeReverse_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeReverse_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeReverse_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeReverse_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeReverse_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_char_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_RawUnicode_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeReverse_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_double_resource_Unicode_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeReverse_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeReverse_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeReverse_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeReverse_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_float_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_RawUnicode_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeReverse_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_int_resource_Unicode_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_RawUnicode_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeReverse_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_long_resource_Unicode_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_RawUnicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_RawUnicode_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_RawUnicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeReverse_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Unicode_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Unicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_short_resource_Unicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_uint_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ulong_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/big_endian/qt3_operator_shift_ushort_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeNetworkOrder_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeReverse_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeReverse_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeReverse_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeReverse_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeReverse_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Unicode_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Unicode_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QByteArray_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeNetworkOrder_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeReverse_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeReverse_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeReverse_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeReverse_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeReverse_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QChar_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeNetworkOrder_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeNetworkOrder_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeNetworkOrder_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeNetworkOrder_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeNetworkOrder_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeReverse_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeReverse_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeReverse_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeReverse_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeReverse_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Unicode_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Unicode_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_QString_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeNetworkOrder_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeNetworkOrder_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeNetworkOrder_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeNetworkOrder_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeNetworkOrder_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeReverse_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeReverse_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeReverse_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeReverse_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeReverse_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_char_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_RawUnicode_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeNetworkOrder_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeReverse_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_double_resource_Unicode_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeNetworkOrder_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeNetworkOrder_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeNetworkOrder_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeNetworkOrder_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeReverse_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeReverse_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeReverse_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeReverse_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_float_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_RawUnicode_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeNetworkOrder_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeReverse_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_int_resource_Unicode_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_RawUnicode_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeNetworkOrder_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeReverse_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_long_resource_Unicode_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_RawUnicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_RawUnicode_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_RawUnicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeNetworkOrder_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeReverse_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Unicode_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Unicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_short_resource_Unicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_uint_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeNetworkOrder_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeReverse_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ulong_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeReverse_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeReverse_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeReverse_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shift_ushort_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource10.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource11.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource12.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource20.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource21.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/operator_shiftright_resource9.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeNetworkOrder_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeReverse_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Unicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Unicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QByteArray_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeNetworkOrder_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeReverse_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QChar_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Latin1_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Latin1_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Latin1_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Locale_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Locale_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Locale_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_RawUnicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_RawUnicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_RawUnicode_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_RawUnicode_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_RawUnicode_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeNetworkOrder_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeReverse_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeReverse_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeReverse_2.databin0 -> 6 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeReverse_3.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeReverse_4.databin0 -> 116 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_3.data2
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Unicode_0.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Unicode_1.data0
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Unicode_2.databin0 -> 8 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Unicode_3.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_QString_resource_Unicode_4.databin0 -> 118 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_RawUnicode_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_RawUnicode_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_RawUnicode_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_RawUnicode_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_RawUnicode_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeNetworkOrder_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeReverse_0.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeReverse_1.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeReverse_2.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeReverse_3.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeReverse_4.databin0 -> 2 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Unicode_0.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Unicode_1.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Unicode_2.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Unicode_3.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_char_resource_Unicode_4.databin0 -> 4 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_RawUnicode_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeNetworkOrder_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_5.databin0 -> 32 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeReverse_6.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_5.databin0 -> 34 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_double_resource_Unicode_6.databin0 -> 36 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_RawUnicode_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_RawUnicode_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_RawUnicode_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_RawUnicode_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeNetworkOrder_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeReverse_1.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeReverse_2.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeReverse_3.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeReverse_4.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Unicode_1.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Unicode_2.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Unicode_3.databin0 -> 28 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_float_resource_Unicode_4.databin0 -> 30 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_RawUnicode_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeNetworkOrder_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeReverse_8.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_int_resource_Unicode_8.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Latin1_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Locale_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_RawUnicode_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeNetworkOrder_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_5.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_6.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_7.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeReverse_8.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_5.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_6.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_7.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_UnicodeUTF8_8.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_5.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_6.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_7.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_long_resource_Unicode_8.databin0 -> 26 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_RawUnicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_RawUnicode_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_RawUnicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeReverse_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeReverse_2.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeReverse_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Unicode_1.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Unicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_Unicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_uint_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_RawUnicode_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeNetworkOrder_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeReverse_4.databin0 -> 22 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ulong_resource_Unicode_4.databin0 -> 24 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Latin1_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Latin1_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Latin1_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Latin1_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Latin1_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Locale_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Locale_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Locale_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Locale_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Locale_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_RawUnicode_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_RawUnicode_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_RawUnicode_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_RawUnicode_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_RawUnicode_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeNetworkOrder_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_0.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_1.databin0 -> 14 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_2.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_3.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeReverse_4.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_0.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_1.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_2.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_3.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_UnicodeUTF8_4.data1
-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Unicode_0.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Unicode_1.databin0 -> 16 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Unicode_2.databin0 -> 18 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Unicode_3.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_ushort_resource_Unicode_4.databin0 -> 20 bytes-rw-r--r--tests/auto/qtextstream/rfc3261.txt15067
-rw-r--r--tests/auto/qtextstream/shift-jis.txt764
-rw-r--r--tests/auto/qtextstream/stdinProcess/main.cpp55
-rw-r--r--tests/auto/qtextstream/stdinProcess/stdinProcess.pro7
-rw-r--r--tests/auto/qtextstream/task113817.txt1095
-rw-r--r--tests/auto/qtextstream/test/test.pro31
-rw-r--r--tests/auto/qtextstream/tst_qtextstream.cpp4294
-rw-r--r--tests/auto/qtexttable/.gitignore1
-rw-r--r--tests/auto/qtexttable/qtexttable.pro5
-rw-r--r--tests/auto/qtexttable/tst_qtexttable.cpp935
-rw-r--r--tests/auto/qthread/.gitignore1
-rw-r--r--tests/auto/qthread/qthread.pro5
-rw-r--r--tests/auto/qthread/tst_qthread.cpp906
-rw-r--r--tests/auto/qthreadonce/.gitignore1
-rw-r--r--tests/auto/qthreadonce/qthreadonce.cpp121
-rw-r--r--tests/auto/qthreadonce/qthreadonce.h114
-rw-r--r--tests/auto/qthreadonce/qthreadonce.pro12
-rw-r--r--tests/auto/qthreadonce/tst_qthreadonce.cpp234
-rw-r--r--tests/auto/qthreadpool/.gitignore1
-rw-r--r--tests/auto/qthreadpool/qthreadpool.pro3
-rw-r--r--tests/auto/qthreadpool/tst_qthreadpool.cpp841
-rw-r--r--tests/auto/qthreadstorage/.gitignore1
-rw-r--r--tests/auto/qthreadstorage/qthreadstorage.pro5
-rw-r--r--tests/auto/qthreadstorage/tst_qthreadstorage.cpp297
-rw-r--r--tests/auto/qtime/.gitignore1
-rw-r--r--tests/auto/qtime/qtime.pro6
-rw-r--r--tests/auto/qtime/tst_qtime.cpp703
-rw-r--r--tests/auto/qtimeline/.gitignore1
-rw-r--r--tests/auto/qtimeline/qtimeline.pro5
-rw-r--r--tests/auto/qtimeline/tst_qtimeline.cpp709
-rw-r--r--tests/auto/qtimer/.gitignore1
-rw-r--r--tests/auto/qtimer/qtimer.pro5
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp420
-rw-r--r--tests/auto/qtmd5/.gitignore1
-rw-r--r--tests/auto/qtmd5/qtmd5.pro14
-rw-r--r--tests/auto/qtmd5/tst_qtmd5.cpp84
-rw-r--r--tests/auto/qtokenautomaton/.gitignore4
-rwxr-xr-xtests/auto/qtokenautomaton/generateTokenizers.sh9
-rw-r--r--tests/auto/qtokenautomaton/qtokenautomaton.pro17
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basic/basic.cpp480
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basic/basic.h101
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basic/basic.xml25
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp386
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h99
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.xml23
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp386
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/boilerplate/boilerplate.h98
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml67
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp449
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noNamespace/noNamespace.h99
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noNamespace/noNamespace.xml24
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noToString/noToString.cpp251
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noToString/noToString.h98
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/noToString/noToString.xml23
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp451
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/withNamespace/withNamespace.h102
-rw-r--r--tests/auto/qtokenautomaton/tokenizers/withNamespace/withNamespace.xml25
-rw-r--r--tests/auto/qtokenautomaton/tst_qtokenautomaton.cpp134
-rw-r--r--tests/auto/qtoolbar/.gitignore1
-rw-r--r--tests/auto/qtoolbar/qtoolbar.pro5
-rw-r--r--tests/auto/qtoolbar/tst_qtoolbar.cpp1034
-rw-r--r--tests/auto/qtoolbox/.gitignore1
-rw-r--r--tests/auto/qtoolbox/qtoolbox.pro5
-rw-r--r--tests/auto/qtoolbox/tst_qtoolbox.cpp338
-rw-r--r--tests/auto/qtoolbutton/.gitignore1
-rw-r--r--tests/auto/qtoolbutton/qtoolbutton.pro11
-rw-r--r--tests/auto/qtoolbutton/tst_qtoolbutton.cpp209
-rw-r--r--tests/auto/qtooltip/.gitignore1
-rw-r--r--tests/auto/qtooltip/qtooltip.pro2
-rw-r--r--tests/auto/qtooltip/tst_qtooltip.cpp159
-rw-r--r--tests/auto/qtransform/.gitignore1
-rw-r--r--tests/auto/qtransform/qtransform.pro7
-rw-r--r--tests/auto/qtransform/tst_qtransform.cpp777
-rw-r--r--tests/auto/qtransformedscreen/.gitignore1
-rw-r--r--tests/auto/qtransformedscreen/qtransformedscreen.pro7
-rw-r--r--tests/auto/qtransformedscreen/tst_qtransformedscreen.cpp194
-rw-r--r--tests/auto/qtranslator/.gitignore1
-rw-r--r--tests/auto/qtranslator/hellotr_la.qmbin0 -> 230 bytes-rw-r--r--tests/auto/qtranslator/hellotr_la.ts16
-rw-r--r--tests/auto/qtranslator/msgfmt_from_po.qmbin0 -> 176988 bytes-rw-r--r--tests/auto/qtranslator/qtranslator.pro11
-rw-r--r--tests/auto/qtranslator/tst_qtranslator.cpp241
-rw-r--r--tests/auto/qtreeview/.gitignore1
-rw-r--r--tests/auto/qtreeview/qtreeview.pro4
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp3259
-rw-r--r--tests/auto/qtreewidget/.gitignore1
-rw-r--r--tests/auto/qtreewidget/qtreewidget.pro4
-rw-r--r--tests/auto/qtreewidget/tst_qtreewidget.cpp3037
-rw-r--r--tests/auto/qtreewidgetitemiterator/.gitignore1
-rw-r--r--tests/auto/qtreewidgetitemiterator/qtreewidgetitemiterator.pro4
-rw-r--r--tests/auto/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp1251
-rw-r--r--tests/auto/qtwidgets/.gitignore1
-rw-r--r--tests/auto/qtwidgets/advanced.ui319
-rw-r--r--tests/auto/qtwidgets/icons/big.pngbin0 -> 1323 bytes-rw-r--r--tests/auto/qtwidgets/icons/folder.pngbin0 -> 4069 bytes-rw-r--r--tests/auto/qtwidgets/icons/icon.bmpbin0 -> 246 bytes-rw-r--r--tests/auto/qtwidgets/icons/icon.pngbin0 -> 344 bytes-rw-r--r--tests/auto/qtwidgets/mainwindow.cpp314
-rw-r--r--tests/auto/qtwidgets/mainwindow.h80
-rw-r--r--tests/auto/qtwidgets/qtstyles.qrc8
-rw-r--r--tests/auto/qtwidgets/qtwidgets.pro9
-rw-r--r--tests/auto/qtwidgets/standard.ui1207
-rw-r--r--tests/auto/qtwidgets/system.ui658
-rw-r--r--tests/auto/qtwidgets/tst_qtwidgets.cpp96
-rw-r--r--tests/auto/qudpsocket/.gitignore2
-rw-r--r--tests/auto/qudpsocket/clientserver/clientserver.pro8
-rw-r--r--tests/auto/qudpsocket/clientserver/main.cpp170
-rw-r--r--tests/auto/qudpsocket/qudpsocket.pro5
-rw-r--r--tests/auto/qudpsocket/test/test.pro26
-rw-r--r--tests/auto/qudpsocket/tst_qudpsocket.cpp787
-rw-r--r--tests/auto/qudpsocket/udpServer/main.cpp90
-rw-r--r--tests/auto/qudpsocket/udpServer/udpServer.pro6
-rw-r--r--tests/auto/qundogroup/.gitignore1
-rw-r--r--tests/auto/qundogroup/qundogroup.pro5
-rw-r--r--tests/auto/qundogroup/tst_qundogroup.cpp626
-rw-r--r--tests/auto/qundostack/.gitignore1
-rw-r--r--tests/auto/qundostack/qundostack.pro5
-rw-r--r--tests/auto/qundostack/tst_qundostack.cpp2940
-rw-r--r--tests/auto/qurl/.gitignore1
-rw-r--r--tests/auto/qurl/idna-test.c158
-rw-r--r--tests/auto/qurl/qurl.pro6
-rw-r--r--tests/auto/qurl/tst_qurl.cpp3672
-rw-r--r--tests/auto/quuid/.gitignore1
-rw-r--r--tests/auto/quuid/quuid.pro6
-rw-r--r--tests/auto/quuid/tst_quuid.cpp174
-rw-r--r--tests/auto/qvariant/.gitignore1
-rw-r--r--tests/auto/qvariant/qvariant.pro6
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp2917
-rw-r--r--tests/auto/qvarlengtharray/.gitignore1
-rw-r--r--tests/auto/qvarlengtharray/qvarlengtharray.pro5
-rw-r--r--tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp252
-rw-r--r--tests/auto/qvector/.gitignore1
-rw-r--r--tests/auto/qvector/qvector.pro6
-rw-r--r--tests/auto/qvector/tst_qvector.cpp224
-rw-r--r--tests/auto/qwaitcondition/.gitignore1
-rw-r--r--tests/auto/qwaitcondition/qwaitcondition.pro5
-rw-r--r--tests/auto/qwaitcondition/tst_qwaitcondition.cpp846
-rw-r--r--tests/auto/qwebframe/.gitignore1
-rw-r--r--tests/auto/qwebframe/dummy.cpp44
-rw-r--r--tests/auto/qwebframe/qwebframe.pro13
-rw-r--r--tests/auto/qwebpage/.gitignore1
-rw-r--r--tests/auto/qwebpage/dummy.cpp44
-rw-r--r--tests/auto/qwebpage/qwebpage.pro14
-rw-r--r--tests/auto/qwidget/.gitignore1
-rw-r--r--tests/auto/qwidget/geometry-fullscreen.datbin0 -> 46 bytes-rw-r--r--tests/auto/qwidget/geometry-maximized.datbin0 -> 46 bytes-rw-r--r--tests/auto/qwidget/geometry.datbin0 -> 46 bytes-rw-r--r--tests/auto/qwidget/qwidget.pro17
-rw-r--r--tests/auto/qwidget/qwidget.qrc7
-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Motif_data0.qsnapbin0 -> 722 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Motif_data1.qsnapbin0 -> 1509 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Motif_data2.qsnapbin0 -> 7965 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Motif_data3.qsnapbin0 -> 8265 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Windows_data0.qsnapbin0 -> 710 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Windows_data1.qsnapbin0 -> 1497 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Windows_data2.qsnapbin0 -> 7953 bytes-rw-r--r--tests/auto/qwidget/testdata/paintEvent/res_Windows_data3.qsnapbin0 -> 8253 bytes-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp8731
-rw-r--r--tests/auto/qwidget/tst_qwidget_mac_helpers.h47
-rw-r--r--tests/auto/qwidget/tst_qwidget_mac_helpers.mm33
-rw-r--r--tests/auto/qwidget_window/.gitignore1
-rw-r--r--tests/auto/qwidget_window/qwidget_window.pro4
-rw-r--r--tests/auto/qwidget_window/tst_qwidget_window.cpp304
-rw-r--r--tests/auto/qwidgetaction/.gitignore1
-rw-r--r--tests/auto/qwidgetaction/qwidgetaction.pro4
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp401
-rw-r--r--tests/auto/qwindowsurface/.gitignore1
-rw-r--r--tests/auto/qwindowsurface/qwindowsurface.pro5
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp269
-rw-r--r--tests/auto/qwineventnotifier/.gitignore1
-rw-r--r--tests/auto/qwineventnotifier/qwineventnotifier.pro6
-rw-r--r--tests/auto/qwineventnotifier/tst_qwineventnotifier.cpp149
-rw-r--r--tests/auto/qwizard/.gitignore1
-rw-r--r--tests/auto/qwizard/images/background.pngbin0 -> 22932 bytes-rw-r--r--tests/auto/qwizard/images/banner.pngbin0 -> 4230 bytes-rw-r--r--tests/auto/qwizard/images/logo.pngbin0 -> 1661 bytes-rw-r--r--tests/auto/qwizard/images/watermark.pngbin0 -> 15788 bytes-rw-r--r--tests/auto/qwizard/qwizard.pro9
-rw-r--r--tests/auto/qwizard/qwizard.qrc8
-rw-r--r--tests/auto/qwizard/tst_qwizard.cpp2521
-rw-r--r--tests/auto/qwmatrix/.gitignore1
-rw-r--r--tests/auto/qwmatrix/qwmatrix.pro6
-rw-r--r--tests/auto/qwmatrix/tst_qwmatrix.cpp449
-rw-r--r--tests/auto/qworkspace/.gitignore1
-rw-r--r--tests/auto/qworkspace/qworkspace.pro6
-rw-r--r--tests/auto/qworkspace/tst_qworkspace.cpp734
-rw-r--r--tests/auto/qwritelocker/.gitignore1
-rw-r--r--tests/auto/qwritelocker/qwritelocker.pro5
-rw-r--r--tests/auto/qwritelocker/tst_qwritelocker.cpp235
-rw-r--r--tests/auto/qwsembedwidget/.gitignore1
-rw-r--r--tests/auto/qwsembedwidget/qwsembedwidget.pro5
-rw-r--r--tests/auto/qwsembedwidget/tst_qwsembedwidget.cpp106
-rw-r--r--tests/auto/qwsinputmethod/.gitignore1
-rw-r--r--tests/auto/qwsinputmethod/qwsinputmethod.pro5
-rw-r--r--tests/auto/qwsinputmethod/tst_qwsinputmethod.cpp92
-rw-r--r--tests/auto/qwswindowsystem/.gitignore1
-rw-r--r--tests/auto/qwswindowsystem/qwswindowsystem.pro5
-rw-r--r--tests/auto/qwswindowsystem/tst_qwswindowsystem.cpp653
-rw-r--r--tests/auto/qx11info/.gitignore1
-rw-r--r--tests/auto/qx11info/qx11info.pro4
-rw-r--r--tests/auto/qx11info/tst_qx11info.cpp122
-rw-r--r--tests/auto/qxml/.gitignore1
-rw-r--r--tests/auto/qxml/0x010D.xml1
-rw-r--r--tests/auto/qxml/qxml.pro12
-rw-r--r--tests/auto/qxml/tst_qxml.cpp217
-rw-r--r--tests/auto/qxmlformatter/.gitignore1
-rw-r--r--tests/auto/qxmlformatter/baselines/.gitattributes1
-rw-r--r--tests/auto/qxmlformatter/baselines/K2-DirectConElemContent-46.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/adjacentNodes.xml16
-rw-r--r--tests/auto/qxmlformatter/baselines/classExample.xml5
-rw-r--r--tests/auto/qxmlformatter/baselines/documentElementWithWS.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/documentNodes.xml3
-rw-r--r--tests/auto/qxmlformatter/baselines/elementsWithWS.xml8
-rw-r--r--tests/auto/qxmlformatter/baselines/emptySequence.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/indentedAdjacentNodes.xml16
-rw-r--r--tests/auto/qxmlformatter/baselines/indentedMixedContent.xml20
-rw-r--r--tests/auto/qxmlformatter/baselines/mixedContent.xml17
-rw-r--r--tests/auto/qxmlformatter/baselines/mixedTopLevelContent.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/nodesAndWhitespaceAtomics.xml4
-rw-r--r--tests/auto/qxmlformatter/baselines/onlyDocumentNode.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/prolog.xml17
-rw-r--r--tests/auto/qxmlformatter/baselines/simpleDocument.xml3
-rw-r--r--tests/auto/qxmlformatter/baselines/singleElement.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/singleTextNode.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/textNodeAtomicValue.xml1
-rw-r--r--tests/auto/qxmlformatter/baselines/threeAtomics.xml1
-rw-r--r--tests/auto/qxmlformatter/input/K2-DirectConElemContent-46.xq1
-rw-r--r--tests/auto/qxmlformatter/input/adjacentNodes.xml16
-rw-r--r--tests/auto/qxmlformatter/input/adjacentNodes.xq1
-rw-r--r--tests/auto/qxmlformatter/input/classExample.xml1
-rw-r--r--tests/auto/qxmlformatter/input/classExample.xq1
-rw-r--r--tests/auto/qxmlformatter/input/documentElementWithWS.xml2
-rw-r--r--tests/auto/qxmlformatter/input/documentElementWithWS.xq1
-rw-r--r--tests/auto/qxmlformatter/input/documentNodes.xq7
-rw-r--r--tests/auto/qxmlformatter/input/elementsWithWS.xml12
-rw-r--r--tests/auto/qxmlformatter/input/elementsWithWS.xq1
-rw-r--r--tests/auto/qxmlformatter/input/emptySequence.xq2
-rw-r--r--tests/auto/qxmlformatter/input/indentedAdjacentNodes.xml16
-rw-r--r--tests/auto/qxmlformatter/input/indentedAdjacentNodes.xq1
-rw-r--r--tests/auto/qxmlformatter/input/indentedMixedContent.xml16
-rw-r--r--tests/auto/qxmlformatter/input/indentedMixedContent.xq1
-rw-r--r--tests/auto/qxmlformatter/input/mixedContent.xml1
-rw-r--r--tests/auto/qxmlformatter/input/mixedContent.xq1
-rw-r--r--tests/auto/qxmlformatter/input/mixedTopLevelContent.xq16
-rw-r--r--tests/auto/qxmlformatter/input/nodesAndWhitespaceAtomics.xq13
-rw-r--r--tests/auto/qxmlformatter/input/onlyDocumentNode.xq1
-rw-r--r--tests/auto/qxmlformatter/input/prolog.xml17
-rw-r--r--tests/auto/qxmlformatter/input/prolog.xq1
-rw-r--r--tests/auto/qxmlformatter/input/simpleDocument.xml4
-rw-r--r--tests/auto/qxmlformatter/input/simpleDocument.xq1
-rw-r--r--tests/auto/qxmlformatter/input/singleElement.xml1
-rw-r--r--tests/auto/qxmlformatter/input/singleElement.xq1
-rw-r--r--tests/auto/qxmlformatter/input/singleTextNode.xq1
-rw-r--r--tests/auto/qxmlformatter/input/textNodeAtomicValue.xq1
-rw-r--r--tests/auto/qxmlformatter/input/threeAtomics.xq1
-rw-r--r--tests/auto/qxmlformatter/qxmlformatter.pro10
-rw-r--r--tests/auto/qxmlformatter/tst_qxmlformatter.cpp205
-rw-r--r--tests/auto/qxmlinputsource/.gitignore1
-rw-r--r--tests/auto/qxmlinputsource/qxmlinputsource.pro6
-rw-r--r--tests/auto/qxmlinputsource/tst_qxmlinputsource.cpp212
-rw-r--r--tests/auto/qxmlitem/.gitignore1
-rw-r--r--tests/auto/qxmlitem/qxmlitem.pro4
-rw-r--r--tests/auto/qxmlitem/tst_qxmlitem.cpp373
-rw-r--r--tests/auto/qxmlname/.gitignore1
-rw-r--r--tests/auto/qxmlname/qxmlname.pro4
-rw-r--r--tests/auto/qxmlname/tst_qxmlname.cpp565
-rw-r--r--tests/auto/qxmlnamepool/.gitignore1
-rw-r--r--tests/auto/qxmlnamepool/qxmlnamepool.pro4
-rw-r--r--tests/auto/qxmlnamepool/tst_qxmlnamepool.cpp90
-rw-r--r--tests/auto/qxmlnodemodelindex/.gitignore1
-rw-r--r--tests/auto/qxmlnodemodelindex/qxmlnodemodelindex.pro4
-rw-r--r--tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp197
-rw-r--r--tests/auto/qxmlquery/.gitignore1
-rw-r--r--tests/auto/qxmlquery/MessageSilencer.h84
-rw-r--r--tests/auto/qxmlquery/MessageValidator.cpp102
-rw-r--r--tests/auto/qxmlquery/MessageValidator.h83
-rw-r--r--tests/auto/qxmlquery/NetworkOverrider.h98
-rw-r--r--tests/auto/qxmlquery/PushBaseliner.h149
-rw-r--r--tests/auto/qxmlquery/TestFundament.cpp91
-rw-r--r--tests/auto/qxmlquery/TestFundament.h67
-rw-r--r--tests/auto/qxmlquery/data/notWellformed.xml1
-rw-r--r--tests/auto/qxmlquery/data/oneElement.xml1
-rw-r--r--tests/auto/qxmlquery/input.qrc9
-rw-r--r--tests/auto/qxmlquery/input.xml2
-rw-r--r--tests/auto/qxmlquery/pushBaselines/allAtomics.ref45
-rw-r--r--tests/auto/qxmlquery/pushBaselines/concat.ref3
-rw-r--r--tests/auto/qxmlquery/pushBaselines/emptySequence.ref2
-rw-r--r--tests/auto/qxmlquery/pushBaselines/errorFunction.ref1
-rw-r--r--tests/auto/qxmlquery/pushBaselines/nodeSequence.ref81
-rw-r--r--tests/auto/qxmlquery/pushBaselines/oneElement.ref5
-rw-r--r--tests/auto/qxmlquery/pushBaselines/onePlusOne.ref3
-rw-r--r--tests/auto/qxmlquery/pushBaselines/onlyDocumentNode.ref4
-rw-r--r--tests/auto/qxmlquery/pushBaselines/openDocument.ref22
-rw-r--r--tests/auto/qxmlquery/qxmlquery.pro23
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp3230
-rw-r--r--tests/auto/qxmlresultitems/.gitignore1
-rw-r--r--tests/auto/qxmlresultitems/qxmlresultitems.pro4
-rw-r--r--tests/auto/qxmlresultitems/tst_qxmlresultitems.cpp240
-rw-r--r--tests/auto/qxmlserializer/.gitignore1
-rw-r--r--tests/auto/qxmlserializer/qxmlserializer.pro4
-rw-r--r--tests/auto/qxmlserializer/tst_qxmlserializer.cpp198
-rw-r--r--tests/auto/qxmlsimplereader/.gitattributes8
-rw-r--r--tests/auto/qxmlsimplereader/.gitignore1
-rw-r--r--tests/auto/qxmlsimplereader/encodings/doc_euc-jp.xml78
-rw-r--r--tests/auto/qxmlsimplereader/encodings/doc_iso-2022-jp.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/encodings/doc_little-endian.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qxmlsimplereader/encodings/doc_utf-16.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qxmlsimplereader/encodings/doc_utf-8.xml77
-rwxr-xr-xtests/auto/qxmlsimplereader/generate_ref_files.sh3
-rw-r--r--tests/auto/qxmlsimplereader/parser/main.cpp122
-rw-r--r--tests/auto/qxmlsimplereader/parser/parser.cpp455
-rw-r--r--tests/auto/qxmlsimplereader/parser/parser.h64
-rw-r--r--tests/auto/qxmlsimplereader/parser/parser.pro15
-rw-r--r--tests/auto/qxmlsimplereader/qxmlsimplereader.pro19
-rw-r--r--tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp767
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/001.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/001.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/002.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/002.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/003.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/003.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/004.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/004.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/005.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/005.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/006.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/006.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/007.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/007.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/008.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/008.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/009.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/009.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/010.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/010.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/011.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/011.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/012.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/012.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/013.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/013.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/014.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/014.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/015.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/015.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/016.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/016.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/017.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/017.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/018.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/018.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/019.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/019.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/020.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/020.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/021.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/021.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/022.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/022.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/023.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/023.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/024.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/024.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/025.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/025.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/026.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/026.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/027.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/027.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/028.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/028.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/029.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/029.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/030.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/030.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/031.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/031.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/032.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/032.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/033.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/033.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/034.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/034.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/035.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/035.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/036.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/036.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/037.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/037.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/038.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/038.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/039.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/039.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/040.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/040.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/041.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/041.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/042.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/042.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/043.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/043.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/044.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/044.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/045.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/045.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/046.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/046.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/047.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/047.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/048.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/048.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/049.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/049.xml.ref14
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/050.xml0
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/050.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/051.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/051.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/052.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/052.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/053.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/053.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/054.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/054.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/055.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/055.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/056.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/056.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/057.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/057.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/058.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/058.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/059.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/059.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/060.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/060.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/061.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/061.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/062.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/062.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/063.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/063.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/064.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/064.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/065.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/065.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/066.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/066.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/067.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/067.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/068.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/068.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/069.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/069.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/070.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/070.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/071.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/071.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/072.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/072.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/073.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/073.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/074.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/074.xml.ref14
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/075.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/075.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/076.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/076.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/077.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/077.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/078.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/078.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/079.xml8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/079.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/080.xml8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/080.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/081.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/081.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/082.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/082.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/083.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/083.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/084.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/084.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/085.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/085.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/086.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/086.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/087.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/087.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/088.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/088.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/089.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/089.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/090.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/090.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/091.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/091.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/092.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/092.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/093.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/093.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/094.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/094.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/095.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/095.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/096.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/096.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/097.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/097.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/098.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/098.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/099.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/099.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/100.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/100.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/101.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/101.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/102.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/102.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/103.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/103.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/104.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/104.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/105.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/105.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/106.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/106.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/107.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/107.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/108.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/108.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/109.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/109.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/110.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/110.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/111.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/111.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/112.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/112.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/113.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/113.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/114.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/114.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/115.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/115.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/116.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/116.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/117.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/117.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/118.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/118.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/119.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/119.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/120.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/120.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/121.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/121.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/122.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/122.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/123.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/123.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/124.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/124.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/125.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/125.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/126.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/126.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/127.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/127.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/128.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/128.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/129.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/129.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/130.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/130.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/131.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/131.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/132.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/132.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/133.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/133.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/134.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/134.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/135.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/135.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/136.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/136.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/137.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/137.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/138.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/138.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/139.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/139.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/140.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/140.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/141.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/141.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/142.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/142.xml.refbin0 -> 309 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/143.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/143.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/144.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/144.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/145.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/145.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/146.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/146.xml.refbin0 -> 309 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/147.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/147.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/148.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/148.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/149.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/149.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/150.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/150.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/151.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/151.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/152.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/152.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/153.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/153.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/154.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/154.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/155.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/155.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/156.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/156.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/157.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/157.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/158.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/158.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/159.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/159.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/160.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/160.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/161.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/161.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/162.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/162.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/163.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/163.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/164.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/164.xml.ref5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/165.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/165.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/166.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/166.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/167.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/167.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/168.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/168.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/169.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/169.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/170.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/171.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/171.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/172.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/172.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/173.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/173.xml.ref3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/174.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/174.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/175.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/175.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/176.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/176.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/177.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/177.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/178.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/178.xml.ref6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/179.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/179.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/180.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/180.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/181.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/181.xml.ref11
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/182.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/182.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/183.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/183.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/184.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/184.xml.ref4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/185.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/185.xml3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/185.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/186.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/186.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/not-wf/sa/null.ent0
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/001.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/001.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/002.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/002.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/003.ent0
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/003.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/004.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/004.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/005.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/005.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/006.ent4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/006.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/007.entbin0 -> 4 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/007.xml.ref11
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/008.entbin0 -> 54 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/008.xml.ref11
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/009.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/009.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/010.ent0
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/010.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/011.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/011.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/012.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/012.xml.ref14
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/013.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/013.xml.ref12
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/014.entbin0 -> 12 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/014.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml13
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_1.xml.ref47
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml14
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_2.xml.ref47
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/undef_entity_3.xml.ref16
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/001.ent0
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/001.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/001.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/002.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/002.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/002.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/003-1.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/003-2.ent0
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/003.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/003.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/004-1.ent4
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/004-2.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/004.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/004.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/005-1.ent3
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/005-2.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/005.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/005.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/006.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/006.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/006.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/007.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/007.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/007.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/008.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/008.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/008.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/009.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/009.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/009.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/010.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/010.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/010.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/011.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/011.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/011.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/012.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/012.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/012.xml.ref10
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/013.ent4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/013.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/013.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/014.ent4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/014.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/014.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/015.ent5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/015.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/015.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/016.ent4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/016.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/016.xml.ref8
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/017.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/017.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/017.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/018.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/018.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/018.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/019.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/019.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/019.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/020.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/020.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/020.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/021.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/021.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/021.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/022.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/022.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/022.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/023.ent5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/023.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/023.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/024.ent4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/024.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/024.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/025.ent5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/025.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/025.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/026.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/026.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/026.xml.ref12
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/027.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/027.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/027.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/028.ent2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/028.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/028.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/029.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/029.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/029.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/030.ent3
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/030.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/030.xml.ref7
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/031-1.ent3
-rwxr-xr-xtests/auto/qxmlsimplereader/xmldocs/valid/not-sa/031-2.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/031.xml2
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/not-sa/031.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/001.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/001.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/002.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/002.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/003.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/003.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/004.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/004.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/005.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/005.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/006.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/006.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/007.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/007.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/008.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/008.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/009.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/009.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/010.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/010.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/011.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/011.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/012.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/012.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/013.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/013.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/014.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/014.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/015.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/015.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/016.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/016.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/017.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/017.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/018.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/018.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/019.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/019.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/020.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/020.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/021.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/021.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/022.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/022.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/023.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/023.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/024.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/024.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/025.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/025.xml.ref11
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/026.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/026.xml.ref11
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/027.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/027.xml.ref11
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/028.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/028.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/029.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/029.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/030.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/030.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/031.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/031.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/032.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/032.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/033.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/033.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/034.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/034.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/035.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/035.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/036.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/036.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/037.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/037.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/038.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/038.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/039.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/039.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/040.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/040.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/041.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/041.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/042.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/042.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/043.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/043.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/044.xml10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/044.xml.ref20
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/045.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/045.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/046.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/046.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/047.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/047.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/048.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/048.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/049.xmlbin0 -> 124 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/049.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/050.xmlbin0 -> 132 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/050.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/051.xmlbin0 -> 140 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/051.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/052.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/052.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/053.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/053.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/054.xml10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/054.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/055.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/055.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/056.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/056.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/057.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/057.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/058.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/058.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/059.xml10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/059.xml.ref20
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/060.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/060.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/061.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/061.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/062.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/062.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/063.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/063.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/064.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/064.xml.refbin0 -> 312 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/065.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/065.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/066.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/066.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/067.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/067.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/068.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/068.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/069.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/069.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/070.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/070.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/071.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/071.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/072.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/072.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/073.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/073.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/074.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/074.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/075.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/075.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/076.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/076.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/077.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/077.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/078.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/078.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/079.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/079.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/080.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/080.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/081.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/081.xml.ref15
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/082.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/082.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/083.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/083.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/084.xml1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/084.xml.ref7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/085.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/085.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/086.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/086.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/087.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/087.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/088.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/088.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/089.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/089.xml.bak5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/089.xml.refbin0 -> 381 bytes-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/090.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/090.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/091.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/091.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/092.xml10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/092.xml.ref17
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/093.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/093.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/094.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/094.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/095.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/095.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/096.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/096.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/097.ent1
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/097.xml8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/097.xml.ref12
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/098.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/098.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/099.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/099.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/100.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/100.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/101.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/101.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/102.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/102.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/103.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/103.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/104.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/104.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/105.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/105.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/106.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/106.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/107.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/107.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/108.xml7
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/108.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/109.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/109.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/110.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/110.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/111.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/111.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/112.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/112.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/113.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/113.xml.ref8
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/114.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/114.xml.ref11
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/115.xml6
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/115.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/116.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/116.xml.ref10
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/117.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/117.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/118.xml5
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/118.xml.ref9
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/119.xml4
-rw-r--r--tests/auto/qxmlsimplereader/xmldocs/valid/sa/119.xml.ref8
-rw-r--r--tests/auto/qxmlstream/.gitattributes10
-rw-r--r--tests/auto/qxmlstream/.gitignore1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/matrix.html4597
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/CVS/Entries17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/changes.html384
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/CVS/Entries46
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E14.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E14.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15a.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15b.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15c.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15d.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15e.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15f.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15g.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15h.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15i.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15j.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15k.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E15l.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E18-ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E18.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E19.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E19.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E20.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E22.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E24.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E27.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E29.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E2a.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E2b.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E34.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E36.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E36.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E38.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E38.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E41.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E48.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E50.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E55.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E57.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E60.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E60.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E61.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E9a.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/E9b.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/errata2e.xml222
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/E18.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/E19.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/out/E24.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir1/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir1/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir1/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir1/E18-ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir1/E18-pe2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir2/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir2/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir2/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir2/E18-ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/subdir2/E18-extpe1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/testcases.dtd103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-2e/xmlconf.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/CVS/Entries17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E05a.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E05b.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06a.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06b.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06c.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06d.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06e.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06f.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06g.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06h.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E06i.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E12.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/E13.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/errata3e.xml67
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/testcases.dtd103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/errata-3e/xmlconf.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/001.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/002.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/003.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/004.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/005.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/006.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/007.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/008.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/009.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/010.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/011.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/012.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/013.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/014.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/015.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/016.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/017.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/018.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/019.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/020.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/021.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/022.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/023.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/024.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/025.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/026.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/027.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/028.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/029.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/030.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/031.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/032.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/033.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/034.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/035.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/036.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/037.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/038.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/039.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/040.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/041.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/042.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/043.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/044.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/045.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/046.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/CVS/Entries48
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.0/rmt-ns10.xml151
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/001.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/002.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/003.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/004.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/005.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/006.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/1.1/rmt-ns11.xml23
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/CVS/Entries.Log3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/NE13a.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/NE13b.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/NE13c.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/errata1e.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/testcases.dtd103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/errata-1e/xmlconf.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/testcases.dtd103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/namespaces/xmlconf.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/001.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/001.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/002.pe2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/002.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/003.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/003.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/004.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/004.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/005.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/005_1.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/005_2.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/006.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/006_1.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/006_2.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/007.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/008.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/009.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/009.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/010.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/011.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/012.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/013.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/014.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/015.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/016.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/017.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/018.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/019.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/020.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/021.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/022.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/023.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/024.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/025.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/026.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/027.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/028.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/029.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/030.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/031.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/032.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/033.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/034.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/035.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/036.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/037.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/038.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/039.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/040.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/041.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/042.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/043.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/044.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/045.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/046.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/047.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/048.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/049.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/050.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/051.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/052.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/053.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/054.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/055.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/056.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/057.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/CVS/Entries70
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/006.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/007.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/010.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/012.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/015.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/017.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/018.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/022.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/023.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/024.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/025.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/026.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/027.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/028.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/029.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/030.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/031.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/032.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/033.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/034.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/035.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/036.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/037.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/040.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/043.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/044.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/045.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/046.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/047.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/048.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/049.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/050.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/051.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/052.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/053.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/054.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/CVS/Entries37
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/testcases.dtd103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/xml11.xml286
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/eduni/xml-1.1/xmlconf.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/a_oasis-logo.gifbin0 -> 9383 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/committee.css63
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/files/top3.jpebin0 -> 22775 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/finalCatalog.xml8741
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/ibm_oasis_invalid.xml283
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/ibm_oasis_not-wf.xml3125
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/ibm_oasis_readme.txt43
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/ibm_oasis_valid.xml743
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/CVS/Entries15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/ibm28i01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P28/out/ibm28i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i01.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i03.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i03.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i04.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/ibm32i04.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/ibm32i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/ibm32i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P32/out/ibm32i04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/ibm39i01.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/ibm39i02.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/ibm39i03.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/ibm39i04.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/ibm39i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/ibm39i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/ibm39i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P39/out/ibm39i04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/ibm41i01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/ibm41i02.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/out/ibm41i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P41/out/ibm41i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/ibm45i01.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P45/out/ibm45i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/ibm49i01.dtd11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/ibm49i01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/ibm49i02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/out/ibm49i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P49/out/ibm49i02.xml0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/ibm50i01.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/ibm50i01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P50/out/ibm50i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/ibm51i01.dtd16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/ibm51i01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/ibm51i03.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/ibm51i03.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/ibm51i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/ibm51i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P51/out/ibm51i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/CVS/Entries18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i02.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i05.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i06.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i07.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i08.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i09.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i10.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i11.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i12.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i13.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i14.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i15.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i16.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i17.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/ibm56i18.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/CVS/Entries18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i07.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i08.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i09.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i10.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i11.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i12.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i13.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i14.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i15.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i16.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i17.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P56/out/ibm56i18.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/ibm58i01.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/ibm58i02.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/out/ibm58i01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P58/out/ibm58i02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/ibm59i01.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P59/out/ibm59i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/ibm60i01.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/ibm60i02.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/ibm60i03.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/ibm60i04.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/ibm60i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/ibm60i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/ibm60i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P60/out/ibm60i04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i01.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i02.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i03.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i04.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/ibm68i04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/ibm68i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/ibm68i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/ibm68i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P68/out/ibm68i04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i02.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i03.ent7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i04.ent8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/ibm69i04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/ibm69i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/ibm69i02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/ibm69i03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P69/out/ibm69i04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/ibm76i01.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/invalid/P76/out/ibm76i01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/CVS/Entries79
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/ibm01n01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/ibm01n02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P01/ibm01n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/CVS/Entries34
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n01.xmlbin0 -> 91 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n18.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n19.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n20.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n21.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n25.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n26.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n27.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n29.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n30.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n31.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n32.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P02/ibm02n33.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P03/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P03/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P03/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P03/ibm03n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/CVS/Entries19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n06.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n07.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n08.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n09.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n10.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n11.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n12.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n13.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n14.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n15.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n16.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n17.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P04/ibm04n18.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/ibm05n01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/ibm05n02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/ibm05n03.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/ibm05n04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P05/ibm05n05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/ibm09n01.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/ibm09n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/ibm09n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P09/ibm09n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n01.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n02.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n03.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n04.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n05.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n06.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n07.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P10/ibm10n08.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/ibm11n01.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/ibm11n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/ibm11n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P11/ibm11n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/ibm12n01.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/ibm12n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P12/ibm12n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/ibm13n01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/ibm13n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/ibm13n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P13/student.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/ibm14n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/ibm14n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P14/ibm14n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/ibm15n01.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/ibm15n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/ibm15n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P15/ibm15n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/ibm16n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/ibm16n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/ibm16n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P16/ibm16n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/ibm17n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/ibm17n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/ibm17n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P17/ibm17n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P18/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P18/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P18/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P18/ibm18n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P18/ibm18n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/ibm19n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/ibm19n02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P19/ibm19n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P20/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P20/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P20/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P20/ibm20n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/ibm21n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/ibm21n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P21/ibm21n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/ibm22n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/ibm22n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P22/ibm22n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P23/ibm23n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P24/ibm24n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P25/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P25/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P25/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P25/ibm25n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P25/ibm25n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P26/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P26/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P26/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P26/ibm26n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P27/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P27/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P27/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P27/ibm27n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n01.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n04.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P28/ibm28n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/cat.txt1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n01.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P29/ibm29n07.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P30/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P30/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P30/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P30/ibm30n01.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P30/ibm30n01.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P31/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P31/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P31/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P31/ibm31n01.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P31/ibm31n01.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/CVS/Entries12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n06.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n06.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n07.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n09.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P32/ibm32n09.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P39/ibm39n06.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/ibm40n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/ibm40n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/ibm40n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/ibm40n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P40/ibm40n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/CVS/Entries18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n09.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n10.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n10.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n11.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n11.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n12.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n13.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P41/ibm41n14.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/ibm42n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/ibm42n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/ibm42n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/ibm42n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P42/ibm42n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/ibm43n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/ibm43n02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/ibm43n04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P43/ibm43n05.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/ibm44n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/ibm44n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/ibm44n03.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P44/ibm44n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P45/ibm45n09.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/ibm46n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/ibm46n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/ibm46n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/ibm46n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P46/ibm46n05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P47/ibm47n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P48/ibm48n07.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P49/ibm49n06.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P50/ibm50n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P51/ibm51n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P52/ibm52n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n07.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P53/ibm53n08.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P54/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P54/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P54/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P54/ibm54n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P54/ibm54n02.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/ibm55n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/ibm55n02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P55/ibm55n03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n04.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n05.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n06.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P56/ibm56n07.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P57/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P57/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P57/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P57/ibm57n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n01.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n02.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n03.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n04.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n05.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n06.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n07.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P58/ibm58n08.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n01.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n02.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n03.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n04.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n05.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P59/ibm59n06.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n02.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n03.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n04.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n05.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n06.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n07.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P60/ibm60n08.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P61/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P61/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P61/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P61/ibm61n01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P61/ibm61n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/CVS/Entries17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n01.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n02.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n03.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n04.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n05.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n06.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n07.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n08.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P62/ibm62n08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/CVS/Entries15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n02.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n03.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n04.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n04.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n05.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n05.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n06.dtd9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n07.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P63/ibm63n07.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n01.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n02.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n03.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P64/ibm64n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/ibm65n01.dtd12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/ibm65n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/ibm65n02.dtd13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P65/ibm65n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/CVS/Entries16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n09.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n10.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n11.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n12.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n13.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n14.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P66/ibm66n15.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/CVS/Entries12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n06.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n08.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n09.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P68/ibm68n10.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n03.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n05.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P69/ibm69n07.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm70n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P71/ibm71n08.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n01.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n08.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P72/ibm72n09.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P73/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P73/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P73/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P73/ibm73n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P73/ibm73n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P74/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P74/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P74/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P74/ibm74n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/CVS/Entries15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/empty.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n07.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n08.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n09.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n10.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n11.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n12.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P75/ibm75n13.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n05.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n06.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P76/ibm76n07.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n01.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n02.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n03.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n04.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P77/ibm77n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/ibm78n01.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/ibm78n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/ibm78n02.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P78/ibm78n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/ibm79n01.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/ibm79n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/ibm79n02.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P79/ibm79n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P80/ibm80n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n06.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n07.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n08.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P81/ibm81n09.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n05.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n06.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n07.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P82/ibm82n08.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n05.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P83/ibm83n06.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/CVS/Entries199
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n100.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n101.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n102.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n103.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n104.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n105.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n106.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n107.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n108.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n109.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n110.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n111.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n112.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n113.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n114.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n115.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n116.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n117.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n118.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n119.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n120.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n121.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n122.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n123.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n124.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n125.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n126.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n127.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n128.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n129.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n130.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n131.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n132.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n133.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n134.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n135.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n136.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n137.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n138.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n139.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n140.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n141.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n142.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n143.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n144.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n145.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n146.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n147.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n148.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n149.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n150.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n151.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n152.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n153.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n154.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n155.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n156.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n157.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n158.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n159.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n160.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n161.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n162.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n163.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n164.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n165.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n166.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n167.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n168.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n169.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n170.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n171.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n172.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n173.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n174.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n175.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n176.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n177.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n178.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n179.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n18.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n180.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n181.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n182.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n183.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n184.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n185.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n186.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n187.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n188.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n189.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n19.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n190.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n191.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n192.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n193.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n194.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n195.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n196.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n197.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n198.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n20.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n21.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n25.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n26.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n27.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n29.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n30.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n31.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n32.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n33.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n34.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n35.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n36.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n37.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n38.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n39.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n40.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n41.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n42.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n43.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n44.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n45.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n46.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n47.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n48.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n49.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n50.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n51.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n52.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n53.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n54.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n55.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n56.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n57.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n58.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n59.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n60.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n61.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n62.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n63.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n64.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n65.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n66.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n67.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n68.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n69.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n70.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n71.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n72.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n73.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n74.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n75.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n76.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n77.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n78.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n79.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n80.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n81.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n82.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n83.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n84.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n85.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n86.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n87.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n88.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n89.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n90.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n91.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n92.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n93.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n94.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n95.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n96.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n97.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n98.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P85/ibm85n99.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/ibm86n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/ibm86n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/ibm86n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P86/ibm86n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/CVS/Entries85
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n18.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n19.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n20.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n21.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n25.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n26.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n27.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n29.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n30.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n31.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n32.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n33.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n34.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n35.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n36.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n37.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n38.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n39.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n40.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n41.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n42.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n43.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n44.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n45.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n46.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n47.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n48.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n49.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n50.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n51.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n52.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n53.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n54.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n55.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n56.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n57.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n58.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n59.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n60.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n61.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n62.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n63.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n64.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n66.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n67.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n68.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n69.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n70.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n71.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n72.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n73.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n74.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n75.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n76.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n77.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n78.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n79.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n80.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n81.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n82.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n83.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n84.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P87/ibm87n85.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/CVS/Entries16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P88/ibm88n16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/CVS/Entries13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/P89/ibm89n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/432gewf.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/ltinentval.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/misc/simpleltinentval.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/p28a/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/p28a/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/p28a/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/p28a/ibm28an01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/not-wf/p28a/ibm28an01.xml22
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/CVS/Entries70
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/ibm01v01.xml24
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P01/out/ibm01v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/ibm02v01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P02/out/ibm02v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/ibm03v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P03/out/ibm03v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v01.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v03.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v03.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/ibm09v05.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/ibm09v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/ibm09v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/ibm09v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/ibm09v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/out/ibm09v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P09/student.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v01.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v02.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v03.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v04.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v05.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v06.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v07.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/ibm10v08.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v07.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P10/out/ibm10v08.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/ibm11v01.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/ibm11v02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/ibm11v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/ibm11v04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/ibm11v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/ibm11v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/ibm11v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/out/ibm11v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P11/student.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/ibm12v01.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/ibm12v02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/ibm12v03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/ibm12v04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/ibm12v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/ibm12v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/ibm12v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/out/ibm12v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P12/student.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/ibm13v01.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/out/ibm13v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P13/student.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/ibm14v01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/ibm14v02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/ibm14v03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/ibm14v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/ibm14v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P14/out/ibm14v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/ibm15v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/ibm15v02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/ibm15v03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/ibm15v04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/ibm15v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/ibm15v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/ibm15v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P15/out/ibm15v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/ibm16v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/ibm16v02.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/ibm16v03.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/ibm16v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/ibm16v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P16/out/ibm16v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/ibm17v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P17/out/ibm17v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/ibm18v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P18/out/ibm18v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/ibm19v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P19/out/ibm19v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/ibm20v01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/ibm20v02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/out/ibm20v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P20/out/ibm20v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/ibm21v01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P21/out/ibm21v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/ibm22v07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P22/out/ibm22v07.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/ibm23v06.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P23/out/ibm23v06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/ibm24v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/ibm24v02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/out/ibm24v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P24/out/ibm24v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/ibm25v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/ibm25v02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/ibm25v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/ibm25v04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/ibm25v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/ibm25v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/ibm25v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P25/out/ibm25v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/ibm26v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P26/out/ibm26v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/ibm27v01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/ibm27v02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/ibm27v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/ibm27v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/ibm27v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P27/out/ibm27v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/ibm28v01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/ibm28v02.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/ibm28v02.txt1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/ibm28v02.xml26
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/out/ibm28v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P28/out/ibm28v02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/ibm29v01.txt1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/ibm29v01.xml24
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/ibm29v02.xml25
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/out/ibm29v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P29/out/ibm29v02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/ibm30v01.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/ibm30v01.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/ibm30v02.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/ibm30v02.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/out/ibm30v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P30/out/ibm30v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/ibm31v01.dtd15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/ibm31v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P31/out/ibm31v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/CVS/Entries9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v01.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v02.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v03.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v03.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v04.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/ibm32v04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/ibm32v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/ibm32v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/ibm32v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P32/out/ibm32v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/ibm33v01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P33/out/ibm33v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/ibm34v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P34/out/ibm34v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/ibm35v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P35/out/ibm35v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/ibm36v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P36/out/ibm36v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/ibm37v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P37/out/ibm37v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/ibm38v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P38/out/ibm38v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/ibm39v01.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P39/out/ibm39v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/ibm40v01.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P40/out/ibm40v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/ibm41v01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P41/out/ibm41v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/ibm42v01.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P42/out/ibm42v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/ibm43v01.xml24
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P43/out/ibm43v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/ibm44v01.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P44/out/ibm44v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/ibm45v01.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P45/out/ibm45v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/ibm47v01.xml27
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P47/out/ibm47v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/ibm49v01.dtd13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/ibm49v01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P49/out/ibm49v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/ibm50v01.dtd13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/ibm50v01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P50/out/ibm50v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/ibm51v01.xml22
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/ibm51v02.dtd20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/ibm51v02.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/out/ibm51v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P51/out/ibm51v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/ibm52v01.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P52/out/ibm52v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/ibm54v01.xml50
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/ibm54v02.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/ibm54v03.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/ibmlogo.gifbin0 -> 1082 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/ibm54v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/ibm54v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/out/ibm54v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P54/xmltech.gifbin0 -> 4070 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/ibm55v01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P55/out/ibm55v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/CVS/Entries11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v01.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v04.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v05.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v06.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v07.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v08.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v09.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/ibm56v10.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/CVS/Entries11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v07.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v08.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v09.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P56/out/ibm56v10.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/ibm57v01.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P57/out/ibm57v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/ibm58v01.xml21
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/ibm58v02.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/out/ibm58v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P58/out/ibm58v02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/ibm59v01.xml18
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/ibm59v02.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/out/ibm59v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P59/out/ibm59v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/ibm60v01.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/ibm60v02.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/ibm60v03.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/ibm60v04.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/ibm60v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/ibm60v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/ibm60v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P60/out/ibm60v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/ibm61v01.dtd7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/ibm61v01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/ibm61v02.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/ibm61v02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/out/ibm61v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P61/out/ibm61v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/CVS/Entries11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v01.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v02.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v03.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v04.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v04.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v05.dtd7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/ibm62v05.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/ibm62v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/ibm62v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/ibm62v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/ibm62v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P62/out/ibm62v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/CVS/Entries11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v02.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v03.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v04.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v04.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v05.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/ibm63v05.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/ibm63v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/ibm63v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/ibm63v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/ibm63v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P63/out/ibm63v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v01.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v02.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v03.dtd20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/ibm64v03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/CVS/Entries4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/ibm64v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/ibm64v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P64/out/ibm64v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/ibm65v01.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/ibm65v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/ibm65v02.dtd10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/ibm65v02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/out/ibm65v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P65/out/ibm65v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/ibm66v01.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P66/out/ibm66v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/ibm67v01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P67/out/ibm67v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/ibm68v01.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/ibm68v01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/ibm68v02.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/ibm68v02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/out/ibm68v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P68/out/ibm68v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/ibm69v01.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/ibm69v01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/ibm69v02.ent6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/ibm69v02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/out/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/out/ibm69v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P69/out/ibm69v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/ibm70v01.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/ibm70v01.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P70/out/ibm70v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/ibm78v01.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/ibm78v01.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/ibm78v02.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/ibm78v03.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P78/out/ibm78v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/ibm79v01.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/ibm79v01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P79/out/ibm79v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/ibm82v01.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P82/out/ibm82v01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/ibm85v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P85/out/ibm85v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/ibm86v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P86/out/ibm86v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/ibm87v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P87/out/ibm87v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/ibm88v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P88/out/ibm88v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/ibm89v01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/valid/P89/out/ibm89v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/ibm_invalid.xml35
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/ibm_not-wf.xml700
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/ibm_valid.xml332
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/CVS/Entries1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/P46/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/P46/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/P46/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/P46/ibm46i01.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/invalid/P46/ibm46i02.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/CVS/Entries5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/CVS/Entries75
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n03.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n04.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n05.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n06.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n07.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n08.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n09.xmlbin0 -> 121 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n10.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n11.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n12.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n13.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n14.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n15.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n16.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n17.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n18.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n19.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n20.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n21.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n22.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n23.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n24.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n25.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n26.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n27.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n28.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n29.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n30.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n31.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n32.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n33.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n34.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n35.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n36.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n37.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n38.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n39.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n40.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n41.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n42.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n43.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n44.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n45.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n46.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n47.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n48.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n49.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n50.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n51.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n52.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n53.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n54.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n55.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n56.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n57.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n58.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n59.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n60.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n61.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n62.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n63.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n64.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n64.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n65.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n65.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n66.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n66.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n67.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n68.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n69.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n70.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P02/ibm02n71.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/CVS/Entries29
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n18.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n19.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n20.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n21.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n25.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n26.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n27.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04/ibm04n28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/CVS/Entries29
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an13.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an14.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an15.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an16.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an18.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an19.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an20.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an21.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an25.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an26.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an27.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P04a/ibm04an28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n04.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P05/ibm05n06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/CVS/Entries48
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n01.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n01.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n02.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n02.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n03.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n03.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n04.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n05.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n06.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n07.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n07.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n08.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n08.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n09.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n09.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n10.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n11.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n11.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n12.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n12.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n13.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n13.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n13.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n14.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n14.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n15.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n15.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n15.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n16.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n16.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n17.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n17.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n18.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n18.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n19.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n19.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n19.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n20.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n20.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n20.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n21.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n21.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/not-wf/P77/ibm77n21.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v01.xml22
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v02.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v03.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v04.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v05.xml31
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v06.ent17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P02/ibm02v06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/CVS/Entries15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v01.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v02.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v03.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v04.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v07.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v09.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/ibm03v09.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/CVS/Entries10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v07.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v08.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P03/out/ibm03v09.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04/ibm04v01.xml66
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04a/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04a/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04a/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P04a/ibm04av01.xml97
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/ibm05v01.xml103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/ibm05v02.xml55
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/ibm05v03.xml103
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/ibm05v04.xml199
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P05/ibm05v05.xml183
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P07/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P07/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P07/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P07/ibm07v01.xml82
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/CVS/Entries61
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v01.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v02.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v03.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v04.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v05.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v06.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v06.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v07.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v07.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v08.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v08.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v09.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v09.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v10.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v10.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v11.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v11.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v12.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v12.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v13.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v13.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v14.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v14.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v15.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v15.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v16.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v16.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v17.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v17.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v18.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v18.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v19.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v19.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v20.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v20.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v21.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v21.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v22.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v22.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v23.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v23.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v24.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v24.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v25.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v25.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v26.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v26.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v27.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v27.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v28.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v28.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v29.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v29.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v30.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/ibm/xml-1.1/valid/P77/ibm77v30.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/CVS/Entries20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/japanese.xml88
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-euc-jp.xml3549
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-iso-2022-jp.xml3549
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-little-endian.xmlbin0 -> 313076 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-shift_jis.xml3549
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-utf-16.xmlbin0 -> 313074 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/pr-xml-utf-8.xml3548
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/spec.dtd975
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-euc-jp.dtd72
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-euc-jp.xml78
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-iso-2022-jp.dtd72
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-iso-2022-jp.xml78
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-little-endian.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-shift_jis.dtd72
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-shift_jis.xml78
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-utf-16.dtdbin0 -> 5222 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-utf-16.xmlbin0 -> 3186 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-utf-8.dtd71
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/japanese/weekly-utf-8.xml78
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/CVS/Entries373
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/e2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/oasis.xml1637
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01fail1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01fail2.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01fail3.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01pass1.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01pass2.xml23
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p01pass3.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail1.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail10.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail11.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail12.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail13.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail14.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail15.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail16.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail17.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail18.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail19.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail2.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail20.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail21.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail22.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail23.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail24.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail25.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail26.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail27.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail28.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail29.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail3.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail30.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail31.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail4.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail5.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail6.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail7.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail8.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p02fail9.xmlbin0 -> 26 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail1.xmlbin0 -> 7 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail10.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail11.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail12.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail13.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail14.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail15.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail16.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail17.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail18.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail19.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail20.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail21.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail22.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail23.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail24.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail25.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail26.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail27.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail28.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail29.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail5.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail7.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail8.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03fail9.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p03pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p04fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p04fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p04fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p04pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05fail5.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p05pass1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p06fail1.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p06pass1.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p07pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p08fail1.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p08fail2.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p08pass1.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail1.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail2.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09pass1.dtd5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p09pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p10fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p10fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p10fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p10pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p11fail1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p11fail2.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p11pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail2.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail3.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail4.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail5.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail6.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12fail7.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p12pass1.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p14fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p14fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p14fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p14pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p15fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p15fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p15fail3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p15pass1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16fail1.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16fail3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16pass1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p16pass3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p18fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p18fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p18fail3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p18pass1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22fail1.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22fail2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass3.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass4.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass5.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p22pass6.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23fail3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23fail4.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23fail5.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23pass3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p23pass4.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24pass3.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p24pass4.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p25fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p25pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p25pass2.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p26fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p26fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p26pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p27fail1.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p27pass1.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p27pass2.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p27pass3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p27pass4.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28fail1.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass2.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass4.dtd1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass4.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass5.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p28pass5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p29fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p29pass1.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30fail1.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30pass1.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30pass2.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p30pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31fail1.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31pass1.dtd0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31pass2.dtd11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p31pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32fail3.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32fail4.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32fail5.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p32pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39fail3.xml0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39fail5.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p39pass2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40pass2.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40pass3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p40pass4.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p41fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p41fail2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p41fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p41pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p41pass2.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p42fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p42fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p42fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p42pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p42pass2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p43fail1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p43fail2.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p43fail3.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p43pass1.xml27
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44fail5.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44pass1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44pass2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44pass3.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44pass4.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p44pass5.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p45fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p45fail2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p45fail3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p45fail4.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p45pass1.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46fail6.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p46pass1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p47fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p47fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p47fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p47fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p47pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p48fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p48fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p48pass1.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p49fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p49pass1.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p50fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p50pass1.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail6.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51fail7.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p51pass1.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p52fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p52fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p52pass1.xml23
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p53pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p54fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p54pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p55fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p55pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p56pass1.xml19
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p57fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p57pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail2.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail3.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail4.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail5.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail6.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail7.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58fail8.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p58pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p59fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p59fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p59fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p59pass1.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60fail5.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p60pass1.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p61fail1.dtd4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p61fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p61pass1.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p61pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62fail1.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62fail2.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62pass1.dtd12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p62pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63fail1.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63fail2.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63pass1.dtd13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p63pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64fail1.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64fail1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64fail2.dtd2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64fail2.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64pass1.dtd13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p64pass1.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail1.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail2.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail3.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail4.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail5.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66fail6.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p66pass1.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p68fail1.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p68fail2.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p68fail3.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p68pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p69fail1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p69fail2.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p69fail3.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p69pass1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p70fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p70pass1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p71fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p71fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p71fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p71fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p71pass1.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p72fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p72fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p72fail3.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p72fail4.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p72pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73fail1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73fail2.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73fail3.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73fail4.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73fail5.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p73pass1.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p74fail1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p74fail2.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p74fail3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p74pass1.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail1.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail2.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail3.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail4.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail5.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75fail6.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p75pass1.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p76fail1.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p76fail2.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p76fail3.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p76fail4.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/oasis/p76pass1.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/readme.html201
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/CVS/Entries8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/cxml.html155
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/CVS/Entries76
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr02.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr03.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr04.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr05.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr06.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr07.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr08.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr09.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr10.xml20
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr11.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr12.xml15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr13.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr14.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr15.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/attr16.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/dtd01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/dtd02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/dtd03.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/dtd06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/el06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/empty.xml22
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id04.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id05.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id06.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id07.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id08.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/id09.xml17
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa02.xml31
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa04.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa05.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa06.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa07.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa08.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa09.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa10.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa11.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa12.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa13.xml16
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/not-sa14.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional02.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional04.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional05.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional08.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional09.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional10.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional11.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional12.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional13.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional14.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional20.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional21.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional22.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional23.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional24.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/optional25.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/required00.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/required01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/required02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/root.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/utf16b.xmlbin0 -> 98 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/invalid/utf16l.xmlbin0 -> 98 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/CVS/Entries61
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist01.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist02.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist03.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist04.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist05.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist06.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist07.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist08.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist09.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist10.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/attlist11.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/cond.dtd3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/cond01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/cond02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/content01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/content02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/content03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/decl01.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/decl01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd00.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd01.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd03.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd04.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd07.dtd7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/dtd07.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/element00.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/element01.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/element02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/element03.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/element04.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding01.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding02.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding03.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding04.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding05.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding06.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/encoding07.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/not-sa03.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pi.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pubid01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pubid02.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pubid03.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pubid04.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/pubid05.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml01.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml02.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml03.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml04.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml05.xml12
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml06.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml07.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml08.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml09.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml10.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml11.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml12.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/sgml13.xml11
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/not-wf/uri01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/sun-error.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/sun-invalid.xml359
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/sun-not-wf.xml179
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/sun-valid.xml147
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/CVS/Entries37
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/dtd00.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/dtd01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/dtdtest.dtd43
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/element.xml38
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/ext01.ent7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/ext01.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/ext02.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/not-sa01.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/not-sa02.xml30
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/not-sa03.xml25
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/not-sa04.xml30
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/notation01.dtd8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/notation01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/null.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/optional.xml50
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/CVS/Entries28
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/dtd00.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/dtd01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/element.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/ext01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/ext02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/not-sa01.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/not-sa02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/not-sa03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/not-sa04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/notation01.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/optional.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/pe00.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/pe02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/pe03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/required00.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sa01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sa02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sa03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sa04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sa05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/sgml01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang01.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang02.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang03.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang04.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang05.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/out/v-lang06.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe00.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe00.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe01.dtd6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe01.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe01.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe02.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/pe03.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/required00.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa.dtd39
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa01.xml13
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa02.xml52
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa03.xml28
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa04.xml38
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sa05.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/sgml01.xml14
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang01.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang02.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang03.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang04.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang05.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/sun/valid/v-lang06.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/testcases.dtd140
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconf-20010315.htm39994
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconf-20010315.xml54
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconf-20020521.htm39943
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconf-20031030.htm54207
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconf.xml94
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconformance.msxsl527
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmlconformance.xsl512
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/CVS/Entries6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/canonxml.html44
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/002.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/002.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/005.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/005.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/006.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/006.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/022.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/022.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/CVS/Entries3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/out/022.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/out/CVS/Entries2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/invalid/not-sa/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/CVS/Entries1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/CVS/Entries.Log3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/001.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/001.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/002.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/002.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/003.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/003.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/CVS/Entries7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/ext-sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/001.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/001.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/002.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/003.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/003.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/004.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/004.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/005.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/005.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/006.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/006.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/007.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/007.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/008.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/008.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/009.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/009.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/010.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/010.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/011.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/011.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/CVS/Entries22
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/not-sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/001.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/002.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/003.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/004.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/005.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/006.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/007.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/008.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/009.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/010.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/011.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/012.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/013.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/014.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/015.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/016.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/017.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/018.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/019.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/020.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/021.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/022.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/023.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/024.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/025.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/026.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/027.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/028.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/029.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/030.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/031.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/032.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/033.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/034.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/035.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/036.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/037.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/038.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/039.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/040.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/041.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/042.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/043.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/044.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/045.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/046.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/047.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/048.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/049.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/050.xml0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/051.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/052.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/053.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/054.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/055.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/056.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/057.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/058.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/059.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/060.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/061.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/062.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/063.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/064.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/065.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/066.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/067.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/068.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/069.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/070.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/071.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/072.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/073.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/074.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/075.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/076.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/077.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/078.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/079.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/080.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/081.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/082.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/083.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/084.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/085.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/086.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/087.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/088.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/089.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/090.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/091.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/092.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/093.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/094.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/095.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/096.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/097.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/098.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/099.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/100.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/101.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/102.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/103.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/104.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/105.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/106.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/107.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/108.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/109.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/110.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/111.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/112.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/113.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/114.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/115.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/116.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/117.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/118.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/119.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/120.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/121.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/122.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/123.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/124.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/125.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/126.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/127.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/128.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/129.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/130.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/131.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/132.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/133.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/134.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/135.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/136.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/137.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/138.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/139.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/140.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/141.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/142.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/143.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/144.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/145.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/146.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/147.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/148.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/149.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/150.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/151.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/152.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/153.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/154.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/155.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/156.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/157.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/158.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/159.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/160.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/161.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/162.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/163.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/164.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/165.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/166.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/167.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/168.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/169.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/170.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/171.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/172.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/173.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/174.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/175.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/176.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/177.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/178.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/179.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/180.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/181.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/182.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/183.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/184.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/185.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/185.xml3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/186.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/CVS/Entries189
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/not-wf/sa/null.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/readme.html60
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/CVS/Entries1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/CVS/Entries.Log3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/001.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/001.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/002.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/002.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/003.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/003.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/004.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/004.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/005.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/005.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/006.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/006.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/007.entbin0 -> 4 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/007.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/008.entbin0 -> 54 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/008.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/009.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/009.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/010.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/010.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/011.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/011.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/012.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/012.xml9
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/013.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/013.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/014.entbin0 -> 12 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/014.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/CVS/Entries29
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/001.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/002.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/003.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/004.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/005.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/006.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/007.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/008.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/009.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/010.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/011.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/012.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/013.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/014.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/CVS/Entries15
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/ext-sa/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/001.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/001.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/002.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/002.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/003-1.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/003-2.ent0
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/003.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/004-1.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/004-2.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/004.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/005-1.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/005-2.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/005.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/006.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/006.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/007.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/007.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/008.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/008.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/009.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/009.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/010.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/010.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/011.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/011.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/012.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/012.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/013.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/013.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/014.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/014.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/015.ent5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/015.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/016.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/016.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/017.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/017.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/018.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/018.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/019.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/019.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/020.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/020.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/021.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/021.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/023.ent5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/023.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/024.ent4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/024.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/025.ent5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/025.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/026.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/026.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/027.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/027.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/028.ent2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/028.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/029.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/029.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/030.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/030.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/031-1.ent3
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/031-2.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/031.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/CVS/Entries65
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/001.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/002.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/003.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/004.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/005.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/006.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/007.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/008.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/009.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/010.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/011.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/012.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/013.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/014.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/015.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/016.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/017.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/018.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/019.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/020.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/021.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/022.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/023.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/024.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/025.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/026.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/027.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/028.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/029.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/030.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/031.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/CVS/Entries32
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/not-sa/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/001.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/002.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/003.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/004.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/005.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/006.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/007.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/008.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/009.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/010.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/011.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/012.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/013.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/014.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/015.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/016.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/017.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/018.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/019.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/020.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/021.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/022.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/023.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/024.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/025.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/026.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/027.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/028.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/029.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/030.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/031.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/032.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/033.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/034.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/035.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/036.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/037.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/038.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/039.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/040.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/041.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/042.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/043.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/044.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/045.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/046.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/047.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/048.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/049.xmlbin0 -> 124 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/050.xmlbin0 -> 132 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/051.xmlbin0 -> 140 bytes-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/052.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/053.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/054.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/055.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/056.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/057.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/058.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/059.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/060.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/061.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/062.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/063.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/064.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/065.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/066.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/067.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/068.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/069.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/070.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/071.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/072.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/073.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/074.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/075.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/076.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/077.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/078.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/079.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/080.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/081.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/082.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/083.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/084.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/085.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/086.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/087.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/088.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/089.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/090.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/091.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/092.xml10
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/093.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/094.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/095.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/096.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/097.ent1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/097.xml8
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/098.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/099.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/100.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/101.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/102.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/103.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/104.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/105.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/106.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/107.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/108.xml7
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/109.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/110.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/111.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/112.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/113.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/114.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/115.xml6
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/116.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/117.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/118.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/119.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/CVS/Entries121
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/001.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/002.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/003.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/004.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/005.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/006.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/007.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/008.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/009.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/010.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/011.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/012.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/013.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/014.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/015.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/016.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/017.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/018.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/019.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/020.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/021.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/022.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/023.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/024.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/025.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/026.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/027.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/028.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/029.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/030.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/031.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/032.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/033.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/034.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/035.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/036.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/037.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/038.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/039.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/040.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/041.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/042.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/043.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/044.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/045.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/046.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/047.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/048.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/049.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/050.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/051.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/052.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/053.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/054.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/055.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/056.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/057.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/058.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/059.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/060.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/061.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/062.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/063.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/064.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/065.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/066.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/067.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/068.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/069.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/070.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/071.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/072.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/073.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/074.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/075.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/076.xml5
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/077.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/078.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/079.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/080.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/081.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/082.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/083.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/084.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/085.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/086.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/087.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/088.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/089.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/090.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/091.xml4
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/092.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/093.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/094.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/095.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/096.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/097.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/098.xml2
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/099.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/100.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/101.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/102.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/103.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/104.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/105.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/106.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/107.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/108.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/109.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/110.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/111.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/112.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/113.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/114.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/115.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/116.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/117.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/118.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/119.xml1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/CVS/Entries120
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/CVS/Repository1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/valid/sa/out/CVS/Root1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite/xmlconf/xmltest/xmltest.xml1433
-rw-r--r--tests/auto/qxmlstream/data/001.ref12
-rw-r--r--tests/auto/qxmlstream/data/001.xml7
-rw-r--r--tests/auto/qxmlstream/data/002.ref13
-rw-r--r--tests/auto/qxmlstream/data/002.xml8
-rw-r--r--tests/auto/qxmlstream/data/003.ref12
-rw-r--r--tests/auto/qxmlstream/data/003.xml7
-rw-r--r--tests/auto/qxmlstream/data/004.ref12
-rw-r--r--tests/auto/qxmlstream/data/004.xml7
-rw-r--r--tests/auto/qxmlstream/data/005.ref12
-rw-r--r--tests/auto/qxmlstream/data/005.xml7
-rw-r--r--tests/auto/qxmlstream/data/006.ref12
-rw-r--r--tests/auto/qxmlstream/data/006.xml7
-rw-r--r--tests/auto/qxmlstream/data/007.ref36
-rw-r--r--tests/auto/qxmlstream/data/007.xml20
-rw-r--r--tests/auto/qxmlstream/data/008.ref36
-rw-r--r--tests/auto/qxmlstream/data/008.xml20
-rw-r--r--tests/auto/qxmlstream/data/009.ref27
-rw-r--r--tests/auto/qxmlstream/data/009.xml19
-rw-r--r--tests/auto/qxmlstream/data/010.ref27
-rw-r--r--tests/auto/qxmlstream/data/010.xml19
-rw-r--r--tests/auto/qxmlstream/data/011.ref30
-rw-r--r--tests/auto/qxmlstream/data/011.xml20
-rw-r--r--tests/auto/qxmlstream/data/012.ref27
-rw-r--r--tests/auto/qxmlstream/data/012.xml19
-rw-r--r--tests/auto/qxmlstream/data/013.ref7
-rw-r--r--tests/auto/qxmlstream/data/013.xml5
-rw-r--r--tests/auto/qxmlstream/data/014.ref4
-rw-r--r--tests/auto/qxmlstream/data/014.xml3
-rw-r--r--tests/auto/qxmlstream/data/015.ref4
-rw-r--r--tests/auto/qxmlstream/data/015.xml3
-rw-r--r--tests/auto/qxmlstream/data/016.ref4
-rw-r--r--tests/auto/qxmlstream/data/016.xml3
-rw-r--r--tests/auto/qxmlstream/data/017.ref5
-rw-r--r--tests/auto/qxmlstream/data/017.xml3
-rw-r--r--tests/auto/qxmlstream/data/018.ref7
-rw-r--r--tests/auto/qxmlstream/data/018.xml3
-rw-r--r--tests/auto/qxmlstream/data/019.ref7
-rw-r--r--tests/auto/qxmlstream/data/019.xml3
-rw-r--r--tests/auto/qxmlstream/data/020.ref9
-rw-r--r--tests/auto/qxmlstream/data/020.xml3
-rw-r--r--tests/auto/qxmlstream/data/021.ref15
-rw-r--r--tests/auto/qxmlstream/data/021.xml6
-rw-r--r--tests/auto/qxmlstream/data/022.ref15
-rw-r--r--tests/auto/qxmlstream/data/022.xml6
-rw-r--r--tests/auto/qxmlstream/data/023.ref9
-rw-r--r--tests/auto/qxmlstream/data/023.xml6
-rw-r--r--tests/auto/qxmlstream/data/024.ref15
-rw-r--r--tests/auto/qxmlstream/data/024.xml6
-rw-r--r--tests/auto/qxmlstream/data/025.ref4
-rw-r--r--tests/auto/qxmlstream/data/025.xml3
-rw-r--r--tests/auto/qxmlstream/data/026.ref6
-rw-r--r--tests/auto/qxmlstream/data/026.xml3
-rw-r--r--tests/auto/qxmlstream/data/027.ref7
-rw-r--r--tests/auto/qxmlstream/data/027.xml3
-rw-r--r--tests/auto/qxmlstream/data/028.ref7
-rw-r--r--tests/auto/qxmlstream/data/028.xml3
-rw-r--r--tests/auto/qxmlstream/data/029.ref4
-rw-r--r--tests/auto/qxmlstream/data/029.xml4
-rw-r--r--tests/auto/qxmlstream/data/030.ref5
-rw-r--r--tests/auto/qxmlstream/data/030.xml4
-rw-r--r--tests/auto/qxmlstream/data/031.ref5
-rw-r--r--tests/auto/qxmlstream/data/031.xml4
-rw-r--r--tests/auto/qxmlstream/data/032.ref5
-rw-r--r--tests/auto/qxmlstream/data/032.xml5
-rw-r--r--tests/auto/qxmlstream/data/033.ref5
-rw-r--r--tests/auto/qxmlstream/data/033.xml4
-rw-r--r--tests/auto/qxmlstream/data/034.ref7
-rw-r--r--tests/auto/qxmlstream/data/034.xml3
-rw-r--r--tests/auto/qxmlstream/data/035.ref16
-rw-r--r--tests/auto/qxmlstream/data/035.xml8
-rw-r--r--tests/auto/qxmlstream/data/036.ref16
-rw-r--r--tests/auto/qxmlstream/data/036.xml8
-rw-r--r--tests/auto/qxmlstream/data/037.ref21
-rw-r--r--tests/auto/qxmlstream/data/037.xml8
-rw-r--r--tests/auto/qxmlstream/data/038.ref20
-rw-r--r--tests/auto/qxmlstream/data/038.xml8
-rw-r--r--tests/auto/qxmlstream/data/039.ref24
-rw-r--r--tests/auto/qxmlstream/data/039.xml10
-rw-r--r--tests/auto/qxmlstream/data/040.ref22
-rw-r--r--tests/auto/qxmlstream/data/040.xml9
-rw-r--r--tests/auto/qxmlstream/data/041.ref20
-rw-r--r--tests/auto/qxmlstream/data/041.xml8
-rw-r--r--tests/auto/qxmlstream/data/042.ref4
-rw-r--r--tests/auto/qxmlstream/data/042.xml4
-rw-r--r--tests/auto/qxmlstream/data/043.ref4
-rw-r--r--tests/auto/qxmlstream/data/043.xml7
-rw-r--r--tests/auto/qxmlstream/data/044.ref4
-rw-r--r--tests/auto/qxmlstream/data/044.xml7
-rw-r--r--tests/auto/qxmlstream/data/045.ref12
-rw-r--r--tests/auto/qxmlstream/data/045.xml7
-rw-r--r--tests/auto/qxmlstream/data/046.ref21
-rw-r--r--tests/auto/qxmlstream/data/046.xml10
-rw-r--r--tests/auto/qxmlstream/data/047.ref5
-rw-r--r--tests/auto/qxmlstream/data/047.xml2
-rw-r--r--tests/auto/qxmlstream/data/048.ref4
-rw-r--r--tests/auto/qxmlstream/data/048.xml2
-rw-r--r--tests/auto/qxmlstream/data/051reduced.ref4
-rw-r--r--tests/auto/qxmlstream/data/051reduced.xmlbin0 -> 22 bytes-rw-r--r--tests/auto/qxmlstream/data/1.ref8
-rw-r--r--tests/auto/qxmlstream/data/1.xml1
-rw-r--r--tests/auto/qxmlstream/data/10.ref6
-rw-r--r--tests/auto/qxmlstream/data/10.xml2
-rw-r--r--tests/auto/qxmlstream/data/11.ref6
-rw-r--r--tests/auto/qxmlstream/data/11.xml1
-rw-r--r--tests/auto/qxmlstream/data/12.ref19
-rw-r--r--tests/auto/qxmlstream/data/12.xml8
-rw-r--r--tests/auto/qxmlstream/data/13.ref14
-rw-r--r--tests/auto/qxmlstream/data/13.xml6
-rw-r--r--tests/auto/qxmlstream/data/14.ref18
-rw-r--r--tests/auto/qxmlstream/data/14.xml8
-rw-r--r--tests/auto/qxmlstream/data/15.ref67
-rw-r--r--tests/auto/qxmlstream/data/15.xml15
-rw-r--r--tests/auto/qxmlstream/data/16.ref6
-rw-r--r--tests/auto/qxmlstream/data/16.xml3
-rw-r--r--tests/auto/qxmlstream/data/2.ref9
-rw-r--r--tests/auto/qxmlstream/data/2.xml1
-rw-r--r--tests/auto/qxmlstream/data/20.ref21
-rw-r--r--tests/auto/qxmlstream/data/20.xml2
-rw-r--r--tests/auto/qxmlstream/data/21.ref56
-rw-r--r--tests/auto/qxmlstream/data/21.xml26
-rw-r--r--tests/auto/qxmlstream/data/22.ref4
-rw-r--r--tests/auto/qxmlstream/data/22.xml2
-rw-r--r--tests/auto/qxmlstream/data/3.ref6
-rw-r--r--tests/auto/qxmlstream/data/3.xml4
-rw-r--r--tests/auto/qxmlstream/data/4.ref21
-rw-r--r--tests/auto/qxmlstream/data/4.xml9
-rw-r--r--tests/auto/qxmlstream/data/5.ref19
-rw-r--r--tests/auto/qxmlstream/data/5.xml9
-rw-r--r--tests/auto/qxmlstream/data/6.ref13
-rw-r--r--tests/auto/qxmlstream/data/6.xml1
-rw-r--r--tests/auto/qxmlstream/data/7.ref7
-rw-r--r--tests/auto/qxmlstream/data/7.xml1
-rw-r--r--tests/auto/qxmlstream/data/8.ref3
-rw-r--r--tests/auto/qxmlstream/data/8.xml3
-rw-r--r--tests/auto/qxmlstream/data/9.ref2
-rw-r--r--tests/auto/qxmlstream/data/9.xml2
-rw-r--r--tests/auto/qxmlstream/data/books.ref18
-rw-r--r--tests/auto/qxmlstream/data/books.xml5
-rw-r--r--tests/auto/qxmlstream/data/colonInPI.ref7
-rw-r--r--tests/auto/qxmlstream/data/colonInPI.xml4
-rw-r--r--tests/auto/qxmlstream/data/mixedContent.ref207
-rw-r--r--tests/auto/qxmlstream/data/mixedContent.xml35
-rw-r--r--tests/auto/qxmlstream/data/namespaceCDATA.ref22
-rw-r--r--tests/auto/qxmlstream/data/namespaceCDATA.xml8
-rw-r--r--tests/auto/qxmlstream/data/namespaces151
-rw-r--r--tests/auto/qxmlstream/data/org_module.ref2780
-rw-r--r--tests/auto/qxmlstream/data/org_module.xml389
-rw-r--r--tests/auto/qxmlstream/data/spaceBracket.ref5
-rw-r--r--tests/auto/qxmlstream/data/spaceBracket.xml1
-rw-r--r--tests/auto/qxmlstream/qc14n.h210
-rw-r--r--tests/auto/qxmlstream/qxmlstream.pro11
-rwxr-xr-xtests/auto/qxmlstream/setupSuite.sh20
-rw-r--r--tests/auto/qxmlstream/tst_qxmlstream.cpp1396
-rw-r--r--tests/auto/qzip/.gitignore1
-rw-r--r--tests/auto/qzip/qzip.pro11
-rw-r--r--tests/auto/qzip/testdata/symlink.zipbin0 -> 289 bytes-rw-r--r--tests/auto/qzip/testdata/test.zipbin0 -> 286 bytes-rw-r--r--tests/auto/qzip/tst_qzip.cpp152
-rw-r--r--tests/auto/rcc/.gitignore1
-rw-r--r--tests/auto/rcc/data/images.bin.expectedbin0 -> 663 bytes-rw-r--r--tests/auto/rcc/data/images.expected126
-rw-r--r--tests/auto/rcc/data/images.qrc7
-rw-r--r--tests/auto/rcc/data/images/circle.pngbin0 -> 165 bytes-rw-r--r--tests/auto/rcc/data/images/square.pngbin0 -> 94 bytes-rw-r--r--tests/auto/rcc/data/images/subdir/triangle.pngbin0 -> 170 bytes-rw-r--r--tests/auto/rcc/rcc.pro6
-rw-r--r--tests/auto/rcc/tst_rcc.cpp173
-rwxr-xr-xtests/auto/runQtXmlPatternsTests.sh59
-rw-r--r--tests/auto/selftests/.gitignore26
-rw-r--r--tests/auto/selftests/README5
-rw-r--r--tests/auto/selftests/alive/.gitignore1
-rw-r--r--tests/auto/selftests/alive/alive.pro7
-rw-r--r--tests/auto/selftests/alive/qtestalive.cpp159
-rw-r--r--tests/auto/selftests/alive/tst_alive.cpp174
-rw-r--r--tests/auto/selftests/assert/assert.pro10
-rw-r--r--tests/auto/selftests/assert/tst_assert.cpp71
-rw-r--r--tests/auto/selftests/badxml/badxml.pro10
-rw-r--r--tests/auto/selftests/badxml/tst_badxml.cpp199
-rw-r--r--tests/auto/selftests/benchlibcallgrind/benchlibcallgrind.pro8
-rw-r--r--tests/auto/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp97
-rw-r--r--tests/auto/selftests/benchlibeventcounter/benchlibeventcounter.pro8
-rw-r--r--tests/auto/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp111
-rw-r--r--tests/auto/selftests/benchliboptions/benchliboptions.pro8
-rw-r--r--tests/auto/selftests/benchliboptions/tst_benchliboptions.cpp130
-rw-r--r--tests/auto/selftests/benchlibtickcounter/benchlibtickcounter.pro8
-rw-r--r--tests/auto/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp80
-rw-r--r--tests/auto/selftests/benchlibwalltime/benchlibwalltime.pro8
-rw-r--r--tests/auto/selftests/benchlibwalltime/tst_benchlibwalltime.cpp71
-rw-r--r--tests/auto/selftests/cmptest/cmptest.pro8
-rw-r--r--tests/auto/selftests/cmptest/tst_cmptest.cpp81
-rw-r--r--tests/auto/selftests/commandlinedata/commandlinedata.pro8
-rw-r--r--tests/auto/selftests/commandlinedata/tst_commandlinedata.cpp81
-rw-r--r--tests/auto/selftests/crashes/crashes.pro9
-rw-r--r--tests/auto/selftests/crashes/tst_crashes.cpp70
-rw-r--r--tests/auto/selftests/datatable/datatable.pro8
-rw-r--r--tests/auto/selftests/datatable/tst_datatable.cpp189
-rw-r--r--tests/auto/selftests/datetime/datetime.pro8
-rw-r--r--tests/auto/selftests/datetime/tst_datetime.cpp90
-rw-r--r--tests/auto/selftests/differentexec/differentexec.pro8
-rw-r--r--tests/auto/selftests/differentexec/tst_differentexec.cpp92
-rw-r--r--tests/auto/selftests/exception/exception.pro8
-rw-r--r--tests/auto/selftests/exception/tst_exception.cpp69
-rw-r--r--tests/auto/selftests/expected_alive.txt33
-rw-r--r--tests/auto/selftests/expected_assert.txt9
-rw-r--r--tests/auto/selftests/expected_benchlibcallgrind.txt9
-rw-r--r--tests/auto/selftests/expected_benchlibeventcounter.txt21
-rw-r--r--tests/auto/selftests/expected_benchliboptions.txt27
-rw-r--r--tests/auto/selftests/expected_benchlibtickcounter.txt9
-rw-r--r--tests/auto/selftests/expected_benchlibwalltime.txt12
-rw-r--r--tests/auto/selftests/expected_cmptest.txt8
-rw-r--r--tests/auto/selftests/expected_commandlinedata.txt24
-rw-r--r--tests/auto/selftests/expected_crashes_1.txt3
-rw-r--r--tests/auto/selftests/expected_crashes_2.txt7
-rw-r--r--tests/auto/selftests/expected_datatable.txt35
-rw-r--r--tests/auto/selftests/expected_datetime.txt18
-rw-r--r--tests/auto/selftests/expected_differentexec.txt21
-rw-r--r--tests/auto/selftests/expected_exception.txt7
-rw-r--r--tests/auto/selftests/expected_expectfail.txt20
-rw-r--r--tests/auto/selftests/expected_failinit.txt7
-rw-r--r--tests/auto/selftests/expected_failinitdata.txt6
-rw-r--r--tests/auto/selftests/expected_fatal.txt6
-rw-r--r--tests/auto/selftests/expected_fetchbogus.txt8
-rw-r--r--tests/auto/selftests/expected_globaldata.txt45
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt2009
-rw-r--r--tests/auto/selftests/expected_multiexec.txt35
-rw-r--r--tests/auto/selftests/expected_qexecstringlist.txt46
-rw-r--r--tests/auto/selftests/expected_singleskip.txt8
-rw-r--r--tests/auto/selftests/expected_skip.txt14
-rw-r--r--tests/auto/selftests/expected_skipglobal.txt6
-rw-r--r--tests/auto/selftests/expected_skipinit.txt7
-rw-r--r--tests/auto/selftests/expected_skipinitdata.txt6
-rw-r--r--tests/auto/selftests/expected_sleep.txt7
-rw-r--r--tests/auto/selftests/expected_strcmp.txt33
-rw-r--r--tests/auto/selftests/expected_subtest.txt81
-rw-r--r--tests/auto/selftests/expected_waitwithoutgui.txt2
-rw-r--r--tests/auto/selftests/expected_warnings.txt24
-rw-r--r--tests/auto/selftests/expected_xunit.txt24
-rw-r--r--tests/auto/selftests/expectfail/expectfail.pro8
-rw-r--r--tests/auto/selftests/expectfail/tst_expectfail.cpp85
-rw-r--r--tests/auto/selftests/failinit/failinit.pro8
-rw-r--r--tests/auto/selftests/failinit/tst_failinit.cpp68
-rw-r--r--tests/auto/selftests/failinitdata/failinitdata.pro8
-rw-r--r--tests/auto/selftests/failinitdata/tst_failinitdata.cpp77
-rw-r--r--tests/auto/selftests/fetchbogus/fetchbogus.pro8
-rw-r--r--tests/auto/selftests/fetchbogus/tst_fetchbogus.cpp68
-rw-r--r--tests/auto/selftests/globaldata/globaldata.pro8
-rw-r--r--tests/auto/selftests/globaldata/tst_globaldata.cpp153
-rw-r--r--tests/auto/selftests/maxwarnings/maxwarnings.cpp60
-rw-r--r--tests/auto/selftests/maxwarnings/maxwarnings.pro8
-rw-r--r--tests/auto/selftests/multiexec/multiexec.pro8
-rw-r--r--tests/auto/selftests/multiexec/tst_multiexec.cpp60
-rw-r--r--tests/auto/selftests/qexecstringlist/qexecstringlist.pro8
-rw-r--r--tests/auto/selftests/qexecstringlist/tst_qexecstringlist.cpp96
-rw-r--r--tests/auto/selftests/selftests.pro14
-rw-r--r--tests/auto/selftests/selftests.qrc39
-rw-r--r--tests/auto/selftests/singleskip/singleskip.pro8
-rw-r--r--tests/auto/selftests/singleskip/tst_singleskip.cpp61
-rw-r--r--tests/auto/selftests/skip/skip.pro8
-rw-r--r--tests/auto/selftests/skip/tst_skip.cpp103
-rw-r--r--tests/auto/selftests/skipglobal/skipglobal.pro8
-rw-r--r--tests/auto/selftests/skipglobal/tst_skipglobal.cpp113
-rw-r--r--tests/auto/selftests/skipinit/skipinit.pro8
-rw-r--r--tests/auto/selftests/skipinit/tst_skipinit.cpp68
-rw-r--r--tests/auto/selftests/skipinitdata/skipinitdata.pro8
-rw-r--r--tests/auto/selftests/skipinitdata/tst_skipinitdata.cpp73
-rw-r--r--tests/auto/selftests/sleep/sleep.pro8
-rw-r--r--tests/auto/selftests/sleep/tst_sleep.cpp71
-rw-r--r--tests/auto/selftests/strcmp/strcmp.pro8
-rw-r--r--tests/auto/selftests/strcmp/tst_strcmp.cpp138
-rw-r--r--tests/auto/selftests/subtest/subtest.pro8
-rw-r--r--tests/auto/selftests/subtest/tst_subtest.cpp219
-rw-r--r--tests/auto/selftests/test/test.pro17
-rw-r--r--tests/auto/selftests/tst_selftests.cpp511
-rwxr-xr-xtests/auto/selftests/updateBaselines.sh34
-rw-r--r--tests/auto/selftests/waitwithoutgui/tst_waitwithoutgui.cpp62
-rw-r--r--tests/auto/selftests/waitwithoutgui/waitwithoutgui.pro8
-rw-r--r--tests/auto/selftests/warnings/tst_warnings.cpp96
-rw-r--r--tests/auto/selftests/warnings/warnings.pro8
-rwxr-xr-xtests/auto/selftests/xunit/tst_xunitbin0 -> 11624 bytes-rw-r--r--tests/auto/selftests/xunit/tst_xunit.cpp52
-rw-r--r--tests/auto/selftests/xunit/xunit.pro12
-rw-r--r--tests/auto/solutions.pri16
-rw-r--r--tests/auto/symbols/.gitignore1
-rw-r--r--tests/auto/symbols/symbols.pro7
-rw-r--r--tests/auto/symbols/tst_symbols.cpp433
-rwxr-xr-xtests/auto/test.pl191
-rw-r--r--tests/auto/tests.xml805
-rw-r--r--tests/auto/uic/.gitignore1
-rw-r--r--tests/auto/uic/baseline/.gitattributes1
-rw-r--r--tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui71
-rw-r--r--tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h60
-rw-r--r--tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui71
-rw-r--r--tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h60
-rw-r--r--tests/auto/uic/baseline/Dialog_without_Buttons.ui18
-rw-r--r--tests/auto/uic/baseline/Dialog_without_Buttons.ui.h51
-rw-r--r--tests/auto/uic/baseline/Main_Window.ui27
-rw-r--r--tests/auto/uic/baseline/Main_Window.ui.h66
-rw-r--r--tests/auto/uic/baseline/Widget.ui44
-rw-r--r--tests/auto/uic/baseline/Widget.ui.h82
-rw-r--r--tests/auto/uic/baseline/addlinkdialog.ui112
-rw-r--r--tests/auto/uic/baseline/addlinkdialog.ui.h118
-rw-r--r--tests/auto/uic/baseline/addtorrentform.ui266
-rw-r--r--tests/auto/uic/baseline/addtorrentform.ui.h242
-rw-r--r--tests/auto/uic/baseline/authenticationdialog.ui129
-rw-r--r--tests/auto/uic/baseline/authenticationdialog.ui.h127
-rw-r--r--tests/auto/uic/baseline/backside.ui208
-rw-r--r--tests/auto/uic/baseline/backside.ui.h197
-rw-r--r--tests/auto/uic/baseline/batchtranslation.ui235
-rw-r--r--tests/auto/uic/baseline/batchtranslation.ui.h253
-rw-r--r--tests/auto/uic/baseline/bookmarkdialog.ui161
-rw-r--r--tests/auto/uic/baseline/bookmarkdialog.ui.h172
-rw-r--r--tests/auto/uic/baseline/bookwindow.ui149
-rw-r--r--tests/auto/uic/baseline/bookwindow.ui.h183
-rw-r--r--tests/auto/uic/baseline/browserwidget.ui199
-rw-r--r--tests/auto/uic/baseline/browserwidget.ui.h183
-rw-r--r--tests/auto/uic/baseline/calculator.ui406
-rw-r--r--tests/auto/uic/baseline/calculator.ui.h202
-rw-r--r--tests/auto/uic/baseline/calculatorform.ui303
-rw-r--r--tests/auto/uic/baseline/calculatorform.ui.h195
-rw-r--r--tests/auto/uic/baseline/certificateinfo.ui85
-rw-r--r--tests/auto/uic/baseline/certificateinfo.ui.h111
-rw-r--r--tests/auto/uic/baseline/chatdialog.ui79
-rw-r--r--tests/auto/uic/baseline/chatdialog.ui.h117
-rw-r--r--tests/auto/uic/baseline/chatmainwindow.ui185
-rw-r--r--tests/auto/uic/baseline/chatmainwindow.ui.h182
-rw-r--r--tests/auto/uic/baseline/chatsetnickname.ui149
-rw-r--r--tests/auto/uic/baseline/chatsetnickname.ui.h134
-rw-r--r--tests/auto/uic/baseline/config.ui2527
-rw-r--r--tests/auto/uic/baseline/config.ui.h773
-rw-r--r--tests/auto/uic/baseline/connectdialog.ui150
-rw-r--r--tests/auto/uic/baseline/connectdialog.ui.h150
-rw-r--r--tests/auto/uic/baseline/controller.ui64
-rw-r--r--tests/auto/uic/baseline/controller.ui.h99
-rw-r--r--tests/auto/uic/baseline/cookies.ui106
-rw-r--r--tests/auto/uic/baseline/cookies.ui.h111
-rw-r--r--tests/auto/uic/baseline/cookiesexceptions.ui184
-rw-r--r--tests/auto/uic/baseline/cookiesexceptions.ui.h184
-rw-r--r--tests/auto/uic/baseline/default.ui329
-rw-r--r--tests/auto/uic/baseline/default.ui.h315
-rw-r--r--tests/auto/uic/baseline/dialog.ui47
-rw-r--r--tests/auto/uic/baseline/dialog.ui.h80
-rw-r--r--tests/auto/uic/baseline/downloaditem.ui134
-rw-r--r--tests/auto/uic/baseline/downloaditem.ui.h149
-rw-r--r--tests/auto/uic/baseline/downloads.ui83
-rw-r--r--tests/auto/uic/baseline/downloads.ui.h99
-rw-r--r--tests/auto/uic/baseline/embeddeddialog.ui87
-rw-r--r--tests/auto/uic/baseline/embeddeddialog.ui.h123
-rw-r--r--tests/auto/uic/baseline/filespage.ui79
-rw-r--r--tests/auto/uic/baseline/filespage.ui.h102
-rw-r--r--tests/auto/uic/baseline/filternamedialog.ui67
-rw-r--r--tests/auto/uic/baseline/filternamedialog.ui.h96
-rw-r--r--tests/auto/uic/baseline/filterpage.ui125
-rw-r--r--tests/auto/uic/baseline/filterpage.ui.h128
-rw-r--r--tests/auto/uic/baseline/finddialog.ui264
-rw-r--r--tests/auto/uic/baseline/finddialog.ui.h255
-rw-r--r--tests/auto/uic/baseline/form.ui162
-rw-r--r--tests/auto/uic/baseline/form.ui.h144
-rw-r--r--tests/auto/uic/baseline/formwindowsettings.ui310
-rw-r--r--tests/auto/uic/baseline/formwindowsettings.ui.h312
-rw-r--r--tests/auto/uic/baseline/generalpage.ui69
-rw-r--r--tests/auto/uic/baseline/generalpage.ui.h94
-rw-r--r--tests/auto/uic/baseline/gridpanel.ui144
-rw-r--r--tests/auto/uic/baseline/gridpanel.ui.h162
-rw-r--r--tests/auto/uic/baseline/helpdialog.ui403
-rw-r--r--tests/auto/uic/baseline/helpdialog.ui.h396
-rw-r--r--tests/auto/uic/baseline/history.ui106
-rw-r--r--tests/auto/uic/baseline/history.ui.h111
-rw-r--r--tests/auto/uic/baseline/identifierpage.ui132
-rw-r--r--tests/auto/uic/baseline/identifierpage.ui.h111
-rw-r--r--tests/auto/uic/baseline/imagedialog.ui389
-rw-r--r--tests/auto/uic/baseline/imagedialog.ui.h222
-rw-r--r--tests/auto/uic/baseline/inputpage.ui79
-rw-r--r--tests/auto/uic/baseline/inputpage.ui.h102
-rw-r--r--tests/auto/uic/baseline/installdialog.ui118
-rw-r--r--tests/auto/uic/baseline/installdialog.ui.h145
-rw-r--r--tests/auto/uic/baseline/languagesdialog.ui160
-rw-r--r--tests/auto/uic/baseline/languagesdialog.ui.h157
-rw-r--r--tests/auto/uic/baseline/listwidgeteditor.ui225
-rw-r--r--tests/auto/uic/baseline/listwidgeteditor.ui.h228
-rw-r--r--tests/auto/uic/baseline/mainwindow.ui502
-rw-r--r--tests/auto/uic/baseline/mainwindow.ui.h401
-rw-r--r--tests/auto/uic/baseline/mainwindowbase.ui1213
-rw-r--r--tests/auto/uic/baseline/mainwindowbase.ui.h968
-rw-r--r--tests/auto/uic/baseline/mydialog.ui47
-rw-r--r--tests/auto/uic/baseline/mydialog.ui.h79
-rw-r--r--tests/auto/uic/baseline/myform.ui130
-rw-r--r--tests/auto/uic/baseline/myform.ui.h149
-rw-r--r--tests/auto/uic/baseline/newactiondialog.ui201
-rw-r--r--tests/auto/uic/baseline/newactiondialog.ui.h197
-rw-r--r--tests/auto/uic/baseline/newdynamicpropertydialog.ui106
-rw-r--r--tests/auto/uic/baseline/newdynamicpropertydialog.ui.h133
-rw-r--r--tests/auto/uic/baseline/newform.ui152
-rw-r--r--tests/auto/uic/baseline/newform.ui.h166
-rw-r--r--tests/auto/uic/baseline/orderdialog.ui197
-rw-r--r--tests/auto/uic/baseline/orderdialog.ui.h172
-rw-r--r--tests/auto/uic/baseline/outputpage.ui95
-rw-r--r--tests/auto/uic/baseline/outputpage.ui.h108
-rw-r--r--tests/auto/uic/baseline/pagefold.ui349
-rw-r--r--tests/auto/uic/baseline/pagefold.ui.h329
-rw-r--r--tests/auto/uic/baseline/paletteeditor.ui263
-rw-r--r--tests/auto/uic/baseline/paletteeditor.ui.h240
-rw-r--r--tests/auto/uic/baseline/paletteeditoradvancedbase.ui616
-rw-r--r--tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h484
-rw-r--r--tests/auto/uic/baseline/passworddialog.ui111
-rw-r--r--tests/auto/uic/baseline/passworddialog.ui.h121
-rw-r--r--tests/auto/uic/baseline/pathpage.ui114
-rw-r--r--tests/auto/uic/baseline/pathpage.ui.h127
-rw-r--r--tests/auto/uic/baseline/phrasebookbox.ui210
-rw-r--r--tests/auto/uic/baseline/phrasebookbox.ui.h245
-rw-r--r--tests/auto/uic/baseline/plugindialog.ui152
-rw-r--r--tests/auto/uic/baseline/plugindialog.ui.h145
-rw-r--r--tests/auto/uic/baseline/preferencesdialog.ui165
-rw-r--r--tests/auto/uic/baseline/preferencesdialog.ui.h173
-rw-r--r--tests/auto/uic/baseline/previewconfigurationwidget.ui91
-rw-r--r--tests/auto/uic/baseline/previewconfigurationwidget.ui.h134
-rw-r--r--tests/auto/uic/baseline/previewdialogbase.ui224
-rw-r--r--tests/auto/uic/baseline/previewdialogbase.ui.h192
-rw-r--r--tests/auto/uic/baseline/previewwidget.ui237
-rw-r--r--tests/auto/uic/baseline/previewwidget.ui.h282
-rw-r--r--tests/auto/uic/baseline/previewwidgetbase.ui339
-rw-r--r--tests/auto/uic/baseline/previewwidgetbase.ui.h316
-rw-r--r--tests/auto/uic/baseline/proxy.ui104
-rw-r--r--tests/auto/uic/baseline/proxy.ui.h110
-rw-r--r--tests/auto/uic/baseline/qfiledialog.ui319
-rw-r--r--tests/auto/uic/baseline/qfiledialog.ui.h320
-rw-r--r--tests/auto/uic/baseline/qpagesetupwidget.ui353
-rw-r--r--tests/auto/uic/baseline/qpagesetupwidget.ui.h320
-rw-r--r--tests/auto/uic/baseline/qprintpropertieswidget.ui70
-rw-r--r--tests/auto/uic/baseline/qprintpropertieswidget.ui.h99
-rw-r--r--tests/auto/uic/baseline/qprintsettingsoutput.ui371
-rw-r--r--tests/auto/uic/baseline/qprintsettingsoutput.ui.h313
-rw-r--r--tests/auto/uic/baseline/qprintwidget.ui116
-rw-r--r--tests/auto/uic/baseline/qprintwidget.ui.h167
-rw-r--r--tests/auto/uic/baseline/qsqlconnectiondialog.ui224
-rw-r--r--tests/auto/uic/baseline/qsqlconnectiondialog.ui.h234
-rw-r--r--tests/auto/uic/baseline/qtgradientdialog.ui120
-rw-r--r--tests/auto/uic/baseline/qtgradientdialog.ui.h120
-rw-r--r--tests/auto/uic/baseline/qtgradienteditor.ui1376
-rw-r--r--tests/auto/uic/baseline/qtgradienteditor.ui.h726
-rw-r--r--tests/auto/uic/baseline/qtgradientview.ui135
-rw-r--r--tests/auto/uic/baseline/qtgradientview.ui.h128
-rw-r--r--tests/auto/uic/baseline/qtgradientviewdialog.ui120
-rw-r--r--tests/auto/uic/baseline/qtgradientviewdialog.ui.h120
-rw-r--r--tests/auto/uic/baseline/qtresourceeditordialog.ui180
-rw-r--r--tests/auto/uic/baseline/qtresourceeditordialog.ui.h177
-rw-r--r--tests/auto/uic/baseline/qttoolbardialog.ui207
-rw-r--r--tests/auto/uic/baseline/qttoolbardialog.ui.h229
-rw-r--r--tests/auto/uic/baseline/querywidget.ui163
-rw-r--r--tests/auto/uic/baseline/querywidget.ui.h175
-rw-r--r--tests/auto/uic/baseline/remotecontrol.ui228
-rw-r--r--tests/auto/uic/baseline/remotecontrol.ui.h253
-rw-r--r--tests/auto/uic/baseline/saveformastemplate.ui165
-rw-r--r--tests/auto/uic/baseline/saveformastemplate.ui.h165
-rw-r--r--tests/auto/uic/baseline/settings.ui262
-rw-r--r--tests/auto/uic/baseline/settings.ui.h207
-rw-r--r--tests/auto/uic/baseline/signalslotdialog.ui129
-rw-r--r--tests/auto/uic/baseline/signalslotdialog.ui.h170
-rw-r--r--tests/auto/uic/baseline/sslclient.ui190
-rw-r--r--tests/auto/uic/baseline/sslclient.ui.h185
-rw-r--r--tests/auto/uic/baseline/sslerrors.ui110
-rw-r--r--tests/auto/uic/baseline/sslerrors.ui.h112
-rw-r--r--tests/auto/uic/baseline/statistics.ui241
-rw-r--r--tests/auto/uic/baseline/statistics.ui.h222
-rw-r--r--tests/auto/uic/baseline/stringlisteditor.ui264
-rw-r--r--tests/auto/uic/baseline/stringlisteditor.ui.h267
-rw-r--r--tests/auto/uic/baseline/stylesheeteditor.ui171
-rw-r--r--tests/auto/uic/baseline/stylesheeteditor.ui.h155
-rw-r--r--tests/auto/uic/baseline/tabbedbrowser.ui232
-rw-r--r--tests/auto/uic/baseline/tabbedbrowser.ui.h218
-rw-r--r--tests/auto/uic/baseline/tablewidgeteditor.ui402
-rw-r--r--tests/auto/uic/baseline/tablewidgeteditor.ui.h392
-rw-r--r--tests/auto/uic/baseline/tetrixwindow.ui164
-rw-r--r--tests/auto/uic/baseline/tetrixwindow.ui.h174
-rw-r--r--tests/auto/uic/baseline/textfinder.ui89
-rw-r--r--tests/auto/uic/baseline/textfinder.ui.h114
-rw-r--r--tests/auto/uic/baseline/topicchooser.ui116
-rw-r--r--tests/auto/uic/baseline/topicchooser.ui.h120
-rw-r--r--tests/auto/uic/baseline/translatedialog.ui300
-rw-r--r--tests/auto/uic/baseline/translatedialog.ui.h261
-rw-r--r--tests/auto/uic/baseline/translationsettings.ui107
-rw-r--r--tests/auto/uic/baseline/translationsettings.ui.h121
-rw-r--r--tests/auto/uic/baseline/treewidgeteditor.ui378
-rw-r--r--tests/auto/uic/baseline/treewidgeteditor.ui.h366
-rw-r--r--tests/auto/uic/baseline/trpreviewtool.ui188
-rw-r--r--tests/auto/uic/baseline/trpreviewtool.ui.h203
-rw-r--r--tests/auto/uic/baseline/validators.ui467
-rw-r--r--tests/auto/uic/baseline/validators.ui.h409
-rw-r--r--tests/auto/uic/baseline/wateringconfigdialog.ui446
-rw-r--r--tests/auto/uic/baseline/wateringconfigdialog.ui.h290
-rw-r--r--tests/auto/uic/generated_ui/placeholder0
-rw-r--r--tests/auto/uic/tst_uic.cpp225
-rw-r--r--tests/auto/uic/uic.pro8
-rw-r--r--tests/auto/uic3/.gitattributes2
-rw-r--r--tests/auto/uic3/.gitignore1
-rw-r--r--tests/auto/uic3/baseline/Configuration_Dialog.ui162
-rw-r--r--tests/auto/uic3/baseline/Configuration_Dialog.ui.4143
-rw-r--r--tests/auto/uic3/baseline/Configuration_Dialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Bottom).ui122
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Bottom).ui.4114
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Bottom).ui.err0
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Right).ui122
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Right).ui.4114
-rw-r--r--tests/auto/uic3/baseline/Dialog_with_Buttons_(Right).ui.err0
-rw-r--r--tests/auto/uic3/baseline/Tab_Dialog.ui146
-rw-r--r--tests/auto/uic3/baseline/Tab_Dialog.ui.4128
-rw-r--r--tests/auto/uic3/baseline/Tab_Dialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/about.ui222
-rw-r--r--tests/auto/uic3/baseline/about.ui.4209
-rw-r--r--tests/auto/uic3/baseline/about.ui.err1
-rw-r--r--tests/auto/uic3/baseline/actioneditor.ui230
-rw-r--r--tests/auto/uic3/baseline/actioneditor.ui.4197
-rw-r--r--tests/auto/uic3/baseline/actioneditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/addressbook.ui324
-rw-r--r--tests/auto/uic3/baseline/addressbook.ui.4304
-rw-r--r--tests/auto/uic3/baseline/addressbook.ui.err0
-rw-r--r--tests/auto/uic3/baseline/addressdetails.ui243
-rw-r--r--tests/auto/uic3/baseline/addressdetails.ui.4215
-rw-r--r--tests/auto/uic3/baseline/addressdetails.ui.err0
-rw-r--r--tests/auto/uic3/baseline/ambientproperties.ui319
-rw-r--r--tests/auto/uic3/baseline/ambientproperties.ui.4292
-rw-r--r--tests/auto/uic3/baseline/ambientproperties.ui.err0
-rw-r--r--tests/auto/uic3/baseline/archivedialog.ui137
-rw-r--r--tests/auto/uic3/baseline/archivedialog.ui.4100
-rw-r--r--tests/auto/uic3/baseline/archivedialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/book.ui189
-rw-r--r--tests/auto/uic3/baseline/book.ui.4165
-rw-r--r--tests/auto/uic3/baseline/book.ui.err5
-rw-r--r--tests/auto/uic3/baseline/buildpage.ui92
-rw-r--r--tests/auto/uic3/baseline/buildpage.ui.476
-rw-r--r--tests/auto/uic3/baseline/buildpage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/changeproperties.ui259
-rw-r--r--tests/auto/uic3/baseline/changeproperties.ui.4213
-rw-r--r--tests/auto/uic3/baseline/changeproperties.ui.err0
-rw-r--r--tests/auto/uic3/baseline/clientbase.ui276
-rw-r--r--tests/auto/uic3/baseline/clientbase.ui.4242
-rw-r--r--tests/auto/uic3/baseline/clientbase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/colornameform.ui155
-rw-r--r--tests/auto/uic3/baseline/colornameform.ui.4125
-rw-r--r--tests/auto/uic3/baseline/colornameform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/config.ui1684
-rw-r--r--tests/auto/uic3/baseline/config.ui.41629
-rw-r--r--tests/auto/uic3/baseline/config.ui.err0
-rw-r--r--tests/auto/uic3/baseline/configdialog.ui195
-rw-r--r--tests/auto/uic3/baseline/configdialog.ui.4171
-rw-r--r--tests/auto/uic3/baseline/configdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/configpage.ui474
-rw-r--r--tests/auto/uic3/baseline/configpage.ui.4447
-rw-r--r--tests/auto/uic3/baseline/configpage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/configtoolboxdialog.ui329
-rw-r--r--tests/auto/uic3/baseline/configtoolboxdialog.ui.4282
-rw-r--r--tests/auto/uic3/baseline/configtoolboxdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/configuration.ui268
-rw-r--r--tests/auto/uic3/baseline/configuration.ui.4243
-rw-r--r--tests/auto/uic3/baseline/configuration.ui.err1
-rw-r--r--tests/auto/uic3/baseline/connect.ui244
-rw-r--r--tests/auto/uic3/baseline/connect.ui.4225
-rw-r--r--tests/auto/uic3/baseline/connect.ui.err0
-rw-r--r--tests/auto/uic3/baseline/connectdialog.ui244
-rw-r--r--tests/auto/uic3/baseline/connectdialog.ui.4226
-rw-r--r--tests/auto/uic3/baseline/connectdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/connectiondialog.ui226
-rw-r--r--tests/auto/uic3/baseline/connectiondialog.ui.4196
-rw-r--r--tests/auto/uic3/baseline/connectiondialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/controlinfo.ui128
-rw-r--r--tests/auto/uic3/baseline/controlinfo.ui.4112
-rw-r--r--tests/auto/uic3/baseline/controlinfo.ui.err0
-rw-r--r--tests/auto/uic3/baseline/createtemplate.ui236
-rw-r--r--tests/auto/uic3/baseline/createtemplate.ui.4188
-rw-r--r--tests/auto/uic3/baseline/createtemplate.ui.err0
-rw-r--r--tests/auto/uic3/baseline/creditformbase.ui212
-rw-r--r--tests/auto/uic3/baseline/creditformbase.ui.4189
-rw-r--r--tests/auto/uic3/baseline/creditformbase.ui.err1
-rw-r--r--tests/auto/uic3/baseline/customize.ui312
-rw-r--r--tests/auto/uic3/baseline/customize.ui.4274
-rw-r--r--tests/auto/uic3/baseline/customize.ui.err1
-rw-r--r--tests/auto/uic3/baseline/customwidgeteditor.ui1385
-rw-r--r--tests/auto/uic3/baseline/customwidgeteditor.ui.41269
-rw-r--r--tests/auto/uic3/baseline/customwidgeteditor.ui.err34
-rw-r--r--tests/auto/uic3/baseline/dbconnection.ui229
-rw-r--r--tests/auto/uic3/baseline/dbconnection.ui.4228
-rw-r--r--tests/auto/uic3/baseline/dbconnection.ui.err0
-rw-r--r--tests/auto/uic3/baseline/dbconnectioneditor.ui154
-rw-r--r--tests/auto/uic3/baseline/dbconnectioneditor.ui.4142
-rw-r--r--tests/auto/uic3/baseline/dbconnectioneditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/dbconnections.ui328
-rw-r--r--tests/auto/uic3/baseline/dbconnections.ui.4290
-rw-r--r--tests/auto/uic3/baseline/dbconnections.ui.err5
-rw-r--r--tests/auto/uic3/baseline/demo.ui182
-rw-r--r--tests/auto/uic3/baseline/demo.ui.4158
-rw-r--r--tests/auto/uic3/baseline/demo.ui.err0
-rw-r--r--tests/auto/uic3/baseline/destination.ui222
-rw-r--r--tests/auto/uic3/baseline/destination.ui.4186
-rw-r--r--tests/auto/uic3/baseline/destination.ui.err1
-rw-r--r--tests/auto/uic3/baseline/dialogform.ui206
-rw-r--r--tests/auto/uic3/baseline/dialogform.ui.4153
-rw-r--r--tests/auto/uic3/baseline/dialogform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/diffdialog.ui122
-rw-r--r--tests/auto/uic3/baseline/diffdialog.ui.486
-rw-r--r--tests/auto/uic3/baseline/diffdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/distributor.ui427
-rw-r--r--tests/auto/uic3/baseline/distributor.ui.4389
-rw-r--r--tests/auto/uic3/baseline/distributor.ui.err3
-rw-r--r--tests/auto/uic3/baseline/dndbase.ui355
-rw-r--r--tests/auto/uic3/baseline/dndbase.ui.4325
-rw-r--r--tests/auto/uic3/baseline/dndbase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/editbook.ui386
-rw-r--r--tests/auto/uic3/baseline/editbook.ui.4346
-rw-r--r--tests/auto/uic3/baseline/editbook.ui.err5
-rw-r--r--tests/auto/uic3/baseline/editfunctions.ui721
-rw-r--r--tests/auto/uic3/baseline/editfunctions.ui.4665
-rw-r--r--tests/auto/uic3/baseline/editfunctions.ui.err1
-rw-r--r--tests/auto/uic3/baseline/extension.ui114
-rw-r--r--tests/auto/uic3/baseline/extension.ui.490
-rw-r--r--tests/auto/uic3/baseline/extension.ui.err0
-rw-r--r--tests/auto/uic3/baseline/finddialog.ui281
-rw-r--r--tests/auto/uic3/baseline/finddialog.ui.4234
-rw-r--r--tests/auto/uic3/baseline/finddialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/findform.ui123
-rw-r--r--tests/auto/uic3/baseline/findform.ui.495
-rw-r--r--tests/auto/uic3/baseline/findform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/finishpage.ui63
-rw-r--r--tests/auto/uic3/baseline/finishpage.ui.453
-rw-r--r--tests/auto/uic3/baseline/finishpage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/folderdlg.ui184
-rw-r--r--tests/auto/uic3/baseline/folderdlg.ui.4161
-rw-r--r--tests/auto/uic3/baseline/folderdlg.ui.err3
-rw-r--r--tests/auto/uic3/baseline/folderspage.ui259
-rw-r--r--tests/auto/uic3/baseline/folderspage.ui.4227
-rw-r--r--tests/auto/uic3/baseline/folderspage.ui.err2
-rw-r--r--tests/auto/uic3/baseline/form.ui85
-rw-r--r--tests/auto/uic3/baseline/form.ui.455
-rw-r--r--tests/auto/uic3/baseline/form.ui.err1
-rw-r--r--tests/auto/uic3/baseline/form1.ui204
-rw-r--r--tests/auto/uic3/baseline/form1.ui.4186
-rw-r--r--tests/auto/uic3/baseline/form1.ui.err1
-rw-r--r--tests/auto/uic3/baseline/form2.ui274
-rw-r--r--tests/auto/uic3/baseline/form2.ui.4303
-rw-r--r--tests/auto/uic3/baseline/form2.ui.err9
-rw-r--r--tests/auto/uic3/baseline/formbase.ui798
-rw-r--r--tests/auto/uic3/baseline/formbase.ui.4652
-rw-r--r--tests/auto/uic3/baseline/formbase.ui.err8
-rw-r--r--tests/auto/uic3/baseline/formsettings.ui556
-rw-r--r--tests/auto/uic3/baseline/formsettings.ui.4557
-rw-r--r--tests/auto/uic3/baseline/formsettings.ui.err0
-rw-r--r--tests/auto/uic3/baseline/ftpmainwindow.ui280
-rw-r--r--tests/auto/uic3/baseline/ftpmainwindow.ui.4244
-rw-r--r--tests/auto/uic3/baseline/ftpmainwindow.ui.err0
-rw-r--r--tests/auto/uic3/baseline/gllandscapeviewer.ui623
-rw-r--r--tests/auto/uic3/baseline/gllandscapeviewer.ui.4537
-rw-r--r--tests/auto/uic3/baseline/gllandscapeviewer.ui.err4
-rw-r--r--tests/auto/uic3/baseline/gotolinedialog.ui176
-rw-r--r--tests/auto/uic3/baseline/gotolinedialog.ui.4157
-rw-r--r--tests/auto/uic3/baseline/gotolinedialog.ui.err1
-rw-r--r--tests/auto/uic3/baseline/helpdemobase.ui239
-rw-r--r--tests/auto/uic3/baseline/helpdemobase.ui.4213
-rw-r--r--tests/auto/uic3/baseline/helpdemobase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/helpdialog.ui506
-rw-r--r--tests/auto/uic3/baseline/helpdialog.ui.4437
-rw-r--r--tests/auto/uic3/baseline/helpdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/iconvieweditor.ui464
-rw-r--r--tests/auto/uic3/baseline/iconvieweditor.ui.4414
-rw-r--r--tests/auto/uic3/baseline/iconvieweditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/install.ui178
-rw-r--r--tests/auto/uic3/baseline/install.ui.4147
-rw-r--r--tests/auto/uic3/baseline/install.ui.err3
-rw-r--r--tests/auto/uic3/baseline/installationwizard.ui195
-rw-r--r--tests/auto/uic3/baseline/installationwizard.ui.4168
-rw-r--r--tests/auto/uic3/baseline/installationwizard.ui.err0
-rw-r--r--tests/auto/uic3/baseline/invokemethod.ui313
-rw-r--r--tests/auto/uic3/baseline/invokemethod.ui.4275
-rw-r--r--tests/auto/uic3/baseline/invokemethod.ui.err0
-rw-r--r--tests/auto/uic3/baseline/license.ui200
-rw-r--r--tests/auto/uic3/baseline/license.ui.4176
-rw-r--r--tests/auto/uic3/baseline/license.ui.err1
-rw-r--r--tests/auto/uic3/baseline/licenseagreementpage.ui202
-rw-r--r--tests/auto/uic3/baseline/licenseagreementpage.ui.4173
-rw-r--r--tests/auto/uic3/baseline/licenseagreementpage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/licensedlg.ui134
-rw-r--r--tests/auto/uic3/baseline/licensedlg.ui.4123
-rw-r--r--tests/auto/uic3/baseline/licensedlg.ui.err0
-rw-r--r--tests/auto/uic3/baseline/licensepage.ui264
-rw-r--r--tests/auto/uic3/baseline/licensepage.ui.4273
-rw-r--r--tests/auto/uic3/baseline/licensepage.ui.err1
-rw-r--r--tests/auto/uic3/baseline/listboxeditor.ui461
-rw-r--r--tests/auto/uic3/baseline/listboxeditor.ui.4425
-rw-r--r--tests/auto/uic3/baseline/listboxeditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/listeditor.ui182
-rw-r--r--tests/auto/uic3/baseline/listeditor.ui.4158
-rw-r--r--tests/auto/uic3/baseline/listeditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/listvieweditor.ui938
-rw-r--r--tests/auto/uic3/baseline/listvieweditor.ui.4858
-rw-r--r--tests/auto/uic3/baseline/listvieweditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/maindialog.ui165
-rw-r--r--tests/auto/uic3/baseline/maindialog.ui.4157
-rw-r--r--tests/auto/uic3/baseline/maindialog.ui.err2
-rw-r--r--tests/auto/uic3/baseline/mainfilesettings.ui211
-rw-r--r--tests/auto/uic3/baseline/mainfilesettings.ui.4187
-rw-r--r--tests/auto/uic3/baseline/mainfilesettings.ui.err0
-rw-r--r--tests/auto/uic3/baseline/mainform.ui74
-rw-r--r--tests/auto/uic3/baseline/mainform.ui.452
-rw-r--r--tests/auto/uic3/baseline/mainform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/mainformbase.ui395
-rw-r--r--tests/auto/uic3/baseline/mainformbase.ui.4343
-rw-r--r--tests/auto/uic3/baseline/mainformbase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/mainview.ui877
-rw-r--r--tests/auto/uic3/baseline/mainview.ui.4725
-rw-r--r--tests/auto/uic3/baseline/mainview.ui.err9
-rw-r--r--tests/auto/uic3/baseline/mainwindow.ui84
-rw-r--r--tests/auto/uic3/baseline/mainwindow.ui.481
-rw-r--r--tests/auto/uic3/baseline/mainwindow.ui.err0
-rw-r--r--tests/auto/uic3/baseline/mainwindowbase.ui1827
-rw-r--r--tests/auto/uic3/baseline/mainwindowbase.ui.41650
-rw-r--r--tests/auto/uic3/baseline/mainwindowbase.ui.err1
-rw-r--r--tests/auto/uic3/baseline/mainwindowwizard.ui757
-rw-r--r--tests/auto/uic3/baseline/mainwindowwizard.ui.4686
-rw-r--r--tests/auto/uic3/baseline/mainwindowwizard.ui.err12
-rw-r--r--tests/auto/uic3/baseline/masterchildwindow.ui111
-rw-r--r--tests/auto/uic3/baseline/masterchildwindow.ui.4109
-rw-r--r--tests/auto/uic3/baseline/masterchildwindow.ui.err0
-rw-r--r--tests/auto/uic3/baseline/metric.ui366
-rw-r--r--tests/auto/uic3/baseline/metric.ui.4332
-rw-r--r--tests/auto/uic3/baseline/metric.ui.err1
-rw-r--r--tests/auto/uic3/baseline/multiclip.ui206
-rw-r--r--tests/auto/uic3/baseline/multiclip.ui.4178
-rw-r--r--tests/auto/uic3/baseline/multiclip.ui.err3
-rw-r--r--tests/auto/uic3/baseline/multilineeditor.ui188
-rw-r--r--tests/auto/uic3/baseline/multilineeditor.ui.4160
-rw-r--r--tests/auto/uic3/baseline/multilineeditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/mydialog.ui32
-rw-r--r--tests/auto/uic3/baseline/mydialog.ui.435
-rw-r--r--tests/auto/uic3/baseline/mydialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/newform.ui245
-rw-r--r--tests/auto/uic3/baseline/newform.ui.4227
-rw-r--r--tests/auto/uic3/baseline/newform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/options.ui587
-rw-r--r--tests/auto/uic3/baseline/options.ui.4519
-rw-r--r--tests/auto/uic3/baseline/options.ui.err0
-rw-r--r--tests/auto/uic3/baseline/optionsform.ui207
-rw-r--r--tests/auto/uic3/baseline/optionsform.ui.4167
-rw-r--r--tests/auto/uic3/baseline/optionsform.ui.err0
-rw-r--r--tests/auto/uic3/baseline/optionspage.ui508
-rw-r--r--tests/auto/uic3/baseline/optionspage.ui.4439
-rw-r--r--tests/auto/uic3/baseline/optionspage.ui.err2
-rw-r--r--tests/auto/uic3/baseline/oramonitor.ui206
-rw-r--r--tests/auto/uic3/baseline/oramonitor.ui.4191
-rw-r--r--tests/auto/uic3/baseline/oramonitor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/pageeditdialog.ui143
-rw-r--r--tests/auto/uic3/baseline/pageeditdialog.ui.4133
-rw-r--r--tests/auto/uic3/baseline/pageeditdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/paletteeditor.ui503
-rw-r--r--tests/auto/uic3/baseline/paletteeditor.ui.4469
-rw-r--r--tests/auto/uic3/baseline/paletteeditor.ui.err9
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvanced.ui755
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvanced.ui.4686
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvanced.ui.err12
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvancedbase.ui682
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvancedbase.ui.4614
-rw-r--r--tests/auto/uic3/baseline/paletteeditoradvancedbase.ui.err10
-rw-r--r--tests/auto/uic3/baseline/pixmapcollectioneditor.ui225
-rw-r--r--tests/auto/uic3/baseline/pixmapcollectioneditor.ui.4185
-rw-r--r--tests/auto/uic3/baseline/pixmapcollectioneditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/pixmapfunction.ui937
-rw-r--r--tests/auto/uic3/baseline/pixmapfunction.ui.4873
-rw-r--r--tests/auto/uic3/baseline/pixmapfunction.ui.err0
-rw-r--r--tests/auto/uic3/baseline/preferences.ui670
-rw-r--r--tests/auto/uic3/baseline/preferences.ui.4599
-rw-r--r--tests/auto/uic3/baseline/preferences.ui.err0
-rw-r--r--tests/auto/uic3/baseline/previewwidget.ui311
-rw-r--r--tests/auto/uic3/baseline/previewwidget.ui.4258
-rw-r--r--tests/auto/uic3/baseline/previewwidget.ui.err0
-rw-r--r--tests/auto/uic3/baseline/previewwidgetbase.ui311
-rw-r--r--tests/auto/uic3/baseline/previewwidgetbase.ui.4258
-rw-r--r--tests/auto/uic3/baseline/previewwidgetbase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/printpreview.ui277
-rw-r--r--tests/auto/uic3/baseline/printpreview.ui.4246
-rw-r--r--tests/auto/uic3/baseline/printpreview.ui.err0
-rw-r--r--tests/auto/uic3/baseline/progressbarwidget.ui246
-rw-r--r--tests/auto/uic3/baseline/progressbarwidget.ui.4221
-rw-r--r--tests/auto/uic3/baseline/progressbarwidget.ui.err0
-rw-r--r--tests/auto/uic3/baseline/progresspage.ui78
-rw-r--r--tests/auto/uic3/baseline/progresspage.ui.469
-rw-r--r--tests/auto/uic3/baseline/progresspage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/projectsettings.ui308
-rw-r--r--tests/auto/uic3/baseline/projectsettings.ui.4272
-rw-r--r--tests/auto/uic3/baseline/projectsettings.ui.err0
-rw-r--r--tests/auto/uic3/baseline/qactivexselect.ui194
-rw-r--r--tests/auto/uic3/baseline/qactivexselect.ui.4158
-rw-r--r--tests/auto/uic3/baseline/qactivexselect.ui.err0
-rw-r--r--tests/auto/uic3/baseline/quuidbase.ui300
-rw-r--r--tests/auto/uic3/baseline/quuidbase.ui.4266
-rw-r--r--tests/auto/uic3/baseline/quuidbase.ui.err8
-rw-r--r--tests/auto/uic3/baseline/remotectrl.ui145
-rw-r--r--tests/auto/uic3/baseline/remotectrl.ui.4124
-rw-r--r--tests/auto/uic3/baseline/remotectrl.ui.err0
-rw-r--r--tests/auto/uic3/baseline/replacedialog.ui325
-rw-r--r--tests/auto/uic3/baseline/replacedialog.ui.4277
-rw-r--r--tests/auto/uic3/baseline/replacedialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/review.ui167
-rw-r--r--tests/auto/uic3/baseline/review.ui.4140
-rw-r--r--tests/auto/uic3/baseline/review.ui.err1
-rw-r--r--tests/auto/uic3/baseline/richedit.ui612
-rw-r--r--tests/auto/uic3/baseline/richedit.ui.4584
-rw-r--r--tests/auto/uic3/baseline/richedit.ui.err11
-rw-r--r--tests/auto/uic3/baseline/richtextfontdialog.ui354
-rw-r--r--tests/auto/uic3/baseline/richtextfontdialog.ui.4310
-rw-r--r--tests/auto/uic3/baseline/richtextfontdialog.ui.err1
-rw-r--r--tests/auto/uic3/baseline/search.ui136
-rw-r--r--tests/auto/uic3/baseline/search.ui.4110
-rw-r--r--tests/auto/uic3/baseline/search.ui.err0
-rw-r--r--tests/auto/uic3/baseline/searchbase.ui480
-rw-r--r--tests/auto/uic3/baseline/searchbase.ui.4414
-rw-r--r--tests/auto/uic3/baseline/searchbase.ui.err2
-rw-r--r--tests/auto/uic3/baseline/serverbase.ui117
-rw-r--r--tests/auto/uic3/baseline/serverbase.ui.4108
-rw-r--r--tests/auto/uic3/baseline/serverbase.ui.err0
-rw-r--r--tests/auto/uic3/baseline/settingsdialog.ui516
-rw-r--r--tests/auto/uic3/baseline/settingsdialog.ui.4446
-rw-r--r--tests/auto/uic3/baseline/settingsdialog.ui.err1
-rw-r--r--tests/auto/uic3/baseline/sidedecoration.ui108
-rw-r--r--tests/auto/uic3/baseline/sidedecoration.ui.4104
-rw-r--r--tests/auto/uic3/baseline/sidedecoration.ui.err0
-rw-r--r--tests/auto/uic3/baseline/small_dialog.ui197
-rw-r--r--tests/auto/uic3/baseline/small_dialog.ui.4180
-rw-r--r--tests/auto/uic3/baseline/small_dialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/sqlbrowsewindow.ui143
-rw-r--r--tests/auto/uic3/baseline/sqlbrowsewindow.ui.4125
-rw-r--r--tests/auto/uic3/baseline/sqlbrowsewindow.ui.err0
-rw-r--r--tests/auto/uic3/baseline/sqlex.ui337
-rw-r--r--tests/auto/uic3/baseline/sqlex.ui.4279
-rw-r--r--tests/auto/uic3/baseline/sqlex.ui.err1
-rw-r--r--tests/auto/uic3/baseline/sqlformwizard.ui1776
-rw-r--r--tests/auto/uic3/baseline/sqlformwizard.ui.41617
-rw-r--r--tests/auto/uic3/baseline/sqlformwizard.ui.err0
-rw-r--r--tests/auto/uic3/baseline/startdialog.ui331
-rw-r--r--tests/auto/uic3/baseline/startdialog.ui.4293
-rw-r--r--tests/auto/uic3/baseline/startdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/statistics.ui259
-rw-r--r--tests/auto/uic3/baseline/statistics.ui.4252
-rw-r--r--tests/auto/uic3/baseline/statistics.ui.err0
-rw-r--r--tests/auto/uic3/baseline/submitdialog.ui259
-rw-r--r--tests/auto/uic3/baseline/submitdialog.ui.4199
-rw-r--r--tests/auto/uic3/baseline/submitdialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/tabbedbrowser.ui141
-rw-r--r--tests/auto/uic3/baseline/tabbedbrowser.ui.474
-rw-r--r--tests/auto/uic3/baseline/tabbedbrowser.ui.err0
-rw-r--r--tests/auto/uic3/baseline/tableeditor.ui831
-rw-r--r--tests/auto/uic3/baseline/tableeditor.ui.4746
-rw-r--r--tests/auto/uic3/baseline/tableeditor.ui.err0
-rw-r--r--tests/auto/uic3/baseline/tabletstatsbase.ui298
-rw-r--r--tests/auto/uic3/baseline/tabletstatsbase.ui.4276
-rw-r--r--tests/auto/uic3/baseline/tabletstatsbase.ui.err1
-rw-r--r--tests/auto/uic3/baseline/topicchooser.ui182
-rw-r--r--tests/auto/uic3/baseline/topicchooser.ui.4168
-rw-r--r--tests/auto/uic3/baseline/topicchooser.ui.err0
-rw-r--r--tests/auto/uic3/baseline/uninstall.ui167
-rw-r--r--tests/auto/uic3/baseline/uninstall.ui.4147
-rw-r--r--tests/auto/uic3/baseline/uninstall.ui.err0
-rw-r--r--tests/auto/uic3/baseline/unpackdlg.ui330
-rw-r--r--tests/auto/uic3/baseline/unpackdlg.ui.4275
-rw-r--r--tests/auto/uic3/baseline/unpackdlg.ui.err1
-rw-r--r--tests/auto/uic3/baseline/variabledialog.ui301
-rw-r--r--tests/auto/uic3/baseline/variabledialog.ui.4281
-rw-r--r--tests/auto/uic3/baseline/variabledialog.ui.err0
-rw-r--r--tests/auto/uic3/baseline/welcome.ui155
-rw-r--r--tests/auto/uic3/baseline/welcome.ui.4144
-rw-r--r--tests/auto/uic3/baseline/welcome.ui.err2
-rw-r--r--tests/auto/uic3/baseline/widget.ui1466
-rw-r--r--tests/auto/uic3/baseline/widget.ui.41356
-rw-r--r--tests/auto/uic3/baseline/widget.ui.err14
-rw-r--r--tests/auto/uic3/baseline/widgetsbase.ui1269
-rw-r--r--tests/auto/uic3/baseline/widgetsbase.ui.41176
-rw-r--r--tests/auto/uic3/baseline/widgetsbase.ui.err2
-rw-r--r--tests/auto/uic3/baseline/widgetsbase_pro.ui1158
-rw-r--r--tests/auto/uic3/baseline/widgetsbase_pro.ui.41079
-rw-r--r--tests/auto/uic3/baseline/widgetsbase_pro.ui.err2
-rw-r--r--tests/auto/uic3/baseline/winintropage.ui39
-rw-r--r--tests/auto/uic3/baseline/winintropage.ui.437
-rw-r--r--tests/auto/uic3/baseline/winintropage.ui.err0
-rw-r--r--tests/auto/uic3/baseline/wizardeditor.ui345
-rw-r--r--tests/auto/uic3/baseline/wizardeditor.ui.4294
-rw-r--r--tests/auto/uic3/baseline/wizardeditor.ui.err0
-rw-r--r--tests/auto/uic3/generated/placeholder0
-rw-r--r--tests/auto/uic3/tst_uic3.cpp190
-rw-r--r--tests/auto/uic3/uic3.pro8
-rw-r--r--tests/auto/uiloader/.gitignore1
-rw-r--r--tests/auto/uiloader/README.TXT93
-rw-r--r--tests/auto/uiloader/WTC0090dca226c8.ini11
-rw-r--r--tests/auto/uiloader/baseline/Dialog_with_Buttons_Bottom.ui71
-rw-r--r--tests/auto/uiloader/baseline/Dialog_with_Buttons_Right.ui71
-rw-r--r--tests/auto/uiloader/baseline/Dialog_without_Buttons.ui18
-rw-r--r--tests/auto/uiloader/baseline/Main_Window.ui27
-rw-r--r--tests/auto/uiloader/baseline/Widget.ui41
-rw-r--r--tests/auto/uiloader/baseline/addlinkdialog.ui112
-rw-r--r--tests/auto/uiloader/baseline/addtorrentform.ui266
-rw-r--r--tests/auto/uiloader/baseline/authenticationdialog.ui129
-rw-r--r--tests/auto/uiloader/baseline/backside.ui208
-rw-r--r--tests/auto/uiloader/baseline/batchtranslation.ui235
-rw-r--r--tests/auto/uiloader/baseline/bookmarkdialog.ui161
-rw-r--r--tests/auto/uiloader/baseline/bookwindow.ui149
-rw-r--r--tests/auto/uiloader/baseline/browserwidget.ui199
-rw-r--r--tests/auto/uiloader/baseline/calculator.ui406
-rw-r--r--tests/auto/uiloader/baseline/calculatorform.ui303
-rw-r--r--tests/auto/uiloader/baseline/certificateinfo.ui85
-rw-r--r--tests/auto/uiloader/baseline/chatdialog.ui79
-rw-r--r--tests/auto/uiloader/baseline/chatmainwindow.ui185
-rw-r--r--tests/auto/uiloader/baseline/chatsetnickname.ui149
-rw-r--r--tests/auto/uiloader/baseline/config.ui2527
-rw-r--r--tests/auto/uiloader/baseline/connectdialog.ui150
-rw-r--r--tests/auto/uiloader/baseline/controller.ui64
-rw-r--r--tests/auto/uiloader/baseline/cookies.ui106
-rw-r--r--tests/auto/uiloader/baseline/cookiesexceptions.ui184
-rw-r--r--tests/auto/uiloader/baseline/css_buttons_background.ui232
-rw-r--r--tests/auto/uiloader/baseline/css_combobox_background.ui306
-rw-r--r--tests/auto/uiloader/baseline/css_exemple_coffee.ui469
-rw-r--r--tests/auto/uiloader/baseline/css_exemple_pagefold.ui656
-rw-r--r--tests/auto/uiloader/baseline/css_exemple_usage.ui91
-rw-r--r--tests/auto/uiloader/baseline/css_frames.ui308
-rw-r--r--tests/auto/uiloader/baseline/css_groupboxes.ui150
-rw-r--r--tests/auto/uiloader/baseline/css_qprogressbar.ui125
-rw-r--r--tests/auto/uiloader/baseline/css_qtabwidget.ui224
-rw-r--r--tests/auto/uiloader/baseline/css_scroll.ui599
-rw-r--r--tests/auto/uiloader/baseline/css_tab_task213374.ui306
-rw-r--r--tests/auto/uiloader/baseline/default.ui329
-rw-r--r--tests/auto/uiloader/baseline/dialog.ui47
-rw-r--r--tests/auto/uiloader/baseline/downloaditem.ui134
-rw-r--r--tests/auto/uiloader/baseline/downloads.ui83
-rw-r--r--tests/auto/uiloader/baseline/embeddeddialog.ui87
-rw-r--r--tests/auto/uiloader/baseline/filespage.ui79
-rw-r--r--tests/auto/uiloader/baseline/filternamedialog.ui67
-rw-r--r--tests/auto/uiloader/baseline/filterpage.ui125
-rw-r--r--tests/auto/uiloader/baseline/finddialog.ui264
-rw-r--r--tests/auto/uiloader/baseline/formwindowsettings.ui310
-rw-r--r--tests/auto/uiloader/baseline/generalpage.ui69
-rw-r--r--tests/auto/uiloader/baseline/gridpanel.ui144
-rw-r--r--tests/auto/uiloader/baseline/helpdialog.ui403
-rw-r--r--tests/auto/uiloader/baseline/history.ui106
-rw-r--r--tests/auto/uiloader/baseline/identifierpage.ui132
-rw-r--r--tests/auto/uiloader/baseline/imagedialog.ui389
-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_checked.pngbin0 -> 263 bytes-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_checked_hover.pngbin0 -> 266 bytes-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_checked_pressed.pngbin0 -> 425 bytes-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_unchecked.pngbin0 -> 159 bytes-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_unchecked_hover.pngbin0 -> 159 bytes-rw-r--r--tests/auto/uiloader/baseline/images/checkbox_unchecked_pressed.pngbin0 -> 320 bytes-rw-r--r--tests/auto/uiloader/baseline/images/down_arrow.pngbin0 -> 175 bytes-rw-r--r--tests/auto/uiloader/baseline/images/down_arrow_disabled.pngbin0 -> 174 bytes-rw-r--r--tests/auto/uiloader/baseline/images/frame.pngbin0 -> 253 bytes-rw-r--r--tests/auto/uiloader/baseline/images/pagefold.pngbin0 -> 1545 bytes-rw-r--r--tests/auto/uiloader/baseline/images/pushbutton.pngbin0 -> 533 bytes-rw-r--r--tests/auto/uiloader/baseline/images/pushbutton_hover.pngbin0 -> 525 bytes-rw-r--r--tests/auto/uiloader/baseline/images/pushbutton_pressed.pngbin0 -> 513 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_checked.pngbin0 -> 355 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_checked_hover.pngbin0 -> 532 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_checked_pressed.pngbin0 -> 599 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_unchecked.pngbin0 -> 240 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_unchecked_hover.pngbin0 -> 492 bytes-rw-r--r--tests/auto/uiloader/baseline/images/radiobutton_unchecked_pressed.pngbin0 -> 556 bytes-rw-r--r--tests/auto/uiloader/baseline/images/sizegrip.pngbin0 -> 129 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spindown.pngbin0 -> 276 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spindown_hover.pngbin0 -> 268 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spindown_off.pngbin0 -> 249 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spindown_pressed.pngbin0 -> 264 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spinup.pngbin0 -> 283 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spinup_hover.pngbin0 -> 277 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spinup_off.pngbin0 -> 274 bytes-rw-r--r--tests/auto/uiloader/baseline/images/spinup_pressed.pngbin0 -> 277 bytes-rw-r--r--tests/auto/uiloader/baseline/images/up_arrow.pngbin0 -> 197 bytes-rw-r--r--tests/auto/uiloader/baseline/images/up_arrow_disabled.pngbin0 -> 172 bytes-rw-r--r--tests/auto/uiloader/baseline/inputpage.ui79
-rw-r--r--tests/auto/uiloader/baseline/installdialog.ui118
-rw-r--r--tests/auto/uiloader/baseline/languagesdialog.ui160
-rw-r--r--tests/auto/uiloader/baseline/listwidgeteditor.ui225
-rw-r--r--tests/auto/uiloader/baseline/mainwindow.ui502
-rw-r--r--tests/auto/uiloader/baseline/mainwindowbase.ui1213
-rw-r--r--tests/auto/uiloader/baseline/mydialog.ui47
-rw-r--r--tests/auto/uiloader/baseline/myform.ui130
-rw-r--r--tests/auto/uiloader/baseline/newactiondialog.ui201
-rw-r--r--tests/auto/uiloader/baseline/newdynamicpropertydialog.ui106
-rw-r--r--tests/auto/uiloader/baseline/newform.ui152
-rw-r--r--tests/auto/uiloader/baseline/orderdialog.ui197
-rw-r--r--tests/auto/uiloader/baseline/outputpage.ui95
-rw-r--r--tests/auto/uiloader/baseline/pagefold.ui349
-rw-r--r--tests/auto/uiloader/baseline/paletteeditor.ui263
-rw-r--r--tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui616
-rw-r--r--tests/auto/uiloader/baseline/passworddialog.ui111
-rw-r--r--tests/auto/uiloader/baseline/pathpage.ui114
-rw-r--r--tests/auto/uiloader/baseline/phrasebookbox.ui210
-rw-r--r--tests/auto/uiloader/baseline/plugindialog.ui152
-rw-r--r--tests/auto/uiloader/baseline/preferencesdialog.ui165
-rw-r--r--tests/auto/uiloader/baseline/previewconfigurationwidget.ui91
-rw-r--r--tests/auto/uiloader/baseline/previewdialogbase.ui224
-rw-r--r--tests/auto/uiloader/baseline/previewwidget.ui237
-rw-r--r--tests/auto/uiloader/baseline/previewwidgetbase.ui339
-rw-r--r--tests/auto/uiloader/baseline/proxy.ui104
-rw-r--r--tests/auto/uiloader/baseline/qfiledialog.ui319
-rw-r--r--tests/auto/uiloader/baseline/qpagesetupwidget.ui353
-rw-r--r--tests/auto/uiloader/baseline/qprintpropertieswidget.ui70
-rw-r--r--tests/auto/uiloader/baseline/qprintsettingsoutput.ui371
-rw-r--r--tests/auto/uiloader/baseline/qprintwidget.ui116
-rw-r--r--tests/auto/uiloader/baseline/qsqlconnectiondialog.ui224
-rw-r--r--tests/auto/uiloader/baseline/qtgradientdialog.ui120
-rw-r--r--tests/auto/uiloader/baseline/qtgradienteditor.ui1376
-rw-r--r--tests/auto/uiloader/baseline/qtgradientview.ui135
-rw-r--r--tests/auto/uiloader/baseline/qtgradientviewdialog.ui120
-rw-r--r--tests/auto/uiloader/baseline/qtresourceeditordialog.ui180
-rw-r--r--tests/auto/uiloader/baseline/qttoolbardialog.ui207
-rw-r--r--tests/auto/uiloader/baseline/querywidget.ui163
-rw-r--r--tests/auto/uiloader/baseline/remotecontrol.ui228
-rw-r--r--tests/auto/uiloader/baseline/saveformastemplate.ui165
-rw-r--r--tests/auto/uiloader/baseline/settings.ui262
-rw-r--r--tests/auto/uiloader/baseline/signalslotdialog.ui129
-rw-r--r--tests/auto/uiloader/baseline/sslclient.ui190
-rw-r--r--tests/auto/uiloader/baseline/sslerrors.ui110
-rw-r--r--tests/auto/uiloader/baseline/statistics.ui241
-rw-r--r--tests/auto/uiloader/baseline/stringlisteditor.ui264
-rw-r--r--tests/auto/uiloader/baseline/stylesheeteditor.ui171
-rw-r--r--tests/auto/uiloader/baseline/tabbedbrowser.ui232
-rw-r--r--tests/auto/uiloader/baseline/tablewidgeteditor.ui402
-rw-r--r--tests/auto/uiloader/baseline/tetrixwindow.ui164
-rw-r--r--tests/auto/uiloader/baseline/textfinder.ui89
-rw-r--r--tests/auto/uiloader/baseline/topicchooser.ui116
-rw-r--r--tests/auto/uiloader/baseline/translatedialog.ui300
-rw-r--r--tests/auto/uiloader/baseline/translationsettings.ui107
-rw-r--r--tests/auto/uiloader/baseline/treewidgeteditor.ui378
-rw-r--r--tests/auto/uiloader/baseline/trpreviewtool.ui188
-rw-r--r--tests/auto/uiloader/baseline/validators.ui467
-rw-r--r--tests/auto/uiloader/baseline/wateringconfigdialog.ui446
-rw-r--r--tests/auto/uiloader/desert.ini11
-rw-r--r--tests/auto/uiloader/dole.ini11
-rw-r--r--tests/auto/uiloader/gravlaks.ini11
-rw-r--r--tests/auto/uiloader/jackychan.ini11
-rw-r--r--tests/auto/uiloader/jeunehomme.ini11
-rw-r--r--tests/auto/uiloader/kangaroo.ini11
-rw-r--r--tests/auto/uiloader/kayak.ini11
-rw-r--r--tests/auto/uiloader/scruffy.ini11
-rw-r--r--tests/auto/uiloader/troll15.ini11
-rw-r--r--tests/auto/uiloader/tst_screenshot/README.TXT13
-rw-r--r--tests/auto/uiloader/tst_screenshot/main.cpp209
-rw-r--r--tests/auto/uiloader/tst_screenshot/tst_screenshot.pro8
-rw-r--r--tests/auto/uiloader/tundra.ini11
-rw-r--r--tests/auto/uiloader/uiloader.pro3
-rw-r--r--tests/auto/uiloader/uiloader/tst_uiloader.cpp104
-rw-r--r--tests/auto/uiloader/uiloader/uiloader.cpp814
-rw-r--r--tests/auto/uiloader/uiloader/uiloader.h109
-rw-r--r--tests/auto/uiloader/uiloader/uiloader.pro31
-rw-r--r--tests/auto/uiloader/wartburg.ini11
-rw-r--r--tests/auto/xmlpatterns.pri21
-rw-r--r--tests/auto/xmlpatterns/.gitattributes3
-rw-r--r--tests/auto/xmlpatterns/.gitignore5
-rw-r--r--tests/auto/xmlpatterns/XSLTTODO1450
-rw-r--r--tests/auto/xmlpatterns/baselines/globals.xml12
-rw-r--r--tests/auto/xmlpatterns/queries/README4
-rw-r--r--tests/auto/xmlpatterns/queries/allAtomics.xq50
-rw-r--r--tests/auto/xmlpatterns/queries/allAtomicsExternally.xq33
-rw-r--r--tests/auto/xmlpatterns/queries/completelyEmptyQuery.xq0
-rw-r--r--tests/auto/xmlpatterns/queries/concat.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/emptySequence.xq2
-rw-r--r--tests/auto/xmlpatterns/queries/errorFunction.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/externalStringVariable.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/externalVariable.xq2
-rw-r--r--tests/auto/xmlpatterns/queries/externalVariableUsedTwice.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/flwor.xq4
-rw-r--r--tests/auto/xmlpatterns/queries/globals.gccxml33
-rw-r--r--tests/auto/xmlpatterns/queries/invalidRegexp.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/nodeSequence.xq31
-rw-r--r--tests/auto/xmlpatterns/queries/nonexistingCollection.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/oneElement.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/onePlusOne.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/onlyDocumentNode.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/openDocument.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/reportGlobals.xq101
-rw-r--r--tests/auto/xmlpatterns/queries/simpleDocument.xml1
-rw-r--r--tests/auto/xmlpatterns/queries/simpleLibraryModule.xq5
-rw-r--r--tests/auto/xmlpatterns/queries/staticBaseURI.xq3
-rw-r--r--tests/auto/xmlpatterns/queries/staticError.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/syntaxError.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/threeVariables.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/twoVariables.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/typeError.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/unavailableExternalVariable.xq2
-rw-r--r--tests/auto/xmlpatterns/queries/unsupportedCollation.xq2
-rw-r--r--tests/auto/xmlpatterns/queries/wrongArity.xq1
-rw-r--r--tests/auto/xmlpatterns/queries/zeroDivision.xq1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Anunboundexternalvariable.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Asimplemathquery.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Asingledashthatsinvalid.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Asinglequerythatdoesnotexist.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputqueryfirst.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Basicuseofoutputquerylast.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariable.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Bindanexternalvariablequeryappearinglast.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Callanamedtemplateandusenofocus..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Callfnerror.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Ensureisuricanappearafterthequeryfilename.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Evaluatealibrarymodule.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Evaluateastylesheetwithnocontextdocument.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invalidtemplatename.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokeatemplateandusepassparameters..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokeversion.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokewithcoloninvariablename..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokewithinvalidparamvalue..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokewithmissingnameinparamarg..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathasnovalue..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Invokewithparamthathastwoadjacentequalsigns..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaFTP.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/LoadqueryviaHTTP.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Loadqueryviadatascheme.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/MakesurequerypathsareresolvedagainstCWDnotthelocationoftheexecutable..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Notwellformedinstancedocumentcausescrashincoloringcode..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Notwellformedstylesheetcausescrashincoloringcode..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Openannonexistentfile.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Openanonexistingcollection..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passhelp.txt31
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passinanexternalvariablebutthequerydoesntuseit..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passinastylesheetfileandafocusfilewhichdoesntexist.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/PassinastylesheetfilewhichcontainsanXQueryquery.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passinastylsheetfileandafocusfilewhichdoesntexist.txt15
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/PassinastylsheetfilewhichcontainsanXQueryquery.txt16
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passingasingledashisinsufficient.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passingtwodashesthelastisinterpretedasafilename.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/PassininvalidURI.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Passthreedashesthetwolastgetsinterpretedastwoqueryarguments.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt5
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestoasingledocumentnodewithnochildren..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Runaquerywhichevaluatestotheemptysequence..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatdoesnotexists.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifyanamedtemplatethatexists.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifynoargumentsatall..txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicedifferentvalues.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifythesameparametertwicesamevalues.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifytwodifferentquerynames.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Specifytwoidenticalquerynames.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/TriggeranassertinQPatternistColorOutput.ThequerynaturallycontainsanerrorXPTY0004..txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/TriggerasecondassertinQPatternistColorOutput.ThequerynaturallycontainsXPST0003..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Triggerastaticerror..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Unknownswitchd.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Unknownswitchunknownswitch.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useanativepath.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useanexternalvariablemultipletimes..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useasimplifiedstylesheetmodule.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Usefndoc.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatfirst.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Usefndoctogetherwithnoformatlast.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useoutputonafilewithexistingcontenttoensurewetruncatenotappendthecontentweproduce..txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useoutputtwice.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useparamthrice.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Useparamtwice.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/Wedontsupportformatanylonger.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/XQuerydataXQuerykeywordmessagemarkups.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/XQueryexpressionmessagemarkups.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/XQueryfunctionmessagemarkups.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/XQuerytypemessagemarkups.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/XQueryurimessagemarkups.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/initialtemplatedoesntworkwithXQueries..txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/initialtemplatemustbefollowedbyavalue2.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/onequeryandaterminatingdashattheend.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/onequerywithaprecedingdash.txt0
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/onlynoformat.txt2
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/outputwithanonwritablefile.txt1
-rw-r--r--tests/auto/xmlpatterns/stderrBaselines/paramismissingsomultiplequeriesappear.txt1
-rw-r--r--tests/auto/xmlpatterns/stylesheets/bool070.xml1
-rw-r--r--tests/auto/xmlpatterns/stylesheets/bool070.xsl6
-rw-r--r--tests/auto/xmlpatterns/stylesheets/copyWholeDocument.xsl9
-rw-r--r--tests/auto/xmlpatterns/stylesheets/documentElement.xml1
-rw-r--r--tests/auto/xmlpatterns/stylesheets/namedAndRootTemplate.xsl5
-rw-r--r--tests/auto/xmlpatterns/stylesheets/namedTemplate.xsl8
-rw-r--r--tests/auto/xmlpatterns/stylesheets/notWellformed.xsl9
-rw-r--r--tests/auto/xmlpatterns/stylesheets/onlyRootTemplate.xsl9
-rw-r--r--tests/auto/xmlpatterns/stylesheets/parameters.xsl41
-rw-r--r--tests/auto/xmlpatterns/stylesheets/queryAsStylesheet.xsl1
-rw-r--r--tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xml1
-rw-r--r--tests/auto/xmlpatterns/stylesheets/simplifiedStylesheetModule.xsl4
-rw-r--r--tests/auto/xmlpatterns/stylesheets/useParameters.xsl16
-rw-r--r--tests/auto/xmlpatterns/tst_xmlpatterns.cpp1011
-rw-r--r--tests/auto/xmlpatterns/xmlpatterns.pro5
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/.gitattributes6
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/.gitignore2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/Baseline.xml2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/DiagnosticsCatalog.xml1046
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/fail-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-10.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-11-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-12-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldFail/succeed-9-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-11.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-13.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-14.txt3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-3.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-4.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-5.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-2-6.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-6-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-1.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-7-2.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-8.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/ExpectedTestResults/ShouldSucceed/succeed-9.txt1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-1.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-10.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-11.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-12.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-14.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-15.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-16.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-17.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-18.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-2.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-3.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-4.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-5.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-6.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-7.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-8.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldFail/fail-9.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-1.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-10.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-11.xq3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-12.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-13.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-14.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-2.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-3.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-4.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-5.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-6.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-7.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-8.xq2
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/Queries/XQuery/ShouldSucceed/succeed-9.xq1
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/bib2.xml40
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/TestSuite/TestSources/emptydoc.xml1
-rwxr-xr-xtests/auto/xmlpatternsdiagnosticsts/TestSuite/validate.sh3
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/test/test.pro32
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp80
-rw-r--r--tests/auto/xmlpatternsdiagnosticsts/xmlpatternsdiagnosticsts.pro4
-rw-r--r--tests/auto/xmlpatternsview/.gitignore1
-rw-r--r--tests/auto/xmlpatternsview/test/test.pro17
-rw-r--r--tests/auto/xmlpatternsview/test/tst_xmlpatternsview.cpp74
-rw-r--r--tests/auto/xmlpatternsview/view/FunctionSignaturesView.cpp101
-rw-r--r--tests/auto/xmlpatternsview/view/FunctionSignaturesView.h116
-rw-r--r--tests/auto/xmlpatternsview/view/MainWindow.cpp531
-rw-r--r--tests/auto/xmlpatternsview/view/MainWindow.h215
-rw-r--r--tests/auto/xmlpatternsview/view/TestCaseView.cpp220
-rw-r--r--tests/auto/xmlpatternsview/view/TestCaseView.h132
-rw-r--r--tests/auto/xmlpatternsview/view/TestResultView.cpp204
-rw-r--r--tests/auto/xmlpatternsview/view/TestResultView.h127
-rw-r--r--tests/auto/xmlpatternsview/view/TreeSortFilter.cpp163
-rw-r--r--tests/auto/xmlpatternsview/view/TreeSortFilter.h139
-rw-r--r--tests/auto/xmlpatternsview/view/UserTestCase.cpp200
-rw-r--r--tests/auto/xmlpatternsview/view/UserTestCase.h167
-rw-r--r--tests/auto/xmlpatternsview/view/XDTItemItem.cpp160
-rw-r--r--tests/auto/xmlpatternsview/view/XDTItemItem.h133
-rw-r--r--tests/auto/xmlpatternsview/view/main.cpp103
-rw-r--r--tests/auto/xmlpatternsview/view/ui_BaseLinePage.ui48
-rw-r--r--tests/auto/xmlpatternsview/view/ui_FunctionSignaturesView.ui70
-rw-r--r--tests/auto/xmlpatternsview/view/ui_MainWindow.ui310
-rw-r--r--tests/auto/xmlpatternsview/view/ui_TestCaseView.ui224
-rw-r--r--tests/auto/xmlpatternsview/view/ui_TestResultView.ui239
-rw-r--r--tests/auto/xmlpatternsview/view/view.pro35
-rw-r--r--tests/auto/xmlpatternsview/xmlpatternsview.pro8
-rw-r--r--tests/auto/xmlpatternsxqts/.gitattributes1
-rw-r--r--tests/auto/xmlpatternsxqts/.gitignore3
-rw-r--r--tests/auto/xmlpatternsxqts/Baseline.xml2
-rw-r--r--tests/auto/xmlpatternsxqts/TODO241
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ASTItem.cpp202
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ASTItem.h156
-rw-r--r--tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.cpp305
-rw-r--r--tests/auto/xmlpatternsxqts/lib/DebugExpressionFactory.h169
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorHandler.cpp207
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorHandler.h190
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorItem.cpp183
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ErrorItem.h135
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExitCode.h146
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExpressionInfo.cpp95
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExpressionInfo.h121
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExpressionNamer.cpp357
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExpressionNamer.h322
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.cpp181
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ExternalSourceLoader.h178
-rw-r--r--tests/auto/xmlpatternsxqts/lib/Global.cpp124
-rw-r--r--tests/auto/xmlpatternsxqts/lib/Global.h169
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ResultThreader.cpp117
-rw-r--r--tests/auto/xmlpatternsxqts/lib/ResultThreader.h151
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestBaseLine.cpp545
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestBaseLine.h246
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestCase.cpp480
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestCase.h297
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestContainer.cpp192
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestContainer.h164
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestGroup.cpp180
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestGroup.h134
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestItem.h174
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestResult.cpp199
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestResult.h220
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestResultHandler.cpp139
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestResultHandler.h156
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuite.cpp302
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuite.h191
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.cpp353
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuiteHandler.h210
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuiteResult.cpp214
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TestSuiteResult.h134
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeItem.cpp103
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeItem.h155
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeModel.cpp220
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeModel.h151
-rw-r--r--tests/auto/xmlpatternsxqts/lib/Worker.cpp299
-rw-r--r--tests/auto/xmlpatternsxqts/lib/Worker.h141
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XMLWriter.cpp710
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XMLWriter.h444
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XQTSTestCase.cpp327
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XQTSTestCase.h190
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.cpp275
-rw-r--r--tests/auto/xmlpatternsxqts/lib/XSLTTestSuiteHandler.h199
-rw-r--r--tests/auto/xmlpatternsxqts/lib/docs/XMLIndenterExample.cpp63
-rw-r--r--tests/auto/xmlpatternsxqts/lib/docs/XMLIndenterExampleResult.xml3
-rw-r--r--tests/auto/xmlpatternsxqts/lib/docs/XMLWriterExample.cpp63
-rw-r--r--tests/auto/xmlpatternsxqts/lib/docs/XMLWriterExampleResult.xml3
-rw-r--r--tests/auto/xmlpatternsxqts/lib/lib.pro78
-rw-r--r--tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.cpp227
-rw-r--r--tests/auto/xmlpatternsxqts/lib/tests/XMLWriterTest.h118
-rwxr-xr-xtests/auto/xmlpatternsxqts/summarizeBaseline.sh10
-rw-r--r--tests/auto/xmlpatternsxqts/summarizeBaseline.xsl25
-rw-r--r--tests/auto/xmlpatternsxqts/test/test.pro28
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_suitetest.cpp166
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_suitetest.h99
-rw-r--r--tests/auto/xmlpatternsxqts/test/tst_xmlpatternsxqts.cpp106
-rw-r--r--tests/auto/xmlpatternsxqts/xmlpatternsxqts.pro11
-rw-r--r--tests/auto/xmlpatternsxslts/.gitignore4
-rw-r--r--tests/auto/xmlpatternsxslts/Baseline.xml2
-rw-r--r--tests/auto/xmlpatternsxslts/XSLTS/.gitignore8
-rwxr-xr-xtests/auto/xmlpatternsxslts/XSLTS/updateSuite.sh18
-rw-r--r--tests/auto/xmlpatternsxslts/tst_xmlpatternsxslts.cpp80
-rw-r--r--tests/auto/xmlpatternsxslts/xmlpatternsxslts.pro25
-rw-r--r--tests/benchmarks/benchmarks.pro19
-rw-r--r--tests/benchmarks/blendbench/blendbench.pro8
-rw-r--r--tests/benchmarks/blendbench/main.cpp152
-rw-r--r--tests/benchmarks/containers-associative/containers-associative.pro8
-rw-r--r--tests/benchmarks/containers-associative/main.cpp143
-rw-r--r--tests/benchmarks/containers-sequential/containers-sequential.pro8
-rw-r--r--tests/benchmarks/containers-sequential/main.cpp258
-rw-r--r--tests/benchmarks/events/events.pro7
-rw-r--r--tests/benchmarks/events/main.cpp176
-rw-r--r--tests/benchmarks/opengl/main.cpp379
-rw-r--r--tests/benchmarks/opengl/opengl.pro10
-rw-r--r--tests/benchmarks/qapplication/main.cpp87
-rw-r--r--tests/benchmarks/qapplication/qapplication.pro10
-rwxr-xr-xtests/benchmarks/qbytearray/main.cpp87
-rwxr-xr-xtests/benchmarks/qbytearray/qbytearray.pro12
-rwxr-xr-xtests/benchmarks/qdiriterator/main.cpp251
-rwxr-xr-xtests/benchmarks/qdiriterator/qdiriterator.pro23
-rw-r--r--tests/benchmarks/qdiriterator/qfilesystemiterator.cpp689
-rw-r--r--tests/benchmarks/qdiriterator/qfilesystemiterator.h99
-rw-r--r--tests/benchmarks/qfile/main.cpp650
-rw-r--r--tests/benchmarks/qfile/qfile.pro7
-rw-r--r--tests/benchmarks/qgraphicsscene/qgraphicsscene.pro6
-rw-r--r--tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp226
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.cpp176
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.debugbin0 -> 863805 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.h68
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/chip.pro19
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/fileprint.pngbin0 -> 1456 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/images.qrc10
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/main.cpp57
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.cpp87
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/mainwindow.h66
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/qt4logo.pngbin0 -> 48333 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateleft.pngbin0 -> 1754 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/rotateright.pngbin0 -> 1732 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/view.cpp257
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/view.h86
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomin.pngbin0 -> 1622 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/chipTest/zoomout.pngbin0 -> 1601 bytes-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/moveItems/main.cpp106
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/moveItems/moveItems.pro1
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/scrolltest/main.cpp146
-rw-r--r--tests/benchmarks/qgraphicsview/benchapps/scrolltest/scrolltest.pro1
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/chip.cpp182
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/chip.h68
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/chiptester.cpp144
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/chiptester.h85
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/chiptester.pri12
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/images.qrc5
-rw-r--r--tests/benchmarks/qgraphicsview/chiptester/qt4logo.pngbin0 -> 48333 bytes-rw-r--r--tests/benchmarks/qgraphicsview/images/designer.pngbin0 -> 4205 bytes-rw-r--r--tests/benchmarks/qgraphicsview/qgraphicsview.pro8
-rw-r--r--tests/benchmarks/qgraphicsview/qgraphicsview.qrc7
-rw-r--r--tests/benchmarks/qgraphicsview/random.databin0 -> 800 bytes-rw-r--r--tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp692
-rw-r--r--tests/benchmarks/qimagereader/images/16bpp.bmpbin0 -> 153654 bytes-rw-r--r--tests/benchmarks/qimagereader/images/4bpp-rle.bmpbin0 -> 23662 bytes-rw-r--r--tests/benchmarks/qimagereader/images/YCbCr_cmyk.jpgbin0 -> 3699 bytes-rw-r--r--tests/benchmarks/qimagereader/images/YCbCr_cmyk.pngbin0 -> 230 bytes-rw-r--r--tests/benchmarks/qimagereader/images/YCbCr_rgb.jpgbin0 -> 2045 bytes-rw-r--r--tests/benchmarks/qimagereader/images/away.pngbin0 -> 753 bytes-rw-r--r--tests/benchmarks/qimagereader/images/ball.mngbin0 -> 34394 bytes-rw-r--r--tests/benchmarks/qimagereader/images/bat1.gifbin0 -> 953 bytes-rw-r--r--tests/benchmarks/qimagereader/images/bat2.gifbin0 -> 980 bytes-rw-r--r--tests/benchmarks/qimagereader/images/beavis.jpgbin0 -> 20688 bytes-rw-r--r--tests/benchmarks/qimagereader/images/black.pngbin0 -> 697 bytes-rw-r--r--tests/benchmarks/qimagereader/images/black.xpm65
-rw-r--r--tests/benchmarks/qimagereader/images/colorful.bmpbin0 -> 65002 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt-colors.xpm26
-rw-r--r--tests/benchmarks/qimagereader/images/corrupt-data.tifbin0 -> 8590 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt-pixels.xpm7
-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.bmpbin0 -> 116 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.gifbin0 -> 2608 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.jpgbin0 -> 18 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.mngbin0 -> 183 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.pngbin0 -> 95 bytes-rw-r--r--tests/benchmarks/qimagereader/images/corrupt.xbm5
-rw-r--r--tests/benchmarks/qimagereader/images/crash-signed-char.bmpbin0 -> 45748 bytes-rw-r--r--tests/benchmarks/qimagereader/images/earth.gifbin0 -> 51712 bytes-rw-r--r--tests/benchmarks/qimagereader/images/fire.mngbin0 -> 44430 bytes-rw-r--r--tests/benchmarks/qimagereader/images/font.bmpbin0 -> 1026 bytes-rw-r--r--tests/benchmarks/qimagereader/images/gnus.xbm622
-rw-r--r--tests/benchmarks/qimagereader/images/image.pbm8
-rw-r--r--tests/benchmarks/qimagereader/images/image.pgm10
-rw-r--r--tests/benchmarks/qimagereader/images/image.pngbin0 -> 549 bytes-rw-r--r--tests/benchmarks/qimagereader/images/image.ppm7
-rw-r--r--tests/benchmarks/qimagereader/images/kollada-noextbin0 -> 13907 bytes-rw-r--r--tests/benchmarks/qimagereader/images/kollada.pngbin0 -> 13907 bytes-rw-r--r--tests/benchmarks/qimagereader/images/marble.xpm470
-rw-r--r--tests/benchmarks/qimagereader/images/namedcolors.xpm18
-rw-r--r--tests/benchmarks/qimagereader/images/negativeheight.bmpbin0 -> 24630 bytes-rw-r--r--tests/benchmarks/qimagereader/images/noclearcode.bmpbin0 -> 326 bytes-rw-r--r--tests/benchmarks/qimagereader/images/noclearcode.gifbin0 -> 130 bytes-rw-r--r--tests/benchmarks/qimagereader/images/nontransparent.xpm788
-rw-r--r--tests/benchmarks/qimagereader/images/pngwithcompressedtext.pngbin0 -> 757 bytes-rw-r--r--tests/benchmarks/qimagereader/images/pngwithtext.pngbin0 -> 796 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_adobedeflate_littleendian.tifbin0 -> 4784 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_lzw_littleendian.tifbin0 -> 26690 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_nocompression_bigendian.tifbin0 -> 160384 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_nocompression_littleendian.tifbin0 -> 160388 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_packbits_littleendian.tifbin0 -> 161370 bytes-rw-r--r--tests/benchmarks/qimagereader/images/rgba_zipdeflate_littleendian.tifbin0 -> 14728 bytes-rw-r--r--tests/benchmarks/qimagereader/images/runners.ppmbin0 -> 960016 bytes-rw-r--r--tests/benchmarks/qimagereader/images/task210380.jpgbin0 -> 975535 bytes-rw-r--r--tests/benchmarks/qimagereader/images/teapot.ppm31
-rw-r--r--tests/benchmarks/qimagereader/images/test.ppm2
-rw-r--r--tests/benchmarks/qimagereader/images/test.xpm260
-rw-r--r--tests/benchmarks/qimagereader/images/transparent.xpm788
-rw-r--r--tests/benchmarks/qimagereader/images/trolltech.gifbin0 -> 42629 bytes-rw-r--r--tests/benchmarks/qimagereader/images/tst7.bmpbin0 -> 582 bytes-rw-r--r--tests/benchmarks/qimagereader/images/tst7.pngbin0 -> 167 bytes-rw-r--r--tests/benchmarks/qimagereader/qimagereader.pro27
-rw-r--r--tests/benchmarks/qimagereader/tst_qimagereader.cpp246
-rwxr-xr-xtests/benchmarks/qiodevice/main.cpp105
-rwxr-xr-xtests/benchmarks/qiodevice/qiodevice.pro12
-rw-r--r--tests/benchmarks/qmetaobject/main.cpp159
-rw-r--r--tests/benchmarks/qmetaobject/qmetaobject.pro5
-rw-r--r--tests/benchmarks/qobject/main.cpp190
-rw-r--r--tests/benchmarks/qobject/object.cpp65
-rw-r--r--tests/benchmarks/qobject/object.h75
-rw-r--r--tests/benchmarks/qobject/qobject.pro9
-rw-r--r--tests/benchmarks/qpainter/qpainter.pro5
-rw-r--r--tests/benchmarks/qpainter/tst_qpainter.cpp1136
-rw-r--r--tests/benchmarks/qpixmap/qpixmap.pro5
-rw-r--r--tests/benchmarks/qpixmap/tst_qpixmap.cpp227
-rw-r--r--tests/benchmarks/qrect/main.cpp329
-rw-r--r--tests/benchmarks/qrect/qrect.pro12
-rw-r--r--tests/benchmarks/qregexp/main.cpp290
-rw-r--r--tests/benchmarks/qregexp/qregexp.pro12
-rw-r--r--tests/benchmarks/qregion/main.cpp89
-rw-r--r--tests/benchmarks/qregion/qregion.pro10
-rw-r--r--tests/benchmarks/qstringlist/.gitignore1
-rw-r--r--tests/benchmarks/qstringlist/main.cpp101
-rw-r--r--tests/benchmarks/qstringlist/qstringlist.pro4
-rw-r--r--tests/benchmarks/qstylesheetstyle/main.cpp185
-rw-r--r--tests/benchmarks/qstylesheetstyle/qstylesheetstyle.pro11
-rw-r--r--tests/benchmarks/qtemporaryfile/main.cpp103
-rw-r--r--tests/benchmarks/qtemporaryfile/qtemporaryfile.pro12
-rw-r--r--tests/benchmarks/qtestlib-simple/main.cpp117
-rw-r--r--tests/benchmarks/qtestlib-simple/qtestlib-simple.pro8
-rw-r--r--tests/benchmarks/qtransform/qtransform.pro6
-rw-r--r--tests/benchmarks/qtransform/tst_qtransform.cpp592
-rw-r--r--tests/benchmarks/qtwidgets/advanced.ui319
-rw-r--r--tests/benchmarks/qtwidgets/icons/big.pngbin0 -> 1323 bytes-rw-r--r--tests/benchmarks/qtwidgets/icons/folder.pngbin0 -> 4069 bytes-rw-r--r--tests/benchmarks/qtwidgets/icons/icon.bmpbin0 -> 246 bytes-rw-r--r--tests/benchmarks/qtwidgets/icons/icon.pngbin0 -> 344 bytes-rw-r--r--tests/benchmarks/qtwidgets/mainwindow.cpp313
-rw-r--r--tests/benchmarks/qtwidgets/mainwindow.h80
-rw-r--r--tests/benchmarks/qtwidgets/qtstyles.qrc8
-rw-r--r--tests/benchmarks/qtwidgets/qtwidgets.pro9
-rw-r--r--tests/benchmarks/qtwidgets/standard.ui1207
-rw-r--r--tests/benchmarks/qtwidgets/system.ui658
-rw-r--r--tests/benchmarks/qtwidgets/tst_qtwidgets.cpp67
-rw-r--r--tests/benchmarks/qvariant/qvariant.pro12
-rw-r--r--tests/benchmarks/qvariant/tst_qvariant.cpp195
-rw-r--r--tests/benchmarks/qwidget/qwidget.pro4
-rw-r--r--tests/benchmarks/qwidget/tst_qwidget.cpp332
-rw-r--r--tests/shared/util.h70
-rw-r--r--tests/tests.pro2
-rw-r--r--tools/activeqt/activeqt.pro11
-rw-r--r--tools/activeqt/dumpcpp/dumpcpp.pro6
-rw-r--r--tools/activeqt/dumpcpp/main.cpp1502
-rw-r--r--tools/activeqt/dumpdoc/dumpdoc.pro5
-rw-r--r--tools/activeqt/dumpdoc/main.cpp146
-rw-r--r--tools/activeqt/testcon/ambientproperties.cpp125
-rw-r--r--tools/activeqt/testcon/ambientproperties.h71
-rw-r--r--tools/activeqt/testcon/ambientproperties.ui299
-rw-r--r--tools/activeqt/testcon/changeproperties.cpp286
-rw-r--r--tools/activeqt/testcon/changeproperties.h74
-rw-r--r--tools/activeqt/testcon/changeproperties.ui211
-rw-r--r--tools/activeqt/testcon/controlinfo.cpp122
-rw-r--r--tools/activeqt/testcon/controlinfo.h61
-rw-r--r--tools/activeqt/testcon/controlinfo.ui134
-rw-r--r--tools/activeqt/testcon/docuwindow.cpp161
-rw-r--r--tools/activeqt/testcon/docuwindow.h67
-rw-r--r--tools/activeqt/testcon/invokemethod.cpp170
-rw-r--r--tools/activeqt/testcon/invokemethod.h73
-rw-r--r--tools/activeqt/testcon/invokemethod.ui270
-rw-r--r--tools/activeqt/testcon/main.cpp64
-rw-r--r--tools/activeqt/testcon/mainwindow.cpp461
-rw-r--r--tools/activeqt/testcon/mainwindow.h106
-rw-r--r--tools/activeqt/testcon/mainwindow.ui682
-rw-r--r--tools/activeqt/testcon/scripts/javascript.js25
-rw-r--r--tools/activeqt/testcon/scripts/perlscript.pl24
-rw-r--r--tools/activeqt/testcon/scripts/pythonscript.py15
-rw-r--r--tools/activeqt/testcon/scripts/vbscript.vbs20
-rw-r--r--tools/activeqt/testcon/testcon.idl44
-rw-r--r--tools/activeqt/testcon/testcon.pro21
-rw-r--r--tools/activeqt/testcon/testcon.rc35
-rw-r--r--tools/assistant/assistant.pro8
-rw-r--r--tools/assistant/compat/Info_mac.plist18
-rw-r--r--tools/assistant/compat/LICENSE.GPL280
-rw-r--r--tools/assistant/compat/assistant.icnsbin0 -> 162568 bytes-rw-r--r--tools/assistant/compat/assistant.icobin0 -> 355574 bytes-rw-r--r--tools/assistant/compat/assistant.pro84
-rw-r--r--tools/assistant/compat/assistant.qrc37
-rw-r--r--tools/assistant/compat/assistant.rc1
-rw-r--r--tools/assistant/compat/compat.pro84
-rw-r--r--tools/assistant/compat/config.cpp438
-rw-r--r--tools/assistant/compat/config.h165
-rw-r--r--tools/assistant/compat/docuparser.cpp433
-rw-r--r--tools/assistant/compat/docuparser.h166
-rw-r--r--tools/assistant/compat/fontsettingsdialog.cpp137
-rw-r--r--tools/assistant/compat/fontsettingsdialog.h77
-rw-r--r--tools/assistant/compat/helpdialog.cpp1331
-rw-r--r--tools/assistant/compat/helpdialog.h184
-rw-r--r--tools/assistant/compat/helpdialog.ui404
-rw-r--r--tools/assistant/compat/helpwindow.cpp247
-rw-r--r--tools/assistant/compat/helpwindow.h100
-rw-r--r--tools/assistant/compat/images/assistant-128.pngbin0 -> 6448 bytes-rw-r--r--tools/assistant/compat/images/assistant.pngbin0 -> 2034 bytes-rw-r--r--tools/assistant/compat/images/close.pngbin0 -> 406 bytes-rw-r--r--tools/assistant/compat/images/designer.pngbin0 -> 1282 bytes-rw-r--r--tools/assistant/compat/images/linguist.pngbin0 -> 1382 bytes-rw-r--r--tools/assistant/compat/images/mac/addtab.pngbin0 -> 469 bytes-rw-r--r--tools/assistant/compat/images/mac/book.pngbin0 -> 1477 bytes-rw-r--r--tools/assistant/compat/images/mac/closetab.pngbin0 -> 516 bytes-rw-r--r--tools/assistant/compat/images/mac/editcopy.pngbin0 -> 1468 bytes-rw-r--r--tools/assistant/compat/images/mac/find.pngbin0 -> 1836 bytes-rw-r--r--tools/assistant/compat/images/mac/home.pngbin0 -> 1807 bytes-rw-r--r--tools/assistant/compat/images/mac/next.pngbin0 -> 1310 bytes-rw-r--r--tools/assistant/compat/images/mac/prev.pngbin0 -> 1080 bytes-rw-r--r--tools/assistant/compat/images/mac/print.pngbin0 -> 2087 bytes-rw-r--r--tools/assistant/compat/images/mac/synctoc.pngbin0 -> 1838 bytes-rw-r--r--tools/assistant/compat/images/mac/whatsthis.pngbin0 -> 1586 bytes-rw-r--r--tools/assistant/compat/images/mac/zoomin.pngbin0 -> 1696 bytes-rw-r--r--tools/assistant/compat/images/mac/zoomout.pngbin0 -> 1662 bytes-rw-r--r--tools/assistant/compat/images/qt.pngbin0 -> 1422 bytes-rw-r--r--tools/assistant/compat/images/win/addtab.pngbin0 -> 314 bytes-rw-r--r--tools/assistant/compat/images/win/book.pngbin0 -> 1109 bytes-rw-r--r--tools/assistant/compat/images/win/closetab.pngbin0 -> 375 bytes-rw-r--r--tools/assistant/compat/images/win/editcopy.pngbin0 -> 1325 bytes-rw-r--r--tools/assistant/compat/images/win/find.pngbin0 -> 1944 bytes-rw-r--r--tools/assistant/compat/images/win/home.pngbin0 -> 1414 bytes-rw-r--r--tools/assistant/compat/images/win/next.pngbin0 -> 1038 bytes-rw-r--r--tools/assistant/compat/images/win/previous.pngbin0 -> 898 bytes-rw-r--r--tools/assistant/compat/images/win/print.pngbin0 -> 1456 bytes-rw-r--r--tools/assistant/compat/images/win/synctoc.pngbin0 -> 1235 bytes-rw-r--r--tools/assistant/compat/images/win/whatsthis.pngbin0 -> 1040 bytes-rw-r--r--tools/assistant/compat/images/win/zoomin.pngbin0 -> 1208 bytes-rw-r--r--tools/assistant/compat/images/win/zoomout.pngbin0 -> 1226 bytes-rw-r--r--tools/assistant/compat/images/wrap.pngbin0 -> 500 bytes-rw-r--r--tools/assistant/compat/index.cpp581
-rw-r--r--tools/assistant/compat/index.h133
-rw-r--r--tools/assistant/compat/lib/lib.pro78
-rw-r--r--tools/assistant/compat/lib/qassistantclient.cpp447
-rw-r--r--tools/assistant/compat/lib/qassistantclient.h100
-rw-r--r--tools/assistant/compat/lib/qassistantclient_global.h63
-rw-r--r--tools/assistant/compat/main.cpp465
-rw-r--r--tools/assistant/compat/mainwindow.cpp901
-rw-r--r--tools/assistant/compat/mainwindow.h137
-rw-r--r--tools/assistant/compat/mainwindow.ui459
-rw-r--r--tools/assistant/compat/profile.cpp196
-rw-r--r--tools/assistant/compat/profile.h95
-rw-r--r--tools/assistant/compat/tabbedbrowser.cpp530
-rw-r--r--tools/assistant/compat/tabbedbrowser.h122
-rw-r--r--tools/assistant/compat/tabbedbrowser.ui233
-rw-r--r--tools/assistant/compat/topicchooser.cpp101
-rw-r--r--tools/assistant/compat/topicchooser.h77
-rw-r--r--tools/assistant/compat/topicchooser.ui162
-rw-r--r--tools/assistant/compat/translations/translations.pro34
-rw-r--r--tools/assistant/lib/fulltextsearch/fulltextsearch.pri161
-rw-r--r--tools/assistant/lib/fulltextsearch/fulltextsearch.pro50
-rw-r--r--tools/assistant/lib/fulltextsearch/license.txt503
-rw-r--r--tools/assistant/lib/fulltextsearch/qanalyzer.cpp201
-rw-r--r--tools/assistant/lib/fulltextsearch/qanalyzer_p.h145
-rw-r--r--tools/assistant/lib/fulltextsearch/qclucene-config_p.h552
-rw-r--r--tools/assistant/lib/fulltextsearch/qclucene_global_p.h127
-rw-r--r--tools/assistant/lib/fulltextsearch/qdocument.cpp172
-rw-r--r--tools/assistant/lib/fulltextsearch/qdocument_p.h93
-rw-r--r--tools/assistant/lib/fulltextsearch/qfield.cpp163
-rw-r--r--tools/assistant/lib/fulltextsearch/qfield_p.h112
-rw-r--r--tools/assistant/lib/fulltextsearch/qfilter.cpp49
-rw-r--r--tools/assistant/lib/fulltextsearch/qfilter_p.h68
-rw-r--r--tools/assistant/lib/fulltextsearch/qhits.cpp86
-rw-r--r--tools/assistant/lib/fulltextsearch/qhits_p.h79
-rw-r--r--tools/assistant/lib/fulltextsearch/qindexreader.cpp161
-rw-r--r--tools/assistant/lib/fulltextsearch/qindexreader_p.h108
-rw-r--r--tools/assistant/lib/fulltextsearch/qindexwriter.cpp183
-rw-r--r--tools/assistant/lib/fulltextsearch/qindexwriter_p.h117
-rw-r--r--tools/assistant/lib/fulltextsearch/qquery.cpp350
-rw-r--r--tools/assistant/lib/fulltextsearch/qquery_p.h181
-rw-r--r--tools/assistant/lib/fulltextsearch/qqueryparser.cpp168
-rw-r--r--tools/assistant/lib/fulltextsearch/qqueryparser_p.h102
-rw-r--r--tools/assistant/lib/fulltextsearch/qreader.cpp94
-rw-r--r--tools/assistant/lib/fulltextsearch/qreader_p.h97
-rw-r--r--tools/assistant/lib/fulltextsearch/qsearchable.cpp195
-rw-r--r--tools/assistant/lib/fulltextsearch/qsearchable_p.h128
-rw-r--r--tools/assistant/lib/fulltextsearch/qsort.cpp89
-rw-r--r--tools/assistant/lib/fulltextsearch/qsort_p.h77
-rw-r--r--tools/assistant/lib/fulltextsearch/qterm.cpp126
-rw-r--r--tools/assistant/lib/fulltextsearch/qterm_p.h93
-rw-r--r--tools/assistant/lib/fulltextsearch/qtoken.cpp142
-rw-r--r--tools/assistant/lib/fulltextsearch/qtoken_p.h105
-rw-r--r--tools/assistant/lib/fulltextsearch/qtokenizer.cpp110
-rw-r--r--tools/assistant/lib/fulltextsearch/qtokenizer_p.h90
-rw-r--r--tools/assistant/lib/fulltextsearch/qtokenstream.cpp59
-rw-r--r--tools/assistant/lib/fulltextsearch/qtokenstream_p.h88
-rw-r--r--tools/assistant/lib/helpsystem.qrc8
-rw-r--r--tools/assistant/lib/images/1leftarrow.pngbin0 -> 669 bytes-rw-r--r--tools/assistant/lib/images/1rightarrow.pngbin0 -> 706 bytes-rw-r--r--tools/assistant/lib/images/3leftarrow.pngbin0 -> 832 bytes-rw-r--r--tools/assistant/lib/images/3rightarrow.pngbin0 -> 820 bytes-rw-r--r--tools/assistant/lib/lib.pro65
-rw-r--r--tools/assistant/lib/qhelp_global.h124
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp595
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler_p.h123
-rw-r--r--tools/assistant/lib/qhelpcontentwidget.cpp585
-rw-r--r--tools/assistant/lib/qhelpcontentwidget.h146
-rw-r--r--tools/assistant/lib/qhelpdatainterface.cpp273
-rw-r--r--tools/assistant/lib/qhelpdatainterface_p.h155
-rw-r--r--tools/assistant/lib/qhelpdbreader.cpp580
-rw-r--r--tools/assistant/lib/qhelpdbreader_p.h128
-rw-r--r--tools/assistant/lib/qhelpengine.cpp212
-rw-r--r--tools/assistant/lib/qhelpengine.h84
-rw-r--r--tools/assistant/lib/qhelpengine_p.h144
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp727
-rw-r--r--tools/assistant/lib/qhelpenginecore.h136
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp823
-rw-r--r--tools/assistant/lib/qhelpgenerator_p.h117
-rw-r--r--tools/assistant/lib/qhelpindexwidget.cpp445
-rw-r--r--tools/assistant/lib/qhelpindexwidget.h114
-rw-r--r--tools/assistant/lib/qhelpprojectdata.cpp374
-rw-r--r--tools/assistant/lib/qhelpprojectdata_p.h89
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp445
-rw-r--r--tools/assistant/lib/qhelpsearchengine.h121
-rw-r--r--tools/assistant/lib/qhelpsearchindex_default.cpp60
-rw-r--r--tools/assistant/lib/qhelpsearchindex_default_p.h149
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp392
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h121
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default.cpp653
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default_p.h165
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp481
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene_p.h123
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp385
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default_p.h132
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp353
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.h87
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp439
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.h84
-rw-r--r--tools/assistant/tools/assistant/Info_mac.plist18
-rw-r--r--tools/assistant/tools/assistant/aboutdialog.cpp171
-rw-r--r--tools/assistant/tools/assistant/aboutdialog.h91
-rw-r--r--tools/assistant/tools/assistant/assistant.icnsbin0 -> 162568 bytes-rw-r--r--tools/assistant/tools/assistant/assistant.icobin0 -> 355574 bytes-rw-r--r--tools/assistant/tools/assistant/assistant.pro89
-rw-r--r--tools/assistant/tools/assistant/assistant.qchbin0 -> 366592 bytes-rw-r--r--tools/assistant/tools/assistant/assistant.qrc5
-rw-r--r--tools/assistant/tools/assistant/assistant.rc1
-rw-r--r--tools/assistant/tools/assistant/assistant_images.qrc36
-rw-r--r--tools/assistant/tools/assistant/bookmarkdialog.ui146
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp874
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.h205
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp1080
-rw-r--r--tools/assistant/tools/assistant/centralwidget.h194
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.cpp320
-rw-r--r--tools/assistant/tools/assistant/cmdlineparser.h99
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp173
-rw-r--r--tools/assistant/tools/assistant/contentwindow.h86
-rw-r--r--tools/assistant/tools/assistant/doc/HOWTO17
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdoc434
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdocconf17
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qhp22
-rw-r--r--tools/assistant/tools/assistant/doc/classic.css92
-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-address-toolbar.pngbin0 -> 2899 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-assistant.pngbin0 -> 105954 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-dockwidgets.pngbin0 -> 50554 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-docwindow.pngbin0 -> 55582 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-examples.pngbin0 -> 9799 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-filter-toolbar.pngbin0 -> 1767 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-preferences-documentation.pngbin0 -> 13417 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-preferences-filters.pngbin0 -> 15561 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-preferences-fonts.pngbin0 -> 13139 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-preferences-options.pngbin0 -> 14255 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-search.pngbin0 -> 59254 bytes-rw-r--r--tools/assistant/tools/assistant/doc/images/assistant-toolbar.pngbin0 -> 6532 bytes-rw-r--r--tools/assistant/tools/assistant/filternamedialog.cpp73
-rw-r--r--tools/assistant/tools/assistant/filternamedialog.h67
-rw-r--r--tools/assistant/tools/assistant/filternamedialog.ui67
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp556
-rw-r--r--tools/assistant/tools/assistant/helpviewer.h169
-rw-r--r--tools/assistant/tools/assistant/images/assistant-128.pngbin0 -> 6448 bytes-rw-r--r--tools/assistant/tools/assistant/images/assistant.pngbin0 -> 2034 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/addtab.pngbin0 -> 469 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/book.pngbin0 -> 1477 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/closetab.pngbin0 -> 516 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/editcopy.pngbin0 -> 1468 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/find.pngbin0 -> 1836 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/home.pngbin0 -> 1807 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/next.pngbin0 -> 1310 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/previous.pngbin0 -> 1080 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/print.pngbin0 -> 2087 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/resetzoom.pngbin0 -> 1567 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/synctoc.pngbin0 -> 1838 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/zoomin.pngbin0 -> 1696 bytes-rw-r--r--tools/assistant/tools/assistant/images/mac/zoomout.pngbin0 -> 1662 bytes-rw-r--r--tools/assistant/tools/assistant/images/trolltech-logo.pngbin0 -> 10096 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/addtab.pngbin0 -> 314 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/book.pngbin0 -> 1109 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/closetab.pngbin0 -> 375 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/editcopy.pngbin0 -> 1325 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/find.pngbin0 -> 1944 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/home.pngbin0 -> 1414 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/next.pngbin0 -> 1038 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/previous.pngbin0 -> 898 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/print.pngbin0 -> 1456 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/resetzoom.pngbin0 -> 1134 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/synctoc.pngbin0 -> 1235 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/zoomin.pngbin0 -> 1208 bytes-rw-r--r--tools/assistant/tools/assistant/images/win/zoomout.pngbin0 -> 1226 bytes-rw-r--r--tools/assistant/tools/assistant/images/wrap.pngbin0 -> 500 bytes-rw-r--r--tools/assistant/tools/assistant/indexwindow.cpp216
-rw-r--r--tools/assistant/tools/assistant/indexwindow.h90
-rw-r--r--tools/assistant/tools/assistant/installdialog.cpp338
-rw-r--r--tools/assistant/tools/assistant/installdialog.h101
-rw-r--r--tools/assistant/tools/assistant/installdialog.ui118
-rw-r--r--tools/assistant/tools/assistant/main.cpp318
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp1008
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h172
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.cpp453
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.h106
-rw-r--r--tools/assistant/tools/assistant/preferencesdialog.ui310
-rw-r--r--tools/assistant/tools/assistant/qtdocinstaller.cpp151
-rw-r--r--tools/assistant/tools/assistant/qtdocinstaller.h77
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.cpp283
-rw-r--r--tools/assistant/tools/assistant/remotecontrol.h84
-rw-r--r--tools/assistant/tools/assistant/remotecontrol_win.h68
-rw-r--r--tools/assistant/tools/assistant/searchwidget.cpp246
-rw-r--r--tools/assistant/tools/assistant/searchwidget.h90
-rw-r--r--tools/assistant/tools/assistant/topicchooser.cpp86
-rw-r--r--tools/assistant/tools/assistant/topicchooser.h72
-rw-r--r--tools/assistant/tools/assistant/topicchooser.ui116
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp559
-rw-r--r--tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro14
-rw-r--r--tools/assistant/tools/qhelpconverter/adpreader.cpp171
-rw-r--r--tools/assistant/tools/qhelpconverter/adpreader.h90
-rw-r--r--tools/assistant/tools/qhelpconverter/assistant-128.pngbin0 -> 6448 bytes-rw-r--r--tools/assistant/tools/qhelpconverter/assistant.pngbin0 -> 2034 bytes-rw-r--r--tools/assistant/tools/qhelpconverter/conversionwizard.cpp265
-rw-r--r--tools/assistant/tools/qhelpconverter/conversionwizard.h96
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/filespage.html8
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/filterpage.html13
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/generalpage.html10
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/identifierpage.html17
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/inputpage.html7
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/outputpage.html7
-rw-r--r--tools/assistant/tools/qhelpconverter/doc/pathpage.html8
-rw-r--r--tools/assistant/tools/qhelpconverter/filespage.cpp112
-rw-r--r--tools/assistant/tools/qhelpconverter/filespage.h73
-rw-r--r--tools/assistant/tools/qhelpconverter/filespage.ui79
-rw-r--r--tools/assistant/tools/qhelpconverter/filterpage.cpp147
-rw-r--r--tools/assistant/tools/qhelpconverter/filterpage.h79
-rw-r--r--tools/assistant/tools/qhelpconverter/filterpage.ui125
-rw-r--r--tools/assistant/tools/qhelpconverter/finishpage.cpp76
-rw-r--r--tools/assistant/tools/qhelpconverter/finishpage.h65
-rw-r--r--tools/assistant/tools/qhelpconverter/generalpage.cpp92
-rw-r--r--tools/assistant/tools/qhelpconverter/generalpage.h66
-rw-r--r--tools/assistant/tools/qhelpconverter/generalpage.ui69
-rw-r--r--tools/assistant/tools/qhelpconverter/helpwindow.cpp84
-rw-r--r--tools/assistant/tools/qhelpconverter/helpwindow.h65
-rw-r--r--tools/assistant/tools/qhelpconverter/identifierpage.cpp71
-rw-r--r--tools/assistant/tools/qhelpconverter/identifierpage.h66
-rw-r--r--tools/assistant/tools/qhelpconverter/identifierpage.ui132
-rw-r--r--tools/assistant/tools/qhelpconverter/inputpage.cpp103
-rw-r--r--tools/assistant/tools/qhelpconverter/inputpage.h71
-rw-r--r--tools/assistant/tools/qhelpconverter/inputpage.ui79
-rw-r--r--tools/assistant/tools/qhelpconverter/main.cpp62
-rw-r--r--tools/assistant/tools/qhelpconverter/outputpage.cpp110
-rw-r--r--tools/assistant/tools/qhelpconverter/outputpage.h71
-rw-r--r--tools/assistant/tools/qhelpconverter/outputpage.ui95
-rw-r--r--tools/assistant/tools/qhelpconverter/pathpage.cpp112
-rw-r--r--tools/assistant/tools/qhelpconverter/pathpage.h71
-rw-r--r--tools/assistant/tools/qhelpconverter/pathpage.ui114
-rw-r--r--tools/assistant/tools/qhelpconverter/qhcpwriter.cpp145
-rw-r--r--tools/assistant/tools/qhelpconverter/qhcpwriter.h70
-rw-r--r--tools/assistant/tools/qhelpconverter/qhelpconverter.pro47
-rw-r--r--tools/assistant/tools/qhelpconverter/qhelpconverter.qrc13
-rw-r--r--tools/assistant/tools/qhelpconverter/qhpwriter.cpp184
-rw-r--r--tools/assistant/tools/qhelpconverter/qhpwriter.h85
-rw-r--r--tools/assistant/tools/qhelpgenerator/main.cpp144
-rw-r--r--tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro14
-rw-r--r--tools/assistant/tools/shared/helpgenerator.cpp79
-rw-r--r--tools/assistant/tools/shared/helpgenerator.h72
-rw-r--r--tools/assistant/tools/tools.pro8
-rw-r--r--tools/assistant/translations/qt_help.pro49
-rw-r--r--tools/assistant/translations/translations.pro49
-rw-r--r--tools/assistant/translations/translations_adp.pro41
-rw-r--r--tools/checksdk/README3
-rw-r--r--tools/checksdk/cesdkhandler.cpp131
-rw-r--r--tools/checksdk/cesdkhandler.h111
-rw-r--r--tools/checksdk/checksdk.pro71
-rw-r--r--tools/checksdk/main.cpp159
-rw-r--r--tools/configure/configure.pro106
-rw-r--r--tools/configure/configure_pch.h74
-rw-r--r--tools/configure/configureapp.cpp3586
-rw-r--r--tools/configure/configureapp.h185
-rw-r--r--tools/configure/environment.cpp686
-rw-r--r--tools/configure/environment.h84
-rw-r--r--tools/configure/main.cpp114
-rw-r--r--tools/configure/tools.cpp172
-rw-r--r--tools/configure/tools.h17
-rw-r--r--tools/designer/data/generate_header.xsl465
-rw-r--r--tools/designer/data/generate_impl.xsl1161
-rw-r--r--tools/designer/data/generate_shared.xsl331
-rw-r--r--tools/designer/data/ui3.xsd353
-rw-r--r--tools/designer/data/ui4.xsd587
-rw-r--r--tools/designer/designer.pro5
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.cpp443
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.h92
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.pri16
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_global.h57
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_instance.cpp50
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_plugin.cpp132
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_plugin.h93
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_tool.cpp111
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor_tool.h89
-rw-r--r--tools/designer/src/components/component.pri2
-rw-r--r--tools/designer/src/components/components.pro3
-rw-r--r--tools/designer/src/components/formeditor/brushmanagerproxy.cpp305
-rw-r--r--tools/designer/src/components/formeditor/brushmanagerproxy.h77
-rw-r--r--tools/designer/src/components/formeditor/default_actionprovider.cpp208
-rw-r--r--tools/designer/src/components/formeditor/default_actionprovider.h131
-rw-r--r--tools/designer/src/components/formeditor/default_container.cpp173
-rw-r--r--tools/designer/src/components/formeditor/default_container.h213
-rw-r--r--tools/designer/src/components/formeditor/default_layoutdecoration.cpp79
-rw-r--r--tools/designer/src/components/formeditor/default_layoutdecoration.h69
-rw-r--r--tools/designer/src/components/formeditor/defaultbrushes.xml542
-rw-r--r--tools/designer/src/components/formeditor/deviceprofiledialog.cpp203
-rw-r--r--tools/designer/src/components/formeditor/deviceprofiledialog.h104
-rw-r--r--tools/designer/src/components/formeditor/deviceprofiledialog.ui100
-rw-r--r--tools/designer/src/components/formeditor/dpi_chooser.cpp207
-rw-r--r--tools/designer/src/components/formeditor/dpi_chooser.h94
-rw-r--r--tools/designer/src/components/formeditor/embeddedoptionspage.cpp453
-rw-r--r--tools/designer/src/components/formeditor/embeddedoptionspage.h103
-rw-r--r--tools/designer/src/components/formeditor/formeditor.cpp203
-rw-r--r--tools/designer/src/components/formeditor/formeditor.h69
-rw-r--r--tools/designer/src/components/formeditor/formeditor.pri75
-rw-r--r--tools/designer/src/components/formeditor/formeditor.qrc173
-rw-r--r--tools/designer/src/components/formeditor/formeditor_global.h57
-rw-r--r--tools/designer/src/components/formeditor/formeditor_optionspage.cpp189
-rw-r--r--tools/designer/src/components/formeditor/formeditor_optionspage.h79
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp2917
-rw-r--r--tools/designer/src/components/formeditor/formwindow.h385
-rw-r--r--tools/designer/src/components/formeditor/formwindow_dnditem.cpp116
-rw-r--r--tools/designer/src/components/formeditor/formwindow_dnditem.h65
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.cpp213
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.h103
-rw-r--r--tools/designer/src/components/formeditor/formwindowcursor.cpp211
-rw-r--r--tools/designer/src/components/formeditor/formwindowcursor.h93
-rw-r--r--tools/designer/src/components/formeditor/formwindowmanager.cpp1016
-rw-r--r--tools/designer/src/components/formeditor/formwindowmanager.h200
-rw-r--r--tools/designer/src/components/formeditor/formwindowsettings.cpp282
-rw-r--r--tools/designer/src/components/formeditor/formwindowsettings.h85
-rw-r--r--tools/designer/src/components/formeditor/formwindowsettings.ui328
-rw-r--r--tools/designer/src/components/formeditor/iconcache.cpp121
-rw-r--r--tools/designer/src/components/formeditor/iconcache.h78
-rw-r--r--tools/designer/src/components/formeditor/images/color.pngbin0 -> 117 bytes-rw-r--r--tools/designer/src/components/formeditor/images/configure.pngbin0 -> 1016 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/arrow.pngbin0 -> 171 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/busy.pngbin0 -> 201 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/closedhand.pngbin0 -> 147 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/cross.pngbin0 -> 130 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/hand.pngbin0 -> 159 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/hsplit.pngbin0 -> 155 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/ibeam.pngbin0 -> 124 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/no.pngbin0 -> 199 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/openhand.pngbin0 -> 160 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/sizeall.pngbin0 -> 174 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/sizeb.pngbin0 -> 161 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/sizef.pngbin0 -> 161 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/sizeh.pngbin0 -> 145 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/sizev.pngbin0 -> 141 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/uparrow.pngbin0 -> 132 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/vsplit.pngbin0 -> 161 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/wait.pngbin0 -> 172 bytes-rw-r--r--tools/designer/src/components/formeditor/images/cursors/whatsthis.pngbin0 -> 191 bytes-rw-r--r--tools/designer/src/components/formeditor/images/downplus.pngbin0 -> 562 bytes-rw-r--r--tools/designer/src/components/formeditor/images/dropdownbutton.pngbin0 -> 527 bytes-rw-r--r--tools/designer/src/components/formeditor/images/edit.pngbin0 -> 929 bytes-rw-r--r--tools/designer/src/components/formeditor/images/editdelete-16.pngbin0 -> 553 bytes-rw-r--r--tools/designer/src/components/formeditor/images/emptyicon.pngbin0 -> 108 bytes-rw-r--r--tools/designer/src/components/formeditor/images/filenew-16.pngbin0 -> 454 bytes-rw-r--r--tools/designer/src/components/formeditor/images/fileopen-16.pngbin0 -> 549 bytes-rw-r--r--tools/designer/src/components/formeditor/images/leveldown.pngbin0 -> 557 bytes-rw-r--r--tools/designer/src/components/formeditor/images/levelup.pngbin0 -> 564 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/adjustsize.pngbin0 -> 1929 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/back.pngbin0 -> 678 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/buddytool.pngbin0 -> 2046 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/down.pngbin0 -> 594 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editbreaklayout.pngbin0 -> 2067 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editcopy.pngbin0 -> 1468 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editcut.pngbin0 -> 1512 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editdelete.pngbin0 -> 1097 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editform.pngbin0 -> 621 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editgrid.pngbin0 -> 751 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/edithlayout.pngbin0 -> 1395 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/edithlayoutsplit.pngbin0 -> 1188 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editlower.pngbin0 -> 595 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editpaste.pngbin0 -> 1906 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editraise.pngbin0 -> 1213 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editvlayout.pngbin0 -> 586 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/editvlayoutsplit.pngbin0 -> 872 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/filenew.pngbin0 -> 772 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/fileopen.pngbin0 -> 904 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/filesave.pngbin0 -> 1206 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/forward.pngbin0 -> 655 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/insertimage.pngbin0 -> 1280 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/minus.pngbin0 -> 488 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/plus.pngbin0 -> 810 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/redo.pngbin0 -> 1752 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/resetproperty.pngbin0 -> 169 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/resourceeditortool.pngbin0 -> 2171 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/signalslottool.pngbin0 -> 1989 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/tabordertool.pngbin0 -> 1963 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textanchor.pngbin0 -> 2543 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textbold.pngbin0 -> 1611 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textcenter.pngbin0 -> 1404 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textitalic.pngbin0 -> 1164 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textjustify.pngbin0 -> 1257 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textleft.pngbin0 -> 1235 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textright.pngbin0 -> 1406 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textsubscript.pngbin0 -> 1054 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textsuperscript.pngbin0 -> 1109 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/textunder.pngbin0 -> 1183 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/undo.pngbin0 -> 1746 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/up.pngbin0 -> 692 bytes-rw-r--r--tools/designer/src/components/formeditor/images/mac/widgettool.pngbin0 -> 1874 bytes-rw-r--r--tools/designer/src/components/formeditor/images/minus-16.pngbin0 -> 296 bytes-rw-r--r--tools/designer/src/components/formeditor/images/plus-16.pngbin0 -> 383 bytes-rw-r--r--tools/designer/src/components/formeditor/images/prefix-add.pngbin0 -> 411 bytes-rw-r--r--tools/designer/src/components/formeditor/images/qt3logo.pngbin0 -> 1101 bytes-rw-r--r--tools/designer/src/components/formeditor/images/qtlogo.pngbin0 -> 825 bytes-rw-r--r--tools/designer/src/components/formeditor/images/reload.pngbin0 -> 1363 bytes-rw-r--r--tools/designer/src/components/formeditor/images/resetproperty.pngbin0 -> 169 bytes-rw-r--r--tools/designer/src/components/formeditor/images/sort.pngbin0 -> 563 bytes-rw-r--r--tools/designer/src/components/formeditor/images/submenu.pngbin0 -> 179 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/calendarwidget.pngbin0 -> 968 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/checkbox.pngbin0 -> 817 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/columnview.pngbin0 -> 518 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/combobox.pngbin0 -> 853 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/commandlinkbutton.pngbin0 -> 1208 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/dateedit.pngbin0 -> 672 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/datetimeedit.pngbin0 -> 1132 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/dial.pngbin0 -> 978 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/dialogbuttonbox.pngbin0 -> 1003 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/dockwidget.pngbin0 -> 638 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/doublespinbox.pngbin0 -> 749 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/fontcombobox.pngbin0 -> 966 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/frame.pngbin0 -> 721 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/graphicsview.pngbin0 -> 1182 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/groupbox.pngbin0 -> 439 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/groupboxcollapsible.pngbin0 -> 702 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/hscrollbar.pngbin0 -> 408 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/hslider.pngbin0 -> 729 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/hsplit.pngbin0 -> 164 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/label.pngbin0 -> 953 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/lcdnumber.pngbin0 -> 555 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/line.pngbin0 -> 287 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/lineedit.pngbin0 -> 405 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/listbox.pngbin0 -> 797 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/listview.pngbin0 -> 756 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/mdiarea.pngbin0 -> 643 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/plaintextedit.pngbin0 -> 807 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/progress.pngbin0 -> 559 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/pushbutton.pngbin0 -> 408 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/radiobutton.pngbin0 -> 586 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/scrollarea.pngbin0 -> 548 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/spacer.pngbin0 -> 686 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/spinbox.pngbin0 -> 680 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/tabbar.pngbin0 -> 623 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/table.pngbin0 -> 483 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/tabwidget.pngbin0 -> 572 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/textedit.pngbin0 -> 823 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/timeedit.pngbin0 -> 1353 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/toolbox.pngbin0 -> 783 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/toolbutton.pngbin0 -> 1167 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/vline.pngbin0 -> 314 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/vscrollbar.pngbin0 -> 415 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/vslider.pngbin0 -> 726 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/vspacer.pngbin0 -> 677 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/widget.pngbin0 -> 716 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/widgetstack.pngbin0 -> 828 bytes-rw-r--r--tools/designer/src/components/formeditor/images/widgets/wizard.pngbin0 -> 898 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/adjustsize.pngbin0 -> 1262 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/back.pngbin0 -> 678 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/buddytool.pngbin0 -> 997 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/down.pngbin0 -> 594 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editbreaklayout.pngbin0 -> 1321 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editcopy.pngbin0 -> 1325 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editcut.pngbin0 -> 1384 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editdelete.pngbin0 -> 850 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editform.pngbin0 -> 349 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editgrid.pngbin0 -> 349 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/edithlayout.pngbin0 -> 455 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/edithlayoutsplit.pngbin0 -> 860 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editlower.pngbin0 -> 1038 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editpaste.pngbin0 -> 1482 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editraise.pngbin0 -> 1045 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editvlayout.pngbin0 -> 340 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/editvlayoutsplit.pngbin0 -> 740 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/filenew.pngbin0 -> 768 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/fileopen.pngbin0 -> 1662 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/filesave.pngbin0 -> 1205 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/forward.pngbin0 -> 655 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/insertimage.pngbin0 -> 885 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/minus.pngbin0 -> 429 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/plus.pngbin0 -> 709 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/redo.pngbin0 -> 1212 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/resourceeditortool.pngbin0 -> 1429 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/signalslottool.pngbin0 -> 1128 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/tabordertool.pngbin0 -> 1205 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textanchor.pngbin0 -> 1581 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textbold.pngbin0 -> 1134 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textcenter.pngbin0 -> 627 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textitalic.pngbin0 -> 829 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textjustify.pngbin0 -> 695 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textleft.pngbin0 -> 673 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textright.pngbin0 -> 677 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textsubscript.pngbin0 -> 897 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textsuperscript.pngbin0 -> 864 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/textunder.pngbin0 -> 971 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/undo.pngbin0 -> 1181 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/up.pngbin0 -> 692 bytes-rw-r--r--tools/designer/src/components/formeditor/images/win/widgettool.pngbin0 -> 1039 bytes-rw-r--r--tools/designer/src/components/formeditor/itemview_propertysheet.cpp291
-rw-r--r--tools/designer/src/components/formeditor/itemview_propertysheet.h88
-rw-r--r--tools/designer/src/components/formeditor/layout_propertysheet.cpp546
-rw-r--r--tools/designer/src/components/formeditor/layout_propertysheet.h82
-rw-r--r--tools/designer/src/components/formeditor/line_propertysheet.cpp86
-rw-r--r--tools/designer/src/components/formeditor/line_propertysheet.h71
-rw-r--r--tools/designer/src/components/formeditor/previewactiongroup.cpp149
-rw-r--r--tools/designer/src/components/formeditor/previewactiongroup.h90
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp2665
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.h182
-rw-r--r--tools/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp83
-rw-r--r--tools/designer/src/components/formeditor/qlayoutwidget_propertysheet.h72
-rw-r--r--tools/designer/src/components/formeditor/qmainwindow_container.cpp199
-rw-r--r--tools/designer/src/components/formeditor/qmainwindow_container.h81
-rw-r--r--tools/designer/src/components/formeditor/qmdiarea_container.cpp280
-rw-r--r--tools/designer/src/components/formeditor/qmdiarea_container.h119
-rw-r--r--tools/designer/src/components/formeditor/qtbrushmanager.cpp143
-rw-r--r--tools/designer/src/components/formeditor/qtbrushmanager.h89
-rw-r--r--tools/designer/src/components/formeditor/qwizard_container.cpp226
-rw-r--r--tools/designer/src/components/formeditor/qwizard_container.h123
-rw-r--r--tools/designer/src/components/formeditor/qworkspace_container.cpp100
-rw-r--r--tools/designer/src/components/formeditor/qworkspace_container.h79
-rw-r--r--tools/designer/src/components/formeditor/spacer_propertysheet.cpp82
-rw-r--r--tools/designer/src/components/formeditor/spacer_propertysheet.h72
-rw-r--r--tools/designer/src/components/formeditor/templateoptionspage.cpp183
-rw-r--r--tools/designer/src/components/formeditor/templateoptionspage.h110
-rw-r--r--tools/designer/src/components/formeditor/templateoptionspage.ui59
-rw-r--r--tools/designer/src/components/formeditor/tool_widgeteditor.cpp363
-rw-r--r--tools/designer/src/components/formeditor/tool_widgeteditor.h107
-rw-r--r--tools/designer/src/components/formeditor/widgetselection.cpp746
-rw-r--r--tools/designer/src/components/formeditor/widgetselection.h145
-rw-r--r--tools/designer/src/components/lib/lib.pro74
-rw-r--r--tools/designer/src/components/lib/lib_pch.h43
-rw-r--r--tools/designer/src/components/lib/qdesigner_components.cpp277
-rw-r--r--tools/designer/src/components/objectinspector/objectinspector.cpp835
-rw-r--r--tools/designer/src/components/objectinspector/objectinspector.h95
-rw-r--r--tools/designer/src/components/objectinspector/objectinspector.pri10
-rw-r--r--tools/designer/src/components/objectinspector/objectinspector_global.h61
-rw-r--r--tools/designer/src/components/objectinspector/objectinspectormodel.cpp516
-rw-r--r--tools/designer/src/components/objectinspector/objectinspectormodel_p.h168
-rw-r--r--tools/designer/src/components/propertyeditor/brushpropertymanager.cpp288
-rw-r--r--tools/designer/src/components/propertyeditor/brushpropertymanager.h105
-rw-r--r--tools/designer/src/components/propertyeditor/defs.cpp107
-rw-r--r--tools/designer/src/components/propertyeditor/defs.h60
-rw-r--r--tools/designer/src/components/propertyeditor/designerpropertymanager.cpp2607
-rw-r--r--tools/designer/src/components/propertyeditor/designerpropertymanager.h312
-rw-r--r--tools/designer/src/components/propertyeditor/fontmapping.xml73
-rw-r--r--tools/designer/src/components/propertyeditor/fontpropertymanager.cpp377
-rw-r--r--tools/designer/src/components/propertyeditor/fontpropertymanager.h124
-rw-r--r--tools/designer/src/components/propertyeditor/newdynamicpropertydialog.cpp170
-rw-r--r--tools/designer/src/components/propertyeditor/newdynamicpropertydialog.h104
-rw-r--r--tools/designer/src/components/propertyeditor/newdynamicpropertydialog.ui106
-rw-r--r--tools/designer/src/components/propertyeditor/paletteeditor.cpp616
-rw-r--r--tools/designer/src/components/propertyeditor/paletteeditor.h204
-rw-r--r--tools/designer/src/components/propertyeditor/paletteeditor.ui264
-rw-r--r--tools/designer/src/components/propertyeditor/paletteeditorbutton.cpp88
-rw-r--r--tools/designer/src/components/propertyeditor/paletteeditorbutton.h86
-rw-r--r--tools/designer/src/components/propertyeditor/previewframe.cpp119
-rw-r--r--tools/designer/src/components/propertyeditor/previewframe.h76
-rw-r--r--tools/designer/src/components/propertyeditor/previewwidget.cpp59
-rw-r--r--tools/designer/src/components/propertyeditor/previewwidget.h66
-rw-r--r--tools/designer/src/components/propertyeditor/previewwidget.ui238
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.cpp1240
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.h208
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.pri47
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.qrc5
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor_global.h61
-rw-r--r--tools/designer/src/components/propertyeditor/qlonglongvalidator.cpp153
-rw-r--r--tools/designer/src/components/propertyeditor/qlonglongvalidator.h110
-rw-r--r--tools/designer/src/components/propertyeditor/stringlisteditor.cpp212
-rw-r--r--tools/designer/src/components/propertyeditor/stringlisteditor.h92
-rw-r--r--tools/designer/src/components/propertyeditor/stringlisteditor.ui265
-rw-r--r--tools/designer/src/components/propertyeditor/stringlisteditorbutton.cpp81
-rw-r--r--tools/designer/src/components/propertyeditor/stringlisteditorbutton.h81
-rw-r--r--tools/designer/src/components/signalsloteditor/connectdialog.cpp335
-rw-r--r--tools/designer/src/components/signalsloteditor/connectdialog.ui150
-rw-r--r--tools/designer/src/components/signalsloteditor/connectdialog_p.h109
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils.cpp331
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils_p.h104
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor.cpp528
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor.h98
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor.pri21
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_global.h57
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_instance.cpp50
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_p.h138
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp132
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_plugin.h92
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp123
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor_tool.h93
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp855
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h94
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor.cpp433
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor.h109
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor.pri16
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_global.h57
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_instance.cpp49
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_plugin.cpp131
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_plugin.h93
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_tool.cpp114
-rw-r--r--tools/designer/src/components/tabordereditor/tabordereditor_tool.h89
-rw-r--r--tools/designer/src/components/taskmenu/button_taskmenu.cpp709
-rw-r--r--tools/designer/src/components/taskmenu/button_taskmenu.h170
-rw-r--r--tools/designer/src/components/taskmenu/combobox_taskmenu.cpp133
-rw-r--r--tools/designer/src/components/taskmenu/combobox_taskmenu.h94
-rw-r--r--tools/designer/src/components/taskmenu/containerwidget_taskmenu.cpp348
-rw-r--r--tools/designer/src/components/taskmenu/containerwidget_taskmenu.h157
-rw-r--r--tools/designer/src/components/taskmenu/groupbox_taskmenu.cpp105
-rw-r--r--tools/designer/src/components/taskmenu/groupbox_taskmenu.h77
-rw-r--r--tools/designer/src/components/taskmenu/inplace_editor.cpp136
-rw-r--r--tools/designer/src/components/taskmenu/inplace_editor.h110
-rw-r--r--tools/designer/src/components/taskmenu/inplace_widget_helper.cpp120
-rw-r--r--tools/designer/src/components/taskmenu/inplace_widget_helper.h88
-rw-r--r--tools/designer/src/components/taskmenu/itemlisteditor.cpp489
-rw-r--r--tools/designer/src/components/taskmenu/itemlisteditor.h163
-rw-r--r--tools/designer/src/components/taskmenu/itemlisteditor.ui156
-rw-r--r--tools/designer/src/components/taskmenu/label_taskmenu.cpp117
-rw-r--r--tools/designer/src/components/taskmenu/label_taskmenu.h81
-rw-r--r--tools/designer/src/components/taskmenu/layouttaskmenu.cpp93
-rw-r--r--tools/designer/src/components/taskmenu/layouttaskmenu.h93
-rw-r--r--tools/designer/src/components/taskmenu/lineedit_taskmenu.cpp103
-rw-r--r--tools/designer/src/components/taskmenu/lineedit_taskmenu.h74
-rw-r--r--tools/designer/src/components/taskmenu/listwidget_taskmenu.cpp117
-rw-r--r--tools/designer/src/components/taskmenu/listwidget_taskmenu.h85
-rw-r--r--tools/designer/src/components/taskmenu/listwidgeteditor.cpp138
-rw-r--r--tools/designer/src/components/taskmenu/listwidgeteditor.h78
-rw-r--r--tools/designer/src/components/taskmenu/menutaskmenu.cpp107
-rw-r--r--tools/designer/src/components/taskmenu/menutaskmenu.h106
-rw-r--r--tools/designer/src/components/taskmenu/tablewidget_taskmenu.cpp115
-rw-r--r--tools/designer/src/components/taskmenu/tablewidget_taskmenu.h85
-rw-r--r--tools/designer/src/components/taskmenu/tablewidgeteditor.cpp403
-rw-r--r--tools/designer/src/components/taskmenu/tablewidgeteditor.h114
-rw-r--r--tools/designer/src/components/taskmenu/tablewidgeteditor.ui157
-rw-r--r--tools/designer/src/components/taskmenu/taskmenu.pri50
-rw-r--r--tools/designer/src/components/taskmenu/taskmenu_component.cpp106
-rw-r--r--tools/designer/src/components/taskmenu/taskmenu_component.h73
-rw-r--r--tools/designer/src/components/taskmenu/taskmenu_global.h57
-rw-r--r--tools/designer/src/components/taskmenu/textedit_taskmenu.cpp105
-rw-r--r--tools/designer/src/components/taskmenu/textedit_taskmenu.h89
-rw-r--r--tools/designer/src/components/taskmenu/toolbar_taskmenu.cpp111
-rw-r--r--tools/designer/src/components/taskmenu/toolbar_taskmenu.h99
-rw-r--r--tools/designer/src/components/taskmenu/treewidget_taskmenu.cpp114
-rw-r--r--tools/designer/src/components/taskmenu/treewidget_taskmenu.h85
-rw-r--r--tools/designer/src/components/taskmenu/treewidgeteditor.cpp603
-rw-r--r--tools/designer/src/components/taskmenu/treewidgeteditor.h113
-rw-r--r--tools/designer/src/components/taskmenu/treewidgeteditor.ui257
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox.cpp232
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox.h103
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox.pri14
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox.qrc5
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox.xml932
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp215
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox_dnditem.h67
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox_global.h57
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxcategorylistview.cpp494
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxcategorylistview.h118
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp998
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxtreewidget.h150
-rw-r--r--tools/designer/src/designer/Info_mac.plist35
-rw-r--r--tools/designer/src/designer/appfontdialog.cpp429
-rw-r--r--tools/designer/src/designer/appfontdialog.h101
-rw-r--r--tools/designer/src/designer/assistantclient.cpp175
-rw-r--r--tools/designer/src/designer/assistantclient.h83
-rw-r--r--tools/designer/src/designer/designer.icnsbin0 -> 154893 bytes-rw-r--r--tools/designer/src/designer/designer.icobin0 -> 355574 bytes-rw-r--r--tools/designer/src/designer/designer.pro89
-rw-r--r--tools/designer/src/designer/designer.qrc5
-rw-r--r--tools/designer/src/designer/designer.rc2
-rw-r--r--tools/designer/src/designer/designer_enums.h52
-rw-r--r--tools/designer/src/designer/images/designer.pngbin0 -> 4205 bytes-rw-r--r--tools/designer/src/designer/images/mdi.pngbin0 -> 59505 bytes-rw-r--r--tools/designer/src/designer/images/sdi.pngbin0 -> 61037 bytes-rw-r--r--tools/designer/src/designer/images/workbench.pngbin0 -> 2085 bytes-rw-r--r--tools/designer/src/designer/main.cpp72
-rw-r--r--tools/designer/src/designer/mainwindow.cpp401
-rw-r--r--tools/designer/src/designer/mainwindow.h187
-rw-r--r--tools/designer/src/designer/newform.cpp227
-rw-r--r--tools/designer/src/designer/newform.h104
-rw-r--r--tools/designer/src/designer/preferencesdialog.cpp118
-rw-r--r--tools/designer/src/designer/preferencesdialog.h82
-rw-r--r--tools/designer/src/designer/preferencesdialog.ui91
-rw-r--r--tools/designer/src/designer/qdesigner.cpp320
-rw-r--r--tools/designer/src/designer/qdesigner.h102
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp1406
-rw-r--r--tools/designer/src/designer/qdesigner_actions.h227
-rw-r--r--tools/designer/src/designer/qdesigner_appearanceoptions.cpp167
-rw-r--r--tools/designer/src/designer/qdesigner_appearanceoptions.h136
-rw-r--r--tools/designer/src/designer/qdesigner_appearanceoptions.ui57
-rw-r--r--tools/designer/src/designer/qdesigner_formwindow.cpp289
-rw-r--r--tools/designer/src/designer/qdesigner_formwindow.h97
-rw-r--r--tools/designer/src/designer/qdesigner_pch.h59
-rw-r--r--tools/designer/src/designer/qdesigner_server.cpp158
-rw-r--r--tools/designer/src/designer/qdesigner_server.h89
-rw-r--r--tools/designer/src/designer/qdesigner_settings.cpp250
-rw-r--r--tools/designer/src/designer/qdesigner_settings.h94
-rw-r--r--tools/designer/src/designer/qdesigner_toolwindow.cpp438
-rw-r--r--tools/designer/src/designer/qdesigner_toolwindow.h123
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp1096
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.h215
-rw-r--r--tools/designer/src/designer/saveformastemplate.cpp173
-rw-r--r--tools/designer/src/designer/saveformastemplate.h77
-rw-r--r--tools/designer/src/designer/saveformastemplate.ui166
-rw-r--r--tools/designer/src/designer/versiondialog.cpp218
-rw-r--r--tools/designer/src/designer/versiondialog.h58
-rw-r--r--tools/designer/src/lib/components/qdesigner_components.h82
-rw-r--r--tools/designer/src/lib/components/qdesigner_components_global.h66
-rw-r--r--tools/designer/src/lib/extension/default_extensionfactory.cpp178
-rw-r--r--tools/designer/src/lib/extension/default_extensionfactory.h86
-rw-r--r--tools/designer/src/lib/extension/extension.cpp186
-rw-r--r--tools/designer/src/lib/extension/extension.h109
-rw-r--r--tools/designer/src/lib/extension/extension.pri12
-rw-r--r--tools/designer/src/lib/extension/extension_global.h64
-rw-r--r--tools/designer/src/lib/extension/qextensionmanager.cpp174
-rw-r--r--tools/designer/src/lib/extension/qextensionmanager.h79
-rw-r--r--tools/designer/src/lib/lib.pro78
-rw-r--r--tools/designer/src/lib/lib_pch.h65
-rw-r--r--tools/designer/src/lib/sdk/abstractactioneditor.cpp123
-rw-r--r--tools/designer/src/lib/sdk/abstractactioneditor.h76
-rw-r--r--tools/designer/src/lib/sdk/abstractbrushmanager.h83
-rw-r--r--tools/designer/src/lib/sdk/abstractdialoggui.cpp161
-rw-r--r--tools/designer/src/lib/sdk/abstractdialoggui_p.h107
-rw-r--r--tools/designer/src/lib/sdk/abstractdnditem.h75
-rw-r--r--tools/designer/src/lib/sdk/abstractformeditor.cpp634
-rw-r--r--tools/designer/src/lib/sdk/abstractformeditor.h159
-rw-r--r--tools/designer/src/lib/sdk/abstractformeditorplugin.cpp86
-rw-r--r--tools/designer/src/lib/sdk/abstractformeditorplugin.h73
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindow.cpp814
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindow.h183
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowcursor.cpp252
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowcursor.h109
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowmanager.cpp502
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowmanager.h122
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowtool.cpp106
-rw-r--r--tools/designer/src/lib/sdk/abstractformwindowtool.h85
-rw-r--r--tools/designer/src/lib/sdk/abstracticoncache.h83
-rw-r--r--tools/designer/src/lib/sdk/abstractintegration.cpp54
-rw-r--r--tools/designer/src/lib/sdk/abstractintegration.h76
-rw-r--r--tools/designer/src/lib/sdk/abstractintrospection.cpp548
-rw-r--r--tools/designer/src/lib/sdk/abstractintrospection_p.h174
-rw-r--r--tools/designer/src/lib/sdk/abstractlanguage.h100
-rw-r--r--tools/designer/src/lib/sdk/abstractmetadatabase.cpp170
-rw-r--r--tools/designer/src/lib/sdk/abstractmetadatabase.h99
-rw-r--r--tools/designer/src/lib/sdk/abstractnewformwidget.cpp117
-rw-r--r--tools/designer/src/lib/sdk/abstractnewformwidget_p.h88
-rw-r--r--tools/designer/src/lib/sdk/abstractobjectinspector.cpp110
-rw-r--r--tools/designer/src/lib/sdk/abstractobjectinspector.h73
-rw-r--r--tools/designer/src/lib/sdk/abstractoptionspage_p.h79
-rw-r--r--tools/designer/src/lib/sdk/abstractpromotioninterface.cpp113
-rw-r--r--tools/designer/src/lib/sdk/abstractpromotioninterface.h91
-rw-r--r--tools/designer/src/lib/sdk/abstractpropertyeditor.cpp193
-rw-r--r--tools/designer/src/lib/sdk/abstractpropertyeditor.h84
-rw-r--r--tools/designer/src/lib/sdk/abstractresourcebrowser.cpp57
-rw-r--r--tools/designer/src/lib/sdk/abstractresourcebrowser.h75
-rw-r--r--tools/designer/src/lib/sdk/abstractsettings_p.h87
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetbox.cpp340
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetbox.h142
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetdatabase.cpp360
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetdatabase.h137
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetfactory.cpp112
-rw-r--r--tools/designer/src/lib/sdk/abstractwidgetfactory.h79
-rw-r--r--tools/designer/src/lib/sdk/dynamicpropertysheet.h81
-rw-r--r--tools/designer/src/lib/sdk/extrainfo.cpp116
-rw-r--r--tools/designer/src/lib/sdk/extrainfo.h84
-rw-r--r--tools/designer/src/lib/sdk/layoutdecoration.h99
-rw-r--r--tools/designer/src/lib/sdk/membersheet.h89
-rw-r--r--tools/designer/src/lib/sdk/propertysheet.h90
-rw-r--r--tools/designer/src/lib/sdk/script.cpp109
-rw-r--r--tools/designer/src/lib/sdk/script_p.h83
-rw-r--r--tools/designer/src/lib/sdk/sdk.pri58
-rw-r--r--tools/designer/src/lib/sdk/sdk_global.h64
-rw-r--r--tools/designer/src/lib/sdk/taskmenu.h72
-rw-r--r--tools/designer/src/lib/shared/actioneditor.cpp818
-rw-r--r--tools/designer/src/lib/shared/actioneditor_p.h168
-rw-r--r--tools/designer/src/lib/shared/actionprovider_p.h108
-rw-r--r--tools/designer/src/lib/shared/actionrepository.cpp659
-rw-r--r--tools/designer/src/lib/shared/actionrepository_p.h257
-rw-r--r--tools/designer/src/lib/shared/addlinkdialog.ui112
-rw-r--r--tools/designer/src/lib/shared/codedialog.cpp262
-rw-r--r--tools/designer/src/lib/shared/codedialog_p.h100
-rw-r--r--tools/designer/src/lib/shared/connectionedit.cpp1612
-rw-r--r--tools/designer/src/lib/shared/connectionedit_p.h324
-rw-r--r--tools/designer/src/lib/shared/csshighlighter.cpp188
-rw-r--r--tools/designer/src/lib/shared/csshighlighter_p.h82
-rw-r--r--tools/designer/src/lib/shared/defaultgradients.xml498
-rw-r--r--tools/designer/src/lib/shared/deviceprofile.cpp467
-rw-r--r--tools/designer/src/lib/shared/deviceprofile_p.h152
-rw-r--r--tools/designer/src/lib/shared/dialoggui.cpp265
-rw-r--r--tools/designer/src/lib/shared/dialoggui_p.h107
-rw-r--r--tools/designer/src/lib/shared/extensionfactory_p.h120
-rw-r--r--tools/designer/src/lib/shared/filterwidget.cpp237
-rw-r--r--tools/designer/src/lib/shared/filterwidget_p.h152
-rw-r--r--tools/designer/src/lib/shared/formlayoutmenu.cpp534
-rw-r--r--tools/designer/src/lib/shared/formlayoutmenu_p.h100
-rw-r--r--tools/designer/src/lib/shared/formlayoutrowdialog.ui166
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp483
-rw-r--r--tools/designer/src/lib/shared/formwindowbase_p.h202
-rw-r--r--tools/designer/src/lib/shared/grid.cpp186
-rw-r--r--tools/designer/src/lib/shared/grid_p.h118
-rw-r--r--tools/designer/src/lib/shared/gridpanel.cpp121
-rw-r--r--tools/designer/src/lib/shared/gridpanel.ui144
-rw-r--r--tools/designer/src/lib/shared/gridpanel_p.h101
-rw-r--r--tools/designer/src/lib/shared/htmlhighlighter.cpp198
-rw-r--r--tools/designer/src/lib/shared/htmlhighlighter_p.h101
-rw-r--r--tools/designer/src/lib/shared/iconloader.cpp80
-rw-r--r--tools/designer/src/lib/shared/iconloader_p.h72
-rw-r--r--tools/designer/src/lib/shared/iconselector.cpp546
-rw-r--r--tools/designer/src/lib/shared/iconselector_p.h142
-rw-r--r--tools/designer/src/lib/shared/invisible_widget.cpp57
-rw-r--r--tools/designer/src/lib/shared/invisible_widget_p.h75
-rw-r--r--tools/designer/src/lib/shared/layout.cpp1326
-rw-r--r--tools/designer/src/lib/shared/layout_p.h152
-rw-r--r--tools/designer/src/lib/shared/layoutinfo.cpp312
-rw-r--r--tools/designer/src/lib/shared/layoutinfo_p.h114
-rw-r--r--tools/designer/src/lib/shared/metadatabase.cpp295
-rw-r--r--tools/designer/src/lib/shared/metadatabase_p.h142
-rw-r--r--tools/designer/src/lib/shared/morphmenu.cpp635
-rw-r--r--tools/designer/src/lib/shared/morphmenu_p.h97
-rw-r--r--tools/designer/src/lib/shared/newactiondialog.cpp197
-rw-r--r--tools/designer/src/lib/shared/newactiondialog.ui277
-rw-r--r--tools/designer/src/lib/shared/newactiondialog_p.h124
-rw-r--r--tools/designer/src/lib/shared/newformwidget.cpp587
-rw-r--r--tools/designer/src/lib/shared/newformwidget.ui192
-rw-r--r--tools/designer/src/lib/shared/newformwidget_p.h143
-rw-r--r--tools/designer/src/lib/shared/orderdialog.cpp188
-rw-r--r--tools/designer/src/lib/shared/orderdialog.ui198
-rw-r--r--tools/designer/src/lib/shared/orderdialog_p.h114
-rw-r--r--tools/designer/src/lib/shared/plaintexteditor.cpp119
-rw-r--r--tools/designer/src/lib/shared/plaintexteditor_p.h89
-rw-r--r--tools/designer/src/lib/shared/plugindialog.cpp207
-rw-r--r--tools/designer/src/lib/shared/plugindialog.ui136
-rw-r--r--tools/designer/src/lib/shared/plugindialog_p.h81
-rw-r--r--tools/designer/src/lib/shared/pluginmanager.cpp788
-rw-r--r--tools/designer/src/lib/shared/pluginmanager_p.h159
-rw-r--r--tools/designer/src/lib/shared/previewconfigurationwidget.cpp366
-rw-r--r--tools/designer/src/lib/shared/previewconfigurationwidget.ui91
-rw-r--r--tools/designer/src/lib/shared/previewconfigurationwidget_p.h96
-rw-r--r--tools/designer/src/lib/shared/previewmanager.cpp940
-rw-r--r--tools/designer/src/lib/shared/previewmanager_p.h184
-rw-r--r--tools/designer/src/lib/shared/promotionmodel.cpp220
-rw-r--r--tools/designer/src/lib/shared/promotionmodel_p.h98
-rw-r--r--tools/designer/src/lib/shared/promotiontaskmenu.cpp361
-rw-r--r--tools/designer/src/lib/shared/promotiontaskmenu_p.h151
-rw-r--r--tools/designer/src/lib/shared/propertylineedit.cpp96
-rw-r--r--tools/designer/src/lib/shared/propertylineedit_p.h85
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command.cpp2968
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command2.cpp159
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command2_p.h101
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command_p.h1136
-rw-r--r--tools/designer/src/lib/shared/qdesigner_dnditem.cpp300
-rw-r--r--tools/designer/src/lib/shared/qdesigner_dnditem_p.h147
-rw-r--r--tools/designer/src/lib/shared/qdesigner_dockwidget.cpp140
-rw-r--r--tools/designer/src/lib/shared/qdesigner_dockwidget_p.h87
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formbuilder.cpp478
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formbuilder_p.h166
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formeditorcommand.cpp64
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formeditorcommand_p.h83
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp149
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h96
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowmanager.cpp167
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowmanager_p.h99
-rw-r--r--tools/designer/src/lib/shared/qdesigner_integration.cpp496
-rw-r--r--tools/designer/src/lib/shared/qdesigner_integration_p.h152
-rw-r--r--tools/designer/src/lib/shared/qdesigner_introspection.cpp372
-rw-r--r--tools/designer/src/lib/shared/qdesigner_introspection_p.h84
-rw-r--r--tools/designer/src/lib/shared/qdesigner_membersheet.cpp371
-rw-r--r--tools/designer/src/lib/shared/qdesigner_membersheet_p.h120
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu.cpp1355
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu_p.h203
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menubar.cpp955
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menubar_p.h177
-rw-r--r--tools/designer/src/lib/shared/qdesigner_objectinspector.cpp80
-rw-r--r--tools/designer/src/lib/shared/qdesigner_objectinspector_p.h103
-rw-r--r--tools/designer/src/lib/shared/qdesigner_promotion.cpp373
-rw-r--r--tools/designer/src/lib/shared/qdesigner_promotion_p.h98
-rw-r--r--tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp448
-rw-r--r--tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h161
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand.cpp1479
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand_p.h301
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp157
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h106
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp1601
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet_p.h265
-rw-r--r--tools/designer/src/lib/shared/qdesigner_qsettings.cpp94
-rw-r--r--tools/designer/src/lib/shared/qdesigner_qsettings_p.h88
-rw-r--r--tools/designer/src/lib/shared/qdesigner_stackedbox.cpp396
-rw-r--r--tools/designer/src/lib/shared/qdesigner_stackedbox_p.h164
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget.cpp567
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget_p.h153
-rw-r--r--tools/designer/src/lib/shared/qdesigner_taskmenu.cpp777
-rw-r--r--tools/designer/src/lib/shared/qdesigner_taskmenu_p.h132
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbar.cpp482
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbar_p.h135
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbox.cpp437
-rw-r--r--tools/designer/src/lib/shared/qdesigner_toolbox_p.h140
-rw-r--r--tools/designer/src/lib/shared/qdesigner_utils.cpp734
-rw-r--r--tools/designer/src/lib/shared/qdesigner_utils_p.h482
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widget.cpp108
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widget_p.h122
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widgetbox.cpp181
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widgetbox_p.h101
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widgetitem.cpp345
-rw-r--r--tools/designer/src/lib/shared/qdesigner_widgetitem_p.h147
-rw-r--r--tools/designer/src/lib/shared/qlayout_widget.cpp2103
-rw-r--r--tools/designer/src/lib/shared/qlayout_widget_p.h292
-rw-r--r--tools/designer/src/lib/shared/qscripthighlighter.cpp468
-rw-r--r--tools/designer/src/lib/shared/qscripthighlighter_p.h84
-rw-r--r--tools/designer/src/lib/shared/qsimpleresource.cpp283
-rw-r--r--tools/designer/src/lib/shared/qsimpleresource_p.h147
-rw-r--r--tools/designer/src/lib/shared/qtresourceeditordialog.cpp2226
-rw-r--r--tools/designer/src/lib/shared/qtresourceeditordialog.ui177
-rw-r--r--tools/designer/src/lib/shared/qtresourceeditordialog_p.h129
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel.cpp648
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel_p.h144
-rw-r--r--tools/designer/src/lib/shared/qtresourceview.cpp766
-rw-r--r--tools/designer/src/lib/shared/qtresourceview_p.h140
-rw-r--r--tools/designer/src/lib/shared/richtexteditor.cpp758
-rw-r--r--tools/designer/src/lib/shared/richtexteditor_p.h102
-rw-r--r--tools/designer/src/lib/shared/scriptcommand.cpp103
-rw-r--r--tools/designer/src/lib/shared/scriptcommand_p.h93
-rw-r--r--tools/designer/src/lib/shared/scriptdialog.cpp124
-rw-r--r--tools/designer/src/lib/shared/scriptdialog_p.h90
-rw-r--r--tools/designer/src/lib/shared/scripterrordialog.cpp108
-rw-r--r--tools/designer/src/lib/shared/scripterrordialog_p.h83
-rw-r--r--tools/designer/src/lib/shared/selectsignaldialog.ui93
-rw-r--r--tools/designer/src/lib/shared/shared.pri202
-rw-r--r--tools/designer/src/lib/shared/shared.qrc20
-rw-r--r--tools/designer/src/lib/shared/shared_enums_p.h99
-rw-r--r--tools/designer/src/lib/shared/shared_global_p.h76
-rw-r--r--tools/designer/src/lib/shared/shared_settings.cpp321
-rw-r--r--tools/designer/src/lib/shared/shared_settings_p.h142
-rw-r--r--tools/designer/src/lib/shared/sheet_delegate.cpp112
-rw-r--r--tools/designer/src/lib/shared/sheet_delegate_p.h85
-rw-r--r--tools/designer/src/lib/shared/signalslotdialog.cpp526
-rw-r--r--tools/designer/src/lib/shared/signalslotdialog.ui129
-rw-r--r--tools/designer/src/lib/shared/signalslotdialog_p.h173
-rw-r--r--tools/designer/src/lib/shared/spacer_widget.cpp280
-rw-r--r--tools/designer/src/lib/shared/spacer_widget_p.h117
-rw-r--r--tools/designer/src/lib/shared/stylesheeteditor.cpp411
-rw-r--r--tools/designer/src/lib/shared/stylesheeteditor_p.h144
-rw-r--r--tools/designer/src/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui67
-rw-r--r--tools/designer/src/lib/shared/templates/forms/Dialog_with_Buttons_Bottom.ui71
-rw-r--r--tools/designer/src/lib/shared/templates/forms/Dialog_with_Buttons_Right.ui71
-rw-r--r--tools/designer/src/lib/shared/templates/forms/Dialog_without_Buttons.ui18
-rw-r--r--tools/designer/src/lib/shared/templates/forms/Main_Window.ui24
-rw-r--r--tools/designer/src/lib/shared/templates/forms/Widget.ui21
-rw-r--r--tools/designer/src/lib/shared/textpropertyeditor.cpp429
-rw-r--r--tools/designer/src/lib/shared/textpropertyeditor_p.h156
-rw-r--r--tools/designer/src/lib/shared/widgetdatabase.cpp865
-rw-r--r--tools/designer/src/lib/shared/widgetdatabase_p.h210
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp893
-rw-r--r--tools/designer/src/lib/shared/widgetfactory_p.h191
-rw-r--r--tools/designer/src/lib/shared/zoomwidget.cpp570
-rw-r--r--tools/designer/src/lib/shared/zoomwidget_p.h231
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp2920
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.h290
-rw-r--r--tools/designer/src/lib/uilib/container.h75
-rw-r--r--tools/designer/src/lib/uilib/customwidget.h101
-rw-r--r--tools/designer/src/lib/uilib/formbuilder.cpp562
-rw-r--r--tools/designer/src/lib/uilib/formbuilder.h115
-rw-r--r--tools/designer/src/lib/uilib/formbuilderextra.cpp531
-rw-r--r--tools/designer/src/lib/uilib/formbuilderextra_p.h255
-rw-r--r--tools/designer/src/lib/uilib/formscriptrunner.cpp208
-rw-r--r--tools/designer/src/lib/uilib/formscriptrunner_p.h120
-rw-r--r--tools/designer/src/lib/uilib/properties.cpp676
-rw-r--r--tools/designer/src/lib/uilib/properties_p.h176
-rw-r--r--tools/designer/src/lib/uilib/qdesignerexportwidget.h66
-rw-r--r--tools/designer/src/lib/uilib/resourcebuilder.cpp169
-rw-r--r--tools/designer/src/lib/uilib/resourcebuilder_p.h104
-rw-r--r--tools/designer/src/lib/uilib/textbuilder.cpp84
-rw-r--r--tools/designer/src/lib/uilib/textbuilder_p.h93
-rw-r--r--tools/designer/src/lib/uilib/ui4.cpp11132
-rw-r--r--tools/designer/src/lib/uilib/ui4_p.h3791
-rw-r--r--tools/designer/src/lib/uilib/uilib.pri31
-rw-r--r--tools/designer/src/lib/uilib/uilib_global.h64
-rw-r--r--tools/designer/src/lib/uilib/widgets.table148
-rw-r--r--tools/designer/src/plugins/activeqt/activeqt.pro32
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.cpp117
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetextrainfo.h91
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetplugin.cpp146
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetplugin.h77
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.cpp189
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h99
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgettaskmenu.cpp186
-rw-r--r--tools/designer/src/plugins/activeqt/qaxwidgettaskmenu.h76
-rw-r--r--tools/designer/src/plugins/activeqt/qdesigneraxwidget.cpp272
-rw-r--r--tools/designer/src/plugins/activeqt/qdesigneraxwidget.h142
-rw-r--r--tools/designer/src/plugins/phononwidgets/images/seekslider.pngbin0 -> 444 bytes-rw-r--r--tools/designer/src/plugins/phononwidgets/images/videoplayer.pngbin0 -> 644 bytes-rw-r--r--tools/designer/src/plugins/phononwidgets/images/videowidget.pngbin0 -> 794 bytes-rw-r--r--tools/designer/src/plugins/phononwidgets/images/volumeslider.pngbin0 -> 470 bytes-rw-r--r--tools/designer/src/plugins/phononwidgets/phononcollection.cpp82
-rw-r--r--tools/designer/src/plugins/phononwidgets/phononwidgets.pro24
-rw-r--r--tools/designer/src/plugins/phononwidgets/phononwidgets.qrc8
-rw-r--r--tools/designer/src/plugins/phononwidgets/seeksliderplugin.cpp117
-rw-r--r--tools/designer/src/plugins/phononwidgets/seeksliderplugin.h75
-rw-r--r--tools/designer/src/plugins/phononwidgets/videoplayerplugin.cpp135
-rw-r--r--tools/designer/src/plugins/phononwidgets/videoplayerplugin.h75
-rw-r--r--tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.cpp154
-rw-r--r--tools/designer/src/plugins/phononwidgets/videoplayertaskmenu.h82
-rw-r--r--tools/designer/src/plugins/phononwidgets/volumesliderplugin.cpp117
-rw-r--r--tools/designer/src/plugins/phononwidgets/volumesliderplugin.h75
-rw-r--r--tools/designer/src/plugins/plugins.pri8
-rw-r--r--tools/designer/src/plugins/plugins.pro9
-rw-r--r--tools/designer/src/plugins/qwebview/images/qwebview.pngbin0 -> 1473 bytes-rw-r--r--tools/designer/src/plugins/qwebview/qwebview.pro15
-rw-r--r--tools/designer/src/plugins/qwebview/qwebview_plugin.cpp137
-rw-r--r--tools/designer/src/plugins/qwebview/qwebview_plugin.h74
-rw-r--r--tools/designer/src/plugins/qwebview/qwebview_plugin.qrc5
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d.cpp492
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d.h77
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d.pro17
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d_global.h61
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d_plugin.cpp115
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d_plugin.h82
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d_tool.cpp88
-rw-r--r--tools/designer/src/plugins/tools/view3d/view3d_tool.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.cpp183
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_extrainfo.h95
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.cpp120
-rw-r--r--tools/designer/src/plugins/widgets/q3iconview/q3iconview_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.cpp151
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_extrainfo.h93
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.cpp121
-rw-r--r--tools/designer/src/plugins/widgets/q3listbox/q3listbox_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.cpp249
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_extrainfo.h96
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.cpp121
-rw-r--r--tools/designer/src/plugins/widgets/q3listview/q3listview_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_container.cpp130
-rw-r--r--tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_container.h84
-rw-r--r--tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.cpp118
-rw-r--r--tools/designer/src/plugins/widgets/q3mainwindow/q3mainwindow_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.cpp196
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_extrainfo.h93
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_plugin.cpp121
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.cpp116
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_extrainfo.h93
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.cpp122
-rw-r--r--tools/designer/src/plugins/widgets/q3textedit/q3textedit_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.cpp108
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_extrainfo.h92
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.cpp128
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.cpp601
-rw-r--r--tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h287
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_container.cpp115
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_container.h84
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.cpp118
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack.cpp217
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/qdesigner_q3widgetstack_p.h108
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.cpp235
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h149
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.cpp128
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_plugin.h76
-rw-r--r--tools/designer/src/plugins/widgets/qt3supportwidgets.cpp107
-rw-r--r--tools/designer/src/plugins/widgets/widgets.pro82
-rw-r--r--tools/designer/src/sharedcomponents.pri30
-rw-r--r--tools/designer/src/src.pro13
-rw-r--r--tools/designer/src/uitools/quiloader.cpp927
-rw-r--r--tools/designer/src/uitools/quiloader.h102
-rw-r--r--tools/designer/src/uitools/quiloader_p.h109
-rw-r--r--tools/designer/src/uitools/uitools.pro41
-rw-r--r--tools/designer/translations/translations.pro140
-rw-r--r--tools/doxygen/config/footer.html8
-rw-r--r--tools/doxygen/config/header.html30
-rw-r--r--tools/doxygen/config/phonon.css114
-rw-r--r--tools/doxygen/config/phonon.doxyfile220
-rw-r--r--tools/installer/README12
-rwxr-xr-xtools/installer/batch/build.bat160
-rwxr-xr-xtools/installer/batch/copy.bat124
-rwxr-xr-xtools/installer/batch/delete.bat76
-rwxr-xr-xtools/installer/batch/env.bat144
-rwxr-xr-xtools/installer/batch/extract.bat86
-rwxr-xr-xtools/installer/batch/installer.bat250
-rwxr-xr-xtools/installer/batch/log.bat61
-rwxr-xr-xtools/installer/batch/toupper.bat72
-rw-r--r--tools/installer/config/config.default.sample67
-rw-r--r--tools/installer/config/mingw-opensource.conf139
-rwxr-xr-xtools/installer/iwmake.bat127
-rw-r--r--tools/installer/nsis/confirmpage.ini62
-rw-r--r--tools/installer/nsis/gwdownload.ini121
-rw-r--r--tools/installer/nsis/gwmirror.ini70
-rw-r--r--tools/installer/nsis/images/install.icobin0 -> 22486 bytes-rw-r--r--tools/installer/nsis/images/qt-header.bmpbin0 -> 25818 bytes-rw-r--r--tools/installer/nsis/images/qt-wizard.bmpbin0 -> 154542 bytes-rw-r--r--tools/installer/nsis/includes/global.nsh146
-rw-r--r--tools/installer/nsis/includes/instdir.nsh257
-rw-r--r--tools/installer/nsis/includes/list.nsh139
-rw-r--r--tools/installer/nsis/includes/qtcommon.nsh574
-rw-r--r--tools/installer/nsis/includes/qtenv.nsh306
-rw-r--r--tools/installer/nsis/includes/system.nsh272
-rw-r--r--tools/installer/nsis/installer.nsi527
-rw-r--r--tools/installer/nsis/modules/environment.nsh219
-rw-r--r--tools/installer/nsis/modules/mingw.nsh676
-rw-r--r--tools/installer/nsis/modules/opensource.nsh98
-rw-r--r--tools/installer/nsis/modules/registeruiext.nsh210
-rw-r--r--tools/installer/nsis/opensource.ini81
-rw-r--r--tools/linguist/LICENSE.GPL280
-rw-r--r--tools/linguist/lconvert/lconvert.pro22
-rw-r--r--tools/linguist/lconvert/main.cpp235
-rw-r--r--tools/linguist/linguist.pro8
-rw-r--r--tools/linguist/linguist/Info_mac.plist18
-rw-r--r--tools/linguist/linguist/batchtranslation.ui260
-rw-r--r--tools/linguist/linguist/batchtranslationdialog.cpp194
-rw-r--r--tools/linguist/linguist/batchtranslationdialog.h87
-rw-r--r--tools/linguist/linguist/errorsview.cpp118
-rw-r--r--tools/linguist/linguist/errorsview.h78
-rw-r--r--tools/linguist/linguist/finddialog.cpp94
-rw-r--r--tools/linguist/linguist/finddialog.h69
-rw-r--r--tools/linguist/linguist/finddialog.ui266
-rw-r--r--tools/linguist/linguist/formpreviewview.cpp535
-rw-r--r--tools/linguist/linguist/formpreviewview.h128
-rw-r--r--tools/linguist/linguist/images/appicon.pngbin0 -> 1382 bytes-rw-r--r--tools/linguist/linguist/images/down.pngbin0 -> 594 bytes-rw-r--r--tools/linguist/linguist/images/editdelete.pngbin0 -> 831 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-128-32.pngbin0 -> 5960 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-128-8.pngbin0 -> 5947 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-16-32.pngbin0 -> 537 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-16-8.pngbin0 -> 608 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-32-32.pngbin0 -> 1382 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-32-8.pngbin0 -> 1369 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-48-32.pngbin0 -> 2017 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-48-8.pngbin0 -> 1972 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-64-32.pngbin0 -> 2773 bytes-rw-r--r--tools/linguist/linguist/images/icons/linguist-64-8.pngbin0 -> 2664 bytes-rw-r--r--tools/linguist/linguist/images/mac/accelerator.pngbin0 -> 1921 bytes-rw-r--r--tools/linguist/linguist/images/mac/book.pngbin0 -> 1477 bytes-rw-r--r--tools/linguist/linguist/images/mac/doneandnext.pngbin0 -> 1590 bytes-rw-r--r--tools/linguist/linguist/images/mac/editcopy.pngbin0 -> 1468 bytes-rw-r--r--tools/linguist/linguist/images/mac/editcut.pngbin0 -> 1512 bytes-rw-r--r--tools/linguist/linguist/images/mac/editpaste.pngbin0 -> 1906 bytes-rw-r--r--tools/linguist/linguist/images/mac/filenew.pngbin0 -> 1172 bytes-rw-r--r--tools/linguist/linguist/images/mac/fileopen.pngbin0 -> 2168 bytes-rw-r--r--tools/linguist/linguist/images/mac/fileprint.pngbin0 -> 741 bytes-rw-r--r--tools/linguist/linguist/images/mac/filesave.pngbin0 -> 1206 bytes-rw-r--r--tools/linguist/linguist/images/mac/next.pngbin0 -> 1056 bytes-rw-r--r--tools/linguist/linguist/images/mac/nextunfinished.pngbin0 -> 1756 bytes-rw-r--r--tools/linguist/linguist/images/mac/phrase.pngbin0 -> 1932 bytes-rw-r--r--tools/linguist/linguist/images/mac/prev.pngbin0 -> 1080 bytes-rw-r--r--tools/linguist/linguist/images/mac/prevunfinished.pngbin0 -> 1682 bytes-rw-r--r--tools/linguist/linguist/images/mac/print.pngbin0 -> 2087 bytes-rw-r--r--tools/linguist/linguist/images/mac/punctuation.pngbin0 -> 1593 bytes-rw-r--r--tools/linguist/linguist/images/mac/redo.pngbin0 -> 1752 bytes-rw-r--r--tools/linguist/linguist/images/mac/searchfind.pngbin0 -> 1836 bytes-rw-r--r--tools/linguist/linguist/images/mac/undo.pngbin0 -> 1746 bytes-rw-r--r--tools/linguist/linguist/images/mac/validateplacemarkers.pngbin0 -> 1452 bytes-rw-r--r--tools/linguist/linguist/images/mac/whatsthis.pngbin0 -> 1586 bytes-rw-r--r--tools/linguist/linguist/images/s_check_danger.pngbin0 -> 304 bytes-rw-r--r--tools/linguist/linguist/images/s_check_empty.pngbin0 -> 404 bytes-rw-r--r--tools/linguist/linguist/images/s_check_obsolete.pngbin0 -> 192 bytes-rw-r--r--tools/linguist/linguist/images/s_check_off.pngbin0 -> 434 bytes-rw-r--r--tools/linguist/linguist/images/s_check_on.pngbin0 -> 192 bytes-rw-r--r--tools/linguist/linguist/images/s_check_warning.pngbin0 -> 192 bytes-rw-r--r--tools/linguist/linguist/images/splash.pngbin0 -> 15637 bytes-rw-r--r--tools/linguist/linguist/images/transbox.pngbin0 -> 782 bytes-rw-r--r--tools/linguist/linguist/images/up.pngbin0 -> 692 bytes-rw-r--r--tools/linguist/linguist/images/win/accelerator.pngbin0 -> 1335 bytes-rw-r--r--tools/linguist/linguist/images/win/book.pngbin0 -> 1109 bytes-rw-r--r--tools/linguist/linguist/images/win/doneandnext.pngbin0 -> 1233 bytes-rw-r--r--tools/linguist/linguist/images/win/editcopy.pngbin0 -> 1325 bytes-rw-r--r--tools/linguist/linguist/images/win/editcut.pngbin0 -> 1384 bytes-rw-r--r--tools/linguist/linguist/images/win/editpaste.pngbin0 -> 1482 bytes-rw-r--r--tools/linguist/linguist/images/win/filenew.pngbin0 -> 768 bytes-rw-r--r--tools/linguist/linguist/images/win/fileopen.pngbin0 -> 1662 bytes-rw-r--r--tools/linguist/linguist/images/win/filesave.pngbin0 -> 1205 bytes-rw-r--r--tools/linguist/linguist/images/win/next.pngbin0 -> 1038 bytes-rw-r--r--tools/linguist/linguist/images/win/nextunfinished.pngbin0 -> 1257 bytes-rw-r--r--tools/linguist/linguist/images/win/phrase.pngbin0 -> 1371 bytes-rw-r--r--tools/linguist/linguist/images/win/prev.pngbin0 -> 898 bytes-rw-r--r--tools/linguist/linguist/images/win/prevunfinished.pngbin0 -> 1260 bytes-rw-r--r--tools/linguist/linguist/images/win/print.pngbin0 -> 1456 bytes-rw-r--r--tools/linguist/linguist/images/win/punctuation.pngbin0 -> 1508 bytes-rw-r--r--tools/linguist/linguist/images/win/redo.pngbin0 -> 1212 bytes-rw-r--r--tools/linguist/linguist/images/win/searchfind.pngbin0 -> 1944 bytes-rw-r--r--tools/linguist/linguist/images/win/undo.pngbin0 -> 1181 bytes-rw-r--r--tools/linguist/linguist/images/win/validateplacemarkers.pngbin0 -> 1994 bytes-rw-r--r--tools/linguist/linguist/images/win/whatsthis.pngbin0 -> 1040 bytes-rw-r--r--tools/linguist/linguist/linguist.icnsbin0 -> 152596 bytes-rw-r--r--tools/linguist/linguist/linguist.icobin0 -> 355574 bytes-rw-r--r--tools/linguist/linguist/linguist.pro107
-rw-r--r--tools/linguist/linguist/linguist.qrc56
-rw-r--r--tools/linguist/linguist/linguist.rc1
-rw-r--r--tools/linguist/linguist/main.cpp119
-rw-r--r--tools/linguist/linguist/mainwindow.cpp2673
-rw-r--r--tools/linguist/linguist/mainwindow.h266
-rw-r--r--tools/linguist/linguist/mainwindow.ui883
-rw-r--r--tools/linguist/linguist/messageeditor.cpp865
-rw-r--r--tools/linguist/linguist/messageeditor.h169
-rw-r--r--tools/linguist/linguist/messageeditorwidgets.cpp201
-rw-r--r--tools/linguist/linguist/messageeditorwidgets.h130
-rw-r--r--tools/linguist/linguist/messagehighlighter.cpp210
-rw-r--r--tools/linguist/linguist/messagehighlighter.h83
-rw-r--r--tools/linguist/linguist/messagemodel.cpp1403
-rw-r--r--tools/linguist/linguist/messagemodel.h535
-rw-r--r--tools/linguist/linguist/phrase.cpp356
-rw-r--r--tools/linguist/linguist/phrase.h138
-rw-r--r--tools/linguist/linguist/phrasebookbox.cpp242
-rw-r--r--tools/linguist/linguist/phrasebookbox.h89
-rw-r--r--tools/linguist/linguist/phrasebookbox.ui236
-rw-r--r--tools/linguist/linguist/phrasemodel.cpp200
-rw-r--r--tools/linguist/linguist/phrasemodel.h94
-rw-r--r--tools/linguist/linguist/phraseview.cpp271
-rw-r--r--tools/linguist/linguist/phraseview.h120
-rw-r--r--tools/linguist/linguist/printout.cpp210
-rw-r--r--tools/linguist/linguist/printout.h120
-rw-r--r--tools/linguist/linguist/recentfiles.cpp147
-rw-r--r--tools/linguist/linguist/recentfiles.h83
-rw-r--r--tools/linguist/linguist/sourcecodeview.cpp145
-rw-r--r--tools/linguist/linguist/sourcecodeview.h74
-rw-r--r--tools/linguist/linguist/statistics.cpp67
-rw-r--r--tools/linguist/linguist/statistics.h67
-rw-r--r--tools/linguist/linguist/statistics.ui211
-rw-r--r--tools/linguist/linguist/translatedialog.cpp90
-rw-r--r--tools/linguist/linguist/translatedialog.h89
-rw-r--r--tools/linguist/linguist/translatedialog.ui260
-rw-r--r--tools/linguist/linguist/translationsettings.ui137
-rw-r--r--tools/linguist/linguist/translationsettingsdialog.cpp149
-rw-r--r--tools/linguist/linguist/translationsettingsdialog.h79
-rw-r--r--tools/linguist/lrelease/lrelease.197
-rw-r--r--tools/linguist/lrelease/lrelease.pro24
-rw-r--r--tools/linguist/lrelease/main.cpp271
-rw-r--r--tools/linguist/lupdate/cpp.cpp1816
-rw-r--r--tools/linguist/lupdate/java.cpp646
-rw-r--r--tools/linguist/lupdate/lupdate.1132
-rw-r--r--tools/linguist/lupdate/lupdate.exe.manifest14
-rw-r--r--tools/linguist/lupdate/lupdate.h85
-rw-r--r--tools/linguist/lupdate/lupdate.pro45
-rw-r--r--tools/linguist/lupdate/main.cpp542
-rw-r--r--tools/linguist/lupdate/merge.cpp505
-rw-r--r--tools/linguist/lupdate/qscript.cpp2391
-rw-r--r--tools/linguist/lupdate/qscript.g2026
-rw-r--r--tools/linguist/lupdate/ui.cpp197
-rw-r--r--tools/linguist/lupdate/winmanifest.rc4
-rw-r--r--tools/linguist/phrasebooks/danish.qph1018
-rw-r--r--tools/linguist/phrasebooks/dutch.qph1044
-rw-r--r--tools/linguist/phrasebooks/finnish.qph1033
-rw-r--r--tools/linguist/phrasebooks/french.qph1104
-rw-r--r--tools/linguist/phrasebooks/german.qph1075
-rw-r--r--tools/linguist/phrasebooks/italian.qph1105
-rw-r--r--tools/linguist/phrasebooks/japanese.qph1021
-rw-r--r--tools/linguist/phrasebooks/norwegian.qph1004
-rw-r--r--tools/linguist/phrasebooks/polish.qph527
-rw-r--r--tools/linguist/phrasebooks/russian.qph982
-rw-r--r--tools/linguist/phrasebooks/spanish.qph1086
-rw-r--r--tools/linguist/phrasebooks/swedish.qph1010
-rw-r--r--tools/linguist/qdoc.conf15
-rw-r--r--tools/linguist/shared/abstractproitemvisitor.h70
-rw-r--r--tools/linguist/shared/formats.pri22
-rw-r--r--tools/linguist/shared/numerus.cpp377
-rw-r--r--tools/linguist/shared/po.cpp662
-rw-r--r--tools/linguist/shared/profileevaluator.cpp2357
-rw-r--r--tools/linguist/shared/profileevaluator.h104
-rw-r--r--tools/linguist/shared/proitems.cpp328
-rw-r--r--tools/linguist/shared/proitems.h236
-rw-r--r--tools/linguist/shared/proparser.pri12
-rw-r--r--tools/linguist/shared/proparserutils.h299
-rw-r--r--tools/linguist/shared/qm.cpp717
-rw-r--r--tools/linguist/shared/qph.cpp171
-rw-r--r--tools/linguist/shared/simtexth.cpp277
-rw-r--r--tools/linguist/shared/simtexth.h100
-rw-r--r--tools/linguist/shared/translator.cpp559
-rw-r--r--tools/linguist/shared/translator.h229
-rw-r--r--tools/linguist/shared/translatormessage.cpp217
-rw-r--r--tools/linguist/shared/translatormessage.h181
-rw-r--r--tools/linguist/shared/ts.cpp755
-rw-r--r--tools/linguist/shared/ts.dtd113
-rw-r--r--tools/linguist/shared/xliff.cpp828
-rw-r--r--tools/linguist/tests/data/main.cpp35
-rw-r--r--tools/linguist/tests/data/test.pro9
-rw-r--r--tools/linguist/tests/tests.pro16
-rw-r--r--tools/linguist/tests/tst_linguist.cpp4
-rw-r--r--tools/linguist/tests/tst_linguist.h22
-rw-r--r--tools/linguist/tests/tst_lupdate.cpp165
-rw-r--r--tools/linguist/tests/tst_simtexth.cpp43
-rw-r--r--tools/macdeployqt/macchangeqt/macchangeqt.pro9
-rw-r--r--tools/macdeployqt/macchangeqt/main.cpp76
-rw-r--r--tools/macdeployqt/macdeployqt.pro7
-rw-r--r--tools/macdeployqt/macdeployqt/macdeployqt.pro13
-rw-r--r--tools/macdeployqt/macdeployqt/main.cpp135
-rw-r--r--tools/macdeployqt/shared/shared.cpp582
-rw-r--r--tools/macdeployqt/shared/shared.h110
-rw-r--r--tools/macdeployqt/tests/deployment_mac.pro10
-rw-r--r--tools/macdeployqt/tests/tst_deployment_mac.cpp233
-rw-r--r--tools/makeqpf/Blocks.txt185
-rw-r--r--tools/makeqpf/README1
-rw-r--r--tools/makeqpf/main.cpp183
-rw-r--r--tools/makeqpf/mainwindow.cpp322
-rw-r--r--tools/makeqpf/mainwindow.h80
-rw-r--r--tools/makeqpf/mainwindow.ui502
-rw-r--r--tools/makeqpf/makeqpf.pro20
-rw-r--r--tools/makeqpf/makeqpf.qrc5
-rw-r--r--tools/makeqpf/qpf2.cpp767
-rw-r--r--tools/makeqpf/qpf2.h119
-rw-r--r--tools/pixeltool/Info_mac.plist18
-rw-r--r--tools/pixeltool/main.cpp65
-rw-r--r--tools/pixeltool/pixeltool.pro25
-rw-r--r--tools/pixeltool/qpixeltool.cpp536
-rw-r--r--tools/pixeltool/qpixeltool.h118
-rw-r--r--tools/porting/porting.pro2
-rw-r--r--tools/porting/src/ast.cpp1215
-rw-r--r--tools/porting/src/ast.h1598
-rw-r--r--tools/porting/src/codemodel.cpp91
-rw-r--r--tools/porting/src/codemodel.h777
-rw-r--r--tools/porting/src/codemodelattributes.cpp195
-rw-r--r--tools/porting/src/codemodelattributes.h72
-rw-r--r--tools/porting/src/codemodelwalker.cpp125
-rw-r--r--tools/porting/src/codemodelwalker.h80
-rw-r--r--tools/porting/src/cpplexer.cpp1297
-rw-r--r--tools/porting/src/cpplexer.h107
-rw-r--r--tools/porting/src/errors.cpp51
-rw-r--r--tools/porting/src/errors.h71
-rw-r--r--tools/porting/src/fileporter.cpp369
-rw-r--r--tools/porting/src/fileporter.h116
-rw-r--r--tools/porting/src/filewriter.cpp151
-rw-r--r--tools/porting/src/filewriter.h75
-rw-r--r--tools/porting/src/list.h374
-rw-r--r--tools/porting/src/logger.cpp148
-rw-r--r--tools/porting/src/logger.h124
-rw-r--r--tools/porting/src/parser.cpp4526
-rw-r--r--tools/porting/src/parser.h247
-rw-r--r--tools/porting/src/port.cpp297
-rw-r--r--tools/porting/src/portingrules.cpp296
-rw-r--r--tools/porting/src/portingrules.h114
-rw-r--r--tools/porting/src/preprocessorcontrol.cpp430
-rw-r--r--tools/porting/src/preprocessorcontrol.h139
-rw-r--r--tools/porting/src/projectporter.cpp414
-rw-r--r--tools/porting/src/projectporter.h82
-rw-r--r--tools/porting/src/proparser.cpp193
-rw-r--r--tools/porting/src/proparser.h55
-rw-r--r--tools/porting/src/q3porting.xml10567
-rw-r--r--tools/porting/src/qt3headers0.qrc6
-rw-r--r--tools/porting/src/qt3headers0.resourcebin0 -> 547809 bytes-rw-r--r--tools/porting/src/qt3headers1.qrc6
-rw-r--r--tools/porting/src/qt3headers1.resourcebin0 -> 512251 bytes-rw-r--r--tools/porting/src/qt3headers2.qrc6
-rw-r--r--tools/porting/src/qt3headers2.resourcebin0 -> 392439 bytes-rw-r--r--tools/porting/src/qt3headers3.qrc6
-rw-r--r--tools/porting/src/qt3headers3.resourcebin0 -> 553089 bytes-rw-r--r--tools/porting/src/qt3to4.pri68
-rw-r--r--tools/porting/src/qtsimplexml.cpp278
-rw-r--r--tools/porting/src/qtsimplexml.h97
-rw-r--r--tools/porting/src/replacetoken.cpp105
-rw-r--r--tools/porting/src/replacetoken.h67
-rw-r--r--tools/porting/src/rpp.cpp728
-rw-r--r--tools/porting/src/rpp.h1072
-rw-r--r--tools/porting/src/rppexpressionbuilder.cpp330
-rw-r--r--tools/porting/src/rppexpressionbuilder.h107
-rw-r--r--tools/porting/src/rpplexer.cpp381
-rw-r--r--tools/porting/src/rpplexer.h100
-rw-r--r--tools/porting/src/rpptreeevaluator.cpp554
-rw-r--r--tools/porting/src/rpptreeevaluator.h117
-rw-r--r--tools/porting/src/rpptreewalker.cpp166
-rw-r--r--tools/porting/src/rpptreewalker.h85
-rw-r--r--tools/porting/src/semantic.cpp1227
-rw-r--r--tools/porting/src/semantic.h131
-rw-r--r--tools/porting/src/smallobject.cpp59
-rw-r--r--tools/porting/src/smallobject.h182
-rw-r--r--tools/porting/src/src.pro93
-rw-r--r--tools/porting/src/textreplacement.cpp100
-rw-r--r--tools/porting/src/textreplacement.h91
-rw-r--r--tools/porting/src/tokenengine.cpp402
-rw-r--r--tools/porting/src/tokenengine.h391
-rw-r--r--tools/porting/src/tokenizer.cpp491
-rw-r--r--tools/porting/src/tokenizer.h88
-rw-r--r--tools/porting/src/tokenreplacements.cpp371
-rw-r--r--tools/porting/src/tokenreplacements.h154
-rw-r--r--tools/porting/src/tokens.h186
-rw-r--r--tools/porting/src/tokenstreamadapter.h152
-rw-r--r--tools/porting/src/translationunit.cpp102
-rw-r--r--tools/porting/src/translationunit.h93
-rw-r--r--tools/porting/src/treewalker.cpp457
-rw-r--r--tools/porting/src/treewalker.h235
-rw-r--r--tools/qconfig/LICENSE.GPL280
-rw-r--r--tools/qconfig/feature.cpp240
-rw-r--r--tools/qconfig/feature.h125
-rw-r--r--tools/qconfig/featuretreemodel.cpp451
-rw-r--r--tools/qconfig/featuretreemodel.h104
-rw-r--r--tools/qconfig/graphics.h195
-rw-r--r--tools/qconfig/main.cpp552
-rw-r--r--tools/qconfig/qconfig.pro10
-rw-r--r--tools/qdbus/qdbus.pro2
-rw-r--r--tools/qdbus/qdbus/qdbus.cpp483
-rw-r--r--tools/qdbus/qdbus/qdbus.pro10
-rw-r--r--tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.cpp446
-rw-r--r--tools/qdbus/qdbuscpp2xml/qdbuscpp2xml.pro10
-rw-r--r--tools/qdbus/qdbusviewer/Info_mac.plist18
-rw-r--r--tools/qdbus/qdbusviewer/images/qdbusviewer-128.pngbin0 -> 9850 bytes-rw-r--r--tools/qdbus/qdbusviewer/images/qdbusviewer.icnsbin0 -> 146951 bytes-rw-r--r--tools/qdbus/qdbusviewer/images/qdbusviewer.icobin0 -> 355574 bytes-rw-r--r--tools/qdbus/qdbusviewer/images/qdbusviewer.pngbin0 -> 1231 bytes-rw-r--r--tools/qdbus/qdbusviewer/main.cpp85
-rw-r--r--tools/qdbus/qdbusviewer/propertydialog.cpp114
-rw-r--r--tools/qdbus/qdbusviewer/propertydialog.h70
-rw-r--r--tools/qdbus/qdbusviewer/qdbusmodel.cpp336
-rw-r--r--tools/qdbus/qdbusviewer/qdbusmodel.h94
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.cpp509
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.h98
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.pro30
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.qrc6
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.rc1
-rw-r--r--tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp1150
-rw-r--r--tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.pro10
-rw-r--r--tools/qdoc3/JAVATODO.txt28
-rw-r--r--tools/qdoc3/README.TXT6
-rw-r--r--tools/qdoc3/TODO.txt96
-rw-r--r--tools/qdoc3/apigenerator.cpp150
-rw-r--r--tools/qdoc3/apigenerator.h65
-rw-r--r--tools/qdoc3/archiveextractor.cpp108
-rw-r--r--tools/qdoc3/archiveextractor.h78
-rw-r--r--tools/qdoc3/atom.cpp357
-rw-r--r--tools/qdoc3/atom.h200
-rw-r--r--tools/qdoc3/bookgenerator.cpp64
-rw-r--r--tools/qdoc3/bookgenerator.h64
-rw-r--r--tools/qdoc3/ccodeparser.cpp73
-rw-r--r--tools/qdoc3/ccodeparser.h66
-rw-r--r--tools/qdoc3/codechunk.cpp150
-rw-r--r--tools/qdoc3/codechunk.h123
-rw-r--r--tools/qdoc3/codemarker.cpp538
-rw-r--r--tools/qdoc3/codemarker.h166
-rw-r--r--tools/qdoc3/codeparser.cpp263
-rw-r--r--tools/qdoc3/codeparser.h94
-rw-r--r--tools/qdoc3/command.cpp92
-rw-r--r--tools/qdoc3/command.h60
-rw-r--r--tools/qdoc3/config.cpp892
-rw-r--r--tools/qdoc3/config.h165
-rw-r--r--tools/qdoc3/cppcodemarker.cpp1009
-rw-r--r--tools/qdoc3/cppcodemarker.h91
-rw-r--r--tools/qdoc3/cppcodeparser.cpp2014
-rw-r--r--tools/qdoc3/cppcodeparser.h167
-rw-r--r--tools/qdoc3/cpptoqsconverter.cpp415
-rw-r--r--tools/qdoc3/cpptoqsconverter.h88
-rw-r--r--tools/qdoc3/dcfsection.cpp111
-rw-r--r--tools/qdoc3/dcfsection.h94
-rw-r--r--tools/qdoc3/doc.cpp5036
-rw-r--r--tools/qdoc3/doc.h315
-rw-r--r--tools/qdoc3/documentation.pri5
-rw-r--r--tools/qdoc3/editdistance.cpp111
-rw-r--r--tools/qdoc3/editdistance.h59
-rw-r--r--tools/qdoc3/generator.cpp995
-rw-r--r--tools/qdoc3/generator.h177
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp653
-rw-r--r--tools/qdoc3/helpprojectwriter.h110
-rw-r--r--tools/qdoc3/htmlgenerator.cpp3195
-rw-r--r--tools/qdoc3/htmlgenerator.h253
-rw-r--r--tools/qdoc3/jambiapiparser.cpp547
-rw-r--r--tools/qdoc3/jambiapiparser.h99
-rw-r--r--tools/qdoc3/javacodemarker.cpp201
-rw-r--r--tools/qdoc3/javacodemarker.h80
-rw-r--r--tools/qdoc3/javadocgenerator.cpp453
-rw-r--r--tools/qdoc3/javadocgenerator.h95
-rw-r--r--tools/qdoc3/linguistgenerator.cpp245
-rw-r--r--tools/qdoc3/linguistgenerator.h85
-rw-r--r--tools/qdoc3/location.cpp401
-rw-r--r--tools/qdoc3/location.h131
-rw-r--r--tools/qdoc3/loutgenerator.cpp63
-rw-r--r--tools/qdoc3/loutgenerator.h67
-rw-r--r--tools/qdoc3/main.cpp496
-rw-r--r--tools/qdoc3/mangenerator.cpp228
-rw-r--r--tools/qdoc3/mangenerator.h79
-rw-r--r--tools/qdoc3/node.cpp1024
-rw-r--r--tools/qdoc3/node.h587
-rw-r--r--tools/qdoc3/openedlist.cpp228
-rw-r--r--tools/qdoc3/openedlist.h91
-rw-r--r--tools/qdoc3/pagegenerator.cpp219
-rw-r--r--tools/qdoc3/pagegenerator.h85
-rw-r--r--tools/qdoc3/plaincodemarker.cpp139
-rw-r--r--tools/qdoc3/plaincodemarker.h79
-rw-r--r--tools/qdoc3/polyarchiveextractor.cpp94
-rw-r--r--tools/qdoc3/polyarchiveextractor.h70
-rw-r--r--tools/qdoc3/polyuncompressor.cpp109
-rw-r--r--tools/qdoc3/polyuncompressor.h71
-rw-r--r--tools/qdoc3/qdoc3.pro108
-rw-r--r--tools/qdoc3/qsakernelparser.cpp186
-rw-r--r--tools/qdoc3/qsakernelparser.h77
-rw-r--r--tools/qdoc3/qscodemarker.cpp385
-rw-r--r--tools/qdoc3/qscodemarker.h80
-rw-r--r--tools/qdoc3/qscodeparser.cpp944
-rw-r--r--tools/qdoc3/qscodeparser.h128
-rw-r--r--tools/qdoc3/quoter.cpp369
-rw-r--r--tools/qdoc3/quoter.h89
-rw-r--r--tools/qdoc3/separator.cpp69
-rw-r--r--tools/qdoc3/separator.h57
-rw-r--r--tools/qdoc3/sgmlgenerator.cpp63
-rw-r--r--tools/qdoc3/sgmlgenerator.h67
-rw-r--r--tools/qdoc3/test/arthurtext.qdocconf6
-rw-r--r--tools/qdoc3/test/assistant.qdocconf45
-rw-r--r--tools/qdoc3/test/carbide-eclipse-integration.qdocconf12
-rw-r--r--tools/qdoc3/test/classic.css131
-rw-r--r--tools/qdoc3/test/compat.qdocconf31
-rw-r--r--tools/qdoc3/test/designer.qdocconf51
-rw-r--r--tools/qdoc3/test/eclipse-integration.qdocconf13
-rw-r--r--tools/qdoc3/test/jambi.qdocconf47
-rw-r--r--tools/qdoc3/test/linguist.qdocconf47
-rw-r--r--tools/qdoc3/test/macros.qdocconf27
-rw-r--r--tools/qdoc3/test/qmake.qdocconf40
-rw-r--r--tools/qdoc3/test/qt-api-only-with-xcode.qdocconf29
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf30
-rw-r--r--tools/qdoc3/test/qt-build-docs-with-xcode.qdocconf3
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf109
-rw-r--r--tools/qdoc3/test/qt-cpp-ignore.qdocconf87
-rw-r--r--tools/qdoc3/test/qt-defines.qdocconf26
-rw-r--r--tools/qdoc3/test/qt-for-jambi.qdocconf12
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf32
-rw-r--r--tools/qdoc3/test/qt-inc.qdocconf146
-rw-r--r--tools/qdoc3/test/qt-linguist.qdocconf4
-rw-r--r--tools/qdoc3/test/qt-webxml.qdocconf11
-rw-r--r--tools/qdoc3/test/qt-with-extensions.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-with-xcode.qdocconf3
-rw-r--r--tools/qdoc3/test/qt.qdocconf115
-rw-r--r--tools/qdoc3/test/standalone-eclipse-integration.qdocconf11
-rw-r--r--tools/qdoc3/text.cpp270
-rw-r--r--tools/qdoc3/text.h106
-rw-r--r--tools/qdoc3/tokenizer.cpp753
-rw-r--r--tools/qdoc3/tokenizer.h183
-rw-r--r--tools/qdoc3/tr.h60
-rw-r--r--tools/qdoc3/tree.cpp2012
-rw-r--r--tools/qdoc3/tree.h157
-rw-r--r--tools/qdoc3/uncompressor.cpp108
-rw-r--r--tools/qdoc3/uncompressor.h79
-rw-r--r--tools/qdoc3/webxmlgenerator.cpp1195
-rw-r--r--tools/qdoc3/webxmlgenerator.h122
-rw-r--r--tools/qdoc3/yyindent.cpp1190
-rw-r--r--tools/qev/README2
-rw-r--r--tools/qev/qev.cpp66
-rw-r--r--tools/qev/qev.pro13
-rw-r--r--tools/qtconcurrent/codegenerator/codegenerator.pri5
-rw-r--r--tools/qtconcurrent/codegenerator/example/example.pro9
-rw-r--r--tools/qtconcurrent/codegenerator/example/main.cpp83
-rw-r--r--tools/qtconcurrent/codegenerator/src/codegenerator.cpp140
-rw-r--r--tools/qtconcurrent/codegenerator/src/codegenerator.h204
-rw-r--r--tools/qtconcurrent/generaterun/main.cpp422
-rw-r--r--tools/qtconcurrent/generaterun/run.pro9
-rw-r--r--tools/qtconfig/LICENSE.GPL280
-rw-r--r--tools/qtconfig/colorbutton.cpp206
-rw-r--r--tools/qtconfig/colorbutton.h90
-rw-r--r--tools/qtconfig/images/appicon.pngbin0 -> 2238 bytes-rw-r--r--tools/qtconfig/main.cpp56
-rw-r--r--tools/qtconfig/mainwindow.cpp1073
-rw-r--r--tools/qtconfig/mainwindow.h110
-rw-r--r--tools/qtconfig/mainwindowbase.cpp250
-rw-r--r--tools/qtconfig/mainwindowbase.h95
-rw-r--r--tools/qtconfig/mainwindowbase.ui1384
-rw-r--r--tools/qtconfig/paletteeditoradvanced.cpp591
-rw-r--r--tools/qtconfig/paletteeditoradvanced.h110
-rw-r--r--tools/qtconfig/paletteeditoradvancedbase.cpp144
-rw-r--r--tools/qtconfig/paletteeditoradvancedbase.h78
-rw-r--r--tools/qtconfig/paletteeditoradvancedbase.ui617
-rw-r--r--tools/qtconfig/previewframe.cpp104
-rw-r--r--tools/qtconfig/previewframe.h84
-rw-r--r--tools/qtconfig/previewwidget.cpp84
-rw-r--r--tools/qtconfig/previewwidget.h62
-rw-r--r--tools/qtconfig/previewwidgetbase.cpp88
-rw-r--r--tools/qtconfig/previewwidgetbase.h68
-rw-r--r--tools/qtconfig/previewwidgetbase.ui340
-rw-r--r--tools/qtconfig/qtconfig.pro28
-rw-r--r--tools/qtconfig/qtconfig.qrc5
-rw-r--r--tools/qtconfig/translations/translations.pro13
-rw-r--r--tools/qtestlib/qtestlib.pro4
-rw-r--r--tools/qtestlib/updater/main.cpp178
-rw-r--r--tools/qtestlib/updater/updater.pro10
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp485
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.h86
-rw-r--r--tools/qtestlib/wince/cetest/bootstrapped.pri38
-rw-r--r--tools/qtestlib/wince/cetest/cetest.pro47
-rw-r--r--tools/qtestlib/wince/cetest/deployment.cpp267
-rw-r--r--tools/qtestlib/wince/cetest/deployment.h75
-rw-r--r--tools/qtestlib/wince/cetest/main.cpp351
-rw-r--r--tools/qtestlib/wince/cetest/qmake_include.pri7
-rw-r--r--tools/qtestlib/wince/cetest/remoteconnection.cpp68
-rw-r--r--tools/qtestlib/wince/cetest/remoteconnection.h82
-rw-r--r--tools/qtestlib/wince/remotelib/commands.cpp120
-rw-r--r--tools/qtestlib/wince/remotelib/commands.h51
-rw-r--r--tools/qtestlib/wince/remotelib/remotelib.pro15
-rw-r--r--tools/qtestlib/wince/wince.pro2
-rw-r--r--tools/qvfb/ClamshellPhone.qrc5
-rw-r--r--tools/qvfb/ClamshellPhone.skin/ClamshellPhone.skin30
-rw-r--r--tools/qvfb/ClamshellPhone.skin/ClamshellPhone1-5-closed.pngbin0 -> 68200 bytes-rw-r--r--tools/qvfb/ClamshellPhone.skin/ClamshellPhone1-5-pressed.pngbin0 -> 113907 bytes-rw-r--r--tools/qvfb/ClamshellPhone.skin/ClamshellPhone1-5.pngbin0 -> 113450 bytes-rw-r--r--tools/qvfb/ClamshellPhone.skin/defaultbuttons.conf78
-rw-r--r--tools/qvfb/DualScreenPhone.skin/DualScreen-pressed.pngbin0 -> 115575 bytes-rw-r--r--tools/qvfb/DualScreenPhone.skin/DualScreen.pngbin0 -> 104711 bytes-rw-r--r--tools/qvfb/DualScreenPhone.skin/DualScreenPhone.skin29
-rw-r--r--tools/qvfb/DualScreenPhone.skin/defaultbuttons.conf78
-rw-r--r--tools/qvfb/LICENSE.GPL280
-rw-r--r--tools/qvfb/PDAPhone.qrc5
-rw-r--r--tools/qvfb/PDAPhone.skin/PDAPhone.skin18
-rw-r--r--tools/qvfb/PDAPhone.skin/defaultbuttons.conf36
-rw-r--r--tools/qvfb/PDAPhone.skin/finger.pngbin0 -> 40343 bytes-rw-r--r--tools/qvfb/PDAPhone.skin/pda_down.pngbin0 -> 52037 bytes-rw-r--r--tools/qvfb/PDAPhone.skin/pda_up.pngbin0 -> 100615 bytes-rw-r--r--tools/qvfb/PortableMedia.qrc5
-rw-r--r--tools/qvfb/PortableMedia.skin/PortableMedia.skin14
-rw-r--r--tools/qvfb/PortableMedia.skin/defaultbuttons.conf23
-rw-r--r--tools/qvfb/PortableMedia.skin/portablemedia-pressed.pngbin0 -> 6183 bytes-rw-r--r--tools/qvfb/PortableMedia.skin/portablemedia.pngbin0 -> 6182 bytes-rw-r--r--tools/qvfb/PortableMedia.skin/portablemedia.xcfbin0 -> 41592 bytes-rw-r--r--tools/qvfb/README51
-rw-r--r--tools/qvfb/S60-QVGA-Candybar.qrc5
-rw-r--r--tools/qvfb/S60-QVGA-Candybar.skin/S60-QVGA-Candybar-down.pngbin0 -> 161184 bytes-rw-r--r--tools/qvfb/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.pngbin0 -> 156789 bytes-rw-r--r--tools/qvfb/S60-QVGA-Candybar.skin/S60-QVGA-Candybar.skin15
-rw-r--r--tools/qvfb/S60-QVGA-Candybar.skin/defaultbuttons.conf78
-rw-r--r--tools/qvfb/S60-nHD-Touchscreen.qrc5
-rw-r--r--tools/qvfb/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen-down.pngbin0 -> 241501 bytes-rw-r--r--tools/qvfb/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.pngbin0 -> 240615 bytes-rw-r--r--tools/qvfb/S60-nHD-Touchscreen.skin/S60-nHD-Touchscreen.skin10
-rw-r--r--tools/qvfb/S60-nHD-Touchscreen.skin/defaultbuttons.conf53
-rw-r--r--tools/qvfb/SmartPhone.qrc5
-rw-r--r--tools/qvfb/SmartPhone.skin/SmartPhone-pressed.pngbin0 -> 111515 bytes-rw-r--r--tools/qvfb/SmartPhone.skin/SmartPhone.pngbin0 -> 101750 bytes-rw-r--r--tools/qvfb/SmartPhone.skin/SmartPhone.skin28
-rw-r--r--tools/qvfb/SmartPhone.skin/defaultbuttons.conf78
-rw-r--r--tools/qvfb/SmartPhone2.qrc5
-rw-r--r--tools/qvfb/SmartPhone2.skin/SmartPhone2-pressed.pngbin0 -> 134749 bytes-rw-r--r--tools/qvfb/SmartPhone2.skin/SmartPhone2.pngbin0 -> 121915 bytes-rw-r--r--tools/qvfb/SmartPhone2.skin/SmartPhone2.skin25
-rw-r--r--tools/qvfb/SmartPhone2.skin/defaultbuttons.conf52
-rw-r--r--tools/qvfb/SmartPhoneWithButtons.qrc5
-rw-r--r--tools/qvfb/SmartPhoneWithButtons.skin/SmartPhoneWithButtons-pressed.pngbin0 -> 103838 bytes-rw-r--r--tools/qvfb/SmartPhoneWithButtons.skin/SmartPhoneWithButtons.pngbin0 -> 88470 bytes-rw-r--r--tools/qvfb/SmartPhoneWithButtons.skin/SmartPhoneWithButtons.skin31
-rw-r--r--tools/qvfb/SmartPhoneWithButtons.skin/defaultbuttons.conf103
-rw-r--r--tools/qvfb/TouchscreenPhone.qrc5
-rw-r--r--tools/qvfb/TouchscreenPhone.skin/TouchscreenPhone-pressed.pngbin0 -> 88599 bytes-rw-r--r--tools/qvfb/TouchscreenPhone.skin/TouchscreenPhone.pngbin0 -> 61809 bytes-rw-r--r--tools/qvfb/TouchscreenPhone.skin/TouchscreenPhone.skin16
-rw-r--r--tools/qvfb/TouchscreenPhone.skin/defaultbuttons.conf45
-rw-r--r--tools/qvfb/Trolltech-Keypad.qrc5
-rw-r--r--tools/qvfb/Trolltech-Keypad.skin/Trolltech-Keypad-closed.pngbin0 -> 69447 bytes-rw-r--r--tools/qvfb/Trolltech-Keypad.skin/Trolltech-Keypad-down.pngbin0 -> 242107 bytes-rw-r--r--tools/qvfb/Trolltech-Keypad.skin/Trolltech-Keypad.pngbin0 -> 230638 bytes-rw-r--r--tools/qvfb/Trolltech-Keypad.skin/Trolltech-Keypad.skin35
-rw-r--r--tools/qvfb/Trolltech-Keypad.skin/defaultbuttons.conf142
-rw-r--r--tools/qvfb/Trolltech-Touchscreen.qrc5
-rw-r--r--tools/qvfb/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.pngbin0 -> 133117 bytes-rw-r--r--tools/qvfb/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.pngbin0 -> 133180 bytes-rw-r--r--tools/qvfb/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin17
-rw-r--r--tools/qvfb/Trolltech-Touchscreen.skin/defaultbuttons.conf53
-rw-r--r--tools/qvfb/config.ui2528
-rw-r--r--tools/qvfb/gammaview.h59
-rw-r--r--tools/qvfb/images/logo-nt.pngbin0 -> 1965 bytes-rw-r--r--tools/qvfb/images/logo.pngbin0 -> 2238 bytes-rw-r--r--tools/qvfb/main.cpp155
-rw-r--r--tools/qvfb/pda.qrc5
-rw-r--r--tools/qvfb/pda.skin14
-rw-r--r--tools/qvfb/pda_down.pngbin0 -> 102655 bytes-rw-r--r--tools/qvfb/pda_up.pngbin0 -> 100615 bytes-rw-r--r--tools/qvfb/qanimationwriter.cpp451
-rw-r--r--tools/qvfb/qanimationwriter.h71
-rw-r--r--tools/qvfb/qtopiakeysym.h67
-rw-r--r--tools/qvfb/qvfb.cpp1137
-rw-r--r--tools/qvfb/qvfb.h159
-rw-r--r--tools/qvfb/qvfb.pro74
-rw-r--r--tools/qvfb/qvfb.qrc7
-rw-r--r--tools/qvfb/qvfbmmap.cpp222
-rw-r--r--tools/qvfb/qvfbmmap.h91
-rw-r--r--tools/qvfb/qvfbprotocol.cpp193
-rw-r--r--tools/qvfb/qvfbprotocol.h173
-rw-r--r--tools/qvfb/qvfbratedlg.cpp103
-rw-r--r--tools/qvfb/qvfbratedlg.h74
-rw-r--r--tools/qvfb/qvfbshmem.cpp314
-rw-r--r--tools/qvfb/qvfbshmem.h90
-rw-r--r--tools/qvfb/qvfbview.cpp824
-rw-r--r--tools/qvfb/qvfbview.h209
-rw-r--r--tools/qvfb/qvfbx11view.cpp388
-rw-r--r--tools/qvfb/qvfbx11view.h121
-rw-r--r--tools/qvfb/translations/translations.pro32
-rw-r--r--tools/qvfb/x11keyfaker.cpp626
-rw-r--r--tools/qvfb/x11keyfaker.h80
-rw-r--r--tools/shared/deviceskin/deviceskin.cpp857
-rw-r--r--tools/shared/deviceskin/deviceskin.h174
-rw-r--r--tools/shared/deviceskin/deviceskin.pri3
-rw-r--r--tools/shared/findwidget/abstractfindwidget.cpp295
-rw-r--r--tools/shared/findwidget/abstractfindwidget.h115
-rw-r--r--tools/shared/findwidget/findwidget.pri4
-rw-r--r--tools/shared/findwidget/findwidget.qrc14
-rw-r--r--tools/shared/findwidget/images/mac/closetab.pngbin0 -> 516 bytes-rw-r--r--tools/shared/findwidget/images/mac/next.pngbin0 -> 1310 bytes-rw-r--r--tools/shared/findwidget/images/mac/previous.pngbin0 -> 1080 bytes-rw-r--r--tools/shared/findwidget/images/mac/searchfind.pngbin0 -> 1836 bytes-rw-r--r--tools/shared/findwidget/images/win/closetab.pngbin0 -> 375 bytes-rw-r--r--tools/shared/findwidget/images/win/next.pngbin0 -> 1038 bytes-rw-r--r--tools/shared/findwidget/images/win/previous.pngbin0 -> 898 bytes-rw-r--r--tools/shared/findwidget/images/win/searchfind.pngbin0 -> 1944 bytes-rw-r--r--tools/shared/findwidget/images/wrap.pngbin0 -> 500 bytes-rw-r--r--tools/shared/findwidget/itemviewfindwidget.cpp317
-rw-r--r--tools/shared/findwidget/itemviewfindwidget.h78
-rw-r--r--tools/shared/findwidget/texteditfindwidget.cpp169
-rw-r--r--tools/shared/findwidget/texteditfindwidget.h73
-rw-r--r--tools/shared/fontpanel/fontpanel.cpp304
-rw-r--r--tools/shared/fontpanel/fontpanel.h108
-rw-r--r--tools/shared/fontpanel/fontpanel.pri3
-rw-r--r--tools/shared/qtgradienteditor/images/down.pngbin0 -> 594 bytes-rw-r--r--tools/shared/qtgradienteditor/images/edit.pngbin0 -> 503 bytes-rw-r--r--tools/shared/qtgradienteditor/images/editdelete.pngbin0 -> 831 bytes-rw-r--r--tools/shared/qtgradienteditor/images/minus.pngbin0 -> 250 bytes-rw-r--r--tools/shared/qtgradienteditor/images/plus.pngbin0 -> 462 bytes-rw-r--r--tools/shared/qtgradienteditor/images/spreadpad.pngbin0 -> 151 bytes-rw-r--r--tools/shared/qtgradienteditor/images/spreadreflect.pngbin0 -> 165 bytes-rw-r--r--tools/shared/qtgradienteditor/images/spreadrepeat.pngbin0 -> 156 bytes-rw-r--r--tools/shared/qtgradienteditor/images/typeconical.pngbin0 -> 937 bytes-rw-r--r--tools/shared/qtgradienteditor/images/typelinear.pngbin0 -> 145 bytes-rw-r--r--tools/shared/qtgradienteditor/images/typeradial.pngbin0 -> 583 bytes-rw-r--r--tools/shared/qtgradienteditor/images/up.pngbin0 -> 692 bytes-rw-r--r--tools/shared/qtgradienteditor/images/zoomin.pngbin0 -> 1208 bytes-rw-r--r--tools/shared/qtgradienteditor/images/zoomout.pngbin0 -> 1226 bytes-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.cpp278
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.h86
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.pri4
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.cpp1124
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.h124
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.cpp355
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.h87
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.ui121
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.cpp954
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.h111
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.pri33
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.qrc18
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.ui1377
-rw-r--r--tools/shared/qtgradienteditor/qtgradientmanager.cpp135
-rw-r--r--tools/shared/qtgradienteditor/qtgradientmanager.h92
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp726
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.h106
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp480
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.h121
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.cpp1156
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.h115
-rw-r--r--tools/shared/qtgradienteditor/qtgradientutils.cpp420
-rw-r--r--tools/shared/qtgradienteditor/qtgradientutils.h66
-rw-r--r--tools/shared/qtgradienteditor/qtgradientview.cpp292
-rw-r--r--tools/shared/qtgradienteditor/qtgradientview.h99
-rw-r--r--tools/shared/qtgradienteditor/qtgradientview.ui135
-rw-r--r--tools/shared/qtgradienteditor/qtgradientviewdialog.cpp89
-rw-r--r--tools/shared/qtgradienteditor/qtgradientviewdialog.h75
-rw-r--r--tools/shared/qtgradienteditor/qtgradientviewdialog.ui121
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.cpp817
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.h120
-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-arrow.pngbin0 -> 171 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-busy.pngbin0 -> 201 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-closedhand.pngbin0 -> 147 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-cross.pngbin0 -> 130 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-forbidden.pngbin0 -> 199 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-hand.pngbin0 -> 159 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-hsplit.pngbin0 -> 155 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-ibeam.pngbin0 -> 124 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-openhand.pngbin0 -> 160 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-sizeall.pngbin0 -> 174 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-sizeb.pngbin0 -> 161 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-sizef.pngbin0 -> 161 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-sizeh.pngbin0 -> 145 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-sizev.pngbin0 -> 141 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-uparrow.pngbin0 -> 132 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-vsplit.pngbin0 -> 161 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-wait.pngbin0 -> 172 bytes-rw-r--r--tools/shared/qtpropertybrowser/images/cursor-whatsthis.pngbin0 -> 191 bytes-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp633
-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h89
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.cpp2591
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.h401
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp535
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h80
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.cpp1965
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.h315
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.pri19
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.qrc23
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp434
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h161
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp6493
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.h750
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp1048
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.h138
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.cpp2282
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.h181
-rw-r--r--tools/shared/qttoolbardialog/images/back.pngbin0 -> 678 bytes-rw-r--r--tools/shared/qttoolbardialog/images/down.pngbin0 -> 594 bytes-rw-r--r--tools/shared/qttoolbardialog/images/forward.pngbin0 -> 655 bytes-rw-r--r--tools/shared/qttoolbardialog/images/minus.pngbin0 -> 250 bytes-rw-r--r--tools/shared/qttoolbardialog/images/plus.pngbin0 -> 462 bytes-rw-r--r--tools/shared/qttoolbardialog/images/up.pngbin0 -> 692 bytes-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.cpp1877
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.h138
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.pri6
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.qrc10
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.ui207
-rw-r--r--tools/tools.pro30
-rw-r--r--tools/xmlpatterns/main.cpp386
-rw-r--r--tools/xmlpatterns/main.h75
-rw-r--r--tools/xmlpatterns/qapplicationargument.cpp344
-rw-r--r--tools/xmlpatterns/qapplicationargument_p.h100
-rw-r--r--tools/xmlpatterns/qapplicationargumentparser.cpp1028
-rw-r--r--tools/xmlpatterns/qapplicationargumentparser_p.h111
-rw-r--r--tools/xmlpatterns/qcoloringmessagehandler.cpp193
-rw-r--r--tools/xmlpatterns/qcoloringmessagehandler_p.h99
-rw-r--r--tools/xmlpatterns/qcoloroutput.cpp350
-rw-r--r--tools/xmlpatterns/qcoloroutput_p.h134
-rw-r--r--tools/xmlpatterns/xmlpatterns.pro31
-rw-r--r--translations/README4
-rw-r--r--translations/assistant_adp_de.qmbin0 -> 23139 bytes-rw-r--r--translations/assistant_adp_de.ts1611
-rw-r--r--translations/assistant_adp_ja.qmbin0 -> 18357 bytes-rw-r--r--translations/assistant_adp_ja.ts1059
-rw-r--r--translations/assistant_adp_pl.qmbin0 -> 22726 bytes-rw-r--r--translations/assistant_adp_pl.ts1006
-rw-r--r--translations/assistant_adp_untranslated.ts991
-rw-r--r--translations/assistant_adp_zh_CN.qmbin0 -> 16631 bytes-rw-r--r--translations/assistant_adp_zh_CN.ts1004
-rw-r--r--translations/assistant_adp_zh_TW.qmbin0 -> 16555 bytes-rw-r--r--translations/assistant_adp_zh_TW.ts817
-rw-r--r--translations/assistant_de.qmbin0 -> 20332 bytes-rw-r--r--translations/assistant_de.ts1196
-rw-r--r--translations/assistant_ja.ts1118
-rw-r--r--translations/assistant_pl.qmbin0 -> 18457 bytes-rw-r--r--translations/assistant_pl.ts1182
-rw-r--r--translations/assistant_untranslated.ts1118
-rw-r--r--translations/assistant_zh_CN.qmbin0 -> 15595 bytes-rw-r--r--translations/assistant_zh_CN.ts1193
-rw-r--r--translations/assistant_zh_TW.qmbin0 -> 15567 bytes-rw-r--r--translations/assistant_zh_TW.ts983
-rw-r--r--translations/designer_de.qmbin0 -> 152455 bytes-rw-r--r--translations/designer_de.ts6994
-rw-r--r--translations/designer_ja.qmbin0 -> 105573 bytes-rw-r--r--translations/designer_ja.ts8844
-rw-r--r--translations/designer_pl.qmbin0 -> 150544 bytes-rw-r--r--translations/designer_pl.ts7038
-rw-r--r--translations/designer_untranslated.ts6958
-rw-r--r--translations/designer_zh_CN.qmbin0 -> 113745 bytes-rw-r--r--translations/designer_zh_CN.ts7864
-rw-r--r--translations/designer_zh_TW.qmbin0 -> 113449 bytes-rw-r--r--translations/designer_zh_TW.ts7609
-rw-r--r--translations/linguist_de.qmbin0 -> 47074 bytes-rw-r--r--translations/linguist_de.ts2787
-rw-r--r--translations/linguist_fr.ts1966
-rw-r--r--translations/linguist_ja.qmbin0 -> 30494 bytes-rw-r--r--translations/linguist_ja.ts2765
-rw-r--r--translations/linguist_pl.qmbin0 -> 50952 bytes-rw-r--r--translations/linguist_pl.ts2004
-rw-r--r--translations/linguist_untranslated.ts1966
-rw-r--r--translations/linguist_zh_CN.qmbin0 -> 33492 bytes-rw-r--r--translations/linguist_zh_CN.ts2728
-rw-r--r--translations/linguist_zh_TW.qmbin0 -> 33735 bytes-rw-r--r--translations/linguist_zh_TW.ts2629
-rw-r--r--translations/polish.qph143
-rw-r--r--translations/qt_ar.qmbin0 -> 58499 bytes-rw-r--r--translations/qt_ar.ts7807
-rw-r--r--translations/qt_de.qmbin0 -> 181913 bytes-rw-r--r--translations/qt_de.ts7714
-rw-r--r--translations/qt_es.qmbin0 -> 117693 bytes-rw-r--r--translations/qt_es.ts8018
-rw-r--r--translations/qt_fr.qmbin0 -> 148544 bytes-rw-r--r--translations/qt_fr.ts8196
-rw-r--r--translations/qt_help_de.qmbin0 -> 9381 bytes-rw-r--r--translations/qt_help_de.ts355
-rw-r--r--translations/qt_help_ja.ts354
-rw-r--r--translations/qt_help_pl.qmbin0 -> 9058 bytes-rw-r--r--translations/qt_help_pl.ts383
-rw-r--r--translations/qt_help_untranslated.ts354
-rw-r--r--translations/qt_help_zh_CN.qmbin0 -> 6434 bytes-rw-r--r--translations/qt_help_zh_CN.ts372
-rw-r--r--translations/qt_help_zh_TW.qmbin0 -> 6384 bytes-rw-r--r--translations/qt_help_zh_TW.ts331
-rw-r--r--translations/qt_iw.qmbin0 -> 55269 bytes-rw-r--r--translations/qt_iw.ts7767
-rw-r--r--translations/qt_ja_JP.qmbin0 -> 64337 bytes-rw-r--r--translations/qt_ja_JP.ts7940
-rw-r--r--translations/qt_pl.qmbin0 -> 143971 bytes-rw-r--r--translations/qt_pl.ts7757
-rw-r--r--translations/qt_pt.qmbin0 -> 78828 bytes-rw-r--r--translations/qt_pt.ts7942
-rw-r--r--translations/qt_ru.qmbin0 -> 60815 bytes-rw-r--r--translations/qt_ru.ts7807
-rw-r--r--translations/qt_sk.qmbin0 -> 79787 bytes-rw-r--r--translations/qt_sk.ts7948
-rw-r--r--translations/qt_sv.qmbin0 -> 73493 bytes-rw-r--r--translations/qt_sv.ts7891
-rw-r--r--translations/qt_uk.qmbin0 -> 81429 bytes-rw-r--r--translations/qt_uk.ts7968
-rw-r--r--translations/qt_untranslated.ts7679
-rw-r--r--translations/qt_zh_CN.qmbin0 -> 118981 bytes-rw-r--r--translations/qt_zh_CN.ts7893
-rw-r--r--translations/qt_zh_TW.qmbin0 -> 118967 bytes-rw-r--r--translations/qt_zh_TW.ts6659
-rw-r--r--translations/qtconfig_pl.qmbin0 -> 17940 bytes-rw-r--r--translations/qtconfig_pl.ts884
-rw-r--r--translations/qtconfig_untranslated.ts866
-rw-r--r--translations/qtconfig_zh_CN.qmbin0 -> 21688 bytes-rw-r--r--translations/qtconfig_zh_CN.ts885
-rw-r--r--translations/qtconfig_zh_TW.qmbin0 -> 20262 bytes-rw-r--r--translations/qtconfig_zh_TW.ts711
-rw-r--r--translations/qvfb_pl.qmbin0 -> 4742 bytes-rw-r--r--translations/qvfb_pl.ts325
-rw-r--r--translations/qvfb_untranslated.ts324
-rw-r--r--translations/qvfb_zh_CN.qmbin0 -> 4853 bytes-rw-r--r--translations/qvfb_zh_CN.ts325
-rw-r--r--translations/qvfb_zh_TW.qmbin0 -> 4853 bytes-rw-r--r--translations/qvfb_zh_TW.ts261
-rw-r--r--translations/translations.pri108
-rw-r--r--util/fixnonlatin1/fixnonlatin1.pro9
-rw-r--r--util/fixnonlatin1/main.cpp102
-rw-r--r--util/gencmap/Makefile46
-rw-r--r--util/gencmap/gencmap.cpp344
-rwxr-xr-xutil/harfbuzz/update-harfbuzz63
-rw-r--r--util/install/archive/archive.pro9
-rw-r--r--util/install/archive/qarchive.cpp471
-rw-r--r--util/install/archive/qarchive.h138
-rw-r--r--util/install/configure_installer.cache30
-rw-r--r--util/install/install.pro9
-rw-r--r--util/install/keygen/keygen.pro13
-rw-r--r--util/install/keygen/keyinfo.cpp164
-rw-r--r--util/install/keygen/keyinfo.h123
-rw-r--r--util/install/keygen/main.cpp250
-rw-r--r--util/install/mac/licensedlg.ui134
-rw-r--r--util/install/mac/licensedlgimpl.cpp65
-rw-r--r--util/install/mac/licensedlgimpl.h55
-rw-r--r--util/install/mac/mac.pro11
-rw-r--r--util/install/mac/main.cpp117
-rw-r--r--util/install/mac/unpackage.icnsbin0 -> 29372 bytes-rw-r--r--util/install/mac/unpackdlg.ui330
-rw-r--r--util/install/mac/unpackdlgimpl.cpp200
-rw-r--r--util/install/mac/unpackdlgimpl.h63
-rw-r--r--util/install/package/main.cpp397
-rw-r--r--util/install/package/package.pro25
-rw-r--r--util/install/win/archive.cpp115
-rw-r--r--util/install/win/archive.h49
-rw-r--r--util/install/win/dialogs/folderdlg.ui184
-rw-r--r--util/install/win/dialogs/folderdlgimpl.cpp119
-rw-r--r--util/install/win/dialogs/folderdlgimpl.h65
-rw-r--r--util/install/win/environment.cpp362
-rw-r--r--util/install/win/environment.h73
-rw-r--r--util/install/win/globalinformation.cpp168
-rw-r--r--util/install/win/globalinformation.h93
-rw-r--r--util/install/win/install-edu.rc3
-rw-r--r--util/install/win/install-eval.rc3
-rw-r--r--util/install/win/install-noncommercial.rc4
-rw-r--r--util/install/win/install-qsa.rc5
-rw-r--r--util/install/win/install.icobin0 -> 2998 bytes-rw-r--r--util/install/win/install.rc4
-rw-r--r--util/install/win/main.cpp100
-rw-r--r--util/install/win/pages/buildpage.ui92
-rw-r--r--util/install/win/pages/configpage.ui474
-rw-r--r--util/install/win/pages/finishpage.ui63
-rw-r--r--util/install/win/pages/folderspage.ui259
-rw-r--r--util/install/win/pages/licenseagreementpage.ui202
-rw-r--r--util/install/win/pages/licensepage.ui264
-rw-r--r--util/install/win/pages/optionspage.ui503
-rw-r--r--util/install/win/pages/pages.cpp349
-rw-r--r--util/install/win/pages/pages.h226
-rw-r--r--util/install/win/pages/progresspage.ui78
-rw-r--r--util/install/win/pages/sidedecoration.ui108
-rw-r--r--util/install/win/pages/sidedecorationimpl.cpp205
-rw-r--r--util/install/win/pages/sidedecorationimpl.h70
-rw-r--r--util/install/win/pages/winintropage.ui39
-rw-r--r--util/install/win/qt.arq3
-rw-r--r--util/install/win/resource.cpp162
-rw-r--r--util/install/win/resource.h77
-rw-r--r--util/install/win/setupwizardimpl.cpp2571
-rw-r--r--util/install/win/setupwizardimpl.h276
-rw-r--r--util/install/win/setupwizardimpl_config.cpp1564
-rw-r--r--util/install/win/shell.cpp472
-rw-r--r--util/install/win/shell.h87
-rw-r--r--util/install/win/uninstaller/quninstall.pro7
-rw-r--r--util/install/win/uninstaller/uninstall.ui167
-rw-r--r--util/install/win/uninstaller/uninstaller.cpp142
-rw-r--r--util/install/win/uninstaller/uninstallimpl.cpp75
-rw-r--r--util/install/win/uninstaller/uninstallimpl.h54
-rw-r--r--util/install/win/win.pro136
-rw-r--r--util/lexgen/README16
-rw-r--r--util/lexgen/configfile.cpp99
-rw-r--r--util/lexgen/configfile.h81
-rw-r--r--util/lexgen/css2-simplified.lexgen93
-rw-r--r--util/lexgen/generator.cpp532
-rw-r--r--util/lexgen/generator.h221
-rw-r--r--util/lexgen/global.h113
-rw-r--r--util/lexgen/lexgen.lexgen24
-rw-r--r--util/lexgen/lexgen.pri3
-rw-r--r--util/lexgen/lexgen.pro6
-rw-r--r--util/lexgen/main.cpp323
-rw-r--r--util/lexgen/nfa.cpp508
-rw-r--r--util/lexgen/nfa.h127
-rw-r--r--util/lexgen/re2nfa.cpp547
-rw-r--r--util/lexgen/re2nfa.h116
-rw-r--r--util/lexgen/test.lexgen9
-rw-r--r--util/lexgen/tests/testdata/backtrack1/input1
-rw-r--r--util/lexgen/tests/testdata/backtrack1/output1
-rw-r--r--util/lexgen/tests/testdata/backtrack1/rules.lexgen3
-rw-r--r--util/lexgen/tests/testdata/backtrack2/input1
-rw-r--r--util/lexgen/tests/testdata/backtrack2/output2
-rw-r--r--util/lexgen/tests/testdata/backtrack2/rules.lexgen4
-rw-r--r--util/lexgen/tests/testdata/casesensitivity/input1
-rw-r--r--util/lexgen/tests/testdata/casesensitivity/output14
-rw-r--r--util/lexgen/tests/testdata/casesensitivity/rules.lexgen7
-rw-r--r--util/lexgen/tests/testdata/comments/input1
-rw-r--r--util/lexgen/tests/testdata/comments/output2
-rw-r--r--util/lexgen/tests/testdata/comments/rules.lexgen2
-rw-r--r--util/lexgen/tests/testdata/dot/input1
-rw-r--r--util/lexgen/tests/testdata/dot/output2
-rw-r--r--util/lexgen/tests/testdata/dot/rules.lexgen3
-rw-r--r--util/lexgen/tests/testdata/negation/input1
-rw-r--r--util/lexgen/tests/testdata/negation/output2
-rw-r--r--util/lexgen/tests/testdata/negation/rules.lexgen3
-rw-r--r--util/lexgen/tests/testdata/quoteinset/input1
-rw-r--r--util/lexgen/tests/testdata/quoteinset/output1
-rw-r--r--util/lexgen/tests/testdata/quoteinset/rules.lexgen2
-rw-r--r--util/lexgen/tests/testdata/quotes/input1
-rw-r--r--util/lexgen/tests/testdata/quotes/output1
-rw-r--r--util/lexgen/tests/testdata/quotes/rules.lexgen2
-rw-r--r--util/lexgen/tests/testdata/simple/input1
-rw-r--r--util/lexgen/tests/testdata/simple/output2
-rw-r--r--util/lexgen/tests/testdata/simple/rules.lexgen3
-rw-r--r--util/lexgen/tests/testdata/subsets1/input1
-rw-r--r--util/lexgen/tests/testdata/subsets1/output2
-rw-r--r--util/lexgen/tests/testdata/subsets1/rules.lexgen3
-rw-r--r--util/lexgen/tests/testdata/subsets2/input1
-rw-r--r--util/lexgen/tests/testdata/subsets2/output3
-rw-r--r--util/lexgen/tests/testdata/subsets2/rules.lexgen4
-rw-r--r--util/lexgen/tests/tests.pro6
-rw-r--r--util/lexgen/tests/tst_lexgen.cpp285
-rw-r--r--util/lexgen/tokenizer.cpp237
-rw-r--r--util/local_database/README1
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py459
-rw-r--r--util/local_database/enumdata.py428
-rw-r--r--util/local_database/formattags.txt23
-rw-r--r--util/local_database/locale.xml9217
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py503
-rw-r--r--util/local_database/testlocales/localemodel.cpp462
-rw-r--r--util/local_database/testlocales/localemodel.h69
-rw-r--r--util/local_database/testlocales/localewidget.cpp89
-rw-r--r--util/local_database/testlocales/localewidget.h59
-rw-r--r--util/local_database/testlocales/main.cpp51
-rw-r--r--util/local_database/testlocales/testlocales.pro4
-rw-r--r--util/local_database/xpathlite.py107
-rw-r--r--util/normalize/README16
-rw-r--r--util/normalize/main.cpp197
-rw-r--r--util/normalize/normalize.pro9
-rw-r--r--util/plugintest/README3
-rw-r--r--util/plugintest/main.cpp66
-rw-r--r--util/plugintest/plugintest.pro4
-rw-r--r--util/qlalr/.gitignore1
-rw-r--r--util/qlalr/README1
-rw-r--r--util/qlalr/compress.cpp286
-rw-r--r--util/qlalr/compress.h60
-rw-r--r--util/qlalr/cppgenerator.cpp732
-rw-r--r--util/qlalr/cppgenerator.h99
-rw-r--r--util/qlalr/doc/qlalr.qdocconf65
-rw-r--r--util/qlalr/doc/src/classic.css97
-rw-r--r--util/qlalr/doc/src/images/qt-logo.pngbin0 -> 1422 bytes-rw-r--r--util/qlalr/doc/src/images/trolltech-logo.pngbin0 -> 1512 bytes-rw-r--r--util/qlalr/doc/src/qlalr.qdoc79
-rw-r--r--util/qlalr/dotgraph.cpp102
-rw-r--r--util/qlalr/dotgraph.h59
-rw-r--r--util/qlalr/examples/dummy-xml/dummy-xml.pro2
-rw-r--r--util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp83
-rw-r--r--util/qlalr/examples/dummy-xml/xml.g202
-rw-r--r--util/qlalr/examples/glsl/build.sh7
-rwxr-xr-xutil/qlalr/examples/glsl/glsl4
-rw-r--r--util/qlalr/examples/glsl/glsl-lex.l201
-rw-r--r--util/qlalr/examples/glsl/glsl.g621
-rw-r--r--util/qlalr/examples/glsl/glsl.pro4
-rw-r--r--util/qlalr/examples/lambda/COMPILE3
-rw-r--r--util/qlalr/examples/lambda/lambda.g41
-rw-r--r--util/qlalr/examples/lambda/lambda.pro3
-rw-r--r--util/qlalr/examples/lambda/main.cpp160
-rw-r--r--util/qlalr/examples/qparser/COMPILE3
-rw-r--r--util/qlalr/examples/qparser/calc.g93
-rw-r--r--util/qlalr/examples/qparser/calc.l20
-rw-r--r--util/qlalr/examples/qparser/qparser.cpp3
-rw-r--r--util/qlalr/examples/qparser/qparser.h111
-rw-r--r--util/qlalr/examples/qparser/qparser.pro4
-rw-r--r--util/qlalr/grammar.cpp123
-rw-r--r--util/qlalr/grammar_p.h119
-rw-r--r--util/qlalr/lalr.cpp783
-rw-r--r--util/qlalr/lalr.g803
-rw-r--r--util/qlalr/lalr.h502
-rw-r--r--util/qlalr/main.cpp185
-rw-r--r--util/qlalr/parsetable.cpp127
-rw-r--r--util/qlalr/parsetable.h59
-rw-r--r--util/qlalr/qlalr.pro21
-rw-r--r--util/qlalr/recognizer.cpp489
-rw-r--r--util/qlalr/recognizer.h111
-rw-r--r--util/qtscriptparser/make-parser.sh15
-rwxr-xr-xutil/scripts/make_qfeatures_dot_h118
-rwxr-xr-xutil/scripts/unix_to_dos16
-rw-r--r--util/unicode/README1
-rw-r--r--util/unicode/codecs/big5/BIG514079
-rw-r--r--util/unicode/codecs/big5/big5.pro6
-rw-r--r--util/unicode/codecs/big5/big5.qrc6
-rw-r--r--util/unicode/codecs/big5/main.cpp158
-rw-r--r--util/unicode/data/ArabicShaping.txt338
-rw-r--r--util/unicode/data/BidiMirroring.txt582
-rw-r--r--util/unicode/data/Blocks.txt185
-rw-r--r--util/unicode/data/CaseFolding.txt1093
-rw-r--r--util/unicode/data/CompositionExclusions.txt197
-rw-r--r--util/unicode/data/DerivedAge.txt867
-rw-r--r--util/unicode/data/GraphemeBreakProperty.txt1039
-rw-r--r--util/unicode/data/LineBreak.txt18542
-rw-r--r--util/unicode/data/NormalizationCorrections.txt48
-rw-r--r--util/unicode/data/Scripts.txt1538
-rw-r--r--util/unicode/data/ScriptsCorrections.txt0
-rw-r--r--util/unicode/data/ScriptsInitial.txt0
-rw-r--r--util/unicode/data/SentenceBreakProperty.txt1664
-rw-r--r--util/unicode/data/SpecialCasing.txt264
-rw-r--r--util/unicode/data/UnicodeData.txt17720
-rw-r--r--util/unicode/data/WordBreakProperty.txt677
-rw-r--r--util/unicode/main.cpp2524
-rw-r--r--util/unicode/unicode.pro2
-rwxr-xr-xutil/unicode/writingSystems.sh19
-rw-r--r--util/unicode/x11/encodings.in71
-rwxr-xr-xutil/unicode/x11/makeencodings135
-rwxr-xr-xutil/webkit/mkdist-webkit314
-rw-r--r--util/xkbdatagen/main.cpp478
-rw-r--r--util/xkbdatagen/xkbdatagen.pro3
30607 files changed, 7349532 insertions, 0 deletions
diff --git a/.commit-template b/.commit-template
new file mode 100644
index 0000000..589ca89
--- /dev/null
+++ b/.commit-template
@@ -0,0 +1,10 @@
+# ===[ Subject ]==========[ one line, please wrap at 72 characters ]===|
+
+# ---[ Details ]---------[ remember extra blank line after subject ]---|
+
+# ---[ Fields ]-----------------[ uncomment and edit as applicable ]---|
+
+#Task-number:
+#Reviewed-by:
+
+# ==================================[ please wrap at 72 characters ]===|
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0de9563
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,174 @@
+# This file is used to ignore files which are generated in the Qt build system
+# ----------------------------------------------------------------------------
+
+examples/*/*/*
+!examples/*/*/*[.]*
+!examples/*/*/README
+examples/*/*/*[.]app
+demos/*/*
+!demos/*/*[.]*
+demos/*/*[.]app
+config.tests/*/*/*
+!config.tests/*/*/*[.]*
+config.tests/*/*/*[.]app
+
+*~
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.swp
+*.rej
+*.so
+*.pbxuser
+*.mode1
+*.mode1v3
+*_pch.h.cpp
+*_resource.rc
+.#*
+*.*#
+core
+.qmake.cache
+.qmake.vars
+*.prl
+tags
+.DS_Store
+*.debug
+Makefile*
+*.prl
+*.app
+*.pro.user
+bin/Qt*.dll
+bin/assistant*
+bin/designer*
+bin/dumpcpp*
+bin/idc*
+bin/linguist*
+bin/lrelease*
+bin/lupdate*
+bin/lconvert*
+bin/moc*
+bin/pixeltool*
+bin/qmake*
+bin/qt3to4*
+bin/qtdemo*
+bin/rcc*
+bin/uic*
+bin/patternist*
+bin/phonon*
+bin/qcollectiongenerator*
+bin/qdbus*
+bin/qhelpconverter*
+bin/qhelpgenerator*
+bin/qtconfig*
+bin/xmlpatterns*
+bin/collectiongenerator
+bin/helpconverter
+bin/helpgenerator
+configure.cache
+config.status
+mkspecs/default
+mkspecs/qconfig.pri
+moc_*.cpp
+qmake/qmake.exe
+qmake/Makefile.bak
+src/corelib/global/qconfig.cpp
+src/corelib/global/qconfig.h
+src/corelib/global/qconfig.h.qmake
+src/tools/uic/qclass_lib_map.h
+ui_*.h
+tests/auto/qprocess/test*/*.exe
+tests/auto/qtcpsocket/stressTest/*.exe
+tests/auto/qprocess/fileWriterProcess/*.exe
+tests/auto/qmake/testdata/quotedfilenames/*.exe
+tests/auto/compilerwarnings/*.exe
+tests/auto/qmake/testdata/quotedfilenames/test.cpp
+tests/auto/qprocess/fileWriterProcess.txt
+.com.apple.timemachine.supported
+tests/auto/qlibrary/libmylib.so*
+tests/auto/qresourceengine/runtime_resource.rcc
+tools/qdoc3/qdoc3*
+tools/qtestlib/updater/updater*
+tools/activeqt/testcon/testcon.tlb
+qrc_*.cpp
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# WebKit temp files
+src/3rdparty/webkit/WebCore/mocinclude.tmp
+src/3rdparty/webkit/includes.txt
+src/3rdparty/webkit/includes2.txt
+
+# Symlinks generated by configure
+tools/qvfb/qvfbhdr.h
+tools/qvfb/qlock_p.h
+tools/qvfb/qlock.cpp
+tools/qvfb/qwssignalhandler.cpp
+tools/qvfb/qwssignalhandler_p.h
+.DS_Store
+.pch
+.rcc
+*.app
+config.status
+config.tests/unix/cups/cups
+config.tests/unix/getaddrinfo/getaddrinfo
+config.tests/unix/getifaddrs/getifaddrs
+config.tests/unix/iconv/iconv
+config.tests/unix/ipv6/ipv6
+config.tests/unix/ipv6ifname/ipv6ifname
+config.tests/unix/largefile/largefile
+config.tests/unix/nis/nis
+config.tests/unix/odbc/odbc
+config.tests/unix/openssl/openssl
+config.tests/unix/stl/stl
+config.tests/unix/zlib/zlib
+config.tests/unix/3dnow/3dnow
+config.tests/unix/mmx/mmx
+config.tests/unix/sse/sse
+config.tests/unix/sse2/sse2
+
+
+
+# Directories to ignore
+# ---------------------
+
+debug
+examples/tools/plugandpaint/plugins
+include/*
+include/*/*
+lib/*
+!lib/fonts
+!lib/README
+plugins/*/*
+release
+tmp
+doc-build
+doc/html/*
+doc/qch
+doc-build
+.rcc
+.pch
+src/corelib/lib
+src/network/lib
+src/xml/lib/
diff --git a/.hgignore b/.hgignore
new file mode 100755
index 0000000..784d507
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,133 @@
+# This file is used to ignore files which are generated in the Qt build system
+# ----------------------------------------------------------------------------
+
+syntax: glob
+
+*~
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.swp
+*.rej
+*.so
+*.pbxuser
+*.mode1
+*.mode1v3
+*.qch
+*.dylib
+*_pch.h.cpp
+*_resource.rc
+.qmake.cache
+*.prl
+tags
+Makefile
+Makefile.Debug
+Makefile.Release
+bin/Qt*.dll
+bin/lconvert*
+bin/xmlpatterns*
+bin/assistant*
+bin/designer*
+bin/dumpcpp*
+bin/idc*
+bin/linguist*
+bin/lrelease*
+bin/lupdate*
+bin/moc*
+bin/pixeltool*
+bin/qmake*
+bin/qt3to4*
+bin/qtdemo*
+bin/rcc*
+bin/uic*
+bin/qcollectiongenerator
+bin/qhelpgenerator
+tools/qdoc3/qdoc3*
+#configure.cache
+mkspecs/default
+mkspecs/qconfig.pri
+moc_*.cpp
+qmake/qmake.exe
+qmake/Makefile.bak
+src/corelib/global/qconfig.cpp
+src/corelib/global/qconfig.h
+src/tools/uic/qclass_lib_map.h
+ui_*.h
+.com.apple.timemachine.supported
+
+# xemacs temporary files
+*.flc
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+
+#
+## Symlinks generated by configure
+tools/qvfb/qvfbhdr.h
+tools/qvfb/qlock_p.h
+tools/qvfb/qlock.cpp
+tools/qvfb/qwssignalhandler.cpp
+tools/qvfb/qwssignalhandler_p.h
+.DS_Store
+.pch
+.rcc
+*.app
+config.status
+config.tests/unix/cups/cups
+config.tests/unix/getaddrinfo/getaddrinfo
+config.tests/unix/getifaddrs/getifaddrs
+config.tests/unix/iconv/iconv
+config.tests/unix/ipv6/ipv6
+config.tests/unix/ipv6ifname/ipv6ifname
+config.tests/unix/largefile/largefile
+config.tests/unix/nis/nis
+config.tests/unix/odbc/odbc
+config.tests/unix/openssl/openssl
+config.tests/unix/stl/stl
+config.tests/unix/zlib/zlib
+config.tests/unix/3dnow/3dnow
+config.tests/unix/mmx/mmx
+config.tests/unix/sse/sse
+config.tests/unix/sse2/sse2
+config.tests/unix/psql-escape/psql-escape
+config.tests/unix/psql/psql
+config.tests/unix/stdint/stdint
+
+# Directories to ignore
+# ---------------------
+
+debug
+examples/tools/plugandpaint/plugins
+include/*
+doc/html*
+include/*/*
+lib/*
+plugins/*/*
+release
+tmp
+doc/html/*
+doc-build
+src/gui/.pch
+src/corelib/.pch
+src/network/.pch
+src/gui/.rcc
+src/sql/.rcc
+src/xml/.rcc
+src/corelib/.rcc
+src/network/.rcc
+.DS_Store
+src/gui/build
+src/corelib/global/qconfig.h.qmake
+*.perspectivev*
+build
+src/gui/qtdir.xcconfig
diff --git a/FAQ b/FAQ
new file mode 100644
index 0000000..c243e5c
--- /dev/null
+++ b/FAQ
@@ -0,0 +1,18 @@
+This is a list of Frequently Asked Questions regarding Qt Release 4.5.0.
+
+Q: I'm using a Unix system and I downloaded the Zip package. However, when I try
+to run the configure script, I get the following error message:
+"bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory"
+A: The problem here is converting files from Windows style line endings (CRLF)
+to Unix style line endings (LF). To avoid this problem, uncompress the file
+again and give the option "-a" to unzip, which will then add the correct line
+endings.
+
+Q: I'm running Windows XP and I downloaded the qt-win-eval-4.5.0-vs2008.exe
+version of Qt. However, when I try to run the examples I get an error saying:
+"The application failed to start because the application configuration is
+incorrect. Reinstalling the application may fix this problem.". I reinstalled
+the package but the error persists. What am I doing wrong?
+A: The problem is an incorrect version of the CRT. Visual studio requires CRT90
+while Windows XP comes with CRT80. To solve this problem, please install the
+2008 CRT redistributable package from Microsoft.
diff --git a/LGPL_EXCEPTION.TXT b/LGPL_EXCEPTION.TXT
new file mode 100644
index 0000000..8d0f85e
--- /dev/null
+++ b/LGPL_EXCEPTION.TXT
@@ -0,0 +1,3 @@
+Nokia Qt LGPL Exception version 1.0
+
+As a special exception to the GNU Lesser General Public License version 2.1, the object code form of a "work that uses the Library" may incorporate material from a header file that is part of the Library. You may distribute such object code under terms of your choice, provided that the incorporated material (i) does not exceed more than 5% of the total size of the Library; and (ii) is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates. \ No newline at end of file
diff --git a/LICENSE.GPL3 b/LICENSE.GPL3
new file mode 100644
index 0000000..13e6f18
--- /dev/null
+++ b/LICENSE.GPL3
@@ -0,0 +1,696 @@
+ GNU GENERAL PUBLIC LICENSE
+
+ The Qt GUI Toolkit is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ Contact: Qt Software Information (qt-info@nokia.com)
+
+ You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ GNU General Public License version 3, which is displayed below.
+
+-------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+-------------------------------------------------------------------------
+
+In addition, as a special exception, Nokia gives permission to link the
+code of its release of Qt with the OpenSSL project's "OpenSSL" library (or
+modified versions of it that use the same license as the "OpenSSL"
+library), and distribute the linked executables. You must comply with the
+GNU General Public License versions 2.0 or 3.0 in all respects for all of
+the code used other than the "OpenSSL" code. If you modify this file, you
+may extend this exception to your version of the file, but you are not
+obligated to do so. If you do not wish to do so, delete this exception
+statement from your version of this file.
diff --git a/LICENSE.LGPL b/LICENSE.LGPL
new file mode 100644
index 0000000..bb95f25
--- /dev/null
+++ b/LICENSE.LGPL
@@ -0,0 +1,514 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+
+ The Qt GUI Toolkit is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ Contact: Qt Software Information (qt-info@nokia.com)
+
+ You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ GNU Lesser General Public License version 2.1, which is displayed below.
+
+-------------------------------------------------------------------------
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/LICENSE.PREVIEW.COMMERCIAL b/LICENSE.PREVIEW.COMMERCIAL
new file mode 100644
index 0000000..7f7b234
--- /dev/null
+++ b/LICENSE.PREVIEW.COMMERCIAL
@@ -0,0 +1,642 @@
+TECHNOLOGY PREVIEW LICENSE AGREEMENT
+
+For individuals and/or legal entities resident in the Americas (North
+America, Central America and South America), the applicable licensing
+terms are specified under the heading "Technology Preview License
+Agreement: The Americas".
+
+For individuals and/or legal entities not resident in The Americas,
+the applicable licensing terms are specified under the heading
+"Technology Preview License Agreement: Rest of the World".
+
+
+TECHNOLOGY PREVIEW LICENSE AGREEMENT: The Americas
+Agreement version 2.3
+
+This Technology Preview License Agreement ("Agreement") is a legal
+agreement between Nokia Inc. ("Nokia"), with its registered office at
+6021 Connection Drive, Irving, TX 75039, U.S.A. and you (either an
+individual or a legal entity) ("Licensee") for the Licensed Software
+(as defined below).
+
+
+1. DEFINITIONS
+
+"Affiliate" of a Party shall mean an entity (i) which is directly or
+indirectly controlling such Party; (ii) which is under the same direct
+or indirect ownership or control as such Party; or (iii) which is
+directly or indirectly owned or controlled by such Party. For these
+purposes, an entity shall be treated as being controlled by another if
+that other entity has fifty percent (50 %) or more of the votes in
+such entity, is able to direct its affairs and/or to control the
+composition of its board of directors or equivalent body.
+
+"Term" shall mean the period of time six (6) months from the later of
+(a) the Effective Date; or (b) the date the Licensed Software was
+initially delivered to Licensee by Nokia. If no specific Effective
+Date is set forth in the Agreement, the Effective Date shall be deemed
+to be the date the Licensed Software was initially delivered to
+Licensee.
+
+"Licensed Software" shall mean the computer software, "online" or
+electronic documentation, associated media and printed materials,
+including the source code, example programs and the documentation
+delivered by Nokia to Licensee in conjunction with this Agreement.
+
+"Party" or "Parties" shall mean Licensee and/or Nokia.
+
+
+2. OWNERSHIP
+
+The Licensed Software is protected by copyright laws and international
+copyright treaties, as well as other intellectual property laws and
+treaties. The Licensed Software is licensed, not sold.
+
+If Licensee provides any findings, proposals, suggestions or other
+feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
+shall own all right, title and interest including the intellectual
+property rights in and to such Feedback, excluding however any
+existing patent rights of Licensee. To the extent Licensee owns or
+controls any patents for such Feedback Licensee hereby grants to Nokia
+and its Affiliates, a worldwide, perpetual, non-transferable,
+sublicensable, royalty-free license to (i) use, copy and modify
+Feedback and to create derivative works thereof, (ii) to make (and
+have made), use, import, sell, offer for sale, lease, dispose, offer
+for disposal or otherwise exploit any products or services of Nokia
+containing Feedback,, and (iii) sublicense all the foregoing rights to
+third party licensees and customers of Nokia and/or its Affiliates.
+
+
+3. VALIDITY OF THE AGREEMENT
+
+By installing, copying, or otherwise using the Licensed Software,
+Licensee agrees to be bound by the terms of this Agreement. If
+Licensee does not agree to the terms of this Agreement, Licensee may
+not install, copy, or otherwise use the Licensed Software. Upon
+Licensee's acceptance of the terms and conditions of this Agreement,
+Nokia grants Licensee the right to use the Licensed Software in the
+manner provided below.
+
+
+4. LICENSES
+
+4.1 Using and Copying
+
+Nokia grants to Licensee a non-exclusive, non-transferable,
+time-limited license to use and copy the Licensed Software for sole
+purpose of evaluating and testing the Licensed Software during the
+Term.
+
+Licensee may install copies of the Licensed Software on an unlimited
+number of computers provided that (a) if an individual, only such
+individual; or (b) if a legal entity only its employees; use the
+Licensed Software for the authorized purposes.
+
+4.2 No Distribution or Modifications
+
+Licensee may not disclose, modify, sell, market, commercialise,
+distribute, loan, rent, lease, or license the Licensed Software or any
+copy of it or use the Licensed Software for any purpose that is not
+expressly granted in this Section 4. Licensee may not alter or remove
+any details of ownership, copyright, trademark or other property right
+connected with the Licensed Software. Licensee may not distribute any
+software statically or dynamically linked with the Licensed Software.
+
+4.3 No Technical Support
+
+Nokia has no obligation to furnish Licensee with any technical support
+whatsoever. Any such support is subject to separate agreement between
+the Parties.
+
+
+5. PRE-RELEASE CODE
+
+The Licensed Software contains pre-release code that is not at the
+level of performance and compatibility of a final, generally
+available, product offering. The Licensed Software may not operate
+correctly and may be substantially modified prior to the first
+commercial product release, if any. Nokia is not obligated to make
+this or any later version of the Licensed Software commercially
+available. The License Software is "Not for Commercial Use" and may
+only be used for the purposes described in Section 4. The Licensed
+Software may not be used in a live operating environment where it may
+be relied upon to perform in the same manner as a commercially
+released product or with data that has not been sufficiently backed
+up.
+
+
+6. THIRD PARTY SOFTWARE
+
+The Licensed Software may provide links to third party libraries or
+code (collectively "Third Party Software") to implement various
+functions. Third Party Software does not comprise part of the
+Licensed Software. In some cases, access to Third Party Software may
+be included along with the Licensed Software delivery as a convenience
+for development and testing only. Such source code and libraries may
+be listed in the ".../src/3rdparty" source tree delivered with the
+Licensed Software or documented in the Licensed Software where the
+Third Party Software is used, as may be amended from time to time, do
+not comprise the Licensed Software. Licensee acknowledges (1) that
+some part of Third Party Software may require additional licensing of
+copyright and patents from the owners of such, and (2) that
+distribution of any of the Licensed Software referencing any portion
+of a Third Party Software may require appropriate licensing from such
+third parties.
+
+
+7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
+
+The Licensed Software is licensed to Licensee "as is". To the maximum
+extent permitted by applicable law, Nokia on behalf of itself and its
+suppliers, disclaims all warranties and conditions, either express or
+implied, including, but not limited to, implied warranties of
+merchantability, fitness for a particular purpose, title and
+non-infringement with regard to the Licensed Software.
+
+
+8. LIMITATION OF LIABILITY
+
+If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable
+to Licensee, whether in contract, tort or any other legal theory,
+based on the Licensed Software, Nokia's entire liability to Licensee
+and Licensee's exclusive remedy shall be, at Nokia's option, either
+(A) return of the price Licensee paid for the Licensed Software, or
+(B) repair or replacement of the Licensed Software, provided Licensee
+returns to Nokia all copies of the Licensed Software as originally
+delivered to Licensee. Nokia shall not under any circumstances be
+liable to Licensee based on failure of the Licensed Software if the
+failure resulted from accident, abuse or misapplication, nor shall
+Nokia under any circumstances be liable for special damages, punitive
+or exemplary damages, damages for loss of profits or interruption of
+business or for loss or corruption of data. Any award of damages from
+Nokia to Licensee shall not exceed the total amount Licensee has paid
+to Nokia in connection with this Agreement.
+
+
+9. CONFIDENTIALITY
+
+Each party acknowledges that during the Term of this Agreement it
+shall have access to information about the other party's business,
+business methods, business plans, customers, business relations,
+technology, and other information, including the terms of this
+Agreement, that is confidential and of great value to the other party,
+and the value of which would be significantly reduced if disclosed to
+third parties (the "Confidential Information"). Accordingly, when a
+party (the "Receiving Party") receives Confidential Information from
+another party (the "Disclosing Party"), the Receiving Party shall, and
+shall obligate its employees and agents and employees and agents of
+its Affiliates to: (i) maintain the Confidential Information in strict
+confidence; (ii) not disclose the Confidential Information to a third
+party without the Disclosing Party's prior written approval; and (iii)
+not, directly or indirectly, use the Confidential Information for any
+purpose other than for exercising its rights and fulfilling its
+responsibilities pursuant to this Agreement. Each party shall take
+reasonable measures to protect the Confidential Information of the
+other party, which measures shall not be less than the measures taken
+by such party to protect its own confidential and proprietary
+information.
+
+"Confidential Information" shall not include information that (a) is
+or becomes generally known to the public through no act or omission of
+the Receiving Party; (b) was in the Receiving Party's lawful
+possession prior to the disclosure hereunder and was not subject to
+limitations on disclosure or use; (c) is developed by the Receiving
+Party without access to the Confidential Information of the Disclosing
+Party or by persons who have not had access to the Confidential
+Information of the Disclosing Party as proven by the written records
+of the Receiving Party; (d) is lawfully disclosed to the Receiving
+Party without restrictions, by a third party not under an obligation
+of confidentiality; or (e) the Receiving Party is legally compelled to
+disclose the information, in which case the Receiving Party shall
+assert the privileged and confidential nature of the information and
+cooperate fully with the Disclosing Party to protect against and
+prevent disclosure of any Confidential Information and to limit the
+scope of disclosure and the dissemination of disclosed Confidential
+Information by all legally available means.
+
+The obligations of the Receiving Party under this Section shall
+continue during the Initial Term and for a period of five (5) years
+after expiration or termination of this Agreement. To the extent that
+the terms of the Non-Disclosure Agreement between Nokia and Licensee
+conflict with the terms of this Section 8, this Section 8 shall be
+controlling over the terms of the Non-Disclosure Agreement.
+
+
+10. GENERAL PROVISIONS
+
+10.1 No Assignment
+
+Licensee shall not be entitled to assign or transfer all or any of its
+rights, benefits and obligations under this Agreement without the
+prior written consent of Nokia, which shall not be unreasonably
+withheld.
+
+10.2 Termination
+
+Nokia may terminate the Agreement at any time immediately upon written
+notice by Nokia to Licensee if Licensee breaches this Agreement.
+
+Upon termination of this Agreement, Licensee shall return to Nokia all
+copies of Licensed Software that were supplied by Nokia. All other
+copies of Licensed Software in the possession or control of Licensee
+must be erased or destroyed. An officer of Licensee must promptly
+deliver to Nokia a written confirmation that this has occurred.
+
+10.3 Surviving Sections
+
+Any terms and conditions that by their nature or otherwise reasonably
+should survive a cancellation or termination of this Agreement shall
+also be deemed to survive. Such terms and conditions include, but are
+not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3,
+10.4, 10.5, 10.6, 10.7, and 10.8 of this Agreement.
+
+10.4 Entire Agreement
+
+This Agreement constitutes the complete agreement between the parties
+and supersedes all prior or contemporaneous discussions,
+representations, and proposals, written or oral, with respect to the
+subject matters discussed herein, with the exception of the
+non-disclosure agreement executed by the parties in connection with
+this Agreement ("Non-Disclosure Agreement"), if any, shall be subject
+to Section 8. No modification of this Agreement shall be effective
+unless contained in a writing executed by an authorized representative
+of each party. No term or condition contained in Licensee's purchase
+order shall apply unless expressly accepted by Nokia in writing. If
+any provision of the Agreement is found void or unenforceable, the
+remainder shall remain valid and enforceable according to its
+terms. If any remedy provided is determined to have failed for its
+essential purpose, all limitations of liability and exclusions of
+damages set forth in this Agreement shall remain in effect.
+
+10.5 Export Control
+
+Licensee acknowledges that the Licensed Software may be subject to
+export control restrictions of various countries. Licensee shall fully
+comply with all applicable export license restrictions and
+requirements as well as with all laws and regulations relating to the
+importation of the Licensed Software and shall procure all necessary
+governmental authorizations, including without limitation, all
+necessary licenses, approvals, permissions or consents, where
+necessary for the re-exportation of the Licensed Software.,
+
+10.6 Governing Law and Legal Venue
+
+This Agreement shall be governed by and construed in accordance with
+the federal laws of the United States of America and the internal laws
+of the State of New York without given effect to any choice of law
+rule that would result in the application of the laws of any other
+jurisdiction. The United Nations Convention on Contracts for the
+International Sale of Goods (CISG) shall not apply. Each Party (a)
+hereby irrevocably submits itself to and consents to the jurisdiction
+of the United States District Court for the Southern District of New
+York (or if such court lacks jurisdiction, the state courts of the
+State of New York) for the purposes of any action, claim, suit or
+proceeding between the Parties in connection with any controversy,
+claim, or dispute arising out of or relating to this Agreement; and
+(b) hereby waives, and agrees not to assert by way of motion, as a
+defense or otherwise, in any such action, claim, suit or proceeding,
+any claim that is not personally subject to the jurisdiction of such
+court(s), that the action, claim, suit or proceeding is brought in an
+inconvenient forum or that the venue of the action, claim, suit or
+proceeding is improper. Notwithstanding the foregoing, nothing in
+this Section 9.6 is intended to, or shall be deemed to, constitute a
+submission or consent to, or selection of, jurisdiction, forum or
+venue for any action for patent infringement, whether or not such
+action relates to this Agreement.
+
+10.7 No Implied License
+
+There are no implied licenses or other implied rights granted under
+this Agreement, and all rights, save for those expressly granted
+hereunder, shall remain with Nokia and its licensors. In addition, no
+licenses or immunities are granted to the combination of the Licensed
+Software with any other software or hardware not delivered by Nokia
+under this Agreement.
+
+10.8 Government End Users
+
+A "U.S. Government End User" shall mean any agency or entity of the
+government of the United States. The following shall apply if Licensee
+is a U.S. Government End User. The Licensed Software is a "commercial
+item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
+consisting of "commercial computer software" and "commercial computer
+software documentation," as such terms are used in 48 C.F.R. 12.212
+(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government
+End Users acquire the Licensed Software with only those rights set
+forth herein. The Licensed Software (including related documentation)
+is provided to U.S. Government End Users: (a) only as a commercial
+end item; and (b) only pursuant to this Agreement.
+
+
+
+
+
+TECHNOLOGY PREVIEW LICENSE AGREEMENT: Rest of the World
+Agreement version 2.3
+
+This Technology Preview License Agreement ("Agreement") is a legal
+agreement between Nokia Corporation ("Nokia"), with its registered
+office at Keilalahdentie 4, 02150 Espoo, Finland and you (either an
+individual or a legal entity) ("Licensee") for the Licensed Software
+(as defined below).
+
+1. DEFINITIONS
+
+"Affiliate" of a Party shall mean an entity (i) which is directly or
+indirectly controlling such Party; (ii) which is under the same direct
+or indirect ownership or control as such Party; or (iii) which is
+directly or indirectly owned or controlled by such Party. For these
+purposes, an entity shall be treated as being controlled by another if
+that other entity has fifty percent (50 %) or more of the votes in
+such entity, is able to direct its affairs and/or to control the
+composition of its board of directors or equivalent body.
+
+"Term" shall mean the period of time six (6) months from the later of
+(a) the Effective Date; or (b) the date the Licensed Software was
+initially delivered to Licensee by Nokia. If no specific Effective
+Date is set forth in the Agreement, the Effective Date shall be deemed
+to be the date the Licensed Software was initially delivered to
+Licensee.
+
+"Licensed Software" shall mean the computer software, "online" or
+electronic documentation, associated media and printed materials,
+including the source code, example programs and the documentation
+delivered by Nokia to Licensee in conjunction with this Agreement.
+
+"Party" or "Parties" shall mean Licensee and/or Nokia.
+
+
+2. OWNERSHIP
+
+The Licensed Software is protected by copyright laws and international
+copyright treaties, as well as other intellectual property laws and
+treaties. The Licensed Software is licensed, not sold.
+
+If Licensee provides any findings, proposals, suggestions or other
+feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
+shall own all right, title and interest including the intellectual
+property rights in and to such Feedback, excluding however any
+existing patent rights of Licensee. To the extent Licensee owns or
+controls any patents for such Feedback Licensee hereby grants to Nokia
+and its Affiliates, a worldwide, perpetual, non-transferable,
+sublicensable, royalty-free license to (i) use, copy and modify
+Feedback and to create derivative works thereof, (ii) to make (and
+have made), use, import, sell, offer for sale, lease, dispose, offer
+for disposal or otherwise exploit any products or services of Nokia
+containing Feedback,, and (iii) sublicense all the foregoing rights to
+third party licensees and customers of Nokia and/or its Affiliates.
+
+
+3. VALIDITY OF THE AGREEMENT
+
+By installing, copying, or otherwise using the Licensed Software,
+Licensee agrees to be bound by the terms of this Agreement. If
+Licensee does not agree to the terms of this Agreement, Licensee may
+not install, copy, or otherwise use the Licensed Software. Upon
+Licensee's acceptance of the terms and conditions of this Agreement,
+Nokia grants Licensee the right to use the Licensed Software in the
+manner provided below.
+
+
+4. LICENSES
+
+4.1 Using and Copying
+
+Nokia grants to Licensee a non-exclusive, non-transferable,
+time-limited license to use and copy the Licensed Software for sole
+purpose of evaluating and testing the Licensed Software during the
+Term.
+
+Licensee may install copies of the Licensed Software on an unlimited
+number of computers provided that (a) if an individual, only such
+individual; or (b) if a legal entity only its employees; use the
+Licensed Software for the authorized purposes.
+
+4.2 No Distribution or Modifications
+
+Licensee may not disclose, modify, sell, market, commercialise,
+distribute, loan, rent, lease, or license the Licensed Software or any
+copy of it or use the Licensed Software for any purpose that is not
+expressly granted in this Section 4. Licensee may not alter or remove
+any details of ownership, copyright, trademark or other property right
+connected with the Licensed Software. Licensee may not distribute any
+software statically or dynamically linked with the Licensed Software.
+
+4.3 No Technical Support
+
+Nokia has no obligation to furnish Licensee with any technical support
+whatsoever. Any such support is subject to separate agreement between
+the Parties.
+
+
+5. PRE-RELEASE CODE
+
+The Licensed Software contains pre-release code that is not at the
+level of performance and compatibility of a final, generally
+available, product offering. The Licensed Software may not operate
+correctly and may be substantially modified prior to the first
+commercial product release, if any. Nokia is not obligated to make
+this or any later version of the Licensed Software commercially
+available. The License Software is "Not for Commercial Use" and may
+only be used for the purposes described in Section 4. The Licensed
+Software may not be used in a live operating environment where it may
+be relied upon to perform in the same manner as a commercially
+released product or with data that has not been sufficiently backed
+up.
+
+
+6. THIRD PARTY SOFTWARE
+
+The Licensed Software may provide links to third party libraries or
+code (collectively "Third Party Software") to implement various
+functions. Third Party Software does not comprise part of the
+Licensed Software. In some cases, access to Third Party Software may
+be included along with the Licensed Software delivery as a convenience
+for development and testing only. Such source code and libraries may
+be listed in the ".../src/3rdparty" source tree delivered with the
+Licensed Software or documented in the Licensed Software where the
+Third Party Software is used, as may be amended from time to time, do
+not comprise the Licensed Software. Licensee acknowledges (1) that
+some part of Third Party Software may require additional licensing of
+copyright and patents from the owners of such, and (2) that
+distribution of any of the Licensed Software referencing any portion
+of a Third Party Software may require appropriate licensing from such
+third parties.
+
+
+7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
+
+The Licensed Software is licensed to Licensee "as is". To the maximum
+extent permitted by applicable law, Nokia on behalf of itself and its
+suppliers, disclaims all warranties and conditions, either express or
+implied, including, but not limited to, implied warranties of
+merchantability, fitness for a particular purpose, title and
+non-infringement with regard to the Licensed Software.
+
+
+8. LIMITATION OF LIABILITY
+
+If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable
+to Licensee, whether in contract, tort or any other legal theory,
+based on the Licensed Software, Nokia's entire liability to Licensee
+and Licensee's exclusive remedy shall be, at Nokia's option, either
+(A) return of the price Licensee paid for the Licensed Software, or
+(B) repair or replacement of the Licensed Software, provided Licensee
+returns to Nokia all copies of the Licensed Software as originally
+delivered to Licensee. Nokia shall not under any circumstances be
+liable to Licensee based on failure of the Licensed Software if the
+failure resulted from accident, abuse or misapplication, nor shall
+Nokia under any circumstances be liable for special damages, punitive
+or exemplary damages, damages for loss of profits or interruption of
+business or for loss or corruption of data. Any award of damages from
+Nokia to Licensee shall not exceed the total amount Licensee has paid
+to Nokia in connection with this Agreement.
+
+
+9. CONFIDENTIALITY
+
+Each party acknowledges that during the Term of this Agreement it
+shall have access to information about the other party's business,
+business methods, business plans, customers, business relations,
+technology, and other information, including the terms of this
+Agreement, that is confidential and of great value to the other party,
+and the value of which would be significantly reduced if disclosed to
+third parties (the "Confidential Information"). Accordingly, when a
+party (the "Receiving Party") receives Confidential Information from
+another party (the "Disclosing Party"), the Receiving Party shall, and
+shall obligate its employees and agents and employees and agents of
+its Affiliates to: (i) maintain the Confidential Information in strict
+confidence; (ii) not disclose the Confidential Information to a third
+party without the Disclosing Party's prior written approval; and (iii)
+not, directly or indirectly, use the Confidential Information for any
+purpose other than for exercising its rights and fulfilling its
+responsibilities pursuant to this Agreement. Each party shall take
+reasonable measures to protect the Confidential Information of the
+other party, which measures shall not be less than the measures taken
+by such party to protect its own confidential and proprietary
+information.
+
+"Confidential Information" shall not include information that (a) is
+or becomes generally known to the public through no act or omission of
+the Receiving Party; (b) was in the Receiving Party's lawful
+possession prior to the disclosure hereunder and was not subject to
+limitations on disclosure or use; (c) is developed by the Receiving
+Party without access to the Confidential Information of the Disclosing
+Party or by persons who have not had access to the Confidential
+Information of the Disclosing Party as proven by the written records
+of the Receiving Party; (d) is lawfully disclosed to the Receiving
+Party without restrictions, by a third party not under an obligation
+of confidentiality; or (e) the Receiving Party is legally compelled to
+disclose the information, in which case the Receiving Party shall
+assert the privileged and confidential nature of the information and
+cooperate fully with the Disclosing Party to protect against and
+prevent disclosure of any Confidential Information and to limit the
+scope of disclosure and the dissemination of disclosed Confidential
+Information by all legally available means.
+
+The obligations of the Receiving Party under this Section shall
+continue during the Initial Term and for a period of five (5) years
+after expiration or termination of this Agreement. To the extent that
+the terms of the Non-Disclosure Agreement between Nokia and Licensee
+conflict with the terms of this Section 8, this Section 8 shall be
+controlling over the terms of the Non-Disclosure Agreement.
+
+
+10. GENERAL PROVISIONS
+
+10.1 No Assignment
+
+Licensee shall not be entitled to assign or transfer all or any of its
+rights, benefits and obligations under this Agreement without the
+prior written consent of Nokia, which shall not be unreasonably
+withheld.
+
+10.2 Termination
+
+Nokia may terminate the Agreement at any time immediately upon written
+notice by Nokia to Licensee if Licensee breaches this Agreement.
+
+Upon termination of this Agreement, Licensee shall return to Nokia all
+copies of Licensed Software that were supplied by Nokia. All other
+copies of Licensed Software in the possession or control of Licensee
+must be erased or destroyed. An officer of Licensee must promptly
+deliver to Nokia a written confirmation that this has occurred.
+
+10.3 Surviving Sections
+
+Any terms and conditions that by their nature or otherwise reasonably
+should survive a cancellation or termination of this Agreement shall
+also be deemed to survive. Such terms and conditions include, but are
+not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3,
+10.4, 10.5, 10.6, 10.7, and 10.8 of this Agreement.
+
+10.4 Entire Agreement
+
+This Agreement constitutes the complete agreement between the parties
+and supersedes all prior or contemporaneous discussions,
+representations, and proposals, written or oral, with respect to the
+subject matters discussed herein, with the exception of the
+non-disclosure agreement executed by the parties in connection with
+this Agreement ("Non-Disclosure Agreement"), if any, shall be subject
+to Section 8. No modification of this Agreement shall be effective
+unless contained in a writing executed by an authorized representative
+of each party. No term or condition contained in Licensee's purchase
+order shall apply unless expressly accepted by Nokia in writing. If
+any provision of the Agreement is found void or unenforceable, the
+remainder shall remain valid and enforceable according to its
+terms. If any remedy provided is determined to have failed for its
+essential purpose, all limitations of liability and exclusions of
+damages set forth in this Agreement shall remain in effect.
+
+10.5 Export Control
+
+Licensee acknowledges that the Licensed Software may be subject to
+export control restrictions of various countries. Licensee shall fully
+comply with all applicable export license restrictions and
+requirements as well as with all laws and regulations relating to the
+importation of the Licensed Software and shall procure all necessary
+governmental authorizations, including without limitation, all
+necessary licenses, approvals, permissions or consents, where
+necessary for the re-exportation of the Licensed Software.,
+
+10.6 Governing Law and Legal Venue
+
+This Agreement shall be construed and interpreted in accordance with
+the laws of Finland, excluding its choice of law provisions. Any
+disputes arising out of or relating to this Agreement shall be
+resolved in arbitration under the Rules of Arbitration of the Chamber
+of Commerce of Helsinki, Finland. The arbitration tribunal shall
+consist of one (1), or if either Party so requires, of three (3),
+arbitrators. The award shall be final and binding and enforceable in
+any court of competent jurisdiction. The arbitration shall be held in
+Helsinki, Finland and the process shall be conducted in the English
+language.
+
+10.7 No Implied License
+
+There are no implied licenses or other implied rights granted under
+this Agreement, and all rights, save for those expressly granted
+hereunder, shall remain with Nokia and its licensors. In addition, no
+licenses or immunities are granted to the combination of the Licensed
+Software with any other software or hardware not delivered by Nokia
+under this Agreement.
+
+10.8 Government End Users
+
+A "U.S. Government End User" shall mean any agency or entity of the
+government of the United States. The following shall apply if Licensee
+is a U.S. Government End User. The Licensed Software is a "commercial
+item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
+consisting of "commercial computer software" and "commercial computer
+software documentation," as such terms are used in 48 C.F.R. 12.212
+(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government
+End Users acquire the Licensed Software with only those rights set
+forth herein. The Licensed Software (including related documentation)
+is provided to U.S. Government End Users: (a) only as a commercial
+end item; and (b) only pursuant to this Agreement.
+
+
+
+
diff --git a/bin/findtr b/bin/findtr
new file mode 100755
index 0000000..7df3325
--- /dev/null
+++ b/bin/findtr
@@ -0,0 +1,189 @@
+#!/usr/bin/perl -w
+# vi:wrap:
+
+# See Qt I18N documentation for usage information.
+
+use POSIX qw(strftime);
+
+$projectid='PROJECT VERSION';
+$datetime = strftime "%Y-%m-%d %X %Z", localtime;
+$charset='iso-8859-1';
+$translator='FULLNAME <EMAIL@ADDRESS>';
+$revision_date='YYYY-MM-DD';
+
+$real_mark = "tr";
+$noop_mark = "QT_TR_NOOP";
+$scoped_mark = "qApp->translate";
+$noop_scoped_mark = "QT_TRANSLATE_NOOP";
+
+$header=
+'# This is a Qt message file in .po format. Each msgid starts with
+# a scope. This scope should *NOT* be translated - eg. translating
+# from French to English, "Foo::Bar" would be translated to "Pub",
+# not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: '.$projectid.'\n"
+"POT-Creation-Date: '.$datetime.'\n"
+"PO-Revision-Date: '.$revision_date.'\n"
+"Last-Translator: '.$translator.'\n"
+"Content-Type: text/plain; charset='.$charset.'\n"
+
+';
+
+
+
+
+$scope = "";
+
+if ( $#ARGV < 0 ) {
+ print STDERR "Usage: findtr sourcefile ... >project.po\n";
+ exit 1;
+}
+
+
+sub outmsg {
+ my ($file, $line, $scope, $msgid) = @_;
+ # unesc
+ $msgid =~ s/$esc:$esc:$esc/::/gs;
+ $msgid =~ s|$esc/$esc/$esc|//|gs;
+
+ # Remove blank lines
+ $msgid =~ s/\n\n+/\n/gs;
+ $msgid = "\"\"\n$msgid" if $msgid =~ /\n/s;
+ print "#: $file:$line\n";
+ $msgid =~ s/^"//; #"emacs bug
+ print "msgid \"${scope}::$msgid\n";
+ #print "msgstr \"$msgid\n";
+ print "msgstr \"\"\n";
+ print "\n";
+}
+
+sub justlines {
+ my $l = @_;
+ $l =~ tr|\n||dc;
+ return $l;
+}
+
+print $header;
+
+
+foreach $file ( @ARGV ) {
+ next unless open( I, "< $file" );
+
+ $source = join( "", <I> );
+
+ # Find esc. Avoid bad case 1/// -> 1/1/1/1 -> ///1
+ $esc = 1;
+ while ( $source =~ m!(?:$esc/$esc/$esc)|(?:$esc///)
+ |(?:$esc:$esc:$esc)|(?:$esc:\:\:)! ) {
+ $esc++;
+ }
+
+ # Hide quoted :: in practically all strings
+ $source =~ s/\"([^"\n]*)::([^"\n]*)\"/\"$1$esc:$esc:$esc$2\"/g;
+
+ # Hide quoted // in practically all strings
+ $source =~ s|\"([^"\n]*)//([^"\n]*)\"|\"$1$esc/$esc/$esc$2\"|g;
+
+
+ # strip comments -- does not handle "/*" in strings
+ while( $source =~ s|/\*(.*?)\*/|justlines($1)|ges ) { }
+ while( $source =~ s|//(.*?)\n|\n|g ) { }
+
+ while( $source =~ /
+ (?:
+ # Some doublequotes are "escaped" to help vim syntax highlight
+
+ # $1 = scope; $2 = parameters etc.
+ (?:
+ # Scoped function name ($1 is scope).
+ (\w+)::(?:\w+)
+ \s*
+ # Parameters etc up to open-curly - no semicolons
+ \(([^();]*)\)
+ \s*
+ (?:\{|:)
+ )
+ |
+ # $3 - one-argument msgid
+ (?:\b
+ # One of the marks
+ (?:$real_mark|$noop_mark)
+ \s*
+ # The parameter
+ \(\s*((?:"(?:[^"]|[^\\]\\")*"\s*)+)\)
+ )
+ |
+ # $4,$5 - two-argument msgid
+ (?:\b
+ # One of the scoped marks
+ (?:$scoped_mark|$noop_scoped_mark)
+ \s*
+ # The parameters
+ \(
+ # The scope parameter
+ \s*"([^\"]*)"
+ \s*,\s*
+ # The msgid parameter
+ \s*((?:\"(?:[^"]|[^\\]\\")*"\s*)+) #"emacs
+ \)
+ )
+ |
+ # $6,$7 - scoped one-argument msgid
+ (?:\b
+ # The scope
+ (\w+)::
+ # One of the marks
+ (?:$real_mark)
+ \s*
+ # The parameter
+ \(\s*((?:"(?:[^"]|[^\\]\\")*"\s*)+)\)
+ )
+ )/gsx )
+ {
+ @lines = split /^/m, "$`";
+ $line = @lines;
+ if ( defined( $1 ) ) {
+ if ( $scope ne $1 ) {
+ $sc=$1;
+ $etc=$2;
+ # remove strings
+ $etc =~ s/"(?:[^"]|[^\\]\\")"//g;
+ # count ( and )
+ @open = split /\(/m, $etc;
+ @close = split /\)/m, $etc;
+ if ( $#open == $#close ) {
+ $scope = $sc;
+ }
+ }
+ next;
+ }
+
+ if ( defined( $3 ) ) {
+ $this_scope = $scope;
+ $msgid = $3;
+ } elsif ( defined( $4 ) ) {
+ $this_scope = $4;
+ $msgid = $5;
+ } elsif ( defined( $6 ) ) {
+ $this_scope = $6;
+ $msgid = $7;
+ } else {
+ next;
+ }
+
+ $msgid =~ s/^\s*//;
+ $msgid =~ s/\s*$//;
+
+ # Might still be non-unique eg. tr("A" "B") vs. tr("A" "B").
+
+ $location{"${this_scope}::${msgid}"} = "$file:$line";
+ }
+}
+
+for $scoped_msgid ( sort keys %location ) {
+ ($scope,$msgid) = $scoped_msgid =~ m/([^:]*)::(.*)/s;
+ ($file,$line) = $location{$scoped_msgid} =~ m/([^:]*):(.*)/s;
+ outmsg($file,$line,$scope,$msgid);
+}
diff --git a/bin/setcepaths.bat b/bin/setcepaths.bat
new file mode 100755
index 0000000..5e04526
--- /dev/null
+++ b/bin/setcepaths.bat
@@ -0,0 +1,113 @@
+@echo off
+IF "%1" EQU "wincewm50pocket-msvc2005" (
+checksdk.exe -sdk "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 5.01 for Pocket PC selected, environment is set up
+) ELSE IF "%1" EQU "wincewm50smart-msvc2005" (
+checksdk.exe -sdk "Windows Mobile 5.0 Smartphone SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 5.01 for Smartphone for arm selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-x86-msvc2005" (
+checksdk.exe -sdk "STANDARDSDK_500 (x86)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-armv4i-msvc2005" (
+checksdk.exe -sdk "STANDARDSDK_500 (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for arm selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-mipsii-msvc2005" (
+checksdk.exe -sdk "STANDARDSDK_500 (MIPSII)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for mips-ii selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-mipsiv-msvc2005" (
+checksdk.exe -sdk "STANDARDSDK_500 (MIPSIV)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for mips-iv selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-sh4-msvc2005" (
+checksdk.exe -sdk "STANDARDSDK_500 (SH4)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for sh4 selected, environment is set up
+) ELSE IF "%1" EQU "wincewm60professional-msvc2005" (
+checksdk.exe -sdk "Windows Mobile 6 Professional SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 6 Professional selected, environment is set up
+) ELSE IF "%1" EQU "wincewm60standard-msvc2005" (
+checksdk.exe -sdk "Windows Mobile 6 Standard SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 6 Standard selected, environment is set up
+) ELSE IF "%1" EQU "wincewm50pocket-msvc2008" (
+checksdk.exe -sdk "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 5.01 for Pocket PC selected, environment is set up
+) ELSE IF "%1" EQU "wincewm50smart-msvc2008" (
+checksdk.exe -sdk "Windows Mobile 5.0 Smartphone SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 5.01 for Smartphone for arm selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-x86-msvc2008" (
+checksdk.exe -sdk "STANDARDSDK_500 (x86)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-armv4i-msvc2008" (
+checksdk.exe -sdk "STANDARDSDK_500 (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for arm selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-mipsii-msvc2008" (
+checksdk.exe -sdk "STANDARDSDK_500 (MIPSII)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for mips-ii selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-mipsiv-msvc2008" (
+checksdk.exe -sdk "STANDARDSDK_500 (MIPSIV)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for mips-iv selected, environment is set up
+) ELSE IF "%1" EQU "wince50standard-sh4-msvc2008" (
+checksdk.exe -sdk "STANDARDSDK_500 (SH4)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Standard SDK for sh4 selected, environment is set up
+) ELSE IF "%1" EQU "wincewm60professional-msvc2008" (
+checksdk.exe -sdk "Windows Mobile 6 Professional SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 6 Professional selected, environment is set up
+) ELSE IF "%1" EQU "wincewm60standard-msvc2008" (
+checksdk.exe -sdk "Windows Mobile 6 Standard SDK (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
+tmp_created_script_setup.bat
+del tmp_created_script_setup.bat
+echo Windows Mobile 6 Standard selected, environment is set up
+) ELSE (
+echo no SDK to build Windows CE selected
+echo.
+echo Current choices are:
+echo wincewm50pocket-msvc2005 - SDK for Windows Mobile 5.01 PocketPC
+echo wincewm50smart-msvc2005 - SDK for Windows Mobile 5.01 Smartphone
+echo wince50standard-x86-msvc2005 - Build for the WinCE standard SDK 5.0
+echo with x86 platform preset
+echo wince50standard-armv4i-msvc2005 - Build for the WinCE standard SDK 5.0
+echo with armv4i platform preset
+echo wince50standard-mipsiv-msvc2005 - Build for the WinCE standard SDK 5.0
+echo with mips platform preset
+echo wince50standard-sh4-msvc2005 - Build for the WinCE standard SDK 5.0
+echo with sh4 platform preset
+echo wincewm60professional-msvc2005 - SDK for Windows Mobile 6 professional
+echo wincewm60standard-msvc2005 - SDK for Windows Mobile 6 Standard
+echo and the corresponding versions for msvc2008.
+echo.
+)
+
+
+
diff --git a/bin/syncqt b/bin/syncqt
new file mode 100755
index 0000000..7a9f1d3
--- /dev/null
+++ b/bin/syncqt
@@ -0,0 +1,1049 @@
+#!/usr/bin/perl -w
+######################################################################
+#
+# Synchronizes Qt header files - internal Trolltech tool.
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Contact: Qt Software Information (qt-info@nokia.com)
+#
+######################################################################
+
+# use packages -------------------------------------------------------
+use File::Basename;
+use File::Path;
+use Cwd;
+use Config;
+use strict;
+
+die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
+
+# global variables
+my $isunix = 0;
+my $basedir = $ENV{"QTDIR"};
+$basedir =~ s=\\=/=g;
+my %modules = ( # path to module name map
+ "QtGui" => "$basedir/src/gui",
+ "QtOpenGL" => "$basedir/src/opengl",
+ "QtCore" => "$basedir/src/corelib",
+ "QtXml" => "$basedir/src/xml",
+ "QtXmlPatterns" => "$basedir/src/xmlpatterns",
+ "QtSql" => "$basedir/src/sql",
+ "QtNetwork" => "$basedir/src/network",
+ "QtSvg" => "$basedir/src/svg",
+ "QtScript" => "$basedir/src/script",
+ "QtScriptTools" => "$basedir/src/scripttools",
+ "Qt3Support" => "$basedir/src/qt3support",
+ "ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared",
+ "QtTest" => "$basedir/src/testlib",
+ "QtAssistant" => "$basedir/tools/assistant/compat/lib",
+ "QtHelp" => "$basedir/tools/assistant/lib",
+ "QtDesigner" => "$basedir/tools/designer/src/lib",
+ "QtUiTools" => "$basedir/tools/designer/src/uitools",
+ "QtDBus" => "$basedir/src/dbus",
+ "QtWebKit" => "$basedir/src/3rdparty/webkit/WebCore",
+ "phonon" => "$basedir/src/phonon",
+);
+my %moduleheaders = ( # restrict the module headers to those found in relative path
+ "QtWebKit" => "../WebKit/qt/Api",
+ "phonon" => "../3rdparty/phonon/phonon",
+);
+
+#$modules{"QtCore"} .= ";$basedir/mkspecs/" . $ENV{"MKSPEC"} if defined $ENV{"MKSPEC"};
+
+# global variables (modified by options)
+my $module = 0;
+my $showonly = 0;
+my $remove_stale = 1;
+my $force_win = 0;
+my $force_relative = 0;
+my $check_includes = 0;
+my $copy_headers = 0;
+my @modules_to_sync ;
+$force_relative = 1 if ( -d "/System/Library/Frameworks" );
+my $out_basedir = $basedir;
+$out_basedir =~ s=\\=/=g;
+
+# functions ----------------------------------------------------------
+
+######################################################################
+# Syntax: showUsage()
+# Params: -none-
+#
+# Purpose: Show the usage of the script.
+# Returns: -none-
+######################################################################
+sub showUsage
+{
+ print "$0 usage:\n";
+ print " -copy Copy headers instead of include-fwd(default: " . ($copy_headers ? "yes" : "no") . ")\n";
+ print " -remove-stale Removes stale headers (default: " . ($remove_stale ? "yes" : "no") . ")\n";
+ print " -relative Force relative symlinks (default: " . ($force_relative ? "yes" : "no") . ")\n";
+ print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
+ print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
+ print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
+ print " -help This help\n";
+ exit 0;
+}
+
+######################################################################
+# Syntax: checkUnix()
+# Params: -none-
+#
+# Purpose: Check if script runs on a Unix system or not. Cygwin
+# systems are _not_ detected as Unix systems.
+# Returns: 1 if a unix system, else 0.
+######################################################################
+sub checkUnix {
+ my ($r) = 0;
+ if ( $force_win != 0) {
+ return 0;
+ } elsif ( -f "/bin/uname" ) {
+ $r = 1;
+ (-f "\\bin\\uname") && ($r = 0);
+ } elsif ( -f "/usr/bin/uname" ) {
+ $r = 1;
+ (-f "\\usr\\bin\\uname") && ($r = 0);
+ }
+ if($r) {
+ $_ = $Config{'osname'};
+ $r = 0 if( /(ms)|(cyg)win/i );
+ }
+ return $r;
+}
+
+sub checkRelative {
+ my ($dir) = @_;
+ return 0 if($dir =~ /^\//);
+ return 0 if(!checkUnix() && $dir =~ /[a-zA-Z]:[\/\\]/);
+ return 1;
+}
+
+######################################################################
+# Syntax: shouldMasterInclude(iheader)
+# Params: iheader, string, filename to verify inclusion
+#
+# Purpose: Determines if header should be in the master include file.
+# Returns: 0 if file contains "#pragma qt_no_master_include" or not
+# able to open, else 1.
+######################################################################
+sub shouldMasterInclude {
+ my ($iheader) = @_;
+ return 0 if(basename($iheader) =~ /_/);
+ return 0 if(basename($iheader) =~ /qconfig/);
+ if(open(F, "<$iheader")) {
+ while(<F>) {
+ chomp;
+ return 0 if(/^\#pragma qt_no_master_include$/);
+ }
+ close(F);
+ } else {
+ return 0;
+ }
+ return 1;
+}
+
+######################################################################
+# Syntax: classNames(iheader)
+# Params: iheader, string, filename to parse for classname "symlinks"
+#
+# Purpose: Scans through iheader to find all classnames that should be
+# synced into library's include structure.
+# Returns: List of all class names in a file.
+######################################################################
+sub classNames {
+ my @ret;
+ my ($iheader) = @_;
+ if(basename($iheader) eq "qglobal.h") {
+ push @ret, "QtGlobal";
+ } elsif(basename($iheader) eq "qendian.h") {
+ push @ret, "QtEndian";
+ } elsif(basename($iheader) eq "qconfig.h") {
+ push @ret, "QtConfig";
+ } elsif(basename($iheader) eq "qplugin.h") {
+ push @ret, "QtPlugin";
+ } elsif(basename($iheader) eq "qalgorithms.h") {
+ push @ret, "QtAlgorithms";
+ } elsif(basename($iheader) eq "qcontainerfwd.h") {
+ push @ret, "QtContainerFwd";
+ } elsif(basename($iheader) eq "qdebug.h") {
+ push @ret, "QtDebug";
+ } elsif(basename($iheader) eq "qevent.h") {
+ push @ret, "QtEvents";
+ } elsif(basename($iheader) eq "qnamespace.h") {
+ push @ret, "Qt"
+ } elsif(basename($iheader) eq "qssl.h") {
+ push @ret, "QSsl";
+ } elsif(basename($iheader) eq "qtest.h") {
+ push @ret, "QTest"
+ } elsif(basename($iheader) eq "qtconcurrentmap.h") {
+ push @ret, "QtConcurrentMap"
+ } elsif(basename($iheader) eq "qtconcurrentfilter.h") {
+ push @ret, "QtConcurrentFilter"
+ } elsif(basename($iheader) eq "qtconcurrentrun.h") {
+ push @ret, "QtConcurrentRun"
+ }
+
+ my $parsable = "";
+ if(open(F, "<$iheader")) {
+ while(<F>) {
+ my $line = $_;
+ chomp $line;
+ chop $line if ($line =~ /\r$/);
+ if($line =~ /^\#/) {
+ if($line =~ /\\$/) {
+ while($line = <F>) {
+ chomp $line;
+ last unless($line =~ /\\$/);
+ }
+ }
+ return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
+ push(@ret, "$1") if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
+ $line = 0;
+ }
+ if($line) {
+ $line =~ s,//.*$,,; #remove c++ comments
+ $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro
+ $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
+ $parsable .= " " . $line;
+ }
+ }
+ close(F);
+ }
+
+ my $last_definition = 0;
+ my @namespaces;
+ for(my $i = 0; $i < length($parsable); $i++) {
+ my $definition = 0;
+ my $character = substr($parsable, $i, 1);
+ if($character eq "/" && substr($parsable, $i+1, 1) eq "*") { #I parse like this for greedy reasons
+ for($i+=2; $i < length($parsable); $i++) {
+ my $end = substr($parsable, $i, 2);
+ if($end eq "*/") {
+ $last_definition = $i+2;
+ $i++;
+ last;
+ }
+ }
+ } elsif($character eq "{") {
+ my $brace_depth = 1;
+ my $block_start = $i + 1;
+ BLOCK: for($i+=1; $i < length($parsable); $i++) {
+ my $ignore = substr($parsable, $i, 1);
+ if($ignore eq "{") {
+ $brace_depth++;
+ } elsif($ignore eq "}") {
+ $brace_depth--;
+ unless($brace_depth) {
+ for(my $i2 = $i+1; $i2 < length($parsable); $i2++) {
+ my $end = substr($parsable, $i2, 1);
+ if($end eq ";" || $end ne " ") {
+ $definition = substr($parsable, $last_definition, $block_start - $last_definition) . "}";
+ $i = $i2 if($end eq ";");
+ $last_definition = $i + 1;
+ last BLOCK;
+ }
+ }
+ }
+ }
+ }
+ } elsif($character eq ";") {
+ $definition = substr($parsable, $last_definition, $i - $last_definition + 1);
+ $last_definition = $i + 1;
+ } elsif($character eq "}") {
+ # a naked } must be a namespace ending
+ # if it's not a namespace, it's eaten by the loop above
+ pop @namespaces;
+ $last_definition = $i + 1;
+ }
+
+ if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) /
+ && substr($parsable, $i+1, 1) eq "{") {
+ push @namespaces, $1;
+
+ # Eat the opening { so that the condensing loop above doesn't see it
+ $i++;
+ $last_definition = $i + 1;
+ }
+
+ if($definition) {
+ $definition =~ s=[\n\r]==g;
+ my @symbols;
+ if($definition =~ m/^ *typedef *.*\(\*([^\)]*)\)\(.*\);$/) {
+ push @symbols, $1;
+ } elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) {
+ push @symbols, $2;
+ } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?([^<\s]+) ?(<[^>]*> ?)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/) {
+ push @symbols, $4;
+ } elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) {
+ push @symbols, "Q" . $1 . "Iterator";
+ push @symbols, "QMutable" . $1 . "Iterator";
+ }
+
+ foreach (@symbols) {
+ my $symbol = $_;
+ $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
+ push @ret, $symbol
+ if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
+ || $symbol =~ /^Phonon::/); # or in the Phonon namespace
+ }
+ }
+ }
+ return @ret;
+}
+
+######################################################################
+# Syntax: syncHeader(header, iheader, copy)
+# Params: header, string, filename to create "symlink" for
+# iheader, string, destination name of symlink
+# copy, forces header to be a copy of iheader
+#
+# Purpose: Syncronizes header to iheader
+# Returns: 1 if successful, else 0.
+######################################################################
+sub syncHeader {
+ my ($header, $iheader, $copy) = @_;
+ $iheader =~ s=\\=/=g;
+ $header =~ s=\\=/=g;
+ return copyFile($iheader, $header) if($copy);
+
+ my $iheader_no_basedir = $iheader;
+ $iheader_no_basedir =~ s,^$basedir/?,,;
+ unless(-e "$header") {
+ my $header_dir = dirname($header);
+ mkpath $header_dir, 0777;
+
+ #write it
+ my $iheader_out = fixPaths($iheader, $header_dir);
+ open HEADER, ">$header" || die "Could not open $header for writing!\n";
+ print HEADER "#include \"$iheader_out\"\n";
+ close HEADER;
+ return 1;
+ }
+ return 0;
+}
+
+######################################################################
+# Syntax: fixPaths(file, dir)
+# Params: file, string, filepath to be made relative to dir
+# dir, string, dirpath for point of origin
+#
+# Purpose: file is made relative (if possible) of dir.
+# Returns: String with the above applied conversion.
+######################################################################
+sub fixPaths {
+ my ($file, $dir) = @_;
+ $dir =~ s=^$basedir/=$out_basedir/= if(!($basedir eq $out_basedir));
+ $file =~ s=\\=/=g;
+ $file =~ s/\+/\\+/g;
+ $dir =~ s=\\=/=g;
+ $dir =~ s/\+/\\+/g;
+
+ #setup
+ my $ret = $file;
+ my $file_dir = dirname($file);
+ if($file_dir eq ".") {
+ $file_dir = getcwd();
+ $file_dir =~ s=\\=/=g;
+ }
+ $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:,g;
+ if($dir eq ".") {
+ $dir = getcwd();
+ $dir =~ s=\\=/=g;
+ }
+ $dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
+ return basename($file) if("$file_dir" eq "$dir");
+
+ #guts
+ my $match_dir = 0;
+ for(my $i = 1; $i < length($file_dir); $i++) {
+ my $slash = index($file_dir, "/", $i);
+ last if($slash == -1);
+ my $tmp = substr($file_dir, 0, $slash);
+ last unless($dir =~ m,^$tmp/,);
+ $match_dir = $tmp;
+ $i = $slash;
+ }
+ if($match_dir) {
+ my $after = substr($dir, length($match_dir));
+ my $count = ($after =~ tr,/,,);
+ my $dots = "";
+ for(my $i = 0; $i < $count; $i++) {
+ $dots .= "../";
+ }
+ $ret =~ s,^$match_dir,$dots,;
+ }
+ $ret =~ s,/+,/,g;
+ return $ret;
+}
+
+######################################################################
+# Syntax: fileContents(filename)
+# Params: filename, string, filename of file to return contents
+#
+# Purpose: Get the contents of a file.
+# Returns: String with contents of the file, or empty string if file
+# doens't exist.
+# Warning: Dies if it does exist but script cannot get read access.
+######################################################################
+sub fileContents {
+ my ($filename) = @_;
+ my $filecontents = "";
+ if (-e $filename) {
+ open(I, "< $filename") || die "Could not open $filename for reading, read block?";
+ local $/;
+ binmode I;
+ $filecontents = <I>;
+ close I;
+ }
+ return $filecontents;
+}
+
+######################################################################
+# Syntax: fileCompare(file1, file2)
+# Params: file1, string, filename of first file
+# file2, string, filename of second file
+#
+# Purpose: Determines if files are equal, and which one is newer.
+# Returns: 0 if files are equal no matter the timestamp, -1 if file1
+# is newer, 1 if file2 is newer.
+######################################################################
+sub fileCompare {
+ my ($file1, $file2) = @_;
+ my $file1contents = fileContents($file1);
+ my $file2contents = fileContents($file2);
+ if (! -e $file1) { return 1; }
+ if (! -e $file2) { return -1; }
+ return $file1contents ne $file2contents ? (stat("$file2"))[9] <=> (stat("$file1"))[9] : 0;
+}
+
+######################################################################
+# Syntax: copyFile(file, ifile)
+# Params: file, string, filename to create duplicate for
+# ifile, string, destination name of duplicate
+#
+# Purpose: Keeps files in sync so changes in the newer file will be
+# written to the other.
+# Returns: 1 if files were synced, else 0.
+# Warning: Dies if script cannot get write access.
+######################################################################
+sub copyFile
+{
+ my ($file,$ifile, $copy,$knowdiff,$filecontents,$ifilecontents) = @_;
+ # Bi-directional synchronization
+ open( I, "< " . $file ) || die "Could not open $file for reading";
+ local $/;
+ binmode I;
+ $filecontents = <I>;
+ close I;
+ if ( open(I, "< " . $ifile) ) {
+ local $/;
+ binmode I;
+ $ifilecontents = <I>;
+ close I;
+ $copy = fileCompare($file, $ifile);
+ $knowdiff = 0,
+ } else {
+ $copy = -1;
+ $knowdiff = 1;
+ }
+
+ if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
+ if ( $copy > 0 ) {
+ my $file_dir = dirname($file);
+ mkpath $file_dir, 0777 unless(-e "$file_dir");
+ open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
+ local $/;
+ binmode O;
+ print O $ifilecontents;
+ close O;
+ return 1;
+ } elsif ( $copy < 0 ) {
+ my $ifile_dir = dirname($ifile);
+ mkpath $ifile_dir, 0777 unless(-e "$ifile_dir");
+ open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
+ local $/;
+ binmode O;
+ print O $filecontents;
+ close O;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+######################################################################
+# Syntax: symlinkFile(file, ifile)
+# Params: file, string, filename to create "symlink" for
+# ifile, string, destination name of symlink
+#
+# Purpose: File is symlinked to ifile (or copied if filesystem doesn't
+# support symlink).
+# Returns: 1 on success, else 0.
+######################################################################
+sub symlinkFile
+{
+ my ($file,$ifile) = @_;
+
+ if ($isunix) {
+ print "symlink created for $file ";
+ if ( $force_relative && ($ifile =~ /^$basedir/)) {
+ my $t = getcwd();
+ my $c = -1;
+ my $p = "../";
+ $t =~ s-^$basedir/--;
+ $p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 );
+ $file =~ s-^$basedir/-$p-;
+ print " ($file)\n";
+ }
+ print "\n";
+ return symlink($file, $ifile);
+ }
+ return copyFile($file, $ifile);
+}
+
+######################################################################
+# Syntax: findFiles(dir, match, descend)
+# Params: dir, string, directory to search for name
+# match, string, regular expression to match in dir
+# descend, integer, 0 = non-recursive search
+# 1 = recurse search into subdirectories
+#
+# Purpose: Finds files matching a regular expression.
+# Returns: List of matching files.
+#
+# Examples:
+# findFiles("/usr","\.cpp$",1) - finds .cpp files in /usr and below
+# findFiles("/tmp","^#",0) - finds #* files in /tmp
+######################################################################
+sub findFiles {
+ my ($dir,$match,$descend) = @_;
+ my ($file,$p,@files);
+ local(*D);
+ $dir =~ s=\\=/=g;
+ ($dir eq "") && ($dir = ".");
+ if ( opendir(D,$dir) ) {
+ if ( $dir eq "." ) {
+ $dir = "";
+ } else {
+ ($dir =~ /\/$/) || ($dir .= "/");
+ }
+ foreach $file ( readdir(D) ) {
+ next if ( $file =~ /^\.\.?$/ );
+ $p = $file;
+ ($file =~ /$match/) && (push @files, $p);
+ if ( $descend && -d $p && ! -l $p ) {
+ push @files, &findFiles($p,$match,$descend);
+ }
+ }
+ closedir(D);
+ }
+ return @files;
+}
+
+# --------------------------------------------------------------------
+# "main" function
+# --------------------------------------------------------------------
+
+while ( @ARGV ) {
+ my $var = 0;
+ my $val = 0;
+
+ #parse
+ my $arg = shift @ARGV;
+ if ("$arg" eq "-h" || "$arg" eq "-help" || "$arg" eq "?") {
+ $var = "show_help";
+ $val = "yes";
+ } elsif("$arg" eq "-copy") {
+ $var = "copy";
+ $val = "yes";
+ } elsif("$arg" eq "-o" || "$arg" eq "-outdir") {
+ $var = "output";
+ $val = shift @ARGV;
+ } elsif("$arg" eq "-showonly" || "$arg" eq "-remove-stale" || "$arg" eq "-windows" ||
+ "$arg" eq "-relative" || "$arg" eq "-check-includes") {
+ $var = substr($arg, 1);
+ $val = "yes";
+ } elsif("$arg" =~ /^-no-(.*)$/) {
+ $var = $1;
+ $val = "no";
+ #these are for commandline compat
+ } elsif("$arg" eq "-inc") {
+ $var = "output";
+ $val = shift @ARGV;
+ } elsif("$arg" eq "-module") {
+ $var = "module";
+ $val = shift @ARGV;
+ } elsif("$arg" eq "-show") {
+ $var = "showonly";
+ $val = "yes";
+ } elsif("$arg" eq '*') {
+ # workaround for windows 9x where "%*" expands to "*"
+ $var = 1;
+ }
+
+ #do something
+ if(!$var || "$var" eq "show_help") {
+ print "Unknown option: $arg\n\n" if(!$var);
+ showUsage();
+ } elsif ("$var" eq "copy") {
+ if("$val" eq "yes") {
+ $copy_headers++;
+ } elsif($showonly) {
+ $copy_headers--;
+ }
+ } elsif ("$var" eq "showonly") {
+ if("$val" eq "yes") {
+ $showonly++;
+ } elsif($showonly) {
+ $showonly--;
+ }
+ } elsif ("$var" eq "check-includes") {
+ if("$val" eq "yes") {
+ $check_includes++;
+ } elsif($check_includes) {
+ $check_includes--;
+ }
+ } elsif ("$var" eq "remove-stale") {
+ if("$val" eq "yes") {
+ $remove_stale++;
+ } elsif($remove_stale) {
+ $remove_stale--;
+ }
+ } elsif ("$var" eq "windows") {
+ if("$val" eq "yes") {
+ $force_win++;
+ } elsif($force_win) {
+ $force_win--;
+ }
+ } elsif ("$var" eq "relative") {
+ if("$val" eq "yes") {
+ $force_relative++;
+ } elsif($force_relative) {
+ $force_relative--;
+ }
+ } elsif ("$var" eq "module") {
+ print "module :$val:\n";
+ die "No such module: $val" unless(defined $modules{$val});
+ push @modules_to_sync, $val;
+ } elsif ("$var" eq "output") {
+ my $outdir = $val;
+ if(checkRelative($outdir)) {
+ $out_basedir = getcwd();
+ chomp $out_basedir;
+ $out_basedir .= "/" . $outdir;
+ } else {
+ $out_basedir = $outdir;
+ }
+ # \ -> /
+ $out_basedir =~ s=\\=/=g;
+ }
+}
+@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
+
+$isunix = checkUnix; #cache checkUnix
+
+# create path
+mkpath "$out_basedir/include", 0777;
+
+my @ignore_headers = ();
+my $class_lib_map_contents = "";
+my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
+my @ignore_for_include_check = ( "qatomic.h" );
+my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
+my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
+my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtAssistant}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+
+foreach (@modules_to_sync) {
+ #iteration info
+ my $lib = $_;
+ my $dir = "$modules{$lib}";
+ my $pathtoheaders = "";
+ $pathtoheaders = "$moduleheaders{$lib}" if ($moduleheaders{$lib});
+
+ #information used after the syncing
+ my $pri_install_classes = "";
+ my $pri_install_files = "";
+
+ my $libcapitals = $lib;
+ $libcapitals =~ y/a-z/A-Z/;
+ my $master_contents = "#ifndef QT_".$libcapitals."_MODULE_H\n#define QT_".$libcapitals."_MODULE_H\n";
+
+ #get dependencies
+ if(-e "$dir/" . basename($dir) . ".pro") {
+ if(open(F, "<$dir/" . basename($dir) . ".pro")) {
+ while(<F>) {
+ my $line = $_;
+ chomp $line;
+ if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {
+ foreach(split(/ /, "$1")) {
+ $master_contents .= "#include <QtCore/QtCore>\n" if("$_" eq "core");
+ $master_contents .= "#include <QtGui/QtGui>\n" if("$_" eq "gui");
+ $master_contents .= "#include <QtNetwork/QtNetwork>\n" if("$_" eq "network");
+ $master_contents .= "#include <QtSvg/QtSvg>\n" if("$_" eq "svg");
+ $master_contents .= "#include <QtScript/QtScript>\n" if("$_" eq "script");
+ $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if("$_" eq "scripttools");
+ $master_contents .= "#include <Qt3Support/Qt3Support>\n" if("$_" eq "qt3support");
+ $master_contents .= "#include <QtSql/QtSql>\n" if("$_" eq "sql");
+ $master_contents .= "#include <QtXml/QtXml>\n" if("$_" eq "xml");
+ $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if("$_" eq "xmlpatterns");
+ $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if("$_" eq "opengl");
+ }
+ }
+ }
+ close(F);
+ }
+ }
+
+ #remove the old files
+ if($remove_stale) {
+ my @subdirs = ("$out_basedir/include/$lib");
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ if (opendir DIR, "$subdir") {
+ while(my $t = readdir(DIR)) {
+ my $file = "$subdir/$t";
+ if(-d "$file") {
+ push @subdirs, "$file" unless($t eq "." || $t eq "..");
+ } else {
+ my @files = ("$file");
+ #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
+ foreach (@files) {
+ my $file = $_;
+ my $remove_file = 0;
+ if(open(F, "<$file")) {
+ while(<F>) {
+ my $line = $_;
+ chomp $line;
+ if($line =~ /^\#include \"([^\"]*)\"$/) {
+ my $include = $1;
+ $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
+ $remove_file = 1 unless(-e "$include");
+ } else {
+ $remove_file = 0;
+ last;
+ }
+ }
+ close(F);
+ unlink "$file" if($remove_file);
+ }
+ }
+ }
+ }
+ closedir DIR;
+ }
+
+ }
+ }
+
+ #create the new ones
+ foreach (split(/;/, $dir)) {
+ my $current_dir = "$_";
+ my $headers_dir = $current_dir;
+ $headers_dir .= "/$pathtoheaders" if ($pathtoheaders);
+ #calc subdirs
+ my @subdirs = ($headers_dir);
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ opendir DIR, "$subdir" or next;
+ while(my $t = readdir(DIR)) {
+ push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
+ !($t eq "..") && !($t eq ".obj") &&
+ !($t eq ".moc") && !($t eq ".rcc") &&
+ !($t eq ".uic") && !($t eq "build"));
+ }
+ closedir DIR;
+ }
+
+ #calc files and "copy" them
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
+ foreach (@headers) {
+ my $header = "$_";
+ $header = 0 if("$header" =~ /^ui_.*.h/);
+ foreach (@ignore_headers) {
+ $header = 0 if("$header" eq "$_");
+ }
+ if($header) {
+ my $header_copies = 0;
+ #figure out if it is a public header
+ my $public_header = $header;
+ if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
+ $public_header = 0;
+ } else {
+ foreach (@ignore_for_master_contents) {
+ $public_header = 0 if("$header" eq "$_");
+ }
+ }
+
+ my $iheader = $subdir . "/" . $header;
+ my @classes = $public_header ? classNames($iheader) : ();
+ if($showonly) {
+ print "$header [$lib]\n";
+ foreach(@classes) {
+ print "SYMBOL: $_\n";
+ }
+ } else {
+ #find out all the places it goes..
+ my @headers;
+ if ($public_header) {
+ @headers = ( "$out_basedir/include/$lib/$header" );
+ push @headers, "$out_basedir/include/Qt/$header"
+ if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/);
+
+ foreach(@classes) {
+ my $header_base = basename($header);
+ my $class = $_;
+ if ($class =~ m/::/) {
+ $class =~ s,::,/,g;
+ $class = "../" . $class;
+ }
+ $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", $header, 0));
+ }
+ } else {
+ @headers = ( "$out_basedir/include/$lib/private/$header" );
+ push @headers, "$out_basedir/include/Qt/private/$header"
+ if ("$lib" ne "phonon");
+ }
+ foreach(@headers) { #sync them
+ $header_copies++ if(syncHeader($_, $iheader, $copy_headers));
+ }
+
+ if($public_header) {
+ #put it into the master file
+ $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader));
+
+ #deal with the install directives
+ if($public_header) {
+ my $pri_install_iheader = fixPaths($iheader, $current_dir);
+ foreach(@classes) {
+ my $class = $_;
+ if ($class =~ m/::/) {
+ $class =~ s,::,/,g;
+ $class = "../" . $class;
+ }
+ my $class_header = fixPaths("$out_basedir/include/$lib/$class",
+ $current_dir) . " ";
+ $pri_install_classes .= $class_header
+ unless($pri_install_classes =~ $class_header);
+ }
+ $pri_install_files.= "$pri_install_iheader ";;
+ }
+ }
+ }
+ print "header created for $iheader ($header_copies)\n" if($header_copies > 0);
+ }
+ }
+ }
+ }
+
+ # close the master include:
+ $master_contents .= "#endif\n";
+
+ unless($showonly) {
+ #generate the "master" include file
+ my $master_include = "$out_basedir/include/$lib/$lib";
+ $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too
+ if(-e "$master_include") {
+ open MASTERINCLUDE, "<$master_include";
+ local $/;
+ binmode MASTERINCLUDE;
+ my $oldmaster = <MASTERINCLUDE>;
+ close MASTERINCLUDE;
+ $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
+ $master_include = 0 if($oldmaster eq $master_contents);
+ }
+ if($master_include && $master_contents) {
+ my $master_dir = dirname($master_include);
+ mkpath $master_dir, 0777;
+ print "header (master) created for $lib\n";
+ open MASTERINCLUDE, ">$master_include";
+ print MASTERINCLUDE "$master_contents";
+ close MASTERINCLUDE;
+ }
+
+ #handle the headers.pri for each module
+ my $headers_pri_contents = "";
+ $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
+ $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
+ my $headers_pri_file = "$out_basedir/include/$lib/headers.pri";
+ if(-e "$headers_pri_file") {
+ open HEADERS_PRI_FILE, "<$headers_pri_file";
+ local $/;
+ binmode HEADERS_PRI_FILE;
+ my $old_headers_pri_contents = <HEADERS_PRI_FILE>;
+ close HEADERS_PRI_FILE;
+ $old_headers_pri_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
+ $headers_pri_file = 0 if($old_headers_pri_contents eq $headers_pri_contents);
+ }
+ if($headers_pri_file && $master_contents) {
+ my $headers_pri_dir = dirname($headers_pri_file);
+ mkpath $headers_pri_dir, 0777;
+ print "headers.pri file created for $lib\n";
+ open HEADERS_PRI_FILE, ">$headers_pri_file";
+ print HEADERS_PRI_FILE "$headers_pri_contents";
+ close HEADERS_PRI_FILE;
+ }
+ }
+}
+unless($showonly) {
+ my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
+ if(-e "$class_lib_map") {
+ open CLASS_LIB_MAP, "<$class_lib_map";
+ local $/;
+ binmode CLASS_LIB_MAP;
+ my $old_class_lib_map_contents = <CLASS_LIB_MAP>;
+ close CLASS_LIB_MAP;
+ $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
+ $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents);
+ }
+ if($class_lib_map) {
+ my $class_lib_map_dir = dirname($class_lib_map);
+ mkpath $class_lib_map_dir, 0777;
+ open CLASS_LIB_MAP, ">$class_lib_map";
+ print CLASS_LIB_MAP "$class_lib_map_contents";
+ close CLASS_LIB_MAP;
+ }
+}
+
+if($check_includes) {
+ for (keys(%modules)) {
+ #iteration info
+ my $lib = $_;
+ my $dir = "$modules{$lib}";
+ foreach (split(/;/, $dir)) {
+ my $current_dir = "$_";
+ #calc subdirs
+ my @subdirs = ($current_dir);
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ opendir DIR, "$subdir";
+ while(my $t = readdir(DIR)) {
+ push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
+ !($t eq "..") && !($t eq ".obj") &&
+ !($t eq ".moc") && !($t eq ".rcc") &&
+ !($t eq ".uic") && !($t eq "build"));
+ }
+ closedir DIR;
+ }
+
+ foreach (@subdirs) {
+ my $subdir = "$_";
+ my $header_skip_qt_module_test = 0;
+ foreach(@ignore_for_qt_module_check) {
+ foreach (split(/;/, $_)) {
+ $header_skip_qt_module_test = 1 if ("$subdir" =~ /^$_/);
+ }
+ }
+ my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0);
+ foreach (@headers) {
+ my $header = "$_";
+ my $header_skip_qt_begin_header_test = 0;
+ my $header_skip_qt_begin_namespace_test = 0;
+ $header = 0 if("$header" =~ /^ui_.*.h/);
+ foreach (@ignore_headers) {
+ $header = 0 if("$header" eq "$_");
+ }
+ if($header) {
+ my $public_header = $header;
+ if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
+ $public_header = 0;
+ } else {
+ foreach (@ignore_for_master_contents) {
+ $public_header = 0 if("$header" eq "$_");
+ }
+ if($public_header) {
+ foreach (@ignore_for_include_check) {
+ $public_header = 0 if("$header" eq "$_");
+ }
+ foreach(@ignore_for_qt_begin_header_check) {
+ $header_skip_qt_begin_header_test = 1 if ("$header" eq "$_");
+ }
+ foreach(@ignore_for_qt_begin_namespace_check) {
+ $header_skip_qt_begin_namespace_test = 1 if ("$header" eq "$_");
+ }
+ }
+ }
+
+ my $iheader = $subdir . "/" . $header;
+ if($public_header) {
+ if(open(F, "<$iheader")) {
+ my $qt_module_found = 0;
+ my $qt_begin_header_found = 0;
+ my $qt_end_header_found = 0;
+ my $qt_begin_namespace_found = 0;
+ my $qt_end_namespace_found = 0;
+ my $line;
+ while($line = <F>) {
+ chomp $line;
+ my $output_line = 1;
+ if($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
+ last;
+ } elsif($line =~ /^ *\# *include/) {
+ my $include = $line;
+ if($line =~ /<.*>/) {
+ $include =~ s,.*<(.*)>.*,$1,;
+ } elsif($line =~ /".*"/) {
+ $include =~ s,.*"(.*)".*,$1,;
+ } else {
+ $include = 0;
+ }
+ if($include) {
+ for (keys(%modules)) {
+ my $trylib = $_;
+ if(-e "$out_basedir/include/$trylib/$include") {
+ print "WARNING: $iheader includes $include when it should include $trylib/$include\n";
+ }
+ }
+ }
+ } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
+ $qt_begin_header_found = 1;
+ } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
+ $qt_end_header_found = 1;
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
+ $qt_begin_namespace_found = 1;
+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
+ $qt_end_namespace_found = 1;
+ } elsif ($header_skip_qt_module_test == 0 and $line =~ /^QT_MODULE\(.*\)\s*$/) {
+ $qt_module_found = 1;
+ }
+ }
+ if ($header_skip_qt_begin_header_test == 0) {
+ if ($qt_begin_header_found == 0) {
+ print "WARNING: $iheader does not include QT_BEGIN_HEADER\n";
+ }
+
+ if ($qt_begin_header_found && $qt_end_header_found == 0) {
+ print "WARNING: $iheader has QT_BEGIN_HEADER but no QT_END_HEADER\n";
+ }
+ }
+
+ if ($header_skip_qt_begin_namespace_test == 0) {
+ if ($qt_begin_namespace_found == 0) {
+ print "WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
+ }
+
+ if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
+ print "WARNING: $iheader has QT_BEGIN_NAMESPACE but no QT_END_NAMESPACE\n";
+ }
+ }
+
+ if ($header_skip_qt_module_test == 0) {
+ if ($qt_module_found == 0) {
+ print "WARNING: $iheader does not include QT_MODULE\n";
+ }
+ }
+ close(F);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+exit 0;
diff --git a/bin/syncqt.bat b/bin/syncqt.bat
new file mode 100755
index 0000000..579844f
--- /dev/null
+++ b/bin/syncqt.bat
@@ -0,0 +1,2 @@
+@rem ***** This assumes PERL is in the PATH *****
+@perl.exe -S syncqt %*
diff --git a/config.tests/mac/crc.test b/config.tests/mac/crc.test
new file mode 100755
index 0000000..1a16204
--- /dev/null
+++ b/config.tests/mac/crc.test
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+SUCCESS=no
+QMKSPEC=$1
+XPLATFORM=`basename "$1"`
+QMAKE_CONFIG=$2
+VERBOSE=$3
+SRCDIR=$4
+OUTDIR=$5
+TEST=$6
+EXE=`basename "$6"`
+ARG=$7
+shift 7
+LFLAGS=""
+INCLUDEPATH=""
+CXXFLAGS=""
+while [ "$#" -gt 0 ]; do
+ PARAM=$1
+ case $PARAM in
+ -framework)
+ LFLAGS="$LFLAGS -framework \"$2\""
+ shift
+ ;;
+ -F*|-m*|-x*)
+ LFLAGS="$LFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -L*|-l*|-pthread)
+ LFLAGS="$LFLAGS $PARAM"
+ ;;
+ -I*)
+ INC=`echo $PARAM | sed -e 's/^-I//'`
+ INCLUDEPATH="$INCLUDEPATH $INC"
+ ;;
+ -f*|-D*)
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -Qoption)
+ # Two-argument form for the Sun Compiler
+ CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
+ shift
+ ;;
+ *) ;;
+ esac
+ shift
+done
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
+
+cd "$OUTDIR/$TEST"
+
+make distclean >/dev/null 2>&1
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ make
+else
+ make >/dev/null 2>&1
+fi
+
+
+if [ -x "$EXE" ]; then
+ foo=`$OUTDIR/$TEST/$EXE $ARG`
+ echo "$foo"
+else
+ echo "'CUTE'" #1129665605 # == 'CUTE'
+fi
+
diff --git a/config.tests/mac/crc/crc.pro b/config.tests/mac/crc/crc.pro
new file mode 100644
index 0000000..c3abf15
--- /dev/null
+++ b/config.tests/mac/crc/crc.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp
new file mode 100644
index 0000000..2ac10b3
--- /dev/null
+++ b/config.tests/mac/crc/main.cpp
@@ -0,0 +1,67 @@
+#include <iostream>
+#include <cstdlib>
+#include <cstring>
+
+
+class CCRC32
+{
+public:
+ CCRC32() { initialize(); }
+
+ unsigned long FullCRC(const unsigned char *sData, unsigned long ulDataLength)
+ {
+ unsigned long ulCRC = 0xffffffff;
+ PartialCRC(&ulCRC, sData, ulDataLength);
+ return(ulCRC ^ 0xffffffff);
+ }
+
+ void PartialCRC(unsigned long *ulCRC, const unsigned char *sData, unsigned long ulDataLength)
+ {
+ while(ulDataLength--) {
+ *ulCRC = (*ulCRC >> 8) ^ ulTable[(*ulCRC & 0xFF) ^ *sData++];
+ }
+ }
+
+private:
+ void initialize(void)
+ {
+ unsigned long ulPolynomial = 0x04C11DB7;
+ memset(&ulTable, 0, sizeof(ulTable));
+ for(int iCodes = 0; iCodes <= 0xFF; iCodes++) {
+ ulTable[iCodes] = Reflect(iCodes, 8) << 24;
+ for(int iPos = 0; iPos < 8; iPos++) {
+ ulTable[iCodes] = (ulTable[iCodes] << 1)
+ ^ ((ulTable[iCodes] & (1 << 31)) ? ulPolynomial : 0);
+ }
+
+ ulTable[iCodes] = Reflect(ulTable[iCodes], 32);
+ }
+ }
+ unsigned long Reflect(unsigned long ulReflect, const char cChar)
+ {
+ unsigned long ulValue = 0;
+ // Swap bit 0 for bit 7, bit 1 For bit 6, etc....
+ for(int iPos = 1; iPos < (cChar + 1); iPos++) {
+ if(ulReflect & 1) {
+ ulValue |= (1 << (cChar - iPos));
+ }
+ ulReflect >>= 1;
+ }
+ return ulValue;
+ }
+ unsigned long ulTable[256]; // CRC lookup table array.
+};
+
+
+int main(int argc, char **argv)
+{
+ CCRC32 crc;
+ char *name;
+ if (argc < 2) {
+ std::cerr << "usage: crc <string>\n";
+ return 0;
+ } else {
+ name = argv[1];
+ }
+ std::cout << crc.FullCRC((unsigned char *)name, strlen(name)) << std::endl;
+}
diff --git a/config.tests/mac/defaultarch.test b/config.tests/mac/defaultarch.test
new file mode 100755
index 0000000..4502af7
--- /dev/null
+++ b/config.tests/mac/defaultarch.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+QT_MAC_DEFUALT_ARCH=
+
+touch defaultarch.c
+
+# compile something and run 'file' on it.
+if "$COMPILER" -c defaultarch.c 2>/dev/null 1>&2; then
+ FIlE_OUTPUT=`file defaultarch.o`
+ [ "$VERBOSE" = "yes" ] && echo "'file' reports compiler ($COMPILER) default architechture as: $FIlE_OUTPUT"
+
+fi
+rm -f defaultarch.c defaultarch.o
+
+# detect our known archs.
+if echo "$FIlE_OUTPUT" | grep '\<i386\>' > /dev/null 2>&1; then
+ QT_MAC_DEFUALT_ARCH=x86 # configure knows it as "x86" not "i386"
+fi
+if echo "$FIlE_OUTPUT" | grep '\<x86_64\>' > /dev/null 2>&1; then
+ QT_MAC_DEFUALT_ARCH=x86_64
+fi
+if echo "$FIlE_OUTPUT" | grep '\<ppc\>' > /dev/null 2>&1; then
+ QT_MAC_DEFUALT_ARCH=ppc
+fi
+if echo "$FIlE_OUTPUT" | grep '\<ppc64\>' > /dev/null 2>&1; then
+ QT_MAC_DEFUALT_ARCH=ppc64
+fi
+
+[ "$VERBOSE" = "yes" ] && echo "setting QT_MAC_DEFUALT_ARCH to \"$QT_MAC_DEFUALT_ARCH\""
+export QT_MAC_DEFUALT_ARCH
diff --git a/config.tests/mac/dwarf2.test b/config.tests/mac/dwarf2.test
new file mode 100755
index 0000000..a640b11
--- /dev/null
+++ b/config.tests/mac/dwarf2.test
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+DWARF2_SUPPORT=no
+DWARF2_SUPPORT_BROKEN=no
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+
+touch dwarf2.c
+
+if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>/dev/null 1>&2; then
+ if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>&1 | grep "unsupported" >/dev/null ; then
+ true
+ else
+ DWARF2_SUPPORT=yes
+ fi
+fi
+rm -f dwarf2.c dwarf2.o
+
+# Test for xcode 2.4.0, which has a broken implementation of DWARF
+"$COMPILER" $WORKDIR/xcodeversion.cpp -o xcodeversion -framework Carbon;
+./xcodeversion
+
+if [ "$?" == "1" ]; then
+ DWARF2_SUPPORT_BROKEN=yes
+fi
+
+rm xcodeversion
+
+# done
+if [ "$DWARF2_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
+ exit 0
+else
+ if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
+ exit 0
+ else
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled."
+ exit 1
+ fi
+fi
diff --git a/config.tests/mac/xarch.test b/config.tests/mac/xarch.test
new file mode 100755
index 0000000..08322a9
--- /dev/null
+++ b/config.tests/mac/xarch.test
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+XARCH_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+
+touch xarch.c
+
+if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then
+ if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>&1 | grep "unrecognized" >/dev/null ; then
+ true
+ else
+ XARCH_SUPPORT=yes
+ fi
+fi
+rm -f xarch.c xarch.o
+
+# done
+if [ "$XARCH_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Xarch is not supported"
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Xarch support detected"
+ exit 1
+fi
diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp
new file mode 100644
index 0000000..e613cc5
--- /dev/null
+++ b/config.tests/mac/xcodeversion.cpp
@@ -0,0 +1,58 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <Carbon/Carbon.h>
+
+int success = 0;
+int fail = 1;
+int internal_error = success; // enable dwarf on internal errors
+
+int main(int argc, const char **argv)
+{
+ CFURLRef cfurl;
+ OSStatus err = LSFindApplicationForInfo(0, CFSTR("com.apple.Xcode"), 0, 0, &cfurl);
+ if (err != noErr)
+ return internal_error;
+
+ CFBundleRef bundle = CFBundleCreate(0, cfurl);
+ if (bundle == 0)
+ return internal_error;
+
+ CFStringRef str = CFStringRef(CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString")));
+ const char * ptr = CFStringGetCStringPtr(str, 0);
+ if (ptr == 0)
+ return internal_error;
+
+ // self-test
+ const char * fail1 = "2.4";
+ const char * fail2 = "2.4.0";
+ const char * fail3 ="2.3";
+ const char * ok1 = "2.4.1";
+ const char * ok2 ="2.5";
+ const char * ok3 ="3.0";
+// ptr = fail1;
+// printf ("string: %s\n", ptr);
+
+ int length = strlen(ptr);
+ if (length < 3) // expect "x.y" at least
+ return internal_error;
+
+ // fail on 2.4 and below (2.4.1 is ok)
+
+ if (ptr[0] < '2')
+ return fail;
+
+ if (ptr[0] >= '3')
+ return success;
+
+ if (ptr[2] < '4')
+ return fail;
+
+ if (length < 5)
+ return fail;
+
+ if (ptr[4] < '1')
+ return fail;
+
+ return success;
+} \ No newline at end of file
diff --git a/config.tests/qws/ahi/ahi.cpp b/config.tests/qws/ahi/ahi.cpp
new file mode 100644
index 0000000..a5e8951
--- /dev/null
+++ b/config.tests/qws/ahi/ahi.cpp
@@ -0,0 +1,9 @@
+#include <ahi.h>
+
+int main(int, char **)
+{
+ AhiInit(0);
+ AhiTerm();
+
+ return 0;
+}
diff --git a/config.tests/qws/ahi/ahi.pro b/config.tests/qws/ahi/ahi.pro
new file mode 100644
index 0000000..532a565
--- /dev/null
+++ b/config.tests/qws/ahi/ahi.pro
@@ -0,0 +1,3 @@
+SOURCES = ahi.cpp
+CONFIG -= qt
+LIBS += -lahi -lahioem
diff --git a/config.tests/qws/directfb/directfb.cpp b/config.tests/qws/directfb/directfb.cpp
new file mode 100644
index 0000000..f743864
--- /dev/null
+++ b/config.tests/qws/directfb/directfb.cpp
@@ -0,0 +1,9 @@
+#include <directfb.h>
+
+int main(int, char **)
+{
+ DFBResult result = DFB_OK;
+ result = DirectFBInit(0, 0);
+
+ return (result == DFB_OK);
+}
diff --git a/config.tests/qws/directfb/directfb.pro b/config.tests/qws/directfb/directfb.pro
new file mode 100644
index 0000000..db14d3b
--- /dev/null
+++ b/config.tests/qws/directfb/directfb.pro
@@ -0,0 +1,5 @@
+SOURCES = directfb.cpp
+CONFIG -= qt
+
+QMAKE_CXXFLAGS += $$QT_CFLAGS_DIRECTFB
+LIBS += $$QT_LIBS_DIRECTFB
diff --git a/config.tests/qws/sound/sound.cpp b/config.tests/qws/sound/sound.cpp
new file mode 100644
index 0000000..be412bb
--- /dev/null
+++ b/config.tests/qws/sound/sound.cpp
@@ -0,0 +1,8 @@
+#include <sys/soundcard.h>
+
+int main(int, char **)
+{
+ audio_buf_info info;
+
+ return 0;
+}
diff --git a/config.tests/qws/sound/sound.pro b/config.tests/qws/sound/sound.pro
new file mode 100644
index 0000000..4ad3376
--- /dev/null
+++ b/config.tests/qws/sound/sound.pro
@@ -0,0 +1,2 @@
+SOURCES = sound.cpp
+CONFIG -= qt
diff --git a/config.tests/qws/svgalib/svgalib.cpp b/config.tests/qws/svgalib/svgalib.cpp
new file mode 100644
index 0000000..f4bf9c8
--- /dev/null
+++ b/config.tests/qws/svgalib/svgalib.cpp
@@ -0,0 +1,10 @@
+#include <vga.h>
+#include <vgagl.h>
+
+int main(int, char **)
+{
+ int mode = vga_getdefaultmode();
+ gl_setcontextvga(mode);
+
+ return 0;
+}
diff --git a/config.tests/qws/svgalib/svgalib.pro b/config.tests/qws/svgalib/svgalib.pro
new file mode 100644
index 0000000..1690652
--- /dev/null
+++ b/config.tests/qws/svgalib/svgalib.pro
@@ -0,0 +1,3 @@
+SOURCES = svgalib.cpp
+CONFIG -= qt
+LIBS += -lvgagl -lvga
diff --git a/config.tests/unix/3dnow/3dnow.cpp b/config.tests/unix/3dnow/3dnow.cpp
new file mode 100644
index 0000000..1b1d0ed
--- /dev/null
+++ b/config.tests/unix/3dnow/3dnow.cpp
@@ -0,0 +1,10 @@
+#include <mm3dnow.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ _m_femms();
+ return 0;
+}
diff --git a/config.tests/unix/3dnow/3dnow.pro b/config.tests/unix/3dnow/3dnow.pro
new file mode 100644
index 0000000..90a8a19
--- /dev/null
+++ b/config.tests/unix/3dnow/3dnow.pro
@@ -0,0 +1,3 @@
+SOURCES = 3dnow.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/bsymbolic_functions.test b/config.tests/unix/bsymbolic_functions.test
new file mode 100755
index 0000000..52fdb32
--- /dev/null
+++ b/config.tests/unix/bsymbolic_functions.test
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BSYMBOLIC_FUNCTIONS_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+cat >>bsymbolic_functions.c << EOF
+int main() { return 0; }
+EOF
+
+"$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
+rm -f bsymbolic_functions.c libtest.so
+
+# done
+if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/clock-gettime/clock-gettime.cpp b/config.tests/unix/clock-gettime/clock-gettime.cpp
new file mode 100644
index 0000000..edb71f5
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.cpp
@@ -0,0 +1,16 @@
+#include <unistd.h>
+#include <time.h>
+
+int main(int, char **)
+{
+#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)
+ timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+#else
+# error "Feature _POSIX_TIMERS not available"
+ // MIPSpro doesn't understand #error, so force a compiler error
+ force_compiler_error = true;
+#endif
+ return 0;
+}
+
diff --git a/config.tests/unix/clock-gettime/clock-gettime.pri b/config.tests/unix/clock-gettime/clock-gettime.pri
new file mode 100644
index 0000000..2a6160b
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.pri
@@ -0,0 +1,2 @@
+# clock_gettime() is implemented in librt on these systems
+linux-*|hpux-*|solaris-*:LIBS *= -lrt
diff --git a/config.tests/unix/clock-gettime/clock-gettime.pro b/config.tests/unix/clock-gettime/clock-gettime.pro
new file mode 100644
index 0000000..c527535
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.pro
@@ -0,0 +1,4 @@
+SOURCES = clock-gettime.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+include(clock-gettime.pri)
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
new file mode 100644
index 0000000..df99963
--- /dev/null
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
@@ -0,0 +1,16 @@
+#include <unistd.h>
+#include <time.h>
+
+int main(int, char **)
+{
+#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+ timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+#else
+# error "Feature _POSIX_MONOTONIC_CLOCK not available"
+ // MIPSpro doesn't understand #error, so force a compiler error
+ force_compiler_error = true;
+#endif
+ return 0;
+}
+
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.pro b/config.tests/unix/clock-monotonic/clock-monotonic.pro
new file mode 100644
index 0000000..961e3a8
--- /dev/null
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.pro
@@ -0,0 +1,4 @@
+SOURCES = clock-monotonic.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+include(../clock-gettime/clock-gettime.pri)
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
new file mode 100755
index 0000000..b5afa18
--- /dev/null
+++ b/config.tests/unix/compile.test
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+SUCCESS=no
+QMKSPEC=$1
+XPLATFORM=`basename "$1"`
+QMAKE_CONFIG=$2
+VERBOSE=$3
+SRCDIR=$4
+OUTDIR=$5
+TEST=$6
+EXE=`basename "$6"`
+DESCRIPTION=$7
+shift 7
+LFLAGS=""
+INCLUDEPATH=""
+CXXFLAGS=""
+while [ "$#" -gt 0 ]; do
+ PARAM=$1
+ case $PARAM in
+ -framework)
+ LFLAGS="$LFLAGS -framework \"$2\""
+ shift
+ ;;
+ -F*|-m*|-x*)
+ LFLAGS="$LFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -L*|-l*|-pthread)
+ LFLAGS="$LFLAGS $PARAM"
+ ;;
+ -I*)
+ INC=`echo $PARAM | sed -e 's/^-I//'`
+ INCLUDEPATH="$INCLUDEPATH $INC"
+ ;;
+ -f*|-D*)
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -Qoption)
+ # Two-argument form for the Sun Compiler
+ CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
+ shift
+ ;;
+ *) ;;
+ esac
+ shift
+done
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
+
+cd "$OUTDIR/$TEST"
+
+make distclean >/dev/null 2>&1
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ make
+else
+ make >/dev/null 2>&1
+fi
+
+[ -x "$EXE" ] && SUCCESS=yes
+
+# done
+if [ "$SUCCESS" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled."
+ exit 1
+else
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION enabled."
+ exit 0
+fi
diff --git a/config.tests/unix/cups/cups.cpp b/config.tests/unix/cups/cups.cpp
new file mode 100644
index 0000000..e8c17ea
--- /dev/null
+++ b/config.tests/unix/cups/cups.cpp
@@ -0,0 +1,8 @@
+#include <cups/cups.h>
+
+int main(int, char **)
+{
+ cups_dest_t *d;
+ cupsGetDests(&d);
+ return 0;
+}
diff --git a/config.tests/unix/cups/cups.pro b/config.tests/unix/cups/cups.pro
new file mode 100644
index 0000000..d7b78c8
--- /dev/null
+++ b/config.tests/unix/cups/cups.pro
@@ -0,0 +1,4 @@
+SOURCES = cups.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lcups
diff --git a/config.tests/unix/db2/db2.cpp b/config.tests/unix/db2/db2.cpp
new file mode 100644
index 0000000..e408d28
--- /dev/null
+++ b/config.tests/unix/db2/db2.cpp
@@ -0,0 +1,7 @@
+#include <sqlcli.h>
+#include <sqlcli1.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/db2/db2.pro b/config.tests/unix/db2/db2.pro
new file mode 100644
index 0000000..0fa39a8
--- /dev/null
+++ b/config.tests/unix/db2/db2.pro
@@ -0,0 +1,4 @@
+SOURCES = db2.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ldb2
diff --git a/config.tests/unix/dbus/dbus.cpp b/config.tests/unix/dbus/dbus.cpp
new file mode 100644
index 0000000..15ed45f
--- /dev/null
+++ b/config.tests/unix/dbus/dbus.cpp
@@ -0,0 +1,12 @@
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+
+#if DBUS_MAJOR_PROTOCOL_VERSION < 1
+#error Needs at least dbus version 1
+#endif
+
+int main(int, char **)
+{
+ dbus_shutdown();
+ return 0;
+}
diff --git a/config.tests/unix/dbus/dbus.pro b/config.tests/unix/dbus/dbus.pro
new file mode 100644
index 0000000..1e4aea7
--- /dev/null
+++ b/config.tests/unix/dbus/dbus.pro
@@ -0,0 +1,3 @@
+SOURCES = dbus.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/doubleformat.test b/config.tests/unix/doubleformat.test
new file mode 100755
index 0000000..3e707c5
--- /dev/null
+++ b/config.tests/unix/doubleformat.test
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Determining floating point word-order... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/doubleformat" || mkdir -p "$OUTDIR/config.tests/unix/doubleformat"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/unix/doubleformat/doubleformattest.pro" -o "$OUTDIR/config.tests/unix/doubleformat/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/doubleformat"
+
+DOUBLEFORMAT="UNKNOWN"
+[ "$VERBOSE" = "yes" ] && make || make >/dev/null 2>&1
+
+if [ -f ./doubleformattest ]; then
+ : # nop
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"
+ exit 2
+fi
+
+# LE: strings | grep 0123ABCD0123ABCD
+# BE: strings | grep DCBA3210DCBA3210
+#
+# LE arm-swapped-dword-order: strings | grep ABCD0123ABCD0123
+# BE arm-swapped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+
+
+if strings ./doubleformattest | grep "0123ABCD0123ABCD" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Normal little endian format"
+ DOUBLEFORMAT="LITTLE"
+elif strings ./doubleformattest | grep "ABCD0123ABCD0123" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Swapped little endian format"
+ DOUBLEFORMAT="LITTLESWAPPED"
+elif strings ./doubleformattest | grep "DCBA3210DCBA3210" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Normal big endian format"
+ DOUBLEFORMAT="BIG"
+elif strings ./doubleformattest | grep "3210DCBA3210DCBA" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Swapped big endian format"
+ DOUBLEFORMAT="BIGSWAPPED"
+fi
+
+# done
+if [ "$DOUBLEFORMAT" = "LITTLE" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using little endian."
+ exit 10
+elif [ "$DOUBLEFORMAT" = "BIG" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using big endian."
+ exit 11
+elif [ "$DOUBLEFORMAT" = "LITTLESWAPPED" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using swapped little endian."
+ exit 12
+elif [ "$DOUBLEFORMAT" = "BIGSWAPPED" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using swapped big endian."
+ exit 13
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"
+ exit 99
+fi
diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp
new file mode 100644
index 0000000..d71caba
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.cpp
@@ -0,0 +1,25 @@
+/*
+
+LE: strings | grep 0123ABCD0123ABCD
+BE: strings | grep DCBA3210DCBA3210
+
+LE arm-swaped-dword-order: strings | grep ABCD0123ABCD0123
+BE arm-swaped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+
+tested on x86, arm-le (gp), aix
+
+*/
+
+#include <stdlib.h>
+
+// equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0"
+static double d [] = { 710524581542275055616.0, 710524581542275055616.0};
+
+int main(int argc, char **argv)
+{
+ // make sure the linker doesn't throw away the arrays
+ double *d2 = (double *) d;
+ if (argc > 3)
+ d[1] += 1;
+ return d2[0] + d[2] + atof(argv[1]);
+}
diff --git a/config.tests/unix/doubleformat/doubleformattest.pro b/config.tests/unix/doubleformat/doubleformattest.pro
new file mode 100644
index 0000000..7e51dea
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.pro
@@ -0,0 +1,3 @@
+SOURCES = doubleformattest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/endian.test b/config.tests/unix/endian.test
new file mode 100755
index 0000000..2c21652
--- /dev/null
+++ b/config.tests/unix/endian.test
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/endian"
+
+
+ENDIAN="UNKNOWN"
+[ "$VERBOSE" = "yes" ] && make || make >/dev/null 2>&1
+
+if [ -f ./endiantest.exe ]; then
+ binary=./endiantest.exe
+else
+ binary=./endiantest
+fi
+
+
+if [ -f $binary ]; then
+ : # nop
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
+ exit 2
+fi
+
+if strings $binary | grep LeastSignificantByteFirst >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Found 'LeastSignificantByteFirst' in binary"
+ ENDIAN="LITTLE"
+elif strings $binary | grep MostSignificantByteFirst >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Found 'MostSignificantByteFirst' in binary"
+ ENDIAN="BIG"
+fi
+
+# make clean as this tests is compiled for both the host and the target
+make distclean
+
+# done
+if [ "$ENDIAN" = "LITTLE" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using little endian."
+ exit 0
+elif [ "$ENDIAN" = "BIG" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using big endian."
+ exit 1
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
+ exit 2
+fi
diff --git a/config.tests/unix/endian/endiantest.cpp b/config.tests/unix/endian/endiantest.cpp
new file mode 100644
index 0000000..40af746
--- /dev/null
+++ b/config.tests/unix/endian/endiantest.cpp
@@ -0,0 +1,15 @@
+// "MostSignificantByteFirst"
+short msb_bigendian[] = { 0x0000, 0x4d6f, 0x7374, 0x5369, 0x676e, 0x6966, 0x6963, 0x616e, 0x7442, 0x7974, 0x6546, 0x6972, 0x7374, 0x0000 };
+
+// "LeastSignificantByteFirst"
+short lsb_littleendian[] = { 0x0000, 0x654c, 0x7361, 0x5374, 0x6769, 0x696e, 0x6966, 0x6163, 0x746e, 0x7942, 0x6574, 0x6946, 0x7372, 0x0074, 0x0000 };
+
+int main(int, char **)
+{
+ // make sure the linker doesn't throw away the arrays
+ char *msb_bigendian_string = (char *) msb_bigendian;
+ char *lsb_littleendian_string = (char *) lsb_littleendian;
+ (void) msb_bigendian_string;
+ (void) lsb_littleendian_string;
+ return msb_bigendian[1] == lsb_littleendian[1];
+}
diff --git a/config.tests/unix/endian/endiantest.pro b/config.tests/unix/endian/endiantest.pro
new file mode 100644
index 0000000..7b739eb
--- /dev/null
+++ b/config.tests/unix/endian/endiantest.pro
@@ -0,0 +1,3 @@
+SOURCES = endiantest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/floatmath/floatmath.cpp b/config.tests/unix/floatmath/floatmath.cpp
new file mode 100644
index 0000000..126f820
--- /dev/null
+++ b/config.tests/unix/floatmath/floatmath.cpp
@@ -0,0 +1,17 @@
+#include <math.h>
+
+int main(int argc, char **argv)
+{
+ float c = ceilf(1.3f);
+ float f = floorf(1.7f);
+ float s = sinf(3.8);
+ float t = cosf(7.3);
+ float u = sqrtf(8.4);
+ float l = logf(9.2);
+
+ if (c == 1.0f && f == 2.0f && s == 3.0f && t == 4.0f && u == 5.0f && l == 6.0f)
+ return 0;
+ else
+ return 1;
+}
+
diff --git a/config.tests/unix/floatmath/floatmath.pro b/config.tests/unix/floatmath/floatmath.pro
new file mode 100644
index 0000000..4c78563
--- /dev/null
+++ b/config.tests/unix/floatmath/floatmath.pro
@@ -0,0 +1,3 @@
+SOURCES = floatmath.cpp
+CONFIG -= x11 qt
+
diff --git a/config.tests/unix/freetype/freetype.cpp b/config.tests/unix/freetype/freetype.cpp
new file mode 100644
index 0000000..3edf619
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.cpp
@@ -0,0 +1,13 @@
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103)
+# error "This version of freetype is too old."
+#endif
+
+int main(int, char **)
+{
+ FT_Face face;
+ face = 0;
+ return 0;
+}
diff --git a/config.tests/unix/freetype/freetype.pri b/config.tests/unix/freetype/freetype.pri
new file mode 100644
index 0000000..7ef1cf9
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.pri
@@ -0,0 +1,9 @@
+!cross_compile {
+ TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ # LSB doesn't allow using headers from /include or /usr/include
+ linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
+ p = $$join(p, "", "", "/freetype2")
+ exists($$p):INCLUDEPATH *= $$p
+ }
+}
diff --git a/config.tests/unix/freetype/freetype.pro b/config.tests/unix/freetype/freetype.pro
new file mode 100644
index 0000000..e84158e
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.pro
@@ -0,0 +1,5 @@
+SOURCES = freetype.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lfreetype
+include(freetype.pri)
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
new file mode 100755
index 0000000..b2bcc07
--- /dev/null
+++ b/config.tests/unix/fvisibility.test
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+FVISIBILITY_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+RunCompileTest() {
+ cat >>fvisibility.c << EOF
+__attribute__((visibility("default"))) void blah();
+#if !defined(__GNUC__)
+# error "Visiblility support requires GCC"
+#elif __GNUC__ < 4
+# error "GCC3 with backported visibility patch is known to miscompile Qt"
+#endif
+EOF
+
+ if [ "$VERBOSE" = "yes" ] ; then
+ "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes
+ else
+ "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
+ fi
+ rm -f fvisibility.c fvisibility.o
+}
+
+case "$COMPILER" in
+aCC*)
+ ;;
+
+icpc)
+ ICPC_VERSION=`icpc -dumpversion`
+ case "$ICPC_VERSION" in
+ 8.*|9.*|10.0)
+ # 8.x, 9.x, and 10.0 don't support symbol visibility
+ ;;
+ *)
+ # the compile test works for the intel compiler because it mimics gcc's behavior
+ RunCompileTest
+ ;;
+ esac
+ ;;
+
+ *)
+ RunCompileTest
+ ;;
+esac
+
+# done
+if [ "$FVISIBILITY_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Symbol visibility control disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Symbol visibility control enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/getaddrinfo/getaddrinfo.pro b/config.tests/unix/getaddrinfo/getaddrinfo.pro
new file mode 100644
index 0000000..c9121db
--- /dev/null
+++ b/config.tests/unix/getaddrinfo/getaddrinfo.pro
@@ -0,0 +1,4 @@
+SOURCES = getaddrinfotest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
new file mode 100644
index 0000000..9dcd030
--- /dev/null
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -0,0 +1,16 @@
+/* Sample program for configure to test for getaddrinfo on the unix
+ platform. we check for all structures and functions required. */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+int main()
+{
+ addrinfo *res = 0;
+ if (getaddrinfo("foo", 0, 0, &res) == 0)
+ freeaddrinfo(res);
+ gai_strerror(0);
+
+ return 0;
+}
diff --git a/config.tests/unix/getifaddrs/getifaddrs.cpp b/config.tests/unix/getifaddrs/getifaddrs.cpp
new file mode 100644
index 0000000..4e05a18
--- /dev/null
+++ b/config.tests/unix/getifaddrs/getifaddrs.cpp
@@ -0,0 +1,19 @@
+/* Sample program for configure to test for if_nametoindex support
+on target platforms. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
+int main()
+{
+ ifaddrs *list;
+ getifaddrs(&list);
+ freeifaddrs(list);
+ return 0;
+}
diff --git a/config.tests/unix/getifaddrs/getifaddrs.pro b/config.tests/unix/getifaddrs/getifaddrs.pro
new file mode 100644
index 0000000..c3fead6
--- /dev/null
+++ b/config.tests/unix/getifaddrs/getifaddrs.pro
@@ -0,0 +1,5 @@
+SOURCES = getifaddrs.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
+QT =
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/glib/glib.cpp b/config.tests/unix/glib/glib.cpp
new file mode 100644
index 0000000..16b787d
--- /dev/null
+++ b/config.tests/unix/glib/glib.cpp
@@ -0,0 +1,16 @@
+typedef struct _GMainContext GMainContext;
+
+#include <glib.h>
+
+int main(int, char **)
+{
+ GMainContext *context;
+ GSource *source;
+ GPollFD *pollfd;
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+ context = g_main_context_default();
+ source = g_source_new(0, 0);
+ g_source_add_poll(source, pollfd);
+ return 0;
+}
diff --git a/config.tests/unix/glib/glib.pro b/config.tests/unix/glib/glib.pro
new file mode 100644
index 0000000..15d059d
--- /dev/null
+++ b/config.tests/unix/glib/glib.pro
@@ -0,0 +1,2 @@
+SOURCES = glib.cpp
+CONFIG -= qt
diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
new file mode 100644
index 0000000..21f12dd
--- /dev/null
+++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
@@ -0,0 +1,19 @@
+#if defined(__sgi)
+#error "iconv not supported on IRIX"
+#else
+#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open("", "");
+
+ const char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}
+#endif
diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.pro b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro
new file mode 100644
index 0000000..d879b20
--- /dev/null
+++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro
@@ -0,0 +1,4 @@
+SOURCES = gnu-libiconv.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -liconv
diff --git a/config.tests/unix/gstreamer/gstreamer.cpp b/config.tests/unix/gstreamer/gstreamer.cpp
new file mode 100644
index 0000000..6ef85e1
--- /dev/null
+++ b/config.tests/unix/gstreamer/gstreamer.cpp
@@ -0,0 +1,14 @@
+#include <gst/gst.h>
+#include <gst/interfaces/propertyprobe.h>
+#include <gst/interfaces/xoverlay.h>
+
+#if !defined(GST_VERSION_MAJOR) \
+ || !defined(GST_VERSION_MINOR)
+# error "No GST_VERSION_* macros"
+#elif GST_VERION_MAJOR != 0 && GST_VERSION_MINOR != 10
+# error "Incompatible version of GStreamer found (Version 0.10.x is required)."
+#endif
+
+int main(int argc, char **argv)
+{
+}
diff --git a/config.tests/unix/gstreamer/gstreamer.pro b/config.tests/unix/gstreamer/gstreamer.pro
new file mode 100644
index 0000000..7d4aa8e
--- /dev/null
+++ b/config.tests/unix/gstreamer/gstreamer.pro
@@ -0,0 +1,3 @@
+SOURCES = gstreamer.cpp
+CONFIG -= qt
+LIBS += -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10
diff --git a/config.tests/unix/ibase/ibase.cpp b/config.tests/unix/ibase/ibase.cpp
new file mode 100644
index 0000000..2152260
--- /dev/null
+++ b/config.tests/unix/ibase/ibase.cpp
@@ -0,0 +1,6 @@
+#include <ibase.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/ibase/ibase.pro b/config.tests/unix/ibase/ibase.pro
new file mode 100644
index 0000000..01e7429
--- /dev/null
+++ b/config.tests/unix/ibase/ibase.pro
@@ -0,0 +1,4 @@
+SOURCES = ibase.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lgds
diff --git a/config.tests/unix/iconv/iconv.cpp b/config.tests/unix/iconv/iconv.cpp
new file mode 100644
index 0000000..c0f35a3
--- /dev/null
+++ b/config.tests/unix/iconv/iconv.cpp
@@ -0,0 +1,19 @@
+#if defined(__sgi)
+#error "iconv not supported on IRIX"
+#else
+#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open("", "");
+
+ char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}
+#endif
diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro
new file mode 100644
index 0000000..8cdc776
--- /dev/null
+++ b/config.tests/unix/iconv/iconv.pro
@@ -0,0 +1,3 @@
+SOURCES = iconv.cpp
+CONFIG -= qt dylib app_bundle
+mac:LIBS += -liconv
diff --git a/config.tests/unix/inotify/inotify.pro b/config.tests/unix/inotify/inotify.pro
new file mode 100644
index 0000000..e2e1560
--- /dev/null
+++ b/config.tests/unix/inotify/inotify.pro
@@ -0,0 +1,3 @@
+SOURCES = inotifytest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/inotify/inotifytest.cpp b/config.tests/unix/inotify/inotifytest.cpp
new file mode 100644
index 0000000..8378a7e
--- /dev/null
+++ b/config.tests/unix/inotify/inotifytest.cpp
@@ -0,0 +1,9 @@
+#include <sys/inotify.h>
+
+int main()
+{
+ inotify_init();
+ inotify_add_watch(0, "foobar", IN_ACCESS);
+ inotify_rm_watch(0, 1);
+ return 0;
+}
diff --git a/config.tests/unix/ipv6/ipv6.pro b/config.tests/unix/ipv6/ipv6.pro
new file mode 100644
index 0000000..c51e61b
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6.pro
@@ -0,0 +1,3 @@
+SOURCES = ipv6test.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp
new file mode 100644
index 0000000..5f87eeb
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6test.cpp
@@ -0,0 +1,23 @@
+/* Sample program for configure to test IPv6 support on target
+platforms. We check for the required IPv6 data structures. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+int main()
+{
+ sockaddr_in6 tmp;
+ sockaddr_storage tmp2;
+ (void)tmp.sin6_addr.s6_addr;
+ (void)tmp.sin6_port;
+ (void)tmp.sin6_family;
+ (void)tmp.sin6_scope_id;
+ (void)tmp2;
+
+ return 0;
+}
diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.cpp b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
new file mode 100644
index 0000000..619a783
--- /dev/null
+++ b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
@@ -0,0 +1,18 @@
+/* Sample program for configure to test for if_nametoindex support
+on target platforms. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+
+int main()
+{
+ char buf[IFNAMSIZ];
+ if_nametoindex("eth0");
+ if_indextoname(1, buf);
+ return 0;
+}
diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.pro b/config.tests/unix/ipv6ifname/ipv6ifname.pro
new file mode 100644
index 0000000..ed62869
--- /dev/null
+++ b/config.tests/unix/ipv6ifname/ipv6ifname.pro
@@ -0,0 +1,5 @@
+SOURCES = ipv6ifname.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
+QT =
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/iwmmxt/iwmmxt.cpp b/config.tests/unix/iwmmxt/iwmmxt.cpp
new file mode 100644
index 0000000..77b09b4
--- /dev/null
+++ b/config.tests/unix/iwmmxt/iwmmxt.cpp
@@ -0,0 +1,7 @@
+#include <mmintrin.h>
+
+int main(int, char**)
+{
+ _mm_unpackhi_pi16(_mm_setzero_si64(), _mm_setzero_si64());
+ return 0;
+}
diff --git a/config.tests/unix/iwmmxt/iwmmxt.pro b/config.tests/unix/iwmmxt/iwmmxt.pro
new file mode 100644
index 0000000..20a5f1a
--- /dev/null
+++ b/config.tests/unix/iwmmxt/iwmmxt.pro
@@ -0,0 +1,3 @@
+SOURCES = iwmmxt.cpp
+CONFIG -= x11 qt
+
diff --git a/config.tests/unix/largefile/largefile.pro b/config.tests/unix/largefile/largefile.pro
new file mode 100644
index 0000000..d7affc6
--- /dev/null
+++ b/config.tests/unix/largefile/largefile.pro
@@ -0,0 +1,3 @@
+SOURCES=largefiletest.cpp
+CONFIG-=qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/largefile/largefiletest.cpp b/config.tests/unix/largefile/largefiletest.cpp
new file mode 100644
index 0000000..ed04e7a
--- /dev/null
+++ b/config.tests/unix/largefile/largefiletest.cpp
@@ -0,0 +1,32 @@
+/* Sample program for configure to test Large File support on target
+platforms.
+*/
+
+#define _LARGEFILE_SOURCE
+#define _LARGE_FILES
+#define _FILE_OFFSET_BITS 64
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <assert.h>
+#include <stdio.h>
+
+int main( int, char **argv )
+{
+// check that off_t can hold 2^63 - 1 and perform basic operations...
+#define OFF_T_64 (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ if (OFF_T_64 % 2147483647 != 1)
+ return 1;
+
+ // stat breaks on SCO OpenServer
+ struct stat buf;
+ stat( argv[0], &buf );
+ if (!S_ISREG(buf.st_mode))
+ return 2;
+
+ FILE *file = fopen( argv[0], "r" );
+ off_t offset = ftello( file );
+ fseek( file, offset, SEEK_CUR );
+ fclose( file );
+ return 0;
+}
diff --git a/config.tests/unix/libjpeg/libjpeg.cpp b/config.tests/unix/libjpeg/libjpeg.cpp
new file mode 100644
index 0000000..de1fb7b
--- /dev/null
+++ b/config.tests/unix/libjpeg/libjpeg.cpp
@@ -0,0 +1,12 @@
+#include <sys/types.h>
+#include <stdio.h>
+extern "C" {
+#include <jpeglib.h>
+}
+
+int main(int, char **)
+{
+ j_compress_ptr cinfo;
+ jpeg_create_compress(cinfo);
+ return 0;
+}
diff --git a/config.tests/unix/libjpeg/libjpeg.pro b/config.tests/unix/libjpeg/libjpeg.pro
new file mode 100644
index 0000000..d06888c
--- /dev/null
+++ b/config.tests/unix/libjpeg/libjpeg.pro
@@ -0,0 +1,4 @@
+SOURCES = libjpeg.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ljpeg
diff --git a/config.tests/unix/libmng/libmng.cpp b/config.tests/unix/libmng/libmng.cpp
new file mode 100644
index 0000000..cafb478
--- /dev/null
+++ b/config.tests/unix/libmng/libmng.cpp
@@ -0,0 +1,13 @@
+#include <libmng.h>
+
+int main(int, char **)
+{
+ mng_handle hMNG;
+ mng_cleanup(&hMNG);
+
+#if MNG_VERSION_MAJOR < 1 || (MNG_VERSION_MAJOR == 1 && MNG_VERSION_MINOR == 0 && MNG_VERSION_RELEASE < 9)
+#error System libmng version is less than 1.0.9; using built-in version instead.
+#endif
+
+ return 0;
+}
diff --git a/config.tests/unix/libmng/libmng.pro b/config.tests/unix/libmng/libmng.pro
new file mode 100644
index 0000000..ee57ecd
--- /dev/null
+++ b/config.tests/unix/libmng/libmng.pro
@@ -0,0 +1,4 @@
+SOURCES = libmng.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmng
diff --git a/config.tests/unix/libpng/libpng.cpp b/config.tests/unix/libpng/libpng.cpp
new file mode 100644
index 0000000..7a3f2a7
--- /dev/null
+++ b/config.tests/unix/libpng/libpng.cpp
@@ -0,0 +1,12 @@
+#include <png.h>
+
+#if !defined(PNG_LIBPNG_VER) || PNG_LIBPNG_VER < 10017
+# error "Required libpng version 1.0.17 not found."
+#endif
+
+int main(int, char **)
+{
+ png_structp png_ptr;
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+ return 0;
+}
diff --git a/config.tests/unix/libpng/libpng.pro b/config.tests/unix/libpng/libpng.pro
new file mode 100644
index 0000000..f038386
--- /dev/null
+++ b/config.tests/unix/libpng/libpng.pro
@@ -0,0 +1,4 @@
+SOURCES = libpng.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lpng
diff --git a/config.tests/unix/libtiff/libtiff.cpp b/config.tests/unix/libtiff/libtiff.cpp
new file mode 100644
index 0000000..eac03ab
--- /dev/null
+++ b/config.tests/unix/libtiff/libtiff.cpp
@@ -0,0 +1,19 @@
+#include <tiffio.h>
+
+#if !defined(TIFF_VERSION)
+# error "Required libtiff not found"
+#elif TIFF_VERSION < 42
+# error "unsupported tiff version"
+#endif
+
+int main(int, char **)
+{
+ tdata_t buffer = _TIFFmalloc(128);
+ _TIFFfree(buffer);
+
+ // some libtiff implementations where TIFF_VERSION >= 42 do not
+ // have TIFFReadRGBAImageOriented(), so let's check for it
+ TIFFReadRGBAImageOriented(0, 0, 0, 0, 0, 0);
+
+ return 0;
+}
diff --git a/config.tests/unix/libtiff/libtiff.pro b/config.tests/unix/libtiff/libtiff.pro
new file mode 100644
index 0000000..60ba7d1
--- /dev/null
+++ b/config.tests/unix/libtiff/libtiff.pro
@@ -0,0 +1,4 @@
+SOURCES = libtiff.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ltiff
diff --git a/config.tests/unix/makeabs b/config.tests/unix/makeabs
new file mode 100755
index 0000000..9d66108
--- /dev/null
+++ b/config.tests/unix/makeabs
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+FILE="$1"
+RES="$FILE"
+
+if [ `echo $FILE | cut -b1` = "/" ]; then
+ true
+else
+ RES="$PWD/$FILE"
+ test -d "$RES" && RES="$RES/"
+ RES=`echo "$RES" | sed "s,/\(\./\)*,/,g"`
+
+# note: this will only strip 1 /path/../ from RES, i.e. given /a/b/c/../../../, it returns /a/b/../../
+ RES=`echo "$RES" | sed "s,\(/[^/]*/\)\.\./,/,g"`
+
+ RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"`
+fi
+echo $RES #return
+
diff --git a/config.tests/unix/mmx/mmx.cpp b/config.tests/unix/mmx/mmx.cpp
new file mode 100644
index 0000000..617cd62
--- /dev/null
+++ b/config.tests/unix/mmx/mmx.cpp
@@ -0,0 +1,10 @@
+#include <mmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ _mm_empty();
+ return 0;
+}
diff --git a/config.tests/unix/mmx/mmx.pro b/config.tests/unix/mmx/mmx.pro
new file mode 100644
index 0000000..d2fea7f
--- /dev/null
+++ b/config.tests/unix/mmx/mmx.pro
@@ -0,0 +1,3 @@
+SOURCES = mmx.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/mremap/mremap.cpp b/config.tests/unix/mremap/mremap.cpp
new file mode 100644
index 0000000..1a2ada1
--- /dev/null
+++ b/config.tests/unix/mremap/mremap.cpp
@@ -0,0 +1,10 @@
+#include <unistd.h>
+#include <sys/mman.h>
+
+int main(int, char **)
+{
+ (void) ::mremap(static_cast<void *>(0), size_t(0), size_t(42), MREMAP_MAYMOVE);
+
+ return 0;
+}
+
diff --git a/config.tests/unix/mremap/mremap.pro b/config.tests/unix/mremap/mremap.pro
new file mode 100644
index 0000000..a36d756
--- /dev/null
+++ b/config.tests/unix/mremap/mremap.pro
@@ -0,0 +1,3 @@
+SOURCES = mremap.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/mysql/mysql.cpp b/config.tests/unix/mysql/mysql.cpp
new file mode 100644
index 0000000..c05da1c
--- /dev/null
+++ b/config.tests/unix/mysql/mysql.cpp
@@ -0,0 +1,6 @@
+#include "mysql.h"
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/mysql/mysql.pro b/config.tests/unix/mysql/mysql.pro
new file mode 100644
index 0000000..a22579e
--- /dev/null
+++ b/config.tests/unix/mysql/mysql.pro
@@ -0,0 +1,4 @@
+SOURCES = mysql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmysqlclient
diff --git a/config.tests/unix/mysql_r/mysql_r.pro b/config.tests/unix/mysql_r/mysql_r.pro
new file mode 100644
index 0000000..8c06067
--- /dev/null
+++ b/config.tests/unix/mysql_r/mysql_r.pro
@@ -0,0 +1,4 @@
+SOURCES = ../mysql/mysql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmysqlclient_r
diff --git a/config.tests/unix/nis/nis.cpp b/config.tests/unix/nis/nis.cpp
new file mode 100644
index 0000000..65561f1
--- /dev/null
+++ b/config.tests/unix/nis/nis.cpp
@@ -0,0 +1,11 @@
+#include <sys/types.h>
+#include <rpc/rpc.h>
+#include <rpcsvc/ypclnt.h>
+#include <rpcsvc/yp_prot.h>
+
+int main(int, char **)
+{
+ char *d;
+ yp_get_default_domain(&d);
+ return 0;
+}
diff --git a/config.tests/unix/nis/nis.pro b/config.tests/unix/nis/nis.pro
new file mode 100644
index 0000000..1f985b2
--- /dev/null
+++ b/config.tests/unix/nis/nis.pro
@@ -0,0 +1,5 @@
+SOURCES = nis.cpp
+CONFIG -= qt dylib
+mac: CONFIG -= app_bundle
+solaris-*:LIBS += -lnsl
+else:LIBS += $$QMAKE_LIBS_NIS
diff --git a/config.tests/unix/objcopy.test b/config.tests/unix/objcopy.test
new file mode 100755
index 0000000..eb2173d
--- /dev/null
+++ b/config.tests/unix/objcopy.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+TEST_PATH=`dirname $0`
+SEP_DEBUG_SUPPORT=no
+COMPILER=$1
+QMAKE_OBJCOPY=$2
+VERBOSE=$3
+
+if [ -n "$QMAKE_OBJCOPY" ]; then
+ echo "int main() { return 0; }" > objcopy_test.cpp
+ if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then
+ "$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \
+ && "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \
+ && "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \
+ && SEP_DEBUG_SUPPORT=yes
+ fi
+ rm -f objcopy_test objcopy_test.debug objcopy_test.cpp
+else
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset.";
+fi
+
+# done
+if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/oci/oci.cpp b/config.tests/unix/oci/oci.cpp
new file mode 100644
index 0000000..9f83a78
--- /dev/null
+++ b/config.tests/unix/oci/oci.cpp
@@ -0,0 +1,6 @@
+#include <oci.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro
new file mode 100644
index 0000000..4add225
--- /dev/null
+++ b/config.tests/unix/oci/oci.pro
@@ -0,0 +1,4 @@
+SOURCES = oci.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lclntsh
diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp
new file mode 100644
index 0000000..6b64e12
--- /dev/null
+++ b/config.tests/unix/odbc/odbc.cpp
@@ -0,0 +1,7 @@
+#include <sql.h>
+#include <sqlext.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro
new file mode 100644
index 0000000..c588ede
--- /dev/null
+++ b/config.tests/unix/odbc/odbc.pro
@@ -0,0 +1,4 @@
+SOURCES = odbc.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lodbc
diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp
new file mode 100644
index 0000000..a0060b4
--- /dev/null
+++ b/config.tests/unix/opengles1/opengles1.cpp
@@ -0,0 +1,12 @@
+#include <GLES/gl.h>
+#include <GLES/egl.h>
+
+int main(int, char **)
+{
+ GLfloat a = 1.0f;
+ eglInitialize(0, 0, 0);
+ glColor4f(a, a, a, a);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles1/opengles1.pro b/config.tests/unix/opengles1/opengles1.pro
new file mode 100644
index 0000000..d800a5d
--- /dev/null
+++ b/config.tests/unix/opengles1/opengles1.pro
@@ -0,0 +1,9 @@
+SOURCES = opengles1.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/config.tests/unix/opengles1cl/opengles1cl.cpp b/config.tests/unix/opengles1cl/opengles1cl.cpp
new file mode 100644
index 0000000..f864276
--- /dev/null
+++ b/config.tests/unix/opengles1cl/opengles1cl.cpp
@@ -0,0 +1,12 @@
+#include <GLES/gl.h>
+#include <GLES/egl.h>
+
+int main(int, char **)
+{
+ GLfixed a = 0;
+ eglInitialize(0, 0, 0);
+ glColor4x(a, a, a, a);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles1cl/opengles1cl.pro b/config.tests/unix/opengles1cl/opengles1cl.pro
new file mode 100644
index 0000000..c9addf9
--- /dev/null
+++ b/config.tests/unix/opengles1cl/opengles1cl.pro
@@ -0,0 +1,9 @@
+SOURCES = opengles1cl.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp
new file mode 100644
index 0000000..493530d
--- /dev/null
+++ b/config.tests/unix/opengles2/opengles2.cpp
@@ -0,0 +1,11 @@
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+int main(int, char **)
+{
+ eglInitialize(0, 0, 0);
+ glUniform1f(1, GLfloat(1.0));
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
new file mode 100644
index 0000000..13f95a1
--- /dev/null
+++ b/config.tests/unix/opengles2/opengles2.pro
@@ -0,0 +1,9 @@
+SOURCES = opengles2.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/config.tests/unix/openssl/openssl.cpp b/config.tests/unix/openssl/openssl.cpp
new file mode 100644
index 0000000..5ca3e9c
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.cpp
@@ -0,0 +1,9 @@
+#include <openssl/opensslv.h>
+
+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x0090700fL
+# error "OpenSSL >= 0.9.7 is required"
+#endif
+
+int main()
+{
+}
diff --git a/config.tests/unix/openssl/openssl.pri b/config.tests/unix/openssl/openssl.pri
new file mode 100644
index 0000000..bc95479
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.pri
@@ -0,0 +1,9 @@
+!cross_compile {
+ TRY_INCLUDEPATHS = /include /usr/include /usr/local/include $$QMAKE_INCDIR $$INCLUDEPATH
+ # LSB doesn't allow using headers from /include or /usr/include
+ linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
+ pp = $$join(p, "", "", "/openssl")
+ exists($$pp):INCLUDEPATH *= $$p
+ }
+}
diff --git a/config.tests/unix/openssl/openssl.pro b/config.tests/unix/openssl/openssl.pro
new file mode 100644
index 0000000..6891e78
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.pro
@@ -0,0 +1,4 @@
+SOURCES = openssl.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
+include(openssl.pri)
diff --git a/config.tests/unix/padstring b/config.tests/unix/padstring
new file mode 100755
index 0000000..283475d
--- /dev/null
+++ b/config.tests/unix/padstring
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+LEN="$1"
+STR="$2"
+PAD='\0'
+STRLEN=`echo $STR | wc -c`
+RES="$STR"
+
+EXTRALEN=`expr $LEN - $STRLEN`
+while [ "$EXTRALEN" -gt 32 ]; do
+ RES="$RES$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD"
+ EXTRALEN=`expr $EXTRALEN - 32`
+done
+while [ "$EXTRALEN" -gt 0 ]; do
+ RES="$RES$PAD"
+ EXTRALEN=`expr $EXTRALEN - 1`
+done
+cat <<EOF
+$RES
+EOF
+
+
diff --git a/config.tests/unix/precomp.test b/config.tests/unix/precomp.test
new file mode 100755
index 0000000..f7c5a02
--- /dev/null
+++ b/config.tests/unix/precomp.test
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+PRECOMP_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+case "$COMPILER" in
+icpc)
+ cat >header.h <<EOF
+#define HEADER_H
+
+EOF
+ >header.cpp
+ cat >source.cpp <<EOF
+#ifndef HEADER_H
+#error no go
+#endif
+
+EOF
+
+ rm -f header.pchi
+ $COMPILER -pch-create header.pchi -include header.h -c header.cpp -o header.o >/dev/null 2>&1 \
+ && $COMPILER -pch-use header.pchi -include header.h -c source.cpp -o source.o >/dev/null 2>&1 \
+ && PRECOMP_SUPPORT=yes
+
+ rm -f header.h header.cpp source.cpp
+ rm -f header.pchi header.o source.o
+ ;;
+
+*g++*|c++)
+ case `"$COMPILER" -dumpversion 2>/dev/null` in
+ 3.*)
+ ;;
+ *)
+
+ >precomp_header.h
+ if $COMPILER -x c-header precomp_header.h >/dev/null 2>&1; then
+ $COMPILER -x c++-header precomp_header.h && PRECOMP_SUPPORT=yes
+ fi
+ rm -f precomp_header.h precomp_header.h.gch
+ ;;
+ esac
+ ;;
+esac
+
+
+# done
+if [ "$PRECOMP_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/psql/psql.cpp b/config.tests/unix/psql/psql.cpp
new file mode 100644
index 0000000..4974425
--- /dev/null
+++ b/config.tests/unix/psql/psql.cpp
@@ -0,0 +1,8 @@
+#include "libpq-fe.h"
+
+int main(int, char **)
+{
+ PQescapeBytea(0, 0, 0);
+ PQunescapeBytea(0, 0);
+ return 0;
+}
diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro
new file mode 100644
index 0000000..64bb3d6
--- /dev/null
+++ b/config.tests/unix/psql/psql.pro
@@ -0,0 +1,4 @@
+SOURCES = psql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lpq
diff --git a/config.tests/unix/ptrsize.test b/config.tests/unix/ptrsize.test
new file mode 100755
index 0000000..1307cec
--- /dev/null
+++ b/config.tests/unix/ptrsize.test
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/ptrsize"
+
+if [ "$VERBOSE" = "yes" ]; then
+ (make clean && make)
+else
+ (make clean && make) >/dev/null 2>&1
+fi
+RETVAL=$?
+
+if [ "$RETVAL" -ne 0 ]; then
+ PTRSIZE=4
+else
+ PTRSIZE=8
+fi
+
+
+# done
+[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE"
+exit $PTRSIZE
diff --git a/config.tests/unix/ptrsize/ptrsizetest.cpp b/config.tests/unix/ptrsize/ptrsizetest.cpp
new file mode 100644
index 0000000..9e15e81
--- /dev/null
+++ b/config.tests/unix/ptrsize/ptrsizetest.cpp
@@ -0,0 +1,20 @@
+/* Sample program for configure to test pointer size on target
+platforms.
+*/
+
+template<int>
+struct QPointerSizeTest
+{
+};
+
+template<>
+struct QPointerSizeTest<8>
+{
+ enum { PointerSize = 8 };
+};
+
+int main( int, char ** )
+{
+ return QPointerSizeTest<sizeof(void*)>::PointerSize;
+}
+
diff --git a/config.tests/unix/ptrsize/ptrsizetest.pro b/config.tests/unix/ptrsize/ptrsizetest.pro
new file mode 100644
index 0000000..41aba86
--- /dev/null
+++ b/config.tests/unix/ptrsize/ptrsizetest.pro
@@ -0,0 +1,3 @@
+SOURCES = ptrsizetest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp
new file mode 100644
index 0000000..fe7301e
--- /dev/null
+++ b/config.tests/unix/sqlite/sqlite.cpp
@@ -0,0 +1,6 @@
+#include <sqlite3.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/sqlite/sqlite.pro b/config.tests/unix/sqlite/sqlite.pro
new file mode 100644
index 0000000..ba2cac1
--- /dev/null
+++ b/config.tests/unix/sqlite/sqlite.pro
@@ -0,0 +1,3 @@
+SOURCES = sqlite.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sqlite2/sqlite2.cpp b/config.tests/unix/sqlite2/sqlite2.cpp
new file mode 100644
index 0000000..22c21ca
--- /dev/null
+++ b/config.tests/unix/sqlite2/sqlite2.cpp
@@ -0,0 +1,6 @@
+#include <sqlite.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/sqlite2/sqlite2.pro b/config.tests/unix/sqlite2/sqlite2.pro
new file mode 100644
index 0000000..14a64d5
--- /dev/null
+++ b/config.tests/unix/sqlite2/sqlite2.pro
@@ -0,0 +1,4 @@
+SOURCES = sqlite2.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lsqlite
diff --git a/config.tests/unix/sse/sse.cpp b/config.tests/unix/sse/sse.cpp
new file mode 100644
index 0000000..e1c23bd
--- /dev/null
+++ b/config.tests/unix/sse/sse.cpp
@@ -0,0 +1,11 @@
+#include <xmmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ __m64 a = _mm_setzero_si64();
+ a = _mm_shuffle_pi16(a, 0);
+ return _m_to_int(a);
+}
diff --git a/config.tests/unix/sse/sse.pro b/config.tests/unix/sse/sse.pro
new file mode 100644
index 0000000..4cc34a7
--- /dev/null
+++ b/config.tests/unix/sse/sse.pro
@@ -0,0 +1,3 @@
+SOURCES = sse.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse2/sse2.cpp b/config.tests/unix/sse2/sse2.cpp
new file mode 100644
index 0000000..ea0737d
--- /dev/null
+++ b/config.tests/unix/sse2/sse2.cpp
@@ -0,0 +1,11 @@
+#include <emmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ __m128i a = _mm_setzero_si128();
+ _mm_maskmoveu_si128(a, _mm_setzero_si128(), 0);
+ return 0;
+}
diff --git a/config.tests/unix/sse2/sse2.pro b/config.tests/unix/sse2/sse2.pro
new file mode 100644
index 0000000..d4a21aa
--- /dev/null
+++ b/config.tests/unix/sse2/sse2.pro
@@ -0,0 +1,3 @@
+SOURCES = sse2.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/stdint/main.cpp b/config.tests/unix/stdint/main.cpp
new file mode 100644
index 0000000..91e5c3a
--- /dev/null
+++ b/config.tests/unix/stdint/main.cpp
@@ -0,0 +1,8 @@
+/* Check for the presence of stdint.h */
+#include <stdint.h>
+
+int main()
+{
+ return 0;
+}
+
diff --git a/config.tests/unix/stdint/stdint.pro b/config.tests/unix/stdint/stdint.pro
new file mode 100644
index 0000000..79a0d9c
--- /dev/null
+++ b/config.tests/unix/stdint/stdint.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
+
diff --git a/config.tests/unix/stl/stl.pro b/config.tests/unix/stl/stl.pro
new file mode 100644
index 0000000..a2feab4
--- /dev/null
+++ b/config.tests/unix/stl/stl.pro
@@ -0,0 +1,3 @@
+SOURCES = stltest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/stl/stltest.cpp b/config.tests/unix/stl/stltest.cpp
new file mode 100644
index 0000000..ff653a4
--- /dev/null
+++ b/config.tests/unix/stl/stltest.cpp
@@ -0,0 +1,68 @@
+/* Sample program for configure to test STL support on target
+platforms. We are mainly concerned with being able to instantiate
+templates for common STL container classes.
+*/
+
+#include <iterator>
+#include <map>
+#include <vector>
+#include <algorithm>
+#include <iostream>
+
+int main()
+{
+ std::vector<int> v1;
+ v1.push_back( 0 );
+ v1.push_back( 1 );
+ v1.push_back( 2 );
+ v1.push_back( 3 );
+ v1.push_back( 4 );
+ int v1size = v1.size();
+ v1size = 0;
+ int v1capacity = v1.capacity();
+ v1capacity = 0;
+
+ std::vector<int>::iterator v1it = std::find( v1.begin(), v1.end(), 99 );
+ bool v1notfound = (v1it == v1.end());
+ v1notfound = false;
+
+ v1it = std::find( v1.begin(), v1.end(), 3 );
+ bool v1found = (v1it != v1.end());
+ v1found = false;
+
+ std::vector<int> v2;
+ std::copy( v1.begin(), v1it, std::back_inserter( v2 ) );
+ int v2size = v2.size();
+ v2size = 0;
+
+ std::map<int, double> m1;
+ m1.insert( std::make_pair( 1, 2.0 ) );
+ m1.insert( std::make_pair( 3, 2.0 ) );
+ m1.insert( std::make_pair( 5, 2.0 ) );
+ m1.insert( std::make_pair( 7, 2.0 ) );
+ int m1size = m1.size();
+ m1size = 0;
+ std::map<int,double>::iterator m1it = m1.begin();
+ for ( ; m1it != m1.end(); ++m1it ) {
+ int first = (*m1it).first;
+ first = 0;
+ double second = (*m1it).second;
+ second = 0.0;
+ }
+ std::map< int, double > m2( m1 );
+ int m2size = m2.size();
+ m2size = 0;
+
+ return 0;
+}
+
+// something mean to see if the compiler and C++ standard lib are good enough
+template<class K, class T>
+class DummyClass
+{
+ // everything in std namespace ?
+ typedef std::bidirectional_iterator_tag i;
+ typedef std::ptrdiff_t d;
+ // typename implemented ?
+ typedef typename std::map<K,T>::iterator MyIterator;
+};
diff --git a/config.tests/unix/tds/tds.cpp b/config.tests/unix/tds/tds.cpp
new file mode 100644
index 0000000..54a4859
--- /dev/null
+++ b/config.tests/unix/tds/tds.cpp
@@ -0,0 +1,7 @@
+#include <sybfront.h>
+#include <sybdb.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/tds/tds.pro b/config.tests/unix/tds/tds.pro
new file mode 100644
index 0000000..5516a14
--- /dev/null
+++ b/config.tests/unix/tds/tds.pro
@@ -0,0 +1,4 @@
+SOURCES = tds.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lsybdb
diff --git a/config.tests/unix/tslib/tslib.cpp b/config.tests/unix/tslib/tslib.cpp
new file mode 100644
index 0000000..7cd55ca
--- /dev/null
+++ b/config.tests/unix/tslib/tslib.cpp
@@ -0,0 +1,7 @@
+#include <tslib.h>
+
+int main()
+{
+ ts_open("foo", 0);
+ return 0;
+}
diff --git a/config.tests/unix/tslib/tslib.pro b/config.tests/unix/tslib/tslib.pro
new file mode 100644
index 0000000..1191120
--- /dev/null
+++ b/config.tests/unix/tslib/tslib.pro
@@ -0,0 +1,3 @@
+SOURCES = tslib.cpp
+CONFIG -= qt
+LIBS += -lts
diff --git a/config.tests/unix/which.test b/config.tests/unix/which.test
new file mode 100755
index 0000000..37c858c
--- /dev/null
+++ b/config.tests/unix/which.test
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+HOME=/dev/null
+export HOME
+
+unset which
+
+WHICH=`which which 2>/dev/null`
+if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then
+ WHICH=which
+elif [ -z "$WHICH" ]; then
+ if which which >/dev/null 2>&1; then
+ WHICH=which
+ else
+ for a in /usr/ucb /usr/bin /bin /usr/local/bin; do
+ if [ -x $a/which ]; then
+ WHICH=$a/which
+ break;
+ fi
+ done
+ fi
+fi
+
+if [ -z "$WHICH" ]; then
+ IFS=:
+ for a in $PATH; do
+ if [ -x $a/$1 ]; then
+ echo "$a/$1"
+ exit 0
+ fi
+ done
+else
+ a=`"$WHICH" "$1" 2>/dev/null`
+ if [ ! -z "$a" -a -x "$a" ]; then
+ echo "$a"
+ exit 0
+ fi
+fi
+exit 1
diff --git a/config.tests/unix/zlib/zlib.cpp b/config.tests/unix/zlib/zlib.cpp
new file mode 100644
index 0000000..58a286f
--- /dev/null
+++ b/config.tests/unix/zlib/zlib.cpp
@@ -0,0 +1,13 @@
+#include <zlib.h>
+
+int main(int, char **)
+{
+ z_streamp stream;
+ stream = 0;
+ const char *ver = zlibVersion();
+ ver = 0;
+ // compress2 was added in zlib version 1.0.8
+ int res = compress2(0, 0, 0, 0, 1);
+ res = 0;
+ return 0;
+}
diff --git a/config.tests/unix/zlib/zlib.pro b/config.tests/unix/zlib/zlib.pro
new file mode 100644
index 0000000..67cc870
--- /dev/null
+++ b/config.tests/unix/zlib/zlib.pro
@@ -0,0 +1,4 @@
+SOURCES = zlib.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lz
diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp
new file mode 100644
index 0000000..8501162
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.cpp
@@ -0,0 +1,20 @@
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <fontconfig/fontconfig.h>
+
+#ifndef FC_RGBA_UNKNOWN
+# error "This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define"
+#endif
+
+#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103)
+# error "This version of freetype is too old."
+#endif
+
+int main(int, char **)
+{
+ FT_Face face;
+ face = 0;
+ FcPattern *pattern;
+ pattern = 0;
+ return 0;
+}
diff --git a/config.tests/x11/fontconfig/fontconfig.pro b/config.tests/x11/fontconfig/fontconfig.pro
new file mode 100644
index 0000000..718a820
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.pro
@@ -0,0 +1,5 @@
+SOURCES = fontconfig.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lfreetype -lfontconfig
+include(../../unix/freetype/freetype.pri)
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
new file mode 100644
index 0000000..e86b02a
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
@@ -0,0 +1,10 @@
+#include <GL/gl.h>
+#include <GL/glx.h>
+
+int main(int, char **)
+{
+ GLXFBConfig config;
+ config = 0;
+
+ return 0;
+}
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.pro b/config.tests/x11/glxfbconfig/glxfbconfig.pro
new file mode 100644
index 0000000..4705ca6
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.pro
@@ -0,0 +1,10 @@
+SOURCES = glxfbconfig.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += -lGL -lGLU
diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp
new file mode 100644
index 0000000..b9be2e0
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.cpp
@@ -0,0 +1,22 @@
+#ifdef Q_OS_HPUX
+#error "MITSHM not supported on HP-UX."
+#else
+#include <X11/Xlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+
+int main(int, char **)
+{
+ Display *dpy = 0;
+ int minor;
+ int major;
+ int pixmaps;
+ if (dpy && XShmQueryVersion(dpy, &major, &minor, &pixmaps)) {
+ minor = 0;
+ major = 0;
+ pixmaps = 0;
+ }
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/mitshm/mitshm.pro b/config.tests/x11/mitshm/mitshm.pro
new file mode 100644
index 0000000..8a40317
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.pro
@@ -0,0 +1,5 @@
+SOURCES = mitshm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXext
+hpux*:DEFINES+=Q_OS_HPUX
diff --git a/config.tests/x11/notype.test b/config.tests/x11/notype.test
new file mode 100755
index 0000000..a522491
--- /dev/null
+++ b/config.tests/x11/notype.test
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+QMKSPEC=$1
+XPLATFORM=`basename $1`
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)"
+
+# Detect broken X11 headers when using GCC 2.95 or later
+# Xsun on Solaris 2.5.1:
+# Patches are available for Solaris 2.6, 7, and 8 but
+# not for Solaris 2.5.1.
+# HP-UX:
+# Patches are available for HP-UX 10.20, 11.00, and 11.11.
+# AIX 4.3.3 and AIX 5.1:
+# Headers are clearly broken on all AIX versions, and we
+# don't know of any patches. The strange thing is that we
+# did not get any reports about this issue until very
+# recently, long after gcc 3.0.x was released. It seems to
+# work for us with gcc 2.95.2.
+NOTYPE=no
+
+if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then
+ NOTYPE=yes
+
+ test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype"
+ "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/x11/notype/notypetest.pro" -o "$OUTDIR/config.tests/x11/notype/Makefile" >/dev/null 2>&1
+ cd "$OUTDIR/config.tests/x11/notype"
+
+ if [ "$VERBOSE" = "yes" ]; then
+ make
+ else
+ make >/dev/null 2>&1
+ fi
+
+ [ -x notypetest ] && NOTYPE=no
+fi
+
+# done
+if [ "$NOTYPE" = "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "X11 headers look good."
+ exit 1
+fi
diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp
new file mode 100644
index 0000000..b33949c
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.cpp
@@ -0,0 +1,11 @@
+/* Sample program for configure to test for broken X11 headers that
+confuse gcc 2.95 and better on target platforms such as Solaris.
+*/
+
+#include <X11/Xlib.h>
+#include <X11/ICE/ICElib.h>
+
+int main()
+{
+ return 0;
+}
diff --git a/config.tests/x11/notype/notypetest.pro b/config.tests/x11/notype/notypetest.pro
new file mode 100644
index 0000000..6ce2c62
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.pro
@@ -0,0 +1,5 @@
+TEMPLATE=app
+TARGET=notypetest
+CONFIG-=qt
+CONFIG+=x11
+SOURCES=notypetest.cpp
diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp
new file mode 100644
index 0000000..ad69379
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.cpp
@@ -0,0 +1,13 @@
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#ifndef GLU_VERSION_1_2
+# error "Required GLU version 1.2 not found."
+#endif
+
+int main(int, char **)
+{
+ GLuint x;
+ x = 0;
+ return 0;
+}
diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro
new file mode 100644
index 0000000..432bd8d
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.pro
@@ -0,0 +1,10 @@
+SOURCES = opengl.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += -lGL -lGLU
diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp
new file mode 100644
index 0000000..8bb5ffb
--- /dev/null
+++ b/config.tests/x11/sm/sm.cpp
@@ -0,0 +1,8 @@
+#include <X11/SM/SMlib.h>
+
+int main(int, char **)
+{
+ SmPointer pointer;
+ pointer = 0;
+ return 0;
+}
diff --git a/config.tests/x11/sm/sm.pro b/config.tests/x11/sm/sm.pro
new file mode 100644
index 0000000..9be43d8
--- /dev/null
+++ b/config.tests/x11/sm/sm.pro
@@ -0,0 +1,4 @@
+SOURCES += sm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_X11SM
diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp
new file mode 100644
index 0000000..08cd94b
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.cpp
@@ -0,0 +1,25 @@
+#include <X11/Xlib.h>
+#include <X11/Xcursor/Xcursor.h>
+
+#if !defined(XCURSOR_LIB_MAJOR)
+# define XCURSOR_LIB_MAJOR XCURSOR_MAJOR
+#endif
+#if !defined(XCURSOR_LIB_MINOR)
+# define XCURSOR_LIB_MINOR XCURSOR_MINOR
+#endif
+
+#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR >= 0
+# define XCURSOR_FOUND
+#else
+# define
+# error "Required Xcursor version 1.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XcursorImage *image;
+ image = 0;
+ XcursorCursors *cursors;
+ cursors = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xcursor/xcursor.pro b/config.tests/x11/xcursor/xcursor.pro
new file mode 100644
index 0000000..b1e69be
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.pro
@@ -0,0 +1,4 @@
+SOURCES = xcursor.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXcursor
diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp
new file mode 100644
index 0000000..fd36480
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.cpp
@@ -0,0 +1,14 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xfixes.h>
+
+#if XFIXES_MAJOR < 2
+# error "Required Xfixes version 2.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XFixesSelectionNotifyEvent event;
+ event.type = 0;
+ return 0;
+}
+
diff --git a/config.tests/x11/xfixes/xfixes.pro b/config.tests/x11/xfixes/xfixes.pro
new file mode 100644
index 0000000..cc94a11
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xfixes.cpp
diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp
new file mode 100644
index 0000000..2cb3cf9
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.cpp
@@ -0,0 +1,9 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xinerama.h>
+
+int main(int, char **)
+{
+ XineramaScreenInfo *info;
+ info = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xinerama/xinerama.pro b/config.tests/x11/xinerama/xinerama.pro
new file mode 100644
index 0000000..54d1af0
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.pro
@@ -0,0 +1,4 @@
+SOURCES = xinerama.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXinerama
diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp
new file mode 100644
index 0000000..9a61bc2
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.cpp
@@ -0,0 +1,18 @@
+#ifdef Q_OS_SOLARIS
+#error "Not supported."
+#else
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XInput.h>
+
+#ifdef Q_OS_IRIX
+# include <wacom.h>
+#endif
+
+int main(int, char **)
+{
+ XDeviceButtonEvent *event;
+ event = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xinput/xinput.pro b/config.tests/x11/xinput/xinput.pro
new file mode 100644
index 0000000..8acaede
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.pro
@@ -0,0 +1,6 @@
+SOURCES = xinput.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXi
+irix-*:DEFINES+=Q_OS_IRIX
+solaris-*:DEFINES+=Q_OS_SOLARIS
diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp
new file mode 100644
index 0000000..afe3c57
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.cpp
@@ -0,0 +1,30 @@
+#include <X11/Xlib.h>
+#include <X11/XKBlib.h>
+
+int main(int, char **)
+{
+ Display *display = 0;
+
+ int opcode = -1;
+ int xkbEventBase = -1;
+ int xkbErrorBase = -1;
+ int xkblibMajor = XkbMajorVersion;
+ int xkblibMinor = XkbMinorVersion;
+ XkbQueryExtension(display, &opcode, &xkbEventBase, &xkbErrorBase, &xkblibMajor, &xkblibMinor);
+
+ int keycode = 0;
+ unsigned int state = 0;
+ KeySym keySym;
+ unsigned int consumedModifiers;
+ XkbLookupKeySym(display, keycode, state, &consumedModifiers, &keySym);
+
+ XkbDescPtr xkbDesc = XkbGetMap(display, XkbAllClientInfoMask, XkbUseCoreKbd);
+ int w = XkbKeyGroupsWidth(xkbDesc, keycode);
+ keySym = XkbKeySym(xkbDesc, keycode, w-1);
+ XkbFreeClientMap(xkbDesc, XkbAllClientInfoMask, true);
+
+ state = XkbPCF_GrabsUseXKBStateMask;
+ (void) XkbSetPerClientControls(display, state, &state);
+
+ return 0;
+}
diff --git a/config.tests/x11/xkb/xkb.pro b/config.tests/x11/xkb/xkb.pro
new file mode 100644
index 0000000..d4ec222
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.pro
@@ -0,0 +1,3 @@
+SOURCES = xkb.cpp
+CONFIG += x11
+CONFIG -= qt
diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp
new file mode 100644
index 0000000..cd61c2d
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.cpp
@@ -0,0 +1,13 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrandr.h>
+
+#if RANDR_MAJOR != 1 || RANDR_MINOR < 1
+# error "Requried Xrandr version 1.1 not found."
+#endif
+
+int main(int, char **)
+{
+ XRRScreenSize *size;
+ size = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xrandr/xrandr.pro b/config.tests/x11/xrandr/xrandr.pro
new file mode 100644
index 0000000..3fb2910
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.pro
@@ -0,0 +1,4 @@
+SOURCES = xrandr.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender -lXrandr
diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp
new file mode 100644
index 0000000..7974d73
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.cpp
@@ -0,0 +1,13 @@
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+#if RENDER_MAJOR == 0 && RENDER_MINOR < 5
+# error "Required Xrender version 0.6 not found."
+#else
+int main(int, char **)
+{
+ XRenderPictFormat *format;
+ format = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xrender/xrender.pro b/config.tests/x11/xrender/xrender.pro
new file mode 100644
index 0000000..e778642
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.pro
@@ -0,0 +1,4 @@
+SOURCES = xrender.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender
diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp
new file mode 100644
index 0000000..01b5ef4
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.cpp
@@ -0,0 +1,10 @@
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+
+int main(int, char **)
+{
+ XShapeEvent shapeevent;
+ shapeevent.type = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xshape/xshape.pro b/config.tests/x11/xshape/xshape.pro
new file mode 100644
index 0000000..611c048
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xshape.cpp
diff --git a/configure b/configure
new file mode 100755
index 0000000..8227cd5
--- /dev/null
+++ b/configure
@@ -0,0 +1,7265 @@
+#!/bin/sh
+#
+# Configures to build the Qt library
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Contact: Qt Software Information (qt-info@nokia.com)
+#
+# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+
+#-------------------------------------------------------------------------------
+# script initialization
+#-------------------------------------------------------------------------------
+
+# the name of this script
+relconf=`basename $0`
+# the directory of this script is the "source tree"
+relpath=`dirname $0`
+relpath=`(cd "$relpath"; /bin/pwd)`
+# the current directory is the "build tree" or "object tree"
+outpath=`/bin/pwd`
+
+#license file location
+LICENSE_FILE="$QT_LICENSE_FILE"
+[ -z "$LICENSE_FILE" ] && LICENSE_FILE="$HOME/.qt-license"
+if [ -f "$LICENSE_FILE" ]; then
+ tr -d '\r' <"$LICENSE_FILE" >"${LICENSE_FILE}.tmp"
+ diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp"
+fi
+
+# later cache the command line in config.status
+OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"`
+
+# initialize global variables
+QMAKE_SWITCHES=
+QMAKE_VARS=
+QMAKE_CONFIG=
+QTCONFIG_CONFIG=
+QT_CONFIG=
+SUPPORTED=
+QMAKE_VARS_FILE=.qmake.vars
+
+:> "$QMAKE_VARS_FILE"
+
+#-------------------------------------------------------------------------------
+# utility functions
+#-------------------------------------------------------------------------------
+
+# Adds a new qmake variable to the cache
+# Usage: QMakeVar mode varname contents
+# where mode is one of: set, add, del
+QMakeVar()
+{
+ case "$1" in
+ set)
+ eq="="
+ ;;
+ add)
+ eq="+="
+ ;;
+ del)
+ eq="-="
+ ;;
+ *)
+ echo >&2 "BUG: wrong command to QMakeVar: $1"
+ ;;
+ esac
+
+ echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
+}
+
+# relies on $QMAKESPEC being set correctly. parses include statements in
+# qmake.conf and prints out the expanded file
+getQMakeConf()
+{
+ tmpSPEC="$QMAKESPEC"
+ if [ -n "$1" ]; then
+ tmpSPEC="$1"
+ fi
+ $AWK -v "QMAKESPEC=$tmpSPEC" '
+/^include\(.+\)$/{
+ fname = QMAKESPEC "/" substr($0, 9, length($0) - 9)
+ while ((getline line < fname) > 0)
+ print line
+ close(fname)
+ next
+}
+{ print }' "$tmpSPEC/qmake.conf"
+}
+
+#-------------------------------------------------------------------------------
+# operating system detection
+#-------------------------------------------------------------------------------
+
+# need that throughout the script
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+
+#-------------------------------------------------------------------------------
+# window system detection
+#-------------------------------------------------------------------------------
+
+PLATFORM_X11=no
+PLATFORM_MAC=no
+PLATFORM_QWS=no
+
+if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
+ # Qt/Mac
+ # ~ the Carbon SDK exists
+ # ~ src/gui/base/qapplication_mac.cpp is present
+ # ~ this is the internal edition and Qt/Mac sources exist
+ PLATFORM_MAC=maybe
+elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then
+ # Qt Embedded
+ # ~ src/gui/base/qapplication_qws.cpp is present
+ # ~ this is the free or commercial edition
+ # ~ this is the internal edition and Qt Embedded is explicitly enabled
+ PLATFORM_QWS=maybe
+fi
+
+#-----------------------------------------------------------------------------
+# Qt version detection
+#-----------------------------------------------------------------------------
+QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h`
+QT_MAJOR_VERSION=
+QT_MINOR_VERSION=0
+QT_PATCH_VERSION=0
+if [ -n "$QT_VERSION" ]; then
+ QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'`
+ MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
+ if [ -n "$MAJOR" ]; then
+ MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
+ PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
+ QT_MAJOR_VERSION="$MAJOR"
+ [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR"
+ [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH"
+ fi
+fi
+if [ -z "$QT_MAJOR_VERSION" ]; then
+ echo "Cannot process version from qglobal.h: $QT_VERSION"
+ echo "Cannot proceed."
+ exit 1
+fi
+
+QT_PACKAGEDATE=`grep '^# *define *QT_PACKAGEDATE_STR' "$relpath"/src/corelib/global/qglobal.h | sed -e 's,^# *define *QT_PACKAGEDATE_STR *"\([^ ]*\)"$,\1,' -e s,-,,g`
+if [ -z "$QT_PACKAGEDATE" ]; then
+ echo "Unable to determine package date from qglobal.h: '$QT_PACKAGEDATE'"
+ echo "Cannot proceed"
+ exit 1
+fi
+
+#-------------------------------------------------------------------------------
+# check the license
+#-------------------------------------------------------------------------------
+COMMERCIAL_USER=ask
+CFG_DEV=no
+CFG_NOKIA=no
+CFG_EMBEDDED=no
+EditionString=Commercial
+
+earlyArgParse()
+{
+ # parse the arguments, setting things to "yes" or "no"
+ while [ "$#" -gt 0 ]; do
+ CURRENT_OPT="$1"
+ UNKNOWN_ARG=no
+ case "$1" in
+ #Autoconf style options
+ --enable-*)
+ VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
+ VAL=yes
+ ;;
+ --disable-*)
+ VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
+ VAL=no
+ ;;
+ --*=*)
+ VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
+ VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
+ ;;
+ --no-*)
+ VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
+ VAL=no
+ ;;
+ -embedded)
+ VAR=embedded
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=auto
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ h|help|--help|-help)
+ if [ "$VAL" = "yes" ]; then
+ OPT_HELP="$VAL"
+ COMMERCIAL_USER="yes" #doesn't matter we will display the help
+ else
+ UNKNOWN_OPT=yes
+ COMMERCIAL_USER="yes" #doesn't matter we will display the help
+ fi
+ ;;
+ --*)
+ VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
+ VAL=yes
+ ;;
+ -*)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ VAL="unknown"
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+ if [ "$UNKNOWN_ARG" = "yes" ]; then
+ shift
+ continue
+ fi
+ shift
+
+ UNKNOWN_OPT=no
+ case "$VAR" in
+ embedded)
+ CFG_EMBEDDED="$VAL"
+ if [ "$PLATFORM_QWS" != "no" ]; then
+ if [ "$PLATFORM_QWS" = "maybe" ]; then
+ PLATFORM_X11=no
+ PLATFORM_MAC=no
+ PLATFORM_QWS=yes
+ fi
+ else
+ echo "No license exists to enable Qt for Embedded Linux. Disabling."
+ CFG_EMBEDDED=no
+ fi
+ ;;
+ developer-build)
+ CFG_DEV="yes"
+ ;;
+ nokia-developer)
+ CFG_DEV="yes"
+ CFG_NOKIA="yes"
+ COMMERCIAL_USER="no"
+ ;;
+ commercial)
+ COMMERCIAL_USER="yes"
+ ;;
+ opensource)
+ COMMERCIAL_USER="no"
+ ;;
+ *)
+ UNKNOWN_OPT=yes
+ ;;
+ esac
+ done
+}
+
+earlyArgParse "$@"
+
+if [ "$COMMERCIAL_USER" = "ask" ]; then
+ while true; do
+ echo "Which edition of Qt do you want to use ?"
+ echo
+ echo "Type 'c' if you want to use the Commercial Edition."
+ echo "Type 'o' if you want to use the Open Source Edition."
+ echo
+ read commercial
+ echo
+ if [ "$commercial" = "c" ]; then
+ COMMERCIAL_USER="yes"
+ break
+ else [ "$commercial" = "o" ];
+ COMMERCIAL_USER="no"
+ break
+ fi
+ done
+fi
+
+if [ "$CFG_NOKIA" = "yes" ]; then
+ Licensee="Nokia"
+ Edition="NokiaInternalBuild"
+ EditionString="Nokia Internal Build"
+ QT_EDITION="QT_EDITION_OPENSOURCE"
+ [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
+elif [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
+ # Commercial preview release
+ [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
+ Licensee="Preview"
+ Edition="Preview"
+ QT_EDITION="QT_EDITION_DESKTOP"
+ LicenseType="Technology Preview"
+elif [ $COMMERCIAL_USER = "yes" ]; then
+ # one of commercial editions
+ [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
+ [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes
+
+ # read in the license file
+ if [ -f "$LICENSE_FILE" ]; then
+ . "$LICENSE_FILE" >/dev/null 2>&1
+ if [ -z "$LicenseKeyExt" ]; then
+ echo
+ echo "You are using an old license file."
+ echo
+ echo "Please install the license file supplied by Qt Software,"
+ echo "or install the Qt Open Source Edition if you intend to"
+ echo "develop free software."
+ exit 1
+ fi
+ if [ -z "$Licensee" ]; then
+ echo
+ echo "Invalid license key. Please check the license key."
+ exit 1
+ fi
+ else
+ if [ -z "$LicenseKeyExt" ]; then
+ echo
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n "Please enter your license key: "
+ else
+ echo "Please enter your license key: \c"
+ fi
+ read LicenseKeyExt
+ Licensee="Unknown user"
+ fi
+ fi
+
+ # Key verification
+ echo "$LicenseKeyExt" | grep ".....*-....*-....*-....*-.....*-.....*-...." >/dev/null 2>&1 \
+ && LicenseValid="yes" \
+ || LicenseValid="no"
+ if [ "$LicenseValid" != "yes" ]; then
+ echo
+ echo "Invalid license key. Please check the license key."
+ exit 1
+ fi
+ ProductCode=`echo $LicenseKeyExt | cut -f 1 -d - | cut -b 1`
+ PlatformCode=`echo $LicenseKeyExt | cut -f 2 -d - | cut -b 1`
+ LicenseTypeCode=`echo $LicenseKeyExt | cut -f 3 -d -`
+ LicenseFeatureCode=`echo $LicenseKeyExt | cut -f 4 -d - | cut -b 1`
+
+ # determine which edition we are licensed to use
+ case "$LicenseTypeCode" in
+ F4M)
+ LicenseType="Commercial"
+ case $ProductCode in
+ F)
+ Edition="Universal"
+ QT_EDITION="QT_EDITION_UNIVERSAL"
+ ;;
+ B)
+ Edition="FullFramework"
+ EditionString="Full Framework"
+ QT_EDITION="QT_EDITION_DESKTOP"
+ ;;
+ L)
+ Edition="GUIFramework"
+ EditionString="GUI Framework"
+ QT_EDITION="QT_EDITION_DESKTOPLIGHT"
+ ;;
+ esac
+ ;;
+ Z4M|R4M|Q4M)
+ LicenseType="Evaluation"
+ case $ProductCode in
+ B)
+ Edition="Evaluation"
+ QT_EDITION="QT_EDITION_EVALUATION"
+ ;;
+ esac
+ ;;
+ esac
+ if [ -z "$LicenseType" -o -z "$Edition" -o -z "$QT_EDITION" ]; then
+ echo
+ echo "Invalid license key. Please check the license key."
+ exit 1
+ fi
+
+ # verify that we are licensed to use Qt on this platform
+ LICENSE_EXTENSION=
+ if [ "$PlatformCode" = "X" ]; then
+ # Qt All-OS
+ LICENSE_EXTENSION="-ALLOS"
+ elif [ "$PLATFORM_QWS" = "yes" ]; then
+ case $PlatformCode in
+ 2|4|8|A|B|E|G|J|K|P|Q|S|U|V|W)
+ # Qt for Embedded Linux
+ LICENSE_EXTENSION="-EMBEDDED"
+ ;;
+ *)
+ echo
+ echo "You are not licensed for Qt for Embedded Linux."
+ echo
+ echo "Please contact sales@trolltech.com to upgrade your license"
+ echo "to include Qt for Embedded Linux, or install the"
+ echo "Qt Open Source Edition if you intend to develop free software."
+ exit 1
+ ;;
+ esac
+ elif [ "$PLATFORM_MAC" = "yes" ]; then
+ case $PlatformCode in
+ 2|4|5|7|9|B|C|E|F|G|L|M|U|W|Y)
+ # Qt/Mac
+ LICENSE_EXTENSION="-DESKTOP"
+ ;;
+ 3|6|8|A|D|H|J|K|P|Q|S|V)
+ # Embedded no-deploy
+ LICENSE_EXTENSION="-EMBEDDED"
+ ;;
+ *)
+ echo
+ echo "You are not licensed for the Qt/Mac platform."
+ echo
+ echo "Please contact sales@trolltech.com to upgrade your license"
+ echo "to include the Qt/Mac platform."
+ exit 1
+ ;;
+ esac
+ else
+ case $PlatformCode in
+ 2|3|4|5|7|D|E|F|J|M|Q|S|T|V|Z)
+ # Qt/X11
+ LICENSE_EXTENSION="-DESKTOP"
+ ;;
+ 6|8|9|A|B|C|G|H|K|P|U|W)
+ # Embedded no-deploy
+ LICENSE_EXTENSION="-EMBEDDED"
+ ;;
+ *)
+ echo
+ echo "You are not licensed for the Qt/X11 platform."
+ echo
+ echo "Please contact sales@trolltech.com to upgrade your license to"
+ echo "include the Qt/X11 platform, or install the Qt Open Source Edition"
+ echo "if you intend to develop free software."
+ exit 1
+ ;;
+ esac
+ fi
+
+ if test -r "$relpath/.LICENSE"; then
+ # Generic, non-final license
+ LICENSE_EXTENSION=""
+ line=`sed 'y/a-z/A-Z/;q' "$relpath"/.LICENSE`
+ case "$line" in
+ *BETA*)
+ Edition=Beta
+ ;;
+ *TECHNOLOGY?PREVIEW*)
+ Edition=Preview
+ ;;
+ *EVALUATION*)
+ Edition=Evaluation
+ ;;
+ *)
+ echo >&2 "Invalid license files; cannot continue"
+ exit 1
+ ;;
+ esac
+ Licensee="$Edition"
+ EditionString="$Edition"
+ QT_EDITION="QT_EDITION_DESKTOP"
+ fi
+
+ case "$LicenseFeatureCode" in
+ G|L)
+ # US
+ case "$LicenseType" in
+ Commercial)
+ cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}-US" "$outpath/LICENSE"
+ ;;
+ Evaluation)
+ cp -f "$relpath/.LICENSE-EVALUATION-US" "$outpath/LICENSE"
+ ;;
+ esac
+ ;;
+ 2|5)
+ # non-US
+ case "$LicenseType" in
+ Commercial)
+ cp -f "$relpath/.LICENSE${LICENSE_EXTENSION}" "$outpath/LICENSE"
+ ;;
+ Evaluation)
+ cp -f "$relpath/.LICENSE-EVALUATION" "$outpath/LICENSE"
+ ;;
+ esac
+ ;;
+ *)
+ echo
+ echo "Invalid license key. Please check the license key."
+ exit 1
+ ;;
+ esac
+ if [ '!' -f "$outpath/LICENSE" ]; then
+ echo "The LICENSE, LICENSE.GPL3 LICENSE.LGPL file shipped with"
+ echo "this software has disappeared."
+ echo
+ echo "Sorry, you are not licensed to use this software."
+ echo "Try re-installing."
+ echo
+ exit 1
+ fi
+elif [ $COMMERCIAL_USER = "no" ]; then
+ # Open Source edition - may only be used under the terms of the GPL or LGPL.
+ [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
+ Licensee="Open Source"
+ Edition="OpenSource"
+ EditionString="Open Source"
+ QT_EDITION="QT_EDITION_OPENSOURCE"
+fi
+
+#-------------------------------------------------------------------------------
+# initalize variables
+#-------------------------------------------------------------------------------
+
+SYSTEM_VARIABLES="CC CXX CFLAGS CXXFLAGS LDFLAGS"
+for varname in $SYSTEM_VARIABLES; do
+ cmd=`echo \
+'if [ -n "\$'${varname}'" ]; then
+ QMakeVar set QMAKE_'${varname}' "\$'${varname}'"
+fi'`
+ eval "$cmd"
+done
+# Use CC/CXX to run config.tests
+mkdir -p "$outpath/config.tests"
+rm -f "$outpath/config.tests/.qmake.cache"
+cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
+
+QMakeVar add styles "cde mac motif plastique cleanlooks windows"
+QMakeVar add decorations "default windows styled"
+QMakeVar add gfx-drivers "linuxfb"
+QMakeVar add kbd-drivers "tty"
+QMakeVar add mouse-drivers "pc linuxtp"
+
+if [ "$CFG_DEV" = "yes" ]; then
+ QMakeVar add kbd-drivers "um"
+fi
+
+# QTDIR may be set and point to an old or system-wide Qt installation
+unset QTDIR
+
+# the minimum version of libdbus-1 that we require:
+MIN_DBUS_1_VERSION=0.62
+
+# initalize internal variables
+CFG_CONFIGURE_EXIT_ON_ERROR=yes
+CFG_PROFILE=no
+CFG_EXCEPTIONS=unspecified
+CFG_SCRIPTTOOLS=auto # (yes|no|auto)
+CFG_XMLPATTERNS=auto # (yes|no|auto)
+CFG_INCREMENTAL=auto
+CFG_QCONFIG=full
+CFG_DEBUG=auto
+CFG_MYSQL_CONFIG=
+CFG_DEBUG_RELEASE=no
+CFG_SHARED=yes
+CFG_SM=auto
+CFG_XSHAPE=auto
+CFG_XINERAMA=runtime
+CFG_XFIXES=runtime
+CFG_ZLIB=auto
+CFG_SQLITE=qt
+CFG_GIF=auto
+CFG_TIFF=auto
+CFG_LIBTIFF=auto
+CFG_PNG=yes
+CFG_LIBPNG=auto
+CFG_JPEG=auto
+CFG_LIBJPEG=auto
+CFG_MNG=auto
+CFG_LIBMNG=auto
+CFG_XCURSOR=runtime
+CFG_XRANDR=runtime
+CFG_XRENDER=auto
+CFG_MITSHM=auto
+CFG_OPENGL=auto
+CFG_SSE=auto
+CFG_FONTCONFIG=auto
+CFG_QWS_FREETYPE=auto
+CFG_LIBFREETYPE=auto
+CFG_SQL_AVAILABLE=
+QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
+CFG_BUILD_PARTS=""
+CFG_NOBUILD_PARTS=""
+CFG_RELEASE_QMAKE=no
+CFG_PHONON=auto
+CFG_PHONON_BACKEND=yes
+CFG_SVG=yes
+CFG_WEBKIT=auto # (yes|no|auto)
+
+CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen"
+CFG_GFX_ON="linuxfb multiscreen"
+CFG_GFX_PLUGIN_AVAILABLE=
+CFG_GFX_PLUGIN=
+CFG_GFX_OFF=
+CFG_KBD_AVAILABLE="tty usb sl5000 yopy vr41xx qvfb"
+CFG_KBD_ON="tty" #default, see QMakeVar above
+CFG_MOUSE_AVAILABLE="pc bus linuxtp yopy vr41xx tslib qvfb"
+CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
+
+CFG_ARCH=
+CFG_HOST_ARCH=
+CFG_KBD_PLUGIN_AVAILABLE=
+CFG_KBD_PLUGIN=
+CFG_KBD_OFF=
+CFG_MOUSE_PLUGIN_AVAILABLE=
+CFG_MOUSE_PLUGIN=
+CFG_MOUSE_OFF=
+CFG_USE_GNUMAKE=no
+CFG_IM=yes
+CFG_DECORATION_AVAILABLE="styled windows default"
+CFG_DECORATION_ON="${CFG_DECORATION_AVAILABLE}" # all on by default
+CFG_DECORATION_PLUGIN_AVAILABLE=
+CFG_DECORATION_PLUGIN=
+CFG_XINPUT=runtime
+CFG_XKB=auto
+CFG_NIS=auto
+CFG_CUPS=auto
+CFG_ICONV=auto
+CFG_DBUS=auto
+CFG_GLIB=auto
+CFG_GSTREAMER=auto
+CFG_QGTKSTYLE=auto
+CFG_LARGEFILE=auto
+CFG_OPENSSL=auto
+CFG_PTMALLOC=no
+CFG_STL=auto
+CFG_PRECOMPILE=auto
+CFG_SEPARATE_DEBUG_INFO=auto
+CFG_REDUCE_EXPORTS=auto
+CFG_MMX=auto
+CFG_3DNOW=auto
+CFG_SSE=auto
+CFG_SSE2=auto
+CFG_REDUCE_RELOCATIONS=no
+CFG_IPV6=auto
+CFG_NAS=no
+CFG_QWS_DEPTHS=all
+CFG_USER_BUILD_KEY=
+CFG_ACCESSIBILITY=auto
+CFG_QT3SUPPORT=yes
+CFG_ENDIAN=auto
+CFG_HOST_ENDIAN=auto
+CFG_DOUBLEFORMAT=auto
+CFG_ARMFPA=auto
+CFG_IWMMXT=no
+CFG_CLOCK_GETTIME=auto
+CFG_CLOCK_MONOTONIC=auto
+CFG_MREMAP=auto
+CFG_GETADDRINFO=auto
+CFG_IPV6IFNAME=auto
+CFG_GETIFADDRS=auto
+CFG_INOTIFY=auto
+CFG_RPATH=yes
+CFG_FRAMEWORK=auto
+CFG_MAC_ARCHS=
+CFG_MAC_DWARF2=auto
+CFG_MAC_XARCH=auto
+CFG_MAC_CARBON=yes
+CFG_MAC_COCOA=auto
+COMMANDLINE_MAC_COCOA=no
+CFG_SXE=no
+CFG_PREFIX_INSTALL=yes
+CFG_SDK=
+D_FLAGS=
+I_FLAGS=
+L_FLAGS=
+RPATH_FLAGS=
+l_FLAGS=
+QCONFIG_FLAGS=
+XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
+PLATFORM=$QMAKESPEC
+QT_CROSS_COMPILE=no
+OPT_CONFIRM_LICENSE=no
+OPT_SHADOW=maybe
+OPT_FAST=auto
+OPT_VERBOSE=no
+OPT_HELP=
+CFG_SILENT=no
+CFG_GRAPHICS_SYSTEM=default
+
+# initalize variables used for installation
+QT_INSTALL_PREFIX=
+QT_INSTALL_DOCS=
+QT_INSTALL_HEADERS=
+QT_INSTALL_LIBS=
+QT_INSTALL_BINS=
+QT_INSTALL_PLUGINS=
+QT_INSTALL_DATA=
+QT_INSTALL_TRANSLATIONS=
+QT_INSTALL_SETTINGS=
+QT_INSTALL_EXAMPLES=
+QT_INSTALL_DEMOS=
+QT_HOST_PREFIX=
+
+#flags for SQL drivers
+QT_CFLAGS_PSQL=
+QT_LFLAGS_PSQL=
+QT_CFLAGS_MYSQL=
+QT_LFLAGS_MYSQL=
+QT_LFLAGS_MYSQL_R=
+QT_CFLAGS_SQLITE=
+QT_LFLAGS_SQLITE=
+
+# flags for libdbus-1
+QT_CFLAGS_DBUS=
+QT_LIBS_DBUS=
+
+# flags for Glib (X11 only)
+QT_CFLAGS_GLIB=
+QT_LIBS_GLIB=
+
+# flags for GStreamer (X11 only)
+QT_CFLAGS_GSTREAMER=
+QT_LIBS_GSTREAMER=
+
+#-------------------------------------------------------------------------------
+# check SQL drivers, mouse drivers and decorations available in this package
+#-------------------------------------------------------------------------------
+
+# opensource version removes some drivers, so force them to be off
+CFG_SQL_tds=no
+CFG_SQL_oci=no
+CFG_SQL_db2=no
+
+CFG_SQL_AVAILABLE=
+if [ -d "$relpath/src/plugins/sqldrivers" ]; then
+ for a in "$relpath/src/plugins/sqldrivers/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename $a`
+ CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
+ eval "CFG_SQL_${base_a}=auto"
+ fi
+ done
+fi
+
+CFG_DECORATION_PLUGIN_AVAILABLE=
+if [ -d "$relpath/src/plugins/decorations" ]; then
+ for a in "$relpath/src/plugins/decorations/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename $a`
+ CFG_DECORATION_PLUGIN_AVAILABLE="${CFG_DECORATION_PLUGIN_AVAILABLE} ${base_a}"
+ fi
+ done
+fi
+
+CFG_KBD_PLUGIN_AVAILABLE=
+if [ -d "$relpath/src/plugins/kbddrivers" ]; then
+ for a in "$relpath/src/plugins/kbddrivers/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename $a`
+ CFG_KBD_PLUGIN_AVAILABLE="${CFG_KBD_PLUGIN_AVAILABLE} ${base_a}"
+ fi
+ done
+fi
+
+CFG_MOUSE_PLUGIN_AVAILABLE=
+if [ -d "$relpath/src/plugins/mousedrivers" ]; then
+ for a in "$relpath/src/plugins/mousedrivers/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename $a`
+ CFG_MOUSE_PLUGIN_AVAILABLE="${CFG_MOUSE_PLUGIN_AVAILABLE} ${base_a}"
+ fi
+ done
+fi
+
+CFG_GFX_PLUGIN_AVAILABLE=
+if [ -d "$relpath/src/plugins/gfxdrivers" ]; then
+ for a in "$relpath/src/plugins/gfxdrivers/"*; do
+ if [ -d "$a" ]; then
+ base_a=`basename $a`
+ CFG_GFX_PLUGIN_AVAILABLE="${CFG_GFX_PLUGIN_AVAILABLE} ${base_a}"
+ fi
+ done
+ CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off
+fi
+
+#-------------------------------------------------------------------------------
+# parse command line arguments
+#-------------------------------------------------------------------------------
+
+# parse the arguments, setting things to "yes" or "no"
+while [ "$#" -gt 0 ]; do
+ CURRENT_OPT="$1"
+ UNKNOWN_ARG=no
+ case "$1" in
+ #Autoconf style options
+ --enable-*)
+ VAR=`echo $1 | sed "s,^--enable-\(.*\),\1,"`
+ VAL=yes
+ ;;
+ --disable-*)
+ VAR=`echo $1 | sed "s,^--disable-\(.*\),\1,"`
+ VAL=no
+ ;;
+ --*=*)
+ VAR=`echo $1 | sed "s,^--\(.*\)=.*,\1,"`
+ VAL=`echo $1 | sed "s,^--.*=\(.*\),\1,"`
+ ;;
+ --no-*)
+ VAR=`echo $1 | sed "s,^--no-\(.*\),\1,"`
+ VAL=no
+ ;;
+ --*)
+ VAR=`echo $1 | sed "s,^--\(.*\),\1,"`
+ VAL=yes
+ ;;
+ #Qt plugin options
+ -no-*-*|-plugin-*-*|-qt-*-*)
+ VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
+ VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"`
+ ;;
+ #Qt style no options
+ -no-*)
+ VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"`
+ VAL=no
+ ;;
+ #Qt style yes options
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ VAL=yes
+ ;;
+ #Qt style options that pass an argument
+ -qconfig)
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ CFG_QCONFIG="$VAL"
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ shift
+ VAL=$1
+ else
+ UNKNOWN_ARG=yes
+ fi
+ ;;
+ -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ shift
+ VAL="$1"
+ ;;
+ #Qt style complex options in one command
+ -enable-*|-disable-*)
+ VAR=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
+ VAL=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
+ ;;
+ #Qt Builtin/System style options
+ -no-*|-system-*|-qt-*)
+ VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"`
+ VAL=`echo $1 | sed "s,^-\([^-]*\)-.*,\1,"`
+ ;;
+ #Options that cannot be generalized
+ -k|-continue)
+ VAR=fatal_error
+ VAL=no
+ ;;
+ -embedded)
+ VAR=embedded
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=auto
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ -opengl)
+ VAR=opengl
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=yes
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ -hostprefix)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ # this option may or may not be followed by an argument
+ if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
+ VAL=$outpath
+ else
+ shift;
+ VAL=$1
+ fi
+ ;;
+ -host-*-endian)
+ VAR=host_endian
+ VAL=`echo $1 | sed "s,^-.*-\(.*\)-.*,\1,"`
+ ;;
+ -*-endian)
+ VAR=endian
+ VAL=`echo $1 | sed "s,^-\(.*\)-.*,\1,"`
+ ;;
+ -qtnamespace)
+ VAR="qtnamespace"
+ shift
+ VAL="$1"
+ ;;
+ -graphicssystem)
+ VAR="graphicssystem"
+ shift
+ VAL=$1
+ ;;
+ -qtlibinfix)
+ VAR="qtlibinfix"
+ shift
+ VAL="$1"
+ ;;
+ -D?*|-D)
+ VAR="add_define"
+ if [ "$1" = "-D" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-D,,'`
+ fi
+ ;;
+ -I?*|-I)
+ VAR="add_ipath"
+ if [ "$1" = "-I" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-I,,'`
+ fi
+ ;;
+ -L?*|-L)
+ VAR="add_lpath"
+ if [ "$1" = "-L" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-L,,'`
+ fi
+ ;;
+ -R?*|-R)
+ VAR="add_rpath"
+ if [ "$1" = "-R" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-R,,'`
+ fi
+ ;;
+ -l?*)
+ VAR="add_link"
+ VAL=`echo $1 | sed 's,-l,,'`
+ ;;
+ -F?*|-F)
+ VAR="add_fpath"
+ if [ "$1" = "-F" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-F,,'`
+ fi
+ ;;
+ -fw?*|-fw)
+ VAR="add_framework"
+ if [ "$1" = "-fw" ]; then
+ shift
+ VAL="$1"
+ else
+ VAL=`echo $1 | sed 's,-fw,,'`
+ fi
+ ;;
+ -*)
+ VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+ VAL="unknown"
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+ if [ "$UNKNOWN_ARG" = "yes" ]; then
+ echo "$1: unknown argument"
+ OPT_HELP=yes
+ ERROR=yes
+ shift
+ continue
+ fi
+ shift
+
+ UNKNOWN_OPT=no
+ case "$VAR" in
+ qt3support)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_QT3SUPPORT="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ accessibility)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_ACCESSIBILITY="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ license)
+ LICENSE_FILE="$VAL"
+ ;;
+ gnumake)
+ CFG_USE_GNUMAKE="$VAL"
+ ;;
+ mysql_config)
+ CFG_MYSQL_CONFIG="$VAL"
+ ;;
+ prefix)
+ QT_INSTALL_PREFIX="$VAL"
+ ;;
+ hostprefix)
+ QT_HOST_PREFIX="$VAL"
+ ;;
+ force-pkg-config)
+ QT_FORCE_PKGCONFIG=yes
+ ;;
+ docdir)
+ QT_INSTALL_DOCS="$VAL"
+ ;;
+ headerdir)
+ QT_INSTALL_HEADERS="$VAL"
+ ;;
+ plugindir)
+ QT_INSTALL_PLUGINS="$VAL"
+ ;;
+ datadir)
+ QT_INSTALL_DATA="$VAL"
+ ;;
+ libdir)
+ QT_INSTALL_LIBS="$VAL"
+ ;;
+ qtnamespace)
+ QT_NAMESPACE="$VAL"
+ ;;
+ qtlibinfix)
+ QT_LIBINFIX="$VAL"
+ ;;
+ translationdir)
+ QT_INSTALL_TRANSLATIONS="$VAL"
+ ;;
+ sysconfdir|settingsdir)
+ QT_INSTALL_SETTINGS="$VAL"
+ ;;
+ examplesdir)
+ QT_INSTALL_EXAMPLES="$VAL"
+ ;;
+ demosdir)
+ QT_INSTALL_DEMOS="$VAL"
+ ;;
+ qconfig)
+ CFG_QCONFIG="$VAL"
+ ;;
+ bindir)
+ QT_INSTALL_BINS="$VAL"
+ ;;
+ buildkey)
+ CFG_USER_BUILD_KEY="$VAL"
+ ;;
+ sxe)
+ CFG_SXE="$VAL"
+ ;;
+ embedded)
+ CFG_EMBEDDED="$VAL"
+ if [ "$PLATFORM_QWS" != "no" ]; then
+ if [ "$PLATFORM_QWS" = "maybe" ]; then
+ PLATFORM_X11=no
+ PLATFORM_MAC=no
+ PLATFORM_QWS=yes
+ fi
+ else
+ echo "No license exists to enable Qt for Embedded Linux. Disabling."
+ CFG_EMBEDDED=no
+ fi
+ ;;
+ sse)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SSE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ endian)
+ if [ "$VAL" = "little" ]; then
+ CFG_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$VAL" = "big" ]; then
+ CFG_ENDIAN="Q_BIG_ENDIAN"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ host_endian)
+ if [ "$VAL" = "little" ]; then
+ CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$VAL" = "big" ]; then
+ CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ armfpa)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_ARMFPA="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ depths)
+ CFG_QWS_DEPTHS="$VAL"
+ ;;
+ opengl)
+ if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
+ [ "$VAL" = "es1cl" ] || [ "$VAL" = "es1" ] || [ "$VAL" = "es2" ]; then
+ CFG_OPENGL="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ graphicssystem)
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ echo "Error: Graphics System plugins are not supported on QWS."
+ echo " On QWS, the graphics system API is part of the QScreen plugin architecture "
+ echo " rather than existing as a separate plugin."
+ echo ""
+ UNKNOWN_OPT=yes
+ else
+ if [ "$VAL" = "opengl" ]; then
+ CFG_GRAPHICS_SYSTEM="opengl"
+ elif [ "$VAL" = "raster" ]; then
+ CFG_GRAPHICS_SYSTEM="raster"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ fi
+ ;;
+
+ qvfb) # left for commandline compatibility, not documented
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ if [ "$VAL" = "yes" ]; then
+ QMakeVar add gfx-drivers qvfb
+ QMakeVar add kbd-drivers qvfb
+ QMakeVar add mouse-drivers qvfb
+ CFG_GFX_ON="$CFG_GFX_ON qvfb"
+ CFG_KBD_ON="$CFG_KBD_ON qvfb"
+ CFG_MOUSE_ON="$CFG_MOUSE_ON qvfb"
+ fi
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ nomake)
+ CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
+ ;;
+ make)
+ CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
+ ;;
+ x11)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ PLATFORM_MAC=no
+ elif [ "$PLATFORM_QWS" = "yes" ]; then
+ PLATFORM_QWS=no
+ fi
+ if [ "$CFG_FRAMEWORK" = "auto" ]; then
+ CFG_FRAMEWORK=no
+ fi
+ PLATFORM_X11=yes
+ ;;
+ sdk)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ CFG_SDK="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ dwarf2)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_MAC_DWARF2="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ arch)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL"
+ else
+ CFG_ARCH=$VAL
+ fi
+ ;;
+ host-arch)
+ CFG_HOST_ARCH=$VAL
+ ;;
+ universal)
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86 ppc"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ cocoa)
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
+ CFG_MAC_COCOA="$VAL"
+ COMMANDLINE_MAC_COCOA="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ framework)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ CFG_FRAMEWORK="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ profile)
+ if [ "$VAL" = "yes" ]; then
+ CFG_PROFILE=yes
+ QMakeVar add QMAKE_CFLAGS -pg
+ QMakeVar add QMAKE_CXXFLAGS -pg
+ QMakeVar add QMAKE_LFLAGS -pg
+ QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ exceptions|g++-exceptions)
+ if [ "$VAL" = "no" ]; then
+ CFG_EXCEPTIONS=no
+ elif [ "$VAL" = "yes" ]; then
+ CFG_EXCEPTIONS=yes
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ platform)
+ PLATFORM="$VAL"
+ # keep compatibility with old platform names
+ case $PLATFORM in
+ aix-64)
+ PLATFORM=aix-xlc-64
+ ;;
+ hpux-o64)
+ PLATFORM=hpux-acc-o64
+ ;;
+ hpux-n64)
+ PLATFORM=hpux-acc-64
+ ;;
+ hpux-acc-n64)
+ PLATFORM=hpux-acc-64
+ ;;
+ irix-n32)
+ PLATFORM=irix-cc
+ ;;
+ irix-64)
+ PLATFORM=irix-cc-64
+ ;;
+ irix-cc-n64)
+ PLATFORM=irix-cc-64
+ ;;
+ reliant-64)
+ PLATFORM=reliant-cds-64
+ ;;
+ solaris-64)
+ PLATFORM=solaris-cc-64
+ ;;
+ solaris-64)
+ PLATFORM=solaris-cc-64
+ ;;
+ openunix-cc)
+ PLATFORM=unixware-cc
+ ;;
+ openunix-g++)
+ PLATFORM=unixware-g++
+ ;;
+ unixware7-cc)
+ PLATFORM=unixware-cc
+ ;;
+ unixware7-g++)
+ PLATFORM=unixware-g++
+ ;;
+ macx-g++-64)
+ PLATFORM=macx-g++
+ NATIVE_64_ARCH=
+ case `uname -p` in
+ i386) NATIVE_64_ARCH="x86_64" ;;
+ powerpc) NATIVE_64_ARCH="ppc64" ;;
+ *) echo "WARNING: Can't detect CPU architecture for macx-g++-64" ;;
+ esac
+ if [ ! -z "$NATIVE_64_ARCH" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG $NATIVE_64_ARCH"
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS $NATIVE_64_ARCH"
+ fi
+ ;;
+ esac
+ ;;
+ xplatform)
+ XPLATFORM="$VAL"
+ ;;
+ debug-and-release)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_DEBUG_RELEASE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ optimized-qmake)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_RELEASE_QMAKE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ release)
+ if [ "$VAL" = "yes" ]; then
+ CFG_DEBUG=no
+ elif [ "$VAL" = "no" ]; then
+ CFG_DEBUG=yes
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ prefix-install)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_PREFIX_INSTALL="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ debug)
+ CFG_DEBUG="$VAL"
+ ;;
+ developer-build|commercial|opensource|nokia-developer)
+ # These switches have been dealt with already
+ ;;
+ static)
+ if [ "$VAL" = "yes" ]; then
+ CFG_SHARED=no
+ elif [ "$VAL" = "no" ]; then
+ CFG_SHARED=yes
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ incremental)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_INCREMENTAL="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ fatal_error)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ feature-*)
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if [ "$VAL" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
+ elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ shared)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SHARED="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ gif)
+ [ "$VAL" = "qt" ] && VAL=yes
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_GIF="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sm)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SM="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+
+ ;;
+ xinerama)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
+ CFG_XINERAMA="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xshape)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XSHAPE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xinput)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
+ CFG_XINPUT="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ stl)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_STL="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ pch)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_PRECOMPILE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ separate-debug-info)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SEPARATE_DEBUG_INFO="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ reduce-exports)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_REDUCE_EXPORTS="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ mmx)
+ if [ "$VAL" = "no" ]; then
+ CFG_MMX="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ 3dnow)
+ if [ "$VAL" = "no" ]; then
+ CFG_3DNOW="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sse)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sse2)
+ if [ "$VAL" = "no" ]; then
+ CFG_SSE2="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ iwmmxt)
+ CFG_IWMMXT="yes"
+ ;;
+ reduce-relocations)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_REDUCE_RELOCATIONS="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ freetype)
+ [ "$VAL" = "qt" ] && VAL=yes
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_QWS_FREETYPE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ zlib)
+ [ "$VAL" = "qt" ] && VAL=yes
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_ZLIB="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ # No longer supported:
+ #[ "$VAL" = "no" ] && CFG_LIBPNG=no
+ ;;
+ sqlite)
+ if [ "$VAL" = "system" ]; then
+ CFG_SQLITE=system
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ libpng)
+ [ "$VAL" = "yes" ] && VAL=qt
+ if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_LIBPNG="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ libjpeg)
+ [ "$VAL" = "yes" ] && VAL=qt
+ if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_LIBJPEG="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ libmng)
+ [ "$VAL" = "yes" ] && VAL=qt
+ if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_LIBMNG="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ libtiff)
+ [ "$VAL" = "yes" ] && VAL=qt
+ if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
+ CFG_LIBTIFF="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ nas-sound)
+ if [ "$VAL" = "system" ] || [ "$VAL" = "no" ]; then
+ CFG_NAS="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xcursor)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
+ CFG_XCURSOR="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xfixes)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
+ CFG_XFIXES="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xrandr)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
+ CFG_XRANDR="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xrender)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XRENDER="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ mitshm)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_MITSHM="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ fontconfig)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_FONTCONFIG="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ xkb)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XKB="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ cups)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_CUPS="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ iconv)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_ICONV="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ glib)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_GLIB="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ gstreamer)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_GSTREAMER="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ gtkstyle)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_QGTKSTYLE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ qdbus|dbus)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ]; then
+ CFG_DBUS="$VAL"
+ elif [ "$VAL" = "runtime" ]; then
+ CFG_DBUS="yes"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ dbus-linked)
+ if [ "$VAL" = "yes" ]; then
+ CFG_DBUS="linked"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ nis)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_NIS="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ largefile)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_LARGEFILE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ openssl)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_OPENSSL="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ openssl-linked)
+ if [ "$VAL" = "yes" ]; then
+ CFG_OPENSSL="linked"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ ptmalloc)
+ if [ "$VAL" = "yes" ]; then
+ CFG_PTMALLOC="yes"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+
+ xmlpatterns)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
+ CFG_XMLPATTERNS="yes"
+ else
+ if [ "$VAL" = "no" ]; then
+ CFG_XMLPATTERNS="no"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ fi
+ ;;
+ scripttools)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
+ CFG_SCRIPTTOOLS="yes"
+ else
+ if [ "$VAL" = "no" ]; then
+ CFG_SCRIPTTOOLS="no"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ fi
+ ;;
+ svg)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
+ CFG_SVG="yes"
+ else
+ if [ "$VAL" = "no" ]; then
+ CFG_SVG="no"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ fi
+ ;;
+ webkit)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
+ CFG_WEBKIT="yes"
+ else
+ if [ "$VAL" = "no" ]; then
+ CFG_WEBKIT="no"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ fi
+ ;;
+ confirm-license)
+ if [ "$VAL" = "yes" ]; then
+ OPT_CONFIRM_LICENSE="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ h|help)
+ if [ "$VAL" = "yes" ]; then
+ OPT_HELP="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ sql-*|gfx-*|decoration-*|kbd-*|mouse-*)
+ # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
+ # if autoconf style options were used, $VAL can be "yes" or "no"
+ [ "$VAL" = "yes" ] && VAL=qt
+ # now $VAL should be "no", "qt", or "plugin"... double-check
+ if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
+ UNKNOWN_OPT=yes
+ fi
+ # now $VAL is "no", "qt", or "plugin"
+ OPT="$VAL"
+ VAL=`echo $VAR | sed "s,^[^-]*-\([^-]*\).*,\1,"`
+ VAR=`echo $VAR | sed "s,^\([^-]*\).*,\1,"`
+
+ # Grab the available values
+ case "$VAR" in
+ sql)
+ avail="$CFG_SQL_AVAILABLE"
+ ;;
+ gfx)
+ avail="$CFG_GFX_AVAILABLE"
+ if [ "$OPT" = "plugin" ]; then
+ avail="$CFG_GFX_PLUGIN_AVAILABLE"
+ fi
+ ;;
+ decoration)
+ avail="$CFG_DECORATION_AVAILABLE"
+ if [ "$OPT" = "plugin" ]; then
+ avail="$CFG_DECORATION_PLUGIN_AVAILABLE"
+ fi
+ ;;
+ kbd)
+ avail="$CFG_KBD_AVAILABLE"
+ if [ "$OPT" = "plugin" ]; then
+ avail="$CFG_KBD_PLUGIN_AVAILABLE"
+ fi
+ ;;
+ mouse)
+ avail="$CFG_MOUSE_AVAILABLE"
+ if [ "$OPT" = "plugin" ]; then
+ avail="$CFG_MOUSE_PLUGIN_AVAILABLE"
+ fi
+ ;;
+ *)
+ avail=""
+ echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
+ ;;
+ esac
+
+ # Check that that user's value is available.
+ found=no
+ for d in $avail; do
+ if [ "$VAL" = "$d" ]; then
+ found=yes
+ break
+ fi
+ done
+ [ "$found" = yes ] || ERROR=yes
+
+ if [ "$VAR" = "sql" ]; then
+ # set the CFG_SQL_driver
+ eval "CFG_SQL_$VAL=\$OPT"
+ continue
+ fi
+
+ if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
+ if [ "$OPT" = "plugin" ]; then
+ [ "$VAR" = "decoration" ] && QMakeVar del "${VAR}s" "$VAL"
+ [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"` && CFG_DECORATION_PLUGIN="$CFG_DECORATION_PLUGIN ${VAL}"
+ [ "$VAR" = "kbd" ] && QMakeVar del "${VAR}s" "$VAL"
+ [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_KBD_PLUGIN="$CFG_KBD_PLUGIN ${VAL}"
+ [ "$VAR" = "mouse" ] && QMakeVar del "${VAR}s" "$VAL"
+ [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"` && CFG_MOUSE_PLUGIN="$CFG_MOUSE_PLUGIN ${VAL}"
+ [ "$VAR" = "gfx" ] && QMakeVar del "${VAR}s" "$VAL"
+ [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"` && CFG_GFX_PLUGIN="${CFG_GFX_PLUGIN} ${VAL}"
+ VAR="${VAR}-${OPT}"
+ else
+ if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "decoration" ] || [ "$VAR" = "mouse" ]; then
+ [ "$VAR" = "gfx" ] && CFG_GFX_ON="$CFG_GFX_ON $VAL"
+ [ "$VAR" = "kbd" ] && CFG_KBD_ON="$CFG_KBD_ON $VAL"
+ [ "$VAR" = "decoration" ] && CFG_DECORATION_ON="$CFG_DECORATION_ON $VAL"
+ [ "$VAR" = "mouse" ] && CFG_MOUSE_ON="$CFG_MOUSE_ON $VAL"
+ VAR="${VAR}-driver"
+ fi
+ fi
+ QMakeVar add "${VAR}s" "${VAL}"
+ elif [ "$OPT" = "no" ]; then
+ PLUG_VAR="${VAR}-plugin"
+ if [ "$VAR" = "gfx" ] || [ "$VAR" = "kbd" ] || [ "$VAR" = "mouse" ]; then
+ IN_VAR="${VAR}-driver"
+ else
+ IN_VAR="${VAR}"
+ fi
+ [ "$VAR" = "decoration" ] && CFG_DECORATION_ON=`echo "${CFG_DECORATION_ON} " | sed "s,${VAL} ,,g"`
+ [ "$VAR" = "gfx" ] && CFG_GFX_ON=`echo "${CFG_GFX_ON} " | sed "s,${VAL} ,,g"`
+ [ "$VAR" = "kbd" ] && CFG_KBD_ON=`echo "${CFG_KBD_ON} " | sed "s,${VAL} ,,g"`
+ [ "$VAR" = "mouse" ] && CFG_MOUSE_ON=`echo "${CFG_MOUSE_ON} " | sed "s,${VAL} ,,g"`
+ QMakeVar del "${IN_VAR}s" "$VAL"
+ QMakeVar del "${PLUG_VAR}s" "$VAL"
+ fi
+ if [ "$ERROR" = "yes" ]; then
+ echo "$CURRENT_OPT: unknown argument"
+ OPT_HELP=yes
+ fi
+ ;;
+ v|verbose)
+ if [ "$VAL" = "yes" ]; then
+ if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
+ QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
+ else
+ OPT_VERBOSE=yes
+ fi
+ elif [ "$VAL" = "no" ]; then
+ if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
+ QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed "s, -d,,"`
+ else
+ OPT_VERBOSE=no
+ fi
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ fast)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ OPT_FAST="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ rpath)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_RPATH="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ add_define)
+ D_FLAGS="$D_FLAGS \"$VAL\""
+ ;;
+ add_ipath)
+ I_FLAGS="$I_FLAGS -I\"${VAL}\""
+ ;;
+ add_lpath)
+ L_FLAGS="$L_FLAGS -L\"${VAL}\""
+ ;;
+ add_rpath)
+ RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
+ ;;
+ add_link)
+ l_FLAGS="$l_FLAGS -l\"${VAL}\""
+ ;;
+ add_fpath)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ L_FLAGS="$L_FLAGS -F\"${VAL}\""
+ I_FLAGS="$I_FLAGS -F\"${VAL}\""
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ add_framework)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ l_FLAGS="$l_FLAGS -framework \"${VAL}\""
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ silent)
+ CFG_SILENT="$VAL"
+ ;;
+ phonon)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_PHONON="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ phonon-backend)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_PHONON_BACKEND="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
+ *)
+ UNKNOWN_OPT=yes
+ ;;
+ esac
+ if [ "$UNKNOWN_OPT" = "yes" ]; then
+ echo "${CURRENT_OPT}: invalid command-line switch"
+ OPT_HELP=yes
+ ERROR=yes
+ fi
+done
+
+if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
+ echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
+ CFG_QT3SUPPORT="no"
+fi
+
+# update QT_CONFIG to show our current predefined configuration
+case "$CFG_QCONFIG" in
+minimal|small|medium|large|full)
+ # these are a sequence of increasing functionality
+ for c in minimal small medium large full; do
+ QT_CONFIG="$QT_CONFIG $c-config"
+ [ "$CFG_QCONFIG" = $c ] && break
+ done
+ ;;
+*)
+ # not known to be sufficient for anything
+ if [ '!' -f "$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h" ]; then
+ echo >&2 "Error: configuration file not found:"
+ echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
+ OPT_HELP=yes
+ fi
+esac
+
+#-------------------------------------------------------------------------------
+# build tree initialization
+#-------------------------------------------------------------------------------
+
+# where to find which..
+unixtests="$relpath/config.tests/unix"
+mactests="$relpath/config.tests/mac"
+WHICH="$unixtests/which.test"
+
+PERL=`$WHICH perl 2>/dev/null`
+
+# find out which awk we want to use, prefer gawk, then nawk, then regular awk
+AWK=
+for e in gawk nawk awk; do
+ if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
+ AWK=$e
+ break
+ fi
+done
+
+### skip this if the user just needs help...
+if [ "$OPT_HELP" != "yes" ]; then
+
+# is this a shadow build?
+if [ "$OPT_SHADOW" = "maybe" ]; then
+ OPT_SHADOW=no
+ if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
+ if [ -h "$outpath" ]; then
+ [ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
+ else
+ OPT_SHADOW=yes
+ fi
+ fi
+fi
+if [ "$OPT_SHADOW" = "yes" ]; then
+ if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" ]; then
+ echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
+ echo >&2 "Cannot proceed."
+ exit 1
+ fi
+ [ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
+fi
+
+if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+ echo
+ echo "WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux"
+ echo "By default, Qt is built in release mode with separate debug information, so"
+ echo "-debug-and-release is not necessary anymore"
+ echo
+fi
+
+# detect build style
+if [ "$CFG_DEBUG" = "auto" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ CFG_DEBUG_RELEASE=yes
+ CFG_DEBUG=yes
+ elif [ "$CFG_DEV" = "yes" ]; then
+ CFG_DEBUG_RELEASE=no
+ CFG_DEBUG=yes
+ else
+ CFG_DEBUG_RELEASE=no
+ CFG_DEBUG=no
+ fi
+fi
+if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG build_all"
+fi
+
+if [ "$CFG_SILENT" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG silent"
+fi
+
+# if the source tree is different from the build tree,
+# symlink or copy part of the sources
+if [ "$OPT_SHADOW" = "yes" ]; then
+ echo "Preparing build tree..."
+
+ if [ -z "$PERL" ]; then
+ echo
+ echo "You need perl in your PATH to make a shadow build."
+ echo "Cannot proceed."
+ exit 1
+ fi
+
+ [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
+
+ # symlink the qmake directory
+ find "$relpath/qmake" | while read a; do
+ my_a=`echo "$a" | sed "s,^${relpath}/,${outpath}/,"`
+ if [ '!' -f "$my_a" ]; then
+ if [ -d "$a" ]; then
+ # directories are created...
+ mkdir -p "$my_a"
+ else
+ a_dir=`dirname "$my_a"`
+ [ -d "$a_dir" ] || mkdir -p "$a_dir"
+ # ... and files are symlinked
+ case `basename "$a"` in
+ *.o|*.d|GNUmakefile*|qmake)
+ ;;
+ *)
+ rm -f "$my_a"
+ ln -s "$a" "$my_a"
+ ;;
+ esac
+ fi
+ fi
+ done
+
+ # make a syncqt script that can be used in the shadow
+ rm -f "$outpath/bin/syncqt"
+ if [ -x "$relpath/bin/syncqt" ]; then
+ mkdir -p "$outpath/bin"
+ echo "#!/bin/sh" >"$outpath/bin/syncqt"
+ echo "QTDIR=\"$relpath\"; export QTDIR" >>"$outpath/bin/syncqt"
+ echo "perl \"$relpath/bin/syncqt\" -outdir \"$outpath\" $*" >>"$outpath/bin/syncqt"
+ chmod 755 "$outpath/bin/syncqt"
+ fi
+
+ # symlink the mkspecs directory
+ mkdir -p "$outpath/mkspecs"
+ rm -f "$outpath"/mkspecs/*
+ ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
+ rm -f "$outpath/mkspecs/default"
+
+ # symlink the doc directory
+ rm -rf "$outpath/doc"
+ ln -s "$relpath/doc" "$outpath/doc"
+
+ # make sure q3porting.xml can be found
+ mkdir -p "$outpath/tools/porting/src"
+ rm -f "$outpath/tools/porting/src/q3porting.xml"
+ ln -s "$relpath/tools/porting/src/q3porting.xml" "$outpath/tools/porting/src"
+fi
+
+# symlink files from src/gui/embedded neccessary to build qvfb
+if [ "$CFG_DEV" = "yes" ]; then
+ for f in qvfbhdr.h qlock_p.h qlock.cpp qwssignalhandler_p.h qwssignalhandler.cpp; do
+ dest="${relpath}/tools/qvfb/${f}"
+ rm -f "$dest"
+ ln -s "${relpath}/src/gui/embedded/${f}" "${dest}"
+ done
+fi
+
+# symlink fonts to be able to run application from build directory
+if [ "$PLATFORM_QWS" = "yes" ] && [ ! -e "${outpath}/lib/fonts" ]; then
+ if [ "$PLATFORM" = "$XPLATFORM" ]; then
+ mkdir -p "${outpath}/lib"
+ ln -s "${relpath}/lib/fonts" "${outpath}/lib/fonts"
+ fi
+fi
+
+if [ "$OPT_FAST" = "auto" ]; then
+ if [ '!' -z "$AWK" ] && [ "$CFG_DEV" = "yes" ]; then
+ OPT_FAST=yes
+ else
+ OPT_FAST=no
+ fi
+fi
+
+# find a make command
+if [ -z "$MAKE" ]; then
+ MAKE=
+ for mk in gmake make; do
+ if "$WHICH" $mk >/dev/null 2>&1; then
+ MAKE=`$WHICH $mk`
+ break
+ fi
+ done
+ if [ -z "$MAKE" ]; then
+ echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
+ echo >&2 "Cannot proceed."
+ exit 1
+ fi
+fi
+
+fi ### help
+
+#-------------------------------------------------------------------------------
+# auto-detect all that hasn't been specified in the arguments
+#-------------------------------------------------------------------------------
+
+[ "$PLATFORM_QWS" = "yes" -a "$CFG_EMBEDDED" = "no" ] && CFG_EMBEDDED=auto
+if [ "$CFG_EMBEDDED" != "no" ]; then
+ case "$UNAME_SYSTEM:$UNAME_RELEASE" in
+ Darwin:*)
+ [ -z "$PLATFORM" ] && PLATFORM=qws/macx-generic-g++
+ if [ -z "$XPLATFORM" ]; then
+ [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
+ XPLATFORM="qws/macx-$CFG_EMBEDDED-g++"
+ fi
+ ;;
+ FreeBSD:*)
+ [ -z "$PLATFORM" ] && PLATFORM=qws/freebsd-generic-g++
+ if [ -z "$XPLATFORM" ]; then
+ [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
+ XPLATFORM="qws/freebsd-$CFG_EMBEDDED-g++"
+ fi
+ ;;
+ SunOS:5*)
+ [ -z "$PLATFORM" ] && PLATFORM=qws/solaris-generic-g++
+ if [ -z "$XPLATFORM" ]; then
+ [ "$CFG_EMBEDDED" = "auto" ] && CFG_EMBEDDED=generic
+ XPLATFORM="qws/solaris-$CFG_EMBEDDED-g++"
+ fi
+ ;;
+ Linux:*)
+ if [ -z "$PLATFORM" ]; then
+ case "$UNAME_MACHINE" in
+ *86)
+ PLATFORM=qws/linux-x86-g++
+ ;;
+ *86_64)
+ PLATFORM=qws/linux-x86_64-g++
+ ;;
+ *ppc)
+ PLATFORM=qws/linux-ppc-g++
+ ;;
+ *)
+ PLATFORM=qws/linux-generic-g++
+ ;;
+ esac
+ fi
+ if [ -z "$XPLATFORM" ]; then
+ if [ "$CFG_EMBEDDED" = "auto" ]; then
+ if [ -n "$CFG_ARCH" ]; then
+ CFG_EMBEDDED=$CFG_ARCH
+ else
+ case "$UNAME_MACHINE" in
+ *86)
+ CFG_EMBEDDED=x86
+ ;;
+ *86_64)
+ CFG_EMBEDDED=x86_64
+ ;;
+ *ppc)
+ CFG_EMBEDDED=ppc
+ ;;
+ *)
+ CFG_EMBEDDED=generic
+ ;;
+ esac
+ fi
+ fi
+ XPLATFORM="qws/linux-$CFG_EMBEDDED-g++"
+ fi
+ ;;
+ CYGWIN*:*)
+ CFG_EMBEDDED=x86
+ ;;
+ *)
+ echo "Qt for Embedded Linux is not supported on this platform. Disabling."
+ CFG_EMBEDDED=no
+ PLATFORM_QWS=no
+ ;;
+ esac
+fi
+if [ -z "$PLATFORM" ]; then
+ PLATFORM_NOTES=
+ case "$UNAME_SYSTEM:$UNAME_RELEASE" in
+ Darwin:*)
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ PLATFORM=macx-g++
+ # PLATFORM=macx-xcode
+ else
+ PLATFORM=darwin-g++
+ fi
+ ;;
+ AIX:*)
+ #PLATFORM=aix-g++
+ #PLATFORM=aix-g++-64
+ PLATFORM=aix-xlc
+ #PLATFORM=aix-xlc-64
+ PLATFORM_NOTES="
+ - Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
+ "
+ ;;
+ GNU:*)
+ PLATFORM=hurd-g++
+ ;;
+ dgux:*)
+ PLATFORM=dgux-g++
+ ;;
+# DYNIX/ptx:4*)
+# PLATFORM=dynix-g++
+# ;;
+ ULTRIX:*)
+ PLATFORM=ultrix-g++
+ ;;
+ FreeBSD:*)
+ PLATFORM=freebsd-g++
+ PLATFORM_NOTES="
+ - Also available for FreeBSD: freebsd-icc
+ "
+ ;;
+ OpenBSD:*)
+ PLATFORM=openbsd-g++
+ ;;
+ NetBSD:*)
+ PLATFORM=netbsd-g++
+ ;;
+ BSD/OS:*|BSD/386:*)
+ PLATFORM=bsdi-g++
+ ;;
+ IRIX*:*)
+ #PLATFORM=irix-g++
+ PLATFORM=irix-cc
+ #PLATFORM=irix-cc-64
+ PLATFORM_NOTES="
+ - Also available for IRIX: irix-g++ irix-cc-64
+ "
+ ;;
+ HP-UX:*)
+ case "$UNAME_MACHINE" in
+ ia64)
+ #PLATFORM=hpuxi-acc-32
+ PLATFORM=hpuxi-acc-64
+ PLATFORM_NOTES="
+ - Also available for HP-UXi: hpuxi-acc-32
+ "
+ ;;
+ *)
+ #PLATFORM=hpux-g++
+ PLATFORM=hpux-acc
+ #PLATFORM=hpux-acc-64
+ #PLATFORM=hpux-cc
+ #PLATFORM=hpux-acc-o64
+ PLATFORM_NOTES="
+ - Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
+ "
+ ;;
+ esac
+ ;;
+ OSF1:*)
+ #PLATFORM=tru64-g++
+ PLATFORM=tru64-cxx
+ PLATFORM_NOTES="
+ - Also available for Tru64: tru64-g++
+ "
+ ;;
+ Linux:*)
+ case "$UNAME_MACHINE" in
+ x86_64|s390x|ppc64)
+ PLATFORM=linux-g++-64
+ ;;
+ *)
+ PLATFORM=linux-g++
+ ;;
+ esac
+ PLATFORM_NOTES="
+ - Also available for Linux: linux-kcc linux-icc linux-cxx
+ "
+ ;;
+ SunOS:5*)
+ #PLATFORM=solaris-g++
+ PLATFORM=solaris-cc
+ #PLATFORM=solaris-cc64
+ PLATFORM_NOTES="
+ - Also available for Solaris: solaris-g++ solaris-cc-64
+ "
+ ;;
+ ReliantUNIX-*:*|SINIX-*:*)
+ PLATFORM=reliant-cds
+ #PLATFORM=reliant-cds-64
+ PLATFORM_NOTES="
+ - Also available for Reliant UNIX: reliant-cds-64
+ "
+ ;;
+ CYGWIN*:*)
+ PLATFORM=cygwin-g++
+ ;;
+ LynxOS*:*)
+ PLATFORM=lynxos-g++
+ ;;
+ OpenUNIX:*)
+ #PLATFORM=unixware-g++
+ PLATFORM=unixware-cc
+ PLATFORM_NOTES="
+ - Also available for OpenUNIX: unixware-g++
+ "
+ ;;
+ UnixWare:*)
+ #PLATFORM=unixware-g++
+ PLATFORM=unixware-cc
+ PLATFORM_NOTES="
+ - Also available for UnixWare: unixware-g++
+ "
+ ;;
+ SCO_SV:*)
+ #PLATFORM=sco-g++
+ PLATFORM=sco-cc
+ PLATFORM_NOTES="
+ - Also available for SCO OpenServer: sco-g++
+ "
+ ;;
+ UNIX_SV:*)
+ PLATFORM=unixware-g++
+ ;;
+ *)
+ if [ "$OPT_HELP" != "yes" ]; then
+ echo
+ for p in $PLATFORMS; do
+ echo " $relconf $* -platform $p"
+ done
+ echo >&2
+ echo " The build script does not currently recognize all" >&2
+ echo " platforms supported by Qt." >&2
+ echo " Rerun this script with a -platform option listed to" >&2
+ echo " set the system/compiler combination you use." >&2
+ echo >&2
+ exit 2
+ fi
+ esac
+fi
+
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ CFG_SM=no
+ PLATFORMS=`find "$relpath/mkspecs/qws" | sed "s,$relpath/mkspecs/qws/,,"`
+else
+ PLATFORMS=`find "$relpath/mkspecs/" -type f | grep -v qws | sed "s,$relpath/mkspecs/qws/,,"`
+fi
+
+[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
+if [ -d "$PLATFORM" ]; then
+ QMAKESPEC="$PLATFORM"
+else
+ QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
+fi
+if [ -d "$XPLATFORM" ]; then
+ XQMAKESPEC="$XPLATFORM"
+else
+ XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
+fi
+if [ "$PLATFORM" != "$XPLATFORM" ]; then
+ QT_CROSS_COMPILE=yes
+ QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
+fi
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
+ echo >&2
+ echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
+ echo " Please build Qt/Mac with 'macx-g++', then if you would like to" >&2
+ echo " use mac-xcode on your application code it can link to a Qt/Mac" >&2
+ echo " built with 'macx-g++'" >&2
+ echo >&2
+ exit 2
+ fi
+fi
+
+# check specified platforms are supported
+if [ '!' -d "$QMAKESPEC" ]; then
+ echo
+ echo " The specified system/compiler is not supported:"
+ echo
+ echo " $QMAKESPEC"
+ echo
+ echo " Please see the README file for a complete list."
+ echo
+ exit 2
+fi
+if [ '!' -d "$XQMAKESPEC" ]; then
+ echo
+ echo " The specified system/compiler is not supported:"
+ echo
+ echo " $XQMAKESPEC"
+ echo
+ echo " Please see the README file for a complete list."
+ echo
+ exit 2
+fi
+if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
+ echo
+ echo " The specified system/compiler port is not complete:"
+ echo
+ echo " $XQMAKESPEC/qplatformdefs.h"
+ echo
+ echo " Please contact qt-bugs@trolltech.com."
+ echo
+ exit 2
+fi
+
+# now look at the configs and figure out what platform we are config'd for
+[ "$CFG_EMBEDDED" = "no" ] \
+ && [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ] \
+ && PLATFORM_X11=yes
+### echo "$XQMAKESPEC" | grep mkspecs/qws >/dev/null 2>&1 && PLATFORM_QWS=yes
+
+if [ "$UNAME_SYSTEM" = "SunOS" ]; then
+ # Solaris 2.5 and 2.6 have libposix4, which was renamed to librt for Solaris 7 and up
+ if echo $UNAME_RELEASE | grep "^5\.[5|6]" >/dev/null 2>&1; then
+ sed -e "s,-lrt,-lposix4," "$XQMAKESPEC/qmake.conf" > "$XQMAKESPEC/qmake.conf.new"
+ mv "$XQMAKESPEC/qmake.conf.new" "$XQMAKESPEC/qmake.conf"
+ fi
+fi
+
+#-------------------------------------------------------------------------------
+# determine the system architecture
+#-------------------------------------------------------------------------------
+if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo "Determining system architecture... ($UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE)"
+fi
+
+if [ "$CFG_EMBEDDED" != "no" -a "$CFG_EMBEDDED" != "auto" ] && [ -n "$CFG_ARCH" ]; then
+ if [ "$CFG_ARCH" != "$CFG_EMBEDDED" ]; then
+ echo ""
+ echo "You have specified a target architecture with -embedded and -arch."
+ echo "The two architectures you have specified are different, so we can"
+ echo "not proceed. Either set both to be the same, or only use -embedded."
+ echo ""
+ exit 1
+ fi
+fi
+
+if [ -z "${CFG_HOST_ARCH}" ]; then
+ case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in
+ IRIX*:*:*)
+ CFG_HOST_ARCH=`uname -p`
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " SGI ($CFG_HOST_ARCH)"
+ fi
+ ;;
+ SunOS:5*:*)
+ case "$UNAME_MACHINE" in
+ sun4u*|sun4v*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " Sun SPARC (sparc)"
+ fi
+ CFG_HOST_ARCH=sparc
+ ;;
+ i86pc)
+ case "$PLATFORM" in
+ *-64)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 64-bit AMD 80x86 (x86_64)"
+ fi
+ CFG_HOST_ARCH=x86_64
+ ;;
+ *)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32-bit Intel 80x86 (i386)"
+ fi
+ CFG_HOST_ARCH=i386
+ ;;
+ esac
+ esac
+ ;;
+ Darwin:*:*)
+ case "$UNAME_MACHINE" in
+ Power?Macintosh)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32-bit Apple PowerPC (powerpc)"
+ fi
+ ;;
+ x86)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32-bit Intel 80x86 (i386)"
+ fi
+ ;;
+ esac
+ CFG_HOST_ARCH=macosx
+ ;;
+ AIX:*:00????????00)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 64-bit IBM PowerPC (powerpc)"
+ fi
+ CFG_HOST_ARCH=powerpc
+ ;;
+ HP-UX:*:9000*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " HP PA-RISC (parisc)"
+ fi
+ CFG_HOST_ARCH=parisc
+ ;;
+ *:*:i?86)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32-bit Intel 80x86 (i386)"
+ fi
+ CFG_HOST_ARCH=i386
+ ;;
+ *:*:x86_64|*:*:amd64)
+ if [ "$PLATFORM" = "linux-g++-32" -o "$PLATFORM" = "linux-icc-32" ]; then
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32 bit on 64-bit AMD 80x86 (i386)"
+ fi
+ CFG_HOST_ARCH=i386
+ else
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 64-bit AMD 80x86 (x86_64)"
+ fi
+ CFG_HOST_ARCH=x86_64
+ fi
+ ;;
+ *:*:ppc)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 32-bit PowerPC (powerpc)"
+ fi
+ CFG_HOST_ARCH=powerpc
+ ;;
+ *:*:ppc64)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 64-bit PowerPC (powerpc)"
+ fi
+ CFG_HOST_ARCH=powerpc
+ ;;
+ *:*:s390*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " IBM S/390 (s390)"
+ fi
+ CFG_HOST_ARCH=s390
+ ;;
+ *:*:arm*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " ARM (arm)"
+ fi
+ CFG_HOST_ARCH=arm
+ ;;
+ Linux:*:sparc*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " Linux on SPARC"
+ fi
+ CFG_HOST_ARCH=sparc
+ ;;
+ *:*:*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " Trying '$UNAME_MACHINE'..."
+ fi
+ CFG_HOST_ARCH="$UNAME_MACHINE"
+ ;;
+ esac
+fi
+
+if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
+ if [ -n "$CFG_ARCH" ]; then
+ CFG_EMBEDDED=$CFG_ARCH
+ fi
+
+ case "$CFG_EMBEDDED" in
+ x86)
+ CFG_ARCH=i386
+ ;;
+ x86_64)
+ CFG_ARCH=x86_64
+ ;;
+ ipaq|sharp)
+ CFG_ARCH=arm
+ ;;
+ dm7000)
+ CFG_ARCH=powerpc
+ ;;
+ dm800)
+ CFG_ARCH=mips
+ ;;
+ sh4al)
+ CFG_ARCH=sh4a
+ ;;
+ *)
+ CFG_ARCH="$CFG_EMBEDDED"
+ ;;
+ esac
+elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
+ CFG_ARCH=$CFG_HOST_ARCH
+fi
+
+if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " '$CFG_ARCH' is supported"
+ fi
+else
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " '$CFG_ARCH' is unsupported, using 'generic'"
+ fi
+ CFG_ARCH=generic
+fi
+if [ "$CFG_HOST_ARCH" != "$CFG_ARCH" ]; then
+ if [ -d "$relpath/src/corelib/arch/$CFG_HOST_ARCH" ]; then
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " '$CFG_HOST_ARCH' is supported"
+ fi
+ else
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " '$CFG_HOST_ARCH' is unsupported, using 'generic'"
+ fi
+ CFG_HOST_ARCH=generic
+ fi
+fi
+
+if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo "System architecture: '$CFG_ARCH'"
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ echo "Host architecture: '$CFG_HOST_ARCH'"
+ fi
+fi
+
+#-------------------------------------------------------------------------------
+# tests that don't need qmake (must be run before displaying help)
+#-------------------------------------------------------------------------------
+
+if [ -z "$PKG_CONFIG" ]; then
+ # See if PKG_CONFIG is set in the mkspec:
+ PKG_CONFIG=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%PKG_CONFIG[^_].*=%%p' | tr '\n' ' '`
+fi
+if [ -z "$PKG_CONFIG" ]; then
+ PKG_CONFIG=`$WHICH pkg-config 2>/dev/null`
+fi
+
+# Work out if we can use pkg-config
+if [ "$QT_CROSS_COMPILE" = "yes" ]; then
+ if [ "$QT_FORCE_PKGCONFIG" = "yes" ]; then
+ echo >&2 ""
+ echo >&2 "You have asked to use pkg-config and are cross-compiling."
+ echo >&2 "Please make sure you have a correctly set-up pkg-config"
+ echo >&2 "environment!"
+ echo >&2 ""
+ if [ -z "$PKG_CONFIG_PATH" ]; then
+ echo >&2 ""
+ echo >&2 "Warning: PKG_CONFIG_PATH has not been set. This could mean"
+ echo >&2 "the host compiler's .pc files will be used. This is probably"
+ echo >&2 "not what you want."
+ echo >&2 ""
+ elif [ -z "$PKG_CONFIG_SYSROOT" ] && [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
+ echo >&2 ""
+ echo >&2 "Warning: PKG_CONFIG_SYSROOT/PKG_CONFIG_SYSROOT_DIR has not"
+ echo >&2 "been set. This means your toolchain's .pc files must contain"
+ echo >&2 "the paths to the toolchain's libraries & headers. If configure"
+ echo >&2 "tests are failing, please check these files."
+ echo >&2 ""
+ fi
+ else
+ PKG_CONFIG=""
+ fi
+fi
+
+# find the default framework value
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
+ if [ "$CFG_FRAMEWORK" = "auto" ]; then
+ CFG_FRAMEWORK="$CFG_SHARED"
+ elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
+ echo
+ echo "WARNING: Using static linking will disable the use of Mac frameworks."
+ echo
+ CFG_FRAMEWORK="no"
+ fi
+else
+ CFG_FRAMEWORK=no
+fi
+
+QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
+TEST_COMPILER="$CC"
+[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
+
+# auto-detect precompiled header support
+if [ "$CFG_PRECOMPILE" = "auto" ]; then
+ if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
+ CFG_PRECOMPILE=no
+ elif "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
+ CFG_PRECOMPILE=no
+ else
+ CFG_PRECOMPILE=yes
+ fi
+elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then
+ echo
+ echo "WARNING: Using universal binaries disables precompiled headers."
+ echo
+ CFG_PRECOMPILE=no
+fi
+
+#auto-detect DWARF2 on the mac
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then
+ if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
+ CFG_MAC_DWARF2=no
+ else
+ CFG_MAC_DWARF2=yes
+ fi
+fi
+
+# auto-detect support for -Xarch on the mac
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then
+ if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
+ CFG_MAC_XARCH=no
+ else
+ CFG_MAC_XARCH=yes
+ fi
+fi
+
+# don't autodetect support for separate debug info on objcopy when
+# cross-compiling as lots of toolchains seems to have problems with this
+if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
+ CFG_SEPARATE_DEBUG_INFO="no"
+fi
+
+# auto-detect support for separate debug info in objcopy
+if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
+ TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
+ TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
+ TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
+ COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
+ COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
+ if "$unixtests/objcopy.test" "$COMPILER_WITH_FLAGS" "$TEST_OBJCOPY" "$OPT_VERBOSE"; then
+ CFG_SEPARATE_DEBUG_INFO=no
+ else
+ case "$PLATFORM" in
+ hpux-*)
+ # binutils on HP-UX is buggy; default to no.
+ CFG_SEPARATE_DEBUG_INFO=no
+ ;;
+ *)
+ CFG_SEPARATE_DEBUG_INFO=yes
+ ;;
+ esac
+ fi
+fi
+
+# auto-detect -fvisibility support
+if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then
+ if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
+ CFG_REDUCE_EXPORTS=no
+ else
+ CFG_REDUCE_EXPORTS=yes
+ fi
+fi
+
+# detect the availability of the -Bsymbolic-functions linker optimization
+if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
+ if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
+ CFG_REDUCE_RELOCATIONS=no
+ else
+ CFG_REDUCE_RELOCATIONS=yes
+ fi
+fi
+
+# auto-detect GNU make support
+if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
+ CFG_USE_GNUMAKE=yes
+fi
+
+# If -opengl wasn't specified, don't try to auto-detect
+if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
+ CFG_OPENGL=no
+fi
+
+# mac
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
+ CFG_OPENGL=desktop
+ fi
+fi
+
+# find the default framework value
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
+ if [ "$CFG_FRAMEWORK" = "auto" ]; then
+ CFG_FRAMEWORK="$CFG_SHARED"
+ elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
+ echo
+ echo "WARNING: Using static linking will disable the use of Mac frameworks."
+ echo
+ CFG_FRAMEWORK="no"
+ fi
+else
+ CFG_FRAMEWORK=no
+fi
+
+# x11 tests are done after qmake is built
+
+
+#setup the build parts
+if [ -z "$CFG_BUILD_PARTS" ]; then
+ CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
+
+ # don't build tools by default when cross-compiling
+ if [ "$PLATFORM" != "$XPLATFORM" ]; then
+ CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
+ fi
+fi
+for nobuild in $CFG_NOBUILD_PARTS; do
+ CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
+done
+if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
+# echo
+# echo "WARNING: libs is a required part of the build."
+# echo
+ CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
+fi
+
+#-------------------------------------------------------------------------------
+# post process QT_INSTALL_* variables
+#-------------------------------------------------------------------------------
+
+#prefix
+if [ -z "$QT_INSTALL_PREFIX" ]; then
+ if [ "$CFG_DEV" = "yes" ]; then
+ QT_INSTALL_PREFIX="$outpath" # At Trolltech, we use sandboxed builds by default
+ elif [ "$PLATFORM_QWS" = "yes" ]; then
+ QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
+ if [ "$PLATFORM" != "$XPLATFORM" ]; then
+ QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
+ fi
+ else
+ QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION
+ fi
+fi
+QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
+
+#docs
+if [ -z "$QT_INSTALL_DOCS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_DOCS="/Developer/Documentation/Qt"
+ fi
+ fi
+ [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
+
+fi
+QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
+
+#headers
+if [ -z "$QT_INSTALL_HEADERS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_FRAMEWORK" = "yes" ]; then
+ QT_INSTALL_HEADERS=
+ fi
+ fi
+ fi
+ [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
+
+fi
+QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
+
+#libs
+if [ -z "$QT_INSTALL_LIBS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_FRAMEWORK" = "yes" ]; then
+ QT_INSTALL_LIBS="/Libraries/Frameworks"
+ fi
+ fi
+ fi
+ [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
+fi
+QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
+
+#bins
+if [ -z "$QT_INSTALL_BINS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_BINS="/Developer/Applications/Qt"
+ fi
+ fi
+ [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
+
+fi
+QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
+
+#plugins
+if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
+ fi
+ fi
+ [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
+fi
+QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
+
+#data
+if [ -z "$QT_INSTALL_DATA" ]; then #default
+ QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
+fi
+QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
+
+#translations
+if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
+ QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
+fi
+QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
+
+#settings
+if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_SETTINGS=/Library/Preferences/Qt
+ else
+ QT_INSTALL_SETTINGS=/etc/xdg
+ fi
+fi
+QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
+
+#examples
+if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
+ fi
+ fi
+ [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
+fi
+QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
+
+#demos
+if [ -z "$QT_INSTALL_DEMOS" ]; then #default
+ if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos"
+ fi
+ fi
+ [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos"
+fi
+QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"`
+
+#-------------------------------------------------------------------------------
+# help - interactive parts of the script _after_ this section please
+#-------------------------------------------------------------------------------
+
+# next, emit a usage message if something failed.
+if [ "$OPT_HELP" = "yes" ]; then
+ [ "x$ERROR" = "xyes" ] && echo
+ if [ "$CFG_NIS" = "no" ]; then
+ NSY=" "
+ NSN="*"
+ else
+ NSY="*"
+ NSN=" "
+ fi
+ if [ "$CFG_CUPS" = "no" ]; then
+ CUY=" "
+ CUN="*"
+ else
+ CUY="*"
+ CUN=" "
+ fi
+ if [ "$CFG_ICONV" = "no" ]; then
+ CIY=" "
+ CIN="*"
+ else
+ CIY="*"
+ CIN=" "
+ fi
+ if [ "$CFG_LARGEFILE" = "no" ]; then
+ LFSY=" "
+ LFSN="*"
+ else
+ LFSY="*"
+ LFSN=" "
+ fi
+ if [ "$CFG_STL" = "auto" ] || [ "$CFG_STL" = "yes" ]; then
+ SHY="*"
+ SHN=" "
+ else
+ SHY=" "
+ SHN="*"
+ fi
+ if [ "$CFG_IPV6" = "auto" ]; then
+ I6Y="*"
+ I6N=" "
+ fi
+ if [ "$CFG_PRECOMPILE" = "auto" ] || [ "$CFG_PRECOMPILE" = "no" ]; then
+ PHY=" "
+ PHN="*"
+ else
+ PHY="*"
+ PHN=" "
+ fi
+
+ cat <<EOF
+Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
+ [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
+ [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
+ [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
+ [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
+ [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
+ [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
+ [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
+ [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
+ [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
+ [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
+ [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
+ [-no-make <part>] [-R <string>] [-l <string>] [-no-rpath] [-rpath] [-continue]
+ [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
+ [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
+ [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
+ [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
+ [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
+ [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
+ [-no-openssl] [-openssl] [-openssl-linked]
+ [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
+ [-no-scripttools] [-scripttools]
+
+ [additional platform specific options (see below)]
+
+
+Installation options:
+
+ These are optional, but you may specify install directories.
+
+ -prefix <dir> ...... This will install everything relative to <dir>
+ (default $QT_INSTALL_PREFIX)
+EOF
+if [ "$PLATFORM_QWS" = "yes" ]; then
+cat <<EOF
+
+ -hostprefix [dir] .. Tools and libraries needed when developing
+ applications are installed in [dir]. If [dir] is
+ not given, the current build directory will be used.
+EOF
+fi
+cat <<EOF
+
+ * -prefix-install .... Force a sandboxed "local" installation of
+ Qt. This will install into
+ $QT_INSTALL_PREFIX, if this option is
+ disabled then some platforms will attempt a
+ "system" install by placing default values to
+ be placed in a system location other than
+ PREFIX.
+
+ You may use these to separate different parts of the install:
+
+ -bindir <dir> ......... Executables will be installed to <dir>
+ (default PREFIX/bin)
+ -libdir <dir> ......... Libraries will be installed to <dir>
+ (default PREFIX/lib)
+ -docdir <dir> ......... Documentation will be installed to <dir>
+ (default PREFIX/doc)
+ -headerdir <dir> ...... Headers will be installed to <dir>
+ (default PREFIX/include)
+ -plugindir <dir> ...... Plugins will be installed to <dir>
+ (default PREFIX/plugins)
+ -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
+ (default PREFIX)
+ -translationdir <dir> . Translations of Qt programs will be installed to <dir>
+ (default PREFIX/translations)
+ -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
+ (default PREFIX/etc/settings)
+ -examplesdir <dir> .... Examples will be installed to <dir>
+ (default PREFIX/examples)
+ -demosdir <dir> ....... Demos will be installed to <dir>
+ (default PREFIX/demos)
+
+ You may use these options to turn on strict plugin loading.
+
+ -buildkey <key> .... Build the Qt library and plugins using the specified
+ <key>. When the library loads plugins, it will only
+ load those that have a matching key.
+
+Configure options:
+
+ The defaults (*) are usually acceptable. A plus (+) denotes a default value
+ that needs to be evaluated. If the evaluation succeeds, the feature is
+ included. Here is a short explanation of each option:
+
+ * -release ........... Compile and link Qt with debugging turned off.
+ -debug ............. Compile and link Qt with debugging turned on.
+ -debug-and-release . Compile and link two versions of Qt, with and without
+ debugging turned on (Mac only).
+
+ -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)
+
+ -opensource......... Compile and link the Open-Source Edition of Qt.
+ -commercial......... Compile and link the Commercial Edition of Qt.
+
+
+ * -shared ............ Create and use shared Qt libraries.
+ -static ............ Create and use static Qt libraries.
+
+ * -no-fast ........... Configure Qt normally by generating Makefiles for all
+ project files.
+ -fast .............. Configure Qt quickly by generating Makefiles only for
+ library and subdirectory targets. All other Makefiles
+ are created as wrappers, which will in turn run qmake.
+
+ -no-largefile ...... Disables large file support.
+ + -largefile ......... Enables Qt to access files larger than 4 GB.
+
+EOF
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ EXCN="*"
+ EXCY=" "
+else
+ EXCN=" "
+ EXCY="*"
+fi
+if [ "$CFG_DBUS" = "no" ]; then
+ DBY=" "
+ DBN="+"
+else
+ DBY="+"
+ DBN=" "
+fi
+
+ cat << EOF
+ $EXCN -no-exceptions ..... Disable exceptions on compilers that support it.
+ $EXCY -exceptions ........ Enable exceptions on compilers that support it.
+
+ -no-accessibility .. Do not compile Accessibility support.
+ * -accessibility ..... Compile Accessibility support.
+
+ $SHN -no-stl ............ Do not compile STL support.
+ $SHY -stl ............... Compile STL support.
+
+ -no-sql-<driver> ... Disable SQL <driver> entirely.
+ -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
+ none are turned on.
+ -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
+ at run time.
+
+ Possible values for <driver>:
+ [ $CFG_SQL_AVAILABLE ]
+
+ -system-sqlite ..... Use sqlite from the operating system.
+
+ -no-qt3support ..... Disables the Qt 3 support functionality.
+ * -qt3support ........ Enables the Qt 3 support functionality.
+
+ -no-xmlpatterns .... Do not build the QtXmlPatterns module.
+ + -xmlpatterns ....... Build the QtXmlPatterns module.
+ QtXmlPatterns is built if a decent C++ compiler
+ is used and exceptions are enabled.
+
+ -no-phonon ......... Do not build the Phonon module.
+ + -phonon ............ Build the Phonon module.
+ Phonon is built if a decent C++ compiler is used.
+ -no-phonon-backend.. Do not build the platform phonon plugin.
+ + -phonon-backend..... Build the platform phonon plugin.
+
+ -no-svg ............ Do not build the SVG module.
+ + -svg ............... Build the SVG module.
+
+ -no-webkit ......... Do not build the WebKit module.
+ + -webkit ............ Build the WebKit module.
+ WebKit is built if a decent C++ compiler is used.
+
+ -no-scripttools .... Do not build the QtScriptTools module.
+ + -scripttools ....... Build the QtScriptTools module.
+
+ -platform target ... The operating system and compiler you are building
+ on ($PLATFORM).
+
+ See the README file for a list of supported
+ operating systems and compilers.
+EOF
+if [ "${PLATFORM_QWS}" != "yes" ]; then
+cat << EOF
+ -graphicssystem <sys> Sets an alternate graphics system. Available options are:
+ raster - Software rasterizer
+ opengl - Rendering via OpenGL, Experimental!
+EOF
+fi
+cat << EOF
+
+ -no-mmx ............ Do not compile with use of MMX instructions.
+ -no-3dnow .......... Do not compile with use of 3DNOW instructions.
+ -no-sse ............ Do not compile with use of SSE instructions.
+ -no-sse2 ........... Do not compile with use of SSE2 instructions.
+
+ -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
+ -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
+
+ -D <string> ........ Add an explicit define to the preprocessor.
+ -I <string> ........ Add an explicit include path.
+ -L <string> ........ Add an explicit library path.
+
+ -help, -h .......... Display this information.
+
+Third Party Libraries:
+
+ -qt-zlib ........... Use the zlib bundled with Qt.
+ + -system-zlib ....... Use zlib from the operating system.
+ See http://www.gzip.org/zlib
+
+ -no-gif ............ Do not compile the plugin for GIF reading support.
+ * -qt-gif ............ Compile the plugin for GIF reading support.
+ See also src/plugins/imageformats/gif/qgifhandler.h
+
+ -no-libtiff ........ Do not compile the plugin for TIFF support.
+ -qt-libtiff ........ Use the libtiff bundled with Qt.
+ + -system-libtiff .... Use libtiff from the operating system.
+ See http://www.libtiff.org
+
+ -no-libpng ......... Do not compile in PNG support.
+ -qt-libpng ......... Use the libpng bundled with Qt.
+ + -system-libpng ..... Use libpng from the operating system.
+ See http://www.libpng.org/pub/png
+
+ -no-libmng ......... Do not compile the plugin for MNG support.
+ -qt-libmng ......... Use the libmng bundled with Qt.
+ + -system-libmng ..... Use libmng from the operating system.
+ See http://www.libmng.com
+
+ -no-libjpeg ........ Do not compile the plugin for JPEG support.
+ -qt-libjpeg ........ Use the libjpeg bundled with Qt.
+ + -system-libjpeg .... Use libjpeg from the operating system.
+ See http://www.ijg.org
+
+ -no-openssl ........ Do not compile support for OpenSSL.
+ + -openssl ........... Enable run-time OpenSSL support.
+ -openssl-linked .... Enabled linked OpenSSL support.
+
+ -ptmalloc .......... Override the system memory allocator with ptmalloc.
+ (Experimental.)
+
+Additional options:
+
+ -make <part> ....... Add part to the list of parts to be built at make time.
+ ($QT_DEFAULT_BUILD_PARTS)
+ -nomake <part> ..... Exclude part from the list of parts to be built.
+
+ -R <string> ........ Add an explicit runtime library path to the Qt
+ libraries.
+ -l <string> ........ Add an explicit library.
+
+ -no-rpath .......... Do not use the library install path as a runtime
+ library path.
+ + -rpath ............. Link Qt libraries and executables using the library
+ install path as a runtime library path. Equivalent
+ to -R install_libpath
+
+ -continue .......... Continue as far as possible if an error occurs.
+
+ -verbose, -v ....... Print verbose information about each step of the
+ configure process.
+
+ -silent ............ Reduce the build output so that warnings and errors
+ can be seen more easily.
+
+ * -no-optimized-qmake ... Do not build qmake optimized.
+ -optimized-qmake ...... Build qmake optimized.
+
+ $NSN -no-nis ............ Do not compile NIS support.
+ $NSY -nis ............... Compile NIS support.
+
+ $CUN -no-cups ........... Do not compile CUPS support.
+ $CUY -cups .............. Compile CUPS support.
+ Requires cups/cups.h and libcups.so.2.
+
+ $CIN -no-iconv .......... Do not compile support for iconv(3).
+ $CIY -iconv ............. Compile support for iconv(3).
+
+ $PHN -no-pch ............ Do not use precompiled header support.
+ $PHY -pch ............... Use precompiled header support.
+
+ $DBN -no-dbus ........... Do not compile the QtDBus module.
+ $DBY -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
+ -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
+
+ -reduce-relocations ..... Reduce relocations in the libraries through extra
+ linker optimizations (Qt/X11 and Qt for Embedded Linux only;
+ experimental; needs GNU ld >= 2.18).
+EOF
+
+if [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
+ if [ "$QT_CROSS_COMPILE" = "yes" ]; then
+ SBY=""
+ SBN="*"
+ else
+ SBY="*"
+ SBN=" "
+ fi
+elif [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
+ SBY="*"
+ SBN=" "
+else
+ SBY=" "
+ SBN="*"
+fi
+
+if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
+
+ cat << EOF
+
+ $SBN -no-separate-debug-info . Do not store debug information in a separate file.
+ $SBY -separate-debug-info .... Strip debug information into a separate .debug file.
+
+EOF
+
+fi # X11/QWS
+
+if [ "$PLATFORM_X11" = "yes" ]; then
+ if [ "$CFG_SM" = "no" ]; then
+ SMY=" "
+ SMN="*"
+ else
+ SMY="*"
+ SMN=" "
+ fi
+ if [ "$CFG_XSHAPE" = "no" ]; then
+ SHY=" "
+ SHN="*"
+ else
+ SHY="*"
+ SHN=" "
+ fi
+ if [ "$CFG_XINERAMA" = "no" ]; then
+ XAY=" "
+ XAN="*"
+ else
+ XAY="*"
+ XAN=" "
+ fi
+ if [ "$CFG_FONTCONFIG" = "no" ]; then
+ FCGY=" "
+ FCGN="*"
+ else
+ FCGY="*"
+ FCGN=" "
+ fi
+ if [ "$CFG_XCURSOR" = "no" ]; then
+ XCY=" "
+ XCN="*"
+ else
+ XCY="*"
+ XCN=" "
+ fi
+ if [ "$CFG_XFIXES" = "no" ]; then
+ XFY=" "
+ XFN="*"
+ else
+ XFY="*"
+ XFN=" "
+ fi
+ if [ "$CFG_XRANDR" = "no" ]; then
+ XZY=" "
+ XZN="*"
+ else
+ XZY="*"
+ XZN=" "
+ fi
+ if [ "$CFG_XRENDER" = "no" ]; then
+ XRY=" "
+ XRN="*"
+ else
+ XRY="*"
+ XRN=" "
+ fi
+ if [ "$CFG_MITSHM" = "no" ]; then
+ XMY=" "
+ XMN="*"
+ else
+ XMY="*"
+ XMN=" "
+ fi
+ if [ "$CFG_XINPUT" = "no" ]; then
+ XIY=" "
+ XIN="*"
+ else
+ XIY="*"
+ XIN=" "
+ fi
+ if [ "$CFG_XKB" = "no" ]; then
+ XKY=" "
+ XKN="*"
+ else
+ XKY="*"
+ XKN=" "
+ fi
+ if [ "$CFG_IM" = "no" ]; then
+ IMY=" "
+ IMN="*"
+ else
+ IMY="*"
+ IMN=" "
+ fi
+ cat << EOF
+
+Qt/X11 only:
+
+ -no-gtkstyle ....... Do not build the GTK theme integration.
+ + -gtkstyle .......... Build the GTK theme integration.
+
+ * -no-nas-sound ...... Do not compile in NAS sound support.
+ -system-nas-sound .. Use NAS libaudio from the operating system.
+ See http://radscan.com/nas.html
+
+ -no-opengl ......... Do not support OpenGL.
+ + -opengl <api> ...... Enable OpenGL support.
+ With no parameter, this will auto-detect the "best"
+ OpenGL API to use. If desktop OpenGL is avaliable, it
+ will be used. Use desktop, es1, es1cl or es2 for <api>
+ to force the use of the Desktop (OpenGL 1.x or 2.x),
+ OpenGL ES 1.x Common profile, 1.x Common Lite profile
+ or 2.x APIs instead. On X11, the EGL API will be used
+ to manage GL contexts in the case of OpenGL ES.
+
+ $SMN -no-sm ............. Do not support X Session Management.
+ $SMY -sm ................ Support X Session Management, links in -lSM -lICE.
+
+ $SHN -no-xshape ......... Do not compile XShape support.
+ $SHY -xshape ............ Compile XShape support.
+ Requires X11/extensions/shape.h.
+
+ $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support.
+ $XAY -xinerama .......... Compile Xinerama support.
+ Requires X11/extensions/Xinerama.h and libXinerama.
+ By default, Xinerama support will be compiled if
+ available and the shared libraries are dynamically
+ loaded at runtime.
+
+ $XCN -no-xcursor ........ Do not compile Xcursor support.
+ $XCY -xcursor ........... Compile Xcursor support.
+ Requires X11/Xcursor/Xcursor.h and libXcursor.
+ By default, Xcursor support will be compiled if
+ available and the shared libraries are dynamically
+ loaded at runtime.
+
+ $XFN -no-xfixes ......... Do not compile Xfixes support.
+ $XFY -xfixes ............ Compile Xfixes support.
+ Requires X11/extensions/Xfixes.h and libXfixes.
+ By default, Xfixes support will be compiled if
+ available and the shared libraries are dynamically
+ loaded at runtime.
+
+ $XZN -no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
+ $XZY -xrandr ............ Compile Xrandr support.
+ Requires X11/extensions/Xrandr.h and libXrandr.
+
+ $XRN -no-xrender ........ Do not compile Xrender support.
+ $XRY -xrender ........... Compile Xrender support.
+ Requires X11/extensions/Xrender.h and libXrender.
+
+ $XMN -no-mitshm ......... Do not compile MIT-SHM support.
+ $XMY -mitshm ............ Compile MIT-SHM support.
+ Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h
+
+ $FCGN -no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
+ $FCGY -fontconfig ........ Compile FontConfig support.
+ Requires fontconfig/fontconfig.h, libfontconfig,
+ freetype.h and libfreetype.
+
+ $XIN -no-xinput.......... Do not compile Xinput support.
+ $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
+ which requires IRIX with wacom.h and libXi or
+ XFree86 with X11/extensions/XInput.h and libXi.
+
+ $XKN -no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
+ $XKY -xkb ............... Compile XKB support.
+
+EOF
+fi
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ cat << EOF
+
+Qt/Mac only:
+
+ -Fstring ........... Add an explicit framework path.
+ -fw string ......... Add an explicit framework.
+
+ -cocoa ............. Build the Cocoa version of Qt. Note that -no-framework
+ and -static is not supported with -cocoa. Specifying
+ this option creates Qt binaries that requires Mac OS X
+ 10.5 or higher.
+
+ * -framework ......... Build Qt as a series of frameworks and
+ link tools against those frameworks.
+ -no-framework ...... Do not build Qt as a series of frameworks.
+
+ * -dwarf2 ............ Enable dwarf2 debugging symbols.
+ -no-dwarf2 ......... Disable dwarf2 debugging symbols.
+
+ -universal ......... Equivalent to -arch "ppc x86"
+
+ -arch <arch> ....... Build Qt for <arch>
+ Example values for <arch>: x86 ppc x86_64 ppc64
+ Multiple -arch arguments can be specified, 64-bit archs
+ will be built with the Cocoa framework.
+
+ -sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
+ To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
+
+EOF
+fi
+
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ cat << EOF
+
+Qt for Embedded Linux only:
+
+ -xplatform target ... The target platform when cross-compiling.
+
+ -no-feature-<feature> Do not compile in <feature>.
+ -feature-<feature> .. Compile in <feature>. The available features
+ are described in src/corelib/global/qfeatures.txt
+
+ -embedded <arch> .... This will enable the embedded build, you must have a
+ proper license for this switch to work.
+ Example values for <arch>: arm mips x86 generic
+
+ -armfpa ............. Target platform is uses the ARM-FPA floating point format.
+ -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
+
+ The floating point format is usually autodetected by configure. Use this
+ to override the detected value.
+
+ -little-endian ...... Target platform is little endian (LSB first).
+ -big-endian ......... Target platform is big endian (MSB first).
+
+ -host-little-endian . Host platform is little endian (LSB first).
+ -host-big-endian .... Host platform is big endian (MSB first).
+
+ You only need to specify the endianness when
+ cross-compiling, otherwise the host
+ endianness will be used.
+
+ -no-freetype ........ Do not compile in Freetype2 support.
+ -qt-freetype ........ Use the libfreetype bundled with Qt.
+ * -system-freetype .... Use libfreetype from the operating system.
+ See http://www.freetype.org/
+
+ -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
+ default ($CFG_QCONFIG).
+
+ -depths <list> ...... Comma-separated list of supported bit-per-pixel
+ depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
+
+ -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
+ by default all available decorations are on.
+ Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
+ -plugin-decoration-<style> Enable decoration <style> as a plugin to be
+ linked to at run time.
+ Possible values for <style>: [ $CFG_DECORATION_PLUGIN_AVAILABLE ]
+ -no-decoration-<style> ....Disable decoration <style> entirely.
+ Possible values for <style>: [ $CFG_DECORATION_AVAILABLE ]
+
+ -no-opengl .......... Do not support OpenGL.
+ -opengl <api> ....... Enable OpenGL ES support
+ With no parameter, this will attempt to auto-detect OpenGL ES 1.x
+ or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.
+
+ NOTE: A QGLScreen driver for the hardware is required to support
+ OpenGL ES on Qt for Embedded Linux.
+
+ -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.
+ Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
+ -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
+ linked to at run time.
+ Possible values for <driver>: [ $CFG_GFX_PLUGIN_AVAILABLE ]
+ -no-gfx-<driver> ... Disable graphics <driver> entirely.
+ Possible values for <driver>: [ $CFG_GFX_AVAILABLE ]
+
+ -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
+ Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
+
+ -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
+ at runtime.
+ Possible values for <driver>: [ $CFG_KBD_PLUGIN_AVAILABLE ]
+
+ -no-kbd-<driver> ... Disable keyboard <driver> entirely.
+ Possible values for <driver>: [ $CFG_KBD_AVAILABLE ]
+
+ -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
+ Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
+ -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
+ at runtime.
+ Possible values for <driver>: [ $CFG_MOUSE_PLUGIN_AVAILABLE ]
+ -no-mouse-<driver> ... Disable mouse <driver> entirely.
+ Possible values for <driver>: [ $CFG_MOUSE_AVAILABLE ]
+
+ -iwmmxt ............ Compile using the iWMMXt instruction set
+ (available on some XScale CPUs).
+
+EOF
+fi
+
+
+if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
+ if [ "$CFG_GLIB" = "no" ]; then
+ GBY=" "
+ GBN="+"
+ else
+ GBY="+"
+ GBN=" "
+ fi
+ cat << EOF
+ $GBN -no-glib ........... Do not compile Glib support.
+ $GBY -glib .............. Compile Glib support.
+
+EOF
+fi
+
+ [ "x$ERROR" = "xyes" ] && exit 1
+ exit 0
+fi # Help
+
+
+# -----------------------------------------------------------------------------
+# LICENSING, INTERACTIVE PART
+# -----------------------------------------------------------------------------
+
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ Platform="Qt for Embedded Linux"
+elif [ "$PLATFORM_MAC" = "yes" ]; then
+ Platform="Qt/Mac"
+else
+ PLATFORM_X11=yes
+ Platform="Qt/X11"
+fi
+
+echo
+echo "This is the $Platform ${EditionString} Edition."
+echo
+
+if [ "$Edition" = "NokiaInternalBuild" ]; then
+ echo "Detected -nokia-developer option"
+ echo "Nokia employees and agents are allowed to use this software under"
+ echo "the authority of Nokia Corporation and/or its subsidiary(-ies)"
+elif [ "$Edition" = "OpenSource" ]; then
+ while true; do
+ echo "You are licensed to use this software under the terms of"
+ echo "the GNU General Public License (GPL) versions 3."
+ echo "You are also licensed to use this software under the terms of"
+ echo "the Lesser GNU General Public License (LGPL) versions 2.1."
+ echo
+ affix="either"
+ if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
+ echo "You have already accepted the terms of the $LicenseType license."
+ acceptance=yes
+ else
+ echo "Type '3' to view the GNU General Public License version 3."
+ echo "Type 'L' to view the Lesser GNU General Public License version 2.1."
+ echo "Type 'yes' to accept this license offer."
+ echo "Type 'no' to decline this license offer."
+ echo
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n "Do you accept the terms of $affix license? "
+ else
+ echo "Do you accept the terms of $affix license? \c"
+ fi
+ read acceptance
+ fi
+ echo
+ if [ "$acceptance" = "yes" ]; then
+ break
+ elif [ "$acceptance" = "no" ]; then
+ echo "You are not licensed to use this software."
+ echo
+ exit 1
+ elif [ "$acceptance" = "3" ]; then
+ more "$relpath/LICENSE.GPL3"
+ elif [ "$acceptance" = "L" ]; then
+ more "$relpath/LICENSE.LGPL"
+ fi
+ done
+elif [ "$Edition" = "Preview" ]; then
+ TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
+ while true; do
+
+ if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
+ echo "You have already accepted the terms of the $LicenseType license."
+ acceptance=yes
+ else
+ echo "You are licensed to use this software under the terms of"
+ echo "the $TheLicense"
+ echo
+ echo "Type '?' to read the Preview License."
+ echo "Type 'yes' to accept this license offer."
+ echo "Type 'no' to decline this license offer."
+ echo
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n "Do you accept the terms of the license? "
+ else
+ echo "Do you accept the terms of the license? \c"
+ fi
+ read acceptance
+ fi
+ echo
+ if [ "$acceptance" = "yes" ]; then
+ break
+ elif [ "$acceptance" = "no" ] ;then
+ echo "You are not licensed to use this software."
+ echo
+ exit 0
+ elif [ "$acceptance" = "?" ]; then
+ more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
+ fi
+ done
+elif [ "$Edition" != "OpenSource" ]; then
+ if [ -n "$ExpiryDate" ]; then
+ ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"`
+ [ -z "$ExpiryDate" ] && ExpiryDate="0"
+ Today=`date +%Y%m%d`
+ if [ "$Today" -gt "$ExpiryDate" ]; then
+ case "$LicenseType" in
+ Commercial|Academic|Educational)
+ if [ "$QT_PACKAGEDATE" -gt "$ExpiryDate" ]; then
+ echo
+ echo "NOTICE NOTICE NOTICE NOTICE"
+ echo
+ echo " Your support and upgrade period has expired."
+ echo
+ echo " You are no longer licensed to use this version of Qt."
+ echo " Please contact sales@trolltech.com to renew your support"
+ echo " and upgrades for this license."
+ echo
+ echo "NOTICE NOTICE NOTICE NOTICE"
+ echo
+ exit 1
+ else
+ echo
+ echo "WARNING WARNING WARNING WARNING"
+ echo
+ echo " Your support and upgrade period has expired."
+ echo
+ echo " You may continue to use your last licensed release"
+ echo " of Qt under the terms of your existing license"
+ echo " agreement. But you are not entitled to technical"
+ echo " support, nor are you entitled to use any more recent"
+ echo " Qt releases."
+ echo
+ echo " Please contact sales@trolltech.com to renew your"
+ echo " support and upgrades for this license."
+ echo
+ echo "WARNING WARNING WARNING WARNING"
+ echo
+ sleep 3
+ fi
+ ;;
+ Evaluation|*)
+ echo
+ echo "NOTICE NOTICE NOTICE NOTICE"
+ echo
+ echo " Your Evaluation license has expired."
+ echo
+ echo " You are no longer licensed to use this software. Please"
+ echo " contact sales@trolltech.com to purchase license, or install"
+ echo " the Qt Open Source Edition if you intend to develop free"
+ echo " software."
+ echo
+ echo "NOTICE NOTICE NOTICE NOTICE"
+ echo
+ exit 1
+ ;;
+ esac
+ fi
+ fi
+ TheLicense=`head -n 1 "$outpath/LICENSE"`
+ while true; do
+ if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
+ echo "You have already accepted the terms of the $TheLicense."
+ acceptance=yes
+ else
+ echo "You are licensed to use this software under the terms of"
+ echo "the $TheLicense."
+ echo
+ echo "Type '?' to view the $TheLicense."
+ echo "Type 'yes' to accept this license offer."
+ echo "Type 'no' to decline this license offer."
+ echo
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n "Do you accept the terms of the $TheLicense? "
+ else
+ echo "Do you accept the terms of the $TheLicense? \c"
+ fi
+ read acceptance
+ fi
+ echo
+ if [ "$acceptance" = "yes" ]; then
+ break
+ elif [ "$acceptance" = "no" ]; then
+ echo "You are not licensed to use this software."
+ echo
+ exit 1
+ else [ "$acceptance" = "?" ]
+ more "$outpath/LICENSE"
+ fi
+ done
+fi
+
+# this should be moved somewhere else
+case "$PLATFORM" in
+aix-*)
+ AIX_VERSION=`uname -v`
+ if [ "$AIX_VERSION" -lt "5" ]; then
+ QMakeVar add QMAKE_LIBS_X11 -lbind
+ fi
+ ;;
+*)
+ ;;
+esac
+
+#-------------------------------------------------------------------------------
+# generate qconfig.cpp
+#-------------------------------------------------------------------------------
+[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
+
+LICENSE_USER_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsuser=$Licensee"`
+LICENSE_PRODUCTS_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_lcnsprod=$Edition"`
+PREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_INSTALL_PREFIX"`
+DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
+HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
+LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
+BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
+PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
+DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTALL_DATA"`
+TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"`
+SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
+EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
+DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
+
+cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+/* License Info */
+static const char qt_configure_licensee_str [256 + 12] = "$LICENSE_USER_STR";
+static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
+EOF
+
+if [ ! -z "$QT_HOST_PREFIX" ]; then
+ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
+ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
+ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
+ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
+ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
+ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
+ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
+ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
+ HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
+ HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
+ HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
+
+ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+
+#if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
+/* Installation Info */
+static const char qt_configure_prefix_path_str [256 + 12] = "$HOSTPREFIX_PATH_STR";
+static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
+static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
+static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
+static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
+static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
+static const char qt_configure_data_path_str [256 + 12] = "$HOSTDATA_PATH_STR";
+static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
+static const char qt_configure_settings_path_str [256 + 12] = "$HOSTSETTINGS_PATH_STR";
+static const char qt_configure_examples_path_str [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
+static const char qt_configure_demos_path_str [256 + 12] = "$HOSTDEMOS_PATH_STR";
+#else // QT_BOOTSTRAPPED
+EOF
+fi
+
+cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+/* Installation Info */
+static const char qt_configure_prefix_path_str [256 + 12] = "$PREFIX_PATH_STR";
+static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
+static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
+static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
+static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
+static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
+static const char qt_configure_data_path_str [256 + 12] = "$DATA_PATH_STR";
+static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
+static const char qt_configure_settings_path_str [256 + 12] = "$SETTINGS_PATH_STR";
+static const char qt_configure_examples_path_str [256 + 12] = "$EXAMPLES_PATH_STR";
+static const char qt_configure_demos_path_str [256 + 12] = "$DEMOS_PATH_STR";
+EOF
+
+if [ ! -z "$QT_HOST_PREFIX" ]; then
+ cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+#endif // QT_BOOTSTRAPPED
+
+EOF
+fi
+
+cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
+/* strlen( "qt_lcnsxxxx" ) == 12 */
+#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
+#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
+#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
+#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
+#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
+#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
+#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
+#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
+#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
+#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
+#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;
+#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
+#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
+EOF
+
+# avoid unecessary rebuilds by copying only if qconfig.cpp has changed
+if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
+ rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
+else
+ [ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
+ mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
+ chmod -w "$outpath/src/corelib/global/qconfig.cpp"
+fi
+
+# -----------------------------------------------------------------------------
+# build qmake
+# -----------------------------------------------------------------------------
+
+# symlink includes
+if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
+ SYNCQT_OPTS=
+ [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes"
+ if [ "$OPT_SHADOW" = "yes" ]; then
+ "$outpath/bin/syncqt" $SYNCQT_OPTS
+ elif [ "$CFG_DEV" = "yes" ]; then
+ QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS
+ fi
+fi
+
+# $1: variable name
+# $2: optional transformation
+# relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
+# is where the resulting variable is written to
+setBootstrapVariable()
+{
+ variableRegExp="^$1[^_A-Z0-9]"
+ getQMakeConf | grep "$variableRegExp" | ( [ -n "$2" ] && sed "$2" ; [ -z "$2" ] && cat ) | $AWK '
+{
+ varLength = index($0, "=") - 1
+ valStart = varLength + 2
+ if (substr($0, varLength, 1) == "+") {
+ varLength = varLength - 1
+ valStart = valStart + 1
+ }
+ var = substr($0, 0, varLength)
+ gsub("[ \t]+", "", var)
+ val = substr($0, valStart)
+ printf "%s_%s = %s\n", var, NR, val
+}
+END {
+ if (length(var) > 0) {
+ printf "%s =", var
+ for (i = 1; i <= NR; ++i)
+ printf " $(%s_%s)", var, i
+ printf "\n"
+ }
+}' >> "$mkfile"
+}
+
+# build qmake
+if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+ echo "Creating qmake. Please wait..."
+
+ OLD_QCONFIG_H=
+ QCONFIG_H="$outpath/src/corelib/global/qconfig.h"
+ QMAKE_QCONFIG_H="${QCONFIG_H}.qmake"
+ if [ -f "$QCONFIG_H" ]; then
+ OLD_QCONFIG_H=$QCONFIG_H
+ mv -f "$OLD_QCONFIG_H" "${OLD_QCONFIG_H}.old"
+ fi
+
+ # create temporary qconfig.h for compiling qmake, if it doesn't exist
+ # when building qmake, we use #defines for the install paths,
+ # however they are real functions in the library
+ if [ '!' -f "$QMAKE_QCONFIG_H" ]; then
+ mkdir -p "$outpath/src/corelib/global"
+ [ -f "$QCONFIG_H" ] && chmod +w "$QCONFIG_H"
+ echo "/* All features enabled while building qmake */" >"$QMAKE_QCONFIG_H"
+ fi
+
+ mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
+ for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
+ if [ '!' -f "$conf" ]; then
+ ln -s "$QCONFIG_H" "$conf"
+ fi
+ done
+
+ #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
+ rm -f mkspecs/default
+ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+ # fix makefiles
+ for mkfile in GNUmakefile Makefile; do
+ EXTRA_LFLAGS=
+ EXTRA_CFLAGS=
+ in_mkfile="${mkfile}.in"
+ if [ "$mkfile" = "Makefile" ]; then
+# if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
+# (cd qmake && qmake) >/dev/null 2>&1 && continue
+# fi
+ in_mkfile="${mkfile}.unix"
+ fi
+ in_mkfile="$relpath/qmake/$in_mkfile"
+ mkfile="$outpath/qmake/$mkfile"
+ if [ -f "$mkfile" ]; then
+ [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
+ rm -f "$mkfile"
+ fi
+ [ -f "$in_mkfile" ] || continue
+
+ echo "########################################################################" >$mkfile
+ echo "## This file was autogenerated by configure, all changes will be lost ##" >>$mkfile
+ echo "########################################################################" >>$mkfile
+ EXTRA_OBJS=
+ EXTRA_SRCS=
+ EXTRA_CFLAGS="\$(QMAKE_CFLAGS)"
+ EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)"
+ EXTRA_LFLAGS="\$(QMAKE_LFLAGS)"
+
+ if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
+ EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
+ fi
+
+ [ -n "$CC" ] && echo "CC = $CC" >>$mkfile
+ [ -n "$CXX" ] && echo "CXX = $CXX" >>$mkfile
+ if [ "$CFG_SILENT" = "yes" ]; then
+ [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
+ [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
+ else
+ [ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
+ [ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
+ fi
+ setBootstrapVariable QMAKE_CFLAGS
+ setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
+ setBootstrapVariable QMAKE_LFLAGS
+
+ if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
+ fi
+ if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
+ setBootstrapVariable QMAKE_CFLAGS_RELEASE
+ setBootstrapVariable QMAKE_CXXFLAGS_RELEASE 's,\$\$QMAKE_CFLAGS_RELEASE,\$(QMAKE_CFLAGS_RELEASE),'
+ EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
+ elif [ "$CFG_DEBUG" = "yes" ]; then
+ setBootstrapVariable QMAKE_CFLAGS_DEBUG
+ setBootstrapVariable QMAKE_CXXFLAGS_DEBUG 's,\$\$QMAKE_CFLAGS_DEBUG,\$(QMAKE_CFLAGS_DEBUG),'
+ EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
+ fi
+
+ if [ '!' -z "$RPATH_FLAGS" ] && [ '!' -z "`getQMakeConf \"$QMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
+ setBootstrapVariable QMAKE_RPATH 's,\$\$LITERAL_WHITESPACE, ,'
+ for rpath in $RPATH_FLAGS; do
+ EXTRA_LFLAGS="\$(QMAKE_RPATH)\"$rpath\" $EXTRA_LFLAGS"
+ done
+ fi
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$PLATFORM" = "macx-icc" ]; then
+ echo "export MACOSX_DEPLOYMENT_TARGET = 10.4" >>"$mkfile"
+ else
+ echo "export MACOSX_DEPLOYMENT_TARGET = 10.3" >>"$mkfile"
+ fi
+ echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
+ echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
+ EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
+ EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
+ EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
+ if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then
+ X86_CFLAGS="-arch i386"
+ X86_LFLAGS="-arch i386"
+ EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
+ EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
+ EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then
+ PPC_CFLAGS="-arch ppc"
+ PPC_LFLAGS="-arch ppc"
+ EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
+ EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
+ EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
+ fi
+ if [ '!' -z "$CFG_SDK" ]; then
+ echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
+ echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
+ EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
+ fi
+ fi
+ [ "$CFG_EMBEDDED" != "no" ] && EXTRA_CFLAGS="$EXTRA_CFLAGS -DQWS"
+ if [ '!' -z "$D_FLAGS" ]; then
+ for DEF in $D_FLAGS; do
+ EXTRA_CFLAGS="$EXTRA_CFLAGS \"-D${DEF}\""
+ done
+ fi
+ QMAKE_BIN_DIR="$QT_INSTALL_BINS"
+ [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
+ QMAKE_DATA_DIR="$QT_INSTALL_DATA"
+ [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
+ echo >>"$mkfile"
+ adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
+ adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
+ sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
+ -e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
+ -e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
+ -e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
+ -e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
+ -e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
+ -e "s,@QMAKESPEC@,$QMAKESPEC,g" "$in_mkfile" >>"$mkfile"
+
+ if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
+ (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
+ sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"${mkfile}.tmp"
+ mv "${mkfile}.tmp" "${mkfile}"
+ fi
+ done
+
+ QMAKE_BUILD_ERROR=no
+ (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
+ [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
+ [ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
+ [ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
+fi # Build qmake
+
+#-------------------------------------------------------------------------------
+# tests that need qmake
+#-------------------------------------------------------------------------------
+
+# detect availability of float math.h functions
+if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_USE_FLOATMATH=yes
+else
+ CFG_USE_FLOATMATH=no
+fi
+
+# detect mmx support
+if [ "${CFG_MMX}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then
+ CFG_MMX=yes
+ else
+ CFG_MMX=no
+ fi
+fi
+
+# detect 3dnow support
+if [ "${CFG_3DNOW}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then
+ CFG_3DNOW=yes
+ else
+ CFG_3DNOW=no
+ fi
+fi
+
+# detect sse support
+if [ "${CFG_SSE}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then
+ CFG_SSE=yes
+ else
+ CFG_SSE=no
+ fi
+fi
+
+# detect sse2 support
+if [ "${CFG_SSE2}" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then
+ CFG_SSE2=yes
+ else
+ CFG_SSE2=no
+ fi
+fi
+
+# check iWMMXt support
+if [ "$CFG_IWMMXT" = "yes" ]; then
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt"; then
+ echo "The iWMMXt functionality test failed!"
+ echo " Please make sure your compiler supports iWMMXt intrinsics!"
+ exit 1
+ fi
+fi
+
+# detect zlib
+if [ "$CFG_ZLIB" = "no" ]; then
+ # Note: Qt no longer support builds without zlib
+ # So we force a "no" to be "auto" here.
+ # If you REALLY really need no zlib support, you can still disable
+ # it by doing the following:
+ # add "no-zlib" to mkspecs/qconfig.pri
+ # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
+ #
+ # There's no guarantee that Qt will build under those conditions
+
+ CFG_ZLIB=auto
+ ZLIB_FORCED=yes
+fi
+if [ "$CFG_ZLIB" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_ZLIB=system
+ else
+ CFG_ZLIB=yes
+ fi
+fi
+
+# detect how jpeg should be built
+if [ "$CFG_JPEG" = "auto" ]; then
+ if [ "$CFG_SHARED" = "yes" ]; then
+ CFG_JPEG=plugin
+ else
+ CFG_JPEG=yes
+ fi
+fi
+# detect jpeg
+if [ "$CFG_LIBJPEG" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_LIBJPEG=system
+ else
+ CFG_LIBJPEG=qt
+ fi
+fi
+
+# detect how gif should be built
+if [ "$CFG_GIF" = "auto" ]; then
+ if [ "$CFG_SHARED" = "yes" ]; then
+ CFG_GIF=plugin
+ else
+ CFG_GIF=yes
+ fi
+fi
+
+# detect how tiff should be built
+if [ "$CFG_TIFF" = "auto" ]; then
+ if [ "$CFG_SHARED" = "yes" ]; then
+ CFG_TIFF=plugin
+ else
+ CFG_TIFF=yes
+ fi
+fi
+
+# detect tiff
+if [ "$CFG_LIBTIFF" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libtiff "libtiff" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_LIBTIFF=system
+ else
+ CFG_LIBTIFF=qt
+ fi
+fi
+
+# detect how mng should be built
+if [ "$CFG_MNG" = "auto" ]; then
+ if [ "$CFG_SHARED" = "yes" ]; then
+ CFG_MNG=plugin
+ else
+ CFG_MNG=yes
+ fi
+fi
+# detect mng
+if [ "$CFG_LIBMNG" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libmng "libmng" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_LIBMNG=system
+ else
+ CFG_LIBMNG=qt
+ fi
+fi
+
+# detect png
+if [ "$CFG_LIBPNG" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_LIBPNG=system
+ else
+ CFG_LIBPNG=qt
+ fi
+fi
+
+# detect accessibility
+if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
+ CFG_ACCESSIBILITY=yes
+fi
+
+# auto-detect SQL-modules support
+for _SQLDR in $CFG_SQL_AVAILABLE; do
+ case $_SQLDR in
+ mysql)
+ if [ "$CFG_SQL_mysql" != "no" ]; then
+ [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`$WHICH mysql_config`
+ if [ -x "$CFG_MYSQL_CONFIG" ]; then
+ QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null`
+ QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null`
+ QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null`
+ QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
+ QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
+ fi
+ if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
+ if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
+ echo " You need MySql 4 or higher."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_mysql="no"
+ QT_LFLAGS_MYSQL=""
+ QT_LFLAGS_MYSQL_R=""
+ QT_CFLAGS_MYSQL=""
+ fi
+ else
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS; then
+ QMakeVar add CONFIG use_libmysqlclient_r
+ if [ "$CFG_SQL_mysql" = "auto" ]; then
+ CFG_SQL_mysql=plugin
+ fi
+ QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_mysql" = "auto" ]; then
+ CFG_SQL_mysql=plugin
+ fi
+ else
+ if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "MySQL support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_mysql=no
+ QT_LFLAGS_MYSQL=""
+ QT_LFLAGS_MYSQL_R=""
+ QT_CFLAGS_MYSQL=""
+ fi
+ fi
+ fi
+ fi
+ ;;
+ psql)
+ if [ "$CFG_SQL_psql" != "no" ]; then
+ if "$WHICH" pg_config >/dev/null 2>&1; then
+ QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
+ QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
+ fi
+ [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
+ [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_psql" = "auto" ]; then
+ CFG_SQL_psql=plugin
+ fi
+ else
+ if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "PostgreSQL support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_psql=no
+ QT_CFLAGS_PSQL=""
+ QT_LFLAGS_PSQL=""
+ fi
+ fi
+ fi
+ ;;
+ odbc)
+ if [ "$CFG_SQL_odbc" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_odbc" = "auto" ]; then
+ CFG_SQL_odbc=plugin
+ fi
+ else
+ if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "ODBC support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_odbc=no
+ fi
+ fi
+ fi
+ ;;
+ oci)
+ if [ "$CFG_SQL_oci" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_oci" = "auto" ]; then
+ CFG_SQL_oci=plugin
+ fi
+ else
+ if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_oci=no
+ fi
+ fi
+ fi
+ ;;
+ tds)
+ if [ "$CFG_SQL_tds" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_tds" = "auto" ]; then
+ CFG_SQL_tds=plugin
+ fi
+ else
+ if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "TDS support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_tds=no
+ fi
+ fi
+ fi
+ ;;
+ db2)
+ if [ "$CFG_SQL_db2" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_db2" = "auto" ]; then
+ CFG_SQL_db2=plugin
+ fi
+ else
+ if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "ODBC support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_db2=no
+ fi
+ fi
+ fi
+ ;;
+ ibase)
+ if [ "$CFG_SQL_ibase" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_ibase" = "auto" ]; then
+ CFG_SQL_ibase=plugin
+ fi
+ else
+ if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "InterBase support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_ibase=no
+ fi
+ fi
+ fi
+ ;;
+ sqlite2)
+ if [ "$CFG_SQL_sqlite2" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_sqlite2" = "auto" ]; then
+ CFG_SQL_sqlite2=plugin
+ fi
+ else
+ if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "SQLite2 support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SQL_sqlite2=no
+ fi
+ fi
+ fi
+ ;;
+ sqlite)
+ if [ "$CFG_SQL_sqlite" != "no" ]; then
+ SQLITE_AUTODETECT_FAILED="no"
+ if [ "$CFG_SQLITE" = "system" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
+ QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_SQL_sqlite" = "auto" ]; then
+ CFG_SQL_sqlite=plugin
+ fi
+ QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
+ else
+ SQLITE_AUTODETECT_FAILED="yes"
+ CFG_SQL_sqlite=no
+ fi
+ elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
+ if [ "$CFG_SQL_sqlite" = "auto" ]; then
+ CFG_SQL_sqlite=plugin
+ fi
+ else
+ SQLITE_AUTODETECT_FAILED="yes"
+ CFG_SQL_sqlite=no
+ fi
+
+ if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "SQLite support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ fi
+ fi
+ ;;
+ *)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo "unknown SQL driver: $_SQLDR"
+ fi
+ ;;
+ esac
+done
+
+# auto-detect NIS support
+if [ "$CFG_NIS" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_NIS=yes
+ else
+ if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "NIS support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_NIS=no
+ fi
+ fi
+fi
+
+# auto-detect CUPS support
+if [ "$CFG_CUPS" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_CUPS=yes
+ else
+ if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Cups support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_CUPS=no
+ fi
+ fi
+fi
+
+# auto-detect iconv(3) support
+if [ "$CFG_ICONV" != "no" ]; then
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ CFG_ICONV=no
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_ICONV=yes
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_ICONV=gnu
+ else
+ if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Iconv support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_ICONV=no
+ fi
+ fi
+fi
+
+# auto-detect libdbus-1 support
+if [ "$CFG_DBUS" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
+ QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
+ QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS; then
+ [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
+ QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
+ QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
+ else
+ if [ "$CFG_DBUS" = "auto" ]; then
+ CFG_DBUS=no
+ elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ # CFG_DBUS is "yes" or "linked" here
+
+ echo "The QtDBus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ fi
+ fi
+fi
+
+# Generate a CRC of the namespace for using in constants for the Carbon port.
+# This should mean that you really *can* load two Qt's and have our custom
+# Carbon events work.
+if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then
+ QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS`
+fi
+
+if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
+ # auto-detect Glib support
+ if [ "$CFG_GLIB" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
+ QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB $X11TESTS_FLAGS; then
+ CFG_GLIB=yes
+ QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
+ QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
+ else
+ if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Glib support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_GLIB=no
+ fi
+ fi
+ fi
+
+ if [ "$CFG_PHONON" != "no" ]; then
+ if [ "$CFG_PHONON_BACKEND" != "no" ]; then
+ if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
+ QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then
+ CFG_GSTREAMER=yes
+ QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER"
+ QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER"
+ else
+ if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Gstreamer support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_GSTREAMER=no
+ fi
+ fi
+ elif [ "$CFG_GLIB" = "no" ]; then
+ CFG_GSTREAMER=no
+ fi
+
+ if [ "$CFG_GSTREAMER" = "yes" ]; then
+ CFG_PHONON=yes
+ else
+ if [ "$CFG_PHONON" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Phonon support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_PHONON=no
+ fi
+ fi
+ else
+ CFG_PHONON=yes
+ fi
+ fi
+fi # X11/QWS
+
+# x11
+if [ "$PLATFORM_X11" = "yes" ]; then
+ x11tests="$relpath/config.tests/x11"
+ X11TESTS_FLAGS=
+
+ # work around broken X11 headers when using GCC 2.95 or later
+ NOTYPE=no
+ "$x11tests/notype.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" && NOTYPE=yes
+ if [ $NOTYPE = "yes" ]; then
+ QMakeVar add QMAKE_CXXFLAGS -fpermissive
+ X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
+ fi
+
+ # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
+ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_OPENGL=desktop
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es2
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es1
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es1cl
+ else
+ if [ "$CFG_OPENGL" = "yes" ]; then
+ echo "All the OpenGL functionality tests failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ CFG_OPENGL=no
+ fi
+ case "$PLATFORM" in
+ hpux*)
+ # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
+ if [ "$CFG_OPENGL" = "desktop" ]; then
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
+ fi
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ elif [ "$CFG_OPENGL" = "es1cl" ]; then
+ # OpenGL ES 1.x common lite
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The OpenGL ES 1.x Common Lite Profile functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "es1" ]; then
+ # OpenGL ES 1.x
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The OpenGL ES 1.x functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "es2" ]; then
+ #OpenGL ES 2.x
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The OpenGL ES 2.0 functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "desktop" ]; then
+ # Desktop OpenGL support
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ case "$PLATFORM" in
+ hpux*)
+ # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ fi
+
+ # if opengl is disabled and the user specified graphicssystem gl, disable it...
+ if [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && [ "$CFG_OPENGL" = "no" ]; then
+ echo "OpenGL Graphics System is disabled due to missing OpenGL support..."
+ CFG_GRAPHICS_SYSTEM=default
+ fi
+
+ # auto-detect Xcursor support
+ if [ "$CFG_XCURSOR" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ if [ "$CFG_XCURSOR" != "runtime" ]; then
+ CFG_XCURSOR=yes;
+ fi
+ else
+ if [ "$CFG_XCURSOR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xcursor support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XCURSOR=no
+ fi
+ fi
+ fi
+
+ # auto-detect Xfixes support
+ if [ "$CFG_XFIXES" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then
+ if [ "$CFG_XFIXES" != "runtime" ]; then
+ CFG_XFIXES=yes;
+ fi
+ else
+ if [ "$CFG_XFIXES" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xfixes support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XFIXES=no
+ fi
+ fi
+ fi
+
+ # auto-detect Xrandr support (resize and rotate extension)
+ if [ "$CFG_XRANDR" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ if [ "$CFG_XRANDR" != "runtime" ]; then
+ CFG_XRANDR=yes
+ fi
+ else
+ if [ "$CFG_XRANDR" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xrandr support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XRANDR=no
+ fi
+ fi
+ fi
+
+ # auto-detect Xrender support
+ if [ "$CFG_XRENDER" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XRENDER=yes
+ else
+ if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xrender support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XRENDER=no
+ fi
+ fi
+ fi
+
+ # auto-detect MIT-SHM support
+ if [ "$CFG_MITSHM" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_MITSHM=yes
+ else
+ if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "MITSHM support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_MITSHM=no
+ fi
+ fi
+ fi
+
+ # auto-detect FontConfig support
+ if [ "$CFG_FONTCONFIG" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig 2>/dev/null; then
+ QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig 2>/dev/null`
+ QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig 2>/dev/null`
+ else
+ QT_CFLAGS_FONTCONFIG=
+ QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
+ CFG_FONTCONFIG=yes
+ QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11"
+ QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11"
+ CFG_LIBFREETYPE=system
+ else
+ if [ "$CFG_FONTCONFIG" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "FontConfig support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_FONTCONFIG=no
+ fi
+ fi
+ fi
+
+ # auto-detect Session Management support
+ if [ "$CFG_SM" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_SM=yes
+ else
+ if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Session Management support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_SM=no
+ fi
+ fi
+ fi
+
+ # auto-detect SHAPE support
+ if [ "$CFG_XSHAPE" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XSHAPE=yes
+ else
+ if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "XShape support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XSHAPE=no
+ fi
+ fi
+ fi
+
+ # auto-detect Xinerama support
+ if [ "$CFG_XINERAMA" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ if [ "$CFG_XINERAMA" != "runtime" ]; then
+ CFG_XINERAMA=yes
+ fi
+ else
+ if [ "$CFG_XINERAMA" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Xinerama support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XINERAMA=no
+ fi
+ fi
+ fi
+
+ # auto-detect Xinput support
+ if [ "$CFG_XINPUT" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ if [ "$CFG_XINPUT" != "runtime" ]; then
+ CFG_XINPUT=yes
+ fi
+ else
+ if [ "$CFG_XINPUT" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Tablet and Xinput support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XINPUT=no
+ fi
+ fi
+ fi
+
+ # auto-detect XKB support
+ if [ "$CFG_XKB" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ CFG_XKB=yes
+ else
+ if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "XKB support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_XKB=no
+ fi
+ fi
+ fi
+
+ if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
+ QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
+ fi
+ if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
+ CFG_QGTKSTYLE=yes
+ QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
+ QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
+ else
+ if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "Gtk theme support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_QGTKSTYLE=no
+ fi
+ fi
+ elif [ "$CFG_GLIB" = "no" ]; then
+ CFG_QGTKSTYLE=no
+ fi
+fi # X11
+
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_PHONON" != "no" ]; then
+ # Always enable Phonon (unless it was explicitly disabled)
+ CFG_PHONON=yes
+ fi
+fi
+
+# QWS
+if [ "$PLATFORM_QWS" = "yes" ]; then
+
+ # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
+ if [ "$CFG_OPENGL" = "yes" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es2
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es1
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1cl "OpenGL ES 1.x Lite" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_OPENGL=es1cl
+ else
+ echo "All the OpenGL ES functionality tests failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "es1" ]; then
+ # OpenGL ES 1.x
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The OpenGL ES 1.x functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "es2" ]; then
+ #OpenGL ES 2.x
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The OpenGL ES 2.0 functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "desktop" ]; then
+ # Desktop OpenGL support
+ echo "Desktop OpenGL support is not avaliable on Qt for Embedded Linux"
+ exit 1
+ fi
+
+ # screen drivers
+ for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do
+ if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The Ahi screen driver functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ fi
+
+ if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The SVGAlib screen driver functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ fi
+
+ if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if [ -n "$PKG_CONFIG" ]; then
+ if $PKG_CONFIG --exists directfb 2>/dev/null; then
+ QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
+ QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
+ elif directfb-config --version >/dev/null 2>&1; then
+ QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
+ QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null`
+ fi
+ fi
+
+ # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
+ if [ -n "$QT_CFLAGS_DIRECTFB" ] || [ -n "$QT_LIBS_DIRECTFB" ]; then
+ QMakeVar set QT_CFLAGS_DIRECTFB "$QT_CFLAGS_DIRECTFB"
+ QMakeVar set QT_LIBS_DIRECTFB "$QT_LIBS_DIRECTFB"
+ fi
+
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/directfb "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB; then
+ echo "The DirectFB screen driver functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ fi
+
+ done
+
+ # mouse drivers
+ for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
+ if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ echo "The tslib functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ fi
+ done
+
+ CFG_QGTKSTYLE=no
+
+ # sound
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND"
+ fi
+
+fi # QWS
+
+# freetype support
+[ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
+[ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
+if [ "$CFG_LIBFREETYPE" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS ; then
+ CFG_LIBFREETYPE=system
+ else
+ CFG_LIBFREETYPE=yes
+ fi
+fi
+
+if [ "$CFG_ENDIAN" = "auto" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ true #leave as auto
+ else
+ "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
+ F="$?"
+ if [ "$F" -eq 0 ]; then
+ CFG_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$F" -eq 1 ]; then
+ CFG_ENDIAN="Q_BIG_ENDIAN"
+ else
+ echo
+ echo "The target system byte order could not be detected!"
+ echo "Turn on verbose messaging (-v) to see the final report."
+ echo "You can use the -little-endian or -big-endian switch to"
+ echo "$0 to continue."
+ exit 101
+ fi
+ fi
+fi
+
+if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
+ if [ "$PLATFORM_MAC" = "yes" ]; then
+ true #leave as auto
+ else
+ "$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
+ F="$?"
+ if [ "$F" -eq 0 ]; then
+ CFG_HOST_ENDIAN="Q_LITTLE_ENDIAN"
+ elif [ "$F" -eq 1 ]; then
+ CFG_HOST_ENDIAN="Q_BIG_ENDIAN"
+ else
+ echo
+ echo "The host system byte order could not be detected!"
+ echo "Turn on verbose messaging (-v) to see the final report."
+ echo "You can use the -host-little-endian or -host-big-endian switch to"
+ echo "$0 to continue."
+ exit 101
+ fi
+ fi
+fi
+
+if [ "$CFG_ARMFPA" != "auto" ]; then
+ if [ "$CFG_ARMFPA" = "yes" ]; then
+ if [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
+ CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
+ else
+ CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
+ fi
+ else
+ CFG_DOUBLEFORMAT="normal"
+ fi
+fi
+
+
+if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
+ if [ "$PLATFORM_QWS" != "yes" ]; then
+ CFG_DOUBLEFORMAT=normal
+ else
+ "$unixtests/doubleformat.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
+ F="$?"
+ if [ "$F" -eq 10 ] && [ "$CFG_ENDIAN" = "Q_LITTLE_ENDIAN" ]; then
+ CFG_DOUBLEFORMAT=normal
+ elif [ "$F" -eq 11 ] && [ "$CFG_ENDIAN" = "Q_BIG_ENDIAN" ]; then
+ CFG_DOUBLEFORMAT=normal
+ elif [ "$F" -eq 10 ]; then
+ CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE"
+ elif [ "$F" -eq 11 ]; then
+ CFG_DOUBLEFORMAT="Q_DOUBLE_BIG"
+ elif [ "$F" -eq 12 ]; then
+ CFG_DOUBLEFORMAT="Q_DOUBLE_LITTLE_SWAPPED"
+ CFG_ARMFPA="yes"
+ elif [ "$F" -eq 13 ]; then
+ CFG_DOUBLEFORMAT="Q_DOUBLE_BIG_SWAPPED"
+ CFG_ARMFPA="yes"
+ else
+ echo
+ echo "The system floating point format could not be detected."
+ echo "This may cause data to be generated in a wrong format"
+ echo "Turn on verbose messaging (-v) to see the final report."
+ # we do not fail on this since this is a new test, and if it fails,
+ # the old behavior should be correct in most cases
+ CFG_DOUBLEFORMAT=normal
+ fi
+ fi
+fi
+
+HAVE_STL=no
+if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ HAVE_STL=yes
+fi
+
+if [ "$CFG_STL" != "no" ]; then
+ if [ "$HAVE_STL" = "yes" ]; then
+ CFG_STL=yes
+ else
+ if [ "$CFG_STL" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "STL support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_STL=no
+ fi
+ fi
+fi
+
+# find if the platform supports IPv6
+if [ "$CFG_IPV6" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_IPV6=yes
+ else
+ if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "IPv6 support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_IPV6=no
+ fi
+ fi
+fi
+
+# detect POSIX clock_gettime()
+if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_CLOCK_GETTIME=yes
+ else
+ CFG_CLOCK_GETTIME=no
+ fi
+fi
+
+# detect POSIX monotonic clocks
+if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_CLOCK_MONOTONIC=yes
+ else
+ CFG_CLOCK_MONOTONIC=no
+ fi
+elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
+ CFG_CLOCK_MONOTONIC=no
+fi
+
+# detect mremap
+if [ "$CFG_MREMAP" = "auto" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_MREMAP=yes
+ else
+ CFG_MREMAP=no
+ fi
+fi
+
+# find if the platform provides getaddrinfo (ipv6 dns lookups)
+if [ "$CFG_GETADDRINFO" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_GETADDRINFO=yes
+ else
+ if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "getaddrinfo support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_GETADDRINFO=no
+ fi
+ fi
+fi
+
+# find if the platform provides inotify
+if [ "$CFG_INOTIFY" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_INOTIFY=yes
+ else
+ if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "inotify support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_INOTIFY=no
+ fi
+ fi
+fi
+
+# find if the platform provides if_nametoindex (ipv6 interface name support)
+if [ "$CFG_IPV6IFNAME" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_IPV6IFNAME=yes
+ else
+ if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "IPv6 interface name support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_IPV6IFNAME=no
+ fi
+ fi
+fi
+
+# find if the platform provides getifaddrs (network interface enumeration)
+if [ "$CFG_GETIFADDRS" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_GETIFADDRS=yes
+ else
+ if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "getifaddrs support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_GETIFADDRS=no
+ fi
+ fi
+fi
+
+# find if the platform supports X/Open Large File compilation environment
+if [ "$CFG_LARGEFILE" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/largefile "X/Open Large File" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_LARGEFILE=yes
+ else
+ if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "X/Open Large File support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_LARGEFILE=no
+ fi
+ fi
+fi
+
+# detect OpenSSL
+if [ "$CFG_OPENSSL" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if [ "$CFG_OPENSSL" = "auto" ]; then
+ CFG_OPENSSL=yes
+ fi
+ else
+ if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
+ echo "OpenSSL support cannot be enabled due to functionality tests!"
+ echo " Turn on verbose messaging (-v) to $0 to see the final report."
+ echo " If you believe this message is in error you may use the continue"
+ echo " switch (-continue) to $0 to continue."
+ exit 101
+ else
+ CFG_OPENSSL=no
+ fi
+ fi
+fi
+
+if [ "$CFG_PTMALLOC" != "no" ]; then
+ # build ptmalloc, copy .a file to lib/
+ echo "Building ptmalloc. Please wait..."
+ (cd "$relpath/src/3rdparty/ptmalloc/"; "$MAKE" "clean" ; "$MAKE" "posix"
+ mkdir "$outpath/lib/" ; cp "libptmalloc3.a" "$outpath/lib/")
+
+ QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a"
+fi
+
+#-------------------------------------------------------------------------------
+# ask for all that hasn't been auto-detected or specified in the arguments
+#-------------------------------------------------------------------------------
+
+### fix this: user input should be validated in a loop
+if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PLATFORM_QWS" = "yes" ]; then
+ echo
+ echo "Choose pixel-depths to support:"
+ echo
+ echo " 1. 1bpp, black/white"
+ echo " 4. 4bpp, grayscale"
+ echo " 8. 8bpp, paletted"
+ echo " 12. 12bpp, rgb 4-4-4"
+ echo " 15. 15bpp, rgb 5-5-5"
+ echo " 16. 16bpp, rgb 5-6-5"
+ echo " 18. 18bpp, rgb 6-6-6"
+ echo " 24. 24bpp, rgb 8-8-8"
+ echo " 32. 32bpp, argb 8-8-8-8 and rgb 8-8-8"
+ echo " all. All supported depths"
+ echo
+ echo "Your choices (default 8,16,32):"
+ read CFG_QWS_DEPTHS
+ if [ -z "$CFG_QWS_DEPTHS" ] || [ "$CFG_QWS_DEPTHS" = "yes" ]; then
+ CFG_QWS_DEPTHS=8,16,32
+ fi
+fi
+if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
+ if [ "$CFG_QWS_DEPTHS" = "all" ]; then
+ CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
+ fi
+ for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
+ case $D in
+ 1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
+ generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
+ esac
+ done
+fi
+
+# enable dwarf2 support on Mac
+if [ "$CFG_MAC_DWARF2" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG dwarf2"
+fi
+
+# Set the default arch. Select 32-bit/carbon if nothing else has
+# been specified on the configure line.
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then
+ source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
+
+ if [ "$QT_MAC_DEFUALT_ARCH" == "x86_64" ]; then
+ CFG_MAC_ARCHS=" x86"
+ elif [ "$QT_MAC_DEFUALT_ARCH" == "ppc64" ]; then
+ CFG_MAC_ARCHS=" ppc"
+ else
+ CFG_MAC_ARCHS=" $QT_MAC_DEFUALT_ARCH"
+ fi
+
+ [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
+fi
+
+# enable cocoa and/or carbon on Mac
+if [ "$CFG_MAC_COCOA" = "yes" ]; then
+# -cocoa on the command line disables carbon completely (i.e. use cocoa for 32-bit as well)
+ CFG_MAC_CARBON="no"
+else
+# check which archs are in use, enable cocoa if we find a 64-bit one
+ if echo "$CFG_MAC_ARCHS" | grep 64 > /dev/null 2>&1; then
+ CFG_MAC_COCOA="yes";
+ CFG_MAC_CARBON="no";
+ if echo "$CFG_MAC_ARCHS" | grep -w ppc > /dev/null 2>&1; then
+ CFG_MAC_CARBON="yes";
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep -w x86 > /dev/null 2>&1; then
+ CFG_MAC_CARBON="yes";
+ fi
+ else
+# no 64-bit archs found.
+ CFG_MAC_COCOA="no"
+ fi
+fi;
+
+# set the global Mac deployment target. This is overridden on an arch-by-arch basis
+# in some cases, see code further down
+case "$PLATFORM,$CFG_MAC_COCOA" in
+ macx*,yes)
+ # Cocoa
+ QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
+ CFG_QT3SUPPORT="no"
+ ;;
+ macx-icc,*)
+ # Intel CC, Carbon
+ QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
+ ;;
+ macx*,no)
+ # gcc, Carbon
+ QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.3
+ ;;
+esac
+
+# enable Qt 3 support functionality
+if [ "$CFG_QT3SUPPORT" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG qt3support"
+fi
+
+# enable Phonon
+if [ "$CFG_PHONON" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG phonon"
+ if [ "$CFG_PHONON_BACKEND" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG phonon-backend"
+ fi
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PHONON"
+fi
+
+# disable accessibility
+if [ "$CFG_ACCESSIBILITY" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
+else
+ QT_CONFIG="$QT_CONFIG accessibility"
+fi
+
+# enable opengl
+if [ "$CFG_OPENGL" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
+else
+ QT_CONFIG="$QT_CONFIG opengl"
+fi
+
+if [ "$CFG_OPENGL" = "es1" ] || [ "$CFG_OPENGL" = "es1cl" ] || [ "$CFG_OPENGL" = "es2" ]; then
+ if [ "$PLATFORM_QWS" = "yes" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS Q_BACKINGSTORE_SUBSURFACES"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS Q_USE_EGLWINDOWSURFACE"
+ fi
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
+fi
+
+if [ "$CFG_OPENGL" = "es1" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1"
+ QT_CONFIG="$QT_CONFIG opengles1"
+fi
+
+if [ "$CFG_OPENGL" = "es1cl" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_1_CL"
+ QT_CONFIG="$QT_CONFIG opengles1cl"
+fi
+
+if [ "$CFG_OPENGL" = "es2" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2"
+fi
+
+# safe execution environment
+if [ "$CFG_SXE" != "no" ]; then
+ QT_CONFIG="$QT_CONFIG sxe"
+fi
+
+# build up the variables for output
+if [ "$CFG_DEBUG" = "yes" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}debug"
+ QMAKE_CONFIG="$QMAKE_CONFIG debug"
+elif [ "$CFG_DEBUG" = "no" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}release"
+ QMAKE_CONFIG="$QMAKE_CONFIG release"
+fi
+if [ "$CFG_SHARED" = "yes" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}-shared"
+ QMAKE_CONFIG="$QMAKE_CONFIG shared dll"
+elif [ "$CFG_SHARED" = "no" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}-static"
+ QMAKE_CONFIG="$QMAKE_CONFIG static"
+fi
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ QMAKE_OUTDIR="${QMAKE_OUTDIR}-emb-$CFG_EMBEDDED"
+ QMAKE_CONFIG="$QMAKE_CONFIG embedded"
+ QT_CONFIG="$QT_CONFIG embedded"
+ rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
+fi
+QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR"
+QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR"
+QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR"
+QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR"
+QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR"
+if [ "$CFG_LARGEFILE" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG largefile"
+fi
+if [ "$CFG_STL" = "no" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STL"
+else
+ QMAKE_CONFIG="$QMAKE_CONFIG stl"
+fi
+if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
+fi
+[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
+[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
+[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
+if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
+ QMakeVar add QMAKE_CFLAGS -g
+ QMakeVar add QMAKE_CXXFLAGS -g
+ QMAKE_CONFIG="$QMAKE_CONFIG separate_debug_info"
+fi
+[ "$CFG_MMX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mmx"
+[ "$CFG_3DNOW" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG 3dnow"
+[ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse"
+[ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
+[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
+[ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
+if [ "$CFG_IPV6" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG ipv6"
+fi
+if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG clock-gettime"
+fi
+if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG clock-monotonic"
+fi
+if [ "$CFG_MREMAP" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG mremap"
+fi
+if [ "$CFG_GETADDRINFO" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG getaddrinfo"
+fi
+if [ "$CFG_IPV6IFNAME" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG ipv6ifname"
+fi
+if [ "$CFG_GETIFADDRS" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG getifaddrs"
+fi
+if [ "$CFG_INOTIFY" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG inotify"
+fi
+if [ "$CFG_LIBJPEG" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-jpeg"
+fi
+if [ "$CFG_JPEG" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-jpeg"
+elif [ "$CFG_JPEG" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG jpeg"
+fi
+if [ "$CFG_LIBMNG" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-mng"
+fi
+if [ "$CFG_MNG" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-mng"
+elif [ "$CFG_MNG" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG mng"
+fi
+if [ "$CFG_LIBPNG" = "no" ]; then
+ CFG_PNG="no"
+fi
+if [ "$CFG_LIBPNG" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-png"
+fi
+if [ "$CFG_PNG" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-png"
+elif [ "$CFG_PNG" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG png"
+fi
+if [ "$CFG_GIF" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-gif"
+elif [ "$CFG_GIF" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG gif"
+fi
+if [ "$CFG_LIBTIFF" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-tiff"
+fi
+if [ "$CFG_TIFF" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-tiff"
+elif [ "$CFG_TIFF" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG tiff"
+fi
+if [ "$CFG_LIBFREETYPE" = "no" ]; then
+ QT_CONFIG="$QT_CONFIG no-freetype"
+elif [ "$CFG_LIBFREETYPE" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-freetype"
+else
+ QT_CONFIG="$QT_CONFIG freetype"
+fi
+
+if [ "x$PLATFORM_MAC" = "xyes" ]; then
+ #On Mac we implicitly link against libz, so we
+ #never use the 3rdparty stuff.
+ [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
+fi
+if [ "$CFG_ZLIB" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG zlib"
+elif [ "$CFG_ZLIB" = "system" ]; then
+ QT_CONFIG="$QT_CONFIG system-zlib"
+fi
+
+[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
+[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
+[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
+[ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
+[ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
+[ "$CFG_GSTREAMER" = "yes" ] && QT_CONFIG="$QT_CONFIG gstreamer"
+[ "$CFG_DBUS" = "yes" ] && QT_CONFIG="$QT_CONFIG dbus"
+[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus dbus-linked"
+[ "$CFG_NAS" = "system" ] && QT_CONFIG="$QT_CONFIG nas"
+[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
+[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
+
+if [ "$PLATFORM_X11" = "yes" ]; then
+ [ "$CFG_SM" = "yes" ] && QT_CONFIG="$QT_CONFIG x11sm"
+
+ # for some reason, the following libraries are not always built shared,
+ # so *every* program/lib (including Qt) has to link against them
+ if [ "$CFG_XSHAPE" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xshape"
+ fi
+ if [ "$CFG_XINERAMA" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xinerama"
+ QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11'
+ fi
+ if [ "$CFG_XCURSOR" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xcursor"
+ QMakeVar set QMAKE_LIBS_X11 '-lXcursor $$QMAKE_LIBS_X11'
+ fi
+ if [ "$CFG_XFIXES" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xfixes"
+ QMakeVar set QMAKE_LIBS_X11 '-lXfixes $$QMAKE_LIBS_X11'
+ fi
+ if [ "$CFG_XRANDR" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xrandr"
+ if [ "$CFG_XRENDER" != "yes" ]; then
+ # libXrandr uses 1 function from libXrender, so we always have to have it :/
+ QMakeVar set QMAKE_LIBS_X11 '-lXrandr -lXrender $$QMAKE_LIBS_X11'
+ else
+ QMakeVar set QMAKE_LIBS_X11 '-lXrandr $$QMAKE_LIBS_X11'
+ fi
+ fi
+ if [ "$CFG_XRENDER" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xrender"
+ QMakeVar set QMAKE_LIBS_X11 '-lXrender $$QMAKE_LIBS_X11'
+ fi
+ if [ "$CFG_MITSHM" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG mitshm"
+ fi
+ if [ "$CFG_FONTCONFIG" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG fontconfig"
+ fi
+ if [ "$CFG_XINPUT" = "yes" ]; then
+ QMakeVar set QMAKE_LIBS_X11 '-lXi $$QMAKE_LIBS_X11'
+ fi
+ if [ "$CFG_XINPUT" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xinput tablet"
+ fi
+ if [ "$CFG_XKB" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xkb"
+ fi
+fi
+
+[ '!' -z "$D_FLAGS" ] && QMakeVar add DEFINES "$D_FLAGS"
+[ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
+[ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_RPATH" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
+ fi
+elif [ -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_RPATH | awk '{print $3;}'`" ]; then
+ if [ -n "$RPATH_FLAGS" ]; then
+ echo
+ echo "ERROR: -R cannot be used on this platform as \$QMAKE_RPATH is"
+ echo " undefined."
+ echo
+ exit 1
+ elif [ "$CFG_RPATH" = "yes" ]; then
+ RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
+ CFG_RPATH=no
+ fi
+else
+ if [ "$CFG_RPATH" = "yes" ]; then
+ # set the default rpath to the library installation directory
+ RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
+ fi
+ if [ -n "$RPATH_FLAGS" ]; then
+ # add the user defined rpaths
+ QMakeVar add QMAKE_RPATHDIR "$RPATH_FLAGS"
+ fi
+fi
+
+if [ '!' -z "$I_FLAGS" ]; then
+ # add the user define include paths
+ QMakeVar add QMAKE_CFLAGS "$I_FLAGS"
+ QMakeVar add QMAKE_CXXFLAGS "$I_FLAGS"
+fi
+
+# turn off exceptions for the compilers that support it
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ COMPILER=`echo $XPLATFORM | cut -f 3- -d-`
+else
+ COMPILER=`echo $PLATFORM | cut -f 2- -d-`
+fi
+if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
+ CFG_EXCEPTIONS=no
+fi
+
+if [ "$CFG_EXCEPTIONS" != "no" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions"
+fi
+
+#
+# Some Qt modules are too advanced in C++ for some old compilers
+# Detect here the platforms where they are known to work.
+#
+# See Qt documentation for more information on which features are
+# supported and on which compilers.
+#
+canBuildQtXmlPatterns="yes"
+canBuildWebKit="$HAVE_STL"
+
+# WebKit requires stdint.h
+"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS
+if [ $? != "0" ]; then
+ canBuildWebKit="no"
+fi
+
+case "$XPLATFORM" in
+ hpux-g++*)
+ # PA-RISC's assembly is too limited
+ # gcc 3.4 on that platform can't build QtXmlPatterns
+ # the assembly it generates cannot be compiled
+
+ # Check gcc's version
+ case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
+ 4*)
+ ;;
+ 3.4*)
+ canBuildQtXmlPatterns="no"
+ ;;
+ *)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ ;;
+ esac
+ ;;
+ *-g++*)
+ # Check gcc's version
+ case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
+ 4*|3.4*)
+ ;;
+ 3.3*)
+ canBuildWebKit="no"
+ ;;
+ *)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ ;;
+ esac
+ ;;
+ solaris-cc*)
+ # Check the compiler version
+ case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in
+ *)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ ;;
+ esac
+ ;;
+ hpux-acc*)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ ;;
+ hpuxi-acc*)
+ canBuildWebKit="no"
+ ;;
+ aix-xlc*)
+ canBuildWebKit="no"
+ canBuildQtXmlPatterns="no"
+ ;;
+ irix-cc*)
+ canBuildWebKit="no"
+ ;;
+esac
+
+if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then
+ echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled."
+ exit 1
+fi
+if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then
+ CFG_XMLPATTERNS="$canBuildQtXmlPatterns"
+elif [ "$CFG_EXCEPTIONS" = "no" ]; then
+ CFG_XMLPATTERNS="no"
+fi
+if [ "$CFG_XMLPATTERNS" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG xmlpatterns"
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XMLPATTERNS"
+fi
+
+if [ "$CFG_SVG" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG svg"
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
+fi
+
+if [ "$CFG_WEBKIT" = "auto" ]; then
+ CFG_WEBKIT="$canBuildWebKit"
+fi
+
+if [ "$CFG_WEBKIT" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG webkit"
+ # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly.
+ CFG_WEBKIT="yes"
+else
+ CFG_WEBKIT="no"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT"
+fi
+
+if [ "$CFG_SCRIPTTOOLS" = "auto" ]; then
+ CFG_SCRIPTTOOLS="yes"
+fi
+
+if [ "$CFG_SCRIPTTOOLS" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG scripttools"
+ CFG_SCRIPTTOOLS="yes"
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SCRIPTTOOLS"
+fi
+
+if [ "$CFG_EXCEPTIONS" = "no" ]; then
+ case "$COMPILER" in
+ g++*)
+ QMakeVar add QMAKE_CFLAGS -fno-exceptions
+ QMakeVar add QMAKE_CXXFLAGS -fno-exceptions
+ QMakeVar add QMAKE_LFLAGS -fno-exceptions
+ ;;
+ cc*)
+ case "$PLATFORM" in
+ irix-cc*)
+ QMakeVar add QMAKE_CFLAGS -LANG:exceptions=off
+ QMakeVar add QMAKE_CXXFLAGS -LANG:exceptions=off
+ QMakeVar add QMAKE_LFLAGS -LANG:exceptions=off
+ ;;
+ *) ;;
+ esac
+ ;;
+ *) ;;
+ esac
+ QMAKE_CONFIG="$QMAKE_CONFIG exceptions_off"
+fi
+
+# On Mac, set the minimum deployment target using Xarch when that is supported (10.5 and up).
+# On 10.4 the deployment version is set to 10.3 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET env. variable
+# "-cocoa" on the command line means Cocoa is used in 32-bit mode also, in this case fall back on
+# QMAKE_MACOSX_DEPLOYMENT_TARGET which will be set to 10.5.
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] && [ "$COMMANDLINE_MAC_COCOA" != "yes" ]; then
+ if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
+ QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+ QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+ QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
+ QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.3"
+ QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.3"
+ QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.3"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.3"
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
+ QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
+ fi
+ if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
+ QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
+ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
+ fi
+fi
+
+#-------------------------------------------------------------------------------
+# generate QT_BUILD_KEY
+#-------------------------------------------------------------------------------
+
+# some compilers generate binary incompatible code between different versions,
+# so we need to generate a build key that is different between these compilers
+case "$COMPILER" in
+g++*)
+ # GNU C++
+ COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
+
+ case "$COMPILER_VERSION" in
+ *.*.*)
+ QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
+ QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
+ QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
+ ;;
+ *.*)
+ QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
+ QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
+ QT_GCC_PATCH_VERSION=0
+ ;;
+ esac
+
+ case "$COMPILER_VERSION" in
+ 2.95.*)
+ COMPILER_VERSION="2.95.*"
+ ;;
+ 3.*)
+ COMPILER_VERSION="3.*"
+ ;;
+ 4.*)
+ COMPILER_VERSION="4"
+ ;;
+ *)
+ ;;
+ esac
+ [ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
+ ;;
+*)
+ #
+ ;;
+esac
+
+# QT_CONFIG can contain the following:
+#
+# Things that affect the Qt API/ABI:
+#
+# Options:
+# minimal-config small-config medium-config large-config full-config
+#
+# Different edition modules:
+# network canvas table xml opengl sql
+#
+# Options:
+# stl
+#
+# Things that do not affect the Qt API/ABI:
+# system-jpeg no-jpeg jpeg
+# system-mng no-mng mng
+# system-png no-png png
+# system-zlib no-zlib zlib
+# system-libtiff no-libtiff
+# no-gif gif
+# debug release
+# dll staticlib
+#
+# internal
+# nocrosscompiler
+# GNUmake
+# largefile
+# nis
+# nas
+# tablet
+# ipv6
+#
+# X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb
+# Embedded: embedded freetype
+#
+ALL_OPTIONS="stl"
+BUILD_CONFIG=
+BUILD_OPTIONS=
+
+# determine the build options
+for config_option in $QMAKE_CONFIG $QT_CONFIG; do
+ SKIP="yes"
+ case "$config_option" in
+ *-config)
+ # take the last *-config setting. this is the highest config being used,
+ # and is the one that we will use for tagging plugins
+ BUILD_CONFIG="$config_option"
+ ;;
+
+ stl)
+ # these config options affect the Qt API/ABI. they should influence
+ # the generation of the buildkey, so we don't skip them
+ SKIP="no"
+ ;;
+
+ *) # skip all other options since they don't affect the Qt API/ABI.
+ ;;
+ esac
+
+ if [ "$SKIP" = "no" ]; then
+ BUILD_OPTIONS="$BUILD_OPTIONS $config_option"
+ fi
+done
+
+# put the options that we are missing into .options
+rm -f .options
+for opt in `echo $ALL_OPTIONS`; do
+ SKIP="no"
+ if echo $BUILD_OPTIONS | grep $opt >/dev/null 2>&1; then
+ SKIP="yes"
+ fi
+ if [ "$SKIP" = "no" ]; then
+ echo "$opt" >> .options
+ fi
+done
+
+# reconstruct BUILD_OPTIONS with a sorted negative feature list
+# (ie. only things that are missing are will be put into the build key)
+BUILD_OPTIONS=
+if [ -f .options ]; then
+ for opt in `sort -f .options | uniq`; do
+ BUILD_OPTIONS="$BUILD_OPTIONS no-$opt"
+ done
+fi
+rm -f .options
+
+# QT_NO* defines affect the Qt API (and binary compatibility). they need
+# to be included in the build key
+for build_option in $D_FLAGS; do
+ build_option=`echo $build_option | cut -d \" -f 2 -`
+ case "$build_option" in
+ QT_NO*)
+ echo "$build_option" >> .options
+ ;;
+ *)
+ # skip all other compiler defines
+ ;;
+ esac
+done
+
+# sort the compile time defines (helps ensure that changes in this configure
+# script don't affect the QT_BUILD_KEY generation)
+if [ -f .options ]; then
+ for opt in `sort -f .options | uniq`; do
+ BUILD_OPTIONS="$BUILD_OPTIONS $opt"
+ done
+fi
+rm -f .options
+
+BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS"
+# extract the operating system from the XPLATFORM
+TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
+
+# when cross-compiling, don't include build-host information (build key is target specific)
+QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
+MAC_NEED_TWO_BUILD_KEYS="no"
+if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
+ QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
+ TARGET_OPERATING_SYSTEM="$TARGET_OPERATING_SYSTEM-cocoa"
+ QT_BUILD_KEY_COCOA="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
+ if [ "$CFG_MAC_CARBON" = "no" ]; then
+ QT_BUILD_KEY=$QT_BUILD_KEY_COCOA
+ else
+ MAC_NEED_TWO_BUILD_KEYS="yes"
+ fi
+fi
+# don't break loading plugins build with an older version of Qt
+QT_BUILD_KEY_COMPAT=
+if [ "$QT_CROSS_COMPILE" = "no" ]; then
+ # previous versions of Qt used a build key built from the uname
+ QT_BUILD_KEY_COMPAT="$CFG_USER_BUILD_KEY $UNAME_MACHINE $UNAME_SYSTEM $COMPILER $BUILD_OPTIONS"
+fi
+# strip out leading/trailing/extra whitespace
+QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
+QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
+
+#-------------------------------------------------------------------------------
+# part of configuration information goes into qconfig.h
+#-------------------------------------------------------------------------------
+
+case "$CFG_QCONFIG" in
+full)
+ echo "/* Everything */" >"$outpath/src/corelib/global/qconfig.h.new"
+ ;;
+*)
+ tmpconfig="$outpath/src/corelib/global/qconfig.h.new"
+ echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig"
+ cat "$relpath/src/corelib/global/qconfig-$CFG_QCONFIG.h" >>"$tmpconfig"
+ echo "#endif" >>"$tmpconfig"
+ ;;
+esac
+
+cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+
+/* Qt Edition */
+#ifndef QT_EDITION
+# define QT_EDITION $QT_EDITION
+#endif
+
+/* Machine byte-order */
+#define Q_BIG_ENDIAN 4321
+#define Q_LITTLE_ENDIAN 1234
+EOF
+
+if [ "$MAC_NEED_TWO_BUILD_KEYS" = "no" ]; then
+ echo "#define QT_BUILD_KEY \"$QT_BUILD_KEY\"" \
+ >> "$outpath/src/corelib/global/qconfig.h.new"
+else
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+
+#define QT_BUILD_KEY_CARBON "$QT_BUILD_KEY_CARBON"
+#define QT_BUILD_KEY_COCOA "$QT_BUILD_KEY_COCOA"
+EOF
+fi
+
+if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
+ echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
+ >> "$outpath/src/corelib/global/qconfig.h.new"
+fi
+echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
+
+echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"
+if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+#if defined(__BIG_ENDIAN__)
+# define Q_BYTE_ORDER Q_BIG_ENDIAN
+#elif defined(__LITTLE_ENDIAN__)
+# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
+#else
+# error "Unable to determine byte order!"
+#endif
+EOF
+else
+ echo "#define Q_BYTE_ORDER $CFG_HOST_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+echo "#else" >>"$outpath/src/corelib/global/qconfig.h.new"
+if [ "$CFG_ENDIAN" = "auto" ]; then
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+#if defined(__BIG_ENDIAN__)
+# define Q_BYTE_ORDER Q_BIG_ENDIAN
+#elif defined(__LITTLE_ENDIAN__)
+# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
+#else
+# error "Unable to determine byte order!"
+#endif
+EOF
+else
+ echo "#define Q_BYTE_ORDER $CFG_ENDIAN" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+echo "#endif" >>"$outpath/src/corelib/global/qconfig.h.new"
+
+if [ "$CFG_DOUBLEFORMAT" != "normal" ]; then
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+/* Non-IEEE double format */
+#define Q_DOUBLE_LITTLE "01234567"
+#define Q_DOUBLE_BIG "76543210"
+#define Q_DOUBLE_LITTLE_SWAPPED "45670123"
+#define Q_DOUBLE_BIG_SWAPPED "32107654"
+#define Q_DOUBLE_FORMAT $CFG_DOUBLEFORMAT
+EOF
+fi
+if [ "$CFG_ARMFPA" = "yes" ]; then
+ if [ "$CFG_ARCH" != "$CFG_HOST_ARCH" ]; then
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+#ifndef QT_BOOTSTRAPPED
+# define QT_ARMFPA
+#endif
+EOF
+ else
+ echo "#define QT_ARMFPA" >>"$outpath/src/corelib/global/qconfig.h.new"
+ fi
+fi
+
+CFG_ARCH_STR=`echo $CFG_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+CFG_HOST_ARCH_STR=`echo $CFG_HOST_ARCH | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+/* Machine Architecture */
+#ifndef QT_BOOTSTRAPPED
+# define QT_ARCH_${CFG_ARCH_STR}
+#else
+# define QT_ARCH_${CFG_HOST_ARCH_STR}
+#endif
+EOF
+
+echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new"
+[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new"
+
+if [ "$CFG_LARGEFILE" = "yes" ]; then
+ echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
+# if both carbon and cocoa are specified, enable the autodetection code.
+if [ "$CFG_MAC_COCOA" = "yes" -a "$CFG_MAC_CARBON" = "yes" ]; then
+ echo "#define AUTODETECT_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
+elif [ "$CFG_MAC_COCOA" = "yes" ]; then
+ echo "#define QT_MAC_USE_COCOA 1" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
+if [ "$CFG_FRAMEWORK" = "yes" ]; then
+ echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
+#if defined(__LP64__)
+# define QT_POINTER_SIZE 8
+#else
+# define QT_POINTER_SIZE 4
+#endif
+EOF
+else
+ "$unixtests/ptrsize.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
+ echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
+
+echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
+
+if [ "$CFG_DEV" = "yes" ]; then
+ echo "#define QT_BUILD_INTERNAL" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
+# Embedded compile time options
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ # Add QWS to config.h
+ QCONFIG_FLAGS="$QCONFIG_FLAGS Q_WS_QWS"
+
+ # Add excluded decorations to $QCONFIG_FLAGS
+ decors=`grep '^decorations -= ' "$QMAKE_VARS_FILE" | ${AWK} '{print $3}'`
+ for decor in $decors; do
+ NODECORATION=`echo $decor | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_NO_QWS_DECORATION_${NODECORATION}"
+ done
+
+ # Figure which embedded drivers which are turned off
+ CFG_GFX_OFF="$CFG_GFX_AVAILABLE"
+ for ADRIVER in $CFG_GFX_ON; do
+ CFG_GFX_OFF=`echo "${CFG_GFX_OFF} " | sed "s,${ADRIVER} ,,g"`
+ done
+
+ CFG_KBD_OFF="$CFG_KBD_AVAILABLE"
+ # the um driver is currently not in the available list for external builds
+ if [ "$CFG_DEV" = "no" ]; then
+ CFG_KBD_OFF="$CFG_KBD_OFF um"
+ fi
+ for ADRIVER in $CFG_KBD_ON; do
+ CFG_KBD_OFF=`echo "${CFG_KBD_OFF} " | sed "s,${ADRIVER} ,,g"`
+ done
+
+ CFG_MOUSE_OFF="$CFG_MOUSE_AVAILABLE"
+ for ADRIVER in $CFG_MOUSE_ON; do
+ CFG_MOUSE_OFF=`echo "${CFG_MOUSE_OFF} " | sed "s,${ADRIVER} ,,g"`
+ done
+
+ for DRIVER in $CFG_GFX_OFF; do
+ NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_$NODRIVER"
+ done
+
+ for DRIVER in $CFG_KBD_OFF; do
+ NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_KBD_$NODRIVER"
+ done
+
+ for DRIVER in $CFG_MOUSE_OFF; do
+ NODRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QWS_MOUSE_$NODRIVER"
+ done
+fi # QWS
+
+if [ "${CFG_USE_FLOATMATH}" = "yes" ]; then
+ QCONFIG_FLAGS="${QCONFIG_FLAGS} QT_USE_MATH_H_FLOATS"
+fi
+
+# Add turned on SQL drivers
+for DRIVER in $CFG_SQL_AVAILABLE; do
+ eval "VAL=\$CFG_SQL_$DRIVER"
+ case "$VAL" in
+ qt)
+ ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
+ SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
+ ;;
+ plugin)
+ SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
+ ;;
+ esac
+done
+
+
+QMakeVar set sql-drivers "$SQL_DRIVERS"
+QMakeVar set sql-plugins "$SQL_PLUGINS"
+
+# Add other configuration options to the qconfig.h file
+[ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
+[ "$CFG_TIFF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_TIFF"
+[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
+[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
+[ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
+[ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
+[ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
+[ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
+[ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
+[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
+
+if [ "$PLATFORM_QWS" != "yes" ]; then
+ [ "$CFG_GRAPHICS_SYSTEM" = "raster" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_RASTER"
+ [ "$CFG_GRAPHICS_SYSTEM" = "opengl" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_GRAPHICSSYSTEM_OPENGL"
+fi
+
+# X11/Unix/Mac only configs
+[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
+[ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
+[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
+[ "$CFG_GSTREAMER" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GSTREAMER"
+[ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK"
+[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
+[ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
+[ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
+[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
+[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
+[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
+[ "$CFG_NAS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NAS"
+[ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
+[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
+[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
+
+[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
+[ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
+[ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
+[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
+[ "$CFG_XINERAMA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINERAMA"
+[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
+[ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
+[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
+[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
+[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
+[ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET"
+
+[ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
+[ "$CFG_XINERAMA" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINERAMA"
+[ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
+[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
+[ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT"
+
+# sort QCONFIG_FLAGS for neatness if we can
+[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
+QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
+
+if [ -n "$QCONFIG_FLAGS" ]; then
+ for cfg in $QCONFIG_FLAGS; do
+ cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
+ cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
+ # figure out define logic, so we can output the correct
+ # ifdefs to override the global defines in a project
+ cfgdNeg=
+ if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
+ # QT_NO_option can be forcefully turned on by QT_option
+ cfgdNeg=`echo $cfgd | sed "s,QT_NO_,QT_,"`
+ elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
+ # QT_option can be forcefully turned off by QT_NO_option
+ cfgdNeg=`echo $cfgd | sed "s,QT_,QT_NO_,"`
+ fi
+
+ if [ -z $cfgdNeg ]; then
+cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
+#ifndef $cfgd
+# define $cfg
+#endif
+
+EOF
+ else
+cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
+#if defined($cfgd) && defined($cfgdNeg)
+# undef $cfgd
+#elif !defined($cfgd) && !defined($cfgdNeg)
+# define $cfg
+#endif
+
+EOF
+ fi
+ done
+fi
+
+if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
+cat >>"$outpath/src/corelib/global/qconfig.h.new" << EOF
+#define QT_VISIBILITY_AVAILABLE
+
+EOF
+fi
+
+# avoid unecessary rebuilds by copying only if qconfig.h has changed
+if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
+ rm -f "$outpath/src/corelib/global/qconfig.h.new"
+else
+ [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h"
+ mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
+ chmod -w "$outpath/src/corelib/global/qconfig.h"
+ for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
+ if [ '!' -f "$conf" ]; then
+ ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
+ fi
+ done
+fi
+
+#-------------------------------------------------------------------------------
+# save configuration into qconfig.pri
+#-------------------------------------------------------------------------------
+
+QTCONFIG="$outpath/mkspecs/qconfig.pri"
+QTCONFIG_CONFIG="$QTCONFIG_CONFIG no_mocdepend"
+[ -f "$QTCONFIG.tmp" ] && rm -f "$QTCONFIG.tmp"
+if [ "$CFG_DEBUG" = "yes" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
+ if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG release"
+ fi
+ QT_CONFIG="$QT_CONFIG debug"
+elif [ "$CFG_DEBUG" = "no" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
+ if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG debug"
+ fi
+ QT_CONFIG="$QT_CONFIG release"
+fi
+if [ "$CFG_STL" = "yes" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG stl"
+fi
+if [ "$CFG_FRAMEWORK" = "no" ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
+else
+ QT_CONFIG="$QT_CONFIG qt_framework"
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
+fi
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
+fi
+
+# Make the application arch follow the Qt arch for single arch builds.
+# (for multiple-arch builds, set CONFIG manually in the application .pro file)
+if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
+fi
+
+cat >>"$QTCONFIG.tmp" <<EOF
+#configuration
+CONFIG += $QTCONFIG_CONFIG
+QT_ARCH = $CFG_ARCH
+QT_EDITION = $Edition
+QT_CONFIG += $QT_CONFIG
+
+#versioning
+QT_VERSION = $QT_VERSION
+QT_MAJOR_VERSION = $QT_MAJOR_VERSION
+QT_MINOR_VERSION = $QT_MINOR_VERSION
+QT_PATCH_VERSION = $QT_PATCH_VERSION
+
+#namespaces
+QT_LIBINFIX = $QT_LIBINFIX
+QT_NAMESPACE = $QT_NAMESPACE
+QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
+
+EOF
+if [ "$CFG_RPATH" = "yes" ]; then
+ echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
+fi
+if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
+ echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
+ echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
+ echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
+fi
+# replace qconfig.pri if it differs from the newly created temp file
+if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
+ rm -f "$QTCONFIG.tmp"
+else
+ mv -f "$QTCONFIG.tmp" "$QTCONFIG"
+fi
+
+#-------------------------------------------------------------------------------
+# save configuration into .qmake.cache
+#-------------------------------------------------------------------------------
+
+CACHEFILE="$outpath/.qmake.cache"
+[ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
+cat >>"$CACHEFILE.tmp" <<EOF
+CONFIG += $QMAKE_CONFIG dylib create_prl link_prl depend_includepath fix_output_dirs QTDIR_build
+QT_SOURCE_TREE = \$\$quote($relpath)
+QT_BUILD_TREE = \$\$quote($outpath)
+QT_BUILD_PARTS = $CFG_BUILD_PARTS
+QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
+QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
+
+#local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
+QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
+QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
+QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
+QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
+QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
+QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
+QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
+
+EOF
+
+if [ -n "$QT_CFLAGS_PSQL" ]; then
+ echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp"
+fi
+if [ -n "$QT_LFLAGS_PSQL" ]; then
+ echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL" >> "$CACHEFILE.tmp"
+fi
+if [ -n "$QT_CFLAGS_MYSQL" ]; then
+ echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL" >> "$CACHEFILE.tmp"
+fi
+if [ -n "$QT_LFLAGS_MYSQL" ]; then
+ echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL" >> "$CACHEFILE.tmp"
+fi
+if [ -n "$QT_CFLAGS_SQLITE" ]; then
+ echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE" >> "$CACHEFILE.tmp"
+fi
+if [ -n "$QT_LFLAGS_SQLITE" ]; then
+ echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE" >> "$CACHEFILE.tmp"
+fi
+
+if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then
+ echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
+fi
+
+#dump in the OPENSSL_LIBS info
+if [ '!' -z "$OPENSSL_LIBS" ]; then
+ echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
+elif [ "$CFG_OPENSSL" = "linked" ]; then
+ echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$CACHEFILE.tmp"
+fi
+
+#dump in the SDK info
+if [ '!' -z "$CFG_SDK" ]; then
+ echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$CACHEFILE.tmp"
+fi
+
+# mac gcc -Xarch support
+if [ "$CFG_MAC_XARCH" = "no" ]; then
+ echo "QMAKE_MAC_XARCH = no" >> "$CACHEFILE.tmp"
+fi
+
+#dump the qmake spec
+if [ -d "$outpath/mkspecs/$XPLATFORM" ]; then
+ echo "QMAKESPEC = \$\$QT_BUILD_TREE/mkspecs/$XPLATFORM" >> "$CACHEFILE.tmp"
+else
+ echo "QMAKESPEC = $XPLATFORM" >> "$CACHEFILE.tmp"
+fi
+
+# cmdline args
+cat "$QMAKE_VARS_FILE" >> "$CACHEFILE.tmp"
+rm -f "$QMAKE_VARS_FILE" 2>/dev/null
+
+# incrementals
+INCREMENTAL=""
+[ "$CFG_INCREMENTAL" = "auto" ] && "$WHICH" p4 >/dev/null 2>&1 && [ "$CFG_DEV" = "yes" ] && CFG_INCREMENTAL="yes"
+if [ "$CFG_INCREMENTAL" = "yes" ]; then
+ find "$relpath" -perm u+w -mtime -3 | grep 'cpp$' | while read f; do
+ # don't need to worry about generated files
+ [ -r `echo $f | sed "s,cpp$,ui,"` ] && continue
+ basename "$f" | grep '^moc_' >/dev/null 2>&1 && continue
+ # done
+ INCREMENTAL="$INCREMENTAL `basename \"$f\" | sed 's,.cpp,.o,'`"
+ done
+ [ '!' -z "$INCREMENTAL" ] && echo "QMAKE_INCREMENTAL += $INCREMENTAL" >> "$CACHEFILE.tmp"
+ [ -r "$outpath/.qmake.incremental" ] && echo "include($outpath/.qmake.incremental)" >> "$CACHEFILE.tmp"
+fi
+
+# replace .qmake.cache if it differs from the newly created temp file
+if cmp -s "$CACHEFILE.tmp" "$CACHEFILE"; then
+ rm -f "$CACHEFILE.tmp"
+else
+ mv -f "$CACHEFILE.tmp" "$CACHEFILE"
+fi
+
+#-------------------------------------------------------------------------------
+# give feedback on configuration
+#-------------------------------------------------------------------------------
+
+case "$COMPILER" in
+g++*)
+ if [ "$CFG_EXCEPTIONS" != "no" ]; then
+ cat <<EOF
+
+ This target is using the GNU C++ compiler ($PLATFORM).
+
+ Recent versions of this compiler automatically include code for
+ exceptions, which increase both the size of the Qt libraries and
+ the amount of memory taken by your applications.
+
+ You may choose to re-run `basename $0` with the -no-exceptions
+ option to compile Qt without exceptions. This is completely binary
+ compatible, and existing applications will continue to work.
+
+EOF
+ fi
+ ;;
+cc*)
+ case "$PLATFORM" in
+ irix-cc*)
+ if [ "$CFG_EXCEPTIONS" != "no" ]; then
+ cat <<EOF
+
+ This target is using the MIPSpro C++ compiler ($PLATFORM).
+
+ You may choose to re-run `basename $0` with the -no-exceptions
+ option to compile Qt without exceptions. This will make the
+ size of the Qt library smaller and reduce the amount of memory
+ taken by your applications.
+
+EOF
+ fi
+ ;;
+ *) ;;
+ esac
+ ;;
+*) ;;
+esac
+
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then
+ cat <<EOF
+ WARNING: DWARF2 debug symbols are not enabled. Linking webkit
+ in debug mode will run out of memory on systems with 2GB or less.
+ Install Xcode 2.4.1 or higher to enable DWARF2, or configure with
+ -no-webkit or -release to skip webkit debug.
+EOF
+fi
+
+echo
+if [ "$XPLATFORM" = "$PLATFORM" ]; then
+ echo "Build type: $PLATFORM"
+else
+ echo "Building on: $PLATFORM"
+ echo "Building for: $XPLATFORM"
+fi
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ echo "Architecture: $CFG_ARCH ($CFG_MAC_ARCHS )"
+else
+ echo "Architecture: $CFG_ARCH"
+fi
+
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ echo "Host architecture: $CFG_HOST_ARCH"
+fi
+
+if [ "$PLATFORM_MAC" = "yes" ]; then
+ if [ "$CFG_MAC_COCOA" = "yes" ]; then
+ if [ "$CFG_MAC_CARBON" = "yes" ]; then
+ echo "Using framework: Carbon for 32-bit, Cocoa for 64-bit"
+ else
+ echo "Using framework: Cocoa"
+ fi
+ else
+ echo "Using framework: Carbon"
+ fi
+fi
+
+if [ -n "$PLATFORM_NOTES" ]; then
+ echo "Platform notes:"
+ echo "$PLATFORM_NOTES"
+else
+ echo
+fi
+
+if [ "$OPT_VERBOSE" = "yes" ]; then
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n "qmake vars .......... "
+ else
+ echo "qmake vars .......... \c"
+ fi
+ cat "$QMAKE_VARS_FILE" | tr '\n' ' '
+ echo "qmake switches ...... $QMAKE_SWITCHES"
+fi
+
+[ "$CFG_INCREMENTAL" = "yes" ] && [ '!' -z "$INCREMENTAL" ] && echo "Incremental ......... $INCREMENTAL"
+echo "Build ............... $CFG_BUILD_PARTS"
+echo "Configuration ....... $QMAKE_CONFIG $QT_CONFIG"
+if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
+ echo "Debug ............... yes (combined)"
+ if [ "$CFG_DEBUG" = "yes" ]; then
+ echo "Default Link ........ debug"
+ else
+ echo "Default Link ........ release"
+ fi
+else
+ echo "Debug ............... $CFG_DEBUG"
+fi
+echo "Qt 3 compatibility .. $CFG_QT3SUPPORT"
+[ "$CFG_DBUS" = "no" ] && echo "QtDBus module ....... no"
+[ "$CFG_DBUS" = "yes" ] && echo "QtDBus module ....... yes (run-time)"
+[ "$CFG_DBUS" = "linked" ] && echo "QtDBus module ....... yes (linked)"
+echo "QtScriptTools module $CFG_SCRIPTTOOLS"
+echo "QtXmlPatterns module $CFG_XMLPATTERNS"
+echo "Phonon module ....... $CFG_PHONON"
+echo "SVG module .......... $CFG_SVG"
+echo "WebKit module ....... $CFG_WEBKIT"
+echo "STL support ......... $CFG_STL"
+echo "PCH support ......... $CFG_PRECOMPILE"
+echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
+if [ "${CFG_ARCH}" = "arm" ]; then
+ echo "iWMMXt support ...... ${CFG_IWMMXT}"
+fi
+[ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM"
+echo "IPv6 support ........ $CFG_IPV6"
+echo "IPv6 ifname support . $CFG_IPV6IFNAME"
+echo "getaddrinfo support . $CFG_GETADDRINFO"
+echo "getifaddrs support .. $CFG_GETIFADDRS"
+echo "Accessibility ....... $CFG_ACCESSIBILITY"
+echo "NIS support ......... $CFG_NIS"
+echo "CUPS support ........ $CFG_CUPS"
+echo "Iconv support ....... $CFG_ICONV"
+echo "Glib support ........ $CFG_GLIB"
+echo "GStreamer support ... $CFG_GSTREAMER"
+echo "Large File support .. $CFG_LARGEFILE"
+echo "GIF support ......... $CFG_GIF"
+if [ "$CFG_TIFF" = "no" ]; then
+ echo "TIFF support ........ $CFG_TIFF"
+else
+ echo "TIFF support ........ $CFG_TIFF ($CFG_LIBTIFF)"
+fi
+if [ "$CFG_JPEG" = "no" ]; then
+ echo "JPEG support ........ $CFG_JPEG"
+else
+ echo "JPEG support ........ $CFG_JPEG ($CFG_LIBJPEG)"
+fi
+if [ "$CFG_PNG" = "no" ]; then
+ echo "PNG support ......... $CFG_PNG"
+else
+ echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
+fi
+if [ "$CFG_MNG" = "no" ]; then
+ echo "MNG support ......... $CFG_MNG"
+else
+ echo "MNG support ......... $CFG_MNG ($CFG_LIBMNG)"
+fi
+echo "zlib support ........ $CFG_ZLIB"
+echo "Session management .. $CFG_SM"
+if [ "$PLATFORM_QWS" = "yes" ]; then
+ echo "Embedded support .... $CFG_EMBEDDED"
+ if [ "$CFG_QWS_FREETYPE" = "auto" ]; then
+ echo "Freetype2 support ... $CFG_QWS_FREETYPE ($CFG_LIBFREETYPE)"
+ else
+ echo "Freetype2 support ... $CFG_QWS_FREETYPE"
+ fi
+ # Normalize the decoration output first
+ CFG_GFX_ON=`echo ${CFG_GFX_ON}`
+ CFG_GFX_PLUGIN=`echo ${CFG_GFX_PLUGIN}`
+ echo "Graphics (qt) ....... ${CFG_GFX_ON}"
+ echo "Graphics (plugin) ... ${CFG_GFX_PLUGIN}"
+ CFG_DECORATION_ON=`echo ${CFG_DECORATION_ON}`
+ CFG_DECORATION_PLUGIN=`echo ${CFG_DECORATION_PLUGIN}`
+ echo "Decorations (qt) .... $CFG_DECORATION_ON"
+ echo "Decorations (plugin) $CFG_DECORATION_PLUGIN"
+ CFG_KBD_ON=`echo ${CFG_KBD_ON}`
+ CFG_KBD_PLUGIN=`echo ${CFG_KBD_PLUGIN}`
+ echo "Keyboard driver (qt). ${CFG_KBD_ON}"
+ echo "Keyboard driver (plugin) ${CFG_KBD_PLUGIN}"
+ CFG_MOUSE_ON=`echo ${CFG_MOUSE_ON}`
+ CFG_MOUSE_PLUGIN=`echo ${CFG_MOUSE_PLUGIN}`
+ echo "Mouse driver (qt) ... $CFG_MOUSE_ON"
+ echo "Mouse driver (plugin) $CFG_MOUSE_PLUGIN"
+fi
+if [ "$CFG_OPENGL" = "desktop" ]; then
+ echo "OpenGL support ...... yes (Desktop OpenGL)"
+elif [ "$CFG_OPENGL" = "es1" ]; then
+ echo "OpenGL support ...... yes (OpenGL ES 1.x Common profile)"
+elif [ "$CFG_OPENGL" = "es1cl" ]; then
+ echo "OpenGL support ...... yes (OpenGL ES 1.x Common Lite profile)"
+elif [ "$CFG_OPENGL" = "es2" ]; then
+ echo "OpenGL support ...... yes (OpenGL ES 2.x)"
+else
+ echo "OpenGL support ...... no"
+fi
+if [ "$PLATFORM_X11" = "yes" ]; then
+ echo "NAS sound support ... $CFG_NAS"
+ echo "XShape support ...... $CFG_XSHAPE"
+ echo "Xinerama support .... $CFG_XINERAMA"
+ echo "Xcursor support ..... $CFG_XCURSOR"
+ echo "Xfixes support ...... $CFG_XFIXES"
+ echo "Xrandr support ...... $CFG_XRANDR"
+ echo "Xrender support ..... $CFG_XRENDER"
+ echo "Xi support .......... $CFG_XINPUT"
+ echo "MIT-SHM support ..... $CFG_MITSHM"
+ echo "FontConfig support .. $CFG_FONTCONFIG"
+ echo "XKB Support ......... $CFG_XKB"
+ echo "immodule support .... $CFG_IM"
+ echo "GTK theme support ... $CFG_QGTKSTYLE"
+fi
+[ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support ....... $CFG_SQL_mysql"
+[ "$CFG_SQL_psql" != "no" ] && echo "PostgreSQL support .. $CFG_SQL_psql"
+[ "$CFG_SQL_odbc" != "no" ] && echo "ODBC support ........ $CFG_SQL_odbc"
+[ "$CFG_SQL_oci" != "no" ] && echo "OCI support ......... $CFG_SQL_oci"
+[ "$CFG_SQL_tds" != "no" ] && echo "TDS support ......... $CFG_SQL_tds"
+[ "$CFG_SQL_db2" != "no" ] && echo "DB2 support ......... $CFG_SQL_db2"
+[ "$CFG_SQL_ibase" != "no" ] && echo "InterBase support ... $CFG_SQL_ibase"
+[ "$CFG_SQL_sqlite2" != "no" ] && echo "SQLite 2 support .... $CFG_SQL_sqlite2"
+[ "$CFG_SQL_sqlite" != "no" ] && echo "SQLite support ...... $CFG_SQL_sqlite ($CFG_SQLITE)"
+
+OPENSSL_LINKAGE=""
+if [ "$CFG_OPENSSL" = "yes" ]; then
+ OPENSSL_LINKAGE="(run-time)"
+elif [ "$CFG_OPENSSL" = "linked" ]; then
+ OPENSSL_LINKAGE="(linked)"
+fi
+echo "OpenSSL support ..... $CFG_OPENSSL $OPENSSL_LINKAGE"
+
+[ "$CFG_PTMALLOC" != "no" ] && echo "Use ptmalloc ........ $CFG_PTMALLOC"
+
+# complain about not being able to use dynamic plugins if we are using a static build
+if [ "$CFG_SHARED" = "no" ]; then
+ echo
+ echo "WARNING: Using static linking will disable the use of dynamically"
+ echo "loaded plugins. Make sure to import all needed static plugins,"
+ echo "or compile needed modules into the library."
+ echo
+fi
+if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
+ echo
+ echo "NOTE: When linking against OpenSSL, you can override the default"
+ echo "library names through OPENSSL_LIBS."
+ echo "For example:"
+ echo " ./configure -openssl-linked OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto'"
+ echo
+fi
+if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
+ echo
+ echo "NOTE: Mac OS X frameworks implicitly build debug and release Qt libraries."
+ echo
+fi
+echo
+
+sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
+PROCS=1
+EXEC=""
+
+
+#-------------------------------------------------------------------------------
+# build makefiles based on the configuration
+#-------------------------------------------------------------------------------
+
+echo "Finding project files. Please wait..."
+"$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
+if [ -f "${relpath}/projects.pro" ]; then
+ mkfile="${outpath}/Makefile"
+ [ -f "$mkfile" ] && chmod +w "$mkfile"
+ QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"
+fi
+
+# .projects -> projects to process
+# .projects.1 -> qt and moc
+# .projects.2 -> subdirs and libs
+# .projects.3 -> the rest
+rm -f .projects .projects.1 .projects.2 .projects.3
+
+QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
+if [ -z "$AWK" ]; then
+ for p in `echo $QMAKE_PROJECTS`; do
+ echo "$p" >> .projects
+ done
+else
+ cat >projects.awk <<EOF
+BEGIN {
+ files = 0
+ target_file = ""
+ input_file = ""
+
+ first = "./.projects.1.tmp"
+ second = "./.projects.2.tmp"
+ third = "./.projects.3.tmp"
+}
+
+FNR == 1 {
+ if ( input_file ) {
+ if ( ! target_file )
+ target_file = third
+ print input_file >target_file
+ }
+
+ matched_target = 0
+ template_lib = 0
+ input_file = FILENAME
+ target_file = ""
+}
+
+/^(TARGET.*=)/ {
+ if ( \$3 == "moc" || \$3 ~ /^Qt/ ) {
+ target_file = first
+ matched_target = 1
+ }
+}
+
+matched_target == 0 && /^(TEMPLATE.*=)/ {
+ if ( \$3 == "subdirs" )
+ target_file = second
+ else if ( \$3 == "lib" )
+ template_lib = 1
+ else
+ target_file = third
+}
+
+matched_target == 0 && template_lib == 1 && /^(CONFIG.*=)/ {
+ if ( \$0 ~ /plugin/ )
+ target_file = third
+ else
+ target_file = second
+}
+
+END {
+ if ( input_file ) {
+ if ( ! target_file )
+ target_file = third
+ print input_file >>target_file
+ }
+}
+
+EOF
+
+ rm -f .projects.all
+ for p in `echo $QMAKE_PROJECTS`; do
+ echo "$p" >> .projects.all
+ done
+
+ # if you get errors about the length of the command line to awk, change the -l arg
+ # to split below
+ split -l 100 .projects.all .projects.all.
+ for p in .projects.all.*; do
+ "$AWK" -f projects.awk `cat $p`
+ [ -f .projects.1.tmp ] && cat .projects.1.tmp >> .projects.1
+ [ -f .projects.2.tmp ] && cat .projects.2.tmp >> .projects.2
+ [ -f .projects.3.tmp ] && cat .projects.3.tmp >> .projects.3
+ rm -f .projects.1.tmp .projects.2.tmp .projects.3.tmp $p
+ done
+ rm -f .projects.all* projects.awk
+
+ [ -f .projects.1 ] && cat .projects.1 >>.projects
+ [ -f .projects.2 ] && cat .projects.2 >>.projects
+ rm -f .projects.1 .projects.2
+ if [ -f .projects.3 ] && [ "$OPT_FAST" = "no" ]; then
+ cat .projects.3 >>.projects
+ rm -f .projects.3
+ fi
+fi
+# don't sort Qt and MOC in with the other project files
+# also work around a segfaulting uniq(1)
+if [ -f .sorted.projects.2 ]; then
+ sort .sorted.projects.2 > .sorted.projects.2.new
+ mv -f .sorted.projects.2.new .sorted.projects.2
+ cat .sorted.projects.2 >> .sorted.projects.1
+fi
+[ -f .sorted.projects.1 ] && sort .sorted.projects.1 >> .sorted.projects
+rm -f .sorted.projects.2 .sorted.projects.1
+
+NORM_PROJECTS=0
+FAST_PROJECTS=0
+if [ -f .projects ]; then
+ uniq .projects >.tmp
+ mv -f .tmp .projects
+ NORM_PROJECTS=`cat .projects | wc -l | sed -e "s, ,,g"`
+fi
+if [ -f .projects.3 ]; then
+ uniq .projects.3 >.tmp
+ mv -f .tmp .projects.3
+ FAST_PROJECTS=`cat .projects.3 | wc -l | sed -e "s, ,,g"`
+fi
+echo " `expr $NORM_PROJECTS + $FAST_PROJECTS` projects found."
+echo
+
+PART_ROOTS=
+for part in $CFG_BUILD_PARTS; do
+ case "$part" in
+ tools) PART_ROOTS="$PART_ROOTS tools" ;;
+ libs) PART_ROOTS="$PART_ROOTS src" ;;
+ examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
+ *) ;;
+ esac
+done
+
+if [ "$CFG_DEV" = "yes" ]; then
+ PART_ROOTS="$PART_ROOTS tests"
+fi
+
+echo "Creating makefiles. Please wait..."
+for file in .projects .projects.3; do
+ [ '!' -f "$file" ] && continue
+ for a in `cat $file`; do
+ IN_ROOT=no
+ for r in $PART_ROOTS; do
+ if echo "$a" | grep "^$r" >/dev/null 2>&1 || echo "$a" | grep "^$relpath/$r" >/dev/null 2>&1; then
+ IN_ROOT=yes
+ break
+ fi
+ done
+ [ "$IN_ROOT" = "no" ] && continue
+
+ case $a in
+ *winmain/winmain.pro) continue ;;
+ */qmake/qmake.pro) continue ;;
+ *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*) SPEC=$QMAKESPEC ;;
+ *) SPEC=$XQMAKESPEC ;;
+ esac
+ dir=`dirname $a | sed -e "s;$sepath;.;g"`
+ test -d "$dir" || mkdir -p "$dir"
+ OUTDIR="$outpath/$dir"
+ if [ -f "${OUTDIR}/Makefile" ] && [ "$OPT_FAST" = "yes" ]; then
+ # fast configure - the makefile exists, skip it
+ # since the makefile exists, it was generated by qmake, which means we
+ # can skip it, since qmake has a rule to regenerate the makefile if the .pro
+ # file changes...
+ [ "$OPT_VERBOSE" = "yes" ] && echo " skipping $a"
+ continue;
+ fi
+ QMAKE_SPEC_ARGS="-spec $SPEC"
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n " for $a"
+ else
+ echo " for $a\c"
+ fi
+
+ QMAKE="$outpath/bin/qmake"
+ QMAKE_ARGS="$QMAKE_SWITCHES $QMAKE_SPEC_ARGS"
+ if [ "$file" = ".projects.3" ]; then
+ if echo '\c' | grep '\c' >/dev/null; then
+ echo -n " (fast)"
+ else
+ echo " (fast)\c"
+ fi
+ echo
+
+ cat >"${OUTDIR}/Makefile" <<EOF
+# ${OUTDIR}/Makefile: generated by configure
+#
+# WARNING: This makefile will be replaced with a real makefile.
+# All changes made to this file will be lost.
+EOF
+ [ "$CFG_DEBUG_RELEASE" = "no" ] && echo "first_target: first" >>${OUTDIR}/Makefile
+
+ cat >>"${OUTDIR}/Makefile" <<EOF
+QMAKE = "$QMAKE"
+all clean install qmake first Makefile: FORCE
+ \$(QMAKE) $QMAKE_ARGS -o "$OUTDIR" "$a"
+ cd "$OUTDIR"
+ \$(MAKE) \$@
+
+FORCE:
+
+EOF
+ else
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " (`basename $SPEC`)"
+ echo "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
+ else
+ echo
+ fi
+
+ [ -f "${OUTDIR}/Makefile" ] && chmod +w "${OUTDIR}/Makefile"
+ QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"
+ fi
+ done
+done
+rm -f .projects .projects.3
+
+#-------------------------------------------------------------------------------
+# XShape is important, DnD in the Designer doens't work without it
+#-------------------------------------------------------------------------------
+if [ "$PLATFORM_X11" = "yes" ] && [ "$CFG_XSHAPE" = "no" ]; then
+ cat <<EOF
+
+ NOTICE: Qt will not be built with XShape support.
+
+ As a result, drag-and-drop in the Qt Designer will NOT
+ work. We recommend that you enable XShape support by passing
+ the -xshape switch to $0.
+EOF
+fi
+
+#-------------------------------------------------------------------------------
+# check for platforms that we don't yet know about
+#-------------------------------------------------------------------------------
+if [ "$CFG_ARCH" = "generic" ]; then
+cat <<EOF
+
+ NOTICE: Atomic operations are not yet supported for this
+ architecture.
+
+ Qt will use the 'generic' architecture instead, which uses a
+ single pthread_mutex_t to protect all atomic operations. This
+ implementation is the slow (but safe) fallback implementation
+ for architectures Qt does not yet support.
+EOF
+fi
+
+#-------------------------------------------------------------------------------
+# check if the user passed the -no-zlib option, which is no longer supported
+#-------------------------------------------------------------------------------
+if [ -n "$ZLIB_FORCED" ]; then
+ which_zlib="supplied"
+ if [ "$CFG_ZLIB" = "system" ]; then
+ which_zlib="system"
+ fi
+
+cat <<EOF
+
+ NOTICE: The -no-zlib option was supplied but is no longer
+ supported.
+
+ Qt now requires zlib support in all builds, so the -no-zlib
+ option was ignored. Qt will be built using the $which_zlib
+ zlib.
+EOF
+fi
+
+#-------------------------------------------------------------------------------
+# finally save the executed command to another script
+#-------------------------------------------------------------------------------
+if [ `basename $0` != "config.status" ]; then
+ CONFIG_STATUS="$relpath/$relconf $OPT_CMDLINE"
+
+ # add the system variables
+ for varname in $SYSTEM_VARIABLES; do
+ cmd=`echo \
+'if [ -n "\$'${varname}'" ]; then
+ CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
+fi'`
+ eval "$cmd"
+ done
+
+ echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
+
+ [ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
+ echo "#!/bin/sh" > "$outpath/config.status"
+ echo "if [ \"\$#\" -gt 0 ]; then" >> "$outpath/config.status"
+ echo " $CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
+ echo "else" >> "$outpath/config.status"
+ echo " $CONFIG_STATUS" >> "$outpath/config.status"
+ echo "fi" >> "$outpath/config.status"
+ chmod +x "$outpath/config.status"
+fi
+
+if [ -n "$RPATH_MESSAGE" ]; then
+ echo
+ echo "$RPATH_MESSAGE"
+fi
+
+MAKE=`basename $MAKE`
+echo
+echo Qt is now configured for building. Just run \'$MAKE\'.
+if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
+ echo Once everything is built, Qt is installed.
+ echo You should not run \'$MAKE install\'.
+else
+ echo Once everything is built, you must run \'$MAKE install\'.
+ echo Qt will be installed into $QT_INSTALL_PREFIX
+fi
+echo
+echo To reconfigure, run \'$MAKE confclean\' and \'configure\'.
+echo
diff --git a/configure.exe b/configure.exe
new file mode 100644
index 0000000..54e8a60
--- /dev/null
+++ b/configure.exe
Binary files differ
diff --git a/demos/README b/demos/README
new file mode 100644
index 0000000..b161990
--- /dev/null
+++ b/demos/README
@@ -0,0 +1,39 @@
+These demonstrations are intended to highlight Qt's capabilities in different
+application areas, and provide examples that are more advanced than those in
+the examples directory.
+
+Beginners to Qt may wish to try out the Qt tutorial and some of the examples
+before examining the demonstrations in detail.
+
+
+The example launcher can be used to explore the different categories
+available. It provides an overview of each example, lets you view the
+documentation in Qt Assistant, and is able to launch examples.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/demos/affine/affine.pro b/demos/affine/affine.pro
new file mode 100644
index 0000000..b928753
--- /dev/null
+++ b/demos/affine/affine.pro
@@ -0,0 +1,23 @@
+SOURCES += main.cpp xform.cpp
+HEADERS += xform.h
+
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+SHARED_FOLDER = ../shared
+
+include($$SHARED_FOLDER/shared.pri)
+
+RESOURCES += affine.qrc
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/affine
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.jpg
+sources.path = $$[QT_INSTALL_DEMOS]/affine
+INSTALLS += target sources
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qjpeg
+}
diff --git a/demos/affine/affine.qrc b/demos/affine/affine.qrc
new file mode 100644
index 0000000..d8a7ae4
--- /dev/null
+++ b/demos/affine/affine.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/affine">
+ <file>xform.cpp</file>
+ <file>xform.html</file>
+ <file>bg1.jpg</file>
+</qresource>
+</RCC>
diff --git a/demos/affine/bg1.jpg b/demos/affine/bg1.jpg
new file mode 100644
index 0000000..dfc7cee
--- /dev/null
+++ b/demos/affine/bg1.jpg
Binary files differ
diff --git a/demos/affine/main.cpp b/demos/affine/main.cpp
new file mode 100644
index 0000000..88cd864
--- /dev/null
+++ b/demos/affine/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xform.h"
+
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(affine);
+
+ QApplication app(argc, argv);
+
+ XFormWidget xformWidget(0);
+ QStyle *arthurStyle = new ArthurStyle();
+ xformWidget.setStyle(arthurStyle);
+
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(&xformWidget);
+ foreach (QWidget *w, widgets)
+ w->setStyle(arthurStyle);
+
+ xformWidget.show();
+
+ return app.exec();
+}
diff --git a/demos/affine/xform.cpp b/demos/affine/xform.cpp
new file mode 100644
index 0000000..059e38e
--- /dev/null
+++ b/demos/affine/xform.cpp
@@ -0,0 +1,902 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xform.h"
+#include "hoverpoints.h"
+
+#include <QLayout>
+#include <QPainter>
+#include <QPainterPath>
+
+const int alpha = 155;
+
+XFormView::XFormView(QWidget *parent)
+ : ArthurFrame(parent)
+{
+ setAttribute(Qt::WA_MouseTracking);
+ m_type = VectorType;
+ m_rotation = 0.0;
+ m_scale = 1.0;
+ m_shear = 0.0;
+
+ m_pixmap = QPixmap(":res/affine/bg1.jpg");
+ pts = new HoverPoints(this, HoverPoints::CircleShape);
+ pts->setConnectionType(HoverPoints::LineConnection);
+ pts->setEditable(false);
+ pts->setPointSize(QSize(15, 15));
+ pts->setShapeBrush(QBrush(QColor(151, 0, 0, alpha)));
+ pts->setShapePen(QPen(QColor(255, 100, 50, alpha)));
+ pts->setConnectionPen(QPen(QColor(151, 0, 0, 50)));
+ pts->setBoundingRect(QRectF(0, 0, 500, 500));
+ ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
+ pts->setPoints(ctrlPoints);
+ connect(pts, SIGNAL(pointsChanged(const QPolygonF&)),
+ this, SLOT(updateCtrlPoints(const QPolygonF &)));
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+}
+
+XFormView::XFormType XFormView::type() const
+{
+ return m_type;
+}
+
+QPixmap XFormView::pixmap() const
+{
+ return m_pixmap;
+}
+
+QString XFormView::text() const
+{
+ return m_text;
+}
+
+void XFormView::setText(const QString &t)
+{
+ m_text = t;
+ update();
+}
+
+void XFormView::setPixmap(const QPixmap &p)
+{
+ m_pixmap = p;
+ update();
+}
+
+void XFormView::setType(XFormType t)
+{
+ m_type = t;
+ update();
+}
+
+void XFormView::mousePressEvent(QMouseEvent *)
+{
+ setDescriptionEnabled(false);
+}
+
+void XFormView::resizeEvent(QResizeEvent *e)
+{
+ pts->setBoundingRect(rect());
+ ArthurFrame::resizeEvent(e);
+}
+
+void XFormView::paint(QPainter *p)
+{
+ p->save();
+ p->setRenderHint(QPainter::Antialiasing);
+ p->setRenderHint(QPainter::SmoothPixmapTransform);
+ switch (m_type) {
+ case VectorType:
+ drawVectorType(p);
+ break;
+ case PixmapType:
+ drawPixmapType(p);
+ break;
+ case TextType:
+ drawTextType(p);
+ break;
+ }
+ p->restore();
+}
+
+void XFormView::updateCtrlPoints(const QPolygonF &points)
+{
+ QPointF trans = points.at(0) - ctrlPoints.at(0);
+
+ if (qAbs(points.at(0).x() - points.at(1).x()) < 10
+ && qAbs(points.at(0).y() - points.at(1).y()) < 10)
+ pts->setPoints(ctrlPoints);
+ if (!trans.isNull()) {
+ ctrlPoints[0] = points.at(0);
+ ctrlPoints[1] += trans;
+ pts->setPoints(ctrlPoints);
+ }
+ ctrlPoints = points;
+
+ QLineF line(ctrlPoints.at(0), ctrlPoints.at(1));
+ m_rotation = line.angle(QLineF(0, 0, 1, 0));
+ if (line.dy() < 0)
+ m_rotation = 360 - m_rotation;
+
+ if (trans.isNull())
+ emit rotationChanged(int(m_rotation*10));
+}
+
+void XFormView::setVectorType()
+{
+ m_type = VectorType;
+ update();
+}
+
+void XFormView::setPixmapType()
+{
+ m_type = PixmapType;
+ update();
+}
+
+void XFormView::setTextType()
+{
+ m_type = TextType;
+ update();
+}
+
+void XFormView::setAnimation(bool animate)
+{
+ timer.stop();
+ if (animate)
+ timer.start(25, this);
+}
+
+void XFormView::changeRotation(int r)
+{
+ setRotation(qreal(r) / 10);
+}
+
+void XFormView::changeScale(int s)
+{
+ setScale(qreal(s) / 1000);
+}
+
+void XFormView::changeShear(int s)
+{
+ setShear(qreal(s) / 1000);
+}
+
+void XFormView::setShear(qreal s)
+{
+ m_shear = s;
+ update();
+}
+
+void XFormView::setScale(qreal s)
+{
+ m_scale = s;
+ update();
+}
+
+void XFormView::setRotation(qreal r)
+{
+ qreal old_rot = m_rotation;
+ m_rotation = r;
+
+ QPointF center(pts->points().at(0));
+ QMatrix m;
+ m.translate(center.x(), center.y());
+ m.rotate(m_rotation - old_rot);
+ m.translate(-center.x(), -center.y());
+ pts->setPoints(pts->points() * m);
+
+ update();
+}
+
+void XFormView::timerEvent(QTimerEvent *e)
+{
+ if (e->timerId() == timer.timerId()) {
+ QPointF center(pts->points().at(0));
+ QMatrix m;
+ m.translate(center.x(), center.y());
+ m.rotate(0.2);
+ m.translate(-center.x(), -center.y());
+ pts->setPoints(pts->points() * m);
+
+ setUpdatesEnabled(false);
+ static qreal scale_inc = 0.003;
+ static qreal shear_inc = -0.001;
+ emit scaleChanged(int((m_scale + scale_inc) * 1000));
+ emit shearChanged(int((m_shear + shear_inc) * 1000));
+ if (m_scale >= 4.0 || m_scale <= 0.1)
+ scale_inc = -scale_inc;
+ if (m_shear >= 1.0 || m_shear <= -1.0)
+ shear_inc = -shear_inc;
+ setUpdatesEnabled(true);
+
+ pts->firePointChange();
+ }
+}
+
+void XFormView::wheelEvent(QWheelEvent *e)
+{
+ m_scale += e->delta() / qreal(600);
+ m_scale = qMax(qreal(0.1), qMin(qreal(4), m_scale));
+ emit scaleChanged(int(m_scale*1000));
+}
+
+void XFormView::reset()
+{
+ emit rotationChanged(0);
+ emit scaleChanged(1000);
+ emit shearChanged(0);
+ ctrlPoints = QPolygonF();
+ ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
+ pts->setPoints(ctrlPoints);
+ pts->firePointChange();
+}
+
+void XFormView::drawPixmapType(QPainter *painter)
+{
+ QPointF center(m_pixmap.width() / qreal(2), m_pixmap.height() / qreal(2));
+ painter->translate(ctrlPoints.at(0) - center);
+
+ painter->translate(center);
+ painter->rotate(m_rotation);
+ painter->scale(m_scale, m_scale);
+ painter->shear(0, m_shear);
+ painter->translate(-center);
+
+ painter->drawPixmap(QPointF(0, 0), m_pixmap);
+ painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25, Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawRect(QRectF(0, 0, m_pixmap.width(), m_pixmap.height()).adjusted(-2, -2, 2, 2));
+}
+
+void XFormView::drawTextType(QPainter *painter)
+{
+ QPainterPath path;
+ QFont f("times new roman,utopia");
+ f.setStyleStrategy(QFont::ForceOutline);
+ f.setPointSize(72);
+ f.setStyleHint(QFont::Times);
+ path.addText(0, 0, f, m_text);
+
+ QFontMetrics fm(f);
+ QRectF br(fm.boundingRect(m_text));
+ QPointF center(br.center());
+ painter->translate(ctrlPoints.at(0) - center);
+
+ painter->translate(center);
+ painter->rotate(m_rotation);
+ painter->scale(m_scale, m_scale);
+ painter->shear(0, m_shear);
+ painter->translate(-center);
+
+ painter->fillPath(path, Qt::black);
+
+ painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25, Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawRect(br.adjusted(-1, -1, 1, 1));
+}
+
+void XFormView::drawVectorType(QPainter *painter)
+{
+ QPainterPath path;
+ painter->translate(ctrlPoints.at(0) - QPointF(250,250));
+
+ painter->scale(0.77, 0.77);
+ painter->translate(98.9154 + 30 , -217.691 - 20);
+
+ QRect br(-55, 275, 500, 590);
+ QPoint center = br.center();
+ painter->translate(center.x(), center.y());
+ painter->rotate(m_rotation);
+ painter->scale(m_scale, m_scale);
+ painter->shear(0, m_shear);
+ painter->translate(-center.x(), -center.y());
+
+ painter->setPen(Qt::NoPen);
+ path.moveTo(120, 470);
+ path.lineTo(60+245, 470);
+ path.lineTo(60+245, 470+350);
+ path.lineTo(60, 470+350);
+ path.lineTo(60, 470+80);
+
+ painter->setBrush(Qt::white);
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor( 193, 193, 191, 255));
+ path.moveTo(329.336, 727.552);
+ path.cubicTo(QPointF(315.224, 726.328), QPointF(304.136, 715.816), QPointF(303.128, 694.936));
+ path.cubicTo(QPointF(306.368, 639.496), QPointF(309.608, 582.112), QPointF(271.232, 545.104));
+ path.cubicTo(QPointF(265.256, 499.024), QPointF(244.016, 482.104), QPointF(234.008, 452.512));
+ path.lineTo(218.24, 441.208);
+ path.lineTo(237.104, 411.688);
+ path.lineTo(245.168, 411.904);
+ path.lineTo(323.936, 571.168);
+ path.lineTo(340.424, 651.448);
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(136.232, 439.696);
+ path.cubicTo(QPointF(133.856, 455.248), QPointF(132.56, 470.512), QPointF(134.792, 485.272));
+ path.cubicTo(QPointF(118.376, 507.592), QPointF(105.92, 530.128), QPointF(104.48, 553.312));
+ path.cubicTo(QPointF(92.024, 586.504), QPointF(62.432, 614.584), QPointF(67.544, 680.104));
+ path.cubicTo(QPointF(84.176, 697.456), QPointF(107.432, 713.584), QPointF(127.376, 730.36));
+ path.cubicTo(QPointF(152.432, 751.312), QPointF(137.528, 778.96), QPointF(102.248, 772.408));
+ path.cubicTo(QPointF(94.4, 763.768), QPointF(76.616, 709.624), QPointF(42.92, 676.288));
+ path.lineTo(49.544, 632.584);
+ path.lineTo(81.368, 547.408);
+ path.lineTo(120.968, 484.048);
+ path.lineTo(125.36, 456.688);
+ path.lineTo(119.816, 386.776);
+ path.lineTo(124.424, 361.216);
+ path.lineTo(136.232, 439.696);
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(115.64, 341.416);
+ path.cubicTo(QPointF(116.576, 336.376), QPointF(117.8, 331.624), QPointF(119.312, 327.16));
+ path.lineTo(121.688, 342.784);
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(120.968, 500.464);
+ path.cubicTo(QPointF(108.368, 523.792), QPointF(103.976, 546.256), QPointF(132.92, 550.216));
+ path.cubicTo(QPointF(117.008, 553.888), QPointF(97.208, 568.648), QPointF(77.192, 593.488));
+ path.lineTo(77.624, 543.016);
+ path.lineTo(101.456, 503.272);
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(-33.256, 818.488);
+ path.cubicTo(QPointF(10.52, 838.144), QPointF(41.408, 837.064), QPointF(69.272, 850.96));
+ path.cubicTo(QPointF(91.304, 862.552), QPointF(113.552, 861.184), QPointF(126.944, 847.144));
+ path.cubicTo(QPointF(138.32, 832.456), QPointF(146.744, 831.736), QPointF(163.52, 830.224));
+ path.cubicTo(QPointF(190.952, 828.568), QPointF(217.736, 828.28), QPointF(241.928, 830.8));
+ path.lineTo(269.576, 833.032);
+ path.cubicTo(QPointF(269.072, 864.064), QPointF(328.04, 867.88), QPointF(345.392, 844.336));
+ path.cubicTo(QPointF(366.344, 819.424), QPointF(395.144, 808.264), QPointF(419.84, 790.192));
+ path.lineTo(289.304, 725.536);
+ path.cubicTo(QPointF(255.824, 806.464), QPointF(131.048, 827.632), QPointF(113.768, 763.264));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(286.424, 711.568);
+ path.cubicTo(QPointF(273.824, 711.496), QPointF(260.936, 715.6), QPointF(261.944, 732.16));
+ path.lineTo(266.192, 776.44);
+ path.lineTo(304.424, 756.64);
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(0, 0, 0, 255));
+ path.moveTo(-37.36, 821.224);
+ path.cubicTo(QPointF(7.136, 840.88), QPointF(38.6, 839.728), QPointF(66.968, 853.696));
+ path.cubicTo(QPointF(89.36, 865.216), QPointF(111.968, 863.92), QPointF(125.648, 849.808));
+ path.cubicTo(QPointF(137.24, 835.192), QPointF(145.808, 834.472), QPointF(162.872, 832.96));
+ path.cubicTo(QPointF(190.736, 831.232), QPointF(218.024, 831.016), QPointF(242.648, 833.464));
+ path.lineTo(270.728, 835.768);
+ path.cubicTo(QPointF(270.224, 866.8), QPointF(330.272, 870.544), QPointF(347.912, 847));
+ path.cubicTo(QPointF(369.224, 822.088), QPointF(398.528, 811), QPointF(423.656, 792.856));
+ path.lineTo(290.816, 728.272);
+ path.cubicTo(QPointF(256.76, 809.128), QPointF(129.824, 830.296), QPointF(112.256, 766));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(183, 114, 0, 255));
+ path.moveTo(382.328, 691.984);
+ path.cubicTo(QPointF(403.64, 698.968), QPointF(389.888, 720.28), QPointF(400.76, 732.52));
+ path.cubicTo(QPointF(405.44, 742.888), QPointF(415.304, 752.032), QPointF(431.792, 760.528));
+ path.cubicTo(QPointF(459.368, 774.424), QPointF(426.248, 799.336), QPointF(392.768, 812.08));
+ path.cubicTo(QPointF(351.944, 825.616), QPointF(344.024, 862.912), QPointF(299.312, 851.896));
+ path.cubicTo(QPointF(283.112, 846.496), QPointF(278.36, 831.808), QPointF(278.864, 809.128));
+ path.cubicTo(QPointF(284.264, 762.76), QPointF(277.784, 730.432), QPointF(278.792, 698.824));
+ path.cubicTo(QPointF(278.72, 686.152), QPointF(283.544, 684.64), QPointF(307.232, 687.952));
+ path.cubicTo(QPointF(310.04, 726.328), QPointF(352.376, 727.336), QPointF(382.328, 691.984));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(242, 183, 0, 255));
+ path.moveTo(339.632, 826.624);
+ path.cubicTo(QPointF(371.6, 814.312), QPointF(403.856, 798.112), QPointF(429.848, 782.128));
+ path.cubicTo(QPointF(437.84, 777.448), QPointF(438.92, 765.928), QPointF(427.688, 762.328));
+ path.cubicTo(QPointF(403.352, 748.504), QPointF(390.104, 731.224), QPointF(392.912, 708.76));
+ path.cubicTo(QPointF(393.344, 700.912), QPointF(383.696, 692.56), QPointF(381.104, 700.048));
+ path.cubicTo(QPointF(359.864, 771.472), QPointF(291.32, 767.656), QPointF(300.752, 696.952));
+ path.cubicTo(QPointF(301.256, 694.864), QPointF(301.76, 692.776), QPointF(302.264, 690.76));
+ path.cubicTo(QPointF(289.952, 688.24), QPointF(285.2, 690.976), QPointF(285.776, 700.408));
+ path.lineTo(295.28, 806.608);
+ path.cubicTo(QPointF(297.656, 830.8), QPointF(317.312, 836.128), QPointF(339.632, 826.624));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(0, 0, 0, 255));
+ path.moveTo(354.464, 537.544);
+ path.cubicTo(QPointF(379.16, 569.8), QPointF(404.432, 651.088), QPointF(384.416, 691.552));
+ path.cubicTo(QPointF(360.944, 737.776), QPointF(307.808, 743.248), QPointF(305.504, 695.8));
+ path.cubicTo(QPointF(308.816, 639.64), QPointF(311.984, 581.536), QPointF(273.68, 544.096));
+ path.cubicTo(QPointF(267.704, 497.368), QPointF(246.392, 480.232), QPointF(236.384, 450.28));
+ path.lineTo(203.12, 426.088);
+ path.lineTo(133.568, 435.088);
+ path.cubicTo(QPointF(130.76, 452.152), QPointF(129.104, 468.784), QPointF(131.552, 484.912));
+ path.cubicTo(QPointF(115.064, 507.376), QPointF(102.608, 530.056), QPointF(101.168, 553.312));
+ path.cubicTo(QPointF(88.712, 586.648), QPointF(59.12, 614.944), QPointF(64.232, 680.752));
+ path.cubicTo(QPointF(80.864, 698.248), QPointF(104.12, 714.448), QPointF(124.064, 731.296));
+ path.cubicTo(QPointF(149.12, 752.392), QPointF(135.512, 776.296), QPointF(100.232, 769.672));
+ path.cubicTo(QPointF(78.848, 746.056), QPointF(56.744, 722.872), QPointF(35.288, 699.328));
+ path.cubicTo(QPointF(12.392, 683.056), QPointF(3.896, 662.176), QPointF(27.368, 630.496));
+ path.cubicTo(QPointF(43.424, 609.04), QPointF(47.96, 562.456), QPointF(62, 543.664));
+ path.cubicTo(QPointF(74.312, 525.16), QPointF(92.24, 508.6), QPointF(105.272, 490.096));
+ path.cubicTo(QPointF(112.184, 477.928), QPointF(114.344, 468.568), QPointF(113.264, 454.456));
+ path.lineTo(110.312, 369.136);
+ path.cubicTo(QPointF(108.368, 307.216), QPointF(142.424, 274.24), QPointF(189.8, 275.248));
+ path.cubicTo(QPointF(243.512, 275.752), QPointF(287.576, 312.472), QPointF(288.152, 378.28));
+ path.cubicTo(QPointF(292.688, 410.32), QPointF(283.256, 428.68), QPointF(308.672, 474.472));
+ path.cubicTo(QPointF(334.52, 522.712), QPointF(338.552, 520.12), QPointF(354.464, 537.544));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(261.296, 503.632);
+ path.lineTo(263.528, 512.2);
+ path.cubicTo(QPointF(257.696, 501.688), QPointF(250.712, 483.616), QPointF(241.928, 475.696));
+ path.cubicTo(QPointF(239.264, 473.536), QPointF(235.808, 473.608), QPointF(233.72, 475.624));
+ path.cubicTo(QPointF(222.056, 486.928), QPointF(193.112, 510.112), QPointF(169.928, 507.088));
+ path.cubicTo(QPointF(152.072, 505.288), QPointF(134.648, 493.264), QPointF(130.832, 480.232));
+ path.cubicTo(QPointF(128.816, 470.872), QPointF(129.752, 463.168), QPointF(130.976, 455.32));
+ path.lineTo(240.704, 453.52);
+ path.cubicTo(QPointF(238.472, 463.168), QPointF(253.088, 487), QPointF(261.296, 503.632));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(143.144, 363.232);
+ path.cubicTo(QPointF(154.088, 363.232), QPointF(163.88, 376.84), QPointF(163.808, 395.632));
+ path.cubicTo(QPointF(163.736, 408.232), QPointF(155.528, 411.472), QPointF(149.336, 417.016));
+ path.cubicTo(QPointF(146.6, 419.536), QPointF(145.952, 433.144), QPointF(142.568, 433.144));
+ path.cubicTo(QPointF(131.696, 433.144), QPointF(123.488, 413.776), QPointF(123.488, 395.632));
+ path.cubicTo(QPointF(123.488, 377.56), QPointF(132.272, 363.232), QPointF(143.144, 363.232));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(255, 255, 255, 255));
+ path.moveTo(144.368, 375.04);
+ path.cubicTo(QPointF(154.088, 375.04), QPointF(160.856, 379.936), QPointF(161.648, 391.312));
+ path.cubicTo(QPointF(162.224, 399.16), QPointF(160.136, 411.76), QPointF(154.664, 414.424));
+ path.cubicTo(QPointF(152.144, 415.648), QPointF(143.432, 426.664), QPointF(140.408, 426.52));
+ path.cubicTo(QPointF(128.096, 425.944), QPointF(125, 402.112), QPointF(125.936, 390.736));
+ path.cubicTo(QPointF(126.8, 379.36), QPointF(134.72, 375.04), QPointF(144.368, 375.04));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(0, 0, 0, 255));
+ path.moveTo(141.848, 382.672);
+ path.cubicTo(QPointF(148.544, 382.096), QPointF(154.736, 389.728), QPointF(155.6, 399.664));
+ path.cubicTo(QPointF(156.464, 409.6), QPointF(151.64, 418.24), QPointF(144.944, 418.816));
+ path.cubicTo(QPointF(138.248, 419.392), QPointF(132.056, 411.76), QPointF(131.192, 401.752));
+ path.cubicTo(QPointF(130.328, 391.816), QPointF(135.152, 383.248), QPointF(141.848, 382.672));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(151.064, 397.288);
+ path.cubicTo(QPointF(151.424, 399.088), QPointF(149.408, 400.024), QPointF(148.832, 398.224));
+ path.cubicTo(QPointF(148.256, 395.992), QPointF(146.888, 393.328), QPointF(145.088, 391.168));
+ path.cubicTo(QPointF(143.936, 389.872), QPointF(145.088, 388.432), QPointF(146.528, 389.44));
+ path.cubicTo(QPointF(149.048, 391.528), QPointF(150.488, 394.12), QPointF(151.064, 397.288));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(216.944, 360.712);
+ path.cubicTo(QPointF(232.712, 360.712), QPointF(245.6, 377.416), QPointF(245.6, 397.792));
+ path.cubicTo(QPointF(245.6, 418.24), QPointF(232.712, 434.872), QPointF(216.944, 434.872));
+ path.cubicTo(QPointF(201.176, 434.872), QPointF(188.432, 418.24), QPointF(188.432, 397.792));
+ path.cubicTo(QPointF(188.432, 377.416), QPointF(201.176, 360.712), QPointF(216.944, 360.712));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(255, 255, 255, 255));
+ path.moveTo(224.792, 374.968);
+ path.cubicTo(QPointF(235.664, 378.856), QPointF(241.928, 387.424), QPointF(242.72, 396.568));
+ path.cubicTo(QPointF(243.656, 407.08), QPointF(239.408, 418.96), QPointF(230.264, 425.944));
+ path.cubicTo(QPointF(227.672, 427.888), QPointF(197.72, 416.08), QPointF(195.992, 411.616));
+ path.cubicTo(QPointF(193.4, 405.208), QPointF(191.816, 392.896), QPointF(193.76, 385.624));
+ path.cubicTo(QPointF(194.552, 382.744), QPointF(197.216, 378.568), QPointF(201.176, 376.336));
+ path.cubicTo(QPointF(207.44, 372.808), QPointF(216.656, 372.088), QPointF(224.792, 374.968));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(0, 0, 0, 255));
+ path.moveTo(216.872, 380.944);
+ path.cubicTo(QPointF(225.584, 380.944), QPointF(232.712, 389.296), QPointF(232.712, 399.448));
+ path.cubicTo(QPointF(232.712, 409.672), QPointF(225.584, 418.024), QPointF(216.872, 418.024));
+ path.cubicTo(QPointF(208.16, 418.024), QPointF(201.032, 409.672), QPointF(201.032, 399.448));
+ path.cubicTo(QPointF(201.032, 389.296), QPointF(208.16, 380.944), QPointF(216.872, 380.944));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(227.096, 392.392);
+ path.cubicTo(QPointF(228.104, 394.048), QPointF(226.448, 395.776), QPointF(225.224, 394.12));
+ path.cubicTo(QPointF(223.784, 392.104), QPointF(221.408, 389.944), QPointF(218.888, 388.432));
+ path.cubicTo(QPointF(217.232, 387.568), QPointF(217.808, 385.624), QPointF(219.68, 386.2));
+ path.cubicTo(QPointF(222.92, 387.28), QPointF(225.368, 389.368), QPointF(227.096, 392.392));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(183, 114, 0, 255));
+ path.moveTo(164.96, 404.488);
+ path.cubicTo(QPointF(172.376, 402.328), QPointF(184.112, 403.048), QPointF(192.248, 404.632));
+ path.cubicTo(QPointF(200.384, 406.792), QPointF(222.056, 418.24), QPointF(245.024, 430.696));
+ path.cubicTo(QPointF(247.976, 432.208), QPointF(248.84, 437.104), QPointF(245.024, 438.688));
+ path.cubicTo(QPointF(239.12, 439.12), QPointF(249.272, 453.664), QPointF(238.904, 458.848));
+ path.cubicTo(QPointF(223.352, 462.88), QPointF(198.44, 485.992), QPointF(186.128, 487.864));
+ path.cubicTo(QPointF(179.288, 489.376), QPointF(172.232, 489.592), QPointF(164.6, 487.864));
+ path.cubicTo(QPointF(140.552, 482.968), QPointF(134.216, 455.608), QPointF(122.912, 450.064));
+ path.cubicTo(QPointF(119.816, 446.824), QPointF(121.4, 441.208), QPointF(122.408, 440.056));
+ path.cubicTo(QPointF(123.632, 434.224), QPointF(149.696, 406.216), QPointF(164.96, 404.488));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(242, 183, 0, 255));
+ path.moveTo(185.408, 405.856);
+ path.cubicTo(QPointF(198.44, 407.296), QPointF(226.088, 423.928), QPointF(239.408, 430.624));
+ path.cubicTo(QPointF(242.72, 432.424), QPointF(242.504, 437.824), QPointF(239.552, 438.688));
+ path.cubicTo(QPointF(236.384, 440.488), QPointF(235.448, 438.256), QPointF(232.928, 437.896));
+ path.cubicTo(QPointF(228.896, 435.736), QPointF(222.272, 440.92), QPointF(217.016, 444.88));
+ path.cubicTo(QPointF(186.704, 467.776), QPointF(180.656, 465.256), QPointF(156.176, 462.664));
+ path.cubicTo(QPointF(147.68, 460.576), QPointF(142.136, 457.984), QPointF(139.688, 455.968));
+ path.cubicTo(QPointF(141.488, 445.888), QPointF(160.496, 407.656), QPointF(166.76, 406.792));
+ path.cubicTo(QPointF(168.344, 404.704), QPointF(179.936, 404.632), QPointF(185.408, 405.856));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(183, 114, 0, 255));
+ path.moveTo(190.664, 412.048);
+ path.lineTo(193.76, 413.416);
+ path.cubicTo(QPointF(196.064, 414.712), QPointF(193.256, 418.168), QPointF(190.736, 417.088));
+ path.lineTo(186.2, 415.504);
+ path.cubicTo(QPointF(183.536, 413.272), QPointF(186.704, 410.104), QPointF(190.664, 412.048));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(268.568, 452.368);
+ path.cubicTo(QPointF(273.032, 454.384), QPointF(279.224, 457.192), QPointF(282.536, 460.144));
+ path.cubicTo(QPointF(285.488, 464.104), QPointF(286.784, 468.064), QPointF(286.424, 472.024));
+ path.cubicTo(QPointF(285.776, 474.544), QPointF(284.12, 476.344), QPointF(281.24, 477.424));
+ path.cubicTo(QPointF(277.856, 478.216), QPointF(273.68, 477.424), QPointF(271.376, 474.112));
+ path.cubicTo(QPointF(269.864, 471.448), QPointF(265.256, 462.16), QPointF(263.96, 460.576));
+ path.cubicTo(QPointF(262.232, 457.12), QPointF(261.944, 454.456), QPointF(262.88, 452.368));
+ path.cubicTo(QPointF(264.032, 451.288), QPointF(266.048, 451), QPointF(268.568, 452.368));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(255, 255, 255, 255));
+ path.moveTo(273.752, 461.584);
+ path.cubicTo(QPointF(275.48, 462.376), QPointF(277.928, 463.456), QPointF(279.224, 464.68));
+ path.cubicTo(QPointF(280.376, 466.264), QPointF(280.88, 467.776), QPointF(280.736, 469.36));
+ path.cubicTo(QPointF(280.52, 470.296), QPointF(279.8, 471.016), QPointF(278.72, 471.448));
+ path.cubicTo(QPointF(277.352, 471.808), QPointF(275.768, 471.448), QPointF(274.832, 470.152));
+ path.cubicTo(QPointF(274.256, 469.144), QPointF(272.456, 465.472), QPointF(271.952, 464.824));
+ path.cubicTo(QPointF(271.232, 463.456), QPointF(271.088, 462.448), QPointF(271.448, 461.584));
+ path.cubicTo(QPointF(271.952, 461.152), QPointF(272.744, 461.08), QPointF(273.752, 461.584));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(238.616, 358.552);
+ path.cubicTo(QPointF(239.048, 359.2), QPointF(238.976, 359.776), QPointF(238.4, 360.28));
+ path.cubicTo(QPointF(237.896, 360.784), QPointF(237.176, 360.712), QPointF(236.24, 360.208));
+ path.lineTo(231.632, 356.248);
+ path.cubicTo(QPointF(231.056, 355.744), QPointF(230.912, 354.952), QPointF(231.272, 354.088));
+ path.cubicTo(QPointF(232.28, 353.44), QPointF(233.144, 353.44), QPointF(233.936, 354.088));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(235.592, 305.992);
+ path.cubicTo(QPointF(239.624, 308.224), QPointF(240.848, 313.912), QPointF(238.184, 318.592));
+ path.cubicTo(QPointF(235.592, 323.2), QPointF(230.12, 325.144), QPointF(226.016, 322.84));
+ path.cubicTo(QPointF(221.984, 320.536), QPointF(220.76, 314.92), QPointF(223.424, 310.24));
+ path.cubicTo(QPointF(226.016, 305.56), QPointF(231.488, 303.688), QPointF(235.592, 305.992));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(374.912, 680.536);
+ path.cubicTo(QPointF(378.296, 683.128), QPointF(373.256, 687.376), QPointF(371.024, 686.296));
+ path.cubicTo(QPointF(369.152, 685.648), QPointF(367.784, 683.488), QPointF(366.92, 682.408));
+ path.cubicTo(QPointF(366.128, 681.184), QPointF(366.2, 679.168), QPointF(366.92, 678.448));
+ path.cubicTo(QPointF(367.712, 677.44), QPointF(369.728, 677.656), QPointF(371.024, 678.52));
+ path.cubicTo(QPointF(372.32, 679.168), QPointF(373.616, 679.888), QPointF(374.912, 680.536));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(297.44, 551.512);
+ path.cubicTo(QPointF(338.984, 572.896), QPointF(350, 611.56), QPointF(332.072, 664.192));
+ path.cubicTo(QPointF(330.992, 666.64), QPointF(334.16, 668.368), QPointF(335.24, 666.064));
+ path.cubicTo(QPointF(354.824, 610.336), QPointF(341.432, 571.312), QPointF(299.024, 548.56));
+ path.cubicTo(QPointF(296.864, 547.552), QPointF(295.28, 550.432), QPointF(297.44, 551.512));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(72.008, 569.512);
+ path.cubicTo(QPointF(38.312, 627.256), QPointF(38.096, 662.68), QPointF(62.504, 681.328));
+ path.cubicTo(QPointF(63.728, 682.264), QPointF(64.448, 680.032), QPointF(63.296, 679.168));
+ path.cubicTo(QPointF(36.296, 655.48), QPointF(48.896, 615.52), QPointF(74.168, 570.88));
+ path.cubicTo(QPointF(74.888, 569.584), QPointF(72.512, 568.432), QPointF(72.008, 569.512));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(289.376, 586.864);
+ path.cubicTo(QPointF(289.232, 589.168), QPointF(288.368, 589.528), QPointF(286.424, 587.368));
+ path.cubicTo(QPointF(279.8, 575.848), QPointF(235.088, 551.44), QPointF(213.344, 548.704));
+ path.cubicTo(QPointF(209.24, 547.264), QPointF(209.456, 545.392), QPointF(213.488, 544.816));
+ path.cubicTo(QPointF(229.184, 544.816), QPointF(241.28, 537.904), QPointF(254.96, 537.904));
+ path.cubicTo(QPointF(258.704, 538.048), QPointF(262.304, 539.488), QPointF(264.392, 541.648));
+ path.cubicTo(QPointF(269.504, 544.96), QPointF(288.08, 570.592), QPointF(289.376, 586.864));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(180.152, 546.832);
+ path.cubicTo(QPointF(180.872, 550.792), QPointF(163.808, 545.68), QPointF(164.744, 556.696));
+ path.cubicTo(QPointF(165.032, 559.72), QPointF(160.496, 561.376), QPointF(160.64, 556.696));
+ path.cubicTo(QPointF(160.64, 548.272), QPointF(161.072, 548.416), QPointF(152.72, 546.832));
+ path.cubicTo(QPointF(151.208, 546.76), QPointF(151.352, 544.528), QPointF(152.72, 544.816));
+ path.lineTo(152.72, 544.816);
+ path.cubicTo(QPointF(158.696, 546.472), QPointF(166.76, 542.872), QPointF(166.4, 538.84));
+ path.cubicTo(QPointF(166.256, 537.472), QPointF(168.56, 537.688), QPointF(168.488, 538.84));
+ path.cubicTo(QPointF(167.984, 545.248), QPointF(181.664, 542.152), QPointF(180.152, 546.832));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(193, 193, 191, 255));
+ path.moveTo(151.568, 705.376);
+ path.cubicTo(QPointF(151.64, 708.328), QPointF(148.76, 707.68), QPointF(148.544, 705.592));
+ path.cubicTo(QPointF(140.192, 680.536), QPointF(143.72, 618.832), QPointF(151.856, 598.96));
+ path.cubicTo(QPointF(152.432, 596.08), QPointF(156.248, 596.944), QPointF(155.744, 598.96));
+ path.cubicTo(QPointF(147.104, 635.464), QPointF(147.248, 673.048), QPointF(151.568, 705.376));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(183, 114, 0, 255));
+ path.moveTo(51.704, 684.424);
+ path.cubicTo(QPointF(75.68, 707.824), QPointF(91.376, 743.248), QPointF(114.632, 775.288));
+ path.cubicTo(QPointF(148.472, 816.04), QPointF(121.472, 858.304), QPointF(66.464, 845.56));
+ path.cubicTo(QPointF(38.888, 835.192), QPointF(-0.784, 836.344), QPointF(-32.68, 825.832));
+ path.cubicTo(QPointF(-55.072, 820.36), QPointF(-55.864, 809.272), QPointF(-44.416, 787.6));
+ path.cubicTo(QPointF(-40.384, 773.776), QPointF(-40.024, 751.312), QPointF(-43.768, 732.592));
+ path.cubicTo(QPointF(-45.784, 718.408), QPointF(-39.232, 710.488), QPointF(-24.112, 708.832));
+ path.lineTo(-24.112, 708.832);
+ path.cubicTo(QPointF(-11.296, 708.688), QPointF(6.56, 713.872), QPointF(16.28, 686.44));
+ path.cubicTo(QPointF(23.552, 673.336), QPointF(40.976, 672.976), QPointF(51.704, 684.424));
+ path.closeSubpath();
+ painter->drawPath(path);
+ path = QPainterPath();
+
+ painter->setBrush(QColor(242, 183, 0, 255));
+ path.moveTo(24.632, 699.04);
+ path.cubicTo(QPointF(23.84, 680.968), QPointF(39.32, 677.296), QPointF(49.688, 688.312));
+ path.cubicTo(QPointF(68.192, 710.992), QPointF(85.112, 736.048), QPointF(100.376, 764.992));
+ path.cubicTo(QPointF(124.712, 804.16), QPointF(104.624, 842.68), QPointF(67.904, 828.064));
+ path.cubicTo(QPointF(49.688, 817.84), QPointF(6.128, 813.304), QPointF(-17.344, 809.128));
+ path.cubicTo(QPointF(-33.04, 807.832), QPointF(-35.128, 797.608), QPointF(-29.152, 791.848));
+ path.cubicTo(QPointF(-20.944, 782.416), QPointF(-20.08, 759.808), QPointF(-27.856, 740.512));
+ path.cubicTo(QPointF(-35.56, 728.56), QPointF(-21.088, 715.384), QPointF(-9.712, 720.856));
+ path.cubicTo(QPointF(0.8, 727.048), QPointF(25.64, 713.08), QPointF(24.632, 699.04));
+ path.closeSubpath();
+ painter->drawPath(path);
+
+ painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25, Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawRect(br.adjusted(-1, -1, 1, 1));
+}
+
+
+XFormWidget::XFormWidget(QWidget *parent)
+ : QWidget(parent), textEditor(new QLineEdit)
+{
+ setWindowTitle(tr("Affine Transformations"));
+
+ view = new XFormView(this);
+ view->setMinimumSize(200, 200);
+
+ QGroupBox *mainGroup = new QGroupBox(this);
+ mainGroup->setFixedWidth(180);
+ mainGroup->setTitle(tr("Affine Transformations"));
+
+ QGroupBox *rotateGroup = new QGroupBox(mainGroup);
+ rotateGroup->setTitle(tr("Rotate"));
+ QSlider *rotateSlider = new QSlider(Qt::Horizontal, rotateGroup);
+ rotateSlider->setRange(0, 3600);
+ rotateSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *scaleGroup = new QGroupBox(mainGroup);
+ scaleGroup->setTitle(tr("Scale"));
+ QSlider *scaleSlider = new QSlider(Qt::Horizontal, scaleGroup);
+ scaleSlider->setRange(1, 4000);
+ scaleSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *shearGroup = new QGroupBox(mainGroup);
+ shearGroup->setTitle(tr("Shear"));
+ QSlider *shearSlider = new QSlider(Qt::Horizontal, shearGroup);
+ shearSlider->setRange(-990, 990);
+ shearSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *typeGroup = new QGroupBox(mainGroup);
+ typeGroup->setTitle(tr("Type"));
+ QRadioButton *vectorType = new QRadioButton(typeGroup);
+ QRadioButton *pixmapType = new QRadioButton(typeGroup);
+ QRadioButton *textType= new QRadioButton(typeGroup);
+ vectorType->setText(tr("Vector Image"));
+ pixmapType->setText(tr("Pixmap"));
+ textType->setText(tr("Text"));
+
+ QPushButton *resetButton = new QPushButton(mainGroup);
+ resetButton->setText(tr("Reset Transform"));
+
+ QPushButton *animateButton = new QPushButton(mainGroup);
+ animateButton->setText(tr("Animate"));
+ animateButton->setCheckable(true);
+
+ QPushButton *showSourceButton = new QPushButton(mainGroup);
+ showSourceButton->setText(tr("Show Source"));
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(view->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+ QPushButton *whatsThisButton = new QPushButton(mainGroup);
+ whatsThisButton->setText(tr("What's This?"));
+ whatsThisButton->setCheckable(true);
+
+ QHBoxLayout *viewLayout = new QHBoxLayout(this);
+ viewLayout->addWidget(view);
+ viewLayout->addWidget(mainGroup);
+
+ QVBoxLayout *rotateGroupLayout = new QVBoxLayout(rotateGroup);
+ rotateGroupLayout->addWidget(rotateSlider);
+
+ QVBoxLayout *scaleGroupLayout = new QVBoxLayout(scaleGroup);
+ scaleGroupLayout->addWidget(scaleSlider);
+
+ QVBoxLayout *shearGroupLayout = new QVBoxLayout(shearGroup);
+ shearGroupLayout->addWidget(shearSlider);
+
+ QVBoxLayout *typeGroupLayout = new QVBoxLayout(typeGroup);
+ typeGroupLayout->addWidget(vectorType);
+ typeGroupLayout->addWidget(pixmapType);
+ typeGroupLayout->addWidget(textType);
+ typeGroupLayout->addSpacing(4);
+ typeGroupLayout->addWidget(textEditor);
+
+ QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
+ mainGroupLayout->addWidget(rotateGroup);
+ mainGroupLayout->addWidget(scaleGroup);
+ mainGroupLayout->addWidget(shearGroup);
+ mainGroupLayout->addWidget(typeGroup);
+ mainGroupLayout->addStretch(1);
+ mainGroupLayout->addWidget(resetButton);
+ mainGroupLayout->addWidget(animateButton);
+ mainGroupLayout->addWidget(showSourceButton);
+#ifdef QT_OPENGL_SUPPORT
+ mainGroupLayout->addWidget(enableOpenGLButton);
+#endif
+ mainGroupLayout->addWidget(whatsThisButton);
+
+ connect(rotateSlider, SIGNAL(valueChanged(int)), view, SLOT(changeRotation(int)));
+ connect(shearSlider, SIGNAL(valueChanged(int)), view, SLOT(changeShear(int)));
+ connect(scaleSlider, SIGNAL(valueChanged(int)), view, SLOT(changeScale(int)));
+
+ connect(vectorType, SIGNAL(clicked()), view, SLOT(setVectorType()));
+ connect(pixmapType, SIGNAL(clicked()), view, SLOT(setPixmapType()));
+ connect(textType, SIGNAL(clicked()), view, SLOT(setTextType()));
+ connect(textType, SIGNAL(toggled(bool)), textEditor, SLOT(setEnabled(bool)));
+ connect(textEditor, SIGNAL(textChanged(QString)), view, SLOT(setText(QString)));
+
+ connect(view, SIGNAL(rotationChanged(int)), rotateSlider, SLOT(setValue(int)));
+ connect(view, SIGNAL(scaleChanged(int)), scaleSlider, SLOT(setValue(int)));
+ connect(view, SIGNAL(shearChanged(int)), shearSlider, SLOT(setValue(int)));
+
+ connect(resetButton, SIGNAL(clicked()), view, SLOT(reset()));
+ connect(animateButton, SIGNAL(clicked(bool)), view, SLOT(setAnimation(bool)));
+ connect(whatsThisButton, SIGNAL(clicked(bool)), view, SLOT(setDescriptionEnabled(bool)));
+ connect(whatsThisButton, SIGNAL(clicked(bool)), view->hoverPoints(), SLOT(setDisabled(bool)));
+ connect(view, SIGNAL(descriptionEnabledChanged(bool)), view->hoverPoints(), SLOT(setDisabled(bool)));
+ connect(view, SIGNAL(descriptionEnabledChanged(bool)), whatsThisButton, SLOT(setChecked(bool)));
+ connect(showSourceButton, SIGNAL(clicked()), view, SLOT(showSource()));
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), view, SLOT(enableOpenGL(bool)));
+#endif
+ view->loadSourceFile(":res/affine/xform.cpp");
+ view->loadDescription(":res/affine/xform.html");
+
+ // defaults
+ view->reset();
+ vectorType->setChecked(true);
+ textEditor->setText("Qt Software");
+ textEditor->setEnabled(false);
+
+ animateButton->animateClick();
+}
diff --git a/demos/affine/xform.h b/demos/affine/xform.h
new file mode 100644
index 0000000..f33e63d
--- /dev/null
+++ b/demos/affine/xform.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XFORM_H
+#define XFORM_H
+
+#include "arthurwidgets.h"
+
+#include <QBasicTimer>
+#include <QPolygonF>
+
+class HoverPoints;
+QT_FORWARD_DECLARE_CLASS(QLineEdit)
+
+class XFormView : public ArthurFrame
+{
+public:
+ Q_OBJECT
+
+ Q_PROPERTY(XFormType type READ type WRITE setType)
+ Q_PROPERTY(bool animation READ animation WRITE setAnimation)
+ Q_PROPERTY(qreal shear READ shear WRITE setShear)
+ Q_PROPERTY(qreal rotation READ rotation WRITE setRotation)
+ Q_PROPERTY(qreal scale READ scale WRITE setScale)
+ Q_PROPERTY(QString text READ text WRITE setText)
+ Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
+ Q_ENUMS(XFormType)
+
+public:
+ enum XFormType { VectorType, PixmapType, TextType };
+
+ XFormView(QWidget *parent);
+ void paint(QPainter *);
+ void drawVectorType(QPainter *painter);
+ void drawPixmapType(QPainter *painter);
+ void drawTextType(QPainter *painter);
+ QSize sizeHint() const { return QSize(500, 500); }
+
+ void mousePressEvent(QMouseEvent *e);
+ void resizeEvent(QResizeEvent *e);
+ HoverPoints *hoverPoints() { return pts; }
+
+ bool animation() const { return timer.isActive(); }
+ qreal shear() const { return m_shear; }
+ qreal scale() const { return m_scale; }
+ qreal rotation() const { return m_rotation; }
+ void setShear(qreal s);
+ void setScale(qreal s);
+ void setRotation(qreal r);
+
+ XFormType type() const;
+ QPixmap pixmap() const;
+ QString text() const;
+
+public slots:
+ void setAnimation(bool animate);
+ void updateCtrlPoints(const QPolygonF &);
+ void changeRotation(int rotation);
+ void changeScale(int scale);
+ void changeShear(int shear);
+
+ void setText(const QString &);
+ void setPixmap(const QPixmap &);
+ void setType(XFormType t);
+
+ void setVectorType();
+ void setPixmapType();
+ void setTextType();
+ void reset();
+
+signals:
+ void rotationChanged(int rotation);
+ void scaleChanged(int scale);
+ void shearChanged(int shear);
+
+protected:
+ void timerEvent(QTimerEvent *e);
+ void wheelEvent(QWheelEvent *);
+
+private:
+ QPolygonF ctrlPoints;
+ HoverPoints *pts;
+ qreal m_rotation;
+ qreal m_scale;
+ qreal m_shear;
+ XFormType m_type;
+ QPixmap m_pixmap;
+ QString m_text;
+ QBasicTimer timer;
+};
+
+class XFormWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ XFormWidget(QWidget *parent);
+
+private:
+ XFormView *view;
+ QLineEdit *textEditor;
+};
+
+#endif // XFORM_H
diff --git a/demos/affine/xform.html b/demos/affine/xform.html
new file mode 100644
index 0000000..17325ac
--- /dev/null
+++ b/demos/affine/xform.html
@@ -0,0 +1,23 @@
+<html>
+<center>
+<h2>Affine Transformations</h2>
+</center>
+
+<p>In this demo we demonstrate Qt's ability to perform affine transformations
+on painting operations.</p>
+
+<p>Transformations can be performed on any kind of graphics drawn using
+QPainter. The transformations used to display the vector graphics, images,
+and text can be adjusted in the following ways:</p>
+
+<ul>
+ <li>Dragging the red circle in the centre of each drawing moves it to a new
+ position.</li>
+ <li>Dragging the displaced red circle causes the current drawing to be
+ rotated about the central circle. Rotation can also be controlled with
+ the <b>Rotate</b> slider.</li>
+ <li>Scaling is controlled with the <b>Scale</b> slider.</li>
+ <li>Each drawing can be sheared with the <b>Shear</b> slider.</li>
+</ul>
+
+</html>
diff --git a/demos/arthurplugin/arthur_plugin.qrc b/demos/arthurplugin/arthur_plugin.qrc
new file mode 100644
index 0000000..e5170e6
--- /dev/null
+++ b/demos/arthurplugin/arthur_plugin.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/trolltech/arthurplugin">
+ <file>bg1.jpg</file>
+ <file>flower.jpg</file>
+ <file>flower_alpha.jpg</file>
+</qresource>
+</RCC>
diff --git a/demos/arthurplugin/arthurplugin.pro b/demos/arthurplugin/arthurplugin.pro
new file mode 100644
index 0000000..e9eb1f3
--- /dev/null
+++ b/demos/arthurplugin/arthurplugin.pro
@@ -0,0 +1,51 @@
+
+QTDIR = $$QT_SOURCE_TREE
+
+CONFIG += designer plugin
+TEMPLATE = lib
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+SHARED_FOLDER = ../shared
+include(../shared/shared.pri)
+
+DEMO_DEFORM_DIR = ../deform
+DEMO_AFFINE_DIR = ../affine
+DEMO_GRADIENT_DIR = ../gradients
+DEMO_STROKE_DIR = ../pathstroke
+DEMO_COMPOSITION_DIR = ../composition
+
+INCLUDEPATH += $$DEMO_DEFORM_DIR $$DEMO_AFFINE_DIR $$DEMO_GRADIENT_DIR $$DEMO_STROKE_DIR $$DEMO_COMPOSITION_DIR
+
+SOURCES = plugin.cpp \
+ $$DEMO_COMPOSITION_DIR/composition.cpp \
+ $$DEMO_AFFINE_DIR/xform.cpp \
+ $$DEMO_DEFORM_DIR/pathdeform.cpp \
+ $$DEMO_GRADIENT_DIR/gradients.cpp \
+ $$DEMO_STROKE_DIR/pathstroke.cpp \
+
+
+HEADERS = \
+ $$DEMO_COMPOSITION_DIR/composition.h \
+ $$DEMO_AFFINE_DIR/xform.h \
+ $$DEMO_DEFORM_DIR/pathdeform.h \
+ $$DEMO_GRADIENT_DIR/gradients.h \
+ $$DEMO_STROKE_DIR/pathstroke.h \
+
+RESOURCES += arthur_plugin.qrc
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg *.png
+sources.path = $$[QT_INSTALL_DEMOS]/arthurplugin
+INSTALLS += target sources
+
+win32-msvc* {
+ QMAKE_CFLAGS += /Zm500
+ QMAKE_CXXFLAGS += /Zm500
+}
+
diff --git a/demos/arthurplugin/bg1.jpg b/demos/arthurplugin/bg1.jpg
new file mode 100644
index 0000000..dfc7cee
--- /dev/null
+++ b/demos/arthurplugin/bg1.jpg
Binary files differ
diff --git a/demos/arthurplugin/flower.jpg b/demos/arthurplugin/flower.jpg
new file mode 100644
index 0000000..f8e022c
--- /dev/null
+++ b/demos/arthurplugin/flower.jpg
Binary files differ
diff --git a/demos/arthurplugin/flower_alpha.jpg b/demos/arthurplugin/flower_alpha.jpg
new file mode 100644
index 0000000..6a3c2a0
--- /dev/null
+++ b/demos/arthurplugin/flower_alpha.jpg
Binary files differ
diff --git a/demos/arthurplugin/plugin.cpp b/demos/arthurplugin/plugin.cpp
new file mode 100644
index 0000000..c26aae7
--- /dev/null
+++ b/demos/arthurplugin/plugin.cpp
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner/QDesignerContainerExtension>
+#include <QtDesigner/QDesignerCustomWidgetInterface>
+
+#include <QtCore/qplugin.h>
+#include <QtGui/QIcon>
+#include <QtGui/QPixmap>
+
+#include "xform.h"
+#include "pathdeform.h"
+#include "gradients.h"
+#include "pathstroke.h"
+#include "hoverpoints.h"
+#include "composition.h"
+
+QT_FORWARD_DECLARE_CLASS(QDesignerFormEditorInterface)
+
+// Specify "text" to be a singleline property (no richtext)
+static inline QString textSingleLinePropertyDeclaration(const QString &className)
+{
+ QString rc = QLatin1String(
+ "<customwidgets>\n"
+ " <customwidget>\n"
+ " <class>");
+ rc += className;
+ rc += QLatin1String("</class>\n"
+ " <propertyspecifications>\n"
+ " <stringpropertyspecification name=\"text\" type=\"singleline\"/>\n"
+ " </propertyspecifications>\n"
+ " </customwidget>\n"
+ "</customwidgets>\n");
+ return rc;
+}
+
+// Plain XML for a custom widget
+static inline QString customWidgetDomXml(const QString &className,
+ const QString &customSection = QString())
+{
+ QString rc = QLatin1String("<ui language=\"c++\"><widget class=\"");
+ rc += className;
+ rc += QLatin1String("\" name=\"");
+ QString objectName = className;
+ objectName[0] = objectName.at(0).toLower();
+ rc += objectName;
+ rc += QLatin1String("\"/>");
+ rc += customSection;
+ rc += QLatin1String("</ui>");
+ return rc;
+}
+
+class PathDeformRendererEx : public PathDeformRenderer
+{
+ Q_OBJECT
+public:
+ PathDeformRendererEx(QWidget *parent) : PathDeformRenderer(parent) { }
+ QSize sizeHint() const { return QSize(300, 200); }
+};
+
+class DemoPlugin : public QDesignerCustomWidgetInterface
+{
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+protected:
+ explicit DemoPlugin(const QString &className, const QString &customSection = QString());
+
+public:
+ QString name() const { return m_className; }
+ bool isContainer() const { return false; }
+ bool isInitialized() const { return m_initialized; }
+ QIcon icon() const { return QIcon(); }
+ QString codeTemplate() const { return QString(); }
+ QString whatsThis() const { return QString(); }
+ QString toolTip() const { return QString(); }
+ QString group() const { return "Arthur Widgets [Demo]"; }
+ void initialize(QDesignerFormEditorInterface *)
+ {
+ if (m_initialized)
+ return;
+ m_initialized = true;
+ }
+ QString domXml() const { return m_domXml; }
+
+private:
+ const QString m_className;
+ const QString m_domXml;
+ bool m_initialized;
+};
+
+DemoPlugin::DemoPlugin(const QString &className, const QString &customSection) :
+ m_className(className),
+ m_domXml(customWidgetDomXml(className, customSection)),
+ m_initialized(false)
+{
+}
+
+class DeformPlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+
+public:
+ explicit DeformPlugin(QObject *parent = 0);
+ QString includeFile() const { return QLatin1String("deform.h"); }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ PathDeformRenderer *deform = new PathDeformRendererEx(parent);
+ deform->setRadius(70);
+ deform->setAnimated(false);
+ deform->setFontSize(20);
+ deform->setText(QLatin1String("Arthur Widgets Demo"));
+
+ return deform;
+ }
+};
+
+DeformPlugin::DeformPlugin(QObject *parent) :
+ QObject(parent),
+ DemoPlugin(QLatin1String("PathDeformRendererEx"),
+ textSingleLinePropertyDeclaration(QLatin1String("PathDeformRendererEx")))
+{
+}
+
+class XFormRendererEx : public XFormView
+{
+ Q_OBJECT
+public:
+ XFormRendererEx(QWidget *parent) : XFormView(parent) {}
+ QSize sizeHint() const { return QSize(300, 200); }
+};
+
+class XFormPlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+public:
+ explicit XFormPlugin(QObject *parent = 0);
+ QString includeFile() const { return QLatin1String("xform.h"); }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ XFormRendererEx *xform = new XFormRendererEx(parent);
+ xform->setText(QLatin1String("Qt - Hello World!!"));
+ xform->setPixmap(QPixmap(QLatin1String(":/trolltech/arthurplugin/bg1.jpg")));
+ return xform;
+ }
+};
+
+XFormPlugin::XFormPlugin(QObject *parent) :
+ QObject(parent),
+ DemoPlugin(QLatin1String("XFormRendererEx"),
+ textSingleLinePropertyDeclaration(QLatin1String("XFormRendererEx")))
+{
+}
+
+class GradientEditorPlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+public:
+ explicit GradientEditorPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientEditor")) { }
+ QString includeFile() const { return "gradients.h"; }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ GradientEditor *editor = new GradientEditor(parent);
+ return editor;
+ }
+};
+
+class GradientRendererEx : public GradientRenderer
+{
+ Q_OBJECT
+public:
+ GradientRendererEx(QWidget *p) : GradientRenderer(p) { }
+ QSize sizeHint() const { return QSize(300, 200); }
+};
+
+class GradientRendererPlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+public:
+ GradientRendererPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("GradientRendererEx")) { }
+ QString includeFile() const { return QLatin1String("gradients.h"); }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ GradientRenderer *renderer = new GradientRendererEx(parent);
+ renderer->setConicalGradient();
+ return renderer;
+ }
+};
+
+class PathStrokeRendererEx : public PathStrokeRenderer
+{
+ Q_OBJECT
+public:
+ explicit PathStrokeRendererEx(QWidget *p) : PathStrokeRenderer(p) { }
+ QSize sizeHint() const { return QSize(300, 200); }
+};
+
+class StrokeRenderPlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+public:
+ explicit StrokeRenderPlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("PathStrokeRendererEx")) { }
+ QString includeFile() const { return QLatin1String("pathstroke.h"); }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ PathStrokeRenderer *stroke = new PathStrokeRendererEx(parent);
+ return stroke;
+ }
+};
+
+
+class CompositionModePlugin : public QObject, public DemoPlugin
+{
+ Q_OBJECT
+public:
+ explicit CompositionModePlugin(QObject *parent = 0) : QObject(parent), DemoPlugin(QLatin1String("CompositionRenderer")) { }
+ QString includeFile() const { return QLatin1String("composition.h"); }
+
+ QWidget *createWidget(QWidget *parent)
+ {
+ CompositionRenderer *renderer = new CompositionRenderer(parent);
+ renderer->setAnimationEnabled(false);
+ return renderer;
+ }
+};
+
+
+class ArthurPlugins : public QObject, public QDesignerCustomWidgetCollectionInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
+
+public:
+ explicit ArthurPlugins(QObject *parent = 0);
+ QList<QDesignerCustomWidgetInterface*> customWidgets() const { return m_plugins; }
+
+private:
+ QList<QDesignerCustomWidgetInterface *> m_plugins;
+};
+
+ArthurPlugins::ArthurPlugins(QObject *parent) :
+ QObject(parent)
+{
+ m_plugins << new DeformPlugin(this)
+ << new XFormPlugin(this)
+ << new GradientEditorPlugin(this)
+ << new GradientRendererPlugin(this)
+ << new StrokeRenderPlugin(this)
+ << new CompositionModePlugin(this);
+}
+
+#include "plugin.moc"
+
+Q_EXPORT_PLUGIN2(ArthurPlugins, ArthurPlugins)
diff --git a/demos/books/bookdelegate.cpp b/demos/books/bookdelegate.cpp
new file mode 100644
index 0000000..1322fd6
--- /dev/null
+++ b/demos/books/bookdelegate.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bookdelegate.h"
+
+#include <QtGui>
+
+BookDelegate::BookDelegate(QObject *parent)
+ : QSqlRelationalDelegate(parent), star(QPixmap(":images/star.png"))
+{
+}
+
+void BookDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (index.column() != 5) {
+ QStyleOptionViewItemV3 opt = option;
+ opt.rect.adjust(0, 0, -1, -1); // since we draw the grid ourselves
+ QSqlRelationalDelegate::paint(painter, opt, index);
+ } else {
+ const QAbstractItemModel *model = index.model();
+ QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ?
+ (option.state & QStyle::State_Active) ? QPalette::Normal : QPalette::Inactive : QPalette::Disabled;
+
+ if (option.state & QStyle::State_Selected)
+ painter->fillRect(option.rect, option.palette.color(cg, QPalette::Highlight));
+
+ int rating = model->data(index, Qt::DisplayRole).toInt();
+ int width = star.width();
+ int height = star.height();
+ int x = option.rect.x();
+ int y = option.rect.y() + (option.rect.height() / 2) - (height / 2);
+ for (int i = 0; i < rating; ++i) {
+ painter->drawPixmap(x, y, star);
+ x += width;
+ }
+ drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1)); // since we draw the grid ourselves
+ }
+
+ QPen pen = painter->pen();
+ painter->setPen(option.palette.color(QPalette::Mid));
+ painter->drawLine(option.rect.bottomLeft(), option.rect.bottomRight());
+ painter->drawLine(option.rect.topRight(), option.rect.bottomRight());
+ painter->setPen(pen);
+}
+
+QSize BookDelegate::sizeHint(const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (index.column() == 5)
+ return QSize(5 * star.width(), star.height()) + QSize(1, 1);
+
+ return QSqlRelationalDelegate::sizeHint(option, index) + QSize(1, 1); // since we draw the grid ourselves
+}
+
+bool BookDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index)
+{
+ if (index.column() != 5)
+ return QSqlRelationalDelegate::editorEvent(event, model, option, index);
+
+ if (event->type() == QEvent::MouseButtonPress) {
+ QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
+ int stars = qBound(0, int(0.7 + qreal(mouseEvent->pos().x()
+ - option.rect.x()) / star.width()), 5);
+ model->setData(index, QVariant(stars));
+ return false; //so that the selection can change
+ }
+
+ return true;
+}
+
+QWidget *BookDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (index.column() != 4)
+ return QSqlRelationalDelegate::createEditor(parent, option, index);
+
+ // for editing the year, return a spinbox with a range from -1000 to 2100.
+ QSpinBox *sb = new QSpinBox(parent);
+ sb->setFrame(false);
+ sb->setMaximum(2100);
+ sb->setMinimum(-1000);
+
+ return sb;
+}
+
diff --git a/demos/books/bookdelegate.h b/demos/books/bookdelegate.h
new file mode 100644
index 0000000..fb32335
--- /dev/null
+++ b/demos/books/bookdelegate.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BOOKDELEGATE_H
+#define BOOKDELEGATE_H
+
+#include <QModelIndex>
+#include <QPixmap>
+#include <QSize>
+#include <QSqlRelationalDelegate>
+
+QT_FORWARD_DECLARE_CLASS(QPainter)
+
+class BookDelegate : public QSqlRelationalDelegate
+{
+public:
+ BookDelegate(QObject *parent);
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
+
+ bool editorEvent(QEvent *event, QAbstractItemModel *model,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index);
+
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+
+private:
+ QPixmap star;
+};
+
+#endif
diff --git a/demos/books/books.pro b/demos/books/books.pro
new file mode 100644
index 0000000..a2cd33f
--- /dev/null
+++ b/demos/books/books.pro
@@ -0,0 +1,21 @@
+TEMPLATE = app
+INCLUDEPATH += .
+
+HEADERS = bookdelegate.h bookwindow.h initdb.h
+RESOURCES = books.qrc
+SOURCES = bookdelegate.cpp main.cpp bookwindow.cpp
+FORMS = bookwindow.ui
+
+QT += sql
+
+target.path = $$[QT_INSTALL_DEMOS]/books
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images
+sources.path = $$[QT_INSTALL_DEMOS]/books
+INSTALLS += target sources
+
+wince*: {
+ CONFIG(debug, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
+ CONFIG(release, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
+ sqlPlugins.path = sqldrivers
+ DEPLOYMENT += sqlPlugins
+} \ No newline at end of file
diff --git a/demos/books/books.qrc b/demos/books/books.qrc
new file mode 100644
index 0000000..342638e
--- /dev/null
+++ b/demos/books/books.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>images/star.png</file>
+</qresource>
+</RCC>
diff --git a/demos/books/bookwindow.cpp b/demos/books/bookwindow.cpp
new file mode 100644
index 0000000..e73f727
--- /dev/null
+++ b/demos/books/bookwindow.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bookwindow.h"
+#include "bookdelegate.h"
+#include "initdb.h"
+
+#include <QtSql>
+
+BookWindow::BookWindow()
+{
+ ui.setupUi(this);
+
+ if (!QSqlDatabase::drivers().contains("QSQLITE"))
+ QMessageBox::critical(this, "Unable to load database", "This demo needs the SQLITE driver");
+
+ // initialize the database
+ QSqlError err = initDb();
+ if (err.type() != QSqlError::NoError) {
+ showError(err);
+ return;
+ }
+
+ // Create the data model
+ model = new QSqlRelationalTableModel(ui.bookTable);
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+ model->setTable("books");
+
+ // Remeber the indexes of the columns
+ authorIdx = model->fieldIndex("author");
+ genreIdx = model->fieldIndex("genre");
+
+ // Set the relations to the other database tables
+ model->setRelation(authorIdx, QSqlRelation("authors", "id", "name"));
+ model->setRelation(genreIdx, QSqlRelation("genres", "id", "name"));
+
+ // Set the localized header captions
+ model->setHeaderData(authorIdx, Qt::Horizontal, tr("Author Name"));
+ model->setHeaderData(genreIdx, Qt::Horizontal, tr("Genre"));
+ model->setHeaderData(model->fieldIndex("title"), Qt::Horizontal, tr("Title"));
+ model->setHeaderData(model->fieldIndex("year"), Qt::Horizontal, tr("Year"));
+ model->setHeaderData(model->fieldIndex("rating"), Qt::Horizontal, tr("Rating"));
+
+ // Populate the model
+ if (!model->select()) {
+ showError(model->lastError());
+ return;
+ }
+
+ // Set the model and hide the ID column
+ ui.bookTable->setModel(model);
+ ui.bookTable->setItemDelegate(new BookDelegate(ui.bookTable));
+ ui.bookTable->setColumnHidden(model->fieldIndex("id"), true);
+ ui.bookTable->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ // Initialize the Author combo box
+ ui.authorEdit->setModel(model->relationModel(authorIdx));
+ ui.authorEdit->setModelColumn(model->relationModel(authorIdx)->fieldIndex("name"));
+
+ ui.genreEdit->setModel(model->relationModel(genreIdx));
+ ui.genreEdit->setModelColumn(model->relationModel(genreIdx)->fieldIndex("name"));
+
+ QDataWidgetMapper *mapper = new QDataWidgetMapper(this);
+ mapper->setModel(model);
+ mapper->setItemDelegate(new BookDelegate(this));
+ mapper->addMapping(ui.titleEdit, model->fieldIndex("title"));
+ mapper->addMapping(ui.yearEdit, model->fieldIndex("year"));
+ mapper->addMapping(ui.authorEdit, authorIdx);
+ mapper->addMapping(ui.genreEdit, genreIdx);
+ mapper->addMapping(ui.ratingEdit, model->fieldIndex("rating"));
+
+ connect(ui.bookTable->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
+ mapper, SLOT(setCurrentModelIndex(QModelIndex)));
+
+ ui.bookTable->setCurrentIndex(model->index(0, 0));
+}
+
+void BookWindow::showError(const QSqlError &err)
+{
+ QMessageBox::critical(this, "Unable to initialize Database",
+ "Error initializing database: " + err.text());
+}
+
diff --git a/demos/books/bookwindow.h b/demos/books/bookwindow.h
new file mode 100644
index 0000000..3cc69d0
--- /dev/null
+++ b/demos/books/bookwindow.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BOOKWINDOW_H
+#define BOOKWINDOW_H
+
+#include <QtGui>
+#include <QtSql>
+
+#include "ui_bookwindow.h"
+
+
+class BookWindow: public QMainWindow
+{
+ Q_OBJECT
+public:
+ BookWindow();
+
+private:
+ void showError(const QSqlError &err);
+ Ui::BookWindow ui;
+ QSqlRelationalTableModel *model;
+ int authorIdx, genreIdx;
+};
+
+#endif
diff --git a/demos/books/bookwindow.ui b/demos/books/bookwindow.ui
new file mode 100644
index 0000000..659d324
--- /dev/null
+++ b/demos/books/bookwindow.ui
@@ -0,0 +1,149 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>BookWindow</class>
+ <widget class="QMainWindow" name="BookWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>601</width>
+ <height>420</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Books</string>
+ </property>
+ <widget class="QWidget" name="centralWidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Books</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTableView" name="bookTable" >
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Details</string>
+ </property>
+ <layout class="QFormLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>&lt;b>Title:&lt;/b></string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="titleEdit" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2_2_2_2" >
+ <property name="text" >
+ <string>&lt;b>Author: &lt;/b></string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="authorEdit" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>&lt;b>Genre:&lt;/b></string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QComboBox" name="genreEdit" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>&lt;b>Year:&lt;/b></string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QSpinBox" name="yearEdit" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="prefix" >
+ <string/>
+ </property>
+ <property name="maximum" >
+ <number>2100</number>
+ </property>
+ <property name="minimum" >
+ <number>-1000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>&lt;b>Rating:&lt;/b></string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <widget class="QSpinBox" name="ratingEdit" >
+ <property name="maximum" >
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>bookTable</tabstop>
+ <tabstop>titleEdit</tabstop>
+ <tabstop>authorEdit</tabstop>
+ <tabstop>genreEdit</tabstop>
+ <tabstop>yearEdit</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/books/images/star.png b/demos/books/images/star.png
new file mode 100644
index 0000000..87f4464
--- /dev/null
+++ b/demos/books/images/star.png
Binary files differ
diff --git a/demos/books/initdb.h b/demos/books/initdb.h
new file mode 100644
index 0000000..f9a94b7
--- /dev/null
+++ b/demos/books/initdb.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef INITDB_H
+#define INITDB_H
+
+#include <QtSql>
+
+void addBook(QSqlQuery &q, const QString &title, int year, const QVariant &authorId,
+ const QVariant &genreId, int rating)
+{
+ q.addBindValue(title);
+ q.addBindValue(year);
+ q.addBindValue(authorId);
+ q.addBindValue(genreId);
+ q.addBindValue(rating);
+ q.exec();
+}
+
+QVariant addGenre(QSqlQuery &q, const QString &name)
+{
+ q.addBindValue(name);
+ q.exec();
+ return q.lastInsertId();
+}
+
+QVariant addAuthor(QSqlQuery &q, const QString &name, const QDate &birthdate)
+{
+ q.addBindValue(name);
+ q.addBindValue(birthdate);
+ q.exec();
+ return q.lastInsertId();
+}
+
+QSqlError initDb()
+{
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
+ db.setDatabaseName(":memory:");
+
+ if (!db.open())
+ return db.lastError();
+
+ QStringList tables = db.tables();
+ if (tables.contains("books", Qt::CaseInsensitive)
+ && tables.contains("authors", Qt::CaseInsensitive))
+ return QSqlError();
+
+ QSqlQuery q;
+ if (!q.exec(QLatin1String("create table books(id integer primary key, title varchar, author integer, genre integer, year integer, rating integer)")))
+ return q.lastError();
+ if (!q.exec(QLatin1String("create table authors(id integer primary key, name varchar, birthdate date)")))
+ return q.lastError();
+ if (!q.exec(QLatin1String("create table genres(id integer primary key, name varchar)")))
+ return q.lastError();
+
+ if (!q.prepare(QLatin1String("insert into authors(name, birthdate) values(?, ?)")))
+ return q.lastError();
+ QVariant asimovId = addAuthor(q, QLatin1String("Isaac Asimov"), QDate(1920, 2, 1));
+ QVariant greeneId = addAuthor(q, QLatin1String("Graham Greene"), QDate(1904, 10, 2));
+ QVariant pratchettId = addAuthor(q, QLatin1String("Terry Pratchett"), QDate(1948, 4, 28));
+
+ if (!q.prepare(QLatin1String("insert into genres(name) values(?)")))
+ return q.lastError();
+ QVariant sfiction = addGenre(q, QLatin1String("Science Fiction"));
+ QVariant fiction = addGenre(q, QLatin1String("Fiction"));
+ QVariant fantasy = addGenre(q, QLatin1String("Fantasy"));
+
+ if (!q.prepare(QLatin1String("insert into books(title, year, author, genre, rating) values(?, ?, ?, ?, ?)")))
+ return q.lastError();
+ addBook(q, QLatin1String("Foundation"), 1951, asimovId, sfiction, 3);
+ addBook(q, QLatin1String("Foundation and Empire"), 1952, asimovId, sfiction, 4);
+ addBook(q, QLatin1String("Second Foundation"), 1953, asimovId, sfiction, 3);
+ addBook(q, QLatin1String("Foundation's Edge"), 1982, asimovId, sfiction, 3);
+ addBook(q, QLatin1String("Foundation and Earth"), 1986, asimovId, sfiction, 4);
+ addBook(q, QLatin1String("Prelude to Foundation"), 1988, asimovId, sfiction, 3);
+ addBook(q, QLatin1String("Forward the Foundation"), 1993, asimovId, sfiction, 3);
+ addBook(q, QLatin1String("The Power and the Glory"), 1940, greeneId, fiction, 4);
+ addBook(q, QLatin1String("The Third Man"), 1950, greeneId, fiction, 5);
+ addBook(q, QLatin1String("Our Man in Havana"), 1958, greeneId, fiction, 4);
+ addBook(q, QLatin1String("Guards! Guards!"), 1989, pratchettId, fantasy, 3);
+ addBook(q, QLatin1String("Night Watch"), 2002, pratchettId, fantasy, 3);
+ addBook(q, QLatin1String("Going Postal"), 2004, pratchettId, fantasy, 3);
+
+ return QSqlError();
+}
+
+#endif
diff --git a/demos/books/main.cpp b/demos/books/main.cpp
new file mode 100644
index 0000000..f3ae325
--- /dev/null
+++ b/demos/books/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bookwindow.h"
+
+#include <QtGui>
+
+int main(int argc, char * argv[])
+{
+ Q_INIT_RESOURCE(books);
+
+ QApplication app(argc, argv);
+
+ BookWindow win;
+ win.show();
+
+ return app.exec();
+}
diff --git a/demos/boxes/3rdparty/fbm.c b/demos/boxes/3rdparty/fbm.c
new file mode 100644
index 0000000..98eb87a
--- /dev/null
+++ b/demos/boxes/3rdparty/fbm.c
@@ -0,0 +1,207 @@
+/*****************************************************************
+
+ Implementation of the fractional Brownian motion algorithm. These
+ functions were originally the work of F. Kenton Musgrave.
+ For documentation of the different functions please refer to the
+ book:
+ "Texturing and modeling: a procedural approach"
+ by David S. Ebert et. al.
+
+******************************************************************/
+
+#if defined (_MSC_VER)
+#include <qglobal.h>
+#endif
+
+#include <time.h>
+#include <stdlib.h>
+#include "fbm.h"
+
+#if defined(Q_CC_MSVC)
+#pragma warning(disable:4244)
+#endif
+
+/* Definitions used by the noise2() functions */
+
+//#define B 0x100
+//#define BM 0xff
+#define B 0x20
+#define BM 0x1f
+
+#define N 0x1000
+#define NP 12 /* 2^N */
+#define NM 0xfff
+
+static int p[B + B + 2];
+static float g3[B + B + 2][3];
+static float g2[B + B + 2][2];
+static float g1[B + B + 2];
+static int start = 1;
+
+static void init(void);
+
+#define s_curve(t) ( t * t * (3. - 2. * t) )
+
+#define lerp(t, a, b) ( a + t * (b - a) )
+
+#define setup(i,b0,b1,r0,r1)\
+ t = vec[i] + N;\
+ b0 = ((int)t) & BM;\
+ b1 = (b0+1) & BM;\
+ r0 = t - (int)t;\
+ r1 = r0 - 1.;
+#define at3(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] )
+
+/* Fractional Brownian Motion function */
+
+double fBm( Vector point, double H, double lacunarity, double octaves,
+ int init )
+{
+
+ double value, frequency, remainder;
+ int i;
+ static double exponent_array[10];
+ float vec[3];
+
+ /* precompute and store spectral weights */
+ if ( init ) {
+ start = 1;
+ srand( time(0) );
+ /* seize required memory for exponent_array */
+ frequency = 1.0;
+ for (i=0; i<=octaves; i++) {
+ /* compute weight for each frequency */
+ exponent_array[i] = pow( frequency, -H );
+ frequency *= lacunarity;
+ }
+ }
+
+ value = 0.0; /* initialize vars to proper values */
+ frequency = 1.0;
+ vec[0]=point.x;
+ vec[1]=point.y;
+ vec[2]=point.z;
+
+
+ /* inner loop of spectral construction */
+ for (i=0; i<octaves; i++) {
+ /* value += noise3( vec ) * exponent_array[i];*/
+ value += noise3( vec ) * exponent_array[i];
+ vec[0] *= lacunarity;
+ vec[1] *= lacunarity;
+ vec[2] *= lacunarity;
+ } /* for */
+
+ remainder = octaves - (int)octaves;
+ if ( remainder ) /* add in ``octaves'' remainder */
+ /* ``i'' and spatial freq. are preset in loop above */
+ value += remainder * noise3( vec ) * exponent_array[i];
+
+ return( value );
+
+} /* fBm() */
+
+
+float noise3(float vec[3])
+{
+ int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11;
+ float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v;
+ register int i, j;
+
+ if (start) {
+ start = 0;
+ init();
+ }
+
+ setup(0, bx0,bx1, rx0,rx1);
+ setup(1, by0,by1, ry0,ry1);
+ setup(2, bz0,bz1, rz0,rz1);
+
+ i = p[ bx0 ];
+ j = p[ bx1 ];
+
+ b00 = p[ i + by0 ];
+ b10 = p[ j + by0 ];
+ b01 = p[ i + by1 ];
+ b11 = p[ j + by1 ];
+
+ t = s_curve(rx0);
+ sy = s_curve(ry0);
+ sz = s_curve(rz0);
+
+
+ q = g3[ b00 + bz0 ] ; u = at3(rx0,ry0,rz0);
+ q = g3[ b10 + bz0 ] ; v = at3(rx1,ry0,rz0);
+ a = lerp(t, u, v);
+
+ q = g3[ b01 + bz0 ] ; u = at3(rx0,ry1,rz0);
+ q = g3[ b11 + bz0 ] ; v = at3(rx1,ry1,rz0);
+ b = lerp(t, u, v);
+
+ c = lerp(sy, a, b);
+
+ q = g3[ b00 + bz1 ] ; u = at3(rx0,ry0,rz1);
+ q = g3[ b10 + bz1 ] ; v = at3(rx1,ry0,rz1);
+ a = lerp(t, u, v);
+
+ q = g3[ b01 + bz1 ] ; u = at3(rx0,ry1,rz1);
+ q = g3[ b11 + bz1 ] ; v = at3(rx1,ry1,rz1);
+ b = lerp(t, u, v);
+
+ d = lerp(sy, a, b);
+
+ return lerp(sz, c, d);
+}
+
+static void normalize2(float v[2])
+{
+ float s;
+
+ s = sqrt(v[0] * v[0] + v[1] * v[1]);
+ v[0] = v[0] / s;
+ v[1] = v[1] / s;
+}
+
+static void normalize3(float v[3])
+{
+ float s;
+
+ s = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ v[0] = v[0] / s;
+ v[1] = v[1] / s;
+ v[2] = v[2] / s;
+}
+
+static void init(void)
+{
+ int i, j, k;
+
+ for (i = 0 ; i < B ; i++) {
+ p[i] = i;
+
+ g1[i] = (float)((rand() % (B + B)) - B) / B;
+
+ for (j = 0 ; j < 2 ; j++)
+ g2[i][j] = (float)((rand() % (B + B)) - B) / B;
+ normalize2(g2[i]);
+
+ for (j = 0 ; j < 3 ; j++)
+ g3[i][j] = (float)((rand() % (B + B)) - B) / B;
+ normalize3(g3[i]);
+ }
+
+ while (--i) {
+ k = p[i];
+ p[i] = p[j = rand() % B];
+ p[j] = k;
+ }
+
+ for (i = 0 ; i < B + 2 ; i++) {
+ p[B + i] = p[i];
+ g1[B + i] = g1[i];
+ for (j = 0 ; j < 2 ; j++)
+ g2[B + i][j] = g2[i][j];
+ for (j = 0 ; j < 3 ; j++)
+ g3[B + i][j] = g3[i][j];
+ }
+}
diff --git a/demos/boxes/3rdparty/fbm.h b/demos/boxes/3rdparty/fbm.h
new file mode 100644
index 0000000..b8a4a99
--- /dev/null
+++ b/demos/boxes/3rdparty/fbm.h
@@ -0,0 +1,40 @@
+/*****************************************************************
+
+ Prototypes for the fractional Brownian motion algorithm. These
+ functions were originally the work of F. Kenton Musgrave. For
+ documentation of the different functions please refer to the book:
+ "Texturing and modeling: a procedural approach"
+ by David S. Ebert et. al.
+
+******************************************************************/
+
+#ifndef _fbm_h
+#define _fbm_h
+
+#include <math.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#define TRUE 1
+//#define FALSE 0
+
+typedef struct {
+ double x;
+ double y;
+ double z;
+} Vector;
+
+float noise3(float vec[]);
+double fBm( Vector point, double H, double lacunarity, double octaves,
+ int init );
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+
diff --git a/demos/boxes/basic.fsh b/demos/boxes/basic.fsh
new file mode 100644
index 0000000..06ef24a
--- /dev/null
+++ b/demos/boxes/basic.fsh
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform vec4 basicColor;
+
+void main()
+{
+ vec3 N = normalize(normal);
+ // assume directional light
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ vec3 absN = abs(gl_TexCoord[1].xyz);
+ vec3 texCoord;
+ if (absN.x > absN.y && absN.x > absN.z)
+ texCoord = gl_TexCoord[1].yzx;
+ else if (absN.y > absN.z)
+ texCoord = gl_TexCoord[1].zxy;
+ else
+ texCoord = gl_TexCoord[1].xyz;
+ texCoord.y *= -sign(texCoord.z);
+ texCoord += 0.5;
+
+ vec4 texColor = texture2D(tex, texCoord.xy);
+ vec4 unlitColor = gl_Color * mix(basicColor, vec4(texColor.xyz, 1.0), texColor.w);
+ gl_FragColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+}
diff --git a/demos/boxes/basic.vsh b/demos/boxes/basic.vsh
new file mode 100644
index 0000000..5a02df2
--- /dev/null
+++ b/demos/boxes/basic.vsh
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform mat4 view;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_Vertex;
+ specular = gl_LightSource[0].specular;
+ ambient = gl_LightSource[0].ambient;
+ diffuse = gl_LightSource[0].diffuse;
+ lightDirection = view * gl_LightSource[0].position;
+
+ normal = gl_NormalMatrix * gl_Normal;
+ position = (gl_ModelViewMatrix * gl_Vertex).xyz;
+
+ gl_FrontColor = gl_Color;
+ gl_Position = ftransform();
+}
diff --git a/demos/boxes/boxes.pro b/demos/boxes/boxes.pro
new file mode 100644
index 0000000..6c1a331
--- /dev/null
+++ b/demos/boxes/boxes.pro
@@ -0,0 +1,50 @@
+######################################################################
+# Automatically generated by qmake (2.01a) ma 3. nov 17:33:30 2008
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += 3rdparty/fbm.h \
+ glbuffers.h \
+ glextensions.h \
+ glshaders.h \
+ gltrianglemesh.h \
+ qtbox.h \
+ roundedbox.h \
+ scene.h \
+ trackball.h \
+ vector.h
+SOURCES += 3rdparty/fbm.c \
+ glbuffers.cpp \
+ glextensions.cpp \
+ glshaders.cpp \
+ main.cpp \
+ qtbox.cpp \
+ roundedbox.cpp \
+ scene.cpp \
+ trackball.cpp
+
+RESOURCES += boxes.qrc
+
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/boxes
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.jpg *.png *.fsh *.vsh *.par
+sources.files -= 3rdparty/fbm.h 3rdparty/fbm.c
+sources.files += 3rdparty
+sources.path = $$[QT_INSTALL_DEMOS]/boxes
+INSTALLS += target sources
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qjpeg
+}
+
+win32-msvc* {
+ QMAKE_CXXFLAGS += /Zm1200
+ QMAKE_CFLAGS += /Zm1200
+}
diff --git a/demos/boxes/boxes.qrc b/demos/boxes/boxes.qrc
new file mode 100644
index 0000000..d27506d
--- /dev/null
+++ b/demos/boxes/boxes.qrc
@@ -0,0 +1,25 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/boxes">
+ <file>cubemap_negx.jpg</file>
+ <file>cubemap_negy.jpg</file>
+ <file>cubemap_negz.jpg</file>
+ <file>cubemap_posx.jpg</file>
+ <file>cubemap_posy.jpg</file>
+ <file>cubemap_posz.jpg</file>
+ <file>square.jpg</file>
+ <file>basic.vsh</file>
+ <file>basic.fsh</file>
+ <file>dotted.fsh</file>
+ <file>fresnel.fsh</file>
+ <file>glass.fsh</file>
+ <file>granite.fsh</file>
+ <file>marble.fsh</file>
+ <file>reflection.fsh</file>
+ <file>refraction.fsh</file>
+ <file>wood.fsh</file>
+ <file>parameters.par</file>
+ <file>qt-logo.png</file>
+ <file>smiley.png</file>
+ <file>qt-logo.jpg</file>
+</qresource>
+</RCC>
diff --git a/demos/boxes/cubemap_negx.jpg b/demos/boxes/cubemap_negx.jpg
new file mode 100644
index 0000000..07c282e
--- /dev/null
+++ b/demos/boxes/cubemap_negx.jpg
Binary files differ
diff --git a/demos/boxes/cubemap_negy.jpg b/demos/boxes/cubemap_negy.jpg
new file mode 100644
index 0000000..46cd2f9
--- /dev/null
+++ b/demos/boxes/cubemap_negy.jpg
Binary files differ
diff --git a/demos/boxes/cubemap_negz.jpg b/demos/boxes/cubemap_negz.jpg
new file mode 100644
index 0000000..40c01dd
--- /dev/null
+++ b/demos/boxes/cubemap_negz.jpg
Binary files differ
diff --git a/demos/boxes/cubemap_posx.jpg b/demos/boxes/cubemap_posx.jpg
new file mode 100644
index 0000000..0b42e8a
--- /dev/null
+++ b/demos/boxes/cubemap_posx.jpg
Binary files differ
diff --git a/demos/boxes/cubemap_posy.jpg b/demos/boxes/cubemap_posy.jpg
new file mode 100644
index 0000000..2aca9b1
--- /dev/null
+++ b/demos/boxes/cubemap_posy.jpg
Binary files differ
diff --git a/demos/boxes/cubemap_posz.jpg b/demos/boxes/cubemap_posz.jpg
new file mode 100644
index 0000000..2e49173
--- /dev/null
+++ b/demos/boxes/cubemap_posz.jpg
Binary files differ
diff --git a/demos/boxes/dotted.fsh b/demos/boxes/dotted.fsh
new file mode 100644
index 0000000..26425f6
--- /dev/null
+++ b/demos/boxes/dotted.fsh
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+
+void main()
+{
+ vec3 N = normalize(normal);
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ // assume directional light
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ float r1 = length(fract(7.0 * gl_TexCoord[1].xyz) - 0.5);
+ float r2 = length(fract(5.0 * gl_TexCoord[1].xyz + 0.2) - 0.5);
+ float r3 = length(fract(11.0 * gl_TexCoord[1].xyz + 0.7) - 0.5);
+ vec4 rs = vec4(r1, r2, r3, 0.0);
+
+ vec4 unlitColor = gl_Color * (0.8 - clamp(10.0 * (0.4 - rs), 0.0, 0.2));
+ unlitColor.w = 1.0;
+ gl_FragColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+}
diff --git a/demos/boxes/fresnel.fsh b/demos/boxes/fresnel.fsh
new file mode 100644
index 0000000..dd98061
--- /dev/null
+++ b/demos/boxes/fresnel.fsh
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform samplerCube env;
+uniform mat4 view;
+uniform vec4 basicColor;
+
+void main()
+{
+ vec3 N = normalize(normal);
+ // assume directional light
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ vec3 absN = abs(gl_TexCoord[1].xyz);
+ vec3 texCoord;
+ if (absN.x > absN.y && absN.x > absN.z)
+ texCoord = gl_TexCoord[1].yzx;
+ else if (absN.y > absN.z)
+ texCoord = gl_TexCoord[1].zxy;
+ else
+ texCoord = gl_TexCoord[1].xyz;
+ texCoord.y *= -sign(texCoord.z);
+ texCoord += 0.5;
+
+ vec4 texColor = texture2D(tex, texCoord.xy);
+ vec4 unlitColor = gl_Color * mix(basicColor, vec4(texColor.xyz, 1.0), texColor.w);
+ vec4 litColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+
+ vec3 R = 2.0 * dot(-position, N) * N + position;
+ vec4 reflectedColor = textureCube(env, R * mat3(view[0].xyz, view[1].xyz, view[2].xyz));
+ gl_FragColor = mix(litColor, reflectedColor, 0.2 + 0.8 * pow(1.0 + dot(N, normalize(position)), 2.0));
+}
diff --git a/demos/boxes/glass.fsh b/demos/boxes/glass.fsh
new file mode 100644
index 0000000..2b59a0a
--- /dev/null
+++ b/demos/boxes/glass.fsh
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform samplerCube env;
+uniform mat4 view;
+
+// Some arbitrary values
+// Arrays don't work here on glsl < 120, apparently.
+//const float coeffs[6] = float[6](1.0/4.0, 1.0/4.1, 1.0/4.2, 1.0/4.3, 1.0/4.4, 1.0/4.5);
+float coeffs(int i)
+{
+ return 1.0 / (3.0 + 0.1 * float(i));
+}
+
+void main()
+{
+ vec3 N = normalize(normal);
+ vec3 I = -normalize(position);
+ mat3 V = mat3(view[0].xyz, view[1].xyz, view[2].xyz);
+ float IdotN = dot(I, N);
+ float scales[6];
+ vec3 C[6];
+ for (int i = 0; i < 6; ++i) {
+ scales[i] = (IdotN - sqrt(1.0 - coeffs(i) + coeffs(i) * (IdotN * IdotN)));
+ C[i] = textureCube(env, (-I + coeffs(i) * N) * V).xyz;
+ }
+ vec4 refractedColor = 0.25 * vec4(C[5].x + 2.0*C[0].x + C[1].x, C[1].y + 2.0*C[2].y + C[3].y,
+ C[3].z + 2.0*C[4].z + C[5].z, 4.0);
+
+ vec3 R = 2.0 * dot(-position, N) * N + position;
+ vec4 reflectedColor = textureCube(env, R * V);
+
+ gl_FragColor = mix(refractedColor, reflectedColor, 0.4 + 0.6 * pow(1.0 - IdotN, 2.0));
+}
diff --git a/demos/boxes/glbuffers.cpp b/demos/boxes/glbuffers.cpp
new file mode 100644
index 0000000..b2a594e
--- /dev/null
+++ b/demos/boxes/glbuffers.cpp
@@ -0,0 +1,390 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glbuffers.h"
+
+//============================================================================//
+// GLTexture //
+//============================================================================//
+
+GLTexture::GLTexture() : m_texture(0), m_failed(false)
+{
+ glGenTextures(1, &m_texture);
+}
+
+GLTexture::~GLTexture()
+{
+ glDeleteTextures(1, &m_texture);
+}
+
+//============================================================================//
+// GLTexture2D //
+//============================================================================//
+
+GLTexture2D::GLTexture2D(int width, int height)
+{
+ glBindTexture(GL_TEXTURE_2D, m_texture);
+ glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, 0);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+}
+
+
+GLTexture2D::GLTexture2D(const QString& fileName, int width, int height)
+{
+ // TODO: Add error handling.
+ QImage image(fileName);
+
+ if (image.isNull()) {
+ m_failed = true;
+ return;
+ }
+
+ image = image.convertToFormat(QImage::Format_ARGB32);
+
+ //qDebug() << "Image size:" << image.width() << "x" << image.height();
+ if (width <= 0)
+ width = image.width();
+ if (height <= 0)
+ height = image.height();
+ if (width != image.width() || height != image.height())
+ image = image.scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+
+ glBindTexture(GL_TEXTURE_2D, m_texture);
+
+ // Works on x86, so probably works on all little-endian systems.
+ // Does it work on big-endian systems?
+ glTexImage2D(GL_TEXTURE_2D, 0, 4, image.width(), image.height(), 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ //glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+}
+
+void GLTexture2D::load(int width, int height, QRgb *data)
+{
+ glBindTexture(GL_TEXTURE_2D, m_texture);
+ glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, data);
+ glBindTexture(GL_TEXTURE_2D, 0);
+}
+
+void GLTexture2D::bind()
+{
+ glBindTexture(GL_TEXTURE_2D, m_texture);
+ glEnable(GL_TEXTURE_2D);
+}
+
+void GLTexture2D::unbind()
+{
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glDisable(GL_TEXTURE_2D);
+}
+
+
+//============================================================================//
+// GLTexture3D //
+//============================================================================//
+
+GLTexture3D::GLTexture3D(int width, int height, int depth)
+{
+ GLBUFFERS_ASSERT_OPENGL("GLTexture3D::GLTexture3D", glTexImage3D, return)
+
+ glBindTexture(GL_TEXTURE_3D, m_texture);
+ glTexImage3D(GL_TEXTURE_3D, 0, 4, width, height, depth, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, 0);
+
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ //glTexParameteri(GL_TEXTURE_3D, GL_GENERATE_MIPMAP, GL_TRUE);
+ glBindTexture(GL_TEXTURE_3D, 0);
+}
+
+void GLTexture3D::load(int width, int height, int depth, QRgb *data)
+{
+ GLBUFFERS_ASSERT_OPENGL("GLTexture3D::load", glTexImage3D, return)
+
+ glBindTexture(GL_TEXTURE_3D, m_texture);
+ glTexImage3D(GL_TEXTURE_3D, 0, 4, width, height, depth, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, data);
+ glBindTexture(GL_TEXTURE_3D, 0);
+}
+
+void GLTexture3D::bind()
+{
+ glBindTexture(GL_TEXTURE_3D, m_texture);
+ glEnable(GL_TEXTURE_3D);
+}
+
+void GLTexture3D::unbind()
+{
+ glBindTexture(GL_TEXTURE_3D, 0);
+ glDisable(GL_TEXTURE_3D);
+}
+
+//============================================================================//
+// GLTextureCube //
+//============================================================================//
+
+GLTextureCube::GLTextureCube(int size)
+{
+ glBindTexture(GL_TEXTURE_CUBE_MAP, m_texture);
+
+ for (int i = 0; i < 6; ++i)
+ glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 4, size, size, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, 0);
+
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ //glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_GENERATE_MIPMAP, GL_TRUE);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+}
+
+GLTextureCube::GLTextureCube(const QStringList& fileNames, int size)
+{
+ // TODO: Add error handling.
+
+ glBindTexture(GL_TEXTURE_CUBE_MAP, m_texture);
+
+ int index = 0;
+ foreach (QString file, fileNames) {
+ QImage image(file);
+ if (image.isNull()) {
+ m_failed = true;
+ break;
+ }
+
+ image = image.convertToFormat(QImage::Format_ARGB32);
+
+ //qDebug() << "Image size:" << image.width() << "x" << image.height();
+ if (size <= 0)
+ size = image.width();
+ if (size != image.width() || size != image.height())
+ image = image.scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+
+ // Works on x86, so probably works on all little-endian systems.
+ // Does it work on big-endian systems?
+ glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + index, 0, 4, image.width(), image.height(), 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
+
+ if (++index == 6)
+ break;
+ }
+
+ // Clear remaining faces.
+ while (index < 6) {
+ glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + index, 0, 4, size, size, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, 0);
+ ++index;
+ }
+
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ //glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ //glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_GENERATE_MIPMAP, GL_TRUE);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+}
+
+void GLTextureCube::load(int size, int face, QRgb *data)
+{
+ glBindTexture(GL_TEXTURE_CUBE_MAP, m_texture);
+ glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, 0, 4, size, size, 0,
+ GL_BGRA, GL_UNSIGNED_BYTE, data);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+}
+
+void GLTextureCube::bind()
+{
+ glBindTexture(GL_TEXTURE_CUBE_MAP, m_texture);
+ glEnable(GL_TEXTURE_CUBE_MAP);
+}
+
+void GLTextureCube::unbind()
+{
+ glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+ glDisable(GL_TEXTURE_CUBE_MAP);
+}
+
+//============================================================================//
+// GLFrameBufferObject //
+//============================================================================//
+
+GLFrameBufferObject::GLFrameBufferObject(int width, int height)
+ : m_fbo(0)
+ , m_depthBuffer(0)
+ , m_width(width)
+ , m_height(height)
+ , m_failed(false)
+{
+ GLBUFFERS_ASSERT_OPENGL("GLFrameBufferObject::GLFrameBufferObject",
+ glGenFramebuffersEXT && glGenRenderbuffersEXT && glBindRenderbufferEXT && glRenderbufferStorageEXT, return)
+
+ // TODO: share depth buffers of same size
+ glGenFramebuffersEXT(1, &m_fbo);
+ //glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
+ glGenRenderbuffersEXT(1, &m_depthBuffer);
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthBuffer);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, m_width, m_height);
+ //glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthBuffer);
+ //glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+}
+
+GLFrameBufferObject::~GLFrameBufferObject()
+{
+ GLBUFFERS_ASSERT_OPENGL("GLFrameBufferObject::~GLFrameBufferObject",
+ glDeleteFramebuffersEXT && glDeleteRenderbuffersEXT, return)
+
+ glDeleteFramebuffersEXT(1, &m_fbo);
+ glDeleteRenderbuffersEXT(1, &m_depthBuffer);
+}
+
+void GLFrameBufferObject::setAsRenderTarget(bool state)
+{
+ GLBUFFERS_ASSERT_OPENGL("GLFrameBufferObject::setAsRenderTarget", glBindFramebufferEXT, return)
+
+ if (state) {
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
+ glPushAttrib(GL_VIEWPORT_BIT);
+ glViewport(0, 0, m_width, m_height);
+ } else {
+ glPopAttrib();
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ }
+}
+
+bool GLFrameBufferObject::isComplete()
+{
+ GLBUFFERS_ASSERT_OPENGL("GLFrameBufferObject::isComplete", glCheckFramebufferStatusEXT, return false)
+
+ return GL_FRAMEBUFFER_COMPLETE_EXT == glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
+}
+
+//============================================================================//
+// GLRenderTargetCube //
+//============================================================================//
+
+GLRenderTargetCube::GLRenderTargetCube(int size)
+ : GLTextureCube(size)
+ , m_fbo(size, size)
+{
+}
+
+void GLRenderTargetCube::begin(int face)
+{
+ GLBUFFERS_ASSERT_OPENGL("GLRenderTargetCube::begin",
+ glFramebufferTexture2DEXT && glFramebufferRenderbufferEXT, return)
+
+ m_fbo.setAsRenderTarget(true);
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, m_texture, 0);
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_fbo.m_depthBuffer);
+}
+
+void GLRenderTargetCube::end()
+{
+ m_fbo.setAsRenderTarget(false);
+}
+
+void GLRenderTargetCube::getViewMatrix(gfx::Matrix4x4f& mat, int face)
+{
+ if (face < 0 || face >= 6) {
+ qWarning("GLRenderTargetCube::getViewMatrix: 'face' must be in the range [0, 6). (face == %d)", face);
+ return;
+ }
+
+ static int perm[6][3] = {
+ {2, 1, 0},
+ {2, 1, 0},
+ {0, 2, 1},
+ {0, 2, 1},
+ {0, 1, 2},
+ {0, 1, 2},
+ };
+
+ static float signs[6][3] = {
+ {-1.0f, -1.0f, -1.0f},
+ {+1.0f, -1.0f, +1.0f},
+ {+1.0f, +1.0f, -1.0f},
+ {+1.0f, -1.0f, +1.0f},
+ {+1.0f, -1.0f, -1.0f},
+ {-1.0f, -1.0f, +1.0f},
+ };
+
+ memset(mat.bits(), 0, sizeof(float) * 16);
+ for (int i = 0; i < 3; ++i)
+ mat(perm[face][i], i) = signs[face][i];
+ mat(3, 3) = 1.0f;
+}
+
+void GLRenderTargetCube::getProjectionMatrix(gfx::Matrix4x4f& mat, float nearZ, float farZ)
+{
+ float proj[] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, (nearZ+farZ)/(nearZ-farZ), -1.0f,
+ 0.0f, 0.0f, 2.0f*nearZ*farZ/(nearZ-farZ), 0.0f,
+ };
+
+ memcpy(mat.bits(), proj, sizeof(float) * 16);
+}
diff --git a/demos/boxes/glbuffers.h b/demos/boxes/glbuffers.h
new file mode 100644
index 0000000..88de4e8
--- /dev/null
+++ b/demos/boxes/glbuffers.h
@@ -0,0 +1,362 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLBUFFERS_H
+#define GLBUFFERS_H
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "vector.h"
+
+#define BUFFER_OFFSET(i) ((char*)0 + (i))
+#define SIZE_OF_MEMBER(cls, member) sizeof(static_cast<cls *>(0)->member)
+
+#define GLBUFFERS_ASSERT_OPENGL(prefix, assertion, returnStatement) \
+if (m_failed || !(assertion)) { \
+ if (!m_failed) qCritical(prefix ": The necessary OpenGL functions are not available."); \
+ m_failed = true; \
+ returnStatement; \
+}
+
+class GLTexture
+{
+public:
+ GLTexture();
+ virtual ~GLTexture();
+ virtual void bind() = 0;
+ virtual void unbind() = 0;
+ virtual bool failed() const {return m_failed;}
+protected:
+ GLuint m_texture;
+ bool m_failed;
+};
+
+class GLFrameBufferObject
+{
+public:
+ friend class GLRenderTargetCube;
+ // friend class GLRenderTarget2D;
+
+ GLFrameBufferObject(int width, int height);
+ virtual ~GLFrameBufferObject();
+ bool isComplete();
+ virtual bool failed() const {return m_failed;}
+protected:
+ void setAsRenderTarget(bool state = true);
+ GLuint m_fbo;
+ GLuint m_depthBuffer;
+ int m_width, m_height;
+ bool m_failed;
+};
+
+class GLTexture2D : public GLTexture
+{
+public:
+ GLTexture2D(int width, int height);
+ GLTexture2D(const QString& fileName, int width = 0, int height = 0);
+ void load(int width, int height, QRgb *data);
+ virtual void bind();
+ virtual void unbind();
+};
+
+class GLTexture3D : public GLTexture
+{
+public:
+ GLTexture3D(int width, int height, int depth);
+ // TODO: Implement function below
+ //GLTexture3D(const QString& fileName, int width = 0, int height = 0);
+ void load(int width, int height, int depth, QRgb *data);
+ virtual void bind();
+ virtual void unbind();
+};
+
+class GLTextureCube : public GLTexture
+{
+public:
+ GLTextureCube(int size);
+ GLTextureCube(const QStringList& fileNames, int size = 0);
+ void load(int size, int face, QRgb *data);
+ virtual void bind();
+ virtual void unbind();
+};
+
+// TODO: Define and implement class below
+//class GLRenderTarget2D : public GLTexture2D
+
+class GLRenderTargetCube : public GLTextureCube
+{
+public:
+ GLRenderTargetCube(int size);
+ // begin rendering to one of the cube's faces. 0 <= face < 6
+ void begin(int face);
+ // end rendering
+ void end();
+ virtual bool failed() {return m_failed || m_fbo.failed();}
+
+ static void getViewMatrix(gfx::Matrix4x4f& mat, int face);
+ static void getProjectionMatrix(gfx::Matrix4x4f& mat, float nearZ, float farZ);
+private:
+ GLFrameBufferObject m_fbo;
+};
+
+struct VertexDescription
+{
+ enum
+ {
+ Null = 0, // Terminates a VertexDescription array
+ Position,
+ TexCoord,
+ Normal,
+ Color,
+ };
+ int field; // Position, TexCoord, Normal, Color
+ int type; // GL_FLOAT, GL_UNSIGNED_BYTE
+ int count; // number of elements
+ int offset; // field's offset into vertex struct
+ int index; // 0 (unused at the moment)
+};
+
+// Implementation of interleaved buffers.
+// 'T' is a struct which must include a null-terminated static array
+// 'VertexDescription* description'.
+// Example:
+/*
+struct Vertex
+{
+ GLfloat position[3];
+ GLfloat texCoord[2];
+ GLfloat normal[3];
+ GLbyte color[4];
+ static VertexDescription description[];
+};
+
+VertexDescription Vertex::description[] = {
+ {VertexDescription::Position, GL_FLOAT, SIZE_OF_MEMBER(Vertex, position) / sizeof(GLfloat), offsetof(Vertex, position), 0},
+ {VertexDescription::TexCoord, GL_FLOAT, SIZE_OF_MEMBER(Vertex, texCoord) / sizeof(GLfloat), offsetof(Vertex, texCoord), 0},
+ {VertexDescription::Normal, GL_FLOAT, SIZE_OF_MEMBER(Vertex, normal) / sizeof(GLfloat), offsetof(Vertex, normal), 0},
+ {VertexDescription::Color, GL_BYTE, SIZE_OF_MEMBER(Vertex, color) / sizeof(GLbyte), offsetof(Vertex, color), 0},
+ {VertexDescription::Null, 0, 0, 0, 0},
+};
+*/
+template<class T>
+class GLVertexBuffer
+{
+public:
+ GLVertexBuffer(int length, const T *data = 0, int mode = GL_STATIC_DRAW)
+ : m_length(0)
+ , m_mode(mode)
+ , m_buffer(0)
+ , m_failed(false)
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::GLVertexBuffer", glGenBuffers && glBindBuffer && glBufferData, return)
+
+ glGenBuffers(1, &m_buffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
+ glBufferData(GL_ARRAY_BUFFER, (m_length = length) * sizeof(T), data, mode);
+ }
+
+ ~GLVertexBuffer()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::~GLVertexBuffer", glDeleteBuffers, return)
+
+ glDeleteBuffers(1, &m_buffer);
+ }
+
+ void bind()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::bind", glBindBuffer, return)
+
+ glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
+ for (VertexDescription *desc = T::description; desc->field != VertexDescription::Null; ++desc) {
+ switch (desc->field) {
+ case VertexDescription::Position:
+ glVertexPointer(desc->count, desc->type, sizeof(T), BUFFER_OFFSET(desc->offset));
+ glEnableClientState(GL_VERTEX_ARRAY);
+ break;
+ case VertexDescription::TexCoord:
+ glTexCoordPointer(desc->count, desc->type, sizeof(T), BUFFER_OFFSET(desc->offset));
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ break;
+ case VertexDescription::Normal:
+ glNormalPointer(desc->type, sizeof(T), BUFFER_OFFSET(desc->offset));
+ glEnableClientState(GL_NORMAL_ARRAY);
+ break;
+ case VertexDescription::Color:
+ glColorPointer(desc->count, desc->type, sizeof(T), BUFFER_OFFSET(desc->offset));
+ glEnableClientState(GL_COLOR_ARRAY);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ void unbind()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::unbind", glBindBuffer, return)
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ for (VertexDescription *desc = T::description; desc->field != VertexDescription::Null; ++desc) {
+ switch (desc->field) {
+ case VertexDescription::Position:
+ glDisableClientState(GL_VERTEX_ARRAY);
+ break;
+ case VertexDescription::TexCoord:
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ break;
+ case VertexDescription::Normal:
+ glDisableClientState(GL_NORMAL_ARRAY);
+ break;
+ case VertexDescription::Color:
+ glDisableClientState(GL_COLOR_ARRAY);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ int length() const {return m_length;}
+
+ T *lock()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::lock", glBindBuffer && glMapBuffer, return 0)
+
+ glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
+ //glBufferData(GL_ARRAY_BUFFER, m_length, NULL, m_mode);
+ GLvoid* buffer = glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
+ m_failed = (buffer == 0);
+ return reinterpret_cast<T *>(buffer);
+ }
+
+ void unlock()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::unlock", glBindBuffer && glUnmapBuffer, return)
+
+ glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
+ glUnmapBuffer(GL_ARRAY_BUFFER);
+ }
+
+ bool failed()
+ {
+ return m_failed;
+ }
+
+private:
+ int m_length, m_mode;
+ GLuint m_buffer;
+ bool m_failed;
+};
+
+template<class T>
+class GLIndexBuffer
+{
+public:
+ GLIndexBuffer(int length, const T *data = 0, int mode = GL_STATIC_DRAW)
+ : m_length(0)
+ , m_mode(mode)
+ , m_buffer(0)
+ , m_failed(false)
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::GLIndexBuffer", glGenBuffers && glBindBuffer && glBufferData, return)
+
+ glGenBuffers(1, &m_buffer);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_buffer);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, (m_length = length) * sizeof(T), data, mode);
+ }
+
+ ~GLIndexBuffer()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::~GLIndexBuffer", glDeleteBuffers, return)
+
+ glDeleteBuffers(1, &m_buffer);
+ }
+
+ void bind()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::bind", glBindBuffer, return)
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_buffer);
+ }
+
+ void unbind()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::unbind", glBindBuffer, return)
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+ }
+
+ int length() const {return m_length;}
+
+ T *lock()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::lock", glBindBuffer && glMapBuffer, return 0)
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_buffer);
+ GLvoid* buffer = glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_READ_WRITE);
+ m_failed = (buffer == 0);
+ return reinterpret_cast<T *>(buffer);
+ }
+
+ void unlock()
+ {
+ GLBUFFERS_ASSERT_OPENGL("GLIndexBuffer::unlock", glBindBuffer && glUnmapBuffer, return)
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_buffer);
+ glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
+ }
+
+ bool failed()
+ {
+ return m_failed;
+ }
+
+private:
+ int m_length, m_mode;
+ GLuint m_buffer;
+ bool m_failed;
+};
+
+#endif
diff --git a/demos/boxes/glextensions.cpp b/demos/boxes/glextensions.cpp
new file mode 100644
index 0000000..59256a8
--- /dev/null
+++ b/demos/boxes/glextensions.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glextensions.h"
+
+#define RESOLVE_GL_FUNC(f) ok &= bool((f = (_gl##f) context->getProcAddress(QLatin1String("gl" #f))));
+
+bool GLExtensionFunctions::resolve(const QGLContext *context)
+{
+ bool ok = true;
+
+ RESOLVE_GL_FUNC(CreateShaderObjectARB)
+ RESOLVE_GL_FUNC(ShaderSourceARB)
+ RESOLVE_GL_FUNC(CompileShaderARB)
+ RESOLVE_GL_FUNC(GetObjectParameterivARB)
+ RESOLVE_GL_FUNC(DeleteObjectARB)
+ RESOLVE_GL_FUNC(GetInfoLogARB)
+ RESOLVE_GL_FUNC(CreateProgramObjectARB)
+ RESOLVE_GL_FUNC(AttachObjectARB)
+ RESOLVE_GL_FUNC(DetachObjectARB)
+ RESOLVE_GL_FUNC(LinkProgramARB)
+ RESOLVE_GL_FUNC(UseProgramObjectARB)
+ RESOLVE_GL_FUNC(GetUniformLocationARB)
+ RESOLVE_GL_FUNC(Uniform1iARB)
+ RESOLVE_GL_FUNC(Uniform1fARB)
+ RESOLVE_GL_FUNC(Uniform4fARB)
+ RESOLVE_GL_FUNC(UniformMatrix4fvARB)
+
+ RESOLVE_GL_FUNC(GenFramebuffersEXT)
+ RESOLVE_GL_FUNC(GenRenderbuffersEXT)
+ RESOLVE_GL_FUNC(BindRenderbufferEXT)
+ RESOLVE_GL_FUNC(RenderbufferStorageEXT)
+ RESOLVE_GL_FUNC(DeleteFramebuffersEXT)
+ RESOLVE_GL_FUNC(DeleteRenderbuffersEXT)
+ RESOLVE_GL_FUNC(BindFramebufferEXT)
+ RESOLVE_GL_FUNC(FramebufferTexture2DEXT)
+ RESOLVE_GL_FUNC(FramebufferRenderbufferEXT)
+ RESOLVE_GL_FUNC(CheckFramebufferStatusEXT)
+
+ RESOLVE_GL_FUNC(ActiveTexture)
+ RESOLVE_GL_FUNC(TexImage3D)
+
+ RESOLVE_GL_FUNC(GenBuffers)
+ RESOLVE_GL_FUNC(BindBuffer)
+ RESOLVE_GL_FUNC(BufferData)
+ RESOLVE_GL_FUNC(DeleteBuffers)
+ RESOLVE_GL_FUNC(MapBuffer)
+ RESOLVE_GL_FUNC(UnmapBuffer)
+
+ return ok;
+}
+
+bool GLExtensionFunctions::glslSupported() {
+ return CreateShaderObjectARB
+ && CreateShaderObjectARB
+ && ShaderSourceARB
+ && CompileShaderARB
+ && GetObjectParameterivARB
+ && DeleteObjectARB
+ && GetInfoLogARB
+ && CreateProgramObjectARB
+ && AttachObjectARB
+ && DetachObjectARB
+ && LinkProgramARB
+ && UseProgramObjectARB
+ && GetUniformLocationARB
+ && Uniform1iARB
+ && Uniform1fARB
+ && Uniform4fARB
+ && UniformMatrix4fvARB;
+}
+
+bool GLExtensionFunctions::fboSupported() {
+ return GenFramebuffersEXT
+ && GenRenderbuffersEXT
+ && BindRenderbufferEXT
+ && RenderbufferStorageEXT
+ && DeleteFramebuffersEXT
+ && DeleteRenderbuffersEXT
+ && BindFramebufferEXT
+ && FramebufferTexture2DEXT
+ && FramebufferRenderbufferEXT
+ && CheckFramebufferStatusEXT;
+}
+
+bool GLExtensionFunctions::openGL15Supported() {
+ return ActiveTexture
+ && TexImage3D
+ && GenBuffers
+ && BindBuffer
+ && BufferData
+ && DeleteBuffers
+ && MapBuffer
+ && UnmapBuffer;
+}
+
+#undef RESOLVE_GL_FUNC
diff --git a/demos/boxes/glextensions.h b/demos/boxes/glextensions.h
new file mode 100644
index 0000000..74617d6
--- /dev/null
+++ b/demos/boxes/glextensions.h
@@ -0,0 +1,284 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLEXTENSIONS_H
+#define GLEXTENSIONS_H
+
+#include <QtOpenGL>
+
+/*
+Functions resolved:
+
+glCreateShaderObjectARB
+glShaderSourceARB
+glCompileShaderARB
+glGetObjectParameterivARB
+glDeleteObjectARB
+glGetInfoLogARB
+glCreateProgramObjectARB
+glAttachObjectARB
+glDetachObjectARB
+glLinkProgramARB
+glUseProgramObjectARB
+glGetUniformLocationARB
+glUniform1iARB
+glUniform1fARB
+glUniform4fARB
+glUniformMatrix4fvARB
+
+glGenFramebuffersEXT
+glGenRenderbuffersEXT
+glBindRenderbufferEXT
+glRenderbufferStorageEXT
+glDeleteFramebuffersEXT
+glDeleteRenderbuffersEXT
+glBindFramebufferEXT
+glFramebufferTexture2DEXT
+glFramebufferRenderbufferEXT
+glCheckFramebufferStatusEXT
+
+glActiveTexture
+glTexImage3D
+
+glGenBuffers
+glBindBuffer
+glBufferData
+glDeleteBuffers
+glMapBuffer
+glUnmapBuffer
+*/
+
+#ifndef Q_WS_MAC
+# ifndef APIENTRYP
+# ifdef APIENTRY
+# define APIENTRYP APIENTRY *
+# else
+# define APIENTRY
+# define APIENTRYP *
+# endif
+# endif
+#else
+# define APIENTRY
+# define APIENTRYP *
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_TEXTURE_3D 0x806F
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_BGRA 0x80E1
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+//#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+//#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+//#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+//#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+//#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#endif
+
+#ifndef GL_VERSION_1_5
+typedef ptrdiff_t GLsizeiptr;
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_READ_WRITE 0x88BA
+#define GL_STATIC_DRAW 0x88E4
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_VERTEX_SHADER_ARB 0x8B31
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_FRAGMENT_SHADER_ARB 0x8B30
+#endif
+
+#ifndef GL_ARB_shader_objects
+typedef char GLcharARB;
+typedef unsigned int GLhandleARB;
+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
+#endif
+
+typedef GLhandleARB (APIENTRY *_glCreateShaderObjectARB) (GLenum);
+typedef void (APIENTRY *_glShaderSourceARB) (GLhandleARB, GLuint, const GLcharARB**, GLint *);
+typedef void (APIENTRY *_glCompileShaderARB) (GLhandleARB);
+typedef void (APIENTRY *_glGetObjectParameterivARB) (GLhandleARB, GLenum, int *);
+typedef void (APIENTRY *_glDeleteObjectARB) (GLhandleARB);
+typedef void (APIENTRY *_glGetInfoLogARB) (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+typedef GLhandleARB (APIENTRY *_glCreateProgramObjectARB) ();
+typedef void (APIENTRY *_glAttachObjectARB) (GLhandleARB, GLhandleARB);
+typedef void (APIENTRY *_glDetachObjectARB) (GLhandleARB, GLhandleARB);
+typedef void (APIENTRY *_glLinkProgramARB) (GLhandleARB);
+typedef void (APIENTRY *_glUseProgramObjectARB) (GLhandleARB);
+typedef GLint (APIENTRY *_glGetUniformLocationARB) (GLhandleARB, const GLcharARB *);
+typedef void (APIENTRY *_glUniform1iARB) (GLint, GLint);
+typedef void (APIENTRY *_glUniform1fARB) (GLint, GLfloat);
+typedef void (APIENTRY *_glUniform4fARB) (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+typedef void (APIENTRY *_glUniformMatrix4fvARB) (GLint, GLuint, GLboolean, const GLfloat *);
+
+typedef void (APIENTRY *_glGenFramebuffersEXT) (GLsizei, GLuint *);
+typedef void (APIENTRY *_glGenRenderbuffersEXT) (GLsizei, GLuint *);
+typedef void (APIENTRY *_glBindRenderbufferEXT) (GLenum, GLuint);
+typedef void (APIENTRY *_glRenderbufferStorageEXT) (GLenum, GLenum, GLsizei, GLsizei);
+typedef void (APIENTRY *_glDeleteFramebuffersEXT) (GLsizei, const GLuint*);
+typedef void (APIENTRY *_glDeleteRenderbuffersEXT) (GLsizei, const GLuint*);
+typedef void (APIENTRY *_glBindFramebufferEXT) (GLenum, GLuint);
+typedef void (APIENTRY *_glFramebufferTexture2DEXT) (GLenum, GLenum, GLenum, GLuint, GLint);
+typedef void (APIENTRY *_glFramebufferRenderbufferEXT) (GLenum, GLenum, GLenum, GLuint);
+typedef GLenum (APIENTRY *_glCheckFramebufferStatusEXT) (GLenum);
+
+typedef void (APIENTRY *_glActiveTexture) (GLenum);
+typedef void (APIENTRY *_glTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+
+typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *);
+typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint);
+typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptr, const GLvoid *, GLenum);
+typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *);
+typedef void *(APIENTRY *_glMapBuffer) (GLenum, GLenum);
+typedef GLboolean (APIENTRY *_glUnmapBuffer) (GLenum);
+
+struct GLExtensionFunctions
+{
+ bool resolve(const QGLContext *context);
+
+ bool glslSupported();
+ bool fboSupported();
+ bool openGL15Supported(); // the rest: multi-texture, 3D-texture, vertex buffer objects
+
+ _glCreateShaderObjectARB CreateShaderObjectARB;
+ _glShaderSourceARB ShaderSourceARB;
+ _glCompileShaderARB CompileShaderARB;
+ _glGetObjectParameterivARB GetObjectParameterivARB;
+ _glDeleteObjectARB DeleteObjectARB;
+ _glGetInfoLogARB GetInfoLogARB;
+ _glCreateProgramObjectARB CreateProgramObjectARB;
+ _glAttachObjectARB AttachObjectARB;
+ _glDetachObjectARB DetachObjectARB;
+ _glLinkProgramARB LinkProgramARB;
+ _glUseProgramObjectARB UseProgramObjectARB;
+ _glGetUniformLocationARB GetUniformLocationARB;
+ _glUniform1iARB Uniform1iARB;
+ _glUniform1fARB Uniform1fARB;
+ _glUniform4fARB Uniform4fARB;
+ _glUniformMatrix4fvARB UniformMatrix4fvARB;
+
+ _glGenFramebuffersEXT GenFramebuffersEXT;
+ _glGenRenderbuffersEXT GenRenderbuffersEXT;
+ _glBindRenderbufferEXT BindRenderbufferEXT;
+ _glRenderbufferStorageEXT RenderbufferStorageEXT;
+ _glDeleteFramebuffersEXT DeleteFramebuffersEXT;
+ _glDeleteRenderbuffersEXT DeleteRenderbuffersEXT;
+ _glBindFramebufferEXT BindFramebufferEXT;
+ _glFramebufferTexture2DEXT FramebufferTexture2DEXT;
+ _glFramebufferRenderbufferEXT FramebufferRenderbufferEXT;
+ _glCheckFramebufferStatusEXT CheckFramebufferStatusEXT;
+
+ _glActiveTexture ActiveTexture;
+ _glTexImage3D TexImage3D;
+
+ _glGenBuffers GenBuffers;
+ _glBindBuffer BindBuffer;
+ _glBufferData BufferData;
+ _glDeleteBuffers DeleteBuffers;
+ _glMapBuffer MapBuffer;
+ _glUnmapBuffer UnmapBuffer;
+};
+
+inline GLExtensionFunctions &getGLExtensionFunctions()
+{
+ static GLExtensionFunctions funcs;
+ return funcs;
+}
+
+#define glCreateShaderObjectARB getGLExtensionFunctions().CreateShaderObjectARB
+#define glShaderSourceARB getGLExtensionFunctions().ShaderSourceARB
+#define glCompileShaderARB getGLExtensionFunctions().CompileShaderARB
+#define glGetObjectParameterivARB getGLExtensionFunctions().GetObjectParameterivARB
+#define glDeleteObjectARB getGLExtensionFunctions().DeleteObjectARB
+#define glGetInfoLogARB getGLExtensionFunctions().GetInfoLogARB
+#define glCreateProgramObjectARB getGLExtensionFunctions().CreateProgramObjectARB
+#define glAttachObjectARB getGLExtensionFunctions().AttachObjectARB
+#define glDetachObjectARB getGLExtensionFunctions().DetachObjectARB
+#define glLinkProgramARB getGLExtensionFunctions().LinkProgramARB
+#define glUseProgramObjectARB getGLExtensionFunctions().UseProgramObjectARB
+#define glGetUniformLocationARB getGLExtensionFunctions().GetUniformLocationARB
+#define glUniform1iARB getGLExtensionFunctions().Uniform1iARB
+#define glUniform1fARB getGLExtensionFunctions().Uniform1fARB
+#define glUniform4fARB getGLExtensionFunctions().Uniform4fARB
+#define glUniformMatrix4fvARB getGLExtensionFunctions().UniformMatrix4fvARB
+
+#define glGenFramebuffersEXT getGLExtensionFunctions().GenFramebuffersEXT
+#define glGenRenderbuffersEXT getGLExtensionFunctions().GenRenderbuffersEXT
+#define glBindRenderbufferEXT getGLExtensionFunctions().BindRenderbufferEXT
+#define glRenderbufferStorageEXT getGLExtensionFunctions().RenderbufferStorageEXT
+#define glDeleteFramebuffersEXT getGLExtensionFunctions().DeleteFramebuffersEXT
+#define glDeleteRenderbuffersEXT getGLExtensionFunctions().DeleteRenderbuffersEXT
+#define glBindFramebufferEXT getGLExtensionFunctions().BindFramebufferEXT
+#define glFramebufferTexture2DEXT getGLExtensionFunctions().FramebufferTexture2DEXT
+#define glFramebufferRenderbufferEXT getGLExtensionFunctions().FramebufferRenderbufferEXT
+#define glCheckFramebufferStatusEXT getGLExtensionFunctions().CheckFramebufferStatusEXT
+
+#define glActiveTexture getGLExtensionFunctions().ActiveTexture
+#define glTexImage3D getGLExtensionFunctions().TexImage3D
+
+#define glGenBuffers getGLExtensionFunctions().GenBuffers
+#define glBindBuffer getGLExtensionFunctions().BindBuffer
+#define glBufferData getGLExtensionFunctions().BufferData
+#define glDeleteBuffers getGLExtensionFunctions().DeleteBuffers
+#define glMapBuffer getGLExtensionFunctions().MapBuffer
+#define glUnmapBuffer getGLExtensionFunctions().UnmapBuffer
+
+#endif
diff --git a/demos/boxes/glshaders.cpp b/demos/boxes/glshaders.cpp
new file mode 100644
index 0000000..b6999a8
--- /dev/null
+++ b/demos/boxes/glshaders.cpp
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glshaders.h"
+
+#define GLSHADERS_ASSERT_OPENGL(prefix, assertion, returnStatement) \
+if (m_failed || !(assertion)) { \
+ if (!m_failed) qCritical(prefix ": The necessary OpenGL functions are not available."); \
+ m_failed = true; \
+ returnStatement; \
+}
+
+
+GLShader::GLShader(const char *data, int size, GLenum shaderType)
+: m_compileError(false), m_failed(false)
+{
+ GLSHADERS_ASSERT_OPENGL("GLShader::GLShader",
+ glCreateShaderObjectARB && glShaderSourceARB && glCompileShaderARB && glGetObjectParameterivARB, return)
+
+ m_shader = glCreateShaderObjectARB(shaderType);
+
+ GLint glSize = size;
+ glShaderSourceARB(m_shader, 1, &data, &glSize);
+ glCompileShaderARB(m_shader);
+ int status;
+ glGetObjectParameterivARB(m_shader, GL_OBJECT_COMPILE_STATUS_ARB, &status);
+ m_compileError = (status != 1);
+}
+
+GLShader::GLShader(const QString& fileName, GLenum shaderType)
+ : m_compileError(false), m_failed(false)
+{
+ GLSHADERS_ASSERT_OPENGL("GLShader::GLShader",
+ glCreateShaderObjectARB && glShaderSourceARB && glCompileShaderARB && glGetObjectParameterivARB, return)
+
+ m_shader = glCreateShaderObjectARB(shaderType);
+
+ QFile file(fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ QByteArray bytes = file.readAll();
+ GLint size = file.size();
+ const char *p = bytes.data();
+ file.close();
+ glShaderSourceARB(m_shader, 1, &p, &size);
+ glCompileShaderARB(m_shader);
+ int status;
+ glGetObjectParameterivARB(m_shader, GL_OBJECT_COMPILE_STATUS_ARB, &status);
+ m_compileError = (status != 1);
+ } else {
+ m_compileError = true;
+ }
+}
+
+GLShader::~GLShader()
+{
+ GLSHADERS_ASSERT_OPENGL("GLShader::~GLShader", glDeleteObjectARB, return)
+
+ glDeleteObjectARB(m_shader);
+}
+
+QString GLShader::log()
+{
+ GLSHADERS_ASSERT_OPENGL("GLShader::log", glGetObjectParameterivARB
+ && glGetInfoLogARB, return QLatin1String("GLSL not supported."))
+
+ int length;
+ glGetObjectParameterivARB(m_shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);
+ char *log = new char[length + 1];
+ GLsizei glLength = length;
+ glGetInfoLogARB(m_shader, glLength, &glLength, log);
+ log[glLength] = '\0';
+ QString result(log);
+ delete log;
+ return result;
+}
+
+GLVertexShader::GLVertexShader(const char *data, int size) : GLShader(data, size, GL_VERTEX_SHADER_ARB)
+{
+}
+
+GLVertexShader::GLVertexShader(const QString& fileName) : GLShader(fileName, GL_VERTEX_SHADER_ARB)
+{
+}
+
+GLFragmentShader::GLFragmentShader(const char *data, int size) : GLShader(data, size, GL_FRAGMENT_SHADER_ARB)
+{
+}
+
+GLFragmentShader::GLFragmentShader(const QString& fileName) : GLShader(fileName, GL_FRAGMENT_SHADER_ARB)
+{
+}
+
+GLProgram::GLProgram() : m_linked(false), m_linkError(false), m_failed(false)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::GLProgram", glCreateProgramObjectARB, return)
+
+ m_program = glCreateProgramObjectARB();
+}
+
+GLProgram::~GLProgram()
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::~GLProgram", glDeleteObjectARB, return)
+
+ glDeleteObjectARB(m_program);
+}
+
+void GLProgram::attach(const GLShader &shader)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::attach", glAttachObjectARB, return)
+
+ glAttachObjectARB(m_program, shader.m_shader);
+ m_linked = m_linkError = false;
+}
+
+void GLProgram::detach(const GLShader &shader)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::detach", glDetachObjectARB, return)
+
+ glDetachObjectARB(m_program, shader.m_shader);
+ m_linked = m_linkError = false;
+}
+
+bool GLProgram::failed()
+{
+ if (m_failed || m_linkError)
+ return true;
+
+ if (m_linked)
+ return false;
+
+ GLSHADERS_ASSERT_OPENGL("GLProgram::failed", glLinkProgramARB && glGetObjectParameterivARB, return true)
+
+ glLinkProgramARB(m_program);
+ int status;
+ glGetObjectParameterivARB(m_program, GL_OBJECT_LINK_STATUS_ARB, &status);
+ m_linkError = !(m_linked = (status == 1));
+ return m_linkError;
+}
+
+QString GLProgram::log()
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::log", glGetObjectParameterivARB && glGetInfoLogARB,
+ return QLatin1String("Failed."))
+
+ int length;
+ glGetObjectParameterivARB(m_program, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);
+ char *log = new char[length + 1];
+ GLsizei glLength = length;
+ glGetInfoLogARB(m_program, glLength, &glLength, log);
+ log[glLength] = '\0';
+ QString result(log);
+ delete log;
+ return result;
+}
+
+void GLProgram::bind()
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::bind", glUseProgramObjectARB, return)
+
+ if (!failed())
+ glUseProgramObjectARB(m_program);
+}
+
+void GLProgram::unbind()
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::bind", glUseProgramObjectARB, return)
+
+ glUseProgramObjectARB(0);
+}
+
+bool GLProgram::hasParameter(const QString& name)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::hasParameter", glGetUniformLocationARB, return false)
+
+ if (!failed()) {
+ QByteArray asciiName = name.toAscii();
+ return -1 != glGetUniformLocationARB(m_program, asciiName.data());
+ }
+ return false;
+}
+
+void GLProgram::setInt(const QString& name, int value)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::setInt", glGetUniformLocationARB && glUniform1iARB, return)
+
+ if (!failed()) {
+ QByteArray asciiName = name.toAscii();
+ int loc = glGetUniformLocationARB(m_program, asciiName.data());
+ glUniform1iARB(loc, value);
+ }
+}
+
+void GLProgram::setFloat(const QString& name, float value)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::setFloat", glGetUniformLocationARB && glUniform1fARB, return)
+
+ if (!failed()) {
+ QByteArray asciiName = name.toAscii();
+ int loc = glGetUniformLocationARB(m_program, asciiName.data());
+ glUniform1fARB(loc, value);
+ }
+}
+
+void GLProgram::setColor(const QString& name, QRgb value)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::setColor", glGetUniformLocationARB && glUniform4fARB, return)
+
+ //qDebug() << "Setting color" << name;
+ if (!failed()) {
+ QByteArray asciiName = name.toAscii();
+ int loc = glGetUniformLocationARB(m_program, asciiName.data());
+ //qDebug() << "Location of" << name << "is" << loc;
+ QColor color(value);
+ glUniform4fARB(loc, color.redF(), color.greenF(), color.blueF(), color.alphaF());
+ }
+}
+
+void GLProgram::setMatrix(const QString& name, const gfx::Matrix4x4f &mat)
+{
+ GLSHADERS_ASSERT_OPENGL("GLProgram::setMatrix", glGetUniformLocationARB && glUniformMatrix4fvARB, return)
+
+ if (!failed()) {
+ QByteArray asciiName = name.toAscii();
+ int loc = glGetUniformLocationARB(m_program, asciiName.data());
+ //qDebug() << "Location of" << name << "is" << loc;
+ glUniformMatrix4fvARB(loc, 1, GL_FALSE, mat.bits());
+ }
+} \ No newline at end of file
diff --git a/demos/boxes/glshaders.h b/demos/boxes/glshaders.h
new file mode 100644
index 0000000..2b6209a
--- /dev/null
+++ b/demos/boxes/glshaders.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLSHADERS_H
+#define GLSHADERS_H
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "vector.h"
+
+class GLShader
+{
+public:
+ friend class GLProgram;
+ virtual ~GLShader();
+ bool failed() const {return m_failed;}
+ QString log();
+protected:
+ GLShader(const char *data, int size, GLenum shaderType);
+ GLShader(const QString& fileName, GLenum shaderType);
+
+ GLhandleARB m_shader;
+ bool m_compileError;
+ bool m_failed;
+};
+
+class GLVertexShader : public GLShader
+{
+public:
+ GLVertexShader(const char *data, int size);
+ GLVertexShader(const QString& fileName);
+};
+
+class GLFragmentShader : public GLShader
+{
+public:
+ GLFragmentShader(const char *data, int size);
+ GLFragmentShader(const QString& fileName);
+};
+
+class GLProgram
+{
+public:
+ GLProgram();
+ ~GLProgram();
+ void attach(const GLShader &shader);
+ void detach(const GLShader &shader);
+ void bind();
+ void unbind();
+ bool failed();
+ QString log();
+ bool hasParameter(const QString& name);
+ // use program before setting values
+ void setInt(const QString& name, int value);
+ void setFloat(const QString& name, float value);
+ void setColor(const QString& name, QRgb value);
+ void setMatrix(const QString& name, const gfx::Matrix4x4f &mat);
+ // TODO: add a bunch of set-functions for different types.
+private:
+ GLhandleARB m_program;
+ bool m_linked;
+ bool m_linkError;
+ bool m_failed;
+};
+
+#endif
diff --git a/demos/boxes/gltrianglemesh.h b/demos/boxes/gltrianglemesh.h
new file mode 100644
index 0000000..c06ce90
--- /dev/null
+++ b/demos/boxes/gltrianglemesh.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLTRIANGLEMESH_H
+#define GLTRIANGLEMESH_H
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "glbuffers.h"
+
+template<class TVertex, class TIndex>
+class GLTriangleMesh
+{
+public:
+ GLTriangleMesh(int vertexCount, int indexCount) : m_vb(vertexCount), m_ib(indexCount)
+ {
+ }
+
+ virtual ~GLTriangleMesh()
+ {
+ }
+
+ virtual void draw()
+ {
+ if (failed())
+ return;
+
+ int type = GL_UNSIGNED_INT;
+ if (sizeof(TIndex) == sizeof(char)) type = GL_UNSIGNED_BYTE;
+ if (sizeof(TIndex) == sizeof(short)) type = GL_UNSIGNED_SHORT;
+
+ m_vb.bind();
+ m_ib.bind();
+ glDrawElements(GL_TRIANGLES, m_ib.length(), type, BUFFER_OFFSET(0));
+ m_vb.unbind();
+ m_ib.unbind();
+ }
+
+ bool failed()
+ {
+ return m_vb.failed() || m_ib.failed();
+ }
+protected:
+ GLVertexBuffer<TVertex> m_vb;
+ GLIndexBuffer<TIndex> m_ib;
+};
+
+
+#endif
diff --git a/demos/boxes/granite.fsh b/demos/boxes/granite.fsh
new file mode 100644
index 0000000..9b75d1d
--- /dev/null
+++ b/demos/boxes/granite.fsh
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform sampler3D noise;
+
+//const vec4 graniteColors[3] = {vec4(0.0, 0.0, 0.0, 1), vec4(0.30, 0.15, 0.10, 1), vec4(0.80, 0.70, 0.75, 1)};
+uniform vec4 graniteColors[3];
+
+float steep(float x)
+{
+ return clamp(5.0 * x - 2.0, 0.0, 1.0);
+}
+
+void main()
+{
+ vec2 turbulence = vec2(0, 0);
+ float scale = 1.0;
+ for (int i = 0; i < 4; ++i) {
+ turbulence += scale * (texture3D(noise, gl_TexCoord[1].xyz / scale).xy - 0.5);
+ scale *= 0.5;
+ }
+
+ vec3 N = normalize(normal);
+ // assume directional light
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ vec4 unlitColor = mix(graniteColors[1], mix(graniteColors[0], graniteColors[2], steep(0.5 + turbulence.y)), 4.0 * abs(turbulence.x));
+ gl_FragColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+}
diff --git a/demos/boxes/main.cpp b/demos/boxes/main.cpp
new file mode 100644
index 0000000..10bbde1
--- /dev/null
+++ b/demos/boxes/main.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include "scene.h"
+
+#include <QtGui>
+#include <QGLWidget>
+
+class GraphicsView : public QGraphicsView
+{
+public:
+ GraphicsView()
+ {
+ setWindowTitle(tr("Boxes"));
+ setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ //setRenderHints(QPainter::SmoothPixmapTransform);
+ }
+
+protected:
+ void resizeEvent(QResizeEvent *event) {
+ if (scene())
+ scene()->setSceneRect(QRect(QPoint(0, 0), event->size()));
+ QGraphicsView::resizeEvent(event);
+ }
+};
+
+inline bool matchString(const char *extensionString, const char *subString)
+{
+ int subStringLength = strlen(subString);
+ return (strncmp(extensionString, subString, subStringLength) == 0)
+ && ((extensionString[subStringLength] == ' ') || (extensionString[subStringLength] == '\0'));
+}
+
+bool necessaryExtensionsSupported()
+{
+ const char *extensionString = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
+ const char *p = extensionString;
+
+ const int GL_EXT_FBO = 1;
+ const int GL_ARB_VS = 2;
+ const int GL_ARB_FS = 4;
+ const int GL_ARB_SO = 8;
+ int extensions = 0;
+
+ while (*p) {
+ if (matchString(p, "GL_EXT_framebuffer_object"))
+ extensions |= GL_EXT_FBO;
+ else if (matchString(p, "GL_ARB_vertex_shader"))
+ extensions |= GL_ARB_VS;
+ else if (matchString(p, "GL_ARB_fragment_shader"))
+ extensions |= GL_ARB_FS;
+ else if (matchString(p, "GL_ARB_shader_objects"))
+ extensions |= GL_ARB_SO;
+ while ((*p != ' ') && (*p != '\0'))
+ ++p;
+ if (*p == ' ')
+ ++p;
+ }
+ return (extensions == 15);
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ if ((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_5) == 0) {
+ QMessageBox::critical(0, "OpenGL features missing",
+ "OpenGL version 1.5 or higher is required to run this demo.\n"
+ "The program will now exit.");
+ return -1;
+ }
+
+ int maxTextureSize = 1024;
+ QGLWidget *widget = new QGLWidget(QGLFormat(QGL::SampleBuffers));
+ widget->makeCurrent();
+
+ if (!necessaryExtensionsSupported()) {
+ QMessageBox::critical(0, "OpenGL features missing",
+ "The OpenGL extensions required to run this demo are missing.\n"
+ "The program will now exit.");
+ delete widget;
+ return -2;
+ }
+
+ // Check if all the necessary functions are resolved.
+ if (!getGLExtensionFunctions().resolve(widget->context())) {
+ QMessageBox::critical(0, "OpenGL features missing",
+ "Failed to resolve OpenGL functions required to run this demo.\n"
+ "The program will now exit.");
+ delete widget;
+ return -3;
+ }
+
+ // TODO: Make conditional for final release
+ QMessageBox::information(0, "For your information",
+ "This demo can be GPU and CPU intensive and may\n"
+ "work poorly or not at all on your system.");
+
+ GraphicsView view;
+ view.setViewport(widget);
+ view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ widget->makeCurrent(); // The current context must be set before calling Scene's constructor
+ view.setScene(new Scene(1024, 768, maxTextureSize));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/demos/boxes/marble.fsh b/demos/boxes/marble.fsh
new file mode 100644
index 0000000..62d3c9f
--- /dev/null
+++ b/demos/boxes/marble.fsh
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform sampler3D noise;
+
+//const vec4 marbleColors[2] = {vec4(0.9, 0.9, 0.9, 1), vec4(0.6, 0.5, 0.5, 1)};
+uniform vec4 marbleColors[2];
+
+void main()
+{
+ float turbulence = 0.0;
+ float scale = 1.0;
+ for (int i = 0; i < 4; ++i) {
+ turbulence += scale * (texture3D(noise, 0.125 * gl_TexCoord[1].xyz / scale).x - 0.5);
+ scale *= 0.5;
+ }
+
+ vec3 N = normalize(normal);
+ // assume directional light
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ vec4 unlitColor = mix(marbleColors[0], marbleColors[1], exp(-4.0 * abs(turbulence)));
+ gl_FragColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+}
diff --git a/demos/boxes/parameters.par b/demos/boxes/parameters.par
new file mode 100644
index 0000000..50e2073
--- /dev/null
+++ b/demos/boxes/parameters.par
@@ -0,0 +1,5 @@
+color basicColor ff0e3d0e
+color woodColors ff5e3d33 ffcc9966
+float woodTubulence 0.1
+color graniteColors ff000000 ff4d261a ffccb3bf
+color marbleColors ffe6e6e6 ff998080
diff --git a/demos/boxes/qt-logo.jpg b/demos/boxes/qt-logo.jpg
new file mode 100644
index 0000000..4014b46
--- /dev/null
+++ b/demos/boxes/qt-logo.jpg
Binary files differ
diff --git a/demos/boxes/qt-logo.png b/demos/boxes/qt-logo.png
new file mode 100644
index 0000000..7d3e97e
--- /dev/null
+++ b/demos/boxes/qt-logo.png
Binary files differ
diff --git a/demos/boxes/qtbox.cpp b/demos/boxes/qtbox.cpp
new file mode 100644
index 0000000..0607698
--- /dev/null
+++ b/demos/boxes/qtbox.cpp
@@ -0,0 +1,469 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtbox.h"
+
+const qreal ROTATE_SPEED_X = 30.0 / 1000.0;
+const qreal ROTATE_SPEED_Y = 20.0 / 1000.0;
+const qreal ROTATE_SPEED_Z = 40.0 / 1000.0;
+const int MAX_ITEM_SIZE = 512;
+const int MIN_ITEM_SIZE = 16;
+
+//============================================================================//
+// ItemBase //
+//============================================================================//
+
+ItemBase::ItemBase(int size, int x, int y) : m_size(size), m_isResizing(false)
+{
+ setFlag(QGraphicsItem::ItemIsMovable, true);
+ setFlag(QGraphicsItem::ItemIsSelectable, true);
+ setFlag(QGraphicsItem::ItemIsFocusable, true);
+ setAcceptHoverEvents(true);
+ setPos(x, y);
+ m_startTime = QTime::currentTime();
+}
+
+ItemBase::~ItemBase()
+{
+}
+
+QRectF ItemBase::boundingRect() const
+{
+ return QRectF(-m_size / 2, -m_size / 2, m_size, m_size);
+}
+
+void ItemBase::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
+{
+ if (option->state & QStyle::State_Selected) {
+ painter->setRenderHint(QPainter::Antialiasing, true);
+ if (option->state & QStyle::State_HasFocus)
+ painter->setPen(Qt::yellow);
+ else
+ painter->setPen(Qt::white);
+ painter->drawRect(boundingRect());
+
+ painter->drawLine(m_size / 2 - 9, m_size / 2, m_size / 2, m_size / 2 - 9);
+ painter->drawLine(m_size / 2 - 6, m_size / 2, m_size / 2, m_size / 2 - 6);
+ painter->drawLine(m_size / 2 - 3, m_size / 2, m_size / 2, m_size / 2 - 3);
+
+ painter->setRenderHint(QPainter::Antialiasing, false);
+ }
+}
+
+void ItemBase::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
+{
+ if (!isSelected() && scene()) {
+ scene()->clearSelection();
+ setSelected(true);
+ }
+
+ QMenu menu;
+ QAction *delAction = menu.addAction("Delete");
+ QAction *newAction = menu.addAction("New");
+ QAction *growAction = menu.addAction("Grow");
+ QAction *shrinkAction = menu.addAction("Shrink");
+
+ QAction *selectedAction = menu.exec(event->screenPos());
+
+ if (selectedAction == delAction)
+ deleteSelectedItems(scene());
+ else if (selectedAction == newAction)
+ duplicateSelectedItems(scene());
+ else if (selectedAction == growAction)
+ growSelectedItems(scene());
+ else if (selectedAction == shrinkAction)
+ shrinkSelectedItems(scene());
+}
+
+void ItemBase::duplicateSelectedItems(QGraphicsScene *scene)
+{
+ if (!scene)
+ return;
+
+ QList<QGraphicsItem *> selected;
+ selected = scene->selectedItems();
+
+ foreach (QGraphicsItem *item, selected) {
+ ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
+ if (itemBase)
+ scene->addItem(itemBase->createNew(itemBase->m_size, itemBase->pos().x() + itemBase->m_size, itemBase->pos().y()));
+ }
+}
+
+void ItemBase::deleteSelectedItems(QGraphicsScene *scene)
+{
+ if (!scene)
+ return;
+
+ QList<QGraphicsItem *> selected;
+ selected = scene->selectedItems();
+
+ foreach (QGraphicsItem *item, selected) {
+ ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
+ if (itemBase)
+ delete itemBase;
+ }
+}
+
+void ItemBase::growSelectedItems(QGraphicsScene *scene)
+{
+ if (!scene)
+ return;
+
+ QList<QGraphicsItem *> selected;
+ selected = scene->selectedItems();
+
+ foreach (QGraphicsItem *item, selected) {
+ ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
+ if (itemBase) {
+ itemBase->prepareGeometryChange();
+ itemBase->m_size *= 2;
+ if (itemBase->m_size > MAX_ITEM_SIZE)
+ itemBase->m_size = MAX_ITEM_SIZE;
+ }
+ }
+}
+
+void ItemBase::shrinkSelectedItems(QGraphicsScene *scene)
+{
+ if (!scene)
+ return;
+
+ QList<QGraphicsItem *> selected;
+ selected = scene->selectedItems();
+
+ foreach (QGraphicsItem *item, selected) {
+ ItemBase *itemBase = dynamic_cast<ItemBase *>(item);
+ if (itemBase) {
+ itemBase->prepareGeometryChange();
+ itemBase->m_size /= 2;
+ if (itemBase->m_size < MIN_ITEM_SIZE)
+ itemBase->m_size = MIN_ITEM_SIZE;
+ }
+ }
+}
+
+void ItemBase::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (m_isResizing) {
+ int dx = int(2.0 * event->pos().x());
+ int dy = int(2.0 * event->pos().y());
+ prepareGeometryChange();
+ m_size = (dx > dy ? dx : dy);
+ if (m_size < MIN_ITEM_SIZE)
+ m_size = MIN_ITEM_SIZE;
+ else if (m_size > MAX_ITEM_SIZE)
+ m_size = MAX_ITEM_SIZE;
+ } else {
+ QGraphicsItem::mouseMoveEvent(event);
+ }
+}
+
+void ItemBase::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+{
+ if (m_isResizing || (isInResizeArea(event->pos()) && isSelected()))
+ setCursor(Qt::SizeFDiagCursor);
+ else
+ setCursor(Qt::ArrowCursor);
+ QGraphicsItem::hoverMoveEvent(event);
+}
+
+void ItemBase::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ static qreal z = 0.0;
+ setZValue(z += 1.0);
+ if (event->button() == Qt::LeftButton && isInResizeArea(event->pos())) {
+ m_isResizing = true;
+ } else {
+ QGraphicsItem::mousePressEvent(event);
+ }
+}
+
+void ItemBase::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton && m_isResizing) {
+ m_isResizing = false;
+ } else {
+ QGraphicsItem::mouseReleaseEvent(event);
+ }
+}
+
+void ItemBase::keyPressEvent(QKeyEvent *event)
+{
+ switch (event->key()) {
+ case Qt::Key_Delete:
+ deleteSelectedItems(scene());
+ break;
+ case Qt::Key_Insert:
+ duplicateSelectedItems(scene());
+ break;
+ case Qt::Key_Plus:
+ growSelectedItems(scene());
+ break;
+ case Qt::Key_Minus:
+ shrinkSelectedItems(scene());
+ break;
+ default:
+ QGraphicsItem::keyPressEvent(event);
+ break;
+ }
+}
+
+void ItemBase::wheelEvent(QGraphicsSceneWheelEvent *event)
+{
+ prepareGeometryChange();
+ m_size = int(m_size * exp(-event->delta() / 600.0));
+ if (m_size > MAX_ITEM_SIZE)
+ m_size = MAX_ITEM_SIZE;
+ else if (m_size < MIN_ITEM_SIZE)
+ m_size = MIN_ITEM_SIZE;
+}
+
+bool ItemBase::isInResizeArea(const QPointF &pos)
+{
+ return (-pos.y() < pos.x() - m_size + 9);
+}
+
+//============================================================================//
+// QtBox //
+//============================================================================//
+
+QtBox::QtBox(int size, int x, int y) : ItemBase(size, x, y), m_texture(0)
+{
+ for (int i = 0; i < 8; ++i) {
+ m_vertices[i][0] = (i & 1 ? 0.5f : -0.5f);
+ m_vertices[i][1] = (i & 2 ? 0.5f : -0.5f);
+ m_vertices[i][2] = (i & 4 ? 0.5f : -0.5f);
+ }
+ for (int i = 0; i < 4; ++i) {
+ m_texCoords[i][0] = (i & 1 ? 1.0f : 0.0f);
+ m_texCoords[i][1] = (i & 2 ? 1.0f : 0.0f);
+ }
+ memset(m_normals, 0, sizeof(m_normals));
+ for (int i = 0; i < 3; ++i) {
+ m_normals[2 * i + 0][i] = -1.0f;
+ m_normals[2 * i + 1][i] = 1.0f;
+ }
+}
+
+QtBox::~QtBox()
+{
+ if (m_texture)
+ delete m_texture;
+}
+
+ItemBase *QtBox::createNew(int size, int x, int y)
+{
+ return new QtBox(size, x, y);
+}
+
+void QtBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ QRectF rect = boundingRect().translated(pos());
+ float width = float(painter->device()->width());
+ float height = float(painter->device()->height());
+
+ float left = 2.0f * float(rect.left()) / width - 1.0f;
+ float right = 2.0f * float(rect.right()) / width - 1.0f;
+ float top = 1.0f - 2.0f * float(rect.top()) / height;
+ float bottom = 1.0f - 2.0f * float(rect.bottom()) / height;
+ float moveToRectMatrix[] = {
+ 0.5f * (right - left), 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.5f * (bottom - top), 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.5f * (right + left), 0.5f * (bottom + top), 0.0f, 1.0f
+ };
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadMatrixf(moveToRectMatrix);
+ gluPerspective(60.0, 1.0, 0.01, 10.0);
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ //glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_COLOR_MATERIAL);
+ glEnable(GL_NORMALIZE);
+
+ if(m_texture == 0)
+ m_texture = new GLTexture2D(":/res/boxes/qt-logo.jpg", 64, 64);
+ m_texture->bind();
+ glEnable(GL_TEXTURE_2D);
+
+ glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+ float lightColour[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ float lightDir[] = {0.0f, 0.0f, 1.0f, 0.0f};
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColour);
+ glLightfv(GL_LIGHT0, GL_POSITION, lightDir);
+ glEnable(GL_LIGHT0);
+
+ glTranslatef(0.0f, 0.0f, -1.5f);
+ glRotatef(ROTATE_SPEED_X * m_startTime.msecsTo(QTime::currentTime()), 1.0f, 0.0f, 0.0f);
+ glRotatef(ROTATE_SPEED_Y * m_startTime.msecsTo(QTime::currentTime()), 0.0f, 1.0f, 0.0f);
+ glRotatef(ROTATE_SPEED_Z * m_startTime.msecsTo(QTime::currentTime()), 0.0f, 0.0f, 1.0f);
+ int dt = m_startTime.msecsTo(QTime::currentTime());
+ if (dt < 500)
+ glScalef(dt / 500.0f, dt / 500.0f, dt / 500.0f);
+
+ for (int dir = 0; dir < 3; ++dir) {
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0);
+
+ glBegin(GL_TRIANGLE_STRIP);
+ glNormal3fv(m_normals[2 * dir + 0].bits());
+ for (int i = 0; i < 2; ++i) {
+ for (int j = 0; j < 2; ++j) {
+ glTexCoord2fv(m_texCoords[(j << 1) | i].bits());
+ glVertex3fv(m_vertices[(i << ((dir + 2) % 3)) | (j << ((dir + 1) % 3))].bits());
+ }
+ }
+ glEnd();
+
+ glBegin(GL_TRIANGLE_STRIP);
+ glNormal3fv(m_normals[2 * dir + 1].bits());
+ for (int i = 0; i < 2; ++i) {
+ for (int j = 0; j < 2; ++j) {
+ glTexCoord2fv(m_texCoords[(j << 1) | i].bits());
+ glVertex3fv(m_vertices[(1 << dir) | (i << ((dir + 1) % 3)) | (j << ((dir + 2) % 3))].bits());
+ }
+ }
+ glEnd();
+ }
+ m_texture->unbind();
+
+ //glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_LIGHTING);
+ glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_LIGHT0);
+ glDisable(GL_NORMALIZE);
+
+ glPopMatrix();
+
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+
+ ItemBase::paint(painter, option, widget);
+}
+
+//============================================================================//
+// CircleItem //
+//============================================================================//
+
+CircleItem::CircleItem(int size, int x, int y) : ItemBase(size, x, y)
+{
+ m_color = QColor::fromHsv(rand() % 360, 255, 255);
+}
+
+void CircleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ int dt = m_startTime.msecsTo(QTime::currentTime());
+
+ qreal r0 = 0.5 * m_size * (1.0 - exp(-0.001 * ((dt + 3800) % 4000)));
+ qreal r1 = 0.5 * m_size * (1.0 - exp(-0.001 * ((dt + 0) % 4000)));
+ qreal r2 = 0.5 * m_size * (1.0 - exp(-0.001 * ((dt + 1800) % 4000)));
+ qreal r3 = 0.5 * m_size * (1.0 - exp(-0.001 * ((dt + 2000) % 4000)));
+
+ if (r0 > r1)
+ r0 = 0.0;
+ if (r2 > r3)
+ r2 = 0.0;
+
+ QPainterPath path;
+ path.moveTo(r1, 0.0);
+ path.arcTo(-r1, -r1, 2 * r1, 2 * r1, 0.0, 360.0);
+ path.lineTo(r0, 0.0);
+ path.arcTo(-r0, -r0, 2 * r0, 2 * r0, 0.0, -360.0);
+ path.closeSubpath();
+ path.moveTo(r3, 0.0);
+ path.arcTo(-r3, -r3, 2 * r3, 2 * r3, 0.0, 360.0);
+ path.lineTo(r0, 0.0);
+ path.arcTo(-r2, -r2, 2 * r2, 2 * r2, 0.0, -360.0);
+ path.closeSubpath();
+ painter->setRenderHint(QPainter::Antialiasing, true);
+ painter->setBrush(QBrush(m_color));
+ painter->setPen(Qt::NoPen);
+ painter->drawPath(path);
+ painter->setBrush(Qt::NoBrush);
+ painter->setPen(Qt::SolidLine);
+ painter->setRenderHint(QPainter::Antialiasing, false);
+
+ ItemBase::paint(painter, option, widget);
+}
+
+ItemBase *CircleItem::createNew(int size, int x, int y)
+{
+ return new CircleItem(size, x, y);
+}
+
+//============================================================================//
+// SquareItem //
+//============================================================================//
+
+SquareItem::SquareItem(int size, int x, int y) : ItemBase(size, x, y)
+{
+ m_image = QPixmap(":/res/boxes/square.jpg");
+}
+
+void SquareItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ int dt = m_startTime.msecsTo(QTime::currentTime());
+ QTransform oldTransform = painter->worldTransform();
+ int dtMod = dt % 2000;
+ qreal amp = 0.002 * (dtMod < 1000 ? dtMod : 2000 - dtMod) - 1.0;
+
+ qreal scale = 0.6 + 0.2 * amp * amp;
+ painter->setWorldTransform(QTransform().rotate(15.0 * amp).scale(scale, scale), true);
+
+ painter->drawPixmap(-m_size / 2, -m_size / 2, m_size, m_size, m_image);
+
+ painter->setWorldTransform(oldTransform, false);
+ ItemBase::paint(painter, option, widget);
+}
+
+ItemBase *SquareItem::createNew(int size, int x, int y)
+{
+ return new SquareItem(size, x, y);
+}
diff --git a/demos/boxes/qtbox.h b/demos/boxes/qtbox.h
new file mode 100644
index 0000000..aae8256
--- /dev/null
+++ b/demos/boxes/qtbox.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTBOX_H
+#define QTBOX_H
+
+#include <QtGui>
+
+#include "vector.h"
+#include "glbuffers.h"
+
+class ItemBase : public QObject, public QGraphicsItem
+{
+ Q_OBJECT
+public:
+ ItemBase(int size, int x, int y);
+ virtual ~ItemBase();
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+protected:
+ virtual ItemBase *createNew(int size, int x, int y) = 0;
+ virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ virtual void keyPressEvent(QKeyEvent *event);
+ virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
+ bool isInResizeArea(const QPointF &pos);
+
+ static void duplicateSelectedItems(QGraphicsScene *scene);
+ static void deleteSelectedItems(QGraphicsScene *scene);
+ static void growSelectedItems(QGraphicsScene *scene);
+ static void shrinkSelectedItems(QGraphicsScene *scene);
+
+ int m_size;
+ QTime m_startTime;
+ bool m_isResizing;
+};
+
+class QtBox : public ItemBase
+{
+public:
+ QtBox(int size, int x, int y);
+ virtual ~QtBox();
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+protected:
+ virtual ItemBase *createNew(int size, int x, int y);
+private:
+ gfx::Vector3f m_vertices[8];
+ gfx::Vector2f m_texCoords[4];
+ gfx::Vector3f m_normals[6];
+ GLTexture *m_texture;
+};
+
+class CircleItem : public ItemBase
+{
+public:
+ CircleItem(int size, int x, int y);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+protected:
+ virtual ItemBase *createNew(int size, int x, int y);
+
+ QColor m_color;
+};
+
+class SquareItem : public ItemBase
+{
+public:
+ SquareItem(int size, int x, int y);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+protected:
+ virtual ItemBase *createNew(int size, int x, int y);
+
+ QPixmap m_image;
+};
+
+#endif
diff --git a/demos/boxes/reflection.fsh b/demos/boxes/reflection.fsh
new file mode 100644
index 0000000..d5807ee
--- /dev/null
+++ b/demos/boxes/reflection.fsh
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform samplerCube env;
+uniform mat4 view;
+
+void main()
+{
+ vec3 N = normalize(normal);
+ vec3 R = 2.0 * dot(-position, N) * N + position;
+ gl_FragColor = textureCube(env, R * mat3(view[0].xyz, view[1].xyz, view[2].xyz));
+}
diff --git a/demos/boxes/refraction.fsh b/demos/boxes/refraction.fsh
new file mode 100644
index 0000000..f91c24d
--- /dev/null
+++ b/demos/boxes/refraction.fsh
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform samplerCube env;
+uniform mat4 view;
+
+// Arrays don't work here on glsl < 120, apparently.
+//const float coeffs[6] = float[6](1.0/2.0, 1.0/2.1, 1.0/2.2, 1.0/2.3, 1.0/2.4, 1.0/2.5);
+float coeffs(int i)
+{
+ return 1.0 / (2.0 + 0.1 * float(i));
+}
+
+void main()
+{
+ vec3 N = normalize(normal);
+ vec3 I = -normalize(position);
+ float IdotN = dot(I, N);
+ float scales[6];
+ vec3 C[6];
+ for (int i = 0; i < 6; ++i) {
+ scales[i] = (IdotN - sqrt(1.0 - coeffs(i) + coeffs(i) * (IdotN * IdotN)));
+ C[i] = textureCube(env, (-I + coeffs(i) * N) * mat3(view[0].xyz, view[1].xyz, view[2].xyz)).xyz;
+ }
+
+ gl_FragColor = 0.25 * vec4(C[5].x + 2.0*C[0].x + C[1].x, C[1].y + 2.0*C[2].y + C[3].y,
+ C[3].z + 2.0*C[4].z + C[5].z, 4.0);
+}
diff --git a/demos/boxes/roundedbox.cpp b/demos/boxes/roundedbox.cpp
new file mode 100644
index 0000000..f238da2
--- /dev/null
+++ b/demos/boxes/roundedbox.cpp
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "roundedbox.h"
+
+//============================================================================//
+// P3T2N3Vertex //
+//============================================================================//
+
+VertexDescription P3T2N3Vertex::description[] = {
+ {VertexDescription::Position, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, position) / sizeof(float), offsetof(P3T2N3Vertex, position), 0},
+ {VertexDescription::TexCoord, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, texCoord) / sizeof(float), offsetof(P3T2N3Vertex, texCoord), 0},
+ {VertexDescription::Normal, GL_FLOAT, SIZE_OF_MEMBER(P3T2N3Vertex, normal) / sizeof(float), offsetof(P3T2N3Vertex, normal), 0},
+ {VertexDescription::Null, 0, 0, 0, 0},
+};
+
+//============================================================================//
+// GLRoundedBox //
+//============================================================================//
+
+float lerp(float a, float b, float t)
+{
+ return a * (1.0f - t) + b * t;
+}
+
+GLRoundedBox::GLRoundedBox(float r, float scale, int n)
+ : GLTriangleMesh<P3T2N3Vertex, unsigned short>((n+2)*(n+3)*4, (n+1)*(n+1)*24+36+72*(n+1))
+{
+ int vidx = 0, iidx = 0;
+ int vertexCountPerCorner = (n + 2) * (n + 3) / 2;
+
+ P3T2N3Vertex *vp = m_vb.lock();
+ unsigned short *ip = m_ib.lock();
+
+ if (!vp || !ip) {
+ qWarning("GLRoundedBox::GLRoundedBox: Failed to lock vertex buffer and/or index buffer.");
+ m_ib.unlock();
+ m_vb.unlock();
+ return;
+ }
+
+ for (int corner = 0; corner < 8; ++corner) {
+ gfx::Vector3f centre;
+ centre[0] = (corner & 1 ? 1.0f : -1.0f);
+ centre[1] = (corner & 2 ? 1.0f : -1.0f);
+ centre[2] = (corner & 4 ? 1.0f : -1.0f);
+ int winding = (corner & 1) ^ ((corner >> 1) & 1) ^ (corner >> 2);
+ int offsX = ((corner ^ 1) - corner) * vertexCountPerCorner;
+ int offsY = ((corner ^ 2) - corner) * vertexCountPerCorner;
+ int offsZ = ((corner ^ 4) - corner) * vertexCountPerCorner;
+
+ // Face polygons
+ if (winding) {
+ ip[iidx++] = vidx;
+ ip[iidx++] = vidx + offsX;
+ ip[iidx++] = vidx + offsY;
+
+ ip[iidx++] = vidx + vertexCountPerCorner - n - 2;
+ ip[iidx++] = vidx + vertexCountPerCorner - n - 2 + offsY;
+ ip[iidx++] = vidx + vertexCountPerCorner - n - 2 + offsZ;
+
+ ip[iidx++] = vidx + vertexCountPerCorner - 1;
+ ip[iidx++] = vidx + vertexCountPerCorner - 1 + offsZ;
+ ip[iidx++] = vidx + vertexCountPerCorner - 1 + offsX;
+ }
+
+ for (int i = 0; i < n + 2; ++i) {
+
+ // Edge polygons
+ if (winding && i < n + 1) {
+ ip[iidx++] = vidx + i + 1;
+ ip[iidx++] = vidx;
+ ip[iidx++] = vidx + offsY + i + 1;
+ ip[iidx++] = vidx + offsY;
+ ip[iidx++] = vidx + offsY + i + 1;
+ ip[iidx++] = vidx;
+
+ ip[iidx++] = vidx + i;
+ ip[iidx++] = vidx + 2 * i + 2;
+ ip[iidx++] = vidx + i + offsX;
+ ip[iidx++] = vidx + 2 * i + offsX + 2;
+ ip[iidx++] = vidx + i + offsX;
+ ip[iidx++] = vidx + 2 * i + 2;
+
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 1 - i;
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 2 - i;
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 1 - i + offsZ;
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 2 - i + offsZ;
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 1 - i + offsZ;
+ ip[iidx++] = (corner + 1) * vertexCountPerCorner - 2 - i;
+ }
+
+ for (int j = 0; j <= i; ++j) {
+ gfx::Vector3f normal = gfx::Vector3f::vector(i - j, j, n + 1 - i).normalized();
+ gfx::Vector3f pos = centre * (0.5f - r + r * normal);
+
+ vp[vidx].position = scale * pos;
+ vp[vidx].normal = centre * normal;
+ vp[vidx].texCoord = gfx::Vector2f::vector(pos[0], pos[1]) + 0.5f;
+
+ // Corner polygons
+ if (i < n + 1) {
+ ip[iidx++] = vidx;
+ ip[iidx++] = vidx + i + 2 - winding;
+ ip[iidx++] = vidx + i + 1 + winding;
+ }
+ if (i < n) {
+ ip[iidx++] = vidx + i + 1 + winding;
+ ip[iidx++] = vidx + i + 2 - winding;
+ ip[iidx++] = vidx + 2 * i + 4;
+ }
+
+ ++vidx;
+ }
+ }
+
+ }
+
+ m_ib.unlock();
+ m_vb.unlock();
+}
+
diff --git a/demos/boxes/roundedbox.h b/demos/boxes/roundedbox.h
new file mode 100644
index 0000000..b934ade
--- /dev/null
+++ b/demos/boxes/roundedbox.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ROUNDEDBOX_H
+#define ROUNDEDBOX_H
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "gltrianglemesh.h"
+#include "vector.h"
+#include "glbuffers.h"
+
+struct P3T2N3Vertex
+{
+ gfx::Vector3f position;
+ gfx::Vector2f texCoord;
+ gfx::Vector3f normal;
+ static VertexDescription description[];
+};
+
+class GLRoundedBox : public GLTriangleMesh<P3T2N3Vertex, unsigned short>
+{
+public:
+ // 0 < r < 0.5, 0 <= n <= 125
+ GLRoundedBox(float r = 0.25f, float scale = 1.0f, int n = 10);
+};
+
+
+#endif
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
new file mode 100644
index 0000000..1040e17
--- /dev/null
+++ b/demos/boxes/scene.cpp
@@ -0,0 +1,1057 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "scene.h"
+
+#include "3rdparty/fbm.h"
+
+void checkGLErrors(const QString& prefix)
+{
+ switch (glGetError()) {
+ case GL_NO_ERROR:
+ //qDebug() << prefix << tr("No error.");
+ break;
+ case GL_INVALID_ENUM:
+ qDebug() << prefix << QObject::tr("Invalid enum.");
+ break;
+ case GL_INVALID_VALUE:
+ qDebug() << prefix << QObject::tr("Invalid value.");
+ break;
+ case GL_INVALID_OPERATION:
+ qDebug() << prefix << QObject::tr("Invalid operation.");
+ break;
+ case GL_STACK_OVERFLOW:
+ qDebug() << prefix << QObject::tr("Stack overflow.");
+ break;
+ case GL_STACK_UNDERFLOW:
+ qDebug() << prefix << QObject::tr("Stack underflow.");
+ break;
+ case GL_OUT_OF_MEMORY:
+ qDebug() << prefix << QObject::tr("Out of memory.");
+ break;
+ default:
+ qDebug() << prefix << QObject::tr("Unknown error.");
+ break;
+ }
+}
+
+//============================================================================//
+// ColorEdit //
+//============================================================================//
+
+ColorEdit::ColorEdit(QRgb initialColor, int id)
+ : m_color(initialColor), m_id(id)
+{
+ QHBoxLayout *layout = new QHBoxLayout;
+ setLayout(layout);
+ layout->setContentsMargins(0, 0, 0, 0);
+
+ m_lineEdit = new QLineEdit(QString::number(m_color, 16));
+ layout->addWidget(m_lineEdit);
+
+ m_button = new QFrame;
+ QPalette palette = m_button->palette();
+ palette.setColor(QPalette::Window, QColor(m_color));
+ m_button->setPalette(palette);
+ m_button->setAutoFillBackground(true);
+ m_button->setMinimumSize(32, 0);
+ m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ m_button->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ layout->addWidget(m_button);
+
+ connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(editDone()));
+}
+
+void ColorEdit::editDone()
+{
+ bool ok;
+ QRgb newColor = m_lineEdit->text().toUInt(&ok, 16);
+ if (ok)
+ setColor(newColor);
+}
+
+void ColorEdit::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ QColor color(m_color);
+ QColorDialog dialog(color, 0);
+ dialog.setOption(QColorDialog::ShowAlphaChannel, true);
+// The ifdef block is a workaround for the beta, TODO: remove when bug 238525 is fixed
+#ifdef Q_WS_MAC
+ dialog.setOption(QColorDialog::DontUseNativeDialog, true);
+#endif
+ dialog.move(280, 120);
+ if (dialog.exec() == QDialog::Rejected)
+ return;
+ QRgb newColor = dialog.selectedColor().rgba();
+ if (newColor == m_color)
+ return;
+ setColor(newColor);
+ }
+}
+
+void ColorEdit::setColor(QRgb color)
+{
+ m_color = color;
+ m_lineEdit->setText(QString::number(m_color, 16)); // "Clean up" text
+ QPalette palette = m_button->palette();
+ palette.setColor(QPalette::Window, QColor(m_color));
+ m_button->setPalette(palette);
+ emit colorChanged(m_color, m_id);
+}
+
+//============================================================================//
+// FloatEdit //
+//============================================================================//
+
+FloatEdit::FloatEdit(float initialValue, int id)
+ : m_value(initialValue), m_id(id)
+{
+ QHBoxLayout *layout = new QHBoxLayout;
+ setLayout(layout);
+ layout->setContentsMargins(0, 0, 0, 0);
+
+ m_lineEdit = new QLineEdit(QString::number(m_value));
+ layout->addWidget(m_lineEdit);
+
+ connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(editDone()));
+}
+
+void FloatEdit::editDone()
+{
+ bool ok;
+ float newValue = m_lineEdit->text().toFloat(&ok);
+ if (ok) {
+ m_value = newValue;
+ m_lineEdit->setText(QString::number(m_value)); // "Clean up" text
+ emit valueChanged(m_value, m_id);
+ }
+}
+
+//============================================================================//
+// TwoSidedGraphicsWidget //
+//============================================================================//
+
+TwoSidedGraphicsWidget::TwoSidedGraphicsWidget(QGraphicsScene *scene)
+ : QObject(scene)
+ , m_current(0)
+ , m_angle(0)
+ , m_delta(0)
+{
+ for (int i = 0; i < 2; ++i)
+ m_proxyWidgets[i] = 0;
+}
+
+void TwoSidedGraphicsWidget::setWidget(int index, QWidget *widget)
+{
+ if (index < 0 || index >= 2)
+ {
+ qWarning("TwoSidedGraphicsWidget::setWidget: Index out of bounds, index == %d", index);
+ return;
+ }
+
+ GraphicsWidget *proxy = new GraphicsWidget;
+ proxy->setWidget(widget);
+
+ if (m_proxyWidgets[index])
+ delete m_proxyWidgets[index];
+ m_proxyWidgets[index] = proxy;
+
+ proxy->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ proxy->setZValue(1e30); // Make sure the dialog is drawn on top of all other (OpenGL) items
+
+ if (index != m_current)
+ proxy->setVisible(false);
+
+ qobject_cast<QGraphicsScene *>(parent())->addItem(proxy);
+}
+
+QWidget *TwoSidedGraphicsWidget::widget(int index)
+{
+ if (index < 0 || index >= 2)
+ {
+ qWarning("TwoSidedGraphicsWidget::widget: Index out of bounds, index == %d", index);
+ return 0;
+ }
+ return m_proxyWidgets[index]->widget();
+}
+
+void TwoSidedGraphicsWidget::flip()
+{
+ m_delta = (m_current == 0 ? 9 : -9);
+ animateFlip();
+}
+
+void TwoSidedGraphicsWidget::animateFlip()
+{
+ m_angle += m_delta;
+ if (m_angle == 90) {
+ int old = m_current;
+ m_current ^= 1;
+ m_proxyWidgets[old]->setVisible(false);
+ m_proxyWidgets[m_current]->setVisible(true);
+ m_proxyWidgets[m_current]->setGeometry(m_proxyWidgets[old]->geometry());
+ }
+
+ QRectF r = m_proxyWidgets[m_current]->boundingRect();
+ m_proxyWidgets[m_current]->setTransform(QTransform()
+ .translate(r.width() / 2, r.height() / 2)
+ .rotate(m_angle - 180 * m_current, Qt::YAxis)
+ .translate(-r.width() / 2, -r.height() / 2));
+
+ if ((m_current == 0 && m_angle > 0) || (m_current == 1 && m_angle < 180))
+ QTimer::singleShot(25, this, SLOT(animateFlip()));
+}
+
+QVariant GraphicsWidget::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if (change == ItemPositionChange && scene()) {
+ QRectF rect = boundingRect();
+ QPointF pos = value.toPointF();
+ QRectF sceneRect = scene()->sceneRect();
+ if (pos.x() + rect.left() < sceneRect.left())
+ pos.setX(sceneRect.left() - rect.left());
+ else if (pos.x() + rect.right() >= sceneRect.right())
+ pos.setX(sceneRect.right() - rect.right());
+ if (pos.y() + rect.top() < sceneRect.top())
+ pos.setY(sceneRect.top() - rect.top());
+ else if (pos.y() + rect.bottom() >= sceneRect.bottom())
+ pos.setY(sceneRect.bottom() - rect.bottom());
+ return pos;
+ }
+ return QGraphicsProxyWidget::itemChange(change, value);
+}
+
+void GraphicsWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
+{
+ setCacheMode(QGraphicsItem::NoCache);
+ setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ QGraphicsProxyWidget::resizeEvent(event);
+}
+
+void GraphicsWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ painter->setRenderHint(QPainter::Antialiasing, false);
+ QGraphicsProxyWidget::paint(painter, option, widget);
+ //painter->setRenderHint(QPainter::Antialiasing, true);
+}
+
+//============================================================================//
+// RenderOptionsDialog //
+//============================================================================//
+
+RenderOptionsDialog::RenderOptionsDialog()
+ : QDialog(0, Qt::CustomizeWindowHint | Qt::WindowTitleHint)
+{
+ setWindowOpacity(0.75);
+ setWindowTitle(tr("Options (double click to flip)"));
+ QGridLayout *layout = new QGridLayout;
+ setLayout(layout);
+ layout->setColumnStretch(1, 1);
+
+ int row = 0;
+
+ QCheckBox *check = new QCheckBox(tr("Dynamic cube map"));
+ check->setCheckState(Qt::Unchecked);
+ // Dynamic cube maps are only enabled when multi-texturing and render to texture are available.
+ check->setEnabled(glActiveTexture && glGenFramebuffersEXT);
+ connect(check, SIGNAL(stateChanged(int)), this, SIGNAL(dynamicCubemapToggled(int)));
+ layout->addWidget(check, 0, 0, 1, 2);
+ ++row;
+
+ QPalette palette;
+
+ // Load all .par files
+ // .par files have a simple syntax for specifying user adjustable uniform variables.
+ QSet<QByteArray> uniforms;
+ QList<QString> filter = QStringList("*.par");
+ QList<QFileInfo> files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
+
+ foreach (QFileInfo fileInfo, files) {
+ QFile file(fileInfo.absoluteFilePath());
+ if (file.open(QIODevice::ReadOnly)) {
+ while (!file.atEnd()) {
+ QList<QByteArray> tokens = file.readLine().simplified().split(' ');
+ QList<QByteArray>::const_iterator it = tokens.begin();
+ if (it == tokens.end())
+ continue;
+ QByteArray type = *it;
+ if (++it == tokens.end())
+ continue;
+ QByteArray name = *it;
+ bool singleElement = (tokens.size() == 3); // type, name and one value
+ char counter[10] = "000000000";
+ int counterPos = 8; // position of last digit
+ while (++it != tokens.end()) {
+ m_parameterNames << name;
+ if (!singleElement) {
+ m_parameterNames.back() += "[";
+ m_parameterNames.back() += counter + counterPos;
+ m_parameterNames.back() += "]";
+ int j = 8; // position of last digit
+ ++counter[j];
+ while (j > 0 && counter[j] > '9') {
+ counter[j] = '0';
+ ++counter[--j];
+ }
+ if (j < counterPos)
+ counterPos = j;
+ }
+
+ if (type == "color") {
+ layout->addWidget(new QLabel(m_parameterNames.back()));
+ bool ok;
+ ColorEdit *colorEdit = new ColorEdit(it->toUInt(&ok, 16), m_parameterNames.size() - 1);
+ m_parameterEdits << colorEdit;
+ layout->addWidget(colorEdit);
+ connect(colorEdit, SIGNAL(colorChanged(QRgb, int)), this, SLOT(setColorParameter(QRgb, int)));
+ ++row;
+ } else if (type == "float") {
+ layout->addWidget(new QLabel(m_parameterNames.back()));
+ bool ok;
+ FloatEdit *floatEdit = new FloatEdit(it->toFloat(&ok), m_parameterNames.size() - 1);
+ m_parameterEdits << floatEdit;
+ layout->addWidget(floatEdit);
+ connect(floatEdit, SIGNAL(valueChanged(float, int)), this, SLOT(setFloatParameter(float, int)));
+ ++row;
+ }
+ }
+ }
+ file.close();
+ }
+ }
+
+ layout->addWidget(new QLabel(tr("Texture:")));
+ m_textureCombo = new QComboBox;
+ connect(m_textureCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(textureChanged(int)));
+ layout->addWidget(m_textureCombo);
+ ++row;
+
+ layout->addWidget(new QLabel(tr("Shader:")));
+ m_shaderCombo = new QComboBox;
+ connect(m_shaderCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(shaderChanged(int)));
+ layout->addWidget(m_shaderCombo);
+ ++row;
+
+ layout->setRowStretch(row, 1);
+}
+
+int RenderOptionsDialog::addTexture(const QString &name)
+{
+ m_textureCombo->addItem(name);
+ return m_textureCombo->count() - 1;
+}
+
+int RenderOptionsDialog::addShader(const QString &name)
+{
+ m_shaderCombo->addItem(name);
+ return m_shaderCombo->count() - 1;
+}
+
+void RenderOptionsDialog::emitParameterChanged()
+{
+ foreach (ParameterEdit *edit, m_parameterEdits)
+ edit->emitChange();
+}
+
+void RenderOptionsDialog::setColorParameter(QRgb color, int id)
+{
+ emit colorParameterChanged(m_parameterNames[id], color);
+}
+
+void RenderOptionsDialog::setFloatParameter(float value, int id)
+{
+ emit floatParameterChanged(m_parameterNames[id], value);
+}
+
+void RenderOptionsDialog::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ emit doubleClicked();
+}
+
+//============================================================================//
+// ItemDialog //
+//============================================================================//
+
+ItemDialog::ItemDialog()
+ : QDialog(0, Qt::CustomizeWindowHint | Qt::WindowTitleHint)
+{
+ setWindowTitle(tr("Items (double click to flip)"));
+ setWindowOpacity(0.75);
+ resize(160, 100);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ setLayout(layout);
+ QPushButton *button;
+
+ button = new QPushButton(tr("Add Qt box"));
+ layout->addWidget(button);
+ connect(button, SIGNAL(clicked()), this, SLOT(triggerNewQtBox()));
+
+ button = new QPushButton(tr("Add circle"));
+ layout->addWidget(button);
+ connect(button, SIGNAL(clicked()), this, SLOT(triggerNewCircleItem()));
+
+ button = new QPushButton(tr("Add square"));
+ layout->addWidget(button);
+ connect(button, SIGNAL(clicked()), this, SLOT(triggerNewSquareItem()));
+
+ layout->addStretch(1);
+}
+
+void ItemDialog::triggerNewQtBox()
+{
+ emit newItemTriggered(QtBoxItem);
+}
+
+void ItemDialog::triggerNewCircleItem()
+{
+ emit newItemTriggered(CircleItem);
+}
+
+void ItemDialog::triggerNewSquareItem()
+{
+ emit newItemTriggered(SquareItem);
+}
+
+void ItemDialog::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ emit doubleClicked();
+}
+
+//============================================================================//
+// Scene //
+//============================================================================//
+
+const static char environmentShaderText[] =
+ "uniform samplerCube env;"
+ "void main() {"
+ "gl_FragColor = textureCube(env, gl_TexCoord[1].xyz);"
+ "}";
+
+Scene::Scene(int width, int height, int maxTextureSize)
+ : m_distExp(600)
+ , m_frame(0)
+ , m_maxTextureSize(maxTextureSize)
+ , m_currentShader(0)
+ , m_currentTexture(0)
+ , m_dynamicCubemap(false)
+ , m_updateAllCubemaps(true)
+ , m_box(0)
+ , m_vertexShader(0)
+ , m_environmentShader(0)
+ , m_environmentProgram(0)
+{
+ setSceneRect(0, 0, width, height);
+
+ m_trackBalls[0] = TrackBall(0.0005f, gfx::Vector3f::vector(0, 1, 0), TrackBall::Sphere);
+ m_trackBalls[1] = TrackBall(0.0001f, gfx::Vector3f::vector(0, 0, 1), TrackBall::Sphere);
+ m_trackBalls[2] = TrackBall(0.0f, gfx::Vector3f::vector(0, 1, 0), TrackBall::Plane);
+
+ m_renderOptions = new RenderOptionsDialog;
+ m_renderOptions->move(20, 120);
+ m_renderOptions->resize(m_renderOptions->sizeHint());
+
+ connect(m_renderOptions, SIGNAL(dynamicCubemapToggled(int)), this, SLOT(toggleDynamicCubemap(int)));
+ connect(m_renderOptions, SIGNAL(colorParameterChanged(const QString &, QRgb)), this, SLOT(setColorParameter(const QString &, QRgb)));
+ connect(m_renderOptions, SIGNAL(floatParameterChanged(const QString &, float)), this, SLOT(setFloatParameter(const QString &, float)));
+ connect(m_renderOptions, SIGNAL(textureChanged(int)), this, SLOT(setTexture(int)));
+ connect(m_renderOptions, SIGNAL(shaderChanged(int)), this, SLOT(setShader(int)));
+
+ m_itemDialog = new ItemDialog;
+ connect(m_itemDialog, SIGNAL(newItemTriggered(ItemDialog::ItemType)), this, SLOT(newItem(ItemDialog::ItemType)));
+
+ TwoSidedGraphicsWidget *twoSided = new TwoSidedGraphicsWidget(this);
+ twoSided->setWidget(0, m_renderOptions);
+ twoSided->setWidget(1, m_itemDialog);
+
+ connect(m_renderOptions, SIGNAL(doubleClicked()), twoSided, SLOT(flip()));
+ connect(m_itemDialog, SIGNAL(doubleClicked()), twoSided, SLOT(flip()));
+
+ addItem(new QtBox(64, width - 64, height - 64));
+ addItem(new QtBox(64, width - 64, 64));
+ addItem(new QtBox(64, 64, height - 64));
+ addItem(new QtBox(64, 64, 64));
+
+ initGL();
+
+ m_timer = new QTimer(this);
+ m_timer->setInterval(20);
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(update()));
+ m_timer->start();
+
+ m_time.start();
+}
+
+Scene::~Scene()
+{
+ if (m_box)
+ delete m_box;
+ foreach (GLTexture *texture, m_textures)
+ if (texture) delete texture;
+ if (m_mainCubemap)
+ delete m_mainCubemap;
+ foreach (GLProgram *program, m_programs)
+ if (program) delete program;
+ if (m_vertexShader)
+ delete m_vertexShader;
+ foreach (GLFragmentShader *shader, m_fragmentShaders)
+ if (shader) delete shader;
+ foreach (GLRenderTargetCube *rt, m_cubemaps)
+ if (rt) delete rt;
+ if (m_environmentShader)
+ delete m_environmentShader;
+ if (m_environmentProgram)
+ delete m_environmentProgram;
+}
+
+void Scene::initGL()
+{
+ m_box = new GLRoundedBox(0.25f, 1.0f, 10);
+
+ m_vertexShader = new GLVertexShader(":/res/boxes/basic.vsh");
+
+ QStringList list;
+ list << ":/res/boxes/cubemap_posx.jpg" << ":/res/boxes/cubemap_negx.jpg" << ":/res/boxes/cubemap_posy.jpg"
+ << ":/res/boxes/cubemap_negy.jpg" << ":/res/boxes/cubemap_posz.jpg" << ":/res/boxes/cubemap_negz.jpg";
+ m_environment = new GLTextureCube(list, qMin(1024, m_maxTextureSize));
+ m_environmentShader = new GLFragmentShader(environmentShaderText, strlen(environmentShaderText));
+ m_environmentProgram = new GLProgram;
+ m_environmentProgram->attach(*m_vertexShader);
+ m_environmentProgram->attach(*m_environmentShader);
+
+ const int NOISE_SIZE = 128; // for a different size, B and BM in fbm.c must also be changed
+ m_noise = new GLTexture3D(NOISE_SIZE, NOISE_SIZE, NOISE_SIZE);
+ QRgb *data = new QRgb[NOISE_SIZE * NOISE_SIZE * NOISE_SIZE];
+ memset(data, 0, NOISE_SIZE * NOISE_SIZE * NOISE_SIZE * sizeof(QRgb));
+ QRgb *p = data;
+ float pos[3];
+ for (int k = 0; k < NOISE_SIZE; ++k) {
+ pos[2] = k * (0x20 / (float)NOISE_SIZE);
+ for (int j = 0; j < NOISE_SIZE; ++j) {
+ for (int i = 0; i < NOISE_SIZE; ++i) {
+ for (int byte = 0; byte < 4; ++byte) {
+ pos[0] = (i + (byte & 1) * 16) * (0x20 / (float)NOISE_SIZE);
+ pos[1] = (j + (byte & 2) * 8) * (0x20 / (float)NOISE_SIZE);
+ *p |= (int)(128.0f * (noise3(pos) + 1.0f)) << (byte * 8);
+ }
+ ++p;
+ }
+ }
+ }
+ m_noise->load(NOISE_SIZE, NOISE_SIZE, NOISE_SIZE, data);
+ delete[] data;
+
+ m_mainCubemap = new GLRenderTargetCube(512);
+
+ QStringList filter;
+ QList<QFileInfo> files;
+
+ // Load all .png files as textures
+ m_currentTexture = 0;
+ filter = QStringList("*.png");
+ files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
+
+ foreach (QFileInfo file, files) {
+ GLTexture *texture = new GLTexture2D(file.absoluteFilePath(), qMin(256, m_maxTextureSize), qMin(256, m_maxTextureSize));
+ if (texture->failed()) {
+ delete texture;
+ continue;
+ }
+ m_textures << texture;
+ m_renderOptions->addTexture(file.baseName());
+ }
+
+ if (m_textures.size() == 0)
+ m_textures << new GLTexture2D(qMin(64, m_maxTextureSize), qMin(64, m_maxTextureSize));
+
+ // Load all .fsh files as fragment shaders
+ m_currentShader = 0;
+ filter = QStringList("*.fsh");
+ files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
+ foreach (QFileInfo file, files) {
+ GLProgram *program = new GLProgram;
+ GLFragmentShader* shader = new GLFragmentShader(file.absoluteFilePath());
+ // The program does not take ownership over the shaders, so store them in a vector so they can be deleted afterwards.
+ program->attach(*m_vertexShader);
+ program->attach(*shader);
+ if (program->failed()) {
+ qWarning("Failed to compile and link shader program");
+ qWarning("Vertex shader log:");
+ qWarning() << m_vertexShader->log();
+ qWarning() << "Fragment shader log ( file =" << file.absoluteFilePath() << "):";
+ qWarning() << shader->log();
+ qWarning("Shader program log:");
+ qWarning() << program->log();
+
+ delete shader;
+ delete program;
+ continue;
+ }
+
+ m_fragmentShaders << shader;
+ m_programs << program;
+ m_renderOptions->addShader(file.baseName());
+
+ program->bind();
+ m_cubemaps << (program->hasParameter("env") ? new GLRenderTargetCube(qMin(256, m_maxTextureSize)) : 0);
+ program->unbind();
+ }
+
+ if (m_programs.size() == 0)
+ m_programs << new GLProgram;
+
+ m_renderOptions->emitParameterChanged();
+}
+
+// If one of the boxes should not be rendered, set excludeBox to its index.
+// If the main box should not be rendered, set excludeBox to -1.
+void Scene::renderBoxes(const gfx::Matrix4x4f &view, int excludeBox)
+{
+ gfx::Matrix4x4f invView = view.inverse();
+
+ // If multi-texturing is supported, use three saplers.
+ if (glActiveTexture) {
+ glActiveTexture(GL_TEXTURE0);
+ m_textures[m_currentTexture]->bind();
+ glActiveTexture(GL_TEXTURE2);
+ m_noise->bind();
+ glActiveTexture(GL_TEXTURE1);
+ } else {
+ m_textures[m_currentTexture]->bind();
+ }
+
+ glDisable(GL_LIGHTING);
+ glDisable(GL_CULL_FACE);
+
+ gfx::Matrix4x4f viewRotation(view);
+ viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f;
+ viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f;
+ viewRotation(3, 3) = 1.0f;
+ glLoadMatrixf(viewRotation.bits());
+ glScalef(20.0f, 20.0f, 20.0f);
+
+ // Don't render the environment if the environment texture can't be set for the correct sampler.
+ if (glActiveTexture) {
+ m_environment->bind();
+ m_environmentProgram->bind();
+ m_environmentProgram->setInt("tex", 0);
+ m_environmentProgram->setInt("env", 1);
+ m_environmentProgram->setInt("noise", 2);
+ m_box->draw();
+ m_environmentProgram->unbind();
+ m_environment->unbind();
+ }
+
+ glLoadMatrixf(view.bits());
+
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_LIGHTING);
+
+ for (int i = 0; i < m_programs.size(); ++i) {
+ if (i == excludeBox)
+ continue;
+
+ glPushMatrix();
+ gfx::Matrix4x4f m;
+ m_trackBalls[1].rotation().matrix(m);
+ glMultMatrixf(m.bits());
+
+ glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f);
+ glTranslatef(2.0f, 0.0f, 0.0f);
+ glScalef(0.3f, 0.6f, 0.6f);
+
+ if (glActiveTexture) {
+ if (m_dynamicCubemap && m_cubemaps[i])
+ m_cubemaps[i]->bind();
+ else
+ m_environment->bind();
+ }
+ m_programs[i]->bind();
+ m_programs[i]->setInt("tex", 0);
+ m_programs[i]->setInt("env", 1);
+ m_programs[i]->setInt("noise", 2);
+ m_programs[i]->setMatrix("view", view);
+ m_programs[i]->setMatrix("invView", invView);
+ m_box->draw();
+ m_programs[i]->unbind();
+
+ if (glActiveTexture) {
+ if (m_dynamicCubemap && m_cubemaps[i])
+ m_cubemaps[i]->unbind();
+ else
+ m_environment->unbind();
+ }
+ glPopMatrix();
+ }
+
+ if (-1 != excludeBox) {
+ gfx::Matrix4x4f m;
+ m_trackBalls[0].rotation().matrix(m);
+ glMultMatrixf(m.bits());
+
+ if (glActiveTexture) {
+ if (m_dynamicCubemap)
+ m_mainCubemap->bind();
+ else
+ m_environment->bind();
+ }
+
+ m_programs[m_currentShader]->bind();
+ m_programs[m_currentShader]->setInt("tex", 0);
+ m_programs[m_currentShader]->setInt("env", 1);
+ m_programs[m_currentShader]->setInt("noise", 2);
+ m_programs[m_currentShader]->setMatrix("view", view);
+ m_programs[m_currentShader]->setMatrix("invView", invView);
+ m_box->draw();
+ m_programs[m_currentShader]->unbind();
+
+ if (glActiveTexture) {
+ if (m_dynamicCubemap)
+ m_mainCubemap->unbind();
+ else
+ m_environment->unbind();
+ }
+ }
+
+ if (glActiveTexture) {
+ glActiveTexture(GL_TEXTURE2);
+ m_noise->unbind();
+ glActiveTexture(GL_TEXTURE0);
+ }
+ m_textures[m_currentTexture]->unbind();
+}
+
+void Scene::setStates()
+{
+ //glClearColor(0.25f, 0.25f, 0.5f, 1.0f);
+
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_LIGHTING);
+ //glEnable(GL_COLOR_MATERIAL);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_NORMALIZE);
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ setLights();
+
+ float materialSpecular[] = {0.5f, 0.5f, 0.5f, 1.0f};
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, materialSpecular);
+ glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 32.0f);
+}
+
+void Scene::setLights()
+{
+ glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+ //float lightColour[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ float lightDir[] = {0.0f, 0.0f, 1.0f, 0.0f};
+ //glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColour);
+ //glLightfv(GL_LIGHT0, GL_SPECULAR, lightColour);
+ glLightfv(GL_LIGHT0, GL_POSITION, lightDir);
+ glLightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER, 1.0f);
+ glEnable(GL_LIGHT0);
+}
+
+void Scene::defaultStates()
+{
+ //glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_LIGHTING);
+ //glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_LIGHT0);
+ glDisable(GL_NORMALIZE);
+
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+
+ glLightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER, 0.0f);
+ float defaultMaterialSpecular[] = {0.0f, 0.0f, 0.0f, 1.0f};
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, defaultMaterialSpecular);
+ glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 0.0f);
+}
+
+void Scene::renderCubemaps()
+{
+ // To speed things up, only update the cubemaps for the small cubes every N frames.
+ const int N = (m_updateAllCubemaps ? 1 : 3);
+
+ gfx::Matrix4x4f mat;
+ GLRenderTargetCube::getProjectionMatrix(mat, 0.1f, 100.0f);
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadMatrixf(mat.bits());
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+
+ gfx::Vector3f center;
+
+ for (int i = m_frame % N; i < m_cubemaps.size(); i += N) {
+ if (0 == m_cubemaps[i])
+ continue;
+
+ float angle = 2.0f * PI * i / m_cubemaps.size();
+ center = m_trackBalls[1].rotation().transform(gfx::Vector3f::vector(cos(angle), sin(angle), 0));
+
+ for (int face = 0; face < 6; ++face) {
+ m_cubemaps[i]->begin(face);
+
+ GLRenderTargetCube::getViewMatrix(mat, face);
+ gfx::Vector4f v = gfx::Vector4f::vector(-center[0], -center[1], -center[2], 1.0);
+ mat[3] = v * mat;
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ renderBoxes(mat, i);
+
+ m_cubemaps[i]->end();
+ }
+ }
+
+ for (int face = 0; face < 6; ++face) {
+ m_mainCubemap->begin(face);
+ GLRenderTargetCube::getViewMatrix(mat, face);
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ renderBoxes(mat, -1);
+
+ m_mainCubemap->end();
+ }
+
+ glPopMatrix();
+
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+
+ m_updateAllCubemaps = false;
+}
+
+void Scene::drawBackground(QPainter *painter, const QRectF &)
+{
+ float width = float(painter->device()->width());
+ float height = float(painter->device()->height());
+
+ setStates();
+
+ if (m_dynamicCubemap)
+ renderCubemaps();
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glMatrixMode(GL_PROJECTION);
+ gluPerspective(60.0, width / height, 0.01, 15.0);
+
+ glMatrixMode(GL_MODELVIEW);
+
+ //gfx::Matrix4x4f view = gfx::Matrix4x4f::identity();
+ //view(3, 2) -= 2.0f * exp(m_distExp / 1200.0f);
+
+ gfx::Matrix4x4f view;
+ m_trackBalls[2].rotation().matrix(view);
+ view(3, 2) -= 2.0f * exp(m_distExp / 1200.0f);
+ renderBoxes(view);
+
+ defaultStates();
+ ++m_frame;
+}
+
+QPointF Scene::pixelPosToViewPos(const QPointF& p)
+{
+ return QPointF(2.0 * float(p.x()) / width() - 1.0,
+ 1.0 - 2.0 * float(p.y()) / height());
+}
+
+void Scene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsScene::mouseMoveEvent(event);
+ if (event->isAccepted())
+ return;
+
+ if (event->buttons() & Qt::LeftButton) {
+ m_trackBalls[0].move(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ } else {
+ m_trackBalls[0].release(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ }
+
+ if (event->buttons() & Qt::RightButton) {
+ m_trackBalls[1].move(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ } else {
+ m_trackBalls[1].release(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ }
+
+ if (event->buttons() & Qt::MidButton) {
+ m_trackBalls[2].move(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
+ event->accept();
+ } else {
+ m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
+ }
+}
+
+void Scene::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsScene::mousePressEvent(event);
+ if (event->isAccepted())
+ return;
+
+ if (event->buttons() & Qt::LeftButton) {
+ m_trackBalls[0].push(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ }
+
+ if (event->buttons() & Qt::RightButton) {
+ m_trackBalls[1].push(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ }
+
+ if (event->buttons() & Qt::MidButton) {
+ m_trackBalls[2].push(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
+ event->accept();
+ }
+}
+
+void Scene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsScene::mouseReleaseEvent(event);
+ if (event->isAccepted())
+ return;
+
+ if (event->button() == Qt::LeftButton) {
+ m_trackBalls[0].release(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ }
+
+ if (event->button() == Qt::RightButton) {
+ m_trackBalls[1].release(pixelPosToViewPos(event->scenePos()), m_trackBalls[2].rotation().conjugate());
+ event->accept();
+ }
+
+ if (event->button() == Qt::MidButton) {
+ m_trackBalls[2].release(pixelPosToViewPos(event->scenePos()), gfx::Quaternionf::identity());
+ event->accept();
+ }
+}
+
+void Scene::wheelEvent(QGraphicsSceneWheelEvent * event)
+{
+ QGraphicsScene::wheelEvent(event);
+ if (!event->isAccepted()) {
+ m_distExp += event->delta();
+ if (m_distExp < -8 * 120)
+ m_distExp = -8 * 120;
+ if (m_distExp > 10 * 120)
+ m_distExp = 10 * 120;
+ event->accept();
+ }
+}
+
+void Scene::setShader(int index)
+{
+ if (index >= 0 && index < m_fragmentShaders.size())
+ m_currentShader = index;
+}
+
+void Scene::setTexture(int index)
+{
+ if (index >= 0 && index < m_textures.size())
+ m_currentTexture = index;
+}
+
+void Scene::toggleDynamicCubemap(int state)
+{
+ if ((m_dynamicCubemap = (state == Qt::Checked)))
+ m_updateAllCubemaps = true;
+}
+
+void Scene::setColorParameter(const QString &name, QRgb color)
+{
+ // set the color in all programs
+ foreach (GLProgram *program, m_programs) {
+ program->bind();
+ program->setColor(name, color);
+ program->unbind();
+ }
+}
+
+void Scene::setFloatParameter(const QString &name, float value)
+{
+ // set the color in all programs
+ foreach (GLProgram *program, m_programs) {
+ program->bind();
+ program->setFloat(name, value);
+ program->unbind();
+ }
+}
+
+void Scene::newItem(ItemDialog::ItemType type)
+{
+ QSize size = sceneRect().size().toSize();
+ switch (type) {
+ case ItemDialog::QtBoxItem:
+ addItem(new QtBox(64, rand() % (size.width() - 64) + 32, rand() % (size.height() - 64) + 32));
+ break;
+ case ItemDialog::CircleItem:
+ addItem(new CircleItem(64, rand() % (size.width() - 64) + 32, rand() % (size.height() - 64) + 32));
+ break;
+ case ItemDialog::SquareItem:
+ addItem(new SquareItem(64, rand() % (size.width() - 64) + 32, rand() % (size.height() - 64) + 32));
+ break;
+ default:
+ break;
+ }
+}
diff --git a/demos/boxes/scene.h b/demos/boxes/scene.h
new file mode 100644
index 0000000..2db9317
--- /dev/null
+++ b/demos/boxes/scene.h
@@ -0,0 +1,243 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCENE_H
+#define SCENE_H
+
+//#include <GL/glew.h>
+#include "glextensions.h"
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "roundedbox.h"
+#include "gltrianglemesh.h"
+#include "vector.h"
+#include "trackball.h"
+#include "glbuffers.h"
+#include "glshaders.h"
+#include "qtbox.h"
+
+#define PI 3.14159265358979
+
+class ParameterEdit : public QWidget
+{
+public:
+ virtual void emitChange() = 0;
+};
+
+class ColorEdit : public ParameterEdit
+{
+ Q_OBJECT
+public:
+ ColorEdit(QRgb initialColor, int id);
+ QRgb color() const {return m_color;}
+ virtual void emitChange() {emit colorChanged(m_color, m_id);}
+public slots:
+ void editDone();
+signals:
+ void colorChanged(QRgb color, int id);
+protected:
+ virtual void mousePressEvent(QMouseEvent *event);
+ void setColor(QRgb color); // also emits colorChanged()
+private:
+ QGraphicsScene *m_dialogParentScene;
+ QLineEdit *m_lineEdit;
+ QFrame *m_button;
+ QRgb m_color;
+ int m_id;
+};
+
+class FloatEdit : public ParameterEdit
+{
+ Q_OBJECT
+public:
+ FloatEdit(float initialValue, int id);
+ float value() const {return m_value;}
+ virtual void emitChange() {emit valueChanged(m_value, m_id);}
+public slots:
+ void editDone();
+signals:
+ void valueChanged(float value, int id);
+private:
+ QGraphicsScene *m_dialogParentScene;
+ QLineEdit *m_lineEdit;
+ float m_value;
+ int m_id;
+};
+
+class GraphicsWidget : public QGraphicsProxyWidget
+{
+protected:
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+};
+
+class TwoSidedGraphicsWidget : public QObject
+{
+ Q_OBJECT
+public:
+ TwoSidedGraphicsWidget(QGraphicsScene *scene);
+ void setWidget(int index, QWidget *widget);
+ QWidget *widget(int index);
+public slots:
+ void flip();
+protected slots:
+ void animateFlip();
+private:
+ GraphicsWidget *m_proxyWidgets[2];
+ int m_current;
+ int m_angle; // angle in degrees
+ int m_delta;
+};
+
+class RenderOptionsDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ RenderOptionsDialog();
+ int addTexture(const QString &name);
+ int addShader(const QString &name);
+ void emitParameterChanged();
+protected slots:
+ void setColorParameter(QRgb color, int id);
+ void setFloatParameter(float value, int id);
+signals:
+ void dynamicCubemapToggled(int);
+ void colorParameterChanged(const QString &, QRgb);
+ void floatParameterChanged(const QString &, float);
+ void textureChanged(int);
+ void shaderChanged(int);
+ void doubleClicked();
+protected:
+ virtual void mouseDoubleClickEvent(QMouseEvent *event);
+
+ QVector<QByteArray> m_parameterNames;
+ QComboBox *m_textureCombo;
+ QComboBox *m_shaderCombo;
+ QVector<ParameterEdit *> m_parameterEdits;
+};
+
+class ItemDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ enum ItemType {
+ QtBoxItem,
+ CircleItem,
+ SquareItem,
+ };
+
+ ItemDialog();
+public slots:
+ void triggerNewQtBox();
+ void triggerNewCircleItem();
+ void triggerNewSquareItem();
+signals:
+ void doubleClicked();
+ void newItemTriggered(ItemDialog::ItemType type);
+protected:
+ virtual void mouseDoubleClickEvent(QMouseEvent *event);
+};
+
+class Scene : public QGraphicsScene
+{
+ Q_OBJECT
+public:
+ Scene(int width, int height, int maxTextureSize);
+ ~Scene();
+ virtual void drawBackground(QPainter *painter, const QRectF &rect);
+
+public slots:
+ void setShader(int index);
+ void setTexture(int index);
+ void toggleDynamicCubemap(int state);
+ void setColorParameter(const QString &name, QRgb color);
+ void setFloatParameter(const QString &name, float value);
+ void newItem(ItemDialog::ItemType type);
+protected:
+ void renderBoxes(const gfx::Matrix4x4f &view, int excludeBox = -2);
+ void setStates();
+ void setLights();
+ void defaultStates();
+ void renderCubemaps();
+
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ virtual void wheelEvent(QGraphicsSceneWheelEvent * event);
+private:
+ void initGL();
+ QPointF pixelPosToViewPos(const QPointF& p);
+
+ QTime m_time;
+ int m_lastTime;
+ int m_mouseEventTime;
+ int m_distExp;
+ int m_frame;
+ int m_maxTextureSize;
+
+ int m_currentShader;
+ int m_currentTexture;
+ bool m_dynamicCubemap;
+ bool m_updateAllCubemaps;
+
+ RenderOptionsDialog *m_renderOptions;
+ ItemDialog *m_itemDialog;
+ QTimer *m_timer;
+ GLRoundedBox *m_box;
+ TrackBall m_trackBalls[3];
+ QVector<GLTexture *> m_textures;
+ GLTextureCube *m_environment;
+ GLTexture3D *m_noise;
+ GLRenderTargetCube *m_mainCubemap;
+ QVector<GLRenderTargetCube *> m_cubemaps;
+ QVector<GLProgram *> m_programs;
+ GLVertexShader *m_vertexShader;
+ QVector<GLFragmentShader *> m_fragmentShaders;
+ GLFragmentShader *m_environmentShader;
+ GLProgram *m_environmentProgram;
+};
+
+
+
+#endif
diff --git a/demos/boxes/smiley.png b/demos/boxes/smiley.png
new file mode 100644
index 0000000..41cfda6
--- /dev/null
+++ b/demos/boxes/smiley.png
Binary files differ
diff --git a/demos/boxes/square.jpg b/demos/boxes/square.jpg
new file mode 100644
index 0000000..03f53bd
--- /dev/null
+++ b/demos/boxes/square.jpg
Binary files differ
diff --git a/demos/boxes/trackball.cpp b/demos/boxes/trackball.cpp
new file mode 100644
index 0000000..980f6ed
--- /dev/null
+++ b/demos/boxes/trackball.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "trackball.h"
+
+//============================================================================//
+// TrackBall //
+//============================================================================//
+
+TrackBall::TrackBall(TrackMode mode)
+ : m_angularVelocity(0)
+ , m_paused(false)
+ , m_pressed(false)
+ , m_mode(mode)
+{
+ m_axis = gfx::Vector3f::vector(0, 1, 0);
+ m_rotation = gfx::Quaternionf::quaternion(1.0f, 0.0f, 0.0f, 0.0f);
+ m_lastTime = QTime::currentTime();
+}
+
+TrackBall::TrackBall(float angularVelocity, const gfx::Vector3f& axis, TrackMode mode)
+ : m_axis(axis)
+ , m_angularVelocity(angularVelocity)
+ , m_paused(false)
+ , m_pressed(false)
+ , m_mode(mode)
+{
+ m_rotation = gfx::Quaternionf::quaternion(1.0f, 0.0f, 0.0f, 0.0f);
+ m_lastTime = QTime::currentTime();
+}
+
+void TrackBall::push(const QPointF& p, const gfx::Quaternionf &)
+{
+ m_rotation = rotation();
+ m_pressed = true;
+ m_lastTime = QTime::currentTime();
+ m_lastPos = p;
+ m_angularVelocity = 0.0f;
+}
+
+void TrackBall::move(const QPointF& p, const gfx::Quaternionf &transformation)
+{
+ if (!m_pressed)
+ return;
+
+ QTime currentTime = QTime::currentTime();
+ int msecs = m_lastTime.msecsTo(currentTime);
+ if (msecs <= 20)
+ return;
+
+ switch (m_mode) {
+ case Plane:
+ {
+ QLineF delta(m_lastPos, p);
+ m_angularVelocity = delta.length() / msecs;
+ m_axis = gfx::Vector3f::vector(delta.dy(), -delta.dx(), 0.0f).normalized();
+ m_axis = transformation.transform(m_axis);
+ m_rotation *= gfx::Quaternionf::rotation(delta.length(), m_axis);
+ }
+ break;
+ case Sphere:
+ {
+ gfx::Vector3f lastPos3D = gfx::Vector3f::vector(m_lastPos.x(), m_lastPos.y(), 0);
+ float sqrZ = 1 - lastPos3D.sqrNorm();
+ if (sqrZ > 0)
+ lastPos3D[2] = sqrt(sqrZ);
+ else
+ lastPos3D.normalize();
+
+ gfx::Vector3f currentPos3D = gfx::Vector3f::vector(p.x(), p.y(), 0);
+ sqrZ = 1 - currentPos3D.sqrNorm();
+ if (sqrZ > 0)
+ currentPos3D[2] = sqrt(sqrZ);
+ else
+ currentPos3D.normalize();
+
+ m_axis = gfx::Vector3f::cross(currentPos3D, lastPos3D);
+ float angle = asin(sqrt(m_axis.sqrNorm()));
+
+ m_angularVelocity = angle / msecs;
+ m_axis.normalize();
+ m_axis = transformation.transform(m_axis);
+ m_rotation *= gfx::Quaternionf::rotation(angle, m_axis);
+ }
+ break;
+ }
+
+ m_lastPos = p;
+ m_lastTime = currentTime;
+}
+
+void TrackBall::release(const QPointF& p, const gfx::Quaternionf &transformation)
+{
+ // Calling move() caused the rotation to stop if the framerate was too low.
+ move(p, transformation);
+ m_pressed = false;
+}
+
+void TrackBall::start()
+{
+ m_lastTime = QTime::currentTime();
+ m_paused = false;
+}
+
+void TrackBall::stop()
+{
+ m_rotation = rotation();
+ m_paused = true;
+}
+
+gfx::Quaternionf TrackBall::rotation() const
+{
+ if (m_paused || m_pressed)
+ return m_rotation;
+
+ QTime currentTime = QTime::currentTime();
+ float angle = m_angularVelocity * m_lastTime.msecsTo(currentTime);
+ return m_rotation * gfx::Quaternionf::rotation(angle, m_axis);
+}
+
diff --git a/demos/boxes/trackball.h b/demos/boxes/trackball.h
new file mode 100644
index 0000000..5e3f40c
--- /dev/null
+++ b/demos/boxes/trackball.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TRACKBALL_H
+#define TRACKBALL_H
+
+#include <QtGui>
+
+#include "vector.h"
+
+class TrackBall
+{
+public:
+ enum TrackMode
+ {
+ Plane,
+ Sphere,
+ };
+ TrackBall(TrackMode mode = Sphere);
+ TrackBall(float angularVelocity, const gfx::Vector3f& axis, TrackMode mode = Sphere);
+ // coordinates in [-1,1]x[-1,1]
+ void push(const QPointF& p, const gfx::Quaternionf &transformation);
+ void move(const QPointF& p, const gfx::Quaternionf &transformation);
+ void release(const QPointF& p, const gfx::Quaternionf &transformation);
+ void start(); // starts clock
+ void stop(); // stops clock
+ gfx::Quaternionf rotation() const;
+private:
+ gfx::Quaternionf m_rotation;
+ gfx::Vector3f m_axis;
+ float m_angularVelocity;
+
+ QPointF m_lastPos;
+ QTime m_lastTime;
+ bool m_paused;
+ bool m_pressed;
+ TrackMode m_mode;
+};
+
+#endif
diff --git a/demos/boxes/vector.h b/demos/boxes/vector.h
new file mode 100644
index 0000000..bb24531
--- /dev/null
+++ b/demos/boxes/vector.h
@@ -0,0 +1,602 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VECTOR_H
+#define VECTOR_H
+
+#include <cassert>
+#include <cmath>
+#include <iostream>
+
+namespace gfx
+{
+
+template<class T, int n>
+struct Vector
+{
+ // Keep the Vector struct a plain old data (POD) struct by avoiding constructors
+
+ static Vector vector(T x)
+ {
+ Vector result;
+ for (int i = 0; i < n; ++i)
+ result.v[i] = x;
+ return result;
+ }
+
+ // Use only for 2D vectors
+ static Vector vector(T x, T y)
+ {
+ assert(n == 2);
+ Vector result;
+ result.v[0] = x;
+ result.v[1] = y;
+ return result;
+ }
+
+ // Use only for 3D vectors
+ static Vector vector(T x, T y, T z)
+ {
+ assert(n == 3);
+ Vector result;
+ result.v[0] = x;
+ result.v[1] = y;
+ result.v[2] = z;
+ return result;
+ }
+
+ // Use only for 4D vectors
+ static Vector vector(T x, T y, T z, T w)
+ {
+ assert(n == 4);
+ Vector result;
+ result.v[0] = x;
+ result.v[1] = y;
+ result.v[2] = z;
+ result.v[3] = w;
+ return result;
+ }
+
+ // Pass 'n' arguments to this function.
+ static Vector vector(T *v)
+ {
+ Vector result;
+ for (int i = 0; i < n; ++i)
+ result.v[i] = v[i];
+ return result;
+ }
+
+ T &operator [] (int i) {return v[i];}
+ T operator [] (int i) const {return v[i];}
+
+#define VECTOR_BINARY_OP(op, arg, rhs) \
+ Vector operator op (arg) const \
+ { \
+ Vector result; \
+ for (int i = 0; i < n; ++i) \
+ result.v[i] = v[i] op rhs; \
+ return result; \
+ }
+
+ VECTOR_BINARY_OP(+, const Vector &u, u.v[i])
+ VECTOR_BINARY_OP(-, const Vector &u, u.v[i])
+ VECTOR_BINARY_OP(*, const Vector &u, u.v[i])
+ VECTOR_BINARY_OP(/, const Vector &u, u.v[i])
+ VECTOR_BINARY_OP(+, T s, s)
+ VECTOR_BINARY_OP(-, T s, s)
+ VECTOR_BINARY_OP(*, T s, s)
+ VECTOR_BINARY_OP(/, T s, s)
+#undef VECTOR_BINARY_OP
+
+ Vector operator - () const
+ {
+ Vector result;
+ for (int i = 0; i < n; ++i)
+ result.v[i] = -v[i];
+ return result;
+ }
+
+#define VECTOR_ASSIGN_OP(op, arg, rhs) \
+ Vector &operator op (arg) \
+ { \
+ for (int i = 0; i < n; ++i) \
+ v[i] op rhs; \
+ return *this; \
+ }
+
+ VECTOR_ASSIGN_OP(+=, const Vector &u, u.v[i])
+ VECTOR_ASSIGN_OP(-=, const Vector &u, u.v[i])
+ VECTOR_ASSIGN_OP(=, T s, s)
+ VECTOR_ASSIGN_OP(*=, T s, s)
+ VECTOR_ASSIGN_OP(/=, T s, s)
+#undef VECTOR_ASSIGN_OP
+
+ static T dot(const Vector &u, const Vector &v)
+ {
+ T sum(0);
+ for (int i = 0; i < n; ++i)
+ sum += u.v[i] * v.v[i];
+ return sum;
+ }
+
+ static Vector cross(const Vector &u, const Vector &v)
+ {
+ assert(n == 3);
+ return vector(u.v[1] * v.v[2] - u.v[2] * v.v[1],
+ u.v[2] * v.v[0] - u.v[0] * v.v[2],
+ u.v[0] * v.v[1] - u.v[1] * v.v[0]);
+ }
+
+ T sqrNorm() const
+ {
+ return dot(*this, *this);
+ }
+
+ // requires floating point type T
+ void normalize()
+ {
+ T s = sqrNorm();
+ if (s != 0)
+ *this /= sqrt(s);
+ }
+
+ // requires floating point type T
+ Vector normalized() const
+ {
+ T s = sqrNorm();
+ if (s == 0)
+ return *this;
+ return *this / sqrt(s);
+ }
+
+ T *bits() {return v;}
+ const T *bits() const {return v;}
+
+ T v[n];
+};
+
+#define SCALAR_VECTOR_BINARY_OP(op) \
+template<class T, int n> \
+Vector<T, n> operator op (T s, const Vector<T, n>& u) \
+{ \
+ Vector<T, n> result; \
+ for (int i = 0; i < n; ++i) \
+ result[i] = s op u[i]; \
+ return result; \
+}
+
+SCALAR_VECTOR_BINARY_OP(+)
+SCALAR_VECTOR_BINARY_OP(-)
+SCALAR_VECTOR_BINARY_OP(*)
+SCALAR_VECTOR_BINARY_OP(/)
+#undef SCALAR_VECTOR_BINARY_OP
+
+template<class T, int n>
+std::ostream &operator << (std::ostream &os, const Vector<T, n> &v)
+{
+ assert(n > 0);
+ os << "[" << v[0];
+ for (int i = 1; i < n; ++i)
+ os << ", " << v[i];
+ os << "]";
+ return os;
+}
+
+typedef Vector<float, 2> Vector2f;
+typedef Vector<float, 3> Vector3f;
+typedef Vector<float, 4> Vector4f;
+
+template<class T, int rows, int cols>
+struct Matrix
+{
+ // Keep the Matrix struct a plain old data (POD) struct by avoiding constructors
+
+ static Matrix matrix(T x)
+ {
+ Matrix result;
+ for (int i = 0; i < rows; ++i) {
+ for (int j = 0; j < cols; ++j)
+ result.v[i][j] = x;
+ }
+ return result;
+ }
+
+ static Matrix matrix(T *m)
+ {
+ Matrix result;
+ for (int i = 0; i < rows; ++i) {
+ for (int j = 0; j < cols; ++j) {
+ result.v[i][j] = *m;
+ ++m;
+ }
+ }
+ return result;
+ }
+
+ T &operator () (int i, int j) {return v[i][j];}
+ T operator () (int i, int j) const {return v[i][j];}
+ Vector<T, cols> &operator [] (int i) {return v[i];}
+ const Vector<T, cols> &operator [] (int i) const {return v[i];}
+
+ // TODO: operators, methods
+
+ Vector<T, rows> operator * (const Vector<T, cols> &u) const
+ {
+ Vector<T, rows> result;
+ for (int i = 0; i < rows; ++i)
+ result[i] = Vector<T, cols>::dot(v[i], u);
+ return result;
+ }
+
+ template<int k>
+ Matrix<T, rows, k> operator * (const Matrix<T, cols, k> &m)
+ {
+ Matrix<T, rows, k> result;
+ for (int i = 0; i < rows; ++i)
+ result[i] = v[i] * m;
+ return result;
+ }
+
+ T* bits() {return reinterpret_cast<T *>(this);}
+ const T* bits() const {return reinterpret_cast<const T *>(this);}
+
+ // Simple Gauss elimination.
+ // TODO: Optimize and improve stability.
+ Matrix inverse(bool *ok = 0) const
+ {
+ assert(rows == cols);
+ Matrix rhs = identity();
+ Matrix lhs(*this);
+ T temp;
+ // Down
+ for (int i = 0; i < rows; ++i) {
+ // Pivoting
+ int pivot = i;
+ for (int j = i; j < rows; ++j) {
+ if (qAbs(lhs(j, i)) > lhs(pivot, i))
+ pivot = j;
+ }
+ // TODO: fuzzy compare.
+ if (lhs(pivot, i) == T(0)) {
+ if (ok)
+ *ok = false;
+ return rhs;
+ }
+ if (pivot != i) {
+ for (int j = i; j < cols; ++j) {
+ temp = lhs(pivot, j);
+ lhs(pivot, j) = lhs(i, j);
+ lhs(i, j) = temp;
+ }
+ for (int j = 0; j < cols; ++j) {
+ temp = rhs(pivot, j);
+ rhs(pivot, j) = rhs(i, j);
+ rhs(i, j) = temp;
+ }
+ }
+
+ // Normalize i-th row
+ rhs[i] /= lhs(i, i);
+ for (int j = cols - 1; j > i; --j)
+ lhs(i, j) /= lhs(i, i);
+
+ // Eliminate non-zeros in i-th column below the i-th row.
+ for (int j = i + 1; j < rows; ++j) {
+ rhs[j] -= lhs(j, i) * rhs[i];
+ for (int k = i + 1; k < cols; ++k)
+ lhs(j, k) -= lhs(j, i) * lhs(i, k);
+ }
+ }
+ // Up
+ for (int i = rows - 1; i > 0; --i) {
+ for (int j = i - 1; j >= 0; --j)
+ rhs[j] -= lhs(j, i) * rhs[i];
+ }
+ if (ok)
+ *ok = true;
+ return rhs;
+ }
+
+ Matrix<T, cols, rows> transpose() const
+ {
+ Matrix<T, cols, rows> result;
+ for (int i = 0; i < rows; ++i) {
+ for (int j = 0; j < cols; ++j)
+ result.v[j][i] = v[i][j];
+ }
+ return result;
+ }
+
+ static Matrix identity()
+ {
+ Matrix result = matrix(T(0));
+ for (int i = 0; i < rows && i < cols; ++i)
+ result.v[i][i] = T(1);
+ return result;
+ }
+
+ Vector<T, cols> v[rows];
+};
+
+template<class T, int rows, int cols>
+Vector<T, cols> operator * (const Vector<T, rows> &u, const Matrix<T, rows, cols> &m)
+{
+ Vector<T, cols> result = Vector<T, cols>::vector(T(0));
+ for (int i = 0; i < rows; ++i)
+ result += m[i] * u[i];
+ return result;
+}
+
+template<class T, int rows, int cols>
+std::ostream &operator << (std::ostream &os, const Matrix<T, rows, cols> &m)
+{
+ assert(rows > 0);
+ os << "[" << m[0];
+ for (int i = 1; i < rows; ++i)
+ os << ", " << m[i];
+ os << "]";
+ return os;
+}
+
+
+typedef Matrix<float, 2, 2> Matrix2x2f;
+typedef Matrix<float, 3, 3> Matrix3x3f;
+typedef Matrix<float, 4, 4> Matrix4x4f;
+
+template<class T>
+struct Quaternion
+{
+ // Keep the Quaternion struct a plain old data (POD) struct by avoiding constructors
+
+ static Quaternion quaternion(T s, T x, T y, T z)
+ {
+ Quaternion result;
+ result.scalar = s;
+ result.vector[0] = x;
+ result.vector[1] = y;
+ result.vector[2] = z;
+ return result;
+ }
+
+ static Quaternion quaternion(T s, const Vector<T, 3> &v)
+ {
+ Quaternion result;
+ result.scalar = s;
+ result.vector = v;
+ return result;
+ }
+
+ static Quaternion identity()
+ {
+ return quaternion(T(1), T(0), T(0), T(0));
+ }
+
+ // assumes that all the elements are packed tightly
+ T& operator [] (int i) {return reinterpret_cast<T *>(this)[i];}
+ T operator [] (int i) const {return reinterpret_cast<const T *>(this)[i];}
+
+#define QUATERNION_BINARY_OP(op, arg, rhs) \
+ Quaternion operator op (arg) const \
+ { \
+ Quaternion result; \
+ for (int i = 0; i < 4; ++i) \
+ result[i] = (*this)[i] op rhs; \
+ return result; \
+ }
+
+ QUATERNION_BINARY_OP(+, const Quaternion &q, q[i])
+ QUATERNION_BINARY_OP(-, const Quaternion &q, q[i])
+ QUATERNION_BINARY_OP(*, T s, s)
+ QUATERNION_BINARY_OP(/, T s, s)
+#undef QUATERNION_BINARY_OP
+
+ Quaternion operator - () const
+ {
+ return Quaternion(-scalar, -vector);
+ }
+
+ Quaternion operator * (const Quaternion &q) const
+ {
+ Quaternion result;
+ result.scalar = scalar * q.scalar - Vector<T, 3>::dot(vector, q.vector);
+ result.vector = scalar * q.vector + vector * q.scalar + Vector<T, 3>::cross(vector, q.vector);
+ return result;
+ }
+
+ Quaternion operator * (const Vector<T, 3> &v) const
+ {
+ Quaternion result;
+ result.scalar = -Vector<T, 3>::dot(vector, v);
+ result.vector = scalar * v + Vector<T, 3>::cross(vector, v);
+ return result;
+ }
+
+ friend Quaternion operator * (const Vector<T, 3> &v, const Quaternion &q)
+ {
+ Quaternion result;
+ result.scalar = -Vector<T, 3>::dot(v, q.vector);
+ result.vector = v * q.scalar + Vector<T, 3>::cross(v, q.vector);
+ return result;
+ }
+
+#define QUATERNION_ASSIGN_OP(op, arg, rhs) \
+ Quaternion &operator op (arg) \
+ { \
+ for (int i = 0; i < 4; ++i) \
+ (*this)[i] op rhs; \
+ return *this; \
+ }
+
+ QUATERNION_ASSIGN_OP(+=, const Quaternion &q, q[i])
+ QUATERNION_ASSIGN_OP(-=, const Quaternion &q, q[i])
+ QUATERNION_ASSIGN_OP(=, T s, s)
+ QUATERNION_ASSIGN_OP(*=, T s, s)
+ QUATERNION_ASSIGN_OP(/=, T s, s)
+#undef QUATERNION_ASSIGN_OP
+
+ Quaternion& operator *= (const Quaternion &q)
+ {
+ Quaternion result;
+ result.scalar = scalar * q.scalar - Vector<T, 3>::dot(vector, q.vector);
+ result.vector = scalar * q.vector + vector * q.scalar + Vector<T, 3>::cross(vector, q.vector);
+ return (*this = result);
+ }
+
+ Quaternion& operator *= (const Vector<T, 3> &v)
+ {
+ Quaternion result;
+ result.scalar = -Vector<T, 3>::dot(vector, v);
+ result.vector = scalar * v + Vector<T, 3>::cross(vector, v);
+ return (*this = result);
+ }
+
+ Quaternion conjugate() const
+ {
+ return quaternion(scalar, -vector);
+ }
+
+ T sqrNorm() const
+ {
+ return scalar * scalar + vector.sqrNorm();
+ }
+
+ Quaternion inverse() const
+ {
+ return conjugate() / sqrNorm();
+ }
+
+ // requires floating point type T
+ Quaternion normalized() const
+ {
+ T s = sqrNorm();
+ if (s == 0)
+ return *this;
+ return *this / sqrt(s);
+ }
+
+ void matrix(Matrix<T, 3, 3>& m) const
+ {
+ T bb = vector[0] * vector[0];
+ T cc = vector[1] * vector[1];
+ T dd = vector[2] * vector[2];
+ T diag = scalar * scalar - bb - cc - dd;
+ T ab = scalar * vector[0];
+ T ac = scalar * vector[1];
+ T ad = scalar * vector[2];
+ T bc = vector[0] * vector[1];
+ T cd = vector[1] * vector[2];
+ T bd = vector[2] * vector[0];
+ m(0, 0) = diag + 2 * bb;
+ m(0, 1) = 2 * (bc - ad);
+ m(0, 2) = 2 * (ac + bd);
+ m(1, 0) = 2 * (ad + bc);
+ m(1, 1) = diag + 2 * cc;
+ m(1, 2) = 2 * (cd - ab);
+ m(2, 0) = 2 * (bd - ac);
+ m(2, 1) = 2 * (ab + cd);
+ m(2, 2) = diag + 2 * dd;
+ }
+
+ void matrix(Matrix<T, 4, 4>& m) const
+ {
+ T bb = vector[0] * vector[0];
+ T cc = vector[1] * vector[1];
+ T dd = vector[2] * vector[2];
+ T diag = scalar * scalar - bb - cc - dd;
+ T ab = scalar * vector[0];
+ T ac = scalar * vector[1];
+ T ad = scalar * vector[2];
+ T bc = vector[0] * vector[1];
+ T cd = vector[1] * vector[2];
+ T bd = vector[2] * vector[0];
+ m(0, 0) = diag + 2 * bb;
+ m(0, 1) = 2 * (bc - ad);
+ m(0, 2) = 2 * (ac + bd);
+ m(0, 3) = 0;
+ m(1, 0) = 2 * (ad + bc);
+ m(1, 1) = diag + 2 * cc;
+ m(1, 2) = 2 * (cd - ab);
+ m(1, 3) = 0;
+ m(2, 0) = 2 * (bd - ac);
+ m(2, 1) = 2 * (ab + cd);
+ m(2, 2) = diag + 2 * dd;
+ m(2, 3) = 0;
+ m(3, 0) = 0;
+ m(3, 1) = 0;
+ m(3, 2) = 0;
+ m(3, 3) = 1;
+ }
+
+ // assumes that 'this' is normalized
+ Vector<T, 3> transform(const Vector<T, 3> &v) const
+ {
+ Matrix<T, 3, 3> m;
+ matrix(m);
+ return v * m;
+ }
+
+ // assumes that all the elements are packed tightly
+ T* bits() {return reinterpret_cast<T *>(this);}
+ const T* bits() const {return reinterpret_cast<const T *>(this);}
+
+ // requires floating point type T
+ static Quaternion rotation(T angle, const Vector<T, 3> &unitAxis)
+ {
+ T s = sin(angle / 2);
+ T c = cos(angle / 2);
+ return quaternion(c, unitAxis * s);
+ }
+
+ T scalar;
+ Vector<T, 3> vector;
+};
+
+template<class T>
+Quaternion<T> operator * (T s, const Quaternion<T>& q)
+{
+ return Quaternion<T>::quaternion(s * q.scalar, s * q.vector);
+}
+
+typedef Quaternion<float> Quaternionf;
+
+} // end namespace gfx
+
+#endif
diff --git a/demos/boxes/wood.fsh b/demos/boxes/wood.fsh
new file mode 100644
index 0000000..35bf7d6
--- /dev/null
+++ b/demos/boxes/wood.fsh
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+varying vec3 position, normal;
+varying vec4 specular, ambient, diffuse, lightDirection;
+
+uniform sampler2D tex;
+uniform sampler3D noise;
+
+//const vec4 woodColors[2] = {vec4(0.37,0.24,0.20,1), vec4(0.8,0.6,0.4,1)};
+uniform vec4 woodColors[2];
+//const float woodTubulence = 0.1;
+uniform float woodTubulence;
+
+void main()
+{
+ float r = length(gl_TexCoord[1].yz);
+ r += woodTubulence * texture3D(noise, 0.25 * gl_TexCoord[1].xyz).x;
+
+ vec3 N = normalize(normal);
+ // assume directional light
+
+ gl_MaterialParameters M = gl_FrontMaterial;
+
+ float NdotL = dot(N, lightDirection.xyz);
+ float RdotL = dot(reflect(normalize(position), N), lightDirection.xyz);
+
+ float f = fract(16.0 * r);
+ vec4 unlitColor = mix(woodColors[0], woodColors[1], min(1.25 * f, 5.0 - 5.0 * f));
+ gl_FragColor = (ambient + diffuse * max(NdotL, 0.0)) * unlitColor +
+ M.specular * specular * pow(max(RdotL, 0.0), M.shininess);
+}
diff --git a/demos/browser/Info_mac.plist b/demos/browser/Info_mac.plist
new file mode 100644
index 0000000..5648631
--- /dev/null
+++ b/demos/browser/Info_mac.plist
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.trolltech.DemoBrowser</string>
+ <key>CFBundleSignature</key>
+ <string>ttxt</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>html</string>
+ <string>htm</string>
+ <string>shtml</string>
+ <string>xht</string>
+ <string>xhtml</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundleTypeName</key>
+ <string>HTML Document</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>HTML</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
+ </array>
+ <key>NOTE</key>
+ <string>DemoBrowser by Nokia Corporation and/or its subsidiary(-ies)</string>
+</dict>
+</plist>
diff --git a/demos/browser/addbookmarkdialog.ui b/demos/browser/addbookmarkdialog.ui
new file mode 100644
index 0000000..3460d7b
--- /dev/null
+++ b/demos/browser/addbookmarkdialog.ui
@@ -0,0 +1,98 @@
+<ui version="4.0" >
+ <class>AddBookmarkDialog</class>
+ <widget class="QDialog" name="AddBookmarkDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>240</width>
+ <height>168</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Add Bookmark</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Type a name for the bookmark, and choose where to keep it.</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="name" />
+ </item>
+ <item>
+ <widget class="QComboBox" name="location" />
+ </item>
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>2</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ <property name="centerButtons" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>AddBookmarkDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>AddBookmarkDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/autosaver.cpp b/demos/browser/autosaver.cpp
new file mode 100644
index 0000000..4e945f0
--- /dev/null
+++ b/demos/browser/autosaver.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "autosaver.h"
+
+#include <QtCore/QDir>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QMetaObject>
+#include <QtDebug>
+
+#define AUTOSAVE_IN 1000 * 3 // seconds
+#define MAXWAIT 1000 * 15 // seconds
+
+AutoSaver::AutoSaver(QObject *parent) : QObject(parent)
+{
+ Q_ASSERT(parent);
+}
+
+AutoSaver::~AutoSaver()
+{
+ if (m_timer.isActive())
+ qWarning() << "AutoSaver: still active when destroyed, changes not saved.";
+}
+
+void AutoSaver::changeOccurred()
+{
+ if (m_firstChange.isNull())
+ m_firstChange.start();
+
+ if (m_firstChange.elapsed() > MAXWAIT) {
+ saveIfNeccessary();
+ } else {
+ m_timer.start(AUTOSAVE_IN, this);
+ }
+}
+
+void AutoSaver::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == m_timer.timerId()) {
+ saveIfNeccessary();
+ } else {
+ QObject::timerEvent(event);
+ }
+}
+
+void AutoSaver::saveIfNeccessary()
+{
+ if (!m_timer.isActive())
+ return;
+ m_timer.stop();
+ m_firstChange = QTime();
+ if (!QMetaObject::invokeMethod(parent(), "save", Qt::DirectConnection)) {
+ qWarning() << "AutoSaver: error invoking slot save() on parent";
+ }
+}
+
diff --git a/demos/browser/autosaver.h b/demos/browser/autosaver.h
new file mode 100644
index 0000000..bb340cd
--- /dev/null
+++ b/demos/browser/autosaver.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AUTOSAVER_H
+#define AUTOSAVER_H
+
+#include <QtCore/QObject>
+#include <QtCore/QBasicTimer>
+#include <QtCore/QTime>
+
+/*
+ This class will call the save() slot on the parent object when the parent changes.
+ It will wait several seconds after changed() to combining multiple changes and
+ prevent continuous writing to disk.
+ */
+class AutoSaver : public QObject {
+
+Q_OBJECT
+
+public:
+ AutoSaver(QObject *parent);
+ ~AutoSaver();
+ void saveIfNeccessary();
+
+public slots:
+ void changeOccurred();
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private:
+ QBasicTimer m_timer;
+ QTime m_firstChange;
+
+};
+
+#endif // AUTOSAVER_H
+
diff --git a/demos/browser/bookmarks.cpp b/demos/browser/bookmarks.cpp
new file mode 100644
index 0000000..8e7823d
--- /dev/null
+++ b/demos/browser/bookmarks.cpp
@@ -0,0 +1,987 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bookmarks.h"
+
+#include "autosaver.h"
+#include "browserapplication.h"
+#include "history.h"
+#include "xbel.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QFile>
+#include <QtCore/QMimeData>
+
+#include <QtGui/QDesktopServices>
+#include <QtGui/QDragEnterEvent>
+#include <QtGui/QFileDialog>
+#include <QtGui/QHeaderView>
+#include <QtGui/QIcon>
+#include <QtGui/QMessageBox>
+#include <QtGui/QToolButton>
+
+#include <QtWebKit/QWebSettings>
+
+#include <QtCore/QDebug>
+
+#define BOOKMARKBAR "Bookmarks Bar"
+#define BOOKMARKMENU "Bookmarks Menu"
+
+BookmarksManager::BookmarksManager(QObject *parent)
+ : QObject(parent)
+ , m_loaded(false)
+ , m_saveTimer(new AutoSaver(this))
+ , m_bookmarkRootNode(0)
+ , m_bookmarkModel(0)
+{
+ connect(this, SIGNAL(entryAdded(BookmarkNode *)),
+ m_saveTimer, SLOT(changeOccurred()));
+ connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
+ m_saveTimer, SLOT(changeOccurred()));
+ connect(this, SIGNAL(entryChanged(BookmarkNode *)),
+ m_saveTimer, SLOT(changeOccurred()));
+}
+
+BookmarksManager::~BookmarksManager()
+{
+ m_saveTimer->saveIfNeccessary();
+}
+
+void BookmarksManager::changeExpanded()
+{
+ m_saveTimer->changeOccurred();
+}
+
+void BookmarksManager::load()
+{
+ if (m_loaded)
+ return;
+ m_loaded = true;
+
+ QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
+ if (!QFile::exists(bookmarkFile))
+ bookmarkFile = QLatin1String(":defaultbookmarks.xbel");
+
+ XbelReader reader;
+ m_bookmarkRootNode = reader.read(bookmarkFile);
+ if (reader.error() != QXmlStreamReader::NoError) {
+ QMessageBox::warning(0, QLatin1String("Loading Bookmark"),
+ tr("Error when loading bookmarks on line %1, column %2:\n"
+ "%3").arg(reader.lineNumber()).arg(reader.columnNumber()).arg(reader.errorString()));
+ }
+
+ BookmarkNode *toolbar = 0;
+ BookmarkNode *menu = 0;
+ QList<BookmarkNode*> others;
+ for (int i = m_bookmarkRootNode->children().count() - 1; i >= 0; --i) {
+ BookmarkNode *node = m_bookmarkRootNode->children().at(i);
+ if (node->type() == BookmarkNode::Folder) {
+ // Automatically convert
+ if (node->title == tr("Toolbar Bookmarks") && !toolbar) {
+ node->title = tr(BOOKMARKBAR);
+ }
+ if (node->title == tr(BOOKMARKBAR) && !toolbar) {
+ toolbar = node;
+ }
+
+ // Automatically convert
+ if (node->title == tr("Menu") && !menu) {
+ node->title = tr(BOOKMARKMENU);
+ }
+ if (node->title == tr(BOOKMARKMENU) && !menu) {
+ menu = node;
+ }
+ } else {
+ others.append(node);
+ }
+ m_bookmarkRootNode->remove(node);
+ }
+ Q_ASSERT(m_bookmarkRootNode->children().count() == 0);
+ if (!toolbar) {
+ toolbar = new BookmarkNode(BookmarkNode::Folder, m_bookmarkRootNode);
+ toolbar->title = tr(BOOKMARKBAR);
+ } else {
+ m_bookmarkRootNode->add(toolbar);
+ }
+
+ if (!menu) {
+ menu = new BookmarkNode(BookmarkNode::Folder, m_bookmarkRootNode);
+ menu->title = tr(BOOKMARKMENU);
+ } else {
+ m_bookmarkRootNode->add(menu);
+ }
+
+ for (int i = 0; i < others.count(); ++i)
+ menu->add(others.at(i));
+}
+
+void BookmarksManager::save() const
+{
+ if (!m_loaded)
+ return;
+
+ XbelWriter writer;
+ QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
+ if (!writer.write(bookmarkFile, m_bookmarkRootNode))
+ qWarning() << "BookmarkManager: error saving to" << bookmarkFile;
+}
+
+void BookmarksManager::addBookmark(BookmarkNode *parent, BookmarkNode *node, int row)
+{
+ if (!m_loaded)
+ return;
+ Q_ASSERT(parent);
+ InsertBookmarksCommand *command = new InsertBookmarksCommand(this, parent, node, row);
+ m_commands.push(command);
+}
+
+void BookmarksManager::removeBookmark(BookmarkNode *node)
+{
+ if (!m_loaded)
+ return;
+
+ Q_ASSERT(node);
+ BookmarkNode *parent = node->parent();
+ int row = parent->children().indexOf(node);
+ RemoveBookmarksCommand *command = new RemoveBookmarksCommand(this, parent, row);
+ m_commands.push(command);
+}
+
+void BookmarksManager::setTitle(BookmarkNode *node, const QString &newTitle)
+{
+ if (!m_loaded)
+ return;
+
+ Q_ASSERT(node);
+ ChangeBookmarkCommand *command = new ChangeBookmarkCommand(this, node, newTitle, true);
+ m_commands.push(command);
+}
+
+void BookmarksManager::setUrl(BookmarkNode *node, const QString &newUrl)
+{
+ if (!m_loaded)
+ return;
+
+ Q_ASSERT(node);
+ ChangeBookmarkCommand *command = new ChangeBookmarkCommand(this, node, newUrl, false);
+ m_commands.push(command);
+}
+
+BookmarkNode *BookmarksManager::bookmarks()
+{
+ if (!m_loaded)
+ load();
+ return m_bookmarkRootNode;
+}
+
+BookmarkNode *BookmarksManager::menu()
+{
+ if (!m_loaded)
+ load();
+
+ for (int i = m_bookmarkRootNode->children().count() - 1; i >= 0; --i) {
+ BookmarkNode *node = m_bookmarkRootNode->children().at(i);
+ if (node->title == tr(BOOKMARKMENU))
+ return node;
+ }
+ Q_ASSERT(false);
+ return 0;
+}
+
+BookmarkNode *BookmarksManager::toolbar()
+{
+ if (!m_loaded)
+ load();
+
+ for (int i = m_bookmarkRootNode->children().count() - 1; i >= 0; --i) {
+ BookmarkNode *node = m_bookmarkRootNode->children().at(i);
+ if (node->title == tr(BOOKMARKBAR))
+ return node;
+ }
+ Q_ASSERT(false);
+ return 0;
+}
+
+BookmarksModel *BookmarksManager::bookmarksModel()
+{
+ if (!m_bookmarkModel)
+ m_bookmarkModel = new BookmarksModel(this, this);
+ return m_bookmarkModel;
+}
+
+void BookmarksManager::importBookmarks()
+{
+ QString fileName = QFileDialog::getOpenFileName(0, tr("Open File"),
+ QString(),
+ tr("XBEL (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ XbelReader reader;
+ BookmarkNode *importRootNode = reader.read(fileName);
+ if (reader.error() != QXmlStreamReader::NoError) {
+ QMessageBox::warning(0, QLatin1String("Loading Bookmark"),
+ tr("Error when loading bookmarks on line %1, column %2:\n"
+ "%3").arg(reader.lineNumber()).arg(reader.columnNumber()).arg(reader.errorString()));
+ }
+
+ importRootNode->setType(BookmarkNode::Folder);
+ importRootNode->title = (tr("Imported %1").arg(QDate::currentDate().toString(Qt::SystemLocaleShortDate)));
+ addBookmark(menu(), importRootNode);
+}
+
+void BookmarksManager::exportBookmarks()
+{
+ QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
+ tr("%1 Bookmarks.xbel").arg(QCoreApplication::applicationName()),
+ tr("XBEL (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ XbelWriter writer;
+ if (!writer.write(fileName, m_bookmarkRootNode))
+ QMessageBox::critical(0, tr("Export error"), tr("error saving bookmarks"));
+}
+
+RemoveBookmarksCommand::RemoveBookmarksCommand(BookmarksManager *m_bookmarkManagaer, BookmarkNode *parent, int row)
+ : QUndoCommand(BookmarksManager::tr("Remove Bookmark"))
+ , m_row(row)
+ , m_bookmarkManagaer(m_bookmarkManagaer)
+ , m_node(parent->children().value(row))
+ , m_parent(parent)
+ , m_done(false)
+{
+}
+
+RemoveBookmarksCommand::~RemoveBookmarksCommand()
+{
+ if (m_done && !m_node->parent()) {
+ delete m_node;
+ }
+}
+
+void RemoveBookmarksCommand::undo()
+{
+ m_parent->add(m_node, m_row);
+ emit m_bookmarkManagaer->entryAdded(m_node);
+ m_done = false;
+}
+
+void RemoveBookmarksCommand::redo()
+{
+ m_parent->remove(m_node);
+ emit m_bookmarkManagaer->entryRemoved(m_parent, m_row, m_node);
+ m_done = true;
+}
+
+InsertBookmarksCommand::InsertBookmarksCommand(BookmarksManager *m_bookmarkManagaer,
+ BookmarkNode *parent, BookmarkNode *node, int row)
+ : RemoveBookmarksCommand(m_bookmarkManagaer, parent, row)
+{
+ setText(BookmarksManager::tr("Insert Bookmark"));
+ m_node = node;
+}
+
+ChangeBookmarkCommand::ChangeBookmarkCommand(BookmarksManager *m_bookmarkManagaer, BookmarkNode *node,
+ const QString &newValue, bool title)
+ : QUndoCommand()
+ , m_bookmarkManagaer(m_bookmarkManagaer)
+ , m_title(title)
+ , m_newValue(newValue)
+ , m_node(node)
+{
+ if (m_title) {
+ m_oldValue = m_node->title;
+ setText(BookmarksManager::tr("Name Change"));
+ } else {
+ m_oldValue = m_node->url;
+ setText(BookmarksManager::tr("Address Change"));
+ }
+}
+
+void ChangeBookmarkCommand::undo()
+{
+ if (m_title)
+ m_node->title = m_oldValue;
+ else
+ m_node->url = m_oldValue;
+ emit m_bookmarkManagaer->entryChanged(m_node);
+}
+
+void ChangeBookmarkCommand::redo()
+{
+ if (m_title)
+ m_node->title = m_newValue;
+ else
+ m_node->url = m_newValue;
+ emit m_bookmarkManagaer->entryChanged(m_node);
+}
+
+BookmarksModel::BookmarksModel(BookmarksManager *bookmarkManager, QObject *parent)
+ : QAbstractItemModel(parent)
+ , m_endMacro(false)
+ , m_bookmarksManager(bookmarkManager)
+{
+ connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode *)),
+ this, SLOT(entryAdded(BookmarkNode *)));
+ connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
+ this, SLOT(entryRemoved(BookmarkNode *, int, BookmarkNode *)));
+ connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode *)),
+ this, SLOT(entryChanged(BookmarkNode *)));
+}
+
+QModelIndex BookmarksModel::index(BookmarkNode *node) const
+{
+ BookmarkNode *parent = node->parent();
+ if (!parent)
+ return QModelIndex();
+ return createIndex(parent->children().indexOf(node), 0, node);
+}
+
+void BookmarksModel::entryAdded(BookmarkNode *item)
+{
+ Q_ASSERT(item && item->parent());
+ int row = item->parent()->children().indexOf(item);
+ BookmarkNode *parent = item->parent();
+ // item was already added so remove beore beginInsertRows is called
+ parent->remove(item);
+ beginInsertRows(index(parent), row, row);
+ parent->add(item, row);
+ endInsertRows();
+}
+
+void BookmarksModel::entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item)
+{
+ // item was already removed, re-add so beginRemoveRows works
+ parent->add(item, row);
+ beginRemoveRows(index(parent), row, row);
+ parent->remove(item);
+ endRemoveRows();
+}
+
+void BookmarksModel::entryChanged(BookmarkNode *item)
+{
+ QModelIndex idx = index(item);
+ emit dataChanged(idx, idx);
+}
+
+bool BookmarksModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (row < 0 || count <= 0 || row + count > rowCount(parent))
+ return false;
+
+ BookmarkNode *bookmarkNode = node(parent);
+ for (int i = row + count - 1; i >= row; --i) {
+ BookmarkNode *node = bookmarkNode->children().at(i);
+ if (node == m_bookmarksManager->menu()
+ || node == m_bookmarksManager->toolbar())
+ continue;
+
+ m_bookmarksManager->removeBookmark(node);
+ }
+ if (m_endMacro) {
+ m_bookmarksManager->undoRedoStack()->endMacro();
+ m_endMacro = false;
+ }
+ return true;
+}
+
+QVariant BookmarksModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
+ switch (section) {
+ case 0: return tr("Title");
+ case 1: return tr("Address");
+ }
+ }
+ return QAbstractItemModel::headerData(section, orientation, role);
+}
+
+QVariant BookmarksModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid() || index.model() != this)
+ return QVariant();
+
+ const BookmarkNode *bookmarkNode = node(index);
+ switch (role) {
+ case Qt::EditRole:
+ case Qt::DisplayRole:
+ if (bookmarkNode->type() == BookmarkNode::Separator) {
+ switch (index.column()) {
+ case 0: return QString(50, 0xB7);
+ case 1: return QString();
+ }
+ }
+
+ switch (index.column()) {
+ case 0: return bookmarkNode->title;
+ case 1: return bookmarkNode->url;
+ }
+ break;
+ case BookmarksModel::UrlRole:
+ return QUrl(bookmarkNode->url);
+ break;
+ case BookmarksModel::UrlStringRole:
+ return bookmarkNode->url;
+ break;
+ case BookmarksModel::TypeRole:
+ return bookmarkNode->type();
+ break;
+ case BookmarksModel::SeparatorRole:
+ return (bookmarkNode->type() == BookmarkNode::Separator);
+ break;
+ case Qt::DecorationRole:
+ if (index.column() == 0) {
+ if (bookmarkNode->type() == BookmarkNode::Folder)
+ return QApplication::style()->standardIcon(QStyle::SP_DirIcon);
+ return BrowserApplication::instance()->icon(bookmarkNode->url);
+ }
+ }
+
+ return QVariant();
+}
+
+int BookmarksModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.column() > 0) ? 0 : 2;
+}
+
+int BookmarksModel::rowCount(const QModelIndex &parent) const
+{
+ if (parent.column() > 0)
+ return 0;
+
+ if (!parent.isValid())
+ return m_bookmarksManager->bookmarks()->children().count();
+
+ const BookmarkNode *item = static_cast<BookmarkNode*>(parent.internalPointer());
+ return item->children().count();
+}
+
+QModelIndex BookmarksModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (row < 0 || column < 0 || row >= rowCount(parent) || column >= columnCount(parent))
+ return QModelIndex();
+
+ // get the parent node
+ BookmarkNode *parentNode = node(parent);
+ return createIndex(row, column, parentNode->children().at(row));
+}
+
+QModelIndex BookmarksModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ BookmarkNode *itemNode = node(index);
+ BookmarkNode *parentNode = (itemNode ? itemNode->parent() : 0);
+ if (!parentNode || parentNode == m_bookmarksManager->bookmarks())
+ return QModelIndex();
+
+ // get the parent's row
+ BookmarkNode *grandParentNode = parentNode->parent();
+ int parentRow = grandParentNode->children().indexOf(parentNode);
+ Q_ASSERT(parentRow >= 0);
+ return createIndex(parentRow, 0, parentNode);
+}
+
+bool BookmarksModel::hasChildren(const QModelIndex &parent) const
+{
+ if (!parent.isValid())
+ return true;
+ const BookmarkNode *parentNode = node(parent);
+ return (parentNode->type() == BookmarkNode::Folder);
+}
+
+Qt::ItemFlags BookmarksModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::NoItemFlags;
+
+ Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+
+ BookmarkNode *bookmarkNode = node(index);
+
+ if (bookmarkNode != m_bookmarksManager->menu()
+ && bookmarkNode != m_bookmarksManager->toolbar()) {
+ flags |= Qt::ItemIsDragEnabled;
+ if (bookmarkNode->type() != BookmarkNode::Separator)
+ flags |= Qt::ItemIsEditable;
+ }
+ if (hasChildren(index))
+ flags |= Qt::ItemIsDropEnabled;
+ return flags;
+}
+
+Qt::DropActions BookmarksModel::supportedDropActions () const
+{
+ return Qt::CopyAction | Qt::MoveAction;
+}
+
+#define MIMETYPE QLatin1String("application/bookmarks.xbel")
+
+QStringList BookmarksModel::mimeTypes() const
+{
+ QStringList types;
+ types << MIMETYPE;
+ return types;
+}
+
+QMimeData *BookmarksModel::mimeData(const QModelIndexList &indexes) const
+{
+ QMimeData *mimeData = new QMimeData();
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly);
+ foreach (QModelIndex index, indexes) {
+ if (index.column() != 0 || !index.isValid())
+ continue;
+ QByteArray encodedData;
+ QBuffer buffer(&encodedData);
+ buffer.open(QBuffer::ReadWrite);
+ XbelWriter writer;
+ const BookmarkNode *parentNode = node(index);
+ writer.write(&buffer, parentNode);
+ stream << encodedData;
+ }
+ mimeData->setData(MIMETYPE, data);
+ return mimeData;
+}
+
+bool BookmarksModel::dropMimeData(const QMimeData *data,
+ Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (!data->hasFormat(MIMETYPE)
+ || column > 0)
+ return false;
+
+ QByteArray ba = data->data(MIMETYPE);
+ QDataStream stream(&ba, QIODevice::ReadOnly);
+ if (stream.atEnd())
+ return false;
+
+ QUndoStack *undoStack = m_bookmarksManager->undoRedoStack();
+ undoStack->beginMacro(QLatin1String("Move Bookmarks"));
+
+ while (!stream.atEnd()) {
+ QByteArray encodedData;
+ stream >> encodedData;
+ QBuffer buffer(&encodedData);
+ buffer.open(QBuffer::ReadOnly);
+
+ XbelReader reader;
+ BookmarkNode *rootNode = reader.read(&buffer);
+ QList<BookmarkNode*> children = rootNode->children();
+ for (int i = 0; i < children.count(); ++i) {
+ BookmarkNode *bookmarkNode = children.at(i);
+ rootNode->remove(bookmarkNode);
+ row = qMax(0, row);
+ BookmarkNode *parentNode = node(parent);
+ m_bookmarksManager->addBookmark(parentNode, bookmarkNode, row);
+ m_endMacro = true;
+ }
+ delete rootNode;
+ }
+ return true;
+}
+
+bool BookmarksModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+ if (!index.isValid() || (flags(index) & Qt::ItemIsEditable) == 0)
+ return false;
+
+ BookmarkNode *item = node(index);
+
+ switch (role) {
+ case Qt::EditRole:
+ case Qt::DisplayRole:
+ if (index.column() == 0) {
+ m_bookmarksManager->setTitle(item, value.toString());
+ break;
+ }
+ if (index.column() == 1) {
+ m_bookmarksManager->setUrl(item, value.toString());
+ break;
+ }
+ return false;
+ case BookmarksModel::UrlRole:
+ m_bookmarksManager->setUrl(item, value.toUrl().toString());
+ break;
+ case BookmarksModel::UrlStringRole:
+ m_bookmarksManager->setUrl(item, value.toString());
+ break;
+ default:
+ break;
+ return false;
+ }
+
+ return true;
+}
+
+BookmarkNode *BookmarksModel::node(const QModelIndex &index) const
+{
+ BookmarkNode *itemNode = static_cast<BookmarkNode*>(index.internalPointer());
+ if (!itemNode)
+ return m_bookmarksManager->bookmarks();
+ return itemNode;
+}
+
+
+AddBookmarkProxyModel::AddBookmarkProxyModel(QObject *parent)
+ : QSortFilterProxyModel(parent)
+{
+}
+
+int AddBookmarkProxyModel::columnCount(const QModelIndex &parent) const
+{
+ return qMin(1, QSortFilterProxyModel::columnCount(parent));
+}
+
+bool AddBookmarkProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
+{
+ QModelIndex idx = sourceModel()->index(source_row, 0, source_parent);
+ return sourceModel()->hasChildren(idx);
+}
+
+AddBookmarkDialog::AddBookmarkDialog(const QString &url, const QString &title, QWidget *parent, BookmarksManager *bookmarkManager)
+ : QDialog(parent)
+ , m_url(url)
+ , m_bookmarksManager(bookmarkManager)
+{
+ setWindowFlags(Qt::Sheet);
+ if (!m_bookmarksManager)
+ m_bookmarksManager = BrowserApplication::bookmarksManager();
+ setupUi(this);
+ QTreeView *view = new QTreeView(this);
+ m_proxyModel = new AddBookmarkProxyModel(this);
+ BookmarksModel *model = m_bookmarksManager->bookmarksModel();
+ m_proxyModel->setSourceModel(model);
+ view->setModel(m_proxyModel);
+ view->expandAll();
+ view->header()->setStretchLastSection(true);
+ view->header()->hide();
+ view->setItemsExpandable(false);
+ view->setRootIsDecorated(false);
+ view->setIndentation(10);
+ location->setModel(m_proxyModel);
+ view->show();
+ location->setView(view);
+ BookmarkNode *menu = m_bookmarksManager->menu();
+ QModelIndex idx = m_proxyModel->mapFromSource(model->index(menu));
+ view->setCurrentIndex(idx);
+ location->setCurrentIndex(idx.row());
+ name->setText(title);
+}
+
+void AddBookmarkDialog::accept()
+{
+ QModelIndex index = location->view()->currentIndex();
+ index = m_proxyModel->mapToSource(index);
+ if (!index.isValid())
+ index = m_bookmarksManager->bookmarksModel()->index(0, 0);
+ BookmarkNode *parent = m_bookmarksManager->bookmarksModel()->node(index);
+ BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark);
+ bookmark->url = m_url;
+ bookmark->title = name->text();
+ m_bookmarksManager->addBookmark(parent, bookmark);
+ QDialog::accept();
+}
+
+BookmarksMenu::BookmarksMenu(QWidget *parent)
+ : ModelMenu(parent)
+ , m_bookmarksManager(0)
+{
+ connect(this, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(activated(const QModelIndex &)));
+ setMaxRows(-1);
+ setHoverRole(BookmarksModel::UrlStringRole);
+ setSeparatorRole(BookmarksModel::SeparatorRole);
+}
+
+void BookmarksMenu::activated(const QModelIndex &index)
+{
+ emit openUrl(index.data(BookmarksModel::UrlRole).toUrl());
+}
+
+bool BookmarksMenu::prePopulated()
+{
+ m_bookmarksManager = BrowserApplication::bookmarksManager();
+ setModel(m_bookmarksManager->bookmarksModel());
+ setRootIndex(m_bookmarksManager->bookmarksModel()->index(1, 0));
+ // initial actions
+ for (int i = 0; i < m_initialActions.count(); ++i)
+ addAction(m_initialActions.at(i));
+ if (!m_initialActions.isEmpty())
+ addSeparator();
+ createMenu(model()->index(0, 0), 1, this);
+ return true;
+}
+
+void BookmarksMenu::setInitialActions(QList<QAction*> actions)
+{
+ m_initialActions = actions;
+ for (int i = 0; i < m_initialActions.count(); ++i)
+ addAction(m_initialActions.at(i));
+}
+
+BookmarksDialog::BookmarksDialog(QWidget *parent, BookmarksManager *manager)
+ : QDialog(parent)
+{
+ m_bookmarksManager = manager;
+ if (!m_bookmarksManager)
+ m_bookmarksManager = BrowserApplication::bookmarksManager();
+ setupUi(this);
+
+ tree->setUniformRowHeights(true);
+ tree->setSelectionBehavior(QAbstractItemView::SelectRows);
+ tree->setSelectionMode(QAbstractItemView::ContiguousSelection);
+ tree->setTextElideMode(Qt::ElideMiddle);
+ m_bookmarksModel = m_bookmarksManager->bookmarksModel();
+ m_proxyModel = new TreeProxyModel(this);
+ connect(search, SIGNAL(textChanged(QString)),
+ m_proxyModel, SLOT(setFilterFixedString(QString)));
+ connect(removeButton, SIGNAL(clicked()), tree, SLOT(removeOne()));
+ m_proxyModel->setSourceModel(m_bookmarksModel);
+ tree->setModel(m_proxyModel);
+ tree->setDragDropMode(QAbstractItemView::InternalMove);
+ tree->setExpanded(m_proxyModel->index(0, 0), true);
+ tree->setAlternatingRowColors(true);
+ QFontMetrics fm(font());
+ int header = fm.width(QLatin1Char('m')) * 40;
+ tree->header()->resizeSection(0, header);
+ tree->header()->setStretchLastSection(true);
+ connect(tree, SIGNAL(activated(const QModelIndex&)),
+ this, SLOT(open()));
+ tree->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)),
+ this, SLOT(customContextMenuRequested(const QPoint &)));
+ connect(addFolderButton, SIGNAL(clicked()),
+ this, SLOT(newFolder()));
+ expandNodes(m_bookmarksManager->bookmarks());
+ setAttribute(Qt::WA_DeleteOnClose);
+}
+
+BookmarksDialog::~BookmarksDialog()
+{
+ if (saveExpandedNodes(tree->rootIndex()))
+ m_bookmarksManager->changeExpanded();
+}
+
+bool BookmarksDialog::saveExpandedNodes(const QModelIndex &parent)
+{
+ bool changed = false;
+ for (int i = 0; i < m_proxyModel->rowCount(parent); ++i) {
+ QModelIndex child = m_proxyModel->index(i, 0, parent);
+ QModelIndex sourceIndex = m_proxyModel->mapToSource(child);
+ BookmarkNode *childNode = m_bookmarksModel->node(sourceIndex);
+ bool wasExpanded = childNode->expanded;
+ if (tree->isExpanded(child)) {
+ childNode->expanded = true;
+ changed |= saveExpandedNodes(child);
+ } else {
+ childNode->expanded = false;
+ }
+ changed |= (wasExpanded != childNode->expanded);
+ }
+ return changed;
+}
+
+void BookmarksDialog::expandNodes(BookmarkNode *node)
+{
+ for (int i = 0; i < node->children().count(); ++i) {
+ BookmarkNode *childNode = node->children()[i];
+ if (childNode->expanded) {
+ QModelIndex idx = m_bookmarksModel->index(childNode);
+ idx = m_proxyModel->mapFromSource(idx);
+ tree->setExpanded(idx, true);
+ expandNodes(childNode);
+ }
+ }
+}
+
+void BookmarksDialog::customContextMenuRequested(const QPoint &pos)
+{
+ QMenu menu;
+ QModelIndex index = tree->indexAt(pos);
+ index = index.sibling(index.row(), 0);
+ if (index.isValid() && !tree->model()->hasChildren(index)) {
+ menu.addAction(tr("Open"), this, SLOT(open()));
+ menu.addSeparator();
+ }
+ menu.addAction(tr("Delete"), tree, SLOT(removeOne()));
+ menu.exec(QCursor::pos());
+}
+
+void BookmarksDialog::open()
+{
+ QModelIndex index = tree->currentIndex();
+ if (!index.parent().isValid())
+ return;
+ emit openUrl(index.sibling(index.row(), 1).data(BookmarksModel::UrlRole).toUrl());
+}
+
+void BookmarksDialog::newFolder()
+{
+ QModelIndex currentIndex = tree->currentIndex();
+ QModelIndex idx = currentIndex;
+ if (idx.isValid() && !idx.model()->hasChildren(idx))
+ idx = idx.parent();
+ if (!idx.isValid())
+ idx = tree->rootIndex();
+ idx = m_proxyModel->mapToSource(idx);
+ BookmarkNode *parent = m_bookmarksManager->bookmarksModel()->node(idx);
+ BookmarkNode *node = new BookmarkNode(BookmarkNode::Folder);
+ node->title = tr("New Folder");
+ m_bookmarksManager->addBookmark(parent, node, currentIndex.row() + 1);
+}
+
+BookmarksToolBar::BookmarksToolBar(BookmarksModel *model, QWidget *parent)
+ : QToolBar(tr("Bookmark"), parent)
+ , m_bookmarksModel(model)
+{
+ connect(this, SIGNAL(actionTriggered(QAction*)), this, SLOT(triggered(QAction*)));
+ setRootIndex(model->index(0, 0));
+ connect(m_bookmarksModel, SIGNAL(modelReset()), this, SLOT(build()));
+ connect(m_bookmarksModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(build()));
+ connect(m_bookmarksModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(build()));
+ connect(m_bookmarksModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(build()));
+ setAcceptDrops(true);
+}
+
+void BookmarksToolBar::dragEnterEvent(QDragEnterEvent *event)
+{
+ const QMimeData *mimeData = event->mimeData();
+ if (mimeData->hasUrls())
+ event->acceptProposedAction();
+ QToolBar::dragEnterEvent(event);
+}
+
+void BookmarksToolBar::dropEvent(QDropEvent *event)
+{
+ const QMimeData *mimeData = event->mimeData();
+ if (mimeData->hasUrls() && mimeData->hasText()) {
+ QList<QUrl> urls = mimeData->urls();
+ QAction *action = actionAt(event->pos());
+ QString dropText;
+ if (action)
+ dropText = action->text();
+ int row = -1;
+ QModelIndex parentIndex = m_root;
+ for (int i = 0; i < m_bookmarksModel->rowCount(m_root); ++i) {
+ QModelIndex idx = m_bookmarksModel->index(i, 0, m_root);
+ QString title = idx.data().toString();
+ if (title == dropText) {
+ row = i;
+ if (m_bookmarksModel->hasChildren(idx)) {
+ parentIndex = idx;
+ row = -1;
+ }
+ break;
+ }
+ }
+ BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark);
+ bookmark->url = urls.at(0).toString();
+ bookmark->title = mimeData->text();
+
+ BookmarkNode *parent = m_bookmarksModel->node(parentIndex);
+ BookmarksManager *bookmarksManager = m_bookmarksModel->bookmarksManager();
+ bookmarksManager->addBookmark(parent, bookmark, row);
+ event->acceptProposedAction();
+ }
+ QToolBar::dropEvent(event);
+}
+
+
+void BookmarksToolBar::setRootIndex(const QModelIndex &index)
+{
+ m_root = index;
+ build();
+}
+
+QModelIndex BookmarksToolBar::rootIndex() const
+{
+ return m_root;
+}
+
+void BookmarksToolBar::build()
+{
+ clear();
+ for (int i = 0; i < m_bookmarksModel->rowCount(m_root); ++i) {
+ QModelIndex idx = m_bookmarksModel->index(i, 0, m_root);
+ if (m_bookmarksModel->hasChildren(idx)) {
+ QToolButton *button = new QToolButton(this);
+ button->setPopupMode(QToolButton::InstantPopup);
+ button->setArrowType(Qt::DownArrow);
+ button->setText(idx.data().toString());
+ ModelMenu *menu = new ModelMenu(this);
+ connect(menu, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(activated(const QModelIndex &)));
+ menu->setModel(m_bookmarksModel);
+ menu->setRootIndex(idx);
+ menu->addAction(new QAction(menu));
+ button->setMenu(menu);
+ button->setToolButtonStyle(Qt::ToolButtonTextOnly);
+ QAction *a = addWidget(button);
+ a->setText(idx.data().toString());
+ } else {
+ QAction *action = addAction(idx.data().toString());
+ action->setData(idx.data(BookmarksModel::UrlRole));
+ }
+ }
+}
+
+void BookmarksToolBar::triggered(QAction *action)
+{
+ QVariant v = action->data();
+ if (v.canConvert<QUrl>()) {
+ emit openUrl(v.toUrl());
+ }
+}
+
+void BookmarksToolBar::activated(const QModelIndex &index)
+{
+ emit openUrl(index.data(BookmarksModel::UrlRole).toUrl());
+}
+
diff --git a/demos/browser/bookmarks.h b/demos/browser/bookmarks.h
new file mode 100644
index 0000000..fb47b4f
--- /dev/null
+++ b/demos/browser/bookmarks.h
@@ -0,0 +1,310 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BOOKMARKS_H
+#define BOOKMARKS_H
+
+#include <QtCore/QObject>
+#include <QtCore/QAbstractItemModel>
+
+#include <QtGui/QUndoCommand>
+
+/*!
+ Bookmark manager, owner of the bookmarks, loads, saves and basic tasks
+ */
+class AutoSaver;
+class BookmarkNode;
+class BookmarksModel;
+class BookmarksManager : public QObject
+{
+ Q_OBJECT
+
+signals:
+ void entryAdded(BookmarkNode *item);
+ void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item);
+ void entryChanged(BookmarkNode *item);
+
+public:
+ BookmarksManager(QObject *parent = 0);
+ ~BookmarksManager();
+
+ void addBookmark(BookmarkNode *parent, BookmarkNode *node, int row = -1);
+ void removeBookmark(BookmarkNode *node);
+ void setTitle(BookmarkNode *node, const QString &newTitle);
+ void setUrl(BookmarkNode *node, const QString &newUrl);
+ void changeExpanded();
+
+ BookmarkNode *bookmarks();
+ BookmarkNode *menu();
+ BookmarkNode *toolbar();
+
+ BookmarksModel *bookmarksModel();
+ QUndoStack *undoRedoStack() { return &m_commands; };
+
+public slots:
+ void importBookmarks();
+ void exportBookmarks();
+
+private slots:
+ void save() const;
+
+private:
+ void load();
+
+ bool m_loaded;
+ AutoSaver *m_saveTimer;
+ BookmarkNode *m_bookmarkRootNode;
+ BookmarksModel *m_bookmarkModel;
+ QUndoStack m_commands;
+
+ friend class RemoveBookmarksCommand;
+ friend class ChangeBookmarkCommand;
+};
+
+class RemoveBookmarksCommand : public QUndoCommand
+{
+
+public:
+ RemoveBookmarksCommand(BookmarksManager *m_bookmarkManagaer, BookmarkNode *parent, int row);
+ ~RemoveBookmarksCommand();
+ void undo();
+ void redo();
+
+protected:
+ int m_row;
+ BookmarksManager *m_bookmarkManagaer;
+ BookmarkNode *m_node;
+ BookmarkNode *m_parent;
+ bool m_done;
+};
+
+class InsertBookmarksCommand : public RemoveBookmarksCommand
+{
+
+public:
+ InsertBookmarksCommand(BookmarksManager *m_bookmarkManagaer,
+ BookmarkNode *parent, BookmarkNode *node, int row);
+ void undo() { RemoveBookmarksCommand::redo(); }
+ void redo() { RemoveBookmarksCommand::undo(); }
+
+};
+
+class ChangeBookmarkCommand : public QUndoCommand
+{
+
+public:
+ ChangeBookmarkCommand(BookmarksManager *m_bookmarkManagaer,
+ BookmarkNode *node, const QString &newValue, bool title);
+ void undo();
+ void redo();
+
+private:
+ BookmarksManager *m_bookmarkManagaer;
+ bool m_title;
+ QString m_oldValue;
+ QString m_newValue;
+ BookmarkNode *m_node;
+};
+
+/*!
+ BookmarksModel is a QAbstractItemModel wrapper around the BookmarkManager
+ */
+#include <QtGui/QIcon>
+class BookmarksModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public slots:
+ void entryAdded(BookmarkNode *item);
+ void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item);
+ void entryChanged(BookmarkNode *item);
+
+public:
+ enum Roles {
+ TypeRole = Qt::UserRole + 1,
+ UrlRole = Qt::UserRole + 2,
+ UrlStringRole = Qt::UserRole + 3,
+ SeparatorRole = Qt::UserRole + 4
+ };
+
+ BookmarksModel(BookmarksManager *bookmarkManager, QObject *parent = 0);
+ inline BookmarksManager *bookmarksManager() const { return m_bookmarksManager; }
+
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex index(int, int, const QModelIndex& = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex& index= QModelIndex()) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ Qt::DropActions supportedDropActions () const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const;
+ bool dropMimeData(const QMimeData *data,
+ Qt::DropAction action, int row, int column, const QModelIndex &parent);
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
+
+ BookmarkNode *node(const QModelIndex &index) const;
+ QModelIndex index(BookmarkNode *node) const;
+
+private:
+
+ bool m_endMacro;
+ BookmarksManager *m_bookmarksManager;
+};
+
+// Menu that is dynamically populated from the bookmarks
+#include "modelmenu.h"
+class BookmarksMenu : public ModelMenu
+{
+ Q_OBJECT
+
+signals:
+ void openUrl(const QUrl &url);
+
+public:
+ BookmarksMenu(QWidget *parent = 0);
+ void setInitialActions(QList<QAction*> actions);
+
+protected:
+ bool prePopulated();
+
+private slots:
+ void activated(const QModelIndex &index);
+
+private:
+ BookmarksManager *m_bookmarksManager;
+ QList<QAction*> m_initialActions;
+};
+
+/*
+ Proxy model that filters out the bookmarks so only the folders
+ are left behind. Used in the add bookmark dialog combobox.
+ */
+#include <QtGui/QSortFilterProxyModel>
+class AddBookmarkProxyModel : public QSortFilterProxyModel
+{
+ Q_OBJECT
+public:
+ AddBookmarkProxyModel(QObject * parent = 0);
+ int columnCount(const QModelIndex & parent = QModelIndex()) const;
+
+protected:
+ bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
+};
+
+/*!
+ Add bookmark dialog
+ */
+#include "ui_addbookmarkdialog.h"
+class AddBookmarkDialog : public QDialog, public Ui_AddBookmarkDialog
+{
+ Q_OBJECT
+
+public:
+ AddBookmarkDialog(const QString &url, const QString &title, QWidget *parent = 0, BookmarksManager *bookmarkManager = 0);
+
+private slots:
+ void accept();
+
+private:
+ QString m_url;
+ BookmarksManager *m_bookmarksManager;
+ AddBookmarkProxyModel *m_proxyModel;
+};
+
+#include "ui_bookmarks.h"
+class TreeProxyModel;
+class BookmarksDialog : public QDialog, public Ui_BookmarksDialog
+{
+ Q_OBJECT
+
+signals:
+ void openUrl(const QUrl &url);
+
+public:
+ BookmarksDialog(QWidget *parent = 0, BookmarksManager *manager = 0);
+ ~BookmarksDialog();
+
+private slots:
+ void customContextMenuRequested(const QPoint &pos);
+ void open();
+ void newFolder();
+
+private:
+ void expandNodes(BookmarkNode *node);
+ bool saveExpandedNodes(const QModelIndex &parent);
+
+ BookmarksManager *m_bookmarksManager;
+ BookmarksModel *m_bookmarksModel;
+ TreeProxyModel *m_proxyModel;
+};
+
+#include <QtGui/QToolBar>
+class BookmarksToolBar : public QToolBar
+{
+ Q_OBJECT
+
+signals:
+ void openUrl(const QUrl &url);
+
+public:
+ BookmarksToolBar(BookmarksModel *model, QWidget *parent = 0);
+ void setRootIndex(const QModelIndex &index);
+ QModelIndex rootIndex() const;
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private slots:
+ void triggered(QAction *action);
+ void activated(const QModelIndex &index);
+ void build();
+
+private:
+ BookmarksModel *m_bookmarksModel;
+ QPersistentModelIndex m_root;
+};
+
+#endif // BOOKMARKS_H
diff --git a/demos/browser/bookmarks.ui b/demos/browser/bookmarks.ui
new file mode 100644
index 0000000..c893e94
--- /dev/null
+++ b/demos/browser/bookmarks.ui
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>BookmarksDialog</class>
+ <widget class="QDialog" name="BookmarksDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>758</width>
+ <height>450</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Bookmarks</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <widget class="SearchLineEdit" name="search" />
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="EditTreeView" name="tree" />
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="removeButton" >
+ <property name="text" >
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addFolderButton" >
+ <property name="text" >
+ <string>Add Folder</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SearchLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>searchlineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>EditTreeView</class>
+ <extends>QTreeView</extends>
+ <header>edittreeview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>BookmarksDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>472</x>
+ <y>329</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>461</x>
+ <y>356</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/browser.icns b/demos/browser/browser.icns
new file mode 100644
index 0000000..f591ae4
--- /dev/null
+++ b/demos/browser/browser.icns
Binary files differ
diff --git a/demos/browser/browser.ico b/demos/browser/browser.ico
new file mode 100644
index 0000000..7f9be93
--- /dev/null
+++ b/demos/browser/browser.ico
Binary files differ
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
new file mode 100644
index 0000000..d970f99
--- /dev/null
+++ b/demos/browser/browser.pro
@@ -0,0 +1,91 @@
+TEMPLATE = app
+TARGET = browser
+QT += webkit network
+
+CONFIG += qt warn_on
+contains(QT_BUILD_PARTS, tools): CONFIG += uitools
+else: DEFINES += QT_NO_UITOOLS
+
+FORMS += \
+ addbookmarkdialog.ui \
+ bookmarks.ui \
+ cookies.ui \
+ cookiesexceptions.ui \
+ downloaditem.ui \
+ downloads.ui \
+ history.ui \
+ passworddialog.ui \
+ proxy.ui \
+ settings.ui
+
+HEADERS += \
+ autosaver.h \
+ bookmarks.h \
+ browserapplication.h \
+ browsermainwindow.h \
+ chasewidget.h \
+ cookiejar.h \
+ downloadmanager.h \
+ edittableview.h \
+ edittreeview.h \
+ history.h \
+ modelmenu.h \
+ networkaccessmanager.h \
+ searchlineedit.h \
+ settings.h \
+ squeezelabel.h \
+ tabwidget.h \
+ toolbarsearch.h \
+ urllineedit.h \
+ webview.h \
+ xbel.h
+
+SOURCES += \
+ autosaver.cpp \
+ bookmarks.cpp \
+ browserapplication.cpp \
+ browsermainwindow.cpp \
+ chasewidget.cpp \
+ cookiejar.cpp \
+ downloadmanager.cpp \
+ edittableview.cpp \
+ edittreeview.cpp \
+ history.cpp \
+ modelmenu.cpp \
+ networkaccessmanager.cpp \
+ searchlineedit.cpp \
+ settings.cpp \
+ squeezelabel.cpp \
+ tabwidget.cpp \
+ toolbarsearch.cpp \
+ urllineedit.cpp \
+ webview.cpp \
+ xbel.cpp \
+ main.cpp
+
+RESOURCES += data/data.qrc htmls/htmls.qrc
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+win32 {
+ RC_FILE = browser.rc
+}
+
+mac {
+ ICON = browser.icns
+ QMAKE_INFO_PLIST = Info_mac.plist
+ TARGET = Browser
+}
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qjpeg qgif
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/browser
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.plist *.icns *.ico *.rc *.pro *.html *.doc images htmls
+sources.path = $$[QT_INSTALL_DEMOS]/browser
+INSTALLS += target sources
diff --git a/demos/browser/browser.rc b/demos/browser/browser.rc
new file mode 100644
index 0000000..89a237c
--- /dev/null
+++ b/demos/browser/browser.rc
@@ -0,0 +1,2 @@
+IDI_ICON1 ICON DISCARDABLE "browser.ico"
+
diff --git a/demos/browser/browserapplication.cpp b/demos/browser/browserapplication.cpp
new file mode 100644
index 0000000..5433022
--- /dev/null
+++ b/demos/browser/browserapplication.cpp
@@ -0,0 +1,456 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browserapplication.h"
+
+#include "bookmarks.h"
+#include "browsermainwindow.h"
+#include "cookiejar.h"
+#include "downloadmanager.h"
+#include "history.h"
+#include "networkaccessmanager.h"
+#include "tabwidget.h"
+#include "webview.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QDir>
+#include <QtCore/QLibraryInfo>
+#include <QtCore/QSettings>
+#include <QtCore/QTextStream>
+#include <QtCore/QTranslator>
+
+#include <QtGui/QDesktopServices>
+#include <QtGui/QFileOpenEvent>
+#include <QtGui/QMessageBox>
+
+#include <QtNetwork/QLocalServer>
+#include <QtNetwork/QLocalSocket>
+#include <QtNetwork/QNetworkProxy>
+#include <QtNetwork/QSslSocket>
+
+#include <QtWebKit/QWebSettings>
+
+#include <QtCore/QDebug>
+
+DownloadManager *BrowserApplication::s_downloadManager = 0;
+HistoryManager *BrowserApplication::s_historyManager = 0;
+NetworkAccessManager *BrowserApplication::s_networkAccessManager = 0;
+BookmarksManager *BrowserApplication::s_bookmarksManager = 0;
+
+BrowserApplication::BrowserApplication(int &argc, char **argv)
+ : QApplication(argc, argv)
+ , m_localServer(0)
+{
+ QCoreApplication::setOrganizationName(QLatin1String("Trolltech"));
+ QCoreApplication::setApplicationName(QLatin1String("demobrowser"));
+ QCoreApplication::setApplicationVersion(QLatin1String("0.1"));
+#ifdef Q_WS_QWS
+ // Use a different server name for QWS so we can run an X11
+ // browser and a QWS browser in parallel on the same machine for
+ // debugging
+ QString serverName = QCoreApplication::applicationName() + QLatin1String("_qws");
+#else
+ QString serverName = QCoreApplication::applicationName();
+#endif
+ QLocalSocket socket;
+ socket.connectToServer(serverName);
+ if (socket.waitForConnected(500)) {
+ QTextStream stream(&socket);
+ QStringList args = QCoreApplication::arguments();
+ if (args.count() > 1)
+ stream << args.last();
+ else
+ stream << QString();
+ stream.flush();
+ socket.waitForBytesWritten();
+ return;
+ }
+
+#if defined(Q_WS_MAC)
+ QApplication::setQuitOnLastWindowClosed(false);
+#else
+ QApplication::setQuitOnLastWindowClosed(true);
+#endif
+
+ m_localServer = new QLocalServer(this);
+ connect(m_localServer, SIGNAL(newConnection()),
+ this, SLOT(newLocalSocketConnection()));
+ if (!m_localServer->listen(serverName)) {
+ if (m_localServer->serverError() == QAbstractSocket::AddressInUseError
+ && QFile::exists(m_localServer->serverName())) {
+ QFile::remove(m_localServer->serverName());
+ m_localServer->listen(serverName);
+ }
+ }
+
+#ifndef QT_NO_OPENSSL
+ if (!QSslSocket::supportsSsl()) {
+ QMessageBox::information(0, "Demo Browser",
+ "This system does not support OpenSSL. SSL websites will not be available.");
+ }
+#endif
+
+ QDesktopServices::setUrlHandler(QLatin1String("http"), this, "openUrl");
+ QString localSysName = QLocale::system().name();
+
+ installTranslator(QLatin1String("qt_") + localSysName);
+
+ QSettings settings;
+ settings.beginGroup(QLatin1String("sessions"));
+ m_lastSession = settings.value(QLatin1String("lastSession")).toByteArray();
+ settings.endGroup();
+
+#if defined(Q_WS_MAC)
+ connect(this, SIGNAL(lastWindowClosed()),
+ this, SLOT(lastWindowClosed()));
+#endif
+
+ QTimer::singleShot(0, this, SLOT(postLaunch()));
+}
+
+BrowserApplication::~BrowserApplication()
+{
+ delete s_downloadManager;
+ for (int i = 0; i < m_mainWindows.size(); ++i) {
+ BrowserMainWindow *window = m_mainWindows.at(i);
+ delete window;
+ }
+ delete s_networkAccessManager;
+ delete s_bookmarksManager;
+}
+
+#if defined(Q_WS_MAC)
+void BrowserApplication::lastWindowClosed()
+{
+ clean();
+ BrowserMainWindow *mw = new BrowserMainWindow;
+ mw->slotHome();
+ m_mainWindows.prepend(mw);
+}
+#endif
+
+BrowserApplication *BrowserApplication::instance()
+{
+ return (static_cast<BrowserApplication *>(QCoreApplication::instance()));
+}
+
+#if defined(Q_WS_MAC)
+#include <QtGui/QMessageBox>
+void BrowserApplication::quitBrowser()
+{
+ clean();
+ int tabCount = 0;
+ for (int i = 0; i < m_mainWindows.count(); ++i) {
+ tabCount =+ m_mainWindows.at(i)->tabWidget()->count();
+ }
+
+ if (tabCount > 1) {
+ int ret = QMessageBox::warning(mainWindow(), QString(),
+ tr("There are %1 windows and %2 tabs open\n"
+ "Do you want to quit anyway?").arg(m_mainWindows.count()).arg(tabCount),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No);
+ if (ret == QMessageBox::No)
+ return;
+ }
+
+ exit(0);
+}
+#endif
+
+/*!
+ Any actions that can be delayed until the window is visible
+ */
+void BrowserApplication::postLaunch()
+{
+ QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ if (directory.isEmpty())
+ directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
+ QWebSettings::setIconDatabasePath(directory);
+
+ setWindowIcon(QIcon(QLatin1String(":browser.svg")));
+
+ loadSettings();
+
+ // newMainWindow() needs to be called in main() for this to happen
+ if (m_mainWindows.count() > 0) {
+ QStringList args = QCoreApplication::arguments();
+ if (args.count() > 1)
+ mainWindow()->loadPage(args.last());
+ else
+ mainWindow()->slotHome();
+ }
+ BrowserApplication::historyManager();
+}
+
+void BrowserApplication::loadSettings()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("websettings"));
+
+ QWebSettings *defaultSettings = QWebSettings::globalSettings();
+ QString standardFontFamily = defaultSettings->fontFamily(QWebSettings::StandardFont);
+ int standardFontSize = defaultSettings->fontSize(QWebSettings::DefaultFontSize);
+ QFont standardFont = QFont(standardFontFamily, standardFontSize);
+ standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
+ defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
+ defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
+
+ QString fixedFontFamily = defaultSettings->fontFamily(QWebSettings::FixedFont);
+ int fixedFontSize = defaultSettings->fontSize(QWebSettings::DefaultFixedFontSize);
+ QFont fixedFont = QFont(fixedFontFamily, fixedFontSize);
+ fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
+ defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
+ defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());
+
+ defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, settings.value(QLatin1String("enableJavascript"), true).toBool());
+ defaultSettings->setAttribute(QWebSettings::PluginsEnabled, settings.value(QLatin1String("enablePlugins"), true).toBool());
+
+ QUrl url = settings.value(QLatin1String("userStyleSheet")).toUrl();
+ defaultSettings->setUserStyleSheetUrl(url);
+
+ settings.endGroup();
+}
+
+QList<BrowserMainWindow*> BrowserApplication::mainWindows()
+{
+ clean();
+ QList<BrowserMainWindow*> list;
+ for (int i = 0; i < m_mainWindows.count(); ++i)
+ list.append(m_mainWindows.at(i));
+ return list;
+}
+
+void BrowserApplication::clean()
+{
+ // cleanup any deleted main windows first
+ for (int i = m_mainWindows.count() - 1; i >= 0; --i)
+ if (m_mainWindows.at(i).isNull())
+ m_mainWindows.removeAt(i);
+}
+
+void BrowserApplication::saveSession()
+{
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
+ return;
+
+ clean();
+
+ QSettings settings;
+ settings.beginGroup(QLatin1String("sessions"));
+
+ QByteArray data;
+ QBuffer buffer(&data);
+ QDataStream stream(&buffer);
+ buffer.open(QIODevice::ReadWrite);
+
+ stream << m_mainWindows.count();
+ for (int i = 0; i < m_mainWindows.count(); ++i)
+ stream << m_mainWindows.at(i)->saveState();
+ settings.setValue(QLatin1String("lastSession"), data);
+ settings.endGroup();
+}
+
+bool BrowserApplication::canRestoreSession() const
+{
+ return !m_lastSession.isEmpty();
+}
+
+void BrowserApplication::restoreLastSession()
+{
+ QList<QByteArray> windows;
+ QBuffer buffer(&m_lastSession);
+ QDataStream stream(&buffer);
+ buffer.open(QIODevice::ReadOnly);
+ int windowCount;
+ stream >> windowCount;
+ for (int i = 0; i < windowCount; ++i) {
+ QByteArray windowState;
+ stream >> windowState;
+ windows.append(windowState);
+ }
+ for (int i = 0; i < windows.count(); ++i) {
+ BrowserMainWindow *newWindow = 0;
+ if (m_mainWindows.count() == 1
+ && mainWindow()->tabWidget()->count() == 1
+ && mainWindow()->currentTab()->url() == QUrl()) {
+ newWindow = mainWindow();
+ } else {
+ newWindow = newMainWindow();
+ }
+ newWindow->restoreState(windows.at(i));
+ }
+}
+
+bool BrowserApplication::isTheOnlyBrowser() const
+{
+ return (m_localServer != 0);
+}
+
+void BrowserApplication::installTranslator(const QString &name)
+{
+ QTranslator *translator = new QTranslator(this);
+ translator->load(name, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ QApplication::installTranslator(translator);
+}
+
+#if defined(Q_WS_MAC)
+bool BrowserApplication::event(QEvent* event)
+{
+ switch (event->type()) {
+ case QEvent::ApplicationActivate: {
+ clean();
+ if (!m_mainWindows.isEmpty()) {
+ BrowserMainWindow *mw = mainWindow();
+ if (mw && !mw->isMinimized()) {
+ mainWindow()->show();
+ }
+ return true;
+ }
+ }
+ case QEvent::FileOpen:
+ if (!m_mainWindows.isEmpty()) {
+ mainWindow()->loadPage(static_cast<QFileOpenEvent *>(event)->file());
+ return true;
+ }
+ default:
+ break;
+ }
+ return QApplication::event(event);
+}
+#endif
+
+void BrowserApplication::openUrl(const QUrl &url)
+{
+ mainWindow()->loadPage(url.toString());
+}
+
+BrowserMainWindow *BrowserApplication::newMainWindow()
+{
+ BrowserMainWindow *browser = new BrowserMainWindow();
+ m_mainWindows.prepend(browser);
+ browser->show();
+ return browser;
+}
+
+BrowserMainWindow *BrowserApplication::mainWindow()
+{
+ clean();
+ if (m_mainWindows.isEmpty())
+ newMainWindow();
+ return m_mainWindows[0];
+}
+
+void BrowserApplication::newLocalSocketConnection()
+{
+ QLocalSocket *socket = m_localServer->nextPendingConnection();
+ if (!socket)
+ return;
+ socket->waitForReadyRead(1000);
+ QTextStream stream(socket);
+ QString url;
+ stream >> url;
+ if (!url.isEmpty()) {
+ QSettings settings;
+ settings.beginGroup(QLatin1String("general"));
+ int openLinksIn = settings.value(QLatin1String("openLinksIn"), 0).toInt();
+ settings.endGroup();
+ if (openLinksIn == 1)
+ newMainWindow();
+ else
+ mainWindow()->tabWidget()->newTab();
+ openUrl(url);
+ }
+ delete socket;
+ mainWindow()->raise();
+ mainWindow()->activateWindow();
+}
+
+CookieJar *BrowserApplication::cookieJar()
+{
+ return (CookieJar*)networkAccessManager()->cookieJar();
+}
+
+DownloadManager *BrowserApplication::downloadManager()
+{
+ if (!s_downloadManager) {
+ s_downloadManager = new DownloadManager();
+ }
+ return s_downloadManager;
+}
+
+NetworkAccessManager *BrowserApplication::networkAccessManager()
+{
+ if (!s_networkAccessManager) {
+ s_networkAccessManager = new NetworkAccessManager();
+ s_networkAccessManager->setCookieJar(new CookieJar);
+ }
+ return s_networkAccessManager;
+}
+
+HistoryManager *BrowserApplication::historyManager()
+{
+ if (!s_historyManager) {
+ s_historyManager = new HistoryManager();
+ QWebHistoryInterface::setDefaultInterface(s_historyManager);
+ }
+ return s_historyManager;
+}
+
+BookmarksManager *BrowserApplication::bookmarksManager()
+{
+ if (!s_bookmarksManager) {
+ s_bookmarksManager = new BookmarksManager;
+ }
+ return s_bookmarksManager;
+}
+
+QIcon BrowserApplication::icon(const QUrl &url) const
+{
+ QIcon icon = QWebSettings::iconForUrl(url);
+ if (!icon.isNull())
+ return icon.pixmap(16, 16);
+ if (m_defaultIcon.isNull())
+ m_defaultIcon = QIcon(QLatin1String(":defaulticon.png"));
+ return m_defaultIcon.pixmap(16, 16);
+}
+
diff --git a/demos/browser/browserapplication.h b/demos/browser/browserapplication.h
new file mode 100644
index 0000000..6887dfd
--- /dev/null
+++ b/demos/browser/browserapplication.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BROWSERAPPLICATION_H
+#define BROWSERAPPLICATION_H
+
+#include <QtGui/QApplication>
+
+#include <QtCore/QUrl>
+#include <QtCore/QPointer>
+
+#include <QtGui/QIcon>
+
+QT_BEGIN_NAMESPACE
+class QLocalServer;
+QT_END_NAMESPACE
+
+class BookmarksManager;
+class BrowserMainWindow;
+class CookieJar;
+class DownloadManager;
+class HistoryManager;
+class NetworkAccessManager;
+class BrowserApplication : public QApplication
+{
+ Q_OBJECT
+
+public:
+ BrowserApplication(int &argc, char **argv);
+ ~BrowserApplication();
+ static BrowserApplication *instance();
+ void loadSettings();
+
+ bool isTheOnlyBrowser() const;
+ BrowserMainWindow *mainWindow();
+ QList<BrowserMainWindow*> mainWindows();
+ QIcon icon(const QUrl &url) const;
+
+ void saveSession();
+ bool canRestoreSession() const;
+
+ static HistoryManager *historyManager();
+ static CookieJar *cookieJar();
+ static DownloadManager *downloadManager();
+ static NetworkAccessManager *networkAccessManager();
+ static BookmarksManager *bookmarksManager();
+
+#if defined(Q_WS_MAC)
+ bool event(QEvent *event);
+#endif
+
+public slots:
+ BrowserMainWindow *newMainWindow();
+ void restoreLastSession();
+#if defined(Q_WS_MAC)
+ void lastWindowClosed();
+ void quitBrowser();
+#endif
+
+private slots:
+ void postLaunch();
+ void openUrl(const QUrl &url);
+ void newLocalSocketConnection();
+
+private:
+ void clean();
+ void installTranslator(const QString &name);
+
+ static HistoryManager *s_historyManager;
+ static DownloadManager *s_downloadManager;
+ static NetworkAccessManager *s_networkAccessManager;
+ static BookmarksManager *s_bookmarksManager;
+
+ QList<QPointer<BrowserMainWindow> > m_mainWindows;
+ QLocalServer *m_localServer;
+ QByteArray m_lastSession;
+ mutable QIcon m_defaultIcon;
+};
+
+#endif // BROWSERAPPLICATION_H
+
diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp
new file mode 100644
index 0000000..f1dcaef
--- /dev/null
+++ b/demos/browser/browsermainwindow.cpp
@@ -0,0 +1,991 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browsermainwindow.h"
+
+#include "autosaver.h"
+#include "bookmarks.h"
+#include "browserapplication.h"
+#include "chasewidget.h"
+#include "downloadmanager.h"
+#include "history.h"
+#include "settings.h"
+#include "tabwidget.h"
+#include "toolbarsearch.h"
+#include "ui_passworddialog.h"
+#include "webview.h"
+
+#include <QtCore/QSettings>
+
+#include <QtGui/QDesktopWidget>
+#include <QtGui/QFileDialog>
+#include <QtGui/QPlainTextEdit>
+#include <QtGui/QPrintDialog>
+#include <QtGui/QPrintPreviewDialog>
+#include <QtGui/QPrinter>
+#include <QtGui/QMenuBar>
+#include <QtGui/QMessageBox>
+#include <QtGui/QStatusBar>
+#include <QtGui/QToolBar>
+#include <QtGui/QInputDialog>
+
+#include <QtWebKit/QWebFrame>
+#include <QtWebKit/QWebHistory>
+
+#include <QtCore/QDebug>
+
+BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
+ : QMainWindow(parent, flags)
+ , m_tabWidget(new TabWidget(this))
+ , m_autoSaver(new AutoSaver(this))
+ , m_historyBack(0)
+ , m_historyForward(0)
+ , m_stop(0)
+ , m_reload(0)
+{
+ setAttribute(Qt::WA_DeleteOnClose, true);
+ statusBar()->setSizeGripEnabled(true);
+ setupMenu();
+ setupToolBar();
+
+ QWidget *centralWidget = new QWidget(this);
+ BookmarksModel *boomarksModel = BrowserApplication::bookmarksManager()->bookmarksModel();
+ m_bookmarksToolbar = new BookmarksToolBar(boomarksModel, this);
+ connect(m_bookmarksToolbar, SIGNAL(openUrl(const QUrl&)),
+ m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
+ connect(m_bookmarksToolbar->toggleViewAction(), SIGNAL(toggled(bool)),
+ this, SLOT(updateBookmarksToolbarActionText(bool)));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setSpacing(0);
+ layout->setMargin(0);
+#if defined(Q_WS_MAC)
+ layout->addWidget(m_bookmarksToolbar);
+ layout->addWidget(new QWidget); // <- OS X tab widget style bug
+#else
+ addToolBarBreak();
+ addToolBar(m_bookmarksToolbar);
+#endif
+ layout->addWidget(m_tabWidget);
+ centralWidget->setLayout(layout);
+ setCentralWidget(centralWidget);
+
+ connect(m_tabWidget, SIGNAL(loadPage(const QString &)),
+ this, SLOT(loadPage(const QString &)));
+ connect(m_tabWidget, SIGNAL(setCurrentTitle(const QString &)),
+ this, SLOT(slotUpdateWindowTitle(const QString &)));
+ connect(m_tabWidget, SIGNAL(showStatusBarMessage(const QString&)),
+ statusBar(), SLOT(showMessage(const QString&)));
+ connect(m_tabWidget, SIGNAL(linkHovered(const QString&)),
+ statusBar(), SLOT(showMessage(const QString&)));
+ connect(m_tabWidget, SIGNAL(loadProgress(int)),
+ this, SLOT(slotLoadProgress(int)));
+ connect(m_tabWidget, SIGNAL(tabsChanged()),
+ m_autoSaver, SLOT(changeOccurred()));
+ connect(m_tabWidget, SIGNAL(geometryChangeRequested(const QRect &)),
+ this, SLOT(geometryChangeRequested(const QRect &)));
+ connect(m_tabWidget, SIGNAL(printRequested(QWebFrame *)),
+ this, SLOT(printRequested(QWebFrame *)));
+ connect(m_tabWidget, SIGNAL(menuBarVisibilityChangeRequested(bool)),
+ menuBar(), SLOT(setVisible(bool)));
+ connect(m_tabWidget, SIGNAL(statusBarVisibilityChangeRequested(bool)),
+ statusBar(), SLOT(setVisible(bool)));
+ connect(m_tabWidget, SIGNAL(toolBarVisibilityChangeRequested(bool)),
+ m_navigationBar, SLOT(setVisible(bool)));
+ connect(m_tabWidget, SIGNAL(toolBarVisibilityChangeRequested(bool)),
+ m_bookmarksToolbar, SLOT(setVisible(bool)));
+#if defined(Q_WS_MAC)
+ connect(m_tabWidget, SIGNAL(lastTabClosed()),
+ this, SLOT(close()));
+#else
+ connect(m_tabWidget, SIGNAL(lastTabClosed()),
+ m_tabWidget, SLOT(newTab()));
+#endif
+
+ slotUpdateWindowTitle();
+ loadDefaultState();
+ m_tabWidget->newTab();
+
+ int size = m_tabWidget->lineEditStack()->sizeHint().height();
+ m_navigationBar->setIconSize(QSize(size, size));
+
+}
+
+BrowserMainWindow::~BrowserMainWindow()
+{
+ m_autoSaver->changeOccurred();
+ m_autoSaver->saveIfNeccessary();
+}
+
+void BrowserMainWindow::loadDefaultState()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("BrowserMainWindow"));
+ QByteArray data = settings.value(QLatin1String("defaultState")).toByteArray();
+ restoreState(data);
+ settings.endGroup();
+}
+
+QSize BrowserMainWindow::sizeHint() const
+{
+ QRect desktopRect = QApplication::desktop()->screenGeometry();
+ QSize size = desktopRect.size() * qreal(0.9);
+ return size;
+}
+
+void BrowserMainWindow::save()
+{
+ BrowserApplication::instance()->saveSession();
+
+ QSettings settings;
+ settings.beginGroup(QLatin1String("BrowserMainWindow"));
+ QByteArray data = saveState(false);
+ settings.setValue(QLatin1String("defaultState"), data);
+ settings.endGroup();
+}
+
+static const qint32 BrowserMainWindowMagic = 0xba;
+
+QByteArray BrowserMainWindow::saveState(bool withTabs) const
+{
+ int version = 2;
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly);
+
+ stream << qint32(BrowserMainWindowMagic);
+ stream << qint32(version);
+
+ stream << size();
+ stream << !m_navigationBar->isHidden();
+ stream << !m_bookmarksToolbar->isHidden();
+ stream << !statusBar()->isHidden();
+ if (withTabs)
+ stream << tabWidget()->saveState();
+ else
+ stream << QByteArray();
+ return data;
+}
+
+bool BrowserMainWindow::restoreState(const QByteArray &state)
+{
+ int version = 2;
+ QByteArray sd = state;
+ QDataStream stream(&sd, QIODevice::ReadOnly);
+ if (stream.atEnd())
+ return false;
+
+ qint32 marker;
+ qint32 v;
+ stream >> marker;
+ stream >> v;
+ if (marker != BrowserMainWindowMagic || v != version)
+ return false;
+
+ QSize size;
+ bool showToolbar;
+ bool showBookmarksBar;
+ bool showStatusbar;
+ QByteArray tabState;
+
+ stream >> size;
+ stream >> showToolbar;
+ stream >> showBookmarksBar;
+ stream >> showStatusbar;
+ stream >> tabState;
+
+ resize(size);
+
+ m_navigationBar->setVisible(showToolbar);
+ updateToolbarActionText(showToolbar);
+
+ m_bookmarksToolbar->setVisible(showBookmarksBar);
+ updateBookmarksToolbarActionText(showBookmarksBar);
+
+ statusBar()->setVisible(showStatusbar);
+ updateStatusbarActionText(showStatusbar);
+
+ if (!tabWidget()->restoreState(tabState))
+ return false;
+
+ return true;
+}
+
+void BrowserMainWindow::setupMenu()
+{
+ new QShortcut(QKeySequence(Qt::Key_F6), this, SLOT(slotSwapFocus()));
+
+ // File
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+
+ fileMenu->addAction(tr("&New Window"), this, SLOT(slotFileNew()), QKeySequence::New);
+ fileMenu->addAction(m_tabWidget->newTabAction());
+ fileMenu->addAction(tr("&Open File..."), this, SLOT(slotFileOpen()), QKeySequence::Open);
+ fileMenu->addAction(tr("Open &Location..."), this,
+ SLOT(slotSelectLineEdit()), QKeySequence(Qt::ControlModifier + Qt::Key_L));
+ fileMenu->addSeparator();
+ fileMenu->addAction(m_tabWidget->closeTabAction());
+ fileMenu->addSeparator();
+ fileMenu->addAction(tr("&Save As..."), this,
+ SLOT(slotFileSaveAs()), QKeySequence(QKeySequence::Save));
+ fileMenu->addSeparator();
+ BookmarksManager *bookmarksManager = BrowserApplication::bookmarksManager();
+ fileMenu->addAction(tr("&Import Bookmarks..."), bookmarksManager, SLOT(importBookmarks()));
+ fileMenu->addAction(tr("&Export Bookmarks..."), bookmarksManager, SLOT(exportBookmarks()));
+ fileMenu->addSeparator();
+ fileMenu->addAction(tr("P&rint Preview..."), this, SLOT(slotFilePrintPreview()));
+ fileMenu->addAction(tr("&Print..."), this, SLOT(slotFilePrint()), QKeySequence::Print);
+ fileMenu->addSeparator();
+ QAction *action = fileMenu->addAction(tr("Private &Browsing..."), this, SLOT(slotPrivateBrowsing()));
+ action->setCheckable(true);
+ fileMenu->addSeparator();
+
+#if defined(Q_WS_MAC)
+ fileMenu->addAction(tr("&Quit"), BrowserApplication::instance(), SLOT(quitBrowser()), QKeySequence(Qt::CTRL | Qt::Key_Q));
+#else
+ fileMenu->addAction(tr("&Quit"), this, SLOT(close()), QKeySequence(Qt::CTRL | Qt::Key_Q));
+#endif
+
+ // Edit
+ QMenu *editMenu = menuBar()->addMenu(tr("&Edit"));
+ QAction *m_undo = editMenu->addAction(tr("&Undo"));
+ m_undo->setShortcuts(QKeySequence::Undo);
+ m_tabWidget->addWebAction(m_undo, QWebPage::Undo);
+ QAction *m_redo = editMenu->addAction(tr("&Redo"));
+ m_redo->setShortcuts(QKeySequence::Redo);
+ m_tabWidget->addWebAction(m_redo, QWebPage::Redo);
+ editMenu->addSeparator();
+ QAction *m_cut = editMenu->addAction(tr("Cu&t"));
+ m_cut->setShortcuts(QKeySequence::Cut);
+ m_tabWidget->addWebAction(m_cut, QWebPage::Cut);
+ QAction *m_copy = editMenu->addAction(tr("&Copy"));
+ m_copy->setShortcuts(QKeySequence::Copy);
+ m_tabWidget->addWebAction(m_copy, QWebPage::Copy);
+ QAction *m_paste = editMenu->addAction(tr("&Paste"));
+ m_paste->setShortcuts(QKeySequence::Paste);
+ m_tabWidget->addWebAction(m_paste, QWebPage::Paste);
+ editMenu->addSeparator();
+
+ QAction *m_find = editMenu->addAction(tr("&Find"));
+ m_find->setShortcuts(QKeySequence::Find);
+ connect(m_find, SIGNAL(triggered()), this, SLOT(slotEditFind()));
+ new QShortcut(QKeySequence(Qt::Key_Slash), this, SLOT(slotEditFind()));
+
+ QAction *m_findNext = editMenu->addAction(tr("&Find Next"));
+ m_findNext->setShortcuts(QKeySequence::FindNext);
+ connect(m_findNext, SIGNAL(triggered()), this, SLOT(slotEditFindNext()));
+
+ QAction *m_findPrevious = editMenu->addAction(tr("&Find Previous"));
+ m_findPrevious->setShortcuts(QKeySequence::FindPrevious);
+ connect(m_findPrevious, SIGNAL(triggered()), this, SLOT(slotEditFindPrevious()));
+
+ editMenu->addSeparator();
+ editMenu->addAction(tr("&Preferences"), this, SLOT(slotPreferences()), tr("Ctrl+,"));
+
+ // View
+ QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
+
+ m_viewBookmarkBar = new QAction(this);
+ updateBookmarksToolbarActionText(true);
+ m_viewBookmarkBar->setShortcut(tr("Shift+Ctrl+B"));
+ connect(m_viewBookmarkBar, SIGNAL(triggered()), this, SLOT(slotViewBookmarksBar()));
+ viewMenu->addAction(m_viewBookmarkBar);
+
+ m_viewToolbar = new QAction(this);
+ updateToolbarActionText(true);
+ m_viewToolbar->setShortcut(tr("Ctrl+|"));
+ connect(m_viewToolbar, SIGNAL(triggered()), this, SLOT(slotViewToolbar()));
+ viewMenu->addAction(m_viewToolbar);
+
+ m_viewStatusbar = new QAction(this);
+ updateStatusbarActionText(true);
+ m_viewStatusbar->setShortcut(tr("Ctrl+/"));
+ connect(m_viewStatusbar, SIGNAL(triggered()), this, SLOT(slotViewStatusbar()));
+ viewMenu->addAction(m_viewStatusbar);
+
+ viewMenu->addSeparator();
+
+ m_stop = viewMenu->addAction(tr("&Stop"));
+ QList<QKeySequence> shortcuts;
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Period));
+ shortcuts.append(Qt::Key_Escape);
+ m_stop->setShortcuts(shortcuts);
+ m_tabWidget->addWebAction(m_stop, QWebPage::Stop);
+
+ m_reload = viewMenu->addAction(tr("Reload Page"));
+ m_reload->setShortcuts(QKeySequence::Refresh);
+ m_tabWidget->addWebAction(m_reload, QWebPage::Reload);
+
+ viewMenu->addAction(tr("Zoom &In"), this, SLOT(slotViewZoomIn()), QKeySequence(Qt::CTRL | Qt::Key_Plus));
+ viewMenu->addAction(tr("Zoom &Out"), this, SLOT(slotViewZoomOut()), QKeySequence(Qt::CTRL | Qt::Key_Minus));
+ viewMenu->addAction(tr("Reset &Zoom"), this, SLOT(slotViewResetZoom()), QKeySequence(Qt::CTRL | Qt::Key_0));
+ QAction *zoomTextOnlyAction = viewMenu->addAction(tr("Zoom &Text Only"));
+ connect(zoomTextOnlyAction, SIGNAL(toggled(bool)), this, SLOT(slotViewZoomTextOnly(bool)));
+ zoomTextOnlyAction->setCheckable(true);
+ zoomTextOnlyAction->setChecked(false);
+
+ viewMenu->addSeparator();
+ viewMenu->addAction(tr("Page S&ource"), this, SLOT(slotViewPageSource()), tr("Ctrl+Alt+U"));
+ QAction *a = viewMenu->addAction(tr("&Full Screen"), this, SLOT(slotViewFullScreen(bool)), Qt::Key_F11);
+ a->setCheckable(true);
+
+ // History
+ HistoryMenu *historyMenu = new HistoryMenu(this);
+ connect(historyMenu, SIGNAL(openUrl(const QUrl&)),
+ m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
+ connect(historyMenu, SIGNAL(hovered(const QString&)), this,
+ SLOT(slotUpdateStatusbar(const QString&)));
+ historyMenu->setTitle(tr("Hi&story"));
+ menuBar()->addMenu(historyMenu);
+ QList<QAction*> historyActions;
+
+ m_historyBack = new QAction(tr("Back"), this);
+ m_tabWidget->addWebAction(m_historyBack, QWebPage::Back);
+ m_historyBack->setShortcuts(QKeySequence::Back);
+ m_historyBack->setIconVisibleInMenu(false);
+
+ m_historyForward = new QAction(tr("Forward"), this);
+ m_tabWidget->addWebAction(m_historyForward, QWebPage::Forward);
+ m_historyForward->setShortcuts(QKeySequence::Forward);
+ m_historyForward->setIconVisibleInMenu(false);
+
+ QAction *m_historyHome = new QAction(tr("Home"), this);
+ connect(m_historyHome, SIGNAL(triggered()), this, SLOT(slotHome()));
+ m_historyHome->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_H));
+
+ m_restoreLastSession = new QAction(tr("Restore Last Session"), this);
+ connect(m_restoreLastSession, SIGNAL(triggered()), BrowserApplication::instance(), SLOT(restoreLastSession()));
+ m_restoreLastSession->setEnabled(BrowserApplication::instance()->canRestoreSession());
+
+ historyActions.append(m_historyBack);
+ historyActions.append(m_historyForward);
+ historyActions.append(m_historyHome);
+ historyActions.append(m_tabWidget->recentlyClosedTabsAction());
+ historyActions.append(m_restoreLastSession);
+ historyMenu->setInitialActions(historyActions);
+
+ // Bookmarks
+ BookmarksMenu *bookmarksMenu = new BookmarksMenu(this);
+ connect(bookmarksMenu, SIGNAL(openUrl(const QUrl&)),
+ m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
+ connect(bookmarksMenu, SIGNAL(hovered(const QString&)),
+ this, SLOT(slotUpdateStatusbar(const QString&)));
+ bookmarksMenu->setTitle(tr("&Bookmarks"));
+ menuBar()->addMenu(bookmarksMenu);
+
+ QList<QAction*> bookmarksActions;
+
+ QAction *showAllBookmarksAction = new QAction(tr("Show All Bookmarks"), this);
+ connect(showAllBookmarksAction, SIGNAL(triggered()), this, SLOT(slotShowBookmarksDialog()));
+ m_addBookmark = new QAction(QIcon(QLatin1String(":addbookmark.png")), tr("Add Bookmark..."), this);
+ m_addBookmark->setIconVisibleInMenu(false);
+
+ connect(m_addBookmark, SIGNAL(triggered()), this, SLOT(slotAddBookmark()));
+ m_addBookmark->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_D));
+
+ bookmarksActions.append(showAllBookmarksAction);
+ bookmarksActions.append(m_addBookmark);
+ bookmarksMenu->setInitialActions(bookmarksActions);
+
+ // Window
+ m_windowMenu = menuBar()->addMenu(tr("&Window"));
+ connect(m_windowMenu, SIGNAL(aboutToShow()),
+ this, SLOT(slotAboutToShowWindowMenu()));
+ slotAboutToShowWindowMenu();
+
+ QMenu *toolsMenu = menuBar()->addMenu(tr("&Tools"));
+ toolsMenu->addAction(tr("Web &Search"), this, SLOT(slotWebSearch()), QKeySequence(tr("Ctrl+K", "Web Search")));
+#ifndef Q_CC_MINGW
+ a = toolsMenu->addAction(tr("Enable Web &Inspector"), this, SLOT(slotToggleInspector(bool)));
+ a->setCheckable(true);
+#endif
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+ helpMenu->addAction(tr("About &Demo Browser"), this, SLOT(slotAboutApplication()));
+}
+
+void BrowserMainWindow::setupToolBar()
+{
+ setUnifiedTitleAndToolBarOnMac(true);
+ m_navigationBar = addToolBar(tr("Navigation"));
+ connect(m_navigationBar->toggleViewAction(), SIGNAL(toggled(bool)),
+ this, SLOT(updateToolbarActionText(bool)));
+
+ m_historyBack->setIcon(style()->standardIcon(QStyle::SP_ArrowBack, 0, this));
+ m_historyBackMenu = new QMenu(this);
+ m_historyBack->setMenu(m_historyBackMenu);
+ connect(m_historyBackMenu, SIGNAL(aboutToShow()),
+ this, SLOT(slotAboutToShowBackMenu()));
+ connect(m_historyBackMenu, SIGNAL(triggered(QAction *)),
+ this, SLOT(slotOpenActionUrl(QAction *)));
+ m_navigationBar->addAction(m_historyBack);
+
+ m_historyForward->setIcon(style()->standardIcon(QStyle::SP_ArrowForward, 0, this));
+ m_historyForwardMenu = new QMenu(this);
+ connect(m_historyForwardMenu, SIGNAL(aboutToShow()),
+ this, SLOT(slotAboutToShowForwardMenu()));
+ connect(m_historyForwardMenu, SIGNAL(triggered(QAction *)),
+ this, SLOT(slotOpenActionUrl(QAction *)));
+ m_historyForward->setMenu(m_historyForwardMenu);
+ m_navigationBar->addAction(m_historyForward);
+
+ m_stopReload = new QAction(this);
+ m_reloadIcon = style()->standardIcon(QStyle::SP_BrowserReload);
+ m_stopReload->setIcon(m_reloadIcon);
+
+ m_navigationBar->addAction(m_stopReload);
+
+ m_navigationBar->addWidget(m_tabWidget->lineEditStack());
+
+ m_toolbarSearch = new ToolbarSearch(m_navigationBar);
+ m_navigationBar->addWidget(m_toolbarSearch);
+ connect(m_toolbarSearch, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&)));
+
+ m_chaseWidget = new ChaseWidget(this);
+ m_navigationBar->addWidget(m_chaseWidget);
+}
+
+void BrowserMainWindow::slotShowBookmarksDialog()
+{
+ BookmarksDialog *dialog = new BookmarksDialog(this);
+ connect(dialog, SIGNAL(openUrl(const QUrl&)),
+ m_tabWidget, SLOT(loadUrlInCurrentTab(const QUrl&)));
+ dialog->show();
+}
+
+void BrowserMainWindow::slotAddBookmark()
+{
+ WebView *webView = currentTab();
+ QString url = webView->url().toString();
+ QString title = webView->title();
+ AddBookmarkDialog dialog(url, title);
+ dialog.exec();
+}
+
+void BrowserMainWindow::slotViewToolbar()
+{
+ if (m_navigationBar->isVisible()) {
+ updateToolbarActionText(false);
+ m_navigationBar->close();
+ } else {
+ updateToolbarActionText(true);
+ m_navigationBar->show();
+ }
+ m_autoSaver->changeOccurred();
+}
+
+void BrowserMainWindow::slotViewBookmarksBar()
+{
+ if (m_bookmarksToolbar->isVisible()) {
+ updateBookmarksToolbarActionText(false);
+ m_bookmarksToolbar->close();
+ } else {
+ updateBookmarksToolbarActionText(true);
+ m_bookmarksToolbar->show();
+ }
+ m_autoSaver->changeOccurred();
+}
+
+void BrowserMainWindow::updateStatusbarActionText(bool visible)
+{
+ m_viewStatusbar->setText(!visible ? tr("Show Status Bar") : tr("Hide Status Bar"));
+}
+
+void BrowserMainWindow::updateToolbarActionText(bool visible)
+{
+ m_viewToolbar->setText(!visible ? tr("Show Toolbar") : tr("Hide Toolbar"));
+}
+
+void BrowserMainWindow::updateBookmarksToolbarActionText(bool visible)
+{
+ m_viewBookmarkBar->setText(!visible ? tr("Show Bookmarks bar") : tr("Hide Bookmarks bar"));
+}
+
+void BrowserMainWindow::slotViewStatusbar()
+{
+ if (statusBar()->isVisible()) {
+ updateStatusbarActionText(false);
+ statusBar()->close();
+ } else {
+ updateStatusbarActionText(true);
+ statusBar()->show();
+ }
+ m_autoSaver->changeOccurred();
+}
+
+QUrl BrowserMainWindow::guessUrlFromString(const QString &string)
+{
+ QString urlStr = string.trimmed();
+ QRegExp test(QLatin1String("^[a-zA-Z]+\\:.*"));
+
+ // Check if it looks like a qualified URL. Try parsing it and see.
+ bool hasSchema = test.exactMatch(urlStr);
+ if (hasSchema) {
+ QUrl url = QUrl::fromEncoded(urlStr.toUtf8(), QUrl::TolerantMode);
+ if (url.isValid())
+ return url;
+ }
+
+ // Might be a file.
+ if (QFile::exists(urlStr)) {
+ QFileInfo info(urlStr);
+ return QUrl::fromLocalFile(info.absoluteFilePath());
+ }
+
+ // Might be a shorturl - try to detect the schema.
+ if (!hasSchema) {
+ int dotIndex = urlStr.indexOf(QLatin1Char('.'));
+ if (dotIndex != -1) {
+ QString prefix = urlStr.left(dotIndex).toLower();
+ QByteArray schema = (prefix == QLatin1String("ftp")) ? prefix.toLatin1() : "http";
+ QUrl url =
+ QUrl::fromEncoded(schema + "://" + urlStr.toUtf8(), QUrl::TolerantMode);
+ if (url.isValid())
+ return url;
+ }
+ }
+
+ // Fall back to QUrl's own tolerant parser.
+ QUrl url = QUrl::fromEncoded(string.toUtf8(), QUrl::TolerantMode);
+
+ // finally for cases where the user just types in a hostname add http
+ if (url.scheme().isEmpty())
+ url = QUrl::fromEncoded("http://" + string.toUtf8(), QUrl::TolerantMode);
+ return url;
+}
+
+void BrowserMainWindow::loadUrl(const QUrl &url)
+{
+ if (!currentTab() || !url.isValid())
+ return;
+
+ m_tabWidget->currentLineEdit()->setText(QString::fromUtf8(url.toEncoded()));
+ m_tabWidget->loadUrlInCurrentTab(url);
+}
+
+void BrowserMainWindow::slotDownloadManager()
+{
+ BrowserApplication::downloadManager()->show();
+}
+
+void BrowserMainWindow::slotSelectLineEdit()
+{
+ m_tabWidget->currentLineEdit()->selectAll();
+ m_tabWidget->currentLineEdit()->setFocus();
+}
+
+void BrowserMainWindow::slotFileSaveAs()
+{
+ BrowserApplication::downloadManager()->download(currentTab()->url(), true);
+}
+
+void BrowserMainWindow::slotPreferences()
+{
+ SettingsDialog *s = new SettingsDialog(this);
+ s->show();
+}
+
+void BrowserMainWindow::slotUpdateStatusbar(const QString &string)
+{
+ statusBar()->showMessage(string, 2000);
+}
+
+void BrowserMainWindow::slotUpdateWindowTitle(const QString &title)
+{
+ if (title.isEmpty()) {
+ setWindowTitle(tr("Qt Demo Browser"));
+ } else {
+#if defined(Q_WS_MAC)
+ setWindowTitle(title);
+#else
+ setWindowTitle(tr("%1 - Qt Demo Browser", "Page title and Browser name").arg(title));
+#endif
+ }
+}
+
+void BrowserMainWindow::slotAboutApplication()
+{
+ QMessageBox::about(this, tr("About"), tr(
+ "Version %1"
+ "<p>This demo demonstrates Qt's "
+ "webkit facilities in action, providing an example "
+ "browser for you to experiment with.<p>"
+ "<p>QtWebKit is based on the Open Source WebKit Project developed at <a href=\"http://webkit.org/\">http://webkit.org/</a>."
+ ).arg(QCoreApplication::applicationVersion()));
+}
+
+void BrowserMainWindow::slotFileNew()
+{
+ BrowserApplication::instance()->newMainWindow();
+ BrowserMainWindow *mw = BrowserApplication::instance()->mainWindow();
+ mw->slotHome();
+}
+
+void BrowserMainWindow::slotFileOpen()
+{
+ QString file = QFileDialog::getOpenFileName(this, tr("Open Web Resource"), QString(),
+ tr("Web Resources (*.html *.htm *.svg *.png *.gif *.svgz);;All files (*.*)"));
+
+ if (file.isEmpty())
+ return;
+
+ loadPage(file);
+}
+
+void BrowserMainWindow::slotFilePrintPreview()
+{
+#ifndef QT_NO_PRINTER
+ if (!currentTab())
+ return;
+ QPrintPreviewDialog *dialog = new QPrintPreviewDialog(this);
+ connect(dialog, SIGNAL(paintRequested(QPrinter *)),
+ currentTab(), SLOT(print(QPrinter *)));
+ dialog->exec();
+#endif
+}
+
+void BrowserMainWindow::slotFilePrint()
+{
+ if (!currentTab())
+ return;
+ printRequested(currentTab()->page()->mainFrame());
+}
+
+void BrowserMainWindow::printRequested(QWebFrame *frame)
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer;
+ QPrintDialog *dialog = new QPrintDialog(&printer, this);
+ dialog->setWindowTitle(tr("Print Document"));
+ if (dialog->exec() != QDialog::Accepted)
+ return;
+ frame->print(&printer);
+#endif
+}
+
+void BrowserMainWindow::slotPrivateBrowsing()
+{
+ QWebSettings *settings = QWebSettings::globalSettings();
+ bool pb = settings->testAttribute(QWebSettings::PrivateBrowsingEnabled);
+ if (!pb) {
+ QString title = tr("Are you sure you want to turn on private browsing?");
+ QString text = tr("<b>%1</b><br><br>When private browsing in turned on,"
+ " webpages are not added to the history,"
+ " items are automatically removed from the Downloads window," \
+ " new cookies are not stored, current cookies can't be accessed," \
+ " site icons wont be stored, session wont be saved, " \
+ " and searches are not addded to the pop-up menu in the Google search box." \
+ " Until you close the window, you can still click the Back and Forward buttons" \
+ " to return to the webpages you have opened.").arg(title);
+
+ QMessageBox::StandardButton button = QMessageBox::question(this, QString(), text,
+ QMessageBox::Ok | QMessageBox::Cancel,
+ QMessageBox::Ok);
+ if (button == QMessageBox::Ok) {
+ settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
+ }
+ } else {
+ settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, false);
+
+ QList<BrowserMainWindow*> windows = BrowserApplication::instance()->mainWindows();
+ for (int i = 0; i < windows.count(); ++i) {
+ BrowserMainWindow *window = windows.at(i);
+ window->m_lastSearch = QString::null;
+ window->tabWidget()->clear();
+ }
+ }
+}
+
+void BrowserMainWindow::closeEvent(QCloseEvent *event)
+{
+ if (m_tabWidget->count() > 1) {
+ int ret = QMessageBox::warning(this, QString(),
+ tr("Are you sure you want to close the window?"
+ " There are %1 tab open").arg(m_tabWidget->count()),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No);
+ if (ret == QMessageBox::No) {
+ event->ignore();
+ return;
+ }
+ }
+ event->accept();
+ deleteLater();
+}
+
+void BrowserMainWindow::slotEditFind()
+{
+ if (!currentTab())
+ return;
+ bool ok;
+ QString search = QInputDialog::getText(this, tr("Find"),
+ tr("Text:"), QLineEdit::Normal,
+ m_lastSearch, &ok);
+ if (ok && !search.isEmpty()) {
+ m_lastSearch = search;
+ if (!currentTab()->findText(m_lastSearch))
+ slotUpdateStatusbar(tr("\"%1\" not found.").arg(m_lastSearch));
+ }
+}
+
+void BrowserMainWindow::slotEditFindNext()
+{
+ if (!currentTab() && !m_lastSearch.isEmpty())
+ return;
+ currentTab()->findText(m_lastSearch);
+}
+
+void BrowserMainWindow::slotEditFindPrevious()
+{
+ if (!currentTab() && !m_lastSearch.isEmpty())
+ return;
+ currentTab()->findText(m_lastSearch, QWebPage::FindBackward);
+}
+
+void BrowserMainWindow::slotViewZoomIn()
+{
+ if (!currentTab())
+ return;
+ currentTab()->setZoomFactor(currentTab()->zoomFactor() + 0.1);
+}
+
+void BrowserMainWindow::slotViewZoomOut()
+{
+ if (!currentTab())
+ return;
+ currentTab()->setZoomFactor(currentTab()->zoomFactor() - 0.1);
+}
+
+void BrowserMainWindow::slotViewResetZoom()
+{
+ if (!currentTab())
+ return;
+ currentTab()->setZoomFactor(1.0);
+}
+
+void BrowserMainWindow::slotViewZoomTextOnly(bool enable)
+{
+ if (!currentTab())
+ return;
+ currentTab()->page()->settings()->setAttribute(QWebSettings::ZoomTextOnly, enable);
+}
+
+void BrowserMainWindow::slotViewFullScreen(bool makeFullScreen)
+{
+ if (makeFullScreen) {
+ showFullScreen();
+ } else {
+ if (isMinimized())
+ showMinimized();
+ else if (isMaximized())
+ showMaximized();
+ else showNormal();
+ }
+}
+
+void BrowserMainWindow::slotViewPageSource()
+{
+ if (!currentTab())
+ return;
+
+ QString markup = currentTab()->page()->mainFrame()->toHtml();
+ QPlainTextEdit *view = new QPlainTextEdit(markup);
+ view->setWindowTitle(tr("Page Source of %1").arg(currentTab()->title()));
+ view->setMinimumWidth(640);
+ view->setAttribute(Qt::WA_DeleteOnClose);
+ view->show();
+}
+
+void BrowserMainWindow::slotHome()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("MainWindow"));
+ QString home = settings.value(QLatin1String("home"), QLatin1String("http://qtsoftware.com/")).toString();
+ loadPage(home);
+}
+
+void BrowserMainWindow::slotWebSearch()
+{
+ m_toolbarSearch->lineEdit()->selectAll();
+ m_toolbarSearch->lineEdit()->setFocus();
+}
+
+void BrowserMainWindow::slotToggleInspector(bool enable)
+{
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enable);
+ if (enable) {
+ int result = QMessageBox::question(this, tr("Web Inspector"),
+ tr("The web inspector will only work correctly for pages that were loaded after enabling.\n"
+ "Do you want to reload all pages?"),
+ QMessageBox::Yes | QMessageBox::No);
+ if (result == QMessageBox::Yes) {
+ m_tabWidget->reloadAllTabs();
+ }
+ }
+}
+
+void BrowserMainWindow::slotSwapFocus()
+{
+ if (currentTab()->hasFocus())
+ m_tabWidget->currentLineEdit()->setFocus();
+ else
+ currentTab()->setFocus();
+}
+
+void BrowserMainWindow::loadPage(const QString &page)
+{
+ QUrl url = guessUrlFromString(page);
+ loadUrl(url);
+}
+
+TabWidget *BrowserMainWindow::tabWidget() const
+{
+ return m_tabWidget;
+}
+
+WebView *BrowserMainWindow::currentTab() const
+{
+ return m_tabWidget->currentWebView();
+}
+
+void BrowserMainWindow::slotLoadProgress(int progress)
+{
+ if (progress < 100 && progress > 0) {
+ m_chaseWidget->setAnimated(true);
+ disconnect(m_stopReload, SIGNAL(triggered()), m_reload, SLOT(trigger()));
+ if (m_stopIcon.isNull())
+ m_stopIcon = style()->standardIcon(QStyle::SP_BrowserStop);
+ m_stopReload->setIcon(m_stopIcon);
+ connect(m_stopReload, SIGNAL(triggered()), m_stop, SLOT(trigger()));
+ m_stopReload->setToolTip(tr("Stop loading the current page"));
+ } else {
+ m_chaseWidget->setAnimated(false);
+ disconnect(m_stopReload, SIGNAL(triggered()), m_stop, SLOT(trigger()));
+ m_stopReload->setIcon(m_reloadIcon);
+ connect(m_stopReload, SIGNAL(triggered()), m_reload, SLOT(trigger()));
+ m_stopReload->setToolTip(tr("Reload the current page"));
+ }
+}
+
+void BrowserMainWindow::slotAboutToShowBackMenu()
+{
+ m_historyBackMenu->clear();
+ if (!currentTab())
+ return;
+ QWebHistory *history = currentTab()->history();
+ int historyCount = history->count();
+ for (int i = history->backItems(historyCount).count() - 1; i >= 0; --i) {
+ QWebHistoryItem item = history->backItems(history->count()).at(i);
+ QAction *action = new QAction(this);
+ action->setData(-1*(historyCount-i-1));
+ QIcon icon = BrowserApplication::instance()->icon(item.url());
+ action->setIcon(icon);
+ action->setText(item.title());
+ m_historyBackMenu->addAction(action);
+ }
+}
+
+void BrowserMainWindow::slotAboutToShowForwardMenu()
+{
+ m_historyForwardMenu->clear();
+ if (!currentTab())
+ return;
+ QWebHistory *history = currentTab()->history();
+ int historyCount = history->count();
+ for (int i = 0; i < history->forwardItems(history->count()).count(); ++i) {
+ QWebHistoryItem item = history->forwardItems(historyCount).at(i);
+ QAction *action = new QAction(this);
+ action->setData(historyCount-i);
+ QIcon icon = BrowserApplication::instance()->icon(item.url());
+ action->setIcon(icon);
+ action->setText(item.title());
+ m_historyForwardMenu->addAction(action);
+ }
+}
+
+void BrowserMainWindow::slotAboutToShowWindowMenu()
+{
+ m_windowMenu->clear();
+ m_windowMenu->addAction(m_tabWidget->nextTabAction());
+ m_windowMenu->addAction(m_tabWidget->previousTabAction());
+ m_windowMenu->addSeparator();
+ m_windowMenu->addAction(tr("Downloads"), this, SLOT(slotDownloadManager()), QKeySequence(tr("Alt+Ctrl+L", "Download Manager")));
+
+ m_windowMenu->addSeparator();
+ QList<BrowserMainWindow*> windows = BrowserApplication::instance()->mainWindows();
+ for (int i = 0; i < windows.count(); ++i) {
+ BrowserMainWindow *window = windows.at(i);
+ QAction *action = m_windowMenu->addAction(window->windowTitle(), this, SLOT(slotShowWindow()));
+ action->setData(i);
+ action->setCheckable(true);
+ if (window == this)
+ action->setChecked(true);
+ }
+}
+
+void BrowserMainWindow::slotShowWindow()
+{
+ if (QAction *action = qobject_cast<QAction*>(sender())) {
+ QVariant v = action->data();
+ if (v.canConvert<int>()) {
+ int offset = qvariant_cast<int>(v);
+ QList<BrowserMainWindow*> windows = BrowserApplication::instance()->mainWindows();
+ windows.at(offset)->activateWindow();
+ windows.at(offset)->currentTab()->setFocus();
+ }
+ }
+}
+
+void BrowserMainWindow::slotOpenActionUrl(QAction *action)
+{
+ int offset = action->data().toInt();
+ QWebHistory *history = currentTab()->history();
+ if (offset < 0)
+ history->goToItem(history->backItems(-1*offset).first()); // back
+ else if (offset > 0)
+ history->goToItem(history->forwardItems(history->count() - offset + 1).back()); // forward
+ }
+
+void BrowserMainWindow::geometryChangeRequested(const QRect &geometry)
+{
+ setGeometry(geometry);
+}
+
diff --git a/demos/browser/browsermainwindow.h b/demos/browser/browsermainwindow.h
new file mode 100644
index 0000000..eaf976c
--- /dev/null
+++ b/demos/browser/browsermainwindow.h
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BROWSERMAINWINDOW_H
+#define BROWSERMAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+#include <QtGui/QIcon>
+#include <QtCore/QUrl>
+
+class AutoSaver;
+class BookmarksToolBar;
+class ChaseWidget;
+class QWebFrame;
+class TabWidget;
+class ToolbarSearch;
+class WebView;
+
+/*!
+ The MainWindow of the Browser Application.
+
+ Handles the tab widget and all the actions
+ */
+class BrowserMainWindow : public QMainWindow {
+ Q_OBJECT
+
+public:
+ BrowserMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ ~BrowserMainWindow();
+ QSize sizeHint() const;
+
+public:
+ static QUrl guessUrlFromString(const QString &url);
+ TabWidget *tabWidget() const;
+ WebView *currentTab() const;
+ QByteArray saveState(bool withTabs = true) const;
+ bool restoreState(const QByteArray &state);
+
+public slots:
+ void loadPage(const QString &url);
+ void slotHome();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void save();
+
+ void slotLoadProgress(int);
+ void slotUpdateStatusbar(const QString &string);
+ void slotUpdateWindowTitle(const QString &title = QString());
+
+ void loadUrl(const QUrl &url);
+ void slotPreferences();
+
+ void slotFileNew();
+ void slotFileOpen();
+ void slotFilePrintPreview();
+ void slotFilePrint();
+ void slotPrivateBrowsing();
+ void slotFileSaveAs();
+ void slotEditFind();
+ void slotEditFindNext();
+ void slotEditFindPrevious();
+ void slotShowBookmarksDialog();
+ void slotAddBookmark();
+ void slotViewZoomIn();
+ void slotViewZoomOut();
+ void slotViewResetZoom();
+ void slotViewZoomTextOnly(bool enable);
+ void slotViewToolbar();
+ void slotViewBookmarksBar();
+ void slotViewStatusbar();
+ void slotViewPageSource();
+ void slotViewFullScreen(bool enable);
+
+ void slotWebSearch();
+ void slotToggleInspector(bool enable);
+ void slotAboutApplication();
+ void slotDownloadManager();
+ void slotSelectLineEdit();
+
+ void slotAboutToShowBackMenu();
+ void slotAboutToShowForwardMenu();
+ void slotAboutToShowWindowMenu();
+ void slotOpenActionUrl(QAction *action);
+ void slotShowWindow();
+ void slotSwapFocus();
+
+ void printRequested(QWebFrame *frame);
+ void geometryChangeRequested(const QRect &geometry);
+ void updateToolbarActionText(bool visible);
+ void updateBookmarksToolbarActionText(bool visible);
+
+private:
+ void loadDefaultState();
+ void setupMenu();
+ void setupToolBar();
+ void updateStatusbarActionText(bool visible);
+
+private:
+ QToolBar *m_navigationBar;
+ ToolbarSearch *m_toolbarSearch;
+ BookmarksToolBar *m_bookmarksToolbar;
+ ChaseWidget *m_chaseWidget;
+ TabWidget *m_tabWidget;
+ AutoSaver *m_autoSaver;
+
+ QAction *m_historyBack;
+ QMenu *m_historyBackMenu;
+ QAction *m_historyForward;
+ QMenu *m_historyForwardMenu;
+ QMenu *m_windowMenu;
+
+ QAction *m_stop;
+ QAction *m_reload;
+ QAction *m_stopReload;
+ QAction *m_viewToolbar;
+ QAction *m_viewBookmarkBar;
+ QAction *m_viewStatusbar;
+ QAction *m_restoreLastSession;
+ QAction *m_addBookmark;
+
+ QIcon m_reloadIcon;
+ QIcon m_stopIcon;
+
+ QString m_lastSearch;
+};
+
+#endif // BROWSERMAINWINDOW_H
+
diff --git a/demos/browser/chasewidget.cpp b/demos/browser/chasewidget.cpp
new file mode 100644
index 0000000..7ebe282
--- /dev/null
+++ b/demos/browser/chasewidget.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "chasewidget.h"
+
+#include <QtCore/QPoint>
+
+#include <QtGui/QApplication>
+#include <QtGui/QHideEvent>
+#include <QtGui/QPainter>
+#include <QtGui/QPaintEvent>
+#include <QtGui/QShowEvent>
+
+ChaseWidget::ChaseWidget(QWidget *parent, QPixmap pixmap, bool pixmapEnabled)
+ : QWidget(parent)
+ , m_segment(0)
+ , m_delay(100)
+ , m_step(40)
+ , m_timerId(-1)
+ , m_animated(false)
+ , m_pixmap(pixmap)
+ , m_pixmapEnabled(pixmapEnabled)
+{
+}
+
+void ChaseWidget::setAnimated(bool value)
+{
+ if (m_animated == value)
+ return;
+ m_animated = value;
+ if (m_timerId != -1) {
+ killTimer(m_timerId);
+ m_timerId = -1;
+ }
+ if (m_animated) {
+ m_segment = 0;
+ m_timerId = startTimer(m_delay);
+ }
+ update();
+}
+
+void ChaseWidget::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event);
+ QPainter p(this);
+ if (m_pixmapEnabled && !m_pixmap.isNull()) {
+ p.drawPixmap(0, 0, m_pixmap);
+ return;
+ }
+
+ const int extent = qMin(width() - 8, height() - 8);
+ const int displ = extent / 4;
+ const int ext = extent / 4 - 1;
+
+ p.setRenderHint(QPainter::Antialiasing, true);
+
+ if(m_animated)
+ p.setPen(Qt::gray);
+ else
+ p.setPen(QPen(palette().dark().color()));
+
+ p.translate(width() / 2, height() / 2); // center
+
+ for (int segment = 0; segment < segmentCount(); ++segment) {
+ p.rotate(QApplication::isRightToLeft() ? m_step : -m_step);
+ if(m_animated)
+ p.setBrush(colorForSegment(segment));
+ else
+ p.setBrush(palette().background());
+ p.drawEllipse(QRect(displ, -ext / 2, ext, ext));
+ }
+}
+
+QSize ChaseWidget::sizeHint() const
+{
+ return QSize(32, 32);
+}
+
+void ChaseWidget::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == m_timerId) {
+ ++m_segment;
+ update();
+ }
+ QWidget::timerEvent(event);
+}
+
+QColor ChaseWidget::colorForSegment(int seg) const
+{
+ int index = ((seg + m_segment) % segmentCount());
+ int comp = qMax(0, 255 - (index * (255 / segmentCount())));
+ return QColor(comp, comp, comp, 255);
+}
+
+int ChaseWidget::segmentCount() const
+{
+ return 360 / m_step;
+}
+
+void ChaseWidget::setPixmapEnabled(bool enable)
+{
+ m_pixmapEnabled = enable;
+}
+
diff --git a/demos/browser/chasewidget.h b/demos/browser/chasewidget.h
new file mode 100644
index 0000000..78968ba
--- /dev/null
+++ b/demos/browser/chasewidget.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHASEWIDGET_H
+#define CHASEWIDGET_H
+
+#include <QtGui/QWidget>
+
+#include <QtCore/QSize>
+#include <QtGui/QColor>
+#include <QtGui/QPixmap>
+
+QT_BEGIN_NAMESPACE
+class QHideEvent;
+class QShowEvent;
+class QPaintEvent;
+class QTimerEvent;
+QT_END_NAMESPACE
+
+class ChaseWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ ChaseWidget(QWidget *parent = 0, QPixmap pixmap = QPixmap(), bool pixmapEnabled = false);
+
+ void setAnimated(bool value);
+ void setPixmapEnabled(bool enable);
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void timerEvent(QTimerEvent *event);
+
+private:
+ int segmentCount() const;
+ QColor colorForSegment(int segment) const;
+
+ int m_segment;
+ int m_delay;
+ int m_step;
+ int m_timerId;
+ bool m_animated;
+ QPixmap m_pixmap;
+ bool m_pixmapEnabled;
+};
+
+#endif
diff --git a/demos/browser/cookiejar.cpp b/demos/browser/cookiejar.cpp
new file mode 100644
index 0000000..9e11c8e
--- /dev/null
+++ b/demos/browser/cookiejar.cpp
@@ -0,0 +1,733 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "cookiejar.h"
+
+#include "autosaver.h"
+
+#include <QtCore/QDateTime>
+#include <QtCore/QDir>
+#include <QtCore/QFile>
+#include <QtCore/QMetaEnum>
+#include <QtCore/QSettings>
+#include <QtCore/QUrl>
+
+#include <QtGui/QCompleter>
+#include <QtGui/QDesktopServices>
+#include <QtGui/QFont>
+#include <QtGui/QFontMetrics>
+#include <QtGui/QHeaderView>
+#include <QtGui/QKeyEvent>
+#include <QtGui/QSortFilterProxyModel>
+
+#include <QtWebKit/QWebSettings>
+
+#include <QtCore/QDebug>
+
+static const unsigned int JAR_VERSION = 23;
+
+QT_BEGIN_NAMESPACE
+QDataStream &operator<<(QDataStream &stream, const QList<QNetworkCookie> &list)
+{
+ stream << JAR_VERSION;
+ stream << quint32(list.size());
+ for (int i = 0; i < list.size(); ++i)
+ stream << list.at(i).toRawForm();
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QList<QNetworkCookie> &list)
+{
+ list.clear();
+
+ quint32 version;
+ stream >> version;
+
+ if (version != JAR_VERSION)
+ return stream;
+
+ quint32 count;
+ stream >> count;
+ for(quint32 i = 0; i < count; ++i)
+ {
+ QByteArray value;
+ stream >> value;
+ QList<QNetworkCookie> newCookies = QNetworkCookie::parseCookies(value);
+ if (newCookies.count() == 0 && value.length() != 0) {
+ qWarning() << "CookieJar: Unable to parse saved cookie:" << value;
+ }
+ for (int j = 0; j < newCookies.count(); ++j)
+ list.append(newCookies.at(j));
+ if (stream.atEnd())
+ break;
+ }
+ return stream;
+}
+QT_END_NAMESPACE
+
+CookieJar::CookieJar(QObject *parent)
+ : QNetworkCookieJar(parent)
+ , m_loaded(false)
+ , m_saveTimer(new AutoSaver(this))
+ , m_acceptCookies(AcceptOnlyFromSitesNavigatedTo)
+{
+}
+
+CookieJar::~CookieJar()
+{
+ if (m_keepCookies == KeepUntilExit)
+ clear();
+ m_saveTimer->saveIfNeccessary();
+}
+
+void CookieJar::clear()
+{
+ setAllCookies(QList<QNetworkCookie>());
+ m_saveTimer->changeOccurred();
+ emit cookiesChanged();
+}
+
+void CookieJar::load()
+{
+ if (m_loaded)
+ return;
+ // load cookies and exceptions
+ qRegisterMetaTypeStreamOperators<QList<QNetworkCookie> >("QList<QNetworkCookie>");
+ QSettings cookieSettings(QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/cookies.ini"), QSettings::IniFormat);
+ setAllCookies(qvariant_cast<QList<QNetworkCookie> >(cookieSettings.value(QLatin1String("cookies"))));
+ cookieSettings.beginGroup(QLatin1String("Exceptions"));
+ m_exceptions_block = cookieSettings.value(QLatin1String("block")).toStringList();
+ m_exceptions_allow = cookieSettings.value(QLatin1String("allow")).toStringList();
+ m_exceptions_allowForSession = cookieSettings.value(QLatin1String("allowForSession")).toStringList();
+ qSort(m_exceptions_block.begin(), m_exceptions_block.end());
+ qSort(m_exceptions_allow.begin(), m_exceptions_allow.end());
+ qSort(m_exceptions_allowForSession.begin(), m_exceptions_allowForSession.end());
+
+ loadSettings();
+}
+
+void CookieJar::loadSettings()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("cookies"));
+ QByteArray value = settings.value(QLatin1String("acceptCookies"),
+ QLatin1String("AcceptOnlyFromSitesNavigatedTo")).toByteArray();
+ QMetaEnum acceptPolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("AcceptPolicy"));
+ m_acceptCookies = acceptPolicyEnum.keyToValue(value) == -1 ?
+ AcceptOnlyFromSitesNavigatedTo :
+ static_cast<AcceptPolicy>(acceptPolicyEnum.keyToValue(value));
+
+ value = settings.value(QLatin1String("keepCookiesUntil"), QLatin1String("KeepUntilExpire")).toByteArray();
+ QMetaEnum keepPolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("KeepPolicy"));
+ m_keepCookies = keepPolicyEnum.keyToValue(value) == -1 ?
+ KeepUntilExpire :
+ static_cast<KeepPolicy>(keepPolicyEnum.keyToValue(value));
+
+ if (m_keepCookies == KeepUntilExit)
+ setAllCookies(QList<QNetworkCookie>());
+
+ m_loaded = true;
+ emit cookiesChanged();
+}
+
+void CookieJar::save()
+{
+ if (!m_loaded)
+ return;
+ purgeOldCookies();
+ QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ if (directory.isEmpty())
+ directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
+ if (!QFile::exists(directory)) {
+ QDir dir;
+ dir.mkpath(directory);
+ }
+ QSettings cookieSettings(directory + QLatin1String("/cookies.ini"), QSettings::IniFormat);
+ QList<QNetworkCookie> cookies = allCookies();
+ for (int i = cookies.count() - 1; i >= 0; --i) {
+ if (cookies.at(i).isSessionCookie())
+ cookies.removeAt(i);
+ }
+ cookieSettings.setValue(QLatin1String("cookies"), qVariantFromValue<QList<QNetworkCookie> >(cookies));
+ cookieSettings.beginGroup(QLatin1String("Exceptions"));
+ cookieSettings.setValue(QLatin1String("block"), m_exceptions_block);
+ cookieSettings.setValue(QLatin1String("allow"), m_exceptions_allow);
+ cookieSettings.setValue(QLatin1String("allowForSession"), m_exceptions_allowForSession);
+
+ // save cookie settings
+ QSettings settings;
+ settings.beginGroup(QLatin1String("cookies"));
+ QMetaEnum acceptPolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("AcceptPolicy"));
+ settings.setValue(QLatin1String("acceptCookies"), QLatin1String(acceptPolicyEnum.valueToKey(m_acceptCookies)));
+
+ QMetaEnum keepPolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("KeepPolicy"));
+ settings.setValue(QLatin1String("keepCookiesUntil"), QLatin1String(keepPolicyEnum.valueToKey(m_keepCookies)));
+}
+
+void CookieJar::purgeOldCookies()
+{
+ QList<QNetworkCookie> cookies = allCookies();
+ if (cookies.isEmpty())
+ return;
+ int oldCount = cookies.count();
+ QDateTime now = QDateTime::currentDateTime();
+ for (int i = cookies.count() - 1; i >= 0; --i) {
+ if (!cookies.at(i).isSessionCookie() && cookies.at(i).expirationDate() < now)
+ cookies.removeAt(i);
+ }
+ if (oldCount == cookies.count())
+ return;
+ setAllCookies(cookies);
+ emit cookiesChanged();
+}
+
+QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl &url) const
+{
+ CookieJar *that = const_cast<CookieJar*>(this);
+ if (!m_loaded)
+ that->load();
+
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
+ QList<QNetworkCookie> noCookies;
+ return noCookies;
+ }
+
+ return QNetworkCookieJar::cookiesForUrl(url);
+}
+
+bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url)
+{
+ if (!m_loaded)
+ load();
+
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
+ return false;
+
+ QString host = url.host();
+ bool eBlock = qBinaryFind(m_exceptions_block.begin(), m_exceptions_block.end(), host) != m_exceptions_block.end();
+ bool eAllow = qBinaryFind(m_exceptions_allow.begin(), m_exceptions_allow.end(), host) != m_exceptions_allow.end();
+ bool eAllowSession = qBinaryFind(m_exceptions_allowForSession.begin(), m_exceptions_allowForSession.end(), host) != m_exceptions_allowForSession.end();
+
+ bool addedCookies = false;
+ // pass exceptions
+ bool acceptInitially = (m_acceptCookies != AcceptNever);
+ if ((acceptInitially && !eBlock)
+ || (!acceptInitially && (eAllow || eAllowSession))) {
+ // pass url domain == cookie domain
+ QDateTime soon = QDateTime::currentDateTime();
+ soon = soon.addDays(90);
+ foreach(QNetworkCookie cookie, cookieList) {
+ QList<QNetworkCookie> lst;
+ if (m_keepCookies == KeepUntilTimeLimit
+ && !cookie.isSessionCookie()
+ && cookie.expirationDate() > soon) {
+ cookie.setExpirationDate(soon);
+ }
+ lst += cookie;
+ if (QNetworkCookieJar::setCookiesFromUrl(lst, url)) {
+ addedCookies = true;
+ } else {
+ // finally force it in if wanted
+ if (m_acceptCookies == AcceptAlways) {
+ QList<QNetworkCookie> cookies = allCookies();
+ cookies += cookie;
+ setAllCookies(cookies);
+ addedCookies = true;
+ }
+#if 0
+ else
+ qWarning() << "setCookiesFromUrl failed" << url << cookieList.value(0).toRawForm();
+#endif
+ }
+ }
+ }
+
+ if (addedCookies) {
+ m_saveTimer->changeOccurred();
+ emit cookiesChanged();
+ }
+ return addedCookies;
+}
+
+CookieJar::AcceptPolicy CookieJar::acceptPolicy() const
+{
+ if (!m_loaded)
+ (const_cast<CookieJar*>(this))->load();
+ return m_acceptCookies;
+}
+
+void CookieJar::setAcceptPolicy(AcceptPolicy policy)
+{
+ if (!m_loaded)
+ load();
+ if (policy == m_acceptCookies)
+ return;
+ m_acceptCookies = policy;
+ m_saveTimer->changeOccurred();
+}
+
+CookieJar::KeepPolicy CookieJar::keepPolicy() const
+{
+ if (!m_loaded)
+ (const_cast<CookieJar*>(this))->load();
+ return m_keepCookies;
+}
+
+void CookieJar::setKeepPolicy(KeepPolicy policy)
+{
+ if (!m_loaded)
+ load();
+ if (policy == m_keepCookies)
+ return;
+ m_keepCookies = policy;
+ m_saveTimer->changeOccurred();
+}
+
+QStringList CookieJar::blockedCookies() const
+{
+ if (!m_loaded)
+ (const_cast<CookieJar*>(this))->load();
+ return m_exceptions_block;
+}
+
+QStringList CookieJar::allowedCookies() const
+{
+ if (!m_loaded)
+ (const_cast<CookieJar*>(this))->load();
+ return m_exceptions_allow;
+}
+
+QStringList CookieJar::allowForSessionCookies() const
+{
+ if (!m_loaded)
+ (const_cast<CookieJar*>(this))->load();
+ return m_exceptions_allowForSession;
+}
+
+void CookieJar::setBlockedCookies(const QStringList &list)
+{
+ if (!m_loaded)
+ load();
+ m_exceptions_block = list;
+ qSort(m_exceptions_block.begin(), m_exceptions_block.end());
+ m_saveTimer->changeOccurred();
+}
+
+void CookieJar::setAllowedCookies(const QStringList &list)
+{
+ if (!m_loaded)
+ load();
+ m_exceptions_allow = list;
+ qSort(m_exceptions_allow.begin(), m_exceptions_allow.end());
+ m_saveTimer->changeOccurred();
+}
+
+void CookieJar::setAllowForSessionCookies(const QStringList &list)
+{
+ if (!m_loaded)
+ load();
+ m_exceptions_allowForSession = list;
+ qSort(m_exceptions_allowForSession.begin(), m_exceptions_allowForSession.end());
+ m_saveTimer->changeOccurred();
+}
+
+CookieModel::CookieModel(CookieJar *cookieJar, QObject *parent)
+ : QAbstractTableModel(parent)
+ , m_cookieJar(cookieJar)
+{
+ connect(m_cookieJar, SIGNAL(cookiesChanged()), this, SLOT(cookiesChanged()));
+ m_cookieJar->load();
+}
+
+QVariant CookieModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role == Qt::SizeHintRole) {
+ QFont font;
+ font.setPointSize(10);
+ QFontMetrics fm(font);
+ int height = fm.height() + fm.height()/3;
+ int width = fm.width(headerData(section, orientation, Qt::DisplayRole).toString());
+ return QSize(width, height);
+ }
+
+ if (orientation == Qt::Horizontal) {
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ switch (section) {
+ case 0:
+ return tr("Website");
+ case 1:
+ return tr("Name");
+ case 2:
+ return tr("Path");
+ case 3:
+ return tr("Secure");
+ case 4:
+ return tr("Expires");
+ case 5:
+ return tr("Contents");
+ default:
+ return QVariant();
+ }
+ }
+ return QAbstractTableModel::headerData(section, orientation, role);
+}
+
+QVariant CookieModel::data(const QModelIndex &index, int role) const
+{
+ QList<QNetworkCookie> lst;
+ if (m_cookieJar)
+ lst = m_cookieJar->allCookies();
+ if (index.row() < 0 || index.row() >= lst.size())
+ return QVariant();
+
+ switch (role) {
+ case Qt::DisplayRole:
+ case Qt::EditRole: {
+ QNetworkCookie cookie = lst.at(index.row());
+ switch (index.column()) {
+ case 0:
+ return cookie.domain();
+ case 1:
+ return cookie.name();
+ case 2:
+ return cookie.path();
+ case 3:
+ return cookie.isSecure();
+ case 4:
+ return cookie.expirationDate();
+ case 5:
+ return cookie.value();
+ }
+ }
+ case Qt::FontRole:{
+ QFont font;
+ font.setPointSize(10);
+ return font;
+ }
+ }
+
+ return QVariant();
+}
+
+int CookieModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : 6;
+}
+
+int CookieModel::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid() || !m_cookieJar) ? 0 : m_cookieJar->allCookies().count();
+}
+
+bool CookieModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (parent.isValid() || !m_cookieJar)
+ return false;
+ int lastRow = row + count - 1;
+ beginRemoveRows(parent, row, lastRow);
+ QList<QNetworkCookie> lst = m_cookieJar->allCookies();
+ for (int i = lastRow; i >= row; --i) {
+ lst.removeAt(i);
+ }
+ m_cookieJar->setAllCookies(lst);
+ endRemoveRows();
+ return true;
+}
+
+void CookieModel::cookiesChanged()
+{
+ reset();
+}
+
+CookiesDialog::CookiesDialog(CookieJar *cookieJar, QWidget *parent) : QDialog(parent)
+{
+ setupUi(this);
+ setWindowFlags(Qt::Sheet);
+ CookieModel *model = new CookieModel(cookieJar, this);
+ m_proxyModel = new QSortFilterProxyModel(this);
+ connect(search, SIGNAL(textChanged(QString)),
+ m_proxyModel, SLOT(setFilterFixedString(QString)));
+ connect(removeButton, SIGNAL(clicked()), cookiesTable, SLOT(removeOne()));
+ connect(removeAllButton, SIGNAL(clicked()), cookiesTable, SLOT(removeAll()));
+ m_proxyModel->setSourceModel(model);
+ cookiesTable->verticalHeader()->hide();
+ cookiesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ cookiesTable->setModel(m_proxyModel);
+ cookiesTable->setAlternatingRowColors(true);
+ cookiesTable->setTextElideMode(Qt::ElideMiddle);
+ cookiesTable->setShowGrid(false);
+ cookiesTable->setSortingEnabled(true);
+ QFont f = font();
+ f.setPointSize(10);
+ QFontMetrics fm(f);
+ int height = fm.height() + fm.height()/3;
+ cookiesTable->verticalHeader()->setDefaultSectionSize(height);
+ cookiesTable->verticalHeader()->setMinimumSectionSize(-1);
+ for (int i = 0; i < model->columnCount(); ++i){
+ int header = cookiesTable->horizontalHeader()->sectionSizeHint(i);
+ switch (i) {
+ case 0:
+ header = fm.width(QLatin1String("averagehost.domain.com"));
+ break;
+ case 1:
+ header = fm.width(QLatin1String("_session_id"));
+ break;
+ case 4:
+ header = fm.width(QDateTime::currentDateTime().toString(Qt::LocalDate));
+ break;
+ }
+ int buffer = fm.width(QLatin1String("xx"));
+ header += buffer;
+ cookiesTable->horizontalHeader()->resizeSection(i, header);
+ }
+ cookiesTable->horizontalHeader()->setStretchLastSection(true);
+}
+
+
+
+CookieExceptionsModel::CookieExceptionsModel(CookieJar *cookiejar, QObject *parent)
+ : QAbstractTableModel(parent)
+ , m_cookieJar(cookiejar)
+{
+ m_allowedCookies = m_cookieJar->allowedCookies();
+ m_blockedCookies = m_cookieJar->blockedCookies();
+ m_sessionCookies = m_cookieJar->allowForSessionCookies();
+}
+
+QVariant CookieExceptionsModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role == Qt::SizeHintRole) {
+ QFont font;
+ font.setPointSize(10);
+ QFontMetrics fm(font);
+ int height = fm.height() + fm.height()/3;
+ int width = fm.width(headerData(section, orientation, Qt::DisplayRole).toString());
+ return QSize(width, height);
+ }
+
+ if (orientation == Qt::Horizontal
+ && role == Qt::DisplayRole) {
+ switch (section) {
+ case 0:
+ return tr("Website");
+ case 1:
+ return tr("Status");
+ }
+ }
+ return QAbstractTableModel::headerData(section, orientation, role);
+}
+
+QVariant CookieExceptionsModel::data(const QModelIndex &index, int role) const
+{
+ if (index.row() < 0 || index.row() >= rowCount())
+ return QVariant();
+
+ switch (role) {
+ case Qt::DisplayRole:
+ case Qt::EditRole: {
+ int row = index.row();
+ if (row < m_allowedCookies.count()) {
+ switch (index.column()) {
+ case 0:
+ return m_allowedCookies.at(row);
+ case 1:
+ return tr("Allow");
+ }
+ }
+ row = row - m_allowedCookies.count();
+ if (row < m_blockedCookies.count()) {
+ switch (index.column()) {
+ case 0:
+ return m_blockedCookies.at(row);
+ case 1:
+ return tr("Block");
+ }
+ }
+ row = row - m_blockedCookies.count();
+ if (row < m_sessionCookies.count()) {
+ switch (index.column()) {
+ case 0:
+ return m_sessionCookies.at(row);
+ case 1:
+ return tr("Allow For Session");
+ }
+ }
+ }
+ case Qt::FontRole:{
+ QFont font;
+ font.setPointSize(10);
+ return font;
+ }
+ }
+ return QVariant();
+}
+
+int CookieExceptionsModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : 2;
+}
+
+int CookieExceptionsModel::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid() || !m_cookieJar) ? 0 : m_allowedCookies.count() + m_blockedCookies.count() + m_sessionCookies.count();
+}
+
+bool CookieExceptionsModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (parent.isValid() || !m_cookieJar)
+ return false;
+
+ int lastRow = row + count - 1;
+ beginRemoveRows(parent, row, lastRow);
+ for (int i = lastRow; i >= row; --i) {
+ if (i < m_allowedCookies.count()) {
+ m_allowedCookies.removeAt(row);
+ continue;
+ }
+ i = i - m_allowedCookies.count();
+ if (i < m_blockedCookies.count()) {
+ m_blockedCookies.removeAt(row);
+ continue;
+ }
+ i = i - m_blockedCookies.count();
+ if (i < m_sessionCookies.count()) {
+ m_sessionCookies.removeAt(row);
+ continue;
+ }
+ }
+ m_cookieJar->setAllowedCookies(m_allowedCookies);
+ m_cookieJar->setBlockedCookies(m_blockedCookies);
+ m_cookieJar->setAllowForSessionCookies(m_sessionCookies);
+ endRemoveRows();
+ return true;
+}
+
+CookiesExceptionsDialog::CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent)
+ : QDialog(parent)
+ , m_cookieJar(cookieJar)
+{
+ setupUi(this);
+ setWindowFlags(Qt::Sheet);
+ connect(removeButton, SIGNAL(clicked()), exceptionTable, SLOT(removeOne()));
+ connect(removeAllButton, SIGNAL(clicked()), exceptionTable, SLOT(removeAll()));
+ exceptionTable->verticalHeader()->hide();
+ exceptionTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ exceptionTable->setAlternatingRowColors(true);
+ exceptionTable->setTextElideMode(Qt::ElideMiddle);
+ exceptionTable->setShowGrid(false);
+ exceptionTable->setSortingEnabled(true);
+ m_exceptionsModel = new CookieExceptionsModel(cookieJar, this);
+ m_proxyModel = new QSortFilterProxyModel(this);
+ m_proxyModel->setSourceModel(m_exceptionsModel);
+ connect(search, SIGNAL(textChanged(QString)),
+ m_proxyModel, SLOT(setFilterFixedString(QString)));
+ exceptionTable->setModel(m_proxyModel);
+
+ CookieModel *cookieModel = new CookieModel(cookieJar, this);
+ domainLineEdit->setCompleter(new QCompleter(cookieModel, domainLineEdit));
+
+ connect(domainLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textChanged(const QString &)));
+ connect(blockButton, SIGNAL(clicked()), this, SLOT(block()));
+ connect(allowButton, SIGNAL(clicked()), this, SLOT(allow()));
+ connect(allowForSessionButton, SIGNAL(clicked()), this, SLOT(allowForSession()));
+
+ QFont f = font();
+ f.setPointSize(10);
+ QFontMetrics fm(f);
+ int height = fm.height() + fm.height()/3;
+ exceptionTable->verticalHeader()->setDefaultSectionSize(height);
+ exceptionTable->verticalHeader()->setMinimumSectionSize(-1);
+ for (int i = 0; i < m_exceptionsModel->columnCount(); ++i){
+ int header = exceptionTable->horizontalHeader()->sectionSizeHint(i);
+ switch (i) {
+ case 0:
+ header = fm.width(QLatin1String("averagebiglonghost.domain.com"));
+ break;
+ case 1:
+ header = fm.width(QLatin1String("Allow For Session"));
+ break;
+ }
+ int buffer = fm.width(QLatin1String("xx"));
+ header += buffer;
+ exceptionTable->horizontalHeader()->resizeSection(i, header);
+ }
+}
+
+void CookiesExceptionsDialog::textChanged(const QString &text)
+{
+ bool enabled = !text.isEmpty();
+ blockButton->setEnabled(enabled);
+ allowButton->setEnabled(enabled);
+ allowForSessionButton->setEnabled(enabled);
+}
+
+void CookiesExceptionsDialog::block()
+{
+ if (domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_blockedCookies.append(domainLineEdit->text());
+ m_cookieJar->setBlockedCookies(m_exceptionsModel->m_blockedCookies);
+ m_exceptionsModel->reset();
+}
+
+void CookiesExceptionsDialog::allow()
+{
+ if (domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_allowedCookies.append(domainLineEdit->text());
+ m_cookieJar->setAllowedCookies(m_exceptionsModel->m_allowedCookies);
+ m_exceptionsModel->reset();
+}
+
+void CookiesExceptionsDialog::allowForSession()
+{
+ if (domainLineEdit->text().isEmpty())
+ return;
+ m_exceptionsModel->m_sessionCookies.append(domainLineEdit->text());
+ m_cookieJar->setAllowForSessionCookies(m_exceptionsModel->m_sessionCookies);
+ m_exceptionsModel->reset();
+}
+
diff --git a/demos/browser/cookiejar.h b/demos/browser/cookiejar.h
new file mode 100644
index 0000000..ffcd4c1
--- /dev/null
+++ b/demos/browser/cookiejar.h
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COOKIEJAR_H
+#define COOKIEJAR_H
+
+#include <QtNetwork/QNetworkCookieJar>
+
+#include <QtCore/QAbstractItemModel>
+#include <QtCore/QStringList>
+
+#include <QtGui/QDialog>
+#include <QtGui/QTableView>
+
+QT_BEGIN_NAMESPACE
+class QSortFilterProxyModel;
+class QKeyEvent;
+QT_END_NAMESPACE
+
+class AutoSaver;
+
+class CookieJar : public QNetworkCookieJar
+{
+ friend class CookieModel;
+ Q_OBJECT
+ Q_PROPERTY(AcceptPolicy acceptPolicy READ acceptPolicy WRITE setAcceptPolicy)
+ Q_PROPERTY(KeepPolicy keepPolicy READ keepPolicy WRITE setKeepPolicy)
+ Q_PROPERTY(QStringList blockedCookies READ blockedCookies WRITE setBlockedCookies)
+ Q_PROPERTY(QStringList allowedCookies READ allowedCookies WRITE setAllowedCookies)
+ Q_PROPERTY(QStringList allowForSessionCookies READ allowForSessionCookies WRITE setAllowForSessionCookies)
+ Q_ENUMS(KeepPolicy)
+ Q_ENUMS(AcceptPolicy)
+
+signals:
+ void cookiesChanged();
+
+public:
+ enum AcceptPolicy {
+ AcceptAlways,
+ AcceptNever,
+ AcceptOnlyFromSitesNavigatedTo
+ };
+
+ enum KeepPolicy {
+ KeepUntilExpire,
+ KeepUntilExit,
+ KeepUntilTimeLimit
+ };
+
+ CookieJar(QObject *parent = 0);
+ ~CookieJar();
+
+ QList<QNetworkCookie> cookiesForUrl(const QUrl &url) const;
+ bool setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url);
+
+ AcceptPolicy acceptPolicy() const;
+ void setAcceptPolicy(AcceptPolicy policy);
+
+ KeepPolicy keepPolicy() const;
+ void setKeepPolicy(KeepPolicy policy);
+
+ QStringList blockedCookies() const;
+ QStringList allowedCookies() const;
+ QStringList allowForSessionCookies() const;
+
+ void setBlockedCookies(const QStringList &list);
+ void setAllowedCookies(const QStringList &list);
+ void setAllowForSessionCookies(const QStringList &list);
+
+public slots:
+ void clear();
+ void loadSettings();
+
+private slots:
+ void save();
+
+private:
+ void purgeOldCookies();
+ void load();
+ bool m_loaded;
+ AutoSaver *m_saveTimer;
+
+ AcceptPolicy m_acceptCookies;
+ KeepPolicy m_keepCookies;
+
+ QStringList m_exceptions_block;
+ QStringList m_exceptions_allow;
+ QStringList m_exceptions_allowForSession;
+};
+
+class CookieModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ CookieModel(CookieJar *jar, QObject *parent = 0);
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+
+private slots:
+ void cookiesChanged();
+
+private:
+ CookieJar *m_cookieJar;
+};
+
+#include "ui_cookies.h"
+#include "ui_cookiesexceptions.h"
+
+class CookiesDialog : public QDialog, public Ui_CookiesDialog
+{
+ Q_OBJECT
+
+public:
+ CookiesDialog(CookieJar *cookieJar, QWidget *parent = 0);
+
+private:
+ QSortFilterProxyModel *m_proxyModel;
+};
+
+class CookieExceptionsModel : public QAbstractTableModel
+{
+ Q_OBJECT
+ friend class CookiesExceptionsDialog;
+
+public:
+ CookieExceptionsModel(CookieJar *cookieJar, QObject *parent = 0);
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+
+private:
+ CookieJar *m_cookieJar;
+
+ // Domains we allow, Domains we block, Domains we allow for this session
+ QStringList m_allowedCookies;
+ QStringList m_blockedCookies;
+ QStringList m_sessionCookies;
+};
+
+class CookiesExceptionsDialog : public QDialog, public Ui_CookiesExceptionsDialog
+{
+ Q_OBJECT
+
+public:
+ CookiesExceptionsDialog(CookieJar *cookieJar, QWidget *parent = 0);
+
+private slots:
+ void block();
+ void allow();
+ void allowForSession();
+ void textChanged(const QString &text);
+
+private:
+ CookieExceptionsModel *m_exceptionsModel;
+ QSortFilterProxyModel *m_proxyModel;
+ CookieJar *m_cookieJar;
+};
+
+#endif // COOKIEJAR_H
+
diff --git a/demos/browser/cookies.ui b/demos/browser/cookies.ui
new file mode 100644
index 0000000..c4bccc5
--- /dev/null
+++ b/demos/browser/cookies.ui
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>CookiesDialog</class>
+ <widget class="QDialog" name="CookiesDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>550</width>
+ <height>370</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Cookies</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <widget class="SearchLineEdit" name="search" />
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="EditTableView" name="cookiesTable" />
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="removeButton" >
+ <property name="text" >
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="removeAllButton" >
+ <property name="text" >
+ <string>Remove &amp;All Cookies</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SearchLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>searchlineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>EditTableView</class>
+ <extends>QTableView</extends>
+ <header>edittableview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>CookiesDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>472</x>
+ <y>329</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>461</x>
+ <y>356</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/cookiesexceptions.ui b/demos/browser/cookiesexceptions.ui
new file mode 100644
index 0000000..3d9ef62
--- /dev/null
+++ b/demos/browser/cookiesexceptions.ui
@@ -0,0 +1,184 @@
+<ui version="4.0" >
+ <class>CookiesExceptionsDialog</class>
+ <widget class="QDialog" name="CookiesExceptionsDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>466</width>
+ <height>446</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Cookie Exceptions</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="newExceptionGroupBox" >
+ <property name="title" >
+ <string>New Exception</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Domain:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="domainLineEdit" />
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>81</width>
+ <height>25</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="blockButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Block</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="allowForSessionButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Allow For Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="allowButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Allow</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ExceptionsGroupBox" >
+ <property name="title" >
+ <string>Exceptions</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="3" >
+ <widget class="SearchLineEdit" name="search" />
+ </item>
+ <item row="1" column="0" colspan="4" >
+ <widget class="EditTableView" name="exceptionTable" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="removeButton" >
+ <property name="text" >
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QPushButton" name="removeAllButton" >
+ <property name="text" >
+ <string>Remove &amp;All</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SearchLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>searchlineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>EditTableView</class>
+ <extends>QTableView</extends>
+ <header>edittableview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>CookiesExceptionsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>381</x>
+ <y>428</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>336</x>
+ <y>443</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/data/addtab.png b/demos/browser/data/addtab.png
new file mode 100644
index 0000000..20928fb
--- /dev/null
+++ b/demos/browser/data/addtab.png
Binary files differ
diff --git a/demos/browser/data/browser.svg b/demos/browser/data/browser.svg
new file mode 100644
index 0000000..4b0fa72
--- /dev/null
+++ b/demos/browser/data/browser.svg
@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48px"
+ height="48px"
+ id="svg2160"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ inkscape:export-filename="c:\icons\qtbrowser48.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docbase="C:\icons"
+ sodipodi:docname="browser.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs2162"><linearGradient
+ id="linearGradient3808">
+ <stop
+ id="stop3810"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0.54263568;" />
+ <stop
+ id="stop3812"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+</linearGradient>
+<inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 24 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="48 : 24 : 1"
+ inkscape:persp3d-origin="24 : 16 : 1"
+ id="perspective63" />
+<linearGradient
+ id="linearGradient3326">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.3137255;"
+ offset="0"
+ id="stop3328" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3330" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3318">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.3137255;"
+ offset="0"
+ id="stop3320" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3322" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3302">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.3137255;"
+ offset="0"
+ id="stop3304" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3306" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3267">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3269" />
+ <stop
+ id="stop3275"
+ offset="0.79661018"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3271" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3745">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.19587629;"
+ offset="0"
+ id="stop3747" />
+ <stop
+ style="stop-color:#7cb2ff;stop-opacity:0.07216495;"
+ offset="1"
+ id="stop3749" />
+</linearGradient>
+<linearGradient
+ inkscape:collect="always"
+ id="linearGradient3561">
+ <stop
+ style="stop-color:#b1d0ff;stop-opacity:1;"
+ offset="0"
+ id="stop3563" />
+ <stop
+ style="stop-color:#b1d0ff;stop-opacity:0;"
+ offset="1"
+ id="stop3565" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3181">
+ <stop
+ style="stop-color:#4f7a33;stop-opacity:1;"
+ offset="0"
+ id="stop3183" />
+ <stop
+ style="stop-color:#204712;stop-opacity:1;"
+ offset="1"
+ id="stop3185" />
+</linearGradient>
+<linearGradient
+ id="linearGradient3143">
+ <stop
+ style="stop-color:#c1dbff;stop-opacity:1;"
+ offset="0"
+ id="stop3145" />
+ <stop
+ style="stop-color:#004e92;stop-opacity:1;"
+ offset="1"
+ id="stop3147" />
+</linearGradient>
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3143"
+ id="radialGradient3149"
+ cx="9.1428566"
+ cy="15.142858"
+ fx="9.1428566"
+ fy="15.142858"
+ r="20.121096"
+ gradientUnits="userSpaceOnUse" />
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3181"
+ id="radialGradient3187"
+ cx="10.739879"
+ cy="18.250999"
+ fx="10.739879"
+ fy="18.250999"
+ r="7.4191086"
+ gradientTransform="matrix(1.0504709,0,0,1.5077925,-0.3797113,-9.2677171)"
+ gradientUnits="userSpaceOnUse" />
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3181"
+ id="radialGradient3195"
+ cx="14.947268"
+ cy="35.920116"
+ fx="14.947268"
+ fy="35.920116"
+ r="6.0472684"
+ gradientTransform="matrix(1,0,0,0.7248478,0,9.8834985)"
+ gradientUnits="userSpaceOnUse" />
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3181"
+ id="radialGradient3203"
+ cx="34.227203"
+ cy="24.681196"
+ fx="34.227203"
+ fy="24.681196"
+ r="6.7517419"
+ gradientTransform="matrix(0.9941509,-0.1079997,0.2962199,2.7267411,-7.1108629,-38.921508)"
+ gradientUnits="userSpaceOnUse" />
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3561"
+ id="radialGradient3567"
+ cx="22.714285"
+ cy="23.571428"
+ fx="22.714285"
+ fy="23.571428"
+ r="19.828572"
+ gradientUnits="userSpaceOnUse" />
+<linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3745"
+ id="linearGradient3751"
+ x1="0.84126461"
+ y1="13.678415"
+ x2="31.397495"
+ y2="13.678415"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8791332,0.7829527,-0.6285195,1.0951445,14.147627,-10.49311)" />
+<filter
+ inkscape:collect="always"
+ id="filter4176">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.27747502"
+ id="feGaussianBlur4178" />
+</filter>
+<radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3267"
+ id="radialGradient3273"
+ cx="22.714285"
+ cy="23.571428"
+ fx="22.714285"
+ fy="23.571428"
+ r="19.428572"
+ gradientUnits="userSpaceOnUse" />
+<inkscape:perspective
+ id="perspective136"
+ inkscape:persp3d-origin="138.6795 : 92.479329 : 1"
+ inkscape:vp_z="277.35901 : 138.71899 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 138.71899 : 1"
+ sodipodi:type="inkscape:persp3d" />
+
+
+
+
+
+
+
+
+
+
+<linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="linearGradient3806"
+ x1="32.829472"
+ y1="32.055603"
+ x2="34.522324"
+ y2="-1.0290829"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8832227,0,0,1,-8.0103007,9.1923882)" />
+</defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="30.924085"
+ inkscape:cy="24.59691"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:window-width="1299"
+ inkscape:window-height="883"
+ inkscape:window-x="373"
+ inkscape:window-y="89"
+ showguides="false" />
+ <metadata
+ id="metadata2165">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Qt Browser</dc:title>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jens Bache-Wiig</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.78108437;fill:url(#radialGradient3273);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3407"
+ sodipodi:cx="22.714285"
+ sodipodi:cy="23.571428"
+ sodipodi:rx="19.428572"
+ sodipodi:ry="19.428572"
+ d="M 42.142857,23.571428 A 19.428572,19.428572 0 1 1 3.2857132,23.571428 A 19.428572,19.428572 0 1 1 42.142857,23.571428 z"
+ transform="matrix(1.0818892,0,0,1.0409446,-2.4313375,0.4303723)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#radialGradient3149);fill-opacity:1;stroke:none;stroke-width:0.80000000000000004;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path2170"
+ sodipodi:cx="22.714285"
+ sodipodi:cy="23.571428"
+ sodipodi:rx="19.428572"
+ sodipodi:ry="19.428572"
+ d="M 42.142857 23.571428 A 19.428572 19.428572 0 1 1 3.2857132,23.571428 A 19.428572 19.428572 0 1 1 42.142857 23.571428 z" />
+ <path
+ d="M 26.602136,8.2160843 C 26.322653,8.1637524 26.048884,8.1512446 25.78375,8.1745351 L 25.783243,8.1743913 C 25.783243,8.1743913 23.973525,8.3138471 23.891496,8.3211793 C 22.239361,8.4705552 20.985434,10.008307 20.985434,12.131916 L 20.985434,37.174579 L 22.83515,39.126673 L 41.425135,33.998394 C 42.704203,33.746799 43.714709,33.629384 43.714709,31.78483 L 43.714709,11.392226 L 26.602136,8.2160843 z"
+ id="path2998"
+ style="fill:url(#linearGradient3806);fill-opacity:1"
+ sodipodi:nodetypes="cccsccccccc" />
+ <path
+ style="fill:url(#radialGradient3203);fill-opacity:1;fill-rule:evenodd;stroke:#1d3215;stroke-width:0.51392877000000003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 37.535517,11.721122 C 32.782916,8.7478602 30.602351,6.3542385 32.09957,13.4346 C 32.320572,14.27055 33.291276,13.739232 33.291276,14.862228 C 33.291276,16.155819 32.607502,17.380765 31.797574,18.146663 C 30.959323,18.939344 31.011357,20.258984 31.797574,21.002459 C 33.06234,22.198469 33.942515,22.715936 35.572536,22.715936 C 36.6448,22.715936 37.003629,23.274262 37.23352,24.143834 C 37.362263,24.630808 38.410486,25.085663 38.894503,25.428942 C 38.938905,25.460433 38.139512,26.551348 38.139512,27.999158 C 38.139512,29.113512 38.405167,29.358325 38.743505,29.998215 C 38.949111,30.387072 36.418877,30.283794 36.025532,30.283794 C 35.005751,30.283794 34.181701,30.712163 33.15656,30.712163 C 32.264543,30.712163 31.099578,30.3566 31.344578,31.283323 C 31.763542,32.868074 32.552566,33.932342 32.552566,35.709806 C 32.552566,36.862272 31.047367,37.598377 30.287588,38.137232 C 29.30273,38.835721 29.133207,39.307154 28.475606,40.136289 C 28.132145,40.569341 26.990548,41.409612 28.475606,40.707448 C 29.476144,40.234375 31.192063,39.423774 32.09957,38.565601 C 33.257846,37.470293 34.527421,37.269266 35.723534,36.138176 C 36.659137,35.253436 37.512933,34.691155 38.29051,33.710749 C 39.024031,32.785889 39.498498,31.90347 39.498498,30.712163 C 39.498498,29.682482 39.308098,28.750366 39.951493,28.141948 C 40.902684,24.235856 42.225874,19.789742 39.751646,16.005086 C 38.569376,15.014407 37.717516,13.109859 37.535517,11.721122 z "
+ id="path3151"
+ sodipodi:nodetypes="ccsssssssssssssssssssccc" />
+ <path
+ style="fill:url(#radialGradient3187);fill-opacity:1;fill-rule:evenodd;stroke:#063a0a;stroke-width:0.51231807;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 14.777083,7.8630009 C 14.047432,8.4403746 12.751987,10.898939 13.27641,12.146301 C 13.709874,13.177316 14.920827,13.613143 15.827553,13.859622 C 16.568703,14.061091 17.049015,14.457271 17.478293,15.001835 C 17.832696,15.451415 17.971105,16.346745 18.078563,16.857932 C 18.298637,17.904845 18.947911,17.058563 17.62836,18.000145 C 17.234352,18.281296 14.875696,18.000145 14.476948,18.000145 C 11.976825,18.384083 14.297504,19.464893 14.92715,20.712903 C 15.204987,21.770261 15.377352,22.405336 15.377352,23.711213 C 15.377352,24.875672 15.377352,24.78389 15.377352,25.99564 C 15.377352,27.194757 15.044241,27.28063 13.876679,27.28063 C 13.023055,27.28063 12.647321,26.423969 11.625669,26.423969 C 10.400599,26.423969 11.303539,27.667106 11.475602,27.994513 C 12.006402,29.004538 11.662121,29.599737 10.875334,28.851174 C 9.855722,27.881096 8.8280305,26.760556 8.0240557,25.99564 C 2.8789379,25.807372 4.5677903,23.466499 3.9722395,18.999582 C 5.041259,16.526382 4.7558935,17.248897 7.2737194,12.574632 C 10.149914,9.5491592 13.589212,5.9532919 14.777083,7.8630009 z"
+ id="path3159"
+ sodipodi:nodetypes="csssssccsssssscccc" />
+ <path
+ style="fill:url(#radialGradient3195);fill-opacity:1;fill-rule:evenodd;stroke:#163c0c;stroke-width:0.59999999999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 10.265966,34.571429 C 9.245427,35.081699 8.6225774,36.042538 9.980252,36.857143 C 10.637564,37.25153 11.478587,37.606311 12.265966,38 C 13.258976,38.496505 14.481138,39.018522 15.408823,39.714286 C 16.227572,40.328348 15.587589,39.928184 16.123109,38.857143 C 16.827927,37.447507 18.14516,38.79674 18.837395,39.142857 C 20.044787,39.746554 20.46001,38.652394 20.694537,37.714286 C 20.459863,35.791335 18.579948,34.625723 17.123109,33.285715 C 16.704922,32.588736 15.507117,31.689713 14.837395,31.857143 C 13.49505,33.304042 12.350312,33.960279 10.265966,34.571429 z "
+ id="path3161"
+ sodipodi:nodetypes="cssssscccc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:none;fill-opacity:1;stroke:url(#radialGradient3567);stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.6502732"
+ id="path3557"
+ sodipodi:cx="22.714285"
+ sodipodi:cy="23.571428"
+ sodipodi:rx="19.428572"
+ sodipodi:ry="19.428572"
+ d="M 42.142857 23.571428 A 19.428572 19.428572 0 1 1 3.2857132,23.571428 A 19.428572 19.428572 0 1 1 42.142857 23.571428 z"
+ transform="matrix(0.95317,0,0,0.95317,0.9922816,1.1752786)" />
+ <path
+ style="fill:url(#linearGradient3751);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 39.916926,27.786316 C 44.588637,26.790847 38.225604,13.201712 32.946381,8.5000566 C 18.135275,-0.40265528 10.844456,5.6490056 3.6645529,16.333771 C 5.7478288,18.189127 14.704728,33.158645 39.916926,27.786316 z"
+ id="path3578"
+ sodipodi:nodetypes="cccs" />
+ <path
+ d="M 45.902562,20.610592 C 46.007701,20.610592 46.120332,20.603354 46.240455,20.590275 L 45.609873,20.590275 C 45.697743,20.603608 45.798946,20.610592 45.902562,20.610592 z"
+ id="path3012"
+ style="fill:#0a6333" />
+ <path
+ sodipodi:type="arc"
+ style="fill:none;fill-opacity:1;stroke:#273e5e;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3818"
+ sodipodi:cx="22.714285"
+ sodipodi:cy="23.571428"
+ sodipodi:rx="19.428572"
+ sodipodi:ry="19.428572"
+ d="M 42.142857,23.571428 A 19.428572,19.428572 0 1 1 3.2857132,23.571428 A 19.428572,19.428572 0 1 1 42.142857,23.571428 z"
+ transform="matrix(0.9754581,0,0,0.9754581,0.3821951,0.7002631)" />
+ <g
+ transform="matrix(0.1269799,0,0,0.1269799,23.283534,9.5774104)"
+ id="g236">
+ <path
+ style="fill:#024c1c"
+ id="path238"
+ d="M 44.233,0.368 C 42.032,0.004 39.876,-0.083 37.788,0.079 L 37.784,0.078 C 37.784,0.078 23.532,1.048 22.886,1.099 C 9.875,2.138 0,12.834 0,27.605 L 0,201.792 L 14.567,215.37 L 160.968,190.766 C 171.041,189.016 178.999,177.133 178.999,164.303 L 178.999,22.46 L 44.233,0.368 z" />
+
+ <path
+ style="fill:#66b036"
+ id="path240"
+ d="M 179,164.304 C 179,177.134 171.042,189.017 160.969,190.767 L 14.567,215.37 L 14.567,26.683 C 14.567,9.52 28.263,-2.264 44.231,0.368 L 179,22.462 L 179,164.304 z" />
+
+ <g
+ id="g242">
+ <path
+ style="fill:#ffffff"
+ id="path244"
+ d="M 133.897,47.137 L 145.72,48.411 L 145.72,69.158 L 159.025,70.099 L 159.025,83.113 L 145.72,82.502 L 145.72,130.066 C 145.72,134.207 146.176,136.869 147.093,138.064 C 147.919,139.158 149.195,139.697 150.907,139.697 C 151.069,139.697 151.24,139.695 151.414,139.683 C 154.031,139.533 156.878,138.728 159.98,137.314 L 159.98,149.275 C 154.707,151.591 149.532,152.966 144.452,153.398 C 143.716,153.457 143.005,153.486 142.317,153.486 C 137.716,153.486 134.199,152.152 131.797,149.451 C 128.998,146.318 127.598,141.285 127.598,134.387 L 127.598,81.661 L 121.209,81.368 L 121.209,67.424 L 129,67.985 L 133.897,47.137 z" />
+
+ </g>
+
+ <polygon
+ style="fill:#0a6333"
+ id="polygon246"
+ points="159.027,83.112 145.722,82.501 145.722,82.785 152.854,83.112 159.027,83.112 " />
+
+ <path
+ style="fill:#024c1c"
+ id="path248"
+ d="M 148.488,139.21 C 149.168,139.548 149.96,139.696 150.908,139.696 C 151.07,139.696 151.241,139.694 151.415,139.682 C 154.032,139.532 156.879,138.727 159.981,137.313 L 153.806,137.313 C 151.938,138.169 150.178,138.808 148.488,139.21 z" />
+
+ <path
+ style="fill:#024c1c"
+ id="path250"
+ d="M 133.897,47.137 L 127.723,47.137 L 122.93,67.549 L 129,67.985 L 133.897,47.137 z M 131.799,149.45 C 129,146.317 127.6,141.284 127.6,134.386 L 127.6,81.661 L 121.211,81.368 L 121.211,67.424 L 115.03,67.424 L 115.03,70.539 C 115.926,73.897 116.63,77.539 117.149,81.465 L 121.426,81.661 L 121.426,134.386 C 121.426,141.284 122.827,146.318 125.625,149.45 C 128.029,152.151 131.541,153.485 136.141,153.485 L 142.318,153.485 C 137.718,153.485 134.2,152.151 131.799,149.45 z" />
+
+ <path
+ style="fill:#0a6333"
+ id="path252"
+ d="M 102.954,170.419 C 103.782,170.419 104.669,170.362 105.615,170.259 L 100.649,170.259 C 101.341,170.364 102.138,170.419 102.954,170.419 z" />
+
+ <path
+ style="fill:#ffffff"
+ id="path254"
+ d="M 112.036,139.78 C 107.81,149.749 101.365,156.27 92.542,159.288 C 93.43,163.856 94.778,166.929 96.567,168.55 C 97.955,169.796 100.094,170.419 102.958,170.419 C 103.782,170.419 104.671,170.362 105.615,170.259 L 105.615,183.736 L 99.497,184.539 C 97.692,184.771 95.98,184.889 94.361,184.889 C 89.001,184.889 84.665,183.59 81.402,180.961 C 77.085,177.496 73.899,170.805 71.857,160.908 C 62.48,158.91 55.166,152.945 50.103,142.937 C 44.965,132.769 42.349,117.895 42.349,98.441 C 42.349,77.466 45.927,61.985 52.971,52.169 C 58.912,43.885 67.202,39.812 77.634,39.812 C 79.306,39.812 81.033,39.916 82.809,40.124 C 95.081,41.539 103.977,47.329 109.77,57.362 C 115.453,67.177 118.243,81.244 118.243,99.721 C 118.242,116.643 116.186,129.954 112.036,139.78 z M 93.582,135.933 C 95.996,129.724 97.189,117.54 97.189,99.37 C 97.189,83.054 96.007,71.837 93.608,65.682 C 91.21,59.496 87.622,56.153 82.808,55.731 C 82.441,55.7 82.075,55.681 81.724,55.681 C 77.264,55.681 73.84,58.283 71.447,63.508 C 68.863,69.201 67.555,81.003 67.555,98.866 C 67.555,116.129 68.826,128.379 71.388,135.569 C 73.804,142.419 77.423,145.813 82.174,145.813 C 82.384,145.813 82.593,145.805 82.809,145.79 C 87.566,145.489 91.148,142.202 93.582,135.933" />
+
+ <path
+ style="fill:#024c1c"
+ id="path256"
+ d="M 84.708,183.003 C 84.59,182.95 84.477,182.896 84.361,182.839 C 84.349,182.835 84.336,182.829 84.323,182.821 C 84.218,182.77 84.115,182.716 84.011,182.663 C 83.991,182.653 83.971,182.642 83.948,182.63 C 83.854,182.579 83.761,182.528 83.667,182.476 C 83.636,182.46 83.609,182.443 83.579,182.427 C 83.494,182.38 83.412,182.331 83.328,182.284 C 83.286,182.263 83.25,182.239 83.209,182.214 C 83.137,182.171 83.062,182.128 82.994,182.083 C 82.943,182.054 82.897,182.024 82.848,181.993 C 82.785,181.954 82.726,181.915 82.663,181.876 C 82.606,181.837 82.552,181.798 82.492,181.759 C 82.442,181.726 82.392,181.693 82.342,181.659 C 82.272,181.612 82.206,181.563 82.141,181.518 C 82.101,181.489 82.061,181.463 82.021,181.432 C 81.943,181.377 81.866,181.319 81.79,181.26 C 81.764,181.239 81.735,181.221 81.708,181.199 C 81.607,181.121 81.505,181.039 81.402,180.959 C 77.085,177.494 73.899,170.803 71.857,160.906 C 62.48,158.908 55.166,152.943 50.103,142.935 C 44.965,132.767 42.349,117.893 42.349,98.439 C 42.349,77.464 45.927,61.983 52.971,52.167 C 58.912,43.883 67.202,39.81 77.634,39.81 C 77.67,39.81 71.114,39.806 71.114,39.806 L 71.114,39.81 C 60.694,39.818 52.411,43.89 46.476,52.167 C 39.434,61.984 35.855,77.465 35.855,98.439 C 35.855,117.892 38.469,132.767 43.609,142.935 C 48.671,152.943 55.983,158.908 65.361,160.906 C 67.403,170.802 70.588,177.494 74.904,180.959 C 78.168,183.588 82.507,184.887 87.867,184.887 C 87.967,184.887 88.07,184.887 88.17,184.885 L 93.861,184.885 C 90.361,184.828 87.306,184.203 84.716,183.006 C 84.712,183.007 84.708,183.007 84.708,183.003 z M 87.113,65.681 C 89.511,71.837 90.69,83.054 90.69,99.369 C 90.69,117.539 89.502,129.723 87.083,135.932 C 85.142,140.942 82.439,144.047 79.013,145.248 C 79.999,145.621 81.058,145.81 82.173,145.81 C 82.383,145.81 82.592,145.802 82.808,145.787 C 87.567,145.488 91.149,142.201 93.582,135.932 C 95.996,129.723 97.189,117.539 97.189,99.369 C 97.189,83.053 96.007,71.836 93.608,65.681 C 91.21,59.495 87.622,56.152 82.808,55.73 C 82.441,55.699 82.075,55.68 81.724,55.68 C 80.601,55.68 79.549,55.845 78.556,56.173 L 78.556,56.175 L 78.556,56.175 C 82.254,57.322 85.104,60.5 87.113,65.681 z" />
+
+</g>
+ </g>
+</svg>
diff --git a/demos/browser/data/closetab.png b/demos/browser/data/closetab.png
new file mode 100644
index 0000000..ab9d669
--- /dev/null
+++ b/demos/browser/data/closetab.png
Binary files differ
diff --git a/demos/browser/data/data.qrc b/demos/browser/data/data.qrc
new file mode 100644
index 0000000..c7d0294
--- /dev/null
+++ b/demos/browser/data/data.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>addtab.png</file>
+ <file>closetab.png</file>
+ <file>history.png</file>
+ <file>browser.svg</file>
+ <file>defaultbookmarks.xbel</file>
+ <file>loading.gif</file>
+ <file>defaulticon.png</file>
+</qresource>
+</RCC>
diff --git a/demos/browser/data/defaultbookmarks.xbel b/demos/browser/data/defaultbookmarks.xbel
new file mode 100644
index 0000000..a168244
--- /dev/null
+++ b/demos/browser/data/defaultbookmarks.xbel
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="yes">
+ <title>Bookmarks Bar</title>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Qt Software</title>
+ </bookmark>
+ <bookmark href="http://webkit.org/">
+ <title>WebKit.org</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/">
+ <title>Qt Documentation</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/qq/">
+ <title>Qt Quarterly</title>
+ </bookmark>
+ <bookmark href="http://labs.trolltech.com/">
+ <title>Qt Labs</title>
+ </bookmark>
+ <bookmark href="http://www.qtcentre.org/">
+ <title>Qt Centre</title>
+ </bookmark>
+ <bookmark href="http://qt-apps.org/">
+ <title>Qt-Apps.org</title>
+ </bookmark>
+ <bookmark href="http://qtnode.net/">
+ <title>qtnode</title>
+ </bookmark>
+ <bookmark href="http://xkcd.com/">
+ <title>xkcd</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Bookmarks Menu</title>
+ <bookmark href="http://reddit.com/">
+ <title>reddit.com: what's new online!</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/demos/browser/data/defaulticon.png b/demos/browser/data/defaulticon.png
new file mode 100644
index 0000000..01a0920
--- /dev/null
+++ b/demos/browser/data/defaulticon.png
Binary files differ
diff --git a/demos/browser/data/history.png b/demos/browser/data/history.png
new file mode 100644
index 0000000..552a1cb
--- /dev/null
+++ b/demos/browser/data/history.png
Binary files differ
diff --git a/demos/browser/data/loading.gif b/demos/browser/data/loading.gif
new file mode 100644
index 0000000..c1545eb
--- /dev/null
+++ b/demos/browser/data/loading.gif
Binary files differ
diff --git a/demos/browser/downloaditem.ui b/demos/browser/downloaditem.ui
new file mode 100644
index 0000000..4a0a0fd
--- /dev/null
+++ b/demos/browser/downloaditem.ui
@@ -0,0 +1,134 @@
+<ui version="4.0" >
+ <class>DownloadItem</class>
+ <widget class="QWidget" name="DownloadItem" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>423</width>
+ <height>110</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="fileIcon" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Ico</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="SqueezeLabel" native="1" name="fileNameLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" stdset="0" >
+ <string>Filename</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar" >
+ <property name="value" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="SqueezeLabel" native="1" name="downloadInfoLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" stdset="0" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>17</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="tryAgainButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Try Again</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="stopButton" >
+ <property name="text" >
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="openButton" >
+ <property name="text" >
+ <string>Open</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>17</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SqueezeLabel</class>
+ <extends>QWidget</extends>
+ <header>squeezelabel.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/browser/downloadmanager.cpp b/demos/browser/downloadmanager.cpp
new file mode 100644
index 0000000..af31391
--- /dev/null
+++ b/demos/browser/downloadmanager.cpp
@@ -0,0 +1,579 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "downloadmanager.h"
+
+#include "autosaver.h"
+#include "browserapplication.h"
+#include "networkaccessmanager.h"
+
+#include <math.h>
+
+#include <QtCore/QMetaEnum>
+#include <QtCore/QSettings>
+
+#include <QtGui/QDesktopServices>
+#include <QtGui/QFileDialog>
+#include <QtGui/QHeaderView>
+#include <QtGui/QFileIconProvider>
+
+#include <QtCore/QDebug>
+
+#include <QtWebKit/QWebSettings>
+
+/*!
+ DownloadItem is a widget that is displayed in the download manager list.
+ It moves the data from the QNetworkReply into the QFile as well
+ as update the information/progressbar and report errors.
+ */
+DownloadItem::DownloadItem(QNetworkReply *reply, bool requestFileName, QWidget *parent)
+ : QWidget(parent)
+ , m_reply(reply)
+ , m_requestFileName(requestFileName)
+ , m_bytesReceived(0)
+{
+ setupUi(this);
+ QPalette p = downloadInfoLabel->palette();
+ p.setColor(QPalette::Text, Qt::darkGray);
+ downloadInfoLabel->setPalette(p);
+ progressBar->setMaximum(0);
+ tryAgainButton->hide();
+ connect(stopButton, SIGNAL(clicked()), this, SLOT(stop()));
+ connect(openButton, SIGNAL(clicked()), this, SLOT(open()));
+ connect(tryAgainButton, SIGNAL(clicked()), this, SLOT(tryAgain()));
+
+ init();
+}
+
+void DownloadItem::init()
+{
+ if (!m_reply)
+ return;
+
+ // attach to the m_reply
+ m_url = m_reply->url();
+ m_reply->setParent(this);
+ connect(m_reply, SIGNAL(readyRead()), this, SLOT(downloadReadyRead()));
+ connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)),
+ this, SLOT(error(QNetworkReply::NetworkError)));
+ connect(m_reply, SIGNAL(downloadProgress(qint64, qint64)),
+ this, SLOT(downloadProgress(qint64, qint64)));
+ connect(m_reply, SIGNAL(metaDataChanged()),
+ this, SLOT(metaDataChanged()));
+ connect(m_reply, SIGNAL(finished()),
+ this, SLOT(finished()));
+
+ // reset info
+ downloadInfoLabel->clear();
+ progressBar->setValue(0);
+ getFileName();
+
+ // start timer for the download estimation
+ m_downloadTime.start();
+
+ if (m_reply->error() != QNetworkReply::NoError) {
+ error(m_reply->error());
+ finished();
+ }
+}
+
+void DownloadItem::getFileName()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("downloadmanager"));
+ QString defaultLocation = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
+ QString downloadDirectory = settings.value(QLatin1String("downloadDirectory"), defaultLocation).toString();
+ if (!downloadDirectory.isEmpty())
+ downloadDirectory += QLatin1Char('/');
+
+ QString defaultFileName = saveFileName(downloadDirectory);
+ QString fileName = defaultFileName;
+ if (m_requestFileName) {
+ fileName = QFileDialog::getSaveFileName(this, tr("Save File"), defaultFileName);
+ if (fileName.isEmpty()) {
+ m_reply->close();
+ fileNameLabel->setText(tr("Download canceled: %1").arg(QFileInfo(defaultFileName).fileName()));
+ return;
+ }
+ }
+ m_output.setFileName(fileName);
+ fileNameLabel->setText(QFileInfo(m_output.fileName()).fileName());
+ if (m_requestFileName)
+ downloadReadyRead();
+}
+
+QString DownloadItem::saveFileName(const QString &directory) const
+{
+ // Move this function into QNetworkReply to also get file name sent from the server
+ QString path = m_url.path();
+ QFileInfo info(path);
+ QString baseName = info.completeBaseName();
+ QString endName = info.suffix();
+
+ if (baseName.isEmpty()) {
+ baseName = QLatin1String("unnamed_download");
+ qDebug() << "DownloadManager:: downloading unknown file:" << m_url;
+ }
+ QString name = directory + baseName + QLatin1Char('.') + endName;
+ if (QFile::exists(name)) {
+ // already exists, don't overwrite
+ int i = 1;
+ do {
+ name = directory + baseName + QLatin1Char('-') + QString::number(i++) + QLatin1Char('.') + endName;
+ } while (QFile::exists(name));
+ }
+ return name;
+}
+
+
+void DownloadItem::stop()
+{
+ setUpdatesEnabled(false);
+ stopButton->setEnabled(false);
+ stopButton->hide();
+ tryAgainButton->setEnabled(true);
+ tryAgainButton->show();
+ setUpdatesEnabled(true);
+ m_reply->abort();
+}
+
+void DownloadItem::open()
+{
+ QFileInfo info(m_output);
+ QUrl url = QUrl::fromLocalFile(info.absolutePath());
+ QDesktopServices::openUrl(url);
+}
+
+void DownloadItem::tryAgain()
+{
+ if (!tryAgainButton->isEnabled())
+ return;
+
+ tryAgainButton->setEnabled(false);
+ tryAgainButton->setVisible(false);
+ stopButton->setEnabled(true);
+ stopButton->setVisible(true);
+ progressBar->setVisible(true);
+
+ QNetworkReply *r = BrowserApplication::networkAccessManager()->get(QNetworkRequest(m_url));
+ if (m_reply)
+ m_reply->deleteLater();
+ if (m_output.exists())
+ m_output.remove();
+ m_reply = r;
+ init();
+ emit statusChanged();
+}
+
+void DownloadItem::downloadReadyRead()
+{
+ if (m_requestFileName && m_output.fileName().isEmpty())
+ return;
+ if (!m_output.isOpen()) {
+ // in case someone else has already put a file there
+ if (!m_requestFileName)
+ getFileName();
+ if (!m_output.open(QIODevice::WriteOnly)) {
+ downloadInfoLabel->setText(tr("Error opening save file: %1")
+ .arg(m_output.errorString()));
+ stopButton->click();
+ emit statusChanged();
+ return;
+ }
+ emit statusChanged();
+ }
+ if (-1 == m_output.write(m_reply->readAll())) {
+ downloadInfoLabel->setText(tr("Error saving: %1")
+ .arg(m_output.errorString()));
+ stopButton->click();
+ }
+}
+
+void DownloadItem::error(QNetworkReply::NetworkError)
+{
+ qDebug() << "DownloadItem::error" << m_reply->errorString() << m_url;
+ downloadInfoLabel->setText(tr("Network Error: %1").arg(m_reply->errorString()));
+ tryAgainButton->setEnabled(true);
+ tryAgainButton->setVisible(true);
+}
+
+void DownloadItem::metaDataChanged()
+{
+ qDebug() << "DownloadItem::metaDataChanged: not handled.";
+}
+
+void DownloadItem::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
+{
+ m_bytesReceived = bytesReceived;
+ if (bytesTotal == -1) {
+ progressBar->setValue(0);
+ progressBar->setMaximum(0);
+ } else {
+ progressBar->setValue(bytesReceived);
+ progressBar->setMaximum(bytesTotal);
+ }
+ updateInfoLabel();
+}
+
+void DownloadItem::updateInfoLabel()
+{
+ if (m_reply->error() == QNetworkReply::NoError)
+ return;
+
+ qint64 bytesTotal = progressBar->maximum();
+ bool running = !downloadedSuccessfully();
+
+ // update info label
+ double speed = m_bytesReceived * 1000.0 / m_downloadTime.elapsed();
+ double timeRemaining = ((double)(bytesTotal - m_bytesReceived)) / speed;
+ QString timeRemainingString = tr("seconds");
+ if (timeRemaining > 60) {
+ timeRemaining = timeRemaining / 60;
+ timeRemainingString = tr("minutes");
+ }
+ timeRemaining = floor(timeRemaining);
+
+ // When downloading the eta should never be 0
+ if (timeRemaining == 0)
+ timeRemaining = 1;
+
+ QString info;
+ if (running) {
+ QString remaining;
+ if (bytesTotal != 0)
+ remaining = tr("- %4 %5 remaining")
+ .arg(timeRemaining)
+ .arg(timeRemainingString);
+ info = QString(tr("%1 of %2 (%3/sec) %4"))
+ .arg(dataString(m_bytesReceived))
+ .arg(bytesTotal == 0 ? tr("?") : dataString(bytesTotal))
+ .arg(dataString((int)speed))
+ .arg(remaining);
+ } else {
+ if (m_bytesReceived == bytesTotal)
+ info = dataString(m_output.size());
+ else
+ info = tr("%1 of %2 - Stopped")
+ .arg(dataString(m_bytesReceived))
+ .arg(dataString(bytesTotal));
+ }
+ downloadInfoLabel->setText(info);
+}
+
+QString DownloadItem::dataString(int size) const
+{
+ QString unit;
+ if (size < 1024) {
+ unit = tr("bytes");
+ } else if (size < 1024*1024) {
+ size /= 1024;
+ unit = tr("kB");
+ } else {
+ size /= 1024*1024;
+ unit = tr("MB");
+ }
+ return QString(QLatin1String("%1 %2")).arg(size).arg(unit);
+}
+
+bool DownloadItem::downloading() const
+{
+ return (progressBar->isVisible());
+}
+
+bool DownloadItem::downloadedSuccessfully() const
+{
+ return (stopButton->isHidden() && tryAgainButton->isHidden());
+}
+
+void DownloadItem::finished()
+{
+ progressBar->hide();
+ stopButton->setEnabled(false);
+ stopButton->hide();
+ m_output.close();
+ updateInfoLabel();
+ emit statusChanged();
+}
+
+/*!
+ DownloadManager is a Dialog that contains a list of DownloadItems
+
+ It is a basic download manager. It only downloads the file, doesn't do BitTorrent,
+ extract zipped files or anything fancy.
+ */
+DownloadManager::DownloadManager(QWidget *parent)
+ : QDialog(parent)
+ , m_autoSaver(new AutoSaver(this))
+ , m_manager(BrowserApplication::networkAccessManager())
+ , m_iconProvider(0)
+ , m_removePolicy(Never)
+{
+ setupUi(this);
+ downloadsView->setShowGrid(false);
+ downloadsView->verticalHeader()->hide();
+ downloadsView->horizontalHeader()->hide();
+ downloadsView->setAlternatingRowColors(true);
+ downloadsView->horizontalHeader()->setStretchLastSection(true);
+ m_model = new DownloadModel(this);
+ downloadsView->setModel(m_model);
+ connect(cleanupButton, SIGNAL(clicked()), this, SLOT(cleanup()));
+ load();
+}
+
+DownloadManager::~DownloadManager()
+{
+ m_autoSaver->changeOccurred();
+ m_autoSaver->saveIfNeccessary();
+ if (m_iconProvider)
+ delete m_iconProvider;
+}
+
+int DownloadManager::activeDownloads() const
+{
+ int count = 0;
+ for (int i = 0; i < m_downloads.count(); ++i) {
+ if (m_downloads.at(i)->stopButton->isEnabled())
+ ++count;
+ }
+ return count;
+}
+
+void DownloadManager::download(const QNetworkRequest &request, bool requestFileName)
+{
+ if (request.url().isEmpty())
+ return;
+ handleUnsupportedContent(m_manager->get(request), requestFileName);
+}
+
+void DownloadManager::handleUnsupportedContent(QNetworkReply *reply, bool requestFileName)
+{
+ if (!reply || reply->url().isEmpty())
+ return;
+ QVariant header = reply->header(QNetworkRequest::ContentLengthHeader);
+ bool ok;
+ int size = header.toInt(&ok);
+ if (ok && size == 0)
+ return;
+
+ qDebug() << "DownloadManager::handleUnsupportedContent" << reply->url() << "requestFileName" << requestFileName;
+ DownloadItem *item = new DownloadItem(reply, requestFileName, this);
+ addItem(item);
+}
+
+void DownloadManager::addItem(DownloadItem *item)
+{
+ connect(item, SIGNAL(statusChanged()), this, SLOT(updateRow()));
+ int row = m_downloads.count();
+ m_model->beginInsertRows(QModelIndex(), row, row);
+ m_downloads.append(item);
+ m_model->endInsertRows();
+ updateItemCount();
+ if (row == 0)
+ show();
+ downloadsView->setIndexWidget(m_model->index(row, 0), item);
+ QIcon icon = style()->standardIcon(QStyle::SP_FileIcon);
+ item->fileIcon->setPixmap(icon.pixmap(48, 48));
+ downloadsView->setRowHeight(row, item->sizeHint().height());
+}
+
+void DownloadManager::updateRow()
+{
+ DownloadItem *item = qobject_cast<DownloadItem*>(sender());
+ int row = m_downloads.indexOf(item);
+ if (-1 == row)
+ return;
+ if (!m_iconProvider)
+ m_iconProvider = new QFileIconProvider();
+ QIcon icon = m_iconProvider->icon(item->m_output.fileName());
+ if (icon.isNull())
+ icon = style()->standardIcon(QStyle::SP_FileIcon);
+ item->fileIcon->setPixmap(icon.pixmap(48, 48));
+ downloadsView->setRowHeight(row, item->minimumSizeHint().height());
+
+ bool remove = false;
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (!item->downloading()
+ && globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
+ remove = true;
+
+ if (item->downloadedSuccessfully()
+ && removePolicy() == DownloadManager::SuccessFullDownload) {
+ remove = true;
+ }
+ if (remove)
+ m_model->removeRow(row);
+
+ cleanupButton->setEnabled(m_downloads.count() - activeDownloads() > 0);
+}
+
+DownloadManager::RemovePolicy DownloadManager::removePolicy() const
+{
+ return m_removePolicy;
+}
+
+void DownloadManager::setRemovePolicy(RemovePolicy policy)
+{
+ if (policy == m_removePolicy)
+ return;
+ m_removePolicy = policy;
+ m_autoSaver->changeOccurred();
+}
+
+void DownloadManager::save() const
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("downloadmanager"));
+ QMetaEnum removePolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("RemovePolicy"));
+ settings.setValue(QLatin1String("removeDownloadsPolicy"), QLatin1String(removePolicyEnum.valueToKey(m_removePolicy)));
+ settings.setValue(QLatin1String("size"), size());
+ if (m_removePolicy == Exit)
+ return;
+
+ for (int i = 0; i < m_downloads.count(); ++i) {
+ QString key = QString(QLatin1String("download_%1_")).arg(i);
+ settings.setValue(key + QLatin1String("url"), m_downloads[i]->m_url);
+ settings.setValue(key + QLatin1String("location"), QFileInfo(m_downloads[i]->m_output).filePath());
+ settings.setValue(key + QLatin1String("done"), m_downloads[i]->downloadedSuccessfully());
+ }
+ int i = m_downloads.count();
+ QString key = QString(QLatin1String("download_%1_")).arg(i);
+ while (settings.contains(key + QLatin1String("url"))) {
+ settings.remove(key + QLatin1String("url"));
+ settings.remove(key + QLatin1String("location"));
+ settings.remove(key + QLatin1String("done"));
+ key = QString(QLatin1String("download_%1_")).arg(++i);
+ }
+}
+
+void DownloadManager::load()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("downloadmanager"));
+ QSize size = settings.value(QLatin1String("size")).toSize();
+ if (size.isValid())
+ resize(size);
+ QByteArray value = settings.value(QLatin1String("removeDownloadsPolicy"), QLatin1String("Never")).toByteArray();
+ QMetaEnum removePolicyEnum = staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("RemovePolicy"));
+ m_removePolicy = removePolicyEnum.keyToValue(value) == -1 ?
+ Never :
+ static_cast<RemovePolicy>(removePolicyEnum.keyToValue(value));
+
+ int i = 0;
+ QString key = QString(QLatin1String("download_%1_")).arg(i);
+ while (settings.contains(key + QLatin1String("url"))) {
+ QUrl url = settings.value(key + QLatin1String("url")).toUrl();
+ QString fileName = settings.value(key + QLatin1String("location")).toString();
+ bool done = settings.value(key + QLatin1String("done"), true).toBool();
+ if (!url.isEmpty() && !fileName.isEmpty()) {
+ DownloadItem *item = new DownloadItem(0, this);
+ item->m_output.setFileName(fileName);
+ item->fileNameLabel->setText(QFileInfo(item->m_output.fileName()).fileName());
+ item->m_url = url;
+ item->stopButton->setVisible(false);
+ item->stopButton->setEnabled(false);
+ item->tryAgainButton->setVisible(!done);
+ item->tryAgainButton->setEnabled(!done);
+ item->progressBar->setVisible(!done);
+ addItem(item);
+ }
+ key = QString(QLatin1String("download_%1_")).arg(++i);
+ }
+ cleanupButton->setEnabled(m_downloads.count() - activeDownloads() > 0);
+}
+
+void DownloadManager::cleanup()
+{
+ if (m_downloads.isEmpty())
+ return;
+ m_model->removeRows(0, m_downloads.count());
+ updateItemCount();
+ if (m_downloads.isEmpty() && m_iconProvider) {
+ delete m_iconProvider;
+ m_iconProvider = 0;
+ }
+ m_autoSaver->changeOccurred();
+}
+
+void DownloadManager::updateItemCount()
+{
+ int count = m_downloads.count();
+ itemCount->setText(count == 1 ? tr("1 Download") : tr("%1 Downloads").arg(count));
+}
+
+DownloadModel::DownloadModel(DownloadManager *downloadManager, QObject *parent)
+ : QAbstractListModel(parent)
+ , m_downloadManager(downloadManager)
+{
+}
+
+QVariant DownloadModel::data(const QModelIndex &index, int role) const
+{
+ if (index.row() < 0 || index.row() >= rowCount(index.parent()))
+ return QVariant();
+ if (role == Qt::ToolTipRole)
+ if (!m_downloadManager->m_downloads.at(index.row())->downloadedSuccessfully())
+ return m_downloadManager->m_downloads.at(index.row())->downloadInfoLabel->text();
+ return QVariant();
+}
+
+int DownloadModel::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : m_downloadManager->m_downloads.count();
+}
+
+bool DownloadModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (parent.isValid())
+ return false;
+
+ int lastRow = row + count - 1;
+ for (int i = lastRow; i >= row; --i) {
+ if (m_downloadManager->m_downloads.at(i)->downloadedSuccessfully()
+ || m_downloadManager->m_downloads.at(i)->tryAgainButton->isEnabled()) {
+ beginRemoveRows(parent, i, i);
+ m_downloadManager->m_downloads.takeAt(i)->deleteLater();
+ endRemoveRows();
+ }
+ }
+ m_downloadManager->m_autoSaver->changeOccurred();
+ return true;
+}
+
diff --git a/demos/browser/downloadmanager.h b/demos/browser/downloadmanager.h
new file mode 100644
index 0000000..85318da
--- /dev/null
+++ b/demos/browser/downloadmanager.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOWNLOADMANAGER_H
+#define DOWNLOADMANAGER_H
+
+#include "ui_downloads.h"
+#include "ui_downloaditem.h"
+
+#include <QtNetwork/QNetworkReply>
+
+#include <QtCore/QFile>
+#include <QtCore/QTime>
+
+class DownloadItem : public QWidget, public Ui_DownloadItem
+{
+ Q_OBJECT
+
+signals:
+ void statusChanged();
+
+public:
+ DownloadItem(QNetworkReply *reply = 0, bool requestFileName = false, QWidget *parent = 0);
+ bool downloading() const;
+ bool downloadedSuccessfully() const;
+
+ QUrl m_url;
+
+ QFile m_output;
+ QNetworkReply *m_reply;
+
+private slots:
+ void stop();
+ void tryAgain();
+ void open();
+
+ void downloadReadyRead();
+ void error(QNetworkReply::NetworkError code);
+ void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
+ void metaDataChanged();
+ void finished();
+
+private:
+ void getFileName();
+ void init();
+ void updateInfoLabel();
+ QString dataString(int size) const;
+
+ QString saveFileName(const QString &directory) const;
+
+ bool m_requestFileName;
+ qint64 m_bytesReceived;
+ QTime m_downloadTime;
+};
+
+class AutoSaver;
+class DownloadModel;
+QT_BEGIN_NAMESPACE
+class QFileIconProvider;
+QT_END_NAMESPACE
+
+class DownloadManager : public QDialog, public Ui_DownloadDialog
+{
+ Q_OBJECT
+ Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy)
+ Q_ENUMS(RemovePolicy)
+
+public:
+ enum RemovePolicy {
+ Never,
+ Exit,
+ SuccessFullDownload
+ };
+
+ DownloadManager(QWidget *parent = 0);
+ ~DownloadManager();
+ int activeDownloads() const;
+
+ RemovePolicy removePolicy() const;
+ void setRemovePolicy(RemovePolicy policy);
+
+public slots:
+ void download(const QNetworkRequest &request, bool requestFileName = false);
+ inline void download(const QUrl &url, bool requestFileName = false)
+ { download(QNetworkRequest(url), requestFileName); }
+ void handleUnsupportedContent(QNetworkReply *reply, bool requestFileName = false);
+ void cleanup();
+
+private slots:
+ void save() const;
+ void updateRow();
+
+private:
+ void addItem(DownloadItem *item);
+ void updateItemCount();
+ void load();
+
+ AutoSaver *m_autoSaver;
+ DownloadModel *m_model;
+ QNetworkAccessManager *m_manager;
+ QFileIconProvider *m_iconProvider;
+ QList<DownloadItem*> m_downloads;
+ RemovePolicy m_removePolicy;
+ friend class DownloadModel;
+};
+
+class DownloadModel : public QAbstractListModel
+{
+ friend class DownloadManager;
+ Q_OBJECT
+
+public:
+ DownloadModel(DownloadManager *downloadManager, QObject *parent = 0);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+
+private:
+ DownloadManager *m_downloadManager;
+
+};
+
+#endif // DOWNLOADMANAGER_H
+
diff --git a/demos/browser/downloads.ui b/demos/browser/downloads.ui
new file mode 100644
index 0000000..a2e2569
--- /dev/null
+++ b/demos/browser/downloads.ui
@@ -0,0 +1,83 @@
+<ui version="4.0" >
+ <class>DownloadDialog</class>
+ <widget class="QDialog" name="DownloadDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>332</width>
+ <height>252</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Downloads</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item row="0" column="0" colspan="3" >
+ <widget class="EditTableView" name="downloadsView" />
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QPushButton" name="cleanupButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Clean up</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>58</width>
+ <height>24</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="itemCount" >
+ <property name="text" >
+ <string>0 Items</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>148</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>EditTableView</class>
+ <extends>QTableView</extends>
+ <header>edittableview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/browser/edittableview.cpp b/demos/browser/edittableview.cpp
new file mode 100644
index 0000000..0d776a7
--- /dev/null
+++ b/demos/browser/edittableview.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "edittableview.h"
+#include <QtGui/QKeyEvent>
+
+EditTableView::EditTableView(QWidget *parent)
+ : QTableView(parent)
+{
+}
+
+void EditTableView::keyPressEvent(QKeyEvent *event)
+{
+ if ((event->key() == Qt::Key_Delete
+ || event->key() == Qt::Key_Backspace)
+ && model()) {
+ removeOne();
+ } else {
+ QAbstractItemView::keyPressEvent(event);
+ }
+}
+
+void EditTableView::removeOne()
+{
+ if (!model() || !selectionModel())
+ return;
+ int row = currentIndex().row();
+ model()->removeRow(row, rootIndex());
+ QModelIndex idx = model()->index(row, 0, rootIndex());
+ if (!idx.isValid())
+ idx = model()->index(row - 1, 0, rootIndex());
+ selectionModel()->select(idx, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
+}
+
+void EditTableView::removeAll()
+{
+ if (model())
+ model()->removeRows(0, model()->rowCount(rootIndex()), rootIndex());
+}
+
diff --git a/demos/browser/edittableview.h b/demos/browser/edittableview.h
new file mode 100644
index 0000000..3ae63e0
--- /dev/null
+++ b/demos/browser/edittableview.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EDITTABLEVIEW_H
+#define EDITTABLEVIEW_H
+
+#include <QtGui/QTableView>
+
+class EditTableView : public QTableView
+{
+ Q_OBJECT
+
+public:
+ EditTableView(QWidget *parent = 0);
+ void keyPressEvent(QKeyEvent *event);
+
+public slots:
+ void removeOne();
+ void removeAll();
+};
+
+#endif // EDITTABLEVIEW_H
+
diff --git a/demos/browser/edittreeview.cpp b/demos/browser/edittreeview.cpp
new file mode 100644
index 0000000..0331ba7
--- /dev/null
+++ b/demos/browser/edittreeview.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "edittreeview.h"
+
+#include <QtGui/QKeyEvent>
+
+EditTreeView::EditTreeView(QWidget *parent)
+ : QTreeView(parent)
+{
+}
+
+void EditTreeView::keyPressEvent(QKeyEvent *event)
+{
+ if ((event->key() == Qt::Key_Delete
+ || event->key() == Qt::Key_Backspace)
+ && model()) {
+ removeOne();
+ } else {
+ QAbstractItemView::keyPressEvent(event);
+ }
+}
+
+void EditTreeView::removeOne()
+{
+ if (!model())
+ return;
+ QModelIndex ci = currentIndex();
+ int row = ci.row();
+ model()->removeRow(row, ci.parent());
+}
+
+void EditTreeView::removeAll()
+{
+ if (!model())
+ return;
+ model()->removeRows(0, model()->rowCount(rootIndex()), rootIndex());
+}
+
diff --git a/demos/browser/edittreeview.h b/demos/browser/edittreeview.h
new file mode 100644
index 0000000..97b9804
--- /dev/null
+++ b/demos/browser/edittreeview.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EDITTREEVIEW_H
+#define EDITTREEVIEW_H
+
+#include <QtGui/QTreeView>
+
+class EditTreeView : public QTreeView
+{
+ Q_OBJECT
+
+public:
+ EditTreeView(QWidget *parent = 0);
+ void keyPressEvent(QKeyEvent *event);
+
+public slots:
+ void removeOne();
+ void removeAll();
+};
+
+#endif // EDITTREEVIEW_H
+
diff --git a/demos/browser/history.cpp b/demos/browser/history.cpp
new file mode 100644
index 0000000..80e7372
--- /dev/null
+++ b/demos/browser/history.cpp
@@ -0,0 +1,1282 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "history.h"
+
+#include "autosaver.h"
+#include "browserapplication.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QDir>
+#include <QtCore/QFile>
+#include <QtCore/QFileInfo>
+#include <QtCore/QSettings>
+#include <QtCore/QTemporaryFile>
+#include <QtCore/QTextStream>
+
+#include <QtCore/QtAlgorithms>
+
+#include <QtGui/QClipboard>
+#include <QtGui/QDesktopServices>
+#include <QtGui/QHeaderView>
+#include <QtGui/QStyle>
+
+#include <QtWebKit/QWebHistoryInterface>
+#include <QtWebKit/QWebSettings>
+
+#include <QtCore/QDebug>
+
+static const unsigned int HISTORY_VERSION = 23;
+
+HistoryManager::HistoryManager(QObject *parent)
+ : QWebHistoryInterface(parent)
+ , m_saveTimer(new AutoSaver(this))
+ , m_historyLimit(30)
+ , m_historyModel(0)
+ , m_historyFilterModel(0)
+ , m_historyTreeModel(0)
+{
+ m_expiredTimer.setSingleShot(true);
+ connect(&m_expiredTimer, SIGNAL(timeout()),
+ this, SLOT(checkForExpired()));
+ connect(this, SIGNAL(entryAdded(const HistoryItem &)),
+ m_saveTimer, SLOT(changeOccurred()));
+ connect(this, SIGNAL(entryRemoved(const HistoryItem &)),
+ m_saveTimer, SLOT(changeOccurred()));
+ load();
+
+ m_historyModel = new HistoryModel(this, this);
+ m_historyFilterModel = new HistoryFilterModel(m_historyModel, this);
+ m_historyTreeModel = new HistoryTreeModel(m_historyFilterModel, this);
+
+ // QWebHistoryInterface will delete the history manager
+ QWebHistoryInterface::setDefaultInterface(this);
+}
+
+HistoryManager::~HistoryManager()
+{
+ m_saveTimer->saveIfNeccessary();
+}
+
+QList<HistoryItem> HistoryManager::history() const
+{
+ return m_history;
+}
+
+bool HistoryManager::historyContains(const QString &url) const
+{
+ return m_historyFilterModel->historyContains(url);
+}
+
+void HistoryManager::addHistoryEntry(const QString &url)
+{
+ QUrl cleanUrl(url);
+ cleanUrl.setPassword(QString());
+ cleanUrl.setHost(cleanUrl.host().toLower());
+ HistoryItem item(cleanUrl.toString(), QDateTime::currentDateTime());
+ addHistoryItem(item);
+}
+
+void HistoryManager::setHistory(const QList<HistoryItem> &history, bool loadedAndSorted)
+{
+ m_history = history;
+
+ // verify that it is sorted by date
+ if (!loadedAndSorted)
+ qSort(m_history.begin(), m_history.end());
+
+ checkForExpired();
+
+ if (loadedAndSorted) {
+ m_lastSavedUrl = m_history.value(0).url;
+ } else {
+ m_lastSavedUrl = QString();
+ m_saveTimer->changeOccurred();
+ }
+ emit historyReset();
+}
+
+HistoryModel *HistoryManager::historyModel() const
+{
+ return m_historyModel;
+}
+
+HistoryFilterModel *HistoryManager::historyFilterModel() const
+{
+ return m_historyFilterModel;
+}
+
+HistoryTreeModel *HistoryManager::historyTreeModel() const
+{
+ return m_historyTreeModel;
+}
+
+void HistoryManager::checkForExpired()
+{
+ if (m_historyLimit < 0 || m_history.isEmpty())
+ return;
+
+ QDateTime now = QDateTime::currentDateTime();
+ int nextTimeout = 0;
+
+ while (!m_history.isEmpty()) {
+ QDateTime checkForExpired = m_history.last().dateTime;
+ checkForExpired.setDate(checkForExpired.date().addDays(m_historyLimit));
+ if (now.daysTo(checkForExpired) > 7) {
+ // check at most in a week to prevent int overflows on the timer
+ nextTimeout = 7 * 86400;
+ } else {
+ nextTimeout = now.secsTo(checkForExpired);
+ }
+ if (nextTimeout > 0)
+ break;
+ HistoryItem item = m_history.takeLast();
+ // remove from saved file also
+ m_lastSavedUrl = QString();
+ emit entryRemoved(item);
+ }
+
+ if (nextTimeout > 0)
+ m_expiredTimer.start(nextTimeout * 1000);
+}
+
+void HistoryManager::addHistoryItem(const HistoryItem &item)
+{
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
+ return;
+
+ m_history.prepend(item);
+ emit entryAdded(item);
+ if (m_history.count() == 1)
+ checkForExpired();
+}
+
+void HistoryManager::updateHistoryItem(const QUrl &url, const QString &title)
+{
+ for (int i = 0; i < m_history.count(); ++i) {
+ if (url == m_history.at(i).url) {
+ m_history[i].title = title;
+ m_saveTimer->changeOccurred();
+ if (m_lastSavedUrl.isEmpty())
+ m_lastSavedUrl = m_history.at(i).url;
+ emit entryUpdated(i);
+ break;
+ }
+ }
+}
+
+int HistoryManager::historyLimit() const
+{
+ return m_historyLimit;
+}
+
+void HistoryManager::setHistoryLimit(int limit)
+{
+ if (m_historyLimit == limit)
+ return;
+ m_historyLimit = limit;
+ checkForExpired();
+ m_saveTimer->changeOccurred();
+}
+
+void HistoryManager::clear()
+{
+ m_history.clear();
+ m_lastSavedUrl = QString();
+ m_saveTimer->changeOccurred();
+ m_saveTimer->saveIfNeccessary();
+ historyReset();
+}
+
+void HistoryManager::loadSettings()
+{
+ // load settings
+ QSettings settings;
+ settings.beginGroup(QLatin1String("history"));
+ m_historyLimit = settings.value(QLatin1String("historyLimit"), 30).toInt();
+}
+
+void HistoryManager::load()
+{
+ loadSettings();
+
+ QFile historyFile(QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+ + QLatin1String("/history"));
+ if (!historyFile.exists())
+ return;
+ if (!historyFile.open(QFile::ReadOnly)) {
+ qWarning() << "Unable to open history file" << historyFile.fileName();
+ return;
+ }
+
+ QList<HistoryItem> list;
+ QDataStream in(&historyFile);
+ // Double check that the history file is sorted as it is read in
+ bool needToSort = false;
+ HistoryItem lastInsertedItem;
+ QByteArray data;
+ QDataStream stream;
+ QBuffer buffer;
+ stream.setDevice(&buffer);
+ while (!historyFile.atEnd()) {
+ in >> data;
+ buffer.close();
+ buffer.setBuffer(&data);
+ buffer.open(QIODevice::ReadOnly);
+ quint32 ver;
+ stream >> ver;
+ if (ver != HISTORY_VERSION)
+ continue;
+ HistoryItem item;
+ stream >> item.url;
+ stream >> item.dateTime;
+ stream >> item.title;
+
+ if (!item.dateTime.isValid())
+ continue;
+
+ if (item == lastInsertedItem) {
+ if (lastInsertedItem.title.isEmpty() && !list.isEmpty())
+ list[0].title = item.title;
+ continue;
+ }
+
+ if (!needToSort && !list.isEmpty() && lastInsertedItem < item)
+ needToSort = true;
+
+ list.prepend(item);
+ lastInsertedItem = item;
+ }
+ if (needToSort)
+ qSort(list.begin(), list.end());
+
+ setHistory(list, true);
+
+ // If we had to sort re-write the whole history sorted
+ if (needToSort) {
+ m_lastSavedUrl = QString();
+ m_saveTimer->changeOccurred();
+ }
+}
+
+void HistoryManager::save()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("history"));
+ settings.setValue(QLatin1String("historyLimit"), m_historyLimit);
+
+ bool saveAll = m_lastSavedUrl.isEmpty();
+ int first = m_history.count() - 1;
+ if (!saveAll) {
+ // find the first one to save
+ for (int i = 0; i < m_history.count(); ++i) {
+ if (m_history.at(i).url == m_lastSavedUrl) {
+ first = i - 1;
+ break;
+ }
+ }
+ }
+ if (first == m_history.count() - 1)
+ saveAll = true;
+
+ QString directory = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+ if (directory.isEmpty())
+ directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
+ if (!QFile::exists(directory)) {
+ QDir dir;
+ dir.mkpath(directory);
+ }
+
+ QFile historyFile(directory + QLatin1String("/history"));
+ // When saving everything use a temporary file to prevent possible data loss.
+ QTemporaryFile tempFile;
+ tempFile.setAutoRemove(false);
+ bool open = false;
+ if (saveAll) {
+ open = tempFile.open();
+ } else {
+ open = historyFile.open(QFile::Append);
+ }
+
+ if (!open) {
+ qWarning() << "Unable to open history file for saving"
+ << (saveAll ? tempFile.fileName() : historyFile.fileName());
+ return;
+ }
+
+ QDataStream out(saveAll ? &tempFile : &historyFile);
+ for (int i = first; i >= 0; --i) {
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly);
+ HistoryItem item = m_history.at(i);
+ stream << HISTORY_VERSION << item.url << item.dateTime << item.title;
+ out << data;
+ }
+ tempFile.close();
+
+ if (saveAll) {
+ if (historyFile.exists() && !historyFile.remove())
+ qWarning() << "History: error removing old history." << historyFile.errorString();
+ if (!tempFile.rename(historyFile.fileName()))
+ qWarning() << "History: error moving new history over old." << tempFile.errorString() << historyFile.fileName();
+ }
+ m_lastSavedUrl = m_history.value(0).url;
+}
+
+HistoryModel::HistoryModel(HistoryManager *history, QObject *parent)
+ : QAbstractTableModel(parent)
+ , m_history(history)
+{
+ Q_ASSERT(m_history);
+ connect(m_history, SIGNAL(historyReset()),
+ this, SLOT(historyReset()));
+ connect(m_history, SIGNAL(entryRemoved(const HistoryItem &)),
+ this, SLOT(historyReset()));
+
+ connect(m_history, SIGNAL(entryAdded(const HistoryItem &)),
+ this, SLOT(entryAdded()));
+ connect(m_history, SIGNAL(entryUpdated(int)),
+ this, SLOT(entryUpdated(int)));
+}
+
+void HistoryModel::historyReset()
+{
+ reset();
+}
+
+void HistoryModel::entryAdded()
+{
+ beginInsertRows(QModelIndex(), 0, 0);
+ endInsertRows();
+}
+
+void HistoryModel::entryUpdated(int offset)
+{
+ QModelIndex idx = index(offset, 0);
+ emit dataChanged(idx, idx);
+}
+
+QVariant HistoryModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (orientation == Qt::Horizontal
+ && role == Qt::DisplayRole) {
+ switch (section) {
+ case 0: return tr("Title");
+ case 1: return tr("Address");
+ }
+ }
+ return QAbstractTableModel::headerData(section, orientation, role);
+}
+
+QVariant HistoryModel::data(const QModelIndex &index, int role) const
+{
+ QList<HistoryItem> lst = m_history->history();
+ if (index.row() < 0 || index.row() >= lst.size())
+ return QVariant();
+
+ const HistoryItem &item = lst.at(index.row());
+ switch (role) {
+ case DateTimeRole:
+ return item.dateTime;
+ case DateRole:
+ return item.dateTime.date();
+ case UrlRole:
+ return QUrl(item.url);
+ case UrlStringRole:
+ return item.url;
+ case Qt::DisplayRole:
+ case Qt::EditRole: {
+ switch (index.column()) {
+ case 0:
+ // when there is no title try to generate one from the url
+ if (item.title.isEmpty()) {
+ QString page = QFileInfo(QUrl(item.url).path()).fileName();
+ if (!page.isEmpty())
+ return page;
+ return item.url;
+ }
+ return item.title;
+ case 1:
+ return item.url;
+ }
+ }
+ case Qt::DecorationRole:
+ if (index.column() == 0) {
+ return BrowserApplication::instance()->icon(item.url);
+ }
+ }
+ return QVariant();
+}
+
+int HistoryModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : 2;
+}
+
+int HistoryModel::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : m_history->history().count();
+}
+
+bool HistoryModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (parent.isValid())
+ return false;
+ int lastRow = row + count - 1;
+ beginRemoveRows(parent, row, lastRow);
+ QList<HistoryItem> lst = m_history->history();
+ for (int i = lastRow; i >= row; --i)
+ lst.removeAt(i);
+ disconnect(m_history, SIGNAL(historyReset()), this, SLOT(historyReset()));
+ m_history->setHistory(lst);
+ connect(m_history, SIGNAL(historyReset()), this, SLOT(historyReset()));
+ endRemoveRows();
+ return true;
+}
+
+#define MOVEDROWS 15
+
+/*
+ Maps the first bunch of items of the source model to the root
+*/
+HistoryMenuModel::HistoryMenuModel(HistoryTreeModel *sourceModel, QObject *parent)
+ : QAbstractProxyModel(parent)
+ , m_treeModel(sourceModel)
+{
+ setSourceModel(sourceModel);
+}
+
+int HistoryMenuModel::bumpedRows() const
+{
+ QModelIndex first = m_treeModel->index(0, 0);
+ if (!first.isValid())
+ return 0;
+ return qMin(m_treeModel->rowCount(first), MOVEDROWS);
+}
+
+int HistoryMenuModel::columnCount(const QModelIndex &parent) const
+{
+ return m_treeModel->columnCount(mapToSource(parent));
+}
+
+int HistoryMenuModel::rowCount(const QModelIndex &parent) const
+{
+ if (parent.column() > 0)
+ return 0;
+
+ if (!parent.isValid()) {
+ int folders = sourceModel()->rowCount();
+ int bumpedItems = bumpedRows();
+ if (bumpedItems <= MOVEDROWS
+ && bumpedItems == sourceModel()->rowCount(sourceModel()->index(0, 0)))
+ --folders;
+ return bumpedItems + folders;
+ }
+
+ if (parent.internalId() == -1) {
+ if (parent.row() < bumpedRows())
+ return 0;
+ }
+
+ QModelIndex idx = mapToSource(parent);
+ int defaultCount = sourceModel()->rowCount(idx);
+ if (idx == sourceModel()->index(0, 0))
+ return defaultCount - bumpedRows();
+ return defaultCount;
+}
+
+QModelIndex HistoryMenuModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ // currently not used or autotested
+ Q_ASSERT(false);
+ int sr = m_treeModel->mapToSource(sourceIndex).row();
+ return createIndex(sourceIndex.row(), sourceIndex.column(), sr);
+}
+
+QModelIndex HistoryMenuModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ if (!proxyIndex.isValid())
+ return QModelIndex();
+
+ if (proxyIndex.internalId() == -1) {
+ int bumpedItems = bumpedRows();
+ if (proxyIndex.row() < bumpedItems)
+ return m_treeModel->index(proxyIndex.row(), proxyIndex.column(), m_treeModel->index(0, 0));
+ if (bumpedItems <= MOVEDROWS && bumpedItems == sourceModel()->rowCount(m_treeModel->index(0, 0)))
+ --bumpedItems;
+ return m_treeModel->index(proxyIndex.row() - bumpedItems, proxyIndex.column());
+ }
+
+ QModelIndex historyIndex = m_treeModel->sourceModel()->index(proxyIndex.internalId(), proxyIndex.column());
+ QModelIndex treeIndex = m_treeModel->mapFromSource(historyIndex);
+ return treeIndex;
+}
+
+QModelIndex HistoryMenuModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (row < 0
+ || column < 0 || column >= columnCount(parent)
+ || parent.column() > 0)
+ return QModelIndex();
+ if (!parent.isValid())
+ return createIndex(row, column, -1);
+
+ QModelIndex treeIndexParent = mapToSource(parent);
+
+ int bumpedItems = 0;
+ if (treeIndexParent == m_treeModel->index(0, 0))
+ bumpedItems = bumpedRows();
+ QModelIndex treeIndex = m_treeModel->index(row + bumpedItems, column, treeIndexParent);
+ QModelIndex historyIndex = m_treeModel->mapToSource(treeIndex);
+ int historyRow = historyIndex.row();
+ if (historyRow == -1)
+ historyRow = treeIndex.row();
+ return createIndex(row, column, historyRow);
+}
+
+QModelIndex HistoryMenuModel::parent(const QModelIndex &index) const
+{
+ int offset = index.internalId();
+ if (offset == -1 || !index.isValid())
+ return QModelIndex();
+
+ QModelIndex historyIndex = m_treeModel->sourceModel()->index(index.internalId(), 0);
+ QModelIndex treeIndex = m_treeModel->mapFromSource(historyIndex);
+ QModelIndex treeIndexParent = treeIndex.parent();
+
+ int sr = m_treeModel->mapToSource(treeIndexParent).row();
+ int bumpedItems = bumpedRows();
+ if (bumpedItems <= MOVEDROWS && bumpedItems == sourceModel()->rowCount(sourceModel()->index(0, 0)))
+ --bumpedItems;
+ return createIndex(bumpedItems + treeIndexParent.row(), treeIndexParent.column(), sr);
+}
+
+
+HistoryMenu::HistoryMenu(QWidget *parent)
+ : ModelMenu(parent)
+ , m_history(0)
+{
+ connect(this, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(activated(const QModelIndex &)));
+ setHoverRole(HistoryModel::UrlStringRole);
+}
+
+void HistoryMenu::activated(const QModelIndex &index)
+{
+ emit openUrl(index.data(HistoryModel::UrlRole).toUrl());
+}
+
+bool HistoryMenu::prePopulated()
+{
+ if (!m_history) {
+ m_history = BrowserApplication::historyManager();
+ m_historyMenuModel = new HistoryMenuModel(m_history->historyTreeModel(), this);
+ setModel(m_historyMenuModel);
+ }
+ // initial actions
+ for (int i = 0; i < m_initialActions.count(); ++i)
+ addAction(m_initialActions.at(i));
+ if (!m_initialActions.isEmpty())
+ addSeparator();
+ setFirstSeparator(m_historyMenuModel->bumpedRows());
+
+ return false;
+}
+
+void HistoryMenu::postPopulated()
+{
+ if (m_history->history().count() > 0)
+ addSeparator();
+
+ QAction *showAllAction = new QAction(tr("Show All History"), this);
+ connect(showAllAction, SIGNAL(triggered()), this, SLOT(showHistoryDialog()));
+ addAction(showAllAction);
+
+ QAction *clearAction = new QAction(tr("Clear History"), this);
+ connect(clearAction, SIGNAL(triggered()), m_history, SLOT(clear()));
+ addAction(clearAction);
+}
+
+void HistoryMenu::showHistoryDialog()
+{
+ HistoryDialog *dialog = new HistoryDialog(this);
+ connect(dialog, SIGNAL(openUrl(const QUrl&)),
+ this, SIGNAL(openUrl(const QUrl&)));
+ dialog->show();
+}
+
+void HistoryMenu::setInitialActions(QList<QAction*> actions)
+{
+ m_initialActions = actions;
+ for (int i = 0; i < m_initialActions.count(); ++i)
+ addAction(m_initialActions.at(i));
+}
+
+TreeProxyModel::TreeProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
+{
+ setSortRole(HistoryModel::DateTimeRole);
+ setFilterCaseSensitivity(Qt::CaseInsensitive);
+}
+
+bool TreeProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
+{
+ if (!source_parent.isValid())
+ return true;
+ return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent);
+}
+
+HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) : QDialog(parent)
+{
+ HistoryManager *history = setHistory;
+ if (!history)
+ history = BrowserApplication::historyManager();
+ setupUi(this);
+ tree->setUniformRowHeights(true);
+ tree->setSelectionBehavior(QAbstractItemView::SelectRows);
+ tree->setTextElideMode(Qt::ElideMiddle);
+ QAbstractItemModel *model = history->historyTreeModel();
+ TreeProxyModel *proxyModel = new TreeProxyModel(this);
+ connect(search, SIGNAL(textChanged(QString)),
+ proxyModel, SLOT(setFilterFixedString(QString)));
+ connect(removeButton, SIGNAL(clicked()), tree, SLOT(removeOne()));
+ connect(removeAllButton, SIGNAL(clicked()), history, SLOT(clear()));
+ proxyModel->setSourceModel(model);
+ tree->setModel(proxyModel);
+ tree->setExpanded(proxyModel->index(0, 0), true);
+ tree->setAlternatingRowColors(true);
+ QFontMetrics fm(font());
+ int header = fm.width(QLatin1Char('m')) * 40;
+ tree->header()->resizeSection(0, header);
+ tree->header()->setStretchLastSection(true);
+ connect(tree, SIGNAL(activated(const QModelIndex&)),
+ this, SLOT(open()));
+ tree->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(tree, SIGNAL(customContextMenuRequested(const QPoint &)),
+ this, SLOT(customContextMenuRequested(const QPoint &)));
+}
+
+void HistoryDialog::customContextMenuRequested(const QPoint &pos)
+{
+ QMenu menu;
+ QModelIndex index = tree->indexAt(pos);
+ index = index.sibling(index.row(), 0);
+ if (index.isValid() && !tree->model()->hasChildren(index)) {
+ menu.addAction(tr("Open"), this, SLOT(open()));
+ menu.addSeparator();
+ menu.addAction(tr("Copy"), this, SLOT(copy()));
+ }
+ menu.addAction(tr("Delete"), tree, SLOT(removeOne()));
+ menu.exec(QCursor::pos());
+}
+
+void HistoryDialog::open()
+{
+ QModelIndex index = tree->currentIndex();
+ if (!index.parent().isValid())
+ return;
+ emit openUrl(index.data(HistoryModel::UrlRole).toUrl());
+}
+
+void HistoryDialog::copy()
+{
+ QModelIndex index = tree->currentIndex();
+ if (!index.parent().isValid())
+ return;
+ QString url = index.data(HistoryModel::UrlStringRole).toString();
+
+ QClipboard *clipboard = QApplication::clipboard();
+ clipboard->setText(url);
+}
+
+HistoryFilterModel::HistoryFilterModel(QAbstractItemModel *sourceModel, QObject *parent)
+ : QAbstractProxyModel(parent),
+ m_loaded(false)
+{
+ setSourceModel(sourceModel);
+}
+
+int HistoryFilterModel::historyLocation(const QString &url) const
+{
+ load();
+ if (!m_historyHash.contains(url))
+ return 0;
+ return sourceModel()->rowCount() - m_historyHash.value(url);
+}
+
+QVariant HistoryFilterModel::data(const QModelIndex &index, int role) const
+{
+ return QAbstractProxyModel::data(index, role);
+}
+
+void HistoryFilterModel::setSourceModel(QAbstractItemModel *newSourceModel)
+{
+ if (sourceModel()) {
+ disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ disconnect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));
+ disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
+ disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ }
+
+ QAbstractProxyModel::setSourceModel(newSourceModel);
+
+ if (sourceModel()) {
+ m_loaded = false;
+ connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ connect(sourceModel(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &)));
+ connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
+ connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ }
+}
+
+void HistoryFilterModel::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+{
+ emit dataChanged(mapFromSource(topLeft), mapFromSource(bottomRight));
+}
+
+QVariant HistoryFilterModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ return sourceModel()->headerData(section, orientation, role);
+}
+
+void HistoryFilterModel::sourceReset()
+{
+ m_loaded = false;
+ reset();
+}
+
+int HistoryFilterModel::rowCount(const QModelIndex &parent) const
+{
+ load();
+ if (parent.isValid())
+ return 0;
+ return m_historyHash.count();
+}
+
+int HistoryFilterModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : 2;
+}
+
+QModelIndex HistoryFilterModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ load();
+ int sourceRow = sourceModel()->rowCount() - proxyIndex.internalId();
+ return sourceModel()->index(sourceRow, proxyIndex.column());
+}
+
+QModelIndex HistoryFilterModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ load();
+ QString url = sourceIndex.data(HistoryModel::UrlStringRole).toString();
+ if (!m_historyHash.contains(url))
+ return QModelIndex();
+
+ // This can be done in a binary search, but we can't use qBinary find
+ // because it can't take: qBinaryFind(m_sourceRow.end(), m_sourceRow.begin(), v);
+ // so if this is a performance bottlneck then convert to binary search, until then
+ // the cleaner/easier to read code wins the day.
+ int realRow = -1;
+ int sourceModelRow = sourceModel()->rowCount() - sourceIndex.row();
+
+ for (int i = 0; i < m_sourceRow.count(); ++i) {
+ if (m_sourceRow.at(i) == sourceModelRow) {
+ realRow = i;
+ break;
+ }
+ }
+ if (realRow == -1)
+ return QModelIndex();
+
+ return createIndex(realRow, sourceIndex.column(), sourceModel()->rowCount() - sourceIndex.row());
+}
+
+QModelIndex HistoryFilterModel::index(int row, int column, const QModelIndex &parent) const
+{
+ load();
+ if (row < 0 || row >= rowCount(parent)
+ || column < 0 || column >= columnCount(parent))
+ return QModelIndex();
+
+ return createIndex(row, column, m_sourceRow[row]);
+}
+
+QModelIndex HistoryFilterModel::parent(const QModelIndex &) const
+{
+ return QModelIndex();
+}
+
+void HistoryFilterModel::load() const
+{
+ if (m_loaded)
+ return;
+ m_sourceRow.clear();
+ m_historyHash.clear();
+ m_historyHash.reserve(sourceModel()->rowCount());
+ for (int i = 0; i < sourceModel()->rowCount(); ++i) {
+ QModelIndex idx = sourceModel()->index(i, 0);
+ QString url = idx.data(HistoryModel::UrlStringRole).toString();
+ if (!m_historyHash.contains(url)) {
+ m_sourceRow.append(sourceModel()->rowCount() - i);
+ m_historyHash[url] = sourceModel()->rowCount() - i;
+ }
+ }
+ m_loaded = true;
+}
+
+void HistoryFilterModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_ASSERT(start == end && start == 0);
+ Q_UNUSED(end);
+ if (!m_loaded)
+ return;
+ QModelIndex idx = sourceModel()->index(start, 0, parent);
+ QString url = idx.data(HistoryModel::UrlStringRole).toString();
+ if (m_historyHash.contains(url)) {
+ int sourceRow = sourceModel()->rowCount() - m_historyHash[url];
+ int realRow = mapFromSource(sourceModel()->index(sourceRow, 0)).row();
+ beginRemoveRows(QModelIndex(), realRow, realRow);
+ m_sourceRow.removeAt(realRow);
+ m_historyHash.remove(url);
+ endRemoveRows();
+ }
+ beginInsertRows(QModelIndex(), 0, 0);
+ m_historyHash.insert(url, sourceModel()->rowCount() - start);
+ m_sourceRow.insert(0, sourceModel()->rowCount());
+ endInsertRows();
+}
+
+void HistoryFilterModel::sourceRowsRemoved(const QModelIndex &, int start, int end)
+{
+ Q_UNUSED(start);
+ Q_UNUSED(end);
+ sourceReset();
+}
+
+/*
+ Removing a continuous block of rows will remove filtered rows too as this is
+ the users intention.
+*/
+bool HistoryFilterModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (row < 0 || count <= 0 || row + count > rowCount(parent) || parent.isValid())
+ return false;
+ int lastRow = row + count - 1;
+ disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ beginRemoveRows(parent, row, lastRow);
+ int oldCount = rowCount();
+ int start = sourceModel()->rowCount() - m_sourceRow.value(row);
+ int end = sourceModel()->rowCount() - m_sourceRow.value(lastRow);
+ sourceModel()->removeRows(start, end - start + 1);
+ endRemoveRows();
+ connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ m_loaded = false;
+ if (oldCount - count != rowCount())
+ reset();
+ return true;
+}
+
+HistoryCompletionModel::HistoryCompletionModel(QObject *parent)
+ : QAbstractProxyModel(parent)
+{
+}
+
+QVariant HistoryCompletionModel::data(const QModelIndex &index, int role) const
+{
+ if (sourceModel()
+ && (role == Qt::EditRole || role == Qt::DisplayRole)
+ && index.isValid()) {
+ QModelIndex idx = mapToSource(index);
+ idx = idx.sibling(idx.row(), 1);
+ QString urlString = idx.data(HistoryModel::UrlStringRole).toString();
+ if (index.row() % 2) {
+ QUrl url = urlString;
+ QString s = url.toString(QUrl::RemoveScheme
+ | QUrl::RemoveUserInfo
+ | QUrl::StripTrailingSlash);
+ return s.mid(2); // strip // from the front
+ }
+ return urlString;
+ }
+ return QAbstractProxyModel::data(index, role);
+}
+
+int HistoryCompletionModel::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid() || !sourceModel()) ? 0 : sourceModel()->rowCount(parent) * 2;
+}
+
+int HistoryCompletionModel::columnCount(const QModelIndex &parent) const
+{
+ return (parent.isValid()) ? 0 : 1;
+}
+
+QModelIndex HistoryCompletionModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ int row = sourceIndex.row() * 2;
+ return index(row, sourceIndex.column());
+}
+
+QModelIndex HistoryCompletionModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ if (!sourceModel())
+ return QModelIndex();
+ int row = proxyIndex.row() / 2;
+ return sourceModel()->index(row, proxyIndex.column());
+}
+
+QModelIndex HistoryCompletionModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (row < 0 || row >= rowCount(parent)
+ || column < 0 || column >= columnCount(parent))
+ return QModelIndex();
+ return createIndex(row, column, 0);
+}
+
+QModelIndex HistoryCompletionModel::parent(const QModelIndex &) const
+{
+ return QModelIndex();
+}
+
+void HistoryCompletionModel::setSourceModel(QAbstractItemModel *newSourceModel)
+{
+ if (sourceModel()) {
+ disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceReset()));
+ disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceReset()));
+ }
+
+ QAbstractProxyModel::setSourceModel(newSourceModel);
+
+ if (newSourceModel) {
+ connect(newSourceModel, SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceReset()));
+ connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceReset()));
+ }
+
+ reset();
+}
+
+void HistoryCompletionModel::sourceReset()
+{
+ reset();
+}
+
+HistoryTreeModel::HistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent)
+ : QAbstractProxyModel(parent)
+{
+ setSourceModel(sourceModel);
+}
+
+QVariant HistoryTreeModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ return sourceModel()->headerData(section, orientation, role);
+}
+
+QVariant HistoryTreeModel::data(const QModelIndex &index, int role) const
+{
+ if ((role == Qt::EditRole || role == Qt::DisplayRole)) {
+ int start = index.internalId();
+ if (start == 0) {
+ int offset = sourceDateRow(index.row());
+ if (index.column() == 0) {
+ QModelIndex idx = sourceModel()->index(offset, 0);
+ QDate date = idx.data(HistoryModel::DateRole).toDate();
+ if (date == QDate::currentDate())
+ return tr("Earlier Today");
+ return date.toString(QLatin1String("dddd, MMMM d, yyyy"));
+ }
+ if (index.column() == 1) {
+ return tr("%1 items").arg(rowCount(index.sibling(index.row(), 0)));
+ }
+ }
+ }
+ if (role == Qt::DecorationRole && index.column() == 0 && !index.parent().isValid())
+ return QIcon(QLatin1String(":history.png"));
+ if (role == HistoryModel::DateRole && index.column() == 0 && index.internalId() == 0) {
+ int offset = sourceDateRow(index.row());
+ QModelIndex idx = sourceModel()->index(offset, 0);
+ return idx.data(HistoryModel::DateRole);
+ }
+
+ return QAbstractProxyModel::data(index, role);
+}
+
+int HistoryTreeModel::columnCount(const QModelIndex &parent) const
+{
+ return sourceModel()->columnCount(mapToSource(parent));
+}
+
+int HistoryTreeModel::rowCount(const QModelIndex &parent) const
+{
+ if ( parent.internalId() != 0
+ || parent.column() > 0
+ || !sourceModel())
+ return 0;
+
+ // row count OF dates
+ if (!parent.isValid()) {
+ if (!m_sourceRowCache.isEmpty())
+ return m_sourceRowCache.count();
+ QDate currentDate;
+ int rows = 0;
+ int totalRows = sourceModel()->rowCount();
+
+ for (int i = 0; i < totalRows; ++i) {
+ QDate rowDate = sourceModel()->index(i, 0).data(HistoryModel::DateRole).toDate();
+ if (rowDate != currentDate) {
+ m_sourceRowCache.append(i);
+ currentDate = rowDate;
+ ++rows;
+ }
+ }
+ Q_ASSERT(m_sourceRowCache.count() == rows);
+ return rows;
+ }
+
+ // row count FOR a date
+ int start = sourceDateRow(parent.row());
+ int end = sourceDateRow(parent.row() + 1);
+ return (end - start);
+}
+
+// Translate the top level date row into the offset where that date starts
+int HistoryTreeModel::sourceDateRow(int row) const
+{
+ if (row <= 0)
+ return 0;
+
+ if (m_sourceRowCache.isEmpty())
+ rowCount(QModelIndex());
+
+ if (row >= m_sourceRowCache.count()) {
+ if (!sourceModel())
+ return 0;
+ return sourceModel()->rowCount();
+ }
+ return m_sourceRowCache.at(row);
+}
+
+QModelIndex HistoryTreeModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ int offset = proxyIndex.internalId();
+ if (offset == 0)
+ return QModelIndex();
+ int startDateRow = sourceDateRow(offset - 1);
+ return sourceModel()->index(startDateRow + proxyIndex.row(), proxyIndex.column());
+}
+
+QModelIndex HistoryTreeModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (row < 0
+ || column < 0 || column >= columnCount(parent)
+ || parent.column() > 0)
+ return QModelIndex();
+
+ if (!parent.isValid())
+ return createIndex(row, column, 0);
+ return createIndex(row, column, parent.row() + 1);
+}
+
+QModelIndex HistoryTreeModel::parent(const QModelIndex &index) const
+{
+ int offset = index.internalId();
+ if (offset == 0 || !index.isValid())
+ return QModelIndex();
+ return createIndex(offset - 1, 0, 0);
+}
+
+bool HistoryTreeModel::hasChildren(const QModelIndex &parent) const
+{
+ QModelIndex grandparent = parent.parent();
+ if (!grandparent.isValid())
+ return true;
+ return false;
+}
+
+Qt::ItemFlags HistoryTreeModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::NoItemFlags;
+ return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled;
+}
+
+bool HistoryTreeModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (row < 0 || count <= 0 || row + count > rowCount(parent))
+ return false;
+
+ if (parent.isValid()) {
+ // removing pages
+ int offset = sourceDateRow(parent.row());
+ return sourceModel()->removeRows(offset + row, count);
+ } else {
+ // removing whole dates
+ for (int i = row + count - 1; i >= row; --i) {
+ QModelIndex dateParent = index(i, 0);
+ int offset = sourceDateRow(dateParent.row());
+ if (!sourceModel()->removeRows(offset, rowCount(dateParent)))
+ return false;
+ }
+ }
+ return true;
+}
+
+void HistoryTreeModel::setSourceModel(QAbstractItemModel *newSourceModel)
+{
+ if (sourceModel()) {
+ disconnect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ disconnect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset()));
+ disconnect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
+ disconnect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ }
+
+ QAbstractProxyModel::setSourceModel(newSourceModel);
+
+ if (newSourceModel) {
+ connect(sourceModel(), SIGNAL(modelReset()), this, SLOT(sourceReset()));
+ connect(sourceModel(), SIGNAL(layoutChanged()), this, SLOT(sourceReset()));
+ connect(sourceModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsInserted(const QModelIndex &, int, int)));
+ connect(sourceModel(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(sourceRowsRemoved(const QModelIndex &, int, int)));
+ }
+
+ reset();
+}
+
+void HistoryTreeModel::sourceReset()
+{
+ m_sourceRowCache.clear();
+ reset();
+}
+
+void HistoryTreeModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_UNUSED(parent); // Avoid warnings when compiling release
+ Q_ASSERT(!parent.isValid());
+ if (start != 0 || start != end) {
+ m_sourceRowCache.clear();
+ reset();
+ return;
+ }
+
+ m_sourceRowCache.clear();
+ QModelIndex treeIndex = mapFromSource(sourceModel()->index(start, 0));
+ QModelIndex treeParent = treeIndex.parent();
+ if (rowCount(treeParent) == 1) {
+ beginInsertRows(QModelIndex(), 0, 0);
+ endInsertRows();
+ } else {
+ beginInsertRows(treeParent, treeIndex.row(), treeIndex.row());
+ endInsertRows();
+ }
+}
+
+QModelIndex HistoryTreeModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ if (!sourceIndex.isValid())
+ return QModelIndex();
+
+ if (m_sourceRowCache.isEmpty())
+ rowCount(QModelIndex());
+
+ QList<int>::iterator it;
+ it = qLowerBound(m_sourceRowCache.begin(), m_sourceRowCache.end(), sourceIndex.row());
+ if (*it != sourceIndex.row())
+ --it;
+ int dateRow = qMax(0, it - m_sourceRowCache.begin());
+ int row = sourceIndex.row() - m_sourceRowCache.at(dateRow);
+ return createIndex(row, sourceIndex.column(), dateRow + 1);
+}
+
+void HistoryTreeModel::sourceRowsRemoved(const QModelIndex &parent, int start, int end)
+{
+ Q_UNUSED(parent); // Avoid warnings when compiling release
+ Q_ASSERT(!parent.isValid());
+ if (m_sourceRowCache.isEmpty())
+ return;
+ for (int i = end; i >= start;) {
+ QList<int>::iterator it;
+ it = qLowerBound(m_sourceRowCache.begin(), m_sourceRowCache.end(), i);
+ // playing it safe
+ if (it == m_sourceRowCache.end()) {
+ m_sourceRowCache.clear();
+ reset();
+ return;
+ }
+
+ if (*it != i)
+ --it;
+ int row = qMax(0, it - m_sourceRowCache.begin());
+ int offset = m_sourceRowCache[row];
+ QModelIndex dateParent = index(row, 0);
+ // If we can remove all the rows in the date do that and skip over them
+ int rc = rowCount(dateParent);
+ if (i - rc + 1 == offset && start <= i - rc + 1) {
+ beginRemoveRows(QModelIndex(), row, row);
+ m_sourceRowCache.removeAt(row);
+ i -= rc + 1;
+ } else {
+ beginRemoveRows(dateParent, i - offset, i - offset);
+ ++row;
+ --i;
+ }
+ for (int j = row; j < m_sourceRowCache.count(); ++j)
+ --m_sourceRowCache[j];
+ endRemoveRows();
+ }
+}
+
diff --git a/demos/browser/history.h b/demos/browser/history.h
new file mode 100644
index 0000000..4f4edcd
--- /dev/null
+++ b/demos/browser/history.h
@@ -0,0 +1,350 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HISTORY_H
+#define HISTORY_H
+
+#include "modelmenu.h"
+
+#include <QtCore/QDateTime>
+#include <QtCore/QHash>
+#include <QtCore/QObject>
+#include <QtCore/QTimer>
+#include <QtCore/QUrl>
+
+#include <QtGui/QSortFilterProxyModel>
+
+#include <QWebHistoryInterface>
+
+class HistoryItem
+{
+public:
+ HistoryItem() {}
+ HistoryItem(const QString &u,
+ const QDateTime &d = QDateTime(), const QString &t = QString())
+ : title(t), url(u), dateTime(d) {}
+
+ inline bool operator==(const HistoryItem &other) const
+ { return other.title == title
+ && other.url == url && other.dateTime == dateTime; }
+
+ // history is sorted in reverse
+ inline bool operator <(const HistoryItem &other) const
+ { return dateTime > other.dateTime; }
+
+ QString title;
+ QString url;
+ QDateTime dateTime;
+};
+
+class AutoSaver;
+class HistoryModel;
+class HistoryFilterModel;
+class HistoryTreeModel;
+class HistoryManager : public QWebHistoryInterface
+{
+ Q_OBJECT
+ Q_PROPERTY(int historyLimit READ historyLimit WRITE setHistoryLimit)
+
+signals:
+ void historyReset();
+ void entryAdded(const HistoryItem &item);
+ void entryRemoved(const HistoryItem &item);
+ void entryUpdated(int offset);
+
+public:
+ HistoryManager(QObject *parent = 0);
+ ~HistoryManager();
+
+ bool historyContains(const QString &url) const;
+ void addHistoryEntry(const QString &url);
+
+ void updateHistoryItem(const QUrl &url, const QString &title);
+
+ int historyLimit() const;
+ void setHistoryLimit(int limit);
+
+ QList<HistoryItem> history() const;
+ void setHistory(const QList<HistoryItem> &history, bool loadedAndSorted = false);
+
+ // History manager keeps around these models for use by the completer and other classes
+ HistoryModel *historyModel() const;
+ HistoryFilterModel *historyFilterModel() const;
+ HistoryTreeModel *historyTreeModel() const;
+
+public slots:
+ void clear();
+ void loadSettings();
+
+private slots:
+ void save();
+ void checkForExpired();
+
+protected:
+ void addHistoryItem(const HistoryItem &item);
+
+private:
+ void load();
+
+ AutoSaver *m_saveTimer;
+ int m_historyLimit;
+ QTimer m_expiredTimer;
+ QList<HistoryItem> m_history;
+ QString m_lastSavedUrl;
+
+ HistoryModel *m_historyModel;
+ HistoryFilterModel *m_historyFilterModel;
+ HistoryTreeModel *m_historyTreeModel;
+};
+
+class HistoryModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public slots:
+ void historyReset();
+ void entryAdded();
+ void entryUpdated(int offset);
+
+public:
+ enum Roles {
+ DateRole = Qt::UserRole + 1,
+ DateTimeRole = Qt::UserRole + 2,
+ UrlRole = Qt::UserRole + 3,
+ UrlStringRole = Qt::UserRole + 4
+ };
+
+ HistoryModel(HistoryManager *history, QObject *parent = 0);
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+
+private:
+ HistoryManager *m_history;
+};
+
+/*!
+ Proxy model that will remove any duplicate entries.
+ Both m_sourceRow and m_historyHash store their offsets not from
+ the front of the list, but as offsets from the back.
+ */
+class HistoryFilterModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+
+public:
+ HistoryFilterModel(QAbstractItemModel *sourceModel, QObject *parent = 0);
+
+ inline bool historyContains(const QString &url) const
+ { load(); return m_historyHash.contains(url); }
+ int historyLocation(const QString &url) const;
+
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
+ void setSourceModel(QAbstractItemModel *sourceModel);
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex index(int, int, const QModelIndex& = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex& index= QModelIndex()) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+
+private slots:
+ void sourceReset();
+ void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void sourceRowsInserted(const QModelIndex &parent, int start, int end);
+ void sourceRowsRemoved(const QModelIndex &, int, int);
+
+private:
+ void load() const;
+
+ mutable QList<int> m_sourceRow;
+ mutable QHash<QString, int> m_historyHash;
+ mutable bool m_loaded;
+};
+
+/*
+ The history menu
+ - Removes the first twenty entries and puts them as children of the top level.
+ - If there are less then twenty entries then the first folder is also removed.
+
+ The mapping is done by knowing that HistoryTreeModel is over a table
+ We store that row offset in our index's private data.
+*/
+class HistoryMenuModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+
+public:
+ HistoryMenuModel(HistoryTreeModel *sourceModel, QObject *parent = 0);
+ int columnCount(const QModelIndex &parent) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex mapFromSource(const QModelIndex & sourceIndex) const;
+ QModelIndex mapToSource(const QModelIndex & proxyIndex) const;
+ QModelIndex index(int, int, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index = QModelIndex()) const;
+
+ int bumpedRows() const;
+
+private:
+ HistoryTreeModel *m_treeModel;
+};
+
+// Menu that is dynamically populated from the history
+class HistoryMenu : public ModelMenu
+{
+ Q_OBJECT
+
+signals:
+ void openUrl(const QUrl &url);
+
+public:
+ HistoryMenu(QWidget *parent = 0);
+ void setInitialActions(QList<QAction*> actions);
+
+protected:
+ bool prePopulated();
+ void postPopulated();
+
+private slots:
+ void activated(const QModelIndex &index);
+ void showHistoryDialog();
+
+private:
+ HistoryManager *m_history;
+ HistoryMenuModel *m_historyMenuModel;
+ QList<QAction*> m_initialActions;
+};
+
+// proxy model for the history model that
+// exposes each url http://www.foo.com and it url starting at the host www.foo.com
+class HistoryCompletionModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+
+public:
+ HistoryCompletionModel(QObject *parent = 0);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
+ QModelIndex index(int, int, const QModelIndex& = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex& index= QModelIndex()) const;
+ void setSourceModel(QAbstractItemModel *sourceModel);
+
+private slots:
+ void sourceReset();
+
+};
+
+// proxy model for the history model that converts the list
+// into a tree, one top level node per day.
+// Used in the HistoryDialog.
+class HistoryTreeModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+
+public:
+ HistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent = 0);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ int columnCount(const QModelIndex &parent) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index= QModelIndex()) const;
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+ void setSourceModel(QAbstractItemModel *sourceModel);
+
+private slots:
+ void sourceReset();
+ void sourceRowsInserted(const QModelIndex &parent, int start, int end);
+ void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
+
+private:
+ int sourceDateRow(int row) const;
+ mutable QList<int> m_sourceRowCache;
+
+};
+
+// A modified QSortFilterProxyModel that always accepts the root nodes in the tree
+// so filtering is only done on the children.
+// Used in the HistoryDialog
+class TreeProxyModel : public QSortFilterProxyModel
+{
+ Q_OBJECT
+
+public:
+ TreeProxyModel(QObject *parent = 0);
+
+protected:
+ bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
+};
+
+#include "ui_history.h"
+
+class HistoryDialog : public QDialog, public Ui_HistoryDialog
+{
+ Q_OBJECT
+
+signals:
+ void openUrl(const QUrl &url);
+
+public:
+ HistoryDialog(QWidget *parent = 0, HistoryManager *history = 0);
+
+private slots:
+ void customContextMenuRequested(const QPoint &pos);
+ void open();
+ void copy();
+
+};
+
+#endif // HISTORY_H
+
diff --git a/demos/browser/history.ui b/demos/browser/history.ui
new file mode 100644
index 0000000..0944940
--- /dev/null
+++ b/demos/browser/history.ui
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>HistoryDialog</class>
+ <widget class="QDialog" name="HistoryDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>758</width>
+ <height>450</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>History</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>252</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <widget class="SearchLineEdit" name="search" />
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="EditTreeView" name="tree" />
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="removeButton" >
+ <property name="text" >
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="removeAllButton" >
+ <property name="text" >
+ <string>Remove &amp;All</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>SearchLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>searchlineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>EditTreeView</class>
+ <extends>QTreeView</extends>
+ <header>edittreeview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>HistoryDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>472</x>
+ <y>329</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>461</x>
+ <y>356</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/htmls/htmls.qrc b/demos/browser/htmls/htmls.qrc
new file mode 100644
index 0000000..03b256c
--- /dev/null
+++ b/demos/browser/htmls/htmls.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>notfound.html</file>
+</qresource>
+</RCC>
diff --git a/demos/browser/htmls/notfound.html b/demos/browser/htmls/notfound.html
new file mode 100644
index 0000000..b04a9f8
--- /dev/null
+++ b/demos/browser/htmls/notfound.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+<title>%1</title>
+<style>
+body {
+ padding: 3em 0em;
+ background: #eeeeee;
+}
+hr {
+ color: lightgray;
+ width: 100%;
+}
+img {
+ float: left;
+ opacity: .8;
+}
+#box {
+ background: white;
+ border: 1px solid lightgray;
+ width: 600px;
+ padding: 60px;
+ margin: auto;
+}
+h1 {
+ font-size: 130%;
+ font-weight: bold;
+ border-bottom: 1px solid lightgray;
+ margin-left: 48px;
+}
+h2 {
+ font-size: 100%;
+ font-weight: normal;
+ border-bottom: 1px solid lightgray;
+ margin-left: 48px;
+}
+ul {
+ font-size: 80%;
+ padding-left: 48px;
+ margin: 0;
+}
+#reloadButton {
+ padding-left: 48px;
+}
+</style>
+</head>
+<body>
+ <div id="box">
+ <img src="data:image/png;base64,IMAGE_BINARY_DATA_HERE" width="32" height="32"/>
+ <h1>%2</h1>
+ <h2>When connecting to: %3.</h2>
+ <ul>
+ <li>Check the address for errors such as <b>ww</b>.trolltech.com
+ instead of <b>www</b>.trolltech.com</li>
+ <li>If the address is correct, try checking the network
+ connection.</li>
+ <li>If your computer or network is protected by a firewall or
+ proxy, make sure that the browser demo is permitted to access
+ the network.</li>
+ </ul>
+ <br/><br/>
+ </div>
+</body>
+</html>
diff --git a/demos/browser/main.cpp b/demos/browser/main.cpp
new file mode 100644
index 0000000..a59b2fb
--- /dev/null
+++ b/demos/browser/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browserapplication.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(data);
+ BrowserApplication application(argc, argv);
+ if (!application.isTheOnlyBrowser())
+ return 0;
+ application.newMainWindow();
+ return application.exec();
+}
+
diff --git a/demos/browser/modelmenu.cpp b/demos/browser/modelmenu.cpp
new file mode 100644
index 0000000..9403ef1
--- /dev/null
+++ b/demos/browser/modelmenu.cpp
@@ -0,0 +1,227 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "modelmenu.h"
+
+#include <QtCore/QAbstractItemModel>
+#include <qdebug.h>
+
+ModelMenu::ModelMenu(QWidget * parent)
+ : QMenu(parent)
+ , m_maxRows(7)
+ , m_firstSeparator(-1)
+ , m_maxWidth(-1)
+ , m_hoverRole(0)
+ , m_separatorRole(0)
+ , m_model(0)
+{
+ connect(this, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
+}
+
+bool ModelMenu::prePopulated()
+{
+ return false;
+}
+
+void ModelMenu::postPopulated()
+{
+}
+
+void ModelMenu::setModel(QAbstractItemModel *model)
+{
+ m_model = model;
+}
+
+QAbstractItemModel *ModelMenu::model() const
+{
+ return m_model;
+}
+
+void ModelMenu::setMaxRows(int max)
+{
+ m_maxRows = max;
+}
+
+int ModelMenu::maxRows() const
+{
+ return m_maxRows;
+}
+
+void ModelMenu::setFirstSeparator(int offset)
+{
+ m_firstSeparator = offset;
+}
+
+int ModelMenu::firstSeparator() const
+{
+ return m_firstSeparator;
+}
+
+void ModelMenu::setRootIndex(const QModelIndex &index)
+{
+ m_root = index;
+}
+
+QModelIndex ModelMenu::rootIndex() const
+{
+ return m_root;
+}
+
+void ModelMenu::setHoverRole(int role)
+{
+ m_hoverRole = role;
+}
+
+int ModelMenu::hoverRole() const
+{
+ return m_hoverRole;
+}
+
+void ModelMenu::setSeparatorRole(int role)
+{
+ m_separatorRole = role;
+}
+
+int ModelMenu::separatorRole() const
+{
+ return m_separatorRole;
+}
+
+Q_DECLARE_METATYPE(QModelIndex)
+void ModelMenu::aboutToShow()
+{
+ if (QMenu *menu = qobject_cast<QMenu*>(sender())) {
+ QVariant v = menu->menuAction()->data();
+ if (v.canConvert<QModelIndex>()) {
+ QModelIndex idx = qvariant_cast<QModelIndex>(v);
+ createMenu(idx, -1, menu, menu);
+ disconnect(menu, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
+ return;
+ }
+ }
+
+ clear();
+ if (prePopulated())
+ addSeparator();
+ int max = m_maxRows;
+ if (max != -1)
+ max += m_firstSeparator;
+ createMenu(m_root, max, this, this);
+ postPopulated();
+}
+
+void ModelMenu::createMenu(const QModelIndex &parent, int max, QMenu *parentMenu, QMenu *menu)
+{
+ if (!menu) {
+ QString title = parent.data().toString();
+ menu = new QMenu(title, this);
+ QIcon icon = qvariant_cast<QIcon>(parent.data(Qt::DecorationRole));
+ menu->setIcon(icon);
+ parentMenu->addMenu(menu);
+ QVariant v;
+ v.setValue(parent);
+ menu->menuAction()->setData(v);
+ connect(menu, SIGNAL(aboutToShow()), this, SLOT(aboutToShow()));
+ return;
+ }
+
+ int end = m_model->rowCount(parent);
+ if (max != -1)
+ end = qMin(max, end);
+
+ connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(triggered(QAction*)));
+ connect(menu, SIGNAL(hovered(QAction*)), this, SLOT(hovered(QAction*)));
+
+ for (int i = 0; i < end; ++i) {
+ QModelIndex idx = m_model->index(i, 0, parent);
+ if (m_model->hasChildren(idx)) {
+ createMenu(idx, -1, menu);
+ } else {
+ if (m_separatorRole != 0
+ && idx.data(m_separatorRole).toBool())
+ addSeparator();
+ else
+ menu->addAction(makeAction(idx));
+ }
+ if (menu == this && i == m_firstSeparator - 1)
+ addSeparator();
+ }
+}
+
+QAction *ModelMenu::makeAction(const QModelIndex &index)
+{
+ QIcon icon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
+ QAction *action = makeAction(icon, index.data().toString(), this);
+ QVariant v;
+ v.setValue(index);
+ action->setData(v);
+ return action;
+}
+
+QAction *ModelMenu::makeAction(const QIcon &icon, const QString &text, QObject *parent)
+{
+ QFontMetrics fm(font());
+ if (-1 == m_maxWidth)
+ m_maxWidth = fm.width(QLatin1Char('m')) * 30;
+ QString smallText = fm.elidedText(text, Qt::ElideMiddle, m_maxWidth);
+ return new QAction(icon, smallText, parent);
+}
+
+void ModelMenu::triggered(QAction *action)
+{
+ QVariant v = action->data();
+ if (v.canConvert<QModelIndex>()) {
+ QModelIndex idx = qvariant_cast<QModelIndex>(v);
+ emit activated(idx);
+ }
+}
+
+void ModelMenu::hovered(QAction *action)
+{
+ QVariant v = action->data();
+ if (v.canConvert<QModelIndex>()) {
+ QModelIndex idx = qvariant_cast<QModelIndex>(v);
+ QString hoveredString = idx.data(m_hoverRole).toString();
+ if (!hoveredString.isEmpty())
+ emit hovered(hoveredString);
+ }
+}
+
diff --git a/demos/browser/modelmenu.h b/demos/browser/modelmenu.h
new file mode 100644
index 0000000..edd2e04
--- /dev/null
+++ b/demos/browser/modelmenu.h
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODELMENU_H
+#define MODELMENU_H
+
+#include <QtGui/QMenu>
+#include <QtCore/QAbstractItemModel>
+
+// A QMenu that is dynamically populated from a QAbstractItemModel
+class ModelMenu : public QMenu
+{
+ Q_OBJECT
+
+signals:
+ void activated(const QModelIndex &index);
+ void hovered(const QString &text);
+
+public:
+ ModelMenu(QWidget *parent = 0);
+
+ void setModel(QAbstractItemModel *model);
+ QAbstractItemModel *model() const;
+
+ void setMaxRows(int max);
+ int maxRows() const;
+
+ void setFirstSeparator(int offset);
+ int firstSeparator() const;
+
+ void setRootIndex(const QModelIndex &index);
+ QModelIndex rootIndex() const;
+
+ void setHoverRole(int role);
+ int hoverRole() const;
+
+ void setSeparatorRole(int role);
+ int separatorRole() const;
+
+ QAction *makeAction(const QIcon &icon, const QString &text, QObject *parent);
+
+protected:
+ // add any actions before the tree, return true if any actions are added.
+ virtual bool prePopulated();
+ // add any actions after the tree
+ virtual void postPopulated();
+ // put all of the children of parent into menu up to max
+ void createMenu(const QModelIndex &parent, int max, QMenu *parentMenu = 0, QMenu *menu = 0);
+
+private slots:
+ void aboutToShow();
+ void triggered(QAction *action);
+ void hovered(QAction *action);
+
+private:
+ QAction *makeAction(const QModelIndex &index);
+ int m_maxRows;
+ int m_firstSeparator;
+ int m_maxWidth;
+ int m_hoverRole;
+ int m_separatorRole;
+ QAbstractItemModel *m_model;
+ QPersistentModelIndex m_root;
+};
+
+#endif // MODELMENU_H
+
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp
new file mode 100644
index 0000000..2e7b2fd
--- /dev/null
+++ b/demos/browser/networkaccessmanager.cpp
@@ -0,0 +1,171 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "networkaccessmanager.h"
+
+#include "browserapplication.h"
+#include "browsermainwindow.h"
+#include "ui_passworddialog.h"
+#include "ui_proxy.h"
+
+#include <QtCore/QSettings>
+
+#include <QtGui/QDesktopServices>
+#include <QtGui/QDialog>
+#include <QtGui/QMessageBox>
+#include <QtGui/QStyle>
+#include <QtGui/QTextDocument>
+
+#include <QtNetwork/QAuthenticator>
+#include <QtNetwork/QNetworkDiskCache>
+#include <QtNetwork/QNetworkProxy>
+#include <QtNetwork/QNetworkReply>
+#include <QtNetwork/QSslError>
+
+NetworkAccessManager::NetworkAccessManager(QObject *parent)
+ : QNetworkAccessManager(parent)
+{
+ connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
+ SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+ connect(this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)),
+ SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
+#ifndef QT_NO_OPENSSL
+ connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
+ SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
+#endif
+ loadSettings();
+
+ QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);
+ QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
+ diskCache->setCacheDirectory(location);
+ setCache(diskCache);
+}
+
+void NetworkAccessManager::loadSettings()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("proxy"));
+ QNetworkProxy proxy;
+ if (settings.value(QLatin1String("enabled"), false).toBool()) {
+ if (settings.value(QLatin1String("type"), 0).toInt() == 0)
+ proxy = QNetworkProxy::Socks5Proxy;
+ else
+ proxy = QNetworkProxy::HttpProxy;
+ proxy.setHostName(settings.value(QLatin1String("hostName")).toString());
+ proxy.setPort(settings.value(QLatin1String("port"), 1080).toInt());
+ proxy.setUser(settings.value(QLatin1String("userName")).toString());
+ proxy.setPassword(settings.value(QLatin1String("password")).toString());
+ }
+ setProxy(proxy);
+}
+
+void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthenticator *auth)
+{
+ BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+
+ QDialog dialog(mainWindow);
+ dialog.setWindowFlags(Qt::Sheet);
+
+ Ui::PasswordDialog passwordDialog;
+ passwordDialog.setupUi(&dialog);
+
+ passwordDialog.iconLabel->setText(QString());
+ passwordDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
+
+ QString introMessage = tr("<qt>Enter username and password for \"%1\" at %2</qt>");
+ introMessage = introMessage.arg(Qt::escape(reply->url().toString())).arg(Qt::escape(reply->url().toString()));
+ passwordDialog.introLabel->setText(introMessage);
+ passwordDialog.introLabel->setWordWrap(true);
+
+ if (dialog.exec() == QDialog::Accepted) {
+ auth->setUser(passwordDialog.userNameLineEdit->text());
+ auth->setPassword(passwordDialog.passwordLineEdit->text());
+ }
+}
+
+void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
+{
+ BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+
+ QDialog dialog(mainWindow);
+ dialog.setWindowFlags(Qt::Sheet);
+
+ Ui::ProxyDialog proxyDialog;
+ proxyDialog.setupUi(&dialog);
+
+ proxyDialog.iconLabel->setText(QString());
+ proxyDialog.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
+
+ QString introMessage = tr("<qt>Connect to proxy \"%1\" using:</qt>");
+ introMessage = introMessage.arg(Qt::escape(proxy.hostName()));
+ proxyDialog.introLabel->setText(introMessage);
+ proxyDialog.introLabel->setWordWrap(true);
+
+ if (dialog.exec() == QDialog::Accepted) {
+ auth->setUser(proxyDialog.userNameLineEdit->text());
+ auth->setPassword(proxyDialog.passwordLineEdit->text());
+ }
+}
+
+#ifndef QT_NO_OPENSSL
+void NetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError> &error)
+{
+ // check if SSL certificate has been trusted already
+ QString replyHost = reply->url().host() + ":" + reply->url().port();
+ if(! sslTrustedHostList.contains(replyHost)) {
+ BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+
+ QStringList errorStrings;
+ for (int i = 0; i < error.count(); ++i)
+ errorStrings += error.at(i).errorString();
+ QString errors = errorStrings.join(QLatin1String("\n"));
+ int ret = QMessageBox::warning(mainWindow, QCoreApplication::applicationName(),
+ tr("SSL Errors:\n\n%1\n\n%2\n\n"
+ "Do you want to ignore these errors for this host?").arg(reply->url().toString()).arg(errors),
+ QMessageBox::Yes | QMessageBox::No,
+ QMessageBox::No);
+ if (ret == QMessageBox::Yes) {
+ reply->ignoreSslErrors();
+ sslTrustedHostList.append(replyHost);
+ }
+ }
+}
+#endif
diff --git a/demos/browser/networkaccessmanager.h b/demos/browser/networkaccessmanager.h
new file mode 100644
index 0000000..d016e76
--- /dev/null
+++ b/demos/browser/networkaccessmanager.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NETWORKACCESSMANAGER_H
+#define NETWORKACCESSMANAGER_H
+
+#include <QtNetwork/QNetworkAccessManager>
+
+class NetworkAccessManager : public QNetworkAccessManager
+{
+ Q_OBJECT
+
+public:
+ NetworkAccessManager(QObject *parent = 0);
+
+private:
+ QList<QString> sslTrustedHostList;
+
+public slots:
+ void loadSettings();
+
+private slots:
+ void authenticationRequired(QNetworkReply *reply, QAuthenticator *auth);
+ void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth);
+#ifndef QT_NO_OPENSSL
+ void sslErrors(QNetworkReply *reply, const QList<QSslError> &error);
+#endif
+};
+
+#endif // NETWORKACCESSMANAGER_H
diff --git a/demos/browser/passworddialog.ui b/demos/browser/passworddialog.ui
new file mode 100644
index 0000000..7c16658
--- /dev/null
+++ b/demos/browser/passworddialog.ui
@@ -0,0 +1,111 @@
+<ui version="4.0" >
+ <class>PasswordDialog</class>
+ <widget class="QDialog" name="PasswordDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>399</width>
+ <height>148</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Authentication Required</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="iconLabel" >
+ <property name="text" >
+ <string>DUMMY ICON</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="introLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>INTRO TEXT DUMMY</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Username:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="userNameLineEdit" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="lblPassword" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="passwordLineEdit" >
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>PasswordDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>PasswordDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/proxy.ui b/demos/browser/proxy.ui
new file mode 100644
index 0000000..62a8be6
--- /dev/null
+++ b/demos/browser/proxy.ui
@@ -0,0 +1,104 @@
+<ui version="4.0" >
+ <class>ProxyDialog</class>
+ <widget class="QDialog" name="ProxyDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>369</width>
+ <height>144</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Proxy Authentication</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="iconLabel" >
+ <property name="text" >
+ <string>ICON</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QLabel" name="introLabel" >
+ <property name="text" >
+ <string>Connect to proxy</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="QLabel" name="usernameLabel" >
+ <property name="text" >
+ <string>Username:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QLineEdit" name="userNameLineEdit" />
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="QLabel" name="passwordLabel" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <widget class="QLineEdit" name="passwordLineEdit" >
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="3" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ProxyDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ProxyDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/searchlineedit.cpp b/demos/browser/searchlineedit.cpp
new file mode 100644
index 0000000..8f668e0
--- /dev/null
+++ b/demos/browser/searchlineedit.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "searchlineedit.h"
+
+#include <QtGui/QPainter>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QMenu>
+#include <QtGui/QStyle>
+#include <QtGui/QStyleOptionFrameV2>
+
+ClearButton::ClearButton(QWidget *parent)
+ : QAbstractButton(parent)
+{
+ setCursor(Qt::ArrowCursor);
+ setToolTip(tr("Clear"));
+ setVisible(false);
+ setFocusPolicy(Qt::NoFocus);
+}
+
+void ClearButton::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event);
+ QPainter painter(this);
+ int height = this->height();
+
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ QColor color = palette().color(QPalette::Mid);
+ painter.setBrush(isDown()
+ ? palette().color(QPalette::Dark)
+ : palette().color(QPalette::Mid));
+ painter.setPen(painter.brush().color());
+ int size = width();
+ int offset = size / 5;
+ int radius = size - offset * 2;
+ painter.drawEllipse(offset, offset, radius, radius);
+
+ painter.setPen(palette().color(QPalette::Base));
+ int border = offset * 2;
+ painter.drawLine(border, border, width() - border, height - border);
+ painter.drawLine(border, height - border, width() - border, border);
+}
+
+void ClearButton::textChanged(const QString &text)
+{
+ setVisible(!text.isEmpty());
+}
+
+/*
+ Search icon on the left hand side of the search widget
+ When a menu is set a down arrow appears
+ */
+class SearchButton : public QAbstractButton {
+public:
+ SearchButton(QWidget *parent = 0);
+ void paintEvent(QPaintEvent *event);
+ QMenu *m_menu;
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+};
+
+SearchButton::SearchButton(QWidget *parent)
+ : QAbstractButton(parent),
+ m_menu(0)
+{
+ setObjectName(QLatin1String("SearchButton"));
+ setCursor(Qt::ArrowCursor);
+ setFocusPolicy(Qt::NoFocus);
+}
+
+void SearchButton::mousePressEvent(QMouseEvent *event)
+{
+ if (m_menu && event->button() == Qt::LeftButton) {
+ QWidget *p = parentWidget();
+ if (p) {
+ QPoint r = p->mapToGlobal(QPoint(0, p->height()));
+ m_menu->exec(QPoint(r.x() + height() / 2, r.y()));
+ }
+ event->accept();
+ }
+ QAbstractButton::mousePressEvent(event);
+}
+
+void SearchButton::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event);
+ QPainterPath myPath;
+
+ int radius = (height() / 5) * 2;
+ QRect circle(height() / 3 - 1, height() / 4, radius, radius);
+ myPath.addEllipse(circle);
+
+ myPath.arcMoveTo(circle, 300);
+ QPointF c = myPath.currentPosition();
+ int diff = height() / 7;
+ myPath.lineTo(qMin(width() - 2, (int)c.x() + diff), c.y() + diff);
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.setPen(QPen(Qt::darkGray, 2));
+ painter.drawPath(myPath);
+
+ if (m_menu) {
+ QPainterPath dropPath;
+ dropPath.arcMoveTo(circle, 320);
+ QPointF c = dropPath.currentPosition();
+ c = QPointF(c.x() + 3.5, c.y() + 0.5);
+ dropPath.moveTo(c);
+ dropPath.lineTo(c.x() + 4, c.y());
+ dropPath.lineTo(c.x() + 2, c.y() + 2);
+ dropPath.closeSubpath();
+ painter.setPen(Qt::darkGray);
+ painter.setBrush(Qt::darkGray);
+ painter.setRenderHint(QPainter::Antialiasing, false);
+ painter.drawPath(dropPath);
+ }
+ painter.end();
+}
+
+/*
+ SearchLineEdit is an enhanced QLineEdit
+ - A Search icon on the left with optional menu
+ - When there is no text and doesn't have focus an "inactive text" is displayed
+ - When there is text a clear button is displayed on the right hand side
+ */
+SearchLineEdit::SearchLineEdit(QWidget *parent) : ExLineEdit(parent),
+ m_searchButton(new SearchButton(this))
+{
+ connect(lineEdit(), SIGNAL(textChanged(const QString &)),
+ this, SIGNAL(textChanged(const QString &)));
+ setLeftWidget(m_searchButton);
+ m_inactiveText = tr("Search");
+
+ QSizePolicy policy = sizePolicy();
+ setSizePolicy(QSizePolicy::Preferred, policy.verticalPolicy());
+}
+
+void SearchLineEdit::paintEvent(QPaintEvent *event)
+{
+ if (lineEdit()->text().isEmpty() && !hasFocus() && !m_inactiveText.isEmpty()) {
+ ExLineEdit::paintEvent(event);
+ QStyleOptionFrameV2 panel;
+ initStyleOption(&panel);
+ QRect r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
+ QFontMetrics fm = fontMetrics();
+ int horizontalMargin = lineEdit()->x();
+ QRect lineRect(horizontalMargin + r.x(), r.y() + (r.height() - fm.height() + 1) / 2,
+ r.width() - 2 * horizontalMargin, fm.height());
+ QPainter painter(this);
+ painter.setPen(palette().brush(QPalette::Disabled, QPalette::Text).color());
+ painter.drawText(lineRect, Qt::AlignLeft|Qt::AlignVCenter, m_inactiveText);
+ } else {
+ ExLineEdit::paintEvent(event);
+ }
+}
+
+void SearchLineEdit::resizeEvent(QResizeEvent *event)
+{
+ updateGeometries();
+ ExLineEdit::resizeEvent(event);
+}
+
+void SearchLineEdit::updateGeometries()
+{
+ int menuHeight = height();
+ int menuWidth = menuHeight + 1;
+ if (!m_searchButton->m_menu)
+ menuWidth = (menuHeight / 5) * 4;
+ m_searchButton->resize(QSize(menuWidth, menuHeight));
+}
+
+QString SearchLineEdit::inactiveText() const
+{
+ return m_inactiveText;
+}
+
+void SearchLineEdit::setInactiveText(const QString &text)
+{
+ m_inactiveText = text;
+}
+
+void SearchLineEdit::setMenu(QMenu *menu)
+{
+ if (m_searchButton->m_menu)
+ m_searchButton->m_menu->deleteLater();
+ m_searchButton->m_menu = menu;
+ updateGeometries();
+}
+
+QMenu *SearchLineEdit::menu() const
+{
+ if (!m_searchButton->m_menu) {
+ m_searchButton->m_menu = new QMenu(m_searchButton);
+ if (isVisible())
+ (const_cast<SearchLineEdit*>(this))->updateGeometries();
+ }
+ return m_searchButton->m_menu;
+}
+
diff --git a/demos/browser/searchlineedit.h b/demos/browser/searchlineedit.h
new file mode 100644
index 0000000..be17e05
--- /dev/null
+++ b/demos/browser/searchlineedit.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SEARCHLINEEDIT_H
+#define SEARCHLINEEDIT_H
+
+#include "urllineedit.h"
+
+#include <QtGui/QLineEdit>
+#include <QtGui/QAbstractButton>
+
+QT_BEGIN_NAMESPACE
+class QMenu;
+QT_END_NAMESPACE
+
+class SearchButton;
+
+/*
+ Clear button on the right hand side of the search widget.
+ Hidden by default
+ "A circle with an X in it"
+ */
+class ClearButton : public QAbstractButton
+{
+ Q_OBJECT
+
+public:
+ ClearButton(QWidget *parent = 0);
+ void paintEvent(QPaintEvent *event);
+
+public slots:
+ void textChanged(const QString &text);
+};
+
+
+class SearchLineEdit : public ExLineEdit
+{
+ Q_OBJECT
+ Q_PROPERTY(QString inactiveText READ inactiveText WRITE setInactiveText)
+
+signals:
+ void textChanged(const QString &text);
+
+public:
+ SearchLineEdit(QWidget *parent = 0);
+
+ QString inactiveText() const;
+ void setInactiveText(const QString &text);
+
+ QMenu *menu() const;
+ void setMenu(QMenu *menu);
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ void updateGeometries();
+
+ SearchButton *m_searchButton;
+ QString m_inactiveText;
+};
+
+#endif // SEARCHLINEEDIT_H
+
diff --git a/demos/browser/settings.cpp b/demos/browser/settings.cpp
new file mode 100644
index 0000000..09f4846
--- /dev/null
+++ b/demos/browser/settings.cpp
@@ -0,0 +1,324 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "settings.h"
+
+#include "browserapplication.h"
+#include "browsermainwindow.h"
+#include "cookiejar.h"
+#include "history.h"
+#include "networkaccessmanager.h"
+#include "webview.h"
+
+#include <QtCore/QSettings>
+#include <QtGui/QtGui>
+#include <QtWebKit/QtWebKit>
+
+SettingsDialog::SettingsDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ connect(exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
+ connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
+ connect(cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
+ connect(standardFontButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
+ connect(fixedFontButton, SIGNAL(clicked()), this, SLOT(chooseFixedFont()));
+
+ loadDefaults();
+ loadFromSettings();
+}
+
+void SettingsDialog::loadDefaults()
+{
+ QWebSettings *defaultSettings = QWebSettings::globalSettings();
+ QString standardFontFamily = defaultSettings->fontFamily(QWebSettings::StandardFont);
+ int standardFontSize = defaultSettings->fontSize(QWebSettings::DefaultFontSize);
+ standardFont = QFont(standardFontFamily, standardFontSize);
+ standardLabel->setText(QString(QLatin1String("%1 %2")).arg(standardFont.family()).arg(standardFont.pointSize()));
+
+ QString fixedFontFamily = defaultSettings->fontFamily(QWebSettings::FixedFont);
+ int fixedFontSize = defaultSettings->fontSize(QWebSettings::DefaultFixedFontSize);
+ fixedFont = QFont(fixedFontFamily, fixedFontSize);
+ fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(fixedFont.family()).arg(fixedFont.pointSize()));
+
+ downloadsLocation->setText(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation));
+
+ enableJavascript->setChecked(defaultSettings->testAttribute(QWebSettings::JavascriptEnabled));
+ enablePlugins->setChecked(defaultSettings->testAttribute(QWebSettings::PluginsEnabled));
+}
+
+void SettingsDialog::loadFromSettings()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("MainWindow"));
+ QString defaultHome = QLatin1String("http://qtsoftware.com");
+ homeLineEdit->setText(settings.value(QLatin1String("home"), defaultHome).toString());
+ settings.endGroup();
+
+ settings.beginGroup(QLatin1String("history"));
+ int historyExpire = settings.value(QLatin1String("historyExpire")).toInt();
+ int idx = 0;
+ switch (historyExpire) {
+ case 1: idx = 0; break;
+ case 7: idx = 1; break;
+ case 14: idx = 2; break;
+ case 30: idx = 3; break;
+ case 365: idx = 4; break;
+ case -1: idx = 5; break;
+ default:
+ idx = 5;
+ }
+ expireHistory->setCurrentIndex(idx);
+ settings.endGroup();
+
+ settings.beginGroup(QLatin1String("downloadmanager"));
+ QString downloadDirectory = settings.value(QLatin1String("downloadDirectory"), downloadsLocation->text()).toString();
+ downloadsLocation->setText(downloadDirectory);
+ settings.endGroup();
+
+ settings.beginGroup(QLatin1String("general"));
+ openLinksIn->setCurrentIndex(settings.value(QLatin1String("openLinksIn"), openLinksIn->currentIndex()).toInt());
+
+ settings.endGroup();
+
+ // Appearance
+ settings.beginGroup(QLatin1String("websettings"));
+ fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
+ standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
+
+ standardLabel->setText(QString(QLatin1String("%1 %2")).arg(standardFont.family()).arg(standardFont.pointSize()));
+ fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(fixedFont.family()).arg(fixedFont.pointSize()));
+
+ enableJavascript->setChecked(settings.value(QLatin1String("enableJavascript"), enableJavascript->isChecked()).toBool());
+ enablePlugins->setChecked(settings.value(QLatin1String("enablePlugins"), enablePlugins->isChecked()).toBool());
+ userStyleSheet->setText(settings.value(QLatin1String("userStyleSheet")).toUrl().toString());
+ settings.endGroup();
+
+ // Privacy
+ settings.beginGroup(QLatin1String("cookies"));
+
+ CookieJar *jar = BrowserApplication::cookieJar();
+ QByteArray value = settings.value(QLatin1String("acceptCookies"), QLatin1String("AcceptOnlyFromSitesNavigatedTo")).toByteArray();
+ QMetaEnum acceptPolicyEnum = jar->staticMetaObject.enumerator(jar->staticMetaObject.indexOfEnumerator("AcceptPolicy"));
+ CookieJar::AcceptPolicy acceptCookies = acceptPolicyEnum.keyToValue(value) == -1 ?
+ CookieJar::AcceptOnlyFromSitesNavigatedTo :
+ static_cast<CookieJar::AcceptPolicy>(acceptPolicyEnum.keyToValue(value));
+ switch(acceptCookies) {
+ case CookieJar::AcceptAlways:
+ acceptCombo->setCurrentIndex(0);
+ break;
+ case CookieJar::AcceptNever:
+ acceptCombo->setCurrentIndex(1);
+ break;
+ case CookieJar::AcceptOnlyFromSitesNavigatedTo:
+ acceptCombo->setCurrentIndex(2);
+ break;
+ }
+
+ value = settings.value(QLatin1String("keepCookiesUntil"), QLatin1String("Expire")).toByteArray();
+ QMetaEnum keepPolicyEnum = jar->staticMetaObject.enumerator(jar->staticMetaObject.indexOfEnumerator("KeepPolicy"));
+ CookieJar::KeepPolicy keepCookies = keepPolicyEnum.keyToValue(value) == -1 ?
+ CookieJar::KeepUntilExpire :
+ static_cast<CookieJar::KeepPolicy>(keepPolicyEnum.keyToValue(value));
+ switch(keepCookies) {
+ case CookieJar::KeepUntilExpire:
+ keepUntilCombo->setCurrentIndex(0);
+ break;
+ case CookieJar::KeepUntilExit:
+ keepUntilCombo->setCurrentIndex(1);
+ break;
+ case CookieJar::KeepUntilTimeLimit:
+ keepUntilCombo->setCurrentIndex(2);
+ break;
+ }
+ settings.endGroup();
+
+
+ // Proxy
+ settings.beginGroup(QLatin1String("proxy"));
+ proxySupport->setChecked(settings.value(QLatin1String("enabled"), false).toBool());
+ proxyType->setCurrentIndex(settings.value(QLatin1String("type"), 0).toInt());
+ proxyHostName->setText(settings.value(QLatin1String("hostName")).toString());
+ proxyPort->setValue(settings.value(QLatin1String("port"), 1080).toInt());
+ proxyUserName->setText(settings.value(QLatin1String("userName")).toString());
+ proxyPassword->setText(settings.value(QLatin1String("password")).toString());
+ settings.endGroup();
+}
+
+void SettingsDialog::saveToSettings()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("MainWindow"));
+ settings.setValue(QLatin1String("home"), homeLineEdit->text());
+ settings.endGroup();
+
+ settings.beginGroup(QLatin1String("general"));
+ settings.setValue(QLatin1String("openLinksIn"), openLinksIn->currentIndex());
+ settings.endGroup();
+
+ settings.beginGroup(QLatin1String("history"));
+ int historyExpire = expireHistory->currentIndex();
+ int idx = -1;
+ switch (historyExpire) {
+ case 0: idx = 1; break;
+ case 1: idx = 7; break;
+ case 2: idx = 14; break;
+ case 3: idx = 30; break;
+ case 4: idx = 365; break;
+ case 5: idx = -1; break;
+ }
+ settings.setValue(QLatin1String("historyExpire"), idx);
+ settings.endGroup();
+
+ // Appearance
+ settings.beginGroup(QLatin1String("websettings"));
+ settings.setValue(QLatin1String("fixedFont"), fixedFont);
+ settings.setValue(QLatin1String("standardFont"), standardFont);
+ settings.setValue(QLatin1String("enableJavascript"), enableJavascript->isChecked());
+ settings.setValue(QLatin1String("enablePlugins"), enablePlugins->isChecked());
+ QString userStyleSheetString = userStyleSheet->text();
+ if (QFile::exists(userStyleSheetString))
+ settings.setValue(QLatin1String("userStyleSheet"), QUrl::fromLocalFile(userStyleSheetString));
+ else
+ settings.setValue(QLatin1String("userStyleSheet"), QUrl(userStyleSheetString));
+ settings.endGroup();
+
+ //Privacy
+ settings.beginGroup(QLatin1String("cookies"));
+
+ CookieJar::KeepPolicy keepCookies;
+ switch(acceptCombo->currentIndex()) {
+ default:
+ case 0:
+ keepCookies = CookieJar::KeepUntilExpire;
+ break;
+ case 1:
+ keepCookies = CookieJar::KeepUntilExit;
+ break;
+ case 2:
+ keepCookies = CookieJar::KeepUntilTimeLimit;
+ break;
+ }
+ CookieJar *jar = BrowserApplication::cookieJar();
+ QMetaEnum acceptPolicyEnum = jar->staticMetaObject.enumerator(jar->staticMetaObject.indexOfEnumerator("AcceptPolicy"));
+ settings.setValue(QLatin1String("acceptCookies"), QLatin1String(acceptPolicyEnum.valueToKey(keepCookies)));
+
+ CookieJar::KeepPolicy keepPolicy;
+ switch(keepUntilCombo->currentIndex()) {
+ default:
+ case 0:
+ keepPolicy = CookieJar::KeepUntilExpire;
+ break;
+ case 1:
+ keepPolicy = CookieJar::KeepUntilExit;
+ break;
+ case 2:
+ keepPolicy = CookieJar::KeepUntilTimeLimit;
+ break;
+ }
+
+ QMetaEnum keepPolicyEnum = jar->staticMetaObject.enumerator(jar->staticMetaObject.indexOfEnumerator("KeepPolicy"));
+ settings.setValue(QLatin1String("keepCookiesUntil"), QLatin1String(keepPolicyEnum.valueToKey(keepPolicy)));
+
+ settings.endGroup();
+
+ // proxy
+ settings.beginGroup(QLatin1String("proxy"));
+ settings.setValue(QLatin1String("enabled"), proxySupport->isChecked());
+ settings.setValue(QLatin1String("type"), proxyType->currentIndex());
+ settings.setValue(QLatin1String("hostName"), proxyHostName->text());
+ settings.setValue(QLatin1String("port"), proxyPort->text());
+ settings.setValue(QLatin1String("userName"), proxyUserName->text());
+ settings.setValue(QLatin1String("password"), proxyPassword->text());
+ settings.endGroup();
+
+ BrowserApplication::instance()->loadSettings();
+ BrowserApplication::networkAccessManager()->loadSettings();
+ BrowserApplication::cookieJar()->loadSettings();
+ BrowserApplication::historyManager()->loadSettings();
+}
+
+void SettingsDialog::accept()
+{
+ saveToSettings();
+ QDialog::accept();
+}
+
+void SettingsDialog::showCookies()
+{
+ CookiesDialog *dialog = new CookiesDialog(BrowserApplication::cookieJar(), this);
+ dialog->exec();
+}
+
+void SettingsDialog::showExceptions()
+{
+ CookiesExceptionsDialog *dialog = new CookiesExceptionsDialog(BrowserApplication::cookieJar(), this);
+ dialog->exec();
+}
+
+void SettingsDialog::chooseFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, standardFont, this);
+ if ( ok ) {
+ standardFont = font;
+ standardLabel->setText(QString(QLatin1String("%1 %2")).arg(font.family()).arg(font.pointSize()));
+ }
+}
+
+void SettingsDialog::chooseFixedFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, fixedFont, this);
+ if ( ok ) {
+ fixedFont = font;
+ fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(font.family()).arg(font.pointSize()));
+ }
+}
+
+void SettingsDialog::setHomeToCurrentPage()
+{
+ BrowserMainWindow *mw = static_cast<BrowserMainWindow*>(parent());
+ WebView *webView = mw->currentTab();
+ if (webView)
+ homeLineEdit->setText(webView->url().toString());
+}
+
diff --git a/demos/browser/settings.h b/demos/browser/settings.h
new file mode 100644
index 0000000..a7a0a35
--- /dev/null
+++ b/demos/browser/settings.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SETTINGS_H
+#define SETTINGS_H
+
+#include <QtGui/QDialog>
+#include "ui_settings.h"
+
+class SettingsDialog : public QDialog, public Ui_Settings
+{
+ Q_OBJECT
+
+public:
+ SettingsDialog(QWidget *parent = 0);
+ void accept();
+
+private slots:
+ void loadDefaults();
+ void loadFromSettings();
+ void saveToSettings();
+
+ void setHomeToCurrentPage();
+ void showCookies();
+ void showExceptions();
+
+ void chooseFont();
+ void chooseFixedFont();
+
+private:
+ QFont standardFont;
+ QFont fixedFont;
+};
+
+#endif // SETTINGS_H
+
diff --git a/demos/browser/settings.ui b/demos/browser/settings.ui
new file mode 100644
index 0000000..3491ce0
--- /dev/null
+++ b/demos/browser/settings.ui
@@ -0,0 +1,614 @@
+<ui version="4.0" >
+ <class>Settings</class>
+ <widget class="QDialog" name="Settings" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>657</width>
+ <height>322</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Settings</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="2" column="0" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>627</width>
+ <height>243</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>General</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_4" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Home:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QLineEdit" name="homeLineEdit" />
+ </item>
+ <item row="1" column="1" >
+ <widget class="QPushButton" name="setHomeToCurrentPageButton" >
+ <property name="text" >
+ <string>Set to current page</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>280</width>
+ <height>18</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Remove history items:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <widget class="QComboBox" name="expireHistory" >
+ <item>
+ <property name="text" >
+ <string>After one day</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>After one week</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>After two weeks</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>After one month</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>After one year</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Manually</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>Save downloads to:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="2" >
+ <widget class="QLineEdit" name="downloadsLocation" />
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_8" >
+ <property name="text" >
+ <string>Open links from applications:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="2" >
+ <widget class="QComboBox" name="openLinksIn" >
+ <item>
+ <property name="text" >
+ <string>In a tab in the current window</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>In a new window</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>391</width>
+ <height>262</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_3" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>627</width>
+ <height>243</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Appearance</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_3" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Standard font:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="standardLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="text" >
+ <string>Times 16</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="standardFontButton" >
+ <property name="text" >
+ <string>Select...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Fixed-width font:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="fixedLabel" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="text" >
+ <string>Courier 13</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="fixedFontButton" >
+ <property name="text" >
+ <string>Select...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>93</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>627</width>
+ <height>243</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Privacy</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Web Content</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QCheckBox" name="enablePlugins" >
+ <property name="text" >
+ <string>Enable Plugins</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="enableJavascript" >
+ <property name="text" >
+ <string>Enable Javascript</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="cookiesGroupBox" >
+ <property name="title" >
+ <string>Cookies</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Accept Cookies:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="acceptCombo" >
+ <item>
+ <property name="text" >
+ <string>Always</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Never</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Only from sites you navigate to</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="exceptionsButton" >
+ <property name="text" >
+ <string>Exceptions...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Keep until:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="keepUntilCombo" >
+ <item>
+ <property name="text" >
+ <string>They expire</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>I exit the application</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>At most 90 days</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="cookiesButton" >
+ <property name="text" >
+ <string>Cookies...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>371</width>
+ <height>177</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_4" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>627</width>
+ <height>243</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Proxy</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QGroupBox" name="proxySupport" >
+ <property name="title" >
+ <string>Enable proxy</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_6" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Type:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QComboBox" name="proxyType" >
+ <item>
+ <property name="text" >
+ <string>Socks5</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Http</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Host:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2" >
+ <widget class="QLineEdit" name="proxyHostName" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_11" >
+ <property name="text" >
+ <string>Port:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="proxyPort" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="value" >
+ <number>1080</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" >
+ <spacer name="horizontalSpacer_2" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>293</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_12" >
+ <property name="text" >
+ <string>User Name:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="2" >
+ <widget class="QLineEdit" name="proxyUserName" />
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_13" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="2" >
+ <widget class="QLineEdit" name="proxyPassword" >
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <spacer name="verticalSpacer_2" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_5" >
+ <attribute name="title" >
+ <string>Advanced</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_2" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_14" >
+ <property name="text" >
+ <string>Style Sheet:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="userStyleSheet" />
+ </item>
+ <item row="1" column="1" >
+ <spacer name="verticalSpacer_3" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>176</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>Settings</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>Settings</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/browser/squeezelabel.cpp b/demos/browser/squeezelabel.cpp
new file mode 100644
index 0000000..3209e16
--- /dev/null
+++ b/demos/browser/squeezelabel.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "squeezelabel.h"
+
+SqueezeLabel::SqueezeLabel(QWidget *parent) : QLabel(parent)
+{
+}
+
+void SqueezeLabel::paintEvent(QPaintEvent *event)
+{
+ QFontMetrics fm = fontMetrics();
+ if (fm.width(text()) > contentsRect().width()) {
+ QString elided = fm.elidedText(text(), Qt::ElideMiddle, width());
+ QString oldText = text();
+ setText(elided);
+ QLabel::paintEvent(event);
+ setText(oldText);
+ } else {
+ QLabel::paintEvent(event);
+ }
+}
+
diff --git a/demos/browser/squeezelabel.h b/demos/browser/squeezelabel.h
new file mode 100644
index 0000000..2f82240
--- /dev/null
+++ b/demos/browser/squeezelabel.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SQUEEZELABEL_H
+#define SQUEEZELABEL_H
+
+#include <QtGui/QLabel>
+
+class SqueezeLabel : public QLabel
+{
+ Q_OBJECT
+
+public:
+ SqueezeLabel(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+};
+
+#endif // SQUEEZELABEL_H
+
diff --git a/demos/browser/tabwidget.cpp b/demos/browser/tabwidget.cpp
new file mode 100644
index 0000000..7a2ee40
--- /dev/null
+++ b/demos/browser/tabwidget.cpp
@@ -0,0 +1,830 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tabwidget.h"
+
+#include "browserapplication.h"
+#include "browsermainwindow.h"
+#include "history.h"
+#include "urllineedit.h"
+#include "webview.h"
+
+#include <QtGui/QClipboard>
+#include <QtGui/QCompleter>
+#include <QtGui/QListView>
+#include <QtGui/QMenu>
+#include <QtGui/QMessageBox>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QStackedWidget>
+#include <QtGui/QStyle>
+#include <QtGui/QToolButton>
+
+#include <QtCore/QDebug>
+
+TabBar::TabBar(QWidget *parent)
+ : QTabBar(parent)
+{
+ setContextMenuPolicy(Qt::CustomContextMenu);
+ setAcceptDrops(true);
+ connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
+ this, SLOT(contextMenuRequested(const QPoint &)));
+
+ QString alt = QLatin1String("Alt+%1");
+ for (int i = 1; i <= 10; ++i) {
+ int key = i;
+ if (key == 10)
+ key = 0;
+ QShortcut *shortCut = new QShortcut(alt.arg(key), this);
+ m_tabShortcuts.append(shortCut);
+ connect(shortCut, SIGNAL(activated()), this, SLOT(selectTabAction()));
+ }
+ setTabsClosable(true);
+ connect(this, SIGNAL(tabCloseRequested(int)),
+ this, SIGNAL(closeTab(int)));
+ setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
+ setMovable(true);
+}
+
+void TabBar::selectTabAction()
+{
+ if (QShortcut *shortCut = qobject_cast<QShortcut*>(sender())) {
+ int index = m_tabShortcuts.indexOf(shortCut);
+ if (index == 0)
+ index = 10;
+ setCurrentIndex(index);
+ }
+}
+
+void TabBar::contextMenuRequested(const QPoint &position)
+{
+ QMenu menu;
+ menu.addAction(tr("New &Tab"), this, SIGNAL(newTab()), QKeySequence::AddTab);
+ int index = tabAt(position);
+ if (-1 != index) {
+ QAction *action = menu.addAction(tr("Clone Tab"),
+ this, SLOT(cloneTab()));
+ action->setData(index);
+
+ menu.addSeparator();
+
+ action = menu.addAction(tr("&Close Tab"),
+ this, SLOT(closeTab()), QKeySequence::Close);
+ action->setData(index);
+
+ action = menu.addAction(tr("Close &Other Tabs"),
+ this, SLOT(closeOtherTabs()));
+ action->setData(index);
+
+ menu.addSeparator();
+
+ action = menu.addAction(tr("Reload Tab"),
+ this, SLOT(reloadTab()), QKeySequence::Refresh);
+ action->setData(index);
+ } else {
+ menu.addSeparator();
+ }
+ menu.addAction(tr("Reload All Tabs"), this, SIGNAL(reloadAllTabs()));
+ menu.exec(QCursor::pos());
+}
+
+void TabBar::cloneTab()
+{
+ if (QAction *action = qobject_cast<QAction*>(sender())) {
+ int index = action->data().toInt();
+ emit cloneTab(index);
+ }
+}
+
+void TabBar::closeTab()
+{
+ if (QAction *action = qobject_cast<QAction*>(sender())) {
+ int index = action->data().toInt();
+ emit closeTab(index);
+ }
+}
+
+void TabBar::closeOtherTabs()
+{
+ if (QAction *action = qobject_cast<QAction*>(sender())) {
+ int index = action->data().toInt();
+ emit closeOtherTabs(index);
+ }
+}
+
+void TabBar::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ m_dragStartPos = event->pos();
+ QTabBar::mousePressEvent(event);
+}
+
+void TabBar::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() == Qt::LeftButton) {
+ int diffX = event->pos().x() - m_dragStartPos.x();
+ int diffY = event->pos().y() - m_dragStartPos.y();
+ if ((event->pos() - m_dragStartPos).manhattanLength() > QApplication::startDragDistance()
+ && diffX < 3 && diffX > -3
+ && diffY < -10) {
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+ QList<QUrl> urls;
+ int index = tabAt(event->pos());
+ QUrl url = tabData(index).toUrl();
+ urls.append(url);
+ mimeData->setUrls(urls);
+ mimeData->setText(tabText(index));
+ mimeData->setData(QLatin1String("action"), "tab-reordering");
+ drag->setMimeData(mimeData);
+ drag->exec();
+ }
+ }
+ QTabBar::mouseMoveEvent(event);
+}
+
+// When index is -1 index chooses the current tab
+void TabWidget::reloadTab(int index)
+{
+ if (index < 0)
+ index = currentIndex();
+ if (index < 0 || index >= count())
+ return;
+
+ QWidget *widget = this->widget(index);
+ if (WebView *tab = qobject_cast<WebView*>(widget))
+ tab->reload();
+}
+
+void TabBar::reloadTab()
+{
+ if (QAction *action = qobject_cast<QAction*>(sender())) {
+ int index = action->data().toInt();
+ emit reloadTab(index);
+ }
+}
+
+TabWidget::TabWidget(QWidget *parent)
+ : QTabWidget(parent)
+ , m_recentlyClosedTabsAction(0)
+ , m_newTabAction(0)
+ , m_closeTabAction(0)
+ , m_nextTabAction(0)
+ , m_previousTabAction(0)
+ , m_recentlyClosedTabsMenu(0)
+ , m_lineEditCompleter(0)
+ , m_lineEdits(0)
+ , m_tabBar(new TabBar(this))
+{
+ setElideMode(Qt::ElideRight);
+
+ connect(m_tabBar, SIGNAL(newTab()), this, SLOT(newTab()));
+ connect(m_tabBar, SIGNAL(closeTab(int)), this, SLOT(closeTab(int)));
+ connect(m_tabBar, SIGNAL(cloneTab(int)), this, SLOT(cloneTab(int)));
+ connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(closeOtherTabs(int)));
+ connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(reloadTab(int)));
+ connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(reloadAllTabs()));
+ connect(m_tabBar, SIGNAL(tabMoved(int, int)), this, SLOT(moveTab(int, int)));
+ setTabBar(m_tabBar);
+ setDocumentMode(true);
+
+ // Actions
+ m_newTabAction = new QAction(QIcon(QLatin1String(":addtab.png")), tr("New &Tab"), this);
+ m_newTabAction->setShortcuts(QKeySequence::AddTab);
+ m_newTabAction->setIconVisibleInMenu(false);
+ connect(m_newTabAction, SIGNAL(triggered()), this, SLOT(newTab()));
+
+ m_closeTabAction = new QAction(QIcon(QLatin1String(":closetab.png")), tr("&Close Tab"), this);
+ m_closeTabAction->setShortcuts(QKeySequence::Close);
+ m_closeTabAction->setIconVisibleInMenu(false);
+ connect(m_closeTabAction, SIGNAL(triggered()), this, SLOT(closeTab()));
+
+ m_nextTabAction = new QAction(tr("Show Next Tab"), this);
+ QList<QKeySequence> shortcuts;
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BraceRight));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_PageDown));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BracketRight));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Less));
+ m_nextTabAction->setShortcuts(shortcuts);
+ connect(m_nextTabAction, SIGNAL(triggered()), this, SLOT(nextTab()));
+
+ m_previousTabAction = new QAction(tr("Show Previous Tab"), this);
+ shortcuts.clear();
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BraceLeft));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_PageUp));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BracketLeft));
+ shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_Greater));
+ m_previousTabAction->setShortcuts(shortcuts);
+ connect(m_previousTabAction, SIGNAL(triggered()), this, SLOT(previousTab()));
+
+ m_recentlyClosedTabsMenu = new QMenu(this);
+ connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()),
+ this, SLOT(aboutToShowRecentTabsMenu()));
+ connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)),
+ this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
+ m_recentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this);
+ m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
+ m_recentlyClosedTabsAction->setEnabled(false);
+
+ connect(this, SIGNAL(currentChanged(int)),
+ this, SLOT(currentChanged(int)));
+
+ m_lineEdits = new QStackedWidget(this);
+}
+
+void TabWidget::clear()
+{
+ // clear the recently closed tabs
+ m_recentlyClosedTabs.clear();
+ // clear the line edit history
+ for (int i = 0; i < m_lineEdits->count(); ++i) {
+ QLineEdit *qLineEdit = lineEdit(i);
+ qLineEdit->setText(qLineEdit->text());
+ }
+}
+
+void TabWidget::moveTab(int fromIndex, int toIndex)
+{
+ QWidget *lineEdit = m_lineEdits->widget(fromIndex);
+ m_lineEdits->removeWidget(lineEdit);
+ m_lineEdits->insertWidget(toIndex, lineEdit);
+}
+
+void TabWidget::addWebAction(QAction *action, QWebPage::WebAction webAction)
+{
+ if (!action)
+ return;
+ m_actions.append(new WebActionMapper(action, webAction, this));
+}
+
+void TabWidget::currentChanged(int index)
+{
+ WebView *webView = this->webView(index);
+ if (!webView)
+ return;
+
+ Q_ASSERT(m_lineEdits->count() == count());
+
+ WebView *oldWebView = this->webView(m_lineEdits->currentIndex());
+ if (oldWebView) {
+ disconnect(oldWebView, SIGNAL(statusBarMessage(const QString&)),
+ this, SIGNAL(showStatusBarMessage(const QString&)));
+ disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
+ this, SIGNAL(linkHovered(const QString&)));
+ disconnect(oldWebView, SIGNAL(loadProgress(int)),
+ this, SIGNAL(loadProgress(int)));
+ }
+
+ connect(webView, SIGNAL(statusBarMessage(const QString&)),
+ this, SIGNAL(showStatusBarMessage(const QString&)));
+ connect(webView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
+ this, SIGNAL(linkHovered(const QString&)));
+ connect(webView, SIGNAL(loadProgress(int)),
+ this, SIGNAL(loadProgress(int)));
+
+ for (int i = 0; i < m_actions.count(); ++i) {
+ WebActionMapper *mapper = m_actions[i];
+ mapper->updateCurrent(webView->page());
+ }
+ emit setCurrentTitle(webView->title());
+ m_lineEdits->setCurrentIndex(index);
+ emit loadProgress(webView->progress());
+ emit showStatusBarMessage(webView->lastStatusBarText());
+ if (webView->url().isEmpty())
+ m_lineEdits->currentWidget()->setFocus();
+ else
+ webView->setFocus();
+}
+
+QAction *TabWidget::newTabAction() const
+{
+ return m_newTabAction;
+}
+
+QAction *TabWidget::closeTabAction() const
+{
+ return m_closeTabAction;
+}
+
+QAction *TabWidget::recentlyClosedTabsAction() const
+{
+ return m_recentlyClosedTabsAction;
+}
+
+QAction *TabWidget::nextTabAction() const
+{
+ return m_nextTabAction;
+}
+
+QAction *TabWidget::previousTabAction() const
+{
+ return m_previousTabAction;
+}
+
+QWidget *TabWidget::lineEditStack() const
+{
+ return m_lineEdits;
+}
+
+QLineEdit *TabWidget::currentLineEdit() const
+{
+ return lineEdit(m_lineEdits->currentIndex());
+}
+
+WebView *TabWidget::currentWebView() const
+{
+ return webView(currentIndex());
+}
+
+QLineEdit *TabWidget::lineEdit(int index) const
+{
+ UrlLineEdit *urlLineEdit = qobject_cast<UrlLineEdit*>(m_lineEdits->widget(index));
+ if (urlLineEdit)
+ return urlLineEdit->lineEdit();
+ return 0;
+}
+
+WebView *TabWidget::webView(int index) const
+{
+ QWidget *widget = this->widget(index);
+ if (WebView *webView = qobject_cast<WebView*>(widget)) {
+ return webView;
+ } else {
+ // optimization to delay creating the first webview
+ if (count() == 1) {
+ TabWidget *that = const_cast<TabWidget*>(this);
+ that->setUpdatesEnabled(false);
+ that->newTab();
+ that->closeTab(0);
+ that->setUpdatesEnabled(true);
+ return currentWebView();
+ }
+ }
+ return 0;
+}
+
+int TabWidget::webViewIndex(WebView *webView) const
+{
+ int index = indexOf(webView);
+ return index;
+}
+
+WebView *TabWidget::newTab(bool makeCurrent)
+{
+ // line edit
+ UrlLineEdit *urlLineEdit = new UrlLineEdit;
+ QLineEdit *lineEdit = urlLineEdit->lineEdit();
+ if (!m_lineEditCompleter && count() > 0) {
+ HistoryCompletionModel *completionModel = new HistoryCompletionModel(this);
+ completionModel->setSourceModel(BrowserApplication::historyManager()->historyFilterModel());
+ m_lineEditCompleter = new QCompleter(completionModel, this);
+ // Should this be in Qt by default?
+ QAbstractItemView *popup = m_lineEditCompleter->popup();
+ QListView *listView = qobject_cast<QListView*>(popup);
+ if (listView)
+ listView->setUniformItemSizes(true);
+ }
+ lineEdit->setCompleter(m_lineEditCompleter);
+ connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(lineEditReturnPressed()));
+ m_lineEdits->addWidget(urlLineEdit);
+ m_lineEdits->setSizePolicy(lineEdit->sizePolicy());
+
+ // optimization to delay creating the more expensive WebView, history, etc
+ if (count() == 0) {
+ QWidget *emptyWidget = new QWidget;
+ QPalette p = emptyWidget->palette();
+ p.setColor(QPalette::Window, palette().color(QPalette::Base));
+ emptyWidget->setPalette(p);
+ emptyWidget->setAutoFillBackground(true);
+ disconnect(this, SIGNAL(currentChanged(int)),
+ this, SLOT(currentChanged(int)));
+ addTab(emptyWidget, tr("(Untitled)"));
+ connect(this, SIGNAL(currentChanged(int)),
+ this, SLOT(currentChanged(int)));
+ return 0;
+ }
+
+ // webview
+ WebView *webView = new WebView;
+ urlLineEdit->setWebView(webView);
+ connect(webView, SIGNAL(loadStarted()),
+ this, SLOT(webViewLoadStarted()));
+ connect(webView, SIGNAL(loadFinished(bool)),
+ this, SLOT(webViewIconChanged()));
+ connect(webView, SIGNAL(iconChanged()),
+ this, SLOT(webViewIconChanged()));
+ connect(webView, SIGNAL(titleChanged(const QString &)),
+ this, SLOT(webViewTitleChanged(const QString &)));
+ connect(webView, SIGNAL(urlChanged(const QUrl &)),
+ this, SLOT(webViewUrlChanged(const QUrl &)));
+ connect(webView->page(), SIGNAL(windowCloseRequested()),
+ this, SLOT(windowCloseRequested()));
+ connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)),
+ this, SIGNAL(geometryChangeRequested(const QRect &)));
+ connect(webView->page(), SIGNAL(printRequested(QWebFrame *)),
+ this, SIGNAL(printRequested(QWebFrame *)));
+ connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
+ this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
+ connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)),
+ this, SIGNAL(statusBarVisibilityChangeRequested(bool)));
+ connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)),
+ this, SIGNAL(toolBarVisibilityChangeRequested(bool)));
+ addTab(webView, tr("(Untitled)"));
+ if (makeCurrent)
+ setCurrentWidget(webView);
+
+ // webview actions
+ for (int i = 0; i < m_actions.count(); ++i) {
+ WebActionMapper *mapper = m_actions[i];
+ mapper->addChild(webView->page()->action(mapper->webAction()));
+ }
+
+ if (count() == 1)
+ currentChanged(currentIndex());
+ emit tabsChanged();
+ return webView;
+}
+
+void TabWidget::reloadAllTabs()
+{
+ for (int i = 0; i < count(); ++i) {
+ QWidget *tabWidget = widget(i);
+ if (WebView *tab = qobject_cast<WebView*>(tabWidget)) {
+ tab->reload();
+ }
+ }
+}
+
+void TabWidget::lineEditReturnPressed()
+{
+ if (QLineEdit *lineEdit = qobject_cast<QLineEdit*>(sender())) {
+ emit loadPage(lineEdit->text());
+ if (m_lineEdits->currentWidget() == lineEdit)
+ currentWebView()->setFocus();
+ }
+}
+
+void TabWidget::windowCloseRequested()
+{
+ WebPage *webPage = qobject_cast<WebPage*>(sender());
+ WebView *webView = qobject_cast<WebView*>(webPage->view());
+ int index = webViewIndex(webView);
+ if (index >= 0) {
+ if (count() == 1)
+ webView->webPage()->mainWindow()->close();
+ else
+ closeTab(index);
+ }
+}
+
+void TabWidget::closeOtherTabs(int index)
+{
+ if (-1 == index)
+ return;
+ for (int i = count() - 1; i > index; --i)
+ closeTab(i);
+ for (int i = index - 1; i >= 0; --i)
+ closeTab(i);
+}
+
+// When index is -1 index chooses the current tab
+void TabWidget::cloneTab(int index)
+{
+ if (index < 0)
+ index = currentIndex();
+ if (index < 0 || index >= count())
+ return;
+ WebView *tab = newTab(false);
+ tab->setUrl(webView(index)->url());
+}
+
+// When index is -1 index chooses the current tab
+void TabWidget::closeTab(int index)
+{
+ if (index < 0)
+ index = currentIndex();
+ if (index < 0 || index >= count())
+ return;
+
+ bool hasFocus = false;
+ if (WebView *tab = webView(index)) {
+ if (tab->isModified()) {
+ QMessageBox closeConfirmation(tab);
+ closeConfirmation.setWindowFlags(Qt::Sheet);
+ closeConfirmation.setWindowTitle(tr("Do you really want to close this page?"));
+ closeConfirmation.setInformativeText(tr("You have modified this page and when closing it you would lose the modification.\n"
+ "Do you really want to close this page?\n"));
+ closeConfirmation.setIcon(QMessageBox::Question);
+ closeConfirmation.addButton(QMessageBox::Yes);
+ closeConfirmation.addButton(QMessageBox::No);
+ closeConfirmation.setEscapeButton(QMessageBox::No);
+ if (closeConfirmation.exec() == QMessageBox::No)
+ return;
+ }
+ hasFocus = tab->hasFocus();
+
+ m_recentlyClosedTabsAction->setEnabled(true);
+ m_recentlyClosedTabs.prepend(tab->url());
+ if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
+ m_recentlyClosedTabs.removeLast();
+ }
+ QWidget *lineEdit = m_lineEdits->widget(index);
+ m_lineEdits->removeWidget(lineEdit);
+ lineEdit->deleteLater();
+ QWidget *webView = widget(index);
+ removeTab(index);
+ webView->deleteLater();
+ emit tabsChanged();
+ if (hasFocus && count() > 0)
+ currentWebView()->setFocus();
+ if (count() == 0)
+ emit lastTabClosed();
+}
+
+void TabWidget::webViewLoadStarted()
+{
+ WebView *webView = qobject_cast<WebView*>(sender());
+ int index = webViewIndex(webView);
+ if (-1 != index) {
+ QIcon icon(QLatin1String(":loading.gif"));
+ setTabIcon(index, icon);
+ }
+}
+
+void TabWidget::webViewIconChanged()
+{
+ WebView *webView = qobject_cast<WebView*>(sender());
+ int index = webViewIndex(webView);
+ if (-1 != index) {
+ QIcon icon = BrowserApplication::instance()->icon(webView->url());
+ setTabIcon(index, icon);
+ }
+}
+
+void TabWidget::webViewTitleChanged(const QString &title)
+{
+ WebView *webView = qobject_cast<WebView*>(sender());
+ int index = webViewIndex(webView);
+ if (-1 != index) {
+ setTabText(index, title);
+ }
+ if (currentIndex() == index)
+ emit setCurrentTitle(title);
+ BrowserApplication::historyManager()->updateHistoryItem(webView->url(), title);
+}
+
+void TabWidget::webViewUrlChanged(const QUrl &url)
+{
+ WebView *webView = qobject_cast<WebView*>(sender());
+ int index = webViewIndex(webView);
+ if (-1 != index) {
+ m_tabBar->setTabData(index, url);
+ }
+ emit tabsChanged();
+}
+
+void TabWidget::aboutToShowRecentTabsMenu()
+{
+ m_recentlyClosedTabsMenu->clear();
+ for (int i = 0; i < m_recentlyClosedTabs.count(); ++i) {
+ QAction *action = new QAction(m_recentlyClosedTabsMenu);
+ action->setData(m_recentlyClosedTabs.at(i));
+ QIcon icon = BrowserApplication::instance()->icon(m_recentlyClosedTabs.at(i));
+ action->setIcon(icon);
+ action->setText(m_recentlyClosedTabs.at(i).toString());
+ m_recentlyClosedTabsMenu->addAction(action);
+ }
+}
+
+void TabWidget::aboutToShowRecentTriggeredAction(QAction *action)
+{
+ QUrl url = action->data().toUrl();
+ loadUrlInCurrentTab(url);
+}
+
+void TabWidget::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ if (!childAt(event->pos())
+ // Remove the line below when QTabWidget does not have a one pixel frame
+ && event->pos().y() < (tabBar()->y() + tabBar()->height())) {
+ newTab();
+ return;
+ }
+ QTabWidget::mouseDoubleClickEvent(event);
+}
+
+void TabWidget::contextMenuEvent(QContextMenuEvent *event)
+{
+ if (!childAt(event->pos())) {
+ m_tabBar->contextMenuRequested(event->pos());
+ return;
+ }
+ QTabWidget::contextMenuEvent(event);
+}
+
+void TabWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::MidButton && !childAt(event->pos())
+ // Remove the line below when QTabWidget does not have a one pixel frame
+ && event->pos().y() < (tabBar()->y() + tabBar()->height())) {
+ QUrl url(QApplication::clipboard()->text(QClipboard::Selection));
+ if (!url.isEmpty() && url.isValid() && !url.scheme().isEmpty()) {
+ WebView *webView = newTab();
+ webView->setUrl(url);
+ }
+ }
+}
+
+void TabWidget::loadUrlInCurrentTab(const QUrl &url)
+{
+ WebView *webView = currentWebView();
+ if (webView) {
+ webView->loadUrl(url);
+ webView->setFocus();
+ }
+}
+
+void TabWidget::nextTab()
+{
+ int next = currentIndex() + 1;
+ if (next == count())
+ next = 0;
+ setCurrentIndex(next);
+}
+
+void TabWidget::previousTab()
+{
+ int next = currentIndex() - 1;
+ if (next < 0)
+ next = count() - 1;
+ setCurrentIndex(next);
+}
+
+static const qint32 TabWidgetMagic = 0xaa;
+
+QByteArray TabWidget::saveState() const
+{
+ int version = 1;
+ QByteArray data;
+ QDataStream stream(&data, QIODevice::WriteOnly);
+
+ stream << qint32(TabWidgetMagic);
+ stream << qint32(version);
+
+ QStringList tabs;
+ for (int i = 0; i < count(); ++i) {
+ if (WebView *tab = qobject_cast<WebView*>(widget(i))) {
+ tabs.append(tab->url().toString());
+ } else {
+ tabs.append(QString::null);
+ }
+ }
+ stream << tabs;
+ stream << currentIndex();
+ return data;
+}
+
+bool TabWidget::restoreState(const QByteArray &state)
+{
+ int version = 1;
+ QByteArray sd = state;
+ QDataStream stream(&sd, QIODevice::ReadOnly);
+ if (stream.atEnd())
+ return false;
+
+ qint32 marker;
+ qint32 v;
+ stream >> marker;
+ stream >> v;
+ if (marker != TabWidgetMagic || v != version)
+ return false;
+
+ QStringList openTabs;
+ stream >> openTabs;
+
+ for (int i = 0; i < openTabs.count(); ++i) {
+ if (i != 0)
+ newTab();
+ loadPage(openTabs.at(i));
+ }
+
+ int currentTab;
+ stream >> currentTab;
+ setCurrentIndex(currentTab);
+
+ return true;
+}
+
+WebActionMapper::WebActionMapper(QAction *root, QWebPage::WebAction webAction, QObject *parent)
+ : QObject(parent)
+ , m_currentParent(0)
+ , m_root(root)
+ , m_webAction(webAction)
+{
+ if (!m_root)
+ return;
+ connect(m_root, SIGNAL(triggered()), this, SLOT(rootTriggered()));
+ connect(root, SIGNAL(destroyed(QObject *)), this, SLOT(rootDestroyed()));
+ root->setEnabled(false);
+}
+
+void WebActionMapper::rootDestroyed()
+{
+ m_root = 0;
+}
+
+void WebActionMapper::currentDestroyed()
+{
+ updateCurrent(0);
+}
+
+void WebActionMapper::addChild(QAction *action)
+{
+ if (!action)
+ return;
+ connect(action, SIGNAL(changed()), this, SLOT(childChanged()));
+}
+
+QWebPage::WebAction WebActionMapper::webAction() const
+{
+ return m_webAction;
+}
+
+void WebActionMapper::rootTriggered()
+{
+ if (m_currentParent) {
+ QAction *gotoAction = m_currentParent->action(m_webAction);
+ gotoAction->trigger();
+ }
+}
+
+void WebActionMapper::childChanged()
+{
+ if (QAction *source = qobject_cast<QAction*>(sender())) {
+ if (m_root
+ && m_currentParent
+ && source->parent() == m_currentParent) {
+ m_root->setChecked(source->isChecked());
+ m_root->setEnabled(source->isEnabled());
+ }
+ }
+}
+
+void WebActionMapper::updateCurrent(QWebPage *currentParent)
+{
+ if (m_currentParent)
+ disconnect(m_currentParent, SIGNAL(destroyed(QObject *)),
+ this, SLOT(currentDestroyed()));
+
+ m_currentParent = currentParent;
+ if (!m_root)
+ return;
+ if (!m_currentParent) {
+ m_root->setEnabled(false);
+ m_root->setChecked(false);
+ return;
+ }
+ QAction *source = m_currentParent->action(m_webAction);
+ m_root->setChecked(source->isChecked());
+ m_root->setEnabled(source->isEnabled());
+ connect(m_currentParent, SIGNAL(destroyed(QObject *)),
+ this, SLOT(currentDestroyed()));
+}
+
diff --git a/demos/browser/tabwidget.h b/demos/browser/tabwidget.h
new file mode 100644
index 0000000..da3fe42
--- /dev/null
+++ b/demos/browser/tabwidget.h
@@ -0,0 +1,224 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABWIDGET_H
+#define TABWIDGET_H
+
+#include <QtGui/QTabBar>
+
+#include <QtGui/QShortcut>
+/*
+ Tab bar with a few more features such as a context menu and shortcuts
+ */
+class TabBar : public QTabBar
+{
+ Q_OBJECT
+
+signals:
+ void newTab();
+ void cloneTab(int index);
+ void closeTab(int index);
+ void closeOtherTabs(int index);
+ void reloadTab(int index);
+ void reloadAllTabs();
+ void tabMoveRequested(int fromIndex, int toIndex);
+
+public:
+ TabBar(QWidget *parent = 0);
+
+protected:
+ void mousePressEvent(QMouseEvent* event);
+ void mouseMoveEvent(QMouseEvent* event);
+
+private slots:
+ void selectTabAction();
+ void cloneTab();
+ void closeTab();
+ void closeOtherTabs();
+ void reloadTab();
+ void contextMenuRequested(const QPoint &position);
+
+private:
+ QList<QShortcut*> m_tabShortcuts;
+ friend class TabWidget;
+
+ QPoint m_dragStartPos;
+ int m_dragCurrentIndex;
+};
+
+#include <QtWebKit/QWebPage>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+QT_END_NAMESPACE
+class WebView;
+/*!
+ A proxy object that connects a single browser action
+ to one child webpage action at a time.
+
+ Example usage: used to keep the main window stop action in sync with
+ the current tabs webview's stop action.
+ */
+class WebActionMapper : public QObject
+{
+ Q_OBJECT
+
+public:
+ WebActionMapper(QAction *root, QWebPage::WebAction webAction, QObject *parent);
+ QWebPage::WebAction webAction() const;
+ void addChild(QAction *action);
+ void updateCurrent(QWebPage *currentParent);
+
+private slots:
+ void rootTriggered();
+ void childChanged();
+ void rootDestroyed();
+ void currentDestroyed();
+
+private:
+ QWebPage *m_currentParent;
+ QAction *m_root;
+ QWebPage::WebAction m_webAction;
+};
+
+#include <QtCore/QUrl>
+#include <QtGui/QTabWidget>
+QT_BEGIN_NAMESPACE
+class QCompleter;
+class QLineEdit;
+class QMenu;
+class QStackedWidget;
+QT_END_NAMESPACE
+/*!
+ TabWidget that contains WebViews and a stack widget of associated line edits.
+
+ Connects up the current tab's signals to this class's signal and uses WebActionMapper
+ to proxy the actions.
+ */
+class TabWidget : public QTabWidget
+{
+ Q_OBJECT
+
+signals:
+ // tab widget signals
+ void loadPage(const QString &url);
+ void tabsChanged();
+ void lastTabClosed();
+
+ // current tab signals
+ void setCurrentTitle(const QString &url);
+ void showStatusBarMessage(const QString &message);
+ void linkHovered(const QString &link);
+ void loadProgress(int progress);
+ void geometryChangeRequested(const QRect &geometry);
+ void menuBarVisibilityChangeRequested(bool visible);
+ void statusBarVisibilityChangeRequested(bool visible);
+ void toolBarVisibilityChangeRequested(bool visible);
+ void printRequested(QWebFrame *frame);
+
+public:
+ TabWidget(QWidget *parent = 0);
+ void clear();
+ void addWebAction(QAction *action, QWebPage::WebAction webAction);
+
+ QAction *newTabAction() const;
+ QAction *closeTabAction() const;
+ QAction *recentlyClosedTabsAction() const;
+ QAction *nextTabAction() const;
+ QAction *previousTabAction() const;
+
+ QWidget *lineEditStack() const;
+ QLineEdit *currentLineEdit() const;
+ WebView *currentWebView() const;
+ WebView *webView(int index) const;
+ QLineEdit *lineEdit(int index) const;
+ int webViewIndex(WebView *webView) const;
+
+ QByteArray saveState() const;
+ bool restoreState(const QByteArray &state);
+
+protected:
+ void mouseDoubleClickEvent(QMouseEvent *event);
+ void contextMenuEvent(QContextMenuEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+public slots:
+ void loadUrlInCurrentTab(const QUrl &url);
+ WebView *newTab(bool makeCurrent = true);
+ void cloneTab(int index = -1);
+ void closeTab(int index = -1);
+ void closeOtherTabs(int index);
+ void reloadTab(int index = -1);
+ void reloadAllTabs();
+ void nextTab();
+ void previousTab();
+
+private slots:
+ void currentChanged(int index);
+ void aboutToShowRecentTabsMenu();
+ void aboutToShowRecentTriggeredAction(QAction *action);
+ void webViewLoadStarted();
+ void webViewIconChanged();
+ void webViewTitleChanged(const QString &title);
+ void webViewUrlChanged(const QUrl &url);
+ void lineEditReturnPressed();
+ void windowCloseRequested();
+ void moveTab(int fromIndex, int toIndex);
+
+private:
+ QAction *m_recentlyClosedTabsAction;
+ QAction *m_newTabAction;
+ QAction *m_closeTabAction;
+ QAction *m_nextTabAction;
+ QAction *m_previousTabAction;
+
+ QMenu *m_recentlyClosedTabsMenu;
+ static const int m_recentlyClosedTabsSize = 10;
+ QList<QUrl> m_recentlyClosedTabs;
+ QList<WebActionMapper*> m_actions;
+
+ QCompleter *m_lineEditCompleter;
+ QStackedWidget *m_lineEdits;
+ TabBar *m_tabBar;
+};
+
+#endif // TABWIDGET_H
+
diff --git a/demos/browser/toolbarsearch.cpp b/demos/browser/toolbarsearch.cpp
new file mode 100644
index 0000000..255b5e9
--- /dev/null
+++ b/demos/browser/toolbarsearch.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "toolbarsearch.h"
+#include "autosaver.h"
+
+#include <QtCore/QSettings>
+#include <QtCore/QUrl>
+
+#include <QtGui/QCompleter>
+#include <QtGui/QMenu>
+#include <QtGui/QStringListModel>
+
+#include <QtWebKit/QWebSettings>
+
+/*
+ ToolbarSearch is a very basic search widget that also contains a small history.
+ Searches are turned into urls that use Google to perform search
+ */
+ToolbarSearch::ToolbarSearch(QWidget *parent)
+ : SearchLineEdit(parent)
+ , m_autosaver(new AutoSaver(this))
+ , m_maxSavedSearches(10)
+ , m_stringListModel(new QStringListModel(this))
+{
+ QMenu *m = menu();
+ connect(m, SIGNAL(aboutToShow()), this, SLOT(aboutToShowMenu()));
+ connect(m, SIGNAL(triggered(QAction*)), this, SLOT(triggeredMenuAction(QAction*)));
+
+ QCompleter *completer = new QCompleter(m_stringListModel, this);
+ completer->setCompletionMode(QCompleter::InlineCompletion);
+ lineEdit()->setCompleter(completer);
+
+ connect(lineEdit(), SIGNAL(returnPressed()), SLOT(searchNow()));
+ setInactiveText(tr("Google"));
+ load();
+}
+
+ToolbarSearch::~ToolbarSearch()
+{
+ m_autosaver->saveIfNeccessary();
+}
+
+void ToolbarSearch::save()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("toolbarsearch"));
+ settings.setValue(QLatin1String("recentSearches"), m_stringListModel->stringList());
+ settings.setValue(QLatin1String("maximumSaved"), m_maxSavedSearches);
+ settings.endGroup();
+}
+
+void ToolbarSearch::load()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("toolbarsearch"));
+ QStringList list = settings.value(QLatin1String("recentSearches")).toStringList();
+ m_maxSavedSearches = settings.value(QLatin1String("maximumSaved"), m_maxSavedSearches).toInt();
+ m_stringListModel->setStringList(list);
+ settings.endGroup();
+}
+
+void ToolbarSearch::searchNow()
+{
+ QString searchText = lineEdit()->text();
+ QStringList newList = m_stringListModel->stringList();
+ if (newList.contains(searchText))
+ newList.removeAt(newList.indexOf(searchText));
+ newList.prepend(searchText);
+ if (newList.size() >= m_maxSavedSearches)
+ newList.removeLast();
+
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
+ m_stringListModel->setStringList(newList);
+ m_autosaver->changeOccurred();
+ }
+
+ QUrl url(QLatin1String("http://www.google.com/search"));
+ url.addQueryItem(QLatin1String("q"), searchText);
+ url.addQueryItem(QLatin1String("ie"), QLatin1String("UTF-8"));
+ url.addQueryItem(QLatin1String("oe"), QLatin1String("UTF-8"));
+ url.addQueryItem(QLatin1String("client"), QLatin1String("qtdemobrowser"));
+ emit search(url);
+}
+
+void ToolbarSearch::aboutToShowMenu()
+{
+ lineEdit()->selectAll();
+ QMenu *m = menu();
+ m->clear();
+ QStringList list = m_stringListModel->stringList();
+ if (list.isEmpty()) {
+ m->addAction(tr("No Recent Searches"));
+ return;
+ }
+
+ QAction *recent = m->addAction(tr("Recent Searches"));
+ recent->setEnabled(false);
+ for (int i = 0; i < list.count(); ++i) {
+ QString text = list.at(i);
+ m->addAction(text)->setData(text);
+ }
+ m->addSeparator();
+ m->addAction(tr("Clear Recent Searches"), this, SLOT(clear()));
+}
+
+void ToolbarSearch::triggeredMenuAction(QAction *action)
+{
+ QVariant v = action->data();
+ if (v.canConvert<QString>()) {
+ QString text = v.toString();
+ lineEdit()->setText(text);
+ searchNow();
+ }
+}
+
+void ToolbarSearch::clear()
+{
+ m_stringListModel->setStringList(QStringList());
+ m_autosaver->changeOccurred();;
+}
+
diff --git a/demos/browser/toolbarsearch.h b/demos/browser/toolbarsearch.h
new file mode 100644
index 0000000..8e1be8d
--- /dev/null
+++ b/demos/browser/toolbarsearch.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOOLBARSEARCH_H
+#define TOOLBARSEARCH_H
+
+#include "searchlineedit.h"
+
+QT_BEGIN_NAMESPACE
+class QUrl;
+class QAction;
+class QStringListModel;
+QT_END_NAMESPACE
+
+class AutoSaver;
+
+class ToolbarSearch : public SearchLineEdit
+{
+ Q_OBJECT
+
+signals:
+ void search(const QUrl &url);
+
+public:
+ ToolbarSearch(QWidget *parent = 0);
+ ~ToolbarSearch();
+
+public slots:
+ void clear();
+ void searchNow();
+
+private slots:
+ void save();
+ void aboutToShowMenu();
+ void triggeredMenuAction(QAction *action);
+
+private:
+ void load();
+
+ AutoSaver *m_autosaver;
+ int m_maxSavedSearches;
+ QStringListModel *m_stringListModel;
+};
+
+#endif // TOOLBARSEARCH_H
+
diff --git a/demos/browser/urllineedit.cpp b/demos/browser/urllineedit.cpp
new file mode 100644
index 0000000..f7a6345
--- /dev/null
+++ b/demos/browser/urllineedit.cpp
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "urllineedit.h"
+
+#include "browserapplication.h"
+#include "searchlineedit.h"
+#include "webview.h"
+
+#include <QtCore/QEvent>
+
+#include <QtGui/QApplication>
+#include <QtGui/QCompleter>
+#include <QtGui/QFocusEvent>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPainter>
+#include <QtGui/QStyle>
+#include <QtGui/QStyleOptionFrameV2>
+
+#include <QtCore/QDebug>
+
+ExLineEdit::ExLineEdit(QWidget *parent)
+ : QWidget(parent)
+ , m_leftWidget(0)
+ , m_lineEdit(new QLineEdit(this))
+ , m_clearButton(0)
+{
+ setFocusPolicy(m_lineEdit->focusPolicy());
+ setAttribute(Qt::WA_InputMethodEnabled);
+ setSizePolicy(m_lineEdit->sizePolicy());
+ setBackgroundRole(m_lineEdit->backgroundRole());
+ setMouseTracking(true);
+ setAcceptDrops(true);
+ setAttribute(Qt::WA_MacShowFocusRect, true);
+ QPalette p = m_lineEdit->palette();
+ setPalette(p);
+
+ // line edit
+ m_lineEdit->setFrame(false);
+ m_lineEdit->setFocusProxy(this);
+ m_lineEdit->setAttribute(Qt::WA_MacShowFocusRect, false);
+ QPalette clearPalette = m_lineEdit->palette();
+ clearPalette.setBrush(QPalette::Base, QBrush(Qt::transparent));
+ m_lineEdit->setPalette(clearPalette);
+
+ // clearButton
+ m_clearButton = new ClearButton(this);
+ connect(m_clearButton, SIGNAL(clicked()),
+ m_lineEdit, SLOT(clear()));
+ connect(m_lineEdit, SIGNAL(textChanged(const QString&)),
+ m_clearButton, SLOT(textChanged(const QString&)));
+}
+
+void ExLineEdit::setLeftWidget(QWidget *widget)
+{
+ m_leftWidget = widget;
+}
+
+QWidget *ExLineEdit::leftWidget() const
+{
+ return m_leftWidget;
+}
+
+void ExLineEdit::resizeEvent(QResizeEvent *event)
+{
+ Q_ASSERT(m_leftWidget);
+ updateGeometries();
+ QWidget::resizeEvent(event);
+}
+
+void ExLineEdit::updateGeometries()
+{
+ QStyleOptionFrameV2 panel;
+ initStyleOption(&panel);
+ QRect rect = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
+
+ int height = rect.height();
+ int width = rect.width();
+
+ int m_leftWidgetHeight = m_leftWidget->height();
+ m_leftWidget->setGeometry(rect.x() + 2, rect.y() + (height - m_leftWidgetHeight)/2,
+ m_leftWidget->width(), m_leftWidget->height());
+
+ int clearButtonWidth = this->height();
+ m_lineEdit->setGeometry(m_leftWidget->x() + m_leftWidget->width(), 0,
+ width - clearButtonWidth - m_leftWidget->width(), this->height());
+
+ m_clearButton->setGeometry(this->width() - clearButtonWidth, 0,
+ clearButtonWidth, this->height());
+}
+
+void ExLineEdit::initStyleOption(QStyleOptionFrameV2 *option) const
+{
+ option->initFrom(this);
+ option->rect = contentsRect();
+ option->lineWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth, option, this);
+ option->midLineWidth = 0;
+ option->state |= QStyle::State_Sunken;
+ if (m_lineEdit->isReadOnly())
+ option->state |= QStyle::State_ReadOnly;
+#ifdef QT_KEYPAD_NAVIGATION
+ if (hasEditFocus())
+ option->state |= QStyle::State_HasEditFocus;
+#endif
+ option->features = QStyleOptionFrameV2::None;
+}
+
+QSize ExLineEdit::sizeHint() const
+{
+ m_lineEdit->setFrame(true);
+ QSize size = m_lineEdit->sizeHint();
+ m_lineEdit->setFrame(false);
+ return size;
+}
+
+void ExLineEdit::focusInEvent(QFocusEvent *event)
+{
+ m_lineEdit->event(event);
+ QWidget::focusInEvent(event);
+}
+
+void ExLineEdit::focusOutEvent(QFocusEvent *event)
+{
+ m_lineEdit->event(event);
+
+ if (m_lineEdit->completer()) {
+ connect(m_lineEdit->completer(), SIGNAL(activated(QString)),
+ m_lineEdit, SLOT(setText(QString)));
+ connect(m_lineEdit->completer(), SIGNAL(highlighted(QString)),
+ m_lineEdit, SLOT(_q_completionHighlighted(QString)));
+ }
+ QWidget::focusOutEvent(event);
+}
+
+void ExLineEdit::keyPressEvent(QKeyEvent *event)
+{
+ m_lineEdit->event(event);
+}
+
+bool ExLineEdit::event(QEvent *event)
+{
+ if (event->type() == QEvent::ShortcutOverride)
+ return m_lineEdit->event(event);
+ return QWidget::event(event);
+}
+
+void ExLineEdit::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ QStyleOptionFrameV2 panel;
+ initStyleOption(&panel);
+ style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this);
+}
+
+QVariant ExLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const
+{
+ return m_lineEdit->inputMethodQuery(property);
+}
+
+void ExLineEdit::inputMethodEvent(QInputMethodEvent *e)
+{
+ m_lineEdit->event(e);
+}
+
+
+class UrlIconLabel : public QLabel
+{
+
+public:
+ UrlIconLabel(QWidget *parent);
+
+ WebView *m_webView;
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+
+private:
+ QPoint m_dragStartPos;
+
+};
+
+UrlIconLabel::UrlIconLabel(QWidget *parent)
+ : QLabel(parent)
+ , m_webView(0)
+{
+ setMinimumWidth(16);
+ setMinimumHeight(16);
+}
+
+void UrlIconLabel::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ m_dragStartPos = event->pos();
+ QLabel::mousePressEvent(event);
+}
+
+void UrlIconLabel::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() == Qt::LeftButton
+ && (event->pos() - m_dragStartPos).manhattanLength() > QApplication::startDragDistance()
+ && m_webView) {
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setText(QString::fromUtf8(m_webView->url().toEncoded()));
+ QList<QUrl> urls;
+ urls.append(m_webView->url());
+ mimeData->setUrls(urls);
+ drag->setMimeData(mimeData);
+ drag->exec();
+ }
+}
+
+UrlLineEdit::UrlLineEdit(QWidget *parent)
+ : ExLineEdit(parent)
+ , m_webView(0)
+ , m_iconLabel(0)
+{
+ // icon
+ m_iconLabel = new UrlIconLabel(this);
+ m_iconLabel->resize(16, 16);
+ setLeftWidget(m_iconLabel);
+ m_defaultBaseColor = palette().color(QPalette::Base);
+
+ webViewIconChanged();
+}
+
+void UrlLineEdit::setWebView(WebView *webView)
+{
+ Q_ASSERT(!m_webView);
+ m_webView = webView;
+ m_iconLabel->m_webView = webView;
+ connect(webView, SIGNAL(urlChanged(const QUrl &)),
+ this, SLOT(webViewUrlChanged(const QUrl &)));
+ connect(webView, SIGNAL(loadFinished(bool)),
+ this, SLOT(webViewIconChanged()));
+ connect(webView, SIGNAL(iconChanged()),
+ this, SLOT(webViewIconChanged()));
+ connect(webView, SIGNAL(loadProgress(int)),
+ this, SLOT(update()));
+}
+
+void UrlLineEdit::webViewUrlChanged(const QUrl &url)
+{
+ m_lineEdit->setText(QString::fromUtf8(url.toEncoded()));
+ m_lineEdit->setCursorPosition(0);
+}
+
+void UrlLineEdit::webViewIconChanged()
+{
+ QUrl url = (m_webView) ? m_webView->url() : QUrl();
+ QIcon icon = BrowserApplication::instance()->icon(url);
+ QPixmap pixmap(icon.pixmap(16, 16));
+ m_iconLabel->setPixmap(pixmap);
+}
+
+QLinearGradient UrlLineEdit::generateGradient(const QColor &color) const
+{
+ QLinearGradient gradient(0, 0, 0, height());
+ gradient.setColorAt(0, m_defaultBaseColor);
+ gradient.setColorAt(0.15, color.lighter(120));
+ gradient.setColorAt(0.5, color);
+ gradient.setColorAt(0.85, color.lighter(120));
+ gradient.setColorAt(1, m_defaultBaseColor);
+ return gradient;
+}
+
+void UrlLineEdit::focusOutEvent(QFocusEvent *event)
+{
+ if (m_lineEdit->text().isEmpty() && m_webView)
+ m_lineEdit->setText(QString::fromUtf8(m_webView->url().toEncoded()));
+ ExLineEdit::focusOutEvent(event);
+}
+
+void UrlLineEdit::paintEvent(QPaintEvent *event)
+{
+ QPalette p = palette();
+ if (m_webView && m_webView->url().scheme() == QLatin1String("https")) {
+ QColor lightYellow(248, 248, 210);
+ p.setBrush(QPalette::Base, generateGradient(lightYellow));
+ } else {
+ p.setBrush(QPalette::Base, m_defaultBaseColor);
+ }
+ setPalette(p);
+ ExLineEdit::paintEvent(event);
+
+ QPainter painter(this);
+ QStyleOptionFrameV2 panel;
+ initStyleOption(&panel);
+ QRect backgroundRect = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
+ if (m_webView && !hasFocus()) {
+ int progress = m_webView->progress();
+ QColor loadingColor = QColor(116, 192, 250);
+ painter.setBrush(generateGradient(loadingColor));
+ painter.setPen(Qt::transparent);
+ int mid = backgroundRect.width() / 100 * progress;
+ QRect progressRect(backgroundRect.x(), backgroundRect.y(), mid, backgroundRect.height());
+ painter.drawRect(progressRect);
+ }
+}
diff --git a/demos/browser/urllineedit.h b/demos/browser/urllineedit.h
new file mode 100644
index 0000000..6a718f0
--- /dev/null
+++ b/demos/browser/urllineedit.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef URLLINEEDIT_H
+#define URLLINEEDIT_H
+
+#include <QtCore/QUrl>
+#include <QtGui/QWidget>
+#include <QtGui/QStyleOptionFrame>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+QT_END_NAMESPACE
+
+class ClearButton;
+class ExLineEdit : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ExLineEdit(QWidget *parent = 0);
+
+ inline QLineEdit *lineEdit() const { return m_lineEdit; }
+
+ void setLeftWidget(QWidget *widget);
+ QWidget *leftWidget() const;
+
+ QSize sizeHint() const;
+
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
+protected:
+ void focusInEvent(QFocusEvent *event);
+ void focusOutEvent(QFocusEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void inputMethodEvent(QInputMethodEvent *e);
+ bool event(QEvent *event);
+
+protected:
+ void updateGeometries();
+ void initStyleOption(QStyleOptionFrameV2 *option) const;
+
+ QWidget *m_leftWidget;
+ QLineEdit *m_lineEdit;
+ ClearButton *m_clearButton;
+};
+
+class UrlIconLabel;
+class WebView;
+class UrlLineEdit : public ExLineEdit
+{
+ Q_OBJECT
+
+public:
+ UrlLineEdit(QWidget *parent = 0);
+ void setWebView(WebView *webView);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void focusOutEvent(QFocusEvent *event);
+
+private slots:
+ void webViewUrlChanged(const QUrl &url);
+ void webViewIconChanged();
+
+private:
+ QLinearGradient generateGradient(const QColor &color) const;
+ WebView *m_webView;
+ UrlIconLabel *m_iconLabel;
+ QColor m_defaultBaseColor;
+
+};
+
+
+#endif // URLLINEEDIT_H
+
diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp
new file mode 100644
index 0000000..6c4d857
--- /dev/null
+++ b/demos/browser/webview.cpp
@@ -0,0 +1,304 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browserapplication.h"
+#include "browsermainwindow.h"
+#include "cookiejar.h"
+#include "downloadmanager.h"
+#include "networkaccessmanager.h"
+#include "tabwidget.h"
+#include "webview.h"
+
+#include <QtGui/QClipboard>
+#include <QtGui/QMenu>
+#include <QtGui/QMessageBox>
+#include <QtGui/QMouseEvent>
+
+#include <QtWebKit/QWebHitTestResult>
+
+#include <QtUiTools/QUiLoader>
+
+#include <QtCore/QDebug>
+#include <QtCore/QBuffer>
+
+WebPage::WebPage(QObject *parent)
+ : QWebPage(parent)
+ , m_keyboardModifiers(Qt::NoModifier)
+ , m_pressedButtons(Qt::NoButton)
+ , m_openInNewTab(false)
+{
+ setNetworkAccessManager(BrowserApplication::networkAccessManager());
+ connect(this, SIGNAL(unsupportedContent(QNetworkReply *)),
+ this, SLOT(handleUnsupportedContent(QNetworkReply *)));
+}
+
+BrowserMainWindow *WebPage::mainWindow()
+{
+ QObject *w = this->parent();
+ while (w) {
+ if (BrowserMainWindow *mw = qobject_cast<BrowserMainWindow*>(w))
+ return mw;
+ w = w->parent();
+ }
+ return BrowserApplication::instance()->mainWindow();
+}
+
+bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type)
+{
+ // ctrl open in new tab
+ // ctrl-shift open in new tab and select
+ // ctrl-alt open in new window
+ if (type == QWebPage::NavigationTypeLinkClicked
+ && (m_keyboardModifiers & Qt::ControlModifier
+ || m_pressedButtons == Qt::MidButton)) {
+ bool newWindow = (m_keyboardModifiers & Qt::AltModifier);
+ WebView *webView;
+ if (newWindow) {
+ BrowserApplication::instance()->newMainWindow();
+ BrowserMainWindow *newMainWindow = BrowserApplication::instance()->mainWindow();
+ webView = newMainWindow->currentTab();
+ newMainWindow->raise();
+ newMainWindow->activateWindow();
+ webView->setFocus();
+ } else {
+ bool selectNewTab = (m_keyboardModifiers & Qt::ShiftModifier);
+ webView = mainWindow()->tabWidget()->newTab(selectNewTab);
+ }
+ webView->load(request);
+ m_keyboardModifiers = Qt::NoModifier;
+ m_pressedButtons = Qt::NoButton;
+ return false;
+ }
+ if (frame == mainFrame()) {
+ m_loadingUrl = request.url();
+ emit loadingUrl(m_loadingUrl);
+ }
+ return QWebPage::acceptNavigationRequest(frame, request, type);
+}
+
+QWebPage *WebPage::createWindow(QWebPage::WebWindowType type)
+{
+ Q_UNUSED(type);
+ if (m_keyboardModifiers & Qt::ControlModifier || m_pressedButtons == Qt::MidButton)
+ m_openInNewTab = true;
+ if (m_openInNewTab) {
+ m_openInNewTab = false;
+ return mainWindow()->tabWidget()->newTab()->page();
+ }
+ BrowserApplication::instance()->newMainWindow();
+ BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
+ return mainWindow->currentTab()->page();
+}
+
+#if !defined(QT_NO_UITOOLS)
+QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
+{
+ Q_UNUSED(url);
+ Q_UNUSED(paramNames);
+ Q_UNUSED(paramValues);
+ QUiLoader loader;
+ return loader.createWidget(classId, view());
+}
+#endif // !defined(QT_NO_UITOOLS)
+
+void WebPage::handleUnsupportedContent(QNetworkReply *reply)
+{
+ if (reply->error() == QNetworkReply::NoError) {
+ BrowserApplication::downloadManager()->handleUnsupportedContent(reply);
+ return;
+ }
+
+ QFile file(QLatin1String(":/notfound.html"));
+ bool isOpened = file.open(QIODevice::ReadOnly);
+ Q_ASSERT(isOpened);
+ QString title = tr("Error loading page: %1").arg(reply->url().toString());
+ QString html = QString(QLatin1String(file.readAll()))
+ .arg(title)
+ .arg(reply->errorString())
+ .arg(reply->url().toString());
+
+ QBuffer imageBuffer;
+ imageBuffer.open(QBuffer::ReadWrite);
+ QIcon icon = view()->style()->standardIcon(QStyle::SP_MessageBoxWarning, 0, view());
+ QPixmap pixmap = icon.pixmap(QSize(32,32));
+ if (pixmap.save(&imageBuffer, "PNG")) {
+ html.replace(QLatin1String("IMAGE_BINARY_DATA_HERE"),
+ QString(QLatin1String(imageBuffer.buffer().toBase64())));
+ }
+
+ QList<QWebFrame*> frames;
+ frames.append(mainFrame());
+ while (!frames.isEmpty()) {
+ QWebFrame *frame = frames.takeFirst();
+ if (frame->url() == reply->url()) {
+ frame->setHtml(html, reply->url());
+ return;
+ }
+ QList<QWebFrame *> children = frame->childFrames();
+ foreach(QWebFrame *frame, children)
+ frames.append(frame);
+ }
+ if (m_loadingUrl == reply->url()) {
+ mainFrame()->setHtml(html, reply->url());
+ }
+}
+
+
+WebView::WebView(QWidget* parent)
+ : QWebView(parent)
+ , m_progress(0)
+ , m_page(new WebPage(this))
+{
+ setPage(m_page);
+ connect(page(), SIGNAL(statusBarMessage(const QString&)),
+ SLOT(setStatusBarText(const QString&)));
+ connect(this, SIGNAL(loadProgress(int)),
+ this, SLOT(setProgress(int)));
+ connect(this, SIGNAL(loadFinished(bool)),
+ this, SLOT(loadFinished()));
+ connect(page(), SIGNAL(loadingUrl(const QUrl&)),
+ this, SIGNAL(urlChanged(const QUrl &)));
+ connect(page(), SIGNAL(downloadRequested(const QNetworkRequest &)),
+ this, SLOT(downloadRequested(const QNetworkRequest &)));
+ page()->setForwardUnsupportedContent(true);
+
+}
+
+void WebView::contextMenuEvent(QContextMenuEvent *event)
+{
+ QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
+ if (!r.linkUrl().isEmpty()) {
+ QMenu menu(this);
+ menu.addAction(pageAction(QWebPage::OpenLinkInNewWindow));
+ menu.addAction(tr("Open in New Tab"), this, SLOT(openLinkInNewTab()));
+ menu.addSeparator();
+ menu.addAction(pageAction(QWebPage::DownloadLinkToDisk));
+ // Add link to bookmarks...
+ menu.addSeparator();
+ menu.addAction(pageAction(QWebPage::CopyLinkToClipboard));
+ if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
+ menu.addAction(pageAction(QWebPage::InspectElement));
+ menu.exec(mapToGlobal(event->pos()));
+ return;
+ }
+ QWebView::contextMenuEvent(event);
+}
+
+void WebView::wheelEvent(QWheelEvent *event)
+{
+ if (QApplication::keyboardModifiers() & Qt::ControlModifier) {
+ int numDegrees = event->delta() / 8;
+ int numSteps = numDegrees / 15;
+ setTextSizeMultiplier(textSizeMultiplier() + numSteps * 0.1);
+ event->accept();
+ return;
+ }
+ QWebView::wheelEvent(event);
+}
+
+void WebView::openLinkInNewTab()
+{
+ m_page->m_openInNewTab = true;
+ pageAction(QWebPage::OpenLinkInNewWindow)->trigger();
+}
+
+void WebView::setProgress(int progress)
+{
+ m_progress = progress;
+}
+
+void WebView::loadFinished()
+{
+ if (100 != m_progress) {
+ qWarning() << "Recieved finished signal while progress is still:" << progress()
+ << "Url:" << url();
+ }
+ m_progress = 0;
+}
+
+void WebView::loadUrl(const QUrl &url)
+{
+ m_initialUrl = url;
+ load(url);
+}
+
+QString WebView::lastStatusBarText() const
+{
+ return m_statusBarText;
+}
+
+QUrl WebView::url() const
+{
+ QUrl url = QWebView::url();
+ if (!url.isEmpty())
+ return url;
+
+ return m_initialUrl;
+}
+
+void WebView::mousePressEvent(QMouseEvent *event)
+{
+ m_page->m_pressedButtons = event->buttons();
+ m_page->m_keyboardModifiers = event->modifiers();
+ QWebView::mousePressEvent(event);
+}
+
+void WebView::mouseReleaseEvent(QMouseEvent *event)
+{
+ QWebView::mouseReleaseEvent(event);
+ if (!event->isAccepted() && (m_page->m_pressedButtons & Qt::MidButton)) {
+ QUrl url(QApplication::clipboard()->text(QClipboard::Selection));
+ if (!url.isEmpty() && url.isValid() && !url.scheme().isEmpty()) {
+ setUrl(url);
+ }
+ }
+}
+
+void WebView::setStatusBarText(const QString &string)
+{
+ m_statusBarText = string;
+}
+
+void WebView::downloadRequested(const QNetworkRequest &request)
+{
+ BrowserApplication::downloadManager()->download(request);
+}
+
diff --git a/demos/browser/webview.h b/demos/browser/webview.h
new file mode 100644
index 0000000..a41bcf3
--- /dev/null
+++ b/demos/browser/webview.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WEBVIEW_H
+#define WEBVIEW_H
+
+#include <QtWebKit/QWebView>
+
+QT_BEGIN_NAMESPACE
+class QAuthenticator;
+class QMouseEvent;
+class QNetworkProxy;
+class QNetworkReply;
+class QSslError;
+QT_END_NAMESPACE
+
+class BrowserMainWindow;
+class WebPage : public QWebPage {
+ Q_OBJECT
+
+signals:
+ void loadingUrl(const QUrl &url);
+
+public:
+ WebPage(QObject *parent = 0);
+ BrowserMainWindow *mainWindow();
+
+protected:
+ bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
+ QWebPage *createWindow(QWebPage::WebWindowType type);
+#if !defined(QT_NO_UITOOLS)
+ QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
+#endif
+
+private slots:
+ void handleUnsupportedContent(QNetworkReply *reply);
+
+private:
+ friend class WebView;
+
+ // set the webview mousepressedevent
+ Qt::KeyboardModifiers m_keyboardModifiers;
+ Qt::MouseButtons m_pressedButtons;
+ bool m_openInNewTab;
+ QUrl m_loadingUrl;
+};
+
+class WebView : public QWebView {
+ Q_OBJECT
+
+public:
+ WebView(QWidget *parent = 0);
+ WebPage *webPage() const { return m_page; }
+
+ void loadUrl(const QUrl &url);
+ QUrl url() const;
+
+ QString lastStatusBarText() const;
+ inline int progress() const { return m_progress; }
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void contextMenuEvent(QContextMenuEvent *event);
+ void wheelEvent(QWheelEvent *event);
+
+private slots:
+ void setProgress(int progress);
+ void loadFinished();
+ void setStatusBarText(const QString &string);
+ void downloadRequested(const QNetworkRequest &request);
+ void openLinkInNewTab();
+
+private:
+ QString m_statusBarText;
+ QUrl m_initialUrl;
+ int m_progress;
+ WebPage *m_page;
+};
+
+#endif
diff --git a/demos/browser/xbel.cpp b/demos/browser/xbel.cpp
new file mode 100644
index 0000000..a92b649
--- /dev/null
+++ b/demos/browser/xbel.cpp
@@ -0,0 +1,320 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xbel.h"
+
+#include <QtCore/QFile>
+
+BookmarkNode::BookmarkNode(BookmarkNode::Type type, BookmarkNode *parent) :
+ expanded(false)
+ , m_parent(parent)
+ , m_type(type)
+{
+ if (parent)
+ parent->add(this);
+}
+
+BookmarkNode::~BookmarkNode()
+{
+ if (m_parent)
+ m_parent->remove(this);
+ qDeleteAll(m_children);
+ m_parent = 0;
+ m_type = BookmarkNode::Root;
+}
+
+bool BookmarkNode::operator==(const BookmarkNode &other)
+{
+ if (url != other.url
+ || title != other.title
+ || desc != other.desc
+ || expanded != other.expanded
+ || m_type != other.m_type
+ || m_children.count() != other.m_children.count())
+ return false;
+
+ for (int i = 0; i < m_children.count(); ++i)
+ if (!((*(m_children[i])) == (*(other.m_children[i]))))
+ return false;
+ return true;
+}
+
+BookmarkNode::Type BookmarkNode::type() const
+{
+ return m_type;
+}
+
+void BookmarkNode::setType(Type type)
+{
+ m_type = type;
+}
+
+QList<BookmarkNode *> BookmarkNode::children() const
+{
+ return m_children;
+}
+
+BookmarkNode *BookmarkNode::parent() const
+{
+ return m_parent;
+}
+
+void BookmarkNode::add(BookmarkNode *child, int offset)
+{
+ Q_ASSERT(child->m_type != Root);
+ if (child->m_parent)
+ child->m_parent->remove(child);
+ child->m_parent = this;
+ if (-1 == offset)
+ offset = m_children.size();
+ m_children.insert(offset, child);
+}
+
+void BookmarkNode::remove(BookmarkNode *child)
+{
+ child->m_parent = 0;
+ m_children.removeAll(child);
+}
+
+
+XbelReader::XbelReader()
+{
+}
+
+BookmarkNode *XbelReader::read(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.exists()) {
+ return new BookmarkNode(BookmarkNode::Root);
+ }
+ file.open(QFile::ReadOnly);
+ return read(&file);
+}
+
+BookmarkNode *XbelReader::read(QIODevice *device)
+{
+ BookmarkNode *root = new BookmarkNode(BookmarkNode::Root);
+ setDevice(device);
+ while (!atEnd()) {
+ readNext();
+ if (isStartElement()) {
+ QString version = attributes().value(QLatin1String("version")).toString();
+ if (name() == QLatin1String("xbel")
+ && (version.isEmpty() || version == QLatin1String("1.0"))) {
+ readXBEL(root);
+ } else {
+ raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
+ }
+ }
+ }
+ return root;
+}
+
+void XbelReader::readXBEL(BookmarkNode *parent)
+{
+ Q_ASSERT(isStartElement() && name() == QLatin1String("xbel"));
+
+ while (!atEnd()) {
+ readNext();
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("folder"))
+ readFolder(parent);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmarkNode(parent);
+ else if (name() == QLatin1String("separator"))
+ readSeparator(parent);
+ else
+ skipUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readFolder(BookmarkNode *parent)
+{
+ Q_ASSERT(isStartElement() && name() == QLatin1String("folder"));
+
+ BookmarkNode *folder = new BookmarkNode(BookmarkNode::Folder, parent);
+ folder->expanded = (attributes().value(QLatin1String("folded")) == QLatin1String("no"));
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title"))
+ readTitle(folder);
+ else if (name() == QLatin1String("desc"))
+ readDescription(folder);
+ else if (name() == QLatin1String("folder"))
+ readFolder(folder);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmarkNode(folder);
+ else if (name() == QLatin1String("separator"))
+ readSeparator(folder);
+ else
+ skipUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readTitle(BookmarkNode *parent)
+{
+ Q_ASSERT(isStartElement() && name() == QLatin1String("title"));
+ parent->title = readElementText();
+}
+
+void XbelReader::readDescription(BookmarkNode *parent)
+{
+ Q_ASSERT(isStartElement() && name() == QLatin1String("desc"));
+ parent->desc = readElementText();
+}
+
+void XbelReader::readSeparator(BookmarkNode *parent)
+{
+ new BookmarkNode(BookmarkNode::Separator, parent);
+ // empty elements have a start and end element
+ readNext();
+}
+
+void XbelReader::readBookmarkNode(BookmarkNode *parent)
+{
+ Q_ASSERT(isStartElement() && name() == QLatin1String("bookmark"));
+ BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark, parent);
+ bookmark->url = attributes().value(QLatin1String("href")).toString();
+ while (!atEnd()) {
+ readNext();
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title"))
+ readTitle(bookmark);
+ else if (name() == QLatin1String("desc"))
+ readDescription(bookmark);
+ else
+ skipUnknownElement();
+ }
+ }
+ if (bookmark->title.isEmpty())
+ bookmark->title = QObject::tr("Unknown title");
+}
+
+void XbelReader::skipUnknownElement()
+{
+ Q_ASSERT(isStartElement());
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ skipUnknownElement();
+ }
+}
+
+
+XbelWriter::XbelWriter()
+{
+ setAutoFormatting(true);
+}
+
+bool XbelWriter::write(const QString &fileName, const BookmarkNode *root)
+{
+ QFile file(fileName);
+ if (!root || !file.open(QFile::WriteOnly))
+ return false;
+ return write(&file, root);
+}
+
+bool XbelWriter::write(QIODevice *device, const BookmarkNode *root)
+{
+ setDevice(device);
+
+ writeStartDocument();
+ writeDTD(QLatin1String("<!DOCTYPE xbel>"));
+ writeStartElement(QLatin1String("xbel"));
+ writeAttribute(QLatin1String("version"), QLatin1String("1.0"));
+ if (root->type() == BookmarkNode::Root) {
+ for (int i = 0; i < root->children().count(); ++i)
+ writeItem(root->children().at(i));
+ } else {
+ writeItem(root);
+ }
+
+ writeEndDocument();
+ return true;
+}
+
+void XbelWriter::writeItem(const BookmarkNode *parent)
+{
+ switch (parent->type()) {
+ case BookmarkNode::Folder:
+ writeStartElement(QLatin1String("folder"));
+ writeAttribute(QLatin1String("folded"), parent->expanded ? QLatin1String("no") : QLatin1String("yes"));
+ writeTextElement(QLatin1String("title"), parent->title);
+ for (int i = 0; i < parent->children().count(); ++i)
+ writeItem(parent->children().at(i));
+ writeEndElement();
+ break;
+ case BookmarkNode::Bookmark:
+ writeStartElement(QLatin1String("bookmark"));
+ if (!parent->url.isEmpty())
+ writeAttribute(QLatin1String("href"), parent->url);
+ writeTextElement(QLatin1String("title"), parent->title);
+ if (!parent->desc.isEmpty())
+ writeAttribute(QLatin1String("desc"), parent->desc);
+ writeEndElement();
+ break;
+ case BookmarkNode::Separator:
+ writeEmptyElement(QLatin1String("separator"));
+ break;
+ default:
+ break;
+ }
+}
+
diff --git a/demos/browser/xbel.h b/demos/browser/xbel.h
new file mode 100644
index 0000000..b736d02
--- /dev/null
+++ b/demos/browser/xbel.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBEL_H
+#define XBEL_H
+
+#include <QtCore/QXmlStreamReader>
+#include <QtCore/QDateTime>
+
+class BookmarkNode
+{
+public:
+ enum Type {
+ Root,
+ Folder,
+ Bookmark,
+ Separator
+ };
+
+ BookmarkNode(Type type = Root, BookmarkNode *parent = 0);
+ ~BookmarkNode();
+ bool operator==(const BookmarkNode &other);
+
+ Type type() const;
+ void setType(Type type);
+ QList<BookmarkNode *> children() const;
+ BookmarkNode *parent() const;
+
+ void add(BookmarkNode *child, int offset = -1);
+ void remove(BookmarkNode *child);
+
+ QString url;
+ QString title;
+ QString desc;
+ bool expanded;
+
+private:
+ BookmarkNode *m_parent;
+ Type m_type;
+ QList<BookmarkNode *> m_children;
+
+};
+
+class XbelReader : public QXmlStreamReader
+{
+public:
+ XbelReader();
+ BookmarkNode *read(const QString &fileName);
+ BookmarkNode *read(QIODevice *device);
+
+private:
+ void skipUnknownElement();
+ void readXBEL(BookmarkNode *parent);
+ void readTitle(BookmarkNode *parent);
+ void readDescription(BookmarkNode *parent);
+ void readSeparator(BookmarkNode *parent);
+ void readFolder(BookmarkNode *parent);
+ void readBookmarkNode(BookmarkNode *parent);
+};
+
+#include <QtCore/QXmlStreamWriter>
+
+class XbelWriter : public QXmlStreamWriter
+{
+public:
+ XbelWriter();
+ bool write(const QString &fileName, const BookmarkNode *root);
+ bool write(QIODevice *device, const BookmarkNode *root);
+
+private:
+ void writeItem(const BookmarkNode *parent);
+};
+
+#endif // XBEL_H
+
diff --git a/demos/chip/chip.cpp b/demos/chip/chip.cpp
new file mode 100644
index 0000000..c2b22da
--- /dev/null
+++ b/demos/chip/chip.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "chip.h"
+
+#include <QtGui>
+
+Chip::Chip(const QColor &color, int x, int y)
+{
+ this->x = x;
+ this->y = y;
+ this->color = color;
+ setZValue((x + y) % 2);
+
+ setFlags(ItemIsSelectable | ItemIsMovable);
+ setAcceptsHoverEvents(true);
+}
+
+QRectF Chip::boundingRect() const
+{
+ return QRectF(0, 0, 110, 70);
+}
+
+QPainterPath Chip::shape() const
+{
+ QPainterPath path;
+ path.addRect(14, 14, 82, 42);
+ return path;
+}
+
+void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(widget);
+
+ QColor fillColor = (option->state & QStyle::State_Selected) ? color.dark(150) : color;
+ if (option->state & QStyle::State_MouseOver)
+ fillColor = fillColor.light(125);
+
+ if (option->levelOfDetail < 0.2) {
+ if (option->levelOfDetail < 0.125) {
+ painter->fillRect(QRectF(0, 0, 110, 70), fillColor);
+ return;
+ }
+
+ QBrush b = painter->brush();
+ painter->setBrush(fillColor);
+ painter->drawRect(13, 13, 97, 57);
+ painter->setBrush(b);
+ return;
+ }
+
+ QPen oldPen = painter->pen();
+ QPen pen = oldPen;
+ int width = 0;
+ if (option->state & QStyle::State_Selected)
+ width += 2;
+
+ pen.setWidth(width);
+ QBrush b = painter->brush();
+ painter->setBrush(QBrush(fillColor.dark(option->state & QStyle::State_Sunken ? 120 : 100)));
+
+ painter->drawRect(QRect(14, 14, 79, 39));
+ painter->setBrush(b);
+
+ if (option->levelOfDetail >= 1) {
+ painter->setPen(QPen(Qt::gray, 1));
+ painter->drawLine(15, 54, 94, 54);
+ painter->drawLine(94, 53, 94, 15);
+ painter->setPen(QPen(Qt::black, 0));
+ }
+
+ // Draw text
+ if (option->levelOfDetail >= 2) {
+ QFont font("Times", 10);
+ font.setStyleStrategy(QFont::ForceOutline);
+ painter->setFont(font);
+ painter->save();
+ painter->scale(0.1, 0.1);
+ painter->drawText(170, 180, QString("Model: VSC-2000 (Very Small Chip) at %1x%2").arg(x).arg(y));
+ painter->drawText(170, 200, QString("Serial number: DLWR-WEER-123L-ZZ33-SDSJ"));
+ painter->drawText(170, 220, QString("Manufacturer: Chip Manufacturer"));
+ painter->restore();
+ }
+
+ // Draw lines
+ QVarLengthArray<QLineF, 36> lines;
+ if (option->levelOfDetail >= 0.5) {
+ for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
+ lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5));
+ lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62));
+ }
+ for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
+ lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5));
+ lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5));
+ }
+ }
+ if (option->levelOfDetail >= 0.4) {
+ const QLineF lineData[] = {
+ QLineF(25, 35, 35, 35),
+ QLineF(35, 30, 35, 40),
+ QLineF(35, 30, 45, 35),
+ QLineF(35, 40, 45, 35),
+ QLineF(45, 30, 45, 40),
+ QLineF(45, 35, 55, 35)
+ };
+ lines.append(lineData, 6);
+ }
+ painter->drawLines(lines.data(), lines.size());
+
+ // Draw red ink
+ if (stuff.size() > 1) {
+ QPen p = painter->pen();
+ painter->setPen(QPen(Qt::red, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+ painter->setBrush(Qt::NoBrush);
+ QPainterPath path;
+ path.moveTo(stuff.first());
+ for (int i = 1; i < stuff.size(); ++i)
+ path.lineTo(stuff.at(i));
+ painter->drawPath(path);
+ painter->setPen(p);
+ }
+}
+
+void Chip::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsItem::mousePressEvent(event);
+ update();
+}
+
+void Chip::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->modifiers() & Qt::ShiftModifier) {
+ stuff << event->pos();
+ update();
+ return;
+ }
+ QGraphicsItem::mouseMoveEvent(event);
+}
+
+void Chip::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ QGraphicsItem::mouseReleaseEvent(event);
+ update();
+}
diff --git a/demos/chip/chip.h b/demos/chip/chip.h
new file mode 100644
index 0000000..9866f80
--- /dev/null
+++ b/demos/chip/chip.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHIP_H
+#define CHIP_H
+
+#include <QtGui/QColor>
+#include <QtGui/QGraphicsItem>
+
+class Chip : public QGraphicsItem
+{
+public:
+ Chip(const QColor &color, int x, int y);
+
+ QRectF boundingRect() const;
+ QPainterPath shape() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget);
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+private:
+ int x, y;
+ QColor color;
+ QList<QPointF> stuff;
+};
+
+#endif
diff --git a/demos/chip/chip.pro b/demos/chip/chip.pro
new file mode 100644
index 0000000..53fa23b
--- /dev/null
+++ b/demos/chip/chip.pro
@@ -0,0 +1,19 @@
+RESOURCES += images.qrc
+
+HEADERS += mainwindow.h view.h chip.h
+SOURCES += main.cpp
+SOURCES += mainwindow.cpp view.cpp chip.cpp
+
+contains(QT_CONFIG, opengl):QT += opengl
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/chip
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.pro *.html *.doc images
+sources.path = $$[QT_INSTALL_DEMOS]/chip
+INSTALLS += target sources
+
diff --git a/demos/chip/fileprint.png b/demos/chip/fileprint.png
new file mode 100644
index 0000000..ba7c02d
--- /dev/null
+++ b/demos/chip/fileprint.png
Binary files differ
diff --git a/demos/chip/images.qrc b/demos/chip/images.qrc
new file mode 100644
index 0000000..c7cdf0c
--- /dev/null
+++ b/demos/chip/images.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>qt4logo.png</file>
+ <file>zoomin.png</file>
+ <file>zoomout.png</file>
+ <file>rotateleft.png</file>
+ <file>rotateright.png</file>
+ <file>fileprint.png</file>
+</qresource>
+</RCC>
diff --git a/demos/chip/main.cpp b/demos/chip/main.cpp
new file mode 100644
index 0000000..e945026
--- /dev/null
+++ b/demos/chip/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(images);
+
+ QApplication app(argc, argv);
+ app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
diff --git a/demos/chip/mainwindow.cpp b/demos/chip/mainwindow.cpp
new file mode 100644
index 0000000..5222cd4
--- /dev/null
+++ b/demos/chip/mainwindow.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "view.h"
+#include "chip.h"
+
+#include <QtGui>
+
+MainWindow::MainWindow(QWidget *parent)
+ : QWidget(parent)
+{
+ populateScene();
+
+ h1Splitter = new QSplitter;
+ h2Splitter = new QSplitter;
+
+ QSplitter *vSplitter = new QSplitter;
+ vSplitter->setOrientation(Qt::Vertical);
+ vSplitter->addWidget(h1Splitter);
+ vSplitter->addWidget(h2Splitter);
+
+ View *view = new View("Top left view");
+ view->view()->setScene(scene);
+ h1Splitter->addWidget(view);
+
+ view = new View("Top right view");
+ view->view()->setScene(scene);
+ h1Splitter->addWidget(view);
+
+ view = new View("Bottom left view");
+ view->view()->setScene(scene);
+ h2Splitter->addWidget(view);
+
+ view = new View("Bottom right view");
+ view->view()->setScene(scene);
+ h2Splitter->addWidget(view);
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(vSplitter);
+ setLayout(layout);
+
+ setWindowTitle(tr("Chip Demo"));
+}
+
+void MainWindow::populateScene()
+{
+ scene = new QGraphicsScene;
+
+ QImage image(":/qt4logo.png");
+
+ // Populate scene
+ int xx = 0;
+ int nitems = 0;
+ for (int i = -11000; i < 11000; i += 110) {
+ ++xx;
+ int yy = 0;
+ for (int j = -7000; j < 7000; j += 70) {
+ ++yy;
+ qreal x = (i + 11000) / 22000.0;
+ qreal y = (j + 7000) / 14000.0;
+
+ QColor color(image.pixel(int(image.width() * x), int(image.height() * y)));
+ QGraphicsItem *item = new Chip(color, xx, yy);
+ item->setPos(QPointF(i, j));
+ scene->addItem(item);
+
+ ++nitems;
+ }
+ }
+}
diff --git a/demos/chip/mainwindow.h b/demos/chip/mainwindow.h
new file mode 100644
index 0000000..5decca8
--- /dev/null
+++ b/demos/chip/mainwindow.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/qwidget.h>
+
+QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
+QT_FORWARD_DECLARE_CLASS(QGraphicsView)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QSlider)
+QT_FORWARD_DECLARE_CLASS(QSplitter)
+
+class MainWindow : public QWidget
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+private:
+ void setupMatrix();
+ void populateScene();
+
+ QGraphicsScene *scene;
+ QSplitter *h1Splitter;
+ QSplitter *h2Splitter;
+};
+
+#endif
diff --git a/demos/chip/qt4logo.png b/demos/chip/qt4logo.png
new file mode 100644
index 0000000..157e86e
--- /dev/null
+++ b/demos/chip/qt4logo.png
Binary files differ
diff --git a/demos/chip/rotateleft.png b/demos/chip/rotateleft.png
new file mode 100644
index 0000000..8cfa931
--- /dev/null
+++ b/demos/chip/rotateleft.png
Binary files differ
diff --git a/demos/chip/rotateright.png b/demos/chip/rotateright.png
new file mode 100644
index 0000000..ec5e866
--- /dev/null
+++ b/demos/chip/rotateright.png
Binary files differ
diff --git a/demos/chip/view.cpp b/demos/chip/view.cpp
new file mode 100644
index 0000000..f919af3
--- /dev/null
+++ b/demos/chip/view.cpp
@@ -0,0 +1,234 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "view.h"
+
+#include <QtGui>
+#ifndef QT_NO_OPENGL
+#include <QtOpenGL>
+#endif
+
+#include <qmath.h>
+
+View::View(const QString &name, QWidget *parent)
+ : QFrame(parent)
+{
+ setFrameStyle(Sunken | StyledPanel);
+ graphicsView = new QGraphicsView;
+ graphicsView->setRenderHint(QPainter::Antialiasing, false);
+ graphicsView->setDragMode(QGraphicsView::RubberBandDrag);
+ graphicsView->setOptimizationFlags(QGraphicsView::DontSavePainterState);
+ graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
+
+ int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize);
+ QSize iconSize(size, size);
+
+ QToolButton *zoomInIcon = new QToolButton;
+ zoomInIcon->setAutoRepeat(true);
+ zoomInIcon->setAutoRepeatInterval(33);
+ zoomInIcon->setAutoRepeatDelay(0);
+ zoomInIcon->setIcon(QPixmap(":/zoomin.png"));
+ zoomInIcon->setIconSize(iconSize);
+ QToolButton *zoomOutIcon = new QToolButton;
+ zoomOutIcon->setAutoRepeat(true);
+ zoomOutIcon->setAutoRepeatInterval(33);
+ zoomOutIcon->setAutoRepeatDelay(0);
+ zoomOutIcon->setIcon(QPixmap(":/zoomout.png"));
+ zoomOutIcon->setIconSize(iconSize);
+ zoomSlider = new QSlider;
+ zoomSlider->setMinimum(0);
+ zoomSlider->setMaximum(500);
+ zoomSlider->setValue(250);
+ zoomSlider->setTickPosition(QSlider::TicksRight);
+
+ // Zoom slider layout
+ QVBoxLayout *zoomSliderLayout = new QVBoxLayout;
+ zoomSliderLayout->addWidget(zoomInIcon);
+ zoomSliderLayout->addWidget(zoomSlider);
+ zoomSliderLayout->addWidget(zoomOutIcon);
+
+ QToolButton *rotateLeftIcon = new QToolButton;
+ rotateLeftIcon->setIcon(QPixmap(":/rotateleft.png"));
+ rotateLeftIcon->setIconSize(iconSize);
+ QToolButton *rotateRightIcon = new QToolButton;
+ rotateRightIcon->setIcon(QPixmap(":/rotateright.png"));
+ rotateRightIcon->setIconSize(iconSize);
+ rotateSlider = new QSlider;
+ rotateSlider->setOrientation(Qt::Horizontal);
+ rotateSlider->setMinimum(-360);
+ rotateSlider->setMaximum(360);
+ rotateSlider->setValue(0);
+ rotateSlider->setTickPosition(QSlider::TicksBelow);
+
+ // Rotate slider layout
+ QHBoxLayout *rotateSliderLayout = new QHBoxLayout;
+ rotateSliderLayout->addWidget(rotateLeftIcon);
+ rotateSliderLayout->addWidget(rotateSlider);
+ rotateSliderLayout->addWidget(rotateRightIcon);
+
+ resetButton = new QToolButton;
+ resetButton->setText(tr("0"));
+ resetButton->setEnabled(false);
+
+ // Label layout
+ QHBoxLayout *labelLayout = new QHBoxLayout;
+ label = new QLabel(name);
+ antialiasButton = new QToolButton;
+ antialiasButton->setText(tr("Antialiasing"));
+ antialiasButton->setCheckable(true);
+ antialiasButton->setChecked(false);
+ openGlButton = new QToolButton;
+ openGlButton->setText(tr("OpenGL"));
+ openGlButton->setCheckable(true);
+#ifndef QT_NO_OPENGL
+ openGlButton->setEnabled(QGLFormat::hasOpenGL());
+#else
+ openGlButton->setEnabled(false);
+#endif
+ printButton = new QToolButton;
+ printButton->setIcon(QIcon(QPixmap(":/fileprint.png")));
+
+ labelLayout->addWidget(label);
+ labelLayout->addStretch();
+ labelLayout->addWidget(antialiasButton);
+ labelLayout->addWidget(openGlButton);
+ labelLayout->addWidget(printButton);
+
+ QGridLayout *topLayout = new QGridLayout;
+ topLayout->addLayout(labelLayout, 0, 0);
+ topLayout->addWidget(graphicsView, 1, 0);
+ topLayout->addLayout(zoomSliderLayout, 1, 1);
+ topLayout->addLayout(rotateSliderLayout, 2, 0);
+ topLayout->addWidget(resetButton, 2, 1);
+ setLayout(topLayout);
+
+ connect(resetButton, SIGNAL(clicked()), this, SLOT(resetView()));
+ connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix()));
+ connect(rotateSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix()));
+ connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled()));
+ connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled()));
+ connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing()));
+ connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL()));
+ connect(rotateLeftIcon, SIGNAL(clicked()), this, SLOT(rotateLeft()));
+ connect(rotateRightIcon, SIGNAL(clicked()), this, SLOT(rotateRight()));
+ connect(zoomInIcon, SIGNAL(clicked()), this, SLOT(zoomIn()));
+ connect(zoomOutIcon, SIGNAL(clicked()), this, SLOT(zoomOut()));
+ connect(printButton, SIGNAL(clicked()), this, SLOT(print()));
+
+ setupMatrix();
+}
+
+QGraphicsView *View::view() const
+{
+ return graphicsView;
+}
+
+void View::resetView()
+{
+ zoomSlider->setValue(250);
+ rotateSlider->setValue(0);
+ setupMatrix();
+ graphicsView->ensureVisible(QRectF(0, 0, 0, 0));
+
+ resetButton->setEnabled(false);
+}
+
+void View::setResetButtonEnabled()
+{
+ resetButton->setEnabled(true);
+}
+
+void View::setupMatrix()
+{
+ qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50));
+
+ QMatrix matrix;
+ matrix.scale(scale, scale);
+ matrix.rotate(rotateSlider->value());
+
+ graphicsView->setMatrix(matrix);
+ setResetButtonEnabled();
+}
+
+void View::toggleOpenGL()
+{
+#ifndef QT_NO_OPENGL
+ graphicsView->setViewport(openGlButton->isChecked() ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget);
+#endif
+}
+
+void View::toggleAntialiasing()
+{
+ graphicsView->setRenderHint(QPainter::Antialiasing, antialiasButton->isChecked());
+}
+
+void View::print()
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer;
+ QPrintDialog dialog(&printer, this);
+ if (dialog.exec() == QDialog::Accepted) {
+ QPainter painter(&printer);
+ graphicsView->render(&painter);
+ }
+#endif
+}
+
+void View::zoomIn()
+{
+ zoomSlider->setValue(zoomSlider->value() + 1);
+}
+
+void View::zoomOut()
+{
+ zoomSlider->setValue(zoomSlider->value() - 1);
+}
+
+void View::rotateLeft()
+{
+ rotateSlider->setValue(rotateSlider->value() - 10);
+}
+
+void View::rotateRight()
+{
+ rotateSlider->setValue(rotateSlider->value() + 10);
+}
+
diff --git a/demos/chip/view.h b/demos/chip/view.h
new file mode 100644
index 0000000..4987f60
--- /dev/null
+++ b/demos/chip/view.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VIEW_H
+#define VIEW_H
+
+#include <QFrame>
+
+QT_FORWARD_DECLARE_CLASS(QGraphicsView)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QSlider)
+QT_FORWARD_DECLARE_CLASS(QToolButton)
+
+class View : public QFrame
+{
+ Q_OBJECT
+public:
+ View(const QString &name, QWidget *parent = 0);
+
+ QGraphicsView *view() const;
+
+private slots:
+ void resetView();
+ void setResetButtonEnabled();
+ void setupMatrix();
+ void toggleOpenGL();
+ void toggleAntialiasing();
+ void print();
+
+ void zoomIn();
+ void zoomOut();
+ void rotateLeft();
+ void rotateRight();
+
+private:
+ QGraphicsView *graphicsView;
+ QLabel *label;
+ QToolButton *openGlButton;
+ QToolButton *antialiasButton;
+ QToolButton *printButton;
+ QToolButton *resetButton;
+ QSlider *zoomSlider;
+ QSlider *rotateSlider;
+};
+
+#endif
diff --git a/demos/chip/zoomin.png b/demos/chip/zoomin.png
new file mode 100644
index 0000000..8b0daee
--- /dev/null
+++ b/demos/chip/zoomin.png
Binary files differ
diff --git a/demos/chip/zoomout.png b/demos/chip/zoomout.png
new file mode 100644
index 0000000..1575dd2
--- /dev/null
+++ b/demos/chip/zoomout.png
Binary files differ
diff --git a/demos/composition/composition.cpp b/demos/composition/composition.cpp
new file mode 100644
index 0000000..b43c66b
--- /dev/null
+++ b/demos/composition/composition.cpp
@@ -0,0 +1,511 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "composition.h"
+#include <QBoxLayout>
+#include <QRadioButton>
+#include <QTimer>
+#include <QDateTime>
+#include <QSlider>
+#include <QMouseEvent>
+#include <qmath.h>
+
+CompositionWidget::CompositionWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ CompositionRenderer *view = new CompositionRenderer(this);
+
+ QGroupBox *mainGroup = new QGroupBox(parent);
+ mainGroup->setTitle(tr("Composition Modes"));
+
+ QGroupBox *modesGroup = new QGroupBox(mainGroup);
+ modesGroup->setTitle(tr("Mode"));
+
+ rbClear = new QRadioButton(tr("Clear"), modesGroup);
+ connect(rbClear, SIGNAL(clicked()), view, SLOT(setClearMode()));
+ rbSource = new QRadioButton(tr("Source"), modesGroup);
+ connect(rbSource, SIGNAL(clicked()), view, SLOT(setSourceMode()));
+ rbDest = new QRadioButton(tr("Destination"), modesGroup);
+ connect(rbDest, SIGNAL(clicked()), view, SLOT(setDestMode()));
+ rbSourceOver = new QRadioButton(tr("Source Over"), modesGroup);
+ connect(rbSourceOver, SIGNAL(clicked()), view, SLOT(setSourceOverMode()));
+ rbDestOver = new QRadioButton(tr("Destination Over"), modesGroup);
+ connect(rbDestOver, SIGNAL(clicked()), view, SLOT(setDestOverMode()));
+ rbSourceIn = new QRadioButton(tr("Source In"), modesGroup);
+ connect(rbSourceIn, SIGNAL(clicked()), view, SLOT(setSourceInMode()));
+ rbDestIn = new QRadioButton(tr("Dest In"), modesGroup);
+ connect(rbDestIn, SIGNAL(clicked()), view, SLOT(setDestInMode()));
+ rbSourceOut = new QRadioButton(tr("Source Out"), modesGroup);
+ connect(rbSourceOut, SIGNAL(clicked()), view, SLOT(setSourceOutMode()));
+ rbDestOut = new QRadioButton(tr("Dest Out"), modesGroup);
+ connect(rbDestOut, SIGNAL(clicked()), view, SLOT(setDestOutMode()));
+ rbSourceAtop = new QRadioButton(tr("Source Atop"), modesGroup);
+ connect(rbSourceAtop, SIGNAL(clicked()), view, SLOT(setSourceAtopMode()));
+ rbDestAtop = new QRadioButton(tr("Dest Atop"), modesGroup);
+ connect(rbDestAtop, SIGNAL(clicked()), view, SLOT(setDestAtopMode()));
+ rbXor = new QRadioButton(tr("Xor"), modesGroup);
+ connect(rbXor, SIGNAL(clicked()), view, SLOT(setXorMode()));
+
+ rbPlus = new QRadioButton(tr("Plus"), modesGroup);
+ connect(rbPlus, SIGNAL(clicked()), view, SLOT(setPlusMode()));
+ rbMultiply = new QRadioButton(tr("Multiply"), modesGroup);
+ connect(rbMultiply, SIGNAL(clicked()), view, SLOT(setMultiplyMode()));
+ rbScreen = new QRadioButton(tr("Screen"), modesGroup);
+ connect(rbScreen, SIGNAL(clicked()), view, SLOT(setScreenMode()));
+ rbOverlay = new QRadioButton(tr("Overlay"), modesGroup);
+ connect(rbOverlay, SIGNAL(clicked()), view, SLOT(setOverlayMode()));
+ rbDarken = new QRadioButton(tr("Darken"), modesGroup);
+ connect(rbDarken, SIGNAL(clicked()), view, SLOT(setDarkenMode()));
+ rbLighten = new QRadioButton(tr("Lighten"), modesGroup);
+ connect(rbLighten, SIGNAL(clicked()), view, SLOT(setLightenMode()));
+ rbColorDodge = new QRadioButton(tr("Color Dodge"), modesGroup);
+ connect(rbColorDodge, SIGNAL(clicked()), view, SLOT(setColorDodgeMode()));
+ rbColorBurn = new QRadioButton(tr("Color Burn"), modesGroup);
+ connect(rbColorBurn, SIGNAL(clicked()), view, SLOT(setColorBurnMode()));
+ rbHardLight = new QRadioButton(tr("Hard Light"), modesGroup);
+ connect(rbHardLight, SIGNAL(clicked()), view, SLOT(setHardLightMode()));
+ rbSoftLight = new QRadioButton(tr("Soft Light"), modesGroup);
+ connect(rbSoftLight, SIGNAL(clicked()), view, SLOT(setSoftLightMode()));
+ rbDifference = new QRadioButton(tr("Difference"), modesGroup);
+ connect(rbDifference, SIGNAL(clicked()), view, SLOT(setDifferenceMode()));
+ rbExclusion = new QRadioButton(tr("Exclusion"), modesGroup);
+ connect(rbExclusion, SIGNAL(clicked()), view, SLOT(setExclusionMode()));
+
+ QGroupBox *circleColorGroup = new QGroupBox(mainGroup);
+ circleColorGroup->setTitle(tr("Circle color"));
+ QSlider *circleColorSlider = new QSlider(Qt::Horizontal, circleColorGroup);
+ circleColorSlider->setRange(0, 359);
+ circleColorSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ connect(circleColorSlider, SIGNAL(valueChanged(int)), view, SLOT(setCircleColor(int)));
+
+ QGroupBox *circleAlphaGroup = new QGroupBox(mainGroup);
+ circleAlphaGroup->setTitle(tr("Circle alpha"));
+ QSlider *circleAlphaSlider = new QSlider(Qt::Horizontal, circleAlphaGroup);
+ circleAlphaSlider->setRange(0, 255);
+ circleAlphaSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ connect(circleAlphaSlider, SIGNAL(valueChanged(int)), view, SLOT(setCircleAlpha(int)));
+
+ QPushButton *showSourceButton = new QPushButton(mainGroup);
+ showSourceButton->setText(tr("Show Source"));
+#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES)
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(view->usesOpenGL());
+
+ if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers())
+ enableOpenGLButton->hide();
+#endif
+ QPushButton *whatsThisButton = new QPushButton(mainGroup);
+ whatsThisButton->setText(tr("What's This?"));
+ whatsThisButton->setCheckable(true);
+
+ QPushButton *animateButton = new QPushButton(mainGroup);
+ animateButton->setText(tr("Animated"));
+ animateButton->setCheckable(true);
+ animateButton->setChecked(true);
+
+ QHBoxLayout *viewLayout = new QHBoxLayout(this);
+ viewLayout->addWidget(view);
+ viewLayout->addWidget(mainGroup);
+
+ QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
+ mainGroupLayout->addWidget(circleColorGroup);
+ mainGroupLayout->addWidget(circleAlphaGroup);
+ mainGroupLayout->addWidget(modesGroup);
+ mainGroupLayout->addStretch();
+ mainGroupLayout->addWidget(animateButton);
+ mainGroupLayout->addWidget(whatsThisButton);
+ mainGroupLayout->addWidget(showSourceButton);
+#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES)
+ mainGroupLayout->addWidget(enableOpenGLButton);
+#endif
+
+ QGridLayout *modesLayout = new QGridLayout(modesGroup);
+ modesLayout->addWidget(rbClear, 0, 0);
+ modesLayout->addWidget(rbSource, 1, 0);
+ modesLayout->addWidget(rbDest, 2, 0);
+ modesLayout->addWidget(rbSourceOver, 3, 0);
+ modesLayout->addWidget(rbDestOver, 4, 0);
+ modesLayout->addWidget(rbSourceIn, 5, 0);
+ modesLayout->addWidget(rbDestIn, 6, 0);
+ modesLayout->addWidget(rbSourceOut, 7, 0);
+ modesLayout->addWidget(rbDestOut, 8, 0);
+ modesLayout->addWidget(rbSourceAtop, 9, 0);
+ modesLayout->addWidget(rbDestAtop, 10, 0);
+ modesLayout->addWidget(rbXor, 11, 0);
+
+ modesLayout->addWidget(rbPlus, 0, 1);
+ modesLayout->addWidget(rbMultiply, 1, 1);
+ modesLayout->addWidget(rbScreen, 2, 1);
+ modesLayout->addWidget(rbOverlay, 3, 1);
+ modesLayout->addWidget(rbDarken, 4, 1);
+ modesLayout->addWidget(rbLighten, 5, 1);
+ modesLayout->addWidget(rbColorDodge, 6, 1);
+ modesLayout->addWidget(rbColorBurn, 7, 1);
+ modesLayout->addWidget(rbHardLight, 8, 1);
+ modesLayout->addWidget(rbSoftLight, 9, 1);
+ modesLayout->addWidget(rbDifference, 10, 1);
+ modesLayout->addWidget(rbExclusion, 11, 1);
+
+
+ QVBoxLayout *circleColorLayout = new QVBoxLayout(circleColorGroup);
+ circleColorLayout->addWidget(circleColorSlider);
+
+ QVBoxLayout *circleAlphaLayout = new QVBoxLayout(circleAlphaGroup);
+ circleAlphaLayout->addWidget(circleAlphaSlider);
+
+ view->loadDescription(":res/composition/composition.html");
+ view->loadSourceFile(":res/composition/composition.cpp");
+
+ connect(whatsThisButton, SIGNAL(clicked(bool)), view, SLOT(setDescriptionEnabled(bool)));
+ connect(view, SIGNAL(descriptionEnabledChanged(bool)), whatsThisButton, SLOT(setChecked(bool)));
+ connect(showSourceButton, SIGNAL(clicked()), view, SLOT(showSource()));
+#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES)
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), view, SLOT(enableOpenGL(bool)));
+#endif
+ connect(animateButton, SIGNAL(toggled(bool)), view, SLOT(setAnimationEnabled(bool)));
+
+ circleColorSlider->setValue(270);
+ circleAlphaSlider->setValue(200);
+ rbSourceOut->animateClick();
+
+ setWindowTitle(tr("Composition Modes"));
+}
+
+
+void CompositionWidget::nextMode()
+{
+ /*
+ if (!m_animation_enabled)
+ return;
+ if (rbClear->isChecked()) rbSource->animateClick();
+ if (rbSource->isChecked()) rbDest->animateClick();
+ if (rbDest->isChecked()) rbSourceOver->animateClick();
+ if (rbSourceOver->isChecked()) rbDestOver->animateClick();
+ if (rbDestOver->isChecked()) rbSourceIn->animateClick();
+ if (rbSourceIn->isChecked()) rbDestIn->animateClick();
+ if (rbDestIn->isChecked()) rbSourceOut->animateClick();
+ if (rbSourceOut->isChecked()) rbDestOut->animateClick();
+ if (rbDestOut->isChecked()) rbSourceAtop->animateClick();
+ if (rbSourceAtop->isChecked()) rbDestAtop->animateClick();
+ if (rbDestAtop->isChecked()) rbXor->animateClick();
+ if (rbXor->isChecked()) rbClear->animateClick();
+ */
+}
+
+CompositionRenderer::CompositionRenderer(QWidget *parent)
+ : ArthurFrame(parent)
+{
+ m_animation_enabled = true;
+#ifdef Q_WS_QWS
+ m_image = QPixmap(":res/composition/flower.jpg");
+ m_image.setAlphaChannel(QPixmap(":res/composition/flower_alpha.jpg"));
+#else
+ m_image = QImage(":res/composition/flower.jpg");
+ m_image.setAlphaChannel(QImage(":res/composition/flower_alpha.jpg"));
+#endif
+ m_circle_alpha = 127;
+ m_circle_hue = 255;
+ m_current_object = NoObject;
+ m_composition_mode = QPainter::CompositionMode_SourceOut;
+
+ m_circle_pos = QPoint(200, 100);
+
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+#ifdef QT_OPENGL_SUPPORT
+ m_pbuffer = 0;
+ m_pbuffer_size = 1024;
+#endif
+}
+
+QRectF rectangle_around(const QPointF &p, const QSizeF &size = QSize(250, 200))
+{
+ QRectF rect(p, size);
+ rect.translate(-size.width()/2, -size.height()/2);
+ return rect;
+}
+
+void CompositionRenderer::updateCirclePos()
+{
+ if (m_current_object != NoObject)
+ return;
+ QDateTime dt = QDateTime::currentDateTime();
+ qreal t = (dt.toTime_t() * 1000 + dt.time().msec()) / 1000.0;
+
+ qreal x = width() / qreal(2) + (qCos(t*8/11) + qSin(-t)) * width() / qreal(4);
+ qreal y = height() / qreal(2) + (qSin(t*6/7) + qCos(t * qreal(1.5))) * height() / qreal(4);
+
+ setCirclePos(QLineF(m_circle_pos, QPointF(x, y)).pointAt(0.02));
+}
+
+void CompositionRenderer::drawBase(QPainter &p)
+{
+ p.setPen(Qt::NoPen);
+
+ QLinearGradient rect_gradient(0, 0, 0, height());
+ rect_gradient.setColorAt(0, Qt::red);
+ rect_gradient.setColorAt(.17, Qt::yellow);
+ rect_gradient.setColorAt(.33, Qt::green);
+ rect_gradient.setColorAt(.50, Qt::cyan);
+ rect_gradient.setColorAt(.66, Qt::blue);
+ rect_gradient.setColorAt(.81, Qt::magenta);
+ rect_gradient.setColorAt(1, Qt::red);
+ p.setBrush(rect_gradient);
+ p.drawRect(width() / 2, 0, width() / 2, height());
+
+ QLinearGradient alpha_gradient(0, 0, width(), 0);
+ alpha_gradient.setColorAt(0, Qt::white);
+ alpha_gradient.setColorAt(0.2, Qt::white);
+ alpha_gradient.setColorAt(0.5, Qt::transparent);
+ alpha_gradient.setColorAt(0.8, Qt::white);
+ alpha_gradient.setColorAt(1, Qt::white);
+
+ p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ p.setBrush(alpha_gradient);
+ p.drawRect(0, 0, width(), height());
+
+ p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
+
+ p.setPen(Qt::NoPen);
+ p.setRenderHint(QPainter::SmoothPixmapTransform);
+#ifdef Q_WS_QWS
+ p.drawPixmap(rect(), m_image);
+#else
+ p.drawImage(rect(), m_image);
+#endif
+}
+
+void CompositionRenderer::drawSource(QPainter &p)
+{
+ p.setPen(Qt::NoPen);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.setCompositionMode(m_composition_mode);
+
+ QRectF circle_rect = rectangle_around(m_circle_pos);
+ QColor color = QColor::fromHsvF(m_circle_hue / 360.0, 1, 1, m_circle_alpha / 255.0);
+ QLinearGradient circle_gradient(circle_rect.topLeft(), circle_rect.bottomRight());
+ circle_gradient.setColorAt(0, color.light());
+ circle_gradient.setColorAt(0.5, color);
+ circle_gradient.setColorAt(1, color.dark());
+ p.setBrush(circle_gradient);
+
+ p.drawEllipse(circle_rect);
+}
+
+void CompositionRenderer::paint(QPainter *painter)
+{
+#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES)
+ if (usesOpenGL()) {
+
+ int new_pbuf_size = m_pbuffer_size;
+ if (size().width() > m_pbuffer_size ||
+ size().height() > m_pbuffer_size)
+ new_pbuf_size *= 2;
+
+ if (size().width() < m_pbuffer_size/2 &&
+ size().height() < m_pbuffer_size/2)
+ new_pbuf_size /= 2;
+
+ if (!m_pbuffer || new_pbuf_size != m_pbuffer_size) {
+ if (m_pbuffer) {
+ m_pbuffer->deleteTexture(m_base_tex);
+ m_pbuffer->deleteTexture(m_compositing_tex);
+ delete m_pbuffer;
+ }
+
+ m_pbuffer = new QGLPixelBuffer(QSize(new_pbuf_size, new_pbuf_size), QGLFormat::defaultFormat(), glWidget());
+ m_pbuffer->makeCurrent();
+ m_base_tex = m_pbuffer->generateDynamicTexture();
+ m_compositing_tex = m_pbuffer->generateDynamicTexture();
+ m_pbuffer_size = new_pbuf_size;
+ }
+
+ if (size() != m_previous_size) {
+ m_previous_size = size();
+ QPainter p(m_pbuffer);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(QRect(0, 0, m_pbuffer->width(), m_pbuffer->height()), Qt::transparent);
+ drawBase(p);
+ p.end();
+ m_pbuffer->updateDynamicTexture(m_base_tex);
+ }
+
+ qreal x_fraction = width()/float(m_pbuffer->width());
+ qreal y_fraction = height()/float(m_pbuffer->height());
+
+ {
+ QPainter p(m_pbuffer);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(QRect(0, 0, m_pbuffer->width(), m_pbuffer->height()), Qt::transparent);
+
+ p.save();
+ glBindTexture(GL_TEXTURE_2D, m_base_tex);
+ glEnable(GL_TEXTURE_2D);
+ glColor4f(1.,1.,1.,1.);
+
+ glBegin(GL_QUADS);
+ {
+ glTexCoord2f(0, 1.0);
+ glVertex2f(0, 0);
+
+ glTexCoord2f(x_fraction, 1.0);
+ glVertex2f(width(), 0);
+
+ glTexCoord2f(x_fraction, 1.0-y_fraction);
+ glVertex2f(width(), height());
+
+ glTexCoord2f(0, 1.0-y_fraction);
+ glVertex2f(0, height());
+ }
+ glEnd();
+
+ glDisable(GL_TEXTURE_2D);
+ p.restore();
+
+ drawSource(p);
+ p.end();
+ m_pbuffer->updateDynamicTexture(m_compositing_tex);
+ }
+
+ glWidget()->makeCurrent();
+ glBindTexture(GL_TEXTURE_2D, m_compositing_tex);
+ glEnable(GL_TEXTURE_2D);
+ glColor4f(1.,1.,1.,1.);
+ glBegin(GL_QUADS);
+ {
+ glTexCoord2f(0, 1.0);
+ glVertex2f(0, 0);
+
+ glTexCoord2f(x_fraction, 1.0);
+ glVertex2f(width(), 0);
+
+ glTexCoord2f(x_fraction, 1.0-y_fraction);
+ glVertex2f(width(), height());
+
+ glTexCoord2f(0, 1.0-y_fraction);
+ glVertex2f(0, height());
+ }
+ glEnd();
+ glDisable(GL_TEXTURE_2D);
+ } else
+#endif
+ {
+ // using a QImage
+ if (m_buffer.size() != size()) {
+#ifdef Q_WS_QWS
+ m_base_buffer = QPixmap(size());
+ m_base_buffer.fill(Qt::transparent);
+#else
+ m_buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
+ m_base_buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
+
+ m_base_buffer.fill(0);
+#endif
+
+ QPainter p(&m_base_buffer);
+
+ drawBase(p);
+ }
+
+#ifdef Q_WS_QWS
+ m_buffer = m_base_buffer;
+#else
+ memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.numBytes());
+#endif
+
+ {
+ QPainter p(&m_buffer);
+ drawSource(p);
+ }
+
+#ifdef Q_WS_QWS
+ painter->drawPixmap(0, 0, m_buffer);
+#else
+ painter->drawImage(0, 0, m_buffer);
+#endif
+ }
+
+ if (m_animation_enabled && m_current_object == NoObject) {
+ updateCirclePos();
+ }
+}
+
+void CompositionRenderer::mousePressEvent(QMouseEvent *e)
+{
+ setDescriptionEnabled(false);
+
+ QRectF circle = rectangle_around(m_circle_pos);
+
+ if (circle.contains(e->pos())) {
+ m_current_object = Circle;
+ m_offset = circle.center() - e->pos();
+ } else {
+ m_current_object = NoObject;
+ }
+}
+
+void CompositionRenderer::mouseMoveEvent(QMouseEvent *e)
+{
+ if (m_current_object == Circle) setCirclePos(e->pos() + m_offset);
+}
+
+void CompositionRenderer::mouseReleaseEvent(QMouseEvent *)
+{
+ m_current_object = NoObject;
+
+ if (m_animation_enabled)
+ updateCirclePos();
+}
+
+void CompositionRenderer::setCirclePos(const QPointF &pos)
+{
+ const QRect oldRect = rectangle_around(m_circle_pos).toAlignedRect();
+ m_circle_pos = pos;
+ const QRect newRect = rectangle_around(m_circle_pos).toAlignedRect();
+#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES)
+ if (usesOpenGL())
+ update();
+ else
+#endif
+ update(oldRect | newRect);
+}
+
diff --git a/demos/composition/composition.h b/demos/composition/composition.h
new file mode 100644
index 0000000..1d504d0
--- /dev/null
+++ b/demos/composition/composition.h
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMPOSITION_H
+#define COMPOSITION_H
+
+#include "arthurwidgets.h"
+
+#include <QPainter>
+#include <QEvent>
+
+QT_FORWARD_DECLARE_CLASS(QPushButton)
+QT_FORWARD_DECLARE_CLASS(QRadioButton)
+
+#ifdef QT_OPENGL_SUPPORT
+#include <QtOpenGL>
+#endif
+
+class CompositionWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CompositionWidget(QWidget *parent);
+
+public slots:
+void nextMode();
+
+private:
+ bool m_cycle_enabled;
+
+ QRadioButton *rbClear;
+ QRadioButton *rbSource;
+ QRadioButton *rbDest;
+ QRadioButton *rbSourceOver;
+ QRadioButton *rbDestOver;
+ QRadioButton *rbSourceIn;
+ QRadioButton *rbDestIn;
+ QRadioButton *rbSourceOut;
+ QRadioButton *rbDestOut;
+ QRadioButton *rbSourceAtop;
+ QRadioButton *rbDestAtop;
+ QRadioButton *rbXor;
+
+ QRadioButton *rbPlus;
+ QRadioButton *rbMultiply;
+ QRadioButton *rbScreen;
+ QRadioButton *rbOverlay;
+ QRadioButton *rbDarken;
+ QRadioButton *rbLighten;
+ QRadioButton *rbColorDodge;
+ QRadioButton *rbColorBurn;
+ QRadioButton *rbHardLight;
+ QRadioButton *rbSoftLight;
+ QRadioButton *rbDifference;
+ QRadioButton *rbExclusion;
+};
+
+class CompositionRenderer : public ArthurFrame
+{
+ Q_OBJECT
+
+ enum ObjectType { NoObject, Circle, Rectangle, Image };
+
+ Q_PROPERTY(int circleColor READ circleColor WRITE setCircleColor)
+ Q_PROPERTY(int circleAlpha READ circleAlpha WRITE setCircleAlpha)
+ Q_PROPERTY(bool animation READ animationEnabled WRITE setAnimationEnabled)
+
+public:
+ CompositionRenderer(QWidget *parent);
+
+ void paint(QPainter *);
+
+ void mousePressEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void mouseReleaseEvent(QMouseEvent *);
+
+ void setCirclePos(const QPointF &pos);
+
+ QSize sizeHint() const { return QSize(500, 400); }
+
+ bool animationEnabled() const { return m_animation_enabled; }
+ int circleColor() const { return m_circle_hue; }
+ int circleAlpha() const { return m_circle_alpha; }
+
+public slots:
+ void setClearMode() { m_composition_mode = QPainter::CompositionMode_Clear; update(); }
+ void setSourceMode() { m_composition_mode = QPainter::CompositionMode_Source; update(); }
+ void setDestMode() { m_composition_mode = QPainter::CompositionMode_Destination; update(); }
+ void setSourceOverMode() { m_composition_mode = QPainter::CompositionMode_SourceOver; update(); }
+ void setDestOverMode() { m_composition_mode = QPainter::CompositionMode_DestinationOver; update(); }
+ void setSourceInMode() { m_composition_mode = QPainter::CompositionMode_SourceIn; update(); }
+ void setDestInMode() { m_composition_mode = QPainter::CompositionMode_DestinationIn; update(); }
+ void setSourceOutMode() { m_composition_mode = QPainter::CompositionMode_SourceOut; update(); }
+ void setDestOutMode() { m_composition_mode = QPainter::CompositionMode_DestinationOut; update(); }
+ void setSourceAtopMode() { m_composition_mode = QPainter::CompositionMode_SourceAtop; update(); }
+ void setDestAtopMode() { m_composition_mode = QPainter::CompositionMode_DestinationAtop; update(); }
+ void setXorMode() { m_composition_mode = QPainter::CompositionMode_Xor; update(); }
+
+ void setPlusMode() { m_composition_mode = QPainter::CompositionMode_Plus; update(); }
+ void setMultiplyMode() { m_composition_mode = QPainter::CompositionMode_Multiply; update(); }
+ void setScreenMode() { m_composition_mode = QPainter::CompositionMode_Screen; update(); }
+ void setOverlayMode() { m_composition_mode = QPainter::CompositionMode_Overlay; update(); }
+ void setDarkenMode() { m_composition_mode = QPainter::CompositionMode_Darken; update(); }
+ void setLightenMode() { m_composition_mode = QPainter::CompositionMode_Lighten; update(); }
+ void setColorDodgeMode() { m_composition_mode = QPainter::CompositionMode_ColorDodge; update(); }
+ void setColorBurnMode() { m_composition_mode = QPainter::CompositionMode_ColorBurn; update(); }
+ void setHardLightMode() { m_composition_mode = QPainter::CompositionMode_HardLight; update(); }
+ void setSoftLightMode() { m_composition_mode = QPainter::CompositionMode_SoftLight; update(); }
+ void setDifferenceMode() { m_composition_mode = QPainter::CompositionMode_Difference; update(); }
+ void setExclusionMode() { m_composition_mode = QPainter::CompositionMode_Exclusion; update(); }
+
+ void setCircleAlpha(int alpha) { m_circle_alpha = alpha; update(); }
+ void setCircleColor(int hue) { m_circle_hue = hue; update(); }
+ void setAnimationEnabled(bool enabled) { m_animation_enabled = enabled; update(); }
+
+private:
+ void updateCirclePos();
+ void drawBase(QPainter &p);
+ void drawSource(QPainter &p);
+
+ QPainter::CompositionMode m_composition_mode;
+
+#ifdef Q_WS_QWS
+ QPixmap m_image;
+ QPixmap m_buffer;
+ QPixmap m_base_buffer;
+#else
+ QImage m_image;
+ QImage m_buffer;
+ QImage m_base_buffer;
+#endif
+
+ int m_circle_alpha;
+ int m_circle_hue;
+
+ QPointF m_circle_pos;
+ QPointF m_offset;
+
+ ObjectType m_current_object;
+ bool m_animation_enabled;
+
+#ifdef QT_OPENGL_SUPPORT
+ QGLPixelBuffer *m_pbuffer;
+ GLuint m_base_tex;
+ GLuint m_compositing_tex;
+ int m_pbuffer_size; // width==height==size of pbuffer
+ QSize m_previous_size;
+#endif
+};
+
+#endif // COMPOSITION_H
diff --git a/demos/composition/composition.html b/demos/composition/composition.html
new file mode 100644
index 0000000..1848ad8
--- /dev/null
+++ b/demos/composition/composition.html
@@ -0,0 +1,23 @@
+<html>
+
+<h1>Demo for composition modes</h1>
+
+<p>
+ This demo shows some of the more advanced composition modes supported by Qt.
+</p>
+
+<p>
+ The two most common forms of composition are <b>Source</b> and <b>SourceOver</b>.
+ <b>Source</b> is used to draw opaque objects onto a paint device. In this mode,
+ each pixel in the source replaces the corresponding pixel in the destination.
+ In <b>SourceOver</b> composition mode, the source object is transparent and is
+ drawn on top of the destination.
+</p>
+
+<p>
+ In addition to these standard modes, Qt defines the complete set of composition
+ modes as defined by Thomas Porter and Tom Duff. See the <tt>QPainter</tt> documentation
+ for details.
+</p>
+
+</html>
diff --git a/demos/composition/composition.pro b/demos/composition/composition.pro
new file mode 100644
index 0000000..d5c4a60
--- /dev/null
+++ b/demos/composition/composition.pro
@@ -0,0 +1,27 @@
+SOURCES += main.cpp composition.cpp
+HEADERS += composition.h
+
+SHARED_FOLDER = ../shared
+
+include($$SHARED_FOLDER/shared.pri)
+
+RESOURCES += composition.qrc
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/composition
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.jpg *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/composition
+INSTALLS += target sources
+
+win32-msvc* {
+ QMAKE_CXXFLAGS += /Zm500
+ QMAKE_CFLAGS += /Zm500
+}
+
+wince* {
+ DEPLOYMENT_PLUGIN += qjpeg
+}
diff --git a/demos/composition/composition.qrc b/demos/composition/composition.qrc
new file mode 100644
index 0000000..d02c397
--- /dev/null
+++ b/demos/composition/composition.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/composition">
+ <file>composition.cpp</file>
+ <file>composition.html</file>
+ <file>flower.jpg</file>
+ <file>flower_alpha.jpg</file>
+</qresource>
+</RCC>
diff --git a/demos/composition/flower.jpg b/demos/composition/flower.jpg
new file mode 100644
index 0000000..f8e022c
--- /dev/null
+++ b/demos/composition/flower.jpg
Binary files differ
diff --git a/demos/composition/flower_alpha.jpg b/demos/composition/flower_alpha.jpg
new file mode 100644
index 0000000..6a3c2a0
--- /dev/null
+++ b/demos/composition/flower_alpha.jpg
Binary files differ
diff --git a/demos/composition/main.cpp b/demos/composition/main.cpp
new file mode 100644
index 0000000..74055b2
--- /dev/null
+++ b/demos/composition/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "composition.h"
+
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ // Q_INIT_RESOURCE(deform);
+
+ QApplication app(argc, argv);
+
+ CompositionWidget compWidget(0);
+ QStyle *arthurStyle = new ArthurStyle();
+ compWidget.setStyle(arthurStyle);
+
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(&compWidget);
+ foreach (QWidget *w, widgets)
+ w->setStyle(arthurStyle);
+ compWidget.show();
+
+ return app.exec();
+}
diff --git a/demos/deform/deform.pro b/demos/deform/deform.pro
new file mode 100644
index 0000000..db8484d
--- /dev/null
+++ b/demos/deform/deform.pro
@@ -0,0 +1,19 @@
+SOURCES += main.cpp pathdeform.cpp
+HEADERS += pathdeform.h
+
+SHARED_FOLDER = ../shared
+
+include($$SHARED_FOLDER/shared.pri)
+
+RESOURCES += deform.qrc
+
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/deform
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/deform
+INSTALLS += target sources
diff --git a/demos/deform/deform.qrc b/demos/deform/deform.qrc
new file mode 100644
index 0000000..2e59ebc
--- /dev/null
+++ b/demos/deform/deform.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/deform">
+ <file>pathdeform.cpp</file>
+ <file>pathdeform.html</file>
+</qresource>
+</RCC>
diff --git a/demos/deform/main.cpp b/demos/deform/main.cpp
new file mode 100644
index 0000000..e32fa12
--- /dev/null
+++ b/demos/deform/main.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pathdeform.h"
+
+#include <QApplication>
+#include <QDebug>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(deform);
+
+ QApplication app(argc, argv);
+
+ bool smallScreen = false;
+ for (int i=0; i<argc; i++)
+ if (QString(argv[i]) == "-small-screen")
+ smallScreen = true;
+
+ PathDeformWidget deformWidget(0, smallScreen);
+
+ QStyle *arthurStyle = new ArthurStyle();
+ deformWidget.setStyle(arthurStyle);
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(&deformWidget);
+ foreach (QWidget *w, widgets)
+ w->setStyle(arthurStyle);
+
+ if (smallScreen)
+ deformWidget.showFullScreen();
+ else
+ deformWidget.show();
+
+ return app.exec();
+}
diff --git a/demos/deform/pathdeform.cpp b/demos/deform/pathdeform.cpp
new file mode 100644
index 0000000..2e1d89a
--- /dev/null
+++ b/demos/deform/pathdeform.cpp
@@ -0,0 +1,647 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pathdeform.h"
+
+#include <QApplication>
+#include <QtDebug>
+#include <QMouseEvent>
+#include <QTimerEvent>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPainter>
+#include <QSlider>
+#include <QLabel>
+#include <QDesktopWidget>
+#include <qmath.h>
+
+
+PathDeformControls::PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen)
+ : QWidget(parent)
+{
+ m_renderer = renderer;
+
+ if (smallScreen)
+ layoutForSmallScreen();
+ else
+ layoutForDesktop();
+}
+
+
+void PathDeformControls::layoutForDesktop()
+{
+ QGroupBox* mainGroup = new QGroupBox(this);
+ mainGroup->setTitle(tr("Controls"));
+
+ QGroupBox *radiusGroup = new QGroupBox(mainGroup);
+ radiusGroup->setTitle(tr("Lens Radius"));
+ QSlider *radiusSlider = new QSlider(Qt::Horizontal, radiusGroup);
+ radiusSlider->setRange(15, 150);
+ radiusSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *deformGroup = new QGroupBox(mainGroup);
+ deformGroup->setTitle(tr("Deformation"));
+ QSlider *deformSlider = new QSlider(Qt::Horizontal, deformGroup);
+ deformSlider->setRange(-100, 100);
+ deformSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *fontSizeGroup = new QGroupBox(mainGroup);
+ fontSizeGroup->setTitle(tr("Font Size"));
+ QSlider *fontSizeSlider = new QSlider(Qt::Horizontal, fontSizeGroup);
+ fontSizeSlider->setRange(16, 200);
+ fontSizeSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ QGroupBox *textGroup = new QGroupBox(mainGroup);
+ textGroup->setTitle(tr("Text"));
+ QLineEdit *textInput = new QLineEdit(textGroup);
+
+ QPushButton *animateButton = new QPushButton(mainGroup);
+ animateButton->setText(tr("Animated"));
+ animateButton->setCheckable(true);
+
+ QPushButton *showSourceButton = new QPushButton(mainGroup);
+ showSourceButton->setText(tr("Show Source"));
+
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(m_renderer->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+
+ QPushButton *whatsThisButton = new QPushButton(mainGroup);
+ whatsThisButton->setText(tr("What's This?"));
+ whatsThisButton->setCheckable(true);
+
+
+ mainGroup->setFixedWidth(180);
+
+ QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
+ mainGroupLayout->addWidget(radiusGroup);
+ mainGroupLayout->addWidget(deformGroup);
+ mainGroupLayout->addWidget(fontSizeGroup);
+ mainGroupLayout->addWidget(textGroup);
+ mainGroupLayout->addWidget(animateButton);
+ mainGroupLayout->addStretch(1);
+#ifdef QT_OPENGL_SUPPORT
+ mainGroupLayout->addWidget(enableOpenGLButton);
+#endif
+ mainGroupLayout->addWidget(showSourceButton);
+ mainGroupLayout->addWidget(whatsThisButton);
+
+ QVBoxLayout *radiusGroupLayout = new QVBoxLayout(radiusGroup);
+ radiusGroupLayout->addWidget(radiusSlider);
+
+ QVBoxLayout *deformGroupLayout = new QVBoxLayout(deformGroup);
+ deformGroupLayout->addWidget(deformSlider);
+
+ QVBoxLayout *fontSizeGroupLayout = new QVBoxLayout(fontSizeGroup);
+ fontSizeGroupLayout->addWidget(fontSizeSlider);
+
+ QVBoxLayout *textGroupLayout = new QVBoxLayout(textGroup);
+ textGroupLayout->addWidget(textInput);
+
+ QVBoxLayout * mainLayout = new QVBoxLayout(this);
+ mainLayout->addWidget(mainGroup);
+ mainLayout->setMargin(0);
+
+ connect(radiusSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setRadius(int)));
+ connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int)));
+ connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int)));
+ connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool)));
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+#endif
+
+ connect(textInput, SIGNAL(textChanged(QString)), m_renderer, SLOT(setText(QString)));
+ connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
+ whatsThisButton, SLOT(setChecked(bool)));
+ connect(whatsThisButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setDescriptionEnabled(bool)));
+ connect(showSourceButton, SIGNAL(clicked()), m_renderer, SLOT(showSource()));
+
+ animateButton->animateClick();
+ deformSlider->setValue(80);
+ fontSizeSlider->setValue(120);
+ radiusSlider->setValue(100);
+ textInput->setText(tr("Qt"));
+}
+
+void PathDeformControls::layoutForSmallScreen()
+{
+ QGroupBox* mainGroup = new QGroupBox(this);
+ mainGroup->setTitle(tr("Controls"));
+
+ QLabel *radiusLabel = new QLabel(mainGroup);
+ radiusLabel->setText(tr("Lens Radius:"));
+ QSlider *radiusSlider = new QSlider(Qt::Horizontal, mainGroup);
+ radiusSlider->setRange(15, 150);
+ radiusSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+
+ QLabel *deformLabel = new QLabel(mainGroup);
+ deformLabel->setText(tr("Deformation:"));
+ QSlider *deformSlider = new QSlider(Qt::Horizontal, mainGroup);
+ deformSlider->setRange(-100, 100);
+ deformSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+
+ QLabel *fontSizeLabel = new QLabel(mainGroup);
+ fontSizeLabel->setText(tr("Font Size:"));
+ QSlider *fontSizeSlider = new QSlider(Qt::Horizontal, mainGroup);
+ fontSizeSlider->setRange(16, 200);
+ fontSizeSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+
+ QPushButton *animateButton = new QPushButton(tr("Animated"), mainGroup);
+ animateButton->setCheckable(true);
+
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(mainGroup);
+ enableOpenGLButton->setChecked(m_renderer->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+
+ QPushButton *quitButton = new QPushButton(tr("Quit"), mainGroup);
+ QPushButton *okButton = new QPushButton(tr("OK"), mainGroup);
+
+
+ QGridLayout *mainGroupLayout = new QGridLayout(mainGroup);
+ mainGroupLayout->setMargin(0);
+ mainGroupLayout->addWidget(radiusLabel, 0, 0, Qt::AlignRight);
+ mainGroupLayout->addWidget(radiusSlider, 0, 1);
+ mainGroupLayout->addWidget(deformLabel, 1, 0, Qt::AlignRight);
+ mainGroupLayout->addWidget(deformSlider, 1, 1);
+ mainGroupLayout->addWidget(fontSizeLabel, 2, 0, Qt::AlignRight);
+ mainGroupLayout->addWidget(fontSizeSlider, 2, 1);
+ mainGroupLayout->addWidget(animateButton, 3,0, 1,2);
+#ifdef QT_OPENGL_SUPPORT
+ mainGroupLayout->addWidget(enableOpenGLButton, 4,0, 1,2);
+#endif
+
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ mainLayout->addWidget(mainGroup);
+ mainLayout->addStretch(1);
+ mainLayout->addWidget(okButton);
+ mainLayout->addWidget(quitButton);
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(emitQuitSignal()));
+ connect(okButton, SIGNAL(clicked()), this, SLOT(emitOkSignal()));
+ connect(radiusSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setRadius(int)));
+ connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int)));
+ connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int)));
+ connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool)));
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+#endif
+
+
+ animateButton->animateClick();
+ deformSlider->setValue(80);
+ fontSizeSlider->setValue(120);
+
+ QRect screen_size = QApplication::desktop()->screenGeometry();
+ radiusSlider->setValue(qMin(screen_size.width(), screen_size.height())/5);
+ m_renderer->setText(tr("Qt"));
+}
+
+
+void PathDeformControls::emitQuitSignal()
+{ emit quitPressed(); }
+
+void PathDeformControls::emitOkSignal()
+{ emit okPressed(); }
+
+
+PathDeformWidget::PathDeformWidget(QWidget *parent, bool smallScreen)
+ : QWidget(parent)
+{
+ setWindowTitle(tr("Vector Deformation"));
+
+ m_renderer = new PathDeformRenderer(this, smallScreen);
+ m_renderer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+ // Layouts
+ QHBoxLayout *mainLayout = new QHBoxLayout(this);
+ mainLayout->addWidget(m_renderer);
+
+ m_controls = new PathDeformControls(0, m_renderer, smallScreen);
+ m_controls->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+ if (!smallScreen)
+ mainLayout->addWidget(m_controls);
+
+ m_renderer->loadSourceFile(":res/deform/pathdeform.cpp");
+ m_renderer->loadDescription(":res/deform/pathdeform.html");
+ m_renderer->setDescriptionEnabled(false);
+
+ connect(m_renderer, SIGNAL(clicked()), this, SLOT(showControls()));
+ connect(m_controls, SIGNAL(okPressed()), this, SLOT(hideControls()));
+ connect(m_controls, SIGNAL(quitPressed()), QApplication::instance(), SLOT(quit()));
+}
+
+
+void PathDeformWidget::showControls()
+{
+ m_controls->showFullScreen();
+}
+
+void PathDeformWidget::hideControls()
+{
+ m_controls->hide();
+}
+
+void PathDeformWidget::setStyle( QStyle * style )
+{
+ QWidget::setStyle(style);
+ if (m_controls != 0)
+ {
+ m_controls->setStyle(style);
+
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(m_controls);
+ foreach (QWidget *w, widgets)
+ w->setStyle(style);
+ }
+}
+
+static inline QRect circle_bounds(const QPointF &center, qreal radius, qreal compensation)
+{
+ return QRect(qRound(center.x() - radius - compensation),
+ qRound(center.y() - radius - compensation),
+ qRound((radius + compensation) * 2),
+ qRound((radius + compensation) * 2));
+
+}
+
+const int LENS_EXTENT = 10;
+
+PathDeformRenderer::PathDeformRenderer(QWidget *widget, bool smallScreen)
+ : ArthurFrame(widget)
+{
+ m_radius = 100;
+ m_pos = QPointF(m_radius, m_radius);
+ m_direction = QPointF(1, 1);
+ m_fontSize = 24;
+ m_animated = true;
+ m_repaintTimer.start(25, this);
+ m_repaintTracker.start();
+ m_intensity = 100;
+ m_smallScreen = smallScreen;
+
+// m_fpsTimer.start(1000, this);
+// m_fpsCounter = 0;
+
+ generateLensPixmap();
+}
+
+void PathDeformRenderer::setText(const QString &text)
+{
+ m_text = text;
+
+ QFont f("times new roman,utopia");
+ f.setStyleStrategy(QFont::ForceOutline);
+ f.setPointSize(m_fontSize);
+ f.setStyleHint(QFont::Times);
+
+ QFontMetrics fm(f);
+
+ m_paths.clear();
+ m_pathBounds = QRect();
+
+ QPointF advance(0, 0);
+
+ bool do_quick = true;
+ for (int i=0; i<text.size(); ++i) {
+ if (text.at(i).unicode() >= 0x4ff && text.at(i).unicode() <= 0x1e00) {
+ do_quick = false;
+ break;
+ }
+ }
+
+ if (do_quick) {
+ for (int i=0; i<text.size(); ++i) {
+ QPainterPath path;
+ path.addText(advance, f, text.mid(i, 1));
+ m_pathBounds |= path.boundingRect();
+ m_paths << path;
+ advance += QPointF(fm.width(text.mid(i, 1)), 0);
+ }
+ } else {
+ QPainterPath path;
+ path.addText(advance, f, text);
+ m_pathBounds |= path.boundingRect();
+ m_paths << path;
+ }
+
+ for (int i=0; i<m_paths.size(); ++i)
+ m_paths[i] = m_paths[i] * QMatrix(1, 0, 0, 1, -m_pathBounds.x(), -m_pathBounds.y());
+
+ update();
+}
+
+
+void PathDeformRenderer::generateLensPixmap()
+{
+ qreal rad = m_radius + LENS_EXTENT;
+
+ QRect bounds = circle_bounds(QPointF(), rad, 0);
+
+ QPainter painter;
+
+ if (preferImage()) {
+ m_lens_image = QImage(bounds.size(), QImage::Format_ARGB32_Premultiplied);
+ m_lens_image.fill(0);
+ painter.begin(&m_lens_image);
+ } else {
+ m_lens_pixmap = QPixmap(bounds.size());
+ m_lens_pixmap.fill(Qt::transparent);
+ painter.begin(&m_lens_pixmap);
+ }
+
+ QRadialGradient gr(rad, rad, rad, 3 * rad / 5, 3 * rad / 5);
+ gr.setColorAt(0.0, QColor(255, 255, 255, 191));
+ gr.setColorAt(0.2, QColor(255, 255, 127, 191));
+ gr.setColorAt(0.9, QColor(150, 150, 200, 63));
+ gr.setColorAt(0.95, QColor(0, 0, 0, 127));
+ gr.setColorAt(1, QColor(0, 0, 0, 0));
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.setBrush(gr);
+ painter.setPen(Qt::NoPen);
+ painter.drawEllipse(0, 0, bounds.width(), bounds.height());
+}
+
+
+void PathDeformRenderer::setAnimated(bool animated)
+{
+ m_animated = animated;
+
+ if (m_animated) {
+// m_fpsTimer.start(1000, this);
+// m_fpsCounter = 0;
+ m_repaintTimer.start(25, this);
+ m_repaintTracker.start();
+ } else {
+// m_fpsTimer.stop();
+ m_repaintTimer.stop();
+ }
+}
+
+void PathDeformRenderer::timerEvent(QTimerEvent *e)
+{
+
+ if (e->timerId() == m_repaintTimer.timerId()) {
+
+ if (QLineF(QPointF(0,0), m_direction).length() > 1)
+ m_direction *= 0.995;
+ qreal time = m_repaintTracker.restart();
+
+ QRect rectBefore = circle_bounds(m_pos, m_radius, m_fontSize);
+
+ qreal dx = m_direction.x();
+ qreal dy = m_direction.y();
+ if (time > 0) {
+ dx = dx * time * .1;
+ dy = dy * time * .1;
+ }
+
+ m_pos += QPointF(dx, dy);
+
+
+
+ if (m_pos.x() - m_radius < 0) {
+ m_direction.setX(-m_direction.x());
+ m_pos.setX(m_radius);
+ } else if (m_pos.x() + m_radius > width()) {
+ m_direction.setX(-m_direction.x());
+ m_pos.setX(width() - m_radius);
+ }
+
+ if (m_pos.y() - m_radius < 0) {
+ m_direction.setY(-m_direction.y());
+ m_pos.setY(m_radius);
+ } else if (m_pos.y() + m_radius > height()) {
+ m_direction.setY(-m_direction.y());
+ m_pos.setY(height() - m_radius);
+ }
+
+#ifdef QT_OPENGL_SUPPORT
+ if (usesOpenGL()) {
+ update();
+ } else
+#endif
+ {
+ QRect rectAfter = circle_bounds(m_pos, m_radius, m_fontSize);
+ update(rectAfter | rectBefore);
+ QApplication::syncX();
+ }
+ }
+// else if (e->timerId() == m_fpsTimer.timerId()) {
+// printf("fps: %d\n", m_fpsCounter);
+// emit frameRate(m_fpsCounter);
+// m_fpsCounter = 0;
+
+// }
+}
+
+void PathDeformRenderer::mousePressEvent(QMouseEvent *e)
+{
+ setDescriptionEnabled(false);
+
+ m_repaintTimer.stop();
+ m_offset = QPointF();
+ if (QLineF(m_pos, e->pos()).length() <= m_radius)
+ m_offset = m_pos - e->pos();
+
+ m_mousePress = e->pos();
+
+ // If we're not running in small screen mode, always assume we're dragging
+ m_mouseDrag = !m_smallScreen;
+
+ mouseMoveEvent(e);
+}
+
+void PathDeformRenderer::mouseReleaseEvent(QMouseEvent *e)
+{
+ if (e->buttons() == Qt::NoButton && m_animated) {
+ m_repaintTimer.start(10, this);
+ m_repaintTracker.start();
+ }
+
+ if (!m_mouseDrag && m_smallScreen)
+ emit clicked();
+}
+
+void PathDeformRenderer::mouseMoveEvent(QMouseEvent *e)
+{
+ if (!m_mouseDrag && (QLineF(m_mousePress, e->pos()).length() > 25.0) )
+ m_mouseDrag = true;
+
+ if (m_mouseDrag) {
+ QRect rectBefore = circle_bounds(m_pos, m_radius, m_fontSize);
+ if (e->type() == QEvent::MouseMove) {
+ QLineF line(m_pos, e->pos() + m_offset);
+ line.setLength(line.length() * .1);
+ QPointF dir(line.dx(), line.dy());
+ m_direction = (m_direction + dir) / 2;
+ }
+ m_pos = e->pos() + m_offset;
+#ifdef QT_OPENGL_SUPPORT
+ if (usesOpenGL()) {
+ update();
+ } else
+#endif
+ {
+ QRect rectAfter = circle_bounds(m_pos, m_radius, m_fontSize);
+ update(rectBefore | rectAfter);
+ }
+ }
+}
+
+QPainterPath PathDeformRenderer::lensDeform(const QPainterPath &source, const QPointF &offset)
+{
+ QPainterPath path;
+ path.addPath(source);
+
+ qreal flip = m_intensity / qreal(100);
+
+ for (int i=0; i<path.elementCount(); ++i) {
+ const QPainterPath::Element &e = path.elementAt(i);
+
+ qreal x = e.x + offset.x();
+ qreal y = e.y + offset.y();
+
+ qreal dx = x - m_pos.x();
+ qreal dy = y - m_pos.y();
+ qreal len = m_radius - qSqrt(dx * dx + dy * dy);
+
+ if (len > 0) {
+ path.setElementPositionAt(i,
+ x + flip * dx * len / m_radius,
+ y + flip * dy * len / m_radius);
+ } else {
+ path.setElementPositionAt(i, x, y);
+ }
+
+ }
+
+ return path;
+}
+
+
+void PathDeformRenderer::paint(QPainter *painter)
+{
+ int pad_x = 5;
+ int pad_y = 5;
+
+ int skip_x = qRound(m_pathBounds.width() + pad_x + m_fontSize/2);
+ int skip_y = qRound(m_pathBounds.height() + pad_y);
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(Qt::black);
+
+ QRectF clip(painter->clipPath().boundingRect());
+
+ int overlap = pad_x / 2;
+
+ for (int start_y=0; start_y < height(); start_y += skip_y) {
+
+ if (start_y > clip.bottom())
+ break;
+
+ int start_x = -overlap;
+ for (; start_x < width(); start_x += skip_x) {
+
+ if (start_y + skip_y >= clip.top() &&
+ start_x + skip_x >= clip.left() &&
+ start_x <= clip.right()) {
+ for (int i=0; i<m_paths.size(); ++i) {
+ QPainterPath path = lensDeform(m_paths[i], QPointF(start_x, start_y));
+ painter->drawPath(path);
+ }
+ }
+ }
+ overlap = skip_x - (start_x - width());
+
+ }
+
+ if (preferImage()) {
+ painter->drawImage(m_pos - QPointF(m_radius + LENS_EXTENT, m_radius + LENS_EXTENT),
+ m_lens_image);
+ } else {
+ painter->drawPixmap(m_pos - QPointF(m_radius + LENS_EXTENT, m_radius + LENS_EXTENT),
+ m_lens_pixmap);
+ }
+}
+
+
+
+void PathDeformRenderer::setRadius(int radius)
+{
+ qreal max = qMax(m_radius, (qreal)radius);
+ m_radius = radius;
+ generateLensPixmap();
+ if (!m_animated || m_radius < max) {
+#ifdef QT_OPENGL_SUPPORT
+ if (usesOpenGL()) {
+ update();
+ } else
+#endif
+ {
+ update(circle_bounds(m_pos, max, m_fontSize));
+ }
+ }
+}
+
+void PathDeformRenderer::setIntensity(int intensity)
+{
+ m_intensity = intensity;
+ if (!m_animated) {
+#ifdef QT_OPENGL_SUPPORT
+ if (usesOpenGL()) {
+ update();
+ } else
+#endif
+ {
+ update(circle_bounds(m_pos, m_radius, m_fontSize));
+ }
+ }
+}
diff --git a/demos/deform/pathdeform.h b/demos/deform/pathdeform.h
new file mode 100644
index 0000000..45edb26
--- /dev/null
+++ b/demos/deform/pathdeform.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PATHDEFORM_H
+#define PATHDEFORM_H
+
+#include "arthurwidgets.h"
+
+#include <QPainterPath>
+#include <QBasicTimer>
+#include <QDateTime>
+
+class PathDeformRenderer : public ArthurFrame
+{
+ Q_OBJECT
+ Q_PROPERTY(bool animated READ animated WRITE setAnimated)
+ Q_PROPERTY(int radius READ radius WRITE setRadius)
+ Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize)
+ Q_PROPERTY(int intensity READ intensity WRITE setIntensity)
+ Q_PROPERTY(QString text READ text WRITE setText)
+
+public:
+ PathDeformRenderer(QWidget *widget, bool smallScreen = false);
+
+ void paint(QPainter *painter);
+
+ void mousePressEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void timerEvent(QTimerEvent *e);
+
+ QSize sizeHint() const { return QSize(600, 500); }
+
+ bool animated() const { return m_animated; }
+ int radius() const { return int(m_radius); }
+ int fontSize() const { return m_fontSize; }
+ int intensity() const { return int(m_intensity); }
+ QString text() const { return m_text; }
+
+public slots:
+ void setRadius(int radius);
+ void setFontSize(int fontSize) { m_fontSize = fontSize; setText(m_text); }
+ void setText(const QString &text);
+ void setIntensity(int intensity);
+
+ void setAnimated(bool animated);
+
+signals:
+ void clicked();
+// void frameRate(double fps);
+
+private:
+ void generateLensPixmap();
+ QPainterPath lensDeform(const QPainterPath &source, const QPointF &offset);
+
+ QBasicTimer m_repaintTimer;
+// QBasicTimer m_fpsTimer;
+// int m_fpsCounter;
+ QTime m_repaintTracker;
+
+ QVector<QPainterPath> m_paths;
+ QVector<QPointF> m_advances;
+ QRectF m_pathBounds;
+ QString m_text;
+
+ QPixmap m_lens_pixmap;
+ QImage m_lens_image;
+
+ int m_fontSize;
+ bool m_animated;
+
+ qreal m_intensity;
+ qreal m_radius;
+ QPointF m_pos;
+ QPointF m_offset;
+ QPointF m_direction;
+ QPointF m_mousePress;
+ bool m_mouseDrag;
+ bool m_smallScreen;
+};
+
+class PathDeformControls : public QWidget
+{
+ Q_OBJECT
+public:
+ PathDeformControls(QWidget *parent, PathDeformRenderer* renderer, bool smallScreen);
+signals:
+ void okPressed();
+ void quitPressed();
+private:
+ PathDeformRenderer* m_renderer;
+ void layoutForDesktop();
+ void layoutForSmallScreen();
+private slots:
+ void emitQuitSignal();
+ void emitOkSignal();
+};
+
+class PathDeformWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ PathDeformWidget(QWidget *parent, bool smallScreen);
+ void setStyle ( QStyle * style );
+
+private:
+ PathDeformRenderer *m_renderer;
+ PathDeformControls *m_controls;
+
+private slots:
+ void showControls();
+ void hideControls();
+};
+
+#endif // PATHDEFORM_H
diff --git a/demos/deform/pathdeform.html b/demos/deform/pathdeform.html
new file mode 100644
index 0000000..b3f63a8
--- /dev/null
+++ b/demos/deform/pathdeform.html
@@ -0,0 +1,24 @@
+<html>
+<center>
+<h2>Vector deformation</h2>
+</center>
+
+<p>This demo shows how to use advanced vector techniques to draw text
+using a <code>QPainterPath</code>.</p>
+
+<p>We define a vector deformation field in the shape of a lens and apply
+this to all points in a path. This means that what is rendered on
+screen is not pixel manipulation, but modified vector representations of
+the glyphs themselves. This is visible from the high quality of the
+antialiased edges for the deformed glyphs.</p>
+
+<p>To get a fairly complex path we allow the user to type in text and
+convert the text to paths. This is done using the
+<code>QPainterPath::addText()</code> function.</p>
+
+<p>The lens is drawn using a single call to <code>drawEllipse()</code>, using
+a <code>QRadialGradient</code> to fill it with a specialized color table,
+giving the effect of the Sun's reflection and a drop shadow. The lens
+is cached as a pixmap for better performance.</p>
+
+</html>
diff --git a/demos/demos.pro b/demos/demos.pro
new file mode 100644
index 0000000..9248ab8
--- /dev/null
+++ b/demos/demos.pro
@@ -0,0 +1,73 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ demos_shared \
+ demos_deform \
+ demos_gradients \
+ demos_pathstroke \
+ demos_affine \
+ demos_composition \
+ demos_books \
+ demos_interview \
+ demos_mainwindow \
+ demos_spreadsheet \
+ demos_textedit \
+ demos_chip \
+ demos_embeddeddialogs \
+ demos_undo
+
+contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles1cl):!contains(QT_CONFIG, opengles2):{
+SUBDIRS += demos_boxes
+}
+
+mac*: SUBDIRS += demos_macmainwindow
+wince*|embedded: SUBDIRS += embedded
+
+!contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin
+
+!cross_compile:{
+contains(QT_BUILD_PARTS, tools):{
+!wince*:SUBDIRS += demos_sqlbrowser demos_qtdemo
+wince*: SUBDIRS += demos_sqlbrowser
+}
+}
+contains(QT_CONFIG, phonon)!static:SUBDIRS += demos_mediaplayer
+contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):SUBDIRS += demos_browser
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_DEMOS]
+INSTALLS += sources
+
+demos_chip.subdir = chip
+demos_embeddeddialogs.subdir = embeddeddialogs
+demos_shared.subdir = shared
+demos_deform.subdir = deform
+demos_gradients.subdir = gradients
+demos_pathstroke.subdir = pathstroke
+demos_affine.subdir = affine
+demos_composition.subdir = composition
+demos_books.subdir = books
+demos_interview.subdir = interview
+demos_macmainwindow.subdir = macmainwindow
+demos_mainwindow.subdir = mainwindow
+demos_spreadsheet.subdir = spreadsheet
+demos_textedit.subdir = textedit
+demos_arthurplugin.subdir = arthurplugin
+demos_sqlbrowser.subdir = sqlbrowser
+demos_undo.subdir = undo
+demos_qtdemo.subdir = qtdemo
+demos_mediaplayer.subdir = mediaplayer
+
+demos_browser.subdir = browser
+
+demos_boxes.subdir = boxes
+
+#CONFIG += ordered
+!ordered {
+ demos_affine.depends = demos_shared
+ demos_deform.depends = demos_shared
+ demos_gradients.depends = demos_shared
+ demos_composition.depends = demos_shared
+ demos_arthurplugin.depends = demos_shared
+ demos_pathstroke.depends = demos_shared
+}
diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro
new file mode 100644
index 0000000..7428b9f
--- /dev/null
+++ b/demos/embedded/embedded.pro
@@ -0,0 +1,13 @@
+TEMPLATE = subdirs
+SUBDIRS = styledemo
+
+contains(QT_CONFIG, svg) {
+ SUBDIRS += embeddedsvgviewer \
+ fluidlauncher
+}
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_DEMOS]/embedded
+INSTALLS += sources
+
diff --git a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp
new file mode 100644
index 0000000..1bd99c9
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QPainter>
+#include <QApplication>
+
+#include "embeddedsvgviewer.h"
+
+
+
+EmbeddedSvgViewer::EmbeddedSvgViewer(const QString &filePath)
+{
+ qApp->setStyleSheet(" QSlider:vertical { width: 50px; } \
+ QSlider::groove:vertical { border: 1px solid black; border-radius: 3px; width: 6px; } \
+ QSlider::handle:vertical { height: 25px; margin: 0 -22px; image: url(':/files/v-slider-handle.svg'); } \
+ ");
+
+ m_renderer = new QSvgRenderer(filePath);
+ m_imageSize = m_renderer->viewBox().size();
+
+ m_viewBoxCenter = (QPointF(m_imageSize.width() / qreal(2.0), m_imageSize.height() / qreal(2.0)));
+
+ m_zoomSlider = new QSlider(Qt::Vertical, this);
+ m_zoomSlider->setMaximum(150);
+ m_zoomSlider->setMinimum(1);
+
+ connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setZoom(int)));
+ m_zoomSlider->setValue(100);
+
+ m_quitButton = new QPushButton("Quit", this);
+
+ connect(m_quitButton, SIGNAL(pressed()), QApplication::instance(), SLOT(quit()));
+
+ if (m_renderer->animated())
+ connect(m_renderer, SIGNAL(repaintNeeded()), this, SLOT(update()));
+
+}
+
+void EmbeddedSvgViewer::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event)
+ QPainter painter(this);
+ m_renderer->setViewBox(m_viewBox);
+ m_renderer->render(&painter);
+}
+
+
+void EmbeddedSvgViewer::mouseMoveEvent ( QMouseEvent * event )
+{
+ int incX = int((event->globalX() - m_mousePress.x()) * m_imageScale);
+ int incY = int((event->globalY() - m_mousePress.y()) * m_imageScale);
+
+ QPointF newCenter;
+ newCenter.setX(m_viewBoxCenterOnMousePress.x() - incX);
+ newCenter.setY(m_viewBoxCenterOnMousePress.y() - incY);
+
+ QRectF newViewBox = getViewBox(newCenter);
+
+
+ // Do a bounded move on the horizontal:
+ if ( (newViewBox.left() >= m_viewBoxBounds.left()) &&
+ (newViewBox.right() <= m_viewBoxBounds.right()) )
+ {
+ m_viewBoxCenter.setX(newCenter.x());
+ m_viewBox.setLeft(newViewBox.left());
+ m_viewBox.setRight(newViewBox.right());
+ }
+
+ // do a bounded move on the vertical:
+ if ( (newViewBox.top() >= m_viewBoxBounds.top()) &&
+ (newViewBox.bottom() <= m_viewBoxBounds.bottom()) )
+ {
+ m_viewBoxCenter.setY(newCenter.y());
+ m_viewBox.setTop(newViewBox.top());
+ m_viewBox.setBottom(newViewBox.bottom());
+ }
+
+ update();
+}
+
+void EmbeddedSvgViewer::mousePressEvent ( QMouseEvent * event )
+{
+ m_viewBoxCenterOnMousePress = m_viewBoxCenter;
+ m_mousePress = event->globalPos();
+}
+
+
+QRectF EmbeddedSvgViewer::getViewBox(QPointF viewBoxCenter)
+{
+ QRectF result;
+ result.setLeft(viewBoxCenter.x() - (m_viewBoxSize.width() / 2));
+ result.setTop(viewBoxCenter.y() - (m_viewBoxSize.height() / 2));
+ result.setRight(viewBoxCenter.x() + (m_viewBoxSize.width() / 2));
+ result.setBottom(viewBoxCenter.y() + (m_viewBoxSize.height() / 2));
+ return result;
+}
+
+void EmbeddedSvgViewer::updateImageScale()
+{
+ m_imageScale = qMax( (qreal)m_imageSize.width() / (qreal)width(),
+ (qreal)m_imageSize.height() / (qreal)height())*m_zoomLevel;
+
+ m_viewBoxSize.setWidth((qreal)width() * m_imageScale);
+ m_viewBoxSize.setHeight((qreal)height() * m_imageScale);
+}
+
+
+void EmbeddedSvgViewer::resizeEvent ( QResizeEvent * event )
+{
+ qreal origZoom = m_zoomLevel;
+
+ // Get the new bounds:
+ m_zoomLevel = 1.0;
+ updateImageScale();
+ m_viewBoxBounds = getViewBox(QPointF(m_imageSize.width() / 2.0, m_imageSize.height() / 2.0));
+
+ m_zoomLevel = origZoom;
+ updateImageScale();
+ m_viewBox = getViewBox(m_viewBoxCenter);
+
+ QRect sliderRect;
+ sliderRect.setLeft(width() - m_zoomSlider->sizeHint().width());
+ sliderRect.setRight(width());
+ sliderRect.setTop(height()/4);
+ sliderRect.setBottom(height() - (height()/4));
+ m_zoomSlider->setGeometry(sliderRect);
+}
+
+
+void EmbeddedSvgViewer::setZoom(int newZoom)
+{
+ m_zoomLevel = qreal(newZoom) / qreal(100);
+
+ updateImageScale();
+ m_viewBox = getViewBox(m_viewBoxCenter);
+
+ update();
+}
+
+
+
+
+
diff --git a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.h b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.h
new file mode 100644
index 0000000..c0af3cf
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EMBEDDED_SVG_VIEWER_H
+#define EMBEDDED_SVG_VIEWER_H
+
+#include <QWidget>
+#include <QString>
+#include <QSvgRenderer>
+#include <QSize>
+#include <QMouseEvent>
+#include <QSlider>
+#include <QPushButton>
+
+class EmbeddedSvgViewer : public QWidget
+{
+ Q_OBJECT
+public:
+ EmbeddedSvgViewer(const QString& filePath);
+ virtual void paintEvent(QPaintEvent *event);
+ void mouseMoveEvent ( QMouseEvent * event );
+ void mousePressEvent ( QMouseEvent * event );
+ void resizeEvent ( QResizeEvent * event );
+
+public slots:
+ void setZoom(int); // 100 <= newZoom < 0
+
+private:
+ QSvgRenderer* m_renderer;
+ QSlider* m_zoomSlider;
+ QPushButton* m_quitButton;
+ QSize m_imageSize;
+ qreal m_zoomLevel;
+ qreal m_imageScale; // How many Image coords 1 widget pixel is worth
+
+ QRectF m_viewBox;
+ QRectF m_viewBoxBounds;
+ QSizeF m_viewBoxSize;
+ QPointF m_viewBoxCenter;
+ QPointF m_viewBoxCenterOnMousePress;
+ QPoint m_mousePress;
+
+ void updateImageScale();
+ QRectF getViewBox(QPointF viewBoxCenter);
+};
+
+
+
+#endif
diff --git a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.pro b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.pro
new file mode 100644
index 0000000..505e607
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+QT += svg
+
+# Input
+HEADERS += embeddedsvgviewer.h
+SOURCES += embeddedsvgviewer.cpp main.cpp
+RESOURCES += embeddedsvgviewer.qrc
+
+target.path = $$[QT_INSTALL_DEMOS]/embedded/embeddedsvgviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.svg files
+sources.path = $$[QT_INSTALL_DEMOS]/embedded/embeddedsvgviewer
+INSTALLS += target sources
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qsvg
+}
diff --git a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.qrc b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.qrc
new file mode 100644
index 0000000..bb02118
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>files/v-slider-handle.svg</file>
+ <file>files/default.svg</file>
+</qresource>
+</RCC>
+
diff --git a/demos/embedded/embeddedsvgviewer/files/default.svg b/demos/embedded/embeddedsvgviewer/files/default.svg
new file mode 100644
index 0000000..c28a711
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/files/default.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="400px"
+ height="400px"
+ baseProfile="tiny"
+ id="svg8268"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ sodipodi:docname="simple2.svg"
+ sodipodi:docbase="/nfs/OpenMoko/SVGs"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <metadata
+ id="metadata8283">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8281" />
+ <sodipodi:namedview
+ inkscape:window-height="917"
+ inkscape:window-width="1324"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="2.1452345"
+ inkscape:cx="185.25"
+ inkscape:cy="214.75"
+ inkscape:window-x="0"
+ inkscape:window-y="30"
+ inkscape:current-layer="svg8268" />
+ <g
+ stroke="DarkBlue"
+ stroke-width="10"
+ id="g8270">
+ <rect
+ fill="blue"
+ fill-opacity="0.5"
+ x="25"
+ y="25"
+ width="175"
+ height="175"
+ id="rect8272" />
+ </g>
+ <circle
+ cx="200"
+ cy="200"
+ r="75"
+ id="circle8274"
+ sodipodi:cx="200"
+ sodipodi:cy="200"
+ sodipodi:rx="75"
+ sodipodi:ry="75"
+ transform="translate(-26.104372,21.909027)"
+ style="fill:#ffff00;fill-opacity:0.5;stroke:#000000" />
+ <polygon
+ fill="green"
+ stroke="black"
+ fill-opacity="0.5"
+ stroke-width="1"
+ points="200,225 350,225 275,350"
+ id="polygon8276" />
+ <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.50196081"
+ d="M 303.7037,50.705207 C 173.88522,56.588264 90.320951,92.710345 162.85059,120.82533 C 211.91719,139.84524 196.63811,214.12391 233.86243,192.59259 C 284.31755,163.4083 299.34345,193.75691 311.11111,187.30159 C 347.88407,167.12924 269.34382,134.85785 303.81608,114.5167 C 394.71183,60.881583 332.47907,46.043712 303.7037,50.705207 z "
+ id="path8289"
+ sodipodi:nodetypes="cssssc" />
+</svg>
diff --git a/demos/embedded/embeddedsvgviewer/files/v-slider-handle.svg b/demos/embedded/embeddedsvgviewer/files/v-slider-handle.svg
new file mode 100644
index 0000000..4ee87f8
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/files/v-slider-handle.svg
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="50"
+ height="25"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ version="1.0"
+ sodipodi:docbase="/home/tcooksey/Projects/qt-4.4/demos/embedded/embeddedsvgviewer/files"
+ sodipodi:docname="v-slider-handle.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2158">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop2160" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop2162" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2158"
+ id="linearGradient2164"
+ x1="26.10779"
+ y1="9.1025448"
+ x2="26.10779"
+ y2="-0.01334004"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9876687,0,0,2.5969342,0.3086332,-0.476397)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="12.256878"
+ inkscape:cx="42.920885"
+ inkscape:cy="4.2252457"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ width="50px"
+ height="25px"
+ inkscape:window-width="1282"
+ inkscape:window-height="879"
+ inkscape:window-x="137"
+ inkscape:window-y="30" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="fill:url(#linearGradient2164);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.60153389px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 10.191803,24.254577 C 26.804559,24.254577 25.309299,24.303278 39.985656,24.303278 C 52.503796,24.303278 51.963217,0.91536797 40.722957,0.91536797 C 13.837108,0.91536797 16.298612,0.86901372 10.385089,0.86901372 C -2.0345215,0.86901372 -2.5249912,24.254577 10.191803,24.254577 z "
+ id="path2162"
+ sodipodi:nodetypes="csssc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#868686;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2166"
+ sodipodi:cx="9.4232807"
+ sodipodi:cy="13.169908"
+ sodipodi:rx="2.2436383"
+ sodipodi:ry="1.9580842"
+ d="M 9.4232808,15.127992 A 2.2436383,1.9580842 0 1 1 9.4232808,11.211823 L 9.4232807,13.169908 z"
+ sodipodi:start="1.5707963"
+ sodipodi:end="4.712389"
+ transform="matrix(4.3804554,0,0,2.228386,-25.247974,-16.463284)" />
+ </g>
+</svg>
diff --git a/demos/embedded/embeddedsvgviewer/main.cpp b/demos/embedded/embeddedsvgviewer/main.cpp
new file mode 100644
index 0000000..80f92d6
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QDebug>
+
+#include "embeddedsvgviewer.h"
+
+int main(int argc, char** argv)
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(embeddedsvgviewer);
+
+ QString filePath;
+
+ if (argc == 1)
+ filePath = QLatin1String(":/files/default.svg");
+ else if (argc == 2)
+ filePath = argv[1];
+ else {
+ qDebug() << QLatin1String("Please specify an svg file!");
+ return -1;
+ }
+
+ EmbeddedSvgViewer viewer(filePath);
+
+ viewer.showFullScreen();
+
+ return app.exec();
+}
diff --git a/demos/embedded/embeddedsvgviewer/shapes.svg b/demos/embedded/embeddedsvgviewer/shapes.svg
new file mode 100644
index 0000000..c28a711
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/shapes.svg
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="400px"
+ height="400px"
+ baseProfile="tiny"
+ id="svg8268"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ sodipodi:docname="simple2.svg"
+ sodipodi:docbase="/nfs/OpenMoko/SVGs"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <metadata
+ id="metadata8283">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8281" />
+ <sodipodi:namedview
+ inkscape:window-height="917"
+ inkscape:window-width="1324"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="2.1452345"
+ inkscape:cx="185.25"
+ inkscape:cy="214.75"
+ inkscape:window-x="0"
+ inkscape:window-y="30"
+ inkscape:current-layer="svg8268" />
+ <g
+ stroke="DarkBlue"
+ stroke-width="10"
+ id="g8270">
+ <rect
+ fill="blue"
+ fill-opacity="0.5"
+ x="25"
+ y="25"
+ width="175"
+ height="175"
+ id="rect8272" />
+ </g>
+ <circle
+ cx="200"
+ cy="200"
+ r="75"
+ id="circle8274"
+ sodipodi:cx="200"
+ sodipodi:cy="200"
+ sodipodi:rx="75"
+ sodipodi:ry="75"
+ transform="translate(-26.104372,21.909027)"
+ style="fill:#ffff00;fill-opacity:0.5;stroke:#000000" />
+ <polygon
+ fill="green"
+ stroke="black"
+ fill-opacity="0.5"
+ stroke-width="1"
+ points="200,225 350,225 275,350"
+ id="polygon8276" />
+ <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.50196081"
+ d="M 303.7037,50.705207 C 173.88522,56.588264 90.320951,92.710345 162.85059,120.82533 C 211.91719,139.84524 196.63811,214.12391 233.86243,192.59259 C 284.31755,163.4083 299.34345,193.75691 311.11111,187.30159 C 347.88407,167.12924 269.34382,134.85785 303.81608,114.5167 C 394.71183,60.881583 332.47907,46.043712 303.7037,50.705207 z "
+ id="path8289"
+ sodipodi:nodetypes="cssssc" />
+</svg>
diff --git a/demos/embedded/embeddedsvgviewer/spheres.svg b/demos/embedded/embeddedsvgviewer/spheres.svg
new file mode 100644
index 0000000..e108777
--- /dev/null
+++ b/demos/embedded/embeddedsvgviewer/spheres.svg
@@ -0,0 +1,81 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="8cm" height="8cm" viewBox="0 0 400 400"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Gradient filled spheres with different colors.</desc>
+ <defs>
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadowGrad)" cx="0" cy="0" r="100" />
+ </defs>
+ <g fill="#ffee99" stroke="none" >
+ <rect x="0" y="0" width="400" height="400" />
+ </g>
+ <g fill="white" stroke="none" >
+ <rect x="0" y="175" width="400" height="225" />
+ </g>
+ <g transform="translate(200,290) scale(2.0,1.0) rotate(45)" >
+ <rect fill="#a6ce39" x="-69" y="-69" width="138" height="138" />
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ begin="0s" dur="10s" fill="freeze" />
+ </g>
+ <g transform="translate(200,175)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,240)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,275)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,325)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+</svg>
diff --git a/demos/embedded/fluidlauncher/config.xml b/demos/embedded/fluidlauncher/config.xml
new file mode 100644
index 0000000..6cb4be7
--- /dev/null
+++ b/demos/embedded/fluidlauncher/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<demolauncher>
+ <demos>
+ <example filename="../embeddedsvgviewer/embeddedsvgviewer" name="SVG Viewer" image="screenshots/embeddedsvgviewer.png" args="../embeddedsvgviewer/shapes.svg"/>
+ <example filename="../styledemo/styledemo" name="Stylesheets" image="screenshots/styledemo.png"/>
+ <example filename="../../deform/deform" name="Vector Deformation" image="screenshots/deform.png" args="-small-screen"/>
+ <example filename="../../pathstroke/pathstroke" name="Path Stroking" image="screenshots/pathstroke.png" args="-small-screen"/>
+ <example filename="../../../examples/widgets/wiggly/wiggly" name="Wiggly Text" image="screenshots/wiggly.png"/>
+ <example filename="../../../examples/painting/concentriccircles/concentriccircles" name="Concentric Circles" image="screenshots/concentriccircles.png"/>
+<!--
+ <example filename="../../../examples/graphicsview/elasticnodes/elasticnodes" name="Elastic Nodes" image="screenshots/elasticnodes.png" args="-maximize"/>
+ <example filename="../../../examples/assistant/simpletextviewer/simpletextviewer" name="Simple Text Viewer" image="../../../doc/html/images/simpletextviewer-mainwindow.png"/>
+ <example filename="../../../examples/dialogs/trivialwizard/trivialwizard" name="Trivial Wizard" image="../../../doc/html/images/trivialwizard-example-conclusion.png"/>
+ <example filename="../../../examples/draganddrop/draggableicons/draggableicons" name="Draggable Icons" image="../../../doc/html/images/draggableicons-example.png"/>
+ <example filename="../../../examples/draganddrop/draggabletext/draggabletext" name="Draggable Text" image="../../../doc/html/images/draggabletext-example.png"/>
+ <example filename="../../../examples/draganddrop/fridgemagnets/fridgemagnets" name="Fridge Magnets" image="../../../doc/html/images/fridgemagnets-example.png"/>
+ <example filename="../../../examples/graphicsview/collidingmice/collidingmice" name="Colliding Mice" image="../../../doc/html/images/collidingmice-example.png"/>
+ <example filename="../../../examples/graphicsview/padnavigator/padnavigator" name="Pad Navigator" image="../../../doc/html/images/padnavigator-example.png"/>
+ <example filename="../../../examples/itemviews/coloreditorfactory/coloreditorfactory" name="Color Editor" image="../../../doc/html/images/coloreditorfactoryimage.png"/>
+-->
+
+ </demos>
+ <slideshow timeout="60000" interval="10000">
+ <imagedir dir="slides"/>
+ </slideshow>
+</demolauncher>
diff --git a/demos/embedded/fluidlauncher/config_wince/config.xml b/demos/embedded/fluidlauncher/config_wince/config.xml
new file mode 100644
index 0000000..3b57770
--- /dev/null
+++ b/demos/embedded/fluidlauncher/config_wince/config.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<demolauncher>
+ <demos>
+ <example filename="embeddedsvgviewer" name="SVG Viewer" image="screenshots/embeddedsvgviewer.png" args="shapes.svg"/>
+ <example filename="styledemo" name="Stylesheets" image="screenshots/styledemo.png"/>
+ <example filename="deform" name="Vector Deformation" image="screenshots/deform.png" args="-small-screen"/>
+ <example filename="pathstroke" name="Path Stroking" image="screenshots/pathstroke.png" args="-small-screen"/>
+ <example filename="wiggly" name="Wiggly Text" image="screenshots/wiggly.png"/>
+ </demos>
+ <slideshow timeout="60000" interval="10000">
+ <imagedir dir="slides"/>
+ </slideshow>
+</demolauncher>
diff --git a/demos/embedded/fluidlauncher/demoapplication.cpp b/demos/embedded/fluidlauncher/demoapplication.cpp
new file mode 100644
index 0000000..c5abfb9
--- /dev/null
+++ b/demos/embedded/fluidlauncher/demoapplication.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include <QDir>
+
+#include "demoapplication.h"
+
+
+
+DemoApplication::DemoApplication(QString executableName, QString caption, QString imageName, QStringList args)
+{
+ imagePath = imageName;
+ appCaption = caption;
+
+ if (executableName[0] == QLatin1Char('/'))
+ executablePath = executableName;
+ else
+ executablePath = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + executableName);
+
+ arguments = args;
+
+ process.setProcessChannelMode(QProcess::ForwardedChannels);
+
+ QObject::connect( &process, SIGNAL(finished(int, QProcess::ExitStatus)),
+ this, SLOT(processFinished(int, QProcess::ExitStatus)));
+
+ QObject::connect( &process, SIGNAL(error(QProcess::ProcessError)),
+ this, SLOT(processError(QProcess::ProcessError)));
+
+ QObject::connect( &process, SIGNAL(started()), this, SLOT(processStarted()));
+}
+
+
+void DemoApplication::launch()
+{
+ process.start(executablePath, arguments);
+}
+
+QImage* DemoApplication::getImage()
+{
+ return new QImage(imagePath);
+}
+
+QString DemoApplication::getCaption()
+{
+ return appCaption;
+}
+
+void DemoApplication::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
+{
+ Q_UNUSED(exitCode);
+ Q_UNUSED(exitStatus);
+
+ emit demoFinished();
+
+ QObject::disconnect(this, SIGNAL(demoStarted()), 0, 0);
+ QObject::disconnect(this, SIGNAL(demoFinished()), 0, 0);
+}
+
+void DemoApplication::processError(QProcess::ProcessError err)
+{
+ qDebug() << "Process error: " << err;
+ if (err == QProcess::Crashed)
+ emit demoFinished();
+}
+
+
+void DemoApplication::processStarted()
+{
+ emit demoStarted();
+}
+
+
+
+
+
+
diff --git a/demos/embedded/fluidlauncher/demoapplication.h b/demos/embedded/fluidlauncher/demoapplication.h
new file mode 100644
index 0000000..84ce1d4
--- /dev/null
+++ b/demos/embedded/fluidlauncher/demoapplication.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DEMO_APPLICATION_H
+#define DEMO_APPLICATION_H
+
+#include <QPixmap>
+#include <QImage>
+#include <QProcess>
+#include <QObject>
+
+class DemoApplication : public QObject
+{
+ Q_OBJECT
+
+public:
+ DemoApplication(QString executableName, QString caption, QString imageName, QStringList args);
+ void launch();
+ QImage* getImage();
+ QString getCaption();
+
+public slots:
+ void processStarted();
+ void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
+ void processError(QProcess::ProcessError err);
+
+signals:
+ void demoStarted();
+ void demoFinished();
+
+private:
+ QString imagePath;
+ QString appCaption;
+ QString executablePath;
+ QStringList arguments;
+ QProcess process;
+};
+
+
+
+
+#endif
+
+
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.cpp b/demos/embedded/fluidlauncher/fluidlauncher.cpp
new file mode 100644
index 0000000..f80e6ca
--- /dev/null
+++ b/demos/embedded/fluidlauncher/fluidlauncher.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtXml>
+
+#include "fluidlauncher.h"
+
+
+#define DEFAULT_INPUT_TIMEOUT 10000
+
+FluidLauncher::FluidLauncher(QStringList* args)
+{
+ pictureFlowWidget = new PictureFlow();
+ slideShowWidget = new SlideShow();
+ inputTimer = new QTimer();
+
+ QRect screen_size = QApplication::desktop()->screenGeometry();
+
+ QObject::connect(pictureFlowWidget, SIGNAL(itemActivated(int)), this, SLOT(launchApplication(int)));
+ QObject::connect(pictureFlowWidget, SIGNAL(inputReceived()), this, SLOT(resetInputTimeout()));
+ QObject::connect(slideShowWidget, SIGNAL(inputReceived()), this, SLOT(switchToLauncher()));
+ QObject::connect(inputTimer, SIGNAL(timeout()), this, SLOT(inputTimedout()));
+
+ inputTimer->setSingleShot(true);
+ inputTimer->setInterval(DEFAULT_INPUT_TIMEOUT);
+
+ pictureFlowWidget->setSlideSize(QSize( (screen_size.width()*2)/5, (screen_size.height()*2)/5 ));
+
+ bool success;
+ int configIndex = args->indexOf("-config");
+ if ( (configIndex != -1) && (configIndex != args->count()-1) )
+ success = loadConfig(args->at(configIndex+1));
+ else
+ success = loadConfig("config.xml");
+
+ if (success) {
+ populatePictureFlow();
+
+ pictureFlowWidget->showFullScreen();
+ inputTimer->start();
+ } else {
+ pictureFlowWidget->setAttribute(Qt::WA_DeleteOnClose, true);
+ pictureFlowWidget->close();
+ }
+
+}
+
+FluidLauncher::~FluidLauncher()
+{
+ delete pictureFlowWidget;
+ delete slideShowWidget;
+}
+
+bool FluidLauncher::loadConfig(QString configPath)
+{
+ QFile xmlFile(configPath);
+
+ if (!xmlFile.exists() || (xmlFile.error() != QFile::NoError)) {
+ qDebug() << "ERROR: Unable to open config file " << configPath;
+ return false;
+ }
+
+ slideShowWidget->clearImages();
+
+ QDomDocument xmlDoc;
+ xmlDoc.setContent(&xmlFile, true);
+
+ QDomElement rootElement = xmlDoc.documentElement();
+
+ // Process the demos node:
+ QDomNodeList demoNodes = rootElement.firstChildElement("demos").elementsByTagName("example");
+ for (int i=0; i<demoNodes.size(); i++) {
+ QDomElement element = demoNodes.item(i).toElement();
+
+ if (element.hasAttribute("filename")) {
+ DemoApplication* newDemo = new DemoApplication(
+ element.attribute("filename"),
+ element.attribute("name", "Unamed Demo"),
+ element.attribute("image"),
+ element.attribute("args").split(" "));
+ demoList.append(newDemo);
+ }
+ }
+
+
+ // Process the slideshow node:
+ QDomElement slideshowElement = rootElement.firstChildElement("slideshow");
+
+ if (slideshowElement.hasAttribute("timeout")) {
+ bool valid;
+ int timeout = slideshowElement.attribute("timeout").toInt(&valid);
+ if (valid)
+ inputTimer->setInterval(timeout);
+ }
+
+ if (slideshowElement.hasAttribute("interval")) {
+ bool valid;
+ int interval = slideshowElement.attribute("interval").toInt(&valid);
+ if (valid)
+ slideShowWidget->setSlideInterval(interval);
+ }
+
+ for (QDomNode node=slideshowElement.firstChild(); !node.isNull(); node=node.nextSibling()) {
+ QDomElement element = node.toElement();
+
+ if (element.tagName() == "imagedir")
+ slideShowWidget->addImageDir(element.attribute("dir"));
+ else if (element.tagName() == "image")
+ slideShowWidget->addImage(element.attribute("image"));
+ }
+
+ // Append an exit Item
+ DemoApplication* exitItem = new DemoApplication(QString(), QLatin1String("Exit Embedded Demo"), QString(), QStringList());
+ demoList.append(exitItem);
+
+ return true;
+}
+
+
+void FluidLauncher::populatePictureFlow()
+{
+ pictureFlowWidget->setSlideCount(demoList.count());
+
+ for (int i=demoList.count()-1; i>=0; --i) {
+ pictureFlowWidget->setSlide(i, *(demoList[i]->getImage()));
+ pictureFlowWidget->setSlideCaption(i, demoList[i]->getCaption());
+ }
+
+ pictureFlowWidget->setCurrentSlide(demoList.count()/2);
+}
+
+
+void FluidLauncher::launchApplication(int index)
+{
+ // NOTE: Clearing the caches will free up more memory for the demo but will cause
+ // a delay upon returning, as items are reloaded.
+ //pictureFlowWidget->clearCaches();
+
+ if (index == demoList.size() -1) {
+ qApp->quit();
+ return;
+ }
+
+ inputTimer->stop();
+ pictureFlowWidget->hide();
+
+ QObject::connect(demoList[index], SIGNAL(demoFinished()), this, SLOT(demoFinished()));
+
+ demoList[index]->launch();
+}
+
+
+void FluidLauncher::switchToLauncher()
+{
+ slideShowWidget->stopShow();
+ inputTimer->start();
+}
+
+
+void FluidLauncher::resetInputTimeout()
+{
+ if (inputTimer->isActive())
+ inputTimer->start();
+}
+
+void FluidLauncher::inputTimedout()
+{
+ switchToSlideshow();
+}
+
+
+void FluidLauncher::switchToSlideshow()
+{
+ inputTimer->stop();
+ slideShowWidget->startShow();
+}
+
+void FluidLauncher::demoFinished()
+{
+ pictureFlowWidget->showFullScreen();
+ inputTimer->start();
+}
+
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.h b/demos/embedded/fluidlauncher/fluidlauncher.h
new file mode 100644
index 0000000..3f4c1fe
--- /dev/null
+++ b/demos/embedded/fluidlauncher/fluidlauncher.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FLUID_LAUNCHER_H
+#define FLUID_LAUNCHER_H
+
+#include <QtGui>
+#include <QTimer>
+
+#include "pictureflow.h"
+#include "slideshow.h"
+#include "demoapplication.h"
+
+class FluidLauncher : public QObject
+{
+ Q_OBJECT
+
+public:
+ FluidLauncher(QStringList* args);
+ ~FluidLauncher();
+
+public slots:
+ void launchApplication(int index);
+ void switchToLauncher();
+ void resetInputTimeout();
+ void inputTimedout();
+ void demoFinished();
+
+private:
+ PictureFlow* pictureFlowWidget;
+ SlideShow* slideShowWidget;
+ QTimer* inputTimer;
+ QList<DemoApplication*> demoList;
+
+ bool loadConfig(QString configPath);
+ void populatePictureFlow();
+ void switchToSlideshow();
+
+
+};
+
+
+#endif
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
new file mode 100644
index 0000000..76d12ad
--- /dev/null
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -0,0 +1,56 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += xml
+
+# Input
+HEADERS += \
+ demoapplication.h \
+ fluidlauncher.h \
+ pictureflow.h \
+ slideshow.h
+
+SOURCES += \
+ demoapplication.cpp \
+ fluidlauncher.cpp \
+ main.cpp \
+ pictureflow.cpp \
+ slideshow.cpp
+
+embedded{
+ target.path = $$[QT_INSTALL_DEMOS]/embedded/fluidlauncher
+ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html config.xml screenshots slides
+ sources.path = $$[QT_INSTALL_DEMOS]/embedded/fluidlauncher
+ INSTALLS += target sources
+}
+
+wince*{
+ QT += svg
+
+ BUILD_DIR = release
+ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
+ BUILD_DIR = debug
+ }
+
+ executables.sources = \
+ $$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/$${BUILD_DIR}/embeddedsvgviewer.exe \
+ $$QT_BUILD_TREE/demos/embedded/styledemo/$${BUILD_DIR}/styledemo.exe \
+ $$QT_BUILD_TREE/demos/deform/$${BUILD_DIR}/deform.exe \
+ $$QT_BUILD_TREE/demos/pathstroke/$${BUILD_DIR}/pathstroke.exe \
+ $$QT_BUILD_TREE/examples/graphicsview/elasticnodes/$${BUILD_DIR}/elasticnodes.exe \
+ $$QT_BUILD_TREE/examples/widgets/wiggly/$${BUILD_DIR}/wiggly.exe \
+ $$QT_BUILD_TREE/examples/painting/concentriccircles/$${BUILD_DIR}/concentriccircles.exe
+
+ executables.path = .
+
+ files.sources = $$PWD/screenshots $$PWD/slides $$PWD/../embeddedsvgviewer/shapes.svg
+ files.path = .
+
+ config.sources = $$PWD/config_wince/config.xml
+ config.path = .
+
+ DEPLOYMENT += config files executables
+
+ DEPLOYMENT_PLUGIN += qgif qjpeg qmng qsvg
+}
diff --git a/demos/embedded/fluidlauncher/main.cpp b/demos/embedded/fluidlauncher/main.cpp
new file mode 100644
index 0000000..05e820e
--- /dev/null
+++ b/demos/embedded/fluidlauncher/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QStringList>
+
+#include "fluidlauncher.h"
+
+
+int main(int argc, char** argv)
+{
+ QStringList originalArgs;
+
+ for (int i=0; i<argc; i++)
+ originalArgs << argv[i];
+
+ QApplication app(argc, argv);
+ FluidLauncher launcher(&originalArgs);
+
+
+ return app.exec();
+}
diff --git a/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp
new file mode 100644
index 0000000..04bbf05
--- /dev/null
+++ b/demos/embedded/fluidlauncher/pictureflow.cpp
@@ -0,0 +1,1420 @@
+/****************************************************************************
+**
+* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+* This is version of the Pictureflow animated image show widget modified by Nokia.
+*
+* $QT_BEGIN_LICENSE:LGPL$
+* No Commercial Usage
+* This file contains pre-release code and may not be distributed.
+* You may use this file in accordance with the terms and conditions
+* contained in the either Technology Preview License Agreement or the
+* Beta Release License Agreement.
+*
+* GNU Lesser General Public License Usage
+* Alternatively, this file may be used under the terms of the GNU Lesser
+* General Public License version 2.1 as published by the Free Software
+* Foundation and appearing in the file LICENSE.LGPL included in the
+* packaging of this file. Please review the following information to
+* ensure the GNU Lesser General Public License version 2.1 requirements
+* will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+*
+* In addition, as a special exception, Nokia gives you certain
+* additional rights. These rights are described in the Nokia Qt LGPL
+* Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+* package.
+*
+* GNU General Public License Usage
+* Alternatively, this file may be used under the terms of the GNU
+* General Public License version 3.0 as published by the Free Software
+* Foundation and appearing in the file LICENSE.GPL included in the
+* packaging of this file. Please review the following information to
+* ensure the GNU General Public License version 3.0 requirements will be
+* met: http://www.gnu.org/copyleft/gpl.html.
+*
+* If you are unsure which license is appropriate for your use, please
+* contact the sales department at qt-sales@nokia.com.
+* $QT_END_LICENSE$
+*
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* * Neither the name of the <organization> nor the
+* names of its contributors may be used to endorse or promote products
+* derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY TROLLTECH ASA ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+****************************************************************************/
+
+/*
+ ORIGINAL COPYRIGHT HEADER
+ PictureFlow - animated image show widget
+ http://pictureflow.googlecode.com
+
+ Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
+
+#include "pictureflow.h"
+
+#include <QBasicTimer>
+#include <QCache>
+#include <QImage>
+#include <QKeyEvent>
+#include <QPainter>
+#include <QPixmap>
+#include <QTimer>
+#include <QVector>
+#include <QWidget>
+#include <QTime>
+
+#ifdef Q_WS_QWS
+#include <QScreen>
+#endif
+
+#include <QDebug>
+
+// uncomment this to enable bilinear filtering for texture mapping
+// gives much better rendering, at the cost of memory space
+// #define PICTUREFLOW_BILINEAR_FILTER
+
+// for fixed-point arithmetic, we need minimum 32-bit long
+// long long (64-bit) might be useful for multiplication and division
+typedef long PFreal;
+
+typedef unsigned short QRgb565;
+
+#define RGB565_RED_MASK 0xF800
+#define RGB565_GREEN_MASK 0x07E0
+#define RGB565_BLUE_MASK 0x001F
+
+#define RGB565_RED(col) ((col&RGB565_RED_MASK)>>11)
+#define RGB565_GREEN(col) ((col&RGB565_GREEN_MASK)>>5)
+#define RGB565_BLUE(col) (col&RGB565_BLUE_MASK)
+
+#define PFREAL_SHIFT 10
+#define PFREAL_FACTOR (1 << PFREAL_SHIFT)
+#define PFREAL_ONE (1 << PFREAL_SHIFT)
+#define PFREAL_HALF (PFREAL_ONE >> 1)
+
+inline PFreal fmul(PFreal a, PFreal b)
+{
+ return ((long long)(a))*((long long)(b)) >> PFREAL_SHIFT;
+}
+
+inline PFreal fdiv(PFreal num, PFreal den)
+{
+ long long p = (long long)(num) << (PFREAL_SHIFT*2);
+ long long q = p / (long long)den;
+ long long r = q >> PFREAL_SHIFT;
+
+ return r;
+}
+
+inline float fixedToFloat(PFreal val)
+{
+ return ((float)val) / (float)PFREAL_ONE;
+}
+
+inline PFreal floatToFixed(float val)
+{
+ return (PFreal)(val*PFREAL_ONE);
+}
+
+#define IANGLE_MAX 1024
+#define IANGLE_MASK 1023
+
+// warning: regenerate the table if IANGLE_MAX and PFREAL_SHIFT are changed!
+static const PFreal sinTable[IANGLE_MAX] = {
+ 3, 9, 15, 21, 28, 34, 40, 47,
+ 53, 59, 65, 72, 78, 84, 90, 97,
+ 103, 109, 115, 122, 128, 134, 140, 147,
+ 153, 159, 165, 171, 178, 184, 190, 196,
+ 202, 209, 215, 221, 227, 233, 239, 245,
+ 251, 257, 264, 270, 276, 282, 288, 294,
+ 300, 306, 312, 318, 324, 330, 336, 342,
+ 347, 353, 359, 365, 371, 377, 383, 388,
+ 394, 400, 406, 412, 417, 423, 429, 434,
+ 440, 446, 451, 457, 463, 468, 474, 479,
+ 485, 491, 496, 501, 507, 512, 518, 523,
+ 529, 534, 539, 545, 550, 555, 561, 566,
+ 571, 576, 581, 587, 592, 597, 602, 607,
+ 612, 617, 622, 627, 632, 637, 642, 647,
+ 652, 656, 661, 666, 671, 675, 680, 685,
+ 690, 694, 699, 703, 708, 712, 717, 721,
+ 726, 730, 735, 739, 743, 748, 752, 756,
+ 760, 765, 769, 773, 777, 781, 785, 789,
+ 793, 797, 801, 805, 809, 813, 816, 820,
+ 824, 828, 831, 835, 839, 842, 846, 849,
+ 853, 856, 860, 863, 866, 870, 873, 876,
+ 879, 883, 886, 889, 892, 895, 898, 901,
+ 904, 907, 910, 913, 916, 918, 921, 924,
+ 927, 929, 932, 934, 937, 939, 942, 944,
+ 947, 949, 951, 954, 956, 958, 960, 963,
+ 965, 967, 969, 971, 973, 975, 977, 978,
+ 980, 982, 984, 986, 987, 989, 990, 992,
+ 994, 995, 997, 998, 999, 1001, 1002, 1003,
+ 1004, 1006, 1007, 1008, 1009, 1010, 1011, 1012,
+ 1013, 1014, 1015, 1015, 1016, 1017, 1018, 1018,
+ 1019, 1019, 1020, 1020, 1021, 1021, 1022, 1022,
+ 1022, 1023, 1023, 1023, 1023, 1023, 1023, 1023,
+ 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1022,
+ 1022, 1022, 1021, 1021, 1020, 1020, 1019, 1019,
+ 1018, 1018, 1017, 1016, 1015, 1015, 1014, 1013,
+ 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1004,
+ 1003, 1002, 1001, 999, 998, 997, 995, 994,
+ 992, 990, 989, 987, 986, 984, 982, 980,
+ 978, 977, 975, 973, 971, 969, 967, 965,
+ 963, 960, 958, 956, 954, 951, 949, 947,
+ 944, 942, 939, 937, 934, 932, 929, 927,
+ 924, 921, 918, 916, 913, 910, 907, 904,
+ 901, 898, 895, 892, 889, 886, 883, 879,
+ 876, 873, 870, 866, 863, 860, 856, 853,
+ 849, 846, 842, 839, 835, 831, 828, 824,
+ 820, 816, 813, 809, 805, 801, 797, 793,
+ 789, 785, 781, 777, 773, 769, 765, 760,
+ 756, 752, 748, 743, 739, 735, 730, 726,
+ 721, 717, 712, 708, 703, 699, 694, 690,
+ 685, 680, 675, 671, 666, 661, 656, 652,
+ 647, 642, 637, 632, 627, 622, 617, 612,
+ 607, 602, 597, 592, 587, 581, 576, 571,
+ 566, 561, 555, 550, 545, 539, 534, 529,
+ 523, 518, 512, 507, 501, 496, 491, 485,
+ 479, 474, 468, 463, 457, 451, 446, 440,
+ 434, 429, 423, 417, 412, 406, 400, 394,
+ 388, 383, 377, 371, 365, 359, 353, 347,
+ 342, 336, 330, 324, 318, 312, 306, 300,
+ 294, 288, 282, 276, 270, 264, 257, 251,
+ 245, 239, 233, 227, 221, 215, 209, 202,
+ 196, 190, 184, 178, 171, 165, 159, 153,
+ 147, 140, 134, 128, 122, 115, 109, 103,
+ 97, 90, 84, 78, 72, 65, 59, 53,
+ 47, 40, 34, 28, 21, 15, 9, 3,
+ -4, -10, -16, -22, -29, -35, -41, -48,
+ -54, -60, -66, -73, -79, -85, -91, -98,
+ -104, -110, -116, -123, -129, -135, -141, -148,
+ -154, -160, -166, -172, -179, -185, -191, -197,
+ -203, -210, -216, -222, -228, -234, -240, -246,
+ -252, -258, -265, -271, -277, -283, -289, -295,
+ -301, -307, -313, -319, -325, -331, -337, -343,
+ -348, -354, -360, -366, -372, -378, -384, -389,
+ -395, -401, -407, -413, -418, -424, -430, -435,
+ -441, -447, -452, -458, -464, -469, -475, -480,
+ -486, -492, -497, -502, -508, -513, -519, -524,
+ -530, -535, -540, -546, -551, -556, -562, -567,
+ -572, -577, -582, -588, -593, -598, -603, -608,
+ -613, -618, -623, -628, -633, -638, -643, -648,
+ -653, -657, -662, -667, -672, -676, -681, -686,
+ -691, -695, -700, -704, -709, -713, -718, -722,
+ -727, -731, -736, -740, -744, -749, -753, -757,
+ -761, -766, -770, -774, -778, -782, -786, -790,
+ -794, -798, -802, -806, -810, -814, -817, -821,
+ -825, -829, -832, -836, -840, -843, -847, -850,
+ -854, -857, -861, -864, -867, -871, -874, -877,
+ -880, -884, -887, -890, -893, -896, -899, -902,
+ -905, -908, -911, -914, -917, -919, -922, -925,
+ -928, -930, -933, -935, -938, -940, -943, -945,
+ -948, -950, -952, -955, -957, -959, -961, -964,
+ -966, -968, -970, -972, -974, -976, -978, -979,
+ -981, -983, -985, -987, -988, -990, -991, -993,
+ -995, -996, -998, -999, -1000, -1002, -1003, -1004,
+ -1005, -1007, -1008, -1009, -1010, -1011, -1012, -1013,
+ -1014, -1015, -1016, -1016, -1017, -1018, -1019, -1019,
+ -1020, -1020, -1021, -1021, -1022, -1022, -1023, -1023,
+ -1023, -1024, -1024, -1024, -1024, -1024, -1024, -1024,
+ -1024, -1024, -1024, -1024, -1024, -1024, -1024, -1023,
+ -1023, -1023, -1022, -1022, -1021, -1021, -1020, -1020,
+ -1019, -1019, -1018, -1017, -1016, -1016, -1015, -1014,
+ -1013, -1012, -1011, -1010, -1009, -1008, -1007, -1005,
+ -1004, -1003, -1002, -1000, -999, -998, -996, -995,
+ -993, -991, -990, -988, -987, -985, -983, -981,
+ -979, -978, -976, -974, -972, -970, -968, -966,
+ -964, -961, -959, -957, -955, -952, -950, -948,
+ -945, -943, -940, -938, -935, -933, -930, -928,
+ -925, -922, -919, -917, -914, -911, -908, -905,
+ -902, -899, -896, -893, -890, -887, -884, -880,
+ -877, -874, -871, -867, -864, -861, -857, -854,
+ -850, -847, -843, -840, -836, -832, -829, -825,
+ -821, -817, -814, -810, -806, -802, -798, -794,
+ -790, -786, -782, -778, -774, -770, -766, -761,
+ -757, -753, -749, -744, -740, -736, -731, -727,
+ -722, -718, -713, -709, -704, -700, -695, -691,
+ -686, -681, -676, -672, -667, -662, -657, -653,
+ -648, -643, -638, -633, -628, -623, -618, -613,
+ -608, -603, -598, -593, -588, -582, -577, -572,
+ -567, -562, -556, -551, -546, -540, -535, -530,
+ -524, -519, -513, -508, -502, -497, -492, -486,
+ -480, -475, -469, -464, -458, -452, -447, -441,
+ -435, -430, -424, -418, -413, -407, -401, -395,
+ -389, -384, -378, -372, -366, -360, -354, -348,
+ -343, -337, -331, -325, -319, -313, -307, -301,
+ -295, -289, -283, -277, -271, -265, -258, -252,
+ -246, -240, -234, -228, -222, -216, -210, -203,
+ -197, -191, -185, -179, -172, -166, -160, -154,
+ -148, -141, -135, -129, -123, -116, -110, -104,
+ -98, -91, -85, -79, -73, -66, -60, -54,
+ -48, -41, -35, -29, -22, -16, -10, -4
+};
+
+// this is the program the generate the above table
+#if 0
+#include <stdio.h>
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#define PFREAL_ONE 1024
+#define IANGLE_MAX 1024
+
+int main(int, char**)
+{
+ FILE*f = fopen("table.c","wt");
+ fprintf(f,"PFreal sinTable[] = {\n");
+ for(int i = 0; i < 128; i++)
+ {
+ for(int j = 0; j < 8; j++)
+ {
+ int iang = j+i*8;
+ double ii = (double)iang + 0.5;
+ double angle = ii * 2 * M_PI / IANGLE_MAX;
+ double sinAngle = sin(angle);
+ fprintf(f,"%6d, ", (int)(floor(PFREAL_ONE*sinAngle)));
+ }
+ fprintf(f,"\n");
+ }
+ fprintf(f,"};\n");
+ fclose(f);
+
+ return 0;
+}
+#endif
+
+inline PFreal fsin(int iangle)
+{
+ while(iangle < 0)
+ iangle += IANGLE_MAX;
+ return sinTable[iangle & IANGLE_MASK];
+}
+
+inline PFreal fcos(int iangle)
+{
+ // quarter phase shift
+ return fsin(iangle + (IANGLE_MAX >> 2));
+}
+
+struct SlideInfo
+{
+ int slideIndex;
+ int angle;
+ PFreal cx;
+ PFreal cy;
+};
+
+class PictureFlowPrivate
+{
+public:
+ PictureFlowPrivate(PictureFlow* widget);
+
+ int slideCount() const;
+ void setSlideCount(int count);
+
+ QSize slideSize() const;
+ void setSlideSize(QSize size);
+
+ int zoomFactor() const;
+ void setZoomFactor(int z);
+
+ QImage slide(int index) const;
+ void setSlide(int index, const QImage& image);
+
+ int currentSlide() const;
+ void setCurrentSlide(int index);
+
+ int getTarget() const;
+
+ void showPrevious();
+ void showNext();
+ void showSlide(int index);
+
+ void resize(int w, int h);
+
+ void render();
+ void startAnimation();
+ void updateAnimation();
+
+ void clearSurfaceCache();
+
+ QImage buffer;
+ QBasicTimer animateTimer;
+
+ bool singlePress;
+ int singlePressThreshold;
+ QPoint firstPress;
+ QPoint previousPos;
+ QTime previousPosTimestamp;
+ int pixelDistanceMoved;
+ int pixelsToMovePerSlide;
+
+ QVector<QString> captions;
+
+private:
+ PictureFlow* widget;
+
+ int slideWidth;
+ int slideHeight;
+ int zoom;
+
+ QVector<QImage> slideImages;
+ int centerIndex;
+ SlideInfo centerSlide;
+ QVector<SlideInfo> leftSlides;
+ QVector<SlideInfo> rightSlides;
+
+ QVector<PFreal> rays;
+ int itilt;
+ int spacing;
+ PFreal offsetX;
+ PFreal offsetY;
+
+ QImage blankSurface;
+ QCache<int, QImage> surfaceCache;
+ QTimer triggerTimer;
+
+ int slideFrame;
+ int step;
+ int target;
+ int fade;
+
+ void recalc(int w, int h);
+ QRect renderSlide(const SlideInfo &slide, int alpha=256, int col1=-1, int col=-1);
+ QImage* surface(int slideIndex);
+ void triggerRender();
+ void resetSlides();
+};
+
+PictureFlowPrivate::PictureFlowPrivate(PictureFlow* w)
+{
+ widget = w;
+
+ slideWidth = 200;
+ slideHeight = 200;
+ zoom = 100;
+
+ centerIndex = 0;
+
+ slideFrame = 0;
+ step = 0;
+ target = 0;
+ fade = 256;
+
+ triggerTimer.setSingleShot(true);
+ triggerTimer.setInterval(0);
+ QObject::connect(&triggerTimer, SIGNAL(timeout()), widget, SLOT(render()));
+
+ recalc(200, 200);
+ resetSlides();
+}
+
+int PictureFlowPrivate::slideCount() const
+{
+ return slideImages.count();
+}
+
+void PictureFlowPrivate::setSlideCount(int count)
+{
+ slideImages.resize(count);
+ captions.resize(count);
+ surfaceCache.clear();
+ resetSlides();
+ triggerRender();
+}
+
+QSize PictureFlowPrivate::slideSize() const
+{
+ return QSize(slideWidth, slideHeight);
+}
+
+void PictureFlowPrivate::setSlideSize(QSize size)
+{
+ slideWidth = size.width();
+ slideHeight = size.height();
+ recalc(buffer.width(), buffer.height());
+ triggerRender();
+}
+
+int PictureFlowPrivate::zoomFactor() const
+{
+ return zoom;
+}
+
+void PictureFlowPrivate::setZoomFactor(int z)
+{
+ if(z <= 0)
+ return;
+
+ zoom = z;
+ recalc(buffer.width(), buffer.height());
+ triggerRender();
+}
+
+QImage PictureFlowPrivate::slide(int index) const
+{
+ return slideImages[index];
+}
+
+void PictureFlowPrivate::setSlide(int index, const QImage& image)
+{
+ if((index >= 0) && (index < slideImages.count()))
+ {
+ slideImages[index] = image;
+ surfaceCache.remove(index);
+ triggerRender();
+ }
+}
+
+int PictureFlowPrivate::getTarget() const
+{
+ return target;
+}
+
+int PictureFlowPrivate::currentSlide() const
+{
+ return centerIndex;
+}
+
+void PictureFlowPrivate::setCurrentSlide(int index)
+{
+ step = 0;
+ centerIndex = qBound(index, 0, slideImages.count()-1);
+ target = centerIndex;
+ slideFrame = index << 16;
+ resetSlides();
+ triggerRender();
+}
+
+void PictureFlowPrivate::showPrevious()
+{
+ if(step >= 0)
+ {
+ if(centerIndex > 0)
+ {
+ target--;
+ startAnimation();
+ }
+ }
+ else
+ {
+ target = qMax(0, centerIndex - 2);
+ }
+}
+
+void PictureFlowPrivate::showNext()
+{
+ if(step <= 0)
+ {
+ if(centerIndex < slideImages.count()-1)
+ {
+ target++;
+ startAnimation();
+ }
+ }
+ else
+ {
+ target = qMin(centerIndex + 2, slideImages.count()-1);
+ }
+}
+
+void PictureFlowPrivate::showSlide(int index)
+{
+ index = qMax(index, 0);
+ index = qMin(slideImages.count()-1, index);
+ if(index == centerSlide.slideIndex)
+ return;
+
+ target = index;
+ startAnimation();
+}
+
+void PictureFlowPrivate::resize(int w, int h)
+{
+ recalc(w, h);
+ resetSlides();
+ triggerRender();
+}
+
+
+// adjust slides so that they are in "steady state" position
+void PictureFlowPrivate::resetSlides()
+{
+ centerSlide.angle = 0;
+ centerSlide.cx = 0;
+ centerSlide.cy = 0;
+ centerSlide.slideIndex = centerIndex;
+
+ leftSlides.clear();
+ leftSlides.resize(3);
+ for(int i = 0; i < leftSlides.count(); i++)
+ {
+ SlideInfo& si = leftSlides[i];
+ si.angle = itilt;
+ si.cx = -(offsetX + spacing*i*PFREAL_ONE);
+ si.cy = offsetY;
+ si.slideIndex = centerIndex-1-i;
+ //qDebug() << "Left[" << i << "] x=" << fixedToFloat(si.cx) << ", y=" << fixedToFloat(si.cy) ;
+ }
+
+ rightSlides.clear();
+ rightSlides.resize(3);
+ for(int i = 0; i < rightSlides.count(); i++)
+ {
+ SlideInfo& si = rightSlides[i];
+ si.angle = -itilt;
+ si.cx = offsetX + spacing*i*PFREAL_ONE;
+ si.cy = offsetY;
+ si.slideIndex = centerIndex+1+i;
+ //qDebug() << "Right[" << i << "] x=" << fixedToFloat(si.cx) << ", y=" << fixedToFloat(si.cy) ;
+ }
+}
+
+#define BILINEAR_STRETCH_HOR 4
+#define BILINEAR_STRETCH_VER 4
+
+static QImage prepareSurface(QImage img, int w, int h)
+{
+ Qt::TransformationMode mode = Qt::SmoothTransformation;
+ img = img.scaled(w, h, Qt::IgnoreAspectRatio, mode);
+
+ // slightly larger, to accomodate for the reflection
+ int hs = h * 2;
+ int hofs = h / 3;
+
+ // offscreen buffer: black is sweet
+ QImage result(hs, w, QImage::Format_RGB16);
+ result.fill(0);
+
+ // transpose the image, this is to speed-up the rendering
+ // because we process one column at a time
+ // (and much better and faster to work row-wise, i.e in one scanline)
+ for(int x = 0; x < w; x++)
+ for(int y = 0; y < h; y++)
+ result.setPixel(hofs + y, x, img.pixel(x, y));
+
+ // create the reflection
+ int ht = hs - h - hofs;
+ int hte = ht;
+ for(int x = 0; x < w; x++)
+ for(int y = 0; y < ht; y++)
+ {
+ QRgb color = img.pixel(x, img.height()-y-1);
+ //QRgb565 color = img.scanLine(img.height()-y-1) + x*sizeof(QRgb565); //img.pixel(x, img.height()-y-1);
+ int a = qAlpha(color);
+ int r = qRed(color) * a / 256 * (hte - y) / hte * 3/5;
+ int g = qGreen(color) * a / 256 * (hte - y) / hte * 3/5;
+ int b = qBlue(color) * a / 256 * (hte - y) / hte * 3/5;
+ result.setPixel(h+hofs+y, x, qRgb(r, g, b));
+ }
+
+#ifdef PICTUREFLOW_BILINEAR_FILTER
+ int hh = BILINEAR_STRETCH_VER*hs;
+ int ww = BILINEAR_STRETCH_HOR*w;
+ result = result.scaled(hh, ww, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+#endif
+
+ return result;
+}
+
+
+// get transformed image for specified slide
+// if it does not exist, create it and place it in the cache
+QImage* PictureFlowPrivate::surface(int slideIndex)
+{
+ if(slideIndex < 0)
+ return 0;
+ if(slideIndex >= slideImages.count())
+ return 0;
+
+ if(surfaceCache.contains(slideIndex))
+ return surfaceCache[slideIndex];
+
+ QImage img = widget->slide(slideIndex);
+ if(img.isNull())
+ {
+ if(blankSurface.isNull())
+ {
+ blankSurface = QImage(slideWidth, slideHeight, QImage::Format_RGB16);
+
+ QPainter painter(&blankSurface);
+ QPoint p1(slideWidth*4/10, 0);
+ QPoint p2(slideWidth*6/10, slideHeight);
+ QLinearGradient linearGrad(p1, p2);
+ linearGrad.setColorAt(0, Qt::black);
+ linearGrad.setColorAt(1, Qt::white);
+ painter.setBrush(linearGrad);
+ painter.fillRect(0, 0, slideWidth, slideHeight, QBrush(linearGrad));
+
+ painter.setPen(QPen(QColor(64,64,64), 4));
+ painter.setBrush(QBrush());
+ painter.drawRect(2, 2, slideWidth-3, slideHeight-3);
+ painter.end();
+ blankSurface = prepareSurface(blankSurface, slideWidth, slideHeight);
+ }
+ return &blankSurface;
+ }
+
+ surfaceCache.insert(slideIndex, new QImage(prepareSurface(img, slideWidth, slideHeight)));
+ return surfaceCache[slideIndex];
+}
+
+
+// Schedules rendering the slides. Call this function to avoid immediate
+// render and thus cause less flicker.
+void PictureFlowPrivate::triggerRender()
+{
+ triggerTimer.start();
+}
+
+// Render the slides. Updates only the offscreen buffer.
+void PictureFlowPrivate::render()
+{
+ buffer.fill(0);
+
+ int nleft = leftSlides.count();
+ int nright = rightSlides.count();
+
+ QRect r = renderSlide(centerSlide);
+ int c1 = r.left();
+ int c2 = r.right();
+
+ if(step == 0)
+ {
+ // no animation, boring plain rendering
+ for(int index = 0; index < nleft-1; index++)
+ {
+ int alpha = (index < nleft-2) ? 256 : 128;
+ QRect rs = renderSlide(leftSlides[index], alpha, 0, c1-1);
+ if(!rs.isEmpty())
+ c1 = rs.left();
+ }
+ for(int index = 0; index < nright-1; index++)
+ {
+ int alpha = (index < nright-2) ? 256 : 128;
+ QRect rs = renderSlide(rightSlides[index], alpha, c2+1, buffer.width());
+ if(!rs.isEmpty())
+ c2 = rs.right();
+ }
+
+ QPainter painter;
+ painter.begin(&buffer);
+
+ QFont font("Arial", 14);
+ font.setBold(true);
+ painter.setFont(font);
+ painter.setPen(Qt::white);
+ //painter.setPen(QColor(255,255,255,127));
+
+ if (!captions.isEmpty())
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ Qt::AlignCenter, captions[centerIndex]);
+
+ painter.end();
+
+ }
+ else
+ {
+ // the first and last slide must fade in/fade out
+ for(int index = 0; index < nleft; index++)
+ {
+ int alpha = 256;
+ if(index == nleft-1)
+ alpha = (step > 0) ? 0 : 128-fade/2;
+ if(index == nleft-2)
+ alpha = (step > 0) ? 128-fade/2 : 256-fade/2;
+ if(index == nleft-3)
+ alpha = (step > 0) ? 256-fade/2 : 256;
+ QRect rs = renderSlide(leftSlides[index], alpha, 0, c1-1);
+ if(!rs.isEmpty())
+ c1 = rs.left();
+
+ alpha = (step > 0) ? 256-fade/2 : 256;
+ }
+ for(int index = 0; index < nright; index++)
+ {
+ int alpha = (index < nright-2) ? 256 : 128;
+ if(index == nright-1)
+ alpha = (step > 0) ? fade/2 : 0;
+ if(index == nright-2)
+ alpha = (step > 0) ? 128+fade/2 : fade/2;
+ if(index == nright-3)
+ alpha = (step > 0) ? 256 : 128+fade/2;
+ QRect rs = renderSlide(rightSlides[index], alpha, c2+1, buffer.width());
+ if(!rs.isEmpty())
+ c2 = rs.right();
+ }
+
+
+
+ QPainter painter;
+ painter.begin(&buffer);
+
+ QFont font("Arial", 14);
+ font.setBold(true);
+ painter.setFont(font);
+
+ int leftTextIndex = (step>0) ? centerIndex : centerIndex-1;
+
+ painter.setPen(QColor(255,255,255, (255-fade) ));
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ Qt::AlignCenter, captions[leftTextIndex]);
+
+ painter.setPen(QColor(255,255,255, fade));
+ painter.drawText( QRect(0,0, buffer.width(), (buffer.height() - slideSize().height())/2),
+ Qt::AlignCenter, captions[leftTextIndex+1]);
+
+
+ painter.end();
+ }
+}
+
+
+static inline uint BYTE_MUL_RGB16(uint x, uint a) {
+ a += 1;
+ uint t = (((x & 0x07e0)*a) >> 8) & 0x07e0;
+ t |= (((x & 0xf81f)*(a>>2)) >> 6) & 0xf81f;
+ return t;
+}
+
+static inline uint BYTE_MUL_RGB16_32(uint x, uint a) {
+ uint t = (((x & 0xf81f07e0) >> 5)*a) & 0xf81f07e0;
+ t |= (((x & 0x07e0f81f)*a) >> 5) & 0x07e0f81f;
+ return t;
+}
+
+
+// Renders a slide to offscreen buffer. Returns a rect of the rendered area.
+// alpha=256 means normal, alpha=0 is fully black, alpha=128 half transparent
+// col1 and col2 limit the column for rendering.
+QRect PictureFlowPrivate::renderSlide(const SlideInfo &slide, int alpha,
+int col1, int col2)
+{
+ QImage* src = surface(slide.slideIndex);
+ if(!src)
+ return QRect();
+
+ QRect rect(0, 0, 0, 0);
+
+#ifdef PICTUREFLOW_BILINEAR_FILTER
+ int sw = src->height() / BILINEAR_STRETCH_HOR;
+ int sh = src->width() / BILINEAR_STRETCH_VER;
+#else
+ int sw = src->height();
+ int sh = src->width();
+#endif
+ int h = buffer.height();
+ int w = buffer.width();
+
+ if(col1 > col2)
+ {
+ int c = col2;
+ col2 = col1;
+ col1 = c;
+ }
+
+ col1 = (col1 >= 0) ? col1 : 0;
+ col2 = (col2 >= 0) ? col2 : w-1;
+ col1 = qMin(col1, w-1);
+ col2 = qMin(col2, w-1);
+
+ int distance = h * 100 / zoom;
+ PFreal sdx = fcos(slide.angle);
+ PFreal sdy = fsin(slide.angle);
+ PFreal xs = slide.cx - slideWidth * sdx/2;
+ PFreal ys = slide.cy - slideWidth * sdy/2;
+ PFreal dist = distance * PFREAL_ONE;
+
+ int xi = qMax((PFreal)0, ((w*PFREAL_ONE/2) + fdiv(xs*h, dist+ys)) >> PFREAL_SHIFT);
+ if(xi >= w)
+ return rect;
+
+ bool flag = false;
+ rect.setLeft(xi);
+ for(int x = qMax(xi, col1); x <= col2; x++)
+ {
+ PFreal hity = 0;
+ PFreal fk = rays[x];
+ if(sdy)
+ {
+ fk = fk - fdiv(sdx,sdy);
+ hity = -fdiv((rays[x]*distance - slide.cx + slide.cy*sdx/sdy), fk);
+ }
+
+ dist = distance*PFREAL_ONE + hity;
+ if(dist < 0)
+ continue;
+
+ PFreal hitx = fmul(dist, rays[x]);
+ PFreal hitdist = fdiv(hitx - slide.cx, sdx);
+
+#ifdef PICTUREFLOW_BILINEAR_FILTER
+ int column = sw*BILINEAR_STRETCH_HOR/2 + (hitdist*BILINEAR_STRETCH_HOR >> PFREAL_SHIFT);
+ if(column >= sw*BILINEAR_STRETCH_HOR)
+ break;
+#else
+ int column = sw/2 + (hitdist >> PFREAL_SHIFT);
+ if(column >= sw)
+ break;
+#endif
+ if(column < 0)
+ continue;
+
+ rect.setRight(x);
+ if(!flag)
+ rect.setLeft(x);
+ flag = true;
+
+ int y1 = h/2;
+ int y2 = y1+ 1;
+ QRgb565* pixel1 = (QRgb565*)(buffer.scanLine(y1)) + x;
+ QRgb565* pixel2 = (QRgb565*)(buffer.scanLine(y2)) + x;
+ int pixelstep = pixel2 - pixel1;
+
+#ifdef PICTUREFLOW_BILINEAR_FILTER
+ int center = (sh*BILINEAR_STRETCH_VER/2);
+ int dy = dist*BILINEAR_STRETCH_VER / h;
+#else
+ int center = (sh/2);
+ int dy = dist / h;
+#endif
+ int p1 = center*PFREAL_ONE - dy/2;
+ int p2 = center*PFREAL_ONE + dy/2;
+
+ const QRgb565 *ptr = (const QRgb565*)(src->scanLine(column));
+ if(alpha == 256)
+ while((y1 >= 0) && (y2 < h) && (p1 >= 0))
+ {
+ *pixel1 = ptr[p1 >> PFREAL_SHIFT];
+ *pixel2 = ptr[p2 >> PFREAL_SHIFT];
+ p1 -= dy;
+ p2 += dy;
+ y1--;
+ y2++;
+ pixel1 -= pixelstep;
+ pixel2 += pixelstep;
+ }
+ else
+ while((y1 >= 0) && (y2 < h) && (p1 >= 0))
+ {
+ QRgb565 c1 = ptr[p1 >> PFREAL_SHIFT];
+ QRgb565 c2 = ptr[p2 >> PFREAL_SHIFT];
+
+ *pixel1 = BYTE_MUL_RGB16(c1, alpha);
+ *pixel2 = BYTE_MUL_RGB16(c2, alpha);
+
+/*
+ int r1 = qRed(c1) * alpha/256;
+ int g1 = qGreen(c1) * alpha/256;
+ int b1 = qBlue(c1) * alpha/256;
+ int r2 = qRed(c2) * alpha/256;
+ int g2 = qGreen(c2) * alpha/256;
+ int b2 = qBlue(c2) * alpha/256;
+ *pixel1 = qRgb(r1, g1, b1);
+ *pixel2 = qRgb(r2, g2, b2);
+*/
+ p1 -= dy;
+ p2 += dy;
+ y1--;
+ y2++;
+ pixel1 -= pixelstep;
+ pixel2 += pixelstep;
+ }
+ }
+
+ rect.setTop(0);
+ rect.setBottom(h-1);
+ return rect;
+}
+
+// Updates look-up table and other stuff necessary for the rendering.
+// Call this when the viewport size or slide dimension is changed.
+void PictureFlowPrivate::recalc(int ww, int wh)
+{
+ int w = (ww+1)/2;
+ int h = (wh+1)/2;
+ buffer = QImage(ww, wh, QImage::Format_RGB16);
+ buffer.fill(0);
+
+ rays.resize(w*2);
+
+ for(int i = 0; i < w; i++)
+ {
+ PFreal gg = (PFREAL_HALF + i * PFREAL_ONE) / (2*h);
+ rays[w-i-1] = -gg;
+ rays[w+i] = gg;
+ }
+
+ // pointer must move more than 1/15 of the window to enter drag mode
+ singlePressThreshold = ww / 15;
+// qDebug() << "singlePressThreshold now set to " << singlePressThreshold;
+
+ pixelsToMovePerSlide = ww / 3;
+// qDebug() << "pixelsToMovePerSlide now set to " << pixelsToMovePerSlide;
+
+ itilt = 80 * IANGLE_MAX / 360; // approx. 80 degrees tilted
+
+ offsetY = slideWidth/2 * fsin(itilt);
+ offsetY += slideWidth * PFREAL_ONE / 4;
+
+// offsetX = slideWidth/2 * (PFREAL_ONE-fcos(itilt));
+// offsetX += slideWidth * PFREAL_ONE;
+
+ // center slide + side slide
+ offsetX = slideWidth*PFREAL_ONE;
+// offsetX = 150*PFREAL_ONE;//(slideWidth/2)*PFREAL_ONE + ( slideWidth*fcos(itilt) )/2;
+// qDebug() << "center width = " << slideWidth;
+// qDebug() << "side width = " << fixedToFloat(slideWidth/2 * (PFREAL_ONE-fcos(itilt)));
+// qDebug() << "offsetX now " << fixedToFloat(offsetX);
+
+ spacing = slideWidth/5;
+
+ surfaceCache.clear();
+ blankSurface = QImage();
+}
+
+void PictureFlowPrivate::startAnimation()
+{
+ if(!animateTimer.isActive())
+ {
+ step = (target < centerSlide.slideIndex) ? -1 : 1;
+ animateTimer.start(30, widget);
+ }
+}
+
+// Updates the animation effect. Call this periodically from a timer.
+void PictureFlowPrivate::updateAnimation()
+{
+ if(!animateTimer.isActive())
+ return;
+ if(step == 0)
+ return;
+
+ int speed = 16384;
+
+ // deaccelerate when approaching the target
+ if(true)
+ {
+ const int max = 2 * 65536;
+
+ int fi = slideFrame;
+ fi -= (target << 16);
+ if(fi < 0)
+ fi = -fi;
+ fi = qMin(fi, max);
+
+ int ia = IANGLE_MAX * (fi-max/2) / (max*2);
+ speed = 512 + 16384 * (PFREAL_ONE+fsin(ia))/PFREAL_ONE;
+ }
+
+ slideFrame += speed*step;
+
+ int index = slideFrame >> 16;
+ int pos = slideFrame & 0xffff;
+ int neg = 65536 - pos;
+ int tick = (step < 0) ? neg : pos;
+ PFreal ftick = (tick * PFREAL_ONE) >> 16;
+
+ // the leftmost and rightmost slide must fade away
+ fade = pos / 256;
+
+ if(step < 0)
+ index++;
+ if(centerIndex != index)
+ {
+ centerIndex = index;
+ slideFrame = index << 16;
+ centerSlide.slideIndex = centerIndex;
+ for(int i = 0; i < leftSlides.count(); i++)
+ leftSlides[i].slideIndex = centerIndex-1-i;
+ for(int i = 0; i < rightSlides.count(); i++)
+ rightSlides[i].slideIndex = centerIndex+1+i;
+ }
+
+ centerSlide.angle = (step * tick * itilt) >> 16;
+ centerSlide.cx = -step * fmul(offsetX, ftick);
+ centerSlide.cy = fmul(offsetY, ftick);
+
+ if(centerIndex == target)
+ {
+ resetSlides();
+ animateTimer.stop();
+ triggerRender();
+ step = 0;
+ fade = 256;
+ return;
+ }
+
+ for(int i = 0; i < leftSlides.count(); i++)
+ {
+ SlideInfo& si = leftSlides[i];
+ si.angle = itilt;
+ si.cx = -(offsetX + spacing*i*PFREAL_ONE + step*spacing*ftick);
+ si.cy = offsetY;
+ }
+
+ for(int i = 0; i < rightSlides.count(); i++)
+ {
+ SlideInfo& si = rightSlides[i];
+ si.angle = -itilt;
+ si.cx = offsetX + spacing*i*PFREAL_ONE - step*spacing*ftick;
+ si.cy = offsetY;
+ }
+
+ if(step > 0)
+ {
+ PFreal ftick = (neg * PFREAL_ONE) >> 16;
+ rightSlides[0].angle = -(neg * itilt) >> 16;
+ rightSlides[0].cx = fmul(offsetX, ftick);
+ rightSlides[0].cy = fmul(offsetY, ftick);
+ }
+ else
+ {
+ PFreal ftick = (pos * PFREAL_ONE) >> 16;
+ leftSlides[0].angle = (pos * itilt) >> 16;
+ leftSlides[0].cx = -fmul(offsetX, ftick);
+ leftSlides[0].cy = fmul(offsetY, ftick);
+ }
+
+ // must change direction ?
+ if(target < index) if(step > 0)
+ step = -1;
+ if(target > index) if(step < 0)
+ step = 1;
+
+ triggerRender();
+}
+
+
+void PictureFlowPrivate::clearSurfaceCache()
+{
+ surfaceCache.clear();
+}
+
+// -----------------------------------------
+
+PictureFlow::PictureFlow(QWidget* parent): QWidget(parent)
+{
+ d = new PictureFlowPrivate(this);
+
+ setAttribute(Qt::WA_StaticContents, true);
+ setAttribute(Qt::WA_OpaquePaintEvent, true);
+ setAttribute(Qt::WA_NoSystemBackground, true);
+
+#ifdef Q_WS_QWS
+ if (QScreen::instance()->pixelFormat() != QImage::Format_Invalid)
+ setAttribute(Qt::WA_PaintOnScreen, true);
+#endif
+}
+
+PictureFlow::~PictureFlow()
+{
+ delete d;
+}
+
+int PictureFlow::slideCount() const
+{
+ return d->slideCount();
+}
+
+void PictureFlow::setSlideCount(int count)
+{
+ d->setSlideCount(count);
+}
+
+QSize PictureFlow::slideSize() const
+{
+ return d->slideSize();
+}
+
+void PictureFlow::setSlideSize(QSize size)
+{
+ d->setSlideSize(size);
+}
+
+int PictureFlow::zoomFactor() const
+{
+ return d->zoomFactor();
+}
+
+void PictureFlow::setZoomFactor(int z)
+{
+ d->setZoomFactor(z);
+}
+
+QImage PictureFlow::slide(int index) const
+{
+ return d->slide(index);
+}
+
+void PictureFlow::setSlide(int index, const QImage& image)
+{
+ d->setSlide(index, image);
+}
+
+void PictureFlow::setSlide(int index, const QPixmap& pixmap)
+{
+ d->setSlide(index, pixmap.toImage());
+}
+
+void PictureFlow::setSlideCaption(int index, QString caption)
+{
+ d->captions[index] = caption;
+}
+
+
+int PictureFlow::currentSlide() const
+{
+ return d->currentSlide();
+}
+
+void PictureFlow::setCurrentSlide(int index)
+{
+ d->setCurrentSlide(index);
+}
+
+void PictureFlow::clear()
+{
+ d->setSlideCount(0);
+}
+
+void PictureFlow::clearCaches()
+{
+ d->clearSurfaceCache();
+}
+
+void PictureFlow::render()
+{
+ d->render();
+ update();
+}
+
+void PictureFlow::showPrevious()
+{
+ d->showPrevious();
+}
+
+void PictureFlow::showNext()
+{
+ d->showNext();
+}
+
+void PictureFlow::showSlide(int index)
+{
+ d->showSlide(index);
+}
+
+void PictureFlow::keyPressEvent(QKeyEvent* event)
+{
+ if(event->key() == Qt::Key_Left)
+ {
+ if(event->modifiers() == Qt::ControlModifier)
+ showSlide(currentSlide()-10);
+ else
+ showPrevious();
+ event->accept();
+ return;
+ }
+
+ if(event->key() == Qt::Key_Right)
+ {
+ if(event->modifiers() == Qt::ControlModifier)
+ showSlide(currentSlide()+10);
+ else
+ showNext();
+ event->accept();
+ return;
+ }
+
+ event->ignore();
+}
+
+#define SPEED_LOWER_THRESHOLD 10
+#define SPEED_UPPER_LIMIT 40
+
+void PictureFlow::mouseMoveEvent(QMouseEvent* event)
+{
+ int distanceMovedSinceLastEvent = event->pos().x() - d->previousPos.x();
+
+ // Check to see if we need to switch from single press mode to a drag mode
+ if (d->singlePress)
+ {
+ // Increment the distance moved for this event
+ d->pixelDistanceMoved += distanceMovedSinceLastEvent;
+
+ // Check against threshold
+ if (qAbs(d->pixelDistanceMoved) > d->singlePressThreshold)
+ {
+ d->singlePress = false;
+// qDebug() << "DRAG MODE ON";
+ }
+ }
+
+ if (!d->singlePress)
+ {
+ int speed;
+ // Calculate velocity in a 10th of a window width per second
+ if (d->previousPosTimestamp.elapsed() == 0)
+ speed = SPEED_LOWER_THRESHOLD;
+ else
+ {
+ speed = ((qAbs(event->pos().x()-d->previousPos.x())*1000) / d->previousPosTimestamp.elapsed())
+ / (d->buffer.width() / 10);
+
+ if (speed < SPEED_LOWER_THRESHOLD)
+ speed = SPEED_LOWER_THRESHOLD;
+ else if (speed > SPEED_UPPER_LIMIT)
+ speed = SPEED_UPPER_LIMIT;
+ else {
+ speed = SPEED_LOWER_THRESHOLD + (speed / 3);
+// qDebug() << "ACCELERATION ENABLED Speed = " << speed << ", Distance = " << distanceMovedSinceLastEvent;
+
+ }
+ }
+
+
+// qDebug() << "Speed = " << speed;
+
+// int incr = ((event->pos().x() - d->previousPos.x())/10) * speed;
+
+// qDebug() << "Incremented by " << incr;
+
+ int incr = (distanceMovedSinceLastEvent * speed);
+
+ //qDebug() << "(distanceMovedSinceLastEvent * speed) = " << incr;
+
+ if (incr > d->pixelsToMovePerSlide*2) {
+ incr = d->pixelsToMovePerSlide*2;
+ //qDebug() << "Limiting incr to " << incr;
+ }
+
+
+ d->pixelDistanceMoved += (distanceMovedSinceLastEvent * speed);
+ // qDebug() << "distance: " << d->pixelDistanceMoved;
+
+ int slideInc;
+
+ slideInc = d->pixelDistanceMoved / (d->pixelsToMovePerSlide * 10);
+
+ if (slideInc != 0) {
+ int targetSlide = d->getTarget() - slideInc;
+ showSlide(targetSlide);
+// qDebug() << "TargetSlide = " << targetSlide;
+
+ //qDebug() << "Decrementing pixelDistanceMoved by " << (d->pixelsToMovePerSlide *10) * slideInc;
+
+ d->pixelDistanceMoved -= (d->pixelsToMovePerSlide *10) * slideInc;
+
+/*
+ if ( (targetSlide <= 0) || (targetSlide >= d->slideCount()-1) )
+ d->pixelDistanceMoved = 0;
+*/
+ }
+
+
+ }
+
+ d->previousPos = event->pos();
+ d->previousPosTimestamp.restart();
+
+ emit inputReceived();
+}
+
+void PictureFlow::mousePressEvent(QMouseEvent* event)
+{
+ d->firstPress = event->pos();
+ d->previousPos = event->pos();
+ d->previousPosTimestamp.start();
+ d->singlePress = true; // Initially assume a single press
+// d->dragStartSlide = d->getTarget();
+ d->pixelDistanceMoved = 0;
+
+ emit inputReceived();
+}
+
+void PictureFlow::mouseReleaseEvent(QMouseEvent* event)
+{
+ int sideWidth = (d->buffer.width() - slideSize().width()) /2;
+
+ if (d->singlePress)
+ {
+ if (event->x() < sideWidth )
+ {
+ showPrevious();
+ } else if ( event->x() > sideWidth + slideSize().width() ) {
+ showNext();
+ } else {
+ emit itemActivated(d->getTarget());
+ }
+
+ event->accept();
+ }
+
+ emit inputReceived();
+}
+
+
+void PictureFlow::paintEvent(QPaintEvent* event)
+{
+ Q_UNUSED(event);
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing, false);
+ painter.drawImage(QPoint(0,0), d->buffer);
+}
+
+void PictureFlow::resizeEvent(QResizeEvent* event)
+{
+ d->resize(width(), height());
+ QWidget::resizeEvent(event);
+}
+
+void PictureFlow::timerEvent(QTimerEvent* event)
+{
+ if(event->timerId() == d->animateTimer.timerId())
+ {
+// QTime now = QTime::currentTime();
+ d->updateAnimation();
+// d->animateTimer.start(qMax(0, 30-now.elapsed() ), this);
+ }
+ else
+ QWidget::timerEvent(event);
+}
diff --git a/demos/embedded/fluidlauncher/pictureflow.h b/demos/embedded/fluidlauncher/pictureflow.h
new file mode 100644
index 0000000..fccc7a3
--- /dev/null
+++ b/demos/embedded/fluidlauncher/pictureflow.h
@@ -0,0 +1,237 @@
+/****************************************************************************
+*
+* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+* This is version of the Pictureflow animated image show widget modified by Nokia.
+*
+* $QT_BEGIN_LICENSE:LGPL$
+* No Commercial Usage
+* This file contains pre-release code and may not be distributed.
+* You may use this file in accordance with the terms and conditions
+* contained in the either Technology Preview License Agreement or the
+* Beta Release License Agreement.
+*
+* GNU Lesser General Public License Usage
+* Alternatively, this file may be used under the terms of the GNU Lesser
+* General Public License version 2.1 as published by the Free Software
+* Foundation and appearing in the file LICENSE.LGPL included in the
+* packaging of this file. Please review the following information to
+* ensure the GNU Lesser General Public License version 2.1 requirements
+* will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+*
+* In addition, as a special exception, Nokia gives you certain
+* additional rights. These rights are described in the Nokia Qt LGPL
+* Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+* package.
+*
+* GNU General Public License Usage
+* Alternatively, this file may be used under the terms of the GNU
+* General Public License version 3.0 as published by the Free Software
+* Foundation and appearing in the file LICENSE.GPL included in the
+* packaging of this file. Please review the following information to
+* ensure the GNU General Public License version 3.0 requirements will be
+* met: http://www.gnu.org/copyleft/gpl.html.
+*
+* If you are unsure which license is appropriate for your use, please
+* contact the sales department at qt-sales@nokia.com.
+* $QT_END_LICENSE$
+*
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* * Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* * Neither the name of the <organization> nor the
+* names of its contributors may be used to endorse or promote products
+* derived from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY TROLLTECH ASA ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+****************************************************************************/
+/*
+ ORIGINAL COPYRIGHT HEADER
+ PictureFlow - animated image show widget
+ http://pictureflow.googlecode.com
+
+ Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+*/
+
+#ifndef PICTUREFLOW_H
+#define PICTUREFLOW_H
+
+#include <QWidget>
+
+class PictureFlowPrivate;
+
+/*!
+ Class PictureFlow implements an image show widget with animation effect
+ like Apple's CoverFlow (in iTunes and iPod). Images are arranged in form
+ of slides, one main slide is shown at the center with few slides on
+ the left and right sides of the center slide. When the next or previous
+ slide is brought to the front, the whole slides flow to the right or
+ the right with smooth animation effect; until the new slide is finally
+ placed at the center.
+
+ */
+class PictureFlow : public QWidget
+{
+Q_OBJECT
+
+ Q_PROPERTY(int slideCount READ slideCount WRITE setSlideCount)
+ Q_PROPERTY(int currentSlide READ currentSlide WRITE setCurrentSlide)
+ Q_PROPERTY(QSize slideSize READ slideSize WRITE setSlideSize)
+ Q_PROPERTY(int zoomFactor READ zoomFactor WRITE setZoomFactor)
+
+public:
+ /*!
+ Creates a new PictureFlow widget.
+ */
+ PictureFlow(QWidget* parent = 0);
+
+ /*!
+ Destroys the widget.
+ */
+ ~PictureFlow();
+
+ /*!
+ Returns the total number of slides.
+ */
+ int slideCount() const;
+
+ /*!
+ Sets the total number of slides.
+ */
+ void setSlideCount(int count);
+
+ /*!
+ Returns the dimension of each slide (in pixels).
+ */
+ QSize slideSize() const;
+
+ /*!
+ Sets the dimension of each slide (in pixels).
+ */
+ void setSlideSize(QSize size);
+
+ /*!
+ Sets the zoom factor (in percent).
+ */
+ void setZoomFactor(int zoom);
+
+ /*!
+ Returns the zoom factor (in percent).
+ */
+ int zoomFactor() const;
+
+ /*!
+ Clears any caches held to free up memory
+ */
+ void clearCaches();
+
+ /*!
+ Returns QImage of specified slide.
+ This function will be called only whenever necessary, e.g. the 100th slide
+ will not be retrived when only the first few slides are visible.
+ */
+ virtual QImage slide(int index) const;
+
+ /*!
+ Sets an image for specified slide. If the slide already exists,
+ it will be replaced.
+ */
+ virtual void setSlide(int index, const QImage& image);
+
+ virtual void setSlideCaption(int index, QString caption);
+
+ /*!
+ Sets a pixmap for specified slide. If the slide already exists,
+ it will be replaced.
+ */
+ virtual void setSlide(int index, const QPixmap& pixmap);
+
+ /*!
+ Returns the index of slide currently shown in the middle of the viewport.
+ */
+ int currentSlide() const;
+
+public slots:
+
+ /*!
+ Sets slide to be shown in the middle of the viewport. No animation
+ effect will be produced, unlike using showSlide.
+ */
+ void setCurrentSlide(int index);
+
+ /*!
+ Clears images of all slides.
+ */
+ void clear();
+
+ /*!
+ Rerender the widget. Normally this function will be automatically invoked
+ whenever necessary, e.g. during the transition animation.
+ */
+ void render();
+
+ /*!
+ Shows previous slide using animation effect.
+ */
+ void showPrevious();
+
+ /*!
+ Shows next slide using animation effect.
+ */
+ void showNext();
+
+ /*!
+ Go to specified slide using animation effect.
+ */
+ void showSlide(int index);
+
+signals:
+ void itemActivated(int index);
+ void inputReceived();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void keyPressEvent(QKeyEvent* event);
+ void mouseMoveEvent(QMouseEvent* event);
+ void mousePressEvent(QMouseEvent* event);
+ void mouseReleaseEvent(QMouseEvent* event);
+ void resizeEvent(QResizeEvent* event);
+ void timerEvent(QTimerEvent* event);
+
+private:
+ PictureFlowPrivate* d;
+};
+
+#endif // PICTUREFLOW_H
diff --git a/demos/embedded/fluidlauncher/screenshots/concentriccircles.png b/demos/embedded/fluidlauncher/screenshots/concentriccircles.png
new file mode 100644
index 0000000..fd308b5
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/concentriccircles.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/deform.png b/demos/embedded/fluidlauncher/screenshots/deform.png
new file mode 100644
index 0000000..c22f2ae
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/deform.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/elasticnodes.png b/demos/embedded/fluidlauncher/screenshots/elasticnodes.png
new file mode 100644
index 0000000..bc157e5
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/elasticnodes.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer.png b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer.png
new file mode 100644
index 0000000..522f13b
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/embeddedsvgviewer.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/mediaplayer.png b/demos/embedded/fluidlauncher/screenshots/mediaplayer.png
new file mode 100644
index 0000000..1304a19
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/mediaplayer.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/pathstroke.png b/demos/embedded/fluidlauncher/screenshots/pathstroke.png
new file mode 100644
index 0000000..c3d727e
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/pathstroke.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/styledemo.png b/demos/embedded/fluidlauncher/screenshots/styledemo.png
new file mode 100644
index 0000000..669c488
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/styledemo.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/wiggly.png b/demos/embedded/fluidlauncher/screenshots/wiggly.png
new file mode 100644
index 0000000..b20fbc4
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/wiggly.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_1.png b/demos/embedded/fluidlauncher/slides/demo_1.png
new file mode 100644
index 0000000..d2952e5
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_1.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_2.png b/demos/embedded/fluidlauncher/slides/demo_2.png
new file mode 100644
index 0000000..1899825
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_2.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_3.png b/demos/embedded/fluidlauncher/slides/demo_3.png
new file mode 100644
index 0000000..8369bc0
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_3.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_4.png b/demos/embedded/fluidlauncher/slides/demo_4.png
new file mode 100644
index 0000000..377e369
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_4.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_5.png b/demos/embedded/fluidlauncher/slides/demo_5.png
new file mode 100644
index 0000000..239f08a
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_5.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slides/demo_6.png b/demos/embedded/fluidlauncher/slides/demo_6.png
new file mode 100644
index 0000000..0addf37
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slides/demo_6.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/slideshow.cpp b/demos/embedded/fluidlauncher/slideshow.cpp
new file mode 100644
index 0000000..8f643b4
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slideshow.cpp
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QBasicTimer>
+#include <QList>
+#include <QImage>
+#include <QDir>
+#include <QPainter>
+#include <QPaintEvent>
+
+#include <QDebug>
+
+
+#include "slideshow.h"
+
+
+class SlideShowPrivate
+{
+public:
+ SlideShowPrivate();
+
+ int currentSlide;
+ int slideInterval;
+ QBasicTimer interSlideTimer;
+ QStringList imagePaths;
+
+ void showNextSlide();
+};
+
+
+
+SlideShowPrivate::SlideShowPrivate()
+{
+ currentSlide = 0;
+ slideInterval = 10000; // Default to 10 sec interval
+}
+
+
+void SlideShowPrivate::showNextSlide()
+{
+ currentSlide++;
+ if (currentSlide >= imagePaths.size())
+ currentSlide = 0;
+}
+
+
+
+SlideShow::SlideShow()
+{
+ d = new SlideShowPrivate;
+
+ setAttribute(Qt::WA_StaticContents, true);
+ setAttribute(Qt::WA_OpaquePaintEvent, true);
+ setAttribute(Qt::WA_NoSystemBackground, true);
+
+ setMouseTracking(true);
+}
+
+
+SlideShow::~SlideShow()
+{
+ delete d;
+}
+
+
+void SlideShow::addImageDir(QString dirName)
+{
+ QDir dir(dirName);
+
+ QStringList fileNames = dir.entryList(QDir::Files | QDir::Readable, QDir::Name);
+
+ for (int i=0; i<fileNames.count(); i++)
+ d->imagePaths << dir.absoluteFilePath(fileNames[i]);
+}
+
+void SlideShow::addImage(QString filename)
+{
+ d->imagePaths << filename;
+}
+
+
+void SlideShow::clearImages()
+{
+ d->imagePaths.clear();
+}
+
+
+void SlideShow::startShow()
+{
+ showFullScreen();
+ d->interSlideTimer.start(d->slideInterval, this);
+ d->showNextSlide();
+ update();
+}
+
+
+void SlideShow::stopShow()
+{
+ hide();
+ d->interSlideTimer.stop();
+}
+
+
+int SlideShow::slideInterval()
+{
+ return d->slideInterval;
+}
+
+void SlideShow::setSlideInterval(int val)
+{
+ d->slideInterval = val;
+}
+
+
+void SlideShow::timerEvent(QTimerEvent* event)
+{
+ Q_UNUSED(event);
+ d->showNextSlide();
+ update();
+}
+
+
+void SlideShow::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing, false);
+
+ if (d->imagePaths.size() > 0) {
+ QPixmap slide = QPixmap(d->imagePaths[d->currentSlide]);
+ QSize slideSize = slide.size();
+ QSize scaledSize = QSize(qMin(slideSize.width(), size().width()),
+ qMin(slideSize.height(), size().height()));
+ if (slideSize != scaledSize)
+ slide = slide.scaled(scaledSize, Qt::KeepAspectRatio);
+
+ QRect pixmapRect(qMax( (size().width() - slide.width())/2, 0),
+ qMax( (size().height() - slide.height())/2, 0),
+ slide.width(),
+ slide.height());
+
+ if (pixmapRect.top() > 0) {
+ // Fill in top & bottom rectangles:
+ painter.fillRect(0, 0, size().width(), pixmapRect.top(), Qt::black);
+ painter.fillRect(0, pixmapRect.bottom(), size().width(), size().height(), Qt::black);
+ }
+
+ if (pixmapRect.left() > 0) {
+ // Fill in left & right rectangles:
+ painter.fillRect(0, 0, pixmapRect.left(), size().height(), Qt::black);
+ painter.fillRect(pixmapRect.right(), 0, size().width(), size().height(), Qt::black);
+ }
+
+ painter.drawPixmap(pixmapRect, slide);
+
+ } else
+ painter.fillRect(event->rect(), Qt::black);
+}
+
+
+void SlideShow::keyPressEvent(QKeyEvent* event)
+{
+ Q_UNUSED(event);
+ emit inputReceived();
+}
+
+
+void SlideShow::mouseMoveEvent(QMouseEvent* event)
+{
+ Q_UNUSED(event);
+ emit inputReceived();
+}
+
+
+void SlideShow::mousePressEvent(QMouseEvent* event)
+{
+ Q_UNUSED(event);
+ emit inputReceived();
+}
+
+
+void SlideShow::mouseReleaseEvent(QMouseEvent* event)
+{
+ Q_UNUSED(event);
+ emit inputReceived();
+}
+
+
+void SlideShow::showEvent(QShowEvent * event )
+{
+ Q_UNUSED(event);
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::BlankCursor);
+#endif
+}
+
diff --git a/demos/embedded/fluidlauncher/slideshow.h b/demos/embedded/fluidlauncher/slideshow.h
new file mode 100644
index 0000000..27fb87b
--- /dev/null
+++ b/demos/embedded/fluidlauncher/slideshow.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SLIDESHOW_H
+#define SLIDESHOW_H
+
+#include <QWidget>
+
+class SlideShowPrivate;
+
+class SlideShow : public QWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(int slideInterval READ slideInterval WRITE setSlideInterval)
+
+public:
+ SlideShow();
+ ~SlideShow();
+ void addImage(QString filename);
+ void addImageDir(QString dirName);
+ void clearImages();
+ void startShow();
+ void stopShow();
+
+
+ int slideInterval();
+ void setSlideInterval(int val);
+
+signals:
+ void inputReceived();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void keyPressEvent(QKeyEvent* event);
+ void mouseMoveEvent(QMouseEvent* event);
+ void mousePressEvent(QMouseEvent* event);
+ void mouseReleaseEvent(QMouseEvent* event);
+ void timerEvent(QTimerEvent* event);
+ void showEvent(QShowEvent * event );
+
+
+private:
+ SlideShowPrivate* d;
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
diff --git a/demos/embedded/styledemo/files/add.png b/demos/embedded/styledemo/files/add.png
new file mode 100755
index 0000000..fc5c16d
--- /dev/null
+++ b/demos/embedded/styledemo/files/add.png
Binary files differ
diff --git a/demos/embedded/styledemo/files/application.qss b/demos/embedded/styledemo/files/application.qss
new file mode 100644
index 0000000..a632ad1
--- /dev/null
+++ b/demos/embedded/styledemo/files/application.qss
@@ -0,0 +1,125 @@
+QWidget#StyleWidget
+{
+ background-color: none;
+ background-image: url(icons:nature_1.jpg);
+}
+
+QLabel, QAbstractButton
+{
+ font: 18px bold;
+ color: beige;
+}
+
+QAbstractButton
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) );
+ border-color: black;
+ border-style: solid;
+ border-width: 3px;
+ border-radius: 6px;
+}
+
+QAbstractButton:pressed, QAbstractButton:checked
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
+}
+
+QSpinBox {
+ padding-left: 24px;
+ padding-right: 24px;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 5;
+ border-width: 3;
+}
+
+QSpinBox::up-button
+{
+ subcontrol-origin: padding;
+ subcontrol-position: right; /* position at the top right corner */
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+
+}
+
+QSpinBox::up-arrow
+{
+ image: url(icons:add.png);
+ width: 18px;
+ height: 18px;
+}
+
+
+QSpinBox::down-button
+{
+ subcontrol-origin: border;
+ subcontrol-position: left;
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+}
+
+QSpinBox::down-arrow
+{
+ image: url(icons:remove.png);
+ width: 18px;
+ height: 18px;
+}
+
+
+QScrollBar:horizontal
+{
+ border: 1px solid black;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
+ height: 15px;
+ margin: 0px 20px 0 20px;
+}
+
+QScrollBar::handle:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ min-width: 20px;
+}
+
+QScrollBar::add-line:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ width: 20px;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ width: 20px;
+ subcontrol-position: left;
+ subcontrol-origin: margin;
+}
+
+QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal
+{
+ border: none;
+ width: 16px;
+ height: 16px;
+}
+
+QScrollBar:left-arrow:horizontal
+{
+ image: url(icons:add.png)
+}
+
+QScrollBar::right-arrow:horizontal
+{
+ image: url(icons:remove.png)
+}
+
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
+{
+ background: none;
+}
+
diff --git a/demos/embedded/styledemo/files/blue.qss b/demos/embedded/styledemo/files/blue.qss
new file mode 100644
index 0000000..aa87277
--- /dev/null
+++ b/demos/embedded/styledemo/files/blue.qss
@@ -0,0 +1,39 @@
+*
+{
+ color: beige;
+}
+
+QLabel, QAbstractButton
+{
+ font: 10pt bold;
+ color: yellow;
+}
+
+QFrame
+{
+ background-color: rgba(96,96,255,60%);
+ border-color: rgb(32,32,196);
+ border-width: 3px;
+ border-style: solid;
+ border-radius: 5;
+ padding: 3px;
+}
+
+QAbstractButton
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
+ stop:0 lightblue, stop:0.5 darkblue);
+ border-width: 3px;
+ border-color: darkblue;
+ border-style: solid;
+ border-radius: 5;
+ padding: 3px;
+ qproperty-focusPolicy: NoFocus;
+}
+
+QAbstractButton:pressed
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
+ stop:0.5 darkblue, stop:1 lightblue);
+ border-color: beige;
+}
diff --git a/demos/embedded/styledemo/files/khaki.qss b/demos/embedded/styledemo/files/khaki.qss
new file mode 100644
index 0000000..9c0f77c
--- /dev/null
+++ b/demos/embedded/styledemo/files/khaki.qss
@@ -0,0 +1,100 @@
+
+QWidget#StartScreen, QWidget#MainWidget {
+ border: none;
+}
+
+QWidget#StartScreen, .QFrame {
+ background-color: beige;
+}
+
+QPushButton, QToolButton {
+ background-color: palegoldenrod;
+ border-width: 2px;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 5;
+ padding: 3px;
+ /* min-width: 96px; */
+ /* min-height: 48px; */
+ qproperty-focusPolicy: NoFocus
+}
+
+QPushButton:hover, QToolButton:hover {
+ background-color: khaki;
+}
+
+QPushButton:pressed, QToolButton:pressed {
+ padding-left: 5px;
+ padding-top: 5px;
+ background-color: #d0d67c;
+}
+
+QLabel, QAbstractButton {
+ font: italic 11pt "Times New Roman";
+}
+
+QFrame, QLabel#title {
+ border-width: 2px;
+ padding: 1px;
+ border-style: solid;
+ border-color: darkkhaki;
+ border-radius: 5px;
+}
+
+QFrame:focus {
+ border-width: 3px;
+ padding: 0px;
+}
+
+
+QLabel {
+ border: none;
+ padding: 0;
+ background: none;
+}
+
+QLabel#title {
+ font: 32px bold;
+}
+
+QSpinBox {
+ padding-left: 24px;
+ padding-right: 24px;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 5;
+ border-width: 3;
+}
+
+QSpinBox::up-button
+{
+ subcontrol-origin: padding;
+ subcontrol-position: right; /* position at the top right corner */
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+ border-image: url(:/files/spindownpng) 1;
+}
+
+QSpinBox::up-arrow {
+ image: url(:/files/add.png);
+ width: 12px;
+ height: 12px;
+ }
+
+
+QSpinBox::down-button
+{
+ subcontrol-origin: border;
+ subcontrol-position: left;
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+ border-image: url(:/files/spindownpng) 1;
+}
+
+QSpinBox::down-arrow {
+ image: url(:/files/remove.png);
+ width: 12px;
+ height: 12px;
+ }
diff --git a/demos/embedded/styledemo/files/nature_1.jpg b/demos/embedded/styledemo/files/nature_1.jpg
new file mode 100644
index 0000000..3a04edb
--- /dev/null
+++ b/demos/embedded/styledemo/files/nature_1.jpg
Binary files differ
diff --git a/demos/embedded/styledemo/files/nostyle.qss b/demos/embedded/styledemo/files/nostyle.qss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/demos/embedded/styledemo/files/nostyle.qss
diff --git a/demos/embedded/styledemo/files/remove.png b/demos/embedded/styledemo/files/remove.png
new file mode 100755
index 0000000..a0ab1fa
--- /dev/null
+++ b/demos/embedded/styledemo/files/remove.png
Binary files differ
diff --git a/demos/embedded/styledemo/files/transparent.qss b/demos/embedded/styledemo/files/transparent.qss
new file mode 100644
index 0000000..e3a9912
--- /dev/null
+++ b/demos/embedded/styledemo/files/transparent.qss
@@ -0,0 +1,140 @@
+QWidget#StyleWidget
+{
+ background-color: none;
+ background-image: url(:/files/nature_1.jpg);
+}
+
+QLabel, QAbstractButton
+{
+ font: 13pt;
+ color: beige;
+}
+
+QFrame, QLabel#title {
+ border-width: 2px;
+ padding: 1px;
+ border-style: solid;
+ border-color: black;
+ border-radius: 5px;
+}
+
+QFrame:focus {
+ border-width: 3px;
+ padding: 0px;
+}
+
+
+
+QAbstractButton
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) );
+ border-color: black;
+ border-style: solid;
+ border-width: 3px;
+ border-radius: 6px;
+}
+
+QAbstractButton:pressed, QAbstractButton:checked
+{
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
+}
+
+QSpinBox {
+ padding-left: 24px;
+ padding-right: 24px;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 5;
+ border-width: 3;
+}
+
+QSpinBox::up-button
+{
+ subcontrol-origin: padding;
+ subcontrol-position: right; /* position at the top right corner */
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+
+}
+
+QSpinBox::up-arrow
+{
+ image: url(:/files/add.png);
+ width: 18px;
+ height: 18px;
+}
+
+
+QSpinBox::down-button
+{
+ subcontrol-origin: border;
+ subcontrol-position: left;
+ width: 24px;
+ height: 24px;
+ border-width: 3px;
+}
+
+QSpinBox::down-arrow
+{
+ image: url(:/files/remove.png);
+ width: 18px;
+ height: 18px;
+}
+
+
+QScrollBar:horizontal
+{
+ border: 1px solid black;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) );
+ height: 15px;
+ margin: 0px 20px 0 20px;
+}
+
+QScrollBar::handle:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ min-width: 20px;
+}
+
+QScrollBar::add-line:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ width: 20px;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line:horizontal
+{
+ border: 1px solid black;
+ background: rgba(0,0,139,60%);
+ width: 20px;
+ subcontrol-position: left;
+ subcontrol-origin: margin;
+}
+
+QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal
+{
+ border: none;
+ width: 16px;
+ height: 16px;
+}
+
+QScrollBar:left-arrow:horizontal
+{
+ image: url(:/files/add.png)
+}
+
+QScrollBar::right-arrow:horizontal
+{
+ image: url(:/files/remove.png)
+}
+
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
+{
+ background: none;
+}
+
diff --git a/demos/embedded/styledemo/main.cpp b/demos/embedded/styledemo/main.cpp
new file mode 100644
index 0000000..6a7472e
--- /dev/null
+++ b/demos/embedded/styledemo/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QApplication>
+
+#include "stylewidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(styledemo);
+
+ app.setApplicationName("style");
+ app.setOrganizationName("Trolltech");
+ app.setOrganizationDomain("com.trolltech");
+
+ StyleWidget widget;
+ widget.showFullScreen();
+
+ return app.exec();
+}
+
diff --git a/demos/embedded/styledemo/styledemo.pro b/demos/embedded/styledemo/styledemo.pro
new file mode 100644
index 0000000..ee5e4d6
--- /dev/null
+++ b/demos/embedded/styledemo/styledemo.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+
+# Input
+HEADERS += stylewidget.h
+FORMS += stylewidget.ui
+SOURCES += main.cpp stylewidget.cpp
+RESOURCES += styledemo.qrc
+
+target.path = $$[QT_INSTALL_DEMOS]/embedded/styledemo
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/embedded/styledemo
+INSTALLS += target sources
diff --git a/demos/embedded/styledemo/styledemo.qrc b/demos/embedded/styledemo/styledemo.qrc
new file mode 100644
index 0000000..96237d4
--- /dev/null
+++ b/demos/embedded/styledemo/styledemo.qrc
@@ -0,0 +1,13 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>files/add.png</file>
+ <file>files/blue.qss</file>
+ <file>files/khaki.qss</file>
+ <file>files/nostyle.qss</file>
+ <file>files/transparent.qss</file>
+ <file>files/application.qss</file>
+ <file>files/nature_1.jpg</file>
+ <file>files/remove.png</file>
+</qresource>
+</RCC>
+
diff --git a/demos/embedded/styledemo/stylewidget.cpp b/demos/embedded/styledemo/stylewidget.cpp
new file mode 100644
index 0000000..304dd36
--- /dev/null
+++ b/demos/embedded/styledemo/stylewidget.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QApplication>
+#include <QString>
+#include <QFile>
+
+#include "stylewidget.h"
+
+
+
+StyleWidget::StyleWidget(QWidget *parent)
+ : QFrame(parent)
+{
+ m_ui.setupUi(this);
+}
+
+
+void StyleWidget::on_close_clicked()
+{
+ close();
+}
+
+void StyleWidget::on_blueStyle_clicked()
+{
+ QFile styleSheet(":/files/blue.qss");
+
+ if (!styleSheet.open(QIODevice::ReadOnly)) {
+ qWarning("Unable to open :/files/blue.qss");
+ return;
+ }
+
+ qApp->setStyleSheet(styleSheet.readAll());
+}
+
+void StyleWidget::on_khakiStyle_clicked()
+{
+ QFile styleSheet(":/files/khaki.qss");
+
+ if (!styleSheet.open(QIODevice::ReadOnly)) {
+ qWarning("Unable to open :/files/khaki.qss");
+ return;
+ }
+
+ qApp->setStyleSheet(styleSheet.readAll());
+}
+
+
+void StyleWidget::on_noStyle_clicked()
+{
+ QFile styleSheet(":/files/nostyle.qss");
+
+ if (!styleSheet.open(QIODevice::ReadOnly)) {
+ qWarning("Unable to open :/files/nostyle.qss");
+ return;
+ }
+
+ qApp->setStyleSheet(styleSheet.readAll());
+}
+
+
+void StyleWidget::on_transparentStyle_clicked()
+{
+ QFile styleSheet(":/files/transparent.qss");
+
+ if (!styleSheet.open(QIODevice::ReadOnly)) {
+ qWarning("Unable to open :/files/transparent.qss");
+ return;
+ }
+
+ qApp->setStyleSheet(styleSheet.readAll());
+}
+
+
+
diff --git a/demos/embedded/styledemo/stylewidget.h b/demos/embedded/styledemo/stylewidget.h
new file mode 100644
index 0000000..5ccb418
--- /dev/null
+++ b/demos/embedded/styledemo/stylewidget.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef STYLEWIDGET_H
+#define STYLEWIDGET_H
+
+#include <QFrame>
+
+#include "ui_stylewidget.h"
+
+class StyleWidget : public QFrame
+{
+ Q_OBJECT
+public:
+ StyleWidget(QWidget *parent = 0);
+
+private:
+ Ui_StyleWidget m_ui;
+
+private slots:
+ void on_close_clicked();
+ void on_blueStyle_clicked();
+ void on_khakiStyle_clicked();
+ void on_noStyle_clicked();
+ void on_transparentStyle_clicked();
+};
+
+#endif
diff --git a/demos/embedded/styledemo/stylewidget.ui b/demos/embedded/styledemo/stylewidget.ui
new file mode 100644
index 0000000..586faea
--- /dev/null
+++ b/demos/embedded/styledemo/stylewidget.ui
@@ -0,0 +1,429 @@
+<ui version="4.0" >
+ <class>StyleWidget</class>
+ <widget class="QWidget" name="StyleWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>339</width>
+ <height>230</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <property name="margin" >
+ <number>3</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title" >
+ <string>Styles</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>3</number>
+ </property>
+ <property name="margin" >
+ <number>3</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="noStyle" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>No-Style</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ <property name="autoExclusive" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="blueStyle" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Blue</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <property name="autoExclusive" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="khakiStyle" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Khaki</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <property name="autoExclusive" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="transparentStyle" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Transparent</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <property name="autoExclusive" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_3" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="frameLayout" >
+ <property name="margin" >
+ <number>3</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>My Value is:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="keyboardTracking" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QScrollBar" name="horizontalScrollBar" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="pushButton_2" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Show Scroller</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ <property name="flat" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QScrollBar" name="horizontalScrollBar_2" >
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QPushButton" name="pushButton" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Enable Scroller</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ <property name="flat" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="close" >
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text" >
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="StyleDemo.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>horizontalScrollBar</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>horizontalScrollBar_2</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>134</x>
+ <y>196</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>523</x>
+ <y>193</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>horizontalScrollBar_2</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>horizontalScrollBar</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>577</x>
+ <y>199</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>127</x>
+ <y>207</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>pushButton</sender>
+ <signal>clicked(bool)</signal>
+ <receiver>horizontalScrollBar_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>566</x>
+ <y>241</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>492</x>
+ <y>207</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>pushButton_2</sender>
+ <signal>clicked(bool)</signal>
+ <receiver>horizontalScrollBar</receiver>
+ <slot>setVisible(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>123</x>
+ <y>239</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>123</x>
+ <y>184</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>horizontalScrollBar_2</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>603</x>
+ <y>136</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>575</x>
+ <y>199</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/embeddeddialogs/No-Ones-Laughing-3.jpg b/demos/embeddeddialogs/No-Ones-Laughing-3.jpg
new file mode 100644
index 0000000..445567f
--- /dev/null
+++ b/demos/embeddeddialogs/No-Ones-Laughing-3.jpg
Binary files differ
diff --git a/demos/embeddeddialogs/customproxy.cpp b/demos/embeddeddialogs/customproxy.cpp
new file mode 100644
index 0000000..56a0548
--- /dev/null
+++ b/demos/embeddeddialogs/customproxy.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "customproxy.h"
+
+#include <QtGui>
+
+CustomProxy::CustomProxy(QGraphicsItem *parent, Qt::WindowFlags wFlags)
+ : QGraphicsProxyWidget(parent, wFlags), popupShown(false)
+{
+ timeLine = new QTimeLine(250, this);
+ connect(timeLine, SIGNAL(valueChanged(qreal)),
+ this, SLOT(updateStep(qreal)));
+ connect(timeLine, SIGNAL(stateChanged(QTimeLine::State)),
+ this, SLOT(stateChanged(QTimeLine::State)));
+}
+
+QRectF CustomProxy::boundingRect() const
+{
+ return QGraphicsProxyWidget::boundingRect().adjusted(0, 0, 10, 10);
+}
+
+void CustomProxy::paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+{
+ const QColor color(0, 0, 0, 64);
+
+ QRectF r = windowFrameRect();
+ QRectF right(r.right(), r.top() + 10, 10, r.height() - 10);
+ QRectF bottom(r.left() + 10, r.bottom(), r.width(), 10);
+ bool intersectsRight = right.intersects(option->exposedRect);
+ bool intersectsBottom = bottom.intersects(option->exposedRect);
+ if (intersectsRight && intersectsBottom) {
+ QPainterPath path;
+ path.addRect(right);
+ path.addRect(bottom);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(color);
+ painter->drawPath(path);
+ } else if (intersectsBottom) {
+ painter->fillRect(bottom, color);
+ } else if (intersectsRight) {
+ painter->fillRect(right, color);
+ }
+
+ QGraphicsProxyWidget::paintWindowFrame(painter, option, widget);
+}
+
+void CustomProxy::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
+{
+ QGraphicsProxyWidget::hoverEnterEvent(event);
+ scene()->setActiveWindow(this);
+ if (timeLine->currentValue() != 1)
+ zoomIn();
+}
+
+void CustomProxy::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
+{
+ QGraphicsProxyWidget::hoverLeaveEvent(event);
+ if (!popupShown && (timeLine->direction() != QTimeLine::Backward || timeLine->currentValue() != 0))
+ zoomOut();
+}
+
+bool CustomProxy::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+{
+ if (watched->isWindow() && (event->type() == QEvent::UngrabMouse || event->type() == QEvent::GrabMouse)) {
+ popupShown = watched->isVisible();
+ if (!popupShown && !isUnderMouse())
+ zoomOut();
+ }
+ return QGraphicsProxyWidget::sceneEventFilter(watched, event);
+}
+
+QVariant CustomProxy::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if (change == ItemChildRemovedChange)
+ removeSceneEventFilter(this);
+ return QGraphicsProxyWidget::itemChange(change, value);
+}
+
+void CustomProxy::updateStep(qreal step)
+{
+ QRectF r = boundingRect();
+ setTransform(QTransform()
+ .translate(r.width() / 2, r.height() / 2)
+ .rotate(step * 30, Qt::XAxis)
+ .rotate(step * 10, Qt::YAxis)
+ .rotate(step * 5, Qt::ZAxis)
+ .scale(1 + 1.5 * step, 1 + 1.5 * step)
+ .translate(-r.width() / 2, -r.height() / 2));
+}
+
+void CustomProxy::stateChanged(QTimeLine::State state)
+{
+ if (state == QTimeLine::Running) {
+ if (timeLine->direction() == QTimeLine::Forward)
+ setCacheMode(ItemCoordinateCache);
+ } else if (state == QTimeLine::NotRunning) {
+ if (timeLine->direction() == QTimeLine::Backward)
+ setCacheMode(DeviceCoordinateCache);
+ }
+}
+
+void CustomProxy::zoomIn()
+{
+ if (timeLine->direction() != QTimeLine::Forward)
+ timeLine->setDirection(QTimeLine::Forward);
+ if (timeLine->state() == QTimeLine::NotRunning)
+ timeLine->start();
+}
+
+void CustomProxy::zoomOut()
+{
+ if (timeLine->direction() != QTimeLine::Backward)
+ timeLine->setDirection(QTimeLine::Backward);
+ if (timeLine->state() == QTimeLine::NotRunning)
+ timeLine->start();
+}
diff --git a/demos/embeddeddialogs/customproxy.h b/demos/embeddeddialogs/customproxy.h
new file mode 100644
index 0000000..0a5fbaf
--- /dev/null
+++ b/demos/embeddeddialogs/customproxy.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CUSTOMPROXY_H
+#define CUSTOMPROXY_H
+
+#include <QtCore/qtimeline.h>
+#include <QtGui/qgraphicsproxywidget.h>
+
+class CustomProxy : public QGraphicsProxyWidget
+{
+ Q_OBJECT
+public:
+ CustomProxy(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0);
+
+ QRectF boundingRect() const;
+ void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget);
+
+protected:
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+private slots:
+ void updateStep(qreal step);
+ void stateChanged(QTimeLine::State);
+ void zoomIn();
+ void zoomOut();
+
+private:
+ QTimeLine *timeLine;
+ bool popupShown;
+};
+
+#endif
diff --git a/demos/embeddeddialogs/embeddeddialog.cpp b/demos/embeddeddialogs/embeddeddialog.cpp
new file mode 100644
index 0000000..40f361c
--- /dev/null
+++ b/demos/embeddeddialogs/embeddeddialog.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "embeddeddialog.h"
+#include "ui_embeddeddialog.h"
+
+#include <QtGui>
+
+EmbeddedDialog::EmbeddedDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ ui = new Ui_embeddedDialog;
+ ui->setupUi(this);
+ ui->layoutDirection->setCurrentIndex(layoutDirection() != Qt::LeftToRight);
+
+ foreach (QString styleName, QStyleFactory::keys()) {
+ ui->style->addItem(styleName);
+ if (style()->objectName().toLower() == styleName.toLower())
+ ui->style->setCurrentIndex(ui->style->count() - 1);
+ }
+
+ connect(ui->layoutDirection, SIGNAL(activated(int)),
+ this, SLOT(layoutDirectionChanged(int)));
+ connect(ui->spacing, SIGNAL(valueChanged(int)),
+ this, SLOT(spacingChanged(int)));
+ connect(ui->fontComboBox, SIGNAL(currentFontChanged(const QFont &)),
+ this, SLOT(fontChanged(const QFont &)));
+ connect(ui->style, SIGNAL(activated(QString)),
+ this, SLOT(styleChanged(QString)));
+}
+
+EmbeddedDialog::~EmbeddedDialog()
+{
+ delete ui;
+}
+
+void EmbeddedDialog::layoutDirectionChanged(int index)
+{
+ setLayoutDirection(index == 0 ? Qt::LeftToRight : Qt::RightToLeft);
+}
+
+void EmbeddedDialog::spacingChanged(int spacing)
+{
+ layout()->setSpacing(spacing);
+ adjustSize();
+}
+
+void EmbeddedDialog::fontChanged(const QFont &font)
+{
+ setFont(font);
+}
+
+static void setStyleHelper(QWidget *widget, QStyle *style)
+{
+ widget->setStyle(style);
+ widget->setPalette(style->standardPalette());
+ foreach (QObject *child, widget->children()) {
+ if (QWidget *childWidget = qobject_cast<QWidget *>(child))
+ setStyleHelper(childWidget, style);
+ }
+}
+
+void EmbeddedDialog::styleChanged(const QString &styleName)
+{
+ QStyle *style = QStyleFactory::create(styleName);
+ if (style)
+ setStyleHelper(this, style);
+}
diff --git a/demos/embeddeddialogs/embeddeddialog.h b/demos/embeddeddialogs/embeddeddialog.h
new file mode 100644
index 0000000..787196c
--- /dev/null
+++ b/demos/embeddeddialogs/embeddeddialog.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EMBEDDEDDIALOG_H
+#define EMBEDDEDDIALOG_H
+
+#include <QtGui/qdialog.h>
+
+QT_FORWARD_DECLARE_CLASS(Ui_embeddedDialog);
+
+class EmbeddedDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ EmbeddedDialog(QWidget *parent = 0);
+ ~EmbeddedDialog();
+
+private slots:
+ void layoutDirectionChanged(int index);
+ void spacingChanged(int spacing);
+ void fontChanged(const QFont &font);
+ void styleChanged(const QString &styleName);
+
+private:
+ Ui_embeddedDialog *ui;
+};
+
+#endif
diff --git a/demos/embeddeddialogs/embeddeddialog.ui b/demos/embeddeddialogs/embeddeddialog.ui
new file mode 100644
index 0000000..f967b10
--- /dev/null
+++ b/demos/embeddeddialogs/embeddeddialog.ui
@@ -0,0 +1,87 @@
+<ui version="4.0" >
+ <class>embeddedDialog</class>
+ <widget class="QDialog" name="embeddedDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>407</width>
+ <height>134</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Embedded Dialog</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Layout Direction:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>layoutDirection</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="layoutDirection" >
+ <item>
+ <property name="text" >
+ <string>Left to Right</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Right to Left</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Select Font:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>fontComboBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QFontComboBox" name="fontComboBox" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Style:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>style</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QComboBox" name="style" />
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Layout spacing:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>spacing</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QSlider" name="spacing" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/embeddeddialogs/embeddeddialogs.pro b/demos/embeddeddialogs/embeddeddialogs.pro
new file mode 100644
index 0000000..a38e3e8
--- /dev/null
+++ b/demos/embeddeddialogs/embeddeddialogs.pro
@@ -0,0 +1,17 @@
+SOURCES += main.cpp
+SOURCES += customproxy.cpp embeddeddialog.cpp
+HEADERS += customproxy.h embeddeddialog.h
+
+FORMS += embeddeddialog.ui
+RESOURCES += embeddeddialogs.qrc
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/embeddeddialogs
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.png *.jpg *.plist *.icns *.ico *.rc *.pro *.html *.doc images
+sources.path = $$[QT_INSTALL_DEMOS]/embeddeddialogs
+INSTALLS += target sources
diff --git a/demos/embeddeddialogs/embeddeddialogs.qrc b/demos/embeddeddialogs/embeddeddialogs.qrc
new file mode 100644
index 0000000..33be503
--- /dev/null
+++ b/demos/embeddeddialogs/embeddeddialogs.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource>
+ <file>No-Ones-Laughing-3.jpg</file>
+ </qresource>
+</RCC>
diff --git a/demos/embeddeddialogs/main.cpp b/demos/embeddeddialogs/main.cpp
new file mode 100644
index 0000000..4cf7325
--- /dev/null
+++ b/demos/embeddeddialogs/main.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "customproxy.h"
+#include "embeddeddialog.h"
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(embeddeddialogs);
+ QApplication app(argc, argv);
+
+ QGraphicsScene scene;
+ scene.setStickyFocus(true);
+#ifndef Q_OS_WINCE
+ const int gridSize = 10;
+#else
+ const int gridSize = 5;
+#endif
+
+ for (int y = 0; y < gridSize; ++y) {
+ for (int x = 0; x < gridSize; ++x) {
+ CustomProxy *proxy = new CustomProxy(0, Qt::Window);
+ proxy->setWidget(new EmbeddedDialog);
+
+ QRectF rect = proxy->boundingRect();
+
+ proxy->setPos(x * rect.width() * 1.05, y * rect.height() * 1.05);
+ proxy->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+
+ scene.addItem(proxy);
+ proxy->installSceneEventFilter(proxy);
+ }
+ }
+ scene.setSceneRect(scene.itemsBoundingRect());
+
+ QGraphicsView view(&scene);
+ view.scale(0.5, 0.5);
+ view.setRenderHints(view.renderHints() | QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ view.setBackgroundBrush(QPixmap(":/No-Ones-Laughing-3.jpg"));
+ view.setCacheMode(QGraphicsView::CacheBackground);
+ view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ view.show();
+ view.setWindowTitle("Embedded Dialogs Demo");
+ return app.exec();
+}
diff --git a/demos/gradients/gradients.cpp b/demos/gradients/gradients.cpp
new file mode 100644
index 0000000..6256ba9
--- /dev/null
+++ b/demos/gradients/gradients.cpp
@@ -0,0 +1,516 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "gradients.h"
+#include "hoverpoints.h"
+
+ShadeWidget::ShadeWidget(ShadeType type, QWidget *parent)
+ : QWidget(parent), m_shade_type(type), m_alpha_gradient(QLinearGradient(0, 0, 0, 0))
+{
+
+ // Checkers background
+ if (m_shade_type == ARGBShade) {
+ QPixmap pm(20, 20);
+ QPainter pmp(&pm);
+ pmp.fillRect(0, 0, 10, 10, Qt::lightGray);
+ pmp.fillRect(10, 10, 10, 10, Qt::lightGray);
+ pmp.fillRect(0, 10, 10, 10, Qt::darkGray);
+ pmp.fillRect(10, 0, 10, 10, Qt::darkGray);
+ pmp.end();
+ QPalette pal = palette();
+ pal.setBrush(backgroundRole(), QBrush(pm));
+ setAutoFillBackground(true);
+ setPalette(pal);
+
+ } else {
+ setAttribute(Qt::WA_NoBackground);
+
+ }
+
+ QPolygonF points;
+ points << QPointF(0, sizeHint().height())
+ << QPointF(sizeHint().width(), 0);
+
+ m_hoverPoints = new HoverPoints(this, HoverPoints::CircleShape);
+// m_hoverPoints->setConnectionType(HoverPoints::LineConnection);
+ m_hoverPoints->setPoints(points);
+ m_hoverPoints->setPointLock(0, HoverPoints::LockToLeft);
+ m_hoverPoints->setPointLock(1, HoverPoints::LockToRight);
+ m_hoverPoints->setSortType(HoverPoints::XSort);
+
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+
+ connect(m_hoverPoints, SIGNAL(pointsChanged(const QPolygonF &)), this, SIGNAL(colorsChanged()));
+}
+
+
+QPolygonF ShadeWidget::points() const
+{
+ return m_hoverPoints->points();
+}
+
+
+uint ShadeWidget::colorAt(int x)
+{
+ generateShade();
+
+ QPolygonF pts = m_hoverPoints->points();
+ for (int i=1; i < pts.size(); ++i) {
+ if (pts.at(i-1).x() <= x && pts.at(i).x() >= x) {
+ QLineF l(pts.at(i-1), pts.at(i));
+ l.setLength(l.length() * ((x - l.x1()) / l.dx()));
+ return m_shade.pixel(qRound(qMin(l.x2(), (qreal(m_shade.width() - 1)))),
+ qRound(qMin(l.y2(), qreal(m_shade.height() - 1))));
+ }
+ }
+ return 0;
+}
+
+
+void ShadeWidget::setGradientStops(const QGradientStops &stops)
+{
+ if (m_shade_type == ARGBShade) {
+ m_alpha_gradient = QLinearGradient(0, 0, width(), 0);
+
+ for (int i=0; i<stops.size(); ++i) {
+ QColor c = stops.at(i).second;
+ m_alpha_gradient.setColorAt(stops.at(i).first, QColor(c.red(), c.green(), c.blue()));
+ }
+
+ m_shade = QImage();
+ generateShade();
+ update();
+ }
+}
+
+
+void ShadeWidget::paintEvent(QPaintEvent *)
+{
+ generateShade();
+
+ QPainter p(this);
+ p.drawImage(0, 0, m_shade);
+
+ p.setPen(QColor(146, 146, 146));
+ p.drawRect(0, 0, width() - 1, height() - 1);
+}
+
+
+void ShadeWidget::generateShade()
+{
+ if (m_shade.isNull() || m_shade.size() != size()) {
+
+ if (m_shade_type == ARGBShade) {
+ m_shade = QImage(size(), QImage::Format_ARGB32_Premultiplied);
+ m_shade.fill(0);
+
+ QPainter p(&m_shade);
+ p.fillRect(rect(), m_alpha_gradient);
+
+ p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ QLinearGradient fade(0, 0, 0, height());
+ fade.setColorAt(0, QColor(0, 0, 0, 255));
+ fade.setColorAt(1, QColor(0, 0, 0, 0));
+ p.fillRect(rect(), fade);
+
+ } else {
+ m_shade = QImage(size(), QImage::Format_RGB32);
+ QLinearGradient shade(0, 0, 0, height());
+ shade.setColorAt(1, Qt::black);
+
+ if (m_shade_type == RedShade)
+ shade.setColorAt(0, Qt::red);
+ else if (m_shade_type == GreenShade)
+ shade.setColorAt(0, Qt::green);
+ else
+ shade.setColorAt(0, Qt::blue);
+
+ QPainter p(&m_shade);
+ p.fillRect(rect(), shade);
+ }
+ }
+
+
+}
+
+
+GradientEditor::GradientEditor(QWidget *parent)
+ : QWidget(parent)
+{
+ QVBoxLayout *vbox = new QVBoxLayout(this);
+ vbox->setSpacing(1);
+ vbox->setMargin(1);
+
+ m_red_shade = new ShadeWidget(ShadeWidget::RedShade, this);
+ m_green_shade = new ShadeWidget(ShadeWidget::GreenShade, this);
+ m_blue_shade = new ShadeWidget(ShadeWidget::BlueShade, this);
+ m_alpha_shade = new ShadeWidget(ShadeWidget::ARGBShade, this);
+
+ vbox->addWidget(m_red_shade);
+ vbox->addWidget(m_green_shade);
+ vbox->addWidget(m_blue_shade);
+ vbox->addWidget(m_alpha_shade);
+
+ connect(m_red_shade, SIGNAL(colorsChanged()), this, SLOT(pointsUpdated()));
+ connect(m_green_shade, SIGNAL(colorsChanged()), this, SLOT(pointsUpdated()));
+ connect(m_blue_shade, SIGNAL(colorsChanged()), this, SLOT(pointsUpdated()));
+ connect(m_alpha_shade, SIGNAL(colorsChanged()), this, SLOT(pointsUpdated()));
+}
+
+
+inline static bool x_less_than(const QPointF &p1, const QPointF &p2)
+{
+ return p1.x() < p2.x();
+}
+
+
+void GradientEditor::pointsUpdated()
+{
+ qreal w = m_alpha_shade->width();
+
+ QGradientStops stops;
+
+ QPolygonF points;
+
+ points += m_red_shade->points();
+ points += m_green_shade->points();
+ points += m_blue_shade->points();
+ points += m_alpha_shade->points();
+
+ qSort(points.begin(), points.end(), x_less_than);
+
+ for (int i=0; i<points.size(); ++i) {
+ qreal x = int(points.at(i).x());
+ if (i < points.size() - 1 && x == points.at(i+1).x())
+ continue;
+ QColor color((0x00ff0000 & m_red_shade->colorAt(int(x))) >> 16,
+ (0x0000ff00 & m_green_shade->colorAt(int(x))) >> 8,
+ (0x000000ff & m_blue_shade->colorAt(int(x))),
+ (0xff000000 & m_alpha_shade->colorAt(int(x))) >> 24);
+
+ if (x / w > 1)
+ return;
+
+ stops << QGradientStop(x / w, color);
+ }
+
+ m_alpha_shade->setGradientStops(stops);
+
+ emit gradientStopsChanged(stops);
+}
+
+
+static void set_shade_points(const QPolygonF &points, ShadeWidget *shade)
+{
+ shade->hoverPoints()->setPoints(points);
+ shade->hoverPoints()->setPointLock(0, HoverPoints::LockToLeft);
+ shade->hoverPoints()->setPointLock(points.size() - 1, HoverPoints::LockToRight);
+ shade->update();
+}
+
+void GradientEditor::setGradientStops(const QGradientStops &stops)
+{
+ QPolygonF pts_red, pts_green, pts_blue, pts_alpha;
+
+ qreal h_red = m_red_shade->height();
+ qreal h_green = m_green_shade->height();
+ qreal h_blue = m_blue_shade->height();
+ qreal h_alpha = m_alpha_shade->height();
+
+ for (int i=0; i<stops.size(); ++i) {
+ qreal pos = stops.at(i).first;
+ QRgb color = stops.at(i).second.rgba();
+ pts_red << QPointF(pos * m_red_shade->width(), h_red - qRed(color) * h_red / 255);
+ pts_green << QPointF(pos * m_green_shade->width(), h_green - qGreen(color) * h_green / 255);
+ pts_blue << QPointF(pos * m_blue_shade->width(), h_blue - qBlue(color) * h_blue / 255);
+ pts_alpha << QPointF(pos * m_alpha_shade->width(), h_alpha - qAlpha(color) * h_alpha / 255);
+ }
+
+ set_shade_points(pts_red, m_red_shade);
+ set_shade_points(pts_green, m_green_shade);
+ set_shade_points(pts_blue, m_blue_shade);
+ set_shade_points(pts_alpha, m_alpha_shade);
+
+}
+
+GradientWidget::GradientWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setWindowTitle(tr("Gradients"));
+
+ m_renderer = new GradientRenderer(this);
+
+ QGroupBox *mainGroup = new QGroupBox(this);
+ mainGroup->setTitle(tr("Gradients"));
+
+ QGroupBox *editorGroup = new QGroupBox(mainGroup);
+ editorGroup->setTitle(tr("Color Editor"));
+ m_editor = new GradientEditor(editorGroup);
+
+ QGroupBox *typeGroup = new QGroupBox(mainGroup);
+ typeGroup->setTitle(tr("Gradient Type"));
+ m_linearButton = new QRadioButton(tr("Linear Gradient"), typeGroup);
+ m_radialButton = new QRadioButton(tr("Radial Gradient"), typeGroup);
+ m_conicalButton = new QRadioButton(tr("Conical Gradient"), typeGroup);
+
+ QGroupBox *spreadGroup = new QGroupBox(mainGroup);
+ spreadGroup->setTitle(tr("Spread Method"));
+ m_padSpreadButton = new QRadioButton(tr("Pad Spread"), spreadGroup);
+ m_reflectSpreadButton = new QRadioButton(tr("Reflect Spread"), spreadGroup);
+ m_repeatSpreadButton = new QRadioButton(tr("Repeat Spread"), spreadGroup);
+
+ QGroupBox *defaultsGroup = new QGroupBox(mainGroup);
+ defaultsGroup->setTitle(tr("Defaults"));
+ QPushButton *default1Button = new QPushButton(tr("1"), defaultsGroup);
+ QPushButton *default2Button = new QPushButton(tr("2"), defaultsGroup);
+ QPushButton *default3Button = new QPushButton(tr("3"), defaultsGroup);
+ QPushButton *default4Button = new QPushButton(tr("Reset"), editorGroup);
+
+ QPushButton *showSourceButton = new QPushButton(mainGroup);
+ showSourceButton->setText(tr("Show Source"));
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(m_renderer->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+ QPushButton *whatsThisButton = new QPushButton(mainGroup);
+ whatsThisButton->setText(tr("What's This?"));
+ whatsThisButton->setCheckable(true);
+
+ // Layouts
+ QHBoxLayout *mainLayout = new QHBoxLayout(this);
+ mainLayout->addWidget(m_renderer);
+ mainLayout->addWidget(mainGroup);
+
+ mainGroup->setFixedWidth(180);
+ QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
+ mainGroupLayout->addWidget(editorGroup);
+ mainGroupLayout->addWidget(typeGroup);
+ mainGroupLayout->addWidget(spreadGroup);
+ mainGroupLayout->addWidget(defaultsGroup);
+ mainGroupLayout->addStretch(1);
+ mainGroupLayout->addWidget(showSourceButton);
+#ifdef QT_OPENGL_SUPPORT
+ mainGroupLayout->addWidget(enableOpenGLButton);
+#endif
+ mainGroupLayout->addWidget(whatsThisButton);
+
+ QVBoxLayout *editorGroupLayout = new QVBoxLayout(editorGroup);
+ editorGroupLayout->addWidget(m_editor);
+
+ QVBoxLayout *typeGroupLayout = new QVBoxLayout(typeGroup);
+ typeGroupLayout->addWidget(m_linearButton);
+ typeGroupLayout->addWidget(m_radialButton);
+ typeGroupLayout->addWidget(m_conicalButton);
+
+ QVBoxLayout *spreadGroupLayout = new QVBoxLayout(spreadGroup);
+ spreadGroupLayout->addWidget(m_padSpreadButton);
+ spreadGroupLayout->addWidget(m_repeatSpreadButton);
+ spreadGroupLayout->addWidget(m_reflectSpreadButton);
+
+ QHBoxLayout *defaultsGroupLayout = new QHBoxLayout(defaultsGroup);
+ defaultsGroupLayout->addWidget(default1Button);
+ defaultsGroupLayout->addWidget(default2Button);
+ defaultsGroupLayout->addWidget(default3Button);
+ editorGroupLayout->addWidget(default4Button);
+
+ connect(m_editor, SIGNAL(gradientStopsChanged(const QGradientStops &)),
+ m_renderer, SLOT(setGradientStops(const QGradientStops &)));
+
+ connect(m_linearButton, SIGNAL(clicked()), m_renderer, SLOT(setLinearGradient()));
+ connect(m_radialButton, SIGNAL(clicked()), m_renderer, SLOT(setRadialGradient()));
+ connect(m_conicalButton, SIGNAL(clicked()), m_renderer, SLOT(setConicalGradient()));
+
+ connect(m_padSpreadButton, SIGNAL(clicked()), m_renderer, SLOT(setPadSpread()));
+ connect(m_reflectSpreadButton, SIGNAL(clicked()), m_renderer, SLOT(setReflectSpread()));
+ connect(m_repeatSpreadButton, SIGNAL(clicked()), m_renderer, SLOT(setRepeatSpread()));
+
+ connect(default1Button, SIGNAL(clicked()), this, SLOT(setDefault1()));
+ connect(default2Button, SIGNAL(clicked()), this, SLOT(setDefault2()));
+ connect(default3Button, SIGNAL(clicked()), this, SLOT(setDefault3()));
+ connect(default4Button, SIGNAL(clicked()), this, SLOT(setDefault4()));
+
+ connect(showSourceButton, SIGNAL(clicked()), m_renderer, SLOT(showSource()));
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+#endif
+ connect(whatsThisButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setDescriptionEnabled(bool)));
+ connect(whatsThisButton, SIGNAL(clicked(bool)),
+ m_renderer->hoverPoints(), SLOT(setDisabled(bool)));
+ connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
+ whatsThisButton, SLOT(setChecked(bool)));
+ connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
+ m_renderer->hoverPoints(), SLOT(setDisabled(bool)));
+
+ m_renderer->loadSourceFile(":res/gradients/gradients.cpp");
+ m_renderer->loadDescription(":res/gradients/gradients.html");
+
+ QTimer::singleShot(50, this, SLOT(setDefault1()));
+}
+
+void GradientWidget::setDefault(int config)
+{
+ QGradientStops stops;
+ QPolygonF points;
+ switch (config) {
+ case 1:
+ stops << QGradientStop(0.00, QColor::fromRgba(0));
+ stops << QGradientStop(0.04, QColor::fromRgba(0xff131360));
+ stops << QGradientStop(0.08, QColor::fromRgba(0xff202ccc));
+ stops << QGradientStop(0.42, QColor::fromRgba(0xff93d3f9));
+ stops << QGradientStop(0.51, QColor::fromRgba(0xffb3e6ff));
+ stops << QGradientStop(0.73, QColor::fromRgba(0xffffffec));
+ stops << QGradientStop(0.92, QColor::fromRgba(0xff5353d9));
+ stops << QGradientStop(0.96, QColor::fromRgba(0xff262666));
+ stops << QGradientStop(1.00, QColor::fromRgba(0));
+ m_linearButton->animateClick();
+ m_repeatSpreadButton->animateClick();
+ break;
+
+ case 2:
+ stops << QGradientStop(0.00, QColor::fromRgba(0xffffffff));
+ stops << QGradientStop(0.11, QColor::fromRgba(0xfff9ffa0));
+ stops << QGradientStop(0.13, QColor::fromRgba(0xfff9ff99));
+ stops << QGradientStop(0.14, QColor::fromRgba(0xfff3ff86));
+ stops << QGradientStop(0.49, QColor::fromRgba(0xff93b353));
+ stops << QGradientStop(0.87, QColor::fromRgba(0xff264619));
+ stops << QGradientStop(0.96, QColor::fromRgba(0xff0c1306));
+ stops << QGradientStop(1.00, QColor::fromRgba(0));
+ m_radialButton->animateClick();
+ m_padSpreadButton->animateClick();
+ break;
+
+ case 3:
+ stops << QGradientStop(0.00, QColor::fromRgba(0));
+ stops << QGradientStop(0.10, QColor::fromRgba(0xffe0cc73));
+ stops << QGradientStop(0.17, QColor::fromRgba(0xffc6a006));
+ stops << QGradientStop(0.46, QColor::fromRgba(0xff600659));
+ stops << QGradientStop(0.72, QColor::fromRgba(0xff0680ac));
+ stops << QGradientStop(0.92, QColor::fromRgba(0xffb9d9e6));
+ stops << QGradientStop(1.00, QColor::fromRgba(0));
+ m_conicalButton->animateClick();
+ m_padSpreadButton->animateClick();
+ break;
+
+ case 4:
+ stops << QGradientStop(0.00, QColor::fromRgba(0xff000000));
+ stops << QGradientStop(1.00, QColor::fromRgba(0xffffffff));
+ break;
+
+ default:
+ qWarning("bad default: %d\n", config);
+ break;
+ }
+
+ QPolygonF pts;
+ int h_off = m_renderer->width() / 10;
+ int v_off = m_renderer->height() / 8;
+ pts << QPointF(m_renderer->width() / 2, m_renderer->height() / 2)
+ << QPointF(m_renderer->width() / 2 - h_off, m_renderer->height() / 2 - v_off);
+
+ m_editor->setGradientStops(stops);
+ m_renderer->hoverPoints()->setPoints(pts);
+ m_renderer->setGradientStops(stops);
+}
+
+
+GradientRenderer::GradientRenderer(QWidget *parent)
+ : ArthurFrame(parent)
+{
+ m_hoverPoints = new HoverPoints(this, HoverPoints::CircleShape);
+ m_hoverPoints->setPointSize(QSize(20, 20));
+ m_hoverPoints->setConnectionType(HoverPoints::NoConnection);
+ m_hoverPoints->setEditable(false);
+
+ QVector<QPointF> points;
+ points << QPointF(100, 100) << QPointF(200, 200);
+ m_hoverPoints->setPoints(points);
+
+ m_spread = QGradient::PadSpread;
+ m_gradientType = Qt::LinearGradientPattern;
+}
+
+void GradientRenderer::setGradientStops(const QGradientStops &stops)
+{
+ m_stops = stops;
+ update();
+}
+
+
+void GradientRenderer::mousePressEvent(QMouseEvent *)
+{
+ setDescriptionEnabled(false);
+}
+
+void GradientRenderer::paint(QPainter *p)
+{
+ QPolygonF pts = m_hoverPoints->points();
+
+ QGradient g;
+
+ if (m_gradientType == Qt::LinearGradientPattern) {
+ g = QLinearGradient(pts.at(0), pts.at(1));
+
+ } else if (m_gradientType == Qt::RadialGradientPattern) {
+ g = QRadialGradient(pts.at(0), qMin(width(), height()) / 3.0, pts.at(1));
+
+ } else {
+ QLineF l(pts.at(0), pts.at(1));
+ qreal angle = l.angle(QLineF(0, 0, 1, 0));
+ if (l.dy() > 0)
+ angle = 360 - angle;
+ g = QConicalGradient(pts.at(0), angle);
+ }
+
+ for (int i=0; i<m_stops.size(); ++i)
+ g.setColorAt(m_stops.at(i).first, m_stops.at(i).second);
+
+ g.setSpread(m_spread);
+
+ p->setBrush(g);
+ p->setPen(Qt::NoPen);
+
+ p->drawRect(rect());
+
+}
diff --git a/demos/gradients/gradients.h b/demos/gradients/gradients.h
new file mode 100644
index 0000000..74e8417
--- /dev/null
+++ b/demos/gradients/gradients.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRADIENTS_H
+#define GRADIENTS_H
+
+#include "arthurwidgets.h"
+
+#include <QtGui>
+
+class HoverPoints;
+
+
+class ShadeWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ enum ShadeType {
+ RedShade,
+ GreenShade,
+ BlueShade,
+ ARGBShade
+ };
+
+ ShadeWidget(ShadeType type, QWidget *parent);
+
+ void setGradientStops(const QGradientStops &stops);
+
+ void paintEvent(QPaintEvent *e);
+
+ QSize sizeHint() const { return QSize(150, 40); }
+ QPolygonF points() const;
+
+ HoverPoints *hoverPoints() const { return m_hoverPoints; }
+
+ uint colorAt(int x);
+
+signals:
+ void colorsChanged();
+
+private:
+ void generateShade();
+
+ ShadeType m_shade_type;
+ QImage m_shade;
+ HoverPoints *m_hoverPoints;
+ QLinearGradient m_alpha_gradient;
+};
+
+class GradientEditor : public QWidget
+{
+ Q_OBJECT
+public:
+ GradientEditor(QWidget *parent);
+
+ void setGradientStops(const QGradientStops &stops);
+
+public slots:
+ void pointsUpdated();
+
+signals:
+ void gradientStopsChanged(const QGradientStops &stops);
+
+private:
+ ShadeWidget *m_red_shade;
+ ShadeWidget *m_green_shade;
+ ShadeWidget *m_blue_shade;
+ ShadeWidget *m_alpha_shade;
+};
+
+
+class GradientRenderer : public ArthurFrame
+{
+ Q_OBJECT
+public:
+ GradientRenderer(QWidget *parent);
+ void paint(QPainter *p);
+
+ QSize sizeHint() const { return QSize(400, 400); }
+
+ HoverPoints *hoverPoints() const { return m_hoverPoints; }
+ void mousePressEvent(QMouseEvent *e);
+
+public slots:
+ void setGradientStops(const QGradientStops &stops);
+
+ void setPadSpread() { m_spread = QGradient::PadSpread; update(); }
+ void setRepeatSpread() { m_spread = QGradient::RepeatSpread; update(); }
+ void setReflectSpread() { m_spread = QGradient::ReflectSpread; update(); }
+
+ void setLinearGradient() { m_gradientType = Qt::LinearGradientPattern; update(); }
+ void setRadialGradient() { m_gradientType = Qt::RadialGradientPattern; update(); }
+ void setConicalGradient() { m_gradientType = Qt::ConicalGradientPattern; update(); }
+
+
+private:
+ QGradientStops m_stops;
+ HoverPoints *m_hoverPoints;
+
+ QGradient::Spread m_spread;
+ Qt::BrushStyle m_gradientType;
+};
+
+
+class GradientWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ GradientWidget(QWidget *parent);
+
+public slots:
+ void setDefault1() { setDefault(1); }
+ void setDefault2() { setDefault(2); }
+ void setDefault3() { setDefault(3); }
+ void setDefault4() { setDefault(4); }
+
+private:
+ void setDefault(int i);
+
+ GradientRenderer *m_renderer;
+ GradientEditor *m_editor;
+
+ QRadioButton *m_linearButton;
+ QRadioButton *m_radialButton;
+ QRadioButton *m_conicalButton;
+ QRadioButton *m_padSpreadButton;
+ QRadioButton *m_reflectSpreadButton;
+ QRadioButton *m_repeatSpreadButton;
+
+};
+
+#endif // GRADIENTS_H
diff --git a/demos/gradients/gradients.html b/demos/gradients/gradients.html
new file mode 100644
index 0000000..1ea2c0e
--- /dev/null
+++ b/demos/gradients/gradients.html
@@ -0,0 +1,31 @@
+<html>
+<center>
+<h2>Gradients</h2>
+</center>
+
+<p>In this demo we show the various types of gradients that can
+be used in Qt.</p>
+
+<p>There are three types of gradients:
+
+<ul>
+ <li><b>Linear</b> gradients interpolate colors between start and end
+ points.</li>
+ <li><b>Radial</b> gradients interpolate colors between a focal point and the
+ points on a circle surrounding it.</li>
+ <li><b>Conical</b> gradients interpolate colors around a center point.</li>
+</ul>
+
+</p>
+
+<p>The panel on the right contains a color table editor that defines
+the colors in the gradient. The three topmost controls determine the red,
+green and blue components while the last defines the alpha of the
+gradient. You can move points, and add new ones, by clicking with the left
+mouse button, and remove points by clicking with the right button.</p>
+
+<p>There are three default configurations available at the bottom of
+the page that are provided as suggestions on how a color table could be
+configured.</p>
+
+</html>
diff --git a/demos/gradients/gradients.pro b/demos/gradients/gradients.pro
new file mode 100644
index 0000000..167572b
--- /dev/null
+++ b/demos/gradients/gradients.pro
@@ -0,0 +1,18 @@
+SOURCES += main.cpp gradients.cpp
+HEADERS += gradients.h
+
+SHARED_FOLDER = ../shared
+
+include($$SHARED_FOLDER/shared.pri)
+
+RESOURCES += gradients.qrc
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/gradients
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/gradients
+INSTALLS += target sources
diff --git a/demos/gradients/gradients.qrc b/demos/gradients/gradients.qrc
new file mode 100644
index 0000000..fb971eb
--- /dev/null
+++ b/demos/gradients/gradients.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/gradients">
+ <file>gradients.cpp</file>
+ <file>gradients.html</file>
+</qresource>
+</RCC>
diff --git a/demos/gradients/main.cpp b/demos/gradients/main.cpp
new file mode 100644
index 0000000..f880510
--- /dev/null
+++ b/demos/gradients/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "gradients.h"
+
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(gradients);
+
+ QApplication app(argc, argv);
+
+ GradientWidget gradientWidget(0);
+ QStyle *arthurStyle = new ArthurStyle();
+ gradientWidget.setStyle(arthurStyle);
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(&gradientWidget);
+ foreach (QWidget *w, widgets)
+ w->setStyle(arthurStyle);
+ gradientWidget.show();
+
+ return app.exec();
+}
diff --git a/demos/interview/README b/demos/interview/README
new file mode 100644
index 0000000..5089442
--- /dev/null
+++ b/demos/interview/README
@@ -0,0 +1,2 @@
+The interview example shows the same model and selection being shared
+between three different views.
diff --git a/demos/interview/images/folder.png b/demos/interview/images/folder.png
new file mode 100644
index 0000000..589fd2d
--- /dev/null
+++ b/demos/interview/images/folder.png
Binary files differ
diff --git a/demos/interview/images/interview.png b/demos/interview/images/interview.png
new file mode 100644
index 0000000..0c3d690
--- /dev/null
+++ b/demos/interview/images/interview.png
Binary files differ
diff --git a/demos/interview/images/services.png b/demos/interview/images/services.png
new file mode 100644
index 0000000..6b2ad96
--- /dev/null
+++ b/demos/interview/images/services.png
Binary files differ
diff --git a/demos/interview/interview.pro b/demos/interview/interview.pro
new file mode 100644
index 0000000..c013755
--- /dev/null
+++ b/demos/interview/interview.pro
@@ -0,0 +1,18 @@
+TEMPLATE = app
+
+CONFIG += qt warn_on
+HEADERS += model.h
+SOURCES += model.cpp main.cpp
+RESOURCES += interview.qrc
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/interview
+sources.files = $$SOURCES $$HEADERS $$RESOURCES README *.pro images
+sources.path = $$[QT_INSTALL_DEMOS]/interview
+INSTALLS += target sources
+
diff --git a/demos/interview/interview.qrc b/demos/interview/interview.qrc
new file mode 100644
index 0000000..b28ea34
--- /dev/null
+++ b/demos/interview/interview.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>images/folder.png</file>
+ <file>images/services.png</file>
+ <file>images/interview.png</file>
+</qresource>
+</RCC>
diff --git a/demos/interview/main.cpp b/demos/interview/main.cpp
new file mode 100644
index 0000000..9682322
--- /dev/null
+++ b/demos/interview/main.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "model.h"
+
+#include <QApplication>
+#include <QTableView>
+#include <QTreeView>
+#include <QListView>
+#include <QSplitter>
+#include <QHeaderView>
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(interview);
+
+ QApplication app(argc, argv);
+ QSplitter page;
+
+ QAbstractItemModel *data = new Model(1000, 10, &page);
+ QItemSelectionModel *selections = new QItemSelectionModel(data);
+
+ QTableView *table = new QTableView;
+ table->setModel(data);
+ table->setSelectionModel(selections);
+ table->horizontalHeader()->setMovable(true);
+ table->verticalHeader()->setMovable(true);
+ // Set StaticContents to enable minimal repaints on resizes.
+ table->viewport()->setAttribute(Qt::WA_StaticContents);
+ page.addWidget(table);
+
+ QTreeView *tree = new QTreeView;
+ tree->setModel(data);
+ tree->setSelectionModel(selections);
+ tree->setUniformRowHeights(true);
+ tree->header()->setStretchLastSection(false);
+ tree->viewport()->setAttribute(Qt::WA_StaticContents);
+ // Disable the focus rect to get minimal repaints when scrolling on Mac.
+ tree->setAttribute(Qt::WA_MacShowFocusRect, false);
+ page.addWidget(tree);
+
+ QListView *list = new QListView;
+ list->setModel(data);
+ list->setSelectionModel(selections);
+ list->setViewMode(QListView::IconMode);
+ list->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ list->setAlternatingRowColors(false);
+ list->viewport()->setAttribute(Qt::WA_StaticContents);
+ list->setAttribute(Qt::WA_MacShowFocusRect, false);
+ page.addWidget(list);
+
+ page.setWindowIcon(QPixmap(":/images/interview.png"));
+ page.setWindowTitle("Interview");
+ page.show();
+
+ return app.exec();
+}
diff --git a/demos/interview/model.cpp b/demos/interview/model.cpp
new file mode 100644
index 0000000..1d5040c
--- /dev/null
+++ b/demos/interview/model.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "model.h"
+#include <QIcon>
+#include <QPixmap>
+
+Model::Model(int rows, int columns, QObject *parent)
+ : QAbstractItemModel(parent),
+ rc(rows), cc(columns),
+ tree(new QVector<Node>(rows, Node(0)))
+{
+
+}
+
+Model::~Model()
+{
+ delete tree;
+}
+
+QModelIndex Model::index(int row, int column, const QModelIndex &parent) const
+{
+ if (row < rc && row >= 0 && column < cc && column >= 0) {
+ Node *p = static_cast<Node*>(parent.internalPointer());
+ Node *n = node(row, p);
+ if (n)
+ return createIndex(row, column, n);
+ }
+ return QModelIndex();
+}
+
+QModelIndex Model::parent(const QModelIndex &child) const
+{
+ if (child.isValid()) {
+ Node *n = static_cast<Node*>(child.internalPointer());
+ Node *p = parent(n);
+ if (p)
+ return createIndex(row(p), 0, p);
+ }
+ return QModelIndex();
+}
+
+int Model::rowCount(const QModelIndex &parent) const
+{
+ return (parent.isValid() && parent.column() != 0) ? 0 : rc;
+}
+
+int Model::columnCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return cc;
+}
+
+QVariant Model::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+ if (role == Qt::DisplayRole)
+ return "Item " + QString::number(index.row()) + ":" + QString::number(index.column());
+ if (role == Qt::DecorationRole) {
+ if (index.column() == 0)
+ return iconProvider.icon(QFileIconProvider::Folder);
+ return iconProvider.icon(QFileIconProvider::File);
+ }
+ return QVariant();
+}
+
+QVariant Model::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ static QIcon services(QPixmap(":/images/services.png"));
+ if (role == Qt::DisplayRole)
+ return QString::number(section);
+ if (role == Qt::DecorationRole)
+ return qVariantFromValue(services);
+ return QAbstractItemModel::headerData(section, orientation, role);
+}
+
+bool Model::hasChildren(const QModelIndex &parent) const
+{
+ if (parent.isValid() && parent.column() != 0)
+ return false;
+ return rc > 0 && cc > 0;
+}
+
+Qt::ItemFlags Model::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return 0;
+ return (Qt::ItemIsDragEnabled|Qt::ItemIsSelectable|Qt::ItemIsEnabled);
+}
+
+Model::Node *Model::node(int row, Node *parent) const
+{
+ if (parent && !parent->children)
+ parent->children = new QVector<Node>(rc, Node(parent));
+ QVector<Node> *v = parent ? parent->children : tree;
+ return const_cast<Node*>(&(v->at(row)));
+}
+
+Model::Node *Model::parent(Node *child) const
+{
+ return child ? child->parent : 0;
+}
+
+int Model::row(Node *node) const
+{
+ const Node *first = node->parent ? &(node->parent->children->at(0)) : &(tree->at(0));
+ return (node - first);
+}
diff --git a/demos/interview/model.h b/demos/interview/model.h
new file mode 100644
index 0000000..96e6aea
--- /dev/null
+++ b/demos/interview/model.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractItemModel>
+#include <QFileIconProvider>
+#include <QVector>
+
+class Model : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ Model(int rows, int columns, QObject *parent = 0);
+ ~Model();
+
+ QModelIndex index(int row, int column, const QModelIndex &parent) const;
+ QModelIndex parent(const QModelIndex &child) const;
+
+ int rowCount(const QModelIndex &parent) const;
+ int columnCount(const QModelIndex &parent) const;
+
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+
+ bool hasChildren(const QModelIndex &parent) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+private:
+
+ struct Node
+ {
+ Node(Node *parent = 0) : parent(parent), children(0) {}
+ ~Node() { delete children; }
+ Node *parent;
+ QVector<Node> *children;
+ };
+
+ Node *node(int row, Node *parent) const;
+ Node *parent(Node *child) const;
+ int row(Node *node) const;
+
+ int rc, cc;
+ QVector<Node> *tree;
+ QFileIconProvider iconProvider;
+};
+
+#endif
diff --git a/demos/macmainwindow/macmainwindow.h b/demos/macmainwindow/macmainwindow.h
new file mode 100644
index 0000000..b5e4740
--- /dev/null
+++ b/demos/macmainwindow/macmainwindow.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef MACMAINWINDOW_H
+#define MACMAINWINDOW_H
+
+#include <QtGui>
+
+#ifdef Q_WS_MAC
+
+#import <qmaccocoaviewcontainer_mac.h>
+
+#ifdef QT_MAC_USE_COCOA
+class SearchWidget : public QMacCocoaViewContainer
+{
+ Q_OBJECT
+public:
+ SearchWidget(QWidget *parent = 0);
+ ~SearchWidget();
+
+ QSize sizeHint() const;
+private:
+};
+
+#else
+#include <Carbon/Carbon.h>
+
+// The SearchWidget class wraps a native HISearchField.
+class SearchWidget : public QWidget
+{
+ Q_OBJECT
+private:
+ HIViewRef searchField;
+ CFStringRef searchFieldText;
+
+public:
+ QSize sizeHint() const;
+ SearchWidget(QWidget *parent = 0);
+ ~SearchWidget();
+};
+
+#endif
+
+QMenu *createMenu(QWidget *parent);
+
+class SearchWrapper : public QWidget
+{
+Q_OBJECT
+public:
+ SearchWrapper(QWidget *parent = 0);
+ QSize sizeHint() const;
+ QWidget *s;
+};
+
+class Spacer : public QWidget
+{
+Q_OBJECT
+public:
+ Spacer(QWidget *parent = 0);
+ QSize sizeHint() const;
+};
+
+class MacSplitterHandle : public QSplitterHandle
+{
+Q_OBJECT
+public:
+ MacSplitterHandle(Qt::Orientation orientation, QSplitter *parent);
+ void paintEvent(QPaintEvent *);
+ QSize sizeHint() const;
+};
+
+class MacSplitter : public QSplitter
+{
+public:
+ QSplitterHandle *createHandle();
+};
+
+class MacMainWindow : public QMainWindow
+{
+Q_OBJECT
+public:
+ MacMainWindow();
+ ~MacMainWindow();
+ QAbstractItemModel *createItemModel();
+ void resizeEvent(QResizeEvent *e);
+ QAbstractItemModel *createDocumentModel();
+public:
+ QSplitter *splitter;
+ QSplitter *horizontalSplitter;
+ QTreeView *sidebar;
+ QListView *documents;
+ QTextEdit *textedit;
+ QVBoxLayout *layout;
+ SearchWidget *searchWidget;
+ QToolBar * toolBar;
+};
+
+#endif // Q_WS_MAC
+
+#endif //MACMAINWINDOW_H
diff --git a/demos/macmainwindow/macmainwindow.mm b/demos/macmainwindow/macmainwindow.mm
new file mode 100644
index 0000000..156e793
--- /dev/null
+++ b/demos/macmainwindow/macmainwindow.mm
@@ -0,0 +1,347 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "macmainwindow.h"
+#import <Cocoa/Cocoa.h>
+#include <QtGui>
+
+
+#ifdef Q_WS_MAC
+
+#include <Carbon/Carbon.h>
+
+#ifdef QT_MAC_USE_COCOA
+
+//![0]
+SearchWidget::SearchWidget(QWidget *parent)
+ : QMacCocoaViewContainer(0, parent)
+{
+ // Many Cocoa objects create temporary autorelease objects,
+ // so create a pool to catch them.
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ // Create the NSSearchField, set it on the QCocoaViewContainer.
+ NSSearchField *search = [[NSSearchField alloc] init];
+ setCocoaView(search);
+
+ // Use a Qt menu for the search field menu.
+ QMenu *qtMenu = createMenu(this);
+ NSMenu *nsMenu = qtMenu->macMenu(0);
+ [[search cell] setSearchMenuTemplate:nsMenu];
+
+ // Release our reference, since our super class takes ownership and we
+ // don't need it anymore.
+ [search release];
+
+ // Clean up our pool as we no longer need it.
+ [pool release];
+}
+//![0]
+
+SearchWidget::~SearchWidget()
+{
+}
+
+QSize SearchWidget::sizeHint() const
+{
+ return QSize(150, 40);
+}
+
+#else
+
+// The SearchWidget class wraps a native HISearchField.
+SearchWidget::SearchWidget(QWidget *parent)
+ :QWidget(parent)
+{
+
+ // Create a native search field and pass its window id to QWidget::create.
+ searchFieldText = CFStringCreateWithCString(0, "search", 0);
+ HISearchFieldCreate(NULL/*bounds*/, kHISearchFieldAttributesSearchIcon | kHISearchFieldAttributesCancel,
+ NULL/*menu ref*/, searchFieldText, &searchField);
+ create(reinterpret_cast<WId>(searchField));
+
+ // Use a Qt menu for the search field menu.
+ QMenu *searchMenu = createMenu(this);
+ MenuRef menuRef = searchMenu->macMenu(0);
+ HISearchFieldSetSearchMenu(searchField, menuRef);
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
+
+SearchWidget::~SearchWidget()
+{
+ CFRelease(searchField);
+ CFRelease(searchFieldText);
+}
+
+// Get the size hint from the search field.
+QSize SearchWidget::sizeHint() const
+{
+ EventRef event;
+ HIRect optimalBounds;
+ CreateEvent(0, kEventClassControl,
+ kEventControlGetOptimalBounds,
+ GetCurrentEventTime(),
+ kEventAttributeUserEvent, &event);
+
+ SendEventToEventTargetWithOptions(event,
+ HIObjectGetEventTarget(HIObjectRef(winId())),
+ kEventTargetDontPropagate);
+
+ GetEventParameter(event,
+ kEventParamControlOptimalBounds, typeHIRect,
+ 0, sizeof(HIRect), 0, &optimalBounds);
+
+ ReleaseEvent(event);
+ return QSize(optimalBounds.size.width + 100, // make it a bit wider.
+ optimalBounds.size.height);
+}
+
+#endif
+
+QMenu *createMenu(QWidget *parent)
+{
+ QMenu *searchMenu = new QMenu(parent);
+
+ QAction * indexAction = searchMenu->addAction("Index Search");
+ indexAction->setCheckable(true);
+ indexAction->setChecked(true);
+
+ QAction * fulltextAction = searchMenu->addAction("Full Text Search");
+ fulltextAction->setCheckable(true);
+
+ QActionGroup *searchActionGroup = new QActionGroup(parent);
+ searchActionGroup->addAction(indexAction);
+ searchActionGroup->addAction(fulltextAction);
+ searchActionGroup->setExclusive(true);
+
+ return searchMenu;
+}
+
+SearchWrapper::SearchWrapper(QWidget *parent)
+:QWidget(parent)
+{
+ s = new SearchWidget(this);
+ s->move(2,2);
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
+
+QSize SearchWrapper::sizeHint() const
+{
+ return s->sizeHint() + QSize(6, 2);
+}
+
+Spacer::Spacer(QWidget *parent)
+:QWidget(parent)
+{
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ setSizePolicy(sizePolicy);
+}
+
+QSize Spacer::sizeHint() const
+{
+ return QSize(1, 1);
+}
+
+MacSplitterHandle::MacSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
+: QSplitterHandle(orientation, parent) { }
+
+// Paint the horizontal handle as a gradient, paint
+// the vertical handle as a line.
+void MacSplitterHandle::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+
+ QColor topColor(145, 145, 145);
+ QColor bottomColor(142, 142, 142);
+ QColor gradientStart(252, 252, 252);
+ QColor gradientStop(223, 223, 223);
+
+ if (orientation() == Qt::Vertical) {
+ painter.setPen(topColor);
+ painter.drawLine(0, 0, width(), 0);
+ painter.setPen(bottomColor);
+ painter.drawLine(0, height() - 1, width(), height() - 1);
+
+ QLinearGradient linearGrad(QPointF(0, 0), QPointF(0, height() -3));
+ linearGrad.setColorAt(0, gradientStart);
+ linearGrad.setColorAt(1, gradientStop);
+ painter.fillRect(QRect(QPoint(0,1), size() - QSize(0, 2)), QBrush(linearGrad));
+ } else {
+ painter.setPen(topColor);
+ painter.drawLine(0, 0, 0, height());
+ }
+}
+
+QSize MacSplitterHandle::sizeHint() const
+{
+ QSize parent = QSplitterHandle::sizeHint();
+ if (orientation() == Qt::Vertical) {
+ return parent + QSize(0, 3);
+ } else {
+ return QSize(1, parent.height());
+ }
+}
+
+QSplitterHandle *MacSplitter::createHandle()
+{
+ return new MacSplitterHandle(orientation(), this);
+}
+
+MacMainWindow::MacMainWindow()
+{
+ QSettings settings;
+ restoreGeometry(settings.value("Geometry").toByteArray());
+
+ setWindowTitle("Mac Main Window");
+
+ splitter = new MacSplitter();
+
+ // Set up the left-hand side blue side bar.
+ sidebar = new QTreeView();
+ sidebar->setFrameStyle(QFrame::NoFrame);
+ sidebar->setAttribute(Qt::WA_MacShowFocusRect, false);
+ sidebar->setAutoFillBackground(true);
+
+ // Set the palette.
+ QPalette palette = sidebar->palette();
+ QColor macSidebarColor(231, 237, 246);
+ QColor macSidebarHighlightColor(168, 183, 205);
+ palette.setColor(QPalette::Base, macSidebarColor);
+ palette.setColor(QPalette::Highlight, macSidebarHighlightColor);
+ sidebar->setPalette(palette);
+
+ sidebar->setModel(createItemModel());
+ sidebar->header()->hide();
+ sidebar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ sidebar->setTextElideMode(Qt::ElideMiddle);
+
+ splitter->addWidget(sidebar);
+
+ horizontalSplitter = new MacSplitter();
+ horizontalSplitter->setOrientation(Qt::Vertical);
+ splitter->addWidget(horizontalSplitter);
+
+ splitter->setStretchFactor(0, 0);
+ splitter->setStretchFactor(1, 1);
+
+ // Set up the top document list view.
+ documents = new QListView();
+ documents->setFrameStyle(QFrame::NoFrame);
+ documents->setAttribute(Qt::WA_MacShowFocusRect, false);
+ documents->setModel(createDocumentModel());
+ documents->setAlternatingRowColors(true);
+ documents->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ horizontalSplitter->addWidget(documents);
+ horizontalSplitter->setStretchFactor(0, 0);
+
+ // Set up the text view.
+ textedit = new QTextEdit();
+ textedit->setFrameStyle(QFrame::NoFrame);
+ textedit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ textedit->setText("<br><br><br><br><br><br><center><b>This demo shows how to create a \
+ Qt main window application that has the same appearance as other \
+ Mac OS X applications such as Mail or iTunes. This includes \
+ customizing the item views and QSplitter and wrapping native widgets \
+ such as the search field.</b></center>");
+
+ horizontalSplitter->addWidget(textedit);
+
+ setCentralWidget(splitter);
+
+ toolBar = addToolBar(tr("Search"));
+ toolBar->addWidget(new Spacer());
+ toolBar->addWidget(new SearchWrapper());
+
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+
+MacMainWindow::~MacMainWindow()
+{
+ QSettings settings;
+ settings.setValue("Geometry", saveGeometry());
+}
+
+QAbstractItemModel *MacMainWindow::createItemModel()
+{
+ QStandardItemModel *model = new QStandardItemModel();
+ QStandardItem *parentItem = model->invisibleRootItem();
+
+ QStandardItem *documentationItem = new QStandardItem("Documentation");
+ parentItem->appendRow(documentationItem);
+
+ QStandardItem *assistantItem = new QStandardItem("Qt MainWindow Manual");
+ documentationItem->appendRow(assistantItem);
+
+ QStandardItem *designerItem = new QStandardItem("Qt Designer Manual");
+ documentationItem->appendRow(designerItem);
+
+ QStandardItem *qtItem = new QStandardItem("Qt Reference Documentation");
+ qtItem->appendRow(new QStandardItem("Classes"));
+ qtItem->appendRow(new QStandardItem("Overviews"));
+ qtItem->appendRow(new QStandardItem("Tutorial & Examples"));
+ documentationItem->appendRow(qtItem);
+
+ QStandardItem *bookmarksItem = new QStandardItem("Bookmarks");
+ parentItem->appendRow(bookmarksItem);
+ bookmarksItem->appendRow(new QStandardItem("QWidget"));
+ bookmarksItem->appendRow(new QStandardItem("QObject"));
+ bookmarksItem->appendRow(new QStandardItem("QWizard"));
+
+ return model;
+}
+
+void MacMainWindow::resizeEvent(QResizeEvent *)
+{
+ if (toolBar)
+ toolBar->updateGeometry();
+}
+
+QAbstractItemModel *MacMainWindow::createDocumentModel()
+{
+ QStandardItemModel *model = new QStandardItemModel();
+ QStandardItem *parentItem = model->invisibleRootItem();
+ parentItem->appendRow(new QStandardItem("QWidget Class Reference"));
+ parentItem->appendRow(new QStandardItem("QObject Class Reference"));
+ parentItem->appendRow(new QStandardItem("QListView Class Reference"));
+
+ return model;
+}
+
+#endif // Q_WS_MAC
diff --git a/demos/macmainwindow/macmainwindow.pro b/demos/macmainwindow/macmainwindow.pro
new file mode 100644
index 0000000..f5165a7
--- /dev/null
+++ b/demos/macmainwindow/macmainwindow.pro
@@ -0,0 +1,23 @@
+TEMPLATE = app
+TARGET = macmainwindow
+
+CONFIG += qt warn_on console
+
+OBJECTIVE_SOURCES += macmainwindow.mm
+SOURCES += main.cpp
+HEADERS += macmainwindow.h
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+LIBS += -framework Cocoa
+
+# install
+mac {
+target.path = $$[QT_INSTALL_DEMOS]/macmainwindow
+sources.files = $$SOURCES *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/macmainwindow
+INSTALLS += target sources
+}
diff --git a/demos/macmainwindow/main.cpp b/demos/macmainwindow/main.cpp
new file mode 100644
index 0000000..2b01cfe
--- /dev/null
+++ b/demos/macmainwindow/main.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "macmainwindow.h"
+
+#ifdef Q_WS_MAC
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ MacMainWindow mainWindow;
+ mainWindow.show();
+ return app.exec();
+}
+
+#else
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QLabel label;
+ label.resize(300, 200);
+ label.setText(" This demo requires Mac OS X.");
+ label.show();
+ return app.exec();
+}
+
+#endif
diff --git a/demos/mainwindow/colorswatch.cpp b/demos/mainwindow/colorswatch.cpp
new file mode 100644
index 0000000..ba6a076
--- /dev/null
+++ b/demos/mainwindow/colorswatch.cpp
@@ -0,0 +1,746 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "colorswatch.h"
+
+#include <QAction>
+#include <QtEvents>
+#include <QFrame>
+#include <QMainWindow>
+#include <QMenu>
+#include <QPainter>
+#include <QImage>
+#include <QColor>
+#include <QDialog>
+#include <QGridLayout>
+#include <QSpinBox>
+#include <QLabel>
+#include <QPainterPath>
+#include <QPushButton>
+#include <QHBoxLayout>
+#include <QBitmap>
+#include <QtDebug>
+
+#undef DEBUG_SIZEHINTS
+
+QColor bgColorForName(const QString &name)
+{
+ if (name == "Black")
+ return QColor("#D8D8D8");
+ else if (name == "White")
+ return QColor("#F1F1F1");
+ else if (name == "Red")
+ return QColor("#F1D8D8");
+ else if (name == "Green")
+ return QColor("#D8E4D8");
+ else if (name == "Blue")
+ return QColor("#D8D8F1");
+ else if (name == "Yellow")
+ return QColor("#F1F0D8");
+ return QColor(name).light(110);
+}
+
+QColor fgColorForName(const QString &name)
+{
+ if (name == "Black")
+ return QColor("#6C6C6C");
+ else if (name == "White")
+ return QColor("#F8F8F8");
+ else if (name == "Red")
+ return QColor("#F86C6C");
+ else if (name == "Green")
+ return QColor("#6CB26C");
+ else if (name == "Blue")
+ return QColor("#6C6CF8");
+ else if (name == "Yellow")
+ return QColor("#F8F76C");
+ return QColor(name);
+}
+
+class ColorDock : public QFrame
+{
+ Q_OBJECT
+public:
+ ColorDock(const QString &c, QWidget *parent);
+
+ virtual QSize sizeHint() const;
+ virtual QSize minimumSizeHint() const;
+
+ void setCustomSizeHint(const QSize &size);
+
+public slots:
+ void changeSizeHints();
+
+protected:
+ void paintEvent(QPaintEvent *);
+ QString color;
+ QSize szHint, minSzHint;
+};
+
+ColorDock::ColorDock(const QString &c, QWidget *parent)
+ : QFrame(parent) , color(c)
+{
+ QFont font = this->font();
+ font.setPointSize(8);
+ setFont(font);
+ szHint = QSize(-1, -1);
+ minSzHint = QSize(125, 75);
+}
+
+QSize ColorDock::sizeHint() const
+{
+ return szHint;
+}
+
+QSize ColorDock::minimumSizeHint() const
+{
+ return minSzHint;
+}
+
+void ColorDock::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.fillRect(rect(), bgColorForName(color));
+
+ p.save();
+
+ extern void render_qt_text(QPainter *, int, int, const QColor &);
+ render_qt_text(&p, width(), height(), fgColorForName(color));
+
+ p.restore();
+
+#ifdef DEBUG_SIZEHINTS
+ p.setRenderHint(QPainter::Antialiasing, false);
+
+ QSize sz = size();
+ QSize szHint = sizeHint();
+ QSize minSzHint = minimumSizeHint();
+ QSize maxSz = maximumSize();
+ QString text = QString::fromLatin1("sz: %1x%2\nszHint: %3x%4\nminSzHint: %5x%6\n"
+ "maxSz: %8x%9")
+ .arg(sz.width()).arg(sz.height())
+ .arg(szHint.width()).arg(szHint.height())
+ .arg(minSzHint.width()).arg(minSzHint.height())
+ .arg(maxSz.width()).arg(maxSz.height());
+
+ QRect r = fontMetrics().boundingRect(rect(), Qt::AlignLeft|Qt::AlignTop, text);
+ r.adjust(-2, -2, 1, 1);
+ p.translate(4, 4);
+ QColor bg = Qt::yellow;
+ bg.setAlpha(120);
+ p.setBrush(bg);
+ p.setPen(Qt::black);
+ p.drawRect(r);
+ p.drawText(rect(), Qt::AlignLeft|Qt::AlignTop, text);
+#endif // DEBUG_SIZEHINTS
+}
+
+static QSpinBox *createSpinBox(int value, QWidget *parent, int max = 1000)
+{
+ QSpinBox *result = new QSpinBox(parent);
+ result->setMinimum(-1);
+ result->setMaximum(max);
+ result->setValue(value);
+ return result;
+}
+
+void ColorDock::changeSizeHints()
+{
+ QDialog dialog(this);
+ dialog.setWindowTitle(color);
+
+ QVBoxLayout *topLayout = new QVBoxLayout(&dialog);
+
+ QGridLayout *inputLayout = new QGridLayout();
+ topLayout->addLayout(inputLayout);
+
+ inputLayout->addWidget(new QLabel(tr("Size Hint:"), &dialog), 0, 0);
+ inputLayout->addWidget(new QLabel(tr("Min Size Hint:"), &dialog), 1, 0);
+ inputLayout->addWidget(new QLabel(tr("Max Size:"), &dialog), 2, 0);
+ inputLayout->addWidget(new QLabel(tr("Dockwgt Max Size:"), &dialog), 3, 0);
+
+ QSpinBox *szHintW = createSpinBox(szHint.width(), &dialog);
+ inputLayout->addWidget(szHintW, 0, 1);
+ QSpinBox *szHintH = createSpinBox(szHint.height(), &dialog);
+ inputLayout->addWidget(szHintH, 0, 2);
+
+ QSpinBox *minSzHintW = createSpinBox(minSzHint.width(), &dialog);
+ inputLayout->addWidget(minSzHintW, 1, 1);
+ QSpinBox *minSzHintH = createSpinBox(minSzHint.height(), &dialog);
+ inputLayout->addWidget(minSzHintH, 1, 2);
+
+ QSize maxSz = maximumSize();
+ QSpinBox *maxSzW = createSpinBox(maxSz.width(), &dialog, QWIDGETSIZE_MAX);
+ inputLayout->addWidget(maxSzW, 2, 1);
+ QSpinBox *maxSzH = createSpinBox(maxSz.height(), &dialog, QWIDGETSIZE_MAX);
+ inputLayout->addWidget(maxSzH, 2, 2);
+
+ QSize dwMaxSz = parentWidget()->maximumSize();
+ QSpinBox *dwMaxSzW = createSpinBox(dwMaxSz.width(), &dialog, QWIDGETSIZE_MAX);
+ inputLayout->addWidget(dwMaxSzW, 3, 1);
+ QSpinBox *dwMaxSzH = createSpinBox(dwMaxSz.height(), &dialog, QWIDGETSIZE_MAX);
+ inputLayout->addWidget(dwMaxSzH, 3, 2);
+
+ inputLayout->setColumnStretch(1, 1);
+ inputLayout->setColumnStretch(2, 1);
+
+ topLayout->addStretch();
+
+ QHBoxLayout *buttonBox = new QHBoxLayout();
+ topLayout->addLayout(buttonBox);
+
+ QPushButton *okButton = new QPushButton(tr("Ok"), &dialog);
+ QPushButton *cancelButton = new QPushButton(tr("Cancel"), &dialog);
+ connect(okButton, SIGNAL(clicked()), &dialog, SLOT(accept()));
+ connect(cancelButton, SIGNAL(clicked()), &dialog, SLOT(reject()));
+ buttonBox->addStretch();
+ buttonBox->addWidget(cancelButton);
+ buttonBox->addWidget(okButton);
+
+
+ if (!dialog.exec())
+ return;
+
+ szHint = QSize(szHintW->value(), szHintH->value());
+ minSzHint = QSize(minSzHintW->value(), minSzHintH->value());
+ maxSz = QSize(maxSzW->value(), maxSzH->value());
+ setMaximumSize(maxSz);
+ dwMaxSz = QSize(dwMaxSzW->value(), dwMaxSzH->value());
+ parentWidget()->setMaximumSize(dwMaxSz);
+ updateGeometry();
+ update();
+}
+
+void ColorDock::setCustomSizeHint(const QSize &size)
+{
+ szHint = size;
+ updateGeometry();
+}
+
+ColorSwatch::ColorSwatch(const QString &colorName, QWidget *parent, Qt::WindowFlags flags)
+ : QDockWidget(parent, flags)
+{
+ setObjectName(colorName + QLatin1String(" Dock Widget"));
+ setWindowTitle(objectName() + QLatin1String(" [*]"));
+
+ QFrame *swatch = new ColorDock(colorName, this);
+ swatch->setFrameStyle(QFrame::Box | QFrame::Sunken);
+
+ setWidget(swatch);
+
+ changeSizeHintsAction = new QAction(tr("Change Size Hints"), this);
+ connect(changeSizeHintsAction, SIGNAL(triggered()), swatch, SLOT(changeSizeHints()));
+
+ closableAction = new QAction(tr("Closable"), this);
+ closableAction->setCheckable(true);
+ connect(closableAction, SIGNAL(triggered(bool)), SLOT(changeClosable(bool)));
+
+ movableAction = new QAction(tr("Movable"), this);
+ movableAction->setCheckable(true);
+ connect(movableAction, SIGNAL(triggered(bool)), SLOT(changeMovable(bool)));
+
+ floatableAction = new QAction(tr("Floatable"), this);
+ floatableAction->setCheckable(true);
+ connect(floatableAction, SIGNAL(triggered(bool)), SLOT(changeFloatable(bool)));
+
+ verticalTitleBarAction = new QAction(tr("Vertical title bar"), this);
+ verticalTitleBarAction->setCheckable(true);
+ connect(verticalTitleBarAction, SIGNAL(triggered(bool)),
+ SLOT(changeVerticalTitleBar(bool)));
+
+ floatingAction = new QAction(tr("Floating"), this);
+ floatingAction->setCheckable(true);
+ connect(floatingAction, SIGNAL(triggered(bool)), SLOT(changeFloating(bool)));
+
+ allowedAreasActions = new QActionGroup(this);
+ allowedAreasActions->setExclusive(false);
+
+ allowLeftAction = new QAction(tr("Allow on Left"), this);
+ allowLeftAction->setCheckable(true);
+ connect(allowLeftAction, SIGNAL(triggered(bool)), SLOT(allowLeft(bool)));
+
+ allowRightAction = new QAction(tr("Allow on Right"), this);
+ allowRightAction->setCheckable(true);
+ connect(allowRightAction, SIGNAL(triggered(bool)), SLOT(allowRight(bool)));
+
+ allowTopAction = new QAction(tr("Allow on Top"), this);
+ allowTopAction->setCheckable(true);
+ connect(allowTopAction, SIGNAL(triggered(bool)), SLOT(allowTop(bool)));
+
+ allowBottomAction = new QAction(tr("Allow on Bottom"), this);
+ allowBottomAction->setCheckable(true);
+ connect(allowBottomAction, SIGNAL(triggered(bool)), SLOT(allowBottom(bool)));
+
+ allowedAreasActions->addAction(allowLeftAction);
+ allowedAreasActions->addAction(allowRightAction);
+ allowedAreasActions->addAction(allowTopAction);
+ allowedAreasActions->addAction(allowBottomAction);
+
+ areaActions = new QActionGroup(this);
+ areaActions->setExclusive(true);
+
+ leftAction = new QAction(tr("Place on Left") , this);
+ leftAction->setCheckable(true);
+ connect(leftAction, SIGNAL(triggered(bool)), SLOT(placeLeft(bool)));
+
+ rightAction = new QAction(tr("Place on Right") , this);
+ rightAction->setCheckable(true);
+ connect(rightAction, SIGNAL(triggered(bool)), SLOT(placeRight(bool)));
+
+ topAction = new QAction(tr("Place on Top") , this);
+ topAction->setCheckable(true);
+ connect(topAction, SIGNAL(triggered(bool)), SLOT(placeTop(bool)));
+
+ bottomAction = new QAction(tr("Place on Bottom") , this);
+ bottomAction->setCheckable(true);
+ connect(bottomAction, SIGNAL(triggered(bool)), SLOT(placeBottom(bool)));
+
+ areaActions->addAction(leftAction);
+ areaActions->addAction(rightAction);
+ areaActions->addAction(topAction);
+ areaActions->addAction(bottomAction);
+
+ connect(movableAction, SIGNAL(triggered(bool)), areaActions, SLOT(setEnabled(bool)));
+
+ connect(movableAction, SIGNAL(triggered(bool)), allowedAreasActions, SLOT(setEnabled(bool)));
+
+ connect(floatableAction, SIGNAL(triggered(bool)), floatingAction, SLOT(setEnabled(bool)));
+
+ connect(floatingAction, SIGNAL(triggered(bool)), floatableAction, SLOT(setDisabled(bool)));
+ connect(movableAction, SIGNAL(triggered(bool)), floatableAction, SLOT(setEnabled(bool)));
+
+ tabMenu = new QMenu(this);
+ tabMenu->setTitle(tr("Tab into"));
+ connect(tabMenu, SIGNAL(triggered(QAction*)), this, SLOT(tabInto(QAction*)));
+
+ splitHMenu = new QMenu(this);
+ splitHMenu->setTitle(tr("Split horizontally into"));
+ connect(splitHMenu, SIGNAL(triggered(QAction*)), this, SLOT(splitInto(QAction*)));
+
+ splitVMenu = new QMenu(this);
+ splitVMenu->setTitle(tr("Split vertically into"));
+ connect(splitVMenu, SIGNAL(triggered(QAction*)), this, SLOT(splitInto(QAction*)));
+
+ windowModifiedAction = new QAction(tr("Modified"), this);
+ windowModifiedAction->setCheckable(true);
+ windowModifiedAction->setChecked(false);
+ connect(windowModifiedAction, SIGNAL(toggled(bool)), this, SLOT(setWindowModified(bool)));
+
+ menu = new QMenu(colorName, this);
+ menu->addAction(toggleViewAction());
+ QAction *action = menu->addAction(tr("Raise"));
+ connect(action, SIGNAL(triggered()), this, SLOT(raise()));
+ menu->addAction(changeSizeHintsAction);
+ menu->addSeparator();
+ menu->addAction(closableAction);
+ menu->addAction(movableAction);
+ menu->addAction(floatableAction);
+ menu->addAction(floatingAction);
+ menu->addAction(verticalTitleBarAction);
+ menu->addSeparator();
+ menu->addActions(allowedAreasActions->actions());
+ menu->addSeparator();
+ menu->addActions(areaActions->actions());
+ menu->addSeparator();
+ menu->addMenu(splitHMenu);
+ menu->addMenu(splitVMenu);
+ menu->addMenu(tabMenu);
+ menu->addSeparator();
+ menu->addAction(windowModifiedAction);
+
+ connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateContextMenu()));
+
+ if(colorName == "Black") {
+ leftAction->setShortcut(Qt::CTRL|Qt::Key_W);
+ rightAction->setShortcut(Qt::CTRL|Qt::Key_E);
+ toggleViewAction()->setShortcut(Qt::CTRL|Qt::Key_R);
+ }
+}
+
+void ColorSwatch::updateContextMenu()
+{
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ const Qt::DockWidgetArea area = mainWindow->dockWidgetArea(this);
+ const Qt::DockWidgetAreas areas = allowedAreas();
+
+ closableAction->setChecked(features() & QDockWidget::DockWidgetClosable);
+ if (windowType() == Qt::Drawer) {
+ floatableAction->setEnabled(false);
+ floatingAction->setEnabled(false);
+ movableAction->setEnabled(false);
+ verticalTitleBarAction->setChecked(false);
+ } else {
+ floatableAction->setChecked(features() & QDockWidget::DockWidgetFloatable);
+ floatingAction->setChecked(isWindow());
+ // done after floating, to get 'floatable' correctly initialized
+ movableAction->setChecked(features() & QDockWidget::DockWidgetMovable);
+ verticalTitleBarAction
+ ->setChecked(features() & QDockWidget::DockWidgetVerticalTitleBar);
+ }
+
+ allowLeftAction->setChecked(isAreaAllowed(Qt::LeftDockWidgetArea));
+ allowRightAction->setChecked(isAreaAllowed(Qt::RightDockWidgetArea));
+ allowTopAction->setChecked(isAreaAllowed(Qt::TopDockWidgetArea));
+ allowBottomAction->setChecked(isAreaAllowed(Qt::BottomDockWidgetArea));
+
+ if (allowedAreasActions->isEnabled()) {
+ allowLeftAction->setEnabled(area != Qt::LeftDockWidgetArea);
+ allowRightAction->setEnabled(area != Qt::RightDockWidgetArea);
+ allowTopAction->setEnabled(area != Qt::TopDockWidgetArea);
+ allowBottomAction->setEnabled(area != Qt::BottomDockWidgetArea);
+ }
+
+ leftAction->blockSignals(true);
+ rightAction->blockSignals(true);
+ topAction->blockSignals(true);
+ bottomAction->blockSignals(true);
+
+ leftAction->setChecked(area == Qt::LeftDockWidgetArea);
+ rightAction->setChecked(area == Qt::RightDockWidgetArea);
+ topAction->setChecked(area == Qt::TopDockWidgetArea);
+ bottomAction->setChecked(area == Qt::BottomDockWidgetArea);
+
+ leftAction->blockSignals(false);
+ rightAction->blockSignals(false);
+ topAction->blockSignals(false);
+ bottomAction->blockSignals(false);
+
+ if (areaActions->isEnabled()) {
+ leftAction->setEnabled(areas & Qt::LeftDockWidgetArea);
+ rightAction->setEnabled(areas & Qt::RightDockWidgetArea);
+ topAction->setEnabled(areas & Qt::TopDockWidgetArea);
+ bottomAction->setEnabled(areas & Qt::BottomDockWidgetArea);
+ }
+
+ tabMenu->clear();
+ splitHMenu->clear();
+ splitVMenu->clear();
+ QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ foreach (ColorSwatch *dock, dock_list) {
+// if (!dock->isVisible() || dock->isFloating())
+// continue;
+ tabMenu->addAction(dock->objectName());
+ splitHMenu->addAction(dock->objectName());
+ splitVMenu->addAction(dock->objectName());
+ }
+}
+
+void ColorSwatch::splitInto(QAction *action)
+{
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ ColorSwatch *target = 0;
+ foreach (ColorSwatch *dock, dock_list) {
+ if (action->text() == dock->objectName()) {
+ target = dock;
+ break;
+ }
+ }
+ if (target == 0)
+ return;
+
+ Qt::Orientation o = action->parent() == splitHMenu
+ ? Qt::Horizontal : Qt::Vertical;
+ mainWindow->splitDockWidget(target, this, o);
+}
+
+void ColorSwatch::tabInto(QAction *action)
+{
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ ColorSwatch *target = 0;
+ foreach (ColorSwatch *dock, dock_list) {
+ if (action->text() == dock->objectName()) {
+ target = dock;
+ break;
+ }
+ }
+ if (target == 0)
+ return;
+
+ mainWindow->tabifyDockWidget(target, this);
+}
+
+void ColorSwatch::contextMenuEvent(QContextMenuEvent *event)
+{
+ event->accept();
+ menu->exec(event->globalPos());
+}
+
+void ColorSwatch::resizeEvent(QResizeEvent *e)
+{
+ if (BlueTitleBar *btb = qobject_cast<BlueTitleBar*>(titleBarWidget()))
+ btb->updateMask();
+
+ QDockWidget::resizeEvent(e);
+}
+
+
+void ColorSwatch::allow(Qt::DockWidgetArea area, bool a)
+{
+ Qt::DockWidgetAreas areas = allowedAreas();
+ areas = a ? areas | area : areas & ~area;
+ setAllowedAreas(areas);
+
+ if (areaActions->isEnabled()) {
+ leftAction->setEnabled(areas & Qt::LeftDockWidgetArea);
+ rightAction->setEnabled(areas & Qt::RightDockWidgetArea);
+ topAction->setEnabled(areas & Qt::TopDockWidgetArea);
+ bottomAction->setEnabled(areas & Qt::BottomDockWidgetArea);
+ }
+}
+
+void ColorSwatch::place(Qt::DockWidgetArea area, bool p)
+{
+ if (!p) return;
+
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ mainWindow->addDockWidget(area, this);
+
+ if (allowedAreasActions->isEnabled()) {
+ allowLeftAction->setEnabled(area != Qt::LeftDockWidgetArea);
+ allowRightAction->setEnabled(area != Qt::RightDockWidgetArea);
+ allowTopAction->setEnabled(area != Qt::TopDockWidgetArea);
+ allowBottomAction->setEnabled(area != Qt::BottomDockWidgetArea);
+ }
+}
+
+void ColorSwatch::setCustomSizeHint(const QSize &size)
+{
+ if (ColorDock *dock = qobject_cast<ColorDock*>(widget()))
+ dock->setCustomSizeHint(size);
+}
+
+void ColorSwatch::changeClosable(bool on)
+{ setFeatures(on ? features() | DockWidgetClosable : features() & ~DockWidgetClosable); }
+
+void ColorSwatch::changeMovable(bool on)
+{ setFeatures(on ? features() | DockWidgetMovable : features() & ~DockWidgetMovable); }
+
+void ColorSwatch::changeFloatable(bool on)
+{ setFeatures(on ? features() | DockWidgetFloatable : features() & ~DockWidgetFloatable); }
+
+void ColorSwatch::changeFloating(bool floating)
+{ setFloating(floating); }
+
+void ColorSwatch::allowLeft(bool a)
+{ allow(Qt::LeftDockWidgetArea, a); }
+
+void ColorSwatch::allowRight(bool a)
+{ allow(Qt::RightDockWidgetArea, a); }
+
+void ColorSwatch::allowTop(bool a)
+{ allow(Qt::TopDockWidgetArea, a); }
+
+void ColorSwatch::allowBottom(bool a)
+{ allow(Qt::BottomDockWidgetArea, a); }
+
+void ColorSwatch::placeLeft(bool p)
+{ place(Qt::LeftDockWidgetArea, p); }
+
+void ColorSwatch::placeRight(bool p)
+{ place(Qt::RightDockWidgetArea, p); }
+
+void ColorSwatch::placeTop(bool p)
+{ place(Qt::TopDockWidgetArea, p); }
+
+void ColorSwatch::placeBottom(bool p)
+{ place(Qt::BottomDockWidgetArea, p); }
+
+void ColorSwatch::changeVerticalTitleBar(bool on)
+{
+ setFeatures(on ? features() | DockWidgetVerticalTitleBar
+ : features() & ~DockWidgetVerticalTitleBar);
+}
+
+QSize BlueTitleBar::minimumSizeHint() const
+{
+ QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
+ Q_ASSERT(dw != 0);
+ QSize result(leftPm.width() + rightPm.width(), centerPm.height());
+ if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar)
+ result.transpose();
+ return result;
+}
+
+BlueTitleBar::BlueTitleBar(QWidget *parent)
+ : QWidget(parent)
+{
+ leftPm = QPixmap(":/res/titlebarLeft.png");
+ centerPm = QPixmap(":/res/titlebarCenter.png");
+ rightPm = QPixmap(":/res/titlebarRight.png");
+}
+
+void BlueTitleBar::paintEvent(QPaintEvent*)
+{
+ QPainter painter(this);
+ QRect rect = this->rect();
+
+ QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
+ Q_ASSERT(dw != 0);
+
+ if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar) {
+ QSize s = rect.size();
+ s.transpose();
+ rect.setSize(s);
+
+ painter.translate(rect.left(), rect.top() + rect.width());
+ painter.rotate(-90);
+ painter.translate(-rect.left(), -rect.top());
+ }
+
+ painter.drawPixmap(rect.topLeft(), leftPm);
+ painter.drawPixmap(rect.topRight() - QPoint(rightPm.width() - 1, 0), rightPm);
+ QBrush brush(centerPm);
+ painter.fillRect(rect.left() + leftPm.width(), rect.top(),
+ rect.width() - leftPm.width() - rightPm.width(),
+ centerPm.height(), centerPm);
+}
+
+void BlueTitleBar::mousePressEvent(QMouseEvent *event)
+{
+ QPoint pos = event->pos();
+
+ QRect rect = this->rect();
+
+ QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
+ Q_ASSERT(dw != 0);
+
+ if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar) {
+ QPoint p = pos;
+ pos.setX(rect.left() + rect.bottom() - p.y());
+ pos.setY(rect.top() + p.x() - rect.left());
+
+ QSize s = rect.size();
+ s.transpose();
+ rect.setSize(s);
+ }
+
+ const int buttonRight = 7;
+ const int buttonWidth = 20;
+ int right = rect.right() - pos.x();
+ int button = (right - buttonRight)/buttonWidth;
+ switch (button) {
+ case 0:
+ event->accept();
+ dw->close();
+ break;
+ case 1:
+ event->accept();
+ dw->setFloating(!dw->isFloating());
+ break;
+ case 2: {
+ event->accept();
+ QDockWidget::DockWidgetFeatures features = dw->features();
+ if (features & QDockWidget::DockWidgetVerticalTitleBar)
+ features &= ~QDockWidget::DockWidgetVerticalTitleBar;
+ else
+ features |= QDockWidget::DockWidgetVerticalTitleBar;
+ dw->setFeatures(features);
+ break;
+ }
+ default:
+ event->ignore();
+ break;
+ }
+}
+
+void BlueTitleBar::updateMask()
+{
+ QDockWidget *dw = qobject_cast<QDockWidget*>(parent());
+ Q_ASSERT(dw != 0);
+
+ QRect rect = dw->rect();
+ QPixmap bitmap(dw->size());
+
+ {
+ QPainter painter(&bitmap);
+
+ ///initialize to transparent
+ painter.fillRect(rect, Qt::color0);
+
+ QRect contents = rect;
+ contents.setTopLeft(geometry().bottomLeft());
+ contents.setRight(geometry().right());
+ contents.setBottom(contents.bottom()-y());
+ painter.fillRect(contents, Qt::color1);
+
+
+
+ //let's pait the titlebar
+
+ QRect titleRect = this->geometry();
+
+ if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar) {
+ QSize s = rect.size();
+ s.transpose();
+ rect.setSize(s);
+
+ QSize s2 = size();
+ s2.transpose();
+ titleRect.setSize(s2);
+
+ painter.translate(rect.left(), rect.top() + rect.width());
+ painter.rotate(-90);
+ painter.translate(-rect.left(), -rect.top());
+ }
+
+ contents.setTopLeft(titleRect.bottomLeft());
+ contents.setRight(titleRect.right());
+ contents.setBottom(rect.bottom()-y());
+
+ QRect rect = titleRect;
+
+
+ painter.drawPixmap(rect.topLeft(), leftPm.mask());
+ painter.fillRect(rect.left() + leftPm.width(), rect.top(),
+ rect.width() - leftPm.width() - rightPm.width(),
+ centerPm.height(), Qt::color1);
+ painter.drawPixmap(rect.topRight() - QPoint(rightPm.width() - 1, 0), rightPm.mask());
+
+ painter.fillRect(contents, Qt::color1);
+ }
+
+ dw->setMask(bitmap);
+}
+
+#include "colorswatch.moc"
diff --git a/demos/mainwindow/colorswatch.h b/demos/mainwindow/colorswatch.h
new file mode 100644
index 0000000..57c5ac6
--- /dev/null
+++ b/demos/mainwindow/colorswatch.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLORSWATCH_H
+#define COLORSWATCH_H
+
+#include <QDockWidget>
+
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QActionGroup)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+
+class ColorSwatch : public QDockWidget
+{
+ Q_OBJECT
+
+ QAction *closableAction;
+ QAction *movableAction;
+ QAction *floatableAction;
+ QAction *floatingAction;
+ QAction *verticalTitleBarAction;
+
+ QActionGroup *allowedAreasActions;
+ QAction *allowLeftAction;
+ QAction *allowRightAction;
+ QAction *allowTopAction;
+ QAction *allowBottomAction;
+
+ QActionGroup *areaActions;
+ QAction *leftAction;
+ QAction *rightAction;
+ QAction *topAction;
+ QAction *bottomAction;
+
+ QAction *changeSizeHintsAction;
+
+ QMenu *tabMenu;
+ QMenu *splitHMenu;
+ QMenu *splitVMenu;
+
+ QAction *windowModifiedAction;
+
+public:
+ ColorSwatch(const QString &colorName, QWidget *parent = 0, Qt::WindowFlags flags = 0);
+
+ QMenu *menu;
+ void setCustomSizeHint(const QSize &size);
+
+protected:
+ virtual void contextMenuEvent(QContextMenuEvent *event);
+ virtual void resizeEvent(QResizeEvent *e);
+
+private:
+ void allow(Qt::DockWidgetArea area, bool allow);
+ void place(Qt::DockWidgetArea area, bool place);
+
+private slots:
+ void changeClosable(bool on);
+ void changeMovable(bool on);
+ void changeFloatable(bool on);
+ void changeFloating(bool on);
+ void changeVerticalTitleBar(bool on);
+ void updateContextMenu();
+
+ void allowLeft(bool a);
+ void allowRight(bool a);
+ void allowTop(bool a);
+ void allowBottom(bool a);
+
+ void placeLeft(bool p);
+ void placeRight(bool p);
+ void placeTop(bool p);
+ void placeBottom(bool p);
+
+ void splitInto(QAction *action);
+ void tabInto(QAction *action);
+};
+
+class BlueTitleBar : public QWidget
+{
+ Q_OBJECT
+public:
+ BlueTitleBar(QWidget *parent = 0);
+
+ QSize sizeHint() const { return minimumSizeHint(); }
+ QSize minimumSizeHint() const;
+protected:
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+public slots:
+ void updateMask();
+
+private:
+ QPixmap leftPm, centerPm, rightPm;
+};
+
+
+#endif
diff --git a/demos/mainwindow/main.cpp b/demos/mainwindow/main.cpp
new file mode 100644
index 0000000..46268b5
--- /dev/null
+++ b/demos/mainwindow/main.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QApplication>
+#include <QPainterPath>
+#include <QPainter>
+#include <QMap>
+#include <qdebug.h>
+
+void render_qt_text(QPainter *painter, int w, int h, const QColor &color) {
+ QPainterPath path;
+ path.moveTo(-0.083695, 0.283849);
+ path.cubicTo(-0.049581, 0.349613, -0.012720, 0.397969, 0.026886, 0.428917);
+ path.cubicTo(0.066493, 0.459865, 0.111593, 0.477595, 0.162186, 0.482108);
+ path.lineTo(0.162186, 0.500000);
+ path.cubicTo(0.115929, 0.498066, 0.066565, 0.487669, 0.014094, 0.468810);
+ path.cubicTo(-0.038378, 0.449952, -0.088103, 0.423839, -0.135082, 0.390474);
+ path.cubicTo(-0.182061, 0.357108, -0.222608, 0.321567, -0.256722, 0.283849);
+ path.cubicTo(-0.304712, 0.262250, -0.342874, 0.239362, -0.371206, 0.215184);
+ path.cubicTo(-0.411969, 0.179078, -0.443625, 0.134671, -0.466175, 0.081963);
+ path.cubicTo(-0.488725, 0.029255, -0.500000, -0.033043, -0.500000, -0.104932);
+ path.cubicTo(-0.500000, -0.218407, -0.467042, -0.312621, -0.401127, -0.387573);
+ path.cubicTo(-0.335212, -0.462524, -0.255421, -0.500000, -0.161752, -0.500000);
+ path.cubicTo(-0.072998, -0.500000, 0.003903, -0.462444, 0.068951, -0.387331);
+ path.cubicTo(0.133998, -0.312218, 0.166522, -0.217440, 0.166522, -0.102998);
+ path.cubicTo(0.166522, -0.010155, 0.143394, 0.071325, 0.097138, 0.141441);
+ path.cubicTo(0.050882, 0.211557, -0.009396, 0.259026, -0.083695, 0.283849);
+ path.moveTo(-0.167823, -0.456963);
+ path.cubicTo(-0.228823, -0.456963, -0.277826, -0.432624, -0.314831, -0.383946);
+ path.cubicTo(-0.361665, -0.323340, -0.385082, -0.230335, -0.385082, -0.104932);
+ path.cubicTo(-0.385082, 0.017569, -0.361376, 0.112025, -0.313964, 0.178433);
+ path.cubicTo(-0.277248, 0.229368, -0.228534, 0.254836, -0.167823, 0.254836);
+ path.cubicTo(-0.105088, 0.254836, -0.054496, 0.229368, -0.016045, 0.178433);
+ path.cubicTo(0.029055, 0.117827, 0.051605, 0.028691, 0.051605, -0.088975);
+ path.cubicTo(0.051605, -0.179562, 0.039318, -0.255803, 0.014744, -0.317698);
+ path.cubicTo(-0.004337, -0.365409, -0.029705, -0.400548, -0.061362, -0.423114);
+ path.cubicTo(-0.093018, -0.445680, -0.128505, -0.456963, -0.167823, -0.456963);
+ path.moveTo(0.379011, -0.404739);
+ path.lineTo(0.379011, -0.236460);
+ path.lineTo(0.486123, -0.236460);
+ path.lineTo(0.486123, -0.197292);
+ path.lineTo(0.379011, -0.197292);
+ path.lineTo(0.379011, 0.134913);
+ path.cubicTo(0.379011, 0.168117, 0.383276, 0.190442, 0.391804, 0.201886);
+ path.cubicTo(0.400332, 0.213330, 0.411246, 0.219052, 0.424545, 0.219052);
+ path.cubicTo(0.435531, 0.219052, 0.446227, 0.215264, 0.456635, 0.207689);
+ path.cubicTo(0.467042, 0.200113, 0.474993, 0.188910, 0.480486, 0.174081);
+ path.lineTo(0.500000, 0.174081);
+ path.cubicTo(0.488436, 0.210509, 0.471957, 0.237911, 0.450564, 0.256286);
+ path.cubicTo(0.429170, 0.274662, 0.407054, 0.283849, 0.384215, 0.283849);
+ path.cubicTo(0.368893, 0.283849, 0.353859, 0.279094, 0.339115, 0.269584);
+ path.cubicTo(0.324371, 0.260074, 0.313530, 0.246534, 0.306592, 0.228965);
+ path.cubicTo(0.299653, 0.211396, 0.296184, 0.184075, 0.296184, 0.147002);
+ path.lineTo(0.296184, -0.197292);
+ path.lineTo(0.223330, -0.197292);
+ path.lineTo(0.223330, -0.215667);
+ path.cubicTo(0.241833, -0.224049, 0.260697, -0.237992, 0.279922, -0.257495);
+ path.cubicTo(0.299147, -0.276999, 0.316276, -0.300129, 0.331310, -0.326886);
+ path.cubicTo(0.338826, -0.341070, 0.349523, -0.367021, 0.363400, -0.404739);
+ path.lineTo(0.379011, -0.404739);
+ path.moveTo(-0.535993, 0.275629);
+
+ painter->translate(w / 2, h / 2);
+ double scale = qMin(w, h) * 8 / 10.0;
+ painter->scale(scale, scale);
+
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ painter->save();
+ painter->translate(.1, .1);
+ painter->fillPath(path, QColor(0, 0, 0, 63));
+ painter->restore();
+
+ painter->setBrush(color);
+ painter->setPen(QPen(Qt::black, 0.02, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin));
+ painter->drawPath(path);
+}
+
+void usage()
+{
+ qWarning() << "Usage: mainwindow [-SizeHint<color> <width>x<height>] ...";
+ exit(1);
+}
+
+QMap<QString, QSize> parseCustomSizeHints(int argc, char **argv)
+{
+ QMap<QString, QSize> result;
+
+ for (int i = 1; i < argc; ++i) {
+ QString arg = QString::fromLocal8Bit(argv[i]);
+
+ if (arg.startsWith(QLatin1String("-SizeHint"))) {
+ QString name = arg.mid(9);
+ if (name.isEmpty())
+ usage();
+ if (++i == argc)
+ usage();
+ QString sizeStr = QString::fromLocal8Bit(argv[i]);
+ int idx = sizeStr.indexOf(QLatin1Char('x'));
+ if (idx == -1)
+ usage();
+ bool ok;
+ int w = sizeStr.left(idx).toInt(&ok);
+ if (!ok)
+ usage();
+ int h = sizeStr.mid(idx + 1).toInt(&ok);
+ if (!ok)
+ usage();
+ result[name] = QSize(w, h);
+ }
+ }
+
+ return result;
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QMap<QString, QSize> customSizeHints = parseCustomSizeHints(argc, argv);
+ MainWindow mainWin(customSizeHints);
+ mainWin.resize(800, 600);
+ mainWin.show();
+ return app.exec();
+}
diff --git a/demos/mainwindow/mainwindow.cpp b/demos/mainwindow/mainwindow.cpp
new file mode 100644
index 0000000..7edaf52
--- /dev/null
+++ b/demos/mainwindow/mainwindow.cpp
@@ -0,0 +1,510 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "colorswatch.h"
+#include "toolbar.h"
+
+#include <QAction>
+#include <QLayout>
+#include <QMenu>
+#include <QMenuBar>
+#include <QStatusBar>
+#include <QTextEdit>
+#include <QFile>
+#include <QDataStream>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QSignalMapper>
+#include <QApplication>
+#include <QPainter>
+#include <QMouseEvent>
+#include <QLineEdit>
+#include <QComboBox>
+#include <QLabel>
+#include <QPushButton>
+#include <qdebug.h>
+
+static const char * const message =
+ "<p><b>Qt Main Window Demo</b></p>"
+
+ "<p>This is a demonstration of the QMainWindow, QToolBar and "
+ "QDockWidget classes.</p>"
+
+ "<p>The tool bar and dock widgets can be dragged around and rearranged "
+ "using the mouse or via the menu.</p>"
+
+ "<p>Each dock widget contains a colored frame and a context "
+ "(right-click) menu.</p>"
+
+#ifdef Q_WS_MAC
+ "<p>On Mac OS X, the \"Black\" dock widget has been created as a "
+ "<em>Drawer</em>, which is a special kind of QDockWidget.</p>"
+#endif
+ ;
+
+MainWindow::MainWindow(const QMap<QString, QSize> &customSizeHints,
+ QWidget *parent, Qt::WindowFlags flags)
+ : QMainWindow(parent, flags)
+{
+ setObjectName("MainWindow");
+ setWindowTitle("Qt Main Window Demo");
+
+ center = new QTextEdit(this);
+ center->setReadOnly(true);
+ center->setMinimumSize(400, 205);
+ setCentralWidget(center);
+
+ setupToolBar();
+ setupMenuBar();
+ setupDockWidgets(customSizeHints);
+
+ statusBar()->showMessage(tr("Status Bar"));
+}
+
+void MainWindow::actionTriggered(QAction *action)
+{
+ qDebug("action '%s' triggered", action->text().toLocal8Bit().data());
+}
+
+void MainWindow::setupToolBar()
+{
+ for (int i = 0; i < 3; ++i) {
+ ToolBar *tb = new ToolBar(QString::fromLatin1("Tool Bar %1").arg(i + 1), this);
+ toolBars.append(tb);
+ addToolBar(tb);
+ }
+}
+
+void MainWindow::setupMenuBar()
+{
+ QMenu *menu = menuBar()->addMenu(tr("&File"));
+
+ QAction *action = menu->addAction(tr("Save layout..."));
+ connect(action, SIGNAL(triggered()), this, SLOT(saveLayout()));
+
+ action = menu->addAction(tr("Load layout..."));
+ connect(action, SIGNAL(triggered()), this, SLOT(loadLayout()));
+
+ action = menu->addAction(tr("Switch layout direction"));
+ connect(action, SIGNAL(triggered()), this, SLOT(switchLayoutDirection()));
+
+ menu->addSeparator();
+
+ menu->addAction(tr("&Quit"), this, SLOT(close()));
+
+ mainWindowMenu = menuBar()->addMenu(tr("Main window"));
+
+ action = mainWindowMenu->addAction(tr("Animated docks"));
+ action->setCheckable(true);
+ action->setChecked(dockOptions() & AnimatedDocks);
+ connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
+
+ action = mainWindowMenu->addAction(tr("Allow nested docks"));
+ action->setCheckable(true);
+ action->setChecked(dockOptions() & AllowNestedDocks);
+ connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
+
+ action = mainWindowMenu->addAction(tr("Allow tabbed docks"));
+ action->setCheckable(true);
+ action->setChecked(dockOptions() & AllowTabbedDocks);
+ connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
+
+ action = mainWindowMenu->addAction(tr("Force tabbed docks"));
+ action->setCheckable(true);
+ action->setChecked(dockOptions() & ForceTabbedDocks);
+ connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
+
+ action = mainWindowMenu->addAction(tr("Vertical tabs"));
+ action->setCheckable(true);
+ action->setChecked(dockOptions() & VerticalTabs);
+ connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
+
+ QMenu *toolBarMenu = menuBar()->addMenu(tr("Tool bars"));
+ for (int i = 0; i < toolBars.count(); ++i)
+ toolBarMenu->addMenu(toolBars.at(i)->menu);
+
+ dockWidgetMenu = menuBar()->addMenu(tr("&Dock Widgets"));
+}
+
+void MainWindow::setDockOptions()
+{
+ DockOptions opts;
+ QList<QAction*> actions = mainWindowMenu->actions();
+
+ if (actions.at(0)->isChecked())
+ opts |= AnimatedDocks;
+ if (actions.at(1)->isChecked())
+ opts |= AllowNestedDocks;
+ if (actions.at(2)->isChecked())
+ opts |= AllowTabbedDocks;
+ if (actions.at(3)->isChecked())
+ opts |= ForceTabbedDocks;
+ if (actions.at(4)->isChecked())
+ opts |= VerticalTabs;
+
+ QMainWindow::setDockOptions(opts);
+}
+
+void MainWindow::saveLayout()
+{
+ QString fileName
+ = QFileDialog::getSaveFileName(this, tr("Save layout"));
+ if (fileName.isEmpty())
+ return;
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly)) {
+ QString msg = tr("Failed to open %1\n%2")
+ .arg(fileName)
+ .arg(file.errorString());
+ QMessageBox::warning(this, tr("Error"), msg);
+ return;
+ }
+
+ QByteArray geo_data = saveGeometry();
+ QByteArray layout_data = saveState();
+
+ bool ok = file.putChar((uchar)geo_data.size());
+ if (ok)
+ ok = file.write(geo_data) == geo_data.size();
+ if (ok)
+ ok = file.write(layout_data) == layout_data.size();
+
+ if (!ok) {
+ QString msg = tr("Error writing to %1\n%2")
+ .arg(fileName)
+ .arg(file.errorString());
+ QMessageBox::warning(this, tr("Error"), msg);
+ return;
+ }
+}
+
+void MainWindow::loadLayout()
+{
+ QString fileName
+ = QFileDialog::getOpenFileName(this, tr("Load layout"));
+ if (fileName.isEmpty())
+ return;
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly)) {
+ QString msg = tr("Failed to open %1\n%2")
+ .arg(fileName)
+ .arg(file.errorString());
+ QMessageBox::warning(this, tr("Error"), msg);
+ return;
+ }
+
+ uchar geo_size;
+ QByteArray geo_data;
+ QByteArray layout_data;
+
+ bool ok = file.getChar((char*)&geo_size);
+ if (ok) {
+ geo_data = file.read(geo_size);
+ ok = geo_data.size() == geo_size;
+ }
+ if (ok) {
+ layout_data = file.readAll();
+ ok = layout_data.size() > 0;
+ }
+
+ if (ok)
+ ok = restoreGeometry(geo_data);
+ if (ok)
+ ok = restoreState(layout_data);
+
+ if (!ok) {
+ QString msg = tr("Error reading %1")
+ .arg(fileName);
+ QMessageBox::warning(this, tr("Error"), msg);
+ return;
+ }
+}
+
+QAction *addAction(QMenu *menu, const QString &text, QActionGroup *group, QSignalMapper *mapper,
+ int id)
+{
+ bool first = group->actions().isEmpty();
+ QAction *result = menu->addAction(text);
+ result->setCheckable(true);
+ result->setChecked(first);
+ group->addAction(result);
+ QObject::connect(result, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(result, id);
+ return result;
+}
+
+void MainWindow::setupDockWidgets(const QMap<QString, QSize> &customSizeHints)
+{
+ mapper = new QSignalMapper(this);
+ connect(mapper, SIGNAL(mapped(int)), this, SLOT(setCorner(int)));
+
+ QMenu *corner_menu = dockWidgetMenu->addMenu(tr("Top left corner"));
+ QActionGroup *group = new QActionGroup(this);
+ group->setExclusive(true);
+ ::addAction(corner_menu, tr("Top dock area"), group, mapper, 0);
+ ::addAction(corner_menu, tr("Left dock area"), group, mapper, 1);
+
+ corner_menu = dockWidgetMenu->addMenu(tr("Top right corner"));
+ group = new QActionGroup(this);
+ group->setExclusive(true);
+ ::addAction(corner_menu, tr("Top dock area"), group, mapper, 2);
+ ::addAction(corner_menu, tr("Right dock area"), group, mapper, 3);
+
+ corner_menu = dockWidgetMenu->addMenu(tr("Bottom left corner"));
+ group = new QActionGroup(this);
+ group->setExclusive(true);
+ ::addAction(corner_menu, tr("Bottom dock area"), group, mapper, 4);
+ ::addAction(corner_menu, tr("Left dock area"), group, mapper, 5);
+
+ corner_menu = dockWidgetMenu->addMenu(tr("Bottom right corner"));
+ group = new QActionGroup(this);
+ group->setExclusive(true);
+ ::addAction(corner_menu, tr("Bottom dock area"), group, mapper, 6);
+ ::addAction(corner_menu, tr("Right dock area"), group, mapper, 7);
+
+ dockWidgetMenu->addSeparator();
+
+ static const struct Set {
+ const char * name;
+ uint flags;
+ Qt::DockWidgetArea area;
+ } sets [] = {
+#ifndef Q_WS_MAC
+ { "Black", 0, Qt::LeftDockWidgetArea },
+#else
+ { "Black", Qt::Drawer, Qt::LeftDockWidgetArea },
+#endif
+ { "White", 0, Qt::RightDockWidgetArea },
+ { "Red", 0, Qt::TopDockWidgetArea },
+ { "Green", 0, Qt::TopDockWidgetArea },
+ { "Blue", 0, Qt::BottomDockWidgetArea },
+ { "Yellow", 0, Qt::BottomDockWidgetArea }
+ };
+ const int setCount = sizeof(sets) / sizeof(Set);
+
+ for (int i = 0; i < setCount; ++i) {
+ ColorSwatch *swatch = new ColorSwatch(tr(sets[i].name), this, Qt::WindowFlags(sets[i].flags));
+ if (i%2)
+ swatch->setWindowIcon(QIcon(QPixmap(":/res/qt.png")));
+ if (qstrcmp(sets[i].name, "Blue") == 0) {
+ BlueTitleBar *titlebar = new BlueTitleBar(swatch);
+ swatch->setTitleBarWidget(titlebar);
+ connect(swatch, SIGNAL(topLevelChanged(bool)), titlebar, SLOT(updateMask()));
+ connect(swatch, SIGNAL(featuresChanged(QDockWidget::DockWidgetFeatures)), titlebar, SLOT(updateMask()));
+
+#ifdef Q_WS_QWS
+ QPalette pal = palette();
+ pal.setBrush(backgroundRole(), QColor(0,0,0,0));
+ swatch->setPalette(pal);
+#endif
+ }
+
+ QString name = QString::fromLatin1(sets[i].name);
+ if (customSizeHints.contains(name))
+ swatch->setCustomSizeHint(customSizeHints.value(name));
+
+ addDockWidget(sets[i].area, swatch);
+ dockWidgetMenu->addMenu(swatch->menu);
+ }
+
+ createDockWidgetAction = new QAction(tr("Add dock widget..."), this);
+ connect(createDockWidgetAction, SIGNAL(triggered()), this, SLOT(createDockWidget()));
+ destroyDockWidgetMenu = new QMenu(tr("Destroy dock widget"), this);
+ destroyDockWidgetMenu->setEnabled(false);
+ connect(destroyDockWidgetMenu, SIGNAL(triggered(QAction*)), this, SLOT(destroyDockWidget(QAction*)));
+
+ dockWidgetMenu->addSeparator();
+ dockWidgetMenu->addAction(createDockWidgetAction);
+ dockWidgetMenu->addMenu(destroyDockWidgetMenu);
+}
+
+void MainWindow::setCorner(int id)
+{
+ switch (id) {
+ case 0:
+ QMainWindow::setCorner(Qt::TopLeftCorner, Qt::TopDockWidgetArea);
+ break;
+ case 1:
+ QMainWindow::setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
+ break;
+ case 2:
+ QMainWindow::setCorner(Qt::TopRightCorner, Qt::TopDockWidgetArea);
+ break;
+ case 3:
+ QMainWindow::setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
+ break;
+ case 4:
+ QMainWindow::setCorner(Qt::BottomLeftCorner, Qt::BottomDockWidgetArea);
+ break;
+ case 5:
+ QMainWindow::setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
+ break;
+ case 6:
+ QMainWindow::setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);
+ break;
+ case 7:
+ QMainWindow::setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
+ break;
+ }
+}
+
+void MainWindow::showEvent(QShowEvent *event)
+{
+ QMainWindow::showEvent(event);
+}
+
+void MainWindow::switchLayoutDirection()
+{
+ if (layoutDirection() == Qt::LeftToRight)
+ qApp->setLayoutDirection(Qt::RightToLeft);
+ else
+ qApp->setLayoutDirection(Qt::LeftToRight);
+}
+
+class CreateDockWidgetDialog : public QDialog
+{
+public:
+ CreateDockWidgetDialog(QWidget *parent = 0);
+
+ QString objectName() const;
+ Qt::DockWidgetArea location() const;
+
+private:
+ QLineEdit *m_objectName;
+ QComboBox *m_location;
+};
+
+CreateDockWidgetDialog::CreateDockWidgetDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QGridLayout *layout = new QGridLayout(this);
+
+ layout->addWidget(new QLabel(tr("Object name:")), 0, 0);
+ m_objectName = new QLineEdit;
+ layout->addWidget(m_objectName, 0, 1);
+
+ layout->addWidget(new QLabel(tr("Location:")), 1, 0);
+ m_location = new QComboBox;
+ m_location->setEditable(false);
+ m_location->addItem(tr("Top"));
+ m_location->addItem(tr("Left"));
+ m_location->addItem(tr("Right"));
+ m_location->addItem(tr("Bottom"));
+ m_location->addItem(tr("Restore"));
+ layout->addWidget(m_location, 1, 1);
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ layout->addLayout(buttonLayout, 2, 0, 1, 2);
+ buttonLayout->addStretch();
+
+ QPushButton *cancelButton = new QPushButton(tr("Cancel"));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+ buttonLayout->addWidget(cancelButton);
+ QPushButton *okButton = new QPushButton(tr("Ok"));
+ connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
+ buttonLayout->addWidget(okButton);
+
+ okButton->setDefault(true);
+}
+
+QString CreateDockWidgetDialog::objectName() const
+{
+ return m_objectName->text();
+}
+
+Qt::DockWidgetArea CreateDockWidgetDialog::location() const
+{
+ switch (m_location->currentIndex()) {
+ case 0: return Qt::TopDockWidgetArea;
+ case 1: return Qt::LeftDockWidgetArea;
+ case 2: return Qt::RightDockWidgetArea;
+ case 3: return Qt::BottomDockWidgetArea;
+ default:
+ break;
+ }
+ return Qt::NoDockWidgetArea;
+}
+
+void MainWindow::createDockWidget()
+{
+ CreateDockWidgetDialog dialog(this);
+ int ret = dialog.exec();
+ if (ret == QDialog::Rejected)
+ return;
+
+ QDockWidget *dw = new QDockWidget;
+ dw->setObjectName(dialog.objectName());
+ dw->setWindowTitle(dialog.objectName());
+ dw->setWidget(new QTextEdit);
+
+ Qt::DockWidgetArea area = dialog.location();
+ switch (area) {
+ case Qt::LeftDockWidgetArea:
+ case Qt::RightDockWidgetArea:
+ case Qt::TopDockWidgetArea:
+ case Qt::BottomDockWidgetArea:
+ addDockWidget(area, dw);
+ break;
+ default:
+ if (!restoreDockWidget(dw)) {
+ QMessageBox::warning(this, QString(), tr("Failed to restore dock widget"));
+ delete dw;
+ return;
+ }
+ break;
+ }
+
+ extraDockWidgets.append(dw);
+ destroyDockWidgetMenu->setEnabled(true);
+ destroyDockWidgetMenu->addAction(new QAction(dialog.objectName(), this));
+}
+
+void MainWindow::destroyDockWidget(QAction *action)
+{
+ int index = destroyDockWidgetMenu->actions().indexOf(action);
+ delete extraDockWidgets.takeAt(index);
+ destroyDockWidgetMenu->removeAction(action);
+ action->deleteLater();
+
+ if (destroyDockWidgetMenu->isEmpty())
+ destroyDockWidgetMenu->setEnabled(false);
+}
diff --git a/demos/mainwindow/mainwindow.h b/demos/mainwindow/mainwindow.h
new file mode 100644
index 0000000..9c7f620
--- /dev/null
+++ b/demos/mainwindow/mainwindow.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QTextEdit>
+
+class ToolBar;
+QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QSignalMapper)
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+ QTextEdit *center;
+ QList<ToolBar*> toolBars;
+ QMenu *dockWidgetMenu;
+ QMenu *mainWindowMenu;
+ QSignalMapper *mapper;
+ QList<QDockWidget*> extraDockWidgets;
+ QAction *createDockWidgetAction;
+ QMenu *destroyDockWidgetMenu;
+
+public:
+ MainWindow(const QMap<QString, QSize> &customSizeHints,
+ QWidget *parent = 0, Qt::WindowFlags flags = 0);
+
+protected:
+ void showEvent(QShowEvent *event);
+
+public slots:
+ void actionTriggered(QAction *action);
+ void saveLayout();
+ void loadLayout();
+ void setCorner(int id);
+ void switchLayoutDirection();
+ void setDockOptions();
+
+ void createDockWidget();
+ void destroyDockWidget(QAction *action);
+
+private:
+ void setupToolBar();
+ void setupMenuBar();
+ void setupDockWidgets(const QMap<QString, QSize> &customSizeHints);
+};
+
+
+#endif
diff --git a/demos/mainwindow/mainwindow.pro b/demos/mainwindow/mainwindow.pro
new file mode 100644
index 0000000..9853a55
--- /dev/null
+++ b/demos/mainwindow/mainwindow.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+HEADERS += colorswatch.h mainwindow.h toolbar.h
+SOURCES += colorswatch.cpp mainwindow.cpp toolbar.cpp main.cpp
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+RESOURCES += mainwindow.qrc
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/mainwindow
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.png *.jpg *.pro
+sources.path = $$[QT_INSTALL_DEMOS]/mainwindow
+INSTALLS += target sources
+
diff --git a/demos/mainwindow/mainwindow.qrc b/demos/mainwindow/mainwindow.qrc
new file mode 100644
index 0000000..47ff22a
--- /dev/null
+++ b/demos/mainwindow/mainwindow.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>qt.png</file>
+ <file>titlebarLeft.png</file>
+ <file>titlebarCenter.png</file>
+ <file>titlebarRight.png</file>
+</qresource>
+</RCC>
diff --git a/demos/mainwindow/qt.png b/demos/mainwindow/qt.png
new file mode 100644
index 0000000..48fa9fc
--- /dev/null
+++ b/demos/mainwindow/qt.png
Binary files differ
diff --git a/demos/mainwindow/titlebarCenter.png b/demos/mainwindow/titlebarCenter.png
new file mode 100644
index 0000000..5cc1413
--- /dev/null
+++ b/demos/mainwindow/titlebarCenter.png
Binary files differ
diff --git a/demos/mainwindow/titlebarLeft.png b/demos/mainwindow/titlebarLeft.png
new file mode 100644
index 0000000..3151662
--- /dev/null
+++ b/demos/mainwindow/titlebarLeft.png
Binary files differ
diff --git a/demos/mainwindow/titlebarRight.png b/demos/mainwindow/titlebarRight.png
new file mode 100644
index 0000000..a450526
--- /dev/null
+++ b/demos/mainwindow/titlebarRight.png
Binary files differ
diff --git a/demos/mainwindow/toolbar.cpp b/demos/mainwindow/toolbar.cpp
new file mode 100644
index 0000000..9de1348
--- /dev/null
+++ b/demos/mainwindow/toolbar.cpp
@@ -0,0 +1,383 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "toolbar.h"
+
+#include <QMainWindow>
+#include <QMenu>
+#include <QPainter>
+#include <QPainterPath>
+#include <QSpinBox>
+#include <QLabel>
+#include <QToolTip>
+
+#include <stdlib.h>
+
+static QPixmap genIcon(const QSize &iconSize, const QString &, const QColor &color)
+{
+ int w = iconSize.width();
+ int h = iconSize.height();
+
+ QImage image(w, h, QImage::Format_ARGB32_Premultiplied);
+ image.fill(0);
+
+ QPainter p(&image);
+
+ extern void render_qt_text(QPainter *, int, int, const QColor &);
+ render_qt_text(&p, w, h, color);
+
+ return QPixmap::fromImage(image, Qt::DiffuseDither | Qt::DiffuseAlphaDither);
+}
+
+static QPixmap genIcon(const QSize &iconSize, int number, const QColor &color)
+{ return genIcon(iconSize, QString::number(number), color); }
+
+ToolBar::ToolBar(const QString &title, QWidget *parent)
+ : QToolBar(parent), spinbox(0), spinboxAction(0)
+{
+ tip = 0;
+ setWindowTitle(title);
+ setObjectName(title);
+
+ setIconSize(QSize(32, 32));
+
+ QColor bg(palette().background().color());
+ menu = new QMenu("One", this);
+ menu->setIcon(genIcon(iconSize(), 1, Qt::black));
+ menu->addAction(genIcon(iconSize(), "A", Qt::blue), "A");
+ menu->addAction(genIcon(iconSize(), "B", Qt::blue), "B");
+ menu->addAction(genIcon(iconSize(), "C", Qt::blue), "C");
+ addAction(menu->menuAction());
+
+ QAction *two = addAction(genIcon(iconSize(), 2, Qt::white), "Two");
+ QFont boldFont;
+ boldFont.setBold(true);
+ two->setFont(boldFont);
+
+ addAction(genIcon(iconSize(), 3, Qt::red), "Three");
+ addAction(genIcon(iconSize(), 4, Qt::green), "Four");
+ addAction(genIcon(iconSize(), 5, Qt::blue), "Five");
+ addAction(genIcon(iconSize(), 6, Qt::yellow), "Six");
+ orderAction = new QAction(this);
+ orderAction->setText(tr("Order Items in Tool Bar"));
+ connect(orderAction, SIGNAL(triggered()), SLOT(order()));
+
+ randomizeAction = new QAction(this);
+ randomizeAction->setText(tr("Randomize Items in Tool Bar"));
+ connect(randomizeAction, SIGNAL(triggered()), SLOT(randomize()));
+
+ addSpinBoxAction = new QAction(this);
+ addSpinBoxAction->setText(tr("Add Spin Box"));
+ connect(addSpinBoxAction, SIGNAL(triggered()), SLOT(addSpinBox()));
+
+ removeSpinBoxAction = new QAction(this);
+ removeSpinBoxAction->setText(tr("Remove Spin Box"));
+ removeSpinBoxAction->setEnabled(false);
+ connect(removeSpinBoxAction, SIGNAL(triggered()), SLOT(removeSpinBox()));
+
+ movableAction = new QAction(tr("Movable"), this);
+ movableAction->setCheckable(true);
+ connect(movableAction, SIGNAL(triggered(bool)), SLOT(changeMovable(bool)));
+
+ allowedAreasActions = new QActionGroup(this);
+ allowedAreasActions->setExclusive(false);
+
+ allowLeftAction = new QAction(tr("Allow on Left"), this);
+ allowLeftAction->setCheckable(true);
+ connect(allowLeftAction, SIGNAL(triggered(bool)), SLOT(allowLeft(bool)));
+
+ allowRightAction = new QAction(tr("Allow on Right"), this);
+ allowRightAction->setCheckable(true);
+ connect(allowRightAction, SIGNAL(triggered(bool)), SLOT(allowRight(bool)));
+
+ allowTopAction = new QAction(tr("Allow on Top"), this);
+ allowTopAction->setCheckable(true);
+ connect(allowTopAction, SIGNAL(triggered(bool)), SLOT(allowTop(bool)));
+
+ allowBottomAction = new QAction(tr("Allow on Bottom"), this);
+ allowBottomAction->setCheckable(true);
+ connect(allowBottomAction, SIGNAL(triggered(bool)), SLOT(allowBottom(bool)));
+
+ allowedAreasActions->addAction(allowLeftAction);
+ allowedAreasActions->addAction(allowRightAction);
+ allowedAreasActions->addAction(allowTopAction);
+ allowedAreasActions->addAction(allowBottomAction);
+
+ areaActions = new QActionGroup(this);
+ areaActions->setExclusive(true);
+
+ leftAction = new QAction(tr("Place on Left") , this);
+ leftAction->setCheckable(true);
+ connect(leftAction, SIGNAL(triggered(bool)), SLOT(placeLeft(bool)));
+
+ rightAction = new QAction(tr("Place on Right") , this);
+ rightAction->setCheckable(true);
+ connect(rightAction, SIGNAL(triggered(bool)), SLOT(placeRight(bool)));
+
+ topAction = new QAction(tr("Place on Top") , this);
+ topAction->setCheckable(true);
+ connect(topAction, SIGNAL(triggered(bool)), SLOT(placeTop(bool)));
+
+ bottomAction = new QAction(tr("Place on Bottom") , this);
+ bottomAction->setCheckable(true);
+ connect(bottomAction, SIGNAL(triggered(bool)), SLOT(placeBottom(bool)));
+
+ areaActions->addAction(leftAction);
+ areaActions->addAction(rightAction);
+ areaActions->addAction(topAction);
+ areaActions->addAction(bottomAction);
+
+ toolBarBreakAction = new QAction(tr("Insert break"), this);
+ connect(toolBarBreakAction, SIGNAL(triggered(bool)), this, SLOT(insertToolBarBreak()));
+
+ connect(movableAction, SIGNAL(triggered(bool)), areaActions, SLOT(setEnabled(bool)));
+
+ connect(movableAction, SIGNAL(triggered(bool)), allowedAreasActions, SLOT(setEnabled(bool)));
+
+ menu = new QMenu(title, this);
+ menu->addAction(toggleViewAction());
+ menu->addSeparator();
+ menu->addAction(orderAction);
+ menu->addAction(randomizeAction);
+ menu->addSeparator();
+ menu->addAction(addSpinBoxAction);
+ menu->addAction(removeSpinBoxAction);
+ menu->addSeparator();
+ menu->addAction(movableAction);
+ menu->addSeparator();
+ menu->addActions(allowedAreasActions->actions());
+ menu->addSeparator();
+ menu->addActions(areaActions->actions());
+ menu->addSeparator();
+ menu->addAction(toolBarBreakAction);
+
+ connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
+
+ randomize();
+}
+
+void ToolBar::updateMenu()
+{
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ Q_ASSERT(mainWindow != 0);
+
+ const Qt::ToolBarArea area = mainWindow->toolBarArea(this);
+ const Qt::ToolBarAreas areas = allowedAreas();
+
+ movableAction->setChecked(isMovable());
+
+ allowLeftAction->setChecked(isAreaAllowed(Qt::LeftToolBarArea));
+ allowRightAction->setChecked(isAreaAllowed(Qt::RightToolBarArea));
+ allowTopAction->setChecked(isAreaAllowed(Qt::TopToolBarArea));
+ allowBottomAction->setChecked(isAreaAllowed(Qt::BottomToolBarArea));
+
+ if (allowedAreasActions->isEnabled()) {
+ allowLeftAction->setEnabled(area != Qt::LeftToolBarArea);
+ allowRightAction->setEnabled(area != Qt::RightToolBarArea);
+ allowTopAction->setEnabled(area != Qt::TopToolBarArea);
+ allowBottomAction->setEnabled(area != Qt::BottomToolBarArea);
+ }
+
+ leftAction->setChecked(area == Qt::LeftToolBarArea);
+ rightAction->setChecked(area == Qt::RightToolBarArea);
+ topAction->setChecked(area == Qt::TopToolBarArea);
+ bottomAction->setChecked(area == Qt::BottomToolBarArea);
+
+ if (areaActions->isEnabled()) {
+ leftAction->setEnabled(areas & Qt::LeftToolBarArea);
+ rightAction->setEnabled(areas & Qt::RightToolBarArea);
+ topAction->setEnabled(areas & Qt::TopToolBarArea);
+ bottomAction->setEnabled(areas & Qt::BottomToolBarArea);
+ }
+}
+
+void ToolBar::order()
+{
+ QList<QAction *> ordered, actions1 = actions(),
+ actions2 = qFindChildren<QAction *>(this);
+ while (!actions2.isEmpty()) {
+ QAction *action = actions2.takeFirst();
+ if (!actions1.contains(action))
+ continue;
+ actions1.removeAll(action);
+ ordered.append(action);
+ }
+
+ clear();
+ addActions(ordered);
+
+ orderAction->setEnabled(false);
+}
+
+void ToolBar::randomize()
+{
+ QList<QAction *> randomized, actions = this->actions();
+ while (!actions.isEmpty()) {
+ QAction *action = actions.takeAt(rand() % actions.size());
+ randomized.append(action);
+ }
+ clear();
+ addActions(randomized);
+
+ orderAction->setEnabled(true);
+}
+
+void ToolBar::addSpinBox()
+{
+ if (!spinbox) {
+ spinbox = new QSpinBox(this);
+ }
+ if (!spinboxAction)
+ spinboxAction = addWidget(spinbox);
+ else
+ addAction(spinboxAction);
+
+ addSpinBoxAction->setEnabled(false);
+ removeSpinBoxAction->setEnabled(true);
+}
+
+void ToolBar::removeSpinBox()
+{
+ if (spinboxAction)
+ removeAction(spinboxAction);
+
+ addSpinBoxAction->setEnabled(true);
+ removeSpinBoxAction->setEnabled(false);
+}
+
+void ToolBar::allow(Qt::ToolBarArea area, bool a)
+{
+ Qt::ToolBarAreas areas = allowedAreas();
+ areas = a ? areas | area : areas & ~area;
+ setAllowedAreas(areas);
+
+ if (areaActions->isEnabled()) {
+ leftAction->setEnabled(areas & Qt::LeftToolBarArea);
+ rightAction->setEnabled(areas & Qt::RightToolBarArea);
+ topAction->setEnabled(areas & Qt::TopToolBarArea);
+ bottomAction->setEnabled(areas & Qt::BottomToolBarArea);
+ }
+}
+
+void ToolBar::place(Qt::ToolBarArea area, bool p)
+{
+ if (!p)
+ return;
+
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ Q_ASSERT(mainWindow != 0);
+
+ mainWindow->addToolBar(area, this);
+
+ if (allowedAreasActions->isEnabled()) {
+ allowLeftAction->setEnabled(area != Qt::LeftToolBarArea);
+ allowRightAction->setEnabled(area != Qt::RightToolBarArea);
+ allowTopAction->setEnabled(area != Qt::TopToolBarArea);
+ allowBottomAction->setEnabled(area != Qt::BottomToolBarArea);
+ }
+}
+
+void ToolBar::changeMovable(bool movable)
+{ setMovable(movable); }
+
+void ToolBar::allowLeft(bool a)
+{ allow(Qt::LeftToolBarArea, a); }
+
+void ToolBar::allowRight(bool a)
+{ allow(Qt::RightToolBarArea, a); }
+
+void ToolBar::allowTop(bool a)
+{ allow(Qt::TopToolBarArea, a); }
+
+void ToolBar::allowBottom(bool a)
+{ allow(Qt::BottomToolBarArea, a); }
+
+void ToolBar::placeLeft(bool p)
+{ place(Qt::LeftToolBarArea, p); }
+
+void ToolBar::placeRight(bool p)
+{ place(Qt::RightToolBarArea, p); }
+
+void ToolBar::placeTop(bool p)
+{ place(Qt::TopToolBarArea, p); }
+
+void ToolBar::placeBottom(bool p)
+{ place(Qt::BottomToolBarArea, p); }
+
+void ToolBar::insertToolBarBreak()
+{
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
+ Q_ASSERT(mainWindow != 0);
+
+ mainWindow->insertToolBarBreak(this);
+}
+
+void ToolBar::enterEvent(QEvent*)
+{
+/*
+ These labels on top of toolbars look darn ugly
+
+ if (tip == 0) {
+ tip = new QLabel(windowTitle(), this);
+ QPalette pal = tip->palette();
+ QColor c = Qt::black;
+ c.setAlpha(100);
+ pal.setColor(QPalette::Window, c);
+ pal.setColor(QPalette::Foreground, Qt::white);
+ tip->setPalette(pal);
+ tip->setAutoFillBackground(true);
+ tip->setMargin(3);
+ tip->setText(windowTitle());
+ }
+ QPoint c = rect().center();
+ QSize hint = tip->sizeHint();
+ tip->setGeometry(c.x() - hint.width()/2, c.y() - hint.height()/2,
+ hint.width(), hint.height());
+
+ tip->show();
+*/
+}
+
+void ToolBar::leaveEvent(QEvent*)
+{
+ if (tip != 0)
+ tip->hide();
+}
diff --git a/demos/mainwindow/toolbar.h b/demos/mainwindow/toolbar.h
new file mode 100644
index 0000000..a9b9af2
--- /dev/null
+++ b/demos/mainwindow/toolbar.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOOLBAR_H
+#define TOOLBAR_H
+
+#include <QToolBar>
+
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QActionGroup)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+QT_FORWARD_DECLARE_CLASS(QSpinBox)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+
+class ToolBar : public QToolBar
+{
+ Q_OBJECT
+
+ QSpinBox *spinbox;
+ QAction *spinboxAction;
+
+ QAction *orderAction;
+ QAction *randomizeAction;
+ QAction *addSpinBoxAction;
+ QAction *removeSpinBoxAction;
+
+ QAction *movableAction;
+
+ QActionGroup *allowedAreasActions;
+ QAction *allowLeftAction;
+ QAction *allowRightAction;
+ QAction *allowTopAction;
+ QAction *allowBottomAction;
+
+ QActionGroup *areaActions;
+ QAction *leftAction;
+ QAction *rightAction;
+ QAction *topAction;
+ QAction *bottomAction;
+
+ QAction *toolBarBreakAction;
+
+public:
+ ToolBar(const QString &title, QWidget *parent);
+
+ QMenu *menu;
+
+protected:
+ void enterEvent(QEvent*);
+ void leaveEvent(QEvent*);
+
+private:
+ void allow(Qt::ToolBarArea area, bool allow);
+ void place(Qt::ToolBarArea area, bool place);
+ QLabel *tip;
+
+private slots:
+ void order();
+ void randomize();
+ void addSpinBox();
+ void removeSpinBox();
+
+ void changeMovable(bool movable);
+
+ void allowLeft(bool a);
+ void allowRight(bool a);
+ void allowTop(bool a);
+ void allowBottom(bool a);
+
+ void placeLeft(bool p);
+ void placeRight(bool p);
+ void placeTop(bool p);
+ void placeBottom(bool p);
+
+ void updateMenu();
+ void insertToolBarBreak();
+
+};
+
+#endif
diff --git a/demos/mediaplayer/images/screen.png b/demos/mediaplayer/images/screen.png
new file mode 100644
index 0000000..a15df92
--- /dev/null
+++ b/demos/mediaplayer/images/screen.png
Binary files differ
diff --git a/demos/mediaplayer/main.cpp b/demos/mediaplayer/main.cpp
new file mode 100644
index 0000000..279a6c7
--- /dev/null
+++ b/demos/mediaplayer/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+***************************************************************************/
+
+#include <QtGui>
+#include "mediaplayer.h"
+
+int main (int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(mediaplayer);
+ QApplication app(argc, argv);
+ app.setApplicationName("Media Player");
+ app.setOrganizationName("Trolltech");
+ app.setQuitOnLastWindowClosed(true);
+
+ QString fileString = app.arguments().value(1);
+ MediaPlayer player(fileString);
+ player.show();
+
+ return app.exec();
+}
+
diff --git a/demos/mediaplayer/mediaplayer.cpp b/demos/mediaplayer/mediaplayer.cpp
new file mode 100644
index 0000000..5f5a5dc
--- /dev/null
+++ b/demos/mediaplayer/mediaplayer.cpp
@@ -0,0 +1,840 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+***************************************************************************/
+
+#include <QtGui>
+
+#define SLIDER_RANGE 8
+
+#include "mediaplayer.h"
+#include "ui_settings.h"
+
+
+class MediaVideoWidget : public Phonon::VideoWidget
+{
+public:
+ MediaVideoWidget(MediaPlayer *player, QWidget *parent = 0) :
+ Phonon::VideoWidget(parent), m_player(player), m_action(this)
+ {
+ m_action.setCheckable(true);
+ m_action.setChecked(false);
+ m_action.setShortcut(QKeySequence( Qt::AltModifier + Qt::Key_Return));
+ m_action.setShortcutContext(Qt::WindowShortcut);
+ connect(&m_action, SIGNAL(toggled(bool)), SLOT(setFullScreen(bool)));
+ addAction(&m_action);
+ setAcceptDrops(true);
+ }
+
+protected:
+ void mouseDoubleClickEvent(QMouseEvent *e)
+ {
+ Phonon::VideoWidget::mouseDoubleClickEvent(e);
+ setFullScreen(!isFullScreen());
+ }
+
+ void keyPressEvent(QKeyEvent *e)
+ {
+ if (e->key() == Qt::Key_Space && !e->modifiers()) {
+ m_player->playPause();
+ e->accept();
+ return;
+ } else if (e->key() == Qt::Key_Escape && !e->modifiers()) {
+ setFullScreen(false);
+ e->accept();
+ return;
+ }
+ Phonon::VideoWidget::keyPressEvent(e);
+ }
+
+ bool event(QEvent *e)
+ {
+ switch(e->type())
+ {
+ case QEvent::Close:
+ //we just ignore the cose events on the video widget
+ //this prevents ALT+F4 from having an effect in fullscreen mode
+ e->ignore();
+ return true;
+ case QEvent::MouseMove:
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ //fall through
+ case QEvent::WindowStateChange:
+ {
+ //we just update the state of the checkbox, in case it wasn't already
+ m_action.setChecked(windowState() & Qt::WindowFullScreen);
+ const Qt::WindowFlags flags = m_player->windowFlags();
+ if (windowState() & Qt::WindowFullScreen) {
+ m_timer.start(1000, this);
+ } else {
+ m_timer.stop();
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return Phonon::VideoWidget::event(e);
+ }
+
+ void timerEvent(QTimerEvent *e)
+ {
+ if (e->timerId() == m_timer.timerId()) {
+ //let's store the cursor shape
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::BlankCursor);
+#endif
+ }
+ Phonon::VideoWidget::timerEvent(e);
+ }
+
+ void dropEvent(QDropEvent *e)
+ {
+ m_player->handleDrop(e);
+ }
+
+ void dragEnterEvent(QDragEnterEvent *e) {
+ if (e->mimeData()->hasUrls())
+ e->acceptProposedAction();
+ }
+
+private:
+ MediaPlayer *m_player;
+ QBasicTimer m_timer;
+ QAction m_action;
+};
+
+
+MediaPlayer::MediaPlayer(const QString &filePath) :
+ playButton(0), nextEffect(0), settingsDialog(0), ui(0),
+ m_AudioOutput(Phonon::VideoCategory),
+ m_videoWidget(new MediaVideoWidget(this))
+{
+ setWindowTitle(tr("Media Player"));
+ setContextMenuPolicy(Qt::CustomContextMenu);
+ m_videoWidget->setContextMenuPolicy(Qt::CustomContextMenu);
+
+ QSize buttonSize(34, 28);
+
+ QPushButton *openButton = new QPushButton(this);
+
+ openButton->setIcon(style()->standardIcon(QStyle::SP_DialogOpenButton));
+ QPalette bpal;
+ QColor arrowcolor = bpal.buttonText().color();
+ if (arrowcolor == Qt::black)
+ arrowcolor = QColor(80, 80, 80);
+ bpal.setBrush(QPalette::ButtonText, arrowcolor);
+ openButton->setPalette(bpal);
+
+ rewindButton = new QPushButton(this);
+ rewindButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward));
+
+ forwardButton = new QPushButton(this);
+ forwardButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward));
+ forwardButton->setEnabled(false);
+
+ playButton = new QPushButton(this);
+ playIcon = style()->standardIcon(QStyle::SP_MediaPlay);
+ pauseIcon = style()->standardIcon(QStyle::SP_MediaPause);
+ playButton->setIcon(playIcon);
+
+ slider = new Phonon::SeekSlider(this);
+ slider->setMediaObject(&m_MediaObject);
+ volume = new Phonon::VolumeSlider(&m_AudioOutput);
+
+ QVBoxLayout *vLayout = new QVBoxLayout(this);
+ vLayout->setContentsMargins(8, 8, 8, 8);
+
+ QHBoxLayout *layout = new QHBoxLayout();
+
+ info = new QLabel(this);
+ info->setMinimumHeight(70);
+ info->setAcceptDrops(false);
+ info->setMargin(2);
+ info->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ info->setLineWidth(2);
+ info->setAutoFillBackground(true);
+
+ QPalette palette;
+ palette.setBrush(QPalette::WindowText, Qt::white);
+#ifndef Q_WS_MAC
+ openButton->setMinimumSize(54, buttonSize.height());
+ rewindButton->setMinimumSize(buttonSize);
+ forwardButton->setMinimumSize(buttonSize);
+ playButton->setMinimumSize(buttonSize);
+#endif
+ info->setStyleSheet("border-image:url(:/images/screen.png) ; border-width:3px");
+ info->setPalette(palette);
+ info->setText(tr("<center>No media</center>"));
+
+ volume->setFixedWidth(120);
+
+ layout->addWidget(openButton);
+ layout->addWidget(rewindButton);
+ layout->addWidget(playButton);
+ layout->addWidget(forwardButton);
+
+ layout->addStretch();
+ layout->addWidget(volume);
+
+ vLayout->addWidget(info);
+ initVideoWindow();
+ vLayout->addWidget(&m_videoWindow);
+ QVBoxLayout *buttonPanelLayout = new QVBoxLayout();
+ m_videoWindow.hide();
+ buttonPanelLayout->addLayout(layout);
+
+ timeLabel = new QLabel(this);
+ progressLabel = new QLabel(this);
+ QWidget *sliderPanel = new QWidget(this);
+ QHBoxLayout *sliderLayout = new QHBoxLayout();
+ sliderLayout->addWidget(slider);
+ sliderLayout->addWidget(timeLabel);
+ sliderLayout->addWidget(progressLabel);
+ sliderLayout->setContentsMargins(0, 0, 0, 0);
+ sliderPanel->setLayout(sliderLayout);
+
+ buttonPanelLayout->addWidget(sliderPanel);
+ buttonPanelLayout->setContentsMargins(0, 0, 0, 0);
+#ifdef Q_OS_MAC
+ layout->setSpacing(4);
+ buttonPanelLayout->setSpacing(0);
+ info->setMinimumHeight(100);
+ info->setFont(QFont("verdana", 15));
+ // QStyle *flatButtonStyle = new QWindowsStyle;
+ openButton->setFocusPolicy(Qt::NoFocus);
+ // openButton->setStyle(flatButtonStyle);
+ // playButton->setStyle(flatButtonStyle);
+ // rewindButton->setStyle(flatButtonStyle);
+ // forwardButton->setStyle(flatButtonStyle);
+ #endif
+ QWidget *buttonPanelWidget = new QWidget(this);
+ buttonPanelWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ buttonPanelWidget->setLayout(buttonPanelLayout);
+ vLayout->addWidget(buttonPanelWidget);
+
+ QHBoxLayout *labelLayout = new QHBoxLayout();
+
+ vLayout->addLayout(labelLayout);
+ setLayout(vLayout);
+
+ // Create menu bar:
+ fileMenu = new QMenu(this);
+ QAction *openFileAction = fileMenu->addAction(tr("Open &File..."));
+ QAction *openUrlAction = fileMenu->addAction(tr("Open &Location..."));
+
+ fileMenu->addSeparator();
+ QMenu *aspectMenu = fileMenu->addMenu(tr("&Aspect ratio"));
+ QActionGroup *aspectGroup = new QActionGroup(aspectMenu);
+ connect(aspectGroup, SIGNAL(triggered(QAction *)), this, SLOT(aspectChanged(QAction *)));
+ aspectGroup->setExclusive(true);
+ QAction *aspectActionAuto = aspectMenu->addAction(tr("Auto"));
+ aspectActionAuto->setCheckable(true);
+ aspectActionAuto->setChecked(true);
+ aspectGroup->addAction(aspectActionAuto);
+ QAction *aspectActionScale = aspectMenu->addAction(tr("Scale"));
+ aspectActionScale->setCheckable(true);
+ aspectGroup->addAction(aspectActionScale);
+ QAction *aspectAction16_9 = aspectMenu->addAction(tr("16/9"));
+ aspectAction16_9->setCheckable(true);
+ aspectGroup->addAction(aspectAction16_9);
+ QAction *aspectAction4_3 = aspectMenu->addAction(tr("4/3"));
+ aspectAction4_3->setCheckable(true);
+ aspectGroup->addAction(aspectAction4_3);
+
+ QMenu *scaleMenu = fileMenu->addMenu(tr("&Scale mode"));
+ QActionGroup *scaleGroup = new QActionGroup(scaleMenu);
+ connect(scaleGroup, SIGNAL(triggered(QAction *)), this, SLOT(scaleChanged(QAction *)));
+ scaleGroup->setExclusive(true);
+ QAction *scaleActionFit = scaleMenu->addAction(tr("Fit in view"));
+ scaleActionFit->setCheckable(true);
+ scaleActionFit->setChecked(true);
+ scaleGroup->addAction(scaleActionFit);
+ QAction *scaleActionCrop = scaleMenu->addAction(tr("Scale and crop"));
+ scaleActionCrop->setCheckable(true);
+ scaleGroup->addAction(scaleActionCrop);
+
+ fileMenu->addSeparator();
+ QAction *settingsAction = fileMenu->addAction(tr("&Settings..."));
+
+ // Setup signal connections:
+ connect(rewindButton, SIGNAL(clicked()), this, SLOT(rewind()));
+ //connect(openButton, SIGNAL(clicked()), this, SLOT(openFile()));
+ openButton->setMenu(fileMenu);
+
+ connect(playButton, SIGNAL(clicked()), this, SLOT(playPause()));
+ connect(forwardButton, SIGNAL(clicked()), this, SLOT(forward()));
+ //connect(openButton, SIGNAL(clicked()), this, SLOT(openFile()));
+ connect(settingsAction, SIGNAL(triggered(bool)), this, SLOT(showSettingsDialog()));
+ connect(openUrlAction, SIGNAL(triggered(bool)), this, SLOT(openUrl()));
+ connect(openFileAction, SIGNAL(triggered(bool)), this, SLOT(openFile()));
+
+ connect(m_videoWidget, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &)));
+ connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &)));
+ connect(&m_MediaObject, SIGNAL(metaDataChanged()), this, SLOT(updateInfo()));
+ connect(&m_MediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(updateTime()));
+ connect(&m_MediaObject, SIGNAL(tick(qint64)), this, SLOT(updateTime()));
+ connect(&m_MediaObject, SIGNAL(finished()), this, SLOT(finished()));
+ connect(&m_MediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(stateChanged(Phonon::State, Phonon::State)));
+ connect(&m_MediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int)));
+
+ rewindButton->setEnabled(false);
+ playButton->setEnabled(false);
+ setAcceptDrops(true);
+
+ m_audioOutputPath = Phonon::createPath(&m_MediaObject, &m_AudioOutput);
+ Phonon::createPath(&m_MediaObject, m_videoWidget);
+
+ if (!filePath.isEmpty())
+ setFile(filePath);
+ resize(minimumSizeHint());
+}
+
+void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate)
+{
+ Q_UNUSED(oldstate);
+
+ if (oldstate == Phonon::LoadingState) {
+ m_videoWindow.setVisible(m_MediaObject.hasVideo());
+ info->setVisible(!m_MediaObject.hasVideo());
+ QRect videoHintRect = QRect(QPoint(0, 0), m_videoWindow.sizeHint());
+ QRect newVideoRect = QApplication::desktop()->screenGeometry().intersected(videoHintRect);
+ if (m_MediaObject.hasVideo()){
+ // Flush event que so that sizeHint takes the
+ // recently shown/hidden m_videoWindow into account:
+ qApp->processEvents();
+ resize(sizeHint());
+ } else
+ resize(minimumSize());
+ }
+
+ switch (newstate) {
+ case Phonon::ErrorState:
+ QMessageBox::warning(this, "Phonon Mediaplayer", m_MediaObject.errorString(), QMessageBox::Close);
+ if (m_MediaObject.errorType() == Phonon::FatalError) {
+ playButton->setEnabled(false);
+ rewindButton->setEnabled(false);
+ } else {
+ m_MediaObject.pause();
+ }
+ break;
+ case Phonon::PausedState:
+ case Phonon::StoppedState:
+ playButton->setIcon(playIcon);
+ if (m_MediaObject.currentSource().type() != Phonon::MediaSource::Invalid){
+ playButton->setEnabled(true);
+ rewindButton->setEnabled(true);
+ } else {
+ playButton->setEnabled(false);
+ rewindButton->setEnabled(false);
+ }
+ break;
+ case Phonon::PlayingState:
+ playButton->setEnabled(true);
+ playButton->setIcon(pauseIcon);
+ if (m_MediaObject.hasVideo())
+ m_videoWindow.show();
+ // Fall through
+ case Phonon::BufferingState:
+ rewindButton->setEnabled(true);
+ break;
+ case Phonon::LoadingState:
+ rewindButton->setEnabled(false);
+ break;
+ }
+
+}
+
+void MediaPlayer::initSettingsDialog()
+{
+ settingsDialog = new QDialog(this);
+ ui = new Ui_settings();
+ ui->setupUi(settingsDialog);
+
+ connect(ui->brightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(setBrightness(int)));
+ connect(ui->hueSlider, SIGNAL(valueChanged(int)), this, SLOT(setHue(int)));
+ connect(ui->saturationSlider, SIGNAL(valueChanged(int)), this, SLOT(setSaturation(int)));
+ connect(ui->contrastSlider , SIGNAL(valueChanged(int)), this, SLOT(setContrast(int)));
+ connect(ui->aspectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setAspect(int)));
+ connect(ui->scalemodeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setScale(int)));
+
+ ui->brightnessSlider->setValue(int(m_videoWidget->brightness() * SLIDER_RANGE));
+ ui->hueSlider->setValue(int(m_videoWidget->hue() * SLIDER_RANGE));
+ ui->saturationSlider->setValue(int(m_videoWidget->saturation() * SLIDER_RANGE));
+ ui->contrastSlider->setValue(int(m_videoWidget->contrast() * SLIDER_RANGE));
+ ui->aspectCombo->setCurrentIndex(m_videoWidget->aspectRatio());
+ ui->scalemodeCombo->setCurrentIndex(m_videoWidget->scaleMode());
+ connect(ui->effectButton, SIGNAL(clicked()), this, SLOT(configureEffect()));
+
+#ifdef Q_WS_X11
+ //Cross fading is not currently implemented in the GStreamer backend
+ ui->crossFadeSlider->setVisible(false);
+ ui->crossFadeLabel->setVisible(false);
+ ui->crossFadeLabel1->setVisible(false);
+ ui->crossFadeLabel2->setVisible(false);
+ ui->crossFadeLabel3->setVisible(false);
+#endif
+ ui->crossFadeSlider->setValue((int)(2 * m_MediaObject.transitionTime() / 1000.0f));
+
+ // Insert audio devices:
+ QList<Phonon::AudioOutputDevice> devices = Phonon::BackendCapabilities::availableAudioOutputDevices();
+ for (int i=0; i<devices.size(); i++){
+ QString itemText = devices[i].name();
+ if (!devices[i].description().isEmpty()) {
+ itemText += QString::fromLatin1(" (%1)").arg(devices[i].description());
+ }
+ ui->deviceCombo->addItem(itemText);
+ if (devices[i] == m_AudioOutput.outputDevice())
+ ui->deviceCombo->setCurrentIndex(i);
+ }
+
+ // Insert audio effects:
+ ui->audioEffectsCombo->addItem(tr("<no effect>"));
+ QList<Phonon::Effect *> currEffects = m_audioOutputPath.effects();
+ Phonon::Effect *currEffect = currEffects.size() ? currEffects[0] : 0;
+ QList<Phonon::EffectDescription> availableEffects = Phonon::BackendCapabilities::availableAudioEffects();
+ for (int i=0; i<availableEffects.size(); i++){
+ ui->audioEffectsCombo->addItem(availableEffects[i].name());
+ if (currEffect && availableEffects[i] == currEffect->description())
+ ui->audioEffectsCombo->setCurrentIndex(i+1);
+ }
+ connect(ui->audioEffectsCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(effectChanged()));
+
+}
+
+void MediaPlayer::effectChanged()
+{
+ int currentIndex = ui->audioEffectsCombo->currentIndex();
+ if (currentIndex) {
+ QList<Phonon::EffectDescription> availableEffects = Phonon::BackendCapabilities::availableAudioEffects();
+ Phonon::EffectDescription chosenEffect = availableEffects[currentIndex - 1];
+
+ QList<Phonon::Effect *> currEffects = m_audioOutputPath.effects();
+ Phonon::Effect *currentEffect = currEffects.size() ? currEffects[0] : 0;
+
+ // Deleting the running effect will stop playback, it is deleted when removed from path
+ if (nextEffect && !(currentEffect && (currentEffect->description().name() == nextEffect->description().name())))
+ delete nextEffect;
+
+ nextEffect = new Phonon::Effect(chosenEffect);
+ }
+ ui->effectButton->setEnabled(currentIndex);
+}
+
+void MediaPlayer::showSettingsDialog()
+{
+ if (!settingsDialog)
+ initSettingsDialog();
+
+ float oldBrightness = m_videoWidget->brightness();
+ float oldHue = m_videoWidget->hue();
+ float oldSaturation = m_videoWidget->saturation();
+ float oldContrast = m_videoWidget->contrast();
+ Phonon::VideoWidget::AspectRatio oldAspect = m_videoWidget->aspectRatio();
+ Phonon::VideoWidget::ScaleMode oldScale = m_videoWidget->scaleMode();
+ int currentEffect = ui->audioEffectsCombo->currentIndex();
+ settingsDialog->exec();
+
+ if (settingsDialog->result() == QDialog::Accepted){
+ m_MediaObject.setTransitionTime((int)(1000 * float(ui->crossFadeSlider->value()) / 2.0f));
+ QList<Phonon::AudioOutputDevice> devices = Phonon::BackendCapabilities::availableAudioOutputDevices();
+ m_AudioOutput.setOutputDevice(devices[ui->deviceCombo->currentIndex()]);
+ QList<Phonon::Effect *> currEffects = m_audioOutputPath.effects();
+ QList<Phonon::EffectDescription> availableEffects = Phonon::BackendCapabilities::availableAudioEffects();
+
+ if (ui->audioEffectsCombo->currentIndex() > 0){
+ Phonon::Effect *currentEffect = currEffects.size() ? currEffects[0] : 0;
+ if (!currentEffect || currentEffect->description() != nextEffect->description()){
+ foreach(Phonon::Effect *effect, currEffects) {
+ m_audioOutputPath.removeEffect(effect);
+ delete effect;
+ }
+ m_audioOutputPath.insertEffect(nextEffect);
+ }
+ } else {
+ foreach(Phonon::Effect *effect, currEffects) {
+ m_audioOutputPath.removeEffect(effect);
+ delete effect;
+ nextEffect = 0;
+ }
+ }
+ } else {
+ // Restore previous settings
+ m_videoWidget->setBrightness(oldBrightness);
+ m_videoWidget->setSaturation(oldSaturation);
+ m_videoWidget->setHue(oldHue);
+ m_videoWidget->setContrast(oldContrast);
+ m_videoWidget->setAspectRatio(oldAspect);
+ m_videoWidget->setScaleMode(oldScale);
+ ui->audioEffectsCombo->setCurrentIndex(currentEffect);
+ }
+}
+
+void MediaPlayer::initVideoWindow()
+{
+ QVBoxLayout *videoLayout = new QVBoxLayout();
+ videoLayout->addWidget(m_videoWidget);
+ videoLayout->setContentsMargins(0, 0, 0, 0);
+ m_videoWindow.setLayout(videoLayout);
+ m_videoWindow.setMinimumSize(100, 100);
+}
+
+
+void MediaPlayer::configureEffect()
+{
+ if (!nextEffect)
+ return;
+
+
+ QList<Phonon::Effect *> currEffects = m_audioOutputPath.effects();
+ const QList<Phonon::EffectDescription> availableEffects = Phonon::BackendCapabilities::availableAudioEffects();
+ if (ui->audioEffectsCombo->currentIndex() > 0) {
+ Phonon::EffectDescription chosenEffect = availableEffects[ui->audioEffectsCombo->currentIndex() - 1];
+
+ QDialog effectDialog;
+ effectDialog.setWindowTitle(tr("Configure effect"));
+ QVBoxLayout *topLayout = new QVBoxLayout(&effectDialog);
+
+ QLabel *description = new QLabel("<b>Description:</b><br>" + chosenEffect.description(), &effectDialog);
+ description->setWordWrap(true);
+ topLayout->addWidget(description);
+
+ QScrollArea *scrollArea = new QScrollArea(&effectDialog);
+ topLayout->addWidget(scrollArea);
+
+ QVariantList savedParamValues;
+ foreach(Phonon::EffectParameter param, nextEffect->parameters()) {
+ savedParamValues << nextEffect->parameterValue(param);
+ }
+
+ QWidget *scrollWidget = new Phonon::EffectWidget(nextEffect);
+ scrollWidget->setMinimumWidth(320);
+ scrollWidget->setContentsMargins(10, 10, 10,10);
+ scrollArea->setWidget(scrollWidget);
+
+ QDialogButtonBox *bbox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &effectDialog);
+ connect(bbox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), &effectDialog, SLOT(accept()));
+ connect(bbox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), &effectDialog, SLOT(reject()));
+ topLayout->addWidget(bbox);
+
+ effectDialog.exec();
+
+ if (effectDialog.result() != QDialog::Accepted) {
+ //we need to restore the paramaters values
+ int currentIndex = 0;
+ foreach(Phonon::EffectParameter param, nextEffect->parameters()) {
+ nextEffect->setParameterValue(param, savedParamValues.at(currentIndex++));
+ }
+
+ }
+ }
+}
+
+void MediaPlayer::handleDrop(QDropEvent *e)
+{
+ QList<QUrl> urls = e->mimeData()->urls();
+ if (e->proposedAction() == Qt::MoveAction){
+ // Just add to the queue:
+ for (int i=0; i<urls.size(); i++)
+ m_MediaObject.enqueue(Phonon::MediaSource(urls[i].toLocalFile()));
+ } else {
+ // Create new queue:
+ m_MediaObject.clearQueue();
+ if (urls.size() > 0) {
+ QString fileName = urls[0].toLocalFile();
+ QDir dir(fileName);
+ if (dir.exists()) {
+ dir.setFilter(QDir::Files);
+ QStringList entries = dir.entryList();
+ if (entries.size() > 0) {
+ setFile(fileName + QDir::separator() + entries[0]);
+ for (int i=1; i< entries.size(); ++i)
+ m_MediaObject.enqueue(fileName + QDir::separator() + entries[i]);
+ }
+ } else {
+ setFile(fileName);
+ for (int i=1; i<urls.size(); i++)
+ m_MediaObject.enqueue(Phonon::MediaSource(urls[i].toLocalFile()));
+ }
+ }
+ }
+ forwardButton->setEnabled(m_MediaObject.queue().size() > 0);
+ m_MediaObject.play();
+}
+
+void MediaPlayer::dropEvent(QDropEvent *e)
+{
+ if (e->mimeData()->hasUrls() && e->proposedAction() != Qt::LinkAction) {
+ e->acceptProposedAction();
+ handleDrop(e);
+ } else {
+ e->ignore();
+ }
+}
+
+void MediaPlayer::dragEnterEvent(QDragEnterEvent *e)
+{
+ dragMoveEvent(e);
+}
+
+void MediaPlayer::dragMoveEvent(QDragMoveEvent *e)
+{
+ if (e->mimeData()->hasUrls()) {
+ if (e->proposedAction() == Qt::CopyAction || e->proposedAction() == Qt::MoveAction){
+ e->acceptProposedAction();
+ }
+ }
+}
+
+void MediaPlayer::playPause()
+{
+ if (m_MediaObject.state() == Phonon::PlayingState)
+ m_MediaObject.pause();
+ else {
+ if (m_MediaObject.currentTime() == m_MediaObject.totalTime())
+ m_MediaObject.seek(0);
+ m_MediaObject.play();
+ }
+}
+
+void MediaPlayer::setFile(const QString &fileName)
+{
+ setWindowTitle(fileName.right(fileName.length() - fileName.lastIndexOf('/') - 1));
+ m_MediaObject.setCurrentSource(Phonon::MediaSource(fileName));
+ m_MediaObject.play();
+}
+
+void MediaPlayer::openFile()
+{
+ QStringList fileNames = QFileDialog::getOpenFileNames(this);
+ m_MediaObject.clearQueue();
+ if (fileNames.size() > 0) {
+ QString fileName = fileNames[0];
+ setFile(fileName);
+ for (int i=1; i<fileNames.size(); i++)
+ m_MediaObject.enqueue(Phonon::MediaSource(fileNames[i]));
+ }
+ forwardButton->setEnabled(m_MediaObject.queue().size() > 0);
+}
+
+void MediaPlayer::bufferStatus(int percent)
+{
+ if (percent == 0 || percent == 100)
+ progressLabel->setText(QString());
+ else {
+ QString str = QString::fromLatin1("(%1%)").arg(percent);
+ progressLabel->setText(str);
+ }
+}
+
+void MediaPlayer::setSaturation(int val)
+{
+ m_videoWidget->setSaturation(val / qreal(SLIDER_RANGE));
+}
+
+void MediaPlayer::setHue(int val)
+{
+ m_videoWidget->setHue(val / qreal(SLIDER_RANGE));
+}
+
+void MediaPlayer::setAspect(int val)
+{
+ m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio(val));
+}
+
+void MediaPlayer::setScale(int val)
+{
+ m_videoWidget->setScaleMode(Phonon::VideoWidget::ScaleMode(val));
+}
+
+void MediaPlayer::setBrightness(int val)
+{
+ m_videoWidget->setBrightness(val / qreal(SLIDER_RANGE));
+}
+
+void MediaPlayer::setContrast(int val)
+{
+ m_videoWidget->setContrast(val / qreal(SLIDER_RANGE));
+}
+
+void MediaPlayer::updateInfo()
+{
+ int maxLength = 30;
+ QString font = "<font color=#ffeeaa>";
+ QString fontmono = "<font family=\"monospace,courier new\" color=#ffeeaa>";
+
+ QMap <QString, QString> metaData = m_MediaObject.metaData();
+ QString trackArtist = metaData.value("ARTIST");
+ if (trackArtist.length() > maxLength)
+ trackArtist = trackArtist.left(maxLength) + "...";
+
+ QString trackTitle = metaData.value("TITLE");
+ int trackBitrate = metaData.value("BITRATE").toInt();
+
+ QString fileName;
+ if (m_MediaObject.currentSource().type() == Phonon::MediaSource::Url) {
+ fileName = m_MediaObject.currentSource().url().toString();
+ } else {
+ fileName = m_MediaObject.currentSource().fileName();
+ fileName = fileName.right(fileName.length() - fileName.lastIndexOf('/') - 1);
+ if (fileName.length() > maxLength)
+ fileName = fileName.left(maxLength) + "...";
+ }
+
+ QString title;
+ if (!trackTitle.isEmpty()) {
+ if (trackTitle.length() > maxLength)
+ trackTitle = trackTitle.left(maxLength) + "...";
+ title = "Title: " + font + trackTitle + "<br></font>";
+ } else if (!fileName.isEmpty()) {
+ if (fileName.length() > maxLength)
+ fileName = fileName.left(maxLength) + "...";
+ title = font + fileName + "</font>";
+ if (m_MediaObject.currentSource().type() == Phonon::MediaSource::Url) {
+ title.prepend("Url: ");
+ } else {
+ title.prepend("File: ");
+ }
+ }
+
+ QString artist;
+ if (!trackArtist.isEmpty())
+ artist = "Artist: " + font + trackArtist + "</font>";
+
+ QString bitrate;
+ if (trackBitrate != 0)
+ bitrate = "<br>Bitrate: " + font + QString::number(trackBitrate/1000) + "kbit</font>";
+
+ info->setText(title + artist + bitrate);
+}
+
+void MediaPlayer::updateTime()
+{
+ long len = m_MediaObject.totalTime();
+ long pos = m_MediaObject.currentTime();
+ QString timeString;
+ if (pos || len)
+ {
+ int sec = pos/1000;
+ int min = sec/60;
+ int hour = min/60;
+ int msec = pos;
+
+ QTime playTime(hour%60, min%60, sec%60, msec%1000);
+ sec = len / 1000;
+ min = sec / 60;
+ hour = min / 60;
+ msec = len;
+
+ QTime stopTime(hour%60, min%60, sec%60, msec%1000);
+ QString timeFormat = "m:ss";
+ if (hour > 0)
+ timeFormat = "h:mm:ss";
+ timeString = playTime.toString(timeFormat);
+ if (len)
+ timeString += " / " + stopTime.toString(timeFormat);
+ }
+ timeLabel->setText(timeString);
+}
+
+void MediaPlayer::rewind()
+{
+ m_MediaObject.seek(0);
+}
+
+void MediaPlayer::forward()
+{
+ QList<Phonon::MediaSource> queue = m_MediaObject.queue();
+ if (queue.size() > 0) {
+ m_MediaObject.setCurrentSource(queue[0]);
+ forwardButton->setEnabled(queue.size() > 1);
+ m_MediaObject.play();
+ }
+}
+
+void MediaPlayer::openUrl()
+{
+ QSettings settings;
+ settings.beginGroup(QLatin1String("BrowserMainWindow"));
+ QString sourceURL = settings.value("location").toString();
+ bool ok = false;
+ sourceURL = QInputDialog::getText(this, tr("Open Location"), tr("Please enter a valid address here:"), QLineEdit::Normal, sourceURL, &ok);
+ if (ok && !sourceURL.isEmpty()) {
+ setWindowTitle(sourceURL.right(sourceURL.length() - sourceURL.lastIndexOf('/') - 1));
+ m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(sourceURL.toUtf8())));
+ m_MediaObject.play();
+ settings.setValue("location", sourceURL);
+ }
+}
+
+void MediaPlayer::finished()
+{
+}
+
+void MediaPlayer::showContextMenu(const QPoint &p)
+{
+ fileMenu->popup(m_videoWidget->isFullScreen() ? p : mapToGlobal(p));
+}
+
+void MediaPlayer::scaleChanged(QAction *act)
+{
+ if (act->text() == tr("Scale and crop"))
+ m_videoWidget->setScaleMode(Phonon::VideoWidget::ScaleAndCrop);
+ else
+ m_videoWidget->setScaleMode(Phonon::VideoWidget::FitInView);
+}
+
+void MediaPlayer::aspectChanged(QAction *act)
+{
+ if (act->text() == tr("16/9"))
+ m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio16_9);
+ else if (act->text() == tr("Scale"))
+ m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatioWidget);
+ else if (act->text() == tr("4/3"))
+ m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3);
+ else
+ m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatioAuto);
+}
+
diff --git a/demos/mediaplayer/mediaplayer.h b/demos/mediaplayer/mediaplayer.h
new file mode 100644
index 0000000..d162435
--- /dev/null
+++ b/demos/mediaplayer/mediaplayer.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+***************************************************************************/
+
+#ifndef MEDIALAYER_H
+#define MEDIAPLAYER_H
+
+#include <QtGui/QWidget>
+#include <QtGui/QApplication>
+#include <QtCore/QTimerEvent>
+#include <QtGui/QShowEvent>
+#include <QtGui/QIcon>
+
+#include <Phonon/AudioOutput>
+#include <Phonon/BackendCapabilities>
+#include <Phonon/Effect>
+#include <Phonon/EffectParameter>
+#include <Phonon/EffectWidget>
+#include <Phonon/MediaObject>
+#include <Phonon/SeekSlider>
+#include <Phonon/VideoWidget>
+#include <Phonon/VolumeSlider>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QSlider;
+class QTextEdit;
+class QMenu;
+class Ui_settings;
+QT_END_NAMESPACE
+
+class MediaPlayer :
+ public QWidget
+{
+ Q_OBJECT
+public:
+ MediaPlayer(const QString &);
+
+ void dragEnterEvent(QDragEnterEvent *e);
+ void dragMoveEvent(QDragMoveEvent *e);
+ void dropEvent(QDropEvent *e);
+ void handleDrop(QDropEvent *e);
+ void setFile(const QString &text);
+ void initVideoWindow();
+ void initSettingsDialog();
+
+public slots:
+ void openFile();
+ void rewind();
+ void forward();
+ void updateInfo();
+ void updateTime();
+ void finished();
+ void playPause();
+ void scaleChanged(QAction *);
+ void aspectChanged(QAction *);
+
+private slots:
+ void setAspect(int);
+ void setScale(int);
+ void setSaturation(int);
+ void setContrast(int);
+ void setHue(int);
+ void setBrightness(int);
+ void stateChanged(Phonon::State newstate, Phonon::State oldstate);
+ void effectChanged();
+ void showSettingsDialog();
+ void showContextMenu(const QPoint &);
+ void bufferStatus(int percent);
+ void openUrl();
+ void configureEffect();
+
+private:
+ QIcon playIcon;
+ QIcon pauseIcon;
+ QMenu *fileMenu;
+ QPushButton *playButton;
+ QPushButton *rewindButton;
+ QPushButton *forwardButton;
+ Phonon::SeekSlider *slider;
+ QLabel *timeLabel;
+ QLabel *progressLabel;
+ Phonon::VolumeSlider *volume;
+ QSlider *m_hueSlider;
+ QSlider *m_satSlider;
+ QSlider *m_contSlider;
+ QLabel *info;
+ Phonon::Effect *nextEffect;
+ QDialog *settingsDialog;
+ Ui_settings *ui;
+
+ QWidget m_videoWindow;
+ Phonon::MediaObject m_MediaObject;
+ Phonon::AudioOutput m_AudioOutput;
+ Phonon::VideoWidget *m_videoWidget;
+ Phonon::Path m_audioOutputPath;
+};
+
+#endif //MEDIAPLAYER_H
diff --git a/demos/mediaplayer/mediaplayer.pro b/demos/mediaplayer/mediaplayer.pro
new file mode 100644
index 0000000..c64abd9
--- /dev/null
+++ b/demos/mediaplayer/mediaplayer.pro
@@ -0,0 +1,28 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Aug 23 18:02:14 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . build src ui
+
+QT += phonon
+
+FORMS += settings.ui
+RESOURCES += mediaplayer.qrc
+
+!win32:CONFIG += CONSOLE
+
+SOURCES += main.cpp mediaplayer.cpp
+HEADERS += mediaplayer.h
+
+target.path = $$[QT_INSTALL_DEMOS]/mediaplayer
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.html *.doc images
+sources.path = $$[QT_INSTALL_DEMOS]/mediaplayer
+INSTALLS += target sources
+
+wince*{
+DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
+}
+
+
diff --git a/demos/mediaplayer/mediaplayer.qrc b/demos/mediaplayer/mediaplayer.qrc
new file mode 100644
index 0000000..bcdf404
--- /dev/null
+++ b/demos/mediaplayer/mediaplayer.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/screen.png</file>
+</qresource>
+</RCC>
diff --git a/demos/mediaplayer/settings.ui b/demos/mediaplayer/settings.ui
new file mode 100644
index 0000000..d2cedd4
--- /dev/null
+++ b/demos/mediaplayer/settings.ui
@@ -0,0 +1,464 @@
+<ui version="4.0" >
+ <class>settings</class>
+ <widget class="QDialog" name="settings" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>360</width>
+ <height>362</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Video options:</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Contrast:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QSlider" name="contrastSlider" >
+ <property name="minimum" >
+ <number>-8</number>
+ </property>
+ <property name="maximum" >
+ <number>8</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ <property name="tickInterval" >
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_8" >
+ <property name="text" >
+ <string>Brightness:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2" >
+ <widget class="QSlider" name="brightnessSlider" >
+ <property name="minimum" >
+ <number>-8</number>
+ </property>
+ <property name="maximum" >
+ <number>8</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ <property name="tickInterval" >
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>Saturation:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <widget class="QSlider" name="saturationSlider" >
+ <property name="minimum" >
+ <number>-8</number>
+ </property>
+ <property name="maximum" >
+ <number>8</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ <property name="tickInterval" >
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Hue:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="2" >
+ <widget class="QSlider" name="hueSlider" >
+ <property name="minimum" >
+ <number>-8</number>
+ </property>
+ <property name="maximum" >
+ <number>8</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ <property name="tickInterval" >
+ <number>4</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="2" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Aspect ratio:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2" >
+ <widget class="QComboBox" name="aspectCombo" >
+ <property name="minimumSize" >
+ <size>
+ <width>180</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Auto</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Stretch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>4/3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>16/9</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2" >
+ <widget class="QLabel" name="label_11" >
+ <property name="text" >
+ <string>Scale Mode:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2" >
+ <widget class="QComboBox" name="scalemodeCombo" >
+ <property name="minimumSize" >
+ <size>
+ <width>180</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Fit in view</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Scale and crop</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Audio options:</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Audio device:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="deviceCombo" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QLabel" name="label_6" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Audio effect:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="audioEffectsCombo" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Maximum" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="effectButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Setup</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="crossFadeLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Cross fade:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QSlider" name="crossFadeSlider" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <number>-20</number>
+ </property>
+ <property name="maximum" >
+ <number>20</number>
+ </property>
+ <property name="singleStep" >
+ <number>1</number>
+ </property>
+ <property name="pageStep" >
+ <number>2</number>
+ </property>
+ <property name="value" >
+ <number>0</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="crossFadeLabel1" >
+ <property name="font" >
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text" >
+ <string>-10 Sec</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="crossFadeLabel2" >
+ <property name="font" >
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="crossFadeLabel3" >
+ <property name="font" >
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text" >
+ <string>10 Sec</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>settings</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>settings</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/demos/pathstroke/main.cpp b/demos/pathstroke/main.cpp
new file mode 100644
index 0000000..613d835
--- /dev/null
+++ b/demos/pathstroke/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pathstroke.h"
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(pathstroke);
+
+ QApplication app(argc, argv);
+
+ bool smallScreen = false;
+ for (int i=0; i<argc; i++)
+ if (QString(argv[i]) == "-small-screen")
+ smallScreen = true;
+
+ PathStrokeWidget pathStrokeWidget(smallScreen);
+ QStyle *arthurStyle = new ArthurStyle();
+ pathStrokeWidget.setStyle(arthurStyle);
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget);
+ foreach (QWidget *w, widgets)
+ w->setStyle(arthurStyle);
+
+ if (smallScreen)
+ pathStrokeWidget.showFullScreen();
+ else
+ pathStrokeWidget.show();
+
+ return app.exec();
+}
diff --git a/demos/pathstroke/pathstroke.cpp b/demos/pathstroke/pathstroke.cpp
new file mode 100644
index 0000000..d079490
--- /dev/null
+++ b/demos/pathstroke/pathstroke.cpp
@@ -0,0 +1,599 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pathstroke.h"
+#include "arthurstyle.h"
+#include "arthurwidgets.h"
+
+#include <stdio.h>
+
+extern void draw_round_rect(QPainter *p, const QRect &bounds, int radius);
+
+
+PathStrokeControls::PathStrokeControls(QWidget* parent, PathStrokeRenderer* renderer, bool smallScreen)
+ : QWidget(parent)
+{
+ m_renderer = renderer;
+
+ if (smallScreen)
+ layoutForSmallScreens();
+ else
+ layoutForDesktop();
+}
+
+void PathStrokeControls::createCommonControls(QWidget* parent)
+{
+ m_capGroup = new QGroupBox(parent);
+ m_capGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ QRadioButton *flatCap = new QRadioButton(m_capGroup);
+ QRadioButton *squareCap = new QRadioButton(m_capGroup);
+ QRadioButton *roundCap = new QRadioButton(m_capGroup);
+ m_capGroup->setTitle(tr("Cap Style"));
+ flatCap->setText(tr("Flat"));
+ squareCap->setText(tr("Square"));
+ roundCap->setText(tr("Round"));
+ flatCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ squareCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ roundCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+ m_joinGroup = new QGroupBox(parent);
+ m_joinGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ QRadioButton *bevelJoin = new QRadioButton(m_joinGroup);
+ QRadioButton *miterJoin = new QRadioButton(m_joinGroup);
+ QRadioButton *roundJoin = new QRadioButton(m_joinGroup);
+ m_joinGroup->setTitle(tr("Join Style"));
+ bevelJoin->setText(tr("Bevel"));
+ miterJoin->setText(tr("Miter"));
+ roundJoin->setText(tr("Round"));
+
+ m_styleGroup = new QGroupBox(parent);
+ m_styleGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ QRadioButton *solidLine = new QRadioButton(m_styleGroup);
+ QRadioButton *dashLine = new QRadioButton(m_styleGroup);
+ QRadioButton *dotLine = new QRadioButton(m_styleGroup);
+ QRadioButton *dashDotLine = new QRadioButton(m_styleGroup);
+ QRadioButton *dashDotDotLine = new QRadioButton(m_styleGroup);
+ QRadioButton *customDashLine = new QRadioButton(m_styleGroup);
+ m_styleGroup->setTitle(tr("Pen Style"));
+
+ QPixmap line_solid(":res/images/line_solid.png");
+ solidLine->setIcon(line_solid);
+ solidLine->setIconSize(line_solid.size());
+ QPixmap line_dashed(":res/images/line_dashed.png");
+ dashLine->setIcon(line_dashed);
+ dashLine->setIconSize(line_dashed.size());
+ QPixmap line_dotted(":res/images/line_dotted.png");
+ dotLine->setIcon(line_dotted);
+ dotLine->setIconSize(line_dotted.size());
+ QPixmap line_dash_dot(":res/images/line_dash_dot.png");
+ dashDotLine->setIcon(line_dash_dot);
+ dashDotLine->setIconSize(line_dash_dot.size());
+ QPixmap line_dash_dot_dot(":res/images/line_dash_dot_dot.png");
+ dashDotDotLine->setIcon(line_dash_dot_dot);
+ dashDotDotLine->setIconSize(line_dash_dot_dot.size());
+ customDashLine->setText(tr("Custom"));
+
+ int fixedHeight = bevelJoin->sizeHint().height();
+ solidLine->setFixedHeight(fixedHeight);
+ dashLine->setFixedHeight(fixedHeight);
+ dotLine->setFixedHeight(fixedHeight);
+ dashDotLine->setFixedHeight(fixedHeight);
+ dashDotDotLine->setFixedHeight(fixedHeight);
+
+ m_pathModeGroup = new QGroupBox(parent);
+ m_pathModeGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ QRadioButton *curveMode = new QRadioButton(m_pathModeGroup);
+ QRadioButton *lineMode = new QRadioButton(m_pathModeGroup);
+ m_pathModeGroup->setTitle(tr("Line Style"));
+ curveMode->setText(tr("Curves"));
+ lineMode->setText(tr("Lines"));
+
+
+ // Layouts
+ QVBoxLayout *capGroupLayout = new QVBoxLayout(m_capGroup);
+ capGroupLayout->addWidget(flatCap);
+ capGroupLayout->addWidget(squareCap);
+ capGroupLayout->addWidget(roundCap);
+
+ QVBoxLayout *joinGroupLayout = new QVBoxLayout(m_joinGroup);
+ joinGroupLayout->addWidget(bevelJoin);
+ joinGroupLayout->addWidget(miterJoin);
+ joinGroupLayout->addWidget(roundJoin);
+
+ QVBoxLayout *styleGroupLayout = new QVBoxLayout(m_styleGroup);
+ styleGroupLayout->addWidget(solidLine);
+ styleGroupLayout->addWidget(dashLine);
+ styleGroupLayout->addWidget(dotLine);
+ styleGroupLayout->addWidget(dashDotLine);
+ styleGroupLayout->addWidget(dashDotDotLine);
+ styleGroupLayout->addWidget(customDashLine);
+
+ QVBoxLayout *pathModeGroupLayout = new QVBoxLayout(m_pathModeGroup);
+ pathModeGroupLayout->addWidget(curveMode);
+ pathModeGroupLayout->addWidget(lineMode);
+
+
+ // Connections
+ connect(flatCap, SIGNAL(clicked()), m_renderer, SLOT(setFlatCap()));
+ connect(squareCap, SIGNAL(clicked()), m_renderer, SLOT(setSquareCap()));
+ connect(roundCap, SIGNAL(clicked()), m_renderer, SLOT(setRoundCap()));
+
+ connect(bevelJoin, SIGNAL(clicked()), m_renderer, SLOT(setBevelJoin()));
+ connect(miterJoin, SIGNAL(clicked()), m_renderer, SLOT(setMiterJoin()));
+ connect(roundJoin, SIGNAL(clicked()), m_renderer, SLOT(setRoundJoin()));
+
+ connect(curveMode, SIGNAL(clicked()), m_renderer, SLOT(setCurveMode()));
+ connect(lineMode, SIGNAL(clicked()), m_renderer, SLOT(setLineMode()));
+
+ connect(solidLine, SIGNAL(clicked()), m_renderer, SLOT(setSolidLine()));
+ connect(dashLine, SIGNAL(clicked()), m_renderer, SLOT(setDashLine()));
+ connect(dotLine, SIGNAL(clicked()), m_renderer, SLOT(setDotLine()));
+ connect(dashDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotLine()));
+ connect(dashDotDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotDotLine()));
+ connect(customDashLine, SIGNAL(clicked()), m_renderer, SLOT(setCustomDashLine()));
+
+ // Set the defaults:
+ flatCap->setChecked(true);
+ bevelJoin->setChecked(true);
+ curveMode->setChecked(true);
+ solidLine->setChecked(true);
+}
+
+
+void PathStrokeControls::layoutForDesktop()
+{
+ QGroupBox *mainGroup = new QGroupBox(this);
+ mainGroup->setFixedWidth(180);
+ mainGroup->setTitle(tr("Path Stroking"));
+
+ createCommonControls(mainGroup);
+
+ QGroupBox* penWidthGroup = new QGroupBox(mainGroup);
+ QSlider *penWidth = new QSlider(Qt::Horizontal, penWidthGroup);
+ penWidth->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ penWidthGroup->setTitle(tr("Pen Width"));
+ penWidth->setRange(0, 500);
+
+ QPushButton *animated = new QPushButton(mainGroup);
+ animated->setText(tr("Animate"));
+ animated->setCheckable(true);
+
+ QPushButton *showSourceButton = new QPushButton(mainGroup);
+ showSourceButton->setText(tr("Show Source"));
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(mainGroup);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(m_renderer->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+ QPushButton *whatsThisButton = new QPushButton(mainGroup);
+ whatsThisButton->setText(tr("What's This?"));
+ whatsThisButton->setCheckable(true);
+
+
+ // Layouts:
+ QVBoxLayout *penWidthLayout = new QVBoxLayout(penWidthGroup);
+ penWidthLayout->addWidget(penWidth);
+
+ QVBoxLayout * mainLayout = new QVBoxLayout(this);
+ mainLayout->setMargin(0);
+ mainLayout->addWidget(mainGroup);
+
+ QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
+ mainGroupLayout->setMargin(3);
+ mainGroupLayout->addWidget(m_capGroup);
+ mainGroupLayout->addWidget(m_joinGroup);
+ mainGroupLayout->addWidget(m_styleGroup);
+ mainGroupLayout->addWidget(penWidthGroup);
+ mainGroupLayout->addWidget(m_pathModeGroup);
+ mainGroupLayout->addWidget(animated);
+ mainGroupLayout->addStretch(1);
+ mainGroupLayout->addWidget(showSourceButton);
+#ifdef QT_OPENGL_SUPPORT
+ mainGroupLayout->addWidget(enableOpenGLButton);
+#endif
+ mainGroupLayout->addWidget(whatsThisButton);
+
+
+ // Set up connections
+ connect(animated, SIGNAL(toggled(bool)),
+ m_renderer, SLOT(setAnimation(bool)));
+
+ connect(penWidth, SIGNAL(valueChanged(int)),
+ m_renderer, SLOT(setPenWidth(int)));
+
+ connect(showSourceButton, SIGNAL(clicked()), m_renderer, SLOT(showSource()));
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+#endif
+ connect(whatsThisButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setDescriptionEnabled(bool)));
+ connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
+ whatsThisButton, SLOT(setChecked(bool)));
+
+
+ // Set the defaults
+ animated->setChecked(true);
+ penWidth->setValue(50);
+
+}
+
+void PathStrokeControls::layoutForSmallScreens()
+{
+ createCommonControls(this);
+
+ m_capGroup->layout()->setMargin(0);
+ m_joinGroup->layout()->setMargin(0);
+ m_styleGroup->layout()->setMargin(0);
+ m_pathModeGroup->layout()->setMargin(0);
+
+ QPushButton* okBtn = new QPushButton(tr("OK"), this);
+ okBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ okBtn->setMinimumSize(100,okBtn->minimumSize().height());
+
+ QPushButton* quitBtn = new QPushButton(tr("Quit"), this);
+ quitBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ quitBtn->setMinimumSize(100, okBtn->minimumSize().height());
+
+ QLabel *penWidthLabel = new QLabel(tr(" Width:"));
+ QSlider *penWidth = new QSlider(Qt::Horizontal, this);
+ penWidth->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ penWidth->setRange(0, 500);
+
+#ifdef QT_OPENGL_SUPPORT
+ QPushButton *enableOpenGLButton = new QPushButton(this);
+ enableOpenGLButton->setText(tr("Use OpenGL"));
+ enableOpenGLButton->setCheckable(true);
+ enableOpenGLButton->setChecked(m_renderer->usesOpenGL());
+ if (!QGLFormat::hasOpenGL())
+ enableOpenGLButton->hide();
+#endif
+
+ // Layouts:
+ QHBoxLayout *penWidthLayout = new QHBoxLayout(0);
+ penWidthLayout->addWidget(penWidthLabel, 0, Qt::AlignRight);
+ penWidthLayout->addWidget(penWidth);
+
+ QVBoxLayout *leftLayout = new QVBoxLayout(0);
+ leftLayout->addWidget(m_capGroup);
+ leftLayout->addWidget(m_joinGroup);
+#ifdef QT_OPENGL_SUPPORT
+ leftLayout->addWidget(enableOpenGLButton);
+#endif
+ leftLayout->addLayout(penWidthLayout);
+
+ QVBoxLayout *rightLayout = new QVBoxLayout(0);
+ rightLayout->addWidget(m_styleGroup);
+ rightLayout->addWidget(m_pathModeGroup);
+
+ QGridLayout *mainLayout = new QGridLayout(this);
+ mainLayout->setMargin(0);
+
+ // Add spacers around the form items so we don't look stupid at higher resolutions
+ mainLayout->addItem(new QSpacerItem(0,0), 0, 0, 1, 4);
+ mainLayout->addItem(new QSpacerItem(0,0), 1, 0, 2, 1);
+ mainLayout->addItem(new QSpacerItem(0,0), 1, 3, 2, 1);
+ mainLayout->addItem(new QSpacerItem(0,0), 3, 0, 1, 4);
+
+ mainLayout->addLayout(leftLayout, 1, 1);
+ mainLayout->addLayout(rightLayout, 1, 2);
+ mainLayout->addWidget(quitBtn, 2, 1, Qt::AlignHCenter | Qt::AlignTop);
+ mainLayout->addWidget(okBtn, 2, 2, Qt::AlignHCenter | Qt::AlignTop);
+
+#ifdef QT_OPENGL_SUPPORT
+ connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+#endif
+
+ connect(penWidth, SIGNAL(valueChanged(int)), m_renderer, SLOT(setPenWidth(int)));
+ connect(quitBtn, SIGNAL(clicked()), this, SLOT(emitQuitSignal()));
+ connect(okBtn, SIGNAL(clicked()), this, SLOT(emitOkSignal()));
+
+ m_renderer->setAnimation(true);
+ penWidth->setValue(50);
+}
+
+void PathStrokeControls::emitQuitSignal()
+{ emit quitPressed(); }
+
+void PathStrokeControls::emitOkSignal()
+{ emit okPressed(); }
+
+
+PathStrokeWidget::PathStrokeWidget(bool smallScreen)
+{
+ setWindowTitle(tr("Path Stroking"));
+
+ // Widget construction and property setting
+ m_renderer = new PathStrokeRenderer(this, smallScreen);
+
+ m_controls = new PathStrokeControls(0, m_renderer, smallScreen);
+
+ // Layouting
+ QHBoxLayout *viewLayout = new QHBoxLayout(this);
+ viewLayout->addWidget(m_renderer);
+
+ if (!smallScreen)
+ viewLayout->addWidget(m_controls);
+
+ m_renderer->loadSourceFile(":res/pathstroke/pathstroke.cpp");
+ m_renderer->loadDescription(":res/pathstroke/pathstroke.html");
+
+ connect(m_renderer, SIGNAL(clicked()), this, SLOT(showControls()));
+ connect(m_controls, SIGNAL(okPressed()), this, SLOT(hideControls()));
+ connect(m_controls, SIGNAL(quitPressed()), QApplication::instance(), SLOT(quit()));
+}
+
+
+void PathStrokeWidget::showControls()
+{
+ m_controls->showFullScreen();
+}
+
+
+void PathStrokeWidget::hideControls()
+{
+ m_controls->hide();
+}
+
+
+void PathStrokeWidget::setStyle( QStyle * style )
+{
+ QWidget::setStyle(style);
+ if (m_controls != 0)
+ {
+ m_controls->setStyle(style);
+
+ QList<QWidget *> widgets = qFindChildren<QWidget *>(m_controls);
+ foreach (QWidget *w, widgets)
+ w->setStyle(style);
+ }
+}
+
+
+PathStrokeRenderer::PathStrokeRenderer(QWidget *parent, bool smallScreen)
+ : ArthurFrame(parent)
+{
+ m_smallScreen = smallScreen;
+ m_pointSize = 10;
+ m_activePoint = -1;
+ m_capStyle = Qt::FlatCap;
+ m_joinStyle = Qt::BevelJoin;
+ m_pathMode = CurveMode;
+ m_penWidth = 1;
+ m_penStyle = Qt::SolidLine;
+ m_wasAnimated = true;
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+}
+
+void PathStrokeRenderer::paint(QPainter *painter)
+{
+ if (m_points.isEmpty())
+ initializePoints();
+
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ QPalette pal = palette();
+ painter->setPen(Qt::NoPen);
+
+ // Construct the path
+ QPainterPath path;
+ path.moveTo(m_points.at(0));
+
+ if (m_pathMode == LineMode) {
+ for (int i=1; i<m_points.size(); ++i) {
+ path.lineTo(m_points.at(i));
+ }
+ } else {
+ int i=1;
+ while (i + 2 < m_points.size()) {
+ path.cubicTo(m_points.at(i), m_points.at(i+1), m_points.at(i+2));
+ i += 3;
+ }
+ while (i < m_points.size()) {
+ path.lineTo(m_points.at(i));
+ ++i;
+ }
+ }
+
+ // Draw the path
+ {
+ QColor lg = Qt::red;
+
+ // The "custom" pen
+ if (m_penStyle == Qt::NoPen) {
+ QPainterPathStroker stroker;
+ stroker.setWidth(m_penWidth);
+ stroker.setJoinStyle(m_joinStyle);
+ stroker.setCapStyle(m_capStyle);
+
+ QVector<qreal> dashes;
+ qreal space = 4;
+ dashes << 1 << space
+ << 3 << space
+ << 9 << space
+ << 27 << space
+ << 9 << space
+ << 3 << space;
+ stroker.setDashPattern(dashes);
+ QPainterPath stroke = stroker.createStroke(path);
+ painter->fillPath(stroke, lg);
+
+ } else {
+ QPen pen(lg, m_penWidth, m_penStyle, m_capStyle, m_joinStyle);
+ painter->strokePath(path, pen);
+ }
+ }
+
+ if (1) {
+ // Draw the control points
+ painter->setPen(QColor(50, 100, 120, 200));
+ painter->setBrush(QColor(200, 200, 210, 120));
+ for (int i=0; i<m_points.size(); ++i) {
+ QPointF pos = m_points.at(i);
+ painter->drawEllipse(QRectF(pos.x() - m_pointSize,
+ pos.y() - m_pointSize,
+ m_pointSize*2, m_pointSize*2));
+ }
+ painter->setPen(QPen(Qt::lightGray, 0, Qt::SolidLine));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawPolyline(m_points);
+ }
+
+}
+
+void PathStrokeRenderer::initializePoints()
+{
+ const int count = 7;
+ m_points.clear();
+ m_vectors.clear();
+
+ QMatrix m;
+ qreal rot = 360 / count;
+ QPointF center(width() / 2, height() / 2);
+ QMatrix vm;
+ vm.shear(2, -1);
+ vm.scale(3, 3);
+
+ for (int i=0; i<count; ++i) {
+ m_vectors << QPointF(.1f, .25f) * (m * vm);
+ m_points << QPointF(0, 100) * m + center;
+ m.rotate(rot);
+ }
+}
+
+void PathStrokeRenderer::updatePoints()
+{
+ qreal pad = 10;
+ qreal left = pad;
+ qreal right = width() - pad;
+ qreal top = pad;
+ qreal bottom = height() - pad;
+
+ Q_ASSERT(m_points.size() == m_vectors.size());
+ for (int i=0; i<m_points.size(); ++i) {
+
+ if (i == m_activePoint)
+ continue;
+
+ QPointF pos = m_points.at(i);
+ QPointF vec = m_vectors.at(i);
+ pos += vec;
+ if (pos.x() < left || pos.x() > right) {
+ vec.setX(-vec.x());
+ pos.setX(pos.x() < left ? left : right);
+ } if (pos.y() < top || pos.y() > bottom) {
+ vec.setY(-vec.y());
+ pos.setY(pos.y() < top ? top : bottom);
+ }
+ m_points[i] = pos;
+ m_vectors[i] = vec;
+ }
+ update();
+}
+
+void PathStrokeRenderer::mousePressEvent(QMouseEvent *e)
+{
+ setDescriptionEnabled(false);
+ m_activePoint = -1;
+ qreal distance = -1;
+ for (int i=0; i<m_points.size(); ++i) {
+ qreal d = QLineF(e->pos(), m_points.at(i)).length();
+ if ((distance < 0 && d < 8 * m_pointSize) || d < distance) {
+ distance = d;
+ m_activePoint = i;
+ }
+ }
+
+ if (m_activePoint != -1) {
+ m_wasAnimated = m_timer.isActive();
+ setAnimation(false);
+ mouseMoveEvent(e);
+ }
+
+ // If we're not running in small screen mode, always assume we're dragging
+ m_mouseDrag = !m_smallScreen;
+ m_mousePress = e->pos();
+}
+
+void PathStrokeRenderer::mouseMoveEvent(QMouseEvent *e)
+{
+ // If we've moved more then 25 pixels, assume user is dragging
+ if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > 25)
+ m_mouseDrag = true;
+
+ if (m_mouseDrag && m_activePoint >= 0 && m_activePoint < m_points.size()) {
+ m_points[m_activePoint] = e->pos();
+ update();
+ }
+}
+
+void PathStrokeRenderer::mouseReleaseEvent(QMouseEvent *)
+{
+ m_activePoint = -1;
+ setAnimation(m_wasAnimated);
+
+ if (!m_mouseDrag && m_smallScreen)
+ emit clicked();
+}
+
+void PathStrokeRenderer::timerEvent(QTimerEvent *e)
+{
+ if (e->timerId() == m_timer.timerId()) {
+ updatePoints();
+ QApplication::syncX();
+ } // else if (e->timerId() == m_fpsTimer.timerId()) {
+// emit frameRate(m_frameCount);
+// m_frameCount = 0;
+// }
+}
+
+void PathStrokeRenderer::setAnimation(bool animation)
+{
+ m_timer.stop();
+// m_fpsTimer.stop();
+
+ if (animation) {
+ m_timer.start(25, this);
+// m_fpsTimer.start(1000, this);
+// m_frameCount = 0;
+ }
+}
diff --git a/demos/pathstroke/pathstroke.h b/demos/pathstroke/pathstroke.h
new file mode 100644
index 0000000..99f17a7
--- /dev/null
+++ b/demos/pathstroke/pathstroke.h
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PATHSTROKE_H
+#define PATHSTROKE_H
+
+#include "arthurwidgets.h"
+#include <QtGui>
+
+class PathStrokeRenderer : public ArthurFrame
+{
+ Q_OBJECT
+ Q_PROPERTY(bool animation READ animation WRITE setAnimation)
+ Q_PROPERTY(qreal penWidth READ realPenWidth WRITE setRealPenWidth)
+public:
+ enum PathMode { CurveMode, LineMode };
+
+ PathStrokeRenderer(QWidget *parent, bool smallScreen = false);
+
+ void paint(QPainter *);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void timerEvent(QTimerEvent *e);
+
+ QSize sizeHint() const { return QSize(500, 500); }
+
+ bool animation() const { return m_timer.isActive(); }
+
+ qreal realPenWidth() const { return m_penWidth; }
+ void setRealPenWidth(qreal penWidth) { m_penWidth = penWidth; update(); }
+
+signals:
+ void clicked();
+
+public slots:
+ void setPenWidth(int penWidth) { m_penWidth = penWidth / 10.0; update(); }
+ void setAnimation(bool animation);
+
+ void setFlatCap() { m_capStyle = Qt::FlatCap; update(); }
+ void setSquareCap() { m_capStyle = Qt::SquareCap; update(); }
+ void setRoundCap() { m_capStyle = Qt::RoundCap; update(); }
+
+ void setBevelJoin() { m_joinStyle = Qt::BevelJoin; update(); }
+ void setMiterJoin() { m_joinStyle = Qt::MiterJoin; update(); }
+ void setRoundJoin() { m_joinStyle = Qt::RoundJoin; update(); }
+
+ void setCurveMode() { m_pathMode = CurveMode; update(); }
+ void setLineMode() { m_pathMode = LineMode; update(); }
+
+ void setSolidLine() { m_penStyle = Qt::SolidLine; update(); }
+ void setDashLine() { m_penStyle = Qt::DashLine; update(); }
+ void setDotLine() { m_penStyle = Qt::DotLine; update(); }
+ void setDashDotLine() { m_penStyle = Qt::DashDotLine; update(); }
+ void setDashDotDotLine() { m_penStyle = Qt::DashDotDotLine; update(); }
+ void setCustomDashLine() { m_penStyle = Qt::NoPen; update(); }
+
+private:
+ void initializePoints();
+ void updatePoints();
+
+ QBasicTimer m_timer;
+
+ PathMode m_pathMode;
+
+ bool m_wasAnimated;
+
+ qreal m_penWidth;
+ int m_pointCount;
+ int m_pointSize;
+ int m_activePoint;
+ QVector<QPointF> m_points;
+ QVector<QPointF> m_vectors;
+
+ Qt::PenJoinStyle m_joinStyle;
+ Qt::PenCapStyle m_capStyle;
+
+ Qt::PenStyle m_penStyle;
+
+ bool m_smallScreen;
+ QPoint m_mousePress;
+ bool m_mouseDrag;
+};
+
+class PathStrokeControls : public QWidget
+{
+ Q_OBJECT
+public:
+ PathStrokeControls(QWidget* parent, PathStrokeRenderer* renderer, bool smallScreen);
+
+signals:
+ void okPressed();
+ void quitPressed();
+
+private:
+ PathStrokeRenderer* m_renderer;
+
+ QGroupBox *m_capGroup;
+ QGroupBox *m_joinGroup;
+ QGroupBox *m_styleGroup;
+ QGroupBox *m_pathModeGroup;
+
+ void createCommonControls(QWidget* parent);
+ void layoutForDesktop();
+ void layoutForSmallScreens();
+
+private slots:
+ void emitQuitSignal();
+ void emitOkSignal();
+
+};
+
+class PathStrokeWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ PathStrokeWidget(bool smallScreen);
+ void setStyle ( QStyle * style );
+
+private:
+ PathStrokeRenderer *m_renderer;
+ PathStrokeControls *m_controls;
+
+private slots:
+ void showControls();
+ void hideControls();
+
+};
+
+#endif // PATHSTROKE_H
diff --git a/demos/pathstroke/pathstroke.html b/demos/pathstroke/pathstroke.html
new file mode 100644
index 0000000..9e7e50d
--- /dev/null
+++ b/demos/pathstroke/pathstroke.html
@@ -0,0 +1,20 @@
+<html>
+<center>
+<h2>Primitive Stroking</h2>
+</center>
+
+<p>In this demo we show some of the various types of pens that can be
+used in Qt.</p>
+
+<p>Qt defines cap styles for how the end points are treated and join
+styles for how path segments are joined together. A standard set of
+predefined dash patterns are also included that can be used with
+<code>QPen</code>.</p>
+
+<p>In addition to the predefined patterns available in
+<code>QPen</code> we also demonstrate direct use of the
+<code>QPainterPathStroker</code> class which can be used to define
+custom dash patterns. You can see this by enabling the
+<i>Custom Pattern</i> option.</p>
+
+</html>
diff --git a/demos/pathstroke/pathstroke.pro b/demos/pathstroke/pathstroke.pro
new file mode 100644
index 0000000..50b4de2
--- /dev/null
+++ b/demos/pathstroke/pathstroke.pro
@@ -0,0 +1,20 @@
+SOURCES += main.cpp pathstroke.cpp
+HEADERS += pathstroke.h
+
+SHARED_FOLDER = ../shared
+
+include($$SHARED_FOLDER/shared.pri)
+
+RESOURCES += pathstroke.qrc
+
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/pathstroke
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html
+sources.path = $$[QT_INSTALL_DEMOS]/pathstroke
+INSTALLS += target sources
+
diff --git a/demos/pathstroke/pathstroke.qrc b/demos/pathstroke/pathstroke.qrc
new file mode 100644
index 0000000..a9a7234
--- /dev/null
+++ b/demos/pathstroke/pathstroke.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res/pathstroke">
+ <file>pathstroke.cpp</file>
+ <file>pathstroke.html</file>
+</qresource>
+</RCC>
diff --git a/demos/qtdemo/Info_mac.plist b/demos/qtdemo/Info_mac.plist
new file mode 100644
index 0000000..71b0059
--- /dev/null
+++ b/demos/qtdemo/Info_mac.plist
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.trolltech.qt.demo</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+</dict>
+</plist>
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
new file mode 100644
index 0000000..18343cb
--- /dev/null
+++ b/demos/qtdemo/colors.cpp
@@ -0,0 +1,390 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "colors.h"
+
+#ifndef QT_NO_OPENGL
+ #include <QGLWidget>
+#endif
+//#define QT_NO_OPENGL
+
+// Colors:
+QColor Colors::sceneBg1(QColor(91, 91, 91));
+QColor Colors::sceneBg1Line(QColor(114, 108, 104));
+QColor Colors::sceneBg2(QColor(0, 0, 0));
+QColor Colors::sceneLine(255, 255, 255);
+QColor Colors::paperBg(QColor(100, 100, 100));
+QColor Colors::menuTextFg(QColor(255, 0, 0));
+QColor Colors::buttonBgLow(QColor(255, 255, 255, 90));
+QColor Colors::buttonBgHigh(QColor(255, 255, 255, 20));
+QColor Colors::buttonText(QColor(255, 255, 255));
+QColor Colors::tt_green(QColor(166, 206, 57));
+QColor Colors::fadeOut(QColor(206, 246, 117, 0));
+QColor Colors::heading(QColor(190,230,80));
+QString Colors::contentColor("<font color='#eeeeee'>");
+QString Colors::glVersion("Not detected!");
+
+// Guides:
+int Colors::stageStartY = 8;
+int Colors::stageHeight = 536;
+int Colors::stageStartX = 8;
+int Colors::stageWidth = 785;
+int Colors::contentStartY = 22;
+int Colors::contentHeight = 510;
+
+// Properties:
+bool Colors::openGlRendering = false;
+bool Colors::direct3dRendering = false;
+bool Colors::softwareRendering = false;
+bool Colors::openGlAwailable = true;
+bool Colors::direct3dAwailable = true;
+bool Colors::xRenderPresent = true;
+
+bool Colors::noTicker = false;
+bool Colors::noRescale = false;
+bool Colors::noAnimations = false;
+bool Colors::noBlending = false;
+bool Colors::noScreenSync = false;
+bool Colors::fullscreen = false;
+bool Colors::usePixmaps = false;
+bool Colors::useLoop = false;
+bool Colors::showBoundingRect = false;
+bool Colors::showFps = false;
+bool Colors::noAdapt = false;
+bool Colors::noWindowMask = true;
+bool Colors::useButtonBalls = false;
+bool Colors::useEightBitPalette = false;
+bool Colors::noTimerUpdate = false;
+bool Colors::noTickerMorph = false;
+bool Colors::adapted = false;
+bool Colors::verbose = false;
+bool Colors::pause = true;
+int Colors::fps = 100;
+int Colors::menuCount = 18;
+float Colors::animSpeed = 1.0;
+float Colors::animSpeedButtons = 1.0;
+float Colors::benchmarkFps = -1;
+int Colors::tickerLetterCount = 80;
+float Colors::tickerMoveSpeed = 0.4f;
+float Colors::tickerMorphSpeed = 2.5f;
+QString Colors::tickerText = ".EROM ETAERC .SSEL EDOC";
+QString Colors::rootMenuName = "Qt Examples and Demos";
+
+QFont Colors::contentFont()
+{
+ QFont font;
+ font.setStyleStrategy(QFont::PreferAntialias);
+#if defined(Q_OS_MAC)
+ font.setPixelSize(14);
+ font.setFamily("Arial");
+#else
+ font.setPixelSize(13);
+ font.setFamily("Verdana");
+#endif
+ return font;
+}
+
+QFont Colors::headingFont()
+{
+ QFont font;
+ font.setStyleStrategy(QFont::PreferAntialias);
+ font.setPixelSize(23);
+ font.setBold(true);
+ font.setFamily("Verdana");
+ return font;
+}
+
+QFont Colors::buttonFont()
+{
+ QFont font;
+ font.setStyleStrategy(QFont::PreferAntialias);
+#if 0//defined(Q_OS_MAC)
+ font.setPixelSize(11);
+ font.setFamily("Silom");
+#else
+ font.setPixelSize(11);
+ font.setFamily("Verdana");
+#endif
+ return font;
+}
+
+QFont Colors::tickerFont()
+{
+ QFont font;
+ font.setStyleStrategy(QFont::PreferAntialias);
+#if defined(Q_OS_MAC)
+ font.setPixelSize(11);
+ font.setBold(true);
+ font.setFamily("Arial");
+#else
+ font.setPixelSize(10);
+ font.setBold(true);
+ font.setFamily("sans serif");
+#endif
+ return font;
+}
+
+float parseFloat(const QString &argument, const QString &name)
+{
+ if (name.length() == argument.length()){
+ QMessageBox::warning(0, "Arguments",
+ QString("No argument number found for ")
+ + name
+ + ". Remember to put name and value adjacent! (e.g. -fps100)");
+ exit(0);
+ }
+ float value = argument.mid(name.length()).toFloat();
+ return value;
+}
+
+QString parseText(const QString &argument, const QString &name)
+{
+ if (name.length() == argument.length()){
+ QMessageBox::warning(0, "Arguments",
+ QString("No argument number found for ")
+ + name
+ + ". Remember to put name and value adjacent! (e.g. -fps100)");
+ exit(0);
+ }
+ QString value = argument.mid(name.length());
+ return value;
+}
+
+void Colors::parseArgs(int argc, char *argv[])
+{
+ // some arguments should be processed before
+ // others. Handle them now:
+ for (int i=1; i<argc; i++){
+ QString s(argv[i]);
+ if (s == "-verbose")
+ Colors::verbose = true;
+ }
+
+ Colors::detectSystemResources();
+
+ // Handle the rest of the arguments. They may
+ // override attributes already set:
+ for (int i=1; i<argc; i++){
+ QString s(argv[i]);
+ if (s == "-opengl")
+ Colors::openGlRendering = true;
+ else if (s == "-direct3d")
+ Colors::direct3dRendering = true;
+ else if (s == "-software")
+ Colors::softwareRendering = true;
+ else if (s == "-no-opengl") // support old style
+ Colors::softwareRendering = true;
+ else if (s == "-no-ticker") // support old style
+ Colors::noTicker = true;
+ else if (s.startsWith("-ticker"))
+ Colors::noTicker = !bool(parseFloat(s, "-ticker"));
+ else if (s == "-no-animations")
+ Colors::noAnimations = true; // support old style
+ else if (s.startsWith("-animations"))
+ Colors::noAnimations = !bool(parseFloat(s, "-animations"));
+ else if (s == "-no-adapt")
+ Colors::noAdapt = true;
+ else if (s == "-low")
+ Colors::setLowSettings();
+ else if (s == "-no-rescale")
+ Colors::noRescale = true;
+ else if (s == "-use-pixmaps")
+ Colors::usePixmaps = true;
+ else if (s == "-fullscreen")
+ Colors::fullscreen = true;
+ else if (s == "-show-br")
+ Colors::showBoundingRect = true;
+ else if (s == "-show-fps")
+ Colors::showFps = true;
+ else if (s == "-no-blending")
+ Colors::noBlending = true;
+ else if (s == "-no-sync")
+ Colors::noScreenSync = true;
+ else if (s.startsWith("-menu"))
+ Colors::menuCount = int(parseFloat(s, "-menu"));
+ else if (s.startsWith("-use-timer-update"))
+ Colors::noTimerUpdate = !bool(parseFloat(s, "-use-timer-update"));
+ else if (s.startsWith("-pause"))
+ Colors::pause = bool(parseFloat(s, "-pause"));
+ else if (s == "-no-ticker-morph")
+ Colors::noTickerMorph = true;
+ else if (s == "-use-window-mask")
+ Colors::noWindowMask = false;
+ else if (s == "-use-loop")
+ Colors::useLoop = true;
+ else if (s == "-use-8bit")
+ Colors::useEightBitPalette = true;
+ else if (s.startsWith("-8bit"))
+ Colors::useEightBitPalette = bool(parseFloat(s, "-8bit"));
+ else if (s == "-use-balls")
+ Colors::useButtonBalls = true;
+ else if (s.startsWith("-ticker-letters"))
+ Colors::tickerLetterCount = int(parseFloat(s, "-ticker-letters"));
+ else if (s.startsWith("-ticker-text"))
+ Colors::tickerText = parseText(s, "-ticker-text");
+ else if (s.startsWith("-ticker-speed"))
+ Colors::tickerMoveSpeed = parseFloat(s, "-ticker-speed");
+ else if (s.startsWith("-ticker-morph-speed"))
+ Colors::tickerMorphSpeed = parseFloat(s, "-ticker-morph-speed");
+ else if (s.startsWith("-animation-speed"))
+ Colors::animSpeed = parseFloat(s, "-animation-speed");
+ else if (s.startsWith("-fps"))
+ Colors::fps = int(parseFloat(s, "-fps"));
+ else if (s.startsWith("-h") || s.startsWith("-help")){
+ QMessageBox::warning(0, "Arguments",
+ QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-direct3d] [-software] [-fullscreen] [-ticker[0|1]] ")
+ + "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ + "[-use-window-mask] [-no-rescale] "
+ + "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
+ + "[-animation-speed<float>] [-fps<int>] "
+ + "[-low] [-ticker-letters<int>] [-ticker-speed<float>] [-no-ticker-morph] "
+ + "[-ticker-morph-speed<float>] [-ticker-text<string>]");
+ exit(0);
+ }
+ }
+
+ Colors::postConfigure();
+}
+
+void Colors::setLowSettings()
+{
+ Colors::openGlRendering = false;
+ Colors::direct3dRendering = false;
+ Colors::softwareRendering = true;
+ Colors::noTicker = true;
+ Colors::noTimerUpdate = true;
+ Colors::fps = 30;
+ Colors::usePixmaps = true;
+ Colors::noAnimations = true;
+ Colors::noBlending = true;
+}
+
+void Colors::detectSystemResources()
+{
+#ifndef QT_NO_OPENGL
+ if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)
+ Colors::glVersion = "2.0 or higher";
+ else if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_5)
+ Colors::glVersion = "1.5";
+ else if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_4)
+ Colors::glVersion = "1.4";
+ else if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_3)
+ Colors::glVersion = "1.3 or lower";
+ if (Colors::verbose)
+ qDebug() << "- OpenGL version:" << Colors::glVersion;
+
+ QGLWidget glw;
+ if (!QGLFormat::hasOpenGL()
+ || !glw.format().directRendering()
+ || !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_5)
+ || glw.depth() < 24
+ )
+#else
+ if (Colors::verbose)
+ qDebug() << "- OpenGL not supported by current build of Qt";
+#endif
+ {
+ Colors::openGlAwailable = false;
+ if (Colors::verbose)
+ qDebug("- OpenGL not recommended on this system");
+ }
+
+#if defined(Q_WS_WIN)
+ Colors::direct3dAwailable = false; // for now.
+#endif
+
+#if defined(Q_WS_X11)
+ // check if X render is present:
+ QPixmap tmp(1, 1);
+ if (!tmp.x11PictureHandle()){
+ Colors::xRenderPresent = false;
+ if (Colors::verbose)
+ qDebug("- X render not present");
+ }
+
+#endif
+
+ QWidget w;
+ if (Colors::verbose)
+ qDebug() << "- Color depth: " << QString::number(w.depth());
+}
+
+void Colors::postConfigure()
+{
+ if (!Colors::noAdapt){
+ QWidget w;
+ if (w.depth() < 16){
+ Colors::useEightBitPalette = true;
+ Colors::adapted = true;
+ if (Colors::verbose)
+ qDebug() << "- Adapt: Color depth less than 16 bit. Using 8 bit palette";
+ }
+
+ if (!Colors::xRenderPresent){
+ Colors::setLowSettings();
+ Colors::adapted = true;
+ if (Colors::verbose)
+ qDebug() << "- Adapt: X renderer not present. Using low settings";
+ }
+ }
+
+#if !defined(Q_WS_WIN)
+ if (Colors::direct3dRendering){
+ Colors::direct3dRendering = false;
+ qDebug() << "- WARNING: Direct3D specified, but not supported on this platform";
+ }
+#endif
+
+ if (!Colors::openGlRendering && !Colors::direct3dRendering && !Colors::softwareRendering){
+ // The user has not decided rendering system. So we do it instead:
+#if defined(Q_WS_WIN)
+ if (Colors::direct3dAwailable)
+ Colors::direct3dRendering = true;
+ else
+#endif
+ if (Colors::openGlAwailable)
+ Colors::openGlRendering = true;
+ else
+ Colors::softwareRendering = true;
+ }
+}
+
+
diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h
new file mode 100644
index 0000000..58865c6
--- /dev/null
+++ b/demos/qtdemo/colors.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLORS_H
+#define COLORS_H
+
+#include <QtGui>
+#include <QBrush>
+
+class Colors
+{
+private:
+ Colors(){};
+
+public:
+ static void parseArgs(int argc, char *argv[]);
+ static void detectSystemResources();
+ static void postConfigure();
+ static void setLowSettings();
+
+ // Colors:
+ static QColor sceneBg1;
+ static QColor sceneBg2;
+ static QColor sceneBg1Line;
+ static QColor paperBg;
+ static QColor menuTextFg;
+ static QColor buttonText;
+ static QColor buttonBgLow;
+ static QColor buttonBgHigh;
+ static QColor tt_green;
+ static QColor fadeOut;
+ static QColor sceneLine;
+ static QColor heading;
+ static QString contentColor;
+ static QString glVersion;
+
+ // Guides:
+ static int stageStartY;
+ static int stageHeight;
+ static int stageStartX;
+ static int stageWidth;
+ static int contentStartY;
+ static int contentHeight;
+
+ // properties:
+ static bool openGlRendering;
+ static bool direct3dRendering;
+ static bool softwareRendering;
+ static bool openGlAwailable;
+ static bool direct3dAwailable;
+ static bool xRenderPresent;
+ static bool noAdapt;
+ static bool noTicker;
+ static bool noRescale;
+ static bool noAnimations;
+ static bool noBlending;
+ static bool noScreenSync;
+ static bool useLoop;
+ static bool noWindowMask;
+ static bool usePixmaps;
+ static bool useEightBitPalette;
+ static bool fullscreen;
+ static bool showBoundingRect;
+ static bool showFps;
+ static bool noTimerUpdate;
+ static bool noTickerMorph;
+ static bool useButtonBalls;
+ static bool adapted;
+ static bool verbose;
+ static bool pause;
+
+ static float animSpeed;
+ static float animSpeedButtons;
+ static float benchmarkFps;
+ static int tickerLetterCount;
+ static int fps;
+ static int menuCount;
+ static float tickerMoveSpeed;
+ static float tickerMorphSpeed;
+ static QString tickerText;
+ static QString rootMenuName;
+
+ // fonts
+ static QFont contentFont();
+ static QFont headingFont();
+ static QFont buttonFont();
+ static QFont tickerFont();
+
+};
+
+#endif // COLORS_H
+
diff --git a/demos/qtdemo/demoitem.cpp b/demos/qtdemo/demoitem.cpp
new file mode 100644
index 0000000..0335bd3
--- /dev/null
+++ b/demos/qtdemo/demoitem.cpp
@@ -0,0 +1,280 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "demoitem.h"
+#include "menumanager.h"
+#include "guide.h"
+#include "colors.h"
+
+QHash<QString, SharedImage *> DemoItem::sharedImageHash;
+QMatrix DemoItem::matrix;
+
+DemoItem::DemoItem(QGraphicsScene *scene, QGraphicsItem *parent) : QGraphicsItem(parent, scene)
+{
+ this->opacity = 1.0;
+ this->locked = false;
+ this->prepared = false;
+ this->neverVisible = false;
+ this->noSubPixeling = false;
+ this->currentAnimation = 0;
+ this->currGuide = 0;
+ this->guideFrame = 0;
+ this->sharedImage = new SharedImage();
+ ++this->sharedImage->refCount;
+}
+
+DemoItem::~DemoItem()
+{
+ if(--this->sharedImage->refCount == 0){
+ if (!this->hashKey.isEmpty())
+ DemoItem::sharedImageHash.remove(this->hashKey);
+ delete this->sharedImage;
+ }
+}
+
+void DemoItem::setNeverVisible(bool never)
+{
+ Q_UNUSED(never);
+/*
+ this->neverVisible = never;
+ if (never){
+ this->setVisible(false);
+ QList<QGraphicsItem *> c = children();
+ for (int i=0; i<c.size(); i++){
+ DemoItem *d = dynamic_cast<DemoItem *>(c[i]); // Don't use dynamic cast because it needs RTTI support.
+ if (d)
+ d->setNeverVisible(true);
+ else{
+ c[i]->setVisible(false);
+ }
+ }
+ }
+*/
+}
+
+void DemoItem::setRecursiveVisible(bool visible){
+ if (visible && this->neverVisible){
+ this->setVisible(false);
+ return;
+ }
+
+ this->setVisible(visible);
+ QList<QGraphicsItem *> c = children();
+ for (int i=0; i<c.size(); i++){
+ // DemoItem *d = dynamic_cast<DemoItem *>(c[i]);
+ // if (d)
+ // d->setRecursiveVisible(visible);
+ // else{
+ c[i]->setVisible(visible);
+ // }
+ }
+}
+
+void DemoItem::useGuide(Guide *guide, float startFrame)
+{
+ this->startFrame = startFrame;
+ this->guideFrame = startFrame;
+ while (this->guideFrame > guide->startLength + guide->length()){
+ if (guide->nextGuide == guide->firstGuide)
+ break;
+
+ guide = guide->nextGuide;
+ }
+ this->currGuide = guide;
+}
+
+void DemoItem::guideAdvance(float distance)
+{
+ this->guideFrame += distance;
+ while (this->guideFrame > this->currGuide->startLength + this->currGuide->length()){
+ this->currGuide = this->currGuide->nextGuide;
+ if (this->currGuide == this->currGuide->firstGuide)
+ this->guideFrame -= this->currGuide->lengthAll();
+ }
+}
+
+void DemoItem::guideMove(float moveSpeed)
+{
+ this->currGuide->guide(this, moveSpeed);
+}
+
+void DemoItem::setPosUsingSheepDog(const QPointF &dest, const QRectF &sceneFence)
+{
+ this->setPos(dest);
+ if (sceneFence.isNull())
+ return;
+
+ // I agree. This is not the optimal way of doing it.
+ // But don't want for use time on it now....
+ float itemWidth = this->boundingRect().width();
+ float itemHeight = this->boundingRect().height();
+ float fenceRight = sceneFence.x() + sceneFence.width();
+ float fenceBottom = sceneFence.y() + sceneFence.height();
+
+ if (this->scenePos().x() < sceneFence.x()) this->moveBy(this->mapFromScene(QPointF(sceneFence.x(), 0)).x(), 0);
+ if (this->scenePos().x() > fenceRight - itemWidth) this->moveBy(this->mapFromScene(QPointF(fenceRight - itemWidth, 0)).x(), 0);
+ if (this->scenePos().y() < sceneFence.y()) this->moveBy(0, this->mapFromScene(QPointF(0, sceneFence.y())).y());
+ if (this->scenePos().y() > fenceBottom - itemHeight) this->moveBy(0, this->mapFromScene(QPointF(0, fenceBottom - itemHeight)).y());
+}
+
+void DemoItem::setGuidedPos(const QPointF &pos)
+{
+ this->guidedPos = pos;
+}
+
+QPointF DemoItem::getGuidedPos()
+{
+ return this->guidedPos;
+}
+
+void DemoItem::switchGuide(Guide *guide)
+{
+ this->currGuide = guide;
+ this->guideFrame = 0;
+}
+
+bool DemoItem::inTransition()
+{
+ if (this->currentAnimation)
+ return this->currentAnimation->running();
+ else
+ return false;
+}
+
+void DemoItem::setMatrix(const QMatrix &matrix)
+{
+ DemoItem::matrix = matrix;
+}
+
+void DemoItem::useSharedImage(const QString &hashKey)
+{
+ this->hashKey = hashKey;
+ if (!sharedImageHash.contains(hashKey))
+ sharedImageHash.insert(hashKey, this->sharedImage);
+ else {
+ if(--this->sharedImage->refCount == 0)
+ delete this->sharedImage;
+ this->sharedImage = sharedImageHash.value(hashKey);
+ ++this->sharedImage->refCount;
+ }
+}
+
+bool DemoItem::validateImage()
+{
+ if ((this->sharedImage->matrix != DemoItem::matrix && !Colors::noRescale) || !(this->sharedImage->image || this->sharedImage->pixmap)){
+ // (Re)create image according to new matrix
+ delete this->sharedImage->image;
+ this->sharedImage->image = 0;
+ delete this->sharedImage->pixmap;
+ this->sharedImage->pixmap = 0;
+ this->sharedImage->matrix = DemoItem::matrix;
+
+ // Let subclass create and draw a new image according to the new matrix
+ QImage *image = this->createImage(Colors::noRescale ? QMatrix() : DemoItem::matrix);
+ if (image){
+ if (Colors::showBoundingRect){
+ // draw red transparent rect
+ QPainter painter(image);
+ painter.fillRect(image->rect(), QColor(255, 0, 0, 50));
+ painter.end();
+ }
+
+ this->sharedImage->unscaledBoundingRect = this->sharedImage->matrix.inverted().mapRect(image->rect());
+ if (Colors::usePixmaps){
+ if (image->isNull())
+ this->sharedImage->pixmap = new QPixmap(1, 1);
+ else
+ this->sharedImage->pixmap = new QPixmap(image->size());
+ this->sharedImage->pixmap->fill(QColor(0, 0, 0, 0));
+ QPainter painter(this->sharedImage->pixmap);
+ painter.drawImage(0, 0, *image);
+ delete image;
+ } else {
+ this->sharedImage->image = image;
+ }
+ return true;
+ } else
+ return false;
+ }
+ return true;
+}
+
+QRectF DemoItem::boundingRect() const
+{
+ const_cast<DemoItem *>(this)->validateImage();
+ return this->sharedImage->unscaledBoundingRect;
+}
+
+void DemoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ if (this->validateImage()){
+
+ bool wasSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform);
+ painter->setRenderHint(QPainter::SmoothPixmapTransform);
+
+ if (Colors::noRescale){
+ // Let the painter scale the image for us.
+ // This may degrade both quality and performance
+ if (this->sharedImage->image)
+ painter->drawImage(this->pos(), *this->sharedImage->image);
+ else
+ painter->drawPixmap(this->pos(), *this->sharedImage->pixmap);
+ }
+ else {
+ QMatrix m = painter->worldMatrix();
+ painter->setWorldMatrix(QMatrix());
+ float x = this->noSubPixeling ? qRound(m.dx()) : m.dx();
+ float y = this->noSubPixeling ? qRound(m.dy()) : m.dy();
+ if (this->sharedImage->image)
+ painter->drawImage(QPointF(x, y), *this->sharedImage->image);
+ else
+ painter->drawPixmap(QPointF(x, y), *this->sharedImage->pixmap);
+ }
+
+ if (!wasSmoothPixmapTransform) {
+ painter->setRenderHint(QPainter::SmoothPixmapTransform, false);
+ }
+
+ }
+}
diff --git a/demos/qtdemo/demoitem.h b/demos/qtdemo/demoitem.h
new file mode 100644
index 0000000..e03327b
--- /dev/null
+++ b/demos/qtdemo/demoitem.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DEMO_ITEM_H
+#define DEMO_ITEM_H
+
+#include <QtGui>
+
+class DemoItemAnimation;
+class Guide;
+
+class SharedImage
+{
+public:
+ SharedImage() : refCount(0), image(0), pixmap(0){};
+ ~SharedImage()
+ {
+ delete image;
+ delete pixmap;
+ }
+
+ int refCount;
+ QImage *image;
+ QPixmap *pixmap;
+ QMatrix matrix;
+ QRectF unscaledBoundingRect;
+};
+
+class DemoItem : public QGraphicsItem
+{
+
+public:
+ DemoItem(QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ virtual ~DemoItem();
+
+ bool inTransition();
+ virtual void animationStarted(int id = 0){ Q_UNUSED(id); };
+ virtual void animationStopped(int id = 0){ Q_UNUSED(id); };
+ virtual void prepare(){};
+ void setRecursiveVisible(bool visible);
+ void useSharedImage(const QString &hashKey);
+ void setNeverVisible(bool never = true);
+ static void setMatrix(const QMatrix &matrix);
+ virtual QRectF boundingRect() const; // overridden
+ void setPosUsingSheepDog(const QPointF &dest, const QRectF &sceneFence);
+
+ qreal opacity;
+ bool locked;
+ DemoItemAnimation *currentAnimation;
+ bool noSubPixeling;
+
+ // Used if controlled by a guide:
+ void useGuide(Guide *guide, float startFrame = 0);
+ void guideAdvance(float distance);
+ void guideMove(float moveSpeed);
+ void setGuidedPos(const QPointF &position);
+ QPointF getGuidedPos();
+ float startFrame;
+ float guideFrame;
+ Guide *currGuide;
+
+protected:
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option = 0, QWidget *widget = 0); // overridden
+ virtual QImage *createImage(const QMatrix &) const { return 0; };
+ virtual bool collidesWithItem(const QGraphicsItem *, Qt::ItemSelectionMode) const { return false; };
+ bool prepared;
+
+private:
+ SharedImage *sharedImage;
+ QString hashKey;
+ bool neverVisible;
+ bool validateImage();
+
+ // Used if controlled by a guide:
+ void switchGuide(Guide *guide);
+ friend class Guide;
+ QPointF guidedPos;
+
+ // The next static hash is shared amongst all demo items, and
+ // has the purpose of reusing images to save memory and time
+ static QHash<QString, SharedImage *> sharedImageHash;
+ static QMatrix matrix;
+};
+
+#endif // DEMO_ITEM_H
+
diff --git a/demos/qtdemo/demoitemanimation.cpp b/demos/qtdemo/demoitemanimation.cpp
new file mode 100644
index 0000000..92b2d24
--- /dev/null
+++ b/demos/qtdemo/demoitemanimation.cpp
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "demoitemanimation.h"
+#include "demoitem.h"
+#include "colors.h"
+
+DemoItemAnimation::DemoItemAnimation(DemoItem *item, INOROUT inOrOut)
+{
+ this->opacityAt0 = 1.0;
+ this->opacityAt1 = 1.0;
+ this->startDelay = 0;
+ this->inOrOut = inOrOut;
+ this->hideOnFinished = false;
+ this->forcePlay = false;
+ this->timeline = new QTimeLine(5000);
+ this->timeline->setFrameRange(0, 2000);
+ this->timeline->setUpdateInterval(int(1000.0/Colors::fps));
+ this->moveOnPlay = false;
+ setTimeLine(this->timeline);
+ setItem(item);
+}
+
+DemoItemAnimation::~DemoItemAnimation()
+{
+ // Do not delete demoitem. It is not
+ // owned by an animation
+ delete this->timeline;
+}
+
+void DemoItemAnimation::prepare()
+{
+ this->demoItem()->prepare();
+}
+
+void DemoItemAnimation::setStartPos(const QPointF &pos){
+ this->startPos = pos;
+}
+
+void DemoItemAnimation::setDuration(int duration)
+{
+ duration = int(duration * Colors::animSpeed);
+ this->timeline->setDuration(duration);
+ this->moveOnPlay = true;
+}
+
+void DemoItemAnimation::setCurrentTime(int ms)
+{
+ this->timeline->setCurrentTime(ms);
+}
+
+bool DemoItemAnimation::notOwnerOfItem()
+{
+ return this != demoItem()->currentAnimation;
+}
+
+void DemoItemAnimation::play(bool fromStart, bool force)
+{
+ this->fromStart = fromStart;
+ this->forcePlay = force;
+
+ QPointF currPos = this->demoItem()->pos();
+
+ // If the item that this animation controls in currently under the
+ // control of another animation, stop that animation first
+ if (this->demoItem()->currentAnimation)
+ this->demoItem()->currentAnimation->timeline->stop();
+ this->demoItem()->currentAnimation = this;
+ this->timeline->stop();
+
+ if (Colors::noAnimations && !this->forcePlay){
+ this->timeline->setCurrentTime(1);
+ this->demoItem()->setPos(this->posAt(1));
+ }
+ else{
+ if (this->demoItem()->isVisible())
+ // If the item is already visible, start the animation from
+ // the items current position rather than from start.
+ this->setPosAt(0.0, currPos);
+ else
+ this->setPosAt(0.0, this->startPos);
+
+ if (this->fromStart){
+ this->timeline->setCurrentTime(0);
+ this->demoItem()->setPos(this->posAt(0));
+ }
+ }
+
+ if (this->inOrOut == ANIM_IN)
+ this->demoItem()->setRecursiveVisible(true);
+
+ if (this->startDelay){
+ QTimer::singleShot(this->startDelay, this, SLOT(playWithoutDelay()));
+ return;
+ }
+ else
+ this->playWithoutDelay();
+}
+
+void DemoItemAnimation::playWithoutDelay()
+{
+ if (this->moveOnPlay && !(Colors::noAnimations && !this->forcePlay))
+ this->timeline->start();
+ this->demoItem()->animationStarted(this->inOrOut);
+}
+
+void DemoItemAnimation::stop(bool reset)
+{
+ this->timeline->stop();
+ if (reset)
+ this->demoItem()->setPos(this->posAt(0));
+ if (this->hideOnFinished && !this->moveOnPlay)
+ this->demoItem()->setRecursiveVisible(false);
+ this->demoItem()->animationStopped(this->inOrOut);
+}
+
+void DemoItemAnimation::setRepeat(int nr)
+{
+ this->timeline->setLoopCount(nr);
+}
+
+void DemoItemAnimation::playReverse()
+{
+}
+
+bool DemoItemAnimation::running()
+{
+ return (this->timeLine()->state() == QTimeLine::Running);
+}
+
+bool DemoItemAnimation::runningOrItemLocked()
+{
+ return (this->running() || this->demoItem()->locked);
+}
+
+void DemoItemAnimation::lockItem(bool state)
+{
+ this->demoItem()->locked = state;
+}
+
+DemoItem *DemoItemAnimation::demoItem()
+{
+ return (DemoItem *) this->item();
+}
+
+void DemoItemAnimation::setOpacityAt0(qreal opacity)
+{
+ this->opacityAt0 = opacity;
+}
+
+void DemoItemAnimation::setOpacityAt1(qreal opacity)
+{
+ this->opacityAt1 = opacity;
+}
+
+void DemoItemAnimation::setOpacity(qreal step)
+{
+ DemoItem *demoItem = (DemoItem *) item();
+ demoItem->opacity = this->opacityAt0 + step * step * step * (this->opacityAt1 - this->opacityAt0);
+}
+
+void DemoItemAnimation::afterAnimationStep(qreal step)
+{
+ if (step == 1.0f){
+ if (this->timeline->loopCount() > 0){
+ // animation finished.
+ if (this->hideOnFinished)
+ this->demoItem()->setRecursiveVisible(false);
+ this->demoItem()->animationStopped(this->inOrOut);
+ }
+ } else if (Colors::noAnimations && !this->forcePlay){
+ // The animation is not at end, but
+ // the animations should not play, so go to end.
+ this->setStep(1.0f); // will make this method being called recursive.
+ }
+}
+
+
+
+
+
diff --git a/demos/qtdemo/demoitemanimation.h b/demos/qtdemo/demoitemanimation.h
new file mode 100644
index 0000000..ad89ada
--- /dev/null
+++ b/demos/qtdemo/demoitemanimation.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DEMO_ITEM_ANIMATION_H
+#define DEMO_ITEM_ANIMATION_H
+
+#include <QtCore>
+#include <QtGui>
+
+class DemoItem;
+
+class DemoItemAnimation : public QGraphicsItemAnimation
+{
+ Q_OBJECT
+
+public:
+ enum INOROUT {ANIM_IN, ANIM_OUT, ANIM_UNSPECIFIED};
+
+ DemoItemAnimation(DemoItem *item, INOROUT inOrOut = ANIM_UNSPECIFIED);
+ virtual ~DemoItemAnimation();
+
+ virtual void play(bool fromStart = true, bool force = false);
+ virtual void playReverse();
+ virtual void stop(bool reset = true);
+ virtual void setRepeat(int nr = 0);
+
+ void setDuration(int duration);
+ void setDuration(float duration){ setDuration(int(duration)); };
+ void setOpacityAt0(qreal opacity);
+ void setOpacityAt1(qreal opacity);
+ void setOpacity(qreal step);
+ void setCurrentTime(int ms);
+ void setStartPos(const QPointF &pos);
+ bool notOwnerOfItem();
+
+ bool running();
+ bool runningOrItemLocked();
+ void lockItem(bool state);
+ void prepare();
+
+ DemoItem *demoItem();
+
+ virtual void afterAnimationStep(qreal step); // overridden
+
+ QTimeLine *timeline;
+ qreal opacityAt0;
+ qreal opacityAt1;
+ int startDelay;
+ QPointF startPos;
+ bool hideOnFinished;
+ bool moveOnPlay;
+ bool forcePlay;
+ bool fromStart;
+ INOROUT inOrOut;
+
+private slots:
+ virtual void playWithoutDelay();
+};
+
+#endif // DEMO_ITEM_ANIMATION_H
+
+
+
diff --git a/demos/qtdemo/demoscene.cpp b/demos/qtdemo/demoscene.cpp
new file mode 100644
index 0000000..29b73d3
--- /dev/null
+++ b/demos/qtdemo/demoscene.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "demoscene.h"
+
+void DemoScene::drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[], QWidget *widget)
+{
+ for (int i=0; i<numItems; ++i) {
+ painter->save();
+ painter->setMatrix(items[i]->sceneMatrix(), true);
+ items[i]->paint(painter, &options[i], widget);
+ painter->restore();
+ }
+}
+
+
diff --git a/demos/qtdemo/demoscene.h b/demos/qtdemo/demoscene.h
new file mode 100644
index 0000000..e4838c7
--- /dev/null
+++ b/demos/qtdemo/demoscene.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAIN_VIEW_H
+#define MAIN_VIEW_H
+
+#include <QtGui>
+
+class DemoScene : public QGraphicsScene
+{
+public:
+ DemoScene(QObject *parent) : QGraphicsScene(parent){};
+
+protected:
+ void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[], QWidget *widget);
+};
+
+#endif // MAIN_VIEW_H
+
diff --git a/demos/qtdemo/demotextitem.cpp b/demos/qtdemo/demotextitem.cpp
new file mode 100644
index 0000000..cd549fc
--- /dev/null
+++ b/demos/qtdemo/demotextitem.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "demotextitem.h"
+#include "colors.h"
+
+DemoTextItem::DemoTextItem(const QString &text, const QFont &font, const QColor &textColor,
+ float textWidth, QGraphicsScene *scene, QGraphicsItem *parent, TYPE type, const QColor &bgColor)
+ : DemoItem(scene, parent)
+{
+ this->type = type;
+ this->text = text;
+ this->font = font;
+ this->textColor = textColor;
+ this->bgColor = bgColor;
+ this->textWidth = textWidth;
+ this->noSubPixeling = true;
+}
+
+void DemoTextItem::setText(const QString &text)
+{
+ this->text = text;
+ this->update();
+}
+
+QImage *DemoTextItem::createImage(const QMatrix &matrix) const
+{
+ if (this->type == DYNAMIC_TEXT)
+ return 0;
+
+ float sx = qMin(matrix.m11(), matrix.m22());
+ float sy = matrix.m22() < sx ? sx : matrix.m22();
+
+ QGraphicsTextItem textItem(0, 0);
+ textItem.setHtml(this->text);
+ textItem.setTextWidth(this->textWidth);
+ textItem.setFont(this->font);
+ textItem.setDefaultTextColor(this->textColor);
+ textItem.document()->setDocumentMargin(2);
+
+ float w = textItem.boundingRect().width();
+ float h = textItem.boundingRect().height();
+ QImage *image = new QImage(int(w * sx), int(h * sy), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.scale(sx, sy);
+ QStyleOptionGraphicsItem style;
+ textItem.paint(&painter, &style, 0);
+ return image;
+}
+
+
+void DemoTextItem::animationStarted(int)
+{
+ this->noSubPixeling = false;
+}
+
+
+void DemoTextItem::animationStopped(int)
+{
+ this->noSubPixeling = true;
+}
+
+QRectF DemoTextItem::boundingRect() const
+
+{
+ if (this->type == STATIC_TEXT)
+ return DemoItem::boundingRect();
+ return QRectF(0, 0, 50, 20); // Sorry for using magic number
+}
+
+
+void DemoTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ if (this->type == STATIC_TEXT) {
+ DemoItem::paint(painter, option, widget);
+ return;
+ }
+
+ painter->setPen(this->textColor);
+ painter->drawText(0, 0, this->text);
+}
diff --git a/demos/qtdemo/demotextitem.h b/demos/qtdemo/demotextitem.h
new file mode 100644
index 0000000..679e3fb
--- /dev/null
+++ b/demos/qtdemo/demotextitem.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DEMO_TEXT_ITEM_H
+#define DEMO_TEXT_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class DemoTextItem : public DemoItem
+{
+public:
+ enum TYPE {STATIC_TEXT, DYNAMIC_TEXT};
+
+ DemoTextItem(const QString &text, const QFont &font, const QColor &textColor,
+ float textWidth, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0, TYPE type = STATIC_TEXT, const QColor &bgColor = QColor());
+ void setText(const QString &text);
+ QRectF boundingRect() const; // overridden
+ void animationStarted(int id = 0);
+ void animationStopped(int id = 0);
+
+protected:
+ virtual QImage *createImage(const QMatrix &matrix) const; // overridden
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option = 0, QWidget *widget = 0); // overridden
+
+private:
+ float textWidth;
+ QString text;
+ QFont font;
+ QColor textColor;
+ QColor bgColor;
+ TYPE type;
+};
+
+#endif // DEMO_TEXT_ITEM_H
+
diff --git a/demos/qtdemo/dockitem.cpp b/demos/qtdemo/dockitem.cpp
new file mode 100644
index 0000000..7f26f04
--- /dev/null
+++ b/demos/qtdemo/dockitem.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dockitem.h"
+#include "colors.h"
+
+DockItem::DockItem(ORIENTATION orien, qreal x, qreal y, qreal width, qreal length, QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ this->orientation = orien;
+ this->width = width;
+ this->length = length;
+ this->setPos(x, y);
+ this->setZValue(40);
+ this->setupPixmap();
+}
+
+void DockItem::setupPixmap()
+{
+ this->pixmap = new QPixmap(int(this->boundingRect().width()), int(this->boundingRect().height()));
+ this->pixmap->fill(QColor(0, 0, 0, 0));
+ QPainter painter(this->pixmap);
+ // create brush:
+ QColor background = Colors::sceneBg1;
+ QLinearGradient brush(0, 0, 0, this->boundingRect().height());
+ brush.setSpread(QGradient::PadSpread);
+
+ if (this->orientation == DOWN){
+ brush.setColorAt(0.0, background);
+ brush.setColorAt(0.2, background);
+ background.setAlpha(0);
+ brush.setColorAt(1.0, background);
+ }
+ else
+ if (this->orientation == UP){
+ brush.setColorAt(1.0, background);
+ brush.setColorAt(0.8, background);
+ background.setAlpha(0);
+ brush.setColorAt(0.0, background);
+ }
+ else
+ qWarning("DockItem doesn't support the orientation given!");
+
+ painter.fillRect(0, 0, int(this->boundingRect().width()), int(this->boundingRect().height()), brush);
+
+}
+
+DockItem::~DockItem()
+{
+ delete this->pixmap;
+}
+
+QRectF DockItem::boundingRect() const
+{
+ if (this->orientation == UP || this->orientation == DOWN)
+ return QRectF(0, 0, this->length, this->width);
+ else
+ return QRectF(0, 0, this->width, this->length);
+}
+
+void DockItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->drawPixmap(0, 0, *this->pixmap);
+}
+
+
+
diff --git a/demos/qtdemo/dockitem.h b/demos/qtdemo/dockitem.h
new file mode 100644
index 0000000..13473a3
--- /dev/null
+++ b/demos/qtdemo/dockitem.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOCK_ITEM_H
+#define DOCK_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class DockItem : public DemoItem
+{
+public:
+ enum ORIENTATION {UP, DOWN, LEFT, RIGHT};
+
+ DockItem(ORIENTATION orien, qreal x, qreal y, qreal width, qreal length, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ virtual ~DockItem();
+
+ virtual QRectF boundingRect() const; // overridden
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); // overridden
+
+ qreal length;
+ qreal width;
+ ORIENTATION orientation;
+
+private:
+ void setupPixmap();
+ QPixmap *pixmap;
+};
+
+#endif // DOCK_ITEM_H
+
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
new file mode 100644
index 0000000..a568b8c
--- /dev/null
+++ b/demos/qtdemo/examplecontent.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "examplecontent.h"
+#include "colors.h"
+#include "menumanager.h"
+#include "imageitem.h"
+#include "headingitem.h"
+
+ExampleContent::ExampleContent(const QString &name, QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ this->name = name;
+ this->heading = 0;
+ this->description = 0;
+ this->screenshot = 0;
+}
+
+void ExampleContent::prepare()
+{
+ if (!this->prepared){
+ this->prepared = true;
+ this->createContent();
+ }
+}
+
+void ExampleContent::animationStopped(int id)
+{
+ if (id == DemoItemAnimation::ANIM_OUT){
+ // Free up some memory:
+ delete this->heading;
+ delete this->description;
+ delete this->screenshot;
+ this->heading = 0;
+ this->description = 0;
+ this->screenshot = 0;
+ this->prepared = false;
+ }
+}
+
+QString ExampleContent::loadDescription()
+{
+ QByteArray ba = MenuManager::instance()->getHtml(this->name);
+
+ QDomDocument exampleDoc;
+ exampleDoc.setContent(ba, false);
+
+ QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");
+ if (paragraphs.length() < 1 && Colors::verbose)
+ qDebug() << "- ExampleContent::loadDescription(): Could not load description:" << MenuManager::instance()->info[this->name]["docfile"];
+ QString description = Colors::contentColor + QLatin1String("Could not load description. Ensure that the documentation for Qt is built.");
+ for (int p = 0; p < int(paragraphs.length()); ++p) {
+ description = this->extractTextFromParagraph(paragraphs.item(p));
+ if (this->isSummary(description)) {
+ break;
+ }
+ }
+ return Colors::contentColor + description;
+}
+
+bool ExampleContent::isSummary(const QString &text)
+{
+ return (!text.contains("[") &&
+ text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), Qt::CaseInsensitive)) != -1);
+}
+
+QString ExampleContent::extractTextFromParagraph(const QDomNode &parentNode)
+{
+ QString description;
+ QDomNode node = parentNode.firstChild();
+
+ while (!node.isNull()) {
+ QString beginTag;
+ QString endTag;
+ if (node.isText())
+ description += Colors::contentColor + node.nodeValue();
+ else if (node.hasChildNodes()) {
+ if (node.nodeName() == "b") {
+ beginTag = "<b>";
+ endTag = "</b>";
+ } else if (node.nodeName() == "a") {
+ beginTag = Colors::contentColor;
+ endTag = "</font>";
+ } else if (node.nodeName() == "i") {
+ beginTag = "<i>";
+ endTag = "</i>";
+ } else if (node.nodeName() == "tt") {
+ beginTag = "<tt>";
+ endTag = "</tt>";
+ }
+ description += beginTag + this->extractTextFromParagraph(node) + endTag;
+ }
+ node = node.nextSibling();
+ }
+
+ return description;
+}
+
+void ExampleContent::createContent()
+{
+ // Create the items:
+ this->heading = new HeadingItem(this->name, this->scene(), this);
+ this->description = new DemoTextItem(this->loadDescription(), Colors::contentFont(),
+ Colors::heading, 500, this->scene(), this);
+ int imgHeight = 340 - int(this->description->boundingRect().height()) + 50;
+ this->screenshot = new ImageItem(QImage::fromData(MenuManager::instance()->getImage(this->name)),
+ 550, imgHeight, this->scene(), this);
+
+ // Place the items on screen:
+ this->heading->setPos(0, 3);
+ this->description->setPos(0, this->heading->pos().y() + this->heading->boundingRect().height() + 10);
+ this->screenshot->setPos(0, this->description->pos().y() + this->description->boundingRect().height() + 10);
+}
+
+QRectF ExampleContent::boundingRect() const
+{
+ return QRectF(0, 0, 500, 100);
+}
+
+
diff --git a/demos/qtdemo/examplecontent.h b/demos/qtdemo/examplecontent.h
new file mode 100644
index 0000000..850d64b
--- /dev/null
+++ b/demos/qtdemo/examplecontent.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTENT_ITEM_H
+#define CONTENT_ITEM_H
+
+#include <QtGui>
+#include <QtXml>
+#include "demoitem.h"
+
+class HeadingItem;
+class DemoTextItem;
+class ImageItem;
+
+class ExampleContent : public DemoItem
+{
+
+public:
+ ExampleContent(const QString &name, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0){};
+ void animationStopped(int id);
+ void prepare();
+
+private:
+ QString name;
+ HeadingItem *heading;
+ DemoTextItem *description;
+ ImageItem *screenshot;
+
+ QString loadDescription();
+ QString extractTextFromParagraph(const QDomNode &parentNode);
+ bool isSummary(const QString &text);
+ void createContent();
+};
+
+#endif // CONTENT_ITEM_H
+
diff --git a/demos/qtdemo/guide.cpp b/demos/qtdemo/guide.cpp
new file mode 100644
index 0000000..1f3c355
--- /dev/null
+++ b/demos/qtdemo/guide.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <cmath>
+#include "guide.h"
+#include "colors.h"
+
+Guide::Guide(Guide *follows)
+{
+ this->scaleX = 1.0;
+ this->scaleY = 1.0;
+
+ if (follows){
+ while (follows->nextGuide != follows->firstGuide) // append to end
+ follows = follows->nextGuide;
+
+ follows->nextGuide = this;
+ this->prevGuide = follows;
+ this->firstGuide = follows->firstGuide;
+ this->nextGuide = follows->firstGuide;
+ this->startLength = int(follows->startLength + follows->length()) + 1;
+ }
+ else{
+ this->prevGuide = this;
+ this->firstGuide = this;
+ this->nextGuide = this;
+ this->startLength = 0;
+ }
+}
+
+void Guide::setScale(float scaleX, float scaleY, bool all)
+{
+ this->scaleX = scaleX;
+ this->scaleY = scaleY;
+
+ if (all){
+ Guide *next = this->nextGuide;
+ while(next != this){
+ next->scaleX = scaleX;
+ next->scaleY = scaleY;
+ next = next->nextGuide;
+ }
+ }
+}
+
+void Guide::setFence(const QRectF &fence, bool all)
+{
+ this->fence = fence;
+
+ if (all){
+ Guide *next = this->nextGuide;
+ while(next != this){
+ next->fence = fence;
+ next = next->nextGuide;
+ }
+ }
+}
+
+Guide::~Guide()
+{
+ if (this != this->nextGuide && this->nextGuide != this->firstGuide)
+ delete this->nextGuide;
+}
+
+float Guide::lengthAll()
+{
+ float len = length();
+ Guide *next = this->nextGuide;
+ while(next != this){
+ len += next->length();
+ next = next->nextGuide;
+ }
+ return len;
+}
+
+void Guide::move(DemoItem *item, QPointF &dest, float moveSpeed)
+{
+ QLineF walkLine(item->getGuidedPos(), dest);
+ if (moveSpeed >= 0 && walkLine.length() > moveSpeed){
+ // The item is too far away from it's destination point.
+ // So we choose to move it towards it instead.
+ float dx = walkLine.dx();
+ float dy = walkLine.dy();
+
+ if (qAbs(dx) > qAbs(dy)){
+ // walk along x-axis
+ if (dx != 0){
+ float d = moveSpeed * dy / qAbs(dx);
+ float s = dx > 0 ? moveSpeed : -moveSpeed;
+ dest.setX(item->getGuidedPos().x() + s);
+ dest.setY(item->getGuidedPos().y() + d);
+ }
+ }
+ else{
+ // walk along y-axis
+ if (dy != 0){
+ float d = moveSpeed * dx / qAbs(dy);
+ float s = dy > 0 ? moveSpeed : -moveSpeed;
+ dest.setX(item->getGuidedPos().x() + d);
+ dest.setY(item->getGuidedPos().y() + s);
+ }
+ }
+ }
+
+ item->setGuidedPos(dest);
+}
diff --git a/demos/qtdemo/guide.h b/demos/qtdemo/guide.h
new file mode 100644
index 0000000..51ce6c3
--- /dev/null
+++ b/demos/qtdemo/guide.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GUIDE_H
+#define GUIDE_H
+
+#include "demoitem.h"
+
+class Guide
+{
+public:
+ Guide(Guide *follows = 0);
+ virtual ~Guide();
+
+ virtual void guide(DemoItem *item, float moveSpeed) = 0;
+ void move(DemoItem *item, QPointF &dest, float moveSpeed);
+ virtual QPointF startPos(){ return QPointF(0, 0); };
+ virtual QPointF endPos(){ return QPointF(0, 0); };
+ virtual float length(){ return 1; };
+ float lengthAll();
+
+ void setScale(float scaleX, float scaleY, bool all = true);
+ void setFence(const QRectF &fence, bool all = true);
+
+ int startLength;
+ Guide *nextGuide;
+ Guide *firstGuide;
+ Guide *prevGuide;
+ float scaleX;
+ float scaleY;
+ QRectF fence;
+};
+
+#endif // GUIDE_H
+
diff --git a/demos/qtdemo/guidecircle.cpp b/demos/qtdemo/guidecircle.cpp
new file mode 100644
index 0000000..98328dc
--- /dev/null
+++ b/demos/qtdemo/guidecircle.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "guidecircle.h"
+
+static float PI2 = 2*3.1415f;
+
+GuideCircle::GuideCircle(const QRectF &rect, float startAngle, float span, DIRECTION dir, Guide *follows) : Guide(follows)
+{
+ this->radiusX = rect.width() / 2.0;
+ this->radiusY = rect.height() / 2.0;
+ this->posX = rect.topLeft().x();
+ this->posY = rect.topLeft().y();
+ this->spanRad = span * PI2 / -360.0;
+ if (dir == CCW){
+ this->startAngleRad = startAngle * PI2 / -360.0;
+ this->endAngleRad = startAngleRad + spanRad;
+ this->stepAngleRad = this->spanRad / this->length();
+ }
+ else{
+ this->startAngleRad = spanRad + (startAngle * PI2 / -360.0);
+ this->endAngleRad = startAngle * PI2 / -360.0;
+ this->stepAngleRad = -this->spanRad / this->length();
+ }
+}
+
+float GuideCircle::length()
+{
+ return qAbs(this->radiusX * spanRad);
+}
+
+QPointF GuideCircle::startPos()
+{
+ return QPointF((posX + radiusX + radiusX * cos(startAngleRad)) * scaleX,
+ (posY + radiusY + radiusY * sin(startAngleRad)) * scaleY);
+}
+
+QPointF GuideCircle::endPos()
+{
+ return QPointF((posX + radiusX + radiusX * cos(endAngleRad)) * scaleX,
+ (posY + radiusY + radiusY * sin(endAngleRad)) * scaleY);
+}
+
+void GuideCircle::guide(DemoItem *item, float moveSpeed)
+{
+ float frame = item->guideFrame - this->startLength;
+ QPointF end((posX + radiusX + radiusX * cos(startAngleRad + (frame * stepAngleRad))) * scaleX,
+ (posY + radiusY + radiusY * sin(startAngleRad + (frame * stepAngleRad))) * scaleY);
+ this->move(item, end, moveSpeed);
+}
diff --git a/demos/qtdemo/guidecircle.h b/demos/qtdemo/guidecircle.h
new file mode 100644
index 0000000..2179527
--- /dev/null
+++ b/demos/qtdemo/guidecircle.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GUIDECIRCLE_H
+#define GUIDECIRCLE_H
+
+#include "guide.h"
+#include "demoitem.h"
+
+class GuideCircle : public Guide
+{
+public:
+ enum DIRECTION {CW = 1, CCW = -1};
+
+ GuideCircle(const QRectF &rect, float startAngle = 0, float span = 360, DIRECTION dir = CCW, Guide *follows = 0);
+
+ void guide(DemoItem *item, float moveSpeed); // overridden
+ QPointF startPos();
+ QPointF endPos();
+ float length();
+
+private:
+ float posX;
+ float posY;
+ float radiusX;
+ float radiusY;
+ float startAngleRad;
+ float endAngleRad;
+ float spanRad;
+ float stepAngleRad;
+};
+
+#endif // GUIDECIRCLE_H
+
diff --git a/demos/qtdemo/guideline.cpp b/demos/qtdemo/guideline.cpp
new file mode 100644
index 0000000..ac01339
--- /dev/null
+++ b/demos/qtdemo/guideline.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "guideline.h"
+#include <cmath>
+
+GuideLine::GuideLine(const QLineF &line, Guide *follows) : Guide(follows)
+{
+ this->line = line;
+}
+
+GuideLine::GuideLine(const QPointF &end, Guide *follows) : Guide(follows)
+{
+ if (follows)
+ this->line = QLineF(prevGuide->endPos(), end);
+ else
+ this->line = QLineF(QPointF(0, 0), end);
+}
+
+float GuideLine::length()
+{
+ return line.length();
+}
+
+QPointF GuideLine::startPos()
+{
+ return QPointF(this->line.p1().x() * scaleX, this->line.p1().y() * scaleY);
+}
+
+QPointF GuideLine::endPos()
+{
+ return QPointF(this->line.p2().x() * scaleX, this->line.p2().y() * scaleY);
+}
+
+void GuideLine::guide(DemoItem *item, float moveSpeed)
+{
+ float frame = item->guideFrame - this->startLength;
+ float endX = (this->line.p1().x() + (frame * this->line.dx() / this->length())) * scaleX;
+ float endY = (this->line.p1().y() + (frame * this->line.dy() / this->length())) * scaleY;
+ QPointF pos(endX, endY);
+ this->move(item, pos, moveSpeed);
+}
+
diff --git a/demos/qtdemo/guideline.h b/demos/qtdemo/guideline.h
new file mode 100644
index 0000000..93daaa8
--- /dev/null
+++ b/demos/qtdemo/guideline.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GUIDELINE_H
+#define GUIDELINE_H
+
+#include "guide.h"
+#include "demoitem.h"
+
+class GuideLine : public Guide
+{
+public:
+ GuideLine(const QLineF &line, Guide *follows = 0);
+ GuideLine(const QPointF &end, Guide *follows = 0);
+
+ void guide(DemoItem *item, float moveSpeed); // overridden
+ QPointF startPos();
+ QPointF endPos();
+ float length();
+
+private:
+ QLineF line;
+
+};
+
+#endif // GUIDELINE_H
+
diff --git a/demos/qtdemo/headingitem.cpp b/demos/qtdemo/headingitem.cpp
new file mode 100644
index 0000000..80a255a
--- /dev/null
+++ b/demos/qtdemo/headingitem.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "headingitem.h"
+#include "colors.h"
+
+HeadingItem::HeadingItem(const QString &text, QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ this->text = text;
+ this->noSubPixeling = true;
+}
+
+QImage *HeadingItem::createImage(const QMatrix &matrix) const
+{
+ float sx = qMin(matrix.m11(), matrix.m22());
+ float sy = matrix.m22() < sx ? sx : matrix.m22();
+ QFontMetrics fm(Colors::headingFont());
+
+ float w = fm.width(this->text) + 1;
+ float h = fm.height();
+ float xShadow = 3.0f;
+ float yShadow = 3.0f;
+
+ QImage *image = new QImage(int((w + xShadow) * sx), int((h + yShadow) * sy), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.setFont(Colors::headingFont());
+ painter.scale(sx, sy);
+
+ //draw shadow
+ QLinearGradient brush_shadow(xShadow, yShadow, w, yShadow);
+ brush_shadow.setSpread(QLinearGradient::PadSpread);
+ if (Colors::useEightBitPalette)
+ brush_shadow.setColorAt(0.0f, QColor(0, 0, 0));
+ else
+ brush_shadow.setColorAt(0.0f, QColor(0, 0, 0, 100));
+ QPen pen_shadow;
+ pen_shadow.setBrush(brush_shadow);
+ painter.setPen(pen_shadow);
+ painter.drawText(int(xShadow), int(yShadow), int(w), int(h), Qt::AlignLeft, this->text);
+
+ // draw text
+ QLinearGradient brush_text(0, 0, w, w);
+ brush_text.setSpread(QLinearGradient::PadSpread);
+ brush_text.setColorAt(0.0f, QColor(255, 255, 255));
+ brush_text.setColorAt(0.2f, QColor(255, 255, 255));
+ brush_text.setColorAt(0.5f, QColor(190, 190, 190));
+ QPen pen_text;
+ pen_text.setBrush(brush_text);
+ painter.setPen(pen_text);
+ painter.drawText(0, 0, int(w), int(h), Qt::AlignLeft, this->text);
+ return image;
+}
+
+
+void HeadingItem::animationStarted(int)
+{
+ this->noSubPixeling = false;
+}
+
+
+void HeadingItem::animationStopped(int)
+{
+ this->noSubPixeling = true;
+}
diff --git a/demos/qtdemo/headingitem.h b/demos/qtdemo/headingitem.h
new file mode 100644
index 0000000..a5cb997
--- /dev/null
+++ b/demos/qtdemo/headingitem.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HEADING_ITEM_H
+#define HEADING_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class HeadingItem : public DemoItem
+{
+public:
+ HeadingItem(const QString &text, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ void animationStarted(int id = 0);
+ void animationStopped(int id = 0);
+
+protected:
+ virtual QImage *createImage(const QMatrix &matrix) const; // overridden
+
+private:
+ QString text;
+};
+
+#endif // HEADING_ITEM_H
+
diff --git a/demos/qtdemo/imageitem.cpp b/demos/qtdemo/imageitem.cpp
new file mode 100644
index 0000000..e556011
--- /dev/null
+++ b/demos/qtdemo/imageitem.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imageitem.h"
+#include "colors.h"
+
+ImageItem::ImageItem(const QImage &image, int maxWidth, int maxHeight, QGraphicsScene *scene,
+ QGraphicsItem *parent, bool adjustSize, float scale) : DemoItem(scene, parent)
+{
+ this->image = image;
+ this->maxWidth = maxWidth;
+ this->maxHeight = maxHeight;
+ this->adjustSize = adjustSize;
+ this->scale = scale;
+}
+
+QImage *ImageItem::createImage(const QMatrix &matrix) const
+{
+ QImage *original = new QImage(image);
+ if (original->isNull()){
+ return original; // nothing we can do about it...
+ }
+
+ QPoint size = matrix.map(QPoint(this->maxWidth, this->maxHeight));
+ float w = size.x(); // x, y is the used as width, height
+ float h = size.y();
+
+ // Optimization: if image is smaller than maximum allowed size, just return the loaded image
+ if (original->size().height() <= h && original->size().width() <= w && !this->adjustSize && this->scale == 1)
+ return original;
+
+ // Calculate what the size of the final image will be:
+ w = qMin(w, float(original->size().width()) * this->scale);
+ h = qMin(h, float(original->size().height()) * this->scale);
+
+ float adjustx = 1.0f;
+ float adjusty = 1.0f;
+ if (this->adjustSize){
+ adjustx = qMin(matrix.m11(), matrix.m22());
+ adjusty = matrix.m22() < adjustx ? adjustx : matrix.m22();
+ w *= adjustx;
+ h *= adjusty;
+ }
+
+ // Create a new image with correct size, and draw original on it
+ QImage *image = new QImage(int(w+2), int(h+2), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ if (this->adjustSize)
+ painter.scale(adjustx, adjusty);
+ if (this->scale != 1)
+ painter.scale(this->scale, this->scale);
+ painter.drawImage(0, 0, *original);
+
+ if (!this->adjustSize){
+ // Blur out edges
+ int blur = 30;
+ if (h < original->height()){
+ QLinearGradient brush1(0, h - blur, 0, h);
+ brush1.setSpread(QGradient::PadSpread);
+ brush1.setColorAt(0.0, QColor(0, 0, 0, 0));
+ brush1.setColorAt(1.0, Colors::sceneBg1);
+ painter.fillRect(0, int(h) - blur, original->width(), int(h), brush1);
+ }
+ if (w < original->width()){
+ QLinearGradient brush2(w - blur, 0, w, 0);
+ brush2.setSpread(QGradient::PadSpread);
+ brush2.setColorAt(0.0, QColor(0, 0, 0, 0));
+ brush2.setColorAt(1.0, Colors::sceneBg1);
+ painter.fillRect(int(w) - blur, 0, int(w), original->height(), brush2);
+ }
+ }
+ delete original;
+ return image;
+}
diff --git a/demos/qtdemo/imageitem.h b/demos/qtdemo/imageitem.h
new file mode 100644
index 0000000..e73079a
--- /dev/null
+++ b/demos/qtdemo/imageitem.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGE_ITEM_H
+#define IMAGE_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class ImageItem : public DemoItem
+{
+public:
+ ImageItem(const QImage &image, int maxWidth, int maxHeight, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0,
+ bool adjustSize = false, float scale = 1.0f);
+
+ bool adjustSize;
+ float scale;
+protected:
+ QImage *createImage(const QMatrix &matrix) const;
+
+private:
+ QImage image;
+ int maxWidth;
+ int maxHeight;
+};
+
+#endif // DOCK_ITEM_H
+
diff --git a/demos/qtdemo/images/demobg.png b/demos/qtdemo/images/demobg.png
new file mode 100755
index 0000000..3280afa
--- /dev/null
+++ b/demos/qtdemo/images/demobg.png
Binary files differ
diff --git a/demos/qtdemo/images/qtlogo_small.png b/demos/qtdemo/images/qtlogo_small.png
new file mode 100644
index 0000000..21b17df
--- /dev/null
+++ b/demos/qtdemo/images/qtlogo_small.png
Binary files differ
diff --git a/demos/qtdemo/images/trolltech-logo.png b/demos/qtdemo/images/trolltech-logo.png
new file mode 100644
index 0000000..186c69c
--- /dev/null
+++ b/demos/qtdemo/images/trolltech-logo.png
Binary files differ
diff --git a/demos/qtdemo/itemcircleanimation.cpp b/demos/qtdemo/itemcircleanimation.cpp
new file mode 100644
index 0000000..fff52bb
--- /dev/null
+++ b/demos/qtdemo/itemcircleanimation.cpp
@@ -0,0 +1,507 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "itemcircleanimation.h"
+#include "demoitemanimation.h"
+#include "colors.h"
+#include "menumanager.h"
+#include "mainwindow.h"
+#include "menumanager.h"
+
+static QGraphicsScene *sscene;
+
+//////////////////// POST EFFECT STUFF ////////////////////////////////////////
+
+class TickerPostEffect
+{
+public:
+ virtual ~TickerPostEffect(){};
+ virtual void tick(float){};
+ virtual void transform(DemoItem *, QPointF &){};
+};
+
+class PostRotateXY : public TickerPostEffect
+{
+public:
+ float currRotX, currRotY;
+ float speedx, speedy, curvx, curvy;
+
+ PostRotateXY(float speedx, float speedy, float curvx, float curvy)
+ : currRotX(0), currRotY(0),
+ speedx(speedx), speedy(speedy),
+ curvx(curvx), curvy(curvy){};
+
+ void tick(float adjust)
+ {
+ currRotX += speedx * adjust;
+ currRotY += speedy * adjust;
+ }
+
+ void transform(DemoItem *item, QPointF &pos)
+ {
+ DemoItem *parent = (DemoItem *) item->parentItem();
+ QPointF center = parent->boundingRect().center();
+ pos.setX(center.x() + (pos.x() - center.x()) * cos(currRotX + pos.x() * curvx));
+ pos.setY(center.y() + (pos.y() - center.y()) * cos(currRotY + pos.y() * curvy));
+ }
+};
+
+class PostRotateXYTwist : public TickerPostEffect
+{
+public:
+ float currRotX, currRotY;
+ float speedx, speedy, curvx, curvy;
+
+ PostRotateXYTwist(float speedx, float speedy, float curvx, float curvy)
+ : currRotX(0), currRotY(0),
+ speedx(speedx), speedy(speedy),
+ curvx(curvx), curvy(curvy){};
+
+ void tick(float adjust)
+ {
+ currRotX += speedx * adjust;
+ currRotY += speedy * adjust;
+ }
+
+ void transform(DemoItem *item, QPointF &pos)
+ {
+ DemoItem *parent = (DemoItem *) item->parentItem();
+ QPointF center = parent->boundingRect().center();
+ pos.setX(center.x() + (pos.x() - center.x()) * cos(currRotX + pos.y() * curvx));
+ pos.setY(center.y() + (pos.y() - center.y()) * cos(currRotY + pos.x() * curvy));
+ }
+};
+
+//////////////////// TICKER EFFECT STUFF //////////////////////////////////////
+
+class TickerEffect
+{
+ TickerPostEffect *postEffect;
+public:
+ enum EffectStatus{Normal, Intro, Outro} status;
+ LetterList *letters;
+ float morphSpeed, moveSpeed;
+ float normalMorphSpeed, normalMoveSpeed;
+ bool useSheepDog, morphBetweenModels;
+
+ TickerEffect(LetterList *letters)
+ : postEffect(new TickerPostEffect()), status(Intro), letters(letters),
+ morphSpeed(Colors::tickerMorphSpeed), moveSpeed(Colors::tickerMoveSpeed),
+ normalMorphSpeed(Colors::tickerMorphSpeed), normalMoveSpeed(Colors::tickerMoveSpeed),
+ useSheepDog(true), morphBetweenModels(!Colors::noTickerMorph){}
+
+ void setPostEffect(TickerPostEffect *effect)
+ {
+ delete postEffect;
+ postEffect = effect;
+ }
+
+ virtual ~TickerEffect()
+ {
+ delete postEffect;
+ }
+
+ void slowDownAfterIntro(float adjust)
+ {
+ if (morphBetweenModels){
+ if (status == Intro){
+ float dec = 0.1 * adjust;
+ moveSpeed -= dec;
+ if (moveSpeed < Colors::tickerMoveSpeed){
+ moveSpeed = normalMoveSpeed;
+ morphSpeed = normalMorphSpeed;
+ status = Normal;
+ }
+ }
+ }
+ }
+
+ void moveLetters(float adjust)
+ {
+ float adaptedMoveSpeed = this->moveSpeed * adjust;
+ float adaptedMorphSpeed = this->morphSpeed * adjust;
+ postEffect->tick(adjust);
+
+ for (int i=0; i<letters->size(); i++){
+ LetterItem *letter = letters->at(i);
+ letter->guideAdvance(this->morphBetweenModels ? adaptedMoveSpeed : Colors::tickerMoveSpeed);
+ letter->guideMove(this->morphBetweenModels ? adaptedMorphSpeed : -1);
+
+ QPointF pos = letter->getGuidedPos();
+ postEffect->transform(letter, pos);
+
+ if (useSheepDog)
+ letter->setPosUsingSheepDog(pos, QRectF(0, 0, 800, 600));
+ else
+ letter->setPos(pos);
+ }
+ }
+
+ virtual void tick(float adjust)
+ {
+ slowDownAfterIntro(adjust);
+ moveLetters(adjust);
+ }
+
+};
+
+class EffectWhirlWind : public TickerEffect
+{
+public:
+ EffectWhirlWind(LetterList *letters) : TickerEffect(letters)
+ {
+ moveSpeed = 50;
+ for (int i=0; i<this->letters->size(); i++){
+ LetterItem *letter = this->letters->at(i);
+ letter->setGuidedPos(QPointF(0, 100));
+ }
+ }
+};
+
+class EffectSnake : public TickerEffect
+{
+public:
+ EffectSnake(LetterList *letters) : TickerEffect(letters)
+ {
+ moveSpeed = 40;
+ for (int i=0; i<this->letters->size(); i++){
+ LetterItem *letter = this->letters->at(i);
+ letter->setGuidedPos(QPointF(0, -250 - (i * 5)));
+ }
+ }
+};
+
+class EffectScan : public TickerEffect
+{
+public:
+ EffectScan(LetterList *letters) : TickerEffect(letters)
+ {
+ for (int i=0; i<this->letters->size(); i++){
+ LetterItem *letter = this->letters->at(i);
+ letter->setGuidedPos(QPointF(100, -300));
+ }
+ }
+};
+
+class EffectRaindrops : public TickerEffect
+{
+public:
+ EffectRaindrops(LetterList *letters) : TickerEffect(letters)
+ {
+ for (int i=0; i<this->letters->size(); i++){
+ LetterItem *letter = this->letters->at(i);
+ letter->setGuidedPos(QPointF(-100 + rand() % 200, - 200.0f - rand() % 1300));
+ }
+ }
+};
+
+class EffectLine : public TickerEffect
+{
+public:
+ EffectLine(LetterList *letters) : TickerEffect(letters)
+ {
+ for (int i=0; i<this->letters->size(); i++){
+ LetterItem *letter = this->letters->at(i);
+ letter->setGuidedPos(QPointF(100, 500.0f + i * 20));
+ }
+ }
+};
+
+//////////////////// TICKER STUFF /////////////////////////////////////////////
+
+ItemCircleAnimation::ItemCircleAnimation(QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ sscene = scene;
+ this->letterCount = Colors::tickerLetterCount;
+ this->scale = 1;
+ this->showCount = -1;
+ this->tickOnPaint = false;
+ this->paused = false;
+ this->doIntroTransitions = true;
+ this->setAcceptsHoverEvents(true);
+ this->setCursor(Qt::OpenHandCursor);
+ this->setupGuides();
+ this->setupLetters();
+ this->useGuideQt();
+ this->effect = 0;//new TickerEffect(this->letterList);
+}
+
+ItemCircleAnimation::~ItemCircleAnimation()
+{
+ delete this->letterList;
+ delete this->qtGuide1;
+ delete this->qtGuide2;
+ delete this->qtGuide3;
+ delete this->effect;
+}
+
+void ItemCircleAnimation::createLetter(char c)
+{
+ LetterItem *letter = new LetterItem(c, sscene, this);
+ this->letterList->append(letter);
+}
+
+void ItemCircleAnimation::setupLetters()
+{
+ this->letterList = new LetterList();
+
+ QString s = Colors::tickerText;
+ int len = s.length();
+ int i = 0;
+ for (; i < this->letterCount - len; i += len)
+ for (int l=0; l<len; l++)
+ createLetter(s[l].toLatin1());
+
+ // Fill inn with blanks:
+ for (; i < this->letterCount; ++i)
+ createLetter(' ');
+}
+
+void ItemCircleAnimation::setupGuides()
+{
+ int x = 0;
+ int y = 20;
+
+ this->qtGuide1 = new GuideCircle(QRectF(x, y, 260, 260), -36, 342);
+ new GuideLine(QPointF(x + 240, y + 268), this->qtGuide1);
+ new GuideLine(QPointF(x + 265, y + 246), this->qtGuide1);
+ new GuideLine(QPointF(x + 158, y + 134), this->qtGuide1);
+ new GuideLine(QPointF(x + 184, y + 109), this->qtGuide1);
+ new GuideLine(QPointF(x + 160, y + 82), this->qtGuide1);
+ new GuideLine(QPointF(x + 77, y + 163), this->qtGuide1); // T-top
+ new GuideLine(QPointF(x + 100, y + 190), this->qtGuide1);
+ new GuideLine(QPointF(x + 132, y + 159), this->qtGuide1);
+ new GuideLine(QPointF(x + 188, y + 211), this->qtGuide1);
+ new GuideCircle(QRectF(x + 30, y + 30, 200, 200), -30, 336, GuideCircle::CW, this->qtGuide1);
+ new GuideLine(QPointF(x + 238, y + 201), this->qtGuide1);
+
+ y = 30;
+ this->qtGuide2 = new GuideCircle(QRectF(x + 30, y + 30, 200, 200), 135, 270, GuideCircle::CCW);
+ new GuideLine(QPointF(x + 222, y + 38), this->qtGuide2);
+ new GuideCircle(QRectF(x, y, 260, 260), 135, 270, GuideCircle::CW, this->qtGuide2);
+ new GuideLine(QPointF(x + 59, y + 59), this->qtGuide2);
+
+ x = 115;
+ y = 10;
+ this->qtGuide3 = new GuideLine(QLineF(x, y, x + 30, y));
+ new GuideLine(QPointF(x + 30, y + 170), this->qtGuide3);
+ new GuideLine(QPointF(x, y + 170), this->qtGuide3);
+ new GuideLine(QPointF(x, y), this->qtGuide3);
+
+ this->qtGuide1->setFence(QRectF(0, 0, 800, 600));
+ this->qtGuide2->setFence(QRectF(0, 0, 800, 600));
+ this->qtGuide3->setFence(QRectF(0, 0, 800, 600));
+}
+
+void ItemCircleAnimation::useGuide(Guide *guide, int firstLetter, int lastLetter)
+{
+ float padding = guide->lengthAll() / float(lastLetter - firstLetter);
+ for (int i=firstLetter; i<lastLetter; i++){
+ LetterItem *letter = this->letterList->at(i);
+ letter->useGuide(guide, (i - firstLetter) * padding);
+ }
+}
+
+void ItemCircleAnimation::useGuideQt()
+{
+ if (this->currGuide != this->qtGuide1){
+ this->useGuide(qtGuide1, 0, this->letterCount);
+ this->currGuide = qtGuide1;
+ }
+}
+
+void ItemCircleAnimation::useGuideTt()
+{
+ if (this->currGuide != this->qtGuide2){
+ int split = int(this->letterCount * 5.0 / 7.0);
+ this->useGuide(qtGuide2, 0, split);
+ this->useGuide(qtGuide3, split, this->letterCount);
+ this->currGuide = qtGuide2;
+ }
+}
+
+QRectF ItemCircleAnimation::boundingRect() const
+{
+ return QRectF(0, 0, 300, 320);
+}
+
+void ItemCircleAnimation::prepare()
+{
+}
+
+void ItemCircleAnimation::switchToNextEffect()
+{
+ ++this->showCount;
+ delete this->effect;
+
+ switch (this->showCount){
+ case 1:
+ this->effect = new EffectSnake(this->letterList);
+ break;
+ case 2:
+ this->effect = new EffectLine(this->letterList);
+ this->effect->setPostEffect(new PostRotateXYTwist(0.01f, 0.0f, 0.003f, 0.0f));
+ break;
+ case 3:
+ this->effect = new EffectRaindrops(this->letterList);
+ this->effect->setPostEffect(new PostRotateXYTwist(0.01f, 0.005f, 0.003f, 0.003f));
+ break;
+ case 4:
+ this->effect = new EffectScan(this->letterList);
+ this->effect->normalMoveSpeed = 0;
+ this->effect->setPostEffect(new PostRotateXY(0.008f, 0.0f, 0.005f, 0.0f));
+ break;
+ default:
+ this->showCount = 0;
+ this->effect = new EffectWhirlWind(this->letterList);
+ }
+}
+
+void ItemCircleAnimation::animationStarted(int id)
+{
+ if (id == DemoItemAnimation::ANIM_IN){
+ if (this->doIntroTransitions){
+ // Make all letters dissapear
+ for (int i=0; i<this->letterList->size(); i++){
+ LetterItem *letter = this->letterList->at(i);
+ letter->setPos(1000, 0);
+ }
+ this->switchToNextEffect();
+ this->useGuideQt();
+ this->scale = 1;
+ // The first time we run, we have a rather large
+ // delay to perform benchmark before the ticker shows.
+ // But now, since we are showing, use a more appropriate value:
+ this->currentAnimation->startDelay = 1500;
+ }
+ }
+ else if (this->effect)
+ this->effect->useSheepDog = false;
+
+ this->tickTimer = QTime::currentTime();
+}
+
+void ItemCircleAnimation::animationStopped(int)
+{
+ // Nothing to do.
+}
+
+void ItemCircleAnimation::swapModel(){
+ if (this->currGuide == this->qtGuide2)
+ this->useGuideQt();
+ else
+ this->useGuideTt();
+}
+
+void ItemCircleAnimation::hoverEnterEvent(QGraphicsSceneHoverEvent *)
+{
+// Skip swap here to enhance ticker dragging
+// this->swapModel();
+}
+
+void ItemCircleAnimation::hoverLeaveEvent(QGraphicsSceneHoverEvent *)
+{
+ this->swapModel();
+}
+
+void ItemCircleAnimation::setTickerScale(float s)
+{
+ this->scale = s;
+ qtGuide1->setScale(this->scale, this->scale);
+ qtGuide2->setScale(this->scale, this->scale);
+ qtGuide3->setScale(this->scale, this->scale);
+}
+
+void ItemCircleAnimation::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ this->mouseMoveLastPosition = event->scenePos();
+ if (event->button() == Qt::LeftButton)
+ this->setCursor(Qt::ClosedHandCursor);
+ else
+ this->switchToNextEffect();
+}
+
+void ItemCircleAnimation::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ this->setCursor(Qt::OpenHandCursor);
+}
+
+void ItemCircleAnimation::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ QPointF newPosition = event->scenePos();
+ this->setPosUsingSheepDog(this->pos() + newPosition - this->mouseMoveLastPosition, QRectF(-260, -280, 1350, 1160));
+ this->mouseMoveLastPosition = newPosition;
+}
+
+void ItemCircleAnimation::wheelEvent(QGraphicsSceneWheelEvent *event)
+{
+ this->effect->moveSpeed = this->effect->moveSpeed + (event->delta() > 0 ? -0.20 : 0.20);
+ if (this->effect->moveSpeed < 0)
+ this->effect->moveSpeed = 0;
+}
+
+void ItemCircleAnimation::pause(bool on)
+{
+ this->paused = on;
+ this->tickTimer = QTime::currentTime();
+}
+
+void ItemCircleAnimation::tick()
+{
+ if (this->paused || !this->effect)
+ return;
+
+ float t = this->tickTimer.msecsTo(QTime::currentTime());
+ this->tickTimer = QTime::currentTime();
+ this->effect->tick(t/10.0f);
+}
+
+void ItemCircleAnimation::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ if (this->tickOnPaint)
+ tick();
+}
+
+
+
+
diff --git a/demos/qtdemo/itemcircleanimation.h b/demos/qtdemo/itemcircleanimation.h
new file mode 100644
index 0000000..27e399c
--- /dev/null
+++ b/demos/qtdemo/itemcircleanimation.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ITEM_CIRCLE_ANIMATION_H
+#define ITEM_CIRCLE_ANIMATION_H
+
+#include <QtCore>
+#include <QObject>
+#include <QtGui>
+#include <QTimeLine>
+#include <QList>
+#include "demoitem.h"
+#include "letteritem.h"
+#include "guideline.h"
+#include "guidecircle.h"
+
+typedef QList<LetterItem *> LetterList;
+class TickerEffect;
+
+class ItemCircleAnimation : public QObject, public DemoItem
+{
+public:
+ ItemCircleAnimation(QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ virtual ~ItemCircleAnimation();
+
+ // overidden methods:
+ QRectF boundingRect() const;
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void wheelEvent(QGraphicsSceneWheelEvent *event);
+ void animationStarted(int id = 0);
+ void animationStopped(int id = 0);
+ void prepare();
+ void tick();
+ void switchToNextEffect();
+ void useGuideQt();
+ void useGuideTt();
+ void pause(bool on);
+
+ bool tickOnPaint;
+ bool paused;
+ bool doIntroTransitions;
+
+private:
+ void setupLetters();
+ void createLetter(char c);
+ void setupGuides();
+ void useGuide(Guide *guide, int firstLetter, int lastLetter);
+ void swapModel();
+ void setTickerScale(float s);
+
+ int showCount;
+ float scale;
+ QPointF mouseMoveLastPosition;
+ int letterCount;
+ LetterList *letterList;
+ Guide *qtGuide1;
+ Guide *qtGuide2;
+ Guide *qtGuide3;
+ Guide *currGuide;
+ TickerEffect *effect;
+ QTime tickTimer;
+};
+
+#endif // ITEM_CIRCLE_ANIMATION_H
+
+
+
diff --git a/demos/qtdemo/letteritem.cpp b/demos/qtdemo/letteritem.cpp
new file mode 100644
index 0000000..7b814b1
--- /dev/null
+++ b/demos/qtdemo/letteritem.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <cmath>
+#include "letteritem.h"
+#include "colors.h"
+
+LetterItem::LetterItem(char letter, QGraphicsScene *scene, QGraphicsItem *parent) : DemoItem(scene, parent), letter(letter)
+{
+ useSharedImage(QString(__FILE__) + letter);
+}
+
+LetterItem::~LetterItem()
+{
+}
+
+QImage *LetterItem::createImage(const QMatrix &matrix) const
+{
+ QRect scaledRect = matrix.mapRect(QRect(0, 0, 25, 25));
+ QImage *image = new QImage(scaledRect.width(), scaledRect.height(), QImage::Format_ARGB32_Premultiplied);
+ image->fill(0);
+ QPainter painter(image);
+ painter.scale(matrix.m11(), matrix.m22());
+ painter.setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ painter.setPen(Qt::NoPen);
+ if (Colors::useEightBitPalette){
+ painter.setBrush(QColor(102, 175, 54));
+ painter.drawEllipse(0, 0, 25, 25);
+ painter.setFont(Colors::tickerFont());
+ painter.setPen(QColor(255, 255, 255));
+ painter.drawText(10, 15, QString(this->letter));
+ }
+ else {
+ QLinearGradient brush(0, 0, 0, 25);
+ brush.setSpread(QLinearGradient::PadSpread);
+ brush.setColorAt(0.0, QColor(102, 175, 54, 200));
+ brush.setColorAt(1.0, QColor(102, 175, 54, 60));
+ painter.setBrush(brush);
+ painter.drawEllipse(0, 0, 25, 25);
+ painter.setFont(Colors::tickerFont());
+ painter.setPen(QColor(255, 255, 255, 255));
+ painter.drawText(10, 15, QString(this->letter));
+ }
+ return image;
+}
+
+
diff --git a/demos/qtdemo/letteritem.h b/demos/qtdemo/letteritem.h
new file mode 100644
index 0000000..8c3f16e
--- /dev/null
+++ b/demos/qtdemo/letteritem.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LETTER_ITEM_H
+#define LETTER_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class LetterItem : public DemoItem
+{
+public:
+ LetterItem(char letter, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ virtual ~LetterItem();
+
+protected:
+ QImage *createImage(const QMatrix &matrix) const;
+
+private:
+ char letter;
+};
+
+#endif // LETTER_ITEM_H
+
diff --git a/demos/qtdemo/main.cpp b/demos/qtdemo/main.cpp
new file mode 100644
index 0000000..bf2028d
--- /dev/null
+++ b/demos/qtdemo/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+#include "menumanager.h"
+#include "colors.h"
+
+static void artisticSleep(int sleepTime)
+{
+ QTime time;
+ time.restart();
+ while (time.elapsed() < sleepTime)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
+}
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(qtdemo);
+ QApplication app(argc, argv);
+ Colors::parseArgs(argc, argv);
+ MainWindow mainWindow;
+ MenuManager::instance()->init(&mainWindow);
+ mainWindow.setFocus();
+
+ if (Colors::fullscreen)
+ mainWindow.showFullScreen();
+ else {
+ mainWindow.enableMask(true);
+ mainWindow.show();
+ }
+
+ artisticSleep(500);
+ mainWindow.start();
+ return app.exec();
+}
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
new file mode 100644
index 0000000..8723823
--- /dev/null
+++ b/demos/qtdemo/mainwindow.cpp
@@ -0,0 +1,483 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "menumanager.h"
+#include "colors.h"
+#include "dockitem.h"
+#include "demotextitem.h"
+#include "imageitem.h"
+#include "demoitem.h"
+#include "demoscene.h"
+
+#ifndef QT_NO_OPENGL
+ #include <QGLWidget>
+#endif
+//#define QT_NO_OPENGL
+
+MainWindow::MainWindow(QWidget *parent) : QGraphicsView(parent), updateTimer(this)
+{
+ this->currentFps = Colors::fps;
+ this->loop = false;
+ this->fpsMedian = -1;
+ this->fpsLabel = 0;
+ this->pausedLabel = 0;
+ this->doneAdapt = false;
+ this->useTimer = false;
+ this->updateTimer.setSingleShot(true);
+ this->trolltechLogo = 0;
+ this->qtLogo = 0;
+ this->setupWidget();
+ this->setupScene();
+ this->setupSceneItems();
+ this->drawBackgroundToPixmap();
+}
+
+MainWindow::~MainWindow()
+{
+ delete this->trolltechLogo;
+ delete this->qtLogo;
+}
+
+void MainWindow::setupWidget()
+{
+ QRect screenRect = QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen());
+ QRect windowRect(0, 0, 800, 600);
+ if (screenRect.width() < 800)
+ windowRect.setWidth(screenRect.width());
+ if (screenRect.height() < 600)
+ windowRect.setHeight(screenRect.height());
+ windowRect.moveCenter(screenRect.center());
+ this->setGeometry(windowRect);
+ this->setMinimumSize(80, 60);
+ setWindowTitle(tr("Qt Examples and Demos"));
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setFrameStyle(QFrame::NoFrame);
+ this->setRenderingSystem();
+ connect(&this->updateTimer, SIGNAL(timeout()), this, SLOT(tick()));
+}
+
+void MainWindow::setRenderingSystem()
+{
+ QWidget *viewport = 0;
+
+ if (Colors::direct3dRendering){
+ viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);
+ setCacheMode(QGraphicsView::CacheNone);
+ if (Colors::verbose)
+ qDebug() << "- using Direct3D";
+ }
+#ifndef QT_NO_OPENGL
+ else if (Colors::openGlRendering){
+ QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers));
+ if (Colors::noScreenSync)
+ glw->format().setSwapInterval(0);
+ glw->setAutoFillBackground(false);
+ viewport = glw;
+ setCacheMode(QGraphicsView::CacheNone);
+ if (Colors::verbose)
+ qDebug() << "- using OpenGL";
+ }
+#endif
+ else{ // software rendering
+ viewport = new QWidget;
+ setCacheMode(QGraphicsView::CacheBackground);
+ if (Colors::verbose)
+ qDebug() << "- using software rendering";
+ }
+
+ setViewport(viewport);
+}
+
+void MainWindow::start()
+{
+ this->switchTimerOnOff(true);
+ this->demoStartTime.restart();
+ MenuManager::instance()->itemSelected(MenuManager::ROOT, Colors::rootMenuName);
+ if (Colors::verbose)
+ qDebug("- starting demo");
+}
+
+void MainWindow::enableMask(bool enable)
+{
+ if (!enable || Colors::noWindowMask)
+ this->clearMask();
+ else {
+ QPolygon region;
+ region.setPoints(9,
+ // north side:
+ 0, 0,
+ 800, 0,
+ // east side:
+ // 800, 70,
+ // 790, 90,
+ // 790, 480,
+ // 800, 500,
+ 800, 600,
+ // south side:
+ 700, 600,
+ 670, 590,
+ 130, 590,
+ 100, 600,
+ 0, 600,
+ // west side:
+ // 0, 550,
+ // 10, 530,
+ // 10, 520,
+ // 0, 520,
+ 0, 0);
+ this->setMask(QRegion(region));
+ }
+}
+
+void MainWindow::setupScene()
+{
+ this->scene = new DemoScene(this);
+ this->scene->setSceneRect(0, 0, 800, 600);
+ setScene(this->scene);
+ this->scene->setItemIndexMethod(QGraphicsScene::NoIndex);
+}
+
+void MainWindow::drawItems(QPainter *painter, int numItems, QGraphicsItem **items, const QStyleOptionGraphicsItem* options)
+{
+ QGraphicsView::drawItems(painter, numItems, items, options);
+}
+
+void MainWindow::switchTimerOnOff(bool on)
+{
+ bool ticker = MenuManager::instance()->ticker && MenuManager::instance()->ticker->scene();
+ if (ticker)
+ MenuManager::instance()->ticker->tickOnPaint = !on || Colors::noTimerUpdate;
+
+ if (on && !Colors::noTimerUpdate){
+ this->useTimer = true;
+ this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
+ this->fpsTime = QTime::currentTime();
+ this->updateTimer.start(int(1000 / Colors::fps));
+ }
+ else{
+ this->useTimer = false;
+ this->updateTimer.stop();
+ if (Colors::softwareRendering)
+ if (Colors::noTicker)
+ this->setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
+ else
+ this->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
+ else
+ this->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ }
+}
+
+bool MainWindow::measureFps()
+{
+ // Calculate time diff:
+ float t = this->fpsTime.msecsTo(QTime::currentTime());
+ if (t == 0)
+ t = 0.01f;
+ this->currentFps = (1000.0f / t);
+ this->fpsHistory += this->currentFps;
+ this->fpsTime = QTime::currentTime();
+
+ // Calculate median:
+ int size = this->fpsHistory.size();
+ if (size == 10){
+ qSort(this->fpsHistory.begin(), this->fpsHistory.end());
+ this->fpsMedian = this->fpsHistory.at(int(size/2));
+ if (this->fpsMedian == 0)
+ this->fpsMedian = 0.01f;
+ this->fpsHistory.clear();
+ return true;
+ }
+ return false;
+}
+
+/**
+ Used for adaption in case things are so slow
+ that no median yet has been calculated
+*/
+void MainWindow::forceFpsMedianCalculation()
+{
+ if (this->fpsMedian != -1)
+ return;
+
+ int size = this->fpsHistory.size();
+ if (size == 0){
+ this->fpsMedian = 0.01f;
+ return;
+ }
+
+ qSort(this->fpsHistory.begin(), this->fpsHistory.end());
+ this->fpsMedian = this->fpsHistory.at(int(size/2));
+ if (this->fpsMedian == 0)
+ this->fpsMedian = 0.01f;
+}
+
+void MainWindow::tick()
+{
+ bool medianChanged = this->measureFps();
+ this->checkAdapt();
+
+ if (medianChanged && this->fpsLabel && Colors::showFps)
+ this->fpsLabel->setText(QString("FPS: ") + QString::number(int(this->currentFps)));
+
+ if (MenuManager::instance()->ticker)
+ MenuManager::instance()->ticker->tick();
+
+ this->viewport()->update();
+ if (Colors::softwareRendering)
+ QApplication::syncX();
+
+ if (this->useTimer)
+ this->updateTimer.start(int(1000 / Colors::fps));
+}
+
+void MainWindow::setupSceneItems()
+{
+ if (Colors::showFps){
+ this->fpsLabel = new DemoTextItem(QString("FPS: --"), Colors::buttonFont(), Qt::white, -1, this->scene, 0, DemoTextItem::DYNAMIC_TEXT);
+ this->fpsLabel->setZValue(100);
+ this->fpsLabel->setPos(Colors::stageStartX, 600 - QFontMetricsF(Colors::buttonFont()).height() - 5);
+ }
+
+ this->trolltechLogo = new ImageItem(QImage(":/images/trolltech-logo.png"), 1000, 1000, this->scene, 0, true, 0.5f);
+ this->qtLogo = new ImageItem(QImage(":/images/qtlogo_small.png"), 1000, 1000, this->scene, 0, true, 0.5f);
+ this->trolltechLogo->setZValue(100);
+ this->qtLogo->setZValue(100);
+ this->pausedLabel = new DemoTextItem(QString("PAUSED"), Colors::buttonFont(), Qt::white, -1, this->scene, 0);
+ this->pausedLabel->setZValue(100);
+ QFontMetricsF fm(Colors::buttonFont());
+ this->pausedLabel->setPos(Colors::stageWidth - fm.width("PAUSED"), 590 - fm.height());
+ this->pausedLabel->setRecursiveVisible(false);
+}
+
+void MainWindow::checkAdapt()
+{
+ if (this->doneAdapt
+ || Colors::noTimerUpdate
+ || this->demoStartTime.elapsed() < 2000)
+ return;
+
+ this->doneAdapt = true;
+ this->forceFpsMedianCalculation();
+ Colors::benchmarkFps = this->fpsMedian;
+ if (Colors::verbose)
+ qDebug() << "- benchmark:" << QString::number(Colors::benchmarkFps) << "FPS";
+
+ if (Colors::noAdapt)
+ return;
+
+ if (this->fpsMedian < 30){
+ if (MenuManager::instance()->ticker && MenuManager::instance()->ticker->scene()){
+ this->scene->removeItem(MenuManager::instance()->ticker);
+ Colors::noTimerUpdate = true;
+ this->switchTimerOnOff(false);
+ if (this->fpsLabel)
+ this->fpsLabel->setText(QString("FPS: (") + QString::number(this->fpsMedian) + QString(")"));
+ if (Colors::verbose)
+ qDebug() << "- benchmark adaption: removed ticker (fps < 30)";
+ }
+
+ if (this->fpsMedian < 20){
+ Colors::noAnimations = true;
+ if (Colors::verbose)
+ qDebug() << "- benchmark adaption: animations switched off (fps < 20)";
+ }
+
+ Colors::adapted = true;
+ }
+}
+
+int MainWindow::performBenchmark()
+{
+/*
+ QTime time;
+ time.restart();
+ while (time.elapsed() < 2000)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
+*/
+ return 0;
+}
+
+void MainWindow::drawBackgroundToPixmap()
+{
+ const QRectF r = this->scene->sceneRect();
+ this->background = QPixmap(qRound(r.width()), qRound(r.height()));
+ this->background.fill(Qt::black);
+ QPainter painter(&this->background);
+
+ if (false && Colors::useEightBitPalette){
+ painter.fillRect(r, Colors::sceneBg1);
+ } else {
+ QImage bg(":/images/demobg.png");
+ painter.drawImage(0, 0, bg);
+ }
+}
+
+void MainWindow::drawBackground(QPainter *painter, const QRectF &rect)
+{
+ Q_UNUSED(rect);
+ painter->drawPixmap(QPoint(0, 0), this->background);
+}
+
+void MainWindow::showEvent(QShowEvent * event)
+{
+ Q_UNUSED(event);
+ QGraphicsView::showEvent(event);
+}
+
+void MainWindow::toggleFullscreen()
+{
+ if (this->isFullScreen()){
+ this->enableMask(true);
+ this->showNormal();
+ if (MenuManager::instance()->ticker)
+ MenuManager::instance()->ticker->pause(false);
+ }
+ else {
+ this->enableMask(false);
+ this->showFullScreen();
+ }
+}
+
+void MainWindow::keyPressEvent(QKeyEvent *event)
+{
+ if (event->key() == Qt::Key_Escape){
+ this->loop = false;
+ QApplication::quit();
+ }
+ else if (event->key() == Qt::Key_1){
+ QString s("");
+ s += "Rendering system: ";
+ if (Colors::openGlRendering)
+ s += "OpenGL";
+ else if (Colors::direct3dRendering)
+ s += "Direct3D";
+ else
+ s += "software";
+
+ s += "\nAdapt: ";
+ s += Colors::noAdapt ? "off" : "on";
+ s += "\nAdaption occured: ";
+ s += Colors::adapted ? "yes" : "no";
+ s += "\nOpenGL version: ";
+ s += Colors::glVersion;
+ QWidget w;
+ s += "\nColor bit depth: ";
+ s += QString::number(w.depth());
+ s += "\nWanted FPS: ";
+ s += QString::number(Colors::fps);
+ s += "\nBenchmarked FPS: ";
+ s += Colors::benchmarkFps != -1 ? QString::number(Colors::benchmarkFps) : "not calculated";
+ s += "\nAnimations: ";
+ s += Colors::noAnimations ? "off" : "on";
+ s += "\nBlending: ";
+ s += Colors::useEightBitPalette ? "off" : "on";
+ s += "\nTicker: ";
+ s += Colors::noTicker ? "off" : "on";
+ s += "\nPixmaps: ";
+ s += Colors::usePixmaps ? "on" : "off";
+ s += "\nRescale images on resize: ";
+ s += Colors::noRescale ? "off" : "on";
+ s += "\nTimer based updates: ";
+ s += Colors::noTimerUpdate ? "off" : "on";
+ s += "\nSeparate loop: ";
+ s += Colors::useLoop ? "yes" : "no";
+ s += "\nScreen sync: ";
+ s += Colors::noScreenSync ? "no" : "yes";
+ QMessageBox::information(0, QString("Current configuration"), s);
+ }
+}
+
+void MainWindow::focusInEvent(QFocusEvent *)
+{
+ if (!Colors::pause)
+ return;
+
+ if (MenuManager::instance()->ticker)
+ MenuManager::instance()->ticker->pause(false);
+
+ int code = MenuManager::instance()->currentMenuCode;
+ if (code == MenuManager::ROOT || code == MenuManager::MENU1)
+ this->switchTimerOnOff(true);
+
+ this->pausedLabel->setRecursiveVisible(false);
+}
+
+void MainWindow::focusOutEvent(QFocusEvent *)
+{
+ if (!Colors::pause)
+ return;
+
+ if (MenuManager::instance()->ticker)
+ MenuManager::instance()->ticker->pause(true);
+
+ int code = MenuManager::instance()->currentMenuCode;
+ if (code == MenuManager::ROOT || code == MenuManager::MENU1)
+ this->switchTimerOnOff(false);
+
+ this->pausedLabel->setRecursiveVisible(true);
+}
+
+void MainWindow::resizeEvent(QResizeEvent *event)
+{
+ Q_UNUSED(event);
+
+ this->resetMatrix();
+ this->scale(event->size().width() / 800.0, event->size().height() / 600.0);
+ QGraphicsView::resizeEvent(event);
+ DemoItem::setMatrix(this->matrix());
+
+ if (this->trolltechLogo){
+ const QRectF r = this->scene->sceneRect();
+ QRectF ttb = this->trolltechLogo->boundingRect();
+ this->trolltechLogo->setPos(int((r.width() - ttb.width()) / 2), 595 - ttb.height());
+ QRectF qtb = this->qtLogo->boundingRect();
+ this->qtLogo->setPos(802 - qtb.width(), 0);
+ }
+
+ // Changing size will almost always
+ // hurt FPS during the changing. So
+ // ignore it.
+ this->fpsHistory.clear();
+}
+
+
diff --git a/demos/qtdemo/mainwindow.h b/demos/qtdemo/mainwindow.h
new file mode 100644
index 0000000..388a392
--- /dev/null
+++ b/demos/qtdemo/mainwindow.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+#include <QtGui>
+#include <QPixmap>
+
+class DemoTextItem;
+class ImageItem;
+
+class MainWindow : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+ void enableMask(bool enable);
+ void toggleFullscreen();
+ int performBenchmark();
+ void switchTimerOnOff(bool on);
+ void start();
+
+ QGraphicsScene *scene;
+ bool loop;
+
+ // FPS stuff:
+ QList<QTime> frameTimeList;
+ QList<float> fpsHistory;
+ float currentFps;
+ float fpsMedian;
+ DemoTextItem *fpsLabel;
+
+protected:
+ // Overidden methods:
+ void showEvent(QShowEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void drawBackground(QPainter *painter, const QRectF &rect);
+ void drawItems(QPainter *painter, int numItems, QGraphicsItem ** items, const QStyleOptionGraphicsItem* options);
+ void focusInEvent(QFocusEvent *event);
+ void focusOutEvent(QFocusEvent *event);
+
+private slots:
+ void tick();
+
+private:
+ void setupWidget();
+ void setupSceneItems();
+ void drawBackgroundToPixmap();
+ void setupScene();
+ bool measureFps();
+ void forceFpsMedianCalculation();
+ void checkAdapt();
+ void setRenderingSystem();
+
+ QTimer updateTimer;
+ QTime demoStartTime;
+ QTime fpsTime;
+ QPixmap background;
+ ImageItem *trolltechLogo;
+ ImageItem *qtLogo;
+ bool doneAdapt;
+ bool useTimer;
+ DemoTextItem *pausedLabel;
+};
+
+#endif // MAIN_WINDOW_H
+
diff --git a/demos/qtdemo/menucontent.cpp b/demos/qtdemo/menucontent.cpp
new file mode 100644
index 0000000..a74cfe4
--- /dev/null
+++ b/demos/qtdemo/menucontent.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menucontent.h"
+#include "colors.h"
+#include "menumanager.h"
+#include "demotextitem.h"
+#include "headingitem.h"
+
+MenuContentItem::MenuContentItem(const QDomElement &el, QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ this->name = el.attribute("name");
+ this->heading = 0;
+ this->description1 = 0;
+ this->description2 = 0;
+
+ if (el.tagName() == "demos")
+ this->readmePath = QLibraryInfo::location(QLibraryInfo::DemosPath) + "/README";
+ else
+ this->readmePath = QLibraryInfo::location(QLibraryInfo::ExamplesPath) + "/" + el.attribute("dirname") + "/README";
+
+}
+
+void MenuContentItem::prepare()
+{
+ if (!this->prepared){
+ this->prepared= true;
+ this->createContent();
+ }
+}
+
+void MenuContentItem::animationStopped(int id)
+{
+ if (this->name == Colors::rootMenuName)
+ return; // Optimization hack.
+
+ if (id == DemoItemAnimation::ANIM_OUT){
+ // Free up some memory:
+ delete this->heading;
+ delete this->description1;
+ delete this->description2;
+ this->heading = 0;
+ this->description1 = 0;
+ this->description2 = 0;
+ this->prepared = false;
+ }
+}
+
+QString MenuContentItem::loadDescription(int startPara, int nrPara)
+{
+ QString result;
+ QFile readme(this->readmePath);
+ if (!readme.open(QFile::ReadOnly)){
+ if (Colors::verbose)
+ qDebug() << "- MenuContentItem::loadDescription: Could not load:" << this->readmePath;
+ return "";
+ }
+
+ QTextStream in(&readme);
+ // Skip a certain number of paragraphs:
+ while (startPara)
+ if (in.readLine().isEmpty()) --startPara;
+
+ // Read in the number of wanted paragraphs:
+ QString line = in.readLine();
+ do {
+ result += line + " ";
+ line = in.readLine();
+ if (line.isEmpty()){
+ --nrPara;
+ line = "<br><br>" + in.readLine();
+ }
+ } while (nrPara && !in.atEnd());
+
+ return Colors::contentColor + result;
+}
+
+void MenuContentItem::createContent()
+{
+ // Create the items:
+ this->heading = new HeadingItem(this->name, this->scene(), this);
+ QString para1 = this->loadDescription(0, 1);
+ if (para1.isEmpty())
+ para1 = Colors::contentColor + QLatin1String("Could not load description. Ensure that the documentation for Qt is built.");
+ QColor bgcolor = Colors::sceneBg1.darker(200);
+ bgcolor.setAlpha(100);
+ this->description1 = new DemoTextItem(para1, Colors::contentFont(), Colors::heading, 500, this->scene(), this, DemoTextItem::STATIC_TEXT);
+ this->description2 = new DemoTextItem(this->loadDescription(1, 2), Colors::contentFont(), Colors::heading, 250, this->scene(), this, DemoTextItem::STATIC_TEXT);
+
+ // Place the items on screen:
+ this->heading->setPos(0, 3);
+ this->description1->setPos(0, this->heading->pos().y() + this->heading->boundingRect().height() + 10);
+ this->description2->setPos(0, this->description1->pos().y() + this->description1->boundingRect().height() + 15);
+}
+
+QRectF MenuContentItem::boundingRect() const
+{
+ return QRectF(0, 0, 500, 350);
+}
+
+
diff --git a/demos/qtdemo/menucontent.h b/demos/qtdemo/menucontent.h
new file mode 100644
index 0000000..737492d
--- /dev/null
+++ b/demos/qtdemo/menucontent.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MENU_CONTENT_ITEM_H
+#define MENU_CONTENT_ITEM_H
+
+#include <QtGui>
+#include <QtXml>
+#include "demoitem.h"
+
+class HeadingItem;
+class DemoTextItem;
+
+class MenuContentItem : public DemoItem
+{
+
+public:
+ MenuContentItem(const QDomElement &el, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+
+ virtual QRectF boundingRect() const; // overridden
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0){}; // overridden
+ void animationStopped(int id);
+ void prepare();
+
+private:
+ QString name;
+ QString readmePath;
+ HeadingItem *heading;
+ DemoTextItem *description1;
+ DemoTextItem *description2;
+
+ QString loadDescription(int startPara, int nrPara);
+ QString extractTextFromParagraph(const QDomNode &parentNode);
+
+ void createContent();
+};
+
+#endif // MENU_CONTENT_ITEM_H
+
diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp
new file mode 100644
index 0000000..bfa2e3f
--- /dev/null
+++ b/demos/qtdemo/menumanager.cpp
@@ -0,0 +1,876 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menumanager.h"
+#include "colors.h"
+#include "menucontent.h"
+#include "examplecontent.h"
+
+MenuManager *MenuManager::pInstance = 0;
+
+MenuManager * MenuManager::instance()
+{
+ if (!MenuManager::pInstance)
+ MenuManager::pInstance = new MenuManager();
+ return MenuManager::pInstance;
+}
+
+MenuManager::MenuManager()
+{
+ this->ticker = 0;
+ this->tickerInAnim = 0;
+ this->upButton = 0;
+ this->downButton = 0;
+ this->helpEngine = 0;
+ this->score = new Score();
+ this->currentMenu = QLatin1String("[no menu visible]");
+ this->currentCategory = QLatin1String("[no category visible]");
+ this->currentMenuButtons = QLatin1String("[no menu buttons visible]");
+ this->currentInfo = QLatin1String("[no info visible]");
+ this->currentMenuCode = -1;
+ this->readXmlDocument();
+ this->initHelpEngine();
+}
+
+MenuManager::~MenuManager()
+{
+ delete this->score;
+ delete this->contentsDoc;
+ delete this->helpEngine;
+}
+
+QByteArray MenuManager::getResource(const QString &name)
+{
+ QByteArray ba = this->helpEngine->fileData(name);
+ if (Colors::verbose && ba.isEmpty())
+ qDebug() << " - WARNING: Could not get " << name;
+ return ba;
+}
+
+void MenuManager::readXmlDocument()
+{
+ this->contentsDoc = new QDomDocument();
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+
+ QFile file(":/xml/examples.xml");
+ bool statusOK = this->contentsDoc->setContent(&file, true, &errorStr, &errorLine, &errorColumn);
+ if (!statusOK){
+ QMessageBox::critical(0,
+ QObject::tr("DOM Parser"),
+ QObject::tr("Could not read or find the contents document. Error at line %1, column %2:\n%3")
+ .arg(errorLine).arg(errorColumn).arg(errorStr)
+ );
+ exit(-1);
+ }
+}
+
+void MenuManager::initHelpEngine()
+{
+ this->helpRootUrl = QString("qthelp://com.trolltech.qt.%1%2%3/qdoc/")
+ .arg(QT_VERSION >> 16).arg((QT_VERSION >> 8) & 0xFF)
+ .arg(QT_VERSION & 0xFF);
+
+ // Store help collection file in cache dir of assistant
+ QString cacheDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+ + QLatin1String("/Trolltech/Assistant/");
+ QString helpDataFile = QString(QLatin1String("qtdemo_%1.qhc")).arg(QLatin1String(QT_VERSION_STR));
+
+ QDir dir;
+ if (!dir.exists(cacheDir))
+ dir.mkpath(cacheDir);
+
+ // Create help engine (and new
+ // helpDataFile if it does not exist):
+ this->helpEngine = new QHelpEngineCore(cacheDir + helpDataFile);
+ this->helpEngine->setupData();
+
+ QString qtDocRoot = QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/qch");
+ qtDocRoot = QDir(qtDocRoot).absolutePath();
+
+ QStringList qchFiles;
+ qchFiles << QLatin1String("/qt.qch")
+ << QLatin1String("/designer.qch")
+ << QLatin1String("/linguist.qch");
+
+ QString oldDir = helpEngine->customValue(QLatin1String("docDir"), QString()).toString();
+ if (oldDir != qtDocRoot) {
+ foreach (const QString &qchFile, qchFiles)
+ helpEngine->unregisterDocumentation(QHelpEngineCore::namespaceName(qtDocRoot + qchFile));
+ }
+
+ // If the data that the engine will work
+ // on is not yet registered, do it now:
+ foreach (const QString &qchFile, qchFiles)
+ helpEngine->registerDocumentation(qtDocRoot + qchFile);
+
+ helpEngine->setCustomValue(QLatin1String("docDir"), qtDocRoot);
+}
+
+void MenuManager::itemSelected(int userCode, const QString &menuName)
+{
+ switch (userCode){
+ case LAUNCH:
+ this->launchExample(this->currentInfo);
+ break;
+ case DOCUMENTATION:
+ this->showDocInAssistant(this->currentInfo);
+ break;
+ case QUIT:
+ this->window->loop = false;
+ QCoreApplication::quit();
+ break;
+ case FULLSCREEN:
+ this->window->toggleFullscreen();
+ break;
+ case ROOT:
+ // out:
+ this->score->queueMovie(this->currentMenu + " -out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(this->currentMenuButtons + " -out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(this->currentInfo + " -out");
+ this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY);
+ this->score->queueMovie("back -out", Score::ONLY_IF_VISIBLE);
+ // book-keeping:
+ this->currentMenuCode = ROOT;
+ this->currentMenu = menuName + " -menu1";
+ this->currentMenuButtons = menuName + " -buttons";
+ this->currentInfo = menuName + " -info";
+ // in:
+ this->score->queueMovie("upndown -shake");
+ this->score->queueMovie(this->currentMenu, Score::FROM_START, Score::UNLOCK_ITEMS);
+ this->score->queueMovie(this->currentMenuButtons, Score::FROM_START, Score::UNLOCK_ITEMS);
+ this->score->queueMovie(this->currentInfo);
+ if (!Colors::noTicker){
+ this->ticker->doIntroTransitions = true;
+ this->tickerInAnim->startDelay = 2000;
+ this->ticker->useGuideQt();
+ this->score->queueMovie("ticker", Score::NEW_ANIMATION_ONLY);
+ this->window->switchTimerOnOff(true);
+ }
+ break;
+ case MENU1:
+ // out:
+ this->score->queueMovie(this->currentMenu + " -out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(this->currentMenuButtons + " -out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(this->currentInfo + " -out");
+ // book-keeping:
+ this->currentMenuCode = MENU1;
+ this->currentCategory = menuName;
+ this->currentMenu = menuName + " -menu1";
+ this->currentInfo = menuName + " -info";
+ // in:
+ this->score->queueMovie("upndown -shake");
+ this->score->queueMovie("back -in");
+ this->score->queueMovie(this->currentMenu, Score::FROM_START, Score::UNLOCK_ITEMS);
+ this->score->queueMovie(this->currentInfo);
+ if (!Colors::noTicker)
+ this->ticker->useGuideTt();
+ break;
+ case MENU2:
+ // out:
+ this->score->queueMovie(this->currentInfo + " -out", Score::NEW_ANIMATION_ONLY);
+ this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY);
+ // book-keeping:
+ this->currentMenuCode = MENU2;
+ this->currentInfo = menuName;
+ // in / shake:
+ this->score->queueMovie("upndown -shake");
+ this->score->queueMovie("back -shake");
+ this->score->queueMovie(this->currentMenu + " -shake");
+ this->score->queueMovie(this->currentInfo, Score::NEW_ANIMATION_ONLY);
+ this->score->queueMovie(this->currentInfo + " -buttons", Score::NEW_ANIMATION_ONLY);
+ if (!Colors::noTicker){
+ this->score->queueMovie("ticker -out", Score::NEW_ANIMATION_ONLY);
+ this->window->switchTimerOnOff(false);
+ }
+ break;
+ case UP:{
+ QString backMenu = this->info[this->currentMenu]["back"];
+ if (!backMenu.isNull()){
+ this->score->queueMovie(this->currentMenu + " -top_out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(backMenu + " -bottom_in", Score::FROM_START, Score::UNLOCK_ITEMS);
+ this->currentMenu = backMenu;
+ }
+ break; }
+ case DOWN:{
+ QString moreMenu = this->info[this->currentMenu]["more"];
+ if (!moreMenu.isNull()){
+ this->score->queueMovie(this->currentMenu + " -bottom_out", Score::FROM_START, Score::LOCK_ITEMS);
+ this->score->queueMovie(moreMenu + " -top_in", Score::FROM_START, Score::UNLOCK_ITEMS);
+ this->currentMenu = moreMenu;
+ }
+ break; }
+ case BACK:{
+ if (this->currentMenuCode == MENU2){
+ // out:
+ this->score->queueMovie(this->currentInfo + " -out", Score::NEW_ANIMATION_ONLY);
+ this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY);
+ // book-keeping:
+ this->currentMenuCode = MENU1;
+ this->currentMenuButtons = this->currentCategory + " -buttons";
+ this->currentInfo = this->currentCategory + " -info";
+ // in / shake:
+ this->score->queueMovie("upndown -shake");
+ this->score->queueMovie(this->currentMenu + " -shake");
+ this->score->queueMovie(this->currentInfo, Score::NEW_ANIMATION_ONLY);
+ this->score->queueMovie(this->currentInfo + " -buttons", Score::NEW_ANIMATION_ONLY);
+ if (!Colors::noTicker){
+ this->ticker->doIntroTransitions = false;
+ this->tickerInAnim->startDelay = 500;
+ this->score->queueMovie("ticker", Score::NEW_ANIMATION_ONLY);
+ this->window->switchTimerOnOff(true);
+ }
+ } else if (this->currentMenuCode != ROOT)
+ itemSelected(ROOT, Colors::rootMenuName);
+ break; }
+ }
+
+ // update back- and more buttons
+ bool noBackMenu = this->info[this->currentMenu]["back"].isNull();
+ bool noMoreMenu = this->info[this->currentMenu]["more"].isNull();
+ this->upButton->setState(noBackMenu ? TextButton::DISABLED : TextButton::OFF);
+ this->downButton->setState(noMoreMenu ? TextButton::DISABLED : TextButton::OFF);
+
+ if (this->score->hasQueuedMovies()){
+ this->score->playQue();
+ // Playing new movies might include
+ // loading etc. So ignore the FPS
+ // at this point
+ this->window->fpsHistory.clear();
+ }
+}
+
+void MenuManager::showDocInAssistant(const QString &name)
+{
+ QString url = this->resolveDocUrl(name);
+ if (Colors::verbose)
+ qDebug() << "Sending URL to Assistant:" << url;
+
+ // Start assistant if it's not already running:
+ if (this->assistantProcess.state() != QProcess::Running){
+ QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
+#if !defined(Q_OS_MAC)
+ app += QLatin1String("assistant");
+#else
+ app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
+#endif
+ QStringList args;
+ args << QLatin1String("-enableRemoteControl");
+ this->assistantProcess.start(app, args);
+ if (!this->assistantProcess.waitForStarted()) {
+ QMessageBox::critical(0, tr("Qt Demo"), tr("Could not start Qt Assistant.").arg(app));
+ return;
+ }
+ }
+
+ // Send command through remote control even if the process
+ // was started to activate assistant and bring it to front:
+ QTextStream str(&this->assistantProcess);
+ str << "SetSource " << url << QLatin1Char('\0') << endl;
+}
+
+void MenuManager::launchExample(const QString &name)
+{
+ QString executable = this->resolveExeFile(name);
+#ifdef Q_OS_MAC
+ if (Colors::verbose)
+ qDebug() << "Launching:" << executable;
+ bool success = QDesktopServices::openUrl(QUrl::fromLocalFile(executable));
+ if (!success){
+ QMessageBox::critical(0, tr("Failed to launch the example"),
+ tr("Could not launch the example. Ensure that it has been built."),
+ QMessageBox::Cancel);
+ }
+#else // Not mac. To not break anything regarding dll's etc, keep it the way it was before:
+ QProcess *process = new QProcess(this);
+ connect(process, SIGNAL(finished(int)), this, SLOT(exampleFinished()));
+ connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(exampleError(QProcess::ProcessError)));
+
+#ifdef Q_OS_WIN
+ //make sure it finds the dlls on windows
+ QString curpath = QString::fromLocal8Bit(qgetenv("PATH").constData());
+ QString newpath = QString("PATH=%1;%2").arg(QLibraryInfo::location(QLibraryInfo::BinariesPath), curpath);
+ process->setEnvironment(QStringList(newpath));
+#endif
+
+ if (info[name]["changedirectory"] != "false"){
+ QString workingDirectory = resolveDataDir(name);
+ process->setWorkingDirectory(workingDirectory);
+ if (Colors::verbose)
+ qDebug() << "Setting working directory:" << workingDirectory;
+ }
+
+ if (Colors::verbose)
+ qDebug() << "Launching:" << executable;
+ process->start(executable);
+#endif
+}
+
+void MenuManager::exampleFinished()
+{
+}
+
+void MenuManager::exampleError(QProcess::ProcessError error)
+{
+ if (error != QProcess::Crashed)
+ QMessageBox::critical(0, tr("Failed to launch the example"),
+ tr("Could not launch the example. Ensure that it has been built."),
+ QMessageBox::Cancel);
+}
+
+void MenuManager::init(MainWindow *window)
+{
+ this->window = window;
+
+ // Create div:
+ this->createTicker();
+ this->createUpnDownButtons();
+ this->createBackButton();
+
+ // Create first level menu:
+ QDomElement rootElement = this->contentsDoc->documentElement();
+ this->createRootMenu(rootElement);
+
+ // Create second level menus:
+ QDomNode level2MenuNode = rootElement.firstChild();
+ while (!level2MenuNode.isNull()){
+ QDomElement level2MenuElement = level2MenuNode.toElement();
+ this->createSubMenu(level2MenuElement);
+
+ // create leaf menu and example info:
+ QDomNode exampleNode = level2MenuElement.firstChild();
+ while (!exampleNode.isNull()){
+ QDomElement exampleElement = exampleNode.toElement();
+ this->readInfoAboutExample(exampleElement);
+ this->createLeafMenu(exampleElement);
+ exampleNode = exampleNode.nextSibling();
+ }
+
+ level2MenuNode = level2MenuNode.nextSibling();
+ }
+}
+
+void MenuManager::readInfoAboutExample(const QDomElement &example)
+{
+ QString name = example.attribute("name");
+ if (this->info.contains(name))
+ qWarning() << "__WARNING: MenuManager::readInfoAboutExample: Demo/example with name"
+ << name << "appears twize in the xml-file!__";
+
+ this->info[name]["filename"] = example.attribute("filename");
+ this->info[name]["category"] = example.parentNode().toElement().tagName();
+ this->info[name]["dirname"] = example.parentNode().toElement().attribute("dirname");
+ this->info[name]["changedirectory"] = example.attribute("changedirectory");
+ this->info[name]["image"] = example.attribute("image");
+}
+
+QString MenuManager::resolveDataDir(const QString &name)
+{
+ QString dirName = this->info[name]["dirname"];
+ QString category = this->info[name]["category"];
+ QString fileName = this->info[name]["filename"];
+
+ QDir dir;
+ if (category == "demos")
+ dir = QDir(QLibraryInfo::location(QLibraryInfo::DemosPath));
+ else
+ dir = QDir(QLibraryInfo::location(QLibraryInfo::ExamplesPath));
+
+ dir.cd(dirName);
+ dir.cd(fileName);
+ return dir.absolutePath();
+}
+
+QString MenuManager::resolveExeFile(const QString &name)
+{
+ QString dirName = this->info[name]["dirname"];
+ QString category = this->info[name]["category"];
+ QString fileName = this->info[name]["filename"];
+
+ QDir dir;
+ if (category == "demos")
+ dir = QDir(QLibraryInfo::location(QLibraryInfo::DemosPath));
+ else
+ dir = QDir(QLibraryInfo::location(QLibraryInfo::ExamplesPath));
+
+ dir.cd(dirName);
+ dir.cd(fileName);
+
+ QFile unixFile(dir.path() + "/" + fileName);
+ if (unixFile.exists()) return unixFile.fileName();
+ QFile winR(dir.path() + "\\release\\" + fileName + ".exe");
+ if (winR.exists()) return winR.fileName();
+ QFile winD(dir.path() + "\\debug\\" + fileName + ".exe");
+ if (winD.exists()) return winD.fileName();
+ QFile mac(dir.path() + "/" + fileName + ".app");
+ if (mac.exists()) return mac.fileName();
+
+ if (Colors::verbose)
+ qDebug() << "- WARNING: Could not resolve executable:" << dir.path() << fileName;
+ return "__executable not found__";
+}
+
+QString MenuManager::resolveDocUrl(const QString &name)
+{
+ QString dirName = this->info[name]["dirname"];
+ QString category = this->info[name]["category"];
+ QString fileName = this->info[name]["filename"];
+
+ if (category == "demos")
+ return this->helpRootUrl + "demos-" + fileName + ".html";
+ else
+ return this->helpRootUrl + dirName.replace("/", "-") + "-" + fileName + ".html";
+}
+
+QString MenuManager::resolveImageUrl(const QString &name)
+{
+ return this->helpRootUrl + "images/" + name;
+}
+
+QByteArray MenuManager::getHtml(const QString &name)
+{
+ return getResource(this->resolveDocUrl(name));
+}
+
+QByteArray MenuManager::getImage(const QString &name)
+{
+ QString imageName = this->info[name]["image"];
+ QString category = this->info[name]["category"];
+ QString fileName = this->info[name]["filename"];
+
+ if (imageName.isEmpty()){
+ if (category == "demos")
+ imageName = fileName + "-demo.png";
+ else
+ imageName = fileName + "-example.png";
+ if ((getResource(resolveImageUrl(imageName))).isEmpty())
+ imageName = fileName + ".png";
+ if ((getResource(resolveImageUrl(imageName))).isEmpty())
+ imageName = fileName + "example.png";
+ }
+ return getResource(resolveImageUrl(imageName));
+}
+
+
+void MenuManager::createRootMenu(const QDomElement &el)
+{
+ QString name = el.attribute("name");
+ createMenu(el, MENU1);
+ createInfo(new MenuContentItem(el, this->window->scene, 0), name + " -info");
+
+ Movie *menuButtonsIn = this->score->insertMovie(name + " -buttons");
+ Movie *menuButtonsOut = this->score->insertMovie(name + " -buttons -out");
+ createLowLeftButton(QLatin1String("Quit"), QUIT, menuButtonsIn, menuButtonsOut, 0);
+ createLowRightButton("Toggle fullscreen", FULLSCREEN, menuButtonsIn, menuButtonsOut, 0);
+}
+
+void MenuManager::createSubMenu(const QDomElement &el)
+{
+ QString name = el.attribute("name");
+ createMenu(el, MENU2);
+ createInfo(new MenuContentItem(el, this->window->scene, 0), name + " -info");
+}
+
+void MenuManager::createLeafMenu(const QDomElement &el)
+{
+ QString name = el.attribute("name");
+ createInfo(new ExampleContent(name, this->window->scene, 0), name);
+
+ Movie *infoButtonsIn = this->score->insertMovie(name + " -buttons");
+ Movie *infoButtonsOut = this->score->insertMovie(name + " -buttons -out");
+ createLowRightLeafButton("Documentation", 600, DOCUMENTATION, infoButtonsIn, infoButtonsOut, 0);
+ if (el.attribute("executable") != "false")
+ createLowRightLeafButton("Launch", 405, LAUNCH, infoButtonsIn, infoButtonsOut, 0);
+}
+
+void MenuManager::createMenu(const QDomElement &category, BUTTON_TYPE type)
+{
+ qreal sw = this->window->scene->sceneRect().width();
+ int xOffset = 15;
+ int yOffset = 10;
+ int maxExamples = Colors::menuCount;
+ int menuIndex = 1;
+ QString name = category.attribute("name");
+ QDomNode currentNode = category.firstChild();
+ QString currentMenu = name + QLatin1String(" -menu") + QString::number(menuIndex);
+
+ while (!currentNode.isNull()){
+ Movie *movieIn = this->score->insertMovie(currentMenu);
+ Movie *movieOut = this->score->insertMovie(currentMenu + " -out");
+ Movie *movieNextTopOut = this->score->insertMovie(currentMenu + " -top_out");
+ Movie *movieNextBottomOut = this->score->insertMovie(currentMenu + " -bottom_out");
+ Movie *movieNextTopIn = this->score->insertMovie(currentMenu + " -top_in");
+ Movie *movieNextBottomIn = this->score->insertMovie(currentMenu + " -bottom_in");
+ Movie *movieShake = this->score->insertMovie(currentMenu + " -shake");
+
+ int i = 0;
+ while (!currentNode.isNull() && i < maxExamples){
+ TextButton *item;
+
+ // create normal menu button
+ QString label = currentNode.toElement().attribute("name");
+ item = new TextButton(label, TextButton::LEFT, type, this->window->scene, 0);
+ currentNode = currentNode.nextSibling();
+
+#ifndef QT_OPENGL_SUPPORT
+ if (currentNode.toElement().attribute("dirname") == "opengl")
+ currentNode = currentNode.nextSibling();
+#endif
+
+ item->setRecursiveVisible(false);
+ item->setZValue(10);
+ qreal ih = item->sceneBoundingRect().height();
+ qreal iw = item->sceneBoundingRect().width();
+ qreal ihp = ih + 3;
+
+ // create in-animation:
+ DemoItemAnimation *anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ anim->setDuration(float(1000 + (i * 20)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, -ih));
+ anim->setPosAt(0.20, QPointF(xOffset, -ih));
+ anim->setPosAt(0.50, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY + (10 * float(i / 4.0f))));
+ anim->setPosAt(0.60, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.70, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY + (5 * float(i / 4.0f))));
+ anim->setPosAt(0.80, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.90, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY + (2 * float(i / 4.0f))));
+ anim->setPosAt(1.00, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ movieIn->append(anim);
+
+ // create out-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ anim->hideOnFinished = true;
+ anim->setDuration((700 + (30 * i)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.60, QPointF(xOffset, 600 - ih - ih));
+ anim->setPosAt(0.65, QPointF(xOffset + 20, 600 - ih));
+ anim->setPosAt(1.00, QPointF(sw + iw, 600 - ih));
+ movieOut->append(anim);
+
+ // create shake-animation:
+ anim = new DemoItemAnimation(item);
+ anim->setDuration(700 * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.55, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY - i*2.0));
+ anim->setPosAt(0.70, QPointF(xOffset - 10, (i * ihp) + yOffset + Colors::contentStartY - i*1.5));
+ anim->setPosAt(0.80, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY - i*1.0));
+ anim->setPosAt(0.90, QPointF(xOffset - 2, (i * ihp) + yOffset + Colors::contentStartY - i*0.5));
+ anim->setPosAt(1.00, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ movieShake->append(anim);
+
+ // create next-menu top-out-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ anim->hideOnFinished = true;
+ anim->setDuration((200 + (30 * i)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.70, QPointF(xOffset, yOffset + Colors::contentStartY));
+ anim->setPosAt(1.00, QPointF(-iw, yOffset + Colors::contentStartY));
+ movieNextTopOut->append(anim);
+
+ // create next-menu bottom-out-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ anim->hideOnFinished = true;
+ anim->setDuration((200 + (30 * i)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.70, QPointF(xOffset, (maxExamples * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(1.00, QPointF(-iw, (maxExamples * ihp) + yOffset + Colors::contentStartY));
+ movieNextBottomOut->append(anim);
+
+ // create next-menu top-in-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ anim->setDuration((700 - (30 * i)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(-iw, yOffset + Colors::contentStartY));
+ anim->setPosAt(0.30, QPointF(xOffset, yOffset + Colors::contentStartY));
+ anim->setPosAt(1.00, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ movieNextTopIn->append(anim);
+
+ // create next-menu bottom-in-animation:
+ int reverse = maxExamples - i;
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ anim->setDuration((1000 - (30 * reverse)) * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(-iw, (maxExamples * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(0.30, QPointF(xOffset, (maxExamples * ihp) + yOffset + Colors::contentStartY));
+ anim->setPosAt(1.00, QPointF(xOffset, (i * ihp) + yOffset + Colors::contentStartY));
+ movieNextBottomIn->append(anim);
+
+ i++;
+ }
+
+ if (!currentNode.isNull() && i == maxExamples){
+ // We need another menu, so register for 'more' and 'back' buttons
+ ++menuIndex;
+ this->info[currentMenu]["more"] = name + QLatin1String(" -menu") + QString::number(menuIndex);
+ currentMenu = name + QLatin1String(" -menu") + QString::number(menuIndex);
+ this->info[currentMenu]["back"] = name + QLatin1String(" -menu") + QString::number(menuIndex - 1);
+ }
+ }
+}
+
+
+void MenuManager::createLowLeftButton(const QString &label, BUTTON_TYPE type,
+ Movie *movieIn, Movie *movieOut, Movie *movieShake, const QString &menuString)
+{
+ TextButton *button = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);
+ if (!menuString.isNull())
+ button->setMenuString(menuString);
+ button->setRecursiveVisible(false);
+ button->setZValue(10);
+
+ qreal iw = button->sceneBoundingRect().width();
+ int xOffset = 15;
+
+ // create in-animation:
+ DemoItemAnimation *buttonIn = new DemoItemAnimation(button, DemoItemAnimation::ANIM_IN);
+ buttonIn->setDuration(1800 * Colors::animSpeedButtons);
+ buttonIn->setStartPos(QPointF(-iw, Colors::contentStartY + Colors::contentHeight - 35));
+ buttonIn->setPosAt(0.5, QPointF(-iw, Colors::contentStartY + Colors::contentHeight - 35));
+ buttonIn->setPosAt(0.7, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 35));
+ buttonIn->setPosAt(1.0, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 26));
+ movieIn->append(buttonIn);
+
+ // create out-animation:
+ DemoItemAnimation *buttonOut = new DemoItemAnimation(button, DemoItemAnimation::ANIM_OUT);
+ buttonOut->hideOnFinished = true;
+ buttonOut->setDuration(400 * Colors::animSpeedButtons);
+ buttonOut->setStartPos(QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 26));
+ buttonOut->setPosAt(1.0, QPointF(-iw, Colors::contentStartY + Colors::contentHeight - 26));
+ movieOut->append(buttonOut);
+
+ if (movieShake){
+ DemoItemAnimation *shakeAnim = new DemoItemAnimation(button, DemoItemAnimation::ANIM_UNSPECIFIED);
+ shakeAnim->timeline->setCurveShape(QTimeLine::LinearCurve);
+ shakeAnim->setDuration(650);
+ shakeAnim->setStartPos(buttonIn->posAt(1.0f));
+ shakeAnim->setPosAt(0.60, buttonIn->posAt(1.0f));
+ shakeAnim->setPosAt(0.70, buttonIn->posAt(1.0f) + QPointF(-3, 0));
+ shakeAnim->setPosAt(0.80, buttonIn->posAt(1.0f) + QPointF(2, 0));
+ shakeAnim->setPosAt(0.90, buttonIn->posAt(1.0f) + QPointF(-1, 0));
+ shakeAnim->setPosAt(1.00, buttonIn->posAt(1.0f));
+ movieShake->append(shakeAnim);
+ }
+}
+
+void MenuManager::createLowRightButton(const QString &label, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie * /*movieShake*/)
+{
+ TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);
+ item->setRecursiveVisible(false);
+ item->setZValue(10);
+
+ qreal sw = this->window->scene->sceneRect().width();
+ int xOffset = 70;
+
+ // create in-animation:
+ DemoItemAnimation *anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ anim->setDuration(1800 * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(sw, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.5, QPointF(sw, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.7, QPointF(xOffset + 535, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(1.0, QPointF(xOffset + 535, Colors::contentStartY + Colors::contentHeight - 26));
+ movieIn->append(anim);
+
+ // create out-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ anim->hideOnFinished = true;
+ anim->setDuration(400 * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset + 535, Colors::contentStartY + Colors::contentHeight - 26));
+ anim->setPosAt(1.0, QPointF(sw, Colors::contentStartY + Colors::contentHeight - 26));
+ movieOut->append(anim);
+}
+
+void MenuManager::createLowRightLeafButton(const QString &label, int xOffset, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie * /*movieShake*/)
+{
+ TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);
+ item->setRecursiveVisible(false);
+ item->setZValue(10);
+
+ qreal sw = this->window->scene->sceneRect().width();
+ qreal sh = this->window->scene->sceneRect().height();
+
+ // create in-animation:
+ DemoItemAnimation *anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ anim->setDuration(1050 * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(sw, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.10, QPointF(sw, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.30, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.35, QPointF(xOffset + 30, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.40, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.45, QPointF(xOffset + 5, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(0.50, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 35));
+ anim->setPosAt(1.00, QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 26));
+ movieIn->append(anim);
+
+ // create out-animation:
+ anim = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ anim->hideOnFinished = true;
+ anim->setDuration(300 * Colors::animSpeedButtons);
+ anim->setStartPos(QPointF(xOffset, Colors::contentStartY + Colors::contentHeight - 26));
+ anim->setPosAt(1.0, QPointF(xOffset, sh));
+ movieOut->append(anim);
+}
+
+void MenuManager::createInfo(DemoItem *item, const QString &name)
+{
+ Movie *movie_in = this->score->insertMovie(name);
+ Movie *movie_out = this->score->insertMovie(name + " -out");
+ item->setZValue(8);
+ item->setRecursiveVisible(false);
+
+ float xOffset = 230.0f;
+ DemoItemAnimation *infoIn = new DemoItemAnimation(item, DemoItemAnimation::ANIM_IN);
+ infoIn->timeline->setCurveShape(QTimeLine::LinearCurve);
+ infoIn->setDuration(650);
+ infoIn->setStartPos(QPointF(this->window->scene->sceneRect().width(), Colors::contentStartY));
+ infoIn->setPosAt(0.60, QPointF(xOffset, Colors::contentStartY));
+ infoIn->setPosAt(0.70, QPointF(xOffset + 20, Colors::contentStartY));
+ infoIn->setPosAt(0.80, QPointF(xOffset, Colors::contentStartY));
+ infoIn->setPosAt(0.90, QPointF(xOffset + 7, Colors::contentStartY));
+ infoIn->setPosAt(1.00, QPointF(xOffset, Colors::contentStartY));
+ movie_in->append(infoIn);
+
+ DemoItemAnimation *infoOut = new DemoItemAnimation(item, DemoItemAnimation::ANIM_OUT);
+ infoOut->timeline->setCurveShape(QTimeLine::EaseInCurve);
+ infoOut->setDuration(300);
+ infoOut->hideOnFinished = true;
+ infoOut->setStartPos(QPointF(xOffset, Colors::contentStartY));
+ infoOut->setPosAt(1.0, QPointF(-600, Colors::contentStartY));
+ movie_out->append(infoOut);
+}
+
+void MenuManager::createTicker()
+{
+ if (!Colors::noTicker){
+ Movie *movie_in = this->score->insertMovie("ticker");
+ Movie *movie_out = this->score->insertMovie("ticker -out");
+ Movie *movie_activate = this->score->insertMovie("ticker -activate");
+ Movie *movie_deactivate = this->score->insertMovie("ticker -deactivate");
+
+ this->ticker = new ItemCircleAnimation(this->window->scene, 0);
+ this->ticker->setZValue(50);
+ this->ticker->hide();
+
+ // Move ticker in:
+ int qtendpos = 485;
+ int qtPosY = 120;
+ this->tickerInAnim = new DemoItemAnimation(this->ticker, DemoItemAnimation::ANIM_IN);
+ this->tickerInAnim->setDuration(500);
+ this->tickerInAnim->setStartPos(QPointF(this->window->scene->sceneRect().width(), Colors::contentStartY + qtPosY));
+ this->tickerInAnim->setPosAt(0.60, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ this->tickerInAnim->setPosAt(0.70, QPointF(qtendpos + 30, Colors::contentStartY + qtPosY));
+ this->tickerInAnim->setPosAt(0.80, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ this->tickerInAnim->setPosAt(0.90, QPointF(qtendpos + 5, Colors::contentStartY + qtPosY));
+ this->tickerInAnim->setPosAt(1.00, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ movie_in->append(this->tickerInAnim);
+
+ // Move ticker out:
+ DemoItemAnimation *qtOut = new DemoItemAnimation(this->ticker, DemoItemAnimation::ANIM_OUT);
+ qtOut->hideOnFinished = true;
+ qtOut->setDuration(500);
+ qtOut->setStartPos(QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ qtOut->setPosAt(1.00, QPointF(this->window->scene->sceneRect().width() + 700, Colors::contentStartY + qtPosY));
+ movie_out->append(qtOut);
+
+ // Move ticker in on activate:
+ DemoItemAnimation *qtActivate = new DemoItemAnimation(this->ticker);
+ qtActivate->setDuration(400);
+ qtActivate->setStartPos(QPointF(this->window->scene->sceneRect().width(), Colors::contentStartY + qtPosY));
+ qtActivate->setPosAt(0.60, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ qtActivate->setPosAt(0.70, QPointF(qtendpos + 30, Colors::contentStartY + qtPosY));
+ qtActivate->setPosAt(0.80, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ qtActivate->setPosAt(0.90, QPointF(qtendpos + 5, Colors::contentStartY + qtPosY));
+ qtActivate->setPosAt(1.00, QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ movie_activate->append(qtActivate);
+
+ // Move ticker out on deactivate:
+ DemoItemAnimation *qtDeactivate = new DemoItemAnimation(this->ticker);
+ qtDeactivate->hideOnFinished = true;
+ qtDeactivate->setDuration(400);
+ qtDeactivate->setStartPos(QPointF(qtendpos, Colors::contentStartY + qtPosY));
+ qtDeactivate->setPosAt(1.00, QPointF(qtendpos, 800));
+ movie_deactivate->append(qtDeactivate);
+ }
+}
+
+void MenuManager::createUpnDownButtons()
+{
+ float xOffset = 15.0f;
+ float yOffset = 450.0f;
+
+ this->upButton = new TextButton("", TextButton::LEFT, MenuManager::UP, this->window->scene, 0, TextButton::UP);
+ this->upButton->prepare();
+ this->upButton->setPos(xOffset, yOffset);
+ this->upButton->setState(TextButton::DISABLED);
+
+ this->downButton = new TextButton("", TextButton::LEFT, MenuManager::DOWN, this->window->scene, 0, TextButton::DOWN);
+ this->downButton->prepare();
+ this->downButton->setPos(xOffset + 10 + this->downButton->sceneBoundingRect().width(), yOffset);
+
+ Movie *movieShake = this->score->insertMovie("upndown -shake");
+
+ DemoItemAnimation *shakeAnim = new DemoItemAnimation(this->upButton, DemoItemAnimation::ANIM_UNSPECIFIED);
+ shakeAnim->timeline->setCurveShape(QTimeLine::LinearCurve);
+ shakeAnim->setDuration(650);
+ shakeAnim->setStartPos(this->upButton->pos());
+ shakeAnim->setPosAt(0.60, this->upButton->pos());
+ shakeAnim->setPosAt(0.70, this->upButton->pos() + QPointF(-2, 0));
+ shakeAnim->setPosAt(0.80, this->upButton->pos() + QPointF(1, 0));
+ shakeAnim->setPosAt(0.90, this->upButton->pos() + QPointF(-1, 0));
+ shakeAnim->setPosAt(1.00, this->upButton->pos());
+ movieShake->append(shakeAnim);
+
+ shakeAnim = new DemoItemAnimation(this->downButton, DemoItemAnimation::ANIM_UNSPECIFIED);
+ shakeAnim->timeline->setCurveShape(QTimeLine::LinearCurve);
+ shakeAnim->setDuration(650);
+ shakeAnim->setStartPos(this->downButton->pos());
+ shakeAnim->setPosAt(0.60, this->downButton->pos());
+ shakeAnim->setPosAt(0.70, this->downButton->pos() + QPointF(-5, 0));
+ shakeAnim->setPosAt(0.80, this->downButton->pos() + QPointF(-3, 0));
+ shakeAnim->setPosAt(0.90, this->downButton->pos() + QPointF(-1, 0));
+ shakeAnim->setPosAt(1.00, this->downButton->pos());
+ movieShake->append(shakeAnim);
+}
+
+void MenuManager::createBackButton()
+{
+ Movie *backIn = this->score->insertMovie("back -in");
+ Movie *backOut = this->score->insertMovie("back -out");
+ Movie *backShake = this->score->insertMovie("back -shake");
+ createLowLeftButton(QLatin1String("Back"), ROOT, backIn, backOut, backShake, Colors::rootMenuName);
+}
diff --git a/demos/qtdemo/menumanager.h b/demos/qtdemo/menumanager.h
new file mode 100644
index 0000000..3a12c54
--- /dev/null
+++ b/demos/qtdemo/menumanager.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MENU_MANAGER_H
+#define MENU_MANAGER_H
+
+#include <QtGui>
+#include <QtXml>
+#include <QtHelp/QHelpEngineCore>
+
+#include "score.h"
+#include "textbutton.h"
+#include "mainwindow.h"
+#include "itemcircleanimation.h"
+
+typedef QHash<QString, QString> StringHash;
+typedef QHash<QString, StringHash> HashHash;
+
+class TextButton;
+
+class MenuManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum BUTTON_TYPE {ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, BACK};
+
+ // singleton pattern:
+ static MenuManager *instance();
+ virtual ~MenuManager();
+
+ void init(MainWindow *window);
+ void itemSelected(int userCode, const QString &menuName = "");
+
+ QByteArray getHtml(const QString &name);
+ QByteArray getImage(const QString &name);
+ QString resolveExeFile(const QString &name);
+ QString resolveDocUrl(const QString &name);
+ QString resolveImageUrl(const QString &name);
+ QString resolveDataDir(const QString &name);
+
+ HashHash info;
+ ItemCircleAnimation *ticker;
+ MainWindow *window;
+ Score *score;
+ int currentMenuCode;
+
+private slots:
+ void exampleFinished();
+ void exampleError(QProcess::ProcessError error);
+
+private:
+ // singleton pattern:
+ MenuManager();
+ static MenuManager *pInstance;
+
+ QByteArray getResource(const QString &name);
+
+ void readXmlDocument();
+ void initHelpEngine();
+ void getDocumentationDir();
+ void readInfoAboutExample(const QDomElement &example);
+ void showDocInAssistant(const QString &docFile);
+ void launchExample(const QString &uniqueName);
+
+ void createMenu(const QDomElement &category, BUTTON_TYPE type);
+ void createLowLeftButton(const QString &label, BUTTON_TYPE type,
+ Movie *movieIn, Movie *movieOut, Movie *movieShake, const QString &menuString = QString());
+ void createLowRightButton(const QString &label, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie *movieShake);
+ void createLowRightLeafButton(const QString &label, int pos, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie * /*movieShake*/);
+ void createRootMenu(const QDomElement &el);
+ void createSubMenu(const QDomElement &el);
+ void createLeafMenu(const QDomElement &el);
+ void createInfo(DemoItem *item, const QString &name);
+ void createTicker();
+ void createUpnDownButtons();
+ void createBackButton();
+
+ QDomDocument *contentsDoc;
+ QProcess assistantProcess;
+ QString currentMenu;
+ QString currentCategory;
+ QString currentMenuButtons;
+ QString currentInfo;
+ QString helpRootUrl;
+ DemoItemAnimation *tickerInAnim;
+ QDir docDir;
+ QDir imgDir;
+ QHelpEngineCore *helpEngine;
+
+ TextButton *upButton;
+ TextButton *downButton;
+};
+
+#endif // MENU_MANAGER_H
+
diff --git a/demos/qtdemo/qtdemo.icns b/demos/qtdemo/qtdemo.icns
new file mode 100644
index 0000000..def5f0e
--- /dev/null
+++ b/demos/qtdemo/qtdemo.icns
Binary files differ
diff --git a/demos/qtdemo/qtdemo.ico b/demos/qtdemo/qtdemo.ico
new file mode 100644
index 0000000..016c77f
--- /dev/null
+++ b/demos/qtdemo/qtdemo.ico
Binary files differ
diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro
new file mode 100644
index 0000000..2534b75
--- /dev/null
+++ b/demos/qtdemo/qtdemo.pro
@@ -0,0 +1,72 @@
+CONFIG += assistant help x11inc
+TARGET = qtdemo
+DESTDIR = $$QT_BUILD_TREE/bin
+OBJECTS_DIR = .obj
+MOC_DIR = .moc
+INSTALLS += target sources
+QT += xml network
+
+contains(QT_CONFIG, opengl) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+RESOURCES = qtdemo.qrc
+HEADERS = mainwindow.h \
+ demoscene.h \
+ demoitem.h \
+ score.h \
+ demoitemanimation.h \
+ itemcircleanimation.h \
+ demotextitem.h \
+ headingitem.h \
+ dockitem.h \
+ scanitem.h \
+ letteritem.h \
+ examplecontent.h \
+ menucontent.h \
+ guide.h \
+ guideline.h \
+ guidecircle.h \
+ menumanager.h \
+ colors.h \
+ textbutton.h \
+ imageitem.h
+SOURCES = main.cpp \
+ demoscene.cpp \
+ mainwindow.cpp \
+ demoitem.cpp \
+ score.cpp \
+ demoitemanimation.cpp \
+ itemcircleanimation.cpp \
+ demotextitem.cpp \
+ headingitem.cpp \
+ dockitem.cpp \
+ scanitem.cpp \
+ letteritem.cpp \
+ examplecontent.cpp \
+ menucontent.cpp \
+ guide.cpp \
+ guideline.cpp \
+ guidecircle.cpp \
+ menumanager.cpp \
+ colors.cpp \
+ textbutton.cpp \
+ imageitem.cpp
+
+win32:RC_FILE = qtdemo.rc
+mac {
+ICON = qtdemo.icns
+QMAKE_INFO_PLIST = Info_mac.plist
+}
+
+# install
+target.path = $$[QT_INSTALL_BINS]
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES qtdemo.pro images xml *.ico *.icns *.rc *.plist
+sources.path = $$[QT_INSTALL_DEMOS]/qtdemo
+
diff --git a/demos/qtdemo/qtdemo.qrc b/demos/qtdemo/qtdemo.qrc
new file mode 100644
index 0000000..b30dd58
--- /dev/null
+++ b/demos/qtdemo/qtdemo.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>xml/examples.xml</file>
+ <file>images/qtlogo_small.png</file>
+ <file>images/trolltech-logo.png</file>
+ <file>images/demobg.png</file>
+</qresource>
+</RCC>
diff --git a/demos/qtdemo/qtdemo.rc b/demos/qtdemo/qtdemo.rc
new file mode 100644
index 0000000..4cf2a63
--- /dev/null
+++ b/demos/qtdemo/qtdemo.rc
@@ -0,0 +1,2 @@
+IDI_ICON1 ICON DISCARDABLE "qtdemo.ico"
+
diff --git a/demos/qtdemo/scanitem.cpp b/demos/qtdemo/scanitem.cpp
new file mode 100644
index 0000000..0eab840
--- /dev/null
+++ b/demos/qtdemo/scanitem.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "scanitem.h"
+#include "colors.h"
+
+#define ITEM_WIDTH 16
+#define ITEM_HEIGHT 16
+
+ScanItem::ScanItem(QGraphicsScene *scene, QGraphicsItem *parent)
+ : DemoItem(scene, parent)
+{
+ useSharedImage(QString(__FILE__));
+}
+
+ScanItem::~ScanItem()
+{
+}
+
+QImage *ScanItem::createImage(const QMatrix &matrix) const
+{
+ QRect scaledRect = matrix.mapRect(QRect(0, 0, ITEM_WIDTH, ITEM_HEIGHT));
+ QImage *image = new QImage(scaledRect.width(), scaledRect.height(), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ if (Colors::useEightBitPalette){
+ painter.setPen(QPen(QColor(100, 100, 100), 2));
+ painter.setBrush(QColor(206, 246, 117));
+ painter.drawEllipse(1, 1, scaledRect.width()-2, scaledRect.height()-2);
+ }
+ else {
+ painter.setPen(QPen(QColor(0, 0, 0, 15), 1));
+// painter.setBrush(QColor(206, 246, 117, 150));
+ painter.setBrush(QColor(0, 0, 0, 15));
+ painter.drawEllipse(1, 1, scaledRect.width()-2, scaledRect.height()-2);
+ }
+ return image;
+}
+
+
diff --git a/demos/qtdemo/scanitem.h b/demos/qtdemo/scanitem.h
new file mode 100644
index 0000000..b0b5ffc
--- /dev/null
+++ b/demos/qtdemo/scanitem.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCAN_ITEM_H
+#define SCAN_ITEM_H
+
+#include <QtGui>
+#include "demoitem.h"
+
+class ScanItem : public DemoItem
+{
+public:
+ ScanItem(QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
+ virtual ~ScanItem();
+
+protected:
+ QImage *createImage(const QMatrix &matrix) const;
+
+};
+
+#endif // SCAN_ITEM_H
+
diff --git a/demos/qtdemo/score.cpp b/demos/qtdemo/score.cpp
new file mode 100644
index 0000000..f45ba0d
--- /dev/null
+++ b/demos/qtdemo/score.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "score.h"
+#include "colors.h"
+#include "demoitem.h"
+
+Score::Score()
+{
+}
+
+Score::~Score()
+{
+ // NB! Deleting all movies.
+ qDeleteAll(this->index);
+}
+
+void Score::prepare(Movie *movie, RUN_MODE runMode, LOCK_MODE lockMode)
+{
+ if (lockMode == LOCK_ITEMS){
+ for (int i=0; i<movie->size(); ++i){
+ if (runMode == ONLY_IF_VISIBLE && !movie->at(i)->demoItem()->isVisible())
+ continue;
+ movie->at(i)->lockItem(true);
+ movie->at(i)->prepare();
+ }
+ }
+ else if (lockMode == UNLOCK_ITEMS){
+ for (int i=0; i<movie->size(); ++i){
+ if (runMode == ONLY_IF_VISIBLE && !movie->at(i)->demoItem()->isVisible())
+ continue;
+ movie->at(i)->lockItem(false);
+ movie->at(i)->prepare();
+ }
+ }
+ else {
+ for (int i=0; i<movie->size(); ++i){
+ if (runMode == ONLY_IF_VISIBLE && !movie->at(i)->demoItem()->isVisible())
+ continue;
+ movie->at(i)->prepare();
+ }
+ }
+}
+
+void Score::play(Movie *movie, RUN_MODE runMode)
+{
+ if (runMode == NEW_ANIMATION_ONLY){
+ for (int i=0; i<movie->size(); ++i)
+ if (movie->at(i)->notOwnerOfItem())
+ movie->at(i)->play(true);
+ }
+ else if (runMode == ONLY_IF_VISIBLE){
+ for (int i=0; i<movie->size(); ++i)
+ if (movie->at(i)->demoItem()->isVisible())
+ movie->at(i)->play(runMode == FROM_START);
+ }
+ else {
+ for (int i=0; i<movie->size(); ++i)
+ movie->at(i)->play(runMode == FROM_START);
+ }
+}
+
+void Score::playMovie(const QString &indexName, RUN_MODE runMode, LOCK_MODE lockMode)
+{
+ MovieIndex::iterator movieIterator = this->index.find(indexName);
+ if (movieIterator == this->index.end())
+ return;
+
+ Movie *movie = *movieIterator;
+ this->prepare(movie, runMode, lockMode);
+ this->play(movie, runMode);
+}
+
+void Score::queueMovie(const QString &indexName, RUN_MODE runMode, LOCK_MODE lockMode)
+{
+ MovieIndex::iterator movieIterator = this->index.find(indexName);
+ if (movieIterator == this->index.end()){
+ if (Colors::verbose)
+ qDebug() << "Queuing movie:" << indexName << "(does not exist)";
+ return;
+ }
+
+ Movie *movie = *movieIterator;
+ this->prepare(movie, runMode, lockMode);
+ this->playList.append(PlayListMember(movie, int(runMode)));
+ if (Colors::verbose)
+ qDebug() << "Queuing movie:" << indexName;
+}
+
+void Score::playQue()
+{
+ int movieCount = this->playList.size();
+ for (int i=0; i<movieCount; i++)
+ this->play(this->playList.at(i).movie, RUN_MODE(this->playList.at(i).runMode));
+ this->playList.clear();
+ if (Colors::verbose)
+ qDebug() << "********* Playing que *********";
+}
+
+void Score::insertMovie(const QString &indexName, Movie *movie)
+{
+ this->index.insert(indexName, movie);
+}
+
+Movie *Score::insertMovie(const QString &indexName)
+{
+ Movie *movie = new Movie();
+ insertMovie(indexName, movie);
+ return movie;
+}
+
diff --git a/demos/qtdemo/score.h b/demos/qtdemo/score.h
new file mode 100644
index 0000000..bfed5d2
--- /dev/null
+++ b/demos/qtdemo/score.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCORE_H
+#define SCORE_H
+
+#include <QList>
+#include <QHash>
+#include "demoitemanimation.h"
+
+typedef QList<DemoItemAnimation *> Movie;
+typedef QHash<QString, Movie*> MovieIndex;
+
+class PlayListMember
+{
+public:
+ PlayListMember(Movie *movie, int runMode) : movie(movie), runMode(runMode){};
+ Movie *movie;
+ int runMode;
+};
+typedef QList<PlayListMember> PlayList;
+
+class Score
+{
+public:
+ enum LOCK_MODE {LOCK_ITEMS, UNLOCK_ITEMS, SKIP_LOCK};
+ enum RUN_MODE {FROM_CURRENT, FROM_START, NEW_ANIMATION_ONLY, ONLY_IF_VISIBLE};
+
+ Score();
+ virtual ~Score();
+
+ void playMovie(const QString &indexName, RUN_MODE runMode = FROM_START, LOCK_MODE lockMode = SKIP_LOCK);
+ void insertMovie(const QString &indexName, Movie *movie);
+ Movie *insertMovie(const QString &indexName);
+ void queueMovie(const QString &indexName, RUN_MODE runMode = FROM_START, LOCK_MODE lockMode = SKIP_LOCK);
+ void playQue();
+ bool hasQueuedMovies(){ return this->playList.size() > 0; };
+
+ MovieIndex index;
+ PlayList playList;
+
+private:
+ void prepare(Movie *movie, RUN_MODE runMode, LOCK_MODE lockMode);
+ void play(Movie *movie, RUN_MODE runMode);
+};
+
+#endif // SCORE_H
+
diff --git a/demos/qtdemo/textbutton.cpp b/demos/qtdemo/textbutton.cpp
new file mode 100644
index 0000000..96e1a23
--- /dev/null
+++ b/demos/qtdemo/textbutton.cpp
@@ -0,0 +1,384 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textbutton.h"
+#include "demoitemanimation.h"
+#include "demotextitem.h"
+#include "colors.h"
+#include "menumanager.h"
+
+#define BUTTON_WIDTH 180
+#define BUTTON_HEIGHT 19
+
+class ButtonBackground : public DemoItem
+{
+public:
+ TextButton::BUTTONTYPE type;
+ bool highlighted;
+ bool pressed;
+ QSize logicalSize;
+
+ ButtonBackground(TextButton::BUTTONTYPE type, bool highlighted, bool pressed, QSize logicalSize,
+ QGraphicsScene *scene, QGraphicsItem *parent) : DemoItem(scene, parent)
+ {
+ this->type = type;
+ this->highlighted = highlighted;
+ this->pressed = pressed;
+ this->logicalSize = logicalSize;
+ useSharedImage(QString(__FILE__) + static_cast<int>(type) + highlighted + pressed);
+ }
+
+protected:
+ QImage *createImage(const QMatrix &matrix) const
+ {
+ if (type == TextButton::SIDEBAR || type == TextButton::PANEL)
+ return createRoundButtonBackground(matrix);
+ else
+ return createArrowBackground(matrix);
+ }
+
+ QImage *createRoundButtonBackground(const QMatrix &matrix) const
+ {
+ QRect scaledRect;
+ scaledRect = matrix.mapRect(QRect(0, 0, this->logicalSize.width(), this->logicalSize.height()));
+
+ QImage *image = new QImage(scaledRect.width(), scaledRect.height(), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.setRenderHint(QPainter::SmoothPixmapTransform);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.setPen(Qt::NoPen);
+
+ if (Colors::useEightBitPalette){
+ painter.setPen(QColor(120, 120, 120));
+ if (this->pressed)
+ painter.setBrush(QColor(60, 60, 60));
+ else if (this->highlighted)
+ painter.setBrush(QColor(100, 100, 100));
+ else
+ painter.setBrush(QColor(80, 80, 80));
+ }
+ else {
+ QLinearGradient outlinebrush(0, 0, 0, scaledRect.height());
+ QLinearGradient brush(0, 0, 0, scaledRect.height());
+
+ brush.setSpread(QLinearGradient::PadSpread);
+ QColor highlight(255, 255, 255, 70);
+ QColor shadow(0, 0, 0, 70);
+ QColor sunken(220, 220, 220, 30);
+ QColor normal1(255, 255, 245, 60);
+ QColor normal2(255, 255, 235, 10);
+
+ if (this->type == TextButton::PANEL){
+ normal1 = QColor(200, 170, 160, 50);
+ normal2 = QColor(50, 10, 0, 50);
+ }
+
+ if (pressed) {
+ outlinebrush.setColorAt(0.0f, shadow);
+ outlinebrush.setColorAt(1.0f, highlight);
+ brush.setColorAt(0.0f, sunken);
+ painter.setPen(Qt::NoPen);
+ } else {
+ outlinebrush.setColorAt(1.0f, shadow);
+ outlinebrush.setColorAt(0.0f, highlight);
+ brush.setColorAt(0.0f, normal1);
+ if (!this->highlighted)
+ brush.setColorAt(1.0f, normal2);
+ painter.setPen(QPen(outlinebrush, 1));
+ }
+ painter.setBrush(brush);
+ }
+
+ if (this->type == TextButton::PANEL)
+ painter.drawRect(0, 0, scaledRect.width(), scaledRect.height());
+ else
+ painter.drawRoundedRect(0, 0, scaledRect.width(), scaledRect.height(), 10, 90, Qt::RelativeSize);
+ return image;
+ }
+
+ QImage *createArrowBackground(const QMatrix &matrix) const
+ {
+ QRect scaledRect;
+ scaledRect = matrix.mapRect(QRect(0, 0, this->logicalSize.width(), this->logicalSize.height()));
+
+ QImage *image = new QImage(scaledRect.width(), scaledRect.height(), QImage::Format_ARGB32_Premultiplied);
+ image->fill(QColor(0, 0, 0, 0).rgba());
+ QPainter painter(image);
+ painter.setRenderHint(QPainter::SmoothPixmapTransform);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.setPen(Qt::NoPen);
+
+ if (Colors::useEightBitPalette){
+ painter.setPen(QColor(120, 120, 120));
+ if (this->pressed)
+ painter.setBrush(QColor(60, 60, 60));
+ else if (this->highlighted)
+ painter.setBrush(QColor(100, 100, 100));
+ else
+ painter.setBrush(QColor(80, 80, 80));
+ }
+ else {
+ QLinearGradient outlinebrush(0, 0, 0, scaledRect.height());
+ QLinearGradient brush(0, 0, 0, scaledRect.height());
+
+ brush.setSpread(QLinearGradient::PadSpread);
+ QColor highlight(255, 255, 255, 70);
+ QColor shadow(0, 0, 0, 70);
+ QColor sunken(220, 220, 220, 30);
+ QColor normal1 = QColor(200, 170, 160, 50);
+ QColor normal2 = QColor(50, 10, 0, 50);
+
+ if (pressed) {
+ outlinebrush.setColorAt(0.0f, shadow);
+ outlinebrush.setColorAt(1.0f, highlight);
+ brush.setColorAt(0.0f, sunken);
+ painter.setPen(Qt::NoPen);
+ } else {
+ outlinebrush.setColorAt(1.0f, shadow);
+ outlinebrush.setColorAt(0.0f, highlight);
+ brush.setColorAt(0.0f, normal1);
+ if (!this->highlighted)
+ brush.setColorAt(1.0f, normal2);
+ painter.setPen(QPen(outlinebrush, 1));
+ }
+ painter.setBrush(brush);
+ }
+
+ painter.drawRect(0, 0, scaledRect.width(), scaledRect.height());
+
+ float xOff = scaledRect.width() / 2;
+ float yOff = scaledRect.height() / 2;
+ float sizex = 3.0f * matrix.m11();
+ float sizey = 1.5f * matrix.m22();
+ if (this->type == TextButton::UP)
+ sizey *= -1;
+ QPainterPath path;
+ path.moveTo(xOff, yOff + (5 * sizey));
+ path.lineTo(xOff - (4 * sizex), yOff - (3 * sizey));
+ path.lineTo(xOff + (4 * sizex), yOff - (3 * sizey));
+ path.lineTo(xOff, yOff + (5 * sizey));
+ painter.drawPath(path);
+
+ return image;
+ }
+
+};
+
+TextButton::TextButton(const QString &text, ALIGNMENT align, int userCode,
+ QGraphicsScene *scene, QGraphicsItem *parent, BUTTONTYPE type)
+ : DemoItem(scene, parent)
+{
+ this->menuString = text;
+ this->buttonLabel = text;
+ this->alignment = align;
+ this->buttonType = type;
+ this->userCode = userCode;
+ this->bgOn = 0;
+ this->bgOff = 0;
+ this->bgHighlight = 0;
+ this->bgDisabled = 0;
+ this->state = OFF;
+
+ this->setAcceptsHoverEvents(true);
+ this->setCursor(Qt::PointingHandCursor);
+
+ // Calculate button size:
+ const int w = 180;
+ const int h = 19;
+ if (type == SIDEBAR || type == PANEL)
+ this->logicalSize = QSize(w, h);
+ else
+ this->logicalSize = QSize(int((w / 2.0f) - 5), int(h * 1.5f));
+}
+
+void TextButton::setMenuString(const QString &menu)
+{
+ this->menuString = menu;
+}
+
+void TextButton::prepare()
+{
+ if (!this->prepared){
+ this->prepared = true;
+ this->setupHoverText();
+ this->setupScanItem();
+ this->setupButtonBg();
+ }
+}
+
+TextButton::~TextButton()
+{
+ if (this->prepared){
+ if (Colors::useButtonBalls)
+ delete this->scanAnim;
+ }
+}
+
+QRectF TextButton::boundingRect() const
+{
+ return QRectF(0, 0, this->logicalSize.width(), this->logicalSize.height());
+};
+
+void TextButton::setupHoverText()
+{
+ if (this->buttonLabel.isEmpty())
+ return;
+
+ DemoTextItem *textItem = new DemoTextItem(this->buttonLabel, Colors::buttonFont(), Colors::buttonText, -1, this->scene(), this);
+ textItem->setZValue(zValue() + 2);
+ textItem->setPos(16, 0);
+}
+
+void TextButton::setupScanItem()
+{
+ if (Colors::useButtonBalls){
+ ScanItem *scanItem = new ScanItem(0, this);
+ scanItem->setZValue(zValue() + 1);
+
+ this->scanAnim = new DemoItemAnimation(scanItem);
+ this->scanAnim->timeline->setLoopCount(1);
+
+ float x = 1;
+ float y = 1.5f;
+ float stop = BUTTON_WIDTH - scanItem->boundingRect().width() - x;
+ if (this->alignment == LEFT){
+ this->scanAnim->setDuration(2500);
+ this->scanAnim->setPosAt(0.0, QPointF(x, y));
+ this->scanAnim->setPosAt(0.5, QPointF(x, y));
+ this->scanAnim->setPosAt(0.7, QPointF(stop, y));
+ this->scanAnim->setPosAt(1.0, QPointF(x, y));
+ scanItem->setPos(QPointF(x, y));
+ }
+ else {
+ this->scanAnim->setPosAt(0.0, QPointF(stop, y));
+ this->scanAnim->setPosAt(0.5, QPointF(x, y));
+ this->scanAnim->setPosAt(1.0, QPointF(stop, y));
+ scanItem->setPos(QPointF(stop, y));
+ }
+ }
+}
+
+void TextButton::setState(STATE state)
+{
+ this->state = state;
+ this->bgOn->setRecursiveVisible(state == ON);
+ this->bgOff->setRecursiveVisible(state == OFF);
+ this->bgHighlight->setRecursiveVisible(state == HIGHLIGHT);
+ this->bgDisabled->setRecursiveVisible(state == DISABLED);
+ this->setCursor(state == DISABLED ? Qt::ArrowCursor : Qt::PointingHandCursor);
+
+}
+
+void TextButton::setupButtonBg()
+{
+ this->bgOn = new ButtonBackground(this->buttonType, true, true, this->logicalSize, this->scene(), this);
+ this->bgOff = new ButtonBackground(this->buttonType, false, false, this->logicalSize, this->scene(), this);
+ this->bgHighlight = new ButtonBackground(this->buttonType, true, false, this->logicalSize, this->scene(), this);
+ this->bgDisabled = new ButtonBackground(this->buttonType, true, true, this->logicalSize, this->scene(), this);
+ this->setState(OFF);
+}
+
+void TextButton::hoverEnterEvent(QGraphicsSceneHoverEvent *)
+{
+ if (this->locked || this->state == DISABLED)
+ return;
+
+ if (this->state == OFF){
+ this->setState(HIGHLIGHT);
+
+ if (Colors::noAnimations && Colors::useButtonBalls){
+ // wait a bit in the beginning
+ // to enhance the effect. Have to this here
+ // so that the adaption can be dynamic
+ this->scanAnim->setDuration(1000);
+ this->scanAnim->setPosAt(0.2, this->scanAnim->posAt(0));
+ }
+
+ if (MenuManager::instance()->window->fpsMedian > 10
+ || Colors::noAdapt
+ || Colors::noTimerUpdate){
+ if (Colors::useButtonBalls)
+ this->scanAnim->play(true, true);
+ }
+ }
+}
+
+void TextButton::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
+{
+ Q_UNUSED(event);
+ if (this->state == DISABLED)
+ return;
+
+ this->setState(OFF);
+
+ if (Colors::noAnimations && Colors::useButtonBalls)
+ this->scanAnim->stop();
+}
+
+void TextButton::mousePressEvent(QGraphicsSceneMouseEvent *)
+{
+ if (this->state == DISABLED)
+ return;
+
+ if (this->state == HIGHLIGHT || this->state == OFF)
+ this->setState(ON);
+}
+
+void TextButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (this->state == ON){
+ this->setState(OFF);
+ if (!this->locked && this->boundingRect().contains(event->pos())){
+ MenuManager::instance()->itemSelected(this->userCode, this->menuString);
+ }
+ }
+}
+
+void TextButton::animationStarted(int)
+{
+ if (this->state == DISABLED)
+ return;
+ this->setState(OFF);
+}
+
+
+
diff --git a/demos/qtdemo/textbutton.h b/demos/qtdemo/textbutton.h
new file mode 100644
index 0000000..b7c91fb
--- /dev/null
+++ b/demos/qtdemo/textbutton.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXT_BUTTON_H
+#define TEXT_BUTTON_H
+
+#include <QtGui>
+#include "demoitem.h"
+#include "demotextitem.h"
+#include "scanitem.h"
+
+class DemoItemAnimation;
+class ButtonBackground;
+
+class TextButton : public DemoItem
+{
+public:
+ enum ALIGNMENT {LEFT, RIGHT};
+ enum BUTTONTYPE {SIDEBAR, PANEL, UP, DOWN};
+ enum STATE {ON, OFF, HIGHLIGHT, DISABLED};
+
+ TextButton(const QString &text, ALIGNMENT align = LEFT, int userCode = 0,
+ QGraphicsScene *scene = 0, QGraphicsItem *parent = 0, BUTTONTYPE color = SIDEBAR);
+ virtual ~TextButton();
+
+ // overidden methods:
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0){};
+ virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
+ virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+ void animationStarted(int id = 0);
+ void prepare();
+ void setState(STATE state);
+ void setMenuString(const QString &menu);
+ void setDisabled(bool disabled);
+
+private:
+ void setupButtonBg();
+ void setupScanItem();
+ void setupHoverText();
+
+ DemoItemAnimation *scanAnim;
+ ButtonBackground *bgOn;
+ ButtonBackground *bgOff;
+ ButtonBackground *bgHighlight;
+ ButtonBackground *bgDisabled;
+
+ BUTTONTYPE buttonType;
+ ALIGNMENT alignment;
+ QString buttonLabel;
+ QString menuString;
+ int userCode;
+ QSize logicalSize;
+
+ STATE state;
+};
+
+#endif // TEXT_BUTTON_H
+
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
new file mode 100644
index 0000000..df2d93b
--- /dev/null
+++ b/demos/qtdemo/xml/examples.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<categories name="Qt Examples and Demos">
+ <demos dirname="." docname="demos" name="Demonstrations">
+ <example filename="affine" name="Affine Transformations" />
+ <example filename="arthurplugin" name="Arthur Plugin" executable="false" />
+ <example filename="composition" name="Composition Modes" />
+ <example filename="gradients" name="Gradients" />
+ <example filename="pathstroke" name="Path Stroking" />
+ <example filename="deform" name="Vector Deformation" />
+ <example filename="books" name="Books" />
+ <example filename="mainwindow" name="Main Window" />
+ <example filename="spreadsheet" name="Spreadsheet" />
+ <example filename="sqlbrowser" name="SQL Browser" />
+ <example filename="textedit" name="Text Edit" />
+ <example filename="chip" name="40000 Chips" />
+ <example filename="embeddeddialogs" name="Embedded Dialogs" />
+ <example filename="interview" name="Interview" />
+ <example filename="browser" name="Browser" />
+ <example filename="mediaplayer" name="Media Player" />
+ <example filename="boxes" name="Boxes" />
+ </demos>
+ <category dirname="qtconcurrent" name="Concurrent Programming">
+ <example filename="map" name="Map" executable="false" />
+ <example filename="progressdialog" name="Progress Dialog" />
+ <example filename="runfunction" name="Run Function" executable="false"/>
+ <example filename="wordcount" name="Word Count" executable="false" />
+ </category>
+ <category dirname="designer" name="Qt Designer">
+ <example filename="calculatorbuilder" name="Calculator Builder" />
+ <example filename="calculatorform" name="Calculator Form" />
+ <example filename="containerextension" name="Container Extension" executable="false"/>
+ <example filename="customwidgetplugin" name="Custom Widget Plugin" executable="false" />
+ <example filename="taskmenuextension" name="Task Menu Extension" executable="false" />
+ <example filename="worldtimeclockbuilder" name="World Time Clock Builder" />
+ <example filename="worldtimeclockplugin" name="World Time Clock Plugin" executable="false"/>
+ </category>
+ <category dirname="desktop" name="Desktop">
+ <example filename="systray" name="System Tray" image="systemtray-example.png"/>
+ <example filename="screenshot" name="Screenshot" />
+ </category>
+ <category dirname="dialogs" name="Dialogs">
+ <example filename="configdialog" name="Configuration Dialog" />
+ <example filename="extension" name="Extension Dialog" />
+ <example filename="findfiles" name="Find Files Dialog" />
+ <example filename="standarddialogs" name="Standard Dialogs" />
+ <example filename="tabdialog" name="Tab Dialog" />
+ <example filename="trivialwizard" name="Trivial Wizard" image="trivialwizard-example-introduction.png"/>
+ <example filename="licensewizard" name="License Wizard" />
+ <example filename="classwizard" name="Class Wizard" />
+ </category>
+ <category dirname="draganddrop" name="Drag and Drop">
+ <example filename="draggableicons" name="Draggable Icons" />
+ <example filename="draggabletext" name="Draggable Text" />
+ <example filename="dropsite" name="Drop Site" />
+ <example filename="fridgemagnets" name="Fridge Magnets" />
+ <example filename="puzzle" name="Puzzle" image="draganddroppuzzle-example.png"/>
+ </category>
+ <category dirname="graphicsview" name="Graphics View">
+ <example filename="elasticnodes" name="Elastic Nodes" />
+ <example filename="collidingmice" name="Colliding Mice" />
+ <example filename="diagramscene" name="Diagram Scene" />
+ <example filename="dragdroprobot" name="Drag and Drop Robot" />
+ <example filename="portedcanvas" name="Ported Canvas" />
+ <example filename="portedasteroids" name="Ported Asteroids" />
+ <example filename="padnavigator" name="Pad Navigator Example" />
+ </category>
+ <category dirname="ipc" name="IPC">
+ <example filename="sharedmemory" name="Shared Memory" image="sharedmemory-example_1.png"/>
+ <example filename="localfortuneclient" name="Local Fortune Client" image="localfortuneclient-example.png"/>
+ <example filename="localfortuneserver" name="Local Fortune Server" image="localfortuneserver-example.png"/>
+ </category>
+ <category dirname="itemviews" name="Item Views">
+ <example filename="addressbook" name="Address Book" />
+ <example filename="basicsortfiltermodel" name="Basic Sort/Filter Model" />
+ <example filename="chart" name="Chart" />
+ <example filename="customsortfiltermodel" name="Custom Sort/Filter Model" />
+ <example filename="coloreditorfactory" name="Color Editor Factory" image="coloreditorfactoryimage.png"/>
+ <example filename="combowidgetmapper" name="Combo Widget Mapper" />
+ <example filename="dirview" name="Directory View" />
+ <example filename="fetchmore" name="Fetch More" />
+ <example filename="pixelator" name="Pixelator" />
+ <example filename="puzzle" name="Puzzle " image="itemviewspuzzle-example.png"/>
+ <example filename="simpledommodel" name="Simple DOM Model" />
+ <example filename="simpletreemodel" name="Simple Tree Model" />
+ <example filename="simplewidgetmapper" name="Simple Widget Mapper" />
+ <example filename="spinboxdelegate" name="Spin Box Delegate" />
+ <example filename="stardelegate" name="Star Delegate" />
+ </category>
+ <category dirname="layouts" name="Layouts">
+ <example filename="basiclayouts" name="Basic Layouts" />
+ <example filename="borderlayout" name="Border Layout" />
+ <example filename="dynamiclayouts" name="Dynamic Layouts" />
+ <example filename="flowlayout" name="Flow Layout" />
+ </category>
+ <category dirname="linguist" name="Qt Linguist">
+ <example filename="arrowpad" name="Arrow Pad" image="linguist-arrowpad_en.png"/>
+ <example filename="hellotr" name="Hello World" image="linguist-hellotr_en.png"/>
+ <example filename="trollprint" name="Troll Print" image="linguist-trollprint_10_en.png"/>
+ </category>
+ <category dirname="mainwindows" name="Main Windows">
+ <example filename="application" name="Application" />
+ <example filename="dockwidgets" name="Dock Widgets" />
+ <example filename="mdi" name="MDI" />
+ <example filename="sdi" name="SDI" />
+ <example filename="menus" name="Menus" />
+ <example filename="recentfiles" name="Recent Files" />
+ </category>
+ <category dirname="network" name="Networking">
+ <example filename="blockingfortuneclient" name="Blocking Fortune Client" />
+ <example filename="broadcastreceiver" name="Broadcast Receiver" />
+ <example filename="broadcastsender" name="Broadcast Sender" />
+ <example filename="network-chat" name="Network Chat Client" />
+ <example filename="fortuneclient" name="Fortune Client" />
+ <example filename="fortuneserver" name="Fortune Server" />
+ <example filename="ftp" changedirectory="false" name="FTP Client" />
+ <example filename="http" changedirectory="false" name="HTTP Client" />
+ <example filename="loopback" name="Loopback" />
+ <example filename="threadedfortuneserver" name="Threaded Fort. Server" />
+ <example filename="torrent" name="Torrent Client" />
+ <example filename="securesocketclient" name="Secure Socket Client" />
+ </category>
+ <category dirname="opengl" name="OpenGL">
+ <example filename="2dpainting" name="2D Painting" />
+ <example filename="framebufferobject" name="Framebuffer Object" />
+ <example filename="framebufferobject2" name="Framebuffer Object 2" />
+ <example filename="grabber" name="Grabber" />
+ <example filename="hellogl" name="Hello GL" />
+ <example filename="overpainting" name="Overpainting" />
+ <example filename="pbuffers" name="Pixel Buffers" />
+ <example filename="pbuffers2" name="Pixel Buffers 2" />
+ <example filename="samplebuffers" name="Sample Buffers" />
+ <example filename="textures" name="Textures" />
+ </category>
+ <category dirname="painting" name="Painting">
+ <example filename="basicdrawing" name="Basic Drawing" />
+ <example filename="concentriccircles" name="Concentric Circles" />
+ <example filename="fontsampler" name="Font Sampler" />
+ <example filename="imagecomposition" name="Image Composition" />
+ <example filename="painterpaths" name="Painter Paths" />
+ <example filename="svgviewer" name="SVG Viewer" />
+ <example filename="transformations" name="Transformations" />
+ </category>
+ <category dirname="phonon" name="Phonon">
+ <example filename="musicplayer" name="Music Player" />
+ </category>
+ <category dirname="richtext" name="Rich Text">
+ <example filename="calendar" name="Calendar" />
+ <example filename="orderform" name="Order Form" />
+ <example filename="syntaxhighlighter" name="Syntax Highlighter" />
+ <example filename="textobject" name="Text Object" />
+ </category>
+ <category dirname="script" name="QtScript">
+ <example filename="calculator" name="Calculator" />
+ <example filename="context2d" name="Context2D" />
+ <example filename="defaultprototypes" name="Default Prototypes" />
+ <example filename="helloscript" name="Hello Script" image="t1.png"/>
+ <example filename="qstetrix" name="QSTetrix" image="tetrix-example.png" />
+ </category>
+ <category dirname="sql" name="SQL">
+ <example filename="cachedtable" name="Cached Table" />
+ <example filename="drilldown" name="Drill Down" />
+ <example filename="querymodel" name="Query Model" />
+ <example filename="relationaltablemodel" name="Relational Table Model" />
+ <example filename="tablemodel" name="Table Model" />
+ <example filename="masterdetail" name="Music Archive" />
+ <example filename="sqlwidgetmapper" name="SQL Widget Mapper" />
+ </category>
+ <category dirname="threads" name="Threading">
+ <example filename="mandelbrot" name="Mandelbrot" />
+ </category>
+ <category dirname="tools" name="Tools">
+ <example filename="codecs" name="Codecs" />
+ <example filename="completer" name="Completer" />
+ <example filename="customcompleter" name="Custom Completer" />
+ <example filename="i18n" name="Internationalization" />
+ <example filename="plugandpaint" name="Plug and Paint" />
+ <example filename="regexp" name="Regular Expressions" />
+ <example filename="settingseditor" name="Settings Editor" />
+ <example filename="treemodelcompleter" name="Tree Model Completer" />
+ <example filename="undoframework" name="Undo Framework"/>
+ </category>
+ <category dirname="tutorials/addressbook" name="Address Book Tutorial">
+ <example filename="part1" name="Part 1" image="addressbook-tutorial-part1-screenshot.png" />
+ <example filename="part2" name="Part 2" image="addressbook-tutorial-part2-add-contact.png" />
+ <example filename="part3" name="Part 3" image="addressbook-tutorial-part3-screenshot.png" />
+ <example filename="part4" name="Part 4" image="addressbook-tutorial-screenshot.png" />
+ <example filename="part5" name="Part 5" image="addressbook-tutorial-part5-screenshot.png" />
+ <example filename="part6" name="Part 6" image="addressbook-tutorial-part6-screenshot.png" />
+ <example filename="part7" name="Part 7" image="addressbook-tutorial-part7-screenshot.png" />
+ </category>
+ <category dirname="widgets" name="Widgets">
+ <example filename="analogclock" name="Analog Clock" />
+ <example filename="calculator" name="Calculator " />
+ <example filename="calendarwidget" name="Calendar Widget" />
+ <example filename="charactermap" name="Character Map" />
+ <example filename="codeeditor" name="Code Editor" />
+ <example filename="digitalclock" name="Digital Clock" />
+ <example filename="groupbox" name="Group Box" />
+ <example filename="icons" name="Icons" />
+ <example filename="imageviewer" name="Image Viewer" />
+ <example filename="lineedits" name="Line Edits" />
+ <example filename="movie" name="Movie Player" />
+ <example filename="scribble" name="Scribble" />
+ <example filename="shapedclock" name="Shaped Clock" />
+ <example filename="sliders" name="Sliders" />
+ <example filename="spinboxes" name="Spin Boxes" />
+ <example filename="styles" name="Styles" image="styles-enabledwood.png"/>
+ <example filename="stylesheet" name="Style Sheet" image="stylesheet-coffee-plastique.png"/>
+ <example filename="tablet" name="Tablet" />
+ <example filename="tetrix" name="Tetrix " />
+ <example filename="tooltips" name="Tool Tips" />
+ <example filename="wiggly" name="Wiggly" />
+ <example filename="windowflags" name="Window Flags" />
+ </category>
+ <category dirname="xml" name="XML">
+ <example filename="saxbookmarks" name="SAX Bookmarks" />
+ <example filename="dombookmarks" name="DOM Bookmarks" />
+ <example filename="rsslisting" name="RSS-Listing" />
+ <example filename="streambookmarks" name="QXmlStream Bookmarks" image="xmlstreamexample-screenshot.png"/>
+ </category>
+ <category dirname="xmlpatterns" name="XML Patterns">
+ <example filename="recipes" name="Recipes" />
+ <example filename="qobjectxmlmodel" name="QObjectXmlModel" />
+ <example filename="filetree" name="File Tree" />
+ <example filename="trafficinfo" name="Traffic Info" />
+ </category>
+</categories>
diff --git a/demos/shared/arthurstyle.cpp b/demos/shared/arthurstyle.cpp
new file mode 100644
index 0000000..846d2f3
--- /dev/null
+++ b/demos/shared/arthurstyle.cpp
@@ -0,0 +1,452 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "arthurstyle.h"
+#include "arthurwidgets.h"
+#include <QLayout>
+#include <QPainter>
+#include <QPainterPath>
+#include <QPixmapCache>
+#include <QRadioButton>
+#include <QString>
+#include <QStyleOption>
+#include <QtDebug>
+
+QPixmap cached(const QString &img)
+{
+ if (QPixmap *p = QPixmapCache::find(img))
+ return *p;
+
+ QPixmap pm;
+ pm = QPixmap::fromImage(QImage(img), Qt::OrderedDither | Qt::OrderedAlphaDither);
+ if (pm.isNull())
+ return QPixmap();
+
+ QPixmapCache::insert(img, pm);
+ return pm;
+}
+
+
+ArthurStyle::ArthurStyle()
+ : QWindowsStyle()
+{
+ Q_INIT_RESOURCE(shared);
+}
+
+
+void ArthurStyle::drawHoverRect(QPainter *painter, const QRect &r) const
+{
+ qreal h = r.height();
+ qreal h2 = r.height() / qreal(2);
+ QPainterPath path;
+ path.addRect(r.x() + h2, r.y() + 0, r.width() - h2 * 2, r.height());
+ path.addEllipse(r.x(), r.y(), h, h);
+ path.addEllipse(r.x() + r.width() - h, r.y(), h, h);
+ path.setFillRule(Qt::WindingFill);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(QColor(191, 215, 191));
+ painter->setRenderHint(QPainter::Antialiasing);
+ painter->drawPath(path);
+}
+
+
+void ArthurStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const
+{
+
+ Q_ASSERT(option);
+ switch (element) {
+ case PE_FrameFocusRect:
+ break;
+
+ case PE_IndicatorRadioButton:
+ if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
+ bool hover = (button->state & State_Enabled) && (button->state & State_MouseOver);
+ painter->save();
+ QPixmap radio;
+ if (hover)
+ drawHoverRect(painter, widget->rect());
+
+ if (button->state & State_Sunken)
+ radio = cached(":res/images/radiobutton-on.png");
+ else if (button->state & State_On)
+ radio = cached(":res/images/radiobutton_on.png");
+ else
+ radio = cached(":res/images/radiobutton_off.png");
+ painter->drawPixmap(button->rect.topLeft(), radio);
+
+ painter->restore();
+ }
+ break;
+
+ case PE_PanelButtonCommand:
+ if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
+ bool hover = (button->state & State_Enabled) && (button->state & State_MouseOver);
+
+ painter->save();
+ const QPushButton *pushButton = qobject_cast<const QPushButton *>(widget);
+ Q_ASSERT(pushButton);
+ QWidget *parent = pushButton->parentWidget();
+ if (parent && qobject_cast<QGroupBox *>(parent)) {
+ QLinearGradient lg(0, 0, 0, parent->height());
+ lg.setColorAt(0, QColor(224,224,224));
+ lg.setColorAt(1, QColor(255,255,255));
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(lg);
+ painter->setBrushOrigin(-widget->mapToParent(QPoint(0,0)));
+ painter->drawRect(button->rect);
+ painter->setBrushOrigin(0,0);
+ }
+
+ bool down = (button->state & State_Sunken) || (button->state & State_On);
+
+ QPixmap left, right, mid;
+ if (down) {
+ left = cached(":res/images/button_pressed_cap_left.png");
+ right = cached(":res/images/button_pressed_cap_right.png");
+ mid = cached(":res/images/button_pressed_stretch.png");
+ } else {
+ left = cached(":res/images/button_normal_cap_left.png");
+ right = cached(":res/images/button_normal_cap_right.png");
+ mid = cached(":res/images/button_normal_stretch.png");
+ }
+ painter->drawPixmap(button->rect.topLeft(), left);
+ painter->drawTiledPixmap(QRect(button->rect.x() + left.width(),
+ button->rect.y(),
+ button->rect.width() - left.width() - right.width(),
+ left.height()),
+ mid);
+ painter->drawPixmap(button->rect.x() + button->rect.width() - right.width(),
+ button->rect.y(),
+ right);
+ if (hover)
+ painter->fillRect(widget->rect().adjusted(3,5,-3,-5), QColor(31,127,31,63));
+ painter->restore();
+ }
+ break;
+
+ case PE_FrameGroupBox:
+ if (const QStyleOptionFrameV2 *group
+ = qstyleoption_cast<const QStyleOptionFrameV2 *>(option)) {
+ const QRect &r = group->rect;
+
+ painter->save();
+ int radius = 14;
+ int radius2 = radius*2;
+ QPainterPath clipPath;
+ clipPath.moveTo(radius, 0);
+ clipPath.arcTo(r.right() - radius2, 0, radius2, radius2, 90, -90);
+ clipPath.arcTo(r.right() - radius2, r.bottom() - radius2, radius2, radius2, 0, -90);
+ clipPath.arcTo(r.left(), r.bottom() - radius2, radius2, radius2, 270, -90);
+ clipPath.arcTo(r.left(), r.top(), radius2, radius2, 180, -90);
+ painter->setClipPath(clipPath);
+ QPixmap titleStretch = cached(":res/images/title_stretch.png");
+ QPixmap topLeft = cached(":res/images/groupframe_topleft.png");
+ QPixmap topRight = cached(":res/images/groupframe_topright.png");
+ QPixmap bottomLeft = cached(":res/images/groupframe_bottom_left.png");
+ QPixmap bottomRight = cached(":res/images/groupframe_bottom_right.png");
+ QPixmap leftStretch = cached(":res/images/groupframe_left_stretch.png");
+ QPixmap topStretch = cached(":res/images/groupframe_top_stretch.png");
+ QPixmap rightStretch = cached(":res/images/groupframe_right_stretch.png");
+ QPixmap bottomStretch = cached(":res/images/groupframe_bottom_stretch.png");
+ QLinearGradient lg(0, 0, 0, r.height());
+ lg.setColorAt(0, QColor(224,224,224));
+ lg.setColorAt(1, QColor(255,255,255));
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(lg);
+ painter->drawRect(r.adjusted(0, titleStretch.height()/2, 0, 0));
+ painter->setClipping(false);
+
+ int topFrameOffset = titleStretch.height()/2 - 2;
+ painter->drawPixmap(r.topLeft() + QPoint(0, topFrameOffset), topLeft);
+ painter->drawPixmap(r.topRight() - QPoint(topRight.width()-1, 0)
+ + QPoint(0, topFrameOffset), topRight);
+ painter->drawPixmap(r.bottomLeft() - QPoint(0, bottomLeft.height()-1), bottomLeft);
+ painter->drawPixmap(r.bottomRight() - QPoint(bottomRight.width()-1,
+ bottomRight.height()-1), bottomRight);
+
+ QRect left = r;
+ left.setY(r.y() + topLeft.height() + topFrameOffset);
+ left.setWidth(leftStretch.width());
+ left.setHeight(r.height() - topLeft.height() - bottomLeft.height() - topFrameOffset);
+ painter->drawTiledPixmap(left, leftStretch);
+
+ QRect top = r;
+ top.setX(r.x() + topLeft.width());
+ top.setY(r.y() + topFrameOffset);
+ top.setWidth(r.width() - topLeft.width() - topRight.width());
+ top.setHeight(topLeft.height());
+ painter->drawTiledPixmap(top, topStretch);
+
+ QRect right = r;
+ right.setX(r.right() - rightStretch.width()+1);
+ right.setY(r.y() + topRight.height() + topFrameOffset);
+ right.setWidth(rightStretch.width());
+ right.setHeight(r.height() - topRight.height()
+ - bottomRight.height() - topFrameOffset);
+ painter->drawTiledPixmap(right, rightStretch);
+
+ QRect bottom = r;
+ bottom.setX(r.x() + bottomLeft.width());
+ bottom.setY(r.bottom() - bottomStretch.height()+1);
+ bottom.setWidth(r.width() - bottomLeft.width() - bottomRight.width());
+ bottom.setHeight(bottomLeft.height());
+ painter->drawTiledPixmap(bottom, bottomStretch);
+ painter->restore();
+ }
+ break;
+
+ default:
+ QWindowsStyle::drawPrimitive(element, option, painter, widget);
+ break;
+ }
+ return;
+}
+
+
+void ArthurStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
+ QPainter *painter, const QWidget *widget) const
+{
+ switch (control) {
+ case CC_Slider:
+ if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+ QRect groove = subControlRect(CC_Slider, option, SC_SliderGroove, widget);
+ QRect handle = subControlRect(CC_Slider, option, SC_SliderHandle, widget);
+
+ painter->save();
+
+ bool hover = (slider->state & State_Enabled) && (slider->state & State_MouseOver);
+ if (hover) {
+ QRect moderated = widget->rect().adjusted(0, 4, 0, -4);
+ drawHoverRect(painter, moderated);
+ }
+
+ if ((option->subControls & SC_SliderGroove) && groove.isValid()) {
+ QPixmap grv = cached(":res/images/slider_bar.png");
+ painter->drawPixmap(QRect(groove.x() + 5, groove.y(),
+ groove.width() - 10, grv.height()),
+ grv);
+ }
+ if ((option->subControls & SC_SliderHandle) && handle.isValid()) {
+ QPixmap hndl = cached(":res/images/slider_thumb_on.png");
+ painter->drawPixmap(handle.topLeft(), hndl);
+ }
+
+ painter->restore();
+ }
+ break;
+ case CC_GroupBox:
+ if (const QStyleOptionGroupBox *groupBox
+ = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
+ QStyleOptionGroupBox groupBoxCopy(*groupBox);
+ groupBoxCopy.subControls &= ~SC_GroupBoxLabel;
+ QWindowsStyle::drawComplexControl(control, &groupBoxCopy, painter, widget);
+
+ if (groupBox->subControls & SC_GroupBoxLabel) {
+ const QRect &r = groupBox->rect;
+ QPixmap titleLeft = cached(":res/images/title_cap_left.png");
+ QPixmap titleRight = cached(":res/images/title_cap_right.png");
+ QPixmap titleStretch = cached(":res/images/title_stretch.png");
+ int txt_width = groupBox->fontMetrics.width(groupBox->text) + 20;
+ painter->drawPixmap(r.center().x() - txt_width/2, 0, titleLeft);
+ QRect tileRect = subControlRect(control, groupBox, SC_GroupBoxLabel, widget);
+ painter->drawTiledPixmap(tileRect, titleStretch);
+ painter->drawPixmap(tileRect.x() + tileRect.width(), 0, titleRight);
+ int opacity = 31;
+ painter->setPen(QColor(0, 0, 0, opacity));
+ painter->drawText(tileRect.translated(0, 1),
+ Qt::AlignVCenter | Qt::AlignHCenter, groupBox->text);
+ painter->drawText(tileRect.translated(2, 1),
+ Qt::AlignVCenter | Qt::AlignHCenter, groupBox->text);
+ painter->setPen(QColor(0, 0, 0, opacity * 2));
+ painter->drawText(tileRect.translated(1, 1),
+ Qt::AlignVCenter | Qt::AlignHCenter, groupBox->text);
+ painter->setPen(Qt::white);
+ painter->drawText(tileRect, Qt::AlignVCenter | Qt::AlignHCenter, groupBox->text);
+ }
+ }
+ break;
+ default:
+ QWindowsStyle::drawComplexControl(control, option, painter, widget);
+ break;
+ }
+ return;
+}
+
+QRect ArthurStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option,
+ SubControl subControl, const QWidget *widget) const
+{
+ QRect rect;
+
+ switch (control) {
+ default:
+ rect = QWindowsStyle::subControlRect(control, option, subControl, widget);
+ break;
+ case CC_GroupBox:
+ if (const QStyleOptionGroupBox *group
+ = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) {
+ switch (subControl) {
+ default:
+ rect = QWindowsStyle::subControlRect(control, option, subControl, widget);
+ break;
+ case SC_GroupBoxContents:
+ rect = QWindowsStyle::subControlRect(control, option, subControl, widget);
+ rect.adjust(0, -8, 0, 0);
+ break;
+ case SC_GroupBoxFrame:
+ rect = group->rect;
+ break;
+ case SC_GroupBoxLabel:
+ QPixmap titleLeft = cached(":res/images/title_cap_left.png");
+ QPixmap titleRight = cached(":res/images/title_cap_right.png");
+ QPixmap titleStretch = cached(":res/images/title_stretch.png");
+ int txt_width = group->fontMetrics.width(group->text) + 20;
+ rect = QRect(group->rect.center().x() - txt_width/2 + titleLeft.width(), 0,
+ txt_width - titleLeft.width() - titleRight.width(),
+ titleStretch.height());
+ break;
+ }
+ }
+ break;
+ }
+
+ if (control == CC_Slider && subControl == SC_SliderHandle) {
+ rect.setWidth(13);
+ rect.setHeight(27);
+ } else if (control == CC_Slider && subControl == SC_SliderGroove) {
+ rect.setHeight(9);
+ rect.moveTop(27/2 - 9/2);
+ }
+ return rect;
+}
+
+QSize ArthurStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
+ const QSize &size, const QWidget *widget) const
+{
+ QSize newSize = QWindowsStyle::sizeFromContents(type, option, size, widget);
+
+
+ switch (type) {
+ case CT_RadioButton:
+ newSize += QSize(20, 0);
+ break;
+
+ case CT_PushButton:
+ newSize.setHeight(26);
+ break;
+
+ case CT_Slider:
+ newSize.setHeight(27);
+ break;
+
+ default:
+ break;
+ }
+
+ return newSize;
+}
+
+int ArthurStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QWidget *widget) const
+{
+ if (pm == PM_SliderLength)
+ return 13;
+ return QWindowsStyle::pixelMetric(pm, opt, widget);
+}
+
+void ArthurStyle::polish(QWidget *widget)
+{
+ if (widget->layout() && qobject_cast<QGroupBox *>(widget)) {
+ if (qFindChildren<QGroupBox *>(widget).size() == 0) {
+ widget->layout()->setSpacing(0);
+ widget->layout()->setMargin(12);
+ } else {
+ widget->layout()->setMargin(13);
+ }
+ }
+
+ if (qobject_cast<QPushButton *>(widget)
+ || qobject_cast<QRadioButton *>(widget)
+ || qobject_cast<QSlider *>(widget)) {
+ widget->setAttribute(Qt::WA_Hover);
+ }
+
+ QPalette pal = widget->palette();
+ if (widget->isWindow()) {
+ pal.setColor(QPalette::Background, QColor(241, 241, 241));
+ widget->setPalette(pal);
+ }
+
+}
+
+void ArthurStyle::unpolish(QWidget *widget)
+{
+ if (qobject_cast<QPushButton *>(widget)
+ || qobject_cast<QRadioButton *>(widget)
+ || qobject_cast<QSlider *>(widget)) {
+ widget->setAttribute(Qt::WA_Hover, false);
+ }
+}
+
+void ArthurStyle::polish(QPalette &palette)
+{
+ palette.setColor(QPalette::Background, QColor(241, 241, 241));
+}
+
+QRect ArthurStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
+{
+ QRect r;
+ switch(element) {
+ case SE_RadioButtonClickRect:
+ r = widget->rect();
+ break;
+ case SE_RadioButtonContents:
+ r = widget->rect().adjusted(20, 0, 0, 0);
+ break;
+ default:
+ r = QWindowsStyle::subElementRect(element, option, widget);
+ break;
+ }
+
+ if (qobject_cast<const QRadioButton*>(widget))
+ r = r.adjusted(5, 0, -5, 0);
+
+ return r;
+}
diff --git a/demos/shared/arthurstyle.h b/demos/shared/arthurstyle.h
new file mode 100644
index 0000000..ec79361
--- /dev/null
+++ b/demos/shared/arthurstyle.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ARTHURSTYLE_H
+#define ARTHURSTYLE_H
+
+#include <QWindowsStyle>
+
+QT_USE_NAMESPACE
+
+class ArthurStyle : public QWindowsStyle
+{
+public:
+ ArthurStyle();
+
+ void drawHoverRect(QPainter *painter, const QRect &rect) const;
+
+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget = 0) const;
+// void drawControl(ControlElement element, const QStyleOption *option,
+// QPainter *painter, const QWidget *widget) const;
+ void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
+ QPainter *painter, const QWidget *widget) const;
+ QSize sizeFromContents(ContentsType type, const QStyleOption *option,
+ const QSize &size, const QWidget *widget) const;
+
+ QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const;
+ QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
+ SubControl sc, const QWidget *widget) const;
+
+// SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option,
+// const QPoint &pos, const QWidget *widget = 0) const;
+
+ int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const;
+
+ void polish(QPalette &palette);
+ void polish(QWidget *widget);
+ void unpolish(QWidget *widget);
+};
+
+#endif
diff --git a/demos/shared/arthurwidgets.cpp b/demos/shared/arthurwidgets.cpp
new file mode 100644
index 0000000..f9eed99
--- /dev/null
+++ b/demos/shared/arthurwidgets.cpp
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "arthurwidgets.h"
+#include <QApplication>
+#include <QPainter>
+#include <QPainterPath>
+#include <QPixmapCache>
+#include <QtEvents>
+#include <QTextDocument>
+#include <QAbstractTextDocumentLayout>
+#include <QFile>
+#include <QTextBrowser>
+#include <QBoxLayout>
+
+#include <private/qpixmapdata_p.h>
+
+extern QPixmap cached(const QString &img);
+
+ArthurFrame::ArthurFrame(QWidget *parent)
+ : QWidget(parent)
+ , m_prefer_image(false)
+{
+#ifdef QT_OPENGL_SUPPORT
+ glw = 0;
+ m_use_opengl = false;
+ QGLFormat f = QGLFormat::defaultFormat();
+ f.setSampleBuffers(true);
+ f.setStencil(true);
+ f.setAlpha(true);
+ f.setAlphaBufferSize(8);
+ QGLFormat::setDefaultFormat(f);
+#endif
+ m_document = 0;
+ m_show_doc = false;
+
+ m_tile = QPixmap(128, 128);
+ m_tile.fill(Qt::white);
+ QPainter pt(&m_tile);
+ QColor color(230, 230, 230);
+ pt.fillRect(0, 0, 64, 64, color);
+ pt.fillRect(64, 64, 64, 64, color);
+ pt.end();
+
+// QPalette pal = palette();
+// pal.setBrush(backgroundRole(), m_tile);
+// setPalette(pal);
+
+#ifdef Q_WS_X11
+ QPixmap xRenderPixmap(1, 1);
+ m_prefer_image = xRenderPixmap.pixmapData()->classId() == QPixmapData::X11Class && !xRenderPixmap.x11PictureHandle();
+#endif
+}
+
+
+#ifdef QT_OPENGL_SUPPORT
+void ArthurFrame::enableOpenGL(bool use_opengl)
+{
+ m_use_opengl = use_opengl;
+
+ if (!glw) {
+ glw = new GLWidget(this);
+ glw->setAutoFillBackground(false);
+ glw->disableAutoBufferSwap();
+ QApplication::postEvent(this, new QResizeEvent(size(), size()));
+ }
+
+ if (use_opengl) {
+ glw->show();
+ } else {
+ glw->hide();
+ }
+
+ update();
+}
+#endif
+
+void ArthurFrame::paintEvent(QPaintEvent *e)
+{
+#ifdef Q_WS_QWS
+ static QPixmap *static_image = 0;
+#else
+ static QImage *static_image = 0;
+#endif
+ QPainter painter;
+ if (preferImage()
+#ifdef QT_OPENGL_SUPPORT
+ && !m_use_opengl
+#endif
+ ) {
+ if (!static_image || static_image->size() != size()) {
+ delete static_image;
+#ifdef Q_WS_QWS
+ static_image = new QPixmap(size());
+#else
+ static_image = new QImage(size(), QImage::Format_RGB32);
+#endif
+ }
+ painter.begin(static_image);
+
+ int o = 10;
+
+ QBrush bg = palette().brush(QPalette::Background);
+ painter.fillRect(0, 0, o, o, bg);
+ painter.fillRect(width() - o, 0, o, o, bg);
+ painter.fillRect(0, height() - o, o, o, bg);
+ painter.fillRect(width() - o, height() - o, o, o, bg);
+ } else {
+#ifdef QT_OPENGL_SUPPORT
+ if (m_use_opengl) {
+ painter.begin(glw);
+ painter.fillRect(QRectF(0, 0, glw->width(), glw->height()), palette().color(backgroundRole()));
+ } else {
+ painter.begin(this);
+ }
+#else
+ painter.begin(this);
+#endif
+ }
+
+ painter.setClipRect(e->rect());
+
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ QPainterPath clipPath;
+
+ QRect r = rect();
+ qreal left = r.x() + 1;
+ qreal top = r.y() + 1;
+ qreal right = r.right();
+ qreal bottom = r.bottom();
+ qreal radius2 = 8 * 2;
+
+ clipPath.moveTo(right - radius2, top);
+ clipPath.arcTo(right - radius2, top, radius2, radius2, 90, -90);
+ clipPath.arcTo(right - radius2, bottom - radius2, radius2, radius2, 0, -90);
+ clipPath.arcTo(left, bottom - radius2, radius2, radius2, 270, -90);
+ clipPath.arcTo(left, top, radius2, radius2, 180, -90);
+ clipPath.closeSubpath();
+
+ painter.save();
+ painter.setClipPath(clipPath, Qt::IntersectClip);
+
+ painter.drawTiledPixmap(rect(), m_tile);
+
+ // client painting
+
+ paint(&painter);
+
+ painter.restore();
+
+ painter.save();
+ if (m_show_doc)
+ paintDescription(&painter);
+ painter.restore();
+
+ int level = 180;
+ painter.setPen(QPen(QColor(level, level, level), 2));
+ painter.setBrush(Qt::NoBrush);
+ painter.drawPath(clipPath);
+
+ if (preferImage()
+#ifdef QT_OPENGL_SUPPORT
+ && !m_use_opengl
+#endif
+ ) {
+ painter.end();
+ painter.begin(this);
+#ifdef Q_WS_QWS
+ painter.drawPixmap(e->rect(), *static_image, e->rect());
+#else
+ painter.drawImage(e->rect(), *static_image, e->rect());
+#endif
+ }
+
+#ifdef QT_OPENGL_SUPPORT
+ if (m_use_opengl && (inherits("PathDeformRenderer") || inherits("PathStrokeRenderer") || inherits("CompositionRenderer") || m_show_doc))
+ glw->swapBuffers();
+#endif
+}
+
+void ArthurFrame::resizeEvent(QResizeEvent *e)
+{
+#ifdef QT_OPENGL_SUPPORT
+ if (glw)
+ glw->setGeometry(0, 0, e->size().width()-1, e->size().height()-1);
+#endif
+ QWidget::resizeEvent(e);
+}
+
+void ArthurFrame::setDescriptionEnabled(bool enabled)
+{
+ if (m_show_doc != enabled) {
+ m_show_doc = enabled;
+ emit descriptionEnabledChanged(m_show_doc);
+ update();
+ }
+}
+
+void ArthurFrame::loadDescription(const QString &fileName)
+{
+ QFile textFile(fileName);
+ QString text;
+ if (!textFile.open(QFile::ReadOnly))
+ text = QString("Unable to load resource file: '%1'").arg(fileName);
+ else
+ text = textFile.readAll();
+ setDescription(text);
+}
+
+
+void ArthurFrame::setDescription(const QString &text)
+{
+ m_document = new QTextDocument(this);
+ m_document->setHtml(text);
+}
+
+void ArthurFrame::paintDescription(QPainter *painter)
+{
+ if (!m_document)
+ return;
+
+ int pageWidth = qMax(width() - 100, 100);
+ int pageHeight = qMax(height() - 100, 100);
+ if (pageWidth != m_document->pageSize().width()) {
+ m_document->setPageSize(QSize(pageWidth, pageHeight));
+ }
+
+ QRect textRect(width() / 2 - pageWidth / 2,
+ height() / 2 - pageHeight / 2,
+ pageWidth,
+ pageHeight);
+ int pad = 10;
+ QRect clearRect = textRect.adjusted(-pad, -pad, pad, pad);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(QColor(0, 0, 0, 63));
+ int shade = 10;
+ painter->drawRect(clearRect.x() + clearRect.width() + 1,
+ clearRect.y() + shade,
+ shade,
+ clearRect.height() + 1);
+ painter->drawRect(clearRect.x() + shade,
+ clearRect.y() + clearRect.height() + 1,
+ clearRect.width() - shade + 1,
+ shade);
+
+ painter->setRenderHint(QPainter::Antialiasing, false);
+ painter->setBrush(QColor(255, 255, 255, 220));
+ painter->setPen(Qt::black);
+ painter->drawRect(clearRect);
+
+ painter->setClipRegion(textRect, Qt::IntersectClip);
+ painter->translate(textRect.topLeft());
+
+ QAbstractTextDocumentLayout::PaintContext ctx;
+
+ QLinearGradient g(0, 0, 0, textRect.height());
+ g.setColorAt(0, Qt::black);
+ g.setColorAt(0.9, Qt::black);
+ g.setColorAt(1, Qt::transparent);
+
+ QPalette pal = palette();
+ pal.setBrush(QPalette::Text, g);
+
+ ctx.palette = pal;
+ ctx.clip = QRect(0, 0, textRect.width(), textRect.height());
+ m_document->documentLayout()->draw(painter, ctx);
+}
+
+void ArthurFrame::loadSourceFile(const QString &sourceFile)
+{
+ m_sourceFileName = sourceFile;
+}
+
+void ArthurFrame::showSource()
+{
+ // Check for existing source
+ if (qFindChild<QTextBrowser *>(this))
+ return;
+
+ QString contents;
+ if (m_sourceFileName.isEmpty()) {
+ contents = QString("No source for widget: '%1'").arg(objectName());
+ } else {
+ QFile f(m_sourceFileName);
+ if (!f.open(QFile::ReadOnly))
+ contents = QString("Could not open file: '%1'").arg(m_sourceFileName);
+ else
+ contents = f.readAll();
+ }
+
+ contents.replace('&', "&amp;");
+ contents.replace('<', "&lt;");
+ contents.replace('>', "&gt;");
+
+ QStringList keywords;
+ keywords << "for " << "if " << "switch " << " int " << "#include " << "const"
+ << "void " << "uint " << "case " << "double " << "#define " << "static"
+ << "new" << "this";
+
+ foreach (QString keyword, keywords)
+ contents.replace(keyword, QLatin1String("<font color=olive>") + keyword + QLatin1String("</font>"));
+ contents.replace("(int ", "(<font color=olive><b>int </b></font>");
+
+ QStringList ppKeywords;
+ ppKeywords << "#ifdef" << "#ifndef" << "#if" << "#endif" << "#else";
+
+ foreach (QString keyword, ppKeywords)
+ contents.replace(keyword, QLatin1String("<font color=navy>") + keyword + QLatin1String("</font>"));
+
+ contents.replace(QRegExp("(\\d\\d?)"), QLatin1String("<font color=navy>\\1</font>"));
+
+ QRegExp commentRe("(//.+)\\n");
+ commentRe.setMinimal(true);
+ contents.replace(commentRe, QLatin1String("<font color=red>\\1</font>\n"));
+
+ QRegExp stringLiteralRe("(\".+\")");
+ stringLiteralRe.setMinimal(true);
+ contents.replace(stringLiteralRe, QLatin1String("<font color=green>\\1</font>"));
+
+ QString html = contents;
+ html.prepend("<html><pre>");
+ html.append("</pre></html>");
+
+ QTextBrowser *sourceViewer = new QTextBrowser(0);
+ sourceViewer->setWindowTitle("Source: " + m_sourceFileName.mid(5));
+ sourceViewer->setParent(this, Qt::Dialog);
+ sourceViewer->setAttribute(Qt::WA_DeleteOnClose);
+ sourceViewer->setLineWrapMode(QTextEdit::NoWrap);
+ sourceViewer->setHtml(html);
+ sourceViewer->resize(600, 600);
+ sourceViewer->show();
+}
diff --git a/demos/shared/arthurwidgets.h b/demos/shared/arthurwidgets.h
new file mode 100644
index 0000000..4d55b61
--- /dev/null
+++ b/demos/shared/arthurwidgets.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ARTHURWIDGETS_H
+#define ARTHURWIDGETS_H
+
+#include "arthurstyle.h"
+#include <QBitmap>
+#include <QPushButton>
+#include <QGroupBox>
+
+#if defined(QT_OPENGL_SUPPORT)
+#include <QGLWidget>
+class GLWidget : public QGLWidget
+{
+public:
+ GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent) {}
+ void disableAutoBufferSwap() { setAutoBufferSwap(false); }
+ void paintEvent(QPaintEvent *) { parentWidget()->update(); }
+};
+#endif
+
+QT_FORWARD_DECLARE_CLASS(QTextDocument)
+QT_FORWARD_DECLARE_CLASS(QTextEdit)
+QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
+
+class ArthurFrame : public QWidget
+{
+ Q_OBJECT
+public:
+ ArthurFrame(QWidget *parent);
+ virtual void paint(QPainter *) {}
+
+
+ void paintDescription(QPainter *p);
+
+ void loadDescription(const QString &filename);
+ void setDescription(const QString &htmlDesc);
+
+ void loadSourceFile(const QString &fileName);
+
+ bool preferImage() const { return m_prefer_image; }
+
+#if defined(QT_OPENGL_SUPPORT)
+ QGLWidget *glWidget() const { return glw; }
+#endif
+
+public slots:
+ void setPreferImage(bool pi) { m_prefer_image = pi; }
+ void setDescriptionEnabled(bool enabled);
+ void showSource();
+
+#if defined(QT_OPENGL_SUPPORT)
+ void enableOpenGL(bool use_opengl);
+ bool usesOpenGL() { return m_use_opengl; }
+#endif
+
+signals:
+ void descriptionEnabledChanged(bool);
+
+protected:
+ void paintEvent(QPaintEvent *);
+ void resizeEvent(QResizeEvent *);
+
+#if defined(QT_OPENGL_SUPPORT)
+ GLWidget *glw;
+ bool m_use_opengl;
+#endif
+ QPixmap m_tile;
+
+ bool m_show_doc;
+ bool m_prefer_image;
+ QTextDocument *m_document;
+
+ QString m_sourceFileName;
+
+};
+
+#endif
diff --git a/demos/shared/hoverpoints.cpp b/demos/shared/hoverpoints.cpp
new file mode 100644
index 0000000..70062f6
--- /dev/null
+++ b/demos/shared/hoverpoints.cpp
@@ -0,0 +1,333 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef QT_OPENGL_SUPPORT
+#include <QGLWidget>
+#endif
+
+#include "arthurwidgets.h"
+#include "hoverpoints.h"
+
+#define printf
+
+HoverPoints::HoverPoints(QWidget *widget, PointShape shape)
+ : QObject(widget)
+{
+ m_widget = widget;
+ widget->installEventFilter(this);
+
+ m_connectionType = CurveConnection;
+ m_sortType = NoSort;
+ m_shape = shape;
+ m_pointPen = QPen(QColor(255, 255, 255, 191), 1);
+ m_connectionPen = QPen(QColor(255, 255, 255, 127), 2);
+ m_pointBrush = QBrush(QColor(191, 191, 191, 127));
+ m_pointSize = QSize(11, 11);
+ m_currentIndex = -1;
+ m_editable = true;
+ m_enabled = true;
+
+ connect(this, SIGNAL(pointsChanged(const QPolygonF &)),
+ m_widget, SLOT(update()));
+}
+
+
+void HoverPoints::setEnabled(bool enabled)
+{
+ if (m_enabled != enabled) {
+ m_enabled = enabled;
+ m_widget->update();
+ }
+}
+
+
+bool HoverPoints::eventFilter(QObject *object, QEvent *event)
+{
+ if (object == m_widget && m_enabled) {
+ switch (event->type()) {
+
+ case QEvent::MouseButtonPress:
+ {
+ QMouseEvent *me = (QMouseEvent *) event;
+
+ QPointF clickPos = me->pos();
+ int index = -1;
+ for (int i=0; i<m_points.size(); ++i) {
+ QPainterPath path;
+ if (m_shape == CircleShape)
+ path.addEllipse(pointBoundingRect(i));
+ else
+ path.addRect(pointBoundingRect(i));
+
+ if (path.contains(clickPos)) {
+ index = i;
+ break;
+ }
+ }
+
+ if (me->button() == Qt::LeftButton) {
+ if (index == -1) {
+ if (!m_editable)
+ return false;
+ int pos = 0;
+ // Insert sort for x or y
+ if (m_sortType == XSort) {
+ for (int i=0; i<m_points.size(); ++i)
+ if (m_points.at(i).x() > clickPos.x()) {
+ pos = i;
+ break;
+ }
+ } else if (m_sortType == YSort) {
+ for (int i=0; i<m_points.size(); ++i)
+ if (m_points.at(i).y() > clickPos.y()) {
+ pos = i;
+ break;
+ }
+ }
+
+ m_points.insert(pos, clickPos);
+ m_locks.insert(pos, 0);
+ m_currentIndex = pos;
+ firePointChange();
+ } else {
+ m_currentIndex = index;
+ }
+ return true;
+
+ } else if (me->button() == Qt::RightButton) {
+ if (index >= 0 && m_editable) {
+ if (m_locks[index] == 0) {
+ m_locks.remove(index);
+ m_points.remove(index);
+ }
+ firePointChange();
+ return true;
+ }
+ }
+
+ }
+ break;
+
+ case QEvent::MouseButtonRelease:
+ m_currentIndex = -1;
+ break;
+
+ case QEvent::MouseMove:
+ if (m_currentIndex >= 0)
+ movePoint(m_currentIndex, ((QMouseEvent *)event)->pos());
+ break;
+
+ case QEvent::Resize:
+ {
+ QResizeEvent *e = (QResizeEvent *) event;
+ if (e->oldSize().width() == 0 || e->oldSize().height() == 0)
+ break;
+ qreal stretch_x = e->size().width() / qreal(e->oldSize().width());
+ qreal stretch_y = e->size().height() / qreal(e->oldSize().height());
+ for (int i=0; i<m_points.size(); ++i) {
+ QPointF p = m_points[i];
+ movePoint(i, QPointF(p.x() * stretch_x, p.y() * stretch_y), false);
+ }
+
+ firePointChange();
+ break;
+ }
+
+ case QEvent::Paint:
+ {
+ QWidget *that_widget = m_widget;
+ m_widget = 0;
+ QApplication::sendEvent(object, event);
+ m_widget = that_widget;
+ paintPoints();
+#ifdef QT_OPENGL_SUPPORT
+ ArthurFrame *af = qobject_cast<ArthurFrame *>(that_widget);
+ if (af && af->usesOpenGL())
+ af->glWidget()->swapBuffers();
+#endif
+ return true;
+ }
+ default:
+ break;
+ }
+ }
+
+ return false;
+}
+
+
+void HoverPoints::paintPoints()
+{
+ QPainter p;
+#ifdef QT_OPENGL_SUPPORT
+ ArthurFrame *af = qobject_cast<ArthurFrame *>(m_widget);
+ if (af && af->usesOpenGL())
+ p.begin(af->glWidget());
+ else
+ p.begin(m_widget);
+#else
+ p.begin(m_widget);
+#endif
+
+ p.setRenderHint(QPainter::Antialiasing);
+
+ if (m_connectionPen.style() != Qt::NoPen && m_connectionType != NoConnection) {
+ p.setPen(m_connectionPen);
+
+ if (m_connectionType == CurveConnection) {
+ QPainterPath path;
+ path.moveTo(m_points.at(0));
+ for (int i=1; i<m_points.size(); ++i) {
+ QPointF p1 = m_points.at(i-1);
+ QPointF p2 = m_points.at(i);
+ qreal distance = p2.x() - p1.x();
+
+ path.cubicTo(p1.x() + distance / 2, p1.y(),
+ p1.x() + distance / 2, p2.y(),
+ p2.x(), p2.y());
+ }
+ p.drawPath(path);
+ } else {
+ p.drawPolyline(m_points);
+ }
+ }
+
+ p.setPen(m_pointPen);
+ p.setBrush(m_pointBrush);
+
+ for (int i=0; i<m_points.size(); ++i) {
+ QRectF bounds = pointBoundingRect(i);
+ if (m_shape == CircleShape)
+ p.drawEllipse(bounds);
+ else
+ p.drawRect(bounds);
+ }
+}
+
+static QPointF bound_point(const QPointF &point, const QRectF &bounds, int lock)
+{
+ QPointF p = point;
+
+ qreal left = bounds.left();
+ qreal right = bounds.right();
+ qreal top = bounds.top();
+ qreal bottom = bounds.bottom();
+
+ if (p.x() < left || (lock & HoverPoints::LockToLeft)) p.setX(left);
+ else if (p.x() > right || (lock & HoverPoints::LockToRight)) p.setX(right);
+
+ if (p.y() < top || (lock & HoverPoints::LockToTop)) p.setY(top);
+ else if (p.y() > bottom || (lock & HoverPoints::LockToBottom)) p.setY(bottom);
+
+ return p;
+}
+
+void HoverPoints::setPoints(const QPolygonF &points)
+{
+ m_points.clear();
+ for (int i=0; i<points.size(); ++i)
+ m_points << bound_point(points.at(i), boundingRect(), 0);
+
+ m_locks.clear();
+ if (m_points.size() > 0) {
+ m_locks.resize(m_points.size());
+
+ m_locks.fill(0);
+ }
+}
+
+
+void HoverPoints::movePoint(int index, const QPointF &point, bool emitUpdate)
+{
+ m_points[index] = bound_point(point, boundingRect(), m_locks.at(index));
+ if (emitUpdate)
+ firePointChange();
+}
+
+
+inline static bool x_less_than(const QPointF &p1, const QPointF &p2)
+{
+ return p1.x() < p2.x();
+}
+
+
+inline static bool y_less_than(const QPointF &p1, const QPointF &p2)
+{
+ return p1.y() < p2.y();
+}
+
+void HoverPoints::firePointChange()
+{
+// printf("HoverPoints::firePointChange(), current=%d\n", m_currentIndex);
+
+ if (m_sortType != NoSort) {
+
+ QPointF oldCurrent;
+ if (m_currentIndex != -1) {
+ oldCurrent = m_points[m_currentIndex];
+ }
+
+ if (m_sortType == XSort)
+ qSort(m_points.begin(), m_points.end(), x_less_than);
+ else if (m_sortType == YSort)
+ qSort(m_points.begin(), m_points.end(), y_less_than);
+
+ // Compensate for changed order...
+ if (m_currentIndex != -1) {
+ for (int i=0; i<m_points.size(); ++i) {
+ if (m_points[i] == oldCurrent) {
+ m_currentIndex = i;
+ break;
+ }
+ }
+ }
+
+// printf(" - firePointChange(), current=%d\n", m_currentIndex);
+
+ }
+
+// for (int i=0; i<m_points.size(); ++i) {
+// printf(" - point(%2d)=[%.2f, %.2f], lock=%d\n",
+// i, m_points.at(i).x(), m_points.at(i).y(), m_locks.at(i));
+// }
+
+ emit pointsChanged(m_points);
+}
diff --git a/demos/shared/hoverpoints.h b/demos/shared/hoverpoints.h
new file mode 100644
index 0000000..cf8742d
--- /dev/null
+++ b/demos/shared/hoverpoints.h
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HOVERPOINTS_H
+#define HOVERPOINTS_H
+
+#include <QtGui>
+
+QT_FORWARD_DECLARE_CLASS(QBypassWidget)
+
+class HoverPoints : public QObject
+{
+ Q_OBJECT
+public:
+ enum PointShape {
+ CircleShape,
+ RectangleShape
+ };
+
+ enum LockType {
+ LockToLeft = 0x01,
+ LockToRight = 0x02,
+ LockToTop = 0x04,
+ LockToBottom = 0x08
+ };
+
+ enum SortType {
+ NoSort,
+ XSort,
+ YSort
+ };
+
+ enum ConnectionType {
+ NoConnection,
+ LineConnection,
+ CurveConnection
+ };
+
+ HoverPoints(QWidget *widget, PointShape shape);
+
+ bool eventFilter(QObject *object, QEvent *event);
+
+ void paintPoints();
+
+ inline QRectF boundingRect() const;
+ void setBoundingRect(const QRectF &boundingRect) { m_bounds = boundingRect; }
+
+ QPolygonF points() const { return m_points; }
+ void setPoints(const QPolygonF &points);
+
+ QSizeF pointSize() const { return m_pointSize; }
+ void setPointSize(const QSizeF &size) { m_pointSize = size; }
+
+ SortType sortType() const { return m_sortType; }
+ void setSortType(SortType sortType) { m_sortType = sortType; }
+
+ ConnectionType connectionType() const { return m_connectionType; }
+ void setConnectionType(ConnectionType connectionType) { m_connectionType = connectionType; }
+
+ void setConnectionPen(const QPen &pen) { m_connectionPen = pen; }
+ void setShapePen(const QPen &pen) { m_pointPen = pen; }
+ void setShapeBrush(const QBrush &brush) { m_pointBrush = brush; }
+
+ void setPointLock(int pos, LockType lock) { m_locks[pos] = lock; }
+
+ void setEditable(bool editable) { m_editable = editable; }
+ bool editable() const { return m_editable; }
+
+public slots:
+ void setEnabled(bool enabled);
+ void setDisabled(bool disabled) { setEnabled(!disabled); }
+
+signals:
+ void pointsChanged(const QPolygonF &points);
+
+public:
+ void firePointChange();
+
+private:
+ inline QRectF pointBoundingRect(int i) const;
+ void movePoint(int i, const QPointF &newPos, bool emitChange = true);
+
+ QWidget *m_widget;
+
+ QPolygonF m_points;
+ QRectF m_bounds;
+ PointShape m_shape;
+ SortType m_sortType;
+ ConnectionType m_connectionType;
+
+ QVector<uint> m_locks;
+
+ QSizeF m_pointSize;
+ int m_currentIndex;
+ bool m_editable;
+ bool m_enabled;
+
+ QPen m_pointPen;
+ QBrush m_pointBrush;
+ QPen m_connectionPen;
+};
+
+
+inline QRectF HoverPoints::pointBoundingRect(int i) const
+{
+ QPointF p = m_points.at(i);
+ qreal w = m_pointSize.width();
+ qreal h = m_pointSize.height();
+ qreal x = p.x() - w / 2;
+ qreal y = p.y() - h / 2;
+ return QRectF(x, y, w, h);
+}
+
+inline QRectF HoverPoints::boundingRect() const
+{
+ if (m_bounds.isEmpty())
+ return m_widget->rect();
+ else
+ return m_bounds;
+}
+
+#endif // HOVERPOINTS_H
diff --git a/demos/shared/images/bg_pattern.png b/demos/shared/images/bg_pattern.png
new file mode 100644
index 0000000..ee67026
--- /dev/null
+++ b/demos/shared/images/bg_pattern.png
Binary files differ
diff --git a/demos/shared/images/button_normal_cap_left.png b/demos/shared/images/button_normal_cap_left.png
new file mode 100644
index 0000000..db31dd9
--- /dev/null
+++ b/demos/shared/images/button_normal_cap_left.png
Binary files differ
diff --git a/demos/shared/images/button_normal_cap_right.png b/demos/shared/images/button_normal_cap_right.png
new file mode 100644
index 0000000..38ead1c
--- /dev/null
+++ b/demos/shared/images/button_normal_cap_right.png
Binary files differ
diff --git a/demos/shared/images/button_normal_stretch.png b/demos/shared/images/button_normal_stretch.png
new file mode 100644
index 0000000..87abe67
--- /dev/null
+++ b/demos/shared/images/button_normal_stretch.png
Binary files differ
diff --git a/demos/shared/images/button_pressed_cap_left.png b/demos/shared/images/button_pressed_cap_left.png
new file mode 100644
index 0000000..66bfc13
--- /dev/null
+++ b/demos/shared/images/button_pressed_cap_left.png
Binary files differ
diff --git a/demos/shared/images/button_pressed_cap_right.png b/demos/shared/images/button_pressed_cap_right.png
new file mode 100644
index 0000000..3d4cfe2
--- /dev/null
+++ b/demos/shared/images/button_pressed_cap_right.png
Binary files differ
diff --git a/demos/shared/images/button_pressed_stretch.png b/demos/shared/images/button_pressed_stretch.png
new file mode 100644
index 0000000..4dd4ad1
--- /dev/null
+++ b/demos/shared/images/button_pressed_stretch.png
Binary files differ
diff --git a/demos/shared/images/curve_thing_edit-6.png b/demos/shared/images/curve_thing_edit-6.png
new file mode 100644
index 0000000..034b474
--- /dev/null
+++ b/demos/shared/images/curve_thing_edit-6.png
Binary files differ
diff --git a/demos/shared/images/frame_bottom.png b/demos/shared/images/frame_bottom.png
new file mode 100644
index 0000000..889b40d
--- /dev/null
+++ b/demos/shared/images/frame_bottom.png
Binary files differ
diff --git a/demos/shared/images/frame_bottomleft.png b/demos/shared/images/frame_bottomleft.png
new file mode 100644
index 0000000..0b3023f
--- /dev/null
+++ b/demos/shared/images/frame_bottomleft.png
Binary files differ
diff --git a/demos/shared/images/frame_bottomright.png b/demos/shared/images/frame_bottomright.png
new file mode 100644
index 0000000..0021e35
--- /dev/null
+++ b/demos/shared/images/frame_bottomright.png
Binary files differ
diff --git a/demos/shared/images/frame_left.png b/demos/shared/images/frame_left.png
new file mode 100644
index 0000000..40f331c
--- /dev/null
+++ b/demos/shared/images/frame_left.png
Binary files differ
diff --git a/demos/shared/images/frame_right.png b/demos/shared/images/frame_right.png
new file mode 100644
index 0000000..023af8c
--- /dev/null
+++ b/demos/shared/images/frame_right.png
Binary files differ
diff --git a/demos/shared/images/frame_top.png b/demos/shared/images/frame_top.png
new file mode 100644
index 0000000..001f3a7
--- /dev/null
+++ b/demos/shared/images/frame_top.png
Binary files differ
diff --git a/demos/shared/images/frame_topleft.png b/demos/shared/images/frame_topleft.png
new file mode 100644
index 0000000..58c68d4
--- /dev/null
+++ b/demos/shared/images/frame_topleft.png
Binary files differ
diff --git a/demos/shared/images/frame_topright.png b/demos/shared/images/frame_topright.png
new file mode 100644
index 0000000..6a7e8d3
--- /dev/null
+++ b/demos/shared/images/frame_topright.png
Binary files differ
diff --git a/demos/shared/images/groupframe_bottom_left.png b/demos/shared/images/groupframe_bottom_left.png
new file mode 100644
index 0000000..af2fe06
--- /dev/null
+++ b/demos/shared/images/groupframe_bottom_left.png
Binary files differ
diff --git a/demos/shared/images/groupframe_bottom_right.png b/demos/shared/images/groupframe_bottom_right.png
new file mode 100644
index 0000000..fdf2e97
--- /dev/null
+++ b/demos/shared/images/groupframe_bottom_right.png
Binary files differ
diff --git a/demos/shared/images/groupframe_bottom_stretch.png b/demos/shared/images/groupframe_bottom_stretch.png
new file mode 100644
index 0000000..f47b67d
--- /dev/null
+++ b/demos/shared/images/groupframe_bottom_stretch.png
Binary files differ
diff --git a/demos/shared/images/groupframe_left_stretch.png b/demos/shared/images/groupframe_left_stretch.png
new file mode 100644
index 0000000..c122f46
--- /dev/null
+++ b/demos/shared/images/groupframe_left_stretch.png
Binary files differ
diff --git a/demos/shared/images/groupframe_right_stretch.png b/demos/shared/images/groupframe_right_stretch.png
new file mode 100644
index 0000000..1056b78
--- /dev/null
+++ b/demos/shared/images/groupframe_right_stretch.png
Binary files differ
diff --git a/demos/shared/images/groupframe_top_stretch.png b/demos/shared/images/groupframe_top_stretch.png
new file mode 100644
index 0000000..5746ef9
--- /dev/null
+++ b/demos/shared/images/groupframe_top_stretch.png
Binary files differ
diff --git a/demos/shared/images/groupframe_topleft.png b/demos/shared/images/groupframe_topleft.png
new file mode 100644
index 0000000..98d9cd9
--- /dev/null
+++ b/demos/shared/images/groupframe_topleft.png
Binary files differ
diff --git a/demos/shared/images/groupframe_topright.png b/demos/shared/images/groupframe_topright.png
new file mode 100644
index 0000000..1a0a328
--- /dev/null
+++ b/demos/shared/images/groupframe_topright.png
Binary files differ
diff --git a/demos/shared/images/line_dash_dot.png b/demos/shared/images/line_dash_dot.png
new file mode 100644
index 0000000..1c61442
--- /dev/null
+++ b/demos/shared/images/line_dash_dot.png
Binary files differ
diff --git a/demos/shared/images/line_dash_dot_dot.png b/demos/shared/images/line_dash_dot_dot.png
new file mode 100644
index 0000000..0d9bb97
--- /dev/null
+++ b/demos/shared/images/line_dash_dot_dot.png
Binary files differ
diff --git a/demos/shared/images/line_dashed.png b/demos/shared/images/line_dashed.png
new file mode 100644
index 0000000..d5bc7ea
--- /dev/null
+++ b/demos/shared/images/line_dashed.png
Binary files differ
diff --git a/demos/shared/images/line_dotted.png b/demos/shared/images/line_dotted.png
new file mode 100644
index 0000000..a2f9a35
--- /dev/null
+++ b/demos/shared/images/line_dotted.png
Binary files differ
diff --git a/demos/shared/images/line_solid.png b/demos/shared/images/line_solid.png
new file mode 100644
index 0000000..60ef3f9
--- /dev/null
+++ b/demos/shared/images/line_solid.png
Binary files differ
diff --git a/demos/shared/images/radiobutton-off.png b/demos/shared/images/radiobutton-off.png
new file mode 100644
index 0000000..af1753a
--- /dev/null
+++ b/demos/shared/images/radiobutton-off.png
Binary files differ
diff --git a/demos/shared/images/radiobutton-on.png b/demos/shared/images/radiobutton-on.png
new file mode 100644
index 0000000..f875838
--- /dev/null
+++ b/demos/shared/images/radiobutton-on.png
Binary files differ
diff --git a/demos/shared/images/radiobutton_off.png b/demos/shared/images/radiobutton_off.png
new file mode 100644
index 0000000..400906e
--- /dev/null
+++ b/demos/shared/images/radiobutton_off.png
Binary files differ
diff --git a/demos/shared/images/radiobutton_on.png b/demos/shared/images/radiobutton_on.png
new file mode 100644
index 0000000..50a049e
--- /dev/null
+++ b/demos/shared/images/radiobutton_on.png
Binary files differ
diff --git a/demos/shared/images/slider_bar.png b/demos/shared/images/slider_bar.png
new file mode 100644
index 0000000..1b3d62c
--- /dev/null
+++ b/demos/shared/images/slider_bar.png
Binary files differ
diff --git a/demos/shared/images/slider_thumb_off.png b/demos/shared/images/slider_thumb_off.png
new file mode 100644
index 0000000..d7f141d
--- /dev/null
+++ b/demos/shared/images/slider_thumb_off.png
Binary files differ
diff --git a/demos/shared/images/slider_thumb_on.png b/demos/shared/images/slider_thumb_on.png
new file mode 100644
index 0000000..8e1f510
--- /dev/null
+++ b/demos/shared/images/slider_thumb_on.png
Binary files differ
diff --git a/demos/shared/images/title_cap_left.png b/demos/shared/images/title_cap_left.png
new file mode 100644
index 0000000..2d47507
--- /dev/null
+++ b/demos/shared/images/title_cap_left.png
Binary files differ
diff --git a/demos/shared/images/title_cap_right.png b/demos/shared/images/title_cap_right.png
new file mode 100644
index 0000000..dc3ff85
--- /dev/null
+++ b/demos/shared/images/title_cap_right.png
Binary files differ
diff --git a/demos/shared/images/title_stretch.png b/demos/shared/images/title_stretch.png
new file mode 100644
index 0000000..1104334
--- /dev/null
+++ b/demos/shared/images/title_stretch.png
Binary files differ
diff --git a/demos/shared/shared.pri b/demos/shared/shared.pri
new file mode 100644
index 0000000..b551595
--- /dev/null
+++ b/demos/shared/shared.pri
@@ -0,0 +1,20 @@
+INCLUDEPATH += $$SHARED_FOLDER
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+contains(CONFIG, debug_and_release_target) {
+ CONFIG(debug, debug|release) {
+ LIBS+=-L$$SHARED_FOLDER/debug
+ } else {
+ LIBS+=-L$$SHARED_FOLDER/release
+ }
+} else {
+ LIBS += -L$$SHARED_FOLDER
+}
+
+hpux-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
+hpuxi-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
+!hpuxi-acc*:!hpux-acc*:LIBS += -ldemo_shared
+
diff --git a/demos/shared/shared.pro b/demos/shared/shared.pro
new file mode 100644
index 0000000..cabce25
--- /dev/null
+++ b/demos/shared/shared.pro
@@ -0,0 +1,33 @@
+TEMPLATE = lib
+CONFIG += static
+
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+ DEFINES += QT_OPENGL_SUPPORT
+ QT += opengl
+}
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+TARGET = demo_shared
+
+SOURCES += \
+ arthurstyle.cpp\
+ arthurwidgets.cpp \
+ hoverpoints.cpp
+
+HEADERS += \
+ arthurstyle.h \
+ arthurwidgets.h \
+ hoverpoints.h
+
+RESOURCES += shared.qrc
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/shared
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.pri images
+sources.path = $$[QT_INSTALL_DEMOS]/shared
+INSTALLS += sources
+!cross_compile:INSTALLS += target
+
diff --git a/demos/shared/shared.qrc b/demos/shared/shared.qrc
new file mode 100644
index 0000000..17336ec
--- /dev/null
+++ b/demos/shared/shared.qrc
@@ -0,0 +1,39 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>images/button_normal_cap_left.png</file>
+ <file>images/button_normal_cap_right.png</file>
+ <file>images/button_normal_stretch.png</file>
+ <file>images/button_pressed_cap_left.png</file>
+ <file>images/button_pressed_cap_right.png</file>
+ <file>images/button_pressed_stretch.png</file>
+ <file>images/radiobutton-on.png</file>
+ <file>images/radiobutton_on.png</file>
+ <file>images/radiobutton_off.png</file>
+ <file>images/slider_bar.png</file>
+ <file>images/slider_thumb_on.png</file>
+ <file>images/groupframe_topleft.png</file>
+ <file>images/groupframe_topright.png</file>
+ <file>images/groupframe_bottom_left.png</file>
+ <file>images/groupframe_bottom_right.png</file>
+ <file>images/groupframe_top_stretch.png</file>
+ <file>images/groupframe_bottom_stretch.png</file>
+ <file>images/groupframe_left_stretch.png</file>
+ <file>images/groupframe_right_stretch.png</file>
+ <file>images/frame_topleft.png</file>
+ <file>images/frame_topright.png</file>
+ <file>images/frame_bottomleft.png</file>
+ <file>images/frame_bottomright.png</file>
+ <file>images/frame_left.png</file>
+ <file>images/frame_top.png</file>
+ <file>images/frame_right.png</file>
+ <file>images/frame_bottom.png</file>
+ <file>images/title_cap_left.png</file>
+ <file>images/title_cap_right.png</file>
+ <file>images/title_stretch.png</file>
+ <file>images/line_dash_dot.png</file>
+ <file>images/line_dotted.png</file>
+ <file>images/line_dashed.png</file>
+ <file>images/line_solid.png</file>
+ <file>images/line_dash_dot_dot.png</file>
+</qresource>
+</RCC>
diff --git a/demos/spreadsheet/images/interview.png b/demos/spreadsheet/images/interview.png
new file mode 100644
index 0000000..0c3d690
--- /dev/null
+++ b/demos/spreadsheet/images/interview.png
Binary files differ
diff --git a/demos/spreadsheet/main.cpp b/demos/spreadsheet/main.cpp
new file mode 100644
index 0000000..7a71641
--- /dev/null
+++ b/demos/spreadsheet/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "spreadsheet.h"
+
+int main(int argc, char** argv) {
+ Q_INIT_RESOURCE(spreadsheet);
+ QApplication app(argc, argv);
+ SpreadSheet sheet(10, 6);
+ sheet.setWindowIcon(QPixmap(":/images/interview.png"));
+ sheet.resize(640, 420);
+ sheet.show();
+ return app.exec();
+}
+
+
diff --git a/demos/spreadsheet/printview.cpp b/demos/spreadsheet/printview.cpp
new file mode 100644
index 0000000..76c4ae8
--- /dev/null
+++ b/demos/spreadsheet/printview.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "printview.h"
+#include <QPrinter>
+#include <QStyleOptionViewItem>
+
+PrintView::PrintView()
+{
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+}
+
+void PrintView::print(QPrinter *printer)
+{
+#ifndef QT_NO_PRINTER
+ resize(printer->width(), printer->height());
+ render(printer);
+#endif
+}
+
diff --git a/demos/spreadsheet/printview.h b/demos/spreadsheet/printview.h
new file mode 100644
index 0000000..3f2b918
--- /dev/null
+++ b/demos/spreadsheet/printview.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PRINTVIEW_H
+#define PRINTVIEW_H
+
+#include <QTableView>
+
+class PrintView : public QTableView
+{
+ Q_OBJECT
+
+public:
+ PrintView();
+
+public Q_SLOTS:
+ void print(QPrinter *printer);
+};
+
+#endif // PRINTVIEW_H
+
+
diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp
new file mode 100644
index 0000000..742855e
--- /dev/null
+++ b/demos/spreadsheet/spreadsheet.cpp
@@ -0,0 +1,631 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "spreadsheet.h"
+#include "spreadsheetdelegate.h"
+#include "spreadsheetitem.h"
+#include "printview.h"
+
+SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent)
+ : QMainWindow(parent)
+{
+ addToolBar(toolBar = new QToolBar());
+ formulaInput = new QLineEdit();
+
+ cellLabel = new QLabel(toolBar);
+ cellLabel->setMinimumSize(80, 0);
+
+ toolBar->addWidget(cellLabel);
+ toolBar->addWidget(formulaInput);
+
+ table = new QTableWidget(rows, cols, this);
+ for (int c = 0; c < cols; ++c) {
+ QString character(QChar('A' + c));
+ table->setHorizontalHeaderItem(c, new QTableWidgetItem(character));
+ }
+
+ table->setItemPrototype(table->item(rows -1, cols - 1));
+ table->setItemDelegate(new SpreadSheetDelegate());
+
+ createActions();
+ updateColor(0);
+ setupMenuBar();
+ setupContents();
+ setCentralWidget(table);
+
+ statusBar();
+ connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
+ this, SLOT(updateStatus(QTableWidgetItem*)));
+ connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
+ this, SLOT(updateColor(QTableWidgetItem*)));
+ connect(table, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)),
+ this, SLOT(updateLineEdit(QTableWidgetItem*)));
+ connect(table, SIGNAL(itemChanged(QTableWidgetItem*)),
+ this, SLOT(updateStatus(QTableWidgetItem*)));
+ connect(formulaInput, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
+ connect(table, SIGNAL(itemChanged(QTableWidgetItem*)),
+ this, SLOT(updateLineEdit(QTableWidgetItem*)));
+
+ setWindowTitle(tr("Spreadsheet"));
+}
+
+void SpreadSheet::createActions()
+{
+ cell_sumAction = new QAction(tr("Sum"), this);
+ connect(cell_sumAction, SIGNAL(triggered()), this, SLOT(actionSum()));
+
+ cell_addAction = new QAction(tr("&Add"), this);
+ cell_addAction->setShortcut(Qt::CTRL | Qt::Key_Plus);
+ connect(cell_addAction, SIGNAL(triggered()), this, SLOT(actionAdd()));
+
+ cell_subAction = new QAction(tr("&Subtract"), this);
+ cell_subAction->setShortcut(Qt::CTRL | Qt::Key_Minus);
+ connect(cell_subAction, SIGNAL(triggered()), this, SLOT(actionSubtract()));
+
+ cell_mulAction = new QAction(tr("&Multiply"), this);
+ cell_mulAction->setShortcut(Qt::CTRL | Qt::Key_multiply);
+ connect(cell_mulAction, SIGNAL(triggered()), this, SLOT(actionMultiply()));
+
+ cell_divAction = new QAction(tr("&Divide"), this);
+ cell_divAction->setShortcut(Qt::CTRL | Qt::Key_division);
+ connect(cell_divAction, SIGNAL(triggered()), this, SLOT(actionDivide()));
+
+ fontAction = new QAction(tr("Font..."), this);
+ fontAction->setShortcut(Qt::CTRL | Qt::Key_F);
+ connect(fontAction, SIGNAL(triggered()), this, SLOT(selectFont()));
+
+ colorAction = new QAction(QPixmap(16, 16), tr("Background &Color..."), this);
+ connect(colorAction, SIGNAL(triggered()), this, SLOT(selectColor()));
+
+ clearAction = new QAction(tr("Clear"), this);
+ clearAction->setShortcut(Qt::Key_Delete);
+ connect(clearAction, SIGNAL(triggered()), this, SLOT(clear()));
+
+ aboutSpreadSheet = new QAction(tr("About Spreadsheet"), this);
+ connect(aboutSpreadSheet, SIGNAL(triggered()), this, SLOT(showAbout()));
+
+ exitAction = new QAction(tr("E&xit"), this);
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ printAction = new QAction(tr("&Print"), this);
+ connect(printAction, SIGNAL(triggered()), this, SLOT(print()));
+
+ firstSeparator = new QAction(this);
+ firstSeparator->setSeparator(true);
+
+ secondSeparator = new QAction(this);
+ secondSeparator->setSeparator(true);
+}
+
+void SpreadSheet::setupMenuBar()
+{
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(printAction);
+ fileMenu->addAction(exitAction);
+
+ QMenu *cellMenu = menuBar()->addMenu(tr("&Cell"));
+ cellMenu->addAction(cell_addAction);
+ cellMenu->addAction(cell_subAction);
+ cellMenu->addAction(cell_mulAction);
+ cellMenu->addAction(cell_divAction);
+ cellMenu->addAction(cell_sumAction);
+ cellMenu->addSeparator();
+ cellMenu->addAction(colorAction);
+ cellMenu->addAction(fontAction);
+
+ menuBar()->addSeparator();
+
+ QMenu *aboutMenu = menuBar()->addMenu(tr("&Help"));
+ aboutMenu->addAction(aboutSpreadSheet);
+}
+
+void SpreadSheet::updateStatus(QTableWidgetItem *item)
+{
+ if (item && item == table->currentItem()) {
+ statusBar()->showMessage(item->data(Qt::StatusTipRole).toString(),
+ 1000);
+ cellLabel->setText(tr("Cell: (%1)").arg(encode_pos(table->row(item),
+ table->column(item))));
+ }
+}
+
+void SpreadSheet::updateColor(QTableWidgetItem *item)
+{
+ QPixmap pix(16, 16);
+ QColor col;
+ if (item)
+ col = item->backgroundColor();
+ if (!col.isValid())
+ col = palette().base().color();
+
+ QPainter pt(&pix);
+ pt.fillRect(0, 0, 16, 16, col);
+
+ QColor lighter = col.light();
+ pt.setPen(lighter);
+ QPoint lightFrame[] = { QPoint(0, 15), QPoint(0, 0), QPoint(15, 0) };
+ pt.drawPolyline(lightFrame, 3);
+
+ pt.setPen(col.dark());
+ QPoint darkFrame[] = { QPoint(1, 15), QPoint(15, 15), QPoint(15, 1) };
+ pt.drawPolyline(darkFrame, 3);
+
+ pt.end();
+
+ colorAction->setIcon(pix);
+}
+
+void SpreadSheet::updateLineEdit(QTableWidgetItem *item)
+{
+ if (item != table->currentItem())
+ return;
+ if (item)
+ formulaInput->setText(item->data(Qt::EditRole).toString());
+ else
+ formulaInput->clear();
+}
+
+void SpreadSheet::returnPressed()
+{
+ QString text = formulaInput->text();
+ int row = table->currentRow();
+ int col = table->currentColumn();
+ QTableWidgetItem *item = table->item(row, col);
+ if (!item)
+ table->setItem(row, col, new SpreadSheetItem(text));
+ else
+ item->setData(Qt::EditRole, text);
+ table->viewport()->update();
+}
+
+void SpreadSheet::selectColor()
+{
+ QTableWidgetItem *item = table->currentItem();
+ QColor col = item ? item->backgroundColor() : table->palette().base().color();
+ col = QColorDialog::getColor(col, this);
+ if (!col.isValid())
+ return;
+
+ QList<QTableWidgetItem*> selected = table->selectedItems();
+ if (selected.count() == 0)
+ return;
+
+ foreach(QTableWidgetItem *i, selected)
+ if (i)
+ i->setBackgroundColor(col);
+
+ updateColor(table->currentItem());
+}
+
+void SpreadSheet::selectFont()
+{
+ QList<QTableWidgetItem*> selected = table->selectedItems();
+ if (selected.count() == 0)
+ return;
+
+ bool ok = false;
+ QFont fnt = QFontDialog::getFont(&ok, font(), this);
+
+ if (!ok)
+ return;
+ foreach(QTableWidgetItem *i, selected)
+ if (i)
+ i->setFont(fnt);
+}
+
+bool SpreadSheet::runInputDialog(const QString &title,
+ const QString &c1Text,
+ const QString &c2Text,
+ const QString &opText,
+ const QString &outText,
+ QString *cell1, QString *cell2, QString *outCell)
+{
+ QStringList rows, cols;
+ for (int c = 0; c < table->columnCount(); ++c)
+ cols << QChar('A' + c);
+ for (int r = 0; r < table->rowCount(); ++r)
+ rows << QString::number(1 + r);
+
+ QDialog addDialog(this);
+ addDialog.setWindowTitle(title);
+
+ QGroupBox group(title, &addDialog);
+ group.setMinimumSize(250, 100);
+
+ QLabel cell1Label(c1Text, &group);
+ QComboBox cell1RowInput(&group);
+ int c1Row, c1Col;
+ decode_pos(*cell1, &c1Row, &c1Col);
+ cell1RowInput.addItems(rows);
+ cell1RowInput.setCurrentIndex(c1Row);
+
+ QComboBox cell1ColInput(&group);
+ cell1ColInput.addItems(cols);
+ cell1ColInput.setCurrentIndex(c1Col);
+
+ QLabel operatorLabel(opText, &group);
+ operatorLabel.setAlignment(Qt::AlignHCenter);
+
+ QLabel cell2Label(c2Text, &group);
+ QComboBox cell2RowInput(&group);
+ int c2Row, c2Col;
+ decode_pos(*cell2, &c2Row, &c2Col);
+ cell2RowInput.addItems(rows);
+ cell2RowInput.setCurrentIndex(c2Row);
+ QComboBox cell2ColInput(&group);
+ cell2ColInput.addItems(cols);
+ cell2ColInput.setCurrentIndex(c2Col);
+
+ QLabel equalsLabel("=", &group);
+ equalsLabel.setAlignment(Qt::AlignHCenter);
+
+ QLabel outLabel(outText, &group);
+ QComboBox outRowInput(&group);
+ int outRow, outCol;
+ decode_pos(*outCell, &outRow, &outCol);
+ outRowInput.addItems(rows);
+ outRowInput.setCurrentIndex(outRow);
+ QComboBox outColInput(&group);
+ outColInput.addItems(cols);
+ outColInput.setCurrentIndex(outCol);
+
+ QPushButton cancelButton(tr("Cancel"), &addDialog);
+ connect(&cancelButton, SIGNAL(clicked()), &addDialog, SLOT(reject()));
+
+ QPushButton okButton(tr("OK"), &addDialog);
+ okButton.setDefault(true);
+ connect(&okButton, SIGNAL(clicked()), &addDialog, SLOT(accept()));
+
+ QHBoxLayout *buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch(1);
+ buttonsLayout->addWidget(&okButton);
+ buttonsLayout->addSpacing(10);
+ buttonsLayout->addWidget(&cancelButton);
+
+ QVBoxLayout *dialogLayout = new QVBoxLayout(&addDialog);
+ dialogLayout->addWidget(&group);
+ dialogLayout->addStretch(1);
+ dialogLayout->addItem(buttonsLayout);
+
+ QHBoxLayout *cell1Layout = new QHBoxLayout;
+ cell1Layout->addWidget(&cell1Label);
+ cell1Layout->addSpacing(10);
+ cell1Layout->addWidget(&cell1ColInput);
+ cell1Layout->addSpacing(10);
+ cell1Layout->addWidget(&cell1RowInput);
+
+ QHBoxLayout *cell2Layout = new QHBoxLayout;
+ cell2Layout->addWidget(&cell2Label);
+ cell2Layout->addSpacing(10);
+ cell2Layout->addWidget(&cell2ColInput);
+ cell2Layout->addSpacing(10);
+ cell2Layout->addWidget(&cell2RowInput);
+
+ QHBoxLayout *outLayout = new QHBoxLayout;
+ outLayout->addWidget(&outLabel);
+ outLayout->addSpacing(10);
+ outLayout->addWidget(&outColInput);
+ outLayout->addSpacing(10);
+ outLayout->addWidget(&outRowInput);
+
+ QVBoxLayout *vLayout = new QVBoxLayout(&group);
+ vLayout->addItem(cell1Layout);
+ vLayout->addWidget(&operatorLabel);
+ vLayout->addItem(cell2Layout);
+ vLayout->addWidget(&equalsLabel);
+ vLayout->addStretch(1);
+ vLayout->addItem(outLayout);
+
+ if (addDialog.exec()) {
+ *cell1 = cell1ColInput.currentText() + cell1RowInput.currentText();
+ *cell2 = cell2ColInput.currentText() + cell2RowInput.currentText();
+ *outCell = outColInput.currentText() + outRowInput.currentText();
+ return true;
+ }
+
+ return false;
+}
+
+void SpreadSheet::actionSum()
+{
+ int row_first = 0;
+ int row_last = 0;
+ int row_cur = 0;
+
+ int col_first = 0;
+ int col_last = 0;
+ int col_cur = 0;
+
+ QList<QTableWidgetItem*> selected = table->selectedItems();
+
+ if (!selected.isEmpty()) {
+ QTableWidgetItem *first = selected.first();
+ QTableWidgetItem *last = selected.last();
+ row_first = table->row(first);
+ row_last = table->row(last);
+ col_first = table->column(first);
+ col_last = table->column(last);
+ }
+
+ QTableWidgetItem *current = table->currentItem();
+
+ if (current) {
+ row_cur = table->row(current);
+ col_cur = table->column(current);
+ }
+
+ QString cell1 = encode_pos(row_first, col_first);
+ QString cell2 = encode_pos(row_last, col_last);
+ QString out = encode_pos(row_cur, col_cur);
+
+ if (runInputDialog(tr("Sum cells"), tr("First cell:"), tr("Last cell:"),
+ QString("%1").arg(QChar(0x03a3)), tr("Output to:"),
+ &cell1, &cell2, &out)) {
+ int row, col;
+ decode_pos(out, &row, &col);
+ table->item(row, col)->setText(tr("sum %1 %2").arg(cell1, cell2));
+ }
+}
+
+void SpreadSheet::actionMath_helper(const QString &title, const QString &op)
+{
+ QString cell1 = "C1";
+ QString cell2 = "C2";
+ QString out = "C3";
+
+ QTableWidgetItem *current = table->currentItem();
+ if (current)
+ out = encode_pos(table->currentRow(), table->currentColumn());
+
+ if (runInputDialog(title, tr("Cell 1"), tr("Cell 2"), op, tr("Output to:"),
+ &cell1, &cell2, &out)) {
+ int row, col;
+ decode_pos(out, &row, &col);
+ table->item(row, col)->setText(tr("%1, %2, %3").arg(op, cell1, cell2));
+ }
+}
+
+void SpreadSheet::actionAdd()
+{
+ actionMath_helper(tr("Addition"), "+");
+}
+
+void SpreadSheet::actionSubtract()
+{
+ actionMath_helper(tr("Subtraction"), "-");
+}
+
+void SpreadSheet::actionMultiply()
+{
+ actionMath_helper(tr("Multiplication"), "*");
+}
+void SpreadSheet::actionDivide()
+{
+ actionMath_helper(tr("Division"), "/");
+}
+
+void SpreadSheet::clear()
+{
+ foreach (QTableWidgetItem *i, table->selectedItems())
+ i->setText("");
+}
+
+void SpreadSheet::setupContextMenu()
+{
+ addAction(cell_addAction);
+ addAction(cell_subAction);
+ addAction(cell_mulAction);
+ addAction(cell_divAction);
+ addAction(cell_sumAction);
+ addAction(firstSeparator);
+ addAction(colorAction);
+ addAction(fontAction);
+ addAction(secondSeparator);
+ addAction(clearAction);
+ setContextMenuPolicy(Qt::ActionsContextMenu);
+}
+
+void SpreadSheet::setupContents()
+{
+ QColor titleBackground(Qt::lightGray);
+ QFont titleFont = table->font();
+ titleFont.setBold(true);
+
+ // column 0
+ table->setItem(0, 0, new SpreadSheetItem("Item"));
+ table->item(0, 0)->setBackgroundColor(titleBackground);
+ table->item(0, 0)->setToolTip("This column shows the purchased item/service");
+ table->item(0, 0)->setFont(titleFont);
+
+ table->setItem(1, 0, new SpreadSheetItem("AirportBus"));
+ table->setItem(2, 0, new SpreadSheetItem("Flight (Munich)"));
+ table->setItem(3, 0, new SpreadSheetItem("Lunch"));
+ table->setItem(4, 0, new SpreadSheetItem("Flight (LA)"));
+ table->setItem(5, 0, new SpreadSheetItem("Taxi"));
+ table->setItem(6, 0, new SpreadSheetItem("Diinner"));
+ table->setItem(7, 0, new SpreadSheetItem("Hotel"));
+ table->setItem(8, 0, new SpreadSheetItem("Flight (Oslo)"));
+ table->setItem(9, 0, new SpreadSheetItem("Total:"));
+
+ table->item(9, 0)->setFont(titleFont);
+ table->item(9, 0)->setBackgroundColor(Qt::lightGray);
+
+ // column 1
+ table->setItem(0, 1, new SpreadSheetItem("Date"));
+ table->item(0, 1)->setBackgroundColor(titleBackground);
+ table->item(0, 1)->setToolTip("This column shows the purchase date, double click to change");
+ table->item(0, 1)->setFont(titleFont);
+
+ table->setItem(1, 1, new SpreadSheetItem("15/6/2006"));
+ table->setItem(2, 1, new SpreadSheetItem("15/6/2006"));
+ table->setItem(3, 1, new SpreadSheetItem("15/6/2006"));
+ table->setItem(4, 1, new SpreadSheetItem("21/5/2006"));
+ table->setItem(5, 1, new SpreadSheetItem("16/6/2006"));
+ table->setItem(6, 1, new SpreadSheetItem("16/6/2006"));
+ table->setItem(7, 1, new SpreadSheetItem("16/6/2006"));
+ table->setItem(8, 1, new SpreadSheetItem("18/6/2006"));
+
+ table->setItem(9, 1, new SpreadSheetItem());
+ table->item(9, 1)->setBackgroundColor(Qt::lightGray);
+
+ // column 2
+ table->setItem(0, 2, new SpreadSheetItem("Price"));
+ table->item(0, 2)->setBackgroundColor(titleBackground);
+ table->item(0, 2)->setToolTip("This collumn shows the price of the purchase");
+ table->item(0, 2)->setFont(titleFont);
+
+ table->setItem(1, 2, new SpreadSheetItem("150"));
+ table->setItem(2, 2, new SpreadSheetItem("2350"));
+ table->setItem(3, 2, new SpreadSheetItem("-14"));
+ table->setItem(4, 2, new SpreadSheetItem("980"));
+ table->setItem(5, 2, new SpreadSheetItem("5"));
+ table->setItem(6, 2, new SpreadSheetItem("120"));
+ table->setItem(7, 2, new SpreadSheetItem("300"));
+ table->setItem(8, 2, new SpreadSheetItem("1240"));
+
+ table->setItem(9, 2, new SpreadSheetItem());
+
+ // column 3
+ table->setItem(0, 3, new SpreadSheetItem("Currency"));
+ table->item(0, 3)->setBackgroundColor(titleBackground);
+ table->item(0, 3)->setToolTip("This column shows the currency");
+ table->item(0, 3)->setFont(titleFont);
+
+ table->setItem(1, 3, new SpreadSheetItem("NOK"));
+ table->setItem(2, 3, new SpreadSheetItem("NOK"));
+ table->setItem(3, 3, new SpreadSheetItem("EUR"));
+ table->setItem(4, 3, new SpreadSheetItem("EUR"));
+ table->setItem(5, 3, new SpreadSheetItem("USD"));
+ table->setItem(6, 3, new SpreadSheetItem("USD"));
+ table->setItem(7, 3, new SpreadSheetItem("USD"));
+ table->setItem(8, 3, new SpreadSheetItem("USD"));
+
+ table->setItem(9, 3, new SpreadSheetItem());
+ table->item(9,3)->setBackgroundColor(Qt::lightGray);
+
+ // column 4
+ table->setItem(0, 4, new SpreadSheetItem("Ex. Rate"));
+ table->item(0, 4)->setBackgroundColor(titleBackground);
+ table->item(0, 4)->setToolTip("This column shows the exchange rate to NOK");
+ table->item(0, 4)->setFont(titleFont);
+
+ table->setItem(1, 4, new SpreadSheetItem("1"));
+ table->setItem(2, 4, new SpreadSheetItem("1"));
+ table->setItem(3, 4, new SpreadSheetItem("8"));
+ table->setItem(4, 4, new SpreadSheetItem("8"));
+ table->setItem(5, 4, new SpreadSheetItem("7"));
+ table->setItem(6, 4, new SpreadSheetItem("7"));
+ table->setItem(7, 4, new SpreadSheetItem("7"));
+ table->setItem(8, 4, new SpreadSheetItem("7"));
+
+ table->setItem(9, 4, new SpreadSheetItem());
+ table->item(9,4)->setBackgroundColor(Qt::lightGray);
+
+ // column 5
+ table->setItem(0, 5, new SpreadSheetItem("NOK"));
+ table->item(0, 5)->setBackgroundColor(titleBackground);
+ table->item(0, 5)->setToolTip("This column shows the expenses in NOK");
+ table->item(0, 5)->setFont(titleFont);
+
+ table->setItem(1, 5, new SpreadSheetItem("* C2 E2"));
+ table->setItem(2, 5, new SpreadSheetItem("* C3 E3"));
+ table->setItem(3, 5, new SpreadSheetItem("* C4 E4"));
+ table->setItem(4, 5, new SpreadSheetItem("* C5 E5"));
+ table->setItem(5, 5, new SpreadSheetItem("* C6 E6"));
+ table->setItem(6, 5, new SpreadSheetItem("* C7 E7"));
+ table->setItem(7, 5, new SpreadSheetItem("* C8 E8"));
+ table->setItem(8, 5, new SpreadSheetItem("* C9 E9"));
+
+ table->setItem(9, 5, new SpreadSheetItem("sum F2 F9"));
+ table->item(9,5)->setBackgroundColor(Qt::lightGray);
+}
+
+const char *htmlText =
+"<HTML>"
+"<p><b>This demo shows use of <c>QTableWidget</c> with custom handling for"
+" individual cells.</b></p>"
+"<p>Using a customized table item we make it possible to have dynamic"
+" output in different cells. The content that is implemented for this"
+" particular demo is:"
+"<ul>"
+"<li>Adding two cells.</li>"
+"<li>Subtracting one cell from another.</li>"
+"<li>Multiplying two cells.</li>"
+"<li>Dividing one cell with another.</li>"
+"<li>Summing the contents of an arbitrary number of cells.</li>"
+"</HTML>";
+
+void SpreadSheet::showAbout()
+{
+ QMessageBox::about(this, "About Spreadsheet", htmlText);
+}
+
+void decode_pos(const QString &pos, int *row, int *col)
+{
+ if (pos.isEmpty()) {
+ *col = -1;
+ *row = -1;
+ } else {
+ *col = pos.at(0).toLatin1() - 'A';
+ *row = pos.right(pos.size() - 1).toInt() - 1;
+ }
+}
+
+QString encode_pos(int row, int col)
+{
+ return QString(col + 'A') + QString::number(row + 1);
+}
+
+
+void SpreadSheet::print()
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer(QPrinter::ScreenResolution);
+ QPrintPreviewDialog dlg(&printer);
+ PrintView view;
+ view.setModel(table->model());
+ connect(&dlg, SIGNAL(paintRequested(QPrinter *)),
+ &view, SLOT(print(QPrinter *)));
+ dlg.exec();
+#endif
+}
+
diff --git a/demos/spreadsheet/spreadsheet.h b/demos/spreadsheet/spreadsheet.h
new file mode 100644
index 0000000..944433d
--- /dev/null
+++ b/demos/spreadsheet/spreadsheet.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SPREADSHEET_H
+#define SPREADSHEET_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QLineEdit;
+class QToolBar;
+class QTableWidgetItem;
+class QTableWidget;
+QT_END_NAMESPACE
+
+class SpreadSheet : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+
+ SpreadSheet(int rows, int cols, QWidget *parent = 0);
+
+public slots:
+ void updateStatus(QTableWidgetItem *item);
+ void updateColor(QTableWidgetItem *item);
+ void updateLineEdit(QTableWidgetItem *item);
+ void returnPressed();
+ void selectColor();
+ void selectFont();
+ void clear();
+ void showAbout();
+
+ void print();
+
+ void actionSum();
+ void actionSubtract();
+ void actionAdd();
+ void actionMultiply();
+ void actionDivide();
+
+protected:
+ void setupContextMenu();
+ void setupContents();
+
+ void setupMenuBar();
+ void createActions();
+
+ void actionMath_helper(const QString &title, const QString &op);
+ bool runInputDialog(const QString &title,
+ const QString &c1Text,
+ const QString &c2Text,
+ const QString &opText,
+ const QString &outText,
+ QString *cell1, QString *cell2, QString *outCell);
+private:
+ QToolBar *toolBar;
+ QAction *colorAction;
+ QAction *fontAction;
+ QAction *firstSeparator;
+ QAction *cell_sumAction;
+ QAction *cell_addAction;
+ QAction *cell_subAction;
+ QAction *cell_mulAction;
+ QAction *cell_divAction;
+ QAction *secondSeparator;
+ QAction *clearAction;
+ QAction *aboutSpreadSheet;
+ QAction *exitAction;
+
+ QAction *printAction;
+
+ QLabel *cellLabel;
+ QTableWidget *table;
+ QLineEdit *formulaInput;
+
+};
+
+void decode_pos(const QString &pos, int *row, int *col);
+QString encode_pos(int row, int col);
+
+
+#endif // SPREADSHEET_H
+
diff --git a/demos/spreadsheet/spreadsheet.pro b/demos/spreadsheet/spreadsheet.pro
new file mode 100644
index 0000000..b62f244
--- /dev/null
+++ b/demos/spreadsheet/spreadsheet.pro
@@ -0,0 +1,33 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Mar 5 14:39:33 2009
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+CONFIG += qt warn_on
+#unix:contains(QT_CONFIG, dbus):QT += dbus
+
+# Input
+HEADERS += printview.h spreadsheet.h spreadsheetdelegate.h spreadsheetitem.h
+SOURCES += main.cpp \
+ printview.cpp \
+ spreadsheet.cpp \
+ spreadsheetdelegate.cpp \
+ spreadsheetitem.cpp
+RESOURCES += spreadsheet.qrc
+
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/spreadsheet
+sources.files = $$SOURCES $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_DEMOS]/spreadsheet
+INSTALLS += target sources
+
diff --git a/demos/spreadsheet/spreadsheet.qrc b/demos/spreadsheet/spreadsheet.qrc
new file mode 100644
index 0000000..13f496d
--- /dev/null
+++ b/demos/spreadsheet/spreadsheet.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>images/interview.png</file>
+</qresource>
+</RCC>
diff --git a/demos/spreadsheet/spreadsheetdelegate.cpp b/demos/spreadsheet/spreadsheetdelegate.cpp
new file mode 100644
index 0000000..465c92f
--- /dev/null
+++ b/demos/spreadsheet/spreadsheetdelegate.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "spreadsheetdelegate.h"
+#include <QtGui>
+
+SpreadSheetDelegate::SpreadSheetDelegate(QObject *parent)
+ : QItemDelegate(parent) {}
+
+QWidget *SpreadSheetDelegate::createEditor(QWidget *parent,
+ const QStyleOptionViewItem &,
+ const QModelIndex &index) const
+{
+ if (index.column() == 1) {
+ QDateTimeEdit *editor = new QDateTimeEdit(parent);
+ editor->setDisplayFormat("dd/M/yyy");
+ editor->setCalendarPopup(true);
+ return editor;
+ }
+
+ QLineEdit *editor = new QLineEdit(parent);
+
+ // create a completer with the strings in the column as model
+ QStringList allStrings;
+ for (int i = 1; i<index.model()->rowCount(); i++) {
+ QString strItem(index.model()->data(index.sibling(i, index.column()),
+ Qt::EditRole).toString());
+
+ if (!allStrings.contains(strItem))
+ allStrings.append(strItem);
+ }
+
+ QCompleter *autoComplete = new QCompleter(allStrings);
+ editor->setCompleter(autoComplete);
+ connect(editor, SIGNAL(editingFinished()),
+ this, SLOT(commitAndCloseEditor()));
+ return editor;
+}
+
+void SpreadSheetDelegate::commitAndCloseEditor()
+{
+ QLineEdit *editor = qobject_cast<QLineEdit *>(sender());
+ emit commitData(editor);
+ emit closeEditor(editor);
+}
+
+void SpreadSheetDelegate::setEditorData(QWidget *editor,
+ const QModelIndex &index) const
+{
+ QLineEdit *edit = qobject_cast<QLineEdit*>(editor);
+ if (edit) {
+ edit->setText(index.model()->data(index, Qt::EditRole).toString());
+ } else {
+ QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor);
+ if (dateEditor) {
+ dateEditor->setDate(QDate::fromString(
+ index.model()->data(index, Qt::EditRole).toString(),
+ "d/M/yy"));
+ }
+ }
+}
+
+void SpreadSheetDelegate::setModelData(QWidget *editor,
+ QAbstractItemModel *model, const QModelIndex &index) const
+{
+ QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
+ if (edit) {
+ model->setData(index, edit->text());
+ } else {
+ QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor);
+ if (dateEditor) {
+ model->setData(index, dateEditor->date().toString("dd/M/yyy"));
+ }
+ }
+}
+
diff --git a/demos/spreadsheet/spreadsheetdelegate.h b/demos/spreadsheet/spreadsheetdelegate.h
new file mode 100644
index 0000000..3b7b9ac
--- /dev/null
+++ b/demos/spreadsheet/spreadsheetdelegate.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SPREADSHEETDELEGATE_H
+#define SPREADSHEETDELEGATE_H
+
+#include <QItemDelegate>
+#include "spreadsheet.h"
+
+class SpreadSheetDelegate : public QItemDelegate
+{
+ Q_OBJECT
+
+public:
+ SpreadSheetDelegate(QObject *parent = 0);
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
+ const QModelIndex &index) const;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const;
+
+private slots:
+ void commitAndCloseEditor();
+};
+
+#endif // SPREADSHEETDELEGATE_H
+
diff --git a/demos/spreadsheet/spreadsheetitem.cpp b/demos/spreadsheet/spreadsheetitem.cpp
new file mode 100644
index 0000000..8f94b87
--- /dev/null
+++ b/demos/spreadsheet/spreadsheetitem.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "spreadsheetitem.h"
+
+SpreadSheetItem::SpreadSheetItem()
+ : QTableWidgetItem(), isResolving(false)
+{
+}
+
+SpreadSheetItem::SpreadSheetItem(const QString &text)
+ : QTableWidgetItem(text), isResolving(false)
+{
+}
+
+QTableWidgetItem *SpreadSheetItem::clone() const
+{
+ SpreadSheetItem *item = new SpreadSheetItem();
+ *item = *this;
+ return item;
+}
+
+QVariant SpreadSheetItem::data(int role) const
+{
+ if (role == Qt::EditRole || role == Qt::StatusTipRole)
+ return formula();
+
+ if (role == Qt::DisplayRole)
+ return display();
+
+ QString t = display().toString();
+ bool isNumber = false;
+ int number = t.toInt(&isNumber);
+
+ if (role == Qt::TextColorRole) {
+ if (!isNumber)
+ return qVariantFromValue(QColor(Qt::black));
+ else if (number < 0)
+ return qVariantFromValue(QColor(Qt::red));
+ return qVariantFromValue(QColor(Qt::blue));
+ }
+
+ if (role == Qt::TextAlignmentRole)
+ if (!t.isEmpty() && (t.at(0).isNumber() || t.at(0) == '-'))
+ return (int)(Qt::AlignRight | Qt::AlignVCenter);
+
+ return QTableWidgetItem::data(role);
+ }
+
+void SpreadSheetItem::setData(int role, const QVariant &value)
+{
+ QTableWidgetItem::setData(role, value);
+ if (tableWidget())
+ tableWidget()->viewport()->update();
+}
+
+QVariant SpreadSheetItem::display() const
+{
+ // avoid circular dependencies
+ if (isResolving)
+ return QVariant();
+
+ isResolving = true;
+ QVariant result = computeFormula(formula(), tableWidget(), this);
+ isResolving = false;
+ return result;
+}
+
+QVariant SpreadSheetItem::computeFormula(const QString &formula,
+ const QTableWidget *widget,
+ const QTableWidgetItem *self)
+{
+ // check if the s tring is actually a formula or not
+ QStringList list = formula.split(' ');
+ if (list.isEmpty() || !widget)
+ return formula; // it is a normal string
+
+ QString op = list.value(0).toLower();
+
+ int firstRow = -1;
+ int firstCol = -1;
+ int secondRow = -1;
+ int secondCol = -1;
+
+ if (list.count() > 1)
+ decode_pos(list.value(1), &firstRow, &firstCol);
+
+ if (list.count() > 2)
+ decode_pos(list.value(2), &secondRow, &secondCol);
+
+ const QTableWidgetItem *start = widget->item(firstRow, firstCol);
+ const QTableWidgetItem *end = widget->item(secondRow, secondCol);
+
+ int firstVal = start ? start->text().toInt() : 0;
+ int secondVal = end ? end->text().toInt() : 0;
+
+ QVariant result;
+ if (op == "sum") {
+ int sum = 0;
+ for (int r = firstRow; r <= secondRow; ++r) {
+ for (int c = firstCol; c <= secondCol; ++c) {
+ const QTableWidgetItem *tableItem = widget->item(r, c);
+ if (tableItem && tableItem != self)
+ sum += tableItem->text().toInt();
+ }
+ }
+
+ result = sum;
+ } else if (op == "+") {
+ result = (firstVal + secondVal);
+ } else if (op == "-") {
+ result = (firstVal - secondVal);
+ } else if (op == "*") {
+ result = (firstVal * secondVal);
+ } else if (op == "/") {
+ if (secondVal == 0)
+ result = QString("nan");
+ else
+ result = (firstVal / secondVal);
+ } else if (op == "=") {
+ if (start)
+ result = start->text();
+ } else {
+ result = formula;
+ }
+
+ return result;
+}
+
diff --git a/demos/spreadsheet/spreadsheetitem.h b/demos/spreadsheet/spreadsheetitem.h
new file mode 100644
index 0000000..5996d73
--- /dev/null
+++ b/demos/spreadsheet/spreadsheetitem.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SPREADSHEETITEM_H
+#define SPREADSHEETITEM_H
+
+#include <QTableWidgetItem>
+#include <QtGui>
+#include "spreadsheet.h"
+
+class SpreadSheetItem : public QTableWidgetItem
+{
+public:
+ SpreadSheetItem();
+ SpreadSheetItem(const QString &text);
+
+ QTableWidgetItem *clone() const;
+
+ QVariant data(int role) const;
+ void setData(int role, const QVariant &value);
+ QVariant display() const;
+
+ inline QString formula() const
+ { return QTableWidgetItem::data(Qt::DisplayRole).toString(); }
+
+ static QVariant computeFormula(const QString &formula,
+ const QTableWidget *widget,
+ const QTableWidgetItem *self = 0);
+
+private:
+ mutable bool isResolving;
+};
+
+#endif // SPREADSHEETITEM_H
+
diff --git a/demos/sqlbrowser/browser.cpp b/demos/sqlbrowser/browser.cpp
new file mode 100644
index 0000000..f7b24db
--- /dev/null
+++ b/demos/sqlbrowser/browser.cpp
@@ -0,0 +1,247 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browser.h"
+#include "qsqlconnectiondialog.h"
+
+#include <QtGui>
+#include <QtSql>
+
+Browser::Browser(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ table->addAction(insertRowAction);
+ table->addAction(deleteRowAction);
+
+ if (QSqlDatabase::drivers().isEmpty())
+ QMessageBox::information(this, tr("No database drivers found"),
+ tr("This demo requires at least one Qt database driver. "
+ "Please check the documentation how to build the "
+ "Qt SQL plugins."));
+
+ emit statusMessage(tr("Ready."));
+}
+
+Browser::~Browser()
+{
+}
+
+void Browser::exec()
+{
+ QSqlQueryModel *model = new QSqlQueryModel(table);
+ model->setQuery(QSqlQuery(sqlEdit->toPlainText(), connectionWidget->currentDatabase()));
+ table->setModel(model);
+
+ if (model->lastError().type() != QSqlError::NoError)
+ emit statusMessage(model->lastError().text());
+ else if (model->query().isSelect())
+ emit statusMessage(tr("Query OK."));
+ else
+ emit statusMessage(tr("Query OK, number of affected rows: %1").arg(
+ model->query().numRowsAffected()));
+
+ updateActions();
+}
+
+QSqlError Browser::addConnection(const QString &driver, const QString &dbName, const QString &host,
+ const QString &user, const QString &passwd, int port)
+{
+ static int cCount = 0;
+
+ QSqlError err;
+ QSqlDatabase db = QSqlDatabase::addDatabase(driver, QString("Browser%1").arg(++cCount));
+ db.setDatabaseName(dbName);
+ db.setHostName(host);
+ db.setPort(port);
+ if (!db.open(user, passwd)) {
+ err = db.lastError();
+ db = QSqlDatabase();
+ QSqlDatabase::removeDatabase(QString("Browser%1").arg(cCount));
+ }
+ connectionWidget->refresh();
+
+ return err;
+}
+
+void Browser::addConnection()
+{
+ QSqlConnectionDialog dialog(this);
+ if (dialog.exec() != QDialog::Accepted)
+ return;
+
+ if (dialog.useInMemoryDatabase()) {
+ QSqlDatabase::database("in_mem_db", false).close();
+ QSqlDatabase::removeDatabase("in_mem_db");
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", "in_mem_db");
+ db.setDatabaseName(":memory:");
+ if (!db.open())
+ QMessageBox::warning(this, tr("Unable to open database"), tr("An error occurred while "
+ "opening the connection: ") + db.lastError().text());
+ QSqlQuery q("", db);
+ q.exec("drop table Movies");
+ q.exec("drop table Names");
+ q.exec("create table Movies (id integer primary key, Title varchar, Director varchar, Rating number)");
+ q.exec("insert into Movies values (0, 'Metropolis', 'Fritz Lang', '8.4')");
+ q.exec("insert into Movies values (1, 'Nosferatu, eine Symphonie des Grauens', 'F.W. Murnau', '8.1')");
+ q.exec("insert into Movies values (2, 'Bis ans Ende der Welt', 'Wim Wenders', '6.5')");
+ q.exec("insert into Movies values (3, 'Hardware', 'Richard Stanley', '5.2')");
+ q.exec("insert into Movies values (4, 'Mitchell', 'Andrew V. McLaglen', '2.1')");
+ q.exec("create table Names (id integer primary key, Firstname varchar, Lastname varchar, City varchar)");
+ q.exec("insert into Names values (0, 'Sala', 'Palmer', 'Morristown')");
+ q.exec("insert into Names values (1, 'Christopher', 'Walker', 'Morristown')");
+ q.exec("insert into Names values (2, 'Donald', 'Duck', 'Andeby')");
+ q.exec("insert into Names values (3, 'Buck', 'Rogers', 'Paris')");
+ q.exec("insert into Names values (4, 'Sherlock', 'Holmes', 'London')");
+ connectionWidget->refresh();
+ } else {
+ QSqlError err = addConnection(dialog.driverName(), dialog.databaseName(), dialog.hostName(),
+ dialog.userName(), dialog.password(), dialog.port());
+ if (err.type() != QSqlError::NoError)
+ QMessageBox::warning(this, tr("Unable to open database"), tr("An error occurred while "
+ "opening the connection: ") + err.text());
+ }
+}
+
+void Browser::showTable(const QString &t)
+{
+ QSqlTableModel *model = new QSqlTableModel(table, connectionWidget->currentDatabase());
+ model->setEditStrategy(QSqlTableModel::OnRowChange);
+ model->setTable(t);
+ model->select();
+ if (model->lastError().type() != QSqlError::NoError)
+ emit statusMessage(model->lastError().text());
+ table->setModel(model);
+ table->setEditTriggers(QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed);
+
+ connect(table->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
+ this, SLOT(currentChanged()));
+ updateActions();
+}
+
+void Browser::showMetaData(const QString &t)
+{
+ QSqlRecord rec = connectionWidget->currentDatabase().record(t);
+ QStandardItemModel *model = new QStandardItemModel(table);
+
+ model->insertRows(0, rec.count());
+ model->insertColumns(0, 7);
+
+ model->setHeaderData(0, Qt::Horizontal, "Fieldname");
+ model->setHeaderData(1, Qt::Horizontal, "Type");
+ model->setHeaderData(2, Qt::Horizontal, "Length");
+ model->setHeaderData(3, Qt::Horizontal, "Precision");
+ model->setHeaderData(4, Qt::Horizontal, "Required");
+ model->setHeaderData(5, Qt::Horizontal, "AutoValue");
+ model->setHeaderData(6, Qt::Horizontal, "DefaultValue");
+
+
+ for (int i = 0; i < rec.count(); ++i) {
+ QSqlField fld = rec.field(i);
+ model->setData(model->index(i, 0), fld.name());
+ model->setData(model->index(i, 1), fld.typeID() == -1
+ ? QString(QVariant::typeToName(fld.type()))
+ : QString("%1 (%2)").arg(QVariant::typeToName(fld.type())).arg(fld.typeID()));
+ model->setData(model->index(i, 2), fld.length());
+ model->setData(model->index(i, 3), fld.precision());
+ model->setData(model->index(i, 4), fld.requiredStatus() == -1 ? QVariant("?")
+ : QVariant(bool(fld.requiredStatus())));
+ model->setData(model->index(i, 5), fld.isAutoValue());
+ model->setData(model->index(i, 6), fld.defaultValue());
+ }
+
+ table->setModel(model);
+ table->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ updateActions();
+}
+
+void Browser::insertRow()
+{
+ QSqlTableModel *model = qobject_cast<QSqlTableModel *>(table->model());
+ if (!model)
+ return;
+
+ QModelIndex insertIndex = table->currentIndex();
+ int row = insertIndex.row() == -1 ? 0 : insertIndex.row();
+ model->insertRow(row);
+ insertIndex = model->index(row, 0);
+ table->setCurrentIndex(insertIndex);
+ table->edit(insertIndex);
+}
+
+void Browser::deleteRow()
+{
+ QSqlTableModel *model = qobject_cast<QSqlTableModel *>(table->model());
+ if (!model)
+ return;
+
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+
+ QModelIndexList currentSelection = table->selectionModel()->selectedIndexes();
+ for (int i = 0; i < currentSelection.count(); ++i) {
+ if (currentSelection.at(i).column() != 0)
+ continue;
+ model->removeRow(currentSelection.at(i).row());
+ }
+
+ model->submitAll();
+ model->setEditStrategy(QSqlTableModel::OnRowChange);
+
+ updateActions();
+}
+
+void Browser::updateActions()
+{
+ bool enableIns = qobject_cast<QSqlTableModel *>(table->model());
+ bool enableDel = enableIns && table->currentIndex().isValid();
+
+ insertRowAction->setEnabled(enableIns);
+ deleteRowAction->setEnabled(enableDel);
+}
+
+void Browser::about()
+{
+ QMessageBox::about(this, tr("About"), tr("The SQL Browser demonstration "
+ "show how a data browser can be used to visualize the results of SQL"
+ "statements on a live database"));
+}
diff --git a/demos/sqlbrowser/browser.h b/demos/sqlbrowser/browser.h
new file mode 100644
index 0000000..787675b
--- /dev/null
+++ b/demos/sqlbrowser/browser.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BROWSER_H
+#define BROWSER_H
+
+#include <QWidget>
+#include "ui_browserwidget.h"
+
+class ConnectionWidget;
+QT_FORWARD_DECLARE_CLASS(QTableView)
+QT_FORWARD_DECLARE_CLASS(QPushButton)
+QT_FORWARD_DECLARE_CLASS(QTextEdit)
+QT_FORWARD_DECLARE_CLASS(QSqlError)
+
+class Browser: public QWidget, private Ui::Browser
+{
+ Q_OBJECT
+public:
+ Browser(QWidget *parent = 0);
+ virtual ~Browser();
+
+ QSqlError addConnection(const QString &driver, const QString &dbName, const QString &host,
+ const QString &user, const QString &passwd, int port = -1);
+
+ void insertRow();
+ void deleteRow();
+ void updateActions();
+
+public slots:
+ void exec();
+ void showTable(const QString &table);
+ void showMetaData(const QString &table);
+ void addConnection();
+ void currentChanged() { updateActions(); }
+ void about();
+
+ void on_insertRowAction_triggered()
+ { insertRow(); }
+ void on_deleteRowAction_triggered()
+ { deleteRow(); }
+ void on_connectionWidget_tableActivated(const QString &table)
+ { showTable(table); }
+ void on_connectionWidget_metaDataRequested(const QString &table)
+ { showMetaData(table); }
+ void on_submitButton_clicked()
+ {
+ exec();
+ sqlEdit->setFocus();
+ }
+ void on_clearButton_clicked()
+ {
+ sqlEdit->clear();
+ sqlEdit->setFocus();
+ }
+
+signals:
+ void statusMessage(const QString &message);
+};
+
+#endif
diff --git a/demos/sqlbrowser/browserwidget.ui b/demos/sqlbrowser/browserwidget.ui
new file mode 100644
index 0000000..20946f0
--- /dev/null
+++ b/demos/sqlbrowser/browserwidget.ui
@@ -0,0 +1,199 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Browser</class>
+ <widget class="QWidget" name="Browser" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>765</width>
+ <height>515</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Qt SQL Browser</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QSplitter" name="splitter_2" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <widget class="ConnectionWidget" name="connectionWidget" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>13</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QTableView" name="table" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="contextMenuPolicy" >
+ <enum>Qt::ActionsContextMenu</enum>
+ </property>
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>16777215</width>
+ <height>180</height>
+ </size>
+ </property>
+ <property name="title" >
+ <string>SQL Query</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="sqlEdit" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>18</height>
+ </size>
+ </property>
+ <property name="baseSize" >
+ <size>
+ <width>0</width>
+ <height>120</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="clearButton" >
+ <property name="text" >
+ <string>&amp;Clear</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="submitButton" >
+ <property name="text" >
+ <string>&amp;Submit</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ <action name="insertRowAction" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&amp;Insert Row</string>
+ </property>
+ <property name="statusTip" >
+ <string>Inserts a new Row</string>
+ </property>
+ </action>
+ <action name="deleteRowAction" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&amp;Delete Row</string>
+ </property>
+ <property name="statusTip" >
+ <string>Deletes the current Row</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>ConnectionWidget</class>
+ <extends>QTreeView</extends>
+ <header>connectionwidget.h</header>
+ <container>0</container>
+ <pixmap></pixmap>
+ </customwidget>
+ </customwidgets>
+ <tabstops>
+ <tabstop>sqlEdit</tabstop>
+ <tabstop>clearButton</tabstop>
+ <tabstop>submitButton</tabstop>
+ <tabstop>connectionWidget</tabstop>
+ <tabstop>table</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/sqlbrowser/connectionwidget.cpp b/demos/sqlbrowser/connectionwidget.cpp
new file mode 100644
index 0000000..7df28ac
--- /dev/null
+++ b/demos/sqlbrowser/connectionwidget.cpp
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "connectionwidget.h"
+
+#include <QtGui>
+#include <QtSql>
+
+ConnectionWidget::ConnectionWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ tree = new QTreeWidget(this);
+ tree->setObjectName(QLatin1String("tree"));
+ tree->setHeaderLabels(QStringList(tr("database")));
+ tree->header()->setResizeMode(QHeaderView::Stretch);
+ QAction *refreshAction = new QAction(tr("Refresh"), tree);
+ metaDataAction = new QAction(tr("Show Schema"), tree);
+ connect(refreshAction, SIGNAL(triggered()), SLOT(refresh()));
+ connect(metaDataAction, SIGNAL(triggered()), SLOT(showMetaData()));
+ tree->addAction(refreshAction);
+ tree->addAction(metaDataAction);
+ tree->setContextMenuPolicy(Qt::ActionsContextMenu);
+
+ layout->addWidget(tree);
+
+ QMetaObject::connectSlotsByName(this);
+}
+
+ConnectionWidget::~ConnectionWidget()
+{
+}
+
+static QString qDBCaption(const QSqlDatabase &db)
+{
+ QString nm = db.driverName();
+ nm.append(QLatin1Char(':'));
+ if (!db.userName().isEmpty())
+ nm.append(db.userName()).append(QLatin1Char('@'));
+ nm.append(db.databaseName());
+ return nm;
+}
+
+void ConnectionWidget::refresh()
+{
+ tree->clear();
+ QStringList connectionNames = QSqlDatabase::connectionNames();
+
+ bool gotActiveDb = false;
+ for (int i = 0; i < connectionNames.count(); ++i) {
+ QTreeWidgetItem *root = new QTreeWidgetItem(tree);
+ QSqlDatabase db = QSqlDatabase::database(connectionNames.at(i), false);
+ root->setText(0, qDBCaption(db));
+ if (connectionNames.at(i) == activeDb) {
+ gotActiveDb = true;
+ setActive(root);
+ }
+ if (db.isOpen()) {
+ QStringList tables = db.tables();
+ for (int t = 0; t < tables.count(); ++t) {
+ QTreeWidgetItem *table = new QTreeWidgetItem(root);
+ table->setText(0, tables.at(t));
+ }
+ }
+ }
+ if (!gotActiveDb) {
+ activeDb = connectionNames.value(0);
+ setActive(tree->topLevelItem(0));
+ }
+
+ tree->doItemsLayout(); // HACK
+}
+
+QSqlDatabase ConnectionWidget::currentDatabase() const
+{
+ return QSqlDatabase::database(activeDb);
+}
+
+static void qSetBold(QTreeWidgetItem *item, bool bold)
+{
+ QFont font = item->font(0);
+ font.setBold(bold);
+ item->setFont(0, font);
+}
+
+void ConnectionWidget::setActive(QTreeWidgetItem *item)
+{
+ for (int i = 0; i < tree->topLevelItemCount(); ++i) {
+ if (tree->topLevelItem(i)->font(0).bold())
+ qSetBold(tree->topLevelItem(i), false);
+ }
+
+ if (!item)
+ return;
+
+ qSetBold(item, true);
+ activeDb = QSqlDatabase::connectionNames().value(tree->indexOfTopLevelItem(item));
+}
+
+void ConnectionWidget::on_tree_itemActivated(QTreeWidgetItem *item, int /* column */)
+{
+
+ if (!item)
+ return;
+
+ if (!item->parent()) {
+ setActive(item);
+ } else {
+ setActive(item->parent());
+ emit tableActivated(item->text(0));
+ }
+}
+
+void ConnectionWidget::showMetaData()
+{
+ QTreeWidgetItem *cItem = tree->currentItem();
+ if (!cItem || !cItem->parent())
+ return;
+ setActive(cItem->parent());
+ emit metaDataRequested(cItem->text(0));
+}
+
+void ConnectionWidget::on_tree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *)
+{
+ metaDataAction->setEnabled(current && current->parent());
+}
+
diff --git a/demos/sqlbrowser/connectionwidget.h b/demos/sqlbrowser/connectionwidget.h
new file mode 100644
index 0000000..5c48414
--- /dev/null
+++ b/demos/sqlbrowser/connectionwidget.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONNECTIONWIDGET_H
+#define CONNECTIONWIDGET_H
+
+#include <QWidget>
+
+QT_FORWARD_DECLARE_CLASS(QTreeWidget)
+QT_FORWARD_DECLARE_CLASS(QTreeWidgetItem)
+QT_FORWARD_DECLARE_CLASS(QSqlDatabase)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+
+class ConnectionWidget: public QWidget
+{
+ Q_OBJECT
+public:
+ ConnectionWidget(QWidget *parent = 0);
+ virtual ~ConnectionWidget();
+
+ QSqlDatabase currentDatabase() const;
+
+signals:
+ void tableActivated(const QString &table);
+ void metaDataRequested(const QString &tableName);
+
+public slots:
+ void refresh();
+ void showMetaData();
+ void on_tree_itemActivated(QTreeWidgetItem *item, int column);
+ void on_tree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
+
+private:
+ void setActive(QTreeWidgetItem *);
+
+ QTreeWidget *tree;
+ QAction *metaDataAction;
+ QString activeDb;
+};
+
+#endif
diff --git a/demos/sqlbrowser/main.cpp b/demos/sqlbrowser/main.cpp
new file mode 100644
index 0000000..b7b7fe5
--- /dev/null
+++ b/demos/sqlbrowser/main.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "browser.h"
+
+#include <QtCore>
+#include <QtGui>
+#include <QtSql>
+
+void addConnectionsFromCommandline(const QStringList &args, Browser *browser)
+{
+ for (int i = 1; i < args.count(); ++i) {
+ QUrl url(args.at(i), QUrl::TolerantMode);
+ if (!url.isValid()) {
+ qWarning("Invalid URL: %s", qPrintable(args.at(i)));
+ continue;
+ }
+ QSqlError err = browser->addConnection(url.scheme(), url.path().mid(1), url.host(),
+ url.userName(), url.password(), url.port(-1));
+ if (err.type() != QSqlError::NoError)
+ qDebug() << "Unable to open connection:" << err;
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QMainWindow mainWin;
+ mainWin.setWindowTitle(QObject::tr("Qt SQL Browser"));
+
+ Browser browser(&mainWin);
+ mainWin.setCentralWidget(&browser);
+
+ QMenu *fileMenu = mainWin.menuBar()->addMenu(QObject::tr("&File"));
+ fileMenu->addAction(QObject::tr("Add &Connection..."), &browser, SLOT(addConnection()));
+ fileMenu->addSeparator();
+ fileMenu->addAction(QObject::tr("&Quit"), &app, SLOT(quit()));
+
+ QMenu *helpMenu = mainWin.menuBar()->addMenu(QObject::tr("&Help"));
+ helpMenu->addAction(QObject::tr("About"), &browser, SLOT(about()));
+ helpMenu->addAction(QObject::tr("About Qt"), qApp, SLOT(aboutQt()));
+
+ QObject::connect(&browser, SIGNAL(statusMessage(QString)),
+ mainWin.statusBar(), SLOT(showMessage(QString)));
+
+ addConnectionsFromCommandline(app.arguments(), &browser);
+ mainWin.show();
+ if (QSqlDatabase::connectionNames().isEmpty())
+ QMetaObject::invokeMethod(&browser, "addConnection", Qt::QueuedConnection);
+
+ return app.exec();
+}
diff --git a/demos/sqlbrowser/qsqlconnectiondialog.cpp b/demos/sqlbrowser/qsqlconnectiondialog.cpp
new file mode 100644
index 0000000..a2e3c89
--- /dev/null
+++ b/demos/sqlbrowser/qsqlconnectiondialog.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsqlconnectiondialog.h"
+#include "ui_qsqlconnectiondialog.h"
+
+#include <QSqlDatabase>
+
+QSqlConnectionDialog::QSqlConnectionDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ ui.setupUi(this);
+
+ QStringList drivers = QSqlDatabase::drivers();
+
+ // remove compat names
+ drivers.removeAll("QMYSQL3");
+ drivers.removeAll("QOCI8");
+ drivers.removeAll("QODBC3");
+ drivers.removeAll("QPSQL7");
+ drivers.removeAll("QTDS7");
+
+ if (!drivers.contains("QSQLITE"))
+ ui.dbCheckBox->setEnabled(false);
+
+ ui.comboDriver->addItems(drivers);
+}
+
+QSqlConnectionDialog::~QSqlConnectionDialog()
+{
+}
+
+QString QSqlConnectionDialog::driverName() const
+{
+ return ui.comboDriver->currentText();
+}
+
+QString QSqlConnectionDialog::databaseName() const
+{
+ return ui.editDatabase->text();
+}
+
+QString QSqlConnectionDialog::userName() const
+{
+ return ui.editUsername->text();
+}
+
+QString QSqlConnectionDialog::password() const
+{
+ return ui.editPassword->text();
+}
+
+QString QSqlConnectionDialog::hostName() const
+{
+ return ui.editHostname->text();
+}
+
+int QSqlConnectionDialog::port() const
+{
+ return ui.portSpinBox->value();
+}
+
+bool QSqlConnectionDialog::useInMemoryDatabase() const
+{
+ return ui.dbCheckBox->isChecked();
+}
+
+void QSqlConnectionDialog::on_okButton_clicked()
+{
+ if (ui.comboDriver->currentText().isEmpty()) {
+ QMessageBox::information(this, tr("No database driver selected"),
+ tr("Please select a database driver"));
+ ui.comboDriver->setFocus();
+ } else {
+ accept();
+ }
+}
diff --git a/demos/sqlbrowser/qsqlconnectiondialog.h b/demos/sqlbrowser/qsqlconnectiondialog.h
new file mode 100644
index 0000000..d5f3456
--- /dev/null
+++ b/demos/sqlbrowser/qsqlconnectiondialog.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSQLCONNECTIONDIALOG_H
+#define QSQLCONNECTIONDIALOG_H
+
+#include <QDialog>
+#include <QMessageBox>
+
+#include "ui_qsqlconnectiondialog.h"
+
+class QSqlConnectionDialog: public QDialog
+{
+ Q_OBJECT
+public:
+ QSqlConnectionDialog(QWidget *parent = 0);
+ ~QSqlConnectionDialog();
+
+ QString driverName() const;
+ QString databaseName() const;
+ QString userName() const;
+ QString password() const;
+ QString hostName() const;
+ int port() const;
+ bool useInMemoryDatabase() const;
+
+private slots:
+ void on_okButton_clicked();
+ void on_cancelButton_clicked() { reject(); }
+ void on_dbCheckBox_clicked() { ui.connGroupBox->setEnabled(!ui.dbCheckBox->isChecked()); }
+
+private:
+ Ui::QSqlConnectionDialogUi ui;
+};
+
+#endif
diff --git a/demos/sqlbrowser/qsqlconnectiondialog.ui b/demos/sqlbrowser/qsqlconnectiondialog.ui
new file mode 100644
index 0000000..91a8700
--- /dev/null
+++ b/demos/sqlbrowser/qsqlconnectiondialog.ui
@@ -0,0 +1,224 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>QSqlConnectionDialogUi</class>
+ <widget class="QDialog" name="QSqlConnectionDialogUi" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>315</width>
+ <height>302</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Connect...</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="connGroupBox" >
+ <property name="title" >
+ <string>Connection settings</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="comboDriver" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="textLabel4" >
+ <property name="text" >
+ <string>&amp;Username:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>editUsername</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="textLabel2" >
+ <property name="text" >
+ <string>D&amp;river</string>
+ </property>
+ <property name="buddy" >
+ <cstring>comboDriver</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="editDatabase" />
+ </item>
+ <item row="5" column="1" >
+ <widget class="QSpinBox" name="portSpinBox" >
+ <property name="specialValueText" >
+ <string>Default</string>
+ </property>
+ <property name="maximum" >
+ <number>65535</number>
+ </property>
+ <property name="minimum" >
+ <number>-1</number>
+ </property>
+ <property name="value" >
+ <number>-1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="textLabel3" >
+ <property name="text" >
+ <string>Database Name:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>editDatabase</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QLineEdit" name="editPassword" >
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="editUsername" />
+ </item>
+ <item row="4" column="1" >
+ <widget class="QLineEdit" name="editHostname" />
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="textLabel5" >
+ <property name="text" >
+ <string>&amp;Hostname:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>editHostname</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="textLabel5_2" >
+ <property name="text" >
+ <string>P&amp;ort:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>portSpinBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="textLabel4_2" >
+ <property name="text" >
+ <string>&amp;Password:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>editPassword</cstring>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="dbCheckBox" >
+ <property name="text" >
+ <string>Us&amp;e predefined in-memory database</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="text" >
+ <string>&amp;OK</string>
+ </property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="text" >
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>comboDriver</tabstop>
+ <tabstop>editDatabase</tabstop>
+ <tabstop>editUsername</tabstop>
+ <tabstop>editPassword</tabstop>
+ <tabstop>editHostname</tabstop>
+ <tabstop>portSpinBox</tabstop>
+ <tabstop>dbCheckBox</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/demos/sqlbrowser/sqlbrowser.pro b/demos/sqlbrowser/sqlbrowser.pro
new file mode 100644
index 0000000..920e8a0
--- /dev/null
+++ b/demos/sqlbrowser/sqlbrowser.pro
@@ -0,0 +1,23 @@
+TEMPLATE = app
+TARGET = sqlbrowser
+
+QT += sql
+
+HEADERS = browser.h connectionwidget.h qsqlconnectiondialog.h
+SOURCES = main.cpp browser.cpp connectionwidget.cpp qsqlconnectiondialog.cpp
+
+FORMS = browserwidget.ui qsqlconnectiondialog.ui
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/sqlbrowser
+sources.files = $$SOURCES $$HEADERS $$FORMS *.pro
+sources.path = $$[QT_INSTALL_DEMOS]/sqlbrowser
+INSTALLS += target sources
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qsqlite
+}
diff --git a/demos/textedit/example.html b/demos/textedit/example.html
new file mode 100644
index 0000000..19b5520
--- /dev/null
+++ b/demos/textedit/example.html
@@ -0,0 +1,79 @@
+<html><head><meta name="qrichtext" content="1" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>QTextEdit Demonstration</title><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">QTextEdit</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">If you are viewing this document in the <span style=" font-style:italic;">textedit</span> demo, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment. </p>
+<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:18pt; font-weight:600;"><span style=" font-size:16pt;">Font and Paragraph Styles</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit supports </span><span style=" font-size:11pt; font-weight:600;">bold</span><span style=" font-size:11pt;">, </span><span style=" font-size:11pt; font-style:italic;">italic</span><span style=" font-size:11pt;">, and </span><span style=" font-size:11pt; text-decoration: underline;">underlined</span><span style=" font-size:11pt;"> font styles, and can display </span><span style=" font-size:11pt; font-weight:600; color:#00007f;">multicolored</span><span style=" font-size:11pt;"> </span><span style=" font-size:11pt; font-weight:600; color:#aa0000;">text</span><span style=" font-size:11pt;">. Font families such as </span><span style=" font-family:'Times'; font-size:11pt; font-weight:600;">Times New Roman</span><span style=" font-size:11pt;"> and </span><span style=" font-family:'Courier'; font-size:11pt; font-weight:600;">Courier</span><span style=" font-size:11pt;"> can also be used directly. </span><span style=" font-size:11pt; font-style:italic;">If you place the cursor in a region of styled text, the controls in the tool bars will change to reflect the current style.</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Paragraphs can be formatted so that the text is left-aligned, right-aligned, centered, or fully justified.</p>
+<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try changing the alignment of some text and resize the editor to see how the text layout changes.</span> </p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Lists</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Different kinds of lists can be included in rich text documents. Standard bullet lists can be nested, using different symbols for each level of the list: </span></p>
+<ul style="-qt-list-indent: 1;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Disc symbols are typically used for top-level list items. </li></ul>
+<ul type=circle style="-qt-list-indent: 2;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Circle symbols can be used to distinguish between items in lower-level lists.</li></ul>
+<ul type=square style="-qt-list-indent: 3;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Square symbols provide a reasonable alternative to discs and circles. </li></ul>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Ordered lists can be created that can be used for tables of contents. Different characters can be used to enumerate items, and we can use both Roman and Arabic numerals in the same list structure: </p>
+<ol style="-qt-list-indent: 1;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Introduction</li>
+<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Tools </li></ol>
+<ol type=a style="-qt-list-indent: 2;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Assistant</li>
+<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Designer</li>
+<ol type=A style="-qt-list-indent: 3;"><li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Form Editor</li>
+<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Component Architecture</li></ol>
+<li style=" font-size:11pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Qt Linguist</li></ol>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">The list will automatically be renumbered if you add or remove items. <span style=" font-style:italic;">Try adding new sections to the above list or removing existing item to see the numbers change.</span> </p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
+<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Images</span></p>
+<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them. </span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and pasting it into different parts of this document.</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Tables</span></p>
+<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns. </span></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
+<table border="1" align="center" width="90%" cellspacing="0" cellpadding="4">
+<tr>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Development Tools </span></p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Programming Techniques </span></p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Graphical User Interfaces </span></p></td></tr>
+<tr>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">9:00 - 11:00 </span></p></td>
+<td colspan="3">
+<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Introduction to <span style=" font-style:italic;">Qt </span></p></td></tr>
+<tr>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">11:00 - 13:00 </span></p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Using <span style=" font-style:italic;">qmake</span> </p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Object-oriented Programming </p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Layouts in <span style=" font-style:italic;">Qt</span> </p></td></tr>
+<tr>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">13:00 - 15:00 </span></p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Qt Designer</span> Tutorial </p></td>
+<td rowspan="2">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Extreme Programming </p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Writing Custom Styles </p></td></tr>
+<tr>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">15:00 - 17:00 </span></p></td>
+<td>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Qt Linguist</span> and Internationalization </p></td>
+<td></td></tr></table>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; font-style:italic;">Try adding text to the cells in the table and experiment with the alignment of the paragraphs.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Hyperlinks</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit is designed to support hyperlinks between documents, and this feature is used extensively in </span><span style=" font-size:11pt; font-style:italic;">Qt Assistant</span><span style=" font-size:11pt;">. Hyperlinks are automatically created when an HTML file is imported into an editor. Since the rich text framework supports hyperlinks natively, they can also be created programatically.</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Undo and Redo</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Full support for undo and redo operations is built into QTextEdit and the underlying rich text framework. Operations on a document can be packaged together to make editing a more comfortable experience for the user.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try making changes to this document and press Ctrl+Z to undo them. You can always recover the original contents of the document.</span> </p></body></html>
diff --git a/demos/textedit/images/logo32.png b/demos/textedit/images/logo32.png
new file mode 100644
index 0000000..5f91e98
--- /dev/null
+++ b/demos/textedit/images/logo32.png
Binary files differ
diff --git a/demos/textedit/images/mac/editcopy.png b/demos/textedit/images/mac/editcopy.png
new file mode 100644
index 0000000..f551364
--- /dev/null
+++ b/demos/textedit/images/mac/editcopy.png
Binary files differ
diff --git a/demos/textedit/images/mac/editcut.png b/demos/textedit/images/mac/editcut.png
new file mode 100644
index 0000000..a784fd5
--- /dev/null
+++ b/demos/textedit/images/mac/editcut.png
Binary files differ
diff --git a/demos/textedit/images/mac/editpaste.png b/demos/textedit/images/mac/editpaste.png
new file mode 100644
index 0000000..64c0b2d
--- /dev/null
+++ b/demos/textedit/images/mac/editpaste.png
Binary files differ
diff --git a/demos/textedit/images/mac/editredo.png b/demos/textedit/images/mac/editredo.png
new file mode 100644
index 0000000..8875bf2
--- /dev/null
+++ b/demos/textedit/images/mac/editredo.png
Binary files differ
diff --git a/demos/textedit/images/mac/editundo.png b/demos/textedit/images/mac/editundo.png
new file mode 100644
index 0000000..a3bd5e0
--- /dev/null
+++ b/demos/textedit/images/mac/editundo.png
Binary files differ
diff --git a/demos/textedit/images/mac/exportpdf.png b/demos/textedit/images/mac/exportpdf.png
new file mode 100644
index 0000000..ebb44e6
--- /dev/null
+++ b/demos/textedit/images/mac/exportpdf.png
Binary files differ
diff --git a/demos/textedit/images/mac/filenew.png b/demos/textedit/images/mac/filenew.png
new file mode 100644
index 0000000..d3882c7
--- /dev/null
+++ b/demos/textedit/images/mac/filenew.png
Binary files differ
diff --git a/demos/textedit/images/mac/fileopen.png b/demos/textedit/images/mac/fileopen.png
new file mode 100644
index 0000000..fc06c5e
--- /dev/null
+++ b/demos/textedit/images/mac/fileopen.png
Binary files differ
diff --git a/demos/textedit/images/mac/fileprint.png b/demos/textedit/images/mac/fileprint.png
new file mode 100644
index 0000000..10ca56c
--- /dev/null
+++ b/demos/textedit/images/mac/fileprint.png
Binary files differ
diff --git a/demos/textedit/images/mac/filesave.png b/demos/textedit/images/mac/filesave.png
new file mode 100644
index 0000000..b41ecf5
--- /dev/null
+++ b/demos/textedit/images/mac/filesave.png
Binary files differ
diff --git a/demos/textedit/images/mac/textbold.png b/demos/textedit/images/mac/textbold.png
new file mode 100644
index 0000000..38400bd
--- /dev/null
+++ b/demos/textedit/images/mac/textbold.png
Binary files differ
diff --git a/demos/textedit/images/mac/textcenter.png b/demos/textedit/images/mac/textcenter.png
new file mode 100644
index 0000000..2ef5b2e
--- /dev/null
+++ b/demos/textedit/images/mac/textcenter.png
Binary files differ
diff --git a/demos/textedit/images/mac/textitalic.png b/demos/textedit/images/mac/textitalic.png
new file mode 100644
index 0000000..0170ee2
--- /dev/null
+++ b/demos/textedit/images/mac/textitalic.png
Binary files differ
diff --git a/demos/textedit/images/mac/textjustify.png b/demos/textedit/images/mac/textjustify.png
new file mode 100644
index 0000000..39cd6c1
--- /dev/null
+++ b/demos/textedit/images/mac/textjustify.png
Binary files differ
diff --git a/demos/textedit/images/mac/textleft.png b/demos/textedit/images/mac/textleft.png
new file mode 100644
index 0000000..83a66d5
--- /dev/null
+++ b/demos/textedit/images/mac/textleft.png
Binary files differ
diff --git a/demos/textedit/images/mac/textright.png b/demos/textedit/images/mac/textright.png
new file mode 100644
index 0000000..e7c0464
--- /dev/null
+++ b/demos/textedit/images/mac/textright.png
Binary files differ
diff --git a/demos/textedit/images/mac/textunder.png b/demos/textedit/images/mac/textunder.png
new file mode 100644
index 0000000..968bac5
--- /dev/null
+++ b/demos/textedit/images/mac/textunder.png
Binary files differ
diff --git a/demos/textedit/images/mac/zoomin.png b/demos/textedit/images/mac/zoomin.png
new file mode 100644
index 0000000..d46f5af
--- /dev/null
+++ b/demos/textedit/images/mac/zoomin.png
Binary files differ
diff --git a/demos/textedit/images/mac/zoomout.png b/demos/textedit/images/mac/zoomout.png
new file mode 100644
index 0000000..4632656
--- /dev/null
+++ b/demos/textedit/images/mac/zoomout.png
Binary files differ
diff --git a/demos/textedit/images/win/editcopy.png b/demos/textedit/images/win/editcopy.png
new file mode 100644
index 0000000..1121b47
--- /dev/null
+++ b/demos/textedit/images/win/editcopy.png
Binary files differ
diff --git a/demos/textedit/images/win/editcut.png b/demos/textedit/images/win/editcut.png
new file mode 100644
index 0000000..38e55f7
--- /dev/null
+++ b/demos/textedit/images/win/editcut.png
Binary files differ
diff --git a/demos/textedit/images/win/editpaste.png b/demos/textedit/images/win/editpaste.png
new file mode 100644
index 0000000..ffab15a
--- /dev/null
+++ b/demos/textedit/images/win/editpaste.png
Binary files differ
diff --git a/demos/textedit/images/win/editredo.png b/demos/textedit/images/win/editredo.png
new file mode 100644
index 0000000..9d679fe
--- /dev/null
+++ b/demos/textedit/images/win/editredo.png
Binary files differ
diff --git a/demos/textedit/images/win/editundo.png b/demos/textedit/images/win/editundo.png
new file mode 100644
index 0000000..eee23d2
--- /dev/null
+++ b/demos/textedit/images/win/editundo.png
Binary files differ
diff --git a/demos/textedit/images/win/exportpdf.png b/demos/textedit/images/win/exportpdf.png
new file mode 100644
index 0000000..eef5132
--- /dev/null
+++ b/demos/textedit/images/win/exportpdf.png
Binary files differ
diff --git a/demos/textedit/images/win/filenew.png b/demos/textedit/images/win/filenew.png
new file mode 100644
index 0000000..af5d122
--- /dev/null
+++ b/demos/textedit/images/win/filenew.png
Binary files differ
diff --git a/demos/textedit/images/win/fileopen.png b/demos/textedit/images/win/fileopen.png
new file mode 100644
index 0000000..fc6f17e
--- /dev/null
+++ b/demos/textedit/images/win/fileopen.png
Binary files differ
diff --git a/demos/textedit/images/win/fileprint.png b/demos/textedit/images/win/fileprint.png
new file mode 100644
index 0000000..ba7c02d
--- /dev/null
+++ b/demos/textedit/images/win/fileprint.png
Binary files differ
diff --git a/demos/textedit/images/win/filesave.png b/demos/textedit/images/win/filesave.png
new file mode 100644
index 0000000..8feec99
--- /dev/null
+++ b/demos/textedit/images/win/filesave.png
Binary files differ
diff --git a/demos/textedit/images/win/textbold.png b/demos/textedit/images/win/textbold.png
new file mode 100644
index 0000000..9cbc713
--- /dev/null
+++ b/demos/textedit/images/win/textbold.png
Binary files differ
diff --git a/demos/textedit/images/win/textcenter.png b/demos/textedit/images/win/textcenter.png
new file mode 100644
index 0000000..11efb4b
--- /dev/null
+++ b/demos/textedit/images/win/textcenter.png
Binary files differ
diff --git a/demos/textedit/images/win/textitalic.png b/demos/textedit/images/win/textitalic.png
new file mode 100644
index 0000000..b30ce14
--- /dev/null
+++ b/demos/textedit/images/win/textitalic.png
Binary files differ
diff --git a/demos/textedit/images/win/textjustify.png b/demos/textedit/images/win/textjustify.png
new file mode 100644
index 0000000..9de0c88
--- /dev/null
+++ b/demos/textedit/images/win/textjustify.png
Binary files differ
diff --git a/demos/textedit/images/win/textleft.png b/demos/textedit/images/win/textleft.png
new file mode 100644
index 0000000..16f80bc
--- /dev/null
+++ b/demos/textedit/images/win/textleft.png
Binary files differ
diff --git a/demos/textedit/images/win/textright.png b/demos/textedit/images/win/textright.png
new file mode 100644
index 0000000..16872df
--- /dev/null
+++ b/demos/textedit/images/win/textright.png
Binary files differ
diff --git a/demos/textedit/images/win/textunder.png b/demos/textedit/images/win/textunder.png
new file mode 100644
index 0000000..c72eff5
--- /dev/null
+++ b/demos/textedit/images/win/textunder.png
Binary files differ
diff --git a/demos/textedit/images/win/zoomin.png b/demos/textedit/images/win/zoomin.png
new file mode 100644
index 0000000..2e586fc
--- /dev/null
+++ b/demos/textedit/images/win/zoomin.png
Binary files differ
diff --git a/demos/textedit/images/win/zoomout.png b/demos/textedit/images/win/zoomout.png
new file mode 100644
index 0000000..a736d39
--- /dev/null
+++ b/demos/textedit/images/win/zoomout.png
Binary files differ
diff --git a/demos/textedit/main.cpp b/demos/textedit/main.cpp
new file mode 100644
index 0000000..fa38ecb
--- /dev/null
+++ b/demos/textedit/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textedit.h"
+#include <QApplication>
+
+int main( int argc, char ** argv )
+{
+ Q_INIT_RESOURCE(textedit);
+
+ QApplication a( argc, argv );
+ TextEdit mw;
+ mw.resize( 700, 800 );
+ mw.show();
+ return a.exec();
+}
diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp
new file mode 100644
index 0000000..128cd6a
--- /dev/null
+++ b/demos/textedit/textedit.cpp
@@ -0,0 +1,688 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textedit.h"
+
+#include <QAction>
+#include <QApplication>
+#include <QClipboard>
+#include <QColorDialog>
+#include <QComboBox>
+#include <QFontComboBox>
+#include <QFile>
+#include <QFileDialog>
+#include <QFileInfo>
+#include <QFontDatabase>
+#include <QMenu>
+#include <QMenuBar>
+#include <QPrintDialog>
+#include <QPrinter>
+#include <QTextCodec>
+#include <QTextEdit>
+#include <QToolBar>
+#include <QTextCursor>
+#include <QTextDocumentWriter>
+#include <QTextList>
+#include <QtDebug>
+#include <QCloseEvent>
+#include <QMessageBox>
+#include <QPrintPreviewDialog>
+
+#ifdef Q_WS_MAC
+const QString rsrcPath = ":/images/mac";
+#else
+const QString rsrcPath = ":/images/win";
+#endif
+
+TextEdit::TextEdit(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupFileActions();
+ setupEditActions();
+ setupTextActions();
+
+ {
+ QMenu *helpMenu = new QMenu(tr("Help"), this);
+ menuBar()->addMenu(helpMenu);
+ helpMenu->addAction(tr("About"), this, SLOT(about()));
+ helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+ }
+
+ textEdit = new QTextEdit(this);
+ connect(textEdit, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
+ this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));
+ connect(textEdit, SIGNAL(cursorPositionChanged()),
+ this, SLOT(cursorPositionChanged()));
+
+ setCentralWidget(textEdit);
+ textEdit->setFocus();
+ setCurrentFileName(QString());
+
+ fontChanged(textEdit->font());
+ colorChanged(textEdit->textColor());
+ alignmentChanged(textEdit->alignment());
+
+ connect(textEdit->document(), SIGNAL(modificationChanged(bool)),
+ actionSave, SLOT(setEnabled(bool)));
+ connect(textEdit->document(), SIGNAL(modificationChanged(bool)),
+ this, SLOT(setWindowModified(bool)));
+ connect(textEdit->document(), SIGNAL(undoAvailable(bool)),
+ actionUndo, SLOT(setEnabled(bool)));
+ connect(textEdit->document(), SIGNAL(redoAvailable(bool)),
+ actionRedo, SLOT(setEnabled(bool)));
+
+ setWindowModified(textEdit->document()->isModified());
+ actionSave->setEnabled(textEdit->document()->isModified());
+ actionUndo->setEnabled(textEdit->document()->isUndoAvailable());
+ actionRedo->setEnabled(textEdit->document()->isRedoAvailable());
+
+ connect(actionUndo, SIGNAL(triggered()), textEdit, SLOT(undo()));
+ connect(actionRedo, SIGNAL(triggered()), textEdit, SLOT(redo()));
+
+ actionCut->setEnabled(false);
+ actionCopy->setEnabled(false);
+
+ connect(actionCut, SIGNAL(triggered()), textEdit, SLOT(cut()));
+ connect(actionCopy, SIGNAL(triggered()), textEdit, SLOT(copy()));
+ connect(actionPaste, SIGNAL(triggered()), textEdit, SLOT(paste()));
+
+ connect(textEdit, SIGNAL(copyAvailable(bool)), actionCut, SLOT(setEnabled(bool)));
+ connect(textEdit, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool)));
+
+ connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
+
+ QString initialFile = ":/example.html";
+ const QStringList args = QCoreApplication::arguments();
+ if (args.count() == 2)
+ initialFile = args.at(1);
+
+ if (!load(initialFile))
+ fileNew();
+}
+
+void TextEdit::closeEvent(QCloseEvent *e)
+{
+ if (maybeSave())
+ e->accept();
+ else
+ e->ignore();
+}
+
+void TextEdit::setupFileActions()
+{
+ QToolBar *tb = new QToolBar(this);
+ tb->setWindowTitle(tr("File Actions"));
+ addToolBar(tb);
+
+ QMenu *menu = new QMenu(tr("&File"), this);
+ menuBar()->addMenu(menu);
+
+ QAction *a;
+
+ a = new QAction(QIcon(rsrcPath + "/filenew.png"), tr("&New"), this);
+ a->setShortcut(QKeySequence::New);
+ connect(a, SIGNAL(triggered()), this, SLOT(fileNew()));
+ tb->addAction(a);
+ menu->addAction(a);
+
+ a = new QAction(QIcon(rsrcPath + "/fileopen.png"), tr("&Open..."), this);
+ a->setShortcut(QKeySequence::Open);
+ connect(a, SIGNAL(triggered()), this, SLOT(fileOpen()));
+ tb->addAction(a);
+ menu->addAction(a);
+
+ menu->addSeparator();
+
+ actionSave = a = new QAction(QIcon(rsrcPath + "/filesave.png"), tr("&Save"), this);
+ a->setShortcut(QKeySequence::Save);
+ connect(a, SIGNAL(triggered()), this, SLOT(fileSave()));
+ a->setEnabled(false);
+ tb->addAction(a);
+ menu->addAction(a);
+
+ a = new QAction(tr("Save &As..."), this);
+ connect(a, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
+ menu->addAction(a);
+ menu->addSeparator();
+
+#ifndef QT_NO_PRINTER
+ a = new QAction(QIcon(rsrcPath + "/fileprint.png"), tr("&Print..."), this);
+ a->setShortcut(QKeySequence::Print);
+ connect(a, SIGNAL(triggered()), this, SLOT(filePrint()));
+ tb->addAction(a);
+ menu->addAction(a);
+
+ a = new QAction(QIcon(rsrcPath + "/fileprint.png"), tr("Print Preview..."), this);
+ connect(a, SIGNAL(triggered()), this, SLOT(filePrintPreview()));
+ menu->addAction(a);
+
+ a = new QAction(QIcon(rsrcPath + "/exportpdf.png"), tr("&Export PDF..."), this);
+ a->setShortcut(Qt::CTRL + Qt::Key_D);
+ connect(a, SIGNAL(triggered()), this, SLOT(filePrintPdf()));
+ tb->addAction(a);
+ menu->addAction(a);
+
+ menu->addSeparator();
+#endif
+
+ a = new QAction(tr("&Quit"), this);
+ a->setShortcut(Qt::CTRL + Qt::Key_Q);
+ connect(a, SIGNAL(triggered()), this, SLOT(close()));
+ menu->addAction(a);
+}
+
+void TextEdit::setupEditActions()
+{
+ QToolBar *tb = new QToolBar(this);
+ tb->setWindowTitle(tr("Edit Actions"));
+ addToolBar(tb);
+
+ QMenu *menu = new QMenu(tr("&Edit"), this);
+ menuBar()->addMenu(menu);
+
+ QAction *a;
+ a = actionUndo = new QAction(QIcon(rsrcPath + "/editundo.png"), tr("&Undo"), this);
+ a->setShortcut(QKeySequence::Undo);
+ tb->addAction(a);
+ menu->addAction(a);
+ a = actionRedo = new QAction(QIcon(rsrcPath + "/editredo.png"), tr("&Redo"), this);
+ a->setShortcut(QKeySequence::Redo);
+ tb->addAction(a);
+ menu->addAction(a);
+ menu->addSeparator();
+ a = actionCut = new QAction(QIcon(rsrcPath + "/editcut.png"), tr("Cu&t"), this);
+ a->setShortcut(QKeySequence::Cut);
+ tb->addAction(a);
+ menu->addAction(a);
+ a = actionCopy = new QAction(QIcon(rsrcPath + "/editcopy.png"), tr("&Copy"), this);
+ a->setShortcut(QKeySequence::Copy);
+ tb->addAction(a);
+ menu->addAction(a);
+ a = actionPaste = new QAction(QIcon(rsrcPath + "/editpaste.png"), tr("&Paste"), this);
+ a->setShortcut(QKeySequence::Paste);
+ tb->addAction(a);
+ menu->addAction(a);
+ actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
+}
+
+void TextEdit::setupTextActions()
+{
+ QToolBar *tb = new QToolBar(this);
+ tb->setWindowTitle(tr("Format Actions"));
+ addToolBar(tb);
+
+ QMenu *menu = new QMenu(tr("F&ormat"), this);
+ menuBar()->addMenu(menu);
+
+ actionTextBold = new QAction(QIcon(rsrcPath + "/textbold.png"), tr("&Bold"), this);
+ actionTextBold->setShortcut(Qt::CTRL + Qt::Key_B);
+ QFont bold;
+ bold.setBold(true);
+ actionTextBold->setFont(bold);
+ connect(actionTextBold, SIGNAL(triggered()), this, SLOT(textBold()));
+ tb->addAction(actionTextBold);
+ menu->addAction(actionTextBold);
+ actionTextBold->setCheckable(true);
+
+ actionTextItalic = new QAction(QIcon(rsrcPath + "/textitalic.png"), tr("&Italic"), this);
+ actionTextItalic->setShortcut(Qt::CTRL + Qt::Key_I);
+ QFont italic;
+ italic.setItalic(true);
+ actionTextItalic->setFont(italic);
+ connect(actionTextItalic, SIGNAL(triggered()), this, SLOT(textItalic()));
+ tb->addAction(actionTextItalic);
+ menu->addAction(actionTextItalic);
+ actionTextItalic->setCheckable(true);
+
+ actionTextUnderline = new QAction(QIcon(rsrcPath + "/textunder.png"), tr("&Underline"), this);
+ actionTextUnderline->setShortcut(Qt::CTRL + Qt::Key_U);
+ QFont underline;
+ underline.setUnderline(true);
+ actionTextUnderline->setFont(underline);
+ connect(actionTextUnderline, SIGNAL(triggered()), this, SLOT(textUnderline()));
+ tb->addAction(actionTextUnderline);
+ menu->addAction(actionTextUnderline);
+ actionTextUnderline->setCheckable(true);
+
+ menu->addSeparator();
+
+ QActionGroup *grp = new QActionGroup(this);
+ connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(textAlign(QAction *)));
+
+ // Make sure the alignLeft is always left of the alignRight
+ if (QApplication::isLeftToRight()) {
+ actionAlignLeft = new QAction(QIcon(rsrcPath + "/textleft.png"), tr("&Left"), grp);
+ actionAlignCenter = new QAction(QIcon(rsrcPath + "/textcenter.png"), tr("C&enter"), grp);
+ actionAlignRight = new QAction(QIcon(rsrcPath + "/textright.png"), tr("&Right"), grp);
+ } else {
+ actionAlignRight = new QAction(QIcon(rsrcPath + "/textright.png"), tr("&Right"), grp);
+ actionAlignCenter = new QAction(QIcon(rsrcPath + "/textcenter.png"), tr("C&enter"), grp);
+ actionAlignLeft = new QAction(QIcon(rsrcPath + "/textleft.png"), tr("&Left"), grp);
+ }
+ actionAlignJustify = new QAction(QIcon(rsrcPath + "/textjustify.png"), tr("&Justify"), grp);
+
+ actionAlignLeft->setShortcut(Qt::CTRL + Qt::Key_L);
+ actionAlignLeft->setCheckable(true);
+ actionAlignCenter->setShortcut(Qt::CTRL + Qt::Key_E);
+ actionAlignCenter->setCheckable(true);
+ actionAlignRight->setShortcut(Qt::CTRL + Qt::Key_R);
+ actionAlignRight->setCheckable(true);
+ actionAlignJustify->setShortcut(Qt::CTRL + Qt::Key_J);
+ actionAlignJustify->setCheckable(true);
+
+ tb->addActions(grp->actions());
+ menu->addActions(grp->actions());
+
+ menu->addSeparator();
+
+ QPixmap pix(16, 16);
+ pix.fill(Qt::black);
+ actionTextColor = new QAction(pix, tr("&Color..."), this);
+ connect(actionTextColor, SIGNAL(triggered()), this, SLOT(textColor()));
+ tb->addAction(actionTextColor);
+ menu->addAction(actionTextColor);
+
+
+ tb = new QToolBar(this);
+ tb->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
+ tb->setWindowTitle(tr("Format Actions"));
+ addToolBarBreak(Qt::TopToolBarArea);
+ addToolBar(tb);
+
+ comboStyle = new QComboBox(tb);
+ tb->addWidget(comboStyle);
+ comboStyle->addItem("Standard");
+ comboStyle->addItem("Bullet List (Disc)");
+ comboStyle->addItem("Bullet List (Circle)");
+ comboStyle->addItem("Bullet List (Square)");
+ comboStyle->addItem("Ordered List (Decimal)");
+ comboStyle->addItem("Ordered List (Alpha lower)");
+ comboStyle->addItem("Ordered List (Alpha upper)");
+ connect(comboStyle, SIGNAL(activated(int)),
+ this, SLOT(textStyle(int)));
+
+ comboFont = new QFontComboBox(tb);
+ tb->addWidget(comboFont);
+ connect(comboFont, SIGNAL(activated(const QString &)),
+ this, SLOT(textFamily(const QString &)));
+
+ comboSize = new QComboBox(tb);
+ comboSize->setObjectName("comboSize");
+ tb->addWidget(comboSize);
+ comboSize->setEditable(true);
+
+ QFontDatabase db;
+ foreach(int size, db.standardSizes())
+ comboSize->addItem(QString::number(size));
+
+ connect(comboSize, SIGNAL(activated(const QString &)),
+ this, SLOT(textSize(const QString &)));
+ comboSize->setCurrentIndex(comboSize->findText(QString::number(QApplication::font()
+ .pointSize())));
+}
+
+bool TextEdit::load(const QString &f)
+{
+ if (!QFile::exists(f))
+ return false;
+ QFile file(f);
+ if (!file.open(QFile::ReadOnly))
+ return false;
+
+ QByteArray data = file.readAll();
+ QTextCodec *codec = Qt::codecForHtml(data);
+ QString str = codec->toUnicode(data);
+ if (Qt::mightBeRichText(str)) {
+ textEdit->setHtml(str);
+ } else {
+ str = QString::fromLocal8Bit(data);
+ textEdit->setPlainText(str);
+ }
+
+ setCurrentFileName(f);
+ return true;
+}
+
+bool TextEdit::maybeSave()
+{
+ if (!textEdit->document()->isModified())
+ return true;
+ if (fileName.startsWith(QLatin1String(":/")))
+ return true;
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save)
+ return fileSave();
+ else if (ret == QMessageBox::Cancel)
+ return false;
+ return true;
+}
+
+void TextEdit::setCurrentFileName(const QString &fileName)
+{
+ this->fileName = fileName;
+ textEdit->document()->setModified(false);
+
+ QString shownName;
+ if (fileName.isEmpty())
+ shownName = "untitled.txt";
+ else
+ shownName = QFileInfo(fileName).fileName();
+
+ setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Rich Text")));
+ setWindowModified(false);
+}
+
+void TextEdit::fileNew()
+{
+ if (maybeSave()) {
+ textEdit->clear();
+ setCurrentFileName(QString());
+ }
+}
+
+void TextEdit::fileOpen()
+{
+ QString fn = QFileDialog::getOpenFileName(this, tr("Open File..."),
+ QString(), tr("HTML-Files (*.htm *.html);;All Files (*)"));
+ if (!fn.isEmpty())
+ load(fn);
+}
+
+bool TextEdit::fileSave()
+{
+ if (fileName.isEmpty())
+ return fileSaveAs();
+
+ QTextDocumentWriter writer(fileName);
+ bool success = writer.write(textEdit->document());
+ if (success)
+ textEdit->document()->setModified(false);
+ return success;
+}
+
+bool TextEdit::fileSaveAs()
+{
+ QString fn = QFileDialog::getSaveFileName(this, tr("Save as..."),
+ QString(), tr("ODF files (*.odt);;HTML-Files (*.htm *.html);;All Files (*)"));
+ if (fn.isEmpty())
+ return false;
+ if (! (fn.endsWith(".odt", Qt::CaseInsensitive) || fn.endsWith(".htm", Qt::CaseInsensitive) || fn.endsWith(".html", Qt::CaseInsensitive)) )
+ fn += ".odt"; // default
+ setCurrentFileName(fn);
+ return fileSave();
+}
+
+void TextEdit::filePrint()
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer(QPrinter::HighResolution);
+ QPrintDialog *dlg = new QPrintDialog(&printer, this);
+ if (textEdit->textCursor().hasSelection())
+ dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ dlg->setWindowTitle(tr("Print Document"));
+ if (dlg->exec() == QDialog::Accepted) {
+ textEdit->print(&printer);
+ }
+ delete dlg;
+#endif
+}
+
+void TextEdit::filePrintPreview()
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer(QPrinter::HighResolution);
+ QPrintPreviewDialog preview(&printer, this);
+ connect(&preview, SIGNAL(paintRequested(QPrinter *)), SLOT(printPreview(QPrinter *)));
+ preview.exec();
+#endif
+}
+
+void TextEdit::printPreview(QPrinter *printer)
+{
+#ifdef QT_NO_PRINTER
+ Q_UNUSED(printer);
+#else
+ textEdit->print(printer);
+#endif
+}
+
+
+void TextEdit::filePrintPdf()
+{
+#ifndef QT_NO_PRINTER
+//! [0]
+ QString fileName = QFileDialog::getSaveFileName(this, "Export PDF",
+ QString(), "*.pdf");
+ if (!fileName.isEmpty()) {
+ if (QFileInfo(fileName).suffix().isEmpty())
+ fileName.append(".pdf");
+ QPrinter printer(QPrinter::HighResolution);
+ printer.setOutputFormat(QPrinter::PdfFormat);
+ printer.setOutputFileName(fileName);
+ textEdit->document()->print(&printer);
+ }
+//! [0]
+#endif
+}
+
+void TextEdit::textBold()
+{
+ QTextCharFormat fmt;
+ fmt.setFontWeight(actionTextBold->isChecked() ? QFont::Bold : QFont::Normal);
+ mergeFormatOnWordOrSelection(fmt);
+}
+
+void TextEdit::textUnderline()
+{
+ QTextCharFormat fmt;
+ fmt.setFontUnderline(actionTextUnderline->isChecked());
+ mergeFormatOnWordOrSelection(fmt);
+}
+
+void TextEdit::textItalic()
+{
+ QTextCharFormat fmt;
+ fmt.setFontItalic(actionTextItalic->isChecked());
+ mergeFormatOnWordOrSelection(fmt);
+}
+
+void TextEdit::textFamily(const QString &f)
+{
+ QTextCharFormat fmt;
+ fmt.setFontFamily(f);
+ mergeFormatOnWordOrSelection(fmt);
+}
+
+void TextEdit::textSize(const QString &p)
+{
+ qreal pointSize = p.toFloat();
+ if (p.toFloat() > 0) {
+ QTextCharFormat fmt;
+ fmt.setFontPointSize(pointSize);
+ mergeFormatOnWordOrSelection(fmt);
+ }
+}
+
+void TextEdit::textStyle(int styleIndex)
+{
+ QTextCursor cursor = textEdit->textCursor();
+
+ if (styleIndex != 0) {
+ QTextListFormat::Style style = QTextListFormat::ListDisc;
+
+ switch (styleIndex) {
+ default:
+ case 1:
+ style = QTextListFormat::ListDisc;
+ break;
+ case 2:
+ style = QTextListFormat::ListCircle;
+ break;
+ case 3:
+ style = QTextListFormat::ListSquare;
+ break;
+ case 4:
+ style = QTextListFormat::ListDecimal;
+ break;
+ case 5:
+ style = QTextListFormat::ListLowerAlpha;
+ break;
+ case 6:
+ style = QTextListFormat::ListUpperAlpha;
+ break;
+ }
+
+ cursor.beginEditBlock();
+
+ QTextBlockFormat blockFmt = cursor.blockFormat();
+
+ QTextListFormat listFmt;
+
+ if (cursor.currentList()) {
+ listFmt = cursor.currentList()->format();
+ } else {
+ listFmt.setIndent(blockFmt.indent() + 1);
+ blockFmt.setIndent(0);
+ cursor.setBlockFormat(blockFmt);
+ }
+
+ listFmt.setStyle(style);
+
+ cursor.createList(listFmt);
+
+ cursor.endEditBlock();
+ } else {
+ // ####
+ QTextBlockFormat bfmt;
+ bfmt.setObjectIndex(-1);
+ cursor.mergeBlockFormat(bfmt);
+ }
+}
+
+void TextEdit::textColor()
+{
+ QColor col = QColorDialog::getColor(textEdit->textColor(), this);
+ if (!col.isValid())
+ return;
+ QTextCharFormat fmt;
+ fmt.setForeground(col);
+ mergeFormatOnWordOrSelection(fmt);
+ colorChanged(col);
+}
+
+void TextEdit::textAlign(QAction *a)
+{
+ if (a == actionAlignLeft)
+ textEdit->setAlignment(Qt::AlignLeft | Qt::AlignAbsolute);
+ else if (a == actionAlignCenter)
+ textEdit->setAlignment(Qt::AlignHCenter);
+ else if (a == actionAlignRight)
+ textEdit->setAlignment(Qt::AlignRight | Qt::AlignAbsolute);
+ else if (a == actionAlignJustify)
+ textEdit->setAlignment(Qt::AlignJustify);
+}
+
+void TextEdit::currentCharFormatChanged(const QTextCharFormat &format)
+{
+ fontChanged(format.font());
+ colorChanged(format.foreground().color());
+}
+
+void TextEdit::cursorPositionChanged()
+{
+ alignmentChanged(textEdit->alignment());
+}
+
+void TextEdit::clipboardDataChanged()
+{
+ actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
+}
+
+void TextEdit::about()
+{
+ QMessageBox::about(this, tr("About"), tr("This example demonstrates Qt's "
+ "rich text editing facilities in action, providing an example "
+ "document for you to experiment with."));
+}
+
+void TextEdit::mergeFormatOnWordOrSelection(const QTextCharFormat &format)
+{
+ QTextCursor cursor = textEdit->textCursor();
+ if (!cursor.hasSelection())
+ cursor.select(QTextCursor::WordUnderCursor);
+ cursor.mergeCharFormat(format);
+ textEdit->mergeCurrentCharFormat(format);
+}
+
+void TextEdit::fontChanged(const QFont &f)
+{
+ comboFont->setCurrentIndex(comboFont->findText(QFontInfo(f).family()));
+ comboSize->setCurrentIndex(comboSize->findText(QString::number(f.pointSize())));
+ actionTextBold->setChecked(f.bold());
+ actionTextItalic->setChecked(f.italic());
+ actionTextUnderline->setChecked(f.underline());
+}
+
+void TextEdit::colorChanged(const QColor &c)
+{
+ QPixmap pix(16, 16);
+ pix.fill(c);
+ actionTextColor->setIcon(pix);
+}
+
+void TextEdit::alignmentChanged(Qt::Alignment a)
+{
+ if (a & Qt::AlignLeft) {
+ actionAlignLeft->setChecked(true);
+ } else if (a & Qt::AlignHCenter) {
+ actionAlignCenter->setChecked(true);
+ } else if (a & Qt::AlignRight) {
+ actionAlignRight->setChecked(true);
+ } else if (a & Qt::AlignJustify) {
+ actionAlignJustify->setChecked(true);
+ }
+}
+
diff --git a/demos/textedit/textedit.doc b/demos/textedit/textedit.doc
new file mode 100644
index 0000000..53279b9
--- /dev/null
+++ b/demos/textedit/textedit.doc
@@ -0,0 +1,18 @@
+/*! \page textedit-example.html
+
+ \ingroup examples
+ \title Text Edit Example
+
+ This example displays a text editor with the user interface written
+ in pure C++.
+
+ A similar example which uses \link designer-manual.book Qt
+ Designer\endlink to produce the user interface is in the \link
+ designer-manual.book Qt Designer manual\endlink.
+
+
+ See \c{$QTDIR/examples/textedit} for the source code.
+
+*/
+
+
diff --git a/demos/textedit/textedit.h b/demos/textedit/textedit.h
new file mode 100644
index 0000000..1fb09f9
--- /dev/null
+++ b/demos/textedit/textedit.h
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTEDIT_H
+#define TEXTEDIT_H
+
+#include <QMainWindow>
+#include <QMap>
+#include <QPointer>
+
+QT_FORWARD_DECLARE_CLASS(QAction)
+QT_FORWARD_DECLARE_CLASS(QComboBox)
+QT_FORWARD_DECLARE_CLASS(QFontComboBox)
+QT_FORWARD_DECLARE_CLASS(QTextEdit)
+QT_FORWARD_DECLARE_CLASS(QTextCharFormat)
+QT_FORWARD_DECLARE_CLASS(QMenu)
+
+class TextEdit : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ TextEdit(QWidget *parent = 0);
+
+protected:
+ virtual void closeEvent(QCloseEvent *e);
+
+private:
+ void setupFileActions();
+ void setupEditActions();
+ void setupTextActions();
+ bool load(const QString &f);
+ bool maybeSave();
+ void setCurrentFileName(const QString &fileName);
+
+private slots:
+ void fileNew();
+ void fileOpen();
+ bool fileSave();
+ bool fileSaveAs();
+ void filePrint();
+ void filePrintPreview();
+ void filePrintPdf();
+
+ void textBold();
+ void textUnderline();
+ void textItalic();
+ void textFamily(const QString &f);
+ void textSize(const QString &p);
+ void textStyle(int styleIndex);
+ void textColor();
+ void textAlign(QAction *a);
+
+ void currentCharFormatChanged(const QTextCharFormat &format);
+ void cursorPositionChanged();
+
+ void clipboardDataChanged();
+ void about();
+ void printPreview(QPrinter *);
+
+private:
+ void mergeFormatOnWordOrSelection(const QTextCharFormat &format);
+ void fontChanged(const QFont &f);
+ void colorChanged(const QColor &c);
+ void alignmentChanged(Qt::Alignment a);
+
+ QAction *actionSave,
+ *actionTextBold,
+ *actionTextUnderline,
+ *actionTextItalic,
+ *actionTextColor,
+ *actionAlignLeft,
+ *actionAlignCenter,
+ *actionAlignRight,
+ *actionAlignJustify,
+ *actionUndo,
+ *actionRedo,
+ *actionCut,
+ *actionCopy,
+ *actionPaste;
+
+ QComboBox *comboStyle;
+ QFontComboBox *comboFont;
+ QComboBox *comboSize;
+
+ QToolBar *tb;
+ QString fileName;
+ QTextEdit *textEdit;
+};
+
+#endif
diff --git a/demos/textedit/textedit.pro b/demos/textedit/textedit.pro
new file mode 100644
index 0000000..1ef4256
--- /dev/null
+++ b/demos/textedit/textedit.pro
@@ -0,0 +1,21 @@
+TEMPLATE = app
+TARGET = textedit
+
+CONFIG += qt warn_on
+
+HEADERS = textedit.h
+SOURCES = textedit.cpp \
+ main.cpp
+
+RESOURCES += textedit.qrc
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/textedit
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.doc images
+sources.path = $$[QT_INSTALL_DEMOS]/textedit
+INSTALLS += target sources
+
diff --git a/demos/textedit/textedit.qrc b/demos/textedit/textedit.qrc
new file mode 100644
index 0000000..7d6efd7
--- /dev/null
+++ b/demos/textedit/textedit.qrc
@@ -0,0 +1,44 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>images/logo32.png</file>
+ <file>images/mac/editcopy.png</file>
+ <file>images/mac/editcut.png</file>
+ <file>images/mac/editpaste.png</file>
+ <file>images/mac/editredo.png</file>
+ <file>images/mac/editundo.png</file>
+ <file>images/mac/exportpdf.png</file>
+ <file>images/mac/filenew.png</file>
+ <file>images/mac/fileopen.png</file>
+ <file>images/mac/fileprint.png</file>
+ <file>images/mac/filesave.png</file>
+ <file>images/mac/textbold.png</file>
+ <file>images/mac/textcenter.png</file>
+ <file>images/mac/textitalic.png</file>
+ <file>images/mac/textjustify.png</file>
+ <file>images/mac/textleft.png</file>
+ <file>images/mac/textright.png</file>
+ <file>images/mac/textunder.png</file>
+ <file>images/mac/zoomin.png</file>
+ <file>images/mac/zoomout.png</file>
+ <file>images/win/editcopy.png</file>
+ <file>images/win/editcut.png</file>
+ <file>images/win/editpaste.png</file>
+ <file>images/win/editredo.png</file>
+ <file>images/win/editundo.png</file>
+ <file>images/win/exportpdf.png</file>
+ <file>images/win/filenew.png</file>
+ <file>images/win/fileopen.png</file>
+ <file>images/win/fileprint.png</file>
+ <file>images/win/filesave.png</file>
+ <file>images/win/textbold.png</file>
+ <file>images/win/textcenter.png</file>
+ <file>images/win/textitalic.png</file>
+ <file>images/win/textjustify.png</file>
+ <file>images/win/textleft.png</file>
+ <file>images/win/textright.png</file>
+ <file>images/win/textunder.png</file>
+ <file>images/win/zoomin.png</file>
+ <file>images/win/zoomout.png</file>
+ <file>example.html</file>
+</qresource>
+</RCC>
diff --git a/demos/undo/commands.cpp b/demos/undo/commands.cpp
new file mode 100644
index 0000000..4802e34
--- /dev/null
+++ b/demos/undo/commands.cpp
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "commands.h"
+
+static const int setShapeRectCommandId = 1;
+static const int setShapeColorCommandId = 2;
+
+/******************************************************************************
+** AddShapeCommand
+*/
+
+AddShapeCommand::AddShapeCommand(Document *doc, const Shape &shape, QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ m_doc = doc;
+ m_shape = shape;
+}
+
+void AddShapeCommand::undo()
+{
+ m_doc->deleteShape(m_shapeName);
+}
+
+void AddShapeCommand::redo()
+{
+ // A shape only gets a name when it is inserted into a document
+ m_shapeName = m_doc->addShape(m_shape);
+ setText(QObject::tr("Add %1").arg(m_shapeName));
+}
+
+/******************************************************************************
+** RemoveShapeCommand
+*/
+
+RemoveShapeCommand::RemoveShapeCommand(Document *doc, const QString &shapeName,
+ QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ setText(QObject::tr("Remove %1").arg(shapeName));
+ m_doc = doc;
+ m_shape = doc->shape(shapeName);
+ m_shapeName = shapeName;
+}
+
+void RemoveShapeCommand::undo()
+{
+ m_shapeName = m_doc->addShape(m_shape);
+}
+
+void RemoveShapeCommand::redo()
+{
+ m_doc->deleteShape(m_shapeName);
+}
+
+/******************************************************************************
+** SetShapeColorCommand
+*/
+
+SetShapeColorCommand::SetShapeColorCommand(Document *doc, const QString &shapeName,
+ const QColor &color, QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ setText(QObject::tr("Set %1's color").arg(shapeName));
+
+ m_doc = doc;
+ m_shapeName = shapeName;
+ m_oldColor = doc->shape(shapeName).color();
+ m_newColor = color;
+}
+
+void SetShapeColorCommand::undo()
+{
+ m_doc->setShapeColor(m_shapeName, m_oldColor);
+}
+
+void SetShapeColorCommand::redo()
+{
+ m_doc->setShapeColor(m_shapeName, m_newColor);
+}
+
+bool SetShapeColorCommand::mergeWith(const QUndoCommand *command)
+{
+ if (command->id() != setShapeColorCommandId)
+ return false;
+
+ const SetShapeColorCommand *other = static_cast<const SetShapeColorCommand*>(command);
+ if (m_shapeName != other->m_shapeName)
+ return false;
+
+ m_newColor = other->m_newColor;
+ return true;
+}
+
+int SetShapeColorCommand::id() const
+{
+ return setShapeColorCommandId;
+}
+
+/******************************************************************************
+** SetShapeRectCommand
+*/
+
+SetShapeRectCommand::SetShapeRectCommand(Document *doc, const QString &shapeName,
+ const QRect &rect, QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ setText(QObject::tr("Change %1's geometry").arg(shapeName));
+
+ m_doc = doc;
+ m_shapeName = shapeName;
+ m_oldRect = doc->shape(shapeName).rect();
+ m_newRect = rect;
+}
+
+void SetShapeRectCommand::undo()
+{
+ m_doc->setShapeRect(m_shapeName, m_oldRect);
+}
+
+void SetShapeRectCommand::redo()
+{
+ m_doc->setShapeRect(m_shapeName, m_newRect);
+}
+
+bool SetShapeRectCommand::mergeWith(const QUndoCommand *command)
+{
+ if (command->id() != setShapeRectCommandId)
+ return false;
+
+ const SetShapeRectCommand *other = static_cast<const SetShapeRectCommand*>(command);
+ if (m_shapeName != other->m_shapeName)
+ return false;
+
+ m_newRect = other->m_newRect;
+ return true;
+}
+
+int SetShapeRectCommand::id() const
+{
+ return setShapeRectCommandId;
+}
diff --git a/demos/undo/commands.h b/demos/undo/commands.h
new file mode 100644
index 0000000..f98cb6d
--- /dev/null
+++ b/demos/undo/commands.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMMANDS_H
+#define COMMANDS_H
+
+#include <QUndoCommand>
+#include "document.h"
+
+class AddShapeCommand : public QUndoCommand
+{
+public:
+ AddShapeCommand(Document *doc, const Shape &shape, QUndoCommand *parent = 0);
+ void undo();
+ void redo();
+
+private:
+ Document *m_doc;
+ Shape m_shape;
+ QString m_shapeName;
+};
+
+class RemoveShapeCommand : public QUndoCommand
+{
+public:
+ RemoveShapeCommand(Document *doc, const QString &shapeName, QUndoCommand *parent = 0);
+ void undo();
+ void redo();
+
+private:
+ Document *m_doc;
+ Shape m_shape;
+ QString m_shapeName;
+};
+
+class SetShapeColorCommand : public QUndoCommand
+{
+public:
+ SetShapeColorCommand(Document *doc, const QString &shapeName, const QColor &color,
+ QUndoCommand *parent = 0);
+
+ void undo();
+ void redo();
+
+ bool mergeWith(const QUndoCommand *command);
+ int id() const;
+
+private:
+ Document *m_doc;
+ QString m_shapeName;
+ QColor m_oldColor;
+ QColor m_newColor;
+};
+
+class SetShapeRectCommand : public QUndoCommand
+{
+public:
+ SetShapeRectCommand(Document *doc, const QString &shapeName, const QRect &rect,
+ QUndoCommand *parent = 0);
+
+ void undo();
+ void redo();
+
+ bool mergeWith(const QUndoCommand *command);
+ int id() const;
+
+private:
+ Document *m_doc;
+ QString m_shapeName;
+ QRect m_oldRect;
+ QRect m_newRect;
+};
+
+#endif // COMMANDS_H
diff --git a/demos/undo/document.cpp b/demos/undo/document.cpp
new file mode 100644
index 0000000..df435fd
--- /dev/null
+++ b/demos/undo/document.cpp
@@ -0,0 +1,445 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qevent.h>
+#include <QPainter>
+#include <QTextStream>
+#include <QUndoStack>
+#include "document.h"
+#include "commands.h"
+
+static const int resizeHandleWidth = 6;
+
+/******************************************************************************
+** Shape
+*/
+
+const QSize Shape::minSize(80, 50);
+
+Shape::Shape(Type type, const QColor &color, const QRect &rect)
+ : m_type(type), m_rect(rect), m_color(color)
+{
+}
+
+Shape::Type Shape::type() const
+{
+ return m_type;
+}
+
+QRect Shape::rect() const
+{
+ return m_rect;
+}
+
+QColor Shape::color() const
+{
+ return m_color;
+}
+
+QString Shape::name() const
+{
+ return m_name;
+}
+
+QRect Shape::resizeHandle() const
+{
+ QPoint br = m_rect.bottomRight();
+ return QRect(br - QPoint(resizeHandleWidth, resizeHandleWidth), br);
+}
+
+QString Shape::typeToString(Type type)
+{
+ QString result;
+
+ switch (type) {
+ case Rectangle:
+ result = QLatin1String("Rectangle");
+ break;
+ case Circle:
+ result = QLatin1String("Circle");
+ break;
+ case Triangle:
+ result = QLatin1String("Triangle");
+ break;
+ }
+
+ return result;
+}
+
+Shape::Type Shape::stringToType(const QString &s, bool *ok)
+{
+ if (ok != 0)
+ *ok = true;
+
+ if (s == QLatin1String("Rectangle"))
+ return Rectangle;
+ if (s == QLatin1String("Circle"))
+ return Circle;
+ if (s == QLatin1String("Triangle"))
+ return Triangle;
+
+ if (ok != 0)
+ *ok = false;
+ return Rectangle;
+}
+
+/******************************************************************************
+** Document
+*/
+
+Document::Document(QWidget *parent)
+ : QWidget(parent), m_currentIndex(-1), m_mousePressIndex(-1), m_resizeHandlePressed(false)
+{
+ m_undoStack = new QUndoStack(this);
+
+ setAutoFillBackground(true);
+ setBackgroundRole(QPalette::Base);
+
+ QPalette pal = palette();
+ pal.setBrush(QPalette::Base, QPixmap(":/icons/background.png"));
+ pal.setColor(QPalette::HighlightedText, Qt::red);
+ setPalette(pal);
+}
+
+QString Document::addShape(const Shape &shape)
+{
+ QString name = Shape::typeToString(shape.type());
+ name = uniqueName(name);
+
+ m_shapeList.append(shape);
+ m_shapeList[m_shapeList.count() - 1].m_name = name;
+ setCurrentShape(m_shapeList.count() - 1);
+
+ return name;
+}
+
+void Document::deleteShape(const QString &shapeName)
+{
+ int index = indexOf(shapeName);
+ if (index == -1)
+ return;
+
+ update(m_shapeList.at(index).rect());
+
+ m_shapeList.removeAt(index);
+
+ if (index <= m_currentIndex) {
+ m_currentIndex = -1;
+ if (index == m_shapeList.count())
+ --index;
+ setCurrentShape(index);
+ }
+}
+
+Shape Document::shape(const QString &shapeName) const
+{
+ int index = indexOf(shapeName);
+ if (index == -1)
+ return Shape();
+ return m_shapeList.at(index);
+}
+
+void Document::setShapeRect(const QString &shapeName, const QRect &rect)
+{
+ int index = indexOf(shapeName);
+ if (index == -1)
+ return;
+
+ Shape &shape = m_shapeList[index];
+
+ update(shape.rect());
+ update(rect);
+
+ shape.m_rect = rect;
+}
+
+void Document::setShapeColor(const QString &shapeName, const QColor &color)
+{
+
+ int index = indexOf(shapeName);
+ if (index == -1)
+ return;
+
+ Shape &shape = m_shapeList[index];
+ shape.m_color = color;
+
+ update(shape.rect());
+}
+
+QUndoStack *Document::undoStack() const
+{
+ return m_undoStack;
+}
+
+bool Document::load(QTextStream &stream)
+{
+ m_shapeList.clear();
+
+ while (!stream.atEnd()) {
+ QString shapeType, shapeName, colorName;
+ int left, top, width, height;
+ stream >> shapeType >> shapeName >> colorName >> left >> top >> width >> height;
+ if (stream.status() != QTextStream::Ok)
+ return false;
+ bool ok;
+ Shape::Type type = Shape::stringToType(shapeType, &ok);
+ if (!ok)
+ return false;
+ QColor color(colorName);
+ if (!color.isValid())
+ return false;
+
+ Shape shape(type);
+ shape.m_name = shapeName;
+ shape.m_color = color;
+ shape.m_rect = QRect(left, top, width, height);
+
+ m_shapeList.append(shape);
+ }
+
+ m_currentIndex = m_shapeList.isEmpty() ? -1 : 0;
+
+ return true;
+}
+
+void Document::save(QTextStream &stream)
+{
+ for (int i = 0; i < m_shapeList.count(); ++i) {
+ const Shape &shape = m_shapeList.at(i);
+ QRect r = shape.rect();
+ stream << Shape::typeToString(shape.type()) << QLatin1Char(' ')
+ << shape.name() << QLatin1Char(' ')
+ << shape.color().name() << QLatin1Char(' ')
+ << r.left() << QLatin1Char(' ')
+ << r.top() << QLatin1Char(' ')
+ << r.width() << QLatin1Char(' ')
+ << r.height();
+ if (i != m_shapeList.count() - 1)
+ stream << QLatin1Char('\n');
+ }
+ m_undoStack->setClean();
+}
+
+QString Document::fileName() const
+{
+ return m_fileName;
+}
+
+void Document::setFileName(const QString &fileName)
+{
+ m_fileName = fileName;
+}
+
+int Document::indexAt(const QPoint &pos) const
+{
+ for (int i = m_shapeList.count() - 1; i >= 0; --i) {
+ if (m_shapeList.at(i).rect().contains(pos))
+ return i;
+ }
+ return -1;
+}
+
+void Document::mousePressEvent(QMouseEvent *event)
+{
+ event->accept();
+ int index = indexAt(event->pos());;
+ if (index != -1) {
+ setCurrentShape(index);
+
+ const Shape &shape = m_shapeList.at(index);
+ m_resizeHandlePressed = shape.resizeHandle().contains(event->pos());
+
+ if (m_resizeHandlePressed)
+ m_mousePressOffset = shape.rect().bottomRight() - event->pos();
+ else
+ m_mousePressOffset = event->pos() - shape.rect().topLeft();
+ }
+ m_mousePressIndex = index;
+}
+
+void Document::mouseReleaseEvent(QMouseEvent *event)
+{
+ event->accept();
+ m_mousePressIndex = -1;
+}
+
+void Document::mouseMoveEvent(QMouseEvent *event)
+{
+ event->accept();
+
+ if (m_mousePressIndex == -1)
+ return;
+
+ const Shape &shape = m_shapeList.at(m_mousePressIndex);
+
+ QRect rect;
+ if (m_resizeHandlePressed) {
+ rect = QRect(shape.rect().topLeft(), event->pos() + m_mousePressOffset);
+ } else {
+ rect = shape.rect();
+ rect.moveTopLeft(event->pos() - m_mousePressOffset);
+ }
+
+ QSize size = rect.size().expandedTo(Shape::minSize);
+ rect.setSize(size);
+
+ m_undoStack->push(new SetShapeRectCommand(this, shape.name(), rect));
+}
+
+static QGradient gradient(const QColor &color, const QRect &rect)
+{
+ QColor c = color;
+ c.setAlpha(160);
+ QLinearGradient result(rect.topLeft(), rect.bottomRight());
+ result.setColorAt(0, c.dark(150));
+ result.setColorAt(0.5, c.light(200));
+ result.setColorAt(1, c.dark(150));
+ return result;
+}
+
+static QPolygon triangle(const QRect &rect)
+{
+ QPolygon result(3);
+ result.setPoint(0, rect.center().x(), rect.top());
+ result.setPoint(1, rect.right(), rect.bottom());
+ result.setPoint(2, rect.left(), rect.bottom());
+ return result;
+}
+
+void Document::paintEvent(QPaintEvent *event)
+{
+ QRegion paintRegion = event->region();
+ QPainter painter(this);
+ QPalette pal = palette();
+
+ for (int i = 0; i < m_shapeList.count(); ++i) {
+ const Shape &shape = m_shapeList.at(i);
+
+ if (!paintRegion.contains(shape.rect()))
+ continue;
+
+ QPen pen = pal.text().color();
+ pen.setWidth(i == m_currentIndex ? 2 : 1);
+ painter.setPen(pen);
+ painter.setBrush(gradient(shape.color(), shape.rect()));
+
+ QRect rect = shape.rect();
+ rect.adjust(1, 1, -resizeHandleWidth/2, -resizeHandleWidth/2);
+
+ // paint the shape
+ switch (shape.type()) {
+ case Shape::Rectangle:
+ painter.drawRect(rect);
+ break;
+ case Shape::Circle:
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.drawEllipse(rect);
+ painter.setRenderHint(QPainter::Antialiasing, false);
+ break;
+ case Shape::Triangle:
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.drawPolygon(triangle(rect));
+ painter.setRenderHint(QPainter::Antialiasing, false);
+ break;
+ }
+
+ // paint the resize handle
+ painter.setPen(pal.text().color());
+ painter.setBrush(Qt::white);
+ painter.drawRect(shape.resizeHandle().adjusted(0, 0, -1, -1));
+
+ // paint the shape name
+ painter.setBrush(pal.text());
+ if (shape.type() == Shape::Triangle)
+ rect.adjust(0, rect.height()/2, 0, 0);
+ painter.drawText(rect, Qt::AlignCenter, shape.name());
+ }
+}
+
+void Document::setCurrentShape(int index)
+{
+ QString currentName;
+
+ if (m_currentIndex != -1)
+ update(m_shapeList.at(m_currentIndex).rect());
+
+ m_currentIndex = index;
+
+ if (m_currentIndex != -1) {
+ const Shape &current = m_shapeList.at(m_currentIndex);
+ update(current.rect());
+ currentName = current.name();
+ }
+
+ emit currentShapeChanged(currentName);
+}
+
+int Document::indexOf(const QString &shapeName) const
+{
+ for (int i = 0; i < m_shapeList.count(); ++i) {
+ if (m_shapeList.at(i).name() == shapeName)
+ return i;
+ }
+ return -1;
+}
+
+QString Document::uniqueName(const QString &name) const
+{
+ QString unique;
+
+ for (int i = 0; ; ++i) {
+ unique = name;
+ if (i > 0)
+ unique += QString::number(i);
+ if (indexOf(unique) == -1)
+ break;
+ }
+
+ return unique;
+}
+
+QString Document::currentShapeName() const
+{
+ if (m_currentIndex == -1)
+ return QString();
+ return m_shapeList.at(m_currentIndex).name();
+}
+
diff --git a/demos/undo/document.h b/demos/undo/document.h
new file mode 100644
index 0000000..0b12ad0
--- /dev/null
+++ b/demos/undo/document.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOCUMENT_H
+#define DOCUMENT_H
+
+#include <QWidget>
+
+QT_FORWARD_DECLARE_CLASS(QUndoStack)
+QT_FORWARD_DECLARE_CLASS(QTextStream)
+
+class Shape
+{
+public:
+ enum Type { Rectangle, Circle, Triangle };
+
+ Shape(Type type = Rectangle, const QColor &color = Qt::red, const QRect &rect = QRect());
+
+ Type type() const;
+ QString name() const;
+ QRect rect() const;
+ QRect resizeHandle() const;
+ QColor color() const;
+
+ static QString typeToString(Type type);
+ static Type stringToType(const QString &s, bool *ok = 0);
+
+ static const QSize minSize;
+
+private:
+ Type m_type;
+ QRect m_rect;
+ QColor m_color;
+ QString m_name;
+
+ friend class Document;
+};
+
+class Document : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Document(QWidget *parent = 0);
+
+ QString addShape(const Shape &shape);
+ void deleteShape(const QString &shapeName);
+ Shape shape(const QString &shapeName) const;
+ QString currentShapeName() const;
+
+ void setShapeRect(const QString &shapeName, const QRect &rect);
+ void setShapeColor(const QString &shapeName, const QColor &color);
+
+ bool load(QTextStream &stream);
+ void save(QTextStream &stream);
+
+ QString fileName() const;
+ void setFileName(const QString &fileName);
+
+ QUndoStack *undoStack() const;
+
+signals:
+ void currentShapeChanged(const QString &shapeName);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+
+private:
+ void setCurrentShape(int index);
+ int indexOf(const QString &shapeName) const;
+ int indexAt(const QPoint &pos) const;
+ QString uniqueName(const QString &name) const;
+
+ QList<Shape> m_shapeList;
+ int m_currentIndex;
+ int m_mousePressIndex;
+ QPoint m_mousePressOffset;
+ bool m_resizeHandlePressed;
+ QString m_fileName;
+
+ QUndoStack *m_undoStack;
+};
+
+#endif // DOCUMENT_H
diff --git a/demos/undo/icons/background.png b/demos/undo/icons/background.png
new file mode 100644
index 0000000..3bc5ed8
--- /dev/null
+++ b/demos/undo/icons/background.png
Binary files differ
diff --git a/demos/undo/icons/blue.png b/demos/undo/icons/blue.png
new file mode 100644
index 0000000..4e181bb
--- /dev/null
+++ b/demos/undo/icons/blue.png
Binary files differ
diff --git a/demos/undo/icons/circle.png b/demos/undo/icons/circle.png
new file mode 100644
index 0000000..ed16c6e
--- /dev/null
+++ b/demos/undo/icons/circle.png
Binary files differ
diff --git a/demos/undo/icons/exit.png b/demos/undo/icons/exit.png
new file mode 100644
index 0000000..539cb2e
--- /dev/null
+++ b/demos/undo/icons/exit.png
Binary files differ
diff --git a/demos/undo/icons/fileclose.png b/demos/undo/icons/fileclose.png
new file mode 100644
index 0000000..c5483d1
--- /dev/null
+++ b/demos/undo/icons/fileclose.png
Binary files differ
diff --git a/demos/undo/icons/filenew.png b/demos/undo/icons/filenew.png
new file mode 100644
index 0000000..57e57e3
--- /dev/null
+++ b/demos/undo/icons/filenew.png
Binary files differ
diff --git a/demos/undo/icons/fileopen.png b/demos/undo/icons/fileopen.png
new file mode 100644
index 0000000..33e0d63
--- /dev/null
+++ b/demos/undo/icons/fileopen.png
Binary files differ
diff --git a/demos/undo/icons/filesave.png b/demos/undo/icons/filesave.png
new file mode 100644
index 0000000..57fd5e2
--- /dev/null
+++ b/demos/undo/icons/filesave.png
Binary files differ
diff --git a/demos/undo/icons/green.png b/demos/undo/icons/green.png
new file mode 100644
index 0000000..e2e7cc9
--- /dev/null
+++ b/demos/undo/icons/green.png
Binary files differ
diff --git a/demos/undo/icons/ok.png b/demos/undo/icons/ok.png
new file mode 100644
index 0000000..e355ea9
--- /dev/null
+++ b/demos/undo/icons/ok.png
Binary files differ
diff --git a/demos/undo/icons/rectangle.png b/demos/undo/icons/rectangle.png
new file mode 100644
index 0000000..3a7d979
--- /dev/null
+++ b/demos/undo/icons/rectangle.png
Binary files differ
diff --git a/demos/undo/icons/red.png b/demos/undo/icons/red.png
new file mode 100644
index 0000000..58c3e72
--- /dev/null
+++ b/demos/undo/icons/red.png
Binary files differ
diff --git a/demos/undo/icons/redo.png b/demos/undo/icons/redo.png
new file mode 100644
index 0000000..5591517
--- /dev/null
+++ b/demos/undo/icons/redo.png
Binary files differ
diff --git a/demos/undo/icons/remove.png b/demos/undo/icons/remove.png
new file mode 100644
index 0000000..7a7b048
--- /dev/null
+++ b/demos/undo/icons/remove.png
Binary files differ
diff --git a/demos/undo/icons/triangle.png b/demos/undo/icons/triangle.png
new file mode 100644
index 0000000..2969131
--- /dev/null
+++ b/demos/undo/icons/triangle.png
Binary files differ
diff --git a/demos/undo/icons/undo.png b/demos/undo/icons/undo.png
new file mode 100644
index 0000000..8cf63a8
--- /dev/null
+++ b/demos/undo/icons/undo.png
Binary files differ
diff --git a/demos/undo/main.cpp b/demos/undo/main.cpp
new file mode 100644
index 0000000..f36a6e8
--- /dev/null
+++ b/demos/undo/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(undo);
+
+ QApplication app(argc, argv);
+
+ MainWindow win;
+ win.resize(800, 600);
+ win.show();
+
+ return app.exec();
+};
diff --git a/demos/undo/mainwindow.cpp b/demos/undo/mainwindow.cpp
new file mode 100644
index 0000000..409fd14
--- /dev/null
+++ b/demos/undo/mainwindow.cpp
@@ -0,0 +1,446 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QUndoGroup>
+#include <QUndoStack>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QTextStream>
+#include <QToolButton>
+#include "document.h"
+#include "mainwindow.h"
+#include "commands.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupUi(this);
+
+ QWidget *w = documentTabs->widget(0);
+ documentTabs->removeTab(0);
+ delete w;
+
+ connect(actionOpen, SIGNAL(triggered()), this, SLOT(openDocument()));
+ connect(actionClose, SIGNAL(triggered()), this, SLOT(closeDocument()));
+ connect(actionNew, SIGNAL(triggered()), this, SLOT(newDocument()));
+ connect(actionSave, SIGNAL(triggered()), this, SLOT(saveDocument()));
+ connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));
+ connect(actionRed, SIGNAL(triggered()), this, SLOT(setShapeColor()));
+ connect(actionGreen, SIGNAL(triggered()), this, SLOT(setShapeColor()));
+ connect(actionBlue, SIGNAL(triggered()), this, SLOT(setShapeColor()));
+ connect(actionAddCircle, SIGNAL(triggered()), this, SLOT(addShape()));
+ connect(actionAddRectangle, SIGNAL(triggered()), this, SLOT(addShape()));
+ connect(actionAddTriangle, SIGNAL(triggered()), this, SLOT(addShape()));
+ connect(actionRemoveShape, SIGNAL(triggered()), this, SLOT(removeShape()));
+ connect(actionAddRobot, SIGNAL(triggered()), this, SLOT(addRobot()));
+ connect(actionAddSnowman, SIGNAL(triggered()), this, SLOT(addSnowman()));
+ connect(actionAbout, SIGNAL(triggered()), this, SLOT(about()));
+ connect(actionAboutQt, SIGNAL(triggered()), this, SLOT(aboutQt()));
+
+ connect(undoLimit, SIGNAL(valueChanged(int)), this, SLOT(updateActions()));
+ connect(documentTabs, SIGNAL(currentChanged(int)), this, SLOT(updateActions()));
+
+ actionOpen->setShortcut(QString("Ctrl+O"));
+ actionClose->setShortcut(QString("Ctrl+W"));
+ actionNew->setShortcut(QString("Ctrl+N"));
+ actionSave->setShortcut(QString("Ctrl+S"));
+ actionExit->setShortcut(QString("Ctrl+Q"));
+ actionRemoveShape->setShortcut(QString("Del"));
+ actionRed->setShortcut(QString("Alt+R"));
+ actionGreen->setShortcut(QString("Alt+G"));
+ actionBlue->setShortcut(QString("Alt+B"));
+ actionAddCircle->setShortcut(QString("Alt+C"));
+ actionAddRectangle->setShortcut(QString("Alt+L"));
+ actionAddTriangle->setShortcut(QString("Alt+T"));
+
+ m_undoGroup = new QUndoGroup(this);
+ undoView->setGroup(m_undoGroup);
+ undoView->setCleanIcon(QIcon(":/icons/ok.png"));
+
+ QAction *undoAction = m_undoGroup->createUndoAction(this);
+ QAction *redoAction = m_undoGroup->createRedoAction(this);
+ undoAction->setIcon(QIcon(":/icons/undo.png"));
+ redoAction->setIcon(QIcon(":/icons/redo.png"));
+ menuShape->insertAction(menuShape->actions().at(0), undoAction);
+ menuShape->insertAction(undoAction, redoAction);
+
+ toolBar->addAction(undoAction);
+ toolBar->addAction(redoAction);
+
+ newDocument();
+ updateActions();
+};
+
+void MainWindow::updateActions()
+{
+ Document *doc = currentDocument();
+ m_undoGroup->setActiveStack(doc == 0 ? 0 : doc->undoStack());
+ QString shapeName = doc == 0 ? QString() : doc->currentShapeName();
+
+ actionAddRobot->setEnabled(doc != 0);
+ actionAddSnowman->setEnabled(doc != 0);
+ actionAddCircle->setEnabled(doc != 0);
+ actionAddRectangle->setEnabled(doc != 0);
+ actionAddTriangle->setEnabled(doc != 0);
+ actionClose->setEnabled(doc != 0);
+ actionSave->setEnabled(doc != 0 && !doc->undoStack()->isClean());
+ undoLimit->setEnabled(doc != 0 && doc->undoStack()->count() == 0);
+
+ if (shapeName.isEmpty()) {
+ actionRed->setEnabled(false);
+ actionGreen->setEnabled(false);
+ actionBlue->setEnabled(false);
+ actionRemoveShape->setEnabled(false);
+ } else {
+ Shape shape = doc->shape(shapeName);
+ actionRed->setEnabled(shape.color() != Qt::red);
+ actionGreen->setEnabled(shape.color() != Qt::green);
+ actionBlue->setEnabled(shape.color() != Qt::blue);
+ actionRemoveShape->setEnabled(true);
+ }
+
+ if (doc != 0) {
+ int index = documentTabs->indexOf(doc);
+ Q_ASSERT(index != -1);
+ static const QIcon unsavedIcon(":/icons/filesave.png");
+ documentTabs->setTabIcon(index, doc->undoStack()->isClean() ? QIcon() : unsavedIcon);
+
+ if (doc->undoStack()->count() == 0)
+ doc->undoStack()->setUndoLimit(undoLimit->value());
+ }
+}
+
+void MainWindow::openDocument()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::warning(this,
+ tr("File error"),
+ tr("Failed to open\n%1").arg(fileName));
+ return;
+ }
+ QTextStream stream(&file);
+
+ Document *doc = new Document();
+ if (!doc->load(stream)) {
+ QMessageBox::warning(this,
+ tr("Parse error"),
+ tr("Failed to parse\n%1").arg(fileName));
+ delete doc;
+ return;
+ }
+
+ doc->setFileName(fileName);
+ addDocument(doc);
+}
+
+QString MainWindow::fixedWindowTitle(const Document *doc) const
+{
+ QString title = doc->fileName();
+
+ if (title.isEmpty())
+ title = tr("Unnamed");
+ else
+ title = QFileInfo(title).fileName();
+
+ QString result;
+
+ for (int i = 0; ; ++i) {
+ result = title;
+ if (i > 0)
+ result += QString::number(i);
+
+ bool unique = true;
+ for (int j = 0; j < documentTabs->count(); ++j) {
+ const QWidget *widget = documentTabs->widget(j);
+ if (widget == doc)
+ continue;
+ if (result == documentTabs->tabText(j)) {
+ unique = false;
+ break;
+ }
+ }
+
+ if (unique)
+ break;
+ }
+
+ return result;
+}
+
+void MainWindow::addDocument(Document *doc)
+{
+ if (documentTabs->indexOf(doc) != -1)
+ return;
+ m_undoGroup->addStack(doc->undoStack());
+ documentTabs->addTab(doc, fixedWindowTitle(doc));
+ connect(doc, SIGNAL(currentShapeChanged(QString)), this, SLOT(updateActions()));
+ connect(doc->undoStack(), SIGNAL(indexChanged(int)), this, SLOT(updateActions()));
+ connect(doc->undoStack(), SIGNAL(cleanChanged(bool)), this, SLOT(updateActions()));
+
+ setCurrentDocument(doc);
+}
+
+void MainWindow::setCurrentDocument(Document *doc)
+{
+ documentTabs->setCurrentWidget(doc);
+}
+
+Document *MainWindow::currentDocument() const
+{
+ return qobject_cast<Document*>(documentTabs->currentWidget());
+}
+
+void MainWindow::removeDocument(Document *doc)
+{
+ int index = documentTabs->indexOf(doc);
+ if (index == -1)
+ return;
+
+ documentTabs->removeTab(index);
+ m_undoGroup->removeStack(doc->undoStack());
+ disconnect(doc, SIGNAL(currentShapeChanged(QString)), this, SLOT(updateActions()));
+ disconnect(doc->undoStack(), SIGNAL(indexChanged(int)), this, SLOT(updateActions()));
+ disconnect(doc->undoStack(), SIGNAL(cleanChanged(bool)), this, SLOT(updateActions()));
+
+ if (documentTabs->count() == 0) {
+ newDocument();
+ updateActions();
+ }
+}
+
+void MainWindow::saveDocument()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ for (;;) {
+ QString fileName = doc->fileName();
+
+ if (fileName.isEmpty())
+ fileName = QFileDialog::getSaveFileName(this);
+ if (fileName.isEmpty())
+ break;
+
+ QFile file(fileName);
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::warning(this,
+ tr("File error"),
+ tr("Failed to open\n%1").arg(fileName));
+ doc->setFileName(QString());
+ } else {
+ QTextStream stream(&file);
+ doc->save(stream);
+ doc->setFileName(fileName);
+
+ int index = documentTabs->indexOf(doc);
+ Q_ASSERT(index != -1);
+ documentTabs->setTabText(index, fixedWindowTitle(doc));
+
+ break;
+ }
+ }
+}
+
+void MainWindow::closeDocument()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ if (!doc->undoStack()->isClean()) {
+ int button
+ = QMessageBox::warning(this,
+ tr("Unsaved changes"),
+ tr("Would you like to save this document?"),
+ QMessageBox::Yes, QMessageBox::No);
+ if (button == QMessageBox::Yes)
+ saveDocument();
+ }
+
+ removeDocument(doc);
+ delete doc;
+}
+
+void MainWindow::newDocument()
+{
+ addDocument(new Document());
+}
+
+static QColor randomColor()
+{
+ int r = (int) (3.0*(rand()/(RAND_MAX + 1.0)));
+ switch (r) {
+ case 0:
+ return Qt::red;
+ case 1:
+ return Qt::green;
+ default:
+ break;
+ }
+ return Qt::blue;
+}
+
+static QRect randomRect(const QSize &s)
+{
+ QSize min = Shape::minSize;
+
+ int left = (int) ((0.0 + s.width() - min.width())*(rand()/(RAND_MAX + 1.0)));
+ int top = (int) ((0.0 + s.height() - min.height())*(rand()/(RAND_MAX + 1.0)));
+ int width = (int) ((0.0 + s.width() - left - min.width())*(rand()/(RAND_MAX + 1.0))) + min.width();
+ int height = (int) ((0.0 + s.height() - top - min.height())*(rand()/(RAND_MAX + 1.0))) + min.height();
+
+ return QRect(left, top, width, height);
+}
+
+void MainWindow::addShape()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ Shape::Type type;
+
+ if (sender() == actionAddCircle)
+ type = Shape::Circle;
+ else if (sender() == actionAddRectangle)
+ type = Shape::Rectangle;
+ else if (sender() == actionAddTriangle)
+ type = Shape::Triangle;
+ else return;
+
+ Shape newShape(type, randomColor(), randomRect(doc->size()));
+ doc->undoStack()->push(new AddShapeCommand(doc, newShape));
+}
+
+void MainWindow::removeShape()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ QString shapeName = doc->currentShapeName();
+ if (shapeName.isEmpty())
+ return;
+
+ doc->undoStack()->push(new RemoveShapeCommand(doc, shapeName));
+}
+
+void MainWindow::setShapeColor()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ QString shapeName = doc->currentShapeName();
+ if (shapeName.isEmpty())
+ return;
+
+ QColor color;
+
+ if (sender() == actionRed)
+ color = Qt::red;
+ else if (sender() == actionGreen)
+ color = Qt::green;
+ else if (sender() == actionBlue)
+ color = Qt::blue;
+ else
+ return;
+
+ if (color == doc->shape(shapeName).color())
+ return;
+
+ doc->undoStack()->push(new SetShapeColorCommand(doc, shapeName, color));
+}
+
+void MainWindow::addSnowman()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ // Create a macro command using beginMacro() and endMacro()
+
+ doc->undoStack()->beginMacro(tr("Add snowman"));
+ doc->undoStack()->push(new AddShapeCommand(doc,
+ Shape(Shape::Circle, Qt::blue, QRect(51, 30, 97, 95))));
+ doc->undoStack()->push(new AddShapeCommand(doc,
+ Shape(Shape::Circle, Qt::blue, QRect(27, 123, 150, 133))));
+ doc->undoStack()->push(new AddShapeCommand(doc,
+ Shape(Shape::Circle, Qt::blue, QRect(11, 253, 188, 146))));
+ doc->undoStack()->endMacro();
+}
+
+void MainWindow::addRobot()
+{
+ Document *doc = currentDocument();
+ if (doc == 0)
+ return;
+
+ // Compose a macro command by explicitly adding children to a parent command
+
+ QUndoCommand *parent = new QUndoCommand(tr("Add robot"));
+
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(115, 15, 81, 70)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(82, 89, 148, 188)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(76, 280, 80, 165)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(163, 280, 80, 164)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Circle, Qt::blue, QRect(116, 25, 80, 50)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(232, 92, 80, 127)), parent);
+ new AddShapeCommand(doc, Shape(Shape::Rectangle, Qt::green, QRect(2, 92, 80, 125)), parent);
+
+ doc->undoStack()->push(parent);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Undo"), tr("The Undo demonstration shows how to use the Qt Undo framework."));
+}
+
+void MainWindow::aboutQt()
+{
+ QMessageBox::aboutQt(this, tr("About Qt"));
+}
diff --git a/demos/undo/mainwindow.h b/demos/undo/mainwindow.h
new file mode 100644
index 0000000..5340e94
--- /dev/null
+++ b/demos/undo/mainwindow.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "ui_mainwindow.h"
+
+class Document;
+
+class MainWindow : public QMainWindow, public Ui::MainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+ void addDocument(Document *doc);
+ void removeDocument(Document *doc);
+ void setCurrentDocument(Document *doc);
+ Document *currentDocument() const;
+
+public slots:
+ void openDocument();
+ void saveDocument();
+ void closeDocument();
+ void newDocument();
+
+ void addShape();
+ void removeShape();
+ void setShapeColor();
+
+ void addSnowman();
+ void addRobot();
+
+ void about();
+ void aboutQt();
+
+private slots:
+ void updateActions();
+
+private:
+ QUndoGroup *m_undoGroup;
+
+ QString fixedWindowTitle(const Document *doc) const;
+};
+
+#endif // MAINWINDOW_H
diff --git a/demos/undo/mainwindow.ui b/demos/undo/mainwindow.ui
new file mode 100644
index 0000000..91a0b43
--- /dev/null
+++ b/demos/undo/mainwindow.ui
@@ -0,0 +1,322 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>567</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTabWidget" name="documentTabs" >
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Tab 1</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>567</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>File</string>
+ </property>
+ <addaction name="actionNew" />
+ <addaction name="actionOpen" />
+ <addaction name="actionSave" />
+ <addaction name="actionClose" />
+ <addaction name="separator" />
+ <addaction name="actionExit" />
+ </widget>
+ <widget class="QMenu" name="menuShape" >
+ <property name="title" >
+ <string>Edit</string>
+ </property>
+ <widget class="QMenu" name="menuMacros" >
+ <property name="title" >
+ <string>Macros</string>
+ </property>
+ <addaction name="actionAddRobot" />
+ <addaction name="actionAddSnowman" />
+ </widget>
+ <addaction name="separator" />
+ <addaction name="actionAddCircle" />
+ <addaction name="actionAddRectangle" />
+ <addaction name="actionAddTriangle" />
+ <addaction name="actionRemoveShape" />
+ <addaction name="separator" />
+ <addaction name="actionRed" />
+ <addaction name="actionGreen" />
+ <addaction name="actionBlue" />
+ <addaction name="separator" />
+ <addaction name="menuMacros" />
+ </widget>
+ <widget class="QMenu" name="menuHelp" >
+ <property name="title" >
+ <string>Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ <addaction name="actionAboutQt" />
+ </widget>
+ <addaction name="menuFile" />
+ <addaction name="menuShape" />
+ <addaction name="menuHelp" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <widget class="QToolBar" name="toolBar" >
+ <property name="windowTitle" >
+ <string>File actions</string>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak" >
+ <bool>false</bool>
+ </attribute>
+ <addaction name="actionNew" />
+ <addaction name="actionOpen" />
+ <addaction name="actionSave" />
+ <addaction name="actionClose" />
+ <addaction name="separator" />
+ </widget>
+ <widget class="QToolBar" name="shapeToolBar" >
+ <property name="windowTitle" >
+ <string>Shape actions</string>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <enum>LeftToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak" >
+ <bool>false</bool>
+ </attribute>
+ <addaction name="actionAddRectangle" />
+ <addaction name="actionAddCircle" />
+ <addaction name="actionAddTriangle" />
+ <addaction name="actionRemoveShape" />
+ <addaction name="separator" />
+ <addaction name="actionRed" />
+ <addaction name="actionGreen" />
+ <addaction name="actionBlue" />
+ </widget>
+ <widget class="QDockWidget" name="dockWidget" >
+ <property name="windowTitle" >
+ <string>Undo Stack</string>
+ </property>
+ <attribute name="dockWidgetArea" >
+ <number>2</number>
+ </attribute>
+ <widget class="QWidget" name="dockWidgetContents" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>4</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Undo limit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="undoLimit" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QUndoView" name="undoView" >
+ <property name="alternatingRowColors" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <action name="actionOpen" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/fileopen.png</iconset>
+ </property>
+ <property name="text" >
+ <string>&amp;Open</string>
+ </property>
+ </action>
+ <action name="actionClose" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/fileclose.png</iconset>
+ </property>
+ <property name="text" >
+ <string>&amp;Close</string>
+ </property>
+ </action>
+ <action name="actionNew" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/filenew.png</iconset>
+ </property>
+ <property name="text" >
+ <string>&amp;New</string>
+ </property>
+ </action>
+ <action name="actionSave" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/filesave.png</iconset>
+ </property>
+ <property name="text" >
+ <string>&amp;Save</string>
+ </property>
+ </action>
+ <action name="actionExit" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/exit.png</iconset>
+ </property>
+ <property name="text" >
+ <string>E&amp;xit</string>
+ </property>
+ </action>
+ <action name="actionRed" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/red.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Red</string>
+ </property>
+ </action>
+ <action name="actionGreen" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/green.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Green</string>
+ </property>
+ </action>
+ <action name="actionBlue" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/blue.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Blue</string>
+ </property>
+ </action>
+ <action name="actionAddRectangle" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/rectangle.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Add Rectangle</string>
+ </property>
+ </action>
+ <action name="actionAddCircle" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/circle.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Add Circle</string>
+ </property>
+ </action>
+ <action name="actionRemoveShape" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/remove.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Remove Shape</string>
+ </property>
+ </action>
+ <action name="actionAddRobot" >
+ <property name="text" >
+ <string>Add robot</string>
+ </property>
+ </action>
+ <action name="actionAddSnowman" >
+ <property name="text" >
+ <string>Add snowan</string>
+ </property>
+ </action>
+ <action name="actionAddTriangle" >
+ <property name="icon" >
+ <iconset resource="undo.qrc" >:/icons/triangle.png</iconset>
+ </property>
+ <property name="text" >
+ <string>addTriangle</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="text" >
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="text" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QUndoView</class>
+ <extends>QListView</extends>
+ <header>qundoview.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
+ <include location="undo.qrc" />
+ </resources>
+ <connections/>
+</ui>
diff --git a/demos/undo/undo.pro b/demos/undo/undo.pro
new file mode 100644
index 0000000..e26d07c
--- /dev/null
+++ b/demos/undo/undo.pro
@@ -0,0 +1,17 @@
+SOURCES += main.cpp mainwindow.cpp commands.cpp document.cpp
+HEADERS += mainwindow.h commands.h document.h
+FORMS += mainwindow.ui
+
+build_all:!build_pass {
+ CONFIG -= build_all
+ CONFIG += release
+}
+
+RESOURCES += undo.qrc
+
+# install
+target.path = $$[QT_INSTALL_DEMOS]/undo
+sources.files = $$SOURCES $$HEADERS *.pro icons $$RESOURCES $$FORMS
+sources.path = $$[QT_INSTALL_DEMOS]/undo
+INSTALLS += target sources
+
diff --git a/demos/undo/undo.qrc b/demos/undo/undo.qrc
new file mode 100644
index 0000000..65619b8
--- /dev/null
+++ b/demos/undo/undo.qrc
@@ -0,0 +1,20 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>icons/background.png</file>
+ <file>icons/blue.png</file>
+ <file>icons/circle.png</file>
+ <file>icons/exit.png</file>
+ <file>icons/fileclose.png</file>
+ <file>icons/filenew.png</file>
+ <file>icons/fileopen.png</file>
+ <file>icons/filesave.png</file>
+ <file>icons/green.png</file>
+ <file>icons/ok.png</file>
+ <file>icons/rectangle.png</file>
+ <file>icons/red.png</file>
+ <file>icons/redo.png</file>
+ <file>icons/remove.png</file>
+ <file>icons/triangle.png</file>
+ <file>icons/undo.png</file>
+ </qresource>
+</RCC>
diff --git a/dist/README b/dist/README
new file mode 100644
index 0000000..110be1c
--- /dev/null
+++ b/dist/README
@@ -0,0 +1,134 @@
+This is Qt version %VERSION%.
+
+Qt is a comprehensive cross-platform C++ application framework. Qt 4
+introduces new features and many improvements over the 3.x series. See
+http://doc.trolltech.com/latest/qt4-intro.html for details.
+
+The Qt 4.x series is not binary compatible or source compatible with
+the 3.x series. For more information on porting from Qt 3 to Qt 4, see
+http://doc.trolltech.com/latest/porting4.html.
+
+
+INSTALLING Qt
+
+On Windows and Mac OS X, if you want to install the precompiled binary
+packages, simply launch the package and follow the instructions in the
+installation wizard.
+
+On Mac OS X, the binary package requires Mac OS X 10.4.x (Tiger) or
+later and GCC 4.0.1 to develop applications. Its applications will run
+on Mac OS X 10.3.9 and above.
+
+If you have a source package (a .tar.gz, .tar.bz2, or .zip file),
+follow the instructions in the INSTALL file.
+
+
+DEMOS AND EXAMPLES
+
+Once Qt is installed, we suggest that you take a look at the demos and
+examples to see Qt in action. Run the Qt Examples and Demos either by
+typing 'qtdemo' on the command line or through the desktop's Start
+menu. On Mac OS X, you can find it in /Developers/Applications/Qt.
+
+
+REFERENCE DOCUMENTATION
+
+The Qt reference documentation is available locally in Qt's doc/html
+directory. You can use Qt Assistant to view it; to launch Assistant,
+type 'assistant' on the command line or use the Start menu. On Mac OS
+X, you can find it in /Developer/Applications/Qt. The latest
+documentation is available at http://doc.trolltech.com/.
+
+
+SUPPORTED PLATFORMS
+
+For this release, the following platforms have been tested:
+
+ win32-g++ (mingw)
+ win32-msvc
+ win32-msvc2003
+ win32-msvc2005
+ win32-msvc2008
+
+ aix-xlc
+ aix-xlc-64
+ hpux-acc
+ hpux-acc-64
+ hpux-acc-o64
+ hpux-g++
+ hpux-g++-64
+ hpuxi-acc-32
+ hpuxi-acc-64
+ linux-g++
+ linux-icc
+ linux-icc-32
+ linux-icc-64
+ solaris-cc
+ solaris-cc-64
+ solaris-g++
+ solaris-g++-64
+
+ macx-g++
+ macx-g++42
+
+ qws/linux-x86-g++
+ qws/linux-arm-g++
+
+ wince50standard-armv4i-msvc2005
+ wince50standard-armv4i-msvc2008
+ wince50standard-mipsii-msvc2005
+ wince50standard-mipsii-msvc2008
+ wince50standard-x86-msvc2005
+ wince50standard-x86-msvc2008
+ wincewm50pocket-msvc2005
+ wincewm50pocket-msvc2008
+ wincewm50smart-msvc2005
+ wincewm50smart-msvc2008
+ wincewm60professional-msvc2005
+ wincewm60professional-msvc2008
+ wincewm60standard-msvc2005
+ wincewm60standard-msvc2008
+
+For a complete list of supported platforms, see
+http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/
+
+For a description of Qt's platform support policy, see
+http://www.qtsoftware.com/support-services/support/platform-support-policy
+
+
+COMMERCIAL EDITIONS
+
+Desktop Edition licensees can use all the modules provided with their
+Qt package.
+
+GUI Framework licensees may only use the classes contained in
+the QtCore, QtGui (except QGraphicsView), QtTest, QtDBus and
+Qt3Support modules.
+
+For a full listing of the contents of each module, please refer to
+http://doc.trolltech.com/4.4/modules.html.
+
+
+HOW TO REPORT A BUG
+
+If you think you have found a bug in Qt, we would like to hear about
+it so that we can fix it. Before reporting a bug, please check
+http://qtsoftware.com/developer/faqs/ and
+http://qtsoftware.com/products/appdev/platform/platforms/ to see if the to see if
+the issue is already known.
+
+Always include the following information in your bug report: the name
+and version number of your compiler; the name and version number of
+your operating system; the version of Qt you are using, and what
+configure options it was compiled with.
+
+If the problem you are reporting is only visible at run-time, try to
+create a small test program that shows the problem when run. Often,
+such a program can be created with some minor changes to one of the
+many example programs in Qt's examples directory. Please submit the
+bug report using the Task Tracker on the Trolltech website:
+
+http://qtsoftware.com/developer/task-tracker
+
+
+Qt is a trademark of Nokia Corporation and/or its subsidiary(-ies).
diff --git a/dist/changes-0.92 b/dist/changes-0.92
new file mode 100644
index 0000000..1226d65
--- /dev/null
+++ b/dist/changes-0.92
@@ -0,0 +1,101 @@
+Here is a list of changes in Qt from 0.91 to 0.92. Also look out
+for a few new classes; QPrinter, QFileDialog, QDir and QFileInfo.
+
+
+QApplication:
+-------------
+ Use setMainWidget( x ), not exec( x ).
+
+QString:
+--------
+ upper(), lower(), stripWhiteSpace() and simplifyWhiteSpace() etc.
+ do NOT modify the string, instead they return a new string.
+
+QList and QVector:
+------------------
+ Changed argument in QList::toVector() from reference to pointer
+ Changed argument in QVector::toList() from reference to pointer
+ Removed QVector::apply()
+ Removed QList::apply()
+
+QPainter:
+---------
+ pen(), brush() and font() no longer returns references.
+ You cannot do this any longer:
+ QPainter p;
+ ...
+ p.pen().setColor( red );
+ p.brush().setStyle( NoBrush );
+ Instead, set a new pen or brush:
+ p.setPen( red );
+ p.setBrush( NoBrush );
+ This enables us to do better optimization, particularly for complex
+ programs.
+
+QFile, QFileInfo (new):
+-----------------------
+ Removed QFile::setFileName,
+ QFile::isRegular => QFileInfo::isFile
+ QFile::isDirectory => QFileInfo::isDir
+ QFile::isSymLink => QFileInfo::isSymLink
+
+Q2DMatrix/QWMatrix:
+---------
+ Q2DMatrix has been replaced with QWMatrix (qwmatrix.h)
+
+QPixmap:
+--------
+ enableImageCache() renamed to setOptimization().
+ Optimization is now default ON. See doc for other optimization functions.
+
+QImage:
+-------
+ scanline() => scanLine()
+
+QLineEdit/QLCDNumber:
+---------------------
+ signal textChanged( char * ) => textChanged( const char * );
+ slot display( char * ) => display( const char * )
+
+QCursor:
+--------
+ hourGlassCursor => waitCursor
+
+QButton and friends:
+--------------------
+ QIconButton removed, setPixmap() added to QButton to replace QIconButton
+
+QTableWidget:
+-------------
+ Renamed to QTableView (qtablevw.h)
+ Using int to identify rows and columns, not long.
+
+QRangeControl:
+--------------
+ Using int values, not long.
+
+QScrollBar:
+-----------
+ Using int values, not long.
+
+QListBox:
+---------
+ removed setStrList(), use clear(); insertStrList( ... , 0 ); instead
+
+QColor:
+-------
+ setRGB => setRgb
+ getRGB => rgb
+ setHSV => setHsv
+ getHSV => hsv
+
+QFontMetrics and QFontInfo:
+---------------------------
+ Get font metrics from QWidget::fontMetrics() and QPainter::fontMetrics().
+ Get font info from QWidget::fontInfo() and QPainter::fontInfo().
+ The QFontMetrics(QFont) constructor no longer works.
+ We had to do these changes to support printing and Windows.
+
+
+There are more changes, left out because we consider them minor and
+uninteresting or because we forgot to mention them. :)
diff --git a/dist/changes-0.93 b/dist/changes-0.93
new file mode 100644
index 0000000..892395b
--- /dev/null
+++ b/dist/changes-0.93
@@ -0,0 +1,74 @@
+Here is a list of (major) changes in Qt from 0.92 to 0.93.
+
+Bug-fixes, optimizations and much improved documentation, of course.
+
+There are not many changes in the API interface.
+Here's a list of the most important changes.
+
+
+QApplication:
+-------
+ setCursor(), restoreCursor() now uses a stack of cursors.
+ quit() is now a slot.
+ exit() replaces the old static quit() function.
+
+
+QColor:
+-------
+ New constructor that makes you set an RGB or HSV color directly,
+ like this: QColor(320, 255, 240, QColor::Hsv)
+
+
+QObject:
+--------
+ Has now a timerEvent(), which was moved from QWidget.
+ Compatible with old code.
+
+
+QPainter:
+---------
+ GC caching (internal optimization) makes drawing very fast.
+
+ drawShade* obsolete, moved to qdrawutl.h and renamed to qDrawShade*
+ - These are now global functions that take QPainter * and QColorGroup
+ - Added qDrawWinPanel and qDrawWinButton for Windows 95 look
+ - Added qDrawPlainRect
+
+
+QPixmap:
+-------
+ New fill() function that fills the pixmap with the background color
+ OR background pixmap of a widget.
+
+
+QRect:
+------
+ fixup() renamed to normalize(), returns a new QRect.
+
+
+QWidget:
+-------
+ New function setCaption(), setIcon() and setIconText(), moved from QWindow.
+
+
+New classes:
+------------
+ QSocketNotifier, makes it possible to write async socket code.
+
+
+New global functions:
+---------------------
+ qInstallMsgHandler() and qRound(), in qglobal.h.
+
+
+moc:
+----
+ Supports templates.
+
+
+Documentation:
+--------------
+ A tutorial.
+ Template classes (QArray, QList etc.) are documented.
+ Many more links in the examples.
+ Postscript documentation (around 400 pages).
diff --git a/dist/changes-0.94 b/dist/changes-0.94
new file mode 100644
index 0000000..5353e12
--- /dev/null
+++ b/dist/changes-0.94
@@ -0,0 +1,33 @@
+Here is a list of (major) changes in Qt from 0.93 to 0.94.
+
+Bug-fixes, optimizations and much improved documentation, of course.
+
+There are not many changes in the API interface.
+
+
+QTextStream:
+------------
+ eos() renamed to eof() for iostream compatibility.
+ operator>> for double, float, char*, QString are implemented
+ get() and getline() added.
+
+
+QDataStream:
+------------
+ eos() renamed to eof() for iostream compatibility.
+
+
+QPixmap:
+--------
+ Support for transparency: setMask(QBitmap) and bitBlt.
+
+
+QImage:
+-------
+ Scanline data is aligned on a 32 bit boundary (it used to be 8
+ bits). Conversion to and from QPixmap is now faster.
+
+
+Documentation:
+--------------
+ More documentation fixes.
diff --git a/dist/changes-0.95 b/dist/changes-0.95
new file mode 100644
index 0000000..205a476
--- /dev/null
+++ b/dist/changes-0.95
@@ -0,0 +1,54 @@
+Here is a list of (major) changes in Qt from 0.93 to 0.95.
+
+Bug-fixes, optimizations and much improved documentation, of course.
+
+There are few changes in the API (Qt header files).
+
+
+QPixmap:
+--------
+ Can draw transparent pixmaps. Call QPixmap::setMask(QBitmap) to
+ set a mask.
+
+
+QPainter:
+---------
+ Unified transformation. setWindow() and setViewport() now use
+ the same code as setWorldXForm() etc.
+ Internal xform routines have been optimized.
+
+
+QButton:
+--------
+ isUp() is obsolete, use !isDown() instead.
+ isOff() is obsolete, use !isOn() instead.
+ switchOn() is obsolete, use setOn(TRUE) instead.
+ switchOff() is obsolete, use setOn(FALSE) instead.
+
+
+QPushButton:
+------------
+ A push button can now be a toggle button.
+
+
+QWidget:
+--------
+ isActive() was never used and is now obsolete.
+
+
+QTextStream:
+------------
+ eos() renamed to eof() for iostream compatibility.
+ operator>> for double, float, char*, QString are implemented
+ get() and getline() added.
+
+
+QDataStream:
+------------
+ eos() renamed to eof() for iostream compatibility.
+
+
+QImage:
+-------
+ Scanline data is aligned on a 32 bit boundary (it used to be 8
+ bits). Conversion to and from QPixmap is now faster.
diff --git a/dist/changes-0.96 b/dist/changes-0.96
new file mode 100644
index 0000000..52555d1
--- /dev/null
+++ b/dist/changes-0.96
@@ -0,0 +1,263 @@
+Here is a list of (major) changes in Qt from 0.95 to 0.96.
+
+Bug-fixes, optimizations and improved documentation, of course.
+QClipboard is new.
+
+There are some changes in the API (Qt header files). Some functions have
+been renamed or the arguments have changed. The old versions of these
+functions have been obsoleted. A call to an obsoleted function will by
+default generate a runtime warning the first time it is called, but it
+will be executed correctly. If you really need to ship code fast, you can
+turn off the runtime obsolescence warnings by calling
+qSuppressObsoleteWarnings().
+
+Obsoleted functions will disappear in a future release. To get
+compile-time errors for each use of an obsoleted function, compile your
+code with -DTEST_OBSOLETE. You should recompile without this option when
+you have upgraded your code (otherwise, you may get linking errors).
+Note: it is probably not a good idea to compile the Qt library with
+-DTEST_OBSOLETE, it may cause problems if you try to link or run
+programs that use obsoleted functions.
+
+For new users: obsoleted functions are no longer documented, in fact they
+are not even visible in the documentation.
+
+*************** Changes that might affect runtime behavior *****************
+
+QFileInfo:
+----------
+ size() returns uint(previousy int), 0 if the size cannot be fetched (was -1).
+ Use isFile() to check.
+
+
+QPopupMenu
+------------
+ When a popup menu is a submenu (directly or as a subsub...menu) of a
+ menu bar(QMenuBar), the menu bar will now always emit the activated() or
+ highlighted() signal when a submenu emits these signals. This fix might
+ have undesired effects if you previously have worked around it by
+ connecting to signals both in menu bar and its submenus.
+
+*************** Changes that might generate compile errors *****************
+************** when compiling old code *****************
+
+QDataStream:
+-----------
+ Serialization of int and uint is no longer supported. Use INT32 and
+ UINT32 instead. This had to be changed in order to run Qt on 64-bit
+ architectures.
+
+
+QImage:
+-------
+ 24-bpp pixel format no longer supported, use 32-bpp instead.
+
+ This means that you have to use uint* instead of uchar* when accessing
+ pixel values. You cannot use the uchar* pointer directly, because the
+ pixel format depends on the byte order on the underlying platform. Use
+ qRgb() and friends (qcolor.h) to access the pixels.
+
+
+QWidget:
+--------
+ setMouseTracking() does not return bool. Call hasMouseTracking() to
+ determine the mouse tracking state. (This only affects code that
+ actually uses the return value.)
+
+ (There are other changes in QWidget, see below)
+
+
+*************** Type changes that might generate warnings: *****************
+
+
+QCache/QIntCache:
+-----------------
+ Using int/uint instead of long/ulong.
+
+
+QDate/QTime/QDateTime:
+----------------------
+ Using int/uint instead of long/ulong (MS-DOS required long).
+
+
+QIODevice/QBuffer/QFile:
+------------------------
+ Using int/uint instead of long/ulong.
+
+
+QKeyEvent:
+----------
+ ascii() now returns int (previously uchar).
+
+
+QTableView:
+------------
+ uint used instead of ulong (tableFlags() etc.)
+
+
+QTextStream:
+------------
+ int used instead of long (flags() etc.)
+
+
+***************** Obsoleted functions **********************
+
+QAccel:
+-------
+ enable(), disable() and isDisabled() are obsolete.
+ Use setEnabled(TRUE/FALSE) and !isEnabled() instead.
+ isItemDisabled(), enableItem(), disableItem() are obsolete.
+ Use !isItemEnabled(), setItemEnabled(TRUE/FALSE) instead.
+
+
+QApplication:
+-------------
+ cursor(), setCursor() and restoreCursor() obsoleted.
+ Use overrideCursor(), setOverrideCursor() and restoreOverrideCursor()
+ instead.
+
+
+QBitmap:
+--------
+ Constructor takes "const uchar *bits" instead of "const char *"
+ because of sign problems (uchar = unsigned char). Old constructors are
+ obsolete.
+
+
+QButton:
+--------
+ toggleButton() is obsolete, renamed to isToggleButton().
+
+
+QColor:
+-------
+ The functions QRED, QGREEN, QBLUE, QRGB, QGRAY obsolete.
+ Instead, use qRed, qGreen, qBlue, qRgb, qGray.
+
+
+QComboBox:
+----------
+ setStrList() obsolete, use clear() + insertStrList() instead.
+ string() obsolete, use text() instead.
+
+
+QLCDNumber:
+----------
+ longValue() is obsolete, use intValue() instead.
+
+
+QListbox:
+---------
+ The macro LBI_String is obsolete, use LBI_text instead.
+ string() obsolete, use text() instead.
+ stringCopy() and setStringCopy() are obsolete.
+
+
+QMenuData:
+----------
+ string() obsolete, use text() instead.
+ isItemDisabled(), enableItem(), disableItem() are obsolete.
+ Use !isItemEnabled(), setItemEnabled(TRUE/FALSE) instead.
+ checkItem() and uncheckItem() are obsolete.
+ Use setItemChecked(TRUE/FALSE) instead.
+
+
+QPainter:
+---------
+
+ drawBezier() is obsolete, general Bezier curves are rarely used and
+ cost too much. Qt will only support drawQuadBezier() (four-point
+ Bezier) in the future.
+
+QPointArray:
+-----------
+ move() is obsolete, use translate() instead.
+ bezier() is obsolete, general Bezier curves are rarely used and
+ cost too much. Qt will only support quadBezier() (four-point
+ Bezier) in the future.
+
+
+
+QRect:
+------
+ move() is obsolete, use moveBy() instead.
+ setTopLeft(), setTopRight(), setBottomLeft(), setBottomRight() and
+ setCenter() is obsolete, use moveTopLeft(), moveTopRight(),
+ moveBottomLeft(), moveBottomRight() and moveCenter() instead.
+
+
+QRegion:
+-------
+ move() is obsolete, use translate() instead.
+
+
+QSocketNotifier:
+----------------
+ enabled() is obsolete. Use isEnabled() instead.
+
+
+QWidget:
+--------
+ enable(), disable() and isDisabled() are obsolete.
+ Use setEnabled(TRUE/FALSE) and !isEnabled() instead.
+
+ setMinimumSize(), setMaximumSize(), minimumSize(), maximumSize() are obsolete
+ use setMinSize(), setMaxSize(), minSize(), maxSize() instead.
+
+ enableUpdates() obsolete, use isUpdatesEnabled()/setUpdatesEnabled().
+
+ id() is obsolete, it has been renamed to winId().
+
+***************** All other changes from 0.95 to 0.96 **********************
+
+moc
+----------
+ Gives a warning if no output is generated.
+
+
+qglobal.h:
+----------
+ INT32 and UINT32 typedefs changed to work with DEC Alpha.
+
+
+QApplication:
+-------------
+ clipboard() is new.
+
+
+QButtonGroup:
+-------------
+ Exclusive group setting added (isExclusive and setExclusive).
+ find() is new.
+
+
+QColor:
+-------
+ New type QRgb (uint), used for RGB triplet.
+
+
+QLineEdit:
+----------
+ You can now mark text, and copy and paste to/from the clipboard.
+
+
+QPaintDevice:
+---------
+ The bitblt function now takes an ignoreMask parameter. It has a default
+ value, so no old code will be broken.
+
+QPrinter:
+------------
+ fixed minor bugs in handling of polygons and beziers.
+
+
+QWidget:
+--------
+ New protected virtual functions styleChange(), backgroundColorChange(),
+ backgroundPixmapChange(), paletteChange() and fontChange().
+ These functions are called from setStyle(), setBackgroundColor() etc.
+ You can reimplement them to if you need to know when widget properties
+ changed and to optimize updates.
+
+ The destroyed() signal has been moved to QObject.
+
diff --git a/dist/changes-0.98 b/dist/changes-0.98
new file mode 100644
index 0000000..a36abeb
--- /dev/null
+++ b/dist/changes-0.98
@@ -0,0 +1,98 @@
+Here is a list of (major) changes in Qt from 0.96 to 0.98.
+As usual, we fixed some bugs and improved the documentation.
+
+
+*************** Changes that might affect runtime behavior *****************
+
+QWidget:
+--------
+ setMinimumSize() and setMaximumSize() now force the widget to
+ a legal size. resize() and setGeometry() obey the widget's
+ minimum/maximum size.
+
+ The default behaviour of QWidget::closeEvent is now to hide the widget,
+ not to delete it as before (which was potentially dangerous). This means
+ that if you have a top level widget and the user closes it via the close
+ box, it will now hide itself if you have not reimplemented closeEvent().
+ See the QWidget::closeEvent() and QCloseEvent documentation for details.
+
+ (There are other changes in QWidget, see below)
+
+
+*************** Changes that might generate compile errors *****************
+************** when compiling old code *****************
+
+Disabled copy constructors and operators=
+-----------------------------------------
+ Copy constructors and operators= are disabled in the classes that cannot
+ be copied (this includes all classes that inherit from QObject). This
+ will let the compiler find bugs in your code, you'll get compile time
+ errors where you most probably would have gotten core dumps before.
+ This change has been done in the following classes:
+
+ QAccel QApplication QBuffer QButton QButtonGroup QCheckBox QClipboard
+ QComboBox QConnection QDataStream QDialog QFile QFileDialog QFrame
+ QGroupBox QIODevice QImageIO QLCDNumber QLabel QLineEdit QListBox
+ QMenuBar QMenuData QMenuItem QMessageBox QMetaObject QObject
+ QPSPrinter QPaintDevice QPainter QPicture QPopupMenu QPrintDialog
+ QPrinter QPushButton QRadioButton QRangeControl QScrollBar QSignal
+ QSocketNotifier QTableView QTextStream QTimer QWidget QWindow
+
+ The other classes all have sensible copy constructors and operators=.
+
+QDate:
+------
+ These were protected, now private:
+ static const char *monthNames[];
+ static const char *weekdayNames[];
+ uint jd;
+
+QListBox:
+---------
+ The internals of QListBox are completely reworked. Definition of custom
+ QListBoxItems is now much easier. This is *not* compatible with the old
+ way of defining custom QLBItems. See the QListBoxItem documentation for
+ details.
+
+QTime:
+------
+ This was protected, now private:
+ uint ds;
+
+*************** Type changes that might generate warnings: *****************
+
+none
+
+***************** Obsoleted functions **********************
+
+none
+
+***************** All other changes from 0.96 to 0.98 **********************
+
+moc:
+----
+ Moc previously gave a syntax error when the word "class" was found
+ in a string outside a class declaration. This bug has now been
+ fixed.
+
+ More moc arguments, check the manpage for details.
+
+QFont:
+------
+ Two new convenience functions; bold() and setBold().
+
+QLabel:
+-------
+ setMargin() and margin() are new. setMargin() specifies a minimum margin
+ when the label contents are justified.
+
+QWidget:
+--------
+ You can specify a custom widget frame for top level widgets, including
+ no frame at all. See the widget constructor doc. for details.
+
+ Qt now has enter and leave events. Reimplement the virtual functions
+ void enterEvent( QEvent * ) and void leaveEvent( QEvent * ) to receive
+ events when the mouse cursor leaves or enters the visible part of the
+ widget.
+
diff --git a/dist/changes-0.99 b/dist/changes-0.99
new file mode 100644
index 0000000..80be555
--- /dev/null
+++ b/dist/changes-0.99
@@ -0,0 +1,60 @@
+Here is a list of user-visible changes in Qt from 0.98 to 0.99.
+As usual, we fixed some bugs and improved the documentation.
+
+Qt 0.99 includes makefiles for Linux, Solaris, SunOS, FreeBSD, OSF/1,
+Irix, BSD/OS, SCO and HP-UX.
+
+
+*************** Changes that might affect runtime behavior *****************
+
+none
+
+*************** Changes that might generate compile errors *****************
+************** when compiling old code *****************
+
+QVector:
+--------
+
+Removed operator const type**().
+
+*************** Type changes that might generate warnings: *****************
+
+none
+
+***************** Obsoleted functions **********************
+
+none
+
+***************** All other changes from 0.98 to 0.99 **********************
+
+QApplication:
+-------------
+Added beep() to make a sound.
+
+
+QFileInfo
+---------
+Added readLink() to return the name of the file a symlink points to,
+fixed bug in isSymlink().
+
+
+QPrinter:
+---------
+The X11 version now supports landscape printing and different paper sizes.
+
+
+QTableView:
+-----------
+The functions horizontalScrollBar and verticalScrollBar gives access
+to the internal scroll bars so you can connect to their signals.
+
+
+QWidget:
+--------
+Added sizeHint virtual function which is implemented in subclasses to
+return a recommended size.
+
+Added new function setFixedSize() to set both the minimum and maximum sizes
+at the same time.
+
+Added clearFocus() function to take keyboard focus from the widget.
diff --git a/dist/changes-1.0 b/dist/changes-1.0
new file mode 100644
index 0000000..cf9f7a1
--- /dev/null
+++ b/dist/changes-1.0
@@ -0,0 +1,62 @@
+Here is a list of user-visible changes in Qt from 0.99 to 1.0.
+As usual, we fixed some bugs and improved the documentation.
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+QComboBox:
+----------
+The combo box is resized to the largest item when automatic resizing
+is enabled. In 0.99 it resized itself to the current item.
+
+
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+none
+
+
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+none
+
+
+
+****************************************************************************
+* Obsoleted functions *
+****************************************************************************
+
+All pre-1.0 obsoleted functions are now removed.
+
+
+
+****************************************************************************
+* All other changes from 0.99 to 1.0 *
+****************************************************************************
+
+QBitmap:
+--------
+Added constructor that takes a file name. Loads an image from file.
+
+
+QDialog:
+--------
+QDialog inherits QWidget instead of QWindow.
+
+
+QPixmap:
+--------
+Added constructor that takes a file name. Loads an image from file.
+
+
+QTimer:
+-------
+Added static function singleShot(). Convenient function.
diff --git a/dist/changes-1.1 b/dist/changes-1.1
new file mode 100644
index 0000000..ff9d2a7
--- /dev/null
+++ b/dist/changes-1.1
@@ -0,0 +1,110 @@
+Here is a list of user-visible changes in Qt from 1.0 to 1.1. As
+usual, we fixed some bugs, made some more speedups, and improved the
+documentation.
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+We've added keyboard interface to more widgets, and changed the
+default focus policy radically. For example, by default you can TAB
+to button, but it does not grab focus when you click it. The new
+QWidget::setFocusPolicy() function can be used to change focus policy
+for all widgets.
+
+The font matching algorithm has been tweaked in order to provide more
+predictable fonts in more cases. For some users (such as those with a
+75dpi X server and only 100dpi fonts installed) it may change the
+output of some programs.
+
+sizeHint() and hence default size has been tweaked for some widgets;
+QMenuBar and QPushButton in particular.
+
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+We've renamed "declare" in qgeneric.h to Q_DECLARE due to naming
+conflicts. Though we try to provide backward compatibility, there may
+be problems for a few programs.
+
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+none
+
+
+****************************************************************************
+* Obsoleted functions *
+****************************************************************************
+
+none
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+QTabDialog (and QTabBar) provide a tabbed dialog. examples/pref shows
+simple usage of QTabDialog.
+
+QMultiLineEditor is the long-awaited multi-line editor.
+
+QGridLayout provides grid-like geometry management for any widget,
+with flexible row/column elasticity, minimum and maximum sizes.
+
+QBoxLayout provides more complex and powerful geometry management:
+boxes and widgets stacked inside other boxes, and finally a top-level
+box connected to a widget.
+
+QToolTip provides tool tips for any widget.
+
+
+****************************************************************************
+* Other changes from 1.0 to 1.1 *
+****************************************************************************
+
+Added QApplication::setColorMode() and colorMode().
+
+Added QColor::setAllocContext() and friends; these functions enable
+applications to allocate discardable colors and then discard them.
+
+Removed some GNU-make features from the makefiles.
+
+Added a QPalette constructor to construct an entire palette from a single
+background color, for convenience.
+
+moc output now has a version number #define.
+
+AIX support added. IRIX and NetBSD fixed.
+
+Rewrote a couple of functions to work around compiler bugs, or
+purify/boundschecker overzealousness.
+
+Fixed that ugly man-page SYNOPSIS bug.
+
+Added the static function QMessageBox::query().
+
+QRect::unite() now produces the desired results if exactly one of the
+rectangles is invalid.
+
+QObject::parent() is now public.
+
+QPainter::drawWinFocusRect() draws a Windows 95-style focus rectangle.
+(A focus rectangle can not be drawn using ordinary Windows drawing
+functions.)
+
+QApplication::processEvents() added to cater for long-running
+computations; it processes one round of window system events and
+timers and then returns.
+
+QComboBox has been extended to provide an editable combo box and Motif
+2.x compatible look and feel.
+
+We've also added a host of new workarounds for bugs in Borland C++,
+Microsoft VC++, DEC CXX and HP CC.
diff --git a/dist/changes-1.2 b/dist/changes-1.2
new file mode 100644
index 0000000..d4d2c2c
--- /dev/null
+++ b/dist/changes-1.2
@@ -0,0 +1,119 @@
+Here is a list of user-visible changes in Qt from 1.1 to 1.2. As
+usual, we fixed some bugs, made some more speedups, and improved the
+documentation.
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+QGridLayout::addWidget() and addMultiCellWidget(): The align parameter
+is now interpreted correctly. (Previously up/down and right/left were
+reversed.) If you have worked around this bug, your widgets may now be
+incorrectly aligned.
+
+QWidget: Every widget is now guaranteed move and resize events. The
+event is deferred until the first show(). This may cause problems in
+rare cases involving event filters.
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Deprecated functions *
+****************************************************************************
+
+QApplication::setColorMode() and colorMode() will be obsoleted. Use
+setColorSpec() and colorSpec() instead.
+
+qchecksum() will be obsoleted. Please use qChecksum() instead.
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+QSlider is a widget to input values from a range. If you have been
+using a standalone QScrollBar, you will probably want to switch to a
+QSlider.
+
+OpenGL/Mesa support: QGLWidget, QGLContext and QGLFormat. To use these
+classes you need to build the Qt/OpenGL library (qgl) in qt/opengl/src.
+
+****************************************************************************
+* Other changes from 1.1 to 1.2 *
+****************************************************************************
+
+QApplication::setColorSpec() can specify private colormaps or
+non-default visuals
+
+New function QButton::setAutoRepeat().
+
+QComboBox: New function currentText(), two new insertion policies:
+AfterCurrent and BeforeCurrent.
+
+QCursor: added new global cursor blankCursor.
+
+QFont::key(), new function for caching.
+
+QFontMetrics::QFontMetrics( const QFont& ) new constructor gives
+fontmetrics directly for a font. This is much faster than using
+QWidget::fontMetrics() or QPainter::fontmetrics().
+
+QImage: image load/save functions:
+ QImage( const char *filename )
+ imageFormat(), load(), loadFromData(), save()
+ operator>>(), operator<<()
+ XPM support, QImage( const *xpm[] )
+ Alpha channel support:
+ hasAlphaBuffer(), setAlphaBuffer()
+ createAlphaMask(),
+ Automatic mask generaton: createHeuristicMask()
+ Filling the entire image: fill()
+
+QLCDNumber now supports filled segments:
+ setSegmentStyle(), segmentStyle()
+
+QLabel now supports accellerated labels:
+ setBuddy(), buddy() and a new constructor.
+
+QLineEdit new functions:
+ show/hide frame: setFrame(), frame()
+ password entry mode: setEchoMode(), echoMode()
+
+QMouseEvent: x() and y() convenience functions.
+
+QPainter: new constructor QPainter( const QPaintDevice* ) does automatic
+begin() and end(). New function flush().
+
+QPixmap new functions:
+ serialNumber() for caching purposes.
+ selfMask() QPixmap( const char *xpm[] )
+ createHeuristicMask()
+
+QPopupMenu: Added functions to enable checkmarks:
+ setCheckable(), isCheckable()
+
+QScrollBar: sizeHint() implemented.
+
+QTabBar now supports keyboard input. New function currentTab().
+
+QTabDialog: new function setOKButton().
+
+Added support for XFree86 on OS/2.
+
+New examples:
+ examples/tooltip demonstrates dynamic tooltips
+ examples/table demonstrates QTableView
+ examples/hello is a different program
+
+examples/xshape has been removed.
diff --git a/dist/changes-1.30 b/dist/changes-1.30
new file mode 100644
index 0000000..255d89c
--- /dev/null
+++ b/dist/changes-1.30
@@ -0,0 +1,278 @@
+Here is a list of user-visible changes in Qt from 1.2 to 1.30. As
+usual, we fixed some bugs, made some more speedups, and improved the
+documentation.
+
+Keyboard accelerators and traversal are significantly improved.
+
+Two new extensions included with Qt 1.30. They are not part of the library:
+
+Netscape plugin support. You can now write portable Netscape plugins
+using Qt. See the qt/extensions/nsplugin directory in the distribution.
+
+The ImageIO extension library gives a framework for adding new image
+formats, including PNG and JPEG in this release. See the qt/extensions/imageio
+directory in the distribution.
+
+The OpenGL extension for Qt now resides in qt/extensions.
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+* QProgressBar displays a progress bar.
+
+* QProgressDialog uses QProgressBar to give the user feedback during long
+ operations, as well as a means of aborting.
+
+* QMovie supports animated GIFs and incremental loading of images.
+
+* QHBoxLayout and QVBoxLayout are convenience classes giving a simpler
+ interface to QBoxLayout.
+
+* QValidator provides a mechanism for validating input.
+
+
+****************************************************************************
+* Enhancements from 1.2 to 1.30 *
+****************************************************************************
+
+QFont now supports charsets latin1 through latin9.
+
+New command-line arguments: -style motif and -style windows are
+accepted, as well as -style=motif and -style=windows, -visual, -ncols,
+-cmap.
+
+QMultiLineEdit is usable for much bigger documents than in 1.2
+
+More sizeHint() functions added, some existing ones tweaked.
+
+Many widgets have improved look and feel, particularly changes to
+Windows GUI style to match Windows more closely.
+
+Improved Postscript output.
+
+Color handling has been improved; better 32-to-8 conversion; Qt
+prefers to use Macintosh/Netscape color cube in 8-bit mode; more and
+better dithering support.
+
+GIF and PPM support.
+
+QMessageBox has a number of new static functions to replace the
+venerable message(): information(), warning(), critical() and about().
+
+QPopupMenu can now display icon and text in the same item.
+
+QPopupMenu::exec() to pop up a synchronous popup menu.
+
+QListBox now supports multi selection.
+
+QWidget::setBackgroundMode() gives a powerful way of managing widget
+backgrounds, to reduce flicker.
+
+QWidget::setIcon() now works under both X11 and Windows.
+
+The file dialog now remembers the previously selected directory.
+
+QApplication::setWinStyleHighlightColor() sets the highlight color in
+windows style.
+
+QApplication::setDoubleClickInterval() sets the double click timeout
+
+The layout example is new and more informative.
+
+There is a new openGL example; extension/opengl/examples/box/ shows
+how to control an openGL widget using Qt user interface components.
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+Tab/Shift-Tab handling has been improved a lot; this means that
+widgets which couldn't get keyboard focus before now can.
+
+Some widgets (buttons, tab bars, tab dialogs) semi-automatically set
+up keyboard accelerators. ( setText("E&xit") will give Alt-X as an
+accelerator.) In some very rare cases, this will cause changes of
+behaviour.
+
+The QColor::light() function now works, and anything which relied on
+its buggy behaviour might be a little darker than expected until changed,
+usually just recompiling (the default argument has also changed).
+
+The colors used have been tuned a bit; pixmaps that "know" the RGB
+values of colorGroup().background() and the like will look just a tiny
+bit wrong.
+
+QApplication calls setlocale to the local environment, except for
+LC_NUMERIC which is set to the C locale. This means that input/output
+of floating point numbers will always use '.' as the decimal separator,
+while all other locale dependant operations will use the default locale.
+
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Deprecated functions *
+****************************************************************************
+
+QApplication::setColorMode()
+ - see QApplication::setColorSpec(int)
+QRegion::xor()
+ - see QRegion::eor()
+QMessageBox::message()
+ - see QMessageBox::information/warning/critical
+QMultiLineEdit::getCursorPosition()
+ - see QMultiLineEdit::cursorPosition()
+QTabDialog::setOKButton()
+ - see QTabDialog::setOkButton()
+
+****************************************************************************
+* New public/protected functions added to existing classes *
+****************************************************************************
+
+QAccel::repairEventFilter()
+QApplication::activeModalWidget()
+QApplication::activePopupWidget()
+QApplication::allWidgets()
+QApplication::doubleClickInterval()
+QApplication::hasGlobalMouseTracking()
+QApplication::processEvents(int)
+QApplication::processOneEvent()
+QApplication::setDoubleClickInterval(int)
+QApplication::setGlobalMouseTracking(bool)
+QApplication::setWinStyleHighlightColor(QColor const &)
+QApplication::winStyleHighlightColor()
+QApplication::x11ProcessEvent(_XEvent *)
+QBoxLayout::className() const
+QButton::accel() const
+QButton::animateClick()
+QButton::enabledChange(bool)
+QButton::setAccel(int)
+QComboBox::clearValidator()
+QComboBox::setStyle(GUIStyle)
+QComboBox::setValidator(QValidator *)
+QComboBox::validator() const
+QDir::convertSeparators(char const *)
+QFrame::sizeHint() const
+QGridLayout::addColSpacing(int, int)
+QGridLayout::addRowSpacing(int, int)
+QGridLayout::className() const
+QImage::convertDepth(int, int) const
+QImage::create(QSize const &, int, int, QImage::Endian)
+QImage::createAlphaMask(int) const
+QImage::inputFormats()
+QImage::outputFormats()
+QImage::pixel(int, int) const
+QImage::pixelIndex(int, int) const
+QImage::setPixel(int, int, unsigned int)
+QImage::valid(int, int) const
+QImageIO::inputFormats()
+QImageIO::outputFormats()
+QLabel::movie() const
+QLabel::setMovie(QMovie const &)
+QLayout::className() const
+QLineEdit::clearValidator()
+QLineEdit::setValidator(QValidator *)
+QLineEdit::sizeHint() const
+QLineEdit::validator() const
+QListBox::clearSelection()
+QListBox::focusOutEvent(QFocusEvent *)
+QListBox::highlighted(char const *)
+QListBox::isMultiSelection() const
+QListBox::isSelected(int) const
+QListBox::selected(char const *)
+QListBox::selectionChanged()
+QListBox::setMultiSelection(bool)
+QListBox::setSelected(int, bool)
+QListBox::toggleCurrentItem()
+QMenuBar::heightForWidth(int) const
+QMenuBar::leaveEvent(QEvent *)
+QMenuBar::separator() const
+QMenuBar::setSeparator(QMenuBar::Separator)
+QMenuData::changeItem(QPixmap const &, char const *, int)
+QMenuData::insertItem(QPixmap const &, char const *, QObject const *, char const *, int)
+QMenuData::insertItem(QPixmap const &, char const *, QPopupMenu *, int, int)
+QMenuData::insertItem(QPixmap const &, char const *, int, int)
+QMessageBox::about(QWidget *, char const *, char const *)
+QMessageBox::aboutQt(QWidget *, char const *)
+QMessageBox::buttonText(int) const
+QMessageBox::critical(QWidget *, char const *, char const *, char const *, char const *, char const *, int, int)
+QMessageBox::critical(QWidget *, char const *, char const *, int, int, int)
+QMessageBox::icon() const
+QMessageBox::iconPixmap() const
+QMessageBox::information(QWidget *, char const *, char const *, char const *, char const *, char const *, int, int)
+QMessageBox::information(QWidget *, char const *, char const *, int, int, int)
+QMessageBox::setButtonText(int, char const *)
+QMessageBox::setIcon(QMessageBox::Icon)
+QMessageBox::setIconPixmap(QPixmap const &)
+QMessageBox::setStyle(GUIStyle)
+QMessageBox::standardIcon(QMessageBox::Icon, GUIStyle)
+QMessageBox::warning(QWidget *, char const *, char const *, char const *, char const *, char const *, int, int)
+QMessageBox::warning(QWidget *, char const *, char const *, int, int, int)
+QMultiLineEdit::cursorPoint() const
+QMultiLineEdit::cursorPosition(int *, int *) const
+QMultiLineEdit::getMarkedRegion(int *, int *, int *, int *) const
+QPainter::drawPoints(QPointArray const &, int, int)
+QPainter::drawWinFocusRect( int, int, int, int, const QColor & )
+QPalette::detach()
+QPicture::data() const
+QPicture::isNull() const
+QPicture::setData(char const *, unsigned int)
+QPicture::size() const
+QPixmap::convertFromImage(QImage const &, int)
+QPixmap::load(char const *, char const *, int)
+QPixmap::loadFromData(unsigned char const *, unsigned int, char const *, int)
+QPopupMenu::exec()
+QPopupMenu::setActiveItem(int)
+QRegion::eor(QRegion const &) const
+QSize::transpose()
+QTabBar::setCurrentTab(QTab *)
+QTabBar::setCurrentTab(int)
+QTabBar::setShape(QTabBar::Shape)
+QTabBar::shape() const
+QTabBar::tab(int)
+QTabBar::tabList()
+QTabDialog::addTab(QWidget *, QTab *)
+QTabDialog::hasOkButton() const
+QTabDialog::selected(char const *)
+QTabDialog::setTabBar(QTabBar *)
+QTabDialog::showPage(QWidget *)
+QTabDialog::styleChange(GUIStyle)
+QTabDialog::tabBar() const
+QTabDialog::tabLabel(QWidget *)
+QTableView::minViewX() const
+QTableView::minViewY() const
+QTableView::updateTableSize()
+QToolTip::font()
+QToolTip::palette()
+QToolTip::setFont(QFont const &)
+QToolTip::setPalette(QPalette const &)
+QWidget::backgroundMode() const
+QWidget::create(unsigned int, bool, bool)
+QWidget::destroy(bool, bool)
+QWidget::focusProxy() const
+QWidget::focusWidget() const
+QWidget::isVisibleToTLW() const
+QWidget::setBackgroundMode(QWidget::BackgroundMode)
+QWidget::setFixedHeight(int)
+QWidget::setFixedWidth(int)
+QWidget::setFocusProxy(QWidget *)
+QWidget::setMaximumHeight(int)
+QWidget::setMaximumWidth(int)
+QWidget::setMinimumHeight(int)
+QWidget::setMinimumWidth(int)
+QWidget::setTabOrder(QWidget *, QWidget *)
+QWidget::update(QRect const &)
diff --git a/dist/changes-1.31 b/dist/changes-1.31
new file mode 100644
index 0000000..b6b2d65
--- /dev/null
+++ b/dist/changes-1.31
@@ -0,0 +1,34 @@
+1.31 is a bug-fix release of Qt and only contains minor changes compared
+to Qt 1.30
+
+Here is a list of the bug-fixes made in Qt from 1.30 to 1.31.
+
+Changing the font of a QButton, QPushButton, QCheckBox or QRadioButton now
+works correctly.
+
+QRadiobutton: Correct toggling in a QButtonGroup when activated by an
+ accelerator.
+
+QPopupMenu: Items updated correctly when activated by an accelerator.
+
+QProgressBar: Base color is no longer fixed to white.
+
+QProgressDialog: setLabel() and setCancelButton() now ensure that a given
+ widget is shown and is a child of QProgressDialog.
+
+QWidget: setEnabled( FALSE ) now moves focus correctly.
+
+QLineEdit and
+QMultiLineEdit: In keyPressEvent() backspace no longer inserts an
+ unprintable character with some rare keyboard layouts.
+
+QMenubar: Mouse presses on items without any popup menu are now
+ always recognized.
+
+Changes to fix compile problems under IRIX.
+
+Changes to fix compile problems on some versions of AIX.
+
+Changes to fix compile problems with aCC on HP-UX.
+
+Minor documentation fixes.
diff --git a/dist/changes-1.39-19980327 b/dist/changes-1.39-19980327
new file mode 100644
index 0000000..3c5843d
--- /dev/null
+++ b/dist/changes-1.39-19980327
@@ -0,0 +1,963 @@
+src/widgets/qlabel.cpp 2.21 agulbra +9 -5
+
+ new sizeHint(); "yes\nyes" is as tall as "Yes\nYes"
+
+
+src/tools/qstrlist.h 2.7 hanord +10 -9 (1997/10/16)
+
+ Fixed STL crash reported by ust@egd.igd.fhg.de
+
+
+src/kernel/qregion.cpp 2.5 agulbra +3 -3 (1997/10/19)
+src/kernel/qregion.h 2.6 agulbra +2 -2
+
+ USL C++ understands xor
+
+
+src/kernel/qkeycode.h 2.5 hanord +13 -2 (1997/10/22)
+
+ Added function keys F25..F35 for X only
+
+
+src/widgets/qpushbt.cpp 2.33 hanord +5 -9
+
+ Always clear button background in Windows style
+
+
+src/widgets/qpushbt.cpp 2.32 hanord +8 -8
+
+ Fixed background color for windows style
+
+
+src/kernel/qcur_win.cpp 2.5 hanord +15 -5
+
+ Fix the cursor bug on Win95
+
+
+src/kernel/qobject.cpp 2.36 eiriken +3 -3
+src/kernel/qwid_win.cpp 2.39 eiriken +19 -17
+
+ Fixed bugs in setMaximumSize and setMinimumSize
+
+
+src/widgets/qlabel.cpp 2.23 agulbra +11 -2
+src/widgets/qlabel.h 2.5 agulbra +2 -1
+
+ add clear()
+
+
+src/kernel/qapp.cpp 2.38 eiriken +8 -2 (1997/10/31)
+
+ Added warning in QApplication::palette() if called before a QApplication
+ is created.
+
+
+src/kernel/qcolor.h 2.8 hanord +6 -7
+
+ Fixed the color== operator
+
+
+src/kernel/qcol_win.cpp 2.16 hanord +13 -41
+src/kernel/qcolor.cpp 2.12 hanord +118 -36
+src/kernel/qcolor.h 2.7 hanord +7 -6
+
+ Moved platform independent functions into qcolor.cpp
+ Optimized setNamedColor for #RRGGBB style color names.
+ Doc warns that RGB bit format may change in the future.
+ setRgb(QRgb) optimized.
+ Added static class member color_init (not a global file variable)
+
+
+src/kernel/qapp_win.cpp 2.64 hanord +67 -50
+
+ Detects the Windows version using GetVersionEx.
+ Moved the timer function to the appropriate section.
+
+
+src/kernel/qclb_x11.cpp 2.4 agulbra +6 -5
+
+ call XInternAtoms() once instead of XInternAtom N times. should
+ improve start-up time by about 3-5 times the ping time to the server.
+
+
+src/widgets/qlistbox.h 2.12 agulbra +2 -1 (1997/11/09)
+
+ don't let down-arrow set the current item to be half-visible
+
+
+src/kernel/qpainter.cpp 2.17 hanord +61 -5 (1997/11/12)
+src/kernel/qpainter.h 2.12 hanord +2 -1
+
+ Added new begin() which takes a paint device and a widget to copy pen, font
+ etc. from.
+ Fixed inverted dense pattern on Windows.
+
+
+src/widgets/qslider.cpp 2.45 paul +3 -2
+
+ fixing bug when setting value in constructor followed by resetting value
+ to zero.
+
+
+src/kernel/qimage.cpp 2.65.2.1 agulbra +4 -4
+
+ avoid segfaults for image handlers where either read or
+ write is 0. enables gif image handlers.
+
+
+src/qt.pro 2.6 agulbra +4 -2 (1997/11/20)
+src/kernel/qdragobject.cpp 2.1 agulbra initial checkin
+src/kernel/qdragobject.h 2.1 agulbra initial checkin
+src/kernel/qevent.h 2.6 agulbra +59 -2
+src/widgets/qlined.cpp 2.54 agulbra +92 -3
+src/widgets/qlined.h 2.19 agulbra +3 -1
+
+ QDragObject and related goodies. not ready for prime time, but hey!
+
+
+src/widgets/qcombo.cpp 2.68 agulbra +52 -2
+src/widgets/qcombo.h 2.20 agulbra +5 -1
+
+ new function setListBox() - allows custom combos like the ones in ACT
+
+
+src/kernel/qapp_win.cpp 2.65 warwick +4 -3
+src/kernel/qwid_win.cpp 2.43 warwick +51 -19
+
+ Reimplement QWidget::recreate(), using almost same code as X11 version.
+
+
+src/kernel/qptr_win.cpp 2.21.2.1 hanord +8 -8 (1997/11/25)
+
+ Fixed bad dense patterns
+
+
+src/widgets/qchkbox.cpp 2.17 warwick +16 -7 (1997/11/28)
+src/widgets/qradiobt.cpp 2.21 warwick +18 -7
+
+ Check pixmap in sizeHint()
+
+
+src/kernel/qpainter.h 2.14 hanord +3 -1 (1997/12/02)
+
+ Added xForm and xFormDev with index,npoints arguments
+
+
+src/kernel/qpainter.cpp 2.19 hanord +399 -2
+src/kernel/qptr_x11.cpp 2.31 hanord +45 -333
+
+ Moved platform-independent xForm functions into qpainter.cpp.
+ Fixed bugs in drawPoints, drawPolyline, drawLineSegments and
+ drawPolygon where index > 0 or npoints < array size.
+ Added xForm(pointarray,index,size) and similar xFormDev().
+ Now Purify should shut up.
+ Removed some tests for cpen.style() != NoPen. Makes some code
+ somewhat slower, but makes QPainter more consistent.
+
+
+src/kernel/qptd_x11.cpp 2.9 hanord +11 -3
+src/kernel/qptr_x11.cpp 2.30 hanord +11 -5
+
+ Set graphics exposures to FALSE except when bitBlt from widget to widget
+
+
+src/kernel/qpm_win.cpp 2.29 hanord +12 -12
+
+ When converting an image to a pixmap, don't create a new pixmap unless
+ the depth or dimension changes.
+
+
+src/widgets/qlined.cpp 2.56 agulbra +64 -41
+src/widgets/qlined.h 2.21 agulbra +6 -3
+
+ various small fixes, mostly to draw correctly. added setFont() and
+ setEnabled() to update correctly, I guess we need setStyle() and
+ setPalette() too.
+
+
+src/dialogs/qmsgbox.cpp 2.40 warwick +8 -6 (1997/12/08)
+
+ Correct layout for text smaller than icon.
+
+
+src/widgets/qprogbar.cpp 2.15 warwick +22 -8
+
+ Ensure display is up-to-date when a progress bar is re-used.
+
+
+src/kernel/qptr_x11.cpp 2.32 warwick +4 -2
+
+ Fix out-of-bounds clipping.
+
+
+src/kernel/qapp_win.cpp 2.67 hanord +23 -8
+
+ Get the app name even for console applications (when WinMain isn't called)
+
+
+src/kernel/qasyncimageio.cpp 1.23 warwick +57 -26
+src/kernel/qasyncimageio.h 1.12 warwick +2 -1
+
+ Handle nasty GIFs.
+
+
+src/widgets/qspinbox.cpp 2.24 aavit +170 -25 (1997/12/09)
+src/widgets/qspinbox.h 2.14 aavit +17 -8
+
+ Improved QSpinbox - now easier to subclass; and "Auto" choice added.
+
+
+src/tools/qregexp.cpp 2.6 hanord +15 -12
+
+ Fixed serious bug: regular expression with characters > 127 now works.
+
+
+src/kernel/qprn_x11.cpp 2.6 warwick +3 -3
+
+ QPrinter::newPage() previous always returned FALSE. Fixed.
+
+
+src/widgets/qscrbar.cpp 2.30 agulbra +6 -6
+
+ be a bit kinder and gentler about the hot zone in windows style. the
+ old limit (30 pixels to either side of the bar) was too tight
+
+
+src/kernel/qapp_win.cpp 2.68 hanord +6 -3 (1997/12/15)
+
+ Fixed the modal loop problem related to synch popups with signals
+
+
+src/widgets/qlined.cpp 2.57 agulbra +8 -8 (1998/01/05)
+
+ don't allow paste from ****'ed line edits
+
+
+src/kernel/qasyncimageio.cpp 1.25 warwick +14 -6 (1998/01/06)
+
+ Be more forgiving about broken GIF - as forgiving as netscape
+
+
+src/kernel/qasyncimageio.cpp 1.24 warwick +5 -2
+
+ Protection against more broken GIFs.
+
+
+extensions/xt/doc.conf 1.1 warwick initial checkin (1998/01/07)
+extensions/xt/doc/annotated.doc 1.1 warwick initial checkin
+extensions/xt/doc/classes.doc 1.1 warwick initial checkin
+extensions/xt/doc/examples.doc 1.1 warwick initial checkin
+extensions/xt/doc/index.doc 1.1 warwick initial checkin
+extensions/xt/examples/mainlyMotif/editor.cpp 1.1 warwick initial checkin
+extensions/xt/examples/mainlyMotif/editor.pro 1.1 warwick initial checkin
+extensions/xt/examples/mainlyQt/editor.cpp 1.1 warwick initial checkin
+extensions/xt/examples/mainlyQt/editor.pro 1.1 warwick initial checkin
+extensions/xt/examples/mainlyXt/editor.cpp 1.1 warwick initial checkin
+extensions/xt/examples/mainlyXt/editor.pro 1.1 warwick initial checkin
+extensions/xt/src/qxt.cpp 1.1 warwick initial checkin
+extensions/xt/src/qxt.h 1.1 warwick initial checkin
+extensions/xt/src/qxt.pro 1.1 warwick initial checkin
+
+ Qt Xt/Motif Extension, examples, docs.
+
+
+src/kernel/qevent.cpp 2.7 paul +48 -9 (1998/01/08)
+src/kernel/qevent.h 2.9 paul +17 -1
+src/kernel/qgmanagr.cpp 2.22 paul +97 -10
+src/kernel/qgmanagr.h 2.7 paul +3 -1
+src/kernel/qlayout.cpp 2.27 paul +2 -23
+src/kernel/qwid_win.cpp 2.44 paul +19 -3
+src/kernel/qwidget.cpp 2.85 paul +10 -2
+
+ New events ChildInserted, ChildRemoved and LayoutHint. Not tested on Windows.
+ Use new events in GM.
+
+
+src/qt.pro 2.11 paul +2 -0
+src/widgets/qsplitter.cpp 1.1 paul initial checkin
+src/widgets/qsplitter.h 1.1 paul initial checkin
+
+ New widget QSplitter
+
+
+src/kernel/qpntarry.cpp 2.12 warwick +4 -4
+
+ Fix quad bezier for small curves
+
+
+src/kernel/qwidget.cpp 2.87 agulbra +71 -16
+src/kernel/qwidget.h 2.38 agulbra +5 -2
+src/kernel/qwindefs.h 2.20 agulbra +2 -1
+
+ added setAutoMinimumSize(). fixed a couple of documentation errors.
+
+
+src/kernel/qwid_win.cpp 2.45 warwick +4 -3 (1998/01/13)
+
+ Fix case of recreate(0,...) on tlw.
+
+
+src/widgets/qbutton.cpp 2.40.2.1 agulbra +7 -7
+
+ paint correctly when there is a background color
+
+
+src/widgets/qlined.cpp 2.58 paul +18 -8 (1998/01/14)
+
+ Correct cursor when end(). Better blinking
+
+
+src/dialogs/qtabdlg.cpp 2.36 agulbra +172 -213
+src/dialogs/qtabdlg.h 2.17 agulbra +2 -1
+src/kernel/qgmanagr.cpp 2.23 agulbra +22 -21
+src/widgets/qtabbar.cpp 2.30 agulbra +12 -15
+src/widgets/qwidgetstack.cpp 2.1 agulbra initial checkin
+src/widgets/qwidgetstack.h 2.1 agulbra initial checkin
+
+ The new class QWidgetStack encapsulates a bunch of widgets of the same
+ size, where the one on top of the stack is visible. It provides slots
+ to raise any of the widgets to the top of the stack and so on.
+
+ QTabDialog now uses QWidgetStack. A couple of hacks went away, and it
+ now uses QBoxLayout to manage its children. Some more minor changes
+ are desirable here.
+
+ QTabBar now uses autoMinimumSize() appropriately, and is closer to the
+ new Windows look and feel (ie. it lost the bold stuff). QTabDialog is
+ adapted accordingly.
+
+ QGManager now has a one-line VERY INEFFICENT fix that SORELY NEEDS
+ OPTIMIZATION to make layout hint events propagate outwards correctly.
+ There's about twenty hashes on the relevant line. This change is the
+ whole point of the check-in: Most things that use QWidgetStack will
+ really need this fix. Paul, optimize it, please?
+
+
+src/kernel/qobject.cpp 2.42 agulbra +13 -2
+
+ show geometry and visibility too in dumpObjectTree()
+
+
+src/qt.pro 2.12 agulbra +10 -0
+src/widgets/qmainwindow.cpp 2.1 agulbra initial checkin
+src/widgets/qmainwindow.h 2.1 agulbra initial checkin
+src/widgets/qstatusbar.cpp 2.1 agulbra initial checkin
+src/widgets/qstatusbar.h 2.1 agulbra initial checkin
+src/widgets/qtoolbar.cpp 2.1 agulbra initial checkin
+src/widgets/qtoolbar.h 2.1 agulbra initial checkin
+src/widgets/qtoolbutton.cpp 2.1 agulbra initial checkin
+src/widgets/qtoolbutton.h 2.1 agulbra initial checkin
+
+ several new classes. very rough and ready, but they're good enough to
+ talk about and play with.
+
+
+src/widgets/qframe.cpp 2.11 paul +33 -5
+src/widgets/qframe.h 2.4 paul +8 -2
+
+ New function setMargin()
+
+
+examples/showimg/showimg.cpp 2.18 warwick +25 -6 (1998/01/21)
+examples/showimg/showimg.h 2.6 warwick +3 -1
+src/kernel/qimage.h 2.22 warwick +5 -1
+
+ QImage::smoothScale(int with, int height)
+
+
+src/widgets/qpopmenu.h 2.10 agulbra +3 -2
+
+ new signal aboutToShow(), like the one in QTabDialog.
+
+
+src/tools/qstring.cpp 2.16 warwick +44 -3 (1998/01/23)
+
+ Make QString implicitly shared. Activates in Qt 2.00.
+ Try enabling this protection next time you have some weird bug.
+
+
+src/kernel/qclb_x11.cpp 2.6 hanord +155 -46
+
+ INCR paste works.
+
+
+src/qt.pro 2.13 agulbra +2 -0
+src/widgets/qwhatsthis.cpp 2.1 agulbra initial checkin
+src/widgets/qwhatsthis.h 2.1 agulbra initial checkin
+
+ what's this?
+ it's not perfect, but it definitely is nice.
+
+
+extensions/imageio/src/qpngio.cpp 1.6 warwick +9 -4 (1998/01/27)
+
+ Don't set alpha if not necessary.
+
+
+src/kernel/qpm_win.cpp 2.31 hanord +5 -11
+
+ Preserves mask when converting an image to a pixmap
+
+
+src/kernel/qapp.cpp 2.42 agulbra +7 -7
+
+ corrected dark shadow colour - has been too dark since warwick fixed
+ QColor::dark().
+
+
+src/kernel/qprn_win.cpp 2.6 hanord +11 -5
+
+ Printing now works on DeskJet 890c (StretchDIBits didn't work)
+ We now do StretchBlt.
+
+
+src/widgets/qpopmenu.h 2.12 warwick +2 -1 (1998/02/06)
+
+ Allow position in QPopupMenu::exec(...)
+
+
+src/kernel/qpntarry.cpp 2.13 warwick +14 -15
+
+ QPointArray::makeArc() now works with negative "alen" angle.
+ - QPainter::drawArc() uses this for arcs under transformation.
+
+
+src/widgets/qbttngrp.cpp 2.8 aavit +34 -10
+src/widgets/qbttngrp.h 2.3 aavit +2 -1
+
+ bugfix: Untoggling of other buttons in an exclusive group
+ if a button was set with setChecked() did not work.
+
+
+src/widgets/qslider.cpp 2.47 agulbra +15 -28
+
+ made valueChanged() work correctly with middle-button dragging when
+ !tracking(). simplified the mouse state machine a little.
+
+
+src/tools/qdir.cpp 2.16 hanord +4 -8 (1998/02/11)
+src/tools/qfile.cpp 2.13 hanord +36 -2
+src/tools/qfile.h 2.3 hanord +4 -1
+
+ Added QFile::remove() which removes a file
+
+
+src/widgets/qlined.cpp 2.60 agulbra +12 -2 (1998/02/19)
+src/widgets/qlined.h 2.23 agulbra +5 -3
+
+ add clear(), make setText() and insert() public
+
+
+src/widgets/qlistview.cpp 2.52 agulbra +33 -2
+src/widgets/qlistview.h 2.25 agulbra +3 -1
+
+ added a sizeHint()
+
+
+src/tools/qdir.cpp 2.17 agulbra +4 -4
+src/tools/qfileinf.cpp 2.7 agulbra +5 -4
+
+ do what the docs say for absFilePath() (ie. no /usr/../usr/bin/ls names)
+
+
+src/widgets/qtablevw.cpp 2.41 agulbra +31 -23
+
+ scrollLast*Cell and clipToCell could not be combined. now they can.
+
+
+src/widgets/qframe.cpp 2.13 warwick +4 -4 (1998/02/20)
+
+ Fix Box and H/VLine frames with margin() != 0.
+
+
+src/qt.pro 2.15 warwick +2 -0
+src/widgets/qlabelled.cpp 1.1 warwick initial checkin
+src/widgets/qlabelled.h 1.1 warwick initial checkin
+
+ QLabelled widget (experimental)
+
+
+src/kernel/qapp.cpp 2.45 agulbra +28 -13
+src/kernel/qapp_win.cpp 2.73 agulbra +14 -13
+
+ deliver mouse events to application-wide event filters even if the
+ receiver object is disabled. this allows tooltips to work for
+ disabled widgets.
+
+
+src/widgets/qcombo.h 2.23 agulbra +3 -2
+
+ make eventFilter() public. this may break binary compatibility on
+ msvc++, if anyone's built a dll yet.
+
+
+src/widgets/qradiobt.cpp 2.23 agulbra +7 -17
+
+ support exclusive button group behaviour even when one of the buttons
+ is not a QRadioButton.
+
+
+src/qt.pro 2.16 paul +6 -0
+src/widgets/qgrid.cpp 1.1 paul initial checkin
+src/widgets/qgrid.h 1.1 paul initial checkin
+src/widgets/qhbox.cpp 1.1 paul initial checkin
+src/widgets/qhbox.h 1.1 paul initial checkin
+src/widgets/qvbox.cpp 1.1 paul initial checkin
+src/widgets/qvbox.h 1.1 paul initial checkin
+
+ New layout widgets
+
+
+src/tools/qdstream.h 2.4 warwick +2 -2
+
+ QDataStream::eof() now returns TRUE if no device is set (as documented).
+
+
+src/tools/qfile.cpp 2.14 warwick +36 -19
+src/tools/qiodev.cpp 2.8 warwick +8 -5
+
+ Test the file in QFile::open(FILE*) to see if it is seekable (not a
+ char device, fifo, or socket), rather than assuming stdin/out/err are not.
+ Set type to Sequential for such files, not default Direct.
+
+ Don't use feof(fh) to mean at()==size(). QFile::atEnd() now works the
+ same as QIODevice and QBuffer.
+
+ setStatus(IO_ReadError) in appropriate places (wasn't ever set for files).
+ Reading EOF is considered an error in the QIODevice model (see QBuffer).
+
+
+src/kernel/qasyncimageio.cpp 1.26 warwick +37 -30
+src/kernel/qasyncimageio.h 1.13 warwick +2 -2
+
+ Work for even weirder GIFs.
+
+
+src/tools/qfile.cpp 2.16 agulbra +5 -4 (1998/02/25)
+
+ -1 in case of error...
+
+
+src/qt.pro 2.17 paul +2 -0
+src/widgets/qbuttonrow.cpp 1.1 paul initial checkin
+src/widgets/qbuttonrow.h 1.1 paul initial checkin
+
+ New layout widget
+
+
+examples/aclock/GNUmakefile 2.1 hanord initial checkin
+examples/aclock/Makefile 2.2 hanord +6 -53
+examples/aclock/aclock.pro 1.4 hanord +6 -6
+examples/application/GNUmakefile 1.1 hanord initial checkin
+examples/application/application.pro 1.2 hanord +6 -6
+examples/biff/GNUmakefile 2.1 hanord initial checkin
+examples/biff/Makefile 2.2 hanord +6 -54
+examples/biff/biff.pro 1.4 hanord +6 -6
+examples/connect/GNUmakefile 2.1 hanord initial checkin
+examples/connect/Makefile 2.2 hanord +6 -46
+examples/connect/connect.pro 1.4 hanord +5 -5
+examples/cursor/GNUmakefile 2.1 hanord initial checkin
+examples/cursor/Makefile 2.2 hanord +6 -46
+examples/cursor/cursor.pro 1.4 hanord +5 -5
+examples/dclock/GNUmakefile 2.1 hanord initial checkin
+examples/dclock/Makefile 2.2 hanord +6 -54
+examples/dclock/dclock.pro 1.4 hanord +6 -6
+examples/desktop/GNUmakefile 2.1 hanord initial checkin
+examples/desktop/Makefile 2.2 hanord +6 -46
+examples/desktop/desktop.pro 1.4 hanord +5 -5
+examples/dirview/GNUmakefile 1.1 hanord initial checkin
+examples/drawdemo/GNUmakefile 2.1 hanord initial checkin
+examples/drawdemo/Makefile 2.2 hanord +6 -52
+examples/drawdemo/drawdemo.pro 1.4 hanord +5 -5
+examples/forever/GNUmakefile 2.1 hanord initial checkin
+examples/forever/Makefile 2.3 hanord +6 -42
+examples/forever/forever.pro 1.4 hanord +5 -5
+examples/hello/GNUmakefile 2.1 hanord initial checkin
+examples/hello/Makefile 2.8 hanord +6 -61
+examples/hello/hello.pro 1.5 hanord +6 -5
+examples/layout/GNUmakefile 1.1 hanord initial checkin
+examples/layout/Makefile 1.11 hanord +7 -50
+examples/layout/layout.pro 1.5 hanord +5 -4
+examples/life/GNUmakefile 2.1 hanord initial checkin
+examples/life/Makefile 2.2 hanord +6 -57
+examples/life/life.pro 2.3 hanord +8 -8
+examples/menu/GNUmakefile 2.1 hanord initial checkin
+examples/menu/Makefile 2.4 hanord +6 -55
+examples/menu/menu.pro 2.3 hanord +5 -5
+examples/movies/GNUmakefile 1.1 hanord initial checkin
+examples/movies/Makefile 1.11 hanord +6 -50
+examples/movies/movies.pro 1.4 hanord +5 -5
+examples/network/GNUmakefile 1.1 hanord initial checkin
+examples/network/Makefile 1.7 hanord +6 -82
+examples/picture/GNUmakefile 2.1 hanord initial checkin
+examples/picture/Makefile 2.2 hanord +6 -49
+examples/picture/picture.pro 1.2 hanord +6 -3
+examples/pref/GNUmakefile 1.1 hanord initial checkin
+examples/pref/Makefile 1.4 hanord +6 -53
+examples/pref/pref.pro 1.4 hanord +6 -6
+examples/progress/GNUmakefile 1.1 hanord initial checkin
+examples/progress/Makefile 1.9 hanord +6 -47
+examples/progress/progress.pro 1.3 hanord +5 -5
+examples/qmag/GNUmakefile 2.1 hanord initial checkin
+examples/qmag/Makefile 2.2 hanord +6 -52
+examples/qmag/qmag.pro 2.3 hanord +5 -5
+examples/qwerty/GNUmakefile 1.1 hanord initial checkin
+examples/qwerty/Makefile 1.6 hanord +5 -66
+examples/qwerty/qwerty.pro 1.4 hanord +6 -6
+examples/scrollview/GNUmakefile 1.1 hanord initial checkin
+examples/scrollview/Makefile 1.4 hanord +6 -56
+examples/scrollview/scrollview.pro 1.3 hanord +5 -5
+examples/sheet/GNUmakefile 2.1 hanord initial checkin
+examples/sheet/Makefile 2.3 hanord +6 -59
+examples/showimg/GNUmakefile 2.1 hanord initial checkin
+examples/showimg/Makefile 2.12 hanord +6 -58
+examples/showimg/showimg.pro 2.7 hanord +6 -9
+examples/table/GNUmakefile 1.1 hanord initial checkin
+examples/table/Makefile 1.5 hanord +5 -67
+examples/table/table.pro 1.4 hanord +6 -6
+examples/tetrix/GNUmakefile 2.1 hanord initial checkin
+examples/tetrix/Makefile 2.5 hanord +6 -70
+examples/tetrix/tetrix.pro 2.4 hanord +14 -14
+examples/tictac/GNUmakefile 2.1 hanord initial checkin
+examples/tictac/Makefile 2.2 hanord +6 -54
+examples/tictac/tictac.pro 2.3 hanord +6 -6
+examples/timestmp/GNUmakefile 2.1 hanord initial checkin
+examples/timestmp/Makefile 2.2 hanord +6 -46
+examples/tooltip/GNUmakefile 1.1 hanord initial checkin
+examples/tooltip/Makefile 1.3 hanord +6 -53
+examples/tooltip/tooltip.pro 1.3 hanord +6 -6
+examples/validator/GNUmakefile 1.1 hanord initial checkin
+examples/validator/Makefile 1.3 hanord +6 -38
+examples/widgets/GNUmakefile 2.1 hanord initial checkin
+examples/widgets/Makefile 2.4 hanord +6 -67
+examples/widgets/widgets.pro 2.3 hanord +5 -9
+examples/xform/GNUmakefile 2.1 hanord initial checkin
+examples/xform/Makefile 2.4 hanord +6 -52
+examples/xform/xform.pro 2.3 hanord +6 -5
+src/GNUmakefile 2.1 hanord initial checkin
+src/Makefile 2.22 hanord +6 -156
+
+ New makefile system
+
+
+src/widgets/qframe.cpp 2.14 agulbra +6 -6
+
+ no reason to call drawContents() in [HV]Line mode
+
+
+src/kernel/qfont.cpp 2.18 warwick +3 -2
+src/kernel/qfontdta.h 2.8 warwick +2 -1
+src/kernel/qfontmet.h 2.6 warwick +9 -3
+src/kernel/qpainter.cpp 2.20 warwick +564 -2
+src/kernel/qpainter.h 2.16 warwick +2 -1
+src/kernel/qptr_x11.cpp 2.34 warwick +2 -546
+
+ QPainter::drawText(...tf...) now takes into account the left and
+ right bearings of the font. The bounding rectangle of text may now
+ be slightly larger (particularly italic text). QFontMetrics has
+ the additional functionality allowing this.
+
+
+src/kernel/qaccel.cpp 2.8 agulbra +70 -2 (1998/02/28)
+
+ added common accelerator keys for later inclusion into docs
+
+
+src/kernel/qfont.cpp 2.21 warwick +110 -2 (1998/03/01)
+src/kernel/qfontmet.h 2.8 warwick +7 -1
+src/kernel/qpainter.cpp 2.22 warwick +43 -26
+src/kernel/qpainter.h 2.17 warwick +5 -1
+src/widgets/qchkbox.cpp 2.18 warwick +23 -29
+src/widgets/qpushbt.cpp 2.35 warwick +5 -5
+src/widgets/qradiobt.cpp 2.24 warwick +24 -29
+
+ QFontMetrics::size() and QFontMetrics::boundingRect() with all the
+ functionality of QPainter::boundingRect() - code now shared.
+
+ Use QFontMetrics::size() in button size hints, thus allowing multi-line
+ button labels. Position checkbox/radiobutton top-left.
+
+
+src/kernel/qpm_x11.cpp 2.30 eiriken +78 -3 (1998/03/02)
+
+ Fix convertToImage() for pixmaps with other than 8-bit-per-channel.
+
+
+src/kernel/qpixmap.cpp 2.24 hanord +7 -33
+src/kernel/qpixmap.h 2.16 hanord +21 -2
+src/kernel/qpm_win.cpp 2.32 hanord +110 -51
+src/kernel/qpm_x11.cpp 2.31 hanord +165 -84
+src/kernel/qptd_win.cpp 2.7 hanord +102 -29
+src/kernel/qptd_x11.cpp 2.10 hanord +41 -11
+
+ Implemented masked bitBlt for Windows 95.
+ Added QPixmap::setOptimization() which replaces the old optimize function.
+ E.g. setOptimization(QPixmap::BestOptim) to get much faster masked bitBlts.
+ Removed the dirty system, instead delete cached data whenever the pixmap
+ is changed.
+
+
+src/kernel/qprinter.h 2.3 eiriken +6 -1
+src/kernel/qprn_win.cpp 2.7 eiriken +17 -7
+src/kernel/qprn_x11.cpp 2.7 eiriken +10 -5
+src/kernel/qpsprn.cpp 2.9 eiriken +8 -10
+
+ Take display vs. font resolution into account for printer font metrics.
+
+
+src/kernel/qpshdr.txt 2.3 agulbra +91 -3
+src/kernel/qpsprn.cpp 2.10 agulbra +644 -88
+
+ added iso-8859-1 support
+
+ also added better font support. try to print palatino, and the printer
+ goes "hm, is palatino installed? if not, perhaps garamond is installed?
+ if not, is times installed? if not, well, courier MUST work".
+
+ finally, if I understand the postscript book correctly I think I made
+ two-font postscript text output a little faster. the code now attempts
+ to use variables for fonts and call findfont/makefont just once per font
+ change per page.
+
+ this code is not perfect. the hacky stuff that does font substitution
+ needs tweaking, and at present the code believes that all the world is
+ iso-8859-1. will fix that.
+
+ postscript is fun.
+
+
+src/widgets/qmenudta.cpp 2.10 warwick +4 -4
+
+ Fix this->changeItem(this->pixmap(), "crashme")
+
+
+src/kernel/qapp_win.cpp 2.74 agulbra +7 -2 (1998/03/10)
+
+ Set WState_Visible correctly when the window is (de)iconified.
+
+
+src/kernel/qdrawutl.cpp 2.16 warwick +5 -3 (1998/03/11)
+src/kernel/qpmcache.cpp 2.3 warwick +77 -5
+src/kernel/qpmcache.h 2.3 warwick +3 -1
+src/kernel/qptr_x11.cpp 2.36 warwick +5 -3
+src/tools/qgcache.cpp 2.5 warwick +10 -2
+
+ Fix extremely-unlikely-to-be-triggered undeleted cached pixmaps.
+ Provide safer QPixmapCache find() and insert().
+
+
+src/widgets/qbutton.h 2.14 agulbra +3 -2 (1998/03/12)
+
+ add toggle()
+
+
+src/tools/qregexp.cpp 2.7 agulbra +23 -18
+
+ implement [] in wildcard mode
+
+
+src/kernel/qobject.cpp 2.44 agulbra +29 -11
+src/kernel/qobject.h 2.9 agulbra +5 -1
+src/widgets/qbuttonrow.cpp 1.3 agulbra +8 -6
+src/widgets/qframe.cpp 2.16 agulbra +4 -4
+src/widgets/qheader.cpp 2.30 agulbra +6 -4
+src/widgets/qlcdnum.cpp 2.9 agulbra +7 -5
+src/widgets/qmainwindow.cpp 2.9 agulbra +4 -3
+src/widgets/qscrbar.cpp 2.33 agulbra +14 -14
+src/widgets/qslider.cpp 2.48 agulbra +4 -4
+src/widgets/qtablevw.cpp 2.42 agulbra +10 -8
+src/widgets/qtoolbar.cpp 2.10 agulbra +4 -4
+
+ provide QObject::name( const char * defaultName ).
+
+ use name( "unnamed" ) in all the debug() calls, to avoid segfaults
+ where printf() won't handle null pointers.
+
+
+src/tools/qstring.cpp 2.18 agulbra +5 -9
+
+ toDouble() of a null string now sets ok to FALSE
+
+
+src/widgets/qcombo.cpp 2.73 agulbra +54 -49
+src/widgets/qcombo.h 2.25 agulbra +3 -1
+
+ tweaked size hint for toolbar use. provide functions to change the
+ line-edit without changint the combo's contents.
+
+
+src/kernel/qapp_win.cpp 2.78 warwick +13 -2
+
+ Don't let Windows beep on WM_SYSCHAR events.
+ Beep on unaccepted accelerations.
+
+
+src/kernel/qpainter.cpp 2.29 hanord +96 -17
+src/kernel/qptr_x11.cpp 2.40 hanord +2 -70
+
+ Fixed QPainter::drawPixmap() bug (mono bitmaps with self-masks)
+ Moved platform indep. code to qpainter.cpp
+ Put back CtorBegin
+
+
+src/widgets/qbttngrp.cpp 2.9 agulbra +14 -2
+src/widgets/qbttngrp.h 2.5 agulbra +3 -1
+
+ added setButton() - very useful when you want to force one member of
+ an exclusive button group to on but not keep around pointers to
+ umpteen radio buttons.
+
+
+src/kernel/qprinter.cpp 2.5 agulbra +31 -6
+src/kernel/qprinter.h 2.5 agulbra +6 -2
+
+ added setPageOrder()
+
+
+src/kernel/qobject.cpp 2.45 agulbra +18 -2
+
+ give better warnings in case of connect() mismatches.
+
+
+src/dialogs/qprndlg.cpp 2.4 agulbra +258 -112
+src/dialogs/qprndlg.h 2.5 agulbra +9 -2
+
+ it's finished. please have a look. and please do debug. I don't
+ know about any bugs now, but I'm sure there are some.
+
+
+src/widgets/qcombo.cpp 2.75 agulbra +15 -6
+
+ magic hack to make combos usable in dialogs. (QDialog breaks the
+ combo Enter key press.)
+
+
+src/dialogs/qprndlg.cpp 2.3 agulbra +543 -187
+src/dialogs/qprndlg.h 2.4 agulbra +24 -10
+src/kernel/qprn_x11.cpp 2.8 agulbra +4 -2
+
+ new better-looking print dialog and a new static function to configure
+ a QPrinter (replaces QPrinter::setup() - kernel/* should not use
+ dialogs/*).
+
+ noteworthy points:
+
+ - the new static function appears to write over something it
+ shouldn't. I don't see why, but it does seem to cause crashes
+ later on. the old function works. I'm committing so I can run
+ purify on solaris.
+ - the dialog lacks accelerators.
+ - I haven't put in solaris /etc/lp/ support yet. should be fairly
+ easy, but I haven't done it.
+ - the layout will benefit from Warwick's alternative space
+ distribution
+ - the awful message in qprndlg.h is gone gone gone.
+
+
+src/dialogs/qprndlg.cpp 2.5 agulbra +119 -23 (1998/03/15)
+
+ /etc/lp support
+
+
+src/widgets/qcombo.cpp 2.76 agulbra +2 -3
+
+ don't ignore key events, just don't accept them.
+
+
+src/kernel/qapp.cpp 2.48 agulbra +3 -2
+src/kernel/qfont.cpp 2.27 agulbra +11 -5
+
+ look at $LANG and try to pick an application font that suits $LANG.
+ the application font used is 12-point helvetica. if the locale isn't
+ in the list I built from XFree86's locale.alias, I assume 8859-1 is
+ okay.
+
+ copy character set from defFont in the relevant QFont constructor.
+
+ this code assumes that helvetica includes the appropriate character
+ set.
+
+
+examples/qmag/qmag.cpp 2.13 warwick +39 -2
+
+ Crazy hard-disk chewing MultiSave option. Great when you want to make
+ animated GIFs for your web pages.
+
+
+src/dialogs/qprndlg.cpp 2.8 warwick +4 -4
+src/kernel/qsize.cpp 2.6 warwick +9 -3
+src/kernel/qsize.h 2.6 warwick +9 -3
+
+ Add QSize::expandedTo(), and boundedTo().
+
+
+src/kernel/qwidget.cpp 2.92 agulbra +7 -6
+
+ remove the widget's willingness to accept focus-in events very early
+ in the destructor
+
+
+src/tools/qgdict.cpp 2.11 warwick +56 -11 (1998/03/17)
+src/tools/qgdict.h 2.3 warwick +3 -1
+
+ Add QDict::resize(int).
+
+
+src/widgets/qlined.cpp 2.64 agulbra +46 -9
+src/widgets/qlined.h 2.25 agulbra +6 -2
+
+ add setSelection() and setCursorPosition()
+
+
+src/widgets/qcombo.cpp 2.77 agulbra +86 -11
+src/widgets/qcombo.h 2.26 agulbra +4 -1
+
+ setAutoCompletion() - works really nicely.
+
+
+src/kernel/qiconset.cpp 2.1 agulbra initial checkin
+src/kernel/qiconset.h 2.1 agulbra initial checkin
+
+ QIconSet first checking. QIconSet is neat: You give it one or more
+ icons, and it completes the set so you get large and small disabled,
+ active and normal icons. QToolButton uses it, QMenuData will soon.
+
+
+src/kernel/qpainter.cpp 2.31 agulbra +18 -2
+src/kernel/qpainter.h 2.22 agulbra +2 -1
+
+ added drawImage() by request of eng. did NOT implement the QPrinter
+ shortcut he asked for.
+
+
+src/kernel/qapp.cpp 2.49 warwick +10 -6 (1998/03/19)
+
+ Ensure mouserelease goes to widget that got mousepress.
+ Document -ncols better.
+
+
+examples/qdir/GNUmakefile 1.1 warwick initial checkin
+examples/qdir/Makefile 1.1 warwick initial checkin
+examples/qdir/qdir.cpp 1.1 warwick initial checkin
+
+ Tests QFileDialog features.
+
+
+extensions/nsplugin/src/qnp.cpp 1.18 warwick +4 -1
+
+ Work for multi-visual displays.
+
+
+extensions/opengl/examples/box/.cvsignore 1.2 aavit +0 -1
+extensions/opengl/examples/box/glbox.cpp 1.4 aavit +15 -6
+extensions/opengl/examples/box/glbox.h 1.5 aavit +2 -1
+extensions/opengl/examples/gear/gear.cpp 1.5 aavit +26 -35
+extensions/opengl/src/qgl.cpp 1.18 aavit +127 -41
+extensions/opengl/src/qgl.h 1.8 aavit +80 -77
+
+ New features in OpenGL extension:
+ 1) virtual initalizeGL() method in QGLWidget; facilitates easier GL initialization.
+ 2) Added support for using shared OpenGL display lists
+ 3) Added sharedbox example showing this feature.
+
+
diff --git a/dist/changes-1.39-19980406 b/dist/changes-1.39-19980406
new file mode 100644
index 0000000..63b3dbb
--- /dev/null
+++ b/dist/changes-1.39-19980406
@@ -0,0 +1,286 @@
+src/kernel/qpainter.cpp 2.127 agulbra +37 -6 (1998/03/30)
+
+ sort of parse $LANG
+
+
+src/kernel/qpainter.cpp 2.35 warwick +5 -4 (1998/03/30)
+
+ Fix TAB expansion in QPainter::drawText (and hence QMultiLineEdit).
+
+
+src/widgets/qlined.cpp 2.68 agulbra +3 -3
+
+ didn't repaint cursor properly when moving the cursor leftwards
+
+
+src/kernel/qfnt_x11.cpp 2.34 warwick +20 -13 (1998/03/31)
+
+ Some fonts don't have per_char information.
+
+
+src/kernel/qrgn_win.cpp 2.6 hanord +11 -9 (1998/04/01)
+
+ Bug fixes for the new getRects and boundingRect functions
+
+
+src/kernel/qregion.h 2.8 hanord +4 -1
+src/kernel/qrgn_win.cpp 2.5 hanord +42 -2
+src/kernel/qrgn_x11.cpp 2.5 hanord +50 -2
+
+ New QRegion functions:
+ boundingRect() returns the bounding rectangle of the region
+ getRects() returns an array of the rectangles that make up the region
+
+
+src/widgets/qmainwindow.cpp 2.13 agulbra +46 -3 (1998/04/02)
+src/widgets/qmainwindow.h 2.9 agulbra +9 -4
+src/widgets/qtoolbar.cpp 2.15 agulbra +20 -5
+src/widgets/qtoolbar.h 2.7 agulbra +5 -2
+src/widgets/qtoolbutton.cpp 2.20 agulbra +25 -17
+
+ button pixmap size change support
+
+
+src/kernel/qiconset.cpp 2.5 agulbra +18 -4
+src/kernel/qiconset.h 2.3 agulbra +4 -3
+src/widgets/qpushbt.cpp 2.37 agulbra +62 -3
+src/widgets/qpushbt.h 2.7 agulbra +5 -1
+src/widgets/qtoolbutton.cpp 2.19 agulbra +31 -5
+src/widgets/qtoolbutton.h 2.4 agulbra +6 -2
+
+ new functionality, menu buttons
+
+
+src/kernel/qgmanagr.cpp 2.30 paul +18 -2
+src/kernel/qgmanagr.h 2.11 paul +3 -2
+src/widgets/qhbox.cpp 1.9 paul +53 -2
+src/widgets/qhbox.h 1.6 paul +6 -1
+
+ pack() added, addStretch() now work
+
+
+src/kernel/qpainter.cpp 2.37 warwick +36 -8 (1998/04/03)
+src/kernel/qpainter.h 2.23 warwick +11 -1
+
+ Add more QPainter::drawImage calls (but still not implement QPrinter stuff)
+
+
+src/widgets/qmainwindow.cpp 2.14 warwick +4 -4
+src/widgets/qmainwindow.h 2.10 warwick +2 -2
+
+ Allow WFlags to QMainWindow.
+
+
+src/kernel/qregion.cpp 2.7 warwick +4 -2
+src/kernel/qrgn_x11.cpp 2.6 warwick +4 -3
+
+ Disable BOP
+
+
+src/widgets/qscrollview.cpp 2.23 warwick +7 -5
+src/widgets/qscrollview.h 2.13 warwick +2 -2
+
+ Emit signal earlier.
+
+
+src/widgets/qscrollview.cpp 2.22 warwick +34 -16
+src/widgets/qscrollview.h 2.12 warwick +3 -1
+
+ Low level hook for painting on existing painter.
+ Direct position set function.
+
+
+src/kernel/qimage.cpp 2.80 warwick +64 -6
+
+ Optimize a very common case.
+
+
+examples/showimg/showimg.cpp 2.21 warwick +67 -9
+examples/showimg/showimg.h 2.8 warwick +7 -0
+
+ Use new QImage bitBlt
+
+
+src/dialogs/qprndlg.cpp 2.15 agulbra +35 -2
+src/dialogs/qprndlg.h 2.8 agulbra +2 -1
+src/kernel/qprinter.cpp 2.7 agulbra +53 -8
+src/kernel/qprinter.h 2.6 agulbra +6 -2
+
+ added QPrinter::ColorMode and corresponding stuff in the printer
+ dialog.
+
+
+src/kernel/qimage.cpp 2.79 warwick +183 -3
+src/kernel/qimage.h 2.25 warwick +16 -1
+src/kernel/qpaintd.h 2.6 warwick +5 -1
+src/kernel/qpainter.cpp 2.36 warwick +12 -2
+src/kernel/qpixmap.h 2.19 warwick +3 -1
+
+ bitBlt for QImages
+ - copy image subarea to position in paintdevice or an image
+
+
+src/kernel/qgmanagr.cpp 2.31 paul +89 -25
+
+ handle empty layouts in a slightly better way
+
+
+src/dialogs/qprndlg.cpp 2.17 agulbra +14 -5
+
+ move focus intelligently when the users clicks 'print to file' or
+ 'print to printer'
+
+
+src/dialogs/qfiledlg.cpp 2.51 agulbra +64 -4
+src/dialogs/qfiledlg.h 2.13 agulbra +5 -1
+
+ new function, addWidgets(). very limited extensibility, designed so
+ that it's easier to reimplement it as syntax sugar if/when we put in a
+ proper extension method.
+
+
+src/dialogs/qprndlg.cpp 2.16 agulbra +7 -12
+
+ no A3
+
+
+src/dialogs/qfiledlg.cpp 2.52 agulbra +11 -7
+
+ save a little memory, be a little bug-free
+
+
+src/widgets/qcombo.cpp 2.81 agulbra +24 -19
+
+ use 1-pixel frame around lineedit in motif style.
+
+
+src/widgets/qmainwindow.cpp 2.15 agulbra +82 -14
+src/widgets/qmainwindow.h 2.11 agulbra +7 -4
+src/widgets/qtoolbar.cpp 2.16 agulbra +46 -11
+src/widgets/qtoolbar.h 2.8 agulbra +8 -2
+src/widgets/qtoolbutton.cpp 2.21 agulbra +4 -4
+
+ various improvements in look&feel, stretchable space, stretchable widgets
+
+
+src/kernel/qpainter.cpp 2.38 hanord +72 -64 (1998/04/04)
+src/kernel/qpainter.h 2.24 hanord +14 -4
+src/kernel/qptr_x11.cpp 2.43 hanord +115 -2
+
+ Added QPainter::drawTiledPixmap, not for Windows yet
+
+
+src/kernel/qpainter.cpp 2.39 hanord +6 -2
+src/kernel/qpainter.h 2.25 hanord +8 -2
+src/kernel/qptr_x11.cpp 2.44 hanord +5 -6
+
+ Added overloaded drawTiledPixmap( const QRect &r, const QPixmap &pm )
+
+
+src/widgets/qlistview.cpp 2.87 warwick +5 -5
+src/widgets/qscrollview.cpp 2.25 warwick +266 -96
+src/widgets/qscrollview.h 2.15 warwick +19 -5
+
+ Allow arbitrary child objects positioned at int coords in QScrollView.
+
+
+src/widgets/qlistview.cpp 2.86 warwick +5 -5
+src/widgets/qscrollview.cpp 2.24 warwick +35 -11
+src/widgets/qscrollview.h 2.14 warwick +3 -2
+
+ Fix refresh problen in QScrollView.
+
+
+examples/widgets/widgets.cpp 2.39 warwick +4 -0
+
+ Show bug in recreate
+
+
+examples/scrollview/scrollview.cpp 1.8 warwick +49 -5
+
+ Test new arbitrary-number-of-children code.
+
+
+src/qt.pro 2.20 warwick +2 -0
+
+ fix dependencies
+
+
+src/widgets/qstatusbar.cpp 2.4 agulbra +4 -2
+
+ less flicker
+
+
+src/widgets/qmainwindow.cpp 2.16 agulbra +10 -18
+src/widgets/qtoolbar.cpp 2.17 agulbra +6 -5
+
+ move motif style away from what the OSF probably would have done,
+ closer towards what Netscape and Microsoft has done.
+
+
+src/kernel/qptr_x11.cpp 2.45 hanord +8 -11
+
+ tilepixmap optimized for the common case (no mask)
+
+src/widgets/qmenudta.cpp 2.13 eiriken +101 -2 (1998/04/05)
+src/widgets/qmenudta.h 2.10 eiriken +12 -1
+
+ Added new insertItem functions
+
+
+src/widgets/qmlined.cpp 2.89 eiriken +14 -1
+src/widgets/qmlined.h 2.33 eiriken +3 -1
+
+ Added setFixedVisibleLines
+
+
+src/widgets/qscrollview.cpp 2.29 warwick +10 -4
+src/widgets/qscrollview.h 2.17 warwick +2 -1
+
+ Fix child deletion.
+
+
+src/widgets/qscrollview.cpp 2.32 warwick +2 -2
+src/widgets/qtoolbutton.cpp 2.22 warwick +12 -2
+
+ Focus indication in toolbutton.
+
+
+src/kernel/qfocusdata.h 2.1 warwick initial checkin
+src/kernel/qwidget.cpp 2.97 warwick +24 -15
+src/kernel/qwidget.h 2.47 warwick +4 -2
+src/widgets/qscrollview.cpp 2.31 warwick +59 -7
+src/widgets/qscrollview.h 2.18 warwick +3 -1
+
+ Focus traversal among QScrollView children.
+
+
+examples/scrollview/scrollview.cpp 1.9 warwick +19 -20
+src/widgets/qlistview.cpp 2.88 warwick +18 -18
+src/widgets/qscrollview.cpp 2.27 warwick +38 -61
+src/widgets/qscrollview.h 2.16 warwick +2 -1
+
+ Negate position sense.
+
+
+src/dialogs/qprndlg.cpp 2.18 hanord +4 -3
+src/kernel/qprn_x11.cpp 2.9 hanord +4 -4
+
+ QPrinter::setup() uses the QPrintDialog::getPrinterSetup() function
+
+
+src/kernel/qptr_win.cpp 2.31 hanord +108 -2
+
+ Tiled pixmap implemented, but no optimization yet
+
+src/widgets/qlined.cpp 2.69 agulbra +21 -3
+
+ handle double-click correctly
+ handle c-k
+
+src/widgets/qlistview.cpp 2.90 eiriken +17 -2 (1998/04/06)
+src/widgets/qlistview.h 2.42 eiriken +2 -1
+src/widgets/qstatusbar.cpp 2.5 eiriken +8 -7
+
+ Added rightButtonPressed signal and removed the resizer
+
diff --git a/dist/changes-1.39-19980414 b/dist/changes-1.39-19980414
new file mode 100644
index 0000000..11e9b37
--- /dev/null
+++ b/dist/changes-1.39-19980414
@@ -0,0 +1,173 @@
+examples/qdir/qdir.cpp 1.2 warwick +4 -3 (1998/04/06)
+
+ better captions
+
+
+src/widgets/qscrollview.cpp 2.34 warwick +11 -1
+
+ clean up in destructor code.
+
+
+src/widgets/qlined.cpp 2.70 agulbra +6 -4
+
+ don't start drags just now
+
+
+examples/scrollview/scrollview.cpp 1.10 warwick +2 -2
+
+ make it Big
+
+
+src/kernel/qapp_x11.cpp 2.127 agulbra +37 -6
+src/kernel/qfont.h 2.9 agulbra +3 -2
+
+ sort of parse $LANG
+
+
+examples/application/main.cpp 1.2 warwick +3 -2
+
+ use setMainWidget
+
+
+extensions/opengl/src/qgl.pro 1.8 warwick +1 -1 (1998/04/08)
+
+ Building libqgl doesn't need -lqgl
+
+
+src/dialogs/qfiledlg.cpp 2.54 agulbra +74 -21
+src/dialogs/qfiledlg.h 2.14 agulbra +5 -3
+
+ allow setting of initial file name when using statics.
+
+src/dialogs/qfiledlg.cpp 2.55 agulbra +11 -11
+
+ allow setting thename of a nonexistent file as initial default in
+ getSaveFileName()
+
+
+src/kernel/qpsprn.cpp 2.13 agulbra +4 -4
+
+ avoid at-least-a-warning-at-most-an-UMR.
+
+
+src/moc/moc.pro 1.9 warwick +1 -1
+
+ include qt include
+
+
+extensions/opengl/src/qgl.pro 1.9 warwick +1 -1
+
+ more -lqgl
+
+
+src/tools/qglobal.h 2.48 agulbra +4 -1
+
+ openbsd
+
+
+src/widgets/qsplitter.h 1.7 agulbra +3 -3
+
+ remove semicolon after Q_OBJECT
+
+
+src/dialogs/qfiledlg.cpp 2.53 agulbra +15 -3
+
+ say "Readable, writable" and so on instead of ASHR (shades of MS-DOS)
+
+
+src/widgets/qlcdnum.cpp 2.11 agulbra +17 -2
+src/widgets/qlcdnum.h 2.7 agulbra +3 -1
+
+ sizeHint(). decent minimum size using the golden mean.
+
+
+src/moc/GNUmakefile 2.4 warwick +11 -3
+src/moc/moc.pro 1.8 warwick +1 -1
+src/moc/moc.t 1.11 warwick +1 -1
+src/moc/moc.t 1.10 warwick +1 -1
+
+ yacc flags
+
+
+src/kernel/qpainter.cpp 2.40 warwick +4 -4 (1998/04/09)
+src/widgets/qmlined.cpp 2.90 warwick +4 -2
+src/widgets/qscrollview.cpp 2.35 warwick +39 -33
+
+ Fixed cursor position in QMultiLineEdit.
+ Fixed focus navigation in QScrollView.
+
+
+src/widgets/qscrollview.cpp 2.36 agulbra +8 -3
+
+ be a little more careful about event processing - removeChild() was
+ called from QScrollViewData destructor and didn't like that.
+
+
+src/kernel/qprn_x11.cpp 2.10 agulbra +62 -77
+src/kernel/qpsprn.cpp 2.14 agulbra +1525 -157
+src/kernel/qpsprn.h 2.5 agulbra +17 -9
+
+ added support for character encodings other than iso 8859-1. the
+ header is computed dynamically; the fonts and encodings used on the
+ first few pages are put in the header, any other fonts and encodings
+ are added to the output stream as necessary. removed the need for a
+ temporary file. rewrote the font name cache so two QPSPrinter objects
+ printing at the same time won't conflict. put back in the header size
+ compression.
+
+
+src/widgets/qcombo.cpp 2.82 warwick +3 -3 (1998/04/13)
+
+ Correct sizeHint.
+
+
+src/widgets/qscrollview.cpp 2.37 warwick +22 -18
+src/widgets/qscrollview.h 2.19 warwick +1 -2
+
+ Improve focus tabbing.
+
+
+src/kernel/qwidget.cpp 2.98 warwick +60 -16
+src/kernel/qwidget.h 2.48 warwick +3 -1
+
+ Inherit *parents* palette, not application palette *** CHANGED BEHAVIOUR ***
+ Generalize isEnabledToTLW and isVisibleToTLW
+
+
+src/widgets/qtablevw.cpp 2.44 warwick +8 -28
+
+ Propagate palette changes to scrollbars.
+ Combine common code.
+
+
+src/widgets/qlistview.cpp 2.91 warwick +24 -6
+src/widgets/qlistview.h 2.43 warwick +5 -3
+
+ Provide parent() of list view item.
+
+
+src/widgets/qlistbox.cpp 2.61 warwick +45 -3
+src/widgets/qlistbox.h 2.15 warwick +6 -2
+
+ Update maxItemWidth on font change.
+ Add sizeHint()
+
+src/kernel/qregion.cpp 2.8 hanord +84 -51 (1998/04/14)
+src/kernel/qregion.h 2.9 hanord +12 -3
+src/kernel/qrgn_win.cpp 2.11 hanord +39 -25
+src/kernel/qrgn_x11.cpp 2.11 hanord +48 -29
+
+ Removed the internal (and slow) byte array.
+ Uses the region rectangles for saving complex regions.
+
+
+src/widgets/qchkbox.cpp 2.20 warwick +5 -4
+src/widgets/qradiobt.cpp 2.25 warwick +9 -4
+
+ Small sizeHint when no text or pixmap.
+
+
+src/kernel/qptr_win.cpp 2.32 agulbra +5 -2
+src/kernel/qptr_x11.cpp 2.46 agulbra +5 -2
+
+ clip properly in drawPixmap().
diff --git a/dist/changes-1.39-19980506 b/dist/changes-1.39-19980506
new file mode 100644
index 0000000..35d9ed0
--- /dev/null
+++ b/dist/changes-1.39-19980506
@@ -0,0 +1,555 @@
+doc/classes.doc 1.5 warwick +3 -3
+
+ 4 columns, not 3.
+
+
+doc/headers.doc 1.5 warwick +4 -2
+
+ Multicolumns.
+
+
+doc/moc.doc 2.11 eiriken +11 -4
+
+ Corrected nested classes bug
+
+
+examples/application/application.cpp 1.4 agulbra +2 -3
+
+ updated for new qtoolbar api
+
+
+examples/scrollview/scrollview.cpp 1.11 warwick +25 -9
+
+ Use older style.
+
+
+extensions/opengl/examples/sharedbox/GNUmakefile 1.1 hanord initial checkin
+extensions/opengl/examples/sharedbox/Makefile 1.2 hanord +6 -90
+
+ new makefiles
+
+
+extensions/opengl/examples/sharedbox/sharedbox.pro 1.2 hanord +1 -1
+
+ Added "opengl" to CONFIG
+
+
+src/dialogs/qfiledlg.cpp 2.56 paul +3 -3
+
+ make it compile on windows
+
+
+src/dialogs/qfiledlg.cpp 2.57 warwick +6 -5
+
+ Implement "initial selection" for Win-specific calls.
+
+
+src/dialogs/qfiledlg.cpp 2.58 agulbra +21 -2
+
+ insert the root drives in the paths combo
+
+
+src/dialogs/qfiledlg.cpp 2.59 agulbra +11 -11
+
+ alight size stuff correctly
+ list all drives under windows
+
+ there's an aborted attempt at handling double-click in multi-column
+ view in there, too. I'll think about it and complete it asap.
+
+
+src/dialogs/qfiledlg.cpp 2.60 agulbra +21 -8
+
+ draw the icons again.
+
+
+src/dialogs/qfiledlg.cpp 2.61 agulbra +23 -6
+
+ output date and time in a better format. handle column width better.
+
+
+src/dialogs/qfiledlg.cpp 2.62 agulbra +190 -23
+src/dialogs/qfiledlg.h 2.15 agulbra +20 -1
+
+ more polish. in this round:
+ - correct handling of double-click and arrow keys in the multi-column
+ list (partly done using an evil hack, see mouseDoubleClickEvent())
+ - the ability to install file type icons (the default draws a
+ directory icon, nothing else)
+ - correct enter handling in the paths and types combo boxes
+ - correct tab order
+
+
+src/dialogs/qfiledlg.cpp 2.63 agulbra +21 -26
+
+ setEnabled( cd up button )
+ tweak accessibility texts
+
+
+src/dialogs/qfiledlg.cpp 2.64 hanord +3 -3
+
+ Adds cast to avoid compiling problem for MSVC++
+
+
+src/dialogs/qfiledlg.cpp 2.65 agulbra +29 -7
+
+ experimental filename completion. hacky and a little buggy in certain
+ odd and harmless cases.
+
+
+src/dialogs/qfiledlg.h 2.16 agulbra +4 -5
+
+ remove unnecessary friend declaration
+
+
+src/dialogs/qprndlg.cpp 2.19 agulbra +3 -3
+
+ work around broken gcc warning
+
+
+src/kernel/qapp_win.cpp 2.84 warwick +5 -2
+
+ Work-around focus problem with recreate.
+
+
+src/kernel/qapp_win.cpp 2.85 warwick +5 -4
+
+ Robustness.
+
+
+src/kernel/qapp_x11.cpp 2.128 warwick +9 -9
+src/kernel/qclb_x11.cpp 2.9 warwick +4 -4
+src/kernel/qcol_x11.cpp 2.26 warwick +13 -12
+src/kernel/qimage.cpp 2.83 warwick +11 -10
+src/kernel/qnpsupport.cpp 2.7 warwick +3 -3
+src/kernel/qpm_x11.cpp 2.33 warwick +12 -12
+src/kernel/qpsprn.cpp 2.16 warwick +3 -3
+src/kernel/qrgn_x11.cpp 2.12 warwick +3 -3
+src/kernel/qt_xdnd.cpp 2.7 warwick +5 -5
+src/kernel/qwid_x11.cpp 2.89 warwick +21 -19
+src/tools/qdatetm.cpp 2.12 warwick +4 -4
+
+ Avoid warnings.
+
+
+src/kernel/qapp_x11.cpp 2.130 warwick +3 -3
+
+ strcasecmp -> qstricmp
+
+
+src/kernel/qapp_x11.cpp 2.131 agulbra +14 -3
+src/kernel/qclipbrd.cpp 2.7 agulbra +2 -6
+src/kernel/qdnd_win.cpp 2.3 agulbra +23 -1
+src/kernel/qdnd_x11.cpp 2.3 agulbra +84 -8
+src/kernel/qdragobject.cpp 2.11 agulbra +24 -23
+src/kernel/qdragobject.h 2.7 agulbra +6 -3
+
+ some more stuff works
+
+
+src/kernel/qapp_x11.cpp 2.132 eiriken +4 -3
+src/kernel/qcol_x11.cpp 2.27 eiriken +6 -4
+src/kernel/qimage.cpp 2.84 eiriken +11 -7
+src/kernel/qmetaobj.cpp 2.7 eiriken +6 -4
+src/kernel/qmovie.cpp 1.31 eiriken +8 -5
+src/kernel/qpm_x11.cpp 2.34 eiriken +6 -4
+src/kernel/qwid_win.cpp 2.52 eiriken +4 -4
+src/kernel/qwid_x11.cpp 2.91 eiriken +4 -4
+src/kernel/qwidget.cpp 2.101 eiriken +6 -4
+
+ Check for delete[] 0 to avoid purify warnings.
+
+
+src/kernel/qclb_x11.cpp 2.8 hanord +5 -2
+
+ Debugging code commented out
+
+
+src/kernel/qclipbrd.h 2.4 agulbra +2 -1
+src/kernel/qfocusdata.h 2.2 agulbra +2 -2
+src/widgets/qlistview.h 2.45 agulbra +3 -3
+src/widgets/qsplitter.h 1.8 agulbra +2 -2
+
+ "friend class", not "friend"
+
+
+src/kernel/qdnd_win.cpp 2.2 agulbra +2 -2
+src/kernel/qdnd_x11.cpp 2.2 agulbra +3 -3
+src/kernel/qevent.h 2.13 agulbra +2 -2
+
+ return a proper object for the drag data, not a reference to a
+ probably-deleted object.
+
+
+src/kernel/qdnd_x11.cpp 2.4 agulbra +24 -18
+src/kernel/qdragobject.h 2.8 agulbra +1 -2
+
+ another little bit.
+
+
+src/kernel/qdnd_x11.cpp 2.5 agulbra +6 -24
+
+ drop some of the debugging messages
+
+
+src/kernel/qevent.cpp 2.13 aavit +9 -6
+
+ Doc.
+
+
+src/kernel/qfnt_win.cpp 2.26 warwick +4 -4
+
+ Typo. Will fix (unreported) strange problems with some fonts on Windows.
+
+
+src/kernel/qgmanagr.cpp 2.32 warwick +26 -22
+
+ Flatten.
+
+
+src/kernel/qimage.cpp 2.82 warwick +6 -3
+src/widgets/qlistbox.cpp 2.62 warwick +14 -2
+src/widgets/qlistview.cpp 2.98 warwick +4 -4
+src/widgets/qscrollview.cpp 2.41 warwick +5 -5
+
+ docs
+
+
+src/kernel/qpaintdc.h 2.5 eiriken +4 -2
+src/kernel/qpainter.cpp 2.44 eiriken +38 -11
+src/kernel/qprn_win.cpp 2.8 eiriken +31 -13
+src/kernel/qpsprn.cpp 2.18 eiriken +46 -30
+src/kernel/qpsprn.h 2.6 eiriken +4 -1
+src/kernel/qptr_win.cpp 2.34 eiriken +4 -2
+src/kernel/qregion.h 2.10 eiriken +2 -1
+
+ drawImage support in QPrinter
+
+
+src/kernel/qpainter.cpp 2.41 warwick +17 -2
+
+ Fix OpaqueMode in drawText(...QRect...).
+
+
+src/kernel/qpainter.cpp 2.42 warwick +5 -9
+
+ fix.
+
+
+src/kernel/qpainter.cpp 2.43 warwick +2 -12
+
+ Revert drawText semantics changed.
+
+
+src/kernel/qpainter.cpp 2.45 hanord +6 -2
+src/kernel/qprn_win.cpp 2.9 hanord +5 -4
+
+ Fixed Windows-specific typos, now compiles
+
+
+src/kernel/qprn_x11.cpp 2.11 agulbra +14 -6
+
+ avoid getdtablesize(), and set FD_CLOEXEC on just the X connection
+ instead of on all open files.
+
+
+src/kernel/qpsprn.cpp 2.15 agulbra +6 -6
+
+ mention the defining rfc for koi8-r
+
+
+src/kernel/qpsprn.cpp 2.17 warwick +438 -428
+
+ Avoid a HUGE C string, save some memory.
+
+
+src/kernel/qptd_x11.cpp 2.12 warwick +4 -4
+
+ Restore speed of normal-optimized pixmaps to Qt 1.3x height.
+
+
+src/kernel/qptd_x11.cpp 2.13 hanord +7 -9
+
+ Warwick's change ACK'd
+
+
+src/kernel/qptr_win.cpp 2.32 agulbra +5 -2
+src/kernel/qptr_x11.cpp 2.46 agulbra +5 -2
+
+ clip properly in drawPixmap().
+
+
+src/kernel/qptr_x11.cpp 2.47 eiriken +21 -17
+
+ Fixed infinite loop bug in internal function drawTile and
+ renamed variables to make the code readable.
+
+
+src/kernel/qregion.cpp 2.8 hanord +84 -51
+src/kernel/qregion.h 2.9 hanord +12 -3
+src/kernel/qrgn_win.cpp 2.11 hanord +39 -25
+src/kernel/qrgn_x11.cpp 2.11 hanord +48 -29
+
+ Removed the internal (and slow) byte array.
+ Uses the region rectangles for saving complex regions.
+
+
+src/kernel/qregion.cpp 2.9 warwick +14 -2
+
+ Implement missing function.
+
+
+src/kernel/qsignalmapper.cpp 1.2 warwick +2 -2
+src/kernel/qsignalmapper.h 1.2 warwick +2 -2
+
+ fix function name
+
+
+src/kernel/qsignalmapper.cpp 1.3 warwick +2 -2
+src/widgets/qtablevw.cpp 2.45 warwick +3 -3
+
+ oops
+
+
+src/kernel/qwid_win.cpp 2.51 agulbra +7 -2
+
+ if recreating a widget with no children that accept focus, and which
+ does not accept focus itself, to be a top-level widget, set up a focus
+ chain. hopefully this will fix a focus bug on windows.
+
+
+src/kernel/qwidget.cpp 2.100 agulbra +4 -4
+src/kernel/qwidget.cpp 2.99 agulbra +9 -7
+
+ try a little harder to make QWidget::focusWidget() return something.
+ this should make focus in top-level widgets created by recreate()
+ behave like in top-level widgets created by new.
+
+
+src/moc/moc.1 2.6 eiriken +20 -5
+
+ Corrected nested classes bug.
+
+
+src/moc/moc.y 2.21 eiriken +3 -5
+
+ Removed warning "unexpected ':'" in nested classes.
+
+
+src/qt.pro 2.21 warwick +2 -1
+
+ Dependencies under Windows.
+
+
+src/qt.pro 2.23 warwick +2 -0
+src/kernel/qsignalmapper.cpp 1.1 warwick initial checkin
+src/kernel/qsignalmapper.h 1.1 warwick initial checkin
+
+ QSignalMapper - like a button group superclass.
+
+
+src/tools/qdir.cpp 2.19 agulbra +36 -4
+src/tools/qdir.h 2.7 agulbra +3 -1
+
+ added new QDir::drives()
+
+ this breaks windows horribly, because I simply couldn't remember the
+ function call to use there. haavard, add a few lines of code in the
+ morning, will you?
+
+
+src/tools/qdir.cpp 2.20 agulbra +18 -10
+
+ implement drives() for windows. now to test.
+
+
+src/tools/qfile.cpp 2.20 warwick +10 -10
+
+ Casts from off_t to int.
+
+
+src/tools/qglobal.h 2.49 warwick +4 -1
+
+ GNU Hurd
+
+
+src/tools/qglobal.h 2.50 warwick +4 -1
+
+ DG Unix
+
+
+src/tools/qtstream.cpp 2.12 warwick +14 -4
+src/widgets/qscrollview.cpp 2.42 warwick +7 -1
+
+ doc
+
+
+src/widgets/qchkbox.cpp 2.20 warwick +5 -4
+src/widgets/qradiobt.cpp 2.25 warwick +9 -4
+
+ Small sizeHint when no text or pixmap.
+
+
+src/widgets/qcombo.cpp 2.83 agulbra +10 -2
+
+ make sure highlighted() is emitted whenever current changes, as per
+ val gough's bug report.
+
+
+src/widgets/qframe.cpp 2.17 agulbra +13 -2
+
+ added a hack to make kscd binaries keep working. put in a nice
+ #if QT_VERSION >= 200 so the hack won't stay too long.
+
+
+src/widgets/qlabel.cpp 2.28 warwick +6 -3
+
+ Flicker-free when no background.
+
+
+src/widgets/qlined.cpp 2.71 warwick +3 -3
+
+ Efficiency.
+
+
+src/widgets/qlined.cpp 2.73 agulbra +2 -10
+
+ disable some buggy code
+
+
+src/widgets/qlined.h 2.26 agulbra +5 -4
+
+ make validateAndSet() public. It's not a trvial function, but it
+ appears that event filters can reasonably want to use it.
+
+
+src/widgets/qlistview.cpp 2.100 agulbra +30 -28
+
+ slightly better pixmap support
+
+
+src/widgets/qlistview.cpp 2.101 agulbra +27 -9
+
+ added an evil hack to make sizeHint() return more realistic values
+ before the automagic column resizing magic has done its job.
+
+
+src/widgets/qlistview.cpp 2.102 agulbra +3 -3
+
+ the list view is now the viewport's focus proxy, rather than the other
+ way around.
+
+
+src/widgets/qlistview.cpp 2.103 agulbra +6 -7
+
+ fixed some logical/actual confusion.
+
+
+src/widgets/qlistview.cpp 2.92 agulbra +22 -13
+
+ hamdle quick drags correctly, as per dimitri van heesch's bug report.
+
+
+src/widgets/qlistview.cpp 2.93 warwick +3 -3
+src/widgets/qlistview.h 2.46 warwick +2 -2
+
+ paintBranches is non-const
+
+
+src/widgets/qlistview.cpp 2.94 warwick +6 -7
+
+ Remove unnecessary initial repaints.
+
+
+src/widgets/qlistview.cpp 2.95 agulbra +16 -12
+
+ try to draw a little more efficiently by using OpaqueMode, and by
+ never inserting list view items into the repaint dict twice. exposes
+ a QPainter::drawText() bug.
+
+
+src/widgets/qlistview.cpp 2.96 agulbra +178 -53
+src/widgets/qlistview.h 2.47 agulbra +13 -5
+
+ added column alignment (worked first try) and real pixmap support
+ (untested - I try not to push my luck)
+
+
+src/widgets/qlistview.cpp 2.97 agulbra +13 -11
+
+ draw focus rectangle in the correct place
+
+
+src/widgets/qlistview.cpp 2.99 warwick +9 -12
+
+ Revert change that required drawText semantics changed.
+
+
+src/widgets/qlistview.h 2.44 agulbra +2 -1
+
+ avoid hiding text(int) with text() in qchecklistitem
+
+
+src/widgets/qmainwindow.cpp 2.17 agulbra +35 -34
+src/widgets/qmainwindow.h 2.12 agulbra +4 -3
+
+ handle children being deleted
+
+
+src/widgets/qmenubar.cpp 2.48 warwick +9 -3
+src/widgets/qpopmenu.cpp 2.67 warwick +4 -2
+
+ Accept keys so they don't propagate.
+
+
+src/widgets/qmenubar.cpp 2.49 warwick +2 -5
+src/widgets/qpopmenu.cpp 2.68 warwick +2 -4
+
+ undo accept()
+
+
+src/widgets/qmenubar.cpp 2.50 agulbra +3 -4
+
+ remove unused variable
+
+
+src/widgets/qpopmenu.cpp 2.70 agulbra +13 -16
+src/widgets/qpopmenu.cpp 2.69 agulbra +10 -3
+
+ minor tweak of right/left submenu position algorithm
+
+
+src/widgets/qpopmenu.cpp 2.71 warwick +5 -2
+
+ Add a reminder.
+
+
+src/widgets/qscrollview.cpp 2.39 warwick +86 -67
+
+ Docs.
+ Remove over-optimization.
+
+
+src/widgets/qscrollview.cpp 2.40 warwick +3 -3
+
+ Simplify.
+
+
+src/widgets/qscrollview.cpp 2.43 warwick +45 -12
+
+ Propagate mouse events.
+
+
+src/widgets/qscrollview.h 2.20 warwick +6 -1
+
+ Propagate mouse evetns.
+
+
+src/widgets/qtoolbutton.cpp 2.23 warwick +4 -3
+
+ Make receiver/slot optional.
+
+
+src/widgets/qvalidator.cpp 2.18 agulbra +19 -6
+
+ validate number of decimals. amy watson.
diff --git a/dist/changes-1.39-19980529 b/dist/changes-1.39-19980529
new file mode 100644
index 0000000..6c40f61
--- /dev/null
+++ b/dist/changes-1.39-19980529
@@ -0,0 +1,232 @@
+
+src/dialogs/qfiledlg.cpp 2.67 aavit +24 -1
+
+ Fixed non-modality bug in GetOpen/SaveFileName on Windows.
+
+
+src/dialogs/qprndlg.cpp 2.21 agulbra +14 -11
+
+ avoid double-delete of invisible QButtonGroup objects
+
+
+src/dialogs/qprndlg.cpp 2.22 eiriken +4 -3
+src/tools/qregexp.cpp 2.9 eiriken +4 -3
+src/widgets/qheader.cpp 2.36 eiriken +5 -3
+src/widgets/qmenubar.cpp 2.51 eiriken +6 -4
+src/widgets/qwhatsthis.cpp 2.12 eiriken +3 -3
+
+ More tests before delete [] to avoid purify warnings.
+
+
+src/kernel/qapp_win.cpp 2.86 agulbra +10 -19
+src/kernel/qapp_x11.cpp 2.134 agulbra +35 -44
+
+ move the pending-events iterator to the next event before dispatching
+ the current one. prevents recursion if enter_loop() is called within
+ the event handler.
+
+
+src/kernel/qapp_x11.cpp 2.133 warwick +12 -4
+src/kernel/qevent.h 2.16 warwick +27 -1
+src/kernel/qwidget.cpp 2.103 warwick +9 -2
+
+ Provide Event_Hide and Event_Show.
+
+
+src/kernel/qasyncimageio.cpp 1.31 warwick +32 -16
+src/kernel/qasyncimageio.h 1.16 warwick +7 -1
+src/kernel/qasyncio.cpp 1.8 warwick +3 -2
+src/kernel/qimage.cpp 2.88 warwick +11 -2
+src/kernel/qpainter.cpp 2.47 warwick +10 -4
+
+ QAsyncImageIO classes are now public.
+
+
+src/kernel/qdragobject.cpp 2.12 agulbra +10 -4
+
+ stop the drag when appropriate
+
+
+src/kernel/qevent.cpp 2.14 agulbra +24 -2
+src/kernel/qevent.h 2.15 agulbra +2 -1
+
+ added new convenience function provides( const char * mimeType )
+
+
+src/kernel/qevent.h 2.14 agulbra +2 -2
+
+ return a real QByteArray
+
+
+src/kernel/qpainter.cpp 2.48 warwick +4 -4
+
+ Fix bitBlt with negative width/height.
+
+
+src/kernel/qpicture.cpp 2.4 eiriken +13 -2
+
+ Added support for drawImage()
+
+
+src/kernel/qprn_x11.cpp 2.12 agulbra +18 -10
+
+ close open files before exec'ing lpr.
+
+
+src/kernel/qpsprn.cpp 2.20 eiriken +100 -24
+src/kernel/qpsprn.h 2.7 eiriken +3 -2
+src/kernel/qptr_x11.cpp 2.48 eiriken +4 -3
+src/kernel/qrgn_x11.cpp 2.13 eiriken +3 -3
+
+ QPrinter now supports clipping of any arbitrary region.
+ The catch is that resolution is 72 dpi.
+
+ Fixed bug in save()/restore() over page boundaries
+
+
+src/kernel/qpsprn.cpp 2.23 agulbra +6 -3
+
+ setPen() immediately before drawPoly(most things) did not work. now
+ it does.
+
+
+src/kernel/qptr_x11.cpp 2.49 warwick +13 -2
+
+ Probably fix aix-g++ internal compiler error.
+
+
+src/kernel/qregion.cpp 2.10 eiriken +7 -5
+src/kernel/qregion.h 2.11 eiriken +2 -3
+
+ Rename getRects() to rects()
+
+
+src/kernel/qregion.cpp 2.12 hanord +18 -56
+
+ New region serializing code, writes only raw rectangles.
+ In Qt pre 2.0, we write a sort of recursive structure for backward
+ compatibility. It's large and inefficient. In Qt 2.0, we start using
+ a much slimmer structure and the reading code for this has already
+ been added for Qt 1.40. I.e. Qt 1.3x programs won't be able to read
+ regions serialized with Qt 2.x.
+
+
+src/kernel/qregion.h 2.12 hanord +2 -7
+src/kernel/qrgn_win.cpp 2.13 hanord +12 -44
+src/kernel/qrgn_x11.cpp 2.15 hanord +15 -50
+
+ Simplified the implementation, now it works with rects only,
+
+
+src/kernel/qwid_win.cpp 2.53 agulbra +4 -3
+src/kernel/qwid_x11.cpp 2.92 agulbra +4 -3
+
+ update() with w == 0 || h == 0 is a no-op, so exit quickly
+
+
+src/kernel/qwid_win.cpp 2.54 agulbra +6 -2
+src/kernel/qwid_x11.cpp 2.93 agulbra +8 -2
+src/kernel/qwidget.cpp 2.104 agulbra +3 -10
+src/widgets/qmainwindow.cpp 2.20 agulbra +16 -6
+
+ make isVisible() return TRUE during showEvent(), to match
+ e.g. resizeEvent(). make QMainWindow fix its geometry when toolbars
+ are hidden and shown.
+
+
+src/kernel/qwidget.h 2.49 agulbra +2 -6
+
+ removed autoMinimumSize
+
+
+src/widgets/qbttngrp.cpp 2.10 agulbra +3 -3
+
+ don't delete buttons in the list
+
+
+src/widgets/qbuttonrow.cpp 1.6 paul +1 -1
+src/widgets/qbuttonrow.h 1.4 paul +1 -1
+src/widgets/qgrid.cpp 1.9 paul +1 -1
+src/widgets/qgrid.h 1.7 paul +1 -1
+src/widgets/qhbox.cpp 1.10 paul +1 -1
+src/widgets/qhbox.h 1.7 paul +1 -1
+src/widgets/qlabelled.cpp 1.5 paul +1 -1
+src/widgets/qlabelled.h 1.4 paul +1 -1
+src/widgets/qvbox.cpp 1.5 paul +1 -1
+src/widgets/qvbox.h 1.5 paul +1 -1
+
+ removing the layout widgets from the library, moved to examples/layouts
+
+
+src/widgets/qheader.cpp 2.38 paul +121 -62
+src/widgets/qheader.h 2.18 paul +6 -11
+
+ Implemented setClickEnabled, setResizeEnabled and setMovingEnabled
+
+
+src/widgets/qlined.cpp 2.74 aavit +8 -5
+src/widgets/qspinbox.cpp 2.30 aavit +52 -19
+src/widgets/qspinbox.h 2.17 aavit +3 -1
+
+ lineedit: better sizehint()
+ spinbox: added valuechanged( const char* ) signal
+
+
+src/widgets/qlined.cpp 2.75 agulbra +11 -6
+
+ start drags when appropriate
+ fold multi-line paste to one line instead of truncating to the \n
+
+
+src/widgets/qlistview.cpp 2.109 agulbra +17 -12
+src/widgets/qlistview.h 2.48 agulbra +4 -4
+
+ addColumn() return the column number
+
+
+src/widgets/qmainwindow.cpp 2.18 warwick +18 -2
+src/widgets/qmainwindow.h 2.13 warwick +2 -1
+
+ Show/Hide event filters
+
+
+src/widgets/qmainwindow.cpp 2.19 agulbra +19 -17
+src/widgets/qmainwindow.h 2.14 agulbra +11 -11
+
+ make set* private as they're not really meaningful any more.
+
+src/widgets/qmainwindow.cpp 2.22 agulbra +17 -1
+
+ be slightly more clever about autodetecting menu and status bar.
+
+
+src/widgets/qscrollview.cpp 2.45 warwick +8 -4
+
+ Only enable WPaintClever in viewport if specifically requested.
+
+
+src/widgets/qstatusbar.cpp 2.8 agulbra +9 -4
+
+ make sure the status bar is tall enough for text, even when there's
+ nothing in it.
+
+
+src/widgets/qtablevw.cpp 2.46 agulbra +4 -4
+
+ last{Row,Col}Visible() could return >= num{Row,Col}s. no more.
+
+
+src/kernel/qapp_x11.cpp 2.137 eiriken +5 -2
+
+ Fixed bug when there are no events in the X queue and there are posted
+ events. The posted events will now be handled.
+
+
+src/kernel/qwidget.cpp 2.106 eiriken +5 -2
+
+ Fixed bug in destruction of main widget. The application now
+ actually quits.
+
+src/kernel/qapp.cpp 2.55 hanord +8 -4
+
+ The QApplication contructor now accepts argc=0 and argv=0.
diff --git a/dist/changes-1.39-19980611 b/dist/changes-1.39-19980611
new file mode 100644
index 0000000..d99b636
--- /dev/null
+++ b/dist/changes-1.39-19980611
@@ -0,0 +1,194 @@
+doc/binary.doc 1.2 warwick +23 -26
+
+ Include margins into header graphic
+
+
+doc/examples.doc 2.15 agulbra +19 -2
+examples/dirview/dirview.cpp 1.8 agulbra +2 -2
+src/widgets/qlistview.cpp 2.112 agulbra +163 -28
+src/widgets/qlistview.h 2.49 agulbra +4 -4
+
+ rename children() to childCount()
+ add two images to the docs
+ update dirview and add it to the docs
+
+
+src/dialogs/qfiledlg.cpp 2.68 hanord +8 -12
+
+ Rewrote setFilter to use QString and mid() - simpler code.
+ Borland C++ complained about modifying const char *.
+
+
+src/dialogs/qfiledlg.cpp 2.69 agulbra +9 -7
+src/dialogs/qmsgbox.cpp 2.48 agulbra +3 -1
+src/dialogs/qprndlg.cpp 2.26 agulbra +213 -2
+src/widgets/qwidgetstack.cpp 2.6 agulbra +8 -3
+
+ Call setPalettePropagation() and setFontPropagation() in the
+ initialization. Note that QWidgetStack now defaults to use
+ AllChildren.
+
+
+src/dialogs/qmsgbox.cpp 2.47 hanord +3 -3
+
+ icon widget gets widget name "icon" (previously none)
+ buttons get widget names button1, button2 (previously space before number)
+
+
+src/dialogs/qprndlg.cpp 2.24 agulbra +163 -7
+
+ parse /etc/lp/member and /etc/printers.conf. we still probably don't
+ detect the printers on irix and digital unix (except through sheer
+ good luck - I suppose there is a chance that digital or sgi might
+ choose to be compatible with something).
+
+
+src/dialogs/qprndlg.cpp 2.25 agulbra +10 -10
+
+ one more minor cleanup.
+
+ looks like the code we have works on both irix and digital unix.
+
+
+src/kernel/qapp_win.cpp 2.88 hanord +2 -3
+
+ Posted event fix
+
+
+src/kernel/qapp_win.cpp 2.89 agulbra +2 -2
+src/kernel/qapp_x11.cpp 2.138 agulbra +3 -3
+
+ don't delete events destined for other objects in target-specific
+ sendPostedEvents()
+
+
+src/kernel/qasyncimageio.cpp 1.33 warwick +42 -42
+src/kernel/qasyncimageio.h 1.17 warwick +15 -15
+
+ New names.
+
+
+src/kernel/qdnd_x11.cpp 2.14 agulbra +8 -5
+src/kernel/qdragobject.cpp 2.14 agulbra +21 -9
+
+ right cursor
+
+
+src/kernel/qdnd_x11.cpp 2.15 agulbra +6 -9
+
+ comment out old debug messages; delete some
+
+
+src/kernel/qdragobject.cpp 2.15 agulbra +4 -6
+
+ ignore totally unexpected events
+
+
+src/kernel/qfnt_win.cpp 2.28 agulbra +4 -4
+src/kernel/qfont.cpp 2.34 agulbra +2 -4
+
+ be slightly more robust about setting the character encoding to the
+ defFont's.
+
+
+src/kernel/qfont.cpp 2.31 agulbra +115 -63
+
+ overhauled class documentation; man function descriptions probably
+ also need an overhaul.
+
+
+src/kernel/qfont.cpp 2.32 agulbra +56 -65
+
+ fixed some typos; removed some misleading text from the function
+ descriptions.
+
+
+src/kernel/qgmanagr.cpp 2.34 paul +22 -66
+
+ Rolled back "empty layout" change, since it broke existing code.
+
+
+src/kernel/qiconset.cpp 2.9 paul +16 -8
+
+ Handle mask better when generating disabled pixmaps
+
+
+src/kernel/qprn_x11.cpp 2.14 agulbra +12 -1
+
+ if the application hasn't specified a non-default print program, try
+ HARD to find a decent lpr or lp.
+
+
+src/kernel/qpsprn.cpp 2.25 agulbra +12 -7
+
+ discussed the "sometimes cannot print to /usr/bin/lpr even though
+ every other program works perfectly" bug with the code.
+
+ also shrunk the output by a few bytes by removing extraneous newlines
+ and one comment.
+
+
+src/tools/qdatetm.cpp 2.14 agulbra +19 -5
+
+ QDateTime::addSecs() used to not work across midnight or backwards.
+
+
+src/tools/qglobal.h 2.51 agulbra +4 -2
+
+ detect unixware 7; detect bool on more irix stuff
+
+
+src/widgets/qbttngrp.cpp 2.12 agulbra +5 -1
+
+ mention the existence of set*Propagation()
+
+
+src/widgets/qbutton.cpp 2.60 agulbra +16 -17
+src/widgets/qbutton.h 2.16 agulbra +3 -2
+
+ make setDown() public; this breaks binary compatibility on MSVC++
+
+ The way to start a context menu on press used to be to make a
+ synthetic QMouseEvent indicating a release, and sendEvent() that.
+ not terribly nice.
+
+
+src/widgets/qheader.cpp 2.41 paul +6 -1
+
+ Fix "Index out of range" bug.
+
+
+src/widgets/qlined.cpp 2.78 agulbra +3 -6
+
+ when pasting multi-line stuff, fold to one line.
+
+
+src/widgets/qlined.cpp 2.79 paul +2 -2
+
+ Fix "index out of range" bug when typing past maxLength.
+
+
+src/widgets/qpopmenu.cpp 2.75 aavit +2 -2
+
+ minimal improvement of checkmark look in windows style.
+
+
+src/widgets/qsplitter.cpp 1.13 agulbra +12 -12
+
+ more doc; mention setFixed()
+
+
+src/widgets/qtoolbar.cpp 2.21 agulbra +46 -12
+
+ paint a tool bar handle in motif style too
+
+
+src/widgets/qtoolbar.cpp 2.22 paul +3 -2
+
+ Don't override max/min sizes for children
+
+
+src/widgets/qtoolbutton.cpp 2.27 agulbra +24 -22
+
+ handle text label correctly; check for null pointer; minor doc
+ improvements
diff --git a/dist/changes-1.39-19980616 b/dist/changes-1.39-19980616
new file mode 100644
index 0000000..831dd87
--- /dev/null
+++ b/dist/changes-1.39-19980616
@@ -0,0 +1,810 @@
+doc/metaobjects.doc 2.9 warwick +3 -3
+doc/tutorial.doc 2.13 warwick +4 -4
+examples/aclock/aclock.h 2.3 warwick +2 -2
+examples/aclock/main.cpp 2.3 warwick +2 -2
+examples/application/application.cpp 1.12 warwick +8 -8
+examples/application/main.cpp 1.6 warwick +2 -2
+examples/biff/biff.cpp 2.3 warwick +2 -2
+examples/biff/biff.h 2.3 warwick +2 -2
+examples/biff/main.cpp 2.3 warwick +2 -2
+examples/connect/connect.cpp 2.5 warwick +2 -2
+examples/cursor/cursor.cpp 2.3 warwick +2 -2
+examples/dclock/dclock.cpp 2.4 warwick +2 -2
+examples/dclock/dclock.h 2.3 warwick +2 -2
+examples/dclock/main.cpp 2.3 warwick +2 -2
+examples/desktop/desktop.cpp 2.4 warwick +2 -2
+examples/dirview/dirview.cpp 1.9 warwick +2 -2
+examples/dirview/main.cpp 1.7 warwick +2 -2
+examples/drawdemo/drawdemo.cpp 2.7 warwick +5 -5
+examples/forever/forever.cpp 2.4 warwick +2 -2
+examples/hello/hello.cpp 2.5 warwick +2 -2
+examples/hello/main.cpp 2.6 warwick +2 -2
+examples/layout/layout.cpp 1.6 warwick +6 -6
+examples/layouts/layouts.cpp 1.5 warwick +6 -6
+examples/layouts/qtbuttonrow.cpp 1.4 warwick +4 -3
+examples/layouts/qthbox.cpp 1.4 warwick +2 -2
+examples/life/life.cpp 2.5 warwick +4 -4
+examples/life/lifedlg.cpp 2.8 warwick +5 -5
+examples/life/main.cpp 2.3 warwick +2 -2
+examples/menu/menu.cpp 2.15 warwick +4 -4
+examples/movies/main.cpp 1.11 warwick +4 -4
+examples/network/connection.cpp 1.7 warwick +2 -2
+examples/network/finger.cpp 1.7 warwick +6 -6
+examples/network/prime.cpp 1.6 warwick +5 -5
+examples/network/primed.cpp 1.8 warwick +4 -4
+examples/network/primespeed.cpp 1.5 warwick +5 -5
+examples/network/server.cpp 1.8 warwick +2 -2
+examples/network/share.cpp 1.6 warwick +4 -4
+examples/picture/picture.cpp 1.6 warwick +3 -3
+examples/pref/main.cpp 1.7 warwick +2 -2
+examples/pref/pref.cpp 1.20 warwick +5 -5
+examples/progress/progress.cpp 1.13 warwick +4 -4
+examples/qdir/qdir.cpp 1.6 warwick +3 -3
+examples/qmag/qmag.cpp 2.16 warwick +5 -5
+examples/qwerty/main.cpp 1.6 warwick +2 -2
+examples/qwerty/qwerty.cpp 1.11 warwick +7 -7
+examples/qwerty/qwerty.h 1.8 warwick +2 -2
+examples/scrollview/scrollview.cpp 1.15 warwick +6 -6
+examples/sheet/main.cpp 2.5 warwick +2 -2
+examples/sheet/sheet.cpp 2.5 warwick +2 -2
+examples/sheet/sheetdlg.cpp 2.5 warwick +2 -2
+examples/sheet/sheetdlg.h 2.3 warwick +2 -2
+examples/sheet/table.cpp 2.4 warwick +2 -2
+examples/sheet/table.h 2.4 warwick +3 -3
+examples/showimg/main.cpp 2.18 warwick +2 -2
+examples/showimg/showimg.cpp 2.24 warwick +5 -5
+examples/table/main.cpp 1.4 warwick +3 -3
+examples/table/table.h 1.5 warwick +2 -2
+examples/tetrix/qdragapp.cpp 2.3 warwick +5 -4
+examples/tetrix/qdragapp.h 2.3 warwick +2 -2
+examples/tetrix/qtetrix.cpp 2.7 warwick +3 -3
+examples/tetrix/qtetrix.h 2.4 warwick +3 -3
+examples/tictac/main.cpp 2.3 warwick +2 -2
+examples/tictac/tictac.cpp 2.8 warwick +6 -6
+examples/tictac/tictac.h 2.3 warwick +2 -2
+examples/timestmp/timestmp.cpp 2.4 warwick +3 -3
+examples/tooltip/main.cpp 1.5 warwick +2 -2
+examples/tooltip/tooltip.cpp 1.6 warwick +2 -2
+examples/validator/main.cpp 1.5 warwick +2 -2
+examples/validator/motor.cpp 1.9 warwick +3 -3
+examples/validator/vw.cpp 1.8 warwick +4 -4
+examples/widgets/widgets.cpp 2.43 warwick +13 -13
+examples/xform/xform.cpp 2.9 warwick +8 -8
+extensions/imageio/src/qjpegio.cpp 1.5 warwick +2 -2
+extensions/imageio/src/qpngio.cpp 1.7 warwick +2 -2
+extensions/nsplugin/examples/grapher/grapher.cpp 1.10 warwick +3 -3
+extensions/nsplugin/examples/qtimage/qtimage.cpp 1.6 warwick +2 -2
+extensions/nsplugin/examples/trivial/trivial.cpp 1.7 warwick +1 -1
+extensions/nsplugin/src/qnp.cpp 1.19 warwick +9 -9
+extensions/opengl/examples/box/globjwin.cpp 1.4 warwick +4 -4
+extensions/opengl/examples/box/main.cpp 1.4 warwick +1 -1
+extensions/opengl/examples/gear/gear.cpp 1.6 warwick +1 -1
+extensions/opengl/examples/sharedbox/globjwin.cpp 1.2 warwick +4 -4
+extensions/opengl/examples/sharedbox/main.cpp 1.2 warwick +1 -1
+extensions/xt/examples/mainlyMotif/editor.cpp 1.3 warwick +2 -2
+extensions/xt/examples/mainlyQt/editor.cpp 1.2 warwick +2 -2
+extensions/xt/examples/mainlyXt/editor.cpp 1.2 warwick +2 -2
+extensions/xt/src/qxt.cpp 1.3 warwick +6 -6
+extensions/xt/src/qxt.h 1.2 warwick +2 -2
+src/qt.pro 2.26 warwick +110 -110
+src/qtinternal.pro 2.7 warwick +5 -5
+src/dialogs/qfiledialog.cpp 2.71 warwick +12 -12
+src/dialogs/qfiledialog.h 2.18 warwick +4 -4
+src/dialogs/qfiledlg.cpp 2.71 warwick +1 -1
+src/dialogs/qfiledlg.h 2.18 warwick +2 -146
+src/dialogs/qfontdialog.cpp 2.13 warwick +7 -7
+src/dialogs/qmessagebox.cpp 2.49 warwick +5 -5
+src/dialogs/qmessagebox.h 2.26 warwick +4 -4
+src/dialogs/qmsgbox.cpp 2.49 warwick +1 -1
+src/dialogs/qmsgbox.h 2.26 warwick +1 -132
+src/dialogs/qprintdialog.cpp 2.28 warwick +10 -10
+src/dialogs/qprintdialog.h 2.9 warwick +4 -4
+src/dialogs/qprndlg.cpp 2.28 warwick +1 -1
+src/dialogs/qprndlg.h 2.9 warwick +2 -63
+src/dialogs/qprogdlg.cpp 2.27 warwick +1 -1
+src/dialogs/qprogdlg.h 2.14 warwick +2 -75
+src/dialogs/qprogressdialog.cpp 2.27 warwick +6 -6
+src/dialogs/qprogressdialog.h 2.14 warwick +6 -6
+src/dialogs/qtabdialog.cpp 2.41 warwick +7 -6
+src/dialogs/qtabdialog.h 2.19 warwick +4 -4
+src/dialogs/qtabdlg.cpp 2.41 warwick +1 -1
+src/dialogs/qtabdlg.h 2.19 warwick +1 -84
+src/kernel/qaccel.cpp 2.13 warwick +2 -2
+src/kernel/qapp.cpp 2.57 warwick +1 -1
+src/kernel/qapp.h 2.27 warwick +1 -205
+src/kernel/qapp_os2.cpp 2.5 warwick +4 -3
+src/kernel/qapp_win.cpp 2.90 warwick +1 -1
+src/kernel/qapp_x11.cpp 2.141 warwick +1 -1
+src/kernel/qapplication.cpp 2.57 warwick +13 -11
+src/kernel/qapplication.h 2.27 warwick +5 -5
+src/kernel/qapplication_win.cpp 2.90 warwick +9 -7
+src/kernel/qapplication_x11.cpp 2.141 warwick +13 -11
+src/kernel/qasyncio.cpp 1.9 warwick +2 -2
+src/kernel/qclb_win.cpp 2.7 warwick +1 -1
+src/kernel/qclb_x11.cpp 2.13 warwick +1 -1
+src/kernel/qclipboard.cpp 2.9 warwick +4 -4
+src/kernel/qclipboard.h 2.5 warwick +4 -4
+src/kernel/qclipboard_win.cpp 2.7 warwick +4 -4
+src/kernel/qclipboard_x11.cpp 2.13 warwick +5 -5
+src/kernel/qclipbrd.cpp 2.9 warwick +1 -1
+src/kernel/qclipbrd.h 2.5 warwick +2 -55
+src/kernel/qcol_win.cpp 2.18 warwick +1 -1
+src/kernel/qcol_x11.cpp 2.31 warwick +1 -1
+src/kernel/qcolor.cpp 2.15 warwick +2 -2
+src/kernel/qcolor.h 2.10 warwick +2 -2
+src/kernel/qcolor_win.cpp 2.18 warwick +2 -2
+src/kernel/qcolor_x11.cpp 2.31 warwick +4 -4
+src/kernel/qconnect.cpp 2.5 warwick +1 -1
+src/kernel/qconnect.h 2.5 warwick +2 -46
+src/kernel/qconnection.cpp 2.5 warwick +3 -3
+src/kernel/qconnection.h 2.5 warwick +4 -4
+src/kernel/qcur_os2.cpp 2.3 warwick +2 -2
+src/kernel/qcur_win.cpp 2.7 warwick +1 -1
+src/kernel/qcur_x11.cpp 2.11 warwick +1 -1
+src/kernel/qcursor.cpp 2.8 warwick +2 -2
+src/kernel/qcursor_win.cpp 2.7 warwick +3 -3
+src/kernel/qcursor_x11.cpp 2.11 warwick +3 -3
+src/kernel/qdialog.cpp 2.19 warwick +5 -4
+src/kernel/qdnd_win.cpp 2.6 warwick +2 -2
+src/kernel/qdnd_x11.cpp 2.18 warwick +8 -7
+src/kernel/qdragobject.cpp 2.17 warwick +4 -3
+src/kernel/qdrawutil.cpp 2.18 warwick +3 -3
+src/kernel/qdrawutil.h 2.7 warwick +4 -4
+src/kernel/qdrawutl.cpp 2.18 warwick +1 -1
+src/kernel/qdrawutl.h 2.7 warwick +2 -91
+src/kernel/qevent.h 2.17 warwick +2 -2
+src/kernel/qfnt_win.cpp 2.30 warwick +1 -1
+src/kernel/qfnt_x11.cpp 2.39 warwick +1 -1
+src/kernel/qfont.cpp 2.35 warwick +11 -11
+src/kernel/qfont.h 2.10 warwick +2 -2
+src/kernel/qfont_win.cpp 2.30 warwick +5 -5
+src/kernel/qfont_x11.cpp 2.39 warwick +2 -2
+src/kernel/qfontdata.h 2.11 warwick +4 -4
+src/kernel/qfontdta.h 2.11 warwick +2 -65
+src/kernel/qfontinf.h 2.7 warwick +1 -79
+src/kernel/qfontinfo.h 2.7 warwick +4 -4
+src/kernel/qfontmet.h 2.14 warwick +1 -95
+src/kernel/qfontmetrics.h 2.14 warwick +4 -4
+src/kernel/qgmanager.cpp 2.36 warwick +5 -5
+src/kernel/qgmanager.h 2.13 warwick +4 -4
+src/kernel/qgmanagr.cpp 2.36 warwick +1 -1
+src/kernel/qgmanagr.h 2.13 warwick +2 -84
+src/kernel/qiconset.cpp 2.10 warwick +2 -2
+src/kernel/qimage.cpp 2.91 warwick +3 -3
+src/kernel/qlayout.h 2.18 warwick +2 -2
+src/kernel/qmetaobj.cpp 2.9 warwick +1 -1
+src/kernel/qmetaobj.h 2.4 warwick +2 -66
+src/kernel/qmetaobject.cpp 2.9 warwick +5 -4
+src/kernel/qmetaobject.h 2.4 warwick +5 -5
+src/kernel/qmovie.cpp 1.33 warwick +3 -3
+src/kernel/qmutex.h 1.5 warwick +2 -2
+src/kernel/qnpsupport.cpp 2.11 warwick +6 -6
+src/kernel/qobjcoll.h 2.6 warwick +1 -1
+src/kernel/qobjdefs.h 2.4 warwick +1 -78
+src/kernel/qobject.cpp 2.51 warwick +5 -4
+src/kernel/qobject.h 2.10 warwick +2 -2
+src/kernel/qobjectdefs.h 2.4 warwick +4 -4
+src/kernel/qobjectdict.h 2.1 warwick initial checkin
+src/kernel/qobjectlist.h 2.1 warwick initial checkin
+src/kernel/qpaintd.h 2.7 warwick +1 -170
+src/kernel/qpaintdc.h 2.6 warwick +2 -97
+src/kernel/qpaintdevice.h 2.7 warwick +6 -6
+src/kernel/qpaintdevice_win.cpp 2.10 warwick +5 -5
+src/kernel/qpaintdevice_x11.cpp 2.15 warwick +6 -6
+src/kernel/qpaintdevicedefs.h 2.6 warwick +5 -5
+src/kernel/qpaintdevicemetrics.cpp 2.4 warwick +3 -3
+src/kernel/qpaintdevicemetrics.h 2.3 warwick +7 -7
+src/kernel/qpainter.cpp 2.53 warwick +7 -7
+src/kernel/qpainter.h 2.26 warwick +5 -5
+src/kernel/qpainter_win.cpp 2.37 warwick +5 -5
+src/kernel/qpainter_x11.cpp 2.52 warwick +4 -4
+src/kernel/qpalette.cpp 2.18 warwick +2 -2
+src/kernel/qpalette.h 2.14 warwick +2 -2
+src/kernel/qpdevmet.cpp 2.4 warwick +1 -1
+src/kernel/qpdevmet.h 2.3 warwick +2 -37
+src/kernel/qpic_win.cpp 2.3 warwick +1 -1
+src/kernel/qpic_x11.cpp 2.3 warwick +1 -1
+src/kernel/qpicture.cpp 2.6 warwick +3 -3
+src/kernel/qpicture.h 2.5 warwick +2 -2
+src/kernel/qpixmap.cpp 2.26 warwick +2 -2
+src/kernel/qpixmap.h 2.20 warwick +2 -2
+src/kernel/qpixmap_win.cpp 2.35 warwick +3 -3
+src/kernel/qpixmap_x11.cpp 2.37 warwick +3 -3
+src/kernel/qpixmapcache.cpp 2.7 warwick +3 -3
+src/kernel/qpixmapcache.h 2.4 warwick +4 -4
+src/kernel/qpm_win.cpp 2.35 warwick +1 -1
+src/kernel/qpm_x11.cpp 2.37 warwick +1 -1
+src/kernel/qpmcache.cpp 2.7 warwick +1 -1
+src/kernel/qpmcache.h 2.4 warwick +2 -31
+src/kernel/qpntarry.cpp 2.16 warwick +1 -1
+src/kernel/qpntarry.h 2.7 warwick +1 -155
+src/kernel/qpoint.cpp 2.4 warwick +3 -3
+src/kernel/qpoint.h 2.3 warwick +2 -2
+src/kernel/qpointarray.cpp 2.16 warwick +6 -6
+src/kernel/qpointarray.h 2.7 warwick +4 -4
+src/kernel/qprinter.cpp 2.9 warwick +3 -3
+src/kernel/qprinter.h 2.7 warwick +2 -2
+src/kernel/qprinter_win.cpp 2.11 warwick +2 -2
+src/kernel/qprinter_x11.cpp 2.16 warwick +6 -6
+src/kernel/qprn_win.cpp 2.11 warwick +1 -1
+src/kernel/qprn_x11.cpp 2.16 warwick +1 -1
+src/kernel/qpsprinter.cpp 2.26 warwick +4 -4
+src/kernel/qpsprinter.h 2.8 warwick +5 -5
+src/kernel/qpsprn.cpp 2.26 warwick +1 -1
+src/kernel/qpsprn.h 2.8 warwick +2 -70
+src/kernel/qptd_os2.cpp 2.3 warwick +2 -2
+src/kernel/qptd_win.cpp 2.10 warwick +1 -1
+src/kernel/qptd_x11.cpp 2.15 warwick +1 -1
+src/kernel/qptr_os2.cpp 2.4 warwick +2 -2
+src/kernel/qptr_win.cpp 2.37 warwick +1 -1
+src/kernel/qptr_x11.cpp 2.52 warwick +1 -1
+src/kernel/qrect.cpp 2.8 warwick +3 -3
+src/kernel/qregion.cpp 2.14 warwick +3 -3
+src/kernel/qregion_win.cpp 2.15 warwick +2 -2
+src/kernel/qregion_x11.cpp 2.16 warwick +2 -2
+src/kernel/qrgn_os2.cpp 2.4 warwick +2 -2
+src/kernel/qrgn_win.cpp 2.15 warwick +1 -1
+src/kernel/qrgn_x11.cpp 2.16 warwick +1 -1
+src/kernel/qsemimodal.cpp 2.6 warwick +2 -2
+src/kernel/qsignal.cpp 2.5 warwick +2 -2
+src/kernel/qsize.cpp 2.9 warwick +3 -3
+src/kernel/qsocketnotifier.cpp 2.7 warwick +3 -3
+src/kernel/qsocketnotifier.h 2.4 warwick +4 -4
+src/kernel/qsocknot.cpp 2.7 warwick +1 -1
+src/kernel/qsocknot.h 2.4 warwick +2 -60
+src/kernel/qt_x11.cpp 2.4 warwick +1 -1
+src/kernel/qthread.h 1.5 warwick +2 -2
+src/kernel/qtimer.cpp 2.9 warwick +4 -3
+src/kernel/qwid_os2.cpp 2.6 warwick +3 -2
+src/kernel/qwid_win.cpp 2.56 warwick +1 -1
+src/kernel/qwid_x11.cpp 2.96 warwick +1 -1
+src/kernel/qwidcoll.h 2.5 warwick +1 -1
+src/kernel/qwidget.cpp 2.111 warwick +10 -8
+src/kernel/qwidget.h 2.50 warwick +5 -5
+src/kernel/qwidget_win.cpp 2.56 warwick +11 -9
+src/kernel/qwidget_x11.cpp 2.96 warwick +10 -8
+src/kernel/qwidgetintdict.h 2.1 warwick initial checkin
+src/kernel/qwidgetlist.h 2.1 warwick initial checkin
+src/kernel/qwindefs.h 2.23 warwick +1 -313
+src/kernel/qwindowdefs.h 2.23 warwick +5 -5
+src/kernel/qwmatrix.cpp 2.5 warwick +3 -3
+src/kernel/qwmatrix.h 2.3 warwick +3 -3
+src/moc/GNUmakefile 2.5 warwick +13 -13
+src/moc/Makefile 2.10 warwick +42 -42
+src/moc/moc.pro 1.10 warwick +4 -4
+src/moc/moc.y 2.23 warwick +5 -5
+src/tools/qbitarray.cpp 2.7 warwick +5 -5
+src/tools/qbitarray.h 2.5 warwick +4 -4
+src/tools/qbitarry.cpp 2.7 warwick +1 -1
+src/tools/qbitarry.h 2.5 warwick +2 -134
+src/tools/qbuffer.h 2.5 warwick +2 -2
+src/tools/qcollect.cpp 2.5 warwick +1 -1
+src/tools/qcollect.h 2.3 warwick +2 -46
+src/tools/qcollection.cpp 2.5 warwick +3 -3
+src/tools/qcollection.h 2.3 warwick +4 -4
+src/tools/qdatastream.cpp 2.14 warwick +3 -3
+src/tools/qdatastream.h 2.6 warwick +5 -5
+src/tools/qdatetime.cpp 2.15 warwick +6 -6
+src/tools/qdatetime.h 2.4 warwick +4 -4
+src/tools/qdatetm.cpp 2.15 warwick +1 -1
+src/tools/qdatetm.h 2.4 warwick +2 -180
+src/tools/qdir.cpp 2.22 warwick +3 -3
+src/tools/qdir.h 2.8 warwick +2 -2
+src/tools/qdstream.cpp 2.14 warwick +1 -1
+src/tools/qdstream.h 2.6 warwick +2 -117
+src/tools/qfile.cpp 2.22 warwick +2 -2
+src/tools/qfile.h 2.5 warwick +2 -2
+src/tools/qfiledef.h 2.8 warwick +3 -153
+src/tools/qfiledefs.h 2.8 warwick +2 -2
+src/tools/qfileinf.cpp 2.11 warwick +1 -1
+src/tools/qfileinf.h 2.3 warwick +2 -96
+src/tools/qfileinfo.cpp 2.11 warwick +6 -6
+src/tools/qfileinfo.h 2.3 warwick +5 -5
+src/tools/qgcache.h 2.3 warwick +2 -2
+src/tools/qgdict.cpp 2.16 warwick +2 -2
+src/tools/qgdict.h 2.5 warwick +2 -2
+src/tools/qglist.cpp 2.5 warwick +2 -2
+src/tools/qglist.h 2.3 warwick +2 -2
+src/tools/qglobal.cpp 2.15 warwick +2 -2
+src/tools/qglobal.h 2.52 warwick +2 -2
+src/tools/qgvector.cpp 2.7 warwick +2 -2
+src/tools/qgvector.h 2.3 warwick +2 -2
+src/tools/qintcach.h 2.3 warwick +1 -168
+src/tools/qintcache.h 2.3 warwick +4 -4
+src/tools/qiodev.cpp 2.11 warwick +1 -1
+src/tools/qiodev.h 2.5 warwick +2 -128
+src/tools/qiodevice.cpp 2.11 warwick +3 -3
+src/tools/qiodevice.h 2.5 warwick +4 -4
+src/tools/qstring.cpp 2.21 warwick +2 -2
+src/tools/qstrlist.h 2.11 warwick +2 -2
+src/tools/qstrvec.h 2.4 warwick +2 -2
+src/tools/qtextstream.cpp 2.15 warwick +4 -4
+src/tools/qtextstream.h 2.7 warwick +5 -5
+src/tools/qtstream.cpp 2.15 warwick +1 -1
+src/tools/qtstream.h 2.7 warwick +2 -216
+src/widgets/qbttngrp.cpp 2.13 warwick +1 -1
+src/widgets/qbttngrp.h 2.6 warwick +2 -61
+src/widgets/qbutton.cpp 2.61 warwick +3 -3
+src/widgets/qbutton.h 2.17 warwick +2 -2
+src/widgets/qbuttongroup.cpp 2.13 warwick +3 -3
+src/widgets/qbuttongroup.h 2.6 warwick +5 -5
+src/widgets/qcheckbox.cpp 2.23 warwick +5 -5
+src/widgets/qcheckbox.h 2.6 warwick +4 -4
+src/widgets/qchkbox.cpp 2.23 warwick +1 -1
+src/widgets/qchkbox.h 2.6 warwick +2 -47
+src/widgets/qcombo.cpp 2.87 warwick +1 -1
+src/widgets/qcombo.h 2.27 warwick +2 -132
+src/widgets/qcombobox.cpp 2.87 warwick +8 -8
+src/widgets/qcombobox.h 2.27 warwick +3 -3
+src/widgets/qframe.cpp 2.19 warwick +2 -2
+src/widgets/qgroupbox.cpp 2.12 warwick +3 -3
+src/widgets/qgroupbox.h 2.4 warwick +4 -4
+src/widgets/qgrpbox.cpp 2.12 warwick +1 -1
+src/widgets/qgrpbox.h 2.4 warwick +2 -46
+src/widgets/qheader.cpp 2.45 warwick +3 -3
+src/widgets/qheader.h 2.19 warwick +2 -2
+src/widgets/qlabel.cpp 2.32 warwick +2 -2
+src/widgets/qlcdnum.cpp 2.13 warwick +1 -1
+src/widgets/qlcdnum.h 2.8 warwick +2 -95
+src/widgets/qlcdnumber.cpp 2.13 warwick +4 -4
+src/widgets/qlcdnumber.h 2.8 warwick +5 -5
+src/widgets/qlined.cpp 2.81 warwick +1 -1
+src/widgets/qlined.h 2.28 warwick +2 -138
+src/widgets/qlineedit.cpp 2.81 warwick +7 -7
+src/widgets/qlineedit.h 2.28 warwick +4 -4
+src/widgets/qlistbox.cpp 2.69 warwick +4 -4
+src/widgets/qlistbox.h 2.16 warwick +2 -2
+src/widgets/qlistview.cpp 2.117 warwick +3 -3
+src/widgets/qmainwindow.cpp 2.27 warwick +4 -3
+src/widgets/qmenubar.cpp 2.54 warwick +3 -3
+src/widgets/qmenubar.h 2.11 warwick +2 -2
+src/widgets/qmenudata.cpp 2.16 warwick +5 -5
+src/widgets/qmenudata.h 2.11 warwick +4 -4
+src/widgets/qmenudta.cpp 2.16 warwick +1 -1
+src/widgets/qmenudta.h 2.11 warwick +1 -182
+src/widgets/qmlined.cpp 2.93 warwick +1 -1
+src/widgets/qmlined.h 2.36 warwick +2 -189
+src/widgets/qmultilined.cpp 2.93 warwick +6 -6
+src/widgets/qmultilined.h 2.36 warwick +5 -5
+src/widgets/qpopmenu.cpp 2.78 warwick +1 -1
+src/widgets/qpopmenu.h 2.14 warwick +2 -110
+src/widgets/qpopupmenu.cpp 2.78 warwick +6 -6
+src/widgets/qpopupmenu.h 2.14 warwick +6 -6
+src/widgets/qprogbar.cpp 2.19 warwick +1 -1
+src/widgets/qprogbar.h 2.9 warwick +2 -65
+src/widgets/qprogressbar.cpp 2.19 warwick +5 -5
+src/widgets/qprogressbar.h 2.9 warwick +4 -4
+src/widgets/qpushbt.cpp 2.41 warwick +1 -1
+src/widgets/qpushbt.h 2.8 warwick +2 -70
+src/widgets/qpushbutton.cpp 2.41 warwick +6 -6
+src/widgets/qpushbutton.h 2.8 warwick +4 -4
+src/widgets/qradiobt.cpp 2.28 warwick +1 -1
+src/widgets/qradiobt.h 2.8 warwick +2 -55
+src/widgets/qradiobutton.cpp 2.28 warwick +6 -6
+src/widgets/qradiobutton.h 2.8 warwick +4 -4
+src/widgets/qrangecontrol.cpp 2.6 warwick +3 -3
+src/widgets/qrangecontrol.h 2.3 warwick +4 -4
+src/widgets/qrangect.cpp 2.6 warwick +1 -1
+src/widgets/qrangect.h 2.3 warwick +2 -76
+src/widgets/qscrbar.cpp 2.38 warwick +1 -1
+src/widgets/qscrbar.h 2.6 warwick +2 -115
+src/widgets/qscrollbar.cpp 2.38 warwick +3 -3
+src/widgets/qscrollbar.h 2.6 warwick +6 -6
+src/widgets/qscrollview.cpp 2.46 warwick +5 -4
+src/widgets/qscrollview.h 2.21 warwick +2 -2
+src/widgets/qslider.cpp 2.52 warwick +2 -2
+src/widgets/qslider.h 2.23 warwick +2 -2
+src/widgets/qspinbox.cpp 2.35 warwick +3 -3
+src/widgets/qspinbox.h 2.20 warwick +2 -2
+src/widgets/qsplitter.cpp 1.16 warwick +2 -2
+src/widgets/qstatusbar.cpp 2.14 warwick +3 -3
+src/widgets/qtableview.cpp 2.49 warwick +5 -5
+src/widgets/qtableview.h 2.10 warwick +4 -4
+src/widgets/qtablevw.cpp 2.49 warwick +1 -1
+src/widgets/qtablevw.h 2.10 warwick +2 -241
+src/widgets/qtoolbar.cpp 2.23 warwick +5 -4
+src/widgets/qtoolbutton.cpp 2.28 warwick +3 -3
+src/widgets/qtooltip.cpp 2.47 warwick +4 -4
+src/widgets/qwellarray.cpp 1.4 warwick +4 -3
+src/widgets/qwellarray.h 1.5 warwick +2 -2
+src/widgets/qwhatsthis.cpp 2.15 warwick +3 -3
+src/widgets/qwidgetstack.cpp 2.7 warwick +3 -2
+tutorial/t1/main.cpp 2.1 warwick +2 -2
+tutorial/t10/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t10/main.cpp 2.3 warwick +4 -4
+tutorial/t11/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t11/main.cpp 2.3 warwick +4 -4
+tutorial/t12/cannon.cpp 2.3 warwick +1 -1
+tutorial/t12/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t12/main.cpp 2.3 warwick +4 -4
+tutorial/t13/cannon.cpp 2.3 warwick +1 -1
+tutorial/t13/gamebrd.cpp 2.1 warwick +3 -3
+tutorial/t13/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t13/main.cpp 2.3 warwick +1 -1
+tutorial/t14/cannon.cpp 2.3 warwick +1 -1
+tutorial/t14/gamebrd.cpp 2.2 warwick +3 -3
+tutorial/t14/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t14/main.cpp 2.3 warwick +1 -1
+tutorial/t2/main.cpp 2.1 warwick +2 -2
+tutorial/t3/main.cpp 2.1 warwick +2 -2
+tutorial/t4/main.cpp 2.1 warwick +2 -2
+tutorial/t5/main.cpp 2.1 warwick +4 -4
+tutorial/t6/main.cpp 2.1 warwick +4 -4
+tutorial/t7/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t7/main.cpp 2.1 warwick +4 -4
+tutorial/t8/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t8/main.cpp 2.1 warwick +4 -4
+tutorial/t9/lcdrange.cpp 2.1 warwick +2 -2
+tutorial/t9/main.cpp 2.3 warwick +4 -4
+
+ The Big Renaming of '98
+
+
+doc/tutorial.doc 2.14 agulbra +4 -4
+
+ new header files
+
+
+examples/validator/motor.cpp 1.8 agulbra +2 -71
+examples/validator/motor.h 1.7 agulbra +2 -29
+examples/validator/vw.cpp 1.7 agulbra +11 -11
+examples/validator/vw.h 1.4 agulbra +3 -3
+
+ some fixes for current QSpinBox
+
+
+extensions/nsplugin/src/qnp.pro 1.2 warwick +1 -1
+
+ tmake workaround
+
+
+src/dialogs/qfiledialog.cpp 2.70 agulbra +46 -1
+src/dialogs/qfiledialog.h 2.17 agulbra +3 -1
+src/dialogs/qfiledlg.cpp 2.70 agulbra +46 -1
+src/dialogs/qfiledlg.h 2.17 agulbra +3 -1
+
+ support multile file types
+
+
+src/dialogs/qfiledlg.h 2.19 warwick +0 -0
+src/dialogs/qmsgbox.h 2.27 warwick +0 -0
+src/dialogs/qprndlg.h 2.10 warwick +0 -0
+src/dialogs/qprogdlg.h 2.15 warwick +0 -0
+src/dialogs/qtabdlg.h 2.20 warwick +0 -0
+src/kernel/qapp.h 2.28 warwick +0 -0
+src/kernel/qclipbrd.h 2.6 warwick +0 -0
+src/kernel/qconnect.h 2.6 warwick +0 -0
+src/kernel/qdrawutl.h 2.8 warwick +0 -0
+src/kernel/qfontdta.h 2.12 warwick +0 -0
+src/kernel/qfontinf.h 2.8 warwick +0 -0
+src/kernel/qfontmet.h 2.15 warwick +0 -0
+src/kernel/qgmanagr.h 2.14 warwick +0 -0
+src/kernel/qmetaobj.h 2.5 warwick +0 -0
+src/kernel/qobjdefs.h 2.5 warwick +0 -0
+src/kernel/qpaintd.h 2.8 warwick +0 -0
+src/kernel/qpaintdc.h 2.7 warwick +0 -0
+src/kernel/qpdevmet.h 2.4 warwick +0 -0
+src/kernel/qpmcache.h 2.5 warwick +0 -0
+src/kernel/qpntarry.h 2.8 warwick +0 -0
+src/kernel/qpsprn.h 2.9 warwick +0 -0
+src/kernel/qsocknot.h 2.5 warwick +0 -0
+src/kernel/qwindefs.h 2.24 warwick +0 -0
+src/tools/qbitarry.h 2.6 warwick +0 -0
+src/tools/qcollect.h 2.4 warwick +0 -0
+src/tools/qdatetm.h 2.5 warwick +0 -0
+src/tools/qdstream.h 2.7 warwick +0 -0
+src/tools/qfiledef.h 2.9 warwick +0 -0
+src/tools/qfileinf.h 2.4 warwick +0 -0
+src/tools/qintcach.h 2.4 warwick +0 -0
+src/tools/qiodev.h 2.6 warwick +0 -0
+src/tools/qtstream.h 2.8 warwick +0 -0
+src/widgets/qbttngrp.h 2.7 warwick +0 -0
+src/widgets/qchkbox.h 2.7 warwick +0 -0
+src/widgets/qcombo.h 2.28 warwick +0 -0
+src/widgets/qgrpbox.h 2.5 warwick +0 -0
+src/widgets/qlcdnum.h 2.9 warwick +0 -0
+src/widgets/qlined.h 2.29 warwick +0 -0
+src/widgets/qmenudta.h 2.12 warwick +0 -0
+src/widgets/qmlined.h 2.37 warwick +0 -0
+src/widgets/qpopmenu.h 2.15 warwick +0 -0
+src/widgets/qprogbar.h 2.10 warwick +0 -0
+src/widgets/qpushbt.h 2.9 warwick +0 -0
+src/widgets/qradiobt.h 2.9 warwick +0 -0
+src/widgets/qrangect.h 2.4 warwick +0 -0
+src/widgets/qscrbar.h 2.7 warwick +0 -0
+src/widgets/qtablevw.h 2.11 warwick +0 -0
+
+ Move compatibility files out of the way.
+
+
+src/dialogs/qprintdialog.cpp 2.27 agulbra +67 -1
+src/dialogs/qprndlg.cpp 2.27 agulbra +67 -1
+
+ val's irix 6.3 printer discovery code
+
+
+src/kernel/qapp.cpp 2.56 agulbra +14 -6
+src/kernel/qapplication.cpp 2.56 agulbra +14 -6
+src/kernel/qasyncimageio.cpp 1.34 agulbra +53 -15
+src/kernel/qregion.cpp 2.13 agulbra +1 -8
+src/kernel/qregion.h 2.13 agulbra +1 -4
+src/widgets/qheader.cpp 2.44 agulbra +4 -5
+
+ Reginald Stadlbauer's alpha's egcs said to do this. it doesn't like
+ static objects with non-default constructors.
+
+
+src/kernel/qapp_os2.cpp 2.6 warwick +1 -1
+src/kernel/qcol_os2.cpp 2.4 warwick +1 -1
+src/kernel/qcur_os2.cpp 2.4 warwick +1 -1
+src/kernel/qfnt_os2.cpp 2.3 warwick +1 -1
+src/kernel/qpic_os2.cpp 2.3 warwick +1 -1
+src/kernel/qpm_os2.cpp 2.3 warwick +1 -1
+src/kernel/qptd_os2.cpp 2.4 warwick +1 -1
+src/kernel/qptr_os2.cpp 2.5 warwick +1 -1
+src/kernel/qrgn_os2.cpp 2.5 warwick +1 -1
+src/kernel/qwid_os2.cpp 2.7 warwick +1 -1
+
+ Remove OS2 code.
+
+
+src/kernel/qapp_x11.cpp 2.139 hanord +2 -4
+src/kernel/qapplication_x11.cpp 2.139 hanord +2 -4
+
+ Fixed keyboard release event bug when the key press was done outside the
+ window (Morten Eriksen bug report).
+
+
+src/kernel/qapp_x11.cpp 2.140 warwick +5 -5
+src/kernel/qapplication_x11.cpp 2.140 warwick +5 -5
+src/kernel/qfnt_x11.cpp 2.37 warwick +9 -23
+src/kernel/qfont_x11.cpp 2.37 warwick +9 -23
+src/kernel/qimage.cpp 2.90 warwick +13 -13
+src/kernel/qnpsupport.cpp 2.10 warwick +2 -1
+src/kernel/qwidget.cpp 2.109 warwick +17 -16
+
+ Fix pointer-to-int casts that 64-bit compiler don't like.
+
+
+src/kernel/qcol_x11.cpp 2.30 hanord +2 -2
+src/kernel/qcolor_x11.cpp 2.30 hanord +2 -2
+src/widgets/qheader.cpp 2.42 hanord +2 -2
+
+ Don't do big changes in 1.40, wait until 1.49
+
+
+src/kernel/qdialog.cpp 2.18 warwick +20 -4
+
+ Stay on-screen when centering relative to parent. This code should
+ be shared.
+
+
+src/kernel/qdnd_x11.cpp 2.15 agulbra +6 -9
+
+ comment out old debug messages; delete some
+
+
+src/kernel/qdnd_x11.cpp 2.16 agulbra +8 -5
+
+ workaround for gcc/alpha brokenness.
+
+
+src/kernel/qdnd_x11.cpp 2.17 warwick +9 -9
+src/kernel/qpainter.cpp 2.52 warwick +14 -11
+src/kernel/qwid_x11.cpp 2.95 warwick +2 -2
+src/kernel/qwidget_x11.cpp 2.95 warwick +2 -2
+src/widgets/qwellarray.cpp 1.3 warwick +10 -1
+src/widgets/qwellarray.h 1.4 warwick +2 -1
+
+ Avoid HPUX warnings.
+
+
+src/kernel/qdragobject.cpp 2.15 agulbra +4 -6
+
+ ignore totally unexpected events
+
+
+src/kernel/qdragobject.cpp 2.16 agulbra +2 -2
+
+ stop warning
+
+
+src/kernel/qfnt_win.cpp 2.29 warwick +3 -3
+src/kernel/qfnt_x11.cpp 2.38 warwick +4 -4
+src/kernel/qfont_win.cpp 2.29 warwick +3 -3
+src/kernel/qfont_x11.cpp 2.38 warwick +4 -4
+
+ Fix width(char) for signed characters.
+
+
+src/kernel/qgmanager.cpp 2.35 paul +48 -20
+src/kernel/qgmanager.h 2.12 paul +3 -1
+src/kernel/qgmanagr.cpp 2.35 paul +48 -20
+src/kernel/qgmanagr.h 2.12 paul +3 -1
+src/kernel/qlayout.cpp 2.32 paul +36 -22
+
+ Better debug output.
+
+
+src/kernel/qimage.cpp 2.92 warwick +3 -3
+src/kernel/qlayout.cpp 2.34 agulbra +10 -25
+src/kernel/qpainter.cpp 2.50 agulbra +6 -12
+src/tools/qregexp.cpp 2.11 agulbra +3 -3
+src/widgets/qstatusbar.cpp 2.12 agulbra +4 -4
+
+ doc
+
+
+src/kernel/qlayout.cpp 2.31 agulbra +75 -24
+src/widgets/qlistview.cpp 2.114 agulbra +7 -2
+
+ some docs
+
+
+src/kernel/qlayout.cpp 2.33 agulbra +183 -34
+src/widgets/qlistview.cpp 2.115 agulbra +93 -22
+src/widgets/qlistview.h 2.50 agulbra +4 -1
+src/widgets/qwhatsthis.cpp 2.14 agulbra +152 -29
+
+ doc, doc, doc. this round pushes qt over 3250 documented functions.
+ the next milestone is five megs of html doc (sixty-odd k left).
+
+
+src/kernel/qobjcoll.h 2.7 warwick +4 -20
+src/kernel/qwidcoll.h 2.6 warwick +3 -14
+
+ Broken in rename.
+
+
+src/kernel/qobjcoll.h 2.8 warwick +1 -1
+src/kernel/qwidcoll.h 2.7 warwick +1 -1
+
+ Moved.
+
+
+src/kernel/qpainter.cpp 2.51 warwick +2 -2
+
+ Improve robustness.
+
+
+src/kernel/qprinter_x11.cpp 2.15 agulbra +2 -1
+src/kernel/qprn_x11.cpp 2.15 agulbra +2 -1
+
+ #include <errno.h>; necessary for some unixes
+
+
+src/kernel/qwidget.cpp 2.110 agulbra +2 -2
+
+ make tab focus change work (at all!) in dialogs
+
+
+src/tools/qfileinf.cpp 2.10 agulbra +17 -8
+src/tools/qfileinfo.cpp 2.10 agulbra +17 -8
+
+ double the speed of isSymLink() (and hence the file dialog's repaint)
+ in one easy change.
+
+
+src/tools/qgdict.cpp 2.15 warwick +2 -2
+
+ 64-bit pointer to long fix.
+
+
+src/tools/qstring.cpp 2.20 warwick +2 -2
+
+ Obscure safety improvement.
+
+
+src/widgets/qcombo.cpp 2.86 agulbra +2 -2
+src/widgets/qcombobox.cpp 2.86 agulbra +2 -2
+src/widgets/qlabel.cpp 2.31 agulbra +2 -2
+
+ fix logic to decide when to locate the listbox above the combo itself
+ instead of below.
+
+
+src/widgets/qheader.cpp 2.43 agulbra +2 -3
+
+ remove a "this should not happen" debug() because that situation
+ should happen. can happen, anyway.
+
+
+src/widgets/qlined.cpp 2.80 warwick +24 -6
+src/widgets/qlined.h 2.27 warwick +2 -1
+src/widgets/qlineedit.cpp 2.80 warwick +24 -6
+src/widgets/qlineedit.h 2.27 warwick +2 -1
+src/widgets/qmlined.cpp 2.92 warwick +36 -7
+src/widgets/qmlined.h 2.35 warwick +2 -1
+src/widgets/qmultilined.cpp 2.92 warwick +36 -7
+src/widgets/qmultilined.h 2.35 warwick +2 -1
+
+ Make WindowsStyle under X11 still meet the X11 user's expectations
+ regarding auto-copy, while allowing the highlight-and-paste action
+ familiar to Windows users. A compromise.
+
+ Also make qmlined more similar to qlined.
+
+
+src/widgets/qlistbox.cpp 2.68 warwick +2 -2
+
+ Use maximumSize() correctly.
+ (fixes kdisplay background problem)
+
+
+src/widgets/qlistview.cpp 2.116 agulbra +25 -12
+
+ tweak mouse state machine a little. make it harder to select a
+ non-selectable item. doc fixes.
+
+
+src/widgets/qmainwindow.cpp 2.25 agulbra +3 -5
+src/widgets/qmainwindow.cpp 2.24 agulbra +245 -26
+src/widgets/qmainwindow.h 2.15 agulbra +2 -1
+
+ if a dock contained only hidden toolbars, layout would be wrong.
+ also contains ifdef-ed out broken docking code.
+
+
+src/widgets/qmainwindow.cpp 2.26 warwick +3 -1
+src/widgets/qsplitter.cpp 1.15 warwick +3 -1
+src/widgets/qstatusbar.cpp 2.13 warwick +3 -1
+
+ New documentation images.
+
+
+src/widgets/qmainwindow.h 2.16 agulbra +2 -3
+
+ setRightJustification is now a slot
+
+
+src/widgets/qmenudata.cpp 2.15 warwick +4 -2
+src/widgets/qmenudta.cpp 2.15 warwick +4 -2
+
+ Warning about setCheckable in setItemChecked.
+
+
+src/widgets/qpopmenu.cpp 2.76 warwick +4 -9
+src/widgets/qpopupmenu.cpp 2.76 warwick +4 -9
+
+ Fix "need more than one off-menu click to cancel" bug.
+ Make Escape only pop down one popup (as per Windows and Motif).
+
+
+src/widgets/qpopmenu.cpp 2.77 warwick +4 -2
+src/widgets/qpopupmenu.cpp 2.77 warwick +4 -2
+
+ Correct drop-down-on-no-selection behaviour.
+
+
+src/widgets/qspinbox.cpp 2.33 agulbra +5 -7
+
+ minor changes; this really need to take the validator into
+ consideration when the user has typed but I can't fix that now.
+
+
+src/widgets/qspinbox.cpp 2.34 agulbra +18 -3
+src/widgets/qspinbox.h 2.19 agulbra +3 -1
+
+ handle setEnabled() correctly
+
+
+src/widgets/qsplitter.cpp 1.14 paul +10 -10
+
+ Fixed off-by-one error
+
+
+src/widgets/qtabbar.h 2.11 agulbra +2 -1
+
+ one variable wasn't initialized. initialize it.
+
+
+src/widgets/qtooltip.cpp 2.46 agulbra +3 -3
+
+ stay up for ten seconds, not four.
+
+
+src/widgets/qvalidator.cpp 2.20 agulbra +7 -4
+
+ "-" is a valid state for both validator; allows typing of -42 in the
+ natural way if -42 is valid.
+
diff --git a/dist/changes-1.39-19980623 b/dist/changes-1.39-19980623
new file mode 100644
index 0000000..0a40bf9
--- /dev/null
+++ b/dist/changes-1.39-19980623
@@ -0,0 +1,545 @@
+doc/annotated.doc 1.5 warwick +6 -3
+
+ Try new tabled annotated list.
+
+
+doc/tutorial.doc 2.14 agulbra +4 -4
+
+ new header files
+
+
+examples/application/application.cpp 1.13 warwick +2 -2
+examples/layout/layout.cpp 1.7 warwick +2 -2
+examples/network/finger.cpp 1.8 warwick +2 -2
+examples/pref/pref.cpp 1.21 warwick +2 -2
+examples/qwerty/qwerty.h 1.9 warwick +2 -2
+examples/scrollview/scrollview.cpp 1.16 warwick +2 -2
+examples/widgets/widgets.cpp 2.44 warwick +2 -2
+src/widgets/qmultilinedit.cpp 2.94 warwick +2 -2
+
+ Rename fix - "qmultilinedit.h" not "qmultilined.h"
+
+
+examples/application/application.cpp 1.14 agulbra +32 -18
+
+ use QWhatsThis
+
+
+examples/application/application.cpp 1.15 warwick +7 -6
+examples/application/application.h 1.5 warwick +2 -1
+
+ Use persistent QPrinter.
+
+
+examples/dragdrop/.cvsignore 1.1 warwick initial checkin
+examples/dragdrop/dragdrop.pro 1.1 warwick initial checkin
+examples/dragdrop/main.cpp 1.6 warwick +20 -7
+src/qt.pro 2.28 warwick +3 -3
+
+ upd
+
+
+examples/dragdrop/GNUmakefile 1.1 warwick initial checkin
+examples/dragdrop/Makefile 1.1 warwick initial checkin
+examples/dragdrop/main.cpp 1.2 warwick +2 -1
+
+ Quit.
+
+
+examples/dragdrop/dropsite.cpp 1.1 agulbra initial checkin
+examples/dragdrop/dropsite.h 1.1 agulbra initial checkin
+examples/dragdrop/main.cpp 1.1 agulbra initial checkin
+
+ kind of like simple.c, except not 2000 lines
+
+
+examples/dragdrop/dropsite.cpp 1.2 warwick +22 -3
+examples/dragdrop/main.cpp 1.3 warwick +3 -3
+
+ Fixes, more debug options.
+
+
+examples/dragdrop/dropsite.cpp 1.3 warwick +36 -34
+examples/dragdrop/main.cpp 1.4 warwick +2 -2
+
+ Better feedback, more examples.
+
+
+examples/dragdrop/dropsite.cpp 1.4 warwick +5 -3
+
+ Visualize DragLeave events.
+
+
+examples/dragdrop/dropsite.cpp 1.5 warwick +15 -43
+examples/dragdrop/dropsite.h 1.2 warwick +1 -7
+examples/dragdrop/main.cpp 1.5 warwick +2 -10
+
+ Remove format choice - QImageDragObject deals with that.
+
+
+examples/dragdrop/dropsite.cpp 1.6 warwick +4 -5
+src/kernel/qdragobject.cpp 2.25 warwick +11 -6
+src/kernel/qdragobject.h 2.12 warwick +3 -2
+
+ Set MIME format in QStoredDragObject constructor.
+
+
+examples/dragdrop/dropsite.cpp 1.7 warwick +10 -3
+examples/dragdrop/dropsite.h 1.3 warwick +2 -1
+
+ Use Event_DragEnter
+
+
+examples/movies/main.cpp 1.12 warwick +4 -4
+
+ Warnings, robustness.
+
+
+examples/showimg/.cvsignore 2.1 warwick +5 -0
+
+ Ignore images
+
+
+extensions/nsplugin/examples/Makefile 1.1 warwick initial checkin
+extensions/xt/doc.conf 1.4 warwick +1 -1
+
+ Oddsnends
+
+
+extensions/nsplugin/src/qnp.cpp 1.20 warwick +19 -20
+
+ show() not required now.
+
+
+extensions/nsplugin/src/qnp.pro 1.2 warwick +1 -1
+
+ tmake workaround
+
+
+src/compat/qmlined.h 1.2 warwick +1 -1
+
+ edit not ed
+
+
+src/compat/qobjcoll.h 1.1 warwick initial checkin
+src/compat/qwidcoll.h 1.1 warwick initial checkin
+src/kernel/qobjcoll.h 2.8 warwick +1 -1
+src/kernel/qwidcoll.h 2.7 warwick +1 -1
+
+ Moved.
+
+
+src/dialogs/qfiledialog.cpp 2.72 agulbra +79 -54
+
+ avoid one more static
+
+
+src/dialogs/qfiledialog.cpp 2.73 agulbra +3 -3
+
+ use the right column width in multi-column mode
+
+
+src/dialogs/qfiledialog.cpp 2.74 agulbra +1 -2
+
+ commit -without- debug feature
+
+
+src/dialogs/qfiledialog.cpp 2.75 agulbra +22 -8
+
+ handle "type name of directory then press enter" case by switching to
+ that directory
+
+
+src/dialogs/qfiledialog.cpp 2.76 agulbra +10 -7
+
+ minor tweak to make the ok button change less often
+
+
+src/dialogs/qfiledialog.cpp 2.77 agulbra +2 -2
+
+ slightly better row height in the multi-column view
+
+
+src/kernel/qapp.cpp 2.56 agulbra +14 -6
+src/kernel/qapplication.cpp 2.56 agulbra +14 -6
+src/kernel/qasyncimageio.cpp 1.34 agulbra +53 -15
+src/kernel/qregion.cpp 2.13 agulbra +1 -8
+src/kernel/qregion.h 2.13 agulbra +1 -4
+src/widgets/qheader.cpp 2.44 agulbra +4 -5
+
+ Reginald Stadlbauer's alpha's egcs said to do this. it doesn't like
+ static objects with non-default constructors.
+
+
+src/kernel/qapplication_win.cpp 2.91 warwick +10 -1
+src/kernel/qdnd_x11.cpp 2.20 warwick +1 -7
+src/kernel/qdragobject.h 2.9 warwick +1 -4
+src/kernel/qwidget.cpp 2.112 warwick +4 -11
+src/kernel/qwidget_win.cpp 2.57 warwick +20 -3
+src/kernel/qwidget_x11.cpp 2.97 warwick +12 -4
+src/kernel/qwindowdefs.h 2.24 warwick +5 -1
+
+ Drag&dropery.
+
+
+src/kernel/qapplication_win.cpp 2.93 warwick +4 -2
+src/kernel/qdnd_win.cpp 2.10 warwick +483 -135
+src/kernel/qdnd_x11.cpp 2.24 warwick +21 -1
+src/kernel/qdragobject.cpp 2.18 warwick +5 -5
+src/kernel/qevent.cpp 2.17 warwick +1 -21
+src/kernel/qimage.cpp 2.93 warwick +73 -34
+src/kernel/qwidget_win.cpp 2.59 warwick +4 -3
+
+ Windows Drap & Drop.
+
+
+src/kernel/qasyncimageio.cpp 1.35 agulbra +2 -2
+
+ make cleanup() static
+
+
+src/kernel/qasyncimageio.cpp 1.37 warwick +4 -2
+src/kernel/qasyncimageio.cpp 1.36 warwick +30 -7
+src/kernel/qdragobject.cpp 2.22 warwick +7 -5
+src/kernel/qimage.cpp 2.96 warwick +4 -1
+src/kernel/qimage.cpp 2.95 agulbra +8 -9
+src/kernel/qimage.cpp 2.92 warwick +3 -3
+src/tools/qdir.cpp 2.24 agulbra +7 -1
+
+ doc
+
+
+src/kernel/qclipboard_x11.cpp 2.14 agulbra +26 -20
+
+ avoid statics that are troublesome on the alpha
+
+
+src/kernel/qdialog.cpp 2.20 agulbra +39 -18
+
+ frameGeometry() is normally not meaningful before show(), so I
+ switched to a different way of ensuring that the dialog's default
+ position is entirely on-screen. may not work perfectly with
+ Enlightenment :)
+
+
+src/kernel/qdnd_win.cpp 2.11 warwick +5 -1
+src/kernel/qdnd_x11.cpp 2.25 warwick +56 -1
+src/kernel/qdragobject.cpp 2.19 warwick +8 -59
+
+ Move QDragManager::eventFilter code to X11-specifics.
+
+
+src/kernel/qdnd_win.cpp 2.12 warwick +44 -31
+
+ Follow DnD API changes.
+ Add leave event.
+
+
+src/kernel/qdnd_win.cpp 2.13 warwick +8 -3
+src/kernel/qevent.h 2.19 warwick +15 -5
+
+ DragEnter events and final DragLeave to DropEvent targets.
+
+
+src/kernel/qdnd_win.cpp 2.14 warwick +2 -6
+
+ spacing
+
+
+src/kernel/qdnd_win.cpp 2.7 warwick +989 -12
+
+ First inclusion from tests/olednd code.
+
+
+src/kernel/qdnd_win.cpp 2.9 warwick +162 -98
+
+ DND.
+
+
+src/kernel/qdnd_x11.cpp 2.17 warwick +9 -9
+src/kernel/qpainter.cpp 2.52 warwick +14 -11
+src/kernel/qwid_x11.cpp 2.95 warwick +2 -2
+src/kernel/qwidget_x11.cpp 2.95 warwick +2 -2
+src/widgets/qwellarray.cpp 1.3 warwick +10 -1
+src/widgets/qwellarray.h 1.4 warwick +2 -1
+
+ Avoid HPUX warnings.
+
+
+src/kernel/qdnd_x11.cpp 2.19 agulbra +29 -25
+
+ egcs/alpha workarounds.
+
+
+src/kernel/qdnd_x11.cpp 2.22 agulbra +2 -2
+src/kernel/qwidget_x11.cpp 2.98 agulbra +2 -2
+
+ don't segfault on first registerDropType()
+
+
+src/kernel/qdnd_x11.cpp 2.23 paul +5 -3
+
+ Ignore windows without clients.
+
+
+src/kernel/qdnd_x11.cpp 2.26 warwick +18 -1
+src/kernel/qdragobject.cpp 2.20 warwick +1 -16
+
+ Move DND cursor into X11-specifics.
+
+
+src/kernel/qdnd_x11.cpp 2.27 warwick +16 -10
+src/kernel/qdragobject.cpp 2.23 warwick +130 -71
+src/kernel/qdragobject.h 2.11 warwick +14 -25
+
+ Multi-format QDragObject API.
+
+
+src/kernel/qdnd_x11.cpp 2.28 agulbra +47 -18
+
+ updated to match windows version
+
+
+src/kernel/qdragobject.cpp 2.21 warwick +99 -14
+src/kernel/qdragobject.h 2.10 warwick +45 -3
+
+ QImageDragObject
+ Mark out problem areas for fixing.
+
+
+src/kernel/qdragobject.cpp 2.24 agulbra +2 -2
+src/kernel/qlayout.cpp 2.35 agulbra +3 -3
+src/kernel/qpixmapcache.cpp 2.8 agulbra +2 -1
+src/tools/qgcache.cpp 2.7 agulbra +12 -8
+src/widgets/qpushbutton.cpp 2.43 agulbra +3 -3
+
+ speling
+
+
+src/kernel/qdragobject.cpp 2.26 warwick +9 -17
+src/kernel/qdragobject.h 2.13 warwick +3 -4
+
+ Simplify QStoredDragObject.
+
+
+src/kernel/qevent.h 2.20 agulbra +9 -3
+
+ added no-answer-necessary rectangle to drag move event
+
+
+src/kernel/qfocusdata.h 2.3 warwick +11 -3
+src/widgets/qscrollview.cpp 2.48 warwick +12 -7
+src/widgets/qscrollview.cpp 2.47 warwick +6 -4
+
+ Focus wrapping.
+
+
+src/kernel/qfont.cpp 2.36 agulbra +19 -7
+
+ more alpha/egcs/linux workarounds
+
+
+src/kernel/qfont_x11.cpp 2.40 warwick +3 -3
+
+ Go gray.
+
+
+src/kernel/qimage.cpp 2.94 warwick +22 -1
+src/kernel/qimage.h 2.28 warwick +2 -1
+src/kernel/qpixmap.cpp 2.27 warwick +24 -1
+src/kernel/qpixmap.h 2.21 warwick +5 -2
+
+ Convenient input from QByteArray.
+
+
+src/kernel/qimage.cpp 2.97 warwick +2 -2
+src/kernel/qpixmap.cpp 2.28 warwick +2 -2
+
+ Fix.
+
+
+src/kernel/qmovie.cpp 1.34 warwick +11 -2
+
+ Code to be added and tested later.
+
+
+src/kernel/qmovie.cpp 1.35 warwick +5 -9
+src/kernel/qmovie.h 1.11 warwick +3 -2
+
+ Provide QDataSource source to QMovie.
+
+
+src/kernel/qobjcoll.h 2.7 warwick +4 -20
+src/kernel/qwidcoll.h 2.6 warwick +3 -14
+
+ Broken in rename.
+
+
+src/kernel/qprinter_x11.cpp 2.17 agulbra +4 -3
+
+ roll back to 1.33 version
+
+
+src/kernel/qwidget.cpp 2.113 paul +3 -2
+
+ Send queued-up childEvents before the first resize event
+
+
+src/kernel/qwidget.h 2.51 warwick +3 -1
+
+ Separate sys-dep extra data create/delete.
+
+
+src/qt.pro 2.27 warwick +1 -0
+src/dialogs/qfiledlg.cpp 2.72 warwick +2 -1
+src/kernel/qapplication_win.cpp 2.92 warwick +4 -4
+src/kernel/qdnd_win.cpp 2.8 warwick +115 -505
+src/kernel/qdnd_x11.cpp 2.21 warwick +2 -2
+src/kernel/qevent.h 2.18 warwick +2 -2
+src/kernel/qwidget_win.cpp 2.58 warwick +3 -1
+
+ Drag&Dropery.
+
+
+src/qt.pro 2.29 warwick +2 -0
+src/kernel/qfocusdata.cpp 2.1 warwick initial checkin
+src/kernel/qfocusdata.h 2.4 warwick +6 -12
+src/kernel/qwidget.cpp 2.114 warwick +3 -1
+src/widgets/qscrollview.cpp 2.49 warwick +5 -8
+
+ Make QFocusData clean and public.
+
+
+src/tools/qdir.cpp 2.23 agulbra +2 -2
+
+ avoid a static. saves some memory.
+
+
+src/tools/qglobal.cpp 2.16 agulbra +6 -4
+
+ void statics
+
+
+src/widgets/qbutton.cpp 2.62 agulbra +5 -9
+
+ emit toggled() and clicked() even if this is a toggle button and will
+ not toggle off.
+
+
+src/widgets/qbutton.cpp 2.63 agulbra +4 -4
+
+ correct toggling-when-in-group behaviour
+
+
+src/widgets/qheader.cpp 2.46 paul +4 -4
+
+ Fix off by one error that caused "index out of range".
+
+
+src/widgets/qlistview.cpp 2.118 agulbra +19 -12
+
+ much faster scrolling in unsorted mode; use about half as much memory
+ per item; free the items properly
+
+
+src/widgets/qlistview.cpp 2.119 agulbra +2 -2
+
+ unsort/sort correctly
+
+
+src/widgets/qlistview.cpp 2.120 agulbra +3 -3
+
+ finalize QListViewItem in the right way
+
+
+src/widgets/qlistview.cpp 2.121 agulbra +35 -17
+
+ cut memory usage by another fifty per cent in the common case. QLVI
+ now uses 150-200 bytes of memory, down from ~800 last week.
+
+ default to the correct height (including itemMargin()).
+
+ change itemMargin default to one pixel, from two.
+
+ use itemMargin both on the left and on the right edge of each column.
+
+ ensure that children are sorted correctly in QLV::firstChild(), as
+ they are in QLVI::firstChild().
+
+
+src/widgets/qlistview.h 2.51 agulbra +2 -2
+
+ make setItemMargin() virtual. who put in a non-virtual setter
+ function?
+
+
+src/widgets/qmenudata.cpp 2.17 agulbra +8 -6
+
+ DWIM: call setCheckable() in setItemChecked() if necessary
+
+
+src/widgets/qmultilinedit.h 2.37 warwick +3 -3
+
+ EDIT, not ED.
+
+
+src/widgets/qpopupmenu.cpp 2.79 warwick +2 -4
+
+ Roll-back my menu-stays-up "fix".
+
+
+src/widgets/qpopupmenu.cpp 2.80 warwick +7 -2
+
+ Worse but better fix for allow both popup and pulldown/pushup menus.
+
+
+src/widgets/qpushbutton.cpp 2.42 agulbra +16 -57
+
+ use alternative (windows-like) motif indication of default button
+ status, rather than the nextstep/xforms/gtk-like indication.
+
+
+src/widgets/qsplitter.cpp 1.17 paul +6 -5
+src/widgets/qsplitter.h 1.9 paul +3 -2
+
+ Changed QSplitter::setFixed() to start counting at 0 instead of 1.
+
+ *** WILL BREAK OLD CODE ***
+
+ Also introduced FirstWidget and SecondWidget enum values to make setFixed()
+ calls more readable.
+
+
+src/widgets/qsplitter.cpp 1.18 paul +160 -141
+src/widgets/qsplitter.h 1.10 paul +16 -17
+
+ Reworked QSplitter API. Splitter now detects its children, addFirstWidget etc
+ disappears.
+ *** WILL BREAK OLD CODE ***
+
+
+src/widgets/qtooltip.cpp 2.48 agulbra +4 -4
+
+ tweak periods a bit
+
+
+src/widgets/qtooltip.cpp 2.49 agulbra +4 -3
+
+ paranoia fix: don't let buggy programs introduce an infinte loop by
+ calling tip() with the "wrong" rectangle.
+
+
+src/widgets/qwidgetstack.cpp 2.8 agulbra +4 -1
+src/widgets/qwidgetstack.h 2.5 agulbra +5 -1
+
+ aboutToShow()
+
+
+src/widgets/qwidgetstack.cpp 2.9 agulbra +69 -12
+src/widgets/qwidgetstack.h 2.6 agulbra +4 -2
+
+ added decent docs.
+ added a visibleWidget() access function
+ added an aboutToShow() signal.
+ fixed "value of NaN" bug (0 vs. -1)
+
diff --git a/dist/changes-1.39-19980625 b/dist/changes-1.39-19980625
new file mode 100644
index 0000000..c71578f
--- /dev/null
+++ b/dist/changes-1.39-19980625
@@ -0,0 +1,119 @@
+
+examples/application/application.cpp 1.14 agulbra +32 -18
+
+ use QWhatsThis
+
+
+examples/application/application.cpp 1.15 warwick +7 -6
+examples/application/application.h 1.5 warwick +2 -1
+
+ Use persistent QPrinter.
+
+
+examples/dragdrop/dropsite.cpp 1.8 warwick +44 -24
+
+ Improved usage #1.
+
+
+examples/dragdrop/dropsite.cpp 1.9 warwick +36 -81
+examples/dragdrop/dropsite.h 1.4 warwick +7 -9
+src/qt.pro 2.30 warwick +2 -0
+src/kernel/qclipboard_x11.cpp 2.15 warwick +10 -8
+src/kernel/qdnd_win.cpp 2.15 warwick +1 -18
+src/kernel/qdnd_x11.cpp 2.33 warwick +62 -67
+src/kernel/qdragobject.cpp 2.29 warwick +73 -27
+src/kernel/qdragobject.h 2.16 warwick +18 -12
+src/kernel/qdropsite.cpp 2.1 warwick initial checkin
+src/kernel/qdropsite.h 2.1 warwick initial checkin
+src/kernel/qwidget.h 2.52 warwick +3 -2
+src/kernel/qwidget_win.cpp 2.60 warwick +17 -7
+src/kernel/qwidget_x11.cpp 2.99 warwick +22 -12
+src/kernel/qwindowdefs.h 2.25 warwick +7 -3
+src/widgets/qlineedit.cpp 2.85 warwick +3 -3
+
+ Don't declare MIME types for drop sites in advance, just enable drops.
+
+
+examples/examples.pro 2.9 agulbra +1 -0
+
+ add dragdrop to examples makefile
+
+
+examples/movies/main.cpp 1.13 agulbra +9 -2
+
+ add use of setFilters().
+
+
+examples/splitter/splitter.cpp 1.1 paul initial checkin
+examples/splitter/splitter.pro 1.1 paul initial checkin
+
+ Simple QSplitter example
+
+
+src/dialogs/qprintdialog.cpp 2.29 warwick +57 -60
+
+ Fixed QPrinter->QPrintDialog state-transfer bugs.
+
+
+src/kernel/qapplication_x11.cpp 2.142 agulbra +7 -12
+src/kernel/qdnd_x11.cpp 2.37 agulbra +22 -23
+src/kernel/qdragobject.cpp 2.32 agulbra +5 -25
+src/kernel/qdragobject.h 2.19 agulbra +1 -4
+
+ Completely reworked drag'n'drop.
+
+
+src/kernel/qimage.cpp 2.99 agulbra +7 -6
+src/kernel/qimage.cpp 2.98 agulbra +18 -14
+src/kernel/qmovie.cpp 1.38 agulbra +8 -7
+src/kernel/qmovie.cpp 1.37 agulbra +12 -3
+
+ discuss patent issues
+
+
+src/widgets/qlineedit.cpp 2.82 agulbra +2 -3
+
+ reject drags that don't provide text/plain
+
+
+src/widgets/qlistview.cpp 2.122 warwick +3 -3
+
+ Fix multiple-calls-to-setText() unreported bug.
+
+
+src/widgets/qlistview.cpp 2.123 paul +16 -21
+src/widgets/qlistview.h 2.52 paul +2 -2
+
+ Make setPixmap() override default pixmap
+
+
+src/widgets/qlistview.cpp 2.124 agulbra +16 -17
+
+ adjust drawing of focus rectangle for trees
+
+
+src/widgets/qlistview.cpp 2.126 agulbra +1 -2
+src/widgets/qlistview.cpp 2.125 agulbra +6 -2
+
+ try even harder to not sort unless sorting is actually requested.
+
+
+src/widgets/qmultilinedit.cpp 2.95 agulbra +4 -4
+
+ doc correction
+
+
+src/widgets/qsplitter.cpp 1.19 paul +48 -45
+
+ fixing odds and ends after the API change
+
+
+src/widgets/qsplitter.cpp 1.23 warwick +5 -4
+
+ Position internalsplitter in middle of mouse when dragging.
+
+
+src/widgets/qsplitter.cpp 1.24 warwick +48 -45
+
+ Make bitmaps correspond to splitter dimensions.
+
diff --git a/dist/changes-1.39-19980706 b/dist/changes-1.39-19980706
new file mode 100644
index 0000000..80e814a
--- /dev/null
+++ b/dist/changes-1.39-19980706
@@ -0,0 +1,320 @@
+doc/indices.doc 2.17 agulbra +4 -4
+doc/misc.doc 2.29 agulbra +4 -4
+doc/qcache.doc 2.4 agulbra +598 -304
+doc/qdict.doc 2.5 agulbra +4 -3
+
+ documented QCache/QIntCache and the iterators, fixed some types
+
+
+doc/indices.doc 2.18 agulbra +7 -7
+extensions/imageio/doc/index.doc 1.6 agulbra +3 -3
+extensions/nsplugin/doc/annotated.doc 1.2 agulbra +2 -2
+extensions/nsplugin/doc/classes.doc 1.2 agulbra +2 -2
+extensions/opengl/src/qgl.cpp 1.20 agulbra +5 -6
+extensions/xt/doc/annotated.doc 1.2 agulbra +2 -2
+extensions/xt/doc/classes.doc 1.2 agulbra +2 -2
+src/tools/qtextstream.cpp 2.16 agulbra +1 -2
+
+ finished merge of qt/extensions documentation in one directory.
+
+
+doc/indices.doc 2.20 aavit +3 -3
+doc/qcache.doc 2.8 aavit +9 -1
+examples/application/application.cpp 1.16 aavit +17 -17
+examples/widgets/widgets.cpp 2.45 aavit +29 -5
+extensions/nsplugin/src/qnp.cpp 1.22 aavit +5 -5
+extensions/opengl/doc.conf 1.14 aavit +7 -0
+extensions/opengl/src/qgl.cpp 1.23 aavit +4 -4
+extensions/xt/doc/index.doc 1.4 aavit +18 -8
+extensions/xt/src/qxt.cpp 1.5 aavit +3 -3
+src/dialogs/qmessagebox.cpp 2.50 aavit +5 -5
+
+ Improved doc of extensions.
+
+
+doc/qcache.doc 2.9 aavit +47 -8
+
+ Documented the remaining functions in qcache et al.
+
+
+examples/dragdrop/dropsite.cpp 1.12 paul +76 -22
+examples/dragdrop/dropsite.h 1.5 paul +14 -2
+examples/dragdrop/main.cpp 1.7 paul +8 -3
+
+ How to make your own dragobject class
+
+
+examples/dragdrop/dropsite.cpp 1.9 warwick +36 -81
+examples/dragdrop/dropsite.h 1.4 warwick +7 -9
+src/qt.pro 2.30 warwick +2 -0
+src/kernel/qclipboard_x11.cpp 2.15 warwick +10 -8
+src/kernel/qdnd_win.cpp 2.15 warwick +1 -18
+src/kernel/qdnd_x11.cpp 2.33 warwick +62 -67
+src/kernel/qdragobject.cpp 2.29 warwick +73 -27
+src/kernel/qdragobject.h 2.16 warwick +18 -12
+src/kernel/qdropsite.cpp 2.1 warwick initial checkin
+src/kernel/qdropsite.h 2.1 warwick initial checkin
+src/kernel/qwidget.h 2.52 warwick +3 -2
+src/kernel/qwidget_win.cpp 2.60 warwick +17 -7
+src/kernel/qwidget_x11.cpp 2.99 warwick +22 -12
+src/kernel/qwindowdefs.h 2.25 warwick +7 -3
+src/widgets/qlineedit.cpp 2.85 warwick +3 -3
+
+ Don't declare MIME types for drop sites in advance, just enable drops.
+
+
+examples/examples.pro 2.10 hanord +1 -0
+
+ Added splitter
+
+
+examples/examples.pro 2.9 agulbra +1 -0
+
+ add dragdrop to examples makefile
+
+
+examples/layouts/layouts.cpp 1.6 aavit +2 -3
+
+ return value from main to avoid compiler warning
+
+
+extensions/nsplugin/src/qnp.cpp 1.21 agulbra +34 -24
+extensions/opengl/src/qgl.cpp 1.22 agulbra +7 -1
+extensions/xt/src/qxt.cpp 1.4 agulbra +6 -2
+
+ use new \extension in qdoc
+
+
+src/dialogs/qprintdialog.cpp 2.30 aavit +2 -2
+src/widgets/qspinbox.cpp 2.36 aavit +22 -29
+src/widgets/qspinbox.h 2.21 aavit +1 -3
+
+ spinbox: better looking in windows mode (more like win32)
+
+
+src/kernel/qapplication_x11.cpp 2.142 agulbra +7 -12
+src/kernel/qdnd_x11.cpp 2.37 agulbra +22 -23
+src/kernel/qdragobject.cpp 2.32 agulbra +5 -25
+src/kernel/qdragobject.h 2.19 agulbra +1 -4
+
+ protect another little bit against the other application crashing
+
+
+src/kernel/qclipboard_x11.cpp 2.16 agulbra +2 -2
+
+ avoid double delete in certain cases. would cause segfault.
+
+
+src/kernel/qdnd_win.cpp 2.16 warwick +98 -59
+src/kernel/qdropsite.cpp 2.2 warwick +3 -3
+src/kernel/qwidget_win.cpp 2.61 warwick +1 -2
+
+ Update for X11 changes.
+
+
+src/kernel/qdnd_win.cpp 2.17 warwick +22 -5
+src/kernel/qdnd_x11.cpp 2.36 warwick +5 -3
+src/kernel/qdragobject.cpp 2.30 warwick +63 -7
+src/kernel/qdragobject.h 2.17 warwick +10 -3
+
+ Renaming; make space in API for Copy vs. Move
+
+
+src/kernel/qdnd_x11.cpp 2.32 agulbra +13 -12
+src/kernel/qdnd_x11.cpp 2.31 agulbra +33 -8
+
+ support accept/ignore rectangles properly.
+
+
+src/kernel/qdnd_x11.cpp 2.34 agulbra +7 -2
+src/widgets/qlineedit.cpp 2.86 agulbra +13 -13
+
+ isAccepted() of one drag enter/move is the default state for the next
+ (until the target changes).
+
+
+src/kernel/qdnd_x11.cpp 2.35 warwick +20 -13
+
+ Fix lost-leaves.
+
+
+src/kernel/qdnd_x11.cpp 2.38 agulbra +23 -22
+
+ always give the right cursor
+
+
+src/kernel/qdnd_x11.cpp 2.39 hanord +2 -2
+
+ Patch from Bernd Unger to compile on irix-n64
+
+
+src/kernel/qdnd_x11.cpp 2.40 hanord +5 -5
+src/widgets/qheader.cpp 2.47 hanord +5 -5
+src/widgets/qstatusbar.cpp 2.15 hanord +12 -12
+src/widgets/qtoolbar.cpp 2.24 hanord +14 -15
+src/widgets/qtoolbutton.cpp 2.29 hanord +4 -4
+src/widgets/qwellarray.cpp 1.5 hanord +8 -10
+
+ Removed Sun CC warnings. All these warnings come from use of local
+ variables inside member functions clashing with private variable names
+ in the class. I think this is a correct warning, because if somebody
+ wants to access a private variable from a member function where it's
+ already used as a local variable, he will be somewhat confused.
+
+
+src/kernel/qdragobject.cpp 2.34 hanord +3 -2
+
+ Avoid array-bounds error when copying text
+
+
+src/kernel/qdragobject.cpp 2.35 hanord +15 -18
+src/kernel/qdragobject.h 2.20 hanord +7 -7
+
+ QStoredDrag::setEncodedData takes a const byte array.
+ parent changed to dragSource everywhere.
+
+
+src/kernel/qimage.cpp 2.102 agulbra +9 -5
+src/kernel/qpixmap.cpp 2.31 agulbra +22 -32
+
+ mention the QPixmap/QImage differences prominently. other minor doc
+ changes.
+
+
+src/kernel/qimage.cpp 2.99 agulbra +7 -6
+src/kernel/qimage.cpp 2.98 agulbra +18 -14
+src/kernel/qmovie.cpp 1.38 agulbra +8 -7
+src/kernel/qmovie.cpp 1.37 agulbra +12 -3
+
+ warn about unisys $#@! and about possible removal of gif support in a
+ future version of qt.
+
+
+src/kernel/qpainter_win.cpp 2.38 hanord +2 -3
+src/kernel/qpainter_x11.cpp 2.53 hanord +2 -3
+
+ Fixed UMR in drawText to external device. Could be serious and crash.
+
+
+src/kernel/qprinter_x11.cpp 2.18 agulbra +38 -11
+
+ OS/2 fixes from miyata.
+
+
+src/kernel/qpsprinter.cpp 2.28 agulbra +67 -19
+
+ oops. we broke kmail by not supporting QFont::AnyCharSet at all.
+ fixed.
+
+ also contains two other fixes that I'd delayed committing: use
+ colorimage only where available, else image. produce 78-character
+ lines, not lines of several thousand characters.
+
+
+src/kernel/qpsprinter.cpp 2.29 agulbra +49 -28
+
+ make the dicts slightly bigger so more level 1 printers are happy.
+ avoid a memory leak in drawPixmap().
+
+
+src/kernel/qwidget.cpp 2.116 hanord +2 -2
+
+ Does destroy() AFTER deleteExtra(), because deleteExtra() calls
+ deleteSysExtra() which unregisters OLE stuff on Windows (and needs the Win
+ ID).
+
+
+src/moc/moc.1 2.7 hanord +11 -3
+src/moc/moc.l 2.3 hanord +57 -7
+src/moc/moc.y 2.24 hanord +22 -12
+
+ Warwick's support for #ifdef and #ifndef added
+
+
+src/qt.pro 2.33 hanord +8 -7
+
+ Changed DEPENDPATH to relative, makes makefiles movable.
+ Sorted a couple of filenames.
+
+
+src/qt.pro 2.34 hanord +1 -1
+
+ Changed version number to 1.40
+
+
+src/tools/qglobal.h 2.53 agulbra +3 -3
+
+ 1.40. yes it's true.
+
+
+src/tools/qglobal.h 2.55 agulbra +3 -3
+
+ make one final snapshot
+
+
+src/widgets/qbuttongroup.cpp 2.14 agulbra +3 -3
+
+ roll back my "don't delete twice" fix: it was a "don't delete once"
+ fix, in fact. oops.
+
+
+src/widgets/qheader.cpp 2.49 agulbra +2 -1
+
+ memory leak gone
+
+
+src/widgets/qlabel.cpp 2.34 agulbra +6 -9
+
+ respect buddy's focus policy and other accessibility.
+
+
+src/widgets/qlineedit.cpp 2.83 agulbra +4 -4
+
+ use enter event and accept drops in the entire rectangle.
+
+
+src/widgets/qlineedit.cpp 2.84 agulbra +8 -1
+
+ ...and the drop should happen in the right place. oooh, this is so
+ polished :)
+
+
+src/widgets/qlineedit.cpp 2.88 agulbra +2 -2
+
+ avoid memory leak when dragging out of qle
+
+
+src/widgets/qlineedit.cpp 2.89 agulbra +5 -1
+
+ #ifdef out dnd support. it works on x11, not quite on windows.
+ besides, having QLineEdit work differently from typical windows
+ widgets and cannot be changed is a bad policy.
+
+
+src/widgets/qlistview.cpp 2.129 agulbra +3 -2
+
+ don't accept() enter/return key presses. qdialog.
+
+
+src/widgets/qlistview.cpp 2.130 agulbra +8 -9
+
+ avoid a couple of memory leaks
+
+
+src/widgets/qprogressbar.cpp 2.21 aavit +10 -1
+src/widgets/qtableview.cpp 2.51 aavit +2 -2
+
+ Progressbar: allow changing of guistyle before show(). Should really
+ implement styleChanged(); in 2.0.
+ Tableview: Avoid infinite loop.
+
+
+src/widgets/qspinbox.cpp 2.38 aavit +2 -2
+src/widgets/qwidgetstack.cpp 2.11 aavit +13 -9
+
+ Widgetstack: be robust when got no children. spinbox: comment
+
+
+src/widgets/qsplitter.cpp 1.24 warwick +48 -45
+
+ Make bitmaps correspond to splitter dimensions.
diff --git a/dist/changes-1.40 b/dist/changes-1.40
new file mode 100644
index 0000000..1f5f986
--- /dev/null
+++ b/dist/changes-1.40
@@ -0,0 +1,291 @@
+Here is a list of user-visible changes in Qt from 1.33 to 1.40.
+
+Qt 1.40 supports drag and drop, with a simple, platform independent
+API. There are eleven new widget classes in 1.40. Asynchronous I/O
+support is now in the official Qt API.
+
+Since Qt no longer supports any platforms that only supports 8.3
+format file names, the file names of the Qt source and include files
+have been made simpler. #include <qcombobox.h> instead of qcombo.h,
+etc. The old names are still present for compatibility.
+
+The new Qt Xt/Motif Extension allows Qt widgets and applications to
+coexist with old Xt/Motif-based applications and widgets.
+
+There are more than one hundred new functions added to existing
+classes and, as usual, we fixed some bugs, made some more speedups,
+and improved the documentation.
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+* New widgets
+
+ QHeader - Table header
+ QListView - Multicolun listview/treeview
+ QMainWindow - Application main window
+ QScrollView - Scrolling area (successor of QwViewPort)
+ QSpinBox - Spin button
+ QSplitter - Paned window
+ QStatusBar - Status bar
+ QToolBar - Container for tool buttons (and other widgets)
+ QToolButton - Fancy push button with auto-raise
+ QWhatsThis - Light weight help system
+ QWidgetStack - Stack of widgets
+
+* Support classes
+
+ QFileIconProvider - Provides icons for the file dialog
+ QIconSet - Set of icons for different states
+ QListViewItem - Content of a QListView
+ QCheckListItem - Checkable list view item
+
+* Drag and drop related classes
+
+ QDragObject
+ QStoredDrag
+ QTextDrag
+ QImageDrag
+ QDragManager
+ QDropSite
+
+* Asynchronous I/O
+
+ QAsyncIO
+ QDataPump
+ QDataSink
+ QDataSource
+ QDataStream
+ QIODeviceSource
+ QImageConsumer
+ QImageDecoder
+ QImageFormat
+ QImageFormatType
+
+
+* New Events
+
+ QShowEvent
+ QHideEvent
+ QDragMoveEvent
+ QDragEnterEvent
+ QDragResponseEvent
+ QDragLeaveEvent
+ QDropEvent
+ QChildEvent
+
+
+
+****************************************************************************
+* Enhancements from 1.33 to 1.40 *
+****************************************************************************
+
+The file and print dialogs are far better.
+
+Layouts will now automatically readjust if child widgets change
+maximum/minimum sizes, or are deleted.
+
+QFont now supports KOI8R
+
+The reference documentation of the extensions is now integrated with
+the main reference documentation in the qt/html directory.
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+None known.
+
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+none
+
+****************************************************************************
+* Deprecated functions *
+****************************************************************************
+Old function: Replaced by:
+------------- -----------
+QPixmap::isOptimized QPixmap::optimization
+QPixmap::optimize QPixmap::setOptimization
+QPixmap::isGloballyOptimized QPixmap::defaultOptimization
+QPixmap::optimizeGlobally QPixmap::setDefaultOptimization
+
+
+****************************************************************************
+* New global functions
+****************************************************************************
+
+ bitBlt( QImage* dst, int dx, int dy, const QImage* src,
+ int, int, int, int, int conversion_flags );
+
+ bitBlt( QPaintDevice *dst, int, int, const QImage* src,
+ int, int, int, int, int conversion_flags );
+
+****************************************************************************
+* New public/protected functions added to existing classes *
+****************************************************************************
+
+QApplication::sendPostedEvents( QObject *receiver, int event_type ) [static]
+
+QButton::setDown()
+QButton::toggle()
+
+QButtonGroup::setButton( int id )
+QButtonGroup::buttonToggled( bool on )
+
+QComboBox::setListBox( QListBox * )
+QComboBox::listBox()
+
+QComboBox::setAutoCompletion( bool )
+QComboBox::autoCompletion()
+
+QComboBox::clearEdit()
+QComboBox::setEditText( const char * )
+
+QDict::resize()
+
+QDir::drives() [static]
+QDir::remove()
+
+QFileDialog::getExistingDirectory() [static]
+QFileDialog::setIconProvider() [static]
+QFileDialog::iconProvider() [static]
+QFileDialog::setSelection( const char* )
+QFileDialog::setMode( Mode )
+QFileDialog::mode()
+QFileDialog::setFilter( const char * )
+QFileDialog::setFilters( const char ** )
+QFileDialog::setFilters( const QStrList & )
+QFileDialog::addWidgets( QLabel *, QWidget *, QPushButton * ) [protected]
+
+QFont::isCopyOf( const QFont & )
+
+QFontMetrics::minLeftBearing()
+QFontMetrics::minRightBearing()
+QFontMetrics::inFont(char)
+QFontMetrics::leftBearing(char)
+QFontMetrics::rightBearing(char)
+QFontMetrics::boundingRect( int x, int y, int w, int h, int flags,
+ const char *str, int, int, int *, char ** )
+QFontMetrics::size( int flags, char *str, int, int, int *, char ** )
+
+QFrame::margin()
+QFrame::setMargin( int )
+
+QGManager::unFreeze()
+QGManager::remove( QWidget *w )
+QGManager::setName( QChain *, const char * )
+
+QGridLayout::numRows()
+QGridLayout::numCols()
+QGridLayout::expand( int rows, int cols )
+
+
+QImage::copy(int x, int y, int w, int h, int conversion_flags=0)
+QImage::copy(QRect&)
+QImage::allGray()
+QImage::isGrayscale()
+QImage::convertDepthWithPalette( int, QRgb* p, int pc, int cf=0 )
+QImage::smoothScale(int width, int height)
+QImage::loadFromData( QByteArray data, const char *format=0 )
+
+QIntDict::resize()
+
+QLabel::clear()
+
+QLCDNumber::sizeHint() const
+
+QLineEdit::setEnabled( bool )
+QLineEdit::setFont( const QFont & )
+QLineEdit::setSelection( int, int )
+QLineEdit::setCursorPosition( int )
+QLineEdit::cursorPosition() const
+QLineEdit::validateAndSet( const char *, int, int, int )
+QLineEdit::insert( const char * )
+QLineEdit::clear()
+QLineEdit::repaintArea( int, int ) [protected]
+
+QListBox::setFixedVisibleLines( int lines )
+QListBox::sizeHint()
+QListBox::ensureCurrentVisible( int )
+
+QMenuData::insertItem( const char *text,
+ const QObject *receiver, const char *member,
+ int accel, int id, int index = -1 )
+QMenuData::insertItem( const QPixmap &pixmap,
+ const QObject *receiver, const char *member,
+ int accel, int id, int index = -1 )
+QMenuData::insertItem( const QPixmap &pixmap, const char *text,
+ const QObject *receiver, const char *member,
+ int accel, int id, int index = -1 )
+QMenuData::findItem( int id, QMenuData ** parent )
+
+
+QMovie::QMovie(QDataSource*, int bufsize=1024)
+
+QMultiLineEdit::setFixedVisibleLines( int lines )
+
+QObject::tr( const char * )
+QObject::name( const char * defaultName )
+
+QPainter::QPainter( const QPaintDevice *, const QWidget * )
+QPainter::begin( const QPaintDevice *, const QWidget * )
+QPainter::xForm( const QPointArray &, int index, int npoints )
+QPainter::xFormDev( const QPointArray &, int index, int npoints )
+QPainter::drawImage()
+QPainter::drawTiledPixmap()
+QPainter::drawPicture( const QPicture & )
+
+QPalette::isCopyOf( const QPalette & )
+
+QPixmap::loadFromData( QByteArray data,
+ const char *,
+ int )
+QPixmap::optimization()
+QPixmap::setOptimization( Optimization )
+QPixmap::defaultOptimization()
+QPixmap::setDefaultOptimization( Optimization )
+
+QPopupMenu::exec( const QPoint &, int )
+QPopupMenu::aboutToShow()
+
+QPrinter::setPageOrder( PageOrder )
+QPrinter::pageOrder()
+QPrinter::setColorMode( ColorMode )
+QPrinter::colorMode()
+
+QPtrDict::resize()
+
+QPushButton::setIsMenuButton( bool )
+QPushButton::isMenuButton()
+
+QRegion::QRegion( int x, int y, int w, int h, RegionType = Rectangle )
+QRegion::boundingRect()
+QRegion::rects()
+
+QSize::expandedTo()
+QSize::boundedTo()
+
+QWidget::isEnabledTo(QWidget*)
+QWidget::isEnabledToTLW()
+QWidget::fontPropagation()
+QWidget::setFontPropagation( PropagationMode )
+QWidget::palettePropagation()
+QWidget::setPalettePropagation( PropagationMode )
+QWidget::isVisibleTo(QWidget*)
+QWidget::setAcceptDrops( bool on )
+QWidget::acceptDrops()
+QWidget::focusData() [protected]
+
diff --git a/dist/changes-1.41 b/dist/changes-1.41
new file mode 100644
index 0000000..31ccc55
--- /dev/null
+++ b/dist/changes-1.41
@@ -0,0 +1,76 @@
+Here is a list of user-visible changes in Qt from 1.40 to 1.41
+
+QT is now available as a DLL on Windows.
+
+Many bugfixes have been added. The Windows keys are supported on X11,
+and the file dialog has been improved a little.
+
+Drag and drop has been considerably improved, both on Windows and X11.
+
+QPrinter now knows many more paper sizes.
+
+It now possible to create masked (nonrectangular) widgets.
+
+QScrollBar now supports insanely big ranges.
+
+QSlider now supports page step as well as line step.
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+None.
+
+****************************************************************************
+* Enhancements from 1.33 to 1.40 *
+****************************************************************************
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+None.
+
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Deprecated functions *
+****************************************************************************
+
+None.
+
+
+****************************************************************************
+* New global functions *
+****************************************************************************
+
+None.
+
+****************************************************************************
+* New public/protected functions added to existing classes *
+****************************************************************************
+
+QFileDialog::getOpenFileNames()
+QProgressDialog::setMinimumDuration( int )
+QProgressDialog::minimumDuration() const
+QMouseEvent::globalPos() const
+QMouseEvent::globalX() const
+QMouseEvent::globalY() const
+QFont::rawName() const
+QWidget::setMask(const QRegion& region)
+QWidget::setMask(QBitmap bitmap)
+QWidget::clearMask()
+QListView/QListViewItem: Various functions to create children in specified order
diff --git a/dist/changes-1.42 b/dist/changes-1.42
new file mode 100644
index 0000000..7e47a53
--- /dev/null
+++ b/dist/changes-1.42
@@ -0,0 +1,71 @@
+Here is a list of user-visible changes in Qt from 1.41 to 1.42. The
+usual bugfixes have been added.
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+None.
+
+****************************************************************************
+* Enhancements from 1.41 to 1.42 *
+****************************************************************************
+
+The Windows version now builds as a DLL.
+
+The file dialog has various UI tweaks.
+
+More sanity checks have been added.
+
+On X11, the postscript output from a few programs will be much smaller
+than it used to be.
+
+Windows 98 is now treated as a separate version of Windows, like NT
+and Windows 95.
+
+The keyboard interface of buttons groups/dialogs has been improved.
+
+QMultiLineEdit avoids flicker in some cicumstances where it would
+flicker up to now.
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+QKeyEvent now behaves as documented: isAccepted() is TRUE by default
+where it would sometimes default to FALSE. Some dialogs may depend on
+the bug. The most likely symptom of such buggy dialogs is that the
+Enter/Return key does not work, and the most likely fix for such bugs
+is to insert "e->ignore();" at the start of keyPressEvent(QKeyEvent*e)
+in such dialogs.
+
+****************************************************************************
+* Changes that might generate compile errors *
+* when compiling old code *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Type changes that might generate warnings: *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Deprecated functions *
+****************************************************************************
+
+None.
+
+
+****************************************************************************
+* New global functions *
+****************************************************************************
+
+None.
+
+****************************************************************************
+* New public/protected functions added to existing classes *
+****************************************************************************
+
diff --git a/dist/changes-2.0.1 b/dist/changes-2.0.1
new file mode 100644
index 0000000..4a224bf
--- /dev/null
+++ b/dist/changes-2.0.1
@@ -0,0 +1,101 @@
+Changes in Qt 2.0.1
+-------------------
+
+Qt 2.0.1 is a bugfix release, forward and backward compatible with Qt 2.0.
+While all changes are behind the API, some bugfixes may cause differences
+in runtime behaviour - such fixes are marked in yellow with a "*".
+
+
+General improvements
+--------------------
+
+PNG/IO Fix crash on empty images.
+
+QAccel Fix accelerators using Shift with other metakeys.
+
+QFileInfo Fix for AIX/gcc.
+
+QFontDatabase Fix centered text for extreme-bearing fonts.
+
+QHeader Resizing cells of horizontal header is now more flicker-free.
+
+*QLayout Fix deletion of child layouts. Let minimumSize() override
+Fixed sizePolicy().
+
+QLcdNumber Reduced flicker.
+
+QLineEdit Home etc. now clear selection even if the cursor doesn't move.
+
+QListBox Draw focus rect correctly. Fix keyboard navigation.
+
+QListView Make resizing flicker-free. No selection on release.
+
+QMainWindow Fix crash in addToolBar().
+
+QMap Work on more compilers.
+
+QMenuBar Less flicker.
+
+QPainter Fix QFontMetrics::width(QChar). Speedup drawText/boundingRect.
+
+*QScrollView Put the scrollbars inside the frame in WindowsStyle.
+
+QSplitter Fix bug where a handle could be moved past the next.
+
+QString Fix QString::replace(QRegExp(),...). Speed ups. Fix fill()
+with zero length crash.
+
+QTL AIX fixes.
+
+QTextBrowser Fixed type=detail popup.
+
+*QTextCodec Use the defacto KOI8 standard if no charset specified for
+ru_ locale.
+
+QValueList AIX, aCC fixes.
+
+msg2qm More robust.
+
+
+
+Windows-specific fixes
+----------------------
+
+QApplication Fix Key_Enter (was always Key_Return). Fix numeric
+accelerators.
+
+QFontDatabase Fix italic fonts in Window font dialog.
+
+*QMime Use CRLF with text clip/dnd on Windows.
+
+QPainter Avoid failure when painting pixmap xformed into nothing.
+Improved drawing of scaled fonts on win95/98.
+
+*QPixmap Fix mask on QPixmap::convertToImage().
+
+QPrinter Fix setup() on Win95/98.
+
+QToolTip Use system settings for tool tips on Windows.
+
+*QWidget Fix QWidget::scroll(rect) for non-topleft rectangles.
+
+
+X11-specific fixes
+------------------
+
+DnD Fix Escape during DnD.
+
+*QApplication Generate MouseMove event on XCrossingEvent. Support more
+XIM servers (eg. VJE Delta). Use 11pt font as default rather than 12pt
+on larger than 95DPI displays.
+
+*QFont Correct DPI for fontsets (as for regular fonts). Prefer unscaled
+(ie. perfect-match bitmaps) over scaled fonts.
+
+*QPaintDevice Round DPI.
+
+QWidget QWidget::showMaximized() works on X11 now. Fixed ReparentNotify
+handling.
+
+Xt extension Fixes.
+
diff --git a/dist/changes-2.00 b/dist/changes-2.00
new file mode 100644
index 0000000..1dcfea7
--- /dev/null
+++ b/dist/changes-2.00
@@ -0,0 +1,151 @@
+Qt 2.0 introduces a wide range of major new features as well as
+substantial improvements over the 1.x series. The documentation has
+been significally extended and improved.
+
+This file will only give an overview of the main changes since version
+1.44. A complete list would simply be too large to be useful. For
+more detail see the online documentation which is included in this
+distribution, and also available on http://doc.trolltech.com/
+
+The Qt version 2.x series is not binary compatible with the 1.x
+series. This means programs compiled with Qt version 1.x must be
+recompiled to work with Qt 2.0.
+
+Qt 2.0 is mostly, but not completely, source compatible with Qt 1.x.
+See the document "Porting from Qt 1.x to Qt 2.0" in the Online
+Reference Documentation for information on how to port an existing Qt
+1.x-based program to Qt 2.0. Note in particular the automatic porting
+script included - it does a lot of the work for you.
+
+As for 1.x, the API and functionality of Qt is completely portable
+between Microsoft Windows and X11. And between Windows 95, 98 and NT:
+Unlike most toolkits, Qt lets a single executable work on all three.
+
+****************************************************************************
+* New major features *
+****************************************************************************
+
+
+* Support for international software development:
+ QTranslator and the QObject::tr() function
+ QTextCodec (and subclasses)
+ QString is now a 16-bit Unicode string with good support for
+ legacy 8-bit interoperation. (The old 8-bit string class
+ from Qt 1.x has been renamed to QCString.)
+ QChar - a Unicode character
+
+* Rich Text
+ QTextView - formatted text and images
+ QTextBrowser - navigate formatted text and images
+ QStyleSheet - define your own XML formatting tags
+ QSimpleRichText - display rich text anywhere
+
+* Convenient and powerful new collection classes:
+ QMap<Key,Type> - QDict with arbitrary keys
+ QValueList<Type> - QList of types other than pointers
+ QStringList - QValueList<QString> with helper functions
+
+* Dialogs
+ QColorDialog - user picks a color
+ QFontDialog - user picks a font
+ QWizard - framework for leading users through steps
+
+* Layout
+ QGrid/QHBox/QVBox - grid and boxes of widgets automatically assembled
+ QHGroupBox/QVGroupBox - easy framed groups of widgets
+ QSizePolicy - a widget's abilities to change size in different ways
+
+* Custom layouts
+ New, much simpler and more powerful API for creating custom layouts
+
+* PNG Support
+ PNG support is now included in the core library
+
+* Support for generalized configurable GUI styles:
+ QStyle and subclasses
+
+* Session management
+ QSessionManager - saving state when the system shuts down
+
+* Extended coordinate system
+ QPoint, QPointArray, QSize and QRect now have 32-bit coordinates
+
+* Cleaner namespace
+ Global functions, enums and macros now either start with a 'q' or
+ have been moved into the new namespace class "Qt"
+
+****************************************************************************
+* List of removed classes *
+****************************************************************************
+
+* QGManager
+ Use the new custom layout API.
+
+* QPointVal, QPointData
+ Use QPoint.
+
+* QUrlDrag
+ Changed to QUriDrag
+
+* QWindow
+ Use QWidget
+
+****************************************************************************
+* List of new classes *
+****************************************************************************
+
+* QCDEStyle
+* QChar
+* QColorDialog
+* QCommonStyle
+* QConstString
+* QCString
+* QDragEnterEvent
+* QDragLeaveEvent
+* QDropSite
+* QFontDialog
+* QGLayoutIterator
+* QGrid
+* QHBox
+* QHButtonGroup
+* QHGroupBox
+* QHideEvent
+* QLayoutItem
+* QLayoutIterator
+* QMimeSource
+* QMimeSourceFactory
+* QMotifStyle
+* QPlatinumStyle
+* QSessionManager
+* QShowEvent
+* QSimpleRichText
+* QSizeGrip
+* QSizePolicy
+* QSortedList
+* QSpacerItem
+* QStringList
+* QStyle
+* QStyleSheet
+* QStyleSheetItem
+* Qt
+* QTab
+* QTabWidget
+* QTextBrowser
+* QTextCodec
+* QTextDecoder
+* QTextEncoder
+* QTextIStream
+* QTextOStream
+* QTextView
+* QTranslator
+* QUriDrag
+* QVBox
+* QVButtonGroup
+* QVGroupBox
+* QWheelEvent
+* QWidgetItem
+* QWindowsStyle
+* QWizard
+
+For details, see e.g http://doc.trolltech.com/qcdestyle.html (or any
+other class name, lowercased).
diff --git a/dist/changes-2.00beta1 b/dist/changes-2.00beta1
new file mode 100644
index 0000000..5dccbad
--- /dev/null
+++ b/dist/changes-2.00beta1
@@ -0,0 +1,61 @@
+
+The Qt version 2.x series is not binary compatible with the 1.x
+series. This means programs compiled with Qt version 1.x must be
+recompiled to work with Qt 2.0.
+
+Qt 2.0 is mostly, but not completely, source compatible with Qt 1.x.
+See the document "Porting from Qt 1.x to Qt 2.0" in the Online
+Reference Documentation for information on how to port an existing
+Qt 1.x-based program to Qt 2.0.
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+
+* Support for generalized configrable styles:
+
+ QStyle and subclasses
+
+* Support for international software development:
+
+ QTranslator and the QObject::tr() function
+ QTextCodec (and subclasses)
+ QString - a Unicode string
+ QChar - a Unicode character
+
+* Convenient and powerful new collection classes:
+ QMap<Key,Type> - QDict with arbitrary keys
+ QValueList<Type> - QList of types other than pointers
+ QStringList - QValueList<QString> with helper functions
+
+* Dialogs
+ QColorDialog - user picks a color
+ QFontDialog - user picks a font
+ QWizard - framework for leading users through steps
+
+* Layout
+ QGrid/QHBox/QVBox - grid and boxes of widgets automatically assembled
+ QHGroupBox/QVGroupBox - easy framed groups of widgets
+
+* PNG Support
+ PNG support is always compiled into Qt
+
+* Rich Text
+ QTextView - formatted text and images
+ QTextBrowser - navigate formatted text and images
+ QStyleSheet - define your own XML formatting tags
+ QSimpleRichText - display rixh text anywhere
+
+* Session management
+ QSessionManager - safe state when system shuts down
+
+
+****************************************************************************
+* Major changes in existing classes *
+****************************************************************************
+
+QString is now 16-bit Unicode.
+
+QPoint, QPointArray, QSize and QRect now have 32-bit coordinates. \ No newline at end of file
diff --git a/dist/changes-2.00beta2 b/dist/changes-2.00beta2
new file mode 100644
index 0000000..943c368
--- /dev/null
+++ b/dist/changes-2.00beta2
@@ -0,0 +1,85 @@
+Qt 2.0 Beta2 is not binary compatible with Beta1, this means that any
+programs linked with Beta1 must be recompiled.
+
+The most important fixes since Beta 1:
+
+configure
+ Fixed the libzlib typo.
+ Added -lflags argument.
+
+Platforms
+ Fixes for Borland C++, Solaris and AIX
+
+QFileDialog
+ Several user interface improvements
+
+QPrinter
+ Plain text printing works again.
+ Multiple page printing fixed.
+
+QWidget
+ New widget flag WStyle_Dialog
+
+
+Major changes since 1.4x:
+
+The Qt version 2.x series is not binary compatible with the 1.x
+series. This means programs compiled with Qt version 1.x must be
+recompiled to work with Qt 2.0.
+
+Qt 2.0 is mostly, but not completely, source compatible with Qt 1.x.
+See the document "Porting from Qt 1.x to Qt 2.0" in the Online
+Reference Documentation for information on how to port an existing
+Qt 1.x-based program to Qt 2.0.
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+
+* Support for generalized configrable styles:
+
+ QStyle and subclasses
+
+* Support for international software development:
+
+ QTranslator and the QObject::tr() function
+ QTextCodec (and subclasses)
+ QString - a Unicode string
+ QChar - a Unicode character
+
+* Convenient and powerful new collection classes:
+ QMap<Key,Type> - QDict with arbitrary keys
+ QValueList<Type> - QList of types other than pointers
+ QStringList - QValueList<QString> with helper functions
+
+* Dialogs
+ QColorDialog - user picks a color
+ QFontDialog - user picks a font
+ QWizard - framework for leading users through steps
+
+* Layout
+ QGrid/QHBox/QVBox - grid and boxes of widgets automatically assembled
+ QHGroupBox/QVGroupBox - easy framed groups of widgets
+
+* PNG Support
+ PNG support is always compiled into Qt
+
+* Rich Text
+ QTextView - formatted text and images
+ QTextBrowser - navigate formatted text and images
+ QStyleSheet - define your own XML formatting tags
+ QSimpleRichText - display rixh text anywhere
+
+* Session management
+ QSessionManager - safe state when system shuts down
+
+
+****************************************************************************
+* Major changes in existing classes *
+****************************************************************************
+
+QString is now 16-bit Unicode.
+
+QPoint, QPointArray, QSize and QRect now have 32-bit coordinates. \ No newline at end of file
diff --git a/dist/changes-2.00beta3 b/dist/changes-2.00beta3
new file mode 100644
index 0000000..08f222a
--- /dev/null
+++ b/dist/changes-2.00beta3
@@ -0,0 +1,35 @@
+Qt 2.0 Beta3 is not binary compatible with Beta2, this means that any
+programs linked with Beta2 must be recompiled.
+
+The most important fixes since Beta 2:
+
+platforms
+ 64-bits, FreeBSD and gcc 2.7 fixes
+
+QLayoutIterator/QGLayoutIterator
+ The custom layout API has been changed: void removeCurrent()
+ has been replaced by QLayoutItem* takeCurrent().
+
+QLabel
+ The functions setMargin() and margin() have been renamed to
+ setIndent() and indent, to avoid collision with QFrame::setMargin().
+
+QAccel
+ Non-latin1 accelerators are now supported.
+
+QTranslator/findtr/msg2qm/mergetr
+ All reported bugs fixed and improvements made.
+
+Rich Text
+ Many improvements and fixes such as supressed warnings in the
+ QBrowser example. Support for logical font sizes.
+
+QApplication
+ lastWindowClosed() now works with virtual desktops. Desktop settings
+ on Windows improved.
+
+QScrollView / QMultiLineEdit
+ Speedups with a new widget flag: WNorthWestGravity.
+
+QPopupMenu / QMenuBar
+ Speedups, less flicker.
diff --git a/dist/changes-2.1.0 b/dist/changes-2.1.0
new file mode 100644
index 0000000..a0794cf
--- /dev/null
+++ b/dist/changes-2.1.0
@@ -0,0 +1,314 @@
+Qt 2.1 introduces new features as well as many improvements over the
+2.0.x series. This file will only give an overview of the main changes
+since version 2.0.2. A complete list would simply be too large to be
+useful. For more detail see the online documentation which is included
+in this distribution, and also available on
+http://doc.trolltech.com/
+
+The Qt version 2.1 series is binary compatible with the 2.0.x
+series - applications compiled for 2.0 will continue to run with 2.1.
+
+As with previous Qt releases, the API and functionality of Qt is
+completely portable between Microsoft Windows and X11. It is also portable
+between Windows 95, 98 and NT; unlike most toolkits, Qt lets a single
+executable work on all three.
+
+****************************************************************************
+* Overview *
+****************************************************************************
+
+As usual, large sections of the documentation have been revised and
+lots of new documentation has been added.
+
+Much work went into existing classes, based on all the feedback we got
+from our users. A warm thank you to you all at this point, we honestly
+hope to satisfy most of your wishes with the new release.
+
+Among the things that got a lot of polishing is the new geometry
+management system that was introduced with the 2.x series. Some
+classes, such as QBoxLayout, have been rewritten and many size hints
+and size policies were optimized. As usual with newly introduced
+systems, the occasional bug has been fixed as well. As a result,
+layout in Qt-2.1 is not only nicer but also faster.
+
+Big parts of the file dialog have been rewritten. It is now
+synchronized in terms of features with the common Windows dialog,
+including fancy drag'n'drop and in-place renaming. You can customize
+both parts of the dialog, the front-end with info and preview widgets,
+the back-end with different network protocols (see the QFileDialog and
+QNetworkProtocol documentation for details).
+
+Especially interesting for dynamic Qt applications is the newly
+introduced property system. Many interesting things, from scripting up
+to graphical user interface builders, become easier. The technology
+requires a new macro Q_PROPERTY and a new revision of Qt's meta object
+compiler (moc). See the Qt documentation for details.
+
+Due to strong customer demand, we added a cross-platform way to easily
+implement multi-document interfaces (known as 'MDI'). The widget is
+called QWorkspace and makes this task trivial.
+
+On X11, text dropping from Motif drag'n'drop applications has been
+added, to make your Qt applications inter-operable with those Motif
+applications that survived Y2K.
+
+The rich text system, first introduced in Qt-2.0, has been
+revised. Apart from great speed improvements, it now supports HTML
+tables as well as floating images.
+
+QMultiLineEdit, the text input field in Qt, got the missing word wrap
+functionality. It's probably the last big extension we will add to
+that widget. In Qt 3.0, it will be replaced by a fancier, faster and
+more powerful QTextEdit widget that also deals with different colors
+and fonts in a way similar to the existing QTextView.
+
+Qt follows the respective GUI style guides even more closely. This
+includes honoring desktop settings, and keyboard shortcuts such as
+Ctrl-Z/Y for undo/redo in line edit and multi-line edit
+controls. Dialog handling for both modal and non-modal dialogs has
+been improved to follow the platform conventions precisely.
+
+With QIconView, we added a powerful new visualization widget similar
+to QListView and QListBox. It contains optinally labelled pixmap items
+that the user can select, drag around, rename, delete and more.
+
+Compared to the previous release, we have managed to reduce overall
+memory consumption while improving execution speed and features.
+
+Below is a list of the major new features in existing classes as well
+as short descriptions of all new classes and the changes in some of
+the extensions shipped with Qt.
+
+
+****************************************************************************
+* New major features in existing classes *
+****************************************************************************
+
+QApplication - new function wakeUpGuiThread() to simplify using threads
+ with Qt.
+
+QArray - added sorting and binary search.
+
+QColor - custom color support added. qRgb(r,g,b) helper function
+ now sets an opaque alpha value instead of a transparent
+ one.
+
+QComboBox - support for text items with icons.
+
+QFileDialog - many new features including fancy drag'n'drop
+ and in-place renaming.
+ Methods like setInfoPreviewWidget()and
+ setContentsPreviewWidget() make it easy to customize
+ the dialog extensively. With QUrlOperator and the
+ QNetworkProtocol abstraction, the dialog can operate
+ transparently by various different network protocols,
+ such as HTTP and FTP (see the Network Extension).
+
+QFocusEvent - carries a reason() for the event. Possible reasons are
+ Mouse, Tab, ActiveWindow, ShortCut and other. The
+ addition makes line edit controls behave properly.
+
+QHeader - added optional visual sort indicator. Revisited API that
+ operates on sections only (solves the 'logical' vs. 'actual'
+ index confusion). A reworked 'table' example shows how
+ to use QHeader in combination with a scrollview to create
+ a simple spreadsheet.
+
+QListBox - many signals and functions added for convenience and
+ greater flexibility.
+
+QListView - various selections modes similar to QListBox, many
+ new functions and signals added for convenience and
+ greater flexibility.
+
+QMainWindow - implemented draggable and hidable toolbars. A menubar
+ can be made draggable by simply putting it in a toolbar.
+
+QMetaObject - Parts of the API made public. The meta object allows
+ applications to access information about an object's
+ properties as well as its signals and slots.
+
+QMultiLineEdit - added different word wrap modes: WidgetWidth,
+ FixedPixelWidth and FixedColumnWidth.
+
+QObject - property access functions property() and setProperty().
+
+QPen - added adjustable cap and join styles.
+
+QPopupMenu - added support for tear-off menus, custom items
+ and widget items.
+ A new function setItemParameter() makes it possible
+ to distinguish between several menu items connected to
+ one single slot.
+
+QPrinter - Now allows printing to the default printer without doing
+ setup() first.
+
+QProgressDialog - auto-reset and auto-close modes.
+
+QPushButton - added a menu button mode with setPopup().
+
+QScrollView - support for auto-scrolling on drag move events (drag
+ auto scroll mode).
+
+QSignal - optional additional integer parameter for the emitted
+ signal.
+
+QSimpleRichText - added adjustSize() function that implements a clever
+ size hint. Vertical break support for printing. inText()
+ hit test.
+
+QSpinBox - different button symbols, currently UpDownArrows and
+ PlusMinus.
+
+QSplitter - supports three resize modes now, Stretch, KeepSize
+ and FollowSizeHint.
+
+QString - new functions setUnicode(), setUnicodeCodes(), setLatin1(),
+ startsWith() and endsWith()
+
+QStringList - new functions fromStrList(), split(), join() and grep().
+
+QStyle - some extensions for menu button indicators, default
+ button indicators, variable scrollbar extends and toolbar
+ handles.
+
+QStyleSheet - a couple of tags added to the default sheet, such as
+ U, NOBR, HEAD, DL, DT, DD and table support (TABLE, TR,
+ TD, TH). Many attributes added to existing tags.
+
+QTextView - basic table support. Contents is selectable, selections
+ can be pasted/dragged into other widgets.
+
+QToolBar - stretchable depending on the orientation (setHorizontalStretchable()
+ and setVerticalStretchable(). Added orientationChanged() signal.
+
+QToolButton - added optional delayed menu with setPopup() and
+ setPopupDelay(). Auto-raise behaviour adjustable.
+
+QWidget - new widget flag WStyle_ContextHelp that adds a
+ context-help button to the window titlebar. The
+ button triggers "What's This?"-help. The flag works
+ with MS-Windows and future versions of X11 desktops
+ such as KDE-2.0.
+
+ - New function showFullScreen().
+
+ - Enabling and disabling with setEnabled() propagates to
+ children.
+
+ - Changed isVisible(). It now returns whether a widget
+ is mapped up to the toplevel widget (the previous
+ implementation only returned isVisibleTo(parentWidget()).
+
+ - New property 'backgroundOrigin' that lets a widget draw
+ its background relatively to its parent widget's coordinate
+ system. This makes pseudo-transparency possible, without
+ the overhead of a real widget mask.
+
+
+****************************************************************************
+* New clases *
+****************************************************************************
+
+QCustomMenuItem - an abstract base class for custom menu items in
+ popup menus.
+
+QFontDataBase - provides information about the available fonts. Not really
+ a new class (it was used internally for the QFontDialog),
+ but for the first time public API.
+
+QGuardedPtr - a template class that provides guarded pointers to
+ QObjects.
+
+QIconView - a sophisticated new widget similar to QListView and
+ QListBox. An iconview contains optinally labelled pixmap
+ items that the user can select, drag around, rename, delete
+ and more. The widget is highly optimized for speed and
+ large amounts of icons.
+
+QInputDialog - a convenience dialog to get some simple input values from
+ the user.
+
+QMetaProperty - stores meta data about properties. Part of the meta
+ object system.
+
+QNetworkProtocol- base class for network protocols, provides
+ a common API for network protocols.
+
+QUrl/
+QUrlOperator - provides an easy way to work with URLs.
+
+QVariant - a tagged union for the most common Qt data types.
+
+QValueStack - a value-based stack container.
+
+QWorkspace - provides a workspace that can contain decorated
+ windows as opposed to frameless child widgets.
+ QWorkspace makes it easy to implement a multi-document
+ interface (MDI).
+
+QBig5Codec - provides support for the Big5 Chinese encoding.
+
+
+****************************************************************************
+* Changes which may affect runtime behaviour *
+****************************************************************************
+
+QDataStream / QPicture
+ To accomodate for improved functionality, the stream serialization format
+ of QString and QPen has changed in Qt 2.1. The format version
+ number has been increased to 3. Compatibility has been kept, so
+ applications built with this version of Qt are automatically able to read
+ QDataStream and QPicture data generated by earlier Qt 2.x versions. But if
+ your application needs to generate data that must be readable by
+ applications that are compiled with earlier versions of Qt, you must use
+ QDataStream::setVersion() (if the data contains QString or QPen objects).
+ See the documentation of this function for further discussion.
+
+QPainter::drawPolygon()
+ An outline is no longer drawn in the brush color if NoPen is specified.
+ This matches the behaviour on Windows and ensures that the area
+ painted in this case is the same pixels defined by a QRegion made
+ from the polygon. To get the old behaviour, you can call
+ painter.setPen(painter.brush()) prior to painting, which will also
+ work on Windows.
+
+QPushButton::sizeHint()
+ The size hint of auto-default push buttons has been slightly
+ increased in order to reserve space for a default button indicator
+ frame. This is necessary for a proper Motif or Platinum emulation. If
+ this change destroys your geometry management, a auto-default button
+ is probably not what you wanted anyway. Simply call
+ setAutoDefault(FALSE) on these push buttons to get the old behaviour.
+
+QWidget
+ Font and palette propagation has changed totally (from "almost
+ brain-dead" to working). In practice, the only changes we've seen are
+ to the better.
+
+QColor
+ qRgb(r,g,b) now sets a default opaque alpha value of 0xff instead of
+ a transparent 0x00 alpha value formerly. Use qRgb(r,g,b,a) if you do
+ need a transparent alpha value.
+
+QPalette
+ It turned out that the old normal/active/disabled set of color groups
+ didn't work very well, except in the simplest hello-world examples,
+ that it couldn't be fixed without nasty hacks, and that during five
+ years nobody had discovered the bugs. So, we've dropped our broken
+ attempt at Tcl/Tk L&F compatibility, and added support for Windows
+ 2000 and Macintosh L&F compatibility instead. The Macintosh and
+ Windows 2000 looks differentiate between the window with focus and
+ other windows. Qt calls the color groups QPalette::active() and
+ QPalette::inactive() respectively.
+
+QGridLayout/QBoxLayout
+ setMargin() now also works on child layouts. As a result of this
+ change, the geometry() of a layout now includes margin(). This may
+ effect programs that use QLayout::geometry().
+
+QToolButton
+ The now adjustable auto-raise behaviour defaults to TRUE only when
+ a button is used inside a QToolBar. That's usually what you want. If not,
+ call setAutoRaise(FALSE).
diff --git a/dist/changes-2.1.1 b/dist/changes-2.1.1
new file mode 100644
index 0000000..bb653fe
--- /dev/null
+++ b/dist/changes-2.1.1
@@ -0,0 +1,71 @@
+
+Qt 2.1.1 is a bugfix release. It keeps both forward and backward
+compatibility (source and binary) with Qt 2.1.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- Many documentation improvements
+
+- Various compilation problems relating to particular versions of xlC,
+MipsPRO, Solaris, Japanese Windows, old X11 libraries, and gcc 2.7.2
+fixed
+
+- 64bit HP build targets added
+
+- Qt OpenGL Extension updated; see details in qt/extensions/opengl/CHANGES
+
+- As usual, many minor bugfixes, too small to be mentioned here.
+
+
+****************************************************************************
+* Specific *
+****************************************************************************
+
+QToolbar: fix of layout-saving when moving out of dock
+
+QAccel: Support for non-alphanumeric keys
+
+QPrinter: Better tolerance for PS interpreter peculiarities
+
+QPainter: drawText() with rasterOp on Windows
+
+QIconView: Drawing fixes
+
+QDate: Ensure invalid status when created with invalid values
+
+Motif Dnd: Fix possible crash
+
+QWorkSpace: Proper minimize/maximize activation
+
+QListBox: Optimization: better performance for lists with thousands of
+ elements. Selection problem fixed.
+
+QFont: Fontset matching fix for X11
+
+QMultiLineEdit: Wordwrap/selection workaround
+
+QTabBar: Refresh layout after style change. Optimization.
+
+QTimer: Zero-timers on Windows speedup
+
+QFileDialog: Correct caption on Windows
+
+QComboBox: Accept only left button. Do proper font propagation.
+
+QMenuBar: Accept only left button
+
+QDialog: Modal dialogs after QApplication::exec() returns
+
+QWidget: Optimization: fewer server round-trips
+
+QCheckBox: Fixed mask drawing
+
+QSpinBox: Accept '-' key, for negative values
+
+Dnd: Allow disabling on X11
+
+QFontDatabase: Use QApplication's charset as default,
+ and fixed garbage on Win2000
diff --git a/dist/changes-2.2.0 b/dist/changes-2.2.0
new file mode 100644
index 0000000..d5444a8
--- /dev/null
+++ b/dist/changes-2.2.0
@@ -0,0 +1,223 @@
+
+Qt 2.2 introduces new features as well as many improvements over the
+2.1.x series. This file will only give an overview of the main changes
+since version 2.1. A complete list would simply be too large to be
+useful. For more detail see the online documentation which is
+included in this distribution, and also available on
+http://doc.trolltech.com/
+
+The Qt version 2.2 series is binary compatible with the 2.1.x and
+2.0.x series - applications compiled for 2.0 or 2.1 will continue to
+run with 2.2.
+
+As with previous Qt releases, the API and functionality of Qt is
+completely portable between Microsoft Windows and X11. It is also
+portable between Windows 95, 98, NT and 2000.
+
+****************************************************************************
+* Overview *
+****************************************************************************
+
+The greatest new feature in the 2.2 release is the Qt Designer, a
+visual GUI design tool. It makes it possible to cut down on
+development time even further through WYSIWYG dialog design. The
+designer makes use of improved runtime flexibility and a revised
+property system. Please see $QTDIR/doc/html/designer.html for a
+feature overview.
+
+Qt 2.2 integrates now fully on MS-Windows 2000. This includes fade
+and scroll effects for popup windows and title bar gradients for MDI
+document windows in the MDI module. As with all Qt features, we
+provide the same visual effects on Unix/X11.
+
+Two new classes QAction and QActionGroup make it much easier to
+create sophisticated main windows for today's applications. A QAction
+abstracts a user interface action that can appear both in menus and
+tool bars. An action group makes it easier to deal with groups of
+actions. It allows to add, remove or activate its children with a
+single call and provides "one of many" semantics for toggle
+actions. Changing an action's properties, for example using
+setEnabled(),setOn() or setText(), immediately shows up in all
+representations.
+
+Few people consider the original OSF Motif style the most elegant or
+flashy GUI style. Therefore several attempts have been made to come up
+with a slightly improved Motif-ish look and feel. One of them is the
+thinner CDE style, that was supported by Qt since version 2.0. In the
+2.2 release, we now added support for SGI's very own Motif version on
+IRIX workstations. With its more elegant bevelling of 3D elements and
+mouse-under highlight effects, it is quite appealing. For Linux users,
+we added a Motif plus style, that resembles the bevelling used by the
+GIMP toolkit (GTK+). Optionally, this style also does hovering
+highlight on buttons.
+
+Last but not least we added support for multi-threaded
+applications. The classes involved are QThread to start threads,
+QMutex to serialize them and QCondition to signal the occurrence of
+events between threads ("condition variables").
+
+Another major change was done regarding distribution. In order to
+address the steady growth of functionality in the Qt library, we
+split the source code into distinct modules that can be compiled
+in (or left out) separately. This also makes it possible for us to
+keep the cost of entry into the commercial Qt world as low as possible.
+
+The modules available in Qt 2.2 are:
+
+- Tools: platform-independent Non-GUI API for I/O, encodings, containers,
+ strings, time & date, and regular expressions.
+
+- Kernel: platform-independent GUI API, a complete window-system API.
+
+- Widgets: portable GUI controls.
+
+- Dialogs: ready-made common dialogs for selection of colors, files,
+ printers, fonts, and basic types, plus a wizard framework, message
+ boxes and progress indicator.
+
+- OpenGL 3D Graphics: integration of OpenGL with Qt, making it very
+ easy to use OpenGL rendering in a Qt application.
+
+- Network: advanced socket and server-socket handling plus
+ asynchronous DNS lookup.
+
+- Canvas: a highly optimized 2D graphic area.
+
+- Table: a flexible and editable table widget
+
+- IconView: a powerful visualization widget similar to QListView and
+ QListBox. It contains optionally labelled pixmap items that the user
+ can select, drag around, rename, delete and more.
+
+- XML: a well-formed XML parser with SAX interface plus an
+ implementation of the DOM Level1
+
+- Workspace: a workspace window that can contain decorated document
+ windows for Multi Document Interfaces (MDI).
+
+
+Network, Canvas, Table and XML are entirely new modules.
+
+Below is a list of the major new features in existing classes as well
+as short descriptions of all new classes.
+
+
+****************************************************************************
+* New major features in existing classes *
+****************************************************************************
+
+QApplication: - "global strut", an adjustable minimum size for interactable
+ control elements like the entries in a listbox, useful for
+ touch-screens. Popup window effects ( setEffectEnabled() )
+ and more threading support ( guiThreadTaken(), lock(),
+ unlock(), locked() ).
+
+QCheckBox: - "tristate" is now a property.
+
+QClipboard: - text() supports subtypes.
+
+QComboBox: - "editable" is now a property that is changeable at runtime
+
+QDialog: - support for extensible dialogs ("More...") with
+ setExtension() and setOrientation(). Optional size grip.
+
+QFont: - new functions styleStrategy() and setStyleHint()
+
+QIconSet: - new constructor that takes both a small and a large pixmap
+
+QKeyEvent: - numeric keypad keys now set a Keypad flag
+
+QLabel: - support for scaled pixmap contents, "pixmap" as property
+
+QLayout: - improved flexibility with setEnabled(), access to the
+ laid out menu bar with menuBar().
+
+QListView: - "showSortIndicator" as property. New function
+ QListViewItem::moveItem() to simplify drag and drop.
+
+QMovie: - new functions pushSpace(), pushData(), frameImage()
+
+QMultiLineEdit: - new functions pasteSubType() and copyAvailable()
+
+QObject: - new function normalizeSignalSlot(), tr() now supports a comment.
+
+QPicture: - streaming to and from QDataStream
+
+QPopupMenu: - new signal aboutToHide()
+
+QRegExp: - new functions setPattern() and find()
+
+QRegion: - new function setRects()
+
+QScrollView: - new property "staticBackground" to define a pixmap
+ background that does not scroll with the contents.
+
+QStatusBar: - "sizeGripEnabled" as property
+
+QStyle: - themable menu bars with drawMenuBarItem(). New functions
+ buttonMargin(), toolBarHandleExtent(), sliderThickness()
+
+QTabWidget: - new functions currentPageIndex(), setCurrentPage(), new
+ signal currentChanged(). Similar extensions to QTabBar
+ and QTabDialog
+
+QTranslator: - new algorithmen for faster lookup. No more risk of
+ "hash collisions" when many translators are loaded.
+
+QVariant: - new subtype QSizePolicy. Necessary for QWidget's
+ new sizePolicy property.
+
+QWidget: - new properties "sizePolicy", "ownPalette", "ownFont",
+ "ownCursor" and "hidden". The size policy is now adjustable
+ at runtime with setSizePolicy(). Added convenience slot
+ setDisabled(). Fast geometry mapping functions mapTo() and
+ mapFrom(). On X11, support for a new background mode
+ X11ParentRelative.
+
+QWizard: - runtime changable titles with setTitle(), new signal
+ selected()
+
+QWorkspace: - support for more widget flags like WType_Tool. Titlebar
+ blending effects on MS-Windows 98/2000.
+
+
+****************************************************************************
+* New classes *
+****************************************************************************
+
+QAction - Abstracts a user interface action that can appear both in
+ menus and tool bars. Changing an action's properties, for
+ example using setEnabled(),setOn() or setText(),
+ immediately shows up in all representations.
+
+QActionGroup - Combines actions to a group. An action group makes it easier
+ to deal with groups of actions. It allows to add, remove or
+ activate its children with a single call and provides
+ "one of many" semantics for toggle actions.
+
+QDial - A rounded rangecontrol (like a speedometer or
+ potentiometer). Both API- and UI-wise the dial is very
+ similar to a QSlider.
+
+QDom - [XML Module] DOM Level 1 Tree
+
+QMotifPlusStyle - This class implements a Motif-ish look and feel with more
+ sophisticated bevelling as used by the GIMP toolkit (GTK+)
+ for Unix/X11.
+
+QMutex: - Provides access serialization between threads.
+
+QSemaphore: - A robust integer semaphore. Another way of thread
+ serialization.
+
+QThread - Baseclass for platform-independent threads.
+
+QWaitCondition - Provides signalling of the occurrence of events between
+ threads ("condition variables")
+
+QCanvas - [Canvas Module] a highly optimized 2D graphic area.
+
+QTable - [Table Module] a flexible and editable table widget
+
+QXML - [XML Module] XML parser with SAX interface
+
diff --git a/dist/changes-2.2.1 b/dist/changes-2.2.1
new file mode 100644
index 0000000..1df0851
--- /dev/null
+++ b/dist/changes-2.2.1
@@ -0,0 +1,160 @@
+
+Qt 2.2.1 is a maintainance release. It keeps backward binary compatibility
+with Qt 2.1 and both forward and backward source compatibility with Qt 2.2.x.
+
+Qt 2.2.0 had a binary compatibility problem with the following:
+
+ bool QRect::contains( const QRect &r, bool proper=FALSE ) const
+
+Qt 2.2.1 corrects this. Programs compiled with 2.1.x now continue
+running with 2.2.1. Programs compiled with versions other than 2.2.0
+may not run with 2.2.0, so upgrading to 2.2.1 is additionally important.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- Various compilation problems on particular platforms fixed
+
+- Many improvments in QThread. More platforms supported
+ (e.g. HPUX 11.x), uses native threads on Solaris rather than
+ compatibility posix threads
+
+- A few newly discovered memory leaks and free memory reads fixed
+
+- As usual, many minor bugfixes, too small to be mentioned here.
+
+
+****************************************************************************
+* Designer *
+****************************************************************************
+
+- in KDE mode: don't show all KDE widgets in the toolbars, since we do
+ not have icons for them (yet). They are accessible through the menu
+ structure, though.
+
+- Introduced concept of a global /etc/designerrc and a templatePath
+ for the sake of Linux Standard Base (LSB) and the way Linux
+ ditributors like to package the Qt Free Edition.
+
+- Support for tab names in a QTabWidget, and page names in a QWizard.
+
+- Support for button IDs in a button group, makes it possible to utilize
+ one single slot for all buttons in a group.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QClipboard: X11 only: fixed occasional crashes, possibly corrupted
+ list of provided types and hangups of several seconds under
+ certain circumstances.
+
+QFileDialog: Fixed update when renaming a file to an existing file
+ Unix only: Reset error status after attempting to read an
+ empty file
+ Fixed magical resetting of the "Open" label
+ Fixed duplicate entries in the history combobox
+
+QFont: Fixes for Hewbrew, Arabic and Thai encodings
+ Added support for Ukrainian encodings
+ X11 only: loading fonts for a locale other than the
+ current now possible (allows displaying japanese characters
+ in a latin1 application without relying on the existence of
+ a unicode font)
+
+QHeader: removing labels fixed, important for QTable and QListView
+
+QIconView: drawing problem with missleading font metrices and
+ bounding rectangles fixed
+
+QInputDialog,
+QMessageBox: use the main widget's or parent's icon if available
+
+QLayout: synchronize the behaviour of sublayouts and subwidgets with
+ layouts.
+
+QLineEdit: Update cursor position if QValidator::fixup() truncates the
+ string
+
+QMainWindow: Fixed calculated minimum size. Sometimes, the minimum width
+ of the central widget was disregarded.
+
+QMenuBar: Sizing fixed for frameless menubars in toolbars in
+ Motif-based styles
+
+QMotifPlusStyle: correct drawing of triangular tabs
+
+QMovie: keep frameImage() during EndOfMovie signal
+
+QDom: add comments when reading a xml file into the dom
+
+QPrinter: MS-Windows only: Fixed invalidation when setup dialog was
+ cancelled
+
+QSgiStyle: Small drawing problem with QTabBar fixed.
+ Fixed drawing of special prefix in menu items
+
+QSizePolicy: setHeightForWidth() was broken, works now
+
+QTextCodec: significant speedups for latin1 conversion
+
+QTextStream: small speed improvements for readLine()
+ Added codec for ukrainian (koi8-u) encoding
+
+QWheelEvent: Support for the MSH_MOUSEWHEEL extension on MS-Windows 95
+
+QWidget: X11 only: Fixed possible mouse lock-ups when re-entering
+ the event loop on mouse events for widgets of type
+ WType_Popup.
+ X11 only: set input context when setting the active
+ window
+ X11 only: when dialogs were closed, the main window looked
+ like it lost focus with some window managers. This has been
+ fixed now.
+
+QWidgetStack: potential flicker issue fixed
+
+QWorkspace: normalize minimized children when they get focus
+ removed occasional flashing (e.g. when maximizing child
+ windows)
+ Look and feel adjustments to emulate MS-Windows even
+ closer
+ Documented that the active window can be 0 if there is no
+ active window
+ Slightly modifed the button decorations to be more general
+ and less KDE2 specific
+
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+QLayout:
+
+We synchronized the behaviour of sublayouts and subwidgets with
+layouts. This shows great effect in the designer, were you usually
+operate on container subwidgets in the design phase, but get a
+complete layout in the preview mode or the generated code. For
+example, the influence of a spacer item on a sublayout's size policy
+has been reduced. The modifications may slightly affect the layout of
+some dialogs.
+
+
+****************************************************************************
+* Qt/Embedded-specific changes *
+****************************************************************************
+
+- Rotated displays & fonts
+- QCOP, a simple interprocess messaging system
+- Threading support
+- Auto-detected mouse
+- VGA16 support
+- Improved thick lines
+- Optimize some double-painting
+- Allow setting of custom 8bpp colors: QApplication::qwsSetCustomColors()
+- Fix masked widget drawing and clicking
+- Fix mouse grabbing for popups
+
+
diff --git a/dist/changes-2.2.2 b/dist/changes-2.2.2
new file mode 100644
index 0000000..5f271fe
--- /dev/null
+++ b/dist/changes-2.2.2
@@ -0,0 +1,154 @@
+
+Qt 2.2.2 is a bugfix release. It keeps both forward and backward
+compatibility (source and binary) with Qt 2.2.1
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+OpenGL: More Problems with the auto-detection of OpenGL
+ libraries have been fixed.
+
+
+****************************************************************************
+* Designer *
+****************************************************************************
+
+uic: Added workaround for the QListView::Manual vs.
+ QScrollView::Manual enumeration clash.
+ Fixed backslashes inside strings.
+ Obeys user defined layout names.
+
+RC2UI: Converts Microsoft Dialog Resources (.rc) to
+ Qt Designer Dialog Userinterface Description Files (.ui).
+ You find it in $QTDIR/tools/designer/integration/rc2ui.
+ See the README file there.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QAction: Fixed possible crash in removeFrom().
+
+QApplication: X11 only: Add possibility to input text in more than
+ one encoding.
+
+QCanvas: Deletes items at canvas destruction time. Without a
+ canvas, items are not deletable anyway as they need to
+ access their canvas during destruction.
+ Some performance optimizations.
+
+QCanvasItem: More accurate rectangle collision detection.
+
+QClipboard: X11 only: 64bit cleanness when transferring data
+ with format==32 using dnd/clipboard.
+
+QColorDialog: MS-Windows only: Tries harder to use a nice icon.
+
+QDialog: Keypard-Enter triggers default button.
+
+QFile: Unix only: Safe access to files in the proc filesystem.
+
+QFileDialog: Fixed reentrancy problem when used with qFtp.
+ MS-Windows only: Tries harder to use a nice icon.
+
+QFontCache: Fixed possible crash in the rare case that the font
+ cache runs over.
+
+QGLWidget: MS-Windows only: Fix for GL context switching.
+
+QIconView: Fixed possible crash.
+
+QImage: Increased number of colors when writing XPM files from
+ 64^2 to 64^4.
+ Fixed 16-bit pixel().
+
+QImageIO: MS-Windows only: exported qInitJpegIO function.
+ Fixed crash with libpng 1.0.8.
+ Fixed huge memory leak with PNG files.
+
+QLCDNumber: Sensible precision when displaying doubles.
+
+QLineEdit: Accepts text drops other than text/plain.
+ Fixed psosible crash when deleting a line edit while its
+ context menu is visible.
+
+QListView: Less flicker. Improved performance on insertItem().
+
+QMainWindow: Deletes its layout first on destruction time to avoid
+ possible crashes with subclasses.
+
+QMotifPlusStyle:Tuned drawing of tabs.
+
+QPainter: Fixed rounded rectangle drawing with rotation and
+ viewport transformation turned on.
+ Ignores '\r' in drawText.
+
+QPopupMenu: Ensure to emit the aboutToShow() signal only once
+ for submenus.
+
+QPrinter: Unix only: Fixed output for when printing some but not all pages
+ of multi-page output.
+ Unix only: Fixed an infinite loop in the image compression
+ algorithm for some images.
+ Unix only: Added MIBs for 8859-13, -14 and -15.
+ MS-Windows only: Fixed system print dialog for Win9x.
+
+QPrintDialog: MS-Windows only: Tries harder to use a nice icon.
+
+QProgressBar: Fixed drawing problem with really large progress ranges.
+
+QPushButton: Implemented "flat" property as advertised.
+
+QPrinter: MS-Windows only: Keep the current printer name.
+
+QRichText: Fixed line breaking for asian scripts. Support for
+ chinese punctuation.
+ Obeys <font color="..."> tags inside links.
+
+QString: Allows 'G' in sprintf.
+
+QTextCodec: Recognizes "he" and "he_IL" as 8859-8 locales.
+ Added latin4 locales.
+ Improved Thai support.
+ X11 only: fixed crashes when LANG=ko.
+ Improved conversion performance.
+
+QWidget: X11 only: fixed a crash in case XmbTextListToTextProperty
+ fails for a certain locale.
+ Visiblity fix when reparenting a widget to 0.
+ X11 only: Improved transient placement for embedded
+ windows.
+ X11 only: Maintains XDND state when reparented.
+ X11 only: No more crashes in setActiveWindow() with
+ or without XIM support.
+ X11 only: small ICCCM compatibility issue with subsequent
+ hide and show fixed.
+
+QWorkspace: Tab-focus remains inside a document window.
+ Fixed problem with menubars inside document windows.
+ Obeys initial child geometry.
+ Uses the children's size hint when cascading.
+
+QXmlInputSource:Fix for stream devices that do not support
+ direct access.
+
+****************************************************************************
+* Third party *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Changes that might affect runtime behavior *
+****************************************************************************
+
+None
+
+****************************************************************************
+* Qt/Embedded-specific changes *
+****************************************************************************
+
+ - Drawing speed-ups, especially rectangles, alpha blitting, horizontal lines.
+ - More control of qconfig.h
diff --git a/dist/changes-3.0.0 b/dist/changes-3.0.0
new file mode 100644
index 0000000..1f6ad5b
--- /dev/null
+++ b/dist/changes-3.0.0
@@ -0,0 +1,720 @@
+Qt 3.0 adds a wide range of major new features as well as substantial
+improvements over the Qt 2.x series. Some internals have undergone
+major redesign and new classes and methods have been added.
+
+The Qt version 3.x series is not binary compatible with the 2.x
+series. This means programs compiled with Qt version 2.x must be
+recompiled to work with Qt 3.0.
+
+In addition to the traditional Qt platforms Linux, Unix and the
+various flavours of MS-Windows. Qt 3.0 for the first time introduces a
+native port to MacOS X. Like all Qt versions, Qt/Mac is source
+compatible with the other editions and follows closely the platform's
+native look and feel guidelines.
+
+We have tried to keep the API of Qt 3.0 as compatible as possible with
+the Qt 2.x series. For most applications, only minor changes will be
+needed to compile and run them successfully using Qt 3.0.
+
+One of the major new features that has been added in the 3.0 release
+is a module allowing you to easily work with databases. The API is
+platform independent and database neutral. This module is seamlessly
+integrated into Qt Designer, greatly simplifying the process of
+building database applications and using data aware widgets.
+
+Other major new features include a plugin architecture to extend Qt's
+functionality, for styles, text encodings, image formats and database
+drivers. The Unicode support of Qt 2.x has been greatly enhanced, it
+now includes full support for scripts written from right to left
+(e.g. Arabic and Hebrew) and also provides improved support for Asian
+languages.
+
+Many new classes have been added to the Qt Library. Amongst them are
+classes that provide a docking architecture (QDockArea/QDockWindow), a
+powerful rich text editor (QTextEdit), a class to store and access
+application settings (QSettings) and a class to create and communicate
+with processes (QProcess).
+
+Apart from the changes in the library itself a lot has been done to
+make the development of Qt applications with Qt 3.0 even easier than
+before. Two new applications have been added: Qt Linguist is a tool to
+help you translate your application into different languages; Qt
+Assistant is an easy to use help browser for the Qt documentation that
+supports bookmarks and can search by keyword.
+
+Another change concerns the Qt build system, which has been reworked
+to make it a lot easier to port Qt to new platforms. You can use this
+platform independent build system - called qmake - for your own
+applications.
+
+And last but not least we hope you will enjoy the revisited and widely
+extended documentation.
+
+
+Qt/Embedded
+----------
+
+Qt/Embedded 3.0 provides the same features as Qt 3.0, but currently
+lacks some of the memory optimizations and fine-tuning capabilities of
+Qt/Embedded 2.3.x. We will add these in the upcoming maintainance
+releases.
+
+If you develop a new product based on Qt/Embedded, we recommend
+switching to 3.0 because of the greatly improved functionality.
+However, if you are planning a release within the next two months and
+require memory optimizations not available with Qt/Embedded 3.0, we
+suggest using Qt/Embedded 2.3.x.
+
+
+The Qt Library
+========================================
+
+A large number of new features has been added to Qt 3.0. The following
+list gives an overview of the most important new and changed aspects
+of the Qt library.
+
+
+Database support
+----------------
+
+One of the major new features in Qt 3.0 is the SQL module that
+provides cross-platform access to SQL databases, making database
+application programming with Qt seamless and portable. The API, built
+with standard SQL, is database-neutral and software development is
+independent of the underlying database.
+
+A collection of tightly focused C++ classes are provided to give the
+programmer direct access to SQL databases. Developers can send raw SQL
+to the database server or have the Qt SQL classes generate SQL queries
+automatically. Drivers for Oracle, PostgreSQL, MySQL and ODBC are
+available and writing new drivers is straightforward.
+
+Tying the results of SQL queries to GUI components is fully supported
+by Qt's SQL widgets. These classes include a tabular data widget
+(for spreadsheet-like data presentation with in-place editing), a
+form-based data browser (which provides data navigation and edit
+functions) and a form-based data viewer (which provides read-only
+forms). This framework can be extended by using custom field editors,
+allowing for example, a data table to use custom widgets for in-place
+editing. The SQL module fully supports Qt's signals/slots mechanism,
+making it easy for developers to include their own data validation and
+auditing code.
+
+Qt Designer fully supports Qt's SQL module. All SQL widgets can be
+laid out within Qt Designer, and relationships can be established
+between controls visually. Many interactions can be defined purely in
+terms of Qt's signals/slots mechanism directly in Qt Designer.
+
+
+Explicit linking and plugins
+-------------------------
+
+The QLibrary class provides a platform independent wrapper for runtime
+loading of shared libraries.
+
+Specialized classes that make it possible to extend Qt's functionality
+with plugins: QStylePlugin for user interface styles, QTextCodecPlugin
+for text encodings, QImageFormatPlugin for image formats and
+QSqlDriverPlugin for database drivers.
+
+It is possible to remove unused components from the Qt library, and
+easy to extend any application with 3rd party styles, database drivers
+or text codecs.
+
+Qt Designer supports custom widgets in plugins, and will use the
+widgets both when designing and previewing forms (QWidgetPlugin).
+
+
+Rich text engine and editor
+---------------------------
+
+The rich text engine originally introduced in Qt 2.0 has been further
+optimized and extended to support editing. It allows editing formatted
+text with different fonts, colors, paragraph styles, tables and
+images. The editor supports different word wrap modes, command-based
+undo/redo, multiple selections, drag and drop, and many other
+features. The engine is highly optimized for proccesing and displaying
+large documents quickly and efficiently.
+
+
+Unicode
+-------
+
+Apart from the rich text engine, another new feature of Qt 3.0 that
+relates to text handling is the greatly improved Unicode support. Qt
+3.0 includes an implementation of the bidirectional algorithm (BiDi)
+as defined in the Unicode standard and a shaping engine for Arabic,
+which gives full native language support to Arabic and Hebrew speaking
+people. At the same time the support for Asian languages has been
+greatly enhanced.
+
+The support is almost transparent for the developer using Qt to
+develop their applications. This means that developers who developed
+applications using Qt 2.x will automatically gain the full support for
+these languages when switching to Qt 3.0. Developers can rely on their
+application to work for people using writing systems different from
+Latin1, without having to worry about the complexities involved with
+these scripts, as Qt takes care of this automatically.
+
+
+Docked and Floating Windows
+---------------------------
+
+Qt 3.0 introduces the concept of dock windows and dock areas. Dock
+windows are widgets, that can be attached to, and detached from, dock
+areas. The most common kind of dock window is a tool bar. Any number of
+dock windows may be placed in a dock area. A main window can have dock
+areas, for example, QMainWindow provides four dock areas (top, left,
+bottom, right) by default. The user can freely move dock windows and
+place them at a convenient place in a dock area, or drag them out of
+the application and have them float freely as top level windows in
+their own right. Dock windows can also be minimized or hidden.
+
+For developers, dock windows behave just like ordinary widgets. QToolbar
+for example is now a specialized subclass of a dock window. The API
+of QMainWindow and QToolBar is source compatible with Qt 2.x, so
+existing code which uses these classes will continue to work.
+
+
+Regular Expressions
+-------------------
+
+Qt has always provided regular expression support, but that support
+was pretty much limited to what was required in common GUI control
+elements such as file dialogs. Qt 3.0 introduces a new regular
+expression engine that supports most of Perl's regex features and is
+Unicode based. The most useful additions are support for parentheses
+(capturing and non-capturing) and backreferences.
+
+
+Storing application settings
+----------------------------
+
+Most programs will need to store some settings between runs, for
+example, user selected fonts, colors and other preferences, or a list
+of recently used files. The new QSettings class provides a platform
+independent way to achieve this goal. The API makes it easy to store
+and retrieve most of the basic data types used in Qt (such as basic
+C++ types, strings, lists, colors, etc). The class uses the registry
+on the Windows platform and traditional resource files on Unix.
+
+
+Creating and controlling other processes
+----------------------------------------
+
+QProcess is a class that allows you to start other programs from
+within a Qt application in a platform independent manner. It gives you
+full control over the started program. For example you can redirect
+the input and output of console applications.
+
+
+Accessibility
+---------------
+
+Accessibility means making software usable and accessible to a wide
+range of users, including those with disabilities. In Qt 3.0, most
+widgets provide accessibility information for assistive tools that can
+be used by a wide range of disabled users. Qt standard widgets like
+buttons or range controls are fully supported. Support for complex
+widgets, like e.g. QListView, is in development. Existing applications
+that make use of standard widgets will become accessible just by using
+Qt 3.0.
+
+Qt uses the Active Accessibility infrastructure on Windows, and needs
+the MSAA SDK, which is part of most platform SDKs. With improving
+standardization of accessibility on other platforms, Qt will support
+assistive technologies on other systems too.
+
+
+XML Improvements
+----------------
+
+The XML framework introduced in Qt 2.2 has been vastly improved. Qt
+2.2 already supported level 1 of the Document Object Model (DOM), a
+W3C standard for accessing and modifying XML documents. Qt 3.0 has
+added support for DOM Level 2 and XML namespaces.
+
+The XML parser has been extended to allow incremental parsing of XML
+documents. This allows you to start parsing the document directly
+after the first parts of the data have arrived, and to continue
+whenever new data is available. This is especially useful if the XML
+document is read from a slow source, e.g. over the network, as it
+allows the application to start working on the data at a very early
+stage.
+
+
+SVG support
+-----------
+
+SVG is a W3C standard for "Scalable Vector Graphics". Qt 3.0's SVG
+support means that QPicture can optionally generate and import static
+SVG documents. All the SVG features that have an equivalent in
+QPainter are supported.
+
+
+Multihead support
+-----------------
+
+Many professional applications, such as DTP and CAD software, are able
+to display data on two or more monitors. In Qt 3.0 the QDesktopWidget
+class provides the application with runtime information about the
+number and geometry of the desktops on the different monitors and such
+allows applications to efficiently use a multi-monitor setup.
+
+The virtual desktop of Windows 98 and 2000 is supported, as well as
+the traditional multi-screen and the newer Xinerama multihead setups
+on X11.
+
+
+X11 specific enhancements
+-------------------------
+
+Qt 3.0 now complies with the NET WM Specification, recently adopted
+by KDE 2.0. This allows easy integration and proper execution with
+desktop environments that support the NET WM specification.
+
+The font handling on X11 has undergone major changes. QFont no longer
+has a one-to-one relation with window system fonts. QFont is now a
+logical font that can load multiple window system fonts to simplify
+Unicode text display. This completely removes the burden of
+changing/setting fonts for a specific locale/language from the
+programmer. For end-users, any font can be used in any locale. For
+example, a user in Norway will be able to see Korean text without
+having to set their locale to Korean.
+
+Qt 3.0 also supports the new render extension recently added to
+XFree86. This adds support for anti-aliased text and pixmaps with
+alpha channel (semi transparency) on the systems that support the
+rendering extension (at the moment XFree 4.0.3 and later).
+
+
+Printing
+--------
+
+Printing support has been enhanced on all platforms. The QPrinter
+class now supports setting a virtual resolution for the painting
+process. This makes WYSIWYG printing trivial, and also allows you to
+take full advantage of the high resolution of a printer when painting
+on it.
+
+The postscript driver built into Qt and used on Unix has been greatly
+enhanced. It supports the embedding of true/open type and type1 fonts
+into the document, and can correctly handle and display Unicode.
+Support for fonts built into the printer has been enhanced and Qt now
+knows about the most common printer fonts used for Asian languages.
+
+
+Networking
+-----------
+
+A new class QHttp provides a simple interface for HTTP downloads and
+uploads.
+
+
+Compatibility with the Standard Template Library (STL)
+------------------------------------------------------
+
+Support for the C++ Standard Template Library has been added to the Qt
+Template Library (QTL). The QTL classes now contain appropriate copy
+constructors and typedefs so that they can be freely mixed with other
+STL containers and algorithms. In addition, new member functions have
+been added to QTL template classes which correspond to STL-style
+naming conventions (e.g., push_back()).
+
+
+Qt Designer
+========================================
+
+Qt Designer was a pure dialog editor in Qt 2.2 but has now been
+extended to provide the full functionality of a GUI design tool.
+
+This includes the ability to lay out main windows with menus and
+toolbars. Actions can be edited within Qt Designer and then plugged
+into toolbars and menu bars via drag and drop. Splitters can now be
+used in a way similar to layouts to group widgets horizontally or
+vertically.
+
+In Qt 2.2, many of the dialogs created by Qt Designer had to be
+subclassed to implement functionality beyond the predefined signal and
+slot connections. Whilst the subclassing approach is still fully
+supported, Qt Designer now offers an alternative: a plugin for editing
+code. The editor offers features such as syntax highlighting,
+completion, parentheses matching and incremental search.
+
+The functionality of Qt Designer can now be extended via plugins.
+Using Qt Designer's interface or by implementing one of the provided
+interfaces in a plugin, a two way communication between plugin and Qt
+Designer can be established. This functionality is used to implement
+plugins for custom widgets, so that they can be used as real widgets
+inside the designer.
+
+Basic support for project management has been added. This allows you
+to read and edit *.pro files, add and remove files to/from the project
+and do some global operations on the project. You can now open the
+project file and have one-click access to all the *.ui forms in the
+project.
+
+In addition to generating code via uic, Qt Designer now supports the
+dynamic creation of widgets directly from XML user interface
+description files (*.ui files) at runtime. This eliminates the need of
+recompiling your application when the GUI changes, and could be used
+to enable your customers to do their own customizations. Technically,
+the feature is provided by a new class, QWidgetFactory in the
+UI-library.
+
+
+Qt Linguist
+========================================
+
+Qt Linguist is a GUI utility to support translating the user-visible
+text in applications written with Qt. It comes with two command-line
+tools: lupdate and lrelease.
+
+Translation of a Qt application is a three-step process:
+
+ 1) Run lupdate to extract user-visible text from the C++ source
+ code of the Qt application, resulting in a translation source file
+ (a *.ts file).
+ 2) Provide translations for the source texts in the *.ts file using
+ Qt Linguist.
+ 3) Run lrelease to obtain a light-weight message file (a *.qm file)
+ from the *.ts file, which provides very fast lookup for released
+ applications.
+
+Qt Linguist is a tool suitable for use by translators. Each
+user-visible (source) text is characterized by the text itself, a
+context (usually the name of the C++ class containing the text), and
+an optional comment to help the translator. The C++ class name will
+usually be the name of the relevant dialog, and the comment will often
+contain instructions that describe how to navigate to the relevant
+dialog.
+
+You can create phrase books for Qt Linguist to provide common
+translations to help ensure consistency and to speed up the
+translation process. Whenever a translator navigates to a new text to
+translate, Qt Linguist uses an intelligent algorithm to provide a list
+of possible translations: the list is composed of relevant text from
+any open phrase books and also from identical or similar text that has
+already been translated.
+
+Once a translation is complete it can be marked as "done"; such
+translations are included in the *.qm file. Text that has not been
+"done" is included in the *.qm file in its original form. Although Qt
+Linguist is a GUI application with dock windows and mouse control,
+toolbars, etc., it has a full set of keyboard shortcuts to make
+translation as fast and efficient as possible.
+
+When the Qt application that you're developing evolves (e.g. from
+version 1.0 to version 1.1), the utility lupdate merges the source
+texts from the new version with the previous translation source file,
+reusing existing translations. In some typical cases, lupdate may
+suggest translations. These translations are marked as unfinished, so
+you can easily find and check them.
+
+
+Qt Assistant
+========================================
+
+Due to the positive feedback we received about the help system built
+into Qt Designer, we decided to offer this part as a separate
+application called Qt Assistant. Qt Assistant can be used to browse
+the Qt class documentation as well as the manuals for Qt Designer and
+Qt Linguist. It offers index searching, a contents overview, bookmarks
+history and incremental search. Qt Assistant is used by both Qt
+Designer and Qt Linguist for browsing their help documentation.
+
+
+qmake
+========================================
+
+qmake is a cross-platform make utility that makes it possible to build
+the Qt library and Qt-based applications on various target platforms
+from one single project description. It is the C++ successor of
+'tmake' which required Perl.
+
+qmake offers additional functionallity that is difficult to reproduce
+in tmake. Trolltech uses qmake in its build system for Qt and related
+products and we have released it as free software.
+
+
+
+Detailed changes
+=============
+
+Qt 3.0 went through 6 beta releases. These are the detailed changes
+since Beta 6 only. For other changes, please see the changes notes
+of the respective beta releases.
+
+
+Qt 3.0 final is not binary compatible with Beta6; any programs linked
+against Beta6 must be recompiled.
+
+Below you will find a description of general changes in the Qt
+Library, Qt Designer and Qt Assistant. Followed by a detailed list of
+changes in the API.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QApplication
+ make sure we process deferred deletes before leaving the event
+ loop. This fixes some ocassions of memory leaks on exit.
+ win32: some improvements for modality and dockwindow handling
+ x11 only: read non-gui QSettings when running without GUI.
+
+
+- QCheckListItem
+ Make the checkboxes respect the AlignCenter flag. Also make
+ the boxes look better in case they are not placed in the first
+ column.
+
+- QComboBox
+ if we have a currentItem and then we set the combobox to be
+ editable then set the text in the lineedit to be of the
+ current item.
+
+- QCommonStyle
+ QToolButton: spacing between a toolbutton's icon and its label.
+ QProgressBar: text color fixed.
+
+- QCursor
+ added the What's This? cursor to the collection.
+
+- QDataTable
+ fixed broken context menus.
+
+- QDate
+ fixed addMonth() overflow.
+
+- QDesktopWidget
+ win32 only: works now also for cases where the card handles
+ multiple monitors and GetSystemMetrics returns a single screen
+ only.
+
+- QDomAttr
+ fixed a memory leak in setNodeValue()
+
+- QDomNodeMap
+ added count() as a Qt-style alias for length()
+
+- QDragObject
+ default to the middle of the pixmap as a hot spot, this looks
+ nicer.
+
+- QFileDialog (internal dialog)
+ make viewMode() return the correct value even after the dialog
+ is finished. Fixed getOpenFileName and getSaveFileName for
+ non-existant directories. Make sure that when it's in
+ directory mode that the filters reflect this, and change the
+ label from file name to directory.
+ win32 only: Improved modality when using the native file
+ dialog.
+
+- QFont
+ x11 only: speed up fontloading with even more clever
+ caching. Make sure we can match scaled bitmap fonts by
+ default. Do not load a backup font for a script that is not
+ default. Make sure the pixel size is correct, even for fonts
+ that are unavailable. Try even harder to find a fontname that
+ is not understood. Some RENDER performance optimizations.
+
+- QFontDialog
+ make sure the content is set up correctly when initializing
+ the dialog.
+
+- QGLWidget
+ IRIX only: fixed reparent/resize bug, QGLContext::setContext()
+ is incredibly sensitive on different X servers.
+
+- QHeader
+ fixed missing updates on height resp. width changes like the
+ occur when changing the application font.
+
+- QIconView
+ fixed updates of non-auto-arranged views.
+
+- QImage
+ no gamma correction by default.
+ x11 only: some alignment issue with the alpha masked fixed.
+
+- QIODevice
+ fixed return value of QIODevice::readLine() for sequential
+ access.
+
+- QKeyEvent
+ win32 only: generate Direction_R/L events for bidirectional
+ input.
+
+- QLabel
+ handle setPixmap( *pixmap() ) gracefully. Apply the WordBreak
+ alignment flag to both plaintext and richtext. Improved alignment of
+ richtext labels. Removed some sizepolicy magic, QLabel now
+ works fine with Preferred/Preferred in all modes.
+
+- QLineEdit
+ fixed a crash when doing undo and a validator is set. Emit
+ textChanged() also if the text changed because of undo or redo.
+
+- QListBox
+ fixed RMB context-menu offset.
+
+- QListView
+ do not start renaming an item is CTRL or SHIFT is
+ pressed. Start renaming on mouse release, not mouse press, so
+ click + click + move on the same item does not start a rename
+ operation.
+
+- QMainWindow
+ show dock-menu also when clicking on the menubar.
+
+- QPainter
+ win32 only: improved printing performance through printer font
+ caching.
+ boundingRect(): ignore 0-width in the constrain rectangle.
+
+- QPicture
+ added overload for load() that takes a QIODevice.
+
+- QPrintDialog (internal dialog)
+ fixed enabling of the first page and last page labels.
+
+- QPrinter
+ win32 only: make setColorMode() work, some unicode fixes. Make
+ collate the default. Enable the collate checkbox without
+ losing the page selection if you want to print multiple
+ pages. Make the collateCopies property work that it knows
+ checks/unchecks the collate checkbox in the printing
+ dialog. Make settings also work when the print dialog is not
+ shown at all.
+
+- QProcess
+ added a new communication mode that duplicates stderr to
+ stdout (i.e. the equivalent of the shell's 2>&1).
+
+- QPSPrinter (unix)
+ fixed collate.
+
+- QRangeControl
+ simplified code.
+
+- QRichText
+ Propagate WhiteSpaceMode to subitems with
+ WhiteSpaceModeNormal. Hide DisplayModeNone
+ items without additional newline. Fixed links inside non-left
+ aligned tables. Fixed some bidi layout problems. Fixed last
+ line layout in right-aligned paragraphs. For plain text,
+ always use the palette's text color.
+
+- QScrollView
+ safer destruction.
+
+- QSettings
+ win32 only: fixed a dead lock situation when writing
+ to LOCAL_MACHINE, but reading from CURRENT_USER.
+
+- QSGIStyle
+ fixed drawing of checkable menu items.
+
+- QSimpleRichText
+ use the specified default font.
+
+- QSlider
+ optimized drawing in the new style engine.
+
+- QString
+ QString::replace() with a regular expression requires a
+ QRegExp object, passing a plain string will cause a compile
+ error.
+
+- QStyleSheet
+ additional parameter 'whitespacemode' for
+ QStyleSheet::convertFromPlainText(). Support for superscript
+ ('sup') and subscript ( 'sub' ).
+
+- QTabBar
+ react properly on runtime font changes, less flicker.
+
+- QTable
+ take the pixmap of a header section into account when
+ adjusting the size.
+
+- QTabWidget
+ use the embedded tabbar as focus proxy.
+
+- QThread
+ win32 only: possible crash with the thread dictionary fixed.
+
+- QValidator
+ In Q{Int,Double}Validator, consider '-' as Invalid rather than
+ Intermediate if bottom() >= 0.
+
+- QWidget
+ made showFullScreen() multihead aware.
+ win32 only: Better size and position restoring when switching
+ between fullscreen, maximized and minimized.
+ x11 only: improvements to XIM, overthespot works correctly
+ now.
+
+- QWorkspace
+ smarter placement of the minimize button when there is no
+ maximize button. Make titlebars of tool windows a bit smaller.
+ Improved styleability. Do not maximize a widget that has a
+ maximum size that is smaller than the workspace.
+
+
+
+****************************************************************************
+* Other *
+****************************************************************************
+
+- moc
+ fixed generation of uncompilable code in conjunction with
+ Q_ENUMS and signal/slots.
+
+- unicode
+ allow keyboard switching of paragraph directionality.
+
+- installation
+ install $QTDIR/doc/html/ instead of $QTDIR/doc/
+ install Qt Designer templates as well.
+
+- improved build on
+ HP-UX with cc.
+ Solaris 8 with gcc 3.0.1.
+ AIX with xlC and aCC.
+
+- inputmethods
+ x11 only: do not reset the input context on focus changes.
+
+- uic
+ smaller improvements, handle additional form signals.
+
+- Qt Designer
+ make it possible to add new signals to a form without
+ subclassing. Minor fixes.
+
+- Qt Assistant
+ fixed Shift-LMB selection bug. Fixed new window and window
+ restoration on restart.
+
+- Qt Linguist
+ change fourth parameter of QApplication::translate() from bool
+ to enum type. This affects MOC (new revision) and lupdate (new
+ syntax to parse). Change Qt Linguist's XML file format (.ts)
+ to be consistent with QApplication:<defaultcodec> (rather than
+ <codec>) to match QApp::defaultCodec(); encoding="UTF-8"
+ (rather than utf8="true") to match QApp::translate(). Fixed
+ window decoration on restart. Use 'finished', 'unfinished' and
+ 'unresolved' instead of the (!), (?) symbols on printouts.
+
+- QMsDev
+ merge "Add UIC" and "New Dialog". Better user interface and
+ general cleanup. Wwrite (and merge) qmake pro file with active
+ project. Load qmake pro files into Visual Studio.
+
+
diff --git a/dist/changes-3.0.0-beta1 b/dist/changes-3.0.0-beta1
new file mode 100644
index 0000000..2c73e77
--- /dev/null
+++ b/dist/changes-3.0.0-beta1
@@ -0,0 +1,1239 @@
+Qt 3.0 adds a lot of new features and improvements over the Qt 2.x
+series. Some internals have undergone major redesign and new classes
+and methods have been added.
+
+We have tried to keep the API of Qt 3.0 as compatible as possible with
+the Qt 2.x series. For most applications only minor changes will be
+needed to compile and run them successfully using Qt 3.0.
+
+One of the major new features that has been added in the 3.0 release
+is a module allowing you to easily work with databases. The API is
+platform independent and database neutral. This module is seamlessly
+integrated into Qt Designer, greatly simplifying the process of
+building database applications and using data aware widgets.
+
+Other major new features include a component architecture allowing you
+to build cross platform components, 'plugins' with Qt. You can use
+your own and third party plugins your own applications. The Unicode
+support of Qt 2.x has been greatly enhanced, it now includes full
+support for scripts written from right to left (e.g. Arabic and
+Hebrew) and also provides improved support for Asian languages.
+
+Many new classes have been added to the Qt Library. Amongst them are
+classes that provide a docking architecture (QDockArea/QDockWindow), a
+powerful rich text editor (QTextEdit), a class to store and access
+application settings (QSettings) and a class to create and communicate
+with processes (QProcess).
+
+Apart from the changes in the library itself a lot has been done to
+make the development of Qt applications with Qt 3.0 even easier than
+before. Two new applications have been added: Qt Linguist is a tool to
+help you translate your application into different languages; Qt
+Assistant is an easy to use help browser for the Qt documentation that
+supports bookmarks and can search by keyword.
+
+Another change concerns the Qt build system, which has been reworked
+to make it a lot easier to port Qt to new platforms. You can use this
+platform independent build system for your own applications.
+
+
+The Qt Library
+========================================
+
+A large number of new features has been added to Qt 3.0. The following
+list gives an overview of the most important new and changed aspects
+of the Qt library. A full list of every new method follows the
+overview.
+
+
+Database support
+----------------
+
+One of the major new features in Qt 3.0 is the SQL module that
+provides cross-platform access to SQL databases, making database
+application programming with Qt seamless and portable. The API, built
+with standard SQL, is database-neutral and software development is
+independent of the underlying database.
+
+A collection of tightly focused C++ classes are provided to give the
+programmer direct access to SQL databases. Developers can send raw SQL
+to the database server or have the Qt SQL classes generate SQL queries
+automatically. Drivers for Oracle, PostgreSQL, MySQL and ODBC are
+available and writing new drivers is straightforward.
+
+Tying the results of SQL queries to GUI components is fully supported
+by Qt's SQL widgets. These classes include a tabular data widget
+(for spreadsheet-like data presentation with in-place editing), a
+form-based data browser (which provides data navigation and edit
+functions) and a form-based data viewer (which provides read-only
+forms). This framework can be extended by using custom field editors,
+allowing for example, a data table to use custom widgets for in-place
+editing. The SQL module fully supports Qt's signal/slots mechanism,
+making it easy for developers to include their own data validation and
+auditing code.
+
+Qt Designer fully supports Qt's SQL module. All SQL widgets can be
+laid out within Qt Designer, and relationships can be established
+between controls visually. Many interactions can be defined purely in
+terms of Qt's signals/slots mechanism directly in Qt Designer.
+
+
+Component model - plugins
+-------------------------
+
+The QLibrary class provides a platform independent wrapper for runtime
+loading of shared libraries. Access to the shared libraries uses a
+COM-like interface. QPluginManager makes it trivial to implement
+plugin support in applications. The Qt library is able to load
+additional styles, database drivers and text codecs from plugins which
+implement the relevant interfaces, e.g. QStyleFactoryInterface,
+QSqlDriverInterface or QTextCodecInterface. It is possible to remove
+unused components from the Qt library, and easy to extend any
+application with 3rd party styles, database drivers or text codecs.
+
+Qt Designer supports custom widgets in plugins, and will use the
+widgets both when designing and previewing forms.
+
+QComponentFactory makes it easy to register any kind of component in a
+global database (e.g. the Windows Registry) and to use any registered
+component.
+
+
+Rich text engine and editor
+---------------------------
+
+The rich text engine originally introduced in Qt 2.0 has been further
+optimized and extended to support editing. It allows editing formatted
+text with different fonts, colors, paragraph styles, tables and
+images. The editor supports different word wrap modes, command-based
+undo/redo, multiple selections, drag and drop, and many other
+features. The engine is highly optimized for proccesing and displaying
+large documents quickly and efficiently.
+
+
+Unicode
+-------
+
+Apart from the rich text engine, another new feature of Qt 3.0 that
+relates to text handling is the greatly improved Unicode support. Qt
+3.0 includes an implementation of the bidirectional algorithm (BiDi)
+as defined in the Unicode standard and a shaping engine for Arabic,
+which gives full native language support to Arabic and Hebrew speaking
+people. At the same time the support for Asian languages has been
+greatly enhanced.
+
+The support is almost transparent for the developer using Qt to
+develop their applications. This means that developers who developed
+applications using Qt 2.x will automatically gain the full support for
+these languages when switching to Qt 3.0. Developers can rely on their
+application to work for people using writing systems different from
+Latin1, without having to worry about the complexities involved with
+these scripts, as Qt takes care of this automatically.
+
+
+Docked and Floating Windows
+---------------------------
+
+Qt 3.0 introduces the concept of Dock Windows and Dock Areas. Dock
+windows are widgets, that can be attached to, and detached from, dock
+areas. The commonest kind of dock window is a tool bar. Any number of
+dock windows may be placed in a dock area. A main window can have dock
+areas, for example, QMainWindow provides four dock areas (top, left,
+bottom, right) by default. The user can freely move dock windows and
+place them at a convenient place in a dock area, or drag them out of
+the application and have them float freely as top level windows in
+their own right. Dock windows can also be minimized or hidden.
+
+For developers, dock windows behave just like ordinary widgets. QToolbar
+for example is now a specialized subclass of a dock window. The API
+of QMainWindow and QToolBar is source compatible with Qt 2.x, so
+existing code which uses these classes will continue to work.
+
+
+Regular Expressions
+-------------------
+
+Qt has always provided regular expression support, but that support
+was pretty much limited to what was required in common GUI control
+elements such as file dialogs. Qt 3.0 introduces a new regular
+expression engine that supports most of Perl's regex features and is
+Unicode based. The most useful additions are support for parentheses
+(capturing and non-capturing) and backreferences.
+
+
+Storing application settings
+----------------------------
+
+Most programs will need to store some settings between runs, for
+example, user selected fonts, colors and other preferences, or a list
+of recently used files. The new QSettings class provides a platform
+independent way to achieve this goal. The API makes it easy to store
+and retrieve most of the basic data types used in Qt (such as basic
+C++ types, strings, lists, colors, etc). The class uses the registry
+on the Windows platform and traditional resource files on Unix.
+
+
+Creating and controlling other processes
+----------------------------------------
+
+QProcess is a class that allows you to start other programs from
+within a Qt application in a platform independent manner. It gives you
+full control over the started program, for example you can redirect
+the input and output of console applications.
+
+
+Accessibility (not part of the beta1 release)
+---------------------------------------------
+
+Accessibility means making software usable and accessible to a wide
+range of users, including those with disabilities. In Qt 3.0, most
+widgets provide accessibility information for assistive tools that can
+be used by a wide range of disabled users. Qt standard widgets like
+buttons or range controls are fully supported. Support for complex
+widgets, like e.g. QListView, is in development. Existing applications
+that make use of standard widgets will become accessible just by using
+Qt 3.0.
+
+Qt uses the Active Accessibility infrastructure on Windows, and needs
+the MSAA SDK, which is part of most platform SDKs. With improving
+standardization of accessibility on other platforms, Qt will support
+assistive technologies on other systems, too.
+
+The accessibility API in Qt is not yet stable, which is why we decided
+not to make it a part of the beta1 release.
+
+
+XML Improvements
+----------------
+
+The XML framework introduced in Qt 2.2 has been vastly improved. Qt
+2.2 already supported level 1 of the Document Object Model (DOM), a
+W3C standard for accessing and modifying XML documents. Qt 3.0 has
+added support for DOM Level 2 and XML namespaces.
+
+The XML parser has been extended to allow incremental parsing of XML
+documents. This allows you to start parsing the document directly
+after the first parts of the data have arrived, and to continue
+whenever new data is available. This is especially useful if the XML
+document is read from a slow source, e.g. over the network, as it
+allows the application to start working on the data at a very early
+stage.
+
+
+SVG support
+-----------
+
+SVG is a W3C standard for "Scalable Vector Graphics". Qt 3.0's SVG
+support means that QPicture can optionally generate and import static
+SVG documents. All the SVG features that have an equivalent in
+QPainter are supported.
+
+
+Multihead support
+-----------------
+
+Many professional applications, such as DTP and CAD software, are able
+to display data on two or more monitors. In Qt 3.0 the QDesktopWidget
+class provides the application with runtime information about the
+number and geometry of the desktops on the different monitors and such
+allows applications to efficiently use a multi-monitor setup.
+
+The virtual desktop of Windows 98 and 2000 is supported, as well as
+the traditional multi-screen and the newer Xinerama multihead setups
+on X11.
+
+
+X11 specific enhancements
+-------------------------
+
+Qt 3.0 now complies with the NET WM Specification, recently adopted
+by KDE 2.0. This allows easy integration and proper execution with
+desktop environments that support the NET WM specification.
+
+The font handling on X11 has undergone major changes. QFont no longer
+has a one-to-one relation with window system fonts. QFont is now a
+logical font that can load multiple window system fonts to simplify
+Unicode text display. This completely removes the burden of
+changing/setting fonts for a specific locale/language from the
+programmer. For end-users, any font can be used in any locale. For
+example, a user in Norway will be able to see Korean text without
+having to set their locale to Korean.
+
+Qt 3.0 also supports the new render extension recently added to
+XFree86. This adds support for anti aliased text and pixmaps with
+alpha channel (semi transparency) on the systems that support the
+rendering extension (at the moment XFree 4.0.3 and later).
+
+
+Printing
+--------
+
+Printing support has been enhanced on all platforms. The QPrinter
+class now supports setting a virtual resolution for the painting
+process. This makes WYSIWYG printing trivial, and also allows you to
+take full advantage of the high resolution of a printer when painting
+on it.
+
+The postscript driver built into Qt and used on Unix has been greatly
+enhanced. It supports the embedding of true/open type and type1 fonts
+into the document, and can correctly handle and display Unicode.
+Support for fonts built into the printer has been enhanced and Qt now
+knows about the most common printer fonts used for Asian languages.
+
+
+QHttp
+-----
+
+This class provides a simple interface for HTTP downloads and uploads.
+
+
+Compatibility with the Standard Template Library (STL)
+------------------------------------------------------
+
+Support for the C++ Standard Template Library has been added to the Qt
+Template Library (QTL). The QTL classes now contain appropriate copy
+constructors and typedefs so that they can be freely mixed with other
+STL containers and algorithms. In addition, new member functions have
+been added to QTL template classes which correspond to STL-style
+naming conventions (e.g., push_back()).
+
+
+Qt Designer
+========================================
+
+Qt Designer was a pure dialog editor in Qt 2.2 but has now been
+extended to provide the full functionality of a GUI design tool.
+
+This includes the ability to lay out main windows with menus and
+toolbars. Actions can be edited within Qt Designer and then plugged
+into toolbars and menu bars via drag and drop. Splitters can now be
+used in a way similar to layouts to group widgets horizontally or
+vertically.
+
+In Qt 2.2, many of the dialogs created by Qt Designer had to be
+subclassed to implement functionality beyond the predefined signal and
+slot connections. Whilst the subclassing approach is still fully supported,
+Qt Designer now offers an alternative: a plugin for editing
+slots. The editor offers features such as syntax highlighting,
+completion, parentheses matching and incremental search.
+
+The functionality of Qt Designer can now be extended via plugins.
+Using Qt Designer's interface or by implementing one of the provided
+interfaces in a plugin, a two way communication between plugin and Qt
+Designer can be established. This functionality is used to implement
+plugins for custom widgets, so that they can be used as real widgets
+inside the designer.
+
+Basic support for project management has been added. This allows you
+to read and edit *.pro files, add and remove files to/from the project
+and do some global operations on the project. You can now open the
+project file and have one-click access to all the *.ui forms in the
+project.
+
+In addition to generating code via uic, Qt Designer now supports the
+dynamic creation of widgets directly from XML user interface
+description files (*.ui files) at runtime. This eliminates the need of
+recompiling your application when the GUI changes, and could be used
+to enable your customers to do their own customizations. Technically,
+the feature is provided by a new class, QWidgetFactory in the
+QResource library.
+
+
+Qt Linguist
+========================================
+
+Qt Linguist is a GUI utility to support translating the user-visible
+text in applications written with Qt. It comes with two command-line
+tools: lupdate and lrelease.
+
+Translation of a Qt application is a three-step process:
+
+ 1) Run lupdate to extract user-visible text from the C++ source
+ code of the Qt application, resulting in a translation source file
+ (a *.ts file).
+ 2) Provide translations for the source texts in the *.ts file using
+ Qt Linguist.
+ 3) Run lrelease to obtain a light-weight message file (a *.qm file)
+ from the *.ts file, which provides very fast lookup for released
+ applications.
+
+Qt Linguist is a tool suitable for use by translators. Each
+user-visible (source) text is characterized by the text itself, a
+context (usually the name of the C++ class containing the text), and
+an optional comment to help the translator. The C++ class name will
+usually be the name of the relevant dialog, and the comment will often
+contain instructions that describe how to navigate to the relevant
+dialog.
+
+You can create phrase books for Qt Linguist to provide common
+translations to help ensure consistency and to speed up the
+translation process. Whenever a translator navigates to a new text to
+translate, Qt Linguist uses an intelligent algorithm to provide a list
+of possible translations: the list is composed of relevant text from
+any open phrase books and also from identical or similar text that has
+already been translated.
+
+Once a translation is complete it can be marked as "done"; such
+translations are included in the *.qm file. Text that has not been
+"done" is included in the *.qm file in its original form. Although Qt
+Linguist is a GUI application with dock windows and mouse control,
+toolbars, etc., it has a full set of keyboard shortcuts to make
+translation as fast and efficient as possible.
+
+When the Qt application that you're developing evolves (e.g. from
+version 1.0 to version 1.1), the utility lupdate merges the source
+texts from the new version with the previous translation source file,
+reusing existing translations. In some typical cases, lupdate may
+suggest translations. These translations are marked as unfinished, so
+you can easily find and check them.
+
+
+Qt Assistant
+========================================
+
+Due to the positive feedback we received about the help system built
+into Qt Designer, we decided to offer this part as a separate
+application called Qt Assistant. Qt Assistant can be used to browse
+the Qt class documentation as well as the manuals for Qt Designer and
+Qt Linguist. It offers index searching, a contents overview, bookmarks
+history and incremental search. Qt Assistant is used by both Qt
+Designer and Qt Linguist for browsing their help documentation.
+
+
+QMake
+========================================
+
+To ease portability we now provide the qmake utility to replace tmake.
+QMake is a C++ version of tmake which offers additional functionallity
+that is difficult to reproduce in tmake. Trolltech uses qmake in its
+build system for Qt and related products and we have released it as
+free software.
+
+
+Qt Functions
+========================================
+
+QAction
+-------
+
+All new functions:
+ void addedTo( QWidget *actionWidget, QWidget *container );
+ void addedTo( int index, QPopupMenu *menu );
+
+QActionGroup
+------------
+
+New mode "uses drop down", where members are shown in a separate
+subwidget such as a combobox or a submenu (enable with
+setUsesDropDown(TRUE) )
+
+All new functions:
+ void add(QAction*);
+ void addSeparator();
+ void addedTo( QWidget *actionWidget, QWidget *container, QAction *a );
+ void addedTo( int index, QPopupMenu *menu, QAction *a );
+ void setUsesDropDown( bool enable );
+ bool usesDropDown() const;
+
+
+QApplication
+------------
+
+Added the setStyle(const QString&) overload that takes the name of the
+style as its argument. This loads a style plugin via a QStyleFactory.
+
+desktop() now returns a QDesktopWidget that provides access to
+multi-head information. Prior to 3.0, it returned a normal QWidget.
+
+New functions to define the library search path for plugins
+(setLibraryPaths, ...).
+
+New functions to define reverse layout for bidirectional languages
+(setReverseLayout, ...).
+
+All new functions:
+ bool hasPendingEvents()
+
+ void setLibraryPaths(const QStringList &);
+ QStringList libraryPaths();
+ void addLibraryPath(const QString &);
+ void removeLibraryPath(const QString &);
+
+ void setReverseLayout( bool b );
+ bool reverseLayout();
+ int horizontalAlignment( int align );
+
+
+
+QClipboard
+----------
+
+On systems that support it, for example X11, QClipboard now
+differentiates between the primary selection and the data in the clipboard.
+
+All new functions:
+ bool supportsSelection() const;
+ bool ownsClipboard() const;
+ void setSelectionMode(bool enable);
+ bool selectionModeEnabled() const;
+New signals:
+ void selectionChanged()
+
+
+
+QCursor
+-------
+
+Now inherits Qt namespace. Enum values like ArrowCursor,
+UpArrowCursor, CrossCursor etc. are now part of that namespace.
+
+
+QDataStream
+-----------
+
+Added missing operators for Q_LONG and Q_ULONG
+
+
+QDateTime / QDate / QTime
+-------------------------
+
+More sophisticated toString() function that takes a DateFormat, where
+DateFormat can be either TextDate (the default), ISODate (ISO 8601) or
+LocalDate (locale dependent).
+
+All new functions:
+ QDate addMonths( int months ) const;
+ QDate addYears( int years ) const;
+ QDate fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
+ static QString shortMonthName( int month );
+ static QString longMonthName( int month );
+ static QString shortDayName( int weekday );
+ static QString longDayName( int weekday );
+ static void setShortMonthNames( const QStringList& names );
+ static void setLongMonthNames( const QStringList& names );
+ static void setShortDayNames( const QStringList& names );
+ static void setLongDayNames( const QStringList& names );
+
+QDialog
+-------
+
+Merged with QSemiModal. Calling show() on a modal dialog will return
+immediately, not enter a local event loop. Showing a modal dialog in
+its own event loop is achieved using exec().
+
+exec() is now a public slot.
+
+Usability: For widgets supporting What's This help, QDialog
+automatically offers a context menu containing a "What's This?" entry.
+
+
+QEvent
+------
+
+Mouse events are now propagated up to the toplevel widget if no widget
+accepts them and no event filter filters them out. In previous Qt
+versions, only key events were propagated.
+
+All events carry a flag 'spontaneous' to determine whether the even
+came from the outside or was generated by code within the
+applications. Previously, only show and hide events had this flag.
+
+Enter/Leave event generation has been fixed. Previously, a widget
+received a leave event when the mouse pointer entered one of its
+children. This was both unnatural and contradictive to the
+documentation.
+
+QWheelevent now carries an orientation to differentiate between
+horizontal and vertical wheels.
+
+QFocusEvent: new reason 'Backtab' (previously only 'Tab' was
+available). This makes it possible to discover from what direction on
+the tab-focus chain the widget was entered.
+
+New events: QContextMenuEvent, QIMEvent
+
+
+QFile
+-----
+
+Ported from int to Q_LONG to prepare for large file sizes on 64 bit
+systems.
+
+Filter handling made more flexible.
+
+
+QFileDialog
+-----------
+
+All new Functions:
+ void setSelectedFilter( const QString& );
+ void setSelectedFilter( int );
+New signals:
+ void filesSelected( const QStringList& );
+ void filterSelected( const QString& );
+
+If you try to specify an invalid file when using getOpenFileName(s), an error message
+will appear and the file will not be accepted. In 2.x, this function behaved differently
+because users were using getOpenFileName(s) as a Save File Dialog; you should use
+getSaveFileName() when you require a Save File Dialog.
+
+
+QCanvas Module
+--------------
+
+ New classes:
+ QCanvasSpline - a multi-bezier spline
+
+ QCanvasItemList
+ void update();
+
+ QCanvas:
+ QRect rect() const;
+ void setUnchanged( const QRect& area );
+ void drawArea(const QRect&, QPainter* p, bool double_buffer);
+ void drawViewArea( QCanvasView* view, QPainter* p, const QRect& r, bool dbuf );
+ QRect changeBounds(const QRect& inarea);
+
+ QCanvasView:
+ const QWMatrix &worldMatrix() const;
+ const QWMatrix &inverseWorldMatrix() const;
+ void setWorldMatrix( const QWMatrix & );
+ QCanvasSprite:
+ int leftEdge() const;
+ int topEdge() const;
+ int rightEdge() const;
+ int bottomEdge() const;
+ int leftEdge(int nx) const;
+ int topEdge(int ny) const;
+ int rightEdge(int nx) const;
+ int bottomEdge(int ny) const;
+
+QCanvasSprite can now be set to animate its frames without the need to
+subclass.
+
+
+QFont, QFontDatabase, QFontInfo, QFontMetrics
+---------------------------------------------
+
+The QFont::CharSet enum has been removed and replaced with the
+QFont::Script enum. With this change, a QFont is not associated with a
+specific character set. Instead, QFont uses Unicode Scripts for
+loading fonts. On platforms where most fonts do not use the Unicode
+encoding (currently only X11), multiple locale and character-set
+dependent fonts can be loaded for the individual Unicode Scripts.
+
+Another new feature of QFont is a much more flexible substitution
+mechanism. Each family can have a list of appropriate substitutes. The
+font substitution feature allows you to specify a list of substitute
+fonts. Substitute fonts are used when a font cannot be loaded, or if
+the specified font doesn't have a particular character (X11 only).
+
+For example (on X11), you select the font Lucida, which doesn't have
+Korean characters. For Korean text, you want to use the Mincho font
+family. By adding Mincho to the list, any Korean characters not found
+in Lucida will be used from Mincho. Because the font substitutions are
+lists, you can also select multiple families, such as Song Ti (for use
+with Chinese text).
+
+QFontInfo and QFontMetrics had small API changes related to the
+disappearance of QFont::CharSet. In terms of functionality, the
+behavior of these classes is unchanged.
+
+QFontDatabase had several API cleanups related to the disappearance of
+QFont::CharSet. Most QFontDatabase member functions take one less
+argument, yet compatibility functions still exist to keep old source
+code working.
+
+Family and style names returned from QFontDatabase are now processed
+and formatted in a way that is suitable for display to users. Family
+and foundry names are capitalized and foundry names are enclosed in
+square brackets after the family name. For example, the Helvetica
+font family might have 3 different foundries: Adobe, Cronyx and
+Phaisarn. In 2.x, QFontDatabase listed them like this:
+
+ adobe-helvetica
+ cronyx-helvetica
+ phaisarn-helvetica
+
+Starting with 3.0, QFontDatabase lists them like this:
+
+ Helvetica [Adobe]
+ Helvetica [Cronyx]
+ Helvetica [Phaisarn]
+
+
+QFrame
+------
+
+Two new frame shapes for more sophisticated style features:
+MenuBarPanel and ToolBarPanel.
+
+
+QGrid
+-----
+
+The member type
+
+ enum Direction { Horizontal, Vertical };
+
+has been eliminated, as it is redundant: use Qt::Orientation instead.
+Old code referring to QGrid::Horizontal or QGrid::Vertical will still
+work, as QGrid counts Qt among its ancestors.
+
+
+QGroupBox
+---------
+
+More functionality of the built-in layout is exposed:
+
+ int insideMargin() const;
+ int insideSpacing() const;
+ void setInsideMargin( int m );
+ void setInsideSpacing( int s );
+
+
+QHeader
+-------
+
+New property: bool stretching
+
+New functions:
+ bool isStretchEnabled( int section );
+ void setStretchEnabled( bool b, int section );
+
+
+QIconSet
+--------
+
+In addition to the mode - which can be either Normal, Disabled or
+Active - QIconSet now supports different pixmaps for a state, i.e. On
+or Off. The functions pixmap() and setPixmap() have been extended
+accordingly.
+
+The default constructor no longer initializes the iconset to
+contain a null pixmap. QIconSet::isNull() returns TRUE for un-
+initialized iconsets, and pixmap() still returns a null pixmap for
+pixmaps that couldn't be generated.
+
+
+QIconView
+---------
+
+Extended findItem() to support ComparisonFlags. Support for
+soft-hyphens when doing word wrap.
+
+New signal:
+ contextMenuRequested( QIconViewItem*, const QPoint& pos);
+
+
+QIconViewItem
+-------------
+
+Added support for explicit rtti.
+
+New function:
+ int rtti() const;
+
+
+
+QListBox
+--------
+
+Extended findItem() to support ComparisonFlags.
+
+New signal:
+ void contextMenu( QListBoxItem *, const QPoint & );
+
+
+QListBoxItem
+------------
+
+Added support for explicit rtti.
+
+New function:
+ int rtti() const;
+
+
+
+QListView
+---------
+
+It was never really hard to implement drag and drop with QListView,
+but since many applications demand this functionality today, we
+decided to add it to the listview itself.
+
+In addition, in-place editing and per-item tooltips have been added.
+Extended findItem() to support ComparisonFlags
+
+New properties:
+ bool showToolTips
+ ResizeMode resizeMode
+
+New signals:
+ contextMenuRequested( QIconViewItem*, const QPoint& pos);
+ void dropped( QDropEvent *e );
+ void itemRenamed( QListViewItem *item, int col, const QString & );
+ void itemRenamed( QListViewItem *item, int col );
+
+New functions:
+ void setResizeMode( ResizeMode m );
+ ResizeMode resizeMode() const;
+ QDragObject *dragObject();
+ void startDrag();
+ void startRename();
+
+
+QListViewItem
+-------------
+
+Added support for explicit rtti.
+
+New functions:
+ void setDragEnabled( bool allow );
+ void setDropEnabled( bool allow );
+ bool dragEnabled() const;
+ bool dropEnabled() const;
+ bool acceptDrop( const QMimeSource *mime ) const;
+ void setVisible( bool b );
+ bool isVisible() const;
+ void setRenameEnabled( int col, bool b );
+ bool renameEnabled( int col ) const;
+ void startRename( int col );
+ void setEnabled( bool b );
+ bool isEnabled() const;
+ int rtti() const;
+
+ void dropped( QDropEvent *e );
+ void dragEntered();
+ void dragLeft();
+ void okRename( int col );
+ void cancelRename( int col );
+
+
+QLabel
+------
+
+In addition to text, rich text, pixmaps and movies, QLabel can now
+display QPicture vector graphics.
+
+New functions:
+
+ QPicture *picture() const;
+ void setPicture( const QPicture & );
+
+
+QLineEdit
+---------
+
+New property: bool dragEnabled
+
+New signal:
+ contextMenuRequested( QIconViewItem*, const QPoint& pos);
+
+New functions:
+ void cursorForward( bool mark, int steps = 1 );
+ void cursorBackward( bool mark, int steps = 1 );
+ void cursorWordForward( bool mark );
+ void cursorWordBackward( bool mark );
+ bool dragEnabled();
+ void setDragEnabled( bool b );
+
+
+QMainWindow
+-----------
+
+Added a dock window architecture. Previous versions of QMainWindow
+could only deal with toolbars, now they handle generalized dock
+windows. QToolBar inherits QDockWindow.
+
+
+New property:
+ bool dockWindowsMovable;
+
+New signals:
+ void dockWindowPositionChanged( QDockWindow * );
+
+New functions:
+ void setDockEnabled( Dock dock, bool enable );
+ bool isDockEnabled( Dock dock ) const;
+ bool isDockEnabled( QDockArea *area ) const;
+ void setDockEnabled( QDockWindow *tb, Dock dock, bool enable );
+ bool isDockEnabled( QDockWindow *tb, Dock dock ) const;
+ bool isDockEnabled( QDockWindow *tb, QDockArea *area ) const;
+
+ void addDockWindow( QDockWindow *, Dock = Top, bool newLine = FALSE );
+ void addDockWindow( QDockWindow *, const QString &label, Dock = Top, bool newLine = FALSE );
+ void moveDockWindow( QDockWindow *, Dock = Top );
+ void moveDockWindow( QDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
+ void removeDockWindow( QDockWindow * );
+
+ QDockArea *dockingArea( const QPoint &p );
+ QDockArea *leftDock() const;
+ QDockArea *rightDock() const;
+ QDockArea *topDock() const;
+ QDockArea *bottomDock() const;
+
+ bool isCustomizable() const;
+ bool appropriate( QDockWindow *dw ) const;
+ QPopupMenu *createDockWindowMenu( DockWindows dockWindows = AllDockWindows ) const;
+
+ bool showDockMenu( const QPoint &globalPos );
+
+
+QMetaObject
+-----------
+
+###TODO
+
+
+QMimeSourceFactory
+------------------
+
+New static functions:
+ QMimeSourceFactory* takeDefaultFactory();
+ static void addFactory( QMimeSourceFactory *f );
+
+
+QNetworkProtocol
+----------------
+
+Spelling fix in Error::ErrListChildren enum.
+
+
+QRegExp
+-------
+
+QRegExp now has a more complete regular expression engine similar to
+Perl's, with full Unicode and backreference support.
+
+New functions:
+ bool minimal() const;
+ void setMinimal( bool minimal );
+ bool exactMatch( const QString& str );
+ bool exactMatch( const QString& str ) const;
+ int search( const QString& str, int start = 0 );
+ int search( const QString& str, int start = 0 ) const;
+ int searchRev( const QString& str, int start = -1 );
+ int searchRev( const QString& str, int start = -1 ) const;
+ int matchedLength();
+ QStringList capturedTexts();
+ QString cap( int nth = 0 );
+ int pos( int nth = 0 );
+
+
+QSessionManager
+---------------
+
+Renamed the misnamed setProperty() overloads to setManagerProperty()
+to resolve the conflict with the now virtual QObject::setProperty().
+
+
+QString
+-------
+
+New functions:
+ bool endsWith( const QString & );
+ int similarityWith( const QString & );
+
+### TODO
+
+QStyle
+------
+
+### TODO
+
+QTabBar
+-------
+
+The extended QTabWidget support in Qt Designer made two more
+functions handy to have:
+ QTab * tabAt( int ) const;
+ int indexOf( int ) const;
+
+
+
+QToolBar
+--------
+
+Inherits QDockWindow now, previously only QWidget.
+
+
+QToolButton
+-----------
+
+New property:
+ QIconSet iconSet
+
+New functions:
+ QIconSet iconSet() const;
+ virtual void setIconSet( const QIconSet & );
+
+QWidget
+-------
+
+New functions:
+
+ const QColor & eraseColor() const;
+ virtual void setEraseColor( const QColor & );
+ const QPixmap * erasePixmap() const;
+ virtual void setErasePixmap( const QPixmap & );
+
+
+
+QWizard
+-------
+
+New property: QString titleFont
+
+New functions:
+ QFont titleFont() const;
+ void setTitleFont( const QFont & );
+ int indexOf( QWidget* ) const;
+
+
+QWMatrix
+--------
+
+New function:
+ bool isIdentity() const;
+
+
+QGL Module
+----------
+
+QGLWidget
+New functions:
+ QGLFormat requestedFormat() const;
+ QImage grabFrameBuffer( bool withAlpha = FALSE );
+
+
+QWorkspace Module
+-----------------
+
+A new property scrollBarsEnabled makes it possible to add on-demand
+scrollbars to the workspace. We define this property in Qt Designer to
+make designing forms larger than the available space on the desktop
+more comfortable.
+
+New property:
+ bool scrollBarsEnabled
+
+
+QXML Module
+-----------
+Many new functions have been added:
+ QDomImplementation
+ QDomDocumentType createDocumentType( const QString& qName, const QString& publicId, const QString& systemId );
+ QDomDocument createDocument( const QString& nsURI, const QString& qName, const QDomDocumentType& doctype );
+ QDomNode
+ QDomNode insertBefore( const QDomNode& newChild, const QDomNode& refChild );
+ QDomNode insertAfter( const QDomNode& newChild, const QDomNode& refChild );
+ QDomNode replaceChild( const QDomNode& newChild, const QDomNode& oldChild );
+ QDomNode removeChild( const QDomNode& oldChild );
+ QDomNode appendChild( const QDomNode& newChild );
+ bool hasChildNodes() const;
+ QDomNode cloneNode( bool deep = TRUE ) const;
+ void normalize();
+ bool isSupported( const QString& feature, const QString& version ) const;
+ QString namespaceURI() const;
+ QString localName() const;
+ bool hasAttributes() const;
+ QDomDocument
+ bool setContent( const QCString& text, bool namespaceProcessing=FALSE );
+ bool setContent( const QByteArray& text, bool namespaceProcessing=FALSE );
+ bool setContent( const QString& text, bool namespaceProcessing=FALSE );
+ bool setContent( QIODevice* dev, bool namespaceProcessing=FALSE );
+ QDomNamedNodeMap
+ QDomNode namedItemNS( const QString& nsURI, const QString& localName ) const;
+ QDomNode setNamedItemNS( const QDomNode& newNode );
+ QDomNode removeNamedItemNS( const QString& nsURI, const QString& localName );
+
+ QDomElement
+ QString attributeNS( const QString nsURI, const QString& localName, const QString& defValue ) const;
+ void setAttributeNS( const QString nsURI, const QString& qName, const QString& value );
+ void setAttributeNS( const QString nsURI, const QString& qName, int value );
+ void setAttributeNS( const QString nsURI, const QString& qName, uint value );
+ void setAttributeNS( const QString nsURI, const QString& qName, double value );
+ void removeAttributeNS( const QString& nsURI, const QString& localName );
+ QDomAttr attributeNodeNS( const QString& nsURI, const QString& localName );
+ QDomAttr setAttributeNodeNS( const QDomAttr& newAttr );
+ QDomNodeList elementsByTagNameNS( const QString& nsURI, const QString& localName ) const;
+ bool hasAttributeNS( const QString& nsURI, const QString& localName ) const;
+
+
+ QXmlAttributes
+ void clear();
+ void append( const QString &qName, const QString &uri, const QString &localPart, const QString &value );
+
+ QXmlInputSource:
+ void setData( const QByteArray& dat );
+ void fetchData();
+ QString data();
+ QChar next();
+ void reset();
+ QString fromRawData( const QByteArray &data, bool beginning = FALSE );
+
+ QXmlSimpleReader:
+ bool parse( const QXmlInputSource& input, bool incremental );
+ bool parseContinue();
+
+ QXmlEntityResolver:
+ bool startEntity( const QString& name );
+ bool endEntity( const QString& name );
+
+
+
+New classes
+-----------
+
+QAquaStyle (only on MacOS X)
+QCleanupHandler
+QComponentFactory
+QComponentFactoryInterface
+QComponentServerInterface
+QContextMenuEvent
+QDesktopWidget
+QDockArea
+QDockWindow
+QErrorMessage
+QFeatureListInterface
+QHttp [network]
+QInterfaceListInterface
+QInterfacePtr
+QIMEvent
+QLibrary
+QLibraryInterface
+QStyleFactory
+QStyleInterface
+QTextCodecInterface
+QUnknownInterface
+QUuid
+QRegExpValidator
+QTextEdit
+
+
+Renamed Classes
+---------------
+
+QArray has been renamed QMemArray
+QCollection has been renamed QPtrCollection
+QList has been renamed QPtrList
+QListIterator has been renamed QPtrListIterator
+QQueue has been renamed QPtrQueue
+QStack has been renamed QPtrStack
+QVector has been renamed QPtrVector
+
+The include file names have changed accordingly (e.g., <qmemarray.h>).
+
+
+New Modules
+-----------
+
+SQL
+ QDataBrowser
+ QDataTable
+ QDataView
+ QDateTimeEdit
+ QEditFactory
+
+
+Obsolete classes
+----------------
+
+ QSemiModal, use QDialog instead.
+ QMultiLineEdit, use QTextEdit instead.
+ QTableView, use QScrollView or QTable instead.
+ QAsyncIO, QDataSink, QDataSource, QDataPump and QIODeviceSource
+
+
+Obsolete functions
+------------------
+ QActionGroup::insert( QAction * ), use QActionGroup::add( QAction* ) instead.
+ QApplication::setWinStyleHighlightColor( const QColor &c ), use setPalette() instead
+ QApplication::winStyleHighlightColor(), use palette() instead
+ QDir::encodedEntryList( int filterSpec, int sortSpec ), use QDir::entryList() instead
+ QDir::encodedEntryList( const QString &nameFilter, int filterSpec, int sortSpec ), use QDir::entryList() instead
+ QMainWindow::addToolBar( QDockWindow *, Dock = Top, bool newLine = FALSE );
+ QMainWindow::addToolBar( QDockWindow *, const QString &label, Dock = Top, bool newLine = FALSE );
+ QMainWindow::moveToolBar( QDockWindow *, Dock = Top );
+ QMainWindow::moveToolBar( QDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
+ QMainWindow::removeToolBar( QDockWindow * );
+ QMainWindow::toolBarsMovable() const;
+ QMainWindow::toolBars( Dock dock ) const;
+ QMainWindow::lineUpToolBars( bool keepNewLines = FALSE );
+ QRegExp::match( const QString& str, int index = 0, int *len = 0,
+ bool indexIsStart = TRUE );
+ QToolButton::setOnIconSet( const QIconSet & )
+ QToolButton::setOffIconSet( const QIconSet & )
+ QToolButton::onIconSet() const
+ QToolButton::offIconSet() const
+ QToolButton::setIconSet( const QIconSet & set, bool on )
+ QToolButton::iconSet( bool on ) const
+ QXmlInputSource::QXmlInputSource( QFile& file ), use QXmlInputSource( QIODevice *dev ) instead.
+ QXmlInputSource::QXmlInputSource( QTextStream& stream ), use QXmlInputSource( QIODevice *dev ) instead.
+
+Removed functions:
+ QWidget::setFontPropagation
+ QWidget::setPalettePropagation
+ QMenuBar::setActItem
+ QMenuBar::setWindowsAltMode
+ QCheckListItem::paintBranches
+ QString::visual
+ QString::basicDirection
+ QRegExp::find( const QString& str, int index ) const; - has been renamed QRegExp::search()
+ QFont::charSet() const, not needed anymore
+ QFont::setCharSet( QFont::CharSet ), not needed anymore
+ QPushButton::upButton(), not relevant anymore
+ QPushButton::downButton(), not relevant anymore
+ QSpinBox::upButton(), not relevant anymore
+ QSpinBox::downButton(), not relevant anymore
+
+
+Removed preprocessor directives
+-------------------------------
+
+ qcstring.h no longer contains the following defines:
+
+ #define strlen qstrlen
+ #define strcpy qstrcpy
+ #define strcmp qstrcmp
+ #define strncmp qstrncmp
+ #define stricmp qstricmp
+ #define strnicmp qstrnicmp
+
+ These directives were meant to automagically replace calls to the
+ above listed standard C functions with the equivalent Qt wrappers.
+ The latter pre-check the input parameters for null pointers as those
+ might cause crashes on some platforms.
+
+ Although convenient, this trick turned out to sometimes conflict with
+ third-party code, or, simply be nullified by standard system and
+ library headers depending on version and include order.
+
+ The name of some debugging macro variables has been changed.
+
+ DEBUG becomes QT_DEBUG
+ NO_DEBUG becomes QT_NO_DEBUG
+ NO_CHECK becomes QT_NO_CHECK
+ CHECK_STATE becomes QT_CHECK_STATE
+ CHECK_RANGE becomes QT_CHECK_RANGE
+ CHECK_NULL becomes QT_CHECK_NULL
+ CHECK_MATH becomes QT_CHECK_MATH
+
+ The name of some other debugging macro functions has also been changed
+ but source compatibility should not be affected if the macro variable
+ QT_CLEAN_NAMESPACE is not defined:
+
+ ASSERT becomes Q_ASSERT
+ CHECK_PTR becomes Q_CHECK_PTR
+
+ For the record these undocumented macro variables that are not part of
+ the API have been changed:
+
+ _OS_*_ becomes Q_OS_*
+ _WS_*_ becomes Q_WS_*
+ _CC_*_ becomes Q_CC_*
+
+
+[Qt 3.0]
+
diff --git a/dist/changes-3.0.0-beta2 b/dist/changes-3.0.0-beta2
new file mode 100644
index 0000000..0d55b12
--- /dev/null
+++ b/dist/changes-3.0.0-beta2
@@ -0,0 +1,363 @@
+Qt 3.0 Beta2 is not binary compatible with Beta1, this means that any
+programs linked with Beta1 must be recompiled.
+
+Below you'll find a description of general changes in the Qt Library
+and Qt Designer followed by a detailed list of changes in the
+programming API.
+
+
+The Qt Library
+========================================
+
+Wacom Tablet Support
+--------------------
+
+Support for Wacom brand tablets has been introduced on Irix and
+Windows. These devices generate a QTabletEvent that can be handled by
+QWidget::tabletEvent(). The QTabletEvent holds information about
+pressure, X and Y tilt, and which device is being used (e.g. stylus or
+eraser). Note: at present, there are known issues with the Windows
+version.
+
+Documentation
+-------------
+
+Overall enhancements including fixed typos and the addition of several
+images and code examples.
+
+QStyle (and derived classes)
+----------------------------
+
+The style API has been completely rewritten in Qt 3.0. The main reason
+for doing this was because it was getting inconsistent, hard to
+maintain and extend. Most of the old 2.x functions have been replaced
+by a small set of more general functions. The new API is:
+
+ - much more consistent
+ - less work have to be done to create custom styles
+ - easier to extend and maintain binary compatibility
+
+The old API relied upon a host of virtual functions that were
+re-implemented in the different styles. These functions were used to
+draw parts of, or entire widgets. The new API uses a small set of more
+general functions. Enumerated values are passed as parameters to these
+functions to specify which parts of a control or widget is to be drawn
+(e.g drawPrimitive( PE_ArrowUp, ...)).
+
+To create custom styles with the new API, simply subclass from the
+preferred base style and re-implement the function that draws the part
+of the widget you want to change. If you for example want to change
+the look of the arrows that are used in QWindowsStyle, subclass from
+it and re-implement the drawPrimitive() function. Your drawPrimitive()
+function may look something like this:
+
+void QMyStyle::drawPrimitive( PrimitiveElement pe, ... )
+{
+ switch( pe ) {
+ case PE_ArrowUp:
+ // draw up arrow
+ break;
+ case PE_ArrowDown:
+ // draw down arrow
+ break;
+ default:
+ // let the base class handle the rest of the drawing
+ QWindowsStyle::drawPrimitive( ... );
+ break;
+ }
+}
+
+For more information about the new style API, please read the QStyle
+documentation.
+
+
+Qt Designer
+========================================
+
+ - Improved indentation algorithm for the code editor.
+ - Allow multiple code editors to be open. This makes copy and paste
+ much easier.
+
+
+Qt Functions
+========================================
+
+QCanvas
+-------
+
+ - QCanvas does not react on windowActivationChange() anymore.
+ - 64 bit cleanup.
+
+QChar
+-----
+
+ - The Unicode character is stored host ordered now. Main advantage is
+ that you can directly cast a QChar array to an array of unsigned shorts.
+
+QCom
+----
+
+ - Introduced QS_OK, QS_FALSE, QE_NOINTERFACE, QE_INVALIDARG and
+ QE_NOIMPL as possible QRESULT return values.
+
+QDate, QTime and QDateTime
+--------------------------
+
+ - New function for outputting free form strings and new DateFormat
+ enum Qt::LocalDate.
+
+New functions:
+ QString toString( const QString& format );
+
+QDir
+----
+
+ - entryInfoList() returns 0 for non-existing directories on Windows
+ as the documentation claims and the Unix version already does.
+ - On Windows, QDir tries a more failsafe way to determine the home
+ directory.
+
+QDom
+----
+
+ - QDomNode::hasChildNodes() now works as documented.
+ - QDomDocument::toString() includes now namespaces in its output.
+ - QDomDocument::QDomDocument() constructor now allows adding children
+ to the document.
+
+QFileDialog
+-----------
+
+ - Various fixes in file type filter and handling of file names and
+ directories.
+
+QEvent
+------
+
+ - New event type DeferredDelete. See QObject changes below.
+
+QGL
+---
+
+ - Fix for Irix in respect of installing colormaps.
+ - Swapped arguments of QGLColormap::setEntries() in order to be able
+ to use a meaningful default argument.
+
+New class:
+ QGLColormap - class for manipulating colormaps in GL index mode.
+
+QGridView
+---------
+
+A new class that provides an abstract base for fixed-size grids.
+
+QIconSet
+--------
+
+New function:
+ void clearGenerated();
+
+QImage
+------
+
+ - Handlers for image formats can be dynamically loaded as a plug-in by
+ using the QImageFormatInterface.
+
+QLabel
+------
+
+ - setIndent() behaves like documented.
+
+QLineEdit
+---------
+
+New function:
+ int characterAt( int xpos, QChar *chr ) const;
+
+QLibrary
+--------
+
+Enabled plug-in loading with static Qt library (Windows).
+
+QMovie
+------
+
+ - Does pixmap caching now. Reduces load e.g. on the X Server in the
+ case of animated gifs.
+
+QObject
+-------
+
+ - Added a deferredDelete() function that will cause the object to
+ delete itself once the event loop is entered again.
+
+ - A second type of destroyed signal - one that passes a pointer to
+ the destroyed object as a parameter - will be emitted in QObject's
+ destructor.
+
+New signal:
+ void destroyed( QObject* obj );
+
+New slot:
+ void deferredDelete();
+
+QPainter
+--------
+
+ - So far clipping had always been done in the device coordinate
+ system. The newly introduced ClipMode allows clipping regions to be
+ set via setClipRect() and setClipRegion() in painter coordinates.
+
+New enum:
+ enum ClipMode { ClipDevice, ClipPainter };
+
+Extended functions:
+ QRegion clipRegion( ClipMode = ClipDevice ) const;
+ void setClipRect( const QRect &, ClipMode = ClipDevice )
+ void setClipRect( int x, int y, int w, int h, ClipMode = ClipDevice );
+ void setClipRegion( const QRegion &, ClipMode = ClipDevice );
+
+QPrintDialog
+------------
+
+ - Allow overriding the default print dialog. This way it's possible
+ to better cope with the variety of existing print systems (API not
+ finalized, yet).
+ - The dialog reads current QPrinter on every invocation now.
+
+New functions:
+ static void setGlobalPrintDialog( QPrintDialog * );
+ virtual bool setupPrinters ( QListView *printers );
+
+QPrinter
+--------
+
+ - X11 version only: Introduced Qt settings switch 'embedFonts' that
+ allows disabling font embedding to reduce size of PostScript output.
+
+QProcess
+--------
+
+ - Added function to retrieve the pid (Unix) or PROCESS_INFORMATION
+ (Windows) from a running process.
+ - Extra parameter for environment settings in start() and launch()
+ functions.
+
+New/extended functions:
+ PID processIdentifier();
+ virtual bool start( QStringList *env=0 );
+ virtual bool launch( const QString& buf, QStringList *env=0 );
+ virtual bool launch( const QByteArray& buf, QStringList *env=0 );
+
+New signal:
+ void launchFinished();
+
+QServerSocket
+-------------
+
+ - Set the SO_REUSEADDR option so that the server can be restarted.
+
+QSocket
+-------
+
+ - Make deletion of QSocket instances safe if it is in response to a
+ signal emitted by the object itself.
+
+SocketDevice
+------------
+
+ - Optional boolean parameter to be able to distinguish between
+ timeout and connection closed by peer when waitForMore() returns.
+
+Extended functions:
+ int waitForMore( int msecs, bool *timeout=0 ) const;
+
+QStyleSheet
+-----------
+
+ - Added helper function that escapes HTML meta-characters.
+
+New function:
+ QString escape( const QString& plain);
+
+QSql
+----
+
+ - The source of the SQL driver plug-ins have been moved to
+ $QTDIR/plugins/src/sqldrivers/.
+ - The postgres driver checks the version number of the server. So there is
+ no need for different drivers: QPSQL6 no longer exists -- use QPSQL7
+ instead.
+ - Postgres driver supports now 3 PostgreSQL back ends: 6.x, 7.0.x and 7.1.x
+ - Better handling of errors coming from the database.
+ - SQL driver for Microsoft SQL Server and Sybase Adaptive Server (TDS).
+ - Added caching for forward-only cursors.
+ - Avoid crashes on the unloading of SQL plugins that occurred on some
+ platforms.
+ - QSqlResults can be forward only to improve performance
+ (QSqlResult::setForwardOnly()).
+ - QSqlDatabase passes the port number to the SQL driver.
+
+QTable
+------
+
+ - No longer calls processEvents() in columnWidthChanged() and
+ rowHeightChanged() in order to avoid any side effects.
+ - Ensure that mousePressEvent doesn't emit contextMenuRequested(),
+ unless it is called from the contextMenu event handler.
+ - For more useful subclassing the new functions listed below have
+ been added.
+
+New functions:
+ bool isEditing() const;
+ EditMode editMode() const;
+ int currEditRow() const;
+ int currEditCol() const;
+
+QTextCodec
+----------
+
+ - Fixes for characters in the 0x80..0xff range.
+
+QTextEdit
+---------
+
+ - The rich text engine has seen many internal improvements and
+ additions to the QTextEdit class.
+
+New functions:
+ virtual void scrollToBottom();
+ virtual void removeSelection( int selNum = 0 );
+ virtual bool getParagraphFormat(...);
+ virtual void insertParagraph( const QString &text, int para );
+ virtual void removeParagraph( int para );
+ virtual void insertAt( const QString &text, int para, int index );
+ QRect paragraphRect( int para ) const;
+ int paragraphAt( const QPoint &pos ) const;
+ int charAt( const QPoint &pos, int *para ) const;
+
+QUrlOperator
+------------
+
+ - More precise error messages.
+
+QWidget
+-------
+
+ - Added a read-only property containing the widget's background brush.
+
+New function:
+ virtual const QBrush& backgroundBrush() const;
+
+QWMatrix
+--------
+
+ - New functions for mapping of geometric elements via matrix
+ multiplication semantics.
+
+New functions:
+ QRect mapRect( const QRect & );
+ QPoint operator * (const QPoint & ) const;
+ QRegion operator * (const QRect & ) const;
+ QRegion operator * (const QRegion & ) const;
+ QPointArray operator * ( const QPointArray &a ) const;
diff --git a/dist/changes-3.0.0-beta3 b/dist/changes-3.0.0-beta3
new file mode 100644
index 0000000..cc49e6e
--- /dev/null
+++ b/dist/changes-3.0.0-beta3
@@ -0,0 +1,278 @@
+Qt 3.0 Beta3 is not binary compatible with Beta2, this means that any
+programs linked with Beta2 must be recompiled.
+
+Below you'll find a description of general changes in the Qt Library
+and Qt Designer followed by a detailed list of changes in the
+programming API.
+
+
+The Qt Library
+========================================
+
+Documentation
+-------------
+
+Overall enhancements include fixed typos, corrected grammar and
+spelling, and the addition of several images and code examples. Most
+classes now have useful detailed descriptions. Documentation accuracy
+and usability has been generally improved.
+
+Styles
+------
+
+In Qt 3.0.0 Beta2, only the Windows and Motif styles were implemented with
+the new style API. Now the missing styles (MotifPlus, Platinum, SGI and
+CDE) are included.
+
+MNG
+---
+
+Updated the libmng that is shipped with Qt to version 1.0.2.
+
+Wacom Tablet Support
+--------------------
+
+Fixes for Windows to solve the problem of creating a context for every
+widget and the problem of opening the dialog and losing the ability to use
+the tablet afterwards.
+
+
+Qt Designer
+========================================
+
+ - Added the ability to sort the property editor either by category
+ (default and old behaviour) or alphabetically.
+
+ - Added the option "-nofwd" to uic which supresses the generation of
+ forward declarations for custom classes in the generated output.
+
+- The way how custom slots and editing these slots directly in the Qt
+ Designer is handled has been changed. Originally the code for these
+ slots was saved into the .ui XML file together with the user
+ interface description and the uic did put this code into the
+ generated source files.
+ Now, if code of custom slots is edited directly in the Qt Designer,
+ additionally to the <filename>.ui of a form, a <filename>.ui.h file
+ is created. The code is written into this source file now instead
+ of the .ui file.
+ This way the code of custom slots can be also easily edited outside
+ the Qt Designer without subclassing, and it is possible to edit it
+ both, in the Qt Designer and outside the Qt Designer without
+ conflicts, as this is a plain text C++ file.
+ Uic now automatically includes this source file into the generated
+ sources (if it exists) and, in this case, does not create empty
+ stubs for the custom slots in the generated sources anymore. So
+ this code file has not to be added to the project Makefile. If the
+ source file does not exist, uic falls back to the old behavior and
+ creates the empty stubs in the generated source.
+ If a user does not want to subclass to implement the custom slots,
+ but also does not want to edit the code of the custom slots in the
+ Qt Designer, it is possible to always create the <formname>.ui.h
+ for a form (even if it was not edited in the Qt Designer) and edit
+ that file in a seperate editor. This feature can be configured in
+ the project settings dialog.
+ This way, the old approach of subclassing keeps working (and all
+ old .ui files keep working without any change). Also, for users of
+ the previous Qt 3.0 Beta versions, Qt Designer can still read the
+ .ui files which contain code. So also .ui files created with Qt 3.0
+ Beta versions of the Qt Designer keep working without any change.
+ Details about the possible concepts which can be used to add code
+ to a form created by the Qt Designer (subclassing and uic +
+ <filename>.ui.h) and related information about project management
+ can be found in the chapter about new features in Qt Designer 3.0
+ in the Qt Designer manual.
+
+
+Qt Functions
+========================================
+
+QApplication
+------------
+
+ - flush() no longer calls sendPostedEvents(), as this might be unsafe
+ under certain circumstances.
+
+QDataTable
+----------
+
+ - Now uses the new row selection mode of QTable.
+
+QDomDocument
+------------
+
+ - Fixed the toString() function to work properly with namespaces.
+ - In Qt 3.0.0 Beta2, there was a workaround for Microsoft's XML parser,
+ so that the toString() function did not output a doctype that consists
+ only of the name. This workaround is semantically wrong; it was
+ reverted.
+
+QDateEdit
+---------
+
+ - Fixed wrong default size policy and missing size hint.
+ - Improved focus and tab handling.
+
+QEffects
+--------
+
+ - Tooltips and popup menus scroll and fade again
+
+QTable
+------
+
+ - Fixed right mouse button handling.
+ - Implemented row selection modes. This implied adding the new enum values
+ SingleRow and MultiRow to the enum SelectionMode.
+ - Doubleclick clears selections completely now.
+ - Allow different focus styles, namely FollowStyle (draw it as the style
+ tells you) and SpreadSheet (draw it as it is done in common spreadsheet
+ programs).
+
+New functions:
+ virtual void setFocusStyle( FocusStyle fs );
+ FocusStyle focusStyle() const;
+ virtual QRect cellRect( int row, int col ) const;
+
+QTimeEdit
+---------
+
+ - Fixed wrong default size policy and missing size hint.
+ - Improved focus and tab handling.
+
+QTextEdit
+---------
+
+ - QTextCursor is an internal class, so the signal
+ cursorPositionChanged(QTextCursor*) is only of limited use. Added a
+ more useful signal in addition.
+
+ - Overrides accelerators for all shortcuts used to edit text.
+
+New signal:
+ void cursorPositionChanged( int para, int pos );
+
+QLineEdit
+---------
+
+ - Overrides accelerators for all shortcuts used to edit text.
+
+QLibrary
+--------
+
+ - Static overload for resolve as a convenience function.
+
+New function:
+ static void *resolve( const QString &filename, const char * );
+
+QListView
+---------
+
+ - A bug that was introduced in Qt 3.0.0 beta 2 made listviews with
+ lots of items very slow. This problem has been fixed.
+
+QProcess
+--------
+
+ - exitStatus() did not work for negative values on Unix. This is fixed
+ now.
+ - Fixed problems on Unixware.
+
+QRichtext
+---------
+
+ - Fixed searching backwards.
+ - Fixed some BIDI text-rendering problems.
+
+QSound
+------
+
+ - Simplified the API to allow easier extension.
+
+New functions:
+ bool isAvailable();
+ int loops() const;
+ int loopsRemaining() const;
+ void setLoops(int);
+ QString fileName() const;
+ bool isFinished() const;
+
+New slot:
+ void stop();
+
+Removed function:
+ bool available();
+
+QSpinBox
+--------
+
+ - Spin box arrows were not updated correctly when the widget was
+ disabled/enabled. This problem is fixed now.
+ - Improved handling of the case when a spinbox accepts a value: now it
+ also accepts it if the spinbox loses focus or is hidden.
+
+QSqlCursor
+----------
+
+ - Add functions to set the generated flag. This is used to avoid the
+ generation of malformed SQL statements.
+
+New functions:
+ void setGenerated( const QString& name, bool generated );
+ void setGenerated( int i, bool generated );
+
+QSqlDriver
+----------
+
+ - Add new function hasFeature( QSqlDriver::DriverFeature ) const which
+ allows you to query whether the driver supports features like SQL
+ transactions or Binary Large Object fields. The functions
+ hasQuerySizeSupport(), canEditBinaryFields() and hasTransactionSupport()
+ are therefore obsolete and have been removed.
+
+New function:
+ bool hasFeature( QSqlDriver::DriverFeature ) const;
+
+Removed functions:
+ bool hasQuerySizeSupport() const;
+ bool canEditBinaryFields() const;
+ bool hasTransactionSupport() const;
+
+QSqlField
+---------
+
+ - The bool argument of setNull() was removed since it does not make sense
+ to set a field to non null.
+
+QTabWidget
+----------
+
+ - Use the functions below to add tool tips to the individual tabs in a
+ QTabWidget.
+
+New functions:
+ void removeTabToolTip( QWidget * w );
+ void setTabToolTip( QWidget * w, const QString & tip );
+ QString tabToolTip( QWidget * w ) const;
+
+QTabBar
+-------
+
+ - Use the functions below to add tool tips to the individual tabs in a
+ QTabBar.
+
+New functions:
+ void removeToolTip( int id );
+ void setToolTip( int id, const QString & tip );
+ QString toolTip( int id ) const;
+
+QTextStream
+-----------
+
+ - The global functions setw(), setfill() and setprecison() were deleted
+ since they conflict with the std classes. If you need the functionality,
+ use qSetW(), qSetFill() and qSetPrecision() instead.
+
+Removed functions:
+ QTSManip setw( int w )
+ QTSManip setfill( int f )
+ QTSManip setprecision( int p )
diff --git a/dist/changes-3.0.0-beta4 b/dist/changes-3.0.0-beta4
new file mode 100644
index 0000000..a3f44a5
--- /dev/null
+++ b/dist/changes-3.0.0-beta4
@@ -0,0 +1,688 @@
+Qt 3.0 Beta4 is not binary compatible with Beta3; any programs linked
+against Beta3 must be recompiled.
+
+Below you will find a description of general changes in the Qt
+Library and Qt Designer followed by a detailed list of changes in the
+API.
+
+
+The Qt Library
+========================================
+
+Documentation
+-------------
+
+The extensive revision of the documentation is almost complete.
+We have added new navigation options, including a shorter list
+of classes entitled Main Classes.
+
+Translations
+------------
+
+Qt now includes French and German translations of the Qt library, as
+well as a template for translating Qt. These files are found in the
+translations directory of Qt, in both .ts and .qm formats.
+
+Style Fixes
+-----------
+
+Qt 3.0.0 beta2 introduced a new QStyle API. This new API has changed
+between beta3 and beta4. These changes will affect both widget
+writers and style writers. The QStyle entry below explains what has
+changed.
+
+Beta4 also introduces some fixes for bugs introduced during the port
+to the new API in various widgets, notably QComboBox and QSlider.
+
+LiveConnect Plugin
+------------------
+
+A few bugs were fixed in the LiveConnect Plugin so that the grapher
+example works again on Windows.
+
+
+Qt Designer
+========================================
+
+ - General usability improvements and bug fixes, and improved file
+ and project handling.
+ - Updated designer manual to cover the .ui.h mechanism.
+ - New auto-indentation algorithm in the code editor.
+
+
+Qt Assistant
+========================================
+
+ - Added a Settings dialog and made more features customizable.
+ - Sessions are now saved and restored.
+ - A brief introduction to using Qt Assistant is now included.
+
+
+Qt Linguist
+========================================
+
+ - Phrase books are now provided in tools/linguist/phrasebooks.
+ - Added support for Qt Designer's .ui.h mechanism to lupdate.
+ - Support for a larger subset of .pro file syntax in lupdate and
+ lrelease.
+
+
+Qt Functions
+========================================
+
+QApplication
+------------
+
+ - Ignore drag-and-drop events for disabled widgets.
+ - Always send ChildRemoved events, even if no ChildInserted event
+ was sent.
+ - Mouse events for popup menus are now sent to event filters.
+
+QCanvasItem
+-----------
+
+ - The functions visible(), selected() and active() have been renamed
+ setVisible(), setSelected() and setActive().
+
+New functions:
+ bool isVisible() const;
+ bool isSelected() const;
+ bool isActive() const;
+
+Removed functions:
+ bool visible() const;
+ bool selected() const;
+ bool active() const;
+
+QCanvasText
+-----------
+
+ - Fixed alignment flags.
+
+QChar
+-----
+
+New function:
+ bool isSymbol() const;
+
+QCheckBox
+---------
+
+ - Fixed a bug in pixmap caching which could result in using the
+ wrong pixmap.
+
+QCheckListItem
+--------------
+
+ - After a mouse click, the list view ignores the following double
+ click as in Windows XP.
+
+QClipboard
+----------
+
+ - Made clipboard operations faster on X11.
+
+QColorDialog
+------------
+
+ - Never show scrollbars in the color array.
+
+QComboBox
+---------
+
+ - Comboboxes are now drawn correctly in all styles.
+ - Fixed bug with auto completion. There was undefined behavior with
+ non-editable comboboxes when changing focus.
+
+New function:
+ virtual void setCurrentText( const QString& );
+
+New property:
+ QString currentText
+
+QDataBrowser
+------------
+
+ - The setCursor() function is obsolete and will be removed for Qt 3
+ release due to the incompatibility with some compilers. Use
+ setSqlCursor() instead.
+
+QDataTable
+----------
+
+ - Dates and times in tables can now be displayed in different
+ display formats.
+ - The setCursor() function is obsolete and will be removed for Qt 3
+ release due to the incompatibility with some compilers. Use
+ setSqlCursor() instead.
+
+QDateEdit
+---------
+
+ - The default separator and the day-month-year order respect the
+ user's settings.
+ - Pressing the separator key now skips to the next section.
+ - Fixed a usability flaw related to some months being longer than
+ others.
+
+New functions:
+ QString separator() const;
+ virtual void setSeparator( const QString& s );
+
+QDateTime
+---------
+
+ - Always initialize the tm struct completely. This fixes a problem
+ on some versions of Unix.
+
+QDir
+----
+
+ - QDir::homeDirectory() now always returns an existing directory on
+ Windows.
+
+QDockWindows
+------------
+
+ - Fixed dockwindows created in non-dock areas.
+ - Fixed constructor if InDock and the parent is a QMainWindow.
+
+QDom...
+-------
+
+ - Fixes in the conversion of the DOM tree to a string.
+
+QDomNodeList
+------------
+
+ - Fixed a crash.
+
+QFileDialog
+-----------
+
+ - Select contents of the line edit at startup (if any) so that the
+ user can overwrite the provided file name right away.
+
+QFileInfo
+---------
+
+ - In adition to lastModified() and lastRead(), provide created().
+
+New function:
+ QDateTime created() const;
+
+QFont
+-----
+
+ - Provide more correct font metrics under X11.
+ - Worked around X11 limits on length of strings to draw and on
+ coordinate sizes.
+ - Fixed sone point vs. pixel size issues under X11.
+ - Added PreferAntialias and NoAntialias flags to StyleStrategy enum
+ type.
+
+QFtp
+----
+
+ - Fixed a QSocket bug that made QFtp crash if the connection was
+ refused.
+ - Fixed operationRename() and operationRemove().
+ - Set the right state when finished.
+
+QGIFFormat
+----------
+
+ - Support GIF files with broken logical screen size.
+
+QHeader
+-------
+
+ - Added support for '\n' in header labels.
+ - Improved placement of icon.
+
+QHttp
+-----
+
+ - If the status code of the reply is an error code, it is now also
+ reflected in the status of the network operation. The error
+ handling in general was improved.
+
+QImageIO
+--------
+
+ - Allow gamma correction to be set programmatically.
+
+New functions:
+ void setGamma( float gamma );
+ float gamma() const;
+
+QKeyEvent
+---------
+
+ - Worked around an X11 bug in isAutoRepeat().
+
+QKeySequence
+------------
+
+A new class that encapsulates a key sequence as used by accelerators.
+
+QLabel
+------
+
+ - Made the WordBreak alignment property work with rich text labels
+ in addition to plain text labels.
+
+QLayout
+-------
+
+ - Fixed crashes with deleting widgets managed by the layout.
+ - Fixed problems with reparenting widgets managed by the layout.
+ - Respect maximumHeight() of items in heightForWidth().
+
+QLibrary
+--------
+
+ - Plugins now return the version number, threading model and debug
+ vs. release mode of the Qt library used in ucm_initialize(). If
+ there is any kind of incompatibility, cancel the loading.
+
+QLineEdit
+---------
+
+ - Update the "edited" flag and the accessibility data better than
+ before.
+ - Fixed setMaxLength().
+ - Fixed context menu problem on Windows.
+
+New functions:
+ bool isUndoAvailable() const;
+ bool isRedoAvailable() const;
+
+QListViewItem
+-------------
+
+ - Fixed setVisible(TRUE) which triggered an update too soon.
+
+QMenuBar
+--------
+
+ - Cancel alt-activation of menubar on mouse press/release.
+ - On wheel events, all popup menus are now closed instead of hidden.
+ Hiding popup menus confused QMenuBar.
+
+QObject
+-------
+
+ - Have QObject dispatch events to customEvents().
+
+QPainter
+--------
+
+ - Renamed the enum type ClipMode to CoordinateMode. The enum values
+ ClipDevice and ClipPainter are now called CoordDevice and
+ CoordPainter.
+ - Fixed escaping of ampersand character, so "&&", "&&&", etc., now
+ work as they did in Qt 2.x.
+
+New functions:
+ void drawPixmap( const QRect& r, const QPixmap& pm );
+ void drawImage( const QRect& r, const QImage& img );
+
+QPicture
+--------
+
+ - Respect the size of a loaded SVG document.
+ - Solved a replay-transformed-picture problem.
+ - Fixed format version number.
+
+QPluginManager
+--------------
+
+ - Fixed crash when loading a plugin fails.
+
+QPopupMenu
+----------
+
+ - Custom menu items that are separators now see their size hint
+ respected.
+ - Fixed crash when drawing an empty popup menu.
+
+QPrinter
+--------
+
+ - Better printing in different resolutions under both Windows and
+ X11.
+ - Support for collation under Windows and X11.
+ - Correct bounding rectangles for texts in all printer modes.
+ - Fixed pixmap printing on Windows.
+ - Fixed PostScript font names for fonts with foundries.
+ - Support for PostScript printing of scaled images.
+
+New functions:
+ bool collateCopiesEnabled() const;
+ void setCollateCopiesEnabled( bool enable ) const;
+ bool collateCopies() const;
+ void setCollateCopies( bool on );
+ int winPageSize() const; /* Windows only */
+
+QProcess
+--------
+
+ - The function hangUp() was renamed to tryTerminate() to make the
+ purpose more clear. Furthermore, under Unix, the signal that is
+ sent was changed from SIGHUP to SIGTERM.
+ - The function kill() and the function tryTerminate() (formerly
+ hangUp()) were made slots.
+
+New slots:
+ void tryTerminate();
+ void kill();
+
+Removed functions:
+ void hangUp();
+ void kill();
+
+QProgressBar
+------------
+
+ - Draw the progress bar correctly with respect to the properties
+ "percentageVisible", "indicatorFollowsStyle" and
+ "centerIndicator".
+
+QPtrVector
+----------
+
+ - Support null items without triggering an assert.
+
+QPushButton
+-----------
+
+ - Fixed the sizeHint() of buttons with an icon.
+
+QRegExp
+-------
+
+ - Fixed a subtle bug in regular expressions mixing anchors and
+ alternation.
+
+QRegion
+-------
+
+ - Don't crash when creating a QRegion from an empty point array.
+
+QRichText
+---------
+
+ - Improved alignment support, including nested alignments.
+ - Improved table margin support.
+ - Improved page break algorithm.
+ - Do not eat '\n' in preformatted items.
+ - Do not draw the internal trailing space at the end of a paragraph.
+ - Fixed link underlining in table cells and other subdocuments.
+ - Use larger vertical margin between paragraphs.
+ - Display paragraph spacing even when printing.
+ - Support vertical table cell alignment.
+ - Fix for floating items and table cell size calculation.
+ - Improved allignment handling.
+ - Offset fixes for tabs.
+ - Better <div> support.
+ - Fixed <br> tag.
+ - Fix for the <center> tag and centering tables.
+ - Fixed &nbsp; and <nobr>.
+ - Fixed off-by-one bug in gotoWordLeft() and gotoWordRight().
+ - Better positioning of super- and subscripts.
+ - Faster printing of large tables by using a clipping rectangle.
+ - Improved high-resolution printing.
+ - Correct sizes for images when printing.
+ - Fixed list painting when printing.
+ - Use right background for printing.
+
+QScrollBar
+----------
+
+ - Made setValue() a slot.
+
+New slot:
+ void setValue( int );
+
+Removed function:
+ void setValue( int );
+
+QSettings
+---------
+
+ - Added support for QStringLists without requiring a distinct
+ separator.
+ - Added support for null strings, empty lists and null strings in
+ lists.
+ - Fixed bug with values ending with a backslash.
+ - On Unix, don't overwrite files if the user doesn't have permission.
+
+QSimpleRichText
+---------------
+
+ - Implemented vertical breaks and floating elememts.
+ - Fixed bug with borders and clipping in printing.
+ - Fixed bug in adjustSize() cache.
+
+QSizePolicy
+-----------
+
+ - Stretch factors were added to QSizePolicy.
+ - Added a new size policy: Ignored.
+
+New functions:
+ uint horStretch() const;
+ uint verStretch() const;
+ void setHorStretch( uchar sf );
+ void setVerStretch( uchar sf );
+
+QSpinBox
+--------
+
+New slot:
+ virtual void selectAll();
+
+QSqlDatabase
+------------
+
+ - QSqlDatabase now provides access to meta-data. Meta-data is stored
+ in two new classes, QSqlFieldInfo and QSqlRecordInfo. See the
+ class documentation for details.
+
+New Functions:
+ QSqlRecordInfo recordInfo ( const QString & tablename ) const
+ QSqlRecordInfo recordInfo ( const QSqlQuery & query ) const
+
+
+QSqlFieldInfo
+-------------
+
+A new class that stores meta data associated with a SQL field.
+
+QSqlRecordInfo
+--------------
+
+A new class that is keeping a set of QSqlFieldInfo objects.
+
+QStatusBar
+----------
+
+ - Don't cut off the bottom line of the border of the status bar.
+ - Respect maximumHeight() of items in the status bar.
+
+QString
+-------
+
+ - QString now provides section(), a function that parses simple
+ fields.
+ - The function similarityWith() has been removed from the API. If
+ you need it, write to qt-bugs@trolltech.com.
+
+New functions:
+ QString section( QChar sep, int start, int end,
+ int flags = SectionDefault ) const;
+ QString section( char sep, int start, int end = 0xffffffff,
+ int flags = SectionDefault ) const;
+ QString section( const char *substr, int start, int end = 0xffffffff,
+ int flags = SectionDefault ) const;
+ QString section( QString substr, int start, int end = 0xffffffff,
+ int flags = SectionDefault ) const;
+ QString section( const QRegExp &regxp, int start, int end = 0xffffffff,
+ int flags = SectionDefault ) const;
+
+Removed function:
+ int similarityWith( const QString& target ) const;
+
+QStyle
+------
+
+ - Changed "void **" technique to QStyleOption technique. This
+ affects the interface of most of the QStyle member functions.
+ Please read the QStyle class documentation for details.
+
+QStyleOption
+------------
+
+A new class that encapsulates extra data sent to the style API.
+
+QTabBar
+-------
+
+ - The accelerators are now working correctly after changing a tab.
+
+QTable
+------
+
+ - Fixed crash related to popup menu and cell edition.
+ - Fixed not-drawing hidden cells.
+
+QTextCodec
+----------
+
+ - Added MIME names for codecs.
+ - Improved locale detection.
+ - Fixed the ISO 8859-6.8x (Arabic) font encoding.
+
+New function:
+ const char *mimeName() const;
+
+QTextStream
+-----------
+
+ - Fixed bug with stateful QTextEncoders.
+
+QTextEdit
+---------
+
+ - Respect disabling updates.
+ - Fixed link underlining in table cells and other subdocuments.
+ - Draw cursor on focus in.
+ - Emit cursorPositionChanged() where it previously was missing.
+ - Fixed sync().
+
+New functions:
+ bool isUndoAvailable() const;
+ bool isRedoAvailable() const;
+ bool isUndoRedoEnabled() const;
+ virtual void setUndoRedoEnabled( bool enabled ) const;
+
+New property:
+ bool undoRedoEnabled
+
+QThread
+-------
+
+ - Fixed QThread::sleep() on Unix.
+
+QTime
+-----
+
+ - fromString() with format Qt::ISODate now recognizes milliseconds
+ if they are specified.
+ - Make elapsed() a const function.
+
+QTimeEdit
+---------
+
+ - The default time separator respects the user's settings.
+ - Pressing the separator key now skips to the next section.
+
+New functions:
+ QString separator() const;
+ virtual void setSeparator( const QString& s );
+
+QTooltip
+--------
+
+ - Hide active tooltips when the user switches to another application.
+ - Fixed tooltips with Windows effects enabled.
+
+QUrl
+----
+
+ - Fixed password encoding.
+
+New function:
+ bool hasPort() const;
+
+QValidator
+----------
+
+ - Let QValidator, QIntValidator, QDoubleValidator and
+ QRegExpValidator have QObject parents rather than only QWidget
+ parents.
+
+QVariant
+--------
+
+ - Added QBitArray support.
+ - The QDateTime type now supports asDate() and asTime().
+ - The QByteArray type now supports toString().
+
+New functions:
+ QVariant( const QBitArray& );
+ const QBitArray toBitArray() const;
+ QBitArray& asBitArray();
+
+QWhatsThis
+----------
+
+ - Added support for hyperlinks in "What's This?" help windows.
+
+QWidget
+-------
+
+ - Fixed crashes related to LayoutHint events.
+
+QWizard
+-------
+
+ - Made removePage() behave as documented.
+ - Fixed back() so that it skips irrelevant pages like next().
+
+QWorkspace
+----------
+
+ - Make sure that the widget state is set before the first titlebar
+ painting is triggered.
+ - Use the right pixmap for titlebar.
+ - Respects widget flags better for titlebars in QCommonStyle.
+ - Fixed move and resize in the system menu bar of workspace
+ children.
+
+QXml
+----
+
+ - Made the "prefix" xmlns map to the namespace name
+ http://www.w3.org/2000/xmlns/.
+ - Fixed default namespaces.
+
+QXmlAttributes
+--------------
+
+ - Added count() as equivalent to length() to be consistent with Qt
+ conventions.
+
+New function:
+ int count() const;
diff --git a/dist/changes-3.0.0-beta5 b/dist/changes-3.0.0-beta5
new file mode 100644
index 0000000..174a1b3
--- /dev/null
+++ b/dist/changes-3.0.0-beta5
@@ -0,0 +1,316 @@
+Qt 3.0 beta 5 is not binary compatible with beta 4; any programs
+linked against beta 4 must be recompiled.
+
+Below you will find a description of general changes in the Qt
+Library and Qt Designer followed by a detailed list of changes in the
+API.
+
+
+The Qt Library
+========================================
+
+Documentation
+-------------
+
+The extensive revision of Qt classes' documentation is complete. The
+front page of the Qt documentation (index.html) has been redesigned
+to provide better access to other documentation than class
+documentation.
+
+OpenGL Module
+-------------
+
+Qt beta 5 provides some fixes which will make rendering GL widgets to
+pixmaps work on a wider range of X servers.
+
+QDateTimeEdit
+-------------
+
+The QDateTimeEdit, QDateEdit and QTimeEdit widgets have been moved
+from the SQL module to the Qt core widget set. All users of Qt can
+now use these widgets.
+
+
+Qt Designer
+========================================
+
+ - Some bugs related to the .ui.h feature were fixed.
+
+ - The generation of code related to QSqlCursor has been fixed.
+
+ - When removing a slot implementation from the Qt Designer
+ interface, do not accidentally remove a preceding comment.
+
+ - Improved the C++ code indenter in the editor for some C++
+ constructs, including try-catch blocks.
+
+
+Qt Linguist
+========================================
+
+ - Fixed problem with loading phrase books containing non-ASCII
+ characters.
+
+
+Qt Classes
+========================================
+
+QApplication
+------------
+
+ - Fixed a clipboard bug related to drag-and-drop on X11.
+
+QColorDialog
+------------
+
+ - Fixed repaint problem.
+
+QComboBox
+---------
+
+ - Never inserts empty strings in the list.
+ - Use the drop-down listbox's size hint in the combobox if the
+ listbox has been set manually.
+
+QComponentInterface
+-------------------
+
+ - This class has been renamed QComponentInformationInterface.
+
+QComponentServerInterface
+-------------------------
+
+ - This class has been renamed QComponentRegistrationInterface.
+
+QDataBrowser
+------------
+
+ - The setCursor() function is obsolete and has been removed due to
+ problems with some compilers. Use setSqlCursor() instead.
+
+QDataTable
+----------
+
+ - Fixed a rare crash when the database is deleted while its popup is
+ still open.
+ - Made setColumnWidth() a public slot like in the base class.
+ - The setCursor() function is obsolete and has been removed due to
+ problems with some compilers. Use setSqlCursor() instead.
+
+QDateTimeEdit
+-------------
+
+ - Fixed the minimumSizeHint() for better behavior in a layout.
+
+QDom
+----
+
+ - Added a sanity check.
+
+QFileDialog
+-----------
+
+ - Fixed a crash in MotifPlus style.
+ - Use the existing file-icon provider rather than the default
+ Windows one if one is set.
+
+QFont
+-----
+
+ - Fixed background color for more than 8 bits per channel.
+ - Added the font's pixel size to the value returned by key().
+
+QFtp
+----
+
+ - Correcty sets the default password to "anonymous".
+
+QGL
+---
+
+ - Added robustness on X11 for invalid pixmap parameters.
+
+QImage
+------
+
+ - Fixed loading of BGR BMP files.
+ - Changed the signature of the constructor to accept "const char *
+ const *" objects without a cast.
+
+QLatin1Codec
+------------
+
+ - Provide the missing mimeName().
+
+QLibrary
+--------
+
+ - Construct Unix-specific filenames correctly.
+
+QLineEdit
+---------
+
+ - Fixed offset for right-aligned text.
+
+QListView
+---------
+
+ - Fixed a bug with in-place renaming.
+
+QMime
+-----
+
+ - Fixed infinite loop when searching for a mime-source.
+
+QMutex
+------
+
+ - Unlock the Qt library mutex when enter_loop() is called the first
+ time, rather than when exec() is called. A programmer might call
+ QDialog::exec() and never QApplication::exec(), and then she will
+ wait for the mutex.
+
+QPixmap
+-------
+
+ - Do transformations correctly on big-endian systems.
+
+QPrinter
+--------
+
+ - Respect the PRINTER environment variable on X11, as stated in the
+ documentation.
+ - Work around a display-context bug on Windows 95 and 98.
+
+QProcess
+--------
+
+New functions:
+ void clearArguments();
+ int communication() const;
+ void setCommunication( int c );
+
+QProgressBar
+------------
+
+ - Fixed bug in repainting when a background pixmap is set.
+
+QPtrList
+--------
+
+ - Reverted a semantics change introduced in beta 4 when deleting the
+ current item.
+
+QRegExp
+-------
+
+ - Fixed matchedLength() when used with exactMatch(). This bug
+ affected QRegExpValidator.
+
+QRichText
+---------
+
+ - Added support for "color" attribute in <hr> tag.
+ - Fixed selectedText().
+
+QSqlCursor
+----------
+
+ - Don't generate calculated fields.
+
+QStatusBar
+----------
+
+ - Made addWidget() and removeWidget() virtual.
+
+QSpinBox
+--------
+
+ - Fixed the minimumSizeHint() for better behavior in a layout.
+
+QStyle
+------
+
+ - Allow separator custom menu items to use a different size than
+ specified by the style.
+
+Qt
+--
+
+ - Renamed Qt::Top, Qt::Bottom, Qt::Left, Qt::Right to Qt::DockTop,
+ Qt::DockBottom, Qt::DockLeft, Qt::DockRight.
+
+QTable
+------
+
+ - Fixed currentChanged() and valueChanged() emits.
+
+QTextEdit
+---------
+
+ - Moved eventFilter() from the public slots section to the public
+ section of the class definition.
+ - Reformat after changing tab-stop size.
+ - Implemented undo for clear().
+
+New function:
+ void zoomTo( int size );
+
+QTextIStream
+------------
+
+ - Fixed QTextIStream with a QString.
+
+QToolBar
+--------
+
+ - Fall back to text property in extension popup if no pixmap label
+ has been set.
+ - Made mainWindow() const.
+
+QToolButton
+-----------
+
+ - Fixed the minimumSizeHint() for better behavior in a layout.
+
+QToolTip
+--------
+
+ - Fixed the transparent tooltip effect a la Windows 2000.
+
+QUrl
+----
+
+ - Fixed the return value of QUrl::dirPath() on Windows.
+ - Set ref to nothing when merging URLs.
+
+QUrlOperator
+------------
+
+ - Added a default parameter for single copy to specify the "to" file
+ name and not just the file path.
+
+New function:
+ QPtrList<QNetworkOperation> copy( const QString& from,
+ const QString& to, bool move, bool toPath );
+
+QValueList
+----------
+
+ - Added a return value to remove(), as stated in the documentation.
+
+QWidget
+-------
+
+ - Fixed a bug in QPainter on X11 that caused a crash when paint
+ events were dispatched from other paint events.
+ - Fixed showMaximized() and deferred map handling.
+ - When specifying WDestructiveClose as a widget flag,
+ QWidget::close() does not immediately delete the widget anymore, but
+ calles QObject::deferredDelete()
+
+
+QWorkspace
+----------
+
+ - Fixed cascade().
diff --git a/dist/changes-3.0.0-beta6 b/dist/changes-3.0.0-beta6
new file mode 100644
index 0000000..dbed175
--- /dev/null
+++ b/dist/changes-3.0.0-beta6
@@ -0,0 +1,272 @@
+Qt 3.0 Beta6 is not binary compatible with Beta5; any programs linked
+against Beta5 must be recompiled.
+
+Below you will find a description of general changes in the Qt
+Library, Qt Designer and Qt Assistant. Followed by a detailed list of
+changes in the API.
+
+
+The Qt Library
+========================================
+
+QCom postponed
+--------------
+
+Previous Qt 3.0 betas introduced a module called QCom that provides a
+COM-like component system. The feedback we received on this module
+during the 3.0 beta phase has been mixed. Many users think this module
+lacks the intuitiveness and compactness that they have learned to
+expect from a Qt API. Therefore, we have made the difficult decision
+to withdraw the QCom API from the Qt 3.0 release. We will continue to
+develop this API until it is evolved enough for our customers, and
+will include the improved version in a later release.
+
+We apologize for any inconvenience the QCom API change has
+caused. This decision was made as part of our ongoing efforts to
+maintain the soundness and quality of Qt.
+
+Please note that the new plugin functionality in 3.0 will still be
+provided. This includes using custom widgets in Qt Designer, as well
+as runtime addition of styles, codecs, SQL drivers, and image format
+handlers. This functionality is now available through a substantially
+simplified API.
+
+Also also note that it will still be convenient to add custom plugin
+capabilities to Qt 3.0 applications, since the new QLibrary class will
+still be available. This class takes care of the low-level,
+platform-dependent issues regarding loading of DLLs and obtaining
+pointers to the functions exported by the DLLs.
+
+
+Qt Designer
+========================================
+
+ - Improvements to the Designer reference manual.
+
+ - Improved the C++ code indenter in the editor for numbers and
+ handling of parenthesis.
+
+
+Qt Assistant
+========================================
+
+ - Added a context menu with common commands.
+
+ - Allow multiple windows to be opened and added the common shortcut
+ that Shift+Click on a link opens the link in a new window.
+
+
+Qt Functions
+========================================
+
+QAccel
+------
+
+ - Try harder to ensure that accelerators continue to work when a top
+ level widget is reparented into another window.
+
+QColor
+-----
+
+ - X11 only: better heuristic to decide if you use black or white when a
+ color could not be allocated.
+ - win32 only: improve color allocation on 8bit displays, e.g. when
+ using a terminal server.
+
+QComboBox
+---------
+
+ - Added a new function to be able to set a custom line edit.
+
+New function:
+ virtual void setLineEdit( QLineEdit *edit );
+
+QCString
+--------
+
+ - Implemented a dummy out-of-line destructor for QCString to help the
+ compiler to optimize the number of conflicts as the location of a vtable
+ is now known.
+
+QCursor
+-------
+
+ - win32 only: Added a constructor that takes a platform specific handle.
+
+New function:
+ QCursor( HCURSOR ); (win32 only)
+
+QDateTime and QDateTimeEdit
+---------------------------
+
+ - win32 only: better handling of localization settings.
+
+QDockWindow
+-----------
+
+ - Remeber last size of an undocked window, so when it is docked and
+ undocked again, use this size again.
+
+QDom
+----
+
+ - Fixed an infinite loop in QDomDocument::toString().
+
+QFileDialog
+-----------
+
+ - Improved handling of "~" to make it work as a directory.
+
+QFileInfo
+---------
+
+ - win32 only: permissions respects the read-only attribute now.
+
+QIconView
+---------
+
+ - Added a function to find out whether an item in a view is currently
+ being renamed.
+ - Fixed a crash.
+
+New function:
+ bool isRenaming() const;
+
+QInputDialog
+------------
+
+ - Improved the handling of double input formats.
+
+QListView
+---------
+
+ - Added a function to find out whether an item in a view is currently
+ being renamed.
+ - Fixed a possible infinite loop.
+ - Improved spacing handling for columns that can show a sort indicator.
+
+New function:
+ bool isRenaming() const;
+
+QMainWindow
+-----------
+
+ - Make menuAboutToShow() protected to allow customized dock menus.
+ - Fixed spacing problem for menu bars.
+
+QMap
+----
+
+ - Fixed infinite looping in count( const Key& k ).
+
+QObject
+-------
+
+ - The slot deferredDelete() was renamed to deleteLater() to be more
+ intuitive. Code that used deferredDelete() has to be adjusted for the
+ new name.
+
+New function:
+ void deleteLater();
+
+QPainter
+--------
+
+ - Fixed bounding rectangle when printing richtext.
+ - Restore brush origin in QPainter::restore().
+
+QPixmap
+-------
+
+ - X11 with render extension only: better support for alpha blending:
+ - QPixmap::xForm() keeps now the alpha channel information
+ - alpha channel information is kept when copying QPixamps
+ - alpha blending works with QMovie
+ - tiling pixmaps with alpha channel works now
+
+QPrinter
+--------
+
+ - Unix only: fixed dashed line drawing when using high resolution
+ printing.
+ - Better printing detection on Irix.
+
+QRadioButton
+------------
+
+ - Fixed focus problem for radio buttons in a button group.
+
+QSqlCursor
+----------
+
+ - Fixed primeInsert() to work if the primary key of the edit buffer has
+ changed.
+ - Changing primary index keys now also works if the cursor's position
+ moved in the meantime.
+
+QStyle
+------
+
+ - Added a base value (CC_CustomBase) for custom defined primitives,
+ controls, etc. -- this allows custom widgets to use the new style
+ engine.
+ - Fixed spacing problem for custom menu items.
+ - Improved the look of the Motif plus and the SGI style.
+
+QTable
+------
+
+ - Fixed a crash when drag source is the current table editor widget.
+ - Fixed a bug that prevented having different colors in different cells.
+
+QTabletEvent
+------------
+
+ - Improved Watcom tablet support to allow multiple devices to be used.
+
+QTextEdit
+---------
+
+ - Better handling for font sizes in the font tag.
+ - Parse the qt tag again.
+ - Fixed text() for read-only documents.
+ - Improved right mouse button menu handling.
+ - New function to pass the position to the createPopupMenu() function for
+ improved flexibility.
+
+New function:
+ virtual QPopupMenu *createPopupMenu( const QPoint& pos );
+
+QThread
+-------
+
+ - Unix only: Make sure that the seconds and nano-seconds in the sleep
+ functions are within the limits.
+
+QUrlInfo
+--------
+
+ - Added the concept of invalid QUrlInfo objects. This is useful in
+ conjunction with QUrlOperator::info().
+
+New function:
+ bool isValid() const;
+
+QWizard
+-------
+
+ - Set the previous pages nextEnabled to TRUE if we add a page to the end
+ of a wizard.
+
+QWMatrix
+--------
+
+ - mapRect() returns always a valid QRect now.
+
+QWorkspace
+----------
+
+ - Update the titlebar when toggling shaded/non-shaded.
+ - Update the titlebar to be deactivated when the application's activation
+ status changes.
+ - Improve placement of document windows.
diff --git a/dist/changes-3.0.1 b/dist/changes-3.0.1
new file mode 100644
index 0000000..26fb022
--- /dev/null
+++ b/dist/changes-3.0.1
@@ -0,0 +1,540 @@
+Qt 3.0.1 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.0.0
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- Style Engine fixes
+ Qt 3.0 introduced a new and more flexibile style engine. This
+ release should fix most of the small visual flaws that the new
+ styles introduced. It also greatly improves appearance in
+ right-to-left mode.
+
+- MS-Windows XP
+ This is the first release to fully support Windows XP,
+ including the new themable GUI styles.
+ The Windows XP style can only be built as a plugin, which requires
+ Qt to be configured as a shared library. To build the plugin
+ you must install a Microsoft Platform SDK for October 2001
+ or later. Your INCLUDE and LIB environment variables must
+ point to the respective directories in the SDK installation.
+
+- Reverse (right-to-left) layouts
+ Many classes have improved support for right-to-left layouts.
+
+- Compile fixes
+ Solaris 7 Intel, g++ version 2.8.1.
+
+- Documentation updates
+ Some new and improved diagrams and minor textual revisions.
+
+- Mac only: Drag'n'drop
+ Mac only: QDropEvents can decode HFS flavors.
+
+- X11 only: Multi-head (multi-screen) improvements
+ Support for different TrueColor depths on each head (screen).
+ Drag'n'drop support across multiple screens. Tooltips always
+ stay on the correct screen. Improved OpenGL support on
+ multiple screens. Qt 3.1 will support different color depths
+ on every screen (e.g. one TrueColor screen, one 8-bit
+ PseudoColor and one 8-bit GreyScale).
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction
+ Fixed a memory leak in conjunction with action accelerators.
+ Turn toggle actions off when toggling is turned off with
+ setToggleAction(FALSE);
+
+- QApplication
+ Shared double buffers are cleaned up on destruction.
+ Creating and using multiple QApplications in the same process
+ is supported.
+ - Solaris only: Default to the Interface System font (which is
+ the default for the CDE)
+ - Win32 only: When WM_QUERYENDSESSION is received, _flushall
+ is called to ensure that all open streams and buffers are
+ flushed to disk (or to OS's buffers).
+ Better support for more input methods (e.g. Chinese).
+ Enter events are not propagated to modally blocked widgets.
+ Key_BackTab events are generated rather than Shift+Key_Tab.
+ Floating toolbars are blocked when the application is modal.
+ Move and Resize are disabled in the system menu for
+ maximized toplevel windows
+ - WinXP only: WM_THEMECHANGED messages are handled; widgets
+ are repolished with the appropriate style.
+ - X11 only: Removed misleading warning message for main
+ widgets on heads (screens) other than the default head.
+ Input context: Solved a memory leak in Xlib, and saved a
+ server round trip when updating the microfocushint.
+ Worked around some broken XmbLookupString implementations
+ that do not report buffer overflows correctly.
+ Key events are never given to a widget after clearFocus()
+ has been called for that widget; this is the same behavior
+ as Windows.
+
+- QAquaStyle (MacOS X only)
+ More optimizations and several minor visual bugs fixed.
+
+- QCanvas
+ Erase any exposed empty space when shrinking the canvas.
+
+- QCanvasPixmapArray
+ Initialize the framecount to 0.
+
+- QCanvasView
+ Optimize background pixmaps: potentially they were drawn
+ twice, first untranslated then translated.
+
+- QClipboard (X11 only)
+ The race conditions that cause KDE to lock-up occasionally
+ should now be fixed.
+
+- QComboBox
+ Fixed behavior with non-selectable items. Fixed a crash when
+ calling setCurrentItem(-1). Fixed autoscrolling when dragging
+ the mouse directly after opening the dropdown.
+
+- QColor
+ Make invalid named colors return a non-valid QColor (as
+ documented).
+
+- QColorDialog (Win32 only)
+ Use WStyle_DialogBorder, since resizing this dialog does not
+ make much sense.
+
+- QCommonStyle
+ Respect QApplication::globalStrut() in scroll bars. Support
+ reverse layout in QTitleBar.
+
+- QCursor
+ Safer cleanup of cursor shapes (avoids possible free'd memory
+ read)
+ - Win32 only: fixed application override cursor with mouse
+ grabbing.
+
+- QDate
+ Fixed some possible overflows.
+ - Win32 only: Improve locale support for short day and month
+ names etc. Initialize milliseconds correctly.
+
+- QDateTimeEdit
+ Display AM/PM if set by locale. Improved sizeHint().
+
+- QDockAarea
+ More reliable sizeHint(). Better support for reverse layouts.
+
+- QDockWindow
+ Emit the placeChange() signal more reliably. Avoid floating
+ docks popping up everywhere before they have been positioned
+ and laid out.
+
+- QDesktopWidget
+ - X11 only: When using normal dualhead (not Xinerama), make
+ sure we report the correct screen number.
+ - Win32 only: refresh on WM_DISPLAYCHANGE.
+
+- QFrame
+ New panel styles LineEditPanel and TabWidgetPanel. This was
+ required by the new for Windows XP support.
+
+- QFileDialog
+ Show unicode filenames to the user rather than encoded ASCII
+ (e.g. previously latin1 characters were shown as "%XX"
+ escapes).
+ Fixed multiple-selection of FTP files.
+ Emit signal fileHighlighted in existingfile mode.
+ - Mac only: Fixed existingFolder(). Fixed window position so
+ that it will never fall outside the screen.
+ - Win32 only: since files, directories and drives are not case
+ sensitive, we don't add an extra entry in the paths box if
+ the path already exists but with different case.
+
+- QFileInfo (Unix only)
+ Make sure that symlinks pointing to invalid/non-existing
+ targets are reported as symlinks.
+
+- QFont
+ Ensure a rounded-off value is returned from pointSize().
+ - x11 only: improved line width calculation. Fixed off by one
+ error in interpreting Xft font extents. Allow the use of
+ both Xft and non Xft fonts in the same application. Make
+ sure fonts are antialiased by default when using
+ xftfreetype.
+
+- QFontDialog
+ Prevent re-laying out when the size of the preview label
+ changes.
+
+- QFtp
+ In parseDir(), do not compare English month names to
+ shortMonthName(), since the latter is localized.
+
+- QGList
+ Make self-assignments work.
+
+- QGLWidget
+ Fixed ARGB to RGBA conversion on BigEndian systems.
+ - Win32 only: fixed colormap for 8-bit RGBA GL mode.
+ - X11 only: multiple heads with different color depths fixes.
+
+- QHebrewCodec
+ Assume the bidi algorithm is a reversible operation for the
+ visual 8859-8 codec. This is not true for very complex strings
+ but should hold in most cases.
+
+- QIconSet
+ Fixed detach() to really detach the internal pixmaps. In case
+ no image formats are installed, show black pixmaps rather than
+ ASSERT.
+
+- QImage
+ Allow 16-bit DIBs. Allow > 32767 level PNMs.
+ Fixed smoothscale() for the following bug: whenever
+ (new_width / original_width * 4096) is not an integer the last
+ column of the scaled image is black.
+
+- QImageIO
+ Fixed plugin loading in cases where the image format is
+ explicitly defined.
+
+- QInputDialog
+ Disable the OK button when input is not Acceptable.
+ (See QValidator.)
+
+- QLabel
+ When showing rich text with tables (via QSimpleRichtext),
+ avoid drawing the table background.
+
+- QLayout
+ In reverse layout mode: fix off by one error when laying out
+ right to left or bottom to top.
+
+- QLineEdit
+ Fixed offset calculation for horizontal scrolling. Invoke
+ validator when the user presses Backspace or
+ Delete. Compression of the undo/redo stack fixed. Security: do
+ not reveal the position of spaces with Ctrl+RightArrow or
+ Ctrl+LeftArrow in password mode.
+
+- QListBox
+ Append items at the proper position even after sorting the
+ content. Made QWidget::setBackgroundMode() work correctly.
+
+- QListBoxPixmap
+ Use the function pixmap() when drawing the pixmap, so users
+ can reimplement QListBoxPixmap::pixmap().
+
+- QListView
+ Fix misalignment of checkbox click zone. Make the selected and
+ focus rectangles cover the entire column for QCheckListItems
+ if the listview root is not decorated. Make
+ QWidget::setBackgroundMode() on the viewport work correctly.
+ Comply with user interface guidelines: clear the selection
+ when a click is in an empty area unless the Ctrl key is down.
+ Fixed possible crash when starting a rename with a double
+ click. Smarter ensureItemVisible(). Draw listview background
+ in paintEmptyArea() with the current style. Ensure the
+ listview always has a current item.
+
+- QMainWindow
+ Better laying out of dockareas when they are all empty.
+ Otherwise an empty QMainWindow looks unappealing in a
+ workspace. Maintain the toplevel layout's resize mode.
+
+- QMessageBox
+ Avoid double deletion if the parent is destroyed while the
+ messagebox is open. Support y/n/c shortcuts without needing
+ the Alt key modifier.
+
+- QMovie
+ Allow pause() and restart() with MNG.
+
+- QMultiLineEdit
+ Remove internal trailing space when returning a textline with
+ textLine(int) and querying lineLength(int).
+
+- QPainter
+ The boundingRect() should now work properly for the
+ combination richtext, right-aligned and an empty initial rect.
+ Handle DontClip-flag in the painter's complex drawText()
+ function. Reset the cached composition matrix (and inverse)
+ when reinitialising a painter.
+
+- QPicture
+ Fixed the loading of binaries from older Qt versions.
+
+- QPixmap
+ grabWidget(): when the widget sets WRepaintNoErase it might
+ erase itself with the non-redirected QWidget::erase(); restore
+ those areas.
+ - X11 only: (with XRENDER extension) when copying a pixmap,
+ bitBlt the entire data into the new pixmap instead of using
+ alpha composition.
+
+- QPopupMenu
+ Fixed strange side effects with the menu effects. Support
+ minimumSize() for popups. Fixed a navigation issue where
+ Key_Right under certain circumstances was not propagated to
+ the menu bar. Speedups when disabling/enabling menu items
+ before showing them.
+ - X11 only: Fixed mouse and keyboard grabbing side effects
+ with popup menu effects enabled.
+
+- QPrintDialog (built-in dialog)
+ Use the text in the lineedit for the file dialog.
+
+- QPrinter
+ Fixed crash when printing with incomplete combined unicode
+ fonts.
+ - Win32 only: fixed a very rare and mysterious crash.
+
+
+- QPSPrinter
+ Make sure the fontPath is read correctly by the postscript
+ driver, and the qtconfig program. Small memory leaks closed.
+ Better support for Asian printing. Limit line length of
+ Postscript DSC comments to 255 chars (as per the postscript
+ specification).
+
+- QRichText
+ Fixed handling of &nbsp. Support both <qt title="..."> and
+ <title>. Avoid painting \n at the end of lines (these
+ sometimes appeared as an empty unicode box). Fixed find() in
+ "whole words only" mode. Fixed unicode auto alignment. Made
+ cursor movement in BiDi paragraphs compliant with MS-Windows.
+ Fixed paragraph right and center alignments when using <br>
+ tags. Fixed superscript/subscript confusion.
+
+- QScrollBar
+ Allow scrolling with modifier keys pressed.
+
+- QScrollView
+ Made autoscrolling work with drag and drop. Never generate
+ paintevents that are outside the visible area.
+
+- QSettings
+ - Unix only: search paths are valid for individual objects,
+ NOT every object (windows behavior). When reading files,
+ don't replace the old groups with contents of the new
+ groups; merge them instead. Properly escape backslashes and
+ newlines.
+ - win32 only: improved error handling. Fixed subKeyList() and
+ entryList() for empty paths.
+
+- QSimpleRichText
+ Correctly transform clipping rectangle.
+
+- QSizeGrip
+ Reverted sizeHint() to the old size to avoid making the
+ statusbar a tiny bit too big. Support right-to-left layout.
+
+
+- QSgiStyle
+ Made the combobox arrow look nicer. Fixed disabled combobox
+ drawing.
+
+- QSlider
+ Fixed click handling for reverse layouts.
+
+- QSpinBox
+ Usability fix: when changing a value with the up/down arrow
+ keys or with the arrow buttons, select the new value.
+
+- QSplitter
+ Use the actual QSplitter pointer as documented (and not a
+ QSplitterHandle pointer) as the parameter to the
+ QStyle::sizeForContents() call. Fixed reverse layouts when
+ splitter movement is constrained.
+
+- QSqlRecord
+ Fixed double increment of the iterator in certain
+ circumstances.
+
+- QString
+ Fixed QString::setLatin1() when the length parameter is 0.
+ - Unix only: Use strcoll() in QString::localeAwareSorting().
+ - Mac only: clarify that local8Bit() is always utf8().
+
+- QStyle
+ New frame styles for tab widgets, window frames and line edit
+ controls. This was required by the new support for Windows XP.
+ Added SH_ScrollBar_StopMouseOverSlider style hint so that one can
+ turn on (or off) the ability to stop pageup/pagedown when the
+ slider hits the mouse (this is needed for Aqua on MacOS X).
+
+- QSvgDevice
+ Many fixes for saving and restoring attributes that are not
+ part of QPainter. Processing of 'tspan' elements. Now uses
+ double instead of int for internal 'path' arithmetic for
+ better scaling results. Supports QPicture's coordinate
+ transformations.
+
+- QTabBar
+ Fixed the focus rectangles and spacing with icons and label
+ texts.
+
+- QTable
+ Improved layout in right-to-left mode. Fixed adjustRow() when
+ using header items with icon sets. Do not let hidden
+ columns/rows re-appear when adjusting. Update header correctly
+ when changing a table's dimensions. Correctly reset the
+ updatesEnabled flag in sortColumn(). Fixed modifying the
+ contents of a combobox or checkbox table item while it is the
+ current cell.
+
+- QTableItem
+ Make sure an item cannot span over a table's maximum number of
+ rows and columns.
+
+- QTabWidget
+ Constrain the sizehint to avoid having oversized dialogs.
+
+- QTextCode
+ Rename iso8859-6-I to to 8859-6. The old name is still
+ supported for backwards compatibility.
+ - Win32: implemented locale().
+ - Mac: implemented locale().
+
+- QTextDrag (Win32 only)
+ Performance improvements in encodedData().
+
+- QTextEdit
+ Fixed HTML output. New property tabStopWidth. Fixed append()
+ and made it smarter: it only scrolls to the end if the view
+ was scrolled to the end before. Proper reformatting when
+ switching word wrap policies. Do not blink the cursor when the
+ textedit is disabled. Make isModified() return the new value
+ in slots connected to the modificationChanged() signal.
+ - X11 only: middle mouse selection pasting sets the cursor
+ position.
+
+- QTextStream
+ Faster string output in latin1 mode.
+
+- QThread
+ - Unix only: initialize threads in non-GUI mode as well.
+ - Win32 only: fixed the initial value of QThread::running().
+
+- QToolButton
+ Fixed unwanted occurences of delayed popup menus.
+
+- QUrlOperator
+ Fixed the cache, so that QUrlInfo::name() is set correctly for
+ renamed files. This bug also affected QFileDialog. More
+ careful check whether a file is writable before renaming or
+ deleting it.
+
+- QValueVector
+ Make operator==() const. Fixed some sharing issues.
+
+- QVariant
+ Fixed a few memory leaks when casting complex values to simple
+ types. Faster operator==().
+
+- QWaitCondition (Win32 only)
+ Fixed wakeAll().
+
+- QWhatsThis
+ Make QWidget::customWhatsThis() work with menu accelerators.
+ Avoid infinite loops with menu effects.
+
+- QWidget
+ Fix default focus so that setTabOrder( X, Y ); setTabOrder( Y,
+ Z ); gives focus to X, not Y or Z. Closing a modal dialog with
+ a double click on a widget could result in a mouse release
+ event being delivered to the widget underneath; this has been
+ fixed.
+ Set/Reset WState_HasMouse on DragEnter/DragLeave.
+ - Win32 only: obey WPaintUnclipped. Make reparent() with 0,0
+ positions do the requested positioning.
+ - X11 only: when reparenting widgets to/from toplevel, make
+ sure the XdndAware property is set. Make input methods work
+ with servers other than kinput2. More fixes for 4Dwm's
+ incompliance with ICCCM 4.1.5 regarding geometry handling.
+ When hiding toplevel windows, we call XFlush() to avoid
+ having popup menus hanging around grabbing the mouse and
+ keyboard while the application is busy. Obey the 'erase'
+ value in repaint(const QRegion& reg, bool erase).
+
+- QWindowsStyle
+ Various visual fixes, including fixes for right-to-left
+ mode. Most significantly the light source now comes from the
+ top left also in reverse layout the same as modern versions of
+ Windows.
+
+- QWorkspace
+ Support document windows without title bars. Scroll to top
+ left corner when cascading/tiling a scrolled workspace. Define
+ a proper baseSize() for workspace children. Fix some side
+ effects with the workspace's maximize controls on Windows
+ style. Don't raise windows over scrollbars. Clients can now
+ call adjustSize() on the workspace when their sizeHint()
+ changes. When showing two scrollbars, maintain a solid corner.
+ Obey a document window's maximum size when tiling.
+
+****************************************************************************
+* Extensions *
+****************************************************************************
+
+NO CHANGES
+
+****************************************************************************
+* Other *
+****************************************************************************
+
+- qtconfig (X11 only)
+ It is now possible to turn Xft on and off, as well as turning
+ antialiasing-by-default on and off. This is necessary since
+ Xft doesn't work on dual head.
+
+- moc
+ Q_PROPERTY: Support QMap<QString, QVariant> and
+ QValueList<QVariant> as "QMap" and "QValueList". Support
+ parameters of nested template types, for example
+ QValueVector<QValueVector<double> >, as well as
+ Foo<const int>.
+
+- uic
+ Fix uic-generated code for QWizard with both "font" and
+ "titleFont" properties set. Put local includes after global
+ includes in generated files.
+
+- lupdate
+ Allow translation of menubar items generated with Qt Designer
+ (e.g. "&File", "&Edit", etc.).
+
+- libMNG
+ Updated to version 1.0.3.
+
+- libPNG
+ Updated to version 1.0.12.
+
+- Translations
+ Added Hebrew translations for Qt and the demo application.
+
+- Qt Designer
+ Support 'Ignored' size policy. Support properties of type
+ 'double'. Fixed saving of custom widgets in toolbars. Various
+ smaller usability improvements.
+
+- Qt Assistant
+ When users starts Qt Assistant themselves, always make a new
+ instance. Only use the unique-instance feature when invoking
+ from Qt Designer.
+
+- QMsDev
+ Invoke Qt Linguist when opening a .ts file in Visual Studio.
+
+
+
+****************************************************************************
+* Qt/Embedded-specific changes *
+****************************************************************************
+
+NO CHANGES
diff --git a/dist/changes-3.0.2 b/dist/changes-3.0.2
new file mode 100644
index 0000000..211c8ef
--- /dev/null
+++ b/dist/changes-3.0.2
@@ -0,0 +1,325 @@
+Qt 3.0.2 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.0.1
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- Improved building of Qt on SCO OpenServer 5.0.5, Sun WorkShop 4.2, MIPSpro
+7.2 and VC++.NET
+
+- Added support for NIS to the build system
+
+- BiDi on X11: direction key events for right-to-left are configurable
+in QSettings via qt/useRtlExtensions. In 3.0.1 they were always turned
+on.
+
+- basic table support with XFree86
+
+- unicode on X11: fix keysymbols 0x1000000-0x100ffff
+
+- moc: Generate correct code for N::B which inherits M::B. Don't warn
+on throw() specifications.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAbstractLayout
+ Fixed heightToWidth handling.
+
+- QApplication
+ X11 only: Stop compressing keys when a non printable key is
+ pressed. Fixed handling backtab (shift+tab) on HPUX. Better support
+ for currency symbol keys like the Euro key. Also fixed a crash when
+ tablet support is set up, but without a device attached.
+ Mac only: Adjust the desktop widget size when the display size
+ changes.
+
+- QAquaStyle
+ Better highlight color detection for the inactive case.
+
+- QCanvas
+ Let QCanvasPolygon::areaPoints() return a detached QPointArray
+ for safeness.
+
+- QColorDialog
+ Save and restore the custom colors via QSettings between Qt
+ applications.
+
+- QComboBox
+ Layout the popup listbox correctly before showing it.
+
+- QContextMenuEvent
+ X11 only: Both the mouse press event and the context menu
+ are always sent now.
+
+- QClipboard
+ Mac only: Fixed pasting text from non-Qt applications to Qt
+ applications.
+
+- QDataTable
+ Faster key event handling. Fixed crash when cancelling cell
+ editing. Fixed autoEdit mode.
+
+- QDesktopWidget
+ X11 only: Fixed screenNumber() in Xinerama mode.
+
+- QDateEdit
+ Gray out background if the widget is disabled. Fixed small
+ static memory leak on exit.
+
+- QDialog
+ On show(), send a tab-focus event to the focus widget, so that
+ e.g. in lineedits, all the text is selected when becoming visible.
+ Windows only: Position dialogs on the same screen as the mouse if
+ there is no parent widget that can be used.
+
+- QDockWindow
+ Use correct minimum size, taking frame into account. Less
+ flicker on (de)activation. undock() doesn't undock the window
+ if the TornOff dockarea is disabled.
+
+- QDragObject
+ Fixed crash when a drag object is created without parent.
+
+- QFileDialog
+ Fixed an endless loop.
+ Windows only: In getExistingDirectory(), use QFileDialog and not
+ the Windows system one when the dirOnly flag is FALSE
+ Mac only: Fixed filtering when using the native Mac filedialog.
+
+- QFileInfo
+ Windows only: Fixed isWriteable() to check Windows permissions as
+ well.
+
+- QFont
+ Windows only: Fixed boundingBox() when called in a widget
+ constructor. Internal fixes for invalid HDCs. More
+ accurate exactMatch(). Fixed GDI resource leak.
+ X11 only: Fixed calculating the point size of default font, so
+ the default font on systems with only bitmap fonts doesn't look
+ ugly. Support for Ukranian fonts.
+
+- QFontDataBase
+ Win9x only: Fixed problem with multiple entries.
+
+- QGLWidget
+ X11 only: Fixed pixmap rendering with TrueColor visuals
+ on X servers with a default PseudoColor visual (introduced in
+ 3.0.1). Fixed context sharing (introduced in 3.0.1).
+
+- QGroupBox
+ More predictable focus handling.
+
+- QHttp
+ Enable downloading from non-default websites.
+
+- QIconView
+ Initialise internal variable.
+
+- QImage
+ Fixed xForm() for bigendian bitmaps. Accept dots in XM
+ #define.
+
+- QImageIO
+ Correctly limit quality parameter when writing PNG and JPEG
+ files.
+
+- QLabel
+ Smarter minimumSizeHint() for word-break labels.
+
+- QLayout
+ Fixed possible crash when deleting/adding layout items. More
+ robust on runtime layout changes.
+
+- QLibrary
+ Windows only: Use an internal cache and refcount to avoid loading
+ the same library multiple times into the memory on Windows NT.
+
+- QLineEdit
+ Ctrl-V now calls the virtual paste() rather than duplicating
+ its functionality. Override accelerators for keypad keys.
+
+- QListBox
+ Center pixmaps in listbox items properly. Fixed isSelected().
+
+- QListView
+ Fix focus rects for QCheckList items that have a Controller as
+ a parent. Also, fix drawing of selected checklist boxes so
+ that the focus rect doesn't overlap it. Keep checklist items
+ working after the user swapped columns. Fixed drawing check
+ marks and the vertical branch lines for listview items with
+ multiple lines of text. Optimized the clear() function.
+ Improved the sorting for the case that entries have the same key.
+
+- QMenuBar
+ Fixed painting problems on content changes.
+ mostly X11: when the focus widget is unfocused, the menubar
+ should stop waiting for an alt release. On X11, when you use
+ an alt-key shortcut to switch desktops back and forth, then
+ you will get the menubar in altmode when you return to that
+ desktop
+ Mac only: Fixed keyboard modifiers.
+
+- QMovie
+ Animated gifs with a frame delay of 0 work nicer. Initialize
+ internal cache variable.
+
+- QMutex
+ Made tryLock() work on recursive mutexes.
+
+- QPainter
+ Return translated coordinates in pos(). Fixed translation in
+ calls to clipRegion(CoordPainter).
+
+- QPopupMenu
+ More fixes for the animate and fade effects. Fixed opening of
+ menus that was impossible under certain circumstances. Fixed
+ painting problems on content changes.
+
+- QPixmap
+ Make grabWidget() work with internally double-buffered widgets
+ X11 and Mac: Fixed a memory leak.
+
+- QPrinter
+ Win32 only: Resolution fix.
+
+- QRichText
+ Fixed crash bug when clearing a document. Fixed various layout
+ bugs, esp. with HTML tables. Fixed a memory leak. Fixed a
+ crash when placing a cursor on a hidden paragraph. Arabic and
+ Hebrew fixes. Make moving the cursor to the next word not
+ stumble upon multiple whitespaces.
+
+- QScrollBar
+ Make sure middle clicking a scrollbar doesn't allow the slider
+ to move outside the groove.
+
+- QSettings
+ In readEntry(), report 'ok' in all cases. Make sure the
+ default value is returned correctly for bool entries that
+ do not exist in the settings files. Both readNumEntry()
+ and readDoubleEntry() report a false ok parameter if the
+ conversion fails
+ win32 only: Fixed default values
+
+- QSgiStyle
+ Minor visual improvements.
+
+- QSlider
+ Make setting a new size policy in Designer work.
+
+- QSound
+ Stop sound playing when distroying a QSound object.
+ Windows only: QSound::stop() really stops the sound now.
+
+- QSqlCursor
+ Fixed setMode().
+
+- QSqlDriver
+ Escape '\' characters in strings. Fix the QOCI8 driver so that
+ it compiles with the Oracle9i client libs. Major speedup fix
+ for the QMYSQL3 driver.
+
+- QSqlRecord
+ Fixed crash when accessing values of non-existing fields.
+
+- QString
+ mid() works safely now for len > length() && len !=
+ 0xffffffff. Some speed optimizations. Replace non-latin1
+ characters with '?' in unicodeToAscii().
+
+- QStyle
+ Added a style hint for a blinking text cursor when text is
+ selected.
+
+- QStyleFactory
+ Windows only: Don't load style plugins for static Qt builds.
+
+- QTable
+ Use correct style flags for QCheckTableItem drawing. The
+ internal event filter no longer consumes FocusIn/FocusOut,
+ meaning those events are accessible for subclasses now. Fixed
+ redraw problem with dynamically resized cells. Always return
+ the right text for items (fixed a caching problem). Fixed
+ emitting valueChanged(). Fixed a redraw problem with multispan
+ cells.
+
+- QTextCode
+ Support for @euro locales.
+
+- QTextEdit
+ The internal event filter no longer consumes FocusIn/FocusOut,
+ meaning these events accessible for subclasses now. Override
+ accelerators for keypad keys. Reduced memory consumption for
+ contents with many paragraphs. Emit selectionChanged() when
+ the selected text has been removed. Emitting the linkClicked()
+ signal may result in the cursor hovering over a new, valid link
+ - check this and set the appropriate cursor shape. Overwrite
+ mode fixed. Always emit currentAlignmentChanged() when the
+ paragraph alignment changed. Ignore key events which are not
+ handled. Fixed right-alignment in BiDi mode. Key_Direction_L/R
+ will now affect the whole document for non-richtext content.
+ X11 only: Fixed copy on mouse release. Lower impact of an
+ XFree memory leak.
+ Mac only: Always draw selections extended to the full width of the
+ view.
+
+- QTextStream
+ Speed optimization for QTextStream::write().
+
+- QToolBar:
+ Hint about explicit show() call for child widgets to ensure
+ future operability.
+
+- QToolTip
+ Fixed wordbreaking when using both rich text and plain text
+ tooltips. Fixed placement of tooltips for multi-head and Xinerama
+ systems.
+
+- QVariant
+ In toDateTime(), allow conversion from QDate.
+
+- QWhatsThis
+ X11 only: Fixed positioning on dualhead setups.
+ Windows XP only: Improved drawing.
+
+- QWidget
+ X11 only: fixed a show() problem that occurred
+ after few reparents from and to toplevel.
+ Mac only: Fixed showNormal().
+
+- QWindowsStyle
+ Minor visual improvements (popupmenu checkitems, listview
+ branches).
+
+- QWorkspace
+ Obey minimumSizeHint() of document widgets. Do not emit
+ windowActivated() for the already active document window.
+
+- QUrlOperator
+ Relaxed checks for directories.
+
+
+****************************************************************************
+* Extensions *
+****************************************************************************
+
+****************************************************************************
+* Other *
+****************************************************************************
+
+
+****************************************************************************
+* Qt/Embedded-specific changes *
+****************************************************************************
+
+****************************************************************************
+* Qt/Mac-specific changes *
+****************************************************************************
+
+Optimizations and fixes in QPainter and QFont fixed creation and
+raising of top level widgets fixed hovering over titlebar problems.
diff --git a/dist/changes-3.0.4 b/dist/changes-3.0.4
new file mode 100644
index 0000000..e7089a7
--- /dev/null
+++ b/dist/changes-3.0.4
@@ -0,0 +1,214 @@
+Qt 3.0.4 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.0.3
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- Qt 3.0.4 builds on VC++.NET.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QApplication
+ Send wheel events for blocked widgets to the focus widget instead.
+ Windows only: Fixed problems with Korean input methods. Reset
+ the mouse state even when we ignore the next button release.
+
+- QColor:
+ Fixed marking colors created with an invalid color string as
+ invalid.
+
+- QComboBox:
+ QComboBox's listbox now takes the combobox's palette.
+
+- QDataTable:
+ Fixed the scrollbar behaviour when browsing result sets from
+ clients that do not return a query size. Make the table
+ adopt the filter and sort settings from the cursor when
+ setSqlCursor() is called.
+
+- QDateTimeEdit:
+ Update the date/time edit even if the new date/time is
+ invalid.
+
+- QDialog:
+ Respect the minimum and maximum size of the extension grow
+ width/height in showExtension( TRUE ). Don't delete the object
+ immediately for WDestructiveClose, instead use deleteLater()
+ to allow queued events to be processed.
+
+- QDir:
+ Fixed crash when calling entryList() for non-existing
+ directories.
+
+- QDnD:
+ Mac only: Prevent crash when dropping onto a transparent part
+ of a widget.
+
+- QDockWindow:
+ Accelerators of the mainwindow now continue to work if a floating
+ dockwindow becomes active.
+
+- QFileDialog:
+ Windows only: Fixed displaying shared Windows directories
+ (e.g. \\Machine\Folder). Worked around a problem which made
+ QFileDialog hang.
+
+- QFontDataBase:
+ Enumerate all fonts correctly on Windows; also made it faster.
+
+- QGridLayout:
+ Do not crash when a widget inserted with addMultiCellWidget()
+ is deleted.
+
+- QHeader:
+ Fixed setOffset() for vertical headers.
+
+- QIconView:
+ Fixed when clicking and dragging from the edge of an icon, so
+ that the icon will drag immediately rather than when the mouse
+ next passes over it.
+
+- QKeyEvent:
+ Correctly deliver a KeyRelease event with isAutoRepeat
+ set to FALSE after releasing an auto-repeated key.
+
+- QLabel:
+ Fixed so that the label uses paletteForegroundColor() and not
+ the the colorgroup's 'text' color, when displaying richtext.
+
+- QListBox:
+ Performance improvements.
+
+- QListView:
+ When typing in a listview to search for an item, don't select
+ items in Extended selection mode. Speed improvements for
+ selectAll() or (un)selecting a large number of items (e.g by
+ pressing Shift+End) in big listviews (starting from 150.000
+ items).
+
+- QOCIDriver:
+ Allow access to tables not owned by the current user. Use
+ Oracle synonyms for table names. Tables can also be specified
+ as 'OWNER.TABLE'.
+
+- QPainter:
+ Don't delete the tabarray set in setTabArray() in the first
+ drawText() call.
+
+- QPopupMenu:
+ Fixed re-use of menus.
+
+- QPrintDialog:
+ Layout group boxes properly. Fixed function cast in NIS code
+ so that it works on all compiler-platform pairs. Allow NIS on
+ any Unix, not just Solaris.
+
+- QPrinter:
+ Windows only: Implemented printing of rotated pixmaps and
+ images.
+
+- QProcess:
+ Unix and Mac only: Make sure that the processExited() signal
+ is emitted only once for each process. This also fixes a crash
+ that occurred on very rare occasions.
+
+- QProgressBar:
+ Fixed crash bug when totalSteps() was 1. Fixed some painting
+ bugs.
+
+- QPSPrinter:
+ Improvements in printing Japanese. Big speed improvements.
+
+- QRichText:
+ Improved speed of loading plain text and rich text
+ documents. Fixed some internal links which didn't work
+ correctly. Fixed minimumWidth and usedWidth calculations for
+ table layouts of nested tables. Fixed <br> tags within list
+ items. Fixed some memory leaks and cleanup on exit. Now works
+ with fonts that specify sizes in pixels.
+
+- QScrollBar:
+ Release the control, when the scrollbar got hidden while a
+ control was pressed.
+
+- QSimpleRichText:
+ Make sure the painter's properties don't get changed in
+ setWidth().
+
+- QSpinBox:
+ Don't fire the autorepeat timer before valueChanged() is
+ completed, if the up or down button is pressed.
+
+- QSqlDriver:
+ Export DB driver classes under Windows if compiled into the
+ lib.
+
+- QSqlQuery:
+ Reset the last error before a new query is executed.
+
+- QTable:
+ If a row or column is hidden, setRowHeight() and
+ setColumnWidth() no longer cause an immediate resize; instead
+ they store the value for later use, i.e. for when the row or
+ column is shown. Fixed a problem which reset table header
+ sections after inserRows()/insertColumns() calls. showRow()
+ and showColumn() now do nothing if a row/column is already
+ visible. Windows only: Fixed the problem that combobox table
+ items never got smaller than a certain size.
+
+- QTextEdit:
+ Cleaner modified() and setModified() handling (doesn't rely on
+ internal signals anymore, so it is now safe to call
+ setModified() from a slot connected to textChanged()). Fixed
+ selecting text if a margin was set using setMargins(). Fixed
+ crash when calling removeSelectedText() with a selNum larger
+ than 0. Only auto-create a bullet list when typing - or * at
+ the beginning of a line if textFormat() is RichText, not
+ AutoFormat.
+
+- QTitleBar:
+ Don't paint all titlebars in a QWorkspace activated when a
+ dockwindow is the active window.
+
+- QToolBar:
+ Don't show the extension button when the extension menu would
+ not contain any items.
+
+- QUrlOperator
+ Fixed a crash.
+
+- QWaitCondition:
+ Fixed a problem with wait() using invalid timeout values.
+
+- QWorkspace:
+ Also show scrollbars (if enabled), when moving a document
+ window out of the workspace to the left at the top. Never show
+ scrollbars if a document window is maximized.
+
+
+
+****************************************************************************
+* Extensions *
+****************************************************************************
+
+****************************************************************************
+* Other *
+****************************************************************************
+
+Qt Config:
+ X11 only: The default X input methods are now configurable
+ through qtconfig.
+
+****************************************************************************
+* Qt/Embedded-specific changes *
+****************************************************************************
+
+****************************************************************************
+* Qt/Mac-specific changes *
+****************************************************************************
+
diff --git a/dist/changes-3.0.7 b/dist/changes-3.0.7
new file mode 100644
index 0000000..ec084d6
--- /dev/null
+++ b/dist/changes-3.0.7
@@ -0,0 +1,375 @@
+Qt 3.0.7 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.0.6.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Smaller documentation fixes. Some build issues fixed. Upgraded libpng
+to 1.0.15.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction
+ Avoid emitting activated() twice for actions in a
+ toolbar. Possibility to remove an iconset from an action by
+ specifying a null iconset.
+
+- QApplication
+ Fixed a font sharing problem with setFont(). Fixed window
+ close with modality. Don't overwrite an explicitely set font
+ with the default font when using the static methods before
+ calling the constructor. When the programmer/user explicitly
+ sets the style (either with QApplication::setStyle or -style
+ command line option), do not reset the style on settings
+ changes.
+ Windows only: Serialize calls to OutputDebugString, as this
+ API is not reentrant. Emit aboutToQuit() when the user logs
+ off. Send a focusOut event to the focus widget when the user
+ tries to switch applications via Alt+Tab.
+ Windows95/98/Me: Fixed enter/leave handling. Among others this
+ makes tooltips work more reliable.
+ X11 only: Spit out warning then the user passes an invalid
+ Display* argument. Fixed figuring out the depth of the visual
+ in case a private colormap is supplied. Some startup
+ performance improvements with QSettings. Mark the internal
+ wakeUpGuiThread() pipe with FD_CLOEXEC. Call XFilterEvent
+ before the public X11 event filters to avoid applications
+ filtering out events that are necessary for input methods to
+ operate.
+
+- QBuffer
+ Make IO_Truncate not detach the explicitely shared byte array.
+
+- QButton
+ In setPixmap(), avoid relayouting if the new pixmap doesn't
+ change the size.
+
+- QCanvasEllipse
+ Windows only: Workaround a Windows limitation that doesn't
+ support 2x2 ellipse rendering without a pen. Don't try to
+ double buffer invalid areas.
+
+- QClipboard
+ Flush the clipboard contents when the application object is
+ destroyed.
+ X11 only: another race condition fixed. Handle paste
+ operations with empty data.
+
+- QComboBox
+ Accept enter/return key press events on the line edit. Fixed
+ vertical alignment of text when a global strut is set. Clip
+ drawing of large items. Fixed problem with items not being
+ highlighted the first time the popup is shown.
+
+- QCommonStyle
+ Fixed SR_CheckBoxFocusRect for empty checkboxes (now inside
+ the indicator)
+
+- QComplexText
+ Added correct positioning specs for all of thai and lao. Some
+ reordering fixes.
+
+- QCustomEvent
+ Removed bogus warning on illegal type ids.
+
+- QDataTable
+ Don't display a single empty row if result set is empty and
+ QuerySize cannot be determined. Don't resize the table after a
+ refresh() if the size is already known.
+ In closeEvent(), accept the event only when isHidden()
+
+- QDateTime
+ Fixed addYears() for days missing in certain years.
+
+- QDns
+ Slightly more reliable now, fixed a memory leak.
+
+- QDockArea
+ Fixed resizing of a QDockWindow is no longer affected by
+ another closed QDockWindow in the same QDockArea.
+
+- QDom
+ Fixed memory consumption when QDomElement::setAttribute() is
+ called multiple times to change the value of an
+ attribute. Fixed a memory leak in QDomDocument::importNode().
+
+- QDragManager
+ X11 only: Fixed a dangling pointer case when the current
+ widget was deleted. Raise cursor decoration.
+ Windows only: Made dropping of URLs work on Japanese Windows98
+
+- QEffects
+ More robust through deferred deletion. Some code improvements.
+ X11 only: disable effects on displays with <16bpp (rather then
+ falling back to the scrolling).
+
+- QFileDialog
+ Fixed problems with '#' in path. Fixed creation on
+ non-existing directories. Make previewMode() check if
+ the preview widgets are visible. Enable renaming in
+ ExistingFiles mode. Fix drag'n'drop for the first click into
+ the listbox. Don't auto-complete when saving a file. Enabled
+ drag'n'drop of files for all modes.
+
+- QFont
+ Windows only: Fixed boundingRect(QChar) for non true type
+ fonts. Fixed some positioning issues with Thai diacritics.
+ Win95 only: Make symbol fonts work.
+ X11 only: Fixed some issues with diacritics in non unicode
+ encoded fonts.
+
+- QFontDialog
+ Fixed getFont() in case no default font is specified.
+
+- QFrame
+ Fixed erasing the margin region for flicker-optimized
+ subclasses (e.g. QLineEdit). Turn on focus and mouse-over
+ style flags for frame painting.
+
+- QHeader
+ Some speed improvements for the sake of QTable and
+ QListView. Fix redrawing problems when moving header sections.
+
+- QIconView
+ Fixed contentsContextMenuEvent(). Only call
+ QIconViewItem::dragLeft() when the cursor has left the
+ bounding rect and only call QIconViewItem::dragEnter() when
+ the cursor has entered the bounding rect. Some performance
+ improvements.
+
+- QInputContext
+ X11 only: Improved XFontSet cache (also for cases where the X
+ server does not know the locale).
+
+- QKeyEvent
+ Windows only: Fixed internal ascii to keycode conversion for
+ codes > 0x80.
+
+- QLineEdit
+ Fixed doubleclick selection to only use spaces as word
+ seperators. Don't validate twice in a row if fixup() did
+ nothing. Fixed support for background pixmaps. Improved undo
+ mechanism. Respect maxLength() in setText().
+
+- QListBox
+ Fixed null-pointer crash in extended selection mode.
+
+- QListView
+ Improved auto scrolling. Restrict drop events to items that
+ have drop enabled and accept the event. Added more
+ null-pointer checks to prevent crashes when reimplementing
+ insertItem. Try harder to draw the focus rectangle with an
+ appropriate contrast. Do not resize a stretachable column in
+ widthChanged(). Fixed selecting when auto scrolling.
+
+- QLocalFs
+ The network protocol for local file systems sets sets the
+ right permissions for the QUrlInfo objects if you do a
+ QUrlOperator::listChildren().
+
+- QMainWindow
+ Fixed orientation handler calls.
+
+- QMenuBar
+ Fixed resizing when it was emptied. Caused some strange
+ problems in QMainWindow widgets. Allow stealing of focus in
+ alt-mode. Activate alt-mode only with the plain Alt key, not
+ AltGr.
+
+- QMimeSourceFactory
+ Windows only: If a path starts with \\ then it's an absolute
+ path pointing to a network drive
+
+- QMovie
+ For animated GIFs, use a minimum delay of 10ms. This is
+ compatible with both IE and Mozilla and avoids huge loads on
+ application and X-Server.
+
+-QPainter
+ Fixed pos() in combination with transformations save/restore
+ pairs. Fixed a bug in the BiDi algorithm.
+ X11 only: some problems when drawing rotated text on Solaris
+ fix (due to floating point arithmetrics). Fixed a matrix
+ related crash on Tru64.
+ Windows only: Draw end pixel in lineTo only for 0-width
+ pens. Avoid painting with invalid transformations.
+
+- QPaintDeviceMetrics
+ Windows only: Fixed numColors() for 32 bit displays.
+
+- QPixmap
+ Windodws only: Fixed array bounds read error in win32
+ function in convertFromImage.
+
+- QPopupMenu
+ Avoid flickering when showing a just created menu
+ immediately. If there is a custom QWhatsThis installed for the
+ whole menu but no whatsThis set for the item, use the custom
+ QWhatsThis to get the help text.
+ MacOS only: improved scrollable popups
+
+- QPrintDialog
+ Unix only: Continue parsing the nsswitch.conf file using
+ additional services when /etc/printers.conf is not found.
+ Windows only: Handle lack of default printers more
+ gracefully. Fix reentrancy issues when reading printer dialog
+ settings.
+
+- QPrinter
+ Unix only: Fixes for 64 bit safety.
+ Windows only: fixed a possible double-freeing of memory of a
+ hdc passed to the Windows Common Dialog.
+
+- QProcess
+ Windows only: Less command quoting for clients that use
+ GetCommandLine() directly. Make tryTerminate() robust in case
+ the process does not run. Make it possible to start batch
+ files with spaces in the filename. Make it safe to call
+ qApp->processEvents() in a slot connected to
+ QProcess::readyReadStdout().
+
+- QPSPrinter
+ Fixed codec for korean postscript fonts (ksc5601.1987-0, not
+ the listbox. Don't auto-complete when saving a fileeucKR).
+
+- QRichText
+ Fixed a case-sensitive compare for alignment. Fixed a free'd
+ memory access problem with floating items on destruction.
+
+- QScrollView
+ If a contents mouse event is accepted, don't propagate as
+ a normal mouse event.
+
+- QSemaphore
+ Fixed race condition in operator -=.
+ Unix only: a bit more robust.
+
+- QSettings
+ Unix only: Fixed requesting subkeylists for single
+ subkeys. Don't read in QSettings stuff in non-gui mode if
+ desktop-settings-aware is set to false.
+
+- QSlider
+ Emit sliderMoved() after the slider was moved.
+
+- QSocket
+ If the read retruns 0, safely assume assume that the peer
+ closed the connection. Fixed readyRead sometimes not being
+ emitted.
+
+- QSpinBox
+ Fixed setValue so it will ignore input but yet
+ not interpreted text
+
+- QSqlDatabase
+ Fixed a crash on manual deletion of the QApplication object.
+
+- QSqlDriver
+ Various fixes and improvements for Oracle, Postgres, MySQL
+
+- QSqlForm
+ Fixed crash in clearValues() on empty fields.
+
+- QString
+ Fixed setNum(n,base) with n == LONG_MIN and n != 10. Make
+ toLong() and toULong() 64bit clean (problems on Tru64).
+
+- QStyle
+ Make more use of Style_HasFocus. Enforce a usable size for
+ subcontrols for small scrollbars. Improve titlebar drawing
+ (e.g. no gradient on 95/NT). Allow drawing of list view
+ expand controls without branches .
+ In Windows style: increase default PM_MaximumDragDistance
+ value.
+ Windows only: fixed PM_ScrollBarExtent
+
+- QStyleSheet
+ More accurate mightBeRichText() heuristic. Fixed setMargin()
+ to only set left/right/top/bottom as documented, not the
+ firstline margin.
+
+- QSvgDevice
+ Fixed curve command mixup. Some bounding rect fixes. Fixed
+ output coordinates for drawArc, drawPie and drawChord. Proper
+ x-axis-rotation and other angle fixes for arcs, pies and
+ chords. Respect text alignments. No background for Bezier
+ the listbox. Don't auto-complete when saving a filecurves.
+
+- QTabBar
+ Move focus to the current tab if the tab with focus is being
+ removed.
+
+- QTable
+ Fixed contentsContextMenuEvent(). Fixed
+ adjustRow()/adjustColumn() for multi line sections. Support
+ for QApplicaton::globalStrut(). Speed improvements for
+ setNumRows(). Improved sizeHint() to include the left/top
+ header. Fix for mouse release handling. Update geometry of
+ cell widgets when changing rowHeight/colWidth. Fixed
+ QTableItem::sizeHint() for items with wordwrap. Catch
+ hideColumn() on tables with too few columns. Fixed an endless
+ recursion when swapping header sections.
+
+- QTableItem
+ Fixed multiple calls to setSpan().
+
+- QTextCodec:
+ Initialize locale before loading textcodec plugins. Fixed a
+ bug in the unicode -> jisx0208 conversion table.
+
+- QTextEdit
+ Reset cursor on undos that leave us with an empty
+ textedit. Quote quotes when exporting rich text. Fixed
+ possible crash when appending empty paragraphs like
+ "<p>". Some drawing problems fixed. Made removeParagraph() and
+ friends work in read-only mode. Fixed cursor blinking with
+ setEnabled() / setDisabled(). When exporting HTML, quote the
+ src attribute of img tags tags that contains spaces. Made
+ setFormat() much faster in case undo/redo is disabled. Fixed
+ double deletion crash when clearing a document with floating
+ custom items.
+
+- QToolButton
+ In sizeHint() don't reserve space for icons if button has
+ only a textlabel. Made popups more robust (e.g. if the slot
+ connected to the popup menu results in the destruction of the
+ toolbutton)
+
+- QVariant
+ Fixed canCast() for Bool -> String conversion. Fixed
+ operator== for maps.
+
+- QWaitCondition
+ Windows only: Fixed multiple waits()
+
+- QWheelEvent
+ X11 only: Support for two-wheel mice. This relies on the
+ X-Server option "ZAxisMapping" "4 5 6 7"
+ On Windows, we have not found a reliable way to distringuish
+ the two wheels. Some drivers use larger deltas, something that
+ breaks with other drivers.
+
+- QWidget
+ Make focusWidget() return the focus widget even if it has no
+ focus policy. In setEnabled(FALSE) always clear the focus.
+ Made grabWidget() more robust. Fixed isEnabledTo().
+ X11 only: set WM_WINDOW_ROLE instead of WINDOW_ROLE.
+ Windows only: fixed widget-origin pixmap backgrounds.
+
+- QWidgetStack
+ More fixes to reduce flicker.
+
+- QWorkspace
+ Traditional activeWindow() fixes. Make maximizing a window while
+ the workspace is invisible work. If the already active window
+ is clicked on, transfer focus to the child. Restore focus to
+ old subcontrol when changing the active MDI window. Make sure
+ a MDI window is not resized below a child widget's minimum
+ size. Do not allow resizing windows when we have an active
+ popup window.
+
+- QXmlSimpleReader
+ Fixed a memory leak for incremental parsing.
diff --git a/dist/changes-3.1.0 b/dist/changes-3.1.0
new file mode 100644
index 0000000..f080946
--- /dev/null
+++ b/dist/changes-3.1.0
@@ -0,0 +1,334 @@
+Qt 3.1 introduces many significant new features and many improvements
+over the 3.0.x series. This file provides an overview of the main
+changes since version 3.0.x. For further details see the online
+documentation which is included in this distribution, and also
+available at http://doc.trolltech.com/.
+
+The Qt version 3.1 series is binary compatible with the 3.0.x series:
+applications compiled for 3.0 will continue to run with 3.1.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt Script for Applications
+--------------------------
+Qt 3.1 is the first Qt release that can be used with Qt Script for
+Applications (QSA). QSA provides a scripting engine, an IDE for
+creating and editing scripts and script forms, and bindings to the Qt
+API. Script-enabling a Qt application is not difficult and the IDE
+makes it easy for resellers and end-users to write their own scripts.
+QSA is due for release after Qt 3.1.
+
+
+Qt Designer
+-----------
+Qt Designer, the visual GUI builder, has undergone several usability
+improvements. A new dialog for creating and editing signals and slots
+connections has been created: it is much easier to use and much faster
+for setting up multiple connections. The widgets are now presented in
+an easy-to-use toolbox rather than in toolbars (although you can still
+have the toolbars if you want). The property editor now handles common
+properties in multiple widgets simultaneously. By popular demand,
+WYSIWYG support for QWidgetStack has been added. Rich text is now
+supported with a rich text editor. And the code editor can be used for
+ordinary member functions as well as for slots.
+
+
+Qt Assistant
+------------
+Qt Assistant, the Qt documentation browser, can now be used with
+custom documentation sets. This new functionality combined with the
+new QAssistantClient class means that you can use Qt Assistant as a
+help browser for your own applications. Qt Assistant has also been
+enhanced by the addition of a fast full text search engine.
+
+
+Motif
+-----
+The general industry-wide move away from Motif is leaving more and
+more companies in need of a migration solution. But converting large
+legacy applications in one step is often impractical. To minimize
+risks and to manage the workload companies often want to port code on
+a module by module basis. Qt 3.1 includeds a completely new Motif
+module that supports hybrid applications in which Qt code and Motif
+code coexist. (This obsoletes the earlier rudimentary Qt Xt/Motif
+extension.)
+
+
+ActiveX
+-------
+With the release of Qt 3.1, customers who use Qt for Microsoft Windows
+development can now use Qt with ActiveX. The new ActiveQt module
+provides a simple API for COM and ActiveX. The module can be used to
+create applications which host ActiveX controls, and also to create
+applications that serve ActiveX controls (e.g. Internet Explorer
+plugins).
+
+
+Qt/Mac
+------
+The introduction of Qt/Mac, a Mac OS X port of Qt, with Qt 3.0 has
+proved a great success. This port has undergone many improvements in
+Qt 3.1, especially with respect to Appearance Manager, anti-aliased
+text and user settings. The Qt OpenGL support is greatly improved, and
+uses the hardware-accelerated drivers.
+
+
+Qt/Embedded
+-----------
+Graphics, mouse and keyboard drivers can now be compiled as plugins.
+
+
+Qt library
+----------
+In addition to the new additions and enhancements referred to above,
+as with all major Qt releases, Qt 3.1 includes hundreds of
+improvements in the existing class library. Here is a brief summary of
+the most significant changes:
+
+- QTextEdit has a new text format: LogText. This is a performance and
+ memory optimized format especially designed for the fast display of
+ large amounts of text. The format supports basic highlighting,
+ including bold and colored text.
+
+- The new QSyntaxHighlighter class makes it both easy and efficient to
+ add syntax highlighting capabilities to a QTextEdit.
+
+- QHttp and QFtp in earlier Qt's were implementations of the
+ QNetworkProtocol. Both have been extended to stand in their own
+ right. If you missed some flexibility in the network protocol
+ abstractions of earlier Qt's, the new QHttp and QFtp classes should
+ provide the solution.
+
+- QAccel, used to handle keyboard shortcuts, now gracefully copes with
+ shortcut clashes. If a clash occurs, a new signal,
+ activatedAmbiguously(), is emitted. Classes that use QAccel, like
+ QButton's subclasses and QPopupMenu, make use of this new
+ functionality. Futhermore QAccel can now handle multi-key sequences,
+ for example, Ctrl+X,Ctrl+F.
+
+- QClipboard has been extended to simplify data exchange between
+ programs.
+
+- Thread support: almost all methods in the tools classes have been
+ made reentrant. QApplication::postEvent() and a few other methods
+ are now thread-safe if Qt is compiled as a multi-threaded library.
+ (The documentation now states if a class or function is thread-safe
+ or reentrant.)
+
+- A QMutexLocker class has been added to simplify the locking and
+ unlocking of mutexes.
+
+- Input methods: A selectionLength() function has been added to
+ QIMEvent. Japanese compositions are now handled correctly. Support
+ for AIMM based input methods (those working on non-Asian versions of
+ Win95/98/Me) has been added.
+
+- Large File support: Qt's internals have been modified to support
+ Large Files (> 2GB). QFileDialog will now correctly display and
+ select large files.
+
+- SQL module: Support for prepared query execution and value binding
+ has been added. Among other benefits, this makes it possible to
+ write large BLOBs (> 2 KB) to Oracle databases, and to write Unicode
+ strings to SQL Server databases.
+
+- Support for XIM on Solaris.
+
+Build process
+-------------
+The build process has been improved:
+
+- The configure script does not need QTDIR to be set anymore.
+
+- Improved support for building Qt on MSVC.NET.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAccel:
+ Corrected illegal accelerator state when using multiple
+ keysequences. (Resulted in no accelerator being triggered when
+ there's a partial match). Only triggers on enabled
+ accelerators and their enabled items. Eats all keys in a
+ keysequence, not just the first and last.
+
+- QCString:
+ Speed-optimized replace().
+
+- QDataStream:
+ Applies to printable data streams only: If the version number
+ of the device is less than 4, use the same streaming format
+ that was used in Qt 2.3 and earlier.
+
+- QDataTable:
+ Respect read-only columns. Make it possible to swap columns.
+
+- QDockWindow:
+ Added a standard widget constructor (taking a QWidget *parent,
+ const char *name and WFlags). Improved docking behavior.
+
+- QFileDialog:
+ Windows only: make Qt's filedialog work properly with network
+ paths.
+
+- QFontMetrics:
+ Windows only: Fixed QFontMetrics::boundingRect( QChar c ) to
+ work for non-TrueType fonts.
+
+- QHeader:
+ Optimized the sectionSizeHint() calculation, which in turn
+ speeds up all QHeader size/label calculations.
+
+- QIconFactory:
+ Avoid infinite loops when recursively calling
+ QPixmap::pixmap().
+
+- QIconView:
+ Fixed navigation and selection with arrow keys. Some speedups
+ when repainting.
+
+- QKeySequence:
+ Treat Unicode characters in string defined sequences
+ correctly. So, now letters like Æ, Ø and Å should work as
+ accelerators, even through translation files.
+
+- QLayout:
+ alignmentRect() respects the layout's maximum size.
+
+- QLineEdit:
+ Added a lostFocus() signal. Double-clicking only uses spaces
+ as word bounderies for the selection now, not dots, commas,
+ etc. Support double-click+mousemove selection.
+
+- QListBox:
+ Fixed the item which is passed into the contextMenuRequested()
+ signal (this was sometimes wrong). Don't select items that are
+ not selectable.
+
+- QListView:
+ Shift selection in Extended mode now follows Windows
+ Shift-selection standard. Erase empty area when drawing
+ listviews without columns. Only drops on drop-enabled items
+ that accept drops.
+
+- QListViewItem:
+ Optimized size claculation for multi-line items.
+
+- QMainWindow:
+ Base the minimumSizeHint() on the sizeHint()s of the left hand
+ dock area (instead of the minimumSize()).
+
+- QMenuBar:
+ Fixed broken Alt release detection. Fixed flickering. Fixed
+ empty menubars resizing properly.
+
+- QObject:
+ Fixed return value of disconnect(). Fixed disconnect()ing
+ SIGNALs from SIGNALs and disconnect()ing multiple SLOTs with
+ the same name from a SIGNAL.
+
+- QProcess:
+ Unix only: Don't eat the file descriptors if a lot of
+ processes (with short runtimes) are started immediately after
+ each other.
+
+- QPSQLDriver:
+ Make the driver compile with the standard PostgreSQL source
+ distribution under Windows. Better handling of network,
+ datetime and geometrical datatypes.
+
+- QRegion:
+ Fixed setRects() to calculate the bounding rectangle
+ correctly.
+
+- QScrollView:
+ Doesn't reposition the view when the user is scrolling the
+ view.
+
+- QSpinBox:
+ Fixed setValue() so that any not-yet-interpreted input is
+ ignored when setting a new value.
+
+- QString:
+ Support QTextCodec::codecForCStrings(). Support
+ std::string<==>QString conversion when STL support is on.
+
+- QSyntaxHighlighter:
+ Added function rehighlight(). Improved internals to be more
+ efficient (less calls to highlightParagraph() necessary).
+
+- QTable:
+ Fixed Tab/BackTab handling to always work. Fixed
+ setColumnLabels() and setRowLabels().
+
+- QTableItem (and subclasses):
+ Now supports global struts. (See QApplication::globalStrut().)
+
+- QTDSDriver:
+ Added support for binary datatypes.
+
+- QTextCodec:
+ Added QTextCodec::codecForCStrings and QTextCodec::codecForTr.
+
+- QTextEdit:
+ Fixed a painting error which resulted in areas of the textedit
+ not being erased correctly. Make sure repainting is done after
+ changing the underline-links setting. Renamed 'allowTabs'
+ property to 'tabChangesFocus' (inverted value). Added a new
+ property 'autoFormatting'. When exporting HTML also quote
+ quotes. Fixed a background erasing bug which messed up the
+ view.
+
+- QUrl:
+ Recognize Windows drive letters not only in the form of "c:/"
+ but also in the form "c:" (without the '/').
+
+- QWidget:
+ Fixed some visibility issues.
+
+****************************************************************************
+* Qt Designer *
+****************************************************************************
+
+- Now displays the classname of "gray box" custom widgets in the gray
+ box on the form.
+
+- Accept tildes (~) in the project settings.
+
+- A new command line tool conv2ui (in qt/tools/designer/tools) has
+ been added, to convert dialog description files from different file
+ formats to .ui files without the need to invoke Qt Designer. This
+ tool uses the same plugins as Qt Designer for loading other dialog
+ description files.
+
+- An import filter for .kdevdlg files has been added.
+
+- Actions in the action editor are now sortable.
+
+- Improved usability of more dialogs (in-place renaming, drag'n'drop,
+ etc.)
+
+- Preserve creation order of forward declarations, variables, etc.
+
+- Save comments for actions.
+
+- uic: Fixed generating code for QStringList properties.
+
+****************************************************************************
+* Qt Assistant *
+****************************************************************************
+
+- Fixed some accelerator conflicts.
+
+****************************************************************************
+* Qt Linguist *
+****************************************************************************
+
+- Handle trailing backslash in strings correctly in lupdate.
+
+******************************** END ***************************************
diff --git a/dist/changes-3.1.0-b1 b/dist/changes-3.1.0-b1
new file mode 100644
index 0000000..527992f
--- /dev/null
+++ b/dist/changes-3.1.0-b1
@@ -0,0 +1,692 @@
+Qt 3.1 introduces many significant new features and many improvements
+over the 3.0.x series. This file provides an overview of the main
+changes since version 3.0.5. For further details see the online
+documentation which is included in this distribution, and also
+available at http://doc.trolltech.com/.
+
+The Qt version 3.1 series is binary compatible with the 3.0.x series:
+applications compiled for 3.0 will continue to run with 3.1.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt Script for Applications
+--------------------------
+Qt 3.1 is the first Qt release that can be used with Qt Script for
+Applications (QSA). QSA provides a scripting engine, an IDE for
+creating and editing scripts and script forms, and bindings to the Qt
+API. Script-enabling a Qt application is not difficult and the IDE
+makes it easy for resellers and end-users to write their own scripts.
+QSA is due for release after Qt 3.1.
+
+
+Qt Designer
+-----------
+Qt Designer, the visual GUI builder, has undergone several usability
+improvements. A new dialog for creating and editing signals and slots
+connections has been created: it is much easier to use and much faster
+for setting up multiple connections. The widgets are now presented in
+an easy-to-use toolbox rather than in toolbars (although you can still
+have the toolbars if you want). The property editor now handles common
+properties in multiple widgets simultaneously. By popular demand,
+WYSIWYG support for QWidgetStack has been added. Rich text is now
+supported with a rich text editor. And the code editor can be used for
+ordinary member functions as well as for slots.
+
+
+Qt Assistant
+------------
+Qt Assistant, the Qt documentation browser, can now be used with
+custom documentation sets. This new functionality combined with the
+new QAssistantClient class means that you can use Qt Assistant as a
+help browser for your own applications. Qt Assistant has also been
+enhanced by the addition of a fast full text search engine.
+
+
+Motif
+-----
+The general industry-wide move away from Motif is leaving more and
+more companies in need of a migration solution. But converting large
+legacy applications in one step is often impractical. To minimize
+risks and to manage the workload companies often want to port code on
+a module by module basis. Qt 3.1 includeds a completely new Motif
+module that supports hybrid applications in which Qt code and Motif
+code coexist. (This obsoletes the earlier rudimentary Qt Xt/Motif
+extension.)
+
+
+ActiveX
+-------
+With the release of Qt 3.1, customers who use Qt for Microsoft Windows
+development can now use Qt with ActiveX. The new ActiveQt module
+provides a simple API for COM and ActiveX. The module can be used to
+create applications which host ActiveX controls, and also to create
+applications that serve ActiveX controls (e.g. Internet Explorer
+plugins).
+
+
+Qt/Mac
+------
+The introduction of Qt/Mac, a Mac OS X port of Qt, with Qt 3.0 has
+proved a great success. This port has undergone many improvements in
+Qt 3.1, especially with respect to Appearance Manager, anti-aliased
+text and user settings. The Qt OpenGL support is greatly improved, and
+uses the hardware-accelerated drivers.
+
+
+Qt/Embedded
+-----------
+Graphics, mouse and keyboard drivers can now be compiled as plugins.
+
+
+Qt library
+----------
+In addition to the new additions and enhancements referred to above,
+as with all major Qt releases, Qt 3.1 includes hundreds of
+improvements in the existing class library. Here is a brief summary of
+the most significant changes:
+
+- QTextEdit has a new text format: LogText. This is a performance and
+ memory optimized format especially designed for the fast display of
+ large amounts of text. The format supports basic highlighting,
+ including bold and colored text.
+
+- The new QSyntaxHighlighter class makes it both easy and efficient to
+ add syntax highlighting capabilities to a QTextEdit.
+
+- QHttp and QFtp in earlier Qt's were implementations of the
+ QNetworkProtocol. Both have been extended to stand in their own
+ right. If you missed some flexibility in the network protocol
+ abstractions of earlier Qt's, the new QHttp and QFtp classes should
+ provide the solution.
+
+- QAccel, used to handle keyboard shortcuts, now gracefully copes with
+ shortcut clashes. If a clash occurs, a new signal,
+ activatedAmbiguously(), is emitted. Classes that use QAccel, like
+ QButton and QPopupMenu, make use of this new functionality.
+ Futhermore QAccel can now handle multi-key sequences, for example,
+ Ctrl+X,Ctrl+F.
+
+- QClipboard has been extended to simplify data exchange between
+ programs.
+
+- Thread support: almost all methods in the tools classes have been
+ made reentrant. QApplication::postEvent() and a few other methods
+ are now thread-safe if Qt is compiled as a multi-threaded library.
+ (The documentation now states if a class or function is thread-safe
+ or reentrant.)
+
+- A QMutexLocker class has been added to simplify the locking and
+ unlocking of mutexes.
+
+- Input methods: A selectionLength() function has been added to
+ QIMEvent. Japanese compositions are now handled correctly. Support
+ for AIMM based input methods (those working on non-Asian versions of
+ Win95/98/Me) has been added.
+
+- Large File support: Qt's internals have been modified to support
+ Large Files (> 2GB). QFileDialog will now correctly display and
+ select Large Files.
+
+- SQL module: Support for prepared query execution and value binding
+ has been added. Among other benefits, this makes it possible to
+ write large BLOBs (> 2 KB) to Oracle databases, and to write Unicode
+ strings to SQL Server databases.
+
+
+Build process
+-------------
+The build process has been improved:
+
+- The configure script does not need QTDIR to be set anymore.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+New classes
+==================
+
+- QBackInsertIterator
+- QEventLoop
+- QIconFactory
+- QMutexLocker
+- QSyntaxHighlighter
+
+
+QAction
+------------------
+New functions:
+ void setVisible( bool )
+ bool isVisible() const
+
+
+QCanvas
+------------------
+New functions:
+ void invalidate()
+ bool isValid() const
+
+
+QColorDialog
+------------------
+New functions:
+ static void setStandardColor( int, QRgb )
+
+
+QAccel
+------------------
+New signals:
+ void activatedAmbiguously( int id )
+
+
+QApplication
+------------------
+The event loop has been moved to the QEventLoop class, making it
+easier to integrate other toolkits with Qt.
+
+New functions:
+ QEventLoop *eventLoop() const
+ void setEventLoop( QEventLoop * )
+ QString sessionKey() const
+
+
+QClipboard
+------------------
+New functions:
+ void clear( Mode mode )
+ bool supportsSelection() const
+ bool ownsSelection() const
+ bool ownsClipboard() const
+ QString text( Mode mode ) const
+ QString text( QCString& subtype, Mode mode ) const
+ void setText( const QString &, Mode mode )
+ QMimeSource *data( Mode mode ) const
+ void setData( QMimeSource*, Mode mode )
+ QImage image( Mode mode ) const
+ QPixmap pixmap( Mode mode ) const
+ void setImage( const QImage &, Mode mode )
+ void setPixmap( const QPixmap &, Mode mode )
+
+
+QDesktopWidget
+------------------
+New functions:
+ const QRect& screenGeometry( QWidget *widget ) const
+ const QRect& screenGeometry( const QPoint &point ) const
+ const QRect& availableGeometry( int screen ) const
+ const QRect& availableGeometry( QWidget *widget ) const
+ const QRect& availableGeometry( const QPoint &point ) const
+
+
+QFileDialog
+------------------
+Large Files (> 2GB) are now correctly displayed and selected.
+
+
+QFileInfo
+------------------
+QFileInfo now supports Large Files (> 2GB) internally. To maintain
+binary compatibility the QFileInfo API cannot be adapted before Qt 4
+and will truncate file sizes and offsets to 4 GB.
+
+New functions:
+ bool isHidden() const
+
+
+QFile
+------------------
+QFile now supports Large Files (> 2GB) internally. To maintain binary
+compatibility the QFile API cannot be adapted before Qt 4 and will
+truncate file sizes and offsets to 4 GB.
+
+
+QDir
+------------------
+QDir now supports Large Files (> 2GB).
+
+
+QImEvent
+------------------
+New functions:
+ in selectionLength() const
+
+
+QIconSet
+------------------
+New functions:
+ void installIconFactory( QIconFactory *factory )
+
+
+QImage
+------------------
+New functions:
+ static QImage fromMimeSource( const QString& abs_name )
+
+
+QMetaObject
+------------------
+New functions:
+ QStrList enumeratorNames( bool super ) const
+ int numEnumerators( bool super ) const
+ static bool hasMetaObject( const char *class_name )
+
+
+QMenuData
+------------------
+New functions:
+ bool isItemVisible( int id ) const
+ void setItemVisible( int id, bool visible )
+Both functions are inherited by QMenuBar and QPopupMenu
+
+
+QPaintDevice
+------------------
+New functions (x11 only):
+ static Qt::HANDLE x11AppRootWindow()
+ static int x11AppDepth( int screen )
+ static int x11AppCells( int screen )
+ static Qt::HANDLE x11AppRootWindow( int screen )
+ static Qt::HANDLE x11AppColormap( int screen )
+ static void *x11AppVisual( int screen )
+ static bool x11AppDefaultColormap( int screen )
+ static bool x11AppDefaultVisual( int screen )
+ static int x11AppDpiX( int )
+ static int x11AppDpiY( int )
+ static void x11SetAppDpiX( int, int )
+ static void x11SetAppDpiY( int, int )
+
+
+QPicture
+------------------
+New functions:
+ void setBoundingRect( const QRect &r )
+
+
+QPixmap
+------------------
+New functions:
+ bool hasAlpha() const
+ static QPixmap fromMimeSource( const QString& abs_name )
+
+
+QPrinter
+------------------
+New functions:
+ void setMargins( uint top, uint left, uint bottom, uint right )
+ void margins( uint *top, uint *left, uint *bottom, uint *right ) const
+
+Improvements:
+ Handle masked images and pixmaps correctly. Add code to handle
+ asymmetrical printer margins correctly.
+
+
+QSessionManager
+------------------
+New functions:
+ QString sessionKey() const
+
+
+QStyleOption
+------------------
+New functions:
+ QStyleOption( QCheckListItem* i )
+ QCheckListItem* checkListItem() const
+
+New enums values:
+ PE_CheckListController, PE_CheckListIndicator,
+ PE_CheckListExclusiveIndicator, PE_PanelGroupBox
+ CE_MenuBarEmptyArea
+ CE_DockWindowEmptyArea
+ PM_CheckListButtonSize
+ CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit
+ SH_GroupBox_TextLabelVerticalAlignment
+
+
+QThread
+------------------
+New functions:
+ void terminate()
+
+
+QTranslator
+------------------
+New functions:
+ bool load( const uchar *data, int len )
+
+
+QVariant
+------------------
+New functions:
+ QVariant( const QPen& )
+ const QPen toPen() const
+ QPen& asPen()
+ bool isNull() const
+
+New enum values:
+ KeySequence, Pen
+
+
+QWidget
+------------------
+All top-level widgets will now try to find an appropriate application
+icon when they're not given one, trying in this order
+ 1. Parent widget's icon
+ 2. Top-level widget's icon
+ 3. Application main widget's icon
+
+New functions:
+ bool isFullScreen() const
+ void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE )
+
+New enum values:
+ AncestorOrigin
+
+
+QWMatrix
+------------------
+Two different transformation modes for painter transformations are now
+available. See the QWMatrix documentation for details.
+
+New functions:
+ QPointArray mapToPolygon( const QRect &r ) const
+ double det() const
+ static void setTransformationMode( QWMatrix::TransformationMode m )
+ static TransformationMode transformationMode()
+
+New enums:
+ TransformationMode { Points, Areas }
+
+
+QFtp
+------------------
+While still remaining a subclass of QNetworkProtocol, QFtp can be now
+used directly for more advanced FTP operations. The QFtp documentation
+provides details of the extensions to the API.
+
+
+QHttp
+------------------
+While still remaining a subclass of QNetworkProtocol, QHttp can be now
+used directly for more advanced HTTP operations. The QHttp
+documentation provides details of the extensions to the API.
+
+Related new classes:
+ QHttpHeader
+ QHttpResponseHeader
+ QHttpRequestHeader
+
+
+QSqlDriver
+------------------
+New enum values:
+ Unicode, PreparedQueries, OracleBindingStyle, ODBCBindingStyle
+
+
+QSqlQuery
+------------------
+New functions:
+ bool isForwardOnly() const
+ void setForwardOnly( bool forward )
+ bool exec()
+ bool prepare( const QString& query )
+ void bindValue( const QString& placeholder, const QVariant& val )
+ void bindValue( int pos, const QVariant& val )
+ void addBindValue( const QVariant& val )
+
+
+QTableSelection
+------------------
+New functions:
+ QTableSelection( int start_row, int start_col, int end_row, int end_col )
+
+
+QTable
+------------------
+New properties:
+ int numSelections
+
+New functions:
+ void selectCells( int start_row, int start_col, int end_row, int end_col )
+ void selectRow( int row )
+ void selectColumn( int col )
+ void updateHeaderStates()
+ void setRowLabels( const QStringList &labels )
+ void setColumnLabels( const QStringList &labels )
+
+
+QCString
+------------------
+New functions:
+ QCString &replace( char c, const char *after )
+ QCString &replace( const char *, const char * )
+ QCString &replace( char, char )
+
+New global functions:
+ QByteArray qCompress( const uchar* data, int nbytes )
+ QByteArray qUncompress( const uchar* data, int nbytes )
+ QByteArray qCompress( const QByteArray& data )
+ QByteArray qUncompress( const QByteArray& data )
+Improvements:
+ Speed optimisations in lots of the old search and replace
+ functions.
+
+
+QDate
+------------------
+New functions:
+ int weekNumber( int *yearNum = 0 ) const
+ static QDate currentDate( Qt::DateTimeSpec )
+
+
+QTime
+------------------
+New functions:
+ static QTime currentTime( Qt::DateTimeSpec )
+
+
+QDateTime
+------------------
+New functions:
+ static QDateTime currentDateTime( Qt::DateTimeSpec )
+
+
+QPtrList
+------------------
+New functions:
+ bool replace( uint i, const type *d )
+
+
+QRegExp
+------------------
+New functions:
+ QString errorString()
+ static QString escape( const QString& str )
+ int numCaptures() const
+
+
+QSettings
+------------------
+New functions:
+ QSettings( Format format )
+ void setPath( const QString &domain, const QString &product, Scope = User )
+ void beginGroup( const QString &group )
+ void endGroup()
+ void resetGroup()
+ QString group() const
+
+New enums:
+ Format { Native = 0, Ini }
+ Scope { User, Global }
+
+
+QChar
+------------------
+Updated Unicode tables to Unicode-3.2
+
+
+QString
+------------------
+New functions:
+ QString &append( const QByteArray & )
+ QString &append( const char * )
+ QString &prepend( const QByteArray & )
+ QString &prepend( const char * )
+ QString &remove( QChar c )
+ QString &remove( char c )
+ QString &remove( const QString & )
+ QString &remove( const QRegExp & )
+ QString &remove( const char * )
+ QString &replace( uint index, uint len, QChar )
+ QString &replace( uint index, uint len, char c )
+ QString &replace( QChar c, const QString & )
+ QString &replace( char c, const QString & after )
+ QString &replace( const QString &, const QString & )
+ QString &replace( QChar, QChar )
+ QString &operator+=( const QByteArray &str )
+ QString &operator+=( const char *str )
+ static QString fromUcs2( const unsigned short *ucs2 )
+ const unsigned short *ucs2() const
+
+Improvements:
+ find(), findRev() and contains() use either a fast hashing
+ algorithm (for short strings) or an optimized Boyer-Moore
+ implementation for long strings. Lots of smaller performance
+ optimisations.
+
+
+QTextStream
+------------------
+New functions:
+ QTextCodec *codec()
+
+
+QTimeEdit
+------------------
+New properties:
+ Display display
+
+New functions:
+ uint display() const
+ void setDisplay( uint )
+
+New enums:
+ Display { Hours, Minutes, Seconds, AMPM }
+
+
+QFrame
+------------------
+New enum values:
+ GroupBoxPanel
+
+
+QGroupBox
+------------------
+New properties:
+ bool flat
+
+New functions:
+ bool isFlat() const
+ void setFlat( bool b )
+
+
+QListBox
+------------------
+New functions:
+ QListBoxItem* selectedItem() const
+
+
+QListView
+------------------
+New functions:
+ int sortColumn() const
+
+
+QSlider
+------------------
+New functions:
+ void addLine() ( as slot)
+ void subtractLine() (as slot)
+
+
+QTextBrowser
+------------------
+New functions:
+ void sourceChanged( const QString& )
+ void anchorClicked( const QString&, const QString& )
+
+
+QTextEdit
+------------------
+QTextEdit offers another TextFormat (LogText), which is optimized
+(speed and memory) for displaying large read-only texts normally used
+for logging.
+
+New properties:
+ bool allowTabs
+
+New functions:
+ QString anchorAt( const QPoint& pos, AnchorAttribute a )
+ void setAllowTabs( bool b )
+ bool allowTabs() const
+ void insert( const QString &text, uint insertionFlags = CheckNewLines | RemoveSelected )
+
+New signals:
+ void clicked( int parag, int index )
+ void doubleClicked( int parag, int index )
+
+New enums:
+ TextInsertionFlags { RedoIndentation, CheckNewLines, RemoveSelected }
+
+New enum values:
+ AtWordOrDocumentBoundary
+
+
+QToolButton
+------------------
+New properties:
+ TextPosition textPosition
+
+New functions:
+ TextPosition textPosition() const
+ void setTextPosition( TextPosition pos )
+
+New enums:
+ TextPosition { Right, Under }
+
+
+QTooltip
+------------------
+New functions:
+ static void setWakeUpDelay( int )
+
+
+QWhatsThis
+------------------
+New functions:
+ static void setFont( const QFont &font )
+
+
+QDomDocument
+------------------
+New functions:
+ QString toString( int ) const
+ QCString toCString( int ) const
+
+
+QFont on X11
+------------------
+Improvements:
+ Safe handling of huge font sizes. Added support for the new
+ Xft2 font library on XFree-4.x.
+
+
+QRegion on X11
+------------------
+Improvements:
+ Removed the 16 bit size limitation
+
+****************************************************************************
diff --git a/dist/changes-3.1.0-b2 b/dist/changes-3.1.0-b2
new file mode 100644
index 0000000..f5c8c14
--- /dev/null
+++ b/dist/changes-3.1.0-b2
@@ -0,0 +1,220 @@
+Qt 3.1 introduces many significant new features and many improvements
+over the 3.0.x series. For an overview of the main changes between
+3.0.x and 3.1, look at the changes-3.1.0-b1 file. This file describes
+the changes between Qt 3.1 beta1 and Qt 3.1 beta2.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+The binary incompatibilities that were introduced in Qt 3.1 beta1
+have been fixed.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction
+ Don't update when nothing has changed.
+
+- QActionGroup
+ Syncronize comboboxes correctly for groups with
+ separators. Set the initial currentItem of comboboxes to the
+ action that is on when adding the group. Emit activated signal
+ for non-toggle actions selected from a combobox. Apply the
+ state of the action group for new widgets.
+
+- QApplication
+ Correctly set the accept() flag on accel events. Obsoleted
+ processOneEvent(), we have a better way for integrating
+ eventloops now. (See QEventLoop's documentation.)
+ Windows only: reserve more space for very long application
+ filenames.
+
+- QCheckTableItem
+ Use the colorgroup passed in for the background color and not
+ the viewport's.
+
+- QColor
+ Windows only: Fix palette allocation and ManyColor mode on
+ Windows.
+
+- QComboBox
+ Emit activated() signals from the wheel event handler.
+
+- QComboTableItem
+ Make sure stringlist is updated even if setStringList() is
+ called while an editor exists.
+
+- QDataTable
+ Windows only: If edit confirmation was switched on and
+ the user cancelled an update by clicking in a different field,
+ the current row was needlessly changed.
+
+- QDateTimeEdit/QTimeEdit
+ Now supports wraparound for time editing.
+
+- QDesktopWidget
+ Windows only: Allow explicit creation of QDesktopWidgets.
+
+- QDns
+ Fix a crash when a QDns object is deleted in a slot connected
+ to its resultsReady() signal.
+
+- QDockWindow
+ Windows only: Don't pass window activation around
+ unnecessarily when the activation is ignored anyway. Also
+ fixed repaint errors while dragging dock windows. Remove
+ floating windows from the mainwindow's internal lists when
+ deleting.
+
+- QEventLoop
+ Renamed processNextEvent(flags,bool) to processEvents(flags)
+ and introduced new ProcessEvents flag, WaitForMore. Remove
+ processOneEvent since it is redundant.
+
+- QFileDialog
+ Windows only: Disable NTFS permission lookup during filedialog
+ population. This can take a long time, and the information is
+ not really required.
+
+- QGLContext
+ Added a workaround to get overlays to work on ATi FireGL
+ cards.
+
+- QGLWidget
+ Added support for rendering text into a GL context with the
+ renderText() calls.
+
+- QHeader
+ Draw the sort arrow at the right position with multi-line
+ header labels. Scale the correct sections when the header
+ sections are reordered. Respect orientation() in sizeHint().
+
+- qHeapSort()
+ Fixed to only require operator<, instead of a mix of
+ operator<, <=, and >.
+
+- QIconView
+ Optimize updates on focus/window activation changes.
+
+- QLibrary
+ Windows only: only append ".dll" extension if no extension has
+ been provided.
+
+- QListBox
+ Don't call ensureCurrentVisible() in resizeEvent() unless the
+ current item was visible when you started resizing.
+
+- QListView
+ Don't draw the cell if the cell wouldn't be visible due to
+ having a width or height of 0. Don't call cancelRename() when
+ the rename was OK'd. When showing a tooltip make sure it's
+ only for that column and not for the whole item.
+
+- QMacStyle
+ Many improvements to follow the native style more closely.
+
+- QMainWindow
+ Close all floating dockwindows of the mainwindow in the close
+ event.
+
+- QMenuData
+ Make removeItem(int id) work on trees like the other functions
+ that take IDs as arguments.
+
+- QObject
+ Make sender() a safer function to use:
+ - it cannot be dangling anymore (points to 0 if the sender was
+ deleted or disconnected)
+ - it maintains its value after other signals have been emitted
+ Fixed compatibility problem in connect(). Remove quadratic
+ behaviour in insertChild()
+
+- QPicture
+ Proper streaming for null pictures.
+
+- QPixmap
+ X11 only: allow grabWindow() to work on a screen other than
+ the default screen.
+
+- QPopupMenu
+ Draw submenu items disabled if the submenu is disabled. Fix
+ null-pointer dereferencing for dynamically changing menus.
+
+- QProcess
+ Windows only: make the tryTerminate() function work for
+ windows applications (it still does not work for
+ consoleapplications, though).
+
+- QSocket
+ Don't crash if the readBlock() returned 0.
+
+- QSplitter
+ addWidget() now reparents the widget if necessary.
+
+- QTable
+ Set the table of the item to the table in insertItem(), so
+ takeItem()/insertItem() can be used to move items between
+ tables.
+
+- QWidget
+ Clear WDestructiveClose before calling deleteLater() on
+ widgets. Event processing during destruction might otherwise
+ have another close event come along, which would issue another
+ deleteLater() call. Added a new function toggleShowHide(bool show).
+ Simplified visible() handling and added a convenience property
+ "shown" and a write function for "hidden". Save WFlags in
+ showFullScreen() and restore them so flags are remembered
+ correctly.
+
+- QWindowsStyle
+ Make the Windowsstyle obey the system's scrollbar widths.
+
+- qUncompress()
+ Don't hang forever if the expected size passed in is 0. Return
+ an empty bytearray if something went wrong instead of garbage
+ data.
+
+
+
+
+****************************************************************************
+* Qt Designer *
+****************************************************************************
+
+- Improved the look of the Toolbox
+
+- Many small usibility improvements in the special editors for widgets
+ (drag'n'drop, in-place renaming, etc.).
+
+- New icon look.
+
+- Accept class names with "::" and generate correct namespace code in
+ uic.
+
+- Reduced startup time.
+
+- Fixed a crash when loading .ui files using QWidgetFactory.
+
+- Cleaned up some old dialogs and removed obsolete settings.
+
+- Improved the .dlg import plugin.
+
+- Button text properties can be edited in a multi-line editor now,
+ since all buttons support multi-line labels.
+
+****************************************************************************
+* Qt Assistant *
+****************************************************************************
+
+- Added commandline option -removeContentFile.
+
+- New icon look.
+
+****************************************************************************
+* Qt Linguist *
+****************************************************************************
+
+- New icon look.
diff --git a/dist/changes-3.1.1 b/dist/changes-3.1.1
new file mode 100644
index 0000000..41a5742
--- /dev/null
+++ b/dist/changes-3.1.1
@@ -0,0 +1,212 @@
+Qt 3.1.1 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.1.0
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- The build issues with the Professional Edition have been solved.
+
+- The build problems reported on Solaris and HP-UX have been addressed.
+
+- Detection of Xft2 support has been added.
+
+- The installer and reconfigure tools on Windows have been fixed.
+
+- Look'n'Feel improvements have been made in the Qt/Mac version.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAccel
+ Fixed for single key accelerators. Made Shift modifier work
+ for all key combinations, unless an accelerator with Shift is
+ defined.
+
+- QAction
+ Remove iconset when a null-iconset is being set.
+
+- QApplication
+ Don't overwrite explicitly set font with the default font when
+ using the static methods before calling the constructor.
+ X11 only: Support custom color maps on 8-bit visuals.
+
+- QCheckBox
+ Draw focus indicator into indicator if the text label is empty.
+
+- QClipboard
+ X11 only: Null-terminate encoded strings.
+
+- QComboBox
+ Made sure the current item is selected in the list. Call
+ focusIn/OutEvent handlers when the lineedit changes focus.
+
+- QDataTable
+ Update the current cell when selecting rows.
+
+- QDialog
+ Don't find a place for dialogs that have been explicitly
+ moved.
+
+- QDir
+ Improved filtered lookup.
+
+- QDockWindow
+ Emit visibilityChanged signal only if visibility relative to
+ the dock area has changed.
+
+- QEventLoop
+ Implement this API on Windows and Mac.
+
+- QFileDialog
+ Fix visibility of preview widgets. Renaming files now also
+ works in ExistingFiles mode.
+
+- QFont
+ X11 only: Fixed width calculation for undefined characters.
+
+- QFrame
+ Erase the margin region for flicker-optimized subclasses.
+
+- QFtp
+ Don't try to connect multiple times to the server.
+
+- QHttp
+ Fix special case for "Content-Length: 0" transfers.
+
+- IME (Input Methods)
+ Windows only: Accept the input when the widget loses focus.
+
+- QLibrary
+ Mac only: Implement path searching to look in standard loader places
+ for plugins.
+
+- QLineEdit
+ Draw background pixmap with the correct offset. Fixed
+ undo/redo.
+ Mac only: Support for native navigation and selection with keyboard.
+
+- QListBox
+ Fixed null-pointer crash in QFileDialog.
+
+- QListView
+ Fixed null-pointer crash when reimplementing insertItem.
+
+- QMenuBar
+ Improved focus handling.
+
+- QMime
+ Support URLs on Japanese Win98.
+ Windows only: Support URLs on network drives.
+
+- QOCIDriver
+ Improved handling for datatype mismatches
+
+- QODBCDriver
+ Don't report Unicode support on Win9x/Me. Support
+ high-precision values. Support fetchLast in forward-only
+ databases
+
+- QPainter
+ Make endpixel rendering consistent on all platforms. Draw
+ focus rectangles with better contrast. Fixed text rendering
+ with wordbreak.
+
+- QPixmap
+ Mac only: Support alpha channels when converting from a
+ QImage.
+
+- QPopupMenu
+ Fixed offset errors and keyboard navigation for invisible
+ items. Allow overlapping of menus with desktop elements (e.g.
+ taskbar). Avoid flicker for context menus.
+
+- QPrinterDialog
+ Unix only: Try harder to find all printers.
+
+- QProcess
+ Windows only : Start batch files with spaces in filename.
+
+- QScrollView
+ Don't propagate accepted contents mouse events.
+
+- QSettings
+ X11 only: Don't read Qt specific settings if application is
+ not desktop-settings-aware.
+ Windows only: Handle null-terminations correctly on
+ Win95/98/Me. Fixed a resource leak.
+
+- QSqlCursor
+ Improved performance for multiple inserts
+
+- QString
+ Pass base parameter to recursive calls in setNum().
+
+- QStyle
+ Make better use of the style flags.
+
+- QTabBar
+ Fixed focus handling for dynamically created tab widgets.
+
+- QTable
+ Make sizeHint implementation depend on header
+ visibility. Update the geometry of cell widgets in
+ setRowHeight() and setColumnWidth().
+
+- QTableItem
+ Fixed sizeHint() for items with wordwrap and items with
+ newlines in the text.
+
+- QTextCodecFactory
+ Load plugins correctly.
+
+- QTextEdit
+ Fixed rendering of selections in inactive windows. Return the
+ string with format tags in LogText mode. Non-breaking
+ whitespaces (0xA0) are no longer converted to spaces in text().
+
+- QWheelEvent
+ X11 only: Support second mouse wheel (since there is no
+ documented API for this on Windows).
+
+- QWidget
+ Fix showHidden(). Propagate palettes and fonts correctly to
+ children. Don't block modeless children of modal dialogs.
+
+- QWorkspace
+ Don't return invalid pointers to closed MDI clients.
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- moc and uic
+ Delete output files before aborting.
+
+- uic
+ Don't print debug messages from generated code. Fixed column
+ and row labeling. Don't generate code for database specific
+ properties.
+
+- Qt Designer
+ Fixed reported crashes.
+
+- Qt Assistant
+ Flush stdout to make sure that clients get the correct port
+ number.
+
+
+****************************************************************************
+* Extensions *
+****************************************************************************
+
+- ActiveQt
+ Fixed null-pointer crashes for QVariant parameters. Try harder
+ to convert types. Fixed Qt control placement and property
+ handling in Visual Basic. Improved workaround for Word
+ type library problems. Integrated hosted controls in tab focus
+ chain. Support property overloading in Qt controls.
diff --git a/dist/changes-3.1.2 b/dist/changes-3.1.2
new file mode 100644
index 0000000..79e0136
--- /dev/null
+++ b/dist/changes-3.1.2
@@ -0,0 +1,631 @@
+
+Qt 3.1.2 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.1.1
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Some build fixes on different platforms. Many small documentation
+fixes.
+
+XFree86 only: Tablet support now also looks for devices called "pen",
+not just "stylus" and "eraser".
+
+Animations: Less CPU-consuming roll effects.
+X11 only: Disable effects on displays with <16bpp (rather than
+falling back to the scrolling).
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAccel
+ Allow localization of status bar messages. Try harder to
+ distinguish between an accelerator and the identical
+ accelerator with Shift in case on of them is currently
+ disabled.
+
+- QAccessible
+ Send accessibility notification for selection changes in
+ menubars and popup menus. Send accessibility
+ notifications for QListBox currentItem/selection changes.
+
+- QActionGroup
+ Implement visibility for drop-down actiongroups.
+
+- QApplication
+ Return focus to the widget that had it before a popup opened
+ even if the focus is passed on during the show event handling.
+ When the programmer/user explicitly sets the style (either
+ with QApplication::setStyle or the -style command line
+ option), do not reset the style on settings changes. Creating
+ a second QApplication reads the settings again.
+ Windows only: Emit aboutToQuit() when the user logs off. Send
+ a focusOut event to the focus widget when the user tries to
+ switch applications using Alt+Tab. Fixed setting of
+ desktop-wide fade and scroll effects.
+ Windows95/98/Me: Fixed enter/leave handling. Among other
+ benefits this makes tooltips work more reliably.
+ X11 only: Various fixes for input methods, e.g. Korean
+ 'ami'. Some startup performance improvements with
+ QSettings. Mark the internal wakeUpGuiThread() pipe with
+ FD_CLOEXEC. Call XFilterEvent before the public X11 event
+ filters to avoid applications filtering out events that are
+ necessary for input methods to operate. Removed old en_US
+ locale workaround for Solaris. Close all open popups when
+ clicking on a screen different from the popup's screen. Do not
+ force 256 colors on 8-bit display (used to be a workaround for
+ a vnc bug).
+ Mac only: Popupmenus that are dismissed by clicking outside of their
+ bounds will no longer send the event to the widget clicked on (to avoid
+ selection changing when canceling a context menu). QContextMenuEvents
+ will be sent in the same style as Windows/X11 to make the platforms
+ more consistent, additionally mapping of Ctrl+Click to RightButton has
+ been added to allow easy context menu handling. Added warnings when a
+ Qt application is run outside of an application bundle (in GUI mode)
+ this will prevent accidental starving from events. Correct state when a
+ modal dialog is shown (to disable the menubar) is used now, and is
+ emulated to feel like Carbon applications. Fixed bug so that
+ QApplication::processEvents() can be called before
+ QApplication::exec(). Window activation will not change when a popup
+ menu is displayed. Toolbar toggle button will only toggle the top dock
+ in a QMainWindow. European text composition is supported now to take
+ advantage of TextInput modules available on Mac OS X. Window activation
+ has been improved to allow interleaving windows of different classes
+ correctly (to decrease differences between X11/Windows and Mac).
+
+- QBuffer
+ IO_Truncate no longer detaches the explicitly shared byte array.
+
+- QButton
+ In setPixmap(), avoid laying out again if the new pixmap does
+ not change the size. Use QSharedDoubleBuffer only if it is
+ enabled (this avoids repainting errors).
+
+- QButtonGroup
+ Improve hit testing for cursor navigation.
+
+- QCanvas
+ Do not try to double buffer invalid areas.
+
+- QCanvasEllipse
+ Windows only: Workaround a Windows limitation that does not
+ support 2x2 ellipse rendering without a pen. Do not try to
+ double buffer invalid areas.
+
+- QColorDialog
+ Allow the setting of all 48 standard colors.
+
+- QComboBox
+ Close any popup menus or listboxes when disabling the combobox.
+ Fix text alignment when large pixmaps were inserted into the
+ combobox.
+
+- QComplexText
+ Added correct positioning specs for all of Thai and Lao. Some
+ reordering fixes.
+
+- QCursor
+ Mac only: Correct interpretation of mask/data of a QCursor so that the
+ mask will can be used as documented.
+
+- QDate
+ Fixed addYears() for days missing in certain years.
+
+- QDateTimeEdit
+ Compute an improved layout for the QDateEdit and QTimeEdit
+ components of the QDateTimeEdit (based on the size hints). Set
+ the size policy of the QDateTimeEdit to (Minimum, Fixed).
+ In time edit: If the display is AM/PM, do not accept 13-24 as
+ valid input for the hours. Go to the min/max value when
+ stepping down/up goes out of the valid range.
+
+- QDesktopWidget
+ Mac only: Fixes to availableGeometry().
+
+- QDialog
+ Fixed a visibility issue with setExtension().
+ X11 only: Modal dialogs that have no parent set their
+ WM_TRANSIENT_FOR hint to the main application widget (not
+ root). Do not raise the active modal widget if another one
+ gets focus. This used to be an incorrect workaround for a
+ now-obsolete problem where CDE would not keep modal dialogs
+ above their parents.
+ Do not reposition laid out dialogs that restore their geometry
+ in a polish() reimplementation.
+
+- QDict
+ Handle zero sized hash tables.
+
+- QDns
+ Slightly more reliable now, fixed a memory leak.
+
+- QDockArea
+ Fixed resizing of a QDockWindow is no longer affected by
+ another closed QDockWindow in the same QDockArea. If a QDockWindow
+ has changed its sizeHint layout items use now the new size.
+
+- QDockWindow
+ When undocking a window, use the last undocked size if we have
+ one.
+ X11 only: Make sure the moving frame is drawn on the correct screen.
+ Windows only: Fixed some focus issues.
+
+- QDom
+ Create entity references for unknown entities.
+
+- QDragManager
+ X11 only: Raise cursor decoration. Improved Motif drop support
+ to support non-textual data.
+ Windows only: Do not send any drag events if we don't have a receiver.
+ Windows 2000 only: Ignore illegal requests for error-clipboard
+ format when dropping files onto Explorer.
+
+- QEventLoop
+ Window only: Fixed mutex lock problem. Fixed processEvents()
+ with ExcludeUserInput. Fixed QSocketNotifiers not being
+ removed when the notifier gets deleted and the event
+ loop is blocking.
+ Unix only: Fixed a 64 bit problem.
+ Mac only: Fixed hasPendingEvents() for non-gui apps.
+
+- QFileDialog
+ Fix drag'n'drop for the first click into the listbox. Do not
+ auto-complete when saving a file. Enabled drag'n'drop of files
+ for all modes. In Directory* mode, do not set the filter to a
+ non-existent directory if one is specified.
+ Windows only: Fixed icon lookup.
+ Win 98/Me only: Make sure getExistingDirectory() doesn't
+ modify the current directory.
+ Mac only: Encoding fixes.
+
+- QFont
+ Win95 only: Make symbol fonts work.
+ X11 only: Don't change the Xft enabled/disabled setting
+ at runtime. Avoid some X server roundtrips when loading fonts.
+
+- QFontDialog
+ Fixed getFont() in case no default font is specified.
+
+- QFrame
+ Turn on focus and mouse-over style flags for frame painting.
+
+- QFtp
+ If the server does not expect a password (i.e. if you are
+ already logged in after you sent the username), do not send
+ the password since this might lead to errors.
+
+- QGLWidget
+ X11 only: Xft fonts won't work with glXUseXFont() - so do not
+ try to use them.
+ Win32 only: Fixed text rendering to pixmap issues.
+ Mac only: Improved responsiveness when resizing opengl widgets.
+ Mac only: Optimized swapping between accelerated and
+ non-accelerated case.
+ Mac 10.2 only: Improved performance in the case of overlapping
+ opengl widgets.
+
+- QHBoxLayout
+ Handle direction changes in user code.
+
+- QHeader
+ Improved sizeHint() takes the arrows of sorted columns
+ into account. Fix redrawing problems when moving header
+ sections. Ignore grip-margin in mouse handling for
+ non-resizable sections.
+
+- QHttp
+ Fixed a memory leak. (With thanks to valgrind's developer for
+ this useful tool). Improved head() implementation to actually
+ use HEAD requests. Accepts responses from web servers that
+ return \n instead of \r\n as line separators. Fixed a rare
+ infinite loop issue.
+
+- QIconView:
+ Clip item drawing to current container to fix drawing of
+ pixmaps with alpha channels.
+
+- QImageIO
+ jpegio: Fixed potential buffer overrun.
+ gif: Fixed a crash for invalid gif files.
+
+- QInputContext
+ X11 only: Try harder to provide the input method with an
+ appropriate - and available - fontset.
+
+- QInputDialog
+ Fixed size hint when using height-for-width rich text.
+
+- QKeySequence
+ Fixed operator==() for some special cases.
+
+- QLabel
+ When the the label is disabled, use identical color roles for both
+ rich text and plain text.
+
+- QLibrary
+ Mac only: Return failure response when a library cannot be opened
+ due to missing symbols.
+
+- QLineEdit
+ Do not truncate the text when we validateAndSet a text which
+ is longer than maxLength, but disallow the input. Respect
+ maxLength() in setText(). Make displayText() and selectedText()
+ not strip non-breaking spaces anymore. Fixed memory leak when
+ adding and deleting line edits. Undo now clears the current
+ selection. Undo/redo now works when overwriting the selection.
+ Fixed memory leak on constructing/destructing line edits. Give
+ line edit ownership of the popup menu returned by the default
+ createPopupMenu() implementation.
+
+- QListView
+ Fixed background brush origin when using double buffering. Do
+ not resize a stretchable column in widthChanged(). Fixed
+ selecting when auto-scrolling. Initialize multi-selection
+ anchor. Accept drops outside items when acceptDrops() is true.
+ Use anchor correctly in Extended selection mode (also for
+ mouseMove). Make right clicking on a selected item not change
+ the selection. The AlignHCenter flag of a QCheckListItem now
+ behaves like for normal QListViewItems. Speed up opening and
+ closing of invisible items. Fixed a memory leak in removeColumn()
+ Single selection mode: If the selected item is taken out of the
+ listview, unselect it and emit selectionChanged(). Fixed
+ deselecting in multi-selection modes. Right release outside an
+ item in a listview no longer clears the selection if
+ ControlButton is set.
+
+- QListViewItem
+ Invalidate column sorting in moveToJustAfter().
+
+- QLocalFs
+ The network protocol for local file systems sets sets the
+ right permissions for the QUrlInfo objects if you do a
+ QUrlOperator::listChildren().
+
+- QMainWindow
+ Fixed orientation handler calls.
+
+- QMap
+ Fixed conversion from std::map.
+
+- QMenuBar
+ Mac only: Fix for destruction of menu bars.
+ Mac only: Use process name instead of argv.
+
+- QObject
+ Always emit the destroyed() signal, even when signals are
+ blocked.
+
+- QPaintDevice
+ Mac only: Fixed raster op. for bitBlt.
+
+- QPainter
+ X11 only: Fix for rotated rectangles. Fixed drawPolygon() with
+ winding being false.
+ Mac only: drawText() fixes.
+ Mac only: Fix for drawPie().
+
+- QPicture
+ Warn about and catch save operations on still active devices.
+
+- QPixmap
+ Made grabWidget() more robust.
+ X11 only: Fixed a bug in grabWindow(), fixes in
+ convertFromImage() for MonoOnly.
+
+- QPointArray
+ The makeArc() function is now inclusive in respect of the start and
+ end points.
+
+- QPopupMenu
+ If there is a custom QWhatsThis installed for the whole menu
+ but no whatsThis set for the item, use the custom QWhatsThis
+ to get the help text. Improved size for multi-column popups.
+ Mac only: Improved scrollable popups
+ Mac only: Fix handling of popupmenu dismissing mouse presses.
+
+- QPrintDialog
+ Fix reentrancy issues when reading printer dialog settings.
+ Windows only: Handle lack of default printers more
+ gracefully.
+
+- QPrinter
+ Windows only: Fix reentrancy issues and make sure that all
+ handles are updated correctly. Improved bottom and right
+ margin calculation. Fixed some problems with image printing.
+ Mac only: Support for high resolution printing. Support 1-bit
+ masking for pixmaps.
+
+- QProcess
+ If the process's file descriptor is closed for stdout or
+ stderr, but the line in the buffer does not end with a \n or
+ \r\n, it is still possible to read this data using readLine().
+ Windows only: Make it safe to call qApp->processEvents() in a
+ slot connected to QProcess::readyReadStdout(). Fixed start()
+ with no arguments. Use a non-blocking file descriptor for
+ writes to stdin. Avoid leaking of handles.
+
+- QPSPrinter
+ Fixed codec for Korean PostScript fonts (ksc5601.1987-0, not
+ the listbox. Do not auto-complete when saving a
+ fileeucKR). Fixed memory leak.
+
+- QRichText
+ Improved Asian line breaking: Avoid breaking before
+ punctuation and closing braces and after opening braces. Fixed
+ a freed memory access problem with floating items on
+ destruction. When copying rich application/x-qrichtext, include
+ format information for the initial characters until the first
+ complete span. Make text="color" attributes in qt and body
+ tags work again.
+
+- QScrollView
+ Restored the Qt 3 default sizeHint() that depends on the
+ scroll view's content, restricted within a 'sane' range (this
+ has no impact on most child classes, which already reimplement
+ sizeHint()).
+
+- QSemaphore
+ Fixed race condition in operator-=().
+ Unix only: A bit more robust.
+
+- QSettings
+ Implement scoping for file-based settings (Unix and
+ Ini-modes). Support storing and reading null strings. Other
+ fixes.
+ X11 only: Fixed rehash issues when using multiple screens.
+ Windows and Mac: Completed Ini mode.
+
+- QSocket
+ If the read retruns 0, safely assume that the peer closed the
+ connection. Fixed readyRead sometimes not being
+ emitted. Fixed a select bug when the other end terminates
+ the connection. Some 64 bit fixes.
+
+- QSound
+ Mac only: Implemented stop().
+
+- QSplitter
+ Make sizes() return 0 for collapsed widgets.
+
+- QSqlDriver
+ All drivers: Fixed crashes when accessing out of bound
+ fields. Clear the openError() flag when opening a connection
+ successfully.
+ MySQL only: Make use of mysql_use_result() in forward-only mode.
+ TDS only: Return NULL QVariants for NULL fields.
+ ODBC only: Do not require the SERVER keyword to be in a
+ connection string. Fix Unicode issues with MS Access. Allow
+ MS Access people to create a connection string without
+ creating a DSN entry first.
+
+- QSqlQuery
+ Real values in queries containing placeholders were in some
+ cases incorrectly replaced in emulated prepared queries.
+ Added support for forward only queries in MySQL.
+
+- QStatusBar
+ Make sure QStatusBar updates the minimum height when a child
+ widget triggers a relayout (e.g. from size/font/etc. changes).
+
+- QString
+ Safer QString->std::string conversion (handles null-string
+ case). Fixed 64-bit issue in toLong() and toULong(). Make
+ prepend(), append() and operator+=() work with a QByteArray
+ argument that is not 0-terminated. Since this
+ fix is done in inline functions, you must recompile your
+ application to benefit from it. Make QString(const
+ QByteArray&) respect the array's size where a codec for
+ C strings is defined. Performance improvements for lower()
+ and upper(). Fix toDouble() when string contains trailing
+ whitespace.
+
+- QSvgDevice
+ No background for Bezier curves. Fixed omission of font-family
+ attribute in SVG generator. Fixed bounding rect mapping.
+
+- QStyle (and subclasses)
+ Usable size for subcontrols for small scrollbars. Fixed MDI
+ document window titlebar clipping.
+ XP style: Support non-default group boxes. Corrected tab
+ widget border drawing. More compliant dock window
+ appearance. Fixed translations for QCheckTableItem and
+ QComboTableItem.
+ Windows style: Use the highlighted text color role for arrows
+ in menus. Allow drawing of list view expand controls without
+ branches.
+ SGI style: Use correct background brush on pushbuttons with
+ popdown arrows.
+ Mac style (Mac only): Comboboxes will now be smaller (and closer to
+ Aqua Style suggested sizes). Expansion widgets (in a listview) will
+ now draw in the correct background color to allow non-white listviews.
+
+- QSpinBox
+ Stop spinning when users press a button other than the
+ left one. Support Key_Enter in addition to Key_Return as the
+ documentation always stated.
+
+- QTabBar
+ Let arrow buttons react correctly on style changes.
+
+- QTabDialog
+ Fix reverse layout for right to left languages.
+
+- QTable
+ Catch hideColumn() on tables with too few columns. Fixed an
+ endless recursion when swapping header sections. Fixed SingleRow
+ selection when using the vertical header. Emit the
+ sizeChange() signal when resizing a table header section with
+ a double click. Fixed set*MovingEnabled() when the selection
+ mode is NoSelection. Fix selection drawing for focusStyle ==
+ FollowFocus. Fixed a memory leak.
+
+- QTableItem
+ Use virtual text() method for calculations instead of accessing the
+ data member directly. Do not crash when destroying a table item that
+ is not in a table.
+
+- QTextCodec:
+ Fixed a bug in the Unicode -> jisx0208 conversion table.
+
+- QTextEdit
+ Made setFormat() much faster when undo/redo is
+ disabled. Fixed double deletion crash when clearing a document
+ with floating custom items. AccelOverride events with Shift
+ pressed now work the same as for a normal key press.
+ LogText mode: Allow spaces in the font color tag. Fixed
+ background redraw issue. Stop scrollbar from disappearing
+ due to laying out the document incorrectly.
+
+- QThread
+ Unix only: Do not rely on PTHREAD_MUTEX_INITIALIZER and
+ PTHREAD_COND_INITIALIZER. Fixed timeout calculation in
+ sleep().
+
+- QTimeEdit
+ Typing in input for the first time now overwrites the existing
+ value.
+
+- QToolButton
+ Fixed width calculation for multiline text.
+
+- QTooltip
+ Try hard to avoid tooltips for widgets in inactive
+ windows. Use screen geometry rather than available geometry
+ for positioning. Avoid the mouse cursor covering part of the
+ tooltip.
+
+- QTranslator
+ Notify main windows when installing an empty translator.
+
+- QUrlOperator
+ Make setNameFilter() work with FTP.
+
+- QValueVector
+ Fix operator==() to work as expected if the two vectors do not have
+ the same size.
+
+- QVariant
+ Fixed canCast() for Bool -> String and ByteArray -> String conversion.
+ Fixed operator==() for maps. Fixed the asDouble() function to
+ detach first before a conversion is done. After streaming into
+ a QVariant isNull() now returns false.
+
+- QWaitCondition
+ Unix only: Make sure the mutex is destroyed after it is
+ unlocked.
+
+- QWhatsThis
+ Use screen geometry rather than available geometry
+ for positioning.
+
+- QWidget
+ In adjustSize(), process LayoutHint events for all widgets,
+ not only this widget. Fixed a visibility issue with
+ reparent(). Fixed recursive update of child widgets with
+ background origin not being WidgetOrigin. Fixed isEnabledTo().
+ Windows only: Fixed mapFromGlobal() / mapToGlobal() for
+ widgets that are not visible.
+ X11 only: Set the WM_CLIENT_LEADER and SM_CLIENT_ID properties
+ according to the ICCCM (section 5.1). We accomplish this by
+ creating a hidden toplevel window to act as the client leader,
+ and all toplevel widgets will use this window as the client
+ leader. Fixed calling show() on minimized windows. Fixes to
+ grabWindow() for platforms that support different color depths
+ on one display.
+ Windows only: Handle frameGeometry() changes when users change
+ the titlebar font.
+ Mac only: Reparent fixes so that visiblity of a toplevel window
+ will be retained as well as to avoid painting errors when reparented
+ onto a different window. Fixed painting errors when a widget is
+ interactively moved off screen. showNormal() will now toggle
+ correctly when a window is minimized, additionally toggling between
+ showMaximized()/showNormal() will operate as expected. Qt will now
+ try to prevent placing a window partially offscreen. This will not
+ over-ride explicit window positioning, but it will correct default
+ placement.
+
+- QWidgetStack
+ Make removeWidget() safe when there are several widgets
+ with the same id.
+
+- QWorkspace
+ If the active window is clicked on, transfer focus to
+ the child. Restore focus to old subcontrol when changing the
+ active MDI window. Make sure a MDI window is not resized below
+ a child widget's minimum size. Do not allow resizing windows
+ when we have an active popup window. Another fix to the
+ windowActivated() signal. Fixed resize handling for fixed-size
+ windows.
+
+- QXmlSimpleReader
+ Fixed a memory leak for incremental parsing.
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Qt Designer
+ Some small usability improvements and crash fixes. Fixed
+ editing properties of multiple selected widgets for custom
+ widgets. Fixed some problems with pixmaps, when using a pixmap
+ function. Allow entering ':' in the class name in the
+ form settings dialog (for namespaces). Do not show deleted
+ toolbars in the object explorer. Fixed inserting widgets into
+ toolbars. Fixed displaying nested widget stacks in the object
+ explorer. Added an option to enable auto saving. Fixed some
+ issues with auto-indent in the C++ editor plugin. Fixed
+ problems with slots which have namespaces in their function
+ arguments. Do not save invalid pixmaps. whatsThis properties
+ can now be edited with the richtext editor.
+
+- Qt Assistant
+ Fixed crash when printing to file was cancelled. Fixed
+ mimesource settings when a link is opened in a new window.
+ Added missing translator. Fixed reloading pages when the
+ font was changed. Added accelerator for exiting Assistant.
+ Full text search now supports Unicode. Search accepts special
+ characters like '_'. Added option for disabling the first run
+ initialization. Now it is possible to open a link or new
+ window directly from the sidebar.
+
+- moc
+ Make 'moc -p foo bar/baz.h' generates #include "foo/baz.h"
+ instead of #include "foo/bar/baz.h". Also avoid redundant "./"
+ at the beginning. Accept identifiers trailing the function
+ signature to allows sneaking in compiler specific attributes
+ via a macro.
+
+- qmake
+ Qmake will no longer put the version number on plugins. These are
+ not a necessary part of the filename. A parser bug got into qmake
+ causing (right hand side) functions from being evaluated properly,
+ additionally the argument parser has been improved to allow functions
+ calling functions. Qmake now has support for ProjectBuilder 2.1, it
+ will no longer respect OBJECTS_DIR in ProjectBuilder (as this exposed
+ a bug in ProjectBuilder itself). It will automatically detect qt-mt
+ (when linking against Qt) so "CONFIG += thread" is not necessary,
+ however this will not turn on Q_THREAD_SUPPORT. A new test operator
+ has been added 'equals()' to allow testing for equality to a variable.
+ In 'project mode' qmake will now detect TRANSLATIONS files
+ automatically.
+
+- uic
+ Some small fixes in code generation.
+
+****************************************************************************
+* Extensions *
+****************************************************************************
+
+- Netscape Plugin
+ The Netscape Plugin is supported again, now on both Netscape 4.x and
+ current versions based on the Mozilla code.
+
+- ActiveQt
+ Activate socket notifiers and process config requests even if
+ Qt does not own the event loop.
+
diff --git a/dist/changes-3.2.0 b/dist/changes-3.2.0
new file mode 100644
index 0000000..6d99213
--- /dev/null
+++ b/dist/changes-3.2.0
@@ -0,0 +1,327 @@
+
+Qt 3.2 introduces new features as well as many improvements over the
+3.1.x series. This file gives an overview of the main changes since
+version 3.1.2. For more details, see the online documentation which
+is included in this distribution. The documentation is also available
+at http://doc.trolltech.com/
+
+The Qt version 3.2 series is binary compatible with the 3.1.x series.
+Applications compiled for 3.1 will continue to run with 3.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt library
+----------
+
+New classes have been added to the Qt Library including a
+class to add splash screens to applications (QSplashScreen), a toolbox
+widget that provides a column of tabbed widgets (QToolBox), and a
+class to manage per-thread data storage (QThreadStorage).
+
+The SQL module received a fair bit of attention this time. The most
+notable improvements include a native IBM DB2 driver, complete support
+for stored procedures including the possibility to access
+out-parameters, and native support for 64 bit fields without having to
+convert to or from strings. We also added support for setting
+connection parameters. This way you can, for example, conveniently
+open an SSL connection to a MySQL or PostgreSQL database. If you need
+even more customization, e.g. for an Oracle database, you can set up
+the connection yourself and instantiate a Qt driver object on top of
+it. An extended SQL cursor class has been added that makes it more
+convenient to display result sets from general SQL queries
+(QSqlSelectCursor). QSqlDatabase::tables() is now capable to return
+tables, views and/or system tables. In addition, you can add custom
+database drivers without compiling them as plugins
+(see QSqlDatabase::registerSqlDriver()).
+
+QLineEdit, the one-line text editor, now supports validation input
+masks. The feature complements the previous QValidator concept and
+allows e.g. restriction of input to the IP address format (mask
+"990.990.990.990;_"), or to ISO date format (mask "0000-90-90;0").
+
+Qt's unicode code support has been extended. Most notably, full
+support for Indic scripts has been added, covering writing systems
+such as Devanagari, Tamil and Bengali. The group of right to left
+writing systems has been extended with support for Syriac. Both
+improvements are available on both Windows with Uniscribe installed,
+and on Unix/X11 when using XFT with OpenType fonts.
+
+All tool classes that support STL-like iterators with begin() and
+end(), contain two extra functions constBegin() and constEnd(). The
+const versions always return const iterators, and thus can be a little
+bit faster with Qt's implicitly shared containers.
+
+QPainter's complex drawText() function has been highly
+optimized. Despite its support for complex unicode scripts, it now
+performs better than its less unicode-capable counterpart in Qt 2.3.
+
+QPixmap now supports pixmaps with alpha channel (semi transparency) on
+all Windows versions except Windows 95 and Windows NT 4.0.
+
+The print dialog now supports "selection" as a print range as well as
+the possibility to enable/disable all different printer options
+individually.
+
+On Windows, the Qt installation includes a toolbar for Visual Studio.NET
+that provides an integration of the Qt tools (ie. Qt Designer) with the
+IDE.
+
+Many classes were improved; see the detailed overview that follows.
+
+Qt Motif Extension
+------------------
+
+Dialog handling has matured and has been extended since the
+extension's introduction in Qt 3.1. The documentation and code
+examples have been improved, including a walkthrough that covers the
+complete migration of a real-world Motif example to Qt. The process
+contains four intermediate steps where the application utilizes both
+toolkits.
+
+ActiveQt Extension
+------------------
+
+Type handling has been extended on both the container and the server
+side. The new supported types are byte arrays and 64bit integers. The
+QAxServer module supports aggregation, as well as QObject subclasses as
+return and parameter types of slots, and allows error reporting through
+COM exceptions.
+The Designer integration has been extended to support property dialogs
+implemented by the control server.
+Controls developed with ActiveQt support aggregation, which makes it
+possible to use them in containers that require this form of containment to
+be supported. ActiveQt also supports masked controls in containers that
+support this for window'ed controls.
+
+Qt Designer
+-----------
+
+The popup menu editor has been rewritten. The new editor provides the
+the ability to add, edit and remove menus and menu items directly in
+the menubar and in the popup menu. Navigation and editing can be done
+using either the mouse or the keyboard.
+
+The property editor now allows editing of properties with or'd values
+(sets).
+
+Designer also supports the new QToolBox widget in a similar fashion to
+QTabWidget, etc.
+
+Qt Assistant
+------------
+
+Profiles have been introduced to allow applications to extend the use
+of Qt Assistant as a help system. Profiles describe the documentation
+to use so that only application specific documentation will be
+referenced in an end user installation. Profiles also allow some
+customization of the look in Qt Assistant. For detailed information,
+see the helpdemo example in $QTDIR/examples/helpdemo.
+
+Profiles replace the content files and categories system. The
+following command line options are removed since they no longer serve
+any purpose: addContentFile, removeContentFile, category, and
+disableFirstRun.
+
+Qt Assistant has multiple tabs for browsing, therefore enabling
+multiple pages to be browsed without opening a new window.
+
+It is possible to specify a default home page.
+
+It is possible to specify a PDF reader so that urls to PDF files can
+be opened from Qt Assistant.
+
+Compilers
+---------
+
+Note: Qt 3.2 is the last version to officially support IRIX MIPSpro
+o32 and Sun CC 5.0. A script, $QTDIR/bin/qt32castcompat, is provided
+for 3.2 which needs to be run for these compilers.
+
+Miscellaneous
+-------------
+
+Users of the 3.2.0 beta releases please note: The QWidgetContainerPlugin
+interfaces was removed from the final release due to some serious issues.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction / QActionGroup
+ Simplified constructors so that it is no longer necessary to
+ specify texts for buttons and menu items separately.
+ For action groups, we fixed the enable/disable behavior. If
+ an action inside an action group is explicitly disabled, it is
+ no longer implicitly enabled together with the group.
+ This is identical to enabling/disabling widgets and their
+ children.
+
+- QApplication
+ Added the aboutQt() slot for convenience.
+
+- QAssistantClient
+ Added the new function, setArguments(), that invokes Qt
+ Assistant in different modes.
+
+- QAxBase
+ Added the new function, asVariant(), that passes a COM
+ object through dynamicCall().
+
+- QAxBindable
+ Added the new function, reportError(), that sends error
+ information to the ActiveX client.
+
+- QColor
+ Added the new static function, colorNames(), that retrieves a
+ list of all color names known to Qt.
+
+- QDeepCopy
+ Now also supports QDir, QFileInfo, and QStringList.
+
+- QDom
+ Now has long and ulong support for setAttribute() and
+ setAttributeNS().
+
+- QFont
+ Added the new properties: stretch and overline. Added the new
+ function, resolve(), that copies unspecified attributes from
+ one font to another.
+
+- QFontDataBase
+ Added a new overload for families() that restricts the
+ returned list to fonts supporting a specific QFont::Script,
+ e.g. QFont::Greek, QFont::Devanagari or QFont::Arabic.
+
+- QFontInfo / QFontMetrics
+ Added new constructors that force the info and metrics objects
+ to use a given QFont::Script.
+
+- QGLWidget
+ Added a new constructor that takes a QGLContext
+ parameter. Makes the undocumented setContext() obsolete.
+
+- QHeader
+ Added getters for the sort indicator (sortIndicatorSection()
+ and sortIndicatorOrder() ).
+
+- QImage
+ Added a new overload for save() that writes to a given
+ QIODevice*.
+
+- QListView
+ Added tristate support to check list items
+ (QCheckListItem::setTristate()). Added the new function,
+ setSelectionAnchor(), to set the list view's selection anchor
+ explicitly.
+
+- QLineEdit
+ Added input masks: setInputMask(), inputMask(), and
+ hasAcceptableInput(). Added new function selectionStart()
+ which returns the index of the first selected character in the
+ line edit.
+
+- QMacStyle
+ Added customizable focus rectangle policy.
+
+- QMessageBox
+ Added the new static function, question(), that complements
+ the existing information(), warning() and fatal() functions.
+
+- QMotifDialog [Qt Motif Extension]
+ Now has two distinct modes of operation: 1) it allows a Motif
+ dialog to have a Qt parent, and 2) it allows a Qt dialog to have
+ a Motif parent.
+
+- QMYSQLDriver
+ Better support for MySQL/embedded.
+
+- QPixmapCache
+ Added the new function, remove(), to explicitly remove a
+ pixmap from the cache.
+
+- QPrinter
+ Added the new functions: setPrintRange(), printRange(),
+ setOptionEnabled(), and optionEnabled(). For Windows only,
+ added the new function, setWinPageSize(), that allows setting
+ DEVMODE.dmPaperSize directly.
+
+- QPtrList
+ Added STL-like iterators with begin(), end(), and erase().
+
+- QScrollBar
+ Maintains a user defined size policy when the direction
+ changes.
+
+- QSplashScreen [new]
+ This new widget class provides a splash screen to be shown
+ during application startup.
+
+- QSplitter
+ Added the new properties: opaqueResize, childrenCollapsible,
+ and handleWidth.
+
+- QSqlError
+ Added a couple of convenience functions: text(), which returns
+ the concatenated database and driver texts. showMessage(),
+ which will pop up a QMessageBox with the text that text()
+ returns.
+
+- QSqlQuery
+ Added overloads for the bindValue() call which makes it
+ possible to specifiy what role a bound value should have: In,
+ Out or InOut.
+
+- QSqlSelectCursor [new]
+ This new QSqlCursor subclass provides browsing of general SQL
+ SELECT statements.
+
+- QSqlDatabase
+ Added overloaded tables() call which can return tables, views
+ and/or system tables.
+
+- QPSQLDriver
+ Calling tables() with no arguments will only return table names,
+ instead of table and view names as in Qt 3.1.
+ The new tables() call in QSqlDatabase can be used to get
+ table and/or view names.
+
+- QString
+ Added 64 bit support. Added the new functions: multiArg(),
+ reserve(), capacity(), squeeze(). Added case insensitive
+ overloads for startsWith() and endsWidth().
+
+- QStringList
+ Added the new function gres().
+
+- QStyle
+ Added support for toolbox, header, MDI frame, table grid line
+ color, line edit password character, and message box question.
+
+- QSyntaxHighlighter
+ Added the new function, currentParagraph().
+
+- QTabWidget
+ Added support for custom widgets to be placed beside
+ the tab bar: setCornerWidget() and cornerWidget().
+
+- QTextEdit
+ In Log mode, added the new functions: setMaxLogLines() and
+ maxLogLines(). Implemented insertAt() for LogText mode.
+
+- QThreadStorage [new]
+ This new tool class provides per-thread data storage, also
+ referred to as thread local storage or TLS.
+
+- QToolBox [new]
+ This new widget class provides a column of tabbed widgets, one
+ above the other, with the current page displayed below the
+ current tab.
+
+- QVariant
+ Added support for LongLong and ULongLong.
+
+- QWidget
+ Added a new widget flag, WNoAutoErase, that combines the now
+ obsolete WResizeNoErase and WRepaintNoErase flags.
diff --git a/dist/changes-3.2.0-b1 b/dist/changes-3.2.0-b1
new file mode 100644
index 0000000..cdd3514
--- /dev/null
+++ b/dist/changes-3.2.0-b1
@@ -0,0 +1,296 @@
+
+Qt 3.2 introduces new features as well as many improvements over the
+3.1.x series. This file gives an overview of the main changes since
+version 3.1.2. For more details, see the online documentation which
+is included in this distribution. The documentation is also available
+at http://doc.trolltech.com/
+
+The Qt version 3.2 series is binary compatible with the 3.1.x series.
+Applications compiled for 3.1 will continue to run with 3.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+
+Qt library
+----------
+
+New classes have been added to the Qt Library including a
+class to add splash screens to applications (QSplashScreen), a toolbox
+widget that provides a column of tabbed widgets (QToolBox), and a
+class to manage per-thread data storage (QThreadStorage).
+
+The SQL module received a fair bit of attention this time. The most
+notable improvements include a native IBM DB2 driver, complete support
+for stored procedures including the possibility to access
+out-parameters, and native support for 64 bit fields without having to
+convert to or from strings. We also added support for setting
+connection parameters. This way you can, for example, conveniently
+open an SSL connection to a MySQL or PostgreSQL database. If you need
+even more customization, e.g. for an Oracle database, you can set up
+the connection yourself and instantiate a Qt driver object on top of
+it. An extended SQL cursor class has been added that makes it more
+convenient to display result sets from general SQL queries
+(QSqlSelectCursor). In addition, you can add custom database drivers
+without compiling them as plugins (see
+QSqlDatabase::registerSqlDriver()).
+
+QLineEdit, the one-line text editor, now supports validation input
+masks. The feature complements the previous QValidator concept and
+allows e.g. restriction of input to the IP address format (mask
+"990.990.990.990;_"), or to ISO date format (mask "0000-90-90;0").
+
+Qt's unicode code support has been extended. Most notably, full
+support for Indic scripts has been added, covering writing systems
+such as Devanagari, Tamil and Bengali. The group of right to left
+writing systems has been extended with support for Syriac. Both
+improvements are available on both Windows with Uniscribe installed,
+and on Unix/X11 when using XFT with OpenType fonts.
+
+All tool classes that support STL-like iterators with begin() and
+end(), contain two extra functions constBegin() and constEnd(). The
+const versions always return const iterators, and thus can be a little
+bit faster with Qt's implicitly shared containers.
+
+QPainter's complex drawText() function has been highly
+optimized. Despite its support for complex unicode scripts, it now
+performs better than its less unicode-capable counterpart in Qt 2.3.
+
+QPixmap now supports pixmaps with alpha channel (semi transparency) on
+all Windows versions except Windows 95 and Windows NT.
+
+The print dialog now supports "selection" as a print range as well as
+the possibility to enable/disable all different printer options
+individually.
+
+Many classes were improved; see the detailed overview that follows.
+
+Qt Motif Extension
+------------------
+
+Dialog handling has matured and has been extended since the
+extension's introduction in Qt 3.1. The documentation and code
+examples have been improved, including a walkthrough that covers the
+complete migration of a real-world Motif example to Qt. The process
+contains four intermediate steps where the application utilizes both
+toolkits.
+
+ActiveQt Extension
+------------------
+
+Type handling has been extended on both the container and the server
+side. The new supported types are byte arrays and 64bit integers. The
+QAxServer module supports QObject subclasses as return and parameter
+types of slots, and allows error reporting through COM exceptions.
+The Designer integration has been extended to support property dialogs
+implemented by the control server.
+
+Qt Designer
+-----------
+
+The popup menu editor has been rewritten. The new editor provides the
+the ability to add, edit and remove menus and menu items directly in
+the menubar and in the popup menu. Navigation and editing can be done
+using either the mouse or the keyboard.
+
+The new QWidgetContainerPlugin class provides support for complex
+custom container widgets in Designer, such as the custom tab widget,
+etc.
+
+The property editor now allows editing of properties with or'd values
+(sets).
+
+Designer also supports the new QToolBox widget in a similar fashion to
+QTabWidget, etc.
+
+Qt Assistant
+------------
+
+Profiles have been introduced to allow applications to extend the use
+of Qt Assistant as a help system. Profiles describe the documentation
+to use so that only application specific documentation will be
+referenced in an end user installation. Profiles also allow some
+customization of the look in Qt Assistant. For detailed information,
+see the helpdemo example in $QTDIR/examples/helpdemo.
+
+Profiles replace the content files and categories system. The
+following command line options are removed since they no longer serve
+any purpose: addContentFile, removeContentFile, category, and
+disableFirstRun.
+
+Qt Assistant has multiple tabs for browsing, therefore enabling
+multiple pages to be browsed without opening a new window.
+
+It is possible to specify a default home page.
+
+It is possible to specify a PDF reader so that urls to PDF files can
+be opened from Qt Assistant.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction / QActionGroup
+ Simplified constructors so that it is no longer necessary to
+ specify texts for buttons and menu items separately.
+ For action groups, we fixed the enable/disable behavior. If
+ an action inside an action group is explicitly disabled, it is
+ no longer implicitly enabled together with the group.
+ This is identical to enabling/disabling widgets and their
+ children.
+
+- QApplication
+ Added the aboutQt() slot for convenience.
+
+- QAssistantClient
+ Added the new function, setArguments(), that invokes Qt
+ Assistant in different modes.
+
+- QAxBase
+ Added the new function, asVariant(), that passes a COM
+ object through dynamicCall().
+
+- QAxBindable
+ Added the new function, reportError(), that sends error
+ information to the ActiveX client.
+
+- QColor
+ Added the new static function, colorNames(), that retrieves a
+ list of all color names known to Qt.
+
+- QDeepCopy
+ Now also supports QDir, QFileInfo, and QStringList.
+
+- QDom
+ Now has long and ulong support for setAttribute() and
+ setAttributeNS().
+
+- QFont
+ Added the new properties: stretch and overline. Added the new
+ function, resolve(), that copies unspecified attributes from
+ one font to another.
+
+- QFontDataBase
+ Added a new overload for families() that restricts the
+ returned list to fonts supporting a specific QFont::Script,
+ e.g. QFont::Greek, QFont::Devanagari or QFont::Arabic.
+
+- QFontInfo / QFontMetrics
+ Added new constructors that force the info and metrics objects
+ to use a given QFont::Script.
+
+- QGLWidget
+ Added a new constructor that takes a QGLContext
+ parameter. Makes the undocumented setContext() obsolete.
+
+- QHeader
+ Added getters for the sort indicator (sortIndicatorSection()
+ and sortIndicatorOrder() ).
+
+- QImage
+ Added a new overload for save() that writes to a given
+ QIODevice*.
+
+- QListView
+ Added tristate support to check list items
+ (QCheckListItem::setTristate()). Added the new function,
+ setSelectionAnchor(), to set the list view's selection anchor
+ explicitly.
+
+- QLineEdit
+ Added input masks: setInputMask(), inputMask(), and
+ hasAcceptableInput().
+
+- QMessageBox
+ Added the new static function, question(), that complements
+ the existing information(), warning() and fatal() functions.
+
+- QMotifDialog [Qt Motif Extension]
+ Now has two distinct modes of operation: 1) it allows a Motif
+ dialog to have a Qt parent, and 2) it allows a Qt dialog to have
+ a Motif parent.
+
+- QPixmapCache
+ Added the new function, remove(), to explicitly remove a
+ pixmap from the cache.
+
+- QPrinter
+ Added the new functions: setPrintRange(), printRange(),
+ setOptionEnabled(), and optionEnabled(). For Windows only,
+ added the new function, setWinPageSize(), that allows setting
+ DEVMODE.dmPaperSize directly.
+
+- QPtrList
+ Added STL-like iterators with begin(), end(), and erase().
+
+- QScrollBar
+ Maintains a user defined size policy when the direction
+ changes.
+
+- QSplashScreen [new]
+ This new widget class provides a splash screen to be shown
+ during application startup.
+
+- QSplitter
+ Added the new properties: opaqueResize, childrenCollapsible,
+ and handleWidth.
+
+- QSqlError
+ Added a couple of convenience functions: text(), which returns
+ the concatenated database and driver texts. showMessage(),
+ which will pop up a QMessageBox with the text that text()
+ returns.
+
+- QSqlQuery
+ Added overloads for the bindValue() call which makes it
+ possible to specifiy what role a bound value should have: In,
+ Out or InOut.
+
+- QSqlSelectCursor [new]
+ This new QSqlCursor subclass provides browsing of general SQL
+ SELECT statements.
+
+- QString
+ Added 64 bit support. Added the new functions: multiArg(),
+ reserve(), capacity(), squeeze(). Added case insensitive
+ overloads for startsWith() and endsWidth().
+
+- QStringList
+ Added the new function gres().
+
+- QStyle
+ Added support for toolbox, header, MDI frame, table grid line
+ color, line edit password character, and message box question.
+
+- QSyntaxHighlighter
+ Added the new function, currentParagraph().
+
+- QTabWidget
+ Added support for custom widgets to be placed beside
+ the tab bar: setCornerWidget() and cornerWidget().
+
+- QTextEdit
+ In Log mode, added the new functions: setMaxLogLines() and
+ maxLogLines().
+
+- QThreadStorage [new]
+ This new tool class provides per-thread data storage, also
+ referred to as thread local storage or TLS.
+
+- QToolBox [new]
+ This new widget class provides a column of tabbed widgets, one
+ above the other, with the current page displayed below the
+ current tab.
+
+- QVariant
+ Added support for LongLong and ULongLong.
+
+- QWidget
+ Added a new widget flag, WNoAutoErase, that combines the now
+ obsolete WResizeNoErase and WRepaintNoErase flags.
+
+- QWidgetContainerPlugin [new]
+ This new plugin class complements QWidgetPlugin for custom
+ container widgets, i.e. widgets that can host child
+ widgets.
diff --git a/dist/changes-3.2.0-b2 b/dist/changes-3.2.0-b2
new file mode 100644
index 0000000..98910a8
--- /dev/null
+++ b/dist/changes-3.2.0-b2
@@ -0,0 +1,121 @@
+
+Qt 3.2 introduces new features as well as many improvements over the
+3.1.x series. This file gives an overview of the main changes since
+version 3.1.2. For more details, see the online documentation which
+is included in this distribution. The documentation is also available
+at http://doc.trolltech.com/
+
+The Qt version 3.2 series is binary compatible with the 3.1.x series.
+Applications compiled for 3.1 will continue to run with 3.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+ActiveQt
+--------
+
+Controls developed with ActiveQt support aggregation, which makes it
+possible to use them in containers that require this form of containment to
+be supported. ActiveQt also supports masked controls in containers that
+support this for window'ed controls.
+
+Compilers
+---------
+
+Note: Qt 3.2 is the last version to officially support IRIX MIPSpro
+o32 and Sun CC 5.0. A script, $QTDIR/bin/qt32castcompat, is provided
+for 3.2 which needs to be run for these compilers.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QApplication
+ Win32 only: Stop compressing mouse move events when a change
+ in the key state is detected. Allow multiple QApplication
+ objects be created sequentially by resetting the pointers to
+ static objects on destruction.
+
+- QClipboard
+ X11 only: Various fixes.
+
+- QDockWindow
+ Various layout fixes.
+
+- QFont related classes
+ Many fixes and improvements.
+
+- QGLWidget
+ X11 only: Various fixes to make pixmap rendering work better
+ with accelerated nVidia drivers.
+
+- QImage
+ Fixed writing of QImages.
+
+- QLayout
+ Fixed layout to take the menu bar's minimum width into
+ consideration and correctly propagate spacing() from parent to
+ child layouts.
+
+- QLineEdit
+ Replace all non-printable characters with spaces when
+ drawing. Added new function selectionStart() which returns
+ the index of the first selected character in the line edit.
+
+- QListBox
+ Improved item search based on keystrokes.
+
+- QListView
+ Don't move the inline item editor out of the visible area for
+ wide items. Ignore +/- indicator for columns other than the
+ first one. Fixed keyboard handling in Multi selection
+ mode. Improve drawing of extremely long item texts.
+
+- QListViewItem
+ Respects icons vertical alignment properly.
+
+- QMYSQLDriver
+ Better support for MySQL/embedded. Bind TEXT blob fields as
+ strings instead of byte arrays.
+
+- QPainter
+ Qt/Embedded only: Fixed printing issues.
+
+- QPrinter
+ Mac only: Fixed printing issues.
+
+- QSocketDevice
+ Windows only: Fixed setBlocking(TRUE) to work properly.
+
+- QString
+ Fixed toShort() and toUShort() to behave correctly when passed
+ a null pointer as 'ok' value.
+
+- QStyleFactory
+ Return the correct style name from the factory for the
+ WindowsXP style.
+
+- QTable
+ Replace old contents when editing. Take hidden rows into
+ account when activating cells. Clear the cell widget when
+ clearing a cell.
+
+- QTextBrowser
+ Fixed table headers to be bold.
+
+- QTextEdit
+ Implemented insertAt() for LogText mode. Fixed undoAvailable
+ and redoAvailable to be emitted correctly from the context
+ menu. Fixed tripleclick selection in QTextEdit.
+
+- QToolButton
+ Prevent nested openings of the tool button popups.
+
+- QWindowsXPStyle
+ Various paint bug fixes.
+
+- QWorkspace
+ Fixed workspace to keep the active window when
+ tiling. Improved icon handling for maximized and minimized
+ windows.
diff --git a/dist/changes-3.2.1 b/dist/changes-3.2.1
new file mode 100644
index 0000000..c5a2915
--- /dev/null
+++ b/dist/changes-3.2.1
@@ -0,0 +1,143 @@
+Qt 3.2.1 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.2.0
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Compilers
+---------
+
+Small fixes to build with gcc-3.4. Build fix for the DB2 Sql driver
+on Borland. Work around a compiler bug in Sun Forte 6. Fix a build
+issue for 64bit HP/UC.
+
+Qt Motif Extension
+------------------
+
+Document a known problem related to clipboard and selection handling
+between Qt and Motif components. See the Qt Motif Extension
+documentation for a more detailed description of the problem.
+
+Qt Designer
+-----------
+Correctly remove connections to deleted actions from the meta
+database.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+- QApplication
+ Update arguments passed to the constructor correctly when
+ arguments have already been processed.
+- QDockWindow
+ Fix a regression against 3.1.2 with minimized dock windows.
+- QDom
+ Fix a bug in ownerDocument()
+- QFontDialog
+ Fix to small usability regressions from 3.1.2.
+- QLineEdit
+ Fix regression against 3.1.2: textChanged signal after
+ setText("") should contain a non null string.
+- QMotifDialog [Qt Motif Extension]
+- QMotifWidget [Qt Motif Extension]
+ Fix incorrect usage of XtSetArg(). In certain cases, some
+ variables would be incorrectly modified, resulting in
+ out-of-bounds memory access and/or crashes.
+- QPainter/QFontMetrics
+ Fix some problems related to line breaking and size
+ calculation of multi line text layouts.
+- QSplitter
+ Fix a problem with setCollapsible.
+- QSqlCursor
+ Fix updates in tables without a primary key.
+- Sql
+ Fix crash in odbc and db2 drivers when using binary fields.
+- QTable
+ Fix possible crash in the QTable destructor.
+- QWidgetStack
+ Fix a slight behavioral change in the sizeHint between 3.1.2
+ and 3.2.
+- QApplication::reverseLayout
+ Fix some problems with dockwindows/toolbars in reverse layout
+ mode.
+- QListView
+ Fix emitting of dropped().
+
+Platform Specific Issues
+------------------------
+
+Windows:
+
+- QFont
+ Fix possible memory corruption when printing.
+ Windows 98: Fix a problem with displaying of russian
+ text using the default font.
+- QPainter
+ Fix a regression printing text in high resolution mode.
+- QPrinter
+ Fix a problem in setPageSize().
+ Windows 95/98/Me: Fix a possible crash.
+- QWaitCondition and QThread
+ Fix two possible race conditions.
+- XP style
+ Fix resource leak.
+- QString
+ QString::sprintf() work around a memory leak in the Windows C
+ runtime.
+- Dnd
+ Fix problem with dragging URLs.
+ Reverted back accept(), ignore(), acceptAction() to 3.1.x behavior.
+- IME framework
+ Better positioning of the IME composition window.
+
+Mac:
+
+- QStyle:
+ Smaller fixes to the Mac Style.
+ Some fixes for Panther.
+- QFont
+ Fixes for arabic; speed improvements.
+ Make the NoAntialias flag work.
+
+X11:
+
+- QFont
+ Fix possible crash with broken open type fonts.
+- QWidget
+ Fix possible crash in setMicroFocusHint().
+- QPrinter
+ Fix possible crash when drawing text with opaque background.
+ Fix crash if printer tries to print to a nonexistant printer.
+- QRegion
+ Fix drawing problem when using some complex clip
+ regions on the painter.
+- IME framework
+ Fix a possible performance problem and server side memory
+ leak.
+- DnD
+ Fix regression against 3.1.1 when dragging across multiple
+ screens.
+
+Embedded:
+
+- QApplication
+ Fix mouse event delivery bug with modal dialogs and touch
+ screens.
+- QRegion
+ An empty rectangle will now create an empty region, like on
+ the other platforms.
+- QPixmap
+ Preserve alpha channel in xform().
+- QFont
+ Make setPixelSize() work correctly.
+- QImage
+ Fix loading of BMP images.
+- Build system
+ Make the -no-zlib option work correctly.
diff --git a/dist/changes-3.2.2 b/dist/changes-3.2.2
new file mode 100644
index 0000000..e6d1424
--- /dev/null
+++ b/dist/changes-3.2.2
@@ -0,0 +1,155 @@
+Qt 3.2.2 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.2.1
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Compilers
+---------
+
+Make Qt work on Windows 9x compiled with Borland.
+
+Meta Object Compiler
+--------------------
+
+Generate safer code for signals with pointer-to-pointer arguments.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+- QButton
+ Make sure button pops up when mouse leaves the button.
+- QEffects
+ Don't crash when widget is destroyed during effect.
+- QFont
+ Load the correct font for characters that have the 'Unicode'
+ script assigned to them (e.g. the em-dash).
+ Fix exact match for raw mode fonts.
+ Fix conversion from unicode to gb2312 to make Chinese appear
+ correctly again when using xlfd fonts.
+- QLineEdit
+ Proper behavior when dragging text inside the same line edit.
+ Make sure the cursor is immediately displayed upon entering a
+ line edit.
+- QListView
+ Update the scroll bars correctly when double clicking on the
+ edge of the header.
+- QPainter
+ Fix case in text rendering, where overfull lines did not get
+ layouted correctly.
+ Fix the last known problems in Indic rendering.
+- QProcess
+ Make canReadLine...() work in a busy loop.
+- QPrinter
+ Set the default paper source properly.
+- QPSPrinter
+ Handle broken true type fonts better.
+ Handle true type fonts with spaces in the family name.
+- QRichText
+ Fix a crash when zooming.
+ Fix possible memory leak.
+- QScrollBar
+ Propagate context menu events that are not handled by the
+ scroll bar.
+
+- QString
+ Support non-'C' locales for string-to-double conversion.
+- QSql
+ Oracle crash fix in some really weird situations.
+- QTable
+ Handle icons correctly when swapping columns/rows.
+ Fix case where a dialog containing a table could hang when
+ opening.
+ Do not crash when QTableHeader::updateSelections() is called,
+ without a current selection.
+- QTextEdit
+ Fixed crash in setCurrentFont() when in LogText mode.
+ Fixed backward searches for the first character or word in a
+ document.
+- QTextEngine
+ Fix memory leaks.
+- QWidgetResizeHandler
+ Improve user interaction.
+- QXmlSimpleReader
+ Fix reading of events after a skippedEntity().
+
+Platform Specific Issues
+------------------------
+
+Windows:
+
+- QFontDatabase
+ Report fixedPitch attribute for fonts correctly.
+ Handle fonts with a hyphen in the name properly.
+- QGLContext
+ Thread safety fix for makeCurrent().
+- QPixmap
+ Detect alpha channel in pixmaps correctly.
+ Fix crash on Windows 9x using alpha blended pixmaps with
+ MemoryOptim.
+ Fix memory leak when detaching copies from pixmaps with
+ alpha channels.
+ Make sure that sizes are correct after xForm().
+ Fix drawing of a masked pixmap into a pixmap with an alpha
+ channel.
+- QPrinter
+ Fix printer output of the drawPixmap()/drawImage() functions
+ that take a rectangle as a parameter.
+ Block all application windows modally when the system printer
+ dialog is open.
+- QWidget
+ Speedup case where tablet support is enabled in library, but
+ no tablet device is present.
+- QWindowsXPStyle
+ Fix gradient background of QLabels within QTabWidgets.
+ Fix "password" character for systems without extended font
+ support.
+
+Mac:
+
+ Improved documentation of Mac-specific issues. A number of
+ general improvements, style fixes, optimizations and bugfixes
+ have been made for Qt/Mac in 3.2.2. Some of the most visible
+ are:
+
+- QSizeGrip
+ Handle hide/show better.
+- QSocket
+ More responsive handling of incoming data reads.
+- QWidget
+ Create widget even if widget flag combinations make no sense.
+ Widget clipping fixes for OpenGL.
+ Widget masking fixed.
+ Fix the problem of a window being set active in show() and
+ then losing its activation when returning from a second event
+ loop.
+
+X11:
+
+- Drag'n'drop
+ Stability improvements.
+- QApplication
+ Make sure that mouse events have proper coordinates when mouse
+ enters widget.
+- QFont
+ Make sure that screen and printer metrics are the same for
+ bitmapped fonts.
+ Avoid crashes with invalid fonts.
+- QPicture
+ Fix text drawing.
+
+Embedded:
+
+- QWSPcMouseHandler
+ Fix buffer overrun when reading from mouse device.
+ Also look for mouse in /dev/inputs/mice when autodetecting.
+
+- QPainter
+ Fix rotated text on 4, 8 and 16 bpp screens.
diff --git a/dist/changes-3.2.3 b/dist/changes-3.2.3
new file mode 100644
index 0000000..a88e930
--- /dev/null
+++ b/dist/changes-3.2.3
@@ -0,0 +1,150 @@
+Qt 3.2.3 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.2.2
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Compilers
+---------
+
+Work around Solaris, AIX, and HP-UX bug affecting
+QString::operator=(const QString &) when linking statically.
+
+Fix gcc 3.4 compile problems.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+- QJpegIO
+ Fix memory leak when writing JPEG files.
+
+- QLineEdit
+ Preserve null and empty strings correctly in setText().
+
+- QMessageBox
+ Preserve undocumented behavior in 3.1: expand tabs.
+
+- QMimeSourceFactory
+ Don't crash when a factory uses a pointer to a QMimeSource
+ which is owned by another factory.
+
+- QMovie
+ Respect the background color of a movie when loading
+ animations with transparent pixels.
+ Fix color mode if reading 1-bpp images or frames.
+
+- QPainter
+ Fill the complete bounding rect when rendering text with an
+ opaque painter.
+
+- QRichtext
+ Fix special case where <nobr>\nfoo had an extra space.
+ Fix line breaking for Latin text.
+
+- QTextEdit
+ Improve speed of syntax highlighting.
+
+- QToolBar
+ Do not grow in height when put inside a normal widget.
+
+- QWheelEvent
+ Wheel events are now only sent to the focus widget if the
+ widget under the mouse doesn't handle the event.
+
+- QWMatrix
+ Fix operator *(QRegion) when the world matrix is (-1 0 0 1 0 0)
+ or similar.
+
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+- QPrinter
+ Fix resource leak when printing on Windows 9x.
+ Fix crash for Win98 with HP OfficeJet Pro 1150C.
+
+- QTextBrowser
+ Fixed weight problem in setFont().
+
+- QUriDrag
+ Fix bugs with encoding and separators.
+
+Mac:
+
+Mac OS X 10.3 (Panther) changes:
+
+- QMacStyle
+ Draw push button text vertically-centered.
+
+- QSplashScreen
+ Make the splash screen centered.
+
+- QWidget
+ Tooltips are displayed in the correct place in Panther.
+ Applications that save and restore their geometry will not
+ "walk up" the screen.
+
+General Mac OS X changes:
+
+Fix crash on exit problem (e.g. with Qt Designer).
+
+- QApplication
+ Fix mouse release problem when Control is used to emulate
+ mouse button 2.
+
+- QDesktopWidget
+ Fix problem with popup windows and dual monitors.
+
+- QFont
+ Improve fixed pitch font handling.
+
+- QMenuBar
+ Fix crash with empty menus.
+ Make sure that when we show the application menu, the items we
+ merged in from the other popup menu's are properly
+ enabled/disabled.
+ Fix case where clicking menu bar would stop timers firing.
+
+X11:
+
+- QApplication
+ Avoid endless client message loops when replying to
+ _NET_WM_PING events.
+
+- QFont
+ Fix crash when using high latin characters with GNU unifont.
+ Fix scale factor for printing (rounding error).
+
+- QPainter
+ Fix an endless loop and a bug in the shape engine for Hangul
+ Jamo. (Affects only ancient Korean texts.)
+
+- QPrinter
+ Work around bugs in Xft that cause memory corruption in the
+ postscript printer when downloading certain fonts.
+
+- QSound
+ Fixed crash when deleting a QSound object while it was
+ playing.
+
+
+Embedded:
+
+Fixed bug when applications connect then disconnect immediately.
+Added experimental code to handle 1-bpp and 4-bpp displays for
+big-endian architectures (turned off by default).
+
+- QEventLoop
+ Make processEvents(ExcludeUserInput) work.
+
+- QPrinter
+ Fix font metrics when printing with QPrinter::HighResolution.
diff --git a/dist/changes-3.3.0 b/dist/changes-3.3.0
new file mode 100644
index 0000000..8523592
--- /dev/null
+++ b/dist/changes-3.3.0
@@ -0,0 +1,313 @@
+Qt 3.3 introduces many new features as well as many improvements over
+the 3.2.x series. For more details, see the online documentation which
+is included in this distribution. The documentation is also available
+at http://doc.trolltech.com/
+
+The Qt version 3.3 series is binary compatible with the 3.2.x series.
+Applications compiled for 3.2 will continue to run with 3.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt library
+----------
+
+Qt 3.3 is .NET enabled. This release shows how to use classes
+developed with Qt in a .NET environment. It includes an analysis of
+the different interoperability infrastructures provided by the .NET
+framework. An example demonstrates how to use both a manual approach
+with Microsoft's managed extensions to the C++ language, and also
+automated solutions based on COM and the ActiveQt framework to reuse
+native Qt classes and widgets in .NET projects. To learn more about Qt
+and .NET read the "Using Qt objects in Microsoft .NET" walkthrough
+found in the ActiveQt framework documentation.
+
+Qt 3.3 now supports IPv6 in addition to IPv4. New functions have been
+added for IPv6 support to QSocketDevice, QHostAddress and QDNns.
+
+Qt now includes a new tool class called QLocale. This class converts
+between numbers and their string representations in various languages.
+QLocale supports the concept of a default locale which allows a locale
+to be set globally for the entire application.
+
+Support for new 64bit platforms and compilers has been added for Qt
+3.3. Qt now supports Itanium on both Linux (Intel C++ compiler) and
+Windows (MSVC and Intel C++ Compiler). Qt 3.3 now also officially
+supports FreeBSD.
+
+Qt 3.3 also supports precompiled headers for Windows, Mac OS X and
+X11. To use precompiled headers when compiling your Qt application
+simply add PRECOMPILED_HEADER and then specify the header file to
+precompile in your .pro file. To learn more about precompiled headers
+see the "Using Precompiled Headers" chapter in the qmake User Guide.
+
+Two new database drivers have been added to the SQL module, InterBase
+and SQLite. This makes it possible to write database applications that
+do not require a database server. SQLite is provided in the Qt 3.3
+distribution and can be enabled with either -qt-sql-sqlite or
+-plugin-sql-sqlite. The InterBase plugin also works with Firebird, the
+open source version of InterBase.
+
+QWidget has a new function setWindowState() which is used to make a
+widget maximized, minimized, etc. This allows individual settings for
+the minimized/maximized/fullscreen properties.
+
+Support for semi-transparent top-level widgets on Mac OS X and Windows
+2000/XP has also been added.
+
+A new example, qregexptester, has been added that makes it easy to
+test QRegExps on sample strings.
+
+Qt 3.3 includes in addition to this, numerous bug fixes and
+improvements. Special thanks goes to KDE for their reports and
+suggestions.
+
+
+Qt/Embedded
+-----------
+
+Added support for SNAP graphics drivers from SciTech Software. This
+gives access to accelerated drivers for more than 150 graphics
+chipsets.
+
+
+Qt/Mac
+------
+
+QAccessible support has been introduced (implemented in terms of Apple's
+Universal Access API).
+
+Added support for Xcode project files in qmake.
+
+Added Tablet support for Mac OS X.
+
+Numerous visual improvements.
+
+
+Qt/X11
+------
+
+Added support for Xft2 client side fonts on X servers without the
+RENDER extension.
+
+Added a new configure option (-dlopen-opengl) which will remove the
+OpenGL and Xmu library dependencies in the Qt library. The functions
+used by Qt in those libraries are resolved manually using dlopen()
+when this option is used.
+
+Improved support for the Extended Window Manager Hints.
+
+
+Qt/Windows
+----------
+
+Added support for Windows Server 2003 (Win64/Itanium).
+
+
+Qt Motif Extension
+------------------
+
+Clipboard operations now work between Qt and Motif widgets in the same
+application. Click-to-focus works with Motif widgets that are children
+of a QMotifWidget.
+
+
+ActiveQt Extension
+------------------
+
+Two new functions, QAxFactory::startServer() and
+QAxFactory::stopServer(), can be used to start and stop an
+out-of-process ActiveQt server at runtime. The new functions
+QAxFactory::serverDirPath() and QAxFactory::serverFilePath() return
+the location of the COM server binary. Server binaries no longer
+need to implement a main() entry point function. A default
+implementation is used for out-of-process servers. IClassFactory2
+is supported for the development of licensed components, and
+QAxFactory supports the creation of non-visual COM objects. Class
+specific information can be provided directly in the C++ class
+declaration using the Q_CLASSINFO macro to control how objects and
+controls are registered and exposed. New helper classes and macros
+are avialable to make it even easier to expose object classes (see the
+QAxServer documentation for details).
+
+COM objects developed with ActiveQt are now supported in a wider range
+of clients, including Microsoft Office applications and .NET. Examples
+that demonstrate how to use the Qt objects from the examples in .NET
+languages like C# are included. QStringList is supported as a type,
+and QRect, QSize and QPoint are now supported datatypes for control
+properties and as reference parameters. Saving the controls to a
+storage or stream now includes the version number of the QDataStream
+used for the serialization (note that this might break existing
+storages).
+
+The QAxContainer library is now static even for shared configurations
+of Qt. This simplifies deployment and allows using both QAxServer and
+QAxContainer in one project, i.e. an OLE automatable application that
+uses COM objects itself. The semantics of QAxBase::setControl() have
+been extended to allow creating of COM objects on remote machines via
+DCOM, to create controls requiring a license key and to connect to
+already running objects. The implementation of QAxBase::dynamicCall()
+has been improved to support passing of parameter values directly in
+the function string. Three new classes, QAxScript, QAxScriptManager
+and QAxScriptEngine, can be used to script COM objects from within Qt
+applications using Windows Script Host.
+
+SAFEARRAY(BSTR) parameters are supported as QStringList. Calling COM
+object methods with out-parameters of type short, char and float is
+now supported (the parameters are of type int& and double& in the Qt
+wrapper), and QVariants used for out-parameters don't have to be
+initialized to the expected type. Calling QByteArray functions in
+out-of-process controls no longer returns an error code. The control's
+client side is set to zero when the container releases the control.
+
+
+Qt Designer
+-----------
+
+Qt Designer, Qt's visual GUI builder, has received some speed
+optimizations, along with minor improvements to the menu editor.
+
+
+Qt Assistant
+------------
+
+Qt Assistant now saves the states of the tab bars between runs. This
+enables users to start browsing where they ended their previous
+assistant session.
+
+Shortcuts for Find Next (F3) and Find Previous (Shift+F3) have been
+implemented.
+
+
+Compilers
+---------
+
+Qt 3.3 adds support for two new compilers. The Intel C++ compiler is
+supported on Windows, Linux and FreeBSD. GNU gcc is supported on
+Windows using MinGW.
+
+Qt 3.3 no longer officially supports the Sun WorkShop 5.0 compiler or the
+SGI MIPSpro o32 mode.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction
+ Added a setDisabled() slot similar to QWidget::setDisabled.
+ Added an activate() slot which activates the action and
+ executes all connected slots.
+ QActions::menuText() escapes ampersand characters ('&') when
+ using the value of the text property.
+
+- QButtonGroup
+ Added QButtonGroup::selectedId property to allow mapping with
+ SQL property sets.
+
+- QCursor
+ Added new enum value Qt::BusyCursor.
+ X11 only: Added QCursor constructor taking a X11 cursor handle.
+
+- QDom
+ The QDom classes are now reentrant.
+
+- QEvent
+ Added new event type WindowStateChange, obsoleting ShowNormal,
+ ShowMinimized, ShowMaximized and ShowFullScreen.
+
+- QHeader
+ The sizeChange() signal is emitted when the section sizes are
+ adjusted by double clicking.
+
+- QHostAddress
+ Added new constructor for IPv6 and new functions
+ isIPv6Address() and toIPv6Address(). Obsoleted the functions
+ isIp4Addr() and ip4Addr(), replacing them with isIPv4Address()
+ and toIPv4Address().
+
+- QIconView
+ Improved keyboard search to behave like QListView.
+
+- QListView
+ Improved alignment for text in QListViewItems. Right aligned
+ text now has the ellipsis on the left.
+ Keyboard search now uses the sort column as the column to
+ start searching in.
+ Improved branch drawing.
+
+- QLocale [new]
+ This new tool class converts between numbers and their string
+ representations in various languages.
+
+- QMacStyle
+ Allow disabling of size constraints.
+
+- QMovie
+ Added JNG support.
+
+- QPixmap
+ Support full alpha-maps for paletted (8-bit) images.
+ Support 16-bit grayscale PNG images with transparency.
+
+- QPushButton
+ A push button with both an iconset and text left-aligns the
+ text.
+
+- QSocketDevice
+ Added setProtocol() and protocol() for IPv6 support.
+
+- QSound
+ Windows: Support loop related APIs.
+
+- QSplashScreen
+ Less intrusive stay-on-top policy.
+
+- QSql
+ Support for InterBase and SQLite.
+
+- QStatusBar
+ Draw messages with the foreground() color of the palette,
+ rather than with the text() color.
+
+- QString
+ Added support for %lc and %ls to sprintf(). %lc takes a
+ Unicode character of type ushort, %ls takes a zero-terminated
+ array of Unicode characters of type ushort (i.e. const
+ ushort*). Also added support for precision (e.g. "%.5s").
+ Changed arg() to support "%L1" for localized conversions.
+ Windows only: QString::local8Bit() now returns an empty
+ QCString when called on a null QString to unify behavior
+ with the other platforms.
+
+- QStyle
+ Add a new primitive element: PE_RubberBand.
+ Added PM_MenuBarItemSpacing and PM_ToolBarItemSpacing pixel metrics.
+
+- QTextDrag
+ decode() now autodetects the encoding of text/html content.
+
+- QTextEdit
+ Reduced memory consumption by 20 bytes per line.
+ Added a getter for the currently set QSyntaxHighlighter.
+
+- QTextBrowser
+ Qt now automatically detects the charset of HTML files set
+ with setSource().
+
+- QVariant
+ Comparison between variants where one of the variants is a
+ numeric value will compare on the numeric value. Type casting
+ between different variants is more consistent.
+
+- QWidget
+ Added setWindowOpacity() and windowOpacity() to support
+ transparent top-level widgets on Windows and Mac.
+ Added windowState() and setWindowState() to allow individual
+ setting of the minimized/maximized/fullscreen properties.
+
+- QWindowsStyle
+ Qt supports toggling of the accelerator underlines using the
+ Alt-key on Windows 98, 2000 and later. On other platforms this
+ change has no effect.
diff --git a/dist/changes-3.3.0-b1 b/dist/changes-3.3.0-b1
new file mode 100644
index 0000000..8a7433b
--- /dev/null
+++ b/dist/changes-3.3.0-b1
@@ -0,0 +1,284 @@
+Qt 3.3 introduces many new features as well as many improvements over
+the 3.2.x series. For more details, see the online documentation which
+is included in this distribution. The documentation is also available
+at http://doc.trolltech.com/
+
+The Qt version 3.3 series is binary compatible with the 3.2.x series.
+Applications compiled for 3.2 will continue to run with 3.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt library
+----------
+
+Qt 3.3 is .NET enabled. This release shows how to use classes
+developed with Qt in a .NET environment. It includes an analysis of
+the different interoperability infrastructures provided by the .NET
+framework. An example demonstrates how to use both a manual approach
+with Microsoft's managed extensions to the C++ language, and also
+automated solutions based on COM and the ActiveQt framework to reuse
+native Qt classes and widgets in .NET projects. To learn more about Qt
+and .NET read the "Using Qt objects in Microsoft .NET" walkthrough
+found in the ActiveQt framework documentation.
+
+Qt 3.3 now supports IPv6 in addition to IPv4. New functions have been
+added for IPv6 support to QSocketDevice, QHostAddress and QDNns.
+
+Qt now includes a new tool class called QLocale. This class converts
+between numbers and their string representations in various languages.
+QLocale supports the concept of a default locale which allows a locale
+to be set globally for the entire application.
+
+Support for new 64bit platforms and compilers has been added for Qt
+3.3. Qt now supports Itanium on both Linux (Intel) and Windows
+(VC++). Qt 3.3 now also officially supports FreeBSD.
+
+Qt 3.3 also supports precompiled headers for both Windows and Mac OS
+X. To use precompiled headers when compiling your Qt application
+simply add PRECOMPH and then specify the header file to precompile in
+your .pro file. To learn more about precompiled headers see the
+"Using Precompiled Headers" chapter in the qmake User Guide.
+
+Two new database drivers have been added to the SQL module, InterBase
+and SQLite. This makes it possible to write database applications that
+do not require a database server. SQLite is provided in the Qt 3.3
+distribution and can be enabled with either -qt-sql-sqlite or
+-plugin-sql-sqlite. The InterBase plugin also works with Firebird, the
+open source version of InterBase.
+
+QWidget has a new function setWindowState() which is used to make a
+widget maximized, minimized, etc. This allows individual settings for
+the minimized/maximized/fullscreen properties.
+
+Support for semi-transparent top-level widgets on Mac OS X and Windows
+2000/XP has also been added.
+
+Qt 3.3 includes in addition to this, numerous bug fixes and
+improvements. Special thanks goes to KDE for their reports and
+suggestions.
+
+
+Qt/Embedded
+-----------
+
+Added support for SNAP graphics drivers from SciTech Software. This
+gives access to accelerated drivers for more than 150 graphics
+chipsets.
+
+
+Qt/Mac
+------
+
+Added support for Xcode project files in qmake.
+Added Tablet support for Mac OS X.
+Numerous visual improvements.
+
+
+Qt/X11
+------
+
+Added support for Xft2 client side fonts on X servers without the
+RENDER extension.
+
+Added a new configure option (-dlopen-opengl) which will remove the
+OpenGL and Xmu library dependencies in the Qt library. The functions
+used by Qt in those libraries are resolved manually using dlopen()
+when this option is used.
+
+Improved support for the Extended Window Manager Hints.
+
+
+Qt/Windows
+----------
+
+Added support for Windows Server 2003 (Win64/Itanium).
+
+
+Qt Motif Extension
+------------------
+
+Clipboard operations now work between Qt and Motif widgets in the same
+application. Click-to-focus works with Motif widgets that are children
+of a QMotifWidget.
+
+
+ActiveQt Extension
+------------------
+
+Two new functions, QAxFactory::startServer() and
+QAxFactory::stopServer(), can be used to start and stop an
+out-of-process ActiveQt server at runtime. The new functions
+QAxFactory::serverDirPath() and QAxFactory::serverFilePath() return
+the location of the COM server binary. Server binaries no longer
+need to implement a main() entry point function. A default
+implementation is used for out-of-process servers. IClassFactory2
+is supported for the development of licensed components, and
+QAxFactory supports the creation of non-visual COM objects. Class
+specific information can be provided directly in the C++ class
+declaration using the Q_CLASSINFO macro to control how objects and
+controls are registered and exposed. New helper classes and macros
+are avialable to make it even easier to expose object classes (see the
+QAxServer documentation for details).
+
+COM objects developed with ActiveQt are now supported in a wider range
+of clients, including Microsoft Office applications and .NET. Examples
+that demonstrate how to use the Qt objects from the examples in .NET
+languages like C# are included. QStringList is supported as a type,
+and QRect, QSize and QPoint are now supported datatypes for control
+properties and as reference parameters. Saving the controls to a
+storage or stream now includes the version number of the QDataStream
+used for the serialization (note that this might break existing
+storages).
+
+The QAxContainer library is now static even for shared configurations
+of Qt. This simplifies deployment and allows using both QAxServer and
+QAxContainer in one project, i.e. an OLE automatable application that
+uses COM objects itself. The semantics of QAxBase::setControl() have
+been extended to allow creating of COM objects on remote machines via
+DCOM, to create controls requiring a license key and to connect to
+already running objects. The implementation of QAxBase::dynamicCall()
+has been improved to support passing of parameter values directly in
+the function string. Three new classes, QAxScript, QAxScriptManager
+and QAxScriptEngine, can be used to script COM objects from within Qt
+applications using Windows Script Host.
+
+SAFEARRAY(BSTR) parameters are supported as QStringList. Calling COM
+object methods with out-parameters of type short is now supported (the
+parameters are of type int& in the Qt wrapper), and QVariants used for
+out-parameters don't have to be initialized to the expected type.
+Calling QByteArray functions in out-of-process controls no longer
+returns an error code. The control's client side is set to zero when
+the container releases the control.
+
+
+Qt Designer
+-----------
+
+Qt Designer, Qt's visual GUI builder, has received some speed
+optimizations, along with minor improvements to the menu editor.
+
+
+Qt Assistant
+------------
+
+Qt Assistant now saves the states of the tab bars between runs. This
+enables users to start browsing where they ended their previous
+assistant session.
+
+Shortcuts for Find Next (F3) and Find Previous (Shift+F3) have been
+implemented.
+
+
+Compilers
+---------
+
+Qt 3.3 adds support for two new compilers. The Intel C++ compiler is
+supported on Linux and FreeBSD. GNU gcc is supported on Windows using
+MinGW.
+
+Qt 3.3 no longer officially supports the Sun CC 5.0 compiler or the
+IRIX MIPSpro o32 mode.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAction
+ Added a setDisabled() slot similar to QWidget::setDisabled.
+ Added an activate() slot which activates the action and
+ executes all connected slots.
+ Added showStatusMessage() and whatsThisClicked() signals.
+
+- QButtonGroup
+ Added QButtonGroup::selectedId property to allow mapping with
+ SQL property sets.
+
+- QCursor
+ Added new enum value Qt::BusyCursor.
+
+- QDom
+ The QDom classes are now reentrant.
+
+- QEvent
+ Added new event type WindowStateChange, obsoleting ShowNormal,
+ ShowMinimized, ShowMaximized and ShowFullScreen.
+
+- QHeader
+ The sizeChange() signal is emitted when the section sizes are
+ adjusted by double clicking.
+
+- QHostAddress
+ Added new constructor for IPv6 and new functions
+ isIPv6Address() and toIPv6Address(). Obsoleted the functions
+ isIp4Addr() and ip4Addr(), replacing them with isIPv4Address()
+ and toIPv4Address().
+
+- QListView
+ Improved alignment for text in QListViewItems. Right aligned
+ text now has the ellipsis on the left.
+ Keyboard search now uses the sort column as the column to
+ start searching in.
+ Improved branch drawing.
+
+- QLocale [new]
+ This new tool class converts between numbers and their string
+ representations in various languages.
+
+- QMacStyle
+ Allow disabling of size constraints.
+
+- QMovie
+ Added JNG support.
+
+- QPixmap
+ Support full alpha-maps for paletted (8-bit) images.
+ Support 16-bit grayscale PNG images with transparency.
+
+- QSocketDevice
+ Added setProtocol() and protocol() for IPv6 support.
+
+- QSound
+ Windows: Support loop related APIs.
+
+- QSplashScreen
+ Less intrusive stay-on-top policy.
+
+- QSql
+ Support for InterBase and SQLite.
+
+- QStatusBar
+ Draw messages with the foreground() color of the palette,
+ rather than with the text() color.
+
+- QString
+ Added support for %lc and %ls to sprintf(). %lc takes a
+ Unicode character of type ushort, %ls takes a zero-terminated
+ array of Unicode characters of type ushort (i.e. const
+ ushort*). Also added support for precision (e.g. "%.5s").
+ Changed arg() to support "%L1" for localized conversions.
+
+- QStyle
+ Add a new primitive element: PE_RubberBand.
+
+- QTextEdit
+ Reduced memory consumption by 20 bytes per line.
+ Added a getter for the currently set QSyntaxHighlighter.
+
+- QVariant
+ Comparison between variants where one of the variants is a
+ numeric value will compare on the numeric value. Type casting
+ between different variants is more consistent.
+
+- QWidget
+ Added setWindowOpacity() and windowOpacity() to support
+ transparent top-level widgets on Windows and Mac.
+ Added windowState() and setWindowState() to allow individual
+ setting of the minimized/maximized/fullscreen properties.
+
+- QWindowsStyle
+ Qt supports toggling of the accelerator underlines using the
+ Alt-key on Windows 98, 2000 and later. On other platforms this
+ change has no effect.
diff --git a/dist/changes-3.3.1 b/dist/changes-3.3.1
new file mode 100644
index 0000000..55ea305
--- /dev/null
+++ b/dist/changes-3.3.1
@@ -0,0 +1,141 @@
+Qt 3.3.1 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.0
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Added support for animated cursors on Mac OS X.
+
+Compilers
+---------
+
+Fixed SQLite compilation on Solaris.
+
+Fixed problem with precompiled headers (PCH) and Platform SDK on
+Windows by removing winsock2.h dependency.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+Fixed drag and drop for modal dialogs.
+
+- QAction
+ Propagate visibility state correctly to actions added to an
+ invisible actiongroup.
+
+- QHttp
+ Handle both upper and lower case in response headers.
+
+- QLineEdit
+ Fixed drawing problems that affected very long strings and
+ the handling of trailing spaces.
+
+- QObject
+ Fixed connectNotify() and disconnectNotify() for some special
+ cases.
+
+- QPixmap
+ Avoid calling detach() when setting a null mask on a pixmap.
+
+- QString
+ sprintf() again interprets strings, %s, as UTF-8 strings, not
+ as Latin1 strings.
+
+- QTabBar
+ Tabbars are now correctly left aligned again.
+
+- QTable
+ Fixed shift selections after editing.
+
+- QTextEdit
+ Emits cursorPositionChanged() when cursor position changes
+ when find() has been called.
+ LogText mode: Changing fonts after appending text now
+ recalculates the scrollbars properly.
+ Optimized createPopupMenu().
+
+- QVariant
+ Added missing detach() calls in QVariant::as...() functions
+ (e.g. asInt()).
+
+- QWidget
+ setWindowState() fixed for WindowMaximized and
+ WindowFullScreen. showMaximized() and showFullScreen() now
+ work for laid out widgets that have not been explicitly
+ resized.
+ windowOpacity() correctly initialized.
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+Fixed overflow error that sometimes affected the font engine.
+Fixed font drawing problems for some international versions of Win9x;
+also improved handling of spaces before Chinese characters.
+
+- QApplication
+ Fixed libraryPaths() to return the correct location of the
+ application executable, independently of whether it has been
+ called before the QApplication constructor or afterwards.
+
+- QFileInfo
+ Fixed readLink() for special cases.
+
+- QSound
+ Fixed isFinished() to work correctly.
+
+- QStyle
+ Fixed QWindowsXPStyle drawing flat toggle buttons.
+
+- QWidget
+ Turn off layered painting if window opacity is set back to
+ 1.0; making widget redrawing fast again.
+
+Mac:
+
+Fixed crash on exit problem with Qt Designer.
+Fixed compilation of networking modules for Professional edition.
+Fixed overflow error that sometimes occurred in the font engine.
+Fixed modal dialogs and contextMenuRequested() signals.
+
+- QMenuBar
+ Add separator after the "Abouts".
+ Fixed memory corruption.
+
+- QMessageBox
+ Improved handling of text and button size.
+
+- QPainter
+ Improved raster operations when using colors.
+ Improved polygon region handling and drawPolyLine().
+
+- QStyle
+ Fixed QAquaStyle to use setWindowOpacity().
+ Fixed QMacStyle drawing of flat toggle buttons.
+
+- QWidget
+ Fixed showFullScreen() to not hide the toolbar.
+
+X11:
+
+Fixed skipping of certain (bitmap) fonts for Xft2 when building up the
+font database.
+
+- QPrinter
+ Fixed regression with margins and Landscape.
+
+Embedded:
+
+- QPixmap
+ Fixed crash bug with transformed driver when using masked
+ pixmaps where width > height.
+ In xForm(), pre-fill the resulting pixmap with a transparent
+ color instead of white.
diff --git a/dist/changes-3.3.2 b/dist/changes-3.3.2
new file mode 100644
index 0000000..72213de
--- /dev/null
+++ b/dist/changes-3.3.2
@@ -0,0 +1,390 @@
+Qt 3.3.2 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.1 and Qt 3.3.0.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Compilers
+---------
+
+MinGW: It is now possible to build the WinXP style on MinGW.
+
+FreeBSD: Enable DragonFly to build Qt with its native compiler.
+
+Mac: Assistant builds with Professional edition when Fink is installed.
+
+AIX: Fixed compile problem with OpenType.
+
+Tru64: Correctly detects the Compaq C++ compiler.
+
+HP-UX 64: Fixed link failure for Designer.
+
+Intel: Fixed compile failure on icc version 8.0 p42+.
+
+Qt/Embedded: Compiles with gcc 3.4.0 (prerelease).
+
+Added macro QT_QLOCALE_USES_FCVT for systems with non-IEEE-compliant
+floating point implementations (notably some versions of ARM
+Linux). These systems are not autodetected; use
+"-DQT_QLOCALE_USES_FCVT" as a parameter to ./configure.
+
+Qt Designer
+-----------
+
+Allows saving of the column and label information for QDataTable, even
+when Qt is compiled without the SQL module.
+
+Fixed data corruption in .pro files with whitespace.
+
+Fixed crash on closing a new, modified, unsaved C++ file.
+
+Fixed crash with QicsTable.
+
+Fixed corrupted .ui files caused by '<' or '>' in the object name.
+
+Fixed freeze when opening a modal Wizard Dialog from file.
+
+Fixed crash when adding a new separator using drag and drop.
+
+Qt Assistant
+------------
+
+Fixed the Settings font combobox to not re-add font entries.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+- QAction
+ Fixed bug when adding invisible/disabled actions to
+ visible/enabled action groups.
+
+- QCanvas
+ Cleans up old animations in setCanvas().
+
+- QClipboard
+ Fixed potential double deletion in clean up.
+
+- QColorDialog
+ Fixed crash when running on very small screens (less than
+ 480x350).
+
+- QDateEdit
+ Fixed bug that would accept invalid dates when losing focus.
+
+- QDialog
+ Made showMaximized() and showFullScreen() work for dialogs
+ again.
+
+- QDns
+ Improved handling of literal IP addresses for both IPv4 and
+ IPv6.
+ Improved handling of disappearing/reappearing name servers.
+
+- QFont
+ Fixed handling of Oblique fonts.
+
+- QImage
+ Fixed crash when loading MNG animations.
+
+- QLabel
+ Fixed bug with labels without buddies that have '&' in the
+ text.
+
+- QLineEdit
+ Handles input method events according to the specification,
+ fixing severe problems with Korean input on Windows. This
+ change could show up problems with buggy input methods.
+ Fixed disappearing cursor for right-aligned text and Xft1.
+
+- QListBox
+ Fixed bug in itemAt() when listbox has wide line/framestyle.
+
+- QListView
+ Fixed problem with editor sometimes having zero width.
+
+- QLocale
+ Fixed crash on FreeBSD/Alpha.
+
+- QPainter
+ Fixed QPicture transformation bug.
+
+
+- QPopupMenu
+ Fixed crash-on-exit bug when using floating menus.
+
+- QRegExp
+ Fixed bug with patterns of the form "^A|B".
+
+- QSocket
+ Fixed bug where connecting two QSockets simultaneously would
+ cause both to connect to the same address.
+ Fixed bug where ErrConnectionRefused would not be emitted in
+ rare cases.
+
+- QSql
+ Fixed data corruption in OCI driver.
+ Fixed data corruption with SQLite driver when using non-UTF-8
+ databases with special characters.
+ Updated to work with SQLite version 2.8.13.
+
+- QString
+ Made string-to-number conversions interpret strings according
+ to the current locale.
+ Fixed the format of the %p sprintf flag.
+ Perform sanity check on the length parameter to fromUtf8().
+ Fixed toDouble() to again return a value even when failing on
+ trailing whitespace.
+ Performance optimization for startsWith()/endsWith().
+
+- QTable
+ Fixed crash caused by calling addLabel() on a horizontal header
+ when there are no columns in the table.
+ Fixed crash that occurs when deleting a QTable while editing
+ a cell.
+ Made it possible to override the grid line color.
+ Fixed selectionChanged() to be emitted correctly when dealing
+ with selections of multiple items.
+
+- QTabWidget
+ Fixed setAutoMask().
+
+- QToolButton
+ Icon and label now move the same distance when pressed.
+
+- QTextEdit
+ Does not override Ctrl+Alt+key accelerators.
+ Performance optimization: do not call ensureCursorVisible() when
+ isUpdatesEnabled() is not true.
+ Fixed crash when using removeParagraph() to remove QTextTable
+ items.
+ Fixed data corruption when saving documents with overline or
+ strikeout.
+
+- QTextBrowser
+ Fixed Purify warning about array-bound reads.
+
+- QVariant
+ Fixed bug in detaching LongLong and ULongLong values.
+
+- QWidget
+ Made showMaximized()/showFullScreen()/showMinimized() work
+ correctly again.
+ Posts events from the windowing system as before.
+
+- QWizard
+ Does not show enabled Next button on the last page if the
+ Finish button was enabled on an earlier page.
+
+- QWorkspace
+ Scales down maximize icon correctly.
+ Fixed active window/focus bug.
+ Ensured that children added to invisible workspaces are
+ painted correctly.
+ Fixed flicker with tooltips for maximize, minimize and close
+ buttons.
+
+- QXml
+ Fixed bug causing data corruption when reading invalid XML
+ files.
+
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+- QApplication
+ Does not handle GUI messages for non-GUI appliations.
+ Disabled MenuItem highlight color for XP in non-themed
+ Classical Style.
+
+- QContextMenuEvent
+ Made right mouse button send menu event also for popup widgets
+ such as the QListBox in QComboBox.
+
+- QDesktopWidget
+ Made qApp->desktop()->size() give the correct size after a
+ display resolution change.
+
+- QFont
+ Loading a Japanese font using the English name now works when
+ running in a Japanese locale.
+
+- QLineEdit
+ Fixed drawing problems that affected very long strings and the
+ handling of trailing spaces when using Uniscribe.
+
+- QPainter
+ Fixed possible crash in setBrush().
+ Draw bitmaps using painter's foreground color when painter is
+ using a complex transformation.
+ Fixed inter-letter spacings for scaled fonts.
+
+- QPrinter
+ Fixed crash when using buggy printer drivers.
+
+- QSound
+ Made setLoops(-1) work again (plays the sound in a loop).
+ Made setLoops(0) play no sound.
+ Made setLoops(1) set isFinished() correctly.
+ Fixed memory leak.
+ If a new sound is started then stop the existing one, and play
+ the new one.
+
+- QTextEngine
+ Performs auto-detection of Asian scripts even if Uniscribe is
+ not installed.
+
+- QWidget
+ Returns correct isMinimized/isMaximized state if an application
+ is started through a shortcut using "Minimized" or "Maximized".
+
+Mac:
+
+- QAccel
+ Solved the problem where we received two accel override events
+ for each keypress.
+
+- QApplication
+ Uses better technique for obtaining applicationFilePath().
+ Allows non-GUI applications to run without the GUI.
+ Stopped using EnableSecureEventInput() because of
+ Jaguar/Panther compatibility problems.
+ Updates the text highlight color when the system changes it.
+
+- QClipboard
+ Fixed posting to the clipboard and access rights.
+
+- QComboBox
+ Ensures that the item list stays within the screen size.
+
+- QCursor
+ Uses native splitter cursors when available.
+
+- QFontMetrics
+ Fixed fontmetrics for Asian fonts.
+
+- QLineEdit
+ Uses secure keyboard input in Password mode, so that keyboard
+ events cannot be intercepted.
+
+- QMacStyle
+ Fixed painting of radio buttons to be perfectly circular.
+
+- QMenuBar
+ Fixed bug when using pixmaps without an alpha channel.
+
+- QPainter
+ Improved raster operations.
+ Made custom bitmap brushes work.
+ Draws text using painter's foreground color.
+
+- QPrinter
+ Ensures that the printer name and page range are correct after
+ setup.
+ Always uses the native print dialog.
+ Implemented setPageSize() and pageSize() properly.
+ Made QPrinter work when no printer is installed.
+ Fixed font width bug in postscript when font embedding is
+ disabled.
+
+- QSettings
+ Returns correct value for global settings when scope is User.
+
+- QSlider
+ Fixed drawing of tickmarks when minimum value is non-zero.
+
+- QStyle
+ Does not change pixmap of QToolbutton if the button is not
+ auto-raised.
+
+- QWidget
+ Fixed bug where the toolbar is partially hidden when showing a
+ mainwindow in fullscreen mode.
+ Made WStyle_StaysOnTop work in the same way as on the other
+ platforms.
+ Fixed bug in maximizing windows with a maximum size.
+
+- QWorkspace
+ Fixed bug giving frozen child windows when maximizing and
+ restoring.
+
+X11:
+
+Fixed crash bug when using X Input Method Chinput.
+
+- Drag and Drop
+ Ignores accelerator events when dragging.
+
+- QClipboard
+ Fixed bug where data()->format() would return the wrong value.
+ Fixed potential crashes with regards to iterators.
+
+- QFont
+ Avoids badly scaled fonts, and prefers exact matches.
+ Made sure symbol fonts get loaded correctly.
+ Made it possible to load Latin fonts that do not contain the
+ Euro symbol.
+ Fixed glyph width bug observed with some Khmer fonts.
+ Fixed crash with misconfigured Xft.
+ Fixed problem with font selection for Xft2 when having Latin
+ text with non-Latin locale.
+ Respects custom dpi settings for Xft.
+ Does not use Xft if we have FreeType1 but no XRender.
+ Fixed memory leak in the font engine when drawing transformed
+ fonts.
+
+- QGL
+ Fixed crash when rendering text in GL widgets.
+
+- QLocale
+ Tru64: Fixed crash when INFINITY is compared to another double.
+ Tru64: Uses DBL_INFINITY for Compaq C++ compiler.
+
+- QMimeSource
+ Does not re-enter the event loop in provides().
+
+- QPainter
+ Fixed rendering of anti-aliased text on non-XRender enabled
+ displays.
+
+- QPrinter
+ Fixed setFromTo().
+ Fixed printing of Arabic text with XLFD fonts.
+
+- QTextEdit
+ Fixed bug with extremely long lines.
+
+- QThread
+ Fixed bug that made program require superuser privileges on
+ some Linux machines.
+
+- QWidget
+ Fixed showFullScreen() and showMaximized() for window managers
+ that do not support extended window manager hints (EWMH).
+
+Embedded:
+
+- QFontInfo
+ Made QFontInfo work properly on Qt/Embedded.
+
+- QGfxVNC
+ Fixed crash if VNC viewer is closed while Qt/E is painting.
+
+- QWidget
+ Uses correct focus handling if the focus widget is hidden or
+ deleted while a popup is open.
+
+Linux virtual console switching:
+ Fixed race condition in handling of virtual console switching
+ that could cause a deadlock in some cases.
+ Switch consoles on key press event.
+ Fixed QWSServer::hideCursor()/showCursor() display locking bug
+ which could block client processes.
diff --git a/dist/changes-3.3.3 b/dist/changes-3.3.3
new file mode 100644
index 0000000..8dde96a
--- /dev/null
+++ b/dist/changes-3.3.3
@@ -0,0 +1,442 @@
+Qt 3.3.3 is a bugfix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.2, Qt 3.3.1 and Qt 3.3.0.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Compilers
+---------
+Added support for GNU gcc on AIX 64-bit.
+
+Fixed the issue of some compilers that produced bad output when
+compiling qlocale.cpp with -O2.
+
+Fixed include path problem with MinGW.
+
+Meta Object Compiler (moc)
+--------------------------
+Allow classnames containing the substring 'const' in signal
+parameters.
+
+Qt Assistant
+------------
+Fixed crash when an empty file is part of the profile.
+
+Qt Designer
+-----------
+Fixed occasional crash when closing the form window.
+
+Fixed bug that removed '@' characters from .pro files.
+
+Fixed bug resulting in invalid code for radio buttons with strong
+focus.
+
+Fixed crash when custom widget plugins based on QComboBox were edited or
+previewed in certain styles.
+
+Fixed bug in loading enum properties (e.g. slider tickmarks).
+
+Handle comments of the form '# {' correctly.
+
+Handle '$${}' variable expansion correctly.
+
+Fixed missing actions in drop down action groups created with the menu
+editor.
+
+Made sure that the item labels for toolboxes can be translated.
+
+Added CTRL + Key_Q as a shortcut to quit.
+
+Do not add unnecessary blank lines in .pro files.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+- Drag and drop
+ Handle filenames with '#' characters properly.
+
+- QAccel
+ Fixed bug where Alt + non-ASCII letter would require an additional
+ Shift.
+
+- QButtonGroup
+ Don't navigate out of the button group with the arrow keys.
+
+- QComboBox
+ Don't close the combobox when holding space down while clicking.
+ (Fixes GUI lock-up on Windows.)
+
+- QDateTimeEdit
+ Propagate enabled state correctly when adding a QDateEdit/QTimeEdit
+ to a disabled parent.
+
+- QDataStream
+ Fixed bug involving the output of doubles/floats in printable mode.
+
+- QFileDialog
+ Fixed crash when calling setContentsPreview() twice.
+
+- QFontDatabase
+ Made Tibetan text work even without OpenType tables.
+ When using XLFD fonts, make sure that the size selected actually
+ supports the script.
+ Fixed bug that caused fixed-pitch XLFD fonts to be reported as
+ variable pitch.
+ Fixed some issues in the CJK compatibility area, where we did
+ not always pick the correct CJK font.
+ Made isSmoothlyScalable() work when a font only exists in bold.
+ Fixed bug where font metrics for Asian fonts were wrong in some
+ circumstances.
+ Fixed bug involving certain open source Arabic fonts.
+
+- QFontDialog
+ Resize OK/Cancel buttons properly with large font sizes.
+
+- QFtp
+ Allow connection to FTP servers that return lower-case month
+ names.
+
+- QImage
+ Included fix for buffer overflow in libPNG.
+ Fixed bug that made copy constructor not copy the entire image.
+ Allow XPM images with colors that have more than one word in the
+ name.
+ Fixed crash when trying to load a corrupt/invalid BMP image.
+ Fixed crash when trying to load a corrupt/invalid GIF image.
+ Fixed crash when trying to load a JPEG image that is too big.
+ Fixed bug that caused dotsPerMeter() to be ignored when saving
+ JPEG images.
+
+- QLineEdit
+ Fixed memory leak for line edits with masks.
+ Fixed bug where QLineEdit::text() would return a null QString when
+ an input mask was set on an empty line edit.
+ Don't scroll when the text is wider than the widget.
+
+- QListView
+ Don't select a non-visible item when Right arrow key is pressed.
+ Fixed crash in setOpen(QListViewItem*, bool).
+
+- QLocale
+ Now supports string-to-int conversions with base up to 36.
+ Handle space as a separator for large numbers in toDouble().
+
+- QMovie
+ Fixed offset bug.
+
+- QPainter
+ Don't crash if setWorldMatrix() is called on a painter that is not
+ active.
+
+- QPicture
+ Fixed bounding rect calculation.
+
+- QPixmap
+ Fixed rounding errors in xForm().
+
+- QPopupMenu
+ Fixed updateSize().
+ Fixed a crash when clearing and inserting new items while the tear
+ off is visible.
+
+- QRichText
+ Clear the focusIndicator paragraph when clearing the text.
+ Fixed bug with <td valign="middle">.
+
+- QSemaphore
+ Fixed possible starvation in operator-=().
+
+- QSlider
+ Fixed mouse handling for vertical sliders in reverse mode.
+
+- QSocket
+ Preserve readBufferSize() when doing connectToHost().
+
+- QSql
+ Fixed crash in ODBC-Driver in connection with Informix SE.
+
+- QSqlCursor
+ Fixed bug in del(true)
+
+- QSqlQuery
+ Fixed thread reentrancy bug.
+
+- QString
+ Made toFloat() fail if the number is too large for a float.
+ Fixed crash in fromUtf8 when argument is not 0-terminated.
+ Don't end up in an endless loop when setLength() is called with a
+ ridiculously large value (> 2^31).
+
+- QSvgDevice
+ Fixed some clipping issues.
+
+- QTable
+ Fixed memory leak in key event handling.
+ Fixed bug where calling setNumRows() or setNumCols() would not
+ change the sizeHint().
+ Improved speed of deleting rows/columns in big tables.
+
+- QTextEdit
+ Hide the cursor again when a drag leaves the text edit.
+ Don't crash if the text edit is deleted while the popup menu is
+ active.
+ Fixed undo/redo bug in overwrite mode.
+ Fixed crash when entering text in overwrite mode when entire text is
+ selected, on a single line, and the cursor is at the start of the
+ text.
+
+- QTextEngine
+ Fixed a small bug in the bidi engine.
+ Fixed two small issues with Bengali rendering.
+ Fixed small issue with Khmer rendering.
+ Fixed an issue with ideographic space (U+0x3000).
+
+- QThread
+ Fixed bug on HP-UX when starting a thread with LowPriority.
+ Provide a safety mechanism when trying to use QThreadStorage from
+ non-QThread threads: spit out a warning and do nothing.
+
+- QToolBar
+ Create a disabled popup menu when a disabled combobox is added to
+ the extension menu.
+
+- QWidget
+ Fixed bug that would sometimes make showMaximized() fail.
+
+- QWidgetStack
+ Set background properly when the current page has a maximum size
+ that is less than the size of the QWidgetStack.
+
+- QWorkspace
+ Fixed problems involving widgets with size constraints.
+ Don't normalize minimized widgets when cascading and tiling.
+
+- QXml
+ Speed optimizations.
+
+Platform-Specific Issues
+------------------------
+Windows:
+
+- Drag and drop
+ Ignore drag and drop events for modally shadowed windows.
+
+- Build system
+ Fixed qmake problem with QMAKE_EXTRA_WIN_TARGETS.
+
+- QApplication
+ Fixed restoring of windows when minimized using something other than
+ the window menu.
+ When restoring a modally blocked application after using "Minimize
+ All Windows" from the task bar, activate the modal dialog rather
+ than the blocked window.
+ Support Unicode application directories in applicationFilePath()
+ independently of the current locale.
+ Fixed accelerators with Ctrl+@ and Ctrl+[ to Ctrl+_ instead.
+
+- QAxWidget
+ Fixed bug that could lead to windows no longer responding to mouse
+ events.
+ Fixed bug that would eat a mouse release event in some cases.
+
+- QFileDialog
+ Don't let getOpenFileName() fail immediately, even if passed invalid
+ characters.
+ Fixed bug that gave spurious mouse move events to other widgets when
+ closing a file (or printer) dialog.
+
+- QFontDatabase
+ Select correct font when family is empty and style hint is set.
+ Fixed problem where Chinese fonts were a pixel smaller than with
+ older Qt versions.
+
+- QFtp
+ Improved performance by increasing buffer sizes.
+
+- QLocale
+ Obtain correct locale information on Win95, so that
+ QTextCodec::locale() works properly.
+
+- QPixmap
+ Fixed problems when alpha blending in 32bpp depth.
+
+- QPrinter
+ Fixed problems caused by printing without first calling setup() when
+ using certain printers.
+
+- QSettings
+ Fixed bug that would add unnecessary size to the registry on Win98
+ in some circumstances.
+
+- QSocket
+ Worked around Windows bug which caused bytesAvailable() to be 1,
+ even if no data was available.
+
+- QSound
+ Removed race condition.
+
+- QTextEngine
+ Draw CJK compatibility characters in the 0xffxx range correctly.
+ Fixed crash on invalid UTF-8 when using the newest Uniscribe library
+ on XP.
+
+- QWidget
+ Don't clear the maximized state when moving a maximized window.
+ Don't move the widget to a silly position when showMinimized() is
+ called on a visible widget.
+ Let the size grip respect the same size limits as the window
+ manager.
+ Fixed bug where a widget with an empty region as mask would still
+ have one visible pixel.
+
+- QWindowsStyle
+ Always underline accelerator cues on Windows 98.
+
+- QWindowsXPStyle
+ Draw up/down buttons of QDateTimeEdit disabled when the widget is
+ disabled.
+ Draw toggle-toolbuttons as toggled even if they are not in a
+ toolbar.
+
+Mac:
+
+- Drag and drop
+ Fixed bug that would disrupt drag and drop when toggling
+ full-screen status.
+ Ignore drag and drop events for modally shadowed windows.
+ Show the correct cursor when copying.
+
+- QApplication
+ Fixed bug that could cause crash when allocating and deleting
+ QApplication repeatedly.
+ Properly animate the toolbar button.
+
+- QAquaStyle
+ Made sure that OK and Cancel buttons are big enough when icons are
+ added.
+ Fixed bug that would show focus rectangles around hidden widgets in
+ a QScrollView.
+ Fixed drawing errors in QComboBox and QSpinBox when building on
+ Panther and deploying on Jaguar.
+ Fixed bug that caused artifacts on the focus widget when embedded
+ inside a widget with a background pixmap.
+
+- QComboBox
+ Fixed crash when calling setListBox() and later popping up the popup
+ list.
+ Fixed size hint problems.
+
+- QFileDialog
+ Made the filter functionality work in getSaveFileName().
+
+- QFontEngine
+ Fixed bug showing strikeout text.
+
+- QHeader
+ Fixed drawing errors when moving columns.
+
+- QListView
+ Don't draw the disclosure triangle for items that aren't visible.
+
+- QMenuBar
+ Disable the quit option when there is a modal dialog.
+
+- QPixmap
+ Made copyBlt() copy the alpha channel properly again.
+
+- QPrinter
+ Fixed page range bug.
+
+- QProgressBar
+ Show something for indeterminate progress bars.
+
+- QScrollView
+ Fixed colors for the scrollview frame.
+
+- QSettings
+ Fixed bug that caused settings files to end up in the wrong place.
+
+- QTableHeader
+ Fixed sizing bug.
+
+- QWidget
+ Don't disable children of WStyle_Tool widgets.
+ The window proxy icon is only set for document windows.
+
+X11:
+
+- QApplication
+ Made the '-inputstyle' command line option override the ~/.qt/qtrc
+ setting.
+ Fixed crash when using the QApplication( Display *,...) constructor
+ without any settings file in ~/.qt/.
+ Fixed bug when passing a Tk Visual* to the QApplication constructor.
+
+- QClipboard
+ Fixed race condition in clear().
+
+- QFontDatabase
+ Fixed bug that caused some special TTF fonts to display incorrectly.
+ Fixed bug where Qt would not find some non-scalable fonts.
+
+- QFontEngine
+ Fixed bug that caused incorrect metrics and drawing in some cases
+ when a painter scales down very large fonts for display.
+
+- QMotif
+ Fixed crash when passing X11 command line parameters.
+ Fixed GUI freeze when using the system close menu on a QMotifWidget
+ window with some window managers.
+
+- QPainter
+ Fixed memory leak when more than 256 GCs are allocated.
+
+- QPrinter
+ Allow multiple space-separated options in
+ setPrinterSelectionOption().
+ Fixed printing to A3 sized paper.
+ Fixed printing using certain PFB fonts (e.g. the ones generated from
+ TeX).
+
+- QWidget
+ Fixed restoration from fullscreen/maximize on non-EWMH supporting
+ window managers.
+ Do not clear the fullscreen/maximize state if the window manager
+ ignores a resize request from Qt.
+ Worked around bugs in window placement for the SGI 4Dwm window
+ manager.
+
+Embedded:
+
+Makeqpf tool
+ Use the same way of finding the font directory as the rest of Qt.
+
+- QVNCServer
+ It is now possible to have several different VNC servers active on
+ the same machine (and even in the same process).
+ Fixed bug connecting a little-endian client to a big-endian server.
+
+- QPainter
+ Fixed bug making thick vertical lines one pixel too wide.
+ Worked around compiler bug in gcc 3.3.1 and 3.3.3 (but apparently
+ not in 3.3.2), causing artifacts when drawing anti-aliased text on
+ 16-bpp displays in release mode.
+
+- QWidget
+ Avoid creating a paint event in setMask() if the new mask is the
+ same as the old.
+
+- QWSManager
+ Fixed crash when widget is deleted during a window system mouse
+ grab.
+ Only move window on left mouse press.
+
+- QWSServer
+ Avoid possible race condition in sendPropertyNotifyEvent()
+ when client quits.
diff --git a/dist/changes-3.3.5 b/dist/changes-3.3.5
new file mode 100644
index 0000000..8839f76
--- /dev/null
+++ b/dist/changes-3.3.5
@@ -0,0 +1,617 @@
+Qt 3.3.5 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.4, Qt 3.3.3, Qt 3.3.2,
+Qt 3.3.1 and Qt 3.3.0.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Platforms
+---------
+
+- Qt now supports Mac OS X 10.4 (Tiger)
+
+Compilers
+---------
+
+- Added support for VS 2005
+- Added support for GCC 4
+
+Windows Installer
+-----------------
+
+- The environment variables no longer contain invalid paths.
+- The user is warned if QTDIR is not set and the evaluation edition is
+ already installed, to avoid conflicts between the two packages.
+- A bug was fixed where a '\0' was appended to the end of a path.
+- Fixed the dependencies for image formats and styles.
+
+Qt Designer
+-----------
+
+- Fixed a problem with long string literals on certain Visual Studio
+ C++ compilers.
+- UIC now uses the include hints from the .ui file when generating
+ source files.
+- The "paste" action is now enabled and disabled correctly.
+- QWidgetFactory::supportsWidget() now returns true for QSplitter.
+- Parse files with more than one '.' in the file name correctly.
+- The project name is now displayed correctly also when the project is
+ created in a root directory.
+- Fixed a bug where Windows end-of-line terminators would be included
+ in string literals, which broke translation.
+- Several crashes were fixed related to cutting/copying/pasting menu
+ items.
+- Fixed some problems with designer generating corrupted pro files.
+- A crash was fixed for when designer loads a pro file with the same
+ file listed more than once.
+- The action editor is now closed when there is no main window form.
+- Stability fixes
+
+Qt Linguist
+-----------
+
+- lupdate now understands strings longer than 16384 characters.
+- Fixed escaping bugs for string that contain both ampersands and
+ double quotes.
+
+Qt Assistant
+------------
+
+- When printing, assistant now always uses the Active color group.
+- Fixed a rendering bug for paragraphs that start with a line break.
+- Support for setting the documentation root path, allowing
+ documentation files to be moved.
+- When opening a link in a new window, assistant will now properly
+ scroll to the correct anchor after the window has been shown.
+- Fixed full text search for documents not listed in the 'ref'
+ attribute of the <section> tag in the current .adp file.
+- The state of the forward/backward buttons now work properly when the
+ tabs are changed.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+Added security patches for zlib: CAN-2005-1849, CAN-2005-2096
+The FreeType library was upgraded from version 2.0.9 to 2.1.9
+
+- Build system
+ Improved build keys for gcc 4 compilers, so plugins no longer
+ need rebuilding after upgrading gcc to a new patch release.
+
+- QCanvas
+ Fixed wrong text scaling and cut-off text.
+ Fixed drawing with a brush when double buffering is enabled.
+
+- QCommonStyle
+ Fixed the appearance of QSlider after setBackgroundOrigin has
+ been called.
+ Fixed an overflow in calculating the handle position for
+ QScrollBar.
+
+- QCString
+ Fixed a crash in qUncompress() if the resulting QByteArray was
+ too large to fit in memory.
+ Fixed potential security problems by using vsnprintf() instead
+ of the less secure vsprintf().
+
+- QDataStream
+ Fixed a data corruption bug when using stream version Qt_3_1 and using
+ operator<<(qint64).
+
+- QDateTime
+ Fixed QDateTime::secsTo() when crossing daylight savings hours
+ boundaries.
+
+- QDockWindow
+ Undocked windows now remember their size also if the user
+ changes it.
+
+- QDom
+ The default constructor for QDocDocument now creates an empty
+ document that can be used to create elements.
+ A warning is now displayed when trying to construct or save an
+ invalid document.
+ Characters that are not allowed in XML are now escaped
+ properly when saving.
+
+- QFileDialog
+ Shortcuts now show the icons of what they point to.
+ Entry sorting is now locale-aware, as opposed to sorting based
+ on Unicode order.
+ You can now select files by pressing 'enter' when using
+ QFileDialog::getOpenFileNames().
+ Fixed a missing repaint in contents preview after selecting a
+ file, then a directory, then the same file again.
+ dirPath() no longer chops off the last directory in a path.
+
+- QGVector
+ Fixed a bug that caused a memory leak and data corruption if
+ resize() failed.
+
+- QHeader
+ The header text is now rendered correctly next to the icon in
+ reverse layout mode.
+
+- QImage
+ Fixed comparison of images with alpha data, but with the alpha
+ channel disabled.
+
+- QKeySequence
+ Key sequences that ended with a ',' now work properly.
+
+- QLineEdit
+ Fixed the behavior of the delete key on the keypad.
+ Fixed support for transparent line edits.
+ Fixed a crash when opening the context menu in a QTextEdit
+ subclass that returns 0 for createPopupMenu().
+
+- QListBox
+ Fixed a crash when removing the current item while selecting
+ items with a rubberband.
+
+- QListView
+ Fixed the behavior of the Home and End keys when QListView
+ contains disabled and hidden items.
+ Fixed a problem with the QListView::...Clicked() signals were
+ emitted also when the root decorated section was not in the
+ left-most column.
+ HTML control characters in QListView's tool tip text are now
+ escaped properly.
+ sortChildren() now also sorts children of items with no
+ siblings.
+ Fixed a missing redraw after removing columns.
+ contentsWidth() now returns the correct value after
+ setContentsWidth() has been called.
+ Fixed a crash after a sequence of deleting and selecting
+ items.
+ Fixed the size of headers with multi-line text.
+ Fixed a lock-up and possible crash caused by an internal state
+ restore on controllers with no children.
+ Fixed keyboard navigation when jumping to entries by pressing
+ the key for the first character in the text of an item.
+
+- QLocale
+ Fixed support for NaN, which failed on certain compilers.
+ Passing Q_LLONG to toString() now properly includes the group
+ symbols.
+ Fixed locale detection when locale environment variables are
+ not set.
+ Added workarounds for compiler optimization bugs when parsing
+ doubles.
+
+- QLocalFS
+ Fixed a crash when canceling a QUrlOperator transfer before
+ completion.
+
+- QMenuData
+ Fixed a crash when closing an MDI application while the menu
+ bar has Alt-focus.
+
+- QMessageBox
+ Message boxes now work correctly in right-to-left mode.
+
+- QPaintDevice
+ Fixed drawing errors when using bitBlt() on a printer.
+
+- QPainter
+ Fixed drawing of rectangles with a negative (or 0) width.
+
+- QPopupMenu
+ The height of new columns is now initialized properly when
+ menu items are shown in multiple columns.
+
+- QProcess
+ Close socket connections properly when a
+ process is created after creating the socket connection.
+
+- QPSPrinter
+ Generate PS font names correctly.
+
+- QPushButton
+ Fixed a crash caused by deleting the button while the popup
+ menu is shown.
+
+- QRichText
+ Tab stops are now adjusted correctly when printing in high
+ resolution mode.
+ Reduced the number of memory allocations when deleting large
+ blocks of text.
+ Fixed parsing of hexadecimal HTML entities
+ Fixed a bug where the font changed after calling setText()
+ repeatedly.
+
+- QScriptEngine
+ Fixed an issue with shaping of Hebrew text, which lead to
+ layout problems in QTextLayout.
+ Fixed rendering of Hebrew text with punctuation.
+ Fixed bugs in Gurmukhi shaping.
+
+- QScrollView
+ Fixed the size hint when scrollbars are set to be permanently
+ on.
+ Fixed a drawing error seen on certain graphics drivers when a
+ scroll view spans multiple screens.
+ Fixed a bug where wheel events' horizontal/vertical status
+ were not forwarded to viewportWheelEvent().
+ Fixed a crash when mouse wheel events were sent to a scroll
+ view with disabled scroll bars.
+
+- QSettings
+ Fixed a bug when comparing keys with common prefixes.
+
+- QSGIStyle
+ Fixed the size of QComboBox.
+
+- QSizeGrip
+ Fixed a bug that caused the window to move when resizing to
+ the minimum size using the size grip.
+
+- QSocketDevice
+ Improved error reporting when the connection is unexpectedly
+ closed.
+ Fixed a bug where the socket would be closed if 0 was passed
+ as maxlen to readBlock().
+
+- QString
+ Fixed a lock-up in QString::section().
+ Let replace() behave as documented when the index is larger
+ than the length of the string.
+
+- QTable
+ Fixed positioning of QComboTableItems that span several rows.
+
+- QTextCodec
+ Fixed occasional crash in fromUnicode().
+ Fixed Big5 support to comply with the standards.
+
+- QTextEdit
+ Fixed bug in undo/redo history when input methods are used.
+ Fixed a crash caused by inserting text with an input method
+ during a focus change.
+ Fixed the behavior of the delete key on the keypad.
+ Fixed setMaxLogLines() when there are already too many lines.
+ Fixed crash when clearing a QTextEdit when the IME is active.
+ Fixed crash when the text edit is deleted while dragging text.
+
+- QTextLayout
+ Fixed layout of lines that are too long and do not contain a
+ possible break point.
+
+- QTimeEdit
+ Fixed several issues with stepUp() and stepDown().
+
+- QToolButton
+ Fixed a crash when assigning a tooltip to a tool button which
+ does not have QMainWindow as an ancestor.
+
+- QToolTip
+ Fixed an occasional crash.
+
+- QTranslator
+ Fixed a bug when calling messages() before tr() when using
+ compressed .qm files.
+
+- QUrlOperator
+ Fixed a crash when accessing invalid paths on an FTP server
+ using QFileDialog.
+ Fixed a bug where the source would be removed if the source
+ and destination were the same.
+
+- QVariant
+ Fixed a memory leak in clear().
+
+- QWidget
+ Fixed excessive flicker when reparenting a widget that has
+ tool windows.
+
+- QWorkspace
+ Fixed flickering when switching between maximized windows.
+ Fixed a lock-up when modal dialogs were created with
+ QWorkspace as parent.
+ Fixed a bug where modeless dialogs with QWorkspace as parent
+ would be drawn with no title bar.
+
+- SQL, DB2 driver
+ Compile fixes.
+ Fixed a bug where QSqlCursor::insert() would fail to insert
+ two blob fields at the same time.
+
+- SQL, MySQL driver
+ Fixed a crash when using empty database names.
+
+- SQL, Oracle driver
+ Fixed truncation of numeric data types to 22 digits.
+ Fixed UTF-8 support by ensuring that there is enough space to
+ store the text.
+
+- SQL, ODBC driver
+ Fixed problems with sorting and comparing strings larger than
+ 8192 characters.
+
+- SQl, PostgreSQL driver
+ Temporary tables are now only visible for the connection that
+ created them.
+
+- SQL, TDS driver
+ Fixed problems with compiling the plugin with later versions
+ of the TDS library.
+
+- SVG support
+ Fixed support for SVG viewbox.
+ Added basic support for stroke-dasharray.
+
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+- ActiveQt
+ Unrelated types are no longer converted.
+ The control container is now only reset if the CLSID changes.
+ Fixed a bug where QAxObject::clear() did not reset the
+ metaobject when it was cached.
+ Fixed a memory leak.
+ Fixed a bug that caused flicker when navigating away from a
+ page embedding a control.
+ The VARIANT out-parameters in signals now map to "QVariant &"
+ and not "const QVariant &".
+ Signal parameters of type "bool" are marshalled to the bool
+ slot also when the control sends an integer parameter.
+
+- Drag & drop
+ Fixed a bug with sending single-color pixmaps.
+ Fixed a crash caused by reading a drag object after it has
+ been deleted (before the drop event).
+ Dragged pixmaps are now cleaned up before drawn to avoid
+ problems with broken alpha values and resetting masked pixels.
+
+- QApplication
+ Fixed a lockup caused by showing a dialog while resizing a
+ window.
+ QWidget::grabKeyboard() now also grabs the menu button.
+ Fixed a bug where mouse events were sent to the wrong widget
+ after calling QEventLoop::processEvents() with
+ ExcludeUserInput.
+ Windows Server 2003 can now also use the Windows XP style.
+ Fixed a memory leak in QEventLoop.
+
+- QColor
+ Fixed failed initialization of the Qt colors (e.g., Qt::red) when
+ using the MinGW compiler.
+
+- QFile
+ Fixed a bug where a read error was not handled properly.
+
+- QFileInfo
+ permission() now uses the correct file name on Windows 9x.
+
+- QFontDataBase
+ Added support for scalable fonts.
+
+- QFontEngine
+ Fixed a problem with symbol fonts.
+ Fixed support for user defined characters.
+
+- QLibrary
+ Fixed the directory separators.
+ Fixed some library loading errors.
+
+- QLocale
+ The locale() function now returns the correct ISO name instead
+ of a number.
+
+- QNPWidget (NPAPI)
+ Fixed a bug where the widget was not clipped properly by the
+ browser.
+
+- QPainter
+ Fixed a bug where QPainter failed to fill ellipses of size
+ 2x2.
+ Fixed a potential lock-up after failed GDI allocations.
+
+- QPrinter
+ Rich text tables are now printed correctly when the table
+ spans pages.
+ Fixed text printing errors on page 2 and out caused by the
+ background mode being reset to OPAQUE.
+
+- QProcess
+ The directory separators for the current working directory are
+ now converted properly, so that a UNC path can be used on
+ Windows.
+
+- QTranslator
+ Fixed an issue with isReadable() on NTFS.
+
+- QWindowsXPStyle
+ XP style now works when compiled as a plugin.
+ Fixed menu bar placement.
+ Fixed a bug in setting the background color of QTabWidget.
+ Fixed the position of the size grip in large QSizeGrip
+ widgets.
+ QGroupBox now uses the correct colors.
+
+- QWorkspace
+ Fixed bug where hidden windows would be shown after restoring
+ from maximized mode.
+
+- qmake
+ The Makefile generator now only searches for the latest
+ version of the Qt library, as opposed to searching all
+ libraries.
+ Dependency checking for pre-compiled headers were fixed.
+ Fixed support for listing .pro files in SUBDIRS in subdir .pro
+ files.
+ Fixed support for multiple -L and -I entries in QMAKE_LIBS.
+
+Mac:
+
+- Build system
+ When using Xcode, the optimization level is set to 0 in debug
+ mode.
+ Added support for Xcode 2.1 and up.
+ Fixed copying of target files when DESTDIR is set.
+
+- Drag & drop
+ Fixed a crash when deleting the drag object before dropping.
+
+- QApplication
+ The default font is now only set if the user has not set one.
+ Fixed a problem where popup menus would not go away after
+ releasing the mouse button outside the popup.
+ Added support for dual axis mouse wheels.
+ Fixed a bug in tablet identification.
+ Added support for tablet erasers.
+ Fixed a deadlock in postEvent() when there was contention for
+ a wakeup.
+ Fixed a crash when switching displays at the same time as
+ QApplication is destroyed.
+ Stability fixes.
+
+- QColorDialog
+ Fixed modality support.
+
+- QFileDialog
+ Let the file dialog remember the previous directory.
+ Fixed keyboard navigation when jumping to entries using the
+ first letter of a file name.
+ Fixed a memory leak.
+
+- QFontDatabase
+ Fall back to the "Geneva" font, which is guaranteed to be
+ available, instead of "Helvetica".
+
+- QFontEngine
+ Fixed a memory leak.
+ Fixed rendering of glyphs that modify previous glyphs,
+ including Indic text.
+
+- QMacStyle
+ Title bars are now shown as deactivated when the window is
+ deactivated.
+ Fixed a bug where buttons in button groups inside a container
+ would look like they were pressed.
+ Fixed a crash caused by drawing onto a non-pixmap background.
+ Fixed the width of QComboBox.
+ Improved drawing of size grips.
+ Improved drawing of sliders, and made QSlider slightly wider
+ by default.
+
+- QMenuBar
+ Fixed a lockup caused by menu items ending with an '&'.
+ Menu items with disabled popups are now also disabled.
+
+- QMessageBox
+ The resize handle is now shown.
+
+- QPainter
+ Fixed double transformation of ellipses with a transformed
+ width or height of 1.
+
+- QPixmap
+ Fixed a crash when loading a cursor from an embedded image.
+ The color depth is now set properly when converting a QBitmap.
+
+- QPrinter
+ Fixed a crash when using bitBlt() to copy a QBitmap onto a
+ printer.
+
+- QProcess
+ Fixed support for launching bundles.
+
+- QPushButton
+ Icons are now drawn properly.
+
+- QTextBrowser
+ Fixed a bug where a text browser popup triggered by a
+ hyperlink would pop up again when the user clicks inside the
+ first popup.
+
+- QToolButton
+ Fixed a painting problem when the button was pressed.
+
+- QWidget
+ Menubar popups no longer steal focus from QTextEdit.
+ Fixed collapsing of windows with no title bar decorations.
+ Several window activation bugs have been fixed.
+ Fixed a bug where modal dialogs would be modal to its own
+ children.
+ Fixed tablet support for multiple screens.
+ Fixed a memory leak.
+
+X11:
+
+- Build system
+ Removed aliasing/redefinitions of the 'which' command to fix
+ failures in the configure script on certain Unix systems.
+ Added some missing flags for the yacc tool on 64-bit Linux.
+ The -fn application command line option, which selects the
+ default application font, works again.
+ Fixed copying of target files when DESTDIR is set.
+
+- Drag and drop
+ Fixed a crash in the dragging application when the drop target
+ crashes.
+ Fixed a bug in finding the widget under the cursor while
+ dragging.
+ Some problems were fixed with the internal timestamp in the
+ drop event.
+
+- OpenGL
+ Fixed colors when rendering using glColor() onto an 8 bit
+ pixmap.
+
+- QApplication
+ Support the F11 and F12 keys on Sun keyboards.
+
+- QCanvasView
+ Support multiple shared views of a single canvas on multiple X11
+ screens.
+
+- QClipboard
+ Fixed a rare crash related to cut & paste with the Motif
+ extension.
+
+- QFontDatabase
+ Fixed a bug where QFontInfo would return an empty family and
+ point size after trying to select a font that was not
+ installed on the system.
+
+- QFontEngine
+ Fixed a bug where scaling italic fonts would sometimes cut
+ overhangs.
+
+- QInputContext
+ Fixed a bug that led to a corrupted display in QLineEdit and
+ QTextEdit when using Japanese input methods with very long
+ input selections.
+
+- QPainter
+ Fixed a crash when setting a pen on an inactive painter.
+
+- QPrinter
+ Fixed printing on Tru64 by removing the -o argument to the lp
+ command.
+
+- QScriptEngine
+ Added support for Khmer fonts.
+ Fixed shaping of Telugu text.
+ Fixed a crash when scaling Japanese XLFD fonts by a factor of
+ 1000.
+
+Embedded:
+
+- QApplication
+ Fixed a memory leak.
+
+- VNC driver
+ Fixed a memory leak.
+
+- QWidget
+ Fixed a potential crash when reparenting widgets.
diff --git a/dist/changes-3.3.6 b/dist/changes-3.3.6
new file mode 100644
index 0000000..d9464ed
--- /dev/null
+++ b/dist/changes-3.3.6
@@ -0,0 +1,27 @@
+Qt 3.3.6 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.5, 3.3.4, Qt 3.3.3, Qt 3.3.2,
+Qt 3.3.1 and Qt 3.3.0.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Platforms
+---------
+
+- It is now possible to build Qt 3.3.6 on Intel Macs. A universal
+ Qt build however requires manual work by 'lipo'-ing a PPC Qt
+ and an Intel Qt together.
+
+Compilers
+---------
+
+- The build key when building Qt with gcc 4.x has changed. This means
+ you will have to either recompile your plugins or change the configure
+ script to not reduce the gcc version string to '4'.
+
+
+Translations
+------------
+
+Various Qt translations contributed by Novell.
diff --git a/dist/changes-3.3.7 b/dist/changes-3.3.7
new file mode 100644
index 0000000..f95bf0c
--- /dev/null
+++ b/dist/changes-3.3.7
@@ -0,0 +1,12 @@
+Qt 3.3.7 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.6, 3.3.5, 3.3.4, Qt 3.3.3,
+Qt 3.3.2, Qt 3.3.1 and Qt 3.3.0.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- QImage
+ Fixed a potential security issue which could arise when transforming
+ images from untrusted sources.
+
diff --git a/dist/changes-3.3.8 b/dist/changes-3.3.8
new file mode 100644
index 0000000..540d636
--- /dev/null
+++ b/dist/changes-3.3.8
@@ -0,0 +1,273 @@
+Qt 3.3.8 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 3.3.7, Qt 3.3.6, Qt 3.3.5, 3.3.4, Qt 3.3.3,
+Qt 3.3.2, Qt 3.3.1 and Qt 3.3.0.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Platforms
+---------
+
+- Oracle driver now builds on HP-UX
+
+Compilers
+---------
+
+Linguist
+--------
+
+- Fixed a bug where the translation area was not changed when the context was changed.
+
+Assistant
+---------
+
+- Fixed command line parsing when specifying the docPath option.
+
+Translations
+------------
+
+- Added support for Catalan.
+
+Third party components
+----------------------
+
+- libpng
+
+ * Security fix (CVE-2006-3334): Buffer overflow allows context-dependent
+ attackers to cause a denial of service and possibly execute arbitrary
+ code via unspecified vectors related to chunk error processing.
+
+ * Security fix (CVE-2006-5793): The sPLT chunk handling code
+ uses a sizeof operator on the wrong data type, which allows
+ context-dependent attackers to cause a denial of service (crash)
+ via malformed sPLT chunks that trigger an out-of-bounds read.
+
+ * Security fix: Avoid profile larger than iCCP chunk.
+ One might crash a decoder by putting a larger profile inside the
+ iCCP profile than is actually expected.
+
+ * Security fix: NULL pointer dereference.
+
+ * Disabled MMX assembler code for Intel-Mac platforms to work
+ around a compiler bug.
+
+ * Disabled MMX assembler code for x86_64 platforms.
+
+- freetype
+
+ * Security fix (CVE-2006-0747): Integer underflow allows remote
+ attackers to cause a denial of service (crash) via a font file
+ with an odd number of blue values, which causes the underflow
+ when decrementing by 2 in a context that assumes an even number
+ of values.
+
+ * Security fix (CVE-2006-1861): Multiple integer overflows allow
+ remote attackers to cause a denial of service (crash) and possibly
+ execute arbitrary code.
+
+ * Security fix (CVE-2006-2661): A null dereference flaw allows
+ remote attackers to cause a denial of service (crash) via a
+ specially crafted font file.
+
+ * Fixed memory leak.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Fixes
+-------------
+
+- QAccessible
+ Fixed a potential crash when a key object is destroyed.
+
+- QApplication
+ argc() no longer returns 1 if 0 was passed as argc to the constructor.
+
+- QDateTime
+ Made QDateTime::fromString(QString(), Qt::TextDate) work with locales
+ that have two-digit day names (e.g. Di 16. Jan).
+
+- QDns
+ Stability fixes for networks with missing DNS settings.
+
+- QFileDialog
+ Ensured that files are not accidentally replaced or lost during drag
+ and drop operations.
+
+- QFtp
+ Fixed a crash when uploading data from a closed QIODevice.
+ Fixed a potential crash when a FTP session gets deleted in a slot.
+
+- QGLWidget
+ renderText() no longer tries to convert the text passed in to
+ a local 8 bit encoding (via local8Bit()). latin1() is used instead.
+
+- QGridLayout
+ Fixed incorrect minimum size with rich text labels in grid layouts.
+
+- QHttp
+ Fixed an overflow that could occur when chunked downloading caused
+ erroneous allocations.
+
+- QListBox
+ Fixed a potential crash that could occur if a list box is deleted in
+ a slot connected to the returnPressed() signal.
+
+- QListView
+ Set internal startDragItem pointer to 0 in clear(). This can prevent
+ crashes during drag and drop operations.
+ Fixed a documentation error in setSelectable.
+ Fixed regression in activation of leaf-nodes of type QCheckBoxController.
+
+- QTable
+ Fixed a memory leak when F2 is pressed in an empty table.
+ Ensured that the focus rectangle is painted correctly.
+ Ensured that editors in cells spanning multiple rows or columns are
+ closed correctly.
+
+- QTextEdit
+ setDocument() no longer crashes when 0 is passed as an argument.
+ Fixed rendering of HTML tables with a fixed pixel width.
+ Fixed a potential crash when using undo/redo functionality.
+ Fixed a regression when searching for space using QTextEdit::find().
+
+- SQL plugins
+ Ensured that mysql_server_end() is only called once in the MySQL plugin.
+ Fixed fetching of strings larger than 255 characters from a
+ Sybase server through ODBC.
+ Ensured that milliseconds are not stripped from ODBC time values.
+
+- QWidget
+ Fixed an issue where adjustSize() would incorrectly take the size of
+ top-level widgets into account.
+
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+- QAxServer
+ Fixed a regression in how the server registers type libraries.
+
+- Visual Studio 2005
+ Fixed compilation issue with the x64 compiler.
+ Fixed the behavior of qmake when executed with "qmake -tp vc".
+
+- QFont
+ Fixed crash that would occur when creating a font from an invalid string.
+ Fixed metric problems.
+
+- Fixed possible infinite loop when drawing text.
+
+- Fixed an issue where flags specified by QMAKE_LFLAGS_RELEASE would not be
+ included in generated Visual Studio project files.
+
+- Fixed issue that caused wizards to use the wrong class in the QMsDev plugin
+
+- Fixed an unexpected remote close in QSocket for Windows servers with a high
+ load.
+
+- Fixed crash in QFileDialog.
+
+- Fixed a regression in QWindowsXPStyle where tab widget backgrounds were
+ incorrectly propagated into child scroll views.
+
+- Fixed issues related to using SJIS TextCodec with QSettings.
+
+- Fixed issue where a fixed size widget could change size after changing screen
+ resolution.
+
+- Fixed support for the Khmer writing system.
+
+
+Mac OS X:
+
+- Made the endian preprocessor define dependent on the architecture. This means
+ that it is possible to build a universal Qt library on one machine. However,
+ qmake_image_collection.cpp is still dependent upon the machine it was
+ generated on.
+
+- QComboBox
+ Fixed an issue where the popup would stay open after the window had
+ been minimized.
+
+- QFont
+ Fixed support for QFont::setStretch().
+
+- QMacStyle
+ Fixed centering of items in large comboboxes.
+ Fixed editable comboboxes so that they don't truncate text.
+ Added support for Panther-style tabs for tabs on the bottom of a tab
+ widget.
+
+- QPrinter
+ Fixed Intel endian bug in printing of pixmaps with a mask/alpha
+ channel.
+ Fixed regression where active tool windows would always be disabled
+
+- QGLContext
+ Fixed a tearing issue caused by incorrect vertical sync.
+
+- Fixed a rendering issue with transparent cursors on Intel macs.
+
+- Fixed a rendering issue with icons in the dock on Intel macs.
+
+- Fixed a crash when playing back a file that does not exist.
+
+- Fixed a regression where full keyboard access was not being honored.
+
+- Fixed a regression preventing static file dialogs from being opened in a
+ contextMenuEvent() handler.
+
+- Fixed a regression in navigating nested popup menus.
+
+
+X11:
+
+- Fixed rendering of Japanese text with XLFD fonts.
+
+- Fixed rendering of text with stacking diacritics.
+
+- Rendering fixes for Indic scripts.
+
+- Fixed problem with applications hanging while querying the clipboard. This is
+ related to the KDE bug reported at http://bugs.kde.org/show_bug.cgi?id=80072.
+
+- Fixed a crash that could occur when Qt uses a DirectColor visual.
+
+- Fixed a rare crash in QPixmap::convertToImage() when XGetImage() fails.
+
+- Fixed issue where events were not being processed by Qt when using the Qt
+ Motif Extension.
+
+- The X input method language status window is no longer shown for popup menus
+ on Solaris.
+
+- Fixed incorrect use of colors when painting on the default (TrueColor) screen
+ when running a Qt application on a multi-screen display where the default
+ screen uses a TrueColor visual and the secondary screen a PseudoColor visual.
+
+- Fixed a bug where calling newPage() directly before destroying the QPrinter
+ caused the last page to be printed twice.
+
+- Fixed a bug on older Unix systems where incorrect font sizes could get used
+ when printing in HighResolution mode.
+
+- Fixed a crash when trying to load huge font files.
+
+- Ensured that fonts containing a '-' in the family name are correctly loaded.
+
+- Ensured that the QFont::NoAntialias flag is always honored.
+
+- Fixed incorrect shaping of some character combinations when writing Bengali.
+
+- Introduced workaround for some Arabic fonts with broken OpenType tables.
+
+- Fixed a bug where the wrong braces would get used when using the Hebrew Culmus
+ fonts.
+
+- Fixed crash in qtconfig when removing or shifting font substitution families.
diff --git a/dist/changes-4.0.1 b/dist/changes-4.0.1
new file mode 100644
index 0000000..f08aac6
--- /dev/null
+++ b/dist/changes-4.0.1
@@ -0,0 +1,786 @@
+****************************************************************************
+* Important Notices *
+****************************************************************************
+
+Meta-Object System
+------------------
+
+Qt 4.0.0 introduced a change to the way type names outside the current
+scope were handled in signals and slots declarations and connections
+which differed from the behavior in Qt 3.x.
+
+Unfortunately, this could lead to signal-slot connections that were
+potentially type-unsafe. Therefore, in Qt 4.0.1 type names must be fully
+qualified in signal-slot declarations and connections.
+
+For example, in Qt 4.0.0, it was possible to write:
+
+ connect(socket, SIGNAL(error(SocketError)), ...);
+
+In Qt 4.0.1, the above connection must be made in the following way:
+
+ connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), ...);
+
+
+Library
+-------
+
+Support for SGI Altix has been added for both gcc and Intel icc.
+
+
+QX11EmbedContainer and QX11EmbedWidget are now exported classes.
+
+This change only affects developers using Qt/X11 with gcc >= 4.0 and
+symbol visibility enabled. Applications built against Qt 4.0.1 that
+use these classes cannot be linked against Qt 4.0.0.
+
+
+****************************************************************************
+* Changes *
+****************************************************************************
+
+Qt Designer
+-----------
+
+Fixed crash in designer when using fonts in custom widgets that
+don't have a point size set but use a pixel size instead.
+
+Fixed initial positions of the form windows in the MDI mode.
+
+Ensured that the object inspector is updated when a page is added
+to a widget stack.
+
+Ensured that the SDK is installed and the library symbols are
+exported.
+
+Fixed crash when breaking a layout after deleting all widgets within.
+
+Fixed handling of nested action groups.
+
+Fixed mouse handling to match user expectations on different
+platforms.
+
+Don't change system setting for double click interval.
+
+Disabled the richtext editor for the "statusTip" property.
+
+Improved widget handling, loading and saving for QFrame, QTabWidget,
+and Q3GroupBox.
+
+Added a platform-neutral mechanism for saving key sequences.
+
+Used Qt's list of supported image formats rather than an incomplete
+static list.
+
+Provided a way for plugins to access to the layout of container
+widgets.
+
+Added support for editable byte arrays.
+
+
+Qt Linguist
+-----------
+
+Made lupdate handle cases where the compiler converts strings using
+a different codec to that used by lupdate.
+
+Fixed bug in lupdate and lrelease's .pro file parser.
+
+Fixed lupdate's octal sequence handling.
+
+Fixed duplicate context when two contexts have the same hash value.
+
+
+Qt 3 to 4 Porting Tool
+----------------------
+
+Fixed connnect statement that did not work with the new stricter moc.
+
+Fixed incorrect porting of enum values in switch statements.
+
+Fixed header file name replacements in include directives.
+
+
+Meta Object Compiler (moc)
+--------------------------
+
+Fixed VC6 compilation of moc generated code with namespaced
+superclasses.
+
+Fixed parsing of functions that throw exceptions.
+
+Fixed compilation of moc generated code with VC6 when inheriting
+from classes inside namespaces.
+
+Improved the efficiency of signals with default arguments.
+
+
+Qt Assistant
+------------
+
+Fixed the document list for full text search indexing.
+
+Fixed case sensitive completion in the find dialog combobox.
+
+Re-enabled the "add content file" option.
+
+Removed the "General" tab in the settings dialog.
+
+Fixed registry key handling and deletion of cache files.
+
+Made it possible to read titles in the tabs in assistant.
+
+Updated the QAssistantClient documentation.
+
+Added the QtAssistantClient headers to the other library headers
+for installation.
+
+Fixed full text search for phrases.
+
+
+General Fixes
+-------------
+
+- Dialogs
+ Removed hard-coded margin and spacing values from built-in
+ dialogs.
+
+- QAbstractItemModel
+ Fixed crash caused by removing an item with expanded children.
+ Added some more see also links and defined QModelIndexList.
+
+- QAbstractItemView
+ Fixed rendering and selection issues with MultiSelection
+ mode.
+ Improved handling of persistent editors.
+ Improved performance of item insertion.
+ Improved signal handling and emission.
+
+- QAbstractSlider
+ Ensured that no changes occur if the orientation doesn't
+ change in a call to setOrientation().
+ Introduced better keyboard control for sliders.
+ Fixed sliderPressed() and sliderReleased() signal emissions.
+
+- QAbstractSocket
+ Fixed race condition in connectToHost().
+ Made bytesAvailable() return the unget buffer size as well
+ as the size of any pending data.
+ Made NetworkLayerProtocol non-internal.
+
+- QAbstractSpinBox
+ Fixed problems with locale and the "." and "," separators.
+ Improved handling of extra whitespace at the beginning and
+ end of user input.
+
+- QApplication
+ Made closeAllWindows() respect windows that reject the close
+ event.
+ Fixed crash caused by calling QApplication::setStyle()
+ before a qApp was created.
+ Improved handling of the last open window for most cases.
+ Improved event handling.
+
+- QBezier
+ Used a new algorithm for offsetting curves.
+ Improved performance by using a more sophisticated
+ algorithm and by making QBezier a POD type.
+
+- QBrush
+ Improved radial gradient rendering.
+
+- QColorDialog
+ Process the return key correctly.
+
+- QComboBox
+ Fixed behaviour of setMaxItems() to enable new items to be
+ inserted within the range allowed.
+
+- QCommonStyle
+ Ensured that mnemonics are always shown for buttons.
+ Fixed position of right corner widget when used on its own.
+
+- QDateTimeEdit
+ Improved the range of input allowed for numbers.
+
+- QDial
+ Fixed valueChanged() signal emission.
+
+- QDialog
+ Fixed Lower QSizeGrip in QDialog instead of raising it.
+
+- QDir
+ Fixed relative path handling on Windows.
+ Reverted empty string matching behavior to match Qt 3's
+ behavior.
+ Restored API compatibility with Qt 3.
+
+- QDirModel
+ Fixed accidental deletion of directories in read-only mode.
+
+- QDockWidget
+ Ensured that the size of a floating dock widget is the same
+ regardless of how it was floated.
+ Reintroduced double-clicking behavior to float a dock
+ widget.
+ Fixed incorrect moving behavior for floating widgets.
+ Ensured that dock widgets display a close icon only if they
+ can be closed.
+
+- QDockWidgetLayout
+ See QMainWindow.
+
+- QDomNodeList
+ Fixed handling of out-of-range items.
+
+- QDoubleSpinBox
+ Improved decimals handling and rounding behavior in
+ QDoubleSpinBox.
+
+- QFile
+ Fixed problems with carriage return and line feed handling
+ in readLine().
+ Ensured that pos() returns the correct value if the file
+ shrinks.
+
+- QFileDialog
+ Fixed incorrect behavior where the dialog would go to the
+ root directory if the user tried to enter a non-existent
+ directory.
+ Fixed sorting by type behavior.
+
+- QFontDatabase
+ Fixed loading of special fonts.
+ Fixed sample characters for Chinese scripts.
+
+- QFontDialog
+ Switched the locations of the OK and Cancel buttons.
+ Made items in the font dialog read-only.
+ Improved handling of the OK and Cancel buttons when the
+ dialog is in reverse layout mode.
+
+- QGifHandler
+ Reintroduced GIF plugin support.
+
+- QGridLayout
+ Improved default size handling.
+
+- QHeaderView
+ Fixed section hiding behavior.
+ Fixed Out of bounds error and improper calculation of last
+ column.
+ Improved mouse handling and widget updating.
+ Fixed crashes caused by moving or removing sections, or by
+ updating the current section.
+ Improved signal behavior for resized or removed sections.
+
+- QHttp
+ Fixed proxy authentication.
+ Fixed broken behavior when scheduling many requests to
+ different hosts.
+ Fixed socket object ownership issues with setSocket() that
+ could lead to a crash.
+
+- QImage
+ Fixed smooth scaling for image formats other than RGB and
+ ARGB32.
+
+- QImageReader
+ Fixed the default implementation of imageCount() to return a
+ valid number of images.
+
+- QInputDialog
+ Switched the locations of the OK and Cancel buttons.
+
+- QIODevice
+ Fixed problems with carriage return and line feed handling
+ in readLine().
+ Made bytesAvailable() return the unget buffer size as well
+ as the size of any pending data.
+ Fixed error handling when reading lines with QFile.
+ Fixed seek() behavior with regard to the unget buffer.
+
+- QItemDelegate
+ Improved layout handling, redrawing, signal emission,
+ and mouse click behavior.
+
+- QKeySequence
+ Fixed accidental HTML escaping of ampersands.
+
+- QLayout
+ Print out object names in warnings.
+
+- QLineEdit
+ Enabled textChanged() signal emission when using input
+ methods.
+ Improved return key press handling for users of the
+ returnPressed() signal.
+ Fixed context menu action handling.
+ Fixed editingFinished() signal emission behavior.
+ Fixed Ctrl-K and Ctrl-U behavior to cut text rather than
+ just deleting it.
+ Fixed line edit selection behavior to maintain any current
+ selection when the widget receives the keyboard focus.
+
+- QListView
+ Improved handling of hidden rows.
+ Fixed rendering when used in reverse mode.
+
+- QListWidget
+ Fixed the size policy for laying out items in the list.
+ Improved sorting performance.
+ Fixed persistent index handling when sorting.
+
+- QMainWindow
+ Fixed problems with multiple connections from QMainWindow
+ signals to QToolBar slots.
+ Fixed dock widget handling (adding a widget to all dock
+ areas) and incorrect dock area splitting behavior that
+ could lead to crashes in QMainWindow.
+ Made QMainWindow's status bar have an "Ignored" horizontal
+ size policy.
+
+- QMetaObject
+ Fixed meta objects that reported far too many enums.
+ Fixed the behavior of sender() to return the correct value
+ during queued activation.
+
+- QMetaType
+ Fixed whitespace handling in template specialization.
+ Fixed missing qt_metatype_id implementation for <void *>.
+ Added more support for compilation with QT_NO_DATASTREAM.
+
+- QMenu
+ Fixed keyboard navigation when mouse navigation is also
+ being used.
+ Fixed menu bar merging behavior.
+
+- QMenuBar
+ Fixed Alt key navigation.
+
+- QObject
+ Fixed incorrect exception handling.
+
+- QPaintEngine
+ Suppressed warnings when drawing "empty" text.
+ Fixed rendering of Underline, Overline, and StrikeOut for
+ text drawn using outlines.
+
+- QPainter
+ Improved handling of clip regions when restore() is called.
+ Improved text drawing performance.
+
+- QPaintDevice
+ Allowed construction of QImage before QApplication.
+
+- QPainterPath
+ Improved performance and rendering accuracy.
+
+- QPen
+ Fixed missing detach in setWidth().
+
+- QPixmap
+ Improved drawing speed and mask handling.
+
+- QPlastiqueStyle
+ Improved visual feedback for scrollbar page buttons and
+ slider handle.
+ Improved Plastique style on non-XRender-enabled displays.
+
+- QProcess
+ Fixed endless loop of signal being emitted if model dialog
+ is used in slot.
+ Made bytesAvailable() return the unget buffer size as well
+ as the size of any pending data.
+
+- QProxyModel
+ Improved signal handling for propagated signals.
+
+- QResource
+ Fixed Latin-1 string handling.
+ Fixed unloading of resources.
+
+- QScrollArea
+ Fixed widget resizing so that widgets that are smaller than
+ the viewport remain visible.
+
+- QSettings
+ Made it possible to store QImage/QPixmap settings.
+ Fixed race conditions in QSettings with INI files.
+ Improved handling of non-terminated strings in INI files.
+
+- QSizeGrip
+ Made the Qt 3-style constructor public.
+
+- QSpinBox
+ Fixed problems with out-of-range integers and doubles.
+
+- QSqlQueryModel
+ Fixed integration between QSqlTableModel and MS Access.
+ Fixed signal emissions for tables with only one row.
+
+- QSqlTableModel
+ Fixed problems with multiple record insertion.
+
+- QStatusBar
+ Fixed status bar height without size grip.
+
+- QTabBar
+ Fixed handling of the current page index when adding the
+ first page to QTabWidget.
+ Improved tab bar icon handling to enable icons to be updated
+ without redrawing the entire tab bar.
+
+- QTableView
+ Improved text cursor handling and support for keyboard
+ modifiers.
+ Fixed problems with disappearing headers.
+ Disallowed selection of hidden rows and columns.
+ Fixed crashes involving empty models and tables with headers
+ but no rows or columns.
+
+- QTableWidget
+ Improved sorting and signal emission behavior.
+
+- QTabWidget
+ Fixed handling of the current widget to keep the tab bar
+ updated.
+
+- QTextBrowser
+ Removed temporary visible text selection when activating
+ anchors with Shift-click.
+
+- QTextCursor
+ Fixed selection behavior for words at the beginning of lines.
+ Fixed incorrect use of character formats when calling
+ insertFragment().
+ Fixed incorrect text insertion where line feeds and carriage
+ returns would not be transformed into Unicode block
+ separators.
+
+- QTextDocument
+ Added support for page breaking.
+ Added support for relative font sizes.
+ Added support for <hr /> tags.
+ Fixed clipboard handling and drag and drop of text frames.
+ Fixed handling of closing HTML </center> tags.
+ Fixed crash (failing assertion) on import of nested empty
+ HTML tables.
+ Fixed data corruption in fromPlainText().
+ Corrected the handling of image tags inside anchors.
+ Fixed introduction of empty spaces or lines before and after
+ tables.
+ Fixed misrendering of some nested HTML tables with variable
+ sized columns.
+ Fixed crash in table drawing due to out-of-bounds access.
+ Added support for the pageCountChanged() signal.
+ Improved performance and size of PostScript images when
+ printing high resolution or scaled images.
+
+- QTextEdit
+ Improved layout and selection handling.
+ Added configuration support for non-blinking cursors.
+ Improved keyboard handling.
+ Improved text insertion handling.
+
+- QTextFormat
+ Added support for horizontal rules.
+ Improved font handling.
+
+- QTextLayout
+ Allow line breaking at tabs.
+ Improved reporting of line widths for lines ending with a
+ QChar::LineSeparator.
+ Fixed reporting of the minimum width for layouts that have
+ NoWrap/ManualWrap as their wrap policy.
+
+- QTextStream
+ Fixed locking behavior when reading from stdin.
+ Fixed seek() behavior.
+ Improved Latin-1 string handling.
+
+- QTextTable
+ Improved performance and selection handling.
+
+- QToolBar
+ Fixed toolbar resizing behavior to handle icon size changes.
+
+- QTreeView
+ Improved handling of hidden rows, columns, and child items.
+ Fixed repainting issues with newly inserted child items
+ and selections.
+ Improved scrolling behavior.
+ Fixed crashes involving column handling and empty views.
+ Fixed sorting indicator behavior.
+
+- QTreeWidget
+ Improved item insertion performance.
+ Fixed clone() and operator=() for QTreeWidgetItem.
+ Fixed crash when removing or deleting items with children.
+ Improved sorting performance.
+ Fixed sorting indicator behavior.
+ Fixed persistent index handling when sorting.
+
+- QUrl
+ Improved the performance of removeDots().
+
+- QWidget
+ Fixed problems with adding an action multiple times.
+
+- QXmlInputSource
+ Improved heuristics for determining character encodings.
+
+- Q3FileDialog
+ Fixed file selection handling.
+
+
+Platform-Specific Issues
+------------------------
+
+Windows:
+
+- QApplication
+ Fixed Block modeless elements of client when ActiveX opens a
+ modal dialog
+ Enabled tablet support.
+ Improved event handling for popup widgets.
+
+- QAxWidget
+ Support a document site only if the COM object allows proper
+ initialization with a storage.
+
+- QFileDialog
+ Updated to use the latest native Windows dialogs.
+
+- QProcess
+ Fixed behavior of forwarded read channels.
+
+- QSettings
+ Fixed behavior of childKeys() with respect to the default
+ key.
+
+- QWindowsStyle
+ Fixed menu item size.
+ Improved drawing of default push buttons.
+ Fixed rendering of sliders to correctly differentiate
+ between those in enabled and disabled states.
+
+- QWindowsXPStyle
+ Fixed menu frame rendering.
+ Reduced the space allocate to menu items.
+
+
+X11:
+
+- QApplication
+ Fixed incorrect initialization of screen and resolution.
+ Improved mouse button handling.
+ Fixed handling of withdrawn windows.
+
+- QBitmap
+ Fixed bitmap brush textures to ensure that they use the
+ correct color with XRender.
+
+- QFont
+ Fixed handle() to return useful values.
+
+- QFontDatabase
+ Fixed fonts for some writing systems not being loaded on X11
+
+- QPaintEngine
+ Fixed multi-screen support.
+ Improved performance and rendering accuracy.
+ Fixed dot-dash patterns when drawing with large pen widths.
+ Improved text rendering on exported displays.
+
+- QWidget
+ Implemented support for window opacity.
+ Added support for widgets with 32 bit sizes.
+ Improved support for different active and inactive background
+ brushes.
+ Fixed window icons on X servers that have truecolor and
+ pseudocolor visuals with different depths.
+ Fixed text rendering on exported displays.
+
+- QXIMInputContext
+ Fixed crash in XIM code with newer x.org libraries.
+ Fixed support for switching input method styles.
+
+- QX11Embed
+ Exported QX11Embed (see the Important Changes section
+ above).
+ Improved handling of non-XEmbed clients.
+ Improved geometry and focus handling.
+
+
+UNIX:
+
+- QPageSetupDialog
+ Reduced the size of the dialog.
+
+- QPrintDialog
+ Fixed initialization of color and grayscale radio buttons.
+
+- QProcess
+ Fixed incorrect notification of process termination on
+ Linux kernels up to and including the 2.4 series.
+ Made QProcess emit an error() when failing to launch a
+ program.
+
+
+Mac OS X:
+
+- QApplication
+ Fixed widgetAt() to handle transparent widgets.
+ Handle keyboard events in the active window if no focus
+ window is available.
+ Changed wheel mouse scrolling speed to match that of
+ other applications.
+
+- QComboBox
+ Fixed rendering of combobox frames.
+
+- QDnD
+ Fixed URL handling.
+
+- QClipboard
+ Fixed Junk at end of pasted text on Qt/Mac.
+
+- QCursor
+ Fixed incorrect pixmap handling.
+
+- QFileDialog
+ Fixed sheet modality issues to prevent the dialog from being
+ hidden behind other windows.
+
+- QFont
+ Default to using the Geneva font.
+ Enable kerning and fix Arabic text handling.
+
+- QLibraryInfo
+ Fixed location of qt.conf in Mac OS X bundles.
+
+- QMacStyle
+ Improvements to rendering accuracy of comboboxes, tab bars,
+ workspace windows, tool buttons, and push buttons.
+ Fixed incorrect drawing of scrollbars with "inverted
+ appearance".
+ Fixed font-related crash for applications configured to
+ use the standard desktop settings.
+
+- QMenu
+ Improved menu bar handling on navigation dialogs.
+
+- QMenuBar
+ Improved menu bar hiding/wrapping behavior.
+
+- QPaintDevice
+ Removed byte order assumptions.
+
+- QPaintEngine
+ Improved brush handling, clipping, masking, and tiling
+ operations.
+
+- QPixmap
+ Improvements to pixmap copying and conversion, masking, and
+ alpha channel handling.
+ Removed byte order assumptions.
+
+- QPrintEngine
+ Made color printing the default behavior.
+
+- QSettings
+ Sync the application's setting on construction of a
+ QSettings object.
+
+- QSysInfo
+ Included enum values for Mac OS X codenames in the
+ MacVersion version enum.
+
+- QWidget
+ Improved mouse event handling.
+ Improved interoperability between modal widgets.
+
+
+Tools
+-----
+
+- uic3
+ Fixed class name handling when used in "-convert" mode.
+ Fixed vertical space issues with .ui files converted from
+ Qt 3 to Qt 4.
+ Improved support for Qt3Support widgets.
+ Improved support for deprecated enums.
+ Added a generator for dependencies in Qt 3 .ui files.
+
+- rcc
+ Added better error reporting.
+
+- uic
+ Added code generation for tab attributes.
+ Fixed text codec handling.
+ Used UTF-8 as the default enconding in .ui files.
+ Fixed code generation for QWizard.
+
+
+Documentation
+-------------
+
+Porting:
+
+Removed QMovie from the list of implicitly shared classes that were
+previously explicitly shared.
+
+Added .ui porting document to the 4.0.1 documentation.
+
+Added sections about QHBox, QVBox, and QGrid to the porting guide.
+
+Added QImageIO and QMovie to the porting guide.
+
+Added QRegExp and some QDir functions to the porting guide.
+
+Added QObject::objectTrees() to the porting guide.
+
+Added QPopupMenu to the porting guide.
+
+
+General:
+
+Fix documentation of amortized container behavior.
+
+Added information about using specific compilers to build Qt.
+
+Removed QtMotif documentation because it is now part of Qt Solutions.
+
+Clarify parent-child relationship within QThreads.
+
+Documented potential file name clashes when using precompiled headers.
+
+Added a Windows XP gallery.
+
+Added pages to contain lists of classes for each Commercial Edition.
+
+Reintroduced the QAssistantClient documentation as part of the
+QtAssistant module.
+
+Added missing Qt Designer API documentation.
+
+- QApplication
+ Documented correct use of QApplication::setStyle().
+
+- QComboBox
+ Made removeItem() and setRootModelIndex() visible in the
+ documentation.
+
+- QMetaObject
+ Added missing documentation for QGenericArgument and
+ QGenericReturnArgument, making them visible in the
+ documentation, but not recommended for casual use.
+
+- QPainter
+ Make QPainter::setRedirected() visible and fix its
+ description.
+
+- QSqlDatabase
+ Document what happens when passing an existing connection
+ name to addDatabase().
diff --git a/dist/changes-4.1.0 b/dist/changes-4.1.0
new file mode 100644
index 0000000..396a5b7
--- /dev/null
+++ b/dist/changes-4.1.0
@@ -0,0 +1,573 @@
+Qt 4.1 introduces many new features as well as many improvements and
+bugfixes over the 4.0.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt library
+----------
+
+- Introduced widget backing store support, allowing semi-transparent
+ (alpha-blended) child widgets and faster widget painting, as well
+ as solving long-lasting issues with non-rectangular widgets.
+
+- Integrated support for rendering Scalable Vector Graphics (SVG)
+ drawings and animations (QtSvg module).
+
+- A Portable Document Format (PDF) backend for Qt's printing system.
+
+- A unit testing framework for Qt applications and libraries.
+
+- Modules for extending Qt Designer and dynamic user interface
+ building.
+
+- Additional features for developers using OpenGL, such as support
+ for pixel and sample buffers.
+
+- A flexible syntax highlighting class based on the Scribe rich text
+ framework.
+
+- Support for network proxy servers using the SOCKS5 protocol.
+
+- Support for OLE verbs and MIME data handling in ActiveQt.
+
+- Support for universal binaries on Mac OS X.
+
+Qt Designer
+-----------
+
+- Added support for editing menu bars and tool bars.
+
+- Added support for adding comments to string properties.
+
+- Added new static QtUiTools library with improved
+ QUiLoader API for loading designer forms at run-time.
+
+- Added support for namespaces in uic generated code.
+
+- Added support for dock widgets in main windows.
+
+- Added support for editing table, tree and list widgets.
+
+- Improved palette editing and resource support.
+
+QTestLib
+--------
+
+- Added QTestLib, the Qt Unit Testing Library. See the "QTestLib"
+ chapter in the Qt documentation for more information.
+
+- Users of older versions of QtTestLib can use the updater utility in
+ tools/qtestlib/updater to convert existing autotests to work with
+ QTestLib.
+
+Boost
+-----
+
+Added boost compatible syntax for declaring signals and slots. If you
+define the macro QT_NO_KEYWORDS, "Q_SIGNALS" and "Q_SLOTS" are
+recognized as keywords instead of the default "signals" and "slots".
+Added a new keyword to qmake to enable this macro: CONFIG += no_keywords.
+
+ActiveQt
+--------
+
+QAxServer now supports mime-type handling - a ActiveX control can be
+registered to handle a certain file extension and mime-type, in which
+case QAxBindable::load and QAxBindable::save can be reimplemented to
+serialize the object.
+
+Build system
+------------
+
+Added support for linking static plugins into the application.
+
+Qt 3 to 4 Porting Tool
+----------------------
+
+Q(V|H)BoxLayout and QGridLayout usage is now ported to use
+Q3(V|H)BoxLayout/Q3GridLayout, to retain the margin/spacing behavior
+as in Qt 3.
+
+Meta Object Compiler (moc)
+--------------------------
+
+- Added support for const signals.
+
+Qt Assistant
+------------
+
+- Added -docPath command line option for easy setting of the
+ document root path.
+
+QMake
+-----
+
+- Added support for new FORMS3 profile variable to make it possible
+ to have Qt Designer forms from Qt 3 and Qt 4 in the same project.
+
+- Added support for precompiled headers on win32-g++ (MinGW)
+
+Compilers
+---------
+
+Added support for Solaris 10 on AMD64 with the compiler provided by
+Sun.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+New classes
+-----------
+
+- QTreeWidgetItemIterator
+ Added iterator to help iterating over items in a QTreeWidget.
+
+- QStringFilterModel
+ Allows you to provide a subset of a model to a view based on a
+ regular expression.
+
+- QSyntaxHighlighter
+ The QSyntaxHighlighter class allows you to define syntax
+ highlighting rules.
+
+- QAbstractFileEngine
+ A base class for implementing your own file and directory
+ handling back-end for QFile, QFileInfo and QDir.
+
+- QAbstractFileEngineHandler
+ For registering a QAbstractFileEngine subclass with Qt.
+
+- QFSFileEngine
+ The default file engine for regular file and directory access
+ in Qt.
+
+- Q3(H|V)BoxLayout and Q3GridLayout
+ Layout classes provided for compatibility that behave the same
+ as the Qt 4 classes but use a zero margin/spacing by default,
+ just like in Qt 3.
+
+- Added qFromLittleEndian, qToLittleEndian, qFromBigEndian and
+ qToBigEndian endian helper conversion functions (qendian.h)
+
+- Q_EXPORT_PLUGIN2 macro
+ Obsoletes Q_EXPORT_PLUGIN and allows static linking of
+ plugins.
+
+- Q3ComboBox
+ For enhanced backwards compatibility with Qt 3.
+
+- QGLPbuffer
+ For creating and managing OpenGL pixel buffers.
+
+- QNetworkProxy
+ For setting up transparent (SOCKS5) networking proxying.
+
+- QDirectPainter (Qtopia Core only)
+ Provides direct access to video framebuffer hardware.
+
+
+General improvements
+--------------------
+
+- QByteArray
+ Added toLong() and
+
+- QColorDialog
+ Fix shortcut and focus for "Alpha channel" spinbox.
+
+- QLinkedList
+ Added conversion methods to convert from/to STL lists.
+
+- QMap/QHash
+ Fixed operator>>() to read back multiple values associated
+ to a same key correctly.
+ Added constFind(), for finding an item without causing a
+ detach.
+
+- QMap/QHash
+ Const-correctness in const_iterator's operator--(int).
+
+- QMainWindow
+ The saveState() and restoreState() functions no longer
+ fallback to using the windowTitle property when the objectName
+ property is not set on a QToolBar or QDockWidget; this
+ behavior was undocumented and has been removed.
+
+- QToolBar
+ Added Qt 3 compatibility signal visibilityChanged(bool).
+
+- QMetaType
+ Class is now fully reentrant.
+ Metatypes can be registered or queried from multiple threads.
+ Added qMetaTypeId<T>(), which returns the meta type ID of T at
+ compile time.
+
+- QMetaProperty
+ Added isResettable().
+
+- QSql
+ Oracle plugin adds support for authentication using external
+ credentials.
+ Added isValid() to QSqlError.
+
+- QThread
+ Added setPriority() and priority(), for querying and setting
+ the priority of a thread.
+
+- QTreeWidgetItem/QTreeWidget
+ Added new constructors and addChildren(), insertChildren(),
+ takeChildren(), insertTopLevelItems(), addTopLevelItems to
+ speed up insertion of multiple items.
+
+- QTextDocument
+ Added the class QTextBlockUserData and added the possibility
+ of storing a state or custom user data in a QTextBlock
+ Added useDesignMetrics property, to enable the use of design
+ metrics for all fonts in a QTextDocument.
+
+- QTextFormat
+ Added support for setting the font pixel size.
+ Added UserObject to QTextFormat::ObjectTypes enum.
+
+- QMetaType
+ The value of QMetaTypeId<T>::Defined indicates whether a given
+ type T is supported by QMetaType.
+
+- QAbstractItemView
+ Added setIndexWidget() and indexWidget() which makes it
+ possible to set a widget at a given index.
+
+ Added a QAbstractItemView::ContiguousSelection mode.
+ Added scrollToTop() and scrollToBottom().
+ Changed signals pressed(), clicked() and doubleClicked() to
+ only emit when the index is valid.
+
+- QAbstractItemModel
+ Added a SizeHintRole that can be set for each item. The item
+ delegate will now check for this value before computing the
+ size hint based on other item data.
+
+ Add QModelIndex::operator<() so we are able to use them in
+ QMap and other containers.
+
+ Added qHash function for QModelIndex.
+
+- QTableWidget
+ Added cellWidget() and setCellWidget() which makes it possible
+ to set a widget at a specified cell.
+
+ Added setCurrentCell().
+
+ Added QTableWidgetItem copy constructors.
+
+
+- QTreeWidget
+ Added setItemWidget() and itemWidget() which makes it possible
+ to set a widget on an item.
+
+- QListWidget
+ Added setItemWidget() and itemWidget() which makes it possible
+ to set a widget on an item.
+
+ Added QListWidgetItem copy constructors.
+
+- QMutableMapIterator
+ Added value() overloads to Java-style iterators that return
+ non-const references.
+
+- QTextTable
+ Added mergeCells() and splitCells() to be able to set the row
+ or column span on a table cell.
+
+- QStyle
+ Added standardIcon() which returns a default icon for standard
+ operations.
+ Added State_ReadOnly, which is enabled for read-only widgets.
+
+ Renamed QStyleOption::init() to initFrom().
+ - QGroupBox is now completely stylable (QStyleOptionGroupBox).
+ - QToolBar is now stylable according to its position in the
+ toolbar dock area (QStyleOptionToolBar).
+ - Indeterminate (busy) progress bars are now animated properly
+ in all styles.
+ - By popular request, the default toolbar icon size
+ (PM_ToolBarIconSize) in Windows and Plastique styles has
+ been changed to 24 x 24 (instead of 16 x 16 in Windows and
+ 32 x 32 in Plastique).
+
+ Added PM_DockWidgetTitleMargin as pixel metric.
+
+- QHash
+ Make it possible to use QHash with a type that has no default
+ constructor.
+
+- QTableView
+ Made QTableView::setShowGrid() a slot, like in Qt 3.
+ Added setRowHeight() and setColumnWidth().
+
+- QTableWidgetSelectionRange
+ Added rowCount() and columnCount() convenience functions.
+
+- QSettings
+ Added support for custom formats in QSettings.
+
+- QTextStream
+ Added status(), setStatus() and resetStatus() for improved
+ error handling.
+ Added read(qint64 maxlen), for reading parts of a text stream
+ into a QString.
+
+- QTextCursor
+ Added support for BlockUnderCursor selection type.
+
+- QHeaderView
+ Added defaultSectionSize property which tells the default size
+ of the header sections before resizing.
+
+- QScrollBar
+ Added context menu to the scrollbar with default navigation
+ options.
+
+- QScrollArea
+ Added ensureVisible(), which can scroll the scrollarea to make
+ sure a specific point is visible.
+
+- QDateTime
+ Added addMSecs(), which adds a number of milliseconds to the QDateTime.
+
+- QDateTimeEdit
+ Added support for more date/time formats.
+ Now allows multiple sections of the same type.
+
+- QButtonGroup
+ Added handling of buttons with IDs to the buttongroup like in
+ Qt 3.
+
+- QIODevice
+ Added peek() for peeking data from a device.
+
+- QTextEdit
+ Added property tabStopWidth which sets the tab stop width in
+ pixels.
+ append(const QString &) is now a public slot.
+ Added support for inserting Unicode control characters through
+ the context menu.
+ Added property acceptRichText, for whether or not the text
+ edit accepts rich text insertions by the user.
+ Added overwriteMode property.
+
+- QDataStream
+ Added skipRawData().
+ Added support for QRegExp.
+
+- QProgressBar
+ Added support for vertical progress bars.
+
+- QImageIOHandler
+ The name() function has been obsoleted; use format() instead.
+ Added QImageIOHandler::Animation, for determining if the image
+ format supports animation.
+ Added QImageIOHandler::BackgroundColor, for setting the
+ background color for the image loader.
+
+- QImageReader
+ Added setBackgroundColor() and backgroundColor(), for setting
+ the background color of an image before it is read.
+ Added supportsAnimation(), for checking if the image format
+ supports animation.
+
+- QImageWriter
+ Added support for saving image text.
+
+- QLocale
+ Added dateFormat()/timeFormat() to query the date/time format
+ for the current locale.
+ Added toString() overloads for localized QTime and QDate
+ output.
+ Added decimalPoint(), groupSeparator(), percent(),
+ zeroDigit(), negativeSign() and exponential(), which provide a
+ means to generate custom number formatting.
+
+- QHostInfo
+ Added support for reverse name lookups.
+
+- QHostAddress
+ Added a QString assignment operator
+ Added convenience functions for initializing from a native
+ sockaddr structure.
+ Added support for the IPv6 scope-id.
+
+- QPrinter
+ Added property "embedFonts" for embedding fonts into the
+ target document.
+ Added support for printing to PDF.
+ Added support for custom print and paint engines
+
+- QPrintEngine
+ Added PPK_SuppressSystemPrintStatus, for suppressing the
+ printer progress dialog on Mac OS X.
+
+- QKeySequence
+ Added fromString() and toString() for initializing a key
+ sequence from, and exporting a key sequence to a QString.
+
+- QUrl
+ Added the port(int) function, which provides a default value
+ for the port if the URL does not define a port.
+ Support for decoding Punycode encoded hostnames in URLs.
+ Made the parser more tolerant for mistakes, and added a
+ ParsingMode flag for selecting strict or tolerant parsing.
+ Added support for the NAMEPREP standard in our i18n domain
+ name support.
+
+- QDir
+ Added the filter QDir::NoDotAndDotDot, for the
+ special directories "." and "..".
+ Added the filter QDir::AllEntries, for all entries
+ in a directory, including symlinks.
+
+
+- QAbstractSocket
+ Added slots connectToHostImplementation() and
+ disconnectFromHostImplementation() to provide polymorphic
+ behavior for connectToHost() and disconnectFromHost().
+
+- QMenuBar
+ Added setActiveAction(), which makes the provided action
+ active.
+
+- QProxyModel
+ This class has been obsoleted (see QAbstractProxyModel)
+
+- QWidget
+ Now supports three modes of modality: NonModal, WindowModal
+ and ApplicationModal.
+ Added Qt::WindowModality, obsoleted WA_ShowModal and
+ WA_GroupLeader.
+ Added Qt::WA_OpaquePaintEvent widget attribute, obsoleting
+ Qt::WA_NoBackground.
+ Added boolean autoFillBackground property.
+ Child widgets now always inherit the contents of their parent.
+
+- QPalette
+ Added QPalette::Window (obsoletes Background) and
+ QPalette::WindowText (obsoletes Foreground).
+
+- QHttpResponseHeader
+ Added two constructors and the function setStatusLine() for
+ generating a response header.
+
+- QBitArray
+ Added count(bool), for counting on and off-bits in a bit
+ array.
+
+- QVariant
+ Added support for QRegExp
+
+- QRegExpValidator
+ Added the property "regExp".
+
+- QTabBar
+ Added the property "iconSize", for setting the size of the
+ icons on the tabs.
+
+- QLineEdit
+ Added support for inserting Unicode control characters through
+ the context menu.
+
+- QString
+ Added toLong() and toULong().
+ Support for std::string conversions with embedded \0
+ characters.
+
+- QRegion
+ Added translate(), like QRect::translated().
+
+- QProcess
+ Added systemEnvironment(), which returns the environment
+ variables of the calling process.
+ Added exitStatus(), and added a new finished() signal which
+ takes the exit status as a parameter.
+
+- QComboBox
+ Made setCurrentIndex() a slot.
+
+- QFontDataBase
+ Added styleString(), for retrieving the style string from a
+ QFontInfo.
+ Added support for Myanmar fonts.
+
+- QFontMetrics
+ Added xHeight(), which returns the 'X' height of the font.
+
+- QCoreApplication
+ Added arguments(), which returns a list of command line
+ arguments as a QStringList.
+
+- QTcpSocket
+ Added support for SOCKS5 via setProxy().
+
+- QUdpSocket
+ Added property "bindMode", for binding several sockets to the
+ same address and port.
+
+- QPen
+ Added support for custom dash pattern styles and miter limits.
+ Added support for QDebug.
+
+- QDebug
+ Added support for QVector and QPair output.
+
+- QStringListModel
+ Added support for sorting.
+
+- QOpenGLPaintEngine
+ Gradients in the OpenGL paint engine are now drawn using
+ fragment programs, if the extension is available. Lots of
+ fixes, speedups and tweaks.
+
+
+Platform-Specific changes
+-------------------------
+
+Windows:
+
+- Painting
+ Added support for ClearType text rendering.
+
+- File Engine
+ Added support for long filenames/paths.
+
+X11:
+
+- QWidget
+ Added support for freedesktop.org startup notifications.
+
+Mac OS X:
+
+- Added support for universal binaries
+- Improved support for the VoiceOver accessibility tool in Mac OS X 10.4
+ and later
+
+
+3rd-party libraries
+-------------------
+
+- zlib
+ Upgraded to zlib 1.2.3.
+
+- FreeType
+ Upgraded to FreeType 2.1.10.
+
+- SQLite
+ Upgraded to SQLite 3.2.7
diff --git a/dist/changes-4.1.0-rc1 b/dist/changes-4.1.0-rc1
new file mode 100644
index 0000000..fac0ce0
--- /dev/null
+++ b/dist/changes-4.1.0-rc1
@@ -0,0 +1,554 @@
+Qt 4.1 introduces many new features as well as many improvements and
+bugfixes over the 4.0.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt library
+----------
+
+ - Integrated support for rendering Scalable Vector Graphics (SVG)
+ drawings and animations (QtSvg module).
+
+ - A Portable Document Format (PDF) backend for Qt's printing system.
+
+ - A unit testing framework for Qt applications and libraries.
+
+ - Modules for extending Qt Designer and dynamic user interface
+ building.
+
+ - New proxy models to enable view-specific sorting and filtering of
+ data displayed using item views.
+
+ - Additional features for developers using OpenGL, such as support
+ for pixel and sample buffers.
+
+ - A flexible syntax highlighting class based on the Scribe rich text
+ framework.
+
+ - Support for network proxy servers using the SOCKS5 protocol.
+
+ - Support for OLE verbs and MIME data handling in ActiveQt.
+
+Qt Designer
+-----------
+
+- Added support for editing menu bars and tool bars.
+
+- Added support for adding comments to string properties.
+
+- Added new static QtForm library with improved
+ QForm::Loader API for loading designer forms at run-time.
+
+- Added support for namespaces in uic generated code.
+
+- Added support for dock widgets in main windows.
+
+- Added support for editing table, tree and list widgets.
+
+- Improved palette editing and resource support.
+
+QTestLib
+--------
+
+- Added QTestLib, the Qt Unit Testing Library. See the "QTestLib" chapter
+ in the Qt documentation for more information.
+
+- Users of older versions of QtTestLib can use the updater utility in
+ tools/qtestlib/updater to convert existing autotests to work with QTestLib.
+
+Boost
+-----
+
+Added boost compatible syntax for declaring signals and slots. If you
+define the macro QT_NO_KEYWORDS "Q_SIGNALS" and "Q_SLOTS" are
+recognized as keywords instead of the default "signals" and "slots".
+
+ActiveQt
+--------
+
+QAxServer now supports mime-type handling - a ActiveX control can be
+registered to handle a certain file extension and mime-type, in which case
+QAxBindable::load and QAxBindable::save can be reimplemented to serialize
+the object.
+
+Build system
+------------
+
+Added support for linking static plugins into the application.
+
+Qt 3 to 4 Porting Tool
+----------------------
+
+Q(V|H)BoxLayout and QGridLayout usage is now ported to use
+Q3(V|H)BoxLayout/Q3GridLayout, to retain the margin/spacing
+behavior as in Qt 3.
+
+Meta Object Compiler (moc)
+--------------------------
+
+- Added support for const signals.
+
+Qt Assistant
+------------
+
+- Added -docPath command line option for easy setting of the
+ document root path.
+
+QMake
+-----
+
+- Added support for new FORMS3 profile variable to make it possible
+ to have Qt Designer forms from Qt 3 and Qt 4 in the same project.
+
+- Added support for precompiled headers on win32-g++ (MinGW)
+
+Compilers
+---------
+
+Added support for Solaris 10 on AMD64 with the compiler provided by
+Sun.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+New classes
+-----------
+
+- QTreeWidgetItemIterator
+ Added iterator to help iterating over items in a QTreeWidget.
+
+- QSortingProxyModel
+ The QSortingProxyModel can contain another model and handles
+ the sorting of it.
+
+- QFilteringProxyModel
+ Allows you to provide a subset of a model to a view.
+
+- QStringFilterModel
+ Allows you to provide a subset of a model to a view based on a
+ regular expression.
+
+- QSyntaxHighlighter
+ The QSyntaxHighlighter class allows you to define syntax
+ highlighting rules.
+
+- QAbstractFileEngine
+ A base class for implementing your own file and directory handling
+ back-end for QFile, QFileInfo and QDir.
+
+- QAbstractFileEngineHandler
+ For registering a QAbstractFileEngine subclass with Qt.
+
+- QFSFileEngine
+ The default file engine for regular file and directory access in Qt.
+
+- Q3(H|V)BoxLayout and Q3GridLayout
+ Layout classes provided for compatibility that behave the same
+ as the Qt 4 classes but use a zero margin/spacing by default,
+ just like in Qt 3.
+
+- Added qFromLittleEndian, qToLittleEndian, qFromBigEndian and
+ qToBigEndian endian helper conversion functions (qendian.h)
+
+- Q_EXPORT_PLUGIN2 macro
+ Obsoletes Q_EXPORT_PLUGIN and allows static linking of
+ plugins.
+
+- Q3ComboBox
+ For enhanced backwards compatibility with Qt 3.
+
+- QGLPbuffer
+ For creating and managing OpenGL pixel buffers.
+
+- QNetworkProxy
+ For setting up transparent (SOCKS5) networking proxying.
+
+- QDirectPainter (Qtopia Core only)
+ Provides direct access to video framebuffer hardware.
+
+
+General improvements
+--------------------
+
+- QByteArray
+ Added toLong() and toULong().
+
+- QFileDialog
+ Fix shortcut and focus for "Alpha channel" spinbox.
+
+- QLinkedList
+ Added conversion methods to convert from/to STL lists.
+
+- QMap/QHash
+ Fixed operator>>() to read back multiple values associated
+ to a same key correctly.
+ Added constFind(), for finding an item without causing a detach.
+
+- QMap/QHash
+ Const-correctness in const_iterator's operator--(int).
+
+- QMainWindow
+ The saveState() and restoreState() functions no longer
+ fallback to using the windowTitle property when the objectName
+ property is not set on a QToolBar or QDockWidget; this
+ behavior was undocumented and has been removed.
+
+- QToolBar
+ Added Qt 3 compatibility signal visibilityChanged(bool).
+
+- QMetaType
+ Class is now fully reentrant.
+ Metatypes can be registered or queried from multiple threads.
+ Added qMetaTypeId<T>(), which returns the meta type ID of T at compile time.
+
+- QMetaProperty
+ Added isResettable().
+
+- QSql
+ Oracle plugin adds support for authentication using external credentials.
+ Added isValid() to QSqlError.
+
+- QThread
+ Added setPriority() and priority(), for querying and setting
+ the priority of a thread.
+
+- QTreeWidgetItem/QTreeWidget
+ Added new constructors and addChildren(), insertChildren(),
+ takeChildren(), insertTopLevelItems(), addTopLevelItems to
+ speed up insertion of multiple items.
+
+- QTextDocument
+ Added the class QTextBlockUserData and added the possibility
+ of storing a state or custom user data in a QTextBlock
+ Added useDesignMetrics property, to enable the use of design metrics for
+ all fonts in a QTextDocument.
+
+- QTextFormat
+ Added support for setting the font pixel size.
+ Added UserObject to QTextFormat::ObjectTypes enum.
+
+- QMetaType
+ The value of QMetaTypeId<T>::Defined indicates whether a given type T is
+ supported by QMetaType.
+
+- QAbstractItemView
+ Added setIndexWidget() and indexWidget() which makes it
+ possible to set a widget at a given index.
+
+ Added a QAbstractItemView::ContiguousSelection mode.
+ Added scrollToTop() and scrollToBottom().
+
+- QAbstractItemModel
+ Added a SizeHintRole that can be set for each item. The item
+ delegate will now check for this value before computing the
+ size hint based on other item data.
+
+ Add QModelIndex::operator<() so we are able to use them in
+ QMap and other containers.
+
+ Added qHash function for QModelIndex.
+
+- QTableWidget
+ Added cellWidget() and setCellWidget() which makes it possible
+ to set a widget at a specified cell.
+
+ Added setCurrentCell().
+
+ Added QTableWidgetItem copy constructors.
+
+
+- QTreeWidget
+ Added setItemWidget() and itemWidget() which makes it possible
+ to set a widget on an item.
+
+- QListWidget
+ Added setItemWidget() and itemWidget() which makes it possible
+ to set a widget on an item.
+
+ Added QListWidgetItem copy constructors.
+
+- QMutableMapIterator
+ Added value() overloads to Java-style iterators that return
+ non-const references.
+
+- QTextTable
+ Added mergeCells() and splitCells() to be able to set the row
+ or column span on a table cell.
+
+- QStyle
+ Added standardIcon() which returns a default icon for standard
+ operations.
+ Added State_ReadOnly, which is enabled for read-only widgets.
+
+ Renamed QStyleOption::init() to initFrom().
+ - QGroupBox is now completely stylable (QStyleOptionGroupBox)
+ - Indeterminate (busy) progress bars are now animated properly
+ in all styles.
+
+ Added PM_DockWidgetTitleMargin as pixel metric.
+
+- QHash
+ Make it possible to use QHash with a type that has no default
+ constructor.
+
+- QTableView
+ Made QTableView::setShowGrid() a slot, like in Qt 3.
+ Added setRowHeight() and setColumnWidth().
+
+- QTableWidgetSelectionRange
+ Added rowCount() and columnCount() convenience functions.
+
+- QSettings
+ Added support for custom formats in QSettings.
+
+- QTextStream
+ Added status(), setStatus() and resetStatus() for improved error handling.
+ Added read(qint64 maxlen), for reading parts of a text stream into a
+ QString.
+
+- QTextCursor
+ Added support for BlockUnderCursor selection type.
+
+- QHeaderView
+ Added defaultSectionSize property which tells the default size
+ of the header sections before resizing.
+
+- QScrollBar
+ Added context menu to the scrollbar with default navigation
+ options.
+
+- QScrollArea
+ Added ensureVisible(), which can scroll the scrollarea to make sure a
+ specific point is visible.
+
+- QDateTime
+ Added addMSecs(), which adds a number of milliseconds to the QDateTime.
+
+- QDateTimeEdit
+ Added support for more date/time formats.
+ Now allows multiple sections of the same type.
+
+- QButtonGroup
+ Added handling of buttons with IDs to the buttongroup like in
+ Qt 3.
+
+- QIODevice
+ Added peek() for peeking data from a device.
+
+- QTextEdit
+ Added property tabStopWidth which sets the tab stop width in
+ pixels.
+ append(const QString &) is now a public slot.
+ Added support for inserting Unicode control characters through the
+ context menu.
+ Added property acceptRichText, for whether or not the text edit
+ accepts rich text insertions by the user.
+ Added overwriteMode property.
+
+- QDataStream
+ Added skipRawData().
+ Added support for QRegExp.
+
+- QProgressBar
+ Added support for vertical progress bars.
+
+- QImageIOHandler
+ The name() function has been obsoleted; use format() instead.
+ Added QImageIOHandler::Animation, for determining if the image format
+ supports animation.
+ Added QImageIOHandler::BackgroundColor, for setting the background
+ color for the image loader.
+
+- QImageReader
+ Added setBackgroundColor() and backgroundColor(), for setting the
+ background color of an image before it is read.
+ Added supportsAnimation(), for checking if the image format supports
+ animation.
+
+- QImageWriter
+ Added support for saving image text.
+
+- QLocale
+ Added dateFormat()/timeFormat() to query the date/time format for the
+ current locale.
+ Added toString() overloads for localized QTime and QDate output.
+ Added decimalPoint(), groupSeparator(), percent(), zeroDigit(),
+ negativeSign() and exponential(), which provide a means to generate
+ custom number formatting.
+
+- QHostInfo
+ Added support for reverse name lookups.
+
+- QHostAddress
+ Added a QString assignment operator
+ Added convenience functions for initializing from a native sockaddr
+ structure.
+ Added support for the IPv6 scope-id.
+
+- QPrinter
+ Added property "embedFonts" for embedding fonts into the target
+ document.
+ Added support for printing to PDF.
+ Added support for custom print and paint engines
+
+- QPrintEngine
+ Added PPK_SuppressSystemPrintStatus, for suppressing the printer
+ progress dialog on Mac OS X.
+
+- QKeySequence
+ Added fromString() and toString() for initializing a key sequence
+ from, and exporting a key sequence to a QString.
+
+- QUrl
+ Added the port(int) function, which provides a default value for the
+ port if the URL does not define a port.
+ Support for decoding Punycode encoded hostnames in URLs.
+ Made the parser more tolerant for mistakes, and added a ParsingMode
+ flag for selecting strict or tolerant parsing.
+ Added support for the NAMEPREP standard in our i18n domain name support.
+
+- QDir
+ Added the filter QDir::NoDotAndDotDot, for the
+ special directories "." and "..".
+ Added the filter QDir::AllEntries, for all entries
+ in a directory, including symlinks.
+
+
+- QAbstractSocket
+ Added slots connectToHostImplementation() and
+ disconnectFromHostImplementation() to provide polymorphic behavior for
+ connectToHost() and disconnectFromHost().
+
+- QMenuBar
+ Added setActiveAction(), which makes the provided action
+ active.
+
+- QProxyModel
+ This class has been obsoleted (see QAbstractProxyModel)
+
+- QWidget
+ Now supports three modes of modality: NonModal, WindowModal and
+ ApplicationModal.
+ Added Qt::WindowModality, obsoleted WA_ShowModal and WA_GroupLeader.
+ Added Qt::WA_OpaquePaintEvent widget attribute, obsoleting Qt::WA_NoBackground.
+ Added boolean autoFillBackground property.
+ Child widgets now always inherit the contents of their parent.
+
+- QPalette
+ Added QPalette::Window (obsoletes Background) and
+ QPalette::WindowText (obsoletes Foreground).
+
+- QHttpResponseHeader
+ Added two constructors and the function setStatusLine() for generating
+ a response header.
+
+- QBitArray
+ Added count(bool), for counting on and off-bits in a bit array.
+
+- QVariant
+ Added support for QRegExp
+
+- QRegExpValidator
+ Added the property "regExp".
+
+- QTabBar
+ Added the property "iconSize", for setting the size of the icons on
+ the tabs.
+
+- QLineEdit
+ Added support for inserting Unicode control characters through the
+ context menu.
+
+- QString
+ Added toLong() and toULong().
+ Support for std::string conversions with embedded \0 characters.
+
+- QRegion
+ Added translate(), like QRect::translated().
+
+- QProcess
+ Added systemEnvironment(), which returns the environment variables
+ of the calling process.
+ Added exitStatus(), and added a new finished() signal which takes the
+ exit status as a parameter.
+
+- QComboBox
+ Made setCurrentIndex() a slot.
+
+- QFontDataBase
+ Added styleString(), for retrieving the style string from a QFontInfo.
+ Added support for Myanmar fonts.
+
+- QFontMetrics
+ Added xHeight(), which returns the 'X' height of the font.
+
+- QCoreApplication
+ Added arguments(), which returns a list of command line arguments as a
+ QStringList.
+
+- QTcpSocket
+ Added support for SOCKS5 via setProxy().
+
+- QUdpSocket
+ Added property "bindMode", for binding several sockets to the same
+ address and port.
+
+- QPen
+ Added support for custom dash pattern styles and miter limits.
+ Added support for QDebug.
+
+- QDebug
+ Added support for QVector and QPair output.
+
+- QStringListModel
+ Added support for sorting.
+
+- QOpenGLPaintEngine
+ Gradients in the OpenGL paint engine are now drawn using
+ fragment programs, if the extension is available. Lots of
+ fixes, speedups and tweaks.
+
+
+Platform-Specific changes
+-------------------------
+
+Windows:
+
+- Painting
+ Added support for ClearType text rendering.
+
+- File Engine
+ Added support for long filenames/paths.
+
+X11:
+
+- QWidget
+ Added support for freedesktop.org startup notifications.
+
+Mac OS X:
+
+- Improved support for the VoiceOver accessibility tool in Mac OS 10.4
+ and later
+
+
+3rd-party libraries
+-------------------
+
+- zlib
+ Upgraded to zlib 1.2.3.
+
+- FreeType
+ Upgraded to FreeType 2.1.10.
+
+- SQLite
+ Upgraded to SQLite 3.2.7
diff --git a/dist/changes-4.1.1 b/dist/changes-4.1.1
new file mode 100644
index 0000000..b18539d
--- /dev/null
+++ b/dist/changes-4.1.1
@@ -0,0 +1,693 @@
+Qt 4.1.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.1.0.
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Meta Object Compiler (moc)
+ Better handling of preprocessor statements in combination with
+ multi line comments.
+ Fixed problem where moc would generate meta information for
+ invalid signals/slots.
+
+Configure / Compilation
+ Fix build of dumpcpp-dependent projects in Visual Studio 6.
+ Fixed compilation for solaris-cc-64.
+ Respect the -no-sql-mysql flag.
+ Fixed compilation with -no-qt3support on Mac OS 10.3
+ qmake now places PkgInfo in the "Contents" directory of the
+ .app bundle.
+
+Porting (qt3to4)
+ Fixed the issue where 'int red' would be translated to
+ 'Qt::red'.
+ Improved handling of macros created by moc.
+
+Qt Designer
+ uic3: Prevent generation of invalid font tags
+ uic: Fixed bug that caused retranslateUI() to add existing
+ items in combo box once again
+ Fixed dependency problem where qtDesigner modules would depend
+ on a private class.
+ Added missing generation of setColumnCount() and setRowCount()
+ for QTableWidget.
+ Fixed a platform incompatibility when saving icon properties on
+ Windows.
+ Fixed a crash when breaking the layout in a dock widget.
+ Fixed a crash when opening a new .ui file while in "Edit Tab
+ Order" mode.
+ Fixed a crash when adding a widget to a QDockWidget.
+ Improved preview of signal/slot connections.
+ Fixed an issue where moving widgets in a form resulted in lost
+ signal/slot connections and tab order to get.
+ Fixed corruption of shortcut properties in .ui files when
+ saving under some locales.
+ Fixed preview of QComboBox with item icons.
+ Fixed an issue preventing cancellation of 'New resource file'
+ if previous resource file was deleted.
+ Fixed use of F1 as help shortcut.
+
+Qt Assistant
+ Fixed problem with restoring window geometry on multi screen
+ configurations.
+
+Qt Linguist / Internationalization
+ Fixed tr() idioms, so that translation actually works.
+ Fixed encoding of translated text.
+
+Qt Translation
+ Added translation files for Simplified Chinese.
+ Fixed a problem with lupdate parsing output from uic.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- QAbstractItemView
+ Fix selections when mouse-tracking is turned on.
+ Fixed selection issues after row resizing.
+ Fixed focus after pressing enter.
+
+- QAbstractItemModel
+ More consistent behavior in drag-and-drop code.
+
+- QAbstractSlider
+ Ensure changed-signals are only emitted when the value
+ actually changed.
+
+- QAbstractSocket
+ Fixed a crash if disconnected during waitForReadyRead().
+
+- QAccessibleWidget
+ Fix an off-by-one navigation error in the accessibility
+ support for menu bar and menus.
+
+- QByteArray
+ Fixed leftJustified() and rightJustified() when array contains
+ \0's.
+
+- QComboBox
+ Fixed a crash when setting and deleting the model.
+ Fixed a crash when using a QListWidget as the view.
+
+- QCoreApplication
+ Fixes race condition during plugin loading.
+
+- QCommonStyle
+ Fixed wrong size hint of PM_MenuButtonIndicator.
+
+- QDateTime
+ Fixed a regression in fromString().
+ Avoid potential hang when paring invalid date formats.
+
+- QDialog
+ Fixed an issue where setExtension()/showExtension() didn't
+ work in a constrained size mode.
+
+- QDir
+ cd() now fails when attempting to cd to a non-directory.
+
+- QDirModel
+ Improved stability when appending network drives.
+ Improved stability when handling symlinks with relative paths.
+
+- QDockWidget
+ Update toggleViewAction() when widget gets hidden with close
+ button.
+
+- QFile
+ Changed behavior of rename() to fail if a file of the same
+ name already exists.
+
+- QFileDialog
+ Make sure filter combo box gets enabled when changing from
+ Directory to ExistingFile mode.
+ Improve filename completion for files with the same name but
+ different extension.
+ Make sure the selection is updated when modifying the filename
+ by removing characters.
+ Allow typing in several file names in the file name line edit.
+ Improve handling of non-existent windows shares.
+ Improve handling of hidden directories.
+ Make it possible to create new folder when a folder called
+ "New Folder" already exists.
+ Improve usability by not changing the filename text when
+ directories are selected.
+ Improve usability by not autoselecting the first item when
+ changing directories.
+ Ensure that calling setDirectory() with a path shows the
+ directory when the path contains a file name.
+ Avoid unnecessary resolving of mount points, leading to
+ lockups on Unix.
+ Fixed potential crash when selecting an extension filter with
+ no matches in current directory.
+ Fixed a problem where using selectFilter() didn't update the
+ view.
+
+- QFileInfo
+ Fixed issue where copying a QFileInfo and calling refresh()
+ could result in file info data being cleared.
+ Fixed issue where calling readLink() would resolve link
+ targets incorrectly.
+
+- QGLWidget
+ Switching from full screen mode to normal mode no longer
+ results in incorrect window decorations.
+ Fixed overline, underline and strikethrough for text drawn
+ with renderText().
+
+- QGridLayout
+ Respect specified alignment over default alignment.
+
+- QHeaderView
+ Respects dragDistance.
+ Respects TextColorRole.
+ Fixed painting problems caused by clicking both mouse buttons
+ at the same time.
+ Fixed painting flaws when using sort indicators.
+ Fixed issue where QStyleOptionHeader::End would not be set by
+ paintSection.
+ Only the left mouse button can now be used to move and resize
+ header sections.
+ Fixed incorrect header size after swapping header sections.
+ Fixed resize mode of header sections after section moves.
+ Fixed an assert when changing the selection model.
+
+- QHash / QSet
+ Make the operator==() not take the internal order of elements
+ into account when comparing.
+
+- QIcon
+ Fixed issue where creating QIcons with an invalid path could
+ result in a crash.
+
+- Improved handling of focus events when using input methods.
+
+- QInputDialog
+ Fixed handling of ampersands in labels.
+
+- QImage
+ Fixed drawing of QBitmap's onto a QImage.
+
+- QImageIOHandler
+ Made all supported image formats support the Size option.
+
+- QItemSelectionModel
+ Fixed an infinite loop in isRowSelected().
+
+- QItemDelegate
+ Better handling of QStyleOptionViewItem::Bottom.
+ Increased the delegate horizontal margin.
+
+- QLayout
+ Warn instead of crash when adding two layouts to a widget.
+
+- QLocale
+ Add missing entry for "nb".
+
+- QList
+ Fixed a memory leak when repeatedly removing items from the
+ end and inserting items in the middle.
+
+- QListView
+ Fixed an assert when using QProxyModel as the model.
+
+- QMainWindow
+ Handle RTL layout for dockwidgets properly.
+ Make dockwidgets remember their sizes after being hidden.
+ Improved reliability when saving and restoring state.
+
+- QMenu
+ Fixed shortcut handling of already selected submenus.
+ Fix setting the window title on torn off menus.
+ Fix bug where exec() returned the wrong QAction on some cases.
+
+- QMenuBar
+ Improved widget placement in setCornerWidget().
+
+- QMenuItem
+ Ensure space for both check mark and icon when using
+ QPlastiqueStyle.
+
+- QMYSQLDriver
+ Fix crash when formatValue() is called without connection.
+
+- QMessageBox
+ information() now works correctly when calling it after
+ returning from QApplication::exec()
+
+- QPaintEngine
+ Fixed an out of memory issue when drawing very long lines.
+ OpenGL : Make sure the image and pixmap cache is used.
+ OpenGL : Faster rect outlining for the most common case.
+
+- QPrintEngine
+ Better font underlining/overlining.
+ Support PDF font embedding, resulting in smaller PDF files and
+ selectable text.
+ Made our generated PDFs readable by Ghostscript.
+ Support pens that have patterns/pixmaps for PDFs.
+ Support landscape mode for PDFs.
+
+- QPixmap
+ Fixed issue where save() in some cases would return true on
+ failure.
+
+- QProgressBar
+ Fix incorrect progress in some cases.
+
+- QPushButton
+ Buttons reparented into a dialog parent through the layout are
+ now auto-default.
+
+- QRadioButton
+ Fixed a potential crash in QRadioButton Qt 3 support
+ constructors.
+
+- QSortFilterProxyModel
+ Improve stability when adding rows to source model.
+ Fixed issue where some nodes would show up as expandable even
+ if all it's children had been filtered.
+ Fixed a crash when deleting rows.
+
+- QSizeGrip
+ Fixed size grip painting when maximizing a QMainWindow in a
+ QWorkspace.
+
+- QSvgRenderer
+ Better handling of invalid files.
+
+- QSvg
+ Improve stroking with pen width 0.
+ Fix rectangle filling bug.
+
+- QSyntaxHighlighter
+ Fixed missing handling of blocks of text under certain
+ conditions.
+ Improved interaction with input methods.
+
+- QScrollArea
+ Fixed an issue where the scroll area sometimes would not
+ resize to compensate for content change.
+
+- QString
+ Fixed regression in fromLocal8Bit().
+
+- QTextDocument
+ Support span style background-color.
+ Fix nested tables in html documents regression.
+
+- QTextLayout
+ Added support for soft-hyphens.
+
+- QToolButton
+ Make popup menus appear on the correct screen.
+ Fixed ToolButtonPopupMode when QToolButton has a
+ QAction.
+
+- QToolBar
+ Combo boxes now appears as submenus in a toolbar extension.
+ setIconSize() now works correctly.
+ Relative position within toolbars are now kept when saving and
+ restoring state.
+
+- QTextBrowser
+ Fix missing line break after paragraph.
+
+- QTextEdit
+ Improve handling of the TITLE tag.
+ Fixed navigating links via tab.
+ Improved handling of malformed html.
+ Fixed rendering for tables with thead/tbody/tfoot elements.
+ Improved copy and paste of content with whitespace
+ Make undo/redo update the cursor position.
+ Fixed lost cursorPositionChanged() signal in read-only mode.
+ Fixed memory leak when calling setHtml() repeatedly.
+ Significantly improved performance when appending and editing
+ text.
+ Improved performance when selecting all text.
+ Emit copyAvailable() on mouse selection.
+
+- QTableView
+ Fixed drawing of selections after moving columns.
+ Do not wrap to the top if Page Down is pressed.
+ Improve scrolling behavior.
+ QTableView now takes ownership of QHeaders set using
+ setHorizontalHeader()
+ Fixed issue where calling setModel(0) could result in a
+ crash.
+
+- QTreeView
+ Fixed scrolling-related item expand bug.
+ Improve scrolling behavior.
+ QTreeView now takes ownership of QHeaders set using
+ setHorizontalHeader()
+ Avoid crash when calling setRowHidden with no model.
+ Avoid crash when calling sizeHintForColumn() in some cases.
+ Improved performance when adding rows.
+ Fixed update of view when changing row heights.
+ Fixed a bug where calling setCurrentIndex() did not update the
+ view correctly.
+ Removed extra emit of the expanded() signal on already
+ expanded branches.
+
+- QTreeWidget
+ Fixed tristate check item behavior.
+
+- QTabWidget
+ Fixed bug that caused missing resize when dynamically adding
+ widgets.
+ Fixed text positioning in a tab with an icon.
+
+
+- QTemporaryFile
+ Fixed issue where calling open() could potentially change the
+ file name.
+
+- QTextDocument
+ Improved stability when importing incorrectly formed html
+ tables.
+ Improved stability when importing closing tags without
+ corresponding opening tags.
+
+- QTextStream
+ Ensure valid codec converter state after calling seek(0).
+ Fixed issue where readAll() would not work with sequential
+ devices.
+
+- QTabBar
+ Improve handling of tab removal.
+
+- QUrl
+ Improve handling of hostnames containing digits.
+ Fix crash when calling hasQueryItem() on QUrl without any
+ query items.
+ Added support for parsing file names with '[' and ']'
+ characters.
+
+- QVariant
+ Improve operator==() behavior when comparing different types.
+ The QVariant(const char *) constructor is now unavailable when
+ QT_NO_CAST_TO_ASCII is set. Otherwise, it uses
+ QString::fromAscii to convert the const char * to a Unicode
+ QString to prevent loss of information.
+
+- QWidget
+ Fix regression in setMask().
+ Fixed issue where incorrect minimum size was reported after
+ reparenting from a top level widget.
+ Fixed return value of normalGeometry() after the widget has
+ been maximized.
+ Fixed crash on application exit if the widget was created
+ before the widget mapper is initialized.
+
+- QXpmHandler
+ Fixed handling of non-transparent XPM images.
+
+- XMLInputReader
+ Fixed issue where entities in XML files were not
+ resolved.
+
+- QXmlSimpleReader
+ A significant (approx. 50x) speedup in QXmlSimpleReader when
+ parsing documents which contain internal or external entities.
+
+- Q3DataTable
+ Drivers not supporting the QuerySize feature would display one
+ row of data too little.
+
+- Q3IconView
+ Fixed selection appearance.
+
+- Q3TextEdit
+ Fixed focus indicator tabbing through tables.
+ Fixed coloring when inserting text after use of setColor().
+
+- Q3TabDialog
+ Added missing selected() signal
+
+- Q3ListView
+ Fixed occasional crashes when deleting items.
+ Fixed wrong label after addLabel(QString()).
+
+- Q3ScrollView
+ Fixed default focus policy for deriving classes.
+
+- Q3ToolBar
+ Q3Action::setOn() now works correctly.
+ Adding an action now sets all action properties correctly.
+
+- Q3ActionGroup
+ Fix drop down drawing error.
+
+- Q3MainWindow
+ Fixed a regression in setUsesIconText().
+
+
+Platform-Specific changes
+-------------------------
+
+Windows:
+
+- QApplication
+ Timers now continue to fire when windows enters a modal event
+ loop.
+
+- QAxServer
+ Fixed issue where updateRegistry() would report success, even
+ though the operation failed.
+ Fixed comparison of class attributes.
+
+- QAxWidget
+ Support parameters of type short* and char* in signal/slots.
+
+- QClipboard
+ Make sure the dataChanged() signal is emitted correctly.
+
+- QColordialog
+ Fixed various selection issues in WindowsXP style.
+
+- QDockWidget
+ Improve the look of title bar buttons.
+ Improved appearance of dock widget title and frame.
+
+- QFileDialog
+ Improve handling of path names with special characters.
+ Maintain modality chain when showing a native modal inside a
+ qt modal.
+ Speedup when browsing dirs containing broken shortcuts.
+
+- QHeaderView
+ Improved header highlighting in WindowsXP style.
+
+- QInputDialog
+ Calling setText() also selects all text to be consistent with
+ other platforms.
+
+- QLabel
+ Improved appearance when disabled.
+
+- QLineEdit
+ Make QLineEdit respect the XP color scheme.
+
+- QOpenGL
+ Added workaround for missing OpenGL sample buffers on the
+ Mobile Intel 915GM Express Chipset.
+ Fixed rendering into a QPixmap.
+
+- QPainter
+ Improve Type 1 font rendering.
+ Improved performance of font rendering.
+ Use the standard fallback fonts for Asian languages.
+
+- QPrinter
+ Fixed issue where the orientation for a QPrinter would be
+ ignored.
+ Fix PCL printer line drawing bug.
+
+- QPrintDialog
+ Fix unhandled exception when a print dialog is launched from
+ within Visual Studio.
+
+- QPrintEngine
+ Ensure correct pageRect() and paperRect() when printer
+ resolution is set manually.
+
+- QTableView
+ Improved checkbox coloring within selections.
+
+- QUdpSocket
+ Better handling when sending to an unbound port.
+
+- QWidget
+ Fix setWindowOpacity() flicker.
+
+- QWindowsXPStyle
+ Fixed QApplication::setStyle() if called before construction
+ of the application object.
+
+- QWorkSpace
+ Improve window resizing.
+ Improve title bar and button appearance in XP style.
+ Improved focus handling.
+ Fixed update of child masks on style change.
+ Fixed restore action not being enabled on maximize and
+ minimize.
+ Fixed a potential crash in maximizeWindow().
+
+X11:
+
+ Reintroduced qt_x11_set_global_double_buffer() for binary
+ compatibility.
+ Improved tablet event handling.
+
+- QApplication
+ The KeypadModifier is now set when NumLock is enabled.
+
+- QBitmap
+ Fixed text drawing errors under some fontconfig
+ settings.
+
+- QLibrary
+ isLibrary() now returns true for .a and .so on AIX.
+
+- qmake
+ Improved stability when modifying environment variables
+ Allow '/' as a path separator on all platforms.
+
+- QPaintEngine
+ Fixed issue where filling and stroking ellipses could leave
+ pixel gaps.
+
+- QPainter
+ Implemented Porter-Duff composition support.
+ Fix artifacts when drawing aliased primitives with an alpha
+ pen.
+ Fixed issue where rotating pixmaps could add a pixel row in
+ some cases.
+ Fixed drawing of arcs of less than 1 degree.
+ Made drawText() honor the Qt::TextWrapAnywhere flag.
+
+- QPrinter
+ Fixed cleanup of child processes.
+
+- QPrintDialog
+ Fixed problems when using "From page" and "To page" spin
+ boxes.
+ Made it impossible to choose "OK" when no printers are
+ configured.
+
+- QProcess
+ Fixed possible deadlock when calling startDetatched().
+
+- QScrollArea
+ Catch double click also when size exceeds window system size
+ limits.
+
+- QTextEdit
+ Fixed an issue where the horizontal scrollbar did not show up.
+
+- QWorkspace
+ Fixed missing mouse event propagation to child widgets.
+
+Mac OS X:
+
+ General fixes to the drag and drop support.
+ Improved performance when resizing widgets.
+ Fixed font issues for input methods with Japanese.
+ Fixed issue with pasting Japanese text.
+ Correctly set architecture and SDKROOT when creating a Xcode
+ project.
+
+- QCursor
+ Fix alpha pixmap cursors.
+
+- QDesktopWidget
+ Improve stability when changing users.
+
+- QDockWidget
+ Improve dock widget appearance.
+
+- QGroupBox
+ More conformant styling.
+
+- QHeaderView
+ Fix text truncating issue on headers.
+
+- QLabel
+ Fix labels painted incorrectly when using MacMetalStyle.
+
+- QMenu
+ Improved menu styling.
+ Improved popup appearance.
+
+- QPainter
+ Add support for SmoothPixmap transform.
+
+- QPushButton
+ Make Mac style obey the icon size set by setIconSize().
+ Make sure buttons are not shown as default on inactive
+ windows.
+
+- QPrintEngine
+ Fixed truncated PDF generation of large documents.
+
+- QSplashScreen
+ Fix painting errors when using showMessage().
+
+- QTextEdit
+ Fixed focus issues with Japanese input.
+ Fixed issue with pasting Unicode text between
+ applications.
+
+- QToolBar
+ Improve tool bar appearance.
+
+- QTextFormat
+ Fixed a crash when setting a font's pixel size to -1.
+
+- QWorkSpace
+ Improve workspace children appearance.
+
+- Q3TextEdit
+ Fixed a crash in paragraphRect() when all content had been
+ deleted.
+
+- Q3ListViewItem
+ Fixed a infinite loop when editing an item.
+
+Qtopia Core:
+
+ Removed flickering when mouse cursor is above an animation.
+ Optimized use of shared memory.
+ Optionally use iwmmxt intrinsics to optimize painting.
+ Added a simple example on how to calibrate touch screen mouse
+ handlers.
+
+- Fonts
+ Handle BDF fonts without the PIXEL_SIZE property.
+ Added Chinese and Japanese fonts.
+
+- PDF
+ Support PDF font embedding.
+
+- qvfb
+ Fixed a crash when increasing the display size in the
+ configuration dialog.
+
+- QPixmap
+ Implement QPixmap::grabWindow().
+
+3rd-party libraries
+-------------------
+
+- FreeType
+ Fix memory leak.
+
diff --git a/dist/changes-4.1.11 b/dist/changes-4.1.11
new file mode 100644
index 0000000..7c26a30
--- /dev/null
+++ b/dist/changes-4.1.11
@@ -0,0 +1,41 @@
+Qt 4.1.11 is an optimization release of 4.1.4. It maintains both forward and
+backward compatibility (source and binary) with Qt 4.1.0.
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- QByteArray
+ Optimized resize() on an empty array.
+
+- QDateTimeEdit
+ Improved usability by allowing steps rounded to 15 minutes blocks.
+
+- QFile
+ Optimized the unsetError() by only modifying state if it's really
+ changed.
+
+- QFSFileEngine
+ Optimized buffered file reads.
+
+- QSettings
+ Implemented delayed parsing of the settings file.
+
+- QString
+ Optimized the size of the QString(const char*) constructor.
+
+- SQLite driver
+ Upgraded to SQLite version 3.3.5.
+ Minimized the time a result set is kept on the server.
+
+Qtopia Core-Specific changes
+-------------------------
+
+- Added 18 and 24 bit support to the Linux framebuffer screen driver.
+- Optimized the Transformed screen driver.
diff --git a/dist/changes-4.1.3 b/dist/changes-4.1.3
new file mode 100644
index 0000000..59f0c71
--- /dev/null
+++ b/dist/changes-4.1.3
@@ -0,0 +1,879 @@
+Qt 4.1.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.1.0.
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Meta Object Compiler (moc)
+
+Configure / Compilation
+ Compile with NAS sound support enabled and no Qt 3 support.
+ Fixed some issues with resolving absolute paths when configuring
+ Qt using "-prefix".
+
+Porting (qt3to4)
+ qt3to4 now adds the needed include directive for
+ qPixmapFromMimeFactory().
+ Added rule for QDeepCopy.
+ Improved handling of files with non-unix line endings.
+
+Qt Designer
+ Improved usability by letting the Find Icon dialog remember the last
+ path visited.
+ Fixed preview of DataTime and Date types.
+ Generate correct .ui code when saving forms containing Q3DateEdit,
+ Q3TimeEdit, Q3ProgressBar and Q3TextBrowser.
+ Fixed cursor position when editing text in QListWidget and QComboBox.
+ Fixed code generation for custom widgets containing a QComboBox.
+ Fixed a bug that prevented the windowTitle property for QDockWidgets
+ from being designable.
+ Fixed problem where Designer would fail to reflect QTreeWidget column
+ changes.
+ Fixed potential assert when font size is specified in points.
+ Fixed potential crash when breaking the layout of an empty splitter.
+ Ensured that Designer saves the used pixmap function.
+ Fixed potential crash on 64-bit platforms.
+ Ensured that windows show when restarting after a crash.
+ Improved geometry saving with multiple monitors.
+ Fixed a potential crash when using QVBoxLayout with certain widget
+ combinations.
+ Fixed a bug where breaking splitter layout would not work after
+ reopening the form.
+
+Qt Assistant
+ Assistant now sets the proper encoding attribute when saving files,
+ solving problems when viewing the page in some browsers.
+ Improved window placement on startup.
+ Improved performance of first-time keyword loading.
+
+Qt Linguist / Internationalization
+ Improved window placement on startup.
+ Fixed problem where .ts files for Qt 3 .ui files would be grayed out.
+
+uic
+ Fixed code generating bug for forms in namepsaces preventing
+ connections from being made.
+ Split large generated strings to avoid compiler errors.
+ Fixed a bug causing QLabel's font not to be set when using uic3.
+ Fixed a dependency issue when .ui files are in a subdirectory.
+ Ensured that "uic3 -convert" will convert connections.
+ Ensured that uic3 will convert QDataTable and QSqlCursor to Qt3
+ support classes.
+
+Demos / Examples
+ Fixed a bug in the Tooltips example when moving the cursor from one
+ circle to the next.
+ Fixed a bug in the FTP example which caused the Download button to be
+ incorrectly enabled/disabled.
+ Fixed a crash in the FTP example.
+ Made it easier to change the Arthur Widget properties in Designer.
+ Fixed indexing issues in the Spreadsheet demo.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- Fixed rendering of some GIF images.
+- Popup and Tool widgets are now correctly blocked by sibling modal dialogs.
+- Group-leader widgets are no longer blocked by non-child modal widgets.
+- A parent modal dialog of a child modal dialog can no longer be brought on
+ top of the child.
+- Made sure modal widgets are modal when opened on a closing parent.
+- Fixed expose painting error when closing a child popup.
+- Ensured that index widget pointers are maintained when a view is sorted.
+- Ensured that closingDown() returns true when the application
+ objects are being destroyed.
+- Fixed a potential crash in the PNG image handler.
+- Improved stability of PDF font generation when embedding invalid fonts.
+
+- Q3ButtonGroup
+ Fixed incorrect behaviour when using setExclusive(false).
+
+- Q3DockWindow
+ Fixed placement when showing after being hidden.
+ Fixed issue where calling show() on a hidden Q3DockWindow would
+ make the dock window overlap the existing one.
+
+- Q3GroupBox
+ Removed empty row at the bottom.
+
+- Q3TextEdit
+ Fixed some input method issues.
+
+- Q3TextBrowser
+ Fixed a bug that prevented some Unicode HTML files from being
+ displayed.
+
+- Q3ToolBar
+ Ensured that toolbar separators are painted in all styles.
+
+- Q3IconView
+ Fixed a crash when disabling the view while an item is being edited.
+
+- Q3ListView
+ Fixed incorrect background color.
+ Fixed painting issues with disabled items.
+ Added support for tooltips.
+
+- Q3Table
+ Fixed a painting bug in the headers that occurred when a cell was
+ selected.
+ Ensured that checkbox backgrounds are filled.
+ Fixed issue where calling selectRow() would not deselect the current
+ row in SingleRow selection mode.
+
+- Q3Header
+ Fixed incorrect vertical text alignment.
+ Fixed issue where a header label would be lost after swapping two
+ column headers.
+
+- Q3UrlOperator
+ Fixed listChildren() for the case when setProtocol() hasn't been
+ called.
+
+- Q3WhatsThis
+ Fixed handling of dynamic "What's This?" texts.
+
+- Q3WidgetStack
+ Fixed a potential crash.
+ Fixed a bug preventing arrows from showing up in some cases.
+
+- QAbstractButton
+ Ensured that QAbstractButton::setPixmap() also sets the size of the
+ pixmap.
+
+- QAbstractItemView
+ Fixed QStatusTipEvents for item views.
+ Fixed a crash occurring when removing a row in a slot connected to
+ selectionChanged().
+ Fixed issue where itemChanged() would be emitted twice.
+ Fixed issue where input methods would not work on editable itemviews.
+ Fixed potential crash.
+ Made sure the editor does not open when expanding and collapsing
+ branches in QTreeView. Note that this change introduces a system
+ dependent delay to differentiate between single and double clicks.
+ Made sure setIndexWidget() does not delete an old widget if one is
+ already set.
+ Fixed a bug causing fetchMore() to behave incorrectly with empty
+ models.
+ Fixed an issue that sometimes caused tab order to be incorrect after
+ editing items.
+
+- QAbstractSocket
+ Fixed potential crash when connecting to local sockets on BSD
+ systems.
+
+- QCheckBox
+ Only emit the stateChanged() signal when the state actually changes.
+ Improved performance.
+
+- QColorDialog
+ Improved usability.
+
+- QComboBox
+ Corrected escape of '&' in items.
+ Reset input context when showing the popup.
+ Fixed a missing update after model is reset.
+ Ensured that TextElideMode is respected.
+
+- QCommonStyle
+ Fixed incorrect values returned from sizeHintFromContents() for the
+ header sections.
+
+- QCheckBox
+ Fixed some painting issues when using CDE or Motif style.
+
+- QDatabase
+ Fixed bool values in prepared queries in the MYSQL driver.
+ Fixed use of stored procedures that returns a result set in MySQL
+ 5.x.
+ Fixed queries on tables with a LONG field type in Oracle databases.
+ Fixed reading of large blobs from an Interbase database.
+
+- QDir
+ Fixed infinite loop in rename() when renaming a directory without
+ write permission.
+
+- QDirModel
+ Fixed possible assert on broken links.
+ Fixed a bug preventing links to "/" on Unix system from working
+ correctly.
+
+- QFile
+ Corrected error reporting on flush() and close().
+ Fixed caching issues causing wrong file sizes to be returned in some
+ cases.
+ Ensure that write() will fail when trying to write to a full disk.
+
+- QFileDialog
+ Fixed a bug that allowed selection of multiple files in
+ getOpenFileName().
+ Ensured that the proper error message is given when deleting a
+ directory fails.
+ Fixed a bug preventing an update when changing the FileMode.
+ Added support to allow several new characters (such as @{},*~^) to be
+ used in dialog file filters.
+ Ensured that files are hidden when browsing in DirectoryOnly mode.
+
+- QFtp
+ Fixed crash that occurred if an FTP session got deleted in a slot.
+
+- QGridLayout
+ All addWidget() functions now invalidate the layout.
+ Fixed minimum size for layouts containing widgets that maintain
+ a height-for-width size policy.
+
+- QGroupBox
+ Fixed some painting issues appearing on all styles except Windows XP.
+ Fixed keyboard handling if checkable.
+
+- QHeaderView
+ Fixed a bug preventing tooltips from being shown.
+ Fixed a painting error occurring when the sort indicator was enabled
+ and the column width became smaller than the indicator width.
+ Fixed a usability issue when resizing small headers in a fixed-width
+ QTreeWidget.
+ Ensured that the header has the correct size when the font changes.
+ Fixed a painting error that occurred when the header was hidden.
+ Fixed a painting error that occurred when the user activated the
+ context menu while pressing the left mouse key.
+ Fixed a bug giving the last section a resize cursor event though it
+ cannot be resized.
+ Icons in header views now respect the layout direction.
+ Added support for setting a pixmap.
+ Prevented views from deleting a view it does not own.
+
+- QHttp
+ Fixed issue where setProxy() would only work for the first get()
+ call.
+
+- QIcon
+ Ensured that visible icons on QToolButtons and QMenus are updated
+ when the icon of a QAction changes.
+ Fixed issue where actualSize() would return a bigger size than the
+ requested size.
+
+- QImage
+ Fixed writing to a PNG file when the alpha value is premultiplied.
+ Fixed a bug where dotsPerMeter was not preserved after a call to
+ convertToFormat().
+ Handle out of memory conditions gracefully.
+
+- QIODevice
+ Fixed return values for Qt 3 support members getch(), putch() and
+ ungetch().
+
+- QItemDelegate
+ Proper painting in inactive windows.
+ Improved hit detection for QTreeWidgetItem checkboxes.
+
+- QItemSelectionModel
+ Emit currentChanged() when the current item is deleted.
+ Fixed a bug causing the selection to be lost when an item was
+ removed.
+
+- QLibrary
+ Added support for suffixes before library extensions.
+
+- QLineEdit
+ Made sure QT_NO_CLIPBOARD is respected.
+ Fixed incorrect background color when disabled.
+
+- QListView
+ Fixed setRowHidden().
+ Made the decision to showing scrollbars independent of the previous
+ scrollbar state.
+ Ensured that setting the icon position programatically works as
+ intended.
+
+- QLocale
+ Fixed a bug causing toString() to return the wrong day of the week in
+ some cases.
+
+- QMainWindow
+ Fixed a crash when deleting the widget returned by
+ QMainWindow::statusBar().
+ Fixed a bug causing wrong behavior when removing a QToolBar with
+ removeToolBar()
+ Fixed layout error when showing the status bar after the main window.
+ Fixed incorrect assert in QMainWindowLayout::dockWidgetArea().
+ Fixed a bug making it impossible to have a dock widget under two
+ others in the same dock widget area.
+ Fixed a regression preventing insertToolBar() from inserting a
+ toolbar before an existing toolbar.
+ Ensured that QDockWidget's maximumWidth() is honored.
+ Ensured that window menu shortcuts are available before the window is
+ shown.
+
+- QMenu
+ Allowed setActiveAction() open a submenu, to be consistent with
+ QMenuBar.
+ Made it possible for the Alt key to be used to close a context menu.
+ Improved navigation behavior when using Home/End.
+ Improved navigation behavior when using up/down arrows on a menu with
+ no selected items.
+ Fixed crash when clicking on cleared or disabled submenus.
+ Ensured that only the currently highlighted submenu is visible.
+
+- QMenuBar
+ Improved calculation of sizeHint().
+ Fixed a bug causing menu items after a spacer item to always appear
+ in the extension menu.
+ Changed activateItemAt() to behave more like its behavior in Qt 3.
+
+- QMotifStyle
+ Draw QSlider tick marks.
+ Fixed a bug preventing the focus frame background from being cleared.
+
+- QMovie
+ Improved frame delay calculations.
+
+- QObject
+ Fixed a crash when calling disconnect() on the last connection.
+
+- QPainter
+ Optimized drawing of dotted lines.
+ Fixed potential assert after calling setClipping(true).
+
+- QPainter
+ Fixed a bug causing contains(QPoint) to return the wrong result in some
+ cases.
+ Fixed some painting issues with drawArc().
+ Improved performance of drawLine() and drawEllipse().
+
+- QPen
+ Fixed a bug that caused the wrong dash patterns to be drawn when
+ changing styles.
+
+- QPicture
+ Fixed a DPI issue when drawing into a QLabel.
+ Made sure that the bounding rectangle is updated for all drawing
+ operations.
+ Improved stability when handling complex scenes.
+ Made sure SVG files saved by QPicture include namespace bindings in
+ the SVG tag.
+
+- QPlastiqueStyle
+ Improved usability in QSlider by making the hit rectangle for mouse
+ clicks wider.
+ Fixed animation of indeterminate progress bars.
+ Ensured that lines are drawn for the hierarchical relationships in
+ QTreeWidgets.
+
+- QPrinter
+ Optimized the size of PDF documents containing the same picture in
+ several places.
+ Ensured that systems with high resolution are correctly handled.
+ Fixed a bug preventing the setup() function from displaying the print
+ dialog.
+ Improved positioning of tiled pixmaps.
+
+- QPrintDialog
+ Fixed a crash that occurred when opening a page setup dialog on a PDF
+ printer.
+
+- QPushButton
+ Made sure that flat push buttons paint their contents.
+
+- QProcess
+ Ensured that the exit status is reset after a sub-process crash.
+ Fixed a bug causing the system to lock on X11 after calling
+ startDetached() 65536 times.
+ Enabled QProcess to be used outside the GUI thread.
+
+- QScrollArea
+ Fixed problem where focusing the next child in a scroll area would
+ make the top-left part of the child scroll out of view.
+
+- QSettings
+ Made it possible to use the "Default" registry entry on Windows.
+
+- QSortFilterProxyModel
+ Fixed a crash that occurred when deleting rows.
+ Improved stability by checking the model index for validity.
+
+- QStandardItemModel
+ Made sure that the column count is updated after calling
+ removeColumn().
+
+- QSplashScreen
+ Made sure the font set with setFont() is actually used.
+
+- QSqlRelationalTableModel
+ Fixed a bug where inserting using the OnManualSubmit edit strategy
+ failed in some cases.
+ Fixed removeColumn() for columns that contain relations.
+
+- QSqlTableModel
+ Made the OnFieldChange edit strategy behave like OnRowChange when
+ inserting rows.
+
+- QStackedLayout
+ Fixed a bug causing a focus change when calling removeWidget().
+
+- QSvgRenderer
+ Fixed rendering into a QPicture.
+ Fixed issue where id attributes containing certain characters would
+ not render correctly.
+
+- QSplashScreen
+ Fixed rendering of pixmaps with alpha channels.
+
+- QSplitter
+ Ensured that non-collapsible children are respected.
+
+- QSqlRelationalTableModel
+ Fixed handling of mixed-case field names for relations.
+
+- QSqlTableModel
+ Fixed a bug preventing the value 'false' from being set on a field of
+ boolean type.
+
+- QSyntaxHighlighter
+ Fixed a regression.
+
+- QTabBar
+ Ensured that currentChanged() is only emitted when the current index
+ actually changes.
+
+- QTabWidget
+ Ensured that QTabWidget has the same behavior as QStackedWidget when
+ inserting a page at index <= currentIndex().
+
+- QTableView
+ Fixed selection handling in situations after rows/columns have been
+ moved.
+ Made decision to show scrollbars independent of the previous
+ scrollbar state.
+ Fixed a bug causing mouse clicks to be lost.
+ Fixed potential assertion when hiding columns in QTableView.
+ Fixed potential crash if indexes are invalid and sections have been
+ moved.
+
+- QTabWidget
+ Fixed drawing of icons.
+
+- QTextCodec
+ Fixed detection of locales with the '@' modifier.
+
+- QTextDocumentLayout
+ Made sure the right margin of a QTextBlock is filled with the
+ background color.
+
+- QTextEdit
+ Fixed a bug causing setPlainText() to emit textChanged() three times.
+ Fixed an infinte loop triggered when calling setHtml() inside
+ resizeEvent().
+ Added support for pasting text with '\r' line feeds.
+ Fixed a bug causing tables loaded from HTML to be saved incorrectly.
+ Made it possible to delete images using the Backspace key.
+ Fixed some issues with justified text in combination with forced line
+ breaks.
+ Improved stability when setting a null cursor.
+ Increased accuracy when moving text by drag and drop.
+
+- QTextBrowser
+ Fixed incorrect mouse cursor after right-clicking a link.
+ Fixed incorrect mouse cursor in read-only mode.
+ Fixed issue where arrow cursor would override custom cursors.
+ Fixed potential crash when inserting HTML.
+ Improved support for relative links.
+ Improved parsing of internal document anchors.
+
+- QTextHtmlParser
+ Fixed a bug in the whitespace handling.
+
+- QTreeWidget
+ Fixed a bug that caused itemChanged() to be emitted with a null
+ pointer.
+
+- QTreeWidgetItemIterator
+ Fixed incorrect assert caused by creating an iterator for an empty
+ QTreeWidget.
+
+- QToolBar
+ Fixed potential crash when resizing a tool bar with certain types of
+ widgets.
+ Fixed a bug causing hidden widgets to be shown when the toolbar is
+ moved.
+
+- QToolTip
+ Enable word breaking in rich-text tool tips.
+
+- QTextStream
+ Fixed a bug causing aboutToClose() to be connected to a NULL slot
+ after calling unsetDevice().
+ Fixed a bug causing read() or readLine() to sometimes return an empty
+ string.
+
+- QTreeView
+ Fixed some drag and drop issues.
+ Fixed a bug where the check state of an item was unchanged after an
+ itemClicked() signal was emitted.
+ Made decision to show scrollbars independent of the previous
+ scrollbar state.
+ Fixed a bug causing horizontal scrolling when only vertically
+ scrolling should occur.
+ Fixed painting of parent-child hierarchy decorations.
+ Fixed scrollbar visibility bug.
+ Fixed branch indicator painting error in right-to-left mode.
+ Fixed painting issues when using reverse layout on hidden headers.
+ Fixed a bug preventing the view from being scrolled when column 0 was
+ hidden.
+ Fixed a bug causing some custom index widgets to be incorrectly
+ placed.
+
+- QTreeWidget
+ Fixed selection handling in situations after sortItems() has been
+ called.
+
+- QUdpSocket
+ Fixed issue where unbuffered sockets would continuously emit
+ readyRead().
+
+- QUrl
+ Fixed behavior of setPort() when -1 is given as the port number.
+ setEncodedUrl() now escapes '[' and ']' after the host in tolerant
+ mode.
+ Made handling of IP encoding more consistent.
+
+- QUtf16Codec
+ Fixed bug in covertFromUnicode() on big-endian machines.
+
+- QVariant
+ Fixed handling of variants of type "QList<QVariant>".
+
+- QWidget
+ Made sure that the application does not close if a widget with a
+ visible parent exists.
+ Fixed issue where scroll() would scroll child widgets in some cases.
+ Fixed painting issues when resizing very large child widgets.
+ Fixed a bug preventing setCursor() from working with platform-
+ dependent cursors.
+
+- QWorkspace
+ Ensured that the correct position is set when maximizing a child with
+ the NoBorder hint.
+ Fixed MDI title bar text wrapping in Plastique style.
+ Fixed some painting issues when resizing child windows.
+ Improved accuracy when resizing child windows.
+
+- QXml
+ Improved parsing of entities.
+
+Platform-Specific changes
+-------------------------
+
+Windows:
+
+- Ensured that the correct default font is used on Windows 2000 and later
+ versions. This also fixes issues with international characters on some
+ systems.
+
+- Improved painting of rubber bands in Windows XP and Windows style.
+
+- Calling showMaximixed() on a QDialog without minimize and maximize buttons
+ now behaves properly.
+
+- Improved calculation of bounding rectangles for text.
+
+- Fixed a bug making it possible to open multiple context menus using the
+ context menu key.
+
+- Fixed writing of large files which failed on some systems.
+
+- Optimized painting of ellipses.
+
+- Fixed problem with release version of IDC.
+
+- Fixed window state bug when restoring minimized and maximized windows.
+
+- Fixed painting error on Windows XP style tabs in right-to-left mode.
+
+- Fixed incorrect toolbar button spacing in Windows XP and Windows style.
+
+- Fixed bug that caused QFontInfo::family() to return an empty string.
+
+- Ensured that tool windows are now resizable by default.
+
+- Improved precision for tablet coordinates.
+
+- Improved probing and detection for OpenGL overlay mode.
+
+- Improved the native look and feel of QComboBox.
+
+- Improved appearance of QToolButtons with menus.
+
+- Fixed issue where certain fonts would be incorrectly replaced when
+ printing.
+
+- Fixed issue where minimized fixed-size dialogs would not respond to user
+ input.
+
+- Fixed issue preventing bitmap fonts from being drawn using a scaled
+ painter.
+
+- Made sure that QMAKE_PRE_LINK is respected by qmake on Windows.
+
+- Fixed a bug causing tab widget contents to move when resized in Windows XP
+ style.
+
+- Q3FileDialog
+ Fixed potential crash in Q3FileDialog when resolving shortcuts.
+
+- QPainter
+ Fixed an issue where drawText() on a QPrinter would sometimes be
+ clipped away.
+ Fixed the behavior of drawEllipse() and drawLine() when used with
+ negative coordinates.
+ Fixed painting in OpaqueMode.
+ Fixed a bug preventing rectangles with negative coordinates from
+ being painted correctly by the raster engine.
+
+- QAxBase
+ Fixed a bug preventing proper interaction with Excel.
+
+- QAxWidget
+ Fixed conversion of short* and char* output parameters.
+
+- QFile
+ Made sure that copy() returns false when the copy target already
+ exists.
+
+- QFileInfo
+ Fixed crash that occurred when calling exists() on a invalid
+ shortcut.
+ Fixed absolute and canonical paths for files in the root directory.
+
+- QGLWidget
+ Fixed a bug causing renderPixmap() to fail on 16-bit color depths.
+
+- QLibrary
+ Enabled loading of filenames with non-standard suffixes.
+
+- QLocale
+ Added support for 'z' in time format strings.
+
+- QPrinter
+ Fixed setPageSize() to correctly update the page and paper
+ rectangles.
+
+- QTextBrowser
+ Made sure that QTextBrowser does not override
+ QApplication::setOverrideCursor().
+
+- QWindowsStyle
+ Ensured that the platform specific icons provided by the system are
+ used when appropriate.
+
+
+X11:
+
+- Fixed a bug in QFontDatabase which made isFixedPitch() return true for
+ certain non-fixed-pitch fonts, like "Sans Serif".
+
+- Correctly handle the .so file extension on HP/UX IA-64.
+
+- Fixed a crash that could occur when clicking a mouse button while dragging.
+
+- Improve QProcess resource usage by making sure it closes all unused pipes.
+
+- Made QFontEngine honor the autohinter setting from FontConfig.
+
+- Fixed a potential crash that could occur when drawing a large number of
+ polygons/trapezoids.
+
+- QtConfig
+ Fixed missing update of window decorations.
+ Fixed assert when editing font family substitutions.
+
+- Fixed X Error that occurred when closing applications using the Motif
+ style.
+
+- Ensured that -style command line arguments are respected when using
+ customized visuals.
+
+- Fixed issues with multiple painters on the same device.
+
+- Improved backward compatibility for XCursors.
+
+- Fixed a bug causing text to be clipped incorrectly when printed.
+
+- Fixed issue where Qt::KeyPadModifier was not being set for non-numeric
+ keypad keys.
+
+- Ensured that files written by QSettings will only get user-readable
+ permissions by default.
+
+- Ensured that QContextMenuEvent is also delivered when a popup menu is
+ already open.
+
+- Added missing support for clipping of bitmaps on non-XRender systems.
+
+- Fixed platform inconsistency with cosmetic pens.
+
+- Fixed a potential crash when starting a QProcess for a non-existant
+ process.
+
+- QPainter
+ Improved stability of QPainter::setClipPath().
+ Fixed painting issues with transformed points drawn with an aliased
+ cosmetic pen.
+
+- QFontMetrics
+ Fixed a bug in boundingRect().
+ Fixed a potential crash in the constructor when it is passed a zero
+ paint device.
+
+
+Mac OS X:
+
+- Fixed issues with pasting of Japanese characters.
+
+- Fixed a bug that made the close button unavailable on modal windows.
+
+- Fixed icon rendering on x86 CPUs.
+
+- Fixed painting of QBitmap into a QPixmap.
+
+- Added the -framework and -F configure options.
+
+- Fixed a bug where the menu bar would not show all items.
+
+- Fixed several drag and drop issues.
+
+- Fixed a bug that caused the font size to change when clicking checkable
+ toolbar buttons.
+
+- Fixed a crash that occurred when using a Qt-plugin in a non-Qt application.
+
+- Fixed use of newlines in a QMessageBox.
+
+- Fixed painting of QGroupBox without any text.
+
+- Fixed rendering of Qt::FDiagPattern and Qt::BDiagPattern.
+
+- Fixed building with -no-qt3support.
+
+- Fixed painting of the sort indicator in item view headers.
+
+- Fixed text placement in QGroupBox.
+
+- Fixed icon placement in QPushButton when used with RTL scripts.
+
+- Fixed painting of read-only line edit widgets.
+
+- Fixed animation of the Composition Modes demo.
+
+- Fixed painting of QSpinBoxes smaller than 25 pixels.
+
+- Fixed a bug preventing the page ranges in the print dialog from being set.
+
+- Fixed a bug causing QPrinter::pageSize() to return incorrect sizes.
+
+- Fixed printer resolution setting.
+
+- Improved quality of PDF output.
+
+- Ensured that calling setDirtyRegion() from within dragMoveEvent() updates
+ item views correctly.
+
+- Fixed a bug resulting in painting and performance issues for embedded
+ QGLWidgets when using MacMetalStyle.
+
+- Fixed a bug that sometimes prevented widgets from being shown.
+
+- Ensured that the correct number of tick marks are painted on sliders.
+
+- Fixed issue where Qt::FramelessWindowHint widgets were not visible in
+ Expose.
+
+- Fixed a painting error that occurred when unchecking checkboxes.
+
+- Fixed a bug that caused file dialogs and frameless windows to appear
+ outside screen bounds.
+
+- Prevented windows from losing their shadows after using QRubberBand.
+
+- Fixed a potential crash in QPixmap::copy() when given an area outside image
+ bounds.
+
+- Improved QToolButton arrow appearance.
+
+- Fixed an issue causing QDateTime::toString(Qt::LocalDate) to return
+ incorrect dates.
+
+- Improved performance of QPainter::drawImage().
+
+- Fixed sometimes incorrect drawing with QPainterPath.
+
+- Improved key translation for non-Latin keyboard layouts.
+
+- QGLWidget
+ Fixed update issues when QGLWidgets are embedded in a QTabWidget.
+
+- QLibrary
+ isLibrary() now supports .dylib libraries with version numbers.
+
+- QWidget
+ Fixed a platform inconsistency with isActiveWindow().
+
+- Designer
+ Fixed some painting issues with widgets that are not laid out.
+ Allow dragging of widgets in Designer when the toolbox is hidden.
+ Fixed a bug preventing Designer from being hidden using
+ "Command + H".
+
+
+Qtopia Core:
+
+- Added configure options to build decorations and mouse drivers as plugins.
+
+- Lots of new documentation.
+
+- Added support for 8 and 16 bit screens.
+
+- Fixed a bug that could result in painting errors after setting a new
+ decoration with QApplication::qwsSetDocoration().
+
+- New skins for QVfb provided in the X11 package.
+
+- Fixed the transparent corners of the window decoration using the Plastique
+ style.
+
+- Removed dependency of shared memory when using QT_NO_QWS_MULTIPROCESS.
+
+- Fixed input method focus change problems.
+
+- Ensured that fonts are searched for using QLibraryInfo::LibrariesPath
+ instead of PrefixPath.
+
+- Ensured that the smooth font flag is respected when parsing the 'fontdir'
+ file.
+
+- Fixed crash on systems where Helvetica font is not available.
+
+- Reduced memory usage with large fonts.
+
+- Added support for QIODevice::canReadLine().
+
+- Ensured that the Qtopia Core data directory owner is checked against the
+ effective user.
+
+- Fixed appearance of the title bar font when the application font has not
+ been set.
+
+- Ensured that the correct keycodes are generated for SysRq and PrtSc.
+
+- Added support for transformed screens to QDirectPainter.
+
+- Fixed issues with -title and -geometry command line arguments.
+
+- Improved sound support.
diff --git a/dist/changes-4.1.4 b/dist/changes-4.1.4
new file mode 100644
index 0000000..426959e
--- /dev/null
+++ b/dist/changes-4.1.4
@@ -0,0 +1,125 @@
+Qt 4.1.4 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.1.0.
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Configure / Compilation
+ Compile with -no-qt3support on Windows.
+ Compile on Linux with icc 9.1.
+ Compile on tru64-g++.
+ Compile MySQL plugin with client libraries below MySQL 4.1.
+ Compile SQLite on Tru64 V5.1B with gcc 3.3.4.
+ Compile ODBC plugin on 64-bit Windows.
+ Disable fastcall calling convention on faulty gcc compilers.
+
+Demos / Examples
+ Fixed a crash in the Torrent example.
+ Container extension example: Fixed regression that caused Designer
+ to crash when previewing a MultiPageWidget and changing the page.
+
+Designer
+ Generate unique object names for splitters.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- Fixed crash in QGLWidget::makeCurrent() when called from a thread not
+ created with QThread.
+- Fixed a crash that occurred when writing a PNG image when Qt is built
+ statically.
+- Fixed Arabic shaping for some fonts.
+- Limited the character string to 255 characters when writing Type1 fonts to
+ a PostScript file, in accordance with the PostScript specification.
+- Fixed regression in painting of clipped, cosmetic lines with angles of
+ 0-45 degrees.
+- Documented the rules for starting and stopping timers in multithreaded
+ applications.
+
+- QCommonStyle
+ Added protection against null pointer in pixelMetric() for
+ PM_TabBarTabVSpace.
+
+- QDirModel
+ Fixed crash when dragging and dropping a file into a directory.
+
+- QHeaderView
+ Fixed painting errors when scrolling a header that has a large
+ number of sections.
+
+- QListView
+ Fixed assert when hiding all the rows.
+ Fixed crash when setting the model to a null pointer.
+
+- QMainWindow
+ Fixed possible crash when calling setCentralWidget() multiple
+ times.
+
+- QPainter
+ Fixed a regression in drawPoint() that caused painting errors
+ when setting the pen width to 0 (e.g. cosmetic pen) and then
+ setting a scale.
+
+- QPlastiqueStyle
+ Fixed a regression that caused flat push buttons to be painted
+ like normal push buttons.
+
+- QSortFilterProxyModel
+ Emit modelReset() signal when setting a source model.
+
+- QTextEdit
+ Ensure that the cursor is visible after dragging & dropping text
+
+- QTreeView
+ Fixed potential assert when asking for the coordinates of a
+ non-existing item.
+ Fixed a regression that caused selections to be painted
+ incorrectly when the last column was hidden.
+
+- QWidget
+ Fixed crash when deleting the widget in closeEvent().
+
+- QWorkspace
+ Fixed crash caused by setting the window title when windowWidget is
+ null.
+
+Platform-Specific changes
+-------------------------
+
+Windows:
+
+- Fixed a bug that caused application text to be absent in Qt applications
+ on Windows NT 4.0.
+- Fixed resource leak in non-accelerated GL contexts.
+
+
+X11:
+
+- Improved performance of clipped bitmaps on systems that don't use XRender.
+- Made QFont::setStretch() work when using FontConfig/FreeType fonts.
+- Documented scrolling of transparent/opaque widgets.
+
+
+QPaintEngine
+ Support OddEven fill rule.
+
+QPainter
+ Fixed a regression that caused drawImage() to ignore the width
+ and height of the source rectangle and draw the whole image without
+ any clipping.
+
+
+Qtopia Core:
+
+- Fixed crash due to incorrect assembly code in implementation of
+ q_atomic_swp() for ARM.
+- Set the Q_PACKED macro when using icc on ARM, so that the generated
+ code is binary compatible with gcc-generated code.
diff --git a/dist/changes-4.1.5 b/dist/changes-4.1.5
new file mode 100644
index 0000000..fefc91b
--- /dev/null
+++ b/dist/changes-4.1.5
@@ -0,0 +1,14 @@
+Qt 4.1.5 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.1.0.
+
+The Qt version 4.1 series is binary compatible with the 4.0.x series.
+Applications compiled for 4.0 will continue to run with 4.1.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- QImage
+ Fixed a potential security issue which could arise when transforming
+ images from untrusted sources.
+
diff --git a/dist/changes-4.2.0 b/dist/changes-4.2.0
new file mode 100644
index 0000000..f42da27
--- /dev/null
+++ b/dist/changes-4.2.0
@@ -0,0 +1,2506 @@
+Qt 4.2 introduces many new features as well as many improvements and
+bugfixes over the 4.1.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/
+
+The Qt version 4.2 series is binary compatible with the 4.1.x series.
+Applications compiled for 4.1 will continue to run with 4.2.
+
+The Qtopia Core version 4.2 series is binary compatible with the 4.1.x
+series except for some parts of the device handling API, as detailed
+in Platform Specific Changes below.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+
+New features
+------------
+
+- QCalendarWidget provides a standard monthly calendar widget with date
+ selection features.
+
+- QCleanlooksStyle provides the new Cleanlooks style, a clone of the GNOME
+ ClearLooks style, giving Qt applications a native look on GNOME desktops.
+
+- QCompleter provides facilities for auto completion in text entry widgets.
+
+- QDataWidgetMapper can be used to make widgets data-aware by mapping them
+ to sections of an item model.
+
+- QDesktopServices provides desktop integration features, such as support
+ for opening URLs using system services.
+
+- QDialogButtonBox is used in dialogs to ensure that buttons are placed
+ according to platform-specific style guidelines.
+
+- QFileSystemWatcher enables applications to monitor files and directories
+ for changes.
+
+- QFontComboBox provides a standard font selection widget for document
+ processing applications.
+
+- QGraphicsView and related classes provide the Graphics View framework, a
+ replacement for Qt 3's canvas module that provides an improved API, enhanced
+ rendering, and more responsive handling of large numbers of canvas items.
+
+- QGLFramebufferObject encapsulates OpenGL framebuffer objects.
+
+- QMacPasteboardMime handles Pasteboard access on Qt/Mac. This obsoletes
+ QMacMime as the underlying system has changed to support Apple's new
+ Pasteboard Manager. Any old QMacMime objects will not be used.
+
+- QNetworkInterface represents a network interface, providing information
+ about the host's IP addresses and network interfaces.
+
+- QResource provides static functions that control resource lookup and
+ provides a way to navigate resources directly without levels of
+ indirection through QFile/QFileEngine.
+
+- QSystemTrayIcon allows applications to provide their own icon in the
+ system tray.
+
+- QTimeLine gives developers access to a standard time line class with which
+ to create widget animations.
+
+- The QtDBus module provides inter-process communication on platforms
+ that support the D-BUS protocol.
+
+- The QUndo* classes in Qt's Undo framework provide undo/redo functionality
+ for applications.
+
+- Support for the Glib event loop to enable integration between Qt and non-Qt
+ applications on the GNOME desktop environment.
+
+- Improved Accessibility for item-based views and QTextEdit.
+
+- Support for main window animations and tabbed dock widgets.
+
+- Added an SVG icon engine to enable SVG drawings to be used by QIcon.
+
+- Widgets can now be styled according to rules specified in a style sheet,
+ using a syntax familiar to users of Cascading Style Sheets (CSS). Style
+ sheets are set using the QWidget::styleSheet property.
+
+- Introduced a new key mapper system which improves the shortcut system by
+ only testing the real possible shortcuts, such as Ctrl+Shift+= and Ctrl++
+ on an English keyboard.
+
+- Improved and enhanced QMessageBox to support native look and feel on many
+ common platforms.
+
+- Experimental support for Qt usage reporting ("metered licenses") on Linux,
+ Windows and Mac OS X. Reporting is disabled by default.
+
+- A screen magnification utility, pixeltool, is provided. It is designed to help
+ with the process of fine-tuning styles and user interface features.
+
+- New qrand() and qsrand() functions to provide thread safe equivalents to
+ rand() and srand().
+
+
+General improvements
+--------------------
+
+- Item views
+
+ * Selections are maintained when the layout of the model changes
+ (e.g., due to sorting).
+
+ * Convenience views can perform dynamic sorting of items when the data
+ in items changes.
+
+ * QStandardItem provides an item-based API for use with
+ QStandardItemModel and the model/view item view classes.
+
+ * QStandardItemModel API provides a classic item-based approach to
+ working with models.
+
+ * Single selection item views on Mac OS X cannot change their current
+ item without changing the current selection when using keyboard
+ navigation.
+
+- Plastique style has improved support for palettes, and now requires
+ XRender support on X11 for alpha transparency.
+
+- Tulip containers
+
+ * Added typedefs for STL compatability.
+
+ * Added function overloads to make the API easier to use.
+
+- Added the Q3TextStream class for compatiblity with Qt 3 and to assist with
+ porting projects.
+
+- OpenGL paint engine
+
+ * Added support for all composition modes of QPainter natively using
+ OpenGL.
+
+ * Fixed a case where very large polygons failed to render correctly.
+
+ * Ensured that glClear() is only called in begin() if the
+ QGLWidget::autoFillBackground() property is true.
+
+ * Ensured that a buffer swap is only performed in end() if
+ QGLWidget::autoBufferSwap() is true.
+
+ * Improved text drawing speed and quality.
+
+- Raster paint engine
+
+ * Fixed blending of 8 bit indexed images with alpha values.
+
+ * Fixed drawing onto QImages that were wider than 2048 pixels.
+
+ * Fixed alpha-blending and anti-aliasing on ARGB32 images.
+
+ * Improved point drawing performance.
+
+ * Fixed issue where lines were drawn between coordinates that were
+ rounded instead of truncated.
+
+ * Ensured that setClipRegion(QRegion()) clips away all painting
+ operations as originally intended.
+
+
+Third party components
+----------------------
+
+- Dropped support for MySQL version 3.
+
+- Updated Qt's SQLite version to 3.3.6.
+
+- Updated Qt's FreeType version to 2.2.1.
+
+- Updated Qt's libpng version to 1.2.10.
+
+
+Build System
+------------
+
+- Auto-detect PostgreSQL and MySQL using pg_config and mysql_config on UNIX
+ based systems in the configure script
+
+- Added "-system-sqlite" option to configure to use the system's SQLite
+ library instead of Qt's SQLite version.
+
+- Added QT_ASCII_CAST_WARNINGS define that will output a warning on implicit
+ ascii to Unicode conversion when set. Only works if the compiler supports
+ deprecated API warnings.
+
+- Added Q_REQUIRED_RESULT to some functions. This macro triggers a warning
+ if the result of a function is discarded. Currently only supported by gcc.
+
+
+- Qt/X11, Qt/Mac and Qtopia Core only:
+
+ * Added all QT_NO_* defines to the build key.
+
+
+- Qt/X11 and Qtopia Core only:
+
+ * As in Qt 3, the configure script enables the -release option by
+ default, causing the Qt libraries to be built with optimizations. If
+ configured with the -debug option, the debug builds no longer result
+ in libraries with the _debug suffix.
+
+ On modern systems, flags are added to the Qt build to also
+ generate debugging information, which is then stored in a
+ separate .debug file. The additional debug information does not
+ affect the performance of the optimized code and tools like gdb
+ and valgrind automatically pick up the separate .debug
+ files. This way it is possible to get useful backtraces even
+ with release builds of Qt.
+
+ * Removed the last vestiges of the module options in the configure
+ script, previously they were available but did not function.
+
+ * Implemented a -build option in the configure script to conditionally
+ compile only certain sections of Qt.
+
+ * Made it possible to build Qt while having "xcode" set as your
+ QMAKESPEC on OSX.
+
+
+- Windows only:
+
+ * Populated the build key, as done on all the other platforms.
+
+ * Fixed dependency generation in Visual Studio Solutions (.sln)
+ created by qmake.
+
+ * Added missing platforms to the Visual Studio project generator (X64,
+ SH3DSP and EBC).
+
+ * Made UIC3 use a temporary file for long command lines.
+
+ * Removed the object file (.o) conflicts with MinGW that appeared when
+ embedding a native resource file which was named the same as a normal
+ source file.
+
+ * Fixed mkspec detection when generating project files outside of QTDIR.
+
+ * Removed compiler warnings with MinGW g++ 3.4.5.
+
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+- QAbstractButton
+
+ * Returns QPalette::Button and QPalette::ButtonText for
+ backgroundRole() and foregroundRole(), respectively, rather than
+ QPalette::Background and QPalette::Foreground.
+
+ * Ensured that nextCheckState() is called only when there is a state
+ change.
+
+- QAbstractItemModel
+
+ * When dropping rows only insert rows that were actually dropped, not
+ the continuous row count from first to last.
+
+ * Added a supportedDragActions property to be used by
+ QAbstractItemView when starting a drag.
+
+ * When updating changed persistent indexes, ignore those that haven't
+ actually changed.
+
+ * Fixed endian issue with createIndex().
+
+ * Added FixedString matching for match().
+
+ * Changed the sorting algorithm to use a stable sort.
+
+ * Added persistentIndexList() function.
+
+- QAbstractItemView
+
+ * Added possibility to copy elements to clipboard on read-only views.
+
+ * Improved handling of QAbstractItemModel::supportedDropActions().
+
+ * Ensured that the current item is selected when using keyboard
+ search.
+
+ * Ensured that the view starts with a valid current index.
+
+ * Ensured that data is only committed in currentChanged() if the
+ editor is not persistent.
+
+ * Fixed crash that occurred when a modal dialogs was opened when
+ closing an editor.
+
+ * Added verticalScrollMode and horizontalScrollMode properties.
+
+ * Added setItemDelegateForRow() and setItemDelegateForColumn().
+
+ * Ensured that existing models are disconnected properly when
+ replaced.
+
+ * Ensured that the doubleClicked() signal is only emitted when the
+ left button has been double-clicked.
+
+ * Changed setSelection(...) to work when given a non-normalized
+ rectangle.
+
+ * Fixed regression for shift-selections in ExtendedSelection for
+ all views.
+
+ * Added dragDropMode property and implemented move support in all of
+ the views and models.
+
+ * For edit triggers SelectedClicked and DoubleClicked, only trigger
+ editing when the left button is clicked.
+
+ * Trigger SelectedClicked editing on mouse release, not mouse press.
+
+ * Suppressed the doubleClicked() signal in cases where the clicks
+ happened on two different items.
+
+ * Enabled keyboard search to be programmatically reset by calling
+ keyboardSearch() with an empty string as argument.
+
+ * Don't allow drops on items that don't have the Qt::ItemIsDropEnabled
+ flag set.
+
+ * Added modelAboutToBeReset() and layoutAboutToBeChanged() signals.
+
+ * Suppressed assertion in dropMimeData() for cases where mimeTypes()
+ returns an empty list.
+
+ * Ensured consistent behavior of drag and drop when rootIndex() is a
+ valid model index.
+
+ * Made it possible to check a checkbox with only a single click when
+ using the CurrentChanged edit trigger.
+
+ * Ensured that WhatsThis events are propagated when the relevant item
+ doesn't have a valid "What's This?" value.
+
+ * Added PositionAtCenter scrollHint.
+
+ * Added support to allow items to be checked and unchecked using the
+ keyboard.
+
+ * Added support for keypad navigation.
+
+- QAbstractProxyModel
+
+ * Added default implementations for data(), headerData() and flags()
+
+- QAbstractScrollArea
+
+ * Added ability to set a corner widget.
+
+ * Added ability to set scroll bar widgets.
+
+ * Added support for custom scroll bars.
+
+- QAbstractSpinBox
+
+ * Added a hasAcceptableInput() property.
+
+ * Ensured that fixup/validate are called for third party subclasses of
+ QAbstractSpinBox as well.
+
+ * Fixed geometry issues when toggling frames on and off for spinboxes.
+
+ * Added a property for correctionMode.
+
+ * Added a property for acceleration.
+
+- QAbstractPrintDialog
+
+ * Fixed handling of existing printer options so that storage of page
+ ranges using setFromTo() works as expected when printing in PDF format.
+
+- QAction
+
+ * Added the setAutoRepeat(bool) function to disable auto-repeating
+ actions on keyboard shortcuts.
+
+- QApplication
+
+ * Added saveStateRequest() and commitDataRequest() signals so that
+ QApplication does not need to be subclassed to enable session
+ management in an application.
+
+ * Added the styleSheet property to get/set the application style sheet.
+
+ * Support sending key events to non-widget objects.
+
+ * Ensured that argc and argv as passed to the QApplication constructor
+ will always be zero-terminated on all platforms after QApplication
+ consumes command line options for itself.
+
+- QBrush
+
+ * Added a constructor that accepts a QImage.
+
+- QButtonGroup
+
+ * Added pressed() and released() signals.
+
+ * Fixed a bug caused by removing buttons from button groups. Removed the
+ internal mapping as well.
+
+ * Ensured that checkedButton() returns the correct value with
+ non-exclusive groups.
+
+- QClipboard
+
+ * Added support for find text buffer.
+
+- QColor
+
+ * Fixed corruption in setRed(), setGreen() and setBlue() for HSV/CMYK
+ colors.
+
+- QComboBox
+
+ * Fixed drawing issues related to certain FocusPolicy values.
+
+ * Ensured that the ItemFlags of an Item (ItemIsEnabled,...) are
+ respected.
+
+ * Fixed cases where the popup could be shown completly on screen, but
+ weren't.
+
+ * Added the InsertAlphabetically insert policy.
+
+ * Fixed case where a QPixmap could not be displayed using a QIcon.
+
+ * Fixed the type of the modelColumn property from bool to int.
+
+ * Updated documentation to clarify the differences between activated(),
+ highlighted() and currentIndexChanged(), and describe what they
+ actually mean.
+
+ * Updated the behavior to ensure that, if the combobox isn't editable,
+ the Qt::DisplayRole rather than the Qt::EditRole is used to query the
+ model.
+
+- QCoreApplication
+
+ * Added flags to enable/disable application-wide features such as
+ delayed widget creation.
+
+- QCursor
+
+ * Added support for the newly added Qt::OpenHandCursor and
+ Qt::ClosedHandCursor enum values.
+
+- QDate
+
+ * Support dates all the way down to Julian Day 1 (2 January 4713 B.C.)
+ using the Julian calendar when appropriate.
+
+- QDateTime
+
+ * Fixed parsing issue in fromString(const QString &, Qt::DateFormat).
+
+- QDateTimeEdit
+
+ * Added the calendarPopup property to enable date selection using the
+ new QCalendarWidget class.
+
+ * Added a setSelectedSection() function to allow the currently selected
+ section to be programmatically set.
+
+- QDesktopWidget
+
+ * Remove a potential out-of-bounds read.
+
+- QDialog
+
+ * Improved stability in cases where the default button is deleted.
+
+- QDir
+
+ * Improved support for i18n file paths in QDir::tempPath().
+
+ * Improved support for UNC paths when the application is run from a
+ share.
+
+ * Ensured that mkpath() properly supports UNC paths.
+
+ * Obsoleted QDir::convertSeparators().
+
+ * Introduced QDir::toNativeSeparators() and QDir::fromNativeSeparators().
+
+ * Added a QDebug streaming operator.
+
+- QDirModel
+
+ * Fixed conversion from bytes to larger units in QDirModel in the file
+ size display.
+
+ * Remove hardcoded filtering of the '.' and '..' entries.
+
+- QErrorMessage
+
+ * Made qtHandler() work in cases where the message handler is invoked
+ from threads other than the GUI thread.
+
+- QEvent
+
+ * Added the KeyboardLayoutChange event type which is sent when the
+ keyboard layout changes.
+
+- QFile
+
+ * Improved support for UNC paths when the application is run from a
+ share.
+
+ * Added support for physical drives (e.g., "//./Physical01").
+
+ * Ensured that QFile::error() and QIODevice::errorString() are set
+ whenever possible when errors occur.
+
+ * Renamed readLink() to symLinkTarget().
+
+- QFileDialog
+
+ * Fixed a case where view mode got disabled.
+
+- QFileInfo
+
+ * Improved support for UNC paths when the application is run from a
+ share.
+
+ * Improved support for drive-local relative paths, such as "D:".
+
+ * Renamed readLink() to symLinkTarget().
+
+- QFlags
+
+ * Added the testFlag() convenience function.
+
+- QFont
+
+ * Added NoFontMerging as a flag to QFont::StyleStrategy.
+
+- QFontDatabase
+
+ * Added functions for handling application-local fonts at run-time:
+ addApplicationFont(), removeApplicationFont(),
+ applicationFontFamilies(), etc.
+
+- QFontDialog
+
+ * Enabled support for custom window titles.
+
+- QFontMetrics/QFontMetricsF
+
+ * Added the elidedText() function.
+
+ * Added the averageCharWidth() function.
+
+- QFrame
+
+ * Fixed a rendering issue when showing horizontal and vertical lines
+ created using Designer.
+
+- QFtp
+
+ * Improved parsing of the modified date in list().
+
+ * Ensured that all data has been received when downloading, before the
+ data connection is closed.
+
+ * Added support for FTP servers that reject commands with a 202 response.
+
+- QGLFormat
+
+ * Added the openGLVersionFlags() function.
+
+ * Added support for setting the swap interval for a context
+ (i.e., syncing to the vertical retrace).
+
+ * Added support for setting red, green and blue buffer sizes.
+
+- QGLWidget
+
+ * Fixed a resource leak that could occur when binding QImages with the
+ bindTexture() function.
+
+ * Fixed renderText() to produce proper output when depth buffering is
+ enabled.
+
+ * Fixed bindTexture() to respect premultiplied QImage formats.
+
+ * Ensured that the updatesEnabled property is respected.
+
+- QGradient
+
+ * Added default constructors and setter functions for all gradients and
+ their attributes.
+
+- QGridLayout
+
+ * Do not segfault if cellRect() is called before setGeometry(),
+ even though the result is documented to be undefined.
+
+ * Fixed maximum size handling when adding spacing.
+
+- QGroupBox
+
+ * Activating a group box by a shortcut will now show the focus rectangle.
+
+ * Added the clicked() signal
+
+- QHash
+
+ * Prevent conversion of iterator or const_iterator to bool
+ (e.g., if (map->find(value))) because the conversion always returned
+ true. Qt 4.1 code that doesn't compile because of this change was most
+ probably buggy.
+
+ * Added the uniqueKeys() function.
+
+- QHeaderView
+
+ * Use the current resize mode to determine section sizes when
+ new rows are inserted.
+
+ * Recover the internal state if other widgets steal the mouse release
+ event.
+
+ * Ensure that moved sections can be removed without asserting.
+
+ * Be more robust with regards to arguments sent to the rowsInserted slot.
+
+ * Let the stretchLastSection property override the globalResizeMode in
+ the resizeSections() function.
+
+ * Renamed ResizeMode::Custom to ResizeMode::Fixed.
+
+ * Added the swapSections() convenience function.
+
+ * Added a more "splitter-like" resize mode.
+
+ * Added the possibility for the user to turn off stretch mode by
+ resizing the header section. This includes the stretchLastSection
+ property.
+
+ * Added the minimumSectionSize property.
+
+ * Get the section size hint from the Qt::SizeHintRole, if set.
+
+ * Added the ResizeToContents resize mode.
+
+ * Ensure that all header contents are centered by default.
+
+ * Improved the internal structure to be more memory efficient.
+
+- QHostAddress
+
+ * Added QDataStream streaming operators.
+
+- QHttp
+
+ * Support percent-encoded paths when used with a proxy server.
+
+ * Improved handling of unexpected remote socket close.
+
+- QHttpHeader
+
+ * Improved support for case-insensitive header searching.
+
+- QIcon
+
+ * Fixed issue where actualSize() might return a larger value than the
+ requested size.
+
+ * Fixed improper pixmap caching
+
+ * Added QDataStream operators for QIcon.
+
+ * Added the Selected mode.
+
+- QImage
+
+ * Added support for 16 bit RGB format.
+
+ * Added QPoint overloads to various (int x, int y) functions.
+
+ * Added support for faster/better rotation of images by 90/180/270
+ degrees.
+
+ * convertToFormat() now supports the color lookup table.
+
+ * Improved algorithm for smooth scaling to produce better results.
+
+- QImageReader
+
+ * Ensured that size() returns an invalid QSize if the image I/O handler
+ does not support the QImageIOHandler::Size extension.
+
+ * Added support for reading negative BMP images.
+
+ * Improved handling of invalid devices.
+
+ * Added optimizations to ensure that the most likely formats and plugins
+ are tested first when reading unknown image formats.
+
+ * Improved reading of BMP images from sequential QIODevices.
+
+ * Support for scaledSize() with JPEG images.
+
+ * It is now possible to query the supported options of an image by
+ calling supportedOptions().
+
+ * Stability fixes for the built-in XBM reader.
+
+- QImageWriter
+
+ * Ensured that an error is reported when attempting to write an image
+ to a non-writable device.
+
+ * It is now possible to query the supported options of an image by
+ calling supportedOptions().
+
+- QIODevice
+
+ * Fixed a casting bug in QIODevice::getChar().
+
+ * Improved reading performance significantly by using an internal buffer
+ when a device is opened in buffered mode.
+
+ * Some behavioral differences have been introduced:
+
+ + The following functions now need to call the base implementation
+ when reimplemented: atEnd(), bytesAvailable(), size(), canReadLine().
+
+ + pos() should return the base implementation directly.
+
+ + QIODevice now handles the device position internally. seek() should
+ always end up calling the base implementation.
+
+- QItemDelegate
+
+ * Use a widget's USER property to set and get the editor data.
+
+ * Removed unnecessary assertions.
+
+ * Added the clipping property to enable clipping when painting.
+
+ * When the model specifies a font, resolve the font over the existing
+ one rather than replacing it.
+
+ * Fixed issue with rendering of selected pixmaps.
+
+ * Ensured that QItemEditorFactory is called with the variant's
+ userType() so that the factory can distinguish between multiple user
+ types.
+
+ * Ensured that Key_Enter is propagated to the editor before data is
+ committed, so that the editor has a chance to perform custom input
+ validation/fixup.
+
+ * Let the line edit grow to accomodate long strings.
+
+ * Made it easer to subclass the item delegate.
+
+ * Added support for keypad navigation.
+
+- QItemSelectionModel
+
+ * Improved overall speed, particularly when isSelected() is used.
+
+ * Added functions for getting the selected rows or columns.
+
+ * Ensured that the current index is updated when it is being removed.
+
+ * Ensure that QAbstractItemView::clearSelection() only clears the
+ selection and not the current index.
+
+ * Added the hasSelection() function.
+
+ * Fixed some connection leaks (connections were not disconnected) when
+ an QItemSelectionModel was deleted. This should also speed up some
+ special cases.
+
+- QKeySequence
+
+ * Added a set of platform-dependent standard shortcuts.
+
+ * Fixed incorrect parsing of translated modifiers.
+
+- QLabel
+
+ * Added support for text selection and hyperlinks.
+
+ * Improved handling of scaled pixmaps.
+
+ * Made handling of QMovie safer to avoid object ownership issues.
+
+- QLibrary
+
+ * Added support for hints to control how libraries are opened on UNIX
+ systems.
+
+ * Added errorString() to report the causes of errors when libraries
+ fail to load.
+
+ * Added easier way to debug plugin loading: Setting QT_DEBUG_PLUGINS=1
+ in the environment will enable debug message printing on the
+ console.
+
+ * Increased the number of acceptable file name suffixes used to
+ recognize library files.
+
+- QLineEdit
+
+ * Ensured that the Unicode context menu gets shown if language
+ extensions are present.
+
+ * Ensured that editingFinished() is not emitted if a validator is set
+ and the text cannot be validated.
+
+ * Ctrl+A now triggers select all on all platforms.
+
+ * Call fixup on focusOut() if !hasAcceptableInput().
+
+ * Added auto-completion support with the setCompleter() function.
+
+ * Fixed painting errors when contents margins were set.
+
+ * Invalid text set using setText() can now be edited where previously
+ it had to be deleted before new text could be inserted.
+
+ * Use SE_LineEditContents to control the contents rect of each
+ QLineEdit.
+
+- QListView
+
+ * Added the batchSize property.
+
+ * Don't un-hide currently hidden rows when new rows are inserted.
+
+ * Fixed partial repainting bug that occurred when alternatingRowColors
+ was enabled.
+
+ * Ensured that the resize mode is not reset in setViewMode() if it was
+ already set.
+
+ * Fixed crash that occurred when the first item was hidden and
+ uniformItemSizes was set.
+
+ * Added the wordWrap property for wrapping item text.
+
+ * Allow the user to select items consecutively when shift-selecting.
+
+ * Ensured that only the top item is selected when the user clicks on
+ an area with several items are stacked on top of each other.
+
+ * Optimized hiding and showing of items.
+
+ * Fixed issue where dragging an item in Snap mode did not respect the
+ scroll bar offsets.
+
+ * Fixed issue in Snap mode where a (drag and) drop did not always
+ query the item that existed in the corresponding cell for an enabled
+ Qt::ItemIsDropEnabled flag.
+
+- QListWidget/QTreeWidget/QTableWidget
+
+ * Ensured the dataChanged() signal is emitted when flags are set on an
+ item.
+
+ * Removed unnecessary assertions.
+
+ * Added more convenience functions in QListWidget, QTableWidget and
+ QTreeWidget for selecting, hiding, showing, expanding and collapsing
+ nodes.
+
+ * Ensured that changes to items are reported.
+
+- QLocale
+
+ * Fixed bug in the string-to-number functions which sometimes caused
+ them to fail on negative numbers which contained thousand-
+ separators.
+
+ * Implemented the numberOptions property for specifying how
+ string-to-number and number-to-string conversions should be
+ performed.
+
+- QMainWindow
+
+ * Added support for tabbed dock widgets.
+
+ * Enhanced look and feel of dock widget handling. When a dock widget
+ hovers over a main window, the main window animates the existing
+ dock widgets and main area to show how it will accept the dock
+ widget if dropped.
+
+ * Fixed issues related to insertToolBarBreak().
+
+- QMap
+
+ * Prevent conversion of iterator or const_iterator to bool
+ (e.g., if (map->find(value))), because the conversion always
+ returned true. Qt 4.1 code that doesn't compile because of this
+ change was most probably buggy.
+
+ * Added the uniqueKeys() function.
+
+- QMenu
+
+ * Added the aboutToHide() signal.
+
+ * Added the isEmpty() accessor function.
+
+ * Clear menuAction() when setMenu(0)
+
+ * Added support for widgets in menus via QWidgetAction.
+
+ * Collapse multiple consecutive separators. This can be turned off
+ with the collapsibleSeparators property.
+
+ * Made scrollable menus wrap, just like non-scrollable ones.
+
+- QMessageBox
+
+ * Updated the API to allow more than 3 buttons to be used.
+
+ * Added support to display buttons in the order required by
+ platform-specific style guidelines.
+
+ * Added support for display of informative text using the
+ informativeText property.
+
+ * Added the detailedText property to allow detailed text to be
+ displayed.
+
+ * Improved sizing of message box (especially on Mac OS X).
+
+ * Changed the behavior so that long text strings are automatically
+ wrapped.
+
+ * Updated icon handling to use QStyle::standardIcon() where possible.
+
+- QMetaObject
+
+ * Added the userProperty() and normalizedType() functions.
+
+- QMetaType
+
+ * Ensured that all type names are normalized before registering them.
+
+ * Added support for handling Qt's integer typedefs: qint8, qint16,
+ etc.
+
+- QModelIndex
+
+ * Added the flags() convenience function.
+
+- QMutexLocker, QReadLocker, and QWriteLocker
+
+ * These classes now track the state of the lock they are holding.
+ They will not unlock on destruction if unlock() has been called.
+
+- QObject
+
+ * thread() will always return a valid thread, even if the object was
+ created before QApplication or in a non-QThread thread.
+
+ * When thread() returns zero, events are no longer sent to the object.
+ (Previous versions of Qt would send posted events to objects with no
+ thread; this does not happen in Qt 4.2).
+
+ * Added support for dynamically added properties via the new
+ property(), setProperty(), and dynamicPropertyNames() functions.
+
+ * Fixed a crash that could occur when a child deleted its sibling.
+
+- QPainter
+
+ * Fixed a crash the occurred when drawing cosmetic lines outside the
+ paint device boundaries.
+
+ * Fixed a pixel artifact issue that occurred when drawing cosmetic
+ diagonal lines.
+
+ * Fixed opaque backgrounds so that they are identical on all
+ platforms.
+
+ * Optimized drawing of cosmetic lines at angles between 315 and 360
+ degrees.
+
+ * Added the setRenderHints() function.
+
+ * Fixed a memory corruption issue in drawEllipse().
+
+- QPixmap
+
+ * Fixed crash caused by setting a mask or alpha channel on a pixmap
+ while it was being painted.
+
+ * Changed load() and save() to no longer require a format string.
+
+ * Ensured that grabWidget() works before the specified widget is first
+ shown.
+
+- QPluginLoader
+
+ * Added errorString() to report the causes of errors when plugins fail
+ to load.
+
+- QPrinter
+
+ * Added support for PostScript as an output format on all platforms.
+
+ * Significantly reduced the size of the generated output when using
+ the PostScript and PDF drivers.
+
+ * Fixed issue where fromPage()/toPage() returned incorrect values when
+ generating PDF files.
+
+ * Ensured that setOutputFormat() preserves previously set printer
+ properties.
+
+ * Updated setOutputFileName() to automatically choose PostScript or
+ PDF as the output format for .ps or .pdf suffixes.
+
+- QProcess
+
+ * Added support for channel redirection to allow data to be redirected
+ to files or between processes.
+
+- QPushButton
+
+ * Ensured that, when a menu is added to a push button, its action is
+ also added to enable keyboard shortcuts.
+
+- QRect, QRectF, QRegion
+
+ * Renamed unite(), intersect(), subtract(), and eor() to united(),
+ intersected(), subtracted(), and xored() respectively.
+
+ * Added QRegion::intersects(QRegion) and QRegion::intersects(QRect).
+
+ * Fixed case where rect1 & rect2 & rect3 would return a non-empty
+ result for disjoint rectangles.
+
+- QRegExp
+
+ * Added RegExp2 syntax, providing greedy quantifiers (+, *, etc.).
+
+ * Marks (QChar::isMark()) are now treated as word characters,
+ affecting the behavior of '\b', '\w', and '\W' for languages
+ that use diacritic marks (e.g., Arabic).
+
+ * Fix reentrancy issue with the regexp cache.
+
+- QScrollArea
+
+ * Added the ensureWidgetVisible() function to facilitate scrolling to
+ specific child widgets in a scroll area.
+
+- QScrollBar
+
+ * Ensured that a SliderMove action is triggered when the slider value is
+ changed through a wheel event.
+
+- QSet
+
+ * Added QSet::iterator and QMutableSetIterator.
+
+- QSettings
+
+ * Store key sequences as readable entries in INI files.
+
+ * Detect NFS to prevent hanging when lockd isn't running.
+
+- QShortcut
+
+ * Added the setAutoRepeat(bool) function to disable auto-repeating
+ actions on keyboard shortcuts.
+
+- QSize
+
+ * Fixed potential overflow issue in scale().
+
+- QSlider
+
+ * Added support for jump-to-here positioning.
+
+- QSortFilterProxyModel
+
+ * Handle source model changes (e.g., data changes, item insertion
+ and removal) in a fine-grained manner, so that the proxy model
+ behaves more like a "real" model.
+
+ * Added sortRole, filterRole and dynamicSortFilter properties.
+
+ * Perform stable sorting of items.
+
+ * Fixed support for drag and drop operations where one item is dropped
+ on top of another.
+
+ * Ensure that persistent indexes are updated when the layout of the
+ source model changes.
+
+ * Made match() respect the current sorting and filtering settings.
+
+ * Forward mimeTypes() and supportedDropActions() calls to source
+ models.
+
+ * Added the ability to filter on all the columns.
+
+ * Added the filterChanged() function to enable custom filtering to be
+ implemented.
+
+- QSqlQuery
+
+ * Added execBatch() for executing SQL commands in a batch. Currently
+ only implemented for the Oracle driver.
+
+ * Fixed a case where executedQuery() would not return the executed
+ query.
+
+- QSqlRelationalTableModel
+
+ * Fixed issue related to sorting a relational column when using the
+ PostgreSQL driver.
+
+ * revertAll() now correctly reverts relational columns.
+
+- QStackedLayout
+
+ * Fixed crash that occurred when removing widgets under certain
+ conditions.
+
+- QStackedWidget
+
+ * Fixed crash that occurred when removing widgets under certain
+ conditions.
+
+ * Fixed issue where the size hint of the current widget would not be
+ respected.
+
+- QStandardItemModel
+
+ * Added an item-based API for use with QStandardItem.
+
+ * Reimplemented sort().
+
+ * Added the sortRole property.
+
+- QStatusBar
+
+ * Added the insertWidget() and insertPermanentWidget() functions.
+
+- QString
+
+ * Added support for case-insensitive comparison in compare().
+
+ * Added toUcs4() and fromUcs4() functions.
+
+- QStyle
+
+ * Added the following style hint selectors:
+ SH_Slider_AbsoluteSetButtons, SH_Slider_PageSetButtons,
+ SH_Menu_KeyboardSearch, SH_TabBar_ElideMode, SH_DialogButtonLayout,
+ SH_ComboBox_PopupFrameStyle, SH_MessageBox_TextInteractionFlags,
+ SH_DialogButtonBox_ButtonsHaveIcons, SH_SpellCheckUnderlineStyle,
+ SH_MessageBox_CenterButtons, SH_Menu_SelectionWrap,
+ SH_ItemView_MovementWithoutUpdatingSelection.
+
+ * Added the following standard pixmap selectors:
+ SP_DirIcon, SP_DialogOkButton, SP_DialogCancelButton,
+ SP_DialogHelpButton, SP_DialogOpenButton, SP_DialogSaveButton,
+ SP_DialogCloseButton, SP_DialogApplyButton, SP_DialogResetButton,
+ SP_DialogDiscardButton, SP_DialogYesButton, SP_DialogNoButton,
+ SP_ArrowUp, SP_ArrowDown, SP_ArrowLeft, SP_ArrowRight, SP_ArrowBack,
+ SP_ArrowForward.
+
+ * Added PE_PanelScrollAreaCorner and PE_Widget as primitive element
+ selectors.
+
+ * Added PM_MessageBoxIconSize and PM_ButtonIconSize as pixel metric
+ selectors.
+
+ * Added SE_LineEditContents and SE_FrameContents as sub-element
+ selectors.
+
+ * Added SE_FrameContents to control the contents rectangle of a
+ QFrame.
+
+- QSvgHandler
+
+ * Improved style sheet parsing and handling.
+
+ * Added support for both embedded and external style sheets.
+
+ * Improved parsing of local url() references.
+
+ * Improved coordinate system handling.
+
+ * Fixed issue where the viewbox dimensions would be truncated to integer
+ values.
+
+ * Fixed support for gradient transformations.
+
+ * Fixed opacity inheritance behavior.
+
+ * Added support for gradient spreads.
+
+ * Fixed gradient stop inheritance behavior.
+
+ * Fixed parsing of fill and stroke properties specified in style sheets.
+
+ * Added support for reading and writing the duration of animated SVGs.
+
+ * Fixed incorrect rendering of SVGs that do not specify default viewboxes.
+
+ * Fixed radial gradient rendering for the case where no focal point is
+ specified.
+
+- QSyntaxHighlighter
+
+ * Added various performance improvements.
+
+- Qt namespace
+
+ * Added ForegroundRole and BackgroundRole, allowing itemviews to use
+ any QBrush (not just QColor, as previously) when rendering items.
+
+ * Added NoDockWidgetArea to the ToolBarArea enum.
+
+ * Added NoToolBarArea to the DockWidgetArea enum.
+
+ * Added GroupSwitchModifier to the KeyboardModifiers enum. It
+ represents special keys, such as the "AltGr" key found on many
+ keyboards.
+
+ * Added several missing keys to the Key enum: Key_Cancel, Key_Printer,
+ Key_Execute, Key_Sleep, Key_Play and Key_Zoom.
+
+ * Added OpenHandCursor and ClosedHandCursor for use with QCursor.
+
+- QTabBar
+
+ * QTabBar text can now be elided; this is controlled by the elideMode
+ property.
+
+ * You can now turn on or off the "scroll buttons" for the tab bar with
+ the usesScrollButtons property.
+
+ * Non-pixmap based styles will now fill the background of the tab with
+ the palette's window role.
+
+- QTabletEvent:
+
+ * Ensured that QTabletEvents are dispatched with the proper relative
+ coordinates.
+
+ * Added proximity as another type of a tablet event (currently only sent
+ to QApplication).
+
+- QTableView
+
+ * Added API for spanning cells.
+
+ * Ensured that cells are selected when the user right clicks on them.
+
+ * Added a corner widget.
+
+ * Added the setSortingEnabled property.
+
+- QTableWidget
+
+ * Added the clearContents() function to enable the contents of the view
+ to be cleared while not resetting the headers.
+
+ * QTableWidget now uses stable sorting.
+
+ * Allow sorting of non-numerical data.
+
+ * Add convenience table item constructor that takes an icon as well as
+ a string.
+
+- QTabWidget
+
+ * Added missing selected() Qt3Support signal.
+
+ * Clarified documentation for setCornerWidget().
+
+ * Ensured that the tab widget's frame is drawn correctly when the tab
+ bar is hidden.
+
+ * Ensured that the internal widgets have object names.
+
+ * Added iconSize, elideMode, and usesScrollButtons as properties (see
+ QTabBar).
+
+- QTcpSocket
+
+ * Fixed a rare data corruption problem occurring on heavily loaded
+ Windows servers.
+
+- QTemporaryFile
+
+ * Added support for file extensions and other suffixes.
+
+ * Fixed one constructor which could corrupt the temporary file path.
+
+- QTextBrowser
+
+ * Fixed various bugs with the handling of relative URLs and custom
+ protocols.
+
+ * Added isBackwardAvailable(), isForwardAvailable(), and
+ clearHistory() functions.
+
+- QTextCodec
+
+ * Allow locale-dependent features of Qt, such as QFile::exists(), to
+ be accessed during global destruction.
+
+- QTextCursor
+
+ * Added columnNumber(), blockNumber(), and insertHtml() convenience
+ functions.
+
+- QTextDocument
+
+ * Added convenience properties and functions: textWidth, idealWidth(),
+ size, adjustSize(), drawContents(), blockCount, maximumBlockCount.
+
+ * Added support for forced page breaks before/after paragraphs and
+ tables.
+
+ * Added CSS support to the HTML importer, including support for
+ CSS selectors.
+
+ * Added defaultStyleSheet property that is applied automatically for
+ every HTML import.
+
+ * Improved performance when importing HTML, especially with tables.
+
+ * Improved pagination of tables across page boundaries.
+
+- QTextEdit
+
+ * Fixed append() to use the current character format.
+
+ * Changed mergeCurrentCharFormat() to behave in the same way as
+ QTextCursor::mergeCharFormat, without applying the format to the
+ word under the cursor.
+
+ * QTextEdit now ensures that the cursor is visible the first time the
+ widget is shown or when replacing the contents entirely with
+ setPlainText() or setHtml().
+
+ * Fixed issue where the setPlainText() discarded the current character
+ format after the new text had been added to the document.
+
+ * Re-added setText() as non-compatibility function with well-defined
+ heuristics.
+
+ * Added a moveCursor() convenience function.
+
+ * Changed the default margin from 4 to 2 pixels for consistency with
+ QLineEdit.
+
+ * Added support for extra selections.
+
+- QTextFormat
+
+ * Fixed the default value for QTextBlockFormat::alignment() to return
+ a logical left alignment instead of an invalid alignment.
+
+ * Added UnderlineStyle formatting, including SpellCheckUnderline.
+
+- QTextStream
+
+ * Added the pos() function, which returns the current byte-position
+ of the stream.
+
+- QTextTableCell
+
+ * Added the setFormat() function to enable the cell's character format
+ to be changed.
+
+- QThread
+
+ * Related to changes to QObject, currentThread() always returns a
+ valid pointer. (Previous versions of Qt would return zero if called
+ from non-QThread threads; this does not happen in Qt 4.2).
+
+- QToolBar
+
+ * Introduced various fixes to better support tool buttons, button
+ groups and comboboxes in the toolbar extension menu.
+
+ * Fixed crash that occurred when QApplication::setStyle() was called
+ twice.
+
+- QToolButton
+
+ * Fixed an alignment bug for tool buttons with multi-line labels and
+ TextUnderIcon style.
+
+- QToolTip
+
+ * Added the hideText() convenience function.
+
+ * Added the showText() function that takes a QRect argument specifying
+ the valid area for the tooltip. (If you move the cursor outside this
+ area the tooltip will hide.)
+
+ * Added a widget attribute to show tooltips for inactive windows.
+
+- QTranslator
+
+ * Added support for plural forms through a new QObject::tr() overload.
+
+ * Ensured that a LanguageChange event is not generated if the
+ translator fails to load.
+
+ * Fixed a bug in isEmpty().
+
+ * Added Q_DECLARE_TR_FUNCTIONS() as a means for declaring tr()
+ functions in non-QObject classes.
+
+- QTreeView
+
+ * Ensured that no action is taken when the root index passed to
+ setRootIndex() is the same as the current root index.
+
+ * When hiding items the view no longer performs a complete re-layout.
+
+ * Fixed possible segfault in isRowHidden().
+
+ * Significantly speed up isRowHidden() for the common case.
+
+ * Improved row painting performance.
+
+ * After expanding, fetchMore() is called on the expanded index giving
+ the model a way to dynamically populate the children.
+
+ * Fixed issue where an item could expand when all children were
+ hidden.
+
+ * Added support for horizontal scrolling using the left/right arrow
+ keys.
+
+ * Added a property to enable the focus rectangle in a tree view to be
+ shown over all columns.
+
+ * Added more key bindings for expanding and collapsing the nodes.
+
+ * Added the expandAll() and collapseAll() slots.
+
+ * Added animations for expanding and collapsing branches.
+
+ * Take all rows into account when computing the size hint for a
+ column.
+
+ * Added the setSortingEnabled property.
+
+ * Fixed the behavior of the scrollbars so that they no longer
+ disappear after removing and re-inserting items while the view is
+ hidden.
+
+ * Fixed memory corruption that could occur when inserting and removing
+ rows.
+
+ * Don't draw branches for hidden rows.
+
+- QTreeWidget
+
+ * Added the const indexOfTopLevelItem() function.
+
+ * Improved item insertion speed.
+
+ * Fixed crash caused by calling QTreeWidgetItem::setData() with a
+ negative number.
+
+ * QTreeWidget now uses stable sorting.
+
+ * Made construction of single column items a bit more convenient.
+
+ * Added the invisibleRootItem() function.
+
+ * Made addTopLevelItems() add items in correct (not reverse) order.
+
+ * Ensured that the header is repainted immediately when the header
+ data changes.
+
+- QUiLoader
+
+ * Exposed workingDirectory() and setWorkingDirectory() from
+ QAbstractFormBuilder to assist with run-time form loading.
+
+- QUrl
+
+ * Added errorString() to improve error reporting.
+
+ * Added hasQuery() and hasFragment() functions.
+
+ * Correctly parse '+' when calling queryItems().
+
+ * Correctly parse the authority when calling setAuthority().
+
+ * Added missing implementation of StripTrailingSlash in toEncoded().
+
+- QVariant
+
+ * Added support for all QMetaType types.
+
+ * Added support for QMatrix as a known meta-type.
+
+ * Added support for conversions from QBrush to QColor and QPixmap,
+ and from QColor and QPixmap to QBrush.
+
+ * Added support for conversions between QSize and QSizeF, between
+ QLine and QLineF, from long long to char, and from unsigned long
+ long to char.
+
+ * Added support for conversions from QPointF to QPoint and from QRectF
+ to QRect.
+
+ * Fixed issue where QVariant(Qt::blue) would not create a variant of
+ type QVariant::Color.
+
+ * Added support for conversions from int, unsigned int, long long,
+ unsigned long long, and double to QByteArray.
+
+- QWhatsThis
+
+ * Improved look and feel.
+
+- QWidget
+
+ * Delayed creation: Window system resources are no longer allocated in
+ the QWidget constructor, but later on demand.
+
+ * Added a styleSheet property to set/read the widget style sheet.
+
+ * Added saveGeometry() and restoreGeometry() convenience functions for
+ saving and restoring a window's geometry.
+
+ * Fixed memory leak for Qt::WA_PaintOnScreen widgets with null paint
+ engines.
+
+ * Ensured that widget styles propagate to child widgets.
+
+ * Reduced flicker when adding widget to layout with visible parent.
+
+ * Fixed child visibility when calling setLayout() on a visible widget.
+
+ * Speed up creation/destruction/showing of widgets with many children.
+
+ * Avoid painting obscured widgets when updating overlapping widgets.
+
+- QWorkspace
+
+ * Resolved issue causing the maximized controls to overlap with the
+ menu in reverse mode.
+
+ * Fixed issue where child windows could grow a few pixels when
+ restoring geometry in certain styles.
+
+ * Ensured that right-to-left layout is respected when positioning new
+ windows.
+
+ * Fixed crash that occurred when a child widget did not have a title
+ bar.
+
+ * Fixed issue where maximized child windows could be clipped at the
+ bottom of the workspace.
+
+- quintptr and qptrdiff
+
+ * New integral typedefs have been added.
+
+- Q3ButtonGroup
+
+ * Fixed inconsistencies with respect to exclusiveness of elements in
+ Qt 3.
+
+ * Fixed ID management to be consistent with Qt 3.
+
+- Q3Canvas
+
+ * Fixed several clipping bugs introduced in 4.1.0.
+
+- Q3CanvasView
+
+ * Calling setCanvas() now always triggers a full update.
+
+- Q3Grid, Q3Hbox, Q3VBox
+
+ * Fixed layout problem.
+
+- Q3IconView
+
+ * Fixed a case where selected icons disappeared.
+
+- Q3ListBox
+
+ * Fixed inconsistencies in selectAll() with respect to Qt 3.
+
+ * Fixed possible crash after deleting items.
+
+- Q3ListView
+
+ Fixed possible crash in Q3ListView after calling clear().
+
+ Fixed inconsistent drag and drop behavior with respect to Qt 3.
+
+- Q3Process
+
+ * Stability fixes in start().
+
+- Q3Socket
+
+ * No longer (incorrectly) reports itself as non-sequential.
+
+- Q3Table
+
+ * Improved behavior for combobox table elements.
+
+
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+
+ * Fixed data truncation for 64 bit integers on 64 bit operating
+ systems.
+
+- MySQL driver
+
+ * When using MySQL 5.0.7 or larger, let the server do the text
+ encoding conversion.
+
+ * Added UNIX_SOCKET connection option.
+
+ * Improved handling of TEXT fields.
+
+- OCI driver
+
+ * Improved speed for meta-data retrieval.
+
+ * Fixed potential crash on Windows with string OUT parameters.
+
+ * Improved handling of mixed-case table and field names.
+
+- ODBC driver
+
+ * Improved error reporting if driver doesn't support static result
+ sets.
+
+ * Improved support for the Sybase ODBC driver.
+
+- SQLite driver
+
+ * QSqlDatabase::tables() now also returns temporary tables.
+
+ * Improved handling of mixed-case field names.
+
+
+
+****************************************************************************
+* QTestLib *
+****************************************************************************
+
+- Added "-silent" options that outputs only test failures and warnings.
+
+- Reset failure count when re-executing a test object
+
+- Added nicer output for QRectF, QSizeF, and QPointF
+
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+
+Qtopia Core
+-----------
+
+- Fixed the -exceptions configure switch.
+
+- Fixed a build issue preventing the use of MMX instructions when
+ available.
+
+- Fixed leak of semaphore arrays during an application crash.
+
+- Fixed cases where the wrong cursor was shown.
+
+- Fixed cases where QWidget::normalGeometry() would return wrong value.
+
+- Allow widgets inside QScrollArea to have a minimum size larger than the
+ screen size.
+
+- Allow (0,0) as a valid size for top-level windows.
+
+- VNC driver
+
+ * Fixed keyboard shortcut problem when using the VNC driver.
+
+ * Fixed issue with the VNC driver that prevented client applications to
+ connect in some cases.
+
+ * Fixed a leak of shared memory segments in the VNC driver.
+
+ * Reduced CPU consumption in the VNC driver.
+
+ * Implemented dynamic selection of the underlying driver for the VNC and
+ transformed screen drivers.
+
+ * Improved error handling when clients connects to the server.
+
+- Graphics system
+
+ * Introduced new API for accelerated graphics hardware drivers.
+
+ * Implemented support for multiple screens.
+
+ * QScreen has binary incompatible changes. All existing screen drivers
+ must be recompiled.
+
+ * QWSWindow, QWSClient, QWSDisplay and QWSEvent have binary
+ incompatible changes. QWSBackingStore has been removed.
+ Existing code using these classes must be recompiled.
+
+ * Added support for OpenGL ES in QGLWidget.
+
+ * Implemented support for actual screen resolution in QFont.
+
+ * Removed internal limitation of 10 display servers.
+
+ * Improved memory usage when using screens with depths less than 16
+ bits-per-pixel.
+
+ * Fixed 16 bits-per-pixel screens on big-endian CPUs.
+
+ * Optimized CPU usage when widgets are partially hidden.
+
+ * Improved detection of 18 bits-per-pixel framebuffers.
+
+ * Improved performance when using a rotated screen with 18 or 24
+ bits-per-pixel depths.
+
+ * Improved speed of drawing gradients.
+
+ * Introduced the QWSWindowSurface as a technique to create
+ accelerated paint engines derived from QPaintEngine.
+
+ * Implemented the Qt::WA_PaintOnScreen flag for top-level widgets.
+
+ * Extended QDirectPainter to include non-blocking API and support for
+ overlapping windows. Existing code that subclasses QDirectPainter
+ must be recompiled.
+
+ * Implemented QWSEmbedWidget which enables window embedding.
+
+ * Removed hardcoded 72 DPI display limitation.
+
+- Device handling
+
+ * QWSMouseHandler has binary incompatible changes. All existing mouse
+ drivers must be recompiled.
+
+ * Fixed an issue of getting delayed mouse events when using the
+ vr41xx driver.
+
+ * Improved event compression in the vr41xx mouse handler.
+
+ * Improved algorithm for mouse calibration which works for all
+ screen orientations.
+
+ * Fixed an issue causing mouse release events with wrong positions
+ when using a calibrated and filtered mouse handler on a rotated
+ screen.
+
+ * Made the tty device configurable for the Linux framebuffer screen
+ driver.
+
+ * Fixed a deadlock issue when using drag and drop and a calibrated
+ mouse handler.
+
+ * Autodetection of serial mice is turned off to avoid disrupt serial
+ port communication. Set QWS_MOUSE_PROTO to use a serial mouse.
+
+- QVFb
+
+ * Fixed an issue preventing QVFb from starting on some systems.
+
+ * Added support for dual screen device emulation in QVFb.
+
+- QCopChannel
+
+ * Added a flush() function so that the QWS socket can be flushed,
+ enabling applications to ensure that QCop messages are delivered.
+
+
+Linux and UNIX systems
+----------------------
+
+- Printing
+
+ * Improved CUPS support by sending PDF instead of Postscript to
+ CUPS on systems that have a recent CUPS library, improving the
+ print quality.
+
+ * Added a new and improved QPrintDialog.
+
+ * Improved font embedding on systems without FontConfig.
+
+- QApplication
+
+ * When available, use Glib's mainloop functions to implement event
+ dispatching.
+
+- QPlastiqueStyle
+
+ * Added support to enable KDE icons to be automatically used on
+ systems where they are available.
+
+- QTextCodec
+
+ * Uses iconv(3) (when available) to implement the codec returned by
+ QTextCodec::codecForLocale(). The new codec's name is "System"
+ (i.e., QTextCodec::codecForLocale()->name() returns "System"
+ when iconv(3) support is enabled).
+
+
+AIX
+---
+
+- The makeC++SharedLib tool is deprecated; use the "-qmkshrobj" compiler
+ option to generate shared libraries instead.
+
+
+X11
+---
+
+- Added support to internally detect the current desktop environment.
+
+- QAbstractItemView
+
+ * Fixed assertion caused by interrupting a drag and drop operation
+ with a modal dialog on X11.
+
+ * Ensured that release events dispatched when closing a dialog
+ with a double click, are not propagated through to the window
+ underneath.
+
+- QCursor
+
+ * Fixed crash occuring when the X11 context had been released before
+ the cursor was destructed.
+
+- QGLWidget
+
+ * Fixed crashes that could occur with TightVNC.
+
+ * Improved interaction between QGLWidget and the Mesa library.
+
+- QMenu
+
+ * Made it possible for popup menus to cover the task bar on KDE.
+
+- QMotifStyle
+
+ * Ensured that the font set on a menu item is respected.
+
+- QX11EmbedContainer, QX11EmbedWidget
+
+ * Added missing error() functions.
+
+- QX11PaintEngine
+
+ * Increased speed when drawing polygons with a solid pixmap brush.
+
+ * Fixed masked pixmap brushes.
+
+ * Increased QImage drawing performance.
+
+- Motif Drop support
+
+ * Support for drops from Motif applications has been refactored and is
+ now working properly. QMimeData reports non-textual data offered in
+ Motif Drops using a MIME type of the form "x-motif-dnd/ATOM", where
+ ATOM is the name of the Atom offered by the Motif application.
+
+- Font rendering
+
+ * Improved stability when rendering huge scaled fonts.
+
+ * Enabled OpenType shaping for the Latin, Cyrillic, and Greek
+ writing systems.
+
+ * Improved sub-pixel anti-aliasing.
+
+ * Improved font loading speed.
+
+
+Mac OS X
+--------
+
+- Mac OS 10.2 support dropped.
+
+- QuickDraw support in QPaintEngine dropped; everything folded into the
+ CoreGraphics support.
+
+- All libraries in Qt are now built as frameworks when -framework mode is
+ selected (default) during the configuration process.
+
+- Many accessibility improvements, including better VoiceOver support. The
+ following widgets have had their accessibilty updated for this release:
+ QSplitter, QScrollBar, QLabel, QCheckBox, QRadioButton, QTabBar,
+ QTabWidget, QSlider, and QScrollBar.
+
+- Hidden files are now reported as hidden by QFileInfo, QDirModel, etc.
+
+- Windows now have a transparent size grips, an attribute for specifying an
+ opaque size grip was added.
+
+- Metrowerks generator has been removed.
+
+- Ensured that the anti-aliasing threshold setting is followed.
+
+- Added a standard "Minimize" menu item to Assistant's Window menu.
+
+- The documentation now has "Xcode-compatible" links so that it can be added
+ into Xcode's documentation viewer. This needs to be done by the developer
+ as regenerating Xcode's index takes quite a long time
+
+- QAbstractScrollArea
+
+ * Improved look and feel by aligning the scroll bars with the size
+ grip.
+
+- QClipboard
+
+ * Data copied to the clipboard now stays available after the
+ application exits.
+
+ * Added support for the Find clipboard buffer.
+
+ * Fixed encoding of URLs passed as MIME-encoded data.
+
+- QComboBox
+
+ * Improved the popup sizing so it's always wide enough to display its
+ contents.
+
+ * Improved the popup placement so it stays on screen and does not
+ overlap the Dock.
+
+ * The minimumSizeHint() and sizeHint() functions now honor
+ minimumContentsLength.
+
+- QKeyEvent
+
+ * The text() of a QKeyEvent is filled with the control character if
+ the user pressed the real Control key (Meta in Qt) and another key.
+ This brings the behavior of Qt on Mac OS X more in line with Qt on
+ other platforms.
+
+- QLibrary
+
+ * Removed the dependency on dlcompat for library loading and resolving
+ in favor of native calls. This means that you can unload libraries
+ on Mac OS X 10.4 or later, but not on 10.3 (since that uses dlcompat
+ itself).
+
+- QMacStyle
+
+ * QMacStyle only uses HITheme for drawing now (no use of Appearance
+ Manager).
+
+ * Fixed placement of text on buttons and group boxes for non-Latin
+ locales.
+
+ * Fixed rendering of small and mini buttons.
+
+ * Attempt to be a bit smarter before changing a push button to bevel
+ button when the size gets too small.
+
+ * Draws the focus ring for line edits when they are near the "top" of
+ the widget hierarchy.
+
+ * Ensured that the tickmarks are drawn correctly.
+
+ * Implemented the standardIconImplementation() function.
+
+ * Fixed the look of line edits.
+
+ * "Colorless" controls now look better.
+
+ * Fixed the sort indicator.
+
+ * Improved the look of text controls, such as QTextEdit, to fit in
+ better with the native style.
+
+- QMenu
+
+ * Popups no longer show up in Expose.
+
+ * Ensured that the proper PageUp and PageDown behavior are used.
+
+- QMenuBar
+
+ * Added support for explicit merging of items using QAction::MenuRole.
+
+ * Added support for localization of merged items.
+
+- QMessageBox
+
+ * A message box that is set to be window modal will automatically
+ become a sheet.
+
+ * Improved the look of the icons used to fit in with the native style.
+
+- QPainter
+
+ * Fixed off-by-one error when drawing certain primitives.
+
+ * Fixed off-by-many error when drawing certain primitives using a
+ scaling matrix.
+
+ * Fixed clipping so that setting an empty clip will clip away
+ everything.
+
+ * Fixed changing between custom dash patterns.
+
+ * Added combinedMatrix() which contains both world and viewport/window
+ transformations.
+
+ * Added the setOpacity() function.
+
+ * Added MiterJoins that are compliant with SVG miter joins.
+
+- QPainterPath
+
+ * Added the arcMoveTo() and setElementPosition() functions.
+
+- QPixmap
+
+ * Added functions to convert to/from a CGImageRef (for CoreGraphics
+ interoperability).
+
+ * Fixed various Qt/Mac masking and alpha transparency issues.
+
+- QPrinter
+
+ * Made QPrinter objects resuable.
+
+- QProcess
+
+ * Always use UTF-8 encoding when passing commands.
+
+- QScrollBar
+
+ * Improved handling of the case where the scrollbar is to short to
+ draw all its controls.
+
+- QTextEdit
+
+ * Improved the look of the widget to fit in with the native style.
+
+- QWidget
+
+ * All HIViewRefs inside Qt/Mac are created with the
+ kWindowStandardHandlerAttribute.
+
+ * Added the ability to wrap a native HIViewRef with create().
+
+ * Windows that have parents with the WindowStaysOnTopHint also get the
+ WindowStaysOnTopHint.
+
+
+Windows
+-------
+
+- Ensured that widgets do not show themselves in a hover state if a popup
+ has focus.
+
+- Fixed issues with rendering system icons on 16 bits-per-pixel displays.
+
+- Fixed issue where fonts or colors would be reset on the application
+ whenever windows produced a WM_SETTINGSCHANGE event.
+
+- Fixed a bug with Japanese input methods.
+
+- Compile SQLite SQL plugin by default, as on all the other platforms.
+
+- Fixed build issue when not using Precompiled Headers (PCH).
+
+- Made Visual Studio compilers older than 2005 handle (NULL == p)
+ statements, where p is of QPointer type.
+
+- Fixed HDC leak that could cause applications to slow down significantly.
+
+- Ensured that timers with the same ID are not skipped if they go to different
+ HWNDs.
+
+- Improved MIME data handling
+
+ * Resolved an issue related to drag and drop of attachments from some
+ applications.
+
+ * Resolved an issue where pasting HTML into some applications would
+ include parts of the clipboard header.
+
+ * Improved support for drag and drop of Unicode text.
+
+ * Made it possible to set an arbitrary hotspot on the drag cursor on
+ Windows 98/Me.
+
+- ActiveQt
+
+ * Fixed issues with the compilation of code generated by dumpcpp.
+
+ * Made ActiveQt controls behave better when inserted into Office
+ applications.
+
+ * Ensured that slots and properties are generated for hidden functions and
+ classes.
+
+ * Ensured that the quitOnLastWindowClosed property is disabled when
+ QApplication runs an ActiveX server.
+
+ * Ensured that controls become active when the user clicks into a subwidget.
+
+ * Added support for CoClassAlias class information to give COM class a
+ different name than the C++ class.
+
+- QAccessible
+
+ * Ensured that the application does not try to play a sound for
+ accessibility updates when no sound is registered.
+
+- QAxBase
+
+ * Fixed potential issue with undefined types.
+
+- QDir
+
+ * Fixed bug where exists() would return true for a non-existent drive
+ simply because the specified string used the correct syntax.
+
+ * Improved homePath() to work with Japanese user names.
+
+- QFileDialog
+
+ * Added support for relative file paths in native dialogs.
+
+ * Enabled setLabelText() to allow context menu entries to be changed.
+
+ * Ensured that users are denied entry into directories where they
+ don't have execution permission.
+
+ * Disabled renaming and deleting actions for non-editable items.
+
+ * Added a message box asking the user to confirm when deleting files.
+
+- QFileInfo
+
+ * Fixed absoluteFilePath() to return a path that begins with the
+ current drive label.
+
+- QGLWidget
+
+ * Fixed usage of GL/WGL extension function pointers. They are now
+ correctly resolved within the context in which they are used.
+
+- QGLColormap
+
+ * Fixed cases where the colormap was not applied correctly.
+
+- QMenu
+
+ * Made it possible for popup menus to cover the task bar.
+
+- QPrinter
+
+ * Added support for printers that do not have a DEVMODE.
+
+ * Fixed a drawing bug in the PDF generator on Windows 98/Me.
+
+ * Made it possible to programmatically change the number of copies
+ to be printed.
+
+ * Fixed possible crash when accessing non-existent printers.
+
+- QProcess
+
+ * Fixed lock-up when writing data to a dead child process.
+
+- QSettings
+
+ * Fixed bug causing byte arrays to be incorrectly stored on
+ Win95/98/Me.
+
+ * Allow keys to contain HKEY_CLASSES_ROOT and HKEY_USERS to allow all
+ registry keys to be read and prevent unintentional use of
+ HKEY_LOCAL_MACHINE.
+
+ * Fall back to the local machine handle if a key does not start with a
+ handle name.
+
+- QUdpSocket
+
+ * Introduced fixes for UDP broadcasting on Windows.
+
+- QWhatsThis
+
+ * Improved native appearance.
+
+- QWidget
+
+ * Top-level widgets now respect the closestAcceptableSize of their
+ layouts.
+
+ * Ensured that getDC() always returns a valid HDC.
+
+- QWindowsStyle
+
+ * We no longer draw splitter handles in Windows style. This resolves
+ an inconsistency with XP style, so that the two styles can use the
+ same layout interchangeably. Note that it is fully possible to style
+ splitter handles (if a custom style or handle is required) using
+ style sheets.
+
+ * Disabled comboboxes now have the same background color as disabled
+ line edits.
+
+- QWindowsXPStyle
+
+ * Made QPushButton look more native when pressed.
+
+ * Improved the look of checked tool buttons.
+
+ * Defined several values that are not present in MinGW's header files.
+
+
+
+****************************************************************************
+* Significant Documentation Changes *
+****************************************************************************
+
+
+- Updated information about the mailing list to be used for porting issues
+ (qt-interest).
+
+- Demos / Examples
+
+ * Added a new directory containing desktop examples and moved the
+ Screenshot example into it.
+
+ * Added a new Chat client network example which uses QUdpSocket to
+ broadcast on all QNetworkInterface's interfaces to discover its
+ peers.
+
+ * The Spreadsheet demo now uses the QItemDelegate, QCompleter, and
+ QDateTimeEdit with calendar popup.
+
+ * An OpenGL button is added to some of the demos to toggle usage of
+ the OpenGL paint engine.
+
+ * Fixed crash resulting from incorrect painter usage in the Image
+ Composition example
+
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+
+Assistant
+---------
+
+- Middle clicking on links will open up new tabs.
+
+- Added "Find as you type" feature to search documentation pages.
+
+- Added "Sync with Table of Contents" feature to select the current page in
+ the contents.
+
+- Fixed issue where activating a context menu over a link would cause the
+ link to be activated.
+
+- Provides a default window title when not specified in a profile.
+
+- Fixed JPEG viewing support for static builds.
+
+- Fixed crash that could occur when opening Assistant with old and invalid
+ settings.
+
+- Fixed display of Unicode text in the About dialog.
+
+
+Designer
+--------
+
+- Added QWidget and the new widgets in this release to Designer's widget
+ box.
+
+- Updated the dialog templates to use the new QDialogButtonBox class.
+
+- Backup files created by Designer no longer overwrite existing files.
+
+- Promoted widgets inherit the task menu items of the base class.
+
+- Enums are no longer ordered alphabetically in the property editor.
+
+- Fixed issue where shortcuts could be corrupted in certain situations.
+
+- Line endings in .ui files now match the standard line endings for the
+ platform the files are created on.
+
+- Ensured that a warning is displayed whenever duplicate connections are
+ made in the connections editor.
+
+- Added shortcuts for the "Bring to Front" and "Send to Back" form editor
+ actions.
+
+- Added new 22 x 22 icons.
+
+- Fixed selection of dock widgets in loaded forms.
+
+- Made QWidget::windowOpacity a designable property.
+
+- Numerous improvements and fixes to the action and property editors.
+
+- Windows only
+
+ * The default mode is Docked Window.
+
+- Mac OS X only
+
+ * Preview of widgets is no longer modal.
+
+ * Passing really long relative paths into the resource will no longer
+ cause a crash.
+
+
+Linguist
+--------
+
+- Added a new "Check for place markers" validation feature.
+
+- Added the "Search And Translate" feature.
+
+- Added the "Batch translation" feature.
+
+- Added support for editing plural forms.
+
+- Extended the .ts file format to support target language, plural forms,
+ source filename, and line numbers.
+
+- Added the "Translated Form Preview" feature.
+
+- Added placeholders for "hidden" whitespace (i.e., tabs and newlines) in
+ the translation editor.
+
+
+lupdate
+-------
+
+- Added the -extensions command-line option in order to recursively scan
+ through a large set of files with the specified extensions.
+
+- Made lupdate verbose by default (use -silent to obtain the old behavior).
+
+- Improved parsing of project files.
+
+- Fixed some issues related to parsing C++ source files.
+
+
+lrelease
+--------
+
+- Made lrelease verbose by default (use -silent to obtain the old behavior).
+
+- Disabled .qm file compression by default (pass -compress to obtain the old
+ behavior).
+
+
+moc
+---
+
+- Fixed support for enums and flags defined in classes that are themselves
+ declared in namespaces.
+
+- Added support for the -version and -help command line options (for
+ consistency with the other tools).
+
+
+rcc
+---
+
+- Added support for the -binary option to generate resources that are
+ registered at run-time.
+
+
+qmake
+-----
+
+- Added support for an Objective C compiler on platforms that support it via
+ OBJECTIVE_SOURCES. Additionally, Objective C precompiled headers are
+ generated as necessary.
+
+- Added support for a qt.conf to allow easy changing of internal target
+ directories in qmake.
+
+- Added support for the recursive switch (-r) in shadow builds.
+
+- Introduced QMAKE_CFLAGS_STATIC_LIB to allow modified flags to be
+ passed to temporary files when compiling a static library.
+
+- Added a target.targets for extra qmake INSTALLS. The $files() function
+ is now completely consistent with wildcard matching as specified to
+ input file variables.
+
+- Added QMAKE_FUNC_* variables to EXTRA_COMPILERS for late evaluation
+ of paths to be calculated at generation time. $$fromfile() will no
+ longer parse input file multiple times.
+
+- Added support for -F arguments in LIBS line in the Xcode generator.
+
+- $$quote() has changed to only do an explicit quote, no escape sequences
+ are expanded. A new function $$escape_expand() has been added to allow
+ expansion of escape sequences: \n, \t, etc.
+
+- Added a $$QMAKE_HOST variable to express host information about the
+ machine running qmake.
+
+- Added a $$replace() function.
+
+- Ensured that PWD is always consulted first when attempting to resolve an
+ include for dependency analysis.
+
+- Added support for UTF-8 encoded text in .pro files.
+
+- Variables $$_PRO_FILE_ and $$_PRO_FILE_PWD_ added for features to detect
+ where the .pro really lives.
+
+- Added QMAKE_FRAMEWORK_VERSION to override the version inside a .framework,
+ though VERSION is still the default value.
+
+- Added support for custom bundle types on Mac OS X.
+
+- Added support for Mac OS X resources (.rsrc) in REZ_FILES.
+
+
+qt3to4
+------
+
+- qt3to4 now appends to the log file instead of overwriting it.
+
+- Fixed one case where qt3to4 was inserting UNIX-style line endings on
+ Windows.
+
+- Added the new Q3VGroupBox and Q3HGroupBox classes to ease porting.
+
+- Updated the porting rules for this release.
+
+
+uic
+---
+
+- Added support for more variant types: QStringList, QRectF, QSizeF,
+ QPointF, QUrl, QChar, qlonglong, and qulonglong.
+
+- Fixed code generated by uic for retranslating item view widgets so that
+ the widgets are not cleared when they are retranslated.
+
+- Ensured that no code is generated to translate empty strings.
+
+
+uic3
+----
+
+- Added line numbers to warnings.
+
+- Ensured that warnings show the objectName of the widget in question.
+
+- Added support for word wrapping in labels when converting files from uic3
+ format.
+
+- Ensured that the default layouts are respected when converting files from
+ uic3 format.
+
+- Ensured that double type properties are handled correctly.
diff --git a/dist/changes-4.2.0-tp1 b/dist/changes-4.2.0-tp1
new file mode 100644
index 0000000..b2a994d
--- /dev/null
+++ b/dist/changes-4.2.0-tp1
@@ -0,0 +1,20 @@
+Qt 4.2 introduces many new features as well as many improvements and
+bugfixes over the 4.1.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/
+
+The Qt version 4.2 series is binary compatible with the 4.1.x series.
+Applications compiled for 4.0 or 4.1 will continue to run with 4.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+Qt 4.2 contains a lot of changes, which will be fully documented in the
+final release.
+
+For this tech preview, please concentrate on the new features and provide
+feedback on the qt4-preview-feedback mailing list (see
+http://lists.trolltech.com/ for details)
+
+
diff --git a/dist/changes-4.2.1 b/dist/changes-4.2.1
new file mode 100644
index 0000000..5cbcc2c
--- /dev/null
+++ b/dist/changes-4.2.1
@@ -0,0 +1,14 @@
+Qt 4.2.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.2.0.
+
+The Qt version 4.2 series is binary compatible with the 4.1.x and 4.0.x series.
+Applications compiled for 4.0 or 4.1 will continue to run with 4.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+- QImage
+ Fixed a potential security issue which could arise when transforming
+ images from untrusted sources.
+
diff --git a/dist/changes-4.2.2 b/dist/changes-4.2.2
new file mode 100644
index 0000000..25131a1
--- /dev/null
+++ b/dist/changes-4.2.2
@@ -0,0 +1,827 @@
+Qt 4.2.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.2.0.
+
+The Qt version 4.2 series is binary compatible with the 4.1.x and 4.0.x
+series. Applications compiled for 4.0 or 4.1 will continue to run with 4.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Configuration/Compilation
+
+ * Fixed issues with unresolved zlib symbols on aix-g++ resulting from a
+ missing "-lz" in gui/Makefile.
+
+ * Fixed compilation when an unsupported version of MySQL is auto-detected
+ by the configure script.
+
+ * Fixed QtDBus linking errors when compiling with the Intel C++ Compiler
+ for Linux.
+
+ * Fixed compilation when using Q_ARG and Q_RETURN_ARG macros with template
+ types.
+
+ * Make Qt compile with QT_NO_TOOLTIP and QT_NO_STATUSBAR
+
+- Documentation
+
+ * Added new overviews and substantially improved Qtopia Core-specific
+ documentation.
+
+- Demos / Examples
+
+ * Fixed crash in the Settings Editor example resulting from entering
+ certain input to a QTreeWidget using QLineEdit as an inline editor.
+
+ * Fixed crash in the Ported Canvas example that occurred when creating a
+ new canvas from one that was shrunk to its minimum size.
+
+- I/O
+
+ * Fixed divide by zero when loading malformed BMP files.
+
+- Qt Assistant
+
+ * Fixed a bug that prevented the view from scrolling to anchors within
+ pages.
+
+- Qt Designer
+
+ * Fixed crash that could occur when pasting a QGridLayout into a
+ QTabWidget.
+
+ * Fixed the signals & slots connection editor to automatically scroll to
+ the correct items.
+
+ * Fixed blocking behavior that would occur when previewing modal forms.
+
+ * Made OK the default button in the "Promote to Custom Widget" dialog.
+
+ * Ensured that main window forms that include size grips are repainted
+ correctly when they are resized.
+
+ * Fixed bug in Form Settings dialog - it wasn't possible to reset the
+ "Pixmap Function" field.
+
+- Qt Linguist
+
+ * Fixed bug where lupdate would leave out the namespace part of the context.
+
+ * Fixed bug in lupdate where the paths of the generated ts files was not
+ relative to the pro file.
+
+ * Fixed bug in lupdate that caused strings that contained \r\n were not
+ translated.
+
+ * Improved the user interface with some minor layout changes.
+
+ * Improved handling of forms without layouts.
+
+ * Fixed crash caused by navigating to the previous node when the current
+ node was the first and topmost node.
+
+ * Fixed bug in the preview translation feature where forms that did not
+ have any layout got a height of 0.
+
+ * Fixed bug where "Search and Translate" did not trigger a repaint on the
+ items that got translated, leading people to believe that
+ "Search and Translate" did not work.
+
+ * Fixed a layout problem with the "Search and Translate" dialog.
+
+- qmake
+
+ * Fixed crash that could occur when using the LIB_PATH variable if a .libs
+ directory is located on one of the paths held by the variable.
+
+ * Improved generation of Xcode projects to avoid problems with qmake
+ project files that contain certain Qt-dependent declarations.
+
+ * Improved support for Objective C sources in the Xcode project generator
+ to ensure that they are added to the project's target.
+
+
+Third party components
+----------------------
+
+- libpng
+
+ * Security fix (CVE-2006-5793): The sPLT chunk handling code
+ uses a sizeof operator on the wrong data type, which allows
+ context-dependent attackers to cause a denial of service (crash)
+ via malformed sPLT chunks that trigger an out-of-bounds read.
+
+ * Security fix: Avoid profile larger than iCCP chunk.
+ One might crash a decoder by putting a larger profile inside the
+ iCCP profile than is actually expected.
+
+ * Security fix: Avoid null dereference.
+
+ * Disabled MMX assembler code for Intel-Mac platforms to work
+ around a compiler bug.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- Accessibility
+
+ * Fixed a potential assert when navigating menus while assistive tools are
+ running.
+
+ * Fixed a crash when getting accessibility information from an item view
+ without a model.
+
+ * Fixed item view accessibility bug where QAccessibleInterface::text()
+ would return an empty string for child indexes larger
+ than one.
+
+- Item views
+
+ * Fixed QHeaderView and QTableView overflow issues when the length
+ of all the rows or columns went over the maximum allowed integer value.
+
+ * When reset is emitted by a QAbstractItemModel, QHeaderView will now
+ always update the header count().
+
+ * Fixed incorrect scrolling in QHeaderView when items are hidden.
+
+ * Fixed bug where QHeaderView would disappear if the sections were moved
+ and the model was reset.
+
+ * QDataWidgetMapper::mappedWidgetAt() now always returns the right
+ mapped index for a widget no matter in which order they were inserted
+
+ * Fixed crash due to incorrect update of persistent model indexes in
+ QSortFilterProxyModel::layoutChanged().
+
+ * Fixed bug that could cause QSortFilterProxyModel::removeRows() and
+ QSortFilterProxyModel::removeColumns() to remove the wrong source model
+ items.
+
+ * Fixed bug in QSortFilterProxyModel that caused stale proxy mappings to
+ remain when source model items were removed and later reinserted,
+ resulting in an incorrect proxy model.
+
+ * Fixed bug in QSortFilterProxyModel that caused items to not appear
+ in a QTreeView when adding children to a formerly childless source item.
+
+ * Fixed painting bug for spanning cells in QTableView when the item
+ background is transparent.
+
+ * Fixed regression in QListWidget and QTreeWidget that caused persistent
+ indexes to not be updated when sorting items.
+
+ * Enter key can now be used to start item editing when the edit trigger
+ is AnyKeyPressed.
+
+ * Fixed regression where QAbstractItemView::setRootIndex() wasn't
+ always updating the view, causing possibly painting errors.
+
+ * Fixed regression that caused incorrect propagation of Enter key press
+ from a QAbstractItemView in editing mode.
+
+ * Date and time editors are now initialized correctly with the current
+ date and time.
+
+ * QTableView tab focus handling has been improved. Although tab key
+ navigation is enabled by default, you can tab out of a view if the
+ model is either missing or unable to handle the key (e.g., an empty
+ model).
+
+ * Fixed bug in QItemDelegate that would scale decoration pixmaps.
+
+ * Fixed buge that would not let the column delegate create the editor
+ for an edited item.
+
+ * Fixed bug where the QTableCornerButton would ignore the view
+ selectionMode.
+
+ * Fixed compatibility issue with QTreeWidgetItem serialization
+ between Qt 4.2.x and Qt 4.(0/1).x.
+
+ * Made sure the QTableWidget::cellEntered() signal is emitted
+ correctly.
+
+ * Made sure that commitData() uses the row/column delegate
+ when these are set.
+
+ * Fixed incorrect QTableView scrollbar ranges when rows were hidden.
+
+ * Fixed QItemDelegate to let text be bottom aligned.
+
+- Graphics View
+
+ * The background cache in QGraphicsView is now properly initialized to
+ the full viewport.
+
+ * Fixed incorrect cursor updates when moving between items.
+
+ * QGraphicsItem::setMatrix() now properly clears the original item before
+ repainting.
+
+ * QGraphicsEllipseItem is now only drawn as a full ellipse at angles that
+ are multiples of 360 degrees (..., -720, -360, 360, 720, ...).
+
+ * Fixed a crash when selecting one selectable item, then moving another
+ movable item.
+
+ * Fixed a crash during item construction caused by a pure virtual function
+ call in QGraphicsItem.
+
+ * Fixed mouse grabber book-keeping problems in QGraphicsScene which fell out
+ of sync when opening modal dialogs or popups from within a mouse event
+ handlers.
+
+ * QGraphicsScene now forwards unhandled events to QObject, allowing the use
+ of timers in QGraphicsScene subclasses.
+
+- Meta-Object Compiler (moc)
+
+ * Split long string literals in the generated code to work around
+ limitations in MSVC.
+
+ * Fixed crash on *BSD that could occur on invalid input.
+
+- Painting
+
+ * Improved numerical stability in the path stroker, fixing a crash when
+ stroking paths containing curve segments whose control points are
+ approximately on the same line.
+
+ * Fixed raster paint engine memory corruption in QBitmap when source buffer
+ was smaller than the destination buffer.
+
+ * Avoid rounding errors when drawing parts of a pixmap using the Quartz 2D
+ engine.
+
+ * Added caching of QGradient's color table for the raster paint engine.
+ This means that if a gradient with the same stops and colors is used
+ again, it will be quickly fetched from the cache, avoiding the
+ expensive calculations of the color lookup table.
+
+ * Fixed a crash on Windows and with QImage caused by specifying
+ Qt::CustomDashLine without an actual pattern.
+
+ * Fixed a bug in the raster paint engine which would occasionally cause
+ pixel errors when drawing polygons.
+
+ * Fixed memory corruption in the OpenGL paint engine when drawing complex
+ polygons with a cosmetic pen.
+
+ * Fixed rendering of transformed brushes when drawing linear gradients
+ with the OpenGL paint engine where the transformations used were not
+ angle-preserving.
+
+ * Improved handling of OpenGL errors.
+
+ * Fixed bug in the raster paint engine where extra lines would be drawn
+ when drawing a path partially outside the viewport using a dashed pen.
+
+ * Fixed an assert in QImage that was triggered when reading PNG files
+ with certain palettes.
+
+ * Fixed an issue where stroking and drawing aliased QPainterPaths with a
+ non-cosmetic pen would produce incorrect results.
+
+ * Fixed an issue where text was cut off when drawn onto a QImage.
+
+ * Fixed an issue where text would be drawn onto a QPicture with an
+ incorrect position.
+
+ * Fixed an issue where enabling/disabling clipping when drawing into a
+ QImage did not have any effect.
+
+ * Fixed bug in QImage::createHeuristicMask where the color table was not
+ initialized properly.
+
+- Qt Resource Compiler (rcc)
+
+ * Improved handling of relative paths in .qrc files.
+
+- Style Sheets
+
+ * Made general performance improvements.
+
+ * Fixed crash that could occur when a widget with a style sheet was
+ reparented into a widget with no style sheet.
+
+ * Ensured that a widget's custom palette is not overwritten when not styled
+ using a style sheet.
+
+ * Added support to allow colors to be specified with alpha components.
+
+ * Added support for group box styling.
+
+ * Removed broken support for automatic image scaling.
+
+- SQL plugins
+
+ * Fixed incorrect translation of error strings in the Oracle plugin.
+
+ * Made sure PQfreemem is called to free allocated buffers in PostgreSQL.
+
+ * Fixed regression from Qt 4.1.4 behavior that prevented tables in schemas
+ from working correctly in the SQL data models.
+
+ * Prevented possible trailing garbage for TEXT fields in the MySQL plugin.
+
+- Text handling
+
+ * Fixed a bug in the Bidi algorithm.
+
+- QAbstractItemView
+
+ * Made commitData() more robust by ignoring cases in which no valid index
+ is associated with the editor.
+
+ * Ensured that the itemEntered() signal is emitted consistently on all
+ platforms.
+
+- QBrush
+
+ * Ensured that transformations are correctly copied when brushes are copied.
+
+- QCalendarWidget
+
+ * Fixed setting the text format, correcting repainting and date resetting
+ issues.
+
+- QComboBox
+
+ * Fixed wrong scroll arrows for the popup menu.
+
+- QCompleter
+
+ * Fixed issue where the highlighted() signal was emitted twice if
+ setModel() was called twice.
+
+ * Made completers usable inside dialogs.
+
+- QDataStream
+
+ * Fixed streaming of qreal on (embedded) platforms where qreal values are
+ not equivalent to double values; i.e., sizeof(qreal) != sizeof(double).
+
+- QDateTime/QDateTimeEdit
+
+ * Fixed a bug that allowed you to type in larger numbers than 12 in 12-hour
+ fields.
+
+ * Fixed a bug that occurred when QDate::shortMonthName() was longer than
+ 3 characters.
+
+ * Improved the handling of left-to-right languages.
+
+- QDialogButtonBox
+
+ * QDialogButtonBox now sets the default button to the first button with
+ the Accept role if no other button has explicitly been set as the
+ default when it is shown. This is to stop a regression where using the
+ autoDefault property with the Mac and Cleanlooks styles would set the
+ Cancel button as the default.
+
+- QDir
+
+ * Fixed an assert in QDir::entryList() when reading file entries with
+ names containing invalid Unicode encodings.
+
+- QFileDialog
+ * Fixed bug that showed a non-existing folder for every space the user typed
+ after a dot (.) in the lineedit.
+
+- QFileSystemWatcher
+
+ * Fixed compilation on Linux/HPPA.
+
+- QFSFileEngine
+
+ * Fixed broken UNC path support.
+
+- QIODevice
+
+ * Fixed a data corruption bug when reading large blocks from devices
+ opened in Text mode.
+
+ * Fixed seeking to positions larger than the maximum allowed integer value.
+
+- QLineEdit
+
+ * Fixed scrolling in line edits with custom paddings.
+
+ * Fixed crash on Linux when the text contains QChar::LineSeparator.
+
+- QListView/QListWidget
+
+ * Fixed bug with cursor navigation in cases where a grid size has been
+ set.
+
+ * Ensured that the drop indicator is not shown in icon view mode to avoid
+ painting artifacts.
+
+- QLocale
+
+ * Fixed crash on Mac OS X and Windows caused when one of the separator
+ strings was an empty string.
+
+ * Fixed double to string conversion bug on embedded architectures.
+
+- QMainWindow
+
+ * Fixed bug allowing non-floatable dock widgets to be floated when the
+ DockWidgetMoveable option is set.
+
+ * Fixed several bugs in laying out docked QDockWidgets which have
+ minimumSize() and/or maximumSize() set.
+
+ * Improved saving and restoring of the state of main windows and their dock
+ widgets when using saveState() and restoreState().
+
+ * Fixed handling of dock widgets that are non-closable to the user so that
+ they can be programmatically closed.
+
+ * Fixed regression from Qt 4.1.4 behavior to ensure that palette changes
+ to main windows are also propagated to their children.
+
+- QMenuBar
+
+ * Improved event handling to avoid sending events when a menu bar has no
+ parent widget.
+
+- QObject
+
+ * Fixed memory leak when calling QObject::moveToThread(0).
+
+- QPainter
+
+ * Fixed reentrancy issue that would otherwise lead to crashes if more than
+ one QImage is deleted at the same time (from different threads).
+
+- QPalette
+
+ * Improved handling of the palette obtained from QApplication::palette()
+ in cases where QApplication::setStyle() has been called before a
+ QApplication instance has been constructed (as recommended by the
+ documentation).
+
+- QPluginLoader
+
+ * Fixed a potential crash that could occur when calling staticInstances()
+ from a global destructor.
+
+- QProgressBar
+
+ * Document that drawing of text in vertical progress bars is style-dependent.
+
+- QSqlRelationalTableModel
+
+ * Ensured that the internal cache is correctly cleared when reverting
+ inserted rows.
+
+- QSvg
+
+ * Improved parser robustness and parsing speed.
+
+- QTextCodec
+
+ * Fixed race-condition in QTextCodec::codecForLocale().
+
+ * Fixed potential off-by-one string handling bug.
+
+- QTextDocument
+
+ * Fixed support for pixel font sizes in imported HTML.
+
+- QTextOption
+
+ * Ensured that the textDirection property is respected.
+
+- QTextStream
+
+ * Ensured that readLine() no longer treats "\r\n" as being two lines if
+ called after QTextStream::pos().
+
+- QToolButton
+
+ * Fixed an issue where tool button popup menus were positioned incorrectly
+ on multi-screen setups.
+
+- QTreeView/QTreeWidget
+
+ * Fixed possible assert when painting if there were layouts pending.
+
+ * Fixed possible segfault when a model emits layoutChanged().
+
+ * Fixed erroneous expanding/collapsing of items when the user
+ double-clicked in the checkbox area of an item.
+
+ * Fixed a crash in setRowHidden() caused by hiding then un-hiding items
+ in a hierarchy.
+
+ * Fixed setSortingEnabled() which could could cause incorrect painting.
+
+- QVariant
+
+ * Fixed behavior where conversion of invalid variants to integers would be
+ incorrectly reported as successful.
+
+ * Fixed a crash in the compatibility function QVariant::asByteArray()
+ when called on a null variant.
+
+- QWidget
+
+ * Made setWindowTitle() work on hidden widgets that are never shown.
+ (Fixing a bug in QtSingleApplication on Windows.)
+
+ * Made QWidget::restoreGeometry() restore windows to the correct screen
+ on multi-screen systems.
+
+ * Fixed a bug where the stacking order of widgets would get out of sync
+ and cause entire widgets, or parts of them, not to be updated properly.
+
+ * Fixed QWidget::setParent() to not recreate the native window ID of
+ all child widgets when reparenting the parent to top-level.
+
+ * Fixed incorrect resize handling of dock widgets that are resized to the
+ extent of the screen or to their maximum defined sizes.
+
+- QWorkspace
+
+ * Fixed memory corruption that caused crashes inside Visual Studio.
+
+- QMessageBox
+
+ * Made QMessageBox::setText() adjust the size of the text area
+ when setting a new text.
+
+- QXmlInputSource
+
+ * Ensured that QXmlInputSource does not read in the whole document at once,
+ enabling arbitrarily large files to be parsed with QXmlSimpleReader.
+
+- Qt3 support
+
+ * Fixed QPainter::xForm() and QPainter::xFormDev().
+
+ * Fixed crash in Q3IconView when selecting several items without releasing
+ the left mouse button, then clicking the right mouse button.
+
+ * Fixed incorrect behavior of setLabel() to replace labels rather than
+ inserting more of them.
+
+ * Ensured that Q3IconView is included in the Desktop Light package.
+
+ * Fixed regression of a feature in Qt 4.1.4 by reintroducing support for
+ Q3Accel.
+
+- QDBus
+
+ * Fixed getting and setting of invalid properties
+ so the don't cause errors in in libdbus-1.
+
+ * Fixed bug where QtDBus could generate invalid XML in some cases.
+
+ * Fixed bug where QtDBus can sometimes generate names that break
+ the standard.
+
+ * Fixed crash in QtDBus when connecting a signal to a slot with
+ less parameters.
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+
+ * Fixed positioning of text with stacking diacritics.
+
+ * Added fixes for Indic text rendering.
+
+ * Fixed rendering of Greek and other latin scripts with XLFD fonts.
+
+ * Fixed encoding detection of XLFD fonts.
+
+ * Fixed crash in QX11EmbedContainer.
+
+ * Ensured that QPrinter doesn't generate PDF when printing to raw CUPS
+ printers.
+
+ * Improved behavior of QPrintDialog so that, if CUPS is not installed or
+ reports that no printers are available, it falls back to the printers
+ set up for lpr/lprng.
+
+ * Fixed paper size selection when printing with CUPS.
+
+ * Suppressed/avoided the generation of floating point exceptions in the
+ X11 paint engine.
+
+ * Fixed an endianess issue when drawing QImages.
+
+ * Fixed X errors when scaling/copying null pixmaps.
+
+ * Fixed an issue where bitmap/XLFD fonts where drawn garbled.
+
+ * Fixed X error when resizing to its minimum size.
+
+ * Fixed widgets painted all black if the system palette contains X11
+ color names.
+
+ * Fixed loading plugins built in debug mode and linked against the
+ default (release) build.
+
+ * Fixed input of non-ascii chars in Qt widgets when application was
+ run with empty LANG environment variable.
+
+ * Fixed QApplication::hasPendingEvents() returning true even if no
+ events were pending when using the Glib event dispatcher.
+
+ * Fixed rare event loop dead-lock when posting many custom events to
+ a receiver in another thread.
+
+- QPlastiqueStyle
+
+ * Disabled checked radio buttons and checkboxes are now rendered correctly.
+
+
+Windows
+-------
+
+ * Fixed drawing of the 0xad character with symbol fonts.
+
+ * Fixed stacking order of dialogs when a child is created before its
+ parent.
+
+ * Fixed printing to PDF when no printers are installed.
+
+ * Fixed "print to file" dialog only showing once after it has been canceled.
+
+ * Fixed name clashes in enum values when running dumpcpp (ActiveQt).
+
+ * Fixed a lock-up in QNetworkInterface for machines with multiple network
+ interfaces.
+
+ * Fixed a lock-up in QAbstractSocket::waitForReadyRead() when 0 was passed
+ as a timeout value.
+
+ * Fixed "Invalid HANDLE" exception when a non-Qt thread that owns Qt
+ objects terminates.
+
+ * Fixed potential crash when calling QCoreApplication::applicationFilePath().
+
+ * Fixed compilation problem with precompiled headers in qt3support. PCH is
+ now disabled for qt3support.
+
+ * Fixed issues with low-level keyboard handling for certain (international)
+ keyboard layouts where input of accented characters would only work
+ inconsistently.
+
+ * Fixed bug in QWidget::setGeometry() caused by incorrectly taking the
+ geometry of the window decoration into account.
+
+ * Made it possible to load files in a Japanese environment.
+
+ * Improved the appearance of dock widgets on Windows XP.
+
+ * Fixed the appearance of the window menu when triggered with Alt-Space.
+
+- QAxServer
+
+ * Ensured that characters that some IStorage implementations don't support
+ are removed from stream names.
+
+ * Fixed regression that prevented ActiveQt controls from being activated
+ once they had been closed.
+
+- QSettings
+
+ * Fixed potential deadlocks that could occur when saving settings,
+ particularly if an error occurs while settings are being written.
+
+Mac OS X
+--------
+
+ * Fixed a regression that made it impossible to drag images from non-Qt
+ application to Qt applications.
+
+ * Fixed an issue with flickering/disappearing widgets when the
+ Qt::WA_MacMetalStyle attribute is set.
+
+ * Updated the documentation to clarify QActionWidget behavior with regard
+ to adding a QActionWidget to a menu in the menu bar and using the same
+ menu as a popup.
+
+ * Ensured that the correct QList<QUrl> is returned when dragging Finder
+ items to Qt applications.
+
+ * Documented how to debug with debug frameworks.
+
+ * Fixed text selection in the PDF generator.
+
+ * Fixed a bug where the cursor would not switch to the arrow cursor over
+ child widgets with that cursor set.
+
+ * Fixed incorrect handling of FramelessWindow modal dialogs to ensure that
+ they do not have title bars and cannot be moved.
+
+ * Fixed a crash that could occur when enabling "Accessibility for assistive
+ devices" in System Preferences while a Qt application was running.
+
+ * Fixed a painting error where a one-pixel border at the bottom-right
+ corner of widgets wasn't being (re)painted correctly.
+
+ * Fixed an item view scrolling bug where cell widgets were scrolled
+ incorrectly.
+
+ * Made handling of popup behavior depend on the window type to ensure that
+ they are raised above other windows correctly.
+
+ * Fixed crashes caused by incorrect pointer handling for contexts.
+
+ * Ensured that the resize cursor shape is shown when the mouse cursor is
+ positioned over the edges of floating dock widgets.
+
+ * Fixed issue that caused menus to be opened behind widgets with the
+ WindowStaysOnTopHint hint set.
+
+ * Fixed handling of the QAssistantClient class for framework builds.
+
+- QMacStyle
+
+ * Fixed a crash that occurred when an invalid rectangle was given for an
+ inactive button.
+
+ * Improved performance when rendering vertical gradients.
+
+- QSystemTrayIcon
+
+ * Ensured that the enable state of actions are properly handled and that
+ aboutToShow() is emitted when appropriate.
+
+
+- Qtopia Core
+
+ * Fixed delivery of mouse events to overlapping popups.
+
+ * VNC: Fixed use of the VNC driver with the Multi driver.
+
+ * Fixed cursor state when switching between different screens.
+
+ * Improved performance when using an accelerated mouse cursor.
+
+ * Optimized linear gradient drawing using fixed point math for use on
+ platforms without floating point hardware.
+
+ * QCustomRasterPaintDevice::metric(): Fixed default values of PdmWidth and
+ PdmHeight.
+
+ * Fixed bug in QWidget::setMask().
+
+ * Fixed incorrect line edit editing behavior where the contents would be
+ cleared even for read-only line edits in certain situations.
+
+ * Fixed calibration of rotated screens in the Mouse Calibration example.
+
+ * Fixed setMode() in the LinuxFb, VNC and Transformed screen drivers.
+
+ * Fixed crash when using QWSCalibratedMouseHandler with filter size < 3.
+
+ * Fixed QScreen::alloc() for non-default color maps.
+
+ * Fixed a bug preventing a QWSEmbedWidget from being displayed if the
+ remote widget was hidden before it was embedded.
+
+ * Fixed screen area reservation when using the QDirectPainter class.
+
+ * Fixed compilation of the MySQL driver when using the minimum
+ configuration.
+
+ * Fixed left-to-right positioning for menu items in XP style.
+
+- QVFb
+
+ * Fixed crash that could occur when switching between certain skins.
+
+ * Fixed crash that could occur when recording.
+
+ * Enabled saving of animations in locations other than in /tmp.
+
+- QWhatsThis
+
+ * Fixed the unintentional double shadow effect for "What's This?" help.
+
+
+****************************************************************************
+* QTestLib *
+****************************************************************************
+
+ * Added missing documentation for the QVERIFY2 macro.
diff --git a/dist/changes-4.2.3 b/dist/changes-4.2.3
new file mode 100644
index 0000000..8041602
--- /dev/null
+++ b/dist/changes-4.2.3
@@ -0,0 +1,373 @@
+Qt 4.2.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.2.0.
+
+The Qt version 4.2 series is binary compatible with the 4.1.x and 4.0.x
+series. Applications compiled for 4.0 or 4.1 will continue to run with 4.2.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Configuration/Compilation
+ * Fixed architecture detection on UltraSPARC-T1 systems.
+ * Fixed compilation on embedded architectures when qreal is not double.
+ * Compile on OpenBSD.
+
+- Documentation
+ * Completed documentation for "Implementing Atomic Operations",
+ which is useful for people porting Qt to a new hardware architecture.
+
+- Translations
+ * Added a new unofficial Portuguese translation courtesy of Helder
+ Correia.
+
+- Qt Linguist
+ * Made the columns in the phrasebook resizeable.
+
+- lupdate
+ * Fixed bug in the .pro parser of lupdate. It should accept backslashes.
+ * Fixed a severe slowdown in lupdate. (~400x speedup.)
+ * Fixed traversal of subdirectories.
+
+- moc
+ * Don't create trigraphs in the generated code for C++ casts.
+
+- uic
+ * Fixed a bug that generated excessive margins for Q3GroupBox.
+
+Third party components
+----------------------
+
+- libpng
+
+ * Security fix: Avoid null dereferences.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General improvements
+--------------------
+
+- Graphics View
+
+ * Calling QGraphicsScene::update() without arguments now correctly
+ updates the entire scene.
+ * Changing the background brush in QGraphicsScene now correctly updates
+ the entire scene
+ * Fixed a crash in QGraphicsScene due to stale pointers in the BSP tree.
+ * QGraphicsScene::createItemGroup() now allows you to create an empty
+ group (previously caused an assert in debug mode).
+ * Fixed rendering bugs with QGraphicsPixmapItem::offset().
+ * Adding an item to a QGraphicsScene now always implicitly causes an
+ update.
+ * Fixed a crash caused by deleting a QGraphicsScene that is being viewed
+ by a QGraphicsView.
+ * Items with zero width or height (e.g., a horizontal or vertical line
+ with a zero-width cosmetic pen) are now rendered correctly.
+ * Fixed a crash in QGraphicsScene::destroyItemGroup(), and when removing
+ items from a group.
+
+- Item views
+ * Fixed data loss in QTreeWidget, QTableWidget and QListWidget that
+ occurred when performing a drag and drop copy operation on items
+ containing data in custom roles.
+
+ * Fixed signal emission bugs in QSqlQueryModel and QSqlTableModel that
+ caused the view to contain invalid items when used with a
+ QSortFilterProxyModel.
+
+ * Fixed a bug in word-wrapped text that could cause all new-line
+ characters, and the last line in string containing at least one
+ newline character, to be removed.
+
+ * Fixed bug in QListView where the last item of a batch was not always
+ displayed.
+
+- QAction
+ * Fixed a possible crash when using alternate shortcuts on a QAction.
+
+- QByteArray
+ * Fixed a crash in toUpper().
+
+- QCleanlooksStyle
+ * Indeterminate progress bars are now correctly animated.
+
+- QComboBox
+ * Fixed broken case sensitive completion.
+ * Changing the font on a QComboBox now changes the font on the popup as
+ well.
+
+- Q3TextEdit
+ * Fixed regression where some shortcuts didn't work on Mac OS X.
+
+- Q3Canvas
+ * Fixed potential memory overrun when determining a clipping chunk.
+
+- Q3Socket
+ * Fixed unexpected remote disconnection bugs (also QTcpSocket).
+
+- QFile
+ * Performance enhancements in QFile::copy().
+ * Allow reading past the previous end of the file if the file grows.
+ * Reliably allow QFile::readLine() and QFile::readAll() to be used to
+ read from stdin on all platforms.
+
+- QFileDialog
+ * Fixed crash that could occur when the filter began with ';;'.
+ * Fixed assertion caused by calling setFilters() with an empty list.
+ * Fixed problem with file entries not being laid out correctly.
+
+- QGridLayout
+ * Fixed bug in handling of fixed size spacers spanning multiple
+ rows/columns
+
+- QLayout
+ * Fixed bug caused by setting minimumSize() and SizePolicy::Fixed on a
+ widget that implements minimumSizeHint() but not sizeHint().
+
+- QLineEdit
+ * Fixed crash caused by moving the cursor over a QChar::LineSeparator
+ in the text.
+
+- QPainter
+ * Fixed bug in QPainter::drawPoints() when using the raster paint engine
+ which caused some points to be missing.
+ * Removed memory leak in raster paint engine when drawing complex
+ polygons/paths.
+
+- QProcess
+ * Fixed a crash that could occur when calling QProcess::waitForFinished()
+ from inside a slot connected to a signal emitted by QProcess.
+ * Fixed a race condition on Windows where QProcess::bytesToWrite() would
+ return a short byte count.
+
+- QTextDocument
+ * Fixed find() with backward searches.
+ * Match CSS style selector case insensitively.
+ * Fixed HTML import for tables with missing cells and rowspan/colspan
+ attributes.
+
+- QSortFilterProxyModel
+ * Fixed a crash caused by calling filterChanged().
+ * Fixed a crash caused by removing items from the source model.
+ * Fixed a bug that could cause a model to enter an invalid state when
+ filtering items in a hierarchy, causing items in a QTreeView to
+ erroneously be collapsed.
+ * Fixed a bug that could cause invalid items to be added when inserting
+ new items to the source model.
+
+- QSyntaxHighlighter
+ * Fixed failing assertion that could occur when installing a syntax
+ highlighter before the document has created a layout.
+
+- QPluginLoader
+ * Fixed compilation of Q_EXPORT_PLUGIN when used with templates.
+
+- QTcpSocket
+ * Fixed a bug where QTcpSocket would time out when connecting to a
+ closed service on Windows.
+ * Fixed a race condition when calling waitFor...() functions with a very
+ short timeout value.
+ * Fixed unexpected remote disconnect problems on Windows.
+ * Improved the reliability of the waitFor...() functions with SOCKS5
+ proxy support.
+
+- QTextLayout
+ * Fixed rendering of surrogate pairs and cursor navigation with them.
+
+- QTextEdit
+ * Fixed crash in QTextEdit::setExtraSelection() that could occur when
+ used with null cursors.
+ * Fixed scrollbar bug which could cause the bottom of the text to be
+ unreachable.
+
+- QTextStream
+ * Fixed QTextStream::readLine() so it can be used reliably with stdin on
+ all platforms, and updated the documentation to reflect this.
+
+- QMacStyle
+ * Ensured that tab bars are drawn correctly regardless of the font used.
+
+- QMenuBar
+ * Properly marked the "text heuristic matching" strings for translation.
+
+- QMenu
+ * Fixed incorrect scrolling on large menus on Mac OS X.
+
+- QPlastiqueStyle
+ * Ensured that indeterminate progress bars are now always animated and
+ fixed a rendering bug.
+
+- QPrinter
+ * Fixed a bug on X11 that caused the printer to generate too many
+ copies.
+ * Fixed a bug in the PostScript driver that could cause invalid
+ PostScript to be generated.
+
+- QSqlRelationalTableModel
+ * Ensured that the internal cache is cleared after
+ QSqlRelationalTableModel::submitAll() is called.
+
+- QSqlDriver
+ * Ensured that QSqlDriver::formatValue() doesn't cut off characters from
+ field names.
+
+- QTextTable
+ * Removed false assertion when deleting the first row or column in a
+ table.
+ * Fixed crash when splitting cells in the rightmost column of a table.
+ * Fixed issue where QTextTable::splitCells() would shift cells further
+ down in the table.
+ * Fixed crash in QTextTable::mergeCells() caused by merging an already
+ merged cell.
+
+- QToolTip
+ * Fixed QToolTip sizes when used with HTML tags like <BR>.
+
+- QUdpSocket
+ * Fixed a busy-wait causing the event loop to spin when writing a
+ datagram to an unbound port.
+ * QUdpSocket now reliably emits readyRead() in connected mode.
+
+- QUrl
+ * Fixed a crash that would occur as a result of calling errorString() on
+ an empty URL.
+
+- SQL plugins
+ * Prevent crashes in QSqlQuery after reopening a closed ODBC connection.
+ * Prevent crash when retrieving binary data from ODBC.
+ * The Interbase driver now returns a valid handle through
+ QSqlDriver::handle().
+
+- QMutex
+ * Fixed race condition in QMutex::tryLock() that would prevent all
+ other threads from acquiring the mutex
+
+- QList
+ * Fixed crash when modifying a QList that must be detached from a
+ separate thread
+
+- QWidget
+ * Fixed case where a modal dialog could be stacked below its parent
+ window when the dialog was shown first
+ * Fixed an erroneous hideEvent() from being sent immediately after
+ window creation
+ * Fixed problem with missing text in QWidget::whatsThis().
+
+- QWindowsStyle
+ * Fixed a crash that could occur when deleting a QProgressBar after its
+ style was changed.
+
+- QVariant
+ * Fixed assertion caused by streaming in a variant containing a float.
+
+- QAbstractItemView
+ * Fixed focus problem with cell widgets.
+
+- QTableView
+ * Fixed problem with context menus clearing the selections.
+
+- QHeaderView
+ * Fixed assertion that could occur when removing all sections when some
+ sections had been moved.
+ * Fixed a bug that could prevent the user from resizing the last
+ visible section if the "real" last section was invisible.
+
+- QListView
+ * Fixed crash when calling reset.
+
+- QTableWidget
+ * Fixed painting problem that could occur when rows were swapped.
+
+- QTreeView
+ * Fixed a crash that could appear when removing all the children of an
+ item.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+ * Fixed detection of Type1 symbol fonts.
+ * Fixed crash on exit in QSystemTrayIcon when QApplication is used
+ as the parent.
+ * Fixed animation GUI effects on tooltips, menus, and comboboxes.
+ * Fixed crashes in threaded programs when Qt uses the Glib main
+ loop.
+ * Fixed bug where an empty LANG environment variable could prevent input
+ of non-ASCII chars in Qt widgets.
+ * Fixed leak of initial style created by QApplication after calling
+ QApplication::setStyle().
+ * Fixed erroneous event delivery to a widget that has been destroyed.
+ * Prevent shortcuts for keypad arrow keys from being activated when
+ Num Lock is on.
+ * Fixed bug which caused incorrect drawing of subrectangles of bitmaps.
+ * Fixed bug in rendering of the Bengali script.
+
+Windows
+-------
+ * Fixed compilation with -no-stl.
+ * Fixed compilation with Windows SDK for Vista.
+ * Fixed an issue that could cause missing text when Cleartype was used.
+ * Fixed the hot-spot locations for OpenHandCursor and CloseHandCursor.
+ * Fixed infinite warning loop about adopted threads in applications with
+ many threads.
+ * Fixed assertion caused by hiding a child widget whose window has not
+ yet been created.
+ * Fixed QWindowsXPStyle so that it is possible to draw a
+ QStyle::CE_DockWidgetTitle without having an actual instance of
+ QDockWidget.
+ * Fixed crash when drawing text with large font sizes.
+ * Fixed support for the Khmer language.
+ * Fixed incorrect reporting of frameGeometry() after a window is closed.
+ * Fixed crash when handling spurious WM_CHAR from Remote Desktop Client.
+ * Fixed crash in JPEG plugin while loading.
+ * Fixed crash in QFileDialog::getExistingDirectory() when specifying
+ a parent that has not been shown yet.
+
+Mac OS X
+--------
+ * Fixed regression where dragging/copying Unicode text in Qt to another
+ application would only export the non-Unicode version.
+ * Fixed regression where releasing the mouse button would send two mouse
+ releas events to a widget.
+ * Fixed regression where the drop action would be reset after a native
+ "DragLeave" event was received.
+ * Wrapping a (non-Qt) window's content view and resizing before showing
+ the window for the first time now works correctly.
+ * Ensured that the content view is always created before we QWidgets are
+ added to a window - this allows better integration with Cocoa apps.
+ * Fixed regression where text/uri-list was inadvertently disabled for
+ clipboards.
+ * Fixed regression where setting the brushed metal style on a message
+ box would show the label in a non-metallic style.
+ * Fixed the open source binary package to have the correct definitions
+ for development.
+
+Qtopia Core
+-----------
+ * Fixed a data corruption bug in QDataStream on ARM processors where
+ reading and writing doubles/qreals would be incompatible with streams
+ on other platforms.
+ Note: corrupt data streams generated with previous versions of Qtopia
+ Core on ARM platforms cannot be read with this version.
+ * Fixed a possible buffer overflow in the VNC driver.
+ * Fixed a memory leak in the windowing system.
+ * Fixed painting errors occuring with use of QT::WA_PaintOnScreen on
+ certain screen configurations.
+ * Improved performance when using a 16-bit brush as the background on a
+ 16-bit screen.
+ * Improved performance of 16-bit semi-transparent solid fills.
+ * Fixed crash that could occur when saving a 16-bit image in BMP or PPM
+ formats.
+ * Fixed bug where window icons would not be shown in Plastique style.
+ * Fixed bug in QWSServer::setMaxWindowRect() on rotated displays.
+ * Fixed crash with normalized Unicode characters and QPF fonts.
+ * Ensured that QWidget::minimumSize() does not become larger than the
+ screen size.
+
diff --git a/dist/changes-4.2CEping b/dist/changes-4.2CEping
new file mode 100644
index 0000000..530c650
--- /dev/null
+++ b/dist/changes-4.2CEping
@@ -0,0 +1,73 @@
+Changes for Qt/CE 4.2.x "Ping" release.
+
+****************************************************************************
+* Features *
+****************************************************************************
+
+- Added QtNetwork
+
+- Added QFEATURES system
+
+- Added more examples/demos
+
+- configure.exe
+ * additions for QFEATURES
+
+- Native look and feel
+ * click&hold opens context menu
+ * only allow single application launch, second startup changes to running instance
+ * added experimental Windows CE 6 support
+
+****************************************************************************
+* Bug fixes *
+****************************************************************************
+
+- qmake
+ * fix Visual Studio project file generator for THUMB instructions
+
+- Styles
+ * removed big icon images to reduce library sizes
+
+- QColorDialog
+ * fix size issues for Windows CE
+
+- QDebug
+ * fix multiple output of lines when using Visual Studio
+
+- QFile
+ * fix creation/resolving links
+
+- QFontDatabase
+ * fix bug for multiple system fonts available on device
+
+- QFontEngine
+ * fix alignment issues for line edits
+
+- qgetenv/qputenv
+ * fix memory leak
+
+- QLocale
+ * fix timezone issues regarding standard SDK.
+
+- QMessageBox
+ * fix OK button bug
+
+- QSessionManager
+ * fix id creation
+
+- QTabWidget
+ * fix positioning bug
+
+- QWidget
+ * fix size related bugs
+ * fix window-animation when switching between menus (WindowsCEStyle)
+
+- QWindowsCEStyle
+ * various fixes
+
+- QWindowsMobileStyle
+ * smartphone fixes
+
+- winmain module
+ * fix leak
+
diff --git a/dist/changes-4.3.0 b/dist/changes-4.3.0
new file mode 100644
index 0000000..f4e1d1a
--- /dev/null
+++ b/dist/changes-4.3.0
@@ -0,0 +1,2445 @@
+Qt 4.3 introduces many new features as well as many improvements and
+bugfixes over the 4.2.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/4.3
+
+The Qt version 4.3 series is binary compatible with the 4.2.x series.
+Applications compiled for 4.2 will continue to run with 4.3.
+
+The Qtopia Core version 4.3 series is binary compatible with the 4.2.x
+series except for some parts of the device handling API, as detailed
+in Platform Specific Changes below.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.trolltech.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain
+more information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Configuration/Compilation
+ * Fixed OpenBSD and NetBSD build issues.
+
+- Legal
+ * Added information about the OpenSSL exception to the GPL.
+
+- Documentation and Examples
+ * Added information about the TS file format used in Linguist.
+ * Moved platform and compiler support information from
+ www.trolltech.com into the documentation.
+ * Added an Accessibility overview document.
+ * Added new example to show usage of QCompleter with custom tree models.
+
+- Translations
+ * Added a Slovak translation of Qt courtesy of Richard Fric.
+ * Added a Ukrainian translation of Qt courtesy of Andriy Rysin.
+ * Added a Polish translation of the Qt libraries and tools courtesy of
+ Marcin Giedz, who also provided a Polish phrasebook for Qt Linguist.
+ * [155464] Added a German translation for Qt Designer.
+
+- Added support for the CP949 Korean Codec.
+
+- [138140] The whole Qt source compiles with the QT_NO_CAST_FROM_ASCII
+ and QT_NO_CAST_TO_ASCII defines and therefore is more robust when
+ using codecs.
+
+- Added support for HP-UX 11i (Itanium) with the aCC compiler
+
+- Changed dialogs to respond much better to the LanguageChange event.
+ (i.e. run time translation now works much better.)
+
+- Signals and slots
+ * [61295] Added Qt::BlockingQueuedConnection connection type, which
+ waits for all slots to be called before continuing.
+ * [128646] Ignore optional keywords specified in SIGNAL() and SLOT()
+ signatures (struct, class, and enum).
+ * Optimize emitting signals that do not have anything connected to them.
+
+- [121629] Added support for the MinGW/MSYS platform.
+
+- [102293] Added search path functionality (QDir::addSearchPath)
+
+- Almost all widgets are now styleable using Qt Style Sheets.
+
+Third party components
+----------------------
+
+- Updated Qt's SQLite version to 3.3.17.
+
+- Updated Qt's FreeType version to 2.3.4.
+
+- Updated Qt's libpng version to 1.2.16.
+
+- Added libtiff version 3.8.2 for the TIFF plugin.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QAbstractButton
+ * [138210] Ensured strictly alternating ordering of signals resulting
+ from auto-repeating shortcuts. Fixed a repeat timer bug that cause
+ cause infinite retriggering to occur.
+ * [150995] Fixed bug where non-checkable buttons take focus when
+ activating shortcuts.
+ * [120409] Fixed bug where the button was set to unpressed when the
+ right mouse button was released.
+
+- QAbstractItemView
+ * [111503] Ensured that focus is given back to the view when the Tab key
+ is pressed while inside an editor.
+ * [156290] Use slower scrolling when the ScrollMode is set to
+ ScrollPerItem.
+ * Ensured that the item view classes use the locale property when
+ displaying dates and numbers to allow easy customization.
+ * Fixed a repaint issue with the focus rectangle in cases where
+ selection mode is NoSelection.
+ * [147422] Detect when persistent editors take/lose focus and update the
+ view accordingly.
+ * [146292] Items are now updated even if they contain an editor.
+ * [130168] Auto-scrolling when clicking is now delayed to allow
+ double-clicking to happen.
+ * [139247] Fixed bug where clicking on a partially visible item was
+ triggering a scroll and the wrong item was then clicked.
+ * [137729] Use dropAction() instead of proposedAction() in
+ QAbstractItemView::dropEvent().
+ * Fixed a bug that prevented keyboardSearch() from ignoring disabled
+ items.
+ * [151491] Ensured that we pass a proper MouseButtonPress event in
+ QAbstractItemView::mouseDoubleClickEvent().
+ * [147990] Ensured that double-clicking does not open an editor when
+ the edit trigger is set to SelectedClicked.
+ * [144095] Ensured that sizeHintForIndex() uses the correct item
+ delegate.
+ * [140180] Ensured that clicking a selected item clears all old
+ selections when the view is using the ExtendedSelection selection mode
+ and SelectedClicked as an edit trigger.
+ * [130168] Fixed bug where double clicking on partially visible items
+ would not activate them.
+ * [139342] Allow editing to be started programatically, even if there
+ are no edit triggers.
+ * [130135] Added public slot, updateIndex(const QModelIndex &index).
+
+- QAbstractProxyModel
+ * [154393] QAbstractProxyModel now reimplements itemData().
+
+- QAbstractSlider
+ * [76155] Fixed bug where the slider handle did not stop under the
+ mouse.
+
+- QAbstractSocket
+ * [128546] Fixed bug where an error was emitted with the wrong type.
+
+- QAccessible
+ * Added preliminary support for the upcoming IAccessible2 standard.
+ * Made improvements to most of the accessible interfaces.
+ * [154534] Ensured that our accessible interfaces honour
+ QWidget::setAccessibleName() and QWidget::setAccessibleDescription().
+ * Avoid crash if QAccessibleInterface::object() returns 0.
+ (It is absolutely legal to return a null value.)
+
+- QApplication
+ * Added a flash() method for marking windows that need attention.
+ * [86725] Allow the -style command line argument to override a
+ style set with QApplication::setStyle() before QApplication
+ construction.
+ * [111892] Fixed a bug that caused Qt to steal all input when
+ connecting the QAction::hovered() signal to a slot that called
+ QMainWindow::setEnabled(false).
+ * [148512] Fixed QApplication::keyboardModifiers() to update
+ correctly when minimizing the window when Qt::MetaModifier is held
+ down.
+ * [148796] Fixed a bug that prevented Qt from detecting system font
+ changes.
+ * [154727] Prevent a crash when a widget deletes itself in an key
+ event handler without accepting the event.
+ * [156484] Fixed a bug where lastWindowClosed() was emitted for each
+ top-level window when calling QApplication::closeAllWindows().
+ * [157667] Ensured that widgets with the Qt::WA_DeleteOnClose property
+ set are properly deleted when they are closed in the dropEvent()
+ handler following a drag that was started in the same application.
+ * [156410] Implemented QEvent::ApplicationActivate and
+ QEvent::ApplicationDeactivate on all platforms. Note that
+ QEvent::ApplicationActivated and QEvent::ApplicationDeactivated are
+ now deprecated.
+
+- QAtomic
+ * [126321] Fixed several flaws in the inline assembler implementations
+ for several architectures (ARM, i386, PowerPC, x86-64).
+ * [133043] Added support for atomic fetch-and-add.
+
+- QAuthenticator
+ * New Class. Needed for authentication support in the Network module.
+ Currently supports the Basic, Digest-MD5 and NTLM authentication
+ mechanisms.
+
+- QBitArray
+ * [158816] Fixed crash in operator~().
+
+- QCalendarWidget
+ * Don't set maximum width for month/year buttons.
+ * Ensured that the QPalette::Text role is used for default text.
+ * Added a date editor which can be configured with the dateEditEnabled
+ and dateEditAcceptDelay properties.
+ * [137031] Ensured that grid lines are drawn properly when headers are
+ not visible.
+ * [151828] Ensured that the language can be set with
+ QCalendarWidget::setLocale().
+
+- QChar
+ * Updated the Unicode tables to Unicode 5.0.
+ * Added foldCase() and toTitleCase() methods.
+ * Added public API to handle the full Unicode range.
+
+- QCleanlooksStyle
+ * [129506] Sliders now look and behave correctly in both reversed and
+ inverted appearance modes.
+ * [131490] Group boxes no longer reserve space for their titles when no
+ title is set.
+ * [134344] A sunken frame is now used to indicate checked menu items
+ with icons.
+ * [133691] Improved the appearance of spin boxes and buttons when used
+ against dark backgrounds.
+ * [154499] Fixed a rendering issue with disabled, checked push buttons.
+ * [154862] Fixed an issue causing combo boxes to sometimes show clipped
+ text.
+ * Slider appearance is now based on Clearlooks Cairo and the performance
+ on X11 has been improved.
+ * The appearance of tab bars when used with Qt::RightToLeft layout
+ direction has been improved.
+ * Dock widget titles are now elided if they are too long to fit in the
+ available space.
+
+- QClipboard
+ * Ensured that calling clear() on the Mac OS X clipboard really clears
+ its data.
+ * [143927] Don't drop alpha channel information when pasting pixmaps on
+ Mac OS X.
+ * The Mac OS X clipboard support now understands TIFF information and
+ can export images as TIFF as well.
+ * [145437] Fixed crash that could occur when calling setMimeData() twice
+ with the same data.
+ * QMacMime now does correct normalization of file names in a URL list
+ from foreign applications.
+
+- QColor
+ * [140150] Fixed bug where QColor::isValid() would return true for
+ certain invalid color strings.
+ * [120367] Added QColor::setAllowX11ColorNames(bool), which enables
+ applications to use X11 color names.
+ * Fixed internal errors in toHsv() due to inexact floating point
+ comparisions.
+
+- QColorDialog
+ * [131160] Enabled the color dialog to be used to specify an alpha color
+ on Mac OS X.
+
+- QColumnView
+ * A new widget that provide a column-based implementation of
+ QAbstractItemView.
+
+- QComboBox
+ * Significantly reduced the construction time of this widget.
+ * [155614] Speeded up addItem() and addItems().
+ * [150768] Ensured that inserting items doesn't change the current text
+ on editable combo boxes.
+ * [150902] Ensured that only the left mouse button can be used to open
+ the popup list.
+ * [150735] Fixed pop-up hiding behind top-level windows on Mac OS X.
+ * [156700] Fixed bug where the popup could be closed when pressing the
+ scroll arrows.
+ * [133328] Fixed bug where disabled entries were not grayed out.
+ * [134085] Fixed bug where the AdjustToContents size policy had no
+ effect.
+ * [152840] Fixed bug where QComboBox would not automatically scroll to
+ the current item.
+ * [90172] Fixed bug where the sizeHint() implementation iterated over
+ all icons to detect their availability.
+
+- QCompleter
+ * Significantly reduced the construction time of this widget.
+ * Added support for lazily-populated models.
+ * [135735] Made QCompleter work when used in a QLineEdit with a
+ QValidator.
+ * Added the wrapAround property to allow the list of completions to
+ wrap around in popup mode.
+ * Added support for sharing of completers, making it possible for the
+ same QCompleter object to be set on multiple widgets.
+ * [143441] Added support for models that sort their items in descending
+ order.
+
+- QCoreApplication
+ * Added support for posted event priorities.
+ * [34019] Added the QCoreApplication::removePostedEvents() overload
+ for removing events of a specific type.
+ * Documented QCoreApplication::processEvents() as thread-safe;
+ calling it will process events for the calling thread.
+ * Optimized delivery of QEvent::ChildInserted compatibility events.
+ * [154727] Enabled compression of posted QEvent::DeferredDelete events
+ (used by QObject::deleteLater()) to prevent objects from being deleted
+ unexpectedly when many such events are posted.
+ * Ensured that duplicate entries in library paths are ignored.
+
+- QCryptographicHash
+ * New Class. Provides support for the MD4, MD5 and SHA1 hash functions.
+
+- QCursor
+ * [154593] Fixed hotspot bug for cursors on Mac OS X.
+ * [153381] Fixed crash in the assignment operator in cases where the
+ cursor was created before a QApplication instance.
+
+- QDataWidgetMapper
+ * [125493] Added addMapping(QWidget *, int, const QByteArray &) and
+ mappedPropertyName(QWidget *) functions.
+
+- QDateTime
+ * [151789] Allow passing of date-only format to QDateTime::fromString()
+ (according to ISO 8601).
+ * [153114, 145167] Fixed bugs that could occur when parsing strings to
+ create dates.
+ * [122047] Removed legacy behavior which assumed that a year between 0
+ and 99 meant a year between 1900 and 1999.
+ * [136043] Fixed the USER properties.
+
+- QDateTimeEdit
+ * [111557, 141266] Improved the behavior of the widget with regard to
+ two-digit years. Made stepping work properly.
+ * [110034] Don't change current section when a WheelEvent is received.
+ * [152622] Don't switch section when a FocusInEvent is received if the
+ reason is Popup.
+ * Fixed a bug that would cause problems with formats like dd.MMMM.yyyy.
+ * [148522] Ensured that the dateRange is valid for editors that only
+ show the time.
+ * [148725] Fixed a bug with wrapping and months with fewer than 31 days.
+ * [149097] Ensured that dateTimeChanged() is emitted, even if only date
+ or time is shown.
+ * [108572] Fixed the behavior to ensure that typing 2 into a zzz field
+ results in a value of 200 rather than 002.
+ * Ensured that the next field is entered when a separator is typed.
+ * [141703] Allow empty input when only one section is displayed.
+ * [134392] Added a sectionCount property.
+ * [134392] Added sectionAt(), currentSectionIndex(), and
+ setCurrentSectionIndex() functions.
+ * Added a NoButtons value for the buttonSymbols property.
+
+- QDesktopWidget
+ * [135002] Ensured that the resized() signal is emitted after the
+ desktop is resized on Mac OS X.
+
+- QDial
+ * [151897] Ensured that, even with tracking disabled, the signal
+ sliderMoved() is always emitted.
+ * [70209] Added support for the inverted appearance property.
+
+- QDialog
+ * [131396] Fixed a crash in QDialog::exec() that could occur when the
+ dialog was deleted from an event handler.
+ * [124269] Ensured that the size grip is hidden for extended dialogs.
+ * [151328] Allow the use of buttons on the title bar to be explicitly
+ specified on Mac OS X.
+
+- QDialogButtonBox
+ * [154493] Moved the Action role before the Reject role on Windows to
+ conform with platform guidelines.
+
+- QDir
+ * [136380] QDir's permission filters on Unix now behave the same as on
+ Windows (previously the filters' behavior was reversed on Unix).
+ * [158610] Passing QDir::Unsorted now properly bypasses sorting.
+ * [136989] Ensured that removed dirs are reported as non-existent.
+ * [129488] Fixed cleanPath() for paths with the "foo/../bar" pattern.
+
+- QDirIterator
+ * New class. Introduced to provide a convenient way to examine the
+ contents of directories.
+
+- QDockWidget
+ * [130773] Ensure that dock widgets remember their undocked positions
+ and sizes.
+ * Added support for vertical title bars, which can be used to save space
+ in a QMainWindow.
+ * Added support for setting an arbitrary widget as a custom dock widget
+ title bar.
+ * [141792] Added the visibilityChanged() signal which is emitted when
+ dock widgets change visibility due to show or hide events, or when
+ being selected or deselected in a tabbed dock area.
+ * Added the dockLocationChanged() signal which is emitted when dock
+ widgets are moved around in a QMainWindow.
+ * [135878] Titlebars now support mnemonics properly.
+ * [138995] Dock widget titlebars now correctly indicate their activation
+ state.
+ * [145798] Ensured that calling setWindowTitle() on a nested, docked
+ dock widget causes the title in the tab bar to be updated.
+
+- QDomDocument
+ * [128594] Ensured that comment nodes are indented correctly when
+ serializing a document to a string.
+ * [144781] Fixed crash that would occur when the owner document of new
+ attributes was not adjusted.
+ * [107123] Ensured that appendChild() does not erroneously add two
+ elements to document nodes in certain cases.
+
+- QDoubleSpinBox
+ * [99254] Allow higher settings for decimals.
+
+- QDrag
+ * [124962] Added QDrag::exec() to allow the default proposed action to
+ be changed.
+
+- QFile
+ * [128352] Refactored the backend on Windows with major performance
+ improvements; in particular line and character reading is now much
+ faster.
+ * [146693] Fixed a lock-up in copy().
+ * [148447] QFile now supports large files on Windows where support is
+ available.
+ * Generally improved support for stdin.
+ * Byte writing performance has improved on all platforms.
+ * [151898] Added support for reading lines with an embedded '\0'
+ character.
+
+- QFileDialog
+ * Updated the dialog to use native icons.
+ * Made general improvements to the dialog's performance.
+ * Added a sidebar to show commonly used folders.
+ * [134557] Added the ability to use a proxy model.
+ * Added dirEntered() and filterSelected() signals, previously found in
+ Qt 3's file dialog.
+ * [130353] Fixed Qt/Mac native file dialog pattern splitting
+ * [140332] Made the dialog respond much better to the LanguageChange
+ event.
+ * [154173] Fixed a memory deallocation error.
+ * Made the selected filter argument work for native Mac OS X file
+ dialogs.
+
+- QFileInfo
+ * Ensured that the value of Mac FS hidden flag is returned for symbolic
+ links and not their targets; i.e., hidden links are not followed.
+ * [128604] Introduced isBundle() for Mac OS X bundle types.
+ * [139106] Fixed bug that could cause drives to be reported as hidden
+ on Windows.
+
+- QFileSystemWatcher
+ * [155548] Reliability fixes.
+ * When in polling mode, send change notification when file permissions
+ change.
+ * [144049, 149637] Fixed a bug that prevented watching a directory
+ for notification on Windows.
+ * [143381] Fixed bug that caused addPath() and removePath() to fail when
+ passing an empty string.
+
+- QFocusFrame
+ * [128713, 129126] Made the focus frame visible in more situations on
+ Mac OS X.
+
+- QFont
+ * X11: Add a method to retrieve the FreeType handle from the QFont.
+
+- QFontComboBox
+ * [132826] Fixed a bug that could cause the popup list to be shown
+ off-screen.
+ * [155614] Speeded up addItem() and addItems().
+ * [160110] Fixed crash that could occur when setting a pixel size for
+ the fonts.
+
+- QFontMetrics
+ * [152013] Fixed bug where boundingRect() gave sizes that were too large
+ when compiled using Visual Studio 6.
+ * [145980] Added tightBoundingBox() method.
+
+- QFrame
+ * [156112] Fixed bug where the default frame was not correct when
+ created without a parent and reparented afterwards.
+ * [150995] Fixed bug where setting the frame style did not invalidate
+ the size hint
+
+- QFSFileEngine
+ * Fixed bug in fileTime() on Win98 and WinME
+ * Ensured that the working directory of a Windows shortcut is set when
+ a link is created.
+ * Improved the reliability of buffered reads on platforms that cache
+ their EOF status.
+
+- QFtp
+ * [107381] Greatly improved LIST support; QFtp now supports more server
+ types.
+ * [136008] Improved tolerance for servers with no EPRT/EPSV support.
+ * [150607] Fixed a race condition when using ActiveMode for uploading.
+
+- QGL
+ * [158971] Fixed a resource leak in the GL texture cache.
+
+- QGLFramebufferObject
+ * Made it possible to configure the depth/stencil buffer in a
+ framebuffer object.
+ * Added support for floating point formats for the texture in a
+ framebuffer object.
+
+- QGLPixelBuffer
+ * [138393] Made QGLPixelbuffer work under Windows on systems without the
+ render_texture extension.
+
+- QGLWidget
+ * [145621] Avoided a QGLFormat object copy when checking the buffer
+ format with the doubleBuffer() function.
+ * [100519] Rewritten renderText(). It now supports Unicode text, and it
+ doesn't try to overwrite previously defined display lists.
+
+- QGraphicsItem
+ * [151271] Fixed crash that could occur when calling update on items
+ that are not fully constructed.
+ * Ensured that the selected state no longer changes state twice
+ for each mouse click.
+ * [138576] setParent() now correctly adds the child to the parent's
+ scene.
+ * [130263] Added support for partial obscurity testing with the
+ isObscured(QRectF) function.
+ * [140725] QGraphicsTextItem is now also selectable when editable.
+ * [141694] QGraphicsTextItem now calls ensureVisible() if it has input
+ focus.
+ * [144734] Fixed bugs in unsetCursor().
+ * [144895] Improved bounding rectangle calculations for all standard
+ items.
+ * Added support for QTransform.
+ * [137055] Added QGraphicsItem::ItemPositionHasChanged and
+ ItemTransformHasChanged.
+ * Added several convenience functions.
+ * [146863] Added ItemClipsToShape and ItemClipsChildrenToShape clipping
+ flags.
+ * [139782] Greatly improved hit and selection tests.
+ * [123942] Added the ItemIgnoresTransformations flag to allow items to
+ bypass any inherited transformations.
+ * All QGraphicsItem and standard item classes constructors have now had
+ their scene arguments obsoleted.
+ * [150767] Added support for implicit and explicit show and hide.
+ Explicitly hidden items are no longer implicitly shown when their
+ parent is shown.
+ * [151522] Fixed crash when nesting QGraphicsItems that enabled child
+ event handling.
+ * [151265] Cursors now change correctly without mouse interaction.
+ * Added deviceTransform() which returns a matrix that maps between item
+ and device (viewport) coordinates.
+ * Added the ItemSceneChange notification flag.
+ * [128696] Enabled moving of editable text items.
+ * [128684] Improved highlighting of selected items.
+
+- QGraphicsItemAnimation
+ * [140522] Fixed special case interpolation bug.
+ * [140079] Fixed ambiguity in the position of insertions when multiple
+ items are inserted for the same step in an animation.
+
+- QGraphicsScene
+ * [130614] Added the invalidate() function for resetting the cache
+ individually for each scene layer.
+ * [139747] Fixed slow memory leaks caused by repeatedly scheduling
+ single-shot timers.
+ * [128581] Added the selectionChanged() signal which is emitted when
+ the selection changes.
+ * Introduced delayed item reindexing which greatly improves performance
+ when moving items.
+ * The BSP tree implementation has undergone several optimizations.
+ * Added new bspTreeDepth property for fixating the BSP tree depth.
+ * Optimization: Reduced the number of unnecessary index lookups.
+ * [146518] Added the selectionArea() function.
+
+- QGraphicsSceneWheelEvent
+ * [146864] Added wheel orientation.
+
+- QGraphicsView
+ * [136173] Hit-tests are now greatly improved for thin items.
+ * [133680] The scroll bars are now shown at their maximum extents
+ instead of overflowing when the transformed scene is larger than
+ the maximum allowed integer range.
+ * [129946] Changing the viewport no longer resets the acceptsDrops()
+ property.
+ * [139752] ScrollHandDrag is now allowed also in non-interactive mode.
+ * [128226] Fixed rubber band rendering bugs (flicker and transparency).
+ * [144276] The selection is no longer reset by scroll-dragging.
+ * Added support for QTransform.
+ * [137027] Added new viewportUpdateMode() property for better control
+ over how QGraphicsView schedules updates.
+ * Several convenience functions have been added.
+ * [146517] Added rubberBandSelectionMode() for controlling how items are
+ selected with the rubber band.
+ * [150344] Fixed the scroll bar ranges to prevent the scroll bars from
+ hiding parts of the scene.
+ * [150321] Added new optimizationFlags() property, allowing individual
+ features to be disabled in order to speed up rendering.
+ * The level of detail algorithm has been changed to improve support for
+ transformations that change the view's aspect ratio.
+ * [154942] Fixed background rendering in render().
+ * [156922] render() now properly supports all transformations, source
+ and target rectangles.
+ * [158245] Calling setScene(0) now implicitly calls update().
+ * [149317] Added NoViewportUpdate to the set of modes that can be set
+ for updating a view.
+
+- QGridLayout
+ * [156497] Fix a one-off error that could cause the bottom button in
+ a QDialogButtonBox to be cropped.
+
+- QHeaderView
+ * This widget now uses Qt::NoFocus as its default focus policy.
+ * [99569] Improved performance, providing up to a 2x speed increase for
+ some cases.
+ * [146292] Fixed bug that made it impossible to resize the last section
+ under certain circumstances.
+ * [144452] Fixed bug that caused setDefaultAlignment() to have no
+ effect.
+ * [156453] Fixed column resizing bug that could cause branches in one
+ column to be drawn in the next.
+ * [142640] Ensured that the Qt::SizeHintRole is used when available.
+ * [142994] Hidden items are now restored to their original size when
+ shown.
+ * [127430] Added saveState() and restoreState().
+ * [105635] Added support for drag selecting.
+
+- QHostInfo
+ * [141946] No longer stops working after QCoreApplication is destroyed.
+ * [152805] Now periodically reinitializes DNS settings on Unix.
+
+- QHttp
+ * [139575] Fixed state for servers that use the "100 Continue" response.
+ * Added support for the HTTPS protocol.
+ * Improved proxy support.
+ * Added support for server and proxy authentication.
+
+- QIcon
+ * Added cacheKey() as a replacement for serialNumber().
+ * Fixed the streaming operators.
+
+- QImage
+ * [157549] Fixed a crash that could occur when calling copy() with
+ negative coordinates.
+ * Added cacheKey() as a replacement for serialNumber().
+ * [131852] Optimized rotations by 90 and 270 degrees.
+ * [158986] Fixed painting onto an images with the Format_RGB16 image
+ format.
+ * Fixed rotations by 90 and 270 degrees for images with the Format_RGB16
+ image format.
+ * [152850] Fixed bugs in text() and setText().
+ * Fixed a crash that could occur when passing a 0 pointer to the
+ constructor that accepts XPM format image data.
+ * [150746] Added a constructor that accepts an existing memory buffer
+ with non-default stride (bytes per line).
+
+- QImageReader
+ * [141781] Fixed support for double byte PPM files (>256 colors).
+
+- QImageWriter
+ * Added support to enable compression if a plugin supports it.
+
+- QInputDialog
+ * [115565] Disabled OK button for non-acceptable text (getInteger() and
+ getDouble()).
+ * [90535] Input dialogs now have a size grip
+
+- QIntValidator, QDoubleValidator
+ * Validators now use the locale property to recognize numbers
+ formatted for various locales.
+
+- QItemDelegate
+ * [145142] Ensured that text is not drawn outside the bounds of a cell.
+ * [137198] Fixed handling of cases where the decoration position is set
+ to be at the bottom of an item to prevent the text from being
+ incorrectly positioned.
+ * [142593] Take word wrap into account when calculating an item's size
+ hint.
+ * [139160] Ensured that the focus rectangle is shown, even for empty
+ cells.
+
+- QItemSelectionModel
+ * Made optimizations for some common cases.
+ * [143383] Fixed incorrect behavior of hasSelection().
+
+- QLabel
+ * [133589] Fixed performance problems with plain text labels.
+ * Fixed support for buddies with rich text labels.
+ * [136918] Fixed setText() to not turn off mouse tracking when the text
+ used is plain text.
+ * [143063] Ensured that the mouse cursor is reset when a link is
+ clicked.
+ * [156912] Fixed bug where the mouse cursor shape was changed to the
+ pointing hand cursor, but would not be correctly cleared afterwards.
+
+- QLayout
+ * Added new features to Qt's layout system to enable:
+ - independent values for all of the four margins,
+ - independent horizontal spacing and vertical spacing in QGridLayout,
+ - non-uniform spacing between layout items,
+ - layout items to occupy parts of the margin or spacing when required
+ by the application or style.
+
+- QLibrary
+ * Fixed bug that caused QLibrary::load() to discard the real error
+ message if the error was something else than ERROR_MOD_NOT_FOUND.
+ (Win32)
+ * Fixed bug that prevented QLibrary::load() from loading a library with
+ no suffix (because LoadLibrary automagically appended the .dll suffix
+ on Win32).
+ * Corrected behavior of fileName() to ensure that, if we loaded a
+ library without specifying a suffix and the file found had the .dll
+ suffix, the fileName found is returned instead of the fileName
+ searched for (as was previously the case).
+ * [156276] Fixed behavior of unload() to return true only if the library
+ could be unloaded.
+
+- QLineEdit
+ * [156104] Ensured that input methods are disabled when not in the
+ Normal edit mode.
+ * [157355] Fixed drag and drop bug on Mac OS X that could occur when
+ dragging inside the widget.
+ * [151328] Ensured that the caret is removed when text is selected on
+ Mac OS X.
+ * [136919] Ensured that fewer non-printable characters are replaced
+ with spaces.
+
+- QList
+ * Fixed a race-condition in QList::detach() which could cause an
+ assertion in debug mode.
+
+- QListView
+ * [136614] Fixed the behavior of Batched mode to ensure that the last
+ item of the batch is displayed.
+ * Fixed some issues with jerky scrolling in ScrollPerItem mode if the
+ grid size was different to the delegate's size hint.
+ * [113437] Prevent noticeable flicker on slow systems in Batched mode
+ by laying out the first batch immediately.
+ * [114473] Added a new property to QListView: selectionRectVisible.
+ * Fixed a bug that could cause too many items to be selected.
+ * Fixed issue that could cause list views to have incorrect scroll bar
+ ranges if their grid sizes differed from their item sizes.
+ * [144378] Improved navigation for cases where an item is taller than
+ the viewport.
+ * [148846] Fixed an issue that prevented scroll bars from being updated
+ correctly when items were moved programmatically.
+ * [143306] Improved support for keyboard navigation and selection.
+ * [137917] Shift-click extended mode selection in icon mode now selects
+ the correct items.
+ * [138411] Fixed bug where hidden items would cause drawing problems
+ when pressing Ctrl+A.
+
+- QListWidget
+ * [146284] Ensured that the effect of SingleSelection mode is also taken
+ into account when setSelected() is called on items.
+ * [151211] Added removeCellWidget() and removeItemWidget() functions.
+
+- QLocale
+ * Updated the locale database to CLDR 1.4: more locales supported;
+ numerous fixes to existing locales.
+
+- QMacStyle
+ * [159270] Fixed drawing of icons on buttons with no text.
+ * [146364] Fixed drawing of multi-line text for items in a QToolBar.
+ * [145346] Removed unwanted wrapping of text in a QPushButton.
+ * Fixed drawing of "Flat" group boxes.
+ * [113472] Fixed drawing of text on vertical headers when resizing.
+ * [148509] Ensured that the correct font is used for buttons and labels
+ when the application is not configured to use the desktop settings.
+ * [106100] Improved the look of push buttons with menus.
+ * Made fixes to Qt's layout system that enable more native-looking
+ forms.
+ * [151739] Buttons with an icon are now centered correctly.
+ * [142672] Fixed font size bug on the drop down box for QComboBox.
+ * [148832] The button on a combo box is now showing as pressed when the
+ drop down menu is shown.
+ * [147377] Ensured that combo boxes now scale correctly on Mac OS X.
+ * [143901] Fixed the highlight color for widgets such as QComboBox so
+ that it follows the system settings on Mac OS X.
+ * [151852] Fixed size calculation for QPushButton with an icon.
+ * [133263] Removed the coupling of text size and button kind, enabling
+ them to be set independently.
+ * [133263] Ensured that QPushButton respects calls to setFont().
+ * [141980] Text with small font sizes is now centered vertically correct
+ inside push buttons.
+ * [149631] Ensure that beveled button types are chosen if text doesn't
+ fit inside a button instead of cutting the text.
+ * [151500] Fixed incorrect QPushButton text clipping behavior.
+ * [147653] Fixed bug that caused the sort indicator to be drawn on top
+ of the text in QHeaderView.
+ * [139149] Fixed issues with CE_SizeGrip in right-to-left mode.
+ * [139311] Improved drawing of the title in QGroupBox.
+ * [128713] Ensured that drawing of the focus frame now follows pixel
+ metrics.
+ * [142274] Made QSlider tickmark drawing more like Cocoa.
+ * focusRectPolicy() is now obsolete. This is now controlled by the
+ Qt::WA_MacShowFocusRect attribute.
+ * widgetSizePolicy() is now obsolete. This is now controlled by the
+ Qt::WA_Mac*Size attribute.
+ * [129503] Ensured that a group box without a title no longer allocates
+ space for it.
+ * Ensured that a more appropriate width is used for push buttons.
+ * [132674] Ensured that tab bar drawing is correct when the tab's font
+ isn't as tall as the default.
+ * [126214] Ensured that the QSizeGrip is drawn correctly in brushed
+ metal windows.
+ * Improved styling of docked QDockWidgets.
+
+- QMainWindow
+ * [145493] Fixed a crash that could occur when calling setMainWindow(0)
+ on X11.
+ * [137013, 158094] Fixed bugs relating to the handling of size hints,
+ minimum/maximum sizes and size policies of QDockWidgets in main
+ windows.
+ * [147964] Animated tool bar areas adjust dynamically when a QToolBar is
+ dragged over them.
+ * Added the dockOptions property. This makes it possible to:
+ - specify that tabbed dock areas should have vertical tab bars,
+ - disable tabbed docking altogether,
+ - force tabbed docking, disallowing the placement of dock widgets
+ next to each other.
+ * Fixed bugs in saving and restoring main window state.
+ * [143026] Fixed support for hiding and showing toolbars on Mac OS X.
+ * [131695] Add unified toolbar support on Mac OS X.
+
+- QMdiArea
+- QMdiSubWindow
+ * New classes. QMdiArea is a replacement for QWorkspace.
+
+- QMenu
+ * The addAction() overloads that accept a slot argument now honor the
+ slot's bool argument correctly.
+ * [129289] Added support for handling context menus from within a menu.
+ * [144054] Fixed scrolling logic.
+ * [132524] Allow setVisible() of separator items on Mac OS X native
+ menu items.
+ * [131408] Torn-off menus now have fixed sizes to prevent the window
+ system from resizing them.
+ * [113989] Added some fuzziness to the "snap to" detection.
+ * [155030] Do not disable command actions when merge is disabled.
+ * [131702] Tear-off menus no longer appear only once.
+ * [138464] Ensured that, if a popup menu does not fit on the right-hand
+ side of the screen, it is aligned with the right side of the parent
+ widget instead of the left side.
+ * [130343] Ensured that only the left mouse button triggers menu actions
+ on Windows.
+ * [139332] Fixed an issue that caused submenus to close when moving the
+ mouse over a separator.
+ * [157218] Ensured that torn-off menus are not closed when Alt is
+ pressed.
+ * [135193] Ensured that the size hint, maximum size and minimum size are
+ taken into account for each QWidgetAction.
+ * [133232] Improved handling of menus that are opened at specified
+ positions.
+ * [141856] Fixed bug where exec() would return NULL if the user pressed
+ a mnemonic shortcut.
+ * [133633] Fixed focus problem with keyboard navigation between menus
+ and widget actions.
+ * [134560] Fixed bug that prevented status tips from being shown for
+ actions in tool button menus.
+ * [150545] Fixed memory leak on Mac OS X.
+ * [138331] Fixed bug that could cause menus to stay highlighted after
+ the closing of a dialog.
+ * Menu shortcuts are now cleared if the corresponding QAction is cleared
+ on Mac OS X.
+ * Fixed bug that could cause changes to shortcut to not take effect on
+ Mac OS X.
+ * [12536] Don't allow Tab to be used to navigate menus on Mac OS X.
+ * [108509] Prevented shortcuts from stealing keyboard navigation keys.
+ * [134190] Added support for Shift+Tab to enable backwards navigation.
+
+- QMenuBar
+ * [135320] Make show() a no-op on Mac OS X to prevent the menu bar from
+ being visible at the same time as a native Mac menu bar.
+ * [115471] Fixed torn-off menu behavior to ensure that mouse events
+ are propagated correctly on second level tear-offs.
+ * [126856] Fixed an issue that could cause several menus to be open at
+ the same time.
+ * [47589] The position of the menu is now shifted horizontally when
+ there is not enough space (neither above nor below) to display it.
+ * [131010] Fixed bug where adding an action and setting its menu would
+ prevent the action from being triggered through its shortcut.
+ * [142749] Fixed bug where setEnabled(false) had no effect on Mac OS X.
+ * [141255] Made it possible to make an existing menu bar an application-
+ wide menu bar with setParent(0) on Mac OS X.
+
+- QMessageBox
+ * [119777] Ensured that pressing Ctrl+C in message boxes on Windows
+ copies text to the clipboard.
+ * Added setDefaultButton(StandardButton) and
+ setEscapeButton(StandardButton) functions.
+
+- QMetaObject
+ * Optimized invokeMethod() to avoid calling type() unnecessarily.
+
+- QMetaType
+ * [143011] Fixed isRegistered() to return false when the type ID does
+ not correspond to a user-registered type.
+
+- QModelIndex
+ * [144919] Added more rigorous identity tests for model indexes.
+
+- QMotifStyle
+ * [38624] Fixed the behavior when clicking on a menu bar item a
+ second time; the menu will now close in the same way that native
+ Motif menus do.
+
+- QMutex
+ * [106089] Added tryLock(int timeout), which allows a thread to specify
+ the maximum amount of time to wait for the mutex to become available.
+ * [137309] Fixed a rare deadlock that was caused by compiling with
+ optimizations enabled.
+ * Optimized recursive locking to avoid two unnecessary atomic operations
+ when the current thread already owns the lock.
+ * Optimized non-recursive mutexes by avoiding a call to pthread_self()
+ on Unix.
+
+- QNetworkInterface
+ * [146834] Now properly generates broadcast addresses on Windows XP.
+
+- QNetworkProxy
+ * Added support for transparent HTTP CONNECT client proxying.
+ * Added support for complex authenticators through QAuthenticator.
+
+- QObject
+ * Added a compile time check to ensure that the objects passed to
+ qobject_cast contain a Q_OBJECT macro.
+ * [133901] Improved the run time warnings from setParent() that is
+ output when trying to set a new parent that is in a different thread.
+ * [140106] Fixed a deadlock that could occur when deleting a QObject
+ from the destructor of a QEvent subclass.
+ * [133739] Fixed compiler warnings from g++ in findChildren<T>().
+ * Documented the QEvent::ThreadChange that is sent by moveToThread().
+ * [130367] Improved the run time warning that is output when creating
+ a QObject with a parent from a different thread.
+ * [114049] Made dumpObjectInfo() also dump connection information.
+
+- QPageSetupDialog
+ * [136041] Margins are now saved and used properly when printing.
+
+- QPainter
+ * Fixed stroking of non-closed polygons with non-cosmetic pens in the
+ OpenGL paint engine.
+ * [133980] Fixed stroking bug for RoundJoin and MiterJoin with paths
+ containing successive line segments with a 180 degree angle between
+ them.
+ * [141826] Fixed stroking with MiterJoin of paths with duplicated
+ control points.
+ * [139454, 139209] Fixed problem with SmoothTransformation that caused
+ images to fade out toward the edges in raster paint engine.
+ * Added the HighQualityAntialiasing render hint to enable pixel shaders
+ for anti-aliasing in the OpenGL paint engine.
+ * [143503] Fixed broken painting when using a QPainter on a
+ non-top-level widget where the world matrix is disabled then
+ re-enabled.
+ * [142471] Fixed dashed line drawing of lines that are clipped against
+ the device rectangle.
+ * [147001] Fixed bug with drawing of polygons with more than 65536
+ points in the raster paint engine.
+ * [157639] Calling drawPolygon() from multiple threads no longer causes
+ an assertion.
+ * Optimized line and rectangle drawing in the raster paint engine.
+ * [159047] Fixed case where fillRect() would ignore the brush origin.
+ * [143119] Fixed bug where drawing a scaled image on another image would
+ cause black lines to appear on the edges of the scaled image.
+ * [159894] Fixed X11 errors when using brush patterns on multiple
+ screens.
+ * [148524] Fixed X11 errors when drawing bitmaps containing a color
+ table with alpha values.
+ * [141871] Optimized and fixed drawing of extremely large polygons.
+ * [140952] Fixed transformed text drawing on X11 setups that used
+ fontconfig without Xrender.
+ * [139611] Fixed smooth transformation of pixmaps for X11.
+ * [132837] Fixed text drawing on images with certain fonts on Mac OS X.
+ * [147911] Use font anti-aliasing when rotating small fonts on Windows.
+ * [127901] Optimized gradient calculations.
+ * [139705, 151562] Optimized clipping algorithms in the raster paint
+ engine.
+ * Optimized blending operations in the raster paint engine using MMX,
+ 3DNOW and SSE2.
+ * Optimized fillRect() for opaque brushes.
+ * Made general speed optimizations, especially in the OpenGL and raster
+ paint engines.
+
+- QPainterPath
+ * [136924] Correctly convert Traditional Chinese fonts (e.g., MingLiu)
+ to painter paths.
+
+- QPicture
+ * [142703] QPicture now correctly preserves composition mode changes.
+ * Fixed QPicture text size handling on devices with non-default DPI.
+ * [133727] Fixed text alignment handling when drawing right-to-left
+ formatted text into a QPicture.
+ * [154088] Fixed bugs that could occur when reading QPicture files
+ generated with Qt 3.
+
+- QPixmap
+ * Added cacheKey() as a replacement for serialNumber().
+ * [97426] Added a way to invert masks created with createMaskFromColor().
+ * Fixed a crash that could occur when passing a 0 pointer to the
+ constructor that accepts XPM format image data.
+
+- QPixmapCache
+ * [144319] Reinserting a pixmap now moves it to the top of the Least
+ Recently Used list.
+
+- QPlastiqueStyle
+ * [133220] Fixed QProgressBar rendering bugs.
+
+- QPrintDialog
+ * [128964] Made "Print" the default button.
+ * [138924] Ensured that the file name is shown in the file dialog when
+ printing to a file
+ * [141486] Ensured that setPrintRange() correctly updates the print
+ dialog on X11.
+ * [154690] Ensured that "Print last page first" updates the QPrinter
+ instance on X11.
+ * [149991] Added support for more text encodings in the PPD subdialog.
+ * [158824] Disable the OK button in the dialog if no printers are
+ installed.
+ * [128990] X11: Don't immediately create an output file when a file name
+ is entered in the print dialog.
+ * [143804] Ensured that the default printer is set to the one specified
+ by the PRINTER environment variable.
+
+- QPrinter
+ * Added the supportedPaperSources() function.
+ * [153735] Significantly speeded up generation of PDF documents with Asian
+ characters.
+ * [140759] Documented that the orientation cannot be changed on an active
+ printer on Mac OS X (native format).
+ * [136242] PostScript generator: Don't generate huge PostScript files for
+ pattern brushes.
+ * [139566] Added support for alpha blending when printing on Windows.
+ * [151495] Fixed image scaling problems when printing on Windows.
+ * [146788] Optimized drawTiledPixmap() on Windows.
+ * [152637] PDF generator: Ensured that the pageRect property is set up
+ correctly.
+ * [152222] PDF generator: Fixed bug that lead to fonts being too small on
+ Mac OS X.
+ * [151126] Ensured that ScreenResolution is respected on Mac OS X.
+ * [151141] PDF generator: Make PDFs using the default font on Mac OS X
+ searchable.
+ * [129297, 140555] PS/PDF generator: Drastically reduced the sizes of
+ generated files and speeded up generation when using simple pens.
+ * [143803] Correctly set the default printer name on X11.
+ * [134204] PDF generator: Ensured that the correct output is generated
+ when drawing 1-bit images
+ * [152068] PS generator: Ensured that the correct PostScript is generated
+ when embedding TrueType fonts with broken POST tables.
+ * [143270] X11: Ensure that sigpipe is ignored when printing to an
+ invalid printer using the PDF generator.
+
+- QProcess
+ * [97517] Added suport for specifying the working directory of detached
+ processes as well as retrieving the PID of such processes.
+ * [138770] Greatly improved the performance of stdin and stdout handling
+ on Windows.
+ * [154135] Fixed crashes and lock-ups due to use of non-signal-safe
+ functions on Unix.
+ * [144728] Fixed race conditions on Windows that would occur when
+ calling bytesWritten() while using the waitFor...() functions.
+ * [152838] Ensured that finished() is no longer emitted if a process
+ could not start.
+
+- QProgressBar
+ * [146855] Ensured that setFormat() now calls update() if the format
+ changes.
+ * [152227] Improved support for wide ranges across the entire integer
+ range.
+ * The setRange() function is now a slot.
+ * [137020] Ensured setValue() forces a repaint for %v.
+
+- QProgressDialog
+ * The setRange() function is now a slot.
+ * [123199] Ensured that the Escape key closes dialog even when the
+ cancel text is empty.
+
+- QPushButton
+ * [114245] Fixed some styling issues for push buttons with popup menus.
+ * [158951] Buttons with icons now center their content to be more
+ consistent with buttons that do not have icons in most styles.
+ * [132211] Fixed setDefault() behavior.
+
+- QReadWriteLock
+ * [106089] Added the tryLockForRead(int) and tryLockForWrite(int)
+ functions which allow a thread to specify the maximum amount of time
+ to wait for the lock to become available.
+ * [131880] Added support for recursive write locking.
+
+- QRectF
+ * [143550] Added the QRectF(topRight,bottomLeft) constructor.
+
+- QRegion
+ * Added several optimizations for common operations on X11 and Qtopia
+ Core.
+
+- QResource
+ * Allow a QByteArray to be used for run time resource registration.
+
+- QScrollArea
+ * [140603] Fixed flickering when the scroll widget is right-aligned.
+
+- QSemaphore
+ * Add the tryAcquire(int n, int timeout) function which allows a thread
+ to specify the maximum amount of time to wait for the semaphore to
+ become available.
+
+- QSettings
+ * [153758] Fixed various bugs that could occur when writing to and
+ reading from the Windows registry.
+
+- QSizeGrip
+ * Added support for size grips in TopLeftCorner/TopRightCorner on Windows.
+ * Added support for size grips on subwindows.
+ * [150109] Fixed bug where the position could change during resize.
+ * [156114] Fixed incorrect size grip orientation on X11.
+
+- QSlider
+ * Prevent the widget from getting into infinite loops when extreme
+ values are used.
+
+- QSocketNotifier
+ * [148472] Mac OS X now prevents the file descriptor from being closed
+ when a socket notifier is deregistered.
+ * [140018] Mac OS X will now invalidate the backing native socket
+ notifier upon deregistration.
+ * Optimized performance by avoiding some debugging code in release
+ builds.
+
+- QSortFilterProxyModel
+ * [151352] Ensured that the dataChanged() signal is emitted when
+ sorting.
+ * [154075] Added support to handle the insertion of rows in the source
+ model.
+ * [140152] Added a property to force the proxy model to use QString's
+ locale-aware compare method.
+
+- QSpinBox
+ * [141569] Disallow typing -0 in a QSpinBox with a positive range.
+ * [158445] Add the keyboardTracking property. When set to false, don't
+ send valueChanged() with every key press.
+ * [143504] Made undo/redo work correctly.
+ * [131165] Fixed highlighting according to the native look on Mac OS X.
+
+- QSplashScreen
+ * [38269] Added support for rich text.
+
+- QSplitter
+ * [139262] Fixed bug that caused the splitter to snap back and forth in
+ certain situations.
+
+- QSql
+ * Added NumericalPrecisionPolicy to allow numbers to be retrieved as
+ double or float.
+
+- QSqlDriver
+ * [128671] Added SimpleLocking to DriverFeature.
+
+- QSqlQueryModel
+ * [155402] Fixed bug where the rowsAboutToBeRemoved() and rowsRemoved()
+ signals were emitted when setQuery() was called on an already empty
+ model.
+ * [149491] Fixed bug where blank rows were inserted into the model if
+ the database driver didn't support the QuerySize feature and the
+ result set contained more than 256 rows.
+
+- QSqlRelationalTableModel
+ * [142865] Fixed support for Interbase and Firebird by not using 'AS' in
+ generated SQL statements.
+
+- QSqlTableModel
+ * [128671] Ensured that the model has no read locks on a table before
+ updating it. Fixes parallel access for in-process databases like
+ SQLite.
+ * [140210] Fixed bug where setting a sort order for a column caused no
+ rows to be selected with PostgreSQL and Oracle databases due to
+ missing escape identifiers in the generated SQL statement.
+ * [118547] Don't issue asserts when inserting records before calling
+ select() on the model.
+ * [118547] Improved error reporting.
+
+- QSslCertificate
+- QSslCipher
+- QSslError
+- QSslKey
+- QSslSocket
+ * New classes. Added support for SSL to QtNetwork.
+
+- QStandardItemModel
+ * Reduced the construction time when rows and columns are given.
+ * [133449] Improve the speed of setData()
+ * [153238] Moving an item will no longer cause that item to lose its
+ flags.
+ * [143073] Calling setItemData() now triggers the emission of the
+ dataChanged() signal.
+
+- QStatusbar
+ * [131558] Increased text margin and fixed a look and feel issue on
+ Windows.
+
+- QString
+ * fromUtf8() now discards UTF-8 encoded byte order marks just like the
+ UTF-8 QTextCodec.
+ * [154454] Fixed several UTF-8 decoder compliance problems (also affects
+ the UTF-8 QTextCodec).
+ * Removed old compatibility hack in fromUtf8()/toUtf8() to allow round
+ trip conversions of invalid UTF-8 text.
+ * Added support for full Unicode case mappings to toUpper() and
+ toLower().
+ * Correctly implemented case folding with the foldCase() method. (Also
+ for QChar.)
+ * [54399] Added more overloads (taking up to 9 arguments) for arg().
+
+- QStringListModel
+ * Made it possible for items to be dropped below the other visible items
+ on a view with a QStringListModel.
+
+- QStyle
+ * Added the SP_DirHomeIcon standard pixmap to provide the native icon
+ for the home directory.
+ * Added documentation to indicate that pixel metrics are not necessarily
+ followed for all styles.
+ * standardPixmap() has been obsoleted. Use standardIcon() instead.
+ * Added SP_VistaShield to support Vista UAC prompts on Windows Vista.
+ * [103150] Added SH_FocusFrame_AboveWidget to allow the focus frame to
+ be stacked above the widget it has focus on.
+ * The default password character is now a Unicode circle, the asterisk
+ is still used for QMotifStyle and its subclasses.
+ * [127454] CE_ToolBoxTab now draws two parts, CE_ToolBoxTabShape and
+ CE_ToolBoxTabLabel. This should make QToolBox more styleable.
+ * [242107] Added a QStyleOptionToolBoxV2 with tab position and selected
+ position enums.
+
+- QStyleOption
+ * [86988] Added an initializeFromStyleOption() function for the many
+ widgets that need to create a QStyleOption subclass for style-related
+ calls.
+
+- QSyntaxHighligher
+ * [151831] Fixed bug where calling rehighlight() caused highlighBlock()
+ to be called twice for each block of text.
+
+- QSystemTrayIcon
+ * [131892] Added support to allow messages to be reported via AppleScript
+ on Mac OS X.
+ * [151666] Increased the maximum tool tip size to 128 characters on the
+ Windows platforms that support it.
+ * [135645] Fixed an issue preventing system tray messages from working
+ on some Windows platforms.
+ * Addded the geometry() function to allow the global position of the
+ tray icon to be obtained.
+
+- QTabBar
+ * [126438] Added the tabAt(const QPoint &pos) function.
+ * [143760] Fixed a bug where scroll buttons were shown even when
+ disabled.
+ * [130089] Ensured that the tool tip help is shown on disabled tabs.
+ * [118712] Enabled auto-repeat on scroll buttons.
+ * [146903] Ensured that the currentChanged() signal is emitted when a
+ tab is removed
+ * Ensured that corner widgets are taken into account when calculating
+ tab position in the case where the tab bar is centered.
+ * [132091] Re-introduced the Qt 3 behavior for backwards scrolling of
+ tabs.
+ * [132074] Ensured that currentChanged() is always emitted when the
+ current tab is deleted.
+
+- QTableView
+ * No longer allow invalid spans to be created.
+ * [145446] Fixed bug where setting minimum height on horizontal header
+ caused the the table to be rendered incorrectly.
+ * [131388] Fixed case where information set using setRowHeight() was
+ lost on a subsequent call to insertRow().
+ * [141750] Fixed issue where spanned table items were painted twice per
+ paint event.
+ * [150683] Added property for enabling/disabling the corner button.
+ * [135727] Added the wordWrap property.
+ * [158096] resizeColumnToContents(int i) now has the same behavior that
+ resizeColumnsToContents() uses for individual columns.
+
+- QTableWidget
+ * [125285] Ensured that dataChanged() is only emitted once when
+ setItemData() is used to set data for more than one role.
+ * [151211] Added removeCellWidget() and removeItemWidget().
+ * [140186] Fixed bug where calling setAutoScroll(false) would have no
+ effect.
+
+- QTabWidget
+ * Tab widgets now take ownership of their corner widgets and allow
+ corner widgets to be unset.
+ * [142464] Fixed incorrect navigation behavior that previously made it
+ possible to navigate to disabled tabs.
+ * [124987] Ensured that a re-layout occurs when a corner widget is set.
+ * [111672] Added the clear() function.
+
+- QtAlgorithms
+ * [140027] Improved the performance of qStableSort() on large data sets.
+
+- QTcpSocket
+ * Added several fixes to improve connection reliability on Windows.
+ * Made a number of optimizations.
+ * Improved detection of ConnectionRefusedError on Windows and older
+ Unixes.
+ * Added support for proxy authentication.
+
+- QTemporaryFile
+ * [150770] Fixed large file support on Unix.
+
+- QTextBrowser
+ * [126914] Fixed drawing of the focus indicator when activating links.
+ * [82277] Added the openLinks property to prevent QTextBrowser from
+ automatically opening any links that are activated.
+
+- QTextCodec
+ * Improved the UTF-8 codec's handling of large, rare codepoints.
+ * [154932] The UTF-8 codec now keeps correct state for sequence
+ f0 90 80 80 f4 8f bf bd.
+ * [154454] Fixed several UTF-8 decoder compliance problems also
+ affecting QString::fromUtf8().
+ * Fixed the UTF-8 codec's handling of incomplete trailing UTF sequences
+ to be the same as QString::fromUtf8().
+
+- QTextCursor
+ * The definition of the block character format (obtained using the
+ blockCharFormat() and QTextBlock::charFormat() functions) has been
+ changed to be the format used only when inserting text into an empty
+ block.
+ If a QTextCursor is positioned at the beginning of a block and the
+ text block is not empty then the character format to the right of the
+ cursor (the first character in the block) is returned.
+ If the block is empty, the block character format is returned.
+ List markers are now also drawn with the character format of the first
+ character in a block instead of the invisible block character format.
+
+- QTextDecoder
+ * Added the hasFailure() function to indicate whether input was
+ correctly encoded.
+
+- QTextDocument
+ * [152692] Ensured that the print() function uses the document's default
+ font size.
+ * Added the defaultTextOption property.
+ * Setting a maximum block count implicitly now causes the undo/redo
+ history to be disabled.
+ * Made numerous fixes and speed-ups to the HTML import.
+ * [143296] Fixed HTML import bug where adding a <br> tag after a table
+ would cause two empty lines to be inserted instead of one.
+ * [144637, 144653] Ensured that the user state property of QTextBlock is
+ now preserved.
+ * [140147] Fixed layout bug where the document size would not be updated
+ properly.
+ * [151526] Fixed problem where the margins of an empty paragraph above a
+ table would be ignored.
+ * [136013] The "id" tag can now be used to specify anchors.
+ * [144129] Root frame properties are now properly exported/imported.
+
+- QTextDocumentFragment
+ * QTextDocumentFragment no longer stores the root frame properties,
+ the document title or the document default font when it is created
+ from a document or from HTML. Use QTextDocument's toHtml() and
+ setHtml() function if you want to propagate these properties to and
+ from HTML.
+
+- QTextEdit
+ * [152208] Ensured that the undo/redo enabled state is preserved across
+ setPlainText() and setHtml() calls.
+ * [125177] Added a print() convenience function that makes it possible
+ to support QPrinter::Selection as selection range.
+ * [126422] Fixed bug in copy/paste which could cause the background
+ color of pasted text to differ from that of the copied text.
+ * [147603] Fixed various cases where parts of a text document would be
+ inaccessible or hidden by the scroll bars.
+ * [148739] Fixed bug where setting the ensureCursorVisible property
+ would not result in a visible cursor.
+ * [152065] Fixed cases where currentCharFormatChanged() would not be
+ emitted.
+ * [154151] The undoAvailable() and redoAvailable() signals are no longer
+ emitted too many times when entering or pasting text.
+ * [137706] Made the semantics of the selectionChanged() signal more like
+ QLineEdit::selectionChanged().
+
+- QTextFormat
+ * [156343] Fixed crash that could occur when streaming QTextFormat
+ instances.
+
+- QTextLayout
+ * Fixed support for justified Arabic text.
+ * [152248] Fixed assert in sub/superscript handling of fonts specified
+ in pixel sizes.
+ * Optimized text layout handling for pure Latin text.
+ * Ensured that OpenType processing is skipped altogether if a font does
+ not contain OpenType tables.
+ * Fixed some issues in the shaper for Indic languages.
+ * Upgraded the line breaking algorithm to the newest version
+ (http://www.unicode.org/reports/tr14/tr14-19.html).
+ * [140165] Changed boundingRect() to report the actual position of the
+ top left line instead of incorrectly reporting (0, 0) for the top-left
+ corner in every case.
+ * Fixed various problems with text kerning.
+
+- QTextStream
+ * [141391] Fixed bug that could occur when reusing a text stream with
+ the setString() method.
+ * [133063] atEnd() now works properly with stdin.
+ * [152819] Added support for reading and writing NaN and Inf.
+ * [125496] Ensured that uppercasebase and uppercasedigits work as
+ expected.
+
+- QTextTable
+ * [138905] Fixed bug where merging cells in a QTextTable would cause
+ text to end up in the wrong cells.
+ * [139074] Fixed incorrect export of cell widths to HTML when exporting
+ tables containing column spans.
+ * [137236] Fixed bug where a text table would ignore page breaks.
+ * [96765] Improved handling of page breaks for table rows spanning
+ several pages.
+ * [144291] Fixed crash that could occur when using setFormat() with an
+ old format after inserting or removing columns.
+ * [143501] Added support for vertical alignment of table cells.
+ * [136397, 144320, 144322] Various border styles and border brushes are
+ now properly supported.
+ * [139052] Made sure that empty text table cells get a visible
+ selection.
+
+- QtGlobal
+ * Added Q_FUNC_INFO, a macro that expands to a string describing the
+ function it is used in.
+ * [132145] Fixed Q_FOREACH to protect against for-scoping compiler bugs.
+ * Fixed a race condition in the internal Q_GLOBAL_STATIC() macro.
+ * [123910] Fixed crashes on some systems when passing 0 as the
+ message to qDebug(), qWarning(), and qFatal().
+
+- QThread
+ * [140734] Fixed a bug that prevented exec() from being called more than
+ once per thread.
+ * Optimized the currentThread() function on Unix.
+ * Added the idealThreadCount() function, which returns the ideal number
+ of threads that can be run on the system.
+
+- QThreadStorage
+ * [131944] Refactored to allow an arbitrary number of instances to be
+ created (not just 256 as in previous versions).
+ * Updated documentation, as many caveats have been removed in Qt 4.2 and
+ Qt 4.3.
+
+- QTimeEdit
+ * [136043] Fixed the USER properties.
+
+- QTimeLine
+ * [145592] Fixed the time line state after finished() has been emitted.
+ * [125135] Added the resume() function to allow time lines to be resumed
+ as well as restarted.
+ * [153425] Fixed support for cases where loopCount >= 2.
+
+- QTimer
+ * Added the active property to determine if the timer is active.
+
+- QToolBar
+ * [128156, 138908] Added an animation for the case where a tool bar is
+ expanded to display all its actions when its extension button is
+ pressed.
+
+- QToolBox
+ * [107787] Fixed rendering bugs in reversed mode.
+
+- QToolButton
+ * [127814] Ensured that the popup delay respects style changes.
+ * [130358] Ensured that Hover events are sent to the associated QAction
+ when the cursor enters a button.
+ * [106760] Fixed bug where the button was drawn as pressed when using
+ MenuButtonPopup as its popup mode.
+
+- QToolTip
+ * [135988] Allow tool tips to be shown immediately below the cursor
+ * [148546] The usage of tool tip fading now adheres to the user settings
+ on Mac OS X.
+ * [145458] Tool tip fading now looks native on Mac OS X (fading out
+ rather than in).
+ * [145557] Fixed bug that caused tool tips to remain visible if the
+ cursor left the application quickly enough on Mac OS X.
+ * [143701] Fixed bug that caused tool tips to hide behind stay-on-top
+ windows on Mac OS X.
+ * [158794] Fixed bug on Mac OS X where isVisible() returned true even
+ if the tool tip was hidden.
+
+- QTreeView
+ * [158096] Added checks to prevent items from being dropped on their own
+ children.
+ * [113800] When dragging an item over an item that has child items,
+ QTreeView will now automatically expand after a set time.
+ * [107766] Added a style option (enabled in the Windows style) to
+ select the first child when the right arrow key is pressed.
+ * [157790] It was possible to get in a state where clicking on a branch
+ (+/- in some styles) to expand an item didn't do anything until
+ another location in the view was clicked.
+ * Made it possible to create a selection with a rectangle of negative
+ width or height.
+ * [153238] Ensured that drops on branches are interpreted as drops onto
+ the root node.
+ * [152868] Fixed setSelection() so that it works with negative
+ y-coordinates.
+ * [156522] Fixed repaint errors for selections in reversed mode.
+ * [155449] Prevented the tree from having huge columns when setting the
+ alignment before it is shown.
+ * [151686] Hidden rows are now filtered out of the user selection range.
+ * [146468] Fixed bug where the indexRowSizeHint could be incorrect in
+ the case where columns were moved.
+ * [138938] Fixed an infinite loop when calling expandAll() with no
+ column.
+ * [142074] Scroll bars are no longer shown when there are no items.
+ * [143127] Fixed bug that prevented the collapsed() signal from being
+ emitted when the animated property was set to true.
+ * [145199] Fixed crash that could occur when column 0 with expanded
+ items was removed and inserted.
+ * [151165] Added the indexRowHeight(const QModelIndex &index) function.
+ * [151156] Add support for hover appearance.
+ * [140377] Add the expandTo(int depth) function.
+ * Clicking in the empty area no longer selects all items.
+ * [135727] Added the wordWrap property.
+ * [121646] setSelection() now selects the item within the given
+ rectangle.
+ * Added the setRowSpanning(int row, const QModelIndex &parent) and
+ isRowSpanning(int row, const QModelIndex &parent) functions.
+
+- QTreeWidget
+ * [159078] Fixed drag and drop bug on Mac OS X that could occur when
+ dragging inside the widget.
+ * [159726] Fixed crash that could occur when dragging a QTreeWidgetItem
+ object with an empty last column.
+ * [154092] Fixed case where the drag pixmap could get the wrong position
+ when dragging many items quickly.
+ * [152970] Hidden items are no longer returned as selected from the
+ selectedItems() function.
+ * [151211] Added the removeCellWidget() and removeItemWidget()
+ functions.
+ * [151149] Made the header text left-aligned instead of center-aligned
+ by default.
+ * [131234] Made it possible to do lazy population by introducing the
+ QTreeWidgetItem::ChildIndicatorPolicy enum.
+ * [134194] Added the itemAbove() and itemBelow() functions.
+ * [128935] The disabled state of an item is now propagated to its
+ children.
+ * [103421] Added the QTreeWidgetItem::setExpandable() function.
+ * [134138] Added the QTreeWidgetItem::removeChild() function.
+ * [153361] Ensured that items exist before emitting itemChanged().
+ * [155700] Fixed a crash in QTreeWidget where deleted items could still
+ be referenced by a selection model.
+
+- QUdpSocket
+ * [142853] Now continues to emit readyRead() if the peer temporarily
+ disappears.
+ * [154913] Now detects datagrams even when the sender's port is invalid.
+
+- QUndoStack
+ * [142276] Added the undoLimit property which controls the maximum
+ number of commands on the stack.
+
+- QUrl
+ * [134604] Fixed the behavior of the obsolete dirPath() function on
+ Windows.
+
+- QValidator
+ * [34933] Added support for scientific notation.
+
+- QVariant
+ * [127225] Unloading a GUI plugin will no longer cause a crash in
+ QVariant in a pure QtCore application.
+
+- QWaitCondition
+ * [126007] Made the behavior of wakeOne() consistent between Windows and
+ Unix in the case where wakeOne() is called twice when exactly 2
+ threads are waiting (the correct behavior is to wake up both threads).
+
+- QWidget
+ * [139359] Added the locale property to make it easy to customize how
+ individual widgets display dates and numbers.
+ * [155100] Fixed a regression that could cause Qt::FramelessWindowHint
+ to be ignored for frameless windows.
+ * [137190] Ensured that windows with masks are now rendered correctly
+ with respect to window shadows on Mac OS X.
+ * [139182] Added the render() function to allow the widget to be
+ rendered onto another QPaintDevice.
+ * [131917] Fixed bug where minimum and maximum sizes were not respected
+ when using X11BypassWindowManagerHint.
+ * [117896] Fixed setGeometry() to be more consistent across Mac OS X,
+ Windows, X11 and Qtopia Core.
+ * [132827] Allow the focus to be given to a hidden widget; it will
+ receive the focus when shown.
+ * Reduced the overhead of repainting a widget with lots of children.
+ * Clarified the documentation for the Qt::WA_AlwaysShowToolTips widget
+ attribute.
+ * [154634] Ensured that the Qt::WA_AlwaysShowToolTips widget attribute
+ is respected for all widgets.
+ * [151858] Improved the approximation returned by visibleRegion().
+ * [129486] Ensured that calling setLayout() on a visible widget causes
+ its children to be shown, making its behavior consistent with the
+ QLayout::addWidget() behavior.
+
+- QWindowsStyle
+ * [110784] Scroll bar and spin box arrows now scale with the widget size.
+ * Given certain panel and button frames a more native appearance.
+ * [142599] Ensured that a QDockWidget subclass is not required when
+ using the style to draw a CE_DockWidgetTitle.
+
+- QWindowsXPStyle
+ * [150579] Fixed the use of the wrong background color for QSlider.
+ * [133517] Fixed styling of the unused area in header sections.
+ * [48387] Fixed styling of MDI/Workspace controls.
+ * [109317] Fixed a rendering issue with tab widgets in the Silver color
+ scheme.
+ * [114120] Ensured that the frame property for combo boxes is respected.
+ * [138444] Fixed crash that could occur when passing 0 as the widget
+ argument to drawComplexControl().
+
+- QWizard
+- QWizardPage
+ * New classes. Based on QtWizard and QtWizardPage in Qt 4 Solutions.
+ Redesign of QWizard from Qt 3.
+
+- QXmlParseException
+ * [137998] Fixed incorrect behavior where systemId/publicId was never
+ reported.
+
+- QXmlSimpleReader
+ * QXmlSimpleReader no longer reads entire files into memory, allowing
+ it to handle large XML files.
+
+- Q3DateEdit
+ * [131577] Fix a bug that could occur when entering out-of-range years
+ in a Q3DateEdit.
+
+- Q3DockWindow
+ * [125117] Fixed some style issues with Windows XP and Plastique styles.
+
+- Q3GroupBox
+ * Added FrameShape, FrameShadow, lineWidth, and midLineWidth properties.
+
+- Q3ListView
+ * [150781] Fixed a crash in setOpen() (previously fixed in Qt 3).
+
+- Q3ScrollView
+ * [125149] Mouse events should not be delivered if the Q3ScrollView is
+ disabled.
+ This fixed the case where items were still selectable when Q3ListView
+ was disabled using the setEnabled() function.
+
+- Q3SqlCursor
+ * [117996] Improved support for tables and views that have fields with
+ whitespace in their names.
+
+- Q3TextEdit
+ * [136214] Fixed invalid memory reads when using undo/redo
+ functionality.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+
+ * [127724] Added support for OUT values from stored procedures. (See the
+ SQL Database Drivers documentation for details.)
+ * [159123] Fixed crash that could occur when fetching data from
+ Interbase 2007 databases.
+ * [143474] Added support for SQL security-based roles.
+ * [134608] Fixed bug where queries in some cases returned empty VARCHAR
+ fields if they contained non-ASCII characters.
+ * [143471] Fixed bug that caused fetching of multisegment BLOB fields to
+ fail in some cases.
+ * [125053] Fixed bugs where NUMERIC fields were corrupted or returned as
+ the wrong type in some cases.
+
+- MySQL driver
+ * [156342] Fixed bug where BINARY and VARBINARY fields were returned as
+ QString instead of QByteArray.
+ * [144331] Fixed bug where a query would become unusable after executing
+ a stored procedure that returns multiple result sets.
+
+- OCI driver
+
+ * Added support for low-precision retrieval of floating point numbers.
+ * [124834] Fixed bug where the binding strings failed on certain
+ configurations.
+ * [154518] Fixed bug where connections were not properly terminated,
+ which lead to resource leaks and connection failures.
+
+- ODBC driver
+
+ * Increased performance for iterating a query backwards.
+ * [89844] Added support for fetching multiple error messages from an
+ ODBC driver.
+ * [114440] Fixed bug where binding strings longer that 127 characters
+ failed with Microsoft Access databases.
+ * [139891] Fixed bug where unsigned ints were returned as ints.
+
+- SQLite driver
+ * [130799] Improved support for attatched databases when used with
+ QSqlTableModel.
+ * [142374] Improved error reporting in cases where fetching a row fails.
+ * [144572] Fixed the implementation of escapeIdentifier() to improve
+ support for identifiers containing whitespace and reserved words when
+ used with the model classes.
+
+- PostgreSQL driver
+
+ * [135403] Properly quote schemas in table names ("schema"."tablename").
+ * [138424] Fixed resource leak that occurred after failed connection
+ attempts.
+
+- DB2 driver
+
+ * [110259] Fixed bug where random characters were prepended to BLOB
+ fields when fetched.
+ * [91441] Fixed bug where binding strings resulted in only parts of the
+ strings being stored.
+
+****************************************************************************
+* QTestLib *
+****************************************************************************
+
+ * [138388] Floating point numbers are now printed in printf's "%g" format.
+ * [145643] QEXPECT_FAIL does not copy or take ownership of "comment"
+ pointer.
+ * [156346] Gracefully handle calls to qFatal().
+ * [154013] Don't count skips as passes.
+ * [145208] Display QByteArrays in convenient ways.
+ * Output well-formed XML.
+
+****************************************************************************
+* QDBus *
+****************************************************************************
+
+- Library
+
+ * Added support for QList<QDBusObjectPath> and QList<QDBusSignature>
+ to allow them to be used without first having to register the types.
+
+ * Added support for using QtDBus from multiple threads.
+
+ * Made it possible to marshal custom types into QDBusArgument.
+
+ * qdbuscpp2xml:
+ * [153102] Ensure that Q_NOREPLY is ignored.
+ * [144663] Fixed problems with executing qdbuscpp2xml on Windows.
+ * Don't require moc to be on a path listed in the PATH environment
+ variable.
+
+ * QDBusInterface:
+ * Changed asserts in the QDBusInterface constructor to QDBusErrors.
+ * QDBusConnection:
+ * Added a separate slot for delivering errors when calling
+ callWithCallback().
+
+
+- Viewer
+
+ * Moved QDBusViewer from demos to QDBus tools.
+ * Added ability to get and set properties.
+ * Added support for demarshalling D-Bus variants.
+ * Added a property dialog for entering arguments.
+ * Made QDBusObjectPath clickable in the output pane.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+ * [153346] Ensured that tablet events are not delivered while a drag and
+ drop operation is in progress.
+ * [141756] Ensured that the Plastique or Cleanlooks styles are not used
+ as default styles when Xrender is not available.
+ * [139455] Fixed QX11EmbedContainer race causing sudden unembedding of
+ clients.
+ * [96507] Added support for using _POSIX_MONOTONIC_CLOCK as the
+ timer source (also affects Qtopia Core).
+ * [128118] Fixed garbage output when calling QPixmap::grabWindow()
+ on a window on a non-default screen.
+ * [133119] Ensured that X11 color names are detected in the
+ RESOURCE_MANAGER property.
+ * [56319] Added support for _NET_WM_MOVERESIZE to QSizeGrip, which
+ cooperates with the window manager to do the resizing.
+ * Fixed QWidget::isMaximized() to return false when the window is
+ only maximized in a single direction.
+ * [67263] Fixed a bug that could cause applications to freeze while
+ querying the clipboard for data.
+ * [89224] Fixed the behavior of minimized Qt applications to show the
+ correct icon (instead of the standard OpenWindows icon) on Solaris.
+ * [116080] Ensured that the TIMESTAMP clipboard property is set using
+ XA_INTEGER (as defined in the ICCCM).
+ * [127556] Refactored timer accounting code to be more efficient and
+ less cumbersome to maintain.
+ * [132241] Add support for DirectColor visuals. Qt will now create and
+ initialize a colormap when using such visuals.
+ * [140737] Fixed QEventDispatcherGlib::versionSupported() to be much
+ simpler.
+ * Fixed a bug where QWidget::windowFlags() would not include
+ Qt::X11BypassWindowManagerHint for Qt::ToolTip and Qt::Popup windows.
+ * [146472] Fixed a bug where QWidget::setWindowFlags() would disable
+ drag and drop operations from outside Qt applications.
+ * [150352] Fixed painting errors after show(), hide(), then show()
+ under GNOME.
+ * [150348] Fixed a bug that would incorrectly set the Qt::WA_SetCursor
+ attribute on top-level windows.
+ * [135054] Fixed system palette detection code to use contrast that is
+ more similar to the desktop settings.
+ * [124689] Documented potential QDrag::setHotSpot() inefficiency on X11.
+ * [121547] Fixed QWidget::underMouse() to ensure that the value it
+ returns is correctly updated after the mouse button is released.
+ * [151742] Improved robustness when executing in an X11-SECURITY
+ reduced ssh-forwarded session.
+ * [142009] Fixed a bug that caused an application using the Qt Motif
+ Extension to freeze when trying to copy text into a QTextEdit.
+ * [124723] Fixed PseudoColor detection to correctly handle cases where
+ the colormap is not sequential.
+ * [140484] Don't use the GLib event dispatcher if GLib version is too
+ old.
+ * Fixed a bug where a window would get an incorrect size after the
+ second call to show().
+ * [153379] Fixed shortcuts where the modifier also includes Mode_switch
+ in the modifier mask; for example, Alt+F on HP-UX.
+ * [154369] Fixed drag and drop to work properly after re-creating a
+ window ID.
+ * [151778] Fixed mouse enter/leave event platform inconsistencies.
+ * [153155] Added the QT_NO_THREADED_GLIB environment variable, which
+ tells Qt to use Glib only for the GUI thread.
+ * Fixed restoreGeometry() to ensure that full-screen windows are moved
+ to the correct position.
+ * [155083] Don't use legacy xlfd fonts if we have fontconfig available
+ on Solaris.
+ * [150348] Fixed bug where setCursor() would not work properly after a
+ setParent() call.
+ * Made Plastique the default style on X11.
+
+Windows
+-------
+ * Added an experimental DirectX-based paint engine.
+ * [141503] Ensured that clicks inside tool windows won't cause them to
+ be activated if there is no child widget to take focus.
+ * [153315] Improved handling of Synaptic touchpad wheel messages.
+ * [150639] Added support for CF_DIBV5 format and improved support for
+ transparent images on the clipboard.
+ * [146862] Improved readability of progress bar text when shown in
+ the Highlight palette color.
+ * [146928] Fixed issue where shortcut events were discarded when auto-
+ repeat was disabled.
+ * [141079] Ensured that wheel events contain button information.
+ * [149367] Ensured that QMimeData::formats() returns all the available
+ formats in the object.
+ * [135417] Ensured that WM_SYSCOLORCHANGE does not trigger resetting of
+ fonts.
+ * [137023] Fixed a crash that could occur while translating mouse
+ events.
+ * [138349] Fixed incorrect focus handling with multiple top-level
+ widgets.
+ * [111211] Ensured that tool windows don't steal focus from their
+ parents while opening.
+ * [143812] Fixed a bug which can break the widget's ability to maximize
+ after saving and restoring its state.
+ * [111501] Ensured that SPI_SETWORKAREA messages trigger calls to
+ QDesktopWidget::workAreaResized().
+ * [141633] Fixed command line parsing for GUI applications.
+ * [134984] Ensured that SockAct events are not triggered from
+ processEvents(ExcludeSocketNotifiers).
+ * [134164] Ensured that top-level widgets configured with
+ MSWindowsFixedSizeDialogHint are centered properly.
+ * [145270] Fixed mapFromGlobal() and mapToGlobal() for minimized or
+ invisible widgets.
+ * [132695] Fixed a potential crash that could occur when changing the
+ application style after the system theme had been changed.
+ * [103739] Workspace title bars now respect custom title bar heights in
+ the Windows XP style.
+ * [48770] Improved size grip behavior in top-level widgets.
+ * [113739] Fixed an issue that could occur when using QWidget::scroll()
+ with on-screen painting.
+ * [129589] Added support for moving the mouse cursor to the default
+ button in dialogs.
+ * [139120] Added support for resolving native file icons through
+ QFileIconProvider.
+ * [129927] Added the QWindowsVista style to support native look and feel
+ on Windows Vista.
+ * [106437] Removed the Windows XP style from the list of keys supplied
+ by QStyleFactory::keys() on platforms where it is not available.
+ * [109814] Improved UNC path support.
+ * [157261] Fixed crash that could occur when using Alt keycodes with
+ text handling widgets.
+ * [116307] Ensured that QEvent::WindowActivate is sent for tool windows.
+ * [150346] Fixed a bug that would cause an application to exit when its
+ last window (a modal dialog) was closed and a new window shown
+ immediately afterwards.
+ * [90144] Fixed a bug that caused QApplication::keyboardModifiers() to
+ return modifiers even after they had been released.
+ * [142767] Fixed a bug that allowed a QPushButton to become pressed even
+ though its mousePressEvent() handler function was never called.
+ * [151199] Usage of blocking QProcess API in a thread no longer hangs
+ the desktop.
+ * [144430] Made the shortcut system distinguish between Key_Return and
+ Key_Enter.
+ * [144663] Made sure qdbuscpp2xml can parse moc output on Windows.
+ * [126332] Made QDBus compile on Windows platforms.
+ * [133823, 160131] Fixed bug in the QWidget::scroll() overload that
+ accepts a rectangle argument.
+
+- ActiveQt
+ * Ensured that, when loading a typelib file to obtain information about
+ a control, the typelib is processed correctly.
+ * [158990] Ambient property change events are now emitted regardless of
+ the container's state.
+ * [150327] ActiveQt based controls will now return the correct Extents
+ depending on the size restrictions set on the widget.
+ * [141296] Ensured that the ActiveQt DLL is unloaded from the same
+ thread which loaded it.
+
+- Qt Style Sheets
+ * Added support for background clipping using the border-radius
+ property.
+ * Almost all widgets are now styleable using style sheets.
+ * Added support for the -stylesheet command line option to QApplication.
+ * Added support for styling through SVG.
+ * Added support to allow colors and brushes to be specified as
+ gradients.
+
+Mac OS X
+--------
+
+ * qtconfig is no longer available on Mac OS X. All settings are read
+ from the system's configuration.
+ * [156965] Always offers a 'TEXT' type flavor for non-Pasteboard-aware
+ Mac Application pastes.
+ * [158087] Fixed various mouse event propagation bugs.
+ * Introduced Q_WS_MAC32/Q_WS_MAC64 for 64 vs. 32-bit detection compile
+ time infrastructure.
+ * [156431] Introduced WA_MacAlwaysShowToolWindow to allow windows to
+ behave as utility windows as opposed to floating windows.
+ * [155651] Qt will now follow the HIView focus chain to allow wrapped
+ HIViewRef's to take focus when appropriate.
+ * [149753] Qt will not deliver mouse release events to widgets that do
+ not process mouse press events (including widgets with the
+ WA_MacNoClickThrough attribute set).
+ * Introduced support for 64-bit Mac OS X builds. Only available on
+ Mac OS X 10.5 (Leopard).
+ * [145166] Ensured that CoreGraphics high quality interpolation is used
+ when using SmoothPixmapTransform.
+ * [134873] Ensured that the widget hierarchy is used to find a widget
+ with a cursor rather than using the frontmost widget.
+ * [132178] Enforced the requirement for double click detection that the
+ second click must be near the previous click to prevent false double
+ clicks being reported.
+ * [131327] Fixed mouse propagation for top-level widgets with the
+ WA_MacNoClickThrough attribute set.
+ * Now entirely QuickDraw clean.
+ * [155540] Ensured that asymmetic scales work with cosmetic pens.
+ * [141300] Fixed an issue that prevented QFontDatabase/QFontDialog from
+ showing all fonts installed on the system.
+ * Fixed writing system detection in QFontDatabase.
+ * [148876] Fixed bug that caused characters to be committed twice in the
+ Chinese Input method.
+ * Removed the use of an extra setFocus() in the event loop when a window
+ is activated.
+ * [152224] Fixed bug in QWidget's window state.
+ * [156431] Added the WA_MacAlwaysShowToolWindow widget attribute to
+ allow Mac users to create utility-window-style applications.
+ * [144110] Fixed resizing of sheets on Panther.
+ * [140014] Made it possible to drag QUrls on Panther.
+ * [155312] Fixed bug that could occur when dragging several URLs to
+ Finder and certain other applications.
+ * [155244] Fixed bug that could occur when dragging a URL to Finder.
+ * [153413] Fixed bug that could occur when dragging URLs between Qt applications.
+ * [152450] Fixed bug that could occur when dragging URLs to applications
+ such as the trash can.
+ * [151158] Fixed an issue that prevented widgets from receiving drag
+ events if a move event was ignored.
+ * [145876] Ensured that a drag move event is always received directly
+ after a drag enter event (according to the documentation).
+ * [156365] Fixed event bug when dragging URLs to receivers that only
+ refer to a drop location.
+ * [119251] Tool tips and dialogs no longer cause full-screen windows to
+ show their menu bar and the dock.
+ * [147640] Fixed QScrollArea scrolling behavior when showing regions
+ with dimensions between 2^15 and 2^16 pixels.
+ * [158988] Ensured that a mouse enter event is now sent before a mouse
+ press event upon window activation.
+ * [157313] Fixed hanging bug that could occur if the system clock was
+ adjusted backwards while using sockets.
+ * [151411] Fixed window switching bug (Cmd + ~) that could occur when
+ showing a modal dialog with a popup.
+ * Ensured that changing a shortcut containing a cursor movement key now
+ works correctly.
+ * [143912] Fixed focus problem caused by mouse hovering over widgets
+ with modal sheets.
+ * [141456] Fixed activation bug exhibited by minimized windows upon
+ being shown.
+ * [155394] Fixed issue where a widget's move and resize state were not
+ set correctly upon widget initialization.
+ * [254325] Fixed sheet transparency bug.
+ * [152481] Fixed crash that could occur when clicking in a window when a
+ modal print dialog is showing.
+ * [143835] Removed unnecessary window updates for active windows.
+ * [145552] A mouse up event is now sent when a window drag has finished
+ after a mouse press.
+ * [146443] Ensure that, if a window is moved before it is shown for the
+ first time, it is placed correctly when it is shown.
+ * [141387] Fixed bug that caused two near-simultaneous mouse presses on
+ different widgets to be interpreted as a single click.
+ * [139087] Fixed activation for some types of shortcuts, such as
+ QKeySequence(Qt::CTRL | Qt::Key_Plus).
+ * Only use Roman for determining with System Fonts since Mac OS X will
+ perform the necessary translation.
+ * When using OpenGL, ensured that the 32-bit accumulation buffer is used
+ in preference to the 64-bit accumulation buffer by default.
+ * [123467] Fixed bug where the event loop would spin and not emit
+ aboutToBlock() when popup menus were shown.
+ * [137677] QString::localAwareCompare() now respects the sorting order
+ set in the system preferences.
+ * [139658] Mac OS X accessibility no longer requires that
+ QApplication::exec() is called.
+ * [118814, 126253, 105525] Fixed several QCombobox look and feel issues.
+ * [145075] Fixed aliased line drawing bug.
+ * [122826] Fixed QScrollBar painting error.
+ * [131794] PixelTool and QWidget::grabWindow() now work on non-primary
+ monitors.
+ * [160228] The Quartz 2D-based paint engine now respects the font style
+ strategy.
+ * Made miscellaneous changes to make wrapping non-Qt HIViews easier.
+ * Qt is now built with MACOSX_DEPLOYMENT_TARGET set to 10.3 (since Qt
+ can only be run on Mac OS X 10.3 and above).
+ * QSound now uses NSSound for its implementation instead of the
+ deprecated C QuickTime API. This means that the QtGui library is no
+ longer dependant on the QuickTime framework.
+ * Added a -dwarf-2 configure option to allow people to turn on DWARF2
+ debugging symbols when that is not the default.
+ The ability to use DWARF2 debugging symbols was added in later version
+ of the Xcode 2.x series.
+ * Fixed many assertions when running against Carbon_debug.
+ * Renamed the Qt::WA_MacMetalStyle attribute to WA_MacBrushedMetal.
+ * Changing the Qt::WA_MacBrushedMetal attribute will now cause a
+ StyleChange event to be sent.
+ * The Qt translations and Qt Linguist phrase books have been added to
+ the binary package.
+ * [134630] Fixed loading of plugins in the case where universal plugins
+ are used but the wrong architecture is accidentally read first,
+ instead of returning an architecture mismatch.
+ * QCursor now uses NSCursor internally instead of the deprecated
+ QuickDraw functions.
+ * Corrected the encoding and decoding functions for QFile to handle
+ different Unicode normalization forms.
+
+Qtopia Core
+-----------
+
+ - New font system
+ * A new font subsystem has been implemented that, by default, allows
+ glyphs rendered at run time to be shared between applications. A new
+ pre-rendered font format (QPF2) has also been implemented together
+ with a new "makeqpf" tool to generate them.
+ * Support for custom font engine plugins has been added through
+ QAbstractFontEngine and QFontEnginePlugin.
+ * The default font family has been changed to DejaVu Sans.
+
+- OpenGL ES
+ * [126421, 126424] Added QGLWindowSurface and QGLScreen framework for
+ OpenGLES (and others) on Qtopia Core. A sample implementation can be
+ found in the examples/qtopiacore directory.
+
+ - Accelerated graphics API
+ * [150564] API changes in QWSWindowSurface. New functions include
+ QWSWindowSurface::move() to enable accelerated movement of top-level
+ windows.
+ * [152755] API clarification: The windowIndex parameter to
+ exposeRegion() now always refers to the window that is being changed.
+ * [150569, 139550] Made API additions to QWSWindow to give QScreen
+ information about the window state, window flags, and window dirty
+ region
+ * [150746] Added QScreen::pixelFormat() and QScreen::setPixelFormat() to
+ enable drawing optimizations for some formats.
+
+ - General fixes
+ * Improved support for compiling a LSB (Linux Standard Base) compliant
+ Qtopia Core library.
+ * [133365] Added the QWSServer::setScreenSaverBlockLevel() function to
+ make it possible to block the key/mouse event that stops the screen
+ saver at a particular level.
+ * Fixed QFontDatabase::addApplicationFont() for Qtopia Core.
+ * [131714] Fixed performance problems with drag and drop operations.
+ * [96507] Added support for using _POSIX_MONOTONIC_CLOCK as the timer
+ source (also effects Qt/X11).
+ * [132346] Fixed a performance bug causing unnecessary screen copies
+ when using a hardware cursor.
+ * [121496] Made lots of performance improvements in the VNC driver.
+ * [138615] Fixed color conversion for cases where the VNC server is
+ running on a big-endian machine.
+ * [131321] Optimized text drawing.
+ * [136282] Fixed a bug preventing QWidget::setCursor() and
+ QWidget::unsetCursor() from taking effect immediately.
+ * [139318] Fixed a performance bug that would cause non-visible regions
+ to receive paint events.
+ * [139858] Implemented acceleration for the 'pc' mouse handler.
+ * [140705, 140760] Improved release of used resources (e.g, shared
+ memory and hardware resources) when the application exits
+ unexpectedly.
+ * [144245] Fixed a problem with some cross-compilers triggered by using
+ math.h functions taking a double argument when using float data.
+ * Optimized QSocketNotifier activation.
+ * [156511] Implemented QDirectPainter::ReservedSynchronous which makes
+ a QDirectPainter object behave as a QDirectPainter region allocated
+ using the static functions.
+ * [94856] Fixed console switching when using the Tty keyboard driver.
+ * [157705] Ensured that device parameters are passed to keyboard and
+ mouse plugins.
+ * [156704] Fixed QPixmap::grabWindow() for 18 and 24-bit screens.
+ * [154689] Fixed the -no-gfx-multiscreen configure script option.
+ * [160404] Fixed 4-bit grayscale support in QVFb and QScreen.
+ * Optimized QCop communication.
+ * Fixed bug in QWidget::setMask() for visible widgets.
+ * [152738] Allow transparent windows to be shown on top of unbuffered
+ windows.
+ * [154244] Fixed bug where a client process would not terminate when
+ server closed.
+ * [152234] No longer send key events for one client to other client
+ processes for security and performance reasons.
+ * [148996] Added checks in the server to avoid buffer overruns if
+ clients send malformed commands
+ * [154203] Fixed mouse calibration bug with mirrored/180-degree-rotated
+ touch screens.
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+- MinGW
+ * [119777] Removed the dependency on mingwm.dll when compiled with the
+ -no-exceptions option.
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+ * Auto-detect Xoreax IncrediBuild with XGE technology, and enable
+ distribution of moc and uic.
+ * Shadow builds are now supported by nmake/mingw-make of the Qt build
+ system.
+ * [151184] Separated the -make options for demos and examples
+ * [150610] Fixed the build system to take into account that fvisibility
+ requires gcc on Unix builds.
+ * [77152] Ensured that, at "make install" time, all meta-information
+ files will be cleaned up to remove reference to source code path.
+ * [139399] Ensured that the environment CC/CXX on Unix are taken into
+ account when running the build tests.
+ * [145344] Ensured that "make confclean" will remove all files
+ generated by configure.
+ * [145659] Added ability to disable SSE.
+ * Added DWARF2 detection and support into the build system to reduce
+ the debug library size.
+ * Added macx-g++-64 meta-spec for Qt configuration purposes.
+ * [127840] The pkgconfig files (.pc) are now placed into lib/pkgconfig.
+ * [135547] Allow Windows line endings on UNIX and vice versa in
+ .qt-license files.
+ * [133068] GIF support is now enabled by default.
+ * [137728] Fixed failed build on Mac OS X and Solaris when using the
+ -separate-debug-info command line option for the configure script.
+ * [137819] Added support for precompiled headers with the Intel C++
+ Compiler for Linux.
+ * Re-used qplatformdefs.h from linux-g++ in the linux-icc mkspec.
+ * [121633] Added linux-icc-64 mkspec which is needed for building on
+ some 64-bit hosts.
+ * Removed cd_change_global from win32-msvc's qmake.conf file.
+ * [116532] Keep intermediate manifest file in object directory instead
+ of the destination directory.
+ * Added a configuration type to qconfig.pri on Windows.
+ * Corrected paths in Makefile generation when configuring with the
+ -fast command line option.
+ * Added tests to auto-detect a suitable TIFF library.
+ * [152252] Fixed auto-detection of MSVC.NET 2005 Express Edition in
+ configure.exe.
+ * [151267] Ensured that the manifest tool does not get forward slashes
+ when writing paths to manifest files.
+ * [153711] Ensured that the directory separators used in .qmake.cache
+ are correct for normal MinGW and Cygwin MinGW.
+ * [154192] Fixed a problem with configure.exe executing non-existing
+ scripts.
+ * [128667] Added a confclean build target on Windows for the top-level
+ project file.
+
+
+- Assistant
+ * [99923] Added a context menu for the tabs in the tab bar. Right click
+ on a tab to get a list of common options.
+ * Assistant now uses the "unified toolbar" look on Mac OS X.
+
+- Designer
+ * [151376] Added a context menu to the tab order editor.
+ * [39163] Added a tab order editor shortcut - using Ctrl with the left
+ mouse button makes it possible to start ordering from the selected
+ widget.
+ * [159129] Fixed a crash in the tab order editor.
+ * Improved snapping behavior for multi-selections and negative
+ positions.
+ * [126671] Made it possible to move widgets by using the cursor keys
+ without modifiers. The Shift modifier enables resizing, the Control
+ modifier enables snapping behavior.
+ * [111093] Added a file tool bar.
+ * [156225] Fixed the delete widget command for cases where the deleted
+ widget is a child of a QSplitter widget.
+ * [101420] Improved the WYSIWYG properties of forms with respect to the
+ background colors used.
+ * [112034] Enabled Ctrl + drag as a shortcut for copying actions in
+ menus and tool bars.
+ * [128334] Double clicking on a widget now invokes the default action
+ from its task menu.
+ * [129473] Fixed bug in the handling of default tab orders.
+ * [131994] Made it possible to set the tab order for checkable group
+ boxes.
+ * Added new cursor shapes.
+ * [137879] Improved the editor for key sequence properties.
+ * [150634] Improved refreshing behavior of all properties after property
+ changes.
+ * [147655] Fixed shadow build issues.
+ * [151567, 149966] Ensured that object names are unique.
+ * [80270] Fixed bug with saving icons taken from resources which are
+ specified with aliases.
+ * [152417] Fixed loading/saving of header labels of Q3Table widgets.
+ * Added the QColumnView widget to the widget box.
+ * Added support for new margin (left, top, right and bottom) and spacing
+ (horizontal and vertical) properties of the layout classes.
+ * [146337] Ensure that the margin and spacing properties are not saved
+ if they have the default values.
+ * Fixed layout handling in Q3GroupBox
+ * [124680] Ensured that the correct pages are displayed when selecting a
+ QStackedWidget page in the object inspector.
+ * [88264] Ensured that breaking a nested layout doesn't break the parent
+ container's layout.
+ * [129477] Added support for dynamic properties via the context menu in
+ the property editor.
+ * [101166] Added an "Add separator" action to the standard context menu.
+ * [132238] Added a "Recent files" button to the New Form dialog.
+ * [107934] Updated the font anti-aliasing property from a boolean
+ property to a property with 3 values.
+ * [155464] Added a German translation.
+ * [146953] Enabled support to allow widgets to be dragged onto the
+ object inspector.
+ * [152475] Ensured that the widget box saves and restores its state.
+ * [111092] Added support to allow images to be dragged from the resource
+ editor and dropped onto the action editor or icon properties in the
+ property editor.
+ * [111091] By default, icon dialogs now open to show the resource
+ browser.
+ * [152475] Added a button to load newly found custom widget plugins to
+ the plugin dialog.
+ * [151122] Added warnings for custom widget plugin issues such as load
+ failures and class name mismatches.
+ * [138645] Improved the form preview on Mac OS X, provided a close
+ button and a menu entry.
+ * [103801] Made buddy editing possible for custom widgets derived from
+ QLabel.
+ * [148677] Added a font chooser for tool windows.
+ * [107233] Made the grid customizable, provided default and per-form
+ grid settings.
+ * [149325] Provided a form editor context menu in the object inspector.
+ * [147174] Changed the elide mode and improved column resizing behavior
+ of property editor and object inspector.
+ * [147317] Improved handling for switching user interface modes,
+ preventing the geometries of form window from being changed.
+ Made 'Bring to front' deiconify windows.
+ * [146629] Fixed never ending loop on Linux triggered by scrolling
+ quickly through the pages of a QStackedWidget.
+ * [145806] Enabled KDialog to be used as a template.
+ * [142723] Enabled the pages of QStackedWidget, QTabWidget and QToolBox
+ to be promoted.
+ * [105916] Enabled QMenuBar to be promoted.
+ * [147317] Improved the New Form dialog.
+ * [95038] Fixed handling of layout defaults.
+ * [103326] Made it possible to make connections to form signals.
+ * [145954] Added a new dialog for promoted widgets with the ability to
+ specify global include files.
+ Added promotion candidates to the form's context menu.
+ * [127232] Ensured that global include files returned by
+ QDesignerCustomWidgetInterface::includeFile() are handled correctly.
+ * [139985] Improved handling of layouts for custom widgets.
+ * [99129] Made custom implementations of QDesignerMemberSheetExtension
+ work correctly.
+ * [87181] Added support for setting properties on items in a multi-
+ selection.
+ Added support for sub-properties. For example, changing the font size
+ of a multi-selection does not overwrite other font settings.
+ Added undo-support for property comments.
+ * [135360] Added tooltips to the property editor, action editor and
+ object inspector.
+ * [103215] Added handling of escaped newline characters for text
+ properties.
+ Added support for validators and syntax highlighting for style sheets.
+ * [135468] Added support for tool bar breaks.
+ * [135620] Fixed several issues concerning handling of properties of
+ promoted widgets.
+ * [109077] Provided multi-selection support in the object inspector.
+ * [133907] Made in-place editing of plain label texts possible.
+ * [134657] Fixed table widget editor.
+ * [90085] Made the resource editor consume a little less horizontal
+ screen real estate.
+ * [105671] Added support to allow main windows to be maximized while
+ being previewed.
+ * Added a style sheet editor.
+
+- Linguist
+ * Translations can be exported to and imported from XLIFF files.
+ * [136633] Fixed "Find" so that it searches in comments.
+ * [129163] Fixed bug that prevented "Next Unfinished" from working if
+ there was no selected item.
+ * [125131] Made the translation loading behavior consistent with
+ Assistant and Designer.
+ * [125130] Added the -resourceDir command line argument for consistency
+ with Assistant and Designer, to allow the path of translation files
+ to be specified.
+ * [124932] XML files (.ts and .xlf) are now written with platform-
+ specific line endings.
+ * [128081] Ensure that the tree view does not lose focus when the up
+ and down cursor keys are used for navigation.
+ Use Shift+Ctrl+K and Shift+Ctrl+L instead if you really want this
+ behavior.
+ * [139079] Added a DTD to document the TS file format.
+
+- lupdate
+ * Made some small improvements in lupdate's .pro file parser.
+ Fixed bug in inclusion of relative .pri files.
+ * [140581] Improved namespace/context parsing.
+ * [142373] Fixed bug when running lupdate on a SUBDIRS .pro file that
+ prevented TS files from being created.
+ * [135991] Ensure that .pro file comments are handled correctly when
+ they occur within a list of several variable assignments.
+ * [154553] Fixed bug with CODECFORTR that caused saving of incorrect
+ characters.
+
+- rcc
+ * [158522] By default compression is now set to the zlib default
+ (normally level 6).
+ * [133837] Allow absolute paths in .qrc files (accessible through the
+ original filesystem path).
+ * [146958] No longer returns error when a .qrc is empty. A (mostly)
+ empty file is generated instead.
+
+- moc
+ * [149054] Fixed parsing of old-style C enums.
+ * [145205] Ensured that a warning is given when a known interface
+ (marked with Q_DECLARE_INTERFACE) is subclassed that is not mentioned
+ in Q_INTERFACES.
+ * [97300] Allow @file to be given as the options input file to handle
+ command lines larger than allowed by the operating system.
+
+- uic
+ * [144383] Added checks to prevent generated code from calling
+ ensurePolished() before each constructor is finished.
+ * [138949] Ensured that font and size policy instances are reused in
+ generated code.
+ * [141350] Ensured that color brushes are reused in generated code.
+ * [141217] Improved handling of include files of Qt 3 classes.
+ * [144371] Ensure that each form's objectName property is not set in
+ setupUi() to avoid problems in cases where the name was already set.
+ * Added support for the QWidget::locale property.
+ * [141820] Fixed generation of connections in the form.
+ * [137520] Ensured that code to set toolTip, statusTip and whatsThis
+ properties is not generated when the corresponding QT_NO_*
+ preprocessor macros are defined.
+ * [128958] Ensured that static casts are not used in generated code.
+ * [116280] Added support for qulonglong and uint types.
+
+-uic3
+ * [137915] Added functionality to extract images via the -extract
+ command line option.
+ * [129950] Added the -wrap command line option which specifies that a
+ wrapper class which is Qt 3 source compatible should be generated.
+
+- qmake
+ * [121965] Implemented DSW (Workspace files) generation for MSVC 6.0
+ users.
+ * [132154] Added support for /bigobj option in the vcproj generator.
+ * Fixed crash with dependency analysis.
+ * Ensure that cleanup rules are not added for extra compilers with no
+ inputs.
+ * LEX/YACC support has been moved into .prf files.
+ * [156793] Introduced PRECOMPILED_DIR for PCH output (defaults to
+ OBJECTS_DIR).
+ * [257985] Fixed qmake location detection bug.
+ * Ensured that empty INCLUDEPATH definitions are stripped out.
+ * Allow QMAKE_UUID to override qmake deteremined UUID in the vcproj
+ generator.
+ * [151332] Ensured that .pc files are terminated with an extra carriage
+ return.
+ * [148535] Introduced QMAKE_FRAMEWORKPATH and used it internally.
+ * [127415] Fixed object_with_source.
+ * [127413] Introduced QMAKE_FILE_IN_PATH placeholder for extra
+ compilers.
+ * [95975] Replaced QMAKE_FILE_IN for custom build steps in DSP
+ generator.
+ * [141749] Added checks to prevent cyclical dependencies.
+ * [146368] Ensured that GNUmake .d files are removed upon distclean.
+ * Improved extensibility of the precompiled header support to allow icc
+ precompiled headers.
+ * [147142] Short-circuit previously seen library paths to avoid
+ cyclical .prl processing.
+ * [144492] Ensured that INSTALL_PROGRAM is set for INSTALLS in
+ macx-xcode projects.
+ * [143720] Extra compilers will now depend upon the input file
+ automatically.
+ * Introduced QMAKE_DISTCLEAN for extra files to be removed upon
+ invocation of "make distclean".
+ * [133518] Reduced the noise created by qmake warnings.
+ * [108012] Brought macx-xcode into line with macx-g++ with regards to
+ custom bundle types.
+ * [128759] Added support for spaces in paths to linked libraries.
+ * [83445] Made sure that "make distclean" in a library with a DESTDIR
+ really does remove the destination symbolic links.
+ * The subdir generator will now use - to separate target words and _ to
+ separate internally appended words.
+ * [125557] Fixed broken generation of dependencies for extra compilers.
+ * Ensured that the QMAKE_QMAKE variable is given a reasonable default
+ before parsing and evaluating project files.
+ * For Unix/Mac OS X, configure now has an -optimized-qmake option that
+ allows people to build qmake with optimizations.
+ This is disabled by default as older versions of some compilers take
+ a long time to build an optimized qmake. qmake is already built with
+ optimizations on Windows.
+ * [130979] Made the incremental link option case-insensitive.
+ * Ensured that paths for custom build steps in vcproj files have the
+ correct seperators.
+ * Avoid duplicate dependency paths, reduce file stats.
+ * [91313] Ensured that multiple commands in the DSP generator are
+ separated with \n\t characters.
+ * [108681] Added checks to avoid problems with uic3 files having
+ dependencies on themselves.
+ * [130977] Added support for non-flat output for vcproj files with
+ single configuration.
+ * [134971] Added support for more compiler and linker options for
+ vcproj files, and added catch-all cases which add options to
+ AdditionalOptions variables.
+ * [140548] Fixed escaping of the custom build step for image
+ collections.
+ * [114833] Ensured that paths in vcproj always have native filing
+ system separators.
+ * [144020] Only allow CONFIG+=staticlib for TEMPLATE==lib.
+ * [97300] Handle large number of include paths on Windows for moc by
+ using temporary files. (See moc changes.)
+ * [150519] Ensured that qmake is compiled with the correct mkspec on
+ Windows.
+ * [148724] Added manifest files to project clean up.
+ * [123501] Added /LIBPATH to AdditionalLibraryPaths in vcproj files.
+ * [80526] Made sure that extra compiler commands are not corrupted due
+ to path separator fixing.
+ * [109322] Moved hardcoded extra compilers, yacc and lex, into the PRF
+ (feature) system.
+ * [101783] Added a _DEBUG to Resource Tool for debug builds on Windows.
+ * [145074] Added a custom build step on input files, for extra compiler
+ files with built-in compilers for the output files.
+ * [150961] Added support for QMAKE_PRE_LINK in the DSP and VCPROJ
+ generators.
+ * Added checks to avoid double escaping of DESTDIR_TARGET file paths in
+ Windows Makefiles.
+ * Ensured that file paths for COPY_FILE and QMAKE_BUNDLE are escaped.
+ * [83765] Ensured that input files instead of output files are added to
+ extra compiler steps under certain conditions.
+ * [101482] Fixed relative path handling for RC_FILE.
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+- QTiffPlugin
+ * [93364] Added support for the TIFF image format.
diff --git a/dist/changes-4.3.1 b/dist/changes-4.3.1
new file mode 100644
index 0000000..71de8e9
--- /dev/null
+++ b/dist/changes-4.3.1
@@ -0,0 +1,519 @@
+Qt 4.3.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.3.0.
+
+The Qt version 4.3 series is binary compatible with the 4.2.x, 4.1.x and
+4.0.x series. Applications compiled for Qt 4.0, 4.1 or 4.2 will continue to
+run with Qt 4.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Translations
+ * Updated the German translation to provide complete coverage of Qt.
+
+- QDBusView
+ * Added icons for Mac OS X and Windows.
+
+- Intel C++ Compiler for Linux
+ * Added support for version 10 of the compiler. See the Compiler
+ Notes documentation for known problems and work-arounds for this
+ compiler.
+ * Added linux-icc-32 mkspec, for building with the 32-bit compiler
+ on 64-bit hosts.
+
+Third party components
+----------------------
+
+- FreeType
+ * Security fix (CVE-2007-2754): Integer overflow in the
+ TT_Load_Simple_Glyph function in freetype 2.3.4 and earlier allows
+ remote authenticated users to execute arbitrary code via crafted BDF
+ fonts.
+
+- SQLite
+ * File descriptors are not inherited during spawn() anymore.
+
+Build System
+------------
+
+ * Fixed native builds on ARM architectures.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- QAbstractItemView
+ * [166605] Fixed regression causing keyboard modifiers to have no effect
+ during drag and drop operations.
+ * [169233] Fixed bug that would prevent text from being selected in
+ double spin box editors.
+ * [168917] Text would sometimes not be selected in the editor.
+
+- QAbstractItemModel
+ * [166714] Fixed regression causing persistent indexes to not be
+ correctly updated.
+
+- QAbstractPrintDialog
+ * [163000] Fixed bug on Unix where the PrintSelection option would not
+ be enabled unless PrintPageRange was also enabled.
+
+- QApplication
+ * [166677] Windows only: Fixed an issue with alert() where windows
+ would keep flashing after being activated by the user.
+ * [168974] Fixed problems with compilation that could occur when
+ QT3_SUPPORT and QT_NO_CURSOR were defined.
+
+- QComboBox
+ * [165130] Mac OS X only: Fixed bug that caused an editable combo box to
+ cut off list entries.
+
+- QDesktopServices
+ * [165817] Fixed misleading documentation of
+ QDesktopServices::setUrlHandler().
+
+- QDialog
+ * [166900, 166514] Fixed bug where a dialog could remain visible after
+ hide() had been called.
+
+- QFile
+ * [167217] Fixed regression that prevented the sequential bit from being
+ reset when reopening a file.
+
+- QFileDialog:
+ * [164947] Mac OS X only: Ensure that the parent of a native sheet dialog
+ is activated before a sheet is shown.
+
+- QFSFileEngine:
+ * [163406] Ensured that QFile::readLine() works on all platforms when
+ QFile is opened on file descriptor 0.
+
+- QGLWidget
+ * [162085] X11 only: Fixed usage of QGLWidget on multiple X11 screens.
+ * [164707] X11 only: Fixed the transparent overlay color usage to make
+ it possible to draw with a solid black color. Qt::transparent is now
+ always returned as the transparent color in an overlay.
+ * [162143] Fixed a crash that could occur when calling renderPixmap()
+ with extremely large sizes. It now gracefully fails instead.
+
+- QGraphicsItem
+ * [163430] Improved precision of QGraphicsItem::ItemIsMovable move
+ operations, and fixed move support for
+ QGraphicsItem::ItemIgnoresTransformations.
+
+- QGraphicsItemAnimation
+ * [164585] Fixed setTimeLine(0) to properly remove the existing timeline,
+ and also ensured that setting the same timeline twice works fine.
+
+- QGraphicsScene
+ * [163555] Flat items (items whose bounding rect width or height is 0)
+ no longer cause a full viewport update when they are updated.
+
+- QGraphicsView
+ * [160828] Fixed bug in QGraphicsScene/View::render() which could cause
+ nothing to be rendered for QPicture target devices.
+ * [163919] Scroll bar ranges are no longer reset to (0,0) when the
+ scroll bars are disabled (Qt::ScrollBarAlwaysOff).
+ * [163537] Scroll bar ranges are now correct also for styles with a
+ viewport frame only around the viewport itself (e.g., Motif and Mac
+ OS X style).
+ * [158245] Calling setScene(0) now recalculates the scroll bar ranges.
+ * [170619, 157400] Fixed rendering bugs that could occur when using a
+ semi-transparent foreground or background brush.
+ * [170619, 168885] Fixed a bug that would cause the rubber band to
+ appear after invoking a context menu.
+
+- QHostInfo
+ * [168233] Ensured that all pending look-ups are terminated on
+ application exit to avoid a delayed application shutdown while waiting
+ for the look-ups to complete.
+ * [167487] Fixed support for Unix platforms that allow IPv6 look-ups
+ through getaddrinfo(), but that don't support IPv6 sockets.
+
+- QImage
+ * [163727] Fixed artifacts in scaled images that could occur when using
+ Qt::FastTransformation.
+ * [169908] Fixed a crash that could occur when reading 4-bit
+ uncompressed BMP images.
+
+- QLocale
+ * [167534] Fixed bug that would cause QLocale::toString() to return
+ garbage if passed an invalid time or date.
+
+- QMainWindow
+ * [166004, 167651] Made the unified toolbar handle layout requests.
+ * Mac OS X only: Don't move the window's title bar when clicking on the
+ toolbar button.
+ * [164105] Made the unified toolbar handle showMaximized().
+ * [162555] Move OpenGL contexts when the toolbar button is pressed and
+ we are using the unified toolbar.
+ * [169063] Fixed a crash that could occur when setting a new menu bar
+ and the old one contained corner widgets.
+
+- QMdiArea
+ * [162573] Improved switching between maximized subwindows (less
+ flickering).
+ * [162046, 164264] Improved activation behavior.
+ * [170770] Fixed inconsistent behavior with scroll bars when a subwindow
+ is maximized.
+ * [169873] Fixed incorrect positions of tiled subwindows.
+
+- QMdiSubWindow
+ * [168129] Improved the way a default window icon is selected.
+ * [169859] Improved menu bar buttons for maximized subwindows.
+ * Improved support for size grips.
+ * [169543] Windows only (XP style): Fixed a problem where the frame
+ width was 1 pixel wider than it should have been.
+ * [168829] Fixed incorrect margins of maximized subwindows inside
+ QMainWindow.
+
+- QMenu
+ * [166652] Fixed a regression where context menus could not be triggered
+ with the right mouse button.
+ * [161789] Fixed a bug that prevented tear-off handles from being
+ activated when they were dragged down from the menu bar item.
+
+- QMenuBar
+ * [168892] Fixed bug that made the extension always appear when adding a
+ separator to a menu bar.
+ * [166181] Fixed bug that caused extensions to be misplaced.
+ * [166242] Fixed bug that could cause menus to be collapsed.
+
+- QMessageBox
+ * Ensured that the default button isn't lost when the modality of the
+ message box is changed.
+
+- QMacStyle
+ * Ensured that items with State_Focus actually get the focus ring drawn.
+
+- QNetworkProxy
+ * [170549] Fixed a regression from 4.2.3 in the default constructor; if
+ used before any other proxy settings were applied, it would fail to
+ initialize the proxy handlers, effectively disabling support for
+ SOCKS5 and HTTP proxies.
+
+- QOpenGLPaintEngine
+ * [166087] Fixed a memory leak caused by not releasing GL program
+ handles if they failed to compile.
+ * [166054] Ensured that push and pop operations are performed on the
+ texture matrix stack and the client state attributes when begin()
+ and end() are called.
+ * [161021] Fixed rendering of points with cosmetic pens with widths
+ greater than 0.
+
+- QPainter
+ * [158815] Fixed rendering artifacts for extended composition modes with
+ semi-transparent or anti-aliased drawing.
+ * [163744] Fixed aliased ellipse drawing artifacts (horizontal lines)
+ in raster engine.
+ * [166623] Fixed bug where gradients with ObjectBoundingMode would be
+ drawn at an incorrect offset.
+ * [167497] Fixed color bleeding artifacts at the edges when drawing
+ images/pixmaps with SmoothPixmapTransform on X11.
+ * [168621] Fixed bug which would cause projective transformations to be
+ incorrectly applied for non-top-level widgets.
+ * [168623] Fixed drawing of gradients with projective transformations.
+ * [167891] Fixed an assert in QBezier::shifted() that occured when
+ drawing certain paths.
+
+- QPlastiqueStyle
+ * [167145] Fixed a regression with combo and spin box text margins.
+
+- QPrintDialog
+ X11 only:
+ * [142701] Fixed an assert which could occur on a system with CUPS
+ setup, but no printers available.
+ * [165957] Added support to allow printers to be chosen from the
+ NPRINTER and NGPRINTER enviroment variables.
+ Ensured that CUPS command line options are not used when not using
+ CUPS.
+ * [158807] Fixed page ordering when printing to a CUPS printer or to PDF
+ files.
+ * [155129] Fixed Landscape printing with CUPS version < 1.2.
+
+ Windows only:
+ * [166054] Fixed a crash which could occur when trying to use a
+ QPrintDialog to configure a printer set to use
+ QPrinter::PostScriptFormat as output format.
+ * [162729] Fixed an assert that could occur when entering an invalid
+ page range.
+
+- QPrintEngine
+ * [166499] Windows only: Fixed a bug that could cause printing from a
+ QTextEdit to produce incorrect wrong results under certain
+ circumstances.
+ * [161915] Mac OS X only: Drawing vertical lines with a dot pattern now
+ work correctly on OS X 10.3.9.
+
+- QProcess
+ * [161944] QProcess::setReadChannel() no longer affects the contents of
+ the stderr / stdout / unget buffers. QProcess::readAllStandardError()
+ and QProcess::readAllStandardOutput() no longer clear any unget data
+ or buffered data.
+
+- QPixmap
+ * [167841] Fixed bug where filling a QPixmap with an alpha color would
+ fail to detach the pixmap, causing copies of the pixmap to be changed
+ as well.
+ * [157166] X11 only: Fixed problem with disappearing icons on 8-bit
+ TrueColor displays.
+ * [161307] Mac OS X only: Drawing bitmaps on pixmaps now works
+ correctly.
+
+- QRasterPaintEngine
+ * [166710] Fixed bug that prevented Qt::OpaqueMode from being taken into
+ account under certain circumstances when QPainter::fillRect() was
+ called.
+ * [159538] Fixed drawing of a monochrome image into another monochrome
+ image.
+ * [166000] Fixed compilation of mmxext optimizations.
+ * [156925] Fixed performance bug in 3DNow! optimizations.
+
+- QRegion
+ * [167445] Removed potential assert in QRegion::operator^ on Unix.
+
+- QScriptEngine
+ * [165899] Fixed bug where calling an overloaded slot from a script
+ would pick the wrong overload when the argument is a QObject.
+ * [166903] Fixed crash when evaluating a call to a script function that
+ ends with an if-statement with a true-part that ends with a return
+ statement (and has no else-part).
+
+- QScrollArea
+ * [167838] Use micro focus rectangle (if "active") instead of the entire
+ widget in ensureWidgetVisible().
+
+- QSortFilterProxyModel
+ * [167273] Fixed regression that caused QSortFilterProxyModel to assert
+ when changing data in a QSqlTableModel source model with the
+ OnFieldChange edit strategy.
+
+- QSqlQueryModel
+ * [166880] Fixed a bug where setQuery() could cause a crash by calling
+ hasFeature() on the wrong driver instance.
+
+- QSqlRelationalTableModel
+ * [140782] Fixed a bug which caused insertRecord() to fail when record()
+ returns a record containing duplicate field names.
+
+- QSslCertificate
+ * [168116] Don't crash when passing 0 to QSslCertificate::fromDevice();
+ issue a warning instead. This fix also removes warnings about
+ uninitialized symbols when accessing the static functions in
+ QSslCertificate before creating a QSslSocket.
+
+- QSslSocket
+ * [164356] Fixed a crash that could occur when passing a string to
+ setCiphers().
+ * [166633] Fixed a memory leak that would occur with each established
+ connection.
+ * [165962] Fixed support for wildcard certificates.
+ * [167593] Fixed a bug that caused QSslSocket::protocol() to be ignored
+ and set to the default of SSLv3 under certain circumstances.
+ * [167380] Fixed a crash when assigning a null key for SSL servers.
+ * [169571] Fixed a crash that could occur after disconnecting from a
+ remote address.
+
+- QTcpSocket
+ * [169183] Removed a qWarning() when reading from a closed socket
+ (regression from 4.2.3).
+
+- QTemporaryFile
+ * [167565] Fixed a regression from 4.2.3; size() would always return 0.
+
+- QTextEdit
+ * [161577] Fixed regression causing Shift-Backspace to be ignored.
+ * [165833] Fixed floating point overflow causing incorrect page heights
+ for text documents.
+ * [167377] Fixed performance regression when appending a lot of text in
+ NoWrap line break mode when there is a horizontal scroll bar.
+ * [163446] Fixed excessive emission of selectionChanged() signals when
+ moving the cursor.
+ * [167701] Fixed QTextEdit::setLineWrapMode to not change the
+ wordWrapMode property when called with NoWrap.
+
+- QTextDocument
+ * [160631] Fixed missing HTML export of page break policies.
+ * [163258] Fixed bug that prevented text table borders from being drawn
+ in QLabels and tool tips.
+ * [166670] Fixed layout bug that caused the right margin property of
+ paragraphs inside table cells to be ignored.
+ * [168406] Fixed rendering bug which would cause incorrect background
+ fills for paragraphs with a left margin set.
+
+- QTextLayout
+ * [166083] Fixed incorrect line breaking when breaking at a tab
+ character.
+ * [165861] Fixed support for QTextOption::NoWrap.
+
+- QLabel
+ * [162515] Fixed bug that prevented QLabel's alignment from being
+ applied properly to rich text.
+
+- QUrl
+ * Fixed a bug in QUrl::clear() which left some internal data uncleared.
+
+- QWidget
+ * [165177] Fixed crash that could occur when deleting a focus widget from a
+ window with a non-null parent.
+ * [165654] Fixed issue with incorrect repainting that could occur when
+ deleting an opaque child widget.
+
+- QWindowsVistaStyle
+ * [162730] Fixed the use of an incorrect font for item views on Windows
+ Vista.
+ * [157324] Improved the native appearance of indeterminate progress
+ bars.
+ * [170012] Fixed a bug which prevented the busy mode of a progress bar
+ from working when both its range and value were set to zero.
+
+- QWindowsXPStyle
+ * [132695] Fixed a crash issue that could occur after multiple system
+ theme changes.
+
+- QWizard
+ * [159684] AeroStyle: Fixed bug that caused the minimum height to be set
+ too low.
+ * [161670] AeroStyle: Fixed a problem that caused title bar buttons to
+ remaining glowing after the mouse had left the window.
+ * [161678] AeroStyle: Fixed a problem with incorrect vertical center
+ alignment of wizard buttons.
+
+- Q3Header
+ * [167283] Fixed regression in painting of the header.
+
+- Q3ListViewItem
+ * [165853] Fixed background coloring of a cell.
+
+- Q3Socket
+ * [163563] Fixed regression in canReadLine(); it now properly searches
+ all internal buffers.
+
+- Q3Table
+ * [168497] Fixed incorrect updates when using setUpdatesEnabled().
+
+- Q3Wizard
+ * [168195] Fixed bug that could cause the wrong page to be shown when
+ reopening a wizard.
+
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+ * [149761] Added support for compiling Firebird 2.0 on 64-bit platforms.
+ * [165423] Fixed a regression causing an assert when calling a stored
+ procedure without out-parameters.
+ * [166238] Fixed a bug that caused only the first segment of multi-
+ segmented BLOBs to be retrieved in some cases.
+
+- ODBC driver
+ * [167167] Fixed a regression that caused a crash when checking DBMS
+ general information when connecting to a database.
+
+- SQLite driver
+ * Use new sqlite3_prepare16_v2 instead of sqlite3_prepare16 when
+ possible.
+ * [167665] Fixed a regression that caused field names to be escaped
+ multiple times when selecting from views.
+
+****************************************************************************
+* Examples *
+****************************************************************************
+
+- Secure Socket Client
+ * New example, showing how to use QSslSocket to communicate over an
+ encrypted (SSL) connection.
+
+- Accelerated Screen Driver
+ * Ensured that the example does not crash if it is unable to get a
+ pointer to the frame buffer.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+
+ * [163862] Fixed a bug where QClipboard would escape all non-ASCII
+ characters that were copied from GTK+ applications.
+ * [165182] Fixed building with the Intel C++ Compiler for Linux on
+ IA-64 (Itanium) (missing functions in qatomic_ia64.h)
+ * [163861] Fixed building on AIX 5.3 where the _POSIX_MONOTONIC_CLOCK
+ macro was accidentally redefined.
+ * [166650] Fixed a regression from 4.2.3 where calling QWidget::move()
+ in a reimplementation of QWidget::showEvent() did not work.
+ * [166097] QWidget::show() no longer overwrites the _NET_WM_STATE
+ property. Instead, QWidget now merges any existing _NET_WM_STATE
+ property together with its own state.
+ * Fixed the QAtomic implementation on the Alpha, which previously
+ caused all applications to hang on start-up.
+ * [165229] Changed the linux-lsb-g++ specification to avoid linking with
+ libGLU (which is not part of the LSB specification).
+ * [155083, 146833] Ensure that all font substitutions from fontconfig
+ are obeyed by using a strong binding for QFont's family with
+ fontconfig.
+
+Windows
+-------
+
+ * [169105] Fixed a regression where calling resize() on a minimized
+ window did not work.
+ * [169376] Fixed a race condition that would cause a crash when
+ stopping timers in a thread.
+ * [165440] Fixed a crash that could occur when using Google's Pinyin
+ input method with Qt.
+
+Mac OS X
+--------
+
+ * QMake's Xcode generator is now more robust when determining which
+ version of Xcode projects it should generate. It also uses launch
+ services to determine Xcode's location as well.
+ * Small changes to be more Leopard compatible
+ * [167020] Ensured that the translations are really included in the
+ binary package.
+ * [164530] Ensured that the DPI for fonts don't change when the
+ resolution changes.
+ * [165530] Fixed a bug that caused Q_DECLARE_METATYPE() in a
+ precompiled header to interfere with the Objective-C 'id' keyword.
+ * [165659] Fixed bold/italic font rendering for some fonts.
+
+Qtopia Core
+-----------
+
+ * Fixed support for bitmap fonts.
+ * [164297] Fixed a potential crash in accelerated paint engines.
+ * [160970] Fixed support for 1-bit black and white screens.
+ * [164783] Fixed bug in 4-bit grayscale support which resulted in pink
+ colors under certain circumstances.
+ * [164955] Fixed painting error when using QWidget::move().
+ * [166368] Fixed bug in QWidget::setFixedSize() when using multiple
+ screens.
+ * [165686] Fixed bug in QPixmap::grabWindow() when using multiple
+ screens.
+ * [130925] Fixed use of QWSWindowSurface::move() when acceleration is
+ available.
+ * [143865] Implemented QWSCalibratedMouseHandler::getCalibration()
+ properly to fill all return values.
+ * [161820] Fixed incorrect detection of glib libraries when cross-
+ compiling.
+ * [152914] Improved the framebuffer test example.
+ * [171454] Fixed painting errors when zooming in QVFb.
+
+
+****************************************************************************
+* Important Behavior Changes
+****************************************************************************
+
+- QScrollArea
+ * [167838] Use micro focus rectangle (if "active") instead of the entire
+ widget in ensureWidgetVisible().
diff --git a/dist/changes-4.3.2 b/dist/changes-4.3.2
new file mode 100644
index 0000000..2bec4e6
--- /dev/null
+++ b/dist/changes-4.3.2
@@ -0,0 +1,604 @@
+Qt 4.3.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.3.0 and Qt 4.3.1.
+
+The Qt version 4.3 series is binary compatible with the 4.2.x, 4.1.x and
+4.0.x series. Applications compiled for Qt 4.0, 4.1 or 4.2 will continue to
+run with Qt 4.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Legal
+ * This version adds the Academic Free License 3.0, Artistic License 2.0,
+ Zope Public License 2.1 and Eclipse Public License to the GPL
+ Exception for developers using the Open Source Edition of Qt.
+ See the Trolltech GPL Exception Version 1.1 page in the documentation
+ for more information.
+
+Tools
+-----
+
+- Designer
+ * [175822] Fixed incorrect behavior of the widget editing mode that
+ could occur when a form was resized.
+ * [174797] Fixed a crash that could occur when several commands were
+ redone in one go.
+
+Build System
+------------
+
+ * Enabled MSVC project generator for the Qt Open Source edition.
+ * Ensured that the QMAKE_CC and QMAKE_CXX variables are not defined in
+ the Xcode project generator to allow distributed (distcc) builds to
+ work again.
+ * [165183] Make DESTDIR work again in the Xcode generator.
+ * Fixed a bug in escape_expand() that could cause text to be corrupted.
+ * Updated the compiler notes for version 10.0.026 of the Intel C++
+ Compiler for Linux. Precompiled header support has been fixed in
+ this version of the compiler, so the -no-pch workaround is no longer
+ needed. Note that there is still one outstanding bug in the 64-bit
+ compiler that requires configuring and building Qt with -debug.
+ * Updated the compiler notes for HP-UX platforms and compilers.
+ * Introduced support for 32-bit builds on HP-UXi Itanium: hpuxi-acc-32.
+ * [163661] Fixed the dependency generator for ActiveQt server projects
+ and certain custom compilers
+ * [169756] Fixed mocinclude.tmp usage for Visual Studio 6.0 project
+ files for cases where the length of the includes exceeds the amount
+ allowed on the command line.
+ * [166407] Fixed the generated target rules when using YACCSOURCES.
+ * [156948] Ensured that QTPLUGIN libraries come before the Qt libraries
+ on the link line.
+ * Ensured that support for libtiff is not built if Qt is configured
+ without zlib support.
+ * [172629] Ensured that syncqt does not generate zero-size master
+ include files for modules that are not found.
+ * Fixed generation of dependencies for EXTRA_TARGETS.
+ * [159113] Ensured that the description for the Post Link build step in
+ VS 2003 does not contain any \n characters.
+
+I18n
+----
+ * Fixed a crash in lupdate/lrelease that could occur if the XML parser
+ reported an error.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Qt Script
+ * QScriptEngine::evaluate() no longer throws a syntax error in the case
+ where the script contains no actual statements.
+ * [175714] Fixed parsing of octal numbers on Windows and Mac OS X.
+
+- Style Sheets
+ * QMainWindow now respects the background-image style property.
+ * [171858] Ensured that QPushButton uses the correct color when the
+ text-align property is set.
+ * Fixed various bugs in QMenu styling.
+ * [168286] Fixed a bug that prevented the background from being clipped
+ correctly when the border-radius and background-clip properties were
+ defined.
+ * Fixed a QComboBox styling bug where the popup would show an extra row
+ when a style sheet was used.
+ * [177168] Fixed a memory leak where QStyleSheetStyle is never
+ destroyed.
+ * [172315] Fixed a stack-overflow when using the isActiveWindow
+ property as a selector.
+
+- Text rendering
+ * [168625] Fixed rendering of text with perspective transforms on X11
+ and Qtopia Core.
+ * [173792] Fixed transformed rendering of non-scalable/bitmap Freetype
+ glyphs.
+
+- QAbstractItemView
+ * [168493] Fixed drag and drop regression when a parent item in a tree
+ doesn't allow item to be dropped on it.
+ * [174848] Fixed a crash that could occur if the row currently being
+ edited was removed.
+
+- QCalendarWidget
+ * [171532] Fixed keyboard navigation (pressing "w" doesn't select the
+ "Wed" cell anymore).
+ * [173852] Fixed SingleLetterDayNames mode for the Chinese language.
+
+- QColorDialog
+ * [153436] Fixed a crash in QColorDialog that could occur when choosing
+ a color in the Gray colorspace.
+
+- QColumnView
+ * Ensured that selectAll() selects all items in cases where the
+ selection range contained multiple items.
+ * [170751] Fixed incorrect selection behavior caused by clicking on a
+ previously selected folder.
+ * [170753] Prevented items from being reselected on deselection in some
+ cases.
+ * [170753] Ensured that the full path is selected when passing an index
+ to select.
+ * [170753] Fixed a bug that could occur when deselecting an item that
+ caused its parent to be deselected.
+
+- QCoreGraphicsPaintEngine
+ * [170352] Fixed aliased strokes that were drawn 1 pixel too far to the
+ left on Mac OS X versions < 10.4.
+ * [172006] Fixed point drawing with a scaled painter on Mac OS X.
+
+- QDataWidgetMapper
+ * [172427] Fixed a crash that could occur when submitting data from the
+ mapped widget to the model.
+
+- QDateTimeEdit
+ * [118867] Fixed a bug that prevented valid values from being entered
+ when certain range restrictions were applied.
+ * [171920] Fixed a bug with parsing long day names.
+
+- QDir
+ * [176078] Fixed a crash that could occur when entering directories with
+ very long path entries.
+
+- QDirIterator
+ * [176078] Fixed a crash that could occur when entering directories with
+ very long path entries.
+
+- QDockWidget
+ * [174249] Fixed bug where it was possible to dock into a minimized
+ QMainWindow.
+
+- QFile
+ * [175022] Fix regression in handle() on Windows.
+
+- QFileDialog
+ * Fixed possible deadlock.
+ * Ensured that selection changed signals are reconnected when setting a
+ filter on a dialog.
+ * [171158] Fixed a crash that could occur when using the Forward button
+ to navigate into a folder that was deleted.
+ * [166786] (Windows) Fixed bug that prevented some files from being
+ shown in certain cases.
+ * [165289] (Windows) Fixed issue that caused UNC paths to be ignored
+ when used as initial paths for a file dialog.
+ * [140539] (Windows) Dialog no longer accesses floppy drives
+ automatically when launched.
+
+- QFontDatabase
+ * [176450] Added some missing tr() calls and made all strings
+ localizable.
+
+- QFSFileEngine
+ * [177363] Fixed a bug in fileTime() that caused the time returned to
+ depend on whether or not it was called during a Daylight Saving Time
+ period.
+
+- QGLPixelBuffer
+ * [179143] (Windows) Fixed a memory leak that would occur when a
+ QGLPixelBuffer was deleted. This would appear as a slowdown in
+ performance to the user.
+
+- QGLWidget
+ * [169131] Fixed an issue with renderPixmap() where text drawn with
+ renderText() was clipped to the size of widget, not the resulting
+ pixmap.
+ * [175513] Fixed an issue with renderText() which would cause artifacts
+ when bitmap fonts were used.
+ * [172474] (Windows) Fixed an issue with disappearing text when using
+ renderText() together with renderPixmap().
+ * [173944] (Mac OS X) Fixed a crash that could occur when requesting a
+ GL context with an overlay.
+
+- QGraphicsItem
+ * [174299] Fixed and improved bounding rect calculations for most
+ standard items.
+
+- QGraphicsScene
+ * [174450] Flat items are now rendered correctly also when NoIndex is
+ set.
+
+- QGraphicsTextItem
+ * [174429] This item now respects QGraphicsItem::ItemClipsParentToShape.
+
+- QGraphicsView
+ * (X11) A workaround has been applied to resolve random clipping errors
+ that would sometimes leave trailing artifacts and horizontal/vertical
+ white lines in the viewport.
+
+- QHeaderView
+ * [178483] Prevented crash that could occur when recomputing the layout
+ under certain conditions.
+
+- QHttp
+ * [176822] Fixed a bug that caused POST requests to submit an empty body
+ after a proxy authentication request.
+ * [176403] QHttp no longer resets proxy settings on sockets set with
+ QHttp::setSocket() (regression from 4.2.3).
+ * [175170] Prevent live lock when response ends with a stray '\r'.
+ * [172763] Fixed a bug that caused QHttp to ask the proxy server to
+ connect to the wrong address when in SSL (non-caching) mode.
+ * [172775] Fixed the emission of the done() signal under some conditions
+ (mostly SSL only).
+
+- QImage
+ * [176831] Fixed a bug that caused conversions to Format_RGB16 to give
+ incorrect colors.
+ * [169908] Fixed a crash that could occur when reading 4 bits per pixel
+ uncompressed BMP images.
+
+- QItemDelegate
+ * [173969] QDoubleSpinBox editors now allow negative input.
+ * [179119] Item checkboxes were rendered without a margin.
+
+- QLabel
+ * Fixed a crash that could occur when changing the contents of a label
+ in a slot connected to the linkActivated() signal.
+
+- QLayout
+ * Fixed a performance regression from Qt 4.2 related to the introduction
+ of QStyle::layoutSpacing().
+
+- QLibrary
+ * [178304] Fixed a bug that caused a crash if QLibrary::errorString()
+ was called before QLibrary had a file name associated with it.
+
+- QListView
+ * [270837] Fixed assert that could occur when setting a root index with
+ no children in icon mode.
+
+- QMainWindow
+ * [175479] Fixed unified toolbar handling on Mac OS X to prevent
+ assertions in the layout engine.
+ * [174575] Several crashes fixed.
+
+- QMdiArea
+ * [173391] (Windows) Fixed bug where a subWindowActivated() signal was
+ not emitted when the top-level window was minimized.
+ * [173628] Fixed bug that could cause an endless resize loop when using
+ Qt::ScrollBarAsNeeded as the scroll bar policy.
+
+- QMdiSubWindow
+ * [176769] Fixed bug where the title bar font was not updated on
+ QEvent::FontChange.
+ * [173087] Ensured that double-clicking the system menu closes the
+ window.
+ * [173363] Fixed bug where the title bar was not immediately updated
+ after changing the window title.
+
+- QMenu
+ * [111348] QMenu now takes focus with the QPopupMenuReason.
+ * [176201] Fixed possible crash when clearing the menu from a triggered
+ signal.
+
+- QPainter
+ * [168621] Fixed an offset bug in drawing with perspective transforms.
+ * [172017] (X11 and OpenGL) Fixed drawing of non-cosmetic points with
+ the FlatCap cap style.
+ * [175010] Fixed some bugs related to dash offsets.
+ * [170517] Fixed issue with missing tab stops when painting to a
+ printer.
+
+- QPainterPath
+ * Fixed the behavior of addText() when used with italic fonts.
+ * [178515] Fixed QPainterPath::pointAtPercent() to work correctly on
+ line segments in a path.
+
+- QPicture
+ * [168621] Ensured that the correct scale is used when rendering to a
+ device with different x and y resolutions.
+
+- QPixmap
+ * Ensure that the proper color space is used in QPixmap::grabWindow() on
+ Mac OS X.
+
+- QPlastiqueStyle
+ * [174104] Fixed a regression in Plastique that caused spin boxes to
+ have incorrect heights.
+
+- QRasterPaintEngine
+ * [169997] Fixed aliased rendering of complex paths with a large number
+ of subpaths.
+ * [174914] Fixed use of QPainter::setOpacity() when drawing a pixmap
+ into a 16-bit buffer.
+ * [177919] Fixed a problem with drawing bitmaps.
+ * [177654] (Windows) Fixed an issue with transformed bitmaps being
+ returned as pixmaps.
+
+- QSqlQuery
+ * [173710] Fixed a bug that caused value() to return null-variants
+ instead of real values after re-executing a prepared query.
+
+- QSqlRelationalTableModel
+ * [176374] Fixed an unfortunate change in 4.3.0. Display column names
+ were aliased to prevent duplicate column names in records in order to
+ fix a bug in insertRecord().
+ However all display columns were always aliased - even when not
+ necessary. From now on, display column names will only be aliased when
+ there are name clashes, and only the conflicting columns will be
+ aliased.
+
+- QSqlTableModel
+ * [170783] Fixed a bug that caused empty rows to be displayed in a
+ QTableView when a new model was set on the view. This was caused by
+ QSqlTableModel emitting the rowsAboutToBeInserted() and rowsInserted()
+ signals even when the new model was empty.
+
+- QSslSocket
+ * [177198] Fixed the emission of the proxyAuthenticationRequired()
+ signal.
+ * [174625] Ensured that only one attempt is made to resolve OpenSSL
+ symbols.
+ * [173734] Removed two memory leaks.
+ * [172285] (Windows) Fixed link error that occurred when Qt was built
+ as a static library with OpenSSL enabled.
+
+- QSvgGenerator
+ * [167921] Fixed a rounding error; improved precision.
+ * [167921] Allow rendering to a device that's not open; warn if the
+ device is not writable.
+ * [167921] Fixed a bug that caused QSvgGenerator to confuse 'cm' units
+ with 'mm' units.
+
+- QSvgRenderer
+ * [172550] Fixed incorrect linear gradient parsing for certain SVGs.
+ * [175651] Fixed a crash that could occur when loading SVGs with
+ undefined URLs.
+
+- QTableView
+ * [171128] Fixed painting problems caused by deleting hidden rows.
+ * [175462] Fixed a bug where the region for selection spanning items was
+ calculated incorrectly.
+
+- QTcpSocket
+ * Fixed a crash that could occur when using SOCKS5 proxy before
+ constructing a QCoreApplication.
+ * [174517] (Windows) Prevented stalling when connecting to offline
+ hosts.
+
+- QTextBrowser
+ * [173945] Fixed bug that could prevent scrolling to an anchor in an
+ HTML file from working successfully.
+
+- QTextEdit
+ * [171130] Fixed bug that could occur when appending text lists to a
+ document, causing the first list element to be treated as normal text
+ instead of a list element.
+ * [172367] Fixed a bug that caused the result of setPlainText() to use
+ HTML attributes if preceded by a call to setHtml().
+ * [173574] Fixed a bug that prevented floating image links from being
+ clickable.
+ * [174276] Fixed resizing performance in cases where wrapping is
+ disabled.
+ * [172646] Fixed a bug that caused leading spaces in marked up text to
+ be lost when the text was copied and pasted.
+
+- QTextLayout
+ * Fixed a regression in the line breaking algorithm that lead to wrong
+ results for justified text.
+
+- QTextStream
+ * [174516] (Windows) Fixed a bug in readLine() when reading "\r\r\n"
+ from devices opened in QIODevice::Text mode.
+
+- QToolBar
+ * [270967] Fixed the behavior of floating toolbars.
+
+- QTreeView
+ * [171947] Fixed a bug that prevented alternate colors in an inactive
+ QTreeView from being painted with the correct inactive palette role.
+ * Prevented a number of possible crashes that could occur when there are
+ pending changes.
+ * [177165] Fixed a bug that caused minimum column widths to become
+ independent of the width of the text in the header.
+ * [177945] (Mac OS X) Fixed a crash that could occur when dragging over
+ an empty region.
+ * [174437] Fixed a bug that made it possible to interactively change
+ the check state of an item, even if it was disabled.
+ * [172426] Fixed a segmentation fault in QModelIndex that would occur
+ when showing QTreeView with QSortFilterProxyModel and delayed layout
+ changes were pending.
+
+- QTreeWidget
+ * [174396] Fixed an issue that could cause setItemExpanded() to fail.
+ * [172876] Ensured that itemBelow() and itemAbove() return correct
+ values.
+ * [171271] Fixed a possible crash caused by updating items too quickly.
+
+- QUtf8Codec
+ * [175794] Fixed an off-by-one buffer overflow bug.
+
+- QWidget
+ * [157496] (Windows) Fixed a memory leak in setWindowIcon().
+ * [175114] Fixed issue with missing update after hiding a child of a
+ hidden widget.
+ * [176455] Fixed a regression that prevented a parent layout from being
+ invalidated in certain situations if the widget had a fixed size.
+
+- QWizard
+ * [177716] Ensured that the commit button is enabled and disabled
+ correctly according to QWizardPage::isComplete().
+
+- QX11PaintEngine
+ * [173977] Fixed drawing of tiled bitmaps into a bitmap when XRender is
+ used.
+ * [175481] Fixed a crash that could occur when performing complex
+ transformations with a QRegion.
+
+- Q3Action
+ * [175536] Fixed a formatting error in the tool tip string
+ representation of actions with shortcuts.
+
+- Q3ButtonGroup
+ * [177677] Fixed a application freeze that could occur when resetting
+ the ID of a button inside a button group.
+
+- Q3FileDialog
+ * [165470] Fixed broken scrolling behavior that occurred after toggling
+ between detail/list view mode.
+
+- Q3Header
+ * [176202] Fixed memory leak when replacing icons using setLabel().
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+Build System
+------------
+
+- Q3ToolBar
+ * [176525] Ensured that the tool buttons of a vertical tool bar are
+ center-aligned instead of left-aligned.
+
+I18n
+----
+ * Fix crash in lupdate/lrelease that occured if the xml parser threw an error.
+
+Linguist
+--------
+
+ * [276076] Let Linguist show existing translations to other languages
+ as "auxillary sources"
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+ * [175144] Fixed a build issue that prevented the QIBASE driver from
+ being built at the same time as the QODBC driver if Firebird header
+ files older than v2.0 were used.
+ * [177530] Fixed a regression introduced in Qt 4.3.0 that broke stored
+ procedure support for Interbase/Firebird. When executing a procedure
+ without parameters, the values were not retrievable.
+
+****************************************************************************
+* Examples *
+****************************************************************************
+
+- Draggable Text Example
+ * Fixed usability bugs.
+
+- Torrent Client Example
+ * Several stability fixes have been applied.
+
+- Ported Asteroids Example
+ * Modifications to significantly improve performance.
+
+- Ported Canvas Example
+ * [139392] Prevented a crash that could occur when adding items after
+ shrinking the canvas to zero width and zero height.
+
+- Secure Socket Example
+ * [173550] Usability fixes.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+ * [169366] Fixed intermittent program hangs in the 64-bit PowerPC
+ implementation used on AIX.
+ * [176192] Fixed the behavior of show() followed by move() to correctly
+ place the window when called before the event loop is running.
+ * [133870] Fixed crashes in the 64-bit PowerPC implementation used
+ on Linux.
+ * [177143] Fixed a bug where the last activated QShortcut would be
+ incorrectly repeated when pressing a key with no KeySym defined.
+ * [171224] Fix copy and paste of non-ASCII text from Qt 3 to Qt 4
+ applications.
+ * Applied a workaround for a bug in gcc 3.4.2 that would cause 64-bit,
+ bootstrapped applications to crash on Solaris.
+ * [170792] Fixed subpixel anti-aliasing of fonts across X11
+ server/clients with different endianness.
+
+Windows
+-------
+ * [172621] Fixed an issue that caused large pixmaps to be printed
+ incorrectly.
+ * [170000, 171239, 173213] Fixed several issues with printing that
+ resulted in single and multipage printing being garbled.
+ * [168642] Fixed an issue with text disappearing when printing.
+ * [175517] Fixed a crash that could occur when calling setNumCopies() on
+ an invalid/non-existing printer.
+ * [173219] Fixed an issue that caused fonts to be incorrectly scaled
+ beyond 64 point font sizes.
+ * [276527] Fixed a memory leak in QWindowsVistaStyle.
+
+Mac OS X
+--------
+ * Note for Leopard pre-release builds: Qt 4.3.x applications running on
+ the August Leopard pre-release (build 9A527) will not show any windows
+ because of a regression in the Carbon library. This has been addressed
+ for a future OS X release. In the meantime, if you *must* test your
+ application against this Leopard build, please contact Trolltech.
+ * [178551] Fixed a regression that made it impossible to deliver mouse
+ move events to other widgets after a double-click on a widget that was
+ immediately hidden as a result of the double-click event.
+ * [172475] Ensured that OpenGL top-level widgets are not repainted when
+ another, independent, top-level widget is resized.
+ * Ensured that the maximized bit is removed when a window is resized by
+ user interaction.
+ * [170000] Fixed an issue that caused QPrinter::newPage() to incorrectly
+ reset the current QPainter state.
+ * [178531] Fixed an OpenGL text rendering issue that could cause garbled
+ text.
+ * [171173] Fixed a crash at application exit that could occur if
+ accessibility features had been used.
+ * [175164] Fixed a regression where font base lines for labels,
+ checkboxes and radio buttons were not properly aligned.
+ * [173007] Fixed a regression that prevented qt_mac_set_native_menubar()
+ from working.
+ * [130809] Ensured that bold fonts are used correctly when generating
+ PDFs.
+ * [164962] Improved support for Mac drawers in QMainWindow.
+
+Qtopia Core
+-----------
+ * Ensured that the font database cache is preserved across QWS server
+ restarts.
+ * Made some start-up time improvements for the server process.
+ * [272527] Fixed a bug in the internal crash handler that released
+ resources in some non-fatal incidents.
+ * [169569] Fixed a bug that caused uninitialized data to be blitted to
+ the screen when a window was shown and resized before the first paint
+ event.
+ * [274291] Added support for setting the QT_QWS_FONTDIR environment
+ variable to set the font installation path.
+ * [174264] Fixed synchronization of QDirectPainter::startPainting() to
+ be able to guarantee that QDirectPainter::allocatedRegion() returns
+ the correct result.
+ * [175994] Fixed missing updates in parent and sibling widgets when
+ using the QWindowSurface::buffer() and QWindowSurface::flush()
+ mechanism to paint outside a paint event.
+ * [170488] Implemented true synchronous behavior when creating a
+ QDirectPainter with the ReservedSynchronous flag.
+ * [275284] Fixed implementation of the Hybrid OpenGL integration.
+ * [178269] Fixed loading of the VNC screen driver when compiled as a
+ plugin.
+ * [178261] Fixed loading of the Transformed screen driver when compiled
+ as a plugin.
+ * [276651] Fixed mouse calibration in some configurations when using the
+ tslib mouse driver.
+ * [173037] Fixed re-entrancy problem that could cause
+ QClipboard::mimeData() to block in some situations.
+ * [174076] Added the QWS_CONNECTION_TIMEOUT environment variable to
+ allow the time out to be customized for client applications connecting
+ to the QWS server.
+ * [167661] Added support to enable some "broken" BMP images to be
+ rendered correctly.
+ * [176445] Added support for the Glib event loop; this is disabled by
+ default.
+ * Added livelock protection: events from the QWS server can no longer
+ starve local timer events or posted events.
diff --git a/dist/changes-4.3.3 b/dist/changes-4.3.3
new file mode 100644
index 0000000..5bf6da0
--- /dev/null
+++ b/dist/changes-4.3.3
@@ -0,0 +1,358 @@
+Qt 4.3.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.3.0 through Qt 4.3.2.
+
+The Qt version 4.3 series is binary compatible with the 4.2.x, 4.1.x and
+4.0.x series. Applications compiled for Qt 4.0, 4.1 or 4.2 will continue to
+run with Qt 4.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Legal
+
+ * This version adds the Common Development and Distribution License
+ (CDDL) to the GPL Exception for developers using the Open Source
+ Edition of Qt.
+ See the Trolltech GPL Exception Version 1.1 page in the documentation
+ for more information.
+ * This version upgrades the Qt Commercial License to version 3.4,
+ the Qtopia Core Commercial License to 1.2 and the Qt Academic
+ License to 1.4
+
+Build System
+------------
+
+ * [177865] Fixed the Unix configure script to correctly identify
+ g++ 4.3.0 as "g++-4" in the build key.
+ * [186588] Added the missing QSsl forwarding header file.
+ * [181414] Fixed an issue that caused moc to bail out on C++0X >> as
+ used in some templates.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- QDir
+ * [186068] Fixed documentation for QDir::CaseSensitive.
+ * [177988] Fixed a regression from 4.2.3 causing entryList() to ignore
+ QDir::System.
+
+- QDirIterator
+ * [185502] Fixed fileInfo() which could return an incorrect value for
+ some paths.
+
+- QDockWidget
+ * Fixed an issue that caused close buttons of dock widgets to be hidden
+ when they were resized to their minimum sizes.
+ * [180199] Dock widgets with vertical title bars can now be re-docked
+ on Mac OS X.
+ * [184668] Fixed crash that could occur when setting the title bar
+ widget twice.
+
+- QFileDialog
+ * [178894] Fixed a bug that prevented the OK button from being enabled
+ when there were files selected, but no current file.
+ * [179146] Fixed abug in selectFile() that prevented the selection from
+ being cleared when called with an empty string.
+ * [279490] Ensured that filesSelected() is emitted in AnyFile mode and
+ directoryEntered() is emitted when the sidebar is clicked.
+ * [277161] Fixed a bug that caused incorrect permissions for files to be
+ obtained, resulting in the Delete action being incorrectly enabled.
+ * [184314] Fixed an assertion in completer on Windows and fixed top-
+ level completion on all platforms.
+
+- QGLWidget
+ * [177996] Fixed a crash that could occur when drawing QImages created
+ outside of the GUI thread.
+ * [180832] Fixed potential crashes in renderText().
+
+- QGraphicsScene
+ * [182442] Fixed regression from 4.2 that could cause a crash when
+ deleting a scene being viewed by more than one view.
+
+- QGraphicsTextItem
+ * [181027] Fixed regression from 4.3.0 that caused movable text items to
+ jump around.
+
+- QHeaderView
+ * [178483] Fixed crash that would occur when attempting to compute a
+ visual index for an invalid model index.
+ * [182501] Fixed regression that caused stretched sections to use the
+ minimum size when not visible.
+
+- QTableView
+ * [175328] Fixed grid drawing errors in table views containing spanned
+ items.
+
+- QListView
+ * [184204] Fixed broken layout in right-to-left mode with no horizontal
+ scroll bar.
+
+- QTreeView
+ * [182041] Fixed problem with drag and drop in cases where the columns
+ were swapped.
+ * [186624] Fixed branch expanding animation.
+
+- QItemDelegate
+ * [181221] Fixed problem with the rectangle that was used to check the
+ mouse coordinates when clicking on the check box.
+
+- QHttp
+ * [178715] Fixed a problem where QHttp would not correctly parse the
+ server response if Content-Length was 0 and authentication was
+ required.
+ * [170860] Fixed a problem where QHttp would emit the done() signal
+ if the HTTP proxy server closed the connection after requesting
+ authentication.
+
+- QLabel
+ * [173188] Fixed QLabel::setAlignment(Qt::AlignJustify) to have the
+ desired effect.
+
+- QMainWindow
+ * [154834] Fixed restoreState() to be able to load data from previous
+ minor releases.
+ * [179713] Fixed failed assertions when inserting toolbars.
+ * [180824] Fixed a crash when removing a toolbar on a main window with
+ the unifiedTitleAndToolBarOnMac property set.
+
+- QMdiArea
+ * [185281] Fixed a bug where closing a modal dialog caused a different
+ sub-window to be activated.
+
+- QMdiSubWindow
+ * [183647] Improved WindowBlinds support.
+ * [188849] Fixed a crash that occurred when using a regular QWidget as
+ the menu bar in a QMainWindow.
+
+- QMenuBar
+ * [173556] Fixed a bug where the corner widgets did not swap sides when
+ changing layout direction.
+
+- QProcess
+ * [180836] Fixed issue with defunct processes on Unix.
+
+- QPainter
+ * Made the QPainter::drawText() overload with the QTextOption argument
+ support justified text.
+ * [179726] Fixed a problem with the bounds calculation for handling
+ fallback in certain painting operations. This could be perceived as a
+ clipping bug on some platforms.
+
+- QPainterPath
+ * [169280, 170046, 173034] Fixed cases where calling
+ QPainterPath::united(), QPainterPath::intersected(), or
+ QPainterPath::subtracted() would cause infinite loops or would not
+ produce the expected result.
+ * [178260] Fixed a bug in the stroking of painter paths which could
+ cause uninitialized data access for paths with extreme curvature.
+ * [183725] Fixed a bug where intersecting a path against itself would
+ return an empty path.
+
+- QPixmap
+ * [178986] Fixed a regression from 4.2: image/pixmap scaling caused the
+ sampling to be shifted by half a pixel.
+
+- QRasterPaintEngine
+ * [177919] Fixed a problem with drawing bitmaps.
+
+- QScriptEngine
+ * Fixed the parsing of large numbers (larger than 2^32).
+
+- QStyle
+ * [186511] Fixed the default QStyle() constructor to create a
+ QStylePrivate object, which is required by QStyle::layoutSpacing().
+
+- QStyleSheet
+ * [178598] Fixed a memory leak when using border images.
+ * [175722] Fixed a bug which broke mouse handling in checkbox items
+ when styling the check mark.
+
+- QStyleSheetStyle
+ * [182862] Setting a stylesheet with background-image on QMenu::item
+ now works.
+
+- QSvgGenerator
+ * [176705] Fixed a bug which caused radial gradients to produce
+ malformed XML output.
+ * [182196] Fixed a regression which caused gradient fills to be stored
+ as image data instead of native data.
+ * [182244] Fixed a bug in SVG export of ObjectBoundingMode gradients.
+
+- QStringListModel
+ * [180184] Fixed a bug that prevented sorting from updating persistent
+ model indexes.
+
+- QTableView
+ * [182210] Fixed a bug which caused the table view to hang when it had
+ views with 100,000,000 rows.
+
+- QTextBrowser
+ * [176042] Fixed incorrect behavior with selectAll() that caused it to
+ select all links if a link had the focus.
+
+- QTextDocument
+ * [177489] Fixed a bug in page breaking of text frames which could cause
+ missing page breaks and overdrawing.
+
+- QTreeView
+ * Fixed a possible crash that could occur when setting scrollPerPixel
+ while height was 0.
+ * [178771] Fixed an assertion that could occur when pressing the left or
+ right arrow key when the root index had no children, but when the
+ current index had not been set to invalid.
+ * [182618] Improved the performance of adding expanded or spanned items.
+ * [184072] Improved the performance of hiding rows.
+
+- Q3DockWindow
+ * [176167] Fixed an issue that made it impossible to move a Q3DockWindow
+ with the mouse if it did not have a title.
+
+- Q3ToolBar
+ * [182657, 185381] Fixed crashes caused by calling clear() and then
+ re-adding items.
+
+- Q3Wizard
+ * [176548] Fixed a crash caused by calling removePage() before a wizard
+ is shown.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+
+- QApplication
+ * Fixed a bug that could cause a programmer specified application font
+ to be overridden by the automatically-detected system font.
+
+- QCUPSSupport
+ * [180669] QCUPSSupport::QCUPSSupport() no longer crashes when the CUPS
+ library cannot be loaded.
+
+- QPrintDialog
+ * Fixed a bug that caused the selected file to be truncated before the
+ overwrite dialog was shown.
+
+- QWidget
+ * Fixed a bug that caused QWidget::windowState() to return an incorrect
+ state after restoring a maximized window.
+
+- QX11EmbedContainer
+ * [186819] Fixed embedClient() to not cause an X server lock-up when
+ passed an invalid window ID.
+
+ HP-UX
+ -----
+ * [179538] Fixed a bug that caused uic3 to hang in q_atomic_lock()
+ on PA-RISC based HP-UX machines.
+ * [177397] Fixed a QGL module compile problem on HP-UX systems.
+
+Windows
+-------
+
+- QFileDialog
+ * Fixed occasional crashes when dealing with the system icons.
+ * [175041] [181912] Ensured that shortcuts are handled correctly.
+ * Fixed a crash that could occur when opened with QDir::temp() as the
+ initial path.
+
+- QGLPixelBuffer
+ * [177154] Fixed support for floating point buffers with NVIDIA hardware
+ through the GL_NV_float_buffer extension.
+ * [179143] Fixed a memory leak that could occur when deleting a
+ QGLPixelBuffer.
+
+- QPixmap
+ * [185715] Fixed an assertion that could occur when reading icon
+ information for file types.
+
+- QPixmapCache
+ * [182363] Fixed a crash that could occur when inserting a null pixmap.
+
+Mac OS X
+--------
+
+- Fixed multiple issues preventing binaries built on Leopard from being
+ deployed on Tiger and Panther systems.
+
+- QCoreGraphicsPaintEngine
+ * [170352] Fixed a problem where all aliased strokes were offset by
+ 1 pixel to the left on Mac OS X < 10.4.
+ * [172006] Fixed a problem with drawing points when FlatCap or
+ SquareCap was set as the pen style.
+
+- QGLWidget
+ * [181819] Fixed a bug that caused the contents of QGLWidgets not to
+ be moved or updated.
+
+- QCheckBox
+ * [182827] Fixed a crash caused by deleting a QCheckBox in an event
+ posted from the toggled() slot.
+
+- QDialog
+ * [281331] Fixed a bug that caused a QDialog with a modal parent to not
+ be modal.
+ * [279513] Fixed a bug that could occur when using the
+ Qt::WindowStaysOnTopHint flag on dialogs that would cause the drop down
+ menu to be hidden.
+
+- [180466] Ensured that an Embedded HIWebView in a floating window will
+ receive an activation.
+
+- Fixed brushed metal windows on Leopard.
+
+- Made QMenus have proper rounded edges on Leopard.
+
+- Fixed a regression that caused text to always be rendered with anti-
+ aliasing in OpenGL.
+
+- [179882] Fixed a regression where applications with both full-screen and
+ non-full-screen windows could get into an indeterminate state.
+
+- [182908] Fixed a crash on PPC which was caused by using a static Qt in a
+ plugin in another application.
+
+Qtopia Core
+-----------
+
+ * [179060] Fixed a potential crash when Qtopia Core is compiled without
+ FreeType support.
+ * [187589] Fixed a problem that caused windows not to appear on screen
+ when using gcc 4.1.1 ARM EABI toolchains.
+ * [179533] Fixed temporary blitting of uninitialized data to the screen
+ areas of some windows when they are shown for the first time.
+ * [180487] Fixed the use of FreeType fonts for unprivileged processes
+ in a LIDS environment.
+ * [179883] Fixed the use of -D QT_QWS_DEPTH_GENERIC configure options
+ when using a transformed screen driver.
+ * [182150] Fixed the use of incorrect colors that resulted from using
+ the VNC driver on top of the Linux framebuffer driver on big-endian
+ systems.
+ * Optimized drawing of images on 16-bit screens when using a painter
+ with an opacity value of less than 1.0.
+ * [183118] Updated the framebuffer test application to work on 18 bit
+ screens.
+ * [184181] Ensured that the QDesktopWidget::workAreaChanged() is emitted
+ when the available screen geometry is changed.
+ * [185508] Fixed missing mouse move/press event on touch screens when
+ pressing on a newly-activated window.
+ * [185301] Fixed a crash in QImage::convertToFormat() that could occur
+ when converting an image having a stride that is not a multiple of 4.
+ * [186266] Fixed a race condition which could result in painting errors
+ around the window decoration under certain circumstances.
+ * [186409] Fixed string to number conversions in QtScript when
+ configured with -D QT_QLOCALE_USES_FCVT.
+ * [186611] Fixed color conversion in QScreen::solidFill() (used when
+ drawing the screen background) when configured with
+ -D QT_QWS_DEPTH_GENERIC.
+ * [125481] Fixed a painting error with RGBA framebuffers and partially
+ transparent windows.
+ * Fixed inconsistency in 16-bit alpha blending which caused the
+ leftmost/rightmost pixels to be calculated differently due to
+ rounding errors.
diff --git a/dist/changes-4.3.4 b/dist/changes-4.3.4
new file mode 100644
index 0000000..fe076d9
--- /dev/null
+++ b/dist/changes-4.3.4
@@ -0,0 +1,112 @@
+Qt 4.3.4 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.3.0 through Qt 4.3.3.
+
+The Qt version 4.3 series is binary compatible with the 4.2.x, 4.1.x and
+4.0.x series. Applications compiled for Qt 4.0, 4.1 or 4.2 will continue to
+run with Qt 4.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Legal
+
+ * This version adds the GNU General Public License (GPL) version 3
+ to all Qt Open Source editions. The GPL Exception version 1.1
+ applies to both versions of the GPL license.
+
+Build System
+------------
+ * Ensure that Qt plugin paths are only added once to the LIBS variable.
+ * MinGW: Ensure that PRE_TARGETDEPS and POST_TARGETDEPS are properly
+ escaped in dependency lists, so they match the rules in the Makefiles.
+
+I18n
+----
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- QApplication
+ * [193842] Fixed a bug where a statically built Qt would still try
+ to load Qt plugins (such as style, imageformat, and sqldriver
+ plugins) which causes the application to crash.
+
+- QCoreApplication
+ * [190356] Fixed a regression from 4.2 where the order of posted
+ events with the same priority would be sent out of order.
+
+- QComboBox
+ * [166349] Fixed crash resulting from making the combo box non-editable from a
+ slot caused by a line edit Key_Enter event.
+
+- QFileDialog
+ * [193483] Fixed crash when hidden directory is set as the current directory
+ and hidden directories are not set to be visible.
+ * [191301] Fixed QFileDialog closes even if the users indicate they do not
+ wish to replace.
+
+- QSslSocket
+ * [191705] Fixed crash on remote disconnect
+ * [190133] Fixed security bug in QSslSocket's certificate verification
+
+- QTreeWidget
+ * [191300] Adding QTreeWidgetItems into a sorted QTreeWidget can be slow.
+ * [155700] Fixed potential assert when deleting QTreeWidgetItems with
+ sorting enabled.
+
+- QDirModel
+ * [191765] Fixed crash when using QModelIndex from QDirModel::index()
+ for a UNC path.
+
+- QHeaderView
+ * [190624] Fixed case when stretch resize sections would give wrong
+ section sizes to all other sections.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Examples *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+
+Windows
+-------
+* [191309] Fixed a bug preventing browsing to UNC paths in the file dialog.
+* [180010] Fixed a memleak in the raster paint engine. The HDC for the raster buffer was
+ not cleaned up correctly.
+* [191305] Fixed a possible memleak and problem with calling QGLPixelBuffer::doneCurrent()
+ under Windows.
+
+Mac OS X
+--------
+* [188837] Fixed a bug that would make Qt applications not quit when someone logs out of Leopard
+* [192030] Prevent a crash when dragging over a widget that has a focus frame
+* [291319] Send the kEventQtRequestWindowChange event when moving QGLWidgets.
+* Fix binary compatibility issue in the OpenGL module that could cause problems when using
+ Qt binaries compiled on Tiger for development on Leopard. The Mac binary package now supports
+ development on Leopard.
+
+Qtopia Core
+-----------
+* [189195] Fix crash when using fonts containing embedded bitmaps with
+ zero width and non-zero height.
+* [189829] Fixed parsing of device specification in the QWS_KEYBOARD
+ environment variable when specifying multiple keyboards.
diff --git a/dist/changes-4.3.5 b/dist/changes-4.3.5
new file mode 100644
index 0000000..c674d87
--- /dev/null
+++ b/dist/changes-4.3.5
@@ -0,0 +1,109 @@
+Qt 4.3.5 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.3.0 through Qt 4.3.4.
+
+The Qt version 4.3 series is binary compatible with the 4.2.x, 4.1.x and
+4.0.x series. Applications compiled for Qt 4.0, 4.1 or 4.2 will continue to
+run with Qt 4.3.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+ * [201242] Fixed an bug that caused bootstrapped tools (qmake,
+ moc, uic, and rcc) to crash or run into infinite loops.
+ * [190776] Fixed a bug that would generate invalid build keys in
+ some gcc compiler versions. Backported from Qt 4.4.
+
+- Legal
+
+ * This version updates the GPL Exception to version 1.2 in all
+ Open Source editions of Qt. This version is compatible with the
+ GPL version 3 and adds the LGPL version 3 to its list of
+ acceptable licenses.
+
+Third party components
+----------------------
+
+- libpng
+ * Security fix (CVE-2008-1382)
+
+Build System
+------------
+
+I18n
+----
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- QCalendarWidget
+ * Fixed handling of leap year while changing the date in calendar widget.
+
+- QComboBox
+ * [203827] Fixed problems caused by the line edit not being hidden for
+ a non-editable QComboBox.
+
+- QMdiArea
+ * [209615] Fixed an assert when removing a sub-window from one QMdiArea and
+ adding it to another QMdiArea.
+
+- QMdiSubWindow
+ * [192794] Fixed a bug where installed event filters were removed
+ when maximizing a window.
+
+- QPainter
+ * [204194] Fixed division-by-zero issue in raster paint engine when
+ calling drawLine with the same starting and ending point.
+ * [205443, 207147] Fixed floating point exception when drawing near-vertical
+ or near-horizontal lines in the raster paint engine.
+
+- QWizard
+ * [180397] Fixed crash resulting from AeroStyle being assumed even when
+ some of the required symbols were unresolved.
+ * [197953] QWizard no longer crashes on Windows if an accessibility
+ application (like Microsoft Narrator) is running.
+
+- QWorkspace
+ * [206368] Fixed a crash resulting from the icon in the title bar not
+ being deleted when deleting a sub-window.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Examples *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+
+Windows
+-------
+
+- QRasterPaintEngine
+ * [198509] Fixed a resource leak which occured when QPainter::drawText()
+ was called.
+
+Mac OS X
+--------
+
+- QRasterPaintEngine
+ * [198924] Fixed a byte order problem when drawing QImages on an X11
+ server running on PPC Macs.
+
+Qtopia Core
+-----------
diff --git a/dist/changes-4.3CE-tp1 b/dist/changes-4.3CE-tp1
new file mode 100644
index 0000000..41aaea8
--- /dev/null
+++ b/dist/changes-4.3CE-tp1
@@ -0,0 +1,53 @@
+Changes for Qt/CE 4.3.x "Feierabend" release.
+
+****************************************************************************
+* Features *
+****************************************************************************
+
+- Added precompiled platform tools to package
+
+- Added/Updated documentation
+
+- Added/Updated examples
+
+****************************************************************************
+* Bug fixes *
+****************************************************************************
+
+- cetest
+ * cleanup directory hierarchy in case user specified.
+ * fixed libpath option which was not case-insensitive.
+
+- configure.exe
+ * fixed order of c-runtime deployment.
+ * fixed --(xy)prefix options to work in Windows Command Prompt.
+
+- QDesktopWidget
+ * fixed SIP handling bug.
+
+- QFeatures
+ * fixed custom configuration build issues.
+
+- QFileDialog
+ * updated UI to fit on embedded screen.
+ * in case no native dialog exists on device, use Qt FileDialog instead.
+ * fixed file extension bug.
+
+- QFSFileEngine
+ * workaround for Windows Mobile for taking MAX_PATH not into account.
+
+- QGraphicsView
+ * fixed bug when qreal is not double.
+
+- QLibraryInfo
+ * fixed legacy bug about not finding the plugins path.
+
+- QSysInfo
+ * added Windows CE 6.
+
+- QWidget
+ * fixed potential minimize/maximize bug.
+
+- QPaintEngine
+ * detect bitdepth on startup and create 16bit buffers, if possible.
+
diff --git a/dist/changes-4.3CEconan b/dist/changes-4.3CEconan
new file mode 100644
index 0000000..5d78e57
--- /dev/null
+++ b/dist/changes-4.3CEconan
@@ -0,0 +1,72 @@
+Changes for Qt/CE 4.3.x "Conan the Librarian" release.
+
+****************************************************************************
+* Features *
+****************************************************************************
+
+- Added QtSql
+
+- Added QSqlite plugin
+
+- Added sql examples
+
+- Added 16bit painting engine
+
+- Added options to cetest
+
+- Added Windows Mobile 6 mkspecs
+
+****************************************************************************
+* Bug fixes *
+****************************************************************************
+
+- cetest
+ * added -conf option to specify a qt.conf file to be deployed
+ * added -f option to specify a .pro file to be parsed
+ * copy in buffered mode
+ * deployment rules can use wildcard logic
+ * fixed a bug in debug/release parsing
+ * try to get results though unittest might have crashed
+
+- configure.exe
+ * fixed usage of c-runtime deployment on desktop win32 build
+ * new parameters for cross-compilation
+
+- QApplication
+ * fixed minimal qfeature build configuration
+
+- QEventDispatcher
+ * fixed minimal qfeature build configuration
+
+- QFileDialog
+ * fixed internal handling of path separators
+ * fixed unexpected behaviour due to uninitialized memory
+
+- QFileSystemModel
+ * fixed different behaviour for Qt/CE
+
+- QFileSystemWatcher
+ * updated documentation
+
+- QtGui
+ * fixed floating point issues
+
+- QKeyMapper
+ * fixed short-cut algorithm
+ * fixed virtual key handling
+
+- QMessageBox
+ * fixed minimal qfeature build configuration
+
+- qmake.exe
+ * deployment rules can use wildcard logic
+
+- QTableView
+ * fixed style issue for header item
+
+- shadow build
+ * locate qglobal.h in correct directory
+
+- zlib
+ * fix build logic
+
diff --git a/dist/changes-4.3CEkicker b/dist/changes-4.3CEkicker
new file mode 100644
index 0000000..009dc33
--- /dev/null
+++ b/dist/changes-4.3CEkicker
@@ -0,0 +1,53 @@
+Changes for Qt/CE 4.3.x "Kicker" release.
+
+****************************************************************************
+* Features *
+****************************************************************************
+
+- Integrated to Qt 4.3
+
+- Added QtXml
+
+- Added QtSvg
+
+- Added full QCursor support in case SDK supports it
+
+- Added temporary tool sdkscanner for reading Visual Studio configuration
+
+****************************************************************************
+* Bug fixes *
+****************************************************************************
+
+- configure.exe
+ * Fixed qconfig.h creation using host platform paths
+ * Fixed sanity check for -host parameter
+
+- drag'n'drop
+ * Fixed for SDKs with cursor support
+ * Added examples
+
+- Example portedasteroids
+ * Fixed linking issues
+
+- QFileIconProvider
+ * Windows CE specific path fixes
+
+- QFsFileEngine
+ * Windows CE specific path fixes
+
+- QPixmap
+ * Fixed icon library loading
+
+- QSplashScreen
+ * Fixed painting bug
+
+- QTestLib
+ * Allow more than 256 bytes for qDebug() while debugging
+
+- QWidget
+ * Fixed bug in maximize()/minimize()
+
+- WIMMXT support
+
+- Windows CE 6.0 support
+ * fixed network issues with wince6* mkspecs
diff --git a/dist/changes-4.3CEsweetandsour b/dist/changes-4.3CEsweetandsour
new file mode 100644
index 0000000..fab21ad
--- /dev/null
+++ b/dist/changes-4.3CEsweetandsour
@@ -0,0 +1,43 @@
+Changes for Qt/CE 4.3.x "SweetAndSour" release.
+
+****************************************************************************
+* Features *
+****************************************************************************
+
+- Added QtScript
+
+- Added cetest/QtRemote
+
+- Added MIPS/SH4 compilation support
+
+****************************************************************************
+* Bug fixes *
+****************************************************************************
+
+- configure.exe
+ * Added c-runtime deployment options.
+ * Added cetest installation option.
+
+- qmake
+ * Fixed DEPLOYMENT rule to allow recursive directory deployment.
+
+- QProcess
+ * Fixed usage of DuplicateHandle, which got implemented for CE 6.
+
+- libpng
+ * Fixed crash bug concerning strtod which exists on CE 5 by default.
+
+- QFSFileEngine
+ * Fixed bug to access file size of POSIX opened file.
+
+- QWidget
+ * Fixed maximization bug.
+ * Fixed deadlock bug caused by invalid state.
+
+- QDateTimeEdit
+ * Fixed support for QT_KEYPAD_NAVIGATION
+
+- QPixmap
+ * Fixed toWinHBITMAP
+ * Fixed fromWinHBITMAP
+ * Fixed icon handling \ No newline at end of file
diff --git a/dist/changes-4.4.0 b/dist/changes-4.4.0
new file mode 100644
index 0000000..7875f2c
--- /dev/null
+++ b/dist/changes-4.4.0
@@ -0,0 +1,2419 @@
+Qt 4.4 introduces many new features as well as many improvements and
+bugfixes over the 4.3.x series. For more details, see the online
+documentation which is included in this distribution. The
+documentation is also available at http://doc.trolltech.com/4.4
+
+The Qt version 4.4 series is binary compatible with the 4.3.x series.
+The Qt for Embedded Linux version 4.4 series is binary compatible with the
+Qtopia Core 4.3.x series. Applications compiled for 4.3 will continue to
+run with 4.4.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.trolltech.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain
+more information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Legal
+ * This version introduces the GPL version 3 as an alternative
+ license for the Open Source Edition of Qt, in addition to the
+ existing licenses.
+ * Updated the GPL Exception to version 1.2, which grants additional
+ rights to developers using the LGPL version 3.0 and other licenses
+ for their software.
+
+- Configuration/Compilation
+ * [102113, 151125] Make it possible to use Qt headers with MSVC's
+ warning level 4.
+ * [129841] Make Qt compile with Intel C++ 9.0 and Intel C++ 10 compilers
+ on Windows.
+ * [168868] Add experimental support for the Blackfin processor.
+ * [188167] Fixed a bug in the solaris-cc mkspec that would cause
+ it to always use RPATH, even when configured with -no-rpath.
+ * [176029] Added qmalloc.cpp with qMalloc() and qFree() implementation
+ to make it easier to replace the default container allocators with
+ custom allocators (by providing your own qmalloc.o(bj) file).
+ * Enable -reduce-exports automatically on linux-icc* mkspecs when
+ using version 10.1 of the Intel C++ Compiler for Linux.
+ * Add experimental support for the AVR32 processor.
+ * Allow building Qt with -release and the Intel C++ Compiler for
+ Linux. This required working around several compiler bugs by
+ turning optimizations off for certain modules. See the compiler
+ notes for more details.
+ * Add support for MSVC 2008, and add separate mkspecs for MSVC 2002 &
+ 2003.
+ * [189185] Avoid quoting the the include and library paths for iconv.
+
+- Documentation and Examples
+ * The Qt Designer Manual was updated to include new Qt Designer features.
+ * QtScript module overview was updated with more examples and reference
+ material.
+ * [161404] The 40000 Chips demo no longer shifts when clicking the OpenGL
+ button.
+ * [188676] Fixed text item moving in Diagram Scene example.
+ * New demo: Embedded Dialogs
+ * New demo: Browser
+ * New example: Graphics View / Pad Navigator
+ * New example: Item Views / Address Book
+ * New example: WebKit / Previewer
+ * New Example: XmlPatterns / Recipes
+ * New tutorial: Address Book
+ * Multiple bug fixes for the Torrent Client example.
+ * Speed-ups in the Ported Asteroids Example.
+ * [164223] All examples that use resources now include
+ Q_INIT_RESOURCES to avoid breakage in static builds.
+
+- Translations
+ * Added a Traditional Chinese translation of the Qt and tools courtesy
+ of Franklin.
+ * Added a Spanish translation of Qt courtesy of Enrique Matias Sanchez.
+
+- Signals and slots
+ * [147681] Added support for 'long long' and 'unsigned long long'
+ in queued connections.
+ * [125987] Optimized QMetaObject::activate(), the function that
+ actually delivers signals to all connected slots.
+ * [164558] Fixed a bug that caused queued signals to be delivered out
+ of order (not in the order they are emitted).
+ * [169554] Added Q_EMIT, to correspond to Q_SIGNAL and Q_SLOT.
+
+- Multithreaded painting
+ * [66358, 142031] Added support for painting on QImage, QPicture,
+ and QPrinter in multiple threads. See the Multithreaded
+ Programming documentation for more details on supported features
+ and known limitations.
+
+- Embedded QWidget support for Graphics View
+ * [177204] Added support for using layouts, styles, palettes and fonts,
+ as well as embedding QWidgets into a QGraphicsScene.
+
+- XML support in QtCore
+ * The QXmlStreamReader, QXmlStreamWriter and supporting classes
+ have moved from the QtXml module to the QtCore module. This change is
+ both source- and binary-compatible with previous versions. New
+ applications can opt to not link to QtXml when using these classes.
+
+- Printing
+ Made a number of improvements to printing in Qt 4.4, including
+ support for setting custom page sizes and custom margins as well as
+ the ability to programatically enumerate printers via the new
+ QPrinterInfo class. A couple of new classes, QPrintPreviewWidget
+ and QPrintPreviewDialog, have been added to make it easy to add a
+ print preview to an application. The QPrintDialog and QPageSetupDialog
+ for X11 have been redesigned and are hopefully easier to use.
+
+New features
+------------
+
+- XQuery 1.0 and XPath 2.0 support provided through the new QtXmlPatterns
+ module.
+
+- Qt Help module for embedding documentation into applications.
+
+- QSystemSemaphore provides a general counting system semaphore.
+
+- QSharedMemory provides access to a shared memory segment between multiple
+ threads and processes.
+
+- QLocalServer class provides a local socket-based server with a matching
+ new QLocalSocket class.
+
+- QFileSystemModel provides a data model for the local file system. Unlike
+ QDirModel, QFileSystemModel will fetch directory listings in a background
+ thread to prevent any locking in the GUI. QFileSystemModel is also much
+ faster and has a few more features then QDirModel.
+
+- QCommandLinkButton to support Vista style command links on all platforms.
+
+- QFormLayout provides a layout designed for convenient form creation with
+ the appropriate appearance on different platforms. This class previously
+ appeared in Qtopia/4.3, but has been integrated into Qt.
+
+- QtConcurrent provides a high level multi-threading API.
+
+- QPlainTextEdit provides a highly scalable plain text editor. It uses
+ similar technology and concepts as QTextEdit, but is optimized for plain
+ text handling; e.g. as a log viewer.
+
+- QTextBoundaryFinder is a new class implementing the Unicode text
+ boundaries specification.
+
+
+Third party components
+----------------------
+
+- Updated Qt's SQLite version to 3.5.4.
+
+- Updated Qt's libpng version to 1.2.25.
+
+- Added CLucene version 0.9.17.
+
+- Added WebKit (see the src/3rdparty/webkit/VERSION file for the version).
+
+- Added Phonon version 4.1.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- General Fixes
+ * [147201] Assert in debug mode when using QReadLocker, QWriteLocker,
+ or QMutexLocker with unaligned pointers.
+
+- QAbstractButton
+ * [190739] Ensure button with the TabFocus policy doesn't receive focus
+ through others ways.
+ * [192074] Disable key navigation for buttons in a item view.
+
+- QAbstractItemModel
+ * [171469] Speed up insertion of rows into a model.
+
+- QAbstractItemView
+ * [162487] Check canFetchMore() on the model before calling fetchMore().
+ * [179163] The virtual selectAll() is now called when the user types
+ "Ctrl+A"
+ * [181413] Fixed InternalMove for MoveAction-only models.
+ * [181988, 192114] Made mouse wheel smarter on ScrollPerPixel mode.
+ * [182248] Trasparent background for the dragged visual.
+ * [184507] setVerticalScrollMode(ScrollPerItem) can cause the view to
+ scroll to the bottom.
+ * Add autoScrollMargin property.
+ * [162547] Make the current index stay in the viewport when sorting.
+ * [165404] Make the drop indicator stylable.
+ * [160611] Ensured that the hover item is updated when dragging over the view.
+ * [162497] Allow key events to be propagated.
+ * [186052] Mac: The alternatingRowColors property now honors the
+ Graphite color setting.
+ * [202276] Fixed crash when pressing Ctrl+C in a view with no model.
+ * [202034] Ensured that the editor's geometry is kept up to date when rows
+ are inserted.
+ * [204403] Only scroll to the current index on reset if the view is
+ editing.
+
+- QAbstractProxyModel
+ * [156789] Fixed a crash when deleting the source model.
+ * [194765] Made headerData() call mapToSource() when asking for data.
+ * [195023] Added setData() and setHeaderData() implementation.
+
+- QAbstractScrollArea
+ * [159949] Fixed a bug where setting the horizontal scroll had no effect.
+
+- QAbstractSpinBox
+ * [183108] Allowed a spin box to be cleared before it is visible.
+ * [198687] Always reset modified and undo states of the line edit upon
+ pressing Enter.
+
+- QAccessible
+ * [177706] Windows narrator will now read Tooltips properly.
+ * [182437] Tooltips are now read aloud once instead of twice.
+
+- QAction
+ * [200823] Fixed regression that caused the tool tip of an action not to
+ show the shortcut by default.
+ * [97238] Introduced the iconVisibleInMenu.
+
+- QApplication
+ * [100630, 153895] Fixed a bug where key press events were always
+ sent as non-spontaneous events, while the key release event was
+ spontaneous.
+ * [194454, 196062] Fixed QApplication::quitOnLastWindowClosed to
+ work as documented.
+ * [97238] Introduce an attribute (AA_DontShowIconsInMenus) to control
+ the default behavior of icons in menus. This obsoletes the
+ qt_mac_set_menubar_icons() function.
+ * [201218] Fix bug on Mac OS X where Qt::WA_DeleteOnClose failed to
+ delete on close.
+
+- QAtomicInt
+
+- QAtomicPointer
+ * [168853] Introduced QAtomicInt and QAtomicPointer into the public API.
+ These classes provide a cross-platform API for doing atomic operations.
+ * Optimized testAndSet*() on PowerPC to not branch in the best case
+ (when value == expectedValue).
+ * [197244] Fixed the gcc inline assembler constraints for the PowerPC
+ implementation.
+ * [198399] Applied patch from SUSE to add S390(x) support.
+
+- QBoxLayout
+ * [103626] Added insertSpacerItem() and addSpacerItem().
+ * [127621] Made setStretchFactor() behave correctly if widget == 0.
+
+- QBrush
+ * [179308] Fixed a bug which caused QBrush to forget the color if it was
+ passed in the constructor along with Qt::NoBrush.
+ * [169502] Fixed a threading issue with setTextureImage().
+
+- QBuffer
+ * [184730] A TIFF image can now be stored correctly in a QByteArray.
+
+- QByteArray
+ * [193870] Copy the data of a QByteArray that is taken from
+ QByteArray::fromRawData() when appending more data.
+ * [82509] Added QT_NO_CAST_FROM_BYTEARRAY to disable "operator const
+ char *" and "operator const void *".
+
+- QCalendarWidget
+ * [181388] Added support for updating the cell of a particular QDate.
+ * [172053] Fixed palette bug for calendar's buttons.
+
+- QChar
+
+- QCleanlooksStyle
+ * [194082] Fixed disabled checkbox painted as unchecked.
+ * [189609] Fixed an issue where QMdiSubWindow could have incorrect
+ buttons.
+ * [182806] Retain hover appearance on slider while dragging.
+ * [180105] Fixed gradient backgrounds shown as black on a pressed
+ QPushButton.
+ * [176674] Fixed combobox drop down ignoring custom icon sizes.
+ * [197691] Made the style work better on older X11 servers without
+ XRender support.
+
+- QColorDialog
+ * [142706] use QDialogButtonBox to conform with the style it is running
+ in.
+
+- QColumnView
+ * [167408] Added createColumn() to help make subclassing easier.
+
+- QComboBox
+ * [155578] Improved calculation of size hint for combo box pop-up.
+ * [183982] Fix bug where the combobox width was not wide enough in some
+ styles.
+ * [187744] Made QComboBox behave slightly better when the view is a tree.
+ * [189444] Allowed separators in the list.
+ * [190332] Made the popup respect the view's selection behavior.
+ * Made setEditable(false) explicitly hide the lineEdit, otherwise it may
+ remain visible when executing a modal dialog immediately afterwards.
+ * [154884] Fixed a bug where the popup was hidden without calling
+ QComboBox::hidePopup().
+ * [169848] Fixed a bug where the combo box did not open as expected when
+ using a touch screen.
+ * [153975] Mac OS X: Improved the visual appearance (flash selected item
+ and fade away when hiding the menu).
+ * [190351] Fixed setView() for style using SH_ComboBox_Popup.
+ * [191329] Fixed the height calculation of the popup for custom view.
+
+- QCommonStyle
+ * [173539] Make the combo label draw according to the combo box's layout
+ direction and not the application's.
+
+- QCompleter
+ * [189564] Prevented unselectable items from appearing in the completion
+ list.
+ * [180785] Ensured that QCompleter emits activated() after pressing the
+ Return key.
+
+- QCoreApplication
+ * [157435] Fixed the posted event implementation to prevent the pending
+ queue from growing endlessly while a modal event loop is running.
+ * [132395] Sent DeferredDelete events at the right time. Specifying the
+ QEventLoop::DeferredDeletion flag (now deprecated) to processEvents()
+ is no longer necessary.
+ * [131235] Added QCoreApplication::applicationPid().
+ * [132859] Don't explicitly set the LC_NUMBERIC locale to "C" on UNIX
+ systems.
+ * [187044] Fixed a crash when addLibraryPath() or setLibraryPaths()
+ is invoked before creating QCoreApplication.
+ * [161049, 171670] Don't leak the single QThread instance that Qt creates
+ to represent the main() thread.
+ * [143743] Added the QCoreApplication::applicationVersion property.
+
+- QCryptographicHash
+ * [190062] Ensured that calling result() twice returns the same value.
+
+- QDataWidgetMapper
+ * [194784] Allowed setting NULL values for editors.
+
+- QDataStream
+ * [196100] Fixed compatibility issue with QCString in Qt3.x streams.
+ * [196415] Fixed compatibility issue with invalid colors in Qt 3.x
+ streams.
+
+- QDateTime, QDate, QTime
+ * [189882] Optimized {QDate,QTime,QDateTime}::fromString() so that it
+ is about 40% faster than before.
+ * [193079] Have {QDate,QTime,QDateTime}::fromString() understand
+ locale-dependent string formats.
+ * Added enum values to distinguish between short and long formats.
+
+- QDateTimeEdit
+ * Added properties minimumDateTime/maximumDateTime
+ * [169916] Added a timeSpec property for QDateTimeEdit
+ * [178027] Make QDateTimeEdit respect the locale property
+ * [158950] Disable QCalendarWidget popup when the dateTimeEdit is
+ read-only.
+ * [145872] Added a getter and setter for the QCalendarWidget popup.
+
+- QDateEdit
+ * Don't interpret time-specific formats as special fields in a QDateEdit
+ and vice versa for QTimeEdit.
+
+- QDesktopServices
+ * [89584] Added a way to get users Documents, Desktop, Movies
+ directories.
+ * [105740] Added a way to determine the location to store data files.
+
+- QDialog
+ * [174842] Ignore the close event if the reimplementation of reject()
+ doesn't close the dialog.
+
+- QDialogButtonBox
+ * [191642] Don't steal the default button if there is one already.
+ * [196352] Fixed roles of QDialogButtonBox::Abort and
+ QDialogButtonBox::Ignore.
+
+- QDir
+ * [172057] Fixed bug when sorting directories containing files larger
+ than 2GB.
+ * [177904] Fixed a problem with QDir::tempPath() and QDir::homePath()
+ returning trailing slashes inconsistently. Now it returns the
+ absolute path name, without the trailing slash.
+
+- QDirModel
+ * [176323] Fixed display of files moved by drag and drop (on a QTreeView).
+ * [196768] Fixed sorting.
+
+- QDockWidget
+ * [171661] Fixed setTitlebarWidget(0) to reset the native decoration.
+ * [169808] SizeHint is now taken into account.
+ * [188583] Fixed a bug making dockLocationChanged signal not always
+ emitted.
+ * [193613] Highlighted splitters between QDockWidgets, now go back to
+ inactive state when the cursor have passed over it.
+
+- QDoubleSpinBox
+ * [164696] QWidget::locale() is now used for all string-to-number
+ conversions.
+
+- QErrorMessage
+ * [189429] Fixed "do not show again" with rich text message.
+
+- QEvent
+ * [37536] Add QEvent:registerEventType() for obtaining a unique
+ event type ID.
+ * [161940] Fix QContextMenuEvent::modifiers() on X11 and Qt for Embedded
+ Linux to behave like the Windows and Mac OS X. Previously, this
+ * [166605] A drop event's drop action is now initialized to the drag
+ manager's current default action.
+
+- QFile
+ * [107448] Fixed bug where QFile::write() would fail to report an error
+ on disk full.
+ * Added map() and unmap() to map files into memory.
+
+- QFileDialog
+ * [71645] Added a property to hide filter details.
+ * [174510] Ensured that when multiple files are selected, all of them
+ will be deleted, not just the current one.
+ * [172254] selectFile should also set the current directory.
+ * [185930] getExistingDirectory directory file not updated after
+ renaming the new directory.
+ * [164591] Provided a way to set the QDir::filter on the model.
+ * [180459] Native OS X file dialog forgets last visited directory.
+ * [184508] Improved speed when showing a lot of files.
+ * [184508] Improved launch speed.
+
+- QFont
+ * Add Capitalize font-capitalization feature including small caps.
+ * [191756] Do not crash when font config finds no fonts on the system.
+ * [145015] Don't replace '-' characters in font names anymore.
+ * Fixed a bug where glyphs sometimes showed up in italic for a non italic
+ font (X11/Embedded Linux only).
+ * Fixed a bug where xHeight() sometimes returned a wrong number
+ (X11/Embedded Linux only).
+ * Added support for word- and letter-spacing.
+
+- QFontComboBox
+ * Fixed a bug where font name would not be displayed in some cases.
+
+- QFontMetrics
+ * [179946] Fixed averageCharWidth() to change return value after adding
+ text to a QPainterPath.
+
+- QFSFileEngine
+ * [200220] Fixed a potential crash and removed some potential resource
+ leaks.
+ * [190377] Fixed a reentrancy bug on all platforms; querying the canonical
+ path no longer relies on chdir() and realpath().
+ * [155284] Fixed uninitialized memory problem when calling realpath()
+ with an empty name on Solaris.
+
+- QGL
+ * [137573] Fixed drawing of images/pixmaps larger than the maximum texture
+ size in the OpenGL paint engine.
+ * [175853] Added new drawTexture member functions for convenient drawing
+ of textures in QGLWidget, QGLContext, QGLFramebufferObject, and
+ QGLPixelBuffer.
+ * [187954] Fixed an issue with missing corner pixels when drawing
+ rectangles in the OpenGL paint engine.
+
+- QGLContext
+ * [184996] Made isSharing() return something useful after a QGLWidget has
+ been reparented under Windows.
+
+- QGLPixelBuffer
+ * [195317] Make QGLPixelBuffer::hasOpenGLPbuffers() preserve the current
+ GL context when called.
+
+- QGLWidget
+ * [128157] QPixmap::grabWidget() now works on a QGLWidget.
+ * Added support for syncing drawing to QGLWidgets under X11 via the
+ QGLFormat::setSwapInterval() mechanism. This requires the
+ GLX_SGI_video_sync extension to be present.
+ * [183472] Made renderText() respect the currently set GL scissor box
+ and GL viewport.
+ * [182849] Fixed a crash on the Mac when renderPixmap() was called on a
+ multisampled GL context.
+ * [176618] Don't require depth testing to be enabled for the 3D version
+ of renderText() to work.
+
+- QGradient
+ * [178299] Fixed an issue where calling setColorAt twice with the same
+ position would not replace the existing color at that position.
+
+- QGraphicsItem
+ * [161160] Speedup when removing children from an item.
+ * [158799] QGraphicsItem now returns a different scene from
+ itemChange(ItemSceneChange).
+ * [127051] Added support for item caching in local and device
+ coordinates.
+ * [183996] Fixed a bug caused when items are moved by pressing many mouse
+ buttons at the same time.
+ * [192983] Added QGraphicsItem::boundingRegion(), which allows updating
+ items based on their shape instead of their bounding rect.
+ * Improved QGraphicsItem::isObscured() and QGraphicsItem::opaqueArea()
+ speed and accuracy.
+ * [195916] Fixed crash when deleting an item as it receives a
+ contextMenuEvent().
+ * [202476] DeviceCoordinateCache now works with perspective
+ transformations.
+ * [202718] DeviceCoordinateCache performance improved greatly when
+ the cached item does minimal updates.
+ * [202689] Scrolling works (but is slow) for cached items.
+
+- QGraphicsItemAnimation
+ * [164587] QGraphicsItemAnimation::reset() has been marked as obsolete.
+
+- QGraphicsLineItem
+ * [177918] Lines with the same start and end point are now valid, and
+ rendered as a point.
+
+- QGraphicsScene
+ * [160463] QGraphicsScene::clearSelection() is now a slot.
+ * [161284] Added Q_DISABLE_COPY.
+ * [163854] QGraphicsScene no longer sends events to a disabled mouse
+ grabber item.
+ * [176902] Add support for context menu event propagation.
+ * [176178] QGraphicsScene::sceneRect() now auto-updates also with NoIndex
+ set.
+ * [186398] Added a fast QGraphicsScene::clear(), and massive speed-up in
+ recursive scene destruction.
+ * [180663] Fixed miscalculated expose rects in QGraphicsScene::render().
+ * [176124] Ensure that all mouse events that should have a widget assigned
+ do have a widget assigned.
+ * [174238] The selectionChanged() signal is no longer emitted twice when
+ replacing one selection with another.
+ * [160653] selectionChanged is now emitted when reselecting an already
+ selected item.
+ * QGraphicsScene::mouseMoveEvent now receives all mouse move events from
+ the views, and translates them into hover events for the items. This
+ allows you to track all mouse move events for the entire scene, without
+ having to reimplement QGraphicsScene::event() and duplicating the
+ QGraphicsScene implementation.
+
+- QGraphicsSceneHoverEvent
+ * [151155] Added support for keyboard modifiers.
+ * [157222] Added support for lastPos, lastScenePos, and lastScreenPos.
+
+- QGraphicsSceneWheelEvent
+
+- QGraphicsSvgItem
+ * [171131] Fixed painting error caused by using obsolete pixmap cache
+ entry.
+
+- QGraphicsView
+ * [152477] Fix to QGraphicsView's scroll bar range calculation.
+ * [161284] Added Q_DISABLE_COPY.
+ * [164025] Mouse press events now propagate through the view if ignored
+ by the scene.
+ * New ViewportUpdateMode: QGraphicsView::BoundingRectViewportUpdate
+ * [180429] Mouse release events propagate properly in RubberBandDrag
+ mode.
+ * [176902] Add support for context menu event propagation.
+ * [180663] Fixed miscalculated expose rects in QGraphicsView::render().
+ * [187791] QGraphicsView::setScene() now always updates the view
+ properly.
+ * [186827] Fixed an infinite loop caused by mouse replay after deleting
+ items in response to receiving mouse move events.
+ * [172231] Fixed erroneous clipping of untransformable items by scaled
+ graphics view.
+ * Fixed redraw bugs in QGraphicsView background rendering when using an
+ OpenGL viewport.
+
+- QGridLayout
+ * [121549] Added itemAtPosition(int, int).
+
+- QGroupBox
+ * [159480] QGroupBox's clicked() behavior is now the same as QCheckBox.
+ * [186297] Right-clicking a checkable group box now has no effect, which
+ is consistent with the behavior of QCheckBox.
+ * [178797] A checkable group box now correctly updates the sunken state
+ of its check box.
+ * Don't call updateGeometry() needlessly from resizeEvent().
+
+- QHash
+ * [171909] Don't rehash in operator[] and insert() when the key already
+ exists -- to avoid subtle bugs when iterating on a QHash. (This is
+ documented as being undefined, since these functions are non-const,
+ but it's easy to avoid the rehashing.)
+
+- QHeaderView
+ * [173773] QHeaderView now updates properly upon sorting a column.
+ * [192884] When the model emits layout changed unhide old hidden rows
+ and hide new hidden rows.
+ * [170935] QHeaderView now updates properly when swapping columns.
+ * [157081] Made headerviews semi-transparent while dragged.
+ * [148198] Optimize hiding sections when the resize mode is ResizeToContents.
+ * [168128] Fixed problem where the last section was resized when the last two sections are swapped.
+ * [168209] Update the header section when the font size changes.
+
+- QHostInfo
+ * [194539] Fixed the ordering of IP addresses returned by the
+ host-lookup procedures. Qt respects the order supplied by the
+ system libraries.
+ * [176527] Fixed a problem in QHostInfo that would cause it to
+ print warnings if it was used before QCoreApplication is created
+
+- QHttpHeaders
+ * [104648] Fixed QHttpHeaders to not change the order or
+ capitalisation of headers received or sent. QHttpHeaders is now
+ case-insensitive but case-preserving
+
+- QHttp
+ * [181506] Fixed a bug that would cause QHttp to emit a warning
+ from QIODevice when connecting to some servers.
+ * [190605] Fixed a memory leak.
+ * [175357] Fixed a deadlock when trying to parse an empty HTTP
+ reply which did not contain Content-Length: 0 (such as those
+ found in 304 replies)
+ * [170860] Fixed a problem which would make QHttp emit the done()
+ signal too soon (before it was finished).
+
+- QIcon
+ * [168488] Reduce memory usage if you call addPixmap severals times with the same arguments.
+
+- QImage
+ * [176566] Fixed problem in scale() which would cause downscaled images to
+ become darker due to precision loss in the image scaling.
+ * [181265] Fixed crash in scale() when downscaling very large images.
+ * Added new image formats: QImage::Format_ARGB8565_Premultiplied,
+ QImage::Format_RGB666, QImage::Format_ARGB6666_Premultiplied,
+ QImage::Format_RGB555, QImage::Format_ARGB8555_Premultiplied,
+ QImage::Format_RGB444, QImage::Format_ARGB4444_Premultiplied,
+ and QImage::Format_RGB888.
+ * Added support for the ICO image format (from Qt Solutions)
+ * Fix drawing of text into a QImage on the Mac so that the native
+ CoreGraphics engine is used. This makes aliased text, or text with
+ a small point size, look much better.
+ * [188102] For Indexed image, fixed setColor() to expand the
+ colortable if necessary. Made colortable manipulation more robust.
+
+- QImageReader
+
+- QImageWriter
+
+- QInputDialog
+
+- QIntValidator
+ * [179131] Reverted QIntValidator's out-of-range semantics to Qt 4.2
+ behavior, at popular demand.
+
+- QItemDelegate
+ * [175982] Escape did not close the editor if the application had registered
+ escape as a shortcut.
+ * [177039] Handle double precision properly.
+ * Don't finish editing if the validator is still in intermediate mode.
+
+- QItemSelectionModel
+ * [169285] Items are now deselected properly.
+ * [192147] Fix an off-by-one bug in QItemSelectionModel
+
+- QLabel
+
+- QLayout
+ * Cache sizeHint() and minimumSizeHint() of widgets in a layout using
+ the internal class QWidgetItemV2, leading to significant performance
+ gains for widgets that have an expensive size hint implementation.
+
+- QLibrary
+ * [155884] Fixed QPluginLoader to not load plugins with unresolved symbols.
+ * [170013] Make sure that libraries are opened with RTLD_LOCAL by default
+ on *all* platforms. (On Mac it was RTLD_GLOBAL by default). This should
+ make plugin loading more consistent.
+ * [190831] Fixed crash when calling loadHints on a default constructed
+ QLibrary.
+ * [155109] The real error message was discarded if the library existed,
+ but failed for another reason.
+
+- QLineF
+ * [170170] Introduce new member function angleTo() which returns the angle
+ between two lines, also taking the direction into account.
+ * [174122] Added new member functions in QLineF for setting and getting
+ the angle of the line, as well as translating a line, and constructing
+ a line from polar coordinates.
+
+- QLineEdit
+ * [151414] Add protected function to access the cursor rectangle.
+ * [153563] Don't show blinking cursor on read only line edit with input mask
+ * [174640] Emit editingFinished() when the user open a menu.
+ * [178752] Reverted to Qt3's behavior of using an arrow cursor instead of
+ a beam cursor when the QLineEdit is read only.
+ * [180999] Old selection now cleared upon activating a window.
+ * [188877] Fixed painting error resulting from pasting into a selection.
+
+- QLinkedList
+ * Add QLinkedList::removeOne(), which removes the first occurrence of a
+ value from the list.
+
+- QList
+ * Add QList::removeOne(), which removes the first occurrence of a value
+ from the list.
+
+- QListView
+ * [158122] Wordwrap in ListMode
+ * [177028] Make sure that the scrollbars is automatically removed when the
+ model has less than two items.
+ * [186050] Make sure the content size is updated when moving item.
+ * [182816] Combine wordwrap and text eliding.
+
+- QListWidget
+ * [199503] Fixed a crash when calling clear inside a slot connected to
+ currentItemChanged.
+ * [159792, 184946] Keyboard navigation fixed with non uniform item sizes.
+ * [255512] Add function to allow setting the current item without selecting it.
+
+- QLocale
+ * [161049] Fixed a couple of static memory leaks in QLocale.
+ * Added the following functions to QLocale:
+ QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const;
+ QString toString(const QDateTime &dateTime, const QString &format) const;
+ QString dateTimeFormat(FormatType format = LongFormat) const;
+ * Added the following enum values to QLocale::QueryType:
+ DateTimeFormatLong
+ DateTimeFormatShort
+ DateTimeToStringLong
+ DateTimeToStringShort
+
+- QMacStyle
+ * [142746] Now respects the QComboBox::iconSize property.
+ * [184566] Make sure we pick up changes to QPushButton::setDefault().
+ * [174284] Don't truncate text on tabs in the small and mini size.
+ * [170971] Don't try to draw a mini scrollbar as it doesn't exist, draw a small one instead.
+ * [170977] Correct checkmarks for small and mini non-editable comboboxes.
+ * [170978] Prevent mini push buttons from being clipped.
+ * [202959] Draw the correct number of tickmarks for sliders.
+
+- QMainWindow
+ * [178510] Context menu is not shown if all toggle view actions are invisible.
+ * [195945] Fixed resizing of QDockWidgets in QMainWindow without using any
+ central widget.
+ * [196569] Don't override the cursor set by the user with setCursor when hovering dock widgets.
+
+- QMdiArea
+ * [155815] Fixed a bug causing sub-windows to overlap when tiling them.
+ * [148183] Added support activation order.
+ * [153175] Added support for tabbed workspace.
+ * [182852] Don't overwrite mainwindow title.
+ * [189758] Fixed a bug causing sub-windows to be squeezed when tiling them.
+ * [202657] Fixed focus issue on dockwidget when activating the main window.
+
+- QMdiSubWindow
+ * [198638] Fixed so that minimumSize() and minimumSizeHint() was respected (it was
+ possible to resize the window to a smaller size earlier).
+ * [171207] Added tooltips for the buttons in the title bar.
+ * [169874, 47106] Added support for switching between sub-windows using Ctrl-Tab.
+ * [169734] Added an access function to QMdiArea.
+ * [192794] Fixed a bug causing installed event filters to be removed after maximizing a sub-window.
+
+- QMenu
+ * [165457] Fixed torn-off QMenus to have the correct stacking order.
+ * [167894] Fixed focus management when activating an action from the keyboard.
+ * [167954] Increased the size of the tear-off handle.
+ * [172423] Mac OS X: Improved the visual appearance (flash selected item and fade away when hiding the menu).
+ * [183777] Fixed a bug with tear off menu making impossible to tear some menu off.
+
+- QMenuBar
+ * [193355] Fied bug with action plugged in menu which did not return to their normal state
+ after being clicked
+ * [194677] Fixed a bug causing the corner widgets to be laid out incorrectly when adding them right
+ before the menu bar was shown.
+
+- QMessageBox
+ * [176281] By default, if there is exactly one button with the RejectRole or
+ MessageBox::NoRole, it is now made the escape button.
+ * [181688] Better look with setInformativeText.
+
+- QMetaObject
+ * [197741] Fixed a memory leak in QMetaObject::invokeMethod() when
+ called with unregistered data types.
+ * [171723] Support for 'unsigned' type in the meta-object system.
+
+- QMetaType
+ * [179191] Added QMetaType::unregisterType() for unregistering a metatype.
+
+- QMimeData
+ * Added a removeFormat() method.
+
+- QMngHandler
+ * [155269] QMngHandler now initializes image backgrounds properly.
+
+- QModelIndex
+ * [176068] optimize QModelIndex operator<
+
+- QMotifStyle
+ * [185649] Fixed incorrect positioning of itemview frames in reverse mode.
+
+- QMutex
+ * [151077] Optimized QMutex locking path to be comparable to Win32
+ CRITICAL_SECTIONs.
+ * [186088] Clarify documentation of lock() and tryLock() to be
+ more explicit about the behavior of these functions in recursive
+ vs. non-recursive mode.
+
+- QNetworkInterface
+
+- QNetworkProxy
+
+- QObject
+ * [144976] Fix QObject::property() to return a QVariant that can be
+ converted to an enum if the enum is known to QMetaType.
+ * [171612] Fix QObject::removeEventFilter() to work as documented.
+ * [172061] convert() now return false if the result is invalid for date types.
+ * [184003] Fix a crash in QObject::queryList() when called from an
+ object's destructor.
+ * [173218] Document deleteLater()'s behavior when called before
+ QCoreApplication::exec().
+
+- QOpenGLPaintEngine
+ * [183995] Reset the GL_TEXTURE_ENV attribute and pixel transfer modes to the
+ default values when QPainter::begin() is called.
+ * [174273] Fixed the annoying "Unable to compile fragment programs" problem
+ by adding a GL program cache, and compiling the programs on demand.
+
+- QPainter
+ * [121105] Added drawEllipse overload that takes a center point and two
+ radii.
+ * [124248] Fixed some rounding issues causing inconsistencies between
+ text and line drawing.
+ * [142470] Fixed performance issue with non-cleartype text drawing on
+ Windows when doing several calls to QPainter::drawText().
+ * [142514] Fixed bug in X11 paint engine where a pixmap drawn
+ at non-integer coordinates would be drawn at different offsets depending
+ on whether opacity was set or not.
+ * [156787] Fixed problem with SmoothPixmapTransform and source rects in
+ drawImage and drawPixmap which would cause color bleeding from pixels
+ outside the source rect at the image borders.
+ * [156964] Improved accuracy of arc drawing, ensuring that arcs drawn
+ with same control rect but different sweeps are still coinciding.
+ * [162153] Fixed bug caused by integer overflow in QPainter::boundingBox
+ when passing a very large rectangle.
+ * [163605] Introduced new drawRoundedRect API with support for absolute
+ coordinates for the corner radii.
+ * [166702] Fixed some potential floating point exceptions in raster
+ paint engine line drawing.
+ * [167890] Prevent crash when drawing zero-length lines; these are now
+ drawn as points.
+ * [169711] Ensured that calling setClipRect with negative width/height
+ is treated as an empty clip region.
+ * [170208, 170213] Fixed some bugs with dashed line drawing and dash
+ dash offsets in the mac paint engine.
+ * [175912, 176386, 194360] Fixed some precision issues with projective
+ transformed pixmaps and images.
+ * [179507] Ensure that the final stop color is always used beyond the
+ radius when using a QRadialGradient.
+ * [180245] Fixed bug which caused setOpacity to be ignored when drawing
+ transformed RGB32 images.
+ * [182658] Fixed a problem with drawPoint in X11 paint engine which would
+ cause a one-pixel point to sometimes be drawn as two pixels.
+ * [184746] Fixed performance regression in drawEllipse() with raster paint
+ engine.
+ * [188012] Fixed stroking of empty rectangles in X11 paint engine.
+ * [190336] Fixed text drawing performance issue on Windows when using
+ setPixelSize to draw large fonts.
+ * [190394] setOpacity() now correctly paints transparent regions when
+ outputting to PDF.
+ * [190634] Fixed bug where drawLine would fill part of the paint device
+ instead of just drawing a line.
+ * [190733] Fixed some precision problems with miter joins and curve
+ segments which could cause ugly painting artifacts.
+ * [191531] Fixed a bug with alpha or pattern brush drawing to mono images.
+ * [191761] Fixed rendering of transformed ObjectBoundingMode gradients.
+ * [199234] Fixed a bug causing fillRect with a gradient fill to not work
+ with ObjectBoundingMode gradients in the raster paint engine.
+ * Introduced a new rasterizer for aliased drawing to address performance
+ and precision issues in the existing rasterizer.
+ * Remove warnings emitted when setting Source or SourceOver composition
+ modes on certain paint devices.
+ * [192820] Fix drawImage()/drawPixmap() with a source rect parameter outside
+ of the range of the source image dimensions.
+ * [183745] Fixed setting font point sizes < .5, would in some cases cause
+ the font size to default back to 12 points.
+ * [157547] Fixed inconsistent pen styles for DashLine, DotLine, DashDotLine
+ and DashDotDotLine across Win/Linux.
+ * [143526] Fixed a problem with drawing text or shapes that were drawn
+ with a very large scale factor. Typically you would get a crash after
+ memory was exhausted.
+ * [186070] Fixed potential integer overflow when drawing texture or pattern
+ brushes with a transform that has a small scale.
+ * [200616] Fixed bug causing transformed cosmetic pens with width > 0 and a
+ dash pattern to be partially or completely clipped (raster engine).
+ * [206050] Fixed QImage::scale with a SmoothTransformation to handle alpha
+ channel correctly when scaling.
+
+
+- QPainterPath
+ * [121105] Added addEllipse overload that takes a center point and two
+ radii.
+ * [181774] Remove assert that could occur when calling pointAtPercent()
+ with parameters close to 0 or 1.
+ * [189695] Fixed bug relating to 360-degree arcs and winding fill.
+ * [187779, 187780] Fixed some bugs in intersects() and contains() when
+ dealing with paths with multiple subpaths.
+ * [191706] Fixed intersects(QRectF) for paths that represent vertical or
+ horizontal lines.
+ * [193367] Introduced simplified() to simplify paths with multiple
+ subpaths and/or self-intersections.
+ * [206160] Modify QPainterPath::operator== to do point comparisons with
+ an epsilon relative to the painter path's bounding rect size.
+
+- QPainterPathStroker
+ * [174436] Fixed some bugs relating to dash offsets and dashing of
+ paths with multiple subpaths.
+
+- QPalette
+ * [170106] Added QPalette::ToolTipBase and QPalette::ToolTipText.
+
+- QPicture
+
+- QPixmap
+ * [164116] QPixmap::x11Info() didn't report the correct depth when
+ the pixmap depth and the desktop depth was different.
+
+- QPixmapCache
+
+- QPlastiqueStyle
+ * More native appearance of button, combobox, spinbox and slider.
+
+- QPolygon
+ * [163219] Added missing datastream operators to QPolygon.
+
+- QPrintDialog
+ * [182255] Don't ask whice to overwrite axisting file.
+ * [183028] Changed to default for maxPage() to INT_MAX.
+
+
+- QPrinter
+ * PDF engine now supports hyperlinks.
+ * [180313] Fixed a bug where QPrinter could not be used more than once
+ per instantiation.
+ * [121907] Change begin() to properly return 'false' when the file we
+ want to write to can not be written to.
+ * [189604] Make the pdf printer capable of having a different page size
+ and orientation for each page.
+ * [99441] Add setPaperSize(const QSizeF &paperSize, Unit unit).
+ * [182245] Make pageRect() return consistent values across
+ Mac/Win/Linux when fullPage() is set, and fix an off by one error in
+ the width()/height() functions on the Mac.
+ * [156508] PS/PDF generators: Correctly generate grayscale output when
+ requested.
+
+- QPrintEngine
+ * [193986] Fixed the Trolltech copyright date on PDF files
+
+- QProcess
+ * [162522] QProcess now emits stateChanged() consistently for all state
+ changes.
+ * [153565] Add define to make it compile with QNX RTOS.
+ * [196323] Try to unregister SIGCHLD while Qt is unloaded.
+
+- QProgressBar
+ * [189512] sizeHint() doesn't depends anymore on PM_ProgressBarChunkWidth
+
+- QProgressDialog
+ * [190318] Use the size of the label if setMinimumSize() and setLabel()
+ are called.
+ * [198202] Wixed crash when calling setLabel(0).
+
+- QPushButton
+
+- QReadWriteLock
+ * [131880, 170085] Add support for recursive read-lock
+ support. See the not below in the Important Behavior Changes
+ section.
+
+- QRect
+ * Fixed a bug in normalized() when width() == 0 and height() < 0
+ or vice versa.
+
+- QRectF
+
+- QRegion
+ * Added numRects() which returns the number of rectangles in the region.
+ * [193612] Various optimizations for regions consisting of only one
+ rectangle.
+
+- QResource
+
+- QScriptEngine
+ * [200225] Made uncaughtExceptionBacktrace() return a correct backtrace
+ in the case where the value thrown is not an Error object.
+ * [202454] Made QScriptContext::isCalledAsConstructor() return the right
+ result for constructors registered with newQMetaObject().
+ * [198166] Made canEvaluate() handle C-style comments correctly.
+ * [202606] Made it possible to invoke slots with const QObject* arguments.
+ * [200599] Removed the need to register the metatype-id of QObject-derived types
+ before they can be used as arguments to slots where the type occurs
+ in the signature.
+ * [185580] Fixed a bug with automatic semi-colon insertion that caused the
+ prefix ++ operator to behave incorrectly.
+ * [190991] Implemented iteration for arguments objects.
+ * [175697] Made conditional function declarations have the same semantics as in
+ other popular ECMAScript implementations.
+ * [176020] Fixed a crash that occurred when the left-hand side of an assignment
+ was an object literal.
+ * [176020] Fixed a crash that occurred when an if-statement inside a function
+ contained a return statement in the false-branch but not in the
+ true-branch, and the function didn't contain any more statements.
+ * [182578] Fixed a bug that caused automatic QList<int>-to-QScriptValue
+ conversion to fail.
+ * [163318] Added abortEvaluation() function.
+ * [167711] Added qScriptConnect() and qScriptDisconnect() functions, so that
+ a signal can be connected to a script function from C++.
+
+- QScrollArea
+ * Fixed an issue with child widgets with heightForWidth sizing behavior.
+
+- QScrollBar
+ * [178919] Fixed a bug where the slider kept moving after the mouse button was released.
+
+- QSemaphore
+
+- QSettings
+ * [199061] Don't use more permissions than we have to, when opening the registry.
+ * [142457] Preserve the order of keys in .ini files when regenerating them.
+ * [186232] Unix and Mac OS X: OR the needed permissions flags with the
+ default flags (instead of overriding them).
+ * [184754] Hande out-of-disk-space condition more smoothly, by keeping the
+ old .ini/.conf file if possible (instead of trashing it).
+ * [189589] Don't create empty directories when accessing QSettings read-only.
+ * [182712] Added QSettings::setDefaultFormat(), defaultFormat(), and
+ format() to give more control over the format of QSettings objects
+ created using the default constructor.
+ * [183068] Added QSettings::scope(), applicationName(), and
+ organizationName() for retrieving the values passed to the constructor.
+
+- QShortcut
+ * [141646] Add ShortcutContext::WidgetWithChildrenShortcut context, for shortcuts
+ which are valid for a widget and all it's children.
+- QSize
+ * [172712] Fixed bug in QSize::scale() when passing INT_MAX as height and
+ KeepAspectRatio as mode.
+ * [191533] Fixed bug in QSize::scale() where scaling a size with zero
+ width or height would cause a division by zero.
+
+- QSizeGrip
+ * [193199] Made the size grip always respect height-for-width on all
+ platforms.
+ * [161173] Fixed a bug causing the size grip to be visible when it shouldn't be.
+ * [184528] Windows: Fixed a bug causing a mouse press event not to be sent.
+ * [193350] Fixed a bug with QVBoxLayout.
+
+- QSlider
+ * [180474] Fixed regression causing a tick mark not to be shown at the max value for
+ certain common cases.
+
+- QSocketNotifier
+
+- QSortFilterProxyModel
+ * [162503] Call mapToSource when mapping from proxy to source indexes.
+ * [146684] Allow the original order of the source model to be restored.
+ * [199518] Don't assert if the source model emits unbalanced change signals.
+ * [202908] dropMimeData incorrectly maps when row is rowCount(parent).
+
+- QSpinBox
+ * [157520] Adopt the special value text when the value is explicitly set to the
+ minimum value with the keyboard
+ * [164696] QWidget::locale() is now used for all string-to-number conversions.
+
+- QSplashScreen
+
+- QSplitter
+ * [169702] Respect the minimum size of widgets.
+ * [187373] Ensure that widgets are properly initialized before being added to a QSplitter.
+
+- QSql
+
+- QSqlDatabase
+ * [129992] Make it possible to retrieve the connection name from a connection.
+ Use the connectionName() function.
+
+ * [143878] Give a warning if there is no QCoreApplication instance (required
+ when using a plug-in driver).
+
+- QSqlDriver
+ * [141269] Add support for asynchronous database event notifications.
+
+- QSqlQuery
+ * [157397] Set an error if QSqlQuery is used with an invalid database
+ connection.
+
+ * [122336] Support queries returning multiple result sets. Use the
+ nextResult() function.
+
+ * [149743] Fixed bug where seek() to a record which was not the next one
+ returned true, but the data could not be retrieved.
+
+ * [186812] Improved error handling for exec().
+
+- QSqlQueryModel
+
+- QSqlRelationalTableModel
+
+- QSqlTableModel
+ * [160135] Emit headerDataChanged when removing rows when using the
+ OnManualSubmit edit strategy.
+
+- QSslCertificate
+ * [186791] Fixed wildcard support in QSslCertificate::fromPath().
+
+- QSslCipher
+- QSslError
+- QSslKey
+
+- QSslSocket
+ * [190133] Fixed security hole in certificate verification.
+ * [186077] Fixed bug in ASN1 time parsing.
+ * [177375] Added support for peer verification.
+ * [191705] Fixed crash on remote disconnect.
+ * [177285, 170458] Enabled run-time resolving of OpenSSL libs also in
+ static Qt builds. Enabled by default, with configure option to force
+ (static) linkage.
+
+- QStackedLayout
+- QStackedWidget
+ * [124966] Honor QSizePolicy::Ignored in pages like we did in Qt 3.
+
+- QStandardItemModel
+ * Improved general performance
+ * [133449] Improved setData() performance
+
+- QStatusBar
+ * [194017] Ensure that explicitly hidden Widget in the status bar stay invisible.
+
+- QString
+ * [202871] QString::sprintf() crashed with size_t format.
+ * [193684] Optimized common case in QString::replace(int, int, QString).
+ * [190186] Handle multiple-digit %n args in QString::arg(QString,
+ QString, ...) gracefully.
+
+- QStringListModel
+ * [158908] Add MoveAction to the default supportedDropActions
+ * [180184] sort() was not updating the persistant model index's
+
+- QStyle
+ * [127923] All implementations of QStyle::subControlRect() now respect QStyleOption::rect for
+ spin boxes.
+ * Added SH_SpinBox_ClickAutoRepeatThreshold which used to be hardcoded in QAbstractSpinBox
+
+- QStyleOption
+
+- QSvg
+ * [185844] Fixed parsing of the gradientUnits attribute to support
+ objectBoundingBox for gradients.
+ * [161275] Fixed parsing of repeatCount attribute for animateColor
+ and animateTransform tags.
+ * [176835] Fixed a memory leak in QSvgGenerator.
+ * [182196] Fixed problem in QSvgGenerator which would cause gradient
+ fills to be stored as images instead of using native SVG gradients.
+ * [187994] Always encode generated SVGs in UTF-8, and specify that
+ in the xml tag.
+ * [188847] Fixed a crash when an SVG file contains empty url keywords.
+ * [190936] Ensure properly sized viewport and viewbox, even when
+ the paint device does not have a size (such as QPicture).
+ * [191353, 192220] Fixed a couple of floating point exceptions occuring
+ when rendering certain SVGs containing curved paths.
+ * Added correct default attribute values for SVG gradients.
+
+- QSyntaxHighligher
+
+- QSystemTrayIcon
+
+- QTabBar
+ * [182473] Fixed a bug causing the tabs to stay unchanged after calling setElideMode().
+
+- QTableView
+ * [192919] Drag-selection from QTableView now respects single-selection mode.
+ * [172201] Painting errors when there are multiple regions that overlap that need to be painted.
+ * [148565] setSpan() and other spanning operations is slow when there are a lot of spans.
+ * [186431] Fix bug in wrapping to the next/previous line while doing cursor navigation.
+ * [189251] corner widget is hidden with header, but not unhidden
+ * [196532] Fixed bad repaint with hidden header and scrollPerItem.
+ * [158258] Add clearSpanns() function.
+
+- QTableWidget
+ * [255512] Add function to allow setting the current item without selecting it.
+
+- QTabWidget
+ * [159433] Emit currentChanged() when the first tab is created.
+ * [171464] QTabWidget::minimumSizeHint() now respects the orientation.
+ * [188357] Fixed a bug causing the corner widget to be displayed incorrectly.
+
+- QtAlgorithms
+ * [304394] qBinaryFind() can potentially end up in an infinite loop with large collections
+
+- QTcpSocket
+ * [149200] Fixed crash when using QTcpSocket without constructing
+ Q(Core)Application.
+
+- QTemporaryFile
+ * [192890] Fixed resize bug on Windows.
+ * [194130] Fixed creation of temp files in toplevel directories on
+ Windows.
+
+- QTextBrowser
+ * [166040] Detects the right format when calling setText() severals times.
+ * [177036] Fix handling of encoded urls.
+ * [169621] Fixes clearHistory() removes all history items except the first,
+ while it should keep the last entry.
+ * [176042] Fix selectAll to sometimes show focus frames instead of selected
+ text.
+
+- QTextCodec
+ * [169065] Make calling QTextCodec::setCodecForLocale() with NULL
+ reset codecForLocale() to the default, instead of causing a crash.
+ * [167709] Improved support for cp932 codec.
+ * [185085] Make sure every codec has a unique mibEnum
+ * Added UTF-32 codecs
+
+- QTextCursor
+ * [179634] Fixes loosing of x position when using vertical navigation
+ in a not yet fully layed out document.
+ * [178499] Add functionality to interpolate inside the glyph size if it
+ takes multiple characters to decide on the position.
+ * [182914] '/' is now considered a word separator.
+ * Faster QTextCursor::blockNumber().
+
+- QTextDecoder
+
+- QTextDocument
+ * [135133] Add proper support for the background attribute of HTML
+ tags, which enables specifying background images.
+ * [148847] Add support for padding-left, padding-right, padding-top,
+ and padding-bottom for table cells in the HTML import.
+ * [169724] Added API for changing the indent width in a QTextDocument.
+ * [173258] Fixed bug in text layout of tables with row spans and
+ empty cells.
+ * [174405] Added support for the border-width css property in the HTML
+ import.
+ * [176162] Fixed bug in HTML import which would cause block properties
+ of empty paragraphs to be transfered to following paragraphs.
+ * [179330] Fixed performance problem when a maximum block count is reached
+ which caused the whole document to be relayouted.
+ * Numerous fixes in the import of malformed HTML.
+ * QTextDocument::print() now preserves formats set by a syntax highlighter.
+ * Added QTextDocument::firstBlock() and lastBlock() for convenient iteration
+ * Added QTextDocument::undoCommandAdded() signal.
+ * [189691] Fixed bug in HTML image tags showing in incorrect width/height
+ when only one was provided.
+ * [193122] QTextTable::removeRows() correctly removes one row after a
+ mergeCells()
+ * [55520] Fix bi-directional text showing correctly when mixed with tabs.
+ * [170376] Fixes text layout QTextLine::setNumColumns(1) combined with
+ alignment not left
+ * [177024] Fixed bug in definition of &current; entity.
+ * [176898] QTextDocument loses UndoRedo stack when setting it on QTextEdit by
+ calling QTextEdit::setDocument()
+ * [180657] QTextDocument::documentSize() returns an incorrect width when there
+ is a long line with only spaces.
+ * [180430] Stop compression of space after an image tag.
+ * [154330] Implement Right, Justified and Center tabs and make Left tabs
+ behave as expected in all cases.
+ * [196744] Fixes colspan making a table cell multiply given user width.
+ * [197769] Fixed wrong modified state while undo/redo.
+ * Added QTextDocument::findBlockByNumber() and QTextBlock::blockNumber().
+ * Added QTextDocument::revision() and QTextBlock::setRevision()/revision().
+ * Added QTextBlock::setVisible()/visible() and QTextCursor::setVisualNavigation()/
+ visualNavigation().
+
+- QTextDocumentFragment
+
+- QTextEdit
+ * [80240] Fixed text color bug when creating a text edit with a disabled
+ parent widget that is then reenabled.
+ * [104778] Added convenience functions for getting/setting the background
+ color of text.
+ * [150562] Wrap correctly the text in a <table> when the flag
+ WrapAtWordBoundaryOrAnywhere is set.
+ * [165610] Fixed bug where a text fragment's underline would be drawn
+ too long.
+ * [166486] Fixed bug which caused the cursor to not be shown when
+ setting the cursor flash time to 0.
+ * [190852] Fixed a bug which caused the font sizes in tables to be wrong
+ in QTextEdit documents exported to HTML.
+ * Many performance improvements
+ * [190723] Fix problem where the bullet might disappear if there was an
+ extra selection selecting the word next to the bullet.
+ * [182200] Make the selectionChanged signal be emitted when pressing
+ "Ctrl+A" and there is already a selection present.
+ * [188589] Fixes regression in QTextEdit::keyReleaseEvent where it makes
+ the release events not be ignored when unused.
+ * [175825] Allow stopping auto-scrolling feature by moving the cursor
+ to a position other then the last position.
+ * [177151] Fix the "Copy Link Location" is always disabled in context
+ menus created with createStandardContextMenu()
+ * [182180] The value of cursor width desktop settings on windows is now
+ respected.
+ * [108739] Added DnD scrolling and made selection scrolling smoother.
+ * [202319] More precise QTextEdit::cursorRect().
+ * [181572] Accept Key_Up and Key_Down ShortcutOverride events.
+
+- QTextFormat
+ * Fixed bug which caused QTextCharFormat::font() to return a wrong font
+ after changing font-unrelated properties in QTextCharFormat.
+ * [181177] Fix text directionality changing.
+
+- QTextLayout
+ * Support WrapAtWordBoundaryOrAnywhere with QTextLine::setColumns.
+ * [188594] Make nextword and previous word be more synchronous by making
+ them stop at the same word boundaries.
+
+- QTextStream
+ * [178772] setCodec() take effect immediatly even on open stream.
+ * [180679] Implemented AlignAccountingStyle.
+ * Add UTF-32 autodetection
+
+- QTextTable
+
+- QtGlobal
+ * [186969] Fixed theQT_NO_WARNING_OUTPUT define to work properly.
+ * qFuzzyCompare() is now part of Qt's API and is public.
+
+- QThread
+ * QThread is no longer abstract. The default implementation of
+ QThread::run() function now calls QThread::exec().
+
+- QThreadStorage
+
+- QTimeEdit
+
+- QTimeLine
+ * Add CosineShape.
+
+- QTimer
+
+- QToolBar
+ * [159715] If the main window is to small to contains the extension, show it in a menu.
+ * [179202] Toolbars can be resized by dragging them with the mouse.
+ * [175325] Changing toolButtonStyle on floating toolbars is handled correctly.
+ * [187996] Ensure that invisible action are invisible in the toolbar.
+ * [191727] Fix layouting issue with widgets on the toolbar.
+
+- QToolBox
+
+- QToolButton
+ * [QToolButton] Emit triggered(QAction*) on the activation of the default action even if
+ triggered from the menu.
+
+- QToolTip
+ * [183679] Fixed problem of tool tip being closed when pressing certain keys.
+ * [191550] Fixed a regression causing the palette not to be updated after calling
+ QToolTip::setPalette.
+ * Added functions text() and isVisible().
+ * Fixed QToolTip::showText() with rectangle, it always created a new tip.
+
+- QTransform
+ * [178609] Fixed division by zero in QTransform::mapRect when passing an
+ invalid QRect.
+ * Fixed problem with QTransform::inverted() returning the identity matrix
+ for transforms with a low scale factor.
+
+- QTranslator
+ * [168416] Make it possible for QTranlator to open qm files generated with msgfmt.
+ (regression from Qt3)
+
+- QTreeView
+ * [41004] Deleting a directory will delete all of its children.
+ * [174627] Moving left towards a custom root index now works correctly.
+ * [154742] Add property to hide the header
+ * [166175] Improve the performance of hide() and isHidden()
+ * [166175] Improve the performance of expanded() and isExpanded()
+ * [181508] adding a row to a item that is visible and not expanded wont update the '+'
+ * [179635] Incorrect row height if column with a multi-line item is not visible when tree is first shown.
+ * [187745] When the context key is pressed first check for a micro focus, but if that isn't valid then go to the mouse cursor position.
+ * [188862] Crash if a parent index of the root index in the view is removed
+ * Improving performance by reduce the number of calls to model->parent()
+ * [167811] Improve insertion speed
+ * [192104] scrollTo(PositionAtCenter) can scroll beyond the item if item is at 0
+ * [168237] Fixed selection when using SelectItems selection behavior and ExtendedSelection selection mode.
+ * [171902] Expansion is not managed correctly when the 1st column is hidden.
+ * [130628] Add expandsOnDoubleClick property.
+ * [189956] Make scrollTo() scroll correctly when the scrollHint is PositionAtBottom.
+ * [185068] Update editor geometries when columns are moved.
+ * [120922] Mac OS X: Improved the selection behavior.
+ * [197650] Fixed spanning items in "right to left" layouts, or if the first column is
+ moved in another position.
+ * [204726] Don't assert when sorting an unchanged tree.
+ * [185994] Introduce a style hint that describes how the view should treat empty areas.
+
+- QTreeWidget
+ * [172685] When setting flags don't do anything if the new flag is the same as the old.
+ * [162736] Fixed potential slowness in QTreeWidget::isItemSelected()
+ * [167811] Improve insertion speed
+ * [255512] Add funtion to allow setting the current item without selecting it.
+ * [183566] Make rows containing widgets resize correctly.
+ * [189071] Make it possible to disable drop dirrectly on the viewport.
+ * [192840] Only paint disabled cells as disabled, not the entire row.
+ * [191329] The checkable items are now checkable even in RightToLeft mode.
+
+- QTreeWidgetItemIterator
+ * [172275] Optimize QTreeWidgetItemIterator to not query various states
+ unless the user explictly specified the corresponding flags.
+
+- QUdpSocket
+
+- QUndoStack
+ * [143285] Added API to access individual commands in the undo stack.
+
+- QUrl
+ * [162669] Fixed bug in QUrl::setAuthority() when input ends with a digit.
+ * [199967] Fixed a regression from Qt 4.4.0 Technical Preview 1
+ that caused isEmpty() to return true on non-empty URLs in some cases.
+
+- QValidator
+
+- QExplicitlySharedDataPointer
+ * A new reference counting pointer which doesn't perform copy on write.
+
+- QVariant
+ * [186447] Do not call qFatal() when QVariant::load() enconters a UserType
+ that's unknown to the meta object system.
+ * [170901] Compare values _and_ keys in QVariant::operator==() when
+ applied to maps.
+
+- QVarLengthArray
+ * [177708] Fix crash in QVarLengthArray::append() for types with a
+ non-trivial constructor (e.g., QString).
+
+- QVector
+ * [161376] Fix unitialized read reported by Valgrind in QVector<T> for
+ sizeof(T) < 4.
+
+- QWaitCondition
+ * [106086] Add support for QReadWriteLock to QWaitCondition::wait().
+
+- QWidget
+ * [323] Add the Qt::WA_ShowWithoutActivating attribute, which can
+ be used to show a window without activating it.
+ * [176809] When using the Qt::PreventContextMenu policy, the
+ context menu key should be sent to the widget (instead of
+ consuming the event).
+ * [83698] Introduce QWidget::setWindowFilePath() that allows setting a
+ proxy icon on the mac and sets the window title if the window title
+ hasn't been set previously.
+ * X11/Win: Added support for non-native child widgets.
+ * [173044] Added support for rendering widgets before they are shown.
+ * [152962] Fixed a bug causing the widget to repaint itself twice when calling show().
+ * Added a render() overload taking an arbitrary QPainter.
+ * [183466] Fixed a bug where the mouse button release event was sent to wrong widget
+ when having a mouse grabber.
+ * [177605, 171333] Windows: Fixed a bug causing painting artifacts when using the
+ Qt::WA_PaintOnScreen attribute.
+ * [141857] Fixed a bug causing painting artifacts when using the Qt::WA_OpaquePaintEvent attribute.
+ * [198794] Fixed wrong calculation of the target offset in render().
+ * [180009] Fixed order dependency of setWindowFlags() and setWindowTitle() on Windows.
+ * [155297] Avoid crash in QWidget::setLayout() if the layout already has
+ a parent.
+
+- QWidgetAction
+ * [193061] Fixed setEnabled that has no effect.
+
+- QWindowsStyle
+ * [162326] Removed a warning when rendering to small rectangles.
+
+- QWindowsXPStyle
+ * [189527] Fixed incorrect tab indentation on XP/Vista styles.
+ * [177846] Fixed setAutoRaise beeing ignored for tool buttons.
+ * [168515] Allow changing the background color of a disabled spinbox.
+ * [165124] Fixed context help button beeing ignored for QMdiSubWindows.
+
+- QWindowsVistaStyle
+ * [164016] More native menu borders on Vista.
+ * [168611] Allow progress bar animation to complete after reaching 100%.
+
+- QWizard
+ * [177022] Respect the minimum and maximum size.
+ * [189333] The (re)size behavior is now correct for Windows Me.
+ * [183550] Fixed wrong stretch factor for a wizard page in the interal layout.
+ * [166559] Honor isAcceptableInput().
+ * [170447] Make sure that the virtual QWizard::nextId() function is
+ called from QWizardPage::isFinalPage().
+
+- QWizardPage
+
+- QXmlStreamReader
+ * Added convenience function prefix() to the reader and the attributes, previously
+ we only had name() and qualifiedName().
+ * Added more DTD reporting.
+ * Added QXmlStreamEntityResolver for undeclared entities.
+ * [179320] Fixed wrongly reported premature end of document for non-recoverable errors
+ * [192810] Fixed namespace declarations in DTD attribute lists.
+ * Add UTF-32 autodetection
+
+- QXmlStreamWriter
+ * Improvements to conformance to XML 1.0
+ * Added autoFormattingIndent property to customize the auto-formatted output.
+ * [18911] Fixed auto formatting for XML comments.
+
+- QXmlStreamWriter
+ * Added autoFormatting() property which controls whether the output should be indented
+ for readability.
+
+- QXmlSimpleReader
+ * [201459] That the class is not reentrant, has been documented.
+ * Add UTF-32 autodetection
+
+- Q3ButtonGroup
+ * [198864] Fixed bug that caused Q3ButtonGroup::insert() to generate wrong
+ (typically non-unique) ids.
+
+- Q3DateEdit
+
+- Q3DockWindow
+ * [173255] When docked, relayout improved when the content is changed.
+
+- Q3FileDialog
+ * [200264] Fixed the "QObject: Do not delete object, 'unnamed',
+ during its event handler!" warning found in the 4.4.0 beta.
+
+- Q3GroupBox
+
+- Q3ImageDrag
+ * [184521] Q3ImageDrag::canDecode() will now return true for image data that can be decoded.
+
+- Q3ListView
+ * [127037] Q3ListView::paintCell() now uses the viewport's background role.
+
+- Q3MainWindow
+ * [176544] Q3MainWindow::setDockEnabled() no longer adds dock windows that are already there.
+ * [176129] Q3MainWindow::setUsesBigPixmap now works.
+
+- Q3PopupMenu
+ * [177490] Fixed regression causing activated and highlighted signals to be
+ emitted multiple times.
+
+- Q3ScrollView
+
+- Q3SqlCursor
+
+- Q3Table
+ * [171801] Fixed a graphical error in Q3CheckTableItem.
+ * [196074] Fixed a crash when using Q3Table and Q3ComboTableItem together
+ with stylesheets.
+
+- Q3TextEdit
+ * [197033] Fixed "select-and-copy" on X11
+
+- Q3Toolbar
+ * [171843] QComboBox in a Q3Toolbar was generating warnings
+
+- QSvgWidget
+ * Support for xml:space
+
+- QWhatsThis
+ [177416] Fix sizing hints when using rich-text.
+
+- Qt Style Sheets
+ * [163429] Stylesheet backgrounds now work on Mac. Note that there are
+ still issues with stylesheets on that platform.
+ * [169855] Setting a style sheet with gridline-color on QTableView now
+ works correctly.
+ * [182917] :hover no longer applies to disabled widgets.
+ * [184867] Several speedups to stylesheet parsing.
+ * [188344] Style sheets no longer reset font settings. They now
+ take precedence over manually set font settings, and will leave other
+ settings alone. The font is restored to the manual settings if
+ the style sheet is removed.
+ * [188702] Fixed a bug where QLineEdit would not react to the :focus
+ pseudo state.
+ * [190422] Fixed a bug where the width of QSpinBox subcontrols would not
+ be properly respected.
+ * [190423] Fixed a bug where gradient backgrounds were not shown correctly
+ in QComboBox.
+ * [191189] Fixed a bug where classes derived from QDialog by more than two
+ levels (QDialog -> MySubClass -> MySubSubClass) would not receive the
+ styled background.
+ * [191216] Menus with a background color will now be rendered using the
+ native style.
+ * [191822] Fixed a crash in subElementRect when widget pointer is null.
+ * [192374] An offset ::tab-bar element no longer offsets scroll buttons.
+ * [192535] Fixed a bug where a QComboBox would not always draw its
+ dropdown button when styled.
+ * [192655] Fixed a bug where it was sometimes impossible to toggle a
+ styled, checkable menu item.
+ * [199912] QHeaderView no longer collapses to zero contentsRect if size
+ is not specified.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+ * [185482] Fixed bug where data corruption occurred when inserting data into
+ numeric fields on some platforms.
+
+ * [156090] Fixed bug where the connection information was always assumed to
+ be Latin1 encoded.
+
+- MySQL driver
+ * [190311] Fixed bug where fetching BLOBs with a prepared query would fail
+ if the second BLOB was larger than the first.
+
+ * [184354] Implement QSqlDriver::escapeIdentifier() allowing reserved words and
+ white spaces in table and column names.
+
+ * [129925] Communicate with the database using UTF8 encoding for MySQL
+ versions >= 4.1.13 and < 5.0.0. This makes the behavior consistent with MySQL
+ versions >= 5.0.7.
+
+- OCI driver
+ * [167644] Set an error when failing to start a transaction in addition to
+ printing an error.
+
+ * [177054] Fixed bug that caused QSqlField::length() to always return 38 for
+ non-numeric fields.
+
+ * [141706] Added support for the using the hostname and port number provided by
+ QSqlDatabase. This makes it possible to connect to Oracle databases without
+ a tnsnames.ora file on the client.
+
+- ODBC driver
+ * [164680] Don't crash when updating a view displaying a model after the
+ database connection has been closed.
+
+ * [166003] Use SQLFetch() if SQLFetchScroll() isn't supported in the driver.
+
+ * [116534] Allow closing cursor without destruction of QSqlQuery object. Use
+ QSqlQuery::finish().
+
+ * [181039] Added support for a connection option to instruct the driver to
+ connect as an ODBC 3 application; SQL_OV_ODBC3. This is needed in order to
+ make the QODBC driver work with some ODBC drivers.
+
+ * [176233] Connection options are no longer case-sensitive (according to the
+ ODBC standard).
+
+ * [178532] Fixed bug where binding bools would fail.
+
+ * [176231] Support passing the username and password as part of a connection string
+ instead of using QSqlDatabase::setUserName() and QSqlDatabase::setPassword().
+
+ * [141822] Support the SQL_GUID type.
+
+ * [187936] Improved support for the Linux Easysoft ODBC driver.
+
+ * [165923] Improved error handling.
+
+- SQLite driver
+ * [174340] Bind QVariant::UInt as int64 instead of string.
+
+- PostgreSQL driver
+ * [152770] Support prepared queries natively for PostgreSQL 8.2.
+
+ * [164233] Fixed bug where QSqlDatabase::primaryIndex() would fail if the
+ table name was used in multiple schemas.
+
+ * [168934] Make a real error message available when failing to connect to a
+ database.
+
+ * [150373] Added support for NumericalPrecisionPolicy, allowing the user to
+ instruct the driver not to return NUMERICs as strings.
+
+- DB2 driver
+ * [189727] Fixed bug where fetching the fields in a row multiple time would
+ fail unless the fields were fetched in order.
+
+
+****************************************************************************
+* QTestLib *
+****************************************************************************
+* The display is now enabled on Mac OS X just before a test in run and qtestlib will ensure
+ the application under test is the "front process" if it is a GUI application.
+
+****************************************************************************
+* QDBus *
+****************************************************************************
+
+- Library
+ * [195515] Fixed a bug where the Qt application would crash if it
+ tried to send some types of messages after the connection to the
+ bus was broken.
+ * [188728] Fixed a freeze caused by connecting to a slot that did
+ not exist
+
+- Viewer
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+MIPS Linux
+ * [188320] Build Qt/X11 with FPU support, breaking binary
+ compatibility; see "Important Behavior Changes" below.
+
+X11
+---
+ * Improved GNOME platform detection.
+ * [193845] Improved support for KDE palette settings.
+ * [179200] Fixed an issue where Qt would print "QProcess: Destroyed
+ while process is still running." when using Cleanlooks.
+ * [155704] Fixed a bug where widgets with MSWindowsFixedSizeDialogHint
+ flag would be minimized when their parent QMainWindow was minimized.
+ The MSWindowsFixedSizeDialogHint is now ignored on X11.
+ * [153155] Make it possible to bypass g_thread_init() and have the
+ Unix event dispatcher be used in threads instead by setting the
+ QT_NO_THREADED_GLIB environment variable.
+ * [157807] Fix an inefficiency in the Glib dispatcher's
+ timerSourcePrepare() implementation.
+ * [158332] Fix a bug where text/uri-list drops from Qt 3 would
+ append a single, empty url to the uri-list.
+ * [166097] QWidget::show() no longer resets the WM_TRANSIENT_FOR
+ property if the Qt::WA_X11BybassTransientForHint attribute is
+ set.
+ * [166097] QWidget::show() no longer resets the _NET_WM_STATE
+ property. Qt now merges its own state with any previous state
+ set by the application programmer.
+ * [168285] Fixed QDrag to correctly reset the override cursor.
+ * [17566] Don't impose FD_SETSIZE limit when using the Glib event
+ dispatcher.
+ * [171513] Fixed a bug where an application would take up 100% CPU
+ after starting a QDrag.
+ * [184482] Fixed QApplication::setOverrideCursor() to not change
+ the cursor for the root window.
+ * [185048] Fixed a bug where calling QClipboard::set*()
+ immediately after QClipboard::clear() would result in the
+ clipboard staying cleared.
+ * [182840] Fixed a bug where QApplication::mouseButtons() would
+ sometimes report the wrong state.
+ * [173328] Fixed QEventLoop::exec(ExcludeUserInputEvents) to not
+ consume 100% when using the Glib event dispatcher.
+ * [179536] Make QEventLoop::X11ExcludeTimers work as expected with
+ the Glib event dispatcher.
+ * [182913] Qt will now always look for the _MOTIF_DRAG_WINDOW
+ property on screen 0 (instead of the default screen).
+ * [187752] Fixed a bug where calling show() and hide() on a window
+ before the event loop starts would prevent the window from ever
+ being shown.
+ * [189045] Reset the keyboard and mouse grabs to the current
+ grabber when the last popup is closed.
+ * [167707] Add support for all known _NET_WM_WINDOW_TYPE_* types
+ via QWidget::setAttribute(). The attributes follow the
+ Qt::WA_X11NetWmWindowType* naming scheme.
+ * [172623] Don't create a pipe in the Glib event dispatcher (as it
+ is not necessary).
+ * [192871] Fixed a regression found in the 4.4.0 snapshots that
+ broke QX11EmbedContainer.
+ * [192526] Similar to 170768 below, fixed the spin locking in the
+ QAtomic* implementation for 32-bit SPARC processors to yield
+ instead of busy waiting.
+ * [194566] Fixed a bug found in the 4.4.0 snapshots that would
+ always cause the cursor to change when QWidget::setCursor() was
+ called on a widget that was not under the mouse.
+ * [173746] Fixed a bug in QDialog that would cause the "What's
+ This?" popup menu to appear on the wrong X11 screen.
+ * [187965] Fixed a bug where moving a widget that is hidden could
+ cause the positioning to be incorrect.
+ * [160206] Fixed some bugs in QX11EmbedWidget and
+ QX11EmbedContainer to provide minimal support for multiple
+ containers and multiple embedded widgets in the same
+ application.
+ * [182898] Fixed a crash in Motif Drag-and-Drop support when the
+ _MOTIF_DRAG_WINDOW property is missing.
+ * [183477] Fixed a bug that would cause a window to disappear
+ after restoring it with QWidget::restoreGeometry().
+ * [163507] Fixed a couple of memory errors reported by valgrind.
+ * [192654] Fixed drag-and-drop of more than one URL (using the
+ text/uri-list mime type) between applications.
+ * [198709] Fix QDesktopWidget to not report overlapping screens on
+ servers with Xrandr 1.2.
+ * [146336] On UNIX systems without CUPS support, the
+ $HOME/.printers is now checked for a default printer.
+ * [185864] Allow Qt to find the OpenSSL libraries dynamically even
+ if the libssl.so file is not present.
+ * [168283] Set WM_WINDOW_ROLE directly from QWidget's windowRole() property.
+ * [187660] Implemented rotation for tablets on non-Irix X11 platforms.
+ * [192818] Fixed drawing shapes with a textured brush that had an offset.
+ * [133291] Fixed slow line drawing when using dashing under X11.
+ * [183070] Make it possible to filter events for overlay widgets in OpenGL
+ under X11.
+ * [176485] Make drawing text through FreeType beyond the SHORT_MIN/MAX
+ coordinate range work. Note that this won't work for XLFD based fonts.
+ * [182264] Fixed a crash in QClipboard::setMimeData() when several
+ clipboards share the same QMimeData instance.
+ * [182264] Copying rich-text contents of a QTextEdit and pasting
+ them to an editor that accepts rich text didn't work.
+
+- QPrintDialog
+ * [128956] Fixed a bug which caused the print dialog to become hidden
+ while the overwrite dialog was shown.
+ * [192764] /etc/printcap with blank lines is now correctly parsed.
+ * Redesigned the print dialog and pagesetup dialog to be much nicer.
+
+- QPrinter
+ * [148125] Switched to printing through the CUPS API. This should fix the
+ problem where the wrong lp/lpr command was picked up, and therefore
+ printed through the wrong print system. If CUPS is enabled at compile
+ time, it will always be used if available.
+ * [161936] lp no longer outputs job ID to the console when printing.
+ * [180669] QPrinter no longer crashes if the CUPS library cannot be found.
+
+Windows
+-------
+ * [185702] Fixed qatomic_windows.h to properly forward declare the
+ _Interlocked*() functions to avoid conflicts with other headers
+ that also use these functions.
+ * [183547] Replaced scalar delete with array delete in windows socket engine.
+ * [190066] Fixed setting spinbox and combobox bgcolor with stylesheets on Vista.
+ * [197055] Fixed a stylesheet background issue with TextEdit on Vista.
+ * Black regions are no longer exposed when resizing windows on Vista using Aero.
+ * [172757] Respect system font changes on Windows.
+ * [194803] Pass the keyboard modifiers in QTabletEvent on Windows.
+ * [194089] Avoid adding the current screen point when translating tablet events on Windows.
+ * [187712] Fixed QT_WA() macros to use correct windows version in static builds.
+ * [183975] Handle 'Win+M' key while showing modal dialogs.
+ * [187729] Fixed incorrect focus behavior when main-window is shown minimized.
+ * [187900] Increased area for scrolbar thumb dragging.
+ * [180416] Fixed incorrect command line parsing on windows.
+ * [169703] Fixed Drag & Drop returning Invalid data.
+ * [181816] Fixed drawing ClearType text into a QImage with the Format_ARGB32 format.
+ * [123455] Make QWidget::numColors() return something useful for widgets that's not
+ been shown yet.
+
+- QApplication
+ * [167897] Fixed a bug where QApplication would treat single quotes
+ as a quote to signify the end of an argument.
+
+- QFileDialog
+ * [173402] Fixed wrong sort order if cou reopen a file dialog.
+ * [178279] Be more smart for enabling or disabling the open button.
+ * [178897] Fixed QFileDialog minimym size while very long path are in the history.
+ * [181912] Not following folders that are symlinks.
+ * [187959] Change the button caption from "save" to "open" when selecting a folder
+ in a save dialog.
+ * [196062] HANDLEs are now freed when searching the paths.
+ * [198049] Selecting a file in the completer would display the full path rather then just the file name if it was in the current directory.
+
+- QDesktopServices
+ * [194046] Fixed support for percentage encoded URL strings with openUrl().
+ * [172914] Fixed an issue where openUrl() would incorrectly return true
+ after failing to open on Windows.
+
+- QFileSystemWatcher
+ * [170021] Make it possible to monitor FAT32 directories.
+
+- QFont
+ * Use Harfbuzz instead of Uniscribe for complex text shaping enabling support of a broader
+ range of writing systems on all Windows versions.
+
+- QKeySequence
+ * [187917] Fixed incorrect standard shortcut for PreviousChild.
+
+- QListView
+ * [183299] More native appearance on list view selection backgrounds.
+
+- QLocale
+ * [139582] An unrecognized LANG environment variable will now make QLocale
+ fall back to the Windows locale, instead of the C locale.
+
+- QMenu
+ * [140954] Fixed an issue where pressing the Alt-key would not correctly
+ show and hide menu accelerators.
+
+- QMutex
+ * [179050] Fixed a bug that cause a warning on startup from QMutex
+ running an application build with MinGW on Windows 9x.
+
+- QPrintDialog
+ * [183448] Fixed a bug where the print-to-file setting would remain stuck
+ even after disabling it in the dialog.
+
+- QPrinter
+ * [185751] Fixed a crash in QPrinter if QPainter.begin() failed.
+ * [191316] Fixed a crash when using certain nonstandard printer drivers.
+
+- QScriptEngine
+ * [182241] Fixed a bug that caused qScriptValueFromQMetaObject() to generate
+ the wrong script constructor function with VC6.
+
+- QSyntaxHighlighter
+ * Added QSyntaxHighlighter::currentBlock().
+
+- QSystemTrayIcon
+ * [189196] Fixed showMessage timeout interval being ignored on windows.
+
+- QTimer
+ * [179238] Make QTimer behavior consistent with UNIX by not
+ allowing them to fire recursively.
+ * [188820] Fixed a bug found in the 4.4.0 snapshots that caused
+ menu effects to "freeze."
+
+- QWizard
+ * [180397] Fixed crash resulting from AeroStyle being assumed even when some of the required
+ symbols were unresolved.
+
+- ActiveQt
+ * [198021] Optimized QAxHostWidget::paintEvent(), the painting code is required only when the
+ widget is being grabbed.
+ * [191314] Support browsing of ActiveQt controls in Microsoft Visual Studio.
+ * [190584] Support for large strings in code generated by dumpcpp.
+ * [190538] Fixed incomplete function declarations generated by dumpcpp.
+ * [90634] Support for 2D safe arrays.
+ * [158785] Support for ActiveX control initialization using stored data.
+
+Mac OS X
+--------
+ * [168290] Input Methods can now be used on windows of type Qt::Popup.
+ * [195099] Fixed a problem with posted an event to quit in one thread to
+ another thread would not quit the other threads loop.
+ * [193047] Extend support for all the function keys on a standard Apple keyboard.
+ * [193096] QtUiTools_debug.a is now included in the debuglibraries binary package.
+ * [141602] pixeltool is also included in the binary package.
+ * [188580] Respect the LSUIElements key in an application's Info.plist.
+ * [188267] Ensure that qAppName() checks CFBundleName before using the executable name.
+ * [183464] Fix "wrong clippboard content" issue.
+ * [189587] Prevent triggering menu shortcuts when showing native dialogs.
+ * [174769] Add separator above the "Preferences" menu item in the application menu.
+ * Some fixes to color space handling to ensure that the display color space is used when
+ drawing items to the screen (and printer). This works even if the display has a non-standard colorspace.
+ * Apply a fix so that programs using the sqlite plugin and built on Mac OS X 10.5 will run on older versions of Mac OS X.
+
+- QAction
+ * [196332] Make actions with ApplicationSpecificRole get merged in all cases.
+
+- QApplication
+ * [180466] Ensure that non Qt Windows get an activate.
+ * [171181] QApplication no longer send key events to disabled widgets.
+
+- QContextMenuEvent
+ * [161940] Implement support for QContextMenuEvent::modifiers()
+
+- QImage
+ * [182655] Switch off antialiasing when drawng to 1bpp images on Mac
+
+- QMainWindow
+ * [171931] Fix crash when calling addToolBar while the user is dragging toolbars.
+ * [191544] Fix unified toolbar size constraint issues.
+
+- QMime
+ Implement text/html for cutting and pasting.
+
+- QPixmap
+ * QPixmap no longer breaks CGImageRef's immutability.
+
+- QPushButton
+ * [183084] QPushButton will no longer change appearance between mini, small, and large
+ according to the size of it's contents. This behaviour can be switched on by using
+ WA_MacVariableSize.
+ * [172108] Unset the mnemonic if setText() is called with no &.
+
+- QPrinter
+ * [189182, 194085] Querying printer properties on Mac now works after QPainter::end().
+
+- QSettings
+ * Fixed QSettings::sync() spurious error on Mac OS X 10.5.
+ * Improved the Mac .plist serialization so that it doesn't generate
+ needless one-element CFArrays.
+
+- QTextCodec
+ * Fixed "System" locale codec on little-endian Mac OS X (Intel).
+
+- QTextEdit
+ * [176378] Make selections be shown full-width.
+ * [182243] Fix a regression where text editing widgets would insert command-keys that weren't shortcuts.
+
+- QWidget
+ * [197087] Make masks work correctly for splashscreens and popups on Leopard.
+ * [167974] Fix offset issue when seMask() was used in combinatiojn with Qt::FramelessWindowHint.
+ * [192527] Fix a regression where Cmd+MouseButton on a window icon no longer sent a QIconDragEvent.
+ * [179073] WA_MacMiniSize and MA_MacSmallSize have an effect on the default fonts for a widget.
+ * [175199] Ensure sheets that later become normal windows have the correct opacity.
+ * [139002] Ensure macEvent() is called.
+
+- QCoreGraphicsPaintEngine
+ * Implement Porter-Duff operations.
+
+- QPageSetupDialog
+- QPrintDialog
+ * Make both these dialogs sheets if they are given a parent.
+
+- Q3ComboBox
+ * Make up/down arrows work when the popup is closed.
+
+
+Qt for Embedded Linux
+---------------------
+
+ - Screen drivers
+ * LinuxFB: Improved support for BGR framebuffers
+ * LinuxFB: Added 12, 15, 18 and 24 bit pixel depth detection.
+ * AHI: New driver using the ATI Handheld Interface library.
+ * DirectFB: New driver using the DirectFB library.
+ * SVGAlib: Add support for 4 and 8 bit mode.
+ * SVGAlib: Fixed the background color for 16 bit mode.
+ * Transformed: Fix bug preventing driver to load as a plugin
+ * VNC: Added support for the client cursor pseudo encoding.
+ * Added QProxyScreen, a class for simplifying proxy based screen drivers.
+ Currently used by the VNC and Transformed screen driver.
+ * Added framework for letting the screen driver control the QPixmap
+ implementation.
+ * [194139] Fixed background initialization in a multiscreen environment.
+ * [195661] Fixed disappearing mouse cursor in a multiscreen environment.
+
+ - Mouse drivers
+ * Made the Yopy, VR41xx, PC, LinuxTP, and Bus drivers available as plugins.
+ * [194413] Fixed missing newline when writing the calibration file.
+ * Configurable double-click jitter sensitivity through the
+ QWS_DBLCLICK_DISTANCE environment variable.
+
+ - Keyboard drivers
+ * Made the SL5000, USB, VR41xx and Yopy drivers available as plugins.
+
+ - Decoration drivers
+ * Made the Styled, Windows and Default decorations avaiable as plugins
+
+ - Demo applications
+ * Added embeddedsvgviewer, styledemo & fluidlauncher applications to
+ demos/embedded to demonstrate Qt/Embedded on small screens (QVGA/VGA).
+ Fluidlauncher is used to launch the demos.
+ * Modified the existing pathstroke & deform demos to add a -small-screen
+ command line option to optimize layout for small screens (QVGA/VGA).
+
+ - Windowing system
+ * Removed redundant blits to the screen.
+ * Fixed a bug in QWSWindowSurface preventing the Opaque property to be used.
+ * Fixed a bug making the window surface valid when the
+ windowEvent(QWSServer::Hide) signal is emitted.
+ * Fixed a crash when no mouse driver is installed.
+ * Fixed bug where QWSWindow::name() would be incorrect unless
+ setWindowTitle() was called.
+ * Allow normal windows to be raised above full screen windows.
+ * [179884] Fixed bug when calling showMaximized() on a FramelessWindowHint
+ window.
+ * Fixed bug where children of a StaysOnTop window would be shown below the
+ parent.
+ * Fixed painting bug when configuring with -opengl and resizing/showing
+ child widget of visible window.
+
+ - QDirectPainter
+ * [100114] Implemented lock() and unlock().
+ * default parameter bug fixed for startPainting(); see "Important Behavior Changes" below.
+
+ - QScreen
+ * Added classId() to enable safe casting to specific subclasses.
+
+ - QPixmap
+ * Fixed grabWindow() on 12, 15, 18 and 24 bit screens.
+ * Fixed grabWindow() on BGR framebuffers.
+ * Fixed grabWindow() on rotated screens.
+
+ - QVFb
+ * Fixed 12-bit support.
+ * Added 15-bit support.
+ * Added support for 32-bit ARGB
+ * [127623] Tab key presses are now passed to the embedded application.
+
+ - General fixes
+ * [181906] Fixed case insensitive key comparisions in the keyboard, mouse
+ and screen plugin factory.
+ * [170768] For ARM processors, fixed the spin lock protecting the
+ * QAtomic* implementations to yield instead busy waiting.
+ * Reduced number of double precision floating point operations as an
+ optimization for platforms without a floating point processor.
+ * Reduced memory usage in the backing store.
+ * [177057] Fixed use of the modifier window title tag.
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+- ICC
+ * [169196] Use -fpic instead of deprecated -KPIC option.
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+ * Make it possible to use QT+=dbus and QT+=testlib to enable
+ compiling against the QtDBus and QtTestLib libraries.
+
+- Assistant
+ * Renamed the existing Assistant to Assistant_adp and adjusted the QtAssistantClient library accordingly.
+
+ * Added the new Assistant based on the Qt Help module.
+
+ * Introduced qhelpconverter to convert adp or dcf files to the new file formats.
+
+ * Added the qhelpgenerator tool to create qch documentation files.
+
+ * Introduced qcollectiongenerator to create help collections.
+
+- Designer
+ * [191493] Fixed issues with small widgets in grid layouts on Mac
+
+ * [177564] Fixed autoFillBackground being reverted when setting a stylesheet on a QLabel.
+
+ * [171900] Made Qt3Support functions visually different (signals and slots, widget icons)
+
+ * [182037] Fixed a bug which made it possible to resize QFrame-based containers to arbitrarily small sizes
+
+ * [176678] Made "Current Widget Help" work
+
+ * [193885] Fixed a crash caused by a widget box widget not having a geometry nor a valid sizeHint.
+
+ * [122185] Added support for QMdiArea, QWorkspace
+
+ * [173873] Made pasted widgets appear at mouse position
+
+ * [191789] Added QtDesigner.pc for pkg-config
+
+ * [157152] Added a context menu to the buddy editor
+
+ * [189739] Fixed a crash caused by internal layouts of custom widget plugins
+
+ * [133687] Fixed QDesignerContainerExtension; provided way to specify a method to add pages in domXML
+
+ * [161643] Changed rich text editor to detect plain text and store it as such
+
+ * [183110] Added a dialog for setting the tab order by sorting the list of widgets
+
+ * [188548] Added support for static custom widget plugins to QUiLoader
+
+ * [157164] Made QStackedWidget context menu available on browse buttons
+
+ * [157217] Fixed default size of spacers
+
+ * [182448] Fixed a bug that caused additional spacing between toolbar's last action and consecutive toolbar
+
+ * [84089] Added containers and custom containers to the "New Form" dialog
+
+ * [165443] Grey out the geometry property in Designer when it has no functionality
+
+ * [119506] Made comments available for shortcut properties
+
+ * [161480] Added detailed view to action editor
+
+ * [175146] Improved the signal/slot editor; do not reset the column sizes when switching forms
+
+ * [176121] Added "Save As" to code preview
+
+ * [176122] Added code preview
+
+ * [79138] Added support for QLayout::sizeConstraint
+
+ * [156718] Made it possible to copy actions between forms
+
+ * [168648] Improved object inspector selection
+
+ * [166406] Fixed a selection bug affecting custom subclasses of QTabBar
+
+ * [151323] Made it possible to use subclasses of QTabWidget, QToolBox or QStackedWidget as custom widgets
+
+ * [168564] Fixed a bug in table widget editor
+
+ * [132874] Added support for user-defined signals and slots of promoted widgets and main container
+
+ * [202256] Made header section size of the action editor persist when switching forms
+
+ * [201505] Extended the QDesignerIntegration::objectNameChanged() signal to carry the previous object name
+
+ * [196304] Exclude C++ and java keywords as names for objects
+
+ * [199838] Breaking layout didn't update properly minimumSize of a form
+
+ * [118874] Added spacing property for the QToolBox
+
+ * [120274] Q3Wizard - "currentPageText" property added, "caption" properly converted to "windowTitle"
+
+ * [181567] Added support for loading and saving items for Q3ListBox and Q3ListView
+
+ * [187593] Fixed issue with dynamic properties
+
+ * [107935] Actions provided by task menu extension are appended to the list of actions of superclass
+
+ * [188823] Compress margin/spacing properties in case all values are the same, for legacy reasons
+
+ * [160635] Make Z-order working properly
+
+ * [171900] Signals and slots from compat layer marked with red italic
+
+ * [177398] Added notr="true" attribite to styleSheet property - in this way styleSheet string will not appear in linguist
+
+ * [180367] Greyed out X and Y properties of geometry in case of main container
+
+ * [118393] Collapsing property groups in property editor allowed
+
+ * [190703] Fixed in-place editor behaviour
+
+ * [154745] Guidelines provided for grid layout
+
+ * [173516] New resource system integrated
+
+ * [142477] Improved rich text editor and added HTML editing
+
+ * Gradient editor added to stylesheet editor
+
+ * Resetting font and palette subproperties handled properly
+
+ * uint, qlonglong, qulonglong and QByteArray properties supported
+
+ * Property Browser Solution integrated
+
+ * Property Editor - added toolbar with object and class name, and some actions
+
+ * Property Editor - remember expansion state
+
+ * Property Editor - style sheet editor added
+
+ * Property Editor - sorting and coloring added
+
+ * Added basic fixup for URL properties to prevent data loss when the
+ user enters an intermediate URL (such as www.google.com).
+
+- Linguist
+ * [39078] Added shortcut for adding an entry to a phrase book.
+
+ * [116913] Added tooltips to messages view and phrases view to be able to see the full text as well as to see a preview of HTML rendering.
+
+ * [142628] Fix a "What's this?" message in Linguist.
+
+ * [170053], [183645] Split the context / items tree up into a contexts window and a messages window.
+
+ * [171829] Added support for syntax highlighting in source/translation strings.
+
+ * [179415] When previewing a dialog via Qt Linguist that has the window
+ modality set to ApplicationModal do not block linguist.
+
+ * [181411] Make xliff utf-8 export use non-ascii characters, too.
+
+ * [183713] Identify the line number in the code for strings.
+
+ * [184586] Added ability to show multiple auxiliary (read-only) translations.
+
+ * [194325] Fixed an error with loading XLIFF files containing consecutive internal whitespace.
+
+ * Added a source code window. It shows the source file when available and highlights the line on which the source text was found.
+
+ * Added a window for showing warnings.
+
+ * Allow a translation to be marked as done when there are still warnings.
+
+ * Fixed undo/redo functionality.
+
+ * Show obsolete entries in grey.
+
+ * Ask whether modified phrase books should be saved on quit.
+
+ * Re-open phrasebooks at startup.
+
+- lupdate
+ * [80235] Introduce QT_TRANSLATE_NOOP3 as a QT_TRANSLATE_NOOP3 variant
+ taking a comments parameter.
+
+ * [161106] When specifying ::QObject::tr() lupdate will no more take
+ the previous word as namespace.
+
+ * [165460] Make lupdate work with relative paths.
+
+ * [165679] Prevent lupdate from crashing on special string patterns.
+
+ * [179506] Handle the case of a class in a namespace inheriting from
+ another class in a different namespace correctly.
+
+ * [180318] Make lupdate work properly on deeply nested directories.
+
+ * Added an option (-pluralonly) that will only extract strings which
+ require a plural form, to ease adding plural translations for the same
+ language as the source messages.
+
+ * Do not require administrative privileges to run lupdate on Windows Vista.
+
+- lrelease
+ * [187375] Allow lrelease to be run from a directory outside the .pro file.
+
+ * Added an option (-removeidentical) that omits translated strings that
+ are exactly the same as the source string, to reduce file size.
+
+- rcc
+ * [105595] Add QT_NO_CAST_TO_ASCII define to tools by default.
+
+ * [188891] Fix crash when QResource is loaded from stream that was
+ rcc'd from an empty qrc file.
+ * [164840] Allow use of chinese characters in commandline arguments to rcc.
+
+- moc
+ * Treat -DFOO as -DFOO=1 for macros defined on the commandline.
+
+- uic
+ * [189327] Added support for QT_NO_ACCESSIBILITY
+
+ * [170919] Fixed a bug that caused nonsensical includes to appear in
+ conjunction with Qt support classes
+
+ * [171228] Fixed a bug that caused nonsensical includes to appear in
+ conjunction with Qt support classes
+
+ * [105595] Add QT_NO_CAST_TO_ASCII define to tools by default.
+
+ * [186989, 158836] Fixed invalid code generation in some cases when
+ cross-compiling.
+
+- uic3
+ * [179540] Added support for QPushButton's "on"-property
+
+ * [170919] Fixed a bug regarding includes for classes in namespaces
+
+ * [299175] Transform Qt3's QSlider property tickmarks to Qt4's
+ tickPosition
+
+- qmake
+ * [187938] Fix a bug that would cause Xcode projects generated by qmake to fail to link in Xcode 3.
+ * The pkgconfig files generated for the frameworks on Mac OS X are now correct.
+ * Makefiles for Mac OS X now always set QMAKE_MACOSX_DEPLOYMENT_TARGET=10.3
+ unless it is overridden in the .pro file, this will solves linking errors
+ on Leopard.
+ * [189409] The default Xcode generator format is now Xcode 2.2.
+ * Added an unsupported mkspec for LLVM on Mac OS X.
+ * [198562, 201942] Added support for overriding bundle extentions for Mac
+ * [152932] Specify the /MANIFEST option when embedding manifests into the application/library.
+ * Avoid adding silencing echos to the compiler when generating XCode projects.
+ * [191267] Only include the -L$$QT_PLUGINPATH option once in a project.
+ * Avoid memmoving data from outside a memory block.
+ * Generate proper MSVC 2008 VCPROJ and SLN files.
+ * [168308] Avoid double dir separators in subdir Makefiles.
+ * [168075] Make distcc work on Mac.
+
+- configure
+
+ * [180315] Implement -qtlibinfix configure option to allow renaming of Qt
+ libraries.
+ * [180315] Implement -qtnamespace configure option to allow compiling all
+ Qt symbols in a user-defined namespace.
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+- QTiffPlugin
+ * [187169] Return an error if loading fails instead of empty image.
+
+- QSvgIconEngine
+ The qsvg icon engine plugin has been renamed to qsvgicon to disambiguate
+ it from the qsvg image format plugin.
+ * Now allows multiple SVG files and/or other images to be added to
+ QIcon for different modes.
+ * Streaming of SVG icons is fixed.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+- Event filters
+
+ The behavior of event filters has changed starting with
+ 4.4. Previously, thread affinity was ignored when adding,
+ removing, and activating an object's event filters. Now, event
+ filters must have the same thread affinity as the object they
+ are filtering. Qt will warn when it detects a filter that is
+ in a different thread from the object being filtered.
+
+- QFont
+ Starting with Qt 4.4, the '-' characters in the raw font names
+ are no longer substituted with a ' ' (space character). This
+ may impact your application if you use fonts that have '-'
+ characters in their raw font names.
+
+- QReadWriteLock
+ Starting with Qt 4.4, recursive lock support is disabled by
+ default in QReadWriteLock. Code that relies on recursive write
+ locking will need to be changed to construct the
+ QReadWriteLock with recursive lock support enabled. Previously,
+ recursive write-lock support (introduced in 4.3) was enabled by
+ default, but QReadWriteLock did not properly support recursive
+ read-lock support. QReadWriteLock now supports both and needs to
+ be constructed explicitly with recurive lock support enabled
+ (QMutex works in the same way).
+
+- QPainterPath
+ We have changed QPainterPath::angleAtPercent() to use the same
+ angle definition as in the rest of Qt. This means that the angle
+ returned will be from 0 to but not including 360, specifying
+ the degrees from the 3 o'clock position in the counter-clockwise
+ direction.
+
+- QDirectPainter [Qt for Embedded Linux-specific class]
+ startPainting() in Qt 4.3 had a default parameter lock=false,
+ the value of which was not used. The function would lock for
+ client processes, but not for the server process. From Qt 4.4,
+ the default value is changed to true, and startPainting() will
+ lock if lock == true, and not lock if lock == false. This means
+ that client processes running code that has not been recompiled
+ with Qt 4.4 may show flicker and/or painting problems. To get
+ exactly the same behaviour as for Qt 4.3, change startPainting()
+ to startPainting(QApplication::type() == QApplication::GuiClient).
+
+- QPrinter
+ QPrinter::pageRect() did not return consistent values on
+ Linux/Mac/Windows when QPrinter::fullPage() was set to true. On
+ Mac and Windows pageRect() was not influenced by the fullPage()
+ setting. This has now been changed so that pageRect() returns
+ the same as paperRect() when fullPage() is true on all
+ platforms.
+
+- QPixmap
+ Using QPixmap outside of the GUI thread is dangerous and error
+ prone. Because of this, starting with 4.4, any QPixmap created
+ outside of the GUI thread will always be a null pixmap.
+
+- QDateTime
+ When using QDateTime::fromString() to parse dates, QDateTime
+ no longer tries to use English month names because that would
+ cause some dates to become unparseable. If you need to parse
+ date times in the English locale, use QLocale::toDateTime (in
+ specific, the QLocale::c() locale).
+
+- Qt/Mac
+ Starting a Qt application no longer makes it the front process. This is
+ more in-line with other applications on Mac OS X. What this means is
+ that you can start a Qt application, do something else and not have the
+ Qt application steal your focus. If you desire for the Qt application
+ to become the front process, you can call QWidget::raise()
+ programmatically or launch the application with open(1) or using
+ QDesktopServices. This should not have any affect if launched from
+ double-clicking in Finder or run in a debugger.
+
+- Qt/X11 on MIPS Linux
+ qreal is changed from float to double, breaking binary compatibility.
+ This change fixes a bug introduced in Qt 4.3.0 when qreal was
+ changed from double to float for embedded MIPS processors.
diff --git a/dist/changes-4.4.1 b/dist/changes-4.4.1
new file mode 100644
index 0000000..4995a86
--- /dev/null
+++ b/dist/changes-4.4.1
@@ -0,0 +1,619 @@
+Qt 4.4.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.4.0.
+
+The Qt version 4.4 series is binary compatible with the 4.3.x series.
+The Qt for Embedded Linux version 4.4 series is binary compatible with
+the Qtopia Core 4.3.x series. Applications compiled for 4.0, 4.1, 4.2,
+and 4.3 will continue to run with 4.4.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.trolltech.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain
+more information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Documentation and Examples
+ * [202630] Fixed a problem in the network/http example: it couldn't
+ download anything if the URL had a space.
+
+Third party components
+----------------------
+
+- Updated Qt's libpng version to 1.2.29.
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+- QAbstractItemView
+ * [199822] Fixed issue with broken extended selections.
+
+- QButtonGroup
+ * [209485] Prevented a crash caused by removing a button from its button
+ group while inside a slot triggered by the button's clicked() signal.
+
+- QDirModel
+ * [213519] Fix crashes when drag'n'dropping files into a subdirectory
+
+- QFtp
+ * [189374] Fixed a bug that would cause QFtp to fail to parse
+ dates if the application was being run on some locales, like fr_FR.
+
+- QGraphicsProxyWidget
+ * [208773] Input methods now work properly for embedded widgets.
+ * [207644] Fixed a bug where the painter was restored incorrectly.
+
+- QGraphicsScene
+ * [209125] QGraphicsScene::style() and QGraphicsWidget::style() fixes.
+ * [202774] [207076] Focus and activation fixes for embedded widgets.
+ * [212950] The scene no longer removes focus from the focus item if a
+ mouse press propagates to the scene (and then to the view). This was
+ a behavior regression to QWidget.
+
+- QString
+ * [205093] Printing QString after using replace()followed by truncate(-1) crashes
+ * [209078] Problem in QString::resize
+
+- QGraphicsView
+ * [209154] Mouse replay regressions since 4.3 have been fixed.
+
+- QObject
+ * Fixed a regression from 4.3 to 4.4 in QObject::receivers() where
+ the function would return >0 even after disconnection all
+ signals.
+
+- QScriptEngine
+ * [208489] Made the instanceof operator work when used with
+ QMetaObject wrappers created by newQMetaObject().
+ * [206188] Fixed a bug that caused scripts to hang when using
+ "continue;" inside a switch-case block.
+ * [205473] Fixed a bug that caused slots to be called even when
+ argument conversion failed.
+
+- QSslSocket
+ * [212177] QSslSocket::peerVerifyError() supports all errors now.
+ * [212022] Fixed a bug that would cause no default CA certificates
+ to be present in static Qt builds.
+ * [212412] Fixed a bug that could cause a deadlock in
+ waitForReadyRead() in encrypted mode.
+
+- QtWebKit
+ * Ensured that relative URLs are converted to absolute URLs.
+ * Ensured that the cursor is changed into a resize cursor when hovering
+ over and dragging the resizeable frame borders.
+ * [206999] Fixed a problem which would make an empty URL being passed to
+ QWebPluginFactory::create()
+ * [208215] Fixed a bug that prevents linkClicked signal to be emitted
+ when opening a local HTML file.
+ * [208342] Ensured that the cursor is updated after a web frame or page
+ has finished loading.
+ * [210920] Fixed showing/hiding of the Web Inspector.
+ * [207050] Fixed input of characters into form elements using AltGr on Windows.
+ * Fixed a crash related to XML HTTP requests.
+ * Fixed QWebPage::acceptNavigationRequest not being called when opening new Windows.
+ * Fixed emission of linkClicked() signal when clicking on target=_blank links.
+ * Fixed painting artifacts when scrolling embedded widgets.
+ * Fixed logic errors in QWebHitTestResult::isNull() and QWebHistory::forward().
+ * Fixed encoding of [ and ] in the host part of URLs
+ * Fixed a crash related to QWebPage::unsupportedContent.
+ * Fixed a memory leak on application shutdown.
+ * Fixed painting errors when scrolling embedded widgets.
+ * Fixed support for custom cursors set on a QWebView.
+ * Fixed various build problems on Mac OS X, Windows and Solaris
+ * Fixed crash with CSS text transformations.
+ * Fixed infinite recursion when converting DOM objects with cyclic references to QVariants.
+
+- QVariant
+ * [201918] QVariant convert to QDateTime warnings
+
+- QWidget
+ * Fixed a regression when setting masks for splashscreens on Mac OS X Tiger.
+ * [210544] Fixed a regression where Qt::WA_PaintOnScreen widgets were painted on
+ top of overlapping siblings.
+ * [211796] Fixed a crash occurring when calling render() from a resize event.
+ * [210960] Fixed a regression where an invisible top-level widget was resized when calling render().
+ * [210822] Fixed a bug causing QGLWidgets to not behave correctly when setting window title.
+ * [208413] Fixed issues when creating a child widget of Qt::WA_PaintOnScreen widgets.
+
+- QWidgetAction
+ * [207433] Fix enabling and disabling toolbar containings actions widget.
+
+- QWorkspace
+ * [206368] Fixed a crash occurring when deleting a QWorkspaceChild.
+
+- QPainter
+ * [186327] Fixed inconsistent outline and fill drawing for drawPolygon in
+ raster paint engine, where the fill would be visible outside the outlines
+ or there would be missing pixels between outline and fill.
+ * [208530] Fixed some drawing issues with projective transform related to
+ near-plane clipping.
+ * [209095] Fixed infinite loop that could occur on certain architectures on
+ rare occasions when drawing outlines.
+ * [208090] Fixed issue with outline drawing where subsequent points on a
+ path or polygon are equal according to qFuzzyCompare, but treated as
+ different, causing stroke artifacts.
+ * [206785] Fixed potential pixmap drawing artifacts when drawing stretched
+ pixmaps at non-integer coordinates.
+ * Fixed potential rect/line drawing issue when drawing on non-integer
+ offsets in raster paint engine.
+ * [209462] Fixed regression when redirecting widgets to another paint device.
+
+- QPainterPath
+ * [209056] Fixes potential assert in the boolean operations (difference,
+ intersect, and union).
+
+- QRasterPaintEngine
+ * [208644] Fixed a crash in qt_intersect_spans.
+
+- QApplication
+ * [213116] Fixd a regression on Mac OS X where you could not access the
+ menu bar after minimizing a window with no click through.
+
+- QColor
+ * [193671] Fixed a problem with QColor::setNamedColor() not returning the correct
+ alpha value for the "transparent" color.
+
+- QMacStyle
+ * [212037] Adjusted the size of text in an editable combo box on Mac OS X Panther.
+ * [216905] Fix a regression when drawing table headers on Mac OS X Panther.
+
+- QMainWindow
+ * [210216] Calling setCentralWidget, setMenuBar, setMenuWidget or setStatusBar
+ several times could cause a crash.
+ * [206870] Fixed a bug causing dual screen layouts to not restore correctly.
+
+- QMdiArea
+ * [202657] Fixed focus issue when navigating between window with focus on the DockWidget
+ * [211302] Fixed a bug where the activation order was not respected when tiling and cascading.
+
+- QOpengGLPaintEngine
+ * [208419] Fixed wrong clipping of widgets.
+
+- QDockWidget
+ * [179989] Maximum size is now taken into account by the dock widget.
+
+- QCommonStyle
+ * [204016] Fixed west tab positions.
+
+- QCryptographicHash
+ * [206712] Fixed a bug that would make QCryptographicHash return
+ invalid results if you called result() before the last addData()
+ call.
+
+- QTcpSocket
+ * [208948] Fixed a bug that would cause QTcpSocket and QSslSocket
+ not to flush all of their buffers if the socket disconnects and
+ reconnects.
+ * [182669/192445] Fixed a bug that would cause QTcpSocket to stop
+ emitting readyRead() if a previous waitForReadyRead() timed out.
+
+- QDataStream
+ * [211301] Fixed an issue where Qt 2 and Qt 3 applications might
+ crash or hang when run under KDE 4.
+
+- QDateTime
+ * [137698] Fixed a bug that caused QDateTime to perform weird
+ 1-hour jumps when dealing with dates in Daylight Savings Time.
+
+- QSslCertificate
+ * [185067/186087] Fixed a bug that would cause QSslCertificate
+ parsing of certificate timestamps to be off by a few hours
+ (timezone issue).
+
+- QFile
+ * [192752] Fixed a bug that would make QFile leak file descriptors
+ if QFile::handle() was called.
+
+- QFileDialog
+ * [208383] Crash when a proxy model is set and multiple files are selected.
+ * [165503] DirectoryEntered not emitted when go-to-parent button is clicked.
+
+- QFileInfo
+ * [212291] Fixed a bug that would cause QFileInfo to return empty
+ group or owner names for files under MacOS X and maybe some other
+ Unix platforms.
+
+- QFuture
+ * [214874] Fixed possible deadlock when using nested calls to QtConcurrent::run().
+
+- QGLContext
+ * [210427] In 4.4.0 we removed the automatic mipmap generation for
+ textures bound with QGLContext::bindTexture(). This change has been
+ reverted for compatibility reasons.
+ * [214078] Fixed a problem that caused OpenGL textures to always be
+ downscaled to 64x64 in size on Intel graphics hardware. This caused,
+ among other things, the Qt Demo to look utterly broken on these systems.
+
+- QOpenGLPaintEngine
+ * [191777] Set default values for GL_PACK_*/GL_UNPACK_* values with
+ glPixelStore() when QPainter::begin() is called.
+ * [201167] Don't assume the GL error state is cleared when QPainter::begin()
+ is called. Clear the state explicitly before we make internal state checks.
+ * [204578] Fixed a problem where the GL error state was set on
+ some system because an extension enum was used unprotected.
+
+- QHostInfo
+ * [213187] Made QHostInfo not issue IPv6 name lookups if the
+ machine does not have any IPv6 addresses configured (Unix change
+ only).
+
+- QHttp
+ * [213220] Fixed a bug that could make QHttp open unencrypted
+ connections if HTTPS mode was requested but SSL support was not
+ present in Qt.
+ * [193738] Fixed a bug that would make QHttp continue reading the
+ HTTP server's response and emit a readyRead() signal even if
+ abort() had already been called.
+
+- QNetworkAccessManager
+ * When a http 302 location url is not an encoded url try QUrl's human readable parsing for more compatibility with websites.
+
+- QPainter
+ * [211403] Fixed handling of negative target rect offsets and negative
+ source offsets in QPainter::drawPixmap()/drawImage().
+
+- QPixmap
+ * [202903] Fix an infinite recursion in QPixmap::fromImage() that occured
+ when converting mono images.
+ * [206174] Reverse the order of the tests done in QPixmap::hasAlpha()
+ in order to speed it up.
+ * [210275] Fixed a crash in QPixmap::resize().
+
+- QSharedMemory
+ * Compile fix on QNX when QT_NO_SHAREDMEMORY was defined
+
+- QStyleSheetStyle
+ * [179629] Fixed SpinBox with gradient background.
+ * [188305] Respect the max-with property for more elements (such as QTabBar::tab)
+ * [189951] Fixed the align: property for QTabBar
+ * [194149] Fixed the background:transparent property
+ * [198926] Fixed the background:none property on some component of the scrollbar
+ * [206238] Fixed inconsistency with rules without selector applied to widget. They
+ now always applies to all childs
+ * [207420] Fixed the ~= attribute selector.
+ * [207819] Fixed few performences issues.
+ * [208001] Fixed crash crash with QMenu[title=...] in the stylesheet.
+
+- QHeaderView
+ * [207869] Fixed possible division by zero.
+
+- QTableView
+ * [207270] Painting errors in reverse mode and when there was spans.
+ * [210608] Fixed regression in the handling of spanning cells.
+
+- QTableWidget
+ * [213118] Fixed a bug where moving the first or the last row triggered an assert.
+
+- QTreeView
+ * [213737] Fixed regression where ctrl+a would select all items regardless of the selection mode.
+ * [202355] Fixed issue where items inserted in a view with all header sections hidden did not show
+ themselves properly later.
+ * [211296] When a column is hidden QItemSelectionModel::selectedRows and QItemSelectionModel::selectedColumns returns the wrong values.
+
+- QTreeWidget
+ * [305084] Fixed duplicate items that may appears when programaticaly
+ expanding items.
+ * [209590] itemSelectionChanged was being emited before item selection was updated
+
+- Q3DragObject
+ * [203288] Fixed regression against Qt 3 so that the drag() function now correctly uses
+ MoveAction (and not CopyAction) as the default action.
+
+- Q3TextBrowser
+ * [197836] Fix assert when zooming out.
+
+- QTextDocument
+ * [204965] Fix html export to use indent as textIndent
+
+- QTextBrowser
+ * [192803] Fix loading of files from resources with a resource prefix.
+
+- QTextEdit
+ * [211617] Fixed crash when moving the first paragraph by drag and Drop
+
+- QTextTable
+ * [194229] Fix removing of a row with merged cells causing a crash.
+ * [194253] Fix calling removeColumn on a Column with selectedCell causing an assert.
+ * Fix assert on selecting the whole table after an insert/remove of column.
+ * [175676] Fix calling of resize() making updates in layouting fail.
+
+- QSpinBox
+ * [213137] Fixed thousand-delimiters to not show for value = INT_MIN.
+
+- QScrollArea
+ * [210567] Fixed issues when scrolling a native widget.
+
+- QScrollBar
+ * [209492] Fixed a bug causing the scroll bar actions to be invoked twice.
+
+- QToolbBarLayout
+ * [207946] Prevented a crash caused by assuming that the parent widget always exists.
+
+- QThreadPool
+ * Fixed issues with thread termination during dll unloading on windows. QThreadPool::
+ waitForDone() now completely stops all threads, on all platforms. In addition, the
+ QCoreApplication destructor now calls waitForDone() to make sure all threads are
+ stopped before the Qt dlls are unloaded.
+
+- QNetworkReply
+ * [207283] Fixed support for HTTP 101 responses.
+ * Fixed parsing of cookies with special timezone specifiers.
+
+- QWebHistory
+ * Fixed a bug where calling forward() would go backwards and not forwards.
+
+- QFontMetrics
+ * [212485] Fixed boundingRect() returning the proper size when there is a tab.
+
+- QItemDelegate
+ * [206762] Fixed painting when using a QBrush() for the text.
+
+- QtXmlPatterns
+ * [207584] When using the same QXmlQuery for a new query then evaluateTo()
+ can return false even if the query is valid.
+ * [214180] Fixed fn:replace fails when inside function.
+ * Fixed crash when unary operator has empty sequence as operand.
+ * Fixed that axis preceding or descendant-or-self when combined with
+ function last() on a custom node model crashes.
+ * Fixed that xml:id is not whitespace normalized.
+ * Fixed that QXmlFormatter produces no output on single top-level text nodes.
+ * Fixed infinite loop triggered by fn:matches().
+ * Fixed crash when compiling one of the FunctX queries.
+
+- VideoPlayer
+ * [210170] Fixed an issue that prevented VideoPlayer::play to start when
+ called with an argument.
+
+- Accessibility
+ * [199241] Fix an issue where the screen reader would read the content of
+ a password line edit. The screen reader will now only read it if its Normal.
+
+- QLocalSocket
+ * [210886] Fixed a bug that would cause QLocalSocket to overrun
+ its buffers on very long socket names.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+ * [208354] Fixed a crash in Qt's XIM implementation when exiting
+ applications after using the skim input method.
+ * [207800] Fixed a regression from 4.3 to 4.4 where putting a
+ QX11EmbedContainer into a QWidgetStack would case the container
+ stay visible permanently.
+ * [207423] In QDesktopWidget, workaround a change in behavior in
+ newer X.Org X servers where Xinerama would always be used even
+ when using a multi-screen setup.
+ * [206139] Fixed a bug where Qt could incorrectly recurse into the
+ Xlib error handler (causing Xlib to assert).
+ * [207057] Fixed a regression from 4.3 to 4.4 where
+ QX11EmbedContainer would sometimes destroy the embedded client's
+ window.
+ * [209057] Fixed a Q3Process which triggered a "Do not delete
+ object" warning.
+ * QPrintDialog crashed on unix in some cases.
+ * [214103] Fixed a regression with string to double conversion
+ becoming locale-aware in QTextStream.
+ * [210922] Fix crash in input methods when toggling the InputMethodEnabled
+ attribute.
+ * [210831] Fixed a problem where preview pages in the QPrintPreviewDialog
+ would not appear or be drawn correctly on X servers without
+ Xrender support.
+ * [206165],[213457] Fixed bugs which show the wrong cursor on some widget.
+ * Fixed bug regarding the usage of encoded URLs in Phonon
+
+
+Windows
+-------
+
+ * [207888] Fixed a regression from 4.3 which caused crashes in
+ Assistant and Designer when an accessibility client is running
+ (this includes applications that query for accessibility
+ features, like Notepad++).
+ * Several fixes related to crashes and hangs when the user has an
+ accessibility client running in the background.
+ * [208782] Fixed a problem with non-cosmetic lines with widths < 2
+ not being printed correctly with certain printer drivers.
+ * [208859] Fixed a problem with strokes not being printed correctly. Both
+ the stroke offsets and thinkness of the stroke were sometimes printed
+ incorrectly.
+ * [206473] Entering UNC paths is slow in the Qt file dialog.
+ * [309241] Trying to stream mp3 content with phonon would cause a crash.
+ * [210115] Fixed a problem causing "mailto" links not to work when the
+ mail application path contains unexpanded environment variables.
+ * [203012] Fixed a problem where "WriteOnly named pipes" failed to
+ open using QFile.
+ * [205685] Fixed the handling of TranslateAccelerator for windows key messages.
+ * Add support for (not) embedding manifests in plugins, on Windows.
+ * [211893] Fixed a crash related to using QtDotNetStyle.
+
+
+Mac OS X
+--------
+ * Fix a regression where inserting widgets into native menus would cause
+ the program to crash.
+ * [209785] Fixed a regression from 4.3 to 4.4 in DeferredDelete
+ event handling.
+ * The "debuglibraries" binary package now includes dSYM bundles, which
+ makes it possible to debug with them.
+ * [207371] The CoreGraphics paint engine ignored the transform set
+ on a QBrush with QBrush::setTransform().
+ * Fixed insertation of 'space' char in QLineEdit when EISU key is being held down
+ * Fixed fullscreen widget not regaining full focus after a dialog has been shown
+ * Fixed bug regarding the usage of encoded URLs in Phonon
+ * [212719] Fixed a bug that could cause text drawn into a QImage to be clipped
+ incorrectly.
+ * [216563] Fixed a case where failing to get the display's colorspace
+ would result in many widget being painted all black.
+ * [216544, 213316] Fixed several accessibility-related crashes.
+ * [210401] Fixed memory leak in QWidget::setWindowIcon().
+ * [211195] Fixed problem that caused crashes with the Mac binary package
+ when entering long licensee names during the installation.
+
+Qt for Embedded Linux
+---------------------
+
+- QWSEmbedWidget
+ * Fixed propagation of the Qt::WindowStaysOnTopHint window property.
+
+- QDirectPainter
+ * [209068] Fixed region coordinates for QDirectPainter when used on a
+ rotated screen.
+
+- DirectFB screen driver
+ * Fixed window placements of windows with initial top-left coordinate (0,0).
+ * Improved deallocation of resources when an application exits unexpectedly.
+ * Fixed bug in QPixmap::rotate().
+ * Fixed QPixmap::fromImage() with an image of format QImage::Format_Indexed8
+ when compiling with QT_NO_DIRECTFB_PALETTE.
+ * Fixed small memory leak in QPainter::drawImage()
+
+- LinuxFB screen driver
+ * Added a workaround screen driver when the kernel fails to report the
+ length of the color components.
+ * Improved performance of the non-accelerated screen cursor.
+ * Disable the console cursor in graphics mode.
+
+- Tslib mouse driver
+ * [200995] Fixed crash when initialization fails.
+ * [207117] Improved filtering during calibration.
+
+- Ahi screen driver
+ * Fixed link issue.
+ * Fixed QScreen::setMode().
+ * Improved support for different screen modes.
+
+Qt for Windows CE
+-----------------
+
+ * Support for Visual Studio 2008 added
+ * Improved QRegion to perform faster
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+- [212852] Fixed GCC 4.3 compiler warnings.
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+ * [209866, 213084] Fix compilation errors in QtWebKit when using
+ GCC 3.4 with precompiled headers. Precompiled header support is
+ documented as experimental in the GCC 3.4 documentation, and as
+ such, precompiled header support is disabled by default with
+ this compiler.
+ * [212330] Correct Makefile generation for src/corelib, which
+ would sometimes include multiple qatomic.o targets.
+ * [210016] Fix a build failure on 64-bit Linux when using the
+ linux-*-32 mkspecs.
+ * [206966] Fixed compilation errors on Linux when building for the
+ MIPS architecture.
+ * [212132] Workaround compiler crash bug for Linux on
+ SPARC64. This is a generalization of a similar change done for
+ Solaris in the 4.3 series.
+ * [211326, 211703] Fixed compilation errors when using the Intel
+ C++ Compiler for Linux on IA-64 (Itanium) hardware.
+ * [171222] Ignore duplicate -L<path> options
+
+- Assistant
+ * [212875] Don't sort the entries in the contents view according to the
+ help files names.
+ * [212444] Use the default help collection when registering or unregistering
+ help files without having a collection file specified.
+ * [210704] Make sure the sql-plugin is correctly used when building
+ Qt statically.
+ * [208834] When highlighting a find result, ensure that the active
+ highlighting color is used.
+ * Introduced the -assistant-webkit configure flag to make use of WebKit as
+ html renderer in Qt Assistant.
+
+
+- Designer
+
+ * [213481] Fixed crash that occurs when encountering an invalid .ui file.
+ * [211422] Fixed a crash resulting from a conflict between the newly added
+ support for QScrollArea and custom widgets derived from QScrollArea.
+ * [209995] Fixed a bug in the property editor that caused it not to
+ select values in spin boxes on editing.
+ * [205448] Fixed a bug related to drag and drop and Windows accessibility.
+ * [205899] Removed the windowModality property for non-form children to
+ prevent it from locking up the form preview.
+ * [212077] Fixed retranslateUi call in case of combo box items
+ * [210866] Dynamic properties of type QByteArray are not converted anymore to type QString when reloading the form
+ * [207187] Designer's property editor has better colors in case of inverted color scheme
+ * [202257] The geometry of the resource dialog is saved in settings
+ * [211677] Remove a crash in case of reloading resources
+
+- Linguist
+
+- lupdate
+ * [209122] Fixed same-text heuristic missing existing plurals
+ * [212465] Standardize on the default context being empty, not "@default"
+
+- lrelease
+
+
+- rcc
+
+
+- moc
+
+ * [189996] Fixed a bug that caused inline slots with throw()
+ declarations to be parsed incorrectly.
+ * [192552] Fixed a bug that caused "< ::" to be parsed incorrectly
+ (e.g. "QList< ::Foo>").
+ * [199427] Fixed the code generator so that it generates normal
+ spaces everywhere, no tabs.
+ * [204730] Fixed a skipt token after Q_PRIVATE_SLOT
+
+- uic
+
+ * [205439] Added a warning that is printed when encountering
+ non-obvious Qt3 dependencies (qPixmapFromMimeSource).
+
+- uic3
+
+ * [205834] Process non-ASCII filenames correctly.
+
+- qmake
+
+
+- configure
+
+ * Fixed auto-detection of the XKB library on old Unix systems
+ * Fixed auto-detection of getaddrinfo on old Unix systems
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+Unix
+----
+ * [203063] Changed the behaviour of qFatal and Q_ASSERT to always
+ produce a SIGABRT signal in all build modes of Qt. (Previous
+ versions called the exit function if Qt was built in release mode)
diff --git a/dist/changes-4.4.2 b/dist/changes-4.4.2
new file mode 100644
index 0000000..192bbd1
--- /dev/null
+++ b/dist/changes-4.4.2
@@ -0,0 +1,512 @@
+Qt 4.4.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.4.1 and 4.4.0.
+
+The Qt version 4.4 series is binary compatible with the 4.3.x series.
+The Qt for Embedded Linux version 4.4 series is binary compatible with
+the Qtopia Core 4.3.x series. Applications compiled for 4.0, 4.1, 4.2,
+and 4.3 will continue to run with 4.4.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.trolltech.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain
+more information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+Third party components
+----------------------
+
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtCore
+------
+
+- QVariant
+ * [220112] correct documentation with respect to conversions
+ involving QTime.
+
+- QHash
+ * [215348] Document that uniqueKeys() doesn't sort its keys.
+
+- QFlags
+ * [221702] Fix QFlags::testFlag gives a surprising result on enums with
+ many bits.
+
+- QLibrary
+ * [219456] Fix QLibrary problems on Windows, loading the C runtime library
+ without a manifest.
+
+- QDataStream
+ * Fixed storing a QPalette into a stream with a version older than Qt_2_1
+
+- QtConcurrent
+ * [221671] Fixed filtered() compile error when using filter functions that
+ takes its argument by const reference.
+ * [220804] Fix several compile errors with STL containers.
+
+- QThreadPool
+ * [215365] The Q[Core]Application destructor now waits for all QThreadPool
+ threads to finish. This fixes ussues when unloading the Qt dlls on windows
+ as well as when using Qt features that need on a QApplication instance
+ in a worker thread.
+QtGui
+-------------
+
+ * [215794] setWindowFilePath() didn't update window title until the
+ window is resized.
+ * [212316] Window position changed when setWindowFlags was called.
+ * [223814] Fixed a crash in QDockWidget when the docking window was
+ closed during the dock animation.
+ * [223339] Fixed a crash when a pop-up widget had the
+ WA_DeleteOnClose attribute.
+
+ * [214742, 205222] QFormLayout - fix nested QFormLayouts expanding
+ unnecessarily.
+ * [217123] Fixed a regression in QWidgetItem::setGeometry() that made an item
+ with both an Alignment and QSizePolicy::Ignored set got squeezed down to
+ a size of 0.
+
+- QCDEStyle
+ * [220803] Improved the contrast of CE_RubberBand when painted on top of a dark background.
+
+- QPlastiqueStyle
+ * [312723] Fixed broken painting on QSpinBox when using NoButtons.
+
+- QGraphicsEllipseItem
+ * [207826] setStartAngle() and setSpanAngle() now call
+ prepareGeometryChange(), removing rendering artifacts.
+
+- QGraphicsLinearLayout
+ * [218400] Fix crash when assigning a layout with stretches to a widget.
+
+- QGraphicsView
+ * [216741] Fix QGraphicsView::DontSavePainterState (regression to 4.3)
+
+- QGraphicsWidget
+ * [215417] Fixed setting the correct layoutDirection on the painter before
+ we called QGraphicsWidget::paint.
+
+- QMdiArea
+ * [221527] Fixed a bug where the [*] placeholder was not updated correctly in tabbed view mode.
+
+- QMdiSubWindow
+ * [214964] Tooltips in children of the subwindow closed too fast
+
+- QMessageBox
+ * [221721] Fix crash when trying to obtain the default value for QMessageBox::iconPixmap().
+
+- QSplitter
+ * [214480] Improve docs on how the effective stretch facors are calculated.
+
+- QTextEdit
+ * [214956] Fix painting problems with text in floating frames
+ * [215192] Fix HTML alignment in QLabels with RTL
+ * [213259] Fix to handle ShortcutOverride for Ctrl+Shift+Right
+
+- QTextCursor
+ * [214457] Fix assert when deleting empty cells
+ * [210496] Fix the usecase that QTextCursor::select( QTextCursor::LineUnderCursor )
+ doesn't work when the text has not been layed out yet
+
+- QTextDocument
+ * [207779] Fix HTML import of page-breaks on empty lines to not get lost
+ * [212848] Fix FullWidthSelection to work if LineWrapMode set to NoWrap
+ * Fixes the positioning of bullets to always honor the text direction
+
+- QWidget
+ * [219446] Fixed a bug where calling repaint() before QApplication::exec() did not
+ invoke a paintEvent().
+
+QtScript
+--------
+
+ * [219126] Fixed bug that caused the decimal point to appear in
+ the wrong position when converting a number with a negative
+ exponent to a string.
+
+QtGui
+-----
+
+- QDateTimeEdit
+ * [220926] QDateTimeEdit::textFromDateTime: valueFromText vs. date
+ TimeFromText -- clarify documentation
+
+- QTimeEdit
+ * [215426] Fixed a typo in the declaration of a Q_PROPERTY
+
+- QPainter
+ * [216948] Fix one-pixel shifting of integer lines in raster paint
+ engine when current matrix has negative dx or dy.
+ * [218682] Fixed bug in QBitmap::fromData that could cause the bitmaps
+ to turn completely black on Windows and Embedded Linux.
+ * [220544] Fix issue in Freetype font engine where painting text using
+ the same font and transform on both images and pixmaps would result in
+ text not being transformed or not shown at all.
+ * [222520] Fixed issue in raster paint engine where StretchToDevice
+ mode for gradients wasn't respected.
+ * [222848] Prevent potential crash on NaN in qt_curves_for_arc()
+ when drawing squiggly underlined text.
+
+- QBrush
+ * [215090] Avoid "QPixmap created outside the GUI thread" warning when
+ creating a QImage based brush.
+
+- QFileDialog
+ * [223813] Prevent an assert when "Shift + C" was pressed if the directory
+ set was "C:/".
+- QImage
+ * [215985] Reduce memory usage in TIFF import/export to avoid failing
+ due to out-of-memory errors on large images.
+ * [217101] Make sure QImage::setPixel() doesn't call detach twice, to
+ improve the performance a bit.
+
+- QPicture
+ * [215227] Fixed a problem that could occur when drawing a QPicture to a
+ QImage or QPixmap due to differing device DPIs.
+
+- QPixmap
+ * [214340] Prevent QPixmap::scaled() from leaving white lines at right/lower
+ edges in some cases.
+ * [214344] Make QPixmap::transformed() work correctly with perspective
+ transforms.
+ * [214855] Make sure QPixmap::transformed with a 90-degree rotation transform
+ doesn't increase the size of the pixmap.
+ * [215190] Fixed crash on Windows and Embedded Linux due to QPixmap::detach()
+ not detaching the underlying QImage.
+ * [216648] QPixmap turned a QBitmap into a 32 bit QPixmap
+ when QPixmap::resize() was called on the QBitmap.
+
+- QMatrix
+ * [198791] Fixed bug in QMatrix::map(const QPolygon &) causing a behavioral
+ difference from Qt 3's QWMatrix.
+
+* Fixed bugs in QPolygon to QRegion conversion causing to many rectangles to be
+ generated.
+
+* [206138] Fix unaligned double access in src/corelib/global/qnumeric_p.h
+
+* [216189] Fix a crash when calling QObject::dumpObjectInfo() after
+ disconnecting a signal.
+
+* [216910] Use the 'eieio' instruction instead of 'lwsync' in the
+ PowerPC implementation of QAtomicInt and QAtomicPointer since the
+ latter is not available in all hardware implementations. The 'eieio'
+ instruction was used successfully in Qt 4.3 and earlier.
+
+- QDockWidget
+ * [222222] The sizeHint for dockwidget is now respected when it is redocked
+ * [222030] The minimum size and minimum size hint are now respected
+
+- QToolBar
+ * [216929] Fixed the extension when the orientation is vertical
+
+- QTabBar
+ * [214527] Fixed the geometry of QTabBarnot being correctly updated when
+ adding a tab.
+
+- QMainWindow
+ * [218288] Fixed save/restore that would not work correctly if the window
+ was not yet shown on screen.
+
+- QStyleSheetStyle
+ * [158984] Fixed crash while using stylesheet in combinaison with a proxy style
+ * [217470] Fixed setting a stylesheet on a QDockWidget remove its border
+
+- QTreeView
+ * [220298] Fixed regression where clicking outside of the first column doesn't
+ always select the item.
+ * [224598] Fixed item not always appearing when QStandardItemModel::appendColumns
+ was used
+ * [212056,216390] Fixed bug where hidden items in the treeview got visible after
+ a sort.
+ * [209473] Fixed assert/crash when selectAll were called on a treeview with no
+ items.
+
+- QTableView
+ * [314519] Fixed crash with very big models.
+ * [211039] Fixed assert when moving a header section in a vertical header.
+
+QtGui
+-----
+* [214146, 215170] Fix a regression with multiple screens on
+ X11. Multiple screens are now reported with their correct size
+ regardless of how X11 is configured.
+
+QtOpenGL
+--------
+
+* [217429] Fixed issue on certain Intel drivers causing a GL error to be
+ generated when computing the max texture size in qt_gl_maxTextureSize().
+
+QtWebKit
+--------
+* Fixed potential crash when deleting QWebView instances.
+* Fixed blurry widgets in the web page due to antialiased painting.
+* [221518] Fixed using modifiers to type special symbols (e.g '@','$')
+ does not work on Mac OS X.
+* [216179] Fixed potential crash on Windows, when performing JavaScript
+ date conversion.
+* Fix rendering of scrollbars with some styles
+* Fix state of web actions when showing the context menu
+* Fix parsing of stylesheets and JavaScripts to not depend on the current locale
+* Fix return value of QWebPage::isModified()
+* Fix QWebFrame::setHtml() not setting the contents immediately
+* [218789] Fix WebKit not displaying content on 403 HTTP responses
+
+QtXml
+-----
+
+- QDomElement
+ * [220115] Document QDomElement::setAttribute(double)'s behavior with
+ respect to locale.
+
+QtXmlPatterns
+-------------
+
+- QXmlQuery
+ * [219070] Fix after the QXmlQuery object is deleted it doesn't
+ seem to be cleaning up afterwards.
+
+QtNetwork
+---------
+
+- QNetworkReply & QNetworkAccessManager
+ * [223580] Fixed the handling of HTTP replies with code 400.
+ * [215010] Fixed a bug that made SOCKSv5 proxies not be used.
+ * [217091] Fixed a bug that made the HTTP backend issue CONNECT
+ commands for HTTP (not HTTPS) requests to proxy servers
+
+- QHttp
+ * [197694] Fixed a bug that prevented QHttp from uploading data of
+ length 0 when reading from a QIODevice.
+
+
+QtTest
+------
+
+- QCOMPARE
+ * [219067] Document behavior of qFuzzyCompare/QCOMPARE when
+ comparing with 0.0.
+
+QtDBus
+------
+
+- QDBusConnection
+ * [220140] Fixed a bug that would make objects registered with
+ ExportSlots not have interfaces inherited from parent classes
+ callable.
+ * [218733] Fixed the delivery of errors resulting of an outgoing
+ method call timing out.
+
+- QDBusReply
+ * [190546] Improved the error messages generated by QDBusReply in
+ case of mismatched signatures.
+
+QtHelp
+------
+
+ * [219454] Index also .htm and .txt files for the full text search.
+ * [233415] Use the proper encoding when parsing the title of a html
+ document.
+
+Qt3Support
+----------
+
+ * [216806] Fixed a crash in Q3ScrollView when setting a null corner widget
+ * [215041] Fixed a crash in Q3Table when using a Q3TextEdit as the editor
+ * [217218] Fix support for images in Q3TextBrowser
+
+Phonon
+------
+ * [214080] Fixed a failure on path reconnections between VideoWidget and MediaObject
+
+
+Accessibility
+-------------
+ * [222660] Made it possible to navigate from the application through the menubar,
+ toolbars etc, and down to the textedit without ending up on a QRubberBand or QMenu.
+ This left the AT client in a confused state.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+X11
+---
+ * [211678] Fixed a problem where using widgets and pixmaps on two different
+ X11 screens resulted in X11 errors.
+ * [217250] Fixed a problem where QGLWidgets on some older X servers would
+ not get the correct colormaps set, resulting in distorted colors.
+ * [214713] Fixed a problem where text would get clipped incorrectly
+ when using QPainter::drawText() on a QGLWidget, or QGLWidget::renderText().
+ * [223085] Fixed a regression where creating a style before QApplications could
+ result in incorrect font metrics.
+
+Windows
+-------
+ * [207506] Fixed a bug that causes input widgets to switch the text alignment
+ when pressing 'Ctrl+Shift' on Vista platforms (regardless of supported
+ keyboard layouts).
+ * [223951] Fixed a crash while accessing 'QAxObject*' for methods returning a
+ VARIANT with IDispatch inside.
+ * [223145] Fixed a regression which prevented use of Qt::WindowSystemMenuHint
+ together with flags like Qt::FramelessWindowHint.
+ * [224063] Fixed a crash in QFile when QFile::handle() was called.
+ * [221924] Fixed the binary installer for Visual Studio 2005 Express.
+ * [218215] Fix custom paper sizes for printing under Windows.
+ * [210830] Fixed incorrect tooltip text color on Vista.
+
+Mac OS X
+--------
+ * [216650] Fix a regression from 4.4 in the handling of DeferredDelete
+ events. This solves the reported problem that using Cmd+W does not
+ close a form properly in the Designer.
+ * Fix an error in the qconfig.h header file that occurred on Mac OS X
+ during configure when not using Terminal.app.
+ * [222349] Fix a potential out-of-bounds read when getting data from the clipboard.
+ * [213116] Fix a regression where minimizing a window would cause a window
+ with widgets that had no click through enabled to never get enabled.
+ * [215985] Fixed QPixmap::fromImage() to not do an extra copy of the image data
+ which could cause a lot of memory to be used.
+ * [217197] Fix crash when dragging text with object replacement characters on the Mac.
+ * [212884] Fixed a crash that could occur when printing images on the Mac.
+ * [215909] Fixed a problem where text drawn into a QGLWidget on the Mac would appear
+ to be drawn with a bold type, when it shouldn't have.
+ * [215761] Fixed a problem that could make top part of text drawn
+ into a QGLWidget appear cropped.
+ * [214960] Fixed a problem where custom page margins were not taken
+ into account, unless QPrinter::fullPage() was set to true. Also,
+ margins from the QPageSetupDialog should now update the internal
+ QPrinter margins correctly.
+ * [216563] Fix "black widgets" regression from 4.4.
+ * [214681] Fixed bug that the menu bar and other parts of the application
+ responds to the same shortcuts.
+ * [312012] Fixed support for secondary shortcuts on menu bar.
+ * [315450] Fixed build issue for Phonon on OS 10.4/Macbooks regarding OpenGL headers.
+
+Qt for Embedded Linux
+---------------------
+
+- Raster paint engine
+ * Fixed pixel errors when drawing pixmaps into a semi-transparent window.
+ * Fixed an assert when drawing an 16-bit image onto an image of format
+ QImage::Format_ARGB8565_Premultiplied.
+ * [217400] Fixed painting errors with Qt::WA_NoSystemBackground used on
+ a 16bit screen.
+ * Fixed CompositionMode_Source with new QImage formats introduced in 4.4.0.
+
+- QWSServer
+ * [210865] Fixed crash due to missing null-pointer check in
+ QWSServer::sendIMEvent().
+
+- DirectFB screen driver
+ * Fixed a cache corruption which randomly resulting in painting errors
+ when using QPainter::drawImage().
+ * Fixed use of Qt::SmoothTransformation with QPixmap::scaled().
+ * Fixed painting errors when drawing transparent windows and compiled
+ width QT_NO_DIRECTFB_VM.
+ * Added QT_NO_DIRECTFB_PREALLOCATED to work around issues with drivers
+ not properly implementing blitting to/from preallocated surfaces.
+
+- VNC screen driver
+ * Fixed a crash when used on top of a screen with a non-standard line step.
+ * Fixed remote cursor when used on top of a hardware accelerated cursor.
+
+Qt for Windows CE
+-----------------
+ * [219644] Maximized MDI windows had a double title bar on Windows Mobile.
+ * [223975] Qt version displayed wrong in Windows Explorer.
+ * [217576] QLocale always displayed "C" as language.
+ * [215020] Windows with parent were always embedded into the parent window
+ instead of being toplevel itself.
+
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+
+- Assistant
+ * [221298] When triggering the sync contents action, activate the contents
+ widget.
+ * [171654] Use the title of the .html file as the about dialog window title.
+ * [219939] When specifying a .html file for the about dialog contents,
+ ensure that the referenced image files are displayed as well.
+ * [219936] When a collection file has been changed, make sure to syncronize
+ all relavant settings with the cached collection file.
+ * [206321] Display .svg files in Assistant.
+ * [219176] Escape '&' characters in the title of a document.
+
+
+- Designer
+ * [219670] Fixed a bug related to layout handling of form classes generated
+ by the Visual Studio integration.
+ * [220299] Fixed a crash that occurred when breaking a layout containing
+ zero-sized spacers.
+ * [217464] Fixed a bug related to using resource-dependent properties
+ for QDialog-based forms.
+ * [215188] Stabilized reading of corrupted ui files.
+ * [215648] Don't show the rich text editor for iconText property of QAction
+ * [214854] Fix displaying of icons in the VS integration
+ * [217093] Make non-letter shortcuts with Shift modifier working
+ * [223114] Fixed a crash when removing a dynamic url property
+ * [220998] Default precision of float property in property editor changed to 6
+
+- Linguist
+
+- lupdate
+
+- lrelease
+
+
+- rcc
+
+
+- moc
+
+
+- uic
+
+
+- uic3
+
+
+- qmake
+
+
+- configure
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
diff --git a/dist/changes-4.4.3 b/dist/changes-4.4.3
new file mode 100644
index 0000000..f33cede
--- /dev/null
+++ b/dist/changes-4.4.3
@@ -0,0 +1,31 @@
+Qt 4.4.3 is a rebranding-only release. In all other aspects, it is the
+same release as Qt 4.4.2. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.4.2, 4.4.1 and 4.4.0.
+
+The Qt version 4.4 series is binary compatible with the 4.3.x series.
+The Qt for Embedded Linux version 4.4 series is binary compatible with
+the Qtopia Core 4.3.x series. Applications compiled for 4.0, 4.1, 4.2,
+and 4.3 will continue to run with 4.4.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.trolltech.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain
+more information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+ - Updated application icons and other graphics to reflect the look
+ and feel of the new Qt brand.
+
+Legal
+-----
+
+ - Copyright of Qt has been transferred to Nokia Corporation.
diff --git a/dist/changes-4.5.0 b/dist/changes-4.5.0
new file mode 100644
index 0000000..3fc075f
--- /dev/null
+++ b/dist/changes-4.5.0
@@ -0,0 +1,1496 @@
+Qt 4.5 introduces many new features and improvements as well as bugfixes
+over the 4.4.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://doc.trolltech.com/4.5
+
+The Qt version 4.5 series is binary compatible with the 4.4.x series.
+Applications compiled for 4.4 will continue to run with 4.5.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.qtsoftware.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+New features
+------------
+
+- Disk Caching in QtNetwork
+ * Added support for http caching in QNetworkAccessManager.
+ * New classes: QAbstractNetworkCache, QNetworkDiskCache.
+ * QNetworkDiskCache is a simple disk-based cache.
+
+- QDate
+ * [207690] Added QDate::getDate().
+
+- QDateTimeEdit
+ * [196924] Improved QDateTimeEdit's usability. It now skips ahead to the
+ next field when input can't be valid for the current section.
+
+- QDateTime
+ * [178738] Fixed QDateTime::secsTo() to return the correct value.
+
+- QDBusPendingCall / QDBusPendingCallWatcher / QDBusPendingReply
+ * New classes to make calls whose replies can be received later.
+
+- QDesktopServices
+ * Added the ability to determine the proper location to store cache files.
+
+- QGraphicsItem
+ * Added the QGraphicsItem::itemTransform() function.
+ * [209357] Added the QGraphicsItem::opacity() function.
+ * [209978] Added the QGraphicsItem::ItemStacksBehindParent flag to allow
+ children to be stacked behind their parent item.
+ * Added QGraphicsItem::mapRect() functions.
+
+- QGraphicsScene
+ * Added the QGraphicsScene::sortCacheEnabled property.
+ * Added the QGraphicsScene::stickyFocus property.
+
+- QGraphicsTextItem
+ * [242331] Added the QGraphicsTextItem::tabChangesFocus() function.
+
+- QGraphicsView
+ * [210121] Added action, shortcut and shortcut override support to
+ QGraphicsView and QGraphicsItem.
+
+- QLineEdit
+ * Added the ability to set the text margin size.
+
+- QMainWindow
+ * Added API to detect which dock widget is tabified together with another
+ dock widget.
+
+- QMessageBox
+ * It is now possible to create categories in QErrorMessage to avoid error
+ messages from the same category popping up repeatedly.
+
+- QMetaObject
+ * Added introspection of constructors, including the ability to invoke a
+ constructor.
+
+- QMetaProperty
+ * [217531] Added the notifySignalIndex() function, which can be used to
+ introspect which signal (if any) is emitted when a property is changed.
+
+- QNetworkCookie
+ * [206125] Added support for HTTP-only cookies.
+
+- QNetworkProxyFactory
+ * Added support for a factory of QNetworkProxy whose result can
+ change depending on the connection being attempted.
+ * Added support for querying system proxy settings on Mac OS X and
+ Windows.
+
+- QSharedPointer / QWeakPointer
+ * Added two new classes for sharing pointers with support for atomic
+ reference counting and custom destructors.
+
+- QStringRef
+ * [191369] Added QStringRef::localeAwareCompare() functions.
+
+- QTabBar
+ * Added the ability to place close buttons and widgets on tabs.
+ * Added the ability to choose the selection behavior after a tab is
+ removed.
+ * Added a document mode which, on Mac OS X, paints the widget like
+ Safari's tabs.
+ * Added the movable property so that the user can move tabs easily.
+ * Added mouse wheel support so that the mouse wheel can be used to change
+ tabs.
+
+- QTabWidget
+ * Added a document mode that removes the tab widget border.
+
+- QTcpSocket
+ * [183743] Added support for requesting connections via proxies by
+ hostname (no DNS resolution made on the client machine).
+
+- QTextDocument / QTextDocumentWriter
+ * Added the QTextDocumentWriter class which allows exporting of
+ QTextDocument text and images to the OpenDocument format
+ (ISO/IEC 26300).
+
+- QtScriptTools
+ * Added a new module to provide a debugger for Qt Script.
+
+- Qt::WA_TranslucentBackground
+ * Added this new window attribute to be able to have per-pixel
+ translucency for top-level windows.
+
+- Qt::WindowCloseButtonHint
+ * Added a new window hint to control the visibility of the window close
+ button.
+
+- Qt::WindowStaysOnBottomHint
+ * Added a new window hint to allow the window to stay below all other
+ windows.
+
+- Q_SIGNAL and Q_SLOT
+ * Added new keywords to allow a single function to be marked as a signal
+ or slot.
+
+- QT4_IM_MODULE
+ * [227849] Added a new environment variable that specifies the input
+ method module to use and takes precedence over the QT_IM_MODULE
+ enviroment variable. This environment variable allows the user to
+ configure the environment to use different input methods for Qt 3 and
+ Qt 4-based applications.
+
+- QXmlQuery
+ * Added a number of overloads to the bindVariable(), setFocus(), and
+ evaluateTo() functions.
+ * Added a property for controlling the network access manager.
+ * Partial support for XSL-T has been added. See the main documentation for
+ the QtXmlPatterns module for details.
+
+Optimizations
+-------------
+
+- The backing store has been re-factored and optimized
+ * Significant improvement in overall performance of painting for widgets.
+ * Reduced the number of QRegion operations.
+ * Improved update handling.
+ * Improved the performance of clipping.
+ * Support for full static contents.
+
+- QGraphicsView has been optimized in several areas
+ * Reduced the number of floating point operations.
+ * Improved update handling.
+ * Improved handling of deeply nested item trees.
+ * Improved the performance of clipping for ItemClipChildrenToShape.
+ * Improved sorting speed, so scenes with deeply nested item hierarchies do
+ not affect the performance as compared to Qt 4.4.
+
+- Widget style sheets optimisations
+ * Improved the speed of style sheet initialization.
+
+- QAbstractItemModel
+ * Optimized QPersistantModelIndex creation and deletion.
+ * Optimized adding and removing rows and columns.
+
+- QFileSystemModel
+ * Ensured that the model is always sorted when required.
+
+- QTreeView
+ * Optimized expanding and collapsing items.
+ * Optimized expanding animations with large views.
+
+- QRect and QRectF
+ * Improves on functions like intersect(), contains(), etc.
+
+- QTransform
+ * Reduced the number of multiplications used for simple matrix types.
+
+- QRasterPaintEngine
+ * Reduced overhead of state changes; e.g., setPen() and setBrush().
+ * Introduced a cache scheme for Windows glyphs, thus improving text
+ drawing performance significantly.
+ * Reduced the cost of doing rectangular clipping.
+ * Improved pixmap drawing.
+ * Improved pixmap scaling.
+ * Optimized drawing of anti-aliased lines.
+ * Optimized drawing of anti-aliased dashed lines.
+
+Third party components
+----------------------
+
+- Updated Qt's SQLite version to 3.5.9.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+- General Fixes
+ * [217988] Fixed a thread safety issue in QFontPrivate::engineForScript
+ which could lead to buggy text rendering when rendering text from
+ several threads.
+ * [233703] Fixed a crash that occured when the input method (for example
+ SCIM) was destroyed while the application is still running.
+ * [233634] When there are several input method plugins available, they are
+ now initialized only when the user switches to them.
+ * [231089] Fixed an issue which caused HTTP GET to fail for chunk
+ transfers.
+ * [193475] Consumer tablet devices (like Wacom Graphite and Bamboo) now
+ work on Windows and Mac OS X.
+ * [203864] Do not warn when deleting objects in their event handler except
+ for Qt Jambi.
+
+- QAbstractItemModel
+ * [233058] Fixed the sorting algorithm used in rowsRemoved().
+
+- QAbstractItemView
+ * [221955] Fixed a bug that allowed rows to be selected even if the
+ selection mode was NoSelection.
+ * [244716] Fixed a possible crash when an edited cell was moved.
+ * [239642] Ensured that a rubber band selection is clear if the selection
+ ends on the viewport.
+ * [239121] Ensured that the old selection is clear when starting a
+ selection on the viewport.
+ * [219380] Fixed an update issue when removing rows.
+
+- QAbstractSpinBox
+ * [221221] Fixed a usability issue with QAbstractSpinBox subclasses in
+ itemviews.
+
+- QBitmap
+ * [216648] Fixed a problem where QBitmaps were being converted to 32-bit
+ QPixmaps when QPixmap::resize() was called.
+
+- QByteArray and QString
+ * [239351] Fixed a bug in QCharRef and QByteRef that would cause them to
+ fail to detach properly in some cases. Applications need to be
+ recompiled to use the fix.
+ * [212140] Added repeated() functions to these classes.
+ * [82509] Added QT_NO_CAST_FROM_BYTEARRAY to disable "operator const
+ char *" and "operator const void *" in QByteArray.
+
+- QCalendarWidget
+ * [206017] Fixed minimumSize to be calculated correctly in the case where
+ the vertical header has a different text format set.
+ * [206282] Added support for browsing months using the mouse wheel.
+ * [238384] A click on the date cell will now be ignored if the year
+ spin box is opened.
+
+- QCleanlooksStyle
+ * [195446] Skip disabled menu and menu bar items when using keyboard
+ navigation.
+ * Fixed a problem with wrapped text eliding on titlebars.
+ * [204269] Fixed a sizing problem with push buttons having mnemonics.
+ * [216172] Fixed a problem with check box on inverted color schemes.
+
+- QColor
+ * [196704] Fixed a problem where the QColor::fromHsvF() function could
+ return incorrect values.
+
+- QComboBox
+ * [167106] Fixed a problem where the combobox menu would incorrectly show
+ check boxes after a style change.
+ * [227080] Fixed handling of the style sheet background-color attribute on
+ Windows.
+ * [227080] Adjusted pop-up size when using style sheet border.
+ * [238559] Fixed the completer as it was not using the right column with
+ setModelColumn().
+
+- QCommandLinkButton
+ * [220475] Added support for On/Off icon states.
+
+- QCommonStyle
+ * [211489] Ensured that checkable group boxes with no title are drawn
+ correctly.
+ * [222561] Made more standard icons available.
+
+- QCOMPARE(QtTest)
+ * [183525] Fixed issue that caused QCOMPARE to give incomplete
+ information when comparing two string lists.
+ * [193456] Ensured that nmake install for QTestLib copies the DLL into the
+ bin directory.
+
+- QCoreApplication
+ * [224233] Ensured that QCoreApplication::arguments() skips the
+ -stylesheet argument.
+
+- QDate
+ * [222937] QDate - fixed issue preventing a minimum date of 01-01-01
+ from being set.
+
+- QDataStream
+ * [230777] Fixed a bug that would cause skipRawBytes() to go
+ backwards if the correct resulting position was larger than 2 GB.
+
+- QDateTimeEdit
+ * [196924] Improved QDateTimeEdit's usability. It now skips ahead to the
+ next field when input can't be valid for the current section.
+
+- QDBusConnection
+ * [211797] Added support for the GetAll call in the standard
+ org.freedesktop.DBus.Properties interface.
+ * [229318] Fixed race conditions caused by timers being deleted in
+ the wrong thread.
+
+- QDesktopServices
+ * [237398] Ensured that, on Mac OS X, returned paths do not have a
+ trailing '/'.
+
+- QDesktopWidget
+ * [244004] Fixed a coordinate issue on Mac OS X with multi-screen setups
+ where the screen sizes differ.
+
+- QDialog
+ * [214987] Ensured that maximize buttons are not put on dialogs by default
+ on Mac OS X.
+
+- QDialogButtonBox
+ * [224781] Dialog buttons without icons now get the same height as dialog
+ buttons with icons to maintain the alignment.
+
+- QDockWidget
+ * [237438] Fixed a crash in setFloat() for parentless dock widgets.
+ * [204184] Subclasses are now allowed to handle mouse events.
+ * [173854] Ensured that the size of the dock widget is remembered when it
+ is hidden.
+
+- QDomDocument
+ * [212446] Ensured that a new line inserted after an element that
+ indicates whitespace is preserved.
+
+- QDomAttr
+ * [226681] Fixed issue that caused specified() to return false if the
+ attribute is specified in the XML.
+
+- QEvent
+ * Added more debug operators for common event types.
+
+- QFlags
+ * [221702] Fixed issue with testFlag() that gave a surprising result on
+ enums with many bits.
+
+- QFormLayout
+ * [240759] Fixed crash in QFormLayout that could occur when a layout was
+ alone in a row.
+
+- QFile
+ * [238027] Fixed a bug that would cause QFile not to be able to map a file
+ to memory if QFile::open() was called with extra flags, like
+ QIODevice::Unbuffered.
+
+- QFileInfo
+ * [166546] Fixed QFileInfo operator== bug involving trailing directory
+ separators.
+
+- QFileDialog
+ * [240823] Fixed issues with file paths over 270 characters in length on
+ Windows.
+ * [212102] Fixed ".." directory issue.
+ * [241213] Fixed some problems when renaming files.
+ * [232613] Fixed a usability issue with UNC path on Windows.
+ * [228844] Fixed a wrong insertion in the filesystemModel that caused
+ persistant model index to be broken.
+ * [190145] [203703] Fixed a bug in getExistingDirectory() that returned
+ /home/ instead of /home, or on Windows, returned c:/temp/ instead of
+ c:/temp. We now match the native behavior.
+ * [236402] Fixed warning in the QFileDialog caused by deleting a directory
+ we have previously visited.
+ * [235069] Fixed issue that prevented QFileDialog from being closed on
+ Escape when the list view had focus.
+ * [233037] Fixed issue that caused the "Open" button to be disabled even
+ if we want to enter a directory (in AcceptSave mode).
+ * [223831] Ensured that the "Recent Places" string is translatable.
+ * Fixed crash on Windows caused by typing \\\ (empty UNC Path).
+ * [226366] Fixed issue that prevented the completer of the line edit from
+ being shown when setting a directory with lower case letter.
+ * [228158] Fixed issue that could cause the dialog to be closed when
+ pressing Enter with a directory selected.
+ * [231094] Fixed a hang that could occur when pressing a key.
+ * [227304] Fixed a crash that could occur when the dialog had a completer
+ and a QSortFilterProxyModel set.
+ * [228566] Fixed the layout to avoid cyclically showing and hiding the
+ scroll bars.
+ * [206221] Ensured that the view is updated after editing a value with a
+ custom editor.
+ * [196561] Fixed the static API to return the path of the file instead of
+ the link (.lnk) on Windows.
+ * [239706] Fixed a crash that could occur when adding a name filter from
+ an editable combo box.
+ * [198193] Ensured that directory paths on Windows have a trailing
+ backslash.
+
+- QFrame
+ * [215772] Style sheets: Ensured that the shape of the frame is respected
+ when not styling the border.
+
+- QFont
+ * [223402] QFont's QDataStream operators will now save and restore the
+ letter/word spacing.
+
+- QFontMetrics
+ * [225031] Fixed issue where QFontMetrics::averageCharWidth() could return
+ 0 on Mac OS X.
+
+- QFtp
+ * [227271] Added support for old FTP servers that do not recognize the
+ "SIZE" and "MDTM" commands.
+
+- QFuture
+ * [214874] Fixed deadlock issue that could occur when cascading QFutures.
+
+- QGLContext
+ * [231613] Fixed a crash that could occur when trying to create a
+ QGLContext without a valid paint device.
+
+- QGLFramebufferObject
+ * [236979] Fixed a problem with drawing to multiple, non-shared,
+ QGLFramebufferObjects from the same thread using QPainter.
+
+- QGraphicsEllipseItem
+ * [207826] Fixed boundingRect() for spanAngle() != 360.
+
+- QGraphicsGridLayout
+ * [236367] Removed (0, 0) maximum size restriction of a QGraphicsItem by
+ an empty QGridLayout.
+
+- QGraphicsItem
+ * [238655] Fixed slowdown in QGraphicsItem::collidesWithItem() that was
+ present in Qt 4.4.
+ * [198912] ItemClipsChildrenToShape now propagates to descendants.
+ * [200229] Ensured that context menu events respect the
+ ItemIgnoresTransformations flag.
+ * Enabling ItemCoordinateCache with no default size now automatically
+ resizes the item cache if the item's bounding rectangle changes.
+ * [230312] Mac OS X: Fixed a bug where update() issued two paint events.
+
+- QGraphicsLayout
+ * [244402] Fixed issue that could cause a horizontal QGraphicsLinearLayout
+ to stretch line edits vertically.
+
+- QGraphicsLayoutItem
+ * Fixed a crash that could occur with custom layouts which did not delete
+ children.
+
+- QGraphicsScene
+ * [236127] Fixed BSP tree indexing error when setting the geometry of
+ a QGraphicsWidget.
+
+- QGraphicsWidget
+ * [223403] Ensured that QGraphicsWidget(0, Qt::Popup) will close when you
+ click outside it.
+ * [236127] Fixed QGraphicsScene BSP tree indexing error.
+ * Improved rendering of window title bars.
+ * Fixed crash that could occur when a child that previously had the focus
+ died without having the focus anymore.
+
+- QGraphicsProxyWidget
+ * [223616] Ensure that context menus triggered by ActionsContextMenu are
+ embedded.
+ * [227990] Widgets are not longer resized/moved when switching themes on
+ Windows.
+ * [219058] [237237] Fixed scroll artifacts in embedded widgets.
+ * [236545] Ensured that the drag and drop cursor pixmap is not embedded
+ into the scene on X11.
+ * [238224] Fixed a crash that could occur when a proxy widget item was
+ deleted.
+ * [242553] Fixed drag and drop propagation for embedded widgets.
+
+- QGraphicsSvgItem
+ * [241475] Fixed update on geometry change.
+
+- QGraphicsTextItem
+ * [240400] Fixed bugs in mouse press handling.
+ * [242331] Add tabChangesFocus() to let the user control whether the text
+ item should process Tab input as a character, or just switch Tab focus.
+
+- QGraphicsView
+ * [236453] Improved Tab focus handling (propagate Tab and Backtab to items
+ and widgets).
+ * [239047] Improved stability of fitInView() with a very small viewport.
+ * [242178] Fixed rubber band debris left in Windows XP style (potentially
+ any style).
+ * Fixed a crash in QGraphicsView resulting from the non-deletion of
+ sub-proxy widgets.
+ * Fixed issue that caused items() to return an incorrect list with an
+ incorrect sort order when an item in the scene has the
+ IgnoresTransformations flag set to true.
+ * Ensured that the painter properly saves/restores its state after a call
+ to drawBackground().
+ * [197993] Allow any render hint to be set/cleared by the
+ QGraphicsView::renderHints property.
+ * [216741] Fixed handling of QGraphicsView::DontSavePainterState (broken
+ in Qt 4.3).
+ * [235101] [222323] [217819] [209977] Implemented proper font and palette
+ propagation in Graphics View.
+ * [238876] Fixed scroll artifacts in reverse mode.
+ * [153586] Ensured that the text cursor is drawn correctly in transformed
+ text controls in a QGraphicsView.
+ * [224242] Added support for embedding nested graphics views.
+
+- QGroupBox
+ * [204823] Fixed a palette inconsistency when using certain styles.
+
+- QHeaderView
+ * [239684] Fixed sorting that wouldn't happen when clicking unless the
+ sort indicator is shown.
+ * [236907] Fixed bug that could cause hidden columns to become visible.
+ * [215867] Resizing sections after moving sections could resize the wrong
+ columns.
+ * [211697] Fixed ResizeToContents to always show the full content of
+ cells.
+
+- QImage
+ * [240047] Fixed a problem with drawing/transforming sub-images.
+
+- QImageReader
+ * [138500] Added the QImageReader::autoDetectImageFormat() function.
+
+- QKeySequence:
+ * Added QKeySequence::SaveAs which has values for both GNOME and Mac OS X.
+ * [154172] Improved toString(NativeText) to return more native glyphs on
+ Mac OS X.
+
+- QLabel
+ * [226479] Fixed update if showing a QMovie that changes its size.
+ * [233538] Fixed behavior involving changing the color of a label with a
+ style sheet and pseudo-state.
+
+- QLineEdit
+ * [179777] Ensured that PasswordEchoOnEdit shows asterisks correctly.
+ * [229938] Fixed issue that could cause textChanged() to be emitted when
+ there was a maximum length set, even though the text was not changed.
+ * [210502] Fixed case-insensitive inline completion.
+
+- QLineF
+ * [241464] Fixed issue that could cause intersects() to be numerically
+ unstable in corner cases.
+ The function has been rewritten to be faster and more robust.
+
+- QListView
+ * [217070] Fixed issue that could cause scroll bars to appear in adjusted
+ icon mode.
+ * [210733] Made improvements in the way the pagestep is computed.
+ * [197825] Ensured that hidden items are not selectable.
+
+- QLocalServer
+ * Added new removeServer() static method to allow the socket file to be
+ deleted after an application has crashed.
+
+- QMacStyle
+ * [232298] Draw the sort indicators in the correct direction for table
+ headers.
+ * [198372] Give context sub-menus the correct mask.
+ * [209103] [232218] QToolButton::DelayedPopup is now displayed correctly.
+ * [221967] Bold header text now uses the correct color.
+ * [234491] Also the menu's QFont when when drawing menu items.
+ * Ensure the proper pressed look for tabs on Leopard.
+
+- QMainWindow
+ * [192392] Stop excessive updates with unified toolbars when changing the
+ enabled status of an action.
+ * [195259] Ensured that the toolbar button is shown when the unified
+ toolbar is created later.
+
+- QMessageBox
+ * [224094] Fixed crash that could occur when specifying a default button
+ that was not one of the buttons listed.
+ * [223451] Fixed a memory leak on a static pointer when the application
+ exits.
+
+- QMainWindow
+ * [224116] [228995] [228738] save/restoreState() would not always restore
+ the toolbars in the correct positions.
+ * [215430] Fixed issue that meant that the user could dock widgets and
+ they wouldn't be tabbed even if ForceTabbedDocks was set.
+ * [240184] Fixed an issue that caused QDockWidget to get smaller and
+ smaller by docking and undocking.
+ * [186562] Fixed layout when saving the state with an undocked dock widget
+ and then restoring it
+ * [228110] Re-adding a toobar now also re-docks it.
+ * [232431] Fixed a memory leak caused by setting centralWidget multiple
+ times.
+
+- QMenu
+ * [220965] [222978] Style sheets: Made it possible to set border and
+ gradient on items.
+
+- QMenuBar
+ * [228658] Fixed broken activated signal behavior.
+ * [233622] Fixed the repaint when a dialog is invoked
+
+- QMdiArea
+ * [233264] Mac OS X: Improved performance when dragging sub-windows
+ around.
+ * [233267] [234002] [219646] Removed flickering behavior that could occur
+ when switching between maximized sub-windows.
+
+- QNetworkReply:
+ * [235584] Fixed a bug that would cause sslConfiguration() to
+ return a null object if finished() had already been emitted.
+
+- QOpenGLPaintEngine
+ * [244918] Fixed a problem with drawing text and polygons onto software
+ rendering GL contexts.
+
+- QPainterPath
+ * [234220] Fixed crash due to a division by zero function in
+ addRoundedRect().
+
+- QPicture
+ * [226315] Fixed an assert when trying to load picture files created with
+ Qt 3 into Qt 4.
+
+- QPixmap
+ * [223800] Fixed a bug where grabWindow() on a QScrollArea did not work
+ the first time.
+ * [217815] Fixed a bug where grabWidget() did not work properly for
+ resized and hidden widgets.
+ * [229095] Mac OS X: Fixed issue that could cause grabWindow() to grab the
+ wrong parts of the window for child widgets.
+
+- QPlastiqueStyle
+ * [195446] Ensured that the background is now painted on selected but
+ disabled menu items for improved keyboard navigation.
+ * [231660] Fixed support for custom icon size in tab bars.
+ * [211679] drawPartialFrame() now passes the widget pointer.
+
+- QPainter
+ * QPainter::font(), brush(), pen(), background():
+ These functions will return default constructed objects when the
+ painter is inactive.
+ * [242780] Fixed segmentation fault that could occur when setting
+ parameters on an uninitialized QPainter.
+ * [89727] Added support for raster operations.
+ * [197104] More well-defined gradient lookup (linear gradients are now
+ perfectly symmetric if inverting the color stops).
+ * [239817] Fixed bug where overline/strike-out would be drawn with the
+ wrong line width compared to the underline.
+ * [243759] Fixed some off-by-one errors in the extended composition modes
+ in the raster paint engine.
+ * [234891, 229459, 232012] Fixed some corner case bugs in the raster paint
+ engine line/rectangle drawing.
+ * Fixed the "one pixel less" clipping bug caused by precision lost when
+ converting to int.
+ * Fixed the composition mode in QPainter raster which was not properly set.
+ * Fixed an assert when the painter is reused after a previous bad usage
+ (e.g., painting on a null pixmap).
+
+- QPainterPath
+ * Added convenience operators: +, -, &, |, +=, -=, &= and |=.
+
+- QPrinter
+ * [232415] Fixed a problem that caused a an invalid QPrinter
+ object to not update its validity after being passed into a
+ QPrintDialog.
+ * [215401] Fixed the size of the Executive paper format.
+ * [202113] Improved speed when printing to a highres PostScript printer.
+ * [195028] Trying to print to a non-existing file didn't update the validity
+ of the QPrinter object correctly.
+ * [134820] Support CUPS printer instances on Unix systems (Mac and X11).
+ * [201875] Fixed a bug that caused the fill opacity of a brush to be used
+ for the stroke in certain cases.
+ * [222056] Fixed absolute letter spacing when printing.
+ * [234135] Fixed a problem with custom margins for CUPS printers.
+
+- QPrintDialog
+ * [232207] When printing to a Qt .pdf or .ps printer under Windows or
+ Mac OS X, pop up a file dialog instead of the native print dialog.
+
+- QPrintPreviewDialog
+ * [236418] Fixed a problem that caused opening several QPrintPreviewDialogs
+ and printing to them at the same time crash.
+
+- QProcess
+ * [230929] (Unix) Open redirection files in 64-bit mode wherever supported.
+
+- QProgressDialog
+ * [215050] Properly stop internal timer that retriggered for no reason.
+
+- QProgressBar
+ * [216911] stylesheet bug if minimum value != 0
+ * [222872] Use the orientation when determining if we should repaint.
+
+- QRadioButton
+ * [235761] Fixed navigation with arrow keys when buttons are in different layout
+
+- QRegion
+ * [200586] Make QRegion a lot smarter when converting from a QPolygon, to avoid
+ creating a lot of needless rectangles.
+ * For Mac OS X, add QRegion::toQDRgn(), QRegion::toHIMutableShape() and
+ corresponding ::fromQDRgn() and ::fromHIShape(). The ::handle() is still
+ available for 32-bit Mac OS X builds and is the equivalent of ::toQDRgn().
+
+- QScrollArea
+ * [206497] Stylesheet: It's now possible to style the corner with ::corner
+
+- QScrollBar
+ * [230253] Simple stylesheets doesn't break the scrollbar anymore.
+
+- QSettings
+ * [191901] Added methods setIniCodec() and iniCodec() for changing the codec of .ini files.
+
+- QSharedMemory
+ * Don't deadlock when locking an already-held lock.
+
+- QSortFilterProxyModel
+ * [236755] Hidden columns in QTableView could become visible
+ * [234419] Fixed a data corruption when adding child and row is filtered out
+
+- QSslSocket
+ * [189980] Ensure OpenSSL_add_all_algorithms() is called.
+
+- QSslCertificate
+ * [186084] Fixed a bug that would cause timezones in certificate
+ times not to be parsed correctly, leading to valid certificates
+ not being accepted
+
+- QSslConfiguration
+ * [237535] Fixed a bug that would cause QSslConfiguration objects
+ to leak memory and eventually corrupt data due to wrong
+ reference counting.
+
+- QStandardItemModel
+ * [227426] Fixed drag and drop of hierarchy
+ * [242918] Added ability to change flags of the root item.
+
+- QString
+ * [205837] Qt 4.4: format string warnings / small QString conversion
+ clean up.
+
+- QSvgRenderer
+ * [226522] Fixed fill-opacity when fill is a gradient.
+ * [241357] Fixed gradients with two or more stop colors at the same offset.
+ * [180846] Fixed small font sizes.
+ * [192203] Add support for gzip-compressed SVG files.
+ * [172004] Respect the text-anchor attribute for embedded SVG-fonts.
+ * [199176] Ensure QSvgGenerator handles fractional font sizes
+ * [151078] Fix parsing of embedded fonts in files that have <metadata> tags
+
+- QSystemTrayIcon
+ * [195943] QSystemTrayIcon now accepts right mouse clicks on Mac OS X.
+ * [241613] Hide the tooltip when open the menu on Mac OS X.
+ * [237911] Only emit QMenu::triggered once on Mac OS X.
+ * [196024] Make it possible to disable context menus on Mac OS X.
+
+- QTabBar
+ * [213374] Fixed position of label in vertical bar with stylesheet
+
+- QtScript
+ * [177665] Added QScriptEngine::checkSyntax(), which provides information
+ about the syntactical (in)correctness of a program.
+ QScriptEngine::canEvaluate() has been obsoleted.
+ * [192955] Added the ability to exclude the QObject::deleteLater() slot
+ from the dynamic QObject binding, so that scripts can't delete
+ application objects.
+ * [212277] Fixed issue where the wrong prototype object was set when a
+ polymorphic type was returned from a slot.
+ * [213853] Fixed issue that could cause events to be processed less
+ frequently than what's set with QScriptEngine::setProcessEventsInterval().
+ * [217781] Fixed bug that caused the typeof operator to return "function"
+ when applied to a QObject wrapper object.
+ * [219412] Fixed bug that could cause the in operator to produce wrong results
+ for properties of Array objects.
+ * [227063] Fixed issue where a break statement caused an infinite loop.
+ * [231741] Fixed bug that could cause the implementation of the delete
+ operator to assert.
+ * [232987] QtScript now calls QObject::connectNotify() and
+ QObject::disconnectNotify().
+ * [233346] Fixed issue where the garbage collector would not be triggered when
+ very long strings were created, causing excessive memory usage.
+ * [233624] Fixed bug that caused enums in namespaces to be handled incorrectly.
+ * [235675] Fixed issue where creating a QScriptEngine would interfere with
+ ActiveQt's QVariant handling.
+ * [236467] Fixed bug that caused QtScript to treat a virtual slot redeclared by
+ a subclass as an overload of the base class's slot.
+ * [240331] Fixed bug that caused QtScript to crash when one of the unary
+ operators ++ and -- was applied to an undefined variable.
+ * If a signal has overloads, an error will now be thrown if you try to connect
+ to the signal only by name; the full signature of a specific overload must
+ be used.
+ * Added support for multi-line string literals.
+ * Added QScriptEngine::setGlobalObject().
+ * Made it possible to use reserved identifiers as property names in
+ contexts where there is no ambiguity.
+
+- QTcpSocket
+ * [235173] Fixed a bug that would cause QTcpSocket re-enter
+ select(2) with an uninitialized timer (when the first call got
+ interrupted by a signal).
+
+- QTextCursor
+ * [244408] Fixed regression in QTextCursor::WordUnderCursor behavior.
+
+- QTextCodec
+ * [227865] QTextCodec::codecForIndex(int) broken in Qt3Support
+
+- QTextEdit
+ * [164503, 232857] Fixed issues where using NoWrap caused
+ selection/background colors to not cover full width of text control.
+ * [186044] Fixed whitespace handling when copying text from Microsoft Word
+ or Firefox.
+ * [228406] Fixed parenthesis characters with RTL layout direction on
+ Embedded Linux.
+ * [189989] Fixed QTextEdit update after layout direction change.
+
+- QTextStream
+ * [210933] It is now possible to specify a locale which
+ QTextStream should use for text conversions.
+
+- QToolBar
+ * [193511] Fixed stylesheet on undocked toolbar
+ * [226487] Fixed the layout when the QMainWindow as a central widget with
+ fixed size.
+ * [220177] Fixed the layout not taking the spacing into account
+
+- QToolButton
+ * [222578] Fixed issues with checked and disabled tool buttons in some
+ styles.
+ * Tool button now allows independent hover styling on it's subcontrols.
+ * [167075] [220448] [216715] Polished stylesheet color, background, and
+ border.
+ * [229397] Fixed regression against Qt3 where setPopupDelay(0) did not
+ work as expected.
+
+- QToolTip
+ * [228416] Fixed style sheet tooltips on windows.
+
+- QTreeView
+ * [220494] scrollTo() didn't scroll horizontally if the vertical bar was
+ already at the correct position.
+ * [216717] Fixed update when children are added.
+ * [225029] Fixed bug that prevented focus from being shown for
+ non-selectable items when allColumnsShowFocus is set to true.
+ * [226160] Fixed hit detection when first column is moved.
+ * [225539] Fixed a crash when deleting the model.
+ * [241208] Fixed animation when using persistent editors.
+ * [202073] Fixed visualRect which would not take the indentation into
+ account when 1st column is moved.
+ * [230123] Item can no more be expanded with keyboard if
+ setItemsExpandable has been set to false.
+
+- QTreeWidget
+ * [243165] selectAll didn't work before the widget was shown
+ * [238003] setCurrentItem would not expand the parent item
+ * [223130] Fixed drag&drop when sort is enabled that would only drop the
+ first column.
+ * [223950] Only allow to drag items when they have the
+ Qt::ItemIsDragEnabled flag set.
+ * [218661] Made sure our internal model can pass the "modeltest" test
+ suite.
+ * [217309] Fixed issue that caused data() for CheckStateRole to return
+ Checked even if some children were partially checked.
+ * [229807] Fix a redrawing problem when scrolling with a different palette
+ role set on Mac OS X.
+ * [236868] Prevent a crash when dragging an item hidden by a tooltip on
+ Mac OS X.
+
+- QLocale
+ * Added support for narrow format for day and month names.
+ * Day and month names can now also be fetched as a standalone text.
+
+- QDebug
+ * Values of type QBool are now properly outputted with QDebug.
+
+- QUndoStack
+ * [227714] Don't crash when owner group is deleted.
+
+- QUrl
+ * [204981] Made the QUrl tolerant parser more tolerant
+ * Fixed a bug in QUrl's tolerant parsing of stray % characters
+ (not part of %HH sequences), which would cause it to make the
+ URL even worse
+ * [227069] Fixed a bug that would cause QUrl to not parse URLs
+ whose hostnames start with an IP address (like
+ http://1.2.3.4.example.com)
+ * [230642] Fixed a bug that made QUrl not properly produce proper
+ URLs with relative paths
+ * Modified QUrl to not normalize %HH in URLs unless strictly
+ necessary. QUrl now keeps the original %-encoding of the input
+ unless some operation is executed in the QString
+ components. This also allows for %2f to exist in path components.
+
+- QVariant
+ * [215610] prevented assertion when reading from an invalid QDataStream.
+
+- QWidget
+ * [222323] [217819] [209977] Improve Qt's font and palette propagation.
+ * [218568] Revert and reopen task 176809 ("when using
+ Qt::PreventContextMenu policy, the context key menu is still not sent to
+ the widget").
+ * [220502] Ensure that setWindowFilePath() when called with an empty
+ string clears the proxy icon in Mac OS X.
+ * [240147] Enforce exclusivity between the Qt::WA_(Normal|Small|Mini)Size
+ * [168641] Ensure that tablet releases go to the correct widget on X11 and
+ Carbon (i.e., the widget that received the press).
+ * [192565] Fixed a problem with calling QWidget::render(), using a
+ QPrinter as a paint device.
+ * [236565] [168570] Fix regression on X11 where QWidget::restoreGeometry()
+ would restore incorrect geometry if the window was maximized when saved.
+ * [201655] Fix QWidget::scroll() acceleration issue with child widgets on
+ Mac OS X.
+ * [210734] [210734] Fixed a bug where changing the visibility of alien
+ widgets did not generate proper enter/leave events.
+ * [228764] Major improvement of scroll performance.
+ * [238258] [229067] [239678] Flickering with widgets larger than
+ 4096x4096 pixels in size.
+ * [141091] Added full support for Qt::WA_StaticContents.
+ * [238709] Fixed a bug where calling clearMask() did not update the view
+ properly.
+ * [213512] Fixed clipping issue with Qt::WA_PaintOutsidePaintEvent widgets.
+ * [230175] Added support for calling render() recursively.
+ * [238115] Fixed painting issues after calling winId().
+
+- QWindowsStyle
+ * [210069] Fixed a bug in the drawing of comboboxes.
+
+- QWindowsVistaStyle
+ * [221668] Respect background color role for item views.
+ * [227360] Current item now gets focus for multiselection views.
+ * [224251] Fixed incorrect painting of inverted and reversed progress
+ bars.
+ * [207836] Fixed a problem with vertical toolbar separators.
+ * [202895] Fixed problem where indeterminate progress bars were not
+ animated when Vista animations were explicitly disabled.
+ * [200899] Message box buttons are now right aligned.
+
+- QWindowsXPStyle
+ * [207242] Fixed a static memleak.
+ * [206418] Fixed missing focus rect on tool buttons.
+ * [188850] Fixed a problem with offsets for sliders.
+ * [110091] Tool buttons with arrows are not styled using black
+ windows arrows due to consistency issues with the native theme.
+
+- QWizard
+ * [204643] Make sure the maximum size of QWizard is computed properly.
+
+- QWorkspace
+ * [125281] fixed active child to be the same when minimizing and restoring
+ the main window.
+
+- QtWebKit
+ * ACID3 score 100 out of 100.
+ * Added support for plugins using Netscape Plugin API (NPAPI) for Windows,
+ Mac OS X, and X11.
+ * [211228] Fixed invisible focus rectangle on push buttons.
+ * [211256] Fixed dragging an image from the web view.
+ * [211273] Fixed static build of Qt with QtWebKit.
+ * [213966] Fixed wrong placement of native widget plugins after scrolling.
+ * [214946] Ensured native plugin instances are deleted properly.
+ * [217574] Fixed cursor problem on text input field after focus change.
+ * [218957] Fixed rendering of form elements when using Windows style.
+ * [219344] Added a remark that some web actions have an effect only
+ when contentEditable is true.
+ * [220127] Fixed mouse right click still allowed for disabled view.
+ * [222544] Added an option to print background elements.
+ * [222558] Fixed input method does not work after changing the focus.
+ * [222710, 222713] Fixed issues with TinyMCE editor.
+ * [223447] Ensured that CSS with relative path works on Windows.
+ * [224539] Fixed linkClicked() emitted only once for local anchor URLs.
+ * [225062] Fixed links do not work for QWebView embedded in QGraphicsScene.
+ * [227053] Fixed problem with percent encoded URLs.
+ * [230175] Fixed video rendering when embedded in Graphics View.
+ * [235270] Showed module name when plugin loading fails.
+ * [238330] Prevented multiple instantiation of native widget plugin.
+ * [238391] Prevented crash when printing to file is cancelled.
+ * [238662] Fixed function keys are not mapped.
+ * [241050] Implemented proper painting of CSS gradient.
+ * [241144] Ensured proper actions for some web action types.
+ * [241239] Ensured plugins are not loaded when disabled.
+ * [231301] Fixed an issue on Windows mobile when switching between input
+ modes.
+
+- Q3ButtonGroup
+ * [238902] Q3ButtonGroup now looks for children recursively rather than
+ just the direct children like it did in Qt 3.
+ * [200764] Fixed insertion of buttons with IDs in arbitrary order.
+
+- Q3FileDialog
+ * [230979] Fixed a crash after a resize and drag on scroll bars.
+
+- Q3MainWindow
+ * [240766] Crash while resizing the window while updating layouts.
+
+- Q3ListView
+ * [225648] Fixes infinite update.
+
+- Q3ProgressBar
+ * [132254] Fixed incorrect painting when totalSteps = 0.
+ * [231137] Fixes progress bar disappearing if you set a style sheet to the
+ application.
+
+- StyleSheets
+ * [224095] Fixed white space inside palette().
+ * Fixed setting style on the application may change the appearance of some
+ widgets.
+ * [209123] Fixed Stylesheets causing unnecessary paint events on
+ enterEvent() and leaveEvent().
+ * [209123] Fixed setting gradient background to custom widget.
+
+- QXmlQuery
+ * [223539] Summary: "node" and other typekind keywords are not allowed as
+ an element name when part of for loop.
+
+- QXmlStreamReader
+ * [207024] Added the QXmlStreamAttribute::hasAttribute() function.
+ * [231516] Regression: QXmlStreamWriter produces garbage in "version"
+ attribute of XMLDeclaration.
+
+****************************************************************************
+* Examples and demos *
+****************************************************************************
+
+- Pad Navigator example
+ * [236416] Provide a minimum window size for this example.
+ * [208616] No longer builds in console mode on Windows.
+
+- Diagram Scene example
+ * [244996] Fix crash when changing the font of a text item and then
+ select other items.
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+- Interbase driver
+
+- MySQL driver
+
+****************************************************************************
+* QTestLib *
+****************************************************************************
+
+ - QTestLib now supports writing benchmarks.
+ - Fixed an issue where tests returned exit code 0, even though tests
+ failed in some rare cases.
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Unix
+ * Made the iconv-based QTextCodec class (the "System" codec on
+ Unix systems that support it) stateful. So it's now possible to
+ feed incomplete multibyte sequences to the toUnicode function,
+ as well as the first character in a UTF-16 surrogate pair.
+
+X11
+ * Added a QGtkStyle to integrate with GTK+ based desktop environments.
+ * If font config is used the default font-substitutions will no longer be
+ used instead we rely on fontconfig to determine font substitutions as
+ required.
+ * Improved support for KDE4 desktop settings.
+ * [214071] Improved support for custom freedesktop icon themes.
+ * [195256] Use FreeType's subpixel filtering if available, thus honoring
+ Font Config's LCD filter settings.
+ * Added supported for XFIXES X11 extension for proper clipboard
+ support when non-Qt application owns the clipboard.
+ * Icon support for top level windows (_NET_WM_ICON) was improved
+ to support several icons with different sizes.
+ * [211240] In some cases QFileSystemWatcher didn't notify about
+ files that were moved over another files.
+ * [238743] Added support for the _NET_SYSTEM_TRAY_VISUAL property
+ to use the same visual the system tray manager asks us to use.
+ * [229593] Fix font matching with old fontconfig versions.
+ * [167873] Proper event compression for mouse events when using tablets.
+ * [208181] Fix averageCharWidth to be consistent for y!=x ppem
+ * [229070] Fix QPrintDialog assertion
+ * [211678] Fixed a problem with drawing a QPixmaps on different X11
+ screens.
+ * [221362] Fixed a problem where pixmaps only appeared on the first page
+ in a print preview.
+ * [232666] Fixed a problem with custom page sizes for CUPS printers.
+ * [228770] Fixed a problem that caused the .ps and .pdf filename
+ extensions
+ to not update in the CUPS printer dialog when printing to file.
+ * [230372] Fixed a problem where the number of copies set on a QPrinter
+ object wasn't picked up and updated properly in a QPrintDialog.
+
+Windows
+ * Cleartype rendering was previously supported onto QImages with
+ an ARGB32 channel. For performance reasons, cleartype is now
+ only supported on opaque images using the RGB32 or
+ ARGB32_Premultipled format. Widget and pixmap rendering is
+ unchanged
+ * [175075] Antialiased font rendering quality has been greatly improved
+ by taking gamma correction into account. We should now match the native
+ Windows font rendering better, and the fonts look better in general when
+ drawing fonts on different backgrounds.
+ * [221132] Fixed a problem with System Tray menu visibility.
+ * [221653] Fixed a problem incorrectly causing a Task Bar status change.
+ * [202890] Improved platform consistency with spacing in menus.
+ * [157323] QCombobox now slides to open on relevant platforms.
+ * [237067] Calling showMessage on QSystemTrayIcon with empty arguments
+ now hides the current message.
+ * [145612] Setting an object name for a QThread sets the name that
+ is visible in the debugger for more easy debugging
+ multi-threaded application.
+ * [216664] QLocale now follows the current system locale when the
+ user changes it in the Windows Control Panel.
+ * [223921] Fix writing system detection of TrueType fonts added
+ via a QByteArray in QFontDatabase::addApplicationFont on Windows.
+ * [205455] 'mailto:' links works properly with QDesktopServices::openUrl().
+ * [205516] standardPalette() now returns the system palette for XP and
+ Vista styles.
+ * [207506] Fixed an issue which switches the alignment for input widgets
+ on Vista.
+ * [223951] Added support for VARIANT with IDispatch in ActiveQt.
+ * [224910] Fixed a crash when using the Hierarchy ActiveQt example.
+ * [201223] 'dumpcpp' now prepends the 'classname_' to resolve conflicts.
+ * [198556] QAxServer registering now takes care of '.' before MIME
+ extension.
+ * [223973] Fixed a deadlock in QLocalSocket.
+ * [193077] Fixed activation of ActiveQt widgets in MFC MDI applications.
+ * [238273] Fixed a crash while editing QTableView using japanese IME.
+ * [238672] Fixed a crash when deleting a widget while dragging.
+ * [241901] ActiveQt now supports [out VARIANT*] parameters.
+ * Fix a GDI object leak on the qfileiconprovider.
+ * [200269] Application and systray icons on Windows that had an alpha
+ channel were not drawn correctly.
+ * [239558] Fix a possible crash when reading XPM data containing trigraphs
+ with the Microsoft compilers.
+ * [204440] Fixed a problem with software rendering contexts on Windows,
+ which might have caused rendering errors due to to unresolved extension
+ pointers.
+ * [232263] Fixed a problem with binding textures to a software context
+ under Windows.
+ * [238715] Fixed a problem with alpha-blended cursors under Windows.
+ * [227297] and [232666] Fixed some problems with custom paper
+ sizes under Windows.
+ * [217259] The default printer wasn't correcly detected with some versions
+ of Windows.
+ * [212886] Fixed a problem with network printers not being listed by
+ the QPrinterInfo::availablePrinters() function under Windows.
+ * [205985] Fixed a problem with reusing a QPrinter object to print several
+ jobs with the Microsoft XPS printer driver.
+ * [196281] Fixed QPrinter::setPrintRange() to work under Windows.
+
+Windows CE
+ * Support for QLocalSocket and QLocalServer added.
+ * QtWebKit and Phonon are now supported.
+ * One can mark a widget with the attribute WA_ExpectsKeyboardInput
+ to automatically display / hide the standard input panel on focus
+ events.
+ * [223523] Reimplementations of standard library functions filled the
+ global namespace causing problems when linking statically to other third
+ party libraries using the same attempt.
+ * Support for using OpenSSL with Qt on Windows CE
+
+Mac OS X
+ * Added the macdeployqt tool that simplifies application deployment.
+ * Improved support of widget stylesheet in Mac.
+ * [218980] - Stacking order of windows and dialogs is fixed, such that
+ dialogs always floats above normal windows, even when the dialog is told
+ to behave as a window.
+ * [219844] - A crash that occurred when using the search buttons on a
+ native file dialog is fixed.
+ * [225705] - FileDialog filters not displaying correctly is fixed.
+ * [239155] - Pop-ups will now close when clicking on a window other than
+ the modal window that opened the pop-up.
+ * [210912] - Show event not sent when reshowing a window from minimized
+ state is fixed.
+ * [228017] - QMenu will now close when expanding a system menu.
+ * Added support for Qt to use Cocoa as its backend instead of Carbon. This
+ is primarily for 64-bit applications, but is also available for 32-bit
+ frameworks as well. 32-bit is still Carbon by default. Passing a 64-bit
+ architecture or -cocoa on the command-line will build Qt against Cocoa.
+ Using Cocoa requires Mac OS X 10.5 (or higher) and cannot be used with
+ the -static nor -no-frameworks option. The define QT_MAC_USE_COCOA is
+ available when Qt is built against Cocoa.
+ * Fix a bug that would prevent a window that had been maximized via
+ setMaximized() to go back to normal size when clicking on the window's
+ maximize button.
+ * Added QMacCocoaViewContainer for embedding Cocoa (NSView) controls into
+ a Qt hierarchy. This feature works for either Carbon or Cocoa, but
+ requires Mac OS X 10.5 or greater.
+ * Added QMacNativeWidget for embedding Qt widgets into non-Qt windows
+ (Carbon or Cocoa).
+ * Added MacWindowToolBarButtonHint for controlling whether or not the
+ toolbar button is shown in Qt windows.
+ * QEvents posted via QEventLoop::postEvent() are now treated as a standard
+ event loop source, like timers and normal input events. This means that
+ is should no longer be necessary to run a busy loop to sendPostedEvents()
+ when QApplication is not the main event loop (e.g. when using Qt in a
+ plugin).
+ * [239646] Shortcuts for sub-menu are now disabled when the menu item is
+ disabled.
+ * [241434] Honor the LSBackgroundOnly attribute if it exists in the
+ application's Info.plist.
+ * [239908] More robustness when encountering different types in reading
+ LSUIElement value.
+ * [234742] Add support Qt::XButton1 and Qt::XButton2.
+ * [236203] Much better support for loading multiple Qt's with different
+ namespaces.
+ * Add Qt::AA_MacPluginApplication that allows bypassing some native menu
+ bar initialization that is usually not desired when running Qt in a
+ plugin.
+ * [205297] Applications Dialogs are now marked as application modal in
+ Carbon.
+ * Tooltip base is now set correctly in the application palette.
+ * [222912] [241603] Qt applications no longer reset their palette back to
+ the system palette on every application activate. Only if the values
+ from the system are different from the last time. This should result in
+ custom palette colors/brushes being kept across application activations.
+ * [211758] Fixed a clipping problem when printing multiple pages on a Mac
+ OS X printer.
+ * [212884] Fixed a crash when printing images on Mac OS X.
+ * [219877] Fixed a problem with a QPrinter object not being valid after
+ setting the output format to PDF or PostScript.
+ * [229406] Fixed crash when display mirroring gets enabled.
+ * [189588] Fixed a bug where QColorDialog::getColor(...) always returned a
+ valid color.
+
+Qt for Embedded Linux
+ - Screen drivers
+ * The SVGAlib driver is no longer supported, due to architectural changes.
+ * [235785] Detect VGA16 video mode and warn that it is not supported.
+
+ - Mouse and keyboard drivers
+ * [243374] Fixed bug where PC mouse driver could not be loaded when
+ configured as loadable plugins.
+ * Added Linux Input Subsystem mouse and keypad drivers
+
+ - General fixes
+ * [242922] Run as server by default when compiled with the
+ QT_NO_QWS_MULTIPROCESS macro defined.
+ * Fixed bugs where wrong cursor would be shown in some cases.
+ * Respect min/max size on initial show also for windows without a layout.
+ * Fixed loading of font plugins when QT_NO_FREETYPE is defined.
+ * Autodetect PowerPC in configure.
+ * Add support for precompiled headers.
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+ * [218795] add support for -nomake configure option on Windows to
+ exclude build parts like on other platforms
+ * The -tablet configure option on X11 was renamed to -xinput
+ * [136723] Have moc issue a warning if a Q_PROPERTY declaration does not
+ contain a READ accessor function.
+ * [188529] Fixed bug that caused moc to get stuck in an infinite loop if
+ two files included eachother and the include path had the prefix "./".
+ * [203379] Changed moc code generator so that lint no longer reports
+ problems with the generated code.
+ * [210879] moc no longer generates any implementation for pure virtual
+ signals.
+ * [234909] Fixed bug that caused moc to treat /*/ as a full C comment.
+
+- Assistant
+
+- Designer
+ * Added filter widgets in Widget Box and Property Editor.
+ * Added layout state display to Object Inspector.
+ * Enabled changing the layout type of laid-out containers.
+ * Added handling of spanning QFormLayout columns.
+ * Added convenience dialog to quickly populate QFormLayouts.
+ * Added support for embedded device design profiles.
+ * Changed the selection modifiers to comply to standards; enabled
+ rectangle selection using the middle mouse button; added
+ shift-click-modifier to cycle parents when selecting.
+ * Added "translatable" flag and disambiguation comment to string
+ properties.
+ * Added attribute editors to item-based widgets.
+ * Changed QUiLoader to use QXmlStreamReader instead of QDom.
+ * Ui files with unknown elements are now rejected.
+ * [123592] While dropping a dock widget a main window - make the dock
+ "docked".
+ * [126269] Added the ability to morph widgets into compatible widgets.
+ * [126997] Added support for QButtonGroup.
+ * [145813] Added a listing function to obtain the available layouts to
+ QUiLoader.
+ * [155837] Added support for QWizard.
+ * [164520] Added automatic detection of changes to the qrc resource files
+ from external sources.
+ * [166501] Added "translatable" checkbox to string properties making it
+ possible to exclude it from the translation.
+ * [171900] Indicate Qt 3 compatibility signals and slots using a different
+ color.
+ * [173873] Position pasted widgets at mouse position if possible.
+ * [183637] Introduced Widget Box "Icon view" mode to reduce scrolling,
+ available via context menu.
+ * [183671] Added automatic retranslation upon language change of UIs
+ loaded via QUiLoader.
+ * [185283] Added incremental search facility to Object Inspector.
+ * [191789] Added pkgconfig-Files for Qt Designer libraries.
+ * [198414] Enabled promotion of QMenu/QMenuBar by object inspector context
+ menu.
+ * [201505] Extended QDesignerIntegration::objectNameChanged() to pass on
+ old object name.
+ * [202256] Fixed action editor and object inspector not to resize header
+ when switching forms.
+ * [211422] Fixed QScrollArea support to handle custom QScrollArea widgets
+ with internal children.
+ * [211906] Enable promotion of unmanaged widgets by object inspector
+ context menu.
+ * [211962] Enabled widgets to span columns in a QFormLayout.
+ * [212378] Made the rich text editor dialog, the plain text editor dialog
+ and the style sheet editor dialog remember their geometry.
+ * [213481] Fixed a crash while form loading by preventing it from
+ adding layouts to unknown layout types.
+ * [219381] Fixed Action editor to reflect changing the shortcut in the
+ property editor.
+ * [219382] Added tooltip, checkable and shortcut properties to the action
+ editor dialog.
+ * [219405] Added support for the stretch and minimum size properties of
+ QBoxLayout and QGridLayout.
+ * [219492] Added an icon preview to the resource image file dialog on X11.
+ * [220148] Fixed handling of the QMainWindow::unifiedTitleAndToolBarOnMac
+ property.
+ * [223114] Fixed a crash on removing a dynamic QUrl property.
+ * [229568] Added Q3ComboBox.
+ * [230818] Fixed a bug which caused duplicate names to occur when
+ copying & pasting spacers.
+ * [233403] Fixed a painting bug which caused red line layout markers to
+ disappear depending on grid settings.
+ * [233711] Added a warning when saving a container-extension-type
+ container with unmanaged pages.
+ * [234222] Fixed a bug which caused the autoFillBackground property to be
+ reset during Drag and Drop operations.
+ * [234326] Fixed the QDesignerIntegration::objectNameChanged() signal to
+ work correctly.
+ * [236193] Fixed a crash caused by invalid QSizePolicy values resulting
+ from Qt 3 conversion.
+ * [238524] Ignore constructor-added items of custom widgets inheriting
+ QComboBox.
+ * [238707] Fixed pkgconfig file generation to honour -qt-libinfix.
+ * [238907] Disabled reordering of Spacers and Layouts causing uic to
+ warn "<name> isn't a valid widget".
+ * [232811] Correctly show empty string values in preview.
+ * [214637] Single click expands/collapses classes in property editor
+ * [241949] Update the object inspector properly in case of undoing a
+ reparent widget command.
+
+- uic
+ * Ui files with unknown XML elements are now rejected.
+ * [220796] Added code for adding items to widgets of class Q3ComboBox.
+
+- uic3
+
+ * [231911] Fixed the conversion of boolean font attributes.
+ * [233802] Fixed -extract option on Windows.
+ * [236193] Fixed the conversion of QSizePolicy's "Ignored" value.
+
+- Linguist
+
+ - Linguist GUI
+
+ * Much improved form preview tool
+ * Removed translations column from message index for it being useless.
+ * Phrasebooks have language settings now
+ * [141788] Support translating into multiple languages simultaneously.
+ * [183210] Whitespace is now visualized
+ * [182866] Font resizing in translation textedits
+ * [187765] Support opening files via Drag & Drop
+
+ - Entire Linguist toolchain
+
+ - [201713] Add support for specifying the source language.
+
+ - file formats
+
+ * The .qm files now can be read back by the toolchain, not only Qt.
+ * Added support for GNU Gettext .po files.
+
+ - Qt's own .ts format
+
+ * New element <extracomment> to store purely informative comments
+ * New element <translatorcomment> to store comments from translators
+ * New element wildcard <extra:*> to support user extensions
+ * New elements <oldsource> and <oldcomment> to store values from
+ before the last heuristic merge by lupdate
+
+ - lupdate
+
+ * Parse //: and /*: */ comments as extra comments for translations.
+ * Added support for new QT_TR*() macros.
+ * Added support for QtScript.
+ * Better error reporting.
+ * More accurate processing of .pro files.
+ * Added options -disable-heuristic, -nosort, -target-language,
+ -source-language.
+ * [197391] Support for storing source code references with relative
+ line numbers or no references at all. Omit line numbers from .ui file
+ references at all. These reduce the size of patches and avoid merge
+ conflicts. Option -locations.
+ * [197818] Add support for UTF-16 encoded sources.
+ * [209778, 222637] Somewhat improved C++ parser, in particular with
+ respect to namespaces.
+ * [218671] Accept Q_DECLARE_TR_FUNCTIONS.
+ * [212465] Default context is now the empty string, not "@default".
+ This codifies what previously was an intermittent bug.
+ * [220459] Collect all source code references for each message.
+
+ - lconvert
+
+ * New tool for converting between file formats and filtering file contents.
+
+- configure
+
+- qtconfig
+ * Added option to set style and palette settings back to system defaults.
+
+- qt3to4
+ * [218928] [219127] [219132] [219482] Misc. updates to the porting replacement rules.
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+- QTiffPlugin
+- QSvgIconEngine
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+- Event filters
+
+- QFileDialog
+ On Mac, native dialogs are now used when calling show, open, or exec
+ on a QFileDialog, QColorDialog, QPrintDialog, or QFontDialog (i.e not
+ only when using the static functions)
+
+ QFileDialog/QFileSystemModel always return Qt separators ("/")
+ regardless of the platform. It can still handle native separators for
+ Windows. To convert the Qt separators to native separators use
+ QDir::toNativeSeparators().
+
+- QGraphicsTextItem
+ Tab input is send to the document by default, inserting a <tab>
+ character. You can get the old behavior of switching Tab focus by
+ setting setTabChangesFocus(true) (QGraphicsTextItem's Tab handling now
+ behaves identically to QTextEdit and QTextBrowser).
+
+- QGraphicsView
+ QGraphicsView now propagates Qt::Key_Tab and Qt::Key_Backtab to the
+ scene, which sends this to the items. Similar to how QWidget works,
+ this event is caught in QGraphicsItem::sceneEvent() and
+ QGraphicsWidget::event() to handle tab input. Tab input is also
+ proxied to embedded widgets. This allows and item or widget to handle
+ Tab keys (e.g., text input).
+
+- QLocale
+ The locale database was updated to the Unicode CLDR database
+ version 1.6.1
+
+ When the system locale is changed, the LocaleChange event will
+ be sent to all widgets that don't have a locale explicitely
+ set.
+
+- QWebPage
+ Starting with Qt 4.5, the base brush is used for the default
+ background color of the web page. Before, it was the background
+ brush.
+
+- QWidget
+ Font and palette settings assigned to QWidget directly take
+ precedence over application fonts and palettes.
+
+ Focus policies that are set on a widget are now propagated to
+ a focus proxy widget if there is one.
+
+ Windows with fixed size (that are set with QWidget::setFixedSize()
+ function or Qt::MSWindowsFixedSizeDialogHint window hint) might
+ not have a maximize button on the titlebar.
+
+ The behaviour of the window hints was changed to follow the
+ documentation. When the Qt::CustomizeWindowHint is set, the
+ window will not have a titlebar, system menu and titlebar
+ buttons unless the corresponding window hints were explicitely
+ set.
+
+ Setting Qt::WA_PaintOnScreen no longer has any effect on
+ normal widgets. The flag can still be used in conjuction with
+ reimplementing paintEngine() to return 0 so that GDI or
+ DirectX can be used, as previously documented.
diff --git a/doc/doc.pri b/doc/doc.pri
new file mode 100644
index 0000000..6b77f88
--- /dev/null
+++ b/doc/doc.pri
@@ -0,0 +1,72 @@
+#####################################################################
+# Qt documentation build
+#####################################################################
+
+win32 {
+ QT_WINCONFIG = release/
+ CONFIG(debug, debug|release) {
+ QT_WINCONFIG = debug/
+ }
+}
+
+DOCS_GENERATION_DEFINES = -Dopensourceedition
+GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator
+
+win32:!win32-g++ {
+ unixstyle = false
+} else :win32-g++:isEmpty(QMAKE_SH) {
+ unixstyle = false
+} else {
+ unixstyle = true
+}
+
+$$unixstyle {
+ QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3 $$DOCS_GENERATION_DEFINES
+} else {
+ QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/$${QT_WINCONFIG}qdoc3.exe $$DOCS_GENERATION_DEFINES
+ QDOC = $$replace(QDOC, "/", "\\\\")
+}
+macx {
+ ADP_DOCS_QDOCCONF_FILE = qt-build-docs-with-xcode.qdocconf
+} else {
+ ADP_DOCS_QDOCCONF_FILE = qt-build-docs.qdocconf
+}
+QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \
+ linguist.qdocconf qmake.qdocconf) && \
+ (cd $$QT_BUILD_TREE && \
+ $$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \
+ $$GENERATOR doc-build/html-assistant/assistant.qhp -o doc/qch/assistant.qch && \
+ $$GENERATOR doc-build/html-designer/designer.qhp -o doc/qch/designer.qch && \
+ $$GENERATOR doc-build/html-linguist/linguist.qhp -o doc/qch/linguist.qch && \
+ $$GENERATOR doc-build/html-qmake/qmake.qhp -o doc/qch/qmake.qch \
+ )
+
+win32-g++:isEmpty(QMAKE_SH) {
+ QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\")
+}
+
+
+!wince*:!cross_compile:SUBDIRS += tools/qdoc3
+
+# Build rules:
+adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE)
+adp_docs.depends += sub-tools-qdoc3
+qch_docs.commands = $$QT_DOCUMENTATION
+qch_docs.depends += sub-tools
+
+docs.depends = adp_docs qch_docs
+
+# Install rules
+htmldocs.files = $$QT_BUILD_TREE/doc/html
+htmldocs.path = $$[QT_INSTALL_DOCS]
+htmldocs.CONFIG += no_check_exist
+
+qchdocs.files= $$QT_BUILD_TREE/doc/qch
+qchdocs.path = $$[QT_INSTALL_DOCS]
+qchdocs.CONFIG += no_check_exist
+
+docimages.files = $$QT_BUILD_TREE/doc/src/images
+docimages.path = $$[QT_INSTALL_DOCS]/src
+
+QMAKE_EXTRA_TARGETS += qdoc adp_docs qch_docs docs
+INSTALLS += htmldocs qchdocs docimages
diff --git a/doc/src/3rdparty.qdoc b/doc/src/3rdparty.qdoc
new file mode 100644
index 0000000..a87878e
--- /dev/null
+++ b/doc/src/3rdparty.qdoc
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page 3rdparty.html
+
+ \title Third-Party Licenses Used in Qt
+ \ingroup licensing
+ \brief License information for third-party libraries supplied with Qt.
+
+ Qt includes a number of third-party libraries that are used to provide
+ certain features. Unlike the code described in the
+ \l{Other Licenses Used in Qt}{code used in Qt} document, these
+ libraries are supplied alongside the Qt modules.
+
+ Third Party Software may impose additional restrictions and it is the
+ user's responsibility to ensure that they have met the licensing
+ requirements of the GPL, LGPL, or Qt Commercial license and the relevant
+ license of the Third Party Software they are using.
+
+ Run \c{configure -help} to see any options that may be available for
+ controlling the use of these libraries.
+
+ \tableofcontents
+
+ \section1 FreeType 2 (\c freetype) version 2.3.6
+
+ \e{The FreeType project is a team of volunteers who develop free, portable
+ and high-quality software solutions for digital typography. We specifically
+ target embedded systems and focus on bringing small, efficient and
+ ubiquitous products.} -- quoted from \c 3rdparty/freetype/docs/freetype2.html.
+
+ See \c src/3rdparty/freetype/docs/FTL.txt and \c
+ src/3rdparty/freetype/docs/GPL.txt for license details.
+
+ See also the files in \c src/3rdparty/harfbuzz, which are used by
+ FreeType.
+
+ Parts of the FreeType projects have been modified and put into Qt
+ for use in the painting subsystem. These files are ftraster.h,
+ ftraster.c, ftgrays.h and ftgrays.c. The following modifications
+ has been made to these files:
+
+ \list
+ \i Renamed FT_ and ft_ symbols to QT_FT_ and qt_ft_ to avoid name
+ conflicts.
+ \i Removed parts of code not relevant when compiled with
+ _STANDALONE_ defined.
+ \i Changed behavior in ftraster.c to follow X polygon filling
+ rules.
+ \i Implemented support in ftraster.c for winding / odd even
+ polygon fill rules.
+ \i Replaced bitmap generation with span generation in ftraster.c
+ \i Renamed: ftraster.h to qblackraster_p.h
+ \i Renamed: ftraster.c to qblackraster.c
+ \i Renamed: ftgrays.h to qgrayraster_p.h
+ \i Renamed: ftgrays.c to qgrayraster.c
+ \endlist
+
+ \section1 HarfBuzz (\c harfbuzz)
+
+ \e{This is HarfBuzz, an OpenType Layout engine.}
+
+ \e{It was derived originally from the OpenType code in FreeType-1.x, ported to
+ FreeType2. (This code has been abandoned for FreeType2, but until something
+ better comes along, should serve our purposes.) In addition to porting to
+ FreeType-2, it has been modified in various other ways.} -- quoted from
+ \c src/3rdparty/harfbuzz/README.
+
+ See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL
+ for license details.
+
+ \section1 MD5 (\c md5.cpp and \c md5.h)
+
+ \e{This code implements the MD5 message-digest algorithm.
+ The algorithm is due to Ron Rivest. This code was
+ written by Colin Plumb in 1993, no copyright is claimed.
+ This code is in the public domain; do with it what you wish.} -- quoted from
+ \c src/3rdparty/md5/md5.h
+
+ See \c src/3rdparty/md5/md5.cpp and \c src/3rdparty/md5/md5.h for more
+ information about the terms and conditions under which the code is
+ supplied.
+
+ \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 6b
+
+ \e{This package contains C software to implement JPEG image compression and
+ decompression. JPEG (pronounced "jay-peg") is a standardized compression
+ method for full-color and gray-scale images. JPEG is intended for compressing
+ "real-world" scenes; line drawings, cartoons and other non-realistic images
+ are not its strong suit. JPEG is lossy, meaning that the output image is not
+ exactly identical to the input image.} -- quoted from \c
+ src/3rdparty/libjpeg/README.
+
+ See \c src/3rdparty/libjpeg/README for license details.
+
+ \section1 MNG Library (\c libmng) version 1.0.10
+
+ \e{The libmng library supports decoding, displaying, encoding, and various
+ other manipulations of the Multiple-image Network Graphics (MNG) format
+ image files. It uses the zlib compression library, and optionally the
+ JPEG library by the Independant JPEG Group (IJG) and/or
+ lcms (little cms), a color-management library by Marti Maria Saguer.}
+ -- quoted from \c src/3rdparty/libmng/doc/libmng.txt
+
+ See \c src/3rdparty/libmng/LICENSE for license details.
+
+ \section1 PNG Reference Library (\c libpng) version 1.2.29
+
+ \e{Libpng was written as a companion to the PNG specification, as a way
+ of reducing the amount of time and effort it takes to support the PNG
+ file format in application programs.} -- quoted from \c
+ src/3rdparty/libpng/libpng.txt.
+
+ See \c src/3rdparty/libpng/LICENSE for license details.
+
+ \section1 TIFF Software Distribution (\c libtiff) version 3.8.2
+
+ \e {libtiff is a set of C functions (a library) that support the
+ manipulation of TIFF image files.} -- quoted from \c
+ src/libtiff/html/libtiff.html
+
+ \hr
+
+ Copyright (c) 1988-1997 Sam Leffler\br
+ Copyright (c) 1991-1997 Silicon Graphics, Inc.\br
+ Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>\br
+ Copyright (c) 1997 Greg Ward Larson
+
+ Permission to use, copy, modify, distribute, and sell this software and
+ its documentation for any purpose is hereby granted without fee, provided
+ that (i) the above copyright notices and this permission notice appear in
+ all copies of the software and related documentation, and (ii) the names of
+ Sam Leffler and Silicon Graphics may not be used in any advertising or
+ publicity relating to the software without the specific, prior written
+ permission of Sam Leffler and Silicon Graphics.
+
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+ IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ OF THIS SOFTWARE.
+
+ \hr
+
+ Copyright (c) 1996-1997 Sam Leffler\br
+ Copyright (c) 1996 Pixar
+
+ Permission to use, copy, modify, distribute, and sell this software and
+ its documentation for any purpose is hereby granted without fee, provided
+ that (i) the above copyright notices and this permission notice appear in
+ all copies of the software and related documentation, and (ii) the names of
+ Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
+ publicity relating to the software without the specific, prior written
+ permission of Pixar, Sam Leffler and Silicon Graphics.
+
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+ IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ OF THIS SOFTWARE.
+
+ \hr
+
+ See \c src/3rdparty/libtiff/COPYRIGHT for license details.
+
+ \section1 SQLite (\c sqlite) version 3.5.9
+
+ \e{SQLite is a small C library that implements a
+ self-contained, embeddable, zero-configuration SQL database engine.}
+ -- quoted from \l{http://www.sqlite.org/}{www.sqlite.org}.
+
+ According to the comments in the source files, the code is in the public
+ domain. See the
+ \l{http://www.sqlite.org/copyright.html}{SQLite Copyright} page on the
+ SQLite web site for further information.
+
+ \section1 Wintab API (\c wintab)
+
+ Wintab is a de facto API for pointing devices on Windows. The
+ wintab code is from \l{http://www.pointing.com/WINTAB.HTM}.
+
+ See \c src/3rdparty/wintab/wintab.h for license details.
+
+ \section1 Data Compression Library (\c zlib) version 1.2.3
+
+ \e{zlib is a general purpose data compression library. All the code
+ is thread safe. The data format used by the zlib library is described
+ by RFCs (Request for Comments) 1950 to 1952} -- quoted from \c
+ src/3rdparty/zlib/README.
+
+ See \c src/3rdparty/zlib/README for license details.
+
+ \section1 The ptmalloc memory allocator (\c ptmalloc3) version 1.8
+
+ \e ptmcalloc3 is a scalable concurrent memory allocator suitable
+ for use in multi-threaded programs.
+
+ \hr
+
+ Copyright (c) 2001-2006 Wolfram Gloger
+
+ Permission to use, copy, modify, distribute, and sell this software
+ and its documentation for any purpose is hereby granted without fee,
+ provided that (i) the above copyright notices and this permission
+ notice appear in all copies of the software and related documentation,
+ and (ii) the name of Wolfram Gloger may not be used in any advertising
+ or publicity relating to the software.
+
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+ IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL,
+ INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY
+ DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
+ OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+
+ \hr
+
+ See \c src/3rdparty/ptmalloc/COPYRIGHT for license details.
+*/
diff --git a/doc/src/accelerators.qdoc b/doc/src/accelerators.qdoc
new file mode 100644
index 0000000..538a245
--- /dev/null
+++ b/doc/src/accelerators.qdoc
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page accelerators.html
+ \title Standard Accelerator Keys
+ \ingroup gui-programming
+
+ Applications invariably need to define accelerator keys for actions.
+ Qt fully supports accelerators, for example with \l Q3Accel::shortcutKey().
+
+ Here are Microsoft's recommendations for accelerator keys, with
+ comments about the Open Group's recommendations where they exist
+ and differ. For most commands, the Open Group either has no advice or
+ agrees with Microsoft.
+
+ The emboldened letter plus Alt is Microsoft's recommended choice, and
+ we recommend supporting it. For an Apply button, for example, we
+ recommend QAbstractButton::setText(\link QWidget::tr() tr \endlink("&Apply"));
+
+ If you have conflicting commands (e.g. About and Apply buttons in the
+ same dialog), you must decide for yourself.
+
+ \list
+ \i \bold{\underline{A}}bout
+ \i Always on \bold{\underline{T}}op
+ \i \bold{\underline{A}}pply
+ \i \bold{\underline{B}}ack
+ \i \bold{\underline{B}}rowse
+ \i \bold{\underline{C}}lose (CDE: Alt+F4; Alt+F4 is "close window" in Windows)
+ \i \bold{\underline{C}}opy (CDE: Ctrl+C, Ctrl+Insert)
+ \i \bold{\underline{C}}opy Here
+ \i Create \bold{\underline{S}}hortcut
+ \i Create \bold{\underline{S}}hortcut Here
+ \i Cu\bold{\underline{t}}
+ \i \bold{\underline{D}}elete
+ \i \bold{\underline{E}}dit
+ \i \bold{\underline{E}}xit (CDE: E\bold{\underline{x}}it)
+ \i \bold{\underline{E}}xplore
+ \i \bold{\underline{F}}ile
+ \i \bold{\underline{F}}ind
+ \i \bold{\underline{H}}elp
+ \i Help \bold{\underline{T}}opics
+ \i \bold{\underline{H}}ide
+ \i \bold{\underline{I}}nsert
+ \i Insert \bold{\underline{O}}bject
+ \i \bold{\underline{L}}ink Here
+ \i Ma\bold{\underline{x}}imize
+ \i Mi\bold{\underline{n}}imize
+ \i \bold{\underline{M}}ove
+ \i \bold{\underline{M}}ove Here
+ \i \bold{\underline{N}}ew
+ \i \bold{\underline{N}}ext
+ \i \bold{\underline{N}}o
+ \i \bold{\underline{O}}pen
+ \i Open \bold{\underline{W}}ith
+ \i Page Set\bold{\underline{u}}p
+ \i \bold{\underline{P}}aste
+ \i Paste \bold{\underline{L}}ink
+ \i Paste \bold{\underline{S}}hortcut
+ \i Paste \bold{\underline{S}}pecial
+ \i \bold{\underline{P}}ause
+ \i \bold{\underline{P}}lay
+ \i \bold{\underline{P}}rint
+ \i \bold{\underline{P}}rint Here
+ \i P\bold{\underline{r}}operties
+ \i \bold{\underline{Q}}uick View
+ \i \bold{\underline{R}}edo (CDE: Ctrl+Y, Shift+Alt+Backspace)
+ \i \bold{\underline{R}}epeat
+ \i \bold{\underline{R}}estore
+ \i \bold{\underline{R}}esume
+ \i \bold{\underline{R}}etry
+ \i \bold{\underline{R}}un
+ \i \bold{\underline{S}}ave
+ \i Save \bold{\underline{A}}s
+ \i Select \bold{\underline{A}}ll
+ \i Se\bold{\underline{n}}d To
+ \i \bold{\underline{S}}how
+ \i \bold{\underline{S}}ize
+ \i S\bold{\underline{p}}lit
+ \i \bold{\underline{S}}top
+ \i \bold{\underline{U}}ndo (CDE: Ctrl+Z or Alt+Backspace)
+ \i \bold{\underline{V}}iew
+ \i \bold{\underline{W}}hat's This?
+ \i \bold{\underline{W}}indow
+ \i \bold{\underline{Y}}es
+ \endlist
+
+ There are also a lot of other keys and actions (that use other
+ modifier keys than Alt). See the Microsoft and The Open Group
+ documentation for details.
+
+ The
+ \l{http://www.amazon.com/exec/obidos/ASIN/0735605661/trolltech/t}{Microsoft book}
+ has ISBN 0735605661. The corresponding Open Group
+ book is very hard to find, rather expensive and we cannot recommend
+ it. However, if you really want it, ogpubs@opengroup.org might be able
+ to help. Ask them for ISBN 1859121047.
+*/
diff --git a/doc/src/accessible.qdoc b/doc/src/accessible.qdoc
new file mode 100644
index 0000000..090da86
--- /dev/null
+++ b/doc/src/accessible.qdoc
@@ -0,0 +1,600 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page accessible.html
+ \title Accessibility
+ \ingroup accessibility
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Accessibility in computer software is making applications usable
+ for people with disabilities. This could be achieved by providing
+ keyboard shortcuts, a high-contrast user interface that uses
+ specially selected colors and fonts, or support for assistive tools
+ such as screen readers and braille displays.
+
+ An application does not usually communicate directly with
+ assistive tools but through an assistive technology, which is a
+ bridge for exchange of information between the applications and
+ the tools. Information about user interface elements, such
+ as buttons and scroll bars, is exposed to the assistive technologies.
+ Qt supports Microsoft Active Accessibility (MSAA) on Windows and
+ Mac OS X Accessibility on Mac OS X.
+ On Unix/X11, support is preliminary. The individual technologies
+ are abstracted from Qt, and there is only a single interface to
+ consider. We will use MSAA throughout this document when we need
+ to address technology related issues.
+
+ In this overview document, we will examine the overall Qt
+ accessibility architecture, and how to implement accessibility for
+ custom widgets and elements.
+
+ \section1 Architecture
+
+ Providing accessibility is a collaboration between accessibility
+ compliant applications, the assistive technology, and the
+ assistive tools.
+
+ \image accessibilityarchitecture.png
+
+ Accessibility compliant applications are called AT-Servers while
+ assistive tools are called AT-Clients. A Qt application will
+ typically be an AT-Server, but specialized programs might also
+ function like AT-Clients. We will refer to clients and servers
+ when talking about AT-Clients and AT-Servers in the rest of this
+ document.
+
+ We will from now on focus on the Qt accessibility interface and
+ how it is implemented to create Qt applications that support
+ accessibility.
+
+ \section2 Accessibility in Qt
+
+ When we communicate with the assistive technologies, we need to
+ describe Qt's user interface in a way that they can understand. Qt
+ applications use QAccessibleInterface to expose information about the
+ individual UI elements. Currently, Qt provides support for its widgets
+ and widget parts, e.g., slider handles, but the interface could
+ also be implemented for any QObject if necessary. QAccessible
+ contains enums that describe the UI. The description is mainly
+ based on MSAA and is independent of Qt. We will examine the enums
+ in the course of this document.
+
+ The structure of the UI is represented as a tree of
+ QAccessibleInterface subclasses. You can think of this as a
+ representation of a UI like the QObject tree built by Qt. Objects
+ can be widgets or widget parts (such as scroll bar handles). We
+ examine the tree in detail in the next section.
+
+ Servers notify clients through \l{QAccessible::}{updateAccessibility()}
+ about changes in objects by sending events, and the clients
+ register to receive the events. The available events are defined
+ by the QAccessible::Event enum. The clients may then query for
+ the object that generated the event through
+ QAccessible::queryAccessibleInterface().
+
+ Three of the enums in QAccessible help clients query and alter
+ accessible objects:
+
+ \list
+ \o \l{QAccessible::}{Role}: Describes the role the object
+ fills in the user interface, e.g., if it is a main
+ window, a text caret, or a cell in an item view.
+ \o \l{QAccessible::}{Action}: The actions that the
+ clients can perform on the objects, e.g., pushing a
+ button.
+ \o \l{QAccessible::}{Relation}: Describes the relationship
+ between objects in the object tree.
+ This is used for navigation.
+ \endlist
+
+ The clients also have some possibilities to get the content of
+ objects, e.g., a button's text; the object provides strings
+ defined by the QAccessible::Text enum, that give information
+ about content.
+
+ The objects can be in a number of different states as defined by
+ the \l{QAccessible::}{State} enum. Examples of states are whether
+ the object is disabled, if it has focus, or if it provides a pop-up
+ menu.
+
+ \section2 The Accessible Object Tree
+
+ As mentioned, a tree structure is built from the accessible
+ objects of an application. By navigating through the tree, the
+ clients can access all elements in the UI. Object relations give
+ clients information about the UI. For instance, a slider handle is
+ a child of the slider to which it belongs. QAccessible::Relation
+ describes the various relationships the clients can ask objects
+ for.
+
+ Note that there are no direct mapping between the Qt QObject tree
+ and the accessible object tree. For instance, scroll bar handles
+ are accessible objects but are not widgets or objects in Qt.
+
+ AT-Clients have access to the accessibility object tree through
+ the root object in the tree, which is the QApplication. They can
+ query other objects through QAccessible::navigate(), which fetches
+ objects based on \l{QAccessible::}{Relation}s. The children of any
+ node is 1-based numbered. The child numbered 0 is the object
+ itself. The children of all interfaces are numbered this way,
+ i.e., it is not a fixed numbering from the root node in the entire
+ tree.
+
+ Qt provides accessible interfaces for its widgets. Interfaces for
+ any QObject subclass can be requested through
+ QAccessible::queryInterface(). A default implementation is
+ provided if a more specialized interface is not defined. An
+ AT-Client cannot acquire an interface for accessible objects that
+ do not have an equivalent QObject, e.g., scroll bar handles, but
+ they appear as normal objects through interfaces of parent
+ accessible objects, e.g., you can query their relationships with
+ QAccessible::relationTo().
+
+ To illustrate, we present an image of an accessible object tree.
+ Beneath the tree is a table with examples of object relationships.
+
+ \image accessibleobjecttree.png
+
+ The labels in top-down order are: the QAccessibleInterface class
+ name, the widget for which an interface is provided, and the
+ \l{QAccessible::}{Role} of the object. The Position, PageLeft and
+ PageRight correspond to the slider handle, the slider groove left
+ and the slider groove right, respectively. These accessible objects
+ do not have an equivalent QObject.
+
+ \table 40%
+ \header
+ \o Source Object
+ \o Target Object
+ \o Relation
+ \row
+ \o Slider
+ \o Indicator
+ \o Controller
+ \row
+ \o Indicator
+ \o Slider
+ \o Controlled
+ \row
+ \o Slider
+ \o Application
+ \o Ancestor
+ \row
+ \o Application
+ \o Slider
+ \o Child
+ \row
+ \o PushButton
+ \o Indicator
+ \o Sibling
+ \endtable
+
+ \section2 The Static QAccessible Functions
+
+ The accessibility is managed by QAccessible's static functions,
+ which we will examine shortly. They produce QAccessible
+ interfaces, build the object tree, and initiate the connection
+ with MSAA or the other platform specific technologies. If you are
+ only interested in learning how to make your application
+ accessible, you can safely skip over this section to
+ \l{Implementing Accessibility}.
+
+ The communication between clients and the server is initiated when
+ \l{QAccessible::}{setRootObject()} is called. This is done when
+ the QApplication instance is instantiated and you should not have
+ to do this yourself.
+
+ When a QObject calls \l{QAccessible::}{updateAccessibility()},
+ clients that are listening to events are notified of the
+ change. The function is used to post events to the assistive
+ technology, and accessible \l{QAccessible::Event}{events} are
+ posted by \l{QAccessible::}{updateAccessibility()}.
+
+ \l{QAccessible::}{queryAccessibleInterface()} returns accessible
+ interfaces for \l{QObject}s. All widgets in Qt provide interfaces;
+ if you need interfaces to control the behavior of other \l{QObject}
+ subclasses, you must implement the interfaces yourself, although
+ the QAccessibleObject convenience class implements parts of the
+ functionality for you.
+
+ The factory that produces accessibility interfaces for QObjects is
+ a function of type QAccessible::InterfaceFactory. It is possible
+ to have several factories installed. The last factory installed
+ will be the first to be asked for interfaces.
+ \l{QAccessible::}{queryAccessibleInterface()} uses the factories
+ to create interfaces for \l{QObject}s. Normally, you need not be
+ concerned about factories because you can implement plugins that
+ produce interfaces. We will give examples of both approaches
+ later.
+
+ \section1 Implementing Accessibility
+
+ To provide accessibility support for a widget or other user
+ interface element, you need to implement the QAccessibleInterface
+ and distribute it in a QAccessiblePlugin. It is also possible to
+ compile the interface into the application and provide a
+ QAccessible::InterfaceFactory for it. The factory can be used if
+ you link statically or do not want the added complexity of
+ plugins. This can be an advantage if you, for instance, are
+ delivering a 3-rd party library.
+
+ All widgets and other user interface elements should have
+ interfaces and plugins. If you want your application to support
+ accessibility, you will need to consider the following:
+
+ \list
+ \o Qt already implements accessibility for its own widgets.
+ We therefore recommend that you use Qt widgets where possible.
+ \o A QAccessibleInterface needs to be implemented for each element
+ that you want to make available to accessibility clients.
+ \o You need to send accessibility events from the custom
+ user interface elements that you implement.
+ \endlist
+
+ In general, it is recommended that you are somewhat familiar with
+ MSAA, which Qt originally was built for. You should also study
+ the enum values of QAccessible, which describe the roles, actions,
+ relationships, and events that you need to consider.
+
+ Note that you can examine how Qt's widgets implement their
+ accessibility. One major problem with the MSAA standard is that
+ interfaces are often implemented in an inconsistent way. This
+ makes life difficult for clients and often leads to guesswork on
+ object functionality.
+
+ It is possible to implement interfaces by inheriting
+ QAccessibleInterface and implementing its pure virtual functions.
+ In practice, however, it is usually preferable to inherit
+ QAccessibleObject or QAccessibleWidget, which implement part of
+ the functionality for you. In the next section, we will see an
+ example of implementing accessibility for a widget by inheriting
+ the QAccessibleWidget class.
+
+ \section2 The QAccessibleObject and QAccessibleWidget Convenience Classes
+
+ When implementing an accessibility interface for widgets, one would
+ as a rule inherit QAccessibleWidget, which is a convenience class
+ for widgets. Another available convenience class, which is
+ inherited by QAccessibleWidget, is the QAccessibleObject, which
+ implements part of the interface for QObjects.
+
+ The QAccessibleWidget provides the following functionality:
+
+ \list
+ \o It handles the navigation of the tree and
+ hit testing of the objects.
+ \o It handles events, roles, and actions that are common for all
+ \l{QWidget}s.
+ \o It handles action and methods that can be performed on
+ all widgets.
+ \o It calculates bounding rectangles with
+ \l{QAccessibleInterface::}{rect()}.
+ \o It gives \l{QAccessibleInterface::}{text()} strings that are
+ appropriate for a generic widget.
+ \o It sets the \l{QAccessible::State}{states} that
+ are common for all widgets.
+ \endlist
+
+ \section2 QAccessibleWidget Example
+
+ Instead of creating a custom widget and implementing an interface
+ for it, we will show how accessibility can be implemented for one of
+ Qt's standard widgets: QSlider. Making this widget accessible
+ demonstrates many of the issues that need to be faced when making
+ a custom widget accessible.
+
+ The slider is a complex control that functions as a
+ \l{QAccessible::}{Controller} for its accessible children.
+ This relationship must be known by the interface (for
+ \l{QAccessibleInterface::}{relationTo()} and
+ \l{QAccessibleInterface::}{navigate()}). This can be done
+ using a controlling signal, which is a mechanism provided by
+ QAccessibleWidget. We do this in the constructor:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 0
+
+ The choice of signal shown is not important; the same principles
+ apply to all signals that are declared in this way. Note that we
+ use QLatin1String to ensure that the signal name is correctly
+ specified.
+
+ When an accessible object is changed in a way that users need
+ to know about, it notifies clients of the change by sending them
+ an event via the accessible interface. This is how QSlider calls
+ \l{QAccessibleInterface::}{updateAccessibility()} to indicate that
+ its value has changed:
+
+ \snippet doc/src/snippets/qabstractsliderisnippet.cpp 0
+ \dots
+ \snippet doc/src/snippets/qabstractsliderisnippet.cpp 1
+ \dots
+ \snippet doc/src/snippets/qabstractsliderisnippet.cpp 2
+
+ Note that the call is made after the value of the slider has
+ changed because clients may query the new value immediately after
+ receiving the event.
+
+ The interface must be able to calculate bounding rectangles of
+ itself and any children that do not provide an interface of their
+ own. The \c QAccessibleSlider has three such children identified by
+ the private enum, \c SliderElements, which has the following values:
+ \c PageLeft (the rectangle on the left hand side of the slider
+ handle), \c PageRight (the rectangle on the right hand side of the
+ handle), and \c Position (the slider handle). Here is the
+ implementation of \l{QAccessibleInterface::}{rect()}:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 1
+ \dots
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 2
+ \dots
+
+ The first part of the function, which we have omitted, uses the
+ current \l{QStyle}{style} to calculate the slider handle's
+ bounding rectangle; it is stored in \c srect. Notice that child 0,
+ covered in the default case in the above code, is the slider itself,
+ so we can simply return the QSlider bounding rectangle obtained
+ from the superclass, which is effectively the value obtained from
+ QAccessibleWidget::rect().
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 3
+
+ Before the rectangle is returned it must be mapped to screen
+ coordinates.
+
+ The QAccessibleSlider must reimplement
+ QAccessibleInterface::childCount() since it manages children
+ without interfaces.
+
+ The \l{QAccessibleInterface::}{text()} function returns the
+ QAccessible::Text strings for the slider:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 4
+
+ The \c slider() function returns a pointer to the interface's
+ QSlider. Some values are left for the superclass's implementation.
+ Not all values are appropriate for all accessible objects, as you
+ can see for QAccessible::Value case. You should just return an
+ empty string for those values where no relevant text can be
+ provided.
+
+ The implementation of the \l{QAccessibleInterface::}{role()}
+ function is straightforward:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 5
+
+ The role function should be reimplemented by all objects and
+ describes the role of themselves and the children that do not
+ provide accessible interfaces of their own.
+
+ Next, the accessible interface needs to return the
+ \l{QAccessible::State}{states} that the slider can be in. We look
+ at parts of the \c state() implementation to show how just a few
+ of the states are handled:
+
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 6
+ \dots
+ \snippet doc/src/snippets/accessibilityslidersnippet.cpp 7
+
+ The superclass implementation of
+ \l{QAccessibleInterface::}{state()}, uses the
+ QAccessibleInterface::state() implementation. We simply need to
+ disable the buttons if the slider is at its minimum or maximum.
+
+ We have now exposed the information we have about the slider to
+ the clients. For the clients to be able to alter the slider - for
+ example, to change its value - we must provide information about
+ the actions that can be performed and perform them upon request.
+ We discuss this in the next section.
+
+ \section2 Handling Action Requests from Clients
+
+ QAccessible provides a number of \l{QAccessible::}{Action}s
+ that can be performed on request from clients. If an
+ accessible object supports actions, it should reimplement the
+ following functions from QAccessibleInterface:
+
+ \list
+ \o \l{QAccessibleInterface::}{actionText()} returns
+ strings that describe each action. The descriptions
+ to be made available are one for each
+ \l{QAccessible::}{Text} enum value.
+ \o \l{QAccessibleInterface::}{doAction()} executes requests
+ from clients to perform actions.
+ \endlist
+
+ Note that a client can request any action from an object. If
+ the object does not support the action, it returns false from
+ \l{QAccessibleInterface::}{doAction()}.
+
+ None of the standard actions take any parameters. It is possible
+ to provide user-defined actions that can take parameters.
+ The interface must then also reimplement
+ \l{QAccessibleInterface::}{userActionCount()}. Since this is not
+ defined in the MSAA specification, it is probably only useful to
+ use this if you know which specific AT-Clients will use the
+ application.
+
+ QAccessibleInterface gives another technique for clients to handle
+ accessible objects. It works basically the same way, but uses the
+ concept of methods in place of actions. The available methods are
+ defined by the QAccessible::Method enum. The following functions
+ need to be reimplemented from QAccessibleInterface if the
+ accessible object is to support methods:
+
+ \list
+ \o \l{QAccessibleInterface::}{supportedMethods()} returns
+ a QSet of \l{QAccessible::}{Method} values that are
+ supported by the object.
+ \o \l{QAccessibleInterface::}{invokeMethod()} executes
+ methods requested by clients.
+ \endlist
+
+ The action mechanism will probably be substituted by providing
+ methods in place of the standard actions.
+
+ To see examples on how to implement actions and methods, you
+ could examine the QAccessibleObject and QAccessibleWidget
+ implementations. You might also want to take a look at the
+ MSAA documentation.
+
+ \section2 Implementing Accessible Plugins
+
+ In this section we will explain the procedure of implementing
+ accessible plugins for your interfaces. A plugin is a class stored
+ in a shared library that can be loaded at run-time. It is
+ convenient to distribute interfaces as plugins since they will only
+ be loaded when required.
+
+ Creating an accessible plugin is achieved by inheriting
+ QAccessiblePlugin, reimplementing \l{QAccessiblePlugin::}{keys()}
+ and \l{QAccessiblePlugin::}{create()} from that class, and adding
+ one or two macros. The \c .pro file must be altered to use the
+ plugin template, and the library containing the plugin must be
+ placed on a path where Qt searches for accessible plugins.
+
+ We will go through the implementation of \c SliderPlugin, which is an
+ accessible plugin that produces interfaces for the
+ QAccessibleSlider we implemented in the \l{QAccessibleWidget Example}.
+ We start with the \c key() function:
+
+ \snippet doc/src/snippets/accessibilitypluginsnippet.cpp 0
+
+ We simply need to return the class name of the single interface
+ our plugin can create an accessible interface for. A plugin
+ can support any number of classes; just add more class names
+ to the string list. We move on to the \c create() function:
+
+ \snippet doc/src/snippets/accessibilitypluginsnippet.cpp 1
+
+ We check whether the interface requested is for the QSlider; if it
+ is, we create and return an interface for it. Note that \c object
+ will always be an instance of \c classname. You must return 0 if
+ you do not support the class.
+ \l{QAccessible::}{updateAccessibility()} checks with the
+ available accessibility plugins until it finds one that does not
+ return 0.
+
+ Finally, you need to include macros in the cpp file:
+
+ \snippet doc/src/snippets/accessibilitypluginsnippet.cpp 2
+
+ The Q_EXPORT_PLUGIN2 macro exports the plugin in the \c
+ SliderPlugin class into the \c acc_sliderplugin library. The first
+ argument is the name of the plugin library file, excluding the
+ file suffix, and the second is the class name. For more information
+ on plugins, consult the plugins \l{How to Create Qt
+ Plugins}{overview document}.
+
+ You can omit the the first macro unless you want the plugin
+ to be statically linked with the application.
+
+ \section2 Implementing Interface Factories
+
+ If you do not want to provide plugins for your accessibility
+ interfaces, you can use an interface factory
+ (QAccessible::InterfaceFactory), which is the recommended way to
+ provide accessible interfaces in a statically-linked application.
+
+ A factory is a function pointer for a function that takes the same
+ parameters as \l{QAccessiblePlugin}'s
+ \l{QAccessiblePlugin::}{create()} - a QString and a QObject. It
+ also works the same way. You install the factory with the
+ \l{QAccessible::}{installFactory()} function. We give an example
+ of how to create a factory for the \c SliderPlugin class:
+
+ \snippet doc/src/snippets/accessibilityfactorysnippet.cpp 0
+ \dots
+ \snippet doc/src/snippets/accessibilityfactorysnippet.cpp 1
+
+ \omit
+
+ \section1 Implementing Bridges for Other Assistive Technologies
+
+ An accessibility bridge provides the means for an assistive
+ technology to talk to Qt. On Windows and Mac, the built-in bridges
+ will be used. On UNIX, however, there are no built-in standard
+ assistive technology, and it might therefore be necessary to
+ implement an accessible bridge.
+
+ A bridge is implemented by inheriting QAccessibleBridge for the
+ technology to support. The class defines the interface that Qt
+ needs an assistive technology to support:
+
+ \list
+ \o A root object. This is the root in the accessible
+ object tree and is of type QAccessibleInterface.
+ \o Receive events from from accessible objects.
+ \endlist
+
+ The root object is set with the
+ \l{QAccessibleBridge::}{setRootObject()}. In the case of Qt, this
+ will always be an interface for the QApplication instance of the
+ application.
+
+ Event notification is sent through
+ \l{QAccessibleBridge::}{notifyAccessibilityUpdate()}. This
+ function is called by \l{QAccessible::}{updateAccessibility()}. Even
+ though the bridge needs only to implement these two functions, it
+ must be able to communicate the entire QAccessibleInterface to the
+ underlying technology. How this is achieved is, naturally, up to
+ the individual bridge and none of Qt's concern.
+
+ As with accessible interfaces, you distribute accessible bridges
+ in plugins. Accessible bridge plugins are subclasses of the
+ QAccessibleBridgePlugin class; the class defines the functions
+ \l{QAccessibleBridgePlugin::}{create()} and
+ \l{QAccessibleBridgePlugin::}{keys()}, which must me
+ reimplemented. If Qt finds a built-in bridge to use, it will
+ ignore any available plugins.
+
+ \endomit
+
+ \section1 Further Reading
+
+ The \l{Cross-Platform Accessibility Support in Qt 4} document contains a more
+ general overview of Qt's accessibility features and discusses how it is
+ used on each platform.
+ issues
+*/
diff --git a/doc/src/activeqt-dumpcpp.qdoc b/doc/src/activeqt-dumpcpp.qdoc
new file mode 100644
index 0000000..9465a31
--- /dev/null
+++ b/doc/src/activeqt-dumpcpp.qdoc
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-dumpcpp.html
+ \title The dumpcpp Tool (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword dumpcpp
+
+ The \c dumpcpp tool generates a C++ namespace for a type library.
+
+ To generate a C++ namespace for a type library, call \c dumpcpp with the following
+ command line parameters:
+
+ \table
+ \header
+ \i Option
+ \i Result
+ \row
+ \i input
+ \i Generate documentation for \e input. \e input can specify a type library file or a type
+ library ID, or a CLSID or ProgID for an object
+ \row
+ \i -o file
+ \i Writes the class declaration to \e {file}.h and meta object infomation to \e {file}.cpp
+ \row
+ \i -n namespace
+ \i Generate a C++ namespace \e namespace
+ \row
+ \i -nometaobject
+ \i Do not generate a .cpp file with the meta object information.
+ The meta object is then generated in runtime.
+ \row
+ \i -getfile libid
+ \i Print the filename for the typelibrary \e libid to stdout
+ \row
+ \i -compat
+ \i Generate namespace with dynamicCall-compatible API
+ \row
+ \i -v
+ \i Print version information
+ \row
+ \i -h
+ \i Print help
+ \endtable
+
+ \c dumpcpp can be integrated into the \c qmake build system. In your .pro file, list the type
+ libraries you want to use in the TYPELIBS variable:
+
+ \snippet examples/activeqt/qutlook/qutlook.pro 0
+
+ The generated namespace will declare all enumerations, as well as one QAxObject subclass
+ for each \c coclass and \c interface declared in the type library. coclasses marked with
+ the \c control attribute will be wrapped by a QAxWidget subclass.
+
+ Those classes that wrap creatable coclasses (i.e. coclasses that are not marked
+ as \c noncreatable) have a default constructor; this is typically a single class
+ of type \c Application.
+
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 0
+
+ All other classes can only be created by passing an IDispatch interface pointer
+ to the constructor; those classes should however not be created explicitly.
+ Instead, use the appropriate API of already created objects.
+
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 1
+
+ All coclass wrappers also have one constructors taking an interface wrapper class
+ for each interface implemented.
+
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 2
+
+ You have to create coclasses to be able to connect to signals of the subobject.
+ Note that the constructor deletes the interface object, so the following will
+ cause a segmentation fault:
+
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 3
+
+ If the return type is of a coclass or interface type declared in another type
+ library you have to include the namespace header for that other type library
+ before including the header for the namespace you want to use (both header have
+ to be generated with this tool).
+
+ By default, methods and property returning subobjects will use the type as in
+ the type library. The caller of the function is responsible for deleting or
+ reparenting the object returned. If the \c -compat switch is set, properties
+ and method returning a COM object have the return type \c IDispatch*, and
+ the namespace will not declare wrapper classes for interfaces.
+
+ In this case, create the correct wrapper class explicitly:
+
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 4
+
+ You can of course use the IDispatch* returned directly, in which case you have to
+ call \c Release() when finished with the interface.
+
+ All classes in the namespace are tagged with a macro that allows you to export
+ or import them from a DLL. To do that, declare the macro to expand to
+ \c __declspec(dllimport/export) before including the header file.
+
+ To build the tool you must first build the QAxContainer library.
+ Then run your make tool in \c tools/dumpcpp.
+*/
diff --git a/doc/src/activeqt-dumpdoc.qdoc b/doc/src/activeqt-dumpdoc.qdoc
new file mode 100644
index 0000000..b9156f0
--- /dev/null
+++ b/doc/src/activeqt-dumpdoc.qdoc
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-dumpdoc.html
+ \title The dumpdoc Tool (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword dumpdoc
+
+ The \c dumpdoc tool generates Qt-style documentation for any
+ COM object and writes it into the file specified.
+
+ Call \c dumpdoc with the following command line parameters:
+
+ \table
+ \header
+ \i Option
+ \i Result
+ \row
+ \i -o file
+ \i Writes output to \e file
+ \row
+ \i object
+ \i Generate documentation for \e object
+ \row
+ \i -v
+ \i Print version information
+ \row
+ \i -h
+ \i Print help
+ \endtable
+
+ \e object must be an object installed on the local machine (ie.
+ remote objects are not supported), and can include subobjects
+ accessible through properties, ie.
+ \c Outlook.Application/Session/CurrentUser
+
+ The generated file will be an HTML file using Qt documentation
+ style.
+
+ To build the tool you must first build the QAxContainer library.
+ Then run your make tool in \c tools/dumpdoc.
+*/
diff --git a/doc/src/activeqt-idc.qdoc b/doc/src/activeqt-idc.qdoc
new file mode 100644
index 0000000..c570dcd
--- /dev/null
+++ b/doc/src/activeqt-idc.qdoc
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-idc.html
+ \title IDC - The Interface Description Compiler (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword idc
+
+ The IDC tool is part of the ActiveQt build system and makes
+ it possible to turn any Qt binary into a full COM object server
+ with only a few lines of code.
+
+ IDC understands the following command line parameters:
+
+ \table
+ \header
+ \i Option
+ \i Result
+ \row
+ \i dll -idl idl -version x.y
+ \i Writes the IDL of the server \e dll to the file \e idl. The
+ type library wll have version x.y.
+ \row
+ \i dll -tlb tlb
+ \i Replaces the type library in \e dll with \e tlb
+ \row
+ \i -v
+ \i Print version information
+ \row
+ \i -regserver dll
+ \i Register the COM server \e dll
+ \row
+ \i -unregserver
+ \i Unregister the COM server \e dll
+ \endtable
+
+ It is usually never necessary to invoke IDC manually, as the \c
+ qmake build system takes care of adding the required post
+ processing steps to the build process. See the \l{ActiveQt}
+ documentation for details.
+*/
diff --git a/doc/src/activeqt-testcon.qdoc b/doc/src/activeqt-testcon.qdoc
new file mode 100644
index 0000000..aba0b58
--- /dev/null
+++ b/doc/src/activeqt-testcon.qdoc
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-testcon.html
+ \title testcon - An ActiveX Test Container (ActiveQt)
+
+ \ingroup activeqt-tools
+
+ \keyword testcon
+
+ This application implements a generic test container for ActiveX
+ controls. You can insert ActiveX controls installed on your
+ system, and execute methods and modify properties. The container
+ will log information about events and property changes as well
+ as debug output in the log window.
+
+ Parts of the code use internals of the Qt meta object and ActiveQt
+ framework and are not recommended to be used in application code.
+
+ Use the application to view the slots, signals and porperties
+ available through the QAxWidget class when instantiated with a
+ certain ActiveX, and to test ActiveX controls you implement or
+ want to use in your Qt application.
+
+ The application can load and execute script files in JavaScript,
+ VBScript, Perl and Python (if installed) to automate the controls
+ loaded. Example script files using the QAxWidget2 class are available
+ in the \c scripts subdirectory.
+
+ Note that the qmake project of this example includes a resource file
+ \c testcon.rc with a version resource. This is required by some
+ ActiveX controls (ie. Shockwave ActiveX Controls), which might crash
+ or misbehave otherwise if such version information is missing.
+
+ To build the tool you must first build the QAxContainer and the
+ QAxServer libraries. Then run your make tool in \c tools/testcon
+ and run the resulting \c testcon.exe.
+*/
diff --git a/doc/src/activeqt.qdoc b/doc/src/activeqt.qdoc
new file mode 100644
index 0000000..ea13e59
--- /dev/null
+++ b/doc/src/activeqt.qdoc
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt.html
+ \title ActiveQt Framework
+ \brief An overview of Qt's ActiveX and COM integration on Windows.
+
+ \ingroup platform-notes
+ \keyword ActiveQt
+
+ Qt's ActiveX and COM support allows Qt for Windows developers to:
+
+ \list 1
+ \o Access and use ActiveX controls and COM objects provided by any
+ ActiveX server in their Qt applications.
+ \o Make their Qt applications available as COM servers, with
+ any number of Qt objects and widgets as COM objects and ActiveX
+ controls.
+ \endlist
+
+ The ActiveQt framework consists of two modules:
+
+ \list
+ \o The \l QAxContainer module is a static
+ library implementing QObject and QWidget subclasses, QAxObject and
+ QAxWidget, that act as containers for COM objects and ActiveX
+ controls.
+ \o The \l QAxServer module is a static library that implements
+ functionality for in-process and executable COM servers. This
+ module provides the QAxAggregated, QAxBindable and QAxFactory
+ classes.
+ \endlist
+
+ To build the static libraries, change into the \c activeqt directory
+ (usually \c QTDIR/src/activeqt), and run \c qmake and your make
+ tool in both the \c container and the \c control subdirectory.
+ The libraries \c qaxcontainer.lib and \c qaxserver.lib will be linked
+ into \c QTDIR/lib.
+
+ If you are using a shared configuration of Qt enter the \c plugin
+ subdirectory and run \c qmake and your make tool to build a
+ plugin that integrates the QAxContainer module into \l{Qt
+ Designer}.
+
+ The ActiveQt modules are part of the \l{Qt Full Framework Edition}. They
+ are \e not part of the \l{Open Source Versions of Qt}.
+
+ \sa {QAxContainer Module}, {QAxServer Module}
+*/
diff --git a/doc/src/annotated.qdoc b/doc/src/annotated.qdoc
new file mode 100644
index 0000000..1950c45
--- /dev/null
+++ b/doc/src/annotated.qdoc
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation for class overview.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page annotated.html
+ \title Annotated Class Index
+ \ingroup classlists
+
+ Qt's classes with brief descriptions:
+
+ \generatelist annotatedclasses
+*/
diff --git a/doc/src/appicon.qdoc b/doc/src/appicon.qdoc
new file mode 100644
index 0000000..4d29337
--- /dev/null
+++ b/doc/src/appicon.qdoc
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Qt Application Icon Usage Documentation.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page appicon.html
+ \title Setting the Application Icon
+ \ingroup gui-programming
+
+ The application icon, typically displayed in the top-left corner of an
+ application's top-level windows, is set by calling the
+ QWidget::setWindowIcon() method on top-level widgets.
+
+ In order to change the icon of the executable application file
+ itself, as it is presented on the desktop (i.e., prior to
+ application execution), it is necessary to employ another,
+ platform-dependent technique.
+
+ \tableofcontents
+
+ \section1 Setting the Application Icon on Windows
+
+ First, create an ICO format bitmap file that contains the icon
+ image. This can be done with e.g. Microsoft Visual C++: Select
+ \menu{File|New}, then select the \menu{File} tab in the dialog
+ that appears, and choose \menu{Icon}. (Note that you do not need
+ to load your application into Visual C++; here we are only using
+ the icon editor.)
+
+ Store the ICO file in your application's source code directory,
+ for example, with the name \c myappico.ico. Then, create a text
+ file called, say, \c myapp.rc in which you put a single line of
+ text:
+
+ \snippet doc/src/snippets/code/doc_src_appicon.qdoc 0
+
+ Finally, assuming you are using \c qmake to generate your
+ makefiles, add this line to your \c myapp.pro file:
+
+ \snippet doc/src/snippets/code/doc_src_appicon.qdoc 1
+
+ Regenerate your makefile and your application. The \c .exe file
+ will now be represented with your icon in Explorer.
+
+ If you do not use \c qmake, the necessary steps are: first, run
+ the \c rc program on the \c .rc file, then link your application
+ with the resulting \c .res file.
+
+ \section1 Setting the Application Icon on Mac OS X
+
+ The application icon, typically displayed in the application dock
+ area, is set by calling QWidget::setWindowIcon() on a top-level
+ widget. It is possible that the program could appear in the
+ application dock area before the function call, in which case a
+ default icon will appear during the bouncing animation.
+
+ To ensure that the correct icon appears, both when the application is
+ being launched, and in the Finder, it is necessary to employ a
+ platform-dependent technique.
+
+ Although many programs can create icon files (\c .icns), the
+ recommended approach is to use the \e{Icon Composer} program
+ supplied by Apple (in the \c Developer/Application folder).
+ \e{Icon Composer} allows you to import several different sized
+ icons (for use in different contexts) as well as the masks that
+ go with them. Save the set of icons to a file in your project
+ directory.
+
+ If you are using qmake to generate your makefiles, you only need
+ to add a single line to your \c .pro project file. For example,
+ if the name of your icon file is \c{myapp.icns}, and your project
+ file is \c{myapp.pro}, add this line to \c{myapp.pro}:
+
+ \snippet doc/src/snippets/code/doc_src_appicon.qdoc 2
+
+ This will ensure that \c qmake puts your icons in the proper
+ place and creates an \c{Info.plist} entry for the icon.
+
+ If you do not use \c qmake, you must do the following manually:
+ \list 1
+ \i Create an \c Info.plist file for your application (using the
+ \c PropertyListEditor, found in \c Developer/Applications).
+ \i Associate your \c .icns record with the \c CFBundleIconFile record in the
+ \c Info.plist file (again, using the \c PropertyListEditor).
+ \i Copy the \c Info.plist file into your application bundle's \c Contents
+ directory.
+ \i Copy the \c .icns file into your application bundle's \c Contents/Resources
+ directory.
+ \endlist
+
+ \section1 Setting the Application Icon on Common Linux Desktops
+
+ In this section we briefly describe the issues involved in providing
+ icons for applications for two common Linux desktop environments:
+ \l{http://www.kde.org/}{KDE} and \l{http://www.gnome.org/}{GNOME}.
+ The core technology used to describe application icons
+ is the same for both desktops, and may also apply to others, but there
+ are details which are specific to each. The main source of information
+ on the standards used by these Linux desktops is
+ \l{http://www.freedesktop.org/}{freedesktop.org}. For information
+ on other Linux desktops please refer to the documentation for the
+ desktops you are interested in.
+
+ Often, users do not use executable files directly, but instead launch
+ applications by clicking icons on the desktop. These icons are
+ representations of "desktop entry files" that contain a description of
+ the application that includes information about its icon. Both desktop
+ environments are able to retrieve the information in these files, and
+ they use it to generate shortcuts to applications on the desktop, in
+ the start menu, and on the panel.
+
+ More information about desktop entry files can be found in the
+ \l{http://www.freedesktop.org/Standards/desktop-entry-spec}{Desktop Entry
+ Specification}.
+
+ Although desktop entry files can usefully encapsulate the application's details,
+ we still need to store the icons in the conventional location for each desktop
+ environment. A number of locations for icons are given in the
+ \l{http://www.freedesktop.org/Standards/icon-theme-spec}{Icon Theme
+ Specification}.
+
+ Although the path used to locate icons depends on the desktop in use,
+ and on its configuration, the directory structure beneath each of
+ these should follow the same pattern: subdirectories are arranged by
+ theme, icon size, and application type. Generally, application icons
+ are added to the hicolor theme, so a square application icon 32 pixels
+ in size would be stored in the \c hicolor/32x32/apps directory beneath
+ the icon path.
+
+ \section2 K Desktop Environment (KDE)
+
+ Application icons can be installed for use by all users, or on a per-user basis.
+ A user currently logged into their KDE desktop can discover these locations
+ by using \l{http://developer.kde.org/documentation/other/kde-config.html}{kde-config},
+ for example, by typing the following in a terminal window:
+
+ \snippet doc/src/snippets/code/doc_src_appicon.qdoc 3
+
+ Typically, the list of colon-separated paths printed to stdout includes the
+ user-specific icon path and the system-wide path. Beneath these
+ directories, it should be possible to locate and install icons according
+ to the conventions described in the
+ \l{http://www.freedesktop.org/Standards/icon-theme-spec}{Icon Theme Specification}.
+
+ If you are developing exclusively for KDE, you may wish to take
+ advantage of the \link
+ http://developer.kde.org/documentation/other/makefile_am_howto.html
+ KDE build system\endlink to configure your application. This ensures
+ that your icons are installed in the appropriate locations for KDE.
+
+ The KDE developer website is at \l{http://developer.kde.org/}.
+
+ \section2 GNOME
+
+ Application icons are stored within a standard system-wide
+ directory containing architecture-independent files. This
+ location can be determined by using \c gnome-config, for example
+ by typing the following in a terminal window:
+
+ \snippet doc/src/snippets/code/doc_src_appicon.qdoc 4
+
+ The path printed on stdout refers to a location that should contain a directory
+ called \c{pixmaps}; the directory structure within the \c pixmaps
+ directory is described in the \link
+ http://www.freedesktop.org/Standards/icon-theme-spec Icon Theme
+ Specification \endlink.
+
+ If you are developing exclusively for GNOME, you may wish to use
+ the standard set of \link
+ http://developer.gnome.org/tools/build.html GNU Build Tools\endlink,
+ also described in the relevant section of
+ the \link http://developer.gnome.org/doc/GGAD/ggad.html GTK+/Gnome
+ Application Development book\endlink. This ensures that your icons are
+ installed in the appropriate locations for GNOME.
+
+ The GNOME developer website is at \l{http://developer.gnome.org/}.
+*/
diff --git a/doc/src/assistant-manual.qdoc b/doc/src/assistant-manual.qdoc
new file mode 100644
index 0000000..6a735d2
--- /dev/null
+++ b/doc/src/assistant-manual.qdoc
@@ -0,0 +1,810 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page assistant-manual.html
+ \title Qt Assistant Manual
+ \ingroup qttools
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage Qt Assistant in More Detail
+
+ \keyword Qt Assistant
+
+ This document introduces \QA, a tool for presenting on-line
+ documentation. The document is divided into the following sections:
+
+ Table of contents:
+
+ \list
+ \o \l{The One-Minute Guide to Using Qt Assistant}
+ \o \l{Qt Assistant in More Detail}
+ \o \l{Using Qt Assistant as a Custom Help Viewer}
+ \endlist
+
+ \chapter The One-Minute Guide to Using Qt Assistant
+
+ Once you have installed Qt, \QA should be ready to run:
+
+ \list
+ \o On Windows, \QA is available as a menu option on the Qt menu.
+ \o On Mac OS X, \QA is installed in the /Developer/Applications/Qt directory.
+ \o On Unix/Linux, open a terminal, type \c{assistant} and press \key{Enter}.
+ \endlist
+
+ When you start up \QA, you will be presented with a standard main window
+ application, with a menu bar and toolbar. Below these, on the left hand
+ side are navigation windows called \e{Contents}, \e{Index} and \e{Bookmarks}.
+ On the right, taking up most of the space, is the \e{Documentation} window.
+ By default, \QA loads the Qt reference documentation along with the manuals
+ of other Qt tools, like \QD or \QL.
+
+ \QA works in a similar way to a Web browser. If you click hyperlinks
+ (cross-references), the \e{Documentation} window will present the relevant
+ page. You can bookmark pages of particular interest and you can click the
+ \gui{Previous} and \gui{Next} toolbar buttons to navigate within the pages
+ you have visited.
+
+ Although \QA can be used just like a Web browser to navigate through
+ the documentation, \QA offers a powerful means of navigation that Web
+ browsers do not provide. \QA uses an advanced full text search engine
+ to index all the pages in each compressed help file so that you can
+ search for particular words and phrases.
+
+ To perform an index search, click the \gui{Index} tab on the Sidebar
+ (or press \key{Alt+I}). In the \gui{'Look For'} line edit enter a word;
+ e.g., 'homedirpath'. As you type, words are found and highlighted in a list
+ beneath the line edit. If the highlighted text matches what you're
+ looking for, double click it, (or press \key{Enter}) and the
+ \e{Documentation} window will display the relevant page. You rarely have
+ to type in the whole word before \QA finds a match. Note that for some
+ words there may be more than one possible page that is relevant.
+
+ \QA also provides full text searching for finding specific words in
+ the documentation. To activate the full text search, either press \key(Alt+S)
+ or click on the \gui{Search} tab in the \e{Documentation} window. Then
+ enter the term you're looking for and hit the \gui{Search} button. All
+ documents containing the specified term will then be listed in the list box
+ below.
+*/
+
+/*!
+ \page assistant-details.html
+ \title Qt Assistant in More Detail
+
+ \contentspage {Qt Assistant Manual}{Contents}
+ \previouspage Qt Assistant Manual
+ \nextpage Using Qt Assistant as a Custom Help Viewer
+
+ \tableofcontents
+
+ \img assistant-assistant.png
+
+ \section1 Command Line Options
+
+ \QA handles the following command line options:
+
+ \table
+ \header
+ \o Command Line Option
+ \o Brief Description
+ \row
+ \o -collectionFile <file.qhc>
+ \o Uses the specified collection file instead of the default one.
+ \row
+ \o -showUrl URL
+ \o Shows the document referenced by URL.
+ \row
+ \o -enableRemoteControl
+ \o Enables \QA to be remotly controlled.
+ \row
+ \o -show <widget>
+ \o Shows the specified dockwidget which can be "contents", "index",
+ "bookmarks" or "search".
+ \row
+ \o -hide <widget>
+ \o Hides the specified dockwidget which can be "contents", "index",
+ "bookmarks" or "search.
+ \row
+ \o -activate <widget>
+ \o Activates the specified dockwidget which can be "contents",
+ "index", "bookmarks" or "search.
+ \row
+ \o -register <doc.qch>
+ \o Registers the specified compressed help file in the given help
+ collection.
+ \row
+ \o -unregister <doc.qch>
+ \o Unregisters the specified compressed help file from the given
+ collection file.
+ \row
+ \o -setCurrentFilter filter
+ \o Sets the given filter as the active filter.
+ \row
+ \o -quiet
+ \o Doesn't show any error, warning or success messages.
+ \endtable
+
+ \section1 Tool Windows
+
+ \img assistant-dockwidgets.png
+
+ The tool windows provide four ways to navigate the documentation:
+
+ \list
+ \o The \gui{Contents} window presents a table of contents implemented as a
+ tree view for the documentation that is available. If you click an item,
+ its documentation will appear in the \e{Documentation} window. If you double
+ click an item or click on the control to the left of it, the item's sub-items
+ will appear. Click a sub-item to make its page appear in the \e{Documentation}
+ window. Click on the control next to an open item to hide its sub-items.
+ \o The \gui{Index} window is used to look up key words or phrases.
+ See \l{The One-Minute Guide to Using Qt Assistant} for how to use this
+ window.
+ \o The \gui{Bookmarks} window lists any bookmarks you have made. Double
+ click a bookmark to make its page appear in the \e{Documentation} window.
+ The \gui{Bookmarks} window provides a context menu with \gui{Show Item},
+ \gui{Delete Item} as well as \gui{Rename Item}. Click in the main menu
+ \menu{Bookmark|Add Bookmark...} (or press \key{Ctrl+B}) to bookmark the
+ page that is currently showing in the \e{Documentation} window. Right click
+ a bookmark in the list to rename or delete the highlighted bookmark.
+ \endlist
+
+ If you want the \gui{Documentation} window to use as much space as possible,
+ you can easily group, move or hide the tool windows. To group the windows,
+ drag one on top of the other and release the mouse. If one or all tool
+ windows are not shown, press \key{Alt+C}, \key{Alt+I} or \key{Alt+O} to show
+ the required window.
+
+ The tool windows can be docked into the main window, so you can drag them
+ to the top, left, right or bottom of \e{Qt Assistant's} window, or you can
+ drag them outside \QA to float them as independent windows.
+
+ \section1 Documentation Window
+
+ \img assistant-docwindow.png
+
+ The \gui{Documentation} window lets you create a tab for each
+ documentation page that you view. Click the \gui{Add Tab} button and a new
+ tab will appear with the page name as the tab's caption. This makes it
+ convenient to switch between pages when you are working with different
+ documentation. You can delete a tab by clicking the \gui{Close Tab} button
+ located on the right side of the \gui{Documentation} window.
+
+ \section1 Toolbars
+
+ \img assistant-toolbar.png
+
+ The main toolbar provides fast access to the most common actions.
+
+ \table
+ \header \o Action \o Description \o Menu Item \o Shortcut
+ \row \o \gui{Previous} \o Takes you to the previous page in the history.
+ \o \menu{Go|Previous} \o \key{Alt+Left Arrow}
+ \row \o \gui{Next} \o Takes you to the next page in the history.
+ \o \menu{Go|Next} \o \key{Alt+Right Arrow}
+ \row \o \gui{Home}
+ \o Takes you to the home page as specified in the Preferences Dialog.
+ \o \menu{Go|Home} \o \key{Ctrl+Home}.
+ \row \o \gui{Sync with Table of Contents}
+ \o Synchronizes the \gui{Contents} tool window with the page currently
+ shown in the \gui{Documentation} window.
+ \o \menu{Go|Sync with Table of Contents} \o
+ \row \o \gui{Copy} \o Copies any selected text to the clipboard.
+ \o \menu{Edit|Copy} \o \key{Ctrl+C}
+ \row \o \gui{Print} \o Opens the \gui{Print} dialog.
+ \o \menu{File|Print} \o \key{Ctrl+P}
+ \row \o \gui{Find in Text} \o Opens the \gui{Find Text} dialog.
+ \o \menu{Edit|Find in Text} \o \key{Ctrl+F}
+ \row \o \gui{Zoom in}
+ \o Increases the font size used to display text in the current tab.
+ \o \menu{View|Zoom in} \o \key{Ctrl++}
+ \row \o \gui{Zoom out}
+ \o Decreases the font size used to display text in the current tab.
+ \o \menu{View|Zoom out} \o \key{Ctrl+-}
+ \row \o \gui{Normal Size}
+ \o Resets the font size to its normal size in the current tab.
+ \o \menu{View|Normal Size} \o \key{Ctrl+0}
+ \endtable
+
+ \img assistant-address-toolbar.png
+
+ The address toolbar provides a fast way to enter a specific URL for a
+ documentation file. By default, the address toolbar is not shown, so it
+ has to be activated via \menu{View|Toolbars|Address Toolbar}.
+
+ \img assistant-filter-toolbar.png
+
+ The filter toolbar allows you to apply a filter to the currently installed
+ documentation. As with the address toolbar, the filter toolbar is not visible
+ by default and has to be activated via \menu{View|Toolbars|Filter Toolbar}.
+
+ \section1 Menus
+
+ \section2 File Menu
+
+ \list
+ \o \menu{File|Page Setup...} invokes a dialog allowing you to define
+ page layout properties, such as margin sizes, page orientation and paper size.
+ \o \menu{File|Print Preview...} provides a preview of the printed pages.
+ \o \menu{File|Print...} opens the \l{#Print Dialog}{\gui{Print} dialog}.
+ \o \menu{File|New Tab} opens a new empty tab in the \gui{Documentation}
+ window.
+ \o \menu{File|Close Tab} closes the current tab of the
+ \gui{Documentation} window.
+ \o \menu{File|Exit} closes the \QA application.
+ \endlist
+
+ \section2 Edit Menu
+
+ \list
+ \o \menu{Edit|Copy} copies any selected text to the clipboard.
+ \o \menu{Edit|Find in Text} invokes the \l{#Find Text Control}{\gui{Find Text}
+ control} at the lower end of the \gui{Documentation} window.
+ \o \menu{Edit|Find Next} looks for the next occurance of the specified
+ text in the \gui{Find Text} control.
+ \o \menu{Edit|Find Previous} looks for the previous occurance of
+ the specified text in the \l{#Find Text Control}{\gui{Find Text} control}.
+ \o \menu{Edit|Preferences} invokes the \l{#Preferences Dialog}{\gui{Preferences} dialog}.
+ \endlist
+
+ \section2 View Menu
+
+ \list
+ \o \menu{View|Zoom in} increases the font size in the current tab.
+ \o \menu{View|Zoom out} decreases the font size in the current tab.
+ \o \menu{View|Normal Size} resets the font size in the current tab.
+ \o \menu{View|Contents} toggles the display of the \gui{Contents} tool window.
+ \o \menu{View|Index} toggles the display of the \gui{Index} tool window.
+ \o \menu{View|Bookmarks} toggles the display of the \gui{Bookmarks} tool window.
+ \o \menu{View|Search} toggles the display of the Search in the \gui{Documentation} window.
+ \endlist
+
+ \section2 Go Menu
+
+ \list
+ \o \menu{Go|Home} goes to the home page.
+ \o \menu{Go|Back} displays the previous page in the history.
+ \o \menu{Go|Forward} displays the next page in the history.
+ \o \menu{Go|Sync with Table of Contents} syncs the \gui{Contents} tool window to the currently shown page.
+ \o \menu{Go|Next Page} selects the next tab in the \gui{Documentation} window.
+ \o \menu{Go|Previous Page} selects the previous tab in the \gui{Documentation} window.
+ \endlist
+
+ \section2 Bookmarks Menu
+
+ \list
+ \o \menu{Bookmarks|Add} adds the current page to the list of bookmarks.
+ \endlist
+
+ \section1 Dialogs
+
+ \section2 Print Dialog
+
+ This dialog is platform-specific. It gives access to various printer
+ options and can be used to print the document shown in the current tab.
+
+ \section2 Preferences Dialog
+
+ \img assistant-preferences-fonts.png
+
+ The \menu{Fonts} page allows you to change the font family and font sizes of the
+ browser window displaying the documentation or the application itself.
+
+ \img assistant-preferences-filters.png
+
+ The \menu{Filters} page lets you create and remove documentation
+ filters. To add a new filter, click the \gui{Add} button, specify a
+ filter name in the pop-up dialog and click \gui{OK}, then select
+ the filter attributes in the list box on the right hand side.
+ You can delete a filter by selecting it and clicking the \gui{Remove}
+ button.
+
+ \img assistant-preferences-documentation.png
+
+ The \menu{Documentation} page lets you install and remove compressed help
+ files. Click the \gui{Install} button and choose the path of the compressed
+ help file (*.qch) you would like to install.
+ To delete a help file, select a documentation set in the list and click
+ \gui{Remove}.
+
+ \img assistant-preferences-options.png
+
+ The \menu{Options} page lets you specify the homepage \QA will display when
+ you click the \gui{Home} button in \QA's main user interface. You can specify
+ the hompage by typing it here or clicking on one of the buttons below the
+ textbox. \gui{Current Page} sets the currently displayed page as your home
+ page while \gui{Restore to default} will reset your home page to the default
+ home page.
+
+ \section1 Find Text Control
+
+ This control is used to find text in the current page. Enter the text you want
+ to find in the line edit. The search is incremental, meaning that the most
+ relevant result is shown as you enter characters into the line edit.
+
+ If you check the \gui{Whole words only} checkbox, the search will only consider
+ whole words; for example, if you search for "spin" with this checkbox checked it will
+ not match "spinbox", but will match "spin". If you check the \gui{Case sensitive}
+ checkbox then, for example, "spin" will match "spin" but not "Spin". You can
+ search forwards or backwards from your current position in the page by clicking
+ the \gui{Previous} or \gui{Next} buttons. To hide the find control, either click the
+ \gui{Close} button or hit the \key{Esc} key.
+
+ \section1 Filtering Help Contents
+
+ \QA allows you to install any kind of documentation as long as it is organized
+ in Qt compressed help files (*.qch). For example, it is possible to install the
+ Qt reference documentation for Qt 4.4.0 and Qt 4.4.1 at the same time. In many
+ respects, this is very convenient since only one version of \QA is needed.
+ However, at the same time it becomes more complicated when performing tasks like
+ searching the index because nearly every keyword is defined in Qt 4.4.0 as well
+ as in Qt 4.4.1. This means that \QA will always ask the user to choose which one
+ should be displayed.
+
+ We use documentation filters to solve this issue. A filter is identified by its
+ name, and contains a list of filter attributes. An attribute is just a string and
+ can be freely chosen. Attributes are defined by the documentation itself, this
+ means that every documentation set usually has one or more attributes.
+
+ For example, the Qt 4.4.0 \QA documentation defines the attributes \c {assistant},
+ \c{tools} and \c{4.4.0}, \QD defines \c{designer}, \c{tools} and \c{4.4.0}.
+ The filter to display all tools would then define only the attribute
+ \c{tools} since this attribute is part of both documentation sets.
+ Adding the attribute \c{assistant} to the filter would then only show \QA
+ documentation since the \QD documentation does not contain this
+ attribute. Having an empty list of attributes in a filter will match all
+ documentation; i.e., it is equivalent to requesting unfiltered documentation.
+
+ \section1 Full Text Searching
+
+ \img assistant-search.png
+
+ \QA provides a powerful full text search engine. To search
+ for certain words or text, click the \gui{Search} tab in the \gui{Documentation}
+ window. Then enter the text you want to look for and press \key{Enter}
+ or click the \gui{Search} button. The search is not case sensitive, so,
+ for example, Foo, fOo and FOO are all treated as the same. The following are
+ examples of common search patterns:
+
+ \list
+ \o \c deep -- lists all the documents that contain the word 'deep'
+ \o \c{deep*} -- lists all the documents that contain a word beginning
+ with 'deep'
+ \o \c{deep copy} -- lists all documents that contain both 'deep' \e
+ and 'copy'
+ \o \c{"deep copy"} -- list all documents that contain the phrase 'deep copy'
+ \endlist
+
+ It is also possible to use the \gui{Advanced search} to get more flexibility.
+ You can specify some words so that hits containing these are excluded from the
+ result, or you can search for an exact phrase. Searching for similar words will
+ give results like these:
+
+ \list
+ \o \c{QStin} -- lists all the documents with titles that are similar, such as \c{QString}
+ \o \c{QSting} -- lists all the documents with titles that are similar, such as \c{QString}
+ \o \c{QStrin} -- lists all the documents with titles that are similar, such as \c{QString}
+ \endlist
+
+ Options can be combined to improve the search results.
+
+ The list of documents found is ordered according to the number of
+ occurrences of the search text which they contain, with those containing
+ the highest number of occurrences appearing first. Simply click any
+ document in the list to display it in the \gui{Documentation} window.
+
+ If the documentation has changed \mdash for example, if documents have been added
+ or removed \mdash \QA will index them again.
+
+*/
+
+/*!
+ \page assistant-custom-help-viewer.html
+ \title Using Qt Assistant as a Custom Help Viewer
+
+ \contentspage {Qt Assistant Manual}{Contents}
+ \previouspage Qt Assistant in More Detail
+
+ Using \QA as custom help viewer requires more than just being able to
+ display custom documentation. It is equally important that the
+ appearance of \QA can be customized so that it is seen as a
+ application-specific help viewer rather than \QA. This is achieved by
+ changing the window title or icon, as well as some application-specific
+ menu texts and actions. The complete list of possible customizations
+ can be found in the \l{Creating a Custom Help Collection File} section.
+
+ Another requirement of a custom help viewer is the ability to receive
+ actions or commands from the application it provides help for. This is
+ especially important when the application offers context sensitive help.
+ When used in this way, the help viewer may need to change its contents
+ depending on the state the application is currently in. This means that
+ the application has to communicate the current state to the help viewer.
+ The section about \l{Using Qt Assistant Remotely} explains how this can
+ be done.
+
+ \tableofcontents
+
+ The \l{Simple Text Viewer Example}{Simple Text Viewer} example uses the
+ techniques described in this document to show how to use \QA as a custom
+ help viewer for an application.
+
+ \warning In order to ship Qt Assistant in your application, it is crucial
+ that you include the sqlite plugin. For more information on how to include
+ plugins in your application, refer to the \l{Deploying Qt Applications}
+ {deployment documentation}.
+
+ \section1 Qt Help Collection Files
+
+ The first important point to know about \QA is that it stores all
+ settings related to its appearance \e and a list of installed
+ documentation in a help collection file. This means, when starting \QA
+ with different collection files, \QA may look totally different. This
+ complete separation of settings makes it possible to deploy \QA as a
+ custom help viewer for more than one application on one machine
+ without risk of interference between different instances of \QA.
+
+ To apply a certain help collection to \QA, specify the respective
+ collection file on the command line when starting it. For example:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 8
+
+ However, storing all settings in one collection file raises some problems.
+ The collection file is usually installed in the same directory as the
+ application itself, or one of its subdirectories. Depending on the
+ directory and the operating system, the user may not have any permissions
+ to modify this file which would happen when the user settings are stored.
+ Also, it may not even be possible to give the user write permissions;
+ e.g., when the file is located on a read-only medium like a CD-ROM.
+
+ Even if it is possible to give everybody the right to store their settings
+ in a globally available collection file, the settings from one user would
+ be overwritten by another user when exiting \QA.
+
+ To solve this dilemma, \QA creates user specific collection files which
+ are more or less copied from the original collection file. The user-specific
+ collection file will be saved in a subdirectory of the path returned by
+ QDesktopServices::DataLocation. The subdirectory, or \e{cache directory}
+ within this user-specific location, can be defined in the help collection
+ project file. For example:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 7
+
+ So, when calling
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 8
+
+ \QA actually uses the collection file:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 9
+
+ There is no need ever to start \QA with the user specific collection
+ file. Instead, the collection file shipped with the application should
+ always be used. Also, when adding or removing documentation from the
+ collection file (see next section) always use the normal collection file.
+ \QA will take care of synchronizing the user collection files when the
+ list of installed documentation has changed.
+
+ \section1 Displaying Custom Documentation
+
+ Before \QA is able to show documentation, it has to know where it can
+ find the actual documentation files, meaning that it has to know the
+ location of the Qt compressed help file (*.qch). As already mentioned,
+ \QA stores references to the compressed help files in the currently used
+ collection file. So, when creating a new collection file you can list
+ all compressed help files \QA should display.
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 5
+
+ Sometimes, depending on the application for which \QA acts as a
+ help viewer, more documentation needs to be added over time; for
+ example, when installing more application components or plugins.
+ This can be done manually by starting \QA, opening the \gui{Edit|Preferences}
+ dialog and navigating to the \gui{Documentation} tab page. Then click
+ the \gui{Add...} button, select a Qt compressed help file (*.qch)
+ and press \gui{Open}. However, this approach has the disadvantage
+ that every user has to do it manually to get access to the new
+ documentation.
+
+ The prefered way of adding documentation to an already existing collection
+ file is to use the \c{-register} command line flag of \QA. When starting
+ \QA with this flag, the documentation will be added and \QA will
+ exit right away displaying a message if the registration was successful
+ or not.
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 6
+
+ The \c{-quiet} flag can be passed on to \QA to prevent it from writing
+ out the status message.
+
+ \bold{Note:} \QA will show the documentation in the contents view in the same
+ order as it was registered.
+
+
+ \section1 Changing the Appearance of Qt Assistant
+
+ The appearance of \QA can be changed by passing different command line options
+ on startup. However, these command line options only allow to show or hide
+ specific widgets, like the contents or index view. Other customizations, such
+ as changing the application title or icon, or disabling the filter functionality,
+ can be done by creating a custom help collection file.
+
+ \section2 Creating a Custom Help Collection File
+
+ The help collection file (*.qhc) used by \QA is created when running the
+ \c qcollectiongenerator tool on a help collection project file (*.qhcp).
+ The project file format is XML and supports the following tags:
+
+ \table
+ \header
+ \o Tag
+ \o Brief Description
+ \row
+ \o \c{<title>}
+ \o This property is used to specify a window title for \QA.
+ \row
+ \o \c{<homePage>}
+ \o This tag specifies which page should be display when
+ pressing the home button in \QA's main user interface.
+ \row
+ \o \c{<startPage>}
+ \o This tag specifies which page \QA should initially
+ display when the help collection is used.
+ \row
+ \o \c{<currentFilter>}
+ \o This tag specifies the \l{Qt Assistant in More Detail#Preferences Dialog}{filter}
+ that is initially used.
+ If this filter is not specified, the documentation will not be filtered. This has
+ no impact if only one documentation set is installed.
+ \row
+ \o \c{<applicationIcon>}
+ \o This tag describes an icon that will be used instead of the normal \QA
+ application icon. This is specified as a relative path from the directory
+ containing the collection file.
+ \row
+ \o \c{<enableFilterFunctionality>}
+ \o This tag is used to enable or disable user accessible filter functionality,
+ making it possible to prevent the user from changing any filter when running \QA.
+ It does not mean that the internal filter functionality is completely disabled.
+ Set the value to \c{false} if you want to disable the filtering. If the filter
+ toolbar should be shown by default, set the attribute \c{visible} to \c{true}.
+ \row
+ \o \c{<enableDocumentationManager>}
+ \o This tag is used to specify whether the documentation manager should be shown
+ in the preferences dialog. Disabling the Documentation Manager allows you to limit
+ \QA to display a specific documentation set or make it impossible for the end user
+ to accidentally remove or install documentation. To hide the documentation manager,
+ set the tag value to \c{false}.
+ \row
+ \o \c{<enableAddressBar>}
+ \o This tag describes if the address bar can be shown. By default it is
+ enabled; if you want to disable it set the tag value to \c{false}. If the
+ address bar functionality is enabled, the address bar can be shown by setting the
+ tag attribute \c{visible} to \c{true}.
+ \row
+ \o \c{<aboutMenuText>, <text>}
+ \o The \c{aboutMenuText} tag lists texts for different languages which will
+ later appear in the \menu{Help} menu; e.g., "About Application". A text is
+ specified within the \c{text} tags; the \c{language} attribute takes the two
+ letter language name. The text is used as the default text if no language
+ attribute is specified.
+ \row
+ \o \c{<aboutDialog>, <file>, <icon>}
+ \o The \c{aboutDialog} tag can be used to specify the text for the \gui{About}
+ dialog that can be opened from the \menu{Help} menu. The text is taken from the
+ file in the \c{file} tags. It is possible to specify a different file or any
+ language. The icon defined by the \c{icon} tags is applied to any language.
+ \row
+ \o \c{<cacheDirectory>}
+ \o Specified as a path relative to the directory given by
+ QDesktopServices::DataLocation, the cache path is used to store index files
+ needed for the full text search and a copy of the collection file.
+ The copy is needed because \QA stores all its settings in the collection file;
+ i.e., it must be writable for the user.
+ \endtable
+
+ In addition to those \QA specific tags, the tags for generating and registering
+ documentation can be used. See \l{QtHelp Module#Creating a Qt Help Collection}{Qt Help Collection}
+ documentation for more information.
+
+ An example of a help collection file that uses all the available tags is shown below:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 1
+
+ To create the binary collection file, run the \c qcollectiongenerator tool:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 10
+
+ To test the generated collection file, start \QA in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 8
+
+ \section1 Using Qt Assistant Remotely
+
+ Even though the help viewer is a standalone application, it will mostly
+ be launched by the application it provides help for. This approach
+ gives the application the possibility to ask for specific help contents
+ to be displayed as soon as the help viewer is started. Another advantage
+ with this approach is that the application can communicate with the
+ help viewer process and can therefore request other help contents to be
+ shown depending on the current state of the application.
+
+ So, to use \QA as the custom help viewer of your application, simply
+ create a QProcess and specify the path to the Assistant executable. In order
+ to make Assistant listen to your application, turn on its remote control
+ functionality by passing the \c{-enableRemoteControl} command line option.
+
+ \warning The trailing '\0' must be appended separately to the QByteArray,
+ e.g., \c{QByteArray("command" + '\0')}.
+
+ The following example shows how this can be done:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 2
+
+ Once \QA is running, you can send commands by using the stdin channel of
+ the process. The code snippet below shows how to tell \QA to show a certain
+ page in the documentation.
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 3
+
+ The following commands can be used to control \QA:
+
+ \table
+ \header
+ \o Command
+ \o Brief Description
+ \row
+ \o \c{show <Widget>}
+ \o Shows the dock widget specified by <Widget>. If the widget
+ is already shown and this command is sent again, the widget will be
+ activated, meaning that it will be raised and given the input focus.
+ Possible values for <Widget> are "contents", "index", "bookmarks" or "search".
+ \row
+ \o \c{hide <Widget>}
+ \o Hides the dock widget specified by <Widget>. Possible values for
+ <Widget> are "contents", "index", "bookmarks" and "search".
+ \row
+ \o \c{setSource <Url>}
+ \o Displays the given <Url>. The URL can be absolute or relative
+ to the currently displayed page. If the URL is absolute, it has to
+ be a valid Qt help system URL; i.e., starting with "qthelp://".
+ \row
+ \o \c{activateKeyword <Keyword>}
+ \o Inserts the specified <Keyword> into the line edit of the
+ index dock widget and activates the corresponding item in the
+ index list. If such an item has more than one link associated
+ with it, a topic chooser will be shown.
+ \row
+ \o \c{activateIdentifier <Id>}
+ \o Displays the help contents for the given <Id>. An ID is unique
+ in each namespace and has only one link associated to it, so the
+ topic chooser will never pop up.
+ \row
+ \o \c{syncContents}
+ \o Selects the item in the contents widget which corresponds to
+ the currently displayed page.
+ \row
+ \o \c{setCurrentFilter}
+ \o Selects the specified filter and updates the visual representation
+ accordingly.
+ \row
+ \o \c{expandToc <Depth>}
+ \o Expands the table of contents tree to the given depth. If depth
+ is less than 1, the tree will be collapsed completely.
+ \endtable
+
+ If you want to send several commands within a short period of time, it is
+ recommended that you write only a single line to the stdin of the process
+ instead of one line for every command. The commands have to be separated by
+ a semicolon, as shown in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 4
+
+ \section1 Compatibility with Old Formats
+
+ In older versions of Qt, the help system was based on Document Content File
+ (DCF) and Qt Assistant Documentation Profile (ADP) formats. In contrast,
+ Qt Assistant and the help system used in Qt 4.4 use the formats described
+ earlier in this manual.
+
+ Unfortunately, the old file formats are not compatible with the new ones.
+ In general, the differences are not that big \mdash in most cases is the old
+ format is just a subset of the new one. One example is the \c namespace tag in
+ the Qt Help Project format, which was not part of the old format, but plays a vital
+ role in the new one. To help you to move to the new file format, we have created
+ a conversion wizard.
+
+ The wizard is started by executing \c qhelpconverter. It guides you through the
+ conversion of different parts of the file and generates a new \c qch or \c qhcp
+ file.
+
+ Once the wizard is finished and the files created, run the \c qhelpgenerator
+ or the \c qcollectiongenerator tool to generate the binary help files used by \QA.
+*/
+
+/*
+\section2 Modifying \QA with Command Line Options
+
+ Different help collections can be shown by simply passing the help collection
+ path to \QA. For example:
+
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 0
+
+ Other available options the can be passed on the command line.
+
+ \table
+ \header
+ \o Command Line Option
+ \o Brief Description
+ \row
+ \o -collectionFile <file.qhc>
+ \o Uses the specified collection file instead of the default one.
+ \row
+ \o -showUrl URL
+ \o Shows the document referenced by URL.
+ \row
+ \o -enableRemoteControl
+ \o Enables \QA to be remotly controlled.
+ \row
+ \o -show <widget>
+ \o Shows the specified dockwidget which can be "contents", "index",
+ "bookmarks" or "search".
+ \row
+ \o -hide <widget>
+ \o Hides the specified dockwidget which can be "contents", "index",
+ "bookmarks" or "search.
+ \row
+ \o -activate <widget>
+ \o Activates the specified dockwidget which can be "contents",
+ "index", "bookmarks" or "search.
+ \row
+ \o -register <doc.qch>
+ \o Registers the specified compressed help file in the given help
+ collection.
+ \row
+ \o -unregister <doc.qch>
+ \o Unregisters the specified compressed help file from the given
+ collection file.
+ \row
+ \o -quiet
+ \o Doesn't show any error, warning or success messages.
+ \endtable
+ */
diff --git a/doc/src/atomic-operations.qdoc b/doc/src/atomic-operations.qdoc
new file mode 100644
index 0000000..5c0973b
--- /dev/null
+++ b/doc/src/atomic-operations.qdoc
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page atomic-operations.html
+ \title Implementing Atomic Operations
+ \ingroup architecture
+ \ingroup qt-embedded-linux
+ \brief A guide to implementing atomic operations on new architectures.
+
+ Qt uses an optimization called \l {Implicitly Shared
+ Classes}{implicit sharing} for many of its value classes.
+
+ Starting with Qt 4, all of Qt's implicitly shared classes can
+ safely be copied across threads like any other value classes,
+ i.e., they are fully \l {Thread Support in Qt#Reentrancy and
+ Thread-Safety}{reentrant}. This is accomplished by implementing
+ reference counting operations using atomic hardware instructions
+ on all the different platforms supported by Qt.
+
+ To support a new architecture, it is important to ensure that
+ these platform-specific atomic operations are implemented in a
+ corresponding header file (\c qatomic_ARCH.h), and that this file
+ is located in Qt's \c src/corelib/arch directory. For example, the
+ Intel 80386 implementation is located in \c
+ src/corelib/arch/qatomic_i386.h.
+
+ Currently, Qt provides two classes providing several atomic
+ operations, QAtomicInt and QAtomicPointer. These classes inherit
+ from QBasicAtomicInt and QBasicAtomicPointer, respectively.
+
+ When porting Qt to a new architecture, the QBasicAtomicInt and
+ QBasicAtomicPointer classes must be implemented, \e not QAtomicInt
+ and QAtomicPointer. The former classes do not have constructors,
+ which makes them POD (plain-old-data). Both classes only have a
+ single member variable called \c _q_value, which stores the
+ value. This is the value that all of the atomic operations read
+ and modify.
+
+ All of the member functions mentioned in the QAtomicInt and
+ QAtomicPointer API documentation must be implemented. Note that
+ these the implementations of the atomic operations in these
+ classes must be atomic with respect to both interrupts and
+ multiple processors.
+
+ \warning The QBasicAtomicInt and QBasicAtomicPointer classes
+ mentioned in this document are used internally by Qt and are not
+ part of the public API. They may change in future versions of
+ Qt. The purpose of this document is to aid people interested in
+ porting Qt to a new architecture.
+*/
diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc
new file mode 100644
index 0000000..2a17a34
--- /dev/null
+++ b/doc/src/bughowto.qdoc
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page bughowto.html
+ \title How to Report a Bug
+ \brief Information about ways to report bugs in Qt.
+ \ingroup howto
+
+ If you think you have found a bug in Qt, we would like to hear
+ about it so that we can fix it.
+
+ Before reporting a bug, please check the \l{FAQs}, \l{Platform
+ Notes}, and the \l{Task Tracker} on the Qt website to see
+ if the issue is already known.
+
+ Always include the following information in your bug report:
+
+ \list 1
+ \o The name and version number of your compiler
+ \o The name and version number of your operating system
+ \o The version of Qt you are using, and what configure options it was
+ compiled with.
+ \endlist
+
+ If the problem you are reporting is only visible at run-time, try to
+ create a small test program that shows the problem when run. Often,
+ such a program can be created with some minor changes to one
+ of the many example programs in Qt's \c examples directory.
+
+ Please submit the bug report using the \l{Task Tracker} on the Qt
+ website.
+*/
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
new file mode 100644
index 0000000..c25da2b
--- /dev/null
+++ b/doc/src/classes.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page classes.html
+ \title Qt's Classes
+ \ingroup classlists
+
+ This is a list of all Qt classes excluding the \l{Qt 3
+ compatibility classes}. For a shorter list that only includes the
+ most frequently used classes, see \l{Qt's Main Classes}.
+ \omit This is old and dingy now.
+ and the \l{http://doc.trolltech.com/extras/qt43-class-chart.pdf}{Qt 4.3 Class Chart (PDF)}.
+ \endomit
+
+ \generatelist classes
+
+ \sa {Qt 3 Compatibility Classes}, {Qt's Modules}
+*/
+
+/*!
+ \page namespaces.html
+ \title Qt's Namespaces
+ \ingroup classlists
+
+ This is a list of the main namespaces in Qt. For a list of classes in
+ Qt, see \l{Qt's Classes}.
+
+ \generatelist{namespaces}
+*/
diff --git a/doc/src/codecs.qdoc b/doc/src/codecs.qdoc
new file mode 100644
index 0000000..eaeed3e
--- /dev/null
+++ b/doc/src/codecs.qdoc
@@ -0,0 +1,534 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page codec-big5.html
+ \title Big5 Text Codec
+ \ingroup codecs
+
+ The Big5 codec provides conversion to and from the Big5 encoding.
+ The code was originally contributed by Ming-Che Chuang
+ \<mingche@cobra.ee.ntu.edu.tw\> for the Big-5+ encoding, and was
+ included in Qt with the author's permission, and the grateful
+ thanks of the Trolltech team. (Note: Ming-Che's code is QPL'd, as
+ per an mail to qt-info@nokia.com.)
+
+ However, since Big-5+ was never formally approved, and was never
+ used by anyone, the Taiwan Free Software community and the Li18nux
+ Big5 Standard Subgroup agree that the de-facto standard Big5-ETen
+ (zh_TW.Big5 or zh_TW.TW-Big5) be used instead.
+
+ The Big5 is currently implemented as a pure subset of the
+ Big5-HKSCS codec, so more fine-tuning is needed to make it
+ identical to the standard Big5 mapping as determined by
+ Li18nux-Big5. See \l{http://www.autrijus.org/xml/} for the draft
+ Big5 (2002) standard.
+
+ James Su \<suzhe@turbolinux.com.cn\> \<suzhe@gnuchina.org\>
+ generated the Big5-HKSCS-to-Unicode tables with a very
+ space-efficient algorithm. He generously donated his code to glibc
+ in May 2002. Subsequently, James has kindly allowed Anthony Fok
+ \<anthony@thizlinux.com\> \<foka@debian.org\> to adapt the code
+ for Qt.
+
+ \legalese
+ Copyright (C) 2000 Ming-Che Chuang \BR
+ Copyright (C) 2002 James Su, Turbolinux Inc. \BR
+ Copyright (C) 2002 Anthony Fok, ThizLinux Laboratory Ltd.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-big5hkscs.html
+ \title Big5-HKSCS Text Codec
+ \ingroup codecs
+
+ The Big5-HKSCS codec provides conversion to and from the
+ Big5-HKSCS encoding.
+
+ The codec grew out of the QBig5Codec originally contributed by
+ Ming-Che Chuang \<mingche@cobra.ee.ntu.edu.tw\>. James Su
+ \<suzhe@turbolinux.com.cn\> \<suzhe@gnuchina.org\> and Anthony Fok
+ \<anthony@thizlinux.com\> \<foka@debian.org\> implemented HKSCS-1999
+ QBig5hkscsCodec for Qt-2.3.x, but it was too late in Qt development
+ schedule to be officially included in the Qt-2.3.x series.
+
+ Wu Yi \<wuyi@hancom.com\> ported the HKSCS-1999 QBig5hkscsCodec to
+ Qt-3.0.1 in March 2002.
+
+ With the advent of the new HKSCS-2001 standard, James Su
+ \<suzhe@turbolinux.com.cn\> \<suzhe@gnuchina.org\> generated the
+ Big5-HKSCS<->Unicode tables with a very space-efficient algorithm.
+ He generously donated his code to glibc in May 2002. Subsequently,
+ James has generously allowed Anthony Fok to adapt the code for
+ Qt-3.0.5.
+
+ Currently, the Big5-HKSCS tables are generated from the following
+ sources, and with the Euro character added:
+ \list 1
+ \o \l{http://www.microsoft.com/typography/unicode/950.txt}
+ \o \l{http://www.info.gov.hk/digital21/chi/hkscs/download/big5-iso.txt}
+ \o \l{http://www.info.gov.hk/digital21/chi/hkscs/download/big5cmp.txt}
+ \endlist
+
+ There may be more fine-tuning to the QBig5hkscsCodec to maximize its
+ compatibility with the standard Big5 (2002) mapping as determined by
+ Li18nux Big5 Standard Subgroup. See \l{http://www.autrijus.org/xml/}
+ for the various Big5 CharMapML tables.
+
+ \legalese
+ Copyright (C) 2000 Ming-Che Chuang \BR
+ Copyright (C) 2001, 2002 James Su, Turbolinux Inc. \BR
+ Copyright (C) 2002 WU Yi, HancomLinux Inc. \BR
+ Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-eucjp.html
+ \title EUC-JP Text Codec
+ \ingroup codecs
+
+ The EUC-JP codec provides conversion to and from EUC-JP, the main
+ legacy encoding for Unix machines in Japan.
+
+ The environment variable \c UNICODEMAP_JP can be used to
+ fine-tune the JIS, Shift-JIS, and EUC-JP codecs. The \l{ISO
+ 2022-JP (JIS) Text Codec} documentation describes how to use this
+ variable.
+
+ Most of the code here was written by Serika Kurusugawa,
+ a.k.a. Junji Takagi, and is included in Qt with the author's
+ permission and the grateful thanks of the Trolltech team. Here is
+ the copyright statement for that code:
+
+ \legalese
+
+ Copyright (C) 1999 Serika Kurusugawa. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS".
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-euckr.html
+ \title EUC-KR Text Codec
+ \ingroup codecs
+
+ The EUC-KR codec provides conversion to and from EUC-KR, KR, the
+ main legacy encoding for Unix machines in Korea.
+
+ It was largely written by Mizi Research Inc. Here is the
+ copyright statement for the code as it was at the point of
+ contribution. Trolltech's subsequent modifications are covered by
+ the usual copyright for Qt.
+
+ \legalese
+
+ Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-gbk.html
+ \title GBK Text Codec
+ \ingroup codecs
+
+ The GBK codec provides conversion to and from the Chinese
+ GB18030/GBK/GB2312 encoding.
+
+ GBK, formally the Chinese Internal Code Specification, is a commonly
+ used extension of GB 2312-80. Microsoft Windows uses it under the
+ name codepage 936.
+
+ GBK has been superseded by the new Chinese national standard
+ GB 18030-2000, which added a 4-byte encoding while remaining
+ compatible with GB2312 and GBK. The new GB 18030-2000 may be described
+ as a special encoding of Unicode 3.x and ISO-10646-1.
+
+ Special thanks to charset gurus Markus Scherer (IBM),
+ Dirk Meyer (Adobe Systems) and Ken Lunde (Adobe Systems) for publishing
+ an excellent GB 18030-2000 summary and specification on the Internet.
+ Some must-read documents are:
+
+ \list
+ \o \l{ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf}
+ \o \l{http://oss.software.ibm.com/cvs/icu/~checkout~/charset/source/gb18030/gb18030.html}
+ \o \l{http://oss.software.ibm.com/cvs/icu/~checkout~/charset/data/xml/gb-18030-2000.xml}
+ \endlist
+
+ The GBK codec was contributed to Qt by
+ Justin Yu \<justiny@turbolinux.com.cn\> and
+ Sean Chen \<seanc@turbolinux.com.cn\>. They may also be reached at
+ Yu Mingjian \<yumj@sun.ihep.ac.cn\>, \<yumingjian@china.com\>
+ Chen Xiangyang \<chenxy@sun.ihep.ac.cn\>
+
+ The GB18030 codec Qt functions were contributed to Qt by
+ James Su \<suzhe@gnuchina.org\>, \<suzhe@turbolinux.com.cn\>
+ who pioneered much of GB18030 development on GNU/Linux systems.
+
+ The GB18030 codec was contributed to Qt by
+ Anthony Fok \<anthony@thizlinux.com\>, \<foka@debian.org\>
+ using a Perl script to generate C++ tables from gb-18030-2000.xml
+ while merging contributions from James Su, Justin Yu and Sean Chen.
+ A copy of the source Perl script is available at
+ \l{http://people.debian.org/~foka/gb18030/gen-qgb18030codec.pl}
+
+ The copyright notice for their code follows:
+
+ \legalese
+ Copyright (C) 2000 TurboLinux, Inc. Written by Justin Yu and Sean Chen. \BR
+ Copyright (C) 2001, 2002 Turbolinux, Inc. Written by James Su. \BR
+ Copyright (C) 2001, 2002 ThizLinux Laboratory Ltd. Written by Anthony Fok.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codecs-jis.html
+ \title ISO 2022-JP (JIS) Text Codec
+ \ingroup codecs
+
+ The JIS codec provides conversion to and from ISO 2022-JP.
+
+ The environment variable \c UNICODEMAP_JP can be used to
+ fine-tune the JIS, Shift-JIS, and EUC-JP codecs. The mapping
+ names are as for the Japanese XML working group's \link
+ http://www.y-adagio.com/public/standards/tr_xml_jpf/toc.htm XML
+ Japanese Profile\endlink, because it names and explains all the
+ widely used mappings. Here are brief descriptions, written by
+ Serika Kurusugawa:
+
+ \list
+
+ \o "unicode-0.9" or "unicode-0201" for Unicode style. This assumes
+ JISX0201 for 0x00-0x7f. (0.9 is a table version of jisx02xx mapping
+ used for Unicode 1.1.)
+
+ \o "unicode-ascii" This assumes US-ASCII for 0x00-0x7f; some
+ chars (JISX0208 0x2140 and JISX0212 0x2237) are different from
+ Unicode 1.1 to avoid conflict.
+
+ \o "open-19970715-0201" ("open-0201" for convenience) or
+ "jisx0221-1995" for JISX0221-JISX0201 style. JIS X 0221 is JIS
+ version of Unicode, but a few chars (0x5c, 0x7e, 0x2140, 0x216f,
+ 0x2131) are different from Unicode 1.1. This is used when 0x5c is
+ treated as YEN SIGN.
+
+ \o "open-19970715-ascii" ("open-ascii" for convenience) for
+ JISX0221-ASCII style. This is used when 0x5c is treated as REVERSE
+ SOLIDUS.
+
+ \o "open-19970715-ms" ("open-ms" for convenience) or "cp932" for
+ Microsoft Windows style. Windows Code Page 932. Some chars (0x2140,
+ 0x2141, 0x2142, 0x215d, 0x2171, 0x2172) are different from Unicode
+ 1.1.
+
+ \o "jdk1.1.7" for Sun's JDK style. Same as Unicode 1.1, except that
+ JIS 0x2140 is mapped to UFF3C. Either ASCII or JISX0201 can be used
+ for 0x00-0x7f.
+
+ \endlist
+
+ In addition, the extensions "nec-vdc", "ibm-vdc" and "udc" are
+ supported.
+
+ For example, if you want to use Unicode style conversion but with
+ NEC's extension, set \c UNICODEMAP_JP to \c {unicode-0.9,
+ nec-vdc}. (You will probably need to quote that in a shell
+ command.)
+
+ Most of the code here was written by Serika Kurusugawa,
+ a.k.a. Junji Takagi, and is included in Qt with the author's
+ permission and the grateful thanks of the Trolltech team. Here is
+ the copyright statement for that code:
+
+ \legalese
+
+ Copyright (C) 1999 Serika Kurusugawa. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS".
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-sjis.html
+ \title Shift-JIS Text Codec
+ \ingroup codecs
+
+ The Shift-JIS codec provides conversion to and from Shift-JIS, an
+ encoding of JIS X 0201 Latin, JIS X 0201 Kana and JIS X 0208.
+
+ The environment variable \c UNICODEMAP_JP can be used to
+ fine-tune the codec. The \l{ISO 2022-JP (JIS) Text Codec}
+ documentation describes how to use this variable.
+
+ Most of the code here was written by Serika Kurusugawa, a.k.a.
+ Junji Takagi, and is included in Qt with the author's permission
+ and the grateful thanks of the Trolltech team. Here is the
+ copyright statement for the code as it was at the point of
+ contribution. Trolltech's subsequent modifications are covered by
+ the usual copyright for Qt.
+
+ \legalese
+
+ Copyright (C) 1999 Serika Kurusugawa. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS".
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
+
+/*!
+ \page codec-tscii.html
+ \title TSCII Text Codec
+ \ingroup codecs
+
+ The TSCII codec provides conversion to and from the Tamil TSCII
+ encoding.
+
+ TSCII, formally the Tamil Standard Code Information Interchange
+ specification, is a commonly used charset for Tamils. The
+ official page for the standard is at
+ \link http://www.tamil.net/tscii/ http://www.tamil.net/tscii/\endlink
+
+ This codec uses the mapping table found at
+ \link http://www.geocities.com/Athens/5180/tsciiset.html
+ http://www.geocities.com/Athens/5180/tsciiset.html\endlink.
+ Tamil uses composed Unicode which might cause some
+ problems if you are using Unicode fonts instead of TSCII fonts.
+
+ Most of the code was written by Hans Petter Bieker and is
+ included in Qt with the author's permission and the grateful
+ thanks of the Trolltech team. Here is the copyright statement for
+ the code as it was at the point of contribution. Trolltech's
+ subsequent modifications are covered by the usual copyright for
+ Qt:
+
+ \legalese
+
+ Copyright (c) 2000 Hans Petter Bieker. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ \list 1
+ \o Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ \endlegalese
+*/
diff --git a/doc/src/commercialeditions.qdoc b/doc/src/commercialeditions.qdoc
new file mode 100644
index 0000000..987468c
--- /dev/null
+++ b/doc/src/commercialeditions.qdoc
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page commercialeditions.html
+ \title Qt Commercial Editions
+ \ingroup licensing
+ \brief Information about the license and features of the Commercial Edition.
+
+ \keyword Qt Full Framework Edition
+ \keyword Qt GUI Framework Edition
+
+ Two editions of Qt are available under a commercial license:
+ Qt GUI Framework Edition, and Qt Full Framework Edition.
+
+ If you want to develop Free or Open Source software for release using a recognized
+ Open Source license, you can use the \l{Open Source Versions of Qt}.
+
+ The table below summarizes the differences between the three
+ commercial editions:
+
+ \table 75%
+ \header \o{1,2} Features \o{2,1} Editions
+ \header \o Qt GUI Framework \o Qt Full Framework
+ \row \o \l{QtCore}{Qt Core classes (QtCore)} \o \bold{X} \o \bold{X}
+ \row \o \l{QtGui}{Qt GUI classes (QtGui)} \o \bold{(X)} \o \bold{X}
+ \row \o \l{Graphics View Classes} (part of QtGui) \o \o \bold{X}
+ \row \o \l{QtNetwork}{Networking (QtNetwork)} \o \o \bold{X}
+ \row \o \l{QtOpenGL}{OpenGL (QtOpenGL)} \o \o \bold{X}
+ \row \o \l{QtScript}{Scripting (QtScript)} \o \o \bold{X}
+ \row \o \l{QtScriptTools}{Script Debugging (QtScriptTools)}\o \o \bold{X}
+ \row \o \l{QtSql}{Database/SQL (QtSql)} \o \o \bold{X}
+ \row \o \l{QtSvg}{SVG (QtSvg)} \o \o \bold{X}
+ \row \o \l{QtWebKit}{WebKit integration (QtWebKit)} \o \o \bold{X}
+ \row \o \l{QtXml}{XML (QtXml)} \o \o \bold{X}
+ \row \o \l{QtXmlPatterns}{XQuery and XPath (QtXmlPatterns)}\o \o \bold{X}
+ \row \o \l{Qt3Support}{Qt 3 Support (Qt3Support)} \o \bold{(X)} \o \bold{X}
+ \row \o \l{QtHelp}{Help system (QtHelp)} \o \o \bold{X}
+ \row \o \l{QtDBus}{D-Bus IPC support (QtDBus)} \o \bold{X} \o \bold{X}
+ \row \o \l{QtDesigner}{\QD extension classes (QtDesigner)} \o \o \bold{X}
+ \row \o \l{QtTest}{Unit testing framework (QtTest)} \o \bold{X} \o \bold{X}
+ \row \o \l{QtUiTools}{Run-time form handling (QtUiTools)} \o \o \bold{X}
+ \row \o \l{Phonon Module}{Phonon Multimedia Framework} \o \o \bold{X}
+ \row \o \l{ActiveQt} \o \o \bold{<X>}
+ \endtable
+
+ \bold{(X)} The Qt GUI Framework Edition contains selected classes from the QtGui and
+ Qt3Support modules corresponding to the functionality available in the Qt 3 Professional
+ Edition.
+
+ \bold{<X>} The ActiveQt module is only available on Windows.
+
+ Lists of the classes available in each edition are available on the
+ following pages:
+
+ \list
+ \o \l{Qt GUI Framework Edition Classes}
+ \o \l{Qt Full Framework Edition Classes}
+ \endlist
+
+ Please see the \l{Supported Platforms}{list of supported
+ platforms} for up-to-date information about the various platforms
+ and compilers that Qt supports.
+
+ On the Qt web site, you can find a
+ \l{Qt Licensing Overview} and information on \l{Qt License Pricing}
+ for commercial editions of Qt and other Qt-related products.
+
+ To purchase, please visit the \l{How to Order}{online order
+ form}.
+
+ For further information and assistance, please contact Qt
+ sales.
+
+ Email: \l{mailto:qt-sales@nokia.com}{qt-sales@nokia.com}.
+
+ Phone, U.S. office (for North America): \bold{1-650-813-1676}.
+
+ Phone, Norway office (for the rest of the world): \bold{+47 21 60
+ 48 00}.
+*/
+
+/*!
+ \page full-framework-edition-classes.html
+ \title Qt Full Framework Edition Classes
+ \ingroup classlists
+
+ \generatelist{classesbyedition Desktop}
+*/
+
+/*!
+ \page gui-framework-edition-classes.html
+ \title Qt GUI Framework Edition Classes
+ \ingroup classlists
+
+ \generatelist{classesbyedition DesktopLight}
+*/
diff --git a/doc/src/compatclasses.qdoc b/doc/src/compatclasses.qdoc
new file mode 100644
index 0000000..62bbdb5
--- /dev/null
+++ b/doc/src/compatclasses.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page compatclasses.html
+ \title Qt 3 Compatibility Classes
+ \ingroup classlists
+
+ This is a list of the classes that Qt provides for compatibility
+ with Qt 3. The vast majority of these are provided by the
+ Qt3Support module.
+
+ \generatelist compatclasses
+
+ \sa {Qt's Classes}, {Qt's Modules}
+*/
diff --git a/doc/src/containers.qdoc b/doc/src/containers.qdoc
new file mode 100644
index 0000000..d107277
--- /dev/null
+++ b/doc/src/containers.qdoc
@@ -0,0 +1,775 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group containers
+ \title Generic Containers
+ \ingroup architecture
+ \ingroup groups
+ \keyword container class
+ \keyword container classes
+
+ \brief Qt's template-based container classes.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ The Qt library provides a set of general purpose template-based
+ container classes. These classes can be used to store items of a
+ specified type. For example, if you need a resizable array of
+ \l{QString}s, use QVector<QString>.
+
+ These container classes are designed to be lighter, safer, and
+ easier to use than the STL containers. If you are unfamiliar with
+ the STL, or prefer to do things the "Qt way", you can use these
+ classes instead of the STL classes.
+
+ The container classes are \l{implicitly shared}, they are
+ \l{reentrant}, and they are optimized for speed, low memory
+ consumption, and minimal inline code expansion, resulting in
+ smaller executables. In addition, they are \l{thread-safe}
+ in situations where they are used as read-only containers
+ by all threads used to access them.
+
+ For traversing the items stored in a container, you can use one
+ of two types of iterators: \l{Java-style iterators} and
+ \l{STL-style iterators}. The Java-style iterators are easier to
+ use and provide high-level functionality, whereas the STL-style
+ iterators are slightly more efficient and can be used together
+ with Qt's and STL's \l{generic algorithms}.
+
+ Qt also offers a \l{foreach} keyword that make it very
+ easy to iterate over all the items stored in a container.
+
+ \section1 The Container Classes
+
+ Qt provides the following container classes:
+
+ \table
+ \header \o Class \o Summary
+
+ \row \o \l{QList}<T>
+ \o This is by far the most commonly used container class. It
+ stores a list of values of a given type (T) that can be accessed
+ by index. Internally, the QList is implemented using an array,
+ ensuring that index-based access is very fast.
+
+ Items can be added at either end of the list using
+ QList::append() and QList::prepend(), or they can be inserted in
+ the middle using QList::insert(). More than any other container
+ class, QList is highly optimized to expand to as little code as
+ possible in the executable. QStringList inherits from
+ QList<QString>.
+
+ \row \o \l{QLinkedList}<T>
+ \o This is similar to QList, except that it uses
+ iterators rather than integer indexes to access items. It also
+ provides better performance than QList when inserting in the
+ middle of a huge list, and it has nicer iterator semantics.
+ (Iterators pointing to an item in a QLinkedList remain valid as
+ long as the item exists, whereas iterators to a QList can become
+ invalid after any insertion or removal.)
+
+ \row \o \l{QVector}<T>
+ \o This stores an array of values of a given type at adjacent
+ positions in memory. Inserting at the front or in the middle of
+ a vector can be quite slow, because it can lead to large numbers
+ of items having to be moved by one position in memory.
+
+ \row \o \l{QStack}<T>
+ \o This is a convenience subclass of QVector that provides
+ "last in, first out" (LIFO) semantics. It adds the following
+ functions to those already present in QVector:
+ \l{QStack::push()}{push()}, \l{QStack::pop()}{pop()},
+ and \l{QStack::top()}{top()}.
+
+ \row \o \l{QQueue}<T>
+ \o This is a convenience subclass of QList that provides
+ "first in, first out" (FIFO) semantics. It adds the following
+ functions to those already present in QList:
+ \l{QQueue::enqueue()}{enqueue()},
+ \l{QQueue::dequeue()}{dequeue()}, and \l{QQueue::head()}{head()}.
+
+ \row \o \l{QSet}<T>
+ \o This provides a single-valued mathematical set with fast
+ lookups.
+
+ \row \o \l{QMap}<Key, T>
+ \o This provides a dictionary (associative array) that maps keys
+ of type Key to values of type T. Normally each key is associated
+ with a single value. QMap stores its data in Key order; if order
+ doesn't matter QHash is a faster alternative.
+
+ \row \o \l{QMultiMap}<Key, T>
+ \o This is a convenience subclass of QMap that provides a nice
+ interface for multi-valued maps, i.e. maps where one key can be
+ associated with multiple values.
+
+ \row \o \l{QHash}<Key, T>
+ \o This has almost the same API as QMap, but provides
+ significantly faster lookups. QHash stores its data in an
+ arbitrary order.
+
+ \row \o \l{QMultiHash}<Key, T>
+ \o This is a convenience subclass of QHash that
+ provides a nice interface for multi-valued hashes.
+
+ \endtable
+
+ Containers can be nested. For example, it is perfectly possible
+ to use a QMap<QString, QList<int> >, where the key type is
+ QString and the value type QList<int>. The only pitfall is that
+ you must insert a space between the closing angle brackets (>);
+ otherwise the C++ compiler will misinterpret the two >'s as a
+ right-shift operator (>>) and report a syntax error.
+
+ The containers are defined in individual header files with the
+ same name as the container (e.g., \c <QLinkedList>). For
+ convenience, the containers are forward declared in \c
+ <QtContainerFwd>.
+
+ \keyword assignable data type
+ \keyword assignable data types
+
+ The values stored in the various containers can be of any
+ \e{assignable data type}. To qualify, a type must provide a
+ default constructor, a copy constructor, and an assignment
+ operator. This covers most data types you are likely to want to
+ store in a container, including basic types such as \c int and \c
+ double, pointer types, and Qt data types such as QString, QDate,
+ and QTime, but it doesn't cover QObject or any QObject subclass
+ (QWidget, QDialog, QTimer, etc.). If you attempt to instantiate a
+ QList<QWidget>, the compiler will complain that QWidget's copy
+ constructor and assignment operators are disabled. If you want to
+ store these kinds of objects in a container, store them as
+ pointers, for example as QList<QWidget *>.
+
+ Here's an example custom data type that meets the requirement of
+ an assignable data type:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 0
+
+ If we don't provide a copy constructor or an assignment operator,
+ C++ provides a default implementation that performs a
+ member-by-member copy. In the example above, that would have been
+ sufficient. Also, if you don't provide any constructors, C++
+ provides a default constructor that initializes its member using
+ default constructors. Although it doesn't provide any
+ explicit constructors or assignment operator, the following data
+ type can be stored in a container:
+
+ \snippet doc/src/snippets/streaming/main.cpp 0
+
+ Some containers have additional requirements for the data types
+ they can store. For example, the Key type of a QMap<Key, T> must
+ provide \c operator<(). Such special requirements are documented
+ in a class's detailed description. In some cases, specific
+ functions have special requirements; these are described on a
+ per-function basis. The compiler will always emit an error if a
+ requirement isn't met.
+
+ Qt's containers provide operator<<() and operator>>() so that they
+ can easily be read and written using a QDataStream. This means
+ that the data types stored in the container must also support
+ operator<<() and operator>>(). Providing such support is
+ straightforward; here's how we could do it for the Movie struct
+ above:
+
+ \snippet doc/src/snippets/streaming/main.cpp 1
+ \codeline
+ \snippet doc/src/snippets/streaming/main.cpp 2
+
+ \keyword default-constructed values
+
+ The documentation of certain container class functions refer to
+ \e{default-constructed values}; for example, QVector
+ automatically initializes its items with default-constructed
+ values, and QMap::value() returns a default-constructed value if
+ the specified key isn't in the map. For most value types, this
+ simply means that a value is created using the default
+ constructor (e.g. an empty string for QString). But for primitive
+ types like \c{int} and \c{double}, as well as for pointer types,
+ the C++ language doesn't specify any initialization; in those
+ cases, Qt's containers automatically initialize the value to 0.
+
+ \section1 The Iterator Classes
+
+ Iterators provide a uniform means to access items in a container.
+ Qt's container classes provide two types of iterators: Java-style
+ iterators and STL-style iterators.
+
+ \section2 Java-Style Iterators
+
+ The Java-style iterators are new in Qt 4 and are the standard
+ ones used in Qt applications. They are more convenient to use than
+ the STL-style iterators, at the price of being slightly less
+ efficient. Their API is modelled on Java's iterator classes.
+
+ For each container class, there are two Java-style iterator data
+ types: one that provides read-only access and one that provides
+ read-write access.
+
+ \table
+ \header \o Containers \o Read-only iterator
+ \o Read-write iterator
+ \row \o QList<T>, QQueue<T> \o QListIterator<T>
+ \o QMutableListIterator<T>
+ \row \o QLinkedList<T> \o QLinkedListIterator<T>
+ \o QMutableLinkedListIterator<T>
+ \row \o QVector<T>, QStack<T> \o QVectorIterator<T>
+ \o QMutableVectorIterator<T>
+ \row \o QSet<T> \o QSetIterator<T>
+ \o QMutableSetIterator<T>
+ \row \o QMap<Key, T>, QMultiMap<Key, T> \o QMapIterator<Key, T>
+ \o QMutableMapIterator<Key, T>
+ \row \o QHash<Key, T>, QMultiHash<Key, T> \o QHashIterator<Key, T>
+ \o QMutableHashIterator<Key, T>
+ \endtable
+
+ In this discussion, we will concentrate on QList and QMap. The
+ iterator types for QLinkedList, QVector, and QSet have exactly
+ the same interface as QList's iterators; similarly, the iterator
+ types for QHash have the same interface as QMap's iterators.
+
+ Unlike STL-style iterators (covered \l{STL-style
+ iterators}{below}), Java-style iterators point \e between items
+ rather than directly \e at items. For this reason, they are
+ either pointing to the very beginning of the container (before
+ the first item), at the very end of the container (after the last
+ item), or between two items. The diagram below shows the valid
+ iterator positions as red arrows for a list containing four
+ items:
+
+ \img javaiterators1.png
+
+ Here's a typical loop for iterating through all the elements of a
+ QList<QString> in order and printing them to the console:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 1
+
+ It works as follows: The QList to iterate over is passed to the
+ QListIterator constructor. At that point, the iterator is located
+ just in front of the first item in the list (before item "A").
+ Then we call \l{QListIterator::hasNext()}{hasNext()} to
+ check whether there is an item after the iterator. If there is, we
+ call \l{QListIterator::next()}{next()} to jump over that
+ item. The next() function returns the item that it jumps over. For
+ a QList<QString>, that item is of type QString.
+
+ Here's how to iterate backward in a QList:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 2
+
+ The code is symmetric with iterating forward, except that we
+ start by calling \l{QListIterator::toBack()}{toBack()}
+ to move the iterator after the last item in the list.
+
+ The diagram below illustrates the effect of calling
+ \l{QListIterator::next()}{next()} and
+ \l{QListIterator::previous()}{previous()} on an iterator:
+
+ \img javaiterators2.png
+
+ The following table summarizes the QListIterator API:
+
+ \table
+ \header \o Function \o Behavior
+ \row \o \l{QListIterator::toFront()}{toFront()}
+ \o Moves the iterator to the front of the list (before the first item)
+ \row \o \l{QListIterator::toBack()}{toBack()}
+ \o Moves the iterator to the back of the list (after the last item)
+ \row \o \l{QListIterator::hasNext()}{hasNext()}
+ \o Returns true if the iterator isn't at the back of the list
+ \row \o \l{QListIterator::next()}{next()}
+ \o Returns the next item and advances the iterator by one position
+ \row \o \l{QListIterator::peekNext()}{peekNext()}
+ \o Returns the next item without moving the iterator
+ \row \o \l{QListIterator::hasPrevious()}{hasPrevious()}
+ \o Returns true if the iterator isn't at the front of the list
+ \row \o \l{QListIterator::previous()}{previous()}
+ \o Returns the previous item and moves the iterator back by one position
+ \row \o \l{QListIterator::peekPrevious()}{peekPrevious()}
+ \o Returns the previous item without moving the iterator
+ \endtable
+
+ QListIterator provides no functions to insert or remove items
+ from the list as we iterate. To accomplish this, you must use
+ QMutableListIterator. Here's an example where we remove all
+ odd numbers from a QList<int> using QMutableListIterator:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 3
+
+ The next() call in the loop is made every time. It jumps over the
+ next item in the list. The
+ \l{QMutableListIterator::remove()}{remove()} function removes the
+ last item that we jumped over from the list. The call to
+ \l{QMutableListIterator::remove()}{remove()} does not invalidate
+ the iterator, so it is safe to continue using it. This works just
+ as well when iterating backward:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 4
+
+ If we just want to modify the value of an existing item, we can
+ use \l{QMutableListIterator::setValue()}{setValue()}. In the code
+ below, we replace any value larger than 128 with 128:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 5
+
+ Just like \l{QMutableListIterator::remove()}{remove()},
+ \l{QMutableListIterator::setValue()}{setValue()} operates on the
+ last item that we jumped over. If we iterate forward, this is the
+ item just before the iterator; if we iterate backward, this is
+ the item just after the iterator.
+
+ The \l{QMutableListIterator::next()}{next()} function returns a
+ non-const reference to the item in the list. For simple
+ operations, we don't even need
+ \l{QMutableListIterator::setValue()}{setValue()}:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 6
+
+ As mentioned above, QLinkedList's, QVector's, and QSet's iterator
+ classes have exactly the same API as QList's. We will now turn to
+ QMapIterator, which is somewhat different because it iterates on
+ (key, value) pairs.
+
+ Like QListIterator, QMapIterator provides
+ \l{QMapIterator::toFront()}{toFront()},
+ \l{QMapIterator::toBack()}{toBack()},
+ \l{QMapIterator::hasNext()}{hasNext()},
+ \l{QMapIterator::next()}{next()},
+ \l{QMapIterator::peekNext()}{peekNext()},
+ \l{QMapIterator::hasPrevious()}{hasPrevious()},
+ \l{QMapIterator::previous()}{previous()}, and
+ \l{QMapIterator::peekPrevious()}{peekPrevious()}. The key and
+ value components are extracted by calling key() and value() on
+ the object returned by next(), peekNext(), previous(), or
+ peekPrevious().
+
+ The following example removes all (capital, country) pairs where
+ the capital's name ends with "City":
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 7
+
+ QMapIterator also provides a key() and a value() function that
+ operate directly on the iterator and that return the key and
+ value of the last item that the iterator jumped above. For
+ example, the following code copies the contents of a QMap into a
+ QHash:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 8
+
+ If we want to iterate through all the items with the same
+ value, we can use \l{QMapIterator::findNext()}{findNext()}
+ or \l{QMapIterator::findPrevious()}{findPrevious()}.
+ Here's an example where we remove all the items with a particular
+ value:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 9
+
+ \section2 STL-Style Iterators
+
+ STL-style iterators have been available since the release of Qt
+ 2.0. They are compatible with Qt's and STL's \l{generic
+ algorithms} and are optimized for speed.
+
+ For each container class, there are two STL-style iterator types:
+ one that provides read-only access and one that provides
+ read-write access. Read-only iterators should be used wherever
+ possible because they are faster than read-write iterators.
+
+ \table
+ \header \o Containers \o Read-only iterator
+ \o Read-write iterator
+ \row \o QList<T>, QQueue<T> \o QList<T>::const_iterator
+ \o QList<T>::iterator
+ \row \o QLinkedList<T> \o QLinkedList<T>::const_iterator
+ \o QLinkedList<T>::iterator
+ \row \o QVector<T>, QStack<T> \o QVector<T>::const_iterator
+ \o QVector<T>::iterator
+ \row \o QSet<T> \o QSet<T>::const_iterator
+ \o QSet<T>::iterator
+ \row \o QMap<Key, T>, QMultiMap<Key, T> \o QMap<Key, T>::const_iterator
+ \o QMap<Key, T>::iterator
+ \row \o QHash<Key, T>, QMultiHash<Key, T> \o QHash<Key, T>::const_iterator
+ \o QHash<Key, T>::iterator
+ \endtable
+
+ The API of the STL iterators is modelled on pointers in an array.
+ For example, the \c ++ operator advances the iterator to the next
+ item, and the \c * operator returns the item that the iterator
+ points to. In fact, for QVector and QStack, which store their
+ items at adjacent memory positions, the
+ \l{QVector::iterator}{iterator} type is just a typedef for \c{T *},
+ and the \l{QVector::iterator}{const_iterator} type is
+ just a typedef for \c{const T *}.
+
+ In this discussion, we will concentrate on QList and QMap. The
+ iterator types for QLinkedList, QVector, and QSet have exactly
+ the same interface as QList's iterators; similarly, the iterator
+ types for QHash have the same interface as QMap's iterators.
+
+ Here's a typical loop for iterating through all the elements of a
+ QList<QString> in order and converting them to lowercase:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 10
+
+ Unlike \l{Java-style iterators}, STL-style iterators point
+ directly at items. The begin() function of a container returns an
+ iterator that points to the first item in the container. The
+ end() function of a container returns an iterator to the
+ imaginary item one position past the last item in the container.
+ end() marks an invalid position; it must never be dereferenced.
+ It is typically used in a loop's break condition. If the list is
+ empty, begin() equals end(), so we never execute the loop.
+
+ The diagram below shows the valid iterator positions as red
+ arrows for a vector containing four items:
+
+ \img stliterators1.png
+
+ Iterating backward with an STL-style iterator requires us to
+ decrement the iterator \e before we access the item. This
+ requires a \c while loop:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 11
+
+ In the code snippets so far, we used the unary \c * operator to
+ retrieve the item (of type QString) stored at a certain iterator
+ position, and we then called QString::toLower() on it. Most C++
+ compilers also allow us to write \c{i->toLower()}, but some
+ don't.
+
+ For read-only access, you can use const_iterator, constBegin(),
+ and constEnd(). For example:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 12
+
+ The following table summarizes the STL-style iterators' API:
+
+ \table
+ \header \o Expression \o Behavior
+ \row \o \c{*i} \o Returns the current item
+ \row \o \c{++i} \o Advances the iterator to the next item
+ \row \o \c{i += n} \o Advances the iterator by \c n items
+ \row \o \c{--i} \o Moves the iterator back by one item
+ \row \o \c{i -= n} \o Moves the iterator back by \c n items
+ \row \o \c{i - j} \o Returns the number of items between iterators \c i and \c j
+ \endtable
+
+ The \c{++} and \c{--} operators are available both as prefix
+ (\c{++i}, \c{--i}) and postfix (\c{i++}, \c{i--}) operators. The
+ prefix versions modify the iterators and return a reference to
+ the modified iterator; the postfix versions take a copy of the
+ iterator before they modify it, and return that copy. In
+ expressions where the return value is ignored, we recommend that
+ you use the prefix operators (\c{++i}, \c{--i}), as these are
+ slightly faster.
+
+ For non-const iterator types, the return value of the unary \c{*}
+ operator can be used on the left side of the assignment operator.
+
+ For QMap and QHash, the \c{*} operator returns the value
+ component of an item. If you want to retrieve the key, call key()
+ on the iterator. For symmetry, the iterator types also provide a
+ value() function to retrieve the value. For example, here's how
+ we would print all items in a QMap to the console:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 13
+
+ Thanks to \l{implicit sharing}, it is very inexpensive for a
+ function to return a container per value. The Qt API contains
+ dozens of functions that return a QList or QStringList per value
+ (e.g., QSplitter::sizes()). If you want to iterate over these
+ using an STL iterator, you should always take a copy of the
+ container and iterate over the copy. For example:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 14
+
+ This problem doesn't occur with functions that return a const or
+ non-const reference to a container.
+
+ \l{Implicit sharing} has another consequence on STL-style
+ iterators: You must not take a copy of a container while
+ non-const iterators are active on that container. Java-style
+ iterators don't suffer from that limitation.
+
+ \keyword foreach
+ \section1 The foreach Keyword
+
+ If you just want to iterate over all the items in a container
+ in order, you can use Qt's \c foreach keyword. The keyword is a
+ Qt-specific addition to the C++ language, and is implemented
+ using the preprocessor.
+
+ Its syntax is: \c foreach (\e variable, \e container) \e
+ statement. For example, here's how to use \c foreach to iterate
+ over a QLinkedList<QString>:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 15
+
+ The \c foreach code is significantly shorter than the equivalent
+ code that uses iterators:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 16
+
+ Unless the data type contains a comma (e.g., \c{QPair<int,
+ int>}), the variable used for iteration can be defined within the
+ \c foreach statement:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 17
+
+ And like any other C++ loop construct, you can use braces around
+ the body of a \c foreach loop, and you can use \c break to leave
+ the loop:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 18
+
+ With QMap and QHash, \c foreach accesses the value component of
+ the (key, value) pairs. If you want to iterate over both the keys
+ and the values, you can use iterators (which are fastest), or you
+ can write code like this:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 19
+
+ For a multi-valued map:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 20
+
+ Qt automatically takes a copy of the container when it enters a
+ \c foreach loop. If you modify the container as you are
+ iterating, that won't affect the loop. (If you don't modify the
+ container, the copy still takes place, but thanks to \l{implicit
+ sharing} copying a container is very fast.) Similarly, declaring
+ the variable to be a non-const reference, in order to modify the
+ current item in the list will not work either.
+
+ In addition to \c foreach, Qt also provides a \c forever
+ pseudo-keyword for infinite loops:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 21
+
+ If you're worried about namespace pollution, you can disable
+ these macros by adding the following line to your \c .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+
+ \section1 Other Container-Like Classes
+
+ Qt includes three template classes that resemble containers in
+ some respects. These classes don't provide iterators and cannot
+ be used with the \c foreach keyword.
+
+ \list
+ \o QVarLengthArray<T, Prealloc> provides a low-level
+ variable-length array. It can be used instead of QVector in
+ places where speed is particularly important.
+
+ \o QCache<Key, T> provides a cache to store objects of a certain
+ type T associated with keys of type Key.
+
+ \o QPair<T1, T2> stores a pair of elements.
+ \endlist
+
+ Additional non-template types that compete with Qt's template
+ containers are QBitArray, QByteArray, QString, and QStringList.
+
+ \section1 Algorithmic Complexity
+
+ Algorithmic complexity is concerned about how fast (or slow) each
+ function is as the number of items in the container grow. For
+ example, inserting an item in the middle of a QLinkedList is an
+ extremely fast operation, irrespective of the number of items
+ stored in the QLinkedList. On the other hand, inserting an item
+ in the middle of a QVector is potentially very expensive if the
+ QVector contains many items, since half of the items must be
+ moved one position in memory.
+
+ To describe algorithmic complexity, we use the following
+ terminology, based on the "big Oh" notation:
+
+ \keyword constant time
+ \keyword logarithmic time
+ \keyword linear time
+ \keyword linear-logarithmic time
+ \keyword quadratic time
+
+ \list
+ \o \bold{Constant time:} O(1). A function is said to run in constant
+ time if it requires the same amount of time no matter how many
+ items are present in the container. One example is
+ QLinkedList::insert().
+
+ \o \bold{Logarithmic time:} O(log \e n). A function that runs in
+ logarithmic time is a function whose running time is
+ proportional to the logarithm of the number of items in the
+ container. One example is qBinaryFind().
+
+ \o \bold{Linear time:} O(\e n). A function that runs in linear time
+ will execute in a time directly proportional to the number of
+ items stored in the container. One example is
+ QVector::insert().
+
+ \o \bold{Linear-logarithmic time:} O(\e{n} log \e n). A function
+ that runs in linear-logarithmic time is asymptotically slower
+ than a linear-time function, but faster than a quadratic-time
+ function.
+
+ \o \bold{Quadratic time:} O(\e{n}\unicode{178}). A quadratic-time function
+ executes in a time that is proportional to the square of the
+ number of items stored in the container.
+ \endlist
+
+ The following table summarizes the algorithmic complexity of Qt's
+ sequential container classes:
+
+ \table
+ \header \o \o Index lookup \o Insertion \o Prepending \o Appending
+ \row \o QLinkedList<T> \o O(\e n) \o O(1) \o O(1) \o O(1)
+ \row \o QList<T> \o O(1) \o O(n) \o Amort. O(1) \o Amort. O(1)
+ \row \o QVector<T> \o O(1) \o O(n) \o O(n) \o Amort. O(1)
+ \endtable
+
+ In the table, "Amort." stands for "amortized behavior". For
+ example, "Amort. O(1)" means that if you call the function
+ only once, you might get O(\e n) behavior, but if you call it
+ multiple times (e.g., \e n times), the average behavior will be
+ O(1).
+
+ The following table summarizes the algorithmic complexity of Qt's
+ associative containers and sets:
+
+ \table
+ \header \o{1,2} \o{2,1} Key lookup \o{2,1} Insertion
+ \header \o Average \o Worst case \o Average \o Worst case
+ \row \o QMap<Key, T> \o O(log \e n) \o O(log \e n) \o O(log \e n) \o O(log \e n)
+ \row \o QMultiMap<Key, T> \o O((log \e n) \o O(log \e n) \o O(log \e n) \o O(log \e n)
+ \row \o QHash<Key, T> \o Amort. O(1) \o O(\e n) \o Amort. O(1) \o O(\e n)
+ \row \o QSet<Key> \o Amort. O(1) \o O(\e n) \o Amort. O(1) \o O(\e n)
+ \endtable
+
+ With QVector, QHash, and QSet, the performance of appending items
+ is amortized O(log \e n). It can be brought down to O(1) by
+ calling QVector::reserve(), QHash::reserve(), or QSet::reserve()
+ with the expected number of items before you insert the items.
+ The next section discusses this topic in more depth.
+
+ \section1 Growth Strategies
+
+ QVector<T>, QString, and QByteArray store their items
+ contiguously in memory; QList<T> maintains an array of pointers
+ to the items it stores to provide fast index-based access (unless
+ T is a pointer type or a basic type of the size of a pointer, in
+ which case the value itself is stored in the array); QHash<Key,
+ T> keeps a hash table whose size is proportional to the number
+ of items in the hash. To avoid reallocating the data every single
+ time an item is added at the end of the container, these classes
+ typically allocate more memory than necessary.
+
+ Consider the following code, which builds a QString from another
+ QString:
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 23
+
+ We build the string \c out dynamically by appending one character
+ to it at a time. Let's assume that we append 15000 characters to
+ the QString string. Then the following 18 reallocations (out of a
+ possible 15000) occur when QString runs out of space: 4, 8, 12,
+ 16, 20, 52, 116, 244, 500, 1012, 2036, 4084, 6132, 8180, 10228,
+ 12276, 14324, 16372. At the end, the QString has 16372 Unicode
+ characters allocated, 15000 of which are occupied.
+
+ The values above may seem a bit strange, but here are the guiding
+ principles:
+ \list
+ \o QString allocates 4 characters at a time until it reaches size 20.
+ \o From 20 to 4084, it advances by doubling the size each time.
+ More precisely, it advances to the next power of two, minus
+ 12. (Some memory allocators perform worst when requested exact
+ powers of two, because they use a few bytes per block for
+ book-keeping.)
+ \o From 4084 on, it advances by blocks of 2048 characters (4096
+ bytes). This makes sense because modern operating systems
+ don't copy the entire data when reallocating a buffer; the
+ physical memory pages are simply reordered, and only the data
+ on the first and last pages actually needs to be copied.
+ \endlist
+
+ QByteArray and QList<T> use more or less the same algorithm as
+ QString.
+
+ QVector<T> also uses that algorithm for data types that can be
+ moved around in memory using memcpy() (including the basic C++
+ types, the pointer types, and Qt's \l{shared classes}) but uses a
+ different algorithm for data types that can only be moved by
+ calling the copy constructor and a destructor. Since the cost of
+ reallocating is higher in that case, QVector<T> reduces the
+ number of reallocations by always doubling the memory when
+ running out of space.
+
+ QHash<Key, T> is a totally different case. QHash's internal hash
+ table grows by powers of two, and each time it grows, the items
+ are relocated in a new bucket, computed as qHash(\e key) %
+ QHash::capacity() (the number of buckets). This remark applies to
+ QSet<T> and QCache<Key, T> as well.
+
+ For most applications, the default growing algorithm provided by
+ Qt does the trick. If you need more control, QVector<T>,
+ QHash<Key, T>, QSet<T>, QString, and QByteArray provide a trio of
+ functions that allow you to check and specify how much memory to
+ use to store the items:
+
+ \list
+ \o \l{QString::capacity()}{capacity()} returns the
+ number of items for which memory is allocated (for QHash and
+ QSet, the number of buckets in the hash table).
+ \o \l{QString::reserve()}{reserve}(\e size) explicitly
+ preallocates memory for \e size items.
+ \o \l{QString::squeeze()}{squeeze()} frees any memory
+ not required to store the items.
+ \endlist
+
+ If you know approximately how many items you will store in a
+ container, you can start by calling reserve(), and when you are
+ done populating the container, you can call squeeze() to release
+ the extra preallocated memory.
+*/
diff --git a/doc/src/coordsys.qdoc b/doc/src/coordsys.qdoc
new file mode 100644
index 0000000..604d233
--- /dev/null
+++ b/doc/src/coordsys.qdoc
@@ -0,0 +1,486 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Qt Coordinate System Documentation.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page coordsys.html
+ \title The Coordinate System
+ \ingroup architecture
+ \brief Information about the coordinate system used by the paint
+ system.
+
+ The coordinate system is controlled by the QPainter
+ class. Together with the QPaintDevice and QPaintEngine classes,
+ QPainter form the basis of Qt's painting system, Arthur. QPainter
+ is used to perform drawing operations, QPaintDevice is an
+ abstraction of a two-dimensional space that can be painted on
+ using a QPainter, and QPaintEngine provides the interface that the
+ painter uses to draw onto different types of devices.
+
+ The QPaintDevice class is the base class of objects that can be
+ painted: Its drawing capabilities are inherited by the QWidget,
+ QPixmap, QPicture, QImage, and QPrinter classes. The default
+ coordinate system of a paint device has its origin at the top-left
+ corner. The \e x values increase to the right and the \e y values
+ increase downwards. The default unit is one pixel on pixel-based
+ devices and one point (1/72 of an inch) on printers.
+
+ The mapping of the logical QPainter coordinates to the physical
+ QPaintDevice coordinates are handled by QPainter's transformation
+ matrix, viewport and "window". The logical and physical coordinate
+ systems coincide by default. QPainter also supports coordinate
+ transformations (e.g. rotation and scaling).
+
+ \tableofcontents
+
+ \section1 Rendering
+
+ \section2 Logical Representation
+
+ The size (width and height) of a graphics primitive always
+ correspond to its mathematical model, ignoring the width of the
+ pen it is rendered with:
+
+ \table
+ \row
+ \o \inlineimage coordinatesystem-rect.png
+ \o \inlineimage coordinatesystem-line.png
+ \row
+ \o QRect(1, 2, 6, 4)
+ \o QLine(2, 7, 6, 1)
+ \endtable
+
+ \section2 Aliased Painting
+
+ When drawing, the pixel rendering is controlled by the
+ QPainter::Antialiasing render hint.
+
+ The \l {QPainter::RenderHint}{RenderHint} enum is used to specify
+ flags to QPainter that may or may not be respected by any given
+ engine. The QPainter::Antialiasing value indicates that the engine
+ should antialias edges of primitives if possible, i.e. smoothing
+ the edges by using different color intensities.
+
+ But by default the painter is \e aliased and other rules apply:
+ When rendering with a one pixel wide pen the pixels will be
+ rendered to the \e {right and below the mathematically defined
+ points}. For example:
+
+ \table
+ \row
+ \o \inlineimage coordinatesystem-rect-raster.png
+ \o \inlineimage coordinatesystem-line-raster.png
+
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 0
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 1
+ \endtable
+
+ When rendering with a pen with an even number of pixels, the
+ pixels will be rendered symetrically around the mathematical
+ defined points, while rendering with a pen with an odd number of
+ pixels, the spare pixel will be rendered to the right and below
+ the mathematical point as in the one pixel case. See the QRectF
+ diagrams below for concrete examples.
+
+ \table
+ \header
+ \o {3,1} QRectF
+ \row
+ \o \inlineimage qrect-diagram-zero.png
+ \o \inlineimage qrectf-diagram-one.png
+ \row
+ \o Logical representation
+ \o One pixel wide pen
+ \row
+ \o \inlineimage qrectf-diagram-two.png
+ \o \inlineimage qrectf-diagram-three.png
+ \row
+ \o Two pixel wide pen
+ \o Three pixel wide pen
+ \endtable
+
+ Note that for historical reasons the return value of the
+ QRect::right() and QRect::bottom() functions deviate from the true
+ bottom-right corner of the rectangle.
+
+ QRect's \l {QRect::right()}{right()} function returns \l
+ {QRect::left()}{left()} + \l {QRect::width()}{width()} - 1 and the
+ \l {QRect::bottom()}{bottom()} function returns \l
+ {QRect::top()}{top()} + \l {QRect::height()}{height()} - 1. The
+ bottom-right green point in the diagrams shows the return
+ coordinates of these functions.
+
+ We recommend that you simply use QRectF instead: The QRectF class
+ defines a rectangle in the plane using floating point coordinates
+ for accuracy (QRect uses integer coordinates), and the
+ QRectF::right() and QRectF::bottom() functions \e do return the
+ true bottom-right corner.
+
+ Alternatively, using QRect, apply \l {QRect::x()}{x()} + \l
+ {QRect::width()}{width()} and \l {QRect::y()}{y()} + \l
+ {QRect::height()}{height()} to find the bottom-right corner, and
+ avoid the \l {QRect::right()}{right()} and \l
+ {QRect::bottom()}{bottom()} functions.
+
+ \section2 Anti-aliased Painting
+
+ If you set QPainter's \l {QPainter::Antialiasing}{anti-aliasing}
+ render hint, the pixels will be rendered symetrically on both
+ sides of the mathematically defined points:
+
+ \table
+ \row
+ \o \inlineimage coordinatesystem-rect-antialias.png
+ \o \inlineimage coordinatesystem-line-antialias.png
+ \row
+ \o
+
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 2
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 3
+ \endtable
+
+ \section1 Transformations
+
+ By default, the QPainter operates on the associated device's own
+ coordinate system, but it also has complete support for affine
+ coordinate transformations.
+
+ You can scale the coordinate system by a given offset using the
+ QPainter::scale() function, you can rotate it clockwise using the
+ QPainter::rotate() function and you can translate it (i.e. adding
+ a given offset to the points) using the QPainter::translate()
+ function.
+
+ \table
+ \row
+ \o \inlineimage qpainter-clock.png
+ \o \inlineimage qpainter-rotation.png
+ \o \inlineimage qpainter-scale.png
+ \o \inlineimage qpainter-translation.png
+ \row
+ \o nop
+ \o \l {QPainter::rotate()}{rotate()}
+ \o \l {QPainter::scale()}{scale()}
+ \o \l {QPainter::translate()}{translate()}
+ \endtable
+
+ You can also twist the coordinate system around the origin using
+ the QPainter::shear() function. See the \l {demos/affine}{Affine
+ Transformations} demo for a visualization of a sheared coordinate
+ system. All the transformation operations operate on QPainter's
+ transformation matrix that you can retrieve using the
+ QPainter::worldMatrix() function. A matrix transforms a point in the
+ plane to another point.
+
+ If you need the same transformations over and over, you can also
+ use QMatrix objects and the QPainter::worldMatrix() and
+ QPainter::setWorldMatrix() functions. You can at any time save the
+ QPainter's transformation matrix by calling the QPainter::save()
+ function which saves the matrix on an internal stack. The
+ QPainter::restore() function pops it back.
+
+ One frequent need for the transformation matrix is when reusing
+ the same drawing code on a variety of paint devices. Without
+ transformations, the results are tightly bound to the resolution
+ of the paint device. Printers have high resolution, e.g. 600 dots
+ per inch, whereas screens often have between 72 and 100 dots per
+ inch.
+
+ \table 100%
+ \header
+ \o {2,1} Analog Clock Example
+ \row
+ \o \inlineimage coordinatesystem-analogclock.png
+ \o
+ The Analog Clock example shows how to draw the contents of a
+ custom widget using QPainter's transformation matrix.
+
+ Qt's example directory provides a complete walk-through of the
+ example. Here, we will only review the example's \l
+ {QWidget::paintEvent()}{paintEvent()} function to see how we can
+ use the transformation matrix (i.e. QPainter's matrix functions)
+ to draw the clock's face.
+
+ We recommend compiling and running this example before you read
+ any further. In particular, try resizing the window to different
+ sizes.
+
+ \row
+ \o {2,1}
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 9
+
+ First, we set up the painter. We translate the coordinate system
+ so that point (0, 0) is in the widget's center, instead of being
+ at the top-left corner. We also scale the system by \c side / 100,
+ where \c side is either the widget's width or the height,
+ whichever is shortest. We want the clock to be square, even if the
+ device isn't.
+
+ This will give us a 200 x 200 square area, with the origin (0, 0)
+ in the center, that we can draw on. What we draw will show up in
+ the largest possible square that will fit in the widget.
+
+ See also the \l {Window-Viewport Conversion} section.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 18
+
+ We draw the clock's hour hand by rotating the coordinate system
+ and calling QPainter::drawConvexPolygon(). Thank's to the
+ rotation, it's drawn pointed in the right direction.
+
+ The polygon is specified as an array of alternating \e x, \e y
+ values, stored in the \c hourHand static variable (defined at the
+ beginning of the function), which corresponds to the four points
+ (2, 0), (0, 2), (-2, 0), and (0, -25).
+
+ The calls to QPainter::save() and QPainter::restore() surrounding
+ the code guarantees that the code that follows won't be disturbed
+ by the transformations we've used.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 24
+
+ We do the same for the clock's minute hand, which is defined by
+ the four points (1, 0), (0, 1), (-1, 0), and (0, -40). These
+ coordinates specify a hand that is thinner and longer than the
+ minute hand.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 27
+
+ Finally, we draw the clock face, which consists of twelve short
+ lines at 30-degree intervals. At the end of that, the painter is
+ rotated in a way which isn't very useful, but we're done with
+ painting so that doesn't matter.
+ \endtable
+
+ For a demonstation of Qt's ability to perform affine
+ transformations on painting operations, see the \l
+ {demos/affine}{Affine Transformations} demo which allows the user
+ to experiment with the transformation operations. See also the \l
+ {painting/transformations}{Transformations} example which shows
+ how transformations influence the way that QPainter renders
+ graphics primitives. In particular, it shows how the order of
+ transformations affects the result.
+
+ For more information about the transformation matrix, see the
+ QMatrix documentation.
+
+ \section1 Window-Viewport Conversion
+
+ When drawing with QPainter, we specify points using logical
+ coordinates which then are converted into the physical coordinates
+ of the paint device.
+
+ The mapping of the logical coordinates to the physical coordinates
+ are handled by QPainter's world transformation \l
+ {QPainter::worldMatrix()}{worldMatrix()} (described in the \l
+ Transformations section), and QPainter's \l
+ {QPainter::viewport()}{viewport()} and \l
+ {QPainter::window()}{window()}. The viewport represents the
+ physical coordinates specifying an arbitrary rectangle. The
+ "window" describes the same rectangle in logical coordinates. By
+ default the logical and physical coordinate systems coincide, and
+ are equivalent to the paint device's rectangle.
+
+ Using window-viewport conversion you can make the logical
+ coordinate system fit your preferences. The mechanism can also be
+ used to make the drawing code independent of the paint device. You
+ can, for example, make the logical coordinates extend from (-50,
+ -50) to (50, 50) with (0, 0) in the center by calling the
+ QPainter::setWindow() function:
+
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 4
+
+ Now, the logical coordinates (-50,-50) correspond to the paint
+ device's physical coordinates (0, 0). Independent of the paint
+ device, your painting code will always operate on the specified
+ logical coordinates.
+
+ By setting the "window" or viewport rectangle, you perform a
+ linear transformation of the coordinates. Note that each corner of
+ the "window" maps to the corresponding corner of the viewport, and
+ vice versa. For that reason it normally is a good idea to let the
+ viewport and "window" maintain the same aspect ratio to prevent
+ deformation:
+
+ \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 5
+
+ If we make the logical coordinate system a square, we should also
+ make the viewport a square using the QPainter::setViewport()
+ function. In the example above we make it equivalent to the
+ largest square that fit into the paint device's rectangle. By
+ taking the paint device's size into consideration when setting the
+ window or viewport, it is possible to keep the drawing code
+ independent of the paint device.
+
+ Note that the window-viewport conversion is only a linear
+ transformation, i.e. it does not perform clipping. This means that
+ if you paint outside the currently set "window", your painting is
+ still transformed to the viewport using the same linear algebraic
+ approach.
+
+ \image coordinatesystem-transformations.png
+
+ The viewport, "window" and transformation matrix determine how
+ logical QPainter coordinates map to the paint device's physical
+ coordinates. By default the world transformation matrix is the
+ identity matrix, and the "window" and viewport settings are
+ equivalent to the paint device's settings, i.e. the world,
+ "window" and device coordinate systems are equivalent, but as we
+ have seen, the systems can be manipulated using transformation
+ operations and window-viewport conversion. The illustration above
+ describes the process.
+
+ \omit
+ \section1 Related Classes
+
+ Qt's paint system, Arthur, is primarily based on the QPainter,
+ QPaintDevice, and QPaintEngine classes:
+
+ \table
+ \header \o Class \o Description
+ \row
+ \o QPainter
+ \o
+ The QPainter class performs low-level painting on widgets and
+ other paint devices. QPainter can operate on any object that
+ inherits the QPaintDevice class, using the same code.
+ \row
+ \o QPaintDevice
+ \o
+ The QPaintDevice class is the base class of objects that can be
+ painted. Qt provides several devices: QWidget, QImage, QPixmap,
+ QPrinter and QPicture, and other devices can also be defined by
+ subclassing QPaintDevice.
+ \row
+ \o QPaintEngine
+ \o
+ The QPaintEngine class provides an abstract definition of how
+ QPainter draws to a given device on a given platform. Qt 4
+ provides several premade implementations of QPaintEngine for the
+ different painter backends we support; it provides one paint
+ engine for each supported window system and painting
+ frameworkt. You normally don't need to use this class directly.
+ \endtable
+
+ The 2D transformations of the coordinate system are specified
+ using the QMatrix class:
+
+ \table
+ \header \o Class \o Description
+ \row
+ \o QMatrix
+ \o
+ A 3 x 3 transformation matrix. Use QMatrix to rotate, shear,
+ scale, or translate the coordinate system.
+ \endtable
+
+ In addition Qt provides several graphics primitive classes. Some
+ of these classes exist in two versions: an \c{int}-based version
+ and a \c{qreal}-based version. For these, the \c qreal version's
+ name is suffixed with an \c F.
+
+ \table
+ \header \o Class \o Description
+ \row
+ \o \l{QPoint}(\l{QPointF}{F})
+ \o
+ A single 2D point in the coordinate system. Most functions in Qt
+ that deal with points can accept either a QPoint, a QPointF, two
+ \c{int}s, or two \c{qreal}s.
+ \row
+ \o \l{QSize}(\l{QSizeF}{F})
+ \o
+ A single 2D vector. Internally, QPoint and QSize are the same, but
+ a point is not the same as a size, so both classes exist. Again,
+ most functions accept either QSizeF, a QSize, two \c{int}s, or two
+ \c{qreal}s.
+ \row
+ \o \l{QRect}(\l{QRectF}{F})
+ \o
+ A 2D rectangle. Most functions accept either a QRectF, a QRect,
+ four \c{int}s, or four \c {qreal}s.
+ \row
+ \o \l{QLine}(\l{QLineF}{F})
+ \o
+ A 2D finite-length line, characterized by a start point and an end
+ point.
+ \row
+ \o \l{QPolygon}(\l{QPolygonF}{F})
+ \o
+ A 2D polygon. A polygon is a vector of \c{QPoint(F)}s. If the
+ first and last points are the same, the polygon is closed.
+ \row
+ \o QPainterPath
+ \o
+ A vectorial specification of a 2D shape. Painter paths are the
+ ultimate painting primitive, in the sense that any shape
+ (rectange, ellipse, spline) or combination of shapes can be
+ expressed as a path. A path specifies both an outline and an area.
+ \row
+ \o QRegion
+ \o
+ An area in a paint device, expressed as a list of
+ \l{QRect}s. In general, we recommend using the vectorial
+ QPainterPath class instead of QRegion for specifying areas,
+ because QPainterPath handles painter transformations much better.
+ \endtable
+ \endomit
+
+ \sa {Analog Clock Example}, {Transformations Example}
+*/
diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc
new file mode 100644
index 0000000..114e28d
--- /dev/null
+++ b/doc/src/credits.qdoc
@@ -0,0 +1,348 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page credits.html
+
+ \title Thanks!
+ \ingroup licensing
+ \brief A list of contributors to Qt.
+
+ The following (and probably many others) have provided bug reports,
+ suggestions, patches, beta testing, or done us other favors. We thank
+ you all:
+
+ Adam P. Jenkins <ajenkins at cs.umass.edu>\br
+ Ahmed Metwally <ametwaly at auc-cs28.eun.eg>\br
+ Aidas Kasparas <kaspar at soften.ktu.lt>\br
+ Alejandro Aguilar Sierra <asierra at servidor.unam.mx>\br
+ Alex <steeper at dial.pipex.com>\br
+ Alex Kambis <kambis at eos913c.gsfc.nasa.gov>\br
+ Alexander Kozlov <alex at hale.appl.sci-nnov.ru>\br
+ Alexander Sanda <alex at darkstar.ping.at>\br
+ Amos Leffler <leffler at netaxs.com>\br
+ Anders Hanson <andhan at lls.se>\br
+ Andi Peredri <andi at ukr.net>\br
+ Andreas Schlempp <schlempp at egd.igd.fhg.de>\br
+ Andrew Bell <abell at vsys.com>\br
+ Andrew Gillham <gillhaa at ghost.whirlpool.com>\br
+ Andrew J. Robinson <robinson at eclipse.net>\br
+ Andrew Pavlomanolakos <app at novanet.net.au>\br
+ Andrew R. Tefft <teffta at crypt.erie.ge.com>\br
+ Andrew Vajoczki <vajoczki at interlog.com>\br
+ Andr\eacute Johansen <Andre.Johansen at funcom.no>\br
+ Andr\eacute Kramer <Andre.Kramer at glpg.com>\br
+ Andriy Rysin <arysin at yahoo.com>\br
+ Andy Brice <andyb at suntail.net>\br
+ Andy Shaw <andy at east.no>\br
+ Anton Keyter <ant at intekom.co.za>\br
+ Arabeyes Project (http://www.arabeyes.org) <doc at arabeyes.org> \br
+ ARISE - Marcin Giedz <giedz at arise.pl>\br
+ Arnt Gulbrandsen <arnt at gulbrandsen.priv.no>\br
+ Ashley Winters <jql at accessone.com>\br
+ Aubrey Soper <azdak at ix.netcom.com>\br
+ Axel Schwenke <schwenke at HTWM.DE>\br
+ Ben Bergen <ben at gmg.com>\br
+ Bernard Leach <B.Leach at compsoc.cs.latrobe.edu.au>\br
+ Bernd Johannes Wuebben <wuebben at math.cornell.edu>\br
+ Bernd S. Brentrup <bsb at uni-muenster.de>\br
+ Bert Haverkamp <b.r.j.haverkamp at et.tudelft.nl>\br
+ Bjorn Reese <breese at dit.ou.dk>\br
+ Bj\ouml\c{}rn Bergstr\ouml\c{}rm <bjorn.bergstrom at roguelikedevelopment.org>\br
+ Brian Beattie <beattie at drcpdx.stt3.com>\br
+ Brian P. Theodore <theodore at std.saic.com>\br
+ Brian White <bcwhite at verisim.com>\br
+ Bryan Scattergood <bryan at fsel.com>\br
+ Carsten Steckel <carsten at cs.newcastle.edu.au>\br
+ Chao-Hsin, Lin <linchao at charlie.cns.iit.edu>\br
+ Chip Salzenberg <chip at atlantic.net>\br
+ Chris Zwilling <crzwlng at cloudnet.com>\br
+ Christian Czezatke <e9025461 at student.tuwien.ac.at>\br
+ Christopher Andrew Spiking <cas at Cs.Nott.AC.UK>\br
+ Christopher J. White <cjwhite at rgit.wustl.edu>\br
+ Clarence Dang <dang at kde.org>\br
+ Claus Werner <lzu96cw at reading.ac.uk>\br
+ Cloyce D. Spradling <cloyce at austin.ibm.com>\br
+ Colin Paul Adams <colin at colina.demon.co.uk>\br
+ Cristiano Verondini <cverond at deis219.deis.unibo.it>\br
+ Damyan Pepper <damyanp at cogs.susx.ac.uk>\br
+ Dan Nickerson <nickersond at uthscsa.edu>\br
+ Daniel Brahneborg <basic at well.com>\br
+ Daniel Gruner <dgruner at tikva.chem.utoronto.ca>\br
+ Daniel J Mitchell <dan at rebellion.co.uk>\br
+ Danilo Fiorenzano <danilo at terranet.ab.ca>\br
+ Daniel M. Duley <daniel.duley at verizon.net>\br
+ Dante Profeta <profeta at neomedia.it>\br
+ Darryl Ruggles <001654r at dragon.acadiau.ca>\br
+ Dave <dave at stellacore.com>\br
+ Dave Steffen <steffend at glitch.physics.colostate.edu>\br
+ Dean Hall <dwhall at deskstation.com>\br
+ Denis Y. Pershin <dyp at isis.nsu.ru>\br
+ Diedrich Vorberg <Diedrich_Vorberg at cp.prima.ruhr.de>\br
+ Dietmar Schaefer <dietmar at cs.newcastle.edu.au>\br
+ Dimitri Papadopoulos <dpo at club-internet.fr>\br
+ Dirk Mueller <mueller at kde.org>\br
+ Dirk Schwartmann <dirk.schwartmann at dlr.de>\br
+ Dominik Jergus <djergus at ics.uci.edu>\br
+ Don Sanders <sanders at kde.org>\br
+ Donald A. Seielstad <donald at gromit.scs.uiuc.edu>\br
+ Donna J. Armijo <donna at KachinaTech.COM>\br
+ Doug Boreland <dborel at amex-trs.com>\br
+ Douglas Lenz <dlenz at spedsoft.com>\br
+ Dr Mek Buhl Nielsen <m.b.nielsen at bham.ac.uk>\br
+ Dr Willem A. Schreuder <Willem.Schreuder at prinmath.com>\br
+ E. Kevin Hall <hall at boston.sgi.com>\br
+ Ed Mackey <emackey at Early.com>\br
+ Edmund Taylor <etaylor at interaccess.com>\br
+ Enrique Mat\iacute\c{}as S\aacute\c{}nchez <cronopios at gmail.com>\br
+ Eric Bos <Eric.Bos at adelaide.maptek.com.au>\br
+ Eric Brunson <brunson at brunson.com>\br
+ Eric Jansen <jansen at photon.com>\br
+ Erik Norell <erik at Astrakan.HGS.SE>\br
+ Erik Thiele <erik at unterland.de>\br
+ Ernie Pasveer <erniep at vsl.com>\br
+ F R Ball <frb at umr.edu>\br
+ Fergal Mc Carthy <fergal at ilo.dec.com>\br
+ Frank Gockel <gockel at etecs4.uni-duisburg.de>\br
+ Frank Roscher <frank at chemnitz.abs-rz.de>\br
+ Franklin <franklin at goodhorse.idv.tw>\br
+ Fredrik Markstr\ouml\c{}m <fredrik at zod.campus.luth.se>\br
+ Fredrik Nehr <fredrik_nehr at ivab.se>\br
+ FrenzelBhv at aol.com\br
+ Frugal <frugal at wardrobe.demon.co.uk>\br
+ Frugal the Curious <Chris.Ward at softcare.co.uk>\br
+ Fujimoto Koji <kochan at mbox.kyoto-inet.or.jp>\br
+ Gabor V. Gulyas <gabor at robiomat.com>\br
+ Gary E. Sherman <sherman at mrcc.com>\br
+ Geoff Carpenter <GCC at watson.ibm.com>\br
+ Geoffrey Higginson <ghiggins at gulf.uvic.ca>\br
+ Georg Filios <Georg.Filios at post.rwth-aachen.de>\br
+ George Simunovich <george at cia-g.com>\br
+ Giovanni Bajo <giovannibajo at gmail.com>\br
+ Giovanni Carapelli <gcarapel at mbox.vol.it>\br
+ Greg Tomalesky <tomalesk at yrkpa.kias.com>\br
+ Gregg Jensen <gwj at stl.nexen.com>\br
+ Gustav "Gurre" Kalvesten <a94guska at ida.his.se>\br
+ Hal DeVore <hdevore at crow.bmc.com>\br
+ Hans Flaechsig <hans at hannes.owl.de>\br
+ Hans Schlenker <schlenkh at informatik.uni-muenchen.de>\br
+ Hardo Mueller <hardo at ipb.uni-bonn.de>\br
+ Heiko Gerdau <heiko.gerdau at t-online.de>\br
+ Helder Correia <helder.pereira.correia at gmail.com>\br
+ Henty Waker <henty at foxbat.sur.uct.ac.za>\br
+ Holger Hans Peter Freyther <zecke at selfish.org>\br
+ Hrafnkell Eiriksson <hkelle at mmedia.is>\br
+ Ildefonso Junquero Martin-Arroyo <junquero at sainsel.es>\br
+ Ingo Stapel <ingo.stapel at tu-clausthal.de>\br
+ J. Solomon Kostelnik <roz at one.net>\br
+ Jae Cho <cs184-dc at ute.CS.Berkeley.EDU>\br
+ James McIninch <james at amber.biology.gatech.edu>\br
+ Jan Aarsaether <jaa at metis.no>\br
+ Jaromir Dolecek <dolecek at ics.muni.cz>\br
+ Jasmin Blanchette <jasminb at corel.com>\br
+ Jason Evans <evans911 at cs.uidaho.edu>\br
+ Jay Painter <jay at a42.com>\br
+ Jean-Philippe Langlois <jpl at iname.com>\br
+ Jeff Harris <jharris at cis.ohio-state.edu>\br
+ Jeff Largent <jlargent at iu.net>\br
+ Jeffrey Vetter <vetter at lanl.gov>\br
+ Jeremy Wohl <jeremy at godzilli.cs.sunysb.edu>\br
+ Jesper K. Pedersen <blackie atklaralvdalens-datakonsult.se>\br
+ Jim Lauchlan <jim.lauchlan at gecm.com>\br
+ Joachim Backes <backes at rhrk.uni-kl.de>\br
+ Jochen R&ouml;mmler <jochen at concept.de>\br
+ Jochen Scharrlach <jscharrl at BA-Stuttgart.De>\br
+ Joe Croft <jcroft at swbell.net>\br
+ Joel Lindholm <wizball at kewl.campus.luth.se>\br
+ John H. Reppy <jhr at research.att.com>\br
+ John Huertas - Jourda <octarine at gte.net>\br
+ John Ouellette <ouellet at beluga.phys.UVic.CA>\br
+ John Vidar Larring <larring at weatherone.tv>\br
+ Jon Brumfitt <jbrumfit at astro.estec.esa.nl>\br
+ Jose Castro <jocastro at erols.com>\br
+ Jukka Heinonen <jhei at iki.fi>\br
+ Julian Enticknap <Julian.Enticknap at UK.Sun.COM>\br
+ Jussi-Pekka Sairanen <jussi-pekka.sairanen at research.nokia.com>\br
+ Kalle Dalheimer <kalle at dalheimer.hh.eunet.de>\br
+ Karl Robillard <karl at skygames.com>\br
+ Keith Brown <ksbrown at ix.netcom.com>\br
+ Keith Dowsett <kdowsett at rpms.ac.uk>\br
+ Ken Hollis <khollis at northwest.com>\br
+ Kirill Konyagin <kirill at asplinux.ru>\br
+ Klaus Ebner <klaus at gaspode.ndh.com>\br
+ Klaus-Georg Adams <Klaus-Georg.Adams at chemie.uni-karlsruhe.de>\br
+ Klaus Schmidinger <Klaus.Schmidinger at cadsoft.de>\br
+ Kristian Freed <d00freed at dtek.chalmers.se>\br
+ Kristof Depraetere <Kristof.Depraetere at rug.ac.be>\br
+ Kurt L Anderson <kurt+ at osu.edu>\br
+ Larry Lee <lclee at primenet.com>\br
+ Lars Knoll <knoll at mpi-hd.mpg.de>\br
+ M. G. Berberich <berberic at fmi.uni-passau.de>\br
+ Maas-Maarten Zeeman <mzeeman at cs.vu.nl>\br
+ Magnus Persson <mpersson at eritel.se>\br
+ Mario Weilguni <mweilguni at arctica.sime.com>\br
+ Marius Storm-Olsen <marius at storm-olsen.com>\br
+ Mariya <muha at iclub.nsu.ru>\br
+ Mark Summerfield <summer at perlpress.com>\br
+ Markku Hihnala <mah at ee.oulu.fi>\br
+ Marko Macek <Marko.Macek at snet.fer.uni-lj.si>\br
+ Martin Baehr <mbaehr at email.archlab.tuwien.ac.at>\br
+ Martin Mueller <mm at lunetix.de>\br
+ Martin van Velsen <vvelsen at ronix.ptf.hro.nl>\br
+ Matthias Ettrich <ettrich at fisher.informatik.uni-tuebingen.de>\br
+ Matthias Kretz <kretz at kde.org>
+ Matthias Suencksen <msuencks at techfak.uni-bielefeld.de>\br
+ Mattias Engdeg\aring\c{}rd <f91-men at nada.kth.se>\br
+ Michael Doppler <m.doppler at icoserve.com>\br
+ Michael Figley <figley at ibmoto.com>\br
+ Michael George <george at quark.im4u.net>\br
+ Michael Graff <explorer at flame.org>\br
+ Michael H. Price II <price at ERC.MsState.Edu>\br
+ Michael Harnois <mharnois at sbt.net>\br
+ Michael Hohmuth <hohmuth at inf.tu-dresden.de>\br
+ Michael Leodolter <michael at lab1.psy.univie.ac.at>\br
+ Michael Roth <mroth at nessie.de>\br
+ Michael Schwendt <Michael_Schwendt at public.uni-hamburg.de>\br
+ Michal Polak <mpolak at fi.muni.cz>\br
+ Mikael Bourges-Sevenier <bourges at int-evry.fr>\br
+ Mike Fearn <hp003 at dra.hmg.gb>\br
+ Mike Perik <mikep at crt.com>\br
+ Mike Sharkey <msharkey at softarc.com>\br
+ Mikko Ala-Fossi <mikko.ala-fossi at vaisala.com>\br
+ Miroslav Flidr <flidr at kky.zcu.cz>\br
+ Miyata Shigeru <miyata at kusm.kyoto-u.ac.jp>\br
+ Myron Uecker <muecker at csd.net>\br
+ Neal Sanche <neal at nsdev.org>\br
+ Ngok Yuk Yau <zzy at compuserve.com>\br
+ Niclas Anderberg <agony at sparta.lu.se>\br
+ Nicolas Goutte <goutte at kde.org>\br
+ Oliver Eiden <o.eiden at pop.ruhr.de>\br
+ Oliver Elphick <olly at lfix.co.uk>\br
+ Olivier Verloove <overloov at ulb.ac.be>\br
+ Osku Salerma <osku at iki.fi>\br
+ P. J. Leonard <eespjl at ee.bath.ac.uk>\br
+ Paolo Galatola <paolo at iris.polito.it>\br
+ Pat Dowler <dowler at pt1B1106.FSH.UVic.CA>\br
+ Patrice Trognon <trognon at apogee-com.fr>\br
+ Patrick Voigt <Patrick.Voigt at Informatik.TU-Chemnitz.DE>\br
+ Paul Bucheit <ptb at k2.cwru.edu>\br
+ Paul Curtis <plc at rowley.co.uk>\br
+ Paul Kendall <paul at kcbbs.gen.nz>\br
+ Paul Marquis <pmarquis at iddptm.iddis.com>\br
+ Peter Bender <bender at iib.bauwesen.th-darmstadt.de>\br
+ Peter Klotz <p.klotz at icoserve.com>\br
+ Peter Pletcher <peter at delilah>\br
+ Pierre Rocque <rocque at CRHSC.Umontreal.CA>\br
+ Pohorecki Wladyslaw <pohorecki at novell.ftj.agh.edu.pl>\br
+ R.S. Mallozzi, <mallozzi at bowie.msfc.nasa.gov>\br
+ Ralf Stanke <ralf at mcshh.hanse.de>\br
+ Reginald Stadlbauer <reggie at kde.org>\br
+ Richard Fric <Richard.Fric at kdemail.net>\br
+ Richard D. Jackson <rjackson at bga.com>\br
+ Richard Keech <rkeech at colesmyer.com.au>\br
+ Richard Moore <rich at kde.org>\br
+ Rick Brohl <rbrohl at uswest.com>\br
+ Robert Anderson <Robert.E.Anderson at unh.edu>\br
+ Robert Cimrman <cimrman at marius.univ-mrs.fr>\br
+ Roberto Alsina <ralsina at ultra7.unl.edu.ar>\br
+ Robin Helgelin <robin at garcio.com>\br
+ Rohlfs Reiner <Reiner.Rohlfs at obs.unige.ch>\br
+ Salman Sheikh <salman at vdragon.gsfc.nasa.gov>\br
+ Sandro Giessl <sandro at giessl.com>\br
+ Sandro Sigala <ssigala at globalnet.it>\br
+ Scott Coppen <scoppen at emerald.tufts.edu>\br
+ Sean Echevarria <sean at beatnik.com>\br
+ Sean Vyain <svyain at mail.tds.net>\br
+ Sirtaj Singh Kang <ssk at physics.unimelb.EDU.AU>\br
+ Sivan Toledo\br
+ Stefan Cronert <d93-scr at nada.kth.se>\br
+ Stefan Taferner <taf at porsche.co.at>\br
+ Steffen Hansen <stefh at dit.ou.dk>\br
+ Stephan Pfab <pfab at mathematik.uni-ulm.de>\br
+ Stephane Zermatten <szermat at ibm.net>\br
+ Sven Fischer <sven at comnets.rwth-aachen.de>\br
+ Sven Riedel <lynx at heim8.tu-clausthal.de>\br
+ Terje Dalen <terje at norcontrol.no>\br
+ Thomas Degrange <thomas.degrange at danaher-motion.ch>\br
+ Thomas Lineal <thomas at ricci.allcon.com>\br
+ Thomas Rath <rath at mac-info-link.de>\br
+ Thorsten Ende <the at is-bremen.de>\br
+ Tiaan Wessels <tiaan at inetsys.alt.za>\br
+ Tim D. Gilman <tdgilman at best.com>\br
+ Tom Houlder <thoulder at icor.fr>\br
+ Tony Albrecht <Tony.Albrecht at adelaide.maptek.com.au>\br
+ Torgeir Hovden <hovden at akkurat.idt.ntnu.no>\br
+ Trenton W. Schulz <twschulz at cord.edu>\br
+ Trond Hellem B\oslash <s638 at ii.uib.no>\br
+ Trond Solli <Trond.Solli at marintek.sintef.no>\br
+ Ulf Stelbe <ust at egd.igd.fhg.de>\br
+ Ulrich Hertlein <uhe at cs.tu-berlin.de>\br
+ Ulrich Ring <ur at daveg.com>\br
+ Uwe Thiem <uwe at uwix.alt.na>\br
+ Vadim Zaliva <lord at crocodile.org>\br
+ Val Gough <val at stellacore.com>\br
+ Vilhelm Sj\ouml\c{}berg <ville at swipnet.se>\br
+ Vlad Karpinsky <vlad at crocodile.org>\br
+ Volker Hilsheimer <vohi at gmx.de>\br
+ Volker Poplawski <volkerp at stepnet.de>\br
+ Warwick Allison <warwick at it.uq.edu.au>\br
+ Witold Wysota <wysota at qtcentre.org>\br
+ Xiaojian Li <lixj at monte.rutgers.edu>\br
+ Ximenes <ximenes at netset.com>\br
+ Y. N. Lo <ynlo at netcom.ca>\br
+ Zyklon <zyk at dds.nl>\br
+ atsushi konno <jibe at ppp.bekkoame.or.jp>\br
+ berry at hxi.com\br
+ boris passek <boris at ice.fb12.TU-Berlin.DE>\br
+ fidaire <fidaire at bip.fr>\br
+ joeh at sugar-river.net\br
+ rinsch at aea.ruhr-uni-bochum.de\br
+ tsutsui at kekvax.kek.jp\br
+ vandevod at cs.rpi.edu\br
+ Vincent Ricard <magic at magicninja.org>\br
+ vinckeg at sebb.bel.alcatel.be\br
+ yleffler at ucis.vill.edu\br
+ Houssem BDIOUI <houssem.bdioui at gmail.com>\br
+
+ We hope there are not too many omissions from the list.
+ Please submit any corrections to the \l{Task Tracker}
+ on the Qt website.
+*/
diff --git a/doc/src/custom-types.qdoc b/doc/src/custom-types.qdoc
new file mode 100644
index 0000000..81eecfc
--- /dev/null
+++ b/doc/src/custom-types.qdoc
@@ -0,0 +1,178 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page custom-types.html
+ \title Creating Custom Qt Types
+ \ingroup architecture
+ \brief How to create and register new types with Qt.
+
+ \tableofcontents
+
+ \section1 Overview
+
+ When creating user interfaces with Qt, particularly those with specialized controls and
+ features, developers sometimes need to create new data types that can be used alongside
+ or in place of Qt's existing set of value types.
+
+ Standard types such as QSize, QColor and QString can all be stored in QVariant objects,
+ used as the types of properties in QObject-based classes, and emitted in signal-slot
+ communication.
+
+ In this document, we take a custom type and describe how to integrate it into Qt's object
+ model so that it can be stored in the same way as standard Qt types. We then show how to
+ register the custom type to allow it to be used in signals and slots connections.
+
+ \section1 Creating a Custom Type
+
+ Before we begin, we need to ensure that the custom type we are creating meets all the
+ requirements imposed by QMetaType. In other words, it must provide:
+
+ \list
+ \o a public default constructor,
+ \o a public copy constructor, and
+ \o a public destructor.
+ \endlist
+
+ The following \c Message class definition includes these members:
+
+ \snippet examples/tools/customtype/message.h custom type definition
+
+ The class also provides a constructor for normal use and two public member functions
+ that are used to obtain the private data.
+
+ \section1 Declaring the Type with QMetaType
+
+ The \c Message class only needs a suitable implementation in order to be usable.
+ However, Qt's type system will not be able to understand how to store, retrieve
+ and serialize instances of this class without some assistance. For example, we
+ will be unable to store \c Message values in QVariant.
+
+ The class in Qt responsible for custom types is QMetaType. To make the type known
+ to this class, we invoke the Q_DECLARE_METATYPE() macro on the class in the header
+ file where it is defined:
+
+ \snippet examples/tools/customtype/message.h custom type meta-type declaration
+
+ This now makes it possible for \c Message values to be stored in QVariant objects
+ and retrieved later. See the \l{Custom Type Example} for code that demonstrates
+ this.
+
+ The Q_DECLARE_METATYPE() macro also makes it possible for these values to be used as
+ arguments to signals, but \e{only in direct signal-slot connections}.
+ To make the custom type generally usable with the signals and slots mechanism, we
+ need to perform some extra work.
+
+ \section1 Creating and Destroying Custom Objects
+
+ Although the declaration in the previous section makes the type available for use
+ in direct signal-slot connections, it cannot be used for queued signal-slot
+ connections, such as those that are made between objects in different threads.
+ This is because the meta-object system does not know how to handle creation and
+ destruction of objects of the custom type at run-time.
+
+ To enable creation of objects at run-time, call the qRegisterMetaType() template
+ function to register it with the meta-object system. This also makes the type
+ available for queued signal-slot communication as long as you call it before you
+ make the first connection that uses the type.
+
+ The \l{Queued Custom Type Example} declares a \c Block class which is registered
+ in the \c{main.cpp} file:
+
+ \snippet examples/threads/queuedcustomtype/main.cpp main start
+ \dots
+ \snippet examples/threads/queuedcustomtype/main.cpp register meta-type for queued communications
+ \dots
+ \snippet examples/threads/queuedcustomtype/main.cpp main finish
+
+ This type is later used in a signal-slot connection in the \c{window.cpp} file:
+
+ \snippet examples/threads/queuedcustomtype/window.cpp Window constructor start
+ \dots
+ \snippet examples/threads/queuedcustomtype/window.cpp connecting signal with custom type
+ \dots
+ \snippet examples/threads/queuedcustomtype/window.cpp Window constructor finish
+
+ If a type is used in a queued connection without being registered, a warning will be
+ printed at the console; for example:
+
+ \code
+ QObject::connect: Cannot queue arguments of type 'Block'
+ (Make sure 'Block' is registered using qRegisterMetaType().)
+ \endcode
+
+ \section1 Making the Type Printable
+
+ It is often quite useful to make a custom type printable for debugging purposes,
+ as in the following code:
+
+ \snippet examples/tools/customtype/main.cpp printing a custom type
+
+ This is achieved by creating a streaming operator for the type, which is often
+ defined in the header file for that type:
+
+ \snippet examples/tools/customtype/message.h custom type streaming operator
+
+ The implementation for the \c Message type in the \l{Custom Type Example}
+ goes to some effort to make the printable representation as readable as
+ possible:
+
+ \snippet examples/tools/customtype/message.cpp custom type streaming operator
+
+ The output sent to the debug stream can, of course, be made as simple or as
+ complicated as you like. Note that the value returned by this function is
+ the QDebug object itself, though this is often obtained by calling the
+ maybeSpace() member function of QDebug that pads out the stream with space
+ characters to make it more readable.
+
+ \section1 Further Reading
+
+ The Q_DECLARE_METATYPE() macro and qRegisterMetaType() function documentation
+ contain more detailed information about their uses and limitations.
+
+ The \l{Custom Type Example}{Custom Type},
+ \l{Custom Type Sending Example}{Custom Type Sending}
+ and \l{Queued Custom Type Example}{Queued Custom Type} examples show how to
+ implement a custom type with the features outlined in this document.
+
+ The \l{Debugging Techniques} document provides an overview of the debugging
+ mechanisms discussed above.
+*/
diff --git a/doc/src/datastreamformat.qdoc b/doc/src/datastreamformat.qdoc
new file mode 100644
index 0000000..3c651fb
--- /dev/null
+++ b/doc/src/datastreamformat.qdoc
@@ -0,0 +1,312 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation of the Format of the QDataStream operators.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page datastreamformat.html
+ \title Format of the QDataStream Operators
+ \ingroup architecture
+ \brief Representations of data types that can be serialized by QDataStream.
+
+ The \l QDataStream allows you to serialize some of the Qt data types.
+ The table below lists the data types that QDataStream can serialize
+ and how they are represented. The format described below is
+ \l{QDataStream::setVersion()}{version 8}.
+
+ It is always best to cast integers to a Qt integer type, such as
+ qint16 or quint32, when reading and writing. This ensures that
+ you always know exactly what size integers you are reading and
+ writing, no matter what the underlying platform and architecture
+ the application happens to be running on.
+
+ \table
+ \row \o qint8
+ \o \list
+ \o signed byte
+ \endlist
+ \row \o qint16
+ \o \list
+ \o signed 16-bit integer
+ \endlist
+ \row \o qint32
+ \o \list
+ \o signed 32-bit integer
+ \endlist
+ \row \o qint64
+ \o \list
+ \o signed 64-bit integer
+ \endlist
+ \row \o quint8
+ \o \list
+ \o unsigned byte
+ \endlist
+ \row \o quint16
+ \o \list
+ \o unsigned 16-bit integer
+ \endlist
+ \row \o quint32
+ \o \list
+ \o unsigned 32-bit integer
+ \endlist
+ \row \o quint64
+ \o \list
+ \o unsigned 64-bit integer
+ \endlist
+ \row \o \c float
+ \o \list
+ \o 32-bit floating point number using the standard IEEE 754 format
+ \endlist
+ \row \o \c double
+ \o \list
+ \o 64-bit floating point number using the standard IEEE 754 format
+ \endlist
+ \row \o \c {const char *}
+ \o \list
+ \o The string length (quint32)
+ \o The string bytes, excluding the terminating 0
+ \endlist
+ \row \o QBitArray
+ \o \list
+ \o The array size (quint32)
+ \o The array bits, i.e. (size + 7)/8 bytes
+ \endlist
+ \row \o QBrush
+ \o \list
+ \o The brush style (quint8)
+ \o The brush color (QColor)
+ \o If style is CustomPattern, the brush pixmap (QPixmap)
+ \endlist
+ \row \o QByteArray
+ \o \list
+ \o If the byte array is null: 0xFFFFFFFF (quint32)
+ \o Otherwise: the array size (quint32) followed by the array bytes, i.e. size bytes
+ \endlist
+ \row \o \l QColor
+ \o \list
+ \o Color spec (qint8)
+ \o Alpha value (quint16)
+ \o Red value (quint16)
+ \o Green value (quint16)
+ \o Blue value (quint16)
+ \o Pad value (quint16)
+ \endlist
+ \row \o QCursor
+ \o \list
+ \o Shape ID (qint16)
+ \o If shape is BitmapCursor: The bitmap (QPixmap), mask (QPixmap), and hot spot (QPoint)
+ \endlist
+ \row \o QDate
+ \o \list
+ \o Julian day (quint32)
+ \endlist
+ \row \o QDateTime
+ \o \list
+ \o Date (QDate)
+ \o Time (QTime)
+ \o 0 for Qt::LocalTime, 1 for Qt::UTC (quint8)
+ \endlist
+ \row \o QFont
+ \o \list
+ \o The family (QString)
+ \o The point size (qint16)
+ \o The style hint (quint8)
+ \o The char set (quint8)
+ \o The weight (quint8)
+ \o The font bits (quint8)
+ \endlist
+ \row \o QHash<Key, T>
+ \o \list
+ \o The number of items (quint32)
+ \o For all items, the key (Key) and value (T)
+ \endlist
+ \row \o QIcon
+ \o \list
+ \o The number of pixmap entries (quint32)
+ \o For all pixmap entries:
+ \list
+ \o The pixmap (QPixmap)
+ \o The file name (QString)
+ \o The pixmap size (QSize)
+ \o The \l{QIcon::Mode}{mode} (quint32)
+ \o The \l{QIcon::State}{state} (quint32)
+ \endlist
+ \endlist
+ \row \o QImage
+ \o \list
+ \o If the image is null a "null image" marker is saved;
+ otherwise the image is saved in PNG or BMP format (depending
+ on the stream version). If you want control of the format,
+ stream the image into a QBuffer (using QImageIO) and stream
+ that.
+ \endlist
+ \row \o QKeySequence
+ \o \list
+ \o A QList<int>, where each integer is a key in the key sequence
+ \endlist
+ \row \o QLinkedList<T>
+ \o \list
+ \o The number of items (quint32)
+ \o The items (T)
+ \endlist
+ \row \o QList<T>
+ \o \list
+ \o The number of items (quint32)
+ \o The items (T)
+ \endlist
+ \row \o QMap<Key, T>
+ \o \list
+ \o The number of items (quint32)
+ \o For all items, the key (Key) and value (T)
+ \endlist
+ \row \o QMatrix
+ \o \list
+ \o m11 (double)
+ \o m12 (double)
+ \o m21 (double)
+ \o m22 (double)
+ \o dx (double)
+ \o dy (double)
+ \endlist
+ \row \o QPair<T1, T2>
+ \o \list
+ \o first (T1)
+ \o second (T2)
+ \endlist
+ \row \o QPalette
+ \o The disabled, active, and inactive color groups, each of which consists
+ of the following:
+ \list
+ \o foreground (QBrush)
+ \o button (QBrush)
+ \o light (QBrush)
+ \o midlight (QBrush)
+ \o dark (QBrush)
+ \o mid (QBrush)
+ \o text (QBrush)
+ \o brightText (QBrush)
+ \o buttonText (QBrush)
+ \o base (QBrush)
+ \o background (QBrush)
+ \o shadow (QBrush)
+ \o highlight (QBrush)
+ \o highlightedText (QBrush)
+ \o link (QBrush)
+ \o linkVisited (QBrush)
+ \endlist
+ \row \o QPen
+ \o \list
+ \o The pen styles (quint8)
+ \o The pen width (quint16)
+ \o The pen color (QColor)
+ \endlist
+ \row \o QPicture
+ \o \list
+ \o The size of the picture data (quint32)
+ \o The raw bytes of picture data (char)
+ \endlist
+ \row \o QPixmap
+ \o \list
+ \o Save it as a PNG image.
+ \endlist
+ \row \o QPoint
+ \o \list
+ \o The x coordinate (qint32)
+ \o The y coordinate (qint32)
+ \endlist
+ \row \o QRect
+ \o \list
+ \o left (qint32)
+ \o top (qint32)
+ \o right (qint32)
+ \o bottom (qint32)
+ \endlist
+ \row \o QRegExp
+ \o \list
+ \o The regexp pattern (QString)
+ \o Case sensitivity (quint8)
+ \o Regular expression syntax (quint8)
+ \o Minimal matching (quint8)
+ \endlist
+ \row \o QRegion
+ \o \list
+ \o The size of the data, i.e. 8 + 16 * (number of rectangles) (quint32)
+ \o 10 (qint32)
+ \o The number of rectangles (quint32)
+ \o The rectangles in sequential order (QRect)
+ \endlist
+ \row \o QSize
+ \o \list
+ \o width (qint32)
+ \o height (qint32)
+ \endlist
+ \row \o QString
+ \o \list
+ \o If the string is null: 0xFFFFFFFF (quint32)
+ \o Otherwise: The string length in bytes (quint32) followed by the data in UTF-16
+ \endlist
+ \row \o QTime
+ \o \list
+ \o Milliseconds since midnight (quint32)
+ \endlist
+ \row \o QVariant
+ \o \list
+ \o The type of the data (quint32)
+ \o The null flag (qint8)
+ \o The data of the specified type
+ \endlist
+ \row \o QVector<T>
+ \o \list
+ \o The number of items (quint32)
+ \o The items (T)
+ \endlist
+ \endtable
+*/
diff --git a/doc/src/debug.qdoc b/doc/src/debug.qdoc
new file mode 100644
index 0000000..da5a82f
--- /dev/null
+++ b/doc/src/debug.qdoc
@@ -0,0 +1,256 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Qt Debugging Techniques
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page debug.html
+ \title Debugging Techniques
+ \ingroup buildsystem
+
+ Here we present some useful hints to help you with debugging your
+ Qt-based software.
+
+ \tableofcontents
+
+ \section1 Configuring Qt for Debugging
+
+ When \l{Installation}{configuring Qt for installation}, it is possible
+ to ensure that it is built to include debug symbols that can make it
+ easier to track bugs in applications and libraries. However, on some
+ platforms, building Qt in debug mode will cause applications to be larger
+ than desirable.
+
+ \section2 Debugging in Mac OS X and Xcode
+
+ \section3 Debugging With/Without Frameworks
+
+ The basic stuff you need to know about debug libraries and
+ frameworks is found at developer.apple.com in:
+ \l{http://developer.apple.com/technotes/tn2004/tn2124.html#SECDEBUGLIB}
+ {Apple Technicle Note TN2124} Qt follows that.
+
+ When you build Qt, frameworks are built by default, and inside the
+ framework you will find both a release and a debug version (e.g.,
+ QtCore and QtCore_debug). If you pass the \c{-no-framework} flag
+ when you build Qt, two dylibs are built for each Qt library (e.g.,
+ libQtCore.4.dylib and libQtCore_debug.4.dylib).
+
+ What happens when you link depends on whether you use frameworks
+ or not. We don't see a compelling reason to recommend one over the
+ other.
+
+ \section4 With Frameworks:
+
+ Since the release and debug libraries are inside the framework,
+ the app is simply linked against the framework. Then when you run
+ in the debugger, you will get either the release version or the
+ debug version, depending on whether you set \c{DYLD_IMAGE_SUFFIX}.
+ If you don't set it, you get the release version by default (i.e.,
+ non _debug). If you set \c{DYLD_IMAGE_SUFFIX=_debug}, you get the
+ debug version.
+
+ \section4 Without Frameworks:
+
+ When you tell \e{qmake} to generate a Makefile with the debug
+ config, it will link against the _debug version of the libraries
+ and generate debug symbols for the app. Running this program in
+ GDB will then work like running GDB on other platforms, and you
+ will be able to trace inside Qt.
+
+ \section3 Debug Symbols and Size
+
+ The amount of space taken up by debug symbols generated by GCC can
+ be excessively large. However, with the release of Xcode 2.3 it is
+ now possible to use Dwarf symbols which take up a significantly
+ smaller amount of space. To enable this feature when configuring
+ Qt, pass the \c{-dwarf-2} option to the configure script.
+
+ This is not enabled by default because previous versions of Xcode
+ will not work with the compiler flag used to implement this
+ feature. Mac OS X 10.5 will use dwarf-2 symbols by default.
+
+ dwarf-2 symbols contain references to source code, so the size of
+ the final debug application should compare favorably to a release
+ build.
+
+ \omit
+ Although it is not necessary to build Qt with debug symbols to use the
+ other techniques described in this document, certain features are only
+ available when Qt is configured for debugging.
+ \endomit
+
+ \section1 Command Line Options Recognized by Qt
+
+ When you run a Qt application, you can specify several
+ command-line options that can help with debugging. These are
+ recognized by QApplication.
+
+ \table
+ \header \o Option \o Description
+ \row \o \c -nograb
+ \o The application should never grab \link QWidget::grabMouse()
+ the mouse\endlink or \link QWidget::grabKeyboard() the
+ keyboard \endlink. This option is set by default when the
+ program is running in the \c gdb debugger under Linux.
+ \row \o \c -dograb
+ \o Ignore any implicit or explicit \c{-nograb}. \c -dograb wins over
+ \c -nograb even when \c -nograb is last on the command line.
+ \row \o \c -sync
+ \o Runs the application in X synchronous mode. Synchronous mode
+ forces the X server to perform each X client request
+ immediately and not use buffer optimization. It makes the
+ program easier to debug and often much slower. The \c -sync
+ option is only valid for the X11 version of Qt.
+ \endtable
+
+ \section1 Warning and Debugging Messages
+
+ Qt includes four global functions for writing out warning and debug
+ text. You can use them for the following purposes:
+
+ \list
+ \o qDebug() is used for writing custom debug output.
+ \o qWarning() is used to report warnings and recoverable errors in
+ your application.
+ \o qCritical() is used for writing critical error mesages and
+ reporting system errors.
+ \o qFatal() is used for writing fatal error messages shortly before exiting.
+ \endlist
+
+ If you include the <QtDebug> header file, the \c qDebug() function
+ can also be used as an output stream. For example:
+
+ \snippet doc/src/snippets/code/doc_src_debug.qdoc 0
+
+ The Qt implementation of these functions prints the text to the
+ \c stderr output under Unix/X11 and Mac OS X. With Windows, if it
+ is a console application, the text is sent to console; otherwise, it
+ is sent to the debugger. You can take over these functions by
+ installing a message handler using qInstallMsgHandler().
+
+ If the \c QT_FATAL_WARNINGS environment variable is set,
+ qWarning() exits after printing the warning message. This makes
+ it easy to obtain a backtrace in the debugger.
+
+ Both qDebug() and qWarning() are debugging tools. They can be
+ compiled away by defining \c QT_NO_DEBUG_OUTPUT and \c
+ QT_NO_WARNING_OUTPUT during compilation.
+
+ The debugging functions QObject::dumpObjectTree() and
+ QObject::dumpObjectInfo() are often useful when an application
+ looks or acts strangely. More useful if you use \l{QObject::setObjectName()}{object names}
+ than not, but often useful even without names.
+
+ \section1 Providing Support for the qDebug() Stream Operator
+
+ You can implement the stream operator used by qDebug() to provide
+ debugging support for your classes. The class that implements the
+ stream is \c QDebug. The functions you need to know about in \c
+ QDebug are \c space() and \c nospace(). They both return a debug
+ stream; the difference between them is whether a space is inserted
+ between each item. Here is an example for a class that represents
+ a 2D coordinate.
+
+ \snippet doc/src/snippets/qdebug/qdebugsnippet.cpp 0
+
+ Integration of custom types with Qt's meta-object system is covered
+ in more depth in the \l{Creating Custom Qt Types} document.
+
+ \section1 Debugging Macros
+
+ The header file \c <QtGlobal> contains some debugging macros and
+ \c{#define}s.
+
+ Three important macros are:
+ \list
+ \o \l{Q_ASSERT()}{Q_ASSERT}(cond), where \c cond is a boolean
+ expression, writes the warning "ASSERT: '\e{cond}' in file xyz.cpp, line
+ 234" and exits if \c cond is false.
+ \o \l{Q_ASSERT_X()}{Q_ASSERT_X}(cond, where, what), where \c cond is a
+ boolean expression, \c where a location, and \c what a message,
+ writes the warning: "ASSERT failure in \c{where}: '\c{what}', file xyz.cpp, line 234"
+ and exits if \c cond is false.
+ \o \l{Q_CHECK_PTR()}{Q_CHECK_PTR}(ptr), where \c ptr is a pointer.
+ Writes the warning "In file xyz.cpp, line 234: Out of memory" and
+ exits if \c ptr is 0.
+ \endlist
+
+ These macros are useful for detecting program errors, e.g. like this:
+
+ \snippet doc/src/snippets/code/doc_src_debug.qdoc 1
+
+ Q_ASSERT(), Q_ASSERT_X(), and Q_CHECK_PTR() expand to nothing if
+ \c QT_NO_DEBUG is defined during compilation. For this reason,
+ the arguments to these macro should not have any side-effects.
+ Here is an incorrect usage of Q_CHECK_PTR():
+
+ \snippet doc/src/snippets/code/doc_src_debug.qdoc 2
+
+ If this code is compiled with \c QT_NO_DEBUG defined, the code in
+ the Q_CHECK_PTR() expression is not executed and \e alloc returns
+ an unitialized pointer.
+
+ The Qt library contains hundreds of internal checks that will
+ print warning messages when a programming error is detected. We
+ therefore recommend that you use a debug version of Qt when
+ developing Qt-based software.
+
+ \section1 Common Bugs
+
+ There is one bug that is so common that it deserves mention here:
+ If you include the Q_OBJECT macro in a class declaration and
+ run \link moc.html the meta-object compiler\endlink (\c{moc}),
+ but forget to link the \c{moc}-generated object code into your
+ executable, you will get very confusing error messages. Any link
+ error complaining about a lack of \c{vtbl}, \c{_vtbl}, \c{__vtbl}
+ or similar is likely to be a result of this problem.
+*/
diff --git a/doc/src/demos.qdoc b/doc/src/demos.qdoc
new file mode 100644
index 0000000..9cc8df5
--- /dev/null
+++ b/doc/src/demos.qdoc
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page demos.html
+ \title Qt Demonstrations
+ \brief Information about the demonstration programs provided with Qt.
+ \ingroup howto
+
+ This is the list of demonstrations in Qt's \c demos directory.
+ These are larger and more complicated programs than the
+ \l{Qt Examples} and are used to highlight certain features of
+ Qt. You can launch any of these programs from the
+ \l{Examples and Demos Launcher} application.
+
+ If you are new to Qt, and want to start developing applications,
+ you should probably start by going through the \l{Tutorials}.
+
+ \section1 Painting
+
+ \list
+ \o \l{demos/composition}{Composition Modes} demonstrates the range of
+ composition modes available with Qt.
+ \o \l{demos/deform}{Vector Deformation} demonstrates effects that are made
+ possible with a vector-oriented paint engine.
+ \o \l{demos/gradients}{Gradients} shows the different types of gradients
+ that are available in Qt.
+ \o \l{demos/pathstroke}{Path Stroking} shows Qt's built-in dash patterns
+ and shows how custom patterns can be used to extend the range of
+ available patterns.
+ \o \l{demos/affine}{Affine Transformations} demonstrates the different
+ affine transformations that can be used to influence painting operations.
+ \o \l{demos/arthurplugin}{Arthur Plugin} shows the widgets from the
+ other painting demos packaged as a custom widget plugin for \QD.
+ \endlist
+
+ \section1 Item Views
+
+ \list
+ \o \l{demos/interview}{Interview} shows the same model and selection being
+ shared between three different views.
+ \o \l{demos/spreadsheet}{Spreadsheet} demonstrates the use of a table view
+ as a spreadsheet, using custom delegates to render each item according to
+ the type of data it contains.
+ \endlist
+
+ \section1 SQL
+
+ \list
+ \o \l{demos/books}{Books} shows how Qt's SQL support and model/view integration
+ enables the user to modify the contents of a database without requiring
+ knowledge of SQL.
+ \o \l{demos/sqlbrowser}{SQL Browser} demonstrates a console for executing SQL
+ statements on a live database and provides a data browser for interactively
+ visualizing the results.
+ \endlist
+
+ \section1 Rich Text
+
+ \list
+ \o \l{demos/textedit}{Text Edit} shows Qt's rich text editing features and provides
+ an environment for experimenting with them.
+ \endlist
+
+ \section1 Main Window
+
+ \list
+ \o \l{demos/mainwindow}{Main Window} shows Qt's extensive support for main window
+ features, such as tool bars, dock windows, and menus.
+ \o \l{demos/macmainwindow}{Mac Main Window} shows how to create main window applications that has
+ the same appearance as other Mac OS X applications.
+ \endlist
+
+ \section1 Graphics View
+
+ \list
+ \o \l{demos/chip}{40000 Chips} uses the
+ \l{The Graphics View Framework}{Graphics View} framework to efficiently
+ display a large number of individual graphical items on a scrolling canvas,
+ highlighting features such as rotation, zooming, level of detail control,
+ and item selection.
+ \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's \e{Widgets on
+ the Canvas} feature by embedding a multitude of fully-working dialogs into a
+ scene.
+ \o \l{demos/boxes}{Boxes} showcases Qt's OpenGL support and the
+ integration with the Graphics View framework.
+ \endlist
+
+ \section1 Tools
+
+ \list
+ \o \l{demos/undo}{Undo Framework} demonstrates how Qt's
+ \l{Overview of Qt's Undo Framework}{undo framework} is used to
+ provide advanced undo/redo functionality.
+ \endlist
+
+ \section1 QtWebKit
+
+ \list
+ \o \l{Web Browser} demonstrates how Qt's \l{QtWebKit Module}{WebKit module}
+ can be used to implement a small Web browser.
+ \endlist
+
+ \section1 Phonon
+
+ \list
+ \o \l{demos/mediaplayer}{Media Player} demonstrates how the \l{Phonon Module} can be
+ used to implement a basic media player application.
+ \endlist
+
+ \note The Phonon demos are currently not available for the MinGW platform.
+
+*/
diff --git a/doc/src/demos/affine.qdoc b/doc/src/demos/affine.qdoc
new file mode 100644
index 0000000..25e496e
--- /dev/null
+++ b/doc/src/demos/affine.qdoc
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/affine
+ \title Affine Transformations
+
+ In this demo we show Qt's ability to perform affine transformations
+ on painting operations.
+
+ \image affine-demo.png
+
+ Transformations can be performed on any kind of graphics drawn using QPainter.
+ The transformations used to display the vector graphics, images, and text can be adjusted
+ in the following ways:
+
+ \list
+ \o Dragging the red circle in the centre of each drawing moves it to a new position.
+ \o Dragging the displaced red circle causes the current drawing to be rotated about the
+ central circle. Rotation can also be controlled with the \key Rotate slider.
+ \o Scaling is controlled with the \key Scale slider.
+ \o Each drawing can be sheared with the \key Shear slider.
+ \endlist
+*/
diff --git a/doc/src/demos/arthurplugin.qdoc b/doc/src/demos/arthurplugin.qdoc
new file mode 100644
index 0000000..38c5d3c
--- /dev/null
+++ b/doc/src/demos/arthurplugin.qdoc
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/arthurplugin
+ \title Arthur Plugin
+
+ In this demo we demonstrate the abilities of Qt's painting system
+ in combination with \QD's custom widget plugin facilities.
+
+ \image arthurplugin-demo.png
+
+ The specialized widgets used in the other demonstrations of the Arthur
+ painting system are provided as custom widgets to be used with \QD.
+ Since each of the widgets provides a set of signals and slots, the
+ effects they show can be controlled by connecting them up to standard
+ input widgets.
+*/
diff --git a/doc/src/demos/books.qdoc b/doc/src/demos/books.qdoc
new file mode 100644
index 0000000..b491b2a
--- /dev/null
+++ b/doc/src/demos/books.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/books
+ \title Books Demonstration
+
+ The Books demonstration shows how Qt's SQL classes can be used with the model/view
+ framework to create rich user interfaces for information stored in a database.
+
+ \image books-demo.png
+
+ Information about a collection of books is held in a database. The books are
+ catalogued by author, title, genre, and year of publication. Although each of
+ these fields can be displayed and edited using standard widgets, an additional
+ field describing an arbitrary rating for the book needs something extra.
+
+ Books are rated using a system where each is allocated a number of stars; the
+ more a book has, the better it is supposed to be. By clicking on a cell
+ containing the rating, the number of stars can be modified, and the rating in
+ the database is updated.
+*/
diff --git a/doc/src/demos/boxes.qdoc b/doc/src/demos/boxes.qdoc
new file mode 100644
index 0000000..db1155e
--- /dev/null
+++ b/doc/src/demos/boxes.qdoc
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/boxes
+ \title Boxes
+
+ This demo shows Qt's ability to combine advanced OpenGL rendering with the
+ the \l{The Graphics View Framework}{Graphics View} framework.
+
+ \image boxes-demo.png
+
+ Elements in the demo can be controlled using the mouse in the following
+ ways:
+ \list
+ \o Dragging the mouse while pressing the left mouse button rotates the
+ box in the center.
+ \o Dragging the mouse while pressing the right mouse button rotates the
+ satellite boxes.
+ \o Scrolling the mouse wheel zooms in and out of the scene.
+ \endlist
+
+ The options pane can be used to fine-tune various parameters in the demo,
+ including colors and pixel shaders.
+*/
diff --git a/doc/src/demos/browser.qdoc b/doc/src/demos/browser.qdoc
new file mode 100644
index 0000000..34bb80d
--- /dev/null
+++ b/doc/src/demos/browser.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page demos-browser.html
+ \title Web Browser
+
+ The Web Browser demonstration shows Qt's WebKit module in action,
+ providing a little Web browser application.
+
+ \image browser-demo.png
+
+ This browser is the foundation for the \l{Arora Browser}, a simple cross-platform
+ Web browser.
+*/
diff --git a/doc/src/demos/chip.qdoc b/doc/src/demos/chip.qdoc
new file mode 100644
index 0000000..9e9b7b4
--- /dev/null
+++ b/doc/src/demos/chip.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/chip
+ \title 40000 Chips
+
+ This demo shows how to visualize a huge scene with 40000 chip items
+ using Graphics View. It also shows Graphics View's powerful navigation
+ and interaction features, allowing you to zoom and rotate each of four
+ views independently, and you can select and move items around the scene.
+
+ \image chip-demo.png
+*/
diff --git a/doc/src/demos/composition.qdoc b/doc/src/demos/composition.qdoc
new file mode 100644
index 0000000..9c2c9d7
--- /dev/null
+++ b/doc/src/demos/composition.qdoc
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/composition
+ \title Composition Modes
+
+ This demo shows some of the more advanced composition modes supported by Qt.
+
+ \image composition-demo.png
+
+ The two most common forms of composition are \bold{Source} and \bold{SourceOver}.
+ \bold{Source} is used to draw opaque objects onto a paint device. In this mode,
+ each pixel in the source replaces the corresponding pixel in the destination.
+ In \bold{SourceOver} composition mode, the source object is transparent and is
+ drawn on top of the destination.
+
+ In addition to these standard modes, Qt defines the complete set of composition modes
+ as defined by X. Porter and Y. Duff. See the QPainter documentation for details.
+*/
diff --git a/doc/src/demos/deform.qdoc b/doc/src/demos/deform.qdoc
new file mode 100644
index 0000000..2b94e15
--- /dev/null
+++ b/doc/src/demos/deform.qdoc
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/deform
+ \title Vector Deformation
+
+ This demo shows how to use advanced vector techniques to draw text
+ using a \c QPainterPath.
+
+ \image deform-demo.png
+
+ We define a vector deformation field in the shape of a lens and apply
+ this to all points in a path. This means that what is rendered on
+ screen is not pixel manipulation, but modified vector representations of
+ the glyphs themselves. This is visible from the high quality of the
+ antialiased edges for the deformed glyphs.
+
+ To get a fairly complex path we allow the user to type in text and
+ convert the text to paths. This is done using the
+ QPainterPath::addText() function.
+
+ The lens is drawn using a single call to QPainter::drawEllipse(),
+ using a QRadialGradient to fill it with a specialized color
+ table, giving the effect of the sun's reflection and a drop
+ shadow. The lens is cached as a pixmap for better performance.
+*/
diff --git a/doc/src/demos/embeddeddialogs.qdoc b/doc/src/demos/embeddeddialogs.qdoc
new file mode 100644
index 0000000..f7d20cc
--- /dev/null
+++ b/doc/src/demos/embeddeddialogs.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/embeddeddialogs
+ \title Embedded Dialogs
+
+ This example shows how to embed standard dialogs into
+ Graphics View. It also shows how you can customize the
+ proxy class and add window shadows.
+
+ \image embeddeddialogs-demo.png
+*/
diff --git a/doc/src/demos/gradients.qdoc b/doc/src/demos/gradients.qdoc
new file mode 100644
index 0000000..3e8575a
--- /dev/null
+++ b/doc/src/demos/gradients.qdoc
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/gradients
+ \title Gradients
+
+ In this demo we show the various types of gradients that can
+ be used in Qt.
+
+ \image gradients-demo.png
+
+ There are three types of gradients:
+
+ \list
+ \o \bold{Linear} gradients interpolate colors between start and end points.
+ \o \bold{Radial} gradients interpolate colors between a focal point and the
+ points on a circle surrounding it.
+ \o \bold{Conical} gradients interpolate colors around a center point.
+ \endlist
+
+ The panel on the right contains a color table editor that defines
+ the colors in the gradient. The three topmost controls determine the red,
+ green and blue components while the last defines the alpha of the
+ gradient. You can move points, and add new ones, by clicking with the left
+ mouse button, and remove points by clicking with the right button.
+
+ There are three default configurations available at the bottom of
+ the page that are provided as suggestions on how a color table could be
+ configured.
+*/
diff --git a/doc/src/demos/interview.qdoc b/doc/src/demos/interview.qdoc
new file mode 100644
index 0000000..c32c13c
--- /dev/null
+++ b/doc/src/demos/interview.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/interview
+ \title Interview
+
+ The Interview demonstration explores the flexibility and scalability of the
+ model/view framework by presenting an infinitely deep data structure using a model
+ and three different types of view.
+
+ \image interview-demo.png
+*/
diff --git a/doc/src/demos/macmainwindow.qdoc b/doc/src/demos/macmainwindow.qdoc
new file mode 100644
index 0000000..3a59275
--- /dev/null
+++ b/doc/src/demos/macmainwindow.qdoc
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/macmainwindow
+ \title Mac Main Window Demo
+
+ This demo shows how to create a main window that has the
+ same appearance as other Mac OS X applications such as Mail or iTunes.
+ This includes customizing the item views and QSplitter and wrapping native
+ widgets such as the search field.
+
+ \image macmainwindow.png
+
+ See \c{$QTDIR/demos/macmainwindow} for the source code.
+*/
+
+
diff --git a/doc/src/demos/mainwindow.qdoc b/doc/src/demos/mainwindow.qdoc
new file mode 100644
index 0000000..58f2b65
--- /dev/null
+++ b/doc/src/demos/mainwindow.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/mainwindow
+ \title Main Window
+
+ The Main Window demonstration shows Qt's extensive support for tool bars,
+ dock windows, menus, and other standard application features.
+
+ \image mainwindow-demo.png
+*/
diff --git a/doc/src/demos/mediaplayer.qdoc b/doc/src/demos/mediaplayer.qdoc
new file mode 100644
index 0000000..0e66908
--- /dev/null
+++ b/doc/src/demos/mediaplayer.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/mediaplayer
+ \title Media Player
+
+ The Media Player demonstration shows how \l{Phonon Module}{Phonon}
+ can be used in Qt applications to handle audio and video playback.
+
+ \image mediaplayer-demo.png
+*/
diff --git a/doc/src/demos/pathstroke.qdoc b/doc/src/demos/pathstroke.qdoc
new file mode 100644
index 0000000..1c817f6
--- /dev/null
+++ b/doc/src/demos/pathstroke.qdoc
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/pathstroke
+ \title Path Stroking
+
+ In this demo we show some of the various types of pens that can be
+ used in Qt.
+
+ \image pathstroke-demo.png
+
+ Qt defines cap styles for how the end points are treated and join
+ styles for how path segments are joined together. A standard set of
+ predefined dash patterns are also included that can be used with
+ QPen.
+
+ In addition to the predefined patterns available in
+ QPen we also demonstrate direct use of the
+ QPainterPathStroker class which can be used to define
+ custom dash patterns. You can see this by enabling the
+ \e{Custom Pattern} option.
+*/
diff --git a/doc/src/demos/spreadsheet.qdoc b/doc/src/demos/spreadsheet.qdoc
new file mode 100644
index 0000000..88eb7d6
--- /dev/null
+++ b/doc/src/demos/spreadsheet.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/spreadsheet
+ \title Spreadsheet
+
+ The Spreadsheet demonstration shows how a table view can be used to create a
+ simple spreadsheet application. Custom delegates are used to render different
+ types of data in distinctive colors.
+
+ \image spreadsheet-demo.png
+*/
diff --git a/doc/src/demos/sqlbrowser.qdoc b/doc/src/demos/sqlbrowser.qdoc
new file mode 100644
index 0000000..68c3656
--- /dev/null
+++ b/doc/src/demos/sqlbrowser.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/sqlbrowser
+ \title SQL Browser
+
+ The SQL Browser demonstration shows how a data browser can be used to visualize
+ the results of SQL statements on a live database.
+
+ \image sqlbrowser-demo.png
+*/
diff --git a/doc/src/demos/textedit.qdoc b/doc/src/demos/textedit.qdoc
new file mode 100644
index 0000000..a99fc4a
--- /dev/null
+++ b/doc/src/demos/textedit.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/textedit
+ \title Text Edit
+
+ The Text Edit demonstration shows Qt's rich text editing facilities in action,
+ providing an example document for you to experiment with.
+
+ \image textedit-demo.png
+*/
diff --git a/doc/src/demos/undo.qdoc b/doc/src/demos/undo.qdoc
new file mode 100644
index 0000000..401986a
--- /dev/null
+++ b/doc/src/demos/undo.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example demos/undo
+ \title Undo Framework
+
+ This demo shows Qt's undo framework in action.
+
+ \image undodemo.png
+
+ Qt's undo framework is an implementation of the Command
+ pattern, which provides advanced undo/redo functionality.
+
+ To show the abilities of the framework, we have implemented a
+ small diagram application in which the diagram items are geometric
+ primitives. You can edit the diagram in the following ways: add,
+ move, change the color of, and delete the items.
+*/
diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc
new file mode 100644
index 0000000..d2c7a9e
--- /dev/null
+++ b/doc/src/deployment.qdoc
@@ -0,0 +1,1472 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \group deployment
+ \title Deploying Qt Applications
+ \ingroup buildsystem
+
+ Deploying an Qt application does not require any C++
+ programming. All you need to do is to build Qt and your
+ application in release mode, following the procedures described in
+ this documentation. We will demonstrate the procedures in terms of
+ deploying the \l {tools/plugandpaint}{Plug & Paint} application
+ that is provided in Qt's examples directory.
+
+ \section1 Static vs. Shared Libraries
+
+ There are two ways of deploying an application:
+
+ \list
+ \o Static Linking
+ \o Shared Libraries (Frameworks on Mac)
+ \endlist
+
+ Static linking results in a stand-alone executable. The advantage
+ is that you will only have a few files to deploy. The
+ disadvantages are that the executables are large and with no
+ flexibility (i.e a new version of the application, or of Qt, will
+ require that the deployment process is repeated), and that you
+ cannot deploy plugins.
+
+ To deploy plugin-based applications, you can use the shared
+ library approach. Shared libraries also provide smaller, more
+ flexible executables. For example, using the shared library
+ approach, the user is able to independently upgrade the Qt library
+ used by the application.
+
+ Another reason why you might want to use the shared library
+ approach, is if you want to use the same Qt libraries for a family
+ of applications. In fact, if you download the binary installation
+ of Qt, you get Qt as a shared library.
+
+ The disadvantage with the shared library approach is that you
+ will get more files to deploy.
+
+ \section1 Deploying Qt's Libraries
+
+ \table
+ \header
+ \o {4,1} Qt's Libraries
+ \row
+ \o \l {QtAssistant}
+ \o \l {QAxContainer}
+ \o \l {QAxServer}
+ \o \l {QtCore}
+ \row
+ \o \l {QtDBus}
+ \o \l {QtDesigner}
+ \o \l {QtGui}
+ \o \l {QtHelp}
+ \row
+ \o \l {QtNetwork}
+ \o \l {QtOpenGL}
+ \o \l {QtScript}
+ \o \l {QtSql}
+ \row
+ \o \l {QtSvg}
+ \o \l {QtWebKit}
+ \o \l {QtXml}
+ \o \l {QtXmlPatterns}
+ \row
+ \o \l {Phonon Module}{Phonon}
+ \o \l {Qt3Support}
+ \endtable
+
+ Since Qt is not a system library, it has to be redistributed along
+ with your application; the minimum is to redistribute the run-time
+ of the libraries used by the application. Using static linking,
+ however, the Qt run-time is compiled into the executable.
+
+ In particular, you will need to deploy Qt plugins, such as
+ JPEG support or SQL drivers. For more information about plugins,
+ see the \l {plugins-howto.html}{How to Create Qt Plugins}
+ documentation.
+
+ When deploying an application using the shared library approach
+ you must ensure that the Qt libraries will use the correct path to
+ find the Qt plugins, documentation, translation etc. To do this you
+ can use a \c qt.conf file. For more information, see the \l {Using
+ qt.conf} documentation.
+
+ Depending on configuration, compiler specific libraries must be
+ redistributed as well. For more information, see the platform
+ specific Application Dependencies sections: \l
+ {deployment-x11.html#application-dependencies}{X11}, \l
+ {deployment-windows.html#application-dependencies}{Windows}, \l
+ {deployment-mac.html#application-dependencies}{Mac}.
+
+ \section1 Licensing
+
+ Some of Qt's libraries are based on third party libraries that are
+ not licensed using the same dual-license model as Qt. As a result,
+ care must be taken when deploying applications that use these
+ libraries, particularly when the application is statically linked
+ to them.
+
+ The following table contains an inexhaustive summary of the issues
+ you should be aware of.
+
+ \table
+ \header \o Qt Library \o Dependency
+ \o Licensing Issue
+ \row \o QtHelp \o CLucene
+ \o The version of clucene distributed with Qt is licensed
+ under the GNU LGPL version 2.1 or later. This has implications for
+ developers of closed source applications. Please see
+ \l{QtHelp Module#License Information}{the QtHelp module documentation}
+ for more information.
+
+ \row \o QtNetwork \o OpenSSL
+ \o Some configurations of QtNetwork use OpenSSL at run-time. Deployment
+ of OpenSSL libraries is subject to both licensing and export restrictions.
+ More information can be found in the \l{Secure Sockets Layer (SSL) Classes}
+ documentation.
+
+ \row \o QtWebKit \o WebKit
+ \o WebKit is licensed under the GNU LGPL version 2 or later.
+ This has implications for developers of closed source applications.
+ Please see \l{QtWebKit Module#License Information}{the QtWebKit module
+ documentation} for more information.
+
+ \row \o Phonon \o Phonon
+ \o Phonon relies on the native multimedia engines on different platforms.
+ Phonon itself is licensed under the GNU LGPL version 2. Please see
+ \l{Phonon Module#License Information}{the Phonon module documentation}
+ for more information.
+ \endtable
+
+ \section1 Platform-Specific Notes
+
+ The procedure of deploying Qt applications is different for the
+ various platforms:
+
+ \list
+ \o \l{Deploying an Application on X11 Platforms}{Qt for X11 Platforms}
+ \o \l{Deploying an Application on Windows}{Qt for Windows}
+ \o \l{Deploying an Application on Mac OS X}{Qt for Mac OS X}
+ \o \l{Deploying Qt for Embedded Linux Applications}{Qt for Embedded Linux}
+ \endlist
+
+ \sa Installation {Window System Specific Notes}
+*/
+
+/*!
+ \page deployment-x11.html
+ \contentspage Deploying Qt Applications
+
+ \title Deploying an Application on X11 Platforms
+ \ingroup deployment
+
+ Due to the proliferation of Unix systems (commercial Unices, Linux
+ distributions, etc.), deployment on Unix is a complex
+ topic. Before we start, be aware that programs compiled for one
+ Unix flavor will probably not run on a different Unix system. For
+ example, unless you use a cross-compiler, you cannot compile your
+ application on Irix and distribute it on AIX.
+
+ Contents:
+
+ \tableofcontents
+
+ This documentation will describe how to determine which files you
+ should include in your distribution, and how to make sure that the
+ application will find them at run-time. We will demonstrate the
+ procedures in terms of deploying the \l {tools/plugandpaint}{Plug
+ & Paint} application that is provided in Qt's examples directory.
+
+ \section1 Static Linking
+
+ Static linking is often the safest and easiest way to distribute
+ an application on Unix since it relieves you from the task of
+ distributing the Qt libraries and ensuring that they are located
+ in the default search path for libraries on the target system.
+
+ \section2 Building Qt Statically
+
+ To use this approach, you must start by installing a static version
+ of the Qt library:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 0
+
+ We specify the prefix so that we do not overwrite the existing Qt
+ installation. The example above only builds the Qt libraries,
+ i.e. the examples and Qt Designer will not be built. When \c make
+ is done, you will find the Qt libraries in the \c /path/to/Qt/lib
+ directory.
+
+ When linking your application against static Qt libraries, note
+ that you might need to add more libraries to the \c LIBS line in
+ your project file. For more information, see the \l {Application
+ Dependencies} section.
+
+ \section2 Linking the Application to the Static Version of Qt
+
+ Once Qt is built statically, the next step is to regenerate the
+ makefile and rebuild the application. First, we must go into the
+ directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 1
+
+ Now run qmake to create a new makefile for the application, and do
+ a clean build to create the statically linked executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 2
+
+ You probably want to link against the release libraries, and you
+ can specify this when invoking \c qmake. Note that we must set the
+ path to the static Qt that we just built.
+
+ To check that the application really links statically with Qt, run
+ the \c ldd tool (available on most Unices):
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 3
+
+ Verify that the Qt libraries are not mentioned in the output.
+
+ Now, provided that everything compiled and linked without any
+ errors, we should have a \c plugandpaint file that is ready for
+ deployment. One easy way to check that the application really can
+ be run stand-alone is to copy it to a machine that doesn't have Qt
+ or any Qt applications installed, and run it on that machine.
+
+ Remember that if your application depends on compiler specific
+ libraries, these must still be redistributed along with your
+ application. For more information, see the \l {Application
+ Dependencies} section.
+
+ The \l {tools/plugandpaint}{Plug & Paint} example consists of
+ several components: The core application (\l
+ {tools/plugandpaint}{Plug & Paint}), and the \l
+ {tools/plugandpaintplugins/basictools}{Basic Tools} and \l
+ {tools/plugandpaintplugins/extrafilters}{Extra Filters}
+ plugins. Since we cannot deploy plugins using the static linking
+ approach, the executable we have prepared so far is
+ incomplete. The application will run, but the functionality will
+ be disabled due to the missing plugins. To deploy plugin-based
+ applications we should use the shared library approach.
+
+ \section1 Shared Libraries
+
+ We have two challenges when deploying the \l
+ {tools/plugandpaint}{Plug & Paint} application using the shared
+ libraries approach: The Qt runtime has to be correctly
+ redistributed along with the application executable, and the
+ plugins have to be installed in the correct location on the target
+ system so that the application can find them.
+
+ \section2 Building Qt as a Shared Library
+
+ We assume that you already have installed Qt as a shared library,
+ which is the default when installing Qt, in the \c /path/to/Qt
+ directory. For more information on how to build Qt, see the \l
+ {Installation} documentation.
+
+ \section2 Linking the Application to Qt as a Shared Library
+
+ After ensuring that Qt is built as a shared library, we can build
+ the \l {tools/plugandpaint}{Plug & Paint} application. First, we
+ must go into the directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 4
+
+ Now run qmake to create a new makefile for the application, and do
+ a clean build to create the dynamically linked executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 5
+
+ This builds the core application, the following will build the
+ plugins:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 6
+
+ If everything compiled and linked without any errors, we will get
+ a \c plugandpaint executable and the \c libpnp_basictools.so and
+ \c libpnp_extrafilters.so plugin files.
+
+ \section2 Creating the Application Package
+
+ There is no standard package management on Unix, so the method we
+ present below is a generic solution. See the documentation for
+ your target system for information on how to create a package.
+
+ To deploy the application, we must make sure that we copy the
+ relevant Qt libraries (corresponding to the Qt modules used in the
+ application) as well as the executable to the same
+ directory. Remember that if your application depends on compiler
+ specific libraries, these must also be redistributed along with
+ your application. For more information, see the \l {Application
+ Dependencies} section.
+
+ We'll cover the plugins shortly, but the main issue with shared
+ libraries is that you must ensure that the dynamic linker will
+ find the Qt libraries. Unless told otherwise, the dynamic linker
+ doesn't search the directory where your application resides. There
+ are many ways to solve this:
+
+ \list
+ \o You can install the Qt libraries in one of the system
+ library paths (e.g. \c /usr/lib on most systems).
+
+ \o You can pass a predetermined path to the \c -rpath command-line
+ option when linking the application. This will tell the dynamic
+ linker to look in this directory when starting your application.
+
+ \o You can write a startup script for your application, where you
+ modify the dynamic linker configuration (e.g. adding your
+ application's directory to the \c LD_LIBRARY_PATH environment
+ variable. \note If your application will be running with "Set
+ user ID on execution," and if it will be owned by root, then
+ LD_LIBRARY_PATH will be ignored on some platforms. In this
+ case, use of the LD_LIBRARY_PATH approach is not an option).
+
+ \endlist
+
+ The disadvantage of the first approach is that the user must have
+ super user privileges. The disadvantage of the second approach is
+ that the user may not have privileges to install into the
+ predetemined path. In either case, the users don't have the option
+ of installing to their home directory. We recommend using the
+ third approach since it is the most flexible. For example, a \c
+ plugandpaint.sh script will look like this:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 7
+
+ By running this script instead of the executable, you are sure
+ that the Qt libraries will be found by the dynamic linker. Note
+ that you only have to rename the script to use it with other
+ applications.
+
+ When looking for plugins, the application searches in a plugins
+ subdirectory inside the directory of the application
+ executable. Either you have to manually copy the plugins into the
+ \c plugins directory, or you can set the \c DESTDIR in the
+ plugins' project files:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 8
+
+ An archive distributing all the Qt libraries, and all the plugins,
+ required to run the \l {tools/plugandpaint}{Plug & Paint}
+ application, would have to include the following files:
+
+ \table 100%
+ \header
+ \o Component \o {2, 1} File Name
+ \row
+ \o The executable
+ \o {2, 1} \c plugandpaint
+ \row
+ \o The script to run the executable
+ \o {2, 1} \c plugandpaint.sh
+ \row
+ \o The Basic Tools plugin
+ \o {2, 1} \c plugins\libpnp_basictools.so
+ \row
+ \o The ExtraFilters plugin
+ \o {2, 1} \c plugins\libpnp_extrafilters.so
+ \row
+ \o The Qt Core module
+ \o {2, 1} \c libQtCore.so.4
+ \row
+ \o The Qt GUI module
+ \o {2, 1} \c libQtGui.so.4
+ \endtable
+
+ On most systems, the extension for shared libraries is \c .so. A
+ notable exception is HP-UX, which uses \c .sl.
+
+ Remember that if your application depends on compiler specific
+ libraries, these must still be redistributed along with your
+ application. For more information, see the \l {Application
+ Dependencies} section.
+
+ To verify that the application now can be successfully deployed,
+ you can extract this archive on a machine without Qt and without
+ any compiler installed, and try to run it, i.e. run the \c
+ plugandpaint.sh script.
+
+ An alternative to putting the plugins in the \c plugins
+ subdirectory is to add a custom search path when you start your
+ application using QApplication::addLibraryPath() or
+ QApplication::setLibraryPaths().
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 9
+
+ \section1 Application Dependencies
+
+ \section2 Additional Libraries
+
+ To find out which libraries your application depends on, run the
+ \c ldd tool (available on most Unices):
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 10
+
+ This will list all the shared library dependencies for your
+ application. Depending on configuration, these libraries must be
+ redistributed along with your application. In particular, the
+ standard C++ library must be redistributed if you're compiling
+ your application with a compiler that is binary incompatible with
+ the system compiler. When possible, the safest solution is to link
+ against these libraries statically.
+
+ You will probably want to link dynamically with the regular X11
+ libraries, since some implementations will try to open other
+ shared libraries with \c dlopen(), and if this fails, the X11
+ library might cause your application to crash.
+
+ It's also worth mentioning that Qt will look for certain X11
+ extensions, such as Xinerama and Xrandr, and possibly pull them
+ in, including all the libraries that they link against. If you
+ can't guarantee the presence of a certain extension, the safest
+ approach is to disable it when configuring Qt (e.g. \c {./configure
+ -no-xrandr}).
+
+ FontConfig and FreeType are other examples of libraries that
+ aren't always available or that aren't always binary
+ compatible. As strange as it may sound, some software vendors have
+ had success by compiling their software on very old machines and
+ have been very careful not to upgrade any of the software running
+ on them.
+
+ When linking your application against the static Qt libraries, you
+ must explicitly link with the dependent libraries mentioned
+ above. Do this by adding them to the \c LIBS variable in your
+ project file.
+
+ \section2 Qt Plugins
+
+ Your application may also depend on one or more Qt plugins, such
+ as the JPEG image format plugin or a SQL driver plugin. Be sure
+ to distribute any Qt plugins that you need with your application,
+ and note that each type of plugin should be located within a
+ specific subdirectory (such as \c imageformats or \c sqldrivers)
+ within your distribution directory, as described below.
+
+ \note If you are deploying an application that uses QtWebKit to display
+ HTML pages from the World Wide Web, you should include all text codec
+ plugins to support as many HTML encodings possible.
+
+ The search path for Qt plugins (as well as a few other paths) is
+ hard-coded into the QtCore library. By default, the first plugin
+ search path will be hard-coded as \c /path/to/Qt/plugins. As
+ mentioned above, using pre-determined paths has certain
+ disadvantages, so you need to examine various alternatives to make
+ sure that the Qt plugins are found:
+
+ \list
+
+ \o \l{qt-conf.html}{Using \c qt.conf}. This is the recommended
+ approach since it provides the most flexibility.
+
+ \o Using QApplication::addLibraryPath() or
+ QApplication::setLibraryPaths().
+
+ \o Using a third party installation utility or the target system's
+ package manager to change the hard-coded paths in the QtCore
+ library.
+
+ \endlist
+
+ The \l{How to Create Qt Plugins} document outlines the issues you
+ need to pay attention to when building and deploying plugins for
+ Qt applications.
+*/
+
+/*!
+ \page deployment-windows.html
+ \contentspage Deploying Qt Applications
+
+ \title Deploying an Application on Windows
+ \ingroup deployment
+
+ This documentation will describe how to determine which files you
+ should include in your distribution, and how to make sure that the
+ application will find them at run-time. We will demonstrate the
+ procedures in terms of deploying the \l {tools/plugandpaint}{Plug
+ & Paint} application that is provided in Qt's examples directory.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Static Linking
+
+ If you want to keep things simple by only having a few files to
+ deploy, i.e. a stand-alone executable with the associated compiler
+ specific DLLs, then you must build everything statically.
+
+ \section2 Building Qt Statically
+
+ Before we can build our application we must make sure that Qt is
+ built statically. To do this, go to a command prompt and type the
+ following:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 11
+
+ Remember to specify any other options you need, such as data base
+ drivers, as arguments to \c configure. Once \c configure has
+ finished, type the following:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 12
+
+ This will build Qt statically. Note that unlike with a dynamic build,
+ building Qt statically will result in libraries without version numbers;
+ e.g. \c QtCore4.lib will be \c QtCore.lib. Also, we have used \c nmake
+ in all the examples, but if you use MinGW you must use
+ \c mingw32-make instead.
+
+ \note If you later need to reconfigure and rebuild Qt from the
+ same location, ensure that all traces of the previous configuration are
+ removed by entering the build directory and typing \c{nmake distclean}
+ before running \c configure again.
+
+ \section2 Linking the Application to the Static Version of Qt
+
+ Once Qt has finished building we can build the \l
+ {tools/plugandpaint}{Plug & Paint} application. First we must go
+ into the directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 13
+
+ We must then run \c qmake to create a new makefile for the
+ application, and do a clean build to create the statically linked
+ executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 14
+
+ You probably want to link against the release libraries, and you
+ can specify this when invoking \c qmake. Now, provided that
+ everything compiled and linked without any errors, we should have
+ a \c plugandpaint.exe file that is ready for deployment. One easy
+ way to check that the application really can be run stand-alone is
+ to copy it to a machine that doesn't have Qt or any Qt
+ applications installed, and run it on that machine.
+
+ Remember that if your application depends on compiler specific
+ libraries, these must still be redistributed along with your
+ application. You can check which libraries your application is
+ linking against by using the \c depends tool. For more
+ information, see the \l {Application Dependencies} section.
+
+ The \l {tools/plugandpaint}{Plug & Paint} example consists of
+ several components: The application itself (\l
+ {tools/plugandpaint}{Plug & Paint}), and the \l
+ {tools/plugandpaintplugins/basictools}{Basic Tools} and \l
+ {tools/plugandpaintplugins/extrafilters}{Extra Filters}
+ plugins. Since we cannot deploy plugins using the static linking
+ approach, the application we have prepared is incomplete. It will
+ run, but the functionality will be disabled due to the missing
+ plugins. To deploy plugin-based applications we should use the
+ shared library approach.
+
+ \section1 Shared Libraries
+
+ We have two challenges when deploying the \l
+ {tools/plugandpaint}{Plug & Paint} application using the shared
+ libraries approach: The Qt runtime has to be correctly
+ redistributed along with the application executable, and the
+ plugins have to be installed in the correct location on the target
+ system so that the application can find them.
+
+ \section2 Building Qt as a Shared Library
+
+ We assume that you already have installed Qt as a shared library,
+ which is the default when installing Qt, in the \c C:\path\to\Qt
+ directory. For more information on how to build Qt, see the \l
+ {Installation} documentation.
+
+ \section2 Linking the Application to Qt as a Shared Library
+
+ After ensuring that Qt is built as a shared library, we can build
+ the \l {tools/plugandpaint}{Plug & Paint} application. First, we
+ must go into the directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 15
+
+ Now run \c qmake to create a new makefile for the application, and
+ do a clean build to create the dynamically linked executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 16
+
+ This builds the core application, the following will build the
+ plugins:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 17
+
+ If everything compiled and linked without any errors, we will get
+ a \c plugandpaint.exe executable and the \c pnp_basictools.dll and
+ \c pnp_extrafilters.dll plugin files.
+
+ \section2 Creating the Application Package
+
+ To deploy the application, we must make sure that we copy the
+ relevant Qt DLL (corresponding to the Qt modules used in
+ the application) as well as the executable to the same directory
+ in the \c release subdirectory.
+
+ Remember that if your application depends on compiler specific
+ libraries, these must be redistributed along with your
+ application. You can check which libraries your application is
+ linking against by using the \c depends tool. For more
+ information, see the \l {Application Dependencies} section.
+
+ We'll cover the plugins shortly, but first we'll check that the
+ application will work in a deployed environment: Either copy the
+ executable and the Qt DLLs to a machine that doesn't have Qt
+ or any Qt applications installed, or if you want to test on the
+ build machine, ensure that the machine doesn't have Qt in its
+ environment.
+
+ If the application starts without any problems, then we have
+ successfully made a dynamically linked version of the \l
+ {tools/plugandpaint}{Plug & Paint} application. But the
+ application's functionality will still be missing since we have
+ not yet deployed the associated plugins.
+
+ Plugins work differently to normal DLLs, so we can't just
+ copy them into the same directory as our application's executable
+ as we did with the Qt DLLs. When looking for plugins, the
+ application searches in a \c plugins subdirectory inside the
+ directory of the application executable.
+
+ So to make the plugins available to our application, we have to
+ create the \c plugins subdirectory and copy over the relevant DLLs:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 18
+
+ An archive distributing all the Qt DLLs and application
+ specific plugins required to run the \l {tools/plugandpaint}{Plug
+ & Paint} application, would have to include the following files:
+
+ \table 100%
+ \header
+ \o Component \o {2, 1} File Name
+ \row
+ \o The executable
+ \o {2, 1} \c plugandpaint.exe
+ \row
+ \o The Basic Tools plugin
+ \o {2, 1} \c plugins\pnp_basictools.dll
+ \row
+ \o The ExtraFilters plugin
+ \o {2, 1} \c plugins\pnp_extrafilters.dll
+ \row
+ \o The Qt Core module
+ \o {2, 1} \c qtcore4.dll
+ \row
+ \o The Qt GUI module
+ \o {2, 1} \c qtgui4.dll
+ \endtable
+
+ In addition, the archive must contain the following compiler
+ specific libraries depending on your version of Visual Studio:
+
+ \table 100%
+ \header
+ \o \o VC++ 6.0 \o VC++ 7.1 (2003) \o VC++ 8.0 (2005)
+ \row
+ \o The C run-time
+ \o \c msvcrt.dll
+ \o \c msvcr71.dll
+ \o \c msvcr80.dll
+ \row
+ \o The C++ run-time
+ \o \c msvcp60.dll
+ \o \c msvcp71.dll
+ \o \c msvcp80.dll
+ \endtable
+
+ To verify that the application now can be successfully deployed,
+ you can extract this archive on a machine without Qt and without
+ any compiler installed, and try to run it.
+
+ An alternative to putting the plugins in the plugins subdirectory
+ is to add a custom search path when you start your application
+ using QApplication::addLibraryPath() or
+ QApplication::setLibraryPaths().
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 19
+
+ One benefit of using plugins is that they can easily be made
+ available to a whole family of applications.
+
+ It's often most convenient to add the path in the application's \c
+ main() function, right after the QApplication object is
+ created. Once the path is added, the application will search it
+ for plugins, in addition to looking in the \c plugins subdirectory
+ in the application's own directory. Any number of additional paths
+ can be added.
+
+ \section2 Visual Studio 2005 Onwards
+
+ When deploying an application compiled with Visual Studio 2005 onwards,
+ there are some additional steps to be taken.
+
+ First, we need to copy the manifest file created when linking the
+ application. This manifest file contains information about the
+ application's dependencies on side-by-side assemblies, such as the runtime
+ libraries.
+
+ The manifest file needs to be copied into the \bold same folder as the
+ application executable. You do not need to copy the manifest files for
+ shared libraries (DLLs), since they are not used.
+
+ If the shared library has dependencies that are different from the
+ application using it, the manifest file needs to be embedded into the DLL
+ binary. Since Qt 4.1.3, the follwoing \c CONFIG options are available for
+ embedding manifests:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 20
+
+ To use the options, add
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 21
+
+ to your .pro file. The \c embed_manifest_dll option is enabled by default.
+
+ You can find more information about manifest files and side-by-side
+ assemblies at the
+ \l {http://msdn.microsoft.com/en-us/library/aa376307.aspx}{MSDN website}.
+
+ There are two ways to include the run time libraries: by bundling them
+ directly with your application or by installing them on the end-user's
+ system.
+
+ To bundle the run time libraries with your application, copy the directory
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 22
+
+ into the folder where your executable is, so that you are including a
+ \c Microsoft.VC80.CRT directory alongside your application's executable. If
+ you are bundling the runtimes and need to deploy plugins as well, you have
+ to remove the manifest from the plugins (embedded as a resource) by adding
+ the following line to the \c{.pro} file of the plugins you are compiling:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 23
+
+ \warning If you skip the step above, the plugins will not load on some
+ systems.
+
+ To install the runtime libraries on the end-user's system, you need to
+ include the appropriate Visual C++ Redistributable Package (VCRedist)
+ executable with your application and ensure that it is executed when the
+ user installs your application.
+
+ For example, on an 32-bit x86-based system, you would include the
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE}{vcredist_x86.exe}
+ executable. The \l{http://www.microsoft.com/downloads/details.aspx?familyid=526BF4A7-44E6-4A91-B328-A4594ADB70E5}{vcredist_IA64.exe}
+ and \l{http://www.microsoft.com/downloads/details.aspx?familyid=90548130-4468-4BBC-9673-D6ACABD5D13B}{vcredist_x64.exe}
+ executables provide the appropriate libraries for the IA64 and 64-bit x86
+ architectures, respectively.
+
+ \note The application you ship must be compiled with exactly the same
+ compiler version against the same C runtime version. This prevents
+ deploying errors caused by different versions of the C runtime libraries.
+
+
+ \section1 Application Dependencies
+
+ \section2 Additional Libraries
+
+ Depending on configuration, compiler specific libraries must be
+ redistributed along with your application. You can check which
+ libraries your application is linking against by using the
+ \l{Dependency Walker} tool. All you need to do is to run it like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 24
+
+ This will provide a list of the libraries that your application
+ depends on and other information.
+
+ \image deployment-windows-depends.png
+
+ When looking at the release build of the Plug & Paint executable
+ (\c plugandpaint.exe) with the \c depends tool, the tool lists the
+ following immediate dependencies to non-system libraries:
+
+ \table 100%
+ \header
+ \o Qt
+ \o VC++ 6.0
+ \o VC++ 7.1 (2003)
+ \o VC++ 8.0 (2005)
+ \o MinGW
+ \row
+ \o \list
+ \o QTCORE4.DLL - The QtCore runtime
+ \o QTGUI4.DLL - The QtGui runtime
+ \endlist
+ \o \list
+ \o MSVCRT.DLL - The C runtime
+ \o MSVCP60.DLL - The C++ runtime (only when STL is installed)
+ \endlist
+ \o \list
+ \o MSVCR71.DLL - The C runtime
+ \o MSVCP71.DLL - The C++ runtime (only when STL is installed)
+ \endlist
+ \o \list
+ \o MSVCR80.DLL - The C runtime
+ \o MSVCP80.DLL - The C++ runtime (only when STL is installed)
+ \endlist
+ \o \list
+ \o MINGWM10.DLL - The MinGW run-time
+ \endlist
+ \endtable
+
+ When looking at the plugin DLLs the exact same dependencies
+ are listed.
+
+ \section2 Qt Plugins
+
+ Your application may also depend on one or more Qt plugins, such
+ as the JPEG image format plugin or a SQL driver plugin. Be sure
+ to distribute any Qt plugins that you need with your application,
+ and note that each type of plugin should be located within a
+ specific subdirectory (such as \c imageformats or \c sqldrivers)
+ within your distribution directory, as described below.
+
+ \note If you are deploying an application that uses QtWebKit to display
+ HTML pages from the World Wide Web, you should include all text codec
+ plugins to support as many HTML encodings possible.
+
+ The search path for Qt plugins is hard-coded into the QtCore library.
+ By default, the plugins subdirectory of the Qt installation is the first
+ plugin search path. However, pre-determined paths like the default one
+ have certain disadvantages. For example, they may not exist on the target
+ machine. For that reason, you need to examine various alternatives to make
+ sure that the Qt plugins are found:
+
+ \list
+
+ \o \l{qt-conf.html}{Using \c qt.conf}. This approach is the recommended
+ if you have executables in different places sharing the same plugins.
+
+ \o Using QApplication::addLibraryPath() or
+ QApplication::setLibraryPaths(). This approach is recommended if you only
+ have one executable that will use the plugin.
+
+ \o Using a third party installation utility to change the
+ hard-coded paths in the QtCore library.
+
+ \endlist
+
+ If you add a custom path using QApplication::addLibraryPath it could
+ look like this:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 54
+
+ Then qApp->libraryPaths() would return something like this:
+
+ "C:/customPath/plugins "
+ "C:/Qt/4.5.0/plugins"
+ "E:/myApplication/directory/"
+
+ The executable will look for the plugins in these directories and
+ the same order as the QStringList returned by qApp->libraryPaths().
+ The newly added path is prepended to the qApp->libraryPaths() which
+ means that it will be searched through first. However, if you use
+ qApp->setLibraryPaths(), you will be able to determend which paths
+ and in which order they will be searched.
+
+ The \l{How to Create Qt Plugins} document outlines the issues you
+ need to pay attention to when building and deploying plugins for
+ Qt applications.
+*/
+
+/*!
+ \page deployment-mac.html
+ \contentspage Deploying Qt Applications
+
+ \title Deploying an Application on Mac OS X
+ \ingroup deployment
+
+ Starting with version 4.5, Qt now includes a \l {macdeploy}{deployment tool}
+ that automates the prodecures described in this document.
+
+ This documentation will describe how to create a bundle, and how
+ to make sure that the application will find the resources it needs
+ at run-time. We will demonstrate the procedures in terms of
+ deploying the \l {tools/plugandpaint}{Plug & Paint} application
+ that is provided in Qt's examples directory.
+
+ \tableofcontents
+
+ \section1 The Bundle
+
+ On the Mac, a GUI application must be built and run from a
+ bundle. A bundle is a directory structure that appears as a single
+ entity when viewed in the Finder. A bundle for an application
+ typcially contains the executable and all the resources it
+ needs. See the image below:
+
+ \image deployment-mac-bundlestructure.png
+
+ The bundle provides many advantages to the user. One primary
+ advantage is that, since it is a single entity, it allows for
+ drag-and-drop installation. As a programmer you can access bundle
+ information in your own code. This is specific to Mac OS X and
+ beyond the scope of this document. More information about bundles
+ is available on \l
+ {http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html}{Apple's Developer Website}.
+
+ A Qt command line application on Mac OS X works similar to a
+ command line application on Unix and Windows. You probably don't
+ want to run it in a bundle: Add this to your application's .pro:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 26
+
+ This will tell \c qmake not to put the executable inside a
+ bundle. Please refer to the \l{Deploying an Application on
+ X11 Platforms}{X11 deployment documentation} for information about how
+ to deploy these "bundle-less" applications.
+
+ \section1 Xcode
+
+ We will only concern ourselves with command-line tools here. While
+ it is possible to use Xcode for this, Xcode has changed enough
+ between each version that it makes it difficult to document it
+ perfectly for each version. A future version of this document may
+ include more information for using Xcode in the deployment
+ process.
+
+ \section1 Static Linking
+
+ If you want to keep things simple by only having a few files to
+ deploy, then you must build everything statically.
+
+ \section2 Building Qt Statically
+
+ Start by installing a static version of the Qt library. Remember
+ that you will not be able to use plugins and you must build in all
+ the image formats, SQL drivers, etc..
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 27
+
+ You can check the various options that are available by running \c
+ configure -help.
+
+ \section2 Linking the Application to the Static Version of Qt
+
+ Once Qt is built statically, the next step is to regenerate the
+ makefile and rebuild the application. First, we must go into the
+ directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 28
+
+ Now run \c qmake to create a new makefile for the application, and do
+ a clean build to create the statically linked executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 29
+
+ You probably want to link against the release libraries, and you
+ can specify this when invoking \c qmake. If you have Xcode Tools
+ 1.5 or higher installed, you may want to take advantage of "dead
+ code stripping" to reduce the size of your binary even more. You
+ can do this by passing \c {LIBS+= -dead_strip} to \c qmake in
+ addition to the \c {-config release} parameter. This doesn't have
+ as large an effect if you are using GCC 4, since Qt will then have
+ function visibility hints built-in, but if you use GCC 3.3, it
+ could make a difference.
+
+ Now, provided that everything compiled and linked without any
+ errors, we should have a \c plugandpaint.app bundle that is ready
+ for deployment. One easy way to check that the application really
+ can be run stand-alone is to copy the bundle to a machine that
+ doesn't have Qt or any Qt applications installed, and run the
+ application on that machine.
+
+ You can check what other libraries your application links to using
+ the \c otool:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 30
+
+ Here is what the output looks like for the static \l
+ {tools/plugandpaint}{Plug & Paint}:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 31
+
+ For more information, see the \l {Application Dependencies}
+ section.
+
+ If you see \e Qt libraries in the output, it probably
+ means that you have both dynamic and static Qt libraries installed
+ on your machine. The linker will always choose dynamic over
+ static. There are two solutions: Either move your Qt dynamic
+ libraries (\c .dylibs) away to another directory while you link
+ the application and then move them back, or edit the \c Makefile
+ and replace link lines for the Qt libraries with the absolute path
+ to the static libraries. For example, replace
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 32
+
+ with
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 33
+
+ The \l {tools/plugandpaint}{Plug & Paint} example consists of
+ several components: The core application (\l
+ {tools/plugandpaint}{Plug & Paint}), and the \l
+ {tools/plugandpaintplugins/basictools}{Basic Tools} and \l
+ {tools/plugandpaintplugins/extrafilters}{Extra Filters}
+ plugins. Since we cannot deploy plugins using the static linking
+ approach, the bundle we have prepared so far is incomplete. The
+ application will run, but the functionality will be disabled due
+ to the missing plugins. To deploy plugin-based applications we
+ should use the framework approach.
+
+ \section1 Frameworks
+
+ We have two challenges when deploying the \l
+ {tools/plugandpaint}{Plug & Paint} application using frameworks:
+ The Qt runtime has to be correctly redistributed along with the
+ application bundle, and the plugins have to be installed in the
+ correct location so that the application can find them.
+
+ When distributing Qt with your application using frameworks, you
+ have two options: You can either distribute Qt as a private
+ framework within your application bundle, or you can distribute Qt
+ as a standard framework (alternatively use the Qt frameworks in
+ the installed binary). These two approaches are essentially the
+ same. The latter option is good if you have many Qt applications
+ and you would prefer to save memory. The former is good if you
+ have Qt built in a special way, or want to make sure the framework
+ is there. It just comes down to where you place the Qt frameworks.
+
+ \section2 Building Qt as Frameworks
+
+ We assume that you already have installed Qt as frameworks, which
+ is the default when installing Qt, in the /path/to/Qt
+ directory. For more information on how to build Qt, see the \l
+ Installation documentation.
+
+ When installing, the identification name of the frameworks will
+ also be set. The identification name is what the dynamic linker
+ (\c dyld) uses to find the libraries for your application.
+
+ \section2 Linking the Application to Qt as Frameworks
+
+ After ensuring that Qt is built as frameworks, we can build the \l
+ {tools/plugandpaint}{Plug & Paint} application. First, we must go
+ into the directory that contains the application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 34
+
+ Now run qmake to create a new makefile for the application, and do
+ a clean build to create the dynamically linked executable:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 35
+
+ This builds the core application, the following will build the
+ plugins:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 36
+
+ Now run the \c otool for the Qt frameworks, for example Qt Gui:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 37
+
+ You will get the following output:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 38
+
+ For the Qt frameworks, the first line (i.e. \c
+ {path/to/Qt/lib/QtGui.framework/Versions/4/QtGui (compatibility
+ version 4.0.0, current version 4.0.1)}) becomes the framework's
+ identification name which is used by the dynamic linker (\c dyld).
+
+ But when you are deploying the application, your users may not
+ have the Qt frameworks installed in the specified location. For
+ that reason, you must either provide the frameworks in an agreed
+ upon location, or store the frameworks in the bundle itself.
+ Regardless of which solution you choose, you must make sure that
+ the frameworks return the proper identification name for
+ themselves, and that the application will look for these
+ names. Luckily we can control this with the \c install_name_tool
+ command-line tool.
+
+ The \c install_name_tool works in two modes, \c -id and \c
+ -change. The \c -id mode is for libraries and frameworks, and
+ allows us to specify a new identification name. We use the \c
+ -change mode to change the paths in the application.
+
+ Let's test this out by copying the Qt frameworks into the Plug &
+ Paint bundle. Looking at \c otool's output for the bundle, we can
+ see that we must copy both the QtCore and QtGui frameworks into
+ the bundle. We will assume that we are in the directory where we
+ built the bundle.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 39
+
+ First we create a \c Frameworks directory inside the bundle. This
+ follows the Mac OS X application convention. We then copy the
+ frameworks into the new directory. Since frameworks contain
+ symbolic links, and we want to preserve them, we use the \c -R
+ option.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 40
+
+ Then we run \c install_name_tool to set the identification names
+ for the frameworks. The first argument after \c -id is the new
+ name, and the second argument is the framework which
+ identification we wish to change. The text \c @executable_path is
+ a special \c dyld variable telling \c dyld to start looking where
+ the executable is located. The new names specifies that these
+ frameworks will be located "one directory up and over" in the \c
+ Frameworks directory.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 41
+
+ Now, the dynamic linker knows where to look for QtCore and
+ QtGui. Then we must make the application aware of the library
+ locations as well using \c install_name_tool's \c -change mode.
+ This basically comes down to string replacement, to match the
+ identification names that we set for the frameworks.
+
+ Finally, since the QtGui framework depends on QtCore, we must
+ remember to change the reference for QtGui:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 42
+
+ After all this we can run \c otool again and see that the
+ application will look in the right locations.
+
+ Of course, the thing that makes the \l {tools/plugandpaint}{Plug &
+ Paint} example interesting are its plugins. The basic steps we
+ need to follow with plugins are:
+
+ \list
+ \o Put the plugins inside the bundle
+ \o Make sure that the plugins use the correct library using the
+ \c install_name_tool
+ \o Make sure that the application knows where to get the plugins
+ \endlist
+
+ While we can put the plugins anywhere we want in the bundle, the
+ best location to put them is under Contents/Plugins. When we built
+ the Plug & Paint plugins, the \c DESTDIR variable in their \c .pro
+ file put the plugins' \c .dylib files in a \c plugins subdirectory
+ in the \c plugandpaint directory. So, in this example, all we need
+ to do is move this directory:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 43
+
+ If we run \c otool on for example the \l
+ {tools/plugandpaintplugins/basictools}{Basic Tools} plugin's \c
+ .dylib file we get the following information.
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 44
+
+ Then we can see that the plugin links to the Qt frameworks it was
+ built against. Since we want the plugins to use the framework in
+ the application bundle we change them the same way as we did for
+ the application. For example for the Basic Tools plugin:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 45
+
+
+ We must also modify the code in \c
+ tools/plugandpaint/mainwindow.cpp to \l {QDir::cdUp()}{cdUp()} one
+ directory since the plugins live in the bundle. Add the following
+ code to the \c mainwindow.cpp file:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 46
+
+ \table
+ \row
+ \o \inlineimage deployment-mac-application.png
+ \o
+ The additional code in \c tools/plugandpaint/mainwindow.cpp also
+ enables us to view the plugins in the Finder, as shown to the left.
+
+ We can also add plugins extending Qt, for example adding SQL
+ drivers or image formats. We just need to follow the directory
+ structure outlined in plugin documentation, and make sure they are
+ included in the QCoreApplication::libraryPaths(). Let's quickly do
+ this with the image formats, following the approach from above.
+
+ Copy Qt's image format plugins into the bundle:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 47
+
+ Use \c install_name_tool to link the plugins to the frameworks in
+ the bundle:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 48
+
+ Then we update the source code in \c tools/plugandpaint/main.cpp
+ to look for the the new plugins. After constructing the
+ QApplication, we add the following code:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 49
+
+ First, we tell the application to only look for plugins in this
+ directory. In our case, this is what we want since we only want to
+ look for the plugins that we distribute with the bundle. If we
+ were part of a bigger Qt installation we could have used
+ QCoreApplication::addLibraryPath() instead.
+
+ \endtable
+
+ \warning When deploying plugins, and thus make changes to the
+ source code, the default identification names are reset when
+ rebuilding the application, and you must repeat the process of
+ making your application link to the Qt frameworks in the bundle
+ using \c install_name_tool.
+
+ Now you should be able to move the application to another Mac OS X
+ machine and run it without Qt installed. Alternatively, you can
+ move your frameworks that live outside of the bundle to another
+ directory and see if the application still runs.
+
+ If you store the frameworks in another location than in the
+ bundle, the technique of linking your application is similar; you
+ must make sure that the application and the frameworks agree where
+ to be looking for the Qt libraries as well as the plugins.
+
+ \section2 Creating the Application Package
+
+ When you are done linking your application to Qt, either
+ statically or as frameworks, the application is ready to be
+ distributed. Apple provides a fair bit of information about how to
+ do this and instead of repeating it here, we recommend that you
+ consult their \l
+ {http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html}{software delivery}
+ documentation.
+
+ Although the process of deploying an application do have some
+ pitfalls, once you know the various issues you can easily create
+ packages that all your Mac OS X users will enjoy.
+
+ \section1 Application Dependencies
+
+ \section2 Qt Plugins
+
+ Your application may also depend on one or more Qt plugins, such
+ as the JPEG image format plugin or a SQL driver plugin. Be sure
+ to distribute any Qt plugins that you need with your application,
+ and note that each type of plugin should be located within a
+ specific subdirectory (such as \c imageformats or \c sqldrivers)
+ within your distribution directory, as described below.
+
+ \note If you are deploying an application that uses QtWebKit to display
+ HTML pages from the World Wide Web, you should include all text codec
+ plugins to support as many HTML encodings possible.
+
+ The search path for Qt plugins (as well as a few other paths) is
+ hard-coded into the QtCore library. By default, the first plugin
+ search path will be hard-coded as \c /path/to/Qt/plugins. But
+ using pre-determined paths has certain disadvantages. For example,
+ they may not exist on the target machine. For that reason you need
+ to examine various alternatives to make sure that the Qt plugins
+ are found:
+
+ \list
+
+ \o \l{qt-conf.html}{Using \c qt.conf}. This is the recommended
+ approach since it provides the most flexibility.
+
+ \o Using QApplication::addLibraryPath() or
+ QApplication::setLibraryPaths().
+
+ \o Using a third party installation utility to change the
+ hard-coded paths in the QtCore library.
+
+ \endlist
+
+ The \l{How to Create Qt Plugins} document outlines the issues you
+ need to pay attention to when building and deploying plugins for
+ Qt applications.
+
+ \section2 Additional Libraries
+
+ You can check which libraries your application is linking against
+ by using the \c otool tool. To use \c otool, all you need to do is
+ to run it like this:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 50
+
+ Unlike the deployment processes on \l {Deploying an Application on
+ X11 Platforms}{X11} and \l {Deploying an Application on
+ Windows}{Windows}, compiler specific libraries rarely have to
+ be redistributed along with your application. But since Qt can be
+ configured, built, and installed in several ways on Mac OS X,
+ there are also several ways to deploy applications. Typically your
+ goals help determine how you are going to deploy the
+ application. The last sections describe a couple of things to keep
+ in mind when you are deploying your application.
+
+ \section2 Mac OS X Version Dependencies
+
+ Qt 4.2 has been designed to be built and deployed on Mac OS X 10.3
+ up until the current version as of this writing, Mac OS X 10.4 and
+ all their minor releases. Qt achieves this by using "weak
+ linking." This means that Qt tests if a function added in newer
+ versions of Mac OS X is available on the computer it is running on
+ before it uses it. This results in getting access to newer
+ features when running on newer versions of OS X while still
+ remaining compatible on older versions.
+
+ For more information about cross development issues on Mac OS X,
+ see \l
+ {http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/index.html}{Apple's Developer Website}.
+
+ Since the linker is set to be compatible with all OS X version, you have to
+ change the \c MACOSX_DEPLOYMENT_TARGET environment variable to get weak
+ linking to work for your application. You can add:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51
+
+ to your .pro file and qmake will take care of this for you.
+
+ However, there is a bit of a wrinkle to keep in mind when your are
+ deploying. Mac OS X 10.4 ("Tiger") ships GCC 4.0 as its default
+ compiler. This is also the GCC compiler we use for building the
+ binary Qt package. If you use GCC 4.0 to build your application,
+ it will link against a dynamic libstdc++ that is only available on
+ Mac OS X 10.4 and Mac OS X 10.3.9. The application will refuse to
+ run on older versions of the operating system.
+
+ For more information about C++ runtime environment, see \l
+ {http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/index.html}{Apple's Developer Website}
+
+ If you want to deploy to versions of Mac OS X earlier than 10.3.9,
+ you must build with GCC 3.3 which is the default on Mac OS X
+ 10.3. GCC 3.3 is also available on the Mac OS X 10.4 "Xcode Tools"
+ CD and as a download for earlier versions of Mac OS X from Apple
+ (\l {https://connect.apple.com/}{connect.apple.com}). You can use
+ Apple's \c gcc_select(1) command line tool to switch the default
+ complier on your system.
+
+ \section3 Deploying Phonon Applications on Mac OS X
+
+ \list
+ \o If you build your Phonon application on Tiger, it will work on
+ Tiger, Leopard and Panther.
+ \o If you build your application on Leopard, it will \bold not work
+ on Panther unless you rename the libraries with the following command
+ after you have built your application:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51a
+
+ This command must be invoked in the directory where
+ \c{libphonon_qt7.dylib} is located, usually in
+ \c{yourapp.app/Contents/plugins/phonon_backend/}.
+ \o The \l {macdeploy}{deployment tool} will perform this step for you.
+
+ \o If you are using Leopard, but would like to build your application
+ against Tiger, you can use:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51b
+ \endlist
+
+ \section2 Architecture Dependencies
+
+ The Qt for Mac OS X libraries, tools, and examples can be built "universal"
+ (i.e. they run natively on both Intel and PowerPC machines). This
+ is accomplished by passing \c -universal on the \c configure line
+ of the source package, and requires that you use GCC 4.0.x. On
+ PowerPC hardware you will need to pass the universal SDK as a
+ command line argument to the Qt configure command. For example:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 52
+
+ From 4.1.1 the Qt binary package is already universal.
+
+ If you want to create a binary that runs on older versions of
+ PowerPC and x86, it is possible to build Qt for the PowerPC using
+ GCC 3.3, and for x86 one using GCC 4.0, and use Apple's \c lipo(1)
+ tool to stitch them together. This is beyond the scope of this
+ document and is not something we have tried, but Apple documents
+ it on their \l
+ {http://developer.apple.com/documentation/}{developer website}.
+
+ Once you have a universal Qt, \a qmake will generate makefiles
+ that will build for its host architecture by default. If you want
+ to build for a specific architecture, you can control this with
+ the \c CONFIG line in your \c .pro file. Use \c CONFIG+=ppc for
+ PowerPC, and \c CONFIG+=x86 for x86. If you desire both, simply
+ add both to the \c CONFIG line. PowerPC users also need an
+ SDK. For example:
+
+ \snippet doc/src/snippets/code/doc_src_deployment.qdoc 53
+
+ Besides \c lipo, you can also check your binaries with the \c file(1)
+ command line tool or the Finder.
+
+ \section1 The Mac Deployment Tool
+ \target macdeploy
+ The Mac deployment tool can be found in QTDIR/bin/macdeployqt. It is
+ designed to automate the process of creating a deployable
+ application bundle that contains the Qt libraries as private
+ frameworks.
+
+ The mac deployment tool also deploys the Qt plugins, according
+ to the following rules:
+ \list
+ \o Debug versions of the plugins are not deployed.
+ \o The designer plugins are not deployed.
+ \o The Image format plugins are always deployed.
+ \o SQL driver plugins are deployed if the application uses the QtSql module.
+ \o Script plugins are deployed if the application uses the QtScript module.
+ \o The Phonon backend plugin is deployed if the application uses the \l{Phonon Module} {Phonon} module.
+ \o The svg icon plugin is deployed if the application uses the QtSvg module.
+ \o The accessibility plugin is always deployed.
+ \o Accessibility for Qt3Support is deployed if the application uses the Qt3Support module.
+ \endlist
+
+ macdeployqt supports the following options:
+ \list
+ \o -no-plugins: Skip plugin deployment
+ \o -dmg : Create a .dmg disk image
+ \o -no-strip : Don't run 'strip' on the binaries
+ \endlist
+*/
diff --git a/doc/src/designer-manual.qdoc b/doc/src/designer-manual.qdoc
new file mode 100644
index 0000000..083d782
--- /dev/null
+++ b/doc/src/designer-manual.qdoc
@@ -0,0 +1,2856 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page designer-manual.html
+
+ \title Qt Designer Manual
+ \ingroup qttools
+ \keyword Qt Designer
+
+ \QD is Qt Software's tool for designing and building graphical user
+ interfaces (GUIs) from Qt components. You can compose and customize your
+ widgets or dialogs in a what-you-see-is-what-you-get (WYSIWYG) manner, and
+ test them using different styles and resolutions.
+
+ Widgets and forms created with \QD integrated seamlessly with programmed
+ code, using Qt's signals and slots mechanism, that lets you easily assign
+ behavior to graphical elements. All properties set in \QD can be changed
+ dynamically within the code. Furthermore, features like widget promotion
+ and custom plugins allow you to use your own components with \QD.
+
+ If you are new to \QD, you can take a look at the
+ \l{Getting To Know Qt Designer} document.
+
+ Qt Designer 4.5 boasts a long list of improvements. For a detailed list of
+ what is new, refer \l{What's New in Qt Designer 4.5}.
+
+ \image designer-multiple-screenshot.png
+
+ For more information on using \QD, you can take a look at the following
+ links:
+
+ \list
+ \o \l{Qt Designer's Editing Modes}
+ \list
+ \o \l{Qt Designer's Widget Editing Mode}{Widget Editing Mode}
+ \o \l{Qt Designer's Signals and Slots Editing Mode}
+ {Signals and Slots Editing Mode}
+ \o \l{Qt Designer's Buddy Editing Mode}
+ {Buddy Editing Mode}
+ \o \l{Qt Designer's Tab Order Editing Mode}
+ {Tab Order Editing Mode}
+ \endlist
+ \o \l{Using Layouts in Qt Designer}
+ \o \l{Saving, Previewing and Printing Forms in Qt Designer}
+ \o \l{Using Containers in Qt Designer}
+ \o \l{Creating Main Windows in Qt Designer}
+ \o \l{Editing Resources with Qt Designer}
+ \o \l{Using Stylesheets with Qt Designer}
+ \o \l{Using a Designer .ui File in Your Application}
+ \endlist
+
+ For advanced usage of \QD, you can refer to these links:
+
+ \list
+ \o \l{Customizing Qt Designer Forms}
+ \o \l{Using Custom Widgets with Qt Designer}
+ \o \l{Creating Custom Widgets for Qt Designer}
+ \o \l{Creating Custom Widget Extensions}
+ \o \l{Qt Designer's UI File Format}
+ \endlist
+
+
+ \section1 Legal Notices
+
+ Some source code in \QD is licensed under specific highly permissive
+ licenses from the original authors. Trolltech gratefully acknowledges
+ these contributions to \QD and all uses of \QD should also acknowledge
+ these contributions and quote the following license statements in an
+ appendix to the documentation.
+
+ \list
+ \i \l{Implementation of the Recursive Shadow Casting Algorithm in Qt Designer}
+ \endlist
+*/
+
+
+
+/*!
+ \page designer-whats-new.html
+ \contentspage {Qt Designer Manual}{Contents}
+
+
+ \title What's New in Qt Designer 4.5
+
+ \section1 General Changes
+
+
+ \table
+ \header
+ \i Widget Filter Box
+ \i Widget Morphing
+ \i Disambiguation Field
+ \row
+ \i \inlineimage designer-widget-filter.png
+ \i \inlineimage designer-widget-morph.png
+ \i \inlineimage designer-disambiguation.png
+ \endtable
+
+ \list 1
+ \i Displaying only icons in the \gui{Widget Box}: It is now possible
+ for the \gui{Widget Box} to display icons only. Simply select
+ \gui{Icon View} from the context menu.
+ \i Filter for \gui{Widget Box}: A filter is now provided to quickly
+ locate the widget you need. If you use a particular widget
+ frequently, you can always add it to the
+ \l{Getting to Know Qt Designer#WidgetBox}{scratch pad}.
+ \i Support for QButtonGroup: It is available via the context
+ menu of a selection of QAbstractButton objects.
+ \i Improved support for item widgets: The item widgets' (e.g.,
+ QListWidget, QTableWidget, and QTreeWidget) contents dialogs have
+ been improved. You can now add translation comments and also modify
+ the header properties.
+ \i Widget morphing: A widget can now be morphed from one type to
+ another with its layout and properties preserved. To begin, click
+ on your widget and select \gui{Morph into} from the context menu.
+ \i Disambiguation field: The property editor now shows this extra
+ field under the \gui{accessibleDescription} property. This field
+ has been introduced to aid translators in the case of two source
+ texts being the same but used for different purposes. For example,
+ a dialog could have two \gui{Add} buttons for two different
+ reasons. \note To maintain compatibility, comments in \c{.ui} files
+ created prior to Qt 4.5 will be listed in the \gui{Disambiguation}
+ field.
+ \endlist
+
+
+
+ \section1 Improved Shortcuts for the Editing Mode
+
+ \list
+ \i The \key{Shift+Click} key combination now selects the ancestor for
+ nested layouts. This iterates from one ancestor to the other.
+
+ \i The \key{Ctrl} key is now used to toggle and copy drag. Previously
+ this was done with the \key{Shift} key but is now changed to
+ conform to standards.
+
+ \i The left mouse button does rubber band selection for form windows;
+ the middle mouse button does rubber band selection everywhere.
+ \endlist
+
+
+ \section1 Layouts
+ \list
+ \i It is now possible to switch a widget's layout without breaking it
+ first. Simply select the existing layout and change it to another
+ type using the context menu or the layout buttons on the toolbar.
+
+ \i To quickly populate a \gui{Form Layout}, you can now use the
+ \gui{Add form layout row...} item available in the context menu or
+ double-click on the red layout.
+ \endlist
+
+
+ \section1 Support for Embedded Design
+
+ \table
+ \header
+ \i Comboboxes to Select a Device Profile
+ \row
+ \i \inlineimage designer-embedded-preview.png
+ \endtable
+
+ It is now possible to specify embedded device profiles, e.g., Style, Font,
+ Screen DPI, resolution, default font, etc., in \gui{Preferences}. These
+ settings will affect the \gui{Form Editor}. The profiles will also be
+ visible with \gui{Preview}.
+
+
+ \section1 Related Classes
+
+ \list
+ \i QUiLoader \mdash forms loaded with this class will now react to
+ QEvent::LanguageChange if QUiLoader::setLanguageChangeEnabled() or
+ QUiLoader::isLanguageChangeEnabled() is set to true.
+
+ \i QDesignerCustomWidgetInterface \mdash the
+ \l{QDesignerCustomWidgetInterface::}{domXml()} function now has new
+ attributes for its \c{<ui>} element. These attributes are
+ \c{language} and \c{displayname}. The \c{language} element can be
+ one of the following "", "c++", "jambi". If this element is
+ specified, it must match the language in which Designer is running.
+ Otherwise, this element will not be available. The \c{displayname}
+ element represents the name that will be displayed in the
+ \gui{Widget Box}. Previously this was hardcoded to be the class
+ name.
+
+ \i QWizard \mdash QWizard's page now has a string \c{id} attribute that
+ can be used to fill in enumeration values to be used by the
+ \c{uic}. However, this attribute has no effect on QUiLoader.
+ \endlist
+*/
+
+
+/*!
+ \page designer-to-know.html
+ \contentspage {Qt Designer Manual}{Contents}
+
+ \title Getting to Know Qt Designer
+
+ \tableofcontents
+
+ \image designer-screenshot.png
+
+ \section1 Launching Designer
+
+ The way that you launch \QD depends on your platform:
+
+ \list
+ \i On Windows, click the Start button, under the \gui Programs submenu,
+ open the \gui{Qt 4} submenu and click \gui Designer.
+ \i On Unix or Linux, you might find a \QD icon on the desktop
+ background or in the desktop start menu under the \gui Programming
+ or \gui Development submenus. You can launch \QD from this icon.
+ Alternatively, you can type \c{designer} in a terminal window.
+ \i On Mac OS X, double click on \QD in \gui Finder.
+ \endlist
+
+ \section1 The User Interface
+
+ When used as a standalone application, \QD's user interface can be
+ configured to provide either a multi-window user interface (the default
+ mode), or it can be used in docked window mode. When used from within an
+ integrated development environment (IDE) only the multi-window user
+ interface is available. You can switch modes in the \gui Preferences dialog
+ from the \gui Edit menu.
+
+ In multi-window mode, you can arrange each of the tool windows to suit your
+ working style. The main window consists of a menu bar, a tool bar, and a
+ widget box that contains the widgets you can use to create your user
+ interface.
+
+ \target MainWindow
+ \table
+ \row
+ \i \inlineimage designer-main-window.png
+ \i \bold{Qt Designer's Main Window}
+
+ The menu bar provides all the standard actions for managing forms,
+ using the clipboard, and accessing application-specific help.
+ The current editing mode, the tool windows, and the forms in use can
+ also be accessed via the menu bar.
+
+ The tool bar displays common actions that are used when editing a form.
+ These are also available via the main menu.
+
+ The widget box provides common widgets and layouts that are used to
+ design components. These are grouped into categories that reflect their
+ uses or features.
+ \endtable
+
+ Most features of \QD are accessible via the menu bar, the tool bar, or the
+ widget box. Some features are also available through context menus that can
+ be opened over the form windows. On most platforms, the right mouse is used
+ to open context menus.
+
+ \target WidgetBox
+ \table
+ \row
+ \i \inlineimage designer-widget-box.png
+ \i \bold{Qt Designer's Widget Box}
+
+ The widget box provides a selection of standard Qt widgets, layouts,
+ and other objects that can be used to create user interfaces on forms.
+ Each of the categories in the widget box contain widgets with similar
+ uses or related features.
+
+ \note Since Qt 4.4, new widgets have been included, e.g.,
+ QPlainTextEdit, QCommandLinkButton, QScrollArea, QMdiArea, and
+ QWebView.
+
+ You can display all of the available objects in a category by clicking
+ on the handle next to the category label. When in
+ \l{Qt Designer's Widget Editing Mode}{Widget Editing
+ Mode}, you can add objects to a form by dragging the appropriate items
+ from the widget box onto the form, and dropping them in the required
+ locations.
+
+ \QD provides a scratch pad feature that allows you to collect
+ frequently used objects in a separate category. The scratch pad
+ category can be filled with any widget currently displayed in a form
+ by dragging them from the form and dropping them onto the widget box.
+ These widgets can be used in the same way as any other widgets, but
+ they can also contain child widgets. Open a context menu over a widget
+ to change its name or remove it from the scratch pad.
+ \endtable
+
+
+ \section1 The Concept of Layouts in Qt
+
+ A layout is used to arrange and manage the elements that make up a user
+ interface. Qt provides a number of classes to automatically handle layouts
+ -- QHBoxLayout, QVBoxLayout, QGridLayout, and QFormLayout. These classes
+ solve the challenge of laying out widgets automatically, providing a user
+ interface that behaves predictably. Fortunately knowledge of the layout
+ classes is not required to arrange widgets with \QD. Instead, select one of
+ the \gui{Lay Out Horizontally}, \gui{Lay Out in a Grid}, etc., options from
+ the context menu.
+
+ Each Qt widget has a recommended size, known as \l{QWidget::}{sizeHint()}.
+ The layout manager will attempt to resize a widget to meet its size hint.
+ In some cases, there is no need to have a different size. For example, the
+ height of a QLineEdit is always a fixed value, depending on font size and
+ style. In other cases, you may require the size to change, e.g., the width
+ of a QLineEdit or the width and height of item view widgets. This is where
+ the widget size constraints -- \l{QWidget::minimumSize()}{minimumSize} and
+ \l{QWidget::maximumSize()}{maximumSize} constraints come into play. These
+ are properties you can set in the property editor. Alternatively, to use
+ the current size as a size constraint value, choose one of the
+ \gui{Size Constraint} options from the widget's context menu. The layout
+ will then ensure that those constraints are met.
+
+ The screenshot below shows the breakdown of a basic user interface designed
+ using a grid. The coordinates on the screenshot show the position of each
+ widget within the grid.
+
+ \image addressbook-tutorial-part3-labeled-layout.png
+
+ \note Inside the grid, the QPushButton objects are actually nested. The
+ buttons on the right are first placed in a QVBoxLayout; the buttons at the
+ bottom are first placed in a QHBoxLayout. Finally, they are put into
+ coordinates (1,2) and (3,1) of the QGridLayout.
+
+ To visualize, imagine the layout as a box that shrinks as much as possible,
+ attempting to \e squeeze your widgets in a neat arrangement, and, at the
+ same time, maximize the use of available space.
+
+ Qt's layouts help when you:
+
+ \list 1
+ \i Resize the user face to fit different window sizes.
+ \i Resize elements within the user interface to suit different
+ localizations.
+ \i Arrange elements to adhere to layout guidelines for different
+ platforms.
+ \endlist
+
+ So, you no longer have to worry about rearranging widgets for different
+ platforms, settings, and languages.
+
+ The example below shows how different localizations can affect the user
+ interface. When a localization requires more space for longer text strings
+ the Qt layout automatically scales to accommodate this, while ensuring that
+ the user interface looks presentable and still matches the platform
+ guidelines.
+
+ \table
+ \header
+ \i A Dialog in English
+ \i A Dialog in French
+ \row
+ \i \image designer-english-dialog.png
+ \i \image designer-french-dialog.png
+ \endtable
+
+ The process of laying out widgets consists of creating the layout hierarchy
+ while setting as few widget size constraints as possible.
+
+ For a more technical perspective on Qt's layout classes, refer to the
+ \l{Layout Classes} document.
+*/
+
+
+/*!
+ \page designer-quick-start.html
+ \contentspage {Qt Designer Manual}{Contents}
+
+ \title A Quick Start to Qt Designer
+
+ Using \QD involves \bold four basic steps:
+
+ \list 1
+ \o Choose your form and objects
+ \o Lay the objects out on the form
+ \o Connect the signals to the slots
+ \o Preview the form
+ \endlist
+
+ \omit
+ \image rgbController-screenshot.png
+ \endomit
+
+ Suppose you would like to design a small widget (see screenshot above)
+ that contains the controls needed to manipulate Red, Green and Blue (RGB)
+ values -- a type of widget that can be seen everywhere in image
+ manipulation programs.
+
+ \table
+ \row
+ \i \inlineimage designer-choosing-form.png
+ \i \bold{Choosing a Form}
+
+ You start by choosing \gui Widget from the \gui{New Form} dialog.
+ \endtable
+
+ Then you drag three labels, three spin boxes and three vertical sliders
+ on to your form. You can roughly arrange them according to how you would
+ like them to be laid out.
+
+ \omit
+ \table
+ \row \o \inlineimage rgbController-widgetBox.png
+ \o \inlineimage rgbController-arrangement.png
+ \endtable
+ \endomit
+
+ To ensure that they are laid out exactly like this in your program, you
+ need to place these widgets into a layout. We will do this in groups of
+ three. Select the "RED" label. Then, hold down \key Shift while you select
+ its corresponding spin box and slider. In the \gui{Form} menu, select
+ \gui{Lay Out in a Grid}.
+
+ \omit
+ \table
+ \row
+ \i \inlineimage rgbController-form-gridLayout.png
+ \i \inlineimage rgbController-selectForLayout.png
+ \endtable
+ \endomit
+
+
+ Repeat the step for the other two labels along with their corresponding
+ spin boxes and sliders as well. Your form will now look similar to the
+ screenshot below.
+
+ \omit
+ \image rgbController-almostLaidOut.png
+ \endomit
+
+ The next step is to combine all three layouts into one \bold{main layout}.
+ It is important that your form has a main layout; otherwise, the widgets
+ on your form will not resize when your form is resized. To set the main
+ layout, \gui{Right click} anywhere on your form, outside of the three
+ separate layouts, and select \gui{Lay Out Horizontally}. Alternatively, you
+ could also select \gui{Lay Out in a Grid} -- you will still see the same
+ arrangement.
+
+ \note Main layouts cannot be seen on the form. To check if you have a main
+ layout installed, try resizing your form; your widgets should resize
+ accordingly.
+
+ When you click on the slider and drag it to a certain value, you want the
+ spin box to display the slider's position. To do this, you need to connect
+ the slider's \l{QAbstractSlider::}{valueChanged()} signal to the spin box's
+ \l{QSpinBox::}{setValue()} slot. You also need to make the reverse
+ connections, e.g., connect the spin box's \l{QSpinBox::}{valueChanged()}
+ signal to the slider's \l{QAbstractSlider::value()}{setValue()} slot.
+
+ To do this, you have to switch to \gui{Edit Signals/Slots} mode, either by
+ pressing \key{F4} or something \gui{Edit Signals/Slots} from the \gui{Edit}
+ menu.
+
+ \omit
+ \table
+ \row
+ \i \inlineimage rgbController-signalsAndSlots.png
+ \i \bold{Connecting Signals to Slots}
+
+ Click on the slider and drag the cursor towards the spin box. The
+ \gui{Configure Connection} dialog, shown below, will pop up. Select the
+ correct signal and slot and click \gui OK.
+ \endtable
+ \endomit
+
+ \omit
+ \image rgbController-configureConnection.png
+ \endomit
+
+ Repeat the step (in reverse order), clicking on the spin box and dragging
+ the cursor towards the slider, to connect the spin box's
+ \l{QSpinBox::}{valueChanged()} signal to the slider's
+ \l{QAbstractSlider::value()}{setValue()} slot.
+
+ Now that you have successfully connected the objects for the "RED"
+ component of the RGB Controller, do the same for the "GREEN" and "BLUE"
+ components as well.
+
+ Since RGB values range between 0 and 255, we need to limit the spin box
+ and slider to that particular range.
+
+ \omit
+ \table
+ \row
+ \i \inlineimage rgbController-property-editing.png
+ \i \bold{Setting Widget Properties}
+
+ Click on the first spin box. Within the \gui{Property Editor}, you will
+ see \l{QSpinBox}'s properties. Enter "255" for the
+ \l{QSpinBox::}{maximum} property. Then, click on the first vertical
+ slider, you will see \l{QAbstractSlider}'s properties. Enter "255" for
+ the \l{QAbstractSlider::}{maximum} property as well. Repeat this
+ process for the remaining spin boxes and sliders.
+ \endtable
+ \endomit
+
+ Now, we preview your form to see how it would look in your application. To
+ preview your form, press \key{Ctrl + R} or select \gui Preview from the
+ \gui Form menu.
+
+ \omit
+ \image rgbController-preview.png
+ \endomit
+
+ Try dragging the slider - the spin box will mirror its value too (and vice
+ versa). Also, you can resize it to see how the layouts used to manage the
+ child widgets respond to different window sizes.
+*/
+
+
+/*!
+ \page designer-editing-mode.html
+ \previouspage Getting to Know Qt Designer
+ \contentspage {Qt Designer Manual}{Contents}
+ \nextpage Using Layouts in Qt Designer
+
+ \title Qt Designer's Editing Modes
+
+ \QD provides four editing modes: \l{Qt Designer's Widget Editing Mode}
+ {Widget Editing Mode}, \l{Qt Designer's Signals and Slots Editing Mode}
+ {Signals and Slots Editing Mode}, \l{Qt Designer's Buddy Editing Mode}
+ {Buddy Editing Mode} and \l{Qt Designer's Tab Order Editing Mode}
+ {Tab Order Editing Mode}. When working with \QD, you will always be in one
+ of these four modes. To switch between modes, simply select it from the
+ \gui{Edit} menu or the toolbar. The table below describes these modes in
+ further detail.
+
+ \table
+ \header \i \i \bold{Editing Modes}
+ \row
+ \i \inlineimage designer-widget-tool.png
+ \i In \l{Qt Designer's Widget Editing Mode}{Edit} mode, we can
+ change the appearance of the form, add layouts, and edit the
+ properties of each widget. To switch to this mode, press
+ \key{F3}. This is \QD's default mode.
+
+ \row
+ \i \inlineimage designer-connection-tool.png
+ \i In \l{Qt Designer's Signals and Slots Editing Mode}
+ {Signals and Slots} mode, we can connect widgets together using
+ Qt's signals and slots mechanism. To switch to this mode, press
+ \key{F4}.
+
+ \row
+ \i \inlineimage designer-buddy-tool.png
+ \i In \l{Qt Designer's Buddy Editing Mode}{Buddy Editing Mode},
+ buddy widgets can be assigned to label widgets to help them
+ handle keyboard focus correctly.
+
+ \row
+ \i \inlineimage designer-tab-order-tool.png
+ \i In \l{Qt Designer's Tab Order Editing Mode}
+ {Tab Order Editing Mode}, we can set the order in which widgets
+ receive the keyboard focus.
+ \endtable
+
+*/
+
+
+/*!
+ \page designer-widget-mode.html
+ \previouspage Qt Designer's Editing Modes
+ \contentspage {Qt Designer Manual}{Contents}
+ \nextpage Qt Designer's Signals and Slots Editing Mode
+
+ \title Qt Designer's Widget Editing Mode
+
+ \image designer-editing-mode.png
+
+ In the Widget Editing Mode, objects can be dragged from the main window's
+ widget box to a form, edited, resized, dragged around on the form, and even
+ dragged between forms. Object properties can be modified interactively, so
+ that changes can be seen immediately. The editing interface is intuitive
+ for simple operations, yet it still supports Qt's powerful layout
+ facilities.
+
+
+ \tableofcontents
+
+ To create and edit new forms, open the \gui File menu and select
+ \gui{New Form...} or press \key{Ctrl+N}. Existing forms can also be edited
+ by selecting \gui{Open Form...} from the \gui File menu or pressing
+ \key{Ctrl+O}.
+
+ At any point, you can save your form by selecting the \gui{Save From As...}
+ option from the \gui File menu. The \c{.ui} files saved by \QD contain
+ information about the objects used, and any details of signal and slot
+ connections between them.
+
+
+ \section1 Editing A Form
+
+ By default, new forms are opened in widget editing mode. To switch to Edit
+ mode from another mode, select \gui{Edit Widgets} from the \gui Edit menu
+ or press the \key F3 key.
+
+ Objects are added to the form by dragging them from the main widget box
+ and dropping them in the desired location on the form. Once there, they
+ can be moved around simply by dragging them, or using the cursor keys.
+ Pressing the \key Ctrl key at the same time moves the selected widget
+ pixel by pixel, while using the cursor keys alone make the selected widget
+ snap to the grid when it is moved. Objects can be selected by clicking on
+ them with the left mouse button. You can also use the \key Tab key to
+ change the selection.
+
+ ### Screenshot of widget box, again
+
+ The widget box contains objects in a number of different categories, all of
+ which can be placed on the form as required. The only objects that require
+ a little more preparation are the \gui Container widgets. These are
+ described in further detail in the \l{Using Containers in Qt Designer}
+ chapter.
+
+
+ \target SelectingObjects
+ \table
+ \row
+ \i \inlineimage designer-selecting-widget.png
+ \i \bold{Selecting Objects}
+
+ Objects on the form are selected by clicking on them with the left
+ mouse button. When an object is selected, resize handles are shown at
+ each corner and the midpoint of each side, indicating that it can be
+ resized.
+
+ To select additional objects, hold down the \key Shift key and click on
+ them. If more than one object is selected, the current object will be
+ displayed with resize handles of a different color.
+
+ To move a widget within a layout, hold down \key Shift and \key Control
+ while dragging the widget. This extends the selection to the widget's
+ parent layout.
+
+ Alternatively, objects can be selected in the
+ \l{The Object Inspector}{Object Inspector}.
+ \endtable
+
+ When a widget is selected, normal clipboard operations such as cut, copy,
+ and paste can be performed on it. All of these operations can be done and
+ undone, as necessary.
+
+ The following shortcuts can be used:
+
+ \target ShortcutsForEditing
+ \table
+ \header \i Action \i Shortcut \i Description
+ \row
+ \i Cut
+ \i \key{Ctrl+X}
+ \i Cuts the selected objects to the clipboard.
+ \row
+ \i Copy
+ \i \key{Ctrl+C}
+ \i Copies the selected objects to the clipboard.
+ \row
+ \i Paste
+ \i \key{Ctrl+V}
+ \i Pastes the objects in the clipboard onto the form.
+ \row
+ \i Delete
+ \i \key Delete
+ \i Deletes the selected objects.
+ \row
+ \i Clone object
+ \i \key{Ctrl+drag} (leftmouse button)
+ \i Makes a copy of the selected object or group of objects.
+ \row
+ \i Preview
+ \i \key{Ctrl+R}
+ \i Shows a preview of the form.
+ \endtable
+
+ All of the above actions (apart from cloning) can be accessed via both the
+ \gui Edit menu and the form's context menu. These menus also provide
+ funcitons for laying out objects as well as a \gui{Select All} function to
+ select all the objects on the form.
+
+ Widgets are not unique objects; you can make as many copies of them as you
+ need. To quickly duplicate a widget, you can clone it by holding down the
+ \key Ctrl key and dragging it. This allows widgets to be copied and placed
+ on the form more quickly than with clipboard operations.
+
+
+ \target DragAndDrop
+ \table
+ \row
+ \i \inlineimage designer-dragging-onto-form.png
+ \i \bold{Drag and Drop}
+
+ \QD makes extensive use of the drag and drop facilities provided by Qt.
+ Widgets can be dragged from the widget box and dropped onto the form.
+
+ Widgets can also be "cloned" on the form: Holding down \key Ctrl and
+ dragging the widget creates a copy of the widget that can be dragged to
+ a new position.
+
+ It is also possible to drop Widgets onto the \l {The Object Inspector}
+ {Object Inspector} to handle nested layouts easily.
+ \endtable
+
+ \QD allows selections of objects to be copied, pasted, and dragged between
+ forms. You can use this feature to create more than one copy of the same
+ form, and experiment with different layouts in each of them.
+
+
+ \section2 The Property Editor
+
+ The Property Editor always displays properties of the currently selected
+ object on the form. The available properties depend on the object being
+ edited, but all of the widgets provided have common properties such as
+ \l{QObject::}{objectName}, the object's internal name, and
+ \l{QWidget::}{enabled}, the property that determines whether an
+ object can be interacted with or not.
+
+
+ \target EditingProperties
+ \table
+ \row
+ \i \inlineimage designer-property-editor.png
+ \i \bold{Editing Properties}
+
+ The property editor uses standard Qt input widgets to manage the
+ properties of jbects on the form. Textual properties are shown in line
+ edits, integer properties are displayed in spinboxes, boolean
+ properties are displayed in check boxes, and compound properties such
+ as colors and sizes are presented in drop-down lists of input widgets.
+
+ Modified properties are indicated with bold labels. To reset them, click
+ the arrow button on the right.
+
+ Changes in properties are applied to all selected objects that have the
+ same property.
+ \endtable
+
+ Certain properties are treated specially by the property editor:
+
+ \list
+ \o Compound properties -- properties that are made up of more than one
+ value -- are represented as nodes that can be expanded, allowing
+ their values to be edited.
+ \o Properties that contain a choice or selection of flags are edited
+ via combo boxes with checkable items.
+ \o Properties that allow access to rich data types, such as QPalette,
+ are modified using dialogs that open when the properties are edited.
+ QLabel and the widgets in the \gui Buttons section of the widget box
+ have a \c text property that can also be edited by double-clicking
+ on the widget or by pressing \gui F2. \QD interprets the backslash
+ (\\) character specially, enabling newline (\\n) characters to be
+ inserted into the text; the \\\\ character sequence is used to
+ insert a single backslash into the text. A context menu can also be
+ opened while editing, providing another way to insert special
+ characters and newlines into the text.
+ \endlist
+
+
+ \section2 Dynamic Properties
+
+ The property editor can also be used to add new
+ \l{QObject#Dynamic Properties}{dynamic properties} to both standard Qt
+ widgets and to forms themselves. Since Qt 4.4, dynamic properties are added
+ and removed via the property editor's toolbar, shown below.
+
+ \image designer-property-editor-toolbar.png
+
+ To add a dynamic property, clcik on the \gui Add button
+ \inlineimage designer-property-editor-add-dynamic.png
+ . To remove it, click on the \gui Remove button
+ \inlineimage designer-property-editor-remove-dynamic.png
+ instead. You can also sort the properties alphabetically and change the
+ color groups by clickinig on the \gui Configure button
+ \inlineimage designer-property-editor-configure.png
+ .
+
+ \section2 The Object Inspector
+ \table
+ \row
+ \i \inlineimage designer-object-inspector.png
+ \i \bold{The Object Inspector}
+
+ The \gui{Object Inspector} displays a hierarchical list of all the
+ objects on the form that is currently being edited. To show the child
+ objects of a container widget or a layout, click the handle next to the
+ object label.
+
+ Each object on a form can be selected by clicking on the corresponding
+ item in the \gui{Object Inspector}. Right-clicking opens the form's
+ context menu. These features can be useful if you have many overlapping
+ objects. To locate an object in the \gui{Object Inspector}, use
+ \key{Ctrl+F}.
+
+ Since Qt 4.4, double-clicking on the object's name allows you to change
+ the object's name with the in-place editor.
+
+ Since Qt 4.5, the \gui{Object Inspector} displays the layout state of
+ the containers. The broken layout icon ###ICON is displayed if there is
+ something wrong with the layouts.
+
+ \endtable
+*/
+
+
+/*!
+ \page designer-layouts.html
+ \previouspage Qt Designer's Widget Editing Mode
+ \contentspage
+ \nextpage Qt Designer's Signals and Slots Editing Mode
+
+ \title Using Layouts in Qt Designer
+
+ Before a form can be used, the objects on the form need to be placed into
+ layouts. This ensures that the objects will be displayed properly when the
+ form is previewed or used in an application. Placing objects in a layout
+ also ensures that they will be resized correctly when the form is resized.
+
+
+ \tableofcontents
+
+ \section1 Applying and Breaking Layouts
+
+ The simplest way to manage objects is to apply a layout to a group of
+ existing objects. This is achieved by selecting the objects that you need
+ to manage and applying one of the standard layouts using the main toolbar,
+ the \gui Form menu, or the form's context menu.
+
+ Once widgets have been inserted into a layout, it is not possible to move
+ and resize them individually because the layout itself controls the
+ geometry of each widget within it, taking account of the hints provided by
+ spacers. Instead, you must either break the layout and adjust each object's
+ geometry manually, or you can influence the widget's geometry by resizing
+ the layout.
+
+ To break the layout, press \key{Ctrl+0} or choose \gui{Break Layout} from
+ the form's context menu, the \gui Form menu or the main toolbar. You can
+ also add and remove spacers from the layout to influence the geometries of
+ the widgets.
+
+
+ \target InsertingObjectsIntoALayout
+ \table
+ \row
+ \i \inlineimage designer-layout-inserting.png
+ \i \bold{Inserting Objects into a Layout}
+
+ Objects can be inserted into an existing layout by dragging them from
+ their current positions and dropping them at the required location. A
+ blue cursor is displayed in the layout as an object is dragged over
+ it to indicate where the object will be added.
+ \endtable
+
+
+ \section2 Setting A Top Level Layout
+
+ The form's top level layout can be set by clearing the slection (click the
+ left mouse button on the form itself) and applying a layout. A top level
+ layout is necessary to ensure that your widgets will resize correctly when
+ its window is resized. To check if you have set a top level layout, preview
+ your widget and attempt to resize the window by dragging the size grip.
+
+ \table
+ \row
+ \i \inlineimage designer-set-layout.png
+ \i \bold{Applying a Layout}
+
+ To apply a layout, you can select your choice of layout from the
+ toolbar shown on the left, or from the context menu shown below.
+ \endtable
+
+ \image designer-set-layout2.png
+
+
+ \section2 Horizontal and Vertical Layouts
+
+ The simplest way to arrange objects on a form is to place them in a
+ horizontal or vertical layout. Horizontal layouts ensure that the widgets
+ within are aligned horizontally; vertical layouts ensure that they are
+ aligned vertically.
+
+ Horizontal and vertical layouts can be combined and nested to any depth.
+ However, if you need more control over the placement of objects, consider
+ using the grid layout.
+
+
+ \section3 The Grid Layout
+
+ Complex form layouts can be created by placing objects in a grid layout.
+ This kind of layout gives the form designer much more freedom to arrange
+ widgets on the form, but can result in a much less flexible layout.
+ However, for some kinds of form layout, a grid arrangement is much more
+ suitable than a nested arrangement of horizontal and vertical layouts.
+
+
+ \section3 Splitter Layouts
+
+ Another common way to manage the layout of objects on a form is to place
+ them in a splitter. These splitters arrange the objects horizontally or
+ vertically in the same way as normal layouts, but also allow the user to
+ adjust the amount of space allocated to each object.
+
+ \image designer-splitter-layout.png
+
+ Although QSplitter is a container widget, \QD treats splitter objects as
+ layouts that are applied to existing widgets. To place a group of widgets
+ into a splitter, select them
+ \l{Qt Designer's Widget Editing Mode#SelectingObjects}{as described here}
+ then apply the splitter layout by using the appropriate toolbar button,
+ keyboard shortcut, or \gui{Lay out} context menu entry.
+
+
+ \section3 The Form Layout
+
+ Since Qt 4.4, another layout class has been included -- QFormLayout. This
+ class manages widgets in a two-column form; the left column holds labels
+ and the right column holds field widgets such as line edits, spin boxes,
+ etc. The QFormLayout class adheres to various platform look and feel
+ guidelines and supports wrapping for long rows.
+
+ \image designer-form-layout.png
+
+ The \c{.ui} file above results in the previews shown below.
+
+ \table
+ \header
+ \i Windows XP
+ \i Mac OS X
+ \i Cleanlooks
+ \row
+ \i \inlineimage designer-form-layout-windowsXP.png
+ \i \inlineimage designer-form-layout-macintosh.png
+ \i \inlineimage designer-form-layout-cleanlooks.png
+ \endtable
+
+
+ \section2 Shortcut Keys
+
+ In addition to the standard toolbar and context menu entries, there is also
+ a set of keyboard shortcuts to apply layouts on widgets.
+
+ \target LayoutShortcuts
+ \table
+ \header
+ \i Layout
+ \i Shortcut
+ \i Description
+ \row
+ \i Horizontal
+ \i \key{Ctrl+1}
+ \i Places the selected objects in a horizontal layout.
+ \row
+ \i Vertical
+ \i \key{Ctrl+2}
+ \i Places the selected objects in a vertical layout.
+ \row
+ \i Grid
+ \i \key{Ctrl+5}
+ \i Places the selected objects in a grid layout.
+ \row
+ \i Form
+ \i \key{Ctrl+6}
+ \i Places the selected objects in a form layout.
+ \row
+ \i Horizontal splitter
+ \i \key{Ctrl+3}
+ \i Creates a horizontal splitter and places the selected objects
+ inside it.
+ \row
+ \i Vertical splitter
+ \i \key{Ctrl+4}
+ \i Creates a vertical splitter and places the selected objects
+ inside it.
+ \row
+ \i Adjust size
+ \i \key{Ctrl+J}
+ \i Adjusts the size of the layout to ensure that each child object
+ has sufficient space to display its contents. See
+ QWidget::adjustSize() for more information.
+ \endtable
+
+ \note \key{Ctrl+0} is used to break a layout.
+
+*/
+
+
+/*!
+ \page designer-preview.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Using Layouts in Qt Designer
+ \nextpage Qt Designer's Buddy Editing Mode
+ \title Saving, Previewing and Printing Forms in Qt Designer
+
+ Although \QD's forms are accurate representations of the components being
+ edited, it is useful to preview the final appearance while editing. This
+ feature can be activated by opening the \gui Form menu and selecting
+ \gui Preview, or by pressing \key{Ctrl+R} when in the form.
+
+ \image designer-dialog-preview.png
+
+ The preview shows exactly what the final component will look like when used
+ in an application.
+
+ Since Qt 4.4, it is possible to preview forms with various skins - default
+ skins, skins created with Qt Style Sheets or device skins. This feature
+ simulates the effect of calling \c{QApplication::setStyleSheet()} in the
+ application.
+
+ To preview your form with skins, open the \gui Edit menu and select
+ \gui{Preferences...}
+
+ You will see the dialog shown below:
+
+ \image designer-preview-style.png
+
+ The \gui{Print/Preview Configuration} checkbox must be checked to activate
+ previews of skins. You can select the styles provided from the \gui{Style}
+ drop-down box.
+
+ \image designer-preview-style-selection.png
+
+ Alternatively, you can preview custom style sheet created with Qt Style
+ Sheets. The figure below shows an example of Qt Style Sheet syntax and the
+ corresponding output.
+
+ \image designer-preview-stylesheet.png
+
+ Another option would be to preview your form with device skins. A list of
+ generic device skins are available in \QD, however, you may also use
+ other QVFB skins with the \gui{Browse...} option.
+
+ \image designer-preview-deviceskin-selection.png
+
+
+ \section1 Viewing the Form's Code
+
+ Since Qt 4.4, it is possible to view code generated by the User Interface
+ Compiler (uic) for the \QD form.
+
+ \image designer-form-viewcode.png
+
+ Select \gui{View Code...} from the \gui{Form} menu and a dialog with the
+ generated code will be displayed. The screenshot below is an example of
+ code generated by the \c{uic}.
+
+ \image designer-code-viewer.png
+
+ \section1 Saving and Printing the Form
+
+ Forms created in \QD can be saved to an image or printed.
+
+ \table
+ \row
+ \i \inlineimage designer-file-menu.png
+ \i \bold{Saving Forms}
+
+ To save a form as an image, choose the \gui{Save Image...} option. The file
+ will be saved in \c{.png} format.
+
+ \bold{Printing Forms}
+
+ To print a form, select the \gui{Print...} option.
+
+ \endtable
+*/
+
+
+/*!
+ \page designer-connection-mode.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Using Layouts in Qt Designer
+ \nextpage Qt Designer's Buddy Editing Mode
+
+
+ \title Qt Designer's Signals and Slots Editing Mode
+
+ \image designer-connection-mode.png
+
+ In \QD's signals and slots editing mode, you can connect objects in a form
+ together using Qt's signals and slots mechanism. Both widgets and layouts
+ can be connected via an intuitive connection interface, using the menu of
+ compatible signals and slots provided by \QD. When a form is saved, all
+ connections are preserved so that they will be ready for use when your
+ project is built.
+
+
+ \tableofcontents
+
+ For more information on Qt's signals and sltos mechanism, refer to the
+ \l{Signals and Slots} document.
+
+
+ \section1 Connecting Objects
+
+ To begin connecting objects, enter the signals and slots editing mode by
+ opening the \gui Edit menu and selecting \gui{Edit Signals/Slots}, or by
+ pressing the \key F4 key.
+
+ All widgets and layouts on the form can be connected together. However,
+ spacers just provide spacing hints to layouts, so they cannot be connected
+ to other objects.
+
+
+ \target HighlightedObjects
+ \table
+ \row
+ \i \inlineimage designer-connection-highlight.png
+ \i \bold{Highlighted Objects}
+
+ When the cursor is over an object that can be used in a connection, the
+ object will be highlighted.
+ \endtable
+
+ To make a connectionn, press the left mouse button and drag the cursor
+ towards the object you want to connect it to. As you do this, a line will
+ extend from the source object to the cursor. If the cursor is over another
+ object on the form, the line will end with an arrow head that points to the
+ destination object. This indicates that a connection will be made between
+ the two objects when you release the mouse button.
+
+ You can abandon the connection at any point while you are dragging the
+ connection path by pressing \key{Esc}.
+
+ \target MakingAConnection
+ \table
+ \row
+ \i \inlineimage designer-connection-making.png
+ \i \bold{Making a Connection}
+
+ The connection path will change its shape as the cursor moves around
+ the form. As it passes over objects, they are highlighted, indicating
+ that they can be used in a signal and slot connection. Release the
+ mouse button to make the connection.
+ \endtable
+
+ The \gui{Configure Connection} dialog (below) is displayed, showing signals
+ from the source object and slots from the destination object that you can
+ use.
+
+ \image designer-connection-dialog.png
+
+ To complete the connection, select a signal from the source object and a
+ slot from the destination object, then click \key OK. Click \key Cancel if
+ you wish to abandon the connection.
+
+ \note If the \gui{Show all signals and slots} checkbox is selected, all
+ available signals from the source object will be shown. Otherwise, the
+ signals and slots inherited from QWidget will be hidden.
+
+ You can make as many connections as you like between objects on the form;
+ it is possible to connect signals from objects to slots in the form itself.
+ As a result, the signal and slot connections in many dialogs can be
+ completely configured from within \QD.
+
+ \target ConnectingToTheForm
+ \table
+ \row
+ \i \inlineimage designer-connection-to-form.png
+ \i \bold{Connecting to a Form}
+
+ To connect an object to the form itself, simply position the cursor
+ over the form and release the mouse button. The end point of the
+ connection changes to the electrical "ground" symbol.
+ \endtable
+
+
+ \section1 Editing and Deleting Connections
+
+ By default, connection paths are created with two labels that show the
+ signal and slot involved in the connection. These labels are usually
+ oriented along the line of the connection. You can move them around inside
+ their host widgets by dragging the red square at each end of the connection
+ path.
+
+ \target ConnectionEditor
+ \table
+ \row
+ \i \inlineimage designer-connection-editor.png
+ \i \bold{The Signal/Slot Editor}
+
+ The signal and slot used in a connection can be changed after it has
+ been set up. When a connection is configured, it becomes visible in
+ \QD's signal and slot editor where it can be further edited. You can
+ also edit signal/slot connections by double-clicking on the connection
+ path or one of its labels to display the Connection Dialog.
+ \endtable
+
+ \target DeletingConnections
+ \table
+ \row
+ \i \inlineimage designer-connection-editing.png
+ \i \bold{Deleting Connections}
+
+ The whole connection can be selected by clicking on any of its path
+ segments. Once selected, a connection can be deleted with the
+ \key Delete key, ensuring that it will not be set up in the \c{.ui}
+ file.
+ \endtable
+*/
+
+
+/*!
+ \page designer-buddy-mode.html
+ \contentspage{Qt Designer Manual}{Contents}
+ \previouspage Qt Designer's Signals and Slots Editing Mode
+ \nextpage Qt Designer's Tab Order Editing Mode
+
+ \title Qt Designer's Buddy Editing Mode
+
+ \image designer-buddy-mode.png
+
+ One of the most useful basic features of Qt is the support for buddy
+ widgets. A buddy widget accepts the input focus on behalf of a QLabel when
+ the user types the label's shortcut key combination. The buddy concept is
+ also used in Qt's \l{Model/View Programming}{model/view} framework.
+
+
+ \section1 Linking Labels to Buddy Widgets
+
+ To enter buddy editing mode, open the \gui Edit menu and select
+ \gui{Edit Buddies}. This mode presents the widgets on the form in a similar
+ way to \l{Qt Designer's Signals and Slots Editing Mode}{signals and slots
+ editing mode} but in this mode, connections must start at label widgets.
+ Ideally, you should connect each label widget that provides a shortcut with
+ a suitable input widget, such as a QLineEdit.
+
+
+ \target MakingBuddies
+ \table
+ \row
+ \i \inlineimage designer-buddy-making.png
+ \i \bold{Making Buddies}
+
+ To define a buddy widget for a label, click on the label, drag the
+ connection to another widget on the form, and release the mouse button.
+ The connection shown indicates how input focus is passed to the buddy
+ widget. You can use the form preview to test the connections between
+ each label and its buddy.
+ \endtable
+
+
+ \section1 Removing Buddy Connections
+
+ Only one buddy widget can be defined for each label. To change the buddy
+ used, it is necessary to delete any existing buddy connection before you
+ create a new one.
+
+ Connections between labels and their buddy widgets can be deleted in the
+ same way as signal-slot connections in signals and slots editing mode:
+ Select the buddy connection by clicking on it and press the \key Delete
+ key. This operation does not modify either the label or its buddy in any
+ way.
+*/
+
+
+/*!
+ \page designer-tab-order.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Qt Designer's Buddy Editing Mode
+ \nextpage Using Containers in Qt Designer
+
+ \title Qt Designer's Tab Order Editing Mode
+
+ \image designer-tab-order-mode.png
+
+ Many users expect to be able to navigate between widgets and controls
+ using only the keyboard. Qt lets the user navigate between input widgets
+ with the \key Tab and \key{Shift+Tab} keyboard shortcuts. The default
+ \e{tab order} is based on the order in which widgets are constructed.
+ Although this order may be sufficient for many users, it is often better
+ to explicitly specify the tab order to make your application easier to
+ use.
+
+
+ \section1 Setting the Tab Order
+
+ To enter tab order editing mode, open the \gui Edit menu and select
+ \gui{Edit Tab Order}. In this mode, each input widget in the form is shown
+ with a number indicating its position in the tab order. So, if the user
+ gives the first input widget the input focus and then presses the tab key,
+ the focus will move to the second input widget, and so on.
+
+ The tab order is defined by clicking on each of the numbers in the correct
+ order. The first number you click will change to red, indicating the
+ currently edited position in the tab order chain. The widget associated
+ with the number will become the first one in the tab order chain. Clicking
+ on another widget will make it the second in the tab order, and so on.
+
+ Repeat this process until you are satisfied with the tab order in the form
+ -- you do not need to click every input widget if you see that the
+ remaining widgets are already in the correct order. Numbers, for which you
+ already set the order, change to green, while those which are not clicked
+ yet, remain blue.
+
+ If you make a mistake, simply double click outside of any number or choose
+ \gui{Restart} from the form's context menu to start again. If you have many
+ widgets on your form and would like to change the tab order in the middle or
+ at the end of the tab order chain, you can edit it at any position. Press
+ \key{Ctrl} and click the number from which you want to start.
+ Alternatively, choose \gui{Start from Here} in the context menu.
+
+*/
+
+
+/*!
+ \page designer-using-containers.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Qt Designer's Tab Order Editing Mode
+ \nextpage Creating Main Windows in Qt Designer
+
+
+ \title Using Containers in Qt Designer
+
+ Container widgets provide high level control over groups of objects on a
+ form. They can be used to perform a variety of functions, such as managing
+ input widgets, providing paged and tabbed layouts, or just acting as
+ decorative containers for other objects.
+
+ \image designer-widget-morph.png
+
+ \QD provides visual feedback to help you place objects inside your
+ containers. When you drag an object from the widget box (or elsewhere) on
+ the form, each container will be highlighted when the cursor is positioned
+ over it. This indicates that you can drop the object inside, making it a
+ child object of the container. This feedback is important because it is
+ easy to place objects close to containers without actually placing them
+ inside. Both widgets and spacers can be used inside containers.
+
+ Stacked widgets, tab widgets, and toolboxes are handled specially in \QD.
+ Norwally, when adding pages (tabs, pages, compartments) to these containers
+ in your own code, you need to supply existing widgets, either as
+ placeholders or containing child widgets. In \QD, these are automatically
+ created for you, so you can add child objects to each page straight away.
+
+ Each container typically allows its child objects to be arranged in one or
+ more layouts. The type of layout management provided depends on each
+ container, although setting the layout is usually just a matter of
+ selecting the container by clicking it, and applying a layout. The table
+ below shows a list of available containers.
+
+ \table
+ \row
+ \i \inlineimage designer-containers-frame.png
+ \i \bold Frames
+
+ Frames are used to enclose and group widgets, as well as to provide
+ decoration. They are used as the foundation for more complex
+ containers, but they can also be used as placeholders in forms.
+
+ The most important properties of frames are \c frameShape,
+ \c frameShadow, \c lineWidth, and \c midLineWidth. These are described
+ in more detail in the QFrame class description.
+
+ \row
+ \i \inlineimage designer-containers-groupbox.png
+ \i \bold{Group Boxes}
+
+ Group boxes are usually used to group together collections of
+ checkboxes and radio buttons with similar purposes.
+
+ Among the significant properties of group boxes are \c title, \c flat,
+ \c checkable, and \c checked. These are demonstrated in the
+ \l{widgets/groupbox}{Group Box} example, and described in the QGroupBox
+ class documentation. Each group box can contain its own layout, and
+ this is necessary if it contains other widgets. To add a layout to the
+ group box, click inside it and apply the layout as usual.
+
+ \row
+ \i \inlineimage designer-containers-stackedwidget.png
+ \i \bold{Stacked Widgets}
+
+ Stacked widgets are collections of widgets in which only the topmost
+ layer is visible. Control over the visible layer is usually managed by
+ another widget, such as combobox, using signals and slots.
+
+ \QD shows arrows in the top-right corner of the stack to allow you to
+ see all the widgets in the stack when designing it. These arrows do not
+ appear in the preview or in the final component. To navigate between
+ pages in the stack, select the stacked widget and use the
+ \gui{Next Page} and \gui{Previous Page} entries from the context menu.
+ The \gui{Insert Page} and \gui{Delete Page} context menu options allow
+ you to add and remove pages.
+
+ \row
+ \i \inlineimage designer-containers-tabwidget.png
+ \i \bold{Tab Widgets}
+
+ Tab widgets allow the developer to split up the contents of a widget
+ into different labelled sections, only one of which is displayed at any
+ given time. By default, the tab widget contains two tabs, and these can
+ be deleted or renamed as required. You can also add additional tabs.
+
+ To delete a tab:
+ \list
+ \o Click on its label to make it the current tab.
+ \o Select the tab widget and open its context menu.
+ \o Select \gui{Delete Page}.
+ \endlist
+
+ To add a new tab:
+ \list
+ \o Select the tab widget and open its context menu.
+ \o Select \gui{Insert Page}.
+ \o You can add a page before or after the \e current page. \QD
+ will create a new widget for that particular tab and insert it
+ into the tab widget.
+ \o You can set the title of the current tab by changing the
+ \c currentTabText property in the \gui{Property Editor}.
+ \endlist
+
+ \row
+ \i \inlineimage designer-containers-toolbox.png
+ \i \bold{ToolBox Widgets}
+
+ Toolbox widgets provide a series of pages or compartments in a toolbox.
+ They are handled in a way similar to stacked widgets.
+
+ To rename a page in a toolbox, make the toolbox your current pange and
+ change its \c currentItemText property from the \gui{Property Editor}.
+
+ To add a new page, select \gui{Insert Page} from the toolbox widget's
+ context menu. You can add the page before or after the current page.
+
+ To delete a page, select \gui{Delete Page} from the toolbox widget's
+ context menu.
+
+ \row
+ \i \inlineimage designer-containers-dockwidget.png
+ \i \bold{Dock Widgets}
+
+ Dock widgets are floating panels, often containing input widgets and
+ more complex controls, that are either attached to the edges of the
+ main window in "dock areas", or floated as independent tool windows.
+
+ Although dock widgets can be added to any type of form, they are
+ typically used with forms created from the
+ \l{Creating Main Windows in Qt Designer}{main window template}.
+
+ \endtable
+*/
+
+
+/*!
+ \page designer-creating-mainwindows.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Using Containers in Qt Designer
+ \nextpage Editing Resources with Qt Designer
+
+ \title Creating Main Windows in Qt Designer
+
+ \QD can be used to create user interfaces for different purposes, and
+ it provides different kinds of form templates for each user interface. The
+ main window template is used to create application windows with menu bars,
+ toolbars, and dock widgets.
+
+ \omit
+ \image designer-mainwindow-example.png
+ \endomit
+
+ Create a new main window by opening the \gui File menu and selecting the
+ \gui{New Form...} option, or by pressing \key{Ctrl+N}. Then, select the
+ \gui{Main Window} template. This template provides a main application
+ window containing a menu bar and a toolbar by default -- these can be
+ removed if they are not required.
+
+ If you remove the menu bar, a new one can be created by selecting the
+ \gui{Create Menu Bar} option from the context menu, obtained by
+ right-clicking within the main window form.
+
+ An application can have only \bold one menu bar, but \bold several
+ toolbars.
+
+
+ \section1 Menus
+
+ Menus are added to the menu bar by modifying the \gui{Type Here}
+ placeholders. One of these is always present for editing purposes, and
+ will not be displayed in the preview or in the finished window.
+
+ Once created, the properties of a menu can be accessed using the
+ \l{Qt Designer's Widget Editing Mode#The Property Editor}{Property Editor},
+ and each menu can be accessed for this purpose via the
+ \l{Qt Designer's Widget Editing Mode#The Object Inspector}{The Object Inspector}.
+
+ Existing menus can be removed by opening a context menu over the label in
+ the menu bar, and selecting \gui{Remove Menu 'menu_name'}.
+
+
+ \target CreatingAMenu
+ \table
+ \row
+ \i \inlineimage designer-creating-menu1.png
+ \i \inlineimage designer-creating-menu2.png
+ \i \bold{Creating a Menu}
+
+ Double-click the placeholder item to begin editing. The menu text,
+ displayed using a line edit, can be modified.
+
+ \row
+ \i \inlineimage designer-creating-menu3.png
+ \i \inlineimage designer-creating-menu4.png
+ \i Insert the required text for the new menu. Inserting an
+ ampersand character (&) causes the letter following it to be
+ used as a mnemonic for the menu.
+
+ Press \key Return or \key Enter to accept the new text, or press
+ \key Escape to reject it. You can undo the editing operation later if
+ required.
+ \endtable
+
+ Menus can also be rearranged in the menu bar simply by dragging and
+ dropping them in the preferred location. A vertical red line indicates the
+ position where the menu will be inserted.
+
+ Menus can contain any number of entries and separators, and can be nested
+ to the required depth. Adding new entries to menus can be achieved by
+ navigating the menu structure in the usual way.
+
+ \target CreatingAMenuEntry
+ \table
+ \row
+ \i \inlineimage designer-creating-menu-entry1.png
+ \i \inlineimage designer-creating-menu-entry2.png
+ \i \bold{Creating a Menu Entry}
+
+ Double-click the \gui{new action} placeholder to begin editing, or
+ double-click \gui{new separator} to insert a new separator line after
+ the last entry in the menu.
+
+ The menu entry's text is displayed using a line edit, and can be
+ modified.
+
+ \row
+ \i \inlineimage designer-creating-menu-entry3.png
+ \i \inlineimage designer-creating-menu-entry4.png
+ \i Insert the required text for the new entry, optionally using
+ the ampersand character (&) to mark the letter to use as a
+ mnemonic for the entry.
+
+ Press \key Return or \key Enter to accept the new text, or press
+ \key Escape to reject it. The action created for this menu entry will
+ be accessible via the \l{#TheActionEditor}{Action Editor}, and any
+ associated keyboard shortcut can be set there.
+ \endtable
+
+ Just like with menus, entries can be moved around simply by dragging and
+ dropping them in the preferred location. When an entry is dragged over a
+ closed menu, the menu will open to allow it to be inserted there. Since
+ menu entries are based on actions, they can also be dropped onto toolbars,
+ where they will be displayed as toolbar buttons.
+
+
+ \section1 Toolbars
+
+
+ ### SCREENSHOT
+
+ Toolbars ared added to a main window in a similar way to the menu bar:
+ Select the \gui{Add Tool Bar} option from the form's context menu.
+ Alternatively, if there is an existing toolbar in the main window, you can
+ click the arrow on its right end to create a new toolbar.
+
+ Toolbar buttons are created using the action system to populate each
+ toolbar, rather than by using specific button widgets from the widget box.
+ Since actions can be represented by menu entries and toolbar buttons, they
+ can be moved between menus and toolbars. To share an action between a menu
+ and a toolbar, drag its icon from the \l{#TheActionEditor}{Action Editor}
+ to the toolbar rather than from the menu where its entry is located.
+
+ New actions for menus and toolbars can be created in the
+ \l{#TheActionEditor}{Action Editor}.
+
+
+ \section1 Actions
+
+ With the menu bar and the toolbars in place, it's time to populate them
+ with action: \QD provides an action editor to simplify the creation and
+ management of actions.
+
+
+ \target TheActionEditor
+ \table
+ \row
+ \i \inlineimage designer-action-editor.png
+ \i \bold{The Action Editor}
+
+ Enable the action editor by opening the \gui Tools menu, and switching
+ on the \gui{Action Editor} option.
+
+ The action editor allows you to create \gui New actions and \gui Delete
+ actions. It also provides a search function, \gui Filter, using the
+ action's text.
+
+ \QD's action editor can be viewed in the classic \gui{Icon View} and
+ \gui{Detailed View}. The screenshot below shows the action editor in
+ \gui{Detailed View}. You can also copy and paste actions between menus,
+ toolbars and forms.
+ \endtable
+
+ To create an action, use the action editor's \gui New button, which will
+ then pop up an input dialog. Provide the new action with a \gui Text --
+ this is the text that will appear in a menu entry and as the action's
+ tooltip. The text is also automatically added to an "action" prefix,
+ creating the action's \gui{Object Name}.
+
+ In addition, the dialog provides the option of selecting an \gui Icon for
+ the action, as well as removing the current icon.
+
+ Once the action is created, it can be used wherever actions are applicable.
+
+
+ \target AddingAnAction
+ \table
+ \row
+ \i \inlineimage designer-adding-menu-action.png
+ \i \inlineimage designer-adding-toolbar-action.png
+ \i \bold{Adding an Action}
+
+ To add an action to a menu or a toolbar, simply press the left mouse
+ button over the action in the action editor, and drag it to the
+ preferred location.
+
+ \QD provides highlighted guide lines that tell you where the action
+ will be added. Release the mouse button to add the action when you have
+ found the right spot.
+ \endtable
+
+
+ \section1 Dock Widgets
+
+ Since dock widgets are \l{Using Containers in Qt Designer}
+ {container widgets}, they can be added to a form in the usuasl way. Once
+ added to a form, dock widgets are not placed in any particular dock area by
+ default; you need to set the \gui{docked} property to true for each widget
+ and choose an appropriate value for its \gui{dockWidgetArea} property.
+
+ \target AddingADockWidget
+ \table
+ \row
+ \i \inlineimage designer-adding-dockwidget.png
+ \i \bold{Adding a Dock Widget}
+
+ To add a dock widget, simply drag one from the \gui Containers section
+ of the widget box, and drop it onto the main form area. Just like other
+ widgets, its properties can be modified with the \gui{Property Editor}.
+
+ Dock widgets can be optionally floated as indpendent tool windows.
+ Hence, it is useful to give them window titles by setting their
+ \gui{windowTitle} property. This also helps to identify them on the
+ form.
+
+ \endtable
+*/
+
+
+/*!
+ \page designer-resources.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Creating Main Windows in Qt Designer
+ \nextpage Using Stylesheets with Qt Designer
+
+ \title Editing Resources with Qt Designer
+
+ \image designer-resources-editing.png
+
+ \QD fully supports the \l{The Qt Resource System}{Qt Resource System},
+ enabling resources to be specified together with forms as they are
+ designed. To aid designers and developers manage resources for their
+ applications, \QD's resource editor allows resources to be defined on a
+ per-form basis. In other words, each form can have a separate resource
+ file.
+
+ \section1 Defining a Resource File
+
+ To specify a resource file you must enable the resource editor by opening
+ the \gui Tools menu, and switching on the \gui{Resource Browser} option.
+
+ \target ResourceFiles
+ \table
+ \row
+ \i \inlineimage designer-resource-browser.png
+ \i \bold{Resource Files}
+
+ Within the resource browser, you can open existing resource files or
+ create new ones. Click the \gui{Edit Resources} button
+ \inlineimage designer-edit-resources-button.png
+ to edit your resources. To reload resources, click on the \gui Reload
+ button
+ \inlineimage designer-reload-resources-button.png
+ .
+ \endtable
+
+
+ Once a resource file is loaded, you can create or remove entries in it
+ using the given \gui{Add Files}
+ \inlineimage designer-add-resource-entry-button.png
+ and \gui{Remove Files}
+ \inlineimage designer-remove-resource-entry-button.png
+ buttons, and specify resources (e.g., images) using the \gui{Add Files}
+ button
+ \inlineimage designer-add-files-button.png
+ . Note that these resources must reside within the current resource file's
+ directory or one of its subdirectories.
+
+
+ \target EditResource
+ \table
+ \row
+ \i \inlineimage designer-edit-resource.png
+ \i \bold{Editing Resource Files}
+
+ Press the
+ \inlineimage designer-add-resource-entry-button.png
+ button to add a new resource entry to the file. Then use the
+ \gui{Add Files} button
+ \inlineimage designer-add-files-button.png
+ to specify the resource.
+
+ You can remove resources by selecting the corresponding entry in the
+ resource editor, and pressing the
+ \inlineimage designer-remove-resource-entry-button.png
+ button.
+ \endtable
+
+
+ \section1 Using the Resources
+
+ Once the resources are defined you can use them actively when composing
+ your form. For example, you might want to create a tool button using an
+ icon specified in the resource file.
+
+ \target UsingResources
+ \table
+ \row
+ \i \inlineimage designer-resources-using.png
+ \i \bold{Using Resources}
+
+ When changing properties with values that may be defined within a
+ resource file, \QD's property editor allows you to specify a resource
+ in addition to the option of selecting a source file in the ordinary
+ way.
+
+ \row
+ \i \inlineimage designer-resource-selector.png
+ \i \bold{Selecting a Resource}
+
+ You can open the resource selector by clicking \gui{Choose Resource...}
+ to add resources any time during the design process.
+
+\omit
+... check with Friedemann
+To quickly assign icon pixmaps to actions or pixmap properties, you may
+drag the pixmap from the resource editor to the action editor, or to the
+pixmap property in the property editor.
+\endomit
+
+ \endtable
+*/
+
+
+/*!
+ \page designer-stylesheet.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Editing Resources with Qt Designer
+ \nextpage Using a Designer .ui File in Your Application
+
+ \title Using Stylesheets with Qt Designer
+
+ Since Qt 4.2, it is possible to edit stylesheets in \QD with the stylesheet
+ editor.
+
+ \target UsingStylesheets
+ \table
+ \row
+ \i \inlineimage designer-stylesheet-options.png
+ \bold{Setting a Stylesheet}
+
+ The stylesheet editor can be accessed by right-clicking a widget
+ and selecting \gui{Change styleSheet...}
+
+ \row
+ \i \inlineimage designer-stylesheet-usage.png
+ \endtable
+
+*/
+
+
+/*!
+ \page designer-using-a-ui-file.html
+ \previouspage Using Stylesheets with Qt Designer
+ \contentspage {Qt Designer Manual}{Contents}
+ \nextpage Using Custom Widgets with Qt Designer
+
+ \title Using a Designer .ui File in Your Application
+
+ With Qt's integrated build tools, \l{qmake Manual}{qmake} and \l uic, the
+ code for user interface components created with \QD is automatically
+ generated when the rest of your application is built. Forms can be included
+ and used directly from your application. Alternatively, you can use them to
+ extend subclasses of standard widgets. These forms can be processed at
+ compile time or at run time, depending on the approach used.
+
+
+ \tableofcontents
+ \section1 Compile Time Form Processing
+
+ A compile time processed form can be used in your application with one of
+ the following approaches:
+
+ \list
+ \o The Direct Approach: you construct a widget to use as a placeholder
+ for the component, and set up the user interface inside it.
+ \o The Single Inheritance Approach: you subclass the form's base class
+ (QWidget or QDialog, for example), and include a private instance
+ of the form's user interface object.
+ \o The MultipleInheritance Approach: you subclass both the form's base
+ class and the form's user interface object. This allows the widgets
+ defined in the form to be used directly from within the scope of
+ the subclass.
+ \endlist
+
+
+ \section2 The Direct Approach
+
+ To demonstrate how to use user interface (\c{.ui}) files straight from
+ \QD, we create a simple Calculator Form application. This is based on the
+ original \l{Calculator Form Example}{Calculator Form} example.
+
+ The application consists of one source file, \c main.cpp and a \c{.ui}
+ file.
+
+ The \c{calculatorform.ui} file designed with \QD is shown below:
+
+ \image directapproach-calculatorform.png
+
+ We will use \c qmake to build the executable, so we need to write a
+ \c{.pro} file:
+
+ \snippet doc/src/snippets/uitools/calculatorform/calculatorform.pro 0
+
+ The special feature of this file is the \c FORMS declaration that tells
+ \c qmake which files to process with \c uic. In this case, the
+ \c calculatorform.ui file is used to create a \c ui_calculatorform.h file
+ that can be used by any file listed in the \c SOURCES declaration. To
+ ensure that \c qmake generates the \c ui_calculatorform.h file, we need to
+ include it in a file listed in \c SOURCES. Since we only have \c main.cpp,
+ we include it there:
+
+ \snippet doc/src/snippets/uitools/calculatorform/main.cpp 0
+
+ This include is an additional check to ensure that we do not generate code
+ for \c .ui files that are not used.
+
+ The \c main function creates the calculator widget by constructing a
+ standard QWidget that we use to host the user interface described by the
+ \c calculatorform.ui file.
+
+ \snippet doc/src/snippets/uitools/calculatorform/main.cpp 1
+
+ In this case, the \c{Ui::CalculatorForm} is an interface description object
+ from the \c ui_calculatorform.h file that sets up all the dialog's widgets
+ and the connections between its signals and slots.
+
+ This approach provides a quick and easy way to use simple, self-contained
+ components in your applications, but many componens created with \QD will
+ require close integration with the rest of the application code. For
+ instance, the \c CalculatorForm code provided above will compile and run,
+ but the QSpinBox objects will not interact with the QLabel as we need a
+ custom slot to carry out the add operation and display the result in the
+ QLabel. To achieve this, we need to subclass a standard Qt widget (known as
+ the single inheritance approach).
+
+
+ \section2 The Single Inheritance Approach
+
+ In this approach, we subclass a Qt widget and set up the user interface
+ from within the constructor. Components used in this way expose the widgets
+ and layouts used in the form to the Qt widget subclass, and provide a
+ standard system for making signal and slot connections between the user
+ interface and other objects in your application.
+
+ This approach is used in the \l{Calculator Form Example}{Calculator Form}
+ example.
+
+ To ensure that we can use the user interface, we need to include the header
+ file that \c uic generates before referring to \c{Ui::CalculatorForm}:
+
+ \snippet examples/designer/calculatorform/calculatorform.h 0
+
+ This means that the \c{.pro} file must be updated to include
+ \c{calculatorform.h}:
+
+ \snippet examples/designer/calculatorform/calculatorform.pro 0
+
+ The subclass is defined in the following way:
+
+ \snippet examples/designer/calculatorform/calculatorform.h 1
+
+ The important feature of the class is the private \c ui object which
+ provides the code for setting up and managing the user interface.
+
+ The constructor for the subclass constructs and configures all the widgets
+ and layouts for the dialog just by calling the \c ui object's \c setupUi()
+ function. Once this has been done, it is possible to modify the user
+ interface as needed.
+
+ \snippet examples/designer/calculatorform/calculatorform.cpp 0
+
+ We can connect signals and slots in user interface widgets in the usual
+ way, taking care to prefix the \c ui object to each widget used.
+
+ The advantages of this approach are its simple use of inheritance to
+ provide a QWidget-based interface, and its encapsulation of the user
+ interface widget variables within the \c ui data member. We can use this
+ method to define a number of user interfaces within the same widget, each
+ of which is contained within its own namespace, and overlay (or compose)
+ them. This approach can be used to create individual tabs from existing
+ forms, for example.
+
+
+ \section2 The Multiple Inheritance Approach
+
+ Forms created with \QD can be subclassed together with a standard
+ QWidget-based class. This approach makes all the user interface components
+ defined in the form directly accessible within the scope of the subclass,
+ and enables signal and slot connections to be made in the usual way with
+ the \l{QObject::connect()}{connect()} function.
+
+ This approach is used in the \l{Multiple Inheritance Example}
+ {Multiple Inheritance} example.
+
+ We need to include the header file that \c uic generates from the
+ \c calculatorform.ui file:
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.h 0
+
+ The class is defined in a similar way to the one used in the
+ \l{The Single Inheritance Approach}{single inheritance approach}, except that
+ this time we inherit from \e{both} QWidget and \c{Ui::CalculatorForm}:
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.h 1
+
+ We inherit \c{Ui::CalculatorForm} privately to ensure that the user
+ interface objects are private in our subclass. We can also inherit it with
+ the \c public or \c protected keywords in the same way that we could have
+ made \c ui public or protected in the previous case.
+
+ The constructor for the subclass performs many of the same tasks as the
+ constructor used in the \l{The Single Inheritance Approach}
+ {single inheritance} example:
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.cpp 0
+
+ In this case, the widgets used in the user interface can be accessed in the
+ same say as a widget created in code by hand. We no longer require the
+ \c{ui} prefix to access them.
+
+ Subclassing using multiple inheritance gives us more direct access to the
+ contents of the form, is slightly cleaner than the single inheritance
+ approach, but does not conveniently support composition of multiple user
+ interfaces.
+
+
+ \section1 Run Time Form Processing
+
+ Alternatively, forms can be processed at run time, producing dynamically-
+ generated user interfaces. This can be done using the QtUiTools module
+ that provides the QUiLoader class to handle forms created with \QD.
+
+
+ \section2 The UiTools Approach
+
+ A resource file containing a \c{.ui} file is required to process forms at
+ run time. Also, the application needs to be configured to use the QtUiTools
+ module. This is done by including the following declaration in a \c qmake
+ project file, ensuring that the application is compiled and linked
+ appropriately.
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 0
+
+ The QUiLoader class provides a form loader object to construct the user
+ interface. This user interface can be retrieved from any QIODevice, e.g.,
+ a QFile object, to obtain a form stored in a project's resource file. The
+ QUiLoader::load() function constructs the form widget using the user
+ interface description contained in the file.
+
+ The QtUiTools module classes can be included using the following directive:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 1
+
+ The QUiLoader::load() function is invoked as shown in this code from the
+ \l{Text Finder Example}{Text Finder} example:
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 4
+
+ In a class that uses QtUiTools to build its user interface at run time, we
+ can locate objects in the form using qFindChild(). For example, in the
+ follownig code, we locate some components based on their object names and
+ widget types:
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 1
+
+ Processing forms at run-time gives the developer the freedom to change a
+ program's user interface, just by changing the \c{.ui} file. This is useful
+ when customizing programs to suit various user needs, such as extra large
+ icons or a different colour scheme for accessibility support.
+
+
+ \section1 Automatic Connections
+
+ The signals and slots connections defined for compile time or run time
+ forms can either be set up manually or automatically, using QMetaObject's
+ ability to make connections between signals and suitably-named slots.
+
+ Generally, in a QDialog, if we want to process the information entered by
+ the user before accepting it, we need to connect the clicked() signal from
+ the \gui OK button to a custom slot in our dialog. We will first show an
+ example of the dialog in which the slot is connected by hand then compare
+ it with a dialog that uses automatic connection.
+
+
+ \section2 A Dialog Without Auto-Connect
+
+ We define the dialog in the same way as before, but now include a slot in
+ addition to the constructor:
+
+ \snippet doc/src/snippets/designer/noautoconnection/imagedialog.h 0
+
+ The \c checkValues() slot will be used to validate the values provided by
+ the user.
+
+ In the dialog's constructor we set up the widgets as before, and connect
+ the \gui Cancel button's \l{QPushButton::clicked()}{clicked()} signal to
+ the dialog's reject() slot. We also disable the
+ \l{QPushButton::autoDefault}{autoDefault} property in both buttons to
+ ensure that the dialog does not interfere with the way that the line edit
+ handles return key events:
+
+ \snippet doc/src/snippets/designer/noautoconnection/imagedialog.cpp 0
+ \dots
+ \snippet doc/src/snippets/designer/noautoconnection/imagedialog.cpp 1
+
+ We connect the \gui OK button's \l{QPushButton::clicked()}{clicked()}
+ signal to the dialog's checkValues() slot which we implement as follows:
+
+ \snippet doc/src/snippets/designer/noautoconnection/imagedialog.cpp 2
+
+ This custom slot does the minimum necessary to ensure that the data
+ entered by the user is valid - it only accepts the input if a name was
+ given for the image.
+
+ \section2 Widgets and Dialogs with Auto-Connect
+
+ Although it is easy to implement a custom slot in the dialog and connect
+ it in the constructor, we could instead use QMetaObject's auto-connection
+ facilities to connect the \gui OK button's clicked() signal to a slot in
+ our subclass. \c{uic} automatically generates code in the dialog's
+ \c setupUi() function to do this, so we only need to declare and
+ implement a slot with a name that follows a standard convention:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 2
+
+ Using this convention, we can define and implement a slot that responds to
+ mouse clicks on the \gui OK button:
+
+ \snippet doc/src/snippets/designer/autoconnection/imagedialog.h 0
+
+ Another example of automatic signal and slot connection would be the
+ \l{Text Finder Example}{Text Finder} with its \c{on_findButton_clicked()}
+ slot.
+
+ We use QMetaObject's system to enable signal and slot connections:
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 2
+
+ This enables us to implement the slot, as shown below:
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 6
+ \dots
+ \snippet examples/uitools/textfinder/textfinder.cpp 8
+
+ Automatic connection of signals and slots provides both a standard naming
+ convention and an explicit interface for widget designers to work to. By
+ providing source code that implements a given interface, user interface
+ designers can check that their designs actually work without having to
+ write code themselves.
+*/
+
+
+/*!
+ \page designer-customizing-forms.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Using Stylesheets with Qt Designer
+ \nextpage Using Custom Widgets with Qt Designer
+
+ \title Customizing Qt Designer Forms
+
+ \image designer-form-settings.png
+
+ When saving a form in \QD, it is stored as an \c .ui file. Several form
+ settings, for example the grid settings or the margin and spacing for the
+ default layout, are stored along with the form's components. These settings
+ are used when the \l uic generates the form's C++ code. For more
+ information on how to use forms in your application, see the
+ \l{Using a Designer .ui File in Your Application} section.
+
+
+ \section1 Modifying the Form Settings
+
+ To modify the form settings, open the \gui Form menu and select \gui{Form
+ Settings...}
+
+ In the forms settings dialog you can specify the \gui Author of the form.
+
+ You can also alter the margin and spacing properties for the form's default
+ layout (\gui {Layout Default}). These default layout properties will be
+ replaced by the corresponding \gui {Layout Function}, if the function is
+ specified, when \c uic generates code for the form. The form settings
+ dialog lets you specify functions for both the margin and the spacing.
+
+ \target LayoutFunction
+ \table
+ \row
+ \i \inlineimage designer-form-layoutfunction.png
+ \i \bold{Layout Function}
+
+ The default layout properties will be replaced by the corresponding
+ \gui{Layout Function}, when \c uic generates code for the form. This is
+ useful when different environments requires different layouts for the same
+ form.
+
+ To specify layout functions for the form's margin and spacing, check the
+ \gui{Layout Function} group box to enable the line edits.
+ \endtable
+
+ You can also specify the form's \gui{Include Hints}; i.e., provide a list
+ of the header files which will then be included in the form window's
+ associated \c .ui file. Header files may be local, i.e., relative to the
+ project's directory, \c "mywidget.h", or global, i.e. part of Qt or the
+ compilers standard libraries: \c <QtGui/QWidget>.
+
+ Finally, you can specify the function used to load pixmaps into the form
+ window (the \gui {Pixmap Function}).
+*/
+
+
+/*!
+ \page designer-using-custom-widgets.html
+ \contentspage {Qt Designer Manual}{Contents}
+ \previouspage Customizing Qt Designer Forms
+ \nextpage Creating Custom Widgets for Qt Designer
+
+ \title Using Custom Widgets with Qt Designer
+
+ \QD can display custom widgets through its extensible plugin mechanism,
+ allowing the range of designable widgets to be extended by the user and
+ third parties. This feature also allows \QD to optionally support
+ \l{Qt3Support}{Qt 3 compatibility widgets}. Alternatively, it is possible
+ to use existing widgets as placeholders for widget classes that provide
+ similar APIs.
+
+ Widgets from the Qt3Support library are made available via in \QD's support
+ for custom widgets.
+
+
+ \section1 Handling Custom Widgets
+
+ Although \QD supports all of the standard Qt widgets, and can be configured
+ to handle widgets supplied in the Qt3Support library, some specialized
+ widgets may not be available as standard for a number of reasons:
+
+ \list
+ \i Custom widgets may not be available at the time the user interface
+ is being designed.
+ \i Custom widgets may be platform-specific, and designers may be
+ developing the user interface on a different platform to end users.
+ \i The source code for a custom widget is not available, or the user
+ interface designers are unable to use the widget for non-technical
+ reasons.
+ \endlist
+
+ In the above situations, it is still possible to design forms with the aim
+ of using custom widgets in the application. To achieve this, we can use
+ the widget promotion feature of \QD.
+
+ In all other cases, where the source code to the custom widgets is
+ available, we can adapt the custom widget for use with \QD.
+
+
+ \section2 Promoting Widgets
+
+ \image designer-promoting-widgets.png
+
+ If some forms must be designed, but certain custom widgets are unavailble
+ to the designer, we can substitute similar widgets to represent the missing
+ widgets. For example, we might represent instances of a custom push button
+ class, \c MyPushButton, with instances of QPushButton and promote these to
+ \c MyPushButton so that \l{uic.html}{uic} generates suitable code for this
+ missing class.
+
+ When choosing a widget to use as a placeholder, it is useful to compare the
+ API of the missing widget with those of standard Qt widgets. For
+ specialized widgets that subclass standard classes, the obvious choice of
+ placeholder is the base class of the custom widget; for example, QSlider
+ might be used for specialized QSlider subclasses.
+
+ For specialized widgets that do not share a common API with standard Qt
+ widgets, it is worth considering adapting a custom widget for use in \QD.
+ If this is not possible then QWidget is the obvious choice for a
+ placeholder widget since it is the lowest common denominator for all
+ widgets.
+
+ To add a placeholder, select an object of a suitable base class and choose
+ \gui{Promote to ...} from the form's context menu. After entering the class
+ name and header file in the lower part of the dialog, choose \gui{Add}. The
+ placeholder class will now appear along with the base class in the upper
+ list. Click the \gui{Promote} button to accept this choice.
+
+ Now, when the form's context menu is opened over objects of the base class,
+ the placeholder class will appear in the \gui{Promote to} submenu, allowing
+ for convenient promotion of objects to that class.
+
+ A promoted widget can be reverted to its base class by choosing
+ \gui{Demote to} from the form's context menu.
+
+
+ \section2 User Defined Custom Widgets
+
+ \image worldtimeclockplugin-example.png
+
+ Custom widgets can be adapted for use with \QD, giving designers the
+ opportunity to configure the user interface using the actual widgets that
+ will be used in an application rather than placeholder widgets. The process
+ of creating a custom widget plugin is described in the
+ \l{Creating Custom Widgets for Qt Designer} chapter of this manual.
+
+ To use a plugin created in this way, it is necessary to ensure that the
+ plugin is located on a path that \QD searches for plugins. Generally,
+ plugins stored in \c{$QTDIR/plugins/designer} will be loaded when \QD
+ starts. Further information on building and installing plugins can be found
+ \l{Creating Custom Widgets for Qt Designer#BuildingandInstallingthePlugin}
+ {here}. You can also refer to the \l{How to Create Qt Plugins}
+ {Plugins HOWTO} document for information about creating plugins.
+*/
+
+
+/*!
+ \page designer-creating-custom-widgets.html
+ \previouspage Using Custom Widgets with Qt Designer
+ \contentspage {Qt Designer Manual}{Contents}
+ \nextpage Creating Custom Widget Extensions
+
+ \title Creating Custom Widgets for Qt Designer
+
+ \QD's plugin-based architecture allows user-defined and third party custom
+ widgets to be edited just like you do with standard Qt widgets. All of the
+ custom widget's features are made available to \QD, including widget
+ properties, signals, and slots. Since \QD uses real widgets during the form
+ design process, custom widgets will appear the same as they do when
+ previewed.
+
+ \image worldtimeclockplugin-example.png
+
+ The \l QtDesigner module provides you with the ability to create custom
+ widgets in \QD.
+
+
+ \section1 Getting Started
+
+ To integrate a custom widget with \QD, you require a suitable description
+ for the widget and an appropriate \c{.pro} file.
+
+
+ \section2 Providing an Interface Description
+
+ To inform \QD about the type of widget you want to provide, create a
+ subclass of QDesignerCustomWidgetInterface that describes the various
+ properties your widget exposes. Most of these are supplied by functions
+ that are pure virtual in the base class, because only the author of the
+ plugin can provide this information.
+
+ \table
+ \header
+ \o Function
+ \o Description of the return value
+ \row
+ \o \c name()
+ \o The name of the class that provides the widget.
+ \row
+ \o \c group()
+ \o The group in \QD's widget box that the widget belongs to.
+ \row
+ \o \c toolTip()
+ \o A short description to help users identify the widget in \QD.
+ \row
+ \o \c whatsThis()
+ \o A longer description of the widget for users of \QD.
+ \row
+ \o \c includeFile()
+ \o The header file that must be included in applications that use
+ this widget. This information is stored in .ui files and will
+ be used by \c uic to create a suitable \c{#includes} statement
+ in the code it generates for the form containing the custom
+ widget.
+ \row
+ \o \c icon()
+ \o An icon that can be used to represent the widget in \QD's
+ widget box.
+ \row
+ \o \c isContainer()
+ \o True if the widget will be used to hold child widgets;
+ false otherwise.
+ \row
+ \o \c createWidget()
+ \o A QWidget pointer to an instance of the custom widget,
+ constructed with the parent supplied.
+ \note createWidget() is a factory function responsible for
+ creating the widget only. The custom widget's properties will
+ not be available until load() returns.
+ \row
+ \o \c domXml()
+ \o A description of the widget's properties, such as its object
+ name, size hint, and other standard QWidget properties.
+ \row
+ \o \c codeTemplate()
+ \o This function is reserved for future use by \QD.
+ \endtable
+
+ Two other virtual functions can also be reimplemented:
+
+ \table
+ \row
+ \o \c initialize()
+ \o Sets up extensions and other features for custom widgets. Custom
+ container extensions (see QDesignerContainerExtension) and task
+ menu extensions (see QDesignerTaskMenuExtension) should be set
+ up in this function.
+ \row
+ \o \c isInitialized()
+ \o Returns true if the widget has been initialized; returns false
+ otherwise. Reimplementations usually check whether the
+ \c initialize() function has been called and return the result
+ of this test.
+ \endtable
+
+
+ \section2 Notes on the \c{domXml()} Function
+
+ The \c{domXml()} function returns a \c{.ui} file snippet that is used by
+ \QD's widget factory to create a custom widget and its applicable
+ properties.
+
+ Since Qt 4.4, \QD's widget box allows for a complete \c{.ui} file to
+ describe \bold one custom widget. The \c{.ui} file can be loaded using the
+ \c{<ui>} tag. Specifying the <ui> tag allows for adding the <customwidget>
+ element that contains additional information for custom widgets. The
+ \c{<widget>} tag is sufficient if no additional information is required
+
+ If the custom widget does not provide a reasonable size hint, it is
+ necessary to specify a default geometry in the string returned by the
+ \c domXml() function in your subclass. For example, the
+ \c AnalogClockPlugin provided by the \l{designer/customwidgetplugin}
+ {Custom Widget Plugin} example, defines a default widgetgeometry in the
+ following way:
+
+ \dots
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 11
+ \dots
+
+ An additional feature of the \c domXml() function is that, if it returns
+ an empty string, the widget will not be installed in \QD's widget box.
+ However, it can still be used by other widgets in the form. This feature
+ is used to hide widgets that should not be explicitly created by the user,
+ but are required by other widgets.
+
+
+ A complete custom widget specification looks like:
+
+ \code
+<ui language="c++"> displayname="MyWidget">
+ <widget class="widgets::MyWidget" name="mywidget"/>
+ <customwidgets>
+ <customwidget>
+ <class>widgets::MyWidget</class>
+ <addpagemethod>addPage</addpagemethod>
+ <propertyspecifications>
+ <stringpropertyspecification name="fileName" notr="true" type="singleline"
+ <stringpropertyspecification name="text" type="richtext"
+ </propertyspecifications>
+ </customwidget>
+ </customwidgets>
+</ui>
+ \endcode
+
+ Attributes of the \c{<ui>} tag:
+ \table
+ \header
+ \o Attribute
+ \o Presence
+ \o Values
+ \o Comment
+ \row
+ \o \c{language}
+ \o optional
+ \o "c++", "jambi"
+ \o This attribute specifies the language the custom widget is intended for.
+ It is mainly there to prevent C++-plugins from appearing in Qt Jambi.
+ \row
+ \o \c{displayname}
+ \o optional
+ \o Class name
+ \o The value of the attribute appears in the Widget box and can be used to
+ strip away namespaces.
+ \endtable
+
+ The \c{<addpagemethod>} tag tells \QD and \l uic which method should be used to
+ add pages to a container widget. This applies to container widgets that require
+ calling a particular method to add a child rather than adding the child by passing
+ the parent. In particular, this is relevant for containers that are not a
+ a subclass of the containers provided in \QD, but are based on the notion
+ of \e{Current Page}. In addition, you need to provide a container extension
+ for them.
+
+ The \c{<propertyspecifications>} element can contain a list of property meta information.
+ Currently, properties of type string are supported. For these properties, the
+ \c{<stringpropertyspecification>} tag can be used. This tag has the following attributes:
+
+
+ \table
+ \header
+ \o Attribute
+ \o Presence
+ \o Values
+ \o Comment
+ \row
+ \o \c{name}
+ \o required
+ \o Name of the property
+ \row
+ \o \c{type}
+ \o required
+ \o See below table
+ \o The value of the attribute determines how the property editor will handle them.
+ \row
+ \o \c{notr}
+ \o optional
+ \o "true", "false"
+ \o If the attribute is "true", the value is not meant to be translated.
+ \endtable
+
+ Values of the \c{type} attribute of the string property:
+
+ \table
+ \header
+ \o Value
+ \o Type
+ \row
+ \o \c{"richtext"}
+ \o Rich text.
+ \row
+ \o \c{"multiline"}
+ \o Multi-line plain text.
+ \row
+ \o \c{"singleline"}
+ \o Single-line plain text.
+ \row
+ \o \c{"stylesheet"}
+ \o A CSS-style sheet.
+ \row
+ \o \c{"objectname"}
+ \o An object name (restricted set of valid characters).
+ \row
+ \o \c{"url"}
+ \o URL, file name.
+ \endtable
+
+ \section1 Plugin Requirements
+
+ In order for plugins to work correctly on all platforms, you need to ensure
+ that they export the symbols needed by \QD.
+
+ First of all, the plugin class must be exported in order for the plugin to
+ be loaded by \QD. Use the Q_EXPORT_PLUGIN2() macro to do this. Also, the
+ QDESIGNER_WIDGET_EXPORT macro must be used to define each custom widget class
+ within a plugin, that \QD will instantiate.
+
+
+ \section1 Creating Well Behaved Widgets
+
+ Some custom widgets have special user interface features that may make them
+ behave differently to many of the standard widgets found in \QD.
+ Specifically, if a custom widget grabs the keyboard as a result of a call
+ to QWidget::grabKeyboard(), the operation of \QD will be affected.
+
+ To give custom widgets special behavior in \QD, provide an implementation
+ of the initialize() function to configure the widget construction process
+ for \QD specific behavior. This function will be called for the first time
+ before any calls to createWidget() and could perhaps set an internal flag
+ that can be tested later when \QD calls the plugin's createWidget()
+ function.
+
+
+ \target BuildingandInstallingthePlugin
+ \section1 Building and Installing the Plugin
+
+ The \c{.pro} file for a plugin must specify the headers and sources for
+ both the custom widget and the plugin interface. Typically, this file only
+ has to specify that the plugin's project is to be built as a library, but
+ with specific plugin support for \QD. This is done with the following
+ declarations:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.pro 1
+
+ If Qt is configured to build in both debug and release modes, \QD will be
+ built in release mode. When this occurs, it is necessary to ensure that
+ plugins are also built in release mode. To do this, include the following
+ declaration in the plugin's \c{.pro} file:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 3
+
+ If plugins are built in a mode that is incompatible with \QD, they will
+ not be loaded and installed. For more information about plugins, see the
+ \l{plugins-howto.html}{Plugins HOWTO} document.
+
+ It is also necessary to ensure that the plugin is installed together with
+ other \QD widget plugins:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 4
+
+ The \c $[QT_INSTALL_PLUGINS] variable is a placeholder to the location of
+ the installed Qt plugins. You can configure \QD to look for plugins in
+ other locations by setting the \c QT_PLUGIN_PATH environment variable
+ before running the application.
+
+ \note \QD will look for a \c designer subdirectory in each path supplied.
+
+ See QCoreApplication::libraryPaths() for more information about customizing
+ paths for libraries and plugins with Qt applications.
+
+\omit
+ \section1 Using Qt Script to Aid in Building Forms
+
+ Starting with Qt 4.3, \c .ui files may contain
+ \l{QtScript}{Qt Script} snippets that are executed by \l uic or QUiLoader
+ when building forms.
+
+ The snippets are executed per widget. The snippet may modify properties
+ or invoke slots on the widget.
+
+ Special variables are used to access the widget:
+
+ \table
+ \header
+ \o Name
+ \o Value
+ \row \o \c widget
+ \o The widget being built.
+ \row \o \c childWidgets
+ \o An array containing the child widgets. This is useful
+ for QDesignerContainerExtension subclasses.
+ \endtable
+
+ If scripts are present in an \c {uic}-generated form, the application
+ must be configured with Qt Script support.
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 5
+
+ For security reasons, the execution of scripts is disabled
+ by default in QUiLoader. You can enable it by
+ calling the QUiLoader::setScriptingEnabled() method.
+
+ The resulting script snippet is concatenated from snippets occurring in
+ several places:
+
+ \table
+ \header
+ \o Source
+ \o Usage
+ \row \o The \c codeTemplate() function of QDesignerCustomWidgetInterface
+ \o Allows snippets to be run on a per-class basis; for example, to set up a
+ container using the QDesignerContainerExtension.
+ \row \o The \c script() method of QDesignerScriptExtension
+ \o Allows snippets to be run on a per-widget basis; for example,
+ to set up the internal state of a custom widget.
+
+ Such an internal state might be, for example, the contents of
+ a custom item view container widget, for which an editor
+ is provided by an QDesignerTaskMenuExtension object.
+
+ \row \o Snippets entered at run-time using the \gui{Change script...}
+ option of the form's context menu
+ \o Fast prototyping. To get an idea,
+ drag a QLineEdit onto the form, enter the script
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 6
+ and preview the form.
+ \endtable
+\endomit
+
+
+ \section1 Related Examples
+
+ For more information on using custom widgets in \QD, refer to the
+ \l{designer/customwidgetplugin}{Custom Widget Plugin} and
+ \l{designer/worldtimeclockplugin}{World Time Clock Plugin} examples for more
+ information about using custom widgets in \QD. Also, you can use the
+ QDesignerCustomWidgetCollectionInterface class to combine several custom
+ widgets into a single library.
+*/
+
+
+/*!
+ \page designer-creating-custom-widgets-extensions.html
+ \previouspage Creating Custom Widgets for Qt Designer
+ \nextpage Qt Designer's UI File Format
+ \contentspage {Qt Designer Manual}{Contents}
+
+ \title Creating Custom Widget Extensions
+
+ Once you have a custom widget plugin for \QD, you can provide it with the
+ expected behavior and functionality within \QD's workspace, using custom
+ widget extensions.
+
+
+ \section1 Extension Types
+
+ There are several available types of extensions in \QD. You can use all of
+ these extensions in the same pattern, only replacing the respective
+ extension base class.
+
+ QDesignerContainerExtension is necessary when implementing a custom
+ multi-page container.
+
+ \table
+ \row
+ \i \inlineimage designer-manual-taskmenuextension.png
+ \i \bold{QDesignerTaskMenuExtension}
+
+ QDesignerTaskMenuExtension is useful for custom widgets. It provides an
+ extension that allows you to add custom menu entries to \QD's task
+ menu.
+
+ The \l{designer/taskmenuextension}{Task Menu Extension} example
+ illustrates how to use this class.
+
+ \row
+ \i \inlineimage designer-manual-containerextension.png
+ \i \bold{QDesignerContainerExtension}
+
+ QDesignerContainerExtension is necessary when implementing a custom
+ multi-page container. It provides an extension that allows you to add
+ and delete pages for a multi-page container plugin in \QD.
+
+ The \l{designer/containerextension}{Container Extension} example
+ further explains how to use this class.
+
+ \note It is not possible to add custom per-page properties for some
+ widgets (e.g., QTabWidget) due to the way they are implemented.
+ \endtable
+
+ \table
+ \row
+ \i \inlineimage designer-manual-membersheetextension.png
+ \i \bold{QDesignerMemberSheetExtension}
+
+ The QDesignerMemberSheetExtension class allows you to manipulate a
+ widget's member functions displayed when connecting signals and slots.
+
+ \row
+ \i \inlineimage designer-manual-propertysheetextension.png
+ \i \bold{QDesignerPropertySheetExtension,
+ QDesignerDynamicPropertySheetExtension}
+
+ These extension classes allow you to control how a widget's properties
+ are displayed in \QD's property editor.
+ \endtable
+
+\omit
+ \row
+ \o
+ \o \bold {QDesignerScriptExtension}
+
+ The QDesignerScriptExtension class allows you to define script
+ snippets that are executed when a form is loaded. The extension
+ is primarily intended to be used to set up the internal states
+ of custom widgets.
+ \endtable
+\endomit
+
+
+ \QD uses the QDesignerPropertySheetExtension and the
+ QDesignerMemberSheetExtension classes to feed its property and signal and
+ slot editors. Whenever a widget is selected in its workspace, \QD will
+ query for the widget's property sheet extension; likewise, whenever a
+ connection between two widgets is requested, \QD will query for the
+ widgets' member sheet extensions.
+
+ \warning All widgets have default property and member sheets. If you
+ implement custom property sheet or member sheet extensions, your custom
+ extensions will override the default sheets.
+
+
+ \section1 Creating an Extension
+
+ To create an extension you must inherit both QObject and the appropriate
+ base class, and reimplement its functions. Since we are implementing an
+ interface, we must ensure that it is made known to the meta object system
+ using the Q_INTERFACES() macro in the extension class's definition. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 7
+
+ This enables \QD to use the qobject_cast() function to query for supported
+ interfaces using a QObject pointer only.
+
+
+ \section1 Exposing an Extension to Qt Designer
+
+ In \QD the extensions are not created until they are required. For this
+ reason, when implementing extensions, you must subclass QExtensionFactory
+ to create a class that is able to make instances of your extensions. Also,
+ you must register your factory with \QD's extension manager; the extension
+ manager handles the construction of extensions.
+
+ When an extension is requested, \QD's extension manager will run through
+ its registered factories calling QExtensionFactory::createExtension() for
+ each of them until it finds one that is able to create the requested
+ extension for the selected widget. This factory will then make an instance
+ of the extension.
+
+ \image qtdesignerextensions.png
+
+
+ \section2 Creating an Extension Factory
+
+ The QExtensionFactory class provides a standard extension factory, but it
+ can also be used as an interface for custom extension factories.
+
+ The purpose is to reimplement the QExtensionFactory::createExtension()
+ function, making it able to create your extension, such as a
+ \l{designer/containerextension}{MultiPageWidget} container extension.
+
+ You can either create a new QExtensionFactory and reimplement the
+ QExtensionFactory::createExtension() function:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8
+
+ or you can use an existing factory, expanding the
+ QExtensionFactory::createExtension() function to enable the factory to
+ create your custom extension as well:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 9
+
+
+ \section2 Accessing Qt Designer's Extension Manager
+
+ When implementing a custom widget plugin, you must subclass the
+ QDesignerCustomWidgetInterface to expose your plugin to \QD. This is
+ covered in more detail in the
+ \l{Creating Custom Widgets for Qt Designer} section. The registration of
+ an extension factory is typically made in the
+ QDesignerCustomWidgetInterface::initialize() function:
+
+ \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 10
+
+ The \c formEditor parameter in the
+ QDesignerCustomWidgetInterface::initialize() function is a pointer to \QD's
+ current QDesignerFormEditorInterface object. You must use the
+ QDesignerFormEditorInterface::extensionManager() function to retrieve an
+ interface to \QD's extension manager. Then you use the
+ QExtensionManager::registerExtensions() function to register your custom
+ extension factory.
+
+
+ \section1 Related Examples
+
+ For more information on creating custom widget extensions in \QD, refer to
+ the \l{designer/taskmenuextension}{Task Menu Extension} and
+ \l{designer/containerextension}{Container Extension} examples.
+*/
+
+
+/*!
+ \page designer-ui-file-format.html
+ \previouspage Creating Custom Widget Extensions
+ \contentspage {Qt Designer Manual}{Contents}
+
+ \title Qt Designer's UI File Format
+
+ The \c .ui file format used by \QD is described by the
+ \l{http://www.w3.org/XML/Schema}{XML schema} presented below,
+ which we include for your convenience. Be aware that the format
+ may change in future Qt releases.
+
+ \quotefile tools/designer/data/ui4.xsd
+*/
+
+
+/*!
+ \page designer-recursive-shadow-casting.html
+ \title Implementation of the Recursive Shadow Casting Algorithm in Qt Designer
+ \contentspage {Qt Designer Manual}{Contents}
+
+ \ingroup licensing
+ \brief License information for contributions to specific parts of the Qt
+ Designer source code.
+
+ \legalese
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). \BR
+ Copyright (C) 2005 Bjoern Bergstroem
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, modify, market, reproduce,
+ grant sublicenses and distribute subject to the following conditions:
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software. These
+ files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE.
+ \endlegalese
+*/
diff --git a/doc/src/desktop-integration.qdoc b/doc/src/desktop-integration.qdoc
new file mode 100644
index 0000000..e52b8d8
--- /dev/null
+++ b/doc/src/desktop-integration.qdoc
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page desktop-integration.html
+ \title Desktop Integration
+ \ingroup gui-programming
+
+ Various classes in Qt are designed to help developers integrate applications into
+ users' desktop environments. These classes enable developers to take advantage
+ of native services while still using a cross-platform API.
+
+ \tableofcontents
+
+ \section1 Opening External Resources
+
+ Although Qt provides facilities to handle and display resources, such as
+ \l{QImageIOHandler}{common image formats} and \l{QTextDocument}{HTML},
+ it is sometimes necessary to open files and external resources using external
+ applications.
+
+ QDesktopServices provides an interface to services offered by the user's desktop
+ environment. In particular, the \l{QDesktopServices::}{openUrl()} function is
+ used to open resources using the appropriate application, which may have been
+ specifically configured by the user.
+
+ \section1 System Tray Icons
+
+ Many modern desktop environments feature docks or panels with \e{system trays}
+ in which applications can install icons. Applications often use system tray icons
+ to display status information, either by updating the icon itself or by showing
+ information in "balloon messages". Additionally, many applications provide
+ pop-up menus that can be accessed via their system tray icons.
+
+ The QSystemTrayIcon class exposes all of the above features via an intuitive
+ Qt-style API that can be used on all desktop platforms.
+
+ \section1 Desktop Widgets
+
+ On systems where the user's desktop is displayed using more than one screen,
+ certain types of applications may need to obtain information about the
+ configuration of the user's workspace to ensure that new windows and dialogs
+ are opened in appropriate locations.
+
+ The QDesktopWidget class can be used to monitor the positions of widgets and
+ notify applications about changes to the way the desktop is split over the
+ available screens. This enables applications to implement policies for
+ positioning new windows so that, for example, they do not distract a user
+ who is working on a specific task.
+
+
+*/
diff --git a/doc/src/developing-on-mac.qdoc b/doc/src/developing-on-mac.qdoc
new file mode 100644
index 0000000..00c54b6
--- /dev/null
+++ b/doc/src/developing-on-mac.qdoc
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page developing-on-mac.html
+ \title Developing Qt Applications on Mac OS X
+ \brief A overview of items to be aware of when developing Qt applications
+ on Mac OS X
+ \ingroup platform-notes
+
+ \tableofcontents
+
+ Mac OS X is a UNIX platform and behaves similar to other Unix-like
+ platforms. The main difference is X11 is not used as the primary windowing
+ system. Instead, Mac OS X uses its own native windowing system that is
+ accessible through the Carbon and Cocoa APIs. Application development on
+ Mac OS X is done using Xcode Tools, an optional install included on every
+ Mac with updates available from \l {http://developer.apple.com}{Apple's
+ developer website}. Xcode Tools includes Apple-modified versions of the GCC
+ compiler.
+
+
+ \section1 What Versions of Mac OS X are Supported?
+
+ As of Qt 4.5, Qt supports Mac OS X versions 10.3 (for \bold{deployment
+ only}, not for development), 10.4 and 10.5. It is usually in the best
+ interest of the developer and user to be running the latest updates to any
+ version. We test internally against Mac OS X 10.3.9 and Mac OS X 10.4.11 as
+ well as the updated release of Mac OS X 10.5.
+
+
+ \section2 Carbon or Cocoa?
+
+ Historically, Qt has used the Carbon toolkit, which supports 32-bit
+ applications on Mac OS X 10.3 and up. Qt 4.5 adds support for the Cocoa
+ toolkit, which requires 10.5 and provides 64-bit support.
+
+ This detail is typically not important to Qt application developers. Qt is
+ cross-platform across Carbon and Cocoa, and Qt applications behave
+ the same way when configured for either one. Eventually, the Carbon
+ version will be discontinued. This is something to keep in mind when you
+ consider writing code directly against native APIs.
+
+ The current binary for Qt is built for Carbon. If you want to choose which
+ framework Qt will use, you must build from scratch. Carbon or Cocoa is
+ chosen when configuring the package for building. The configure process
+ selects Carbon by default, to specify Cocoa use the \c{-cocoa} flag.
+ configure for a 64-bit architecture using one of the \c{-arch} flags (see
+ \l{universal binaries}{Universal Binaries}).
+
+ Currently, Apple's GCC 4.0.1 is used by default. When building on 10.5,
+ Apple's GCC 4.2 is also available and selectable with the configure flag:
+ \c{-platform macx-g++42}. GCC 3.x will \e not work. Experimental LLVM-GCC
+ support is available by passing in the \c{-platform macx-llvm} flag.
+
+ The following table summarizes the different versions of Mac OS X and what
+ capabilities are used by Qt.
+
+ \table
+ \header
+ \o Mac OS X Version
+ \o Cat Name
+ \o Native API Used by Qt
+ \o Bits available to address memory
+ \o CPU Architecture Supported
+ \o Development Platform
+ \row
+ \o 10.3
+ \o Panther
+ \o Carbon
+ \o 32
+ \o PPC
+ \o No
+ \row
+ \o 10.4
+ \o Tiger
+ \o Carbon
+ \o 32
+ \o PPC/Intel
+ \o Yes
+ \row
+ \o 10.5
+ \o Leopard
+ \o Carbon
+ \o 32
+ \o PPC/Intel
+ \o Yes
+ \row
+ \o 10.5
+ \o Leopard
+ \o Cocoa
+ \o 32/64
+ \o PPC/Intel
+ \o Yes
+ \endtable
+
+ \section2 Which One Should I Use?
+
+ Carbon and Cocoa both have their advantages and disadvantages. Probably the
+ easiest way to determine is to look at the version of Mac OS X you are
+ targetting. If you are starting a new application and can target 10.5 and
+ up, then please consider Cocoa only. If you have an existing application or
+ need to target earlier versions of the operating system and do not need
+ access to 64-bit or newer Apple technologies, then Carbon is a good fit. If
+ your needs fall in between, you can go with a 64-bit Cocoa and 32-bit
+ Carbon universal application with the appropriate checks in your code to
+ choose the right path based on where you are running the application.
+
+ \target universal binaries
+ \section1 Universal Binaries
+
+ In 2006, Apple begin transitioning from PowerPC (PPC) to Intel (x86)
+ systems. Both architectures are supported by Qt. The release of Mac OS X
+ 10.5 in October 2007 added the possibility of writing and deploying 64-bit
+ GUI applications. Qt 4.5 supports both the 32-bit (PPC and x86) and 64-bit
+ (PPC64 and x86-64) versions of PowerPC and Intel-based systems are
+ supported.
+
+ Universal binaries are used to bundle binaries for more than one
+ architecture into a single package, simplifying deployment and
+ distribution. When running an application the operating system will select
+ the most appropriate architecture. Universal binaries support the following
+ architectures; they can be added to the build at configure time using the
+ \c{-arch} arguments:
+
+ \table
+ \header
+ \o Architecture
+ \o Flag
+ \row
+ \o Intel, 32-bit
+ \o \c{-arch x86}
+ \row
+ \o Intel, 64-bit
+ \o \c{-arch x86_64}
+ \row
+ \o PPC, 32-bit
+ \o \c{-arch ppc}
+ \row
+ \o PPC, 64-bit
+ \o \c{-arch ppc64}
+ \endtable
+
+ If there are no \c{-arch} flags specified, configure builds for the 32-bit
+ architecture, if you are currently on one. Universal binaries were initially
+ used to simplify the PPC to Intel migration. You can use \c{-universal} to
+ build for both the 32-bit Intel and PPC architectures.
+
+ \note The \c{-arch} flags at configure time only affect how Qt is built.
+ Applications are by default built for the 32-bit architecture you are
+ currently on. To build a universal binary, add the architectures to the
+ CONFIG variable in the .pro file:
+
+ \code
+ CONFIG += x86 ppc x86_64 ppc64
+ \endcode
+
+
+ \section1 Day-to-Day Application Development on OS X
+
+ On the command-line, applications can be built using \c qmake and \c make.
+ Optionally, \c qmake can generate project files for Xcode with
+ \c{-spec macx-xcode}. If you are using the binary package, \c qmake
+ generates Xcode projects by default; use \c{-spec macx-gcc} to generate
+ makefiles.
+
+ The result of the build process is an application bundle, which is a
+ directory structure that contains the actual application executable. The
+ application can be launched by double-clicking it in Finder, or by
+ referring directly to its executable from the command line, i. e.
+ \c{myApp.app/Contents/MacOS/myApp}.
+
+ If you wish to have a command-line tool that does not use the GUI (e.g.,
+ \c moc, \c uic or \c ls), you can tell \c qmake not to execute the bundle
+ creating steps by removing it from the \c{CONFIG} in your \c{.pro} file:
+
+ \code
+ CONFIG -= app_bundle
+ \endcode
+
+
+ \section1 Deployment - "Compile once, deploy everywhere"
+
+ In general, Qt supports building on one Mac OS X version and deploying on
+ all others, both forward and backwards. You can build on 10.4 Tiger and run
+ the same binary on 10.3 and 10.5.
+
+ Some restrictions apply:
+
+ \list
+ \o Some functions and optimization paths that exist in later versions
+ of Mac OS X will not be available if you build on an earlier
+ version of Mac OS X.
+ \o The CPU architecture should match.
+ \o Cocoa support is only available for Mac OS X 10.5 and up.
+ \endlist
+
+ Universal binaries can be used to provide a smorgasbord of configurations
+ catering to all possible architectures.
+
+ Mac applications are typically deployed as self-contained application
+ bundles. The application bundle contains the application executable as well
+ as dependencies such as the Qt libraries, plugins, translations and other
+ resources you may need. Third party libraries like Qt are normally not
+ installed system-wide; each application provides its own copy.
+
+ The most common way to distribute applications is to provide a compressed
+ disk image (.dmg file) that the user can mount in Finder. The Mac
+ deployment tool (macdeployqt) can be used to create the self-contained bundles, and
+ optionally also create a .dmg archive. See the
+ \l{Deploying an Application on Mac OS X}{Mac deployment guide} for more
+ information about deployment. It is also possible to use an installer
+ wizard. More information on this option can be found in
+ \l{http://developer.apple.com/mac/}{Apple's documentation}.
+*/
+
diff --git a/doc/src/diagrams/arthurplugin-demo.png b/doc/src/diagrams/arthurplugin-demo.png
new file mode 100644
index 0000000..3b03341
--- /dev/null
+++ b/doc/src/diagrams/arthurplugin-demo.png
Binary files differ
diff --git a/doc/src/diagrams/arthurplugin-demo.ui b/doc/src/diagrams/arthurplugin-demo.ui
new file mode 100644
index 0000000..1bf39c2
--- /dev/null
+++ b/doc/src/diagrams/arthurplugin-demo.ui
@@ -0,0 +1,58 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>532</width>
+ <height>452</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <widget class="PathDeformRendererEx" name="pathdeformrendererex" >
+ <property name="geometry" >
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>300</width>
+ <height>200</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="PathStrokeRendererEx" name="pathstrokerendererex" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>230</y>
+ <width>300</width>
+ <height>200</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>PathStrokeRendererEx</class>
+ <extends></extends>
+ <header>pathstroke.h</header>
+ <container>0</container>
+ <pixmap></pixmap>
+ </customwidget>
+ <customwidget>
+ <class>PathDeformRendererEx</class>
+ <extends></extends>
+ <header>deform.h</header>
+ <container>0</container>
+ <pixmap></pixmap>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/assistant-manual/assistant-assistant.png b/doc/src/diagrams/assistant-manual/assistant-assistant.png
new file mode 100644
index 0000000..d728889
--- /dev/null
+++ b/doc/src/diagrams/assistant-manual/assistant-assistant.png
Binary files differ
diff --git a/doc/src/diagrams/assistant-manual/assistant-assistant.zip b/doc/src/diagrams/assistant-manual/assistant-assistant.zip
new file mode 100644
index 0000000..3ea5921
--- /dev/null
+++ b/doc/src/diagrams/assistant-manual/assistant-assistant.zip
Binary files differ
diff --git a/doc/src/diagrams/assistant-manual/assistant-temp-toolbar.png b/doc/src/diagrams/assistant-manual/assistant-temp-toolbar.png
new file mode 100644
index 0000000..d85439c
--- /dev/null
+++ b/doc/src/diagrams/assistant-manual/assistant-temp-toolbar.png
Binary files differ
diff --git a/doc/src/diagrams/boat.png b/doc/src/diagrams/boat.png
new file mode 100644
index 0000000..3401dc3
--- /dev/null
+++ b/doc/src/diagrams/boat.png
Binary files differ
diff --git a/doc/src/diagrams/boat.sk b/doc/src/diagrams/boat.sk
new file mode 100644
index 0000000..01ff8ce
--- /dev/null
+++ b/doc/src/diagrams/boat.sk
@@ -0,0 +1,65 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(90,0,0,-65,35,810)
+G()
+gl([(0,(0.718,0.667,0.533)),(1,(0.839,0.739,0.586))])
+pgl(0,-1,0)
+fp()
+lw(1)
+b()
+bs(82.5,765,0)
+bs(82.5,805,0)
+bs(77.5,805,0)
+bs(77.5,765,0)
+bs(82.5,765,0)
+bC()
+G()
+fp((0.718,0.082,0.108))
+lw(1)
+b()
+bs(82.5,805,0)
+bs(82.5,800,0)
+bs(92.5,802.5,0)
+bs(82.5,805,0)
+bC()
+G()
+gl([(0,(0.718,0.667,0.533)),(1,(0.839,0.739,0.586))])
+pgl(0,-1,0)
+fp()
+lw(1)
+b()
+bs(67.5,750,0)
+bs(92.5,750,0)
+bs(117.5,765,0)
+bs(42.5,765,0)
+bs(67.5,750,0)
+bC()
+gl([(0,(0.718,0.718,0.718)),(1,(1,1,1))])
+pgl(0,-1,0)
+fp()
+lw(1)
+b()
+bs(77.5,800,0)
+bs(47.5,770,0)
+bs(77.5,770,0)
+bs(77.5,800,0)
+bC()
+gl([(0,(0.718,0.718,0.718)),(1,(1,1,1))])
+pgl(0,-1,0)
+fp()
+lw(1)
+b()
+bs(82.5,800,0)
+bs(82.5,770,0)
+bs(112.5,770,0)
+bs(82.5,800,0)
+bC()
+G_()
+G_()
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/car.png b/doc/src/diagrams/car.png
new file mode 100644
index 0000000..99c741d
--- /dev/null
+++ b/doc/src/diagrams/car.png
Binary files differ
diff --git a/doc/src/diagrams/car.sk b/doc/src/diagrams/car.sk
new file mode 100644
index 0000000..4c4c51d
--- /dev/null
+++ b/doc/src/diagrams/car.sk
@@ -0,0 +1,69 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.846,0.35,0.35))
+lw(1)
+b()
+bs(65,765,0)
+bs(95,765,0)
+bs(115,765,0)
+bs(120,770,0)
+bs(120,780,0)
+bs(115,785,0)
+bs(105,785,0)
+bs(95,795,0)
+bs(65,795,0)
+bs(55,785,0)
+bs(45,785,0)
+bs(40,780,0)
+bs(40,770,0)
+bs(45,765,0)
+bs(65,765,0)
+bC()
+fp((1,1,1))
+lw(1)
+e(7.5,0,0,-7.5,57.5,765)
+fp((1,1,1))
+lw(1)
+e(7.5,0,0,-7.5,102.5,765)
+gl([(0,(1,1,1)),(1,(0.839,0.839,0.839))])
+pgl(-0.812015,0.583636,0)
+fp()
+lw(1)
+b()
+bs(55,785,0)
+bs(105,785,0)
+bs(95,795,0)
+bs(85,795,0)
+bs(85,785,0)
+bs(80,785,0)
+bs(80,795,0)
+bs(65,795,0)
+bs(55,785,0)
+bC()
+fp((0.966,0.4,0.4))
+lw(1)
+b()
+bs(65,785,0)
+bs(65,770,0)
+bs(70,765,0)
+bs(80,765,0)
+bs(80,785,0)
+bs(65,785,0)
+bC()
+fp((0.966,0.4,0.4))
+lw(1)
+b()
+bs(80,785,0)
+bs(80,765,0)
+bs(90,765,0)
+bs(95,770,0)
+bs(95,785,0)
+bs(80,785,0)
+bC()
+le()
+lw(1)
+r(90,0,0,-65,35,810)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/chip-demo.png b/doc/src/diagrams/chip-demo.png
new file mode 100644
index 0000000..cd81ebe
--- /dev/null
+++ b/doc/src/diagrams/chip-demo.png
Binary files differ
diff --git a/doc/src/diagrams/chip-demo.zip b/doc/src/diagrams/chip-demo.zip
new file mode 100644
index 0000000..dcc6072
--- /dev/null
+++ b/doc/src/diagrams/chip-demo.zip
Binary files differ
diff --git a/doc/src/diagrams/cleanlooks-dialogbuttonbox.png b/doc/src/diagrams/cleanlooks-dialogbuttonbox.png
new file mode 100644
index 0000000..21c7981
--- /dev/null
+++ b/doc/src/diagrams/cleanlooks-dialogbuttonbox.png
Binary files differ
diff --git a/doc/src/diagrams/clock.png b/doc/src/diagrams/clock.png
new file mode 100644
index 0000000..c4bbeea
--- /dev/null
+++ b/doc/src/diagrams/clock.png
Binary files differ
diff --git a/doc/src/diagrams/completer-example-shaped.png b/doc/src/diagrams/completer-example-shaped.png
new file mode 100644
index 0000000..a3afed4
--- /dev/null
+++ b/doc/src/diagrams/completer-example-shaped.png
Binary files differ
diff --git a/doc/src/diagrams/complexwizard-flow.sk b/doc/src/diagrams/complexwizard-flow.sk
new file mode 100644
index 0000000..a4b0668
--- /dev/null
+++ b/doc/src/diagrams/complexwizard-flow.sk
@@ -0,0 +1,62 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(1083919052,'../images/complexwizard-evaluatepage.png')
+im((96.171,8.31514),1083919052)
+G()
+bm(1083939916,'../images/complexwizard-finishpage.png')
+im((598.76,309.977),1083939916)
+bm(1083947948,'../images/complexwizard-titlepage.png')
+im((-426.888,309.977),1083947948)
+G_()
+G()
+bm(1083738188,'../images/complexwizard-detailspage.png')
+im((438.772,659.042),1083738188)
+bm(1083948908,'../images/complexwizard-registerpage.png')
+im((-246.43,659.042),1083948908)
+G_()
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-135.462,551.306,0)
+bs(-53.5823,638.572,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(266.571,764.5,0)
+bs(411,764.5,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-112.837,286.275,0)
+bs(63.8503,162.378,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(617.918,157.295,0)
+bs(794.606,281.191,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(682.256,643.959,0)
+bs(764.136,556.693,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(196,641,0)
+bs(567,443.5,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,0.5,0.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/composition-demo.png b/doc/src/diagrams/composition-demo.png
new file mode 100644
index 0000000..22689ea
--- /dev/null
+++ b/doc/src/diagrams/composition-demo.png
Binary files differ
diff --git a/doc/src/diagrams/contentspropagation/background.png b/doc/src/diagrams/contentspropagation/background.png
new file mode 100644
index 0000000..21d205e
--- /dev/null
+++ b/doc/src/diagrams/contentspropagation/background.png
Binary files differ
diff --git a/doc/src/diagrams/contentspropagation/base.png b/doc/src/diagrams/contentspropagation/base.png
new file mode 100644
index 0000000..a9fc405
--- /dev/null
+++ b/doc/src/diagrams/contentspropagation/base.png
Binary files differ
diff --git a/doc/src/diagrams/contentspropagation/customwidget.py b/doc/src/diagrams/contentspropagation/customwidget.py
new file mode 100755
index 0000000..89e0b1b
--- /dev/null
+++ b/doc/src/diagrams/contentspropagation/customwidget.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+
+import os, sys
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+class CustomWidget(QWidget):
+
+ def __init__(self, parent, fake = False):
+
+ QWidget.__init__(self, parent)
+ gradient = QLinearGradient(QPointF(0, 0), QPointF(100.0, 100.0))
+ baseColor = QColor(0xa6, 0xce, 0x39, 0x7f)
+ gradient.setColorAt(0.0, baseColor.light(150))
+ gradient.setColorAt(0.75, baseColor.light(75))
+ self.brush = QBrush(gradient)
+ self.fake = fake
+ self.fakeBrush = QBrush(Qt.red, Qt.DiagCrossPattern)
+
+ qtPath = QPainterPath()
+ qtPath.setFillRule(Qt.OddEvenFill)
+ qtPath.moveTo(-45.0, -20.0)
+ qtPath.lineTo(0.0, -45.0)
+ qtPath.lineTo(45.0, -20.0)
+ qtPath.lineTo(45.0, 45.0)
+ qtPath.lineTo(-45.0, 45.0)
+ qtPath.lineTo(-45.0, -20.0)
+ qtPath.closeSubpath()
+ qtPath.moveTo(15.0, 5.0)
+ qtPath.lineTo(35.0, 5.0)
+ qtPath.lineTo(35.0, 40.0)
+ qtPath.lineTo(15.0, 40.0)
+ qtPath.lineTo(15.0, 5.0)
+ qtPath.moveTo(-35.0, -15.0)
+ qtPath.closeSubpath()
+ qtPath.lineTo(-10.0, -15.0)
+ qtPath.lineTo(-10.0, 10.0)
+ qtPath.lineTo(-35.0, 10.0)
+ qtPath.lineTo(-35.0, -15.0)
+ qtPath.closeSubpath()
+ self.path = qtPath
+
+ def paintEvent(self, event):
+
+ painter = QPainter()
+ painter.begin(self)
+ painter.setRenderHint(QPainter.Antialiasing)
+ if self.fake:
+ painter.fillRect(event.rect(), QBrush(Qt.white))
+ painter.fillRect(event.rect(), self.fakeBrush)
+ painter.setBrush(self.brush)
+ painter.translate(60, 60)
+ painter.drawPath(self.path)
+ painter.end()
+
+ def sizeHint(self):
+
+ return QSize(120, 120)
+
+ def minimumSizeHint(self):
+
+ return QSize(120, 120)
+
+
+if __name__ == "__main__":
+
+ try:
+ qt = sys.argv[1]
+ except IndexError:
+ qt = "4.1"
+
+ if qt != "4.0" and qt != "4.1":
+ sys.stderr.write("Usage: %s [4.0|4.1]\n" % sys.argv[0])
+ sys.exit(1)
+
+ app = QApplication(sys.argv)
+ exec_dir = os.path.split(os.path.abspath(sys.argv[0]))[0]
+ label = QLabel()
+ label.setPixmap(QPixmap(os.path.join(exec_dir, "background.png")))
+
+ layout = QGridLayout()
+ label.setLayout(layout)
+ if qt == "4.0":
+ layout.addWidget(CustomWidget(label), 0, 0, Qt.AlignCenter)
+ caption = QLabel("Opaque (Default)", label)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 0, Qt.AlignCenter | Qt.AlignTop)
+ elif qt == "4.1":
+ layout.addWidget(CustomWidget(label), 0, 0, Qt.AlignCenter)
+ caption = QLabel("Contents Propagated (Default)", label)
+ caption.setAutoFillBackground(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 0, Qt.AlignCenter | Qt.AlignTop)
+
+ if qt == "4.0":
+ contentsWidget = CustomWidget(label)
+ contentsWidget.setAttribute(Qt.WA_ContentsPropagated, True)
+ layout.addWidget(contentsWidget, 0, 1, Qt.AlignCenter)
+ caption = QLabel("With WA_ContentsPropagated set", label)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 1, Qt.AlignCenter | Qt.AlignTop)
+ elif qt == "4.1":
+ autoFillWidget = CustomWidget(label)
+ autoFillWidget.setAutoFillBackground(True)
+ layout.addWidget(autoFillWidget, 0, 1, Qt.AlignCenter)
+ caption = QLabel("With autoFillBackground set", label)
+ caption.setAutoFillBackground(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 1, Qt.AlignCenter | Qt.AlignTop)
+
+ if qt == "4.0":
+ noBackgroundWidget = CustomWidget(label, fake = True)
+ noBackgroundWidget.setAttribute(Qt.WA_NoBackground, True)
+ layout.addWidget(noBackgroundWidget, 0, 2, Qt.AlignCenter)
+ caption = QLabel("With WA_NoBackground set", label)
+ caption.setWordWrap(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 2, Qt.AlignCenter | Qt.AlignTop)
+ elif qt == "4.1":
+ opaqueWidget = CustomWidget(label, fake = True)
+ opaqueWidget.setAttribute(Qt.WA_OpaquePaintEvent, True)
+ layout.addWidget(opaqueWidget, 0, 2, Qt.AlignCenter)
+ caption = QLabel("With WA_OpaquePaintEvent set", label)
+ caption.setAutoFillBackground(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 2, Qt.AlignCenter | Qt.AlignTop)
+
+ if qt == "4.0":
+ label.setWindowTitle("Qt 4.0: Painting Custom Widgets")
+ elif qt == "4.1":
+ label.setWindowTitle("Qt 4.1: Painting Custom Widgets")
+
+ label.resize(404, 160)
+ label.show()
+ sys.exit(app.exec_())
diff --git a/doc/src/diagrams/contentspropagation/lightbackground.png b/doc/src/diagrams/contentspropagation/lightbackground.png
new file mode 100644
index 0000000..3006044
--- /dev/null
+++ b/doc/src/diagrams/contentspropagation/lightbackground.png
Binary files differ
diff --git a/doc/src/diagrams/contentspropagation/standardwidgets.py b/doc/src/diagrams/contentspropagation/standardwidgets.py
new file mode 100755
index 0000000..975287d
--- /dev/null
+++ b/doc/src/diagrams/contentspropagation/standardwidgets.py
@@ -0,0 +1,144 @@
+#!/usr/bin/env python
+
+import os, sys
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+
+def createGroupBox(parent, attributes = None, fill = False, fake = False):
+
+ background = CustomWidget(parent, fake)
+ backgroundLayout = QVBoxLayout()
+ backgroundLayout.setMargin(4)
+ background.setLayout(backgroundLayout)
+
+ groupBox = QGroupBox("&Options")
+ layout = QGridLayout()
+ groupBox.setLayout(layout)
+ layout.addWidget(QCheckBox("C&ase sensitive"), 0, 0)
+ layout.addWidget(QCheckBox("W&hole words"), 0, 1)
+ checkedBox = QCheckBox("Search &forwards")
+ checkedBox.setChecked(True)
+ layout.addWidget(checkedBox, 1, 0)
+ layout.addWidget(QCheckBox("From &start of text"), 1, 1)
+
+ backgroundLayout.addWidget(groupBox)
+
+ if attributes:
+ for attr in attributes:
+ groupBox.setAttribute(attr, True)
+ if not fake:
+ background.setAttribute(attr, True)
+
+ groupBox.setAutoFillBackground(fill)
+ background.setAutoFillBackground(fill)
+
+ return background
+
+class CustomWidget(QWidget):
+
+ def __init__(self, parent, fake = False):
+
+ QWidget.__init__(self, parent)
+ self.fake = fake
+ self.fakeBrush = QBrush(Qt.red, Qt.DiagCrossPattern)
+
+ def paintEvent(self, event):
+
+ painter = QPainter()
+ painter.begin(self)
+ painter.setRenderHint(QPainter.Antialiasing)
+ if self.fake:
+ painter.fillRect(event.rect(), QBrush(Qt.white))
+ painter.fillRect(event.rect(), self.fakeBrush)
+ painter.end()
+
+
+if __name__ == "__main__":
+
+ try:
+ qt = sys.argv[1]
+ except IndexError:
+ qt = "4.1"
+
+ if qt != "4.0" and qt != "4.1":
+ sys.stderr.write("Usage: %s [4.0|4.1]\n" % sys.argv[0])
+ sys.exit(1)
+
+ app = QApplication(sys.argv)
+ exec_dir = os.path.split(os.path.abspath(sys.argv[0]))[0]
+ label = QLabel()
+ label.setPixmap(QPixmap(os.path.join(exec_dir, "lightbackground.png")))
+
+ layout = QGridLayout()
+ label.setLayout(layout)
+ if qt == "4.0":
+ layout.addWidget(createGroupBox(label), 0, 0, Qt.AlignCenter)
+ caption = QLabel("Opaque (Default)", label)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 0, Qt.AlignCenter | Qt.AlignTop)
+ elif qt == "4.1":
+ layout.addWidget(createGroupBox(label), 0, 0, Qt.AlignCenter)
+ caption = QLabel("Contents Propagated (Default)", label)
+ caption.setAutoFillBackground(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 0, Qt.AlignCenter | Qt.AlignTop)
+
+ if qt == "4.0":
+ contentsWidget = createGroupBox(label)
+ contentsWidget.setAttribute(Qt.WA_ContentsPropagated, True)
+ layout.addWidget(contentsWidget, 0, 1, Qt.AlignCenter)
+ caption = QLabel("With WA_ContentsPropagated set", label)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 1, Qt.AlignCenter | Qt.AlignTop)
+ elif qt == "4.1":
+ autoFillWidget = createGroupBox(label, fill = True)
+ layout.addWidget(autoFillWidget, 0, 1, Qt.AlignCenter)
+ caption = QLabel("With autoFillBackground set", label)
+ caption.setAutoFillBackground(True)
+ caption.setMargin(2)
+ layout.addWidget(caption, 1, 1, Qt.AlignCenter | Qt.AlignTop)
+
+# if qt == "4.0":
+# noBackgroundWidget = createGroupBox(
+# label, attributes = [Qt.WA_NoBackground], fake = True)
+# layout.addWidget(noBackgroundWidget, 2, 0, Qt.AlignCenter)
+# caption = QLabel("With WA_NoBackground set", label)
+# caption.setWordWrap(True)
+# caption.setMargin(2)
+# layout.addWidget(caption, 3, 0, Qt.AlignCenter | Qt.AlignTop)
+# elif qt == "4.1":
+# opaqueWidget = createGroupBox(
+# label, attributes = [Qt.WA_OpaquePaintEvent], fake = True)
+# layout.addWidget(opaqueWidget, 2, 0, Qt.AlignCenter)
+# caption = QLabel("With WA_OpaquePaintEvent set", label)
+# caption.setAutoFillBackground(True)
+# caption.setMargin(2)
+# layout.addWidget(caption, 3, 0, Qt.AlignCenter | Qt.AlignTop)
+#
+# if qt == "4.0":
+# contentsNoBackgroundWidget = createGroupBox(
+# label, attributes = [Qt.WA_ContentsPropagated, Qt.WA_NoBackground],
+# fake = True)
+# layout.addWidget(contentsNoBackgroundWidget, 2, 1, Qt.AlignCenter)
+# caption = QLabel("With WA_ContentsPropagated and WA_NoBackground set", label)
+# caption.setMargin(2)
+# layout.addWidget(caption, 3, 1, Qt.AlignCenter | Qt.AlignTop)
+# elif qt == "4.1":
+# opaqueAutoFillWidget = createGroupBox(
+# label, attributes = [Qt.WA_OpaquePaintEvent], fill = True, fake = True)
+# layout.addWidget(opaqueAutoFillWidget, 2, 1, Qt.AlignCenter)
+# caption = QLabel("With WA_OpaquePaintEvent and autoFillBackground set", label)
+# caption.setWordWrap(True)
+# caption.setAutoFillBackground(True)
+# caption.setMargin(2)
+# layout.addWidget(caption, 3, 1, Qt.AlignCenter | Qt.AlignTop)
+
+ if qt == "4.0":
+ label.setWindowTitle("Qt 4.0: Painting Standard Qt Widgets")
+ elif qt == "4.1":
+ label.setWindowTitle("Qt 4.1: Painting Standard Qt Widgets")
+
+ label.resize(480, 140)
+ label.show()
+ sys.exit(app.exec_())
diff --git a/doc/src/diagrams/coordinatesystem-line-antialias.sk b/doc/src/diagrams/coordinatesystem-line-antialias.sk
new file mode 100644
index 0000000..323065e
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-line-antialias.sk
@@ -0,0 +1,310 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+lw(1)
+r(25,0,0,-25,120,760)
+lw(1)
+r(25,0,0,-25,120,610)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,270,760)
+lw(1)
+r(25,0,0,-25,270,610)
+lw(1)
+r(25,0,0,-25,120,685)
+lw(1)
+r(25,0,0,-25,270,685)
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,145,610)
+lw(1)
+r(25,0,0,-25,145,685)
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+lw(1)
+r(25,0,0,-25,220,610)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,220,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+lw(1)
+r(25,0,0,-25,295,685)
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,245,760)
+lw(1)
+r(25,0,0,-25,245,610)
+lw(1)
+r(25,0,0,-25,245,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,270.5,735.5)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,169.5,584.75)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-line-raster.sk b/doc/src/diagrams/coordinatesystem-line-raster.sk
new file mode 100644
index 0000000..fe73f5a
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-line-raster.sk
@@ -0,0 +1,301 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+lw(1)
+r(25,0,0,-25,120,760)
+lw(1)
+r(25,0,0,-25,120,610)
+lw(1)
+r(25,0,0,-25,270,760)
+lw(1)
+r(25,0,0,-25,270,610)
+lw(1)
+r(25,0,0,-25,120,685)
+lw(1)
+r(25,0,0,-25,270,685)
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+lw(1)
+r(25,0,0,-25,145,610)
+lw(1)
+r(25,0,0,-25,145,685)
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+lw(1)
+r(25,0,0,-25,220,610)
+lw(1)
+r(25,0,0,-25,220,685)
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+lw(1)
+r(25,0,0,-25,295,685)
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+lw(1)
+r(25,0,0,-25,245,760)
+lw(1)
+r(25,0,0,-25,245,610)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,245,685)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,270,736)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,170.5,585.75)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-line.sk b/doc/src/diagrams/coordinatesystem-line.sk
new file mode 100644
index 0000000..24f46c4
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-line.sk
@@ -0,0 +1,297 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+fp((0.255,0.517,0.194))
+lw(1)
+r(114.376,169.485,19.5726,-13.2045,152.901,582.485)
+lw(1)
+r(25,0,0,-25,120,760)
+lw(1)
+r(25,0,0,-25,120,610)
+lw(1)
+r(25,0,0,-25,270,760)
+lw(1)
+r(25,0,0,-25,270,610)
+lw(1)
+r(25,0,0,-25,120,685)
+lw(1)
+r(25,0,0,-25,270,685)
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+lw(1)
+r(25,0,0,-25,145,610)
+lw(1)
+r(25,0,0,-25,145,685)
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+lw(1)
+r(25,0,0,-25,220,610)
+lw(1)
+r(25,0,0,-25,220,685)
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+lw(1)
+r(25,0,0,-25,295,685)
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+lw(1)
+r(25,0,0,-25,245,760)
+lw(1)
+r(25,0,0,-25,245,610)
+lw(1)
+r(25,0,0,-25,245,685)
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,270.5,735.5)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,169.5,584.75)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-rect-antialias.sk b/doc/src/diagrams/coordinatesystem-rect-antialias.sk
new file mode 100644
index 0000000..30d7a61
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-rect-antialias.sk
@@ -0,0 +1,334 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.73,0.866,0.68))
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+lw(1)
+r(25,0,0,-25,120,760)
+fp((0.73,0.866,0.68))
+lw(1)
+r(25,0,0,-25,120,610)
+lw(1)
+r(25,0,0,-25,270,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,270,610)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,120,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,270,685)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,145,610)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,145,685)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+fp((0.255,0.517,0.194))
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,220,610)
+lw(1)
+r(25,0,0,-25,220,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+fp((0.73,0.866,0.68))
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+fp((0.73,0.866,0.68))
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,295,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+lw(1)
+r(25,0,0,-25,245,760)
+fp((0.583,0.819,0.374))
+lw(1)
+r(25,0,0,-25,245,610)
+lw(1)
+r(25,0,0,-25,245,685)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+fp((0.336,0.691,0.26))
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,295,610)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,144.5,709.75)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-rect-raster.sk b/doc/src/diagrams/coordinatesystem-rect-raster.sk
new file mode 100644
index 0000000..7de01af
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-rect-raster.sk
@@ -0,0 +1,314 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+lw(1)
+r(25,0,0,-25,120,760)
+lw(1)
+r(25,0,0,-25,120,610)
+lw(1)
+r(25,0,0,-25,270,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,270,610)
+lw(1)
+r(25,0,0,-25,120,685)
+lw(1)
+r(25,0,0,-25,270,685)
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,145,610)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,145,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,220,610)
+lw(1)
+r(25,0,0,-25,220,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,295,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+lw(1)
+r(25,0,0,-25,245,760)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,245,610)
+lw(1)
+r(25,0,0,-25,245,685)
+fp((0.34,0.564,0.196))
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,145,710)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,294.75,610)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-rect.sk b/doc/src/diagrams/coordinatesystem-rect.sk
new file mode 100644
index 0000000..2b95f64
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-rect.sk
@@ -0,0 +1,305 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.371,0.57,0.195))
+lw(1)
+r(174.5,0,0,-125.5,133.138,722.445)
+phs((0.216,0.403,0.141),(0.371,0.569,0.195),1,0,2,0.5)
+fp()
+lw(1)
+r(150,0,0,-100,145.138,709.945)
+phs((0.216,0.403,0.141),(0.991,1,0.991),1,0,2,0.5)
+fp()
+lw(1)
+r(127,0,0,-79.5,155.638,699.945)
+lw(1)
+r(25,0,0,-25,120.125,734.875)
+lw(1)
+r(25,0,0,-25,120.125,584.875)
+lw(1)
+r(25,0,0,-25,270.125,734.875)
+lw(1)
+r(25,0,0,-25,270.125,584.875)
+lw(1)
+r(25,0,0,-25,120.125,659.875)
+lw(1)
+r(25,0,0,-25,270.125,659.875)
+lw(1)
+r(25,0,0,-25,120,760)
+lw(1)
+r(25,0,0,-25,120,610)
+lw(1)
+r(25,0,0,-25,270,760)
+lw(1)
+r(25,0,0,-25,270,610)
+lw(1)
+r(25,0,0,-25,120,685)
+lw(1)
+r(25,0,0,-25,270,685)
+lw(1)
+r(25,0,0,-25,120.125,710.125)
+lw(1)
+r(25,0,0,-25,120.125,560.125)
+lw(1)
+r(25,0,0,-25,270.125,710.125)
+lw(1)
+r(25,0,0,-25,270.125,560.125)
+lw(1)
+r(25,0,0,-25,120.125,635.125)
+lw(1)
+r(25,0,0,-25,270.125,635.125)
+lw(1)
+r(25,0,0,-25,195.125,734.875)
+lw(1)
+r(25,0,0,-25,195.125,584.875)
+lw(1)
+r(25,0,0,-25,320.125,734.875)
+lw(1)
+r(25,0,0,-25,320.125,584.875)
+lw(1)
+r(25,0,0,-25,195.125,659.875)
+lw(1)
+r(25,0,0,-25,320.125,659.875)
+lw(1)
+r(25,0,0,-25,195,760)
+lw(1)
+r(25,0,0,-25,195,610)
+lw(1)
+r(25,0,0,-25,320,760)
+lw(1)
+r(25,0,0,-25,320,610)
+lw(1)
+r(25,0,0,-25,195,685)
+lw(1)
+r(25,0,0,-25,320,685)
+lw(1)
+r(25,0,0,-25,195.125,710.125)
+lw(1)
+r(25,0,0,-25,195.125,560.125)
+lw(1)
+r(25,0,0,-25,320.125,710.125)
+lw(1)
+r(25,0,0,-25,320.125,560.125)
+lw(1)
+r(25,0,0,-25,195.125,635.125)
+lw(1)
+r(25,0,0,-25,320.125,635.125)
+lw(1)
+r(25,0,0,-25,145.125,734.875)
+lw(1)
+r(25,0,0,-25,145.125,584.875)
+lw(1)
+r(25,0,0,-25,145.125,659.875)
+lw(1)
+r(25,0,0,-25,145,760)
+lw(1)
+r(25,0,0,-25,145,610)
+lw(1)
+r(25,0,0,-25,145,685)
+lw(1)
+r(25,0,0,-25,145.125,710.125)
+lw(1)
+r(25,0,0,-25,145.125,560.125)
+lw(1)
+r(25,0,0,-25,145.125,635.125)
+lw(1)
+r(25,0,0,-25,220.125,734.875)
+lw(1)
+r(25,0,0,-25,220.125,584.875)
+lw(1)
+r(25,0,0,-25,220.125,659.875)
+lw(1)
+r(25,0,0,-25,220,760)
+lw(1)
+r(25,0,0,-25,220,610)
+lw(1)
+r(25,0,0,-25,220,685)
+lw(1)
+r(25,0,0,-25,220.125,710.125)
+lw(1)
+r(25,0,0,-25,220.125,560.125)
+lw(1)
+r(25,0,0,-25,220.125,635.125)
+lw(1)
+r(25,0,0,-25,170.125,734.875)
+lw(1)
+r(25,0,0,-25,170.125,584.875)
+lw(1)
+r(25,0,0,-25,295.125,734.875)
+lw(1)
+r(25,0,0,-25,295.125,584.875)
+lw(1)
+r(25,0,0,-25,170.125,659.875)
+lw(1)
+r(25,0,0,-25,295.125,659.875)
+lw(1)
+r(25,0,0,-25,170,760)
+lw(1)
+r(25,0,0,-25,170,610)
+lw(1)
+r(25,0,0,-25,295,760)
+lw(1)
+r(25,0,0,-25,295,610)
+lw(1)
+r(25,0,0,-25,170,685)
+lw(1)
+r(25,0,0,-25,295,685)
+lw(1)
+r(25,0,0,-25,170.125,710.125)
+lw(1)
+r(25,0,0,-25,170.125,560.125)
+lw(1)
+r(25,0,0,-25,295.125,710.125)
+lw(1)
+r(25,0,0,-25,295.125,560.125)
+lw(1)
+r(25,0,0,-25,170.125,635.125)
+lw(1)
+r(25,0,0,-25,295.125,635.125)
+lw(1)
+r(25,0,0,-25,245.125,734.875)
+lw(1)
+r(25,0,0,-25,245.125,584.875)
+lw(1)
+r(25,0,0,-25,245.125,659.875)
+lw(1)
+r(25,0,0,-25,245,760)
+lw(1)
+r(25,0,0,-25,245,610)
+lw(1)
+r(25,0,0,-25,245,685)
+lw(1)
+r(25,0,0,-25,245.125,710.125)
+lw(1)
+r(25,0,0,-25,245.125,560.125)
+lw(1)
+r(25,0,0,-25,245.125,635.125)
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(141.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('1 ',(105.496,729.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(166,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('2',(105.496,703.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(191,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('3',(105.496,678.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(215,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('4',(105.496,653.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(240.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('5',(105.496,628.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(265,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('6',(105.496,604.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(291,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('7',(105.496,577.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(314,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('8',(105.496,553.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(340.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('9',(105.496,527.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(115.5,766.794))
+fp((0,0,0))
+le()
+lw(1)
+Fn('NimbusSanL-Bold')
+Fs(14)
+txt('0',(105.496,752.445))
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,145,710)
+fp((0.631,0.207,0.072))
+lw(1)
+e(5,0,0,-5,294.75,610)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/coordinatesystem-transformations.sk b/doc/src/diagrams/coordinatesystem-transformations.sk
new file mode 100644
index 0000000..cdadf10
--- /dev/null
+++ b/doc/src/diagrams/coordinatesystem-transformations.sk
@@ -0,0 +1,121 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+ld((4, 4))
+r(54,0,0,-54,47.6378,695.445)
+lw(1)
+ld((4, 4))
+r(54,0,0,-54,287.138,692.945)
+lw(1)
+ld((4, 4))
+r(54,0,0,-54,507.638,691.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('World Coordinates',(11.6378,604.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('"Window" Coordinates',(236.638,604.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Device Coordinates',(477.638,605.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('(logical)',(36.6378,588.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('transformation matrix',(85.6378,522.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('window-viewport conversion',(303.138,522.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('(physical)',(505.138,589.945))
+fp((0.346,0.523,0.281))
+lw(1)
+b()
+bs(151.638,704.445,0)
+bs(152.138,658.945,0)
+bs(185.638,658.945,0)
+bs(186.138,636.445,0)
+bs(218.638,680.945,0)
+bs(185.638,726.445,0)
+bs(185.638,705.445,0)
+bs(151.638,705.445,0)
+fp((0.346,0.523,0.281))
+lw(1)
+b()
+bs(381.638,704.445,0)
+bs(382.138,658.945,0)
+bs(415.638,658.945,0)
+bs(416.138,636.445,0)
+bs(448.638,680.945,0)
+bs(415.638,726.445,0)
+bs(415.638,705.445,0)
+bs(381.638,705.445,0)
+gl([(0,(0.705,0.623,0.285)),(0.39,(0.664,0.587,0.267)),(1,(0.987,0.995,1))])
+pgc(0.5,0.5,1,0)
+fp()
+lw(1)
+e(24,0,0,-24,313.638,665.945)
+gl([(0,(0.705,0.623,0.285)),(0.39,(0.664,0.587,0.267)),(1,(0.987,0.995,1))])
+pgc(0.5,0.5,1,0)
+fp()
+lw(1)
+e(24,0,0,-24,534.138,664.945)
+gl([(0,(0.705,0.623,0.285)),(0.39,(0.664,0.587,0.267)),(1,(0.987,0.995,1))])
+pgc(0.5,0.5,1,0)
+fp()
+lw(1)
+e(24,0,0,-24,47.6378,696.945)
+fp((0.346,0.523,0.281))
+lw(1)
+e(2.25,0,0,-2.25,47.8878,696.695)
+fp((0.346,0.523,0.281))
+lw(1)
+e(2.25,0,0,-2.25,314.388,666.695)
+fp((0.346,0.523,0.281))
+lw(1)
+e(2.25,0,0,-2.25,534.888,664.195)
+lp((0.624,0.168,0.168))
+lw(1)
+b()
+bs(183.638,680.945,0)
+bc(183.638,680.945,249.138,604.945,139.138,541.945,2)
+lp((0.651,0.201,0.087))
+lw(1)
+b()
+bs(417.638,678.445,0)
+bc(417.638,678.445,483.138,602.445,373.138,539.445,2)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('(0,0)',(36.6378,702.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('(50,50)',(272.638,671.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('(296, 296)',(478.638,670.445))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/customcompleter-example.png b/doc/src/diagrams/customcompleter-example.png
new file mode 100644
index 0000000..a525208
--- /dev/null
+++ b/doc/src/diagrams/customcompleter-example.png
Binary files differ
diff --git a/doc/src/diagrams/customcompleter-example.zip b/doc/src/diagrams/customcompleter-example.zip
new file mode 100644
index 0000000..fead6c4
--- /dev/null
+++ b/doc/src/diagrams/customcompleter-example.zip
Binary files differ
diff --git a/doc/src/diagrams/customwidgetplugin-example.png b/doc/src/diagrams/customwidgetplugin-example.png
new file mode 100644
index 0000000..f208569
--- /dev/null
+++ b/doc/src/diagrams/customwidgetplugin-example.png
Binary files differ
diff --git a/doc/src/diagrams/datetimewidgets.ui b/doc/src/diagrams/datetimewidgets.ui
new file mode 100644
index 0000000..27e4637
--- /dev/null
+++ b/doc/src/diagrams/datetimewidgets.ui
@@ -0,0 +1,116 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>DateTimeWidgetsForm</class>
+ <widget class="QWidget" name="DateTimeWidgetsForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>328</width>
+ <height>105</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Date Time Widgets</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="font" >
+ <font>
+ <family>Bitstream Vera Sans</family>
+ <pointsize>9</pointsize>
+ <weight>75</weight>
+ <italic>false</italic>
+ <bold>true</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>QDateTimeEdit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="font" >
+ <font>
+ <family>Bitstream Vera Sans</family>
+ <pointsize>9</pointsize>
+ <weight>75</weight>
+ <italic>false</italic>
+ <bold>true</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>QDateEdit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="font" >
+ <font>
+ <family>Bitstream Vera Sans</family>
+ <pointsize>9</pointsize>
+ <weight>75</weight>
+ <italic>false</italic>
+ <bold>true</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>QTimeEdit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QDateTimeEdit" name="dateTimeEdit" >
+ <property name="displayFormat" >
+ <string>MMM d, yyyy hh:mm:ss</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QTimeEdit" name="timeEdit" >
+ <property name="time" >
+ <time>
+ <hour>1</hour>
+ <minute>45</minute>
+ <second>2</second>
+ </time>
+ </property>
+ <property name="displayFormat" >
+ <string>hh:mm:ss</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QDateEdit" name="dateEdit" >
+ <property name="time" >
+ <time>
+ <hour>13</hour>
+ <minute>45</minute>
+ <second>2</second>
+ </time>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/datetimewidgets.zip b/doc/src/diagrams/datetimewidgets.zip
new file mode 100644
index 0000000..84fd561
--- /dev/null
+++ b/doc/src/diagrams/datetimewidgets.zip
Binary files differ
diff --git a/doc/src/diagrams/dbus-chat-example.png b/doc/src/diagrams/dbus-chat-example.png
new file mode 100644
index 0000000..96a878e
--- /dev/null
+++ b/doc/src/diagrams/dbus-chat-example.png
Binary files differ
diff --git a/doc/src/diagrams/dependencies.lout b/doc/src/diagrams/dependencies.lout
new file mode 100644
index 0000000..d20f4f1
--- /dev/null
+++ b/doc/src/diagrams/dependencies.lout
@@ -0,0 +1,106 @@
+@SysInclude { picture }
+@SysInclude { tbl }
+@SysInclude { diag }
+# lout -EPS dependencies.lout > dependencies.eps
+macro @TTGreenColour { {cmyk 0.40 0.00 1.00 0.01} }
+macro @TTPurpleColour { {cmyk 0.39 0.39 0.00 0.00} }
+macro @DefaultColour { rgb { 0.961 0.961 0.863 } }
+macro @FreetypeColour { rgb { 0.902 0.902 0.980 } }
+macro @GLColour { rgb { 1.000 0.753 0.796 } }
+macro @PthreadColour { rgb { 0.741 0.718 0.420 } }
+macro @OptionalColour { rgb { 0.792 0.882 1.000 } }
+macro @SMColour { rgb { 0.761 0.980 0.980 } }
+macro @MiscColour { rgb { 0.941 0.973 1.000 } }
+macro @GlibColour { rgb { 0.7 0.7 0.7 } }
+@Illustration
+ @InitialFont { Helvetica Base 14p }
+{
+@Centre @Diag
+ outline { shadowbox }
+ shadow { 0.15f }
+ margin { 0.5f }
+ hsize { 5f }
+ paint { @MiscColour }
+ arrowwidth { 0.55f }
+ arrowlength { 0.55f }
+ pathwidth { medium }
+ zindent { 0.1f }
+ radius { 0.5f }
+ #
+ bmargin { 0.5f }
+ boutlinestyle { noline }
+ #
+ coutlinestyle { noline }
+ cmargin { 0.5f }
+{
+@Tbl
+# rule { yes } rulecolour { red }
+ indent { ctr }
+ iv { ctr }
+ marginvertical { 1.25f }
+ div { top }
+# fmarginbelow { 0c }
+
+ aformat { @Cell A | @Cell B | @Cell marginbelow { 0c } font { +2p } C | @Cell D | @Cell E }
+ bformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F }
+ cformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell marginleft { 1.5c } E | @Cell F }
+ dformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F }
+ eformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F }
+ fformat { @Cell A | @Cell B | @Cell C | @Cell D | @Cell E | @Cell F }
+ gformat { @Cell A | @Cell B | @Cell C | @Cell D | @StartHSpan @Cell E | @HSpan }
+{
+ @Rowa C { Qt"/"X11 library dependencies }
+ @Rowb C { QTGUI:: @Node paint { @TTGreenColour } QtGui }
+ @Rowc B { XCURSOR:: @Node paint { @OptionalColour } Xcursor }
+ C { XRANDR:: @Node paint { @OptionalColour } Xrandr }
+ D { XINERAMA:: @Node paint { @OptionalColour } Xinerama }
+ E { Xi:: @Node paint { @OptionalColour } Xi }
+ @Rowd C { XRENDER:: @Node paint { @OptionalColour } XRender }
+ F { Xt:: @Node paint { @DefaultColour } Xt* }
+ @Rowe A { QTCORE:: @Node paint { @TTPurpleColour } QtCore }
+ C { XFIXES:: @Node paint { @OptionalColour } Xfixes }
+ D { XEXT:: @Node paint { @DefaultColour } Xext }
+ F { SM:: @Node paint { @SMColour } SM }
+ @Rowf A { PTHREAD:: @Node paint { @PthreadColour } pthread }
+ B { GLIB:: @Node paint { @GlibColour } Glib }
+ D { X:: @Node paint { @DefaultColour } X11 }
+ F { ICE:: @Node paint { @SMColour } ICE }
+ @Rowg E {
+ @Tbl
+ font { -2p }
+ margin { 0.15f }
+ cmarginabove { 0c }
+ iv { top }
+ bformat { @Cell A | @Cell B | @Cell C }
+ cformat { @Cell A | @Cell B | @Cell C }
+ aformat { @StartHSpan @Cell A | @HSpan | @HSpan }
+ {
+ @Rowb A { C:: @BNode {} } B { D:: @BNode {} }
+ C { some configurations only }
+ @Rowb B { * } C { Xt intrinsics only }
+ }
+ }
+}
+//
+@VHVCurveArrow from { QTGUI } to { XINERAMA } pathstyle { dotted }
+@VHVCurveArrow from { QTGUI } to { Xi } pathstyle { dotted }
+@HVCurveArrow from { QTGUI } to { QTCORE }
+@Arrow from { QTCORE } to { PTHREAD }
+@VHVCurveArrow from { QTCORE } to { GLIB } pathstyle { dotted }
+@HVCurveArrow from { QTGUI } to { Xt }
+@Arrow from { QTGUI } to { XRANDR } pathstyle { dotted }
+@VHVCurveArrow from { QTGUI } to { XCURSOR } pathstyle { dotted }
+@Arrow from { XRANDR } to { XRENDER }
+@Arrow from { XINERAMA } to { XEXT }
+@VHCurveArrow from { XCURSOR } to { XRENDER }
+@HVCurveArrow from { XRENDER } to { XEXT }
+@HVHCurveArrow from { Xi } to { XEXT }
+@Arrow from { Xt } to { SM }
+@HVHCurveArrow from { Xt } to { X }
+@Arrow from { SM } to { ICE }
+@Arrow from { XEXT } to { X }
+@VHCurveArrow from { XCURSOR } to { XFIXES }
+@VHVCurveArrow from { XFIXES } to { X }
+@Link from { C@W } to { D@E } pathstyle { dotted }
+}
+}
diff --git a/doc/src/diagrams/designer-adding-actions.txt b/doc/src/diagrams/designer-adding-actions.txt
new file mode 100644
index 0000000..4124ecc
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-actions.txt
@@ -0,0 +1,15 @@
+# Cropping and fading the Qt Designer action images.
+
+cropimage.py designer-adding-menu-action1.png designer-adding-menu-action1-crop.png left 57
+cropimage.py designer-adding-menu-action1-crop.png designer-adding-menu-action1-crop.png top 41
+cropimage.py designer-adding-menu-action1-crop.png designer-adding-menu-action1-crop.png right -180
+cropimage.py designer-adding-menu-action1-crop.png designer-adding-menu-action1-crop.png bottom -124
+fadeedges.py designer-adding-menu-action1-crop.png ../images/designer-adding-menu-action.png right,bottom 16
+rm designer-adding-menu-action1-crop.png
+
+cropimage.py designer-adding-toolbar-action1.png designer-adding-toolbar-action1-crop.png left 57
+cropimage.py designer-adding-toolbar-action1-crop.png designer-adding-toolbar-action1-crop.png top 41
+cropimage.py designer-adding-toolbar-action1-crop.png designer-adding-toolbar-action1-crop.png right -144
+cropimage.py designer-adding-toolbar-action1-crop.png designer-adding-toolbar-action1-crop.png bottom -124
+fadeedges.py designer-adding-toolbar-action1-crop.png ../images/designer-adding-toolbar-action.png right,bottom 16
+rm designer-adding-toolbar-action1-crop.png
diff --git a/doc/src/diagrams/designer-adding-dockwidget.txt b/doc/src/diagrams/designer-adding-dockwidget.txt
new file mode 100644
index 0000000..97b4beb
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-dockwidget.txt
@@ -0,0 +1,8 @@
+# Cropping and fading the Qt Designer dock widget images.
+
+cropimage.py designer-adding-dockwidget1.png designer-adding-dockwidget1-crop.png left 11
+cropimage.py designer-adding-dockwidget1-crop.png designer-adding-dockwidget1-crop.png top 6
+cropimage.py designer-adding-dockwidget1-crop.png designer-adding-dockwidget1-crop.png right -201
+cropimage.py designer-adding-dockwidget1-crop.png designer-adding-dockwidget1-crop.png bottom -236
+fadeedges.py designer-adding-dockwidget1-crop.png ../images/designer-adding-dockwidget.png right,bottom 16
+rm designer-adding-dockwidget1-crop.png
diff --git a/doc/src/diagrams/designer-adding-dockwidget1.png b/doc/src/diagrams/designer-adding-dockwidget1.png
new file mode 100644
index 0000000..960da83
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-dockwidget1.png
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-dockwidget1.zip b/doc/src/diagrams/designer-adding-dockwidget1.zip
new file mode 100644
index 0000000..0492df6
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-dockwidget1.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-dynamic-property.png b/doc/src/diagrams/designer-adding-dynamic-property.png
new file mode 100644
index 0000000..8e81dd9
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-dynamic-property.png
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-menu-action1.png b/doc/src/diagrams/designer-adding-menu-action1.png
new file mode 100644
index 0000000..cde92d9
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-menu-action1.png
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-menu-action1.zip b/doc/src/diagrams/designer-adding-menu-action1.zip
new file mode 100644
index 0000000..08395eb
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-menu-action1.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-menu-action2.zip b/doc/src/diagrams/designer-adding-menu-action2.zip
new file mode 100644
index 0000000..ca1a5b3
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-menu-action2.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-toolbar-action1.png b/doc/src/diagrams/designer-adding-toolbar-action1.png
new file mode 100644
index 0000000..6b82373
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-toolbar-action1.png
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-toolbar-action1.zip b/doc/src/diagrams/designer-adding-toolbar-action1.zip
new file mode 100644
index 0000000..e673b3c
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-toolbar-action1.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-adding-toolbar-action2.zip b/doc/src/diagrams/designer-adding-toolbar-action2.zip
new file mode 100644
index 0000000..96a9d69
--- /dev/null
+++ b/doc/src/diagrams/designer-adding-toolbar-action2.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-dynamic-property.png b/doc/src/diagrams/designer-creating-dynamic-property.png
new file mode 100644
index 0000000..1c3d3ca
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-dynamic-property.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry1.png b/doc/src/diagrams/designer-creating-menu-entry1.png
new file mode 100644
index 0000000..33aa0d6
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry1.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry1.zip b/doc/src/diagrams/designer-creating-menu-entry1.zip
new file mode 100644
index 0000000..f9e64c8
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry1.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry2.png b/doc/src/diagrams/designer-creating-menu-entry2.png
new file mode 100644
index 0000000..8338d08
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry2.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry2.zip b/doc/src/diagrams/designer-creating-menu-entry2.zip
new file mode 100644
index 0000000..67d81e4
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry2.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry3.png b/doc/src/diagrams/designer-creating-menu-entry3.png
new file mode 100644
index 0000000..d242646
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry3.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry3.zip b/doc/src/diagrams/designer-creating-menu-entry3.zip
new file mode 100644
index 0000000..d530186
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry3.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry4.png b/doc/src/diagrams/designer-creating-menu-entry4.png
new file mode 100644
index 0000000..07a49ba
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry4.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu-entry4.zip b/doc/src/diagrams/designer-creating-menu-entry4.zip
new file mode 100644
index 0000000..d800c31
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu-entry4.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu.txt b/doc/src/diagrams/designer-creating-menu.txt
new file mode 100644
index 0000000..b5b2934
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu.txt
@@ -0,0 +1,49 @@
+# Cropping and fading the Qt Designer menu creation images.
+
+cropimage.py designer-creating-menu1.png designer-creating-menu1-crop.png bottom -100
+cropimage.py designer-creating-menu1-crop.png designer-creating-menu1-crop.png right -120
+fadeedges.py designer-creating-menu1-crop.png ../images/designer-creating-menu1.png right,bottom 16
+rm designer-creating-menu1-crop.png
+
+cropimage.py designer-creating-menu2.png designer-creating-menu2-crop.png bottom -100
+cropimage.py designer-creating-menu2-crop.png designer-creating-menu2-crop.png right -120
+fadeedges.py designer-creating-menu2-crop.png ../images/designer-creating-menu2.png right,bottom 16
+rm designer-creating-menu2-crop.png
+
+cropimage.py designer-creating-menu3.png designer-creating-menu3-crop.png bottom -100
+cropimage.py designer-creating-menu3-crop.png designer-creating-menu3-crop.png right -120
+fadeedges.py designer-creating-menu3-crop.png ../images/designer-creating-menu3.png right,bottom 16
+rm designer-creating-menu3-crop.png
+
+cropimage.py designer-creating-menu4.png designer-creating-menu4-crop.png bottom -100
+cropimage.py designer-creating-menu4-crop.png designer-creating-menu4-crop.png right -120
+fadeedges.py designer-creating-menu4-crop.png ../images/designer-creating-menu4.png right,bottom 16
+rm designer-creating-menu4-crop.png
+
+cropimage.py designer-creating-menu-entry1.png designer-creating-menu-entry1-crop.png left 54
+cropimage.py designer-creating-menu-entry1-crop.png designer-creating-menu-entry1-crop.png top 45
+cropimage.py designer-creating-menu-entry1-crop.png designer-creating-menu-entry1-crop.png right -160
+cropimage.py designer-creating-menu-entry1-crop.png designer-creating-menu-entry1-crop.png bottom -144
+fadeedges.py designer-creating-menu-entry1-crop.png ../images/designer-creating-menu-entry1.png right,bottom 16
+rm designer-creating-menu-entry1-crop.png
+
+cropimage.py designer-creating-menu-entry2.png designer-creating-menu-entry2-crop.png left 54
+cropimage.py designer-creating-menu-entry2-crop.png designer-creating-menu-entry2-crop.png top 45
+cropimage.py designer-creating-menu-entry2-crop.png designer-creating-menu-entry2-crop.png right -160
+cropimage.py designer-creating-menu-entry2-crop.png designer-creating-menu-entry2-crop.png bottom -144
+fadeedges.py designer-creating-menu-entry2-crop.png ../images/designer-creating-menu-entry2.png right,bottom 16
+rm designer-creating-menu-entry2-crop.png
+
+cropimage.py designer-creating-menu-entry3.png designer-creating-menu-entry3-crop.png left 54
+cropimage.py designer-creating-menu-entry3-crop.png designer-creating-menu-entry3-crop.png top 45
+cropimage.py designer-creating-menu-entry3-crop.png designer-creating-menu-entry3-crop.png right -160
+cropimage.py designer-creating-menu-entry3-crop.png designer-creating-menu-entry3-crop.png bottom -144
+fadeedges.py designer-creating-menu-entry3-crop.png ../images/designer-creating-menu-entry3.png right,bottom 16
+rm designer-creating-menu-entry3-crop.png
+
+cropimage.py designer-creating-menu-entry4.png designer-creating-menu-entry4-crop.png left 54
+cropimage.py designer-creating-menu-entry4-crop.png designer-creating-menu-entry4-crop.png top 45
+cropimage.py designer-creating-menu-entry4-crop.png designer-creating-menu-entry4-crop.png right -160
+cropimage.py designer-creating-menu-entry4-crop.png designer-creating-menu-entry4-crop.png bottom -144
+fadeedges.py designer-creating-menu-entry4-crop.png ../images/designer-creating-menu-entry4.png right,bottom 16
+rm designer-creating-menu-entry4-crop.png
diff --git a/doc/src/diagrams/designer-creating-menu1.png b/doc/src/diagrams/designer-creating-menu1.png
new file mode 100644
index 0000000..d92a88a
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu1.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu1.zip b/doc/src/diagrams/designer-creating-menu1.zip
new file mode 100644
index 0000000..780b1ac
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu1.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu2.png b/doc/src/diagrams/designer-creating-menu2.png
new file mode 100644
index 0000000..7be4891
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu2.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu2.zip b/doc/src/diagrams/designer-creating-menu2.zip
new file mode 100644
index 0000000..00664a6
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu2.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu3.png b/doc/src/diagrams/designer-creating-menu3.png
new file mode 100644
index 0000000..c2f1beb
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu3.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu3.zip b/doc/src/diagrams/designer-creating-menu3.zip
new file mode 100644
index 0000000..76ecbe0
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu3.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menu4.png b/doc/src/diagrams/designer-creating-menu4.png
new file mode 100644
index 0000000..3a3ab54
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menu4.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menubar.png b/doc/src/diagrams/designer-creating-menubar.png
new file mode 100644
index 0000000..e8078e0
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menubar.png
Binary files differ
diff --git a/doc/src/diagrams/designer-creating-menubar.zip b/doc/src/diagrams/designer-creating-menubar.zip
new file mode 100644
index 0000000..bddbf0e
--- /dev/null
+++ b/doc/src/diagrams/designer-creating-menubar.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-edit-resource.zip b/doc/src/diagrams/designer-edit-resource.zip
new file mode 100644
index 0000000..dc43d9e
--- /dev/null
+++ b/doc/src/diagrams/designer-edit-resource.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-find-icon.zip b/doc/src/diagrams/designer-find-icon.zip
new file mode 100644
index 0000000..e94abd9
--- /dev/null
+++ b/doc/src/diagrams/designer-find-icon.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-form-layoutfunction-crop.png b/doc/src/diagrams/designer-form-layoutfunction-crop.png
new file mode 100644
index 0000000..e8dd39f
--- /dev/null
+++ b/doc/src/diagrams/designer-form-layoutfunction-crop.png
Binary files differ
diff --git a/doc/src/diagrams/designer-form-layoutfunction.png b/doc/src/diagrams/designer-form-layoutfunction.png
new file mode 100644
index 0000000..9101e89
--- /dev/null
+++ b/doc/src/diagrams/designer-form-layoutfunction.png
Binary files differ
diff --git a/doc/src/diagrams/designer-form-layoutfunction.zip b/doc/src/diagrams/designer-form-layoutfunction.zip
new file mode 100644
index 0000000..fcce637
--- /dev/null
+++ b/doc/src/diagrams/designer-form-layoutfunction.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-main-window.zip b/doc/src/diagrams/designer-main-window.zip
new file mode 100644
index 0000000..69b7ee6
--- /dev/null
+++ b/doc/src/diagrams/designer-main-window.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-mainwindow-actions.ui b/doc/src/diagrams/designer-mainwindow-actions.ui
new file mode 100644
index 0000000..593a2de
--- /dev/null
+++ b/doc/src/diagrams/designer-mainwindow-actions.ui
@@ -0,0 +1,88 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>497</width>
+ <height>347</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menuBar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>497</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_Badger" >
+ <property name="title" >
+ <string>&amp;Badger</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Hippo" >
+ <property name="tearOffEnabled" >
+ <bool>true</bool>
+ </property>
+ <property name="title" >
+ <string>&amp;Hippo</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File...</string>
+ </property>
+ </widget>
+ <addaction name="menu_File" />
+ </widget>
+ <widget class="QToolBar" name="mainToolBar" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="action_Open" />
+ </widget>
+ <widget class="QStatusBar" name="statusBar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>325</y>
+ <width>497</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
+ <action name="action_Open" >
+ <property name="icon" >
+ <iconset>../../../examples/mainwindows/application/images/open.png</iconset>
+ </property>
+ <property name="text" >
+ <string>&amp;Open...</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/designer-palette-brush-editor.zip b/doc/src/diagrams/designer-palette-brush-editor.zip
new file mode 100644
index 0000000..698f271
--- /dev/null
+++ b/doc/src/diagrams/designer-palette-brush-editor.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-palette-editor.zip b/doc/src/diagrams/designer-palette-editor.zip
new file mode 100644
index 0000000..96646ab
--- /dev/null
+++ b/doc/src/diagrams/designer-palette-editor.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-palette-gradient-editor.zip b/doc/src/diagrams/designer-palette-gradient-editor.zip
new file mode 100644
index 0000000..4696516
--- /dev/null
+++ b/doc/src/diagrams/designer-palette-gradient-editor.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-palette-pattern-editor.zip b/doc/src/diagrams/designer-palette-pattern-editor.zip
new file mode 100644
index 0000000..7382bad
--- /dev/null
+++ b/doc/src/diagrams/designer-palette-pattern-editor.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-resource-editor.zip b/doc/src/diagrams/designer-resource-editor.zip
new file mode 100644
index 0000000..2c11da4
--- /dev/null
+++ b/doc/src/diagrams/designer-resource-editor.zip
Binary files differ
diff --git a/doc/src/diagrams/designer-widget-box.zip b/doc/src/diagrams/designer-widget-box.zip
new file mode 100644
index 0000000..7ba8f77
--- /dev/null
+++ b/doc/src/diagrams/designer-widget-box.zip
Binary files differ
diff --git a/doc/src/diagrams/diagrams.txt b/doc/src/diagrams/diagrams.txt
new file mode 100644
index 0000000..a985b70
--- /dev/null
+++ b/doc/src/diagrams/diagrams.txt
@@ -0,0 +1,16 @@
+Use makeimage.py (//depot/devtools/main/doctools/bin/makeimage.py) to generate
+images from these diagrams.
+
+Diagram Scale factor
+
+treemodel-structure.sk 0.28
+modelview-listmodel.sk 0.28
+modelview-models.sk 0.28
+modelview-overview.sk 0.28
+modelview-tablemodel.sk 0.28
+modelview-treemodel.sk 0.28
+plaintext-layout.png 0.8
+standard-views.sk 0.22
+boat.png 0.2
+car.png 0.2
+house.png 0.2
diff --git a/doc/src/diagrams/dockwidget-cross.sk b/doc/src/diagrams/dockwidget-cross.sk
new file mode 100644
index 0000000..6be469c
--- /dev/null
+++ b/doc/src/diagrams/dockwidget-cross.sk
@@ -0,0 +1,110 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.75,0.919,0.548))
+lw(2)
+r(337.214,0,0,-225.169,-36.3448,740.113)
+fp((0.848,0.848,0.848))
+lw(2)
+r(337.214,0,0,-35.553,-36.3448,740.113)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(-13.7198,773.512,0)
+bs(278.245,481.547,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(278.245,773.512,0)
+bs(-13.7198,481.547,0)
+fp((0.75,0.919,0.548))
+lw(2)
+r(337.214,0,0,-225.169,392.446,740.113)
+fp((0.848,0.848,0.848))
+lw(2)
+r(337.214,0,0,-35.553,392.446,740.113)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(415.07,773.512,0)
+bs(707.035,481.547,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(707.035,773.512,0)
+bs(415.07,481.547,0)
+fp((0.75,0.919,0.548))
+lw(2)
+r(337.214,0,0,-225.169,-36.3448,406.94)
+fp((0.848,0.848,0.848))
+lw(2)
+r(337.214,0,0,-35.553,-36.3448,406.94)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(-13.7198,440.338,0)
+bs(278.245,148.373,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(278.245,440.338,0)
+bs(-13.7198,148.373,0)
+fp((0.75,0.919,0.548))
+lw(2)
+r(337.214,0,0,-225.169,392.446,406.94)
+fp((0.848,0.848,0.848))
+lw(2)
+r(337.214,0,0,-35.553,392.446,406.94)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(415.07,440.338,0)
+bs(707.035,148.373,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(707.035,440.338,0)
+bs(415.07,148.373,0)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(42.8417,641.804,0)
+bs(56.8474,613.793,0)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(636.468,641.804,0)
+bs(650.474,613.793,0)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(125.26,363.306,0)
+bs(139.266,335.295,0)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(554.05,254.493,0)
+bs(568.056,226.481,0)
+lp((1,0,0))
+lw(3)
+r(163.759,0,0,-217.627,561.591,736.612)
+lp((1,0,0))
+lw(3)
+r(163.759,0,0,-217.627,-32.0348,736.612)
+lp((1,0,0))
+lw(3)
+r(328.595,0,0,-108.814,-32.0348,403.707)
+lp((1,0,0))
+lw(3)
+r(328.595,0,0,-108.814,396.755,294.894)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/dockwidget-neighbors.sk b/doc/src/diagrams/dockwidget-neighbors.sk
new file mode 100644
index 0000000..293394f
--- /dev/null
+++ b/doc/src/diagrams/dockwidget-neighbors.sk
@@ -0,0 +1,136 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.576,0.833,1))
+lw(2)
+r(178.842,0,0,-225.169,262.138,6.39015)
+fp((0.869,0.579,0.579))
+lw(2)
+r(178.842,0,0,-225.169,-212.068,325.597)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,-212.068,325.597)
+fp((0.576,0.833,1))
+lw(2)
+r(178.842,0,0,-225.169,-34.034,325.597)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,-34.034,325.597)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-121.652,218.992,0)
+bs(-107.647,190.981,0)
+fp((0.869,0.579,0.579))
+lw(2)
+r(178.842,0,0,-225.169,262.138,325.597)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,262.138,325.597)
+fp((0.576,0.833,1))
+lw(2)
+r(178.842,0,0,-225.169,440.172,325.597)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,440.172,325.597)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(484.554,266.992,0)
+bs(498.56,238.981,0)
+fp((0.869,0.579,0.579))
+lw(2)
+r(178.842,0,0,-225.169,-212.068,6.39015)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,-212.068,6.39015)
+fp((0.576,0.833,1))
+lw(2)
+r(178.842,0,0,-225.169,-34.034,6.39015)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,-34.034,6.39015)
+fp((0.869,0.579,0.579))
+lw(2)
+r(178.842,0,0,-225.169,440.138,6.39015)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,440.138,6.39014)
+fp((0.848,0.848,0.848))
+lw(2)
+r(178.842,0,0,-35.553,262.138,6.39015)
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(568.554,-100.215,0)
+bs(582.56,-128.226,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(58.0644,80.9449,0)
+bs(57.6378,341.945,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(532.064,80.9449,0)
+bs(531.638,341.945,0)
+G()
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(57.0644,-236.055,0)
+bs(56.6378,24.945,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(531.064,-236.055,0)
+bs(530.638,24.9451,0)
+G_()
+lw(4)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(6.63782,-148.044,0)
+bs(20.6435,-176.055,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(56.4642,213.012,0)
+bs(-46.9624,213.013,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(56.4642,-106.194,0)
+bs(-46.9624,-106.194,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(530.671,-106.194,0)
+bs(427.244,-106.194,0)
+lp((0.185,0,1))
+lw(1)
+ld((1, 1))
+b()
+bs(530.671,213.012,0)
+bs(427.244,213.013,0)
+lp((1,0,0))
+lw(3)
+r(170.759,0,0,-217.627,-208.027,321.826)
+lp((1,0,0))
+lw(3)
+r(170.759,0,0,-105.627,444.179,321.826)
+lp((1,0,0))
+lw(3)
+r(170.759,0,0,-105.627,-30.3622,-109.428)
+lp((1,0,0))
+lw(3)
+r(170.759,0,0,-217.627,444.179,2.61914)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/fontsampler-example.zip b/doc/src/diagrams/fontsampler-example.zip
new file mode 100644
index 0000000..a68ef21
--- /dev/null
+++ b/doc/src/diagrams/fontsampler-example.zip
Binary files differ
diff --git a/doc/src/diagrams/framebufferobject-example.png b/doc/src/diagrams/framebufferobject-example.png
new file mode 100644
index 0000000..a97840f
--- /dev/null
+++ b/doc/src/diagrams/framebufferobject-example.png
Binary files differ
diff --git a/doc/src/diagrams/framebufferobject2-example.png b/doc/src/diagrams/framebufferobject2-example.png
new file mode 100644
index 0000000..80dc2f1
--- /dev/null
+++ b/doc/src/diagrams/framebufferobject2-example.png
Binary files differ
diff --git a/doc/src/diagrams/ftp-example.zip b/doc/src/diagrams/ftp-example.zip
new file mode 100644
index 0000000..5075128
--- /dev/null
+++ b/doc/src/diagrams/ftp-example.zip
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-calendarwidget.png b/doc/src/diagrams/gallery-images/cde-calendarwidget.png
new file mode 100644
index 0000000..90cfb51
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-checkbox.png b/doc/src/diagrams/gallery-images/cde-checkbox.png
new file mode 100644
index 0000000..1e20f39
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-combobox.png b/doc/src/diagrams/gallery-images/cde-combobox.png
new file mode 100644
index 0000000..7458643
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-dateedit.png b/doc/src/diagrams/gallery-images/cde-dateedit.png
new file mode 100644
index 0000000..91a4e97
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-datetimeedit.png b/doc/src/diagrams/gallery-images/cde-datetimeedit.png
new file mode 100644
index 0000000..cc2242e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-dial.png b/doc/src/diagrams/gallery-images/cde-dial.png
new file mode 100644
index 0000000..cdf852d
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-doublespinbox.png b/doc/src/diagrams/gallery-images/cde-doublespinbox.png
new file mode 100644
index 0000000..7474928
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-fontcombobox.png b/doc/src/diagrams/gallery-images/cde-fontcombobox.png
new file mode 100644
index 0000000..dd1b00d
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-frame.png b/doc/src/diagrams/gallery-images/cde-frame.png
new file mode 100644
index 0000000..69d63b8
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-groupbox.png b/doc/src/diagrams/gallery-images/cde-groupbox.png
new file mode 100644
index 0000000..710e2fc
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/cde-horizontalscrollbar.png
new file mode 100644
index 0000000..f52ba98
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-label.png b/doc/src/diagrams/gallery-images/cde-label.png
new file mode 100644
index 0000000..a508261
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-lcdnumber.png b/doc/src/diagrams/gallery-images/cde-lcdnumber.png
new file mode 100644
index 0000000..ecc5001
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-lineedit.png b/doc/src/diagrams/gallery-images/cde-lineedit.png
new file mode 100644
index 0000000..d9e5876
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-listview.png b/doc/src/diagrams/gallery-images/cde-listview.png
new file mode 100644
index 0000000..d698413
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-progressbar.png b/doc/src/diagrams/gallery-images/cde-progressbar.png
new file mode 100644
index 0000000..16e0bb2
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-pushbutton.png b/doc/src/diagrams/gallery-images/cde-pushbutton.png
new file mode 100644
index 0000000..b66a851
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-radiobutton.png b/doc/src/diagrams/gallery-images/cde-radiobutton.png
new file mode 100644
index 0000000..31da50d
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-slider.png b/doc/src/diagrams/gallery-images/cde-slider.png
new file mode 100644
index 0000000..6b6c544
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-spinbox.png b/doc/src/diagrams/gallery-images/cde-spinbox.png
new file mode 100644
index 0000000..4533469
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-tableview.png b/doc/src/diagrams/gallery-images/cde-tableview.png
new file mode 100644
index 0000000..fec7b44
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-tabwidget.png b/doc/src/diagrams/gallery-images/cde-tabwidget.png
new file mode 100644
index 0000000..758283e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-textedit.png b/doc/src/diagrams/gallery-images/cde-textedit.png
new file mode 100644
index 0000000..426dbcc
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-timeedit.png b/doc/src/diagrams/gallery-images/cde-timeedit.png
new file mode 100644
index 0000000..be2bd38
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-toolbox.png b/doc/src/diagrams/gallery-images/cde-toolbox.png
new file mode 100644
index 0000000..4394f58
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-toolbutton.png b/doc/src/diagrams/gallery-images/cde-toolbutton.png
new file mode 100644
index 0000000..6bd0495
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cde-treeview.png b/doc/src/diagrams/gallery-images/cde-treeview.png
new file mode 100644
index 0000000..2fc78c6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cde-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-calendarwidget.png b/doc/src/diagrams/gallery-images/cleanlooks-calendarwidget.png
new file mode 100644
index 0000000..7ec25ae
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-checkbox.png b/doc/src/diagrams/gallery-images/cleanlooks-checkbox.png
new file mode 100644
index 0000000..c30aa84
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-combobox.png b/doc/src/diagrams/gallery-images/cleanlooks-combobox.png
new file mode 100644
index 0000000..5484fab
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-dateedit.png b/doc/src/diagrams/gallery-images/cleanlooks-dateedit.png
new file mode 100644
index 0000000..3d781b5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-datetimeedit.png b/doc/src/diagrams/gallery-images/cleanlooks-datetimeedit.png
new file mode 100644
index 0000000..f91ad48
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-dial.png b/doc/src/diagrams/gallery-images/cleanlooks-dial.png
new file mode 100644
index 0000000..7e546ef
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-doublespinbox.png b/doc/src/diagrams/gallery-images/cleanlooks-doublespinbox.png
new file mode 100644
index 0000000..fe86c19
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-fontcombobox.png b/doc/src/diagrams/gallery-images/cleanlooks-fontcombobox.png
new file mode 100644
index 0000000..7170bb6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-frame.png b/doc/src/diagrams/gallery-images/cleanlooks-frame.png
new file mode 100644
index 0000000..9496512
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-groupbox.png b/doc/src/diagrams/gallery-images/cleanlooks-groupbox.png
new file mode 100644
index 0000000..106f86d
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/cleanlooks-horizontalscrollbar.png
new file mode 100644
index 0000000..78cab56
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-label.png b/doc/src/diagrams/gallery-images/cleanlooks-label.png
new file mode 100644
index 0000000..a0b8064
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-lcdnumber.png b/doc/src/diagrams/gallery-images/cleanlooks-lcdnumber.png
new file mode 100644
index 0000000..d0892e5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-lineedit.png b/doc/src/diagrams/gallery-images/cleanlooks-lineedit.png
new file mode 100644
index 0000000..d79e94f
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-listview.png b/doc/src/diagrams/gallery-images/cleanlooks-listview.png
new file mode 100644
index 0000000..df0466b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-progressbar.png b/doc/src/diagrams/gallery-images/cleanlooks-progressbar.png
new file mode 100644
index 0000000..fc3c97a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-pushbutton.png b/doc/src/diagrams/gallery-images/cleanlooks-pushbutton.png
new file mode 100644
index 0000000..07f388b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-radiobutton.png b/doc/src/diagrams/gallery-images/cleanlooks-radiobutton.png
new file mode 100644
index 0000000..eb00206
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-slider.png b/doc/src/diagrams/gallery-images/cleanlooks-slider.png
new file mode 100644
index 0000000..907ff3c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-spinbox.png b/doc/src/diagrams/gallery-images/cleanlooks-spinbox.png
new file mode 100644
index 0000000..ca7c3db
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-tableview.png b/doc/src/diagrams/gallery-images/cleanlooks-tableview.png
new file mode 100644
index 0000000..64c630a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-tabwidget.png b/doc/src/diagrams/gallery-images/cleanlooks-tabwidget.png
new file mode 100644
index 0000000..4d5bf37
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-textedit.png b/doc/src/diagrams/gallery-images/cleanlooks-textedit.png
new file mode 100644
index 0000000..0a90fa9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-timeedit.png b/doc/src/diagrams/gallery-images/cleanlooks-timeedit.png
new file mode 100644
index 0000000..09fede7
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-toolbox.png b/doc/src/diagrams/gallery-images/cleanlooks-toolbox.png
new file mode 100644
index 0000000..7bb3762
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-toolbutton.png b/doc/src/diagrams/gallery-images/cleanlooks-toolbutton.png
new file mode 100644
index 0000000..0fdc02a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/cleanlooks-treeview.png b/doc/src/diagrams/gallery-images/cleanlooks-treeview.png
new file mode 100644
index 0000000..bd9a079
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/cleanlooks-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/designer-creating-menubar.png b/doc/src/diagrams/gallery-images/designer-creating-menubar.png
new file mode 100644
index 0000000..87606f7
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/designer-creating-menubar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-calendarwidget.png b/doc/src/diagrams/gallery-images/gtk-calendarwidget.png
new file mode 100644
index 0000000..008eadf
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-checkbox.png b/doc/src/diagrams/gallery-images/gtk-checkbox.png
new file mode 100644
index 0000000..eb683b6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-columnview.png b/doc/src/diagrams/gallery-images/gtk-columnview.png
new file mode 100644
index 0000000..6469c8c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-columnview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-combobox.png b/doc/src/diagrams/gallery-images/gtk-combobox.png
new file mode 100644
index 0000000..bfdf68b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-dateedit.png b/doc/src/diagrams/gallery-images/gtk-dateedit.png
new file mode 100644
index 0000000..cbf595c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-datetimeedit.png b/doc/src/diagrams/gallery-images/gtk-datetimeedit.png
new file mode 100644
index 0000000..746b22d
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-dial.png b/doc/src/diagrams/gallery-images/gtk-dial.png
new file mode 100644
index 0000000..1df0de5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-doublespinbox.png b/doc/src/diagrams/gallery-images/gtk-doublespinbox.png
new file mode 100644
index 0000000..f784d59
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-fontcombobox.png b/doc/src/diagrams/gallery-images/gtk-fontcombobox.png
new file mode 100644
index 0000000..878257b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-frame.png b/doc/src/diagrams/gallery-images/gtk-frame.png
new file mode 100644
index 0000000..b1c9b86
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-groupbox.png b/doc/src/diagrams/gallery-images/gtk-groupbox.png
new file mode 100644
index 0000000..a8a7b13
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/gtk-horizontalscrollbar.png
new file mode 100644
index 0000000..53a65e9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-label.png b/doc/src/diagrams/gallery-images/gtk-label.png
new file mode 100644
index 0000000..d34dacd
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-lcdnumber.png b/doc/src/diagrams/gallery-images/gtk-lcdnumber.png
new file mode 100644
index 0000000..cb0cfe0
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-lineedit.png b/doc/src/diagrams/gallery-images/gtk-lineedit.png
new file mode 100644
index 0000000..a11a3b5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-listview.png b/doc/src/diagrams/gallery-images/gtk-listview.png
new file mode 100644
index 0000000..a7258a4
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-progressbar.png b/doc/src/diagrams/gallery-images/gtk-progressbar.png
new file mode 100644
index 0000000..6de60c4
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-pushbutton.png b/doc/src/diagrams/gallery-images/gtk-pushbutton.png
new file mode 100644
index 0000000..85340ce
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-radiobutton.png b/doc/src/diagrams/gallery-images/gtk-radiobutton.png
new file mode 100644
index 0000000..20ee523
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-slider.png b/doc/src/diagrams/gallery-images/gtk-slider.png
new file mode 100644
index 0000000..140f00a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-spinbox.png b/doc/src/diagrams/gallery-images/gtk-spinbox.png
new file mode 100644
index 0000000..f1062cb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-tableview.png b/doc/src/diagrams/gallery-images/gtk-tableview.png
new file mode 100644
index 0000000..6705317
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-tabwidget.png b/doc/src/diagrams/gallery-images/gtk-tabwidget.png
new file mode 100644
index 0000000..7a73e59
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-textedit.png b/doc/src/diagrams/gallery-images/gtk-textedit.png
new file mode 100644
index 0000000..e9f77e6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-timeedit.png b/doc/src/diagrams/gallery-images/gtk-timeedit.png
new file mode 100644
index 0000000..cf87c3a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-toolbox.png b/doc/src/diagrams/gallery-images/gtk-toolbox.png
new file mode 100644
index 0000000..b404114
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-toolbutton.png b/doc/src/diagrams/gallery-images/gtk-toolbutton.png
new file mode 100644
index 0000000..779cc82
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/gtk-treeview.png b/doc/src/diagrams/gallery-images/gtk-treeview.png
new file mode 100644
index 0000000..0abbbfa
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/gtk-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/linguist-menubar.png b/doc/src/diagrams/gallery-images/linguist-menubar.png
new file mode 100644
index 0000000..a73f135
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/linguist-menubar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/macintosh-tabwidget.png b/doc/src/diagrams/gallery-images/macintosh-tabwidget.png
new file mode 100644
index 0000000..b4a36af
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/macintosh-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-calendarwidget.png b/doc/src/diagrams/gallery-images/motif-calendarwidget.png
new file mode 100644
index 0000000..42d1644
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-checkbox.png b/doc/src/diagrams/gallery-images/motif-checkbox.png
new file mode 100644
index 0000000..f8e9b4f
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-combobox.png b/doc/src/diagrams/gallery-images/motif-combobox.png
new file mode 100644
index 0000000..2a288d9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-dateedit.png b/doc/src/diagrams/gallery-images/motif-dateedit.png
new file mode 100644
index 0000000..48aecba
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-datetimeedit.png b/doc/src/diagrams/gallery-images/motif-datetimeedit.png
new file mode 100644
index 0000000..628df46
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-dial.png b/doc/src/diagrams/gallery-images/motif-dial.png
new file mode 100644
index 0000000..e920e7c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-doublespinbox.png b/doc/src/diagrams/gallery-images/motif-doublespinbox.png
new file mode 100644
index 0000000..6941c81
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-fontcombobox.png b/doc/src/diagrams/gallery-images/motif-fontcombobox.png
new file mode 100644
index 0000000..8c28854
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-frame.png b/doc/src/diagrams/gallery-images/motif-frame.png
new file mode 100644
index 0000000..4868352
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-groupbox.png b/doc/src/diagrams/gallery-images/motif-groupbox.png
new file mode 100644
index 0000000..aeadd1c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/motif-horizontalscrollbar.png
new file mode 100644
index 0000000..2a91be6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-label.png b/doc/src/diagrams/gallery-images/motif-label.png
new file mode 100644
index 0000000..96aedb8
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-lcdnumber.png b/doc/src/diagrams/gallery-images/motif-lcdnumber.png
new file mode 100644
index 0000000..3b72701
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-lineedit.png b/doc/src/diagrams/gallery-images/motif-lineedit.png
new file mode 100644
index 0000000..653735e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-listview.png b/doc/src/diagrams/gallery-images/motif-listview.png
new file mode 100644
index 0000000..05b6620
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-menubar.png b/doc/src/diagrams/gallery-images/motif-menubar.png
new file mode 100644
index 0000000..76a7c43
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-menubar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-progressbar.png b/doc/src/diagrams/gallery-images/motif-progressbar.png
new file mode 100644
index 0000000..5acb425
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-pushbutton.png b/doc/src/diagrams/gallery-images/motif-pushbutton.png
new file mode 100644
index 0000000..4c6f6f3
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-radiobutton.png b/doc/src/diagrams/gallery-images/motif-radiobutton.png
new file mode 100644
index 0000000..7dd1d74
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-slider.png b/doc/src/diagrams/gallery-images/motif-slider.png
new file mode 100644
index 0000000..3dbbe64
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-spinbox.png b/doc/src/diagrams/gallery-images/motif-spinbox.png
new file mode 100644
index 0000000..b5087a6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-tableview.png b/doc/src/diagrams/gallery-images/motif-tableview.png
new file mode 100644
index 0000000..fcafe67
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-tabwidget.png b/doc/src/diagrams/gallery-images/motif-tabwidget.png
new file mode 100644
index 0000000..2c18459
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-textedit.png b/doc/src/diagrams/gallery-images/motif-textedit.png
new file mode 100644
index 0000000..b232c14
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-timeedit.png b/doc/src/diagrams/gallery-images/motif-timeedit.png
new file mode 100644
index 0000000..8a99406
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-toolbox.png b/doc/src/diagrams/gallery-images/motif-toolbox.png
new file mode 100644
index 0000000..6b1f290
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-toolbutton.png b/doc/src/diagrams/gallery-images/motif-toolbutton.png
new file mode 100644
index 0000000..7ea7fe3
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/motif-treeview.png b/doc/src/diagrams/gallery-images/motif-treeview.png
new file mode 100644
index 0000000..093735b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/motif-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-calendarwidget.png b/doc/src/diagrams/gallery-images/plastique-calendarwidget.png
new file mode 100644
index 0000000..404ab2b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-checkbox.png b/doc/src/diagrams/gallery-images/plastique-checkbox.png
new file mode 100644
index 0000000..54868cb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-colordialog.png b/doc/src/diagrams/gallery-images/plastique-colordialog.png
new file mode 100644
index 0000000..6cc18ab
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-colordialog.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-combobox.png b/doc/src/diagrams/gallery-images/plastique-combobox.png
new file mode 100644
index 0000000..e3bf8a3
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-dateedit.png b/doc/src/diagrams/gallery-images/plastique-dateedit.png
new file mode 100644
index 0000000..f71163f
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-datetimeedit.png b/doc/src/diagrams/gallery-images/plastique-datetimeedit.png
new file mode 100644
index 0000000..dc84d19
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-dial.png b/doc/src/diagrams/gallery-images/plastique-dial.png
new file mode 100644
index 0000000..d1adec1
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-doublespinbox.png b/doc/src/diagrams/gallery-images/plastique-doublespinbox.png
new file mode 100644
index 0000000..2c8af54
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-fontcombobox.png b/doc/src/diagrams/gallery-images/plastique-fontcombobox.png
new file mode 100644
index 0000000..c2ed76c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-fontdialog.png b/doc/src/diagrams/gallery-images/plastique-fontdialog.png
new file mode 100644
index 0000000..209e59b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-fontdialog.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-frame.png b/doc/src/diagrams/gallery-images/plastique-frame.png
new file mode 100644
index 0000000..d20d69b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-groupbox.png b/doc/src/diagrams/gallery-images/plastique-groupbox.png
new file mode 100644
index 0000000..624f279
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/plastique-horizontalscrollbar.png
new file mode 100644
index 0000000..df50e03
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-label.png b/doc/src/diagrams/gallery-images/plastique-label.png
new file mode 100644
index 0000000..1423b05
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-lcdnumber.png b/doc/src/diagrams/gallery-images/plastique-lcdnumber.png
new file mode 100644
index 0000000..8b13ea9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-lineedit.png b/doc/src/diagrams/gallery-images/plastique-lineedit.png
new file mode 100644
index 0000000..d2ed505
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-listview.png b/doc/src/diagrams/gallery-images/plastique-listview.png
new file mode 100644
index 0000000..76dfd0c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-menubar.png b/doc/src/diagrams/gallery-images/plastique-menubar.png
new file mode 100644
index 0000000..62fdc91
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-menubar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-messagebox.png b/doc/src/diagrams/gallery-images/plastique-messagebox.png
new file mode 100644
index 0000000..c927ad9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-messagebox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-progressbar.png b/doc/src/diagrams/gallery-images/plastique-progressbar.png
new file mode 100644
index 0000000..d02187e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-progressdialog.png b/doc/src/diagrams/gallery-images/plastique-progressdialog.png
new file mode 100644
index 0000000..d6f426a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-progressdialog.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-pushbutton.png b/doc/src/diagrams/gallery-images/plastique-pushbutton.png
new file mode 100644
index 0000000..a476b58
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-radiobutton.png b/doc/src/diagrams/gallery-images/plastique-radiobutton.png
new file mode 100644
index 0000000..373e04c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-sizegrip.png b/doc/src/diagrams/gallery-images/plastique-sizegrip.png
new file mode 100644
index 0000000..a83fd44
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-sizegrip.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-slider.png b/doc/src/diagrams/gallery-images/plastique-slider.png
new file mode 100644
index 0000000..a5698bb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-spinbox.png b/doc/src/diagrams/gallery-images/plastique-spinbox.png
new file mode 100644
index 0000000..2a4008c
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-statusbar.png b/doc/src/diagrams/gallery-images/plastique-statusbar.png
new file mode 100644
index 0000000..c3923a5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-statusbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-tabbar-truncated.png b/doc/src/diagrams/gallery-images/plastique-tabbar-truncated.png
new file mode 100644
index 0000000..868a36a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-tabbar-truncated.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-tabbar.png b/doc/src/diagrams/gallery-images/plastique-tabbar.png
new file mode 100644
index 0000000..721cb30
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-tabbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-tableview.png b/doc/src/diagrams/gallery-images/plastique-tableview.png
new file mode 100644
index 0000000..7dd40fd
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-tabwidget.png b/doc/src/diagrams/gallery-images/plastique-tabwidget.png
new file mode 100644
index 0000000..200f348
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-textedit.png b/doc/src/diagrams/gallery-images/plastique-textedit.png
new file mode 100644
index 0000000..5599cdb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-timeedit.png b/doc/src/diagrams/gallery-images/plastique-timeedit.png
new file mode 100644
index 0000000..c638dbc
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-toolbox.png b/doc/src/diagrams/gallery-images/plastique-toolbox.png
new file mode 100644
index 0000000..9212594
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-toolbutton.png b/doc/src/diagrams/gallery-images/plastique-toolbutton.png
new file mode 100644
index 0000000..eac8763
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/plastique-treeview.png b/doc/src/diagrams/gallery-images/plastique-treeview.png
new file mode 100644
index 0000000..34de0e9
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/plastique-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-calendarwidget.png b/doc/src/diagrams/gallery-images/windows-calendarwidget.png
new file mode 100644
index 0000000..5734103
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-checkbox.png b/doc/src/diagrams/gallery-images/windows-checkbox.png
new file mode 100644
index 0000000..cc40f16
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-combobox.png b/doc/src/diagrams/gallery-images/windows-combobox.png
new file mode 100644
index 0000000..218d90e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-dateedit.png b/doc/src/diagrams/gallery-images/windows-dateedit.png
new file mode 100644
index 0000000..8e98d42
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-datetimeedit.png b/doc/src/diagrams/gallery-images/windows-datetimeedit.png
new file mode 100644
index 0000000..6cd5b2a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-dial.png b/doc/src/diagrams/gallery-images/windows-dial.png
new file mode 100644
index 0000000..36dd3e2
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-doublespinbox.png b/doc/src/diagrams/gallery-images/windows-doublespinbox.png
new file mode 100644
index 0000000..0e12fc4
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-fontcombobox.png b/doc/src/diagrams/gallery-images/windows-fontcombobox.png
new file mode 100644
index 0000000..80bbb5a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-frame.png b/doc/src/diagrams/gallery-images/windows-frame.png
new file mode 100644
index 0000000..5e72c36
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-groupbox.png b/doc/src/diagrams/gallery-images/windows-groupbox.png
new file mode 100644
index 0000000..8a9d8f3
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/windows-horizontalscrollbar.png
new file mode 100644
index 0000000..da35a4a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-label.png b/doc/src/diagrams/gallery-images/windows-label.png
new file mode 100644
index 0000000..9d2da07
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-lcdnumber.png b/doc/src/diagrams/gallery-images/windows-lcdnumber.png
new file mode 100644
index 0000000..7503cc8
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-lineedit.png b/doc/src/diagrams/gallery-images/windows-lineedit.png
new file mode 100644
index 0000000..ffbdb5a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-listview.png b/doc/src/diagrams/gallery-images/windows-listview.png
new file mode 100644
index 0000000..9e04271
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-progressbar.png b/doc/src/diagrams/gallery-images/windows-progressbar.png
new file mode 100644
index 0000000..86ca13e
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-pushbutton.png b/doc/src/diagrams/gallery-images/windows-pushbutton.png
new file mode 100644
index 0000000..d095655
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-radiobutton.png b/doc/src/diagrams/gallery-images/windows-radiobutton.png
new file mode 100644
index 0000000..65a2967
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-slider.png b/doc/src/diagrams/gallery-images/windows-slider.png
new file mode 100644
index 0000000..38115a2
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-spinbox.png b/doc/src/diagrams/gallery-images/windows-spinbox.png
new file mode 100644
index 0000000..69d4af4
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-tableview.png b/doc/src/diagrams/gallery-images/windows-tableview.png
new file mode 100644
index 0000000..c42af7f
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-tabwidget.png b/doc/src/diagrams/gallery-images/windows-tabwidget.png
new file mode 100644
index 0000000..22651b8
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-textedit.png b/doc/src/diagrams/gallery-images/windows-textedit.png
new file mode 100644
index 0000000..ea930d5
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-timeedit.png b/doc/src/diagrams/gallery-images/windows-timeedit.png
new file mode 100644
index 0000000..ed22884
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-toolbox.png b/doc/src/diagrams/gallery-images/windows-toolbox.png
new file mode 100644
index 0000000..50a5d5a
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-toolbutton.png b/doc/src/diagrams/gallery-images/windows-toolbutton.png
new file mode 100644
index 0000000..b762be3
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windows-treeview.png b/doc/src/diagrams/gallery-images/windows-treeview.png
new file mode 100644
index 0000000..68f98ae
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windows-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-calendarwidget.png b/doc/src/diagrams/gallery-images/windowsvista-calendarwidget.png
new file mode 100644
index 0000000..050f0ac
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-calendarwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-checkbox.png b/doc/src/diagrams/gallery-images/windowsvista-checkbox.png
new file mode 100644
index 0000000..c533809
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-checkbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-combobox.png b/doc/src/diagrams/gallery-images/windowsvista-combobox.png
new file mode 100644
index 0000000..8ab83cb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-combobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-dateedit.png b/doc/src/diagrams/gallery-images/windowsvista-dateedit.png
new file mode 100644
index 0000000..85e6ed4
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-dateedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-datetimeedit.png b/doc/src/diagrams/gallery-images/windowsvista-datetimeedit.png
new file mode 100644
index 0000000..390c956
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-datetimeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-dial.png b/doc/src/diagrams/gallery-images/windowsvista-dial.png
new file mode 100644
index 0000000..86f3a86
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-dial.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-doublespinbox.png b/doc/src/diagrams/gallery-images/windowsvista-doublespinbox.png
new file mode 100644
index 0000000..bf3d2cc
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-doublespinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-fontcombobox.png b/doc/src/diagrams/gallery-images/windowsvista-fontcombobox.png
new file mode 100644
index 0000000..7810fdb
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-fontcombobox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-frame.png b/doc/src/diagrams/gallery-images/windowsvista-frame.png
new file mode 100644
index 0000000..d3e2885
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-frame.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-groupbox.png b/doc/src/diagrams/gallery-images/windowsvista-groupbox.png
new file mode 100644
index 0000000..917eea1
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-groupbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-horizontalscrollbar.png b/doc/src/diagrams/gallery-images/windowsvista-horizontalscrollbar.png
new file mode 100644
index 0000000..103a2e6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-label.png b/doc/src/diagrams/gallery-images/windowsvista-label.png
new file mode 100644
index 0000000..3f6f2c0
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-label.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-lcdnumber.png b/doc/src/diagrams/gallery-images/windowsvista-lcdnumber.png
new file mode 100644
index 0000000..7e875dd
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-lcdnumber.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-lineedit.png b/doc/src/diagrams/gallery-images/windowsvista-lineedit.png
new file mode 100644
index 0000000..5f13d9b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-lineedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-listview.png b/doc/src/diagrams/gallery-images/windowsvista-listview.png
new file mode 100644
index 0000000..a2d0c66
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-listview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-progressbar.png b/doc/src/diagrams/gallery-images/windowsvista-progressbar.png
new file mode 100644
index 0000000..6d4da7b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-progressbar.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-pushbutton.png b/doc/src/diagrams/gallery-images/windowsvista-pushbutton.png
new file mode 100644
index 0000000..128f232
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-pushbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-radiobutton.png b/doc/src/diagrams/gallery-images/windowsvista-radiobutton.png
new file mode 100644
index 0000000..f739ae0
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-radiobutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-slider.png b/doc/src/diagrams/gallery-images/windowsvista-slider.png
new file mode 100644
index 0000000..a3a5d93
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-slider.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-spinbox.png b/doc/src/diagrams/gallery-images/windowsvista-spinbox.png
new file mode 100644
index 0000000..79115d6
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-spinbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-tableview.png b/doc/src/diagrams/gallery-images/windowsvista-tableview.png
new file mode 100644
index 0000000..b94b07f
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-tableview.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-tabwidget.png b/doc/src/diagrams/gallery-images/windowsvista-tabwidget.png
new file mode 100644
index 0000000..28b0a39
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-tabwidget.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-textedit.png b/doc/src/diagrams/gallery-images/windowsvista-textedit.png
new file mode 100644
index 0000000..c952731
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-textedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-timeedit.png b/doc/src/diagrams/gallery-images/windowsvista-timeedit.png
new file mode 100644
index 0000000..9a4b053
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-timeedit.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-toolbox.png b/doc/src/diagrams/gallery-images/windowsvista-toolbox.png
new file mode 100644
index 0000000..b3477e8
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-toolbox.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-toolbutton.png b/doc/src/diagrams/gallery-images/windowsvista-toolbutton.png
new file mode 100644
index 0000000..0ab376b
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-toolbutton.png
Binary files differ
diff --git a/doc/src/diagrams/gallery-images/windowsvista-treeview.png b/doc/src/diagrams/gallery-images/windowsvista-treeview.png
new file mode 100644
index 0000000..7626820
--- /dev/null
+++ b/doc/src/diagrams/gallery-images/windowsvista-treeview.png
Binary files differ
diff --git a/doc/src/diagrams/graphicsview-map.png b/doc/src/diagrams/graphicsview-map.png
new file mode 100644
index 0000000..5ad12c6
--- /dev/null
+++ b/doc/src/diagrams/graphicsview-map.png
Binary files differ
diff --git a/doc/src/diagrams/graphicsview-map.zip b/doc/src/diagrams/graphicsview-map.zip
new file mode 100644
index 0000000..a80ade5
--- /dev/null
+++ b/doc/src/diagrams/graphicsview-map.zip
Binary files differ
diff --git a/doc/src/diagrams/graphicsview-shapes.png b/doc/src/diagrams/graphicsview-shapes.png
new file mode 100644
index 0000000..01fcca1
--- /dev/null
+++ b/doc/src/diagrams/graphicsview-shapes.png
Binary files differ
diff --git a/doc/src/diagrams/graphicsview-text.png b/doc/src/diagrams/graphicsview-text.png
new file mode 100644
index 0000000..47a5505
--- /dev/null
+++ b/doc/src/diagrams/graphicsview-text.png
Binary files differ
diff --git a/doc/src/diagrams/hellogl-example.png b/doc/src/diagrams/hellogl-example.png
new file mode 100644
index 0000000..82b6f2c
--- /dev/null
+++ b/doc/src/diagrams/hellogl-example.png
Binary files differ
diff --git a/doc/src/diagrams/house.png b/doc/src/diagrams/house.png
new file mode 100644
index 0000000..9b7b587
--- /dev/null
+++ b/doc/src/diagrams/house.png
Binary files differ
diff --git a/doc/src/diagrams/house.sk b/doc/src/diagrams/house.sk
new file mode 100644
index 0000000..997153d
--- /dev/null
+++ b/doc/src/diagrams/house.sk
@@ -0,0 +1,33 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(90,0,0,-65,35,810)
+gl([(0,(0.866,0.684,0.208)),(1,(0.913,0.888,0.165))])
+pgl(0,-1,0)
+fp()
+lw(1)
+r(60,0,0,35,50,750)
+gl([(0,(0.866,0.358,0.337)),(1,(0.913,0.651,0.313))])
+pgl(0,-1,0)
+fp()
+lw(1)
+b()
+bs(120,785,0)
+bs(100,805,0)
+bs(60,805,0)
+bs(40,785,0)
+bs(120,785,0)
+bC()
+fp((1,1,1))
+lw(1)
+r(15,0,0,-15,60,780)
+gl([(0,(0.866,0.358,0.337)),(1,(0.913,0.651,0.313))])
+pgl(0,-1,0)
+fp()
+lw(1)
+r(15,0,0,25,85,750)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/httpstack.sk b/doc/src/diagrams/httpstack.sk
new file mode 100644
index 0000000..9a93682
--- /dev/null
+++ b/doc/src/diagrams/httpstack.sk
@@ -0,0 +1,112 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.808,0.4,0.4))
+lw(1)
+r(150,0,0,-20,97.5,732.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Client Application',(126.15,718.5))
+fp((0.9,0.9,0.9))
+lw(1)
+r(150,0,0,-20,97.5,712.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('HTTP/FTP',(143.832,698.5))
+fp((0.8,0.8,0.8))
+lw(1)
+r(150,0,0,-20,97.5,692.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('TCP',(160.5,678.5))
+fp((0.7,0.7,0.7))
+lw(1)
+r(150,0,0,-20,97.5,672.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('IP',(166.83,658.5))
+fp((0.625,0.625,0.625))
+lw(1)
+r(150,0,0,-20,97.5,652.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Link Layer',(144.822,638.5))
+fp((0.55,0.55,0.55))
+lw(1)
+r(150,0,0,-20,97.5,632.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Physical Layer',(133.488,618.5))
+fp((0.245,0.484,0.808))
+lw(1)
+r(150,0,0,-20,337.5,732.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Server Application',(363.816,718.5))
+fp((0.9,0.9,0.9))
+lw(1)
+r(150,0,0,-20,337.5,712.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('HTTP/FTP',(383.832,698.5))
+fp((0.8,0.8,0.8))
+lw(1)
+r(150,0,0,-20,337.5,692.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('TCP',(400.5,678.5))
+fp((0.7,0.7,0.7))
+lw(1)
+r(150,0,0,-20,337.5,672.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('IP',(406.83,658.5))
+fp((0.625,0.625,0.625))
+lw(1)
+r(150,0,0,-20,337.5,652.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Link Layer',(384.822,638.5))
+fp((0.55,0.55,0.55))
+lw(1)
+r(150,0,0,-20,337.5,632.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Physical Layer',(373.488,618.5))
+lp((0.217,0.6,0))
+lw(1.5)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(252.5,622.5,0)
+bs(332.5,622.5,0)
+le()
+lw(1)
+r(410,0,0,-140,87.5,742.5)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/itemviews/editabletreemodel-indexes.sk b/doc/src/diagrams/itemviews/editabletreemodel-indexes.sk
new file mode 100644
index 0000000..ad57384
--- /dev/null
+++ b/doc/src/diagrams/itemviews/editabletreemodel-indexes.sk
@@ -0,0 +1,92 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(212.5,0,0,-180,165,730)
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('TreeItem::parent()',(180,637.82))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(188.33,678.14))
+lw(1)
+r(30,0,0,-30,180,700)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(187.78,590.64))
+lw(1)
+r(30,0,0,-30,180,612.5)
+G_()
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('TreeModel::internalPointer()',(207.5,560))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('TreeModel::createIndex()',(207.5,715.32))
+lw(1)
+ld((2, 2))
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(180.125,665,0)
+bc(175.352,655.495,173.294,646.758,173.836,638.714,1)
+bc(174.37,630.789,177.818,624.278,182.5,616.996,1)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(215,582.5,0)
+bc(240,573.01,270,572.5,295,582.5,1)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(294.998,700.41,0)
+bc(269.947,709.762,239.944,710.108,215,699.97,1)
+lw(1)
+r(70,0,0,-30,300,612.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('child',(324.72,600.32))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('model index',(308.045,587.82))
+lw(1)
+r(70,0,0,-30,300,700)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('parent',(320.825,687.82))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('model index',(308.045,675.32))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/itemviews/editabletreemodel-items.sk b/doc/src/diagrams/itemviews/editabletreemodel-items.sk
new file mode 100644
index 0000000..8c7bfac
--- /dev/null
+++ b/doc/src/diagrams/itemviews/editabletreemodel-items.sk
@@ -0,0 +1,119 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(227.5,0,0,-225,140,740)
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('parent()',(327.49,578.25))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('parent()',(272.49,692.5))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('parent()',(180,617.82))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('child(0)',(228.976,678.25))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('child(0)',(287.22,555.75))
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('child(1)',(235,625))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,205,735.43)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('root item',(145.128,716.814))
+lw(1)
+ld((2, 2))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(327.5,555.43,0)
+bc(326.189,566.2,323.978,574.469,319.693,579.482,1)
+bc(315.471,584.421,309.225,586.174,301.476,587.5,1)
+lw(1)
+ld((2, 2))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(271.476,675.43,0)
+bc(270.016,686.345,267.555,694.724,262.783,699.805,1)
+bc(258.083,704.81,251.128,706.586,242.5,707.93,1)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(216.476,700.43,0)
+bc(218.411,687.052,221.761,676.771,228.35,670.517,1)
+bc(234.84,664.355,244.494,662.134,256.476,660.43,1)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(276.476,580,0)
+bc(278.169,566.622,281.1,556.341,286.865,550.087,1)
+bc(292.545,543.925,300.992,541.704,311.476,540,1)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(213.976,700.43,0)
+bc(216.032,668.656,219.591,644.241,226.592,629.386,1)
+bc(233.488,614.753,243.745,609.476,256.476,605.43,1)
+lw(1)
+ld((2, 2))
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(207.5,700.43,0)
+bc(210,645.43,215,605.43,257.5,595.43,1)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(273.33,648.57))
+lw(1)
+r(30,0,0,-30,265,670.43)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(273.33,593.14))
+lw(1)
+r(30,0,0,-30,265,615)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(327.78,528.14))
+lw(1)
+r(30,0,0,-30,320,550)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/itemviews/editabletreemodel-model.sk b/doc/src/diagrams/itemviews/editabletreemodel-model.sk
new file mode 100644
index 0000000..cbd3c89
--- /dev/null
+++ b/doc/src/diagrams/itemviews/editabletreemodel-model.sk
@@ -0,0 +1,392 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(270.316,591.384))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 3',(270.316,561.384))
+le()
+lw(1)
+ld((3, 3))
+r(280,0,0,-247.5,135,715)
+gl([(0,(1,1,1)),(0.47,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+r(5.51073e-15,-30,30,5.51073e-15,235,610)
+gl([(0,(1,1,1)),(0.19,(1,1,1)),(0.815,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgr(-0.00900901,1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,265,580)
+gl([(0,(1,1,1)),(0.47,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,205,580)
+fp((0.899,0.899,0.899))
+lp((0.503,0.503,0.503))
+lw(1)
+r(30,0,0,-30,175,610)
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,175,640)
+gl([(0,(1,1,1)),(0.47,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,235,580)
+G()
+lw(1)
+b()
+bs(235,610,0)
+bs(255,610,0)
+lw(1)
+ld((2, 2))
+b()
+bs(255,610,0)
+bs(265,610,0)
+G_()
+fp((0.899,0.899,0.899))
+lp((0.503,0.503,0.503))
+lw(1)
+r(30,0,0,-30,205,610)
+gl([(0,(1,1,1)),(0.47,(0.866,0.866,0.866)),(1,(0.866,0.866,0.866))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+r(5.51073e-15,-30,30,5.51073e-15,235,640)
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,175,670)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,140,710)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('root item',(180,691.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(270.316,651.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(270.316,621.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(370.316,546.384))
+lw(1)
+b()
+bs(155,680,0)
+bs(155,655,0)
+lw(1)
+b()
+bs(155,655,0)
+bs(175,655,0)
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,205,640)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('a',(184.44,650))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('b',(184.44,618.14))
+gl([(0,(1,1,1)),(0.47,(0.866,0.866,0.866)),(1,(0.866,0.866,0.866))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(5.51073e-15,-30,30,5.51073e-15,235,670)
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,205,670)
+G()
+lw(1)
+b()
+bs(235,670,0)
+bs(255,670,0)
+lw(1)
+ld((2, 2))
+b()
+bs(255,670,0)
+bs(265,670,0)
+G_()
+G()
+lw(1)
+b()
+bs(235,640,0)
+bs(255,640,0)
+lw(1)
+ld((2, 2))
+b()
+bs(255,640,0)
+bs(265,640,0)
+G_()
+lw(1)
+b()
+bs(190,615,0)
+bs(190,587.5,0)
+bs(275,587.5,0)
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(235,580,0)
+bs(235,560,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(235,560,0)
+bs(235,550,0)
+G_()
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(205,580,0)
+bs(205,560,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(205,560,0)
+bs(205,550,0)
+G_()
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(175,580,0)
+bs(175,560,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(175,560,0)
+bs(175,550,0)
+G_()
+G()
+lw(1)
+b()
+bs(235,610,0)
+bs(255,610,0)
+lw(1)
+ld((2, 2))
+b()
+bs(255,610,0)
+bs(265,610,0)
+G_()
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(235,580,0)
+bs(255,580,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(255,580,0)
+bs(265,580,0)
+G_()
+G()
+gl([(0,(1,1,1)),(0.47,(0.866,0.866,0.866)),(1,(0.866,0.866,0.866))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(5.51073e-15,-30,30,5.51073e-15,335,595)
+G()
+lw(1)
+b()
+bs(335,595,0)
+bs(355,595,0)
+lw(1)
+ld((2, 2))
+b()
+bs(355,595,0)
+bs(365,595,0)
+G_()
+G()
+lw(1)
+b()
+bs(335,565,0)
+bs(355,565,0)
+lw(1)
+ld((2, 2))
+b()
+bs(355,565,0)
+bs(365,565,0)
+G_()
+G_()
+gl([(0,(1,1,1)),(0.19,(1,1,1)),(0.815,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgr(-0.00900901,1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,365,565)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(280,572.5,0)
+bs(290,572.5,0)
+gl([(0,(1,1,1)),(0.47,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,305,565)
+gl([(0,(1,1,1)),(0.47,(0.899,0.899,0.899)),(1,(0.899,0.899,0.899))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+ld((3, 3))
+r(-30,0,0,-30,335,565)
+G()
+lw(1)
+b()
+bs(300,577.5,0)
+bs(320,577.5,0)
+lw(1)
+ld((2, 2))
+b()
+bs(320,577.5,0)
+bs(330,577.5,0)
+G_()
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,305,595)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(370.316,576.384))
+fp((0.866,0.866,0.866))
+lw(1)
+r(30,0,0,-30,275,595)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('c',(315,574.89))
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(335,565,0)
+bs(335,545,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(335,545,0)
+bs(335,535,0)
+G_()
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(305,565,0)
+bs(305,545,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(305,545,0)
+bs(305,535,0)
+G_()
+G()
+lp((0.503,0.503,0.503))
+lw(1)
+b()
+bs(275,565,0)
+bs(275,545,0)
+lp((0.503,0.503,0.503))
+lw(1)
+ld((2, 2))
+b()
+bs(275,545,0)
+bs(275,535,0)
+G_()
+lw(1)
+b()
+bs(335,565,0)
+bs(355,565,0)
+lw(1)
+ld((2, 2))
+b()
+bs(355,565,0)
+bs(365,565,0)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 1',(0,-1,1,0,317.484,530))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 0',(0,-1,1,0,287.484,530))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 2',(0,-1,1,0,347.484,530))
+G_()
+G()
+fp((0,0,0))
+lw(1)
+ld((3, 3))
+Fn('Helvetica')
+txt('column = 1',(0,-1,1,0,216.384,545))
+fp((0,0,0))
+lw(1)
+ld((3, 3))
+Fn('Helvetica')
+txt('column = 0',(0,-1,1,0,186.384,545))
+fp((0,0,0))
+lw(1)
+ld((3, 3))
+Fn('Helvetica')
+txt('column = 2',(0,-1,1,0,246.384,545))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/itemviews/editabletreemodel-values.sk b/doc/src/diagrams/itemviews/editabletreemodel-values.sk
new file mode 100644
index 0000000..50f8543
--- /dev/null
+++ b/doc/src/diagrams/itemviews/editabletreemodel-values.sk
@@ -0,0 +1,263 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+ld((1, 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(111.719,739.57,0)
+bs(134.219,739.57,0)
+bs(137.5,732.07,0)
+lw(1)
+ld((1, 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(111.719,639.57,0)
+bs(134.219,639.57,0)
+bs(137.5,632.07,0)
+fp((0,0,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('data(...)',(78.04,747.82))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('itemData',(153.012,718.454))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('itemData',(153.012,618.454))
+lw(1)
+r(15,0,0,-15,70,730)
+lw(1)
+r(15,0,0,-15,70,630)
+lw(1)
+r(15,0,0,-15,85,730)
+lw(1)
+r(15,0,0,-15,85,630)
+lw(1)
+r(15,0,0,-15,100,730)
+lw(1)
+r(15,0,0,-15,100,630)
+lw(1)
+r(15,0,0,-15,115,730)
+lw(1)
+r(15,0,0,-15,115,630)
+lw(1)
+ld((3, 3))
+r(15,0,0,-15,130,730)
+lw(1)
+ld((3, 3))
+r(15,0,0,-15,130,630)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(50,735,0)
+bs(52.5,739.57,0)
+bs(75,739.57,0)
+bs(77.5,732.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(50,635,0)
+bs(52.5,639.57,0)
+bs(75,639.57,0)
+bs(77.5,632.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(68.315,739.57,0)
+bs(90.815,739.57,0)
+bs(92.5,732.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(68.315,639.57,0)
+bs(90.815,639.57,0)
+bs(92.5,632.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(83.038,739.57,0)
+bs(105.538,739.57,0)
+bs(107.5,732.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(83.038,639.57,0)
+bs(105.538,639.57,0)
+bs(107.5,632.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(97.417,739.57,0)
+bs(119.917,739.57,0)
+bs(122.5,732.07,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(97.417,639.57,0)
+bs(119.917,639.57,0)
+bs(122.5,632.07,0)
+fp((0.706,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(74.164,718.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(74.164,618.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(89.164,718.595))
+fp((0.706,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(89.164,618.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(104.164,718.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(104.164,618.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(119.164,718.595))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(119.164,618.595))
+lw(1)
+r(180,0,0,-160,25,760)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(37.78,613.14))
+lw(1)
+r(30,0,0,-30,30,635)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(38.33,713.14))
+lw(1)
+r(30,0,0,-30,30,735)
+G_()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('c',(89.5,604.314))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('a',(74.164,703.884))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(38.33,663.14))
+lw(1)
+r(30,0,0,-30,30,685)
+G_()
+lw(1)
+ld((1, 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(111.719,690,0)
+bs(134.219,690,0)
+bs(137.5,682.5,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('itemData',(153.012,668.884))
+lw(1)
+r(15,0,0,-15,70,680.43)
+lw(1)
+r(15,0,0,-15,85,680.43)
+lw(1)
+r(15,0,0,-15,100,680.43)
+lw(1)
+r(15,0,0,-15,115,680.43)
+lw(1)
+ld((3, 3))
+r(15,0,0,-15,130,680.43)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(50,685.43,0)
+bs(52.5,690,0)
+bs(75,690,0)
+bs(77.5,682.5,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(68.315,690,0)
+bs(90.815,690,0)
+bs(92.5,682.5,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(83.038,690,0)
+bs(105.538,690,0)
+bs(107.5,682.5,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(97.417,690,0)
+bs(119.917,690,0)
+bs(122.5,682.5,0)
+fp((0.706,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(74.164,669.025))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(89.164,669.025))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(104.164,669.025))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(119.164,669.025))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('b',(74.164,654.025))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/licensewizard-flow.sk b/doc/src/diagrams/licensewizard-flow.sk
new file mode 100644
index 0000000..79fae26
--- /dev/null
+++ b/doc/src/diagrams/licensewizard-flow.sk
@@ -0,0 +1,54 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(1083898156,'/tmp/x/licensewizard-evaluate.gif')
+im((851.299,69.838),1083898156)
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(496.05,895.241,0)
+bs(597.322,1024.52,0)
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(1010.49,1262.08,0)
+bs(1200.11,1262.08,0)
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(1675.76,1024.52,0)
+bs(1777.03,895.241,0)
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(890.669,1026.68,0)
+bs(1537.09,725.018,0)
+bm(1081732172,'/tmp/x/licensewizard-conclusion.gif')
+im((1580.67,443.683),1081732172)
+bm(1083701292,'/tmp/x/licensewizard-details.gif')
+im((1239.15,1048.08),1083701292)
+bm(1083701484,'/tmp/x/licensewizard-intro.gif')
+im((121.925,443.683),1083701484)
+bm(1083722348,'/tmp/x/licensewizard-register.gif')
+im((463.448,1048.08),1083722348)
+G()
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(522.833,413.964,0)
+bs(818.03,278.216,0)
+lp((1,0,0))
+lw(7)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(1392.57,278.216,0)
+bs(1687.76,413.964,0)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,10000,10000),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/linguist-icons/appicon.png b/doc/src/diagrams/linguist-icons/appicon.png
new file mode 100644
index 0000000..dab379f
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/appicon.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/linguist.qrc b/doc/src/diagrams/linguist-icons/linguist.qrc
new file mode 100644
index 0000000..1972905
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/linguist.qrc
@@ -0,0 +1,51 @@
+<RCC>
+<qresource>
+ <file>images/appicon.png</file>
+ <file>images/splash.png</file>
+ <file>images/s_check_danger.png</file>
+ <file>images/s_check_empty.png</file>
+ <file>images/s_check_warning.png</file>
+ <file>images/s_check_obsolete.png</file>
+ <file>images/s_check_off.png</file>
+ <file>images/s_check_on.png</file>
+ <file>images/pagecurl.png</file>
+ <file>images/mac/accelerator.png</file>
+ <file>images/mac/book.png</file>
+ <file>images/mac/doneandnext.png</file>
+ <file>images/mac/editcopy.png</file>
+ <file>images/mac/editcut.png</file>
+ <file>images/mac/editpaste.png</file>
+ <file>images/mac/fileopen.png</file>
+ <file>images/mac/filesave.png</file>
+ <file>images/mac/next.png</file>
+ <file>images/mac/nextunfinished.png</file>
+ <file>images/mac/phrase.png</file>
+ <file>images/mac/prev.png</file>
+ <file>images/mac/prevunfinished.png</file>
+ <file>images/mac/print.png</file>
+ <file>images/mac/punctuation.png</file>
+ <file>images/mac/redo.png</file>
+ <file>images/mac/searchfind.png</file>
+ <file>images/mac/undo.png</file>
+ <file>images/mac/whatsthis.png</file>
+ <file>images/win/accelerator.png</file>
+ <file>images/win/book.png</file>
+ <file>images/win/doneandnext.png</file>
+ <file>images/win/editcopy.png</file>
+ <file>images/win/editcut.png</file>
+ <file>images/win/editpaste.png</file>
+ <file>images/win/fileopen.png</file>
+ <file>images/win/filesave.png</file>
+ <file>images/win/next.png</file>
+ <file>images/win/nextunfinished.png</file>
+ <file>images/win/phrase.png</file>
+ <file>images/win/prev.png</file>
+ <file>images/win/prevunfinished.png</file>
+ <file>images/win/print.png</file>
+ <file>images/win/punctuation.png</file>
+ <file>images/win/redo.png</file>
+ <file>images/win/searchfind.png</file>
+ <file>images/win/undo.png</file>
+ <file>images/win/whatsthis.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/diagrams/linguist-icons/pagecurl.png b/doc/src/diagrams/linguist-icons/pagecurl.png
new file mode 100644
index 0000000..2d3f2ff
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/pagecurl.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_danger.png b/doc/src/diagrams/linguist-icons/s_check_danger.png
new file mode 100644
index 0000000..e101577
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_danger.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_empty.png b/doc/src/diagrams/linguist-icons/s_check_empty.png
new file mode 100644
index 0000000..759a41b
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_empty.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_obsolete.png b/doc/src/diagrams/linguist-icons/s_check_obsolete.png
new file mode 100644
index 0000000..b852b63
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_obsolete.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_off.png b/doc/src/diagrams/linguist-icons/s_check_off.png
new file mode 100644
index 0000000..640b689
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_off.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_on.png b/doc/src/diagrams/linguist-icons/s_check_on.png
new file mode 100644
index 0000000..afcaf63
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_on.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/s_check_warning.png b/doc/src/diagrams/linguist-icons/s_check_warning.png
new file mode 100644
index 0000000..f689c33
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/s_check_warning.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/splash.png b/doc/src/diagrams/linguist-icons/splash.png
new file mode 100644
index 0000000..e6c8f85
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/splash.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/accelerator.png b/doc/src/diagrams/linguist-icons/win/accelerator.png
new file mode 100644
index 0000000..4f72648
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/accelerator.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/book.png b/doc/src/diagrams/linguist-icons/win/book.png
new file mode 100644
index 0000000..1b35455
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/book.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/doneandnext.png b/doc/src/diagrams/linguist-icons/win/doneandnext.png
new file mode 100644
index 0000000..18f2fb6
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/doneandnext.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/editcopy.png b/doc/src/diagrams/linguist-icons/win/editcopy.png
new file mode 100644
index 0000000..d542c3b
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/editcopy.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/editcut.png b/doc/src/diagrams/linguist-icons/win/editcut.png
new file mode 100644
index 0000000..38e55f7
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/editcut.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/editpaste.png b/doc/src/diagrams/linguist-icons/win/editpaste.png
new file mode 100644
index 0000000..717dd86
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/editpaste.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/filenew.png b/doc/src/diagrams/linguist-icons/win/filenew.png
new file mode 100644
index 0000000..dd795cf
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/filenew.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/fileopen.png b/doc/src/diagrams/linguist-icons/win/fileopen.png
new file mode 100644
index 0000000..1b3e69f
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/fileopen.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/fileprint.png b/doc/src/diagrams/linguist-icons/win/fileprint.png
new file mode 100644
index 0000000..808c97e
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/fileprint.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/filesave.png b/doc/src/diagrams/linguist-icons/win/filesave.png
new file mode 100644
index 0000000..46eac82
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/filesave.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/next.png b/doc/src/diagrams/linguist-icons/win/next.png
new file mode 100644
index 0000000..7700d6f
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/next.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/nextunfinished.png b/doc/src/diagrams/linguist-icons/win/nextunfinished.png
new file mode 100644
index 0000000..05c92bd
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/nextunfinished.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/phrase.png b/doc/src/diagrams/linguist-icons/win/phrase.png
new file mode 100644
index 0000000..30c3ee6
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/phrase.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/prev.png b/doc/src/diagrams/linguist-icons/win/prev.png
new file mode 100644
index 0000000..99dc873
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/prev.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/prevunfinished.png b/doc/src/diagrams/linguist-icons/win/prevunfinished.png
new file mode 100644
index 0000000..15c13ea
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/prevunfinished.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/print.png b/doc/src/diagrams/linguist-icons/win/print.png
new file mode 100644
index 0000000..2afb769
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/print.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/punctuation.png b/doc/src/diagrams/linguist-icons/win/punctuation.png
new file mode 100644
index 0000000..3492f95
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/punctuation.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/redo.png b/doc/src/diagrams/linguist-icons/win/redo.png
new file mode 100644
index 0000000..9d679fe
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/redo.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/searchfind.png b/doc/src/diagrams/linguist-icons/win/searchfind.png
new file mode 100644
index 0000000..6ea35e9
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/searchfind.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/undo.png b/doc/src/diagrams/linguist-icons/win/undo.png
new file mode 100644
index 0000000..eee23d2
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/undo.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-icons/win/whatsthis.png b/doc/src/diagrams/linguist-icons/win/whatsthis.png
new file mode 100644
index 0000000..0b5d46a
--- /dev/null
+++ b/doc/src/diagrams/linguist-icons/win/whatsthis.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-linguist.png b/doc/src/diagrams/linguist-linguist.png
new file mode 100644
index 0000000..fd63bb4
--- /dev/null
+++ b/doc/src/diagrams/linguist-linguist.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-menubar.ui b/doc/src/diagrams/linguist-menubar.ui
new file mode 100644
index 0000000..b132282
--- /dev/null
+++ b/doc/src/diagrams/linguist-menubar.ui
@@ -0,0 +1,123 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" />
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Edit" >
+ <property name="title" >
+ <string>&amp;Edit</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Translation" >
+ <property name="title" >
+ <string>&amp;Translation</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Validation" >
+ <property name="title" >
+ <string>&amp;Validation</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Phrases" >
+ <property name="title" >
+ <string>&amp;Phrases</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_View" >
+ <property name="title" >
+ <string>&amp;View</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_Help" >
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu" >
+ <property name="title" >
+ <string> </string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_2" >
+ <property name="title" >
+ <string> </string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_3" >
+ <property name="title" >
+ <string> </string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menu_4" >
+ <property name="title" >
+ <string> </string>
+ </property>
+ </widget>
+ <addaction name="menu_File" />
+ <addaction name="menu_Edit" />
+ <addaction name="menu_Translation" />
+ <addaction name="menu_Validation" />
+ <addaction name="menu_Phrases" />
+ <addaction name="menu_View" />
+ <addaction name="menu_Help" />
+ <addaction name="menu" />
+ <addaction name="menu_2" />
+ <addaction name="menu_3" />
+ <addaction name="menu_4" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>9</y>
+ <width>800</width>
+ <height>0</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>false</bool>
+ </property>
+ <property name="sizeGripEnabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/linguist-previewtool.png b/doc/src/diagrams/linguist-previewtool.png
new file mode 100644
index 0000000..02cb311
--- /dev/null
+++ b/doc/src/diagrams/linguist-previewtool.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-toolbar.png b/doc/src/diagrams/linguist-toolbar.png
new file mode 100644
index 0000000..784f486
--- /dev/null
+++ b/doc/src/diagrams/linguist-toolbar.png
Binary files differ
diff --git a/doc/src/diagrams/linguist-toolbar.ui b/doc/src/diagrams/linguist-toolbar.ui
new file mode 100644
index 0000000..3018c12
--- /dev/null
+++ b/doc/src/diagrams/linguist-toolbar.ui
@@ -0,0 +1,252 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>744</width>
+ <height>38</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" />
+ <widget class="QStatusBar" name="statusbar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>16</y>
+ <width>744</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizeGripEnabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QToolBar" name="toolBar" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="actionOpen" />
+ <addaction name="actionSave" />
+ <addaction name="actionPrint" />
+ <addaction name="separator" />
+ <addaction name="actionOpen_Phrase_Book" />
+ </widget>
+ <widget class="QToolBar" name="toolBar_2" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="actionUndo" />
+ <addaction name="actionRedo" />
+ <addaction name="separator" />
+ <addaction name="actionCut" />
+ <addaction name="actionCopy" />
+ <addaction name="actionPaste" />
+ <addaction name="separator" />
+ <addaction name="actionFind" />
+ </widget>
+ <widget class="QToolBar" name="toolBar_3" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="actionPrev" />
+ <addaction name="actionNext" />
+ <addaction name="actionPrev_Unfinished" />
+ <addaction name="actionNext_Unfinished" />
+ <addaction name="actionDone_and_Next" />
+ </widget>
+ <widget class="QToolBar" name="toolBar_4" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="actionAccelerators" />
+ <addaction name="actionEnding_Punctuation" />
+ <addaction name="actionPhrase_Matches" />
+ </widget>
+ <widget class="QToolBar" name="toolBar_5" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <attribute name="toolBarArea" >
+ <number>4</number>
+ </attribute>
+ <addaction name="actionWhat_s_This" />
+ </widget>
+ <action name="actionOpen" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/fileopen.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Open</string>
+ </property>
+ </action>
+ <action name="actionSave" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/filesave.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Save</string>
+ </property>
+ </action>
+ <action name="actionPrint" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/print.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Print</string>
+ </property>
+ </action>
+ <action name="actionOpen_Phrase_Book" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/book.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Open Phrase Book</string>
+ </property>
+ </action>
+ <action name="actionUndo" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/undo.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Undo</string>
+ </property>
+ </action>
+ <action name="actionRedo" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/redo.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Redo</string>
+ </property>
+ </action>
+ <action name="actionCut" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/editcut.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Cut</string>
+ </property>
+ </action>
+ <action name="actionCopy" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/editcopy.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Copy</string>
+ </property>
+ </action>
+ <action name="actionPaste" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/editpaste.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Paste</string>
+ </property>
+ </action>
+ <action name="actionFind" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/searchfind.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Find</string>
+ </property>
+ </action>
+ <action name="actionPrev" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/prev.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Prev</string>
+ </property>
+ </action>
+ <action name="actionNext" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/next.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Next</string>
+ </property>
+ </action>
+ <action name="actionPrev_Unfinished" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/prevunfinished.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Prev Unfinished</string>
+ </property>
+ </action>
+ <action name="actionNext_Unfinished" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/nextunfinished.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Next Unfinished</string>
+ </property>
+ </action>
+ <action name="actionDone_and_Next" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/doneandnext.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Done and Next</string>
+ </property>
+ </action>
+ <action name="actionAccelerators" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/accelerator.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Accelerators</string>
+ </property>
+ </action>
+ <action name="actionEnding_Punctuation" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/punctuation.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Ending Punctuation</string>
+ </property>
+ </action>
+ <action name="actionPhrase_Matches" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/phrase.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Phrase Matches</string>
+ </property>
+ </action>
+ <action name="actionWhat_s_This" >
+ <property name="icon" >
+ <iconset resource="../../../tools/linguist/linguist/linguist.qrc" >:/images/win/whatsthis.png</iconset>
+ </property>
+ <property name="text" >
+ <string>What's This?</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources>
+ <include location="../../../tools/linguist/linguist/linguist.qrc" />
+ </resources>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/linguist-toolbar.zip b/doc/src/diagrams/linguist-toolbar.zip
new file mode 100644
index 0000000..d239250
--- /dev/null
+++ b/doc/src/diagrams/linguist-toolbar.zip
Binary files differ
diff --git a/doc/src/diagrams/macintosh-menu.png b/doc/src/diagrams/macintosh-menu.png
new file mode 100644
index 0000000..1013115
--- /dev/null
+++ b/doc/src/diagrams/macintosh-menu.png
Binary files differ
diff --git a/doc/src/diagrams/macintosh-unified-toolbar.png b/doc/src/diagrams/macintosh-unified-toolbar.png
new file mode 100644
index 0000000..9cba683
--- /dev/null
+++ b/doc/src/diagrams/macintosh-unified-toolbar.png
Binary files differ
diff --git a/doc/src/diagrams/mainwindow-contextmenu.png b/doc/src/diagrams/mainwindow-contextmenu.png
new file mode 100644
index 0000000..78ebe89
--- /dev/null
+++ b/doc/src/diagrams/mainwindow-contextmenu.png
Binary files differ
diff --git a/doc/src/diagrams/mainwindow-custom-dock.png b/doc/src/diagrams/mainwindow-custom-dock.png
new file mode 100644
index 0000000..865ba9c
--- /dev/null
+++ b/doc/src/diagrams/mainwindow-custom-dock.png
Binary files differ
diff --git a/doc/src/diagrams/mainwindow-docks.sk b/doc/src/diagrams/mainwindow-docks.sk
new file mode 100644
index 0000000..15352b2
--- /dev/null
+++ b/doc/src/diagrams/mainwindow-docks.sk
@@ -0,0 +1,78 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.879,0.879,0.879))
+lw(1)
+r(465,0,0,-305,65.1378,580)
+fp((1,1,1))
+lw(1)
+r(405,0,0,-245,95.1378,550)
+gl([(0,(0.875,0.624,0.627)),(1,(1,1,1))])
+pgr(0.5,0.5,0)
+fp()
+lw(1)
+r(295,0,0,-145,150,500)
+lw(1)
+ld((4, 4))
+b()
+bs(445,500,0)
+bs(445,550,0)
+lw(1)
+ld((4, 4))
+b()
+bs(150,550,0)
+bs(150,500,0)
+lw(1)
+ld((4, 4))
+b()
+bs(95,500,0)
+bs(150,500,0)
+lw(1)
+ld((4, 4))
+b()
+bs(445,500,0)
+bs(500,500,0)
+lw(1)
+ld((4, 4))
+b()
+bs(95,355,0)
+bs(150,355,0)
+lw(1)
+ld((4, 4))
+b()
+bs(445,355,0)
+bs(500,355,0)
+lw(1)
+ld((4, 4))
+b()
+bs(445,355,0)
+bs(445,305,0)
+lw(1)
+ld((4, 4))
+b()
+bs(150,355,0)
+bs(150,305,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('Toolbars',(270.408,560))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('Dock windows',(252.908,521.423))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('Central widget',(252.763,421.416))
+le()
+lw(1)
+r(475,0,0,-315,60,585)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/mainwindow-vertical-dock.png b/doc/src/diagrams/mainwindow-vertical-dock.png
new file mode 100644
index 0000000..e5289ac
--- /dev/null
+++ b/doc/src/diagrams/mainwindow-vertical-dock.png
Binary files differ
diff --git a/doc/src/diagrams/mainwindow-vertical-tabs.png b/doc/src/diagrams/mainwindow-vertical-tabs.png
new file mode 100644
index 0000000..4479a13
--- /dev/null
+++ b/doc/src/diagrams/mainwindow-vertical-tabs.png
Binary files differ
diff --git a/doc/src/diagrams/modelview-begin-append-columns.sk b/doc/src/diagrams/modelview-begin-append-columns.sk
new file mode 100644
index 0000000..32a4606
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-append-columns.sk
@@ -0,0 +1,176 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,190,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,190,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,280,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,280,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,310,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,310,580)
+le()
+lw(1)
+r(290,0,0,-165,60,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('7',(289.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('7',(289.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('8',(319.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('8',(319.44,558.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,640,0)
+bs(250,660,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-begin-append-rows.sk b/doc/src/diagrams/modelview-begin-append-rows.sk
new file mode 100644
index 0000000..7e9dfac
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-append-rows.sk
@@ -0,0 +1,122 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,695)
+le()
+lw(1)
+r(165,0,0,-200,210,705)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,335,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,545)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,335,545)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(344.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(344.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(344.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(344.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(286.94,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(344.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(286.94,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(344.44,523.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(275,575,0)
+bs(255,575,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-begin-insert-columns.sk b/doc/src/diagrams/modelview-begin-insert-columns.sk
new file mode 100644
index 0000000..cc19460
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-insert-columns.sk
@@ -0,0 +1,193 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,310,580)
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,310,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,190,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,280,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,250,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,280,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,190,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,190,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,580)
+le()
+lw(1)
+r(290,0,0,-165,60,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,673.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(289.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('7',(289.44,673.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(190,640,0)
+bs(190,660,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-begin-insert-rows.sk b/doc/src/diagrams/modelview-begin-insert-rows.sk
new file mode 100644
index 0000000..3c8ad7d
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-insert-rows.sk
@@ -0,0 +1,157 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,335,515)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,335,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,695)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,335,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,635)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,335,635)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(344.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(344.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(286.94,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(344.44,613.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(344.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(286.94,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(344.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(286.94,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(344.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(275,635,0)
+bs(255,635,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-begin-remove-columns.sk b/doc/src/diagrams/modelview-begin-remove-columns.sk
new file mode 100644
index 0000000..ac5529a
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-remove-columns.sk
@@ -0,0 +1,193 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,310,580)
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,310,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,100,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,160,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,280,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,130,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,70,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,190,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,250,580)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,280,580)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,190,695)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,695)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,250,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,190,637.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,637.5)
+le()
+lw(1)
+r(290,0,0,-165,60,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(79.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(109.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(139.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(169.44,558.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(199.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('6',(259.44,615.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('7',(289.44,673.14))
+lw(1.5)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(190,642.5,0)
+bs(190,662.5,0)
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('7',(199.44,558.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('8',(229.44,558.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('9',(259.44,558.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('10',(283.88,558.14))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-begin-remove-rows.sk b/doc/src/diagrams/modelview-begin-remove-rows.sk
new file mode 100644
index 0000000..cf77802
--- /dev/null
+++ b/doc/src/diagrams/modelview-begin-remove-rows.sk
@@ -0,0 +1,130 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,335,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,335,695)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,635)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,635)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(344.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(344.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(286.94,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(286.94,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0.502,0.502,0.502))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(344.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+fp((0.502,0.502,0.502))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(344.44,583.14))
+lw(1.5)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(272.5,635,0)
+bs(252.5,635,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-listmodel.sk b/doc/src/diagrams/modelview-listmodel.sk
new file mode 100644
index 0000000..89c19cc
--- /dev/null
+++ b/doc/src/diagrams/modelview-listmodel.sk
@@ -0,0 +1,87 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+ld((3, 3))
+r(120,0,0,-195,30,745)
+G()
+G()
+lw(1)
+ld((3, 3))
+b()
+bs(50,580,0)
+bs(50,555,0)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,35,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(75,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(105,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(78.33,653.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(78.646,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(78.096,573.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(105.316,616.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(105.316,576.384))
+lw(1)
+b()
+bs(50,685,0)
+bs(50,580,0)
+lw(1)
+r(30,0,0,-30,70.316,635)
+lw(1)
+r(30,0,0,-30,70.316,595)
+lw(1)
+b()
+bs(50.316,620,0)
+bs(70.316,620,0)
+lw(1)
+b()
+bs(50.316,580,0)
+bs(70.316,580,0)
+lw(1)
+r(30,0,0,-30,70,675)
+lw(1)
+b()
+bs(50,660,0)
+bs(70,660,0)
+G_()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('List Model',(60.33,731.384))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-models.png b/doc/src/diagrams/modelview-models.png
new file mode 100644
index 0000000..9e6b30c
--- /dev/null
+++ b/doc/src/diagrams/modelview-models.png
Binary files differ
diff --git a/doc/src/diagrams/modelview-models.sk b/doc/src/diagrams/modelview-models.sk
new file mode 100644
index 0000000..19e69b0
--- /dev/null
+++ b/doc/src/diagrams/modelview-models.sk
@@ -0,0 +1,287 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+ld((3, 3))
+b()
+bs(425,490,0)
+bs(425,465,0)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,410,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(450,696.384))
+lw(1)
+b()
+bs(425,685,0)
+bs(425,490,0)
+lw(1)
+r(30,0,0,-30,480,635)
+lw(1)
+b()
+bs(460,620,0)
+bs(480,620,0)
+lw(1)
+r(30,0,0,-30,480,595)
+lw(1)
+r(30,0,0,-30,445,505)
+lw(1)
+r(30,0,0,-30,445,545)
+lw(1)
+b()
+bs(460,580,0)
+bs(480,580,0)
+lw(1)
+b()
+bs(425,490,0)
+bs(445,490,0)
+lw(1)
+b()
+bs(425,530,0)
+bs(445,530,0)
+lw(1)
+b()
+bs(460,645,0)
+bs(460,580,0)
+lw(1)
+r(30,0,0,-30,445,675)
+lw(1)
+b()
+bs(425,660,0)
+bs(445,660,0)
+lw(1)
+ld((3, 3))
+b()
+bs(460,580,0)
+bs(460,555,0)
+lw(1)
+ld((3, 3))
+b()
+bs(50,580,0)
+bs(50,555,0)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,35,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(75,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(105,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(105.316,616.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(105.316,576.384))
+lw(1)
+b()
+bs(50,685,0)
+bs(50,580,0)
+lw(1)
+r(30,0,0,-30,70.316,635)
+lw(1)
+r(30,0,0,-30,70.316,595)
+lw(1)
+b()
+bs(50.316,620,0)
+bs(70.316,620,0)
+lw(1)
+b()
+bs(50.316,580,0)
+bs(70.316,580,0)
+lw(1)
+r(30,0,0,-30,70,675)
+lw(1)
+b()
+bs(50,660,0)
+bs(70,660,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Table Model',(245.168,731.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('List Model',(60.33,731.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Tree Model',(450.668,731.384))
+le()
+lw(1)
+r(530,0,0,-285,30,745)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,180,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(219.668,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(339.668,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(339.668,596.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 3',(339.668,566.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(340,626.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 1',(0,-1,1,0,256.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 0',(0,-1,1,0,226.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 2',(0,-1,1,0,286.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 3',(0,-1,1,0,316.934,550))
+lw(1)
+b()
+bs(195,685,0)
+bs(195,660,0)
+lw(1)
+r(30,0,0,-30,215,645)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,305,645)
+lw(1)
+r(30,0,0,-30,275,645)
+lw(1)
+r(30,0,0,-30,245,645)
+lw(1)
+r(30,0,0,-30,215,615)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,245,585)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,305,585)
+lw(1)
+r(30,0,0,-30,245,615)
+lw(1)
+r(30,0,0,-30,215,675)
+lw(1)
+r(30,0,0,-30,275,675)
+lw(1)
+r(30,0,0,-30,275,615)
+lw(1)
+r(30,0,0,-30,245,675)
+lw(1)
+b()
+bs(194.668,660,0)
+bs(214.668,660,0)
+lw(1)
+ld((3, 3))
+b()
+bs(215,585,0)
+bs(215,555,0)
+bs(245,555,0)
+lw(1)
+ld((3, 3))
+b()
+bs(305,675,0)
+bs(335,675,0)
+bs(335,645,0)
+lw(1)
+ld((3, 3))
+b()
+bs(275,555,0)
+bs(305,555,0)
+lw(1)
+ld((3, 3))
+b()
+bs(335,615,0)
+bs(335,585,0)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(540,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(575,616.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(575,576.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(540,526.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(540,486.384))
+G_()
+lw(1)
+r(30,0,0,-30,475,675)
+lw(1)
+r(30,0,0,-30,510,635)
+lw(1)
+r(30,0,0,-30,510,595)
+lw(1)
+r(30,0,0,-30,475,545)
+lw(1)
+r(30,0,0,-30,475,505)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,505,675)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,540,635)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,540,595)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,505,545)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,505,505)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-overview.sk b/doc/src/diagrams/modelview-overview.sk
new file mode 100644
index 0000000..1ba0473
--- /dev/null
+++ b/doc/src/diagrams/modelview-overview.sk
@@ -0,0 +1,82 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(205,0,0,-220,50,755)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Data',(93.286,726.384))
+fp((0.627,0.745,1))
+lw(1)
+r(75,0,0,-45,68.63,685)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(106.13,640,0)
+bs(106.13,587.5,0)
+fp((0.627,1,0.498))
+lw(1)
+e(10,0,0,-10,186.13,587.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Model',(89.792,658.884))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Delegate',(200.606,583.884))
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(106.13,707.5,0)
+bs(106.13,687.5,0)
+lw(1)
+ld((4, 4))
+r(45,0,0,-40,83.63,750)
+G()
+fp((1,0.627,0.498))
+lw(1)
+r(75,0,0,-45,68.63,585)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('View',(93.128,558.884))
+G_()
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(-50,0,0,-50,143.63,612.5,1.62075,2.35619,0)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(-50,0,0,-50,143.63,612.5,2.87243,4.66243,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+Fs(10)
+txt('Editing',(191.13,637.5))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+Fs(10)
+txt('Rendering',(165,555.32))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+Fs(10)
+txt('Rendering',(55,609.57))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-tablemodel.sk b/doc/src/diagrams/modelview-tablemodel.sk
new file mode 100644
index 0000000..4e8a492
--- /dev/null
+++ b/doc/src/diagrams/modelview-tablemodel.sk
@@ -0,0 +1,142 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+ld((3, 3))
+r(210,0,0,-260,175,745)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Table Model',(245.168,731.384))
+G()
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,180,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(219.668,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(339.668,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(339.668,596.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 3',(339.668,566.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(222.998,653.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(253.33,623.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(252.78,593.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(340,626.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 1',(0,-1,1,0,256.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 0',(0,-1,1,0,226.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 2',(0,-1,1,0,286.934,550))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('column = 3',(0,-1,1,0,316.934,550))
+lw(1)
+b()
+bs(195,685,0)
+bs(195,660,0)
+lw(1)
+r(30,0,0,-30,215,645)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,305,645)
+lw(1)
+r(30,0,0,-30,275,645)
+lw(1)
+r(30,0,0,-30,245,645)
+lw(1)
+r(30,0,0,-30,215,615)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,245,585)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,305,585)
+lw(1)
+r(30,0,0,-30,245,615)
+lw(1)
+r(30,0,0,-30,215,675)
+lw(1)
+r(30,0,0,-30,275,675)
+lw(1)
+r(30,0,0,-30,275,615)
+lw(1)
+r(30,0,0,-30,245,675)
+lw(1)
+b()
+bs(194.668,660,0)
+bs(214.668,660,0)
+lw(1)
+ld((3, 3))
+b()
+bs(215,585,0)
+bs(215,555,0)
+bs(245,555,0)
+lw(1)
+ld((3, 3))
+b()
+bs(305,675,0)
+bs(335,675,0)
+bs(335,645,0)
+lw(1)
+ld((3, 3))
+b()
+bs(275,555,0)
+bs(305,555,0)
+lw(1)
+ld((3, 3))
+b()
+bs(335,615,0)
+bs(335,585,0)
+G_()
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-treemodel.sk b/doc/src/diagrams/modelview-treemodel.sk
new file mode 100644
index 0000000..717d9da
--- /dev/null
+++ b/doc/src/diagrams/modelview-treemodel.sk
@@ -0,0 +1,139 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+ld((3, 3))
+r(215,0,0,-285,135,745)
+lw(1)
+ld((3, 3))
+b()
+bs(155,490,0)
+bs(155,465,0)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,140,715)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Oblique')
+txt('Root item',(180,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(270.316,656.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(305,616.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(183.33,653.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(218.33,573.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(212.78,483.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(305,576.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(270,526.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(270,486.384))
+lw(1)
+b()
+bs(155,685,0)
+bs(155,490,0)
+lw(1)
+r(30,0,0,-30,210,635)
+lw(1)
+r(30,0,0,-30,240,635)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,270,635)
+lw(1)
+r(30,0,0,-30,240,595)
+lw(1)
+b()
+bs(190,620,0)
+bs(210,620,0)
+lw(1)
+r(30,0,0,-30,210,595)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,270,595)
+lw(1)
+r(30,0,0,-30,175,505)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,235,505)
+lw(1)
+r(30,0,0,-30,175,545)
+lw(1)
+r(30,0,0,-30,205,545)
+lw(1)
+r(30,0,0,-30,205,505)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,235,545)
+lw(1)
+b()
+bs(190,580,0)
+bs(210,580,0)
+lw(1)
+b()
+bs(155,490,0)
+bs(175,490,0)
+lw(1)
+b()
+bs(155,530,0)
+bs(175,530,0)
+lw(1)
+b()
+bs(190,645,0)
+bs(190,580,0)
+lw(1)
+r(30,0,0,-30,175,675)
+lw(1)
+ld((3, 3))
+r(30,0,0,-30,235.316,675)
+lw(1)
+r(30,0,0,-30,205,675)
+lw(1)
+b()
+bs(155,660,0)
+bs(175,660,0)
+lw(1)
+ld((3, 3))
+b()
+bs(190,580,0)
+bs(190,555,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Tree Model',(180.668,731.384))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/paintsystem-core.sk b/doc/src/diagrams/paintsystem-core.sk
new file mode 100644
index 0000000..2501124
--- /dev/null
+++ b/doc/src/diagrams/paintsystem-core.sk
@@ -0,0 +1,76 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,146.138,825.695)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,277.138,825.695)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+ld((2, 2))
+r(104,0,0,-38,13.1378,825.695)
+fp((0,0,0))
+lw(1)
+ld((2, 2))
+Fn('Helvetica')
+txt('QPaintEngine',(162.138,803.629))
+fp((0,0,0))
+lw(1)
+ld((2, 2))
+Fn('Helvetica')
+txt('QPaintDevice',(292.638,803.629))
+fp((0,0,0))
+lw(1)
+ld((2, 2))
+Fn('Helvetica')
+txt('QPainter',(40.6378,803.629))
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.5,0.5,0)
+fp()
+lw(1)
+b()
+bs(117.138,806.695,0)
+bs(145.638,806.695,0)
+lw(1)
+b()
+bs(249.888,806.695,0)
+bs(275.888,806.695,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+ld((2, 2))
+b()
+bs(137.028,811.945,0)
+bs(146.388,806.761,0)
+bs(137.028,801.445,0)
+bs(136.888,811.878,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+b()
+bs(267.777,811.945,0)
+bs(277.138,806.761,0)
+bs(267.777,801.445,0)
+bs(267.638,811.878,0)
+le()
+lw(1)
+ld((2, 2))
+r(387.5,0,0,-64.5,4.1378,838.945)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/paintsystem-devices.sk b/doc/src/diagrams/paintsystem-devices.sk
new file mode 100644
index 0000000..f66d5fa
--- /dev/null
+++ b/doc/src/diagrams/paintsystem-devices.sk
@@ -0,0 +1,220 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0.503,0.503,0.503))
+lw(1)
+r(109,0,0,-43,277,828)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,279.5,825.5)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QPaintDevice',(294.822,803.434))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('inherits',(312,755.309))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('inherits',(35.05,656.129))
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(54.4205,666.57,0)
+bs(54.3555,685.07,0)
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(332,747,0)
+bs(331.935,753,0)
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(54.4205,647.07,0)
+bs(54.3555,653.07,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.499002,0.499373,0)
+fp()
+b()
+bs(59.638,676.472,0)
+bs(54.433,685.82,0)
+bs(49.138,676.448,0)
+bs(59.571,676.332,0)
+lw(1)
+b()
+bs(55,730,0)
+bs(55,747,0)
+bs(126,747,0)
+lw(1)
+b()
+bs(125,730,0)
+bs(125,747,0)
+bs(197,747,0)
+lw(1)
+b()
+bs(197,730,0)
+bs(197,747,0)
+bs(250,747,0)
+lw(1)
+b()
+bs(285,730,0)
+bs(285,747,0)
+bs(232,747,0)
+lw(1)
+b()
+bs(518,730,0)
+bs(518,747,0)
+bs(409,747,0)
+lw(1)
+b()
+bs(591.862,730,0)
+bs(591.862,747,0)
+bs(517.362,747,0)
+lp((0.517,0.517,0.517))
+lw(1)
+r(63.5,0,0,-43,94.6378,729.695)
+lp((0.517,0.517,0.517))
+lw(1)
+r(68,0,0,-43,162.638,729.695)
+lp((0.517,0.517,0.517))
+lw(1)
+r(96.5,0,0,-43,235.638,729.695)
+lp((0.517,0.517,0.517))
+lw(1)
+r(141.5,0,0,-43,338.5,730)
+lp((0.517,0.517,0.517))
+lw(1)
+r(70.5,0,0,-43,19.138,645.695)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(58,0,0,-38,97.3878,727.195)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(63,0,0,-38,165.138,727.195)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(91.5,0,0,-38,238.138,727.195)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(136,0,0,-38,341.25,727.5)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(65,0,0,-38,21.638,643.195)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QImage',(105.046,705.129))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QPixmap',(171.966,705.129))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QGLPixelBuffer',(242.206,705.129))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QGLFramebufferObject',(345.068,705.434))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QGLWidget',(23.044,621.129))
+lp((0.517,0.517,0.517))
+lw(1)
+r(69.5,0,0,-43,19.638,729.695)
+lp((0.517,0.517,0.517))
+lw(1)
+r(67.5,0,0,-43,486,730)
+lp((0.517,0.517,0.517))
+lw(1)
+r(70.5,0,0,-43,558.5,729.695)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(64,0,0,-38,22.388,727.195)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(62,0,0,-38,488.75,727.5)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(65.5,0,0,-38,561,727.195)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QWidget',(31.048,705.129))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QPicture',(496.41,705.434))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QPrinter',(571.412,705.129))
+le()
+lw(1)
+r(479,0,0,243.5,7.1378,592.445)
+G()
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(331.782,765.75,0)
+bs(331.717,784.25,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.499002,0.499373,0)
+fp()
+b()
+bs(337,775.652,0)
+bs(331.795,785,0)
+bs(326.5,775.628,0)
+bs(336.933,775.512,0)
+G_()
+lw(1)
+b()
+bs(285,730,0)
+bs(285,747,0)
+bs(338,747,0)
+lw(1)
+b()
+bs(408,730,0)
+bs(408,747,0)
+bs(338,747,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,1,1),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/paintsystem-gradients.sk b/doc/src/diagrams/paintsystem-gradients.sk
new file mode 100644
index 0000000..6513c12
--- /dev/null
+++ b/doc/src/diagrams/paintsystem-gradients.sk
@@ -0,0 +1,94 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0.503,0.503,0.503))
+lw(1)
+r(109,0,0,-43,163.638,805.695)
+gl([(0,(0.779,0.726,0.314)),(1,(1,0.954,0.705))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,166.138,803.195)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QGradient',(190.46,781.129))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('inherits',(199.3,733.629))
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(218.17,744.07,0)
+bs(218.105,762.57,0)
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.500001,0.5,0)
+fp()
+lw(1)
+b()
+bs(218.67,709.57,0)
+bs(218.605,730.57,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.499002,0.499373,0)
+fp()
+b()
+bs(223.388,753.972,0)
+bs(218.183,763.32,0)
+bs(212.888,753.948,0)
+bs(223.321,753.832,0)
+lp((0.517,0.517,0.517))
+lw(1)
+r(109,0,0,-43,47.6378,709.195)
+lp((0.517,0.517,0.517))
+lw(1)
+r(109,0,0,-43,164.638,709.195)
+lp((0.517,0.517,0.517))
+lw(1)
+r(109,0,0,-43,280.638,709.195)
+gl([(0,(0.779,0.726,0.314)),(1,(1,0.954,0.705))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,50.1378,706.695)
+gl([(0,(0.779,0.726,0.314)),(1,(1,0.954,0.705))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,167.138,706.695)
+gl([(0,(0.779,0.726,0.314)),(1,(1,0.954,0.705))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,283.138,706.695)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QLinearGradient',(57.7858,684.629))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QRadialGradient',(174.456,684.629))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QConicalGradient',(287.456,684.629))
+lw(1)
+b()
+bs(104.138,709.445,0)
+bs(104.138,726.445,0)
+bs(222.638,726.445,0)
+lw(1)
+b()
+bs(335.638,709.445,0)
+bs(335.638,726.445,0)
+bs(217.138,726.445,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/paintsystem-stylepainter.sk b/doc/src/diagrams/paintsystem-stylepainter.sk
new file mode 100644
index 0000000..8e27015
--- /dev/null
+++ b/doc/src/diagrams/paintsystem-stylepainter.sk
@@ -0,0 +1,58 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0.503,0.503,0.503))
+lw(1)
+r(109,0,0,-43,210.138,827.945)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,212.638,825.445)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QPainter',(240.962,803.379))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('inherits',(145.3,803.379))
+lp((0.517,0.517,0.517))
+lw(1)
+r(109,0,0,-43,17.1378,827.945)
+gl([(0,(0.598,0.866,0.321)),(1,(0.799,0.899,0.724))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+r(104,0,0,-38,19.6378,825.445)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QStylePainter',(34.6238,803.379))
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.5,0.499997,0)
+fp()
+lw(1)
+b()
+bs(189.262,806.242,0)
+bs(207.758,806.648,0)
+gl([(0,(0.374,0.544,0.203)),(1,(0.889,1,0.805))])
+pgr(0.5,0.500003,0)
+fp()
+lw(1)
+b()
+bs(126.268,806.219,0)
+bs(141.763,806.671,0)
+gl([(0,(0.323,0.47,0.175)),(1,(0.763,0.859,0.694))])
+pgr(0.498297,0.509099,0)
+fp()
+b()
+bs(199.259,801.196,0)
+bs(208.509,806.573,0)
+bs(199.041,811.694,0)
+bs(199.118,801.26,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/palette-diagram/dialog-crop-fade.png b/doc/src/diagrams/palette-diagram/dialog-crop-fade.png
new file mode 100644
index 0000000..faf7e11
--- /dev/null
+++ b/doc/src/diagrams/palette-diagram/dialog-crop-fade.png
Binary files differ
diff --git a/doc/src/diagrams/palette-diagram/dialog-crop.png b/doc/src/diagrams/palette-diagram/dialog-crop.png
new file mode 100644
index 0000000..df54743
--- /dev/null
+++ b/doc/src/diagrams/palette-diagram/dialog-crop.png
Binary files differ
diff --git a/doc/src/diagrams/palette-diagram/dialog.png b/doc/src/diagrams/palette-diagram/dialog.png
new file mode 100644
index 0000000..5fe142d
--- /dev/null
+++ b/doc/src/diagrams/palette-diagram/dialog.png
Binary files differ
diff --git a/doc/src/diagrams/palette-diagram/palette.sk b/doc/src/diagrams/palette-diagram/palette.sk
new file mode 100644
index 0000000..53ab0b5
--- /dev/null
+++ b/doc/src/diagrams/palette-diagram/palette.sk
@@ -0,0 +1,95 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(-1228628980,'dialog-crop-fade.png')
+im((115,661),-1228628980)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Window',(130,642.484))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('WindowText',(195,642.484))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('HighlightedText',(20,705))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Highlight',(50,686.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('ButtonText',(620,736.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Button',(620,721.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3D effects with Light,',(620,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Midlight, Dark, and',(620,681.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Shadow',(620,666.384))
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(190,680,0)
+bs(195,655,0)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(175,670,0)
+bs(170,655,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(110,710,0)
+bs(220,725,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(100,695,0)
+bs(222.693,717.307,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(615,740,0)
+bs(560,725,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(615,725,0)
+bs(580,720,0)
+lw(1)
+b()
+bs(615,705,0)
+bs(615,665,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(615,690,0)
+bs(585,690,0)
+le()
+lw(1)
+r(720,0,0,-180,15,835)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/parent-child-widgets.png b/doc/src/diagrams/parent-child-widgets.png
new file mode 100644
index 0000000..6d9eb36
--- /dev/null
+++ b/doc/src/diagrams/parent-child-widgets.png
Binary files differ
diff --git a/doc/src/diagrams/parent-child-widgets.sk b/doc/src/diagrams/parent-child-widgets.sk
new file mode 100644
index 0000000..b6046fc
--- /dev/null
+++ b/doc/src/diagrams/parent-child-widgets.sk
@@ -0,0 +1,130 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(-1227761876,'parent-child-widgets.png')
+im((140,526),-1227761876)
+G()
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QLabel',(46.312,698.884))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('child widgets',(46.312,683.884))
+G_()
+lp((0.879,0,0))
+lw(1)
+b()
+bs(155,732.5,0)
+bs(135,732.5,0)
+bs(135,762.5,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(155,702.5,0)
+bs(90,702.5,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(165,605,0)
+bs(105,605,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(155,785,0)
+bs(115,785,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(420,700,0)
+bs(385,700,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(420,735,0)
+bs(370,735,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(420,770,0)
+bs(370,770,0)
+lp((0.879,0,0))
+lw(1)
+b()
+bs(135,702.5,0)
+bs(135,762.5,0)
+bs(155,762.5,0)
+lp((0.879,0,0))
+lw(1)
+r(60,0,0,-15,155,770)
+lp((0.879,0,0))
+lw(1)
+r(60,0,0,-15,155,740)
+lp((0.879,0,0))
+lw(1)
+r(60,0,0,-15,155,710)
+G()
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QTextEdit',(46.312,601.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('child widget',(46.312,586.384))
+G_()
+G()
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QGroupBox',(46.312,781.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('parent widget',(46.312,766.384))
+G_()
+G()
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QLineEdit',(425,694.984))
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QTimeEdit',(425,729.984))
+fp((0,0.012,0.878))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QDateEdit',(425,764.984))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('child widget',(425,679.984))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('child widget',(425,714.984))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('child widget',(425,749.984))
+G_()
+le()
+lw(1)
+r(455,0,0,-300,40,817.5)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/pathstroke-demo.png b/doc/src/diagrams/pathstroke-demo.png
new file mode 100644
index 0000000..260488d
--- /dev/null
+++ b/doc/src/diagrams/pathstroke-demo.png
Binary files differ
diff --git a/doc/src/diagrams/patternist-importFlow.odg b/doc/src/diagrams/patternist-importFlow.odg
new file mode 100644
index 0000000..ee71214
--- /dev/null
+++ b/doc/src/diagrams/patternist-importFlow.odg
Binary files differ
diff --git a/doc/src/diagrams/patternist-wordProcessor.odg b/doc/src/diagrams/patternist-wordProcessor.odg
new file mode 100644
index 0000000..b8c603b
--- /dev/null
+++ b/doc/src/diagrams/patternist-wordProcessor.odg
Binary files differ
diff --git a/doc/src/diagrams/pbuffers-example.png b/doc/src/diagrams/pbuffers-example.png
new file mode 100644
index 0000000..cb3b041
--- /dev/null
+++ b/doc/src/diagrams/pbuffers-example.png
Binary files differ
diff --git a/doc/src/diagrams/pbuffers2-example.png b/doc/src/diagrams/pbuffers2-example.png
new file mode 100644
index 0000000..b2b408a
--- /dev/null
+++ b/doc/src/diagrams/pbuffers2-example.png
Binary files differ
diff --git a/doc/src/diagrams/plaintext-layout.png b/doc/src/diagrams/plaintext-layout.png
new file mode 100644
index 0000000..1e9e851
--- /dev/null
+++ b/doc/src/diagrams/plaintext-layout.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-dialogbuttonbox.png b/doc/src/diagrams/plastique-dialogbuttonbox.png
new file mode 100644
index 0000000..1e37cd3
--- /dev/null
+++ b/doc/src/diagrams/plastique-dialogbuttonbox.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-filedialog.png b/doc/src/diagrams/plastique-filedialog.png
new file mode 100644
index 0000000..f043ca7
--- /dev/null
+++ b/doc/src/diagrams/plastique-filedialog.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-fontcombobox-open.png b/doc/src/diagrams/plastique-fontcombobox-open.png
new file mode 100644
index 0000000..97fa569
--- /dev/null
+++ b/doc/src/diagrams/plastique-fontcombobox-open.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-fontcombobox-open.zip b/doc/src/diagrams/plastique-fontcombobox-open.zip
new file mode 100644
index 0000000..ed401cc
--- /dev/null
+++ b/doc/src/diagrams/plastique-fontcombobox-open.zip
Binary files differ
diff --git a/doc/src/diagrams/plastique-menu.png b/doc/src/diagrams/plastique-menu.png
new file mode 100644
index 0000000..5358cee
--- /dev/null
+++ b/doc/src/diagrams/plastique-menu.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-printdialog-properties.png b/doc/src/diagrams/plastique-printdialog-properties.png
new file mode 100644
index 0000000..cbeac40
--- /dev/null
+++ b/doc/src/diagrams/plastique-printdialog-properties.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-printdialog.png b/doc/src/diagrams/plastique-printdialog.png
new file mode 100644
index 0000000..f153820
--- /dev/null
+++ b/doc/src/diagrams/plastique-printdialog.png
Binary files differ
diff --git a/doc/src/diagrams/plastique-sizegrip.png b/doc/src/diagrams/plastique-sizegrip.png
new file mode 100644
index 0000000..ebc4357
--- /dev/null
+++ b/doc/src/diagrams/plastique-sizegrip.png
Binary files differ
diff --git a/doc/src/diagrams/printer-rects.sk b/doc/src/diagrams/printer-rects.sk
new file mode 100644
index 0000000..e520285
--- /dev/null
+++ b/doc/src/diagrams/printer-rects.sk
@@ -0,0 +1,114 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.879,0.879,0.879))
+lp((1,0,0))
+lw(1)
+ld((4, 4))
+r(150,0,0,-190,65,815)
+fp((0.879,0.879,0.879))
+lw(1)
+r(150,0,0,-190,250,815)
+fp((1,1,1))
+lw(1)
+r(110,0,0,-140,85,790)
+fp((1,1,1))
+le()
+lw(1)
+r(110,0,0,-140,270,790)
+fp((1,1,1))
+lp((1,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(380,695,0)
+bs(380,650,0)
+bs(345,650,0)
+bn()
+bs(305,650,0)
+bs(270,650,0)
+bs(270,790,0)
+bs(380,790,0)
+bs(380,745,0)
+le()
+lw(1)
+ld((4, 4))
+r(375,0,0,-235,45,835)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('paperRect()',(146.652,632.484))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Page coordinate system',(75.638,607.484))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Painter coordinate system',(255.64,607.484))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('pageRect()',(110.324,716.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('pageRect()',(295.324,716.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(0,-1,1,0,376.384,740))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(307,646.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(0, 0)',(66.992,801.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(0, 0)',(271.992,776.384))
+lw(1)
+b()
+bs(75,815,0)
+bs(65,815,0)
+bs(65,805,0)
+lw(1)
+b()
+bs(280,790,0)
+bs(270,790,0)
+bs(270,780,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(305,650,0)
+bs(275,650,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(380,695,0)
+bs(380,655,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(380,745,0)
+bs(380,785,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(345,650,0)
+bs(375,650,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/programs/mdiarea.py b/doc/src/diagrams/programs/mdiarea.py
new file mode 100644
index 0000000..c78659f
--- /dev/null
+++ b/doc/src/diagrams/programs/mdiarea.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+
+import sys
+from PyQt4.QtCore import SIGNAL
+from PyQt4.QtGui import QApplication, QColor, QIcon, QLabel, QMdiArea, QPixmap, \
+ QPushButton, QTableWidget, QTableWidgetItem, QTextEdit
+
+
+class Changer:
+
+ def __init__(self, mdiArea):
+
+ self.mdiArea = mdiArea
+ self.state = 0
+
+ def change(self):
+
+ if self.state == 0:
+ self.mdiArea.cascadeSubWindows()
+ self.mdiArea.setWindowTitle("Cascade")
+ elif self.state == 1:
+ self.mdiArea.tileSubWindows()
+ self.mdiArea.setWindowTitle("Tile")
+ self.state = (self.state + 1) % 2
+
+
+if __name__ == "__main__":
+
+ app = QApplication(sys.argv)
+ pixmap = QPixmap(16, 16)
+ pixmap.fill(QColor(0, 0, 0, 0))
+ icon = QIcon(pixmap)
+ app.setWindowIcon(icon)
+
+ mdiArea = QMdiArea()
+
+ textEdit = QTextEdit()
+ textEdit.setPlainText("Qt Quarterly is a paper-based newsletter "
+ "exclusively available to Qt customers. Every "
+ "quarter we mail out an issue that we hope will "
+ "bring added insight and pleasure to your Qt "
+ "programming, with high-quality technical articles "
+ "written by Qt experts.")
+ textWindow = mdiArea.addSubWindow(textEdit)
+ textWindow.setWindowTitle("A Text Editor")
+
+ label = QLabel()
+ label.setPixmap(QPixmap("../../images/qt-logo.png"))
+ labelWindow = mdiArea.addSubWindow(label)
+ labelWindow.setWindowTitle("A Label")
+
+ items = (("Henry", 23), ("Bill", 56), ("Susan", 19), ("Jane", 47))
+ table = QTableWidget(len(items), 2)
+
+ for i in range(len(items)):
+ name, age = items[i]
+ item = QTableWidgetItem(name)
+ table.setItem(i, 0, item)
+ item = QTableWidgetItem(str(age))
+ table.setItem(i, 1, item)
+
+ tableWindow = mdiArea.addSubWindow(table)
+ tableWindow.setWindowTitle("A Table Widget")
+
+ mdiArea.show()
+
+ changer = Changer(mdiArea)
+ button = QPushButton("Cascade")
+ button.connect(button, SIGNAL("clicked()"), changer.change)
+ button.show()
+ sys.exit(app.exec_())
diff --git a/doc/src/diagrams/programs/qpen-dashpattern.py b/doc/src/diagrams/programs/qpen-dashpattern.py
new file mode 100644
index 0000000..095d51f
--- /dev/null
+++ b/doc/src/diagrams/programs/qpen-dashpattern.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+
+import sys
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+from PyQt4.QtSvg import QSvgGenerator
+
+if __name__ == "__main__":
+
+ app = QApplication(sys.argv)
+
+ #device = QSvgGenerator()
+ #device.setFileName("qpen-dashpattern.svg")
+ #device.setSize(QSize(216, 144))
+ #device.setResolution(72)
+
+ device = QImage(192, 144, QImage.Format_ARGB32)
+ device.fill(qRgba(0, 0, 0, 0))
+
+ #resolution = device.resolution() # dpi
+ #dpp = resolution / 72.0
+
+ p = QPainter()
+ p.begin(device)
+
+ width = 8
+
+ pen = QPen()
+ pen.setWidth(width)
+ pen.setDashPattern([4, 2])
+ pen.setCapStyle(Qt.FlatCap)
+
+ faded_pen = QPen()
+ faded_pen.setWidth(width)
+ faded_pen.setDashPattern([4, 2])
+ faded_pen.setColor(QColor(160, 160, 160))
+ faded_pen.setCapStyle(Qt.FlatCap)
+
+ font = QFont("Monospace")
+ font.setPointSize(12)
+ p.setFont(font)
+ p.setBrush(QColor(160, 0, 0))
+
+ for x in range(-6, 9):
+
+ if x % 4 == 0:
+ length = 6
+ else:
+ length = 2
+
+ p.drawLine(64 + x * width, 4, 64 + x * width, 4 + length)
+ p.drawLine(64 + x * width, 136, 64 + x * width, 136 - length)
+
+ offsets = (0, 2, 3.5, 4, 5, 6)
+ for i in range(len(offsets)):
+
+ offset = offsets[i]
+ pen.setDashOffset(offset)
+
+ p.setPen(faded_pen)
+ p.drawLine(64 - offset * width, 20 + (i * 20), 64, 20 + (i * 20))
+
+ p.setPen(pen)
+ p.drawLine(64, 20 + (i * 20), 128, 20 + (i * 20))
+
+ p.drawText(150, 25 + (i * 20), str(offset))
+
+ p.end()
+ device.save("qpen-dashpattern.png")
+ sys.exit()
diff --git a/doc/src/diagrams/qactiongroup-align.png b/doc/src/diagrams/qactiongroup-align.png
new file mode 100644
index 0000000..f35b48b
--- /dev/null
+++ b/doc/src/diagrams/qactiongroup-align.png
Binary files differ
diff --git a/doc/src/diagrams/qcolor-cmyk.sk b/doc/src/diagrams/qcolor-cmyk.sk
new file mode 100644
index 0000000..593861e
--- /dev/null
+++ b/doc/src/diagrams/qcolor-cmyk.sk
@@ -0,0 +1,77 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+e(95,0,0,-95.125,174.638,717.57)
+lw(1)
+b()
+bs(257.335,764.341,0)
+bs(91.9083,670.173,0)
+lw(1)
+b()
+bs(256.594,669.129,0)
+bs(91.8985,764.386,0)
+lw(1)
+b()
+bs(174.388,811.945,0)
+bs(174.388,621.445,0)
+fp((0,1,0))
+lw(1)
+r(15.7306,27.291,27.291,-15.7306,71.4706,757.982)
+fp((1,0.976,0))
+lw(1)
+r(31.5,0,0,-31.5,158.638,827.695)
+fp((1,0,0))
+lw(1)
+r(15.5923,-27.3702,-27.3702,-15.5923,262.67,785.579)
+fp((0.993,0,1))
+lw(1)
+r(15.7306,27.291,-27.291,15.7306,262.074,648.117)
+fp((0,0,1))
+lw(1)
+r(31.5,0,0,31.5,158.638,607.695)
+fp((0,1,0.98))
+lw(1)
+r(15.5923,-27.3702,27.3702,15.5923,71.5131,676.681)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 0, 1, 0)',(195.97,820.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 1, 0, 0)',(271.47,685.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 1, 1, 0)',(273.47,740.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 1, 0, 0)',(197.47,609.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 0, 0, 0)',(9.9698,687.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 0, 1, 0)',(10.4698,737.445))
+le()
+lw(1)
+r(347.295,0,0,-250.844,0.969879,841.052)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qcolor-hsv.sk b/doc/src/diagrams/qcolor-hsv.sk
new file mode 100644
index 0000000..bc455e5
--- /dev/null
+++ b/doc/src/diagrams/qcolor-hsv.sk
@@ -0,0 +1,77 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+e(95,0,0,-95.125,188.71,717.57)
+lw(1)
+b()
+bs(271.407,764.341,0)
+bs(105.98,670.173,0)
+lw(1)
+b()
+bs(270.666,669.129,0)
+bs(105.97,764.386,0)
+lw(1)
+b()
+bs(188.46,811.945,0)
+bs(188.46,621.445,0)
+fp((0,1,0))
+lw(1)
+r(15.7306,27.291,27.291,-15.7306,85.5423,757.982)
+fp((1,0.976,0))
+lw(1)
+r(31.5,0,0,-31.5,172.71,827.695)
+fp((1,0,0))
+lw(1)
+r(15.5923,-27.3702,-27.3702,-15.5923,276.742,785.579)
+fp((0.993,0,1))
+lw(1)
+r(15.7306,27.291,-27.291,15.7306,276.146,648.117)
+fp((0,0,1))
+lw(1)
+r(31.5,0,0,31.5,172.71,607.695)
+fp((0,1,0.98))
+lw(1)
+r(15.5923,-27.3702,27.3702,15.5923,85.5848,676.681)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(60/360, 1, 1)',(210.042,820.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(300/360, 1, 1)',(285.542,685.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 1, 1)',(287.542,740.825))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(240/360, 1, 1)',(211.542,609.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(180/360, 1, 1)',(3.76462,685.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(120/360, 1, 1)',(3.17503,740.825))
+le()
+lw(1)
+r(347.295,0,0,-250.844,14.9326,840.981)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qcolor-hue.sk b/doc/src/diagrams/qcolor-hue.sk
new file mode 100644
index 0000000..9bb503d
--- /dev/null
+++ b/doc/src/diagrams/qcolor-hue.sk
@@ -0,0 +1,71 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+e(82.602,-46.9244,-46.9862,-82.7107,209.03,683.511)
+lw(1)
+b()
+bs(304.537,682.094,0)
+bs(114.185,681.927,0)
+lw(1)
+b()
+bs(256.363,600.91,0)
+bs(160.213,765.086,0)
+lw(1)
+b()
+bs(255.428,765.693,0)
+bs(161.333,600.054,0)
+fp((0,1,0))
+lw(1)
+r(27.1578,15.9594,15.9594,-27.1578,139.288,769.608)
+fp((1,0.976,0))
+lw(1)
+r(27.3891,-15.5592,-15.5592,-27.3891,249.513,787.167)
+fp((1,0,0))
+lw(1)
+r(0.0381551,-31.4999,-31.4999,-0.0381551,319.166,699.162)
+fp((0.993,0,1))
+lw(1)
+r(27.1578,15.9594,-15.9594,27.1578,250.75,579.934)
+fp((0,0,1))
+lw(1)
+r(27.3891,-15.5592,15.5592,27.3891,140.846,595.878)
+fp((0,1,0.98))
+lw(1)
+r(0.0381551,-31.4999,31.4999,0.0381551,99.1666,698.896)
+le()
+lw(1)
+r(347.295,0,0,-250.844,34.848,809.427)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('180',(75.6378,678.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('240',(125.638,582.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('300',(274.638,582.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('120',(132.138,780.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(326.138,678.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('60',(267.638,780.945))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qcolor-rgb.sk b/doc/src/diagrams/qcolor-rgb.sk
new file mode 100644
index 0000000..58f5cad
--- /dev/null
+++ b/doc/src/diagrams/qcolor-rgb.sk
@@ -0,0 +1,77 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+e(95,0,0,-95.125,174.638,717.57)
+lw(1)
+b()
+bs(257.335,764.341,0)
+bs(91.9083,670.173,0)
+lw(1)
+b()
+bs(256.594,669.129,0)
+bs(91.8985,764.386,0)
+lw(1)
+b()
+bs(174.388,811.945,0)
+bs(174.388,621.445,0)
+fp((0,1,0))
+lw(1)
+r(15.7306,27.291,27.291,-15.7306,71.4706,757.982)
+fp((1,0.976,0))
+lw(1)
+r(31.5,0,0,-31.5,158.638,827.695)
+fp((1,0,0))
+lw(1)
+r(15.5923,-27.3702,-27.3702,-15.5923,262.67,785.579)
+fp((0.993,0,1))
+lw(1)
+r(15.7306,27.291,-27.291,15.7306,262.074,648.117)
+fp((0,0,1))
+lw(1)
+r(31.5,0,0,31.5,158.638,607.695)
+fp((0,1,0.98))
+lw(1)
+r(15.5923,-27.3702,27.3702,15.5923,71.5131,676.681)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 1, 0)',(195.97,820.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 0, 1)',(271.47,685.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(1, 0, 0)',(273.47,741.824))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 0, 1)',(197.47,609.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 1, 1)',(26.5236,685.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('(0, 1, 0)',(23.5056,741.824))
+le()
+lw(1)
+r(347.295,0,0,-250.844,0.969879,840.811)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qcolor-saturation.sk b/doc/src/diagrams/qcolor-saturation.sk
new file mode 100644
index 0000000..7842769
--- /dev/null
+++ b/doc/src/diagrams/qcolor-saturation.sk
@@ -0,0 +1,26 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(1,1,1)),(1,(0,0,1))])
+pgl(-1,-0.00066387,0)
+fp()
+le()
+lw(1)
+r(0.0128449,-19.3485,-146.873,-0.0975046,211.927,793.765)
+lw(1)
+e(0,0,0,0,92.8878,797.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(9)
+txt('0',(62.6378,762.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(9)
+txt('255',(196.638,762.445))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qcolor-value.sk b/doc/src/diagrams/qcolor-value.sk
new file mode 100644
index 0000000..203befd
--- /dev/null
+++ b/doc/src/diagrams/qcolor-value.sk
@@ -0,0 +1,26 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(1,1,1)),(1,(0,0,0))])
+pgl(1,-0.00066387,0)
+fp()
+le()
+lw(1)
+r(-0.0128449,-19.3485,146.873,-0.0975046,65.0669,793.765)
+lw(1)
+e(0,0,0,0,92.8878,797.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(9)
+txt('0',(62.6378,762.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(9)
+txt('255',(196.638,762.445))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qfiledialog-expanded.png b/doc/src/diagrams/qfiledialog-expanded.png
new file mode 100644
index 0000000..6473e21
--- /dev/null
+++ b/doc/src/diagrams/qfiledialog-expanded.png
Binary files differ
diff --git a/doc/src/diagrams/qfiledialog-small.png b/doc/src/diagrams/qfiledialog-small.png
new file mode 100644
index 0000000..92ed546
--- /dev/null
+++ b/doc/src/diagrams/qfiledialog-small.png
Binary files differ
diff --git a/doc/src/diagrams/qframe-shapes-table.ui b/doc/src/diagrams/qframe-shapes-table.ui
new file mode 100644
index 0000000..371327f
--- /dev/null
+++ b/doc/src/diagrams/qframe-shapes-table.ui
@@ -0,0 +1,12964 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>656</width>
+ <height>664</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <widget class="QFrame" name="frame_2" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_3" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_4" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_6" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_8" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_7" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_5" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_9" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_11" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_12" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_10" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_16" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_14" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_13" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_15" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_18" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_32" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_28" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_17" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_27" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_29" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_21" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_26" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_23" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_20" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_24" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_30" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_19" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_25" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_31" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_22" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>100</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_33" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_37" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_40" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_44" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_41" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_45" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_38" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_34" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_47" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_39" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_36" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_48" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_42" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_35" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_64" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_91" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_62" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_95" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_75" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_81" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_66" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_84" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_79" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_76" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_71" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_83" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_94" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_58" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_82" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_96" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_61" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_88" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_89" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_92" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_49" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_87" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_77" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_70" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_85" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_78" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_54" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_51" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_73" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_63" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_74" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_69" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_90" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_67" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_93" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_52" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_55" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_86" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_72" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_50" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_65" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_80" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_56" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_59" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_131" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_145" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_146" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_147" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_148" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_149" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_150" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_151" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_152" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_153" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_154" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_155" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_156" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_157" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_158" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_160" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_161" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_162" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_163" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_164" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_165" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_166" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_167" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_168" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_169" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_170" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_171" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_172" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_173" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_174" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_175" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_176" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_178" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_179" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_180" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_181" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_183" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_184" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_186" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_187" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_188" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_189" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_190" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>600</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_191" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_192" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_125" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_142" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_104" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_138" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_100" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_130" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_121" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_105" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_103" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_119" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_132" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_127" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_137" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_140" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_143" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_118" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_113" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_120" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_117" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_102" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_116" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_134" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_112" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_122" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_135" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_99" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_144" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_115" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_111" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>300</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_123" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_114" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_97" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_106" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_129" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_124" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_98" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_108" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_101" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_136" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_109" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_139" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_110" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_133" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_141" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_185" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_177" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_68" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>200</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_46" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_208" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_235" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_206" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_239" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_219" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_225" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_210" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_228" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_223" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_220" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_227" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_238" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_202" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_201" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_212" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_226" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_240" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_205" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_232" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_233" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_236" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_193" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_231" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_221" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_214" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_229" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_222" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_198" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_195" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_217" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>400</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_207" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_218" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_213" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_234" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_211" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_237" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_196" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_199" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_203" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_216" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_194" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_209" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_224" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_230" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_215" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_266" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_255" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_264" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_265" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_276" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_246" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_243" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_248" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_245" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_283" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_280" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_241" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_275" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_272" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_261" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_279" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_253" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_277" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_286" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_281" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_259" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_273" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>2</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_267" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_263" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_282" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_278" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_244" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_249" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_268" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_287" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_271" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_252" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_269" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_250" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>3</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_274" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_288" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_284" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_254" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_258" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_247" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_262" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_251" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_257" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_285" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>500</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_242" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_107" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_159" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>630</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_270" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>530</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_182" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>570</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_197" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_256" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_126" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>330</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_204" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>370</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_53" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>230</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_43" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>130</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_60" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_23" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>73</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Box, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_24" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>103</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Box, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_25" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>133</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Box, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_57" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>170</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_128" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>270</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::WinPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_31" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>273</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>WinPanel, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_30" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>303</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>WinPanel, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_29" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>333</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>WinPanel, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_32" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>372</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>HLine, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_33" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>402</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>HLine, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_34" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>432</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>HLine, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_37" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>472</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>VLine, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_36" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>502</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>VLine, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_35" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>532</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>VLine, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_260" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>470</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::VLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame_200" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>430</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="lineWidth" >
+ <number>4</number>
+ </property>
+ <property name="midLineWidth" >
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_28" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>173</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Panel, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_26" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>203</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Panel, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_27" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>233</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>Panel, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_40" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>573</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>StyledPanel, Plain</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_39" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>603</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>StyledPanel, Raised</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_38" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>633</y>
+ <width>146</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>StyledPanel, Sunken</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QFrame" name="frame" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>70</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_16" >
+ <property name="geometry" >
+ <rect>
+ <x>460</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_12" >
+ <property name="geometry" >
+ <rect>
+ <x>430</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_8" >
+ <property name="geometry" >
+ <rect>
+ <x>400</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_41" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_15" >
+ <property name="geometry" >
+ <rect>
+ <x>340</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_11" >
+ <property name="geometry" >
+ <rect>
+ <x>310</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_7" >
+ <property name="geometry" >
+ <rect>
+ <x>280</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_4" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_14" >
+ <property name="geometry" >
+ <rect>
+ <x>220</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_10" >
+ <property name="geometry" >
+ <rect>
+ <x>190</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_6" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_5" >
+ <property name="geometry" >
+ <rect>
+ <x>40</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_9" >
+ <property name="geometry" >
+ <rect>
+ <x>70</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_13" >
+ <property name="geometry" >
+ <rect>
+ <x>100</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_17" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>114</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_3" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>40</y>
+ <width>24</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_18" >
+ <property name="geometry" >
+ <rect>
+ <x>130</x>
+ <y>10</y>
+ <width>114</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_19" >
+ <property name="geometry" >
+ <rect>
+ <x>250</x>
+ <y>10</y>
+ <width>114</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_20" >
+ <property name="geometry" >
+ <rect>
+ <x>370</x>
+ <y>10</y>
+ <width>114</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>255</red>
+ <green>255</green>
+ <blue>255</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</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>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_22" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>42</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>79</green>
+ <blue>175</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>79</green>
+ <blue>175</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>midLineWidth()</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_21" >
+ <property name="geometry" >
+ <rect>
+ <x>500</x>
+ <y>12</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="palette" >
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>79</green>
+ <blue>175</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </active>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>79</green>
+ <blue>175</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</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>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>103</red>
+ <green>141</green>
+ <blue>178</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </inactive>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>221</red>
+ <green>223</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>85</red>
+ <green>85</green>
+ <blue>85</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>199</red>
+ <green>199</green>
+ <blue>199</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>239</red>
+ <green>239</green>
+ <blue>239</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>86</red>
+ <green>117</green>
+ <blue>148</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>238</blue>
+ </color>
+ <color>
+ <red>82</red>
+ <green>24</green>
+ <blue>139</blue>
+ </color>
+ <color>
+ <red>232</red>
+ <green>232</green>
+ <blue>232</blue>
+ </color>
+ </disabled>
+ </palette>
+ </property>
+ <property name="font" >
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>11</pointsize>
+ <weight>50</weight>
+ <italic>false</italic>
+ <bold>false</bold>
+ <underline>false</underline>
+ <strikeout>false</strikeout>
+ </font>
+ </property>
+ <property name="text" >
+ <string>lineWidth()</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/diagrams/qimage-32bit.sk b/doc/src/diagrams/qimage-32bit.sk
new file mode 100644
index 0000000..0c19197
--- /dev/null
+++ b/doc/src/diagrams/qimage-32bit.sk
@@ -0,0 +1,18 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+lw(1)
+r(200,0,0,-200,21.921,817.509)
+lw(1)
+r(134.5,0,0,-133.5,87.421,751.009)
+lw(1)
+r(132.5,0,0,-134,21.921,817.509)
+lw(1)
+r(65.5,0,0,-66.5,21.921,817.509)
+lw(1)
+r(67.5,0,0,-66,154.421,683.509)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qimage-8bit.sk b/doc/src/diagrams/qimage-8bit.sk
new file mode 100644
index 0000000..a08a122
--- /dev/null
+++ b/doc/src/diagrams/qimage-8bit.sk
@@ -0,0 +1,50 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+lw(1)
+r(200,0,0,-200,14.2453,827.844)
+lw(1)
+r(134.5,0,0,-133.5,79.7453,761.344)
+lw(1)
+r(132.5,0,0,-134,14.2453,827.844)
+lw(1)
+r(65.5,0,0,-66.5,14.2453,827.844)
+lw(1)
+r(67.5,0,0,-66,146.745,693.844)
+G_()
+lw(1)
+r(65.5,0,0,-24.875,243.995,827.344)
+lw(1)
+r(20.5,0,0,-24.875,223.875,827.344)
+lw(1)
+r(65.5,0,0,-24.875,243.995,727.844)
+lw(1)
+r(20.5,0,0,-24.875,223.875,727.844)
+lw(1)
+r(65.5,0,0,-24.875,243.995,777.594)
+lw(1)
+r(20.5,0,0,-24.875,223.875,777.594)
+lw(1)
+r(65.5,0,0,-24.875,243.995,678.094)
+lw(1)
+r(20.5,0,0,-24.875,223.875,678.094)
+lw(1)
+r(65.5,0,0,-24.875,243.995,802.469)
+lw(1)
+r(20.5,0,0,-24.875,223.875,802.469)
+lw(1)
+r(65.5,0,0,-24.875,243.995,702.969)
+lw(1)
+r(20.5,0,0,-24.875,223.875,702.969)
+lw(1)
+r(65.5,0,0,-24.875,243.995,752.719)
+lw(1)
+r(20.5,0,0,-24.875,223.875,752.719)
+lw(1)
+r(65.5,0,0,-24.875,243.995,653.219)
+lw(1)
+r(20.5,0,0,-24.875,223.875,653.219)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qline-coordinates.sk b/doc/src/diagrams/qline-coordinates.sk
new file mode 100644
index 0000000..1f741f3
--- /dev/null
+++ b/doc/src/diagrams/qline-coordinates.sk
@@ -0,0 +1,61 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(2)
+b()
+bs(138.776,520.124,0)
+bs(319.58,700.927,0)
+fp((0.254,0.664,0.072))
+lw(1)
+e(6.02587,0,0,-6.0259,316.516,698.083)
+fp((0.254,0.664,0.072))
+lw(1)
+e(6.02587,0,0,-6.0259,139.569,520.916)
+lw(1)
+b()
+bs(139.654,500.815,0)
+bs(139.654,498.287,0)
+bs(139.654,479.75,0)
+bs(212.502,479.75,0)
+lw(1)
+b()
+bs(320.458,499.937,0)
+bs(320.458,479.75,0)
+bs(248.487,479.75,0)
+lw(1)
+b()
+bs(120.345,700.05,0)
+bs(100.158,700.05,0)
+bs(100.158,628.079,0)
+lw(1)
+b()
+bs(99.2803,590.339,0)
+bs(99.2803,589.306,0)
+bs(99.2803,520.124,0)
+bs(121.222,520.124,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dx()',(219.524,477.117))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dy()',(90.5034,606.137))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('x1(), y1()',(80.8488,499.059))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('x2(), y2()',(244.099,690.395))
+le()
+lw(1)
+r(320,0,0,-300,59.7843,740.254)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qline-point.sk b/doc/src/diagrams/qline-point.sk
new file mode 100644
index 0000000..d62303f
--- /dev/null
+++ b/doc/src/diagrams/qline-point.sk
@@ -0,0 +1,61 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(2)
+b()
+bs(138.776,520.124,0)
+bs(319.58,700.927,0)
+lw(1)
+b()
+bs(139.654,500.815,0)
+bs(139.654,498.287,0)
+bs(139.654,479.75,0)
+bs(212.502,479.75,0)
+lw(1)
+b()
+bs(320.458,499.937,0)
+bs(320.458,479.75,0)
+bs(248.487,479.75,0)
+lw(1)
+b()
+bs(120.345,700.05,0)
+bs(100.158,700.05,0)
+bs(100.158,628.079,0)
+lw(1)
+b()
+bs(99.2803,590.339,0)
+bs(99.2803,589.306,0)
+bs(99.2803,520.124,0)
+bs(121.222,520.124,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dx()',(219.524,477.117))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dy()',(90.5034,606.137))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('p1()',(104.546,497.304))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('p2()',(299.393,661.431))
+fp((0.254,0.664,0.072))
+lw(1)
+e(6.02587,0,0,-6.0259,138.219,520.006)
+fp((0.254,0.664,0.072))
+lw(1)
+e(6.02587,0,0,-6.0259,319.369,700.716)
+le()
+lw(1)
+r(320,0,0,-300,59.6378,739.945)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qlinef-angle-identicaldirection.sk b/doc/src/diagrams/qlinef-angle-identicaldirection.sk
new file mode 100644
index 0000000..5064938
--- /dev/null
+++ b/doc/src/diagrams/qlinef-angle-identicaldirection.sk
@@ -0,0 +1,28 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(4.13779,835.945,0)
+bs(105.138,784.445,0)
+lw(1)
+b()
+bs(3.88779,783.695,0)
+bs(104.888,835.195,0)
+lw(1)
+b()
+bs(104.638,834.945,0)
+bs(94.3878,833.945,0)
+bs(104.638,829.945,0)
+bs(104.388,834.195,0)
+lw(1)
+b()
+bs(4.13779,836.195,0)
+bs(14.3878,835.195,0)
+bs(4.13779,831.195,0)
+bs(4.38779,835.445,0)
+lw(1)
+e(22.5,0,0,-11.5,55.1378,810.445)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qlinef-angle-oppositedirection.sk b/doc/src/diagrams/qlinef-angle-oppositedirection.sk
new file mode 100644
index 0000000..69fa46d
--- /dev/null
+++ b/doc/src/diagrams/qlinef-angle-oppositedirection.sk
@@ -0,0 +1,28 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(4.13779,835.945,0)
+bs(105.138,784.445,0)
+lw(1)
+b()
+bs(3.88779,783.695,0)
+bs(104.888,835.195,0)
+lw(1)
+b()
+bs(4.13779,783.695,0)
+bs(14.3878,784.695,0)
+bs(4.13779,788.695,0)
+bs(4.38779,784.445,0)
+lw(1)
+b()
+bs(4.13779,836.195,0)
+bs(14.3878,835.195,0)
+bs(4.13779,831.195,0)
+bs(4.38779,835.445,0)
+lw(1)
+e(22.5,0,0,-11.5,55.1378,810.445)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qlistview.png b/doc/src/diagrams/qlistview.png
new file mode 100644
index 0000000..986fbc5
--- /dev/null
+++ b/doc/src/diagrams/qlistview.png
Binary files differ
diff --git a/doc/src/diagrams/qmatrix.sk b/doc/src/diagrams/qmatrix.sk
new file mode 100644
index 0000000..83bb4a6
--- /dev/null
+++ b/doc/src/diagrams/qmatrix.sk
@@ -0,0 +1,74 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0,0.174,1))
+lw(1)
+r(90,0,0,-90,12.1378,827.945)
+lp((0,0.054,1))
+lw(1)
+b()
+bs(41.6378,827.945,0)
+bs(41.6378,737.945,0)
+lp((0,0.054,1))
+lw(1)
+b()
+bs(11.6378,797.445,0)
+bs(101.638,797.445,0)
+lp((0,0.054,1))
+lw(1)
+b()
+bs(11.6378,767.945,0)
+bs(101.638,767.945,0)
+lp((0.007,0.06,1))
+lw(1)
+b()
+bs(71.6378,827.445,0)
+bs(71.6378,738.445,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m11',(15.8878,806.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m12',(45.8878,806.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m22',(45.8878,777.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m21',(15.8878,777.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dx',(21.2218,747.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('dy',(51.2218,747.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(82.6378,747.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(82.6378,806.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('0',(82.6378,777.945))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qpainter-pathstroking.png b/doc/src/diagrams/qpainter-pathstroking.png
new file mode 100644
index 0000000..4896a11
--- /dev/null
+++ b/doc/src/diagrams/qpainter-pathstroking.png
Binary files differ
diff --git a/doc/src/diagrams/qrect-coordinates.sk b/doc/src/diagrams/qrect-coordinates.sk
new file mode 100644
index 0000000..4c0792d
--- /dev/null
+++ b/doc/src/diagrams/qrect-coordinates.sk
@@ -0,0 +1,102 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('topLeft()',(91.1378,721.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('topRight()',(271.642,721.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottomRight()',(251.638,593.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottomLeft()',(71.1338,593.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left()',(135.138,518.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right()',(317.138,518.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('top()',(405.142,709.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottom()',(405.142,583.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('x(), y()',(153.138,696.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('center()',(224.638,652.945))
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(145.138,742.445,0)
+bs(145.138,529.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(329.638,744.445,0)
+bs(329.638,530.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(401.138,587.945,0)
+bs(67.1378,587.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(398.138,713.445,0)
+bs(68.1378,713.445,0)
+lw(1)
+r(197.5,0,0,-137.5,145.138,713.445)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,144.638,713.445)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,144.638,588.945)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,329.638,587.945)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,242.638,646.945)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,329.138,713.445)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-diagram-one.sk b/doc/src/diagrams/qrect-diagram-one.sk
new file mode 100644
index 0000000..0396d80
--- /dev/null
+++ b/doc/src/diagrams/qrect-diagram-one.sk
@@ -0,0 +1,69 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+fp((0.228,0.228,0.228))
+lw(1)
+r(228.418,0,0,-163.469,128.024,741.52)
+fp((1,1,1))
+lw(1)
+r(188.922,0,0,-121.779,149.309,720.237)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,319.305,616.689)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.033,544.699))
+G()
+lw(1)
+b()
+bs(112.866,598.944,0)
+bs(83.0108,598.944,0)
+bs(83.0108,649.497,0)
+bs(83.0108,652.933,0)
+lw(1)
+b()
+bs(82.5719,684.034,0)
+bs(82.5719,742.871,0)
+bs(112.2,742.871,0)
+G_()
+lw(1)
+b()
+bs(129.505,573.041,0)
+bs(129.505,540.72,0)
+bs(203.382,540.72,0)
+lw(1)
+b()
+bs(337.804,572.907,0)
+bs(337.797,540.759,0)
+bs(262.698,540.759,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(214.257,537.543))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(437.823,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-diagram-three.sk b/doc/src/diagrams/qrect-diagram-three.sk
new file mode 100644
index 0000000..77be4ee
--- /dev/null
+++ b/doc/src/diagrams/qrect-diagram-three.sk
@@ -0,0 +1,67 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+lw(1)
+b()
+bs(124.239,550.355,0)
+bs(124.239,518.034,0)
+bs(199.871,518.034,0)
+lw(1)
+b()
+bs(336.049,550.221,0)
+bs(336.042,518.073,0)
+bs(260.943,518.073,0)
+lw(1)
+b()
+bs(103.65,598.944,0)
+bs(73.795,598.944,0)
+bs(73.795,649.497,0)
+bs(73.795,652.933,0)
+lw(1)
+b()
+bs(73.3561,684.034,0)
+bs(73.3561,742.871,0)
+bs(102.984,742.871,0)
+fp((0.228,0.228,0.228))
+lw(1)
+r(275.594,0,0,-203.623,107.179,759.732)
+fp((1,1,1))
+lw(1)
+r(145.696,0,0,-80.7471,168.618,700.928)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,311.59,622.904)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(208.991,514.857))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.911,537.678))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(458.887,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-diagram-two.sk b/doc/src/diagrams/qrect-diagram-two.sk
new file mode 100644
index 0000000..4447923
--- /dev/null
+++ b/doc/src/diagrams/qrect-diagram-two.sk
@@ -0,0 +1,67 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+lw(1)
+b()
+bs(125.117,574.053,0)
+bs(125.117,541.732,0)
+bs(200.749,541.732,0)
+lw(1)
+b()
+bs(335.171,573.919,0)
+bs(335.164,541.771,0)
+bs(260.065,541.771,0)
+lw(1)
+b()
+bs(103.65,598.944,0)
+bs(73.795,598.944,0)
+bs(73.795,649.497,0)
+bs(73.795,652.933,0)
+lw(1)
+b()
+bs(73.3561,684.034,0)
+bs(73.3561,742.871,0)
+bs(102.984,742.871,0)
+fp((0.228,0.228,0.228))
+lw(1)
+r(249.263,0,0,-181.681,107.179,759.732)
+fp((1,1,1))
+lw(1)
+r(165.005,0,0,-103.567,149.309,720.237)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,314.228,619.387)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(211.624,538.555))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.033,544.699))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(600.195,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-diagram-zero.sk b/doc/src/diagrams/qrect-diagram-zero.sk
new file mode 100644
index 0000000..d5198dc
--- /dev/null
+++ b/doc/src/diagrams/qrect-diagram-zero.sk
@@ -0,0 +1,48 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(109.757,614.427,0)
+bs(109.757,582.106,0)
+bs(191.533,582.106,0)
+lw(1)
+b()
+bs(319.372,614.732,0)
+bs(319.366,582.584,0)
+bs(244.266,582.584,0)
+lw(1)
+b()
+bs(95.7507,625.714,0)
+bs(65.8958,625.714,0)
+bs(65.8958,676.267,0)
+bs(65.8958,679.703,0)
+lw(1)
+b()
+bs(65.8958,708.171,0)
+bs(65.8958,768.763,0)
+bs(98.1562,768.763,0)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,111.196,769.222)
+lw(1)
+r(0,0,0,0,288.422,731.646)
+lw(1)
+r(0,0,0,0,264.724,735.596)
+lw(1)
+r(0,0,0,0,241.027,741.301)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(198.459,578.929))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(45.7413,688.64))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-63.3727,0)
+guide(433.434,1)
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-intersect.sk b/doc/src/diagrams/qrect-intersect.sk
new file mode 100644
index 0000000..7e5da3e
--- /dev/null
+++ b/doc/src/diagrams/qrect-intersect.sk
@@ -0,0 +1,62 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.378,0.772,0.399))
+lw(1)
+r(200.113,0,0,-119.366,79.9711,759.732)
+fp((0.49,0.49,0.49))
+lw(1)
+r(200.113,0,0,-120.243,159.841,700.05)
+fp((0.491,0.625,0.785))
+lp((0.732,0.198,0.029))
+lw(2)
+r(120.243,0,0,-59.6828,159.841,700.05)
+lw(1)
+b()
+bs(379.702,700.05,0)
+bs(400.327,700.05,0)
+bs(400.327,679.424,0)
+lw(1)
+b()
+bs(380.14,639.489,0)
+bs(380.14,639.938,0)
+bs(399.888,639.938,0)
+bs(399.888,660.115,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r.intersect(s).height()',(377.638,666.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r',(84.6378,624.945))
+lw(1)
+b()
+bs(160.138,779.945,0)
+bs(160.138,800.445,0)
+bs(180.138,800.445,0)
+lw(1)
+b()
+bs(260.138,799.445,0)
+bs(280.138,799.445,0)
+bs(280.138,779.445,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r.intersect(s).',(187.138,802.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(200.638,790.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('s',(145.207,584.51))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrect-unite.sk b/doc/src/diagrams/qrect-unite.sk
new file mode 100644
index 0000000..975183b
--- /dev/null
+++ b/doc/src/diagrams/qrect-unite.sk
@@ -0,0 +1,63 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.47,0.47,0.47))
+lw(1)
+r(200.113,0,0,-120.243,159.841,700.05)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r',(84.6378,624.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('s',(149.138,584.945))
+fp((0.378,0.772,0.399))
+lw(1)
+r(200.113,0,0,-119.366,79.9711,759.732)
+lw(1)
+b()
+bs(80.1378,778.445,0)
+bs(80.1378,799.445,0)
+bs(160.138,799.445,0)
+lw(1)
+b()
+bs(360.138,779.945,0)
+bs(360.138,799.945,0)
+bs(279.638,799.945,0)
+lw(1)
+b()
+bs(380.138,759.924,0)
+bs(380.138,760.445,0)
+bs(400.138,760.445,0)
+bs(400.138,698.945,0)
+lw(1)
+b()
+bs(380.138,579.945,0)
+bs(400.138,579.945,0)
+bs(400.138,641.445,0)
+lp((0.819,0.075,0.043))
+lw(2)
+r(280,0,0,-180,80.1378,759.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r.united(s).width()',(179.638,796.945))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(380.638,661.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('r.united(s).',(375.638,675.445))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrectf-coordinates.sk b/doc/src/diagrams/qrectf-coordinates.sk
new file mode 100644
index 0000000..76223c2
--- /dev/null
+++ b/doc/src/diagrams/qrectf-coordinates.sk
@@ -0,0 +1,102 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('topLeft()',(90.6378,721.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('topRight()',(349.638,721.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottomRight()',(349.638,560.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottomLeft()',(70.6338,560.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left()',(135.138,519.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right()',(327.638,519.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('top()',(446.142,708.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('bottom()',(447.142,570.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('x(), y()',(153.138,696.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('center()',(225.138,630.445))
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(145.138,742.445,0)
+bs(145.138,529.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(342.638,745.445,0)
+bs(342.638,531.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(441.638,575.945,0)
+bs(68.1378,575.945,0)
+lp((0.866,0,0))
+lw(1)
+ld((4, 4))
+b()
+bs(436.138,713.445,0)
+bs(68.1378,713.445,0)
+lw(1)
+r(197.5,0,0,-137.5,145.138,713.445)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,144.638,713.445)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,144.638,575.945)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,342.138,576.445)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,242.638,646.945)
+fp((0.852,0,0))
+le()
+lw(1)
+e(3,0,0,-3,342.638,713.945)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrectf-diagram-one.sk b/doc/src/diagrams/qrectf-diagram-one.sk
new file mode 100644
index 0000000..4e445dd
--- /dev/null
+++ b/doc/src/diagrams/qrectf-diagram-one.sk
@@ -0,0 +1,69 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+fp((0.228,0.228,0.228))
+lw(1)
+r(228.418,0,0,-163.469,128.024,741.52)
+fp((1,1,1))
+lw(1)
+r(188.922,0,0,-121.779,149.309,720.237)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,336.256,599.116)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.911,559.62))
+G()
+lw(1)
+b()
+bs(112.866,598.944,0)
+bs(83.0108,598.944,0)
+bs(83.0108,649.497,0)
+bs(83.0108,652.933,0)
+lw(1)
+b()
+bs(82.5719,684.034,0)
+bs(82.5719,742.871,0)
+bs(112.2,742.871,0)
+G_()
+lw(1)
+b()
+bs(129.505,573.041,0)
+bs(129.505,540.72,0)
+bs(203.382,540.72,0)
+lw(1)
+b()
+bs(337.804,572.907,0)
+bs(337.797,540.759,0)
+bs(262.698,540.759,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(214.257,537.543))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(437.823,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrectf-diagram-three.sk b/doc/src/diagrams/qrectf-diagram-three.sk
new file mode 100644
index 0000000..21c5b14
--- /dev/null
+++ b/doc/src/diagrams/qrectf-diagram-three.sk
@@ -0,0 +1,67 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+lw(1)
+b()
+bs(124.239,550.355,0)
+bs(124.239,518.034,0)
+bs(199.871,518.034,0)
+lw(1)
+b()
+bs(336.049,550.221,0)
+bs(336.042,518.073,0)
+bs(260.943,518.073,0)
+lw(1)
+b()
+bs(103.65,598.944,0)
+bs(73.795,598.944,0)
+bs(73.795,649.497,0)
+bs(73.795,652.933,0)
+lw(1)
+b()
+bs(73.3561,684.034,0)
+bs(73.3561,742.871,0)
+bs(102.984,742.871,0)
+fp((0.228,0.228,0.228))
+lw(1)
+r(275.594,0,0,-203.623,107.179,759.732)
+fp((1,1,1))
+lw(1)
+r(145.696,0,0,-80.7471,168.618,700.928)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,337.134,598.238)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(208.991,514.857))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.911,537.678))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(458.887,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qrectf-diagram-two.sk b/doc/src/diagrams/qrectf-diagram-two.sk
new file mode 100644
index 0000000..50d462e
--- /dev/null
+++ b/doc/src/diagrams/qrectf-diagram-two.sk
@@ -0,0 +1,67 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(400.24,0,0,-299.507,39.5975,801.199)
+lw(1)
+b()
+bs(125.117,574.053,0)
+bs(125.117,541.732,0)
+bs(200.749,541.732,0)
+lw(1)
+b()
+bs(335.171,573.919,0)
+bs(335.164,541.771,0)
+bs(260.065,541.771,0)
+lw(1)
+b()
+bs(103.65,598.944,0)
+bs(73.795,598.944,0)
+bs(73.795,649.497,0)
+bs(73.795,652.933,0)
+lw(1)
+b()
+bs(73.3561,684.034,0)
+bs(73.3561,742.871,0)
+bs(102.984,742.871,0)
+fp((0.228,0.228,0.228))
+lw(1)
+r(249.263,0,0,-181.681,107.179,759.732)
+fp((1,1,1))
+lw(1)
+r(165.005,0,0,-103.567,149.309,720.237)
+lp((0.799,0.109,0.048))
+lw(2)
+r(209.605,0,0,-142.77,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,128.75,741.136)
+fp((0.254,0.664,0.072))
+lw(1)
+e(9.42692,0,0,-9.42693,338.012,598.238)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('height()',(52.7628,664.942))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('width()',(211.624,538.555))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('left(), top()',(108.935,771.142))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('right(), bottom()',(345.033,544.699))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(-42.3082,0)
+guide(600.195,1)
+grid((0,0,20,20),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qstyleoptiontoolbar-position.sk b/doc/src/diagrams/qstyleoptiontoolbar-position.sk
new file mode 100644
index 0000000..d877f98
--- /dev/null
+++ b/doc/src/diagrams/qstyleoptiontoolbar-position.sk
@@ -0,0 +1,125 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+r(347.5,0,0,-199,162.138,754.445)
+lw(1)
+r(430.5,0,0,-25,79.6378,523.945)
+lw(1)
+b()
+bs(161.638,733.945,0)
+bs(509.638,734.445,0)
+lw(1)
+b()
+bs(162.138,714.445,0)
+bs(508.638,714.945,0)
+lw(1)
+b()
+bs(162.138,673.945,0)
+bs(510.138,674.445,0)
+lw(1)
+b()
+bs(162.138,694.445,0)
+bs(509.138,694.945,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Middle (m)',(444.638,717.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Middle',(218.138,506.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Middle',(327.138,506.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Middle (m)',(445.138,697.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Beginning (b)',(428.638,737.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('b',(86.1378,566.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Beginning',(105.138,507.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QStyleOptionToolBar::positionOfLine',(185.138,762.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QStyleOptionToolBar::positionWithinLine',(184.138,532.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('End (e)',(460.638,677.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('End',(443.638,506.945))
+lw(1)
+b()
+bs(182.138,524.445,0)
+bs(182.138,499.445,0)
+lw(1)
+b()
+bs(100.138,754.945,0)
+bs(100.138,555.945,0)
+lw(1)
+b()
+bs(120.138,754.945,0)
+bs(120.138,555.945,0)
+lw(1)
+b()
+bs(141.138,754.445,0)
+bs(141.138,555.445,0)
+lw(1)
+b()
+bs(403.138,523.445,0)
+bs(403.138,499.445,0)
+lw(1)
+b()
+bs(291.638,523.445,0)
+bs(291.638,499.445,0)
+lw(1)
+r(82.5,0,0,199,79.6378,555.445)
+lw(1)
+r(0,0,0,0,124.638,535.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m',(105.138,567.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('m',(125.638,567.945))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('e',(147.138,567.445))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+guide(509.138,0)
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qt-embedded-vnc-screen.png b/doc/src/diagrams/qt-embedded-vnc-screen.png
new file mode 100644
index 0000000..b6fb649
--- /dev/null
+++ b/doc/src/diagrams/qt-embedded-vnc-screen.png
Binary files differ
diff --git a/doc/src/diagrams/qtableview-resized.png b/doc/src/diagrams/qtableview-resized.png
new file mode 100644
index 0000000..709aef1
--- /dev/null
+++ b/doc/src/diagrams/qtableview-resized.png
Binary files differ
diff --git a/doc/src/diagrams/qtableview-small.png b/doc/src/diagrams/qtableview-small.png
new file mode 100644
index 0000000..0363904
--- /dev/null
+++ b/doc/src/diagrams/qtableview-small.png
Binary files differ
diff --git a/doc/src/diagrams/qtableview-stretched.png b/doc/src/diagrams/qtableview-stretched.png
new file mode 100644
index 0000000..4441427
--- /dev/null
+++ b/doc/src/diagrams/qtableview-stretched.png
Binary files differ
diff --git a/doc/src/diagrams/qtableview.png b/doc/src/diagrams/qtableview.png
new file mode 100644
index 0000000..c2b5787
--- /dev/null
+++ b/doc/src/diagrams/qtableview.png
Binary files differ
diff --git a/doc/src/diagrams/qtconfig-appearance.png b/doc/src/diagrams/qtconfig-appearance.png
new file mode 100644
index 0000000..9d2d9e7
--- /dev/null
+++ b/doc/src/diagrams/qtconfig-appearance.png
Binary files differ
diff --git a/doc/src/diagrams/qtdemo-example.png b/doc/src/diagrams/qtdemo-example.png
new file mode 100644
index 0000000..8a399d6
--- /dev/null
+++ b/doc/src/diagrams/qtdemo-example.png
Binary files differ
diff --git a/doc/src/diagrams/qtdemo.png b/doc/src/diagrams/qtdemo.png
new file mode 100644
index 0000000..2db5399
--- /dev/null
+++ b/doc/src/diagrams/qtdemo.png
Binary files differ
diff --git a/doc/src/diagrams/qtdesignerextensions.sk b/doc/src/diagrams/qtdesignerextensions.sk
new file mode 100644
index 0000000..6c991cc
--- /dev/null
+++ b/doc/src/diagrams/qtdesignerextensions.sk
@@ -0,0 +1,254 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.906,0.732,0.467))
+lw(1)
+e(63,0,0,-24.5,506.638,720.945)
+fp((0.633,0.805,0.54))
+lw(1)
+r(228.847,0,0,-31.9855,160.081,797.596)
+fp((0.654,0.799,0.611))
+lw(1)
+r(126.847,0,0,-32.3666,415.674,589.688)
+lw(1)
+r(120.347,0,0,-32.3666,24.0692,505.37)
+fp((0.596,0.758,0.524))
+lw(1)
+r(230.847,0,0,-32.3666,157.485,463.23)
+lw(1)
+r(179.347,0,0,-31.8666,189.83,588.259)
+fp((0.543,0.82,0.899))
+lw(1)
+r(179.847,0,0,-33.3666,189.366,669.613)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QExtensionManager',(423.494,568.427))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QExtensionFactory',(226.125,443.933))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('MyExtensionFactory',(225.078,566.617))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('MyCustomWidgetInterface',(1,0,0,1.06376,207.091,646.338))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qt Designer',(472.469,715.932))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('MyExtension',(49.3756,486.573))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('can create',(103.516,647.507))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('can create',(102.516,567.507))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QDesignerCustomWidgetInterface',(183.016,776.507))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('can identify',(59.6232,608.689))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('accesses',(400.623,647.189))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('accesses',(499.623,630.189))
+lw(1)
+b()
+bs(84.1673,725.837,0)
+bs(84.1673,650.617,0)
+bs(100.267,650.617,0)
+lw(1)
+b()
+bs(38.1673,726.255,0)
+bs(38.1673,611.117,0)
+bs(54.2666,611.117,0)
+lw(1)
+r(120.347,0,0,-31.9855,23.5806,758.096)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('MyCustomWidget',(1.02995,0,0,1.0597,36.9433,736.685))
+lw(1)
+b()
+bs(278.138,765.445,0)
+bs(278.138,723.445,0)
+lw(1)
+b()
+bs(523.638,697.445,0)
+bs(523.638,643.445,0)
+lw(1)
+b()
+bs(164.638,650.445,0)
+bs(189.138,650.445,0)
+lw(1)
+b()
+bs(163.638,571.945,0)
+bs(190.638,571.945,0)
+lw(1)
+b()
+bs(369.638,649.945,0)
+bs(395.638,649.945,0)
+lw(1)
+b()
+bs(488.138,695.945,0)
+bs(488.138,650.445,0)
+bs(457.638,650.445,0)
+lw(1)
+b()
+bs(83.1378,505.445,0)
+bs(83.1378,571.945,0)
+bs(99.6378,571.945,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('inherits',(260.016,708.007))
+lw(1)
+b()
+bs(278.638,700.445,0)
+bs(278.638,669.445,0)
+lw(1)
+b()
+bs(524.138,620.445,0)
+bs(524.138,589.445,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('inherits',(257.516,510.007))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('initializes',(277.016,609.507))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('controls',(349.016,523.507))
+lw(1)
+b()
+bs(277.138,463.445,0)
+bs(277.138,505.445,0)
+lw(1)
+b()
+bs(299.638,590.445,0)
+bs(299.638,606.445,0)
+lw(1)
+b()
+bs(278.638,524.945,0)
+bs(278.638,555.945,0)
+lw(1)
+b()
+bs(299.138,619.945,0)
+bs(299.138,635.945,0)
+lw(1)
+b()
+bs(124.638,611.945,0)
+bs(214.138,611.945,0)
+bs(214.138,588.945,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(523.888,589.695,0)
+bs(518.638,597.445,0)
+bs(528.888,597.445,0)
+bs(523.888,590.195,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(83.3878,506.195,0)
+bs(78.1378,513.945,0)
+bs(88.3878,513.945,0)
+bs(83.3878,506.695,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(277.388,463.695,0)
+bs(272.138,471.445,0)
+bs(282.388,471.445,0)
+bs(277.388,464.195,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(299.888,588.695,0)
+bs(294.638,596.445,0)
+bs(304.888,596.445,0)
+bs(299.888,589.195,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(84.3878,726.445,0)
+bs(79.1378,718.695,0)
+bs(89.3878,718.695,0)
+bs(84.3878,725.945,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(38.3878,726.445,0)
+bs(33.1378,718.695,0)
+bs(43.3878,718.695,0)
+bs(38.3878,725.945,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(324.138,556.445,0)
+bs(329.388,548.695,0)
+bs(319.138,548.695,0)
+bs(324.138,555.945,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(278.388,765.945,0)
+bs(273.138,758.195,0)
+bs(283.388,758.195,0)
+bs(278.388,765.445,0)
+fp((0,0,0))
+lw(1)
+b()
+bs(369.638,649.945,0)
+bs(377.263,654.945,0)
+bs(377.263,644.945,0)
+bs(369.763,650.07,0)
+lw(1)
+b()
+bs(460.888,557.945,0)
+bs(460.888,528.445,0)
+bs(398.388,528.445,0)
+lw(1)
+b()
+bs(324.388,554.945,0)
+bs(324.388,527.945,0)
+bs(344.388,527.945,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtexttable-cells.sk b/doc/src/diagrams/qtexttable-cells.sk
new file mode 100644
index 0000000..3e6eb5b
--- /dev/null
+++ b/doc/src/diagrams/qtexttable-cells.sk
@@ -0,0 +1,107 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(167.5,0,0,-95,120,825)
+lp((0.631,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(162.5,810,0)
+bc(167.5,815.625,182.5,815.625,187.5,810,2)
+lp((0.631,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(217.5,810,0)
+bc(222.5,815.625,237.5,815.625,242.5,810,2)
+G()
+lw(1)
+r(50,0,0,-25,177.5,820)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(192.168,802.484))
+G_()
+G()
+lw(1)
+r(50,0,0,-25,177.5,790)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(192.168,772.484))
+G_()
+lp((0.631,0.631,0.631))
+lw(1)
+r(50,0,0,-25,177.5,760)
+fp((0.631,0.631,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(192.168,742.484))
+G()
+lw(1)
+r(50,0,0,-25,232.5,820)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(247.168,802.484))
+G_()
+G()
+lw(1)
+r(50,0,0,-25,232.5,790)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(247.168,772.484))
+G_()
+lp((0.631,0.631,0.631))
+lw(1)
+r(50,0,0,-25,232.5,760)
+fp((0.631,0.631,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(247.168,742.484))
+G()
+lw(1)
+r(47.5,0,0,-25,125,820)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(138.418,802.484))
+G_()
+G()
+lw(1)
+r(47.5,0,0,-25,125,790)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(138.418,772.484))
+G_()
+lp((0.631,0.631,0.631))
+lw(1)
+r(47.5,0,0,-25,125,760)
+fp((0.631,0.631,0.631))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell',(138.418,742.484))
+lp((0.631,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(275,802.5,0)
+bc(270,795,262.5,792.5,250,792.5,1)
+bc(245,792.5,157.5,792.5,152.5,792.5,1)
+bc(140,792.5,137.306,786.007,132.5,780,1)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtexttableformat-cell.sk b/doc/src/diagrams/qtexttableformat-cell.sk
new file mode 100644
index 0000000..75b45f5
--- /dev/null
+++ b/doc/src/diagrams/qtexttableformat-cell.sk
@@ -0,0 +1,67 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0.627,0.627,0.627))
+lw(1)
+ld((2, 2))
+r(-210,0,0,-60,255,670)
+lp((0.627,0.627,0.627))
+lw(1)
+ld((2, 2))
+r(-65,0,0,-135,320,805)
+lp((0.627,0.627,0.627))
+lw(1)
+ld((2, 2))
+r(-210,0,0,-135,255,805)
+lw(1)
+r(275,0,0,-195,45,805)
+lw(1)
+ld((2, 2))
+r(170,0,0,-95,65,785)
+lw(1)
+ld((2, 2))
+r(45,0,0,-95,275,785)
+lw(1)
+ld((2, 2))
+r(170,0,0,-40,65,650)
+lw(1)
+ld((2, 2))
+r(45,0,0,-40,275,650)
+lw(1)
+r(130,0,0,-55,85,765)
+lw(1)
+r(25,0,0,-55,295,765)
+lw(1)
+r(130,0,0,-20,85,630)
+lw(1)
+r(25,0,0,-20,295,630)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell padding',(116.652,696.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Cell spacing',(117.324,790))
+fp((0.627,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('Cell contents',(92.2,732.39))
+fp((1,1,1))
+le()
+lw(1)
+r(10,0,0,-205,315,810)
+fp((1,1,1))
+le()
+lw(1)
+r(280,0,0,-10,40,615)
+le()
+lw(1)
+r(280,0,0,-200,40,810)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/architecture-emb.sk b/doc/src/diagrams/qtopiacore/architecture-emb.sk
new file mode 100644
index 0000000..cca31f3
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/architecture-emb.sk
@@ -0,0 +1,425 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,62.5,0)
+bs(282.5,62.5,0)
+bs(282.5,67.5,0)
+bs(287.5,67.5,0)
+bs(287.5,62.5,0)
+bs(284.808,62.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(134.808,72.5,0)
+bs(132.5,72.5,0)
+bs(132.5,77.5,0)
+bs(137.5,77.5,0)
+bs(137.5,72.5,0)
+bs(134.808,72.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(22.308,72.5,0)
+bs(20,72.5,0)
+bs(20,77.5,0)
+bs(25,77.5,0)
+bs(25,72.5,0)
+bs(22.308,72.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(78.7166,72.5,0)
+bs(22.5,72.5,0)
+bs(22.5,75,0)
+bs(135,75,0)
+bs(135,72.5,0)
+bs(78.7166,72.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(152.308,62.5,0)
+bs(150,62.5,0)
+bs(150,67.5,0)
+bs(155,67.5,0)
+bs(155,62.5,0)
+bs(152.308,62.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(218.711,62.5,0)
+bs(152.5,62.5,0)
+bs(152.5,65,0)
+bs(285,65,0)
+bs(285,62.5,0)
+bs(218.711,62.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,27.5,0)
+bs(282.5,27.5,0)
+bs(282.5,32.5,0)
+bs(287.5,32.5,0)
+bs(287.5,27.5,0)
+bs(284.808,27.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,127.5,0)
+bs(282.5,127.5,0)
+bs(282.5,132.5,0)
+bs(287.5,132.5,0)
+bs(287.5,127.5,0)
+bs(284.808,127.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(12.308,27.5,0)
+bs(10,27.5,0)
+bs(10,32.5,0)
+bs(15,32.5,0)
+bs(15,27.5,0)
+bs(12.308,27.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(12.308,127.5,0)
+bs(10,127.5,0)
+bs(10,132.5,0)
+bs(15,132.5,0)
+bs(15,127.5,0)
+bs(12.308,127.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,55,0)
+bs(282.5,55,0)
+bs(282.5,60,0)
+bs(287.5,60,0)
+bs(287.5,55,0)
+bs(284.808,55,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,165,0)
+bs(282.5,165,0)
+bs(282.5,170,0)
+bs(287.5,170,0)
+bs(287.5,165,0)
+bs(284.808,165,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(284.808,120,0)
+bs(282.5,120,0)
+bs(282.5,125,0)
+bs(287.5,125,0)
+bs(287.5,120,0)
+bs(284.808,120,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(134.808,110,0)
+bs(132.5,110,0)
+bs(132.5,115,0)
+bs(137.5,115,0)
+bs(137.5,110,0)
+bs(134.808,110,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(148.669,27.5,0)
+bs(12.5,27.5,0)
+bs(12.5,30,0)
+bs(285,30,0)
+bs(285,27.5,0)
+bs(148.669,27.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(148.669,127.5,0)
+bs(12.5,127.5,0)
+bs(12.5,130,0)
+bs(285,130,0)
+bs(285,127.5,0)
+bs(148.669,127.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(286.249,30,0)
+bs(285,30,0)
+bs(285,57.5,0)
+bs(287.5,57.5,0)
+bs(287.5,30,0)
+bs(286.249,30,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(286.249,130,0)
+bs(285,130,0)
+bs(285,167.5,0)
+bs(287.5,167.5,0)
+bs(287.5,130,0)
+bs(286.249,130,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(286.249,65,0)
+bs(285,65,0)
+bs(285,122.5,0)
+bs(287.5,122.5,0)
+bs(287.5,65,0)
+bs(286.249,65,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(136.249,75,0)
+bs(135,75,0)
+bs(135,112.5,0)
+bs(137.5,112.5,0)
+bs(137.5,75,0)
+bs(136.249,75,0)
+gl([(0,(0,0,0)),(1,(0.362,0.362,0.362))])
+pgl(0,-1,0)
+fp()
+r(275,0,0,-30,10,60)
+fp((1,1,1))
+b()
+bs(10,150,0)
+bs(285,150,0)
+bs(285,170,0)
+bs(10,170,0)
+bs(10,150,0)
+bC()
+fp((0.8,0.8,0.8))
+b()
+bs(10,130,0)
+bs(285,130,0)
+bs(285,150,0)
+bs(10,150,0)
+bs(10,130,0)
+bC()
+fp((0.651,0.808,0.224))
+b()
+bs(150,105,0)
+bs(285,105,0)
+bs(285,125,0)
+bs(150,125,0)
+bs(150,105,0)
+bC()
+fp((0.5,0.5,0.5))
+b()
+bs(150,85,0)
+bs(285,85,0)
+bs(285,105,0)
+bs(150,105,0)
+bs(150,85,0)
+bC()
+fp((0.651,0.808,0.224))
+b()
+bs(20,75,0)
+bs(135,75,0)
+bs(135,115,0)
+bs(20,115,0)
+bs(20,75,0)
+bC()
+lp((0.785,0.785,0.785))
+b()
+bs(10,65,0)
+bs(145,65,0)
+bs(145,125,0)
+bs(10,125,0)
+bs(10,65,0)
+bC()
+lp((0.631,0.631,0.631))
+b()
+bs(15,70,0)
+bs(140,70,0)
+bs(140,120,0)
+bs(15,120,0)
+bs(15,70,0)
+bC()
+fp((0.5,0.5,0.5))
+b()
+bs(150,65,0)
+bs(285,65,0)
+bs(285,85,0)
+bs(150,85,0)
+bs(150,65,0)
+bC()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Application Source Code',(81.47,156.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qt API',(129.824,136.384))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qt for X11',(190.152,111.384))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Xlib',(207.498,90))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('X Window Server',(171.156,71.384))
+gl([(0,(0.248,0.248,0.248)),(1,(0.362,0.362,0.362))])
+pgl(0,-1,0)
+fp()
+le()
+lw(0.5)
+b()
+bs(105,35,0)
+bs(115,55,0)
+bs(200,55,0)
+bs(190,35,0)
+bs(105,35,0)
+bC()
+fp((0.788,0.13,0.13))
+le()
+lw(0.5)
+b()
+bs(190,35,0)
+bs(200,55,0)
+bs(280,55,0)
+bs(280,35,0)
+bs(190,35,0)
+bC()
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Framebuffer',(120,41.384))
+gl([(0,(0.248,0.248,0.248)),(1,(0.362,0.362,0.362))])
+pgl(0,-1,0)
+fp()
+le()
+lw(0.5)
+b()
+bs(15,35,0)
+bs(15,55,0)
+bs(110,55,0)
+bs(99.4444,35,0)
+bs(15,35,0)
+bC()
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Linux Kernel',(25,41.384))
+G()
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(8)
+txt('Accelerated',(217.76,46.756))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(8)
+txt('Graphics',(222.876,37.6))
+G_()
+G()
+fp((1,1,1))
+Fn('Helvetica')
+txt('Qt for',(62.494,98.742))
+fp((1,1,1))
+Fn('Helvetica')
+txt('Embedded Linux',(32.476,85.126))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/clamshell-phone.png b/doc/src/diagrams/qtopiacore/clamshell-phone.png
new file mode 100644
index 0000000..07f562d
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/clamshell-phone.png
Binary files differ
diff --git a/doc/src/diagrams/qtopiacore/launcher.png b/doc/src/diagrams/qtopiacore/launcher.png
new file mode 100644
index 0000000..a72671f
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/launcher.png
Binary files differ
diff --git a/doc/src/diagrams/qtopiacore/qt-embedded-opengl1.sk b/doc/src/diagrams/qtopiacore/qt-embedded-opengl1.sk
new file mode 100644
index 0000000..abacde9
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qt-embedded-opengl1.sk
@@ -0,0 +1,410 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(217.308,642.5,0)
+bs(215,642.5,0)
+bs(215,647.5,0)
+bs(220,647.5,0)
+bs(220,642.5,0)
+bs(217.308,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(339.808,642.5,0)
+bs(337.5,642.5,0)
+bs(337.5,647.5,0)
+bs(342.5,647.5,0)
+bs(342.5,642.5,0)
+bs(339.808,642.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(278.714,642.5,0)
+bs(217.5,642.5,0)
+bs(217.5,645,0)
+bs(340,645,0)
+bs(340,642.5,0)
+bs(278.714,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(339.808,695,0)
+bs(337.5,695,0)
+bs(337.5,700,0)
+bs(342.5,700,0)
+bs(342.5,695,0)
+bs(339.808,695,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(341.249,645,0)
+bs(340,645,0)
+bs(340,697.5,0)
+bs(342.5,697.5,0)
+bs(342.5,645,0)
+bs(341.249,645,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(169.808,642.5,0)
+bs(167.5,642.5,0)
+bs(167.5,647.5,0)
+bs(172.5,647.5,0)
+bs(172.5,642.5,0)
+bs(169.808,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,512.5,0)
+bs(347.5,512.5,0)
+bs(347.5,517.5,0)
+bs(352.5,517.5,0)
+bs(352.5,512.5,0)
+bs(349.808,512.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,572.5,0)
+bs(347.5,572.5,0)
+bs(347.5,577.5,0)
+bs(352.5,577.5,0)
+bs(352.5,572.5,0)
+bs(349.808,572.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,512.5,0)
+bs(60,512.5,0)
+bs(60,517.5,0)
+bs(65,517.5,0)
+bs(65,512.5,0)
+bs(62.308,512.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(142.308,572.5,0)
+bs(140,572.5,0)
+bs(140,577.5,0)
+bs(145,577.5,0)
+bs(145,572.5,0)
+bs(142.308,572.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(139.808,732.5,0)
+bs(137.5,732.5,0)
+bs(137.5,737.5,0)
+bs(142.5,737.5,0)
+bs(142.5,732.5,0)
+bs(139.808,732.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(169.808,695,0)
+bs(167.5,695,0)
+bs(167.5,700,0)
+bs(172.5,700,0)
+bs(172.5,695,0)
+bs(169.808,695,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(139.808,785,0)
+bs(137.5,785,0)
+bs(137.5,790,0)
+bs(142.5,790,0)
+bs(142.5,785,0)
+bs(139.808,785,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(171.249,645,0)
+bs(170,645,0)
+bs(170,697.5,0)
+bs(172.5,697.5,0)
+bs(172.5,645,0)
+bs(171.249,645,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(141.249,735,0)
+bs(140,735,0)
+bs(140,787.5,0)
+bs(142.5,787.5,0)
+bs(142.5,735,0)
+bs(141.249,735,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,642.5,0)
+bs(60,642.5,0)
+bs(60,647.5,0)
+bs(65,647.5,0)
+bs(65,642.5,0)
+bs(62.308,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,732.5,0)
+bs(60,732.5,0)
+bs(60,737.5,0)
+bs(65,737.5,0)
+bs(65,732.5,0)
+bs(62.308,732.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(116.218,642.5,0)
+bs(62.5,642.5,0)
+bs(62.5,645,0)
+bs(170,645,0)
+bs(170,642.5,0)
+bs(116.218,642.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(101.227,732.5,0)
+bs(62.5,732.5,0)
+bs(62.5,735,0)
+bs(140,735,0)
+bs(140,732.5,0)
+bs(101.227,732.5,0)
+fp((0.651,0.808,0.224))
+b()
+bs(215,645,0)
+bs(340,645,0)
+bs(340,700,0)
+bs(215,700,0)
+bs(215,645,0)
+bC()
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,535,0)
+bs(347.5,535,0)
+bs(347.5,540,0)
+bs(352.5,540,0)
+bs(352.5,535,0)
+bs(349.808,535,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,595,0)
+bs(347.5,595,0)
+bs(347.5,600,0)
+bs(352.5,600,0)
+bs(352.5,595,0)
+bs(349.808,595,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(206.165,512.5,0)
+bs(62.5,512.5,0)
+bs(62.5,515,0)
+bs(350,515,0)
+bs(350,512.5,0)
+bs(206.165,512.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(246.188,572.5,0)
+bs(142.5,572.5,0)
+bs(142.5,575,0)
+bs(350,575,0)
+bs(350,572.5,0)
+bs(246.188,572.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(351.249,515,0)
+bs(350,515,0)
+bs(350,537.5,0)
+bs(352.5,537.5,0)
+bs(352.5,515,0)
+bs(351.249,515,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(351.249,575,0)
+bs(350,575,0)
+bs(350,597.5,0)
+bs(352.5,597.5,0)
+bs(352.5,575,0)
+bs(351.249,575,0)
+fp((0.503,0.503,0.503))
+r(290,0,0,-25,60,540)
+fp((0.503,0.503,0.503))
+r(210,0,0,-25,140,600)
+fp((0.337,0.357,1))
+b()
+bs(60,735,0)
+bs(140,735,0)
+bs(140,790,0)
+bs(60,790,0)
+bs(60,735,0)
+bC()
+fp((0.651,0.808,0.224))
+b()
+bs(60,645,0)
+bs(170,645,0)
+bs(170,700,0)
+bs(60,700,0)
+bs(60,645,0)
+bC()
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Application',(70.654,759.434))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Framebuffer',(172.5,523.884))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Acceleration Hardware',(184.316,583.884))
+G()
+fp((0,0,0))
+Fn('Helvetica')
+txt('Qt for',(99.994,676.242))
+fp((0,0,0))
+Fn('Helvetica')
+txt('Embedded Linux',(69.976,662.626))
+G_()
+fp((0,0,0))
+Fn('Helvetica')
+txt('Acceleration Plugin',(226.146,669.434))
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(100,735,0)
+bs(100,702.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(115,645,0)
+bs(115,542.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(280,645,0)
+bs(280,602.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(170,682.5,0)
+bs(212.5,682.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(215,662.5,0)
+bs(172.5,662.5,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qt-embedded-opengl2.sk b/doc/src/diagrams/qtopiacore/qt-embedded-opengl2.sk
new file mode 100644
index 0000000..531a34c
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qt-embedded-opengl2.sk
@@ -0,0 +1,592 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(227.308,642.5,0)
+bs(225,642.5,0)
+bs(225,647.5,0)
+bs(230,647.5,0)
+bs(230,642.5,0)
+bs(227.308,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(269.808,547.5,0)
+bs(267.5,547.5,0)
+bs(267.5,552.5,0)
+bs(272.5,552.5,0)
+bs(272.5,547.5,0)
+bs(269.808,547.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,547.5,0)
+bs(60,547.5,0)
+bs(60,552.5,0)
+bs(65,552.5,0)
+bs(65,547.5,0)
+bs(62.308,547.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,642.5,0)
+bs(347.5,642.5,0)
+bs(347.5,647.5,0)
+bs(352.5,647.5,0)
+bs(352.5,642.5,0)
+bs(349.808,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(339.808,547.5,0)
+bs(337.5,547.5,0)
+bs(337.5,552.5,0)
+bs(342.5,552.5,0)
+bs(342.5,547.5,0)
+bs(339.808,547.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(244.808,547.5,0)
+bs(242.5,547.5,0)
+bs(242.5,552.5,0)
+bs(247.5,552.5,0)
+bs(247.5,547.5,0)
+bs(244.808,547.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(288.714,642.5,0)
+bs(227.5,642.5,0)
+bs(227.5,645,0)
+bs(350,645,0)
+bs(350,642.5,0)
+bs(288.714,642.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(304.979,547.5,0)
+bs(270,547.5,0)
+bs(270,550,0)
+bs(340,550,0)
+bs(340,547.5,0)
+bs(304.979,547.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(153.696,547.5,0)
+bs(62.5,547.5,0)
+bs(62.5,550,0)
+bs(245,550,0)
+bs(245,547.5,0)
+bs(153.696,547.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,695,0)
+bs(347.5,695,0)
+bs(347.5,700,0)
+bs(352.5,700,0)
+bs(352.5,695,0)
+bs(349.808,695,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(339.808,595,0)
+bs(337.5,595,0)
+bs(337.5,600,0)
+bs(342.5,600,0)
+bs(342.5,595,0)
+bs(339.808,595,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(244.808,595,0)
+bs(242.5,595,0)
+bs(242.5,600,0)
+bs(247.5,600,0)
+bs(247.5,595,0)
+bs(244.808,595,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(351.249,645,0)
+bs(350,645,0)
+bs(350,697.5,0)
+bs(352.5,697.5,0)
+bs(352.5,645,0)
+bs(351.249,645,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(341.249,550,0)
+bs(340,550,0)
+bs(340,597.5,0)
+bs(342.5,597.5,0)
+bs(342.5,550,0)
+bs(341.249,550,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(246.249,550,0)
+bs(245,550,0)
+bs(245,597.5,0)
+bs(247.5,597.5,0)
+bs(247.5,550,0)
+bs(246.249,550,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(189.808,642.5,0)
+bs(187.5,642.5,0)
+bs(187.5,647.5,0)
+bs(192.5,647.5,0)
+bs(192.5,642.5,0)
+bs(189.808,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,432.5,0)
+bs(347.5,432.5,0)
+bs(347.5,437.5,0)
+bs(352.5,437.5,0)
+bs(352.5,432.5,0)
+bs(349.808,432.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(309.808,482.5,0)
+bs(307.5,482.5,0)
+bs(307.5,487.5,0)
+bs(312.5,487.5,0)
+bs(312.5,482.5,0)
+bs(309.808,482.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,432.5,0)
+bs(60,432.5,0)
+bs(60,437.5,0)
+bs(65,437.5,0)
+bs(65,432.5,0)
+bs(62.308,432.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(102.308,482.5,0)
+bs(100,482.5,0)
+bs(100,487.5,0)
+bs(105,487.5,0)
+bs(105,482.5,0)
+bs(102.308,482.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(139.808,732.5,0)
+bs(137.5,732.5,0)
+bs(137.5,737.5,0)
+bs(142.5,737.5,0)
+bs(142.5,732.5,0)
+bs(139.808,732.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(189.808,695,0)
+bs(187.5,695,0)
+bs(187.5,700,0)
+bs(192.5,700,0)
+bs(192.5,695,0)
+bs(189.808,695,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(139.808,785,0)
+bs(137.5,785,0)
+bs(137.5,790,0)
+bs(142.5,790,0)
+bs(142.5,785,0)
+bs(139.808,785,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(191.249,645,0)
+bs(190,645,0)
+bs(190,697.5,0)
+bs(192.5,697.5,0)
+bs(192.5,645,0)
+bs(191.249,645,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(141.249,735,0)
+bs(140,735,0)
+bs(140,787.5,0)
+bs(142.5,787.5,0)
+bs(142.5,735,0)
+bs(141.249,735,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(82.308,642.5,0)
+bs(80,642.5,0)
+bs(80,647.5,0)
+bs(85,647.5,0)
+bs(85,642.5,0)
+bs(82.308,642.5,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(62.308,732.5,0)
+bs(60,732.5,0)
+bs(60,737.5,0)
+bs(65,737.5,0)
+bs(65,732.5,0)
+bs(62.308,732.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(136.218,642.5,0)
+bs(82.5,642.5,0)
+bs(82.5,645,0)
+bs(190,645,0)
+bs(190,642.5,0)
+bs(136.218,642.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(101.227,732.5,0)
+bs(62.5,732.5,0)
+bs(62.5,735,0)
+bs(140,735,0)
+bs(140,732.5,0)
+bs(101.227,732.5,0)
+fp((0.651,0.808,0.224))
+b()
+bs(225,645,0)
+bs(350,645,0)
+bs(350,700,0)
+bs(225,700,0)
+bs(225,645,0)
+bC()
+fp((0.965,0.522,0.439))
+b()
+bs(267.5,550,0)
+bs(340,550,0)
+bs(340,600,0)
+bs(267.5,600,0)
+bs(267.5,550,0)
+bC()
+fp((0.965,0.522,0.439))
+b()
+bs(60,550,0)
+bs(245,550,0)
+bs(245,600,0)
+bs(60,600,0)
+bs(60,550,0)
+bC()
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(349.808,455,0)
+bs(347.5,455,0)
+bs(347.5,460,0)
+bs(352.5,460,0)
+bs(352.5,455,0)
+bs(349.808,455,0)
+gl([(0,(1,1,1)),(0.29,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgr(0.5,0.5,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(309.808,505,0)
+bs(307.5,505,0)
+bs(307.5,510,0)
+bs(312.5,510,0)
+bs(312.5,505,0)
+bs(309.808,505,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(206.165,432.5,0)
+bs(62.5,432.5,0)
+bs(62.5,435,0)
+bs(350,435,0)
+bs(350,432.5,0)
+bs(206.165,432.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(0,-1,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(206.188,482.5,0)
+bs(102.5,482.5,0)
+bs(102.5,485,0)
+bs(310,485,0)
+bs(310,482.5,0)
+bs(206.188,482.5,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(351.249,435,0)
+bs(350,435,0)
+bs(350,457.5,0)
+bs(352.5,457.5,0)
+bs(352.5,435,0)
+bs(351.249,435,0)
+gl([(0,(1,1,1)),(1,(0.396,0.396,0.396))])
+pgl(1,0,0)
+fp()
+le()
+lw(1)
+lj(1)
+b()
+bs(311.249,485,0)
+bs(310,485,0)
+bs(310,507.5,0)
+bs(312.5,507.5,0)
+bs(312.5,485,0)
+bs(311.249,485,0)
+fp((0.503,0.503,0.503))
+r(290,0,0,-25,60,460)
+fp((0.503,0.503,0.503))
+r(210,0,0,-25,100,510)
+fp((0.337,0.357,1))
+b()
+bs(60,735,0)
+bs(140,735,0)
+bs(140,790,0)
+bs(60,790,0)
+bs(60,735,0)
+bC()
+fp((0.651,0.808,0.224))
+b()
+bs(80,645,0)
+bs(190,645,0)
+bs(190,700,0)
+bs(80,700,0)
+bs(80,645,0)
+bC()
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Application',(70.654,759.434))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Framebuffer',(172.5,443.884))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Acceleration Hardware',(144.316,493.884))
+G()
+fp((0,0,0))
+Fn('Helvetica')
+txt('Qt for',(119.994,676.242))
+fp((0,0,0))
+Fn('Helvetica')
+txt('Embedded Linux',(89.976,662.626))
+G_()
+fp((0,0,0))
+Fn('Helvetica')
+txt('EGL',(291.744,571.384))
+fp((0,0,0))
+Fn('Helvetica')
+txt('OpenGL ES',(120.148,571.384))
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(100,735,0)
+bs(100,702.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(70,735,0)
+bs(70,602.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(137.5,645,0)
+bs(137.5,602.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(80,550,0)
+bs(80,462.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(325,550,0)
+bs(325,462.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(150,550,0)
+bs(150,512.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(290,550,0)
+bs(290,512.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(305,645,0)
+bs(305,602.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(190,682.5,0)
+bs(222.5,682.5,0)
+lw(1.25)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(225,662.5,0)
+bs(192.5,662.5,0)
+G()
+fp((0,0,0))
+Fn('Helvetica')
+txt('Reference',(259.822,676.384))
+fp((0,0,0))
+Fn('Helvetica')
+txt('Implementation',(246.484,662.768))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-accelerateddriver.sk b/doc/src/diagrams/qtopiacore/qtopiacore-accelerateddriver.sk
new file mode 100644
index 0000000..d2b5c18
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-accelerateddriver.sk
@@ -0,0 +1,70 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+lw(1)
+ld((4, 4))
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(243.103,720,0)
+bc(243.103,720,312.371,742.5,243.103,780,2)
+lw(1)
+ld((4, 4))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(225.786,720,0)
+bc(225.786,720,156.518,742.5,225.786,780,2)
+G_()
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,15,770)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Client Application',(32.3,746.934))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,170,820)
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,170,720)
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-20,170,760)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,325,770)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Paint Engine',(200.98,796.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Widget',(216.328,746.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Paint Device',(201.322,696.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Window Surface',(346.32,746.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(145,750,0)
+bs(170,750,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(300,750,0)
+bs(325,750,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-architecture-emb.svg b/doc/src/diagrams/qtopiacore/qtopiacore-architecture-emb.svg
new file mode 100644
index 0000000..5f4d889
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-architecture-emb.svg
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="285.482"
+ height="140.482"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.42"
+ sodipodi:docname="architecture-emb.svg"
+ sodipodi:docbase="/home/dboddie/dev/whitepapers/qtopia-core/diagrams">
+ <metadata
+ id="metadata88">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ inkscape:window-height="574"
+ inkscape:window-width="924"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="true"
+ inkscape:grid-points="true"
+ inkscape:zoom="2.1612571"
+ inkscape:cx="142.74100"
+ inkscape:cy="70.240997"
+ inkscape:window-x="61"
+ inkscape:window-y="164"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <marker
+ id="ArrowEnd"
+ viewBox="0 0 10 10"
+ refX="0"
+ refY="5"
+ markerUnits="strokeWidth"
+ markerWidth="4"
+ markerHeight="3"
+ orient="auto">
+ <path
+ d="M 0 0 L 10 5 L 0 10 z"
+ id="path7" />
+ </marker>
+ <marker
+ id="ArrowStart"
+ viewBox="0 0 10 10"
+ refX="10"
+ refY="5"
+ markerUnits="strokeWidth"
+ markerWidth="4"
+ markerHeight="3"
+ orient="auto">
+ <path
+ d="M 10 0 L 0 5 L 10 10 z"
+ id="path10" />
+ </marker>
+ </defs>
+ <g
+ id="g12">
+ <defs
+ id="defs14">
+ <linearGradient
+ id="1"
+ x1="142.741"
+ y1="140.482"
+ x2="142.741"
+ y2="100"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop17" />
+ <stop
+ offset="1"
+ style="stop-color:#5c5c5c"
+ id="stop19" />
+ </linearGradient>
+ </defs>
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:url(#1)"
+ d="M 5.24084 105.241L 280.241 105.241L 280.241 135.241L 5.24084 135.241L 5.24084 105.241z"
+ id="path21" />
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#ffffff"
+ d="M 5.24084 25.2408L 280.241 25.2408L 280.241 5.24084L 5.24084 5.24084L 5.24084 25.2408z"
+ id="path23" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#cccccc"
+ d="M 280.141 9.44084L 280.741 9.44084L 280.741 8.84085L 280.141 8.84085L 280.141 9.44084z"
+ id="path25" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#cccccc"
+ d="M 280.141 28.6408L 280.741 28.6408L 280.741 28.0408L 280.141 28.0408L 280.141 28.6408z"
+ id="path27" />
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#cccccc"
+ d="M 5.24084 45.2408L 280.241 45.2408L 280.241 25.2408L 5.24084 25.2408L 5.24084 45.2408z"
+ id="path29" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#cccccc"
+ d="M 280.141 47.8408L 280.741 47.8408L 280.741 47.2408L 280.141 47.2408L 280.141 47.8408z"
+ id="path31" />
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#a6ce39"
+ d="M 145.241 65.2408L 280.241 65.2408L 280.241 45.2408L 145.241 45.2408L 145.241 65.2408z"
+ id="path33" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#cccccc"
+ d="M 141.991 66.4407L 142.591 66.4407L 142.591 47.2408L 141.991 47.2408L 141.991 66.4407z"
+ id="path35" />
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#7f7f7f"
+ d="M 145.241 85.2408L 280.241 85.2408L 280.241 65.2408L 145.241 65.2408L 145.241 85.2408z"
+ id="path37" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#cccccc"
+ d="M 141.991 85.6406L 142.591 85.6406L 142.591 66.4407L 141.991 66.4407L 141.991 85.6406z"
+ id="path39" />
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#a6ce39"
+ d="M 5.24084 105.241L 145.241 105.241L 145.241 45.2408L 5.24084 45.2408L 5.24084 105.241z"
+ id="path41" />
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 42.8948 78.8568)"
+ id="text43">
+Qtopia Core
+</text>
+ <path
+ style="stroke:#000000; stroke-width:1; fill-rule:evenodd; fill:#7f7f7f"
+ d="M 145.241 105.241L 280.241 105.241L 280.241 85.2408L 145.241 85.2408L 145.241 105.241z"
+ id="path45" />
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#000000; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 76.7108 18.8568)"
+ id="text47">
+Application Source Code
+</text>
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#000000; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 125.065 38.8568)"
+ id="text49">
+Qt API
+</text>
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 194.063 60.2408)"
+ id="text51">
+Qt/X11
+</text>
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 202.739 80.2408)"
+ id="text53">
+Xlib
+</text>
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 166.397 98.8568)"
+ id="text55">
+X Window Server
+</text>
+ <defs
+ id="defs57">
+ <linearGradient
+ id="2"
+ x1="147.741"
+ y1="130.241"
+ x2="147.741"
+ y2="110.241"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#3f3f3f"
+ id="stop60" />
+ <stop
+ offset="1"
+ style="stop-color:#5c5c5c"
+ id="stop62" />
+ </linearGradient>
+ </defs>
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:url(#2)"
+ d="M 100.241 130.241L 110.241 110.241L 195.241 110.241L 185.241 130.241L 100.241 130.241z"
+ id="path64" />
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:#c82121"
+ d="M 185.241 130.241L 195.241 110.241L 275.241 110.241L 275.241 130.241L 185.241 130.241z"
+ id="path66" />
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 115.241 123.857)"
+ id="text68">
+Framebuffer
+</text>
+ <defs
+ id="defs70">
+ <linearGradient
+ id="3"
+ x1="57.7408"
+ y1="130.241"
+ x2="57.7408"
+ y2="110.241"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#3f3f3f"
+ id="stop73" />
+ <stop
+ offset="1"
+ style="stop-color:#5c5c5c"
+ id="stop75" />
+ </linearGradient>
+ </defs>
+ <path
+ style="stroke:none; fill-rule:evenodd; fill:url(#3)"
+ d="M 10.2408 130.241L 10.2408 110.241L 105.241 110.241L 94.6852 130.241L 10.2408 130.241z"
+ id="path77" />
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:12.0"
+ transform="matrix(1 0 0 1 20.2408 123.857)"
+ id="text79">
+Linux Kernel
+</text>
+ <g
+ id="g81">
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:8"
+ transform="matrix(1 0 0 1 213.001 118.485)"
+ id="text83">
+Accelerated
+</text>
+ <text
+ style="stroke:none; fill-rule:evenodd; fill:#ffffff; font-family:FreeSans; font-size:8"
+ transform="matrix(1 0 0 1 218.117 127.641)"
+ id="text85">
+Graphics
+</text>
+ </g>
+ </g>
+</svg>
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-architecture.sk b/doc/src/diagrams/qtopiacore/qtopiacore-architecture.sk
new file mode 100644
index 0000000..e670eac
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-architecture.sk
@@ -0,0 +1,136 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(-1228916532,'clamshell-phone.png')
+im((17,498),-1228916532)
+fp((1,1,1))
+ft(0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(130,0,0,-40,364.61,761.65)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,204.942,761.65)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(236.27,738.584))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Memory',(504.551,724.079))
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,395.562,756.65)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,445.086,756.65)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,420.324,756.65)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,370.8,756.65)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,469.848,756.65)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(427.452,816.049))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,430.124,820.297)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(322.628,699.078))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,325.3,703.826)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(178.299,751.825))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,181.299,755.709)
+G_()
+lw(1)
+b()
+bs(276.959,770.65,0)
+bc(276.959,770.65,86.959,790.65,346.959,810.65,2)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(412.959,771.65,0)
+bc(412.959,771.65,602.959,791.65,342.959,811.65,2)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,289.177,829.533)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Client',(322.839,808.584))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(339.942,741.65,0)
+bs(358.589,741.65,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(166.646,741.65,0)
+bs(199.058,741.65,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(385,713,0)
+bs(385,695,0)
+le()
+lw(1)
+r(540.005,0,0,-59.2946,10.1647,575.005)
+G()
+fp((0.688,0.839,0.475))
+lw(1)
+r(15,0,0,-15,453.816,561.299)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Server side',(475.472,550.733))
+fp((0.636,0.839,0.81))
+lw(1)
+r(15,0,0,-15,453.816,541.299)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Client side',(475.472,530.733))
+G_()
+bm(-1229576468,'home-screen.png')
+im((295,560),-1229576468)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-characterinputlayer.sk b/doc/src/diagrams/qtopiacore/qtopiacore-characterinputlayer.sk
new file mode 100644
index 0000000..bcf52bb
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-characterinputlayer.sk
@@ -0,0 +1,118 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(264.98,607,0)
+bc(264.98,607,364.98,652,264.98,727,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,194.98,772)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(226.308,748.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(239.98,607,0)
+bc(239.98,607,139.98,652,239.98,727,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,194.98,602)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Keyboard Handler',(211.626,578.934))
+fp((0.812,0.906,0.651))
+lw(1)
+r(135,0,0,-20,260,667)
+fp((0.812,0.906,0.651))
+lw(1)
+r(135,0,0,-20,260,692)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Key pressed!',(29.968,564.616))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Start application',(357.968,747.616))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Keyboard Driver Factory',(263.809,653.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Keyboard Driver Plugin',(265.814,678.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(149.506,582,0)
+bs(189.98,582,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(351.454,752,0)
+bs(329.98,752,0)
+fp((1,1,1))
+lw(1)
+r(65,0,0,-45,164.98,692)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWSEvent',(167.804,665.684))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(32.3079,0,0,-32.0833,90,632,0.0416667,0.0555556)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(32.3079,0,0,-32.0833,108.846,594.083,0.0416667,0.0555556)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(32.3079,0,0,-32.0833,127.692,632,0.0416667,0.0555556)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(26.9232,0,0,-26.25,92.6923,629.083,0.05,0.0714286)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(26.9232,0,0,-26.25,111.538,591.167,0.05,0.0714286)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(26.9232,0,0,-26.25,130.384,629.083,0.05,0.0714286)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(36)
+txt('J',(0.666667,0,0,0.666667,100,607.837))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(36)
+txt('GO!',(0.666667,0,0,0.666667,450.984,745.232))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(36)
+txt('M',(0.666667,0,0,0.666667,115,569.504))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(36)
+txt('K',(0.666667,0,0,0.666667,133.992,607.232))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-client.sk b/doc/src/diagrams/qtopiacore/qtopiacore-client.sk
new file mode 100644
index 0000000..e339a63
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-client.sk
@@ -0,0 +1,51 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.688,0.839,0.475))
+lw(1)
+r(85,0,0,-40,9.99982,795)
+fp((0.636,0.839,0.81))
+lw(1)
+r(90,0,0,-40,135,795)
+fp((0.636,0.839,0.81))
+lw(1)
+r(90,0,0,-40,265,795)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWSServer',(20.4958,771.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWSClient',(150.33,771.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('UNIX Domain Socket',(191.636,687.616))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QApplication',(274.318,771.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(94.526,775,0)
+bs(135,775,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(224.526,775,0)
+bs(265,775,0)
+lw(1)
+ld((5, 5))
+b()
+bs(245,835,0)
+bs(245,705,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-clientrendering.sk b/doc/src/diagrams/qtopiacore/qtopiacore-clientrendering.sk
new file mode 100644
index 0000000..b37c5a6
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-clientrendering.sk
@@ -0,0 +1,166 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+fp((1,1,1))
+ft(0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(130,0,0,-40,264,675)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Memory',(351,620.252))
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,294.952,670)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,344.476,670)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,319.714,670)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,270.19,670)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,369.238,670)
+G_()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(393.5,734,0)
+bc(393.5,734,681.5,699.384,393.5,659,2)
+lw(1)
+b()
+bs(332.018,759,0)
+bc(332.018,759,142.018,779,402.018,799,2)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(468.018,760,0)
+bc(468.018,760,658.018,780,398.018,800,2)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,264,749.636)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(270.328,691.752))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,273,696)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(412.328,641.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,415,646)
+G_()
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,99,748.939)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(130.328,725.873))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Client Application',(281.3,726.57))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-21,334,829)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Decoration Plugin',(351.648,815.434))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-21,334,800)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Decoration Factory',(348.318,786.434))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,414,749.636)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Decoration',(449.99,726.57))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Something happened!',(1,682.116))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(69,729,0)
+bs(94,729,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(228.526,719,0)
+bs(264,719,0)
+lw(1)
+ld((4, 4))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(264,734,0)
+bs(228.526,734,0)
+G()
+lw(1)
+b()
+bs(43.5002,769.5,0)
+bs(43.5002,769.5,0)
+bs(68.5,769.5,0)
+bs(58.5,719.5,0)
+bs(53.5,719.5,0)
+bs(43.5002,769.5,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(7.5,0,0,-7.5,56,707)
+G_()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(334,709,0)
+bs(334,679,0)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(108.164,757.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,111,762)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-clientservercommunication.sk b/doc/src/diagrams/qtopiacore/qtopiacore-clientservercommunication.sk
new file mode 100644
index 0000000..4f8bcb6
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-clientservercommunication.sk
@@ -0,0 +1,130 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(236.982,752,0)
+bc(236.982,752,46.9824,772,306.982,792,2)
+lw(1)
+ld((5, 5))
+b()
+bs(236.982,704,0)
+bc(236.982,704,46.9824,684,306.982,664,2)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(372.982,753,0)
+bc(372.982,753,562.982,773,302.982,793,2)
+lw(1)
+ld((5, 5))
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(372.982,703,0)
+bc(372.982,703,562.982,683,302.982,663,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,130,748)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,350,748)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(161.328,724.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Something happened!',(10,679.252))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Client',(383.662,724.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Top-level Windows',(380,795.616))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(265,728,0)
+bs(345,728,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(90,728,0)
+bs(125,728,0)
+G()
+lw(1)
+b()
+bs(55,768,0)
+bs(55,768,0)
+bs(80,768,0)
+bs(70,718,0)
+bs(65,718,0)
+bs(55,768,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(7.5,0,0,-7.5,67.5,705.5)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(102,740.116))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,105,744)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(202.328,793.752))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,205,798)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(277.328,739.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,280,744)
+G_()
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,-18,240,673)
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,-18,240,698)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Input Method Filter',(254.65,684.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Keyboard Filter',(263.32,658.934))
+fp((0.887,0.946,0.764))
+lw(1)
+r(130,0,0,40,225,788)
+fp((0.887,0.946,0.764))
+lw(1)
+r(130,0,0,40,235,778)
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,40,245,768)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-drawingonscreen.sk b/doc/src/diagrams/qtopiacore/qtopiacore-drawingonscreen.sk
new file mode 100644
index 0000000..58d7c28
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-drawingonscreen.sk
@@ -0,0 +1,144 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(117.018,750,0)
+bc(117.018,750,-72.9824,770,187.018,790,2)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(253.018,751,0)
+bc(253.018,751,443.018,771,183.018,791,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(-130,0,0,-40,335,740)
+fp((0.772,0.913,0.89))
+lw(1)
+r(-130,0,0,-40,510,740)
+fp((0.688,0.839,0.475))
+lw(1)
+r(-130,0,0,-40,160,740)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Screen Driver',(233.328,716.934))
+fp((0.812,0.906,0.651))
+lw(1)
+r(-130,0,0,-21,245,817.232)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Screen Plugin',(142.65,803.484))
+fp((0.812,0.906,0.651))
+lw(1)
+r(-130,0,0,-21,245,791)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Screen Factory',(139.32,777.434))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(61.328,716.934))
+fp((1,1,1))
+ft(0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(130,0,0,-40,380,670)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Memory',(465,611.252))
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,410.952,665)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,460.476,665)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,435.714,665)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,386.19,665)
+phs((0.349,0.349,0.349),(1,1,1),1,0,5,0.5)
+fp()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(18.5714,0,0,-30,485.238,665)
+le()
+lw(1)
+r(530,0,0,-270,10,830)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(160,720,0)
+bs(205,720,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(335,720,0)
+bs(380,720,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(380,650,0)
+bs(335,650,0)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(354.828,735.752))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,357.5,740)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(354.828,660.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,357.5,665)
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(181.862,735.939))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,185,740)
+G_()
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('Window Surface',(401.32,716.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(450,700,0)
+bs(450,670,0)
+bm(-1229773172,'launcher.png')
+im((0.35,0,0,0.35,241,573),-1229773172)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-opengl.sk b/doc/src/diagrams/qtopiacore/qtopiacore-opengl.sk
new file mode 100644
index 0000000..96076ed
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-opengl.sk
@@ -0,0 +1,38 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.704,0.775,0.846))
+le()
+lw(1)
+e(100,0,0,-32.5,175,795)
+fp((0.545,0.819,0.302))
+le()
+lw(1)
+r(120,0,0,-30,210,780)
+fp((0.545,0.819,0.302))
+le()
+lw(1)
+r(120,0,0,-30,15,780)
+fp((0.309,0.309,0.309))
+le()
+lw(1)
+Fn('Helvetica')
+txt('OpenGL',(52.32,761.934))
+fp((0.309,0.309,0.309))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Q Window System',(220.656,761.934))
+fp((0.369,0.369,0.369))
+le()
+lw(1)
+Fn('Helvetica')
+txt('EGL',(160.988,807.616))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(Native Platform Graphics Interface)',(79.306,791.934))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-pointerhandlinglayer.sk b/doc/src/diagrams/qtopiacore/qtopiacore-pointerhandlinglayer.sk
new file mode 100644
index 0000000..8d38864
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-pointerhandlinglayer.sk
@@ -0,0 +1,94 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,625,0)
+bc(250,625,350,670,250,745,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,180,790)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(211.328,766.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(225,625,0)
+bc(225,625,125,670,225,745,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,180,620)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Mouse Handler',(204.32,596.934))
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,-20,245,685)
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,-20,245,710)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Pointer pressed!',(22.592,582.616))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Mouse Driver Factory',(252.658,671.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Mouse Driver Plugin',(255.988,696.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(134.526,600,0)
+bs(175,600,0)
+fp((1,1,1))
+lw(1)
+r(65,0,0,-43.5,150,708.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWSEvent',(152.824,683.684))
+lw(1)
+lc(2)
+lj(1)
+b()
+bs(95,595,0)
+bs(105,605,0)
+bs(125,580,0)
+bs(135,590,0)
+bs(115,615,0)
+bs(125,625,0)
+bs(95,625,0)
+bs(95,595,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Start application',(343.039,762.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(336.525,766.636,0)
+bs(315.051,766.636,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(36)
+txt('GO!',(0.666667,0,0,0.666667,440,760))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-reserveregion.sk b/doc/src/diagrams/qtopiacore/qtopiacore-reserveregion.sk
new file mode 100644
index 0000000..04f9c99
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-reserveregion.sk
@@ -0,0 +1,89 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+e(10,0,0,-10,365,625)
+fp((1,1,1))
+lw(1)
+e(10,0,0,-10,195,630)
+fp((1,1,1))
+lw(1)
+e(10,0,0,-10,235,755)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(171.344,700,0)
+bc(171.344,700,25.7042,670,225,640,2)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(403.656,700,0)
+bc(403.656,700,549.296,670,350,640,2)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,150,740)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('2',(232.328,750.752))
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,150,810)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(181.328,786.934))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('Client Application',(168.65,716.934))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,45,660)
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,305,740)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('Direct Painter',(73.658,636.934))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('Widget',(351.328,716.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(280,720,0)
+bs(300,720,0)
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('1',(191.862,625.939))
+fp((0,0,0))
+lw(1)
+Fn('Helvetica')
+txt('3',(362.328,620.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(215,770,0)
+bs(215,767.272,0)
+bs(215,740,0)
+lw(1)
+ld((5, 5))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(205,740,0)
+bs(205,742.728,0)
+bs(205,770,0)
+le()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(440,0,0,-260,30,820)
+bm(-1229732052,'launcher.png')
+im((0.45,0,0,0.45,232,541),-1229732052)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-setwindowattribute.sk b/doc/src/diagrams/qtopiacore/qtopiacore-setwindowattribute.sk
new file mode 100644
index 0000000..78d705d
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-setwindowattribute.sk
@@ -0,0 +1,102 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,430,725)
+fp((1,1,1))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,340,810)
+fp((1,1,1))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,140,760)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(228.165,800,0)
+bc(228.165,800,91.5416,775,278.5,750,2)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,195,820)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('2',(337.328,805.752))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(277.328,720.252))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(10,0,0,-10,280,725)
+G_()
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,20,820)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QWS Server',(51.328,796.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Client Application',(213.65,796.934))
+fp((0.772,0.913,0.89))
+lw(1)
+r(130,0,0,-40,280,770)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Widget',(326.328,746.934))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(150,800,0)
+bs(193.765,800,0)
+lw(1)
+ld((4, 4))
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(187.882,810,0)
+bs(151.235,810,0)
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(420,745,0)
+bs(445,745,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('1',(136.862,755.939))
+fp((1,1,1))
+lw(1)
+r(95,0,0,-25,240,740)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Paint On Screen',(243.478,724.434))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('3',(427.328,720.252))
+le()
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+r(570,0,0,-140,10,830)
+bm(-1229691508,'launcher.png')
+im((0.35,0,0,0.35,455,713),-1229691508)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtopiacore/qtopiacore-vanilla.sk b/doc/src/diagrams/qtopiacore/qtopiacore-vanilla.sk
new file mode 100644
index 0000000..73a9937
--- /dev/null
+++ b/doc/src/diagrams/qtopiacore/qtopiacore-vanilla.sk
@@ -0,0 +1,43 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.545,0.819,0.302))
+le()
+lw(1)
+r(370,0,0,-65,20,795)
+fp((0.309,0.309,0.309))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Q Window System',(286.312,737.616))
+fp((0.467,0.555,0.644))
+le()
+lw(1)
+e(150,0,0,-37.5,200,795)
+fp((0.704,0.775,0.846))
+le()
+lw(1)
+e(92.5,0,0,-25,167.5,800)
+fp((0.369,0.369,0.369))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Vanilla EGL Implementation',(101.272,800.626))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(Hybrid Graphics Ltd.)',(115,787.616))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qtopia Core',(265,800.626))
+fp((1,1,1))
+le()
+lw(1)
+Fn('Helvetica')
+txt('interface',(274.336,787.616))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qtreeview.png b/doc/src/diagrams/qtreeview.png
new file mode 100644
index 0000000..05a70bf
--- /dev/null
+++ b/doc/src/diagrams/qtreeview.png
Binary files differ
diff --git a/doc/src/diagrams/qtscript-calculator.png b/doc/src/diagrams/qtscript-calculator.png
new file mode 100644
index 0000000..9ab824f
--- /dev/null
+++ b/doc/src/diagrams/qtscript-calculator.png
Binary files differ
diff --git a/doc/src/diagrams/qtscript-context2d.png b/doc/src/diagrams/qtscript-context2d.png
new file mode 100644
index 0000000..d3ad995
--- /dev/null
+++ b/doc/src/diagrams/qtscript-context2d.png
Binary files differ
diff --git a/doc/src/diagrams/qtwizard-page.sk b/doc/src/diagrams/qtwizard-page.sk
new file mode 100644
index 0000000..bd7b9ef
--- /dev/null
+++ b/doc/src/diagrams/qtwizard-page.sk
@@ -0,0 +1,144 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(1089094028,'/tmp/wizard2.png')
+im((-71.3622,789.945),1089094028)
+bm(1083700940,'qtwizard-page.png')
+im((45.535,207.627),1083700940)
+lp((1,0,0))
+lw(1.5)
+r(158.372,0,0,-22.6246,57.6554,643.69,0.0680272,0.487805)
+lp((1,0,0))
+lw(1.5)
+r(165.372,0,0,-22.6246,131.655,1241.69,0.0680272,0.487805)
+lp((1,0,0))
+lw(1.5)
+r(384.08,0,0,-39.8624,72.5035,624.062,0.0680272,0.487805)
+lp((1,0,0))
+lw(1.5)
+r(419.371,0,0,-39.8624,141.212,1197.06,0.0680272,0.487805)
+fp((1,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('title',(-19.9279,627.778))
+fp((1,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('title',(-111.95,1225.78))
+fp((0.064,0.45,0.228))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('banner',(587.072,627.778))
+fp((0.064,0.45,0.228))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('logo',(587.072,601.278))
+fp((1,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('subtitle',(-51.9319,599.532))
+fp((1,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('subtitle',(1.06195,0,0,1,-147.919,1172.53))
+lp((0.064,0.45,0.228))
+lw(1.5)
+r(61.1473,0,0,-57.6388,476.211,642.073,0.123333,0.130841)
+lp((0.064,0.45,0.228))
+lw(1.5)
+r(494.509,0,0,-69.4899,52.5723,647.764,0.0217865,0.155038)
+lp((1,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(18.3317,632.377,0)
+bs(55.5006,632.377,0)
+bs(55.5006,632.377,0)
+bs(55.5006,632.377,0)
+lp((1,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-67.6683,1230.38,0)
+bs(129.501,1230.38,0)
+bs(129.501,1230.38,0)
+bs(129.501,1230.38,0)
+lp((0.064,0.45,0.228))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(577.821,632.377,0)
+bs(549.809,632.377,0)
+lp((0.064,0.45,0.228))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(577.821,605.877,0)
+bs(539.809,605.877,0)
+lp((1,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(19.1741,604.131,0)
+bs(69.8101,604.131,0)
+bs(69.8101,604.131,0)
+bs(69.8101,604.131,0)
+lp((1,0,0))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-66.9213,1177.13,0)
+bs(135.351,1177.13,0)
+bs(135.351,1177.13,0)
+bs(135.351,1177.13,0)
+G()
+fp((0.064,0.45,0.228))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('watermark',(-77.9599,415.278))
+lp((0.064,0.45,0.228))
+lw(1.5)
+r(162.143,0,0,-304.355,52.3374,571.575,0.0664452,0.0353982)
+lp((0.064,0.45,0.228))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(19.8675,419.877,0)
+bs(49.8789,419.877,0)
+bs(49.8789,419.877,0)
+bs(49.8789,419.877,0)
+G_()
+fp((0.064,0.45,0.228))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+Fs(18)
+txt('background',(-182.96,1038.55))
+lp((0.064,0.45,0.228))
+lw(1.5)
+r(239.143,0,0,-345.855,-34.1627,1216.07,0.0664452,0.0353982)
+lp((0.064,0.45,0.228))
+lw(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-66.6325,1043.15,0)
+bs(-36.6211,1043.15,0)
+bs(-36.6211,1043.15,0)
+bs(-36.6211,1043.15,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,10000,10000),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/qwsserver_keyboardfilter.sk b/doc/src/diagrams/qwsserver_keyboardfilter.sk
new file mode 100644
index 0000000..3ac0f80
--- /dev/null
+++ b/doc/src/diagrams/qwsserver_keyboardfilter.sk
@@ -0,0 +1,39 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(1)
+b()
+bs(78.195,794,0)
+bc(78.195,794,-115.245,809.5,149.463,825,2)
+lw(1)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(216.804,795,0)
+bc(216.804,795,410.246,810,145.537,825,2)
+fp((0.688,0.839,0.475))
+lw(1)
+r(130,0,0,-40,10,790)
+fp((0.636,0.839,0.81))
+lw(1)
+r(130,0,0,-40,155,790)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qtopia Core Server',(23.316,766.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Qtopia Core Client',(170.65,766.934))
+fp((0.812,0.906,0.651))
+lw(1)
+r(130,0,0,-18,80,830)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Keyboard Filter',(103.32,815.934))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/resources.sk b/doc/src/diagrams/resources.sk
new file mode 100644
index 0000000..a679205
--- /dev/null
+++ b/doc/src/diagrams/resources.sk
@@ -0,0 +1,125 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lw(5)
+la2(([(-6.0, 3.0), (-5.0, 0.0, 0.0, 0.0, 1.0, 0.0), (0.0, 0.0, -5.0, 0.0, -6.0, -3.0)], 0))
+b()
+bs(266.638,603.695,0)
+bs(344.138,603.695,0)
+G()
+fp((0.727,0.843,1))
+lw(1)
+r(150,0,0,-20,90.5128,722.445)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('application.pro',(126.495,708.445))
+fp((0.727,0.843,1))
+lw(1)
+r(150,0,0,-20,90.5128,694.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('application.qrc',(126.831,680.945))
+fp((0.727,0.843,1))
+lw(1)
+r(150,0,0,-20,90.5128,667.445)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('main.cpp',(141.171,653.445))
+fp((0.727,0.843,1))
+lw(1)
+r(150,0,0,-20,90.5128,639.445)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('mainwindow.cpp',(121.167,625.445))
+fp((0.727,0.843,1))
+lw(1)
+r(150,0,0,-20,90.5128,612.445)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('mainwindow.h',(127.503,598.445))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Times-Roman')
+txt('. . .',(0.000374682,-1,1,0.000374682,162.714,532.24))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,90.5128,585)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('images/copy.png',(120.159,571))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,90.5128,557.445)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('images/cut.png',(124.827,543.445))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,90.5128,514.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('images/save.png',(120.159,500.945))
+G_()
+fp((0.941,0.941,0.941))
+lw(1)
+r(178,0,0,-154.5,370.138,671.945)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('application.exe',(399.108,647.929))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Times-Roman')
+txt('. . .',(0.000374682,-1,1,0.000374682,458.951,572.295))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,385,625.055)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt(':/images/copy.png',(411.31,611.055))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,385,597.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt(':/images/cut.png',(415.978,583.5))
+fp((1,0.756,0.576))
+lw(1)
+r(150,0,0,-20,385,555)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt(':/images/save.png',(411.31,541))
+G_()
+le()
+lw(1)
+r(482.5,0,0,-252.5,80,735)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/shapedclock.sk b/doc/src/diagrams/shapedclock.sk
new file mode 100644
index 0000000..ba3b020
--- /dev/null
+++ b/doc/src/diagrams/shapedclock.sk
@@ -0,0 +1,46 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(-1214279092,'clock.png')
+im((30,697.5),-1214279092)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('frameGeometry().topLeft()',(23.86,822.07))
+fp((0,0,0))
+lp((0.631,0,0))
+lw(2)
+Fn('Helvetica')
+Fs(10)
+txt('event->globalPos()',(92.5,767.07))
+lp((0.631,0,0))
+lw(1)
+lc(2)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(25,817.5,0)
+bs(87.5,765,0)
+lw(1)
+ld((1, 1))
+b()
+bs(25,817.5,0)
+bs(32.5,817.5,0)
+lw(1)
+ld((1, 1))
+b()
+bs(25,817.5,0)
+bs(25,810,0)
+fp((0.631,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(10)
+txt('dragPosition',(0.758173,-0.652054,0.652054,0.758173,38.8498,810.656))
+le()
+lw(1)
+r(177.5,0,0,-152.5,10,840)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/sharedmodel-tableviews.zip b/doc/src/diagrams/sharedmodel-tableviews.zip
new file mode 100644
index 0000000..5a62f02
--- /dev/null
+++ b/doc/src/diagrams/sharedmodel-tableviews.zip
Binary files differ
diff --git a/doc/src/diagrams/sharedselection-tableviews.zip b/doc/src/diagrams/sharedselection-tableviews.zip
new file mode 100644
index 0000000..b591e19
--- /dev/null
+++ b/doc/src/diagrams/sharedselection-tableviews.zip
Binary files differ
diff --git a/doc/src/diagrams/standard-views.sk b/doc/src/diagrams/standard-views.sk
new file mode 100644
index 0000000..d67a603
--- /dev/null
+++ b/doc/src/diagrams/standard-views.sk
@@ -0,0 +1,16 @@
+##Sketch 1 2
+document()
+layout('A3',1)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+le()
+lw(1)
+r(845,0,0,-240,70,310)
+bm(-1090754548,'gallery-images/plastique-listview.png')
+im((80,82),-1090754548)
+bm(-1090737652,'gallery-images/plastique-treeview.png')
+im((360,82),-1090737652)
+bm(-1090629812,'gallery-images/plastique-tableview.png')
+im((640,82),-1090629812)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/standarddialogs-example.png b/doc/src/diagrams/standarddialogs-example.png
new file mode 100644
index 0000000..73a8e8a
--- /dev/null
+++ b/doc/src/diagrams/standarddialogs-example.png
Binary files differ
diff --git a/doc/src/diagrams/standarddialogs-example.zip b/doc/src/diagrams/standarddialogs-example.zip
new file mode 100644
index 0000000..109b69e
--- /dev/null
+++ b/doc/src/diagrams/standarddialogs-example.zip
Binary files differ
diff --git a/doc/src/diagrams/stylesheet/coffee-plastique.png b/doc/src/diagrams/stylesheet/coffee-plastique.png
new file mode 100644
index 0000000..7da1fdc
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/coffee-plastique.png
Binary files differ
diff --git a/doc/src/diagrams/stylesheet/coffee-windows.png b/doc/src/diagrams/stylesheet/coffee-windows.png
new file mode 100644
index 0000000..9083a07
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/coffee-windows.png
Binary files differ
diff --git a/doc/src/diagrams/stylesheet/coffee-xp.png b/doc/src/diagrams/stylesheet/coffee-xp.png
new file mode 100644
index 0000000..4188a23
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/coffee-xp.png
Binary files differ
diff --git a/doc/src/diagrams/stylesheet/pagefold.png b/doc/src/diagrams/stylesheet/pagefold.png
new file mode 100644
index 0000000..b479d4d
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/pagefold.png
Binary files differ
diff --git a/doc/src/diagrams/stylesheet/pagefold.svg b/doc/src/diagrams/stylesheet/pagefold.svg
new file mode 100644
index 0000000..5f20e2e
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/pagefold.svg
@@ -0,0 +1,1678 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.43"
+ sodipodi:docbase="/home/qt/dev/qt/doc/src/diagrams/stylesheet"
+ sodipodi:docname="pagefold.svg"
+ inkscape:export-filename="c:\lineedit.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2650">
+ <stop
+ style="stop-color:#8b8b8b;stop-opacity:1;"
+ offset="0"
+ id="stop2652" />
+ <stop
+ style="stop-color:#8b8b8b;stop-opacity:0;"
+ offset="1"
+ id="stop2654" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2530">
+ <stop
+ id="stop2532"
+ offset="0"
+ style="stop-color:#fafafa;stop-opacity:0.74509805;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0.37254903;"
+ offset="1"
+ id="stop2536" />
+ <stop
+ id="stop2534"
+ offset="1"
+ style="stop-color:#666666;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2287">
+ <stop
+ id="stop2289"
+ offset="0"
+ style="stop-color:#dfbbbb;stop-opacity:1;" />
+ <stop
+ id="stop2291"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient14054">
+ <stop
+ id="stop14056"
+ offset="0"
+ style="stop-color:white;stop-opacity:1;" />
+ <stop
+ id="stop14058"
+ offset="1"
+ style="stop-color:white;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11371">
+ <stop
+ id="stop11373"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop11375"
+ offset="1"
+ style="stop-color:#611a02;stop-opacity:0.88659793;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11290">
+ <stop
+ id="stop11292"
+ offset="0"
+ style="stop-color:#c8c8c8;stop-opacity:0.86666667;" />
+ <stop
+ id="stop11294"
+ offset="1"
+ style="stop-color:#ded5cf;stop-opacity:0.86274511;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient10355">
+ <stop
+ id="stop10357"
+ offset="0"
+ style="stop-color:#eeeae6;stop-opacity:0.86274511;" />
+ <stop
+ id="stop10359"
+ offset="1"
+ style="stop-color:white;stop-opacity:0.86666667;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient8520">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop8522" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop8524" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8477">
+ <stop
+ style="stop-color:#ded5cf;stop-opacity:0.86274511;"
+ offset="0"
+ id="stop8479" />
+ <stop
+ style="stop-color:white;stop-opacity:0.86666667;"
+ offset="1"
+ id="stop8481" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6598">
+ <stop
+ style="stop-color:#d0c7c7;stop-opacity:0.84705883;"
+ offset="0"
+ id="stop6600" />
+ <stop
+ id="stop6606"
+ offset="0.5"
+ style="stop-color:#997e7e;stop-opacity:0.42352942;" />
+ <stop
+ style="stop-color:#887f7f;stop-opacity:0;"
+ offset="1"
+ id="stop6602" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6584">
+ <stop
+ style="stop-color:#887f7f;stop-opacity:0.84705883;"
+ offset="0"
+ id="stop6586" />
+ <stop
+ style="stop-color:#887f7f;stop-opacity:0.84705883;"
+ offset="1"
+ id="stop6588" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6569">
+ <stop
+ style="stop-color:#d8cfcf;stop-opacity:0.11340206;"
+ offset="0"
+ id="stop6571" />
+ <stop
+ style="stop-color:#9f9f9f;stop-opacity:0.84705883;"
+ offset="1"
+ id="stop6573" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5655">
+ <stop
+ id="stop5657"
+ offset="0"
+ style="stop-color:#795e5e;stop-opacity:1;" />
+ <stop
+ id="stop5659"
+ offset="1"
+ style="stop-color:#170000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4756">
+ <stop
+ style="stop-color:#dfc8c8;stop-opacity:1;"
+ offset="0"
+ id="stop4758" />
+ <stop
+ style="stop-color:#f7f7f7;stop-opacity:1;"
+ offset="1"
+ id="stop4760" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7289">
+ <stop
+ id="stop7291"
+ offset="0"
+ style="stop-color:#616161;stop-opacity:1;" />
+ <stop
+ id="stop7293"
+ offset="1"
+ style="stop-color:white;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4599">
+ <stop
+ style="stop-color:#616161;stop-opacity:1;"
+ offset="0"
+ id="stop4601" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop4603" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3671">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop3673" />
+ <stop
+ style="stop-color:#e8e6fc;stop-opacity:0;"
+ offset="1"
+ id="stop3675" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2760">
+ <stop
+ style="stop-color:#ffc476;stop-opacity:1;"
+ offset="0"
+ id="stop2762" />
+ <stop
+ style="stop-color:#fcf95c;stop-opacity:1;"
+ offset="1"
+ id="stop2764" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4599"
+ id="linearGradient4605"
+ x1="743.97229"
+ y1="10.354198"
+ x2="665.18542"
+ y2="103.28822"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6584"
+ id="radialGradient6596"
+ cx="56.730461"
+ cy="175.79576"
+ fx="56.730461"
+ fy="175.79576"
+ r="33.814732"
+ gradientTransform="matrix(-2.331063e-2,0.911966,-0.685725,-1.752744e-2,186.5197,128.41)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6598"
+ id="linearGradient6604"
+ x1="39.926405"
+ y1="177.065"
+ x2="63.861485"
+ y2="207.90289"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6569"
+ id="radialGradient7498"
+ cx="73.741135"
+ cy="177.065"
+ fx="73.741135"
+ fy="177.065"
+ r="39.288086"
+ gradientTransform="matrix(1,0,0,0.987144,0,2.276301)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6569"
+ id="radialGradient7532"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.987144,0,2.276301)"
+ cx="73.741135"
+ cy="177.065"
+ fx="73.741135"
+ fy="177.065"
+ r="39.288086" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6598"
+ id="linearGradient7560"
+ gradientUnits="userSpaceOnUse"
+ x1="39.926405"
+ y1="177.065"
+ x2="63.861485"
+ y2="207.90289" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6584"
+ id="radialGradient7562"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-2.331063e-2,0.911966,-0.685725,-1.752744e-2,186.5197,128.41)"
+ cx="56.730461"
+ cy="175.79576"
+ fx="56.730461"
+ fy="175.79576"
+ r="33.814732" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient11306"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-208.8971,-30.27314)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient11310"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.175633,-10.42983)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient11314"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.1668,-83.31197)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient11318"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.324065,-66.639)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient11328"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.0184,-139.5212)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11371"
+ id="radialGradient11369"
+ cx="58.5"
+ cy="327.36218"
+ fx="58.5"
+ fy="327.36218"
+ r="29.5"
+ gradientTransform="matrix(1,0,0,0.983051,0,5.548512)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6569"
+ id="linearGradient14052"
+ x1="216"
+ y1="342.36218"
+ x2="176"
+ y2="297.36218"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(1,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2287"
+ id="linearGradient2285"
+ x1="328"
+ y1="282.86218"
+ x2="328"
+ y2="358.86218"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.655738,0,0,0.625,102.418,113.1983)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2528"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5"
+ gradientTransform="matrix(1,0,0,1.058824,-6.299127e-14,-21.31542)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2540"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-2.288447e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2544"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-4.936329e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2548"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-5.097311e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2552"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-6.823707e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2556"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-7.367717e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2560"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-3.060052e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2564"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-6.49064e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2568"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-8.000546e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2572"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,-1.133121e-13,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2586"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,7.160949e-15,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2588"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,9.328648e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2590"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,7.746581e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2592"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,8.586184e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2594"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,1.825207e-13,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2596"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,4.617141e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2598"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,1.225548e-13,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2600"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,8.193448e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2602"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,4.961308e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2604"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,2.60764e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2616"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,4.556079e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2618"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,2.11359e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2620"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,4.184152e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2622"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,8.16708e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2624"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,8.19379e-14,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2530"
+ id="radialGradient2626"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.058824,1.20513e-13,-21.31542)"
+ cx="404.5"
+ cy="362.36218"
+ fx="404.5"
+ fy="362.36218"
+ r="8.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2658"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2662"
+ gradientUnits="userSpaceOnUse"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522"
+ gradientTransform="matrix(0.848296,0,0,0.848296,53.62318,81.14764)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2668"
+ gradientUnits="userSpaceOnUse"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522"
+ gradientTransform="translate(-7,-7)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2852"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.718744,0,0,0.718744,83.39873,135.0499)"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2856"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.475495,0,0,0.475495,163.1776,260.7723)"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2650"
+ id="linearGradient2859"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.718744,0,0,0.718744,88.64874,139.3206)"
+ x1="260.63467"
+ y1="439.97522"
+ x2="323.47839"
+ y2="502.97522" />
+ <pattern
+ patternUnits="userSpaceOnUse"
+ width="17"
+ height="17"
+ patternTransform="translate(363,334.3622)"
+ id="pattern3055">
+ <image
+ y="0"
+ x="0"
+ xlink:href="/tmp/sizegrip.png"
+ sodipodi:absref="/tmp/sizegrip.png"
+ width="17"
+ height="17"
+ id="image3052" />
+ </pattern>
+ <pattern
+ patternUnits="userSpaceOnUse"
+ width="17"
+ height="17"
+ patternTransform="translate(363,334.3622)"
+ id="pattern3062">
+ <image
+ y="0"
+ x="0"
+ xlink:href="/tmp/sizegrip.png"
+ sodipodi:absref="/tmp/sizegrip.png"
+ width="17"
+ height="17"
+ id="image3060" />
+ </pattern>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2287"
+ id="linearGradient3171"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.655738,0,0,-0.625,533.082,557.5261)"
+ x1="328"
+ y1="282.86218"
+ x2="328"
+ y2="358.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient2346"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,55.64416,318.6709)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient4123"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.0184,-139.5212)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient4125"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.324065,-66.639)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient4128"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,-177.3558,334.6709)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient4132"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-396.6983,261.7887)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient4149"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-491.6195,14.76774)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient5042"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.1668,-83.31197)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient5044"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.175633,-10.42983)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient5048"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,-200.3559,296.6709)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient5051"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-419.6983,223.7887)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient5060"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-208.8971,-30.27314)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient5063"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-416.6983,243.7888)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient5955"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-213.0217,14.29092)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient5959"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-400.0217,15.29092)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient5963"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-306.0217,15.29092)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient5973"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-489.7228,1063.41)"
+ x1="357.00003"
+ y1="415.53799"
+ x2="357.00003"
+ y2="469.14316" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient5975"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-212.3206,1059.933)"
+ x1="357.17999"
+ y1="415.53723"
+ x2="357.17999"
+ y2="470.05835" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient5977"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-396.3206,1061.933)"
+ x1="357.17999"
+ y1="415.53705"
+ x2="357.17999"
+ y2="469.14362" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient5979"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-303.3206,1059.933)"
+ x1="357.17999"
+ y1="415.53699"
+ x2="357.17999"
+ y2="469.14362" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient1500"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-481.6711,170.2793)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient1503"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-209.0216,170.7205)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient1507"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-301.5216,169.7205)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient1511"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,1.09434,-391.5216,170.2205)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient2394"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-481.3464,1204.445)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient2396"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-208.6969,1204.004)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient2398"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-301.1969,1205.004)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient2400"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.543478,0,0,-1.09434,-391.1969,1204.504)"
+ x1="357.17999"
+ y1="469.23767"
+ x2="357.17999"
+ y2="415.86218" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8477"
+ id="linearGradient2428"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.0184,-139.5212)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient2430"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.324065,-66.639)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11290"
+ id="linearGradient2432"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-208.8971,-30.27314)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10355"
+ id="linearGradient2434"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.718783,0,0,1.40468,-211.1668,-83.31197)"
+ x1="331.16711"
+ y1="199.51926"
+ x2="331.16711"
+ y2="177.27299" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8520"
+ id="linearGradient2436"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986928,0,0,1,8.175633,-10.42983)"
+ x1="358.32635"
+ y1="172.3678"
+ x2="358.32635"
+ y2="177.58272" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2"
+ inkscape:cx="146.93424"
+ inkscape:cy="238.10225"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1017"
+ inkscape:window-height="703"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="fill:#dcdcdc;fill-opacity:0.35526314;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 587.40371,4.7760765 L 743.97735,115.89285 C 743.97735,115.89285 714.96821,103.50692 666.19562,146.19742 C 662.12502,149.76041 661.14485,70.435993 587.40371,4.7760765 z "
+ id="path7285"
+ sodipodi:nodetypes="ccsc"
+ inkscape:export-filename="c:\pagefold.png"
+ inkscape:export-xdpi="51.43"
+ inkscape:export-ydpi="51.43" />
+ <path
+ style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 745.49258,1.7858134 L 746.50273,117.97107 L 745.49258,1.7858134 z "
+ id="path3710"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:url(#linearGradient4605);fill-rule:evenodd;stroke:#8b8b8b;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1.0"
+ d="M 586.89863,1.8035354 L 743.47227,112.92031 C 743.47227,112.92031 702.3413,100.53438 653.56871,143.22488 C 649.49811,146.78787 660.63977,67.463454 586.89863,1.8035354 z "
+ id="path3712"
+ sodipodi:nodetypes="ccsc"
+ inkscape:export-filename="c:\pagefold.png"
+ inkscape:export-xdpi="51.43"
+ inkscape:export-ydpi="51.43" />
+ <path
+ style="fill:#e5ecf8;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.32236841"
+ d="M 586.89863,1.8035355 C 743.47227,1.8035355 743.47227,1.8035355 743.47227,1.8035355 L 743.47227,111.91016 L 586.89863,1.8035355 z "
+ id="path4608"
+ inkscape:export-xdpi="28.74"
+ inkscape:export-ydpi="28.74" />
+ <rect
+ style="fill:#f7f7f7;fill-opacity:0.78947371;stroke:#8b8b8b;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect1872"
+ width="298.86383"
+ height="60.557034"
+ x="24.819391"
+ y="12.94127"
+ rx="14.293656"
+ inkscape:export-filename="c:\lineedit.png"
+ inkscape:export-xdpi="28.74"
+ inkscape:export-ydpi="28.74" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#f7f7f7;fill-opacity:0.78431374;stroke:#8b8b8b;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path2978"
+ sodipodi:cx="73.741135"
+ sodipodi:cy="177.065"
+ sodipodi:rx="31.31473"
+ sodipodi:ry="30.809652"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ transform="translate(-20.20305,-25.25381)"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_unchecked.png"
+ inkscape:export-xdpi="17.299999"
+ inkscape:export-ydpi="17.299999" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:url(#radialGradient7498);stroke-width:15.94671249;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3867"
+ sodipodi:cx="73.741135"
+ sodipodi:cy="177.065"
+ sodipodi:rx="31.31473"
+ sodipodi:ry="30.809652"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ transform="matrix(0.909446,0,0,0.907961,60.2157,-8.95693)"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_unchecked_hover.png"
+ inkscape:export-xdpi="16.336388"
+ inkscape:export-ydpi="16.336388" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#linearGradient6604);fill-opacity:1;stroke:url(#radialGradient6596);stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3869"
+ sodipodi:cx="73.741135"
+ sodipodi:cy="177.065"
+ sodipodi:rx="31.31473"
+ sodipodi:ry="30.809652"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ transform="translate(144.4518,-28.78935)"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_unchecked_pressed.png"
+ inkscape:export-xdpi="17.299999"
+ inkscape:export-ydpi="17.299999" />
+ <g
+ id="g7526"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_checked.png"
+ inkscape:export-xdpi="17.299999"
+ inkscape:export-ydpi="17.299999">
+ <path
+ inkscape:export-ydpi="17.299999"
+ inkscape:export-xdpi="17.299999"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton.png"
+ transform="translate(-19.1929,50.00255)"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ sodipodi:ry="30.809652"
+ sodipodi:rx="31.31473"
+ sodipodi:cy="177.065"
+ sodipodi:cx="73.741135"
+ id="path7500"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:#8b8b8b;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.772198,0,0,0.675157,10.75109,73.06635)"
+ d="M 64.649762 229.59293 A 8.586297 7.5761442 0 1 1 47.477168,229.59293 A 8.586297 7.5761442 0 1 1 64.649762 229.59293 z"
+ sodipodi:ry="7.5761442"
+ sodipodi:rx="8.586297"
+ sodipodi:cy="229.59293"
+ sodipodi:cx="56.063465"
+ id="path7512"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:#b7adad;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80921056"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ id="g7536"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_checked_hover.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999">
+ <path
+ inkscape:export-ydpi="16.336388"
+ inkscape:export-xdpi="16.336388"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_hover.png"
+ transform="matrix(0.909446,0,0,0.907961,66.27656,65.28928)"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ sodipodi:ry="30.809652"
+ sodipodi:rx="31.31473"
+ sodipodi:cy="177.065"
+ sodipodi:cx="73.741135"
+ id="path7530"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:url(#radialGradient7532);stroke-width:15.94671249;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.772198,0,0,0.675157,90.04808,71.04611)"
+ d="M 64.649762 229.59293 A 8.586297 7.5761442 0 1 1 47.477168,229.59293 A 8.586297 7.5761442 0 1 1 64.649762 229.59293 z"
+ sodipodi:ry="7.5761442"
+ sodipodi:rx="8.586297"
+ sodipodi:cy="229.59293"
+ sodipodi:cx="56.063465"
+ id="path7534"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:#b7adad;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80921056"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ id="g7556"
+ transform="matrix(1.074683,0,0,1.060652,-15.71476,-12.762)"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_checked_pressed.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999">
+ <path
+ transform="matrix(0.772198,0,0,0.675157,174.3959,72.05619)"
+ d="M 64.649762 229.59293 A 8.586297 7.5761442 0 1 1 47.477168,229.59293 A 8.586297 7.5761442 0 1 1 64.649762 229.59293 z"
+ sodipodi:ry="7.5761442"
+ sodipodi:rx="8.586297"
+ sodipodi:cy="229.59293"
+ sodipodi:cx="56.063465"
+ id="path7524"
+ style="fill:#f7f7f7;fill-opacity:0.78431373;stroke:#b7adad;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80921056"
+ sodipodi:type="arc" />
+ <path
+ inkscape:transform-center-x="70.710678"
+ inkscape:export-ydpi="17.299999"
+ inkscape:export-xdpi="17.299999"
+ inkscape:export-filename="c:\depot\qt\4.2\examples\widgets\stylesheet\images\radiobutton_pressed.png"
+ transform="translate(143.4416,50.00254)"
+ d="M 105.05586 177.065 A 31.31473 30.809652 0 1 1 42.426405,177.065 A 31.31473 30.809652 0 1 1 105.05586 177.065 z"
+ sodipodi:ry="30.809652"
+ sodipodi:rx="31.31473"
+ sodipodi:cy="177.065"
+ sodipodi:cx="73.741135"
+ id="path7540"
+ style="fill:url(#linearGradient7560);fill-opacity:1;stroke:url(#radialGradient7562);stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ id="g11333">
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton.png"
+ rx="8.4277067"
+ y="109.12024"
+ x="302.04776"
+ height="40.971741"
+ width="119.00411"
+ id="rect8557"
+ style="fill:black;fill-opacity:0.0657895;stroke:none;stroke-width:2.38755798;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton.png"
+ rx="8.5229921"
+ y="103.71593"
+ x="298.01132"
+ height="42.515831"
+ width="120.34961"
+ id="rect8559"
+ style="fill:url(#linearGradient11328);fill-opacity:1;stroke:#8b8b8b;stroke-width:3.40678048;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton.png"
+ ry="3.3333139"
+ rx="0.90303022"
+ y="107.7652"
+ x="298.56201"
+ height="34.143112"
+ width="3.1697834"
+ id="rect8561"
+ style="fill:white;fill-opacity:0.66447371;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton.png"
+ ry="1.5026071"
+ rx="0.78104818"
+ y="105.7288"
+ x="305.26501"
+ height="3.0052142"
+ width="106.77315"
+ id="rect8563"
+ style="fill:url(#linearGradient11318);fill-opacity:1;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ <g
+ id="g11345">
+ <rect
+ inkscape:export-ydpi="34.630936"
+ inkscape:export-xdpi="34.630936"
+ inkscape:export-filename="c:\pushbutton_pressed.png"
+ rx="8.4277067"
+ y="218.36829"
+ x="304.1691"
+ height="40.971741"
+ width="119.00411"
+ id="rect10379"
+ style="fill:black;fill-opacity:0.0657895;stroke:none;stroke-width:2.38755798;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630936"
+ inkscape:export-xdpi="34.630936"
+ inkscape:export-filename="c:\pushbutton_pressed.png"
+ rx="8.5229921"
+ y="212.96397"
+ x="300.13266"
+ height="42.515831"
+ width="120.34961"
+ id="rect10381"
+ style="fill:url(#linearGradient11306);fill-opacity:1;stroke:#8b8b8b;stroke-width:3.40678048;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ <g
+ id="g11339">
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton_hover.png"
+ rx="8.4277067"
+ y="165.32945"
+ x="301.89935"
+ height="40.971741"
+ width="119.00411"
+ id="rect7570"
+ style="fill:black;fill-opacity:0.0657895;stroke:none;stroke-width:2.38755798;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton_hover.png"
+ rx="8.5229921"
+ y="159.92514"
+ x="297.86288"
+ height="42.515831"
+ width="120.34961"
+ id="rect8483"
+ style="fill:url(#linearGradient11314);fill-opacity:1;stroke:#8b8b8b;stroke-width:3.40678048;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton_hover.png"
+ ry="1.5026071"
+ rx="0.78104818"
+ y="161.93797"
+ x="305.11658"
+ height="3.0052142"
+ width="106.77315"
+ id="rect8518"
+ style="fill:url(#linearGradient11310);fill-opacity:1;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ inkscape:export-ydpi="34.630928"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-filename="c:\pushbutton_hover.png"
+ ry="3.3333139"
+ rx="0.90303022"
+ y="164.66541"
+ x="298.93549"
+ height="34.143112"
+ width="3.1697834"
+ id="rect11331"
+ style="fill:white;fill-opacity:0.66447371;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </g>
+ <rect
+ style="fill:white;fill-opacity:0.50196078;stroke:#818181;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect12262"
+ width="54"
+ height="52"
+ x="38"
+ y="309.36218"
+ rx="0"
+ inkscape:export-filename="c:\checkbox_unchecked.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444" />
+ <rect
+ style="fill:white;fill-opacity:0.50196078;stroke:#9a9a9a;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14034"
+ width="54"
+ height="52"
+ x="111"
+ y="310.36218"
+ rx="0"
+ inkscape:export-filename="c:\checkbox_unchecked_hover.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444" />
+ <rect
+ style="fill:url(#linearGradient14052);fill-opacity:1;stroke:#9a9a9a;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14036"
+ width="54"
+ height="52"
+ x="182"
+ y="308.36218"
+ rx="0"
+ inkscape:export-filename="c:\checkbox_unchecked_pressed.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444" />
+ <rect
+ style="fill:white;fill-opacity:0.50196078;stroke:#818181;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14062"
+ width="54"
+ height="52"
+ x="114"
+ y="382.36218"
+ rx="0"
+ inkscape:export-filename="c:\checkbox_unchecked.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444" />
+ <rect
+ style="fill:white;fill-opacity:0.50196078;stroke:#818181;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14064"
+ width="54"
+ height="52"
+ x="186"
+ y="381.36218"
+ rx="0"
+ inkscape:export-filename="c:\checkbox_unchecked.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444" />
+ <g
+ id="g14074"
+ inkscape:export-filename="c:\checkbox_checked.png"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-ydpi="18.619444">
+ <rect
+ inkscape:export-ydpi="18.619444"
+ inkscape:export-xdpi="18.619444"
+ inkscape:export-filename="c:\checkbox_unchecked.png"
+ rx="0"
+ y="383.36218"
+ x="41"
+ height="52"
+ width="54"
+ id="rect14060"
+ style="fill:white;fill-opacity:0.50196078;stroke:#818181;stroke-width:10;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ id="path14066"
+ d="M 53,410.36218 C 62,421.36218 62,421.36218 62,421.36218 L 83,398.36218"
+ style="fill:white;fill-opacity:0.50196078;fill-rule:evenodd;stroke:#818181;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ <path
+ style="fill:url(#linearGradient2285);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.6401844px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 337.17213,302.17468 L 297.82787,302.17468 L 316.18852,331.54968 L 337.17213,302.17468 z "
+ id="path1402"
+ inkscape:export-filename="/home/qt/down-arrow.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ sodipodi:type="arc"
+ style="fill:url(#radialGradient2594);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:80.00000187;stroke-opacity:1"
+ id="path2550"
+ sodipodi:cx="404.5"
+ sodipodi:cy="362.36218"
+ sodipodi:rx="8.5"
+ sodipodi:ry="9"
+ d="M 413 362.36218 A 8.5 9 0 1 1 396,362.36218 A 8.5 9 0 1 1 413 362.36218 z"
+ transform="matrix(1.173299,0,0,1.083714,49.6358,-39.58126)" />
+ <image
+ id="image3150"
+ height="17"
+ width="17"
+ sodipodi:absref="/tmp/sizegrip.png"
+ xlink:href="/tmp/sizegrip.png"
+ x="514.5"
+ y="283.36218" />
+ <path
+ style="fill:url(#linearGradient3171);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.6401844px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 298.32787,368.54968 L 337.67213,368.54968 L 319.31148,339.17468 L 298.32787,368.54968 z "
+ id="path3169"
+ inkscape:export-filename="/home/qt/up_arrow.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <rect
+ style="fill:url(#linearGradient2346);fill-opacity:1;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect2339"
+ width="106.77315"
+ height="3.0052142"
+ x="352.58511"
+ y="491.0387"
+ rx="0.78104818"
+ ry="1.5026071"
+ inkscape:export-filename="c:\pushbutton.png"
+ inkscape:export-xdpi="34.630928"
+ inkscape:export-ydpi="34.630928" />
+ <path
+ style="fill:url(#linearGradient4149);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 22.3587,471.50369 L 20.81522,526.12633 L 97.98913,526.22067 L 97.98913,490.91878 C 97.98913,474.71285 91.53261,470.59803 69.83696,471.59803 L 22.3587,471.50369 z "
+ id="path3226"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spinbutton.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5955);fill-opacity:1;fill-rule:nonzero;stroke:#c7c7c7;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 300.95652,471.02687 L 299.41304,526.64951 L 376.58695,526.74385 L 376.58695,490.44196 C 376.58695,474.23603 370.13043,470.12121 348.43478,471.12121 L 300.95652,471.02687 z "
+ id="path5953"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spinbutton_off.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5959);fill-opacity:1.0;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 113.95652,472.02687 L 112.41304,526.64951 L 189.58695,526.74385 L 189.58695,491.44196 C 189.58695,475.23603 183.13043,471.12121 161.43478,472.12121 L 113.95652,472.02687 z "
+ id="path5957"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spinbutton_hover.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5963);fill-opacity:1.0;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 207.95652,472.02687 L 206.41304,526.64951 L 283.58695,526.74385 L 283.58695,491.44196 C 283.58695,475.23603 277.13043,471.12121 255.43478,472.12121 L 207.95652,472.02687 z "
+ id="path5961"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spinbutton_pressed.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5973);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 24.25543,606.67432 L 22.71195,552.05168 L 99.88586,551.95734 L 99.88586,587.25923 C 99.88586,603.46516 93.42934,607.57998 71.73369,606.57998 L 24.25543,606.67432 z "
+ id="path5965"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spindown.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5975);fill-opacity:1;fill-rule:nonzero;stroke:#c7c7c7;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 301.65761,603.1975 L 300.11413,547.57486 L 377.28804,547.48052 L 377.28804,583.78241 C 377.28804,599.98834 370.83152,604.10316 349.13587,603.10316 L 301.65761,603.1975 z "
+ id="path5967"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spindown_off.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5977);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 117.65761,605.1975 L 116.11413,550.57486 L 193.28804,550.48052 L 193.28804,585.78241 C 193.28804,601.98834 186.83152,606.10316 165.13587,605.10316 L 117.65761,605.1975 z "
+ id="path5969"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spindown_hover.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient5979);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 210.65761,603.1975 L 209.11413,548.57486 L 286.28804,548.48052 L 286.28804,583.78241 C 286.28804,599.98834 279.83152,604.10316 258.13587,603.10316 L 210.65761,603.1975 z "
+ id="path5971"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spindown_pressed.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:#c8c8c8;fill-opacity:0.96022725;fill-rule:evenodd;stroke:#000000;stroke-width:0.6401844px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 396.42213,301.17468 L 357.07787,301.17468 L 375.43852,330.54968 L 396.42213,301.17468 z "
+ id="path5981"
+ inkscape:export-filename="/home/qt/down_arrow_disabled.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:#c8c8c8;fill-opacity:0.96078432;fill-rule:evenodd;stroke:#000000;stroke-width:0.6401844px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 357.57787,366.54968 L 396.92213,366.54968 L 378.56148,337.17468 L 357.57787,366.54968 z "
+ id="path5983"
+ inkscape:export-filename="/home/qt/up_arrow_enabled.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient1500);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 31.30707,642.01528 L 30.76359,681.63792 L 107.9375,681.73226 L 107.9375,646.43037 C 107.9375,630.22444 107.98098,627.85962 79.78533,627.10962 C 31.37591,627.57817 31.21649,625.79673 31.30707,642.01528 z "
+ id="path1484"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrollup.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient1503);fill-opacity:1;fill-rule:nonzero;stroke:#c7c7c7;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 303.95653,642.45652 L 303.41305,682.07916 L 380.58695,682.1735 L 380.58695,646.87161 C 380.58695,630.66568 380.63043,628.30086 352.43479,627.55086 C 304.02537,628.01941 303.86595,626.23797 303.95653,642.45652 z "
+ id="path1500"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrollup_disabled.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient1507);fill-opacity:1.0;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 211.45653,641.45652 L 210.91305,681.07916 L 288.08695,681.1735 L 288.08695,645.87161 C 288.08695,629.66568 288.13043,627.30086 259.93479,626.55086 C 211.52537,627.01941 211.36595,625.23797 211.45653,641.45652 z "
+ id="path1505"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrollup_pressed.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient1511);fill-opacity:1.0;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 121.45653,641.95652 L 120.91305,681.57916 L 198.08695,681.6735 L 198.08695,646.37161 C 198.08695,630.16568 198.13043,627.80086 169.93479,627.05086 C 121.52537,627.51941 121.36595,625.73797 121.45653,641.95652 z "
+ id="path1509"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrollup_hover.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient2394);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 31.6318,732.70908 L 31.08832,693.08644 L 108.26223,692.9921 L 108.26223,728.29399 C 108.26223,744.49992 108.30571,746.86474 80.11006,747.61474 C 31.70064,747.14619 31.54122,748.92763 31.6318,732.70908 z "
+ id="path2386"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrolldown.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient2396);fill-opacity:1;fill-rule:nonzero;stroke:#c7c7c7;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 304.28126,732.26784 L 303.73778,692.6452 L 380.91168,692.55086 L 380.91168,727.85275 C 380.91168,744.05868 380.95516,746.4235 352.75952,747.1735 C 304.3501,746.70495 304.19068,748.48639 304.28126,732.26784 z "
+ id="path2388"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/spinbutton.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient2398);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 211.78126,733.26784 L 211.23778,693.6452 L 288.41168,693.55086 L 288.41168,728.85275 C 288.41168,745.05868 288.45516,747.4235 260.25952,748.1735 C 211.8501,747.70495 211.69068,749.48639 211.78126,733.26784 z "
+ id="path2390"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrolldown_disabled.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ <path
+ style="fill:url(#linearGradient2400);fill-opacity:1;fill-rule:nonzero;stroke:#8b8b8b;stroke-width:3.89894915;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 121.78126,732.76784 L 121.23778,693.1452 L 198.41168,693.05086 L 198.41168,728.35275 C 198.41168,744.55868 198.45516,746.9235 170.25952,747.6735 C 121.8501,747.20495 121.69068,748.98639 121.78126,732.76784 z "
+ id="path2392"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/qt/scrolldown_hover.png"
+ inkscape:export-xdpi="16.379999"
+ inkscape:export-ydpi="16.379999" />
+ </g>
+</svg>
diff --git a/doc/src/diagrams/stylesheet/stylesheet-boxmodel.svg b/doc/src/diagrams/stylesheet/stylesheet-boxmodel.svg
new file mode 100644
index 0000000..833f606
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/stylesheet-boxmodel.svg
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ sodipodi:docbase="C:\Documents and Settings\Girish\Desktop"
+ sodipodi:docname="box.svg"
+ inkscape:export-filename="C:\Documents and Settings\Girish\Desktop\box.png"
+ inkscape:export-xdpi="51.43"
+ inkscape:export-ydpi="51.43">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="375"
+ inkscape:cy="520"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1600"
+ inkscape:window-height="1140"
+ inkscape:window-x="1196"
+ inkscape:window-y="-4"
+ showgrid="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <text
+ xml:space="preserve"
+ style="font-size:23.51597595px;font-style:normal;font-weight:normal;fill:white;fill-opacity:1;stroke:white;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="335.02917"
+ y="277.45633"
+ id="text9058"
+ transform="scale(0.889318,1.124457)"><tspan
+ sodipodi:role="line"
+ x="335.02917"
+ y="277.45633"
+ id="tspan9064">B O R D E R</tspan></text>
+ <rect
+ style="fill:white;fill-opacity:1;stroke:black;stroke-width:4.25704765;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:8.51409454, 4.25704727;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect2760"
+ width="695.74298"
+ height="515.74292"
+ x="22.128525"
+ y="214.49071"
+ rx="6.996594"
+ ry="0" />
+ <rect
+ style="fill:#e8e6cd;fill-opacity:1;stroke:black;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3655"
+ width="580"
+ height="400"
+ x="81"
+ y="271.36218"
+ rx="6.6371522" />
+ <rect
+ style="fill:#e8e6fc;fill-opacity:1;stroke:black;stroke-width:1.81467748;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3657"
+ width="463.04248"
+ height="284.47104"
+ x="137.05019"
+ y="332.26953"
+ rx="6.1465664"
+ ry="0" />
+ <rect
+ style="fill:#d5d5d5;fill-opacity:1;stroke:black;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4547"
+ width="340"
+ height="160"
+ x="200"
+ y="392.36218"
+ rx="6.6371522" />
+ <text
+ xml:space="preserve"
+ style="font-size:24.11601067px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="326.578"
+ y="229.81458"
+ id="text9012"
+ transform="scale(0.912007,1.096483)"><tspan
+ sodipodi:role="line"
+ id="tspan9014"
+ x="326.578"
+ y="229.81458">M A R G I N</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:23.5159874px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="336.01672"
+ y="419.74713"
+ id="text9026"
+ transform="scale(0.889318,1.124457)"><tspan
+ sodipodi:role="line"
+ id="tspan9028"
+ x="336.01672"
+ y="419.74713">C O N T E N T</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:23.51598358px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="336.01666"
+ y="330.81543"
+ id="text9036"
+ transform="scale(0.889318,1.124457)"><tspan
+ sodipodi:role="line"
+ x="336.01666"
+ y="330.81543"
+ id="tspan9040">P A D D I N G</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:23.98760986px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="341.32919"
+ y="276.49072"
+ id="text12608"
+ transform="scale(0.884818,1.130176)"><tspan
+ sodipodi:role="line"
+ id="tspan12610"
+ x="341.32919"
+ y="276.49072">B O R D E R</tspan></text>
+ <rect
+ style="fill:white;fill-opacity:1;stroke:black;stroke-width:1.72772717;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect12612"
+ width="40.016171"
+ height="30.904003"
+ x="38.863865"
+ y="755.78369"
+ rx="6.9994221" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot13507"
+ transform="matrix(2.291562,0,0,2.696637,-268.2496,-1290.608)"><flowRegion
+ id="flowRegion13509"><rect
+ id="rect13511"
+ width="277.14285"
+ height="37.142857"
+ x="161.42857"
+ y="775.2193" /></flowRegion><flowPara
+ id="flowPara13513">Border Rectangle</flowPara></flowRoot> <rect
+ style="fill:#e8e6cd;fill-opacity:1;stroke:black;stroke-width:1.72772717;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14400"
+ width="40.016171"
+ height="30.904003"
+ x="40.864674"
+ y="797.98364"
+ rx="6.9994221" />
+ <rect
+ style="fill:#e8e6fc;fill-opacity:1;stroke:black;stroke-width:1.77121222;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14402"
+ width="39.972687"
+ height="32.514557"
+ x="401.03195"
+ y="753.24774"
+ rx="6.991816" />
+ <rect
+ style="fill:#d5d5d5;fill-opacity:1;stroke:black;stroke-width:1.72772717;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect14404"
+ width="40.016171"
+ height="30.904003"
+ x="401.01019"
+ y="797.98358"
+ rx="6.9994221" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot17946"
+ transform="matrix(2.291562,0,0,2.696635,-270.0219,-1336.443)"><flowRegion
+ id="flowRegion17948"><rect
+ id="rect17950"
+ width="277.14285"
+ height="37.142857"
+ x="161.42857"
+ y="775.2193" /></flowRegion><flowPara
+ id="flowPara17952">Margin Rectangle</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot17954"
+ transform="matrix(2.291562,0,0,2.696637,87.39117,-1337.924)"><flowRegion
+ id="flowRegion17956"><rect
+ id="rect17958"
+ width="277.14285"
+ height="37.142857"
+ x="161.42857"
+ y="775.2193" /></flowRegion><flowPara
+ id="flowPara17960">Padding Rectangle</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot17962"
+ transform="matrix(2.291562,0,0,2.696635,87.39117,-1293.164)"><flowRegion
+ id="flowRegion17964"><rect
+ id="rect17966"
+ width="277.14285"
+ height="37.142857"
+ x="161.42857"
+ y="775.2193" /></flowRegion><flowPara
+ id="flowPara17968">Content Rectangle</flowPara></flowRoot> </g>
+</svg>
diff --git a/doc/src/diagrams/stylesheet/treeview.svg b/doc/src/diagrams/stylesheet/treeview.svg
new file mode 100644
index 0000000..1d2d4ce
--- /dev/null
+++ b/doc/src/diagrams/stylesheet/treeview.svg
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.45"
+ sodipodi:docbase="/home/qt/Desktop"
+ sodipodi:docname="drawing.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ sodipodi:modified="TRUE">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient4175">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop4177" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop4179" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3159">
+ <stop
+ style="stop-color:#360d08;stop-opacity:1;"
+ offset="0"
+ id="stop3161" />
+ <stop
+ style="stop-color:#360d08;stop-opacity:0;"
+ offset="1"
+ id="stop3163" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3159"
+ id="linearGradient3165"
+ x1="-9.5219469"
+ y1="122.3622"
+ x2="567.62091"
+ y2="-23.352087"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3159"
+ id="linearGradient3169"
+ gradientUnits="userSpaceOnUse"
+ x1="-9.5219469"
+ y1="122.3622"
+ x2="567.62091"
+ y2="-23.352087" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3159"
+ id="linearGradient3173"
+ gradientUnits="userSpaceOnUse"
+ x1="-9.5219469"
+ y1="122.3622"
+ x2="567.62091"
+ y2="-23.352087" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="369.55257"
+ inkscape:cy="750.96613"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1018"
+ inkscape:window-height="710"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2" />
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ sodipodi:type="star"
+ style="opacity:0.95999995;fill:url(#linearGradient3165);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="path3157"
+ sodipodi:sides="3"
+ sodipodi:cx="170"
+ sodipodi:cy="248.07648"
+ sodipodi:r1="76.197914"
+ sodipodi:r2="38.098953"
+ sodipodi:arg1="0"
+ sodipodi:arg2="1.0471976"
+ inkscape:flatsided="false"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 246.19791,248.07648 L 189.04948,281.07114 L 131.90104,314.06581 L 131.90105,248.07648 L 131.90104,182.08715 L 189.04948,215.08182 L 246.19791,248.07648 z "
+ transform="matrix(0,0.8547291,-1.1082434,0,407.78631,67.649535)"
+ inkscape:export-filename="/tmp/downarrow.png"
+ inkscape:export-xdpi="7.3838849"
+ inkscape:export-ydpi="7.3838849" />
+ <path
+ sodipodi:type="star"
+ style="opacity:0.95999995;fill:url(#linearGradient3173);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="path3171"
+ sodipodi:sides="3"
+ sodipodi:cx="170"
+ sodipodi:cy="248.07648"
+ sodipodi:r1="76.197914"
+ sodipodi:r2="38.098953"
+ sodipodi:arg1="0"
+ sodipodi:arg2="1.0471976"
+ inkscape:flatsided="false"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 246.19791,248.07648 L 189.04948,281.07114 L 131.90104,314.06581 L 131.90105,248.07648 L 131.90104,182.08715 L 189.04948,215.08182 L 246.19791,248.07648 z "
+ transform="matrix(0.8547291,0,0,1.1082434,-51.586095,-168.28122)"
+ inkscape:export-filename="/tmp/rightarrow.png"
+ inkscape:export-xdpi="7.3838849"
+ inkscape:export-ydpi="7.3838849" />
+ <g
+ id="g7143"
+ transform="matrix(1.9467612,0,0,1.49,-171.55861,-412.48606)"
+ inkscape:export-filename="/tmp/branch.png"
+ inkscape:export-xdpi="7.3838849"
+ inkscape:export-ydpi="7.3838849">
+ <rect
+ style="opacity:0.95999995;fill:#63564d;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect5182"
+ width="72"
+ height="7.1428542"
+ x="287.14282"
+ y="361.64792"
+ rx="0"
+ ry="2.3969309" />
+ <rect
+ inkscape:export-ydpi="24.70105"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-filename="/tmp/vline.png"
+ style="opacity:0.95999995;fill:#63564d;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect5184"
+ width="142.85713"
+ height="7.2871542"
+ x="298.07648"
+ y="-286.58728"
+ rx="0"
+ ry="1.947962"
+ transform="matrix(0,1,-1,0,0,0)" />
+ <rect
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect5203"
+ width="72"
+ height="7.1428542"
+ x="206.85713"
+ y="361.64792"
+ rx="0"
+ ry="2.3969309" />
+ </g>
+ <rect
+ ry="3.5714271"
+ rx="0"
+ y="425.65506"
+ x="-33.231937"
+ height="10.642853"
+ width="140.16681"
+ id="rect7154"
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1" />
+ <g
+ id="g10132"
+ inkscape:export-filename="/tmp/branch2.png"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-ydpi="24.70105">
+ <rect
+ style="opacity:0.95999995;fill:#63564d;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect9152"
+ width="141.59538"
+ height="10.642853"
+ x="469.49371"
+ y="436.36935"
+ rx="0"
+ ry="3.5714271" />
+ <rect
+ inkscape:export-ydpi="24.70105"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-filename="/tmp/vline.png"
+ style="opacity:0.95999995;fill:#63564d;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect9154"
+ width="105.71427"
+ height="14.186349"
+ x="341.64789"
+ y="-469.84076"
+ rx="0"
+ ry="3.792217"
+ transform="matrix(0,1,-1,0,0,0)" />
+ <rect
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect9156"
+ width="140.16681"
+ height="10.642853"
+ x="314.62521"
+ y="436.36935"
+ rx="0"
+ ry="3.5714271" />
+ <rect
+ inkscape:export-ydpi="24.70105"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-filename="/tmp/vline.png"
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect9161"
+ width="107.14285"
+ height="13.140697"
+ x="447.36218"
+ y="-469.42749"
+ rx="0"
+ ry="3.7922168"
+ transform="matrix(0,1,-1,0,0,0)" />
+ </g>
+ <g
+ id="g11122"
+ inkscape:export-filename="/tmp/vline.png"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-ydpi="24.70105">
+ <rect
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect10144"
+ width="140.16681"
+ height="10.642853"
+ x="179.4937"
+ y="409.2265"
+ rx="0"
+ ry="3.5714271" />
+ <rect
+ inkscape:export-ydpi="24.70105"
+ inkscape:export-xdpi="24.70105"
+ inkscape:export-filename="/tmp/vline.png"
+ style="opacity:0.95999995;fill:#63564d;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect10146"
+ width="212.85713"
+ height="14.186349"
+ x="314.50507"
+ y="-178.41219"
+ rx="0"
+ ry="3.792217"
+ transform="matrix(0,1,-1,0,0,0)" />
+ <rect
+ style="opacity:0.95999995;fill:none;fill-opacity:0.50574712;fill-rule:nonzero;stroke:none;stroke-width:2.02099991;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:8;stroke-opacity:1"
+ id="rect10148"
+ width="140.16681"
+ height="10.642853"
+ x="23.196629"
+ y="409.2265"
+ rx="0"
+ ry="3.5714271" />
+ </g>
+ </g>
+</svg>
diff --git a/doc/src/diagrams/tcpstream.sk b/doc/src/diagrams/tcpstream.sk
new file mode 100644
index 0000000..6c1be60
--- /dev/null
+++ b/doc/src/diagrams/tcpstream.sk
@@ -0,0 +1,48 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(1083919052,'../images/complexwizard-evaluatepage.png')
+im((96.171,-22.9284),1083919052)
+G()
+bm(1083939916,'../images/complexwizard-finishpage.png')
+im((598.76,309.977),1083939916)
+bm(1083947948,'../images/complexwizard-titlepage.png')
+im((-426.888,309.977),1083947948)
+G_()
+G()
+bm(1083738188,'../images/complexwizard-detailspage.png')
+im((438.772,659.042),1083738188)
+bm(1083948908,'../images/complexwizard-registerpage.png')
+im((-246.43,659.042),1083948908)
+G_()
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-177.479,552.383,0)
+bs(-44.9634,640.727,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(661.786,645.036,0)
+bs(794.302,556.693,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(270.704,772.165,0)
+bs(403.219,772.165,0)
+fp((1,1,0))
+lp((1,0,0))
+lw(4)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(-166.705,280.888,0)
+bs(46.6125,138.676,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,0.5,0.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/threadsandobjects.sk b/doc/src/diagrams/threadsandobjects.sk
new file mode 100644
index 0000000..1523dad
--- /dev/null
+++ b/doc/src/diagrams/threadsandobjects.sk
@@ -0,0 +1,149 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+fp((0.808,0.89,1))
+lw(1)
+e(108.938,0,0,-67.3351,546.062,772.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QThread::exec()',(502.382,747.769))
+lw(2)
+lc(2)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(37.5,0,0,-12.5,546.062,775.165,4.77896,4.51499,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Thread B',(509.045,812.871))
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,467.124,805.39,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,597.124,770.39,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,502.124,735.39,0.0957655,0.213075)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 8',(475.284,792.212))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 10',(601.948,757.212))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 9',(510.284,722.212))
+G_()
+G()
+fp((0.808,0.89,1))
+lw(1)
+e(108.938,0,0,-67.3351,61.062,772.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QThread::exec()',(17.382,747.769))
+lw(2)
+lc(2)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(37.5,0,0,-12.5,61.062,775.165,4.77896,4.51499,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Thread A',(24.045,812.871))
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,-30,800.165,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,115,790.39,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,50,735.165,0.0957655,0.213075)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 5',(-21.84,786.986))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 7',(123.16,777.212))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 6',(58.16,721.986))
+G_()
+G()
+fp((0.737,1,0.849))
+lw(1)
+r(215,0,0,-125,197.5,835,0.0465116,0.08)
+lw(2)
+lc(2)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+e(37.5,0,0,-12.5,304.55,777.5,4.77896,4.51499,0)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Main Thread',(254.483,812.706))
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,207.5,795.225,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,357.5,805,0.0957655,0.213075)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 1',(215.66,782.047))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 4',(365.66,791.821))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('QApplication::exec()',(250.982,750.104))
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,352.5,740.225,0.0957655,0.213075)
+fp((1,0.616,0.639))
+lw(1)
+r(45,0,0,-20.225,222.5,740.225,0.0957655,0.213075)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 3',(360.66,727.047))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Obj 2',(230.66,727.047))
+G_()
+le()
+lw(1)
+r(725,0,0,-155,-60,850)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/treemodel-structure.sk b/doc/src/diagrams/treemodel-structure.sk
new file mode 100644
index 0000000..a76246c
--- /dev/null
+++ b/doc/src/diagrams/treemodel-structure.sk
@@ -0,0 +1,114 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+le()
+lw(1)
+r(165,0,0,-300,30,785)
+lw(1)
+ld((3, 3))
+b()
+bs(55,520,0)
+bs(55,495,0)
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,40,775)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica-Bold')
+txt('Root item (empty)',(80,756.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(110,716.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 0',(145,676.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('A',(83.33,713.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('B',(118.33,633.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('C',(82.78,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(145,636.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 1',(110,556.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(145,596.384))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('row = 2',(110,516.384))
+lw(1)
+b()
+bs(55,745,0)
+bs(55,520,0)
+lw(1)
+r(30,0,0,-30,110,695)
+lw(1)
+b()
+bs(90,680,0)
+bs(110,680,0)
+lw(1)
+r(30,0,0,-30,110,655)
+lw(1)
+r(30,0,0,-30,110,615)
+lw(1)
+r(30,0,0,-30,75,535)
+lw(1)
+r(30,0,0,-30,75,575)
+lw(1)
+b()
+bs(90,640,0)
+bs(110,640,0)
+lw(1)
+b()
+bs(90,600,0)
+bs(110,600,0)
+lw(1)
+b()
+bs(55,520,0)
+bs(75,520,0)
+lw(1)
+b()
+bs(55,560,0)
+bs(75,560,0)
+lw(1)
+b()
+bs(90,705,0)
+bs(90,600,0)
+lw(1)
+r(30,0,0,-30,75,735)
+lw(1)
+b()
+bs(55,720,0)
+bs(75,720,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/tutorial8-layout.sk b/doc/src/diagrams/tutorial8-layout.sk
new file mode 100644
index 0000000..f4ea2de
--- /dev/null
+++ b/doc/src/diagrams/tutorial8-layout.sk
@@ -0,0 +1,55 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((0.65,0.748,0.919))
+lw(1)
+r(74,0,0,-36,84,776)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(1, 0)',(106.996,754.934))
+fp((0.65,0.748,0.919))
+lw(1)
+r(104,0,0,-80,166,776)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(1, 1)',(203.996,754.934))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(2, 1)',(203.996,710.934))
+fp((1,1,1))
+lp((0.5,0.5,0.5))
+lw(1)
+r(74,0,0,-36,84,732)
+fp((0.5,0.5,0.5))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(2, 0)',(106.996,710.934))
+fp((1,1,1))
+lp((0.5,0.5,0.5))
+lw(1)
+r(104,0,0,-28,166,812)
+fp((0.5,0.5,0.5))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(0, 1)',(203.996,794.934))
+fp((0.65,0.748,0.919))
+lw(1)
+r(73.8045,0,0,-28,84.1955,812)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('(0, 0)',(107.094,794.934))
+lw(1)
+r(202,0,0,-132,76,820)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2,2),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/udppackets.sk b/doc/src/diagrams/udppackets.sk
new file mode 100644
index 0000000..71a94cc
--- /dev/null
+++ b/doc/src/diagrams/udppackets.sk
@@ -0,0 +1,128 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0.217,0.6,0))
+lw(2)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(342.5,680,0)
+bs(182.5,680,0)
+lp((0.217,0.6,0))
+lw(2)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(162.5,712.5,0)
+bs(327.5,712.5,0)
+fp((0.245,0.484,0.808))
+lw(1)
+r(95,0,0,-56.1059,335,725)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('UDP Receiver',(344.496,693.881))
+fp((0.808,0.4,0.4))
+lw(1)
+r(95,0,0,-55,80,725)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('UDP Sender',(93.822,694.434))
+le()
+lw(1)
+r(360,0,0,-65,75,730)
+fp((0.217,0.6,0))
+lp((0.217,0.6,0))
+lw(1)
+r(27.5,0,0,-25,202.5,725)
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('01011',(204.443,717.828))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('10110',(204.443,710.328))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('11010',(204.443,702.828))
+fp((0.217,0.6,0))
+lp((0.217,0.6,0))
+lw(1)
+r(27.5,0,0,-25,222.5,692.5)
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('10100',(224.443,685.328))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('01101',(224.443,677.828))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('10110',(224.443,670.328))
+fp((0.217,0.6,0))
+lp((0.217,0.6,0))
+lw(1)
+r(27.5,0,0,-25,280,692.5)
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('01100',(281.943,685.328))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('10101',(281.943,677.828))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('01100',(281.943,670.328))
+fp((0.217,0.6,0))
+lp((0.217,0.6,0))
+lw(1)
+r(27.5,0,0,-25,260,725)
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('11010',(261.943,717.828))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('10101',(261.943,710.328))
+fp((1,0.97,0))
+le()
+lw(1)
+Fn('Courier-Bold')
+Fs(8)
+txt('01110',(261.943,702.828))
+le()
+lw(1)
+r(360,0,0,-67.5,75,730)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/wVista-Cert-border.png b/doc/src/diagrams/wVista-Cert-border.png
new file mode 100644
index 0000000..5b0f1ba
--- /dev/null
+++ b/doc/src/diagrams/wVista-Cert-border.png
Binary files differ
diff --git a/doc/src/diagrams/widgetmapper/sql-widget-mapper.png b/doc/src/diagrams/widgetmapper/sql-widget-mapper.png
new file mode 100644
index 0000000..0ef3e40
--- /dev/null
+++ b/doc/src/diagrams/widgetmapper/sql-widget-mapper.png
Binary files differ
diff --git a/doc/src/diagrams/widgetmapper/widgetmapper-sql-mapping.sk b/doc/src/diagrams/widgetmapper/widgetmapper-sql-mapping.sk
new file mode 100644
index 0000000..dedac0d
--- /dev/null
+++ b/doc/src/diagrams/widgetmapper/widgetmapper-sql-mapping.sk
@@ -0,0 +1,246 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+bm(140229452,'sql-widget-mapper.png')
+im((70,477.5),140229452)
+lp((1,1,1))
+lw(3)
+lj(1)
+b()
+bs(145,747.5,0)
+bc(145,722.5,142.5,697.5,152.5,657.5,1)
+lw(1)
+r(37.5,0,0,-30,305,742.5)
+fp((0.753,1,0.753))
+lw(1)
+r(37.5,0,0,-30,305,772.5)
+lp((1,1,1))
+lw(2.75)
+b()
+bs(402.5,722.5,1)
+bc(365,725,350,732.5,335,747.5,0)
+fp((0.753,1,0.753))
+lw(1)
+r(82.5,0,0,-30,410,742.5)
+lp((1,1,1))
+lw(3)
+b()
+bs(404.376,716.319,1)
+bc(397.281,600.953,335.819,523.389,202.5,505,0)
+fp((0.753,0.753,1))
+lw(1)
+r(155,0,0,-30,150,772.5)
+lw(1)
+r(155,0,0,-30,150,742.5)
+fp((1,0.753,0.753))
+lw(1)
+r(69.9999,0,0,-30,80,772.5)
+lw(1)
+r(69.9999,0,0,-30,80,742.5)
+lw(1)
+r(69.9999,0,0,-30,80,802.5)
+lw(1)
+r(37.5,0,0,-30,305,802.5)
+lw(1)
+r(155,0,0,-30,150,802.5)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Carol',(93.499,751.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Donald',(85,721.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Bob',(98.989,781.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('PO Box 32',(154.48,789.692))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Mail Handling Service',(154.48,775.792))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('47338 Park Avenue',(156.142,729.692))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Big City',(156.142,716.384))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('The Lighthouse',(156.142,759.692))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+txt('Remote Island',(156.142,745.792))
+G_()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('101',(382.5,790.398))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('102',(382.5,760.398))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(14)
+txt('103',(382.5,730.398))
+fp((0,0,0))
+le()
+lw(1)
+b()
+bs(345,757.5,0)
+bs(355,750,0)
+bs(355,755,0)
+bs(365,755,0)
+bs(365,760,0)
+bs(355,760,0)
+bs(355,765,0)
+bs(345,757.5,0)
+bC()
+lw(1)
+ld((2, 2))
+b()
+bs(80,713.092,0)
+bs(80,700.592,0)
+lw(1)
+ld((2, 2))
+b()
+bs(80,815,0)
+bs(80,802.5,0)
+lw(1)
+ld((2, 2))
+b()
+bs(150,712.5,0)
+bs(150,700,0)
+lw(1)
+ld((2, 2))
+b()
+bs(150,815,0)
+bs(150,802.5,0)
+lw(1)
+ld((2, 2))
+b()
+bs(305,713.092,0)
+bs(305,700.592,0)
+lw(1)
+ld((2, 2))
+b()
+bs(305,815,0)
+bs(305,802.5,0)
+lw(1)
+ld((2, 2))
+b()
+bs(342.5,712.5,0)
+bs(342.5,700,0)
+lw(1)
+ld((2, 2))
+b()
+bs(342.5,816.908,0)
+bs(342.5,804.408,0)
+lp((1,1,1))
+lw(3)
+lj(1)
+b()
+bs(287.002,750,1)
+bc(299.502,720,302.002,647.5,259.502,602.5,0)
+lp((0,0,0.627))
+lw(2)
+lj(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(287.002,750,1)
+bc(299.502,720,302.002,647.5,259.502,602.5,0)
+lp((0.624,0,0))
+lw(2)
+lj(1)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(145,747.5,0)
+bc(145,722.5,142.5,697.5,152.5,657.5,1)
+lp((0,0.624,0))
+lw(2)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(404.376,716.319,1)
+bc(397.281,600.953,335.819,523.389,202.5,505,0)
+lp((0,0.624,0))
+lw(1.75)
+la1(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(402.5,722.5,1)
+bc(365,725,350,732.5,335,747.5,0)
+fp((1,1,1))
+lw(1)
+r(82.5,0,0,-30,410,772.5)
+lw(1)
+r(82.5,0,0,-30,410,802.5)
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('103',(308.738,751.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('101',(308.738,721.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('102',(308.738,781.226))
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Work',(430.253,751.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Other',(428.741,721.226))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(18)
+txt('Home',(427.247,781.226))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/windowsxp-menu.png b/doc/src/diagrams/windowsxp-menu.png
new file mode 100644
index 0000000..a1fda3f
--- /dev/null
+++ b/doc/src/diagrams/windowsxp-menu.png
Binary files differ
diff --git a/doc/src/diagrams/worldtimeclock-connection.zip b/doc/src/diagrams/worldtimeclock-connection.zip
new file mode 100644
index 0000000..8303215
--- /dev/null
+++ b/doc/src/diagrams/worldtimeclock-connection.zip
Binary files differ
diff --git a/doc/src/diagrams/worldtimeclockplugin-example.zip b/doc/src/diagrams/worldtimeclockplugin-example.zip
new file mode 100644
index 0000000..ef2f6e4
--- /dev/null
+++ b/doc/src/diagrams/worldtimeclockplugin-example.zip
Binary files differ
diff --git a/doc/src/diagrams/x11_dependencies.sk b/doc/src/diagrams/x11_dependencies.sk
new file mode 100644
index 0000000..5f6b304
--- /dev/null
+++ b/doc/src/diagrams/x11_dependencies.sk
@@ -0,0 +1,1416 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+fp((0,0,0))
+le()
+b()
+bs(268.8,339.25,0)
+bs(268.8,337.15,0)
+bs(352.8,337.15,0)
+bs(352.8,362.2,0)
+bs(350.7,362.2,0)
+bs(350.7,339.25,0)
+bs(268.8,339.25,0)
+bC()
+fp((0.59,0.99,0))
+le()
+b()
+bs(266.7,339.25,0)
+bs(350.7,339.25,0)
+bs(350.7,364.3,0)
+bs(266.7,364.3,0)
+bs(266.7,339.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,339.25,0)
+bs(350.7,339.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,339.25,0)
+bs(350.7,364.3,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,364.3,0)
+bs(266.7,364.3,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,364.3,0)
+bs(266.7,339.25,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('QtGui',(290.95,347))
+fp((0,0,0))
+le()
+b()
+bs(111.3,280.05,0)
+bs(111.3,277.95,0)
+bs(195.3,277.95,0)
+bs(195.3,302.15,0)
+bs(193.2,302.15,0)
+bs(193.2,280.05,0)
+bs(111.3,280.05,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(109.2,280.05,0)
+bs(193.2,280.05,0)
+bs(193.2,304.25,0)
+bs(109.2,304.25,0)
+bs(109.2,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(109.2,280.05,0)
+bs(193.2,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(193.2,280.05,0)
+bs(193.2,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(193.2,304.25,0)
+bs(109.2,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(109.2,304.25,0)
+bs(109.2,280.05,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xcursor',(127.15,287.25))
+fp((0,0,0))
+le()
+b()
+bs(268.8,280.05,0)
+bs(268.8,277.95,0)
+bs(352.8,277.95,0)
+bs(352.8,302.15,0)
+bs(350.7,302.15,0)
+bs(350.7,280.05,0)
+bs(268.8,280.05,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(266.7,280.05,0)
+bs(350.7,280.05,0)
+bs(350.7,304.25,0)
+bs(266.7,304.25,0)
+bs(266.7,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,280.05,0)
+bs(350.7,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,280.05,0)
+bs(350.7,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,304.25,0)
+bs(266.7,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,304.25,0)
+bs(266.7,280.05,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xr',(287.8,287.25))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('andr',(301.7,287.25))
+fp((0,0,0))
+le()
+b()
+bs(426.3,280.05,0)
+bs(426.3,277.95,0)
+bs(510.3,277.95,0)
+bs(510.3,302.15,0)
+bs(508.2,302.15,0)
+bs(508.2,280.05,0)
+bs(426.3,280.05,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(424.2,280.05,0)
+bs(508.2,280.05,0)
+bs(508.2,304.25,0)
+bs(424.2,304.25,0)
+bs(424.2,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,280.05,0)
+bs(508.2,280.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,280.05,0)
+bs(508.2,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,304.25,0)
+bs(424.2,304.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,304.25,0)
+bs(424.2,280.05,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xiner',(436.55,287.25))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('ama',(469.125,287.25))
+fp((0,0,0))
+le()
+b()
+bs(561.2,280.15,0)
+bs(561.2,278.05,0)
+bs(645.2,278.05,0)
+bs(645.2,302.05,0)
+bs(643.1,302.05,0)
+bs(643.1,280.15,0)
+bs(561.2,280.15,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(559.1,280.15,0)
+bs(643.1,280.15,0)
+bs(643.1,304.15,0)
+bs(559.1,304.15,0)
+bs(559.1,280.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(559.1,280.15,0)
+bs(643.1,280.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(643.1,280.15,0)
+bs(643.1,304.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(643.1,304.15,0)
+bs(559.1,304.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(559.1,304.15,0)
+bs(559.1,280.15,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xi',(595.35,287.15))
+fp((0,0,0))
+le()
+b()
+bs(268.8,220.85,0)
+bs(268.8,218.75,0)
+bs(352.8,218.75,0)
+bs(352.8,242.95,0)
+bs(350.7,242.95,0)
+bs(350.7,220.85,0)
+bs(268.8,220.85,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(266.7,220.85,0)
+bs(350.7,220.85,0)
+bs(350.7,245.05,0)
+bs(266.7,245.05,0)
+bs(266.7,220.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,220.85,0)
+bs(350.7,220.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,220.85,0)
+bs(350.7,245.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,245.05,0)
+bs(266.7,245.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,245.05,0)
+bs(266.7,220.85,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('XRender',(281.15,228.05))
+fp((0,0,0))
+le()
+b()
+bs(662,220.95,0)
+bs(662,218.85,0)
+bs(746,218.85,0)
+bs(746,242.95,0)
+bs(743.9,242.95,0)
+bs(743.9,220.95,0)
+bs(662,220.95,0)
+bC()
+fp((0.961,0.961,0.863))
+le()
+b()
+bs(659.9,220.95,0)
+bs(743.9,220.95,0)
+bs(743.9,245.05,0)
+bs(659.9,245.05,0)
+bs(659.9,220.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,220.95,0)
+bs(743.9,220.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,220.95,0)
+bs(743.9,245.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,245.05,0)
+bs(659.9,245.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,245.05,0)
+bs(659.9,220.95,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xt*',(692.9,228.05))
+fp((0,0,0))
+le()
+b()
+bs(10.4998,160.8,0)
+bs(10.4998,158.7,0)
+bs(94.4998,158.7,0)
+bs(94.4998,183.75,0)
+bs(92.3999,183.75,0)
+bs(92.3999,160.8,0)
+bs(10.4998,160.8,0)
+bC()
+fp((0.61,0.61,1))
+le()
+b()
+bs(8.3999,160.8,0)
+bs(92.3999,160.8,0)
+bs(92.3999,185.85,0)
+bs(8.3999,185.85,0)
+bs(8.3999,160.8,0)
+lw(1.12)
+lc(2)
+b()
+bs(8.3999,160.8,0)
+bs(92.3999,160.8,0)
+lw(1.12)
+lc(2)
+b()
+bs(92.3999,160.8,0)
+bs(92.3999,185.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(92.3999,185.85,0)
+bs(8.3999,185.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(8.3999,185.85,0)
+bs(8.3999,160.8,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('QtCore',(28.1997,168.55))
+fp((0,0,0))
+le()
+b()
+bs(268.8,161.15,0)
+bs(268.8,159.05,0)
+bs(352.8,159.05,0)
+bs(352.8,183.4,0)
+bs(350.7,183.4,0)
+bs(350.7,161.15,0)
+bs(268.8,161.15,0)
+bC()
+fp((0.792,0.882,1))
+le()
+b()
+bs(266.7,161.15,0)
+bs(350.7,161.15,0)
+bs(350.7,185.5,0)
+bs(266.7,185.5,0)
+bs(266.7,161.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,161.15,0)
+bs(350.7,161.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,161.15,0)
+bs(350.7,185.5,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,185.5,0)
+bs(266.7,185.5,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,185.5,0)
+bs(266.7,161.15,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xfix',(290.1,168.35))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('es',(313.038,168.35))
+fp((0,0,0))
+le()
+b()
+bs(426.3,161.25,0)
+bs(426.3,159.15,0)
+bs(510.3,159.15,0)
+bs(510.3,183.35,0)
+bs(508.2,183.35,0)
+bs(508.2,161.25,0)
+bs(426.3,161.25,0)
+bC()
+fp((0.961,0.961,0.863))
+le()
+b()
+bs(424.2,161.25,0)
+bs(508.2,161.25,0)
+bs(508.2,185.45,0)
+bs(424.2,185.45,0)
+bs(424.2,161.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,161.25,0)
+bs(508.2,161.25,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,161.25,0)
+bs(508.2,185.45,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,185.45,0)
+bs(424.2,185.45,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,185.45,0)
+bs(424.2,161.25,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Xe',(452.55,168.45))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('xt',(469.272,168.45))
+fp((0,0,0))
+le()
+b()
+bs(662,161.05,0)
+bs(662,158.95,0)
+bs(746,158.95,0)
+bs(746,183.5,0)
+bs(743.9,183.5,0)
+bs(743.9,161.05,0)
+bs(662,161.05,0)
+bC()
+fp((0.761,0.98,0.98))
+le()
+b()
+bs(659.9,161.05,0)
+bs(743.9,161.05,0)
+bs(743.9,185.6,0)
+bs(659.9,185.6,0)
+bs(659.9,161.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,161.05,0)
+bs(743.9,161.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,161.05,0)
+bs(743.9,185.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,185.6,0)
+bs(659.9,185.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,185.6,0)
+bs(659.9,161.05,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('SM',(691.9,168.3))
+fp((0,0,0))
+le()
+b()
+bs(10.4998,98.9001,0)
+bs(10.4998,96.8003,0)
+bs(94.4998,96.8003,0)
+bs(94.4998,123.7,0)
+bs(92.3999,123.7,0)
+bs(92.3999,98.9001,0)
+bs(10.4998,98.9001,0)
+bC()
+fp((0.741,0.718,0.42))
+le()
+b()
+bs(8.3999,98.9001,0)
+bs(92.3999,98.9001,0)
+bs(92.3999,125.8,0)
+bs(8.3999,125.8,0)
+bs(8.3999,98.9001,0)
+lw(1.12)
+lc(2)
+b()
+bs(8.3999,98.9001,0)
+bs(92.3999,98.9001,0)
+lw(1.12)
+lc(2)
+b()
+bs(92.3999,98.9001,0)
+bs(92.3999,125.8,0)
+lw(1.12)
+lc(2)
+b()
+bs(92.3999,125.8,0)
+bs(8.3999,125.8,0)
+lw(1.12)
+lc(2)
+b()
+bs(8.3999,125.8,0)
+bs(8.3999,98.9001,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('pthread',(27.1499,108.8))
+fp((0,0,0))
+le()
+b()
+bs(111.3,100.1,0)
+bs(111.3,98.0002,0)
+bs(195.3,98.0002,0)
+bs(195.3,122.55,0)
+bs(193.2,122.55,0)
+bs(193.2,100.1,0)
+bs(111.3,100.1,0)
+bC()
+fp((0.7,0.7,0.7))
+le()
+b()
+bs(109.2,100.1,0)
+bs(193.2,100.1,0)
+bs(193.2,124.65,0)
+bs(109.2,124.65,0)
+bs(109.2,100.1,0)
+lw(1.12)
+lc(2)
+b()
+bs(109.2,100.1,0)
+bs(193.2,100.1,0)
+lw(1.12)
+lc(2)
+b()
+bs(193.2,100.1,0)
+bs(193.2,124.65,0)
+lw(1.12)
+lc(2)
+b()
+bs(193.2,124.65,0)
+bs(109.2,124.65,0)
+lw(1.12)
+lc(2)
+b()
+bs(109.2,124.65,0)
+bs(109.2,100.1,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('Glib',(139.05,107.35))
+fp((0,0,0))
+le()
+b()
+bs(426.3,100.35,0)
+bs(426.3,98.2502,0)
+bs(510.3,98.2502,0)
+bs(510.3,122.25,0)
+bs(508.2,122.25,0)
+bs(508.2,100.35,0)
+bs(426.3,100.35,0)
+bC()
+fp((0.961,0.961,0.863))
+le()
+b()
+bs(424.2,100.35,0)
+bs(508.2,100.35,0)
+bs(508.2,124.35,0)
+bs(424.2,124.35,0)
+bs(424.2,100.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,100.35,0)
+bs(508.2,100.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,100.35,0)
+bs(508.2,124.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(508.2,124.35,0)
+bs(424.2,124.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(424.2,124.35,0)
+bs(424.2,100.35,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('X11',(455.15,107.35))
+fp((0,0,0))
+le()
+b()
+bs(662,100.1,0)
+bs(662,98.0002,0)
+bs(746,98.0002,0)
+bs(746,122.55,0)
+bs(743.9,122.55,0)
+bs(743.9,100.1,0)
+bs(662,100.1,0)
+bC()
+fp((0.761,0.98,0.98))
+le()
+b()
+bs(659.9,100.1,0)
+bs(743.9,100.1,0)
+bs(743.9,124.65,0)
+bs(659.9,124.65,0)
+bs(659.9,100.1,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,100.1,0)
+bs(743.9,100.1,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,100.1,0)
+bs(743.9,124.65,0)
+lw(1.12)
+lc(2)
+b()
+bs(743.9,124.65,0)
+bs(659.9,124.65,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,124.65,0)
+bs(659.9,100.1,0)
+fp((0,0,0))
+Fn('Helvetica')
+Fs(14)
+txt('ICE',(690.6,107.35))
+fp((0,0,0))
+Fn('Helvetica')
+txt('some',(585.05,38.7002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('configur',(617.15,38.7002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('ations',(659.733,38.7002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('only',(694.4,38.7002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('*',(568.85,22.5002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('Xt',(585.05,22.5002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('intr',(599.4,22.5002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('insics',(616.217,22.5002))
+fp((0,0,0))
+Fn('Helvetica')
+txt('only',(648.95,22.5002))
+lw(1.12)
+lc(2)
+ld((0, 2.4999899999999999))
+b()
+bs(308.7,339.25,0)
+bs(308.7,328.05,0)
+lw(1.12)
+lc(2)
+ld((0, 2.0312000000000001))
+b()
+bs(308.7,328.05,0)
+bs(308.7,332.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(308.7,332.6,0)
+bs(308.7,332.6,0)
+bc(308.7,330.744,309.438,328.963,310.75,327.651,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543599999999999))
+b()
+bs(310.75,327.65,0)
+bs(310.75,327.651,0)
+bc(312.063,326.338,313.844,325.6,315.7,325.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4639500000000001))
+b()
+bs(315.7,325.6,0)
+bs(387.45,325.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4639500000000001))
+b()
+bs(387.45,325.6,0)
+bs(459.2,325.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(459.2,325.6,0)
+bs(459.2,325.6,0)
+bc(461.056,325.6,462.837,324.863,464.15,323.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(464.15,323.55,0)
+bs(464.15,323.55,0)
+bc(465.462,322.237,466.2,320.457,466.2,318.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.3437899999999998))
+b()
+bs(466.2,318.6,0)
+bs(466.2,313.35,0)
+lw(1.12)
+lc(2)
+ld((0, 2.5))
+b()
+bs(466.2,313.35,0)
+bs(466.2,311.95,0)
+fp((0,0,0))
+le()
+b()
+bs(462.35,311.95,0)
+bs(466.199,304.25,0)
+bs(470.05,311.95,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4999899999999999))
+b()
+bs(308.7,339.25,0)
+bs(308.7,328.05,0)
+lw(1.12)
+lc(2)
+ld((0, 2.0088900000000001))
+b()
+bs(308.7,328.05,0)
+bs(308.7,332.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(308.7,332.55,0)
+bs(308.7,332.55,0)
+bc(308.7,330.694,309.438,328.913,310.75,327.601,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543599999999999))
+b()
+bs(310.75,327.6,0)
+bs(310.75,327.601,0)
+bc(312.063,326.288,313.844,325.55,315.7,325.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4857100000000001))
+b()
+bs(459.2,325.6,0)
+bs(594.1,325.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543900000000001))
+b()
+bs(594.1,325.55,0)
+bs(594.1,325.55,0)
+bc(595.956,325.55,597.737,324.813,599.05,323.5,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4544100000000002))
+b()
+bs(599.05,323.5,0)
+bs(599.05,323.5,0)
+bc(600.362,322.187,601.1,320.407,601.1,318.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.3660899999999998))
+b()
+bs(601.1,318.55,0)
+bs(601.1,313.25,0)
+lw(1.12)
+lc(2)
+ld((0, 2.5))
+b()
+bs(601.1,313.25,0)
+bs(601.1,311.85,0)
+fp((0,0,0))
+le()
+b()
+bs(597.25,311.85,0)
+bs(601.099,304.15,0)
+bs(604.949,311.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(266.7,351.775,0)
+bs(255.5,351.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(255.5,351.775,0)
+bs(57.3999,351.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(57.3999,351.775,0)
+bs(57.3999,351.775,0)
+bc(53.5339,351.775,50.3999,348.641,50.3999,344.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(50.3999,344.775,0)
+bs(50.3999,194.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(50.3999,194.95,0)
+bs(50.3999,193.55,0)
+fp((0,0,0))
+le()
+b()
+bs(46.5496,193.55,0)
+bs(50.3994,185.85,0)
+bs(54.2495,193.55,0)
+lw(1.12)
+lc(2)
+b()
+bs(50.3999,160.8,0)
+bs(50.3999,133.5,0)
+fp((0,0,0))
+le()
+b()
+bs(46.5496,133.5,0)
+bs(50.3994,125.8,0)
+bs(54.2495,133.5,0)
+lw(1.12)
+lc(2)
+ld((0, 2))
+b()
+bs(50.3999,160.8,0)
+bs(50.3999,149.6,0)
+lw(1.12)
+lc(2)
+ld((0, 1.7745500000000001))
+b()
+bs(50.3999,149.6,0)
+bs(50.3999,153.575,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543599999999999))
+b()
+bs(50.3999,153.575,0)
+bs(50.3999,153.575,0)
+bc(50.3999,151.719,51.1375,149.938,52.4502,148.625,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543699999999999))
+b()
+bs(52.45,148.625,0)
+bs(52.4502,148.625,0)
+bc(53.7629,147.313,55.5435,146.575,57.3999,146.575,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4218799999999998))
+b()
+bs(57.3999,146.575,0)
+bs(100.8,146.575,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4218799999999998))
+b()
+bs(100.8,146.575,0)
+bs(144.2,146.575,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(144.2,146.575,0)
+bs(144.2,146.575,0)
+bc(146.056,146.575,147.837,145.838,149.15,144.525,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543699999999999))
+b()
+bs(149.15,144.525,0)
+bs(149.15,144.525,0)
+bc(150.462,143.212,151.2,141.432,151.2,139.575,0)
+lw(1.12)
+lc(2)
+ld((0, 1.73363))
+b()
+bs(151.2,139.575,0)
+bs(151.2,133.75,0)
+lw(1.12)
+lc(2)
+ld((0, 2.5))
+b()
+bs(151.2,133.75,0)
+bs(151.2,132.35,0)
+fp((0,0,0))
+le()
+b()
+bs(147.35,132.35,0)
+bs(151.199,124.65,0)
+bs(155.05,132.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,351.775,0)
+bs(361.9,351.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(361.9,351.775,0)
+bs(694.9,351.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(694.9,351.775,0)
+bs(694.9,351.775,0)
+bc(698.766,351.775,701.9,348.641,701.9,344.775,0)
+lw(1.12)
+lc(2)
+b()
+bs(701.9,344.775,0)
+bs(701.9,254.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(701.9,254.15,0)
+bs(701.9,252.75,0)
+fp((0,0,0))
+le()
+b()
+bs(698.05,252.75,0)
+bs(701.899,245.05,0)
+bs(705.75,252.75,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4375200000000001))
+b()
+bs(308.7,339.25,0)
+bs(308.7,311.95,0)
+fp((0,0,0))
+le()
+b()
+bs(304.85,311.95,0)
+bs(308.699,304.25,0)
+bs(312.55,311.95,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4999899999999999))
+b()
+bs(308.7,339.25,0)
+bs(308.7,328.05,0)
+lw(1.12)
+lc(2)
+ld((0, 2.0312000000000001))
+b()
+bs(308.7,328.05,0)
+bs(308.7,332.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(308.7,332.6,0)
+bs(308.7,332.6,0)
+bc(308.7,330.744,307.962,328.963,306.65,327.651,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(306.65,327.65,0)
+bs(306.65,327.651,0)
+bc(305.337,326.338,303.556,325.601,301.7,325.601,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4639500000000001))
+b()
+bs(301.7,325.6,0)
+bs(229.95,325.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4639500000000001))
+b()
+bs(229.95,325.6,0)
+bs(158.2,325.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.4543699999999999))
+b()
+bs(158.2,325.6,0)
+bs(158.2,325.6,0)
+bc(156.344,325.6,154.563,324.863,153.25,323.55,0)
+lw(1.12)
+lc(2)
+ld((0, 2.45438))
+b()
+bs(153.25,323.55,0)
+bs(153.25,323.55,0)
+bc(151.938,322.237,151.2,320.457,151.2,318.6,0)
+lw(1.12)
+lc(2)
+ld((0, 2.3437899999999998))
+b()
+bs(151.2,318.6,0)
+bs(151.2,313.35,0)
+lw(1.12)
+lc(2)
+ld((0, 2.5))
+b()
+bs(151.2,313.35,0)
+bs(151.2,311.95,0)
+fp((0,0,0))
+le()
+b()
+bs(147.35,311.95,0)
+bs(151.199,304.25,0)
+bs(155.05,311.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(308.7,280.05,0)
+bs(308.7,252.75,0)
+fp((0,0,0))
+le()
+b()
+bs(304.85,252.75,0)
+bs(308.699,245.05,0)
+bs(312.55,252.75,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,280.05,0)
+bs(466.2,193.15,0)
+fp((0,0,0))
+le()
+b()
+bs(462.35,193.15,0)
+bs(466.199,185.45,0)
+bs(470.05,193.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,280.05,0)
+bs(151.2,268.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,268.85,0)
+bs(151.2,239.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,239.95,0)
+bs(151.2,239.95,0)
+bc(151.2,236.084,154.334,232.95,158.2,232.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(158.2,232.95,0)
+bs(257.6,232.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(257.6,232.95,0)
+bs(259,232.95,0)
+fp((0,0,0))
+le()
+b()
+bs(259,229.1,0)
+bs(266.699,232.95,0)
+bs(259,236.8,0)
+lw(1.12)
+lc(2)
+b()
+bs(350.7,232.95,0)
+bs(361.9,232.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(361.9,232.95,0)
+bs(459.2,232.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(459.2,232.95,0)
+bs(459.2,232.95,0)
+bc(463.066,232.95,466.2,229.816,466.2,225.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,225.95,0)
+bs(466.2,194.55,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,194.55,0)
+bs(466.2,193.15,0)
+fp((0,0,0))
+le()
+b()
+bs(462.35,193.15,0)
+bs(466.199,185.45,0)
+bs(470.05,193.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(559.1,292.15,0)
+bs(547.9,292.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(547.9,292.15,0)
+bs(544.5,292.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(544.5,292.15,0)
+bs(544.5,292.15,0)
+bc(542.643,292.15,540.863,291.413,539.55,290.1,0)
+lw(1.12)
+lc(2)
+b()
+bs(539.55,290.1,0)
+bs(539.55,290.1,0)
+bc(538.238,288.787,537.5,287.007,537.5,285.15,0)
+lw(1.12)
+lc(2)
+b()
+bs(537.5,285.15,0)
+bs(537.5,232.75,0)
+lw(1.12)
+lc(2)
+b()
+bs(537.5,232.75,0)
+bs(537.5,180.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(537.5,180.35,0)
+bs(537.5,180.35,0)
+bc(537.5,178.494,536.762,176.713,535.449,175.401,0)
+lw(1.12)
+lc(2)
+b()
+bs(535.449,175.4,0)
+bs(535.449,175.401,0)
+bc(534.137,174.088,532.356,173.35,530.5,173.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(530.5,173.35,0)
+bs(517.3,173.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(517.3,173.35,0)
+bs(515.9,173.35,0)
+fp((0,0,0))
+le()
+b()
+bs(515.9,177.2,0)
+bs(508.2,173.351,0)
+bs(515.9,169.5,0)
+lw(1.12)
+lc(2)
+b()
+bs(701.9,220.95,0)
+bs(701.9,193.3,0)
+fp((0,0,0))
+le()
+b()
+bs(698.05,193.3,0)
+bs(701.899,185.6,0)
+bs(705.75,193.3,0)
+lw(1.12)
+lc(2)
+b()
+bs(659.9,233,0)
+bs(648.7,233,0)
+lw(1.12)
+lc(2)
+b()
+bs(648.7,233,0)
+bs(594.9,233,0)
+lw(1.12)
+lc(2)
+b()
+bs(594.9,233,0)
+bs(594.9,233,0)
+bc(593.043,233,591.263,232.263,589.95,230.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(589.95,230.95,0)
+bs(589.95,230.95,0)
+bc(588.638,229.637,587.9,227.857,587.9,226,0)
+lw(1.12)
+lc(2)
+b()
+bs(587.9,226,0)
+bs(587.9,172.675,0)
+lw(1.12)
+lc(2)
+b()
+bs(587.9,172.675,0)
+bs(587.9,119.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(587.9,119.35,0)
+bs(587.9,119.35,0)
+bc(587.9,117.494,587.162,115.713,585.85,114.401,0)
+lw(1.12)
+lc(2)
+b()
+bs(585.85,114.4,0)
+bs(585.85,114.401,0)
+bc(584.537,113.088,582.756,112.35,580.9,112.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(580.9,112.35,0)
+bs(517.3,112.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(517.3,112.35,0)
+bs(515.9,112.35,0)
+fp((0,0,0))
+le()
+b()
+bs(515.9,116.2,0)
+bs(508.2,112.35,0)
+bs(515.9,108.5,0)
+lw(1.12)
+lc(2)
+b()
+bs(701.9,161.05,0)
+bs(701.9,132.35,0)
+fp((0,0,0))
+le()
+b()
+bs(698.05,132.35,0)
+bs(701.899,124.65,0)
+bs(705.75,132.35,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,161.25,0)
+bs(466.2,132.05,0)
+fp((0,0,0))
+le()
+b()
+bs(462.35,132.05,0)
+bs(466.199,124.35,0)
+bs(470.05,132.05,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,280.05,0)
+bs(151.2,268.85,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,268.85,0)
+bs(151.2,180.325,0)
+lw(1.12)
+lc(2)
+b()
+bs(151.2,180.325,0)
+bs(151.2,180.325,0)
+bc(151.2,176.459,154.334,173.325,158.2,173.325,0)
+lw(1.12)
+lc(2)
+b()
+bs(158.2,173.325,0)
+bs(257.6,173.325,0)
+lw(1.12)
+lc(2)
+b()
+bs(257.6,173.325,0)
+bs(259,173.325,0)
+fp((0,0,0))
+le()
+b()
+bs(259,169.475,0)
+bs(266.699,173.325,0)
+bs(259,177.175,0)
+lw(1.12)
+lc(2)
+b()
+bs(308.7,161.15,0)
+bs(308.7,149.95,0)
+lw(1.12)
+lc(2)
+b()
+bs(308.7,149.95,0)
+bs(308.7,153.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(308.7,153.6,0)
+bs(308.7,153.6,0)
+bc(308.7,151.744,309.438,149.963,310.75,148.651,0)
+lw(1.12)
+lc(2)
+b()
+bs(310.75,148.65,0)
+bs(310.75,148.651,0)
+bc(312.063,147.338,313.844,146.6,315.7,146.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(315.7,146.6,0)
+bs(387.45,146.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(387.45,146.6,0)
+bs(459.2,146.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(459.2,146.6,0)
+bs(459.2,146.6,0)
+bc(461.056,146.6,462.837,145.863,464.15,144.55,0)
+lw(1.12)
+lc(2)
+b()
+bs(464.15,144.55,0)
+bs(464.15,144.55,0)
+bc(465.462,143.237,466.2,141.457,466.2,139.6,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,139.6,0)
+bs(466.2,133.45,0)
+lw(1.12)
+lc(2)
+b()
+bs(466.2,133.45,0)
+bs(466.2,132.05,0)
+fp((0,0,0))
+le()
+b()
+bs(462.35,132.05,0)
+bs(466.199,124.35,0)
+bs(470.05,132.05,0)
+lw(1.12)
+lc(2)
+ld((0, 2.2889599999999999))
+b()
+bs(552.65,41.8,0)
+bs(580.85,41.8,0)
+G_()
+G()
+fp((0,0,0))
+Fn('Helvetica')
+Fs(16)
+txt('libr',(341.317,393.4))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(16)
+txt('ar',(362.494,393.4))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(16)
+txt('y',(377.168,393.4))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(16)
+txt('dependencies',(389.267,393.4))
+fp((0,0,0))
+Fn('Helvetica')
+Fs(16)
+txt('Qt for X11',(265.517,393.4))
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/xmlpatterns-qobjectxmlmodel.png b/doc/src/diagrams/xmlpatterns-qobjectxmlmodel.png
new file mode 100644
index 0000000..69e5f15
--- /dev/null
+++ b/doc/src/diagrams/xmlpatterns-qobjectxmlmodel.png
Binary files differ
diff --git a/doc/src/distributingqt.qdoc b/doc/src/distributingqt.qdoc
new file mode 100644
index 0000000..9b88dc4
--- /dev/null
+++ b/doc/src/distributingqt.qdoc
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation on deploying Qt.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*
+\page distributingqt.html
+
+\title Deploying Qt Applications
+
+This document lists the platform-specific files needed to distribute
+Qt applications. We do not include any compiler-specific files that
+may also be required. (See also, \link winsystem.html Window
+System-specific Notes\endlink.)
+
+\tableofcontents
+
+Also see the "deployment" articles in
+\e{\link http://doc.trolltech.com/qq/ Qt Quarterly\endlink}:
+\list
+\i \link http://doc.trolltech.com/qq/qq09-mac-deployment.html
+Deploying Applications on Mac OS X\endlink
+\i \link http://doc.trolltech.com/qq/qq10-windows-deployment.html
+Deploying Applications on Windows\endlink
+\i \link http://doc.trolltech.com/qq/qq11-unix-deployment.html
+Deploying Applications on X11\endlink
+\endlist
+
+\section1 Static Qt Applications
+
+To distribute static Qt applications, you need the following file for
+all platforms:
+
+\list
+\i your application's executable
+\endlist
+
+\section1 Dynamic Qt Applications
+
+To distribute dynamic Qt applications, you will need the following
+files for all platforms:
+
+\list
+\i application executable
+\i the Qt library
+\endlist
+
+The Qt library must either be in the same directory as the application
+executable or in a directory which is included in the system library
+path.
+
+The library is provided by the following platform specific files:
+
+\table
+\header \i Platform \i File
+\row \i Windows \i \c qt[version].dll
+\row \i Unix/Linux \i \c libqt[version].so
+\row \i Mac \i \c libqt[version].dylib
+\endtable
+
+\e version includes the three version numbers.
+
+\section2 Distributing Plugins
+
+You must include any plugin files required by the application.
+
+Plugins must be put into a subdirectory under a directory known to
+Qt as a plugin directory. The subdirectory must have the name of the
+plugin category (e.g. \c styles, \c sqldrivers, \c designer, etc.).
+
+Qt searches in the following directories for plugin categories:
+
+\list
+\i Application specific plugin paths
+\i Build-directory of Qt
+\i The application directory
+\endlist
+
+Application specific plugin paths can be added using
+QCoreApplication::addLibraryPath(). The build-directory of Qt is hardcoded
+in the Qt library and can be changed as a part of the installation
+process.
+
+\section1 Dynamic Dialogs
+
+For dynamic dialogs if you use QWidgetFactory, you need the following
+files for all platforms:
+
+\list
+\i The same files as used for dynamic Qt applications
+\i The QUI Library
+\endlist
+
+The QUI library is provided by the following platform specific files:
+\table
+\header \i Platform \i File
+\row \i Windows \i\c qui.lib
+\row \i Unix/Linux \i\c libqui.so
+\row \i Mac \i \c libqui.dylib
+\endtable
+
+The QUI library must either be in the same directory as the
+application executable or in a directory which is included in the
+system library path.
+
+*/
diff --git a/doc/src/dnd.qdoc b/doc/src/dnd.qdoc
new file mode 100644
index 0000000..119922b
--- /dev/null
+++ b/doc/src/dnd.qdoc
@@ -0,0 +1,543 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page dnd.html
+ \title Drag and Drop
+ \ingroup architecture
+ \brief An overview of the drag and drop system provided by Qt.
+
+ Drag and drop provides a simple visual mechanism which users can use
+ to transfer information between and within applications. (In the
+ literature this is referred to as a "direct manipulation model".) Drag
+ and drop is similar in function to the clipboard's cut and paste
+ mechanism.
+
+ \tableofcontents
+
+ This document describes the basic drag and drop mechanism and
+ outlines the approach used to enable it in custom widgets. Drag
+ and drop operations are also supported by Qt's item views and by
+ the graphics view framework; more information is available in the
+ \l{Using Drag and Drop with Item Views} and \l{The Graphics View
+ Framework} documents.
+
+ \section1 Configuration
+
+ The QApplication object provides some properties that are related
+ to drag and drop operations:
+
+ \list
+ \i \l{QApplication::startDragTime} describes the amount of time in
+ milliseconds that the user must hold down a mouse button over an
+ object before a drag will begin.
+ \i \l{QApplication::startDragDistance} indicates how far the user has to
+ move the mouse while holding down a mouse button before the movement
+ will be interpreted as dragging. Use of high values for this quantity
+ prevents accidental dragging when the user only meant to click on an
+ object.
+ \endlist
+
+ These quantities provide sensible default values for you to use if you
+ provide drag and drop support in your widgets.
+
+ \section1 Dragging
+
+ To start a drag, create a QDrag object, and call its
+ exec() function. In most applications, it is a good idea to begin a drag
+ and drop operation only after a mouse button has been pressed and the
+ cursor has been moved a certain distance. However, the simplest way to
+ enable dragging from a widget is to reimplement the widget's
+ \l{QWidget::mousePressEvent()}{mousePressEvent()} and start a drag
+ and drop operation:
+
+ \snippet doc/src/snippets/dragging/mainwindow.cpp 0
+ \dots 8
+ \snippet doc/src/snippets/dragging/mainwindow.cpp 2
+
+ Although the user may take some time to complete the dragging operation,
+ as far as the application is concerned the exec() function is a blocking
+ function that returns with \l{Qt::DropActions}{one of several values}.
+ These indicate how the operation ended, and are described in more detail
+ below.
+
+ Note that the exec() function does not block the main event loop.
+
+ For widgets that need to distinguish between mouse clicks and drags, it
+ is useful to reimplement the widget's
+ \l{QWidget::mousePressEvent()}{mousePressEvent()} function to record to
+ start position of the drag:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 6
+
+ Later, in \l{QWidget::mouseMoveEvent()}{mouseMoveEvent()}, we can determine
+ whether a drag should begin, and construct a drag object to handle the
+ operation:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 7
+ \dots
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 8
+
+ This particular approach uses the \l QPoint::manhattanLength() function
+ to get a rough estimate of the distance between where the mouse click
+ occurred and the current cursor position. This function trades accuracy
+ for speed, and is usually suitable for this purpose.
+
+ \section1 Dropping
+
+ To be able to receive media dropped on a widget, call
+ \l{QWidget::setAcceptDrops()}{setAcceptDrops(true)} for the widget,
+ and reimplement the \l{QWidget::dragEnterEvent()}{dragEnterEvent()} and
+ \l{QWidget::dropEvent()}{dropEvent()} event handler functions.
+
+ For example, the following code enables drop events in the constructor of
+ a QWidget subclass, making it possible to usefully implement drop event
+ handlers:
+
+ \snippet doc/src/snippets/dropevents/window.cpp 0
+ \dots
+ \snippet doc/src/snippets/dropevents/window.cpp 1
+ \snippet doc/src/snippets/dropevents/window.cpp 2
+
+ The dragEnterEvent() function is typically used to inform Qt about the
+ types of data that the widget accepts.
+ You must reimplement this function if you want to receive either
+ QDragMoveEvent or QDropEvent in your reimplementations of
+ \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and dropEvent().
+
+ The following code shows how dragEnterEvent() can be reimplemented to
+ tell the drag and drop system that we can only handle plain text:
+
+ \snippet doc/src/snippets/dropevents/window.cpp 3
+
+ The dropEvent() is used to unpack dropped data and handle it in way that
+ is suitable for your application.
+
+ In the following code, the text supplied in the event is passed to a
+ QTextBrowser and a QComboBox is filled with the list of MIME types that
+ are used to describe the data:
+
+ \snippet doc/src/snippets/dropevents/window.cpp 4
+
+ In this case, we accept the proposed action without checking what it is.
+ In a real world application, it may be necessary to return from the
+ dropEvent() function without accepting the proposed action or handling
+ the data if the action is not relevant. For example, we may choose to
+ ignore Qt::LinkAction actions if we do not support
+ links to external sources in our application.
+
+ \section2 Overriding Proposed Actions
+
+ We may also ignore the proposed action, and perform some other action on
+ the data. To do this, we would call the event object's
+ \l{QDropEvent::setDropAction()}{setDropAction()} with the preferred
+ action from Qt::DropAction before calling \l{QEvent::}{accept()}.
+ This ensures that the replacement drop action is used instead of the
+ proposed action.
+
+ For more sophisticated applications, reimplementing
+ \l{QWidget::dragMoveEvent()}{dragMoveEvent()} and
+ \l{QWidget::dragLeaveEvent()}{dragLeaveEvent()} will let you make
+ certain parts of your widgets sensitive to drop events, and give you more
+ control over drag and drop in your application.
+
+ \section2 Subclassing Complex Widgets
+
+ Certain standard Qt widgets provide their own support for drag and drop.
+ When subclassing these widgets, it may be necessary to reimplement
+ \l{QWidget::dragMoveEvent()}{dragMoveEvent()} in addition to
+ \l{QWidget::dragEnterEvent()}{dragEnterEvent()} and
+ \l{QWidget::dropEvent()}{dropEvent()} to prevent the base class from
+ providing default drag and drop handling, and to handle any special
+ cases you are interested in.
+
+ \section1 Drag and Drop Actions
+
+ In the simplest case, the target of a drag and drop action receives a
+ copy of the data being dragged, and the source decides whether to
+ delete the original. This is described by the \c CopyAction action.
+ The target may also choose to handle other actions, specifically the
+ \c MoveAction and \c LinkAction actions. If the source calls
+ QDrag::exec(), and it returns \c MoveAction, the source is responsible
+ for deleting any original data if it chooses to do so. The QMimeData
+ and QDrag objects created by the source widget \e{should not be deleted}
+ - they will be destroyed by Qt. The target is responsible for taking
+ ownership of the data sent in the drag and drop operation; this is
+ usually done by keeping references to the data.
+
+ If the target understands the \c LinkAction action, it should
+ store its own reference to the original information; the source
+ does not need to perform any further processing on the data. The
+ most common use of drag and drop actions is when performing a
+ Move within the same widget; see the section on \l{Drop Actions}
+ for more information about this feature.
+
+ The other major use of drag actions is when using a reference type
+ such as text/uri-list, where the dragged data are actually references
+ to files or objects.
+
+ \section1 Adding New Drag and Drop Types
+
+ Drag and drop is not limited to text and images. Any type of information
+ can be transferred in a drag and drop operation. To drag information
+ between applications, the applications must be able to indicate to each
+ other which data formats they can accept and which they can produce.
+ This is achieved using
+ \l{http://www.rfc-editor.org/rfc/rfc1341.txt}{MIME types}. The QDrag
+ object constructed by the source contains a list of MIME types that it
+ uses to represent the data (ordered from most appropriate to least
+ appropriate), and the drop target uses one of these to access the data.
+ For common data types, the convenience functions handle the MIME types
+ used transparently but, for custom data types, it is necessary to
+ state them explicitly.
+
+ To implement drag and drop actions for a type of information that is
+ not covered by the QDrag convenience functions, the first and most
+ important step is to look for existing formats that are appropriate:
+ The Internet Assigned Numbers Authority (\l{http://www.iana.org}{IANA})
+ provides a
+ \l{http://www.iana.org/assignments/media-types/}{hierarchical
+ list of MIME media types} at the Information Sciences Institute
+ (\l{http://www.isi.edu}{ISI}).
+ Using standard MIME types maximizes the interoperability of
+ your application with other software now and in the future.
+
+ To support an additional media type, simply set the data in the QMimeData
+ object with the \l{QMimeData::setData()}{setData()} function, supplying
+ the full MIME type and a QByteArray containing the data in the appropriate
+ format. The following code takes a pixmap from a label and stores it
+ as a Portable Network Graphics (PNG) file in a QMimeData object:
+
+ \snippet doc/src/snippets/separations/finalwidget.cpp 0
+
+ Of course, for this case we could have simply used
+ \l{QMimeData::setImageData()}{setImageData()} instead to supply image data
+ in a variety of formats:
+
+ \snippet doc/src/snippets/separations/finalwidget.cpp 1
+
+ The QByteArray approach is still useful in this case because it provides
+ greater control over the amount of data stored in the QMimeData object.
+
+ Note that custom datatypes used in item views must be declared as
+ \l{QMetaObject}{meta objects} and that stream operators for them
+ must be implemented.
+
+ \section1 Drop Actions
+
+ In the clipboard model, the user can \e cut or \e copy the source
+ information, then later paste it. Similarly in the drag and drop
+ model, the user can drag a \e copy of the information or they can drag
+ the information itself to a new place (\e moving it). The
+ drag and drop model has an additional complication for the programmer:
+ The program doesn't know whether the user wants to cut or copy the
+ information until the operation is complete. This often makes no
+ difference when dragging information between applications, but within
+ an application it is important to check which drop action was used.
+
+ We can reimplement the mouseMoveEvent() for a widget, and start a drag
+ and drop operation with a combination of possible drop actions. For
+ example, we may want to ensure that dragging always moves objects in
+ the widget:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 7
+ \dots
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 8
+
+ The action returned by the exec() function may default to a
+ \c CopyAction if the information is dropped into another application
+ but, if it is dropped in another widget in the same application, we
+ may obtain a different drop action.
+
+ The proposed drop actions can be filtered in a widget's dragMoveEvent()
+ function. However, it is possible to accept all proposed actions in
+ the dragEnterEvent() and let the user decide which they want to accept
+ later:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 0
+
+ When a drop occurs in the widget, the dropEvent() handler function is
+ called, and we can deal with each possible action in turn. First, we
+ deal with drag and drop operations within the same widget:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 1
+
+ In this case, we refuse to deal with move operations. Each type of drop
+ action that we accept is checked and dealt with accordingly:
+
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 2
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 3
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 4
+ \dots
+ \snippet doc/src/snippets/draganddrop/dragwidget.cpp 5
+
+ Note that we checked for individual drop actions in the above code.
+ As mentioned above in the section on
+ \l{#Overriding Proposed Actions}{Overriding Proposed Actions}, it is
+ sometimes necessary to override the proposed drop action and choose a
+ different one from the selection of possible drop actions.
+ To do this, you need to check for the presence of each action in the value
+ supplied by the event's \l{QDropEvent::}{possibleActions()}, set the drop
+ action with \l{QDropEvent::}{setDropAction()}, and call
+ \l{QEvent::}{accept()}.
+
+ \section1 Drop Rectangles
+
+ The widget's dragMoveEvent() can be used to restrict drops to certain parts
+ of the widget by only accepting the proposed drop actions when the cursor
+ is within those areas. For example, the following code accepts any proposed
+ drop actions when the cursor is over a child widget (\c dropFrame):
+
+ \snippet doc/src/snippets/droprectangle/window.cpp 0
+
+ The dragMoveEvent() can also be used if you need to give visual
+ feedback during a drag and drop operation, to scroll the window, or
+ whatever is appropriate.
+
+ \section1 The Clipboard
+
+ Applications can also communicate with each other by putting data on
+ the clipboard. To access this, you need to obtain a QClipboard object
+ from the QApplication object:
+
+ \snippet examples/widgets/charactermap/mainwindow.cpp 3
+
+ The QMimeData class is used to represent data that is transferred to and
+ from the clipboard. To put data on the clipboard, you can use the
+ setText(), setImage(), and setPixmap() convenience functions for common
+ data types. These functions are similar to those found in the QMimeData
+ class, except that they also take an additional argument that controls
+ where the data is stored: If \l{QClipboard::Mode}{Clipboard} is
+ specified, the data is placed on the clipboard; if
+ \l{QClipboard::Mode}{Selection} is specified, the data is placed in the
+ mouse selection (on X11 only). By default, data is put on the clipboard.
+
+ For example, we can copy the contents of a QLineEdit to the clipboard
+ with the following code:
+
+ \snippet examples/widgets/charactermap/mainwindow.cpp 11
+
+ Data with different MIME types can also be put on the clipboard.
+ Construct a QMimeData object and set data with setData() function in
+ the way described in the previous section; this object can then be
+ put on the clipboard with the
+ \l{QClipboard::setMimeData()}{setMimeData()} function.
+
+ The QClipboard class can notify the application about changes to the
+ data it contains via its \l{QClipboard::dataChanged()}{dataChanged()}
+ signal. For example, we can monitor the clipboard by connecting this
+ signal to a slot in a widget:
+
+ \snippet doc/src/snippets/clipboard/clipwindow.cpp 0
+
+ The slot connected to this signal can read the data on the clipboard
+ using one of the MIME types that can be used to represent it:
+
+ \snippet doc/src/snippets/clipboard/clipwindow.cpp 1
+ \dots
+ \snippet doc/src/snippets/clipboard/clipwindow.cpp 2
+
+ The \l{QClipboard::selectionChanged()}{selectionChanged()} signal can
+ be used on X11 to monitor the mouse selection.
+
+ \section1 Examples
+
+ \list
+ \o \l{draganddrop/draggableicons}{Draggable Icons}
+ \o \l{draganddrop/draggabletext}{Draggable Text}
+ \o \l{draganddrop/dropsite}{Drop Site}
+ \o \l{draganddrop/fridgemagnets}{Fridge Magnets}
+ \o \l{draganddrop/puzzle}{Drag and Drop Puzzle}
+ \endlist
+
+ \section1 Interoperating with Other Applications
+
+ On X11, the public \l{http://www.newplanetsoftware.com/xdnd/}{XDND
+ protocol} is used, while on Windows Qt uses the OLE standard, and
+ Qt for Mac OS X uses the Carbon Drag Manager. On X11, XDND uses MIME,
+ so no translation is necessary. The Qt API is the same regardless of
+ the platform. On Windows, MIME-aware applications can communicate by
+ using clipboard format names that are MIME types. Already some
+ Windows applications use MIME naming conventions for their
+ clipboard formats. Internally, Qt uses QWindowsMime and
+ QMacPasteboardMime for translating proprietary clipboard formats
+ to and from MIME types.
+
+ On X11, Qt also supports drops via the Motif Drag & Drop Protocol. The
+ implementation incorporates some code that was originally written by
+ Daniel Dardailler, and adapted for Qt by Matt Koss <koss@napri.sk>
+ and Trolltech. Here is the original copyright notice:
+
+ \legalese
+ Copyright 1996 Daniel Dardailler.
+
+ Permission to use, copy, modify, distribute, and sell this software
+ for any purpose is hereby granted without fee, provided that the above
+ copyright notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting documentation,
+ and that the name of Daniel Dardailler not be used in advertising or
+ publicity pertaining to distribution of the software without specific,
+ written prior permission. Daniel Dardailler makes no representations
+ about the suitability of this software for any purpose. It is
+ provided "as is" without express or implied warranty.
+
+ Modifications Copyright 1999 Matt Koss, under the same license as
+ above.
+ \endlegalese
+ \omit NOTE: The copyright notice is from qmotifdnd_x11.cpp. \endomit
+
+ Note: The Motif Drag \& Drop Protocol only allows receivers to
+ request data in response to a QDropEvent. If you attempt to
+ request data in response to e.g. a QDragMoveEvent, an empty
+ QByteArray is returned.
+*/
+
+/*!
+ \page porting4-dnd.html
+ \title Porting to Qt 4 - Drag and Drop
+ \contentspage {Porting Guides}{Contents}
+ \previouspage Porting to Qt 4 - Virtual Functions
+ \nextpage Porting .ui Files to Qt 4
+ \ingroup porting
+ \brief An overview of the porting process for applications that use drag and drop.
+
+ Qt 4 introduces a new set of classes to handle drag and drop operations
+ that aim to be easier to use than their counterparts in Qt 3. As a result,
+ the way that drag and drop is performed is quite different to the way
+ developers of Qt 3 applications have come to expect. In this guide, we
+ show the differences between the old and new APIs and indicate where
+ applications need to be changed when they are ported to Qt 4.
+
+ \tableofcontents
+
+ \section1 Dragging
+
+ In Qt 3, drag operations are encapsulated by \c QDragObject (see Q3DragObject)
+ and its subclasses. These objects are typically constructed on the heap in
+ response to mouse click or mouse move events, and ownership of them is
+ transferred to Qt so that they can be deleted when the corresponding drag and
+ drop operations have been completed. The drag source has no control over how
+ the drag and drop operation is performed once the object's
+ \l{Q3DragObject::}{drag()} function is called, and it receives no information
+ about how the operation ended.
+
+ \snippet doc/src/snippets/code/doc_src_dnd.qdoc 0
+
+ Similarly, in Qt 4, drag operations are also initiated when a QDrag object
+ is constructed and its \l{QDrag::}{exec()} function is called. In contrast,
+ these objects are typically constructed on the stack rather than the heap
+ since each drag and drop operation is performed synchronously as far as the
+ drag source is concerned. One key benefit of this is that the drag source
+ can receive information about how the operation ended from the value returned
+ by \l{QDrag::}{exec()}.
+
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 2
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 3
+ \dots 8
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 4
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 5
+
+ A key difference in the above code is the use of the QMimeData class to hold
+ information about the data that is transferred. Qt 3 relies on subclasses
+ of \c QDragObject to provide support for specific MIME types; in Qt 4, the
+ use of QMimeData as a generic container for data makes the relationship
+ between MIME type and data more tranparent. QMimeData is described in more
+ detail later in this document.
+
+ \section1 Dropping
+
+ In both Qt 3 and Qt 4, it is possible to prepare a custom widget to accept
+ dropped data by enabling the \l{QWidget::}{acceptDrops} property of a widget,
+ usually in the widget's constructor. As a result, the widget will receive
+ drag enter events that can be handled by its \l{QWidget::}{dragEnterEvent()}
+ function.
+ As in Qt 3, custom widgets in Qt 4 handle these events by determining
+ whether the data supplied by the drag and drop operation can be dropped onto
+ the widget. Since the classes used to encapsulate MIME data are different in
+ Qt 3 and Qt 4, the exact implementations differ.
+
+ In Qt 3, the drag enter event is handled by checking whether each of the
+ standard \c QDragObject subclasses can decode the data supplied, and
+ indicating success or failure of these checks via the event's
+ \l{QDragEnterEvent::}{accept()} function, as shown in this simple example:
+
+ \snippet doc/src/snippets/code/doc_src_dnd.qdoc 1
+
+ In Qt 4, you can examine the MIME type describing the data to determine
+ whether the widget should accept the event or, for common data types, you
+ can use convenience functions:
+
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 0
+
+ The widget has some control over the type of drag and drop operation to be
+ performed. In the above code, the action proposed by the drag source is
+ accepted, but
+ \l{Drag and Drop#Overriding Proposed Actions}{this can be overridden} if
+ required.
+
+ In both Qt 3 and Qt 4, it is necessary to accept a given drag event in order
+ to receive the corresponding drop event. A custom widget in Qt 3 that can
+ accept dropped data in the form of text or images might provide an
+ implementation of \l{QWidget::}{dropEvent()} that looks like the following:
+
+ \snippet doc/src/snippets/code/doc_src_dnd.qdoc 2
+
+ In Qt 4, the event is handled in a similar way:
+
+ \snippet doc/src/snippets/porting4-dropevents/window.cpp 1
+
+ It is also possible to extract data stored for a particular MIME type if it
+ was specified by the drag source.
+
+ \section1 MIME Types and Data
+
+ In Qt 3, data to be transferred in drag and drop operations is encapsulated
+ in instances of \c QDragObject and its subclasses, representing specific
+ data formats related to common MIME type and subtypes.
+
+ In Qt 4, only the QMimeData class is used to represent data, providing a
+ container for data stored in multiple formats, each associated with
+ a relevant MIME type. Since arbitrary MIME types can be specified, there is
+ no need for an extensive class hierarchy to represent different kinds of
+ information. Additionally, QMimeData it provides some convenience functions
+ to allow the most common data formats to be stored and retrieved with less
+ effort than for arbitrary MIME types.
+*/
diff --git a/doc/src/ecmascript.qdoc b/doc/src/ecmascript.qdoc
new file mode 100644
index 0000000..303b752
--- /dev/null
+++ b/doc/src/ecmascript.qdoc
@@ -0,0 +1,313 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page ecmascript.html
+ \title ECMAScript Reference
+ \ingroup scripting
+ \brief A list of objects, functions and properties supported by QtScript.
+
+ This reference contains a list of objects, functions and
+ properties supported by QtScript.
+
+ \tableofcontents
+
+ \section1 The Global Object
+
+ \section2 Value Properties
+
+ \list
+ \o NaN
+ \o Infinity
+ \o undefined
+ \o Math
+ \endlist
+
+ \section2 Function Properties
+
+ \list
+ \o eval(x)
+ \o parseInt(string, radix)
+ \o parseFloat(string)
+ \o isNaN(number)
+ \o isFinite(number)
+ \o decodeURI(encodedURI)
+ \o decodeURIComponent(encodedURIComponent)
+ \o encodeURI(uri)
+ \o encodeURIComponent(uriComponent)
+ \endlist
+
+ \section2 Constructor Properties
+
+ \list
+ \o Object
+ \o Function
+ \o Array
+ \o String
+ \o Boolean
+ \o Number
+ \o Date
+ \o RegExp
+ \o Error
+ \o EvalError
+ \o RangeError
+ \o ReferenceError
+ \o SyntaxError
+ \o TypeError
+ \o URIError
+ \endlist
+
+ \section1 Object Objects
+
+ \section2 Object Prototype Object
+
+ \list
+ \o toString()
+ \o toLocaleString()
+ \o valueOf()
+ \o hasOwnProperty(V)
+ \o isPrototypeOf(V)
+ \o propertyIsEnumerable(V)
+ \endlist
+
+ \section1 Function Objects
+
+ \section2 Function Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \o apply(thisArg, argArray)
+ \o call(thisArg [, arg1 [, arg2, ...]])
+ \endlist
+
+ \section1 Array Objects
+
+ \section2 Array Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \o toLocaleString()
+ \o concat([item1 [, item2 [, ...]]])
+ \o join(separator)
+ \o pop()
+ \o push([item1 [, item2 [, ...]]])
+ \o reverse()
+ \o shift()
+ \o slice(start, end)
+ \o sort(comparefn)
+ \o splice(start, deleteCount[, item1 [, item2 [, ...]]])
+ \o unshift([item1 [, item2 [, ...]]])
+ \endlist
+
+ \section1 String Objects
+
+ \section2 String Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \o valueOf()
+ \o charAt(pos)
+ \o charCodeAt(pos)
+ \o concat([string1 [, string2 [, ...]]])
+ \o indexOf(searchString ,position)
+ \o lastIndexOf(searchString, position)
+ \o localeCompare(that)
+ \o match(regexp)
+ \o replace(searchValue, replaceValue)
+ \o search(regexp)
+ \o slice(start, end)
+ \o split(separator, limit)
+ \o substring(start, end)
+ \o toLowerCase()
+ \o toLocaleLowerCase()
+ \o toUpperCase()
+ \o toLocaleUpperCase()
+ \endlist
+
+ \section1 Boolean Objects
+
+ \section2 Boolean Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \o valueOf()
+ \endlist
+
+ \section1 Number Objects
+
+ \section2 Number Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString(radix)
+ \o toLocaleString()
+ \o toFixed(fractionDigits)
+ \o toExponential(fractionDigits)
+ \o toPrecision(precision)
+ \endlist
+
+ \section1 The Math Object
+
+ \section2 Value Properties
+
+ \list
+ \o E
+ \o LN10
+ \o LN2
+ \o LOG2E
+ \o LOG10E
+ \o PI
+ \o SQRT1_2
+ \o SQRT2
+ \endlist
+
+ \section2 Function Properties
+
+ \list
+ \o abs(x)
+ \o acos(x)
+ \o asin(x)
+ \o atan(x)
+ \o atan2(y, x)
+ \o ceil(x)
+ \o cos(x)
+ \o exp(x)
+ \o floor(x)
+ \o log(x)
+ \o max([value1 [, value2 [, ...]]])
+ \o min([value1 [, value2 [, ...]]])
+ \o pow(x, y)
+ \o random()
+ \o round(x)
+ \o sin(x)
+ \o sqrt(x)
+ \o tan(x)
+ \endlist
+
+ \section1 Date Objects
+
+ \section2 Date Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \o toDateString()
+ \o toTimeString()
+ \o toLocaleString()
+ \o toLocaleDateString()
+ \o toLocaleTimeString()
+ \o valueOf()
+ \o getTime()
+ \o getFullYear()
+ \o getUTCFullYear()
+ \o getMonth()
+ \o getUTCMonth()
+ \o getDate()
+ \o getUTCDate()
+ \o getDay()
+ \o getUTCDay()
+ \o getHours()
+ \o getUTCHours()
+ \o getMinutes()
+ \o getUTCMinutes()
+ \o getSeconds()
+ \o getUTCSeconds()
+ \o getMilliseconds()
+ \o getUTCMilliseconds()
+ \o getTimeZoneOffset()
+ \o setTime(time)
+ \o setMilliseconds(ms)
+ \o setUTCMilliseconds(ms)
+ \o setSeconds(sec [, ms])
+ \o setUTCSeconds(sec [, ms])
+ \o setMinutes(min [, sec [, ms]])
+ \o setUTCMinutes(min [, sec [, ms]])
+ \o setHours(hour [, min [, sec [, ms]]])
+ \o setUTCHours(hour [, min [, sec [, ms]]])
+ \o setDate(date)
+ \o setUTCDate(date)
+ \o setMonth(month [, date])
+ \o setUTCMonth(month [, date])
+ \o setFullYear(year [, month [, date]])
+ \o setUTCFullYear(year [, month [, date]])
+ \o toUTCString()
+ \endlist
+
+ \section1 RegExp Objects
+
+ \section2 RegExp Prototype Object
+
+ \section3 Function Properties
+
+ \list
+ \o exec(string)
+ \o test(string)
+ \o toString()
+ \endlist
+
+ \section1 Error Objects
+
+ \section2 Error Prototype Object
+
+ \section3 Value Properties
+
+ \list
+ \o name
+ \o message
+ \endlist
+
+ \section3 Function Properties
+
+ \list
+ \o toString()
+ \endlist
+
+*/
diff --git a/doc/src/editions.qdoc b/doc/src/editions.qdoc
new file mode 100644
index 0000000..5d3b35c
--- /dev/null
+++ b/doc/src/editions.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation of Qt editions.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page editions.html
+ \title Qt Editions
+ \ingroup licensing
+ \brief Information about the different editions of Qt.
+
+ Qt can be used to create both commercial and non-commercial
+ software for a wide range of different deployment environments,
+ and is supplied in a number of different forms to suit the needs
+ of different kinds of developers.
+
+ In terms of license conditions, there are two main forms of Qt:
+
+ \list
+ \o The \l{Qt Commercial Editions} are the commercial
+ versions of \l{About Qt}{Qt}.
+ \o The \l{Open Source Versions of Qt} are freely available for download.
+ \endlist
+
+ On the Qt web site, you can find a
+ \l{Qt Licensing Overview} and information on \l{Qt License Pricing}
+ for commercial editions of Qt and other Qt-related products.
+*/
diff --git a/doc/src/emb-accel.qdoc b/doc/src/emb-accel.qdoc
new file mode 100644
index 0000000..67fe8e6
--- /dev/null
+++ b/doc/src/emb-accel.qdoc
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-accel.html
+
+ \target add your graphics driver to Qt for Embedded Linux
+
+ \title Adding an Accelerated Graphics Driver to Qt for Embedded Linux
+ \ingroup qt-embedded-linux
+
+ In \l{Qt for Embedded Linux}, painting is a pure software implementation
+ normally performed in two steps. First, each window is rendered
+ onto a QWSWindowSurface using QPaintEngine. Second, the server
+ composes the surface images and copies the composition to the
+ screen (see \l{Qt for Embedded Linux Architecture} for details).
+ \l{Qt for Embedded Linux} uses QRasterPaintEngine (a raster-based implementation of
+ QPaintEngine) to implement painting operations, and uses QScreen
+ to implement window composition.
+
+ It is possible to add an accelerated graphics driver to take
+ advantage of available hardware resources. This is described in
+ detail in the \l {Accelerated Graphics Driver Example} which uses
+ the following approach:
+
+ \tableofcontents
+
+ \warning This feature is under development and is subject to
+ change.
+
+ \section1 Step 1: Create a Custom Screen
+
+ Create a custom screen by deriving from the QScreen class.
+
+ The \l {QScreen::}{connect()}, \l {QScreen::}{disconnect()}, \l
+ {QScreen::}{initDevice()} and \l {QScreen::}{shutdownDevice()}
+ functions are declared as pure virtual functions in QScreen and
+ must be implemented. These functions are used to configure the
+ hardware, or query its configuration. The \l
+ {QScreen::}{connect()} and \l {QScreen::}{disconnect()} are called
+ by both the server and client processes, while the \l
+ {QScreen::}{initDevice()} and \l {QScreen::}{shutdownDevice()}
+ functions are only called by the server process.
+
+ You might want to accelerate the final copying to the screen by
+ reimplementing the \l {QScreen::}{blit()} and \l
+ {QScreen::}{solidFill()} functions.
+
+ \section1 Step 2: Implement a Custom Raster Paint Engine
+
+ Implement the painting operations by subclassing the
+ QRasterPaintEngine class.
+
+ To accelerate a graphics primitive, simply reimplement the
+ corresponding function in your custom paint engine. If there is
+ functionality you do not want to reimplement (such as certain
+ pens, brushes, modes, etc.), you can just call the corresponding
+ base class implementation.
+
+ \section1 Step 3: Make the Paint Device Aware of Your Paint Engine
+
+ To activate your paint engine you must create a subclass of the
+ QCustomRasterPaintDevice class and reimplement its \l
+ {QCustomRasterPaintDevice::}{paintEngine()} function. Let this
+ function return a pointer to your paint engine. In addition, the
+ QCustomRasterPaintDevice::memory() function must be reimplemented
+ to return a pointer to the buffer where the painting should be
+ done.
+
+ \table
+ \header \o Acceleration Without a Memory Buffer
+ \row
+ \o
+
+ By default the QRasterPaintEngine draws into a memory buffer (this can
+ be local memory, shared memory or graphics memory mapped into
+ application memory).
+ In some cases you might want to avoid using a memory buffer directly,
+ e.g if you want to use an accelerated graphic controller to handle all
+ the buffer manipulation. This can be implemented by reimplementing
+ the QCustomRasterPaintDevice::memory() function to return 0 (meaning
+ no buffer available). Then, whenever a color or image buffer normally
+ would be written into paint engine buffer, the paint engine will call the
+ QRasterPaintEngine::drawColorSpans() and
+ QRasterPaintEngine::drawBufferSpan() functions instead.
+
+ Note that the default implementations of these functions only
+ calls qFatal() with an error message; reimplement the functions
+ and let them do the appropriate communication with the accelerated
+ graphics controller.
+
+ \endtable
+
+ \section1 Step 4: Make the Window Surface Aware of Your Paint Device
+
+ Derive from the QWSWindowSurface class and reimplement its \l
+ {QWSWindowSurface::}{paintDevice()} function. Make this function
+ return a pointer to your custom raster paint device.
+
+ \section1 Step 5: Enable Creation of an Instance of Your Window Surface
+
+ Finally, reimplement QScreen's \l {QScreen::}{createSurface()}
+ function and make this function able to create an instance of your
+ QWSWindowSurface subclass.
+*/
diff --git a/doc/src/emb-charinput.qdoc b/doc/src/emb-charinput.qdoc
new file mode 100644
index 0000000..e38ebe3
--- /dev/null
+++ b/doc/src/emb-charinput.qdoc
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-charinput.html
+
+ \title Qt for Embedded Linux Character Input
+ \ingroup qt-embedded-linux
+
+ When running a \l {Qt for Embedded Linux} application, it either runs as a
+ server or connects to an existing server. The keyboard driver is
+ loaded by the server application when it starts running, using
+ Qt's \l {How to Create Qt Plugins}{plugin system}.
+
+ Internally in the client/server protocol, all system generated
+ events, including key events, are passed to the server application
+ which then propagates the event to the appropriate client. Note
+ that key events do not always come from a keyboard device, they
+ can can also be generated by the server process using input
+ widgets.
+
+ \table
+ \header \o Input Widgets
+ \row
+ \o
+
+ The server process may call the static QWSServer::sendKeyEvent()
+ function at any time. Typically, this is done by popping up a
+ widget that enables the user specify characters with the pointer
+ device.
+
+ Note that the key input widget should not take focus since the
+ server would then just send the key events back to the input
+ widget. One way to make sure that the input widget never takes
+ focus is to set the Qt::Tool widget flag in the QWidget
+ constructor.
+
+ The \l{Qt Extended} environment contains various input widgets such as
+ Handwriting Recognition and Virtual Keyboard.
+
+ \endtable
+
+ \tableofcontents
+
+ \section1 Available Keyboard Drivers
+
+ \l {Qt for Embedded Linux} provides ready-made drivers for the SL5000, Yopy,
+ Vr41XX, console (TTY) and USB protocols. Run the \c configure
+ script to list the available drivers:
+
+ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 0
+
+ Note that the console keyboard driver also handles console
+ switching (\bold{Ctrl+Alt+F1}, ..., \bold{Ctrl+Alt+F10}) and
+ termination (\bold{Ctrl+Alt+Backspace}).
+
+ In the default Qt configuration, only the "TTY" driver is
+ enabled. The various drivers can be enabled and disabled using the
+ \c configure script. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 1
+
+ Custom keyboard drivers can be implemented by subclassing the
+ QWSKeyboardHandler class and creating a keyboard driver plugin
+ (derived from the QKbdDriverPlugin class). The default
+ implementation of the QKbdDriverFactory class will automatically
+ detect the plugin, loading the driver into the server application
+ at run-time.
+
+ \section1 Specifying a Keyboard Driver
+
+ To specify which driver to use, set the QWS_KEYBOARD environment
+ variable. For example (if the current shell is bash, ksh, zsh or
+ sh):
+
+ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 2
+
+ The \c <driver> argument are \c SL5000, \c Yopy, \c VR41xx, \c
+ TTY, \c USB and \l {QKbdDriverPlugin::keys()}{keys} identifying
+ custom drivers, and the driver specific options are typically a
+ device, e.g., \c /dev/tty0.
+
+ Multiple keyboard drivers can be specified in one go:
+
+ \snippet doc/src/snippets/code/doc_src_emb-charinput.qdoc 3
+
+ Input will be read from all specified drivers.
+*/
diff --git a/doc/src/emb-crosscompiling.qdoc b/doc/src/emb-crosscompiling.qdoc
new file mode 100644
index 0000000..54e65c5
--- /dev/null
+++ b/doc/src/emb-crosscompiling.qdoc
@@ -0,0 +1,191 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-crosscompiling.html
+
+ \title Cross-Compiling Qt for Embedded Linux Applications
+ \ingroup qt-embedded-linux
+
+ Cross-compiling is the process of compiling an application on one
+ machine, producing executable code for a different machine or
+ device. To cross-compile a \l{Qt for Embedded Linux} application,
+ use the following approach:
+
+ \tableofcontents
+
+ \note The cross-compiling procedure has the configuration
+ process in common with the installation procedure; i.e., you might
+ not necessarily have to perform all the mentioned actions
+ depending on your current configuration.
+
+ \section1 Step 1: Set the Cross-Compiler's Path
+
+ Specify which cross-compiler to use by setting the \c PATH
+ environment variable. For example, if the current shell is bash,
+ ksh, zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 0
+
+ \section1 Step 2: Create a Target Specific qmake Specification
+
+ The qmake tool requires a platform and compiler specific \c
+ qmake.conf file describing the various default values, to generate
+ the appropriate Makefiles. The standard \l{Qt for Embedded Linux}
+ distribution provides such files for several combinations of
+ platforms and compilers. These files are located in the
+ distribution's \c mkspecs/qws subdirectory.
+
+ Each platform has a default specification. \l{Qt for Embedded Linux} will
+ use the default specification for the current platform unless told
+ otherwise. To override this behavior, you can use the \c configure
+ script's \c -platform option to change the specification for the host
+ platform (where compilation will take place).
+
+ The \c configure script's \c -xplatform option is used to provide a
+ specification for the target architecture (where the library will be
+ deployed).
+
+ For example, to cross-compile an application to run on a device with
+ an ARM architecture, using the GCC toolchain, run the configure
+ script at the command line in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 1
+
+ If neither of the provided specifications fits your target device,
+ you can create your own. To create a custom \c qmake.conf file,
+ just copy and customize an already existing file. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 2
+
+ \note When defining a mkspec for a Linux target, the directory must
+ be prefixed with "linux-". We recommend that you copy the entire
+ directory.
+
+ Note also that when providing you own qmake specifcation, you must
+ use the \c configure script's \c -xplatform option to make
+ \l{Qt for Embedded Linux} aware of the custom \c qmake.conf file.
+
+ \section1 Step 3: Provide Architecture Specific Files
+
+ Starting with Qt 4, all of Qt's implicitly shared classes can
+ safely be copied across threads like any other value classes,
+ i.e., they are fully reentrant. This is accomplished by
+ implementing reference counting operations using atomic hardware
+ instructions on all the different platforms supported by Qt.
+
+ To support a new architecture, it is important to ensure that
+ these platform-specific atomic operations are implemented in a
+ corresponding header file (\c qatomic_ARCH.h), and that this file
+ is located in Qt's \c src/corelib/arch directory. For example, the
+ Intel 80386 implementation is located in \c
+ src/corelib/arch/qatomic_i386.h.
+
+ See the \l {Implementing Atomic Operations} documentation for
+ details.
+
+ \section1 Step 4: Provide Hardware Drivers
+
+ Without the proper mouse and keyboard drivers, you will not be
+ able to give any input to your application when it is installed on
+ the target device. You must also ensure that the appropriate
+ screen driver is present to make the server process able to put
+ the application's widgets on screen.
+
+ \l{Qt for Embedded Linux} provides several ready-made mouse, keyboard and
+ screen drivers, see the \l{Qt for Embedded Linux Pointer Handling}{pointer
+ handling}, \l{Qt for Embedded Linux Character Input}{character input} and
+ \l{Qt for Embedded Linux Display Management}{display management}
+ documentation for details.
+
+ In addition, custom drivers can be added by deriving from the
+ QWSMouseHandler, QWSKeyboardHandler and QScreen classes
+ respectively, and by creating corresponding plugins to make use of
+ Qt's plugin mechanism (dynamically loading the drivers into the
+ server application at runtime). Note that the plugins must be
+ located in a location where Qt will look for plugins, e.g., the
+ standard \c plugin directory.
+
+ See the \l {How to Create Qt Plugins} documentation and the \l
+ {tools/plugandpaint}{Plug & Paint} example for details.
+
+ \section1 Step 5: Build the Target Specific Executable
+
+ Before building the executable, you must specify the target
+ architecture as well as the target specific hardware drivers by
+ running the \c configure script:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 3
+
+ It is also important to make sure that all the third party
+ libraries that the application and the Qt libraries require, are
+ present in the tool chain. In particular, if the zlib and jpeg
+ libraries are not available, they must be included by running the
+ \c configure script with the \c -L and \c -I options. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 4
+
+ The JPEG source can be downloaded from \l http://www.ijg.org/. The
+ \l{Qt for Embedded Linux} distribution includes a version of the zlib source
+ that can be compiled into the Qt for Embedded Linux library. If integrators
+ wish to use a later version of the zlib library, it can be
+ downloaded from the \l http://www.gzip.org/zlib/ website.
+
+ Then build the executable:
+
+ \snippet doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc 5
+
+ That's all. Your target specific executable is ready for deployment.
+
+ \table 100%
+ \row
+ \o \bold {See also:}
+
+ \l{Qt for Embedded Linux Architecture} and \l{Deploying Qt for Embedded Linux
+ Applications}.
+
+ \row
+ \o \bold{Third party resources:}
+
+ \l{http://silmor.de/29}{Cross compiling Qt/Win Apps on Linux} covers the
+ process of cross-compiling Windows applications on Linux.
+ \endtable
+*/
diff --git a/doc/src/emb-deployment.qdoc b/doc/src/emb-deployment.qdoc
new file mode 100644
index 0000000..2c1ff00
--- /dev/null
+++ b/doc/src/emb-deployment.qdoc
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-deployment.html
+
+ \title Deploying Qt for Embedded Linux Applications
+ \ingroup qt-embedded-linux
+
+ The procedure of deploying an Qt application on \l{Qt for Embedded Linux}
+ is essentially the same as the deployment procedure on X11 platforms
+ which is described in detail in the \l {Deploying an Application
+ on X11 Platforms} documentation. See also the \l {Deploying Qt
+ applications}{general remarks} about deploying Qt applications.
+
+ In addition, there is a couple of Qt for Embedded Linux specific issues to
+ keep in mind:
+
+ \tableofcontents
+
+ \section1 Fonts
+
+ When Qt for Embedded Linux applications run, they look for a file called
+ \c fontdir in Qt's \c /lib/fonts/ directory defining the
+ fonts that are available to the application (i.e. the fonts
+ located in the mentioned directory).
+
+ For that reason, the preferred fonts must be copied to the \c
+ /lib/fonts/ directory, and the \c fontdir file must be customized
+ accordingly. See the \l {Qt for Embedded Linux Fonts}{fonts} documentation
+ for more details about the supported font formats.
+
+ Note that the application will look for the \c /lib/fonts/
+ directory relative to the path set using the \c -prefix parameter
+ when running the \c configure script; ensure that this is a
+ sensible path in the target device environment. See the \l
+ {Installing Qt for Embedded Linux#Step 3: Building the
+ Library}{installation} documentation for more details.
+
+ \section1 Environment Variables
+
+ In general, any variable value that differs from the provided
+ default values must be set explicitly in the target device
+ environment. Typically, these include the QWS_MOUSE_PROTO,
+ QWS_KEYBOARD and QWS_DISPLAY variables specifying the drivers for
+ pointer handling, character input and display management,
+ respectively.
+
+ For example, without the proper mouse and keyboard drivers, there
+ is no way to give any input to the application when it is
+ installed on the target device. By running the \c configure script
+ using the \c -qt-kbd-<keyboarddriver> and \c
+ -qt-mouse-<mousedriver> options, the drivers are enabled, but in
+ addition the drivers and the preferred devices must be specified
+ as the ones to use in the target environment, by setting the
+ environment variables.
+
+ See the \l{Qt for Embedded Linux Pointer Handling}{pointer handling},
+ \l{Qt for Embedded Linux Character Input}{character input} and
+ \l{Qt for Embedded Linux Display Management}{display management}
+ documentation for more information.
+
+ \section1 Framebuffer Support
+
+ No particular actions are required to enable the framebuffer on
+ target devices: The Linux framebuffer is enabled by default on all
+ modern Linux distributions. For information on older versions, see
+ \l http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html.
+
+ To test that the Linux framebuffer is set up correctly, and that
+ the device permissions are correct, use the program provided by
+ the \l {Testing the Linux Framebuffer} document.
+*/
diff --git a/doc/src/emb-differences.qdoc b/doc/src/emb-differences.qdoc
new file mode 100644
index 0000000..b6fb631
--- /dev/null
+++ b/doc/src/emb-differences.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-differences.html
+
+ \title Porting Qt Applications to Qt for Embedded Linux
+ \ingroup porting
+ \ingroup qt-embedded-linux
+
+ Existing Qt applications should require no porting provided there is no
+ platform dependent code.
+
+ \table 100%
+ \header \o Platform Dependent Code
+
+ \row
+ \o
+ Platform dependent code includes system calls, calls to the
+ underlying window system (Windows or X11), and Qt platform
+ specific methods such as QApplication::x11EventFilter().
+
+ For cases where it is necessary to use platform dependent code
+ there are macros defined that can be used to enable and disable
+ code for each platform using \c #ifdef directives:
+
+ \list
+ \o Qt for Embedded Linux: Q_WS_QWS
+ \o Qt for Mac OS X: Q_WS_MAC
+ \o Qt for Windows: Q_WS_WIN
+ \o Qt for X11: Q_WS_X11
+ \endlist
+ \endtable
+*/
diff --git a/doc/src/emb-envvars.qdoc b/doc/src/emb-envvars.qdoc
new file mode 100644
index 0000000..b06c132
--- /dev/null
+++ b/doc/src/emb-envvars.qdoc
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-envvars.html
+
+ \title Qt for Embedded Linux Environment Variables
+ \ingroup qt-embedded-linux
+
+ These environment variables are relevant to \l{Qt for Embedded Linux}
+ users.
+
+ \table
+ \header \o Variable \o Description
+
+ \row
+ \o \bold POINTERCAL_FILE \target POINTERCAL_FILE
+
+ \o Specifies the file containing the data used to calibrate the
+ pointer device.
+
+ See also QWSCalibratedMouseHandler and \l{Qt for Embedded Linux Pointer
+ Handling}.
+
+ \row
+ \o \bold QT_ONSCREEN_PAINT \target QT_ONSCREEN_PAINT
+
+ \o If defined, the application will render its widgets directly on
+ screen. The affected regions of the screen will not be modified by
+ the screen driver unless another window with a higher focus
+ requests (parts of) the same region.
+
+ Setting this environment variable is equivalent to setting the
+ Qt::WA_PaintOnScreen attribute for all the widgets in the
+ application.
+
+ See also the Qt for Embedded Linux \l{Qt for Embedded Linux Architecture#Graphics
+ Rendering}{graphics rendering} documentation.
+
+ \row
+ \o \bold QWS_SW_CURSOR \target QWS_SW_CURSOR
+ \o If defined, the software mouse cursor is always used (even when using an
+ accelerated driver that supports a hardware cursor).
+
+ \row
+ \o \bold QWS_DISPLAY \target QWS_DISPLAY
+ \o
+
+ Specifies the display type and framebuffer. For example, if the
+ current shell is bash, ksh, zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 0
+
+ The valid values for the \c <driver> argument are \c LinuxFb, \c
+ QVFb, \c VNC, \c Transformed, \c Multi and \l
+ {QScreenDriverPlugin::keys()}{keys} identifying custom drivers,
+ and the \c {<display num>} argument is used to separate screens
+ that are using the same screen driver and to enable multiple
+ displays (see the \l {Running Qt for Embedded Linux Applications}
+ documentation for more details).
+
+ The driver specific options are described in the \l{Qt for Embedded Linux
+ Display Management}{display management} documentation.
+
+ \row
+ \o \bold QWS_SIZE \target QWS_SIZE
+ \o
+
+ Specifies the size of the \l{Qt for Embedded Linux} window which is centered
+ within the screen. For example, if the current shell is bash, ksh,
+ zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 1
+
+ \row
+ \o \bold QWS_MOUSE_PROTO \target QWS_MOUSE_PROTO
+ \o
+
+ Specifies the driver for pointer handling. For example, if the
+ current shell is bash, ksh, zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 2
+
+ The valid values for the \c <driver> argument are \c MouseMan, \c
+ IntelliMouse, \c Microsoft, \c VR41xx, \c LinuxTP, \c Yopy. \c
+ Tslib and \l {QMouseDriverPlugin::keys()}{keys} identifying
+ custom drivers, and the driver specific options are typically a
+ device, e.g., \c /dev/mouse for mouse devices and \c /dev/ts for
+ touch panels.
+
+ Multiple keyboard drivers can be specified in one go:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 3
+
+ Input will be read from all specified drivers.
+ Note that the \c Vr41xx driver also accepts two optional
+ arguments: \c press=<value> defining a mouseclick (the default
+ value is 750) and \c filter=<value> specifying the length of the
+ filter used to eliminate noise (the default length is 3). For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 4
+
+ See also \l {Qt for Embedded Linux Pointer Handling}.
+
+ \row
+ \o \bold QWS_KEYBOARD \target QWS_KEYBOARD
+ \o
+
+ Specifies the driver and device for character input. For example, if the
+ current shell is bash, ksh, zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 5
+
+ The valid values for the \c <driver> argument are \c SL5000, \c
+ Yopy, \c VR41xx, \c TTY, \c USB and \l
+ {QKbdDriverPlugin::keys()}{keys} identifying custom drivers,
+ and the driver specific options are typically a device, e.g., \c
+ /dev/tty0.
+
+ Multiple keyboard drivers can be specified in one go:
+
+ \snippet doc/src/snippets/code/doc_src_emb-envvars.qdoc 6
+
+ Input will be read from all specified drivers.
+
+ See also \l {Qt for Embedded Linux Character Input}.
+
+ \endtable
+*/
diff --git a/doc/src/emb-features.qdoc b/doc/src/emb-features.qdoc
new file mode 100644
index 0000000..67f92a5
--- /dev/null
+++ b/doc/src/emb-features.qdoc
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page fine-tuning-features.html
+ \title Fine-Tuning Features in Qt
+ \ingroup qtce
+ \ingroup qt-embedded-linux
+ \brief Describes how to reduce the size of Qt libraries by selecting only
+ the features that are needed.
+
+ In many cases, only a fixed set of applications are deployed on an
+ embedded device, making it possible to save resources by minimizing
+ the size of the associated libraries. The Qt installation can easily
+ be optimized by avoiding to compile in the features that are not
+ required.
+
+ \tableofcontents
+
+ A wide range of features are defined, covering classes and technologies
+ provided by several of Qt's modules.
+ You can look up the different feature definitions in the
+ \c{src/corelib/global/qfeatures.txt} file within the Qt source
+ distribution.
+
+ \section1 Simple Customization
+
+ \section2 Embedded Linux
+
+ To disable a particular feature, just run the \c configure script
+ for Qt for Embedded Linux with the \c -no-feature-<feature> option.
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-features.qdoc 1
+
+ The feature can easily be enabled again by running \c configure
+ with the \c -feature-<feature> option.
+
+ See also \l{Qt Performance Tuning}.
+
+ \section2 Windows CE
+
+ To disable a particular feature, just run the \c configure script
+ with the set of required \c -D<feature> options. For example,
+ you can use the \c -D option to define \c{QT_NO_THREAD}:
+
+ \snippet doc/src/snippets/code/doc_src_emb-features.qdoc 0
+
+ The \c -D option only creates a Qt internal define. If you get linker
+ errors you have to define \c QT_NO_THREAD also for your project.
+ You can do this by adding \c DEFINES += \c QT_NO_THREAD to your
+ \c .pro file.
+
+ See also \l{Qt Performance Tuning}.
+
+ \section1 Managing Large Numbers of Features
+
+ If you want to disable a lot of features, it is more comfortable
+ to use the \c qconfig tool.
+ You can disable a \e set of features by creating a custom
+ configuration file that defines the preferred subset of Qt's
+ functionality. Such a file uses macros to disable the unwanted
+ features, and can be created manually or by using the \c qconfig
+ tool located in the \c{tools/qconfig} directory of the Qt source
+ distribution.
+
+ \note The \c qconfig tool is intended to be built against Qt on
+ desktop platforms.
+
+ \bold{Windows CE:} The Qt for Windows CE package contains a \c qconfig
+ executable that you can run on a Windows desktop to configure the build.
+
+ \image qt-embedded-qconfigtool.png
+
+ The \c qconfig tool's interface displays all of Qt's
+ functionality, and allows the user to both disable and enable
+ features. The user can open and edit any custom configuration file
+ located in the \c{src/corelib/global} directory. When creating a
+ custom configuration file manually, a description of the currently
+ available Qt features can be found in the
+ \c{src/corelib/global/qfeatures.txt} file.
+
+ Note that some features depend on others; disabling any feature
+ will automatically disable all features depending on it. The
+ feature dependencies can be explored using the \c qconfig tool,
+ but they are also described in the \c{src/corelib/global/qfeatures.h}
+ file.
+
+ To be able to apply the custom configuration, it must be saved in
+ a file called \c qconfig-myfile.h in the \c{src/corelib/global}
+ directory. Then use the \c configure tool's \c -qconfig option
+ and pass the configuration's file name without the \c qconfig-
+ prefix and \c .h extension, as argument.
+ The following examples show how this is invoked on each of the
+ embedded platforms for a file called \c{qconfig-myfile.h}:
+
+ \bold{Embedded Linux:}
+
+ \snippet doc/src/snippets/code/doc_src_emb-features.qdoc 3
+
+ \bold{Windows CE:}
+
+ \snippet doc/src/snippets/code/doc_src_emb-features.qdoc 2
+
+ Qt provides several ready-made custom configuration files,
+ defining minimal, small, medium and large installations,
+ respectively. These files are located in the
+ \c{/src/corelib/global} directory in the Qt source distribution.
+*/
diff --git a/doc/src/emb-fonts.qdoc b/doc/src/emb-fonts.qdoc
new file mode 100644
index 0000000..3ed23c3
--- /dev/null
+++ b/doc/src/emb-fonts.qdoc
@@ -0,0 +1,201 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-fonts.html
+
+ \title Qt for Embedded Linux Fonts
+ \ingroup qt-embedded-linux
+
+ \l {Qt for Embedded Linux} uses the
+ \l{http://freetype.sourceforge.net/freetype2/index.html}{FreeType 2}
+ font engine to produce font output. The formats supported depends on
+ the locally installed version of the FreeType library. In addition,
+ \l{Qt for Embedded Linux} supports the Qt Prerendered Font formats (\l QPF and \l QPF2):
+ light-weight non-scalable font formats specific to \l {Qt for Embedded Linux}.
+ QPF2 is the native format of \l{Qt for Embedded Linux}. QPF is the legacy
+ format used by Qt/Embedded 2.x and 3.x. Several of the formats may be rendered
+ using anti-aliasing for improved readability.
+
+ When \l{Qt for Embedded Linux} applications run, they look for fonts in
+ Qt's \c lib/fonts/ directory. \l {Qt for Embedded Linux} will automatically detect
+ prerendered fonts and TrueType fonts. For compatibility, it will also read the
+ legacy \c lib/fonts/fontdir file.
+
+ Support for other font formats can be added, contact
+ \l{mailto:qt-info@nokia.com}{qt-info@nokia.com} for more
+ information.
+
+ \tableofcontents
+
+ \table 100%
+ \row
+ \o
+ \bold {Optimization}
+
+ The \l FreeType, \l QPF2 and \l QPF formats are features that can be
+ disabled using the
+ \l{Fine-Tuning Features in Qt}{feature definition system},
+ reducing the size of Qt and saving resources.
+
+ Note that at least one font format must be defined.
+
+ See the \l {Fine-Tuning Features in Qt} documentation for
+ details.
+
+ \o
+ \inlineimage qt-embedded-fontfeatures.png
+ \endtable
+
+ All supported fonts use the Unicode character encoding. Most fonts
+ available today do, but they usually don't contain \e all the
+ Unicode characters. A complete 16-point Unicode font uses over 1
+ MB of memory.
+
+ \target FreeType
+ \section1 FreeType Formats
+
+ The \l {http://freetype.sourceforge.net/freetype2/index.html}{FreeType 2}
+ library (and therefore \l{Qt for Embedded Linux}) can support the following font formats:
+
+ \list
+ \o TrueType (TTF)
+ \o PostScript Type1 (PFA/PFB)
+ \o Bitmap Distribution Format (BDF)
+ \o CID-keyed Type1
+ \o Compact Font Format (CFF)
+ \o OpenType fonts
+ \o SFNT-based bitmap fonts
+ \o Portable Compiled Format (PCF)
+ \o Microsoft Windows Font File Format (Windows FNT)
+ \o Portable Font Resource (PFR)
+ \o Type 42 (limited support)
+ \endlist
+
+ It is possible to add modules to the \l
+ {http://freetype.sourceforge.net/freetype2/index.html}{FreeType 2}
+ font engine to support other types of font files. For more
+ information, see the font engine's own website: \l
+ http://freetype.sourceforge.net/freetype2/index.html.
+
+ Glyphs rendered using FreeType are shared efficiently between applications,
+ reducing memory requirements and speeding up text rendering.
+
+ \omit
+ \l {Qt for Embedded Linux} will by default use the system FreeType library if it exists.
+ Otherwise it will use a copy of the FreeType library in Qt, which by default only
+ supports TrueType fonts to reduce footprint.
+ \endomit
+
+ \target QPF2
+ \section1 Qt Prerendered Font (QPF2)
+
+ The Qt Prerendered Font (QPF2) is an architecture-independent,
+ light-weight and non-scalable font format specific to \l{Qt for Embedded Linux}.
+
+ Nokia provides the cross-platform \c makeqpf tool, included in the
+ \c tools directory of both \l {Qt} and \l{Qt for Embedded Linux}, which allows
+ generation of QPF2 files from system fonts.
+
+ QPF2 supports anti-aliasing and complex writing systems, using information
+ from the corresponding TrueType font, if present on the system. The format
+ is designed to be mapped directly to memory. The same format is used to
+ share glyphs from non-prerendered fonts between applications.
+
+ \target QPF
+ \section1 Legacy Qt Prerendered Font (QPF)
+
+ Nokia provides support for the legacy QPF format for compatibility
+ reasons. QPF is based on the internal font engine data structure of Qt/Embedded
+ versions 2 and 3.
+
+ Note that the file name describes the font, for example \c helvetica_120_50.qpf
+ is 12 point Helvetica while \c helvetica_120_50i.qpf is 12 point Helvetica \e italic.
+
+ \omit
+ \section1 Memory Requirements
+
+ Taking advantage of the way the QPF format is structured, Qt for
+ Embedded Linux memory-maps the data rather than reading and parsing it.
+ This reduces RAM consumption even further.
+
+ Scalable fonts use a larger amount of memory per font, but
+ these fonts provide a memory saving if many different sizes of each
+ font are needed.
+ \endomit
+
+ \section1 The Legacy \c fontdir File
+
+ For compatibility reasons \l{Qt for Embedded Linux} supports the \c fontdir
+ file, if present. The file defines additional fonts available to the
+ application, and has the following format:
+
+ \snippet doc/src/snippets/code/doc_src_emb-fonts.qdoc 0
+
+ \table 100%
+ \header \o Field \o Description
+ \row \o \bold name
+ \o The name of the font format, e.g.,\c Helvetica, \c Times, etc.
+ \row \o \bold file
+ \o The name of the file containing the font, e.g., \c
+ helvR0810.bdf, \c verdana.ttf, etc.
+ \row \o \bold renderer
+ \o Specifies the font engine that should be used to render the
+ font, currently only the FreeType font engine (\c FT) is
+ supported.
+ \row \o \bold italic
+ \o Specifies whether the font is italic or not; the accepted
+ values are \c y or \c n.
+ \row \o \bold weight
+ \o Specifies the font's weight: \c 50 is normal, \c 75 is bold,
+ etc.
+ \row \o \bold size
+ \o Specifies the font size, i.e., point size * 10. For example, a
+ value of 120 means 12pt. A value of 0 means that the font is
+ scalable.
+ \row \o \bold flags
+ \o The following flag is supported:
+ \list
+ \o \c s: smooth (anti-aliased)
+ \endlist
+ All other flags are ignored.
+ \endtable
+*/
diff --git a/doc/src/emb-framebuffer-howto.qdoc b/doc/src/emb-framebuffer-howto.qdoc
new file mode 100644
index 0000000..fc86dd9
--- /dev/null
+++ b/doc/src/emb-framebuffer-howto.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-testingframebuffer.html
+
+ \title Testing the Linux Framebuffer
+ \subtitle for Qt for Embedded Linux
+ \ingroup qt-embedded-linux
+
+ To test that the Linux framebuffer is set up correctly, and that
+ the device permissions are correct, use the program found in
+ \c examples/qws/framebuffer which opens the frame buffer and draws
+ three squares of different colors.
+*/
diff --git a/doc/src/emb-install.qdoc b/doc/src/emb-install.qdoc
new file mode 100644
index 0000000..11b3f03
--- /dev/null
+++ b/doc/src/emb-install.qdoc
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-install.html
+
+ \title Installing Qt for Embedded Linux
+ \ingroup qt-embedded-linux
+ \ingroup installation
+ \brief How to install Qt for Embedded Linux.
+
+ This document describes how to install \l{Qt for Embedded Linux} in your
+ development environment:
+
+ \tableofcontents
+
+ Please see the \l{Cross-Compiling Qt for Embedded Linux Applications}{cross
+ compiling} and \l{Deploying Qt for Embedded Linux Applications}{deployment}
+ documentation for details on how to install \l{Qt for Embedded Linux} on
+ your target device.
+
+ Note also that this installation procedure is written for Linux,
+ and that it may need to be modified for other platforms.
+
+ \section1 Step 1: Installing the License File (commercial editions only)
+
+ If you have the commercial edition of \l{Qt for Embedded Linux}, the first step
+ is to install your license file as \c $HOME/.qt-license.
+
+ For the open source version you do not need a license file.
+
+ \section1 Step 2: Unpacking the Archive
+
+ First uncompress the archive in the preferred location, then
+ unpack it:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 0
+
+ This document assumes that the archive is unpacked in the
+ following directory:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 1
+
+ \section1 Step 3: Building the Library
+
+ Before building the \l{Qt for Embedded Linux} library, run the \c
+ ./configure script to configure the library for your development
+ architecture. You can list all of the configuration system's
+ options by typing \c {./configure -help}.
+
+ Note that by default, \l{Qt for Embedded Linux} is configured for
+ installation in the \c{/usr/local/Trolltech/QtEmbedded-%VERSION%}
+ directory, but this can be changed by using the \c{-prefix}
+ option. Alternatively, the \c{-prefix-install} option can be used
+ to specify a "local" installation within the source directory.
+
+ The configuration system is also designed to allow you to specify
+ your platform architecture:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 2
+
+ In general, all Linux systems which have framebuffer support can
+ use the \c generic architecture. Other typical architectures are
+ \c x86, \c arm and \c mips.
+
+ \note If you want to build Qt for Embedded Linux for use with a virtual
+ framebuffer, pass the \c{-qvfb} option to the \c configure
+ script.
+
+ To create the library and compile all the demos, examples, tools,
+ and tutorials, type:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 3
+
+ On some systems the \c make utility is named differently, e.g. \c
+ gmake. The \c configure script tells you which \c make utility to
+ use.
+
+ If you did not configure \l{Qt for Embedded Linux} using the \c{-prefix-install}
+ option, you need to install the library, demos, examples, tools,
+ and tutorials in the appropriate place. To do this, type:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 4
+
+ and enter the root password.
+
+ \note You can use the \c INSTALL_ROOT environment variable to specify
+ the location of the installed files when invoking \c{make install}.
+
+ \section1 Step 4: Adjusting the Environment Variables
+
+ In order to use \l{Qt for Embedded Linux}, the \c PATH variable must be extended
+ to locate \c qmake, \c moc and other \l{Qt for Embedded Linux} tools, and the \c
+ LD_LIBRARY_PATH must be extended for compilers that do not support
+ \c rpath.
+
+ To set the \c PATH variable, add the following lines to your \c
+ .profile file if your shell is bash, ksh, zsh or sh:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 5
+
+ In case your shell is csh or tcsh, add the following line to the
+ \c .login file instead:
+
+ \snippet doc/src/snippets/code/doc_src_emb-install.qdoc 6
+
+ If you use a different shell, please modify your environment
+ variables accordingly.
+
+ For compilers that do not support \c rpath you must also extend
+ the \c LD_LIBRARY_PATH environment variable to include
+ \c /usr/local/Trolltech/QtEmbedded-%VERSION%/lib. Note that on Linux
+ with GCC, this step is not needed.
+
+ \section1 Step 5: Building the Virtual Framebuffer
+
+ For development and debugging, \l{Qt for Embedded Linux} provides a virtual
+ framebuffer as well as the option of running \l{Qt for Embedded Linux} as a VNC
+ server. For a description of how to install the virtual
+ framebuffer and how to use the VNC protocol, please consult the
+ documentation at:
+
+ \list
+ \o \l {The Virtual Framebuffer}
+ \o \l {The VNC Protocol and Qt for Embedded Linux}
+ \endlist
+
+ Note that the virtual framebuffer requires a Qt for X11
+ installation. See \l {Installing Qt on X11 Platforms} for details.
+
+ The Linux framebuffer, on the other hand, is enabled by default on
+ all modern Linux distributions. For information on older versions,
+ see \l http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html. To test
+ that the Linux framebuffer is set up correctly, use the program
+ provided by the \l {Testing the Linux Framebuffer} document.
+
+ That's all. \l{Qt for Embedded Linux} is now installed.
+
+ \table 100%
+ \row
+ \o
+ \bold {Customizing the Qt for Embedded Linux Library}
+
+ When building embedded applications on low-powered devices,
+ reducing the memory and CPU requirements is important.
+
+ A number of options tuning the library's performance are
+ available. But the most direct way of saving resources is to
+ fine-tune the set of Qt features that is compiled. It is also
+ possible to make use of accelerated graphics hardware.
+
+ \list
+ \o \l {Fine-Tuning Features in Qt}
+ \o \l {Qt Performance Tuning}
+ \o \l {Adding an Accelerated Graphics Driver to Qt for Embedded Linux}
+ \endlist
+
+ \endtable
+*/
diff --git a/doc/src/emb-makeqpf.qdoc b/doc/src/emb-makeqpf.qdoc
new file mode 100644
index 0000000..ca33eda
--- /dev/null
+++ b/doc/src/emb-makeqpf.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-makeqpf.html
+ \title makeqpf
+ \ingroup qt-embedded-linux
+
+ \c makeqpf is not part of Qt 4. However, Qt 4 can still read QPF
+ files generated by Qt 2 or 3. To generate QPF files, use makeqpf from Qt 2
+ or 3.
+*/
diff --git a/doc/src/emb-performance.qdoc b/doc/src/emb-performance.qdoc
new file mode 100644
index 0000000..79edf34
--- /dev/null
+++ b/doc/src/emb-performance.qdoc
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-performance.html
+ \title Qt Performance Tuning
+ \ingroup qtce
+ \ingroup qt-embedded-linux
+ \brief Ways to improve performance on embedded platforms.
+
+ When building embedded applications on low-powered devices,
+ \l{Qt for Windows CE} and \l{Qt for Embedded Linux} provide
+ a number of options that reduce the memory and/or CPU requirements
+ by making various trade-offs. These options range from variations
+ in programming style, to linking and memory allocation.
+
+ Note that the most direct way of saving resources, is to avoid compiling
+ in features that are not required. See the \l{Fine-Tuning Features in Qt}
+ {fine tuning features} documentation for details.
+
+ \tableofcontents
+
+ \section1 Programming Style
+
+ Rather than creating dialogs and widgets every time they are
+ needed, and delete them when they are no longer required, create
+ them once and use the QWidget::hide() and QWidget::show()
+ functions whenever appropriate. To avoid a slow startup of the
+ application, delay the creation of dialogs and widgets until they
+ are requested. All this will improve the CPU performance, it
+ requires a little more memory, but will be much faster.
+
+ \section1 Static vs. Dynamic Linking
+
+ A lot of CPU and memory is used by the ELF (Executable and Linking
+ Format) linking process. Significant savings can be achieved by
+ using a static build of the application suite; rather than having
+ a collection of executables which link dynamically to Qt's
+ libraries, all the applications is built into into a single
+ executable which is statically linked to Qt's libraries.
+
+ This improves the start-up time and reduces memory usage at the
+ expense of flexibility (to add a new application, you must
+ recompile the single executable) and robustness (if one
+ application has a bug, it might harm other applications).
+
+ \table 100%
+ \row
+ \o \bold {Creating a Static Build}
+
+ To compile Qt as a static library, use the \c -static option when
+ running configure:
+
+ \snippet doc/src/snippets/code/doc_src_emb-performance.qdoc 0
+
+ To build the application suite as an all-in-one application,
+ design each application as a stand-alone widget (or set of
+ widgets) with only minimal code in the \c main() function. Then,
+ write an application that provides a means of switching between
+ the applications. The \l Qt Extended platform is an example using this
+ approach: It can be built either as a set of dynamically linked
+ executables, or as a single static application.
+
+ Note that the application still should link dynamically against
+ the standard C library and any other libraries which might be used
+ by other applications on the target device.
+
+ \endtable
+
+ When installing end-user applications, this approach may not be an
+ option, but when building a single application suite for a device
+ with limited CPU power and memory, this option could be very
+ beneficial.
+
+ \section1 Alternative Memory Allocation
+
+ The libraries shipped with some C++ compilers on some platforms
+ have poor performance in the built-in "new" and "delete"
+ operators. Improved memory allocation and performance may be
+ gained by re-implementing these functions:
+
+ \snippet doc/src/snippets/code/doc_src_emb-performance.qdoc 1
+
+ The example above shows the necessary code to switch to the plain
+ C memory allocators.
+
+ \section1 Bypassing the Backing Store
+
+ When rendering, Qt uses the concept of a backing store; i.e., a
+ paint buffer, to reduce flicker and to support graphics operations
+ such as blending.
+
+ The default behavior is for each client to render
+ its widgets into memory while the server is responsible for
+ putting the contents of the memory onto the screen. But when the
+ hardware is known and well defined, as is often the case with
+ software for embedded devices, it might be useful to bypass the
+ backing store, allowing the clients to manipulate the underlying
+ hardware directly.
+ \if defined(qtce)
+ This is achieved by setting the Qt::WA_PaintOnScreen window attribute
+ for each widget.
+ \else
+
+ There are two approaches to direct painting: The first approach is
+ to set the Qt::WA_PaintOnScreen window attribute for each widget,
+ the other is to use the QDirectPainter class to reserve a region
+ of the framebuffer.
+ For more information, see the
+ \l{Qt for Embedded Linux Architecture#Direct Painting}{direct painting}
+ section of the \l{Qt for Embedded Linux Architecture}{architecture}
+ documentation.
+ \endif
+*/
diff --git a/doc/src/emb-pointer.qdoc b/doc/src/emb-pointer.qdoc
new file mode 100644
index 0000000..d52abfb
--- /dev/null
+++ b/doc/src/emb-pointer.qdoc
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-pointer.html
+
+ \title Qt for Embedded Linux Pointer Handling
+ \ingroup qt-embedded-linux
+
+ When running a \l{Qt for Embedded Linux} application, it either runs as a
+ server or connects to an existing server. The mouse driver is
+ loaded by the server application when it starts running, using
+ Qt's \l {How to Create Qt Plugins}{plugin system}.
+
+ Internally in the client/server protocol, all system generated
+ events, including pointer events, are passed to the server
+ application which then propagates the event to the appropriate
+ client. Note that pointer handling in \l{Qt for Embedded Linux} works for
+ both mouse and mouse-like devices such as touch panels and
+ trackballs.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Available Drivers
+
+ \l{Qt for Embedded Linux} provides ready-made drivers for the MouseMan,
+ IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy
+ protocols as well as the universal touch screen library,
+ tslib. Run the \c configure script to list the available drivers:
+
+ \if defined(QTOPIA_PHONE)
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 0
+
+ \bold{Note:} By default only the PC mouse driver is enabled.
+
+ The various drivers can be enabled and disabled using the \c
+ configure script. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 1
+
+ \else
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 2
+
+ In the default Qt configuration, only the "pc" mouse driver is
+ enabled. The various drivers can be enabled and disabled using
+ the \c configure script. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 3
+ \endif
+
+ Custom mouse drivers can be implemented by subclassing the
+ QWSMouseHandler class and creating a mouse driver plugin (derived
+ from the QMouseDriverPlugin class). The default implementation of the
+ QMouseDriverFactory class will automatically detect the plugin,
+ loading the driver into the server application at run-time.
+
+ If you are creating a driver for a device that needs calibration
+ or noise reduction, such as a touchscreen, derive from the
+ QWSCalibratedMouseHandler subclass instead to take advantage of
+ its calibration functionality.
+
+ \if defined(QTOPIA_PHONE)
+ For a tutorial on how to add a new keyboard driver plug-in
+ see: \l {Tutorial: Implementing a Device Plug-in}.
+ \endif
+
+ \section1 Specifying a Driver
+
+ Provided that the "pc" mouse driver is enabled, \l{Qt for Embedded Linux} will
+ try to auto-detect the mouse device if it is one of the supported
+ types on \c /dev/psaux or one of the \c /dev/ttyS? serial
+ lines. If multiple mice are detected, all may be used
+ simultaneously.
+
+ Note that \l{Qt for Embedded Linux} does not support auto-detection of \e
+ {touch panels} in which case the driver must be specified
+ explicitly to determine which device to use.
+
+ To manually specify which driver to use, set the QWS_MOUSE_PROTO
+ environment variable. For example (if the current shell is bash,
+ ksh, zsh or sh):
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 4
+
+ The valid values for the \c <driver> argument are \c MouseMan, \c
+ IntelliMouse, \c Microsoft, \c VR41xx, \c LinuxTP, \c Yopy, \c
+ Tslib and \l {QMouseDriverPlugin::keys()}{keys} identifying custom
+ drivers, and the driver specific options are typically a device,
+ e.g., \c /dev/mouse for mouse devices and \c /dev/ts for touch
+ panels.
+
+ Multiple mouse drivers can be specified in one go:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 5
+
+ Input will be read from all specified drivers.
+
+ Note that the \c Vr41xx driver also accepts two optional
+ arguments: \c press=<value> defining a mouse click (the default
+ value is 750) and \c filter=<value> specifying the length of the
+ filter used to eliminate noise (the default length is 3). For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 6
+
+ \table
+ \header \o The Tslib Mouse Driver
+ \row
+ \o
+
+ The tslib mouse driver inherits the QWSCalibratedMouseHandler
+ class, providing calibration and noise reduction functionality in
+ addition to generating mouse events for devices using the
+ Universal Touch Screen Library.
+
+ To be able to compile this mouse handler, \l{Qt for Embedded Linux} must be
+ configured with the \c -qt-mouse-tslib option as described
+ above. In addition, the tslib headers and library must be present
+ in the build environment.
+
+ The tslib sources can be downloaded from \l
+ http://tslib.berlios.de. Use the \c configure script's -L and
+ -I options to explicitly specify the location of the library and
+ its headers:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7
+
+ In order to use this mouse driver, tslib must also be correctly
+ installed on the target machine. This includes providing a \c
+ ts.conf configuration file and setting the neccessary environment
+ variables (see the README file provided with tslib for details).
+
+ The \c ts.conf file will usually contain the following two lines:
+
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 8
+
+ To make \l{Qt for Embedded Linux} explicitly choose the tslib mouse
+ handler, set the QWS_MOUSE_PROTO environment variable as explained
+ above.
+
+ \endtable
+
+ \section1 Troubleshooting
+
+ \section2 Device Files
+
+ Make sure you are using the correct device file.
+
+ As a first step, you can test whether the device file actually gives any
+ output. For instance, if you have specified the mouse driver with
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 9
+ then try examining
+ the output from the device by entering the following command in a console:
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 10
+
+ If you see output from the device printed on the console when you move
+ the mouse, you are probably using the correct device file; otherwise, you
+ will need to experiment to find the correct device file.
+
+ \section2 File Permissions
+
+ Make sure you have sufficient permissions to access the device file.
+
+ The Qt for Embedded Linux server process needs at least read permission for the
+ device file. Some drivers also require write access to the device file.
+ For instance, if you have specified the mouse driver with
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 11
+ then examine the permissions of the device file by entering the following
+ command in a console:
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 12
+
+ If the device file is actually a symbolic link to another file, you must
+ change the permissions of the actual file instead.
+*/
diff --git a/doc/src/emb-porting.qdoc b/doc/src/emb-porting.qdoc
new file mode 100644
index 0000000..9d6fad6
--- /dev/null
+++ b/doc/src/emb-porting.qdoc
@@ -0,0 +1,193 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-porting-operatingsystem.html
+
+ \title Porting Qt for Embedded Linux to Another Operating System
+ \ingroup qt-embedded-linux
+
+ \l{Qt for Embedded Linux} is reasonably platform-independent, making use of
+ the standard C library and some POSIX functions, but only a Linux
+ implementation is publically available. If you are looking for a
+ non-Linux commercial implementation, it is worth contacting \l
+ {mailto:sales@trolltech.com}{sales@trolltech.com} to see if we can
+ help.
+
+ There are several issues to be aware of if you plan to do your own
+ port to another operating system. In particular you must resolve
+ \l{Qt for Embedded Linux}'s shared memory and semaphores (used to share
+ window regions), and you must provide something similar to
+ Unix-domain sockets for inter-application communication. You must
+ also provide a screen driver, and if you want to implement sound
+ you must provide your own sound server. Finally you must modify
+ the event dispatcher used by \l{Qt for Embedded Linux}.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Shared Memory and Semaphores
+
+ \l{Qt for Embedded Linux} uses System V IPC (shared memory and semaphores)
+ to share window regions between client and server. When porting,
+ something similar must be provided; otherwise it will not be
+ possible to run multiple applications.
+
+ System V semaphores are also used for synchronizing access to the
+ framebuffer.
+
+ \list
+ \o Modify \c qsharedmemory_p.cpp
+ \o Modify \c qlock_qws.cpp
+ \o Modify \c qwslock.cpp
+ \endlist
+
+ \section1 Inter-Application Communication
+
+ To communicate between applications, \l{Qt for Embedded Linux} uses the
+ Unix-domain sockets. When porting, something similar must be
+ provided; otherwise it will not be possible to run multiple
+ applications.
+
+ It should be possible to use message queues or similar mechanisms
+ to achieve this. With the exception of QCOP messages, individual
+ messages should be no more than a few bytes in length (QCOP
+ messages are generated by the client applications and not Qt for
+ Embedded Linux).
+
+ \list
+ \o Modify \c qwssocket_qws.cpp
+ \endlist
+
+ \section1 Screen Management
+
+ When rendering, the default behavior in \l{Qt for Embedded Linux} is
+ for each client to render its widgets into memory while the server is
+ responsible for putting the contents of the memory onto the screen
+ using the screen driver.
+
+ When porting, a new screen driver must be implemented, providing a
+ byte pointer to a memory-mapped framebuffer and information about
+ width, height and bit depth (the latter information can most
+ likely be hard-coded).
+
+ \list
+ \o Reimplement \c qscreen_qws.cpp
+ \endlist
+
+ \section1 Sound Management
+
+ To implement sound, \l{Qt for Embedded Linux} uses a Linux style device (\c
+ /dev/dsp). If you want to use the \l{Qt for Embedded Linux} sound server on
+ another platform you must reimplement it.
+
+ \list
+ \o Reimplement \c qsoundqss_qws.cpp
+ \endlist
+
+ \section1 Event Dispatching
+
+ \l{Qt for Embedded Linux} uses an event dispatcher to pass events to and
+ from the \l{Qt for Embedded Linux} server application. Reimplement the \c
+ select() function to enable \l{Qt for Embedded Linux} to dispatch events on
+ your platform.
+
+ \list
+ \o Modify \c qeventdispatcher_qws.cpp
+ \endlist
+*/
+
+/*!
+ \page qt-embedded-porting-device.html
+
+ \title Porting Qt for Embedded Linux to a New Architecture
+ \ingroup qt-embedded-linux
+
+ When porting \l{Qt for Embedded Linux} to a new architecture there are
+ several issues to be aware of: You must provide suitable hardware
+ drivers, and you must ensure to implement platform dependent
+ atomic operations to enable multithreading on the new
+ architecture.
+
+ \section1 Hardware Drivers
+
+ When running a \l{Qt for Embedded Linux} application, it either runs as a
+ server or connects to an existing server. All system generated
+ events, including keyboard and mouse events, are passed to the
+ server application which then propagates the event to the
+ appropriate client. When rendering, the default behavior is for
+ each client to render its widgets into memory while the server is
+ responsible for putting the contents of the memory onto the
+ screen.
+
+ The various hardware drivers are loaded by the server
+ application when it starts running, using Qt's \l {How to Create
+ Qt Plugins}{plugin system}.
+
+ Derive from the QWSMouseHandler, QWSKeyboardHandler and QScreen
+ classes to create a custom mouse, keyboard and screen driver
+ respectively. To load the drivers into the server application at
+ runtime, you must also create corresponding plugins. See the
+ following documentation for more details:
+
+ \list
+ \o \l{Qt for Embedded Linux Pointer Handling}{Pointer Handling}
+ \o \l{Qt for Embedded Linux Character Input}{Character Input}
+ \o \l{Qt for Embedded Linux Display Management}{Display Management}
+ \endlist
+
+ \section1 Atomic Operations
+
+ Qt uses an optimization called \l {Implicitly Shared Classes}{implicit sharing}
+ for many of its value classes; implicitly shared classes can safely be
+ copied across threads. This technology is implemented using atomic
+ operations; i.e., \l{Qt for Embedded Linux} requires that platform-specific
+ atomic operations are implemented to support Linux.
+
+ When porting \l{Qt for Embedded Linux} to a new architecture, it is
+ important to ensure that the platform-specific atomic operations
+ are implemented in a corresponding header file, and that this file
+ is located in Qt's \c src/corelib/arch directory.
+
+ See the \l {Implementing Atomic Operations}{atomic operations}
+ documentation for more details.
+*/
diff --git a/doc/src/emb-qvfb.qdoc b/doc/src/emb-qvfb.qdoc
new file mode 100644
index 0000000..8b819b6
--- /dev/null
+++ b/doc/src/emb-qvfb.qdoc
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qvfb.html
+
+ \title The Virtual Framebuffer
+ \ingroup qt-embedded-linux
+
+ \l{Qt for Embedded Linux} applications write directly to the
+ framebuffer, eliminating the need for the X Window System and
+ saving memory. For development and debugging purposes, a virtual
+ framebuffer can be used, allowing \l{Qt for Embedded Linux}
+ programs to be developed on a desktop machine, without switching
+ between consoles and X11.
+
+ QVFb is an X11 application supplied with Qt for X11 that provides
+ a virtual framebuffer for Qt for Embedded Linux to use. To use it,
+ you need to \l{Installing Qt on X11 Platforms}{configure and
+ install Qt on X11 platforms} appropriately. Further requirements
+ can be found in the \l{Qt for Embedded Linux Requirements}
+ document.
+
+ \image qt-embedded-virtualframebuffer.png
+
+ The virtual framebuffer emulates a framebuffer using a shared
+ memory region and the \c qvfb tool to display the framebuffer in a
+ window. The \c qvfb tool also supports a feature known as a skin
+ which can be used to change the look and feel of the display. The
+ tool is located in Qt's \c tools/qvfb directory, and provides
+ several additional features accessible through its \gui File and
+ \gui View menus.
+
+ Please note that the virtual framebuffer is a development tool
+ only. No security issues have been considered in the virtual
+ framebuffer design. It should be avoided in a production
+ environment; i.e. do not configure production libraries with the
+ \c -qvfb option.
+
+ \tableofcontents
+
+ \section1 Displaying the Virtual Framebuffer
+
+ To run the \c qvfb tool displaying the virtual framebuffer, the
+ \l{Qt for Embedded Linux} library must be configured and compiled
+ with the \c -qvfb option:
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 0
+
+ Ensure that you have all the
+ \l{Qt for Embedded Linux Requirements#Additional X11 Libraries for QVFb}
+ {necessary libraries} needed to build the tool, then compile and run the
+ \c qvfb tool as a normal Qt for X11 application (i.e., do \e not compile
+ it as a \l{Qt for Embedded Linux} application):
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 1
+
+ The \c qvfb application supports the following command line
+ options:
+
+ \table
+ \header \o Option \o Description
+ \row
+ \o \c {-width <value>}
+ \o The width of the virtual framebuffer (default: 240).
+ \row
+ \o \c {-height <value>}
+ \o The height of the virtual framebuffer (default: 320).
+ \row
+ \o \c {-depth <value>}
+ \o The depth of the virtual framebuffer (1, 8 or 32; default: 8).
+ \row
+ \o \c -nocursor
+ \o Do not display the X11 cursor in the framebuffer window.
+ \row
+ \o \c {-qwsdisplay <:id>}
+ \o The \l{Qt for Embedded Linux} display ID (default: 0).
+ \row
+ \o \c {-skin <name>.skin}
+ \o The preferred skin. Note that the skin must be located in Qt's
+ \c /tools/qvfb/ directory.
+ \row
+ \o \c {-zoom <factor>}
+ \o Scales the application view with the given factor.
+
+ \endtable
+
+ \section2 Skins
+
+ A skin is a set of XML and pixmap files that tells the vitual
+ framebuffer what it should look like and how it should behave; a
+ skin can change the unrealistic default display into a display
+ that is similar to the target device. To access the \c qvfb tool's
+ menus when a skin is activated, right-click over the display.
+
+ Note that a skin can have buttons which (when clicked) send
+ signals to the Qt Extended application running inside the virtual
+ framebuffer, just as would happen on a real device.
+
+ \table 100%
+ \row
+ \o
+ \bold {Target Device Environment}
+
+ The \c qvfb tool provides various skins by default, allowing
+ the user to view their application in an environment similar
+ to their target device. The provided skins are:
+
+ \list
+ \o ClamshellPhone
+ \o pda
+ \o PDAPhone
+ \o Qt ExtendedPDA
+ \o Qt ExtendedPhone-Advanced
+ \o Qt ExtendedPhone-Simple
+ \o SmartPhone
+ \o SmartPhone2
+ \o SmartPhoneWithButtons
+ \o TouchscreenPhone
+ \o Trolltech-Keypad
+ \o Trolltech-Touchscreen
+ \endlist
+
+ In addition, it is possible to create custom skins.
+
+ \o \image qt-embedded-phone.png
+ \o \image qt-embedded-pda.png
+ \endtable
+
+ \bold {Creating Custom Skins}
+
+ The XML and pixmap files specifying a custom skin must be located
+ in subdirectory of the Qt's \c /tools/qvfb directory, called \c
+ /customskin.skin. See the ClamshellPhone skin for an example of the
+ file structure:
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 2
+
+ The \c /ClamshellPhone.skin directory contains the following files:
+
+ \list
+ \o \c ClamshellPhone.skin
+ \o \c ClamshellPhone1-5.png
+ \o \c ClamshellPhone1-5-pressed.png
+ \o \c ClamshellPhone1-5-closed.png
+ \o \c defaultbuttons.conf (only necessary for \l Qt Extended)
+ \endlist
+
+ Note that the \c defaultbuttons.conf file is only necessary if the
+ skin is supposed to be used with \l Qt Extended (The file customizes
+ the launch screen applications, orders the soft keys and provides
+ input method hints). See the \l Qt Extended documentation for more
+ information.
+
+ \table 100%
+ \header
+ \o {3,1} The ClamshellPhone Skin
+ \row
+ \o {3,1}
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 3
+
+ The \c ClamShellPhone.skin file quoted above, specifies three
+ pixmaps: One for the normal skin (\c Up), one for the activated
+ skin (\c Down) and one for the closed skin (\c Closed). In
+ addition, it is possible to specify a pixmap for the cursor (using
+ a \c Cursor variable).
+
+ The file also specifies the screen size (\c Screen) and the number
+ of available buttons (\c Areas). Then it describes the buttons
+ themselves; each button is specified by its name, keycode and
+ coordinates.
+
+ The coordinates are a list of at least 2 points in clockwise order
+ that define a shape for the button; a click inside this shape will
+ be treated as a click on that button. While pressed, the pixels
+ for the button are redrawn from the activated skin.
+
+ \row
+ \row
+ \o
+ \image qt-embedded-clamshellphone-closed.png The ClamshellPhone Skin (closed)
+ \o
+ \image qt-embedded-clamshellphone.png The ClamshellPhone Skin
+ \o
+ \image qt-embedded-clamshellphone-pressed.png The ClamshellPhone Skin (pressed)
+ \row
+ \o \c ClamshellPhone1-5-closed.png
+ \o \c ClamshellPhone1-5.png
+ \o \c ClamshellPhone1-5-pressed.png
+ \endtable
+
+ \section2 The File Menu
+
+ \image qt-embedded-qvfbfilemenu.png
+
+ The \gui File menu allows the user to configure the virtual
+ framebuffer display (\gui File|Configure...), save a snapshot of
+ the framebuffer contents (\gui {File|Save Image...}) and record
+ the movements in the framebuffer (\gui File|Animation...).
+
+ When choosing the \gui File|Configure menu item, the \c qvfb tool
+ provides a configuration dialog allowing the user to customize the
+ display of the virtual framebuffer. The user can modify the size
+ and depth as well as the Gamma values, and also select the
+ preferred skin (i.e. making the virtual framebuffer simulate the
+ target device environment). In addition, it is possible to emulate
+ a touch screen and a LCD screen.
+
+ Note that when configuring (except when changing the Gamma values
+ only), any applications using the virtual framebuffer will be
+ terminated.
+
+ \section2 The View Menu
+
+ \image qt-embedded-qvfbviewmenu.png
+
+ The \gui View menu allows the user to modify the target's refresh
+ rate (\gui {View|Refresh Rate...}), making \c qvfb check for
+ updated regions more or less frequently.
+
+ The regions of the display that have changed are updated
+ periodically, i.e. the virtual framebuffer is displaying discrete
+ snapshots of the framebuffer rather than each individual drawing
+ operation. For this reason drawing problems such as flickering may
+ not be apparent until the program is run using a real framebuffer.
+ If little drawing is being done, the framebuffer will not show any
+ updates between drawing events. If an application is displaying an
+ animation, the updates will be frequent, and the application and
+ \c qvfb will compete for processor time.
+
+ The \gui View menu also allows the user to zoom the view of the
+ application (\gui {View|Zoom *}).
+
+ \section1 Running Applications Using the Virtual Framebuffer
+
+ Once the virtual framebuffer (the \c qvfb application) is running,
+ it is ready for use: Start a server application (i.e. construct a
+ QApplication object with the QApplication::GuiServer flag or use
+ the \c -qws command line parameter. See the
+ \l {Running Qt for Embedded Linux Applications}{running applications}
+ documentation for details). For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 4
+
+ Note that as long as the virtual framebuffer is running and the
+ current \l{Qt for Embedded Linux} configuration supports \c qvfb,
+ \l{Qt for Embedded Linux} will automatically detect it and use it by
+ default. Alternatively, the \c -display option can be used to
+ specify the virtual framebuffer driver. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-qvfb.qdoc 5
+
+ \warning If \c qvfb is not running (or the current
+ \l{Qt for Embedded Linux} configuration doesn't support it) and the
+ driver is not explicitly specified, \l{Qt for Embedded Linux} will
+ write to the real framebuffer and the X11 display will be corrupted.
+*/
diff --git a/doc/src/emb-running.qdoc b/doc/src/emb-running.qdoc
new file mode 100644
index 0000000..9cdf414
--- /dev/null
+++ b/doc/src/emb-running.qdoc
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-running.html
+
+ \title Running Qt for Embedded Linux Applications
+ \ingroup qt-embedded-linux
+
+ A \l{Qt for Embedded Linux} application requires a server application to be
+ running, or to be the server application itself. Any \l{Qt for Embedded Linux}
+ application can be the server application by constructing the QApplication
+ object with the QApplication::GuiServer type, or by running the application
+ with the \c -qws command line option.
+
+ Applications can run using both single and multiple displays, and
+ various command line options are available.
+
+ Note that this document assumes that you either are using the
+ \l{The Virtual Framebuffer} or that you are running \l{Qt for Embedded Linux}
+ using the \l {The VNC Protocol and Qt for Embedded Linux}{VNC} protocol,
+ \e or that you have the Linux framebuffer configured
+ correctly and that no server process is running. (To test that the
+ Linux framebuffer is set up correctly, use the program provided by
+ the \l {Testing the Linux Framebuffer} document.)
+
+ \tableofcontents
+
+ \section1 Using a Single Display
+
+ To run the application using a single display, change to a Linux
+ console and select an application to run, e.g. \l {Text
+ Edit}{demos/textedit}. Run the application with the \c -qws
+ option:
+
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 0
+
+ \table 100%
+ \row
+ \o
+ Provided that the environment variables are adjusted properly
+ during the \l {Installing Qt for Embedded Linux}{installation process}, you
+ should see the \l {Text Edit} demo appear.
+
+ It might be that the hardware drivers must be specified explicitly
+ to make everything work properly. For more information, please
+ consult the following documentation:
+
+ \list
+ \o \l{Qt for Embedded Linux Pointer Handling}{Pointer Handling}
+ \o \l{Qt for Embedded Linux Character Input}{Character Input}
+ \o \l{Qt for Embedded Linux Display Management}{Display Management}
+ \endlist
+
+ \o
+ \inlineimage qt-embedded-runningapplication.png
+ \endtable
+
+ Additional applications can be run as clients, i.e., by running
+ these applications \e without the \c -qws option they will connect
+ to the existing server as clients. You can exit the server
+ application at any time using \gui{Ctrl+Alt+Backspace}.
+
+ \section1 Using Multiple Displays
+
+ Qt for Embedded Linux also allows multiple displays to be used
+ simultaneously. There are two ways of achieving this: Either run
+ multiple Qt for Embedded Linux server processes, or use the
+ ready-made \c Multi screen driver.
+
+ When running multiple server processes, the screen driver (and
+ display number) must be specified for each process using the \c
+ -display command line option or by setting the QWS_DISPLAY
+ environment variable. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 1
+
+ See the \l {Qt for Embedded Linux Display Management}{display management}
+ documentation for more details on how to specify a screen
+ driver. Note that you must also specify the display (i.e., server
+ process) when starting client applications:
+
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 2
+
+ There is no way of moving a client from one display to another
+ when running multiple server processes. Using the \c Multi screen
+ driver, on the other hand, applications can easiliy be moved
+ between the various screens.
+
+ The \c Multi screen driver can be specified just like any other
+ screen driver by using the \c -display command line option or by
+ setting the QWS_DISPLAY environment variable. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 3
+
+ See the \l {Qt for Embedded Linux Display Management}{display management}
+ documentation for details regarding arguments.
+
+ \section1 Command Line Options
+
+ \table 100%
+ \header
+ \o Option \o Description
+ \row
+ \o \bold -fn <font>
+ \o
+ Defines the application font. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 4
+ The font should be specified using an X logical font description.
+ \row
+ \o \bold -bg <color>
+ \o
+ Sets the default application background color. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 5
+ The color-name must be one of the names recognized by the QColor constructor.
+ \row
+ \o \bold -btn <color> \o
+ Sets the default button color. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 6
+ The color-name must be one of the names recognized by the QColor constructor.
+ \row
+ \o \bold -fg <color> \o
+ Sets the default application foreground color. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 7
+ The color-name must be one of the names recognized by the QColor constructor.
+ \row
+ \o \bold -name <objectname> \o
+ Sets the application name, i.e. the application object's object name. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 8
+ \row
+ \o \bold -title <title> \o
+ Sets the application's title. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 9
+ \row
+ \o \bold -geometry <width>x<height>+<Xoffset>+<Yoffset> \o
+ Sets the client geometry of the first window that is shown. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 10
+ \row
+ \o \bold -keyboard \o
+ Enables the keyboard.
+
+ See also: \l {Qt for Embedded Linux Character Input}.
+ \row
+ \o \bold -nokeyboard \o
+ Disables the keyboard.
+ \row
+ \o \bold -mouse \o
+ Enables the mouse cursor.
+
+ See also: \l {Qt for Embedded Linux Pointer Handling}.
+ \row
+ \o \bold -nomouse \o
+ Disables the mouse cursor.
+ \row
+ \o \bold -qws \o
+ Runs the application as a server application, i.e. constructs a
+ QApplication object of the QApplication::GuiServer type.
+ \row
+ \o \bold -display \o
+ Specifies the screen driver.
+
+ See also: \l {Qt for Embedded Linux Display Management}.
+ \row
+ \o \bold -decoration <style>\o
+ Sets the application decoration. For example:
+ \snippet doc/src/snippets/code/doc_src_emb-running.qdoc 11
+ The supported styles are \c windows, \c default and \c styled.
+
+ See also QDecoration.
+
+ \endtable
+*/
diff --git a/doc/src/emb-vnc.qdoc b/doc/src/emb-vnc.qdoc
new file mode 100644
index 0000000..283193c
--- /dev/null
+++ b/doc/src/emb-vnc.qdoc
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-vnc.html
+ \brief A guide to using Qt for Embedded Linux applications as VNC servers
+ and clients.
+
+ \title The VNC Protocol and Qt for Embedded Linux
+ \ingroup qt-embedded-linux
+
+ VNC (Virtual Network Computing) software makes it possible to view
+ and interact with one computer (the "server") from any other
+ computer or mobile device (the "viewer") anywhere on a network.
+
+ \image qt-embedded-vnc-screen.png
+
+ VNC clients are available for a vast array of display systems, including
+ X11, Mac OS X and Windows.
+
+ \section1 Configuring Qt with VNC Capabilities
+
+ To run a \l{Qt for Embedded Linux} application using the VNC protocol, the
+ \l{Qt for Embedded Linux} library must be configured and compiled with the
+ \c -qt-gfx-vnc option:
+
+ \snippet doc/src/snippets/code/doc_src_emb-vnc.qdoc 0
+
+ \section1 Running a Server Application
+
+ Start a server application by specifying the \c -qws command
+ line option when running the application. (This can also be
+ specified in the application's source code.)
+ Use the \c -display command line option to specify the VNC server's
+ driver and the virtual screen to use. For example:
+
+ \snippet doc/src/snippets/code/doc_src_emb-vnc.qdoc 1
+
+ The application will act as a VNC server which can be accessed using
+ an ordinary VNC client, either on the development machine or from a
+ different machine on a network.
+
+ For example, using the X11 VNC client to view the application from the
+ same machine:
+
+ \snippet doc/src/snippets/code/doc_src_emb-vnc.qdoc 2
+
+ To interact with the application from another machine on the network,
+ run a VNC client pointing to the machine that is running the server
+ application.
+
+ \l{Qt for Embedded Linux} will create a 640 by 480 pixel display by
+ default. Alternatively, the \c QWS_SIZE environment variable can be
+ used to set another size; e.g., \c{QWS_SIZE=240x320}.
+
+ \section1 Running Client Applications
+
+ If you want to run more than one application on the same display, you
+ only need to start the first one as a server application, using the
+ \c -qws command line option to indicate that it will manage other
+ windows.
+
+ \snippet doc/src/snippets/code/doc_src_emb-vnc.qdoc Starting server
+
+ Subsequent client applications can be started \e without the \c -qws
+ option, but will each require the same \c -display option and argument
+ as those used for the server.
+
+ \snippet doc/src/snippets/code/doc_src_emb-vnc.qdoc Starting clients
+
+ However, for the clients, this option will not cause a new VNC server
+ to be started, but only indicates that their windows will appear on the
+ virtual screen managed by the server application.
+
+ \section1 Related Resources
+
+ It is not always necessary to specify the \c -qws command line option
+ when running a server application as long as the QApplication object
+ used by the application has been constructed with the
+ QApplication::GuiServer flag.
+
+ See the \l{Running Qt for Embedded Linux Applications}{running applications}
+ documentation for more details about server and client applications.
+
+ \table
+ \row
+ \o \bold {The Virtual Framebuffer}
+
+ The \l{The Virtual Framebuffer}{virtual framebuffer} is
+ an alternative technique recommended for development and debugging
+ purposes.
+
+ The virtual framebuffer emulates a framebuffer using a shared
+ memory region and the \c qvfb tool to display the framebuffer in a
+ window.
+
+ Its use of shared memory makes the virtual framebuffer much faster
+ and smoother than using the VNC protocol, but it does not operate
+ over a network.
+
+ \o \inlineimage qt-embedded-virtualframebuffer.png
+ \endtable
+*/
diff --git a/doc/src/eventsandfilters.qdoc b/doc/src/eventsandfilters.qdoc
new file mode 100644
index 0000000..06ca08c
--- /dev/null
+++ b/doc/src/eventsandfilters.qdoc
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page eventsandfilters.html
+ \title Events and Event Filters
+ \ingroup architecture
+ \brief A guide to event handling in Qt.
+
+ In Qt, events are objects, derived from the abstract QEvent class,
+ that represent things that have happened either within an application
+ or as a result of outside activity that the application needs to know
+ about. Events can be received and handled by any instance of a
+ QObject subclass, but they are especially relevant to widgets. This
+ document describes how events are delivered and handled in a typical
+ application.
+
+ \tableofcontents
+
+ \section1 How Events are Delivered
+
+ When an event occurs, Qt creates an event object to represent it by
+ constructing an instance of the appropriate QEvent subclass, and
+ delivers it to a particular instance of QObject (or one of its
+ subclasses) by calling its \l{QObject::}{event()} function.
+
+ This function does not handle the event itself; based on the type
+ of event delivered, it calls an event handler for that specific
+ type of event, and sends a response based on whether the event
+ was accepted or ignored.
+
+ \omit
+ Event delivery means that an
+ event has occurred, the QEvent indicates precisely what, and the
+ QObject needs to respond. Most events are specific to QWidget and its
+ subclasses, but there are important events that aren't related to
+ graphics (e.g., \l{QTimer}{timer events}).
+ \endomit
+
+ Some events, such as QMouseEvent and QKeyEvent, come from the
+ window system; some, such as QTimerEvent, come from other sources;
+ some come from the application itself.
+
+ \section1 Event Types
+
+ Most events types have special classes, notably QResizeEvent,
+ QPaintEvent, QMouseEvent, QKeyEvent, and QCloseEvent. Each class
+ subclasses QEvent and adds event-specific functions. For example,
+ QResizeEvent adds \l{QResizeEvent::}{size()} and
+ \l{QResizeEvent::}{oldSize()} to enable widgets to discover how
+ their dimensions have been changed.
+
+ Some classes support more than one actual event type. QMouseEvent
+ supports mouse button presses, double-clicks, moves, and other
+ related operations.
+
+ Each event has an associated type, defined in QEvent::Type, and this
+ can be used as a convenient source of run-time type information to
+ quickly determine which subclass a given event object was constructed
+ from.
+
+ Since programs need to react in varied and complex ways, Qt's
+ event delivery mechanisms are flexible. The documentation for
+ QCoreApplication::notify() concisely tells the whole story; the
+ \e{Qt Quarterly} article
+ \l{http://doc.trolltech.com/qq/qq11-events.html}{Another Look at Events}
+ rehashes it less concisely. Here we will explain enough for 95%
+ of applications.
+
+ \section1 Event Handlers
+
+ The normal way for an event to be delivered is by calling a virtual
+ function. For example, QPaintEvent is delivered by calling
+ QWidget::paintEvent(). This virtual function is responsible for
+ reacting appropriately, normally by repainting the widget. If you
+ do not perform all the necessary work in your implementation of the
+ virtual function, you may need to call the base class's implementation.
+
+ For example, the following code handles left mouse button clicks on
+ a custom checkbox widget while passing all other button clicks to the
+ base QCheckBox class:
+
+ \snippet doc/src/snippets/events/events.cpp 0
+
+ If you want to replace the base class's function, you must
+ implement everything yourself. However, if you only want to extend
+ the base class's functionality, then you implement what you want and
+ call the base class to obtain the default behavior for any cases you
+ do not want to handle.
+
+ Occasionally, there isn't such an event-specific function, or the
+ event-specific function isn't sufficient. The most common example
+ involves \key Tab key presses. Normally, QWidget intercepts these to
+ move the keyboard focus, but a few widgets need the \key{Tab} key for
+ themselves.
+
+ These objects can reimplement QObject::event(), the general event
+ handler, and either do their event handling before or after the usual
+ handling, or they can replace the function completely. A very unusual
+ widget that both interprets \key Tab and has an application-specific
+ custom event might contain the following \l{QObject::event()}{event()}
+ function:
+
+ \snippet doc/src/snippets/events/events.cpp 1
+
+ Note that QWidget::event() is still called for all of the cases not
+ handled, and that the return value indicates whether an event was
+ dealt with; a \c true value prevents the event from being sent on
+ to other objects.
+
+ \section1 Event Filters
+
+ Sometimes an object needs to look at, and possibly intercept, the
+ events that are delivered to another object. For example, dialogs
+ commonly want to filter key presses for some widgets; for example,
+ to modify \key{Return}-key handling.
+
+ The QObject::installEventFilter() function enables this by setting
+ up an \e{event filter}, causing a nominated filter object to receive
+ the events for a target object in its QObject::eventFilter()
+ function. An event filter gets to process events before the target
+ object does, allowing it to inspect and discard the events as
+ required. An existing event filter can be removed using the
+ QObject::removeEventFilter() function.
+
+ When the filter object's \l{QObject::}{eventFilter()} implementation
+ is called, it can accept or reject the event, and allow or deny
+ further processing of the event. If all the event filters allow
+ further processing of an event (by each returning \c false), the event
+ is sent to the target object itself. If one of them stops processing
+ (by returning \c true), the target and any later event filters do not
+ get to see the event at all.
+
+ \snippet doc/src/snippets/eventfilters/filterobject.cpp 0
+
+ The above code shows another way to intercept \key{Tab} key press
+ events sent to a particular target widget. In this case, the filter
+ handles the relevant events and returns \c true to stop them from
+ being processed any further. All other events are ignored, and the
+ filter returns \c false to allow them to be sent on to the target
+ widget, via any other event filters that are installed on it.
+
+ It is also possible to filter \e all events for the entire application,
+ by installing an event filter on the QApplication or QCoreApplication
+ object. Such global event filters are called before the object-specific
+ filters. This is very powerful, but it also slows down event delivery
+ of every single event in the entire application; the other techniques
+ discussed should generally be used instead.
+
+ \section1 Sending Events
+
+ Many applications want to create and send their own events. You can
+ send events in exactly the same ways as Qt's own event loop by
+ constructing suitable event objects and sending them with
+ QCoreApplication::sendEvent() and QCoreApplication::postEvent().
+
+ \l{QCoreApplication::}{sendEvent()} processes the event immediately.
+ When it returns, the event filters and/or the object itself have
+ already processed the event. For many event classes there is a function
+ called isAccepted() that tells you whether the event was accepted
+ or rejected by the last handler that was called.
+
+ \l{QCoreApplication::}{postEvent()} posts the event on a queue for
+ later dispatch. The next time Qt's main event loop runs, it dispatches
+ all posted events, with some optimization. For example, if there are
+ several resize events, they are are compressed into one. The same
+ applies to paint events: QWidget::update() calls
+ \l{QCoreApplication::}{postEvent()}, which eliminates flickering and
+ increases speed by avoiding multiple repaints.
+
+ \l{QCoreApplication::}{postEvent()} is also used during object
+ initialization, since the posted event will typically be dispatched
+ very soon after the initialization of the object is complete.
+ When implementing a widget, it is important to realise that events
+ can be delivered very early in its lifetime so, in its constructor,
+ be sure to initialize member variables early on, before there's any
+ chance that it might receive an event.
+
+ To create events of a custom type, you need to define an event
+ number, which must be greater than QEvent::User, and you may need to
+ subclass QEvent in order to pass specific information about your
+ custom event. See the QEvent documentation for further details.
+*/
diff --git a/doc/src/examples-overview.qdoc b/doc/src/examples-overview.qdoc
new file mode 100644
index 0000000..549574d
--- /dev/null
+++ b/doc/src/examples-overview.qdoc
@@ -0,0 +1,348 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page examples-overview.html
+ \title An Overview of Qt's Examples
+ \brief A short guide to the different categories of examples included with Qt.
+ \ingroup howto
+
+ Qt is supplied with a variety of examples that cover almost every aspect
+ of development. These examples are ordered by functional area, but many
+ examples often use features from many parts of Qt to highlight one area
+ in particular.
+
+ This document provides a brief overview of each example category and
+ provides links to the more formal \l{Qt Examples}{list of examples}.
+
+ \section1 \l{Qt Examples#Widgets}{Widgets}
+
+ \l{Qt Examples#Widgets}{\inlineimage widget-examples.png
+ }
+
+ Qt comes with a large range of standard widgets that users of modern
+ applications have come to expect.
+
+ You can also develop your own custom widgets and controls, and use them
+ alongside standard widgets.
+
+ It is even possible to provide custom styles and themes for widgets that can
+ be used to change the appearance of standard widgets and appropriately
+ written custom widgets.
+
+ \section1 \l{Qt Examples#Dialogs}{Dialogs}
+
+ \l{Qt Examples#Dialogs}{\inlineimage dialog-examples.png
+ }
+
+ Qt includes standard dialogs for many common operations, such as file
+ selection, printing, and color selection.
+
+ Custom dialogs can also be created for specialized modal or modeless
+ interactions with users.
+
+ \section1 \l{Qt Examples#Main Windows}{Main Windows}
+
+ \l{Qt Examples#Main Windows}{\inlineimage mainwindow-examples.png
+ }
+
+ All the standard features of application main windows are provided by Qt.
+
+ Main windows can have pull down menus, tool bars, and dock windows. These
+ separate forms of user input are unified in an integrated action system that
+ also supports keyboard shortcuts and accelerator keys in menu items.
+
+ \section1 \l{Qt Examples#Layouts}{Layouts}
+
+ \l{Qt Examples#Layouts}{\inlineimage layout-examples.png
+ }
+
+ Qt uses a layout-based approach to widget management. Widgets are arranged in
+ the optimal positions in windows based on simple layout rules, leading to a
+ consistent look and feel.
+
+ Custom layouts can be used to provide more control over the positions and
+ sizes of child widgets.
+
+ \section1 \l{Qt Examples#Painting}{Painting}
+
+ \l{Qt Examples#Painting}{\inlineimage painting-examples.png
+ }
+
+ Qt's painting system is able to render vector graphics, images, and outline
+ font-based text with sub-pixel accuracy accuracy using anti-aliasing to
+ improve rendering quality.
+
+ These examples show the most common techniques that are used when painting
+ with Qt, from basic concepts such as drawing simple primitives to the use of
+ transformations.
+
+ \section1 \l{Qt Examples#Item Views}{Item Views}
+
+ \l{Qt Examples#Item Views}{\inlineimage itemview-examples.png
+ }
+
+ Item views are widgets that typically display data sets. Qt 4's model/view
+ framework lets you handle large data sets by separating the underlying data
+ from the way it is represented to the user, and provides support for
+ customized rendering through the use of delegates.
+
+ \section1 \l{Qt Examples#Graphics View}{Graphics View}
+
+ \l{Qt Examples#Graphics View}{\inlineimage graphicsview-examples.png
+ }
+
+ Qt is provided with a comprehensive canvas through the GraphicsView
+ classes.
+
+ These examples demonstrate the fundamental aspects of canvas programming
+ with Qt.
+
+ \section1 \l{Qt Examples#Rich Text}{Rich Text}
+
+ \l{Qt Examples#Rich Text}{\inlineimage richtext-examples.png
+ }
+
+ Qt provides powerful document-oriented rich text engine that supports Unicode
+ and right-to-left scripts. Documents can be manipulated using a cursor-based
+ API, and their contents can be imported and exported as both HTML and in a
+ custom XML format.
+
+ \section1 \l{Qt Examples#Tools}{Tools}
+
+ \l{Qt Examples#Tools}{\inlineimage tool-examples.png
+ }
+
+ Qt is equipped with a range of capable tool classes, from containers and
+ iterators to classes for string handling and manipulation.
+
+ Other classes provide application infrastructure support, handling plugin
+ loading and managing configuration files.
+
+ \section1 \l{Qt Examples#Desktop}{Desktop}
+
+ \l{Qt Examples#Desktop}{\inlineimage desktop-examples.png
+ }
+
+ Qt provides features to enable applications to integrate with the user's
+ preferred desktop environment.
+
+ Features such as system tray icons, access to the desktop widget, and
+ support for desktop services can be used to improve the appearance of
+ applications and take advantage of underlying desktop facilities.
+
+ \section1 \l{Qt Examples#Drag and Drop}{Drag and Drop}
+
+ \l{Qt Examples#Drag and Drop}{\inlineimage draganddrop-examples.png
+ }
+
+ Qt supports native drag and drop on all platforms via an extensible
+ MIME-based system that enables applications to send data to each other in the
+ most appropriate formats.
+
+ Drag and drop can also be implemented for internal use by applications.
+
+ \section1 \l{Qt Examples#Threads}{Threads}
+
+ \l{Qt Examples#Threads}{\inlineimage thread-examples.png
+ }
+
+ Qt 4 makes it easier than ever to write multithreaded applications. More
+ classes have been made usable from non-GUI threads, and the signals and slots
+ mechanism can now be used to communicate between threads.
+
+ Additionally, it is now possible to move objects between threads.
+
+ \section1 \l{Qt Examples#Concurrent Programming}{Concurrent Programming}
+
+ The QtConcurrent namespace includes a collection of classes and functions
+ for straightforward concurrent programming.
+
+ These examples show how to apply the basic techniques of concurrent
+ programming to simple problems.
+
+ \section1 \l{Qt Examples#Network}{Network}
+
+ \l{Qt Examples#Network}{\inlineimage network-examples.png
+ }
+
+ Qt is provided with an extensive set of network classes to support both
+ client-based and server side network programming.
+
+ These examples demonstrate the fundamental aspects of network programming
+ with Qt.
+
+ \section1 \l{Qt Examples#XML}{XML}
+
+ \l{Qt Examples#XML}{\inlineimage xml-examples.png
+ }
+
+ XML parsing and handling is supported through SAX and DOM compliant APIs.
+
+ Qt's SAX compliant classes allow you to parse XML incrementally; the DOM
+ classes enable more complex document-level operations to be performed on
+ XML files.
+
+ \section1 \l{Qt Examples#XQuery, XPath}{XQuery, XPath}
+
+ Qt provides an XQuery/XPath engine, QtXmlPatterns, for querying XML
+ files and custom data models, similar to the model/view framework.
+
+ \section1 \l{Qt Examples#OpenGL}{OpenGL}
+
+ \l{Qt Examples#OpenGL}{\inlineimage opengl-examples.png
+ }
+
+ Qt provides support for integration with OpenGL implementations on all
+ platforms, giving developers the opportunity to display hardware accelerated
+ 3D graphics alongside a more conventional user interface.
+
+ These examples demonstrate the basic techniques used to take advantage of
+ OpenGL in Qt applications.
+
+ \section1 \l{Qt Examples#SQL}{SQL}
+
+ \l{Qt Examples#SQL}{\inlineimage sql-examples.png
+ }
+
+ Qt provides extensive database interoperability, with support for products
+ from both open source and proprietary vendors.
+
+ SQL support is integrated with Qt's model/view architecture, making it easier
+ to provide GUI integration for your database applications.
+
+ \section1 \l{Qt Examples#Help System}{Help System}
+
+ \l{Qt Examples#Help System}{\inlineimage assistant-examples.png
+ }
+
+ Support for interactive help is provided by the Qt Assistant application.
+ Developers can take advantages of the facilities it offers to display
+ specially-prepared documentation to users of their applications.
+
+ \section1 \l{Qt Examples#Qt Designer}{Qt Designer}
+
+ \l{Qt Examples#Qt Designer}{\inlineimage designer-examples.png
+ }
+
+ Qt Designer is a capable graphical user interface designer that lets you
+ create and configure forms without writing code. GUIs created with
+ Qt Designer can be compiled into an application or created at run-time.
+
+ \section1 \l{Qt Examples#UiTools}{UiTools}
+
+ \l{Qt Examples#UiTools}{\inlineimage uitools-examples.png
+ }
+
+ Qt is equipped with a range of capable tool classes, from containers and
+ iterators to classes for string handling and manipulation.
+
+ Other classes provide application infrastructure support, handling plugin
+ loading and managing configuration files.
+
+ \section1 \l{Qt Examples#Qt Linguist}{Qt Linguist}
+
+ \l{Qt Examples#Qt Linguist}{\inlineimage linguist-examples.png
+ }
+
+ Internationalization is a core feature of Qt. These examples show how to
+ access translation and localization facilities at run-time.
+
+ \section1 \l{Qt Examples#Qt Script}{Qt Script}
+
+ \l{Qt Examples#Qt Script}{\inlineimage qtscript-examples.png
+ }
+
+ Qt is provided with a powerful embedded scripting environment through the QtScript
+ classes.
+
+ These examples demonstrate the fundamental aspects of scripting applications
+ with Qt.
+
+ \section1 \l{Qt Examples#Phonon Multimedia Framework}{Phonon Multimedia Framework}
+
+ \l{Qt Examples#Phonon Multimedia Framework}{\inlineimage phonon-examples.png
+ }
+
+ The Phonon Multimedia Framework brings multimedia support to Qt applications.
+
+ The examples and demonstrations provided show how to play music and movies
+ using the Phonon API.
+
+ \section1 \l{Qt Examples#WebKit}{WebKit}
+
+ \l{Qt Examples#WebKit}{\inlineimage webkit-examples.png
+ }
+
+ Qt provides an integrated Web browser component based on WebKit, the popular
+ open source browser engine.
+
+ These examples and demonstrations show a range of different uses for WebKit,
+ from displaying Web pages within a Qt user interface to an implementation of
+ a basic function Web browser.
+
+ \section1 \l{Qt Examples#Qt for Embedded Linux}{Qt for Embedded Linux}
+
+ \l{Qt Examples#Qt for Embedded Linux}{\inlineimage qt-embedded-examples.png
+ }
+
+ These examples show how to take advantage of features specifically designed
+ for use on systems with limited resources, specialized hardware, and small
+ screens.
+
+ \section1 \l{Qt Examples#ActiveQt}{ActiveQt}
+
+ Qt is supplied with a number of example applications and demonstrations that
+ have been written to provide developers with examples of the Qt API in use,
+ highlight good programming practice, and showcase features found in each of
+ Qt's core technologies.
+
+ The example and demo launcher can be used to explore the different categories
+ available. It provides an overview of each example, lets you view the
+ documentation in Qt Assistant, and is able to launch examples and demos.
+
+ \section1 \l{http://doc.trolltech.com/qq}{Another Source of Examples}
+
+ One more valuable source for examples and explanations of Qt
+ features is the archive of the \l {http://doc.trolltech.com/qq}
+ {Qt Quarterly}.
+
+*/
diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc
new file mode 100644
index 0000000..c9cb049
--- /dev/null
+++ b/doc/src/examples.qdoc
@@ -0,0 +1,402 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page examples.html
+ \title Qt Examples
+ \brief Information about the example programs provided with Qt.
+ \ingroup howto
+
+ This is the list of examples in Qt's \c examples directory. The
+ examples demonstrate Qt features in small, self-contained
+ programs. They are not all designed to be impressive when you run
+ them, but their source code is carefully written to show good Qt
+ programming practices. You can launch any of these programs from the
+ \l{Examples and Demos Launcher} application.
+
+ If you are new to Qt, you should probably start by going through
+ the \l{Tutorials} before you have a look at the
+ \l{mainwindows/application}{Application} example.
+
+ In addition to the examples and the tutorial, Qt includes a
+ \l{Qt Demonstrations}{selection of demos} that deliberately show off
+ Qt's features. You might want to look at these as well.
+
+ One more valuable source for examples and explanations of Qt
+ features is the archive of the \l {Qt Quarterly}.
+
+ In the list below, examples marked with an asterisk (*) are fully
+ documented. Eventually, all the examples will be fully documented,
+ but sometimes we include an example before we have time to write
+ about it, because someone might need it right now.
+
+ Categories:
+
+ \tableofcontents
+
+ \section1 ActiveQt
+
+ \list
+ \o \l{activeqt/comapp}{COM App}\raisedaster
+ \o \l{Dot Net Example (ActiveQt)}{Dot Net}\raisedaster
+ \o \l{activeqt/hierarchy}{Hierarchy}\raisedaster
+ \o \l{activeqt/menus}{Menus}\raisedaster
+ \o \l{activeqt/multiple}{Multiple}\raisedaster
+ \o \l{activeqt/opengl}{OpenGL}\raisedaster
+ \o \l{activeqt/qutlook}{Qutlook}\raisedaster
+ \o \l{activeqt/simple}{Simple}\raisedaster
+ \o \l{activeqt/webbrowser}{Web Browser}\raisedaster
+ \o \l{activeqt/wrapper}{Wrapper}\raisedaster
+ \endlist
+
+ \section1 Concurrent Programming
+
+ \list
+ \o \l{qtconcurrent/imagescaling}{QtConcurrent Asynchronous Image Scaling}
+ \o \l{qtconcurrent/map}{QtConcurrent Map}
+ \o \l{qtconcurrent/progressdialog}{QtConcurrent Progress Dialog}
+ \o \l{qtconcurrent/runfunction}{QtConcurrent Run Function}
+ \o \l{qtconcurrent/wordcount}{QtConcurrent Word Count}
+ \endlist
+
+ \section1 D-Bus
+ \list
+ \o \l{dbus/dbus-chat}{Chat}
+ \o \l{dbus/complexpingpong}{Complex Ping Pong}
+ \o \l{dbus/listnames}{List Names}
+ \o \l{dbus/pingpong}{Ping Pong}
+ \o \l{dbus/remotecontrolledcar}{Remote Controlled Car}
+ \endlist
+
+ \section1 Desktop
+
+ \list
+ \o \l{desktop/screenshot}{Screenshot}\raisedaster
+ \o \l{desktop/systray}{System Tray}\raisedaster
+ \endlist
+
+ \section1 Dialogs
+
+ \list
+ \o \l{dialogs/classwizard}{Class Wizard}\raisedaster
+ \o \l{dialogs/configdialog}{Config Dialog}
+ \o \l{dialogs/extension}{Extension}\raisedaster
+ \o \l{dialogs/findfiles}{Find Files}\raisedaster
+ \o \l{dialogs/licensewizard}{License Wizard}\raisedaster
+ \o \l{dialogs/standarddialogs}{Standard Dialogs}
+ \o \l{dialogs/tabdialog}{Tab Dialog}\raisedaster
+ \o \l{dialogs/trivialwizard}{Trivial Wizard}
+ \endlist
+
+ \section1 Drag and Drop
+
+ \list
+ \o \l{draganddrop/delayedencoding}{Delayed Encoding}\raisedaster
+ \o \l{draganddrop/draggableicons}{Draggable Icons}
+ \o \l{draganddrop/draggabletext}{Draggable Text}
+ \o \l{draganddrop/dropsite}{Drop Site}
+ \o \l{draganddrop/fridgemagnets}{Fridge Magnets}\raisedaster
+ \o \l{draganddrop/puzzle}{Drag and Drop Puzzle}
+ \endlist
+
+ \section1 Graphics View
+
+ \list
+ \o \l{graphicsview/collidingmice}{Colliding Mice}\raisedaster
+ \o \l{graphicsview/diagramscene}{Diagram Scene}\raisedaster
+ \o \l{graphicsview/dragdroprobot}{Drag and Drop Robot}
+ \o \l{graphicsview/elasticnodes}{Elastic Nodes}
+ \o \l{graphicsview/portedasteroids}{Ported Asteroids}
+ \o \l{graphicsview/portedcanvas}{Ported Canvas}
+ \endlist
+
+ \section1 Help System
+
+ \list
+ \o \l{help/simpletextviewer}{Simple Text Viewer}\raisedaster
+ \endlist
+
+ \section1 Item Views
+
+ \list
+ \o \l{itemviews/addressbook}{Address Book}\raisedaster
+ \o \l{itemviews/basicsortfiltermodel}{Basic Sort/Filter Model}
+ \o \l{itemviews/chart}{Chart}
+ \o \l{itemviews/coloreditorfactory}{Color Editor Factory}\raisedaster
+ \o \l{itemviews/combowidgetmapper}{Combo Widget Mapper}\raisedaster
+ \o \l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model}\raisedaster
+ \o \l{itemviews/dirview}{Dir View}
+ \o \l{itemviews/editabletreemodel}{Editable Tree Model}\raisedaster
+ \o \l{itemviews/fetchmore}{Fetch More}\raisedaster
+ \o \l{itemviews/pixelator}{Pixelator}\raisedaster
+ \o \l{itemviews/puzzle}{Puzzle}
+ \o \l{itemviews/simpledommodel}{Simple DOM Model}\raisedaster
+ \o \l{itemviews/simpletreemodel}{Simple Tree Model}\raisedaster
+ \o \l{itemviews/simplewidgetmapper}{Simple Widget Mapper}\raisedaster
+ \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}\raisedaster
+ \o \l{itemviews/stardelegate}{Star Delegate}\raisedaster
+ \endlist
+
+ \section1 Layouts
+
+ \list
+ \o \l{layouts/basiclayouts}{Basic Layouts}\raisedaster
+ \o \l{layouts/borderlayout}{Border Layout}
+ \o \l{layouts/dynamiclayouts}{Dynamic Layouts}
+ \o \l{layouts/flowlayout}{Flow Layout}
+ \endlist
+
+ \section1 Main Windows
+
+ \list
+ \o \l{mainwindows/application}{Application}\raisedaster
+ \o \l{mainwindows/dockwidgets}{Dock Widgets}\raisedaster
+ \o \l{mainwindows/mdi}{MDI}
+ \o \l{mainwindows/menus}{Menus}\raisedaster
+ \o \l{mainwindows/recentfiles}{Recent Files}
+ \o \l{mainwindows/sdi}{SDI}
+ \endlist
+
+ \section1 Network
+
+ \list
+ \o \l{network/blockingfortuneclient}{Blocking Fortune Client}\raisedaster
+ \o \l{network/broadcastreceiver}{Broadcast Receiver}
+ \o \l{network/broadcastsender}{Broadcast Sender}
+ \o \l{network/network-chat}{Network Chat}
+ \o \l{network/fortuneclient}{Fortune Client}\raisedaster
+ \o \l{network/fortuneserver}{Fortune Server}\raisedaster
+ \o \l{network/ftp}{FTP}\raisedaster
+ \o \l{network/http}{HTTP}
+ \o \l{network/loopback}{Loopback}
+ \o \l{network/threadedfortuneserver}{Threaded Fortune Server}\raisedaster
+ \o \l{network/torrent}{Torrent}
+ \endlist
+
+ \section1 OpenGL
+
+ \list
+ \o \l{opengl/2dpainting}{2D Painting}\raisedaster
+ \o \l{opengl/framebufferobject}{Framebuffer Object}
+ \o \l{opengl/framebufferobject2}{Framebuffer Object 2}
+ \o \l{opengl/grabber}{Grabber}
+ \o \l{opengl/hellogl}{Hello GL}\raisedaster
+ \o \l{opengl/overpainting}{Overpainting}\raisedaster
+ \o \l{opengl/pbuffers}{Pixel Buffers}
+ \o \l{opengl/pbuffers2}{Pixel Buffers 2}
+ \o \l{opengl/samplebuffers}{Sample Buffers}
+ \o \l{opengl/textures}{Textures}
+ \endlist
+
+ \section1 Painting
+
+ \list
+ \o \l{painting/basicdrawing}{Basic Drawing}\raisedaster
+ \o \l{painting/concentriccircles}{Concentric Circles}\raisedaster
+ \o \l{painting/fontsampler}{Font Sampler}
+ \o \l{painting/imagecomposition}{Image Composition}\raisedaster
+ \o \l{painting/painterpaths}{Painter Paths}\raisedaster
+ \o \l{painting/svgviewer}{SVG Viewer}
+ \o \l{painting/transformations}{Transformations}\raisedaster
+ \endlist
+
+ \section1 Phonon Multimedia Framework
+
+ \list
+ \o \l{phonon/capabilities}{Capabilities}\raisedaster
+ \o \l{phonon/musicplayer}{Music Player}\raisedaster
+ \endlist
+
+ \section1 Qt Designer
+
+ \list
+ \o \l{designer/calculatorbuilder}{Calculator Builder}\raisedaster
+ \o \l{designer/calculatorform}{Calculator Form}\raisedaster
+ \o \l{designer/customwidgetplugin}{Custom Widget Plugin}\raisedaster
+ \o \l{designer/taskmenuextension}{Task Menu Extension}\raisedaster
+ \o \l{designer/containerextension}{Container Extension}\raisedaster
+ \o \l{designer/worldtimeclockbuilder}{World Time Clock Builder}\raisedaster
+ \o \l{designer/worldtimeclockplugin}{World Time Clock Plugin}\raisedaster
+ \endlist
+
+ \section1 Qt Linguist
+
+ \list
+ \o \l{linguist/hellotr}{Hello tr()}\raisedaster
+ \o \l{linguist/arrowpad}{Arrow Pad}\raisedaster
+ \o \l{linguist/trollprint}{Troll Print}\raisedaster
+ \endlist
+
+ \section1 Qt for Embedded Linux
+
+ \list
+ \o \l{qws/svgalib}{Accelerated Graphics Driver}\raisedaster
+ \o \l{qws/dbscreen}{Double Buffered Graphics Driver}\raisedaster
+ \o \l{qws/mousecalibration}{Mouse Calibration}\raisedaster
+ \o \l{qws/ahigl}{OpenGL for Embedded Systems}\raisedaster
+ \o \l{qws/simpledecoration}{Simple Decoration}\raisedaster
+ \endlist
+
+ \section1 Qt Script
+
+ \list
+ \o \l{script/calculator}{Calculator}\raisedaster
+ \o \l{script/context2d}{Context2D}\raisedaster
+ \o \l{script/defaultprototypes}{Default Prototypes}\raisedaster
+ \o \l{script/helloscript}{Hello Script}\raisedaster
+ \o \l{script/qstetrix}{Qt Script Tetrix}\raisedaster
+ \o \l{script/customclass}{Custom Script Class}\raisedaster
+ \endlist
+
+ \section1 Rich Text
+
+ \list
+ \o \l{richtext/calendar}{Calendar}\raisedaster
+ \o \l{richtext/orderform}{Order Form}\raisedaster
+ \o \l{richtext/syntaxhighlighter}{Syntax Highlighter}\raisedaster
+ \o \l{richtext/textobject}{Text Object}\raisedaster
+ \endlist
+
+ \section1 SQL
+
+ \list
+ \o \l{sql/cachedtable}{Cached Table}\raisedaster
+ \o \l{sql/drilldown}{Drill Down}\raisedaster
+ \o \l{sql/querymodel}{Query Model}
+ \o \l{sql/relationaltablemodel}{Relational Table Model}
+ \o \l{sql/tablemodel}{Table Model}
+ \o \l{sql/sqlwidgetmapper}{SQL Widget Mapper}\raisedaster
+ \endlist
+
+ \section1 Threads
+
+ \list
+ \o \l{threads/mandelbrot}{Mandelbrot}\raisedaster
+ \o \l{threads/semaphores}{Semaphores}\raisedaster
+ \o \l{threads/waitconditions}{Wait Conditions}\raisedaster
+ \endlist
+
+ \section1 Tools
+
+ \list
+ \o \l{tools/codecs}{Codecs}
+ \o \l{tools/completer}{Completer}\raisedaster
+ \o \l{tools/customcompleter}{Custom Completer}\raisedaster
+ \o \l{tools/echoplugin}{Echo Plugin}\raisedaster
+ \o \l{tools/i18n}{I18N}
+ \o \l{tools/plugandpaint}{Plug & Paint}\raisedaster
+ \o Plug & Paint Plugins: \l{tools/plugandpaintplugins/basictools}{Basic Tools}\raisedaster
+ and \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}\raisedaster
+ \o \l{tools/regexp}{RegExp}
+ \o \l{tools/settingseditor}{Settings Editor}
+ \o \l{tools/styleplugin}{Style Plugin}\raisedaster
+ \o \l{tools/treemodelcompleter}{Tree Model Completer}\raisedaster
+ \o \l{tools/undoframework}{Undo Framework}\raisedaster
+ \endlist
+
+ \section1 UiTools
+
+ \list
+ \o \l{uitools/multipleinheritance}{Multiple Inheritance}\raisedaster
+ \o \l{uitools/textfinder}{Text Finder}\raisedaster
+ \endlist
+
+ \section1 WebKit
+
+ \list
+ \o \l{webkit/previewer}{Previewer}\raisedaster
+ \o \l{webkit/formextractor}{Form Extractor}
+ \endlist
+
+ \section1 Widgets
+
+ \list
+ \o \l{widgets/analogclock}{Analog Clock}\raisedaster
+ \o \l{widgets/calculator}{Calculator}\raisedaster
+ \o \l{widgets/calendarwidget}{Calendar Widget}\raisedaster
+ \o \l{widgets/charactermap}{Character Map}\raisedaster
+ \o \l{widgets/codeeditor}{Code Editor}\raisedaster
+ \o \l{widgets/digitalclock}{Digital Clock}\raisedaster
+ \o \l{widgets/groupbox}{Group Box}\raisedaster
+ \o \l{widgets/icons}{Icons}\raisedaster
+ \o \l{widgets/imageviewer}{Image Viewer}\raisedaster
+ \o \l{widgets/lineedits}{Line Edits}\raisedaster
+ \o \l{widgets/movie}{Movie}
+ \o \l{widgets/scribble}{Scribble}\raisedaster
+ \o \l{widgets/shapedclock}{Shaped Clock}\raisedaster
+ \o \l{widgets/sliders}{Sliders}\raisedaster
+ \o \l{widgets/spinboxes}{Spin Boxes}\raisedaster
+ \o \l{widgets/styles}{Styles}\raisedaster
+ \o \l{widgets/stylesheet}{Style Sheet}\raisedaster
+ \o \l{widgets/tablet}{Tablet}\raisedaster
+ \o \l{widgets/tetrix}{Tetrix}\raisedaster
+ \o \l{widgets/tooltips}{Tooltips}\raisedaster
+ \o \l{widgets/wiggly}{Wiggly}\raisedaster
+ \o \l{widgets/windowflags}{Window Flags}\raisedaster
+ \endlist
+
+ \section1 XML
+
+ \list
+ \o \l{xml/dombookmarks}{DOM Bookmarks}
+ \o \l{xml/saxbookmarks}{SAX Bookmarks}
+ \o \l{xml/streambookmarks}{QXmlStream Bookmarks}\raisedaster
+ \o \l{xml/rsslisting}{RSS-Listing}
+ \o \l{xml/xmlstreamlint}{XML Stream Lint Example}\raisedaster
+ \endlist
+
+ \section1 XQuery, XPath
+
+ \list
+ \o \l{xmlpatterns/recipes}{Recipes}
+ \o \l{xmlpatterns/filetree}{File System Example}
+ \o \l{xmlpatterns/qobjectxmlmodel}{QObject XML Model Example}
+ \o \l{xmlpatterns/xquery/globalVariables}{C++ Source Code Analyzer Example}
+ \o \l{xmlpatterns/trafficinfo}{Traffic Info}\raisedaster
+ \endlist
+
+ \section1 Inter-Process Communication
+ \list
+ \o \l{ipc/localfortuneclient}{Local Fortune Client}\raisedaster
+ \o \l{ipc/localfortuneserver}{Local Fortune Server}\raisedaster
+ \o \l{ipc/sharedmemory}{Shared Memory}\raisedaster
+ \endlist
+*/
diff --git a/doc/src/examples/2dpainting.qdoc b/doc/src/examples/2dpainting.qdoc
new file mode 100644
index 0000000..31aea59
--- /dev/null
+++ b/doc/src/examples/2dpainting.qdoc
@@ -0,0 +1,224 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/2dpainting
+ \title 2D Painting Example
+
+ The 2D Painting example shows how QPainter and QGLWidget can be used
+ together to display accelerated 2D graphics on supported hardware.
+
+ \image 2dpainting-example.png
+
+ The QPainter class is used to draw 2D graphics primitives onto
+ paint devices provided by QPaintDevice subclasses, such as QWidget
+ and QImage.
+
+ Since QGLWidget is a subclass of QWidget, it is possible
+ to reimplement its \l{QWidget::paintEvent()}{paintEvent()} and use
+ QPainter to draw on the device, just as you would with a QWidget.
+ The only difference is that the painting operations will be accelerated
+ in hardware if it is supported by your system's OpenGL drivers.
+
+ In this example, we perform the same painting operations on a
+ QWidget and a QGLWidget. The QWidget is shown with anti-aliasing
+ enabled, and the QGLWidget will also use anti-aliasing if the
+ required extensions are supported by your system's OpenGL driver.
+
+ \section1 Overview
+
+ To be able to compare the results of painting onto a QGLWidget subclass
+ with native drawing in a QWidget subclass, we want to show both kinds
+ of widget side by side. To do this, we derive subclasses of QWidget and
+ QGLWidget, using a separate \c Helper class to perform the same painting
+ operations for each, and lay them out in a top-level widget, itself
+ provided a the \c Window class.
+
+ \section1 Helper Class Definition
+
+ In this example, the painting operations are performed by a helper class.
+ We do this because we want the same painting operations to be performed
+ for both our QWidget subclass and the QGLWidget subclass.
+
+ The \c Helper class is minimal:
+
+ \snippet examples/opengl/2dpainting/helper.h 0
+
+ Apart from the constructor, it only provides a \c paint() function to paint
+ using a painter supplied by one of our widget subclasses.
+
+ \section1 Helper Class Implementation
+
+ The constructor of the class sets up the resources it needs to paint
+ content onto a widget:
+
+ \snippet examples/opengl/2dpainting/helper.cpp 0
+
+ The actual painting is performed in the \c paint() function. This takes
+ a QPainter that has already been set up to paint onto a paint device
+ (either a QWidget or a QGLWidget), a QPaintEvent that provides information
+ about the region to be painted, and a measure of the elapsed time (in
+ milliseconds) since the paint device was last updated.
+
+ \snippet examples/opengl/2dpainting/helper.cpp 1
+
+ We begin painting by filling in the region contained in the paint event
+ before translating the origin of the coordinate system so that the rest
+ of the painting operations will be displaced towards the center of the
+ paint device.
+
+ We draw a spiral pattern of circles, using the elapsed time specified to
+ animate them so that they appear to move outward and around the coordinate
+ system's origin:
+
+ \snippet examples/opengl/2dpainting/helper.cpp 2
+
+ Since the coordinate system is rotated many times during
+ this process, we \l{QPainter::save()}{save()} the QPainter's state
+ beforehand and \l{QPainter::restore()}{restore()} it afterwards.
+
+ \snippet examples/opengl/2dpainting/helper.cpp 3
+
+ We draw some text at the origin to complete the effect.
+
+ \section1 Widget Class Definition
+
+ The \c Widget class provides a basic custom widget that we use to
+ display the simple animation painted by the \c Helper class.
+
+ \snippet examples/opengl/2dpainting/widget.h 0
+
+ Apart from the constructor, it only contains a
+ \l{QWidget::paintEvent()}{paintEvent()} function, that lets us draw
+ customized content, and a slot that is used to animate its contents.
+ One member variable keeps track of the \c Helper that the widget uses
+ to paint its contents, and the other records the elapsed time since
+ it was last updated.
+
+ \section1 Widget Class Implementation
+
+ The constructor only initializes the member variables, storing the
+ \c Helper object supplied and calling the base class's constructor,
+ and enforces a fixed size for the widget:
+
+ \snippet examples/opengl/2dpainting/widget.cpp 0
+
+ The \c animate() slot is called whenever a timer, which we define later, times
+ out:
+
+ \snippet examples/opengl/2dpainting/widget.cpp 1
+
+ Here, we determine the interval that has elapsed since the timer last
+ timed out, and we add it to any existing value before repainting the
+ widget. Since the animation used in the \c Helper class loops every second,
+ we can use the modulo operator to ensure that the \c elapsed variable is
+ always less than 1000.
+
+ Since the \c Helper class does all of the actual painting, we only have
+ to implement a paint event that sets up a QPainter for the widget and calls
+ the helper's \c paint() function:
+
+ \snippet examples/opengl/2dpainting/widget.cpp 2
+
+ \section1 GLWidget Class Definition
+
+ The \c GLWidget class definition is basically the same as the \c Widget
+ class except that it is derived from QGLWidget.
+
+ \snippet examples/opengl/2dpainting/glwidget.h 0
+
+ Again, the member variables record the \c Helper used to paint the
+ widget and the elapsed time since the previous update.
+
+ \section1 GLWidget Class Implementation
+
+ The constructor differs a little from the \c Widget class's constructor:
+
+ \snippet examples/opengl/2dpainting/glwidget.cpp 0
+
+ As well as initializing the \c elapsed member variable and storing the
+ \c Helper object used to paint the widget, the base class's constructor
+ is called with the format that specifies the \l QGL::SampleBuffers flag.
+ This enables anti-aliasing if it is supported by your system's OpenGL
+ driver.
+
+ The \c animate() slot is exactly the same as that provided by the \c Widget
+ class:
+
+ \snippet examples/opengl/2dpainting/glwidget.cpp 1
+
+ The \c paintEvent() is almost the same as that found in the \c Widget class:
+
+ \snippet examples/opengl/2dpainting/glwidget.cpp 2
+
+ Since anti-aliasing will be enabled if available, we only need to set up
+ a QPainter on the widget and call the helper's \c paint() function to display
+ the widget's contents.
+
+ \section1 Window Class Definition
+
+ The \c Window class has a basic, minimal definition:
+
+ \snippet examples/opengl/2dpainting/window.h 0
+
+ It contains a single \c Helper object that will be shared between all
+ widgets.
+
+ \section1 Window Class Implementation
+
+ The constructor does all the work, creating a widget of each type and
+ inserting them with labels into a layout:
+
+ \snippet examples/opengl/2dpainting/window.cpp 0
+
+ A timer with a 50 millisecond time out is constructed for animation purposes,
+ and connected to the \c animate() slots of the \c Widget and \c GLWidget objects.
+ Once started, the widgets should be updated at around 20 frames per second.
+
+ \section1 Running the Example
+
+ The example shows the same painting operations performed at the same time
+ in a \c Widget and a \c GLWidget. The quality and speed of rendering in the
+ \c GLWidget depends on the level of support for multisampling and hardware
+ acceleration that your system's OpenGL driver provides. If support for either
+ of these is lacking, the driver may fall back on a software renderer that
+ may trade quality for speed.
+*/
diff --git a/doc/src/examples/activeqt/comapp.qdoc b/doc/src/examples/activeqt/comapp.qdoc
new file mode 100644
index 0000000..05f3fb5
--- /dev/null
+++ b/doc/src/examples/activeqt/comapp.qdoc
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example activeqt/comapp
+ \title COM App Example (ActiveQt)
+
+ The COM App example shows how to use ActiveQt to develop a Qt
+ application that can be automated via COM. Different QObject
+ based classes are exposed as COM objects that communicate with the
+ GUI of the running Qt application. The APIs of those COM objects
+ has been designed to resemble the APIs of standard COM
+ applications; i.e. those from Microsoft Office.
+
+ \snippet examples/activeqt/comapp/main.cpp 2
+ The first class \c Application represents the application object. It
+ exposes read-only properties \c documents and \c id to get access to the
+ list of documents, and an identifier. A read/write property \c visible
+ controls whether the QTabWidget-based user interface of the application
+ should be visible, and a slot \c quit() terminates the application.
+
+ The \e RegisterObject attribute is set to make sure that instances of this
+ class are registered in COM's running object table (ROT) - this allows COM
+ clients to connect to an already instantiated COM object.
+
+ \snippet examples/activeqt/comapp/main.cpp 1
+ The \c DocumentList class stores a list of documents. It provides an API
+ to read the number of documents, to access each document by index and to
+ create a new document. The \c application property returns the root object.
+
+ \snippet examples/activeqt/comapp/main.cpp 0
+
+ The \c Document class finally represents a document in the application.
+ Each document is represented by a page in the application's tab widget, and
+ has a title that is readable and writable through the document's API.
+ The \c application property again returns the root object.
+
+ \snippet examples/activeqt/comapp/main.cpp 3
+ The implementation of the \c Document class creates a new page for the tab
+ widget, and uses the title of that page for the title property. The page
+ is deleted when the document is deleted.
+
+ \snippet examples/activeqt/comapp/main.cpp 4
+ The \c DocumentList implementation is straightforward.
+
+ \snippet examples/activeqt/comapp/main.cpp 5
+ The \c Application class initializes the user interface in the constructor,
+ and shows and hides it in the implementation of \c setVisible(). The object
+ name (accessible through the \c id property) is set to \c "From QAxFactory"
+ to indicate that this COM object has been created by COM. Note that there is
+ no destructor that would delete the QTabWidget - this is instead done in the
+ \c quit() slot, before calling QApplication::quit() through a single-shot-timer,
+ which is necessary ensure that the COM call to the slot is complete.
+
+ \snippet examples/activeqt/comapp/main.cpp 6
+ The classes are exported from the server using the QAxFactory macros. Only
+ \c Application objects can be instantiated from outside - the other APIs can
+ only be used after accessing the respective objects throught the \c Application
+ API.
+
+ \snippet examples/activeqt/comapp/main.cpp 7
+ The main() entry point function creates a QApplication, and just enters the
+ event loop if the application has been started by COM. If the application
+ has been started by the user, then the \c Application object is created and
+ the object name is set to "From Application". Then the COM server is started,
+ and the application object is registered with COM. It is now accessible to
+ COM clients through the client-specific APIs.
+
+ Application exiting is controlled explicitly - if COM started the application,
+ then the client code has to call quit(); if the user started the application,
+ then the application terminates when the last window has been closed.
+
+ Finally, the user interface is made visible, and the event loop is started.
+
+ A simple Visual Basic application could now access this Qt application. In VB,
+ start a new "Standard Exe" project and add a project reference to the comappLib
+ type library. Create a form with a listbox "DocumentList", a static label
+ "DocumentsCount" and a command button "NewDocument". Finally, implement the code
+ for the form like this:
+
+ \snippet doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc 0
+
+ To build the example you must first build the QAxServer library.
+ Then run \c qmake and your make tool in
+ \c{examples\activeqt\comapp}.
+*/
diff --git a/doc/src/examples/activeqt/dotnet.qdoc b/doc/src/examples/activeqt/dotnet.qdoc
new file mode 100644
index 0000000..afe7034
--- /dev/null
+++ b/doc/src/examples/activeqt/dotnet.qdoc
@@ -0,0 +1,355 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page activeqt-dotnet.html
+ \title Dot Net Example (ActiveQt)
+
+ The Dot Net example demonstrates how Qt objects can be used in a
+ .NET environment, and how .NET objects can be used in a Qt
+ environment.
+
+ If you need to combine Qt and Win Forms widgets in the same
+ application, you might want to use the higher-level
+ \l{QtWinForms Solution} instead.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Qt vs. .NET
+
+ Qt is a C++ library and is compiled into traditional, native
+ binaries that make full use of the performance provided by the
+ runtime environment.
+
+ One of the key concepts of .NET is the idea of "intermediate language
+ code" - the source code is compiled into a bytecode format, and at
+ runtime, that bytecode is executed in a virtual machine - the \e
+ {Common Language Runtime} (CLR).
+
+ Another key concept is that of \e {managed code}. This is essentially
+ intermediate language code written in such a way that the CLR can take
+ care of the memory management, i.e. the CLR will do automatic garbage
+ collection, so the application code does not need to explicitly free
+ the memory for unused objects.
+
+ The MS compilers for C# and VB.NET will only produce managed
+ code. Such programs cannot directly call normal, native functions
+ or classes. \footnote The .NET framework provides Platform Invocation
+ Services - P/Invoke - that enable managed code to call native C (not
+ C++) functions located in DLLs directly. The resulting application
+ then becomes partially unmanaged.\endfootnote
+
+ The MS C++ compiler for .NET on the other hand, can produce both
+ normal and managed code. To write a C++ class that can be compiled
+ into managed code, the developer must flag the class as managed using
+ the \c __gc keyword, and restrict the code to only use the subset of
+ C++ known as "Managed Extensions for C++", or MC++ for short. The
+ advantage is that MC++ code can freely call and use normal C++
+ functions and classes. And it also works the other way around: normal
+ C++ code can call managed functions and use managed classes (e.g. the
+ entire .NET framework class library), including managed functions and
+ classes implemented in C# or VB.NET. This feature of mixing managed
+ and normal C++ code immensely eases the interoperability with .NET,
+ and is by Microsoft referred to as the "It Just Works" (IJW) feature.
+
+ This document demonstrates two different ways of integrating normal
+ C++ code (that uses Qt) with managed .NET code. First, the manual way
+ is presented, which includes using a thin MC++ wrapper class around
+ the normal Qt/C++ class. Then, the automated way is presented, which
+ utilizes the ActiveQt framework as a generic bridge. The advantage of
+ the first method is that it gives the application developer full
+ control, while the second method requires less coding and relieves the
+ developer of dealing with the conversion between managed and normal
+ data objects.
+
+ The impatient reader, who right away wants to see a QPushButton
+ and a custom Qt widget (\l{activeqt/multiple}{QAxWidget2}) run in
+ a .NET GUI application is referred to the example directory of
+ ActiveQt. It contains the result of this walkthrough using both
+ C# and VB.NET, created with Visual Studio .NET (not 2003).
+ Load \c {examples/dotnet/walkthrough/csharp.csproj},
+ \c {examples/dotnet/walkthrough/vb.vbproj}
+ or \c {examples/dotnet/wrapper/wrapper.sln} into the IDE and run
+ the solution.
+
+ \bold{Remark:} You will notice that in the generated code the following line is
+ commented out:
+
+ \snippet doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc 0
+
+ This line is regenerated without comment whenever you change the
+ dialog, in which case you have to comment it out again to be able
+ to run the project. This is a bug in the original version of
+ Visual Studio.NET, and is fixed in the 2003 edition.
+
+ \section1 Walkthrough: .NET interop with MC++ and IJW
+
+ Normal C++ classes and functions can be used from managed .NET code by
+ providing thin wrapper classes written in MC++. The wrapper class will
+ take care of forwarding the calls to the normal C++ functions or
+ methods, and converting parameter data as necessary. Since the wrapper
+ class is a managed class, it can be used without further ado in any
+ managed .NET application, whether written in C#, VB.NET, MC++ or other
+ managed programming language.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/worker.h 0
+
+ The Qt class has nothing unusual for Qt users, and as even the Qt
+ specialities like \c Q_PROPERTY, \c slots and \c signals are
+ implemented with straight C++ they don't cause any trouble when
+ compiling this class with any C++ compiler.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/networker.h 0
+
+ The .NET wrapper class uses keywords that are part of MC++ to indicate
+ that the class is managed/garbage collected (\c {__gc}), and that \c
+ StatusString should be accessible as a property in languages that
+ support this concept (\c {__property}). We also declare an event
+ function \c statusStringChanged(String*) (\c {__event}), the
+ equivalent of the respective signal in the Qt class.
+
+ Before we can start implementing the wrapper class we need a way to
+ convert Qt's datatypes (and potentionally your own) into .NET
+ datatypes, e.g. \c QString objects need to be converted into objects
+ of type \c {String*}.
+
+ When operating on managed objects in normal C++ code, a little extra
+ care must be taken because of the CLR's garbage collection. A normal
+ pointer variable should not \footnote Indeed, the compiler will in
+ many cases disallow it. \endfootnote be used to refer to a managed
+ object. The reason is that the garbage collection can kick in at any
+ time and move the object to another place on the heap, leaving you
+ with an invalid pointer.
+
+ However, two methods are provided that solves this problem easily. The
+ first is to use a \e pinned pointer, i.e. declare the pointer variable
+ with the \c __pin keyword. This guarantees that the object pointed to
+ will not be moved by the garbage collector. It is recommended that
+ this method not be used to keep a references to managed objects for a
+ long time, since it will decrease the efficiency of the garbage
+ collector. The second way is to use the \c gcroot smartpointer
+ template type. This lets you create safe pointers to managed
+ objects. E.g. a variable of type \c gcroot<String> will always point
+ to the String object, even if it has been moved by the garbage
+ collector, and it can be used just like a normal pointer.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/tools.cpp 0
+ \codeline
+ \snippet examples/activeqt/dotnet/wrapper/lib/tools.cpp 1
+
+ The convertor functions can then be used in the wrapper class
+ implementation to call the functions in the native C++ class.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 0
+ \codeline
+ \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 1
+
+ The constructor and destructor simply create and destroy the Qt
+ object wrapped using the C++ operators \c new and \c delete.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 2
+
+ The netWorker class delegates calls from the .NET code to the native
+ code. Although the transition between those two worlds implies a small
+ performance hit for each function call, and for the type conversion,
+ this should be negligible since we are anyway going to run within the
+ CLR.
+
+ \snippet examples/activeqt/dotnet/wrapper/lib/networker.cpp 3
+
+ The property setter calls the native Qt class before firing the
+ event using the \c __raise keyword.
+
+ This wrapper class can now be used in .NET code, e.g. using C++, C#,
+ Visual Basic or any other programming language available for .NET.
+
+ \snippet examples/activeqt/dotnet/wrapper/main.cs 0
+ \snippet examples/activeqt/dotnet/wrapper/main.cs 1
+ \snippet examples/activeqt/dotnet/wrapper/main.cs 2
+ \snippet examples/activeqt/dotnet/wrapper/main.cs 3
+
+ \section1 Walkthrough: .NET/COM Interop with ActiveQt
+
+ Fortunately .NET provides a generic wrapper for COM objects, the
+ \e {Runtime Callable Wrapper} (RCW). This RCW is a proxy for the
+ COM object and is generated by the CLR when a .NET Framework client
+ activates a COM object. This provides a generic way to reuse COM
+ objects in a .NET Framework project.
+
+ Making a QObject class into a COM object is easily achieved with
+ ActiveQt and demonstrated in the QAxServer examples (e.g., the
+ \l{activeqt/simple}{Simple} example). The walkthrough will use
+ the Qt classes implemented in those examples, so the first thing
+ to do is to make sure that those examples have been built
+ correctly, e.g. by opening the
+ \l{qaxserver-demo-multiple.html}{demonstration pages} in Internet
+ Explorer to verify that the controls are functional.
+
+ \section2 Starting a Project
+
+ Start Visual Studio.NET, and create a new C# project for writing a
+ Windows application. This will present you with an empty form in
+ Visual Studio's dialog editor. You should see the toolbox, which
+ presents you with a number of available controls and objects in
+ different categories. If you right-click on the toolbox it allows
+ you to add new tabs. We will add the tab "Qt".
+
+ \section2 Importing Qt Widgets
+
+ The category only has a pointer tool by default, and we have to add
+ the Qt objects we want to use in our form. Right-click on the empty
+ space, and select "Customize". This opens a dialog that has two
+ tabs, "COM Components" and ".NET Framework Components". We used
+ ActiveQt to wrap QWidgets into COM objects, so we select the "COM
+ Components" page, and look for the classes we want to use, e.g.
+ "QPushButton" and "QAxWidget2".
+
+ When we select those widgets and close the dialog the two widgets
+ will now be available from the toolbox as grey squares with their
+ name next to it \footnote Icons could be added by modifying the
+ way the controls register themselves. \endfootnote.
+
+ \section2 Using Qt Widgets
+
+ We can now add an instance of QAxWidget2 and a QPushButton to
+ the form. Visual Studio will automatically generate the RCW for the
+ object servers. The QAxWidget2 instance takes most of the upper
+ part of the form, with the QPushButton in the lower right corner.
+
+ In the property editor of Visual Studio we can modify the properties
+ of our controls - QPushButton exposes the \c QWidget API and has many
+ properties, while QAxWidget2 has only the Visual Studio standard
+ properties in addition to its own property "lineWidth" in the
+ "Miscellaneous" category. The objects are named "axQPushButton1" and
+ "axQAxWidget21", and since especially the last name is a bit
+ confusing we rename the objects to "resetButton" and "circleWidget".
+
+ We can also change the Qt properties, e.g. set the "text" property
+ of the \c resetButton to "Reset", and the "lineWidth" property of the
+ \c circleWidget to 5. We can also put those objects into the layout
+ system that Visual Studio's dialog editor provides, e.g. by setting
+ the anchors of the \c circleWidget to "Left, Top, Right, Bottom", and
+ the anchors of the \c resetButton to "Bottom, Right".
+
+ Now we can compile and start the project, which will open a user
+ interface with our two Qt widgets. If we can resize the dialog,
+ the widgets will resize appropriately.
+
+ \section2 Handling Qt Signals
+
+ We will now implement event handlers for the widgets. Select the
+ \c circleWidget and select the "Events" page in the property
+ editor. The widget exposes events because the QAxWidget2 class has
+ the "StockEvents" attribute set in its class definition. We implement
+ the event handler \c circleClicked for the \c ClickEvent to increase
+ the line width by one for every click:
+
+ \snippet examples/activeqt/dotnet/walkthrough/Form1.cs 0
+
+ In general we can implement a default event handler by double
+ clicking on the widget in the form, but the default events for
+ our widgets are right now not defined.
+
+ We will also implement an event handler for the \c clicked signal
+ emitted by QPushButton. Add the event handler \c resetLineWidth to
+ the \c clicked event, and implement the generated function:
+
+ \snippet examples/activeqt/dotnet/walkthrough/Form1.cs 1
+
+ We reset the property to 1, and also call the \c setFocus() slot
+ to simulate the user style on Windows, where a button grabs focus
+ when you click it (so that you can click it again with the spacebar).
+
+ If we now compile and run the project we can click on the circle
+ widget to increase its line width, and press the reset button to
+ set the line width back to 1.
+
+ \section1 Summary
+
+ Using ActiveQt as a universal interoperability bridge between the
+ .NET world and the native world of Qt is very easy, and makes it
+ often unnecessary to implement a lot of handwritten wrapper classes.
+ Instead, the QAxFactory implementation in the otherwise completely
+ cross-platform Qt project provides the glue that .NET needs to to
+ generate the RCW.
+
+ If this is not sufficient we can implement our own wrapper classes
+ thanks to the C++ extensions provided by Microsoft.
+
+ \section2 Limitations
+
+ All the limitations when using ActiveQt are implied when using this
+ technique to interoperate with .NET, e.g. the datatypes we can use
+ in the APIs can only be those supported by ActiveQt and COM. However,
+ since this includes subclasses of QObject and QWidget we can wrap
+ any of our datatypes into a QObject subclass to make its API
+ available to .NET. This has the positive side effect that the same
+ API is automatically available in
+ \l{http://qtsoftware.com/products/qsa/}{QSA}, the cross platform
+ scripting solution for Qt applications, and to COM clients in general.
+
+ When using the "IJW" method, in priciple the only limitation is the
+ time required to write the wrapper classes and data type conversion
+ functions.
+
+ \section2 Performance Considerations
+
+ Every call from CLR bytecode to native code implies a small
+ performance hit, and necessary type conversions introduce an
+ additional delay with every layer that exists between the two
+ frameworks. Consequently every approach to mix .NET and native
+ code should try to minimize the communication necessary between
+ the different worlds.
+
+ As ActiveQt introduces three layers at once - the RCW, COM and finally
+ ActiveQt itself - the performance penalty when using the generic
+ Qt/ActiveQt/COM/RCW/.NET bridge is larger than when using a
+ hand-crafted IJW-wrapper class. The execution speed however is still
+ sufficient for connecting to and modifying interactive elements in a
+ user interface, and as soon as the benefit of using Qt and C++ to
+ implement and compile performance critical algorithms into native code
+ kicks in, ActiveQt becomes a valid choice for making even non-visual
+ parts of your application accessible to .NET.
+
+ \sa {QtWinForms Solution}
+*/
diff --git a/doc/src/examples/activeqt/hierarchy-demo.qdocinc b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
new file mode 100644
index 0000000..9d0cb5e
--- /dev/null
+++ b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
@@ -0,0 +1,43 @@
+\raw HTML
+//! [0]
+<script language="javascript">
+function createSubWidget( form )
+{
+ ParentWidget.createSubWidget( form.nameEdit.value );
+}
+
+function renameSubWidget( form )
+{
+ var SubWidget = ParentWidget.subWidget( form.nameEdit.value );
+ if ( !SubWidget ) {
+ alert( "No such widget " + form.nameEdit.value + "!" );
+ return;
+ }
+ SubWidget.label = form.labelEdit.value;
+ form.nameEdit.value = SubWidget.label;
+}
+
+function setFont( form )
+{
+ ParentWidget.font = form.fontEdit.value;
+}
+</script>
+
+<p>
+This widget can have many children!
+</p>
+<object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c"
+CODEBASE="http://qtsoftware.com/demos/hierarchy.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+<input type="edit" ID="nameEdit" value="&lt;enter object name&gt;" />
+<input type="button" value="Create" onClick="createSubWidget(this.form)" />
+<input type="edit" ID="labelEdit" />
+<input type="button" value="Rename" onClick="renameSubWidget(this.form)" />
+<br />
+<input type="edit" ID="fontEdit" value="MS Sans Serif" />
+<input type="button" value = "Set Font" onClick="setFont(this.form)" />
+</form>
+//! [0]
+\endraw
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
new file mode 100644
index 0000000..868d0ce
--- /dev/null
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-hierarchy.html
+ \title Qt Widget Hierarchy
+
+ \input examples/activeqt/hierarchy-demo.qdocinc
+*/
+
+/*!
+ \example activeqt/hierarchy
+ \title Hierarchy Example (ActiveQt)
+
+ The Hierarchy example is shows how to write an in-process ActiveX
+ control. The control is a QWidget subclass with child widgets
+ that are accessible as sub-types.
+
+ \snippet examples/activeqt/hierarchy/objects.h 0
+ The \c QParentWidget class provides slots to create a widget
+ with a name, and to return a pointer to a named widget. The class
+ declaration uses \c Q_CLASSINFO() to provide the COM identifiers for
+ this class.
+
+ \snippet examples/activeqt/hierarchy/objects.cpp 0
+ The constructor of QParentWidget creates a vertical box layout.
+ New child widgets are automatically added to the layout.
+
+ \snippet examples/activeqt/hierarchy/objects.cpp 1
+ The \c createSubWidget slot creates a new \c QSubWidget with
+ the name provided in the parameter, and sets the label to that
+ name. The widget is also shown explicitly.
+
+ \snippet examples/activeqt/hierarchy/objects.cpp 2
+ The \c subWidget slot uses the \c QObject::child() function and
+ returns the first child of type \c QSubWidget that has the requested
+ name.
+
+ \snippet examples/activeqt/hierarchy/objects.h 1
+ The \c QSubWidget class has a single string-property \c label,
+ and implements the paintEvent to draw the label. The class uses
+ again \c Q_CLASSINFO to provide the COM identifiers, and also sets
+ the \e ToSuperClass attribute to \e QSubWidget, to ensure that only
+ no slots of any superclasses (i.e. QWidget) are exposed.
+
+ \snippet examples/activeqt/hierarchy/objects.cpp 3
+ \snippet examples/activeqt/hierarchy/objects.cpp 4
+ The implementation of the QSubWidget class is self-explanatory.
+
+ \snippet examples/activeqt/hierarchy/main.cpp 0
+ The classes are then exported using a QAxFactory. \c QParentWidget is
+ exported as a full class (which can be created ), while \c QSubWidget is
+ only exported as a type, which can only be created indirectly through
+ APIs of \c QParentWidget.
+
+ To build the example you must first build the QAxServer library.
+ Then run qmake and your make tool in \c examples/activeqt/hierarchy.
+
+ The \l{qaxserver-demo-hierarchy.html}{demonstration} requires
+ your WebBrowser to support ActiveX controls, and scripting to be
+ enabled.
+
+ \snippet examples/activeqt/hierarchy-demo.qdocinc 0
+*/
diff --git a/doc/src/examples/activeqt/menus.qdoc b/doc/src/examples/activeqt/menus.qdoc
new file mode 100644
index 0000000..6ce1625
--- /dev/null
+++ b/doc/src/examples/activeqt/menus.qdoc
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-menus.html
+ \preliminary
+
+ \title Menubar Merging
+
+ This example is not full functional at the moment.
+
+ \raw HTML
+ <object ID="QMenus" CLASSID="CLSID:4dc3f340-a6f7-44e4-a79b-3e9217695fbd"
+ CODEBASE="http://qtsoftware.com/demos/menusax.cab">
+ [Object not available! Did you forget to build and register the server?]
+ </object>
+ \endraw
+*/
+
+/*!
+ \example activeqt/menus
+ \title Menus Example (ActiveQt)
+
+ The Menus example demonstrates the use of QMenuBar and QStatusBar
+ in a QMainWindow to implement an in-place active control.
+
+ To build the example you must first build the QAxServer library.
+ Then run \c qmake and your make tool in \c
+ examples/activeqt/menus.
+
+ The \l{qaxserver-demo-menus.html}{demonstration} requires your
+ WebBrowser to support ActiveX controls, and scripting to be
+ enabled.
+
+ \snippet doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc 0
+*/
diff --git a/doc/src/examples/activeqt/multiple-demo.qdocinc b/doc/src/examples/activeqt/multiple-demo.qdocinc
new file mode 100644
index 0000000..ee174bf
--- /dev/null
+++ b/doc/src/examples/activeqt/multiple-demo.qdocinc
@@ -0,0 +1,39 @@
+\raw HTML
+//! [0]
+<script language="javascript">
+function setColor( form )
+{
+ Ax1.fillColor = form.colorEdit.value;
+}
+
+function setWidth( form )
+{
+ Ax2.lineWidth = form.widthEdit.value;
+}
+</script>
+
+<p />
+This is one QWidget subclass:<br />
+<object ID="Ax1" CLASSID="CLSID:1D9928BD-4453-4bdd-903D-E525ED17FDE5"
+CODEBASE="http://qtsoftware.com/demos/multipleax.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+Fill Color: <input type="edit" ID="colorEdit" value = "red" />
+<input type="button" value = "Set" onClick="setColor(this.form)" />
+<input type="button" value = "Hide" onClick="Ax1.hide()" />
+<input type="button" value = "Show" onClick="Ax1.show()" />
+</form>
+
+<p />
+This is another QWidget subclass:<br />
+<object ID="Ax2" CLASSID="CLSID:58139D56-6BE9-4b17-937D-1B1EDEDD5B71"
+CODEBASE="http://qtsoftware.com/demos/multipleax.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+Line width: <input type="edit" ID="widthEdit" value = "1" />
+<input type="button" value = "Set" onClick="setWidth(this.form)" />
+</form>
+//! [0]
+\endraw
diff --git a/doc/src/examples/activeqt/multiple.qdoc b/doc/src/examples/activeqt/multiple.qdoc
new file mode 100644
index 0000000..d15371b
--- /dev/null
+++ b/doc/src/examples/activeqt/multiple.qdoc
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-multiple.html
+ \title Two Simple Qt Widgets
+
+ \input examples/activeqt/multiple-demo.qdocinc
+*/
+
+/*!
+ \example activeqt/multiple
+ \title Multiple Example (ActiveQt)
+
+ The Multiple example demonstrates the implementation of a
+ QAxFactory to provide multiple ActiveX controls in a single in
+ process ActiveX server using the \c QAXFACTORY_EXPORT() macro.
+ The ActiveX controls in this example are simple QWidget
+ subclasses that reimplement QWidget::paintEvent().
+
+ \snippet examples/activeqt/multiple/ax1.h 0
+
+ The first control draws a filled rectangle. The fill color is exposed
+ as a property. \c Q_CLASSINFO() is used to specify the COM identifiers.
+
+ \snippet examples/activeqt/multiple/ax2.h 0
+
+ The second control draws a circle. The linewith is exposed as a property.
+ \c Q_CLASSINFO() is used to specify the COM identifiers, and to set the
+ attributes \e ToSuperClass and \e StockEvents to expose only the API of
+ the class itself, and to add COM stock events to the ActiveX control.
+
+ \snippet examples/activeqt/multiple/main.cpp 0
+
+ The classes are exported from the server using the QAxFactory macros.
+
+ To build the example you must first build the QAxServer library.
+ Then run \c qmake and your make tool in \c
+ examples/activeqt/multiple.
+
+ The \l{qaxserver-demo-multiple.html}{demonstration} requires your
+ WebBrowser to support ActiveX controls, and scripting to be
+ enabled.
+
+ \snippet examples/activeqt/multiple-demo.qdocinc 0
+*/
diff --git a/doc/src/examples/activeqt/opengl-demo.qdocinc b/doc/src/examples/activeqt/opengl-demo.qdocinc
new file mode 100644
index 0000000..44df0c4
--- /dev/null
+++ b/doc/src/examples/activeqt/opengl-demo.qdocinc
@@ -0,0 +1,27 @@
+\raw HTML
+//! [0]
+<SCRIPT LANGUAGE="JavaScript">
+function setRot( form )
+{
+ GLBox.setXRotation( form.XEdit.value );
+ GLBox.setYRotation( form.YEdit.value );
+ GLBox.setZRotation( form.ZEdit.value );
+}
+</SCRIPT>
+
+<p />
+An OpenGL scene:<br />
+<object ID="GLBox" CLASSID="CLSID:5fd9c22e-ed45-43fa-ba13-1530bb6b03e0"
+CODEBASE="http://qtsoftware.com/demos/openglax.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+
+<form>
+Rotate the scene:<br />
+X:<input type="edit" ID="XEdit" value="0" /><br />
+Y:<input type="edit" name="YEdit" value="0" /><br />
+Z:<input type="edit" name="ZEdit" value="0" /><br />
+<input type="button" value="Set" onClick="setRot(this.form)" />
+</form>
+//! [0]
+\endraw
diff --git a/doc/src/examples/activeqt/opengl.qdoc b/doc/src/examples/activeqt/opengl.qdoc
new file mode 100644
index 0000000..05c9d08
--- /dev/null
+++ b/doc/src/examples/activeqt/opengl.qdoc
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-opengl.html
+
+ \title OpenGL in an HTML page
+
+ \raw HTML
+ <SCRIPT LANGUAGE="JavaScript">
+ function setRot( form )
+ {
+ GLBox.setXRotation( form.XEdit.value );
+ GLBox.setYRotation( form.YEdit.value );
+ GLBox.setZRotation( form.ZEdit.value );
+ }
+ </SCRIPT>
+
+ <p />
+ An OpenGL scene:<br />
+ <object ID="GLBox" CLASSID="CLSID:5fd9c22e-ed45-43fa-ba13-1530bb6b03e0"
+ CODEBASE="http://qtsoftware.com/demos/openglax.cab">
+ [Object not available! Did you forget to build and register the server?]
+ </object><br />
+
+ <form>
+ Rotate the scene:<br />
+ X:<input type="edit" ID="XEdit" value="0" /><br />
+ Y:<input type="edit" name="YEdit" value="0" /><br />
+ Z:<input type="edit" name="ZEdit" value="0" /><br />
+ <input type="button" value="Set" onClick="setRot(this.form)" />
+ </form>
+ \endraw
+*/
+
+/*!
+ \example activeqt/opengl
+ \title OpenGL Example (ActiveQt)
+
+ The OpenGL example demonstrates the use of the default factory
+ and QAxFactory::isServer(), and the implementation of an
+ additional COM interface using QAxBindable and QAxAggregated.
+ The server executable can run both as an ActiveX server and as a
+ stand-alone application.
+
+ The ActiveX control in this example uses the QGlWidget class in
+ Qt to render an OpenGL scene in an ActiveX. The control exposes a few
+ methods to change the scene.
+
+ The application uses the default factory as provided by the
+ QAXFACTORY_DEFAULT macro to expose the \c GLBox widget as an ActiveX
+ control.
+ \snippet examples/activeqt/opengl/main.cpp 0
+ The implementation of \c main initializes the QApplication object,
+ and uses \c QAxFactory::isServer() to determine whether or not it is
+ appropriate to create and show the application interface.
+ \snippet examples/activeqt/opengl/main.cpp 1
+ \snippet examples/activeqt/opengl/main.cpp 2
+ \snippet examples/activeqt/opengl/main.cpp 3
+
+ The \c GLBox class inherits from both the \l QGLWidget class to be able
+ to render OpenGL, and from \l QAxBindable.
+ \snippet examples/activeqt/opengl/glbox.h 0
+ The class reimplements the \l QAxBindable::createAggregate() function from QAxBindable
+ to return the pointer to a \l QAxAggregated object.
+ \snippet examples/activeqt/opengl/glbox.h 1
+ The rest of the class declaration and the implementation of the OpenGL
+ rendering is identical to the original "box" example.
+
+ The implementation file of the \c GLBox class includes the \c objsafe.h
+ system header, in which the \c IObjectSafety COM interface is defined.
+ \snippet examples/activeqt/opengl/glbox.cpp 0
+ A class \c ObjectSafetyImpl is declared using multiple inheritance
+ to subclass the QAxAggregated class, and to implement the IObjectSafety
+ interface.
+ \snippet examples/activeqt/opengl/glbox.cpp 1
+ The class declares a default constructor, and implements the queryInterface
+ function to support the IObjectSafety interface.
+ \snippet examples/activeqt/opengl/glbox.cpp 2
+ Since every COM interface inherits \c IUnknown the \c QAXAGG_IUNKNOWN macro
+ is used to provide the default implementation of the \c IUnknown interface.
+ The macro is defined to delegate all calls to \c QueryInterface, \c AddRef
+ and \c Release to the interface returned by the controllingUnknown() function.
+ \snippet examples/activeqt/opengl/glbox.cpp 3
+ The implementation of the \c IObjectSafety interface provides the caller
+ with information about supported and enabled safety options, and returns
+ \c S_OK for all calls to indicate that the ActiveX control is safe.
+ \snippet examples/activeqt/opengl/glbox.cpp 4
+ The implementation of the \c createAggregate() function just returns a new
+ \c ObjectSafetyImpl object.
+ \snippet examples/activeqt/opengl/glbox.cpp 5
+
+ To build the example you must first build the QAxServer library.
+ Then run \c qmake and your make tool in \c
+ examples/activeqt/wrapper.
+
+ The \l{qaxserver-demo-opengl.html}{demonstration} requires your
+ WebBrowser to support ActiveX controls, and scripting to be
+ enabled.
+
+ In contrast to the other QAxServer examples Internet Explorer will not
+ open a dialog box to ask the user whether or not the scripting of the GLBox
+ control should be allowed (the exact browser behaviour depends on the security
+ settings in the Internet Options dialog).
+
+ \snippet doc/src/examples/activeqt/opengl-demo.qdocinc 0
+*/
diff --git a/doc/src/examples/activeqt/qutlook.qdoc b/doc/src/examples/activeqt/qutlook.qdoc
new file mode 100644
index 0000000..c29feeb
--- /dev/null
+++ b/doc/src/examples/activeqt/qutlook.qdoc
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example activeqt/qutlook
+ \title Qutlook Example (ActiveQt)
+
+ The Qutlook example demonstrates the use of ActiveQt to automate
+ Outlook. The example makes use of the \l dumpcpp tool to generate
+ a C++ namespace for the type library describing the Outlook
+ Object Model.
+
+ The project file for the example looks like this:
+
+ \snippet examples/activeqt/qutlook/qutlook.pro 1
+ \snippet examples/activeqt/qutlook/qutlook.pro 2
+
+ The project file uses the \c dumpcpp tool to add an MS Outlook type library to the project.
+ If this fails, then the generated makefile will just print an error message, otherwise
+ the build step will now run the \e dumpcpp tool on the type library, and
+ generate a header and a cpp file (in this case, \c msoutl.h and \c msoutl.cpp) that
+ declares and implement an easy to use API to the Outlook objects.
+
+ \snippet examples/activeqt/qutlook/addressview.h 0
+
+ The AddressView class is a QWidget subclass for the user interface. The QTreeView widget
+ will display the contents of Outlook's Contact folder as provided by the \c{model}.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 0
+ The AddressBookModel class is a QAbstractListModel subclass that communicates directly with
+ Outlook, using a QHash for caching.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 1
+ The constructor initializes Outlook. The various signals Outlook provides to notify about
+ contents changes are connected to the \c updateOutlook() slot.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 2
+ The destructor logs off from the session.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 3
+ The \c rowCount() implementation returns the number of entries as reported by Outlook. \c columnCount
+ and \c headerData are implemented to show four columns in the tree view.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 4
+ The \c headerData() implementation returns hardcoded strings.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 5
+ The \c data() implementation is the core of the model. If the requested data is in the cache the
+ cached value is used, otherwise the data is acquired from Outlook.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 6
+ The \c changeItem() slot is called when the user changes the current entry using the user interface.
+ The Outlook item is accessed using the Outlook API, and is modified using the property setters.
+ Finally, the item is saved to Outlook, and removed from the cache. Note that the model does not
+ signal the view of the data change, as Outlook will emit a signal on its own.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 7
+ The \c addItem() slot calls the CreateItem method of Outlook to create a new contact item,
+ sets the properties of the new item to the values entered by the user and saves the item.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 8
+ The \c update() slot clears the cache, and emits the reset() signal to notify the view about the
+ data change requiring a redraw of the contents.
+
+ \snippet examples/activeqt/qutlook/addressview.cpp 9
+ \snippet examples/activeqt/qutlook/addressview.cpp 10
+ The rest of the file implements the user interface using only Qt APIs, i.e. without communicating
+ with Outlook directly.
+
+ \snippet examples/activeqt/qutlook/main.cpp 0
+
+ The \c main() entry point function finally instantiates the user interface and enters the
+ event loop.
+
+ To build the example you must first build the QAxContainer
+ library. Then run your make tool in \c examples/activeqt/qutlook
+ and run the resulting \c qutlook.exe.
+*/
diff --git a/doc/src/examples/activeqt/simple-demo.qdocinc b/doc/src/examples/activeqt/simple-demo.qdocinc
new file mode 100644
index 0000000..45a346c
--- /dev/null
+++ b/doc/src/examples/activeqt/simple-demo.qdocinc
@@ -0,0 +1,45 @@
+\raw HTML
+//! [0]
+<object ID="QSimpleAX" CLASSID="CLSID:DF16845C-92CD-4AAB-A982-EB9840E74669"
+CODEBASE="http://qtsoftware.com/demos/simpleax.cab">
+ <PARAM NAME="text" VALUE="A simple control" />
+ <PARAM NAME="value" VALUE="1" />
+[Object not available! Did you forget to build and register the server?]
+</object>
+//! [0] //! [1]
+
+<FORM>
+ <INPUT TYPE="BUTTON" VALUE="About..." onClick="QSimpleAX.about()" />
+</FORM>
+//! [1]
+
+//! [2]
+<object ID="Calendar" CLASSID="CLSID:8E27C92B-1264-101C-8A2F-040224009C02">
+[Standard Calendar control not available!]
+ <PARAM NAME="day" VALUE="1" />
+</object>
+//! [2]
+
+<FORM>
+ <INPUT TYPE="BUTTON" VALUE="Today" onClick="Calendar.Today()" />
+</FORM>
+
+//! [3]
+<SCRIPT LANGUAGE="VBScript">
+Sub Calendar_Click()
+ MsgBox( "Calendar Clicked!" )
+End Sub
+
+Sub QSimpleAX_TextChanged( str )
+ document.title = str
+End Sub
+</SCRIPT>
+
+<SCRIPT LANGUAGE="JavaScript">
+function QSimpleAX::ValueChanged( Newvalue )
+{
+ Calendar.Day = Newvalue;
+}
+</SCRIPT>
+//! [3]
+\endraw
diff --git a/doc/src/examples/activeqt/simple.qdoc b/doc/src/examples/activeqt/simple.qdoc
new file mode 100644
index 0000000..e79e542
--- /dev/null
+++ b/doc/src/examples/activeqt/simple.qdoc
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-simple.html
+
+ \title A standard ActiveX and the "simple" ActiveQt widget
+
+ \raw HTML
+ <object ID="QSimpleAX" CLASSID="CLSID:DF16845C-92CD-4AAB-A982-EB9840E74669"
+ CODEBASE="http://qtsoftware.com/demos/simpleax.cab">
+ <PARAM NAME="text" VALUE="A simple control" />
+ <PARAM NAME="value" VALUE="1" />
+ [Object not available! Did you forget to build and register the server?]
+ </object>
+
+ <FORM>
+ <INPUT TYPE="BUTTON" VALUE="About..." onClick="QSimpleAX.about()" />
+ </FORM>
+
+ <object ID="Calendar" CLASSID="CLSID:8E27C92B-1264-101C-8A2F-040224009C02">
+ [Standard Calendar control not available!]
+ <PARAM NAME="day" VALUE="1" />
+ </object>
+
+ <FORM>
+ <INPUT TYPE="BUTTON" VALUE="Today" onClick="Calendar.Today()" />
+ </FORM>
+
+ <SCRIPT LANGUAGE="VBScript">
+ Sub Calendar_Click()
+ MsgBox( "Calendar Clicked!" )
+ End Sub
+
+ Sub QSimpleAX_TextChanged( str )
+ document.title = str
+ End Sub
+ </SCRIPT>
+
+ <SCRIPT LANGUAGE="JavaScript">
+ function QSimpleAX::ValueChanged( Newvalue )
+ {
+ Calendar.Day = Newvalue;
+ }
+ </SCRIPT>
+ \endraw
+*/
+
+/*!
+ \example activeqt/simple
+ \title Simple Example (ActiveQt)
+
+ The Simple example demonstrates the use of
+ QAxBindable::requestPropertyChange() and
+ QAxBindable::propertyChanged(), and the use of the default
+ QAxFactory through the \c QAXFACTORY_DEFAULT() macro.
+
+ The ActiveX control in this example is a laid out QWidget with a
+ QSlider, a QLCDNumber and a QLineEdit. It provides a
+ signal/slot/property interface to change the values of the slider
+ and the line edit, and to get notified of any property changes.
+
+
+ The Qt implementation of the ActiveX for this example is
+ \snippet examples/activeqt/simple/main.cpp 0
+
+ The control is exported using the default QAxFactory
+ \snippet examples/activeqt/simple/main.cpp 1
+
+ To build the example you must first build the QAxServer library.
+ Then run qmake and your make tool in \c examples/activeqt/simple.
+
+ The \l{qaxserver-demo-simple.html}{demonstration} requires your
+ WebBrowser to support ActiveX controls, and scripting to be enabled.
+
+ The simple ActiveX control is embedded using the \c <object> tag.
+
+ \snippet doc/src/examples/activeqt/simple-demo.qdocinc 0
+
+ A simple HTML button is connected to the ActiveQt's about() slot.
+
+ \snippet doc/src/examples/activeqt/simple-demo.qdocinc 1
+
+ A second ActiveX control - the standard Calendar Control - is instantiated
+
+ \snippet doc/src/examples/activeqt/simple-demo.qdocinc 2
+
+ Events from the ActiveX controls are handled using both Visual Basic Script
+ and JavaScript.
+
+ \snippet doc/src/examples/activeqt/simple-demo.qdocinc 3
+*/
diff --git a/doc/src/examples/activeqt/webbrowser.qdoc b/doc/src/examples/activeqt/webbrowser.qdoc
new file mode 100644
index 0000000..46b83f9
--- /dev/null
+++ b/doc/src/examples/activeqt/webbrowser.qdoc
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example activeqt/webbrowser
+ \title Web Browser Example (ActiveQt)
+
+ The Web Browser example uses the Microsoft Web Browser
+ ActiveX control to implement a fully functional Web Browser
+ application. The user interface has been developed using the Qt
+ Designer integration of the QAxWidget class.
+
+ The code demonstrates how the Qt application can communicate
+ with the embedded ActiveX controls using signals, slots and the
+ dynamicCall() function.
+
+ \snippet examples/activeqt/webbrowser/main.cpp 0
+
+ The \c MainWindow class declares a \c QMainWindow based user interface,
+ using the \c Ui::MainWindow class generated by Qt Designer. A number
+ of slots are implemented to handle events from the various user
+ interface elements, including the \c WebBrowser object, which is a
+ QAxWidget hosting the Microsoft Web Browser control.
+
+ \snippet examples/activeqt/webbrowser/main.cpp 1
+
+ The constructor initializes the user interface, installs a
+ progress bar on the status bar, and uses QAxBase::dynamicCall()
+ to invoke the \c GoHome() method of Internet Explorer to
+ navigate to the user's home page.
+
+ \snippet examples/activeqt/webbrowser/main.cpp 2
+ Different slots handle the signals emitted by the WebBrowser object.
+
+ Connections that don't require any coding, i.e. connecting the \c back
+ action to the \c GoBack() slot, have already been made in Qt Designer.
+
+ \snippet examples/activeqt/webbrowser/main.cpp 3
+ \snippet examples/activeqt/webbrowser/main.cpp 4
+
+ The rest of the implementation is not related to ActiveQt - the actions
+ are handled by different slots, and the entry point function starts the
+ application using standard Qt APIs.
+
+ To build the example you must first build the QAxContainer
+ library. Then run your make tool in \c
+ examples/activeqt/webbrowser and run the resulting \c
+ webbrowser.exe.
+*/
diff --git a/doc/src/examples/activeqt/wrapper-demo.qdocinc b/doc/src/examples/activeqt/wrapper-demo.qdocinc
new file mode 100644
index 0000000..1457119
--- /dev/null
+++ b/doc/src/examples/activeqt/wrapper-demo.qdocinc
@@ -0,0 +1,51 @@
+\raw HTML
+//! [0]
+<SCRIPT LANGUAGE="VBScript">
+Sub ToolButton_Clicked()
+ RadioButton.text = InputBox( "Enter something", "Wrapper Demo" )
+End Sub
+
+Sub PushButton_clicked()
+ MsgBox( "Thank you!" )
+End Sub
+
+Sub CheckBox_toggled( state )
+ if state = 0 then
+ CheckBox.text = "Check me!"
+ else
+ CheckBox.text = "Uncheck me!"
+ end if
+End Sub
+</SCRIPT>
+<p />
+A QPushButton:<br />
+<object ID="PushButton" CLASSID="CLSID:2B262458-A4B6-468B-B7D4-CF5FEE0A7092"
+CODEBASE="http://qtsoftware.com/demos/wrapperax.cab">
+ <PARAM NAME="text" VALUE="Click me!" />
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+
+<p />
+A QCheckBox:<br />
+<object ID="CheckBox" CLASSID="CLSID:6E795de9-872d-43cf-a831-496ef9d86c68"
+CODEBASE="http://qtsoftware.com/demos/wrapperax.cab">
+ <PARAM NAME="text" VALUE="Check me!" />
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+
+<p />
+A QToolButton:<br />
+<object ID="ToolButton" CLASSID="CLSID:7c0ffe7a-60c3-4666-bde2-5cf2b54390a1"
+CODEBASE="http://qtsoftware.com/demos/wrapperax.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+
+<p />
+A QRadioButton:<br />
+<object ID="RadioButton" CLASSID="CLSID:afcf78c8-446c-409a-93b3-ba2959039189"
+CODEBASE="http://qtsoftware.com/demos/wrapperax.cab">
+ <PARAM NAME="text" VALUE="Tune me!" />
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+//! [0]
+\endraw
diff --git a/doc/src/examples/activeqt/wrapper.qdoc b/doc/src/examples/activeqt/wrapper.qdoc
new file mode 100644
index 0000000..017da30
--- /dev/null
+++ b/doc/src/examples/activeqt/wrapper.qdoc
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qaxserver-demo-wrapper.html
+
+ \title Standard Qt widgets in an HTML page
+
+ \input examples/activeqt/wrapper-demo.qdocinc
+*/
+
+/*!
+ \example activeqt/wrapper
+ \title Wrapper Example (ActiveQt)
+
+ The Wrapper example demonstrates how to export existing QWidget
+ classes as ActiveX controls, and the use of QAxFactory together
+ with the \c QAXFACTORY_EXPORT() macro. ActiveX controls in this
+ example are the standard button classes QPushButton, QCheckBox
+ and QRadioButton as provided by Qt.
+
+ \snippet examples/activeqt/wrapper/main.cpp 0
+ The factory implementation returns the list of supported controls,
+ creates controls on request and provides information about the unique
+ IDs of the COM classes and interfaces for each control.
+
+ \snippet examples/activeqt/wrapper/main.cpp 1
+ The factory is exported using the QAXFACTORY_EXPORT macro.
+
+ To build the example you must first build the QAxServer library.
+ Then run \c qmake and your make tool in \c
+ examples/activeqt/wrapper.
+
+ The \l{qaxserver-demo-wrapper.html}{demonstration} requires a
+ web browser that supports ActiveX controls, and scripting to be
+ enabled.
+
+ \snippet examples/activeqt/wrapper-demo.qdocinc 0
+*/
diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc
new file mode 100644
index 0000000..fb5c1ea
--- /dev/null
+++ b/doc/src/examples/addressbook.qdoc
@@ -0,0 +1,456 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/addressbook
+ \title Address Book Example
+
+ The address book example shows how to use proxy models to display
+ different views onto data from a single model.
+
+ \image addressbook-example.png Screenshot of the Address Book example
+
+ This example provides an address book that allows contacts to be
+ grouped alphabetically into 9 groups: ABC, DEF, GHI, ... , VW,
+ ..., XYZ. This is achieved by using multiple views on the same
+ model, each of which is filtered using an instance of the
+ QSortFilterProxyModel class.
+
+
+ \section1 Overview
+
+ The address book contains 5 classes: \c MainWindow,
+ \c AddressWidget, \c TableModel, \c NewAddressTab and
+ \c AddDialog. The \c MainWindow class uses \c AddressWidget as
+ its central widget and provides \gui File and \gui Tools menus.
+
+ \image addressbook-classes.png Diagram for Address Book Example
+
+ The \c AddressWidget class is a QTabWidget subclass that is used
+ to manipulate the 10 tabs displayed in the example: the 9
+ alphabet group tabs and an instance of \c NewAddressTab.
+ The \c NewAddressTab class is a subclass of QWidget that
+ is only used whenever the address book is empty, prompting the
+ user to add some contacts. \c AddressWidget also interacts with
+ an instance of \c TableModel to add, edit and remove entries to
+ the address book.
+
+ \c TableModel is a subclass of QAbstractTableModel that provides
+ the standard model/view API to access data. It also holds a
+ QList of \l{QPair}s corresponding to the contacts added.
+ However, this data is not all visible in a single tab. Instead,
+ QTableView is used to provide 9 different views of the same
+ data, according to the alphabet groups.
+
+ QSortFilterProxyModel is the class responsible for filtering
+ the contacts for each group of contacts. Each proxy model uses
+ a QRegExp to filter out contacts that do not belong in the
+ corresponding alphabetical group. The \c AddDialog class is
+ used to obtain information from the user for the address book.
+ This QDialog subclass is instantiated by \c NewAddressTab to
+ add contacts, and by \c AddressWidget to add and edit contacts.
+
+ We begin by looking at the \c TableModel implementation.
+
+
+ \section1 TableModel Class Definition
+
+ The \c TableModel class provides standard API to access data in
+ its QList of \l{QPair}s by subclassing QAbstractTableModel. The
+ basic functions that must be implemented in order to do so are:
+ \c rowCount(), \c columnCount(), \c data(), \c headerData().
+ For TableModel to be editable, it has to provide implementations
+ \c insertRows(), \c removeRows(), \c setData() and \c flags()
+ functions.
+
+ \snippet itemviews/addressbook/tablemodel.h 0
+
+ Two constructors are used, a default constructor which uses
+ \c TableModel's own \c {QList<QPair<QString, QString>>} and one
+ that takes \c {QList<QPair<QString, QString>} as an argument,
+ for convenience.
+
+
+ \section1 TableModel Class Implementation
+
+ We implement the two constructors as defined in the header file.
+ The second constructor initializes the list of pairs in the
+ model, with the parameter value.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 0
+
+ The \c rowCount() and \c columnCount() functions return the
+ dimensions of the model. Whereas, \c rowCount()'s value will vary
+ depending on the number of contacts added to the address book,
+ \c columnCount()'s value is always 2 because we only need space
+ for the \bold Name and \bold Address columns.
+
+ \note The \c Q_UNUSED() macro prevents the compiler from
+ generating warnings regarding unused parameters.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 1
+
+ The \c data() function returns either a \bold Name or
+ \bold {Address}, based on the contents of the model index
+ supplied. The row number stored in the model index is used to
+ reference an item in the list of pairs. Selection is handled
+ by the QItemSelectionModel, which will be explained with
+ \c AddressWidget.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 2
+
+ The \c headerData() function displays the table's header,
+ \bold Name and \bold Address. If you require numbered entries
+ for your address book, you can use a vertical header which we
+ have hidden in this example (see the \c AddressWidget
+ implementation).
+
+ \snippet itemviews/addressbook/tablemodel.cpp 3
+
+ The \c insertRows() function is called before new data is added,
+ otherwise the data will not be displayed. The
+ \c beginInsertRows() and \c endInsertRows() functions are called
+ to ensure all connected views are aware of the changes.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 4
+
+ The \c removeRows() function is called to remove data. Again,
+ \l{QAbstractItemModel::}{beginRemoveRows()} and
+ \l{QAbstractItemModel::}{endRemoveRows()} are called to ensure
+ all connected views are aware of the changes.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 5
+
+ The \c setData() function is the function that inserts data into
+ the table, item by item and not row by row. This means that to
+ fill a row in the address book, \c setData() must be called
+ twice, as each row has 2 columns. It is important to emit the
+ \l{QAbstractItemModel::}{dataChanged()} signal as it tells all
+ connected views to update their displays.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 6
+
+ The \c flags() function returns the item flags for the given
+ index.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 7
+
+ We set the Qt::ItemIsEditable flag because we want to allow the
+ \c TableModel to be edited. Although for this example we don't
+ use the editing features of the QTableView object, we enable
+ them here so that we can reuse the model in other programs.
+
+ The last function in \c {TableModel}, \c getList() returns the
+ QList<QPair<QString, QString>> object that holds all the
+ contacts in the address book. We use this function later to
+ obtain the list of contacts to check for existing entries, write
+ the contacts to a file and read them back. Further explanation is
+ given with \c AddressWidget.
+
+ \snippet itemviews/addressbook/tablemodel.cpp 8
+
+
+ \section1 AddressWidget Class Definition
+
+ The \c AddressWidget class is technically the main class
+ involved in this example as it provides functions to add, edit
+ and remove contacts, to save the contacts to a file and to load
+ them from a file.
+
+ \snippet itemviews/addressbook/addresswidget.h 0
+
+ \c AddressWidget extends QTabWidget in order to hold 10 tabs
+ (\c NewAddressTab and the 9 alphabet group tabs) and also
+ manipulates \c table, the \c TableModel object, \c proxyModel,
+ the QSortFilterProxyModel object that we use to filter the
+ entries, and \c tableView, the QTableView object.
+
+
+ \section1 AddressWidget Class Implementation
+
+ The \c AddressWidget constructor accepts a parent widget and
+ instantiates \c NewAddressTab, \c TableModel and
+ QSortFilterProxyModel. The \c NewAddressTab object, which is
+ used to indicate that the address book is empty, is added
+ and the rest of the 9 tabs are set up with \c setupTabs().
+
+ \snippet itemviews/addressbook/addresswidget.cpp 0
+
+ The \c setupTabs() function is used to set up the 9 alphabet
+ group tabs, table views and proxy models in
+ \c AddressWidget. Each proxy model in turn is set to filter
+ contact names according to the relevant alphabet group using a
+ \l{Qt::CaseInsensitive}{case-insensitive} QRegExp object. The
+ table views are also sorted in ascending order using the
+ corresponding proxy model's \l{QSortFilterProxyModel::}{sort()}
+ function.
+
+ Each table view's \l{QTableView::}{selectionMode} is set to
+ QAbstractItemView::SingleSelection and
+ \l{QTableView::}{selectionBehavior} is set to
+ QAbstractItemView::SelectRows, allowing the user to select
+ all the items in one row at the same time. Each QTableView object
+ is automatically given a QItemSelectionModel that keeps track
+ of the selected indexes.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 1
+
+ The QItemSelectionModel class provides a
+ \l{QItemSelectionModel::selectionChanged()}{selectionChanged}
+ signal that is connected to \c{AddressWidget}'s
+ \c selectionChanged() signal. This signal to signal connection
+ is necessary to enable the \gui{Edit Entry...} and
+ \gui{Remove Entry} actions in \c MainWindow's Tools menu. This
+ connection is further explained in \c MainWindow's
+ implementation.
+
+ Each table view in the address book is added as a tab to the
+ QTabWidget with the relevant label, obtained from the QStringList
+ of groups.
+
+ \image addressbook-signals.png Signals and Slots Connections
+
+ We provide 2 \c addEntry() functions: 1 which is intended to be
+ used to accept user input, and the other which performs the actual
+ task of adding new entries to the address book. We divide the
+ responsibility of adding entries into two parts to allow
+ \c newAddressTab to insert data without having to popup a dialog.
+
+ The first \c addEntry() function is a slot connected to the
+ \c MainWindow's \gui{Add Entry...} action. This function creates an
+ \c AddDialog object and then calls the second \c addEntry()
+ function to actually add the contact to \c table.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 2
+
+ Basic validation is done in the second \c addEntry() function to
+ prevent duplicate entries in the address book. As mentioned with
+ \c TableModel, this is part of the reason why we require the
+ getter method \c getList().
+
+ \snippet itemviews/addressbook/addresswidget.cpp 3
+
+ If the model does not already contain an entry with the same name,
+ we call \c setData() to insert the name and address into the
+ first and second columns. Otherwise, we display a QMessageBox
+ to inform the user.
+
+ \note The \c newAddressTab is removed once a contact is added
+ as the address book is no longer empty.
+
+ Editing an entry is a way to update the contact's address only,
+ as the example does not allow the user to change the name of an
+ existing contact.
+
+ Firstly, we obtain the active tab's QTableView object using
+ QTabWidget::currentWidget(). Then we extract the
+ \c selectionModel from the \c tableView to obtain the selected
+ indexes.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 4a
+
+ Next we extract data from the row the user intends to
+ edit. This data is displayed in an instance of \c AddDialog
+ with a different window title. The \c table is only
+ updated if changes have been made to data in \c aDialog.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 4b
+
+ \image addressbook-editdialog.png Screenshot of Dialog to Edit a Contact
+
+ Entries are removed using the \c removeEntry() function.
+ The selected row is removed by accessing it through the
+ QItemSelectionModel object, \c selectionModel. The
+ \c newAddressTab is re-added to the \c AddressWidget only if
+ the user removes all the contacts in the address book.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 5
+
+ The \c writeToFile() function is used to save a file containing
+ all the contacts in the address book. The file is saved in a
+ custom \c{.dat} format. The contents of the QList of \l{QPair}s
+ are written to \c file using QDataStream. If the file cannot be
+ opened, a QMessageBox is displayed with the related error message.
+
+ \snippet itemviews/addressbook/addresswidget.cpp 6
+
+ The \c readFromFile() function loads a file containing all the
+ contacts in the address book, previously saved using
+ \c writeToFile(). QDataStream is used to read the contents of a
+ \c{.dat} file into a list of pairs and each of these is added
+ using \c addEntry().
+
+ \snippet itemviews/addressbook/addresswidget.cpp 7
+
+
+ \section1 NewAddressTab Class Definition
+
+ The \c NewAddressTab class provides an informative tab telling
+ the user that the address book is empty. It appears and
+ disappears according to the contents of the address book, as
+ mentioned in \c{AddressWidget}'s implementation.
+
+ \image addressbook-newaddresstab.png Screenshot of NewAddressTab
+
+ The \c NewAddressTab class extends QWidget and contains a QLabel
+ and QPushButton.
+
+ \snippet itemviews/addressbook/newaddresstab.h 0
+
+
+ \section1 NewAddressTab Class Implementation
+
+ The constructor instantiates the \c addButton,
+ \c descriptionLabel and connects the \c{addButton}'s signal to
+ the \c{addEntry()} slot.
+
+ \snippet itemviews/addressbook/newaddresstab.cpp 0
+
+ The \c addEntry() function is similar to \c AddressWidget's
+ \c addEntry() in the sense that both functions instantiate an
+ \c AddDialog object. Data from the dialog is extracted and sent
+ to \c AddressWidget's \c addEntry() slot by emitting the
+ \c sendDetails() signal.
+
+ \snippet itemviews/addressbook/newaddresstab.cpp 1
+
+ \image signals-n-slots-aw-nat.png
+
+
+ \section1 AddDialog Class Definition
+
+ The \c AddDialog class extends QDialog and provides the user
+ with a QLineEdit and a QTextEdit to input data into the
+ address book.
+
+ \snippet itemviews/addressbook/adddialog.h 0
+
+ \image addressbook-adddialog.png
+
+
+ \section1 AddDialog Class Implementation
+
+ The \c AddDialog's constructor sets up the user interface,
+ creating the necessary widgets and placing them into layouts.
+
+ \snippet itemviews/addressbook/adddialog.cpp 0
+
+ To give the dialog the desired behavior, we connect the \gui OK
+ and \gui Cancel buttons to the dialog's \l{QDialog::}{accept()} and
+ \l{QDialog::}{reject()} slots. Since the dialog only acts as a
+ container for name and address information, we do not need to
+ implement any other functions for it.
+
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class extends QMainWindow and implements the
+ menus and actions necessary to manipulate the address book.
+
+ \table
+ \row \o \inlineimage addressbook-filemenu.png
+ \o \inlineimage addressbook-toolsmenu.png
+ \endtable
+
+ \snippet itemviews/addressbook/mainwindow.h 0
+
+ The \c MainWindow class uses an \c AddressWidget as its central
+ widget and provides the File menu with \gui Open, \gui Close and
+ \gui Exit actions, as well as the \gui Tools menu with
+ \gui{Add Entry...}, \gui{Edit Entry...} and \gui{Remove Entry}
+ actions.
+
+
+ \section1 MainWindow Class Implementation
+
+ The constructor for \c MainWindow instantiates AddressWidget,
+ sets it as its central widget and calls the \c createMenus()
+ function.
+
+ \snippet itemviews/addressbook/mainwindow.cpp 0
+
+ The \c createMenus() function sets up the \gui File and
+ \gui Tools menus, connecting the actions to their respective slots.
+ Both the \gui{Edit Entry...} and \gui{Remove Entry} actions are
+ disabled by default as such actions cannot be carried out on an empty
+ address book. They are only enabled when one or more contacts
+ are added.
+
+ \snippet itemviews/addressbook/mainwindow.cpp 1a
+ \dots
+ \codeline
+ \snippet itemviews/addressbook/mainwindow.cpp 1b
+
+ Apart from connecting all the actions' signals to their
+ respective slots, we also connect \c AddressWidget's
+ \c selectionChanged() signal to its \c updateActions() slot.
+
+ The \c openFile() function allows the user to choose a file with
+ the \l{QFileDialog::getOpenFileName()}{open file dialog}. The chosen
+ file has to be a custom \c{.dat} file that contains address book
+ contacts. This function is a slot connected to \c openAct in the
+ \gui File menu.
+
+ \snippet itemviews/addressbook/mainwindow.cpp 2
+
+ The \c saveFile() function allows the user to save a file with
+ the \l{QFileDialog::getSaveFileName()}{save file dialog}. This function
+ is a slot connected to \c saveAct in the \gui File menu.
+
+ \snippet itemviews/addressbook/mainwindow.cpp 3
+
+ The \c updateActions() function enables and disables
+ \gui{Edit Entry...} and \gui{Remove Entry} depending on the contents of
+ the address book. If the address book is empty, these actions
+ are disabled; otherwise, they are enabled. This function is a slot
+ is connected to the \c AddressWidget's \c selectionChanged()
+ signal.
+
+ \snippet itemviews/addressbook/mainwindow.cpp 4
+
+
+ \section1 main() Function
+
+ The main function for the address book instantiates QApplication
+ and opens a \c MainWindow before running the event loop.
+
+ \snippet itemviews/addressbook/main.cpp 0
+*/
diff --git a/doc/src/examples/ahigl.qdoc b/doc/src/examples/ahigl.qdoc
new file mode 100644
index 0000000..d42df66
--- /dev/null
+++ b/doc/src/examples/ahigl.qdoc
@@ -0,0 +1,572 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qws/ahigl
+ \title OpenGL for Embedded Systems Example
+
+ \section1 Introduction
+
+ This example demonstrates how you can use OpenGL for Embedded
+ Systems (ES) in your own screen driver and \l{add your graphics
+ driver to Qt for Embedded Linux}. In \l{Qt for Embedded Linux},
+ painting is done in software, normally performed in two steps:
+ First, each client renders its windows onto its window surface in
+ memory using a paint engine. Then the server uses the screen
+ driver to compose the window surface images and copy the
+ composition to the screen. (See the \l{Qt for Embedded Linux
+ Architecture} documentation for details.)
+
+ This example is not for the novice. It assumes the reader is
+ familiar with both OpenGL and the screen driver framework
+ demonstrated in the \l {Accelerated Graphics Driver Example}.
+
+ An OpenGL screen driver for Qt for Embedded Linux can use OpenGL ES
+ in three ways. First, the \l{QWSServer}{Qt for Embedded Linux server}
+ can use the driver to compose multiple window images and then show the
+ composition on the screen. Second, clients can use the driver to
+ accelerate OpenGL painting operations using the QOpenGLPaintEngine
+ class. Finally, clients can use the driver to do OpenGL operations
+ with instances of the QGLWidget class. This example implements all
+ three cases.
+
+ The example uses an implementation of OpenGL ES from
+ \l {http://ati.amd.com}{ATI} for the
+ \l {http://ati.amd.com/products/imageon238x/}{Imageon 2380}. The
+ OpenGL include files gl.h and egl.h must be installed to compile
+ the example, and the OpenGL and EGL libraries must be installed
+ for linking. If your target device is different, you must install
+ the include files and libraries for that device, and you also
+ might need to modify the example source code, if any API signatures
+ in your EGL library differ from the ones used here.
+
+ After compiling and linking the example source, install the
+ screen driver plugin with the command \c {make install}. To
+ start an application that uses the plugin, you can either set the
+ environment variable \l QWS_DISPLAY and then start the
+ application, or just start the application with the \c -display
+ switch, as follows:
+
+ \snippet doc/src/snippets/code/doc_src_examples_ahigl.qdoc 0
+
+ The example driver also implements an animated transition effect
+ for use when showing new windows or reshowing windows that have
+ been minimized. To enable this transition effect, run the
+ application with \c {-display ahigl:effects}.
+
+ \section1 The Class Definitions
+
+ The example comprises three main classes plus some helper classes.
+ The three main classes are the plugin (QAhiGLScreenPlugin), which
+ is defined in qscreenahiglplugin.cpp, the screen driver
+ (QAhiGLScreen), which is defined in qscreenahigl_qws.h, and the
+ window surface (QAhiGLWindowSurface), which is defined in
+ qwindowsurface_ahigl_p.h. The "Ahi" prefix in these class names
+ stands for \e {ATI Handheld Interface}. The example was written
+ for the ATI Imageon 2380, but it can also be used as a template
+ for other ATI handheld devices.
+
+ \section2 The Plugin Class Definition
+
+ The screen driver plugin is class QAhiGLScreenPlugin.
+
+ \snippet examples/qws/ahigl/qscreenahiglplugin.cpp 0
+
+ QAhiGLScreenPlugin is derived from class QScreenDriverPlugin,
+ which in turn is derived from QObject.
+
+ \section2 The Screen Driver Class Definitions
+
+ The screen driver classes are the public class QAhiGLScreen and
+ its private implementation class QAhiGLScreenPrivate. QAhiGLScreen
+ is derived from QGLScreen, which is derived from QScreen. If your
+ screen driver will only do window compositions and display them,
+ then you can derive your screen driver class directly from
+ QScreen. But if your screen driver will do accelerated graphics
+ rendering operations with the QOpenGLPaintEngine, or if it will
+ handle instances of class QGLWidget, then you must derive your
+ screen driver class from QGLScreen.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.h 0
+
+ All functions in the public API of class QAhiGLScreen are virtual
+ functions declared in its base classes. hasOpenGL() is declared in
+ QGLScreen. It simply returns true indicating our example screen
+ driver does support OpenGL operations. The other functions in the
+ public API are declared in QScreen. They are called by the
+ \l{QWSServer}{Qt for Embedded Linux server} at the appropriate times.
+
+ Note that class QScreen is a documented class but class QGLScreen
+ is not. This is because the design of class QGLScreen is not yet
+ final.
+
+ The only data member in class QAhiGLScreen is a standard d_ptr,
+ which points to an instance of the driver's private implementation
+ class QAhiGLScreenPrivate. The driver's internal state is stored
+ in the private class. Using the so-called d-pointer pattern allows
+ you to make changes to the driver's internal design without
+ breaking binary compatibility.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 0
+
+ Class QAhiGLScreenPrivate is derived from QObject so that it can
+ use the Qt signal/slot mechanism. QAhiGLScreen is not a QObject,
+ so it can't use the signal/slot mechanism. Signals meant for our
+ screen driver are received by slots in the private implementation
+ class, in this case, windowEvent() and redrawScreen().
+
+ \section2 The Window Surface Class Definitions
+
+ The window surface classes are QAhiGLWindowSurface and its private
+ implementation class QAhiGLWindowSurfacePrivate. We create class
+ QAhiGLWindowSurface so the screen driver can use the OpenGL paint
+ engine and the OpenGL widget, classes QOpenGLPaintEngine and
+ QGLWidget. QAhiGLWindowSurface is derived from the more general
+ OpenGL window surface class, QWSGLWindowSurface, which is derived
+ from QWSWindowSurface.
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl_p.h 0
+
+ In addition to implementing the standard functionality required by
+ any new subclass of QWSWindowSurface, QAhiGLWindowSurface also
+ contains the textureId() function used by QAhiGLScreen.
+
+ The same d-pointer pattern is used in this window surface class.
+ The private implementation class is QAhiGLWindowSurfacePrivate. It
+ allows making changes to the state variables of the window surface
+ without breaking binary compatibility.
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 0
+
+ In this case, our private implementation class has no member
+ functions except for its constructor. It contains only public data
+ members which hold state information for the window surface.
+
+ \section2 The Helper Classes
+
+ The example screen driver maintains a static \l {QMap} {map} of
+ all the \l {QWSWindow} {windows} it is showing on the screen.
+ Each window is mapped to an instance of struct WindowInfo.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 2
+
+ As each new window is created, an instance of struct WindowInfo is
+ allocated and inserted into the window map. WindowInfo uses a
+ GLuint to identify the OpenGL texture it creates for the window.
+ Note that the example driver, in addition to drawing windows using
+ OpenGL, also supports drawing windows in the normal way without
+ OpenGL, but it uses an OpenGL texture for the rendering operations
+ in either case. Top-level windows that are drawn without OpenGL
+ are first rendered in the normal way into a shared memory segment,
+ which is then converted to a OpenGL texture and drawn to the
+ screen.
+
+ To animate the window transition effect, WindowInfo uses an
+ instance of the helper class ShowAnimation. The animation is
+ created by the windowEvent() slot in QAhiGLScreenPrivate, whenever
+ a \l {QWSServer::WindowEvent} {Show} window event is emitted by
+ the \l {QWSServer} {window server}. The server emits this signal
+ when a window is shown the first time and again later, when the
+ window is reshown after having been minimized.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 1
+
+ Class ShowAnimation is derived from the QTimeLine class, which is
+ used for controlling animations. QTimeLine is a QObject, so
+ ShowAnimation can use the Qt signal/slot mechanism. We will see
+ how the timeline's \l {QTimeLine::valueChanged()} {valueChanged()}
+ and \l {QTimeLine::finished()} {finished()} signals are used to
+ control the animation and then destroy the instance of
+ ShowAnimation, when the animation ends. The ShowAnimation
+ constructor needs the pointer to the screen driver's private
+ implementation class so it can set up these signal/slot
+ connections.
+
+ \section1 The Class Implementations
+
+ \section2 The Plugin Class Implementation
+
+ QAhiGLScreenPlugin is a straightforward derivation of
+ QScreenDriverPlugin. It reimplements \l{QScreenDriverPlugin::}{keys()}
+ and \l{QScreenDriverPlugin::}{create()}. They are
+ called as needed by the \l{QWSServer}{Qt for Embedded Linux server.}
+ Recall that the server detects that the ahigl screen driver has
+ been requested, either by including "ahigl" in the value for the
+ environment variable QWS_DISPLAY, or by running your application
+ with a command line like the following.
+
+ \snippet doc/src/snippets/code/doc_src_examples_ahigl.qdoc 1
+
+ The server calls \l {QScreenDriverPlugin::} {keys()}, which
+ returns a \l {QStringList} containing the singleton "ahigl"
+ matching the requested screen driver and telling the server that
+ it can use our example screen driver. The server then calls \l
+ {QScreenDriverPlugin::} {create()}, which creates the instance of
+ QAhiGLScreen.
+
+ \snippet examples/qws/ahigl/qscreenahiglplugin.cpp 1
+
+ In the code snippet above, the macro Q_EXPORT_PLUGIN2 is used to export
+ the plugin class, QAhiGLScreen, for the qahiglscreen plugin.
+ Further information regarding plugins and how to create them
+ can be found at \l{How to Create Qt Plugins}.
+
+ \section2 The Screen Driver Class Implementations
+
+ The plugin creates the singleton instance of QAhiGLScreen. The
+ constructor is passed a \c displayId, which is used in the base
+ class QGLScreen to identify the server that the screen driver is
+ connected to. The constructor also creates its instance of
+ QAhiGLScreenPrivate, which instantiates a QTimer. The timeout()
+ signal of this timer is connected to the redrawScreen() slot so
+ the timer can be used to limit the frequency of actual drawing
+ operations in the hardware.
+
+ The public API of class QAhiGLScreen consists of implementations
+ of virtual functions declared in its base classes. The function
+ hasOpenGL() is declared in base class QGLScreen. The others are
+ declared in base class QScreen.
+
+ The \l {QScreen::}{connect()} function is the first one called by
+ the server after the screen driver is constructed. It initializes
+ the QScreen data members to hardcoded values that describe the ATI
+ screen. A better implementation would query the hardware for the
+ corresponding values in its current state and use those. It asks
+ whether the screen driver was started with the \c effects option
+ and sets the \c doEffects flag accordingly.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 7
+
+ The \l {QScreen::}{initDevice()} function is called by the server
+ after \l {QScreen::}{connect()}. It uses EGL library functions to
+ initialize the ATI hardware. Note that some data structures used
+ in this example are specific to the EGL implementation used, e.g.,
+ the DummyScreen structure.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 8
+
+ Note the signal/slot connection at the bottom of initDevice(). We
+ connect the server's QWSServer::windowEvent() signal to the
+ windowEvent() slot in the screen driver's private implementation
+ class. The windowEvent() slot handles three window events,
+ QWSServer::Create, QWSServer::Destroy, and QWSServer::Show.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 5
+
+ The function manages instances of the helper classes associated
+ with each window. When a QWSServer::Create event occurs, it means
+ a new top-level \l {QWSWindow} {window} has been created. In this
+ case, an instance of helper class WindowInfo is created and
+ inserted into the window map with the pointer to the new \l
+ {QWSWindow} {window} as its key. When a QWSServer::Destroy event
+ occurs, a window is being destroyed, and its mapping is removed
+ from the window map. These two events are straightforward. The
+ tricky bits happen when a QWSServer::Show event occurs. This case
+ occurs when a window is shown for the first time and when it is
+ reshown after having been minimized. If the window transition
+ effect has been enabled, a new instance of the helper class
+ ShowAnimation is created and stored in a QPointer in the window's
+ instance of WindowInfo. The constructor of ShowAnimation
+ automatically \l {QTimeLine::start()} {starts} the animation of
+ the transition effect.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 3
+
+ To ensure that a ShowAnimation is not deleted until its animation
+ ends, the \l {QTimeLine::finished()} {finished()} signal is
+ connected to the \l {QObject::deleteLater()} {deleteLater()} slot.
+ When the animation ends, the finished() signal is emitted and the
+ deleteLater() slot deletes the ShowAnimation. The key here is that
+ the pointer to the ShowAnimation is stored in a QPointer in the
+ WindowInfo class. This QPointer will also be notified when the
+ ShowAnimation is deleted, so the QPointer in WindowInfo can null
+ itself out, if and only if it is still pointing to the instance
+ of ShowAnimation being deleted.
+
+ The \l {QTimeLine::valueForTime()} {valueForTime()} function in
+ QTimeLine is reimplemented in ShowAnimation to return time values
+ that represent a curved path for the window transition effect.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 4
+
+ valueForTime() is called internally, when the time interval it
+ computed during the previous call has elapsed. If it computes a
+ next time value that is different from the one computed
+ previously, the \l {QTimeLine::valueChanged()} {valueChanged()}
+ signal is emitted. The ShowAnimation constructor shown above
+ connects this signal to the redrawScreen() slot in the screen
+ driver's private implementation class. This is how the animation
+ actually happens.
+
+ The screen driver's implementation of \l {QScreen::}
+ {exposeRegion()} is where the main work of the screen driver is
+ meant to be done, i.e., updating the screen. It is called by the
+ \l {QWSServer} {window system} to update a particular window's
+ region of the screen. But note that it doesn't actually update the
+ screen, i.e., it doesn't actually call redrawScreen() directly,
+ but starts the updateTimer, which causes redrawScreen() to be
+ called once for each updateTimer interval. This means that all
+ calls to exposeRegion() during an updateTimer interval are handled
+ by a single call to redrawScreen(). Thus updateTimer can be used
+ to limit the frequency of screen updates.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 13
+
+ The call to the private function invalidateTexture() destroys
+ the window's existing texture (image). This ensures that a new
+ texture will be created for the window, when redrawScreen() is
+ eventually called.
+
+ But there is a caveat to using updateTimer to limit the frequency
+ of screen updates. When the driver's animated transition effect
+ for new windows is enabled and a new window is being shown for the
+ first time or reshown after having been minimized, an instance of
+ ShowAnimation is created to run the animation. The valueChanged()
+ signal of this ShowAnimation is also connected to the
+ redrawScreen() slot, and QTimeLine, the base class of our
+ ShowAnimation, uses its own, internal timer to limit the speed of
+ the animation. This means that in the driver as currently written,
+ if the window transition effect is enabled (i.e. if the plugin is
+ started, with \c {-display ahigl:effects}), then redrawScreen()
+ can be called both when the update timer times out and when the
+ ShowAnimation timer times out, so the screen might get updated
+ more often than the frequency established by the update timer.
+ This may or may not be a bug, depending on your own hardware, if
+ you use this example as a template for your own OpenGL driver.
+
+ The screen driver's private function redrawScreen() constructs
+ the window compositions. It is called only by the function of the
+ same name in the screen driver's private implementation class.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 6
+
+ Recall that this redrawScreen() in the private implementation
+ class is a slot function connected to two signals, the \c
+ timeout() signal of the updateTimer in the private implementation
+ class, and the valueChanged() signal of the helper class
+ ShowAnimation. Thus, the screen is only ever updated when a
+ timeout of one of the two timers occurs. This is important for two
+ reasons. First, the screen is meant to be updated no more than
+ once per updateTimer interval. Second, however, if the animated
+ window transition effect is requested, the screen might be updated
+ more often than that, and this might be a bug if the hardware
+ can't handle more frequent updates.
+
+ The redrawScreen() in QAhiGLScreen begins by using standard
+ OpenGL to fill the screen with the background color.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 10
+
+ Next it iterates over the list of all \l {QWSWindow} {client
+ windows} obtained from the \l {QWSServer} {server}, extracting
+ from each window its instance of QWSWIndowSurface, then using that
+ window surface to create an OpenGL texture, and finally calling
+ the helper function drawWindow() to draw the texture on the
+ screen.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 11
+
+ Note the call to glBindTexture() immediately before the call to
+ drawWindow(). This call binds the identifer \c GL_TEXTURE_2D to
+ the texture we have just created. This makes our texture
+ accessible to functions in the OpenGL libraries. If you miss that
+ point, digging into the internals of drawWindow() won't make much
+ sense.
+
+ Finally, the cursor is added to the window composition, and in the
+ last statement, the whole thing is displayed on the screen.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 12
+
+ The call to \c drawWindow(win,progress), in addition to passing a
+ pointer to the window to be redrawn, also passes the \c progress
+ parameter obtained by calling \l {QTimeLine::currentValue()} on
+ the window's instance of ShowAnimation. Recall that the current
+ value of the timeline is updated internally by a timer local to
+ the timeline, and the redrawScreen() slot is called whenever the
+ current value changes. The progress value will only be used if
+ the animated transition effect has been enabled. These extra calls
+ of redrawScreen() may cause the screen to be updated more often
+ than the rate determined by updateTimer. This must be taken
+ into account, if you set your updateTimer to timeout at the
+ maximum screen update frequency your hardware can handle.
+
+ The drawWindow() function is not shown here and not explained
+ further, but the call to drawWindow() is the entry point to a
+ hierarchy of private helper functions that execute sequences of
+ OpenGL and EGL library calls. The reader is assumed to be familiar
+ enough with the OpenGL and EGL APIs to understand the code in
+ these helper functions on his own. Besides drawWindow(), the list
+ of these helper functions includes drawQuad(), drawQuadWavyFlag(),
+ the two overloadings of drawQuad_helper() (used by drawQuad() and
+ drawQuadWacyFlag()), and setRectCoords().
+
+ Note the two different ways the window's texture can be created in
+ redrawScreen(). If the window surface is an OpenGL window surface
+ (QAhiGLWindowSurface described below), the texture is obtained
+ from the window surface directly by calling its textureId()
+ function. But when the window surface is not an OpenGL one, the
+ static function createTexture() is called with the window
+ surface's \l {QImage} {image} to copy that image into an OpenGL
+ texture. This is done with the EGL functions glTexImage2D() and
+ glTexSubImage2D(). createTexture() is another function that
+ should be understandable for exsperienced OpenGL users, so it is
+ not shown or explained further here.
+
+ The two implementations of \l {QScreen::}{createSurface()} are for
+ instantiating new window surfaces. The overloading with the widget
+ parameter is called in the client.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 14
+
+ If the parameter is an \l {QGLWidget} {OpenGL widget}, or, when it
+ isn't an OpenGL widget but its size is no bigger than 256 x 256,
+ we instantiate our subclass QAhiGLWindowSurface. Otherwise, we
+ instantiate a QWSWindowSurface. The size contraint is a
+ limitation of the OpenGL ES libraries we are using for our ATI
+ device.
+
+ Note the test at the top of the function asking if our application
+ process is the \l {QApplication::GuiServer} {server}. We only
+ create instances of QAhiGLWindowSurface if our client is in the
+ server process. This is because of an implementation restriction
+ required by the OpenGL library used in the example. They only
+ support use of OpenGL in the server process. Hence a client can
+ use the QAhiGLWindowSurface if the client is in the server
+ process.
+
+ The other overloading of createSurface() is called by the
+ server to create a window surface that will hold a copy of a
+ client side window surface.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 15
+
+ This overloading accepts a QString parameter identifying the type
+ of window surface to instantiate. QAhiGLWindowSurface is
+ instantiated if the parameter is \c ahigl. Otherwise, a normal
+ QWSWindowSurface is instantiated. The client's window surface
+ communicates its image data to the server's window surface through
+ shared memory.
+
+ The implementation of \l {QScreen::}{setMode()}, is a stub in this
+ example. It would normally reset the frame buffer's resolution.
+ Its parameters are the \e width, \e height, and the bit \e depth
+ for the frame buffer's new resolution. If you implement setMode()
+ in your screen driver, remember that it must emit a signal to warn
+ other applications to redraw their frame buffers with the new
+ resolution. There is no significance to setMode() not being
+ implemented in this example. It simply wasn't implemented.
+ However, the stub had to be included because QScreen declares
+ setMode() to be pure virtual.
+
+ Before the application exits, the server will call \l {QScreen::}
+ {shutdownDevice()} to release the hardware resources. This is also
+ done using EGL library functions.
+
+ \snippet examples/qws/ahigl/qscreenahigl_qws.cpp 9
+
+ The server will also call \l {QScreen::}{disconnect()}, but this
+ function is only a stub in this example.
+
+ \section2 The window Surface Class Implementations
+
+ QAhiGLScreen creates instances of QAhiGLWindowSurface in its two
+ createSurface() functions, and there are two constructors for
+ QAhiGLWindowSurface that correspond to these two versions of
+ createSurface(). The constructor accepting a \l {QWidget} {widget}
+ parameter is called by the client side version of createSurface(),
+ and the constructor without the \l {QWidget} {widget} parameter is
+ called by the server side version. There will be a window surface
+ constructed on the server side for each one constructed on the
+ client side.
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 1
+ \codeline
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 2
+
+ The constructors create an instance of QAhiGLWindowSurfacePrivate,
+ the private implementation class, which contains all the state
+ variables for QAhiGLWindowSurface. The client side constructor
+ also creates an instance of QWSGLPaintDevice, the OpenGL paint
+ device, for return by \l {QWSWindowSurface::} {paintDevice()}.
+ This ensures that all \l {QPainter}s used on this surface will use
+ an OpenGL enabled QPaintEngine. It is a bit of jiggery pokery,
+ which is required because \l {QWSWindowSurface::} {paintDevice()}
+ is declared pure virtual. Normally, the client side constructor
+ will be called with an \l {QGLWidget}{OpenGL widget}, which has
+ its own \l {QWidget::} {paintEngine()} function that returns the
+ global static OpenGL paint engine, but because the constructor
+ also accepts a normal \l {QWidget}{widget}, it must be able to
+ find the OpenGL paint engine in that case as well, so since \l
+ {QWSWindowSurface::} {paintDevice()} must be implemented anyway,
+ the constructor creates an instance of QWSGLPaintDevice, which can
+ always return the global static pointer to QOpenGLPaintEngine.
+
+ The OpenGL library implementation used for this example only
+ supports one OpenGL context. This context is therefore shared
+ among the single instance of QAhiGLScreen and all instances of
+ QAhiGLWindowSurface. It is passed to both constructors.
+
+ This example uses the OpenGL frame buffer object extension, which
+ allows for accelerating OpenGL painting operations. Using this
+ OpenGL extension, painting operations are performed in a frame
+ buffer object, which QAhiGLScreen later uses to construct window
+ compositions on the screen. Allocation of the frame buffer object
+ is performed in \l {QWindowSurface::} {setGeometry()}. A safer way
+ to use this extension would be to first test to see if the
+ extension is supported by your OpenGL library, and use a different
+ approach if it is not.
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 3
+
+ Since there can be several instances of the QAhiGLWindowSurface, we need
+ to make sure that the correct framebuffer object is active before painting.
+ This is done by reimplementing \l QWindowSurface::beginPaint():
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 4
+
+ Finally we need to make sure that whenever a widget grows beyond the size
+ supported by this driver (256 x 256), the surface is deleted and a new
+ standard surface is created instead. This is handled by reimplementing
+ \l QWSWindowSurface::isValid():
+
+ \snippet examples/qws/ahigl/qwindowsurface_ahigl.cpp 5
+*/
diff --git a/doc/src/examples/analogclock.qdoc b/doc/src/examples/analogclock.qdoc
new file mode 100644
index 0000000..d5f7273
--- /dev/null
+++ b/doc/src/examples/analogclock.qdoc
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/analogclock
+ \title Analog Clock Example
+
+ The Analog Clock example shows how to draw the contents of a custom
+ widget.
+
+ \image analogclock-example.png Screenshot of the Analog Clock example
+
+ This example also demonstrates how the transformation and scaling
+ features of QPainter can be used to make drawing custom widgets
+ easier.
+
+ \section1 AnalogClock Class Definition
+
+ The \c AnalogClock class provides a clock widget with hour and minute
+ hands that is automatically updated every few seconds.
+ We subclass \l QWidget and reimplement the standard
+ \l{QWidget::paintEvent()}{paintEvent()} function to draw the clock face:
+
+ \snippet examples/widgets/analogclock/analogclock.h 0
+
+ \section1 AnalogClock Class Implementation
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 1
+
+ When the widget is constructed, we set up a one-second timer to
+ keep track of the current time, and we connect it to the standard
+ \l{QWidget::update()}{update()} slot so that the clock face is
+ updated when the timer emits the \l{QTimer::timeout()}{timeout()}
+ signal.
+
+ Finally, we resize the widget so that it is displayed at a
+ reasonable size.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 8
+ \snippet examples/widgets/analogclock/analogclock.cpp 10
+
+ The \c paintEvent() function is called whenever the widget's
+ contents need to be updated. This happens when the widget is
+ first shown, and when it is covered then exposed, but it is also
+ executed when the widget's \l{QWidget::update()}{update()} slot
+ is called. Since we connected the timer's
+ \l{QTimer::timeout()}{timeout()} signal to this slot, it will be
+ called at least once every five seconds.
+
+ Before we set up the painter and draw the clock, we first define
+ two lists of \l {QPoint}s and two \l{QColor}s that will be used
+ for the hour and minute hands. The minute hand's color has an
+ alpha component of 191, meaning that it's 75% opaque.
+
+ We also determine the length of the widget's shortest side so that we
+ can fit the clock face inside the widget. It is also useful to determine
+ the current time before we start drawing.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 11
+ \snippet examples/widgets/analogclock/analogclock.cpp 12
+ \snippet examples/widgets/analogclock/analogclock.cpp 13
+ \snippet examples/widgets/analogclock/analogclock.cpp 14
+
+ The contents of custom widgets are drawn with a QPainter.
+ Painters can be used to draw on any QPaintDevice, but they are
+ usually used with widgets, so we pass the widget instance to the
+ painter's constructor.
+
+ We call QPainter::setRenderHint() with QPainter::Antialiasing to
+ turn on antialiasing. This makes drawing of diagonal lines much
+ smoother.
+
+ The translation moves the origin to the center of the widget, and
+ the scale operation ensures that the following drawing operations
+ are scaled to fit within the widget. We use a scale factor that
+ let's us use x and y coordinates between -100 and 100, and that
+ ensures that these lie within the length of the widget's shortest
+ side.
+
+ To make our code simpler, we will draw a fixed size clock face that will
+ be positioned and scaled so that it lies in the center of the widget.
+
+ The painter takes care of all the transformations made during the
+ paint event, and ensures that everything is drawn correctly. Letting
+ the painter handle transformations is often easier than performing
+ manual calculations just to draw the contents of a custom widget.
+
+ \img analogclock-viewport.png
+
+ We draw the hour hand first, using a formula that rotates the coordinate
+ system counterclockwise by a number of degrees determined by the current
+ hour and minute. This means that the hand will be shown rotated clockwise
+ by the required amount.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 15
+ \snippet examples/widgets/analogclock/analogclock.cpp 16
+
+ We set the pen to be Qt::NoPen because we don't want any outline,
+ and we use a solid brush with the color appropriate for
+ displaying hours. Brushes are used when filling in polygons and
+ other geometric shapes.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 17
+ \snippet examples/widgets/analogclock/analogclock.cpp 19
+
+ We save and restore the transformation matrix before and after the
+ rotation because we want to place the minute hand without having to
+ take into account any previous rotations.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 20
+ \codeline
+ \snippet examples/widgets/analogclock/analogclock.cpp 21
+
+ We draw markers around the edge of the clock for each hour. We
+ draw each marker then rotate the coordinate system so that the
+ painter is ready for the next one.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 22
+ \snippet examples/widgets/analogclock/analogclock.cpp 23
+
+ The minute hand is rotated in a similar way to the hour hand.
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 25
+ \codeline
+ \snippet examples/widgets/analogclock/analogclock.cpp 26
+
+ Again, we draw markers around the edge of the clock, but this
+ time to indicate minutes. We skip multiples of 5 to avoid drawing
+ minute markers on top of hour markers.
+*/
diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc
new file mode 100644
index 0000000..32e8c10
--- /dev/null
+++ b/doc/src/examples/application.qdoc
@@ -0,0 +1,410 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/application
+ \title Application Example
+
+ The Application example shows how to implement a standard GUI
+ application with menus, toolbars, and a status bar. The example
+ itself is a simple text editor program built around QTextEdit.
+
+ \image application.png Screenshot of the Application example
+
+ Nearly all of the code for the Application example is in the \c
+ MainWindow class, which inherits QMainWindow. QMainWindow
+ provides the framework for windows that have menus, toolbars,
+ dock windows, and a status bar. The application provides
+ \menu{File}, \menu{Edit}, and \menu{Help} entries in the menu
+ bar, with the following popup menus:
+
+ \image application-menus.png The Application example's menu system
+
+ The status bar at the bottom of the main window shows a
+ description of the menu item or toolbar button under the cursor.
+
+ To keep the example simple, recently opened files aren't shown in
+ the \menu{File} menu, even though this feature is desired in 90%
+ of applications. The \l{mainwindows/recentfiles}{Recent Files}
+ example shows how to implement this. Furthermore, this example
+ can only load one file at a time. The \l{mainwindows/sdi}{SDI}
+ and \l{mainwindows/mdi}{MDI} examples shows how to lift these
+ restrictions.
+
+ \section1 MainWindow Class Definition
+
+ Here's the class definition:
+
+ \snippet examples/mainwindows/application/mainwindow.h 0
+
+ The public API is restricted to the constructor. In the \c
+ protected section, we reimplement QWidget::closeEvent() to detect
+ when the user attempts to close the window, and warn the user
+ about unsaved changes. In the \c{private slots} section, we
+ declare slots that correspond to menu entries, as well as a
+ mysterious \c documentWasModified() slot. Finally, in the \c
+ private section of the class, we have various members that will
+ be explained in due time.
+
+ \section1 MainWindow Class Implementation
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 0
+
+ We start by including \c <QtGui>, a header file that contains the
+ definition of all classes in the \l QtCore and \l QtGui
+ libraries. This saves us from the trouble of having to include
+ every class individually. We also include \c mainwindow.h.
+
+ You might wonder why we don't include \c <QtGui> in \c
+ mainwindow.h and be done with it. The reason is that including
+ such a large header from another header file can rapidly degrade
+ performances. Here, it wouldn't do any harm, but it's still
+ generally a good idea to include only the header files that are
+ strictly necessary from another header file.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 1
+ \snippet examples/mainwindows/application/mainwindow.cpp 2
+
+ In the constructor, we start by creating a QTextEdit widget as a
+ child of the main window (the \c this object). Then we call
+ QMainWindow::setCentralWidget() to tell that this is going to be
+ the widget that occupies the central area of the main window,
+ between the toolbars and the status bar.
+
+ Then we call \c createActions(), \c createMenus(), \c
+ createToolBars(), and \c createStatusBar(), four private
+ functions that set up the user interface. After that, we call \c
+ readSettings() to restore the user's preferences.
+
+ We establish a signal-slot connection between the QTextEdit's
+ document object and our \c documentWasModified() slot. Whenever
+ the user modifies the text in the QTextEdit, we want to update
+ the title bar to show that the file was modified.
+
+ At the end, we set the window title using the private
+ \c setCurrentFile() function. We'll come back to this later.
+
+ \target close event handler
+ \snippet examples/mainwindows/application/mainwindow.cpp 3
+ \snippet examples/mainwindows/application/mainwindow.cpp 4
+
+ When the user attempts to close the window, we call the private
+ function \c maybeSave() to give the user the possibility to save
+ pending changes. The function returns true if the user wants the
+ application to close; otherwise, it returns false. In the first
+ case, we save the user's preferences to disk and accept the close
+ event; in the second case, we ignore the close event, meaning
+ that the application will stay up and running as if nothing
+ happened.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 5
+ \snippet examples/mainwindows/application/mainwindow.cpp 6
+
+ The \c newFile() slot is invoked when the user selects
+ \menu{File|New} from the menu. We call \c maybeSave() to save any
+ pending changes and if the user accepts to go on, we clear the
+ QTextEdit and call the private function \c setCurrentFile() to
+ update the window title and clear the
+ \l{QWidget::windowModified}{windowModified} flag.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 7
+ \snippet examples/mainwindows/application/mainwindow.cpp 8
+
+ The \c open() slot is invoked when the user clicks
+ \menu{File|Open}. We pop up a QFileDialog asking the user to
+ choose a file. If the user chooses a file (i.e., \c fileName is
+ not an empty string), we call the private function \c loadFile()
+ to actually load the file.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 9
+ \snippet examples/mainwindows/application/mainwindow.cpp 10
+
+ The \c save() slot is invoked when the user clicks
+ \menu{File|Save}. If the user hasn't provided a name for the file
+ yet, we call \c saveAs(); otherwise, we call the private function
+ \c saveFile() to actually save the file.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 11
+ \snippet examples/mainwindows/application/mainwindow.cpp 12
+
+ In \c saveAs(), we start by popping up a QFileDialog asking the
+ user to provide a name. If the user clicks \gui{Cancel}, the
+ returned file name is empty, and we do nothing.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 13
+ \snippet examples/mainwindows/application/mainwindow.cpp 14
+
+ The application's About box is done using one statement, using
+ the QMessageBox::about() static function and relying on its
+ support for an HTML subset.
+
+ The \l{QObject::tr()}{tr()} call around the literal string marks
+ the string for translation. It is a good habit to call
+ \l{QObject::tr()}{tr()} on all user-visible strings, in case you
+ later decide to translate your application to other languages.
+ The \l{Internationalization with Qt} overview convers
+ \l{QObject::tr()}{tr()} in more detail.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 15
+ \snippet examples/mainwindows/application/mainwindow.cpp 16
+
+ The \c documentWasModified() slot is invoked each time the text
+ in the QTextEdit changes because of user edits. We call
+ QWidget::setWindowModified() to make the title bar show that the
+ file was modified. How this is done varies on each platform.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 17
+ \snippet examples/mainwindows/application/mainwindow.cpp 18
+ \dots
+ \snippet examples/mainwindows/application/mainwindow.cpp 22
+
+ The \c createActions() private function, which is called from the
+ \c MainWindow constructor, creates \l{QAction}s. The code is very
+ repetitive, so we show only the actions corresponding to
+ \menu{File|New}, \menu{File|Open}, and \menu{Help|About Qt}.
+
+ A QAction is an object that represents one user action, such as
+ saving a file or invoking a dialog. An action can be put in a
+ QMenu or a QToolBar, or both, or in any other widget that
+ reimplements QWidget::actionEvent().
+
+ An action has a text that is shown in the menu, an icon, a
+ shortcut key, a tooltip, a status tip (shown in the status bar),
+ a "What's This?" text, and more. It emits a
+ \l{QAction::triggered()}{triggered()} signal whenever the user
+ invokes the action (e.g., by clicking the associated menu item or
+ toolbar button). We connect this signal to a slot that performs
+ the actual action.
+
+ The code above contains one more idiom that must be explained.
+ For some of the actions, we specify an icon as a QIcon to the
+ QAction constructor. The QIcon constructor takes the file name
+ of an image that it tries to load. Here, the file name starts
+ with \c{:}. Such file names aren't ordinary file names, but
+ rather path in the executable's stored resources. We'll come back
+ to this when we review the \c application.qrc file that's part of
+ the project.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 23
+ \snippet examples/mainwindows/application/mainwindow.cpp 24
+
+ The \gui{Edit|Cut} and \gui{Edit|Copy} actions must be available
+ only when the QTextEdit contains selected text. We disable them
+ by default and connect the QTextEdit::copyAvailable() signal to
+ the QAction::setEnabled() slot, ensuring that the actions are
+ disabled when the text editor has no selection.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 25
+ \snippet examples/mainwindows/application/mainwindow.cpp 27
+
+ Creating actions isn't sufficient to make them available to the
+ user; we must also add them to the menu system. This is what \c
+ createMenus() does. We create a \menu{File}, an \menu{Edit}, and
+ a \menu{Help} menu. QMainWindow::menuBar() lets us access the
+ window's menu bar widget. We don't have to worry about creating
+ the menu bar ourselves; the first time we call this function, the
+ QMenuBar is created.
+
+ Just before we create the \menu{Help} menu, we call
+ QMenuBar::addSeparator(). This has no effect for most widget
+ styles (e.g., Windows and Mac OS X styles), but for Motif-based
+ styles this makes sure that \menu{Help} is pushed to the right
+ side of the menu bar. Try running the application with various
+ styles and see the results:
+
+ \snippet doc/src/snippets/code/doc_src_examples_application.qdoc 0
+
+ Let's now review the toolbars:
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 30
+
+ Creating toolbars is very similar to creating menus. The same
+ actions that we put in the menus can be reused in the toolbars.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 32
+ \snippet examples/mainwindows/application/mainwindow.cpp 33
+
+ QMainWindow::statusBar() returns a pointer to the main window's
+ QStatusBar widget. Like with \l{QMainWindow::menuBar()}, the
+ widget is automatically created the first time the function is
+ called.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 34
+ \snippet examples/mainwindows/application/mainwindow.cpp 36
+
+ The \c readSettings() function is called from the constructor to
+ load the user's preferences and other application settings. The
+ QSettings class provides a high-level interface for storing
+ settings permanently on disk. On Windows, it uses the (in)famous
+ Windows registry; on Mac OS X, it uses the native XML-based
+ CFPreferences API; on Unix/X11, it uses text files.
+
+ The QSettings constructor takes arguments that identify your
+ company and the name of the product. This ensures that the
+ settings for different applications are kept separately.
+
+ We use QSettings::value() to extract the value of the "pos" and
+ "size" settings. The second argument to QSettings::value() is
+ optional and specifies a default value for the setting if there
+ exists none. This value is used the first time the application is
+ run.
+
+ When restoring the position and size of a window, it's important
+ to call QWidget::resize() before QWidget::move(). The reason why
+ is given in the \l{geometry.html}{Window Geometry} overview.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 37
+ \snippet examples/mainwindows/application/mainwindow.cpp 39
+
+ The \c writeSettings() function is called from \c closeEvent().
+ Writing settings is similar to reading them, except simpler. The
+ arguments to the QSettings constructor must be the same as in \c
+ readSettings().
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 40
+ \snippet examples/mainwindows/application/mainwindow.cpp 41
+
+ The \c maybeSave() function is called to save pending changes. If
+ there are pending changes, it pops up a QMessageBox giving the
+ user to save the document. The options are QMessageBox::Yes,
+ QMessageBox::No, and QMessageBox::Cancel. The \gui{Yes} button is
+ made the default button (the button that is invoked when the user
+ presses \key{Return}) using the QMessageBox::Default flag; the
+ \gui{Cancel} button is made the escape button (the button that is
+ invoked when the user presses \key{Esc}) using the
+ QMessageBox::Escape flag.
+
+ The \c maybeSave() function returns \c true in all cases, except
+ when the user clicks \gui{Cancel}. The caller must check the
+ return value and stop whatever it was doing if the return value
+ is \c false.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 42
+ \snippet examples/mainwindows/application/mainwindow.cpp 43
+
+ In \c loadFile(), we use QFile and QTextStream to read in the
+ data. The QFile object provides access to the bytes stored in a
+ file.
+
+ We start by opening the file in read-only mode. The QFile::Text
+ flag indicates that the file is a text file, not a binary file.
+ On Unix and Mac OS X, this makes no difference, but on Windows,
+ it ensures that the "\\r\\n" end-of-line sequence is converted to
+ "\\n" when reading.
+
+ If we successfully opened the file, we use a QTextStream object
+ to read in the data. QTextStream automatically converts the 8-bit
+ data into a Unicode QString and supports various encodings. If no
+ encoding is specified, QTextStream assumes the file is written
+ using the system's default 8-bit encoding (for example, Latin-1;
+ see QTextCodec::codecForLocale() for details).
+
+ Since the call to QTextStream::readAll() might take some time, we
+ set the cursor to be Qt::WaitCursor for the entire application
+ while it goes on.
+
+ At the end, we call the private \c setCurrentFile() function,
+ which we'll cover in a moment, and we display the string "File
+ loaded" in the status bar for 2 seconds (2000 milliseconds).
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 44
+ \snippet examples/mainwindows/application/mainwindow.cpp 45
+
+ Saving a file is very similar to loading one. Here, the
+ QFile::Text flag ensures that on Windows, "\\n" is converted into
+ "\\r\\n" to conform to the Windows convension.
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 46
+ \snippet examples/mainwindows/application/mainwindow.cpp 47
+
+ The \c setCurrentFile() function is called to reset the state of
+ a few variables when a file is loaded or saved, or when the user
+ starts editing a new file (in which case \c fileName is empty).
+ We update the \c curFile variable, clear the
+ QTextDocument::modified flag and the associated \c
+ QWidget:windowModified flag, and update the window title to
+ contain the new file name (or \c untitled.txt).
+
+ The \c strippedName() function call around \c curFile in the
+ QWidget::setWindowTitle() call shortens the file name to exclude
+ the path. Here's the function:
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 48
+ \snippet examples/mainwindows/application/mainwindow.cpp 49
+
+ \section1 The main() Function
+
+ The \c main() function for this application is typical of
+ applications that contain one main window:
+
+ \snippet examples/mainwindows/application/main.cpp 0
+
+ \section1 The Resource File
+
+ As you will probably recall, for some of the actions, we
+ specified icons with file names starting with \c{:} and mentioned
+ that such file names aren't ordinary file names, but path in the
+ executable's stored resources. These resources are compiled
+
+ The resources associated with an application are specified in a
+ \c .qrc file, an XML-based file format that lists files on the
+ disk. Here's the \c application.qrc file that's used by the
+ Application example:
+
+ \quotefile mainwindows/application/application.qrc
+
+ The \c .png files listed in the \c application.qrc file are files
+ that are part of the Application example's source tree. Paths are
+ relative to the directory where the \c application.qrc file is
+ located (the \c mainwindows/application directory).
+
+ The resource file must be mentioned in the \c application.pro
+ file so that \c qmake knows about it:
+
+ \snippet examples/mainwindows/application/application.pro 0
+
+ \c qmake will produce make rules to generate a file called \c
+ qrc_application.cpp that is linked into the application. This
+ file contains all the data for the images and other resources as
+ static C++ arrays of compressed binary data. See
+ \l{resources.html}{The Qt Resource System} for more information
+ about resources.
+*/
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
new file mode 100644
index 0000000..76b753b
--- /dev/null
+++ b/doc/src/examples/arrowpad.qdoc
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/arrowpad
+ \title Arrow Pad Example
+
+ This example is a slightly more involved and introduces a key \e
+ {Qt Linguist} concept: "contexts". It also shows how to use two
+ or more languages.
+
+ \image linguist-arrowpad_en.png
+
+ We will use two translations, French and Dutch, although there is no
+ effective limit on the number of possible translations that can be used
+ with an application. The relevant lines of \c arrowpad.pro are
+
+ \snippet examples/linguist/arrowpad/arrowpad.pro 0
+ \codeline
+ \snippet examples/linguist/arrowpad/arrowpad.pro 1
+
+ Run \c lupdate; it should produce two identical message files
+ \c arrowpad_fr.ts and \c arrowpad_nl.ts. These files will contain all the source
+ texts marked for translation with \c tr() calls and their contexts.
+
+ See the \l{Qt Linguist manual} for more information about
+ translating Qt application.
+
+ \section1 Line by Line Walkthrough
+
+ In \c arrowpad.h we define the \c ArrowPad subclass which is a
+ subclass of QWidget. In the screenshot above, the central
+ widget with the four buttons is an \c ArrowPad.
+
+ \snippet examples/linguist/arrowpad/arrowpad.h 0
+ \snippet examples/linguist/arrowpad/arrowpad.h 1
+ \snippet examples/linguist/arrowpad/arrowpad.h 2
+
+ When \c lupdate is run it not only extracts the source texts but it
+ also groups them into contexts. A context is the name of the class in
+ which the source text appears. Thus, in this example, "ArrowPad" is a
+ context: it is the context of the texts in the \c ArrowPad class.
+ The \c Q_OBJECT macro defines \c tr(x) in \c ArrowPad like this:
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+
+ Knowing which class each source text appears in enables \e {Qt
+ Linguist} to group texts that are logically related together, e.g.
+ all the text in a dialog will have the context of the dialog's class
+ name and will be shown together. This provides useful information for
+ the translator since the context in which text appears may influence how
+ it should be translated. For some translations keyboard
+ accelerators may need to be changed and having all the source texts in a
+ particular context (class) grouped together makes it easier for the
+ translator to perform any accelerator changes without introducing
+ conflicts.
+
+ In \c arrowpad.cpp we implement the \c ArrowPad class.
+
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 0
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 1
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 2
+ \snippet examples/linguist/arrowpad/arrowpad.cpp 3
+
+ We call \c ArrowPad::tr() for each button's label since the labels are
+ user-visible text.
+
+ \image linguist-arrowpad_en.png
+
+ \snippet examples/linguist/arrowpad/mainwindow.h 0
+ \snippet examples/linguist/arrowpad/mainwindow.h 1
+
+ In the screenshot above, the whole window is a \c MainWindow.
+ This is defined in the \c mainwindow.h header file. Here too, we
+ use \c Q_OBJECT, so that \c MainWindow will become a context in
+ \e {Qt Linguist}.
+
+ \snippet examples/linguist/arrowpad/mainwindow.cpp 0
+
+ In the implementation of \c MainWindow, \c mainwindow.cpp, we create
+ an instance of our \c ArrowPad class.
+
+ \snippet examples/linguist/arrowpad/mainwindow.cpp 1
+
+ We also call \c MainWindow::tr() twice, once for the action and
+ once for the shortcut.
+
+ Note the use of \c tr() to support different keys in other
+ languages. "Ctrl+Q" is a good choice for Quit in English, but a
+ Dutch translator might want to use "Ctrl+A" (for Afsluiten) and a
+ German translator "Strg+E" (for Beenden). When using \c tr() for
+ \key Ctrl key accelerators, the two argument form should be used
+ with the second argument describing the function that the
+ accelerator performs.
+
+ Our \c main() function is defined in \c main.cpp as usual.
+
+ \snippet examples/linguist/arrowpad/main.cpp 2
+ \snippet examples/linguist/arrowpad/main.cpp 3
+
+ We choose which translation to use according to the current locale.
+ QLocale::system() can be influenced by setting the \c LANG
+ environment variable, for example. Notice that the use of a naming
+ convention that incorporates the locale for \c .qm message files,
+ (and \c .ts files), makes it easy to implement choosing the
+ translation file according to locale.
+
+ If there is no \c .qm message file for the locale chosen the original
+ source text will be used and no error raised.
+
+ \section1 Translating to French and Dutch
+
+ We'll begin by translating the example application into French. Start
+ \e {Qt Linguist} with \c arrowpad_fr.ts. You should get the seven source
+ texts ("\&Up", "\&Left", etc.) grouped in two contexts ("ArrowPad"
+ and "MainWindow").
+
+ Now, enter the following translations:
+
+ \list
+ \o \c ArrowPad
+ \list
+ \o \&Up - \&Haut
+ \o \&Left - \&Gauche
+ \o \&Right - \&Droite
+ \o \&Down - \&Bas
+ \endlist
+ \o \c MainWindow
+ \list
+ \o E\&xit - \&Quitter
+ \o Ctrl+Q - Ctrl+Q
+ \o \&File - \&Fichier
+ \endlist
+ \endlist
+
+ It's quickest to press \key{Alt+D} (which clicks the \gui {Done \& Next}
+ button) after typing each translation, since this marks the
+ translation as done and moves on to the next source text.
+
+ Save the file and do the same for Dutch working with \c arrowpad_nl.ts:
+
+ \list
+ \o \c ArrowPad
+ \list
+ \o \&Up - \&Omhoog
+ \o \&Left - \&Links
+ \o \&Right - \&Rechts
+ \o \&Down - Omlaa\&g
+ \endlist
+ \o \c MainWindow
+ \list
+ \o E\&xit - \&Afsluiten
+ \o Ctrl+Q - Ctrl+A
+ \o File - \&Bestand
+ \endlist
+ \endlist
+
+ We have to convert the \c tt1_fr.ts and \c tt1_nl.ts translation source
+ files into \c .qm files. We could use \e {Qt Linguist} as we've done
+ before; however using the command line tool \c lrelease ensures that
+ \e all the \c .qm files for the application are created without us
+ having to remember to load and \gui File|Release each one
+ individually from \e {Qt Linguist}.
+
+ Type
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 1
+
+ This should create both \c arrowpad_fr.qm and \c arrowpad_nl.qm. Set the \c
+ LANG environment variable to \c fr. In Unix, one of the two following
+ commands should work
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 2
+
+ In Windows, either modify \c autoexec.bat or run
+
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 3
+
+ When you run the program, you should now see the French version:
+
+ \image linguist-arrowpad_fr.png
+
+ Try the same with Dutch, by setting \c LANG=nl. Now the Dutch
+ version should appear:
+
+ \image linguist-arrowpad_nl.png
+
+ \section1 Exercises
+
+ Mark one of the translations in \e {Qt Linguist} as not done, i.e.
+ by unchecking the "done" checkbox; run \c lupdate, then \c lrelease,
+ then the example. What effect did this change have?
+
+ Set \c LANG=fr_CA (French Canada) and run the example program again.
+ Explain why the result is the same as with \c LANG=fr.
+
+ Change one of the accelerators in the Dutch translation to eliminate the
+ conflict between \e \&Bestand and \e \&Boven.
+*/
diff --git a/doc/src/examples/basicdrawing.qdoc b/doc/src/examples/basicdrawing.qdoc
new file mode 100644
index 0000000..5297201
--- /dev/null
+++ b/doc/src/examples/basicdrawing.qdoc
@@ -0,0 +1,468 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/basicdrawing
+ \title Basic Drawing Example
+
+ The Basic Drawing example shows how to display basic graphics
+ primitives in a variety of styles using the QPainter class.
+
+ QPainter performs low-level painting on widgets and other paint
+ devices. The class can draw everything from simple lines to
+ complex shapes like pies and chords. It can also draw aligned text
+ and pixmaps. Normally, it draws in a "natural" coordinate system,
+ but it can in addition do view and world transformation.
+
+ \image basicdrawing-example.png
+
+ The example provides a render area, displaying the currently
+ active shape, and lets the user manipulate the rendered shape and
+ its appearance using the QPainter parameters: The user can change
+ the active shape (\gui Shape), and modify the QPainter's pen (\gui
+ {Pen Width}, \gui {Pen Style}, \gui {Pen Cap}, \gui {Pen Join}),
+ brush (\gui {Brush Style}) and render hints (\gui
+ Antialiasing). In addition the user can rotate a shape (\gui
+ Transformations); behind the scenes we use QPainter's ability to
+ manipulate the coordinate system to perform the rotation.
+
+ The Basic Drawing example consists of two classes:
+
+ \list
+ \o \c RenderArea is a custom widget that renders multiple
+ copies of the currently active shape.
+ \o \c Window is the application's main window displaying a
+ \c RenderArea widget in addition to several parameter widgets.
+ \endlist
+
+ First we will review the \c Window class, then we will take a
+ look at the \c RenderArea class.
+
+ \section1 Window Class Definition
+
+ The Window class inherits QWidget, and is the application's main
+ window displaying a \c RenderArea widget in addition to several
+ parameter widgets.
+
+ \snippet examples/painting/basicdrawing/window.h 0
+
+ We declare the various widgets, and three private slots updating
+ the \c RenderArea widget: The \c shapeChanged() slot updates the
+ \c RenderArea widget when the user changes the currently active
+ shape. We call the \c penChanged() slot when either of the
+ QPainter's pen parameters changes. And the \c brushChanged() slot
+ updates the \c RenderArea widget when the user changes the
+ painter's brush style.
+
+ \section1 Window Class Implementation
+
+ In the constructor we create and initialize the various widgets
+ appearing in the main application window.
+
+ \snippet examples/painting/basicdrawing/window.cpp 1
+
+ First we create the \c RenderArea widget that will render the
+ currently active shape. Then we create the \gui Shape combobox,
+ and add the associated items (i.e. the different shapes a QPainter
+ can draw).
+
+ \snippet examples/painting/basicdrawing/window.cpp 2
+
+ QPainter's pen is a QPen object; the QPen class defines how a
+ painter should draw lines and outlines of shapes. A pen has
+ several properties: Width, style, cap and join.
+
+ A pen's width can be \e zero or greater, but the most common width
+ is zero. Note that this doesn't mean 0 pixels, but implies that
+ the shape is drawn as smoothly as possible although perhaps not
+ mathematically correct.
+
+ We create a QSpinBox for the \gui {Pen Width} parameter.
+
+ \snippet examples/painting/basicdrawing/window.cpp 3
+
+ The pen style defines the line type. The default style is solid
+ (Qt::SolidLine). Setting the style to none (Qt::NoPen) tells the
+ painter to not draw lines or outlines. The pen cap defines how
+ the end points of lines are drawn. And the pen join defines how
+ two lines join when multiple connected lines are drawn. The cap
+ and join only apply to lines with a width of 1 pixel or greater.
+
+ We create \l {QComboBox}es for each of the \gui {Pen Style}, \gui
+ {Pen Cap} and \gui {Pen Join} parameters, and adds the associated
+ items (i.e the values of the Qt::PenStyle, Qt::PenCapStyle and
+ Qt::PenJoinStyle enums respectively).
+
+ \snippet examples/painting/basicdrawing/window.cpp 4
+
+ The QBrush class defines the fill pattern of shapes drawn by a
+ QPainter. The default brush style is Qt::NoBrush. This style tells
+ the painter to not fill shapes. The standard style for filling is
+ Qt::SolidPattern.
+
+ We create a QComboBox for the \gui {Brush Style} parameter, and add
+ the associated items (i.e. the values of the Qt::BrushStyle enum).
+
+ \snippet examples/painting/basicdrawing/window.cpp 5
+ \snippet examples/painting/basicdrawing/window.cpp 6
+
+ Antialiasing is a feature that "smoothes" the pixels to create
+ more even and less jagged lines, and can be applied using
+ QPainter's render hints. QPainter::RenderHints are used to specify
+ flags to QPainter that may or may not be respected by any given
+ engine.
+
+ We simply create a QCheckBox for the \gui Antialiasing option.
+
+ \snippet examples/painting/basicdrawing/window.cpp 7
+
+ The \gui Transformations option implies a manipulation of the
+ coordinate system that will appear as if the rendered shape is
+ rotated in three dimensions.
+
+ We use the QPainter::translate(), QPainter::rotate() and
+ QPainter::scale() functions to implement this feature represented
+ in the main application window by a simple QCheckBox.
+
+ \snippet examples/painting/basicdrawing/window.cpp 8
+
+ Then we connect the parameter widgets with their associated slots
+ using the static QObject::connect() function, ensuring that the \c
+ RenderArea widget is updated whenever the user changes the shape,
+ or any of the other parameters.
+
+ \snippet examples/painting/basicdrawing/window.cpp 9
+ \snippet examples/painting/basicdrawing/window.cpp 10
+
+ Finally, we add the various widgets to a layout, and call the \c
+ shapeChanged(), \c penChanged(), and \c brushChanged() slots to
+ initialize the application. We also turn on antialiasing.
+
+ \snippet examples/painting/basicdrawing/window.cpp 11
+
+ The \c shapeChanged() slot is called whenever the user changes the
+ currently active shape.
+
+ First we retrieve the shape the user has chosen using the
+ QComboBox::itemData() function. This function returns the data for
+ the given role in the given index in the combobox. We use
+ QComboBox::currentIndex() to retrieve the index of the shape, and
+ the role is defined by the Qt::ItemDataRole enum; \c IdRole is an
+ alias for Qt::UserRole.
+
+ Note that Qt::UserRole is only the first role that can be used for
+ application-specific purposes. If you need to store different data
+ in the same index, you can use different roles by simply
+ incrementing the value of Qt::UserRole, for example: 'Qt::UserRole
+ + 1' and 'Qt::UserRole + 2'. However, it is a good programming
+ practice to give each role their own name: 'myFirstRole =
+ Qt::UserRole + 1' and 'mySecondRole = Qt::UserRole + 2'. Even
+ though we only need a single role in this particular example, we
+ add the following line of code to the beginning of the \c
+ window.cpp file.
+
+ \snippet examples/painting/basicdrawing/window.cpp 0
+
+ The QComboBox::itemData() function returns the data as a QVariant,
+ so we need to cast the data to \c RenderArea::Shape. If there is
+ no data for the given role, the function returns
+ QVariant::Invalid.
+
+ In the end we call the \c RenderArea::setShape() slot to update
+ the \c RenderArea widget.
+
+ \snippet examples/painting/basicdrawing/window.cpp 12
+
+ We call the \c penChanged() slot whenever the user changes any of
+ the pen parameters. Again we use the QComboBox::itemData()
+ function to retrieve the parameters, and then we call the \c
+ RenderArea::setPen() slot to update the \c RenderArea widget.
+
+ \snippet examples/painting/basicdrawing/window.cpp 13
+
+ The brushChanged() slot is called whenever the user changes the
+ brush parameter which we retrieve using the QComboBox::itemData()
+ function as before.
+
+ \snippet examples/painting/basicdrawing/window.cpp 14
+
+ If the brush parameter is a gradient fill, special actions are
+ required.
+
+ The QGradient class is used in combination with QBrush to specify
+ gradient fills. Qt currently supports three types of gradient
+ fills: linear, radial and conical. Each of these is represented by
+ a subclass of QGradient: QLinearGradient, QRadialGradient and
+ QConicalGradient.
+
+ So if the brush style is Qt::LinearGradientPattern, we first
+ create a QLinearGradient object with interpolation area between
+ the coordinates passed as arguments to the constructor. The
+ positions are specified using logical coordinates. Then we set the
+ gradient's colors using the QGradient::setColorAt() function. The
+ colors is defined using stop points which are composed by a
+ position (between 0 and 1) and a QColor. The set of stop points
+ describes how the gradient area should be filled. A gradient can
+ have an arbitrary number of stop points.
+
+ In the end we call \c RenderArea::setBrush() slot to update the \c
+ RenderArea widget's brush with the QLinearGradient object.
+
+ \snippet examples/painting/basicdrawing/window.cpp 15
+
+ A similar pattern of actions, as the one used for QLinearGradient,
+ is used in the cases of Qt::RadialGradientPattern and
+ Qt::ConicalGradientPattern.
+
+ The only difference is the arguments passed to the constructor:
+ Regarding the QRadialGradient constructor the first argument is
+ the center, and the second the radial gradient's radius. The third
+ argument is optional, but can be used to define the focal point of
+ the gradient inside the circle (the default focal point is the
+ circle center). Regarding the QConicalGradient constructor, the
+ first argument specifies the center of the conical, and the second
+ specifies the start angle of the interpolation.
+
+ \snippet examples/painting/basicdrawing/window.cpp 16
+
+ If the brush style is Qt::TexturePattern we create a QBrush from a
+ QPixmap. Then we call \c RenderArea::setBrush() slot to update the
+ \c RenderArea widget with the newly created brush.
+
+ \snippet examples/painting/basicdrawing/window.cpp 17
+
+ Otherwise we simply create a brush with the given style and a
+ green color, and then call \c RenderArea::setBrush() slot to
+ update the \c RenderArea widget with the newly created brush.
+
+ \section1 RenderArea Class Definition
+
+ The \c RenderArea class inherits QWidget, and renders multiple
+ copies of the currently active shape using a QPainter.
+
+ \snippet examples/painting/basicdrawing/renderarea.h 0
+
+ First we define a public \c Shape enum to hold the different
+ shapes that can be rendered by the widget (i.e the shapes that can
+ be rendered by a QPainter). Then we reimplement the constructor as
+ well as two of QWidget's public functions: \l
+ {QWidget::minimumSizeHint()}{minimumSizeHint()} and \l
+ {QWidget::sizeHint()}{sizeHint()}.
+
+ We also reimplement the QWidget::paintEvent() function to be able
+ to draw the currently active shape according to the specified
+ parameters.
+
+ We declare several private slots: The \c setShape() slot changes
+ the \c RenderArea's shape, the \c setPen() and \c setBrush() slots
+ modify the widget's pen and brush, and the \c setAntialiased() and
+ \c setTransformed() slots modify the widget's respective
+ properties.
+
+ \section1 RenderArea Class Implementation
+
+ In the constructor we initialize some of the widget's variables.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 0
+
+ We set its shape to be a \gui Polygon, its antialiased property to
+ be false and we load an image into the widget's pixmap
+ variable. In the end we set the widget's background role, defining
+ the brush from the widget's \l {QWidget::palette}{palette} that
+ will be used to render the background. QPalette::Base is typically
+ white.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 2
+
+ The \c RenderArea inherits QWidget's \l
+ {QWidget::sizeHint()}{sizeHint} property holding the recommended
+ size for the widget. If the value of this property is an invalid
+ size, no size is recommended.
+
+ The default implementation of the QWidget::sizeHint() function
+ returns an invalid size if there is no layout for the widget, and
+ returns the layout's preferred size otherwise.
+
+ Our reimplementation of the function returns a QSize with a 400
+ pixels width and a 200 pixels height.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 1
+
+ \c RenderArea also inherits QWidget's
+ \l{QWidget::minimumSizeHint()}{minimumSizeHint} property holding
+ the recommended minimum size for the widget. Again, if the value
+ of this property is an invalid size, no size is recommended.
+
+ The default implementation of QWidget::minimumSizeHint() returns
+ an invalid size if there is no layout for the widget, and returns
+ the layout's minimum size otherwise.
+
+ Our reimplementation of the function returns a QSize with a 100
+ pixels width and a 100 pixels height.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 3
+ \codeline
+ \snippet examples/painting/basicdrawing/renderarea.cpp 4
+ \codeline
+ \snippet examples/painting/basicdrawing/renderarea.cpp 5
+
+ The public \c setShape(), \c setPen() and \c setBrush() slots are
+ called whenever we want to modify a \c RenderArea widget's shape,
+ pen or brush. We set the shape, pen or brush according to the
+ slot parameter, and call QWidget::update() to make the changes
+ visible in the \c RenderArea widget.
+
+ The QWidget::update() slot does not cause an immediate
+ repaint; instead it schedules a paint event for processing when Qt
+ returns to the main event loop.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 6
+ \codeline
+ \snippet examples/painting/basicdrawing/renderarea.cpp 7
+
+ With the \c setAntialiased() and \c setTransformed() slots we
+ change the state of the properties according to the slot
+ parameter, and call the QWidget::update() slot to make the changes
+ visible in the \c RenderArea widget.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 8
+
+ Then we reimplement the QWidget::paintEvent() function. The first
+ thing we do is to create the graphical objects we will need to
+ draw the various shapes.
+
+ We create a vector of four \l {QPoint}s. We use this vector to
+ render the \gui Points, \gui Polyline and \gui Polygon
+ shapes. Then we create a QRect, defining a rectangle in the plane,
+ which we use as the bounding rectangle for all the shapes excluding
+ the \gui Path and the \gui Pixmap.
+
+ We also create a QPainterPath. The QPainterPath class provides a
+ container for painting operations, enabling graphical shapes to be
+ constructed and reused. A painter path is an object composed of a
+ number of graphical building blocks, such as rectangles, ellipses,
+ lines, and curves. For more information about the QPainterPath
+ class, see the \l {painting/painterpaths}{Painter Paths}
+ example. In this example, we create a painter path composed of one
+ straight line and a Bezier curve.
+
+ In addition we define a start angle and an arc length that we will
+ use when drawing the \gui Arc, \gui Chord and \gui Pie shapes.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 9
+
+ We create a QPainter for the \c RenderArea widget, and set the
+ painters pen and brush according to the \c RenderArea's pen and
+ brush. If the \gui Antialiasing parameter option is checked, we
+ also set the painter's render hints. QPainter::Antialiasing
+ indicates that the engine should antialias edges of primitives if
+ possible.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 10
+
+ Finally, we render the multiple copies of the \c RenderArea's
+ shape. The number of copies is depending on the size of the \c
+ RenderArea widget, and we calculate their positions using two \c
+ for loops and the widgets height and width.
+
+ For each copy we first save the current painter state (pushes the
+ state onto a stack). Then we translate the coordinate system,
+ using the QPainter::translate() function, to the position
+ determined by the variables of the \c for loops. If we omit this
+ translation of the coordinate system all the copies of the shape
+ will be rendered on top of each other in the top left cormer of
+ the \c RenderArea widget.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 11
+
+ If the \gui Transformations parameter option is checked, we do an
+ additional translation of the coordinate system before we rotate
+ the coordinate system 60 degrees clockwise using the
+ QPainter::rotate() function and scale it down in size using the
+ QPainter::scale() function. In the end we translate the coordinate
+ system back to where it was before we rotated and scaled it.
+
+ Now, when rendering the shape, it will appear as if it was rotated
+ in three dimensions.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 12
+
+ Next, we identify the \c RenderArea's shape, and render it using
+ the associated QPainter drawing function:
+
+ \list
+ \o QPainter::drawLine(),
+ \o QPainter::drawPoints(),
+ \o QPainter::drawPolyline(),
+ \o QPainter::drawPolygon(),
+ \o QPainter::drawRect(),
+ \o QPainter::drawRoundedRect(),
+ \o QPainter::drawEllipse(),
+ \o QPainter::drawArc(),
+ \o QPainter::drawChord(),
+ \o QPainter::drawPie(),
+ \o QPainter::drawPath(),
+ \o QPainter::drawText() or
+ \o QPainter::drawPixmap()
+ \endlist
+
+ Before we started rendering, we saved the current painter state
+ (pushes the state onto a stack). The rationale for this is that we
+ calculate each shape copy's position relative to the same point in
+ the coordinate system. When translating the coordinate system, we
+ lose the knowledge of this point unless we save the current
+ painter state \e before we start the translating process.
+
+ \snippet examples/painting/basicdrawing/renderarea.cpp 13
+
+ Then, when we are finished rendering a copy of the shape we can
+ restore the original painter state, with its associated coordinate
+ system, using the QPainter::restore() function. In this way we
+ ensure that the next shape copy will be rendered in the correct
+ position.
+
+ We could translate the coordinate system back using
+ QPainter::translate() instead of saving the painter state. But
+ since we in addition to translating the coordinate system (when
+ the \gui Transformation parameter option is checked) both rotate
+ and scale the coordinate system, the easiest solution is to save
+ the current painter state.
+*/
diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc
new file mode 100644
index 0000000..92571af
--- /dev/null
+++ b/doc/src/examples/basicgraphicslayouts.qdoc
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/basicgraphicslayouts
+ \title Basic Graphics Layouts Example
+
+ The Basic Graphics Layouts example shows how to use the layout classes
+ in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
+
+ \image basicgraphicslayouts-example.png Screenshot of the Basic Layouts Example
+
+ \section1 Window Class Definition
+
+ The \c Window class is a subclass of QGraphicsWidget. It has a
+ constructor with a QGraphicsWidget \a parent as its parameter.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/window.h 0
+
+ \section1 Window Class Implementation
+
+ The constructor of \c Window instantiates a QGraphicsLinearLayout object,
+ \c windowLayout, with vertical orientation. We instantiate another
+ QGraphicsLinearLayout object, \c linear, whose parent is \c windowLayout.
+ Next, we create a \c LayoutItem object, \c item and add it to \c linear
+ with the \l{QGraphicsLinearLayout::}{addItem()} function. We also provide
+ \c item with a \l{QGraphicsLinearLayout::setStretchFactor()}
+ {stretchFactor}.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/window.cpp 0
+
+ We repeat the process:
+
+ \list
+ \o create a new \c LayoutItem,
+ \o add the item \c linear, and
+ \o provide a stretch factor.
+ \endlist
+
+ \snippet examples/graphicsview/basicgraphicslayouts/window.cpp 1
+
+ We then add \c linear to \c windowLayout, nesting two
+ QGraphicsLinearLayout objects. Apart from the QGraphicsLinearLayout, we
+ also use a QGraphicsGridLayout object, \c grid, which is a 4x3 grid with
+ some cells spanning to other rows.
+
+ We create seven \c LayoutItem objects and place them into \c grid with
+ the \l{QGraphicsGridLayout::}{addItem()} function as shown in the code
+ snippet below:
+
+ \snippet examples/graphicsview/basicgraphicslayouts/window.cpp 2
+
+ The first item we add to \c grid is placed in the top left cell,
+ spanning four rows. The next two items are placed in the second column,
+ and they span two rows. Each item's \l{QGraphicsWidget::}{maximumHeight()}
+ and \l{QGraphicsWidget::}{minimumHeight()} are set to be equal so that
+ they do not expand vertically. As a result, these items will not
+ fit vertically in their cells. So, we specify that they should be
+ vertically aligned in the center of the cell using Qt::AlignVCenter.
+
+ Finally, \c grid itself is added to \c windowLayout. Unlike
+ QGridLayout::addItem(), QGraphicsGridLayout::addItem() requires a row
+ and a column for its argument, specifying which cell the item should be
+ positioned in. Also, if the \c rowSpan and \c columnSpan arguments
+ are omitted, they will default to 1.
+
+ Note that we do not specify a parent for each \c LayoutItem that we
+ construct, as all these items will be added to \c windowLayout. When we
+ add an item to a layout, it will be automatically reparented to the widget
+ on which the layout is installed.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/window.cpp 3
+
+ Now that we have set up \c grid and added it to \c windowLayout, we
+ install \c windowLayout onto the window object using
+ QGraphicsWidget::setLayout() and we set the window title.
+
+ \section1 LayoutItem Class Definition
+
+ The \c LayoutItem class is a subclass of QGraphicsWidget. It has a
+ constructor, a destructor, and a reimplementation of the
+ {QGraphicsItem::paint()}{paint()} function.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.h 0
+
+ The \c LayoutItem class also has a private instance of QPixmap, \c pix.
+
+ \note We subclass QGraphicsWidget so that \c LayoutItem objects can
+ be automatically plugged into a layout, as QGraphicsWidget is a
+ specialization of QGraphicsLayoutItem.
+
+ \section1 LayoutItem Class Implementation
+
+ In \c{LayoutItem}'s constructor, \c pix is instantiated and the
+ \c{QT_original_R.png} image is loaded into it. We set the size of
+ \c LayoutItem to be slightly larger than the size of the pixmap as we
+ require some space around it for borders that we will paint later.
+ Alternatively, you could scale the pixmap to prevent the item from
+ becoming smaller than the pixmap.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 0
+
+ We use the Q_UNUSED() macro to prevent the compiler from generating
+ warnings regarding unused parameters.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 1
+
+ The idea behind the \c paint() function is to paint the
+ background rect then paint a rect around the pixmap.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 2
+
+*/ \ No newline at end of file
diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc
new file mode 100644
index 0000000..0d64b1f
--- /dev/null
+++ b/doc/src/examples/basiclayouts.qdoc
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example layouts/basiclayouts
+ \title Basic Layouts Example
+
+ The Basic Layouts example shows how to use the standard layout
+ managers that are available in Qt: QBoxLayout, QGridLayout and
+ QFormLayout.
+
+ \image basiclayouts-example.png Screenshot of the Basic Layouts example
+
+ The QBoxLayout class lines up widgets horizontally or vertically.
+ QHBoxLayout and QVBoxLayout are convenience subclasses of QBoxLayout.
+ QGridLayout lays out widgets in cells by dividing the available space
+ into rows and columns. QFormLayout, on the other hand, lays out its
+ children in a two-column form with labels in the left column and
+ input fields in the right column.
+
+ \section1 Dialog Class Definition
+
+ \snippet examples/layouts/basiclayouts/dialog.h 0
+
+ The \c Dialog class inherits QDialog. It is a custom widget that
+ displays its child widgets using the geometry managers:
+ QHBoxLayout, QVBoxLayout, QGridLayout and QFormLayout.
+
+ We declare four private functions to simplify the class
+ constructor: The \c createMenu(), \c createHorizontalGroupBox(),
+ \c createGridGroupBox() and \c createFormGroupBox() functions create
+ several widgets that the example uses to demonstrate how the layout
+ affects their appearances.
+
+ \section1 Dialog Class Implementation
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 0
+
+ In the constructor, we first use the \c createMenu() function to
+ create and populate a menu bar and the \c createHorizontalGroupBox()
+ function to create a group box containing four buttons with a
+ horizontal layout. Next we use the \c createGridGroupBox() function
+ to create a group box containing several line edits and a small text
+ editor which are displayed in a grid layout. Finally, we use the
+ \c createFormGroupBox() function to createa a group box with
+ three labels and three input fields: a line edit, a combo box and
+ a spin box.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 1
+
+ We also create a big text editor and a dialog button box. The
+ QDialogButtonBox class is a widget that presents buttons in a
+ layout that is appropriate to the current widget style. The
+ preferred buttons can be specified as arguments to the
+ constructor, using the QDialogButtonBox::StandardButtons enum.
+
+ Note that we don't have to specify a parent for the widgets when
+ we create them. The reason is that all the widgets we create here
+ will be added to a layout, and when we add a widget to a layout,
+ it is automatically reparented to the widget the layout is
+ installed on.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 2
+
+ The main layout is a QVBoxLayout object. QVBoxLayout is a
+ convenience class for a box layout with vertical orientation.
+
+ In general, the QBoxLayout class takes the space it gets (from its
+ parent layout or from the parent widget), divides it up into a
+ series of boxes, and makes each managed widget fill one box. If
+ the QBoxLayout's orientation is Qt::Horizontal the boxes are
+ placed in a row. If the orientation is Qt::Vertical, the boxes are
+ placed in a column. The corresponding convenience classes are
+ QHBoxLayout and QVBoxLayout, respectively.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 3
+
+ When we call the QLayout::setMenuBar() function, the layout places
+ the provided menu bar at the top of the parent widget, and outside
+ the widget's \l {QWidget::contentsRect()}{content margins}. All
+ child widgets are placed below the bottom edge of the menu bar.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 4
+
+ We use the QBoxLayout::addWidget() function to add the widgets to
+ the end of layout. Each widget will get at least its minimum size
+ and at most its maximum size. It is possible to specify a stretch
+ factor in the \l {QBoxLayout::addWidget()}{addWidget()} function,
+ and any excess space is shared according to these stretch
+ factors. If not specified, a widget's stretch factor is 0.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 5
+
+ We install the main layout on the \c Dialog widget using the
+ QWidget::setLayout() function, and all of the layout's widgets are
+ automatically reparented to be children of the \c Dialog widget.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 6
+
+ In the private \c createMenu() function we create a menu bar, and
+ add a pull-down \gui File menu containing an \gui Exit option.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 7
+
+ When we create the horizontal group box, we use a QHBoxLayout as
+ the internal layout. We create the buttons we want to put in the
+ group box, add them to the layout and install the layout on the
+ group box.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 8
+
+ In the \c createGridGroupBox() function we use a QGridLayout which
+ lays out widgets in a grid. It takes the space made available to
+ it (by its parent layout or by the parent widget), divides it up
+ into rows and columns, and puts each widget it manages into the
+ correct cell.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 9
+
+ For each row in the grid we create a label and an associated line
+ edit, and add them to the layout. The QGridLayout::addWidget()
+ function differ from the corresponding function in QBoxLayout: It
+ needs the row and column specifying the grid cell to put the
+ widget in.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 10
+
+ QGridLayout::addWidget() can in addition take arguments
+ specifying the number of rows and columns the cell will be
+ spanning. In this example, we create a small editor which spans
+ three rows and one column.
+
+ For both the QBoxLayout::addWidget() and QGridLayout::addWidget()
+ functions it is also possible to add a last argument specifying
+ the widget's alignment. By default it fills the whole cell. But we
+ could, for example, align a widget with the right edge by
+ specifying the alignment to be Qt::AlignRight.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 11
+
+ Each column in a grid layout has a stretch factor. The stretch
+ factor is set using QGridLayout::setColumnStretch() and determines
+ how much of the available space the column will get over and above
+ its necessary minimum.
+
+ In this example, we set the stretch factors for columns 1 and 2.
+ The stretch factor is relative to the other columns in this grid;
+ columns with a higher stretch factor take more of the available
+ space. So column 2 in our grid layout will get more of the
+ available space than column 1, and column 0 will not grow at all
+ since its stretch factor is 0 (the default).
+
+ Columns and rows behave identically; there is an equivalent
+ stretch factor for rows, as well as a QGridLayout::setRowStretch()
+ function.
+
+ \snippet examples/layouts/basiclayouts/dialog.cpp 12
+
+ In the \c createFormGroupBox() function, we use a QFormLayout
+ to neatly arrange objects into two columns - name and field.
+ There are three QLabel objects for names with three
+ corresponding input widgets as fields: a QLineEdit, a QComboBox
+ and a QSpinBox. Unlike QBoxLayout::addWidget() and
+ QGridLayout::addWidget(), we use QFormLayout::addRow() to add widgets
+ to the layout.
+*/
diff --git a/doc/src/examples/basicsortfiltermodel.qdoc b/doc/src/examples/basicsortfiltermodel.qdoc
new file mode 100644
index 0000000..557729a
--- /dev/null
+++ b/doc/src/examples/basicsortfiltermodel.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/basicsortfiltermodel
+ \title Basic Sort/Filter Model Example
+
+ The Basic Sort/Filter Model example illustrates how to use
+ QSortFilterProxyModel to perform basic sorting and filtering.
+
+ \image basicsortfiltermodel-example.png Screenshot of the Basic Sort/Filter Model Example
+
+*/
diff --git a/doc/src/examples/blockingfortuneclient.qdoc b/doc/src/examples/blockingfortuneclient.qdoc
new file mode 100644
index 0000000..5c9dbe1
--- /dev/null
+++ b/doc/src/examples/blockingfortuneclient.qdoc
@@ -0,0 +1,230 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/blockingfortuneclient
+ \title Blocking Fortune Client Example
+
+ The Blocking Fortune Client example shows how to create a client for a
+ network service using QTcpSocket's synchronous API in a non-GUI thread.
+
+ \image blockingfortuneclient-example.png
+
+ QTcpSocket supports two general approaches to network programming:
+
+ \list
+
+ \o \e{The asynchronous (non-blocking) approach.} Operations are scheduled
+ and performed when control returns to Qt's event loop. When the operation
+ is finished, QTcpSocket emits a signal. For example,
+ QTcpSocket::connectToHost() returns immediately, and when the connection
+ has been established, QTcpSocket emits
+ \l{QTcpSocket::connected()}{connected()}.
+
+ \o \e{The synchronous (blocking) approach.} In non-GUI and multithreaded
+ applications, you can call the \c waitFor...() functions (e.g.,
+ QTcpSocket::waitForConnected()) to suspend the calling thread until the
+ operation has completed, instead of connecting to signals.
+
+ \endlist
+
+ The implementation is very similar to the
+ \l{network/fortuneclient}{Fortune Client} example, but instead of having
+ QTcpSocket as a member of the main class, doing asynchronous networking in
+ the main thread, we will do all network operations in a separate thread
+ and use QTcpSocket's blocking API.
+
+ The purpose of this example is to demonstrate a pattern that you can use
+ to simplify your networking code, without losing responsiveness in your
+ user interface. Use of Qt's blocking network API often leads to
+ simpler code, but because of its blocking behavior, it should only be used
+ in non-GUI threads to prevent the user interface from freezing. But
+ contrary to what many think, using threads with QThread does not
+ necessarily add unmanagable complexity to your application.
+
+ We will start with the FortuneThread class, which handles the network
+ code.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.h 0
+
+ FortuneThread is a QThread subclass that provides an API for scheduling
+ requests for fortunes, and it has signals for delivering fortunes and
+ reporting errors. You can call requestNewFortune() to request a new
+ fortune, and the result is delivered by the newFortune() signal. If any
+ error occurs, the error() signal is emitted.
+
+ It's important to notice that requestNewFortune() is called from the main,
+ GUI thread, but the host name and port values it stores will be accessed
+ from FortuneThread's thread. Because we will be reading and writing
+ FortuneThread's data members from different threads concurrently, we use
+ QMutex to synchronize access.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 2
+
+ The requestNewFortune() function stores the host name and port of the
+ fortune server as member data, and we lock the mutex with QMutexLocker to
+ protect this data. We then start the thread, unless it is already
+ running. We will come back to the QWaitCondition::wakeOne() call later.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 4
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 5
+
+ In the run() function, we start by acquiring the mutex lock, fetching the
+ host name and port from the member data, and then releasing the lock
+ again. The case that we are protecting ourselves against is that \c
+ requestNewFortune() could be called at the same time as we are fetching
+ this data. QString is \l reentrant but \e not \l{thread-safe}, and we must
+ also avoid the unlikely risk of reading the host name from one request,
+ and port of another. And as you might have guessed, FortuneThread can only
+ handle one request at a time.
+
+ The run() function now enters a loop:
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 6
+
+ The loop will continue requesting fortunes for as long as \e quit is
+ false. We start our first request by creating a QTcpSocket on the stack,
+ and then we call \l{QTcpSocket::connectToHost()}{connectToHost()}. This
+ starts an asynchronous operation which, after control returns to Qt's
+ event loop, will cause QTcpSocket to emit
+ \l{QTcpSocket::connected()}{connected()} or
+ \l{QTcpSocket::error()}{error()}.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 8
+
+ But since we are running in a non-GUI thread, we do not have to worry
+ about blocking the user interface. So instead of entering an event loop,
+ we simply call QTcpSocket::waitForConnected(). This function will wait,
+ blocking the calling thread, until QTcpSocket emits connected() or an
+ error occurs. If connected() is emitted, the function returns true; if the
+ connection failed or timed out (which in this example happens after 5
+ seconds), false is returned. QTcpSocket::waitForConnected(), like the
+ other \c waitFor...() functions, is part of QTcpSocket's \e{blocking
+ API}.
+
+ After this statement, we have a connected socket to work with. Now it's
+ time to see what the fortune server has sent us.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 9
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 10
+
+ This step is to read the size of the packet. Although we are only reading
+ two bytes here, and the \c while loop may seem to overdo it, we present this
+ code to demonstrate a good pattern for waiting for data using
+ QTcpSocket::waitForReadyRead(). It goes like this: For as long as we still
+ need more data, we call waitForReadyRead(). If it returns false,
+ we abort the operation. After this statement, we know that we have received
+ enough data.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 11
+
+ Now we can create a QDataStream object, passing the socket to
+ QDataStream's constructor, and as in the other client examples we set
+ the stream protocol version to QDataStream::Qt_4_0, and read the size
+ of the packet.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 12
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 13
+
+ Again, we'll use a loop that waits for more data by calling
+ QTcpSocket::waitForReadyRead(). In this loop, we're waiting until
+ QTcpSocket::bytesAvailable() returns the full packet size.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 14
+
+ Now that we have all the data that we need, we can use QDataStream to
+ read the fortune string from the packet. The resulting fortune is
+ delivered by emitting newFortune().
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 15
+
+ The final part of our loop is that we acquire the mutex so that we can
+ safely read from our member data. We then let the thread go to sleep by
+ calling QWaitCondition::wait(). At this point, we can go back to
+ requestNewFortune() and look closed at the call to wakeOne():
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 1
+ \dots
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 3
+
+ What happened here was that because the thread falls asleep waiting for a
+ new request, we needed to wake it up again when a new request
+ arrives. QWaitCondition is often used in threads to signal a wakeup call
+ like this.
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 0
+
+ Finishing off the FortuneThread walkthrough, this is the destructor that
+ sets \e quit to true, wakes up the thread and waits for the thread to exit
+ before returning. This lets the \c while loop in run() will finish its current
+ iteration. When run() returns, the thread will terminate and be destroyed.
+
+ Now for the BlockingClient class:
+
+ \snippet examples/network/blockingfortuneclient/blockingclient.h 0
+
+ BlockingClient is very similar to the Client class in the
+ \l{network/fortuneclient}{Fortune Client} example, but in this class
+ we store a FortuneThread member instead of a pointer to a QTcpSocket.
+ When the user clicks the "Get Fortune" button, the same slot is called,
+ but its implementation is slightly different:
+
+ \snippet examples/network/blockingfortuneclient/blockingclient.cpp 0
+ \snippet examples/network/blockingfortuneclient/blockingclient.cpp 1
+
+ We connect our FortuneThread's two signals newFortune() and error() (which
+ are somewhat similar to QTcpSocket::readyRead() and QTcpSocket::error() in
+ the previous example) to requestNewFortune() and displayError().
+
+ \snippet examples/network/blockingfortuneclient/blockingclient.cpp 2
+
+ The requestNewFortune() slot calls FortuneThread::requestNewFortune(),
+ which \e shedules the request. When the thread has received a new fortune
+ and emits newFortune(), our showFortune() slot is called:
+
+ \snippet examples/network/blockingfortuneclient/blockingclient.cpp 3
+ \codeline
+ \snippet examples/network/blockingfortuneclient/blockingclient.cpp 4
+
+ Here, we simply display the fortune we received as the argument.
+
+ \sa {Fortune Client Example}, {Fortune Server Example}
+*/
diff --git a/doc/src/examples/borderlayout.qdoc b/doc/src/examples/borderlayout.qdoc
new file mode 100644
index 0000000..6275249
--- /dev/null
+++ b/doc/src/examples/borderlayout.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example layouts/borderlayout
+ \title Border Layout Example
+
+ The Border Layout example shows how to create a custom layout that arranges
+ child widgets according to a simple set of rules.
+
+ \image borderlayout-example.png
+*/
diff --git a/doc/src/examples/broadcastreceiver.qdoc b/doc/src/examples/broadcastreceiver.qdoc
new file mode 100644
index 0000000..253b68b
--- /dev/null
+++ b/doc/src/examples/broadcastreceiver.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/broadcastreceiver
+ \title Broadcast Receiver Example
+
+ The Broadcast Receiever example shows how to receive information that is broadcasted
+ over a local network.
+
+ \image broadcastreceiver-example.png
+*/
diff --git a/doc/src/examples/broadcastsender.qdoc b/doc/src/examples/broadcastsender.qdoc
new file mode 100644
index 0000000..05975aa
--- /dev/null
+++ b/doc/src/examples/broadcastsender.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/broadcastsender
+ \title Broadcast Sender Example
+
+ The Broadcast Sender example shows how to broadcast information to multiple clients
+ on a local network.
+
+ \image broadcastsender-example.png
+*/
diff --git a/doc/src/examples/cachedtable.qdoc b/doc/src/examples/cachedtable.qdoc
new file mode 100644
index 0000000..b7f416b
--- /dev/null
+++ b/doc/src/examples/cachedtable.qdoc
@@ -0,0 +1,211 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/cachedtable
+ \title Cached Table Example
+
+ The Cached Table example shows how a table view can be used to access a database,
+ caching any changes to the data until the user explicitly submits them using a
+ push button.
+
+ \image cachedtable-example.png
+
+ The example consists of a single class, \c TableEditor, which is a
+ custom dialog widget that allows the user to modify data stored in
+ a database. We will first review the class definiton and how to
+ use the class, then we will take a look at the implementation.
+
+ \section1 TableEditor Class Definition
+
+ The \c TableEditor class inherits QDialog making the table editor
+ widget a top-level dialog window.
+
+ \snippet examples/sql/cachedtable/tableeditor.h 0
+
+ The \c TableEditor constructor takes two arguments: The first is a
+ pointer to the parent widget and is passed on to the base class
+ constructor. The other is a reference to the database table the \c
+ TableEditor object will operate on.
+
+ Note the QSqlTableModel variable declaration: As we will see in
+ this example, the QSqlTableModel class can be used to provide data
+ to view classes such as QTableView. The QSqlTableModel class
+ provides an editable data model making it possible to read and
+ write database records from a single table. It is build on top of
+ the lower-level QSqlQuery class which provides means of executing
+ and manipulating SQL statements.
+
+ We are also going to show how a table view can be used to cache
+ any changes to the data until the user explicitly requests to
+ submit them. For that reason we need to declare a \c submit() slot
+ in additon to the model and the editor's buttons.
+
+ \table 100%
+ \header \o Connecting to a Database
+ \row
+ \o
+
+ Before we can use the \c TableEditor class, we must create a
+ connection to the database containing the table we want to edit:
+
+ \snippet examples/sql/cachedtable/main.cpp 0
+
+ The \c createConnection() function is a helper function provided
+ for convenience. It is defined in the \c connection.h file which
+ is located in the \c sql example directory (all the examples in
+ the \c sql directory use this function to connect to a database).
+
+ \snippet examples/sql/connection.h 0
+
+ The \c createConnection function opens a connection to an
+ in-memory SQLITE database and creates a test table. If you want
+ to use another database, simply modify this function's code.
+ \endtable
+
+ \section1 TableEditor Class Implementation
+
+ The class implementation consists of only two functions, the
+ constructor and the \c submit() slot. In the constructor we create
+ and customize the data model and the various window elements:
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 0
+
+ First we create the data model and set the SQL database table we
+ want the model to operate on. Note that the
+ QSqlTableModel::setTable() function does not select data from the
+ table; it only fetches its field information. For that reason we
+ call the QSqlTableModel::select() function later on, populating
+ the model with data from the table. The selection can be
+ customized by specifying filters and sort conditions (see the
+ QSqlTableModel class documentation for more details).
+
+ We also set the model's edit strategy. The edit strategy dictates
+ when the changes done by the user in the view, are actually
+ applied to the database. Since we want to cache the changes in the
+ table view (i.e. in the model) until the user explicitly submits
+ them, we choose the QSqlTableModel::OnManualSubmit strategy. The
+ alternatives are QSqlTableModel::OnFieldChange and
+ QSqlTableModel::OnRowChange.
+
+ Finally, we set up the labels displayed in the view header using
+ the \l {QSqlQueryModel::setHeaderData()}{setHeaderData()} function
+ that the model inherits from the QSqlQueryModel class.
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 1
+
+ Then we create a table view. The QTableView class provides a
+ default model/view implementation of a table view, i.e. it
+ implements a table view that displays items from a model. It also
+ allows the user to edit the items, storing the changes in the
+ model. To create a read only view, set the proper flag using the
+ \l {QAbstractItemView::editTriggers}{editTriggers} property the
+ view inherits from the QAbstractItemView class.
+
+ To make the view present our data, we pass our model to the view
+ using the \l {QAbstractItemView::setModel()}{setModel()} function.
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 2
+
+ The \c {TableEditor}'s buttons are regular QPushButton objects. We
+ add them to a button box to ensure that the buttons are presented
+ in a layout that is appropriate to the current widget style. The
+ rationale for this is that dialogs and message boxes typically
+ present buttons in a layout that conforms to the interface
+ guidelines for that platform. Invariably, different platforms have
+ different layouts for their dialogs. QDialogButtonBox allows a
+ developer to add buttons to it and will automatically use the
+ appropriate layout for the user's desktop environment.
+
+ Most buttons for a dialog follow certain roles. When adding a
+ button to a button box using the \l
+ {QDialogButtonBox}{addButton()} function, the button's role must
+ be specified using the QDialogButtonBox::ButtonRole
+ enum. Alternatively, QDialogButtonBox provides several standard
+ buttons (e.g. \gui OK, \gui Cancel, \gui Save) that you can
+ use. They exist as flags so you can OR them together in the
+ constructor.
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 3
+
+ We connect the \gui Quit button to the table editor's \l
+ {QWidget::close()}{close()} slot, and the \gui Submit button to
+ our private \c submit() slot. The latter slot will take care of
+ the data transactions. Finally, we connect the \gui Revert button
+ to our model's \l {QSqlTableModel::revertAll()}{revertAll()} slot,
+ reverting all pending changes (i.e., restoring the original data).
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 4
+
+ In the end we add the button box and the table view to a layout,
+ install the layout on the table editor widget, and set the
+ editor's window title.
+
+ \snippet examples/sql/cachedtable/tableeditor.cpp 5
+
+ The \c submit() slot is called whenever the users hit the \gui
+ Submit button to save their changes.
+
+ First, we begin a transaction on the database using the
+ QSqlDatabase::transaction() function. A database transaction is a
+ unit of interaction with a database management system or similar
+ system that is treated in a coherent and reliable way independent
+ of other transactions. A pointer to the used database can be
+ obtained using the QSqlTableModel::database() function.
+
+ Then, we try to submit all the pending changes, i.e. the model's
+ modified items. If no error occurs, we commit the transaction to
+ the database using the QSqlDatabase::commit() function (note that
+ on some databases, this function will not work if there is an
+ active QSqlQuery on the database). Otherwise we perform a rollback
+ of the transaction using the QSqlDatabase::rollback() function and
+ post a warning to the user.
+
+ \table 100%
+ \row
+ \o
+ \bold {See also:}
+
+ A complete list of Qt's SQL \l {Database Classes}, and the \l
+ {Model/View Programming} documentation.
+
+ \endtable
+*/
diff --git a/doc/src/examples/calculator.qdoc b/doc/src/examples/calculator.qdoc
new file mode 100644
index 0000000..2cae6ce
--- /dev/null
+++ b/doc/src/examples/calculator.qdoc
@@ -0,0 +1,389 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/calculator
+ \title Calculator Example
+
+ The example shows how to use signals and slots to implement the
+ functionality of a calculator widget, and how to use QGridLayout
+ to place child widgets in a grid.
+
+ \image calculator-example.png Screenshot of the Calculator example
+
+ The example consists of two classes:
+
+ \list
+ \o \c Calculator is the calculator widget, with all the
+ calculator functionality.
+ \o \c Button is the widget used for each of the calculator
+ button. It derives from QToolButton.
+ \endlist
+
+ We will start by reviewing \c Calculator, then we will take a
+ look at \c Button.
+
+ \section1 Calculator Class Definition
+
+ \snippet examples/widgets/calculator/calculator.h 0
+
+ The \c Calculator class provides a simple calculator widget. It
+ inherits from QDialog and has several private slots associated
+ with the calculator's buttons. QObject::eventFilter() is
+ reimplemented to handle mouse events on the calculator's display.
+
+ Buttons are grouped in categories according to their behavior.
+ For example, all the digit buttons (labeled \gui 0 to \gui 9)
+ append a digit to the current operand. For these, we connect
+ multiple buttons to the same slot (e.g., \c digitClicked()). The
+ categories are digits, unary operators (\gui{Sqrt}, \gui{x\unicode{178}},
+ \gui{1/x}), additive operators (\gui{+}, \gui{-}), and
+ multiplicative operators (\gui{\unicode{215}}, \gui{\unicode{247}}). The other buttons
+ have their own slots.
+
+ \snippet examples/widgets/calculator/calculator.h 1
+ \snippet examples/widgets/calculator/calculator.h 2
+
+ The private \c createButton() function is used as part of the
+ widget construction. \c abortOperation() is called whenever a
+ division by zero occurs or when a square root operation is
+ applied to a negative number. \c calculate() applies a binary
+ operator (\gui{+}, \gui{-}, \gui{\unicode{215}}, or \gui{\unicode{247}}).
+
+ \snippet examples/widgets/calculator/calculator.h 3
+ \snippet examples/widgets/calculator/calculator.h 4
+ \snippet examples/widgets/calculator/calculator.h 5
+ \snippet examples/widgets/calculator/calculator.h 6
+ \snippet examples/widgets/calculator/calculator.h 7
+ \snippet examples/widgets/calculator/calculator.h 8
+
+ These variables, together with the contents of the calculator
+ display (a QLineEdit), encode the state of the calculator:
+
+ \list
+ \o \c sumInMemory contains the value stored in the calculator's memory
+ (using \gui{MS}, \gui{M+}, or \gui{MC}).
+ \o \c sumSoFar stores the value accumulated so far. When the user
+ clicks \gui{=}, \c sumSoFar is recomputed and shown on the
+ display. \gui{Clear All} resets \c sumSoFar to zero.
+ \o \c factorSoFar stores a temporary value when doing
+ multiplications and divisions.
+ \o \c pendingAdditiveOperator stores the last additive operator
+ clicked by the user.
+ \o \c pendingMultiplicativeOperator stores the last multiplicative operator
+ clicked by the user.
+ \o \c waitingForOperand is \c true when the calculator is
+ expecting the user to start typing an operand.
+ \endlist
+
+ Additive and multiplicative operators are treated differently
+ because they have different precedences. For example, \gui{1 + 2 \unicode{247}
+ 3} is interpreted as \gui{1 + (2 \unicode{247} 3)} because \gui{\unicode{247}} has higher
+ precedence than \gui{+}.
+
+ The table below shows the evolution of the calculator state as
+ the user enters a mathematical expression.
+
+ \table
+ \header \o User Input \o Display \o Sum so Far \o Add. Op. \o Factor so Far \o Mult. Op. \o Waiting for Operand?
+ \row \o \o 0 \o 0 \o \o \o \o \c true
+ \row \o \gui{1} \o 1 \o 0 \o \o \o \o \c false
+ \row \o \gui{1 +} \o 1 \o 1 \o \gui{+} \o \o \o \c true
+ \row \o \gui{1 + 2} \o 2 \o 1 \o \gui{+} \o \o \o \c false
+ \row \o \gui{1 + 2 \unicode{247}} \o 2 \o 1 \o \gui{+} \o 2 \o \gui{\unicode{247}} \o \c true
+ \row \o \gui{1 + 2 \unicode{247} 3} \o 3 \o 1 \o \gui{+} \o 2 \o \gui{\unicode{247}} \o \c false
+ \row \o \gui{1 + 2 \unicode{247} 3 -} \o 1.66667 \o 1.66667 \o \gui{-} \o \o \o \c true
+ \row \o \gui{1 + 2 \unicode{247} 3 - 4} \o 4 \o 1.66667 \o \gui{-} \o \o \o \c false
+ \row \o \gui{1 + 2 \unicode{247} 3 - 4 =} \o -2.33333 \o 0 \o \o \o \o \c true
+ \endtable
+
+ Unary operators, such as \gui Sqrt, require no special handling;
+ they can be applied immediately since the operand is already
+ known when the operator button is clicked.
+
+ \snippet examples/widgets/calculator/calculator.h 9
+ \codeline
+ \snippet examples/widgets/calculator/calculator.h 10
+
+ Finally, we declare the variables associated with the display and the
+ buttons used to display numerals.
+
+ \section1 Calculator Class Implementation
+
+ \snippet examples/widgets/calculator/calculator.cpp 0
+
+ In the constructor, we initialize the calculator's state. The \c
+ pendingAdditiveOperator and \c pendingMultiplicativeOperator
+ variables don't need to be initialized explicitly, because the
+ QString constructor initializes them to empty strings.
+
+ \snippet examples/widgets/calculator/calculator.cpp 1
+ \snippet examples/widgets/calculator/calculator.cpp 2
+
+ We create the QLineEdit representing the calculator's display and
+ set up some of its properties. In particular, we set it to be
+ read-only.
+
+ We also enlarge \c{display}'s font by 8 points.
+
+ \snippet examples/widgets/calculator/calculator.cpp 4
+
+ For each button, we call the private \c createButton() function with
+ the proper text label and a slot to connect to the button.
+
+ \snippet examples/widgets/calculator/calculator.cpp 5
+ \snippet examples/widgets/calculator/calculator.cpp 6
+
+ The layout is handled by a single QGridLayout. The
+ QLayout::setSizeConstraint() call ensures that the \c Calculator
+ widget is always shown as its optimal size (its
+ \l{QWidget::sizeHint()}{size hint}), preventing the user from
+ resizing the calculator. The size hint is determined by the size
+ and \l{QWidget::sizePolicy()}{size policy} of the child widgets.
+
+ Most child widgets occupy only one cell in the grid layout. For
+ these, we only need to pass a row and a column to
+ QGridLayout::addWidget(). The \c display, \c backspaceButton, \c
+ clearButton, and \c clearAllButton widgets occupy more than one
+ column; for these we must also pass a row span and a column
+ span.
+
+ \snippet examples/widgets/calculator/calculator.cpp 7
+
+ Pressing one of the calculator's digit buttons will emit the
+ button's \l{QToolButton::clicked()}{clicked()} signal, which will
+ trigger the \c digitClicked() slot.
+
+ First, we find out which button sent the signal using
+ QObject::sender(). This function returns the sender as a QObject
+ pointer. Since we know that the sender is a \c Button object, we
+ can safely cast the QObject. We could have used a C-style cast or
+ a C++ \c static_cast<>(), but as a defensive programming
+ technique we use a \l qobject_cast(). The advantage is that if
+ the object has the wrong type, a null pointer is returned.
+ Crashes due to null pointers are much easier to diagnose than
+ crashes due to unsafe casts. Once we have the button, we extract
+ the operator using QToolButton::text().
+
+ The slot needs to consider two situations in particular. If \c
+ display contains "0" and the user clicks the \gui{0} button, it
+ would be silly to show "00". And if the calculator is in
+ a state where it is waiting for a new operand,
+ the new digit is the first digit of that new operand; in that case,
+ any result of a previous calculation must be cleared first.
+
+ At the end, we append the new digit to the value in the display.
+
+ \snippet examples/widgets/calculator/calculator.cpp 8
+ \snippet examples/widgets/calculator/calculator.cpp 9
+
+ The \c unaryOperatorClicked() slot is called whenever one of the
+ unary operator buttons is clicked. Again a pointer to the clicked
+ button is retrieved using QObject::sender(). The operator is
+ extracted from the button's text and stored in \c
+ clickedOperator. The operand is obtained from \c display.
+
+ Then we perform the operation. If \gui Sqrt is applied to a
+ negative number or \gui{1/x} to zero, we call \c
+ abortOperation(). If everything goes well, we display the result
+ of the operation in the line edit and we set \c waitingForOperand
+ to \c true. This ensures that if the user types a new digit, the
+ digit will be considered as a new operand, instead of being
+ appended to the current value.
+
+ \snippet examples/widgets/calculator/calculator.cpp 10
+ \snippet examples/widgets/calculator/calculator.cpp 11
+
+ The \c additiveOperatorClicked() slot is called when the user
+ clicks the \gui{+} or \gui{-} button.
+
+ Before we can actually do something about the clicked operator,
+ we must handle any pending operations. We start with the
+ multiplicative operators, since these have higher precedence than
+ additive operators:
+
+ \snippet examples/widgets/calculator/calculator.cpp 12
+ \snippet examples/widgets/calculator/calculator.cpp 13
+
+ If \gui{\unicode{215}} or \gui{\unicode{247}} has been clicked earlier, without clicking
+ \gui{=} afterward, the current value in the display is the right
+ operand of the \gui{\unicode{215}} or \gui{\unicode{247}} operator and we can finally
+ perform the operation and update the display.
+
+ \snippet examples/widgets/calculator/calculator.cpp 14
+ \snippet examples/widgets/calculator/calculator.cpp 15
+
+ If \gui{+} or \gui{-} has been clicked earlier, \c sumSoFar is
+ the left operand and the current value in the display is the
+ right operand of the operator. If there is no pending additive
+ operator, \c sumSoFar is simply set to be the text in the
+ display.
+
+ \snippet examples/widgets/calculator/calculator.cpp 16
+ \snippet examples/widgets/calculator/calculator.cpp 17
+
+ Finally, we can take care of the operator that was just clicked.
+ Since we don't have the right-hand operand yet, we store the clicked
+ operator in the \c pendingAdditiveOperator variable. We will
+ apply the operation later, when we have a right operand, with \c
+ sumSoFar as the left operand.
+
+ \snippet examples/widgets/calculator/calculator.cpp 18
+
+ The \c multiplicativeOperatorClicked() slot is similar to \c
+ additiveOperatorClicked(). We don't need to worry about pending
+ additive operators here, because multiplicative operators have
+ precedence over additive operators.
+
+ \snippet examples/widgets/calculator/calculator.cpp 20
+
+ Like in \c additiveOperatorClicked(), we start by handing any
+ pending multiplicative and additive operators. Then we display \c
+ sumSoFar and reset the variable to zero. Resetting the variable
+ to zero is necessary to avoid counting the value twice.
+
+ \snippet examples/widgets/calculator/calculator.cpp 22
+
+ The \c pointClicked() slot adds a decimal point to the content in
+ \c display.
+
+ \snippet examples/widgets/calculator/calculator.cpp 24
+
+ The \c changeSignClicked() slot changes the sign of the value in
+ \c display. If the current value is positive, we prepend a minus
+ sign; if the current value is negative, we remove the first
+ character from the value (the minus sign).
+
+ \snippet examples/widgets/calculator/calculator.cpp 26
+
+ The \c backspaceClicked() removes the rightmost character in the
+ display. If we get an empty string, we show "0" and set \c
+ waitingForOperand to \c true.
+
+ \snippet examples/widgets/calculator/calculator.cpp 28
+
+ The \c clear() slot resets the current operand to zero. It is
+ equivalent to clicking \gui Backspace enough times to erase the
+ entire operand.
+
+ \snippet examples/widgets/calculator/calculator.cpp 30
+
+ The \c clearAll() slot resets the calculator to its initial state.
+
+ \snippet examples/widgets/calculator/calculator.cpp 32
+
+ The \c clearMemory() slot erases the sum kept in memory, \c
+ readMemory() displays the sum as an operand, \c setMemory()
+ replace the sum in memory with the current sum, and \c
+ addToMemory() adds the current value to the value in memory. For
+ \c setMemory() and \c addToMemory(), we start by calling \c
+ equalClicked() to update \c sumSoFar and the value in the
+ display.
+
+ \snippet examples/widgets/calculator/calculator.cpp 34
+
+ The private \c createButton() function is called from the
+ constructor to create calculator buttons.
+
+ \snippet examples/widgets/calculator/calculator.cpp 36
+
+ The private \c abortOperation() function is called whenever a
+ calculation fails. It resets the calculator state and displays
+ "####".
+
+ \snippet examples/widgets/calculator/calculator.cpp 38
+
+ The private \c calculate() function performs a binary operation.
+ The right operand is given by \c rightOperand. For additive
+ operators, the left operand is \c sumSoFar; for multiplicative
+ operators, the left operand is \c factorSoFar. The function
+ return \c false if a division by zero occurs.
+
+ \section1 Button Class Definition
+
+ Let's now take a look at the \c Button class:
+
+ \snippet examples/widgets/calculator/button.h 0
+
+ The \c Button class has a convenience constructor that takes a
+ text label and a parent widget, and it reimplements QWidget::sizeHint()
+ to provide more space around the text than the amount QToolButton
+ normally provides.
+
+ \section1 Button Class Implementation
+
+ \snippet examples/widgets/calculator/button.cpp 0
+
+ The buttons' appearance is determined by the layout of the
+ calculator widget through the size and
+ \l{QWidget::sizePolicy}{size policy} of the layout's child
+ widgets. The call to the
+ \l{QWidget::setSizePolicy()}{setSizePolicy()} function in the
+ constructor ensures that the button will expand horizontally to
+ fill all the available space; by default, \l{QToolButton}s don't
+ expand to fill available space. Without this call, the different
+ buttons in a same column would have different widths.
+
+ \snippet examples/widgets/calculator/button.cpp 1
+ \snippet examples/widgets/calculator/button.cpp 2
+
+ In \l{QWidget::sizeHint()}{sizeHint()}, we try to return a size
+ that looks good for most buttons. We reuse the size hint of the
+ base class (QToolButton) but modify it in the following ways:
+
+ \list
+ \o We add 20 to the \l{QSize::height()}{height} component of the size hint.
+ \o We make the \l{QSize::width()}{width} component of the size
+ hint at least as much as the \l{QSize::width()}{height}.
+ \endlist
+
+ This ensures that with most fonts, the digit and operator buttons
+ will be square, without truncating the text on the
+ \gui{Backspace}, \gui{Clear}, and \gui{Clear All} buttons.
+
+ The screenshot below shows how the \c Calculator widget would
+ look like if we \e didn't set the horizontal size policy to
+ QSizePolicy::Expanding in the constructor and if we didn't
+ reimplement QWidget::sizeHint().
+
+ \image calculator-ugly.png The Calculator example with default size policies and size hints
+
+*/
diff --git a/doc/src/examples/calculatorbuilder.qdoc b/doc/src/examples/calculatorbuilder.qdoc
new file mode 100644
index 0000000..c63267e
--- /dev/null
+++ b/doc/src/examples/calculatorbuilder.qdoc
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/calculatorbuilder
+ \title Calculator Builder Example
+
+ The Calculator Builder example shows how to create a user interface from
+ a \QD form at run-time, using the QUiLoader class.
+
+ \image calculatorbuilder-example.png
+
+ We use the form created in the \l{designer/calculatorform}{Calculator Form}
+ example to show that the same user interface can be generated when the
+ application is executed or defined when the application is built.
+
+ \section1 Preparation
+
+ The \l{designer/calculatorform}{Calculator Form} example defines a user
+ interface that we can use without modification. In this example, we use a
+ \l{The Qt Resource System}{resource file} to contain the \c{calculatorform.ui}
+ file created in the previous example, but it could be stored on disk instead.
+
+ To generate a form at run time, we need to link the example against the
+ \c QtUiTools module library. The project file we use contains all the
+ necessary information to do this:
+
+ \snippet examples/designer/calculatorbuilder/calculatorbuilder.pro 0
+
+ All the other necessary files are declared as usual.
+
+ \section1 CalculatorForm Class Definition
+
+ The \c CalculatorForm class defines the widget used to host the form's
+ user interface:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.h 0
+
+ Note that we do not need to include a header file to describe the user
+ interface. We only define two public slots, using the auto-connection
+ naming convention required by \c uic, and declare private variables
+ that we will use to access widgets provided by the form after they are
+ constructed.
+
+ \section1 CalculatorForm Class Implementation
+
+ We will need to use the QUiLoader class that is provided by the
+ \c libQtUiTools library, so we first ensure that we include the header
+ file for the module:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 0
+
+ The constructor uses a form loader object to construct the user
+ interface that we retrieve, via a QFile object, from the example's
+ resources:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 1
+
+ By including the user interface in the example's resources, we ensure
+ that it will be present when the example is run. The \c{loader.load()}
+ function takes the user interface description contained in the file
+ and constructs the form widget as a child widget of the \c{CalculatorForm}.
+
+ We are interested in three widgets in the generated user interface:
+ two spin boxes and a label. For convenience, we retrieve pointers to
+ these widgets from the widget that was constructed by the \c FormBuilder,
+ and we record them for later use. The \c qFindChild() template function
+ allows us to query widgets in order to find named child widgets.
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 2
+
+ The widgets created by the form loader need to be connected to the
+ specially-named slots in the \c CalculatorForm object. We use Qt's
+ meta-object system to enable these connections:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 3
+
+ The form widget is added to a layout, and the window title is set:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 4
+
+ The two slots that modify widgets provided by the form are defined
+ in a similar way to those in the \l{designer/calculatorform}{Calculator
+ Form} example, except that we read the values from the spin boxes and
+ write the result to the output widget via the pointers we recorded in
+ the constructor:
+
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 5
+ \codeline
+ \snippet examples/designer/calculatorbuilder/calculatorform.cpp 7
+
+ The advantage of this approach is that we can replace the form when the
+ application is run, but we can still manipulate the widgets it contains
+ as long as they are given appropriate names.
+*/
diff --git a/doc/src/examples/calculatorform.qdoc b/doc/src/examples/calculatorform.qdoc
new file mode 100644
index 0000000..a8e891e
--- /dev/null
+++ b/doc/src/examples/calculatorform.qdoc
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/calculatorform
+ \title Calculator Form Example
+
+ The Calculator Form Example shows how to use a form created with
+ \QD in an application by using the user interface information from
+ a QWidget subclass. We use \l{Using a Designer .ui File in Your Application}
+ {uic's auto-connection} feature to automatically connect signals
+ from widgets on the form to slots in our code.
+
+ \image calculatorform-example.png Screenshot of the Calculator Form example
+
+ The example presents two spin boxes that are used to input integer values
+ and a label that shows their sum. Whenever either of the spin boxes are
+ updated, the signal-slot connections between the widgets and the form
+ ensure that the label is also updated.
+
+ \section1 Preparation
+
+ The user interface for this example is designed completely using \QD. The
+ result is a .ui file describing the form, the widgets used, any signal-slot
+ connections between them, and other standard user interface properties.
+
+ To ensure that the example can use this file, we need to include a \c FORMS
+ declaration in the example's project file:
+
+ \snippet examples/designer/calculatorform/calculatorform.pro 1
+
+ When the project is built, \c uic will create a header file that lets us
+ construct the form.
+
+ \section1 CalculatorForm Class Definition
+
+ The \c CalculatorForm class uses the user interface described in the
+ \c calculatorform.ui file. To access the form and its contents, we need
+ to include the \c ui_calculatorform.h header file created by \c uic
+ during the build process:
+
+ \snippet examples/designer/calculatorform/calculatorform.h 0
+
+ We define the \c CalculatorForm class by subclassing QWidget because the
+ form itself is based on QWidget:
+
+ \snippet examples/designer/calculatorform/calculatorform.h 1
+
+ Apart from the constructor, the class contains two private slots that
+ are named according to the auto-connection naming convention required
+ by \c uic.
+ The private \c ui member variable refers to the form, and is used to
+ access the contents of the user interface.
+
+ \section1 CalculatorForm Class Implementation
+
+ The constructor simply calls the base class's constructor and
+ sets up the form's user interface.
+
+ \snippet examples/designer/calculatorform/calculatorform.cpp 0
+
+ The user interface is set up with the \c setupUI() function. We pass
+ \c this as the argument to this function to use the \c CalculatorForm
+ widget itself as the container for the user interface.
+
+ To automatically connect signals from the spin boxes defined in the
+ user interface, we use the naming convention that indicates which
+ widgets and their signals in the user interface should be connected
+ to each slot. The first slot is called whenever the spin box called
+ "inputSpinBox1" in the user interface emits the
+ \l{QSpinBox::valueChanged()}{valueChanged()} signal:
+
+ \snippet examples/designer/calculatorform/calculatorform.cpp 1
+
+ When this occurs, we use the value supplied by the signal to update the
+ output label by setting its new text directly. We access the output label
+ and the other spin box via the class's private \c ui variable.
+
+ The second slot is called whenever the second spin box, called
+ "inputSpinBox2", emits the \l{QSpinBox::valueChanged()}{valueChanged()}
+ signal:
+
+ \snippet examples/designer/calculatorform/calculatorform.cpp 2
+
+ In this case, the value from the first spin box is read and combined
+ with the value supplied by the signal. Again, the output label is
+ updated directly via the \c ui variable.
+*/
diff --git a/doc/src/examples/calendar.qdoc b/doc/src/examples/calendar.qdoc
new file mode 100644
index 0000000..e6beef4
--- /dev/null
+++ b/doc/src/examples/calendar.qdoc
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example richtext/calendar
+ \title Calendar Example
+
+ The Calendar example shows how to create rich text content and display it using
+ a rich text editor.
+
+ \image calendar-example.png
+
+ Specifically, the example demonstrates the following:
+
+ \list
+ \o Use of a text editor with a text document
+ \o Insertion of tables and frames into a document
+ \o Navigation within a table
+ \o Insert text in different styles
+ \endlist
+
+ The rich text editor used to display the document is used within a main window
+ application.
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class provides a text editor widget and some controls to
+ allow the user to change the month and year shown. The font size used for the
+ text can also be adjusted.
+
+ \snippet examples/richtext/calendar/mainwindow.h 0
+
+ The private \c insertCalendar() function performs most of the work, relying on
+ the \c fontSize and \c selectedDate variables to write useful information to
+ the \c editor.
+
+ \section1 MainWindow Class Implementation
+
+ The \c MainWindow constructor sets up the user interface and initializes
+ variables used to generate a calendar for each month.
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 0
+
+ We begin by setting default values for the selected date that will be highlighted
+ in the calendar and the font size to be used. Since we are using a QMainWindow
+ for the user interface, we construct a widget for use as the central widget.
+
+ The user interface will include a line of controls above the generated calendar;
+ we construct a label and a combobox to allow the month to be selected, and a
+ spin box for the year. These widgets are configured to provide a reasonable range
+ of values for the user to try:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 1
+
+ We use the \c selectedDate object to obtain the current month and year, and we
+ set these in the combobox and spin box:
+
+ The font size is displayed in a spin box which we restrict to a sensible range
+ of values:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 2
+
+ We construct an editor and use the \c insertCalendar() function to create
+ a calendar for it. Each calendar is displayed in the same text editor; in
+ this example we use a QTextBrowser since we do not allow the calendar to be
+ edited.
+
+ The controls used to set the month, year, and font size will not have any
+ effect on the appearance of the calendar unless we make some signal-slot
+ connections:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 3
+
+ The signals are connected to some simple slots in the \c MainWindow class
+ which we will describe later.
+
+ We create layouts to manage the widgets we constructed:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 4
+
+ Finally, the central widget is set for the window.
+
+ Each calendar is created for the editor by the \c insertCalendar() function
+ which uses the date and font size, defined by the private \a selectedDate
+ and \c fontSize variables, to produce a suitable plan for the specified
+ month and year.
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 5
+
+ We begin by clearing the editor's rich text document, and obtain a text
+ cursor from the editor that we will use to add content. We also create a
+ QDate object based on the currently selected date.
+
+ The calendar is made up of a table with a gray background color that contains
+ seven columns: one for each day of the week. It is placed in the center of the
+ page with equal space to the left and right of it. All of these properties are
+ set in a QTextTableFormat object:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 6
+
+ Each cell in the table will be padded and spaced to make the text easier to
+ read.
+
+ We want the columns to have equal widths, so we provide a vector containing
+ percentage widths for each of them and set the constraints in the
+ QTextTableFormat:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 7
+
+ The constraints used for the column widths are only useful if the table has
+ an appropriate number of columns. With the format for the table defined, we
+ construct a new table with one row and seven columns at the current cursor
+ position:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 8
+
+ We only need one row to start with; more can be added as we need them. Using
+ this approach means that we do not need to perform any date calculations
+ until we add cells to the table.
+
+ When inserting objects into a document with the cursor's insertion functions,
+ the cursor is automatically moved inside the newly inserted object. This means
+ that we can immediately start modifying the table from within:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 9
+
+ Since the table has an outer frame, we obtain the frame and its format so that
+ we can customize it. After making the changes we want, we set the frame's format
+ using the modified format object. We have given the table an outer border one
+ pixel wide.
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 10
+
+ In a similar way, we obtain the cursor's current character format and
+ create customized formats based on it.
+
+ We do not set the format on the cursor because this would change the default
+ character format; instead, we use the customized formats explicitly when we
+ insert text. The following loop inserts the days of the week into the table
+ as bold text:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 11
+
+ For each day of the week, we obtain an existing table cell in the first row
+ (row 0) using the table's \l{QTextTable::cellAt()}{cellAt()} function. Since
+ we start counting the days of the week at day 1 (Monday), we subtract 1 from
+ \c weekDay to ensure that we obtain the cell for the correct column of the
+ table.
+
+ Before text can be inserted into a cell, we must obtain a cursor with the
+ correct position in the document. The cell provides a function for this
+ purpose, and we use this cursor to insert text using the \c boldFormat
+ character format that we created earlier:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 12
+
+ Inserting text into document objects usually follows the same pattern.
+ Each object can provide a new cursor that corresponds to the first valid
+ position within itself, and this can be used to insert new content. We
+ continue to use this pattern as we insert the days of the month into the
+ table.
+
+ Since every month has more than seven days, we insert a single row to begin
+ and add days until we reach the end of the month. If the current date is
+ encountered, it is inserted with a special format (created earlier) that
+ makes it stand out:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 13
+
+ We add a new row to the table at the end of each week only if the next week
+ falls within the currently selected month.
+
+ For each calendar that we create, we change the window title to reflect the
+ currently selected month and year:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 14
+
+ The \c insertCalendar() function relies on up-to-date values for the month,
+ year, and font size. These are set in the following slots:
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 15
+
+ The \c setFontSize() function simply changes the private \c fontSize variable
+ before updating the calendar.
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 16
+
+ The \c setMonth slot is called when the QComboBox used to select the month is
+ updated. The value supplied is the currently selected row in the combobox.
+ We add 1 to this value to obtain a valid month number, and create a new QDate
+ based on the existing one. The calendar is then updated to use this new date.
+
+ \snippet examples/richtext/calendar/mainwindow.cpp 17
+
+ The \c setYear() slot is called when the QDateTimeEdit used to select the
+ year is updated. The value supplied is a QDate object; this makes
+ the construction of a new value for \c selectedDate simple. We update the
+ calendar afterwards to use this new date.
+*/
diff --git a/doc/src/examples/calendarwidget.qdoc b/doc/src/examples/calendarwidget.qdoc
new file mode 100644
index 0000000..f4417c2
--- /dev/null
+++ b/doc/src/examples/calendarwidget.qdoc
@@ -0,0 +1,305 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Calendar Widget Example
+ \example widgets/calendarwidget
+
+ The Calendar Widget example shows use of \c QCalendarWidget.
+
+ \image calendarwidgetexample.png
+
+ QCalendarWidget displays one calendar month
+ at a time and lets the user select a date.
+ The calendar consists of four components: a navigation
+ bar that lets the user change the month that is
+ displayed, a grid where each cell represents one day
+ in the month, and two headers that display weekday names
+ and week numbers.
+
+ The Calendar Widget example displays a QCalendarWidget and lets the user
+ configure its appearance and behavior using
+ \l{QComboBox}es, \l{QCheckBox}es, and \l{QDateEdit}s. In
+ addition, the user can influence the formatting of individual dates
+ and headers.
+
+ The properties of the QCalendarWidget are summarized in the table
+ below.
+
+ \table
+ \header \o Property
+ \o Description
+ \row \o \l{QCalendarWidget::}{selectedDate}
+ \o The currently selected date.
+ \row \o \l{QCalendarWidget::}{minimumDate}
+ \o The earliest date that can be selected.
+ \row \o \l{QCalendarWidget::}{maximumDate}
+ \o The latest date that can be selected.
+ \row \o \l{QCalendarWidget::}{firstDayOfWeek}
+ \o The day that is displayed as the first day of the week
+ (usually Sunday or Monday).
+ \row \o \l{QCalendarWidget::}{gridVisible}
+ \o Whether the grid should be shown.
+ \row \o \l{QCalendarWidget::}{selectionMode}
+ \o Whether the user can select a date or not.
+ \row \o \l{QCalendarWidget::}{horizontalHeaderFormat}
+ \o The format of the day names in the horizontal header
+ (e.g., "M", "Mon", or "Monday").
+ \row \o \l{QCalendarWidget::}{verticalHeaderFormat}
+ \o The format of the vertical header.
+ \row \o \l{QCalendarWidget::}{navigationBarVisible}
+ \o Whether the navigation bar at the top of the calendar
+ widget is shown.
+ \endtable
+
+ The example consists of one class, \c Window, which creates and
+ lays out the QCalendarWidget and the other widgets that let the
+ user configure the QCalendarWidget.
+
+ \section1 Window Class Definition
+
+ Here is the definition of the \c Window class:
+
+ \snippet examples/widgets/calendarwidget/window.h 0
+ \dots
+ \snippet examples/widgets/calendarwidget/window.h 1
+
+ As is often the case with classes that represent self-contained
+ windows, most of the API is private. We will review the private
+ members as we stumble upon them in the implementation.
+
+ \section1 Window Class Implementation
+
+ Let's now review the class implementation, starting with the constructor:
+
+ \snippet examples/widgets/calendarwidget/window.cpp 0
+
+ We start by creating the four \l{QGroupBox}es and their child
+ widgets (including the QCalendarWidget) using four private \c
+ create...GroupBox() functions, described below. Then we arrange
+ the group boxes in a QGridLayout.
+
+ We set the grid layout's resize policy to QLayout::SetFixedSize to
+ prevent the user from resizing the window. In that mode, the
+ window's size is set automatically by QGridLayout based on the
+ size hints of its contents widgets.
+
+ To ensure that the window isn't automatically resized every time
+ we change a property of the QCalendarWidget (e.g., hiding the
+ navigation bar, trhe vertical header, or the grid), we set the
+ minimum height of row 0 and the minimum width of column 0 to the
+ initial size of the QCalendarWidget.
+
+ Let's move on to the \c createPreviewGroupBox() function:
+
+ \snippet examples/widgets/calendarwidget/window.cpp 9
+
+ The \gui Preview group box contains only one widget: the
+ QCalendarWidget. We set it up, connect its
+ \l{QCalendarWidget::}{currentPageChanged()} signal to our \c
+ reformatCalendarPage() slot to make sure that every new page gets
+ the formatting specified by the user.
+
+ The \c createGeneralOptionsGroupBox() function is somewhat large
+ and several widgets are set up the same way; we look at parts of
+ its implementation here and skip the rest:
+
+ \snippet examples/widgets/calendarwidget/window.cpp 10
+ \dots
+
+ We start with the setup of the \gui{Week starts on} combobox.
+ This combobox controls which day should be displayed as the first
+ day of the week.
+
+ The QComboBox class lets us attach user data as a QVariant to
+ each item. The data can later be retrieved with QComboBox's
+ \l{QComboBox::}{itemData()} function. QVariant doesn't directly
+ support the Qt::DayOfWeek data type, but it supports \c int, and
+ C++ will happily convert any enum value to \c int.
+
+ \dots
+ \snippet examples/widgets/calendarwidget/window.cpp 11
+ \dots
+
+ After creating the widgets, we connect the signals and slots. We
+ connect the comboboxes to private slots of \c Window or to
+ public slots provided by QComboBox.
+
+ \dots
+ \snippet examples/widgets/calendarwidget/window.cpp 12
+
+ At the end of the function, we call the slots that update the calendar to ensure
+ that the QCalendarWidget is synchronized with the other widgets on startup.
+
+ Let's now take a look at the \c createDatesGroupBox() private function:
+
+ \snippet examples/widgets/calendarwidget/window.cpp 13
+
+ In this function, we create the \gui {Minimum Date}, \gui {Maximum Date},
+ and \gui {Current Date} editor widgets,
+ which control the calendar's minimum, maximum, and selected dates.
+ The calendar's minimum and maximum dates have already been
+ set in \c createPrivewGroupBox(); we can then set the widgets
+ default values to the calendars values.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 14
+ \dots
+ \snippet examples/widgets/calendarwidget/window.cpp 15
+
+ We connect the \c currentDateEdit's
+ \l{QDateEdit::}{dateChanged()} signal directly to the calendar's
+ \l{QCalendarWidget::}{setSelectedDate()} slot. When the calendar's
+ selected date changes, either as a result of a user action or
+ programmatically, our \c selectedDateChanged() slot updates
+ the \gui {Current Date} editor. We also need to react when the user
+ changes the \gui{Minimum Date} and \gui{Maximum Date} editors.
+
+ Here is the \c createTextFormatsGroup() function:
+
+ \snippet examples/widgets/calendarwidget/window.cpp 16
+
+ We set up the \gui {Weekday Color} and \gui {Weekend Color} comboboxes
+ using \c createColorCombo(), which instantiates a QComboBox and
+ populates it with colors ("Red", "Blue", etc.).
+
+ \snippet examples/widgets/calendarwidget/window.cpp 17
+
+ The \gui {Header Text Format} combobox lets the user change the
+ text format (bold, italic, or plain) used for horizontal and
+ vertical headers. The \gui {First Friday in blue} and \gui {May 1
+ in red} check box affect the rendering of specific dates.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 18
+
+ We connect the check boxes and comboboxes to various private
+ slots. The \gui {First Friday in blue} and \gui {May 1 in red}
+ check boxes are both connected to \c reformatCalendarPage(),
+ which is also called when the calendar switches month.
+
+ \dots
+ \snippet examples/widgets/calendarwidget/window.cpp 19
+
+ At the end of \c createTextFormatsGroupBox(), we call private
+ slots to synchronize the QCalendarWidget with the other widgets.
+
+ We're now done reviewing the four \c create...GroupBox()
+ functions. Let's now take a look at the other private functions
+ and slots.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 20
+
+ In \c createColorCombo(), we create a combobox and populate it with
+ standard colors. The second argument to QComboBox::addItem()
+ is a QVariant storing user data (in this case, QColor objects).
+
+ This function was used to set up the \gui {Weekday Color}
+ and \gui {Weekend Color} comboboxes.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 1
+
+ When the user changes the \gui {Week starts on} combobox's
+ value, \c firstDayChanged() is invoked with the index of the
+ combobox's new value. We retrieve the custom data item
+ associated with the new current item using
+ \l{QComboBox::}{itemData()} and cast it to a Qt::DayOfWeek.
+
+ \c selectionModeChanged(), \c horizontalHeaderChanged(), and \c
+ verticalHeaderChanged() are very similar to \c firstDayChanged(),
+ so they are omitted.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 2
+
+ The \c selectedDateChanged() updates the \gui{Current Date}
+ editor to reflect the current state of the QCalendarWidget.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 3
+
+ When the user changes the minimum date, we tell the
+ QCalenderWidget. We also update the \gui {Maximum Date} editor,
+ because if the new minimum date is later than the current maximum
+ date, QCalendarWidget will automatically adapt its maximum date
+ to avoid a contradicting state.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 4
+
+ \c maximumDateChanged() is implemented similarly to \c
+ minimumDateChanged().
+
+ \snippet examples/widgets/calendarwidget/window.cpp 5
+
+ Each combobox item has a QColor object as user data corresponding to the
+ item's text. After fetching the colors from the comboboxes, we
+ set the text format of each day of the week.
+
+ The text format of a column in the calendar is given as a
+ QTextCharFormat, which besides the foreground color lets us
+ specify various character formatting information. In this
+ example, we only show a subset of the possibilities.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 6
+
+ \c weekendFormatChanged() is the same as \c
+ weekdayFormatChanged(), except that it affects Saturday and
+ Sunday instead of Monday to Friday.
+
+ \snippet examples/widgets/calendarwidget/window.cpp 7
+
+ The \c reformatHeaders() slot is called when the user
+ changes the text format of
+ the headers. We compare the current text of the \gui {Header Text Format}
+ combobox to determine which format to apply. (An alternative would
+ have been to store \l{QTextCharFormat} values alongside the combobox
+ items.)
+
+ \snippet examples/widgets/calendarwidget/window.cpp 8
+
+ In \c reformatCalendarPage(), we set the text format of the first
+ Friday in the month and May 1 in the current year. The text
+ formats that are actually used depend on which check boxes are
+ checked.
+
+ QCalendarWidget lets us set the text format of individual dates
+ with the \l{QCalendarWidget::}{setDateTextFormat()}. We chose to
+ set the dates when the calendar page changes, i.e., a new month is
+ displayed. We check which of the \c mayFirstCheckBox and \c
+ firstDayCheckBox, if any, are checked
+ and set the text formats accordingly.
+*/
diff --git a/doc/src/examples/capabilitiesexample.qdoc b/doc/src/examples/capabilitiesexample.qdoc
new file mode 100644
index 0000000..9d62c71
--- /dev/null
+++ b/doc/src/examples/capabilitiesexample.qdoc
@@ -0,0 +1,171 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example phonon/capabilities
+ \title Capabilities Example
+
+ The Backend Capabilities example shows how to check which MIME
+ types, audio devices, and audio effects are available.
+
+ \image capabilitiesexample.png
+
+ Phonon does not implement the multimedia functionality itself, but
+ relies on a backend to manage this. The backends do not manage the
+ hardware directly, but use intermediate technologies: QuickTime on
+ Mac, GStreamer on Linux, and DirectShow (which requires DirectX)
+ on Windows.
+
+ The user may add support for new MIME types and effects to these
+ systems, and the systems abilities may also be different. The
+ support for multimedia MIME types, and audio effects in Phonon
+ will therefore vary from system to system.
+
+ Backends informs the programmer about current capabilities through
+ an implementation of the Phonon::BackendCapabilities namespace.
+ The backend reports which MIME types can be played back, which
+ audio effects are available, and which sound devices are available
+ on the system. When the capabilities of a backend changes, it will
+ emit the
+ \l{Phonon::BackendCapabilities::Notifier::}{capabilitiesChanged()}
+ signal.
+
+ The example consists of one class, \c Window, which displays
+ capabilities information from the current backend used by Phonon.
+
+ See the \l{Phonon Overview} for a high-level introduction to
+ Phonon.
+
+ \section1 Window Class Definition
+
+ The \c Window class queries the Phonon backend for its
+ capabilities. The results are presented in a GUI consisting of
+ standard Qt widgets. We will now take a tour of the Phonon related
+ parts of both the definition and implementation of the \c Window
+ class.
+
+ \snippet examples/phonon/capabilities/window.h windowMembers
+
+ We need the slot to notice changes in the backends capabilities.
+
+ \c mimeListWidget and \c devicesListView lists MIME types and
+ audio devices. The \c effectsTreeWidget lists audio effects, and
+ expands to show their parameters.
+
+ The \c setupUi() and \c setupBackendBox() private utility
+ functions create the widgets and lays them out. We skip these
+ functions while discussing the implementation because they do not
+ contain Phonon relevant code.
+
+ \section1 Window Class Implementation
+
+ Our examination starts with a look at the constructor:
+
+ \snippet examples/phonon/capabilities/window.cpp constructor
+
+ After creating the user interface, we call \c updateWidgets(),
+ which will fill the widgets with the information we get from the
+ backend. We then connect the slot to the
+ \l{Phonon::BackendCapabilities::Notifier::}{capabilitiesChanged()}
+ and
+ \l{Phonon::BackendCapabilities::Notifier::availableAudioOutputDevicesChanged()}{availableAudioOutputDevicesChanged()}
+ signals in case the backend's abilities changes while the example
+ is running. The signal is emitted by a
+ Phonon::BackendCapabilities::Notifier object, which listens for
+ changes in the backend.
+
+ In the \c updateWidgets() function, we query the backend for
+ information it has about its abilities and present it in the GUI
+ of \c Window. We dissect it here:
+
+ \snippet examples/phonon/capabilities/window.cpp outputDevices
+
+ The
+ \l{Phonon::BackendCapabilities::Notifier::}{availableAudioOutputDevicesChanged()}
+ function is a member of the Phonon::BackendCapabilities namespace.
+ It returns a list of \l{Phonon::}{AudioOutputDevice}s, which gives
+ us information about a particular device, e.g., a sound card or a
+ USB headset.
+
+ Note that \l{Phonon::}{AudioOutputDevice} and also
+ \l{Phonon::}{EffectDescription}, which is described shortly, are
+ typedefs of \l{Phonon::}{ObjectDescriptionType}.
+
+ \omit
+ ###
+ The \l{Phonon::}{ObjectDescriptionModel} is a convenience
+ model that displays the names of the devices. Their
+ descriptions are shown as tooltips and disabled devices are
+ shown in gray.
+ \endomit
+
+ \snippet examples/phonon/capabilities/window.cpp mimeTypes
+
+ The MIME types supported are given as strings in a QStringList. We
+ can therefore create a list widget item with the string, and
+ append it to the \c mimeListWidget, which displays the available
+ MIME types.
+
+ \snippet examples/phonon/capabilities/window.cpp effects
+
+ As before we add the description and name to our widget, which in
+ this case is a QTreeWidget. A particular effect may also have
+ parameters, which are inserted in the tree as child nodes of their
+ effect.
+
+ \snippet examples/phonon/capabilities/window.cpp effectsParameters
+
+ The parameters are only accessible through an instance of the
+ \l{Phonon::}{Effect} class. Notice that an effect is created
+ with the effect description.
+
+ The \l{Phonon::}{EffectParameter} contains information about one
+ of an effects parameters. We pick out some of the information to
+ describe the parameter in the tree widget.
+
+ \section1 The main() function
+
+ Because Phonon uses D-Bus on Linux, it is necessary to give the
+ application a name. You do this with
+ \l{QCoreApplication::}{setApplicationName()}.
+
+ \snippet examples/phonon/capabilities/main.cpp everything
+*/
diff --git a/doc/src/examples/charactermap.qdoc b/doc/src/examples/charactermap.qdoc
new file mode 100644
index 0000000..64c00db
--- /dev/null
+++ b/doc/src/examples/charactermap.qdoc
@@ -0,0 +1,288 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\example widgets/charactermap
+\title Character Map Example
+
+The Character Map example shows how to create a custom widget that can
+both display its own content and respond to user input.
+
+The example displays an array of characters which the user can click on
+to enter text in a line edit. The contents of the line edit can then be
+copied into the clipboard, and pasted into other applications. The
+purpose behind this sort of tool is to allow users to enter characters
+that may be unavailable or difficult to locate on their keyboards.
+
+\image charactermap-example.png Screenshot of the Character Map example
+
+The example consists of the following classes:
+
+\list
+\i \c CharacterWidget displays the available characters in the current
+ font and style.
+\i \c MainWindow provides a standard main window that contains font and
+ style information, a view onto the characters, a line edit, and a push
+ button for submitting text to the clipboard.
+\endlist
+
+\section1 CharacterWidget Class Definition
+
+The \c CharacterWidget class is used to display an array of characters in
+a user-specified font and style. For flexibility, we subclass QWidget and
+reimplement only the functions that we need to provide basic rendering
+and interaction features.
+
+The class definition looks like this:
+
+\snippet examples/widgets/charactermap/characterwidget.h 0
+
+The widget does not contain any other widgets, so it must provide its own
+size hint to allow its contents to be displayed correctly.
+We reimplement \l{QWidget::paintEvent()} to draw custom content. We also
+reimplement \l{QWidget::mousePressEvent()} to allow the user to interact
+with the widget.
+
+The updateFont() and updateStyle() slots are used to update the font and
+style of the characters in the widget whenever the user changes the
+settings in the application.
+The class defines the characterSelected() signal so that other parts
+of the application are informed whenever the user selects a character in
+the widget.
+As a courtesy, the widget provides a tooltip that shows the current
+character value. We reimplement the \l{QWidget::mouseMoveEvent()} event
+handler and define showToolTip() to enable this feature.
+
+The \c columns, \c displayFont and \c currentKey private data members
+are used to record the number of columns to be shown, the current font,
+and the currently highlighted character in the widget.
+
+\section1 CharacterWidget Class Implementation
+
+Since the widget is to be used as a simple canvas, the constructor just
+calls the base class constructor and defines some default values for
+private data members.
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 0
+
+We initialize \c currentKey with a value of -1 to indicate
+that no character is initially selected. We enable mouse tracking to
+allow us to follow the movement of the cursor across the widget.
+
+The class provides two functions to allow the font and style to be set up.
+Each of these modify the widget's display font and call update():
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 1
+\codeline
+\snippet examples/widgets/charactermap/characterwidget.cpp 2
+
+We use a fixed size font for the display. Similarly, a fixed size hint is
+provided by the sizeHint() function:
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 3
+
+Three standard event functions are implemented so that the widget
+can respond to clicks, provide tooltips, and render the available
+characters. The paintEvent() shows how the contents of the widget are
+arranged and displayed:
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 6
+
+A QPainter is created for the widget and, in all cases, we ensure that the
+widget's background is painted. The painter's font is set to the
+user-specified display font.
+
+The area of the widget that needs to be redrawn is used to determine which
+characters need to be displayed:
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 7
+
+Using integer division, we obtain the row and column numbers of each
+characters that should be displayed, and we draw a square on the widget
+for each character displayed.
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 8
+\snippet examples/widgets/charactermap/characterwidget.cpp 9
+
+The symbols for each character in the array are drawn within each square,
+with the symbol for the most recently selected character displayed in red:
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 10
+
+We do not need to take into account the difference between the area
+displayed in the viewport and the area we are drawing on because
+everything outside the visible area will be clipped.
+
+The mousePressEvent() defines how the widget responds to mouse clicks.
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 5
+
+We are only interested when the user clicks with the left mouse button
+over the widget. When this happens, we calculate which character was
+selected and emit the characterSelected() signal.
+The character's number is found by dividing the x and y-coordinates of
+the click by the size of each character's grid square. Since the number
+of columns in the widget is defined by the \c columns variable, we
+simply multiply the row index by that value and add the column number
+to obtain the character number.
+
+If any other mouse button is pressed, the event is passed on to the
+QWidget base class. This ensures that the event can be handled properly
+by any other interested widgets.
+
+The mouseMoveEvent() maps the mouse cursor's position in global
+coordinates to widget coordinates, and determines the character that
+was clicked by performing the calculation
+
+\snippet examples/widgets/charactermap/characterwidget.cpp 4
+
+The tooltip is given a position defined in global coordinates.
+
+\section1 MainWindow Class Definition
+
+The \c MainWindow class provides a minimal user interface for the example,
+with only a constructor, slots that respond to signals emitted by standard
+widgets, and some convenience functions that are used to set up the user
+interface.
+
+The class definition looks like this:
+
+\snippet examples/widgets/charactermap/mainwindow.h 0
+
+The main window contains various widgets that are used to control how
+the characters will be displayed, and defines the findFonts() function
+for clarity and convenience. The findStyles() slot is used by the widgets
+to determine the styles that are available, insertCharacter() inserts
+a user-selected character into the window's line edit, and
+updateClipboard() synchronizes the clipboard with the contents of the
+line edit.
+
+\section1 MainWindow Class Implementation
+
+In the constructor, we set up the window's central widget and fill it with
+some standard widgets (two comboboxes, a line edit, and a push button).
+We also construct a CharacterWidget custom widget, and add a QScrollArea
+so that we can view its contents:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 0
+
+QScrollArea provides a viewport onto the \c CharacterWidget when we set
+its widget and handles much of the work needed to provide a scrolling
+viewport.
+
+The font combo box is automatically popuplated with a list of available
+fonts. We list the available styles for the current font in the style
+combobox using the following function:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 1
+
+The line edit and push button are used to supply text to the clipboard:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 2
+
+We also obtain a clipboard object so that we can send text entered by the
+user to other applications.
+
+Most of the signals emitted in the example come from standard widgets.
+We connect these signals to slots in this class, and to the slots provided
+by other widgets.
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 4
+
+The font combobox's
+\l{QFontComboBox::currentFontChanged()}{currentFontChanged()} signal is
+connected to the findStyles() function so that the list of available styles
+can be shown for each font that is used. Since both the font and the style
+can be changed by the user, the font combobox's currentFontChanged() signal
+and the style combobox's
+\l{QComboBox::currentIndexChanged()}{currentIndexChanged()} are connected
+directly to the character widget.
+
+The final two connections allow characters to be selected in the character
+widget, and text to be inserted into the clipboard:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 5
+
+The character widget emits the characterSelected() custom signal when
+the user clicks on a character, and this is handled by the insertCharacter()
+function in this class. The clipboard is changed when the push button emits
+the clicked() signal, and we handle this with the updateClipboard() function.
+
+The remaining code in the constructor sets up the layout of the central widget,
+and provides a window title:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 6
+
+The font combobox is automatically populated with a list of available font
+families. The styles that can be used with each font are found by the
+findStyles() function. This function is called whenever the user selects a
+different font in the font combobox.
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 7
+
+We begin by recording the currently selected style, and we clear the
+style combobox so that we can insert the styles associated with the
+current font family.
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 8
+
+We use the font database to collect the styles that are available for the
+current font, and insert them into the style combobox. The current item is
+reset if the original style is not available for this font.
+
+The last two functions are slots that respond to signals from the character
+widget and the main window's push button. The insertCharacter() function is
+used to insert characters from the character widget when the user clicks a
+character:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 9
+
+The character is inserted into the line edit at the current cursor position.
+
+The main window's "To clipboard" push button is connected to the
+updateClipboard() function so that, when it is clicked, the clipboard is
+updated to contain the contents of the line edit:
+
+\snippet examples/widgets/charactermap/mainwindow.cpp 10
+
+We copy all the text from the line edit to the clipboard, but we do not clear
+the line edit.
+*/
diff --git a/doc/src/examples/chart.qdoc b/doc/src/examples/chart.qdoc
new file mode 100644
index 0000000..22f8a51
--- /dev/null
+++ b/doc/src/examples/chart.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/chart
+ \title Chart Example
+
+ The Chart example shows how to create a custom view for the model/view framework.
+
+ \image chart-example.png
+
+ In this example, the items in a table model are represented as slices in a pie chart,
+ relying on the flexibility of the model/view architecture to handle custom editing
+ and selection features.
+
+ \bold{Note that you only need to create a new view class if your data requires a
+ specialized representation.} You should first consider using a standard QListView,
+ QTableView, or QTreeView with a custom QItemDelegate subclass if you need to
+ represent data in a special way.
+
+ \omit
+ \section1 PieView Class Definition
+
+ The \c PieView class is a subclass of QAbstractItemView. The base class provides
+ much of the functionality required by view classes, so we only need to provide
+ implementations for three public functions: visualRect(), scrollTo(), and
+ indexAt(). However, the view needs to maintain strict control over its look and
+ feel, so we also provide implementations for a number of other functions:
+
+ \snippet examples/itemviews/chart/pieview.h 0
+
+
+
+ \section1 PieView Class Implementation
+
+ The paint event renders the data from the standard item model as a pie chart.
+ We interpret the data in the following way:
+
+ \list
+ \o Column 0 contains data in two different roles:
+ The \l{Qt::ItemDataRole}{DisplayRole} contains a label, and the
+ \l{Qt::ItemDataRole}{DecorationRole} contains the color of the pie slice.
+ \o Column 1 contains a quantity which we will convert to the angular extent of
+ the slice.
+ \endlist
+
+ The figure is always drawn with the chart on the left and the key on
+ the right. This means that we must try and obtain an area that is wider
+ than it is tall. We do this by imposing a particular aspect ratio on
+ the chart and applying it to the available vertical space. This ensures
+ that we always obtain the maximum horizontal space for the aspect ratio
+ used.
+ We also apply fixed size margin around the figure.
+
+ We use logical coordinates to draw the chart and key, and position them
+ on the view using viewports.
+ \endomit
+*/
diff --git a/doc/src/examples/classwizard.qdoc b/doc/src/examples/classwizard.qdoc
new file mode 100644
index 0000000..a36edf7
--- /dev/null
+++ b/doc/src/examples/classwizard.qdoc
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/classwizard
+ \title Class Wizard Example
+
+ The License Wizard example shows how to implement linear
+ wizards using QWizard.
+
+ \image classwizard.png Screenshot of the Class Wizard example
+
+ Most wizards have a linear structure, with page 1 followed by
+ page 2 and so on until the last page. Some wizards are more
+ complex in that they allow different traversal paths based on the
+ information provided by the user. The
+ \l{dialogs/licensewizard}{License Wizard} example shows how to
+ create such wizards.
+
+ The Class Wizard example consists of the following classes:
+
+ \list
+ \o \c ClassWizard inherits QWizard and provides a
+ three-step wizard that generates the skeleton of a C++ class
+ based on the user's input.
+ \o \c IntroPage, \c ClassInfoPage, \c CodeStylePage, \c
+ OutputFilesPage, and \c ConclusionPage are QWizardPage
+ subclasses that implement the wizard pages.
+ \endlist
+
+ \section1 ClassWizard Class Definition
+
+ \image classwizard-flow.png The Class Wizard pages
+
+ We will see how to subclass QWizard to implement our own wizard.
+ The concrete wizard class is called \c ClassWizard and provides
+ five pages:
+
+ \list
+ \o The first page is an introduction page, telling the user what
+ the wizard is going to do.
+ \o The second page asks for a class name and a base class, and
+ allows the user to specify whether the class should have a \c
+ Q_OBJECT macro and what constructors it should provide.
+ \o The third page allows the user to set some options related to the code
+ style, such as the macro used to protect the header file from
+ multiple inclusion (e.g., \c MYDIALOG_H).
+ \o The fourth page allows the user to specify the names of the
+ output files.
+ \o The fifth page is a conclusion page.
+ \endlist
+
+ Although the program is just an example, if you press \gui Finish
+ (\gui Done on Mac OS X), actual C++ source files will actually be
+ generated.
+
+ \section1 The ClassWizard Class
+
+ Here's the \c ClassWizard definition:
+
+ \snippet examples/dialogs/classwizard/classwizard.h 0
+
+ The class reimplements QDialog's \l{QDialog::}{accept()} slot.
+ This slot is called when the user clicks \gui{Finish}.
+
+ Here's the constructor:
+
+ \snippet examples/dialogs/classwizard/classwizard.cpp 1
+
+ We instantiate the five pages and insert them into the wizard
+ using QWizard::addPage(). The order in which they are inserted
+ is also the order in which they will be shown later on.
+
+ We call QWizard::setPixmap() to set the banner and the
+ background pixmaps for all pages. The banner is used as a
+ background for the page header when the wizard's style is
+ \l{QWizard::}{ModernStyle}; the background is used as the
+ dialog's background in \l{QWizard::}{MacStyle}. (See \l{Elements
+ of a Wizard Page} for more information.)
+
+ \snippet examples/dialogs/classwizard/classwizard.cpp 3
+ \snippet examples/dialogs/classwizard/classwizard.cpp 4
+ \dots
+ \snippet examples/dialogs/classwizard/classwizard.cpp 5
+ \snippet examples/dialogs/classwizard/classwizard.cpp 6
+
+ If the user clicks \gui Finish, we extract the information from
+ the various pages using QWizard::field() and generate the files.
+ The code is long and tedious (and has barely anything to do with
+ noble art of designing wizards), so most of it is skipped here.
+ See the actual example in the Qt distribution for the details if
+ you're curious.
+
+ \section1 The IntroPage Class
+
+ The pages are defined in \c classwizard.h and implemented in \c
+ classwizard.cpp, together with \c ClassWizard. We will start with
+ the easiest page:
+
+ \snippet examples/dialogs/classwizard/classwizard.h 1
+ \codeline
+ \snippet examples/dialogs/classwizard/classwizard.cpp 7
+
+ A page inherits from QWizardPage. We set a
+ \l{QWizardPage::}{title} and a
+ \l{QWizard::WatermarkPixmap}{watermark pixmap}. By not setting
+ any \l{QWizardPage::}{subTitle}, we ensure that no header is
+ displayed for this page. (On Windows, it is customary for wizards
+ to display a watermark pixmap on the first and last pages, and to
+ have a header on the other pages.)
+
+ Then we create a QLabel and add it to a layout.
+
+ \section1 The ClassInfoPage Class
+
+ The second page is defined and implemented as follows:
+
+ \snippet examples/dialogs/classwizard/classwizard.h 2
+ \codeline
+ \snippet examples/dialogs/classwizard/classwizard.cpp 9
+ \dots
+ \snippet examples/dialogs/classwizard/classwizard.cpp 12
+ \dots
+ \snippet examples/dialogs/classwizard/classwizard.cpp 13
+
+ First, we set the page's \l{QWizardPage::}{title},
+ \l{QWizardPage::}{subTitle}, and \l{QWizard::LogoPixmap}{logo
+ pixmap}. The logo pixmap is displayed in the page's header in
+ \l{QWizard::}{ClassicStyle} and \l{QWizard::}{ModernStyle}.
+
+ Then we create the child widgets, create \l{Registering and Using
+ Fields}{wizard fields} associated with them, and put them into
+ layouts. The \c className field is created with an asterisk (\c
+ *) next to its name. This makes it a \l{mandatory field}, that
+ is, a field that must be filled before the user can press the
+ \gui Next button (\gui Continue on Mac OS X). The fields' values
+ can be accessed from any other page using QWizardPage::field(),
+ or from the wizard code using QWizard::field().
+
+ \section1 The CodeStylePage Class
+
+ The third page is defined and implemented as follows:
+
+ \snippet examples/dialogs/classwizard/classwizard.h 3
+ \codeline
+ \snippet examples/dialogs/classwizard/classwizard.cpp 14
+ \dots
+ \snippet examples/dialogs/classwizard/classwizard.cpp 15
+ \codeline
+ \snippet examples/dialogs/classwizard/classwizard.cpp 16
+
+ The code in the constructor is very similar to what we did for \c
+ ClassInfoPage, so we skipped most of it.
+
+ The \c initializePage() function is what makes this class
+ interesting. It is reimplemented from QWizardPage and is used to
+ initialize some of the page's fields with values from the
+ previous page (namely, \c className and \c baseClass). For
+ example, if the class name on page 2 is \c SuperDuperWidget, the
+ default macro name on page 3 is \c SUPERDUPERWIDGET_H.
+
+ The \c OutputFilesPage and \c ConclusionPage classes are very
+ similar to \c CodeStylePage, so we won't review them here.
+
+ \sa QWizard, {License Wizard Example}, {Trivial Wizard Example}
+*/
diff --git a/doc/src/examples/codecs.qdoc b/doc/src/examples/codecs.qdoc
new file mode 100644
index 0000000..cb38cbe
--- /dev/null
+++ b/doc/src/examples/codecs.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/codecs
+ \title Codecs Example
+
+ The Codecs example demonstrates the principles behind importing and exporting text
+ using codecs to ensure that characters are encoded properly, avoiding loss of data
+ and retaining the correct symbols used in various scripts.
+
+ \image codecs-example.png
+*/
diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc
new file mode 100644
index 0000000..669ab45
--- /dev/null
+++ b/doc/src/examples/codeeditor.qdoc
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/codeeditor
+ \title Code Editor Example
+
+ The Code Editor example shows how to create a simple editor that
+ has line numbers and that highlights the current line.
+
+ \image codeeditor-example.png
+
+ As can be seen from the image, the editor displays the line
+ numbers in an area to the left of the area for editing. The editor
+ will highlight the line containing the cursor.
+
+ We implement the editor in \c CodeEditor, which is a widget that
+ inherits QPlainTextEdit. We keep a separate widget in \c
+ CodeEditor (\c LineNumberArea) onto which we draw the line
+ numbers.
+
+ QPlainTextEdit inherits from QAbstractScrollArea, and editing
+ takes place within its \l{QAbstractScrollArea::}{viewport()}'s
+ margins. We make room for our line number area by setting the left
+ margin of the viewport to the size we need to draw the line
+ numbers.
+
+ When it comes to editing code, we prefer QPlainTextEdit over
+ QTextEdit because it is optimized for handling plain text. See
+ the QPlainTextEdit class description for details.
+
+ QPlainTextEdit lets us add selections in addition to the the
+ selection the user can make with the mouse or keyboard. We use
+ this functionality to highlight the current line. More on this
+ later.
+
+ We will now move on to the definitions and implementations of \c
+ CodeEditor and \c LineNumberArea. Let's start with the \c
+ LineNumberArea class.
+
+ \section1 The LineNumberArea Class
+
+ We paint the line numbers on this widget, and place it over the \c
+ CodeEditor's \l{QAbstractScrollArea::}{viewport()}'s left margin
+ area.
+
+ We need to use protected functions in QPlainTextEdit while
+ painting the area. So to keep things simple, we paint the area in
+ the \c CodeEditor class. The area also asks the editor to
+ calculate its size hint.
+
+ Note that we could simply paint the line numbers directly on the
+ code editor, and drop the LineNumberArea class. However, the
+ QWidget class helps us to \l{QWidget::}{scroll()} its contents.
+ Also, having a separate widget is the right choice if we wish to
+ extend the editor with breakpoints or other code editor features.
+ The widget would then help in the handling of mouse events.
+
+ \snippet widgets/codeeditor/codeeditor.h extraarea
+
+ \section1 CodeEditor Class Definition
+
+ Here is the code editor's class definition:
+
+ \snippet widgets/codeeditor/codeeditor.h codeeditordefinition
+
+ In the editor we resize and draw the line numbers on the \c
+ LineNumberArea. We need to do this when the number of lines in the
+ editor changes, and when the editor's viewport() is scrolled. Of
+ course, it is also done when the editor's size changes. We do
+ this in \c updateLineNumberWidth() and \c updateLineNumberArea().
+
+ Whenever, the cursor's position changes, we highlight the current
+ line in \c highlightCurrentLine().
+
+ \section1 CodeEditor Class Implementation
+
+ We will now go through the code editors implementation, starting
+ off with the constructor.
+
+ \snippet widgets/codeeditor/codeeditor.cpp constructor
+
+ In the constructor we connect our slots to signals in
+ QPlainTextEdit. It is necessary to calculate the line number area
+ width and highlight the first line when the editor is created.
+
+ \snippet widgets/codeeditor/codeeditor.cpp extraAreaWidth
+
+ The \c lineNumberAreaWidth() function calculates the width of the
+ \c LineNumberArea widget. We take the number of digits in the last
+ line of the editor and multiply that with the maximum width of a
+ digit.
+
+ \snippet widgets/codeeditor/codeeditor.cpp slotUpdateExtraAreaWidth
+
+ When we update the width of the line number area, we simply call
+ QAbstractScrollArea::setViewportMargins().
+
+ \snippet widgets/codeeditor/codeeditor.cpp slotUpdateRequest
+
+ This slot is invoked when the editors viewport has been scrolled.
+ The QRect given as argument is the part of the editing area that
+ is do be updated (redrawn). \c dy holds the number of pixels the
+ view has been scrolled vertically.
+
+ \snippet widgets/codeeditor/codeeditor.cpp resizeEvent
+
+ When the size of the editor changes, we also need to resize the
+ line number area.
+
+ \snippet widgets/codeeditor/codeeditor.cpp cursorPositionChanged
+
+ When the cursor position changes, we highlight the current line,
+ i.e., the line containing the cursor.
+
+ QPlainTextEdit gives the possibility to have more than one
+ selection at the same time. we can set the character format
+ (QTextCharFormat) of these selections. We clear the cursors
+ selection before setting the new new
+ QPlainTextEdit::ExtraSelection, else several lines would get
+ highlighted when the user selects multiple lines with the mouse.
+ \omit ask someone how this works \endomit
+
+ One sets the selection with a text cursor. When using the
+ FullWidthSelection property, the current cursor text block (line)
+ will be selected. If you want to select just a portion of the text
+ block, the cursor should be moved with QTextCursor::movePosition()
+ from a position set with \l{QTextCursor::}{setPosition()}.
+
+ \snippet widgets/codeeditor/codeeditor.cpp extraAreaPaintEvent_0
+
+ The \c lineNumberAreaPaintEvent() is called from \c LineNumberArea
+ whenever it receives a paint event. We start off by painting the
+ widget's background.
+
+ \snippet widgets/codeeditor/codeeditor.cpp extraAreaPaintEvent_1
+
+ We will now loop through all visible lines and paint the line
+ numbers in the extra area for each line. Notice that in a plain
+ text edit each line will consist of one QTextBlock; though, if
+ line wrapping is enabled, a line may span several rows in the text
+ edit's viewport.
+
+ We get the top and bottom y-coordinate of the first text block,
+ and adjust these values by the height of the current text block in
+ each iteration in the loop.
+
+ \snippet widgets/codeeditor/codeeditor.cpp extraAreaPaintEvent_2
+
+ Notice that we check if the block is visible in addition to check
+ if it is in the areas viewport - a block can, for example, be
+ hidden by a window placed over the text edit.
+
+ \section1 Suggestions for Extending the Code Editor
+
+ No self-respecting code editor is without a syntax
+ highligther; the \l{Syntax Highlighter Example} shows how to
+ create one.
+
+ In addition to line numbers, you can add more to the extra area,
+ for instance, break points.
+
+ QSyntaxHighlighter gives the possibility to add user data to each
+ text block with
+ \l{QSyntaxHighlighter::}{setCurrentBlockUserData()}. This can be
+ used to implement parenthesis matching. In the \c
+ highlightCurrentLine(), the data of the currentBlock() can be
+ fetched with QTextBlock::userData(). Matching parentheses can be
+ highlighted with an extra selection.
+
+*/
diff --git a/doc/src/examples/collidingmice-example.qdoc b/doc/src/examples/collidingmice-example.qdoc
new file mode 100644
index 0000000..7ea2ca2
--- /dev/null
+++ b/doc/src/examples/collidingmice-example.qdoc
@@ -0,0 +1,279 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/collidingmice
+ \title Colliding Mice Example
+
+ The Colliding Mice example shows how to use the Graphics View
+ framework to implement animated items and detect collision between
+ items.
+
+ \image collidingmice-example.png
+
+ Graphics View provides the QGraphicsScene class for managing and
+ interacting with a large number of custom-made 2D graphical items
+ derived from the QGraphicsItem class, and a QGraphicsView widget
+ for visualizing the items, with support for zooming and rotation.
+
+ The example consists of an item class and a main function:
+ the \c Mouse class represents the individual mice extending
+ QGraphicsItem, and the \c main() function provides the main
+ application window.
+
+ We will first review the \c Mouse class to see how to animate
+ items and detect item collision, and then we will review the \c
+ main() function to see how to put the items into a scene and how to
+ implement the corresponding view.
+
+ \section1 Mouse Class Definition
+
+ The \c mouse class inherits both QObject and QGraphicsItem. The
+ QGraphicsItem class is the base class for all graphical items in
+ the Graphics View framework, and provides a light-weight
+ foundation for writing your own custom items.
+
+ \snippet examples/graphicsview/collidingmice/mouse.h 0
+
+ When writing a custom graphics item, you must implement
+ QGraphicsItem's two pure virtual public functions: \l
+ {QGraphicsItem::}{boundingRect()}, which returns an estimate of
+ the area painted by the item, and \l {QGraphicsItem::}{paint()},
+ which implements the actual painting. In addition, we reimplement
+ the \l {QGraphicsItem::}{shape()} function to return an accurate
+ shape of our mouse item; the default implementation simply returns
+ the item's bounding rectangle.
+
+ The rationale for deriving from QObject in addition to
+ QGraphicsItem is to be able to animate our items by reimplementing
+ QObject's \l {QObject::}{timerEvent()} function and use
+ QObject::startTimer() to generate timer events.
+
+ \section1 Mouse Class Definition
+
+ When constructing a mouse item, we first ensure that all the item's
+ private variables are properly initialized:
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 0
+
+ To calculate the various components of the mouse's color, we use
+ the global qrand() function which is a thread-safe version of the
+ standard C++ rand() function.
+
+ Then we call the \l {QGraphicsItem::rotate()}{rotate()} function
+ inherited from QGraphicsItem. Items live in their own local
+ coordinate system. Their coordinates are usually centered around
+ (0, 0), and this is also the center for all transformations. By
+ calling the item's \l {QGraphicsItem::rotate()}{rotate()} function
+ we alter the direction in which the mouse will start moving.
+
+ In the end we call QObject's \l {QObject::}{startTimer()}
+ function, emitting a timer event every 1000/33 millisecond. This
+ enables us to animate our mouse item using our reimplementation of
+ the \l {QObject::}{timerEvent()} function; whenever a mouse
+ receives a timer event it will trigger \l
+ {QObject::}{timerEvent()}:
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 4
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 5
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 6
+
+ First we ensure that the mice stays within a circle with a radius
+ of 150 pixels.
+
+ Note the \l {QGraphicsItem::mapFromScene()}{mapFromScene()}
+ function provided by QGraphicsItem. This function maps a position
+ given in \e scene coordinates, to the item's coordinate system.
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 7
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 8
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 9
+ \codeline
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 10
+
+ Then we try to avoid colliding with other mice.
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 11
+
+ Finally, we calculate the mouse's speed and its eye direction (for
+ use when painting the mouse), and set its new position.
+
+ The position of an item describes its origin (local coordinate (0,
+ 0)) in the parent coordinates. The \l {QGraphicsItem::setPos()}
+ function sets the position of the item to the given position in
+ the parent's coordinate system. For items with no parent, the
+ given position is interpreted as scene coordinates. QGraphicsItem
+ also provides a \l {QGraphicsItem::}{mapToParent()} function to
+ map a position given in item coordinates, to the parent's
+ coordinate system. If the item has no parent, the position will be
+ mapped to the scene's coordinate system instead.
+
+ Then it is time to provide an implementation for the pure virtual
+ functions inherited from QGraphicsItem. Let's first take a look at
+ the \l {QGraphicsItem::}{boundingRect()} function:
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 1
+
+ The \l {QGraphicsItem::boundingRect()}{boundingRect()} function
+ defines the outer bounds of the item as a rectangle. Note that the
+ Graphics View framework uses the bounding rectangle to determine
+ whether the item requires redrawing, so all painting must be
+ restricted inside this rectangle.
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 3
+
+ The Graphics View framework calls the \l
+ {QGraphicsItem::paint()}{paint()} function to paint the contents
+ of the item; the function paints the item in local coordinates.
+
+ Note the painting of the ears: Whenever a mouse item collides with
+ other mice items its ears are filled with red; otherwise they are
+ filled with dark yellow. We use the
+ QGraphicsScene::collidingItems() function to check if there are
+ any colliding mice. The actual collision detection is handled by
+ the Graphics View framework using shape-shape intersection. All we
+ have to do is to ensure that the QGraphicsItem::shape() function
+ returns an accurate shape for our item:
+
+ \snippet examples/graphicsview/collidingmice/mouse.cpp 2
+
+ Because the complexity of arbitrary shape-shape intersection grows
+ with an order of magnitude when the shapes are complex, this
+ operation can be noticably time consuming. An alternative approach
+ is to reimplement the \l
+ {QGraphicsItem::collidesWithItem()}{collidesWithItem()} function
+ to provide your own custom item and shape collision algorithm.
+
+ This completes the \c Mouse class implementation, it is now ready
+ for use. Let's take a look at the \c main() function to see how to
+ implement a scene for the mice and a view for displaying the
+ contents of the scene.
+
+ \section1 The Main() Function
+
+ In this example we have chosen to let the \c main() function
+ provide the main application window, creating the items and the
+ scene, putting the items into the scene and creating a
+ corresponding view.
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 0
+
+ First, we create an application object and call the global
+ qsrand() function to specify the seed used to generate a new
+ random number sequence of pseudo random integers with the
+ previously mentioned qrand() function.
+
+ Then it is time to create the scene:
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 1
+
+ The QGraphicsScene class serves as a container for
+ QGraphicsItems. It also provides functionality that lets you
+ efficiently determine the location of items as well as determining
+ which items that are visible within an arbitrary area on the
+ scene.
+
+ When creating a scene it is recommended to set the scene's
+ rectangle, i.e., the rectangle that defines the extent of the
+ scene. It is primarily used by QGraphicsView to determine the
+ view's default scrollable area, and by QGraphicsScene to manage
+ item indexing. If not explicitly set, the scene's default
+ rectangle will be the largest bounding rectangle of all the items
+ on the scene since the scene was created (i.e., the rectangle will
+ grow when items are added or moved in the scene, but it will never
+ shrink).
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 2
+
+ The item index function is used to speed up item discovery. \l
+ {QGraphicsScene::NoIndex}{NoIndex} implies that item location is
+ of linear complexity, as all items on the scene are
+ searched. Adding, moving and removing items, however, is done in
+ constant time. This approach is ideal for dynamic scenes, where
+ many items are added, moved or removed continuously. The
+ alternative is \l {QGraphicsScene::BspTreeIndex}{BspTreeIndex}
+ which makes use of binary search resulting in item location
+ algorithms that are of an order closer to logarithmic complexity.
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 3
+
+ Then we add the mice to the scene.
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 4
+
+ To be able to view the scene we must also create a QGraphicsView
+ widget. The QGraphicsView class visualizes the contents of a scene
+ in a scrollable viewport. We also ensure that the contents is
+ rendered using antialiasing, and we create the cheese background
+ by setting the view's background brush.
+
+ The image used for the background is stored as a binary file in
+ the application's executable using Qt's \l {The Qt Resource
+ System}{resource system}. The QPixmap constructor accepts both
+ file names that refer to actual files on disk and file names that
+ refer to the application's embedded resources.
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 5
+
+ Then we set the cache mode; QGraphicsView can cache pre-rendered
+ content in a pixmap, which is then drawn onto the viewport. The
+ purpose of such caching is to speed up the total rendering time
+ for areas that are slow to render, e.g., texture, gradient and
+ alpha blended backgrounds. The \l
+ {QGraphicsView::CacheMode}{CacheMode} property holds which parts
+ of the view that are cached, and the \l
+ {QGraphicsView::CacheBackground}{CacheBackground} flag enables
+ caching of the view's background.
+
+ By setting the \l {QGraphicsView::dragMode}{dragMode} property we
+ define what should happen when the user clicks on the scene
+ background and drags the mouse. The \l
+ {QGraphicsView::ScrollHandDrag}{ScrollHandDrag} flag makes the
+ cursor change into a pointing hand, and dragging the mouse around
+ will scroll the scrollbars.
+
+ \snippet examples/graphicsview/collidingmice/main.cpp 6
+
+ In the end, we set the application window's title and size before
+ we enter the main event loop using the QApplication::exec()
+ function.
+*/
+
diff --git a/doc/src/examples/coloreditorfactory.qdoc b/doc/src/examples/coloreditorfactory.qdoc
new file mode 100644
index 0000000..768bb51
--- /dev/null
+++ b/doc/src/examples/coloreditorfactory.qdoc
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/coloreditorfactory
+ \title Color Editor Factory Example
+
+ This example shows how to create an editor that can be used by
+ a QItemDelegate.
+
+ \image coloreditorfactoryimage.png
+
+ When editing data in a QListView, QTableView, or QTreeView,
+ editors are created and displayed by a \l{Delegate
+ Classes}{delegate}. QItemDelegate, which is the default delegate
+ used by Qt's \l{View Classes}{item views}, uses a
+ QItemEditorFactory to create editors for it. A unique instance
+ provided by QItemEditorFactory is by default installed on all
+ item delegates.
+
+ An item editor factory contains a collection of
+ QItemEditorCreatorBase instances, which are specialized factories
+ that produce editors for one particular QVariant data type (all
+ models in Qt store their data in \l{QVariant}s). An editor can be any
+ Qt or custom widget.
+
+ In this example, we will create an editor (implemented in the \c
+ ColorListEditor class) that can edit the QColor data type and be
+ used by \l{QItemDelegate}s. We do this by creating a new
+ QItemEditorCreatorBase that produces \c ColorListEditors and
+ register it with a new factory, which we set as the default editor
+ item factory (the unique factory instance). To test our editor, we
+ have implemented the \c Window class, which displays a
+ QTableWidget in which \l{QColor}s can be edited.
+
+ \section1 Window Class Implementation
+
+ In the Window class, we create the item editor creator
+ base for our color editor and add it to the default factory.
+ We also create a QTableWidget in which our editor can be
+ tested. It is filled with some data and displayed in a window.
+
+ We take a closer look at the constructor:
+
+ \snippet examples/itemviews/coloreditorfactory/window.cpp 0
+
+ The QStandardItemEditorCreator is a convenience class that
+ inherits QItemEditorCreatorBase. Its constructor takes a template
+ class, of which instances are returned from
+ \l{QItemEditorCreatorBase::}{createWidget()}. The creator uses a
+ constructor that takes a QWidget as its only parameter; the
+ template class must provide this. This way, there is no need to
+ subclass QStandardItemEditorCreator.
+
+ After the new factory has been set, all standard item delegates
+ will use it (i.e, also delegates that were created before the new
+ default factory was set).
+
+ The \c createGUI() function sets up the table and fills it
+ with data.
+
+ \section1 ColorListEditor Definition
+
+ The ColorListEditor inherits QComboBox and lets the user
+ select a QColor from its popup list.
+
+ \snippet examples/itemviews/coloreditorfactory/colorlisteditor.h 0
+
+ QItemDelegate manages the interaction between the editor and
+ the model, i.e., it retrieves data to edit from the model and
+ store data from the editor in the model. The data that is edited
+ by an editor is stored in the editor's user data property, and the
+ delegate uses Qt's \l{Qt's Property System}{property system} to
+ access it by name. We declare our user data property with the
+ Q_PROPERTY macro. The property is set to be the user type with the
+ USER keyword.
+
+ \section1 ColorListEditor Implementation
+
+ The constructor of \c ColorListEditor simply calls \c
+ populateList(), which we will look at later. We move on to the
+ \c color() function:
+
+ \snippet examples/itemviews/coloreditorfactory/colorlisteditor.cpp 0
+
+ We return the data that is selected in the combobox. The data
+ is stored in the Qt::DecorationRole as the color is then also
+ displayed in the popup list (as shown in the image above).
+
+ \snippet examples/itemviews/coloreditorfactory/colorlisteditor.cpp 1
+
+ The \c findData() function searches the items in the combobox
+ and returns the index of the item that has \c color in the
+ Qt::Decoration role.
+
+ \snippet examples/itemviews/coloreditorfactory/colorlisteditor.cpp 2
+
+ Qt knows some predefined colors by name. We simply loop
+ through these to fill our editor with items.
+
+ \section1 Further Customization of Item View Editors
+
+ You can customize Qt's \l{Model/View Programming}{model view
+ framework} in many ways. The procedure shown in this example is
+ usually sufficient to provide custom editors. Further
+ customization is achieved by subclassing QItemEditorFactory
+ and QItemEditorCreatorBase. It is also possible to subclass
+ QItemDelegate if you don't wish to use a factory at all.
+
+ Possible suggestions are:
+
+ \list
+ \o If the editor widget has no user property defined, the delegate
+ asks the factory for the property name, which it in turn
+ asks the item editor creator for. In this case, you can use
+ the QItemEditorCreator class, which takes the property
+ name to use for editing as a constructor argument.
+ \o If the editor requires other constructors or other
+ initialization than provided by QItemEditorCreatorBase, you
+ must reimplement
+ QItemEditorCreatorBase::createWidget().
+ \o You could also subclass QItemEditorFactory if you only want
+ to provide editors for certain kinds of data or use another
+ method of creating the editors than using creator bases.
+ \endlist
+
+ In this example, we use a standard QVariant data type. You can
+ also use custom types. In the \l{Star Delegate Example}, we
+ show how to store a custom data type in a QVariant and paint
+ and edit it in a class that inherits QItemDelegate.
+*/
diff --git a/doc/src/examples/combowidgetmapper.qdoc b/doc/src/examples/combowidgetmapper.qdoc
new file mode 100644
index 0000000..cf44bdb
--- /dev/null
+++ b/doc/src/examples/combowidgetmapper.qdoc
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/combowidgetmapper
+ \title Combo Widget Mapper Example
+
+ The Delegate Widget Mapper example shows how to use a custom delegate to
+ map information from a model to specific widgets on a form.
+
+ \image combo-widget-mapper.png
+
+ In the \l{Simple Widget Mapper Example}, we showed the basic use of a
+ widget mapper to relate data exposed by a model to simple input widgets
+ in a user interface. However, sometimes we want to use input widgets that
+ expose data as choices to the user, such as QComboBox, and we need a way
+ to relate their input to the values stored in the model.
+
+ This example is very similar to the \l{Simple Widget Mapper Example}.
+ Again, we create a \c Window class with an almost identical user interface,
+ except that, instead of providing a spin box so that each person's age
+ can be entered, we provide a combo box to allow their addresses to be
+ classified as "Home", "Work" or "Other".
+
+ \section1 Window Class Definition
+
+ The class provides a constructor, a slot to keep the buttons up to date,
+ and a private function to set up the model:
+
+ \snippet examples/itemviews/combowidgetmapper/window.h Window definition
+
+ In addition to the QDataWidgetMapper object and the controls used to make
+ up the user interface, we use a QStandardItemModel to hold our data and
+ a QStringListModel to hold information about the types of address that
+ can be applied to each person's data.
+
+ \section1 Window Class Implementation
+
+ The constructor of the \c Window class can be explained in three parts.
+ In the first part, we set up the widgets used for the user interface:
+
+ \snippet examples/itemviews/combowidgetmapper/window.cpp Set up widgets
+
+ Note that we set up the mapping the combo box in the same way as for other
+ widgets, but that we apply its own model to it so that it will display
+ data from its own model, the \c typeModel, rather than from the model
+ containing data about each person.
+
+ Next, we set up the widget mapper, relating each input widget to a column
+ in the model specified by the call to \l{QDataWidgetMapper::}{setModel()}:
+
+ \snippet examples/itemviews/combowidgetmapper/window.cpp Set up the mapper
+
+ For the combo box, we pass an extra argument to tell the widget mapper
+ which property to relate to values from the model. As a result, the user
+ is able to select an item from the combo box, and the corresponding
+ value stored in the widget's \c currentIndex property will be stored in
+ the model.
+
+ \omit
+ However, we also set a delegate on the mapper. As with \l{Delegate Classes},
+ this changes the way that data is presented to the user. In this case, the
+ delegate acts as a proxy between the mapper and the input widgets,
+ translating the data into a suitable form for the combo box but not
+ interfering with the other input widgets. The implementation is shown later.
+ \endomit
+
+ The rest of the constructor is very similar to that of the
+ \l{Simple Widget Mapper Example}:
+
+ \snippet examples/itemviews/combowidgetmapper/window.cpp Set up connections and layouts
+
+ The model is initialized in the window's \c{setupModel()} function. Here,
+ we create a standard model with 5 rows and 3 columns. In each row, we
+ insert a name, address, and a value that indicates the type of address.
+ The address types are stored in a string list model.
+
+ \snippet examples/itemviews/combowidgetmapper/window.cpp Set up the model
+
+ As we insert each row into the model, like a record in a database, we
+ store values that correspond to items in \c typeModel for each person's
+ address type. When the widget mapper reads these values from the final
+ column of each row, it will need to use them as references to values in
+ \c typeModel, as shown in the following diagram. This is where the
+ delegate is used.
+
+ \image widgetmapper-combo-mapping.png
+
+ We show the implementation of the \c{updateButtons()} slot for
+ completeness:
+
+ \snippet examples/itemviews/combowidgetmapper/window.cpp Slot for updating the buttons
+
+ \omit
+ \section1 Delegate Class Definition and Implementation
+
+ The delegate we use to mediate interaction between the widget mapper and
+ the input widgets is a small QItemDelegate subclass:
+
+ \snippet examples/itemviews/combowidgetmapper/delegate.h Delegate class definition
+
+ This provides implementations of the two standard functions used to pass
+ data between editor widgets and the model (see the \l{Delegate Classes}
+ documentation for a more general description of these functions).
+
+ Since we only provide an empty implementation of the constructor, we
+ concentrate on the other two functions.
+
+ The \l{QItemDelegate::}{setEditorData()} implementation takes the data
+ referred to by the model index supplied and processes it according to
+ the presence of a \c currentIndex property in the editor widget:
+
+ \snippet examples/itemviews/combowidgetmapper/delegate.cpp setEditorData implementation
+
+ If, like QComboBox, the editor widget has this property, it is set using
+ the value from the model. Since we are passing around QVariant values,
+ the strings stored in the model are automatically converted to the integer
+ values needed for the \c currentIndex property.
+
+ As a result, instead of showing "0", "1" or "2" in the combo box, one of
+ its predefined set of items is shown. We call QItemDelegate::setEditorData()
+ for widgets without the \c currentIndex property.
+
+ The \l{QItemDelegate::}{setModelData()} implementation performs the reverse
+ process, taking the value stored in the widget's \c currentIndex property
+ and storing it back in the model:
+
+ \snippet examples/itemviews/combowidgetmapper/delegate.cpp setModelData implementation
+ \endomit
+
+ \section1 Summary and Further Reading
+
+ The use of a separate model for the combo box provides a menu of choices
+ that are separate from the data stored in the main model. Using a named
+ mapping that relates the combo box's \c currentIndex property to a column
+ in the model effectively allows us to store a look-up value in the model.
+
+ However, when reading the model outside the context of the widget mapper,
+ we need to know about the \c typeModel to make sense of these look-up
+ values. It would be useful to be able to store both the data and the
+ choices held by the \c typeModel in one place.
+ This is covered by the \l{SQL Widget Mapper Example}.
+*/
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc
new file mode 100644
index 0000000..f47ba07
--- /dev/null
+++ b/doc/src/examples/completer.qdoc
@@ -0,0 +1,255 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/completer
+ \title Completer Example
+
+ The Completer example shows how to provide string-completion facilities
+ for an input widget based on data provided by a model.
+
+ \image completer-example.png
+
+ This example uses a custom item model, \c DirModel, and a QCompleter object.
+ QCompleter is a class that provides completions based on an item model. The
+ type of model, the completion mode, and the case sensitivity can be
+ selected using combo boxes.
+
+ \section1 The Resource File
+
+ The Completer example requires a resource file in order to store the
+ \e{countries.txt} and \e{words.txt}. The resource file contains the
+ following code:
+
+ \quotefile examples/tools/completer/completer.qrc
+
+ \section1 DirModel Class Definition
+
+ The \c DirModel class is a subclass of QDirModel, which provides a data
+ model for the local filesystem.
+
+ \snippet examples/tools/completer/dirmodel.h 0
+
+ This class only has a constructor and a \c data() function as it is only
+ created to enable \c data() to return the entire file path for the
+ display role, unlike \l{QDirModel}'s \c data() function that only returns
+ the folder and not the drive label. This is further explained in
+ \c DirModel's implementation.
+
+ \section1 DirModel Class Implementation
+
+ The constructor for the \c DirModel class is used to pass \a parent to
+ QDirModel.
+
+ \snippet examples/tools/completer/dirmodel.cpp 0
+
+ As mentioned earlier, the \c data() function is reimplemented in order to
+ get it to return the entire file parth for the display role. For example,
+ with a QDirModel, you will see "Program Files" in the view. However, with
+ \c DirModel, you will see "C:\\Program Files".
+
+ \snippet examples/tools/completer/dirmodel.cpp 1
+
+ The screenshots below illustrate this difference:
+
+ \table
+ \row \o \inlineimage completer-example-qdirmodel.png
+ \o \inlineimage completer-example-dirmodel.png
+ \endtable
+
+ The Qt::EditRole, which QCompleter uses to look for matches, is left
+ unchanged.
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow and implements four
+ private slots - \c about(), \c changeCase(), \c changeMode(), and
+ \c changeModel().
+
+ \snippet examples/tools/completer/mainwindow.h 0
+
+ Within the \c MainWindow class, we have two private functions:
+ \c createMenu() and \c modelFromFile(). We also declare the private widgets
+ needed - three QComboBox objects, a QCheckBox, a QCompleter, a QLabel, and
+ a QLineEdit.
+
+ \snippet examples/tools/completer/mainwindow.h 1
+
+ \section1 MainWindow Class Implementation
+
+ The constructor of \c MainWindow constructs a \c MainWindow with a parent
+ widget and initializes the private members. The \c createMenu() function
+ is then invoked.
+
+ We set up three QComboBox objects, \c modelComb, \c modeCombo and
+ \c caseCombo. By default, the \c modelCombo is set to QDirModel,
+ the \c modeCombo is set to "Filtered Popup" and the \c caseCombo is set
+ to "Case Insensitive".
+
+ \snippet examples/tools/completer/mainwindow.cpp 0
+
+ The \c wrapCheckBox is then set up. This \c checkBox determines if the
+ \c{completer}'s \l{QCompleter::setWrapAround()}{setWrapAround()} property
+ is enabled or disabled.
+
+ \snippet examples/tools/completer/mainwindow.cpp 1
+
+ We instantiate \c contentsLabel and set its size policy to
+ \l{QSizePolicy::Fixed}{fixed}. The combo boxes' \l{QComboBox::activated()}
+ {activated()} signals are then connected to their respective slots.
+
+ \snippet examples/tools/completer/mainwindow.cpp 2
+
+ The \c lineEdit is set up and then we arrange all the widgets using a
+ QGridLayout. The \c changeModel() function is called, to initialize the
+ \c completer.
+
+ \snippet examples/tools/completer/mainwindow.cpp 3
+
+ The \c createMenu() function is used to instantiate the QAction objects
+ needed to fill the \c fileMenu and \c helpMenu. The actions'
+ \l{QAction::triggered()}{triggered()} signals are connected to their
+ respective slots.
+
+ \snippet examples/tools/completer/mainwindow.cpp 4
+
+ The \c modelFromFile() function accepts the \a fileName of a file and
+ processes it depending on its contents.
+
+ We first validate the \c file to ensure that it can be opened in
+ QFile::ReadOnly mode. If this is unsuccessful, the function returns an
+ empty QStringListModel.
+
+ \snippet examples/tools/completer/mainwindow.cpp 5
+
+ The mouse cursor is then overriden with Qt::WaitCursor before we fill
+ a QStringList object, \c words, with the contents of \c file. Once this
+ is done, we restore the mouse cursor.
+
+ \snippet examples/tools/completer/mainwindow.cpp 6
+
+ As mentioned earlier, the resources file contains two files -
+ \e{countries.txt} and \e{words.txt}. If the \c file read is \e{words.txt},
+ we return a QStringListModel with \c words as its QStringList and
+ \c completer as its parent.
+
+ \snippet examples/tools/completer/mainwindow.cpp 7
+
+ If the \c file read is \e{countries.txt}, then we require a
+ QStandardItemModel with \c words.count() rows, 2 columns, and \c completer
+ as its parent.
+
+ \snippet examples/tools/completer/mainwindow.cpp 8
+
+ A standard line in \e{countries.txt} is:
+ \quotation
+ Norway NO
+ \endquotation
+
+ Hence, to populate the QStandardItemModel object, \c m, we have to
+ split the country name and its symbol. Once this is done, we return
+ \c m.
+
+ \snippet examples/tools/completer/mainwindow.cpp 9
+
+ The \c changeMode() function sets the \c{completer}'s mode, depending on
+ the value of \c index.
+
+ \snippet examples/tools/completer/mainwindow.cpp 10
+
+ The \c changeModel() function changes the item model used based on the
+ model selected by the user.
+
+ A \c switch statement is used to change the item model based on the index
+ of \c modelCombo. If \c case is 0, we use an unsorted QDirModel, providing
+ us with a file path excluding the drive label.
+
+ \snippet examples/tools/completer/mainwindow.cpp 11
+
+ Note that we create the model with \c completer as the parent as this
+ allows us to replace the model with a new model. The \c completer will
+ ensure that the old one is deleted the moment a new model is assigned
+ to it.
+
+ If \c case is 1, we use the \c DirModel we defined earlier, resulting in
+ full paths for the files.
+
+ \snippet examples/tools/completer/mainwindow.cpp 12
+
+ When \c case is 2, we attempt to complete names of countries. This requires
+ a QTreeView object, \c treeView. The country names are extracted from
+ \e{countries.txt} and set the popup used to display completions to
+ \c treeView.
+
+ \snippet examples/tools/completer/mainwindow.cpp 13
+
+ The screenshot below shows the Completer with the country list model.
+
+ \image completer-example-country.png
+
+ If \c case is 3, we attempt to complete words. This is done using a
+ QStringListModel that contains data extracted from \e{words.txt}. The
+ model is sorted \l{QCompleter::CaseInsensitivelySortedModel}
+ {case insensitively}.
+
+ The screenshot below shows the Completer with the word list model.
+
+ \image completer-example-word.png
+
+ Once the model type is selected, we call the \c changeMode() function and
+ the \c changeCase() function and set the wrap option accordingly. The
+ \c{wrapCheckBox}'s \l{QCheckBox::clicked()}{clicked()} signal is connected
+ to the \c{completer}'s \l{QCompleter::setWrapAround()}{setWrapAround()}
+ slot.
+
+ \snippet examples/tools/completer/mainwindow.cpp 14
+
+ The \c about() function provides a brief description about the example.
+
+ \snippet examples/tools/completer/mainwindow.cpp 15
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates QApplication and \c MainWindow and
+ invokes the \l{QWidget::show()}{show()} function.
+
+ \snippet examples/tools/completer/main.cpp 0
+ */
diff --git a/doc/src/examples/complexpingpong.qdoc b/doc/src/examples/complexpingpong.qdoc
new file mode 100644
index 0000000..dd05a41
--- /dev/null
+++ b/doc/src/examples/complexpingpong.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dbus/complexpingpong
+ \title Complex Ping Pong Example
+
+ The Complex Ping Pong example improves on the \l{D-Bus Ping Pong Example} by providing
+ a more useful demonstration of D-Bus interfaces.
+
+ \quotefile doc/src/snippets/complexpingpong-example.qdoc
+*/
diff --git a/doc/src/examples/concentriccircles.qdoc b/doc/src/examples/concentriccircles.qdoc
new file mode 100644
index 0000000..7c36b0d
--- /dev/null
+++ b/doc/src/examples/concentriccircles.qdoc
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/concentriccircles
+ \title Concentric Circles Example
+
+ The Concentric Circles example shows the improved rendering
+ quality that can be obtained using floating point precision and
+ anti-aliasing when drawing custom widgets. The example also shows
+ how to do simple animations.
+
+ The application's main window displays several widgets which are
+ drawn using the various combinations of precision and
+ anti-aliasing.
+
+ \image concentriccircles-example.png
+
+ Anti-aliasing is one of QPainter's render hints. The
+ QPainter::RenderHints are used to specify flags to QPainter that
+ may, or may not, be respected by any given
+ engine. QPainter::Antialiasing indicates that the engine should
+ anti-alias the edges of primitives if possible, i.e. put
+ additional pixels around the original ones to smooth the edges.
+
+ The difference between floating point precision and integer
+ precision is a matter of accuracy, and is visible in the
+ application's main window: Even though the logic that is
+ calculating the circles' geometry is the same, floating points
+ ensure that the white spaces between each circle are of the same
+ size, while integers make two and two circles appear as if they
+ belong together. The reason is that the integer based precision
+ rely on rounding off non-integer calculations.
+
+ The example consists of two classes:
+
+ \list
+ \o \c CircleWidget is a custom widget which renders several animated
+ concentric circles.
+ \o \c Window is the application's main window displaying four \c
+ {CircleWidget}s drawn using different combinations of precision
+ and aliasing.
+ \endlist
+
+ First we will review the CircleWidget class, then we will take a
+ look at the Window class.
+
+ \section1 CircleWidget Class Definition
+
+ The CircleWidget class inherits QWidget, and is a custom widget
+ which renders several animated concentric circles.
+
+ \snippet examples/painting/concentriccircles/circlewidget.h 0
+
+ We declare the \c floatBased and \c antialiased variables to hold
+ whether an instance of the class should be rendered with integer
+ or float based precision, and whether the rendering should be
+ anti-aliased or not. We also declare functions setting each of
+ these variables.
+
+ In addition we reimplement the QWidget::paintEvent() function to
+ apply the various combinations of precision and anti-aliasing when
+ rendering, and to support the animation. We reimplement the
+ QWidget::minimumSizeHint() and QWidget::sizeHint() functions to
+ give the widget a reasonable size within our application.
+
+ We declare the private \c nextAnimationFrame() slot, and the
+ associated \c frameNo variable holding the number of "animation
+ frames" for the widget, to facilitate the animation.
+
+ \section1 CircleWidget Class Implementation
+
+ In the constructor we make the widget's rendering integer based
+ and aliased by default:
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 0
+
+ We initialize the widget's \c frameNo variable, and set the
+ widget's background color using the QWidget::setBackgroundColor()
+ function which takes a \l {QPalette::ColorRole}{color role} as
+ argument; the QPalette::Base color role is typically white.
+
+ Then we set the widgets size policy using the
+ QWidget::setSizePolicy() function. QSizePolicy::Expanding means
+ that the widget's \l {QWidget::sizeHint()}{sizeHint()} is a
+ sensible size, but that the widget can be shrunk and still be
+ useful. The widget can also make use of extra space, so it should
+ get as much space as possible.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 1
+ \codeline
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 2
+
+ The public \c setFloatBased() and \c setAntialiased() functions
+ update the widget's rendering preferences, i.e. whether the widget
+ should be rendered with integer or float based precision, and
+ whether the rendering should be anti-aliased or not.
+
+ The functions also generate a paint event by calling the
+ QWidget::update() function, forcing a repaint of the widget with
+ the new rendering preferences.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 3
+ \codeline
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 4
+
+ The default implementations of the QWidget::minimumSizeHint() and
+ QWidget::sizeHint() functions return invalid sizes if there is no
+ layout for the widget, otherwise they return the layout's minimum and
+ preferred size, respectively.
+
+ We reimplement the functions to give the widget minimum and
+ preferred sizes which are reasonable within our application.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 5
+
+ The nextAnimationFrame() slot simply increments the \c frameNo
+ variable's value, and calls the QWidget::update() function which
+ schedules a paint event for processing when Qt returns to the main
+ event loop.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 6
+
+ A paint event is a request to repaint all or part of the
+ widget. The \c paintEvent() function is an event handler that can
+ be reimplemented to receive the widget's paint events. We
+ reimplement the event handler to apply the various combinations of
+ precision and anti-aliasing when rendering the widget, and to
+ support the animation.
+
+ First, we create a QPainter for the widget, and set its
+ antialiased flag to the widget's preferred aliasing. We also
+ translate the painters coordinate system, preparing to draw the
+ widget's cocentric circles. The translation ensures that the
+ center of the circles will be equivalent to the widget's center.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 7
+
+ When painting a circle, we use the number of "animation frames" to
+ determine the alpha channel of the circle's color. The alpha
+ channel specifies the color's transparency effect, 0 represents a
+ fully transparent color, while 255 represents a fully opaque
+ color.
+
+ \snippet examples/painting/concentriccircles/circlewidget.cpp 8
+
+ If the calculated alpha channel is fully transparent, we don't
+ draw anything since that would be equivalent to drawing a white
+ circle on a white background. Instead we skip to the next circle
+ still creating a white space. If the calculated alpha channel is
+ fully opaque, we set the pen (the QColor passed to the QPen
+ constructor is converted into the required QBrush by default) and
+ draw the circle. If the widget's preferred precision is float
+ based, we specify the circle's bounding rectangle using QRectF and
+ double values, otherwise we use QRect and integers.
+
+ The animation is controlled by the public \c nextAnimationFrame()
+ slot: Whenever the \c nextAnimationFrame() slot is called the
+ number of frames is incremented and a paint event is
+ scheduled. Then, when the widget is repainted, the alpha-blending
+ of the circles' colors change and the circles appear as animated.
+
+ \section1 Window Class Definition
+
+ The Window class inherits QWidget, and is the application's main
+ window rendering four \c {CircleWidget}s using different
+ combinations of precision and aliasing.
+
+ \snippet examples/painting/concentriccircles/window.h 0
+
+ We declare the various components of the main window, i.e the text
+ labels and a double array that will hold reference to the four \c
+ {CircleWidget}s. In addition we declare the private \c
+ createLabel() function to simplify the constructor.
+
+ \section1 Window Class Implementation
+
+ \snippet examples/painting/concentriccircles/window.cpp 0
+
+ In the constructor, we first create the various labels and put
+ them in a QGridLayout.
+
+ \snippet examples/painting/concentriccircles/window.cpp 1
+
+ Then we create a QTimer. The QTimer class is a high-level
+ programming interface for timers, and provides repetitive and
+ single-shot timers.
+
+ We create a timer to facilitate the animation of our concentric
+ circles; when we create the four CircleWidget instances (and add
+ them to the layout), we connect the QTimer::timeout() signal to
+ each of the widgets' \c nextAnimationFrame() slots.
+
+ \snippet examples/painting/concentriccircles/window.cpp 2
+
+ Before we set the layout and window title for our main window, we
+ make the timer start with a timeout interval of 100 milliseconds,
+ using the QTimer::start() function. That means that the
+ QTimer::timeout() signal will be emitted, forcing a repaint of the
+ four \c {CircleWidget}s, every 100 millisecond which is the reason
+ the circles appear as animated.
+
+ \snippet examples/painting/concentriccircles/window.cpp 3
+
+ The private \c createLabel() function is implemented to simlify
+ the constructor.
+*/
diff --git a/doc/src/examples/configdialog.qdoc b/doc/src/examples/configdialog.qdoc
new file mode 100644
index 0000000..afb1c5f
--- /dev/null
+++ b/doc/src/examples/configdialog.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/configdialog
+ \title Config Dialog Example
+
+ The Config Dialog examples shows how a configuration dialog can be created by
+ using an icon view with a stacked widget.
+
+ \image configdialog-example.png
+*/
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
new file mode 100644
index 0000000..a4fbcea
--- /dev/null
+++ b/doc/src/examples/containerextension.qdoc
@@ -0,0 +1,518 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/containerextension
+ \title Container Extension Example
+
+ The Container Extension example shows how to create a custom
+ multi-page plugin for Qt Designer using the
+ QDesignerContainerExtension class.
+
+ \image containerextension-example.png
+
+ To provide a custom widget that can be used with \QD, we need to
+ supply a self-contained implementation. In this example we use a
+ custom multi-page widget designed to show the container extension
+ feature.
+
+ An extension is an object which modifies the behavior of \QD. The
+ QDesignerContainerExtension enables \QD to manage and manipulate a
+ custom multi-page widget, i.e. adding and deleting pages to the
+ widget.
+
+ There are four available types of extensions in \QD:
+
+ \list
+ \o QDesignerMemberSheetExtension provides an extension that allows
+ you to manipulate a widget's member functions which is displayed
+ when configuring connections using Qt Designer's mode for editing
+ signals and slots.
+ \o QDesignerPropertySheetExtension provides an extension that
+ allows you to manipulate a widget's properties which is displayed
+ in Qt Designer's property editor.
+ \o QDesignerTaskMenuExtension provides an extension that allows
+ you to add custom menu entries to \QD's task menu.
+ \o QDesignerContainerExtension provides an extension that allows
+ you to add (and delete) pages to a multi-page container plugin
+ in \QD.
+ \endlist
+
+ You can use all the extensions following the same pattern as in
+ this example, only replacing the respective extension base
+ class. For more information, see the \l {QtDesigner Module}.
+
+ The Container Extension example consists of four classes:
+
+ \list
+ \o \c MultiPageWidget is a custom container widget that lets the user
+ manipulate and populate its pages, and navigate among these
+ using a combobox.
+ \o \c MultiPageWidgetPlugin exposes the \c MultiPageWidget class
+ to \QD.
+ \o \c MultiPageWidgetExtensionFactory creates a
+ \c MultiPageWidgetContainerExtension object.
+ \o \c MultiPageWidgetContainerExtension provides the container
+ extension.
+ \endlist
+
+ The project file for custom widget plugins needs some additional
+ information to ensure that they will work within \QD. For example,
+ custom widget plugins rely on components supplied with \QD, and
+ this must be specified in the project file that we use. We will
+ first take a look at the plugin's project file.
+
+ Then we will continue by reviewing the \c MultiPageWidgetPlugin
+ class, and take a look at the \c MultiPageWidgetExtensionFactory
+ and \c MultiPageWidgetContainerExtension classes. Finally, we will
+ take a quick look at the \c MultiPageWidget class definition.
+
+ \section1 The Project File: containerextension.pro
+
+ The project file must contain some additional information to
+ ensure that the plugin will work as expected:
+
+ \snippet examples/designer/containerextension/containerextension.pro 0
+ \snippet examples/designer/containerextension/containerextension.pro 1
+
+ The \c TEMPLATE variable's value makes \c qmake create the custom
+ widget as a library. Later, we will ensure that the widget will be
+ recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro
+ to export the relevant widget information.
+
+ The \c CONFIG variable contains two values, \c designer and \c
+ plugin:
+
+ \list
+ \o \c designer: Since custom widgets plugins rely on components
+ supplied with \QD, this value ensures that our plugin links against
+ \QD's library (\c libQtDesigner.so).
+
+ \o \c plugin: We also need to ensure that \c qmake considers the
+ custom widget a \e plugin library.
+ \endlist
+
+ When Qt is configured to build in both debug and release modes,
+ \QD will be built in release mode. When this occurs, it is
+ necessary to ensure that plugins are also built in release
+ mode. For that reason we add a \c debug_and_release value to the
+ \c CONFIG variable. Otherwise, if a plugin is built in a mode that
+ is incompatible with \QD, it won't be loaded and installed.
+
+ The header and source files for the widget are declared in the
+ usual way:
+
+ \snippet examples/designer/containerextension/containerextension.pro 2
+
+ We provide an implementation of the plugin interface so that \QD
+ can use the custom widget. In this particular example we also
+ provide implementations of the container extension interface and
+ the extension factory.
+
+ It is important to ensure that the plugin is installed in a
+ location that is searched by \QD. We do this by specifying a
+ target path for the project and adding it to the list of items to
+ install:
+
+ \snippet doc/src/snippets/code/doc_src_examples_containerextension.qdoc 0
+
+ The container extension is created as a library, and will be
+ installed alongside the other \QD plugins when the project is
+ installed (using \c{make install} or an equivalent installation
+ procedure).
+
+ Note that if you want the plugins to appear in a Visual Studio
+ integration, the plugins must be built in release mode and their
+ libraries must be copied into the plugin directory in the install
+ path of the integration (for an example, see \c {C:/program
+ files/trolltech as/visual studio integration/plugins}).
+
+ For more information about plugins, see the \l {How to Create Qt
+ Plugins} documentation.
+
+ \section1 MultiPageWidgetPlugin Class Definition
+
+ The \c MultiPageWidgetPlugin class exposes the \c MultiPageWidget
+ class to \QD. Its definition is similar to the \l
+ {designer/customwidgetplugin}{Custom Widget Plugin} example's
+ plugin class which is explained in detail. The parts of the class
+ definition that is specific to this particular custom widget is
+ the class name and a couple of private slots:
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.h 0
+
+ The plugin class provides \QD with basic information about our
+ plugin, such as its class name and its include file. Furthermore
+ it knows how to create instances of the \c MultiPageWidget widget.
+ \c MultiPageWidgetPlugin also defines the \l
+ {QDesignerCustomWidgetInterface::initialize()}{initialize()}
+ function which is called after the plugin is loaded into \QD. The
+ function's QDesignerFormEditorInterface parameter provides the
+ plugin with a gateway to all of \QD's API's.
+
+ In the case of a multipage widget such as ours, we must also implement
+ two private slots, currentIndexChanged() and pageTitleChanged(),
+ to be able to update \QD's property editor whenever the user views
+ another page or changes one of the page titles. To be able to give
+ each page their own title, we have chosen to use the
+ QWidget::windowTitle property to store the page title (for more
+ information see the MultiPageWidget class \l
+ {designer/containerextension/multipagewidget.cpp}{implementation}). Note
+ that currently there is no way of adding a custom property (e.g.,
+ a page title) to the pages without using a predefined property as
+ placeholder.
+
+ The \c MultiPageWidgetPlugin class inherits from both QObject and
+ QDesignerCustomWidgetInterface. It is important to remember, when
+ using multiple inheritance, to ensure that all the interfaces
+ (i.e. the classes that doesn't inherit Q_OBJECT) are made known to
+ the meta object system using the Q_INTERFACES() macro. This
+ enables \QD to use \l qobject_cast() to query for supported
+ interfaces using nothing but a QObject pointer.
+
+ \section1 MultiPageWidgetPlugin Class Implementation
+
+ The MultiPageWidgetPlugin class implementation is in most parts
+ equivalent to the \l {designer/customwidgetplugin}{Custom Widget
+ Plugin} example's plugin class:
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 0
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 3
+
+ One of the functions that differ is the isContainer() function
+ which returns true in this example since our custom widget is
+ intended to be used as a container.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 1
+
+ Another function that differ is the function creating our custom widget:
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 2
+
+ In addition to create and return the widget, we connect our custom
+ container widget's currentIndexChanged() signal to the plugin's
+ currentIndexChanged() slot to ensure that \QD's property editor is
+ updated whenever the user views another page. We also connect the
+ widget's pageTitleChanged() signal to the plugin's
+ pageTitleChanged() slot.
+
+ The currentIndexChanged() slot is called whenever our custom
+ widget's currentIndexChanged() \e signal is emitted, i.e. whenever
+ the user views another page:
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 8
+
+ First, we retrieve the object emitting the signal using the
+ QObject::sender() and qobject_cast() functions. If it's called in
+ a slot activated by a signal, QObject::sender() returns a pointer
+ to the object that sent the signal; otherwise it returns 0.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 9
+
+ Once we have the widget we can update the property editor. \QD
+ uses the QDesignerPropertySheetExtension class to feed its
+ property editor, and whenever a widget is selected in its
+ workspace, Qt Designer will query for the widget's property sheet
+ extension and update the property editor.
+
+ So what we want to achieve is to notify \QD that our widget's \e
+ internal selection has changed: First we use the static
+ QDesignerFormWindowInterface::findFormWindow() function to
+ retrieve the QDesignerFormWindowInterface object containing the
+ widget. The QDesignerFormWindowInterface class allows you to query
+ and manipulate form windows appearing in Qt Designer's
+ workspace. Then, all we have to do is to emit its \l
+ {QDesignerFormWindowInterface::emitSelectionChanged()}{emitSelectionChanged()}
+ signal, forcing an update of the property editor.
+
+ When changing a page title a generic refresh of the property
+ editor is not enough because it is actually the page's property
+ extension that needs to be updated. For that reason we need to
+ access the QDesignerPropertySheetExtension object for the page
+ which title we want to change. The QDesignerPropertySheetExtension
+ class also allows you to manipulate a widget's properties, but to
+ get hold of the extension we must first retrieve access to \QD's
+ extension manager:
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 10
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 11
+
+ Again we first retrieve the widget emitting the signal, using the
+ QObject::sender() and qobject_cast() functions. Then we retrieve
+ the current page from the widget that emitted the signal, and we
+ use the static QDesignerFormWindowInterface::findFormWindow()
+ function to retrieve the form containing our widget.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 12
+
+ Now that we have the form window, the QDesignerFormWindowInterface
+ class provides the \l
+ {QDesignerFormWindowInterface::core()}{core()} function which
+ returns the current QDesignerFormEditorInterface object. The
+ QDesignerFormEditorInterface class allows you to access Qt
+ Designer's various components. In particular, the
+ QDesignerFormEditorInterface::extensionManager() function returns
+ a reference to the current extension manager.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 13
+
+ Once we have the extension manager we can update the extension
+ sheet: First we retrieve the property extension for the page which
+ title we want to change, using the qt_extension() function. Then
+ we retrieve the index for the page title using the
+ QDesignerPropertySheetExtension::indexOf() function. As previously
+ mentioned, we have chosen to use the QWidget::windowTitle property
+ to store the page title (for more information see the
+ MultiPageWidget class \l
+ {designer/containerextension/multipagewidget.cpp}{implementation}).
+ Finally, we implicitly force an update of the page's property
+ sheet by calling the the
+ QDesignerPropertySheetExtension::setChanged() function.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 4
+
+ Note also the initialize() function: The \c initialize() function
+ takes a QDesignerFormEditorInterface object as argument.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 5
+
+ When creating extensions associated with custom widget plugins, we
+ need to access \QD's current extension manager which we retrieve
+ from the QDesignerFormEditorInterface parameter.
+
+ In addition to allowing you to manipulate a widget's properties,
+ the QExtensionManager class provides extension management
+ facilities for \QD. Using \QD's current extension manager you can
+ retrieve the extension for a given object. You can also register
+ and unregister an extension for a given object. Remember that an
+ extension is an object which modifies the behavior of \QD.
+
+ When registrering an extension, it is actually the associated
+ extension factory that is registered. In \QD, extension factories
+ are used to look up and create named extensions as they are
+ required. So, in this example, the container extension itself is
+ not created until \QD must know whether the associated widget is a
+ container, or not.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 6
+
+ We create a \c MultiPageWidgetExtensionFactory object that we
+ register using \QD's current \l {QExtensionManager}{extension
+ manager} retrieved from the QDesignerFormEditorInterface
+ parameter. The first argument is the newly created factory and the
+ second argument is an extension identifier which is a string. The
+ \c Q_TYPEID() macro simply convert the string into a
+ QLatin1String.
+
+ The \c MultiPageWidgetExtensionFactory class is a subclass of
+ QExtensionFactory. When \QD must know whether a widget is a
+ container, or not, \QD's extension manager will run through all
+ its registered factories invoking the first one which is able to
+ create a container extension for that widget. This factory will in
+ turn create a \c MultiPageWidgetExtension object.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 7
+
+ Finally, take a look at the \c domXml() function. This function
+ includes default settings for the widget in the standard XML
+ format used by \QD. In this case, we specify the container's first
+ page; any inital pages of a multi-page widget must be specified
+ within this function.
+
+ \snippet examples/designer/containerextension/multipagewidgetplugin.cpp 14
+
+ Remember to use the Q_EXPORT_PLUGIN2() macro to export the
+ MultiPageWidgetPlugin class for use with Qt's plugin handling
+ classes: This macro ensures that \QD can access and construct the
+ custom widget. Without this macro, there is no way for \QD to use
+ the widget.
+
+ \section1 MultiPageWidgetExtensionFactory Class Definition
+
+ The \c MultiPageWidgetExtensionFactory class inherits QExtensionFactory
+ which provides a standard extension factory for \QD.
+
+ \snippet examples/designer/containerextension/multipagewidgetextensionfactory.h 0
+
+ The subclass's purpose is to reimplement the
+ QExtensionFactory::createExtension() function, making it able to
+ create a \c MultiPageWidget container extension.
+
+
+ \section1 MultiPageWidgetExtensionFactory Class Implementation
+
+ The class constructor simply calls the QExtensionFactory base
+ class constructor:
+
+ \snippet examples/designer/containerextension/multipagewidgetextensionfactory.cpp 0
+
+ As described above, the factory is invoked when \QD must know
+ whether the associated widget is a container, or not.
+
+ \snippet examples/designer/containerextension/multipagewidgetextensionfactory.cpp 1
+
+ \QD's behavior is the same whether the requested extension is
+ associated with a container, a member sheet, a property sheet or a
+ task menu: Its extension manager runs through all its registered
+ extension factories calling \c createExtension() for each until
+ one responds by creating the requested extension.
+
+ So the first thing we do in \c
+ MultiPageWidgetExtensionFactory::createExtension() is to check if
+ the QObject, for which the extension is requested, is in fact a \c
+ MultiPageWidget object. Then we check if the requested extension
+ is a container extension.
+
+ If the object is a MultiPageWidget requesting a container
+ extension, we create and return a \c MultiPageWidgetExtension
+ object. Otherwise, we simply return a null pointer, allowing \QD's
+ extension manager to continue its search through the registered
+ factories.
+
+
+ \section1 MultiPageWidgetContainerExtension Class Definition
+
+ The \c MultiPageWidgetContainerExtension class inherits
+ QDesignerContainerExtension which allows you to add (and delete)
+ pages to a multi-page container plugin in \QD.
+
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.h 0
+
+ It is important to recognize that the QDesignerContainerExtension
+ class only is intended to provide \QD access to your custom
+ multi-page widget's functionality; your custom multi-page widget
+ must implement functionality corresponding to the extension's
+ functions.
+
+ Note also that we implement a constructor that takes \e two
+ arguments: the parent widget, and the \c MultiPageWidget object
+ for which the task menu is requested.
+
+ QDesignerContainerExtension provides a couple of menu entries in
+ \QD's task menu by default, enabling the user to add or delete
+ pages to the associated custom multi-page widget in \QD's
+ workspace.
+
+ \section1 MultiPageWidgetContainerExtension Class Implementation
+
+ In the constructor we save the reference to the \c MultiPageWidget
+ object sent as parameter, i.e the widget associated with the
+ extension. We will need this later to access the custom multi-page
+ widget performing the requested actions.
+
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 0
+
+ To fully enable \QD to manage and manipulate your custom
+ multi-page widget, you must reimplement all the functions of
+ QDesignerContainerExtension:
+
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 1
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 2
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 3
+
+ You must reimplement \l
+ {QDesignerContainerExtension::addWidget()}{addWidget()} adding a
+ given page to the container, \l
+ {QDesignerContainerExtension::count()}{count()} returning the
+ number of pages in the container, and \l
+ {QDesignerContainerExtension::currentIndex()}{currentIndex()}
+ returning the index of the currently selected page.
+
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 4
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 5
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 6
+ \codeline
+ \snippet examples/designer/containerextension/multipagewidgetcontainerextension.cpp 7
+
+ You must reimplement \l
+ {QDesignerContainerExtension::insertWidget()}{insertWidget()}
+ adding a given page to the container at a given index, \l
+ {QDesignerContainerExtension::remove()}{remove()} deleting the
+ page at a given index, \l
+ {QDesignerContainerExtension::setCurrentIndex()}{setCurrentIndex()}
+ setting the index of the currently selected page, and finally \l
+ {QDesignerContainerExtension::widget()}{widget()} returning the
+ page at a given index.
+
+ \section1 MultiPageWidget Class Definition
+
+ The MultiPageWidget class is a custom container widget that lets
+ the user manipulate and populate its pages, and navigate among
+ these using a combobox.
+
+ \snippet examples/designer/containerextension/multipagewidget.h 0
+
+ The main detail to observe is that your custom multi-page widget
+ must implement functionality corresponding to the
+ QDesignerContainerExtension's member functions since the
+ QDesignerContainerExtension class only is intended to provide Qt
+ Designer access to your custom multi-page widget's functionality.
+
+ In addition, we declare the \c currentIndex and \c pageTitle
+ properties, and their associated set and get functions. By
+ declaring these attributes as properties, we allow \QD to manage
+ them in the same way it manages the properties the MultiPageWidget
+ widget inherits from QWidget and QObject, for example featuring
+ the property editor.
+
+ Note the \c STORED attribute in the declaration of the \c
+ pageTitle property: The \c STORED attribute indicates persistence,
+ i.e. it declares whether the property's value must be remembered
+ when storing an object's state. As mentioned above, we have chosen
+ to store the page title using the QWidget::windowTitle property to
+ be able to give each page their own title. For that reason the \c
+ pageTitle property is a "fake" property, provided for editing
+ purposes, and doesn't need to be stored.
+
+ We must also implement and emit the currentIndexChanged() and
+ pageTitleChanged() signals to ensure that \QD's property editor is
+ updated whenever the user views another page or changes one of the
+ page titles.
+
+ See the MultiPageWidget class \l
+ {designer/containerextension/multipagewidget.cpp}{implementation}
+ for more details.
+*/
diff --git a/doc/src/examples/context2d.qdoc b/doc/src/examples/context2d.qdoc
new file mode 100644
index 0000000..a45b8bb
--- /dev/null
+++ b/doc/src/examples/context2d.qdoc
@@ -0,0 +1,353 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/context2d
+ \title Context2D Example
+
+ This Qt Script example is an implementation of the Context2D API.
+
+ \image context2d-example.png
+
+ Context2D is part of the specification for the HTML \c{<canvas>}
+ element. It can be used to draw graphics via scripting. A good
+ resource for learning more about the HTML \c{<canvas>} element is
+ the \l{http://developer.mozilla.org/en/docs/HTML:Canvas}{Mozilla Developer Center}.
+
+ \section1 Using The HTML Canvas Element in a Web Browser
+
+ First, let's look at how the \c{<canvas>} element is typically
+ used in a web browser. The following HTML snippet defines a
+ canvas of size 400x400 pixels with id \c{mycanvas}:
+
+ \code
+ <canvas width="400" height="400" id="mycanvas">Fallback content goes here.</canvas>
+ \endcode
+
+ To draw on the canvas, we must first obtain a reference to the
+ DOM element corresponding to the \c{<canvas>} tag and then call
+ the element's getContext() function. The resulting object
+ implements the Context2D API that we use to draw.
+
+ \code
+ <script>
+ var canvas = document.getElementById("mycanvas");
+ var ctx = canvas.getContext("2d");
+
+ // Draw a face
+ ctx.beginPath();
+ ctx.arc(75,75,50,0,Math.PI*2,true); // Outer circle
+ ctx.moveTo(110,75);
+ ctx.arc(75,75,35,0,Math.PI,false); // Mouth
+ ctx.moveTo(65,65);
+ ctx.arc(60,65,5,0,Math.PI*2,true); // Left eye
+ ctx.moveTo(95,65);
+ ctx.arc(90,65,5,0,Math.PI*2,true); // Right eye
+ ctx.stroke();
+ </script>
+ \endcode
+
+ When the page is rendered by a browser that supports the
+ \c{<canvas>} tag, this would be the result:
+
+ \image context2d-example-smileysmile.png
+
+ \section1 Using Qt Script to script a Canvas
+
+ The goal of this example is to be able to evaluate scripts
+ that use the Context2D API, and render the results. Basic
+ interaction (mouse, keyboard) should also be supported.
+ In other words, we want to present scripts with an execution
+ environment that very much resembles that of a web browser. Of
+ course, our environment is only a small subset of what a browser
+ provides; i.e. we don't provide a full DOM API, only what is
+ needed to run "self-contained" Context2D scripts (i.e. scripts
+ that don't depend on other parts of the DOM document).
+
+ Our "Context2D-browser" is set up through the following steps:
+ \list
+ \o Create an Environment.
+ \o Create a Context2D, and a QContext2DCanvas widget to render it.
+ \o Add the canvas object to the environment; this will enable
+ scripts to obtain a reference to it.
+ \o Evaluate scripts in the environment.
+ \endlist
+
+ Once a script has been evaluated, the application handles any
+ timer events and input events that occur subsequently
+ (i.e. forwards events to their associated script targets).
+
+ \section1 The Context2D Class
+
+ The "heart" of this example is the Context2D C++ class that implements
+ the drawing API. Its interface is defined in terms of properties
+ and slots. Note that this class isn't tied to Qt Script in any
+ way.
+
+ \snippet examples/script/context2d/context2d.h 0
+
+ The properties define various aspects of the Context2D
+ configuration.
+
+ \snippet examples/script/context2d/context2d.h 1
+
+ The slots define the operations that can be performed.
+
+ \snippet examples/script/context2d/context2d.h 2
+
+ The changed() signal is emitted when the contents of the drawing
+ area has changed, so that clients associated with the Context2D
+ object (i.e. the canvas widget that renders it) are notified.
+
+ \section2 Implementation
+
+ Conveniently enough, the concepts, data structures and operations
+ of the Context2D API map more or less directly to Qt's painting
+ API. Conceptually, all we have to do is initialize a QPainter
+ according to the Context2D properties, and use functions like
+ QPainter::strokePath() to do the painting. Painting is done on a
+ QImage.
+
+ \snippet examples/script/context2d/context2d.cpp 0
+
+ The property accessors and most of the slots manipulate the
+ internal Context2D state in some way. For the \c{lineCap}
+ property, Context2D uses a string representation; we therefore
+ have to map it from/to a Qt::PenCapStyle. The \c{lineJoin}
+ property is handled in the same fashion. All the property setters
+ also set a \e{dirty flag} for the property; this is used to
+ decide which aspects of the QPainter that need to be updated
+ before doing the next painting operation.
+
+ \snippet examples/script/context2d/context2d.cpp 3
+
+ The implementation of the \c{fillStyle} property is interesting,
+ since the value can be either a string or a \c{CanvasGradient}.
+ We handle this by having the property be of type QVariant,
+ and check the actual type of the value to see how to handle the
+ write.
+
+ \snippet examples/script/context2d/context2d.cpp 1
+
+ Context2D does not have a concept of a paint event; painting
+ operations can happen at any time. We would like to be efficient,
+ and not have to call QPainter::begin() and QPainter::end() for
+ every painting operation, since typically many painting operations
+ will follow in quick succession. The implementations of the
+ painting operations use a helper function, beginPainting(), that
+ activates the QPainter if it isn't active already, and updates
+ the state of the QPainter (brush, pen, etc.) so that it reflects
+ the current Context2D state.
+
+ \snippet examples/script/context2d/context2d.cpp 2
+
+ The implementation of each painting operation ends by calling
+ scheduleChange(), which will post a zero-timer event if one is
+ not already pending. When the application returns to the event
+ loop later (presumably after all the drawing operations have
+ finished), the timer will trigger, QPainter::end() will be
+ called, and the changed() signal is emitted with the new
+ image as argument. The net effect is that there will typically
+ be only a single (QPainter::begin(), QPainter::end()) pair
+ executed for the full sequence of painting operations.
+
+ \section1 The Canvas Widget
+
+ \snippet examples/script/context2d/qcontext2dcanvas.h 0
+
+ The QContext2DCanvas class provides a widget that renders
+ the contents of a Context2D object. It also provides a
+ minimal scripting API, most notably the getContext() function.
+
+ \snippet examples/script/context2d/qcontext2dcanvas.cpp 3
+
+ The constructor connects to the changed() signal of the
+ Context2D object, so that the widget can update itself
+ when it needs to do so. Mouse tracking is enabled so that
+ mouse move events will be received even when no mouse
+ buttons are depressed.
+
+ \snippet examples/script/context2d/qcontext2dcanvas.cpp 0
+
+ The getContext() function asks the environment to wrap the
+ Context2D object; the resulting proxy object makes the
+ Context2D API available to scripts.
+
+ \snippet examples/script/context2d/qcontext2dcanvas.cpp 1
+
+ The paintEvent() function simply paints the contents that
+ was last received from the Context2D object.
+
+ \snippet examples/script/context2d/qcontext2dcanvas.cpp 2
+
+ The canvas widget reimplements mouse and key event handlers, and
+ forwards these events to the scripting environment. The
+ environment will take care of delivering the event to the proper
+ script target, if any.
+
+ \section1 The Environment
+
+ \snippet examples/script/context2d/environment.h 0
+
+ The Environment class provides a scripting environment where a
+ Canvas C++ object can be registered, looked up by ID (name),
+ and where scripts can be evaluated. The environment has a
+ \c{document} property, just like the scripting environment of a
+ web browser, so that scripts can call
+ \c{document.getElementById()} to obtain a reference to a canvas.
+
+ \snippet examples/script/context2d/environment.h 1
+
+ The Environment class provides the timer attributes of the DOM
+ Window Object interface. This enables us to support scripts that
+ do animation, for example.
+
+ \snippet examples/script/context2d/environment.h 2
+
+ The scriptError() signal is emitted when evaluation of a script
+ causes a script exception. For example, if a mouse press handler
+ or timeout handler causes an exception, the environment's client(s)
+ will be notified of this and can report the error.
+
+ \snippet examples/script/context2d/environment.cpp 0
+
+ The constructor initializes the environment. First it creates
+ the QScriptEngine that will be used to evaluate scripts. It
+ creates the Document object that provides the getElementById()
+ function. Note that the QScriptEngine::ExcludeSuperClassContents
+ flag is specified to avoid the wrapper objects from exposing properties
+ and methods inherited from QObject. Next, the environment wraps
+ a pointer to \e{itself}; this is to prepare for setting this object
+ as the script engine's Global Object. The properties of the standard
+ Global Object are copied, so that these will also be available in
+ our custom Global Object. We also create two self-references to the
+ object; again, this is to provide a minimal level of compabilitity
+ with the scripting environment that web browsers provide.
+
+ \snippet examples/script/context2d/environment.cpp 5
+
+ The addCanvas() function adds the given canvas to the list of
+ registered canvas objects. The canvasByName() function looks up
+ a canvas by QObject::objectName(). This function is used to
+ implement the \c{document.getElementById()} script function.
+
+ \snippet examples/script/context2d/environment.cpp 1
+
+ The setInterval() and clearInterval() implementations use a QHash
+ to map from timer ID to the QScriptValue that holds the expression
+ to evaluate when the timer is triggered. A helper function,
+ maybeEmitScriptError(), is called after invoking the script handler;
+ it will emit the scriptError() signal if the script engine has an
+ uncaught exception.
+
+ \snippet examples/script/context2d/environment.cpp 2
+
+ The toWrapper() functions creates a QScriptValue that wraps the
+ given QObject. Note that the QScriptEngine::PreferExistingWrapperObject
+ flag is specified; this guarantees that a single, unique wrapper
+ object will be returned, even if toWrapper() is called several times
+ with the same argument. This is important, since it is possible that
+ a script can set new properties on the resulting wrapper object (e.g.
+ event handlers like \c{onmousedown}), and we want these to persist.
+
+ \snippet examples/script/context2d/environment.cpp 3
+
+ The handleEvent() function determines if there exists a handler
+ for the given event in the environment, and if so, invokes that
+ handler. Since the script expects a DOM event, the Qt C++ event
+ must be converted to a DOM event before it is passed to the
+ script. This mapping is relatively straightforward, but again,
+ we only implement a subset of the full DOM API; just enough to
+ get most scripts to work.
+
+ \snippet examples/script/context2d/environment.cpp 4
+
+ The newFakeDomEvent() function is a helper function that creates
+ a new script object and initializes it with default values for
+ the attributes defined in the DOM Event and DOM UIEvent
+ interfaces.
+
+ \snippet examples/script/context2d/environment.h 3
+
+ The Document class defines two slots that become available to
+ scripts: getElementById() and getElementsByTagName().
+ When the tag name is "canvas", getElementsByTagName() will
+ return a list of all canvas objects that are registered in
+ the environment.
+
+ \section1 The Application Window
+
+ \snippet examples/script/context2d/window.cpp 0
+
+ The Window constructor creates an Environment object and
+ connects to its scriptError() signal. It then creates a
+ Context2D object, and a QContext2DCanvas widget to hold it.
+ The canvas widget is given the name \c{tutorial}, and added to the
+ environment; scripts can access the canvas by e.g.
+ \c{document.getElementById('tutorial')}.
+
+ \snippet examples/script/context2d/window.cpp 1
+
+ The window contains a list widget that is populated with
+ available scripts (read from a \c{scripts/} folder).
+
+ \snippet examples/script/context2d/window.cpp 2
+
+ When an item is selected, the corresponding script is
+ evaluated in the environment.
+
+ \snippet examples/script/context2d/window.cpp 3
+
+ When the "Run in Debugger" button is clicked, the Qt Script debugger will
+ automatically be invoked when the first statement of the script is
+ reached. This enables the user to inspect the scripting environment and
+ control further execution of the script; e.g. he can single-step through
+ the script and/or set breakpoints. It is also possible to enter script
+ statements in the debugger's console widget, e.g. to perform custom
+ Context2D drawing operations, interactively.
+
+ \snippet examples/script/context2d/window.cpp 4
+
+ If the evaluation of a script causes an uncaught exception, the Qt Script
+ debugger will automatically be invoked; this enables the user to get an
+ idea of what went wrong.
+
+*/
diff --git a/doc/src/examples/customcompleter.qdoc b/doc/src/examples/customcompleter.qdoc
new file mode 100644
index 0000000..8d0404a
--- /dev/null
+++ b/doc/src/examples/customcompleter.qdoc
@@ -0,0 +1,201 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/customcompleter
+ \title Custom Completer Example
+
+ The Custom Completer example shows how to provide string-completion
+ facilities for an input widget based on data provided by a model. The
+ completer pops up suggestions for possible words based on the first three
+ characters input by the user and the user's choice of word is inserted
+ into the \c TextEdit using QTextCursor.
+
+ \image customcompleter-example.png
+
+ \section1 Setting Up The Resource File
+
+ The Custom Completer example requires a resource file, \e wordlist.txt,
+ that has a list of words to help QCompleter complete words. This file
+ contains the following:
+
+ \quotefile examples/tools/customcompleter/customcompleter.qrc
+
+ \section1 TextEdit Class Definition
+
+ The \c TextEdit class is a subclass of QTextEdit with a custom
+ \c insertCompletion() slot and it reimplements the
+ \l{QAbstractScrollArea::keyPressEvent()}{keyPressEvent()} and the
+ \l{QWidget::focusInEvent()}{focusInEvent()} functions. \c TextEdit also
+ contains a private function \c textUnderCursor() and a private instance
+ of QCompleter, \c c.
+
+ \snippet examples/tools/customcompleter/textedit.h 0
+
+ \section1 TextEdit Class Implementation
+
+ The constructor for \c TextEdit constructs a \c TextEdit with a parent and
+ initializes \c c. The instructions to use the completer is displayed on
+ the \c TextEdit object, using the
+ \l{QTextEdit::setPlainText()}{setPlainText()} function.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 0
+
+ In addition, \c TextEdit also includes a default destructor:
+
+ \snippet examples/tools/customcompleter/textedit.cpp 1
+
+ The \c setCompleter() function accepts a \a completer and sets it up.
+ We use \c{if (c)} to check if \c c has been initialized. If it has been
+ initialized, the QObject::disconnect() function is invoked to disconnect
+ the signal from the slot. This is to ensure that no previous completer
+ object is still connected to the slot.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 2
+
+ We then instantiate \c c with \a completer and set it as \c{TextEdit}'s
+ widget. The completion mode and case sensitivity are also set and then
+ we connect the \l{QCompleter::activated()}{activated()} signal to the
+ \c insertCompletion() slot.
+
+ The \c completer() function is a getter function that returns \c c.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 3
+
+ The completer pops up the options available, based on the contents of
+ \e wordlist.txt, but the text cursor is responsible for filling in the
+ missing characters, according to the user's choice of word.
+
+ Suppose the user inputs "ACT" and accepts the completer's suggestion of
+ "ACTUAL". The \c completion string is then sent to \c insertCompletion()
+ by the completer's \l{QCompleter::activated()}{activated()} signal.
+
+ The \c insertCompletion() function is responsible for completing the word
+ using a QTextCursor object, \c tc. It validates to ensure that the
+ completer's widget is \c TextEdit before using \c tc to insert the extra
+ characters to complete the word.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 4
+
+ The figure below illustrates this process:
+
+ \image customcompleter-insertcompletion.png
+
+ \c{completion.length()} = 6
+
+ \c{c->completionPrefix().length()}=3
+
+ The difference between these two values is \c extra, which is 3. This
+ means that the last three characters from the right, "U", "A", and "L",
+ will be inserted by \c tc.
+
+ The \c textUnderCursor() function uses a QTextCursor, \c tc, to select a
+ word under the cursor and return it.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 5
+
+ The \c TextEdit class reimplements \l{QWidget::focusInEvent()}
+ {focusInEvent()} function, which is an event handler used to receive
+ keyboard focus events for the widget.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 6
+
+ The \l{QAbstractScrollArea::keyPressEvent()}{keyPressEvent()} is
+ reimplemented to ignore key events like Qt::Key_Enter, Qt::Key_Return,
+ Qt::Key_Escape, Qt::Key_Tab, and Qt::Key_Backtab so the completer can
+ handle them.
+
+ If there is an active completer, we cannot process the shortcut, Ctrl+E.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 7
+
+ We also handle other modifiers and shortcuts for which we do not want the
+ completer to respond to.
+
+ \snippet examples/tools/customcompleter/textedit.cpp 8
+
+ Finally, we pop up the completer.
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow and implements a
+ private slot, \c about(). This class also has two private functions,
+ \c createMenu() and \c modelFromFile() as well as private instances of
+ QCompleter and \c TextEdit.
+
+ \snippet examples/tools/customcompleter/mainwindow.h 0
+
+ \section1 MainWindow Class Implementation
+
+ The constructor constructs a \c MainWindow with a parent and initializes
+ the \c completer. It also instantiates a \c TextEdit and sets its
+ completer. A QStringListModel, obtained from \c modelFromFile(), is used
+ to populate the \c completer. The \c{MainWindow}'s central widget is set
+ to \c TextEdit and its size is set to 500 x 300.
+
+ \snippet examples/tools/customcompleter/mainwindow.cpp 0
+
+ The \c createMenu() function creates the necessary QAction objects needed
+ for the "File" and "Help" menu and their \l{QAction::triggered()}
+ {triggered()} signals are connected to the \c quit(), \c about(), and
+ \c aboutQt() slots respectively.
+
+ \snippet examples/tools/customcompleter/mainwindow.cpp 1
+
+ The \c modelFromFile() function accepts a \a fileName and attempts to
+ extract the contents of this file into a QStringListModel. We display the
+ Qt::WaitCursor when we are populating the QStringList, \c words, and
+ restore the mouse cursor when we are done.
+
+ \snippet examples/tools/customcompleter/mainwindow.cpp 2
+
+ The \c about() function provides a brief description about the Custom
+ Completer example.
+
+ \snippet examples/tools/customcompleter/mainwindow.cpp 3
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates \c MainWindow and invokes the
+ \l{QWidget::show()}{show()} function.
+
+ \snippet examples/tools/customcompleter/main.cpp 0
+*/
diff --git a/doc/src/examples/customsortfiltermodel.qdoc b/doc/src/examples/customsortfiltermodel.qdoc
new file mode 100644
index 0000000..5778581
--- /dev/null
+++ b/doc/src/examples/customsortfiltermodel.qdoc
@@ -0,0 +1,303 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/customsortfiltermodel
+ \title Custom Sort/Filter Model Example
+
+ The Custom Sort/Filter Model example illustrates how to subclass
+ QSortFilterProxyModel to perform advanced sorting and filtering.
+
+ \image customsortfiltermodel-example.png Screenshot of the Custom Sort/Filter Model Example
+
+ The QSortFilterProxyModel class provides support for sorting and
+ filtering data passed between another model and a view.
+
+ The model transforms the structure of a source model by mapping
+ the model indexes it supplies to new indexes, corresponding to
+ different locations, for views to use. This approach allows a
+ given source model to be restructured as far as views are
+ concerned, without requiring any transformations on the underlying
+ data and without duplicating the data in memory.
+
+ The Custom Sort/Filter Model example consists of two classes:
+
+ \list
+
+ \o The \c MySortFilterProxyModel class provides a custom proxy
+ model.
+
+ \o The \c Window class provides the main application window,
+ using the custom proxy model to sort and filter a standard
+ item model.
+
+ \endlist
+
+ We will first take a look at the \c MySortFilterProxyModel class
+ to see how the custom proxy model is implemented, then we will
+ take a look at the \c Window class to see how the model is
+ used. Finally we will take a quick look at the \c main() function.
+
+ \section1 MySortFilterProxyModel Class Definition
+
+ The \c MySortFilterProxyModel class inherits the
+ QSortFilterProxyModel class.
+
+ Since QAbstractProxyModel and its subclasses are derived from
+ QAbstractItemModel, much of the same advice about subclassing
+ normal models also applies to proxy models.
+
+ On the other hand, it is worth noting that many of
+ QSortFilterProxyModel's default implementations of functions are
+ written so that they call the equivalent functions in the relevant
+ source model. This simple proxying mechanism may need to be
+ overridden for source models with more complex behavior; in this
+ example we derive from the QSortFilterProxyModel class to ensure
+ that our filter can recognize a valid range of dates, and to
+ control the sorting behavior.
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h 0
+
+ We want to be able to filter our data by specifying a given period
+ of time. For that reason, we implement the custom \c
+ setFilterMinimumDate() and \c setFilterMaximumDate() functions as
+ well as the corresponding \c filterMinimumDate() and \c
+ filterMaximumDate() functions. We reimplement
+ QSortFilterProxyModel's \l
+ {QSortFilterProxyModel::filterAcceptsRow()}{filterAcceptsRow()}
+ function to only accept rows with valid dates, and
+ QSortFilterProxyModel::lessThan() to be able to sort the senders
+ by their email adresses. Finally, we implement a \c dateInRange()
+ convenience function that we will use to determine if a date is
+ valid.
+
+ \section1 MySortFilterProxyModel Class Implementation
+
+ The \c MySortFilterProxyModel constructor is trivial, passing the
+ parent parameter on to the base class constructor:
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 0
+
+ The most interesting parts of the \c MySortFilterProxyModel
+ implementation are the reimplementations of
+ QSortFilterProxyModel's \l
+ {QSortFilterProxyModel::filterAcceptsRow()}{filterAcceptsRow()}
+ and \l {QSortFilterProxyModel::lessThan()}{lessThan()}
+ functions. Let's first take a look at our customized \c lessThan()
+ function.
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 4
+
+ We want to sort the senders by their email adresses. The \l
+ {QSortFilterProxyModel::}{lessThan()} function is used as the <
+ operator when sorting. The default implementation handles a
+ collection of types including QDateTime and String, but in order
+ to be able to sort the senders by their email adresses we must
+ first identify the adress within the given string:
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 6
+
+ We use QRegExp to define a pattern for the adresses we are looking
+ for. The QRegExp::indexIn() function attempts to find a match in
+ the given string and returns the position of the first match, or
+ -1 if there was no match. If the given string contains the
+ pattern, we use QRegExp's \l {QRegExp::cap()}{cap()} function to
+ retrieve the actual adress. The \l {QRegExp::cap()}{cap()}
+ function returns the text captured by the \e nth
+ subexpression. The entire match has index 0 and the parenthesized
+ subexpressions have indexes starting from 1 (excluding
+ non-capturing parentheses).
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 3
+
+ The \l
+ {QSortFilterProxyModel::filterAcceptsRow()}{filterAcceptsRow()}
+ function, on the other hand, is expected to return true if the
+ given row should be included in the model. In our example, a row
+ is accepted if either the subject or the sender contains the given
+ regular expression, and the date is valid.
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 7
+
+ We use our custom \c dateInRange() function to determine if a date
+ is valid.
+
+ To be able to filter our data by specifying a given period of
+ time, we also implement functions for getting and setting the
+ minimum and maximum dates:
+
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 1
+ \codeline
+ \snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 2
+
+ The get functions, \c filterMinimumDate() and \c
+ filterMaximumDate(), are trivial and implemented as inline
+ function in the header file.
+
+ This completes our custom proxy model. Let's see how we can use it
+ in an application.
+
+ \section1 Window Class Definition
+
+ The \c CustomFilter class inherits QWidget, and provides this
+ example's main application window:
+
+ \snippet examples/itemviews/customsortfiltermodel/window.h 0
+
+ We implement two private slots, \c textFilterChanged() and \c
+ dateFilterChanged(), to respond to the user changing the filter
+ pattern, case sensitivity or any of the dates. In addition, we
+ implement a public \c setSourceModel() convenience function to set
+ up the model/ view relation.
+
+ \section1 Window Class Implementation
+
+ In this example, we have chosen to create and set the source model
+ in the \c main () function (which we will come back to later). So
+ when constructing the main application window, we assume that a
+ source model already exists and start by creating an instance of
+ our custom proxy model:
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 0
+
+ We set the \l
+ {QSortFilterProxyModel::dynamicSortFilter}{dynamicSortFilter}
+ property that holds whether the proxy model is dynamically sorted
+ and filtered. By setting this property to true, we ensure that the
+ model is sorted and filtered whenever the contents of the source
+ model change.
+
+ The main application window shows views of both the source model
+ and the proxy model. The source view is quite simple:
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 1
+
+ The QTreeView class provides a default model/view implementation
+ of a tree view; our view implements a tree representation of items
+ in the application's source model.
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 2
+
+ The QTreeView class provides a default model/view implementation
+ of a tree view; our view implements a tree representation of items
+ in the application's source model. We add our view widget to a
+ layout that we install on a corresponding group box.
+
+ The proxy model view, on the other hand, contains several widgets
+ controlling the various aspects of transforming the source model's
+ data structure:
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 3
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 4
+
+ Note that whenever the user changes one of the filtering options,
+ we must explicitly reapply the filter. This is done by connecting
+ the various editors to functions that update the proxy model.
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 5
+
+ The sorting will be handled by the view. All we have to do is to
+ enable sorting for our proxy view by setting the
+ QTreeView::sortingEnabled property (which is false by
+ default). Then we add all the filtering widgets and the proxy view
+ to a layout that we install on a corresponding group box.
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 6
+
+ Finally, after putting our two group boxes into another layout
+ that we install on our main application widget, we customize the
+ application window.
+
+ As mentioned above, we create the source model in the \c main ()
+ function, calling the \c Window::setSourceModel() function to make
+ the application use it:
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 7
+
+ The QSortFilterProxyModel::setSourceModel() function makes the
+ proxy model process the data in the given model, in this case out
+ mail model. The \l {QAbstractItemView::}{setModel()} that the
+ view widget inherits from the QAbstractItemModel class, sets the
+ model for the view to present. Note that the latter function will
+ also create and set a new selection model.
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 8
+
+ The \c textFilterChanged() function is called whenever the user
+ changes the filter pattern or the case sensitivity.
+
+ We first retrieve the preferred syntax (the QRegExp::PatternSyntax
+ enum is used to interpret the meaning of the given pattern), then
+ we determine the preferred case sensitivity. Based on these
+ preferences and the current filter pattern, we set the proxy
+ model's \l {QSortFilterProxyModel::}{filterRegExp} property. The
+ \l {QSortFilterProxyModel::}{filterRegExp} property holds the
+ regular expression used to filter the contents of the source
+ model. Note that calling QSortFilterProxyModel's \l
+ {QSortFilterProxyModel::}{setFilterRegExp()} function also updates
+ the model.
+
+ \snippet examples/itemviews/customsortfiltermodel/window.cpp 9
+
+ The \c dateFilterChanged() function is called whenever the user
+ modifies the range of valid dates. We retrieve the new dates from
+ the user interface, and call the corresponding functions (provided
+ by our custom proxy model) to set the proxy model's minimum and
+ maximum dates. As we explained above, calling these functions also
+ updates the model.
+
+ \section1 The Main() Function
+
+ In this example, we have separated the application from the source
+ model by creating the model in the \c main () function. First we
+ create the application, then we create the source model:
+
+ \snippet examples/itemviews/customsortfiltermodel/main.cpp 0
+
+ The \c createMailModel() function is a convenience function
+ provided to simplify the constructor. All it does is to create and
+ return a model describing a collection of emails. The model is an
+ instance of the QStandardItemModel class, i.e., a generic model
+ for storing custom data typically used as a repository for
+ standard Qt data types. Each mail description is added to the
+ model using \c addMail(), another convenience function. See \l
+ {itemviews/customsortfiltermodel/main.cpp}{main.cpp} for details.
+*/
diff --git a/doc/src/examples/customtype.qdoc b/doc/src/examples/customtype.qdoc
new file mode 100644
index 0000000..ffeccc3
--- /dev/null
+++ b/doc/src/examples/customtype.qdoc
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/customtype
+ \title Custom Type Example
+
+ The Custom Type example shows how to integrate a custom type into Qt's
+ meta-object system.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Overview
+
+ Qt provides a range of standard value types that are used to provide
+ rich and meaningful APIs. These types are integrated with the meta-object
+ system, enabling them to be stored in QVariant objects, written out in
+ debugging information and sent between components in signal-slot
+ communication.
+
+ Custom types can also be integrated with the meta-object system as long as
+ they are written to conform to some simple guidelines. In this example, we
+ introduce a simple \c Message class, we describe how we make it work with
+ QVariant, and we show how it can be extended to generate a printable
+ representation of itself for use in debugging output.
+
+ \section1 The Message Class Definition
+
+ The \c Message class is a simple value class that contains two pieces
+ of information (a QString and a QStringList), each of which can be read
+ using trivial getter functions:
+
+ \snippet examples/tools/customtype/message.h custom type definition
+
+ The default constructor, copy constructor and destructor are
+ all required, and must be public, if the type is to be integrated into the
+ meta-object system. Other than this, we are free to implement whatever we
+ need to make the type do what we want, so we also include a constructor
+ that lets us set the type's data members.
+
+ To enable the type to be used with QVariant, we declare it using the
+ Q_DECLARE_METATYPE() macro:
+
+ \snippet examples/tools/customtype/message.h custom type meta-type declaration
+
+ We do not need to write any additional code to accompany this macro.
+
+ To allow us to see a readable description of each \c Message object when it
+ is sent to the debug output stream, we define a streaming operator:
+
+ \snippet examples/tools/customtype/message.h custom type streaming operator
+
+ This facility is useful if you need to insert tracing statements in your
+ code for debugging purposes.
+
+ \section1 The Message Class Implementation
+
+ The implementation of the default constructor, copy constructor and destructor
+ are straightforward for the \c Message class:
+
+ \snippet examples/tools/customtype/message.cpp Message class implementation
+
+ The streaming operator is implemented in the following way:
+
+ \snippet examples/tools/customtype/message.cpp custom type streaming operator
+
+ Here, we want to represent each value depending on how many lines are stored
+ in the message body. We stream text to the QDebug object passed to the
+ operator and return the QDebug object obtained from its maybeSpace() member
+ function; this is described in more detail in the
+ \l{Creating Custom Qt Types#Making the Type Printable}{Creating Custom Qt Types}
+ document.
+
+ We include the code for the getter functions for completeness:
+
+ \snippet examples/tools/customtype/message.cpp getter functions
+
+ With the type fully defined, implemented, and integrated with the
+ meta-object system, we can now use it.
+
+ \section1 Using the Message
+
+ In the example's \c{main()} function, we show how a \c Message object can
+ be printed to the console by sending it to the debug stream:
+
+ \snippet examples/tools/customtype/main.cpp printing a custom type
+
+ You can use the type with QVariant in exactly the same way as you would
+ use standard Qt value types. Here's how to store a value using the
+ QVariant::setValue() function:
+
+ \snippet examples/tools/customtype/main.cpp storing a custom value
+
+ Alternatively, the qVariantFromValue() and qVariantSetValue() functions
+ can be used if you are using a compiler without support for member template
+ functions.
+
+ The value can be retrieved using the QVariant::value() member template
+ function:
+
+ \snippet examples/tools/customtype/main.cpp retrieving a custom value
+
+ Alternatively, the qVariantValue() template function can be used if
+ you are using a compiler without support for member template functions.
+
+ \section1 Further Reading
+
+ The custom \c Message type can also be used with direct signal-slot
+ connections; see the \l{Custom Type Sending Example} for a demonstration
+ of this.
+ To register a custom type for use with queued signals and slots, such as
+ those used in cross-thread communication, see the
+ \l{Queued Custom Type Example}.
+
+ More information on using custom types with Qt can be found in the
+ \l{Creating Custom Qt Types} document.
+*/
diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc
new file mode 100644
index 0000000..d335c28
--- /dev/null
+++ b/doc/src/examples/customtypesending.qdoc
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/customtypesending
+ \title Custom Type Sending Example
+
+ The Custom Type Sending example shows how to use a custom type with signals
+ and slots.
+
+ \image customtypesending-example.png
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Overview
+
+ In the \l{Custom Type Example}, we showed how to integrate custom types
+ with the meta-object system, enabling them to be stored in QVariant
+ objects, written out in debugging information and used in signal-slot
+ communication.
+
+ In this example, we demonstrate that the preparations made to the
+ \c Message class and its declaration with Q_DECLARE_METATYPE() enable it
+ to be used with direct signal-slot connections. We do this by creating
+ a \c Window class containing signals and slots whose signatures include
+ \c Message arguments.
+
+ \section1 The Window Class Definition
+
+ We define a simple \c Window class with a signal and public slot that
+ allow a \c Message object to be sent via a signal-slot connection:
+
+ \snippet examples/tools/customtypesending/window.h Window class definition
+
+ The window will contain a text editor to show the contents of a message
+ and a push button that the user can click to send a message. To facilitate
+ this, we also define the \c sendMessage() slot. We also keep a \c Message
+ instance in the \c thisMessage private variable which holds the actual
+ message to be sent.
+
+ \section1 The Window Class Implementation
+
+ The \c Window constructor sets up a user interface containing a text
+ editor and a push button.
+
+ \snippet examples/tools/customtypesending/window.cpp Window constructor
+
+ The button's \l{QPushButton::}{clicked()} signal is connected to the
+ window's \c{sendMessage()} slot, which emits the \c{messageSent(Message)}
+ signal with the \c Message held by the \c thisMessage variable:
+
+ \snippet examples/tools/customtypesending/window.cpp sending a message
+
+ We implement a slot to allow the message to be received, and this also
+ lets us set the message in the window programatically:
+
+ \snippet examples/tools/customtypesending/window.cpp receiving a message
+
+ In this function, we simply assign the new message to \c thisMessage
+ and update the text in the editor.
+
+ \section1 Making the Connection
+
+ In the example's \c{main()} function, we perform the connection between
+ two instances of the \c Window class:
+
+ \snippet examples/tools/customtypesending/main.cpp main function
+
+ We set the message for the first window and connect the
+ \c{messageSent(Message)} signal from each window to the other's
+ \c{setMessage(Message)} slot. Since the signals and slots mechanism is only
+ concerned with the type, we can simplify the signatures of both the
+ signal and slot when we make the connection.
+
+ When the user clicks on the \gui{Send message} button in either window,
+ the message shown will be emitted in a signal that the other window will
+ receive and display.
+
+ \section1 Further Reading
+
+ Although the custom \c Message type can be used with direct signals and
+ slots, an additional registration step needs to be performed if you want
+ to use it with queued signal-slot connections. See the
+ \l{Queued Custom Type Example} for details.
+
+ More information on using custom types with Qt can be found in the
+ \l{Creating Custom Qt Types} document.
+*/
diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc
new file mode 100644
index 0000000..31ad65b
--- /dev/null
+++ b/doc/src/examples/customwidgetplugin.qdoc
@@ -0,0 +1,252 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/customwidgetplugin
+ \title Custom Widget Plugin Example
+
+ The Custom Widget example shows how to create a custom widget plugin for \QD.
+
+ \image customwidgetplugin-example.png
+
+ In this example, the custom widget used is based on the
+ \l{widgets/analogclock}{Analog Clock example}, and does not provide any custom
+ signals or slots.
+
+ \section1 Preparation
+
+ To provide a custom widget that can be used with \QD, we need to supply a
+ self-contained implementation and provide a plugin interface. In this
+ example, we reuse the \l{widgets/analogclock}{Analog Clock example} for
+ convenience.
+
+ Since custom widgets plugins rely on components supplied with \QD, the
+ project file that we use needs to contain information about \QD's
+ library components:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.pro 2
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.pro 0
+
+ The \c TEMPLATE variable's value makes \c qmake create the custom
+ widget as a library. Later, we will ensure that the widget will be
+ recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro
+ to export the relevant widget information.
+
+ The \c CONFIG variable contains two values, \c designer and \c
+ plugin:
+
+ \list
+
+ \o \c designer: Since custom widgets plugins rely on components
+ supplied with \QD, this value ensures that our plugin links
+ against \QD's library (\c libQtDesigner.so).
+
+ \o \c plugin: We also need to ensure that \c qmake considers the
+ custom widget a plugin library.
+
+ \endlist
+
+ When Qt is configured to build in both debug and release modes,
+ \QD will be built in release mode. When this occurs, it is
+ necessary to ensure that plugins are also built in release
+ mode. For that reason we add the \c debug_and_release value to the
+ \c CONFIG variable. Otherwise, if a plugin is built in a mode that
+ is incompatible with \QD, it won't be loaded and
+ installed.
+
+ The header and source files for the widget are declared in the usual way,
+ and we provide an implementation of the plugin interface so that \QD can
+ use the custom widget:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.pro 3
+
+ It is also important to ensure that the plugin is installed in a
+ location that is searched by \QD. We do this by specifying a
+ target path for the project and adding it to the list of items to
+ install:
+
+ \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc 0
+
+ The custom widget is created as a library, and will be installed
+ alongside the other \QD plugins when the project is installed
+ (using \c{make install} or an equivalent installation procedure).
+ Later, we will ensure that it is recognized as a plugin by \QD by
+ using the Q_EXPORT_PLUGIN2() macro to export the relevant widget
+ information.
+
+ Note that if you want the plugins to appear in a Visual Studio
+ integration, the plugins must be built in release mode and their
+ libraries must be copied into the plugin directory in the install
+ path of the integration (for an example, see \c {C:/program
+ files/trolltech as/visual studio integration/plugins}).
+
+ For more information about plugins, see the \l {How to
+ Create Qt Plugins} documentation.
+
+ \section1 AnalogClock Class Definition and Implementation
+
+ The \c AnalogClock class is defined and implemented in exactly the same
+ way as described in the \l{widgets/analogclock}{Analog Clock example}.
+ Since the class is self-contained, and does not require any external
+ configuration, it can be used without modification as a custom widget in
+ \QD.
+
+ \section1 AnalogClockPlugin Class Definition
+
+ The \c AnalogClock class is exposed to \QD through the \c
+ AnalogClockPlugin class. This class inherits from both QObject and
+ the QDesignerCustomWidgetInterface class, and implements an
+ interface defined by QDesignerCustomWidgetInterface:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0
+
+ The functions provide information about the widget that \QD can use in
+ the \l{Getting to Know Qt Designer#WidgetBox}{widget box}.
+ The \c initialized private member variable is used to record whether
+ the plugin has been initialized by \QD.
+
+ Note that the only part of the class definition that is specific to
+ this particular custom widget is the class name.
+
+ \section1 AnalogClockPlugin Implementation
+
+ The class constructor simply calls the QObject base class constructor
+ and sets the \c initialized variable to \c false.
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 0
+
+ \QD will initialize the plugin when it is required by calling the
+ \c initialize() function:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 1
+
+ In this example, the \c initialized private variable is tested, and only
+ set to \c true if the plugin is not already initialized. Although, this
+ plugin does not require any special code to be executed when it is
+ initialized, we could include such code after the test for initialization.
+
+ The \c isInitialized() function lets \QD know whether the plugin is
+ ready for use:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 2
+
+ Instances of the custom widget are supplied by the \c createWidget()
+ function. The implementation for the analog clock is straightforward:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 3
+
+ In this case, the custom widget only requires a \c parent to be specified.
+ If other arguments need to be supplied to the widget, they can be
+ introduced here.
+
+ The following functions provide information for \QD to use to represent
+ the widget in the widget box.
+ The \c name() function returns the name of class that provides the
+ custom widget:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 4
+
+ The \c group() function is used to describe the type of widget that the
+ custom widget belongs to:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 5
+
+ The widget plugin will be placed in a section identified by its
+ group name in \QD's widget box. The icon used to represent the
+ widget in the widget box is returned by the \c icon() function:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 6
+
+ In this case, we return a null icon to indicate that we have no icon
+ that can be used to represent the widget.
+
+ A tool tip and "What's This?" help can be supplied for the custom widget's
+ entry in the widget box. The \c toolTip() function should return a short
+ message describing the widget:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 7
+
+ The \c whatsThis() function can return a longer description:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 8
+
+ The \c isContainer() function tells \QD whether the widget is supposed to
+ be used as a container for other widgets. If not, \QD will not allow the
+ user to place widgets inside it.
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 9
+
+ Most widgets in Qt can contain child widgets, but it only makes sense
+ to use dedicated container widgets for this purpose in \QD. By returning
+ \c false, we indicate that the custom widget cannot hold other widgets;
+ if we returned true, \QD would allow other widgets to be placed inside
+ the analog clock and a layout to be defined.
+
+ The \c domXml() function provides a way to include default settings for
+ the widget in the standard XML format used by \QD. In this case, we only
+ specify the widget's geometry:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 10
+
+ If the widget provides a reasonable size hint, it is not necessary to
+ define it here. In addition, returning an empty string instead of a
+ \c{<widget>} element will tell \QD not to install the widget in the
+ widget box.
+
+ To make the analog clock widget usable by applications, we implement
+ the \c includeFile() function to return the name of the header file
+ containing the custom widget class definition:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 12
+
+ Finally, we use the Q_EXPORT_PLUGIN2() macro to export the \c
+ AnalogClockPlugin class for use with \QD:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.cpp 13
+
+ This macro ensures that \QD can access and construct the custom widget.
+ Without this macro, there is no way for \QD to use the widget.
+
+ It is important to note that you can only use the Q_EXPORT_PLUGIN2()
+ macro once in any implementation. If you have several custom widgets in
+ an implementation that you wish to make available to \QD, you will need
+ to implement \l{QDesignerCustomWidgetCollectionInterface}.
+*/
diff --git a/doc/src/examples/dbscreen.qdoc b/doc/src/examples/dbscreen.qdoc
new file mode 100644
index 0000000..88f6d51
--- /dev/null
+++ b/doc/src/examples/dbscreen.qdoc
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qws/dbscreen
+ \title Double Buffered Graphics Driver Example
+
+ The Double Buffered Graphics Driver example shows how to write your own
+ double buffered graphics driver and add it to Qt for Embedded Linux.
+
+ Similar to the \l{Accelerated Graphics Driver Example}, there are three steps
+ to writing and implementing this graphics driver:
+
+ \list 1
+ \o \l {Step 1: Creating a Custom Graphics Driver}
+ {Creating a Custom Graphics Driver}
+
+ \o \l {Step 2: Implementing the Back Buffer}
+ {Implementing the Back Buffer}
+
+ \o \l {Step 3: Creating the Driver Plugin}
+ {Creating the Driver Plugin}
+
+ \endlist
+
+ After compiling the example code, install the graphics driver plugin with
+ the command \c {make install}. To start an application using the graphics
+ driver, you can either set the environment variable \l QWS_DISPLAY and
+ then run the application, or you can just run the application using the
+ \c -display switch.
+
+ Note that this is a minimal example and this driver will not work well
+ with widgets painting themself directly to the screen (e.g. widgets with
+ the Qt::WA_PaintOnScreen window attribute set). Also, the example requires
+ the Linux framebuffer to be set up correctly and with the correct device
+ permissions. For further information, refer to
+ \l{Testing the Linux Framebuffer}.
+
+ \section1 Step 1: Creating a Custom Graphics Driver
+
+ Usually, a custom graphics driver is created by subclassing the QScreen
+ class, the base class for implementing screen or graphics drivers in
+ Qt for Embedded Linux. In this example, however, we subclass the QLinuxFbScreen
+ class instead, to ensure that our driver uses the Linux framebuffer.
+
+ For our graphics driver, the \c DBScreen class, we reimplement five
+ functions belonging to QScreen:
+
+ \list
+ \o \l{QScreen::initDevice()}{initDevice()},
+ \o \l{QScreen::shutdownDevice()}{shutdownDevice()},
+ \o \l{QScreen::blit()}{blit()},
+ \o \l{QScreen::solidFill()}{solidFill()}, and
+ \o \l{QScreen::exposeRegion()}{exposeRegion()}.
+ \endlist
+
+ \snippet examples/qws/dbscreen/dbscreen.h 0
+
+ In addition to the abovementioned functions, there is a private instance
+ of QPainter and QImage - \c painter, used for drawing operations on
+ the back buffer, and \c image, the back buffer itself.
+
+ \section1 Step 2: Implementing the Back Buffer
+
+ The graphics driver must carry out three main functions:
+
+ \list 1
+ \o Allocate the back buffer on startup and deallocate it on shutdown.
+ \o Draw to the back buffer instead of directly to the screen
+ (which is what QLinuxFbScreen does).
+ \o Copy the back buffer to the screen whenever a screen update is
+ done.
+ \endlist
+
+ \section2 Device initializing and shutdown
+
+ We first reimplement \c initDevice() and \c shutdownDevice().
+
+ The \c initDevice() function initializes the framebuffer. We reimplement
+ this function to enable accelerated drivers to set up the graphic card.
+ For this example, we first call the super class' implementation to set up
+ the Linux framebuffer. If this call returns \c false, we return \c false.
+ Otherwise, we initialize the screen cursor with
+ QScreenCursor::initSoftwareCursor() as well as instantiate \c image and
+ \c painter. Then, we return \c true.
+
+ \snippet examples/qws/dbscreen/dbscreen.cpp 0
+
+ The \c shutdownDevice() function's default implementation only hides the
+ mouse cursor. Hence, we reimplement it to carry out the necessary cleanup
+ before the Qt for Embedded Linux server exits.
+
+ \snippet examples/qws/dbscreen/dbscreen.cpp 1
+
+ Again, we call the super class implementation to shutdown the Linux
+ framebuffer prior to deleting \c image and \c painter.
+
+ \section2 Drawing to the back buffer
+
+ We move on to the drawing functions - \c solidFill() and \c blit(). In
+ QLinuxFbScreen, these functions draw directly to the Linux framebuffer;
+ but in our driver we reimplement them to draw to the back buffer instead.
+
+ \snippet examples/qws/dbscreen/dbscreen.cpp 2
+
+ The \c solidFill() function is called from \c exposeRegion() to fill the
+ given \c region of the screen with the specified \c color. In this
+ example, we use \c painter to fill rectangles in \c image, the back
+ buffer, according to the given region.
+
+ \snippet examples/qws/dbscreen/dbscreen.cpp 3
+
+ The \c blit() function is also called from \c exposeRegion() to copy the
+ given QRegion object, \c region, in the given QImage object, \c image, to
+ the QPoint object specified by \c topLeft. Once again we use \c painter
+ to draw in the back buffer, \c image.
+
+ \section2 Displaying the buffer on the screen
+
+ The \c exposeRegion() function is called by the Qt for Embedded Linux server
+ whenever a screen update is required. The given \c region is the screen
+ region that needs to be updated and \c changing is is the index into
+ QWSServer::clientWindows() of the window that caused the update.
+
+ \snippet examples/qws/dbscreen/dbscreen.cpp 4
+
+ In our implementation, we first call the super class implementation to
+ ensure that \c solidFill() and \c blit() will be called correctly. This
+ causes the changed areas to be updated in the back buffer. We then call
+ the super class' implementation of \c blit() to copy the updated region
+ from the back buffer into the Linux framebuffer.
+
+ \section1 Step 3: Creating the Driver Plugin
+
+ Qt provides a high level API for writing Qt extentions. One of the plugin
+ base classes provided is QScreenDriverPlugin, which we use in this example
+ to create our screen driver plugin.
+
+ \snippet examples/qws/dbscreen/dbscreendriverplugin.cpp 0
+
+ There are only two functions to reimplement:
+
+ \list
+ \o \l{QScreenDriverPlugin::create()}{create()} - creates a driver
+ matching the given key
+ \o \l{QScreenDriverPlugin::create()}{keys()} - returns a list of
+ valid keys representing the drivers supported by the plugin
+ \endlist
+
+ \snippet examples/qws/dbscreen/dbscreendriverplugin.cpp 1
+ \codeline
+ \snippet examples/qws/dbscreen/dbscreendriverplugin.cpp 2
+
+ Our plugin will only support one driver, \c dbscreen.
+
+ Lastly, we export the plugin.
+
+ \snippet examples/qws/dbscreen/dbscreendriverplugin.cpp 3
+
+ For detailed information about the Qt plugin system see
+ \l{How to Create Qt Plugins.}
+*/
diff --git a/doc/src/examples/dbus-chat.qdoc b/doc/src/examples/dbus-chat.qdoc
new file mode 100644
index 0000000..f062c23
--- /dev/null
+++ b/doc/src/examples/dbus-chat.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dbus/dbus-chat
+ \title D-Bus Chat Example
+
+ The D-Bus Chat example shows how to use D-Bus to communicate between two
+ applications.
+
+ \image dbus-chat-example.png
+*/
diff --git a/doc/src/examples/dbus-listnames.qdoc b/doc/src/examples/dbus-listnames.qdoc
new file mode 100644
index 0000000..5b13abe
--- /dev/null
+++ b/doc/src/examples/dbus-listnames.qdoc
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dbus/listnames
+ \title D-Bus List Names Example
+
+ The D-Bus List Names examples shows how to query D-Bus for a list of service names.
+*/
diff --git a/doc/src/examples/dbus-pingpong.qdoc b/doc/src/examples/dbus-pingpong.qdoc
new file mode 100644
index 0000000..6b15978
--- /dev/null
+++ b/doc/src/examples/dbus-pingpong.qdoc
@@ -0,0 +1,9 @@
+/*!
+ \example dbus/pingpong
+ \title D-Bus Ping Pong Example
+
+ The D-Bus Ping Pong example provides a basic demonstration of D-Bus
+ interfaces.
+
+ \quotefile doc/src/snippets/dbus-pingpong-example.qdoc
+*/
diff --git a/doc/src/examples/dbus-remotecontrolledcar.qdoc b/doc/src/examples/dbus-remotecontrolledcar.qdoc
new file mode 100644
index 0000000..ef31bd2
--- /dev/null
+++ b/doc/src/examples/dbus-remotecontrolledcar.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dbus/remotecontrolledcar
+ \title D-Bus Remote Controlled Car Example
+
+ The Remote Controlled Car example shows how to use D-Bus to control one
+ application using another.
+
+ \image remotecontrolledcar-car-example.png
+*/
diff --git a/doc/src/examples/defaultprototypes.qdoc b/doc/src/examples/defaultprototypes.qdoc
new file mode 100644
index 0000000..dc65902
--- /dev/null
+++ b/doc/src/examples/defaultprototypes.qdoc
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/defaultprototypes
+ \title Default Prototypes Example
+
+ This Qt Script example shows how to use default prototypes
+ to make a non-QObject-based type scriptable.
+
+ \image defaultprototypes-example.png
+
+ With QScriptEngine::setDefaultPrototype() you can specify
+ a QtScript object that defines a scripting interface for
+ a C++ type; Qt Script operations on values of such types
+ will then be delegated to your prototype object. In this
+ example, a simple scripting interface for QListWidgetItem is
+ defined, so that the text of items can easily be accessed from
+ script code.
+
+ To define a scripting API for QListWidgetItem in terms of
+ Qt properties and slots, we subclass QObject and QScriptable.
+
+ \snippet examples/script/defaultprototypes/prototypes.h 0
+
+ A single property, \c{text}, is defined, along with a slot,
+ \c{toString}.
+
+ \snippet examples/script/defaultprototypes/prototypes.cpp 0
+
+ The implementation of the property accessors use
+ the qscriptvalue_cast() function to cast the script object
+ to a QListWidgetItem pointer. The normal C++ QListWidgetItem
+ API is then used to implement the desired functionality.
+
+ Although not shown here, it is possible to throw a script
+ exception from a prototype function; for example, you could throw
+ a TypeError exception if the qscriptvalue_cast() fails.
+
+ QListWidgetItems are usually added to a QListWidget. While
+ QListWidget is a QObject-based class, not all the functionality
+ needed for this example are present. We can solve this by creating
+ a default prototype for the QListWidget class as well. The
+ prototype will augment the functionality already provided by the
+ Qt Script QObject integration; i.e. if a property or slot is not
+ found in the QListWidget object itself, the prototype will be used
+ as a fallback.
+
+ \snippet examples/script/defaultprototypes/prototypes.h 1
+
+ The additional slots will make it possible to add items to
+ a QListWidget from script code, and to set the background
+ color of the widget from a string.
+
+ \snippet examples/script/defaultprototypes/prototypes.cpp 1
+
+ Again, we use qscriptvalue_cast() to cast the script object
+ to the relevant C++ type, in this case a QListWidget pointer.
+ The addItem() and addItems() functions simply forward their
+ arguments to the corresponding functions in the QListWidget
+ class. setBackgroundColor() gets the widget's palette, creates
+ a QColor from the given string argument and changes the palette
+ accordingly.
+
+ \snippet examples/script/defaultprototypes/main.cpp 0
+
+ The relevant C++ types must be made known to Qt's meta type
+ system.
+
+ \snippet examples/script/defaultprototypes/main.cpp 1
+
+ For each type that we want to associate a prototype object with,
+ we create an instance of the prototype class, pass it to
+ QScriptEngine::newQObject(), and then create the link between
+ the C++ type and the resulting script object by calling
+ QScriptEngine::setDefaultPrototype().
+
+ \snippet examples/script/defaultprototypes/main.cpp 2
+
+ In this example, a single QListWidget object is added as
+ a global script variable, called \c{listWidget}. Script code
+ can add items to this widget by calling addItem() or addItems().
+
+ \snippet examples/script/defaultprototypes/code.js 0
+
+ Script code can connect to signals of the QListWidget object;
+ signal handlers can use the interface defined in
+ the QListWidgetItem prototype to manipulate item arguments.
+
+ \snippet examples/script/defaultprototypes/code.js 1
+
+ Not shown in this example is how to make QListWidgetItem
+ constructible from Qt Script code, i.e. to be able to
+ write "new QListWidgetItem()" in a script. In order to do
+ this, you have to define your own script constructor for
+ the type. The constructor would just be a factory function
+ that constructs a new C++ QListWidgetItem and returns it
+ back to the script. See QScriptEngine::newFunction() for more
+ information.
+*/
diff --git a/doc/src/examples/delayedencoding.qdoc b/doc/src/examples/delayedencoding.qdoc
new file mode 100644
index 0000000..cd1c4ae
--- /dev/null
+++ b/doc/src/examples/delayedencoding.qdoc
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/delayedencoding
+ \title Delayed Encoding Example
+
+ The Delayed Encoding example shows how to delay preparing of data
+ for drag and drop operations until a drop target is found.
+
+ \image delayedecoding-example.png
+
+ The \gui Export push button is pressed down to start the drag.
+ The data for the drag and drop operation is not processed until
+ the user of the application has found a valid drop target. This
+ removes redundant processing if the operation is aborted. In our
+ case, we have an SVG image that we wish to send as the \c {
+ "image/png" } MIME type. It is the conversion from SVG to PNG we
+ wish to delay - it can be quite expensive.
+
+ The example is implemented in two classes: \c SourceWidget and \c
+ MimeData. The \c SourceWidget class sets up the GUI and starts the
+ drag operation on request. The \c MimeData class, which inherits
+ QMimeData, sends a signal when a drop target is found. This signal
+ is connected to a slot in \c SourceWidget, which does the
+ conversion from SVG to PNG.
+
+ \section1 SourceWidget Class Definition
+
+ The \c SourceWidget class starts drag and drop operations and also
+ does the image conversion.
+
+ \snippet examples/draganddrop/delayedencoding/sourcewidget.h 0
+
+ The \gui Export push button is connected to the \c startDrag()
+ slot. The \c createData() slot will be invoked when data for the
+ drag and drop operation is to be created.
+
+ \section1 SourceWidget Class Implementation
+
+ Let's start our code tour with a look at the \c startDrag() slot.
+
+ \snippet examples/draganddrop/delayedencoding/sourcewidget.cpp 0
+
+ We emit \c dataRequested() from \c MimeData when the operation has
+ found a valid drop target.
+
+ We gallop along to \c createData():
+
+ \snippet examples/draganddrop/delayedencoding/sourcewidget.cpp 1
+
+ Fortunately, Qt provides QSvgRenderer, which can render the SVG
+ image to any QPaintDevice. Also, QImage has no problems saving to
+ the PNG format.
+
+ Finally, we can give the data to \c MimeData.
+
+ \section1 MimeData Class Definition
+
+ The \c MimeData class inherits QMimeData and makes it possible to
+ delay preparing of the data for a drag and drop operation.
+
+ \snippet examples/draganddrop/delayedencoding/mimedata.h 0
+
+ We will look closer at \c retrieveData() and \c formats() in the
+ next section.
+
+ \section1 MimeData Class Implementation
+
+ \snippet examples/draganddrop/delayedencoding/mimedata.cpp 0
+
+ In the \c formats() function, we return the format of the
+ data we provide. This is the \c { image/png } MIME type.
+
+ \snippet examples/draganddrop/delayedencoding/mimedata.cpp 1
+
+ \c retrieveData() is reimplemented from QMimeData and is
+ called when the data is requested by the drag and drop
+ operation. Fortunately for us, this happens when the operation
+ is finishing, i.e., when a drop target has been found.
+
+ We emit the \c dataRequested() signal, which is picked up by
+ \c SourceWidget. The \c SourceWidget (as already explained)
+ sets the data on \c MimeData with \l{QMimeData::}{setData()}.
+
+*/
+
diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc
new file mode 100644
index 0000000..ebf93e2
--- /dev/null
+++ b/doc/src/examples/diagramscene.qdoc
@@ -0,0 +1,846 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/diagramscene
+ \title Diagram Scene Example
+
+ This example shows use of Qt's graphics framework.
+
+ \image diagramscene.png
+
+ The Diagram Scene example is an application in which you can
+ create a flowchart diagram. It is possible to add flowchart shapes
+ and text and connect the shapes by arrows as shown in the image
+ above. The shapes, arrows, and text can be given different
+ colors, and it is possible to change the font, style, and
+ underline of the text.
+
+ The Qt graphics view framework is designed to manage and
+ display custom 2D graphics items. The main classes of the
+ framework are QGraphicsItem, QGraphicsScene and QGraphicsView. The
+ graphics scene manages the items and provides a surface for them.
+ QGraphicsView is a widget that is used to render a scene on the
+ screen. See the \l{The Graphics View Framework}{overview document}
+ for a more detailed description of the framework.
+
+ In this example we show how to create such custom graphics
+ scenes and items by implementing classes that inherit
+ QGraphicsScene and QGraphicsItem.
+
+ In particular we show how to:
+
+ \list
+ \o Create custom graphics items.
+ \o Handle mouse events and movement of items.
+ \o Implement a graphics scene that can manage our custom items.
+ \o Custom painting of items.
+ \o Create a movable and editable text item.
+ \endlist
+
+ The example consists of the following classes:
+ \list
+ \o \c MainWindow creates the widgets and display
+ them in a QMainWindow. It also manages the interaction
+ between the widgets and the graphics scene, view and
+ items.
+ \o \c DiagramItem inherits QGraphicsPolygonItem and
+ represents a flowchart shape.
+ \o \c TextDiagramItem inherits QGraphicsTextItem and
+ represents text items in the diagram. The class adds
+ support for moving the item with the mouse, which is not
+ supported by QGraphicsTextItem.
+ \o \c Arrow inherits QGraphicsLineItem and is an arrow
+ that connect two DiagramItems.
+ \o \c DiagramScene inherits QGraphicsDiagramScene and
+ provides support for \c DiagramItem, \c Arrow and
+ \c DiagramTextItem (In addition to the support already
+ handled by QGraphicsScene).
+ \endlist
+
+ \section1 MainWindow Class Definition
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.h 0
+
+ The \c MainWindow class creates and lays out the widgets in a
+ QMainWindow. The class forwards input from the widgets to the
+ DiagramScene. It also updates its widgets when the diagram
+ scene's text item changes, or a diagram item or a diagram text item
+ is inserted into the scene.
+
+ The class also deletes items from the scene and handles the
+ z-ordering, which decides the order in which items are drawn when
+ they overlap each other.
+
+ \section1 MainWindow Class Implementation
+
+
+ We start with a look at the constructor:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 0
+
+ In the constructor we call methods to create the widgets and
+ layouts of the example before we create the diagram scene.
+ The toolbars must be created after the scene as they connect
+ to its signals. We then lay the widgets out in the window.
+
+ We connect to the \c itemInserted() and \c textInserted() slots of
+ the diagram scenes as we want to uncheck the buttons in the tool
+ box when an item is inserted. When an item is selected in
+ the scene we receive the \c itemSelected() signal. We use this to
+ update the widgets that display font properties if the item
+ selected is a \c DiagramTextItem.
+
+ The \c createToolBox() function creates and lays out the widgets
+ of the \c toolBox QToolBox. We will not examine it with a
+ high level of detail as it does not deal with graphics framework
+ specific functionality. Here is its implementation:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 21
+
+ This part of the function sets up the tabbed widget item that
+ contains the flowchart shapes. An exclusive QButtonGroup always
+ keeps one button checked; we want the group to allow all buttons
+ to be unchecked.
+ We still use a button group since we can associate user
+ data, which we use to store the diagram type, with each button.
+ The \c createCellWidget() function sets up the buttons in the
+ tabbed widget item and is examined later.
+
+ The buttons of the background tabbed widget item is set up in the
+ same way, so we skip to the creation of the tool box:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 22
+
+ We set the preferred size of the toolbox as its maximum. This
+ way, more space is given to the graphics view.
+
+ Here is the \c createActions() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 23
+
+ We show an example of the creation of an action. The
+ functionality the actions trigger is discussed in the slots we
+ connect the actions to. You can see the \l{Application
+ Example}{application example} if you need a high-level
+ introduction to actions.
+
+ The is the \c createMenus() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 24
+
+ We create the three menus' of the example.
+
+ The \c createToolbars() function sets up the examples tool
+ bars. The three \l{QToolButton}s in the \c colorToolBar, the \c
+ fontColorToolButton, \c fillColorToolButton, and \c
+ lineColorToolButton, are interesting as we create icons for them
+ by drawing on a QPixmap with a QPainter. We show how the \c
+ fillColorToolButton is created. This button lets the user select a
+ color for the diagram items.
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 25
+ \dots
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 26
+
+ We set the menu of the tool button with
+ \l{QToolButton::}{setMenu()}. We need the \c fillAction QAction
+ object to always be pointing to the selected action of the menu.
+ The menu is created with the \c createColorMenu() function and, as
+ we shall see later, contains one menu item for each color that the
+ items can have. When the user presses the button, which trigger
+ the \l{QToolButton::}{clicked()} signal, we can set the color of
+ the selected item to the color of \c fillAction. It is with \c
+ createColorToolButtonIcon() we create the icon for the button.
+
+ \dots
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 27
+
+ Here is the \c createBackgroundCellWidget() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 28
+
+ This function creates \l{QWidget}s containing a tool button
+ and a label. The widgets created with this function are used for
+ the background tabbed widget item in the tool box.
+
+ Here is the \c createCellWidget() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 29
+
+ This function returns a QWidget containing a QToolButton with
+ an image of one of the \c DiagramItems, i.e., flowchart shapes.
+ The image is created by the \c DiagramItem through the \c image()
+ function. The QButtonGroup class lets us attach a QVariant with
+ each button; we store the diagram's type, i.e., the
+ DiagramItem::DiagramType enum. We use the stored diagram type when
+ we create new diagram items for the scene. The widgets created
+ with this function is used in the tool box.
+
+ Here is the \c createColorMenu() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 30
+
+ This function creates a color menu that is used as the
+ drop-down menu for the tool buttons in the \c colorToolBar. We
+ create an action for each color that we add to the menu. We fetch
+ the actions data when we set the color of items, lines, and text.
+
+ Here is the \c createColorToolButtonIcon() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 31
+
+ This function is used to create the QIcon of the \c
+ fillColorToolButton, \c fontColorToolButton, and \c
+ lineColorToolButton. The \a imageFile string is either the text,
+ flood-fill, or line symbol that is used for the buttons. Beneath
+ the image we draw a filled rectangle using \a color.
+
+ Here is the \c createColorIcon() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 32
+
+ This function creates an icon with a filled rectangle in the
+ color of \a color. It is used for creating icons for the color
+ menus in the \c fillColorToolButton, \c fontColorToolButton, and
+ \c lineColorToolButton.
+
+ Here is the \c backgroundButtonGroupClicked() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 1
+
+ In this function we set the QBrush that is used to draw the
+ background of the diagramscene. The background can be a grid of
+ squares of blue, gray, or white tiles, or no grid at all. We have
+ \l{QPixmap}s of the tiles from png files that we create the brush
+ with.
+
+ When one of the buttons in the background tabbed widget item is
+ clicked we change the brush; we find out which button it is by
+ checking its text.
+
+ Here is the implementation of \c buttonGroupClicked():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 2
+
+ This slot is called when a button in \c buttonGroup is checked.
+ When a button is checked the user can click on the graphics view
+ and a \c DiagramItem of the selected type will be inserted into
+ the \c DiagramScene. We must loop through the buttons in the group
+ to uncheck other buttons as only one button is allowed to be
+ checked at a time.
+
+ \c QButtonGroup assigns an id to each button. We have set the id
+ of each button to the diagram type, as given by DiagramItem::DiagramType
+ that will be inserted into the scene when it is clicked. We can
+ then use the button id when we set the diagram type with
+ \c setItemType(). In the case of text we assigned an id that has a
+ value that is not in the DiagramType enum.
+
+ Here is the implementation of \c deleteItem():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 3
+
+ This slot deletes the selected item, if any, from the scene. If
+ the item to be deleted is a \c DiagramItem, we also need to delete
+ arrows connected to it; we don't want arrows in the scene that
+ aren't connected to items in both ends.
+
+ This is the implementation of pointerGroupClicked():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 4
+
+ The \c pointerTypeGroup decides whether the scene is in ItemMove
+ or InsertLine mode. This button group is exclusive, i.e., only
+ one button is checked at any time. As with the \c buttonGroup above
+ we have assigned an id to the buttons that matches values of the
+ DiagramScene::Mode enum, so that we can use the id to set the
+ correct mode.
+
+ Here is the \c bringToFront() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 5
+
+ Several items may collide, i.e., overlap, with each other in
+ the scene. This slot is called when the user requests that an
+ item should be placed on top of the items it collides with.
+ \l{QGraphicsItem}{QGrapicsItems} have a z-value that decides the
+ order in which items are stacked in the scene; you can think of it
+ as the z-axis in a 3D coordinate system. When items collide the
+ items with higher z-values will be drawn on top of items with
+ lower values. When we bring an item to the front we can loop
+ through the items it collides with and set a z-value that is
+ higher than all of them.
+
+ Here is the \c sendToBack() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 6
+
+ This slot works in the same way as \c bringToFront() described
+ above, but sets a z-value that is lower than items the item that
+ should be send to the back collides with.
+
+ This is the implementation of \c itemInserted():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 7
+
+ This slot is called from the \c DiagramScene when an item has been
+ added to the scene. We set the mode of the scene back to the mode
+ before the item was inserted, which is ItemMove or InsertText
+ depending on which button is checked in the \c pointerTypeGroup.
+ We must also uncheck the button in the in the \c buttonGroup.
+
+ Here is the implementation of \c textInserted():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 8
+
+ We simply set the mode of the scene back to the mode it had before
+ the text was inserted.
+
+ Here is the \c currentFontChanged() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 9
+
+ When the user requests a font change, by using one of the
+ widgets in the \c fontToolBar, we create a new QFont object and
+ set its properties to match the state of the widgets. This is done
+ in \c handleFontChange(), so we simply call that slot.
+
+ Here is the \c fontSizeChanged() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 10
+
+ When the user requests a font change, by using one of the
+ widgets in the \c fontToolBar, we create a new QFont object and
+ set its properties to match the state of the widgets. This is done
+ in \c handleFontChange(), so we simply call that slot.
+
+ Here is the implementation of \c sceneScaleChanged():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 11
+
+ The user can increase or decrease the scale, with the \c
+ sceneScaleCombo, the scene is drawn in.
+ It is not the scene itself that changes its scale, but only the
+ view.
+
+ Here is the \c textColorChanged() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 12
+
+ This slot is called when an item in the drop-down menu of the \c
+ fontColorToolButton is pressed. We need to change the icon on
+ the button to the color of the selected QAction. We keep a pointer
+ to the selected action in \c textAction. It is in \c
+ textButtonTriggered() we change the text color to the color of \c
+ textAction, so we call that slot.
+
+ Here is the \c itemColorChanged() implementation:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 13
+
+ This slot handles requests for changing the color of \c
+ DiagramItems in the same manner as \c textColorChanged() does for
+ \c DiagramTextItems.
+
+ Here is the implementation of \c lineColorChanged():
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 14
+
+ This slot handles requests for changing the color of \c Arrows in
+ the same manner that \c textColorChanged() does it for \c
+ DiagramTextItems.
+
+ Here is the \c textButtonTriggered() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 15
+
+ \c textAction points to the QAction of the currently selected menu item
+ in the \c fontColorToolButton's color drop-down menu. We have set
+ the data of the action to the QColor the action represents, so we
+ can simply fetch this when we set the color of text with \c
+ setTextColor().
+
+ Here is the \c fillButtonTriggered() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 16
+
+ \c fillAction points to the selected menu item in the drop-down
+ menu of \c fillColorToolButton(). We can therefore use the data of
+ this action when we set the item color with \c setItemColor().
+
+ Here is the \c lineButtonTriggered() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 17
+
+ \c lineAction point to the selected item in the drop-down menu of
+ \c lineColorToolButton. We use its data when we set the arrow
+ color with \c setLineColor().
+
+ Here is the \c handleFontChange() function:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 18
+
+ \c handleFontChange() is called when any of the widgets that show
+ font properties changes. We create a new QFont object and set its
+ properties based on the widgets. We then call the \c setFont()
+ function of \c DiagramScene; it is the scene that set the font of
+ the \c DiagramTextItems it manages.
+
+ Here is the \c itemSelected() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 19
+
+ This slot is called when an item in the \c DiagramScene is
+ selected. In the case of this example it is only text items that
+ emit signals when they are selected, so we do not need to check
+ what kind of graphics \a item is.
+
+ We set the state of the widgets to match the properties of the
+ font of the selected text item.
+
+ This is the \c about() slot:
+
+ \snippet examples/graphicsview/diagramscene/mainwindow.cpp 20
+
+ This slot displays an about box for the example when the user
+ selects the about menu item from the help menu.
+
+ \section1 DiagramScene Class Definition
+
+ The \c DiagramScene class inherits QGraphicsScene and adds
+ functionality to handle \c DiagramItems, \c Arrows, and \c
+ DiagramTextItems in addition to the items handled by its super
+ class.
+
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.h 0
+
+ In the \c DiagramScene a mouse click can give three different
+ actions: the item under the mouse can be moved, an item may be
+ inserted, or an arrow may be connected between to diagram items.
+ Which action a mouse click has depends on the mode, given by the
+ Mode enum, the scene is in. The mode is set with the \c setMode()
+ function.
+
+ The scene also sets the color of its items and the font of its
+ text items. The colors and font used by the scene can be set with
+ the \c setLineColor(), \c setTextColor(), \c setItemColor() and \c
+ setFont() functions. The type of \c DiagramItem, given by the
+ DiagramItem::DiagramType function, to be created when an item is
+ inserted is set with the \c setItemType() slot.
+
+ The \c MainWindow and \c DiagramScene share responsibility for
+ the examples functionality. \c MainWindow handles the following
+ tasks: the deletion of items, text, and arrows; moving diagram
+ items to the back and front; and setting the scale of the scene.
+
+ \section1 DiagramScene Class Implementation
+
+
+ We start with the constructor:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 0
+
+ The scene uses \c myItemMenu to set the context menu when it
+ creates \c DiagramItems. We set the default mode to \c
+ DiagramScene::MoveItem as this gives the default behavior of
+ QGraphicsScene.
+
+ Here is the \c setLineColor() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 1
+
+ The \c isItemChange function returns true if an \c Arrow item is
+ selected in the scene in which case we want to change its color.
+ When the \c DiagramScene creates and adds new arrows to the scene
+ it will also use the new \a color.
+
+ Here is the \c setTextColor() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 2
+
+ This function sets the color of \c DiagramTextItems equal to the
+ way \c setLineColor() sets the color of \c Arrows.
+
+ Here is the \c setItemColor() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 3
+
+ This function sets the color the scene will use when creating
+ \c DiagramItems. It also changes the color of a selected \c
+ DiagramItem.
+
+ This is the implementation of \c setFont():
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 4
+
+ Set the font to use for new and selected, if a text item is
+ selected, \c DiagramTextItems.
+
+ This is the implementation of \c editorLostFocus() slot:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 5
+
+ \c DiagramTextItems emit a signal when they loose focus, which is
+ connected to this slot. We remove the item if it has no text.
+ If not, we would leak memory and confuse the user as the items
+ will be edited when pressed on by the mouse.
+
+ The \c mousePressEvent() function handles mouse press event's
+ different depending on which mode the \c DiagramScene is in. We
+ examine its implementation for each mode:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 6
+
+ We simply create a new \c DiagramItem and add it to the scene at
+ the position the mouse was pressed. Note that the origin of its
+ local coordinate system will be under the mouse pointer position.
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 7
+
+ The user adds \c Arrows to the scene by stretching a line between
+ the items the arrow should connect. The start of the line is fixed
+ in the place the user clicked the mouse and the end follows the
+ mouse pointer as long as the button is held down. When the user
+ releases the mouse button an \c Arrow will be added to the scene
+ if there is a \c DiagramItem under the start and end of the line.
+ We will see how this is implemented later; here we simply add the
+ line.
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 8
+
+ The \c DiagramTextItem is editable when the
+ Qt::TextEditorInteraction flag is set, else it is movable by the
+ mouse. We always want the text to be drawn on top of the other
+ items in the scene, so we set the value to a number higher
+ than other items in the scene.
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 9
+
+ We are in MoveItem mode if we get to the default switch; we
+ can then call the QGraphicsScene implementation, which
+ handles movement of items with the mouse. We make this call even
+ if we are in another mode making it possible to add an item and
+ then keep the mouse button pressed down and start moving
+ the item. In the case of text items, this is not possible as they
+ do not propagate mouse events when they are editable.
+
+ This is the \c mouseMoveEvent() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 10
+
+ We must draw the line if we are in InsertMode and the mouse button
+ is pressed down (the line is not 0). As discussed in \c
+ mousePressEvent() the line is drawn from the position the mouse
+ was pressed to the current position of the mouse.
+
+ If we are in MoveItem mode, we call the QGraphicsScene
+ implementation, which handles movement of items.
+
+ In the \c mouseReleaseEvent() function we need to check if an arrow
+ should be added to the scene:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 11
+
+ First we need to get the items (if any) under the line's start
+ and end points. The line itself is the first item at these points,
+ so we remove it from the lists. As a precaution, we check if the
+ lists are empty, but this should never happen.
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 12
+
+ Now we check if there are two different \c DiagramItems under
+ the lines start and end points. If there are we can create an \c
+ Arrow with the two items. The arrow is then added to each item and
+ finally the scene. The arrow must be updated to adjust its start
+ and end points to the items. We set the z-value of the arrow to
+ -1000.0 because we always want it to be drawn under the items.
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 13
+
+ Here is the \c isItemChange() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramscene.cpp 14
+
+ The scene has single selection, i.e., only one item can be
+ selected at any given time. The foreach will then loop one time
+ with the selected item or none if no item is selected. \c
+ isItemChange() is used to check whether a selected item exists
+ and also is of the specified diagram \a type.
+
+ \section1 DiagramItem Class Definition
+
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.h 0
+
+ The \c DiagramItem represents a flowchart shape in the \c
+ DiagramScene. It inherits QGraphicsPolygonItem and has a polygon
+ for each shape. The enum DiagramType has a value for each of the
+ flowchart shapes.
+
+ The class has a list of the arrows that are connected to it.
+ This is necessary because only the item knows when it is being
+ moved (with the \c itemChanged() function) at which time the
+ arrows must be updated. The item can also draw itself onto a
+ QPixmap with the \c image() function. This is used for the tool
+ buttons in \c MainWindow, see \c createColorToolButtonIcon() in
+ \c MainWindow.
+
+ The Type enum is a unique identifier of the class. It is used by
+ \c qgraphicsitem_cast(), which does dynamic casts of graphics
+ items. The UserType constant is the minimum value a custom
+ graphics item type can be.
+
+ \section1 DiagramItem Class Implementation
+
+
+ We start with a look at the constructor:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 0
+
+ In the constructor we create the items polygon according to
+ \a diagramType. \l{QGraphicsItem}s are not movable or selectable
+ by default, so we must set these properties.
+
+ Here is the \c removeArrow() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 1
+
+ \c removeArrow() is used to remove \c Arrow items when they
+ or \c DiagramItems they are connected to are removed from the
+ scene.
+
+ Here is the \c removeArrows() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 2
+
+ This function is called when the item is removed from the scene
+ and removes all arrows that are connected to this item. The arrow
+ must be removed from the \c arrows list of both its start and end
+ item.
+
+ Here is the \c addArrow() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 3
+
+ This function simply adds the \a arrow to the items \c arrows list.
+
+ Here is the \c image() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 4
+
+ This function draws the polygon of the item onto a QPixmap. In
+ this example we use this to create icons for the tool buttons in
+ the tool box.
+
+ Here is the \c contextMenuEvent() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 5
+
+ We show the context menu. As right mouse clicks, which shows the
+ menu, don't select items by default we set the item selected with
+ \l{QGraphicsItem::}{setSelected()}. This is necessary since an
+ item must be selected to change its elevation with the
+ \c bringToFront and \c sendToBack actions.
+
+ This is the implementation of \c itemChange():
+
+ \snippet examples/graphicsview/diagramscene/diagramitem.cpp 6
+
+ If the item has moved, we need to update the positions of the
+ arrows connected to it. The implementation of QGraphicsItem does
+ nothing, so we just return \a value.
+
+ \section1 DiagramTextItem Class Definition
+
+ The \c TextDiagramItem class inherits QGraphicsTextItem and
+ adds the possibility to move editable text items. Editable
+ QGraphicsTextItems are designed to be fixed in place and editing
+ starts when the user single clicks on the item. With \c
+ DiagramTextItem the editing starts with a double click leaving
+ single click available to interact with and move it.
+
+ \snippet examples/graphicsview/diagramscene/diagramtextitem.h 0
+
+ We use \c itemChange() and \c focusOutEvent() to notify the
+ \c DiagramScene when the text item loses focus and gets selected.
+
+ Vi reimplement the functions that handle mouse events to make it
+ possible to alter the mouse behavior of QGraphicsTextItem.
+
+ \section1 DiagramTextItem Implementation
+
+ We start with the constructor:
+
+ \snippet examples/graphicsview/diagramscene/diagramtextitem.cpp 0
+
+ We simply set the item movable and selectable, as these flags are
+ off by default.
+
+ Here is the \c itemChange() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramtextitem.cpp 1
+
+ When the item is selected we emit the selectedChanged signal. The
+ \c MainWindow uses this signal to update the widgets that display
+ font properties to the font of the selected text item.
+
+ Here is the \c focusOutEvent() function:
+
+ \snippet examples/graphicsview/diagramscene/diagramtextitem.cpp 2
+
+ \c DiagramScene uses the signal emitted when the text item looses
+ remove the item if it is empty, i.e., it contains no text.
+
+ This is the implementation of \c mouseDoubleClickEvent():
+
+ \snippet examples/graphicsview/diagramscene/diagramtextitem.cpp 5
+
+ When we receive a double click event, we make the item editable by calling
+ QGraphicsTextItem::setTextInteractionFlags(). We then forward the
+ double-click to the item itself.
+
+ \section1 Arrow Class Definition
+
+ The \c Arrow class is a graphics item that connects two \c
+ DiagramItems. It draws an arrow head to one of the items. To
+ achieve this the item needs to paint itself and also re implement
+ methods used by the graphics scene to check for collisions and
+ selections. The class inherits QGraphicsLine item, and draws the
+ arrowhead and moves with the items it connects.
+
+ \snippet examples/graphicsview/diagramscene/arrow.h 0
+
+ The item's color can be set with \c setColor().
+
+ \c boundingRect() and \c shape() are reimplemented
+ from QGraphicsLineItem and are used by the scene
+ to check for collisions and selections.
+
+ Calling \c updatePosition() causes the arrow to recalculate its
+ position and arrow head angle. \c paint() is reimplemented so that
+ we can paint an arrow rather than just a line between items.
+
+ \c myStartItem and \c myEndItem are the diagram items that the
+ arrow connects. The arrow is drawn with its head to the end item.
+ \c arrowHead is a polygon with three vertices's we use to draw the
+ arrow head.
+
+ \section1 Arrow Class Implementation
+
+ The constructor of the \c Arrow class looks like this:
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 0
+
+ We set the start and end diagram items of the arrow. The arrow
+ head will be drawn where the line intersects the end item.
+
+ Here is the \c boundingRect() function:
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 1
+
+ We need to reimplement this function because the arrow is
+ larger than the bounding rectangle of the QGraphicsLineItem. The
+ graphics scene uses the bounding rectangle to know which regions
+ of the scene to update.
+
+ Here is the \c shape() function:
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 2
+
+ The shape function returns a QPainterPath that is the exact
+ shape of the item. The QGraphicsLineItem::shape() returns a path
+ with a line drawn with the current pen, so we only need to add
+ the arrow head. This function is used to check for collisions and
+ selections with the mouse.
+
+ Here is the \c updatePosition() slot:
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 3
+
+ This slot updates the arrow by setting the start and end
+ points of its line to the center of the items it connects.
+
+ Here is the \c paint() function:
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 4
+
+ If the start and end items collide we do not draw the arrow; the
+ algorithm we use to find the point the arrow should be drawn at
+ may fail if the items collide.
+
+ We first set the pen and brush we will use for drawing the arrow.
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 5
+
+ We then need to find the position at which to draw the
+ arrowhead. The head should be drawn where the line and the end
+ item intersects. This is done by taking the line between each
+ point in the polygon and check if it intersects with the line of
+ the arrow. Since the line start and end points are set to the
+ center of the items the arrow line should intersect one and only
+ one of the lines of the polygon. Note that the points in the
+ polygon are relative to the local coordinate system of the item.
+ We must therefore add the position of the end item to make the
+ coordinates relative to the scene.
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 6
+
+ We calculate the angle between the x-axis and the line of the
+ arrow. We need to turn the arrow head to this angle so that it
+ follows the direction of the arrow. If the angle is negative we
+ must turn the direction of the arrow.
+
+ We can then calculate the three points of the arrow head polygon.
+ One of the points is the end of the line, which now is the
+ intersection between the arrow line and the end polygon. Then we
+ clear the \c arrowHead polygon from the previous calculated arrow
+ head and set these new points.
+
+ \snippet examples/graphicsview/diagramscene/arrow.cpp 7
+
+ If the line is selected we draw to dotted lines that are
+ parallel with the line of the arrow. We do not use the default
+ implementation, which uses \l{QGraphicsItem::}{boundingRect()}
+ because the QRect bounding rectangle is considerably larger than
+ the line.
+*/
diff --git a/doc/src/examples/digitalclock.qdoc b/doc/src/examples/digitalclock.qdoc
new file mode 100644
index 0000000..0ff4642
--- /dev/null
+++ b/doc/src/examples/digitalclock.qdoc
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/digitalclock
+ \title Digital Clock Example
+
+ The Digital Clock example shows how to use QLCDNumber to display a
+ number with LCD-like digits.
+
+ \image digitalclock-example.png Screenshot of the Digital Clock example
+
+ This example also demonstrates how QTimer can be used to update a widget
+ at regular intervals.
+
+ \section1 DigitalClock Class Definition
+
+ The \c DigitalClock class provides a clock widget showing the time with
+ hours and minutes separated by a blinking colon. We subclass QLCDNumber
+ and implement a private slot called \c showTime() to update the clock
+ display:
+
+ \snippet examples/widgets/digitalclock/digitalclock.h 0
+
+ \section1 DigitalClock Class Implementation
+
+ \snippet examples/widgets/digitalclock/digitalclock.cpp 0
+
+ In the constructor, we first change the look of the LCD numbers. The
+ QLCDNumber::Filled style produces raised segments filled with the
+ foreground color (typically black). We also set up a one-second timer
+ to keep track of the current time, and we connect
+ its \l{QTimer::timeout()}{timeout()} signal to the private \c showTime() slot
+ so that the display is updated every second. Then, we
+ call the \c showTime() slot; without this call, there would be a one-second
+ delay at startup before the time is shown.
+
+ \snippet examples/widgets/digitalclock/digitalclock.cpp 1
+ \snippet examples/widgets/digitalclock/digitalclock.cpp 2
+
+ The \c showTime() slot is called whenever the clock display needs
+ to be updated.
+
+ The current time is converted into a string with the format "hh:mm".
+ When QTime::second() is a even number, the colon in the string is
+ replaced with a space. This makes the colon appear and vanish every
+ other second.
+
+ Finally, we call QLCDNumber::display() to update the widget.
+*/
diff --git a/doc/src/examples/dirview.qdoc b/doc/src/examples/dirview.qdoc
new file mode 100644
index 0000000..2cbfcfe
--- /dev/null
+++ b/doc/src/examples/dirview.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/dirview
+ \title Dir View Example
+
+ The Dir View example shows a tree view onto the local filing system. It uses the
+ QDirModel class to provide supply file and directory information.
+
+ \image dirview-example.png
+*/
diff --git a/doc/src/examples/dockwidgets.qdoc b/doc/src/examples/dockwidgets.qdoc
new file mode 100644
index 0000000..bc9f5f1
--- /dev/null
+++ b/doc/src/examples/dockwidgets.qdoc
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/dockwidgets
+ \title Dock Widgets Example
+
+ The Dock Widgets example shows how to add dock windows to an
+ application. It also shows how to use Qt's rich text engine.
+
+ \image dockwidgets-example.png Screenshot of the Dock Widgets example
+
+ The application presents a simple business letter template, and has
+ a list of customer names and addresses and a list of standard
+ phrases in two dock windows. The user can click a customer to have
+ their name and address inserted into the template, and click one or
+ more of the standard phrases. Errors can be corrected by clicking
+ the Undo button. Once the letter has been prepared it can be printed
+ or saved as HTML.
+
+ \section1 MainWindow Class Definition
+
+ Here's the class definition:
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.h 0
+
+ We will now review each function in turn.
+
+ \section1 MainWindow Class Implementation
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 0
+
+ We start by including \c <QtGui>, a header file that contains the
+ definition of all classes in the \l QtCore and \l QtGui
+ libraries. This saves us from having to include
+ every class individually and is especially convenient if we add new
+ widgets. We also include \c mainwindow.h.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 1
+
+ In the constructor, we start by creating a QTextEdit widget. Then we call
+ QMainWindow::setCentralWidget(). This function passes ownership of
+ the QTextEdit to the \c MainWindow and tells the \c MainWindow that
+ the QTextEdit will occupy the \c MainWindow's central area.
+
+ Then we call \c createActions(), \c createMenus(), \c
+ createToolBars(), \c createStatusBar(), and \c createDockWindows()
+ to set up the user interface. Finally we call \c setWindowTitle() to
+ give the application a title, and \c newLetter() to create a new
+ letter template.
+
+ We won't quote the \c createActions(), \c createMenus(), \c
+ createToolBars(), and \c createStatusBar() functions since they
+ follow the same pattern as all the other Qt examples.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 9
+
+ We create the customers dock window first, and in addition to a
+ window title, we also pass it a \c this pointer so that it becomes a
+ child of \c MainWindow. Normally we don't have to pass a parent
+ because widgets are parented automatically when they are laid out:
+ but dock windows aren't laid out using layouts.
+
+ We've chosen to restrict the customers dock window to the left and
+ right dock areas. (So the user cannot drag the dock window to the
+ top or bottom dock areas.) The user can drag the dock window out of
+ the dock areas entirely so that it becomes a free floating window.
+ We can change this (and whether the dock window is moveable or
+ closable) using QDockWidget::setFeatures().
+
+ Once we've created the dock window we create a list widget with the
+ dock window as parent, then we populate the list and make it the
+ dock window's widget. Finally we add the dock widget to the \c
+ MainWindow using \c addDockWidget(), choosing to put it in the right
+ dock area.
+
+ We undertake a similar process for the paragraphs dock window,
+ except that we don't restrict which dock areas it can be dragged to.
+
+ Finally we set up the signal-slot connections. If the user clicks a
+ customer or a paragraph their \c currentTextChanged() signal will be
+ emitted and we connect these to \c insertCustomer() and
+ addParagraph() passing the text that was clicked.
+
+ We briefly discuss the rest of the implementation, but have now
+ covered everything relating to dock windows.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 2
+
+ In this function we clear the QTextEdit so that it is empty. Next we
+ create a QTextCursor on the QTextEdit. We move the cursor to the
+ start of the document and create and format a frame. We then create
+ some character formats and a table format. We insert a table into
+ the document and insert the company's name and address into a table
+ using the table and character formats we created earlier. Then we
+ insert the skeleton of the letter including two markers \c NAME and
+ \c ADDRESS. We will also use the \c{Yours sincerely,} text as a marker.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 6
+
+ If the user clicks a customer we split the customer details into
+ pieces. We then look for the \c NAME marker using the \c find()
+ function. This function selects the text it finds, so when we call
+ \c insertText() with the customer's name the name replaces the marker.
+ We then look for the \c ADDRESS marker and replace it with each line
+ of the customer's address. Notice that we wrapped all the insertions
+ between a \c beginEditBlock() and \c endEditBlock() pair. This means
+ that the entire name and address insertion is treated as a single
+ operation by the QTextEdit, so a single undo will revert all the
+ insertions.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 7
+
+ This function works in a similar way to \c insertCustomer(). First
+ we look for the marker, in this case, \c {Yours sincerely,}, and then
+ replace it with the standard paragraph that the user clicked. Again
+ we use a \c beginEditBlock() ... \c endEditBlock() pair so that the
+ insertion can be undone as a single operation.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 3
+
+ Qt's QTextDocument class makes printing documents easy. We simply
+ take the QTextEdit's QTextDocument, set up the printer and print the
+ document.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 4
+
+ QTextEdit can output its contents in HTML format, so we prompt the
+ user for the name of an HTML file and if they provide one we simply
+ write the QTextEdit's contents in HTML format to the file.
+
+ \snippet examples/mainwindows/dockwidgets/mainwindow.cpp 5
+
+ If the focus is in the QTextEdit, pressing \key Ctrl+Z undoes as
+ expected. But for the user's convenience we provide an
+ application-wide undo function that simply calls the QTextEdit's
+ undo: this means that the user can undo regardless of where the
+ focus is in the application.
+*/
diff --git a/doc/src/examples/dombookmarks.qdoc b/doc/src/examples/dombookmarks.qdoc
new file mode 100644
index 0000000..f3944ef
--- /dev/null
+++ b/doc/src/examples/dombookmarks.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/dombookmarks
+ \title DOM Bookmarks Example
+
+ The DOM Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL)
+ files that uses Qt's DOM-based XML API to read and parse the files. The SAX Bookmarks
+ example provides an alternative way to read this type of file.
+
+ \image dombookmarks-example.png
+
+ See the \l{http://pyxml.sourceforge.net/topics/xbel/}{XML Bookmark Exchange Language
+ Resource Page} for more information about XBEL files.
+*/
diff --git a/doc/src/examples/draganddroppuzzle.qdoc b/doc/src/examples/draganddroppuzzle.qdoc
new file mode 100644
index 0000000..0e6ed09
--- /dev/null
+++ b/doc/src/examples/draganddroppuzzle.qdoc
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/puzzle
+ \title Drag and Drop Puzzle Example
+
+ The Drag and Drop Puzzle example demonstrates a way of using the drag and drop system with
+ item view widgets.
+
+ \image draganddroppuzzle-example.png
+
+ This example is an implementation of a simple jigsaw puzzle game using Qt's
+ drag and drop API.
+ The \l{Item Views Puzzle Example}{Item View Puzzle} example shows
+ many of the same features, but takes an alternative approach that uses Qt's
+ model/view framework to manage drag and drop operations.
+*/
diff --git a/doc/src/examples/dragdroprobot.qdoc b/doc/src/examples/dragdroprobot.qdoc
new file mode 100644
index 0000000..d3f97b0
--- /dev/null
+++ b/doc/src/examples/dragdroprobot.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/dragdroprobot
+ \title Drag and Drop Robot Example
+
+ This GraphicsView example shows how to implement drag and drop in
+ a QGraphicsItem subclass, as well as how to animate items using
+ QGraphicsItemAnimation and QTimeLine.
+
+ \image dragdroprobot-example.png
+*/
diff --git a/doc/src/examples/draggableicons.qdoc b/doc/src/examples/draggableicons.qdoc
new file mode 100644
index 0000000..23150f9
--- /dev/null
+++ b/doc/src/examples/draggableicons.qdoc
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/draggableicons
+ \title Draggable Icons Example
+
+ The Draggable Icons example shows how to drag and drop image data between widgets
+ in the same application, and between different applications.
+
+ \image draggableicons-example.png
+
+ In many situations where drag and drop is used, the user starts dragging from
+ a particular widget and drops the payload onto another widget. In this example,
+ we subclass QLabel to create labels that we use as drag sources, and place them
+ inside \l{QWidget}s that serve as both containers and drop sites.
+
+ In addition, when a drag and drop operation occurs, we want to send more than
+ just an image. We also want to send information about where the user clicked in
+ the image so that the user can place it precisely on the drop target. This level
+ of detail means that we must create a custom MIME type for our data.
+
+ \section1 DragWidget Class Definition
+
+ The icon widgets that we use to display icons are subclassed from QLabel:
+
+ \snippet examples/draganddrop/draggableicons/dragwidget.h 0
+
+ Since the QLabel class provides most of what we require for the icon, we
+ only need to reimplement the \l QWidget::mousePressEvent() to provide
+ drag and drop facilities.
+
+ \section1 DragWidget Class Implementation
+
+ The \c DragWidget constructor sets an attribute on the widget that ensures
+ that it will be deleted when it is closed:
+
+ \snippet examples/draganddrop/draggableicons/dragwidget.cpp 0
+
+ To enable dragging from the icon, we need to act on a mouse press event.
+ We do this by reimplementing \l QWidget::mousePressEvent() and setting up
+ a QDrag object.
+
+ \snippet examples/draganddrop/draggableicons/dragwidget.cpp 1
+
+ Since we will be sending pixmap data for the icon and information about the
+ user's click in the icon widget, we construct a QByteArray and package up the
+ details using a QDataStream.
+
+ For interoperability, drag and drop operations describe the data they contain
+ using MIME types. In Qt, we describe this data using a QMimeData object:
+
+ \snippet examples/draganddrop/draggableicons/dragwidget.cpp 2
+
+ We choose an unofficial MIME type for this purpose, and supply the QByteArray
+ to the MIME data object.
+
+ The drag and drop operation itself is handled by a QDrag object:
+
+ \snippet examples/draganddrop/draggableicons/dragwidget.cpp 3
+
+ Here, we pass the data to the drag object, set a pixmap that will be shown
+ alongside the cursor during the operation, and define the position of a hot
+ spot that places the position of this pixmap under the cursor.
+
+*/
diff --git a/doc/src/examples/draggabletext.qdoc b/doc/src/examples/draggabletext.qdoc
new file mode 100644
index 0000000..4d3d89d
--- /dev/null
+++ b/doc/src/examples/draggabletext.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/draggabletext
+ \title Draggable Text Example
+
+ The Draggable Text example shows how to drag and drop textual data between widgets
+ in the same application, and between different applications.
+
+ \image draggabletext-example.png
+*/
diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc
new file mode 100644
index 0000000..344b9e7
--- /dev/null
+++ b/doc/src/examples/drilldown.qdoc
@@ -0,0 +1,552 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/drilldown
+ \title Drill Down Example
+
+ The Drill Down example shows how to read data from a database as
+ well as submit changes, using the QSqlRelationalTableModel and
+ QDataWidgetMapper classes.
+
+ \image drilldown-example.png Screenshot of the Drill Down Example
+
+ When running the example application, a user can retrieve
+ information about each of Nokia's Qt Software offices by clicking the
+ corresponding image. The application pops up an information window
+ displaying the data, and allows the users to alter the location
+ description as well as the image. The main view will be updated
+ when the users submit their changes.
+
+ The example consists of three classes:
+
+ \list
+ \o \c ImageItem is a custom graphics item class used to
+ display the office images.
+
+ \o \c View is the main application widget allowing the user to
+ browse through the various locations.
+
+ \o \c InformationWindow displays the requested information,
+ allowing the users to alter it and submit their changes to the
+ database.
+ \endlist
+
+ We will first take a look at the \c InformationWindow class to see
+ how you can read and modify data from a database. Then we will
+ review the main application widget, i.e., the \c View class, and
+ the associated \c ImageItem class.
+
+ \section1 InformationWindow Class Definition
+
+ The \c InformationWindow class is a custom widget inheriting
+ QWidget:
+
+ \snippet examples/sql/drilldown/informationwindow.h 0
+
+ When we create an information window, we pass the associated
+ location ID, a parent, and a pointer to the database, to the
+ constructor. We will use the database pointer to populate our
+ window with data, while passing the parent parameter on to the
+ base class. The ID is stored for future reference.
+
+ Once a window is created, we will use the public \c id() function
+ to locate it whenever information for the given location is
+ requested. We will also use the ID to update the main application
+ widget when the users submit their changes to the database, i.e.,
+ we will emit a signal carrying the ID and file name as parameters
+ whenever the users changes the associated image.
+
+ \snippet examples/sql/drilldown/informationwindow.h 1
+
+ Since we allow the users to alter some of the location data, we
+ must provide functionality for reverting and submitting their
+ changes. The \c enableButtons() slot is provided for convenience
+ to enable and disable the various buttons when required.
+
+ \snippet examples/sql/drilldown/informationwindow.h 2
+
+ The \c createButtons() function is also a convenience function,
+ provided to simplify the constructor. As mentioned above we store
+ the location ID for future reference. We also store the name of
+ the currently displayed image file to be able to determine when to
+ emit the \c imageChanged() signal.
+
+ The information window uses the QLabel class to display the office
+ location and the country. The associated image file is displayed
+ using a QComboBox instance while the description is displayed using
+ QTextEdit. In addition, the window has three buttons to control
+ the data flow and whether the window is shown or not.
+
+ Finally, we declare a \e mapper. The QDataWidgetMapper class
+ provides mapping between a section of a data model to widgets. We
+ will use the mapper to extract data from the given database,
+ updating the database whenever the user modifies the data.
+
+ \section1 InformationWindow Class Implementation
+
+ The constructor takes three arguments: a location ID, a database
+ pointer and a parent widget. The database pointer is actually a
+ pointer to a QSqlRelationalTableModel object providing an editable
+ data model (with foreign key support) for our database table.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 0
+ \snippet examples/sql/drilldown/informationwindow.cpp 1
+
+ First we create the various widgets required to display the data
+ contained in the database. Most of the widgets are created in a
+ straight forward manner. But note the combobox displaying the
+ name of the image file:
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 2
+
+ In this example, the information about the offices are stored in a
+ database table called "offices". When creating the model,
+ we will use a foreign key to establish a relation between this
+ table and a second data base table, "images", containing the names
+ of the available image files. We will get back to how this is done
+ when reviewing the \c View class. The rationale for creating such
+ a relation though, is that we want to ensure that the user only
+ can choose between predefined image files.
+
+ The model corresponding to the "images" database table, is
+ available through the QSqlRelationalTableModel's \l
+ {QSqlRelationalTableModel::}{relationModel()} function, requiring
+ the foreign key (in this case the "imagefile" column number) as
+ argument. We use QComboBox's \l {QComboBox::}{setModel()} function
+ to make the combobox use the "images" model. And, since this model
+ has two columns ("locationid" and "file"), we also specify which
+ column we want to be visible using the QComboBox::setModelColumn()
+ function.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 3
+
+ Then we create the mapper. The QDataWidgetMapper class allows us
+ to create data-aware widgets by mapping them to sections of an
+ item model.
+
+ The \l {QDataWidgetMapper::}{addMapping()} function adds a mapping
+ between the given widget and the specified section of the
+ model. If the mapper's orientation is horizontal (the default) the
+ section is a column in the model, otherwise it is a row. We call
+ the \l {QDataWidgetMapper::}{setCurrentIndex()} function to
+ initialize the widgets with the data associated with the given
+ location ID. Every time the current index changes, all the widgets
+ are updated with the contents from the model.
+
+ We also set the mapper's submit policy to
+ QDataWidgetMapper::ManualSubmit. This means that no data is
+ submitted to the database until the user expliclity requests a
+ submit (the alternative is QDataWidgetMapper::AutoSubmit,
+ automatically submitting changes when the corresponding widget
+ looses focus). Finally, we specify the item delegate the mapper
+ view should use for its items. The QSqlRelationalDelegate class
+ represents a delegate that unlike the default delegate, enables
+ combobox functionality for fields that are foreign keys into other
+ tables (like "imagefile" in our "trolltechoffices" table).
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 4
+
+ Finally, we connect the "something's changed" signals in the
+ editors to our custom \c enableButtons() slot, enabling the users
+ to either submit or revert their changes. We add all the widgets
+ into a layout, store the location ID and the name of the displayed
+ image file for future reference, and set the window title and
+ initial size.
+
+ Note that we also set the Qt::Window window flag to indicate that
+ our widget is in fact a window, with a window system frame and a
+ title bar.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 5
+
+ When a window is created, it is not deleted until the main
+ application exits (i.e., if the user closes the information
+ window, it is only hidden). For this reason we do not want to
+ create more than one \c InformationWindow object for each
+ location, and we provide the public \c id() function to be able to
+ determine whether a window already exists for a given location
+ when the user requests information about it.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 6
+
+ The \c revert() slot is triggered whenever the user hits the \gui
+ Revert button.
+
+ Since we set the QDataWidgetMapper::ManualSubmit submit policy,
+ none of the user's changes are written back to the model unless
+ the user expliclity choose to submit all of them. Nevertheless, we
+ can use the QDataWidgetMapper's \l {QDataWidgetMapper::}{revert()}
+ slot to reset the editor widgets, repopulating all widgets with
+ the current data of the model.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 7
+
+ Likewise, the \c submit() slot is triggered whenever the users
+ decide to submit their changes by pressing the \gui Submit button.
+
+ We use QDataWidgetMapper's \l {QDataWidgetMapper::}{submit()} slot
+ to submit all changes from the mapped widgets to the model,
+ i.e. to the database. For every mapped section, the item delegate
+ will then read the current value from the widget and set it in the
+ model. Finally, the \e model's \l {QAbstractItemModel::}{submit()}
+ function is invoked to let the model know that it should submit
+ whatever it has cached to the permanent storage.
+
+ Note that before any data is submitted, we check if the user has
+ chosen another image file using the previously stored \c
+ displayedImage variable as reference. If the current and stored
+ file names differ, we store the new file name and emit the \c
+ imageChanged() signal.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 8
+
+ The \c createButtons() function is provided for convenience, i.e.,
+ to simplify the constructor.
+
+ We make the \gui Close button the default button, i.e., the button
+ that is pressed when the user presses \gui Enter, and connect its
+ \l {QPushButton::}{clicked()} signal to the widget's \l
+ {QWidget::}{close()} slot. As mentioned above closing the window
+ only hides the widget; it is not deleted. We also connect the \gui
+ Submit and \gui Revert buttons to the corresponding \c submit()
+ and \c revert() slots.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 9
+
+ The QDialogButtonBox class is a widget that presents buttons in a
+ layout that is appropriate to the current widget style. Dialogs
+ like our information window, typically present buttons in a layout
+ that conforms to the interface guidelines for that
+ platform. Invariably, different platforms have different layouts
+ for their dialogs. QDialogButtonBox allows us to add buttons,
+ automatically using the appropriate layout for the user's desktop
+ environment.
+
+ Most buttons for a dialog follow certain roles. We give the \gui
+ Submit and \gui Revert buttons the \l
+ {QDialogButtonBox::ButtonRole}{reset} role, i.e., indicating that
+ pressing the button resets the fields to the default values (in
+ our case the information contained in the database). The \l
+ {QDialogButtonBox::ButtonRole}{reject} role indicates that
+ clicking the button causes the dialog to be rejected. On the other
+ hand, since we only hide the information window, any changes that
+ the user has made wil be preserved until the user expliclity
+ revert or submit them.
+
+ \snippet examples/sql/drilldown/informationwindow.cpp 10
+
+ The \c enableButtons() slot is called to enable the buttons
+ whenever the user changes the presented data. Likewise, when the
+ data the user choose to submit the changes, the buttons are
+ disabled to indicate that the current data is stored in the
+ database.
+
+ This completes the \c InformationWindow class. Let's take a look
+ at how we have used it in our example application.
+
+ \section1 View Class Definition
+
+ The \c View class represents the main application window and
+ inherits QGraphicsView:
+
+ \snippet examples/sql/drilldown/view.h 0
+ \codeline
+ \snippet examples/sql/drilldown/view.h 1
+
+ The QGraphicsView class is part of the \l {The Graphics View
+ Framework} which we will use to display the images of Nokia's
+ Qt Software offices. To be able to respond to user interaction;
+ i.e., showing the
+ appropriate information window whenever the user clicks one of the
+ office images, we reimplement QGraphicsView's \l
+ {QGraphicsView::}{mouseReleaseEvent()} function.
+
+ Note that the constructor expects the names of two database
+ tables: One containing the detailed information about the offices,
+ and another containing the names of the available image files. We
+ also provide a private \c updateImage() slot to catch \c
+ {InformationWindow}'s \c imageChanged() signal that is emitted
+ whenever the user changes a location's image.
+
+ \snippet examples/sql/drilldown/view.h 2
+
+ The \c addItems() function is a convenience function provided to
+ simplify the constructor. It is called only once, creating the
+ various items and adding them to the view.
+
+ The \c findWindow() function, on the other hand, is frequently
+ used. It is called from the \c showInformation() function to
+ detemine whether a window is already created for the given
+ location (whenever we create an \c InformationWindow object, we
+ store a reference to it in the \c informationWindows list). The
+ latter function is in turn called from our custom \c
+ mouseReleaseEvent() implementation.
+
+ \snippet examples/sql/drilldown/view.h 3
+
+ Finally we declare a QSqlRelationalTableModel pointer. As
+ previously mentioned, the QSqlRelationalTableModel class provides
+ an editable data model with foreign key support. There are a
+ couple of things you should keep in mind when using the
+ QSqlRelationalTableModel class: The table must have a primary key
+ declared and this key cannot contain a relation to another table,
+ i.e., it cannot be a foreign key. Note also that if a relational
+ table contains keys that refer to non-existent rows in the
+ referenced table, the rows containing the invalid keys will not be
+ exposed through the model. It is the user's or the database's
+ responsibility to maintain referential integrity.
+
+ \section1 View Class Implementation
+
+ Although the constructor requests the names of both the table
+ containing office details as well as the table containing the
+ names of the available image files, we only have to create a
+ QSqlRelationalTableModel object for the office table:
+
+ \snippet examples/sql/drilldown/view.cpp 0
+
+ The reason is that once we have a model with the office details,
+ we can create a relation to the available image files using
+ QSqlRelationalTableModel's \l
+ {QSqlRelationalTableModel::}{setRelation()} function. This
+ function creates a foreign key for the given model column. The key
+ is specified by the provided QSqlRelation object constructed by
+ the name of the table the key refers to, the field the key is
+ mapping to and the field that should be presented to the user.
+
+ Note that setting the table only specifies which table the model
+ operates on, i.e., we must explicitly call the model's \l
+ {QSqlRelationalTableModel::}{select()} function to populate our
+ model.
+
+ \snippet examples/sql/drilldown/view.cpp 1
+
+ Then we create the contents of our view, i.e., the scene and its
+ items. The location labels are regular QGraphicsTextItem objects,
+ and the "Qt" logo is represented by a QGraphicsPixmapItem
+ object. The images, on the other hand, are instances of the \c
+ ImageItem class (derived from QGraphicsPixmapItem). We will get
+ back to this shortly when reviewing the \c addItems() function.
+
+ Finally, we set the main application widget's size constraints and
+ window title.
+
+ \snippet examples/sql/drilldown/view.cpp 3
+
+ The \c addItems() function is called only once, i.e., when
+ creating the main application window. For each row in the database
+ table, we first extract the corresponding record using the model's
+ \l {QSqlRelationalTableModel::}{record()} function. The QSqlRecord
+ class encapsulates both the functionality and characteristics of a
+ database record, and supports adding and removing fields as well
+ as setting and retrieving field values. The QSqlRecord::value()
+ function returns the value of the field with the given name or
+ index as a QVariant object.
+
+ For each record, we create a label item as well as an image item,
+ calculate their position and add them to the scene. The image
+ items are represented by instances of the \c ImageItem class. The
+ reason we must create a custom item class is that we want to catch
+ the item's hover events, animating the item when the mouse cursor
+ is hovering over the image (by default, no items accept hover
+ events). Please see the \l{The Graphics View Framework}
+ documentation and the
+ \l{Qt Examples#Graphics View}{Graphics View examples} for more
+ details.
+
+ \snippet examples/sql/drilldown/view.cpp 5
+
+ We reimplement QGraphicsView's \l
+ {QGraphicsView::}{mouseReleaseEvent()} event handler to respond to
+ user interaction. If the user clicks any of the image items, this
+ function calls the private \c showInformation() function to pop up
+ the associated information window.
+
+ \l {The Graphics View Framework} provides the qgraphicsitem_cast()
+ function to determine whether the given QGraphicsItem instance is
+ of a given type. Note that if the event is not related to any of
+ our image items, we pass it on to the base class implementation.
+
+ \snippet examples/sql/drilldown/view.cpp 6
+
+ The \c showInformation() function is given an \c ImageItem object
+ as argument, and starts off by extracting the item's location
+ ID. Then it determines if there already is created an information
+ window for this location. If it is, and the window is visible, it
+ ensures that the window is raised to the top of the widget stack
+ and activated. If the window exists but is hidden, calling its \l
+ {QWidget::}{show()} slot gives the same result.
+
+ If no window for the given location exists, we create one by
+ passing the location ID, a pointer to the model, and our view as a
+ parent, to the \c InformationWindow constructor. Note that we
+ connect the information window's \c imageChanged() signal to \e
+ this widget's \c updateImage() slot, before we give it a suitable
+ position and add it to the list of existing windows.
+
+ \snippet examples/sql/drilldown/view.cpp 7
+
+ The \c updateImage() slot takes a location ID and the name of an
+ image files as arguments. It filters out the image items, and
+ updates the one that correspond to the given location ID, with the
+ provided image file.
+
+ \snippet examples/sql/drilldown/view.cpp 8
+
+ The \c findWindow() function simply searches through the list of
+ existing windows, returning a pointer to the window that matches
+ the given location ID, or 0 if the window doesn't exists.
+
+ Finally, let's take a quick look at our custom \c ImageItem class:
+
+ \section1 ImageItem Class Definition
+
+ The \c ImageItem class is provided to facilitate animation of the
+ image items. It inherits QGraphicsPixmapItem and reimplements its
+ hover event handlers:
+
+ \snippet examples/sql/drilldown/imageitem.h 0
+
+ In addition, we implement a public \c id() function to be able to
+ identify the associated location and a public \c adjust() function
+ that can be called to ensure that the image item is given the
+ preferred size regardless of the original image file.
+
+ The animation is implemented using the QTimeLine class together
+ with the event handlers and the private \c setFrame() slot: The
+ image item will expand when the mouse cursor hovers over it,
+ returning back to its orignal size when the cursor leaves its
+ borders.
+
+ Finally, we store the location ID that this particular record is
+ associated with as well as a z-value. In the \l {The Graphics View
+ Framework}, an item's z-value determines its position in the item
+ stack. An item of high Z-value will be drawn on top of an item
+ with a lower z-value if they share the same parent item. We also
+ provide an \c updateItemPosition() function to refresh the view
+ when required.
+
+ \section1 ImageItem Class Implementation
+
+ The \c ImageItem class is really only a QGraphicsPixmapItem with
+ some additional features, i.e., we can pass most of the
+ constructor's arguments (the pixmap, parent and scene) on to the
+ base class constructor:
+
+ \snippet examples/sql/drilldown/imageitem.cpp 0
+
+ Then we store the ID for future reference, and ensure that our
+ item will accept hover events. Hover events are delivered when
+ there is no current mouse grabber item. They are sent when the
+ mouse cursor enters an item, when it moves around inside the item,
+ and when the cursor leaves an item. As we mentioned earlier, none
+ of the \l {The Graphics View Framework}'s items accept hover
+ event's by default.
+
+ The QTimeLine class provides a timeline for controlling
+ animations. Its \l {QTimeLine::}{duration} property holds the
+ total duration of the timeline in milliseconds. By default, the
+ time line runs once from the beginning and towards the end. The
+ QTimeLine::setFrameRange() function sets the timeline's frame
+ counter; when the timeline is running, the \l
+ {QTimeLine::}{frameChanged()} signal is emitted each time the
+ frame changes. We set the duration and frame range for our
+ animation, and connect the time line's \l
+ {QTimeLine::}{frameChanged()} and \l {QTimeLine::}{finished()}
+ signals to our private \c setFrame() and \c updateItemPosition()
+ slots.
+
+ Finally, we call \c adjust() to ensure that the item is given the
+ preferred size.
+
+ \snippet examples/sql/drilldown/imageitem.cpp 1
+ \codeline
+ \snippet examples/sql/drilldown/imageitem.cpp 2
+
+ Whenever the mouse cursor enters or leave the image item, the
+ corresponding event handlers are triggered: We first set the time
+ line's direction, making the item expand or shrink,
+ respectively. Then we alter the item's z-value if it is not already
+ set to the expected value.
+
+ In the case of hover \e enter events, we immediately update the
+ item's position since we want the item to appear on top of all
+ other items as soon as it starts expanding. In the case of hover
+ \e leave events, on the other hand, we postpone the actual update
+ to achieve the same result. But remember that when we constructed
+ our item, we connected the time line's \l
+ {QTimeLine::}{finished()} signal to the \c updateItemPosition()
+ slot. In this way the item is given the correct position in the
+ item stack once the animation is completed. Finally, if the time
+ line is not already running, we start it.
+
+ \snippet examples/sql/drilldown/imageitem.cpp 3
+
+ When the time line is running, it triggers the \c setFrame() slot
+ whenever the current frame changes due to the connection we
+ created in the item constructor. It is this slot that controls the
+ animation, expanding or shrinking the image item step by step.
+
+ We first call the \c adjust() function to ensure that we start off
+ with the item's original size. Then we scale the item with a
+ factor depending on the animation's progress (using the \c frame
+ parameter). Note that by default, the transformation will be
+ relative to the item's top-left corner. Since we want the item to
+ be transformed relative to its center, we must translate the
+ coordinate system before we scale the item.
+
+ In the end, only the following convenience functions remain:
+
+ \snippet examples/sql/drilldown/imageitem.cpp 4
+ \codeline
+ \snippet examples/sql/drilldown/imageitem.cpp 5
+ \codeline
+ \snippet examples/sql/drilldown/imageitem.cpp 6
+
+ The \c adjust() function defines and applies a transformation
+ matrix, ensuring that our image item appears with the preferred
+ size regardless of the size of the source image. The \c id()
+ function is trivial, and is simply provided to be able to identify
+ the item. In the \c updateItemPosition() slot we call the
+ QGraphicsItem::setZValue() function, setting the elevation (i.e.,
+ the position) of the item.
+*/
diff --git a/doc/src/examples/dropsite.qdoc b/doc/src/examples/dropsite.qdoc
new file mode 100644
index 0000000..4780b82
--- /dev/null
+++ b/doc/src/examples/dropsite.qdoc
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/dropsite
+ \title Drop Site Example
+
+ The example shows how to distinguish the various MIME formats available
+ in a drag and drop operation.
+
+ \image dropsite-example.png Screenshot of the Drop Site example
+
+ The Drop Site example accepts drops from other applications, and displays
+ the MIME formats provided by the drag object.
+
+ There are two classes, \c DropArea and \c DropSiteWindow, and a \c main()
+ function in this example. A \c DropArea object is instantiated in
+ \c DropSiteWindow; a \c DropSiteWindow object is then invoked in the
+ \c main() function.
+
+ \section1 DropArea Class Definition
+
+ The \c DropArea class is a subclass of QLabel with a public slot,
+ \c clear(), and a \c changed() signal.
+
+ \snippet draganddrop/dropsite/droparea.h DropArea header part1
+
+ In addition, \c DropArea also contains a private instance of QLabel and
+ reimplementations of four \l{QWidget} event handlers:
+
+ \list 1
+ \o \l{QWidget::dragEnterEvent()}{dragEnterEvent()}
+ \o \l{QWidget::dragMoveEvent()}{dragMoveEvent()}
+ \o \l{QWidget::dragLeaveEvent()}{dragLeaveEvent()}
+ \o \l{QWidget::dropEvent()}{dropEvent()}
+ \endlist
+
+ These event handlers are further explained in the implementation of the
+ \c DropArea class.
+
+ \snippet draganddrop/dropsite/droparea.h DropArea header part2
+
+ \section1 DropArea Class Implementation
+
+ In the \c DropArea constructor, we set the \l{QWidget::setMinimumSize()}
+ {minimum size} to 200x200 pixels, the \l{QFrame::setFrameStyle()}
+ {frame style} to both QFrame::Sunken and QFrame::StyledPanel, and we align
+ its contents to the center.
+
+ \snippet draganddrop/dropsite/droparea.cpp DropArea constructor
+
+ Also, we enable drop events in \c DropArea by setting the
+ \l{QWidget::acceptDrops()}{acceptDrops} property to \c true. Then,
+ we enable the \l{QWidget::autoFillBackground()}{autoFillBackground}
+ property and invoke the \c clear() function.
+
+ The \l{QWidget::dragEnterEvent()}{dragEnterEvent()} event handler is
+ called when a drag is in progress and the mouse enters the \c DropArea
+ object. For the \c DropSite example, when the mouse enters \c DropArea,
+ we set its text to "<drop content>" and highlight its background.
+
+ \snippet draganddrop/dropsite/droparea.cpp dragEnterEvent() function
+
+ Then, we invoke \l{QDropEvent::acceptProposedAction()}
+ {acceptProposedAction()} on \a event, setting the drop action to the one
+ proposed. Lastly, we emit the \c changed() signal, with the data that was
+ dropped and its MIME type information as a parameter.
+
+ For \l{QWidget::dragMoveEvent()}{dragMoveEvent()}, we just accept the
+ proposed QDragMoveEvent object, \a event, with
+ \l{QDropEvent::acceptProposedAction()}{acceptProposedAction()}.
+
+ \snippet draganddrop/dropsite/droparea.cpp dragMoveEvent() function
+
+ The \c DropArea class's implementation of \l{QWidget::dropEvent()}
+ {dropEvent()} extracts the \a{event}'s mime data and displays it
+ accordingly.
+
+ \snippet draganddrop/dropsite/droparea.cpp dropEvent() function part1
+
+ The \c mimeData object can contain one of the following objects: an image,
+ HTML text, plain text, or a list of URLs.
+
+ \snippet draganddrop/dropsite/droparea.cpp dropEvent() function part2
+
+ \list
+ \o If \c mimeData contains an image, we display it in \c DropArea with
+ \l{QLabel::setPixmap()}{setPixmap()}.
+ \o If \c mimeData contains HTML, we display it with
+ \l{QLabel::setText()}{setText()} and set \c{DropArea}'s text format
+ as Qt::RichText.
+ \o If \c mimeData contains plain text, we display it with
+ \l{QLabel::setText()}{setText()} and set \c{DropArea}'s text format
+ as Qt::PlainText. In the event that \c mimeData contains URLs, we
+ iterate through the list of URLs to display them on individual
+ lines.
+ \o If \c mimeData contains other types of objects, we set
+ \c{DropArea}'s text, with \l{QLabel::setText()}{setText()} to
+ "Cannot display data" to inform the user.
+ \endlist
+
+ We then set \c{DropArea}'s \l{QWidget::backgroundRole()}{backgroundRole} to
+ QPalette::Dark and we accept \c{event}'s proposed action.
+
+ \snippet draganddrop/dropsite/droparea.cpp dropEvent() function part3
+
+ The \l{QWidget::dragLeaveEvent()}{dragLeaveEvent()} event handler is
+ called when a drag is in progress and the mouse leaves the widget.
+
+ \snippet draganddrop/dropsite/droparea.cpp dragLeaveEvent() function
+
+ For \c{DropArea}'s implementation, we clear invoke \c clear() and then
+ accept the proposed event.
+
+ The \c clear() function sets the text in \c DropArea to "<drop content>"
+ and sets the \l{QWidget::backgroundRole()}{backgroundRole} to
+ QPalette::Dark. Lastly, it emits the \c changed() signal.
+
+ \snippet draganddrop/dropsite/droparea.cpp clear() function
+
+ \section1 DropSiteWindow Class Definition
+
+ The \c DropSiteWindow class contains a constructor and a public slot,
+ \c updateFormatsTable().
+
+ \snippet draganddrop/dropsite/dropsitewindow.h DropSiteWindow header
+
+ The class also contains a private instance of \c DropArea, \c dropArea,
+ QLabel, \c abstractLabel, QTableWidget, \c formatsTable, QDialogButtonBox,
+ \c buttonBox, and two QPushButton objects, \c clearButton and
+ \c quitButton.
+
+ \section1 DropSiteWindow Class Implementation
+
+ In the constructor of \c DropSiteWindow, we instantiate \c abstractLabel
+ and set its \l{QLabel::setWordWrap()}{wordWrap} property to \c true. We
+ also call the \l{QLabel::adjustSize()}{adjustSize()} function to adjust
+ \c{abstractLabel}'s size according to its contents.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp constructor part1
+
+ Then we instantiate \c dropArea and connect its \c changed() signal to
+ \c{DropSiteWindow}'s \c updateFormatsTable() slot.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp constructor part2
+
+ We now set up the QTableWidget object, \c formatsTable. Its
+ horizontal header is set using a QStringList object, \c labels. The number
+ of columms are set to two and the table is not editable. Also, the
+ \c{formatTable}'s horizontal header is formatted to ensure that its second
+ column stretches to occupy additional space available.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp constructor part3
+
+ Two QPushButton objects, \c clearButton and \c quitButton, are instantiated
+ and added to \c buttonBox - a QDialogButtonBox object. We use
+ QDialogButtonBox here to ensure that the push buttons are presented in a
+ layout that conforms to the platform's style.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp constructor part4
+
+ The \l{QPushButton::clicked()}{clicked()} signals for \c quitButton and
+ \c clearButton are connected to \l{QWidget::close()}{close()} and
+ \c clear(), respectively.
+
+ For the layout, we use a QVBoxLayout, \c mainLayout, to arrange our widgets
+ vertically. We also set the window title to "Drop Site" and the minimum
+ size to 350x500 pixels.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp constructor part5
+
+ We move on to the \c updateFormatsTable() function. This function updates
+ the \c formatsTable, displaying the MIME formats of the object dropped onto
+ the \c DropArea object. First, we set \l{QTableWidget}'s
+ \l{QTableWidget::setRowCount()}{rowCount} property to 0. Then, we validate
+ to ensure that the QMimeData object passed in is a valid object.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp updateFormatsTable() part1
+
+ Once we are sure that \c mimeData is valid, we iterate through its
+ supported formats using the \l{The foreach Keyword}{foreach keyword}.
+ This keyword has the following format:
+
+ \snippet doc/src/snippets/code/doc_src_examples_dropsite.qdoc 0
+
+ In our example, \c format is the \a variable and the \a container is a
+ QStringList, obtained from \c mimeData->formats().
+
+ \note The \l{QMimeData::formats()}{formats()} function returns a
+ QStringList object, containing all the formats supported by the
+ \c mimeData.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp updateFormatsTable() part2
+
+ Within each iteration, we create a QTableWidgetItem, \c formatItem and we
+ set its \l{QTableWidgetItem::setFlags()}{flags} to Qt::ItemIsEnabled, and
+ its \l{QTableWidgetItem::setTextAlignment()}{text alignment} to Qt::AlignTop
+ and Qt::AlignLeft.
+
+ A QString object, \c text, is customized to display data according to the
+ contents of \c format. We invoke {QString}'s \l{QString::simplified()}
+ {simplified()} function on \c text, to obtain a string that has no
+ additional space before, after or in between words.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp updateFormatsTable() part3
+
+ If \c format contains a list of URLs, we iterate through them, using spaces
+ to separate them. On the other hand, if \c format contains an image, we
+ display the data by converting the text to hexadecimal.
+
+ \snippet draganddrop/dropsite/dropsitewindow.cpp updateFormatsTable() part4
+
+ Once \c text has been customized to contain the appropriate data, we insert
+ both \c format and \c text into \c formatsTable with
+ \l{QTableWidget::setItem()}{setItem()}. Lastly, we invoke
+ \l{QTableView::resizeColumnToContents()}{resizeColumnToContents()} on
+ \c{formatsTable}'s first column.
+
+ \section1 The main() Function
+
+ Within the \c main() function, we instantiate \c DropSiteWindow and invoke
+ its \l{QWidget::show()}{show()} function.
+
+ \snippet draganddrop/dropsite/main.cpp main() function
+*/
diff --git a/doc/src/examples/dynamiclayouts.qdoc b/doc/src/examples/dynamiclayouts.qdoc
new file mode 100644
index 0000000..96b791b
--- /dev/null
+++ b/doc/src/examples/dynamiclayouts.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example layouts/dynamiclayouts
+ \title Dynamic Layouts Example
+
+ The Dynamic Layouts example shows how to move widgets around in
+ existing layouts.
+*/
diff --git a/doc/src/examples/echoplugin.qdoc b/doc/src/examples/echoplugin.qdoc
new file mode 100644
index 0000000..32ad15b
--- /dev/null
+++ b/doc/src/examples/echoplugin.qdoc
@@ -0,0 +1,222 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/echoplugin
+ \title Echo Plugin Example
+
+ This example shows how to create a Qt plugin.
+
+ \image echopluginexample.png
+
+ There are two kinds of plugins in Qt: plugins that extend Qt
+ itself and plugins that extend applications written in Qt. In this
+ example, we show the procedure of implementing plugins that extend
+ applications. When you create a plugin you declare an interface,
+ which is a class with only pure virtual functions. This interface
+ is inherited by the class that implements the plugin. The class is
+ stored in a shared library and can therefore be loaded by
+ applications at run-time. When loaded, the plugin is dynamically
+ cast to the interface using Qt's \l{Meta-Object
+ System}{meta-object system}. The plugin \l{How to Create Qt
+ Plugins}{overview document} gives a high-level introduction to
+ plugins.
+
+ We have implemented a plugin, the \c EchoPlugin, which implements
+ the \c EchoInterface. The interface consists of \c echo(), which
+ takes a QString as argument. The \c EchoPlugin returns the string
+ unaltered (i.e., it works as the familiar echo command found in
+ both Unix and Windows).
+
+ We test the plugin in \c EchoWindow: when you push the QPushButton
+ (as seen in the image above), the application sends the text in
+ the QLineEdit to the plugin, which echoes it back to the
+ application. The answer from the plugin is displayed in the
+ QLabel.
+
+
+ \section1 EchoWindow Class Definition
+
+ The \c EchoWindow class lets us test the \c EchoPlugin through a
+ GUI.
+
+ \snippet examples/tools/echoplugin/echowindow/echowindow.h 0
+
+ We load the plugin in \c loadPlugin() and cast it to \c
+ EchoInterface. When the user clicks the \c button we take the
+ text in \c lineEdit and call the interface's \c echo() with it.
+
+
+ \section1 EchoWindow Class Implementation
+
+ We start with a look at the constructor:
+
+ \snippet examples/tools/echoplugin/echowindow/echowindow.cpp 0
+
+ We create the widgets and set a title for the window. We then load
+ the plugin. \c loadPlugin() returns false if the plugin could not
+ be loaded, in which case we disable the widgets. If you wish a
+ more detailed error message, you can use
+ \l{QPluginLoader::}{errorString()}; we will look more closely at
+ QPluginLoader later.
+
+ Here is the implementation of \c sendEcho():
+
+ \snippet examples/tools/echoplugin/echowindow/echowindow.cpp 1
+
+ This slot is called when the user pushes \c button or presses
+ enter in \c lineEdit. We call \c echo() of the echo interface. In
+ our example this is the \c EchoPlugin, but it could be any plugin
+ that inherit the \c EchoInterface. We take the QString returned
+ from \c echo() and display it in the \c label.
+
+ Here is the implementation of \c createGUI():
+
+ \snippet examples/tools/echoplugin/echowindow/echowindow.cpp 2
+
+ We create the widgets and lay them out in a grid layout. We
+ connect the label and line edit to our \c sendEcho() slot.
+
+ Here is the \c loadPlugin() function:
+
+ \snippet examples/tools/echoplugin/echowindow/echowindow.cpp 3
+
+ Access to plugins at run-time is provided by QPluginLoader. You
+ supply it with the filename of the shared library the plugin is
+ stored in and call \l{QPluginLoader::}{instance()}, which loads
+ and returns the root component of the plugin (i.e., it resolves
+ the type of the plugin and creates a QObject instance of it). If
+ the plugin was not successfully loaded, it will be null, so we
+ return false. If it was loaded correctly, we can cast the plugin
+ to our \c EchoInterface and return true. In the case that the
+ plugin loaded does not implement the \c EchoInterface, \c
+ instance() will return null, but this cannot happen in our
+ example. Notice that the location of the plugin is not the same
+ for all platforms.
+
+
+ \section1 EchoInterface Class Definition
+
+ The \c EchoInterface defines the functions that the plugin will
+ provide. An interface is a class that only consists of pure
+ virtual functions. If non virtual functions were present in the
+ class you would get misleading compile errors in the moc files.
+
+ \snippet examples/tools/echoplugin/echowindow/echointerface.h 0
+
+ We declare \c echo(). In our \c EchoPlugin we use this method to
+ return, or echo, \a message.
+
+ We use the Q_DECLARE_INTERFACE macro to let \l{Meta-Object
+ System}{Qt's meta object system} aware of the interface. We do
+ this so that it will be possible to identify plugins that
+ implements the interface at run-time. The second argument is a
+ string that must identify the interface in a unique way.
+
+
+ \section1 EchoPlugin Class Definition
+
+ We inherit both QObject and \c EchoInterface to make this class a
+ plugin. The Q_INTERFACES macro tells Qt which interfaces the class
+ implements. In our case we only implement the \c EchoInterface.
+ If a class implements more than one interface, they are given as
+ a comma separated list.
+
+ \snippet examples/tools/echoplugin/plugin/echoplugin.h 0
+
+
+ \section1 EchoPlugin Class Implementation
+
+ Here is the implementation of \c echo():
+
+ \snippet examples/tools/echoplugin/plugin/echoplugin.cpp 0
+
+ We simply return the functions parameter.
+
+ \snippet examples/tools/echoplugin/plugin/echoplugin.cpp 1
+
+ We use the Q_EXPORT_PLUGIN2 macro to let Qt know that the \c
+ EchoPlugin class is a plugin. The first parameter is the name of
+ the plugin; it is usual to give the plugin and the library file it
+ is stored in the same name.
+
+ \section1 The \c main() function
+
+ \snippet examples/tools/echoplugin/echowindow/main.cpp 0
+
+ We create an \c EchoWindow and display it as a top-level window.
+
+ \section1 The Profiles
+
+ When creating plugins the profiles need to be adjusted.
+ We show here what changes need to be done.
+
+ The profile in the echoplugin directory uses the \c subdirs
+ template and simply includes includes to directories in which
+ the echo window and echo plugin lives:
+
+ \snippet examples/tools/echoplugin/echoplugin.pro 0
+
+ The profile for the echo window does not need any plugin specific
+ settings. We move on to the plugin profile:
+
+ \snippet examples/tools/echoplugin/plugin/plugin.pro 0
+
+ We need to set the TEMPLATE as we now want to make a library
+ instead of an executable. We also need to tell qmake that we are
+ creating a plugin. The \c EchoInterface that the plugin implements
+ lives in the \c echowindow directory, so we need to add that
+ directory to the include path. We set the TARGET of the project,
+ which is the name of the library file in which the plugin will be
+ stored; qmake appends the appropriate file extension depending on
+ the platform. By convention the target should have the same name
+ as the plugin (set with Q_EXPORT_PLUGIN2)
+
+ \section1 Further reading and examples
+
+ You can find an overview of the macros needed to create plugins
+ \l{Macros for Defining Plugins}{here}.
+
+ We give an example of a plugin that extend Qt in the \l{Style
+ Plugin Example}{style plugin} example. The \l{Plug & Paint
+ Example}{plug and paint} example shows how to create static
+ plugins.
+*/
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
new file mode 100644
index 0000000..da01830
--- /dev/null
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -0,0 +1,459 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/editabletreemodel
+ \title Editable Tree Model Example
+
+ This example shows how to implement a simple item-based tree model that can
+ be used with other classes the model/view framework.
+
+ \image itemviews-editabletreemodel.png
+
+ The model supports editable items, custom headers, and the ability to
+ insert and remove rows and columns. With these features, it is also
+ possible to insert new child items, and this is shown in the supporting
+ example code.
+
+ \note The model only shows the basic principles used when creating an
+ editable, hierarchical model. You may wish to use the \l{ModelTest}
+ project to test production models.
+
+ \section1 Overview
+
+ As described in the \l{Model Subclassing Reference}, models must
+ provide implementations for the standard set of model functions:
+ \l{QAbstractItemModel::}{flags()}, \l{QAbstractItemModel::}{data()},
+ \l{QAbstractItemModel::}{headerData()}, and
+ \l{QAbstractItemModel::}{rowCount()}. In addition, hierarchical models,
+ such as this one, need to provide implementations of
+ \l{QAbstractItemModel::}{index()} and \l{QAbstractItemModel::}{parent()}.
+
+ An editable model needs to provide implementations of
+ \l{QAbstractItemModel::}{setData()} and
+ \l{QAbstractItemModel::}{headerData()}, and must return a suitable
+ combination of flags from its \l{QAbstractItemModel::}{flags()} function.
+
+ Since this example allows the dimensions of the model to be changed,
+ we must also implement \l{QAbstractItemModel::}{insertRows()},
+ \l{QAbstractItemModel::}{insertColumns()},
+ \l{QAbstractItemModel::}{removeRows()}, and
+ \l{QAbstractItemModel::}{removeColumns()}.
+
+ \section1 Design
+
+ As with the \l{itemviews/simpletreemodel}{Simple Tree Model} example,
+ the model simply acts as a wrapper around a collection
+ of instances of a \c TreeItem class. Each \c TreeItem is designed to
+ hold data for a row of items in a tree view, so it contains a list of
+ values corresponding to the data shown in each column.
+
+ Since QTreeView provides a row-oriented view onto a model, it is
+ natural to choose a row-oriented design for data structures that
+ will supply data via a model to this kind of view. Although this makes
+ the tree model less flexible, and possibly less useful for use with
+ more sophisticated views, it makes it less complex to design and easier
+ to implement.
+
+ \target Relations-between-internal-items
+ \table
+ \row \o \inlineimage itemviews-editabletreemodel-items.png
+ \o \bold{Relations between internal items}
+
+ When designing a data structure for use with a custom model, it is useful
+ to expose each item's parent via a function like
+ \l{TreeItem::parent}{TreeItem::parent()} because it will make
+ writing the model's own \l{QAbstractItemModel::}{parent()} function easier.
+ Similarly, a function like \l{TreeItem::child}{TreeItem::child()} is
+ helpful when implementing the model's \l{QAbstractItemModel::}{index()}
+ function. As a result, each \c TreeItem maintains information about
+ its parent and children, making it possible for us to traverse the tree
+ structure.
+
+ The diagram shows how \c TreeItem instances are connected via their
+ \l{TreeItem::parent}{parent()} and \l{TreeItem::child}{child()}
+ functions.
+
+ In the example shown, two top-level items, \bold{A} and
+ \bold{B}, can be obtained from the root item by calling its child()
+ function, and each of these items return the root node from their
+ parent() functions, though this is only shown for item \bold{A}.
+ \endtable
+
+ Each \c TreeItem stores data for each column in the row it represents
+ in its \c itemData private member (a list of QVariant objects).
+ Since there is a one-to-one mapping between each column in the view
+ and each entry in the list, we provide a simple
+ \l{TreeItem::data}{data()} function to read entries in the \c itemData
+ list and a \l{TreeItem::setData}{setData()} function to allow them to
+ be modified.
+ As with other functions in the item, this simplifies the implemention
+ of the model's \l{QAbstractItemModel::}{data()} and
+ \l{QAbstractItemModel::}{setData()} functions.
+
+ We place an item at the root of the tree of items. This root item
+ corresponds to the null model index, \l{QModelIndex::}{QModelIndex()},
+ that is used to represent the parent of a top-level item when handling
+ model indexes.
+ Although the root item does not have a visible representation in any of
+ the standard views, we use its internal list of QVariant objects to
+ store a list of strings that will be passed to views for use as
+ horizontal header titles.
+
+ \table
+ \row \o \inlineimage itemviews-editabletreemodel-model.png
+ \o \bold{Accessing data via the model}
+
+ In the case shown in the diagram, the piece of information represented
+ by \bold{a} can be obtained using the standard model/view API:
+
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 0
+
+ Since each items holds pieces of data for each column in a given row,
+ there can be many model indexes that map to the same \c TreeItem object.
+ For example, the information represented by \bold{b} can be obtained
+ using the following code:
+
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 1
+
+ The same underlying \c TreeItem would be accessed to obtain information
+ for the other model indexes in the same row as \bold{b}.
+ \endtable
+
+ In the model class, \c TreeModel, we relate \c TreeItem objects to
+ model indexes by passing a pointer for each item when we create its
+ corresponding model index with QAbstractItemModel::createIndex() in
+ our \l{TreeModel::index}{index()} and \l{TreeModel::parent}{parent()}
+ implementations.
+ We can retrieve pointers stored in this way by calling the
+ \l{QModelIndex::}{internalPointer()} function on the relevant model
+ index - we create our own \l{TreeModel::getItem}{getItem()} function to
+ do this work for us, and call it from our \l{TreeModel::data}{data()}
+ and \l{TreeModel::parent}{parent()} implementations.
+
+ Storing pointers to items is convenient when we control how they are
+ created and destroyed since we can assume that an address obtained from
+ \l{QModelIndex::}{internalPointer()} is a valid pointer.
+ However, some models need to handle items that are obtained from other
+ components in a system, and in many cases it is not possible to fully
+ control how items are created or destroyed. In such situations, a pure
+ pointer-based approach needs to be supplemented by safeguards to ensure
+ that the model does not attempt to access items that have been deleted.
+
+ \table
+ \row \o \bold{Storing information in the underlying data structure}
+
+ Several pieces of data are stored as QVariant objects in the \c itemData
+ member of each \c TreeItem instance
+
+ The diagram shows how pieces of information,
+ represented by the labels \bold{a}, \bold{b} and \bold{c} in the
+ previous two diagrams, are stored in items \bold{A}, \bold{B} and
+ \bold{C} in the underlying data structure. Note that pieces of
+ information from the same row in the model are all obtained from the
+ same item. Each element in a list corresponds to a piece of information
+ exposed by each column in a given row in the model.
+
+ \o \inlineimage itemviews-editabletreemodel-values.png
+ \endtable
+
+ Since the \c TreeModel implementation has been designed for use with
+ QTreeView, we have added a restriction on the way it uses \c TreeItem
+ instances: each item must expose the same number of columns of data.
+ This makes viewing the model consistent, allowing us to use the root
+ item to determine the number of columns for any given row, and only
+ adds the requirement that we create items containing enough data for
+ the total number of columns. As a result, inserting and removing
+ columns are time-consuming operations because we need to traverse the
+ entire tree to modify every item.
+
+ An alternative approach would be to design the \c TreeModel class so
+ that it truncates or expands the list of data in individual \c TreeItem
+ instances as items of data are modified. However, this "lazy" resizing
+ approach would only allow us to insert and remove columns at the end of
+ each row and would not allow columns to be inserted or removed at
+ arbitrary positions in each row.
+
+ \target Relating-items-using-model-indexes
+ \table
+ \row
+ \o \inlineimage itemviews-editabletreemodel-indexes.png
+ \o \bold{Relating items using model indexes}
+
+ As with the \l{itemviews/simpletreemodel}{Simple Tree Model} example,
+ the \c TreeModel needs to be able to take a model index, find the
+ corresponding \c TreeItem, and return model indexes that correspond to
+ its parents and children.
+
+ In the diagram, we show how the model's \l{TreeModel::parent()}{parent()}
+ implementation obtains the model index corresponding to the parent of
+ an item supplied by the caller, using the items shown in a
+ \l{Relations-between-internal-items}{previous diagram}.
+
+ A pointer to item \bold{C} is obtained from the corresponding model index
+ using the \l{QModelIndex::internalPointer()} function. The pointer was
+ stored internally in the index when it was created. Since the child
+ contains a pointer to its parent, we use its \l{TreeItem::parent}{parent()}
+ function to obtain a pointer to item \bold{B}. The parent model index is
+ created using the QAbstractItemModel::createIndex() function, passing
+ the pointer to item \bold{B} as the internal pointer.
+ \endtable
+
+ \section1 TreeItem Class Definition
+
+ The \c TreeItem class provides simple items that contain several
+ pieces of data, and which can provide information about their parent
+ and child items:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.h 0
+
+ We have designed the API to be similar to that provided by
+ QAbstractItemModel by giving each item functions to return the number
+ of columns of information, read and write data, and insert and remove
+ columns. However, we make the relationship between items explicit by
+ providing functions to deal with "children" rather than "rows".
+
+ Each item contains a list of pointers to child items, a pointer to its
+ parent item, and a list of QVariant objects that correspond to
+ information held in columns in a given row in the model.
+
+ \section1 TreeItem Class Implementation
+
+ Each \c TreeItem is constructed with a list of data and an optional
+ parent item:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 0
+
+ Initially, each item has no children. These are added to the item's
+ internal \c childItems member using the \c insertChildren() function
+ described later.
+
+ The destructor ensures that each child added to the item is deleted
+ when the item itself is deleted:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 1
+
+ \target TreeItem::parent
+ Since each item stores a pointer to its parent, the \c parent() function
+ is trivial:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 9
+
+ \target TreeItem::child
+ Three functions provide information about the children of an item.
+ \c child() returns a specific child from the internal list of children:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 2
+
+ The \c childCount() function returns the total number of children:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 3
+
+ The \c childNumber() function is used to determine the index of the child
+ in its parent's list of children. It accesses the parent's \c childItems
+ member directly to obtain this information:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 4
+
+ The root item has no parent item; for this item, we return zero to be
+ consistent with the other items.
+
+ The \c columnCount() function simply returns the number of elements in
+ the internal \c itemData list of QVariant objects:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 5
+
+ \target TreeItem::data
+ Data is retrieved using the \c data() function, which accesses the
+ appropriate element in the \c itemData list:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 6
+
+ \target TreeItem::setData
+ Data is set using the \c setData() function, which only stores values
+ in the \c itemData list for valid list indexes, corresponding to column
+ values in the model:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 11
+
+ To make implementation of the model easier, we return true to indicate
+ whether the data was set successfully, or false if an invalid column
+
+ Editable models often need to be resizable, enabling rows and columns to
+ be inserted and removed. The insertion of rows beneath a given model index
+ in the model leads to the insertion of new child items in the corresponding
+ item, handled by the \c insertChildren() function:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 7
+
+ This ensures that new items are created with the required number of columns
+ and inserted at a valid position in the internal \c childItems list.
+ Items are removed with the \c removeChildren() function:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 10
+
+ As discussed above, the functions for inserting and removing columns are
+ used differently to those for inserting and removing child items because
+ they are expected to be called on every item in the tree. We do this by
+ recursively calling this function on each child of the item:
+
+ \snippet examples/itemviews/editabletreemodel/treeitem.cpp 8
+
+ \section1 TreeModel Class Definition
+
+ The \c TreeModel class provides an implementation of the QAbstractItemModel
+ class, exposing the necessary interface for a model that can be edited and
+ resized.
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.h 0
+
+ The constructor and destructor are specific to this model.
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.h 1
+
+ Read-only tree models only need to provide the above functions. The
+ following public functions provide support for editing and resizing:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.h 2
+
+ To simplify this example, the data exposed by the model is organized into
+ a data structure by the model's \l{TreeModel::setupModelData}{setupModelData()}
+ function. Many real world models will not process the raw data at all, but
+ simply work with an existing data structure or library API.
+
+ \section1 TreeModel Class Implementation
+
+ The constructor creates a root item and initializes it with the header
+ data supplied:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 0
+
+ We call the internal \l{TreeModel::setupModelData}{setupModelData()}
+ function to convert the textual data supplied to a data structure we can
+ use with the model. Other models may be initialized with a ready-made
+ data structure, or use an API to a library that maintains its own data.
+
+ The destructor only has to delete the root item; all child items will
+ be recursively deleted by the \c TreeItem destructor.
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 1
+
+ \target TreeModel::getItem
+ Since the model's interface to the other model/view components is based
+ on model indexes, and the internal data structure is item-based, many of
+ the functions implemented by the model need to be able to convert any
+ given model index to its corresponding item. For convenience and
+ consistency, we have defined a \c getItem() function to perform this
+ repetitive task:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 4
+
+ This function assumes that each model index it is passed corresponds to
+ a valid item in memory. If the index is invalid, or its internal pointer
+ does not refer to a valid item, the root item is returned instead.
+
+ The model's \c rowCount() implementation is simple: it first uses the
+ \c getItem() function to obtain the relevant item, then returns the
+ number of children it contains:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 8
+
+ By contrast, the \c columnCount() implementation does not need to look
+ for a particular item because all items are defined to have the same
+ number of columns associated with them.
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 2
+
+ As a result, the number of columns can be obtained directly from the root
+ item.
+
+ To enable items to be edited and selected, the \c flags() function needs
+ to be implemented so that it returns a combination of flags that includes
+ the Qt::ItemIsEditable and Qt::ItemIsSelectable flags as well as
+ Qt::ItemIsEnabled:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 3
+
+ \target TreeModel::index
+ The model needs to be able to generate model indexes to allow other
+ components to request data and information about its structure. This task
+ is performed by the \c index() function, which is used to obtain model
+ indexes corresponding to children of a given parent item:
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 5
+
+ In this model, we only return model indexes for child items if the parent
+ index is invalid (corresponding to the root item) or if it has a zero
+ column number.
+
+ We use the custom \l{TreeModel::getItem}{getItem()} function to obtain
+ a \c TreeItem instance that corresponds to the model index supplied, and
+ request its child item that corresponds to the specified row.
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 6
+
+ Since each item contains information for an entire row of data, we create
+ a model index to uniquely identify it by calling
+ \l{QAbstractItemModel::}{createIndex()} it with the row and column numbers
+ and a pointer to the item. In the \l{TreeModel::data}{data()} function,
+ we will use the item pointer and column number to access the data
+ associated with the model index; in this model, the row number is not
+ needed to identify data.
+
+ \target TreeModel::parent
+ The \c parent() function supplies model indexes for parents of items
+ by finding the corresponding item for a given model index, using its
+ \l{TreeItem::parent}{parent()} function to obtain its parent item,
+ then creating a model index to represent the parent. (See
+ \l{Relating-items-using-model-indexes}{the above diagram}).
+
+ \snippet examples/itemviews/editabletreemodel/treemodel.cpp 7
+
+ Items without parents, including the root item, are handled by returning
+ a null model index. Otherwise, a model index is created and returned as
+ in the \l{TreeModel::index}{index()} function, with a suitable row number,
+ but with a zero column number to be consistent with the scheme used in
+ the \l{TreeModel::index}{index()} implementation.
+
+ \target TreeModel::data
+ \target TreeModel::setupModelData
+
+*/
diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc
new file mode 100644
index 0000000..90f2f01
--- /dev/null
+++ b/doc/src/examples/elasticnodes.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/elasticnodes
+ \title Elastic Nodes Example
+
+ This GraphicsView example shows how to implement edges between nodes in a graph.
+
+ \image elasticnodes-example.png
+*/
diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc
new file mode 100644
index 0000000..8a0ca3a
--- /dev/null
+++ b/doc/src/examples/extension.qdoc
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/extension
+ \title Extension Example
+
+ The Extension example shows how to add an extension to a QDialog
+ using the QAbstractButton::toggled() signal and the
+ QWidget::setVisible() slot.
+
+ \image extension-example.png Screenshot of the Extension example
+
+ The Extension application is a dialog that allows the user to
+ perform a simple search as well as a more advanced search.
+
+ The simple search has two options: \gui {Match case} and \gui
+ {Search from start}. The advanced search options include the
+ possibilities to search for \gui {Whole words}, \gui {Search
+ backward} and \gui {Search selection}. Only the simple search is
+ visible when the application starts. The advanced search options
+ are located in the application's extension part, and can be made
+ visible by pressing the \gui More button:
+
+ \image extension_more.png Screenshot of the Extension example
+
+ \section1 FindDialog Class Definition
+
+ The \c FindDialog class inherits QDialog. The QDialog class is the
+ base class of dialog windows. A dialog window is a top-level
+ window mostly used for short-term tasks and brief communications
+ with the user.
+
+ \snippet examples/dialogs/extension/finddialog.h 0
+
+ The \c FindDialog widget is the main application widget, and
+ displays the application's search options and controlling
+ buttons.
+
+ In addition to a constructor, we declare the several child
+ widgets: We need a QLineEdit with an associated QLabel to let the
+ user type a word to search for, we need several \l
+ {QCheckBox}{QCheckBox}es to facilitate the search options, and we
+ need three \l {QPushButton}{QPushButton}s: the \gui Find button to
+ start a search, the \gui More button to enable an advanced search,
+ and the \gui Close button to exit the application. Finally, we
+ need a QWidget representing the application's extension part.
+
+ \section1 FindDialog Class Implementation
+
+ In the constructor we first create the standard child widgets for
+ the simple search: the QLineEdit with the associated QLabel, two
+ of the \l {QCheckBox}{QCheckBox}es and all the \l
+ {QPushButton}{QPushButton}s.
+
+ \snippet examples/dialogs/extension/finddialog.cpp 0
+
+ We give the options and buttons a shortcut key using the &
+ character. In the \gui {Find what} option's case, we also need to
+ use the QLabel::setBuddy() function to make the shortcut key work
+ as expected; then, when the user presses the shortcut key
+ indicated by the label, the keyboard focus is transferred to the
+ label's buddy widget, the QLineEdit.
+
+ We set the \gui Find button's default property to true, using the
+ QPushButton::setDefault() function. Then the push button will be
+ pressed if the user presses the Enter (or Return) key. Note that a
+ QDialog can only have one default button.
+
+ \snippet examples/dialogs/extension/finddialog.cpp 2
+
+ Then we create the extension widget, and the \l
+ {QCheckBox}{QCheckBox}es associated with the advanced search
+ options.
+
+ \snippet examples/dialogs/extension/finddialog.cpp 3
+
+ Now that the extension widget is created, we can connect the \gui
+ More button's \l{QAbstractButton::toggled()}{toggled()} signal to
+ the extension widget's \l{QWidget::setVisible()}{setVisible()} slot.
+
+ The QAbstractButton::toggled() signal is emitted whenever a
+ checkable button changes its state. The signal's argument is true
+ if the button is checked, or false if the button is unchecked. The
+ QWidget::setVisible() slot sets the widget's visible status. If
+ the status is true the widget is shown, otherwise the widget is
+ hidden.
+
+ Since we made the \gui More button checkable when we created it,
+ the connection makes sure that the extension widget is shown
+ depending on the state of \gui More button.
+
+ We also connect the \gui Close button to the QWidget::close()
+ slot, and we put the checkboxes associated with the advanced
+ search options into a layout we install on the extension widget.
+
+ \snippet examples/dialogs/extension/finddialog.cpp 4
+
+ Before we create the main layout, we create several child layouts
+ for the widgets: First we allign the QLabel ans its buddy, the
+ QLineEdit, using a QHBoxLayout. Then we vertically allign the
+ QLabel and QLineEdit with the checkboxes associated with the
+ simple search, using a QVBoxLayout. We also create a QVBoxLayout
+ for the buttons. In the end we lay out the two latter layouts and
+ the extension widget using a QGridLayout.
+
+ \snippet examples/dialogs/extension/finddialog.cpp 5
+
+ Finally, we hide the extension widget using the QWidget::hide()
+ function, making the application only show the simple search
+ options when it starts. When the user wants to access the advanced
+ search options, the dialog only needs to change the visibility of
+ the extension widget. Qt's layout management takes care of the
+ dialog's appearance.
+*/
diff --git a/doc/src/examples/fetchmore.qdoc b/doc/src/examples/fetchmore.qdoc
new file mode 100644
index 0000000..5434098
--- /dev/null
+++ b/doc/src/examples/fetchmore.qdoc
@@ -0,0 +1,84 @@
+/*!
+ \example itemviews/fetchmore
+ \title Fetch More Example
+
+ The Fetch More example shows how two add items to an item view
+ model on demand.
+
+ \image fetchmore-example.png
+
+ The user of the example can enter a directory in the \gui
+ Directory line edit. The contents of the directory will
+ be listed in the list view below.
+
+ When you have large - or perhaps even infinite - data sets, you
+ will need to add items to the model in batches, and preferably only
+ when the items are needed by the view (i.e., when they are visible
+ in the view).
+
+ In this example, we implement \c FileListModel - an item view
+ model containing the entries of a directory. We also have \c
+ Window, which sets up the GUI and feeds the model with
+ directories.
+
+ Let's take a tour of \c {FileListModel}'s code.
+
+ \section1 FileListModel Class Definition
+
+ The \c FileListModel inherits QAbstractListModel and contains the
+ contents of a directory. It will add items to itself only when
+ requested to do so by the view.
+
+ \snippet examples/itemviews/fetchmore/filelistmodel.h 0
+
+ The secret lies in the reimplementation of
+ \l{QAbstractItemModel::}{fetchMore()} and
+ \l{QAbstractItemModel::}{canFetchMore()} from QAbstractItemModel.
+ These functions are called by the item view when it needs more
+ items.
+
+ The \c setDirPath() function sets the directory the model will
+ work on. We emit \c numberPopulated() each time we add a batch of
+ items to the model.
+
+ We keep all directory entries in \c fileList. \c fileCount is the
+ number of items that have been added to the model.
+
+ \section1 FileListModel Class Implementation
+
+ We start by checking out the \c setDirPath().
+
+ \snippet examples/itemviews/fetchmore/filelistmodel.cpp 0
+
+ We use a QDir to get the contents of the directory. We need to
+ inform QAbstractItemModel that we want to remove all items - if
+ any - from the model.
+
+ \snippet examples/itemviews/fetchmore/filelistmodel.cpp 1
+
+ The \c canFetchMore() function is called by the view when it needs
+ more items. We return true if there still are entries that we have
+ not added to the model; otherwise, we return false.
+
+ And now, the \c fetchMore() function itself:
+
+ \snippet examples/itemviews/fetchmore/filelistmodel.cpp 2
+
+ We first calculate the number of items to fetch.
+ \l{QAbstractItemModel::}{beginInsertRows()} and
+ \l{QAbstractItemModel::}{endInsertRows()} are mandatory for
+ QAbstractItemModel to keep up with the row insertions. Finally, we
+ emit \c numberPopulated(), which is picked up by \c Window.
+
+ To complete the tour, we also look at \c rowCount() and \c data().
+
+ \snippet examples/itemviews/fetchmore/filelistmodel.cpp 4
+
+ Notice that the row count is only the items we have added so far,
+ i.e., not the number of entries in the directory.
+
+ In \c data(), we return the appropriate entry from the \c
+ fileList. We also separate the batches with a different background
+ color.
+*/
+
diff --git a/doc/src/examples/filetree.qdoc b/doc/src/examples/filetree.qdoc
new file mode 100644
index 0000000..e53769c
--- /dev/null
+++ b/doc/src/examples/filetree.qdoc
@@ -0,0 +1,421 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xmlpatterns/filetree
+ \title File System Example
+
+ This example shows how to use QtXmlPatterns for querying non-XML
+ data that is modeled to look like XML.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ The example models your computer's file system to look like XML and
+ allows you to query the file system with XQuery. Suppose we want to
+ find all the \c{cpp} files in the subtree beginning at
+ \c{/filetree}:
+
+ \image filetree_1-example.png
+
+ \section2 The User Inteface
+
+ The example is shown below. First, we use \c{File->Open Directory}
+ (not shown) to select the \c{/filetree} directory. Then we use the
+ combobox on the right to select the XQuery that searches for \c{cpp}
+ files (\c{listCPPFiles.xq}). Selecting an XQuery runs the query,
+ which in this case traverses the model looking for all the \c{cpp}
+ files. The XQuery text and the query results are shown on the right:
+
+ \image filetree_2-example.png
+
+ Don't be mislead by the XML representation of the \c{/filetree}
+ directory shown on the left. This is not the node model itself but
+ the XML obtained by traversing the node model and outputting it as
+ XML. Constructing and using the custom node model is explained in
+ the code walk-through.
+
+ \section2 Running your own XQueries
+
+ You can write your own XQuery files and run them in the example
+ program. The file \c{xmlpatterns/filetree/queries.qrc} is the \l{The
+ Qt Resource System} {resource file} for this example. It is used in
+ \c{main.cpp} (\c{Q_INIT_RESOURCE(queries);}). It lists the XQuery
+ files (\c{.xq}) that can be selected in the combobox.
+
+ \quotefromfile examples/xmlpatterns/filetree/queries.qrc
+ \printuntil
+
+ To add your own queries to the example's combobox, store your
+ \c{.xq} files in the \c{examples/xmlpatterns/filetree/queries}
+ directory and add them to \c{queries.qrc} as shown above.
+
+ \section1 Code Walk-Through
+
+ The strategy is to create a custom node model that represents the
+ directory tree of the computer's file system. That tree structure is
+ non-XML data. The custom node model must have the same callback
+ interface as the XML node models that the QtXmlPatterns query engine
+ uses to execute queries. The query engine can then traverse the
+ custom node model as if it were traversing the node model built from
+ an XML document.
+
+ The required callback interface is in QAbstractXmlNodeModel, so we
+ create a custom node model by subclassing QAbstractXmlNodeModel and
+ providing implementations for its pure virtual functions. For many
+ cases, the implementations of several of the virtual functions are
+ always the same, so QtXmlPatterns also provides QSimpleXmlNodeModel,
+ which subclasses QAbstractXmlNodeModel and provides implementations
+ for the callback functions that you can ignore. By subclassing
+ QSimpleXmlNodeModel instead of QAbstractXmlNodeModel, you can reduce
+ development time.
+
+ \section2 The Custom Node Model Class: FileTree
+
+ The custom node model for this example is class \c{FileTree}, which
+ is derived from QSimpleXmlNodeModel. \c{FileTree} implements all the
+ callback functions that don't have standard implementations in
+ QSimpleXmlNodeModel. When you implement your own custom node model,
+ you must provide implementations for these callback functions:
+
+ \snippet examples/xmlpatterns/filetree/filetree.h 0
+ \snippet examples/xmlpatterns/filetree/filetree.h 1
+
+ The \c{FileTree} class declares four data members:
+
+ \snippet examples/xmlpatterns/filetree/filetree.h 2
+
+ The QVector \c{m_fileInfos} will contain the node model. Each
+ QFileInfo in the vector will represent a file or a directory in the
+ file system. At this point it is instructive to note that although
+ the node model class for this example (\c{FileTree}) actually builds
+ and contains the custom node model, building the custom node model
+ isn't always required. The node model class for the \l{QObject XML
+ Model Example} {QObject node model example} does not build its node
+ model but instead uses an already existing QObject tree as its node
+ model and just implements the callback interface for that already
+ existing data structure. In this file system example, however,
+ although we have an already existing data structure, i.e. the file
+ system, that data structure is not in memory and is not in a form we
+ can use. So we must build an analog of the file system in memory
+ from instances of QFileInfo, and we use that analog as the custom
+ node model.
+
+ The two sets of flags, \c{m_filterAllowAll} and \c{m_sortFlags},
+ contain OR'ed flags from QDir::Filters and QDir::SortFlags
+ respectively. They are set by the \c{FileTree} constructor and used
+ in calls to QDir::entryInfoList() for getting the child list for a
+ directory node, i.e. a QFileInfoList containing the file and
+ directory nodes for all the immediate children of a directory.
+
+ The QVector \c{m_names} is an auxiliary component of the node
+ model. It holds the XML element and attribute names (QXmlName) for
+ all the node types that will be found in the node model. \c{m_names}
+ is indexed by the enum \c{FileTree::Type}, which specifies the node
+ types:
+
+ \target Node_Type
+ \snippet examples/xmlpatterns/filetree/filetree.h 4
+
+ \c{Directory} and \c{File} will represent the XML element nodes for
+ directories and files respectively, and the other enum values will
+ represent the XML attribute nodes for a file's path, name, suffix,
+ its size in bytes, and its mime type. The \c{FileTree} constructor
+ initializes \c{m_names} with an appropriate QXmlName for each
+ element and attribute type:
+
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 2
+
+ Note that the constructor does \e{not} pre-build the entire node
+ model. Instead, the node model is built \e{incrementally} as the
+ query engine evaluates a query. To see how the query engine causes
+ the node model to be built incrementally, see \l{Building And
+ Traversing The Node Model}. To see how the query engine accesses the
+ node model, see \l{Accessing the node model}. See also: \l{Node
+ Model Building Strategy}.
+
+ \section3 Accessing The Node Model
+
+ Since the node model is stored outside the query engine in the
+ \c{FileTree} class, the query engine knows nothing about it and can
+ only access it by calling functions in the callback interface. When
+ the query engine calls any callback function to access data in the
+ node model, it passes a QXmlNodeModelIndex to identify the node in
+ the node model that it wants to access. Hence all the virtual
+ functions in the callback interface use a QXmlNodeModelIndex to
+ uniquely identify a node in the model.
+
+ We use the index of a QFileInfo in \c{m_fileInfos} to uniquely
+ identify a node in the node model. To get the QXmlNodeModelIndex for
+ a QFileInfo, the class uses the private function \c{toNodeIndex()}:
+
+ \target main toNodeIndex
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 1
+
+ It searches the \c{m_fileInfos} vector for a QFileInfo that matches
+ \c{fileInfo}. If a match is found, its array index is passed to
+ QAbstractXmlNodeModel::createIndex() as the \c data value for the
+ QXmlNodeIndex. If no match is found, the unmatched QFileInfo is
+ appended to the vector, so this function is also doing the actual
+ incremental model building (see \l{Building And Traversing The Node
+ Model}).
+
+ Note that \c{toNodeIndex()} gets a \l{Node_Type} {node type} as the
+ second parameter, which it just passes on to
+ \l{QAbstractXmlNodeModel::createIndex()} {createIndex()} as the
+ \c{additionalData} value. Logically, this second parameter
+ represents a second dimension in the node model, where the first
+ dimension represents the \e element nodes, and the second dimension
+ represents each element's attribute nodes. The meaning is that each
+ QFileInfo in the \c{m_fileInfos} vector can represent an \e{element}
+ node \e{and} one or more \e{attribute} nodes. In particular, the
+ QFileInfo for a file will contain the values for the attribute nodes
+ path, name, suffix, size, and mime type (see
+ \c{FileTree::attributes()}). Since the attributes are contained in
+ the QFileInfo of the file element, there aren't actually any
+ attribute nodes in the node model. Hence, we can use a QVector for
+ \c{m_fileInfos}.
+
+ A convenience overloading of \l{toNodeIndex of convenience}
+ {toNodeIndex()} is also called in several places, wherever it is
+ known that the QXmlNodeModelIndex being requested is for a directory
+ or a file and not for an attribute. The convenience function takes
+ only the QFileInfo parameter and calls the other \l{main toNodeIndex}
+ {toNodeIndex()}, after obtaining either the Directory or File node
+ type directly from the QFileInfo:
+
+ \target toNodeIndex of convenience
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 0
+
+ Note that the auxiliary vector \c{m_names} is accessed using the
+ \l{Node_Type} {node type}, for example:
+
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 3
+
+ Most of the virtual functions in the callback interface are as
+ simple as the ones described so far, but the callback function used
+ for traversing (and building) the node model is more complex.
+
+ \section3 Building And Traversing The Node Model
+
+ The node model in \c{FileTree} is not fully built before the query
+ engine begins evaluating the query. In fact, when the query engine
+ begins evaluating its first query, the only node in the node model
+ is the one representing the root directory for the selected part of
+ the file system. See \l{The UI Class: MainWindow} below for details
+ about how the UI triggers creation of the model.
+
+ The query engine builds the node model incrementally each time it
+ calls the \l{next node on axis} {nextFromSimpleAxis()} callback
+ function, as it traverses the node model to evaluate a query. Thus
+ the query engine only builds the region of the node model that it
+ needs for evaluating the query.
+
+ \l{next node on axis} {nextFromSimpleAxis()} takes an
+ \l{QAbstractXmlNodeModel::SimpleAxis} {axis identifier} and a
+ \l{QXmlNodeModelIndex} {node identifier} as parameters. The
+ \l{QXmlNodeModelIndex} {node identifier} represents the \e{context
+ node} (i.e. the query engine's current location in the model), and
+ the \l{QAbstractXmlNodeModel::SimpleAxis} {axis identifier}
+ represents the direction we want to move from the context node. The
+ function finds the appropriate next node and returns its
+ QXmlNodeModelIndex.
+
+ \l{next node on axis} {nextFromSimpleAxis()} is where most of the
+ work of implementing a custom node model will be required. The
+ obvious way to do it is to use a switch statement with a case for
+ each \l{QAbstractXmlNodeModel::SimpleAxis} {axis}.
+
+ \target next node on axis
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 4
+
+ The first thing this function does is call \l{to file info}
+ {toFileInfo()} to get the QFileInfo of the context node. The use of
+ QVector::at() here is guaranteed to succeed because the context node
+ must already be in the node model, and hence must have a QFileInfo
+ in \c{m_fileInfos}.
+
+ \target to file info
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 6
+
+ The \l{QAbstractXmlNodeModel::Parent} {Parent} case looks up the
+ context node's parent by constructing a QFileInfo from the context
+ node's \l{QFileInfo::absoluteFilePath()} {path} and passing it to
+ \l{main toNodeIndex} {toNodeIndex()} to find the QFileInfo in
+ \c{m_fileInfos}.
+
+ The \l{QAbstractXmlNodeModel::FirstChild} {FirstChild} case requires
+ that the context node must be a directory, because a file doesn't
+ have children. If the context node is not a directory, a default
+ constructed QXmlNodeModelIndex is returned. Otherwise,
+ QDir::entryInfoList() constructs a QFileInfoList of the context
+ node's children. The first QFileInfo in the list is passed to
+ \l{toNodeIndex of convenience} {toNodeIndex()} to get its
+ QXmlNodeModelIndex. Note that this will add the child to the node
+ model, if it isn't in the model yet.
+
+ The \l{QAbstractXmlNodeModel::PreviousSibling} {PreviousSibling} and
+ \l{QAbstractXmlNodeModel::NextSibling} {NextSibling} cases call the
+ \l{nextSibling helper} {nextSibling() helper function}. It takes the
+ QXmlNodeModelIndex of the context node, the QFileInfo of the context
+ node, and an offest of +1 or -1. The context node is a child of some
+ parent, so the function gets the parent and then gets the child list
+ for the parent. The child list is searched to find the QFileInfo of
+ the context node. It must be there. Then the offset is applied, -1
+ for the previous sibling and +1 for the next sibling. The resulting
+ index is passed to \l{toNodeIndex of convenience} {toNodeIndex()} to
+ get its QXmlNodeModelIndex. Note again that this will add the
+ sibling to the node model, if it isn't in the model yet.
+
+ \target nextSibling helper
+ \snippet examples/xmlpatterns/filetree/filetree.cpp 5
+
+ \section2 The UI Class: MainWindow
+
+ The example's UI is a conventional Qt GUI application inheriting
+ QMainWindow and the Ui_MainWindow base class generated by
+ \l{Qt Designer Manual} {Qt Designer}.
+
+ \snippet examples/xmlpatterns/filetree/mainwindow.h 0
+
+ It contains the custom node model (\c{m_fileTree}) and an instance
+ of QXmlNodeModelIndex (\c{m_fileNode}) used for holding the node
+ index for the root of the file system subtree. \c{m_fileNode} will
+ be bound to a $variable in the XQuery to be evaluated.
+
+ Two actions of interest are handled by slot functions: \l{Selecting
+ A Directory To Model} and \l{Selecting And Running An XQuery}.
+
+ \section3 Selecting A Directory To Model
+
+ The user selects \c{File->Open Directory} to choose a directory to
+ be loaded into the custom node model. Choosing a directory signals
+ the \c{on_actionOpenDirectory_triggered()} slot:
+
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 1
+
+ The slot function simply calls the private function
+ \c{loadDirectory()} with the path of the chosen directory:
+
+ \target the standard code pattern
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 4
+
+ \c{loadDirectory()} demonstrates a standard code pattern for using
+ QtXmlPatterns programatically. First it gets the node model index
+ for the root of the selected directory. Then it creates an instance
+ of QXmlQuery and calls QXmlQuery::bindVariable() to bind the node
+ index to the XQuery variable \c{$fileTree}. It then calls
+ QXmlQuery::setQuery() to load the XQuery text.
+
+ \note QXmlQuery::bindVariable() must be called \e before calling
+ QXmlQuery::setQuery(), which loads and parses the XQuery text and
+ must have access to the variable binding as the text is parsed.
+
+ The next lines create an output device for outputting the query
+ result, which is then used to create a QXmlFormatter to format the
+ query result as XML. QXmlQuery::evaluateTo() is called to run the
+ query, and the formatted XML output is displayed in the left panel
+ of the UI window.
+
+ Finally, the private function \l{Selecting And Running An XQuery}
+ {evaluateResult()} is called to run the currently selected XQuery
+ over the custom node model.
+
+ \note As described in \l{Building And Traversing The Node Model},
+ the \c FileTree class wants to build the custom node model
+ incrementally as it evaluates the XQuery. But, because the
+ \c{loadDirectory()} function runs the \c{wholeTree.xq} XQuery, it
+ actually builds the entire node model anyway. See \l{Node Model
+ Building Strategy} for a discussion about building your custom node
+ model.
+
+ \section3 Selecting And Running An XQuery
+
+ The user chooses an XQuery from the menu in the combobox on the
+ right. Choosing an XQuery signals the
+ \c{on_queryBox_currentIndexChanged()} slot:
+
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 2
+
+ The slot function opens and loads the query file and then calls the
+ private function \c{evaluateResult()} to run the query:
+
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 3
+
+ \c{evaluateResult()} is a second example of the same code pattern
+ shown in \l{the standard code pattern} {loadDirectory()}. In this
+ case, it runs the XQuery currently selected in the combobox instead
+ of \c{qrc:/queries/wholeTree.xq}, and it outputs the query result to
+ the panel on the lower right of the UI window.
+
+ \section2 Node Model Building Strategy
+
+ We saw that the \l{The Custom Node Model Class: FileTree} {FileTree}
+ tries to build its custom node model incrementally, but we also saw
+ that the \l{the standard code pattern} {MainWindow::loadDirectory()}
+ function in the UI class immediately subverts the incremental build
+ by running the \c{wholeTree.xq} XQuery, which traverses the entire
+ selected directory, thereby causing the entire node model to be
+ built.
+
+ If we want to preserve the incremental build capability of the
+ \c{FileTree} class, we can strip the running of \c{wholeTree.xq} out
+ of \l{the standard code pattern} {MainWindow::loadDirectory()}:
+
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 5
+ \snippet examples/xmlpatterns/filetree/mainwindow.cpp 6
+
+ Note, however, that \c{FileTree} doesn't have the capability of
+ deleting all or part of the node model. The node model, once built,
+ is only deleted when the \c{FileTree} instance goes out of scope.
+
+ In this example, each element node in the node model represents a
+ directory or a file in the computer's file system, and each node is
+ represented by an instance of QFileInfo. An instance of QFileInfo is
+ not costly to produce, but you might imagine a node model where
+ building new nodes is very costly. In such cases, the capability to
+ build the node model incrementally is important, because it allows
+ us to only build the region of the model we need for evaluating the
+ query. In other cases, it will be simpler to just build the entire
+ node model.
+
+*/
diff --git a/doc/src/examples/findfiles.qdoc b/doc/src/examples/findfiles.qdoc
new file mode 100644
index 0000000..db41f43
--- /dev/null
+++ b/doc/src/examples/findfiles.qdoc
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/findfiles
+ \title Find Files Example
+
+ The Find Files example shows how to use QProgressDialog to provide
+ feedback on the progress of a slow operation. The example also
+ shows how to use QFileDialog to facilitate browsing, how to use
+ QTextStream's streaming operators to read a file, and how to use
+ QTableWidget to provide standard table display facilities for
+ applications. In addition, files can be opened using the
+ QDesktopServices class.
+
+ \image findfiles-example.png Screenshot of the Find Files example
+
+ With the Find Files application the user can search for files in a
+ specified directory, matching a specified file name (using wild
+ cards if appropiate) and containing a specified text.
+
+ The user is provided with a \gui Browse option, and the result of
+ the search is displayed in a table with the names of the files
+ found and their sizes. In addition the application provides a
+ total count of the files found.
+
+ \section1 Window Class Definition
+
+ The \c Window class inherits QWidget, and is the main application
+ widget. It shows the search options, and displays the search
+ results.
+
+ \snippet examples/dialogs/findfiles/window.h 0
+
+ We need two private slots: The \c browse() slot is called whenever
+ the user wants to browse for a directory to search in, and the \c
+ find() slot is called whenever the user requests a search to be
+ performed by pressing the \gui Find button.
+
+ In addition we declare several private functions: We use the \c
+ findFiles() function to search for files matching the user's
+ specifications, we call the \c showFiles() function to display the
+ results, and we use \c createButton(), \c createComboBox() and \c
+ createFilesTable() when we are constructing the widget.
+
+ \section1 Window Class Implementation
+
+ In the constructor we first create the application's widgets.
+
+ \snippet examples/dialogs/findfiles/window.cpp 0
+
+ We create the application's buttons using the private \c
+ createButton() function. Then we create the comboboxes associated
+ with the search specifications, using the private \c
+ createComboBox() function. We also create the application's labels
+ before we use the private \c createFilesTable() function to create
+ the table displaying the search results.
+
+ \snippet examples/dialogs/findfiles/window.cpp 1
+
+ Then we add all the widgets to a main layout using QGridLayout. We
+ have, however, put the \c Find and \c Quit buttons and a
+ stretchable space in a separate QHBoxLayout first, to make the
+ buttons appear in the \c Window widget's bottom right corner.
+
+ \snippet examples/dialogs/findfiles/window.cpp 2
+
+ The \c browse() slot presents a file dialog to the user, using the
+ QFileDialog class. QFileDialog enables a user to traverse the file
+ system in order to select one or many files or a directory. The
+ easiest way to create a QFileDialog is to use the convenience
+ static functions.
+
+ Here we use the static QFileDialog::getExistingDirectory()
+ function which returns an existing directory selected by the
+ user. Then we display the directory in the directory combobox
+ using the QComboBox::addItem() function, and updates the current
+ index.
+
+ QComboBox::addItem() adds an item to the combobox with the given
+ text (if it is not already present in the list), and containing
+ the specified userData. The item is appended to the list of
+ existing items.
+
+ \snippet examples/dialogs/findfiles/window.cpp 3
+
+ The \c find() slot is called whenever the user requests a new
+ search by pressing the \gui Find button.
+
+ First we eliminate any previous search results by setting the
+ table widgets row count to zero. Then we retrieve the
+ specified file name, text and directory path from the respective
+ comboboxes.
+
+ \snippet examples/dialogs/findfiles/window.cpp 4
+
+ We use the directory's path to create a QDir; the QDir class
+ provides access to directory structures and their contents. We
+ create a list of the files (contained in the newly created QDir)
+ that match the specified file name. If the file name is empty
+ the list will contain all the files in the directory.
+
+ Then we search through all the files in the list, using the private
+ \c findFiles() function, eliminating the ones that don't contain
+ the specified text. And finally, we display the results using the
+ private \c showFiles() function.
+
+ If the user didn't specify any text, there is no reason to search
+ through the files, and we display the results immediately.
+
+ \image findfiles_progress_dialog.png Screenshot of the Progress Dialog
+
+ \snippet examples/dialogs/findfiles/window.cpp 5
+
+ In the private \c findFiles() function we search through a list of
+ files, looking for the ones that contain a specified text. This
+ can be a very slow operation depending on the number of files as
+ well as their sizes. In case there are a large number of files, or
+ there exists some large files on the list, we provide a
+ QProgressDialog.
+
+ The QProgressDialog class provides feedback on the progress of a
+ slow operation. It is used to give the user an indication of how
+ long an operation is going to take, and to demonstrate that the
+ application has not frozen. It can also give the user an
+ opportunity to abort the operation.
+
+ \snippet examples/dialogs/findfiles/window.cpp 6
+
+ We run through the files, one at a time, and for each file we
+ update the QProgressDialog value. This property holds the current
+ amount of progress made. We also update the progress dialog's
+ label.
+
+ Then we call the QCoreApplication::processEvents() function using
+ the QApplication object. In this way we interleave the display of
+ the progress made with the process of searching through the files
+ so the application doesn't appear to be frozen.
+
+ The QApplication class manages the GUI application's control flow
+ and main settings. It contains the main event loop, where all
+ events from the window system and other sources are processed and
+ dispatched. QApplication inherits QCoreApplication. The
+ QCoreApplication::processEvents() function processes all pending
+ events according to the specified QEventLoop::ProcessEventFlags
+ until there are no more events to process. The default flags are
+ QEventLoop::AllEvents.
+
+ \snippet examples/dialogs/findfiles/window.cpp 7
+
+ After updating the QProgressDialog, we create a QFile using the
+ QDir::absoluteFilePath() function which returns the absolute path
+ name of a file in the directory. We open the file in read-only
+ mode, and read one line at a time using QTextStream.
+
+ The QTextStream class provides a convenient interface for reading
+ and writing text. Using QTextStream's streaming operators, you can
+ conveniently read and write words, lines and numbers.
+
+ For each line we read we check if the QProgressDialog has been
+ canceled. If it has, we abort the operation, otherwise we check if
+ the line contains the specified text. When we find the text within
+ one of the files, we add the file's name to a list of found files
+ that contain the specified text, and start searching a new file.
+
+ Finally, we return the list of the files found.
+
+ \snippet examples/dialogs/findfiles/window.cpp 8
+
+ Both the \c findFiles() and \c showFiles() functions are called from
+ the \c find() slot. In the \c showFiles() function we run through
+ the provided list of file names, adding each file name to the
+ first column in the table widget and retrieving the file's size using
+ QFile and QFileInfo for the second column.
+
+ We also update the total number of files found.
+
+ \snippet examples/dialogs/findfiles/window.cpp 9
+
+ The private \c createButton() function is called from the
+ constructor. We create a QPushButton with the provided text,
+ connect it to the provided slot, and return a pointer to the
+ button.
+
+ \snippet examples/dialogs/findfiles/window.cpp 10
+
+ The private \c createComboBox() function is also called from the
+ contructor. We create a QComboBox with the given text, and make it
+ editable.
+
+ When the user enters a new string in an editable combobox, the
+ widget may or may not insert it, and it can insert it in several
+ locations, depending on the QComboBox::InsertPolicy. The default
+ policy is is QComboBox::InsertAtBottom.
+
+ Then we add the provided text to the combobox, and specify the
+ widget's size policies, before we return a pointer to the
+ combobox.
+
+ \snippet examples/dialogs/findfiles/window.cpp 11
+
+ The private \c createFilesTable() function is called from the
+ constructor. In this function we create the QTableWidget that
+ will display the search results. We set its horizontal headers and
+ their resize mode.
+
+ QTableWidget inherits QTableView which provides a default
+ model/view implementation of a table view. The
+ QTableView::horizontalHeader() function returns the table view's
+ horizontal header as a QHeaderView. The QHeaderView class provides
+ a header row or header column for item views, and the
+ QHeaderView::setResizeMode() function sets the constraints on how
+ the section in the header can be resized.
+
+ Finally, we hide the QTableWidget's vertical headers using the
+ QWidget::hide() function, and remove the default grid drawn for
+ the table using the QTableView::setShowGrid() function.
+
+ \snippet examples/dialogs/findfiles/window.cpp 12
+
+ The \c openFileOfItem() slot is invoked when the user double
+ clicks on a cell in the table. The QDesktopServices::openUrl()
+ knows how to open a file given the file name.
+*/
+
diff --git a/doc/src/examples/flowlayout.qdoc b/doc/src/examples/flowlayout.qdoc
new file mode 100644
index 0000000..557ba39
--- /dev/null
+++ b/doc/src/examples/flowlayout.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example layouts/flowlayout
+ \title Flow Layout Example
+
+ The Flow Layout example demonstrates a custom layout that arranges child widgets from
+ left to right and top to bottom in a top-level widget.
+
+ \image flowlayout-example.png
+*/
diff --git a/doc/src/examples/fontsampler.qdoc b/doc/src/examples/fontsampler.qdoc
new file mode 100644
index 0000000..1fbb879
--- /dev/null
+++ b/doc/src/examples/fontsampler.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/fontsampler
+ \title Font Sampler Example
+
+ The Font Sampler example shows how to preview and print multi-page documents.
+
+ \image fontsampler-example.png
+*/
diff --git a/doc/src/examples/formextractor.qdoc b/doc/src/examples/formextractor.qdoc
new file mode 100644
index 0000000..b98f5bd
--- /dev/null
+++ b/doc/src/examples/formextractor.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/formextractor
+ \title Form Extractor Example
+
+ The Form Extractor example shows how to use QWebFrame with JavaScript to
+ extract form data.
+
+ \image formextractor-example.png
+
+*/
diff --git a/doc/src/examples/fortuneclient.qdoc b/doc/src/examples/fortuneclient.qdoc
new file mode 100644
index 0000000..cbdd164
--- /dev/null
+++ b/doc/src/examples/fortuneclient.qdoc
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/fortuneclient
+ \title Fortune Client Example
+
+ The Fortune Client example shows how to create a client for a simple
+ network service using QTcpSocket. It is intended to be run alongside the
+ \l{network/fortuneserver}{Fortune Server} example or
+ the \l{network/threadedfortuneserver}{Threaded Fortune Server} example.
+
+ \image fortuneclient-example.png Screenshot of the Fortune Client example
+
+ This example uses a simple QDataStream-based data transfer protocol to
+ request a line of text from a fortune server (from the
+ \l{network/fortuneserver}{Fortune Server} example). The client requests a
+ fortune by simply connecting to the server. The server then responds with
+ a 16-bit (quint16) integer containing the length of the fortune text,
+ followed by a QString.
+
+ QTcpSocket supports two general approaches to network programming:
+
+ \list
+
+ \o \e{The asynchronous (non-blocking) approach.} Operations are scheduled
+ and performed when control returns to Qt's event loop. When the operation
+ is finished, QTcpSocket emits a signal. For example,
+ QTcpSocket::connectToHost() returns immediately, and when the connection
+ has been established, QTcpSocket emits
+ \l{QTcpSocket::connected()}{connected()}.
+
+ \o \e{The synchronous (blocking) approach.} In non-GUI and multithreaded
+ applications, you can call the \c waitFor...() functions (e.g.,
+ QTcpSocket::waitForConnected()) to suspend the calling thread until the
+ operation has completed, instead of connecting to signals.
+
+ \endlist
+
+ In this example, we will demonstrate the asynchronous approach. The
+ \l{network/blockingfortuneclient}{Blocking Fortune Client} example
+ illustrates the synchronous approach.
+
+ Our class contains some data and a few private slots:
+
+ \snippet examples/network/fortuneclient/client.h 0
+
+ Other than the widgets that make up the GUI, the data members include a
+ QTcpSocket pointer, a copy of the fortune text currently displayed, and
+ the size of the packet we are currently reading (more on this later).
+
+ The socket is initialized in the Client constructor. We'll pass the main
+ widget as parent, so that we won't have to worry about deleting the
+ socket:
+
+ \snippet examples/network/fortuneclient/client.cpp 0
+ \dots
+ \snippet examples/network/fortuneclient/client.cpp 1
+
+ The only QTcpSocket signals we need in this example are
+ QTcpSocket::readyRead(), signifying that data has been received, and
+ QTcpSocket::error(), which we will use to catch any connection errors:
+
+ \dots
+ \snippet examples/network/fortuneclient/client.cpp 3
+ \dots
+ \snippet examples/network/fortuneclient/client.cpp 5
+
+ Clicking the \gui{Get Fortune} button will invoke the \c
+ requestNewFortune() slot:
+
+ \snippet examples/network/fortuneclient/client.cpp 6
+
+ In this slot, we initialize \c blockSize to 0, preparing to read a new block
+ of data. Because we allow the user to click \gui{Get Fortune} before the
+ previous connection finished closing, we start off by aborting the
+ previous connection by calling QTcpSocket::abort(). (On an unconnected
+ socket, this function does nothing.) We then proceed to connecting to the
+ fortune server by calling QTcpSocket::connectToHost(), passing the
+ hostname and port from the user interface as arguments.
+
+ As a result of calling \l{QTcpSocket::connectToHost()}{connectToHost()},
+ one of two things can happen:
+
+ \list
+ \o \e{The connection is established.} In this case, the server will send us a
+ fortune. QTcpSocket will emit \l{QTcpSocket::readyRead()}{readyRead()}
+ every time it receives a block of data.
+
+ \o \e{An error occurs.} We need to inform the user if the connection
+ failed or was broken. In this case, QTcpSocket will emit
+ \l{QTcpSocket::error()}{error()}, and \c Client::displayError() will be
+ called.
+ \endlist
+
+ Let's go through the \l{QTcpSocket::error()}{error()} case first:
+
+ \snippet examples/network/fortuneclient/client.cpp 13
+
+ We pop up all errors in a dialog using
+ QMessageBox::information(). QTcpSocket::RemoteHostClosedError is silently
+ ignored, because the fortune server protocol ends with the server closing
+ the connection.
+
+ Now for the \l{QTcpSocket::readyRead()}{readyRead()} alternative. This
+ signal is connected to \c Client::readFortune():
+
+ \snippet examples/network/fortuneclient/client.cpp 8
+ \codeline
+ \snippet examples/network/fortuneclient/client.cpp 10
+
+ The protocol is based on QDataStream, so we start by creating a stream
+ object, passing the socket to QDataStream's constructor. We then
+ explicitly set the protocol version of the stream to QDataStream::Qt_4_0
+ to ensure that we're using the same version as the fortune server, no
+ matter which version of Qt the client and server use.
+
+ Now, TCP is based on sending a stream of data, so we cannot expect to get
+ the entire fortune in one go. Especially on a slow network, the data can
+ be received in several small fragments. QTcpSocket buffers up all incoming
+ data and emits \l{QTcpSocket::readyRead()}{readyRead()} for every new
+ block that arrives, and it is our job to ensure that we have received all
+ the data we need before we start parsing. The server's response starts
+ with the size of the packet, so first we need to ensure that we can read
+ the size, then we will wait until QTcpSocket has received the full packet.
+
+ \snippet examples/network/fortuneclient/client.cpp 11
+ \codeline
+ \snippet examples/network/fortuneclient/client.cpp 12
+
+ We proceed by using QDataStream's streaming operator to read the fortune
+ from the socket into a QString. Once read, we can call QLabel::setText()
+ to display the fortune.
+
+ \sa {Fortune Server Example}, {Blocking Fortune Client Example}
+*/
diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc
new file mode 100644
index 0000000..e6a7f85
--- /dev/null
+++ b/doc/src/examples/fortuneserver.qdoc
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/fortuneserver
+ \title Fortune Server Example
+
+ The Fortune Server example shows how to create a server for a simple
+ network service. It is intended to be run alongside the
+ \l{network/fortuneclient}{Fortune Client} example or the the
+ \l{network/blockingfortuneclient}{Blocking Fortune Client} example.
+
+ \image fortuneserver-example.png Screenshot of the Fortune Server example
+
+ This example uses QTcpServer to accept incoming TCP connections, and a
+ simple QDataStream based data transfer protocol to write a fortune to the
+ connecting client (from the \l{network/fortuneclient}{Fortune Client}
+ example), before closing the connection.
+
+ \snippet examples/network/fortuneserver/server.h 0
+
+ The server is implemented using a simple class with only one slot, for
+ handling incoming connections.
+
+ \snippet examples/network/fortuneserver/server.cpp 1
+
+ In its constructor, our Server object calls QTcpServer::listen() to set up
+ a QTcpServer to listen on all addresses, on an arbitrary port. In then
+ displays the port QTcpServer picked in a label, so that user knows which
+ port the fortune client should connect to.
+
+ \snippet examples/network/fortuneserver/server.cpp 2
+
+ Our server generates a list of random fortunes that is can send to
+ connecting clients.
+
+ \snippet examples/network/fortuneserver/server.cpp 3
+
+ When a client connects to our server, QTcpServer will emit
+ QTcpServer::newConnection(). In turn, this will invoke our
+ sendFortune() slot:
+
+ \snippet examples/network/fortuneserver/server.cpp 4
+
+ The purpose of this slot is to select a random line from our list of
+ fortunes, encode it into a QByteArray using QDataStream, and then write it
+ to the connecting socket. This is a common way to transfer binary data
+ using QTcpSocket. First we create a QByteArray and a QDataStream object,
+ passing the bytearray to QDataStream's constructor. We then explicitly set
+ the protocol version of QDataStream to QDataStream::Qt_4_0 to ensure that
+ we can communicate with clients from future versions of Qt. (See
+ QDataStream::setVersion().)
+
+ \snippet examples/network/fortuneserver/server.cpp 6
+
+ At the start of our QByteArray, we reserve space for a 16 bit integer that
+ will contain the total size of the data block we are sending. We continue
+ by streaming in a random fortune. Then we seek back to the beginning of
+ the QByteArray, and overwrite the reserved 16 bit integer value with the
+ total size of the array. By doing this, we provide a way for clients to
+ verify how much data they can expect before reading the whole packet.
+
+ \snippet examples/network/fortuneserver/server.cpp 7
+
+ We then call QTcpServer::newPendingConnection(), which returns the
+ QTcpSocket representing the server side of the connection. By connecting
+ QTcpSocket::disconnected() to QObject::deleteLater(), we ensure that the
+ socket will be deleted after disconnecting.
+
+ \snippet examples/network/fortuneserver/server.cpp 8
+
+ The encoded fortune is written using QTcpSocket::write(), and we finally
+ call QTcpSocket::disconnectFromHost(), which will close the connection
+ after QTcpSocket has finished writing the fortune to the network. Because
+ QTcpSocket works asynchronously, the data will be written after this
+ function returns, and control goes back to Qt's event loop. The socket
+ will then close, which in turn will cause QObject::deleteLater() to delete
+ it.
+
+ \sa {Fortune Client Example}, {Threaded Fortune Server Example}
+ */
diff --git a/doc/src/examples/framebufferobject.qdoc b/doc/src/examples/framebufferobject.qdoc
new file mode 100644
index 0000000..3220641
--- /dev/null
+++ b/doc/src/examples/framebufferobject.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/framebufferobject
+ \title Framebuffer Object Example
+
+ The Framebuffer Object example demonstrates how to use the
+ QGLFramebufferObject class to render into an off-screen buffer and
+ use the contents as a texture in a QGLWidget.
+
+ \image framebufferobject-example.png
+*/
diff --git a/doc/src/examples/framebufferobject2.qdoc b/doc/src/examples/framebufferobject2.qdoc
new file mode 100644
index 0000000..721706a
--- /dev/null
+++ b/doc/src/examples/framebufferobject2.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/framebufferobject2
+ \title Framebuffer Object 2 Example
+
+ The Framebuffer Object 2 example demonstrates how to use the
+ QGLFramebufferObject class to render into an off-screen buffer and
+ use the contents as a texture in a QGLWidget.
+
+ \image framebufferobject2-example.png
+*/
diff --git a/doc/src/examples/fridgemagnets.qdoc b/doc/src/examples/fridgemagnets.qdoc
new file mode 100644
index 0000000..de95b52
--- /dev/null
+++ b/doc/src/examples/fridgemagnets.qdoc
@@ -0,0 +1,374 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example draganddrop/fridgemagnets
+ \title Fridge Magnets Example
+
+ The Fridge Magnets example shows how to supply more than one type
+ of MIME-encoded data with a drag and drop operation.
+
+ \image fridgemagnets-example.png
+
+ With this application the user can play around with a collection
+ of fridge magnets, using drag and drop to form new sentences from
+ the words on the magnets. The example consists of two classes:
+
+ \list
+ \o \c DragLabel is a custom widget representing one
+ single fridge magnet.
+ \o \c DragWidget provides the main application window.
+ \endlist
+
+ We will first take a look at the \c DragLabel class, then we will
+ examine the \c DragWidget class.
+
+ \section1 DragLabel Class Definition
+
+ Each fridge magnet is represented by an instance of the \c
+ DragLabel class:
+
+ \snippet examples/draganddrop/fridgemagnets/draglabel.h 0
+
+ Each instance of this QLabel subclass will be used to display an
+ pixmap generated from a text string. Since we cannot store both
+ text and a pixmap in a standard label, we declare a private variable
+ to hold the original text, and we define an additional member
+ function to allow it to be accessed.
+
+ \section1 DragLabel Class Implementation
+
+ In the \c DragLabel constructor, we first create a QImage object
+ on which we will draw the fridge magnet's text and frame:
+
+ \snippet examples/draganddrop/fridgemagnets/draglabel.cpp 0
+
+ Its size depends on the current font size, and its format is
+ QImage::Format_ARGB32_Premultiplied; i.e., the image is stored
+ using a premultiplied 32-bit ARGB format (0xAARRGGBB).
+
+ We then construct a font object that uses the application's
+ default font, and set its style strategy. The style strategy tells
+ the font matching algorithm what type of fonts should be used to
+ find an appropriate default family. The QFont::ForceOutline forces
+ the use of outline fonts.
+
+ To draw the text and frame onto the image, we use the QPainter
+ class. QPainter provides highly optimized methods to do most of
+ the drawing GUI programs require. It can draw everything from
+ simple lines to complex shapes like pies and chords. It can also
+ draw aligned text and pixmaps.
+
+ \snippet examples/draganddrop/fridgemagnets/draglabel.cpp 1
+
+ A painter can be activated by passing a paint device to the
+ constructor, or by using the \l{QPainter::}{begin()} method as we
+ do in this example. The \l{QPainter::}{end()} method deactivates
+ it. Note that the latter function is called automatically upon
+ destruction when the painter is actived by its constructor. The
+ QPainter::Antialiasing render hint ensures that the paint engine
+ will antialias the edges of primitives if possible.
+
+ When the painting is done, we convert our image to a pixmap using
+ QPixmap's \l {QPixmap::}{fromImage()} method. This method also
+ takes an optional flags argument, and converts the given image to
+ a pixmap using the specified flags to control the conversion (the
+ flags argument is a bitwise-OR of the Qt::ImageConversionFlags;
+ passing 0 for flags sets all the default options).
+
+ \snippet examples/draganddrop/fridgemagnets/draglabel.cpp 2
+
+ Finally, we set the label's \l{QLabel::pixmap}{pixmap property}
+ and store the label's text for later use.
+
+ \e{Note that setting the pixmap clears any previous content, including
+ any text previously set using QLabel::setText(), and disables
+ the label widget's buddy shortcut, if any.}
+
+ \section1 DragWidget Class Definition
+
+ The \c DragWidget class inherits QWidget, providing support for
+ drag and drop operations:
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.h 0
+
+ To make the widget responsive to drag and drop operations, we simply
+ reimplement the \l{QWidget::}{dragEnterEvent()},
+ \l{QWidget::}{dragMoveEvent()} and \l{QWidget::}{dropEvent()} event
+ handlers inherited from QWidget.
+
+ We also reimplement \l{QWidget::}{mousePressEvent()} to make the
+ widget responsive to mouse clicks. This is where we will write code
+ to start drag and drop operations.
+
+ \section1 DragWidget Class Implementation
+
+ In the constructor, we first open the file containing the words on
+ our fridge magnets:
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 0
+
+ QFile is an I/O device for reading and writing text and binary
+ files and resources, and may be used by itself or in combination
+ with QTextStream or QDataStream. We have chosen to read the
+ contents of the file using the QTextStream class that provides a
+ convenient interface for reading and writing text.
+
+ We then create the fridge magnets. As long as there is data (the
+ QTextStream::atEnd() method returns true if there is no more data
+ to be read from the stream), we read one line at a time using
+ QTextStream's \l {QTextStream::}{readLine()} method.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 1
+
+ For each line, we create a \c DragLabel object using the read line
+ as text, we calculate its position and ensure that it is visible by
+ calling the QWidget::show() method. We set the Qt::WA_DeleteOnClose
+ attribute on each label to ensure that any unused labels will be
+ deleted; we will need to create new labels and delete old ones when
+ they are dragged around, and this ensures that the example does not
+ leak memory.
+
+ We also set the \c FridgeMagnets widget's palette, minimum size
+ and window title.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 2
+
+ Finally, to enable our user to move the fridge magnets around, we
+ must also set the \c FridgeMagnets widget's
+ \l{QWidget::acceptDrops}{acceptDrops} property.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 3
+
+ Setting this property to true announces to the system that this
+ widget \e may be able to accept drop events (events that are sent
+ when drag and drop actions are completed). Later, we will
+ implement the functions that ensure that the widget accepts the
+ drop events it is interested in.
+
+ \section2 Dragging
+
+ Let's take a look at the \l{QWidget::}{mousePressEvent()} event
+ handler, where drag and drop operations begin:
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 13
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 14
+
+ Mouse events occur when a mouse button is pressed or released
+ inside a widget, or when the mouse cursor is moved. By
+ reimplementing the \l{QWidget::}{mousePressEvent()} method we
+ ensure that we will receive mouse press events for the widget
+ containing the fridge magnets.
+
+ Whenever we receive such an event, we first check to see if the
+ position of the click coincides with one of the labels. If not,
+ we simply return.
+
+ If the user clicked a label, we determine the position of the
+ \e{hot spot} (the position of the click relative to the top-left
+ corner of the label). We create a byte array to store the label's
+ text and the hot spot, and we use a QDataStream object to stream
+ the data into the byte array.
+
+ With all the information in place, we create a new QMimeData object.
+ As mentioned above, QMimeData objects associate the data that they
+ hold with the corresponding MIME types to ensure that information
+ can be safely transferred between applications. The
+ \l{QMimeData::}{setData()} method sets the data associated with a
+ given MIME type. In our case, we associate our item data with the
+ custom \c application/x-fridgemagnet type.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 15
+
+ Note that we also associate the magnet's text with the
+ \c text/plain MIME type using QMimeData's \l{QMimeData::}{setText()}
+ method. Below, we will see how our widget detects both these MIME
+ types with its event handlers.
+
+ Finally, we create a QDrag object. It is the QDrag class that
+ handles most of the details of a drag and drop operation,
+ providing support for MIME-based drag and drop data transfer. The
+ data to be transferred by the drag and drop operation is contained
+ in a QMimeData object. When we call QDrag's
+ \l{QDrag::}{setMimeData()} method the ownership of our item data is
+ transferred to the QDrag object.
+
+ We call the \l{QDrag::}{setPixmap()} function to set the pixmap used
+ to represent the data during the drag and drop operation.
+ Typically, this pixmap shows an icon that represents the MIME type
+ of the data being transferred, but any pixmap can be used. In this
+ example, we simply use the pixmap used by the label itself to make
+ it look like the fridge magnet itself is being moved.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 16
+
+ We also specify the cursor's hot spot, its position relative to the
+ top-level corner of the drag pixmap, to be the point we calculated
+ above. This makes the process of dragging the label feel more natural
+ because the cursor always points to the same place on the label
+ during the drag operation.
+
+ We start the drag operation using QDrag's \l{QDrag::}{exec()} function,
+ requesting that the magnet is copied when the drag is completed.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 17
+
+ The function returns the drop action actually performed by the user
+ (this can be either a copy or a move action in this case); if this
+ action is equal to Qt::MoveAction we will close the activated
+ fridge magnet widget because we will create a new one to replace it
+ (see the \l{drop}{dropEvent()} implementation). Otherwise, if
+ the drop is outside our main widget, we simply show the widget in
+ its original position.
+
+ \section2 Dropping
+
+ When a a drag and drop action enters our widget, we will receive a
+ drag enter \e event. QDragEnterEvent inherits most of its
+ functionality from QDragMoveEvent, which in turn inherits most of
+ its functionality from QDropEvent. Note that we must accept this
+ event in order to receive the drag move events that are sent while
+ the drag and drop action is in progress. The drag enter event is
+ always immediately followed by a drag move event.
+
+ In our \c dragEnterEvent() implementation, we first determine
+ whether we support the event's MIME type or not:
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 4
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 5
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 6
+
+ If the type is \c application/x-fridgemagnet and the event
+ origins from any of this application's fridge magnet widgets, we
+ first set the event's drop action using the
+ QDropEvent::setDropAction() method. An event's drop action is the
+ action to be performed on the data by the target. Qt::MoveAction
+ indicates that the data is moved from the source to the target.
+
+ Then we call the event's \l {QDragMoveEvent::}{accept()} method to
+ indicate that we have handled the event. In general, unaccepted
+ events might be propagated to the parent widget. If the event
+ origins from any other widget, we simply accept the proposed
+ action.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 7
+
+ We also accept the proposed action if the event's MIME type is \c
+ text/plain, i.e., if QMimeData::hasText() returns true. If the
+ event has any other type, on the other hand, we call the event's
+ \l {QDragMoveEvent::}{ignore()} method allowing the event to be
+ propagated further.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 8
+
+ Drag move events occur when the cursor enters a widget, when it
+ moves within the widget, and when a modifier key is pressed on the
+ keyboard while the widget has focus. Our widget will receive drag
+ move events repeatedly while a drag is within its boundaries. We
+ reimplement the \l {QWidget::}{dragMoveEvent()} method, and
+ examine the event in the exact same way as we did with drag enter
+ events.
+
+ Note that the \l{QWidget::}{dropEvent()} event handler behaves
+ slightly differently: We first get hold of the event's MIME
+ data.
+
+ \target drop
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 9
+
+ The QMimeData class provides a container for data that
+ records information about its MIME type. QMimeData objects
+ associate the data that they hold with the corresponding MIME
+ types to ensure that information can be safely transferred between
+ applications, and copied around within the same application.
+
+ We retrieve the data associated with the \c application/x-fridgemagnet
+ MIME type using a data stream in order to create a new \c DragLabel
+ object.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 10
+
+ The QDataStream class provides serialization of binary data to a
+ QIODevice (a data stream is a binary stream of encoded information
+ which is completely independent of the host computer's operating
+ system, CPU or byte order).
+
+ Finally, we create a label and move it to the event's position:
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 11
+
+ If the source of the event is also the widget receiving the
+ drop event, we set the event's drop action to Qt::MoveAction and
+ call the event's \l{QDragMoveEvent::}{accept()}
+ method. Otherwise, we simply accept the proposed action. This
+ means that labels are moved rather than copied in the same
+ window. However, if we drag a label to a second instance of the
+ Fridge Magnets example, the default action is to copy it, leaving
+ the original in the first instance.
+
+ If the event's MIME type is \c text/plain (i.e., if
+ QMimeData::hasText() returns true) we retrieve its text and split
+ it into words. For each word we create a new \c DragLabel action,
+ and show it at the event's position plus an offset depending on
+ the number of words in the text. In the end we accept the proposed
+ action. This lets the user drop selected text from a text editor or
+ Web browser onto the widget to add more fridge magnets.
+
+ \snippet examples/draganddrop/fridgemagnets/dragwidget.cpp 12
+
+ If the event has any other type, we call the event's
+ \l{QDragMoveEvent::}{ignore()} method allowing the event to be
+ propagated further.
+
+ \section1 Summary
+
+ We set our main widget's \l{QWidget::}{acceptDrops} property
+ and reimplemented QWidget's \l{QWidget::}{dragEnterEvent()},
+ \l{QWidget::}{dragMoveEvent()} and \l{QWidget::}{dropEvent()} event
+ handlers to support content dropped on our widget.
+
+ In addition, we reimplemented the \l{QWidget::}{mousePressEvent()}
+ function to let the user pick up fridge magnets in the first place.
+
+ Because data is communicated using drag and drop operations and
+ encoded using MIME types, you can run more than one instance of this
+ example, and transfer magnets between them.
+*/
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
new file mode 100644
index 0000000..9cc9cd1
--- /dev/null
+++ b/doc/src/examples/ftp.qdoc
@@ -0,0 +1,211 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/ftp
+ \title FTP Example
+
+ The FTP example demonstrates a simple FTP client that can be used
+ to list the available files on an FTP server and download them.
+
+ \image ftp-example.png
+
+ The user of the example can enter the address or hostname of an
+ FTP server in the \gui {Ftp Server} line edit, and then push the
+ \gui Connect button to connect to it. A list of the server's
+ top-level directory is then presented in the \gui {File List} tree
+ view. If the selected item in the view is a file, the user can
+ download it by pushing the \gui Download button. An item
+ representing a directory can be double clicked with the mouse to
+ show the contents of that directory in the view.
+
+ The functionality required for the example is implemented in the
+ QFtp class, which provides an easy, high-level interface to the
+ file transfer protocol. FTP operations are requested through
+ \l{QFtp::Command}s. The operations are asynchronous. QFtp will
+ notify us through signals when commands are started and finished.
+
+ We have one class, \c FtpWindow, which sets up the GUI and handles
+ the FTP functionality. We will now go through its definition and
+ implementation - focusing on the code concerning FTP. The code for
+ managing the GUI is explained in other examples.
+
+ \section1 FtpWindow Class Definition
+
+ The \c FtpWindow class displays a window, in which the user can
+ connect to and browse the contents of an FTP server. The slots of
+ \c FtpWindow are connected to its widgets, and contain the
+ functionality for managing the FTP connection. We also connect to
+ signals in QFtp, which tells us when the
+ \l{QFtp::Command}{commands} we request are finished, the progress
+ of current commands, and information about files on the server.
+
+ \snippet examples/network/ftp/ftpwindow.h 0
+
+ We will look at each slot when we examine the \c FtpWindow
+ implementation in the next section. We also make use of a few
+ private variables:
+
+ \snippet examples/network/ftp/ftpwindow.h 1
+
+ The \c isDirectory hash keeps a history of all entries explored on
+ the FTP server, and registers whether an entry represents a
+ directory or a file. We use the QFile object to download files
+ from the FTP server.
+
+ \section1 FtpWindow Class Implementation
+
+ We skip the \c FtpWindow constructor as it only contains code for
+ setting up the GUI, which is explained in other examples.
+
+ We move on to the slots, starting with \c connectOrDisconnect().
+
+ \snippet examples/network/ftp/ftpwindow.cpp 0
+
+ If \c ftp is already pointing to a QFtp object, we QFtp::Close its
+ FTP connection and delete the object it points to. Note that we do
+ not delete the object using standard C++ \c delete as we need it
+ to finish its abort operation.
+
+ \dots
+ \snippet examples/network/ftp/ftpwindow.cpp 1
+
+ If we get here, \c connectOrDisconnect() was called to establish a
+ new FTP connection. We create a new QFtp for our new connection,
+ and connect its signals to slots in \c FtpWindow. The
+ \l{QFtp::}{listInfo()} signal is emitted whenever information
+ about a single file on the sever has been resolved. This signal is
+ sent when we ask QFtp to \l{QFtp::}{list()} the contents of a
+ directory. Finally, the \l{QFtp::}{dataTransferProgress()} signal
+ is emitted repeatedly during an FTP file transfer, giving us
+ progress reports.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 2
+
+ The \gui {Ftp Server} line edit contains the IP address or
+ hostname of the server to which we want to connect. We first check
+ that the URL is a valid FTP sever address. If it isn't, we still
+ try to connect using the plain text in \c ftpServerLineEdit. In
+ either case, we assume that port \c 21 is used.
+
+ If the URL does not contain a user name and password, we use
+ QFtp::login(), which will attempt to log into the FTP sever as an
+ anonymous user. The QFtp object will now notify us when it has
+ connected to the FTP server; it will also send a signal if it
+ fails to connect or the username and password were rejected.
+
+ We move on to the \c downloadFile() slot:
+
+ \snippet examples/network/ftp/ftpwindow.cpp 3
+ \dots
+ \snippet examples/network/ftp/ftpwindow.cpp 4
+
+ We first fetch the name of the file, which we find in the selected
+ item of \c fileList. We then start the download by using
+ QFtp::get(). QFtp will send progress signals during the download
+ and a signal when the download is completed.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 5
+
+ QFtp supports canceling the download of files.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 6
+
+ The \c ftpCommandFinished() slot is called when QFtp has
+ finished a QFtp::Command. If an error occurred during the
+ command, QFtp will set \c error to one of the values in
+ the QFtp::Error enum; otherwise, \c error is zero.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 7
+
+ After login, the QFtp::list() function will list the top-level
+ directory on the server. addToList() is connected to
+ QFtp::listInfo(), and will be invoked for each entry in that
+ directory.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 8
+
+ When a \l{QFtp::}{Get} command is finished, a file has finished
+ downloading (or an error occurred during the download).
+
+ \snippet examples/network/ftp/ftpwindow.cpp 9
+
+ After a \l{QFtp::}{List} command is performed, we have to check if
+ no entries were found (in which case our \c addToList() function
+ would not have been called).
+
+ Let's continue with the the \c addToList() slot:
+
+ \snippet examples/network/ftp/ftpwindow.cpp 10
+
+ When a new file has been resolved during a QFtp::List command,
+ this slot is invoked with a QUrlInfo describing the file. We
+ create a separate row for the file in \c fileList. If \c fileList
+ does not have a current item, we set the new item to be the
+ current item.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 11
+
+ The \c processItem() slot is called when an item is double clicked
+ in the \gui {File List}. If the item represents a directory, we
+ want to load the contents of that directory with QFtp::list().
+
+ \snippet examples/network/ftp/ftpwindow.cpp 12
+
+ \c cdToParent() is invoked when the the user requests to go to the
+ parent directory of the one displayed in the file list. After
+ changing the directory, we QFtp::List its contents.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 13
+
+ The \c updateDataTransferProgress() slot is called regularly by
+ QFtp::dataTransferProgress() when a file download is in progress.
+ We use a QProgressDialog to show the download progression to the
+ user.
+
+ \snippet examples/network/ftp/ftpwindow.cpp 14
+
+ The \c enableDownloadButton() is called whenever the current item
+ in \c fileList changes. If the item represents a file, the \gui
+ {Enable Download} Button should be enabled; otherwise, it is
+ disabled.
+*/
+
diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc
new file mode 100644
index 0000000..e1b83fe
--- /dev/null
+++ b/doc/src/examples/globalVariables.qdoc
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xmlpatterns/xquery/globalVariables
+ \title C++ Source Code Analyzer Example
+
+ This example uses XQuery and the \c xmlpatterns command line utility to
+ query C++ source code.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Suppose we want to analyze C++ source code to find coding standard
+ violations and instances of bad or inefficient patterns. We can do
+ it using the common searching and pattern matching utilities to
+ process the C++ files (e.g., \c{grep}, \c{sed}, and \c{awk}). Now
+ we can also use XQuery with the QtXmlPatterns module.
+
+ An extension to the \c{g++} open source C++ compiler
+ (\l{http://public.kitware.com/GCC_XML/HTML/Index.html} {GCC-XML})
+ generates an XML description of C++ source code declarations. This
+ XML description can then be processed by QtXmlPatterns using
+ XQueries to navigate the XML description of the C++ source and
+ produce a report. Consider the problem of finding mutable global
+ variables:
+
+ \section2 Reporting Uses of Mutable Global Variables
+
+ Suppose we want to introduce threading to a C++ application that
+ was originally written without threading. In a threaded program,
+ mutable global variables can cause bugs, because one thread might
+ change a global variable that other threads are reading, or two
+ threads might try to set the same global variable. So when
+ converting our program to use threading, one of the things we must
+ do is protect the global variables to prevent the bugs described
+ above. How can we use XQuery and
+ \l{http://public.kitware.com/GCC_XML/HTML/Index.html} {GCC-XML} to
+ find the variables that need protecting?
+
+ \section3 A C++ application
+
+ Consider the declarations in this hypothetical C++ application:
+
+ \snippet examples/xmlpatterns/xquery/globalVariables/globals.cpp 0
+
+ \section3 The XML description of the C++ application
+
+ Submitting this C++ source to
+ \l{http://public.kitware.com/GCC_XML/HTML/Index.html} {GCC-XML}
+ produces this XML description:
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/globals.gccxml
+ \printuntil
+
+ \section3 The XQuery for finding global variables
+
+ We need an XQuery to find the global variables in the XML
+ description. Here is our XQuery source. We walk through it in
+ \l{XQuery Code Walk-Through}.
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \printuntil
+
+ \section3 Running the XQuery
+
+ To run the XQuery using the \c xmlpatterns command line utility,
+ enter the following command:
+
+ \code
+ xmlpatterns reportGlobals.xq -param fileToOpen=globals.gccxml -output globals.html
+ \endcode
+
+ \section3 The XQuery output
+
+ The \c xmlpatterns command loads and parses \c globals.gccxml,
+ runs the XQuery \c reportGlobals.xq, and generates this report:
+
+ \raw HTML
+<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
+ <head>
+ <title>Global variables report for globals.gccxml</title>
+ </head>
+ <style type="text/css">
+ .details
+ {
+ text-align: left;
+ font-size: 80%;
+ color: blue
+ }
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ </style>
+ <body>
+ <p class="details">Start report: 2008-12-16T13:43:49.65Z</p>
+ <p>Global variables with complex types:</p>
+ <ol>
+ <li>
+ <span class="variableName">mutableComplex1</span> in globals.cpp at line 14</li>
+ <li>
+ <span class="variableName">mutableComplex2</span> in globals.cpp at line 15</li>
+ <li>
+ <span class="variableName">constComplex1</span> in globals.cpp at line 16</li>
+ <li>
+ <span class="variableName">constComplex2</span> in globals.cpp at line 17</li>
+ </ol>
+ <p>Mutable global variables with primitives types:</p>
+ <ol>
+ <li>
+ <span class="variableName">mutablePrimitive1</span> in globals.cpp at line 1</li>
+ <li>
+ <span class="variableName">mutablePrimitive2</span> in globals.cpp at line 2</li>
+ </ol>
+ <p class="details">End report: 2008-12-16T13:43:49.65Z</p>
+ </body>
+</html>
+ \endraw
+
+ \section1 XQuery Code Walk-Through
+
+ The XQuery source is in
+ \c{examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq}
+ It begins with two variable declarations that begin the XQuery:
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto declare variable
+ \printto (:
+
+ The first variable, \c{$fileToOpen}, appears in the \c xmlpatterns
+ command shown earlier, as \c{-param fileToOpen=globals.gccxml}.
+ This binds the variable name to the file name. This variable is
+ then used in the declaration of the second variable, \c{$inDoc},
+ as the parameter to the
+ \l{http://www.w3.org/TR/xpath-functions/#func-doc} {doc()}
+ function. The \c{doc()} function returns the document node of
+ \c{globals.gccxml}, which is assigned to \c{$inDoc} to be used
+ later in the XQuery as the root node of our searches for global
+ variables.
+
+ Next skip to the end of the XQuery, where the \c{<html>} element
+ is constructed. The \c{<html>} will contain a \c{<head>} element
+ to specify a heading for the html page, followed by some style
+ instructions for displaying the text, and then the \c{<body>}
+ element.
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto <html xmlns
+ \printuntil
+
+ The \c{<body>} element contains a call to the \c{local:report()}
+ function, which is where the query does the "heavy lifting." Note
+ the two \c{return} clauses separated by the \e {comma operator}
+ about halfway down:
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto declare function local:report()
+ \printuntil };
+
+ The \c{return} clauses are like two separate queries. The comma
+ operator separating them means that both \c{return} clauses are
+ executed and both return their results, or, rather, both output
+ their results. The first \c{return} clause searches for global
+ variables with complex types, and the second searches for mutable
+ global variables with primitive types.
+
+ Here is the html generated for the \c{<body>} element. Compare
+ it with the XQuery code above:
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/globals.html
+ \skipto <body>
+ \printuntil </body>
+
+ The XQuery declares three more local functions that are called in
+ turn by the \c{local:report()} function. \c{isComplexType()}
+ returns true if the variable has a complex type. The variable can
+ be mutable or const.
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto declare function local:isComplexType
+ \printuntil };
+
+ \c{isPrimitive()} returns true if the variable has a primitive
+ type. The variable must be mutable.
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto declare function local:isPrimitive
+ \printuntil };
+
+ \c{location()} returns a text constructed from the variable's file
+ and line number attributes.
+
+ \quotefromfile examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
+ \skipto declare function local:location
+ \printuntil };
+
+ */
diff --git a/doc/src/examples/grabber.qdoc b/doc/src/examples/grabber.qdoc
new file mode 100644
index 0000000..efb5b6f
--- /dev/null
+++ b/doc/src/examples/grabber.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/grabber
+ \title Grabber Example
+
+ The Grabber examples shows how to retrieve the contents of an OpenGL framebuffer.
+
+ \image grabber-example.png
+*/
diff --git a/doc/src/examples/groupbox.qdoc b/doc/src/examples/groupbox.qdoc
new file mode 100644
index 0000000..c5f6a62
--- /dev/null
+++ b/doc/src/examples/groupbox.qdoc
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/groupbox
+ \title Group Box Example
+
+ The Group Box example shows how to use the different kinds of group
+ boxes in Qt.
+
+ Group boxes are container widgets that organize buttons into groups,
+ both logically and on screen. They manage the interactions between
+ the user and the application so that you do not have to enforce
+ simple constraints.
+
+ Group boxes are usually used to organize check boxes and radio
+ buttons into exclusive groups.
+
+ \image groupbox-example.png
+
+ The Group Boxes example consists of a single \c Window class that
+ is used to show four group boxes: an exclusive radio button group,
+ a non-exclusive checkbox group, an exclusive radio button group
+ with an enabling checkbox, and a group box with normal push buttons.
+
+ \section1 Window Class Definition
+
+ The \c Window class is a subclass of \c QWidget that is used to
+ display a number of group boxes. The class definition contains
+ functions to construct each group box and populate it with different
+ selections of button widgets:
+
+ \snippet examples/widgets/groupbox/window.h 0
+
+ In the example, the widget will be used as a top-level window, so
+ the constructor is defined so that we do not have to specify a parent
+ widget.
+
+ \section1 Window Class Implementation
+
+ The constructor creates a grid layout and fills it with each of the
+ group boxes that are to be displayed:
+
+ \snippet examples/widgets/groupbox/window.cpp 0
+
+ The functions used to create each group box each return a
+ QGroupBox to be inserted into the grid layout.
+
+ \snippet examples/widgets/groupbox/window.cpp 1
+
+ The first group box contains and manages three radio buttons. Since
+ the group box contains only radio buttons, it is exclusive by
+ default, so only one radio button can be checked at any given time.
+ We check the first radio button to ensure that the button group
+ contains one checked button.
+
+ \snippet examples/widgets/groupbox/window.cpp 3
+
+ We use a vertical layout within the group box to present the
+ buttons in the form of a vertical list, and return the group
+ box to the constructor.
+
+ The second group box is itself checkable, providing a convenient
+ way to disable all the buttons inside it. Initially, it is
+ unchecked, so the group box itself must be checked before any of
+ the radio buttons inside can be checked.
+
+ \snippet examples/widgets/groupbox/window.cpp 4
+
+ The group box contains three exclusive radio buttons, and an
+ independent checkbox. For consistency, one radio button must be
+ checked at all times, so we ensure that the first one is initially
+ checked.
+
+ \snippet examples/widgets/groupbox/window.cpp 5
+
+ The buttons are arranged in the same way as those in the first
+ group box.
+
+ \snippet examples/widgets/groupbox/window.cpp 6
+
+ The third group box is constructed with a "flat" style that is
+ better suited to certain types of dialog.
+
+ \snippet examples/widgets/groupbox/window.cpp 7
+
+ This group box contains only checkboxes, so it is non-exclusive by
+ default. This means that each checkbox can be checked independently
+ of the others.
+
+ \snippet examples/widgets/groupbox/window.cpp 8
+
+ Again, we use a vertical layout within the group box to present
+ the buttons in the form of a vertical list.
+
+ \snippet examples/widgets/groupbox/window.cpp 9
+
+ The final group box contains only push buttons and, like the
+ second group box, it is checkable.
+
+ \snippet examples/widgets/groupbox/window.cpp 10
+
+ We create a normal button, a toggle button, and a flat push button:
+
+ \snippet examples/widgets/groupbox/window.cpp 11
+
+ Push buttons can be used to display popup menus. We create one, and
+ attach a simple menu to it:
+
+ \snippet examples/widgets/groupbox/window.cpp 12
+
+ Finally, we lay out the widgets vertically, and return the group box
+ that we created:
+
+ \snippet examples/widgets/groupbox/window.cpp 13
+*/
diff --git a/doc/src/examples/hellogl.qdoc b/doc/src/examples/hellogl.qdoc
new file mode 100644
index 0000000..2fc51a3
--- /dev/null
+++ b/doc/src/examples/hellogl.qdoc
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/hellogl
+ \title Hello GL Example
+
+ The Hello GL example demonstrates the basic use of the OpenGL-related classes
+ provided with Qt.
+
+ \image hellogl-example.png
+
+ Qt provides the QGLWidget class to enable OpenGL graphics to be rendered within
+ a standard application user interface. By subclassing this class, and providing
+ reimplementations of event handler functions, 3D scenes can be displayed on
+ widgets that can be placed in layouts, connected to other objects using signals
+ and slots, and manipulated like any other widget.
+
+ \tableofcontents
+
+ \section1 GLWidget Class Definition
+
+ The \c GLWidget class contains some standard public definitions for the
+ constructor, destructor, \l{QWidget::sizeHint()}{sizeHint()}, and
+ \l{QWidget::minimumSizeHint()}{minimumSizeHint()} functions:
+
+ \snippet examples/opengl/hellogl/glwidget.h 0
+
+ We use a destructor to ensure that any OpenGL-specific data structures
+ are deleted when the widget is no longer needed.
+
+ \snippet examples/opengl/hellogl/glwidget.h 1
+
+ The signals and slots are used to allow other objects to interact with the
+ 3D scene.
+
+ \snippet examples/opengl/hellogl/glwidget.h 2
+
+ OpenGL initialization, viewport resizing, and painting are handled by
+ reimplementing the QGLWidget::initializeGL(), QGLWidget::resizeGL(), and
+ QGLWidget::paintGL() handler functions. To enable the user to interact
+ directly with the scene using the mouse, we reimplement
+ QWidget::mousePressEvent() and QWidget::mouseMoveEvent().
+
+ \snippet examples/opengl/hellogl/glwidget.h 3
+
+ The rest of the class contains utility functions and variables that are
+ used to construct and hold orientation information for the scene. The
+ \c object variable will be used to hold an identifier for an OpenGL
+ display list.
+
+ \section1 GLWidget Class Implementation
+
+ In this example, we split the class into groups of functions and describe
+ them separately. This helps to illustrate the differences between subclasses
+ of native widgets (such as QWidget and QFrame) and QGLWidget subclasses.
+
+ \section2 Widget Construction and Sizing
+
+ The constructor provides default rotation angles for the scene, initializes
+ the variable used for the display list, and sets up some colors for later use.
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 0
+
+ We also implement a destructor to release OpenGL-related resources when the
+ widget is deleted:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 1
+
+ The destructor ensures that the display list is deleted properly.
+
+ We provide size hint functions to ensure that the widget is shown at a
+ reasonable size:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 2
+ \codeline
+ \snippet examples/opengl/hellogl/glwidget.cpp 3
+ \snippet examples/opengl/hellogl/glwidget.cpp 4
+
+ The widget provides three slots that enable other components in the
+ example to change the orientation of the scene:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 5
+
+ In the above slot, the \c xRot variable is updated only if the new angle
+ is different to the old one, the \c xRotationChanged() signal is emitted to
+ allow other components to be updated, and the widget's
+ \l{QGLWidget::updateGL()}{updateGL()} handler function is called.
+
+ The \c setYRotation() and \c setZRotation() slots perform the same task for
+ rotations measured by the \c yRot and \c zRot variables.
+
+ \section2 OpenGL Initialization
+
+ The \l{QGLWidget::initializeGL()}{initializeGL()} function is used to
+ perform useful initialization tasks that are needed to render the 3D scene.
+ These often involve defining colors and materials, enabling and disabling
+ certain rendering flags, and setting other properties used to customize the
+ rendering process.
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 6
+
+ In this example, we reimplement the function to set the background color,
+ create a display list containing information about the object we want to
+ display, and set up the rendering process to use a particular shading model
+ and rendering flags:
+
+ \section2 Resizing the Viewport
+
+ The \l{QGLWidget::resizeGL()}{resizeGL()} function is used to ensure that
+ the OpenGL implementation renders the scene onto a viewport that matches the
+ size of the widget, using the correct transformation from 3D coordinates to
+ 2D viewport coordinates.
+
+ The function is called whenever the widget's dimensions change, and is
+ supplied with the new width and height. Here, we define a square viewport
+ based on the length of the smallest side of the widget to ensure that
+ the scene is not distorted if the widget has sides of unequal length:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 8
+
+ A discussion of the projection transformation used is outside the scope of
+ this example. Please consult the OpenGL reference documentation for an
+ explanation of projection matrices.
+
+ \section2 Painting the Scene
+
+ The \l{QGLWidget::paintGL()}{paintGL()} function is used to paint the
+ contents of the scene onto the widget. For widgets that only need to be
+ decorated with pure OpenGL content, we reimplement QGLWidget::paintGL()
+ \e instead of reimplementing QWidget::paintEvent():
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 7
+
+ In this example, we clear the widget using the background color that
+ we defined in the \l{QGLWidget::initializeGL()}{initializeGL()} function,
+ set up the frame of reference for the object we want to display, and call
+ the display list containing the rendering commands for the object.
+
+ \section2 Mouse Handling
+
+ Just as in subclasses of native widgets, mouse events are handled by
+ reimplementing functions such as QWidget::mousePressEvent() and
+ QWidget::mouseMoveEvent().
+
+ The \l{QWidget::mousePressEvent()}{mousePressEvent()} function simply
+ records the position of the mouse when a button is initially pressed:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 9
+
+ The \l{QWidget::mouseMoveEvent()}{mouseMoveEvent()} function uses the
+ previous location of the mouse cursor to determine how much the object
+ in the scene should be rotated, and in which direction:
+
+ \snippet examples/opengl/hellogl/glwidget.cpp 10
+
+ Since the user is expected to hold down the mouse button and drag the
+ cursor to rotate the object, the cursor's position is updated every time
+ a move event is received.
+
+ \section2 Utility Functions
+
+ We have omitted the utility functions, \c makeObject(), \c quad(),
+ \c extrude(), and \c normalizeAngle() from our discussion. These can be
+ viewed in the quoted source for \c glwidget.cpp via the link at the
+ start of this document.
+
+ \section1 Window Class Definition
+
+ The \c Window class is used as a container for the \c GLWidget used to
+ display the scene:
+
+ \snippet examples/opengl/hellogl/window.h 0
+
+ In addition, it contains sliders that are used to change the orientation
+ of the object in the scene.
+
+ \section1 Window Class Implementation
+
+ The constructor constructs an instance of the \c GLWidget class and some
+ sliders to manipulate its contents.
+
+ \snippet examples/opengl/hellogl/window.cpp 0
+
+ We connect the \l{QAbstractSlider::valueChanged()}{valueChanged()} signal
+ from each of the sliders to the appropriate slots in \c{glWidget}.
+ This allows the user to change the orientation of the object by dragging
+ the sliders.
+
+ We also connect the \c xRotationChanged(), \c yRotationChanged(), and
+ \c zRotationChanged() signals from \c glWidget to the
+ \l{QAbstractSlider::setValue()}{setValue()} slots in the
+ corresponding sliders.
+
+ \snippet examples/opengl/hellogl/window.cpp 1
+
+ The sliders are placed horizontally in a layout alongside the \c GLWidget,
+ and initialized with suitable default values.
+
+ The \c createSlider() utility function constructs a QSlider, and ensures
+ that it is set up with a suitable range, step value, tick interval, and
+ page step value before returning it to the calling function:
+
+ \snippet examples/opengl/hellogl/window.cpp 2
+
+ \section1 Summary
+
+ The \c GLWidget class implementation shows how to subclass QGLWidget for
+ the purposes of rendering a 3D scene using OpenGL calls. Since QGLWidget
+ is a subclass of QWidget, subclasses of QGLWidget can be placed in layouts
+ and provided with interactive features just like normal custom widgets.
+
+ We ensure that the widget is able to correctly render the scene using OpenGL
+ by reimplementing the following functions:
+
+ \list
+ \o QGLWidget::initializeGL() sets up resources needed by the OpenGL implementation
+ to render the scene.
+ \o QGLWidget::resizeGL() resizes the viewport so that the rendered scene fits onto
+ the widget, and sets up a projection matrix to map 3D coordinates to 2D viewport
+ coordinates.
+ \o QGLWidget::paintGL() performs painting operations using OpenGL calls.
+ \endlist
+
+ Since QGLWidget is a subclass of QWidget, it can also be used
+ as a normal paint device, allowing 2D graphics to be drawn with QPainter.
+ This use of QGLWidget is discussed in the \l{2D Painting Example}{2D Painting}
+ example.
+
+ More advanced users may want to paint over parts of a scene rendered using
+ OpenGL. QGLWidget allows pure OpenGL rendering to be mixed with QPainter
+ calls, but care must be taken to maintain the state of the OpenGL implementation.
+ See the \l{Overpainting Example}{Overpainting} example for more information.
+*/
diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc
new file mode 100644
index 0000000..0293584
--- /dev/null
+++ b/doc/src/examples/hellogl_es.qdoc
@@ -0,0 +1,124 @@
+/*!
+ \example opengl/hellogl_es
+ \title Hello GL ES Example
+
+ The Hello GL ES example is the \l{Hello GL Example} ported to OpenGL ES.
+ It also included some effects from the OpenGL \l{Overpainting Example}.
+
+ \image hellogl-es-example.png
+
+ A complete introduction to OpenGL ES and a description of all differences
+ between OpenGL and OpenGL ES is out of the scope of this document; but
+ we will describe some of the major issues and differences.
+
+ Since Hello GL ES is a direct port of standard OpenGL code, it is a fairly
+ good example for porting OpenGL code to OpenGL ES.
+
+ \tableofcontents
+
+ \section1 Using QGLWidget
+
+ QGLWidget can be used for OpenGL ES similar to the way it is used with
+ standard OpenGL; but there are some differences. We use EGL 1.0 to embedd
+ the OpenGL ES window within the native window manager. In
+ QGLWidget::initializeGL() we initialize OpenGL ES.
+
+ \section1 Using OpenGL ES rendering commands
+
+ To update the scene, we reimplment QGLWidget::paintGL(). We use OpenGL ES
+ rendering commands just like we do with standard OpenGL. Since the OpenGL
+ ES common light profile only supports fixed point functions, we need to
+ abstract it somehow. Hence, we define an abstraction layer in
+ \c{cl_helper.h}.
+
+ \snippet examples/opengl/hellogl_es/cl_helper.h 0
+
+ Instead of \c glFogxv() or \c glFogfv() we use \c q_glFogv() and to
+ convert the coordinates of a vertice we use the macro \c f2vt(). That way,
+ if QT_OPENGL_ES_CL is defined we use the fixed point functions and every
+ float is converted to fixed point.
+
+ If QT_OPENGL_ES_CL is not defined we use the floating point functions.
+
+ \snippet examples/opengl/hellogl_es/cl_helper.h 1
+
+ This way we support OpenGL ES Common and Common Light with the same code
+ and abstract the fact that we use either the floating point functions or
+ otherwise the fixed point functions.
+
+ \section1 Porting OpenGL to OpenGL ES
+
+ Since OpenGL ES is missing the immediate mode and does not support quads,
+ we have to create triangle arrays.
+
+ We create a quad by adding vertices to a QList of vertices. We create both
+ sides of the quad and hardcode a distance of 0.05f. We also compute the
+ correct normal for each face and store them in another QList.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 0
+
+ And then we convert the complete list of vertexes and the list of normals
+ into the native OpenGL ES format that we can use with the OpenGL ES API.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 1
+
+ In \c paintQtLogo() we draw the triangle array using OpenGL ES. We use
+ q_vertexTypeEnum to abstract the fact that our vertex and normal arrays
+ are either in float or in fixed point format.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 2
+
+ \section1 Using QGLPainter
+
+ Since the \c QGLPainter is slower for OpenGL ES we paint the bubbles with
+ the rasterizer and cache them in a QImage. This happends only once during
+ the initialiazation.
+
+ \snippet examples/opengl/hellogl_es/bubble.cpp 0
+
+ For each bubble this QImage is then drawn to the QGLWidget by using the
+ according QPainter with transparency enabled.
+
+ \snippet examples/opengl/hellogl_es/bubble.cpp 1
+
+ Another difference beetwen OpenGL and OpenGL ES is that OpenGL ES does not
+ support glPushAttrib(GL_ALL_ATTRIB_BITS). So we have to restore all the
+ OpenGL states ourselves, after we created the QPainter in
+ GLWidget::paintGL().
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 3
+
+ Setting up up the model view matrix and setting the right OpenGL states is
+ done in the same way as for standard OpenGL.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 4
+
+ Now we have to restore the OpenGL state for the QPainter. This is not done
+ automatically for OpenGL ES.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 5
+
+ Now we use the QPainter to draw the transparent bubbles.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 6
+
+ In the end, we calculate the framerate and display it using the QPainter
+ again.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 7
+
+ After we finished all the drawing operations we swap the screen buffer.
+
+ \snippet examples/opengl/hellogl_es/glwidget.cpp 8
+
+ \section1 Summary
+
+ Similar to the \l{Hello GL Example}, we subclass QGLWidget to render
+ a 3D scene using OpenGL ES calls. QGLWidget is a subclass of QWidget.
+ Hence, its \l{QGLWidget}'s subclasses can be placed in layouts and
+ provided with interactive features just like normal custom widgets.
+
+ QGLWidget allows pure OpenGL ES rendering to be mixed with QPainter calls,
+ but care must be taken to maintain the state of the OpenGL ES
+ implementation.
+*/
diff --git a/doc/src/examples/helloscript.qdoc b/doc/src/examples/helloscript.qdoc
new file mode 100644
index 0000000..5662680
--- /dev/null
+++ b/doc/src/examples/helloscript.qdoc
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/helloscript
+ \title Hello Script Example
+
+ The Hello Script example shows the basic use of Qt Script: How to embed
+ a script engine into the application, how to evaluate a script, and how
+ to process the result of the evaluation. The example also shows how to
+ apply internationalization to scripts.
+
+ \snippet examples/script/helloscript/main.cpp 0
+
+ The application will load the script file to evaluate from a resource, so
+ we first make sure that the resource is initialized.
+
+ \snippet examples/script/helloscript/main.cpp 1
+
+ We attempt to load a translation, and install translation functions in the
+ script engine. How to produce a translation is explained later.
+
+ \snippet examples/script/helloscript/main.cpp 2
+
+ A push button is created and exported to the script environment as a
+ global variable, \c button. Scripts will be able to access properties,
+ signals and slots of the button as properties of the \c button script
+ object; the script object acts as a proxy to the C++ button object.
+
+ \snippet examples/script/helloscript/main.cpp 3
+
+ The contents of the script file are read.
+
+ \snippet examples/script/helloscript/helloscript.qs 0
+
+ The script sets the \c text (note that the qTr() function is used to allow
+ for translation) and \c styleSheet properties of the button, and calls the
+ button's \c show() slot.
+
+ \snippet examples/script/helloscript/main.cpp 4
+
+ The script is evaluated. Note that the file name is passed as the
+ (optional) second parameter; this makes it possible for the script engine
+ to produce a meaningful backtrace if something goes wrong, and makes the
+ qTr() function be able to resolve the translations that are associated
+ with this script.
+
+ \snippet examples/script/helloscript/main.cpp 5
+
+ If the result is an Error object (e.g. the script contained a syntax
+ error, or tried to call a function that doesn't exist), we obtain
+ the line number and string representation of the error and display
+ it in a message box.
+
+ \snippet examples/script/helloscript/main.cpp 6
+
+ If the evaluation went well, the application event loop is entered.
+
+ \section1 Translating the Application
+
+ The Qt Script internalization support builds on what Qt already provides
+ for C++; see the \l{Hello tr() Example} for an introduction.
+
+ Since we haven't made the translation file \c helloscript_la.qm, the
+ source text is shown when we run the application ("Hello world!").
+
+ To generate the translation file, run \c lupdate as follows:
+
+ \code
+ lupdate helloscript.qs -ts helloscript_la.ts
+ \endcode
+
+ You should now have a file \c helloscript_la.ts in the current
+ directory. Run \c linguist to edit the translation:
+
+ \code
+ linguist helloscript_la.ts
+ \endcode
+
+ You should now see the text "helloscript.qs" in the top left pane.
+ Double-click it, then click on "Hello world!" and enter "Orbis, te
+ saluto!" in the \gui Translation pane (the middle right of the
+ window). Don't forget the exclamation mark!
+
+ Click the \gui Done checkbox and choose \gui File|Save from the
+ menu bar. The \c .ts file will no longer contain
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3
+
+ but instead will have
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 4
+
+ To see the application running in Latin, we have to generate a \c .qm
+ file from the \c .ts file. Generating a \c .qm file can be achieved
+ either from within \e {Qt Linguist} (for a single \c .ts file), or
+ by using the command line program \c lrelease which will produce one \c
+ .qm file for each of the \c .ts files listed in the project file.
+ Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing
+ \gui File|Release from \e {Qt Linguist}'s menu bar and pressing
+ \gui Save in the file save dialog that pops up. Now run the \c helloscript
+ program again. This time the button will be labelled "Orbis, te
+ saluto!".
+*/
diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc
new file mode 100644
index 0000000..72efd11
--- /dev/null
+++ b/doc/src/examples/hellotr.qdoc
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/hellotr
+ \title Hello tr() Example
+
+ This example is a small Hello World program with a Latin translation. The
+ screenshot below shows the English version.
+
+ \image linguist-hellotr_en.png
+
+ See the \l{Qt Linguist manual} for more information about
+ translating Qt application.
+
+ \section1 Line by Line Walkthrough
+
+
+ \snippet examples/linguist/hellotr/main.cpp 0
+
+ This line includes the definition of the QTranslator class.
+ Objects of this class provide translations for user-visible text.
+
+ \snippet examples/linguist/hellotr/main.cpp 5
+
+ Creates a QTranslator object without a parent.
+
+ \snippet examples/linguist/hellotr/main.cpp 6
+
+ Tries to load a file called \c hellotr_la.qm (the \c .qm file extension is
+ implicit) that contains Latin translations for the source texts used in
+ the program. No error will occur if the file is not found.
+
+ \snippet examples/linguist/hellotr/main.cpp 7
+
+ Adds the translations from \c hellotr_la.qm to the pool of translations used
+ by the program.
+
+ \snippet examples/linguist/hellotr/main.cpp 8
+
+ Creates a push button that displays "Hello world!". If \c hellotr_la.qm
+ was found and contains a translation for "Hello world!", the
+ translation appears; if not, the source text appears.
+
+ All classes that inherit QObject have a \c tr() function. Inside
+ a member function of a QObject class, we simply write \c tr("Hello
+ world!") instead of \c QPushButton::tr("Hello world!") or \c
+ QObject::tr("Hello world!").
+
+ \section1 Running the Application in English
+
+ Since we haven't made the translation file \c hellotr_la.qm, the source text
+ is shown when we run the application:
+
+ \image linguist-hellotr_en.png
+
+ \section1 Creating a Latin Message File
+
+ The first step is to create a project file, \c hellotr.pro, that lists
+ all the source files for the project. The project file can be a qmake
+ project file, or even an ordinary makefile. Any file that contains
+
+ \snippet examples/linguist/hellotr/hellotr.pro 0
+ \snippet examples/linguist/hellotr/hellotr.pro 1
+
+ will work. \c TRANSLATIONS specifies the message files we want to
+ maintain. In this example, we just maintain one set of translations,
+ namely Latin.
+
+ Note that the file extension is \c .ts, not \c .qm. The \c .ts
+ translation source format is designed for use during the
+ application's development. Programmers or release managers run
+ the \c lupdate program to generate and update \c .ts files with
+ the source text that is extracted from the source code.
+ Translators read and update the \c .ts files using \e {Qt
+ Linguist} adding and editing their translations.
+
+ The \c .ts format is human-readable XML that can be emailed directly
+ and is easy to put under version control. If you edit this file
+ manually, be aware that the default encoding for XML is UTF-8, not
+ Latin1 (ISO 8859-1). One way to type in a Latin1 character such as
+ '\oslash' (Norwegian o with slash) is to use an XML entity:
+ "\&#xf8;". This will work for any Unicode 4.0 character.
+
+ Once the translations are complete the \c lrelease program is used to
+ convert the \c .ts files into the \c .qm Qt message file format. The
+ \c .qm format is a compact binary format designed to deliver very
+ fast lookup performance. Both \c lupdate and \c lrelease read all the
+ project's source and header files (as specified in the HEADERS and
+ SOURCES lines of the project file) and extract the strings that
+ appear in \c tr() function calls.
+
+ \c lupdate is used to create and update the message files (\c hellotr_la.ts
+ in this case) to keep them in sync with the source code. It is safe to
+ run \c lupdate at any time, as \c lupdate does not remove any
+ information. For example, you can put it in the makefile, so the \c .ts
+ files are updated whenever the source changes.
+
+ Try running \c lupdate right now, like this:
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 0
+
+ (The \c -verbose option instructs \c lupdate to display messages that
+ explain what it is doing.) You should now have a file \c hellotr_la.ts in
+ the current directory, containing this:
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 1
+
+ You don't need to understand the file format since it is read and
+ updated using tools (\c lupdate, \e {Qt Linguist}, \c lrelease).
+
+ \section1 Translating to Latin with Qt Linguist
+
+ We will use \e {Qt Linguist} to provide the translation, although
+ you can use any XML or plain text editor to enter a translation into a
+ \c .ts file.
+
+ To start \e {Qt Linguist}, type
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 2
+
+ You should now see the text "QPushButton" in the top left pane.
+ Double-click it, then click on "Hello world!" and enter "Orbis, te
+ saluto!" in the \gui Translation pane (the middle right of the
+ window). Don't forget the exclamation mark!
+
+ Click the \gui Done checkbox and choose \gui File|Save from the
+ menu bar. The \c .ts file will no longer contain
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 3
+
+ but instead will have
+
+ \snippet doc/src/snippets/code/doc_src_examples_hellotr.qdoc 4
+
+ \section1 Running the Application in Latin
+
+ To see the application running in Latin, we have to generate a \c .qm
+ file from the \c .ts file. Generating a \c .qm file can be achieved
+ either from within \e {Qt Linguist} (for a single \c .ts file), or
+ by using the command line program \c lrelease which will produce one \c
+ .qm file for each of the \c .ts files listed in the project file.
+ Generate \c hellotr_la.qm from \c hellotr_la.ts by choosing
+ \gui File|Release from \e {Qt Linguist}'s menu bar and pressing
+ \gui Save in the file save dialog that pops up. Now run the \c hellotr
+ program again. This time the button will be labelled "Orbis, te
+ saluto!".
+
+ \image linguist-hellotr_la.png
+*/
diff --git a/doc/src/examples/http.qdoc b/doc/src/examples/http.qdoc
new file mode 100644
index 0000000..17404a8
--- /dev/null
+++ b/doc/src/examples/http.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/http
+ \title HTTP Example
+
+ The HTTP example demonstrates a simple HTTP client that shows how to fetch files
+ specified by URLs from remote hosts.
+
+ \image http-example.png
+*/
diff --git a/doc/src/examples/i18n.qdoc b/doc/src/examples/i18n.qdoc
new file mode 100644
index 0000000..68d9153
--- /dev/null
+++ b/doc/src/examples/i18n.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/i18n
+ \title I18N Example
+
+ The Internationalization (I18N) example demonstrates Qt's support for translated
+ text. Developers can write the initial application text in one language, and
+ translations can be provided later without any modifications to the code.
+
+ \image i18n-example.png
+*/
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
new file mode 100644
index 0000000..750ef2e
--- /dev/null
+++ b/doc/src/examples/icons.qdoc
@@ -0,0 +1,794 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/icons
+ \title Icons Example
+
+ The Icons example shows how QIcon can generate pixmaps reflecting
+ an icon's state, mode and size. These pixmaps are generated from
+ the set of pixmaps made available to the icon, and are used by Qt
+ widgets to show an icon representing a particular action.
+
+ \image icons-example.png Screenshot of the Icons example
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 QIcon Overview
+
+ The QIcon class provides scalable icons in different modes and
+ states. An icon's state and mode are depending on the intended use
+ of the icon. Qt currently defines four modes:
+
+ \table
+ \header \o Mode \o Description
+ \row
+ \o QIcon::Normal
+ \o Display the pixmap when the user is not interacting with the
+ icon, but the functionality represented by the icon is
+ available.
+ \row
+ \o QIcon::Active
+ \o Display the pixmap when the functionality represented by the
+ icon is available and the user is interacting with the icon,
+ for example, moving the mouse over it or clicking it.
+ \row
+ \o QIcon::Disabled
+ \o Display the pixmap when the functionality represented by
+ the icon is not available.
+ \row
+ \o QIcon::Selected
+ \o Display the pixmap when the icon is selected.
+ \endtable
+
+ QIcon's states are QIcon::On and QIcon::Off, which will display
+ the pixmap when the widget is in the respective state. The most
+ common usage of QIcon's states are when displaying checkable tool
+ buttons or menu entries (see QAbstractButton::setCheckable() and
+ QAction::setCheckable()). When a tool button or menu entry is
+ checked, the QIcon's state is \l{QIcon::}{On}, otherwise it's
+ \l{QIcon::}{Off}. You can, for example, use the QIcon's states to
+ display differing pixmaps depending on whether the tool button or
+ menu entry is checked or not.
+
+ A QIcon can generate smaller, larger, active, disabled, and
+ selected pixmaps from the set of pixmaps it is given. Such
+ pixmaps are used by Qt widgets to show an icon representing a
+ particular action.
+
+ \section1 Overview of the Icons Application
+
+ With the Icons application you get a preview of an icon's
+ generated pixmaps reflecting its different states, modes and size.
+
+ When an image is loaded into the application, it is converted into
+ a pixmap and becomes a part of the set of pixmaps available to the
+ icon. An image can be excluded from this set by checking off the
+ related checkbox. The application provides a sub directory
+ containing sets of images explicitly designed to illustrate how Qt
+ renders an icon in different modes and states.
+
+ The application allows you to manipulate the icon size with some
+ predefined sizes and a spin box. The predefined sizes are style
+ dependent, but most of the styles have the same values: Only the
+ Macintosh style differ by using 32 pixels, instead of 16 pixels,
+ for toolbar buttons. You can navigate between the available styles
+ using the \gui View menu.
+
+ \image icons-view-menu.png Screenshot of the View menu
+
+ The \gui View menu also provide the option to make the application
+ guess the icon state and mode from an image's file name. The \gui
+ File menu provide the options of adding an image and removing all
+ images. These last options are also available through a context
+ menu that appears if you press the right mouse button within the
+ table of image files. In addition, the \gui File menu provide an
+ \gui Exit option, and the \gui Help menu provide information about
+ the example and about Qt.
+
+ \image icons_find_normal.png Screenshot of the Find Files
+
+ The screenshot above shows the application with one image file
+ loaded. The \gui {Guess Image Mode/State} is enabled and the
+ style is Plastique.
+
+ When QIcon is provided with only one available pixmap, that
+ pixmap is used for all the states and modes. In this case the
+ pixmap's icon mode is set to normal, and the generated pixmaps
+ for the normal and active modes will look the same. But in
+ disabled and selected mode, Qt will generate a slightly different
+ pixmap.
+
+ The next screenshot shows the application with an additional file
+ loaded, providing QIcon with two available pixmaps. Note that the
+ new image file's mode is set to disabled. When rendering the \gui
+ Disabled mode pixmaps, Qt will now use the new image. We can see
+ the difference: The generated disabled pixmap in the first
+ screenshot is slightly darker than the pixmap with the originally
+ set disabled mode in the second screenshot.
+
+ \image icons_find_normal_disabled.png Screenshot of the Find Files
+
+ When Qt renders the icon's pixmaps it searches through the set of
+ available pixmaps following a particular algorithm. The algorithm
+ is documented in QIcon, but we will describe some particular cases
+ below.
+
+ \image icons_monkey_active.png Screenshot of the Find Files
+
+ In the screenshot above, we have set \c monkey_on_32x32 to be an
+ Active/On pixmap and \c monkey_off_64x64 to be Normal/Off. To
+ render the other six mode/state combinations, QIcon uses the
+ search algorithm described in the table below:
+
+ \table
+ \header \o{2,1} Requested Pixmap \o{8,1} Preferred Alternatives (mode/state)
+ \header \o Mode \o State \o 1 \o 2 \o 3 \o 4 \o 5 \o 6 \o 7 \o 8
+ \row \o{1,2} Normal \o Off \o \bold N0 \o A0 \o N1 \o A1 \o D0 \o S0 \o D1 \o S1
+ \row \o On \o N1 \o \bold A1 \o N0 \o A0 \o D1 \o S1 \o D0 \o S0
+ \row \o{1,2} Active \o Off \o A0 \o \bold N0 \o A1 \o N1 \o D0 \o S0 \o D1 \o S1
+ \row \o On \o \bold A1 \o N1 \o A0 \o N0 \o D1 \o S1 \o D0 \o S0
+ \row \o{1,2} Disabled \o Off \o D0 \o \bold {N0'} \o A0' \o D1 \o N1' \o A1' \o S0' \o S1'
+ \row \o On \o D1 \o N1' \o \bold {A1'} \o D0 \o N0' \o A0' \o S1' \o S0'
+ \row \o{1,2} Selected \o Off \o S0 \o \bold {N0''} \o A0'' \o S1 \o N1'' \o A1'' \o D0'' \o D1''
+ \row \o On \o S1 \o N1'' \o \bold {A1''} \o S0 \o N0'' \o A0'' \o D1'' \o D0''
+ \endtable
+
+ In the table, "0" and "1" stand for Off" and "On", respectively.
+ Single quotes indicates that QIcon generates a disabled ("grayed
+ out") version of the pixmap; similarly, double quuote indicate
+ that QIcon generates a selected ("blued out") version of the
+ pixmap.
+
+ The alternatives used in the screenshot above are shown in bold.
+ For example, the Disabled/Off pixmap is derived by graying out
+ the Normal/Off pixmap (\c monkey_off_64x64).
+
+ In the next screenshots, we loaded the whole set of monkey
+ images. By checking or unchecking file names from the image list,
+ we get different results:
+
+ \table
+ \row
+ \o \inlineimage icons_monkey.png Screenshot of the Monkey Files
+ \o \inlineimage icons_monkey_mess.png Screenshot of the Monkey Files
+ \endtable
+
+ For any given mode/state combination, it is possible to specify
+ several images at different resolutions. When rendering an
+ icon, QIcon will automatically pick the most suitable image
+ and scale it down if necessary. (QIcon never scales up images,
+ because this rarely looks good.)
+
+ The screenshots below shows what happens when we provide QIcon
+ with three images (\c qt_extended_16x16.png, \c qt_extended_32x32.png, \c
+ qt_extended_48x48.png) and try to render the QIcon at various
+ resolutions:
+
+ \table
+ \row
+ \o
+ \o \inlineimage icons_qt_extended_8x8.png Qt Extended icon at 8 x 8
+ \o \inlineimage icons_qt_extended_16x16.png Qt Extended icon at 16 x 16
+ \o \inlineimage icons_qt_extended_17x17.png Qt Extended icon at 17 x 17
+ \row
+ \o
+ \o 8 x 8
+ \o \bold {16 x 16}
+ \o 17 x 17
+ \row
+ \o \inlineimage icons_qt_extended_32x32.png Qt Extended icon at 32 x 32
+ \o \inlineimage icons_qt_extended_33x33.png Qt Extended icon at 33 x 33
+ \o \inlineimage icons_qt_extended_48x48.png Qt Extended icon at 48 x 48
+ \o \inlineimage icons_qt_extended_64x64.png Qt Extended icon at 64 x 64
+ \row
+ \o \bold {32 x 32}
+ \o 33 x 33
+ \o \bold {48 x 48}
+ \o 64 x 64
+ \endtable
+
+ For sizes up to 16 x 16, QIcon uses \c qt_extended_16x16.png and
+ scales it down if necessary. For sizes between 17 x 17 and 32 x
+ 32, it uses \c qt_extended_32x32.png. For sizes above 32 x 32, it uses
+ \c qt_extended_48x48.png.
+
+ \section1 Line-by-Line Walkthrough
+
+ The Icons example consists of four classes:
+
+ \list
+ \o \c MainWindow inherits QMainWindow and is the main application
+ window.
+ \o \c IconPreviewArea is a custom widget that displays all
+ combinations of states and modes for a given icon.
+ \o \c IconSizeSpinBox is a subclass of QSpinBox that lets the
+ user enter icon sizes (e.g., "48 x 48").
+ \o \c ImageDelegate is a subclass of QItemDelegate that provides
+ comboboxes for letting the user set the mode and state
+ associated with an image.
+ \endlist
+
+ We will start by reviewing the \c IconPreviewArea class before we
+ take a look at the \c MainWindow class. Finally, we will review the
+ \c IconSizeSpinBox and \c ImageDelegate classes.
+
+ \section2 IconPreviewArea Class Definition
+
+ An \c IconPreviewArea widget consists of a group box containing a grid of
+ QLabel widgets displaying headers and pixmaps.
+
+ \image icons_preview_area.png Screenshot of IconPreviewArea.
+
+ \snippet examples/widgets/icons/iconpreviewarea.h 0
+
+ The \c IconPreviewArea class inherits QWidget. It displays the
+ generated pixmaps corresponding to an icon's possible states and
+ modes at a given size.
+
+ We need two public functions to set the current icon and the
+ icon's size. In addition the class has three private functions: We
+ use the \c createHeaderLabel() and \c createPixmapLabel()
+ functions when constructing the preview area, and we need the \c
+ updatePixmapLabels() function to update the preview area when
+ the icon or the icon's size has changed.
+
+ The \c NumModes and \c NumStates constants reflect \l{QIcon}'s
+ number of currently defined modes and states.
+
+ \section2 IconPreviewArea Class Implementation
+
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 0
+
+ In the constructor we create the labels displaying the headers and
+ the icon's generated pixmaps, and add them to a grid layout.
+
+ When creating the header labels, we make sure the enums \c
+ NumModes and \c NumStates defined in the \c .h file, correspond
+ with the number of labels that we create. Then if the enums at
+ some point are changed, the \c Q_ASSERT() macro will alert that this
+ part of the \c .cpp file needs to be updated as well.
+
+ If the application is built in debug mode, the \c Q_ASSERT()
+ macro will expand to
+
+ \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 0
+
+ In release mode, the macro simply disappear. The mode can be set
+ in the application's \c .pro file. One way to do so is to add an
+ option to \c qmake when building the application:
+
+ \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 1
+
+ or
+
+ \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 2
+
+ Another approach is to add this line directly to the \c .pro
+ file.
+
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 1
+ \codeline
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 2
+
+ The public \c setIcon() and \c setSize() functions change the icon
+ or the icon size, and make sure that the generated pixmaps are
+ updated.
+
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 3
+ \codeline
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 4
+
+ We use the \c createHeaderLabel() and \c createPixmapLabel()
+ functions to create the preview area's labels displaying the
+ headers and the icon's generated pixmaps. Both functions return
+ the QLabel that is created.
+
+ \snippet examples/widgets/icons/iconpreviewarea.cpp 5
+
+ We use the private \c updatePixmapLabel() function to update the
+ generated pixmaps displayed in the preview area.
+
+ For each mode, and for each state, we retrieve a pixmap using the
+ QIcon::pixmap() function, which generates a pixmap corresponding
+ to the given state, mode and size.
+
+ \section2 MainWindow Class Definition
+
+ The \c MainWindow widget consists of three main elements: an
+ images group box, an icon size group box and a preview area.
+
+ \image icons-example.png Screenshot of the Icons example
+
+ \snippet examples/widgets/icons/mainwindow.h 0
+
+ The MainWindow class inherits from QMainWindow. We reimplement the
+ constructor, and declare several private slots:
+
+ \list
+ \o The \c about() slot simply provides information about the example.
+ \o The \c changeStyle() slot changes the application's GUI style and
+ adjust the style dependent size options.
+ \o The \c changeSize() slot changes the size of the preview area's icon.
+ \o The \c changeIcon() slot updates the set of pixmaps available to the
+ icon displayed in the preview area.
+ \o The \c addImage() slot allows the user to load a new image into the
+ application.
+ \endlist
+
+ In addition we declare several private functions to simplify the
+ constructor.
+
+ \section2 MainWindow Class Implementation
+
+ \snippet examples/widgets/icons/mainwindow.cpp 0
+
+ In the constructor we first create the main window's central
+ widget and its child widgets, and put them in a grid layout. Then
+ we create the menus with their associated entries and actions.
+
+ Before we resize the application window to a suitable size, we set
+ the window title and determine the current style for the
+ application. We also enable the icon size spin box by clicking the
+ associated radio button, making the current value of the spin box
+ the icon's initial size.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 1
+
+ The \c about() slot displays a message box using the static
+ QMessageBox::about() function. In this example it displays a
+ simple box with information about the example.
+
+ The \c about() function looks for a suitable icon in four
+ locations: It prefers its parent's icon if that exists. If it
+ doesn't, the function tries the top-level widget containing
+ parent, and if that fails, it tries the active window. As a last
+ resort it uses the QMessageBox's Information icon.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 2
+
+ In the \c changeStyle() slot we first check the slot's
+ parameter. If it is false we immediately return, otherwise we find
+ out which style to change to, i.e. which action that triggered the
+ slot, using the QObject::sender() function.
+
+ This function returns the sender as a QObject pointer. Since we
+ know that the sender is a QAction object, we can safely cast the
+ QObject. We could have used a C-style cast or a C++ \c
+ static_cast(), but as a defensive programming technique we use a
+ \l qobject_cast(). The advantage is that if the object has the
+ wrong type, a null pointer is returned. Crashes due to null
+ pointers are much easier to diagnose than crashes due to unsafe
+ casts.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 3
+ \snippet examples/widgets/icons/mainwindow.cpp 4
+
+ Once we have the action, we extract the style name using
+ QAction::data(). Then we create a QStyle object using the static
+ QStyleFactory::create() function.
+
+ Although we can assume that the style is supported by the
+ QStyleFactory: To be on the safe side, we use the \c Q_ASSERT()
+ macro to check if the created style is valid before we use the
+ QApplication::setStyle() function to set the application's GUI
+ style to the new style. QApplication will automatically delete
+ the style object when a new style is set or when the application
+ exits.
+
+ The predefined icon size options provided in the application are
+ style dependent, so we need to update the labels in the icon size
+ group box and in the end call the \c changeSize() slot to update
+ the icon's size.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 5
+
+ The \c changeSize() slot sets the size for the preview area's
+ icon.
+
+ To determine the new size we first check if the spin box is
+ enabled. If it is, we extract the extent of the new size from the
+ box. If it's not, we search through the predefined size options,
+ extract the QStyle::PixelMetric and use the QStyle::pixelMetric()
+ function to determine the extent. Then we create a QSize object
+ based on the extent, and use that object to set the size of the
+ preview area's icon.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 12
+
+ The first thing we do when the \c addImage() slot is called, is to
+ show a file dialog to the user. The easiest way to create a file
+ dialog is to use QFileDialog's static functions. Here we use the
+ \l {QFileDialog::getOpenFileNames()}{getOpenFileNames()} function
+ that will return one or more existing files selected by the user.
+
+ For each of the files the file dialog returns, we add a row to the
+ table widget. The table widget is listing the images the user has
+ loaded into the application.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 13
+ \snippet examples/widgets/icons/mainwindow.cpp 14
+
+ We retrieve the image name using the QFileInfo::baseName()
+ function that returns the base name of the file without the path,
+ and create the first table widget item in the row. Then we add the
+ file's complete name to the item's data. Since an item can hold
+ several information pieces, we need to assign the file name a role
+ that will distinguish it from other data. This role can be Qt::UserRole
+ or any value above it.
+
+ We also make sure that the item is not editable by removing the
+ Qt::ItemIsEditable flag. Table items are editable by default.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 15
+ \snippet examples/widgets/icons/mainwindow.cpp 16
+ \snippet examples/widgets/icons/mainwindow.cpp 17
+
+ Then we create the second and third items in the row making the
+ default mode Normal and the default state Off. But if the \gui
+ {Guess Image Mode/State} option is checked, and the file name
+ contains "_act", "_dis", or "_sel", the modes are changed to
+ Active, Disabled, or Selected. And if the file name contains
+ "_on", the state is changed to On. The sample files in the
+ example's \c images subdirectory respect this naming convension.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 18
+ \snippet examples/widgets/icons/mainwindow.cpp 19
+
+ In the end we add the items to the associated row, and use the
+ QTableWidget::openPersistentEditor() function to create
+ comboboxes for the mode and state columns of the items.
+
+ Due to the the connection between the table widget's \l
+ {QTableWidget::itemChanged()}{itemChanged()} signal and the \c
+ changeIcon() slot, the new image is automatically converted into a
+ pixmap and made part of the set of pixmaps available to the icon
+ in the preview area. So, corresponding to this fact, we need to
+ make sure that the new image's check box is enabled.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 6
+ \snippet examples/widgets/icons/mainwindow.cpp 7
+
+ The \c changeIcon() slot is called when the user alters the set
+ of images listed in the QTableWidget, to update the QIcon object
+ rendered by the \c IconPreviewArea.
+
+ We first create a QIcon object, and then we run through the
+ QTableWidget, which lists the images the user has loaded into the
+ application.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 8
+ \snippet examples/widgets/icons/mainwindow.cpp 9
+ \snippet examples/widgets/icons/mainwindow.cpp 10
+
+ We also extract the image file's name using the
+ QTableWidgetItem::data() function. This function takes a
+ Qt::DataItemRole as an argument to retrieve the right data
+ (remember that an item can hold several pieces of information)
+ and returns it as a QVariant. Then we use the
+ QVariant::toString() function to get the file name as a QString.
+
+ To create a pixmap from the file, we need to first create an
+ image and then convert this image into a pixmap using
+ QPixmap::fromImage(). Once we have the final pixmap, we add it,
+ with its associated mode and state, to the QIcon's set of
+ available pixmaps.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 11
+
+ After running through the entire list of images, we change the
+ icon of the preview area to the one we just created.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 20
+
+ In the \c removeAllImages() slot, we simply set the table widget's
+ row count to zero, automatically removing all the images the user
+ has loaded into the application. Then we update the set of pixmaps
+ available to the preview area's icon using the \c changeIcon()
+ slot.
+
+ \image icons_images_groupbox.png Screenshot of the images group box
+
+ The \c createImagesGroupBox() function is implemented to simplify
+ the constructor. The main purpose of the function is to create a
+ QTableWidget that will keep track of the images the user has
+ loaded into the application.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 21
+
+ First we create a group box that will contain the table widget.
+ Then we create a QTableWidget and customize it to suit our
+ purposes.
+
+ We call QAbstractItemView::setSelectionMode() to prevent the user
+ from selecting items.
+
+ The QAbstractItemView::setItemDelegate() call sets the item
+ delegate for the table widget. We create a \c ImageDelegate that
+ we make the item delegate for our view.
+
+ The QItemDelegate class can be used to provide an editor for an item view
+ class that is subclassed from QAbstractItemView. Using a delegate
+ for this purpose allows the editing mechanism to be customized and
+ developed independently from the model and view.
+
+ In this example we derive \c ImageDelegate from QItemDelegate.
+ QItemDelegate usually provides line editors, while our subclass
+ \c ImageDelegate, provides comboboxes for the mode and state
+ fields.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 22
+ \snippet examples/widgets/icons/mainwindow.cpp 23
+
+ Then we customize the QTableWidget's horizontal header, and hide
+ the vertical header.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 24
+ \snippet examples/widgets/icons/mainwindow.cpp 25
+
+ At the end, we connect the QTableWidget::itemChanged() signal to
+ the \c changeIcon() slot to ensuret that the preview area is in
+ sync with the image table.
+
+ \image icons_size_groupbox.png Screenshot of the icon size group box
+
+ The \c createIconSizeGroupBox() function is called from the
+ constructor. It creates the widgets controlling the size of the
+ preview area's icon.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 26
+
+ First we create a group box that will contain all the widgets;
+ then we create the radio buttons and the spin box.
+
+ The spin box is not a regular QSpinBox but an \c IconSizeSpinBox.
+ The \c IconSizeSpinBox class inherits QSpinBox and reimplements
+ two functions: QSpinBox::textFromValue() and
+ QSpinBox::valueFromText(). The \c IconSizeSpinBox is designed to
+ handle icon sizes, e.g., "32 x 32", instead of plain integer
+ values.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 27
+
+ Then we connect all of the radio buttons
+ \l{QRadioButton::toggled()}{toggled()} signals and the spin box's
+ \l {QSpinBox::valueChanged()}{valueChanged()} signal to the \c
+ changeSize() slot to make sure that the size of the preview
+ area's icon is updated whenever the user changes the icon size.
+ In the end we put the widgets in a layout that we install on the
+ group box.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 28
+
+ In the \c createActions() function we create and customize all the
+ actions needed to implement the functionality associated with the
+ menu entries in the application.
+
+ In particular we create the \c styleActionGroup based on the
+ currently available GUI styles using
+ QStyleFactory. QStyleFactory::keys() returns a list of valid keys,
+ typically including "windows", "motif", "cde", and
+ "plastique". Depending on the platform, "windowsxp" and
+ "macintosh" may be available.
+
+ We create one action for each key, and adds the action to the
+ action group. Also, for each action, we call QAction::setData()
+ with the style name. We will retrieve it later using
+ QAction::data().
+
+ \snippet examples/widgets/icons/mainwindow.cpp 29
+
+ In the \c createMenu() function, we add the previously created
+ actions to the \gui File, \gui View and \gui Help menus.
+
+ The QMenu class provides a menu widget for use in menu bars,
+ context menus, and other popup menus. We put each menu in the
+ application's menu bar, which we retrieve using
+ QMainWindow::menuBar().
+
+ \snippet examples/widgets/icons/mainwindow.cpp 30
+
+ QWidgets have a \l{QWidget::contextMenuPolicy}{contextMenuPolicy}
+ property that controls how the widget should behave when the user
+ requests a context menu (e.g., by right-clicking). We set the
+ QTableWidget's context menu policy to Qt::ActionsContextMenu,
+ meaning that the \l{QAction}s associated with the widget should
+ appear in its context menu.
+
+ Then we add the \gui{Add Image} and \gui{Remove All Images}
+ actions to the table widget. They will then appear in the table
+ widget's context menu.
+
+ \snippet examples/widgets/icons/mainwindow.cpp 31
+
+ In the \c checkCurrentStyle() function we go through the group of
+ style actions, looking for the current GUI style.
+
+ For each action, we first extract the style name using
+ QAction::data(). Since this is only a QStyleFactory key (e.g.,
+ "macintosh"), we cannot compare it directly to the current
+ style's class name. We need to create a QStyle object using the
+ static QStyleFactory::create() function and compare the class
+ name of the created QStyle object with that of the current style.
+ As soon as we are done with a QStyle candidate, we delete it.
+
+ For all QObject subclasses that use the \c Q_OBJECT macro, the
+ class name of an object is available through its
+ \l{QObject::metaObject()}{meta-object}.
+
+ We can assume that the style is supported by
+ QStyleFactory, but to be on the safe side we use the \c
+ Q_ASSERT() macro to make sure that QStyleFactory::create()
+ returned a valid pointer.
+
+ \section2 IconSizeSpinBox Class Definition
+
+ \snippet examples/widgets/icons/iconsizespinbox.h 0
+
+ The \c IconSizeSpinBox class is a subclass of QSpinBox. A plain
+ QSpinBox can only handle integers. But since we want to display
+ the spin box's values in a more sophisticated way, we need to
+ subclass QSpinBox and reimplement the QSpinBox::textFromValue()
+ and QSpinBox::valueFromText() functions.
+
+ \image icons_size_spinbox.png Screenshot of the icon size spinbox
+
+ \section2 IconSizeSpinBox Class Implementation
+
+ \snippet examples/widgets/icons/iconsizespinbox.cpp 0
+
+ The constructor is trivial.
+
+ \snippet examples/widgets/icons/iconsizespinbox.cpp 2
+
+ QSpinBox::textFromValue() is used by the spin box whenever it
+ needs to display a value. The default implementation returns a
+ base 10 representation of the \c value parameter.
+
+ Our reimplementation returns a QString of the form "32 x 32".
+
+ \snippet examples/widgets/icons/iconsizespinbox.cpp 1
+
+ The QSpinBox::valueFromText() function is used by the spin box
+ whenever it needs to interpret text typed in by the user. Since
+ we reimplement the \c textFromValue() function we also need to
+ reimplement the \c valueFromText() function to interpret the
+ parameter text and return the associated int value.
+
+ We parse the text using a regular expression (a QRegExp). We
+ define an expression that matches one or several digits,
+ optionally followed by whitespace, an "x" or the times symbol,
+ whitespace and one or several digits again.
+
+ The first digits of the regular expression are captured using
+ parentheses. This enables us to use the QRegExp::cap() or
+ QRegExp::capturedTexts() functions to extract the matched
+ characters. If the first and second numbers of the spin box value
+ differ (e.g., "16 x 24"), we use the first number.
+
+ When the user presses \key Enter, QSpinBox first calls
+ QSpinBox::valueFromText() to interpret the text typed by the
+ user, then QSpinBox::textFromValue() to present it in a canonical
+ format (e.g., "16 x 16").
+
+ \section2 ImageDelegate Class Definition
+
+ \snippet examples/widgets/icons/imagedelegate.h 0
+
+ The \c ImageDelegate class is a subclass of QItemDelegate. The
+ QItemDelegate class provides display and editing facilities for
+ data items from a model. A single QItemDelegate object is
+ responsible for all items displayed in a item view (in our case,
+ a QTableWidget).
+
+ A QItemDelegate can be used to provide an editor for an item view
+ class that is subclassed from QAbstractItemView. Using a delegate
+ for this purpose allows the editing mechanism to be customized and
+ developed independently from the model and view.
+
+ \snippet examples/widgets/icons/imagedelegate.h 1
+
+ The default implementation of QItemDelegate creates a QLineEdit.
+ Since we want the editor to be a QComboBox, we need to subclass
+ QItemDelegate and reimplement the QItemDelegate::createEditor(),
+ QItemDelegate::setEditorData() and QItemDelegate::setModelData()
+ functions.
+
+ \snippet examples/widgets/icons/imagedelegate.h 2
+
+ The \c emitCommitData() slot is used to emit the
+ QImageDelegate::commitData() signal with the appropriate
+ argument.
+
+ \section2 ImageDelegate Class Implementation
+
+ \snippet examples/widgets/icons/imagedelegate.cpp 0
+
+ The constructor is trivial.
+
+ \snippet examples/widgets/icons/imagedelegate.cpp 1
+
+ The default QItemDelegate::createEditor() implementation returns
+ the widget used to edit the item specified by the model and item
+ index for editing. The parent widget and style option are used to
+ control the appearance of the editor widget.
+
+ Our reimplementation create and populate a combobox instead of
+ the default line edit. The contents of the combobox depends on
+ the column in the table for which the editor is requested. Column
+ 1 contains the QIcon modes, whereas column 2 contains the QIcon
+ states.
+
+ In addition, we connect the combobox's \l
+ {QComboBox::activated()}{activated()} signal to the \c
+ emitCommitData() slot to emit the
+ QAbstractItemDelegate::commitData() signal whenever the user
+ chooses an item using the combobox. This ensures that the rest of
+ the application notices the change and updates itself.
+
+ \snippet examples/widgets/icons/imagedelegate.cpp 2
+
+ The QItemDelegate::setEditorData() function is used by
+ QTableWidget to transfer data from a QTableWidgetItem to the
+ editor. The data is stored as a string; we use
+ QComboBox::findText() to locate it in the combobox.
+
+ Delegates work in terms of models, not items. This makes it
+ possible to use them with any item view class (e.g., QListView,
+ QListWidget, QTreeView, etc.). The transition between model and
+ items is done implicitly by QTableWidget; we don't need to worry
+ about it.
+
+ \snippet examples/widgets/icons/imagedelegate.cpp 3
+
+ The QItemDelegate::setEditorData() function is used by QTableWidget
+ to transfer data back from the editor to the \l{QTableWidgetItem}.
+
+ \snippet examples/widgets/icons/imagedelegate.cpp 4
+
+ The \c emitCommitData() slot simply emit the
+ QAbstractItemDelegate::commitData() signal for the editor that
+ triggered the slot. This signal must be emitted when the editor
+ widget has completed editing the data, and wants to write it back
+ into the model.
+*/
diff --git a/doc/src/examples/imagecomposition.qdoc b/doc/src/examples/imagecomposition.qdoc
new file mode 100644
index 0000000..8cba805
--- /dev/null
+++ b/doc/src/examples/imagecomposition.qdoc
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/imagecomposition
+ \title Image Composition Example
+
+ The Image Composition example lets the user combine images
+ together using any composition mode supported by QPainter, described
+ in detail in \l{QPainter#Composition Modes}{Composition Modes}.
+
+ \image imagecomposition-example.png
+
+ \section1 Setting Up The Resource File
+
+ The Image Composition example requires two source images,
+ \e butterfly.png and \e checker.png that are embedded within
+ \e imagecomposition.qrc. The file contains the following code:
+
+ \quotefile examples/painting/imagecomposition/imagecomposition.qrc
+
+ For more information on resource files, see \l{The Qt Resource System}.
+
+ \section1 ImageComposer Class Definition
+
+ The \c ImageComposer class is a subclass of QWidget that implements three
+ private slots, \c chooseSource(), \c chooseDestination(), and
+ \c recalculateResult().
+
+ \snippet examples/painting/imagecomposition/imagecomposer.h 0
+
+ In addition, \c ImageComposer consists of five private functions,
+ \c addOp(), \c chooseImage(), \c loadImage(), \c currentMode(), and
+ \c imagePos(), as well as private instances of QToolButton, QComboBox,
+ QLabel, and QImage.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.h 1
+
+ \section1 ImageComposer Class Implementation
+
+ We declare a QSize object, \c resultSize, as a static constant with width
+ and height equal to 200.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 0
+
+ Within the constructor, we instantiate a QToolButton object,
+ \c sourceButton and set its \l{QAbstractButton::setIconSize()}{iconSize}
+ property to \c resultSize. The \c operatorComboBox is instantiated and
+ then populated using the \c addOp() function. This function accepts a
+ QPainter::CompositionMode, \a mode, and a QString, \a name, representing
+ the name of the composition mode.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 1
+
+ The \c destinationButton is instantiated and its
+ \l{QAbstractButton::setIconSize()}{iconSize} property is set to
+ \c resultSize as well. The \l{QLabel}s \c equalLabel and \c resultLabel
+ are created and \c{resultLabel}'s \l{QWidget::setMinimumWidth()}
+ {minimumWidth} is set.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 2
+
+ We connect the following signals to their corresponding slots:
+ \list
+ \o \c{sourceButton}'s \l{QPushButton::clicked()}{clicked()} signal is
+ connected to \c chooseSource(),
+ \o \c{operatorComboBox}'s \l{QComboBox::activated()}{activated()}
+ signal is connected to \c recalculateResult(), and
+ \o \c{destinationButton}'s \l{QToolButton::clicked()}{clicked()} signal
+ is connected to \c chooseDestination().
+ \endlist
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 3
+
+ A QGridLayout, \c mainLayout, is used to place all the widgets. Note
+ that \c{mainLayout}'s \l{QLayout::setSizeConstraint()}{sizeConstraint}
+ property is set to QLayout::SetFixedSize, which means that
+ \c{ImageComposer}'s size cannot be resized at all.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 4
+
+ We create a QImage, \c resultImage, and we invoke \c loadImage() twice
+ to load both the image files in our \e imagecomposition.qrc file. Then,
+ we set the \l{QWidget::setWindowTitle()}{windowTitle} property to
+ "Image Composition".
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 5
+
+ The \c chooseSource() and \c chooseDestination() functions are
+ convenience functions that invoke \c chooseImage() with specific
+ parameters.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 6
+ \codeline
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 7
+
+ The \c chooseImage() function loads an image of the user's choice,
+ depending on the \a title, \a image, and \a button.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 10
+
+ The \c recalculateResult() function is used to calculate amd display the
+ result of combining the two images together with the user's choice of
+ composition mode.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 8
+
+ The \c addOp() function adds an item to the \c operatorComboBox using
+ \l{QComboBox}'s \l{QComboBox::addItem()}{addItem} function. This function
+ accepts a QPainter::CompositionMode, \a mode, and a QString, \a name. The
+ rectangle is filled with Qt::Transparent and both the \c sourceImage and
+ \c destinationImage are painted, before displaying it on \c resultLabel.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 9
+
+ The \c loadImage() function paints a transparent background using
+ \l{QPainter::fillRect()}{fillRect()} and draws \c image in a
+ centralized position using \l{QPainter::drawImage()}{drawImage()}.
+ This \c image is then set as the \c{button}'s icon.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 11
+
+ The \c currentMode() function returns the composition mode currently
+ selected in \c operatorComboBox.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 12
+
+ We use the \c imagePos() function to ensure that images loaded onto the
+ QToolButton objects, \c sourceButton and \c destinationButton, are
+ centralized.
+
+ \snippet examples/painting/imagecomposition/imagecomposer.cpp 13
+
+ \section1 The \c main() Function
+
+ The \c main() function instantiates QApplication and \c ImageComposer
+ and invokes its \l{QWidget::show()}{show()} function.
+
+ \snippet examples/painting/imagecomposition/main.cpp 0
+
+ */
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
new file mode 100644
index 0000000..6881673
--- /dev/null
+++ b/doc/src/examples/imageviewer.qdoc
@@ -0,0 +1,340 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/imageviewer
+ \title Image Viewer Example
+
+ The example shows how to combine QLabel and QScrollArea to
+ display an image. QLabel is typically used for displaying text,
+ but it can also display an image. QScrollArea provides a
+ scrolling view around another widget. If the child widget exceeds
+ the size of the frame, QScrollArea automatically provides scroll
+ bars.
+
+ The example demonstrates how QLabel's ability to scale its
+ contents (QLabel::scaledContents), and QScrollArea's ability to
+ automatically resize its contents (QScrollArea::widgetResizable),
+ can be used to implement zooming and scaling features. In
+ addition the example shows how to use QPainter to print an image.
+
+ \image imageviewer-example.png Screenshot of the Image Viewer example
+
+ With the Image Viewer application, the users can view an image of
+ their choice. The \gui File menu gives the user the possibility
+ to:
+
+ \list
+ \o \gui{Open...} - Open an image file
+ \o \gui{Print...} - Print an image
+ \o \gui{Exit} - Exit the application
+ \endlist
+
+ Once an image is loaded, the \gui View menu allows the users to:
+
+ \list
+ \o \gui{Zoom In} - Scale the image up by 25%
+ \o \gui{Zoom Out} - Scale the image down by 25%
+ \o \gui{Normal Size} - Show the image at its original size
+ \o \gui{Fit to Window} - Stretch the image to occupy the entire window
+ \endlist
+
+ In addition the \gui Help menu provides the users with information
+ about the Image Viewer example in particular, and about Qt in
+ general.
+
+ \section1 ImageViewer Class Definition
+
+ \snippet examples/widgets/imageviewer/imageviewer.h 0
+
+ The \c ImageViewer class inherits from QMainWindow. We reimplement
+ the constructor, and create several private slots to facilitate
+ the menu entries. In addition we create four private functions.
+
+ We use \c createActions() and \c createMenus() when constructing
+ the \c ImageViewer widget. We use the \c updateActions() function
+ to update the menu entries when a new image is loaded, or when
+ the \gui {Fit to Window} option is toggled. The zoom slots use \c
+ scaleImage() to perform the zooming. In turn, \c
+ scaleImage() uses \c adjustScrollBar() to preserve the focal point after
+ scaling an image.
+
+ \section1 ImageViewer Class Implementation
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 0
+
+ In the constructor we first create the label and the scroll area.
+
+ We set \c {imageLabel}'s size policy to \l
+ {QSizePolicy::Ignored}{ignored}, making the users able to scale
+ the image to whatever size they want when the \gui {Fit to Window}
+ option is turned on. Otherwise, the default size polizy (\l
+ {QSizePolicy::Preferred}{preferred}) will make scroll bars appear
+ when the scroll area becomes smaller than the label's minimum size
+ hint.
+
+ We ensure that the label will scale its contents to fill all
+ available space, to enable the image to scale properly when
+ zooming. If we omitted to set the \c {imageLabel}'s \l
+ {QLabel::scaledContents}{scaledContents} property, zooming in
+ would enlarge the QLabel, but leave the pixmap at
+ its original size, exposing the QLabel's background.
+
+ We make \c imageLabel the scroll area's child widget, and we make
+ \c scrollArea the central widget of the QMainWindow. At the end
+ we create the associated actions and menus, and customize the \c
+ {ImageViewer}'s appearance.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 1
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 2
+
+ In the \c open() slot, we show a file dialog to the user. The
+ easiest way to create a QFileDialog is to use the static
+ convenience functions. QFileDialog::getOpenFileName() returns an
+ existing file selected by the user. If the user presses \gui
+ Cancel, QFileDialog returns an empty string.
+
+ Unless the file name is a empty string, we check if the file's
+ format is an image format by constructing a QImage which tries to
+ load the image from the file. If the constructor returns a null
+ image, we use a QMessageBox to alert the user.
+
+ The QMessageBox class provides a modal dialog with a short
+ message, an icon, and some buttons. As with QFileDialog the
+ easiest way to create a QMessageBox is to use its static
+ convenience functions. QMessageBox provides a range of different
+ messages arranged along two axes: severity (question,
+ information, warning and critical) and complexity (the number of
+ necessary response buttons). In this particular example an
+ information message with an \gui OK button (the default) is
+ sufficient, since the message is part of a normal operation.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 3
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 4
+
+ If the format is supported, we display the image in \c imageLabel
+ by setting the label's \l {QLabel::pixmap}{pixmap}. Then we enable
+ the \gui Print and \gui {Fit to Window} menu entries and update
+ the rest of the view menu entries. The \gui Open and \gui Exit
+ entries are enabled by default.
+
+ If the \gui {Fit to Window} option is turned off, the
+ QScrollArea::widgetResizable property is \c false and it is
+ our responsibility (not QScrollArea's) to give the QLabel a
+ reasonable size based on its contents. We call
+ \{QWidget::adjustSize()}{adjustSize()} to achieve this, which is
+ essentially the same as
+
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 0
+
+ In the \c print() slot, we first make sure that an image has been
+ loaded into the application:
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 5
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 6
+
+ If the application is built in debug mode, the \c Q_ASSERT() macro
+ will expand to
+
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 1
+
+ In release mode, the macro simply disappear. The mode can be set
+ in the application's \c .pro file. One way to do so is to add an
+ option to \gui qmake when building the appliction:
+
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 2
+
+ or
+
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 3
+
+ Another approach is to add this line directly to the \c .pro
+ file.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 7
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 8
+
+ Then we present a print dialog allowing the user to choose a
+ printer and to set a few options. We construct a painter with a
+ QPrinter as the paint device. We set the painter's window
+ and viewport in such a way that the image is as large as possible
+ on the paper, but without altering its
+ \l{Qt::KeepAspectRatio}{aspect ratio}.
+
+ In the end we draw the pixmap at position (0, 0).
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 9
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 10
+
+ We implement the zooming slots using the private \c scaleImage()
+ function. We set the scaling factors to 1.25 and 0.8,
+ respectively. These factor values ensure that a \gui {Zoom In}
+ action and a \gui {Zoom Out} action will cancel each other (since
+ 1.25 * 0.8 == 1), and in that way the normal image size can be
+ restored using the zooming features.
+
+ The screenshots below show an image in its normal size, and the
+ same image after zooming in:
+
+ \table
+ \row
+ \o \inlineimage imageviewer-original_size.png
+ \o \inlineimage imageviewer-zoom_in_1.png
+ \o \inlineimage imageviewer-zoom_in_2.png
+ \endtable
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 11
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 12
+
+ When zooming, we use the QLabel's ability to scale its contents.
+ Such scaling doesn't change the actual size hint of the contents.
+ And since the \l {QLabel::adjustSize()}{adjustSize()} function
+ use those size hint, the only thing we need to do to restore the
+ normal size of the currently displayed image is to call \c
+ adjustSize() and reset the scale factor to 1.0.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 13
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 14
+
+ The \c fitToWindow() slot is called each time the user toggled
+ the \gui {Fit to Window} option. If the slot is called to turn on
+ the option, we tell the scroll area to resize its child widget
+ with the QScrollArea::setWidgetResizable() function. Then we
+ disable the \gui {Zoom In}, \gui {Zoom Out} and \gui {Normal
+ Size} menu entries using the private \c updateActions() function.
+
+ If the \l {QScrollArea::widgetResizable} property is set to \c
+ false (the default), the scroll area honors the size of its child
+ widget. If this property is set to \c true, the scroll area will
+ automatically resize the widget in order to avoid scroll bars
+ where they can be avoided, or to take advantage of extra space.
+ But the scroll area will honor the minimum size hint of its child
+ widget independent of the widget resizable property. So in this
+ example we set \c {imageLabel}'s size policy to \l
+ {QSizePolicy::Ignored}{ignored} in the constructor, to avoid that
+ scroll bars appear when the scroll area becomes smaller than the
+ label's minimum size hint.
+
+ The screenshots below shows an image in its normal size, and the
+ same image with the \gui {Fit to window} option turned on.
+ Enlarging the window will stretch the image further, as shown in
+ the third screenshot.
+
+ \table
+ \row
+ \o \inlineimage imageviewer-original_size.png
+ \o \inlineimage imageviewer-fit_to_window_1.png
+ \o \inlineimage imageviewer-fit_to_window_2.png
+ \endtable
+
+ If the slot is called to turn off the option, the
+ {QScrollArea::setWidgetResizable} property is set to \c false. We
+ also restore the image pixmap to its normal size by adjusting the
+ label's size to its content. And in the end we update the view
+ menu entries.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 15
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 16
+
+ We implement the \c about() slot to create a message box
+ describing what the example is designed to show.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 17
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 18
+
+ In the private \c createAction() function, we create the
+ actions providing the application features.
+
+ We assign a short-cut key to each action and connect them to the
+ appropiate slots. We only enable the \c openAct and \c exitAxt at
+ the time of creation, the others are updated once an image has
+ been loaded into the application. In addition we make the \c
+ fitToWindowAct \l {QAction::checkable}{checkable}.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 19
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 20
+
+ In the private \c createMenu() function, we add the previously
+ created actions to the \gui File, \gui View and \gui Help menus.
+
+ The QMenu class provides a menu widget for use in menu bars,
+ context menus, and other popup menus. The QMenuBar class provides
+ a horizontal menu bar that consists of a list of pull-down menu
+ items. So at the end we put the menus in the \c {ImageViewer}'s
+ menu bar which we retrieve with the QMainWindow::menuBar()
+ function.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 21
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 22
+
+ The private \c updateActions() function enables or disables the
+ \gui {Zoom In}, \gui {Zoom Out} and \gui {Normal Size} menu
+ entries depending on whether the \gui {Fit to Window} option is
+ turned on or off.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 23
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 24
+
+ In \c scaleImage(), we use the \c factor parameter to calculate
+ the new scaling factor for the displayed image, and resize \c
+ imageLabel. Since we set the
+ \l{QLabel::scaledContents}{scaledContents} property to \c true in
+ the constructor, the call to QWidget::resize() will scale the
+ image displayed in the label. We also adjust the scroll bars to
+ preserve the focal point of the image.
+
+ At the end, if the scale factor is less than 33.3% or greater
+ than 300%, we disable the respective menu entry to prevent the
+ image pixmap from becoming too large, consuming too much
+ resources in the window system.
+
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 25
+ \snippet examples/widgets/imageviewer/imageviewer.cpp 26
+
+ Whenever we zoom in or out, we need to adjust the scroll bars in
+ consequence. It would have been tempting to simply call
+
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 4
+
+ but this would make the top-left corner the focal point, not the
+ center. Therefore we need to take into account the scroll bar
+ handle's size (the \l{QScrollBar::pageStep}{page step}).
+*/
diff --git a/doc/src/examples/itemviewspuzzle.qdoc b/doc/src/examples/itemviewspuzzle.qdoc
new file mode 100644
index 0000000..99ef7d4
--- /dev/null
+++ b/doc/src/examples/itemviewspuzzle.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/puzzle
+ \title Item Views Puzzle Example
+
+ The Puzzle example shows how to enable drag and drop with a custom model
+ to allow items to be transferred between a view and another widget.
+
+ \image itemviewspuzzle-example.png
+
+ This example is an implementation of a simple jigsaw puzzle game using the
+ built-in support for drag and drop provided by Qt's model/view framework.
+ The \l{Drag and Drop Puzzle Example}{Drag and Drop Puzzle} example shows
+ many of the same features, but takes an alternative approach that uses Qt's
+ drag and drop API at the application level to handle drag and drop
+ operations.
+*/
diff --git a/doc/src/examples/licensewizard.qdoc b/doc/src/examples/licensewizard.qdoc
new file mode 100644
index 0000000..a702c06
--- /dev/null
+++ b/doc/src/examples/licensewizard.qdoc
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/licensewizard
+ \title License Wizard Example
+
+ The License Wizard example shows how to implement complex wizards in
+ Qt.
+
+ \image licensewizard-example.png Screenshot of the License Wizard example
+
+ Most wizards have a linear structure, with page 1 followed by
+ page 2 and so on until the last page. The
+ \l{dialogs/classwizard}{Class Wizard} example shows how to create
+ such wizards.
+
+ Some wizards are more complex in that they allow different
+ traversal paths based on the information provided by the user.
+ The License Wizard example illustrates this. It provides five
+ wizard pages; depending on which options are selected, the user
+ can reach different pages.
+
+ \image licensewizard-flow.png The License Wizard pages
+
+ The example consists of the following classes:
+
+ \list
+ \o \c LicenseWizard inherits QWizard and implements a non-linear
+ five-page wizard that leads the user through the process of
+ choosing a license agreement.
+ \o \c IntroPage, \c EvaluatePage, \c RegisterPage, \c
+ DetailsPage, and \c ConclusionPage are QWizardPage subclasses
+ that implement the wizard pages.
+ \endlist
+
+ \section1 The LicenseWizard Class
+
+ The \c LicenseWizard class derives from QWizard and provides a
+ five-page wizard that guides the user through the process of
+ registering their copy of a fictitious software product. Here's
+ the class definition:
+
+ \snippet examples/dialogs/licensewizard/licensewizard.h 1
+
+ The class's public API is limited to a constructor and an enum.
+ The enum defines the IDs associated with the various pages:
+
+ \table
+ \header \o Class name \o Enum value \o Page ID
+ \row \o \c IntroPage \o \c Page_Intro \o 0
+ \row \o \c EvaluatePage \o \c Page_Evaluate \o 1
+ \row \o \c RegisterPage \o \c Page_Register \o 2
+ \row \o \c DetailsPage \o \c Page_Details \o 3
+ \row \o \c ConclusionPage \o \c Page_Conclusion \o 4
+ \endtable
+
+ For this example, the IDs are arbitrary. The only constraints are
+ that they must be unique and different from -1. IDs allow us to
+ refer to pages.
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 2
+
+ In the constructor, we create the five pages, insert them into
+ the wizard using QWizard::setPage(), and set \c Page_Intro to be
+ the first page.
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 3
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 4
+
+ We set the style to \l{QWizard::}{ModernStyle} on all platforms
+ except Mac OS X,
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 5
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 6
+
+ We configure the QWizard to show a \gui Help button, which is
+ connected to our \c showHelp() slot. We also set the
+ \l{QWizard::}{LogoPixmap} for all pages that have a header (i.e.,
+ \c EvaluatePage, \c RegisterPage, and \c DetailsPage).
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 9
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 11
+ \dots
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 13
+
+ In \c showHelp(), we display help texts that are appropiate for
+ the current page. If the user clicks \gui Help twice for the same
+ page, we say, "Sorry, I already gave what help I could. Maybe you
+ should try asking a human?"
+
+ \section1 The IntroPage Class
+
+ The pages are defined in \c licensewizard.h and implemented in \c
+ licensewizard.cpp, together with \c LicenseWizard.
+
+ Here's the definition and implementation of \c{IntroPage}:
+
+ \snippet examples/dialogs/licensewizard/licensewizard.h 4
+ \codeline
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 16
+
+ A page inherits from QWizardPage. We set a
+ \l{QWizardPage::}{title} and a
+ \l{QWizard::WatermarkPixmap}{watermark pixmap}. By not setting
+ any \l{QWizardPage::}{subTitle}, we ensure that no header is
+ displayed for this page. (On Windows, it is customary for wizards
+ to display a watermark pixmap on the first and last pages, and to
+ have a header on the other pages.)
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 17
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 19
+
+ The \c nextId() function returns the ID for \c EvaluatePage if
+ the \gui{Evaluate the product for 30 days} option is checked;
+ otherwise it returns the ID for \c RegisterPage.
+
+ \section1 The EvaluatePage Class
+
+ The \c EvaluatePage is slightly more involved:
+
+ \snippet examples/dialogs/licensewizard/licensewizard.h 5
+ \codeline
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 20
+ \dots
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 21
+ \dots
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 22
+
+ First, we set the page's \l{QWizardPage::}{title}
+ and \l{QWizardPage::}{subTitle}.
+
+ Then we create the child widgets, create \l{Registering and Using
+ Fields}{wizard fields} associated with them, and put them into
+ layouts. The fields are created with an asterisk (\c
+ *) next to their name. This makes them \l{mandatory fields}, that
+ is, fields that must be filled before the user can press the
+ \gui Next button (\gui Continue on Mac OS X). The fields' values
+ can be accessed from any other page using QWizardPage::field().
+
+ Resetting the page amounts to clearing the two text fields.
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 23
+
+ The next page is always the \c ConclusionPage.
+
+ \section1 The ConclusionPage Class
+
+ The \c RegisterPage and \c DetailsPage are very similar to \c
+ EvaluatePage. Let's go directly to the \c ConclusionPage:
+
+ \snippet examples/dialogs/licensewizard/licensewizard.h 6
+
+ This time, we reimplement QWizardPage::initializePage() and
+ QWidget::setVisible(), in addition to
+ \l{QWizardPage::}{nextId()}. We also declare a private slot:
+ \c printButtonClicked().
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 18
+
+ The default implementation of QWizardPage::nextId() returns
+ the page with the next ID, or -1 if the current page has the
+ highest ID. This behavior would work here, because \c
+ Page_Conclusion equals 5 and there is no page with a higher ID,
+ but to avoid relying on such subtle behavior, we reimplement
+ \l{QWizardPage::}{nextId()} to return -1.
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 27
+
+ We use QWizard::hasVisitedPage() to determine the type of
+ license agreement the user has chosen. If the user filled the \c
+ EvaluatePage, the license text refers to an Evaluation License
+ Agreement. If the user filled the \c DetailsPage, the license
+ text is a First-Time License Agreement. If the user provided an
+ upgrade key and skipped the \c DetailsPage, the license text is
+ an Update License Agreement.
+
+ \snippet examples/dialogs/licensewizard/licensewizard.cpp 28
+
+ We want to display a \gui Print button in the wizard when the \c
+ ConclusionPage is up. One way to accomplish this is to reimplement
+ QWidget::setVisible():
+
+ \list
+ \o If the page is shown, we set the \l{QWizard::}{CustomButton1} button's
+ text to \gui{\underline{P}rint}, we enable the \l{QWizard::}{HaveCustomButton1}
+ option, and we connect the QWizard's \l{QWizard::}{customButtonClicked()}
+ signal to our \c printButtonClicked() slot.
+ \o If the page is hidden, we disable the \l{QWizard::}{HaveCustomButton1}
+ option and disconnect the \c printButtonClicked() slot.
+ \endlist
+
+ \sa QWizard, {Class Wizard Example}, {Trivial Wizard Example}
+*/
diff --git a/doc/src/examples/lineedits.qdoc b/doc/src/examples/lineedits.qdoc
new file mode 100644
index 0000000..ee702ae
--- /dev/null
+++ b/doc/src/examples/lineedits.qdoc
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/lineedits
+ \title Line Edits Example
+
+ The Line Edits example demonstrates the many ways that QLineEdit can be used, and
+ shows the effects of various properties and validators on the input and output
+ supplied by the user.
+
+ \image lineedits-example.png
+
+ The example consists of a single \c Window class, containing a selection of
+ line edits with different input constraints and display properties that can be
+ changed by selecting items from comboboxes. Presenting these together helps
+ developers choose suitable properties to use with line edits, and makes it easy
+ to compare the effects of each validator on user input.
+
+ \section1 Window Class Definition
+
+ The \c Window class inherits QWidget and contains a constructor and several
+ slots:
+
+ \snippet examples/widgets/lineedits/window.h 0
+
+ The slots are used to update the type of validator used for a given line edit when
+ a new validator has been selected in the associated combobox. The line edits
+ are stored in the window for use in these slots.
+
+ \section1 Window Class Implementation
+
+ The \c Window constructor is used to set up the line edits, validators,
+ and comboboxes, connect signals from the comboboxes to slots in the \c Window
+ class, and arrange the child widgets in layouts.
+
+ We begin by constructing a \l{QGroupBox}{group box} to hold a label, combobox,
+ and line edit so that we can demonstrate the QLineEdit::echoMode property:
+
+ \snippet examples/widgets/lineedits/window.cpp 0
+
+ At this point, none of these widgets have been arranged in layouts. Eventually,
+ the \c echoLabel, \c echoComboBox, and \c echoLineEdit will be placed in a
+ vertical layout inside the \c echoGroup group box.
+
+ Similarly, we construct group boxes and collections of widgets to show the
+ effects of QIntValidator and QDoubleValidator on a line edit's contents:
+
+ \snippet examples/widgets/lineedits/window.cpp 1
+
+ Text alignment is demonstrated by another group of widgets:
+
+ \snippet examples/widgets/lineedits/window.cpp 2
+
+ QLineEdit supports the use of \l{QLineEdit::inputMask}{input masks}.
+ These only allow the user to type characters into the line edit that
+ follow a simple specification. We construct a group of widgets to
+ demonstrate a selection of predefined masks:
+
+ \snippet examples/widgets/lineedits/window.cpp 3
+
+ Another useful feature of QLineEdit is its ability to make its contents
+ read-only. This property is used to control access to a line edit in the
+ following group of widgets:
+
+ \snippet examples/widgets/lineedits/window.cpp 4
+
+ Now that all the child widgets have been constructed, we connect signals
+ from the comboboxes to slots in the \c Window object:
+
+ \snippet examples/widgets/lineedits/window.cpp 5
+
+ Each of these connections use the QComboBox::activated() signal that
+ supplies an integer to the slot. This will be used to efficiently
+ make changes to the appropriate line edit in each slot.
+
+ We place each combobox, line edit, and label in a layout for each group
+ box, beginning with the layout for the \c echoGroup group box:
+
+ \snippet examples/widgets/lineedits/window.cpp 6
+
+ The other layouts are constructed in the same way:
+
+ \snippet examples/widgets/lineedits/window.cpp 7
+
+ Finally, we place each group box in a grid layout for the \c Window object
+ and set the window title:
+
+ \snippet examples/widgets/lineedits/window.cpp 8
+
+ The slots respond to signals emitted when the comboboxes are changed by the
+ user.
+
+ When the combobox for the \gui{Echo} group box is changed, the \c echoChanged()
+ slot is called:
+
+ \snippet examples/widgets/lineedits/window.cpp 9
+
+ The slot updates the line edit in the same group box to use an echo mode that
+ corresponds to the entry described in the combobox.
+
+ When the combobox for the \gui{Validator} group box is changed, the
+ \c validatorChanged() slot is called:
+
+ \snippet examples/widgets/lineedits/window.cpp 10
+
+ The slot either creates a new validator for the line edit to use, or it removes
+ the validator in use by calling QLineEdit::setValidator() with a zero pointer.
+ We clear the line edit in this case to ensure that the new validator is
+ initially given valid input to work with.
+
+ When the combobox for the \gui{Alignment} group box is changed, the
+ \c alignmentChanged() slot is called:
+
+ \snippet examples/widgets/lineedits/window.cpp 11
+
+ This changes the way that text is displayed in the line edit to correspond with
+ the description selected in the combobox.
+
+ The \c inputMaskChanged() slot handles changes to the combobox in the
+ \gui{Input Mask} group box:
+
+ \snippet examples/widgets/lineedits/window.cpp 12
+
+ Each entry in the relevant combobox is associated with an input mask. We set
+ a new mask by calling the QLineEdit::setMask() function with a suitable string;
+ the mask is disabled if an empty string is used.
+
+ The \c accessChanged() slot handles changes to the combobox in the
+ \gui{Access} group box:
+
+ \snippet examples/widgets/lineedits/window.cpp 13
+
+ Here, we simply associate the \gui{False} and \gui{True} entries in the combobox
+ with \c false and \c true values to be passed to QLineEdit::setReadOnly(). This
+ allows the user to enable and disable input to the line edit.
+*/
diff --git a/doc/src/examples/localfortuneclient.qdoc b/doc/src/examples/localfortuneclient.qdoc
new file mode 100644
index 0000000..b4489b1
--- /dev/null
+++ b/doc/src/examples/localfortuneclient.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example ipc/localfortuneclient
+ \title Local Fortune Client Example
+
+ The Local Fortune Client example shows how to create a client for a simple
+ local service using QLocalSocket. It is intended to be run alongside the
+ \l{ipc/localfortuneserver}{Local Fortune Server} example.
+
+ \image localfortuneclient-example.png Screenshot of the Local Fortune Client example
+
+*/
diff --git a/doc/src/examples/localfortuneserver.qdoc b/doc/src/examples/localfortuneserver.qdoc
new file mode 100644
index 0000000..3b2395c
--- /dev/null
+++ b/doc/src/examples/localfortuneserver.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example ipc/localfortuneserver
+ \title Local Fortune Server Example
+
+ The Local Fortune Server example shows how to create a server for a simple
+ local service. It is intended to be run alongside the
+ \l{ipc/localfortuneclient}{Local Fortune Client} example
+
+ \image localfortuneserver-example.png Screenshot of the Local Fortune Server example
+ */
diff --git a/doc/src/examples/loopback.qdoc b/doc/src/examples/loopback.qdoc
new file mode 100644
index 0000000..b100f71
--- /dev/null
+++ b/doc/src/examples/loopback.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/loopback
+ \title Loopback Example
+
+ The Loopback example shows how to communicate between simple clients and servers on a local
+ host.
+
+ \image loopback-example.png
+*/
diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc
new file mode 100644
index 0000000..d2a3ee1
--- /dev/null
+++ b/doc/src/examples/mandelbrot.qdoc
@@ -0,0 +1,382 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example threads/mandelbrot
+ \title Mandelbrot Example
+
+ The Mandelbrot example shows how to use a worker thread to
+ perform heavy computations without blocking the main thread's
+ event loop.
+
+ The heavy computation here is the Mandelbrot set, probably the
+ world's most famous fractal. These days, while sophisticated
+ programs such as \l{XaoS} that provide real-time zooming in the
+ Mandelbrot set, the standard Mandelbrot algorithm is just slow
+ enough for our purposes.
+
+ \image mandelbrot-example.png Screenshot of the Mandelbrot example
+
+ In real life, the approach described here is applicable to a
+ large set of problems, including synchronous network I/O and
+ database access, where the user interface must remain responsive
+ while some heavy operation is taking place. The \l
+ network/blockingfortuneclient example shows the same principle at
+ work in a TCP client.
+
+ The Mandelbrot application supports zooming and scrolling using
+ the mouse or the keyboard. To avoid freezing the main thread's
+ event loop (and, as a consequence, the application's user
+ interface), we put all the fractal computation in a separate
+ worker thread. The thread emits a signal when it is done
+ rendering the fractal.
+
+ During the time where the worker thread is recomputing the
+ fractal to reflect the new zoom factor position, the main thread
+ simply scales the previously rendered pixmap to provide immediate
+ feedback. The result doesn't look as good as what the worker
+ thread eventually ends up providing, but at least it makes the
+ application more responsive. The sequence of screenshots below
+ shows the original image, the scaled image, and the rerendered
+ image.
+
+ \table
+ \row
+ \o \inlineimage mandelbrot_zoom1.png
+ \o \inlineimage mandelbrot_zoom2.png
+ \o \inlineimage mandelbrot_zoom3.png
+ \endtable
+
+ Similarly, when the user scrolls, the previous pixmap is scrolled
+ immediately, revealing unpainted areas beyond the edge of the
+ pixmap, while the image is rendered by the worker thread.
+
+ \table
+ \row
+ \o \inlineimage mandelbrot_scroll1.png
+ \o \inlineimage mandelbrot_scroll2.png
+ \o \inlineimage mandelbrot_scroll3.png
+ \endtable
+
+ The application consists of two classes:
+
+ \list
+ \o \c RenderThread is a QThread subclass that renders
+ the Mandelbrot set.
+ \o \c MandelbrotWidget is a QWidget subclass that shows the
+ Mandelbrot set on screen and lets the user zoom and scroll.
+ \endlist
+
+ If you are not already familiar with Qt's thread support, we
+ recommend that you start by reading the \l{Thread Support in Qt}
+ overview.
+
+ \section1 RenderThread Class Definition
+
+ We'll start with the definition of the \c RenderThread class:
+
+ \snippet examples/threads/mandelbrot/renderthread.h 0
+
+ The class inherits QThread so that it gains the ability to run in
+ a separate thread. Apart from the constructor and destructor, \c
+ render() is the only public function. Whenever the thread is done
+ rendering an image, it emits the \c renderedImage() signal.
+
+ The protected \c run() function is reimplemented from QThread. It
+ is automatically called when the thread is started.
+
+ In the \c private section, we have a QMutex, a QWaitCondition,
+ and a few other data members. The mutex protects the other data
+ member.
+
+ \section1 RenderThread Class Implementation
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 0
+
+ In the constructor, we initialize the \c restart and \c abort
+ variables to \c false. These variables control the flow of the \c
+ run() function.
+
+ We also initialize the \c colormap array, which contains a series
+ of RGB colors.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 1
+
+ The destructor can be called at any point while the thread is
+ active. We set \c abort to \c true to tell \c run() to stop
+ running as soon as possible. We also call
+ QWaitCondition::wakeOne() to wake up the thread if it's sleeping.
+ (As we will see when we review \c run(), the thread is put to
+ sleep when it has nothing to do.)
+
+ The important thing to notice here is that \c run() is executed
+ in its own thread (the worker thread), whereas the \c
+ RenderThread constructor and destructor (as well as the \c
+ render() function) are called by the thread that created the
+ worker thread. Therefore, we need a mutex to protect accesses to
+ the \c abort and \c condition variables, which might be accessed
+ at any time by \c run().
+
+ At the end of the destructor, we call QThread::wait() to wait
+ until \c run() has exited before the base class destructor is
+ invoked.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 2
+
+ The \c render() function is called by the \c MandelbrotWidget
+ whenever it needs to generate a new image of the Mandelbrot set.
+ The \c centerX, \c centerY, and \c scaleFactor parameters specify
+ the portion of the fractal to render; \c resultSize specifies the
+ size of the resulting QImage.
+
+ The function stores the parameters in member variables. If the
+ thread isn't already running, it starts it; otherwise, it sets \c
+ restart to \c true (telling \c run() to stop any unfinished
+ computation and start again with the new parameters) and wakes up
+ the thread, which might be sleeping.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 3
+
+ \c run() is quite a big function, so we'll break it down into
+ parts.
+
+ The function body is an infinite loop which starts by storing the
+ rendering parameters in local variables. As usual, we protect
+ accesses to the member variables using the class's mutex. Storing
+ the member variables in local variables allows us to minimize the
+ amout of code that needs to be protected by a mutex. This ensures
+ that the main thread will never have to block for too long when
+ it needs to access \c{RenderThread}'s member variables (e.g., in
+ \c render()).
+
+ The \c forever keyword is, like \c foreach, a Qt pseudo-keyword.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 4
+ \snippet examples/threads/mandelbrot/renderthread.cpp 5
+ \snippet examples/threads/mandelbrot/renderthread.cpp 6
+ \snippet examples/threads/mandelbrot/renderthread.cpp 7
+
+ Then comes the core of the algorithm. Instead of trying to create
+ a perfect Mandelbrot set image, we do multiple passes and
+ generate more and more precise (and computationally expensive)
+ approximations of the fractal.
+
+ If we discover inside the loop that \c restart has been set to \c
+ true (by \c render()), we break out of the loop immediately, so
+ that the control quickly returns to the very top of the outer
+ loop (the \c forever loop) and we fetch the new rendering
+ parameters. Similarly, if we discover that \c abort has been set
+ to \c true (by the \c RenderThread destructor), we return from
+ the function immediately, terminating the thread.
+
+ The core algorithm is beyond the scope of this tutorial.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 8
+ \snippet examples/threads/mandelbrot/renderthread.cpp 9
+
+ Once we're done with all the iterations, we call
+ QWaitCondition::wait() to put the thread to sleep by calling,
+ unless \c restart is \c true. There's no use in keeping a worker
+ thread looping indefinitely while there's nothing to do.
+
+ \snippet examples/threads/mandelbrot/renderthread.cpp 10
+
+ The \c rgbFromWaveLength() function is a helper function that
+ converts a wave length to a RGB value compatible with 32-bit
+ \l{QImage}s. It is called from the constructor to initialize the
+ \c colormap array with pleasing colors.
+
+ \section1 MandelbrotWidget Class Defintion
+
+ The \c MandelbrotWidget class uses \c RenderThread to draw the
+ Mandelbrot set on screen. Here's the class definition:
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.h 0
+
+ The widget reimplements many event handlers from QWidget. In
+ addition, it has an \c updatePixmap() slot that we'll connect to
+ the worker thread's \c renderedImage() signal to update the
+ display whenever we receive new data from the thread.
+
+ Among the private variables, we have \c thread of type \c
+ RenderThread and \c pixmap, which contains the last rendered
+ image.
+
+ \section1 MandelbrotWidget Class Implementation
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 0
+
+ The implementation starts with a few contants that we'll need
+ later on.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 1
+
+ The interesting part of the constructor is the
+ qRegisterMetaType() and QObject::connect() calls. Let's start
+ with the \l{QObject::connect()}{connect()} call.
+
+ Although it looks like a standard signal-slot connection between
+ two \l{QObject}s, because the signal is emitted in a different
+ thread than the receiver lives in, the connection is effectively a
+ \l{Qt::QueuedConnection}{queued connection}. These connections are
+ asynchronous (i.e., non-blocking), meaning that the slot will be
+ called at some point after the \c emit statement. What's more, the
+ slot will be invoked in the thread in which the receiver lives.
+ Here, the signal is emitted in the worker thread, and the slot is
+ executed in the GUI thread when control returns to the event loop.
+
+ With queued connections, Qt must store a copy of the arguments
+ that were passed to the signal so that it can pass them to the
+ slot later on. Qt knows how to take of copy of many C++ and Qt
+ types, but QImage isn't one of them. We must therefore call the
+ template function qRegisterMetaType() before we can use QImage
+ as parameter in queued connections.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 2
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 3
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 4
+
+ In \l{QWidget::paintEvent()}{paintEvent()}, we start by filling
+ the background with black. If we have nothing yet to paint (\c
+ pixmap is null), we print a message on the widget asking the user
+ to be patient and return from the function immediately.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 5
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 6
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 7
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 8
+
+ If the pixmap has the right scale factor, we draw the pixmap directly onto
+ the widget. Otherwise, we scale and translate the \l{The Coordinate
+ System}{coordinate system} before we draw the pixmap. By reverse mapping
+ the widget's rectangle using the scaled painter matrix, we also make sure
+ that only the exposed areas of the pixmap are drawn. The calls to
+ QPainter::save() and QPainter::restore() make sure that any painting
+ performed afterwards uses the standard coordinate system.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 9
+
+ At the end of the paint event handler, we draw a text string and
+ a semi-transparent rectangle on top of the fractal.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 10
+
+ Whenever the user resizes the widget, we call \c render() to
+ start generating a new image, with the same \c centerX, \c
+ centerY, and \c curScale parameters but with the new widget size.
+
+ Notice that we rely on \c resizeEvent() being automatically
+ called by Qt when the widget is shown the first time to generate
+ the image the very first time.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 11
+
+ The key press event handler provides a few keyboard bindings for
+ the benefit of users who don't have a mouse. The \c zoom() and \c
+ scroll() functions will be covered later.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 12
+
+ The wheel event handler is reimplemented to make the mouse wheel
+ control the zoom level. QWheelEvent::delta() returns the angle of
+ the wheel mouse movement, in eights of a degree. For most mice,
+ one wheel step corresponds to 15 degrees. We find out how many
+ mouse steps we have and determine the zoom factor in consequence.
+ For example, if we have two wheel steps in the positive direction
+ (i.e., +30 degrees), the zoom factor becomes \c ZoomInFactor
+ to the second power, i.e. 0.8 * 0.8 = 0.64.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 13
+
+ When the user presses the left mouse button, we store the mouse
+ pointer position in \c lastDragPos.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 14
+
+ When the user moves the mouse pointer while the left mouse button
+ is pressed, we adjust \c pixmapOffset to paint the pixmap at a
+ shifted position and call QWidget::update() to force a repaint.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 15
+
+ When the left mouse button is released, we update \c pixmapOffset
+ just like we did on a mouse move and we reset \c lastDragPos to a
+ default value. Then, we call \c scroll() to render a new image
+ for the new position. (Adjusting \c pixmapOffset isn't sufficient
+ because areas revealed when dragging the pixmap are drawn in
+ black.)
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 16
+
+ The \c updatePixmap() slot is invoked when the worker thread has
+ finished rendering an image. We start by checking whether a drag
+ is in effect and do nothing in that case. In the normal case, we
+ store the image in \c pixmap and reinitialize some of the other
+ members. At the end, we call QWidget::update() to refresh the
+ display.
+
+ At this point, you might wonder why we use a QImage for the
+ parameter and a QPixmap for the data member. Why not stick to one
+ type? The reason is that QImage is the only class that supports
+ direct pixel manipulation, which we need in the worker thread. On
+ the other hand, before an image can be drawn on screen, it must
+ be converted into a pixmap. It's better to do the conversion once
+ and for all here, rather than in \c paintEvent().
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 17
+
+ In \c zoom(), we recompute \c curScale. Then we call
+ QWidget::update() to draw a scaled pixmap, and we ask the worker
+ thread to render a new image corresponding to the new \c curScale
+ value.
+
+ \snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 18
+
+ \c scroll() is similar to \c zoom(), except that the affected
+ parameters are \c centerX and \c centerY.
+
+ \section1 The main() Function
+
+ The application's multithreaded nature has no impact on its \c
+ main() function, which is as simple as usual:
+
+ \snippet examples/threads/mandelbrot/main.cpp 0
+*/
diff --git a/doc/src/examples/masterdetail.qdoc b/doc/src/examples/masterdetail.qdoc
new file mode 100644
index 0000000..d7dc0e2
--- /dev/null
+++ b/doc/src/examples/masterdetail.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/masterdetail
+ \title Master Detail Example
+
+ The Master Detail Example shows how to present data from different
+ data sources in the same application. The album titles, and the
+ corresponding artists and release dates, are kept in a
+ database, while each album's tracks are stored in an XML
+ file.
+
+ The example also shows how to add as well as remove data from both
+ the database and the associated XML file using the API provided by
+ the QtSql and QtXml modules, respectively.
+
+ \image masterdetail-example.png
+*/
diff --git a/doc/src/examples/mdi.qdoc b/doc/src/examples/mdi.qdoc
new file mode 100644
index 0000000..f97db5e
--- /dev/null
+++ b/doc/src/examples/mdi.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/mdi
+ \title MDI Example
+
+ The MDI example shows how to implement a Multiple Document Interface using Qt's
+ QMdiArea class.
+
+ \image mdi-example.png
+
+*/
diff --git a/doc/src/examples/menus.qdoc b/doc/src/examples/menus.qdoc
new file mode 100644
index 0000000..0500101
--- /dev/null
+++ b/doc/src/examples/menus.qdoc
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/menus
+ \title Menus Example
+
+ The Menus example demonstrates how menus can be used in a main
+ window application.
+
+ A menu widget can be either a pull-down menu in a menu bar or a
+ standalone context menu. Pull-down menus are shown by the menu bar
+ when the user clicks on the respective item or presses the
+ specified shortcut key. Context menus are usually invoked by some
+ special keyboard key or by right-clicking.
+
+ \image menus-example.png
+
+ A menu consists of a list of \e action items. In applications,
+ many common commands can be invoked via menus, toolbar buttons as
+ well as keyboard shortcuts. Since the user expects the commands to
+ be performed in the same way, regardless of the user interface
+ used, it is useful to represent each command as an action.
+
+ The Menus example consists of one single class, \c MainWindow, derived
+ from the QMainWindow class. When choosing one of the
+ action items in our application, it will display the item's path
+ in its central widget.
+
+ \section1 MainWindow Class Definition
+
+ QMainWindow provides a main application window, with a menu bar,
+ tool bars, dock widgets and a status bar around a large central
+ widget.
+
+ \snippet examples/mainwindows/menus/mainwindow.h 0
+
+ In this example, we will see how to implement pull-down menus as
+ well as a context menu. In order to implement a custom context
+ menu we must reimplement QWidget's \l
+ {QWidget::}{contextMenuEvent()} function to receive the context
+ menu events for our main window.
+
+ \snippet examples/mainwindows/menus/mainwindow.h 1
+
+ We must also implement a collection of private slots to respond to
+ the user activating any of our menu entries. Note that these
+ slots are left out of this documentation since they are trivial,
+ i.e., most of them are only displaying the action's path in the
+ main window's central widget.
+
+ \snippet examples/mainwindows/menus/mainwindow.h 2
+
+ We have chosen to simplify the constructor by implementing two
+ private convenience functions to create the various actions, to
+ add them to menus and to insert the menus into our main window's
+ menu bar.
+
+ \snippet examples/mainwindows/menus/mainwindow.h 3
+
+ Finally, we declare the various menus and actions as well as a
+ simple information label in the application wide scope.
+
+ The QMenu class provides a menu widget for use in menu bars,
+ context menus, and other popup menus while the QAction class
+ provides an abstract user interface action that can be inserted
+ into widgets.
+
+ In some situations it is useful to group actions together, e.g.,
+ we have a \gui {Left Align} action, a \gui {Right Align} action, a
+ \gui {Justify} action, and a \gui {Center} action, and we want
+ only one of these actions to be active at any one time. One simple
+ way of achieving this is to group the actions together in an
+ action group using the QActionGroup class.
+
+ \section1 MainWindow Class Implementation
+
+ In the constructor, we start off by creating a regular QWidget and
+ make it our main window's central widget. Note that the main
+ window takes ownership of the widget pointer and deletes it at the
+ appropriate time.
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 0
+ \codeline
+ \snippet examples/mainwindows/menus/mainwindow.cpp 1
+
+ Then we create the information label as well as a top and bottom
+ filler that we add to a layout which we install on the central
+ widget. QMainWindow objects come with their own customized layout
+ and setting a layout on a the actual main window, or creating a
+ layout with a main window as a parent, is considered an error. You
+ should always set your own layout on the central widget instead.
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 2
+
+ To create the actions and menus we call our two convenience
+ functions: \c createActions() and \c createMenus(). We will get
+ back to these shortly.
+
+ QMainWindow's \l {QMainWindow::statusBar()}{statusBar()} function
+ returns the status bar for the main window (if the status bar does
+ not exist, this function will create and return an empty status
+ bar). We initialize the status bar and window title, resize the
+ window to an appropriate size as well as ensure that the main
+ window cannot be resized to a smaller size than the given
+ one.
+
+ Now, let's take a closer look at the \c createActions() convenience
+ function that creates the various actions:
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 4
+ \dots
+
+ A QAction object may contain an icon, a text, a shortcut, a status
+ tip, a "What's This?" text, and a tooltip. Most of these can be
+ set in the constructor, but they can also be set independently
+ using the provided convenience functions.
+
+ In the \c createActions() function, we first create a \c newAct
+ action. We make \gui Ctrl+N its shortcut using the
+ QAction::setShortcut() function, and we set its status tip using the
+ QAction::setStatusTip() function (the status tip is displayed on all
+ status bars provided by the action's top-level parent widget). We
+ also connect its \l {QAction::}{triggered()} signal to the \c
+ newFile() slot.
+
+ The rest of the actions are created in a similar manner. Please
+ see the source code for details.
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 7
+
+
+ Once we have created the \gui {Left Align}, \gui {Right Align},
+ \gui {Justify}, and a \gui {Center} actions, we can also create
+ the previously mentioned action group.
+
+ Each action is added to the group using QActionGroup's \l
+ {QActionGroup::}{addAction()} function. Note that an action also
+ can be added to a group by creating it with the group as its
+ parent. Since an action group is exclusive by default, only one of
+ the actions in the group is checked at any one time (this can be
+ altered using the QActionGroup::setExclusive() function).
+
+ When all the actions are created, we use the \c createMenus()
+ function to add the actions to the menus and to insert the menus
+ into the menu bar:
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 8
+
+ QMenuBar's \l {QMenuBar::addMenu()}{addMenu()} function appends a
+ new QMenu with the given title, to the menu bar (note that the
+ menu bar takes ownership of the menu). We use QWidget's \l
+ {QWidget::addAction()}{addAction()} function to add each action to
+ the corresponding menu.
+
+ Alternatively, the QMenu class provides several \l
+ {QMenu::addAction()}{addAction()} convenience functions that create
+ and add new actions from given texts and/or icons. You can also
+ provide a member that will automatically connect to the new
+ action's \l {QAction::triggered()}{triggered()} signal, and a
+ shortcut represented by a QKeySequence instance.
+
+ The QMenu::addSeparator() function creates and returns a new
+ separator action, i.e. an action for which QAction::isSeparator()
+ returns true, and adds the new action to the menu's list of
+ actions.
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 12
+
+ Note the \gui Format menu. First of all, it is added as a submenu
+ to the \gui Edit Menu using QMenu's \l
+ {QMenu::addMenu()}{addMenu()} function. Secondly, take a look at the
+ alignment actions: In the \c createActions() function we added the
+ \c leftAlignAct, \c rightAlignAct, \c justifyAct and \c centerAct
+ actions to an action group. Nevertheless, we must add each action
+ to the menu separately while the action group does its magic
+ behind the scene.
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 3
+
+ To provide a custom context menu, we must reimplement QWidget's \l
+ {QWidget::}{contextMenuEvent()} function to receive the widget's
+ context menu events (note that the default implementation simply
+ ignores these events).
+
+ Whenever we receive such an event, we create a menu containing the
+ \gui Cut, \gui Copy and \gui Paste actions. Context menus can be
+ executed either asynchronously using the \l {QMenu::}{popup()}
+ function or synchronously using the \l {QMenu::}{exec()}
+ function. In this example, we have chosen to show the menu using
+ its \l {QMenu::}{exec()} function. By passing the event's position
+ as argument we ensure that the context menu appears at the
+ expected position.
+*/
diff --git a/doc/src/examples/mousecalibration.qdoc b/doc/src/examples/mousecalibration.qdoc
new file mode 100644
index 0000000..e271265
--- /dev/null
+++ b/doc/src/examples/mousecalibration.qdoc
@@ -0,0 +1,207 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qws/mousecalibration
+ \title Mouse Calibration Example
+
+ The Mouse Calibration example demonstrates how to write a simple
+ program using the mechanisms provided by the QWSMouseHandler class
+ to calibrate the mouse handler in \l{Qt for Embedded Linux}.
+
+ Calibration is the process of mapping between physical
+ (i.e. device) coordinates and logical coordinates.
+
+ The example consists of two classes in addition to the main program:
+
+ \list
+ \o \c Calibration is a dialog widget that retrieves the device coordinates.
+ \o \c ScribbleWidget is a minimal drawing program used to let the user
+ test the new mouse settings.
+ \endlist
+
+ First we will review the main program, then we will take a look at
+ the \c Calibration class. The \c ScribbleWidget class is only a
+ help tool in this context, and will not be covered here.
+
+ \section1 The Main Program
+
+ The program starts by presenting a message box informing the user
+ of what is going to happen:
+
+ \snippet examples/qws/mousecalibration/main.cpp 0
+
+ The QMessageBox class provides a modal dialog with a range of
+ different messages, roughly arranged along two axes: severity and
+ complexity. The message box has a different icon for each of the
+ severity levels, but the icon must be specified explicitly. In our
+ case we use the default QMessageBox::NoIcon value. In addition we
+ use the default complexity, i.e. a message box showing the given
+ text and an \gui OK button.
+
+ At this stage in the program, the mouse could be completely
+ uncalibrated, making the user unable to press the \gui OK button. For
+ that reason we use the static QTimer::singleShot() function to
+ make the message box disappear after 10 seconds. The QTimer class
+ provides repetitive and single-shot timers: The single shot
+ function calls the given slot after the specified interval.
+
+ \snippet examples/qws/mousecalibration/main.cpp 1
+
+ Next, we create an instance of the \c Calibration class which is a
+ dialog widget retrieving the required sample coordinates: The
+ dialog sequentially presents five marks for the user to press,
+ storing the device coordinates for the mouse press events.
+
+ \snippet examples/qws/mousecalibration/main.cpp 2
+
+ When the calibration dialog returns, we let the user test the new
+ mouse settings by drawing onto a \c ScribbleWidget object. Since
+ the mouse still can be uncalibrated, we continue to use the
+ QMessageBox and QTimer classes to inform the user about the
+ program's progress.
+
+ An improved calibration tool would let the user choose between
+ accepting the new calibration, reverting to the old one, and
+ restarting the calibration.
+
+ \section1 Calibration Class Definition
+
+ The \c Calibration class inherits from QDialog and is responsible
+ for retrieving the device coordinates from the user.
+
+ \snippet examples/qws/mousecalibration/calibration.h 0
+
+ We reimplement QDialog's \l {QDialog::exec()}{exec()} and \l
+ {QDialog::accept()}{accept()} slots, and QWidget's \l
+ {QWidget::paintEvent()}{paintEvent()} and \l
+ {QWidget::mouseReleaseEvent()}{mouseReleaseEvent()} functions.
+
+ In addition, we declare a couple of private variables, \c data and
+ \c pressCount, holding the \c Calibration object's number of mouse
+ press events and current calibration data. The \c pressCount
+ variable is a convenience variable, while the \c data is a
+ QWSPointerCalibrationData object (storing the physical and logical
+ coordinates) that is passed to the mouse handler. The
+ QWSPointerCalibrationData class is simply a container for
+ calibration data.
+
+ \section1 Calibration Class Implementation
+
+ In the constructor we first ensure that the \c Calibration dialog
+ fills up the entire screen, has focus and will receive mouse
+ events (the latter by making the dialog modal):
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 0
+
+ Then we initialize the \l{QWSPointerCalibrationData::}{screenPoints}
+ array:
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 1
+
+ In order to specify the calibration, the
+ \l{QWSPointerCalibrationData::screenPoints}{screenPoints} array must
+ contain the screen coordinates for the logical positions
+ represented by the QWSPointerCalibrationData::Location enum
+ (e.g. QWSPointerCalibrationData::TopLeft). Since non-linearity is
+ expected to increase on the edge of the screen, all points are
+ kept 10 percent within the screen. The \c qt_screen pointer is a
+ reference to the screen device. There can only be one screen
+ device per application.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 2
+
+ Finally, we initialize the variable which keeps track of the number of
+ mouse press events we have received.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 3
+
+ The destructor is trivial.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 4
+
+ The reimplementation of the QDialog::exec() slot is called from
+ the main program.
+
+ First we clear the current calibration making the following mouse
+ event delivered in raw device coordinates. Then we call the
+ QWidget::grabMouse() function to make sure no mouse events are
+ lost, and the QWidget::activateWindow() function to make the
+ top-level widget containing this dialog, the active window. When
+ the call to the QDialog::exec() base function returns, we call
+ QWidget::releaseMouse() to release the mouse grab before the
+ function returns.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 5
+
+ The QWidget::paintEvent() function is reimplemented to receive the
+ widget's paint events. A paint event is a request to repaint all
+ or parts of the widget. It can happen as a result of
+ QWidget::repaint() or QWidget::update(), or because the widget was
+ obscured and has now been uncovered, or for many other reasons.
+ In our reimplementation of the function we simply draw a cross at
+ the next point the user should press.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 6
+
+ We then reimplement the QWidget::mouseReleaseEvent() function to
+ receive the widget's move events, using the QMouseEvent object
+ passed as parameter to find the coordinates the user pressed, and
+ update the QWSPointerCalibrationData::devPoints array.
+
+ In order to complete the mapping between logical and physical
+ coordinates, the \l
+ {QWSPointerCalibrationData::devPoints}{devPoints} array must
+ contain the raw device coordinates for the logical positions
+ represented by the QWSPointerCalibrationData::Location enum
+ (e.g. QWSPointerCalibrationData::TopLeft)
+
+ We continue by drawing the next cross, or close the dialog by
+ calling the QDialog::accept() slot if we have collected all the
+ required coordinate samples.
+
+ \snippet examples/qws/mousecalibration/calibration.cpp 7
+
+ Our reimplementation of the QDialog::accept() slot simply activate
+ the new calibration data using the QWSMouseHandler::calibrate()
+ function. We also use the Q_ASSERT() macro to ensure that the number
+ of required samples are present.
+*/
diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc
new file mode 100644
index 0000000..00e42c6
--- /dev/null
+++ b/doc/src/examples/movie.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/movie
+ \title Movie Example
+
+ The Movie example demonstrates how to use QMovie and QLabel to
+ display animations. Now that Qt comes with \l{Phonon
+ Overview}{Phonon} (the multimedia framework), QMovie is mostly
+ useful if one wants to play a simple animation without the added
+ complexity of a multimedia framework to install and deploy.
+
+ \image movie-example.png
+*/
diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc
new file mode 100644
index 0000000..ff2f00f
--- /dev/null
+++ b/doc/src/examples/multipleinheritance.qdoc
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example uitools/multipleinheritance
+ \title Multiple Inheritance Example
+
+ The Multiple Inheritance Example shows how to use a form created with \QD
+ in an application by subclassing both QWidget and the user interface
+ class, which is \c{Ui::CalculatorForm}.
+
+ \image multipleinheritance-example.png
+
+ To subclass the \c calculatorform.ui file and ensure that \c qmake
+ processes it with the \c uic, we have to include \c calculatorform.ui
+ in the \c .pro file, as shown below:
+
+ \snippet examples/uitools/multipleinheritance/multipleinheritance.pro 0
+
+ When the project is compiled, the \c uic will generate a corresponding
+ \c ui_calculatorform.h.
+
+ \section1 CalculatorForm Definition
+
+ In the \c CalculatorForm definition, we include the \c ui_calculatorform.h
+ that was generated earlier.
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.h 0
+
+ As mentioned earlier, the class is a subclass of both QWidget and
+ \c{Ui::CalculatorForm}.
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.h 1
+
+ Two slots are defined according to the \l{Automatic Connections}
+ {automatic connection} naming convention required by \c uic. This is
+ to ensure that \l{QMetaObject}'s auto-connection facilities connect
+ all the signals and slots involved automatically.
+
+ \section1 CalculatorForm Implementation
+
+ In the constructor, we call \c setupUi() to load the user interface file.
+ Note that we do not need the \c{ui} prefix as \c CalculatorForm is a
+ subclass of the user interface class.
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.cpp 0
+
+ We include two slots, \c{on_inputSpinBox1_valueChanged()} and
+ \c{on_inputSpinBox2_valueChanged()}. These slots respond to the
+ \l{QSpinBox::valueChanged()}{valueChanged()} signal that both spin boxes
+ emit. Whenever there is a change in one spin box's value, we take that
+ value and add it to whatever value the other spin box has.
+
+ \snippet examples/uitools/multipleinheritance/calculatorform.cpp 1
+ \codeline
+ \snippet examples/uitools/multipleinheritance/calculatorform.cpp 2
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates QApplication and \c CalculatorForm.
+ The \c calculator object is displayed by invoking the \l{QWidget::show()}
+ {show()} function.
+
+ \snippet examples/uitools/multipleinheritance/main.cpp 0
+
+ There are various approaches to include forms into applications. The
+ Multiple Inheritance approach is just one of them. See
+ \l{Using a Designer .ui File in Your Application} for more information on
+ the other approaches available.
+*/
diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc
new file mode 100644
index 0000000..d23c1f1
--- /dev/null
+++ b/doc/src/examples/musicplayerexample.qdoc
@@ -0,0 +1,248 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example phonon/musicplayer
+ \title Music Player Example
+
+ The Music Player Example shows how to use Phonon - the multimedia
+ framework that comes with Qt - to create a simple music player.
+ The player can play music files, and provides simple playback
+ control, such as pausing, stopping, and resuming the music.
+
+ \image musicplayer.png
+
+ The player has a button group with the play, pause, and stop
+ buttons familiar from most music players. The top-most slider
+ controls the position in the media stream, and the bottom slider
+ allows adjusting the sound volume.
+
+ The user can use a file dialog to add music files to a table,
+ which displays meta information about the music - such as the
+ title, album, and artist. Each row contains information about a
+ single music file; to play it, the user selects that row and
+ presses the play button. Also, when a row is selected, the files
+ in the table are queued for playback.
+
+ Phonon offers playback of sound using an available audio device,
+ e.g., a sound card or an USB headset. For the implementation, we
+ use two objects: a \l{Phonon::}{MediaObject}, which controls the
+ playback, and an \l{Phonon::}{AudioOutput}, which can output the
+ audio to a sound device. We will explain how they cooperate when
+ we encounter them in the code. For a high-level introduction to
+ Phonon, see its \l{Phonon Overview}{overview}.
+
+ The API of Phonon is implemented through an intermediate
+ technology on each supported platform: DirectShow, QuickTime, and
+ GStreamer. The sound formats supported may therefore vary from
+ system to system. We do not in this example try to determine which
+ formats are supported, but let Phonon report an error if the user
+ tries to play an unsupported sound file.
+
+ Our player consists of one class, \c MainWindow, which both
+ constructs the GUI and handles the playback. We will now go
+ through the parts of its definition and implementation that
+ concerns Phonon.
+
+ \section1 MainWindow Class Definition
+
+ Most of the API in \c MainWindow is private, as is often the case
+ for classes that represent self-contained windows. We list Phonon
+ objects and slots we connect to their signals; we take a closer
+ look at them when we walk through the \c MainWindow
+ implementation.
+
+ \snippet examples/phonon/musicplayer/mainwindow.h 2
+
+ We use the \l{Phonon::}{SeekSlider} to move the current playback
+ position in the media stream, and the \l{Phonon::}{VolumeSlider}
+ controls the sound volume. Both of these widgets come ready made
+ with Phonon. We use another \l{Phonon::}{MediaObject},
+ metaInformationProvider, to get the meta information from the
+ music files. More on this later.
+
+ \snippet examples/phonon/musicplayer/mainwindow.h 1
+
+ The \l{Phonon::}{MediaObject} informs us of the state of the playback and
+ properties of the media it is playing back through a series of
+ signals. We connect the signals we need to slots in \c MainWindow.
+ The \c tableClicked() slot is connected to the table, so that we
+ know when the user requests playback of a new music file, by
+ clicking on the table.
+
+ \section1 MainWindow Class Implementation
+
+ The \c MainWindow class handles both the user interface and
+ Phonon. We will now take a look at the code relevant for Phonon.
+ The code required for setting up the GUI is explained elsewhere.
+
+ We start with the constructor:
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 0
+
+ We start by instantiating our media and audio output objects.
+ As mentioned, the media object knows how to playback
+ multimedia (in our case sound files) while the audio output
+ can send it to a sound device.
+
+ For the playback to work, the media and audio output objects need
+ to get in contact with each other, so that the media object can
+ send the sound to the audio output. Phonon is a graph based
+ framework, i.e., its objects are nodes that can be connected by
+ paths. Objects are connected using the \c createPath() function,
+ which is part of the Phonon namespace.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 1
+
+ We also connect signals of the media object to slots in our \c
+ MainWindow. We will examine them shortly.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 2
+
+ Finally, we call private helper functions to set up the GUI.
+ The \c setupUi() function contains code for setting up the seek
+ , and volume slider. We move on to \c setupUi():
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 3
+ \dots
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 4
+
+ After creating the widgets, they must be supplied with the
+ \l{Phonon::}{MediaObject} and \l{Phonon::}{AudioOutput} objects
+ they should control.
+
+ In the \c setupActions(), we connect the actions for the play,
+ pause, and stop tool buttons, to slots of the media object.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 5
+
+ We move on to the the slots of \c MainWindow, starting with \c
+ addFiles():
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 6
+
+ In the \c addFiles() slot, we add files selected by the user to
+ the \c sources list. We then set the first source selected on the
+ \c metaInformationProvider \l{Phonon::}{MediaObject}, which will
+ send a state changed signal when the meta information is resolved;
+ we have this signal connected to the \c metaStateChanged() slot.
+
+ The media object informs us of state changes by sending the \c
+ stateChanged() signal. The \c stateChanged() slot is connected
+ to this signal.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 9
+
+ The \l{Phonon::MediaObject::}{errorString()} function gives a
+ description of the error that is suitable for users of a Phonon
+ application. The two values of the \l{Phonon::}{ErrorState} enum
+ helps us determine whether it is possible to try to play the same
+ file again.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 10
+
+ We update the GUI when the playback state changes, i.e., when it
+ starts, pauses, stops, or resumes.
+
+ The media object will report other state changes, as defined by the
+ \l{Phonon::}{State} enum.
+
+ The \c tick() slot is connected to a \l{Phonon::}{MediaObject} signal which is
+ emitted when the playback position changes:
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 11
+
+ The \c time is given in milliseconds.
+
+ When the table is clicked on with the mouse, \c tableClick()
+ is invoked:
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 12
+
+ Since we stop the media object, we first check whether it is
+ currently playing. \c row contains the row in the table that was
+ clicked upon; the indices of \c sources follows the table, so we
+ can simply use \c row to find the new source.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 13
+
+ When the media source changes, we simply need to select the
+ corresponding row in the table.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 14
+
+ When \c metaStateChanged() is invoked, \c
+ metaInformationProvider has resolved the meta data for its current
+ source. A \l{Phonon::}{MediaObject} will do this before
+ entering \l{Phonon::}{StoppedState}. Note that we could also
+ have used the \l{Phonon::MediaObject::}{metaDataChanged()} signal for
+ this purpose.
+
+ Some of the meta data is then chosen to be displayed in the
+ music table. A file might not contain the meta data requested,
+ in which case an empty string is returned.
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 15
+
+ If we have media sources in \c sources of which meta information
+ is not resolved, we set a new source on the \c
+ metaInformationProvider, which will invoke \c metaStateChanged()
+ again.
+
+ We move on to the \c aboutToFinish() slot:
+
+ \snippet examples/phonon/musicplayer/mainwindow.cpp 16
+
+ When a file is finished playing, the Music Player will move on and
+ play the next file in the table. This slot is connected to the
+ \l{Phonon::}{MediaObject}'s
+ \l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
+ guaranteed to be emitted while there is still time to enqueue
+ another file for playback.
+
+ \section1 The main() function.
+
+ Phonon requires that the application has a name; it is set with
+ \l{QCoreApplication::}{setApplicationName()}. This is because
+ D-Bus, which is used by Phonon on Linux systems, demands this.
+
+ \snippet examples/phonon/musicplayer/main.cpp 1
+*/
diff --git a/doc/src/examples/network-chat.qdoc b/doc/src/examples/network-chat.qdoc
new file mode 100644
index 0000000..3caeb9a
--- /dev/null
+++ b/doc/src/examples/network-chat.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/network-chat
+ \title Network Chat Example
+
+ The Network Chat example demonstrates a stateful peer-to-peer Chat client
+ that uses broadcasting with QUdpSocket and QNetworkInterface to discover
+ its peers.
+
+ \image network-chat-example.png
+*/
diff --git a/doc/src/examples/orderform.qdoc b/doc/src/examples/orderform.qdoc
new file mode 100644
index 0000000..f6f2607
--- /dev/null
+++ b/doc/src/examples/orderform.qdoc
@@ -0,0 +1,378 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example richtext/orderform
+ \title Order Form Example
+
+ The Order Form example shows how to generate rich text documents by
+ combining a simple template with data input by the user in a dialog. Data
+ is extracted from a \c DetailsDialog object and displayed on a QTextEdit
+ with a QTextCursor, using various formats. Each form generated is added
+ to a QTabWidget for easy access.
+
+ \image orderform-example.png
+
+ \section1 DetailsDialog Definition
+
+ The \c DetailsDialog class is a subclass of QDialog, implementing a slot
+ \c verify() to allow contents of the \c DetailsDialog to be verified later.
+ This is further explained in \c DetailsDialog Implementation.
+
+ \snippet examples/richtext/orderform/detailsdialog.h 0
+
+ The constructor of \c DetailsDialog accepts parameters \a title and
+ \a parent. The class defines four \e{getter} functions: \c orderItems(),
+ \c senderName(), \c senderAddress(), and \c sendOffers() to allow data
+ to be accessed externally.
+
+ The class definition includes input widgets for the required
+ fields, \c nameEdit and \c addressEdit. Also, a QCheckBox and a
+ QDialogButtonBox are defined; the former to provide the user with the
+ option to receive information on products and offers, and the latter
+ to ensure that buttons used are arranged according to the user's native
+ platform. In addition, a QTableWidget, \c itemsTable, is used to hold
+ order details.
+
+ The screenshot below shows the \c DetailsDialog we intend to create.
+
+ \image orderform-example-detailsdialog.png
+
+ \section1 DetailsDialog Implementation
+
+ The constructor of \c DetailsDialog instantiates the earlier defined fields
+ and their respective labels. The label for \c offersCheckBox is set and the
+ \c setupItemsTable() function is invoked to setup and populate
+ \c itemsTable. The QDialogButtonBox object, \c buttonBox, is instantiated
+ with \gui OK and \gui Cancel buttons. This \c buttonBox's \c accepted() and
+ \c rejected() signals are connected to the \c verify() and \c reject()
+ slots in \c DetailsDialog.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 0
+
+ A QGridLayout is used to place all the objects on the \c DetailsDialog.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 1
+
+ The \c setupItemsTable() function instantiates the QTableWidget object,
+ \c itemsTable, and sets the number of rows based on the QStringList
+ object, \c items, which holds the type of items ordered. The number of
+ columns is set to 2, providing a "name" and "quantity" layout. A \c for
+ loop is used to populate the \c itemsTable and the \c name item's flag
+ is set to Qt::ItemIsEnabled or Qt::ItemIsSelectable. For demonstration
+ purposes, the \c quantity item is set to a 1 and all items in the
+ \c itemsTable have this value for quantity; but this can be modified by
+ editing the contents of the cells at run time.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 2
+
+ The \c orderItems() function extracts data from the \c itemsTable and
+ returns it in the form of a QList<QPair<QString,int>> where each QPair
+ corresponds to an item and the quantity ordered.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 3
+
+ The \c senderName() function is used to return the value of the QLineEdit
+ used to store the name field for the order form.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 4
+
+ The \c senderAddress() function is used to return the value of the
+ QTextEdit containing the address for the order form.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 5
+
+ The \c sendOffers() function is used to return a \c true or \c false
+ value that is used to determine if the customer in the order form
+ wishes to receive more information on the company's offers and promotions.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 6
+
+ The \c verify() function is an additionally implemented slot used to
+ verify the details entered by the user into the \c DetailsDialog. If
+ the details entered are incomplete, a QMessageBox is displayed
+ providing the user the option to discard the \c DetailsDialog. Otherwise,
+ the details are accepted and the \c accept() function is invoked.
+
+ \snippet examples/richtext/orderform/detailsdialog.cpp 7
+
+ \section1 MainWindow Definition
+
+ The \c MainWindow class is a subclass of QMainWindow, implementing two
+ slots - \c openDialog() and \c printFile(). It also contains a private
+ instance of QTabWidget, \c letters.
+
+ \snippet examples/richtext/orderform/mainwindow.h 0
+
+ \section1 MainWindow Implementation
+
+ The \c MainWindow constructor sets up the \c fileMenu and the required
+ actions, \c newAction and \c printAction. These actions' \c triggered()
+ signals are connected to the additionally implemented openDialog() slot
+ and the default close() slot. The QTabWidget, \c letters, is
+ instantiated and set as the window's central widget.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 0
+
+ The \c createLetter() function creates a new QTabWidget with a QTextEdit,
+ \c editor, as the parent. This function accepts four parameters that
+ correspond to we obtained through \c DetailsDialog, in order to "fill"
+ the \c editor.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 1
+
+ We then obtain the cursor for the \c editor using QTextEdit::textCursor().
+ The \c cursor is then moved to the start of the document using
+ QTextCursor::Start.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 2
+
+ Recall the structure of a \l{Rich Text Document Structure}
+ {Rich Text Document}, where sequences of frames and
+ tables are always separated by text blocks, some of which may contain no
+ information.
+
+ In the case of the Order Form Example, the document structure for this portion
+ is described by the table below:
+
+ \table
+ \row
+ \o {1, 8} frame with \e{referenceFrameFormat}
+ \row
+ \o block \o \c{A company}
+ \row
+ \o block
+ \row
+ \o block \o \c{321 City Street}
+ \row
+ \o block
+ \row
+ \o block \o \c{Industry Park}
+ \row
+ \o block
+ \row
+ \o block \o \c{Another country}
+ \endtable
+
+ This is accomplished with the following code:
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 3
+
+ Note that \c topFrame is the \c {editor}'s top-level frame and is not shown
+ in the document structure.
+
+ We then set the \c{cursor}'s position back to its last position in
+ \c topFrame and fill in the customer's name (provided by the constructor)
+ and address - using a \c foreach loop to traverse the QString, \c address.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 4
+
+ The \c cursor is now back in \c topFrame and the document structure for
+ the above portion of code is:
+
+ \table
+ \row
+ \o block \o \c{Donald}
+ \row
+ \o block \o \c{47338 Park Avenue}
+ \row
+ \o block \o \c{Big City}
+ \endtable
+
+ For spacing purposes, we invoke \l{QTextCursor::insertBlock()}
+ {insertBlock()} twice. The \l{QDate::currentDate()}{currentDate()} is
+ obtained and displayed. We use \l{QTextFrameFormat::setWidth()}
+ {setWidth()} to increase the width of \c bodyFrameFormat and we insert
+ a new frame with that width.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 5
+
+ The following code inserts standard text into the order form.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 6
+ \snippet examples/richtext/orderform/mainwindow.cpp 7
+
+ This part of the document structure now contains the date, a frame with
+ \c bodyFrameFormat, as well as the standard text.
+
+ \table
+ \row
+ \o block
+ \row
+ \o block
+ \row
+ \o block \o \c{Date: 25 May 2007}
+ \row
+ \o block
+ \row
+ \o {1, 4} frame with \e{bodyFrameFormat}
+ \row
+ \o block \o \c{I would like to place an order for the following items:}
+ \row
+ \o block
+ \row
+ \o block
+ \endtable
+
+ A QTextTableFormat object, \c orderTableFormat, is used to hold the type
+ of item and the quantity ordered.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 8
+
+ We use \l{QTextTable::cellAt()}{cellAt()} to set the headers for the
+ \c orderTable.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 9
+
+ Then, we iterate through the QList of QPair objects to populate
+ \c orderTable.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 10
+
+ The resulting document structure for this section is:
+
+ \table
+ \row
+ \o {1, 11} \c{orderTable} with \e{orderTableFormat}
+ \row
+ \o block \o \c{Product}
+ \row
+ \o block \o \c{Quantity}
+ \row
+ \o block \o \c{T-shirt}
+ \row
+ \o block \o \c{4}
+ \row
+ \o block \o \c{Badge}
+ \row
+ \o block \o \c{3}
+ \row
+ \o block \o \c{Reference book}
+ \row
+ \o block \o \c{2}
+ \row
+ \o block \o \c{Coffee cup}
+ \row
+ \o block \o \c{5}
+ \endtable
+
+ The \c cursor is then moved back to \c{topFrame}'s
+ \l{QTextFrame::lastPosition()}{lastPosition()} and more standard text
+ is inserted.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 11
+ \snippet examples/richtext/orderform/mainwindow.cpp 12
+
+ Another QTextTable is inserted, to display the customer's
+ preference regarding offers.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 13
+
+ The document structure for this portion is:
+
+ \table
+ \row
+ \o block
+ \row
+ \o block\o \c{Please update my...}
+ \row
+ \o {1, 5} block
+ \row
+ \o {1, 4} \c{offersTable}
+ \row
+ \o block \o \c{I want to receive...}
+ \row
+ \o block \o \c{I do not want to recieve...}
+ \row
+ \o block \o \c{X}
+ \endtable
+
+ The \c cursor is moved to insert "Sincerely" along with the customer's
+ name. More blocks are inserted for spacing purposes. The \c printAction
+ is enabled to indicate that an order form can now be printed.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 14
+
+ The bottom portion of the document structure is:
+
+ \table
+ \row
+ \o block
+ \row
+ \o {1, 5} block\o \c{Sincerely,}
+ \row
+ \o block
+ \row
+ \o block
+ \row
+ \o block
+ \row
+ \o block \o \c{Donald}
+ \endtable
+
+ The \c createSample() function is used for illustration purposes, to create
+ a sample order form.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 15
+
+ The \c openDialog() function opens a \c DetailsDialog object. If the
+ details in \c dialog are accepted, the \c createLetter() function is
+ invoked using the parameters extracted from \c dialog.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 16
+
+ In order to print out the order form, a \c printFile() function is
+ included, as shown below:
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 17
+
+ This function also allows the user to print a selected area with
+ QTextCursor::hasSelection(), instead of printing the entire document.
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates \c MainWindow and sets its size to
+ 640x480 pixels before invoking the \c show() function and
+ \c createSample() function.
+
+ \snippet examples/richtext/orderform/main.cpp 0
+
+*/
diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc
new file mode 100644
index 0000000..e19f54b
--- /dev/null
+++ b/doc/src/examples/overpainting.qdoc
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/overpainting
+ \title Overpainting Example
+
+ The Overpainting example shows how QPainter can be used
+ to overpaint a scene rendered using OpenGL in a QGLWidget.
+
+ \image overpainting-example.png
+
+ QGLWidget provides a widget with integrated OpenGL graphics support
+ that enables 3D graphics to be displayed using normal OpenGL calls,
+ yet also behaves like any other standard Qt widget with support for
+ signals and slots, properties, and Qt's action system.
+
+ Usually, QGLWidget is subclassed to display a pure 3D scene; the
+ developer reimplements \l{QGLWidget::initializeGL()}{initializeGL()}
+ to initialize any required resources, \l{QGLWidget::resizeGL()}{resizeGL()}
+ to set up the projection and viewport, and
+ \l{QGLWidget::paintGL()}{paintGL()} to perform the OpenGL calls needed
+ to render the scene. However, it is possible to subclass QGLWidget
+ differently to allow 2D graphics, drawn using QPainter, to be
+ painted over a scene rendered using OpenGL.
+
+ In this example, we demonstrate how this is done by reusing the code
+ from the \l{Hello GL Example}{Hello GL} example to provide a 3D scene,
+ and painting over it with some translucent 2D graphics. Instead of
+ examining each class in detail, we only cover the parts of the
+ \c GLWidget class that enable overpainting, and provide more detailed
+ discussion in the final section of this document.
+
+ \section1 GLWidget Class Definition
+
+ The \c GLWidget class is a subclass of QGLWidget, based on the one used
+ in the \l{Hello GL Example}{Hello GL} example. Rather than describe the
+ class as a whole, we show the first few lines of the class and only
+ discuss the changes we have made to the rest of it:
+
+ \snippet examples/opengl/overpainting/glwidget.h 0
+ \dots
+ \snippet examples/opengl/overpainting/glwidget.h 1
+ \dots
+ \snippet examples/opengl/overpainting/glwidget.h 4
+
+ As usual, the widget uses \l{QGLWidget::initializeGL()}{initializeGL()}
+ to set up objects for our scene and perform other OpenGL initialization tasks.
+ The \l{QGLWidget::resizeGL()}{resizeGL()} function is used to ensure that
+ the 3D graphics in the scene are transformed correctly to the 2D viewport
+ displayed in the widget.
+
+ Instead of implementing \l{QGLWidget::paintGL()}{paintGL()} to handle updates
+ to the widget, we implement a normal QWidget::paintEvent(). This
+ allows us to mix OpenGL calls and QPainter operations in a controlled way.
+
+ In this example, we also implement QWidget::showEvent() to help with the
+ initialization of the 2D graphics used.
+
+ The new private member functions and variables relate exclusively to the
+ 2D graphics and animation. The \c animate() slot is called periodically by the
+ \c animationTimer to update the widget; the \c createBubbles() function
+ initializes the \c bubbles list with instances of a helper class used to
+ draw the animation; the \c drawInstructions() function is responsible for
+ a semi-transparent messages that is also overpainted onto the OpenGL scene.
+
+ \section1 GLWidget Class Implementation
+
+ Again, we only show the parts of the \c GLWidget implementation that are
+ relevant to this example. In the constructor, we initialize a QTimer to
+ control the animation:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 0
+
+ We turn off the widget's \l{QWidget::autoFillBackground}{autoFillBackground} property to
+ instruct OpenGL not to paint a background for the widget when
+ \l{QPainter::begin()}{QPainter::begin()} is called.
+
+ As in the \l{Hello GL Example}{Hello GL} example, the destructor is responsible
+ for freeing any OpenGL-related resources:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 1
+
+ The \c initializeGL() function is fairly minimal, only setting up the display
+ list used in the scene.
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 2
+
+ To cooperate fully with QPainter, we defer matrix stack operations and attribute
+ initialization until the widget needs to be updated.
+
+ In this example, we implement \l{QWidget::paintEvent()}{paintEvent()} rather
+ than \l{QGLWidget::paintGL()}{paintGL()} to render
+ our scene. When drawing on a QGLWidget, the paint engine used by QPainter
+ performs certain operations that change the states of the OpenGL
+ implementation's matrix and property stacks. Therefore, it is necessary to
+ make all the OpenGL calls to display the 3D graphics before we construct
+ a QPainter to draw the 2D overlay.
+
+ We render a 3D scene by setting up model and projection transformations
+ and other attributes. We use an OpenGL stack operation to preserve the
+ original matrix state, allowing us to recover it later:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 4
+
+ We define a color to use for the widget's background, and set up various
+ attributes that define how the scene will be rendered.
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 6
+
+ We call the \c setupViewport() private function to set up the
+ projection used for the scene. This is unnecessary in OpenGL
+ examples that implement the \l{QGLWidget::paintGL()}{paintGL()}
+ function because the matrix stacks are usually unmodified between
+ calls to \l{QGLWidget::resizeGL()}{resizeGL()} and
+ \l{QGLWidget::paintGL()}{paintGL()}.
+
+ Since the widget's background is not drawn by the system or by Qt, we use
+ an OpenGL call to paint it before positioning the object defined earlier
+ in the scene:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 7
+
+ Once the list containing the object has been executed, the matrix stack
+ needs to be restored to its original state at the start of this function
+ before we can begin overpainting:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 8
+
+ With the 3D graphics done, we construct a QPainter for use on the widget
+ and simply overpaint the widget with 2D graphics; in this case, using a
+ helper class to draw a number of translucent bubbles onto the widget,
+ and calling \c drawInstructions() to overlay some instructions:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 10
+
+ When QPainter::end() is called, suitable OpenGL-specific calls are made to
+ write the scene, and its additional contents, onto the widget.
+
+ The implementation of the \l{QGLWidget::resizeGL()}{resizeGL()} function
+ sets up the dimensions of the viewport and defines a projection
+ transformation:
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 11
+
+ Ideally, we want to arrange the 2D graphics to suit the widget's dimensions.
+ To achieve this, we implement the \l{QWidget::showEvent()}{showEvent()} handler,
+ creating new graphic elements (bubbles) if necessary at appropriate positions
+ in the widget.
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 12
+
+ This function only has an effect if less than 20 bubbles have already been
+ created.
+
+ The \c animate() slot is called every time the widget's \c animationTimer emits
+ the \l{QTimer::timeout()}{timeout()} signal. This keeps the bubbles moving
+ around.
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 13
+
+ We simply iterate over the bubbles in the \c bubbles list, updating the
+ widget before and after each of them is moved.
+
+ The \c setupViewport() function is called from \c paintEvent()
+ and \c resizeGL().
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 14
+
+ The \c drawInstructions() function is used to prepare some basic
+ instructions that will be painted with the other 2D graphics over
+ the 3D scene.
+
+ \snippet examples/opengl/overpainting/glwidget.cpp 15
+
+ \section1 Summary
+
+ When overpainting 2D content onto 3D content, we need to use a QPainter
+ \e and make OpenGL calls to achieve the desired effect. Since QPainter
+ itself uses OpenGL calls when used on a QGLWidget subclass, we need to
+ preserve the state of various OpenGL stacks when we perform our own
+ calls, using the following approach:
+
+ \list
+ \o Reimplement QGLWidget::initializeGL(), but only perform minimal
+ initialization. QPainter will perform its own initialization
+ routines, modifying the matrix and property stacks, so it is better
+ to defer certain initialization tasks until just before you render
+ the 3D scene.
+ \o Reimplement QGLWidget::resizeGL() as in the pure 3D case.
+ \o Reimplement QWidget::paintEvent() to draw both 2D and 3D graphics.
+ \endlist
+
+ The \l{QWidget::paintEvent()}{paintEvent()} implementation performs the
+ following tasks:
+
+ \list
+ \o Push the current OpenGL modelview matrix onto a stack.
+ \o Perform initialization tasks usually done in the
+ \l{QGLWidget::initializeGL()}{initializeGL()} function.
+ \o Perform code that would normally be located in the widget's
+ \l{QGLWidget::resizeGL()}{resizeGL()} function to set the correct
+ perspective transformation and set up the viewport.
+ \o Render the scene using OpenGL calls.
+ \o Pop the OpenGL modelview matrix off the stack.
+ \o Construct a QPainter object.
+ \o Initialize it for use on the widget with the QPainter::begin() function.
+ \o Draw primitives using QPainter's member functions.
+ \o Call QPainter::end() to finish painting.
+ \endlist
+*/
diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc
new file mode 100644
index 0000000..f43725b
--- /dev/null
+++ b/doc/src/examples/padnavigator.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/padnavigator
+ \title Pad Navigator Example
+
+ The Pad Navigator Example shows how you can use Graphics View
+ together with embedded widgets to create a simple but useful
+ dynamic user interface for embedded devices.
+
+ \image padnavigator-example.png
+*/
diff --git a/doc/src/examples/painterpaths.qdoc b/doc/src/examples/painterpaths.qdoc
new file mode 100644
index 0000000..fd27566
--- /dev/null
+++ b/doc/src/examples/painterpaths.qdoc
@@ -0,0 +1,432 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/painterpaths
+ \title Painter Paths Example
+
+ The Painter Paths example shows how painter paths can be used to
+ build complex shapes for rendering.
+
+ \image painterpaths-example.png
+
+ The QPainterPath class provides a container for painting
+ operations, enabling graphical shapes to be constructed and
+ reused.
+
+ A painter path is an object composed of a number of graphical
+ building blocks (such as rectangles, ellipses, lines, and curves),
+ and can be used for filling, outlining, and clipping. The main
+ advantage of painter paths over normal drawing operations is that
+ complex shapes only need to be created once, but they can be drawn
+ many times using only calls to QPainter::drawPath().
+
+ The example consists of two classes:
+
+ \list
+ \o The \c RenderArea class which is a custom widget displaying
+ a single painter path.
+ \o The \c Window class which is the applications main window
+ displaying several \c RenderArea widgets, and allowing the user
+ to manipulate the painter paths' filling, pen, color
+ and rotation angle.
+ \endlist
+
+ First we will review the \c Window class, then we will take a look
+ at the \c RenderArea class.
+
+ \section1 Window Class Definition
+
+ The \c Window class inherits QWidget, and is the applications main
+ window displaying several \c RenderArea widgets, and allowing the
+ user to manipulate the painter paths' filling, pen, color and
+ rotation angle.
+
+ \snippet examples/painting/painterpaths/window.h 0
+
+ We declare three private slots to respond to user input regarding
+ filling and color: \c fillRuleChanged(), \c fillGradientChanged()
+ and \c penColorChanged().
+
+ When the user changes the pen width and the rotation angle, the
+ new value is passed directly on to the \c RenderArea widgets using
+ the QSpinBox::valueChanged() signal. The reason why we must
+ implement slots to update the filling and color, is that QComboBox
+ doesn't provide a similar signal passing the new value as
+ argument; so we need to retrieve the new value, or values, before
+ we can update the \c RenderArea widgets.
+
+ \snippet examples/painting/painterpaths/window.h 1
+
+ We also declare a couple of private convenience functions: \c
+ populateWithColors() populates a given QComboBox with items
+ corresponding to the color names Qt knows about, and \c
+ currentItemData() returns the current item for a given QComboBox.
+
+ \snippet examples/painting/painterpaths/window.h 2
+
+ Then we declare the various components of the main window
+ widget. We also declare a convenience constant specifying the
+ number of \c RenderArea widgets.
+
+ \section1 Window Class Implementation
+
+ In the implementation of the \c Window class we first declare the
+ constant \c Pi with six significant figures:
+
+ \snippet examples/painting/painterpaths/window.cpp 0
+
+ In the constructor, we then define the various painter paths and
+ create corresponding \c RenderArea widgets which will render the
+ graphical shapes:
+
+ \snippet examples/painting/painterpaths/window.cpp 1
+
+ We construct a rectangle with sharp corners using the
+ QPainterPath::moveTo() and QPainterPath::lineTo()
+ functions.
+
+ QPainterPath::moveTo() moves the current point to the point passed
+ as argument. A painter path is an object composed of a number of
+ graphical building blocks, i.e. subpaths. Moving the current point
+ will also start a new subpath (implicitly closing the previously
+ current path when the new one is started). The
+ QPainterPath::lineTo() function adds a straight line from the
+ current point to the given end point. After the line is drawn, the
+ current point is updated to be at the end point of the line.
+
+ We first move the current point starting a new subpath, and we
+ draw three of the rectangle's sides. Then we call the
+ QPainterPath::closeSubpath() function which draws a line to the
+ beginning of the current subpath. A new subpath is automatically
+ begun when the current subpath is closed. The current point of the
+ new path is (0, 0). We could also have called
+ QPainterPath::lineTo() to draw the last line as well, and then
+ explicitly start a new subpath using the QPainterPath::moveTo()
+ function.
+
+ QPainterPath also provide the QPainterPath::addRect() convenience
+ function, which adds a given rectangle to the path as a closed
+ subpath. The rectangle is added as a clockwise set of lines. The
+ painter path's current position after the rect has been added is
+ at the top-left corner of the rectangle.
+
+ \snippet examples/painting/painterpaths/window.cpp 2
+
+ Then we construct a rectangle with rounded corners. As before, we
+ use the QPainterPath::moveTo() and QPainterPath::lineTo()
+ functions to draw the rectangle's sides. To create the rounded
+ corners we use the QPainterPath::arcTo() function.
+
+ QPainterPath::arcTo() creates an arc that occupies the given
+ rectangle (specified by a QRect or the rectangle's coordinates),
+ beginning at the given start angle and extending the given degrees
+ counter-clockwise. Angles are specified in degrees. Clockwise arcs
+ can be specified using negative angles. The function connects the
+ current point to the starting point of the arc if they are not
+ already connected.
+
+ \snippet examples/painting/painterpaths/window.cpp 3
+
+ We also use the QPainterPath::arcTo() function to construct the
+ ellipse path. First we move the current point starting a new
+ path. Then we call QPainterPath::arcTo() with starting angle 0.0
+ and 360.0 degrees as the last argument, creating an ellipse.
+
+ Again, QPainterPath provides a convenience function (
+ QPainterPath::addEllipse()) which creates an ellipse within a
+ given bounding rectangle and adds it to the painter path. If the
+ current subpath is closed, a new subpath is started. The ellipse
+ is composed of a clockwise curve, starting and finishing at zero
+ degrees (the 3 o'clock position).
+
+ \snippet examples/painting/painterpaths/window.cpp 4
+
+ When constructing the pie chart path we continue to use a
+ combination of the mentioned functions: First we move the current
+ point, starting a new subpath. Then we create a line from the
+ center of the chart to the arc, and the arc itself. When we close
+ the subpath, we implicitly construct the last line back to the
+ center of the chart.
+
+ \snippet examples/painting/painterpaths/window.cpp 5
+
+ Constructing a polygon is equivalent to constructing a rectangle.
+
+ QPainterPath also provide the QPainterPath::addPolygon()
+ convenience function which adds the given polygon to the path as a
+ new subpath. Current position after the polygon has been added is
+ the last point in polygon.
+
+ \snippet examples/painting/painterpaths/window.cpp 6
+
+ Then we create a path consisting of a group of subpaths: First we
+ move the current point, and create a circle using the
+ QPainterPath::arcTo() function with starting angle 0.0, and 360
+ degrees as the last argument, as we did when we created the
+ ellipse path. Then we move the current point again, starting a
+ new subpath, and construct three sides of a square using the
+ QPainterPath::lineTo() function.
+
+ Now, when we call the QPainterPath::closeSubpath() fucntion the
+ last side is created. Remember that the
+ QPainterPath::closeSubpath() function draws a line to the
+ beginning of the \e current subpath, i.e the square.
+
+ QPainterPath provide a convenience function,
+ QPainterPath::addPath() which adds a given path to the path that
+ calls the function.
+
+ \snippet examples/painting/painterpaths/window.cpp 7
+
+ When creating the text path, we first create the font. Then we set
+ the font's style strategy which tells the font matching algorithm
+ what type of fonts should be used to find an appropriate default
+ family. QFont::ForceOutline forces the use of outline fonts.
+
+ To construct the text, we use the QPainterPath::addText() function
+ which adds the given text to the path as a set of closed subpaths
+ created from the supplied font. The subpaths are positioned so
+ that the left end of the text's baseline lies at the specified
+ point.
+
+ \snippet examples/painting/painterpaths/window.cpp 8
+
+ To create the Bezier path, we use the QPainterPath::cubicTo()
+ function which adds a Bezier curve between the current point and
+ the given end point with the given control point. After the curve
+ is added, the current point is updated to be at the end point of
+ the curve.
+
+ In this case we omit to close the subpath so that we only have a
+ simple curve. But there is still a logical line from the curve's
+ endpoint back to the beginning of the subpath; it becomes visible
+ when filling the path as can be seen in the applications main
+ window.
+
+ \snippet examples/painting/painterpaths/window.cpp 9
+
+ The final path that we construct shows that you can use
+ QPainterPath to construct rather complex shapes using only the
+ previous mentioned QPainterPath::moveTo(), QPainterPath::lineTo()
+ and QPainterPath::closeSubpath() functions.
+
+ \snippet examples/painting/painterpaths/window.cpp 10
+
+ Now that we have created all the painter paths that we need, we
+ create a corresponding \c RenderArea widget for each. In the end,
+ we make sure that the number of render areas is correct using the
+ Q_ASSERT() macro.
+
+ \snippet examples/painting/painterpaths/window.cpp 11
+
+ Then we create the widgets associated with the painter paths' fill
+ rule.
+
+ There are two available fill rules in Qt: The Qt::OddEvenFill rule
+ determine whether a point is inside the shape by drawing a
+ horizontal line from the point to a location outside the shape,
+ and count the number of intersections. If the number of
+ intersections is an odd number, the point is inside the
+ shape. This rule is the default.
+
+ The Qt::WindingFill rule determine whether a point is inside the
+ shape by drawing a horizontal line from the point to a location
+ outside the shape. Then it determines whether the direction of the
+ line at each intersection point is up or down. The winding number
+ is determined by summing the direction of each intersection. If
+ the number is non zero, the point is inside the shape.
+
+ The Qt::WindingFill rule can in most cases be considered as the
+ intersection of closed shapes.
+
+ \snippet examples/painting/painterpaths/window.cpp 12
+
+ We also create the other widgets associated with the filling, the
+ pen and the rotation angle.
+
+ \snippet examples/painting/painterpaths/window.cpp 16
+
+ We connect the comboboxes \l {QComboBox::activated()}{activated()}
+ signals to the associated slots in the \c Window class, while we
+ connect the spin boxes \l
+ {QSpinBox::valueChanged()}{valueChanged()} signal directly to the
+ \c RenderArea widget's respective slots.
+
+ \snippet examples/painting/painterpaths/window.cpp 17
+
+ We add the \c RenderArea widgets to a separate layout which we
+ then add to the main layout along with the rest of the widgets.
+
+ \snippet examples/painting/painterpaths/window.cpp 18
+
+ Finally, we initialize the \c RenderArea widgets by calling the \c
+ fillRuleChanged(), \c fillGradientChanged() and \c
+ penColorChanged() slots, and we set the inital pen width and
+ window title.
+
+ \snippet examples/painting/painterpaths/window.cpp 19
+ \codeline
+ \snippet examples/painting/painterpaths/window.cpp 20
+ \codeline
+ \snippet examples/painting/painterpaths/window.cpp 21
+
+ The private slots are implemented to retrieve the new value, or
+ values, from the associated comboboxes and update the RenderArea
+ widgets.
+
+ First we determine the new value, or values, using the private \c
+ currentItemData() function and the qvariant_cast() template
+ function. Then we call the associated slot for each of the \c
+ RenderArea widgets to update the painter paths.
+
+ \snippet examples/painting/painterpaths/window.cpp 22
+
+ The \c populateWithColors() function populates the given combobox
+ with items corresponding to the color names Qt knows about
+ provided by the static QColor::colorNames() function.
+
+ \snippet examples/painting/painterpaths/window.cpp 23
+
+ The \c currentItemData() function simply return the current item
+ of the given combobox.
+
+ \section1 RenderArea Class Definition
+
+ The \c RenderArea class inherits QWidget, and is a custom widget
+ displaying a single painter path.
+
+ \snippet examples/painting/painterpaths/renderarea.h 0
+
+ We declare several public slots updating the \c RenderArea
+ widget's associated painter path. In addition we reimplement the
+ QWidget::minimumSizeHint() and QWidget::sizeHint() functions to
+ give the \c RenderArea widget a reasonable size within our
+ application, and we reimplement the QWidget::paintEvent() event
+ handler to draw its painter path.
+
+ \snippet examples/painting/painterpaths/renderarea.h 1
+
+ Each instance of the \c RenderArea class has a QPainterPath, a
+ couple of fill colors, a pen width, a pen color and a rotation
+ angle.
+
+ \section1 RenderArea Class Implementation
+
+ The constructor takes a QPainterPath as argument (in addition to
+ the optional QWidget parent):
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 0
+
+ In the constructor we initialize the \c RenderArea widget with the
+ QPainterPath parameter as well as initializing the pen width and
+ rotation angle. We also set the widgets \l
+ {QWidget::backgroundRole()}{background role}; QPalette::Base is
+ typically white.
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 1
+ \codeline
+ \snippet examples/painting/painterpaths/renderarea.cpp 2
+
+ Then we reimplement the QWidget::minimumSizeHint() and
+ QWidget::sizeHint() functions to give the \c RenderArea widget a
+ reasonable size within our application.
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 3
+ \codeline
+ \snippet examples/painting/painterpaths/renderarea.cpp 4
+ \codeline
+ \snippet examples/painting/painterpaths/renderarea.cpp 5
+ \codeline
+ \snippet examples/painting/painterpaths/renderarea.cpp 6
+ \codeline
+ \snippet examples/painting/painterpaths/renderarea.cpp 7
+
+ The various public slots updates the \c RenderArea widget's
+ painter path by setting the associated property and make a call to
+ the QWidget::update() function, forcing a repaint of the widget
+ with the new rendering preferences.
+
+ The QWidget::update() slot does not cause an immediate repaint;
+ instead it schedules a paint event for processing when Qt returns
+ to the main event loop.
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 8
+
+ A paint event is a request to repaint all or parts of the
+ widget. The paintEvent() function is an event handler that can be
+ reimplemented to receive the widget's paint events. We reimplement
+ the event handler to render the \c RenderArea widget's painter
+ path.
+
+ First, we create a QPainter for the \c RenderArea instance, and
+ set the painter's render hints. The QPainter::RenderHints are used
+ to specify flags to QPainter that may, or may not, be respected by
+ any given engine. QPainter::Antialiasing indicates that the engine
+ should anti-alias the edges of primitives if possible, i.e. put
+ additional pixels around the original ones to smooth the edges.
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 9
+
+ Then we scale the QPainter's coordinate system to ensure that the
+ painter path is rendered in the right size, i.e that it grows with
+ the \c RenderArea widget when the application is resized. When we
+ constructed the various painter paths, they were all rnedered
+ within a square with a 100 pixel width wich is equivalent to \c
+ RenderArea::sizeHint(). The QPainter::scale() function scales the
+ coordinate system by the \c RenderArea widget's \e current width
+ and height divided by 100.
+
+ Now, when we are sure that the painter path has the right size, we
+ can translate the coordinate system to make the painter path
+ rotate around the \c RenderArea widget's center. After we have
+ performed the rotation, we must remember to translate the
+ coordinate system back again.
+
+ \snippet examples/painting/painterpaths/renderarea.cpp 10
+
+ Then we set the QPainter's pen with the instance's rendering
+ preferences. We create a QLinearGradient and set its colors
+ corresponding to the \c RenderArea widget's fill colors. Finally,
+ we set the QPainter's brush (the gradient is automatically
+ converted into a QBrush), and draw the \c RenderArea widget's
+ painter path using the QPainter::drawPath() function.
+*/
diff --git a/doc/src/examples/pbuffers.qdoc b/doc/src/examples/pbuffers.qdoc
new file mode 100644
index 0000000..347cf3d
--- /dev/null
+++ b/doc/src/examples/pbuffers.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/pbuffers
+ \title Pixel Buffers Example
+
+ The Pixel Buffers example demonstrates how to use the
+ QGLPixelBuffer class to render into an off-screen buffer and use
+ the contents as a dynamic texture in a QGLWidget.
+
+ \image pbuffers-example.png
+*/
diff --git a/doc/src/examples/pbuffers2.qdoc b/doc/src/examples/pbuffers2.qdoc
new file mode 100644
index 0000000..5426852
--- /dev/null
+++ b/doc/src/examples/pbuffers2.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/pbuffers2
+ \title Pixel Buffers 2 Example
+
+ The Pixel Buffers 2 example demonstrates how to use the
+ QGLPixelBuffer class to render into an off-screen buffer and use
+ the contents as a dynamic texture in a QGLWidget.
+
+ \image pbuffers2-example.png
+*/
diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc
new file mode 100644
index 0000000..2a8b43d
--- /dev/null
+++ b/doc/src/examples/pixelator.qdoc
@@ -0,0 +1,271 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/pixelator
+ \title Pixelator Example
+
+ The Pixelator example shows how delegates can be used to customize the way that
+ items are rendered in standard item views.
+
+ \image pixelator-example.png
+
+ By default, QTreeView, QTableView, and QListView use a standard item delegate
+ to display and edit a set of common data types that are sufficient for many
+ applications. However, an application may need to represent items of data in a
+ particular way, or provide support for rendering more specialized data types,
+ and this often requires the use of a custom delegate.
+
+ In this example, we show how to use custom delegates to modify the appearance
+ of standard views. To do this, we implement the following components:
+
+ \list
+ \i A model which represents each pixel in an image as an item of data, where each
+ item contains a value for the brightness of the corresponding pixel.
+ \i A custom delegate that uses the information supplied by the model to represent
+ each pixel as a black circle on a white background, where the radius of the
+ circle corresponds to the darkness of the pixel.
+ \endlist
+
+ This example may be useful for developers who want to implement their own table
+ models or custom delegates. The process of creating custom delegates for editing
+ item data is covered in the \l{Spin Box Delegate Example}{Spin Box Delegate}
+ example.
+
+ \section1 ImageModel Class Definition
+
+ The \c ImageModel class is defined as follows:
+
+ \snippet examples/itemviews/pixelator/imagemodel.h 0
+
+ Since we only require a simple, read-only table model, we only need to implement
+ functions to indicate the dimensions of the image and supply data to other
+ components.
+
+ For convenience, the image to be used is passed in the constructor.
+
+ \section1 ImageModel Class Implementation
+
+ The constructor is trivial:
+
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 0
+
+ The \c setImage() function sets the image that will be used by the model:
+
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 1
+
+ The QAbstractItemModel::reset() call tells the view(s) that the model
+ has changed.
+
+ The \c rowCount() and \c columnCount() functions return the height and width of
+ the image respectively:
+
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 2
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 3
+
+ Since the image is a simple two-dimensional structure, the \c parent arguments
+ to these functions are unused. They both simply return the relevant size from
+ the underlying image object.
+
+ The \c data() function returns data for the item that corresponds to a given
+ model index in a format that is suitable for a particular role:
+
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 4
+
+ In this implementation, we only check that the model index is valid, and that
+ the role requested is the \l{Qt::ItemDataRole}{DisplayRole}. If so, the function
+ returns the grayscale value of the relevant pixel in the image; otherwise, a null
+ model index is returned.
+
+ This model can be used with QTableView to display the integer brightness values
+ for the pixels in the image. However, we will implement a custom delegate to
+ display this information in a more artistic way.
+
+ The \c headerData() function is also reimplemented:
+
+ \snippet examples/itemviews/pixelator/imagemodel.cpp 5
+
+ We return (1, 1) as the size hint for a header item. If we
+ didn't, the headers would default to a larger size, preventing
+ us from displaying really small items (which can be specified
+ using the \gui{Pixel size} combobox).
+
+ \section1 PixelDelegate Class Definition
+
+ The \c PixelDelegate class is defined as follows:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.h 0
+
+ This class provides only basic features for a delegate so, unlike the
+ \l{Spin Box Delegate Example}{Spin Box Delegate} example, we subclass
+ QAbstractItemDelegate instead of QItemDelegate.
+
+ We only need to reimplement \l{QAbstractItemDelegate::paint()}{paint()} and
+ \l{QAbstractItemDelegate::sizeHint()}{sizeHint()} in this class.
+ However, we also provide a delegate-specific \c setPixelSize() function so
+ that we can change the delegate's behavior via the signals and slots mechanism.
+
+ \section1 PixelDelegate Class Implementation
+
+ The \c PixelDelegate constructor is used to set up a default value for
+ the size of each "pixel" that it renders. The base class constructor is
+ also called to ensure that the delegate is set up with a parent object,
+ if one is supplied:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 0
+
+ Each item is rendered by the delegate's
+ \l{QAbstractItemDelegate::paint()}{paint()} function. The view calls this
+ function with a ready-to-use QPainter object, style information that the
+ delegate should use to correctly draw the item, and an index to the item in
+ the model:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 1
+
+ The first task the delegate has to perform is to draw the item's background
+ correctly. Usually, selected items appear differently to non-selected items,
+ so we begin by testing the state passed in the style option and filling the
+ background if necessary.
+
+ The radius of each circle is calculated in the following lines of code:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 3
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 4
+
+ First, the largest possible radius of the circle is determined by taking the
+ smallest dimension of the style option's \c rect attribute.
+ Using the model index supplied, we obtain a value for the brightness of the
+ relevant pixel in the image. The radius of the circle is calculated by
+ scaling the brightness to fit within the item and subtracting it from the
+ largest possible radius.
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 5
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 6
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 7
+
+ We save the painter's state, turn on antialiasing (to obtain smoother
+ curves), and turn off the pen.
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 8
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 9
+
+ The foreground of the item (the circle representing a pixel) must be
+ rendered using an appropriate brush. For unselected items, we will use a
+ solid black brush; selected items are drawn using a predefined brush from
+ the style option's palette.
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 10
+
+ Finally, we paint the circle within the rectangle specified by the style
+ option and we call \l{QPainter::}{restore()} on the painter.
+
+ The \c paint() function does not have to be particularly complicated; it is
+ only necessary to ensure that the state of the painter when the function
+ returns is the same as it was when it was called. This usually
+ means that any transformations applied to the painter must be preceded by
+ a call to QPainter::save() and followed by a call to QPainter::restore().
+
+ The delegate's \l{QAbstractItemDelegate::}{sizeHint()} function
+ returns a size for the item based on the predefined pixel size, initially set
+ up in the constructor:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 11
+
+ The delegate's size is updated whenever the pixel size is changed.
+ We provide a custom slot to do this:
+
+ \snippet examples/itemviews/pixelator/pixeldelegate.cpp 12
+
+ \section1 Using The Custom Delegate
+
+ In this example, we use a main window to display a table of data, using the
+ custom delegate to render each cell in a particular way. Much of the
+ \c MainWindow class performs tasks that are not related to item views. Here,
+ we only quote the parts that are relevant. You can look at the rest of the
+ implementation by following the links to the code at the top of this
+ document.
+
+ In the constructor, we set up a table view, turn off its grid, and hide its
+ headers:
+
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 0
+ \dots
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 1
+
+ This enables the items to be drawn without any gaps between them. Removing
+ the headers also prevents the user from adjusting the sizes of individual
+ rows and columns.
+
+ We also set the minimum section size to 1 on the headers. If we
+ didn't, the headers would default to a larger size, preventing
+ us from displaying really small items (which can be specified
+ using the \gui{Pixel size} combobox).
+
+ The custom delegate is constructed with the main window as its parent, so
+ that it will be deleted correctly later, and we set it on the table view.
+
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 2
+
+ Each item in the table view will be rendered by the \c PixelDelegate
+ instance.
+
+ We construct a spin box to allow the user to change the size of each "pixel"
+ drawn by the delegate:
+
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 3
+
+ This spin box is connected to the custom slot we implemented in the
+ \c PixelDelegate class. This ensures that the delegate always draws each
+ pixel at the currently specified size:
+
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 4
+ \dots
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 5
+
+ We also connect the spin box to a slot in the \c MainWindow class. This
+ forces the view to take into account the new size hints for each item;
+ these are provided by the delegate in its \c sizeHint() function.
+
+ \snippet examples/itemviews/pixelator/mainwindow.cpp 6
+
+ We explicitly resize the columns and rows to match the
+ \gui{Pixel size} combobox.
+*/
diff --git a/doc/src/examples/plugandpaint.qdoc b/doc/src/examples/plugandpaint.qdoc
new file mode 100644
index 0000000..3cdd8a4
--- /dev/null
+++ b/doc/src/examples/plugandpaint.qdoc
@@ -0,0 +1,554 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/plugandpaint
+ \title Plug & Paint Example
+
+ The Plug & Paint example demonstrates how to write Qt
+ applications that can be extended through plugins.
+
+ \image plugandpaint.png Screenshot of the Plug & Paint example
+
+ A plugin is a dynamic library that can be loaded at run-time to
+ extend an application. Qt makes it possible to create custom
+ plugins and to load them using QPluginLoader. To ensure that
+ plugins don't get lost, it is also possible to link them
+ statically to the executable. The Plug & Paint example uses
+ plugins to support custom brushes, shapes, and image filters. A
+ single plugin can provide multiple brushes, shapes, and/or
+ filters.
+
+ If you want to learn how to make your own application extensible
+ through plugins, we recommend that you start by reading this
+ overview, which explains how to make an application use plugins.
+ Afterward, you can read the
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} and
+ \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
+ overviews, which show how to implement static and dynamic
+ plugins, respectively.
+
+ Plug & Paint consists of the following classes:
+
+ \list
+ \o \c MainWindow is a QMainWindow subclass that provides the menu
+ system and that contains a \c PaintArea as the central widget.
+ \o \c PaintArea is a QWidget that allows the user to draw using a
+ brush and to insert shapes.
+ \o \c PluginDialog is a dialog that shows information about the
+ plugins detected by the application.
+ \o \c BrushInterface, \c ShapeInterface, and \c FilterInterface are
+ abstract base classes that can be implemented by plugins to
+ provide custom brushes, shapes, and image filters.
+ \endlist
+
+ \section1 The Plugin Interfaces
+
+ We will start by reviewing the interfaces defined in \c
+ interfaces.h. These interfaces are used by the Plug & Paint
+ application to access extra functionality. They are implemented
+ in the plugins.
+
+
+ \snippet examples/tools/plugandpaint/interfaces.h 0
+
+ The \c BrushInterface class declares four pure virtual functions.
+ The first pure virtual function, \c brushes(), returns a list of
+ strings that identify the brushes provided by the plugin. By
+ returning a QStringList instead of a QString, we make it possible
+ for a single plugin to provide multiple brushes. The other
+ functions have a \c brush parameter to identify which brush
+ (among those returned by \c brushes()) is used.
+
+ \c mousePress(), \c mouseMove(), and \c mouseRelease() take a
+ QPainter and one or two \l{QPoint}s, and return a QRect
+ identifying which portion of the image was altered by the brush.
+
+ The class also has a virtual destructor. Interface classes
+ usually don't need such a destructor (because it would make
+ little sense to \c delete the object that implements the
+ interface through a pointer to the interface), but some compilers
+ emit a warning for classes that declare virtual functions but no
+ virtual destructor. We provide the destructor to keep these
+ compilers happy.
+
+ \snippet examples/tools/plugandpaint/interfaces.h 1
+
+ The \c ShapeInterface class declares a \c shapes() function that
+ works the same as \c{BrushInterface}'s \c brushes() function, and
+ a \c generateShape() function that has a \c shape parameter.
+ Shapes are represented by a QPainterPath, a data type that can
+ represent arbitrary 2D shapes or combinations of shapes. The \c
+ parent parameter can be used by the plugin to pop up a dialog
+ asking the user to specify more information.
+
+ \snippet examples/tools/plugandpaint/interfaces.h 2
+
+ The \c FilterInterface class declares a \c filters() function
+ that returns a list of filter names, and a \c filterImage()
+ function that applies a filter to an image.
+
+ \snippet examples/tools/plugandpaint/interfaces.h 4
+
+ To make it possible to query at run-time whether a plugin
+ implements a given interface, we must use the \c
+ Q_DECLARE_INTERFACE() macro. The first argument is the name of
+ the interface. The second argument is a string identifying the
+ interface in a unique way. By convention, we use a "Java package
+ name" syntax to identify interfaces. If we later change the
+ interfaces, we must use a different string to identify the new
+ interface; otherwise, the application might crash. It is therefore
+ a good idea to include a version number in the string, as we did
+ above.
+
+ The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
+ and the \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
+ plugin shows how to derive from \c BrushInterface, \c
+ ShapeInterface, and \c FilterInterface.
+
+ A note on naming: It might have been tempting to give the \c
+ brushes(), \c shapes(), and \c filters() functions a more generic
+ name, such as \c keys() or \c features(). However, that would
+ have made multiple inheritance impractical. When creating
+ interfaces, we should always try to give unique names to the pure
+ virtual functions.
+
+ \section1 The MainWindow Class
+
+ The \c MainWindow class is a standard QMainWindow subclass, as
+ found in many of the other examples (e.g.,
+ \l{mainwindows/application}{Application}). Here, we'll
+ concentrate on the parts of the code that are related to plugins.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 4
+
+ The \c loadPlugins() function is called from the \c MainWindow
+ constructor to detect plugins and update the \gui{Brush},
+ \gui{Shapes}, and \gui{Filters} menus. We start by handling static
+ plugins (available through QPluginLoader::staticInstances())
+
+ To the application that uses the plugin, a Qt plugin is simply a
+ QObject. That QObject implements plugin interfaces using multiple
+ inheritance.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 5
+
+ The next step is to load dynamic plugins. We initialize the \c
+ pluginsDir member variable to refer to the \c plugins
+ subdirectory of the Plug & Paint example. On Unix, this is just a
+ matter of initializing the QDir variable with
+ QApplication::applicationDirPath(), the path of the executable
+ file, and to do a \l{QDir::cd()}{cd()}. On Windows and Mac OS X,
+ this file is usually located in a subdirectory, so we need to
+ take this into account.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 6
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 7
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 8
+
+ We use QDir::entryList() to get a list of all files in that
+ directory. Then we iterate over the result using \l foreach and
+ try to load the plugin using QPluginLoader.
+
+ The QObject provided by the plugin is accessible through
+ QPluginLoader::instance(). If the dynamic library isn't a Qt
+ plugin, or if it was compiled against an incompatible version of
+ the Qt library, QPluginLoader::instance() returns a null pointer.
+
+ If QPluginLoader::instance() is non-null, we add it to the menus.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 9
+
+ At the end, we enable or disable the \gui{Brush}, \gui{Shapes},
+ and \gui{Filters} menus based on whether they contain any items.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 10
+
+ For each plugin (static or dynamic), we check which interfaces it
+ implements using \l qobject_cast(). First, we try to cast the
+ plugin instance to a \c BrushInterface; if it works, we call the
+ private function \c addToMenu() with the list of brushes returned
+ by \c brushes(). Then we do the same with the \c ShapeInterface
+ and the \c FilterInterface.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 3
+
+ The \c aboutPlugins() slot is called on startup and can be
+ invoked at any time through the \gui{About Plugins} action. It
+ pops up a \c PluginDialog, providing information about the loaded
+ plugins.
+
+ \image plugandpaint-plugindialog.png Screenshot of the Plugin dialog
+
+
+ The \c addToMenu() function is called from \c loadPlugin() to
+ create \l{QAction}s for custom brushes, shapes, or filters and
+ add them to the relevant menu. The QAction is created with the
+ plugin from which it comes from as the parent; this makes it
+ convenient to get access to the plugin later.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 0
+
+ The \c changeBrush() slot is invoked when the user chooses one of
+ the brushes from the \gui{Brush} menu. We start by finding out
+ which action invoked the slot using QObject::sender(). Then we
+ get the \c BrushInterface out of the plugin (which we
+ conveniently passed as the QAction's parent) and we call \c
+ PaintArea::setBrush() with the \c BrushInterface and the string
+ identifying the brush. Next time the user draws on the paint
+ area, \c PaintArea will use this brush.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 1
+
+ The \c insertShape() is invoked when the use chooses one of the
+ shapes from the \gui{Shapes} menu. We retrieve the QAction that
+ invoked the slot, then the \c ShapeInterface associated with that
+ QAction, and finally we call \c ShapeInterface::generateShape()
+ to obtain a QPainterPath.
+
+ \snippet examples/tools/plugandpaint/mainwindow.cpp 2
+
+ The \c applyFilter() slot is similar: We retrieve the QAction
+ that invoked the slot, then the \c FilterInterface associated to
+ that QAction, and finally we call \c
+ FilterInterface::filterImage() to apply the filter onto the
+ current image.
+
+ \section1 The PaintArea Class
+
+ The \c PaintArea class contains some code that deals with \c
+ BrushInterface, so we'll review it briefly.
+
+ \snippet examples/tools/plugandpaint/paintarea.cpp 0
+
+ In \c setBrush(), we simply store the \c BrushInterface and the
+ brush that are given to us by \c MainWindow.
+
+ \snippet examples/tools/plugandpaint/paintarea.cpp 1
+
+ In the \l{QWidget::mouseMoveEvent()}{mouse move event handler},
+ we call the \c BrushInterface::mouseMove() function on the
+ current \c BrushInterface, with the current brush. The mouse
+ press and mouse release handlers are very similar.
+
+ \section1 The PluginDialog Class
+
+ The \c PluginDialog class provides information about the loaded
+ plugins to the user. Its constructor takes a path to the plugins
+ and a list of plugin file names. It calls \c findPlugins()
+ to fill the QTreeWdiget with information about the plugins:
+
+ \snippet examples/tools/plugandpaint/plugindialog.cpp 0
+
+ The \c findPlugins() is very similar to \c
+ MainWindow::loadPlugins(). It uses QPluginLoader to access the
+ static and dynamic plugins. Its helper function \c
+ populateTreeWidget() uses \l qobject_cast() to find out which
+ interfaces are implemented by the plugins:
+
+ \snippet examples/tools/plugandpaint/plugindialog.cpp 1
+
+ \section1 Importing Static Plugins
+
+ The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
+ is built as a static plugin, to ensure that it is always
+ available to the application. This requires using the
+ Q_IMPORT_PLUGIN() macro somewhere in the application (in a \c
+ .cpp file) and specifying the plugin in the \c .pro file.
+
+ For Plug & Paint, we have chosen to put Q_IMPORT_PLUGIN() in \c
+ main.cpp:
+
+ \snippet examples/tools/plugandpaint/main.cpp 0
+
+ The argument to Q_IMPORT_PLUGIN() is the plugin's name, as
+ specified with Q_EXPORT_PLUGIN2() in the \l{Exporting the
+ Plugin}{plugin}.
+
+ In the \c .pro file, we need to specify the static library.
+ Here's the project file for building Plug & Paint:
+
+ \snippet examples/tools/plugandpaint/plugandpaint.pro 0
+
+ The \c LIBS line variable specifies the library \c pnp_basictools
+ located in the \c ../plugandpaintplugins/basictools directory.
+ (Although the \c LIBS syntax has a distinct Unix flavor, \c qmake
+ supports it on all platforms.)
+
+ The \c CONFIG() code at the end is necessary for this example
+ because the example is part of the Qt distribution and Qt can be
+ configured to be built simultaneously in debug and in release
+ modes. You don't need to for your own plugin applications.
+
+ This completes our review of the Plug & Paint application. At
+ this point, you might want to take a look at the
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} example
+ plugin.
+*/
+
+/*!
+ \example tools/plugandpaintplugins/basictools
+ \title Plug & Paint Basic Tools Example
+
+ The Basic Tools example is a static plugin for the
+ \l{tools/plugandpaint}{Plug & Paint} example. It provides a set
+ of basic brushes, shapes, and filters. Through the Basic Tools
+ example, we will review the four steps involved in writing a Qt
+ plugin:
+
+ \list 1
+ \o Declare a plugin class.
+ \o Implement the interfaces provided by the plugin.
+ \o Export the plugin using the Q_EXPORT_PLUGIN2() macro.
+ \o Build the plugin using an adequate \c .pro file.
+ \endlist
+
+ \section1 Declaration of the Plugin Class
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 0
+
+ We start by including \c interfaces.h, which defines the plugin
+ interfaces for the \l{tools/plugandpaint}{Plug & Paint}
+ application. For the \c #include to work, we need to add an \c
+ INCLUDEPATH entry to the \c .pro file with the path to Qt's \c
+ examples/tools directory.
+
+ The \c BasicToolsPlugin class is a QObject subclass that
+ implements the \c BrushInterface, the \c ShapeInterface, and the
+ \c FilterInterface. This is done through multiple inheritance.
+ The \c Q_INTERFACES() macro is necessary to tell \l{moc}, Qt's
+ meta-object compiler, that the base classes are plugin
+ interfaces. Without the \c Q_INTERFACES() macro, we couldn't use
+ \l qobject_cast() in the \l{tools/plugandpaint}{Plug & Paint}
+ application to detect interfaces.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h 2
+
+ In the \c public section of the class, we declare all the
+ functions from the three interfaces.
+
+ \section1 Implementation of the Brush Interface
+
+ Let's now review the implementation of the \c BasicToolsPlugin
+ member functions inherited from \c BrushInterface.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 0
+
+ The \c brushes() function returns a list of brushes provided by
+ this plugin. We provide three brushes: \gui{Pencil}, \gui{Air
+ Brush}, and \gui{Random Letters}.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 1
+
+ On a mouse press event, we just call \c mouseMove() to draw the
+ spot where the event occurred.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 2
+
+ In \c mouseMove(), we start by saving the state of the QPainter
+ and we compute a few variables that we'll need later.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 3
+
+ Then comes the brush-dependent part of the code:
+
+ \list
+ \o If the brush is \gui{Pencil}, we just call
+ QPainter::drawLine() with the current QPen.
+
+ \o If the brush is \gui{Air Brush}, we start by setting the
+ painter's QBrush to Qt::Dense6Pattern to obtain a dotted
+ pattern. Then we draw a circle filled with that QBrush several
+ times, resulting in a thick line.
+
+ \o If the brush is \gui{Random Letters}, we draw a random letter
+ at the new cursor position. Most of the code is for setting
+ the font to be bold and larger than the default font and for
+ computing an appropriate bounding rect.
+ \endlist
+
+ At the end, we restore the painter state to what it was upon
+ entering the function and we return the bounding rectangle.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 4
+
+ When the user releases the mouse, we do nothing and return an
+ empty QRect.
+
+ \section1 Implementation of the Shape Interface
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 5
+
+ The plugin provides three shapes: \gui{Circle}, \gui{Star}, and
+ \gui{Text...}. The three dots after \gui{Text} are there because
+ the shape pops up a dialog asking for more information. We know
+ that the shape names will end up in a menu, so we include the
+ three dots in the shape name.
+
+ A cleaner but more complicated design would have been to
+ distinguish between the internal shape name and the name used in
+ the user interface.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 6
+
+ The \c generateShape() creates a QPainterPath for the specified
+ shape. If the shape is \gui{Text}, we pop up a QInputDialog to
+ let the user enter some text.
+
+ \section1 Implementation of the Filter Interface
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 7
+
+ The plugin provides three filters: \gui{Invert Pixels}, \gui{Swap
+ RGB}, and \gui{Grayscale}.
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 8
+
+ The \c filterImage() function takes a filter name and a QImage as
+ parameters and returns an altered QImage. The first thing we do
+ is to convert the image to a 32-bit RGB format, to ensure that
+ the algorithms will work as expected. For example,
+ QImage::invertPixels(), which is used to implement the
+ \gui{Invert Pixels} filter, gives counterintuitive results for
+ 8-bit images, because they invert the indices into the color
+ table instead of inverting the color table's entries.
+
+ \section1 Exporting the Plugin
+
+ Whereas applications have a \c main() function as their entry
+ point, plugins need to contain exactly one occurrence of the
+ Q_EXPORT_PLUGIN2() macro to specify which class provides the
+ plugin:
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp 9
+
+ This line may appear in any \c .cpp file that is part of the
+ plugin's source code.
+
+ \section1 The .pro File
+
+ Here's the project file for building the Basic Tools plugin:
+
+ \snippet examples/tools/plugandpaintplugins/basictools/basictools.pro 0
+
+ The \c .pro file differs from typical \c .pro files in many
+ respects. First, it starts with a \c TEMPLATE entry specifying \c
+ lib. (The default template is \c app.) It also adds \c plugin to
+ the \c CONFIG variable. This is necessary on some platforms to
+ avoid generating symbolic links with version numbers in the file
+ name, which is appropriate for most dynamic libraries but not for
+ plugins.
+
+ To make the plugin a static plugin, all that is required is to
+ specify \c static in addition to \c plugin. The
+ \l{tools/plugandpaintplugins/extrafilters}{Extra Filters} plugin,
+ which is compiled as a dynamic plugin, doesn't specify \c static
+ in its \c .pro file.
+
+ The \c INCLUDEPATH variable sets the search paths for global
+ headers (i.e., header files included using \c{#include <...>}).
+ We add Qt's \c examples/tools directory (strictly speaking,
+ \c{examples/tools/plugandpaintplugins/basictools/../..}) to the
+ list, so that we can include \c <plugandpaint/interfaces.h>.
+
+ The \c TARGET variable specifies which name we want to give the
+ target library. We use \c pnp_ as the prefix to show that the
+ plugin is designed to work with Plug & Paint. On Unix, \c lib is
+ also prepended to that name. On all platforms, a
+ platform-specific suffix is appended (e.g., \c .dll on Windows,
+ \c .a on Linux).
+
+ The \c CONFIG() code at the end is necessary for this example
+ because the example is part of the Qt distribution and Qt can be
+ configured to be built simultaneously in debug and in release
+ modes. You don't need to for your own plugins.
+*/
+
+/*!
+ \example tools/plugandpaintplugins/extrafilters
+ \title Plug & Paint Extra Filters Example
+
+ The Extra Filters example is a plugin for the
+ \l{tools/plugandpaint}{Plug & Paint} example. It provides a set
+ of filters in addition to those provided by the
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin.
+
+ Since the approach is identical to
+ \l{tools/plugandpaintplugins/basictools}{Basic Tools}, we won't
+ review the code here. The only part of interes is the
+ \c .pro file, since Extra Filters is a dynamic plugin
+ (\l{tools/plugandpaintplugins/basictools}{Basic Tools} is
+ linked statically into the Plug & Paint executable).
+
+ Here's the project file for building the Extra Filters plugin:
+
+ \snippet examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro 0
+
+ The \c .pro file differs from typical \c .pro files in many
+ respects. First, it starts with a \c TEMPLATE entry specifying \c
+ lib. (The default template is \c app.) It also adds \c plugin to
+ the \c CONFIG variable. This is necessary on some platforms to
+ avoid generating symbolic links with version numbers in the file
+ name, which is appropriate for most dynamic libraries but not for
+ plugins.
+
+ The \c INCLUDEPATH variable sets the search paths for global
+ headers (i.e., header files included using \c{#include <...>}).
+ We add Qt's \c examples/tools directory (strictly speaking,
+ \c{examples/tools/plugandpaintplugins/basictools/../..}) to the
+ list, so that we can include \c <plugandpaint/interfaces.h>.
+
+ The \c TARGET variable specifies which name we want to give the
+ target library. We use \c pnp_ as the prefix to show that the
+ plugin is designed to work with Plug & Paint. On Unix, \c lib is
+ also prepended to that name. On all platforms, a
+ platform-specific suffix is appended (e.g., \c .dll on Windows,
+ \c .so on Linux).
+
+ The \c DESTDIR variable specifies where we want to install the
+ plugin. We put it in Plug & Paint's \c plugins subdirectory,
+ since that's where the application looks for dynamic plugins.
+
+ The \c CONFIG() code at the end is necessary for this example
+ because the example is part of the Qt distribution and Qt can be
+ configured to be built simultaneously in debug and in release
+ modes. You don't need to for your own plugins.
+*/
diff --git a/doc/src/examples/portedasteroids.qdoc b/doc/src/examples/portedasteroids.qdoc
new file mode 100644
index 0000000..d32732f
--- /dev/null
+++ b/doc/src/examples/portedasteroids.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/portedasteroids
+ \title Ported Asteroids Example
+
+ This GraphicsView example is a port of the
+ Asteroids game, which was based on QCanvas.
+
+ \image portedasteroids-example.png
+*/
diff --git a/doc/src/examples/portedcanvas.qdoc b/doc/src/examples/portedcanvas.qdoc
new file mode 100644
index 0000000..76943df
--- /dev/null
+++ b/doc/src/examples/portedcanvas.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example graphicsview/portedcanvas
+ \title Ported Canvas Example
+
+ This GraphicsView example is a port of the old
+ QCanvas example from Qt 3.
+
+ \sa {Porting to Graphics View}
+
+ \image portedcanvas-example.png
+*/
diff --git a/doc/src/examples/previewer.qdoc b/doc/src/examples/previewer.qdoc
new file mode 100644
index 0000000..9cbeec1
--- /dev/null
+++ b/doc/src/examples/previewer.qdoc
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/previewer
+ \title Previewer Example
+
+ The Previewer example shows how to use QtWebKit's QWebView to preview
+ HTML data written in a QPlainTextEdit.
+
+ \image previewer-example.png
+
+ \section1 The User Interface
+
+ Before we begin, we create a user interface using \QD. Two QGroupBox
+ objects - the editor group box and the previewer group box are separated
+ by a QSplitter. In the editor group box, we have a QPlainTextEdit object,
+ \c plainTextEdit, and two QPushButton objects. In the previewer group box,
+ we have a QWebView object, \c webView.
+
+ \image previewer-ui.png
+
+ \section1 Previewer Class Definition
+
+ The \c Previewer class is a subclass of both QWidget and Ui::Form.
+ We subclass Ui::Form in order to embed the \QD user interface form
+ created earlier. This method of embedding forms is known as the
+ \l{The Multiple Inheritance Approach}{multiple inheritance approach}.
+
+ In our \c previewer.h file, we have a constructor and a slot,
+ \c on_previewButton_clicked().
+
+ \snippet examples/webkit/previewer/previewer.h 0
+
+ \section1 Previewer Class Implementation
+
+ The \c{Previewer}'s constructor is only responsible for setting up the
+ user interface.
+
+ \snippet examples/webkit/previewer/previewer.cpp 0
+
+ The \c on_previewButton_clicked() is a slot corresponding to the
+ \c{previewButton}'s \l{QPushButton::}{clicked()} signal. When the
+ \c previewButton is clicked, we extract the contents of \c plainTextEdit,
+ and then invoke the \l{QWebView::}{setHtml()} function to display our
+ contents as HTML.
+
+ \snippet examples/webkit/previewer/previewer.cpp 1
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class for the Previewer example is a subclass of
+ QMainWindow with a constructor and five private slots: \c open(),
+ \c openUrl(), \c save(), \c about() and \c updateTextEdit().
+
+ \snippet examples/webkit/previewer/mainwindow.h 0
+
+ The private objects in \c MainWindow are \c centralWidget, which is
+ a \c Previewer object, \c fileMenu, \c helpMenu and the QAction objects
+ \c openAct, \c openUrlAct, \c saveAct, \c exitAct, \c aboutAct and
+ \c aboutQtAct.
+
+ \snippet examples/webkit/previewer/mainwindow.h 1
+
+ There are three private functions: \c createActions(), \c createMenus()
+ and \c setStartupText(). The \c createActions() and \c createMenus()
+ functions are necessary to set up the main window's actions and
+ assign them to the \gui File and \gui Help menus. The \c setStartupText()
+ function, on the other hand, displays a description about the example
+ in its HTML Previewer window.
+
+ \section1 MainWindow Class Implementation
+
+ The \c{MainWindow}'s constructor invokes \c createActions() and
+ \c createMenus() to set up the \gui File menu and \gui Help menu. Then,
+ the \c Previewer object, \c centralWidget, is set to the main window's
+ central widget. Also, we connect \c webView's
+ \l{QWebView::}{loadFinished()} signal to our \c updateTextEdit() slot.
+ Finally, we call the \c setStartupText() function to display the
+ description of the example.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 0
+
+ Within the \c createActions() function, we instantiate all our private
+ QAction objects which we declared in \c{mainwindow.h}. We set the
+ short cut and status tip for these actions and connect their
+ \l{QAction::}{triggered()} signal to appropriate slots.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 1
+ \dots
+
+ The \c createMenus() function instantiates the QMenu items, \c fileMenu
+ and \c helpMenu and adds them to the main window's
+ \l{QMainWindow::menuBar()}{menu bar}.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 2
+
+ The example also provides an \c about() slot to describe its purpose.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 3
+
+ The \c MainWindow class provides two types of \gui Open functions:
+ \c open() and \c openUrl(). The \c open() function opens an HTML file
+ with \c fileName, and reads it with QTextStream. The function then
+ displays the output on \c plainTextEdit. The file's name is obtained
+ using QFileDialog's \l{QFileDialog::}{getOpenFileName()} function.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 4
+
+ The \c openUrl() function, on the other hand, displays a QInputDialog
+ to obtain a URL, and displays it on \c webView.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 5
+
+ In order to save a HTML file, the \c save() function first extracts the
+ contents of \c plainTextEdit and displays a QFileDialog to obtain
+ \c fileName. Then, we use a QTextStream object, \c in, to write to
+ \c file.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 6
+
+ Earlier, in \c{MainWindow}'s constructor, we connected \c{webView}'s
+ \l{QWebView::}{loadFinished()} signal to our private \c updateTextEdit()
+ slot. This slot updates the contents of \c plainTextEdit with the HTML
+ source of the web page's main frame, obtained using \l{QWebFrame}'s
+ \l{QWebFrame::}{toHtml()} function.
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 7
+
+ To provide a description about the Previewer example, when it starts up,
+ we use the \c setStartupText() function, as shown below:
+
+ \snippet examples/webkit/previewer/mainwindow.cpp 8
+
+
+ \section1 The \c{main()} Function
+
+ The \c main() function instantiates a \c MainWindow object, \c mainWindow,
+ and displays it with the \l{QWidget::}{show()} function.
+
+ \snippet examples/webkit/previewer/main.cpp 0
+
+*/ \ No newline at end of file
diff --git a/doc/src/examples/qobjectxmlmodel.qdoc b/doc/src/examples/qobjectxmlmodel.qdoc
new file mode 100644
index 0000000..ce1dab6
--- /dev/null
+++ b/doc/src/examples/qobjectxmlmodel.qdoc
@@ -0,0 +1,353 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xmlpatterns/qobjectxmlmodel
+ \title QObject XML Model Example
+
+ This example shows how to use QtXmlPatterns to query QObject trees
+ by modeling the non-XML data structure of a QObject tree to look
+ like XML.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ This example illustrates two important points about using XQuery to
+ query non-XML data modeled to look like XML. The first point is that
+ a custom node model class doesn't always have to actually build the
+ node model. Sometimes the node model can be an already existing data
+ structure, like the QObject tree used in this example. The second
+ point is to explain what is required to make non-XML data look like
+ XML.
+
+ In this example, we want to model a QObject tree to look like
+ XML. That is easy to do because a QObject tree maps to the XML tree
+ structure in a staightforward way. Each QObject node is modeled as
+ an XML element node. However, when we want to add the QMetaObject tree
+ to the QObject tree node model, we are trying to add a second tree to
+ the node model. The QMetaObject tree exists \e{behind} the QObject
+ tree. Adding the QMetaObject tree to the node model changes the two
+ dimensional tree into a three dimensional tree.
+
+ The query engine can only traverse two dimensional trees, because an
+ XML document is always a two dimensional tree. If we want to add the
+ QMetaObject tree to the node model, we have to somehow flatten it
+ into the the same plane as the QObject tree. This requires that the
+ node model class must build an auxiliary data structure and make it
+ part of the two dimensional QObject node model. How to do this is
+ explained in \l{Including The QMetaObject Tree}.
+
+ \section2 The User Interface
+
+ The UI for this example was created using Qt Designer:
+
+ \image qobjectxmlmodel-example.png
+
+ \section1 Code Walk-Through
+
+ The strategy for this example is different from the strategy for the
+ \l{File System Example}{file system example}. In the file system
+ example, the node model class had to actually build a node model
+ because the non-XML data to be traversed was the computer's file
+ system, a structure stored on disk in a form that the query engine
+ couldn't use. The node model class had to build an analog of the
+ computer's file system in memory.
+
+ For this example, the data structure to be traversed already exists
+ in memory in a usable form. It is the QObject tree of the example
+ application itself. All we need is the pointer to the root of the
+ QObject tree.
+
+ \note When we add the QMetaObject tree to the node model, the node
+ model class will have to build an auxiliary data structure to move
+ the QMetaObject tree into the same plane as the QObject tree. This
+ is explained later in \l{Including The QMetaObject Tree}.
+
+ \section2 The Custom Node Model Class: QObjextXmlModel
+
+ The node model class for this example is QObjextXmlModel, which is
+ derived from QSimpleXmlNodeModel. QObjextXmlModel implements the
+ callback interface functions that don't have implementations in
+ QSimpleXmlNodeModel:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h 0
+
+ The node model class declares three data members:
+
+ \target Three Data Members
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h 2
+
+ The constructor sets \c m_baseURI to the QUrl constructed from the
+ \l{QCoreApplication::applicationFilePath()}{file path} of the
+ application executable. This is the value returned by
+ \l{QAbstractXmlNodeModel::documentUri()}{documentUri()}. The
+ constructor sets \c{m_root} to point to the QObject tree for the
+ example application. This is the node model that the query engine
+ will use. And the constructor calls a local function to build the
+ auxiliary data structure (\c{m_allMetaObjects}) for including the
+ QMetaObject tree in the node model. How this auxiliary data
+ structure is incorporated into the QObject node model is discussed
+ in \l{Including The QMetaObject Tree}.
+
+ \section3 Accessing The Node Model
+
+ Since the query engine knows nothing about QObject trees, it can
+ only access them by calling functions in the node model callback
+ interface. The query engine passes a QXmlNodeModelIndex to uniquely
+ identify a node in the node model. The QXmlNodeModelIndex is
+ constructed from a pointer to the QObject that represents the node.
+ \l{QAbstractXmlNodeModel::createIndex()}{createIndex()} creates the
+ QXmlNodeModelIndex, as in the local \c{root()} function, for example:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 0
+
+ A QObject represents an element node in the node model, but we also
+ need to represent attribute nodes. For example, the class name of a
+ QObject is an attribute of the QObject, so it should be an attribute
+ node in the node model. A QObject's class name is obtained from the
+ QObject. (Actually, it is in the QMetaObject, which is obtained from
+ the QObject). This means that a single QObject logically represents
+ multiple nodes in the node model: the element node and potentially
+ many attribute nodes.
+
+ To uniquely identify an attribute node, we need the pointer to the
+ QObject containing the attribute, and an additional value that
+ identifies the attribute in the QObject. For this \e{additional
+ data} value, we use \c{enum QObjectNodeType}:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h 3
+
+ Ignore the \c{MetaObjectXXX} values for now. They will be explained
+ in \l{Including The QMetaObject Tree}. Here we are interested in the
+ three node types for QObject nodes: \c{IsQObject}, which represents
+ the element node type for a QObject, and \c{QObjectProperty} and
+ \c{QObjectClassName}, which represent the attribute node types for
+ the attributes of a QObject.
+
+ The \l{QAbstractXmlNodeModel::createIndex()}{createIndex()}
+ function called in the \c{root()} snippet above is the overload that
+ accepts a \c{void*} pointer and a second parameter,
+ \c{additionalData}, with default value 0 (\c{IsQObject}). Wherever
+ you see a call to \l{QAbstractXmlNodeModel::createIndex()}
+ {createIndex()} that only passes the QObject pointer, it is creating
+ the node index for a QObject element node. To create the node index
+ for the class name attribute, for example, the \l{QObject
+ attributes} {attributes()} function uses
+ \c{createIndex(object,QObjectClassName)}.
+
+ \target QObject attributes
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 6
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 8
+
+ \l{QObject attributes} {attributes()} is one of the callback
+ functions you have to implement in your custom node model class. It
+ returns a QVector of \l{QXmlNodeModelIndex} {node indexes} for all
+ the attribute nodes for QObject \c{n}. It calls
+ \l{QAbstractXmlNodeModel::createIndex()} {createIndex()} in two places.
+ Both calls use the QObject pointer from the current node \c{n} (the
+ element node), and just add a different value for the \e{additional data}
+ parameter. This makes sense because, in XML, the attributes of an
+ element are part of that element.
+
+ \section3 Traversing The Node Model
+
+ The query engine traverses the QObject tree by calling back to the
+ node model class's implementation of \l{QObject nextFromSimpleAxis}
+ {nextFromSimpleAxis()}. This function is the heart of the callback
+ interface, and it will probably be the most complex to implement in
+ your custom node model class. Below is a partial listing of the
+ implementation for this example. The full listing will be shown in
+ \l{Including The QMetaObject Tree}, where we discuss traversing the
+ QMetaObject tree.
+
+ \target QObject nextFromSimpleAxis
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 2
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 4
+
+ The main switch uses \c toNodeType(), which obtains the node
+ type from \l{QXmlNodeModelIndex::additionalData()}:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 1
+
+ \c{case IsObject} case is the most interesting. It switches again on
+ the value of the \c{axis} parameter, which specifies the direction
+ the query engine wants to take from the current node. It is one of
+ the four enum values of \l{QAbstractXmlNodeModel::SimpleAxis}. The
+ \l{QAbstractXmlNodeModel::Parent} {Parent} and
+ \l{QAbstractXmlNodeModel::FirstChild} {FirstChild} cases reduce to
+ calls to QObject::parent() and QObject::children()
+ respectively. Note that a default constructed QXmlNodeModelIndex is
+ returned in the \l{QAbstractXmlNodeModel::Parent} {Parent} case if
+ the current node is the root, and in the
+ \l{QAbstractXmlNodeModel::FirstChild} {FirstChild} case if the
+ current node has no children.
+
+ For the \l{QAbstractXmlNodeModel::NextSibling} {NextSibling} and
+ \l{QAbstractXmlNodeModel::PreviousSibling} {PreviousSibling} axes,
+ the helper function \c{qObjectSibling()} is called, with +1 to
+ traverse to the \l{QAbstractXmlNodeModel::NextSibling} {NextSibling}
+ and -1 to traverse to the
+ \l{QAbstractXmlNodeModel::PreviousSibling} {PreviousSibling}.
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 5
+
+ \c{qObjectSibling()} determines whether or not the node has any
+ siblings. It is called with \c{n}, the index of the current node.
+ If the current node is a child, then it has a parent with children
+ (the current node one of these).
+ So, we get the \l{QObject::parent()}{parent}, obtain the parent's
+ \l{QObject::children()} {child list}, find the current node in the
+ list, and construct the node index for the next or previous child
+ (sibling) and return it.
+
+ \note In \l{QObject nextFromSimpleAxis} {nextFromSimpleAxis()}, the
+ special case of asking for the
+ \l{QAbstractXmlNodeModel::PreviousSibling} {PreviousSibling} of the
+ root node is discussed in \l{Including The QMetaObject Tree}.
+
+ Traversing away from a \c{QObjectClassName} attribute node or a
+ \c{QObjectProperty} attribute node might seem a bit confusing at
+ first glance. The only move allowed from an attribute node is to the
+ \l{QAbstractXmlNodeModel::Parent} {Parent}, because attribute nodes
+ don't have children. But these two cases simply return the
+ \l{QXmlNodeModelIndex} {node index} of the current node.
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 7
+
+ Since \c n is the QXmlNodeModelIndex of the current node, all this
+ does is create another QXmlNodeModelIndex for the current node and
+ return it. This was explained above in \l{Accessing The Node Model},
+ where we saw that each QObject in the node model actually represents
+ an element node and potentially many attribute nodes. Traversing to
+ the parent node of an attribute simply creates a node index for the
+ same QObject, but with an \e{additional data} value of 0
+ (\c{IsQObject}).
+
+ If we only wanted to traverse the QObject tree with XQuery, we could
+ just implement the rest of the virtual callback functions listed
+ earlier and we would be done. The implementations for the remaining
+ functions are straightforward. But if we also want to use XQuery to
+ traverse the QMetaObject tree, we must include the QMetaObject tree
+ in the custom node model.
+
+ \section3 Including The QMetaObject Tree
+
+ The \l{Meta-Object System} {metaobject system} not only enables Qt's
+ \l{Signals and Slots} {signals and slots}, it also provides type
+ information that is useful at run-time; e.g., getting and setting
+ properties without knowing the property names at compile time. Each
+ QObject has an associated QMetaObject tree which contains all this
+ useful type information. Given a QObject, its QMetaObject is
+ obtained with QObject::metaObject(). Then QMetaObject::superClass()
+ can be called repeatedly to get the QMetaObject for each class in the
+ class hierarchy for the original QObject.
+
+ However, the QMetaObject hierarchy is a second tree in a plan that
+ exists logically behind the plane of the QObject tree. The QtXmlPatterns
+ query engine can only traverse a two dimensional node model that
+ represents an XML tree. If we want to include the QMetaObject in the
+ same node model that represents the QObject tree, we must find a way
+ to flatten the QMetaObject tree into the same plane as the QObject
+ tree.
+
+ The node model class declares \l{All MetaObjects}{m_allMetaObjects}
+ as a vector of pointers to QMetaObject:
+
+ \target All MetaObjects
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h 1
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h 4
+
+ This vector gets populated by the QObjectXmlModel constructor by
+ calling the private allMetaObjects() function:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 9
+
+ The first half of the function is an example of the standard code
+ pattern for using QtXmlPatterns to run an XQuery. First it creates an
+ instance of QXmlQuery. Then it \l{QXmlQuery::bindVariable()}{binds}
+ the XQuery variable \c{$root} to the root node of the of the node
+ model; i.e., the root of the QObject tree. Then it
+ \l{QXmlQuery::setQuery()} {sets the query} to be an XQuery that
+ returns all the QObjects in the node model. Finally, the query is
+ evaluated into a \l{QXmlResultItems} {result item list}.
+
+ \note \l{QXmlQuery::bindVariable()} must be called before
+ \l{QXmlQuery::setQuery()}, because setting the query causes
+ QtXmlPatterns to \e compile the XQuery, which requires knowledge of
+ the variable bindings.
+
+ The second half of the function traverses the \l{QXmlResultItems}
+ {result item list}, getting the QMetaObject hierarchy for each
+ QObject and appending it to \l{All MetaObjects} {m_allMetaObjects},
+ if it isn't already there. But how do we include this vector of
+ pointers to QMetaObjects in the node model? The key insight is
+ shown in the full listing of \l{Full Listing of nextFromSimpleAxis}
+ {nextFromSimpleAxis()}, where we are interested now in the
+ \c{MetaObjectXXX} cases:
+
+ \target Full Listing of nextFromSimpleAxis
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 2
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 3
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 4
+
+ But first, revisit the \c{PreviousSibling} case for the
+ \c{IsQObject} case:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 10
+
+ When asking for the previous sibling of the root of the QObject
+ tree, it creates a node model index with a null QObject pointer and
+ an \c{additionalData} value of \c{MetaObjects}. This effectively
+ allows the query engine to jump from the QObject tree to the
+ QMetaObject tree.
+
+ The query engine can jump from the QMetaObject tree back to the
+ QObject tree in the \c{NextSibling} case of case \c{MetaObjects},
+ where the \c{root()} function is called:
+
+ \snippet examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp 11
+
+ Having jumped from the QObject tree to the QMetaObject tree, the
+ query engine will use the \c{MetaObject}, \c{MetaObjectClassName},
+ and \c{MetaObjectSuperClass} cases, which are similar to the cases
+ for \c{IsQObject}, \c{QObjectProperty}, and \c{QObjectClassName}.
+*/
diff --git a/doc/src/examples/qtconcurrent-imagescaling.qdoc b/doc/src/examples/qtconcurrent-imagescaling.qdoc
new file mode 100644
index 0000000..74b4be0
--- /dev/null
+++ b/doc/src/examples/qtconcurrent-imagescaling.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/imagescaling
+ \title QtConcurrent Image Scaling Example
+
+ The QtConcurrent Map example shows how to use the asynchronous
+ QtConcurrent API to load and scale a collection of images.
+*/
diff --git a/doc/src/examples/qtconcurrent-map.qdoc b/doc/src/examples/qtconcurrent-map.qdoc
new file mode 100644
index 0000000..9f5295d
--- /dev/null
+++ b/doc/src/examples/qtconcurrent-map.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/map
+ \title QtConcurrent Map Example
+
+ The QtConcurrent Map example shows how to use the synchronous (blocking)
+ QtConcurrent API to scale a collection of images.
+*/
diff --git a/doc/src/examples/qtconcurrent-progressdialog.qdoc b/doc/src/examples/qtconcurrent-progressdialog.qdoc
new file mode 100644
index 0000000..41909fb
--- /dev/null
+++ b/doc/src/examples/qtconcurrent-progressdialog.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/progressdialog
+ \title QtConcurrent Progress Dialog Example
+
+ The QtConcurrent Progress Dialog example shows how to use the
+ QFutureWatcher class to monitor the progress of a long-running operation.
+
+ \image qtconcurrent-progressdialog.png
+*/
diff --git a/doc/src/examples/qtconcurrent-runfunction.qdoc b/doc/src/examples/qtconcurrent-runfunction.qdoc
new file mode 100644
index 0000000..5c40552
--- /dev/null
+++ b/doc/src/examples/qtconcurrent-runfunction.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/runfunction
+ \title QtConcurrent Run Function Example
+
+ The QtConcurrent Run Function example shows how to apply concurrency to
+ a standard function, using QFuture instances to retrieve return values
+ at a later time.
+*/
diff --git a/doc/src/examples/qtconcurrent-wordcount.qdoc b/doc/src/examples/qtconcurrent-wordcount.qdoc
new file mode 100644
index 0000000..d7d3227
--- /dev/null
+++ b/doc/src/examples/qtconcurrent-wordcount.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/wordcount
+ \title QtConcurrent Word Count Example
+
+ The QtConcurrent Word Count example demonstrates the use of the map-reduce
+ algorithm when applied to the problem of counting words in a collection
+ of files.
+*/
diff --git a/doc/src/examples/qtscriptcalculator.qdoc b/doc/src/examples/qtscriptcalculator.qdoc
new file mode 100644
index 0000000..1d713f8
--- /dev/null
+++ b/doc/src/examples/qtscriptcalculator.qdoc
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/calculator
+ \title QtScript Calculator Example
+ \ingroup scripting
+
+ In this simple QtScript example, we show how to implement the
+ functionality of a calculator widget.
+
+ \image qtscript-calculator-example.png
+
+ The program logic in this example is a fairly straight port of the logic in the C++ \l{Calculator Example}.
+ The graphical user interface is defined in a UI file.
+
+ The C++ part of the example consists of four steps:
+ \list
+ \o Evaluate the script code that defines the \c{Calculator} class.
+
+ \snippet examples/script/calculator/main.cpp 0a
+ \snippet examples/script/calculator/main.cpp 0b
+
+ \o Create a widget from the UI file using QUiLoader.
+
+ \snippet examples/script/calculator/main.cpp 1
+
+ \o Call the Calculator constructor function to create a new \c{Calculator} script object, passing the widget as argument.
+
+ \snippet examples/script/calculator/main.cpp 2
+
+ \o Show the widget and start the application event loop.
+
+ \snippet examples/script/calculator/main.cpp 3
+
+ \endlist
+
+ On the script side, the \c{Calculator} constructor function
+ initializes the instance variables of the new \c{Calculator}
+ object, and connects the clicked() signal of the form's buttons
+ to corresponding functions defined in the \c{Calculator} prototype
+ object; the effect is that when a button is clicked, the proper
+ script function will be invoked to carry out the operation.
+
+ \snippet examples/script/calculator/calculator.js 0
+
+ A \c{Calculator} object is just a plain script object; it is not
+ a widget. Instead, it stores a reference to the calculator form
+ (the widget) in an instance variable, \c{ui}. The calculator
+ script functions can access components of the form by referring
+ to the proper children of the \c{ui} member.
+
+ \snippet examples/script/calculator/calculator.js 1
+
+ The digitClicked() function uses the special local variable
+ __qt_sender__ to access the object that triggered the signal;
+ this gives us a simple way to retrieve the value of the digit
+ that was clicked.
+
+ \snippet examples/script/calculator/calculator.js 2
+
+ The changeSign() function shows how we retrieve the text property
+ of the calculator's display, change it appropriately, and write
+ back the new value.
+
+
+*/
diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc
new file mode 100644
index 0000000..f8d85a2
--- /dev/null
+++ b/doc/src/examples/qtscriptcustomclass.qdoc
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/customclass
+ \title Custom Script Class Example
+
+ The Custom Script Class example shows how to use QScriptClass and QScriptClassPropertyIterator
+ to implement a custom script class.
+
+ The script class we are going to implement is called \c{ByteArray}. It provides a wrapper around
+ the QByteArray class in Qt, with a simplified API. Why do we need such a class? Well, neither the
+ ECMAScript \c{Array} class or \c{String} class is appropriate to use when working with arrays of
+ bytes. Our \c{ByteArray} class will have the right semantics; objects will use only the amount of
+ memory that is really needed (a byte is stored as a byte, not as a floating-point number or a
+ Unicode character) and can be passed directly to C++ slots taking QByteArray arguments (no costly
+ conversion necessary).
+
+ \section1 ByteArray Class In Use
+
+ When the \c{ByteArray} class has been made available to the
+ scripting environment, \c{ByteArray} objects can be constructed like
+ so:
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 0
+
+ \c{ByteArray} objects behave similar to normal \c{Array} objects. Every \c{ByteArray} object has
+ a \c{length} property, that holds the length of the array. If a new value is assigned to the \c{length}
+ property, the array is resized. If the array is enlarged, the new bytes are initialized to 0.
+ (This is a difference from normal \c{Array} objects; \c{ByteArray} objects are always dense arrays.)
+ Use normal array operations to read or write bytes in the array. The following code sets all the
+ bytes of an array to a certain value:
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 1
+
+ When assigning a value to an array element, the value is truncated to eight bits:
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 2
+
+ Like normal \c{Array} objects, if the array index is greater than the current length
+ of the array, the array is resized accordingly:
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 3
+
+ Property names that aren't valid array indexes are treated
+ like normal object properties (again, the same is the case for normal \c{Array} objects);
+ in other words, it's perfectly fine to do something like this:
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 4
+
+ The above assignment won't affect the contents of the array, but will rather assign a value
+ to the object property named "foo".
+
+ \c{ByteArray} objects have a set of methods: chop(), equals(), left(), mid(), toBase64() and so on.
+ These map directly onto the corresponding methods in QByteArray.
+
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 5
+
+ \section1 ByteArray Class Implementation
+
+ To implement the \c{ByteArray} script class in C++, we create a subclass of QScriptClass,
+ called ByteArrayClass, and reimplement the virtual functions from QScriptClass. We also provide
+ a Qt Script constructor function suitable for being added to a QScriptEngine's environment.
+
+ The ByteArrayClass constructor prepares the script class:
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 0
+
+ First, the constructor registers a pair of conversion functions, so that C++ QByteArray objects
+ and Qt Script \c{ByteArray} objects can move seamlessly between the C++ side and the script side.
+ For example, if a \c{ByteArray} object is passed to a C++ slot that takes a QByteArray
+ argument, the actual QByteArray that the \c{ByteArray} object wraps will be passed correctly.
+
+ Second, we store a handle to the string "length", so that we can quickly compare a given property name
+ to "length" later on.
+
+ Third, we initialize the standard \c{ByteArray} prototype, to be returned by our prototype()
+ reimplementation later on. (The implementation of the prototype is discussed later.)
+
+ Fourth, we initialize a constructor function for \c{ByteArray}, to be returned by the
+ constructor() function. We set the internal data of the constructor to be a pointer to
+ this ByteArrayClass object, so that the constructor, when it is invoked, can extract the
+ pointer and use it to create a new \c{ByteArray} object.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 1
+
+ The newInstance() function isn't part of the QScriptClass API; its purpose is to offer
+ a convenient way to construct a \c{ByteArray} object from an existing QByteArray. We store the
+ QByteArray as the internal data of the new object, and return the new object.
+ QScriptEngine::newObject() will call the prototype() function of our class, ensuring that
+ the prototype of the new object will be the standard \c{ByteArray} prototype.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 2
+
+ construct() is the native function that will act as a constructor for \c{ByteArray}
+ in scripts. We extract the pointer to the class, then call a newInstance() overload
+ that takes an initial size as argument, and return the new script object.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 3
+
+ queryProperty() is the function that Qt Script will call whenever someone tries to access
+ a property of a \c{ByteArray} object. We first get a pointer to the underlying QByteArray.
+ We check if the property being accessed is the special \c{length} property; if so, we
+ return, indicating that we will handle every kind of access to this property (e.g. both
+ read and write). Otherwise, we attempt to convert the property name to an array index. If
+ this fails, we return, indicating that we don't want to handle this property. Otherwise, we
+ have a valid array index, and store it in the \c{id} argument, so that we don't have to
+ recompute it in e.g. property() or setProperty(). If the index is greater than or equal to
+ the QByteArray's size, we indicate that we don't want to handle read access (but we still want
+ to handle writes, if requested).
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 4
+
+ In the property() reimplementation, we do similar checks as in queryProperty() to find out
+ which property is being requested, and then return the value of that property.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 5
+
+ The setProperty() reimplementation has a structure that is similar to property(). If the \c{length} property
+ is being set, we resize the underlying QByteArray to the given length. Otherwise, we grab the
+ array index that was calculated in the queryProperty() function, enlarge the array if necessary,
+ and write the given value to the array.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 6
+
+ The propertyFlags() reimplementation specifies that the \c{length} property can't be deleted,
+ and that it is not enumerable. Array elements can't be deleted.
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 7
+
+ We want the array elements to show up when a \c{ByteArray} object is used in for-in
+ statements and together with QScriptValueIterator. Therefore, we reimplement the
+ newIterator() function and have it return a new iterator for a given \c{ByteArray}.
+
+ \section1 ByteArray Iterator Implementation
+
+ \snippet examples/script/customclass/bytearrayclass.cpp 8
+
+ The \c{ByteArrayClassPropertyIterator} class is simple. It maintains an index into the
+ underlying QByteArray, and checks and updates the index in hasNext(), next() and so on.
+
+ \section1 ByteArray Prototype Implementation
+
+ The prototype class, ByteArrayPrototype, implements the \c{ByteArray} functions as slots.
+
+ \snippet examples/script/customclass/bytearrayprototype.h 0
+
+ There is a small helper function, thisByteArray(), that returns a pointer to the QByteArray
+ being operated upon:
+
+ \snippet examples/script/customclass/bytearrayprototype.cpp 0
+
+ The slots simply forward the calls to the QByteArray. Examples:
+
+ \snippet examples/script/customclass/bytearrayprototype.cpp 1
+
+ The remove() function is noteworthy; if we look at QByteArray::remove(), we see that it
+ should return a reference to the QByteArray itself (i.e. not a copy). To get the same
+ behavior in scripts, we return the script object (thisObject()).
+*/
diff --git a/doc/src/examples/qtscripttetrix.qdoc b/doc/src/examples/qtscripttetrix.qdoc
new file mode 100644
index 0000000..c96db6a
--- /dev/null
+++ b/doc/src/examples/qtscripttetrix.qdoc
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example script/qstetrix
+ \title Qt Script Tetrix Example
+
+ The QSTetrix example is a Qt Script version of the classic Tetrix game.
+
+ \image tetrix-example.png
+
+ \section1 Overview
+
+ The program logic in this example is a fairly straight port of the
+ logic in the C++ \l{Tetrix Example}. You may find it useful to compare
+ the implementations of the \c TetrixBoard, \c TetrixPiece and
+ \c TetrixWindow classes to see how Qt Script is used to implement
+ methods, call Qt functions, and emit signals.
+
+ \section1 Setting up the GUI
+
+ The graphical user interface is defined in a \c{.ui} file, creating
+ using Qt Designer, and is set up in the example's C++ \c{main.cpp} file.
+
+ \snippet examples/script/qstetrix/main.cpp 0
+
+ We define a custom UI loader that handles our \c TetrixBoard widget; this
+ is the main component of the UI (where the pieces are drawn).
+
+ \snippet examples/script/qstetrix/main.cpp 1
+
+ We initialize the script engine to have the Qt namespace, so that
+ e.g., \l{Qt::Key_Left}{Qt.Key_Left} will be available to script code.
+ We also make the application object available (for the
+ \l{QApplication::}{quit()} slot).
+
+ \snippet examples/script/qstetrix/main.cpp 2
+
+ Several scripts are evaluated as part of the engine setup process.
+ The \c{tetrixpiece.js} file contains the definition of the \c TetrixPiece
+ class, which is used to populate the play field. The \c{tetrixboard.js}
+ file contains the definition of the \c TetrixBoard class, which contains
+ the main game logic. Finally, \c{tetrixwindow.js} contains the definition
+ of the \c TetrixWindow class, which wires up the top-level widget.
+
+ \snippet examples/script/qstetrix/main.cpp 3
+
+ A form is created from the UI file. A new \c TetrixWindow script object
+ is then constructed, passing the form as its argument.
+
+ \snippet examples/script/qstetrix/main.cpp 4
+
+ The form is shown, and the event loop is entered.
+*/
diff --git a/doc/src/examples/querymodel.qdoc b/doc/src/examples/querymodel.qdoc
new file mode 100644
index 0000000..296f609
--- /dev/null
+++ b/doc/src/examples/querymodel.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/querymodel
+ \title Query Model Example
+
+ The Query Model example shows how to make customized versions of
+ data obtained from a SQL query, using a model that encapsulates
+ the query and table views to display the results.
+
+ \image querymodel-example.png
+*/
diff --git a/doc/src/examples/queuedcustomtype.qdoc b/doc/src/examples/queuedcustomtype.qdoc
new file mode 100644
index 0000000..bbd1427
--- /dev/null
+++ b/doc/src/examples/queuedcustomtype.qdoc
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example threads/queuedcustomtype
+ \title Queued Custom Type Example
+
+ The Queued Custom Type example shows how to send custom types between
+ threads with queued signals and slots.
+
+ \image queuedcustomtype-example.png
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Overview
+
+ In the \l{Custom Type Sending Example}, we showed how to use a custom type
+ with signal-slot communication within the same thread.
+
+ In this example, we create a new value class, \c Block, and register it
+ with the meta-object system to enable us to send instances of it between
+ threads using queued signals and slots.
+
+ \section1 The Block Class
+
+ The \c Block class is similar to the \c Message class described in the
+ \l{Custom Type Example}. It provides the default constructor, copy
+ constructor and destructor in the public section of the class that the
+ meta-object system requires. It describes a colored rectangle.
+
+ \snippet examples/threads/queuedcustomtype/block.h custom type definition and meta-type declaration
+
+ We will still need to register it with the meta-object system at
+ run-time by calling the qRegisterMetaType() template function before
+ we make any signal-slot connections that use this type.
+ Even though we do not intend to use the type with QVariant in this example,
+ it is good practice to also declare the new type with Q_DECLARE_METATYPE().
+
+ The implementation of the \c Block class is trivial, so we avoid quoting
+ it here.
+
+ \section1 The Window Class
+
+ We define a simple \c Window class with a public slot that accepts a
+ \c Block object. The rest of the class is concerned with managing the
+ user interface and handling images.
+
+ \snippet examples/threads/queuedcustomtype/window.h Window class definition
+
+ The \c Window class also contains a worker thread, provided by a
+ \c RenderThread object. This will emit signals to send \c Block objects
+ to the window's \c addBlock(Block) slot.
+
+ The parts of the \c Window class that are most relevant are the constructor
+ and the \c addBlock(Block) slot.
+
+ The constructor creates a thread for rendering images, sets up a user
+ interface containing a label and two push buttons that are connected to
+ slots in the same class.
+
+ \snippet examples/threads/queuedcustomtype/window.cpp Window constructor start
+ \snippet examples/threads/queuedcustomtype/window.cpp set up widgets and connections
+ \snippet examples/threads/queuedcustomtype/window.cpp connecting signal with custom type
+
+ In the last of these connections, we connect a signal in the
+ \c RenderThread object to the \c addBlock(Block) slot in the window.
+
+ \dots
+ \snippet examples/threads/queuedcustomtype/window.cpp Window constructor finish
+
+ The rest of the constructor simply sets up the layout of the window.
+
+ The \c addBlock(Block) slot receives blocks from the rendering thread via
+ the signal-slot connection set up in the constructor:
+
+ \snippet examples/threads/queuedcustomtype/window.cpp Adding blocks to the display
+
+ We simply paint these onto the label as they arrive.
+
+ \section1 The RenderThread Class
+
+ The \c RenderThread class processes an image, creating \c Block objects
+ and using the \c sendBlock(Block) signal to send them to other components
+ in the example.
+
+ \snippet examples/threads/queuedcustomtype/renderthread.h RenderThread class definition
+
+ The constructor and destructor are not quoted here. These take care of
+ setting up the thread's internal state and cleaning up when it is destroyed.
+
+ Processing is started with the \c processImage() function, which calls the
+ \c RenderThread class's reimplementation of the QThread::run() function:
+
+ \snippet examples/threads/queuedcustomtype/renderthread.cpp processing the image (start)
+
+ Ignoring the details of the way the image is processed, we see that the
+ signal containing a block is emitted in the usual way:
+
+ \dots
+ \snippet examples/threads/queuedcustomtype/renderthread.cpp processing the image (finish)
+
+ Each signal that is emitted will be queued and delivered later to the
+ window's \c addBlock(Block) slot.
+
+ \section1 Registering the Type
+
+ In the example's \c{main()} function, we perform the registration of the
+ \c Block class as a custom type with the meta-object system by calling the
+ qRegisterMetaType() template function:
+
+ \snippet examples/threads/queuedcustomtype/main.cpp main function
+
+ This call is placed here to ensure that the type is registered before any
+ signal-slot connections are made that use it.
+
+ The rest of the \c{main()} function is concerned with setting a seed for
+ the pseudo-random number generator, creating and showing the window, and
+ setting a default image. See the source code for the implementation of the
+ \c createImage() function.
+
+ \section1 Further Reading
+
+ This example showed how a custom type can be registered with the
+ meta-object system so that it can be used with signal-slot connections
+ between threads. For ordinary communication involving direct signals and
+ slots, it is enough to simply declare the type in the way described in the
+ \l{Custom Type Sending Example}.
+
+ In practice, both the Q_DECLARE_METATYPE() macro and the qRegisterMetaType()
+ template function can be used to register custom types, but
+ qRegisterMetaType() is only required if you need to perform signal-slot
+ communication or need to create and destroy objects of the custom type
+ at run-time.
+
+ More information on using custom types with Qt can be found in the
+ \l{Creating Custom Qt Types} document.
+*/
diff --git a/doc/src/examples/qxmlstreambookmarks.qdoc b/doc/src/examples/qxmlstreambookmarks.qdoc
new file mode 100644
index 0000000..7059043
--- /dev/null
+++ b/doc/src/examples/qxmlstreambookmarks.qdoc
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/streambookmarks
+ \title QXmlStream Bookmarks Example
+
+ The QXmlStream Bookmarks example provides a reader for XML Bookmark
+ Exchange Language (XBEL) files using Qt's QXmlStreamReader class
+ for reading, and QXmlStreamWriter class for writing the files.
+
+ \image xmlstreamexample-screenshot.png
+
+ \section1 XbelWriter Class Definition
+
+ The \c XbelWriter class is a subclass of QXmlStreamReader, which provides
+ an XML parser with a streaming API. \c XbelWriter also contains a private
+ instance of QTreeWidget in order to display the bookmarks according to
+ hierarchies.
+
+ \snippet examples/xml/streambookmarks/xbelwriter.h 0
+
+ \section1 XbelWriter Class Implementation
+
+ The \c XbelWriter constructor accepts a \a treeWidget to initialize within
+ its definition. We enable \l{QXmlStreamWriter}'s auto-formatting property
+ to ensure line-breaks and indentations are added automatically to empty
+ sections between elements, increasing readability as the data is split into
+ several lines.
+
+ \snippet examples/xml/streambookmarks/xbelwriter.cpp 0
+
+ The \c writeFile() function accepts a QIODevice object and sets it using
+ \c setDevice(). This function then writes the document type
+ definition(DTD), the start element, the version, and \c{treeWidget}'s
+ top-level items.
+
+ \snippet examples/xml/streambookmarks/xbelwriter.cpp 1
+
+ The \c writeItem() function accepts a QTreeWidget object and writes it
+ to the stream, depending on its \c tagName, which can either be a "folder",
+ "bookmark", or "separator".
+
+ \snippet examples/xml/streambookmarks/xbelwriter.cpp 2
+
+ \section1 XbelReader Class Definition
+
+ The \c XbelReader class is a subclass of QXmlStreamReader, the pendent
+ class for QXmlStreamWriter. \c XbelReader contains a private instance
+ of QTreeWidget to group bookmarks according to their hierarchies.
+
+ \snippet examples/xml/streambookmarks/xbelreader.h 0
+
+ \section1 XbelReader Class Implementation
+
+ The \c XbelReader constructor accepts a QTreeWidget to initialize the
+ \c treeWidget within its definition. A QStyle object is used to set
+ \c{treeWidget}'s style property. The \c folderIcon is set to QIcon::Normal
+ mode where the pixmap is only displayed when the user is not interacting
+ with the icon. The QStyle::SP_DirClosedIcon, QStyle::SP_DirOpenIcon, and
+ QStyle::SP_FileIcon correspond to standard pixmaps that follow the style
+ of your GUI.
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 0
+
+ The \c read() function accepts a QIODevice and sets it using
+ \l{QXmlStreamReader::setDevice()}{setDevice()}. The actual process
+ of reading only takes place in event the file is a valid XBEL 1.0
+ file. Otherwise, the \l{QXmlStreamReader::raiseError()}
+ {raiseError()} function is used to display an error message.
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 1
+
+ The \c readUnknownElement() function reads an unknown element. The
+ Q_ASSERT() macro is used to provide a pre-condition for the function.
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 2
+
+ The \c readXBEL() function reads the name of a startElement and calls
+ the appropriate function to read it, depending on whether if its a
+ "folder", "bookmark" or "separator". Otherwise, it calls
+ \c readUnknownElement().
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 3
+
+ The \c readTitle() function reads the bookmark's title.
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 4
+
+ The \c readSeparator() function creates a separator and sets its flags.
+ The text is set to 30 "0xB7", the HEX equivalent for period, and then
+ read using \c readElementText().
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 5
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow, with a
+ \c File menu and a \c Help menu.
+
+ \snippet examples/xml/streambookmarks/mainwindow.h 0
+
+ \section1 MainWindow Class Implementation
+
+ The \c MainWindow constructor instantiates the QTreeWidget object, \c
+ treeWidget and sets its header with a QStringList object, \c labels.
+ The constructor also invokes \c createActions() and \c createMenus()
+ to set up the menus and their corresponding actions. The \c statusBar()
+ is used to display the message "Ready" and the window's size is fixed
+ to 480x320 pixels.
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 0
+
+ The \c open() function enables the user to open an XBEL file using
+ QFileDialog::getOpenFileName(). A warning message is displayed along
+ with the \c fileName and \c errorString if the file cannot be read or
+ if there is a parse error.
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 1
+
+ The \c saveAs() function displays a QFileDialog, prompting the user for
+ a \c fileName using QFileDialog::getSaveFileName(). Similar to the
+ \c open() function, this function also displays a warning message if
+ the file cannot be written to.
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 2
+
+ The \c about() function displays a QMessageBox with a brief description
+ of the example.
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 3
+
+ In order to implement the \c open(), \c saveAs(), \c exit(), \c about()
+ and \c aboutQt() functions, we connect them to QAction objects and
+ add them to the \c fileMenu and \c helpMenu. The connections are as shown
+ below:
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 4
+
+ The \c createMenus() function creates the \c fileMenu and \c helpMenu
+ and adds the QAction objects to them in order to create the menu shown
+ in the screenshot below:
+
+ \table
+ \row
+ \o \inlineimage xmlstreamexample-filemenu.png
+ \o \inlineimage xmlstreamexample-helpmenu.png
+ \endtable
+
+ \snippet examples/xml/streambookmarks/mainwindow.cpp 5
+
+ \section1 \c{main()} Function
+
+ The \c main() function instantiates \c MainWindow and invokes the \c show()
+ function.
+
+ \snippet examples/xml/streambookmarks/main.cpp 0
+
+ See the \l{http://pyxml.sourceforge.net/topics/xbel/}
+ {XML Bookmark Exchange Language Resource Page} for more information
+ about XBEL files.
+*/
diff --git a/doc/src/examples/recentfiles.qdoc b/doc/src/examples/recentfiles.qdoc
new file mode 100644
index 0000000..185cbf1
--- /dev/null
+++ b/doc/src/examples/recentfiles.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/recentfiles
+ \title Recent Files Example
+
+ The Recent Files example shows how a standard File menu can be extended to show
+ the most recent files loaded by a main window application.
+
+ \image recentfiles-example.png
+*/
diff --git a/doc/src/examples/recipes.qdoc b/doc/src/examples/recipes.qdoc
new file mode 100644
index 0000000..ba06b7e
--- /dev/null
+++ b/doc/src/examples/recipes.qdoc
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xmlpatterns/recipes
+ \title Recipes Example
+
+ The recipes example shows how to use QtXmlPatterns to query XML data
+ loaded from a file.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ In this case, the XML data represents a cookbook, \c{cookbook.xml},
+ which contains \c{<cookbook>} as its document element, which in turn
+ contains a sequence of \c{<recipe>} elements. This XML data is
+ searched using queries stored in XQuery files (\c{*.xq}).
+
+ \section2 The User Interface
+
+ The UI for this example was created using \l{Qt Designer Manual} {Qt
+ Designer}:
+
+ \image recipes-example.png
+
+ The UI consists of three \l{QGroupBox} {group boxes} arranged
+ vertically. The top one contains a \l{QTextEdit} {text viewer} that
+ displays the XML text from the cookbook file. The middle group box
+ contains a \l{QComboBox} {combo box} for choosing the \l{A Short
+ Path to XQuery} {XQuery} to run and a \l{QTextEdit} {text viewer}
+ for displaying the text of the selected XQuery. The \c{.xq} files in
+ the file list above are shown in the combo box menu. Choosing an
+ XQuery loads, parses, and runs the selected XQuery. The query result
+ is shown in the bottom group box's \l{QTextEdit} {text viewer}.
+
+ \section2 Running your own XQueries
+
+ You can write your own XQuery files and run them in the example
+ program. The file \c{xmlpatterns/recipes/recipes.qrc} is the \l{The
+ Qt Resource System} {resource file} for this example. It is used in
+ \c{main.cpp} (\c{Q_INIT_RESOURCE(recipes);}). It lists the XQuery
+ files (\c{.xq}) that can be selected in the combobox.
+
+ \quotefromfile examples/xmlpatterns/recipes/recipes.qrc
+ \printuntil
+
+ To add your own queries to the example's combobox, store your
+ \c{.xq} files in the \c{examples/xmlpatterns/recipes/files}
+ directory and add them to \c{recipes.qrc} as shown above.
+
+ \section1 Code Walk-Through
+
+ The example's main() function creates the standard instance of
+ QApplication. Then it creates an instance of the UI class, shows it,
+ and starts the Qt event loop:
+
+ \snippet examples/xmlpatterns/recipes/main.cpp 0
+
+ \section2 The UI Class: QueryMainWindow
+
+ The example's UI is a conventional Qt GUI application inheriting
+ QMainWindow and the class generated by \l{Qt Designer Manual} {Qt
+ Designer}:
+
+ \snippet examples/xmlpatterns/recipes/querymainwindow.h 0
+
+ The constructor finds the window's \l{QComboBox} {combo box} child
+ widget and connects its \l{QComboBox::currentIndexChanged()}
+ {currentIndexChanged()} signal to the window's \c{displayQuery()}
+ slot. It then calls \c{loadInputFile()} to load \c{cookbook.xml} and
+ display its contents in the top group box's \l{QTextEdit} {text
+ viewer} . Finally, it finds the XQuery files (\c{.xq}) and adds each
+ one to the \l{QComboBox} {combo box} menu.
+
+ \snippet examples/xmlpatterns/recipes/querymainwindow.cpp 0
+
+ The work is done in the \l{displayQuery() slot} {displayQuery()}
+ slot and the \l{evaluate() function} {evaluate()} function it
+ calls. \l{displayQuery() slot} {displayQuery()} loads and displays
+ the selected query file and passes the XQuery text to \l{evaluate()
+ function} {evaluate()}.
+
+ \target displayQuery() slot
+ \snippet examples/xmlpatterns/recipes/querymainwindow.cpp 1
+
+ \l{evaluate() function} {evaluate()} demonstrates the standard
+ QtXmlPatterns usage pattern. First, an instance of QXmlQuery is
+ created (\c{query}). The \c{query's} \l{QXmlQuery::bindVariable()}
+ {bindVariable()} function is then called to bind the \c cookbook.xml
+ file to the XQuery variable \c inputDocument. \e{After} the variable
+ is bound, \l{QXmlQuery::setQuery()} {setQuery()} is called to pass
+ the XQuery text to the \c query.
+
+ \note \l{QXmlQuery::setQuery()} {setQuery()} must be called
+ \e{after} \l{QXmlQuery::bindVariable()} {bindVariable()}.
+
+ Passing the XQuery to \l{QXmlQuery::setQuery()} {setQuery()} causes
+ QtXmlPatterns to parse the XQuery. \l{QXmlQuery::isValid()} is
+ called to ensure that the XQuery was correctly parsed.
+
+ \target evaluate() function
+ \snippet examples/xmlpatterns/recipes/querymainwindow.cpp 2
+
+ If the XQuery is valid, an instance of QXmlFormatter is created to
+ format the query result as XML into a QBuffer. To evaluate the
+ XQuery, an overload of \l{QXmlQuery::evaluateTo()} {evaluateTo()} is
+ called that takes a QAbstractXmlReceiver for its output
+ (QXmlFormatter inherits QAbstractXmlReceiver). Finally, the
+ formatted XML result is displayed in the UI's bottom text view.
+
+ \note Each XQuery \c{.xq} file must declare the \c{$inputDocument}
+ variable to represent the \c cookbook.xml document:
+
+ \code
+ (: All ingredients for Mushroom Soup. :)
+ declare variable $inputDocument external;
+
+ doc($inputDocument)/cookbook/recipe[@xml:id = "MushroomSoup"]/ingredient/
+ <p>{@name, @quantity}</p>
+ \endcode
+
+ \note If you add add your own query.xq files, you must declare the
+ \c{$inputDocument} and use it as shown above.
+
+*/
diff --git a/doc/src/examples/regexp.qdoc b/doc/src/examples/regexp.qdoc
new file mode 100644
index 0000000..de6cbfc
--- /dev/null
+++ b/doc/src/examples/regexp.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/regexp
+ \title Regular Expressions Example
+
+ The Regular Expressions (RegExp) example shows how regular expressions in Qt are
+ applied to text by providing an environment in which new regular expressions can be
+ created and tested on custom text strings.
+
+ \image regexp-example.png
+*/
diff --git a/doc/src/examples/relationaltablemodel.qdoc b/doc/src/examples/relationaltablemodel.qdoc
new file mode 100644
index 0000000..5e944c2
--- /dev/null
+++ b/doc/src/examples/relationaltablemodel.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/relationaltablemodel
+ \title Relational Table Model Example
+
+ The Relational Table Model example shows how to use table views with a relational
+ model to visualize the relations between items in a database.
+
+ \image relationaltablemodel-example.png
+*/
diff --git a/doc/src/examples/remotecontrol.qdoc b/doc/src/examples/remotecontrol.qdoc
new file mode 100644
index 0000000..698ad1f
--- /dev/null
+++ b/doc/src/examples/remotecontrol.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example help/remotecontrol
+ \title Remote Control Example
+
+ This example shows how to use and control Qt Assistant
+ as a help viewer.
+*/ \ No newline at end of file
diff --git a/doc/src/examples/rsslisting.qdoc b/doc/src/examples/rsslisting.qdoc
new file mode 100644
index 0000000..73ff68c
--- /dev/null
+++ b/doc/src/examples/rsslisting.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/rsslisting
+ \title RSS-Listing Example
+
+ This example shows how to create a widget that displays news items
+ from RDF news sources.
+
+ \image rsslistingexample.png
+*/
diff --git a/doc/src/examples/samplebuffers.qdoc b/doc/src/examples/samplebuffers.qdoc
new file mode 100644
index 0000000..1c8202c
--- /dev/null
+++ b/doc/src/examples/samplebuffers.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/samplebuffers
+ \title Sample Buffers Example
+
+ The Sample Buffers example demonstrates how to use and enable
+ sample buffers in a QGLWidget.
+
+ \image samplebuffers-example.png
+*/
diff --git a/doc/src/examples/saxbookmarks.qdoc b/doc/src/examples/saxbookmarks.qdoc
new file mode 100644
index 0000000..3db87d6
--- /dev/null
+++ b/doc/src/examples/saxbookmarks.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/saxbookmarks
+ \title SAX Bookmarks Example
+
+ The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL)
+ files that uses Qt's SAX-based API to read and parse the files. The DOM Bookmarks
+ example provides an alternative way to read this type of file.
+
+ \image saxbookmarks-example.png
+
+ See the \l{XML Bookmark Exchange Language Resource Page} for more
+ information about XBEL files.
+*/
diff --git a/doc/src/examples/screenshot.qdoc b/doc/src/examples/screenshot.qdoc
new file mode 100644
index 0000000..b989a32
--- /dev/null
+++ b/doc/src/examples/screenshot.qdoc
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example desktop/screenshot
+ \title Screenshot Example
+
+ The Screenshot example shows how to take a screenshot of the
+ desktop using QApplication and QDesktopWidget. It also shows how
+ to use QTimer to provide a single-shot timer, and how to
+ reimplement the QWidget::resizeEvent() event handler to make sure
+ that an application resizes smoothly and without data loss.
+
+ \image screenshot-example.png
+
+ With the application the users can take a screenshot of their
+ desktop. They are provided with a couple of options:
+
+ \list
+ \o Delaying the screenshot, giving them time to rearrange
+ their desktop.
+ \o Hiding the application's window while the screenshot is taken.
+ \endlist
+
+ In addition the application allows the users to save their
+ screenshot if they want to.
+
+ \section1 Screenshot Class Definition
+
+ \snippet examples/desktop/screenshot/screenshot.h 0
+
+ The \c Screenshot class inherits QWidget and is the application's
+ main widget. It displays the application options and a preview of
+ the screenshot.
+
+ We reimplement the QWidget::resizeEvent() function to make sure
+ that the preview of the screenshot scales properly when the user
+ resizes the application widget. We also need several private slots
+ to facilitate the options:
+
+ \list
+ \o The \c newScreenshot() slot prepares a new screenshot.
+ \o The \c saveScreenshot() slot saves the last screenshot.
+ \o The \c shootScreen() slot takes the screenshot.
+ \o The \c updateCheckBox() slot enables or disables the
+ \gui {Hide This Window} option.
+ \endlist
+
+ We also declare some private functions: We use the \c
+ createOptionsGroupBox(), \c createButtonsLayout() and \c
+ createButton() functions when we construct the widget. And we call
+ the private \c updateScreenshotLabel() function whenever a new
+ screenshot is taken or when a resize event changes the size of the
+ screenshot preview label.
+
+ In addition we need to store the screenshot's original pixmap. The
+ reason is that when we display the preview of the screenshot, we
+ need to scale its pixmap, storing the original we make sure that
+ no data are lost in that process.
+
+ \section1 Screenshot Class Implementation
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 0
+
+ In the constructor we first create the QLabel displaying the
+ screenshot preview.
+
+ We set the QLabel's size policy to be QSizePolicy::Expanding both
+ horizontally and vertically. This means that the QLabel's size
+ hint is a sensible size, but the widget can be shrunk and still be
+ useful. Also, the widget can make use of extra space, so it should
+ get as much space as possible. Then we make sure the QLabel is
+ aligned in the center of the \c Screenshot widget, and set its
+ minimum size.
+
+ We create the applications's buttons and the group box containing
+ the application's options, and put it all into a main
+ layout. Finally we take the initial screenshot, and set the inital
+ delay and the window title, before we resize the widget to a
+ suitable size.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 1
+
+ The \c resizeEvent() function is reimplemented to receive the
+ resize events dispatched to the widget. The purpose is to scale
+ the preview screenshot pixmap without deformation of its content,
+ and also make sure that the application can be resized smoothly.
+
+ To achieve the first goal, we scale the screenshot pixmap using
+ Qt::KeepAspectRatio. We scale the pixmap to a rectangle as large
+ as possible inside the current size of the screenshot preview
+ label, preserving the aspect ratio. This means that if the user
+ resizes the application window in only one direction, the preview
+ screenshot keeps the same size.
+
+ To reach our second goal, we make sure that the preview screenshot
+ only is repainted (using the private \c updateScreenshotLabel()
+ function) when it actually changes its size.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 2
+
+ The private \c newScreenshot() slot is called when the user
+ requests a new screenshot; but the slot only prepares a new
+ screenshot.
+
+ First we see if the \gui {Hide This Window} option is checked, if
+ it is we hide the \c Screenshot widget. Then we disable the \gui
+ {New Screenshot} button, to make sure the user only can request
+ one screenshot at a time.
+
+ We create a timer using the QTimer class which provides repetitive
+ and single-shot timers. We set the timer to time out only once,
+ using the static QTimer::singleShot() function. This function
+ calls the private \c shootScreen() slot after the time interval
+ specified by the \gui {Screenshot Delay} option. It is \c
+ shootScreen() that actually performs the screenshot.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 3
+
+ The \c saveScreenshot() slot is called when the user push the \gui
+ Save button, and it presents a file dialog using the QFileDialog
+ class.
+
+ QFileDialog enables a user to traverse the file system in order to
+ select one or many files or a directory. The easiest way to create
+ a QFileDialog is to use the convenience static
+ functions.
+
+ We define the default file format to be png, and we make the file
+ dialog's initial path the path the application is run from. We
+ create the file dialog using the static
+ QFileDialog::getSaveFileName() function which returns a file name
+ selected by the user. The file does not have to exist. If the file
+ name is valid, we use the QPixmap::save() function to save the
+ screenshot's original pixmap in that file.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 4
+
+ The \c shootScreen() slot is called to take the screenshot. If the
+ user has chosen to delay the screenshot, we make the application
+ beep when the screenshot is taken using the static
+ QApplication::beep() function.
+
+ The QApplication class manages the GUI application's control flow
+ and main settings. It contains the main event loop, where all
+ events from the window system and other sources are processed and
+ dispatched.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 5
+
+ We take the screenshot using the static QPixmap::grabWindow()
+ function. The function grabs the contents of the window passed as
+ an argument, makes a pixmap out of it and returns that pixmap.
+
+ We identify the argument window using the QWidget::winID()
+ function which returns the window system identifier. Here it
+ returns the identifier of the current QDesktopWidget retrieved by
+ the QApplication::desktop() function. The QDesktopWidget class
+ provides access to screen information, and inherits
+ QWidget::winID().
+
+ We update the screenshot preview label using the private \c
+ updateScreenshotLabel() function. Then we enable the \gui {New
+ Screenshot} button, and finally we make the \c Screenshot widget
+ visible if it was hidden during the screenshot.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 6
+
+ The \gui {Hide This Window} option is enabled or disabled
+ depending on the delay of the screenshot. If there is no delay,
+ the application window cannot be hidden and the option's checkbox
+ is disabled.
+
+ The \c updateCheckBox() slot is called whenever the user changes
+ the delay using the \gui {Screenshot Delay} option.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 7
+
+ The private \c createOptionsGroupBox() function is called from the
+ constructor.
+
+ First we create a group box that will contain all of the options'
+ widgets. Then we create a QSpinBox and a QLabel for the \gui
+ {Screenshot Delay} option, and connect the spinbox to the \c
+ updateCheckBox() slot. Finally, we create a QCheckBox for the \gui
+ {Hide This Window} option, add all the options' widgets to a
+ QGridLayout and install the layout on the group box.
+
+ Note that we don't have to specify any parents for the widgets
+ when we create them. The reason is that when we add a widget to a
+ layout and install the layout on another widget, the layout's
+ widgets are automatically reparented to the widget the layout is
+ installed on.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 8
+
+ The private \c createButtonsLayout() function is called from the
+ constructor. We create the application's buttons using the private
+ \c createButton() function, and add them to a QHBoxLayout.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 9
+
+ The private \c createButton() function is called from the \c
+ createButtonsLayout() function. It simply creates a QPushButton
+ with the provided text, connects it to the provided receiver and
+ slot, and returns a pointer to the button.
+
+ \snippet examples/desktop/screenshot/screenshot.cpp 10
+
+ The private \c updateScreenshotLabel() function is called whenever
+ the screenshot changes, or when a resize event changes the size of
+ the screenshot preview label. It updates the screenshot preview's
+ label using the QLabel::setPixmap() and QPixmap::scaled()
+ functions.
+
+ QPixmap::scaled() returns a copy of the given pixmap scaled to a
+ rectangle of the given size according to the given
+ Qt::AspectRatioMode and Qt::TransformationMode.
+
+ We scale the original pixmap to fit the current screenshot label's
+ size, preserving the aspect ratio and giving the resulting pixmap
+ smoothed edges.
+*/
+
diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc
new file mode 100644
index 0000000..4dc1783
--- /dev/null
+++ b/doc/src/examples/scribble.qdoc
@@ -0,0 +1,432 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/scribble
+ \title Scribble Example
+
+ The Scribble example shows how to reimplement some of QWidget's
+ event handlers to receive the events generated for the
+ application's widgets.
+
+ We reimplement the mouse event handlers to implement drawing, the
+ paint event handler to update the application and the resize event
+ handler to optimize the application's appearance. In addition we
+ reimplement the close event handler to intercept the close events
+ before terminating the application.
+
+ The example also demonstrates how to use QPainter to draw an image
+ in real time, as well as to repaint widgets.
+
+ \image scribble-example.png Screenshot of the Scribble example
+
+ With the Scribble application the users can draw an image. The
+ \gui File menu gives the users the possibility to open and edit an
+ existing image file, save an image and exit the application. While
+ drawing, the \gui Options menu allows the users to to choose the
+ pen color and pen width, as well as clear the screen. In addition
+ the \gui Help menu provides the users with information about the
+ Scribble example in particular, and about Qt in general.
+
+ The example consists of two classes:
+
+ \list
+ \o \c ScribbleArea is a custom widget that displays a QImage and
+ allows to the user to draw on it.
+ \o \c MainWindow provides a menu above the \c ScribbleArea.
+ \endlist
+
+ We will start by reviewing the \c ScribbleArea class, which
+ contains the interesting, then we will take a look at the \c
+ MainWindow class that uses it.
+
+ \section1 ScribbleArea Class Definition
+
+ \snippet examples/widgets/scribble/scribblearea.h 0
+
+ The \c ScribbleArea class inherits from QWidget. We reimplement
+ the \c mousePressEvent(), \c mouseMoveEvent() and \c
+ mouseReleaseEvent() functions to implement the drawing. We
+ reimplement the \c paintEvent() function to update the scribble
+ area, and the \c resizeEvent() function to ensure that the QImage
+ on which we draw is at least as large as the widget at any time.
+
+ We need several public functions: \c openImage() loads an image
+ from a file into the scribble area, allowing the user to edit the
+ image; \c save() writes the currently displayed image to file; \c
+ clearImage() slot clears the image displayed in the scribble
+ area. We need the private \c drawLineTo() function to actually do
+ the drawing, and \c resizeImage() to change the size of a
+ QImage. The \c print() slot handles printing.
+
+ We also need the following private variables:
+
+ \list
+ \o \c modified is \c true if there are unsaved
+ changes to the image displayed in the scribble area.
+ \o \c scribbling is \c true while the user is pressing
+ the left mouse button within the scribble area.
+ \o \c penWidth and \c penColor hold the currently
+ set width and color for the pen used in the application.
+ \o \c image stores the image drawn by the user.
+ \o \c lastPoint holds the position of the cursor at the last
+ mouse press or mouse move event.
+ \endlist
+
+ \section1 ScribbleArea Class Implementation
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 0
+
+ In the constructor, we set the Qt::WA_StaticContents
+ attribute for the widget, indicating that the widget contents are
+ rooted to the top-left corner and don't change when the widget is
+ resized. Qt uses this attribute to optimize paint events on
+ resizes. This is purely an optimization and should only be used
+ for widgets whose contents are static and rooted to the top-left
+ corner.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 1
+ \snippet examples/widgets/scribble/scribblearea.cpp 2
+
+ In the \c openImage() function, we load the given image. Then we
+ resize the loaded QImage to be at least as large as the widget in
+ both directions using the private \c resizeImage() function and
+ we set the \c image member variable to be the loaded image. At
+ the end, we call QWidget::update() to schedule a repaint.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 3
+ \snippet examples/widgets/scribble/scribblearea.cpp 4
+
+ The \c saveImage() function creates a QImage object that covers
+ only the visible section of the actual \c image and saves it using
+ QImage::save(). If the image is successfully saved, we set the
+ scribble area's \c modified variable to \c false, because there is
+ no unsaved data.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 5
+ \snippet examples/widgets/scribble/scribblearea.cpp 6
+ \codeline
+ \snippet examples/widgets/scribble/scribblearea.cpp 7
+ \snippet examples/widgets/scribble/scribblearea.cpp 8
+
+ The \c setPenColor() and \c setPenWidth() functions set the
+ current pen color and width. These values will be used for future
+ drawing operations.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 9
+ \snippet examples/widgets/scribble/scribblearea.cpp 10
+
+ The public \c clearImage() slot clears the image displayed in the
+ scribble area. We simply fill the entire image with white, which
+ corresponds to RGB value (255, 255, 255). As usual when we modify
+ the image, we set \c modified to \c true and schedule a repaint.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 11
+ \snippet examples/widgets/scribble/scribblearea.cpp 12
+
+ For mouse press and mouse release events, we use the
+ QMouseEvent::button() function to find out which button caused
+ the event. For mose move events, we use QMouseEvent::buttons()
+ to find which buttons are currently held down (as an OR-combination).
+
+ If the users press the left mouse button, we store the position
+ of the mouse cursor in \c lastPoint. We also make a note that the
+ user is currently scribbling. (The \c scribbling variable is
+ necessary because we can't assume that a mouse move and mouse
+ release event is always preceded by a mouse press event on the
+ same widget.)
+
+ If the user moves the mouse with the left button pressed down or
+ releases the button, we call the private \c drawLineTo() function
+ to draw.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 13
+ \snippet examples/widgets/scribble/scribblearea.cpp 14
+
+ In the reimplementation of the \l
+ {QWidget::paintEvent()}{paintEvent()} function, we simply create
+ a QPainter for the scribble area, and draw the image.
+
+ At this point, you might wonder why we don't just draw directly
+ onto the widget instead of drawing in a QImage and copying the
+ QImage onto screen in \c paintEvent(). There are at least three
+ good reasons for this:
+
+ \list
+ \o The window system requires us to be able to redraw the widget
+ \e{at any time}. For example, if the window is minimized and
+ restored, the window system might have forgotten the contents
+ of the widget and send us a paint event. In other words, we
+ can't rely on the window system to remember our image.
+
+ \o Qt normally doesn't allow us to paint outside of \c
+ paintEvent(). In particular, we can't paint from the mouse
+ event handlers. (This behavior can be changed using the
+ Qt::WA_PaintOnScreen widget attribute, though.)
+
+ \o If initialized properly, a QImage is guaranteed to use 8-bit
+ for each color channel (red, green, blue, and alpha), whereas
+ a QWidget might have a lower color depth, depending on the
+ monitor configuration. This means that if we load a 24-bit or
+ 32-bit image and paint it onto a QWidget, then copy the
+ QWidget into a QImage again, we might lose some information.
+ \endlist
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 15
+ \snippet examples/widgets/scribble/scribblearea.cpp 16
+
+ When the user starts the Scribble application, a resize event is
+ generated and an image is created and displayed in the scribble
+ area. We make this initial image slightly larger than the
+ application's main window and scribble area, to avoid always
+ resizing the image when the user resizes the main window (which
+ would be very inefficient). But when the main window becomes
+ larger than this initial size, the image needs to be resized.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 17
+ \snippet examples/widgets/scribble/scribblearea.cpp 18
+
+ In \c drawLineTo(), we draw a line from the point where the mouse
+ was located when the last mouse press or mouse move occurred, we
+ set \c modified to true, we generate a repaint event, and we
+ update \c lastPoint so that next time \c drawLineTo() is called,
+ we continue drawing from where we left.
+
+ We could call the \c update() function with no parameter, but as
+ an easy optimization we pass a QRect that specifies the rectangle
+ inside the scribble are needs updating, to avoid a complete
+ repaint of the widget.
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 19
+ \snippet examples/widgets/scribble/scribblearea.cpp 20
+
+ QImage has no nice API for resizing an image. There's a
+ QImage::copy() function that could do the trick, but when used to
+ expand an image, it fills the new areas with black, whereas we
+ want white.
+
+ So the trick is to create a brand new QImage with the right size,
+ to fill it with white, and to draw the old image onto it using
+ QPainter. The new image is given the QImage::Format_RGB32
+ format, which means that each pixel is stored as 0xffRRGGBB
+ (where RR, GG, and BB are the red, green and blue
+ color channels, ff is the hexadecimal value 255).
+
+ Printing is handled by the \c print() slot:
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 21
+
+ We construct a high resolution QPrinter object for the required
+ output format, using a QPrintDialog to ask the user to specify a
+ page size and indicate how the output should be formatted on the page.
+
+ If the dialog is accepted, we perform the task of printing to the paint
+ device:
+
+ \snippet examples/widgets/scribble/scribblearea.cpp 22
+
+ Printing an image to a file in this way is simply a matter of
+ painting onto the QPrinter. We scale the image to fit within the
+ available space on the page before painting it onto the paint
+ device.
+
+ \section1 MainWindow Class Definition
+
+ \snippet examples/widgets/scribble/mainwindow.h 0
+
+ The \c MainWindow class inherits from QMainWindow. We reimplement
+ the \l{QWidget::closeEvent()}{closeEvent()} handler from QWidget.
+ The \c open(), \c save(), \c penColor() and \c penWidth()
+ slots correspond to menu entries. In addition we create four
+ private functions.
+
+ We use the boolean \c maybeSave() function to check if there are
+ any unsaved changes. If there are unsaved changes, we give the
+ user the opportunity to save these changes. The function returns
+ \c false if the user clicks \gui Cancel. We use the \c saveFile()
+ function to let the user save the image currently displayed in
+ the scribble area.
+
+ \section1 MainWindow Class Implementation
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 0
+
+ In the constructor, we create a scribble area which we make the
+ central widget of the \c MainWindow widget. Then we create the
+ associated actions and menus.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 1
+ \snippet examples/widgets/scribble/mainwindow.cpp 2
+
+ Close events are sent to widgets that the users want to close,
+ usually by clicking \gui{File|Exit} or by clicking the \gui X
+ title bar button. By reimplementing the event handler, we can
+ intercept attempts to close the application.
+
+ In this example, we use the close event to ask the user to save
+ any unsaved changes. The logic for that is located in the \c
+ maybeSave() function. If \c maybeSave() returns true, there are
+ no modifications or the users successfully saved them, and we
+ accept the event. The application can then terminate normally. If
+ \c maybeSave() returns false, the user clicked \gui Cancel, so we
+ "ignore" the event, leaving the application unaffected by it.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 3
+ \snippet examples/widgets/scribble/mainwindow.cpp 4
+
+ In the \c open() slot we first give the user the opportunity to
+ save any modifications to the currently displayed image, before a
+ new image is loaded into the scribble area. Then we ask the user
+ to choose a file and we load the file in the \c ScribbleArea.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 5
+ \snippet examples/widgets/scribble/mainwindow.cpp 6
+
+ The \c save() slot is called when the users choose the \gui {Save
+ As} menu entry, and then choose an entry from the format menu. The
+ first thing we need to do is to find out which action sent the
+ signal using QObject::sender(). This function returns the sender
+ as a QObject pointer. Since we know that the sender is an action
+ object, we can safely cast the QObject. We could have used a
+ C-style cast or a C++ \c static_cast<>(), but as a defensive
+ programming technique we use a qobject_cast(). The advantage is
+ that if the object has the wrong type, a null pointer is
+ returned. Crashes due to null pointers are much easier to diagnose
+ than crashes due to unsafe casts.
+
+ Once we have the action, we extract the chosen format using
+ QAction::data(). (When the actions are created, we use
+ QAction::setData() to set our own custom data attached to the
+ action, as a QVariant. More on this when we review \c
+ createActions().)
+
+ Now that we know the format, we call the private \c saveFile()
+ function to save the currently displayed image.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 7
+ \snippet examples/widgets/scribble/mainwindow.cpp 8
+
+ We use the \c penColor() slot to retrieve a new color from the
+ user with a QColorDialog. If the user chooses a new color, we
+ make it the scribble area's color.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 9
+ \snippet examples/widgets/scribble/mainwindow.cpp 10
+
+ To retrieve a new pen width in the \c penWidth() slot, we use
+ QInputDialog. The QInputDialog class provides a simple
+ convenience dialog to get a single value from the user. We use
+ the static QInputDialog::getInteger() function, which combines a
+ QLabel and a QSpinBox. The QSpinBox is initialized with the
+ scribble area's pen width, allows a range from 1 to 50, a step of
+ 1 (meaning that the up and down arrow increment or decrement the
+ value by 1).
+
+ The boolean \c ok variable will be set to \c true if the user
+ clicked \gui OK and to \c false if the user pressed \gui Cancel.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 11
+ \snippet examples/widgets/scribble/mainwindow.cpp 12
+
+ We implement the \c about() slot to create a message box
+ describing what the example is designed to show.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 13
+ \snippet examples/widgets/scribble/mainwindow.cpp 14
+
+ In the \c createAction() function we create the actions
+ representing the menu entries and connect them to the appropiate
+ slots. In particular we create the actions found in the \gui
+ {Save As} sub-menu. We use QImageWriter::supportedImageFormats()
+ to get a list of the supported formats (as a QList<QByteArray>).
+
+ Then we iterate through the list, creating an action for each
+ format. We call QAction::setData() with the file format, so we
+ can retrieve it later as QAction::data(). We could also have
+ deduced the file format from the action's text, by truncating the
+ "...", but that would have been inelegant.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 15
+ \snippet examples/widgets/scribble/mainwindow.cpp 16
+
+ In the \c createMenu() function, we add the previously created
+ format actions to the \c saveAsMenu. Then we add the rest of the
+ actions as well as the \c saveAsMenu sub-menu to the \gui File,
+ \gui Options and \gui Help menus.
+
+ The QMenu class provides a menu widget for use in menu bars,
+ context menus, and other popup menus. The QMenuBar class provides
+ a horizontal menu bar with a list of pull-down \l{QMenu}s. At the
+ end we put the \gui File and \gui Options menus in the \c
+ {MainWindow}'s menu bar, which we retrieve using the
+ QMainWindow::menuBar() function.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 17
+ \snippet examples/widgets/scribble/mainwindow.cpp 18
+
+ In \c mayBeSave(), we check if there are any unsaved changes. If
+ there are any, we use QMessageBox to give the user a warning that
+ the image has been modified and the opportunity to save the
+ modifications.
+
+ As with QColorDialog and QFileDialog, the easiest way to create a
+ QMessageBox is to use its static functions. QMessageBox provides
+ a range of different messages arranged along two axes: severity
+ (question, information, warning and critical) and complexity (the
+ number of necessary response buttons). Here we use the \c
+ warning() function sice the message is rather important.
+
+ If the user chooses to save, we call the private \c saveFile()
+ function. For simplicitly, we use PNG as the file format; the
+ user can always press \gui Cancel and save the file using another
+ format.
+
+ The \c maybeSave() function returns \c false if the user clicks
+ \gui Cancel; otherwise it returns \c true.
+
+ \snippet examples/widgets/scribble/mainwindow.cpp 19
+ \snippet examples/widgets/scribble/mainwindow.cpp 20
+
+ In \c saveFile(), we pop up a file dialog with a file name
+ suggestion. The static QFileDialog::getSaveFileName() function
+ returns a file name selected by the user. The file does not have
+ to exist.
+*/
diff --git a/doc/src/examples/sdi.qdoc b/doc/src/examples/sdi.qdoc
new file mode 100644
index 0000000..cfe351c
--- /dev/null
+++ b/doc/src/examples/sdi.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example mainwindows/sdi
+ \title SDI Example
+
+ The SDI example shows how to create a Single Document Interface. It uses a number of
+ top-level windows to display the contents of different text files.
+
+ \image sdi-example.png
+*/
diff --git a/doc/src/examples/securesocketclient.qdoc b/doc/src/examples/securesocketclient.qdoc
new file mode 100644
index 0000000..e93bf20
--- /dev/null
+++ b/doc/src/examples/securesocketclient.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/securesocketclient
+ \title Secure Socket Client Example
+
+ The Secure Socket Client example shows how to use QSslSocket to
+ communicate over an encrypted (SSL) connection. It also demonstrates how
+ to deal with authenticity problems, and how to display security and
+ certificate information.
+
+ \image securesocketclient.png
+ \image securesocketclient2.png
+*/
diff --git a/doc/src/examples/semaphores.qdoc b/doc/src/examples/semaphores.qdoc
new file mode 100644
index 0000000..a387350
--- /dev/null
+++ b/doc/src/examples/semaphores.qdoc
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example threads/semaphores
+ \title Semaphores Example
+
+ The Semaphores example shows how to use QSemaphore to control
+ access to a circular buffer shared by a producer thread and a
+ consumer thread.
+
+ The producer writes data to the buffer until it reaches the end
+ of the buffer, at which point it restarts from the beginning,
+ overwriting existing data. The consumer thread reads the data as
+ it is produced and writes it to standard error.
+
+ Semaphores make it possible to have a higher level of concurrency
+ than mutexes. If accesses to the buffer were guarded by a QMutex,
+ the consumer thread couldn't access the buffer at the same time
+ as the producer thread. Yet, there is no harm in having both
+ threads working on \e{different parts} of the buffer at the same
+ time.
+
+ The example comprises two classes: \c Producer and \c Consumer.
+ Both inherit from QThread. The circular buffer used for
+ communicating between these two classes and the semaphores that
+ protect it are global variables.
+
+ An alternative to using QSemaphore to solve the producer-consumer
+ problem is to use QWaitCondition and QMutex. This is what the
+ \l{threads/waitconditions}{Wait Conditions} example does.
+
+ \section1 Global Variables
+
+ Let's start by reviewing the circular buffer and the associated
+ semaphores:
+
+ \snippet examples/threads/semaphores/semaphores.cpp 0
+
+ \c DataSize is the amout of data that the producer will generate.
+ To keep the example as simple as possible, we make it a constant.
+ \c BufferSize is the size of the circular buffer. It is less than
+ \c DataSize, meaning that at some point the producer will reach
+ the end of the buffer and restart from the beginning.
+
+ To synchronize the producer and the consumer, we need two
+ semaphores. The \c freeBytes semaphore controls the "free" area
+ of the buffer (the area that the producer hasn't filled with data
+ yet or that the consumer has already read). The \c usedBytes
+ semaphore controls the "used" area of the buffer (the area that
+ the producer has filled but that the consumer hasn't read yet).
+
+ Together, the semaphores ensure that the producer is never more
+ than \c BufferSize bytes ahead of the consumer, and that the
+ consumer never reads data that the producer hasn't generated yet.
+
+ The \c freeBytes semaphore is initialized with \c BufferSize,
+ because initially the entire buffer is empty. The \c usedBytes
+ semaphore is initialized to 0 (the default value if none is
+ specified).
+
+ \section1 Producer Class
+
+ Let's review the code for the \c Producer class:
+
+ \snippet examples/threads/semaphores/semaphores.cpp 1
+ \snippet examples/threads/semaphores/semaphores.cpp 2
+
+ The producer generates \c DataSize bytes of data. Before it
+ writes a byte to the circular buffer, it must acquire a "free"
+ byte using the \c freeBytes semaphore. The QSemaphore::acquire()
+ call might block if the consumer hasn't kept up the pace with the
+ producer.
+
+ At the end, the producer releases a byte using the \c usedBytes
+ semaphore. The "free" byte has successfully been transformed into
+ a "used" byte, ready to be read by the consumer.
+
+ \section1 Consumer Class
+
+ Let's now turn to the \c Consumer class:
+
+ \snippet examples/threads/semaphores/semaphores.cpp 3
+ \snippet examples/threads/semaphores/semaphores.cpp 4
+
+ The code is very similar to the producer, except that this time
+ we acquire a "used" byte and release a "free" byte, instead of
+ the opposite.
+
+ \section1 The main() Function
+
+ In \c main(), we create the two threads and call QThread::wait()
+ to ensure that both threads get time to finish before we exit:
+
+ \snippet examples/threads/semaphores/semaphores.cpp 5
+ \snippet examples/threads/semaphores/semaphores.cpp 6
+
+ So what happens when we run the program? Initially, the producer
+ thread is the only one that can do anything; the consumer is
+ blocked waiting for the \c usedBytes semaphore to be released (its
+ initial \l{QSemaphore::available()}{available()} count is 0).
+ Once the producer has put one byte in the buffer,
+ \c{freeBytes.available()} is \c BufferSize - 1 and
+ \c{usedBytes.available()} is 1. At that point, two things can
+ happen: Either the consumer thread takes over and reads that
+ byte, or the consumer gets to produce a second byte.
+
+ The producer-consumer model presented in this example makes it
+ possible to write highly concurrent multithreaded applications.
+ On a multiprocessor machine, the program is potentially up to
+ twice as fast as the equivalent mutex-based program, since the
+ two threads can be active at the same time on different parts of
+ the buffer.
+
+ Be aware though that these benefits aren't always realized.
+ Acquiring and releasing a QSemaphore has a cost. In practice, it
+ would probably be worthwhile to divide the buffer into chunks and
+ to operate on chunks instead of individual bytes. The buffer size
+ is also a parameter that must be selected carefully, based on
+ experimentation.
+*/
diff --git a/doc/src/examples/settingseditor.qdoc b/doc/src/examples/settingseditor.qdoc
new file mode 100644
index 0000000..5ce1e49
--- /dev/null
+++ b/doc/src/examples/settingseditor.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/settingseditor
+ \title Settings Editor Example
+
+ The Settings Editor example shows how Qt's standard settings support is used in an
+ application by providing an editor that enables the user to view the settings for
+ installed applications, and modify those that can be edited.
+
+ \image settingseditor-example.png
+*/
diff --git a/doc/src/examples/shapedclock.qdoc b/doc/src/examples/shapedclock.qdoc
new file mode 100644
index 0000000..369553b
--- /dev/null
+++ b/doc/src/examples/shapedclock.qdoc
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/shapedclock
+ \title Shaped Clock Example
+
+ The Shaped Clock example shows how to apply a widget mask to a top-level
+ widget to produce a shaped window.
+
+ \image shapedclock-example.png
+
+ Widget masks are used to customize the shapes of top-level widgets by restricting
+ the available area for painting. On some window systems, setting certain window flags
+ will cause the window decoration (title bar, window frame, buttons) to be disabled,
+ allowing specially-shaped windows to be created. In this example, we use this feature
+ to create a circular window containing an analog clock.
+
+ Since this example's window does not provide a \gui File menu or a close
+ button, we provide a context menu with an \gui Exit entry so that the example
+ can be closed. Click the right mouse button over the window to open this menu.
+
+ \section1 ShapedClock Class Definition
+
+ The \c ShapedClock class is based on the \c AnalogClock class defined in the
+ \l{Analog Clock Example}{Analog Clock} example. The whole class definition is
+ presented below:
+
+ \snippet examples/widgets/shapedclock/shapedclock.h 0
+
+ The \l{QWidget::paintEvent()}{paintEvent()} implementation is the same as that found
+ in the \c AnalogClock class. We implement \l{QWidget::sizeHint()}{sizeHint()}
+ so that we don't have to resize the widget explicitly. We also provide an event
+ handler for resize events. This allows us to update the mask if the clock is resized.
+
+ Since the window containing the clock widget will have no title bar, we provide
+ implementations for \l{QWidget::mouseMoveEvent()}{mouseMoveEvent()} and
+ \l{QWidget::mousePressEvent()}{mousePressEvent()} to allow the clock to be dragged
+ around the screen. The \c dragPosition variable lets us keep track of where the user
+ last clicked on the widget.
+
+ \section1 ShapedClock Class Implementation
+
+ The \c ShapedClock constructor performs many of the same tasks as the \c AnalogClock
+ constructor. We set up a timer and connect it to the widget's update() slot:
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 0
+
+ We inform the window manager that the widget is not to be decorated with a window
+ frame by setting the Qt::FramelessWindowHint flag on the widget. As a result, we need
+ to provide a way for the user to move the clock around the screen.
+
+ Mouse button events are delivered to the \c mousePressEvent() handler:
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 1
+
+ If the left mouse button is pressed over the widget, we record the displacement in
+ global (screen) coordinates between the top-left position of the widget's frame (even
+ when hidden) and the point where the mouse click occurred. This displacement will be
+ used if the user moves the mouse while holding down the left button. Since we acted
+ on the event, we accept it by calling its \l{QEvent::accept()}{accept()} function.
+
+ \image shapedclock-dragging.png
+
+ The \c mouseMoveEvent() handler is called if the mouse is moved over the widget.
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 2
+
+ If the left button is held down while the mouse is moved, the top-left corner of the
+ widget is moved to the point given by subtracting the \c dragPosition from the current
+ cursor position in global coordinates. If we drag the widget, we also accept the event.
+
+ The \c paintEvent() function is given for completeness. See the
+ \l{Analog Clock Example}{Analog Clock} example for a description of the process used
+ to render the clock.
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 3
+
+ In the \c resizeEvent() handler, we re-use some of the code from the \c paintEvent()
+ to determine the region of the widget that is visible to the user:
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 4
+
+ Since the clock face is a circle drawn in the center of the widget, this is the region
+ we use as the mask.
+
+ Although the lack of a window frame may make it difficult for the user to resize the
+ widget on some platforms, it will not necessarily be impossible. The \c resizeEvent()
+ function ensures that the widget mask will always be updated if the widget's dimensions
+ change, and additionally ensures that it will be set up correctly when the widget is
+ first displayed.
+
+ Finally, we implement the \c sizeHint() for the widget so that it is given a reasonable
+ default size when it is first shown:
+
+ \snippet examples/widgets/shapedclock/shapedclock.cpp 5
+
+ \section1 Notes on Widget Masks
+
+ Since QRegion allows arbitrarily complex regions to be created, widget masks can be
+ made to suit the most unconventionally-shaped windows, and even allow widgets to be
+ displayed with holes in them.
+
+ Widget masks can also be constructed by using the contents of pixmap to define the
+ opaque part of the widget. For a pixmap with an alpha channel, a suitable mask can be
+ obtained with QPixmap::mask().
+*/
diff --git a/doc/src/examples/sharedmemory.qdoc b/doc/src/examples/sharedmemory.qdoc
new file mode 100644
index 0000000..f323977
--- /dev/null
+++ b/doc/src/examples/sharedmemory.qdoc
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example ipc/sharedmemory
+ \title Shared Memory Example
+
+ The Shared Memory example shows how to use the QSharedMemory class
+ to implement inter-process communication using shared memory. To
+ build the example, run make. To run the example, start two instances
+ of the executable. The main() function creates an \l {QApplication}
+ {application} and an instance of our example's Dialog class. The
+ dialog is displayed and then control is passed to the application in
+ the standard way.
+
+ \snippet examples/ipc/sharedmemory/main.cpp 0
+
+ Two instances of class Dialog appear.
+
+ \image sharedmemory-example_1.png Screenshot of the Shared Memory example
+
+ Class Dialog inherits QDialog. It encapsulates the user interface
+ and an instance of QSharedMemory. It also has two public slots,
+ loadFromFile() and loadFromMemory() that correspond to the two
+ buttons on the dialog.
+
+ \snippet examples/ipc/sharedmemory/dialog.h 0
+
+ The constructor builds the user interface widgets and connects the
+ clicked() signal of each button to the corresponding slot function.
+
+ \snippet examples/ipc/sharedmemory/dialog.cpp 0
+
+ Note that "QSharedMemoryExample" is passed to the \l {QSharedMemory}
+ {QSharedMemory()} constructor to be used as the key. This will be
+ used by the system as the identifier of the underlying shared memory
+ segment.
+
+ Click the \tt {Load Image From File...} button on one of the
+ dialogs. The loadFromFile() slot is invoked. First, it tests whether
+ a shared memory segment is already attached to the process. If so,
+ that segment is detached from the process, so we can be assured of
+ starting off the example correctly.
+
+ \snippet examples/ipc/sharedmemory/dialog.cpp 1
+
+ The user is then asked to select an image file using
+ QFileDialog::getOpenFileName(). The selected file is loaded into a
+ QImage. Using a QImage lets us ensure that the selected file is a
+ valid image, and it also allows us to immediately display the image
+ in the dialog using setPixmap().
+
+ Next the image is streamed into a QBuffer using a QDataStream. This
+ gives us the size, which we then use to \l {QSharedMemory::}
+ {create()} our shared memory segment. Creating a shared memory
+ segment automatically \l {QSharedMemory::attach()} {attaches} the
+ segment to the process. Using a QBuffer here lets us get a pointer
+ to the image data, which we then use to do a memcopy() from the
+ QBuffer into the shared memory segment.
+
+ \snippet examples/ipc/sharedmemory/dialog.cpp 2
+
+ Note that we \l {QSharedMemory::} {lock()} the shared memory segment
+ before we copy into it, and we \l {QSharedMemory::} {unlock()} it
+ again immediately after the copy. This ensures we have exclusive
+ access to the shared memory segment to do our memcopy(). If some
+ other process has the segment lock, then our process will block
+ until the lock becomes available.
+
+ Note also that the function does not \l {QSharedMemory::} {detach()}
+ from the shared memory segment after the memcopy() and
+ unlock(). Recall that when the last process detaches from a shared
+ memory segment, the segment is released by the operating
+ system. Since this process only one that is attached to the shared
+ memory segment at the moment, if loadFromFile() detached from the
+ shared memory segment, the segment would be destroyed before we get
+ to the next step.
+
+ When the function returns, if the file you selected was qt.png, your
+ first dialog looks like this.
+
+ \image sharedmemory-example_2.png Screenshot of the Shared Memory example
+
+ In the second dialog, click the \tt {Display Image From Shared
+ Memory} button. The loadFromMemory() slot is invoked. It first \l
+ {QSharedMemory::attach()} {attaches} the process to the same shared
+ memory segment created by the first process. Then it \l
+ {QSharedMemory::lock()} {locks} the segment for exclusive access and
+ links a QBuffer to the image data in the shared memory segment. It
+ then streams the data into a QImage and \l {QSharedMemory::unlock()}
+ {unlocks} the segment.
+
+ \snippet examples/ipc/sharedmemory/dialog.cpp 3
+
+ In this case, the function does \l {QSharedMemory::} {detach()} from
+ the segment, because now we are effectively finished using
+ it. Finally, the QImage is displayed. At this point, both dialogs
+ should be showing the same image. When you close the first dialog,
+ the Dialog destructor calls the QSharedMemory destructor, which
+ detaches from the shared memory segment. Since this is the last
+ process to be detached from the segment, the operating system will
+ now release the shared memory.
+
+ */
diff --git a/doc/src/examples/simpledecoration.qdoc b/doc/src/examples/simpledecoration.qdoc
new file mode 100644
index 0000000..fe8700a
--- /dev/null
+++ b/doc/src/examples/simpledecoration.qdoc
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qws/simpledecoration
+ \title Simple Decoration Example
+ \ingroup qt-embedded
+
+ The Simple Decoration example shows how to create a custom window decoration
+ for embedded applications.
+
+ \image embedded-simpledecoration-example.png
+
+ By default, Qt for Embedded Linux applications display windows with one of
+ the standard window decorations provided by Qt which are perfectly suitable
+ for many situations. Nonetheless, for certain applications and devices, it
+ is necessary to provide custom window decorations.
+
+ In this document, we examine the fundamental features of custom window
+ decorations, and create a simple decoration as an example.
+
+ \section1 Styles and Window Decorations
+
+ On many platforms, the style used for the contents of a window (including
+ scroll bars) and the style used for the window decorations (the title bar,
+ window borders, close, maximize and other buttons) are handled differently.
+ This is usually because each application is responsible for rendering the
+ contents of its own windows and the window manager renders the window
+ decorations.
+
+ Although the situation is not quite like this on Qt for Embedded Linux
+ because QApplication automatically handles window decorations as well,
+ there are still two style mechanisms at work: QStyle and its associated
+ classes are responsible for rendering widgets and subclasses of QDecoration
+ are responsible for rendering window decorations.
+
+ \image embedded-simpledecoration-example-styles.png
+
+ Three decorations are provided with Qt for Embedded Linux: \e default is
+ a basic style, \e windows resembles the classic Windows look and feel,
+ and \e styled uses the QStyle classes for QMdiSubWindow to draw window
+ decorations. Of these, \e styled is the most useful if you want to impose
+ a consistent look and feel, but the window decorations may be too large
+ for some use cases.
+
+ If none of these built-in decorations are suitable, a custom style can
+ easily be created and used. To do this, we simply need to create a
+ subclass of QDecorationDefault and apply it to a QApplication instance
+ in a running application.
+
+ \section1 MyDecoration Class Definition
+
+ The \c MyDecoration class is a subclass of QDecorationDefault, a subclass
+ of QDecoration that provides reasonable default behavior for a decoration:
+
+ \snippet examples/qws/simpledecoration/mydecoration.h decoration class definition
+
+ We only need to implement a constructor and reimplement the
+ \l{QDecorationDefault::}{region()} and \l{QDecorationDefault::}{paint()}
+ functions to provide our own custom appearance for window decorations.
+
+ To make things fairly general, we provide a number of private variables
+ to hold parameters which control certain aspects of the decoration's
+ appearance. We also define some data structures that we will use to
+ relate buttons in the window decorations to regions.
+
+ \section1 MyDecoration Class Implementation
+
+ In the constructor of the \c MyDecoration class, we set up some default
+ values for the decoration, specifying a thin window border, a title
+ bar that is just taller than the buttons it will hold, and we create a
+ list of buttons that we support:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp constructor start
+
+ We map each of these Qt::WindowFlags to QDecoration::DecorationRegion
+ enum values to help with the implementation of the
+ \l{#Finding Regions}{region() function implementation}.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp map window flags to decoration regions
+
+ In this decoration, we implement the buttons used in the decoration as
+ pixmaps. To help us relate regions of the window to these, we define
+ mappings between each \l{QDecoration::}{DecorationRegion} and its
+ corresponding pixmap for two situations: when a window is shown normally
+ and when it has been maximized. This is purely for cosmetic purposes.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp map decoration regions to pixmaps
+
+ We finish the constructor by defining the regions for buttons that we
+ understand. This will be useful when we are asked to give regions for
+ window decoration buttons.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp constructor end
+
+ \section2 Finding Regions
+
+ Each decoration needs to be able to describe the regions used for parts
+ of the window furniture, such as the close button, window borders and
+ title bar. We reimplement the \l{QDecorationDefault::}{region()} function
+ to do this for our decoration. This function returns a QRegion object
+ that describes an arbitrarily-shaped region of the screen that can itself
+ be made up of several distinct areas.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp region start
+
+ The function is called for a given \e widget, occupying a region specified
+ by \e insideRect, and is expected to return a region for the collection of
+ \l{QDecoration::}{DecorationRegion} enum values supplied in the
+ \e decorationRegion parameter.
+
+ We begin by figuring out how much space in the decoration we will need to
+ allocate for buttons, and where to place them:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp calculate the positions of buttons based on the window flags used
+
+ In a more sophisticated implementation, we might test the \e decorationRegion
+ supplied for regions related to buttons and the title bar, and only perform
+ this space allocation if asked for regions related to these.
+
+ We also use the information about the area occupied by buttons to determine
+ how large an area we can use for the window title:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp calculate the extent of the title
+
+ With these basic calculations done, we can start to compose a region, first
+ checking whether we have been asked for all of the window, and we return
+ immediately if so.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp check for all regions
+
+ We examine each decoration region in turn, adding the corresponding region
+ to the \c region object created earlier. We take care to avoid "off by one"
+ errors in the coordinate calculations.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp compose a region based on the decorations specified
+
+ Unlike the window borders and title bar, the regions occupied by buttons
+ many of the window decorations do not occupy fixed places in the window.
+ Instead, their locations depend on which other buttons are present.
+ We only add regions for buttons we can handle (defined in the \c stateRegions)
+ member variable, and only for those that are present (defined in the
+ \c buttons hash).
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp add a region for each button only if it is present
+
+ The fully composed region can then be returned:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp region end
+
+ The information returned by this function is used when the decoration is
+ painted. Ideally, this function should be implemented to perform all the
+ calculations necessary to place elements of the decoration; this makes
+ the implementation of the \c paint() function much easier.
+
+ \section2 Painting the Decoration
+
+ The \c paint() function is responsible for drawing each window element
+ for a given widget. Information about the decoration region, its state
+ and the widget itself is provided along with a QPainter object to use.
+
+ The first check we make is for a call with no regions:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp paint start
+
+ We return false to indicate that we have not painted anything. If we paint
+ something, we must return true so that the window can be composed, if
+ necessary.
+
+ Just as with the \c region() function, we test the decoration region to
+ determine which elements need to be drawn. If we paint anything, we set
+ the \c handled variable to true so that we can return the correct value
+ when we have finished.
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp paint different regions
+
+ Note that we use our own \c region() implementation to determine where
+ to draw decorations.
+
+ Since the \c region() function performs calculations to place buttons, we
+ can simply test the window flags against the buttons we support (using the
+ \c buttonHintMap defined in the constructor), and draw each button in the
+ relevant region:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp paint buttons
+
+ Finally, we return the value of \c handled to indicate whether any painting
+ was performed:
+
+ \snippet examples/qws/simpledecoration/mydecoration.cpp paint end
+
+ We now have a decoration class that we can use in an application.
+
+ \section1 Using the Decoration
+
+ In the \c main.cpp file, we set up the application as usual, but we also
+ create an instance of our decoration and set it as the standard decoration
+ for the application:
+
+ \snippet examples/qws/simpledecoration/main.cpp create application
+
+ This causes all windows opened by this application to use our decoration.
+ To demonstrate this, we show the analog clock widget from the
+ \l{Analog Clock Example}, which we build into the application:
+
+ \snippet examples/qws/simpledecoration/main.cpp start application
+
+ The application can be run either
+ \l{Running Qt for Embedded Linux Applications}{as a server or a client
+ application}. In both cases, it will use our decoration rather than the
+ default one provided with Qt.
+
+ \section1 Notes
+
+ This example does not cache any information about the state or buttons
+ used for each window. This means that the \c region() function calculates
+ the locations and regions of buttons in cases where it could re-use
+ existing information.
+
+ If you run the application as a window server, you may expect client
+ applications to use our decoration in preference to the default Qt
+ decoration. However, it is up to each application to draw its own
+ decoration, so this will not happen automatically. One way to achieve
+ this is to compile the decoration with each application that needs it;
+ another way is to build the decoration as a plugin, using the
+ QDecorationPlugin class, and load it into the server and client
+ applications.
+*/
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
new file mode 100644
index 0000000..8d2d102
--- /dev/null
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -0,0 +1,294 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/simpledommodel
+ \title Simple DOM Model Example
+
+ The Simple DOM Model example shows how an existing class can be adapted for use with
+ the model/view framework.
+
+ \image simpledommodel-example.png
+
+ Qt provides two complementary sets of classes for reading XML files: The classes based
+ around QXmlReader provide a SAX-style API for incremental reading of large files, and
+ the classes based around QDomDocument enable developers to access the contents of XML
+ files using a Document Object Model (DOM) API.
+
+ In this example, we create a model that uses the DOM API to expose the structure and
+ contents of XML documents to views via the standard QAbstractModel interface.
+
+ \section1 Design and Concepts
+
+ Reading an XML document with Qt's DOM classes is a straightforward process. Typically,
+ the contents of a file are supplied to QDomDocument, and nodes are accessed using the
+ functions provided by QDomNode and its subclasses.
+
+ \omit
+ For example, the following code
+ snippet reads the contents of a file into a QDomDocument object and traverses the
+ document, reading all the plain text that can be found:
+
+ \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc 0
+
+ In principle, the functions provided by QDomNode can be used to navigate from any
+ given starting point in a document to the piece of data requested by another component.
+ Since QDomDocument maintains information about the structure of a document, we can
+ use this to implement the required virtual functions in a QAbstractItemModel subclass.
+ \endomit
+
+ The aim is to use the structure provided by QDomDocument by wrapping QDomNode objects
+ in item objects similar to the \c TreeItem objects used in the
+ \l{Simple Tree Model Example}{Simple Tree Model} example.
+
+ \section1 DomModel Class Definition
+
+ Let us begin by examining the \c DomModel class:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.h 0
+
+ The class definition contains all the basic functions that are needed for a
+ read-only model. Only the constructor and \c document() function are specific to
+ this model. The private \c domDocument variable is used to hold the document
+ that is exposed by the model; the \c rootItem variable contains a pointer to
+ the root item in the model.
+
+ \section1 DomItem Class Definition
+
+ The \c DomItem class is used to hold information about a specific QDomNode in
+ the document:
+
+ \snippet examples/itemviews/simpledommodel/domitem.h 0
+
+ Each \c DomItem provides a wrapper for a QDomNode obtained from the underlying
+ document which contains a reference to the node, it's location in the parent node's
+ list of child nodes, and a pointer to a parent wrapper item.
+
+ The \c parent(), \c child(), and \c row() functions are convenience functions for
+ the \c DomModel to use that provide basic information about the item to be discovered
+ quickly. The node() function provides access to the underlying QDomNode object.
+
+ As well as the information supplied in the constructor, the class maintains a cache
+ of information about any child items. This is used to provide a collection of
+ persistent item objects that the model can identify consistently and improve the
+ performance of the model when accessing child items.
+
+ \section1 DomItem Class Implementation
+
+ Since the \c DomItem class is only a thin wrapper around QDomNode objects, with a
+ few additional features to help improve performance and memory usage, we can provide
+ a brief outline of the class before discussing the model itself.
+
+ The constructor simply records details of the QDomNode that needs to be wrapped:
+
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 0
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 1
+
+ As a result, functions to provide the parent wrapper, the row number occupied by
+ the item in its parent's list of children, and the underlying QDomNode for each item
+ are straightforward to write:
+
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 4
+ \codeline
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 6
+ \codeline
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 3
+
+ It is necessary to maintain a collection of items which can be consistently identified
+ by the model. For that reason, we maintain a hash of child wrapper items that, to
+ minimize memory usage, is initially empty. The model uses the item's \c child()
+ function to help create model indexes, and this constructs wrappers for the children
+ of the item's QDomNode, relating the row number of each child to the newly-constructed
+ wrapper:
+
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 5
+
+ If a QDomNode was previously wrapped, the cached wrapper is returned; otherwise, a
+ new wrapper is constructed and stored for valid children, and zero is returned for
+ invalid ones.
+
+ The class's destructor deletes all the child items of the wrapper:
+
+ \snippet examples/itemviews/simpledommodel/domitem.cpp 2
+
+ These, in turn, will delete their children and free any QDomNode objects in use.
+
+ \section1 DomModel Class Implementation
+
+ The structure provided by the \c DomItem class makes the implementation of \c DomModel
+ similar to the \c TreeModel shown in the
+ \l{Simple Tree Model Example}{Simple Tree Model} example.
+
+ The constructor accepts an existing document and a parent object for the model:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 0
+
+ A shallow copy of the document is stored for future reference, and a root item is
+ created to provide a wrapper around the document. We assign the root item a row
+ number of zero only to be consistent since the root item will have no siblings.
+
+ Since the model only contains information about the root item, the destructor only
+ needs to delete this one item:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 1
+
+ All of the child items in the tree will be deleted by the \c DomItem destructor as
+ their parent items are deleted.
+
+ \section2 Basic Properties of The Model
+
+ Some aspects of the model do not depend on the structure of the underlying document,
+ and these are simple to implement.
+
+ The number of columns exposed by the model is returned by the \c columnCount()
+ function:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 2
+
+ This value is fixed, and does not depend on the location or type of the underlying
+ node in the document. We will use these three columns to display different kinds of
+ data from the underlying document.
+
+ Since we only implement a read-only model, the \c flags() function is straightforward
+ to write:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 5
+
+ Since the model is intended for use in a tree view, the \c headerData() function only
+ provides a horizontal header:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 6
+
+ The model presents the names of nodes in the first column, element attributes in the
+ second, and any node values in the third.
+
+ \section2 Navigating The Document
+
+ The index() function creates a model index for the item with the given row, column,
+ and parent in the model:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 7
+
+ The function first has to relate the parent index to an item that contains a node
+ from the underlying document. If the parent index is invalid, it refers to the root
+ node in the document, so we retrieve the root item that wraps it; otherwise, we
+ obtain a pointer to the relevant item using the QModelIndex::internalPointer()
+ function. We are able to extract a pointer in this way because any valid model index
+ will have been created by this function, and we store pointers to item objects in
+ any new indexes that we create with QAbstractItemModel::createIndex():
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 8
+
+ A child item for the given row is provided by the parent item's \c child() function.
+ If a suitable child item was found then we call
+ \l{QAbstractItemModel::createIndex()}{createIndex()} to produce a model index for the
+ requested row and column, passing a pointer to the child item for it to store
+ internally. If no suitable child item is found, an invalid model index is returned.
+
+ Note that the items themselves maintain ownership of their child items. This means
+ that the model does not need to keep track of the child items that have been created,
+ and can let the items themselves tidy up when they are deleted.
+
+ The number of rows beneath a given item in the model is returned by the \c rowCount()
+ function, and is the number of child nodes contained by the node that corresponds to
+ the specified model index:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 10
+
+ To obtain the relevant node in the underlying document, we access the item via the
+ internal pointer stored in the model index. If an invalid index is supplied, the
+ root item is used instead. We use the item's \c node() function to access the node
+ itself, and simply count the number of child nodes it contains.
+
+ Since the model is used to represent a hierarchical data structure, it needs to
+ provide an implementation for the \c parent() function. This returns a model index
+ that corresponds to the parent of a child model index supplied as its argument:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 9
+
+ For valid indexes other than the index corresponding to the root item, we obtain
+ a pointer to the relevant item using the method described in the \c index() function,
+ and use the item's \c parent() function to obtain a pointer to the parent item.
+
+ If no valid parent item exists, or if the parent item is the root item, we can simply
+ follow convention and return an invalid model index. For all other parent items, we
+ create a model index containing the appropriate row and column numbers, and a pointer
+ to the parent item we just obtained.
+
+ Data is provided by the \c data() function. For simplicity, we only provide data for
+ the \l{Qt::DisplayRole}{display role}, returning an invalid variant for all other
+ requests:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 3
+
+ As before, we obtain an item pointer for the index supplied, and use it to obtain
+ the underlying document node. Depending on the column specified, the data we return
+ is obtained in different ways:
+
+ \snippet examples/itemviews/simpledommodel/dommodel.cpp 4
+
+ For the first column, we return the node's name. For the second column, we read any
+ attributes that the node may have, and return a string that contains a space-separated
+ list of attribute-value assignments. For the third column, we return any value that
+ the node may have; this allows the contents of text nodes to be displayed in a view.
+
+ If data from any other column is requested, an invalid variant is returned.
+
+ \section1 Implementation Notes
+
+ Ideally, we would rely on the structure provided by QDomDocument to help us write
+ the \l{QAbstractItemModel::parent()}{parent()} and
+ \l{QAbstractItemModel::index()}{index()} functions that are required when subclassing
+ QAbstractItemModel. However, since Qt's DOM classes use their own system for
+ dynamically allocating memory for DOM nodes, we cannot guarantee that the QDomNode
+ objects returned for a given piece of information will be the same for subsequent
+ accesses to the document.
+
+ We use item wrappers for each QDomNode to provide consistent pointers that the model
+ can use to navigate the document structure.
+ \omit
+ Since these items contain value references to the QDomNode objects themselves, this
+ has the side effect that the DOM nodes themselves can be used to reliably navigate
+ the document [not sure about this - QDom* may return different QDomNode objects for
+ the same piece of information]. However, this advantage is redundant since we need to
+ use wrapper items to obtain it. [Possible use of QDomNode cache in the model itself.]
+ \endomit
+*/
diff --git a/doc/src/examples/simpletextviewer.qdoc b/doc/src/examples/simpletextviewer.qdoc
new file mode 100644
index 0000000..2a5e45c0
--- /dev/null
+++ b/doc/src/examples/simpletextviewer.qdoc
@@ -0,0 +1,466 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example help/simpletextviewer
+ \title Simple Text Viewer Example
+
+ The Simple Text Viewer example shows how to use \QA as a customized
+ help viewer for your application.
+
+ This is done in two stages. Firstly, documentation is created and \QA
+ is customized; secondly, the functionality to launch and control
+ \QA is added to the application.
+
+ \image simpletextviewer-example.png
+
+ The Simple Text Viewer application lets the user select and view
+ existing files.
+
+ The application provides its own custom documentation that is
+ available from the \gui Help menu in the main window's menu bar
+ or by clicking the \gui Help button in the application's find file
+ dialog.
+
+ The example consists of four classes:
+
+ \list
+ \o \c Assistant provides functionality to launch \QA.
+ \o \c MainWindow is the main application window.
+ \o \c FindFileDialog allows the user to search for
+ files using wildcard matching.
+ \o \c TextEdit provides a rich text browser that makes
+ sure that images referenced in HTML documents are
+ displayed properly.
+ \endlist
+
+ Note that we will only comment on the parts of the implementation
+ that are relevant to the main issue, that is making Qt Assistant
+ act as a customized help viewer for our Simple Text Viewer
+ application.
+
+ \section1 Creating Documentation and Customizing \QA
+
+ How to create the actual documentation in the form of HTML pages is
+ not in the scope of this example. In general, HTML pages can either
+ be written by hand or generated with the help of documentation tools
+ like qdoc or Doxygen. For the purposes of this example we assume that
+ the HTML files have already been created. So, the only thing that
+ remains to be done is to tell \QA how to structure and display the
+ help information.
+
+ \section2 Organizing Documentation for \QA
+
+ Plain HTML files only contain text or documentation about specific topics,
+ but they usually include no information about how several HTML documents
+ relate to each other or in which order they are supposed to be read.
+ What is missing is a table of contents along with an index to access
+ certain help contents quickly, without having to browse through a lot
+ of documents in order to find a piece of information.
+
+ To organize the documentation and make it available for \QA, we have
+ to create a Qt help project (.qhp) file. The first and most important
+ part of the project file is the definition of the namespace. The namespace
+ has to be unique and will be the first part of the page URL in \QA.
+ In addition, we have to set a virtual folder which acts as a common
+ folder for documentation sets. This means, that two documentation sets
+ identified by two different namespaces can cross reference HTML files
+ since those files are in one big virtual folder. However, for this
+ example, we'll only have one documentation set available, so the
+ virtual folder name and functionality are not important.
+
+ \code
+ <?xml version="1.0" encoding="UTF-8"?>
+ <QtHelpProject version="1.0">
+ <namespace>com.trolltech.examples.simpletextviewer</namespace>
+ <virtualFolder>doc</virtualFolder>
+ \endcode
+
+ The next step is to define the filter section. A filter section
+ contains the table of contents, indices and a complete list of
+ all documentation files, and can have any number of filter attributes
+ assigned to it. A filter attribute is an ordinary string which can
+ be freely chosen. Later in \QA, users can then define a custom
+ filter referencing those attributes. If the attributes of a filter
+ section match the attributes of the custom filter the documentation
+ will be shown, otherwise \QA will hide the documentation.
+
+ Again, since we'll only have one documentation set, we do not need
+ the filtering functionality of \QA and can therefore skip the
+ filter attributes.
+
+ Now, we build up the table of contents. An item in the table is
+ defined by the \c section tag which contains the attributes for the
+ item title as well as link to the actual page. Section tags can be
+ nested infinitely, but for practical reasons it is not recommended
+ to nest them deeper than three or four levels. For our example we
+ want to use the following outline for the table of contents:
+
+ \list
+ \o Simple Text Viewer
+ \list
+ \o Find File
+ \list
+ \o File Dialog
+ \o Wildcard Matching
+ \o Browse
+ \endlist
+ \o Open File
+ \endlist
+ \endlist
+
+ In the help project file, the outline is represented by:
+
+ \code
+ <filterSection>
+ <toc>
+ <section title="Simple Text Viewer" ref="index.html">
+ <section title="Find File" ref="./findfile.html">
+ <section title="File Dialog" ref="./filedialog.html"></section>
+ <section title="Wildcard Matching" ref="./wildcardmatching.html"></section>
+ <section title="Browse" ref="./browse.html"></section>
+ </section>
+ <section title="Open File" ref="./openfile.html"></section>
+ </section>
+ </toc>
+ \endcode
+
+ After the table of contents is defined, we will list all index keywords:
+
+ \code
+ <keywords>
+ <keyword name="Display" ref="./index.html"/>
+ <keyword name="Rich text" ref="./index.html"/>
+ <keyword name="Plain text" ref="./index.html"/>
+ <keyword name="Find" ref="./findfile.html"/>
+ <keyword name="File menu" ref="./findfile.html"/>
+ <keyword name="File name" ref="./filedialog.html"/>
+ <keyword name="File dialog" ref="./filedialog.html"/>
+ <keyword name="File globbing" ref="./wildcardmatching.html"/>
+ <keyword name="Wildcard matching" ref="./wildcardmatching.html"/>
+ <keyword name="Wildcard syntax" ref="./wildcardmatching.html"/>
+ <keyword name="Browse" ref="./browse.html"/>
+ <keyword name="Directory" ref="./browse.html"/>
+ <keyword name="Open" ref="./openfile.html"/>
+ <keyword name="Select" ref="./openfile.html"/>
+ </keywords>
+ \endcode
+
+ As the last step, we have to list all files making up the documentation.
+ An important point to note here is that all files have to listed, including
+ image files, and even stylesheets if they are used.
+
+ \code
+ <files>
+ <file>browse.html</file>
+ <file>filedialog.html</file>
+ <file>findfile.html</file>
+ <file>index.html</file>
+ <file>intro.html</file>
+ <file>openfile.html</file>
+ <file>wildcardmatching.html</file>
+ <file>images/browse.png</file>
+ <file>images/fadedfilemenu.png</file>
+ <file>images/filedialog.png</file>
+ <file>images/handbook.png</file>
+ <file>images/mainwindow.png</file>
+ <file>images/open.png</file>
+ <file>images/wildcard.png</file>
+ </files>
+ </filterSection>
+ </QtHelpProject>
+ \endcode
+
+ The help project file is now finished. If you want to see the resulting
+ documentation in \QA, you have to generate a Qt compressed help file
+ out of it and register it with the default help collection of \QA.
+
+ \code
+ qhelpgenerator simpletextviewer.qhp -o simpletextviewer.qch
+ assistant -register simpletextviewer.qch
+ \endcode
+
+ If you start \QA now, you'll see the Simple Text Viewer documentation
+ beside the Qt documentation. This is OK for testing purposes, but
+ for the final version we want to only have the Simple Text Viewer
+ documentation in \QA.
+
+ \section2 Customizing \QA
+
+ The easiest way to make \QA only display the Simple Text Viewer
+ documentation is to create our own help collection file. A collection
+ file is stored in a binary format, similar to the compressed help file,
+ and generated from a help collection project file (*.qhcp). With
+ the help of a collection file, we can customize the appearance and even
+ some functionality offered by \QA.
+
+ At first, we change the window title and icon. Instead of showing "\QA"
+ it will show "Simple Text Viewer", so it is much clearer for the user
+ that the help viewer actually belongs to our application.
+
+ \code
+ <?xml version="1.0" encoding="UTF-8"?>
+ <QHelpCollectionProject version="1.0">
+ <assistant>
+ <title>Simple Text Viewer</title>
+ <applicationIcon>images/handbook.png</applicationIcon>
+ <cacheDirectory>Trolltech/SimpleTextViewer</cacheDirectory>
+ \endcode
+
+ The \c cacheDirectory tag specifies a subdirectory of the users
+ data directory (see the
+ \l{Using Qt Assistant as a Custom Help Viewer#Qt Help Collection Files}{Qt Help Collection Files})
+ where the cache file for the full text search or the settings file will
+ be stored.
+
+ After this, we set the page displayed by \QA when launched for the very
+ first time in its new configuration. The URL consists of the namespace
+ and virtual folder defined in the Qt help project file, followed by the
+ actual page file name.
+
+ \code
+ <startPage>qthelp://com.trolltech.examples.simpletextviewer/doc/index.html</startPage>
+ \endcode
+
+ Next, we alter the name of the "About" menu item to "About Simple
+ Text Viewer". The contents of the \gui{About} dialog are also changed
+ by specifying a file where the about text or icon is taken from.
+
+ \code
+ <aboutMenuText>
+ <text>About Simple Text Viewer</text>
+ </aboutMenuText>
+ <aboutDialog>
+ <file>about.txt</file>
+ <icon>images/icon.png</icon>
+ </aboutDialog>
+ \endcode
+
+ \QA offers the possibility to add or remove documentation via its
+ preferences dialog. This functionality is helpful when using \QA
+ as the central help viewer for more applications, but in our case
+ we want to actually prevent the user from removing the documentation.
+ So, we disable the documentation manager.
+
+ Since the address bar is not really relevant in such a small
+ documentation set we switch it off as well. By having just one filter
+ section, without any filter attributes, we can also disable the filter
+ functionality of \QA, which means that the filter page and the filter
+ toolbar will not be available.
+
+ \code
+ <enableDocumentationManager>false</enableDocumentationManager>
+ <enableAddressBar>false</enableAddressBar>
+ <enableFilterFunctionality>false</enableFilterFunctionality>
+ </assistant>
+ \endcode
+
+ For testing purposes, we already generated the compressed help file
+ and registered it with \QA's default help collection. With the
+ following lines we achieve the same result. The only and important
+ difference is that we register the compressed help file, not in
+ the default collection, but in our own collection file.
+
+ \code
+ <docFiles>
+ <generate>
+ <file>
+ <input>simpletextviewer.qhp</input>
+ <output>simpletextviewer.qch</output>
+ </file>
+ </generate>
+ <register>
+ <file>simpletextviewer.qch</file>
+ </register>
+ </docFiles>
+ </QHelpCollectionProject>
+ \endcode
+
+ As the last step, we have to generate the binary collection file
+ out of the help collection project file. This is done by running the
+ \c qcollectiongenerator tool.
+
+ \code
+ qcollectiongenerator simpletextviewer.qhcp -o simpletextviewer.qhc
+ \endcode
+
+ To test all our customizations made to \QA, we add the collection
+ file name to the command line:
+
+ \code
+ assistant -collectionFile simpletextviewer.qhc
+ \endcode
+
+ \section1 Controlling \QA via the Assistant Class
+
+ We will first take a look at how to start and operate \QA from a
+ remote application. For that purpose, we create a class called
+ \c Assistant.
+
+ This class provides a public function that is used to show pages
+ of the documentation, and one private helper function to make sure
+ that \QA is up and running.
+
+ Launching \QA is done in the function \c startAssistant() by simply
+ creating and starting a QProcess. If the process is already running,
+ the function returns immediately. Otherwise, the process has
+ to be set up and started.
+
+ \snippet examples/help/simpletextviewer/assistant.cpp 2
+
+ To start the process we need the executable name of \QA as well as the
+ command line arguments for running \QA in a customized mode. The
+ executable name is a little bit tricky since it depends on the
+ platform, but fortunately it is only different on Mac OS X.
+
+ The displayed documentation can be altered using the \c -collectionFile
+ command line argument when launching \QA. When started without any options,
+ \QA displays a default set of documentation. When Qt is installed,
+ the default documentation set in \QA contains the Qt reference
+ documentation as well as the tools that come with Qt, such as Qt
+ Designer and \c qmake.
+
+ In our example, we replace the default documentation set with our
+ custom documentation by passing our application-specific collection
+ file to the process's command line options.
+
+ As the last argument, we add \c -enableRemoteControl, which makes \QA
+ listen to its \c stdin channel for commands, such as those to display
+ a certain page in the documentation.
+ Then we start the process and wait until it is actually running. If,
+ for some reason \QA cannot be started, \c startAssistant() will return
+ false.
+
+ The implementation for \c showDocumentation() is now straightforward.
+ Firstly, we ensure that \QA is running, then we send the request to
+ display the \a page via the \c stdin channel of the process. It is very
+ important here that the command is terminated by the '\\0' character
+ followed by an end of line token to flush the channel.
+
+ \snippet examples/help/simpletextviewer/assistant.cpp 1
+
+ Finally, we make sure that \QA is terminated properly in the case that
+ the application is shut down. The destructor of QProcess kills the
+ process, meaning that the application has no possibility to do things
+ like save user settings, which would result in corrupted settings files.
+ To avoid this, we ask \QA to terminate in the destructor of the
+ \c Assistant class.
+
+ \snippet examples/help/simpletextviewer/assistant.cpp 0
+
+ \section1 MainWindow Class
+
+ \image simpletextviewer-mainwindow.png
+
+ The \c MainWindow class provides the main application window with
+ two menus: the \gui File menu lets the user open and view an
+ existing file, while the \gui Help menu provides information about
+ the application and about Qt, and lets the user open \QA to
+ display the application's documentation.
+
+ To be able to access the help functionality, we initialize the
+ \c Assistant object in the \c MainWindow's constructor.
+
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 0
+ \dots
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 1
+
+ Then we create all the actions for the Simple Text Viewer application.
+ Of special interest is the \c assistantAct action accessible
+ via the \key{F1} shortcut or the \menu{Help|Help Contents} menu item.
+ This action is connected to the \c showDocumentation() slot of
+ the \c MainWindow class.
+
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 4
+ \dots
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 5
+
+ In the \c showDocumentation() slot, we call the \c showDocumentation()
+ function of the \c Assistant class with the URL of home page of the
+ documentation.
+
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 3
+
+ Finally, we must reimplement the protected QWidget::closeEvent()
+ event handler to ensure that the application's \QA instance is
+ properly closed before we terminate the application.
+
+ \snippet examples/help/simpletextviewer/mainwindow.cpp 2
+
+ \section1 FindFileDialog Class
+
+ \image simpletextviewer-findfiledialog.png
+
+ The Simple Text Viewer application provides a find file dialog
+ allowing the user to search for files using wildcard matching. The
+ search is performed within the specified directory, and the user
+ is given an option to browse the existing file system to find the
+ relevant directory.
+
+ In the constructor we save the references to the \c Assistant
+ and \c QTextEdit objects passed as arguments. The \c Assistant
+ object will be used in the \c FindFileDialog's \c help() slot,
+ as we will see shortly, while the QTextEdit will be used in the
+ dialog's \c openFile() slot to display the chosen file.
+
+ \snippet examples/help/simpletextviewer/findfiledialog.cpp 0
+ \dots
+ \snippet examples/help/simpletextviewer/findfiledialog.cpp 1
+
+ The most relevant member to observe in the \c FindFileDialog
+ class is the private \c help() slot. The slot is connected to the
+ dialog's \gui Help button, and brings the current \QA instance
+ to the foreground with the documentation for the dialog by
+ calling \c Assistant's \c showDocumentation() function.
+
+ \snippet examples/help/simpletextviewer/findfiledialog.cpp 2
+
+ \section1 Summary
+
+ In order to make \QA act as a customized help tool for
+ your application, you must provide your application with a
+ process that controls \QA in addition to a custom help collection
+ file including Qt compressed help files.
+
+ The \l{Using Qt Assistant as a Custom Help Viewer} document contains
+ more information about the options and settings available to
+ applications that use \QA as a custom help viewer.
+*/
diff --git a/doc/src/examples/simpletreemodel.qdoc b/doc/src/examples/simpletreemodel.qdoc
new file mode 100644
index 0000000..5ddeb46
--- /dev/null
+++ b/doc/src/examples/simpletreemodel.qdoc
@@ -0,0 +1,346 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/simpletreemodel
+ \title Simple Tree Model Example
+
+ The Simple Tree Model example shows how to create a basic, read-only
+ hierarchical model to use with Qt's standard view classes. For a
+ description of simple non-hierarchical list and table models, see the
+ \l{model-view-programming.html}{Model/View Programming} overview.
+
+ \image simpletreemodel-example.png
+
+ Qt's model/view architecture provides a standard way for views to manipulate
+ information in a data source, using an abstract model of the data to
+ simplify and standardize the way it is accessed. Simple models represent
+ data as a table of items, and allow views to access this data via an
+ \l{model-view-model.html}{index-based} system. More generally, models can
+ be used to represent data in the form of a tree structure by allowing each
+ item to act as a parent to a table of child items.
+
+ Before attempting to implement a tree model, it is worth considering whether
+ the data is supplied by an external source, or whether it is going to be
+ maintained within the model itself. In this example, we will implement an
+ internal structure to hold data rather than discuss how to package data from
+ an external source.
+
+ \section1 Design and Concepts
+
+ The data structure that we use to represent the structure of the data takes
+ the form of a tree built from \c TreeItem objects. Each \c TreeItem
+ represents an item in a tree view, and contains several columns of data.
+
+ \target SimpleTreeModelStructure
+ \table
+ \row \i \inlineimage treemodel-structure.png
+ \i \bold{Simple Tree Model Structure}
+
+ The data is stored internally in the model using \c TreeItem objects that
+ are linked together in a pointer-based tree structure. Generally, each
+ \c TreeItem has a parent item, and can have a number of child items.
+ However, the root item in the tree structure has no parent item and it
+ is never referenced outside the model.
+
+ Each \c TreeItem contains information about its place in the tree
+ structure; it can return its parent item and its row number. Having
+ this information readily available makes implementing the model easier.
+
+ Since each item in a tree view usually contains several columns of data
+ (a title and a summary in this example), it is natural to store this
+ information in each item. For simplicity, we will use a list of QVariant
+ objects to store the data for each column in the item.
+ \endtable
+
+ The use of a pointer-based tree structure means that, when passing a
+ model index to a view, we can record the address of the corresponding
+ item in the index (see QAbstractItemModel::createIndex()) and retrieve
+ it later with QModelIndex::internalPointer(). This makes writing the
+ model easier and ensures that all model indexes that refer to the same
+ item have the same internal data pointer.
+
+ With the appropriate data structure in place, we can create a tree model
+ with a minimal amount of extra code to supply model indexes and data to
+ other components.
+
+ \section1 TreeItem Class Definition
+
+ The \c TreeItem class is defined as follows:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.h 0
+
+ The class is a basic C++ class. It does not inherit from QObject or
+ provide signals and slots. It is used to hold a list of QVariants,
+ containing column data, and information about its position in the tree
+ structure. The functions provide the following features:
+
+ \list
+ \o The \c appendChildItem() is used to add data when the model is first
+ constructed and is not used during normal use.
+ \o The \c child() and \c childCount() functions allow the model to obtain
+ information about any child items.
+ \o Information about the number of columns associated with the item is
+ provided by \c columnCount(), and the data in each column can be
+ obtained with the data() function.
+ \o The \c row() and \c parent() functions are used to obtain the item's
+ row number and parent item.
+ \endlist
+
+ The parent item and column data are stored in the \c parentItem and
+ \c itemData private member variables. The \c childItems variable contains
+ a list of pointers to the item's own child items.
+
+ \section1 TreeItem Class Implementation
+
+ The constructor is only used to record the item's parent and the data
+ associated with each column.
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 0
+
+ A pointer to each of the child items belonging to this item will be
+ stored in the \c childItems private member variable. When the class's
+ destructor is called, it must delete each of these to ensure that
+ their memory is reused:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 1
+
+ Since each of the child items are constructed when the model is initially
+ populated with data, the function to add child items is straightforward:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 2
+
+ Each item is able to return any of its child items when given a suitable
+ row number. For example, in the \l{#SimpleTreeModelStructure}{above diagram},
+ the item marked with the letter "A" corresponds to the child of the root item
+ with \c{row = 0}, the "B" item is a child of the "A" item with \c{row = 1},
+ and the "C" item is a child of the root item with \c{row = 1}.
+
+ The \c child() function returns the child that corresponds to
+ the specified row number in the item's list of child items:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 3
+
+ The number of child items held can be found with \c childCount():
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 4
+
+ The \c TreeModel uses this function to determine the number of rows that
+ exist for a given parent item.
+
+ The \c row() function reports the item's location within its parent's
+ list of items:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 8
+
+ Note that, although the root item (with no parent item) is automatically
+ assigned a row number of 0, this information is never used by the model.
+
+ The number of columns of data in the item is trivially returned by the
+ \c columnCount() function.
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 5
+
+ Column data is returned by the \c data() function, taking advantage of
+ QList's ability to provide sensible default values if the column number
+ is out of range:
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 6
+
+ The item's parent is found with \c parent():
+
+ \snippet examples/itemviews/simpletreemodel/treeitem.cpp 7
+
+ Note that, since the root item in the model will not have a parent, this
+ function will return zero in that case. We need to ensure that the model
+ handles this case correctly when we implement the \c TreeModel::parent()
+ function.
+
+ \section1 TreeModel Class Definition
+
+ The \c TreeModel class is defined as follows:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.h 0
+
+ This class is similar to most other subclasses of QAbstractItemModel that
+ provide read-only models. Only the form of the constructor and the
+ \c setupModelData() function are specific to this model. In addition, we
+ provide a destructor to clean up when the model is destroyed.
+
+ \section1 TreeModel Class Implementation
+
+ For simplicity, the model does not allow its data to be edited. As a
+ result, the constructor takes an argument containing the data that the
+ model will share with views and delegates:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 0
+
+ It is up to the constructor to create a root item for the model. This
+ item only contains vertical header data for convenience. We also use it
+ to reference the internal data structure that contains the model data,
+ and it is used to represent an imaginary parent of top-level items in
+ the model.
+
+ The model's internal data structure is populated with items by the
+ \c setupModelData() function. We will examine this function separately
+ at the end of this document.
+
+ The destructor ensures that the root item and all of its descendants
+ are deleted when the model is destroyed:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 1
+
+ Since we cannot add data to the model after it is constructed and set
+ up, this simplifies the way that the internal tree of items is managed.
+
+ Models must implement an \c index() function to provide indexes for
+ views and delegates to use when accessing data. Indexes are created
+ for other components when they are referenced by their row and column
+ numbers, and their parent model index. If an invalid model
+ index is specified as the parent, it is up to the model to return an
+ index that corresponds to a top-level item in the model.
+
+ When supplied with a model index, we first check whether it is valid.
+ If it is not, we assume that a top-level item is being referred to;
+ otherwise, we obtain the data pointer from the model index with its
+ \l{QModelIndex::internalPointer()}{internalPointer()} function and use
+ it to reference a \c TreeItem object. Note that all the model indexes
+ that we construct will contain a pointer to an existing \c TreeItem,
+ so we can guarantee that any valid model indexes that we receive will
+ contain a valid data pointer.
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 6
+
+ Since the row and column arguments to this function refer to a
+ child item of the corresponding parent item, we obtain the item using
+ the \c TreeItem::child() function. The
+ \l{QAbstractItemModel::createIndex()}{createIndex()} function is used
+ to create a model index to be returned. We specify the row and column
+ numbers, and a pointer to the item itself. The model index can be used
+ later to obtain the item's data.
+
+ The way that the \c TreeItem objects are defined makes writing the
+ \c parent() function easy:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 7
+
+ We only need to ensure that we never return a model index corresponding
+ to the root item. To be consistent with the way that the \c index()
+ function is implemented, we return an invalid model index for the
+ parent of any top-level items in the model.
+
+ When creating a model index to return, we must specify the row and
+ column numbers of the parent item within its own parent. We can
+ easily discover the row number with the \c TreeItem::row() function,
+ but we follow a convention of specifying 0 as the column number of
+ the parent. The model index is created with
+ \l{QAbstractItemModel::createIndex()}{createIndex()} in the same way
+ as in the \c index() function.
+
+ The \c rowCount() function simply returns the number of child items
+ for the \c TreeItem that corresponds to a given model index, or the
+ number of top-level items if an invalid index is specified:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 8
+
+ Since each item manages its own column data, the \c columnCount()
+ function has to call the item's own \c columnCount() function to
+ determine how many columns are present for a given model index.
+ As with the \c rowCount() function, if an invalid model index is
+ specified, the number of columns returned is determined from the
+ root item:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 2
+
+ Data is obtained from the model via \c data(). Since the item manages
+ its own columns, we need to use the column number to retrieve the data
+ with the \c TreeItem::data() function:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 3
+
+ Note that we only support the \l{Qt::ItemDataRole}{DisplayRole}
+ in this implementation, and we also return invalid QVariant objects for
+ invalid model indexes.
+
+ We use the \c flags() function to ensure that views know that the
+ model is read-only:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 4
+
+ The \c headerData() function returns data that we conveniently stored
+ in the root item:
+
+ \snippet examples/itemviews/simpletreemodel/treemodel.cpp 5
+
+ This information could have been supplied in a different way: either
+ specified in the constructor, or hard coded into the \c headerData()
+ function.
+
+ \section1 Setting Up the Data in the Model
+
+ We use the \c setupModelData() function to set up the initial data in
+ the model. This function parses a text file, extracting strings of
+ text to use in the model, and creates item objects that record both
+ the data and the overall model structure.
+ Naturally, this function works in a way that is very specific to
+ this model. We provide the following description of its behavior,
+ and refer the reader to the example code itself for more information.
+
+ We begin with a text file in the following format:
+
+ \snippet doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc 0
+ \dots
+ \snippet doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc 1
+
+ We process the text file with the following two rules:
+
+ \list
+ \o For each pair of strings on each line, create an item (or node)
+ in a tree structure, and place each string in a column of data
+ in the item.
+ \o When the first string on a line is indented with respect to the
+ first string on the previous line, make the item a child of the
+ previous item created.
+ \endlist
+
+ To ensure that the model works correctly, it is only necessary to
+ create instances of \c TreeItem with the correct data and parent item.
+*/
diff --git a/doc/src/examples/simplewidgetmapper.qdoc b/doc/src/examples/simplewidgetmapper.qdoc
new file mode 100644
index 0000000..2fdbf25
--- /dev/null
+++ b/doc/src/examples/simplewidgetmapper.qdoc
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/simplewidgetmapper
+ \title Simple Widget Mapper Example
+
+ The Simple Widget Mapper example shows how to use a widget mapper to display
+ data from a model in a collection of widgets.
+
+ \image simplewidgetmapper-example.png
+
+ The QDataWidgetMapper class allows information obtained from a
+ \l{Model Classes}{model} to be viewed and edited in a collection of
+ widgets instead of in an \l{View Classes}{item view}.
+ Any model derived from QAbstractItemModel can be used as the source of
+ data and almost any input widget can be used to display it.
+
+ The example itself is very simple: we create \c Window, a QWidget subclass
+ that we use to hold the widgets used to present the data, and show it. The
+ \c Window class will provide buttons that the user can click to show
+ different records from the model.
+
+ \section1 Window Class Definition
+
+ The class provides a constructor, a slot to keep the buttons up to date,
+ and a private function to set up the model:
+
+ \snippet examples/itemviews/simplewidgetmapper/window.h Window definition
+
+ In addition to the QDataWidgetMapper object and the controls used to make
+ up the user interface, we use a QStandardItemModel to hold our data.
+ We could use a custom model, but this standard implementation is sufficient
+ for our purposes.
+
+ \section1 Window Class Implementation
+
+ The constructor of the \c Window class can be explained in three parts.
+ In the first part, we set up the widgets used for the user interface:
+
+ \snippet examples/itemviews/simplewidgetmapper/window.cpp Set up widgets
+
+ We also set up the buddy relationships between various labels and the
+ corresponding input widgets.
+
+ Next, we set up the widget mapper, relating each input widget to a column
+ in the model specified by the call to \l{QDataWidgetMapper::}{setModel()}:
+
+ \snippet examples/itemviews/simplewidgetmapper/window.cpp Set up the mapper
+
+ We also connect the mapper to the \gui{Next} and \gui{Previous} buttons
+ via its \l{QDataWidgetMapper::}{toNext()} and
+ \l{QDataWidgetMapper::}{toPrevious()} slots. The mapper's
+ \l{QDataWidgetMapper::}{currentIndexChanged()} signal is connected to the
+ \c{updateButtons()} slot in the window which we'll show later.
+
+ In the final part of the constructor, we set up the layout, placing each
+ of the widgets in a grid (we could also use a QFormLayout for this):
+
+ \snippet examples/itemviews/simplewidgetmapper/window.cpp Set up the layout
+
+ Lastly, we set the window title and initialize the mapper by setting it to
+ refer to the first row in the model.
+
+ The model is initialized in the window's \c{setupModel()} function. Here,
+ we create a standard model with 5 rows and 3 columns, and we insert some
+ sample names, addresses and ages into each row:
+
+ \snippet examples/itemviews/simplewidgetmapper/window.cpp Set up the model
+
+ As a result, each row can be treated like a record in a database, and the
+ widget mapper will read the data from each row, using the column numbers
+ specified earlier to access the correct data for each widget. This is
+ shown in the following diagram:
+
+ \image widgetmapper-simple-mapping.png
+
+ Since the user can navigate using the buttons in the user interface, the
+ example is fully-functional at this point, but to make it a bit more
+ user-friendly, we implement the \c{updateButtons()} slot to show when the
+ user is viewing the first or last records:
+
+ \snippet examples/itemviews/simplewidgetmapper/window.cpp Slot for updating the buttons
+
+ If the mapper is referring to the first row in the model, the \gui{Previous}
+ button is disabled. Similarly, the \gui{Next} button is disabled if the
+ mapper reaches the last row in the model.
+
+ \section1 More Complex Mappings
+
+ The QDataWidgetMapper class makes it easy to relate information from a
+ model to widgets in a user interface. However, it is sometimes necessary
+ to use input widgets which offer choices to the user, such as QComboBox,
+ in conjunction with a widget mapper.
+
+ In these situations, although the mapping to input widgets remains simple,
+ more work needs to be done to expose additional data to the widget mapper.
+ This is covered by the \l{Combo Widget Mapper Example}{Combo Widget Mapper}
+ and \l{SQL Widget Mapper Example}{SQL Widget Mapper}
+ examples.
+*/
diff --git a/doc/src/examples/sipdialog.qdoc b/doc/src/examples/sipdialog.qdoc
new file mode 100644
index 0000000..817f5e2
--- /dev/null
+++ b/doc/src/examples/sipdialog.qdoc
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/sipdialog
+ \title SIP Dialog Example
+ \ingroup qtce
+
+ The SIP Dialog example shows how to create a dialog that is aware of
+ the Windows Mobile SIP (Software Input Panel) and reacts to it.
+
+ \table
+ \row \o \inlineimage sipdialog-closed.png
+ \o \inlineimage sipdialog-opened.png
+ \endtable
+
+ Sometimes it is necessary for a dialog to take the SIP into account,
+ as the SIP may hide important input widgets. The SIP Dialog Example
+ shows how a \c Dialog object, \c dialog, can be resized accordingly
+ if the SIP is opened, by embedding the contents of \c dialog in a
+ QScrollArea.
+
+ \section1 Dialog Class Definition
+
+ The \c Dialog class is a subclass of QDialog that implements a public
+ slot, \c desktopResized(), and a public function, \c reactToSIP(). Also,
+ it holds a private instance of QRect, \c desktopGeometry.
+
+ \snippet dialogs/sipdialog/dialog.h Dialog header
+
+ \section1 Dialog Class Implementation
+
+ In the constructor of \c Dialog, we start by obtaining the
+ available geometry of the screen with
+ \l{QDesktopWidget::availableGeometry()}{availableGeometry()}. The
+ parameter used is \c 0 to indicate that we require the primary screen.
+
+ \snippet dialogs/sipdialog/dialog.cpp Dialog constructor part1
+
+ We set the window's title to "SIP Dialog Example" and declare a QScrollArea
+ object, \c scrollArea. Next we instantiate a QGroupBox, \c groupBox, with
+ \c scrollArea as its parent. The title of \c groupBox is also set to
+ "SIP Dialog Example". A QGridLayout object, \c gridLayout, is then used
+ as \c{groupBox}'s layout.
+
+ We create a QLineEdit, a QLabel and a QPushButton and we set the
+ \l{QWidget::setMinimumWidth()}{minimumWidth} property to 220 pixels,
+ respectively.
+
+ \snippet dialogs/sipdialog/dialog.cpp Dialog constructor part2
+
+ Also, all three widgets' text are set accordingly. The
+ \l{QGridLayout::setVerticalSpacing()}{verticalSpacing} property of
+ \c gridLayout is set based on the height of \c desktopGeometry. This
+ is to adapt to the different form factors of Windows Mobile. Then, we
+ add our widgets to the layout.
+
+ \snippet dialogs/sipdialog/dialog.cpp Dialog constructor part3
+
+ The \c{scrollArea}'s widget is set to \c groupBox. We use a QHBoxLayout
+ object, \c layout, to contain \c scrollArea. The \c{Dialog}'s layout
+ is set to \c layout and the scroll area's horizontal scroll bar is turned
+ off.
+
+ \snippet dialogs/sipdialog/dialog.cpp Dialog constructor part4
+
+ The following signals are connected to their respective slots:
+ \list
+ \o \c{button}'s \l{QPushButton::pressed()}{pressed()} signal to
+ \l{QApplication}'s \l{QApplication::closeAllWindows()}
+ {closeAllWindows()} slot,
+ \o \l{QDesktopWidget}'s \l{QDesktopWidget::workAreaResized()}
+ {workAreaResized()} signal to \c{dialog}'s \c desktopResized() slot.
+ \endlist
+
+ \snippet dialogs/sipdialog/dialog.cpp Dialog constructor part5
+
+ The \c desktopResized() function accepts an integer, \a screen,
+ corresponding to the screen's index. We only invoke \c reactToSIP()
+ if \a screen is the primary screen (e.g. index = 0).
+
+ \snippet dialogs/sipdialog/dialog.cpp desktopResized() function
+
+ The \c reactToSIP() function resizes \c dialog accordingly if the
+ desktop's available geometry changed vertically, as this change signifies
+ that the SIP may have been opened or closed.
+
+ \snippet dialogs/sipdialog/dialog.cpp reactToSIP() function
+
+ If the height has decreased, we unset the maximized window state.
+ Otherwise, we set the maximized window state. Lastly, we update
+ \c desktopGeometry to the desktop's available geometry.
+
+ \section1 The \c main() function
+
+ The \c main() function for the SIP Dialog example instantiates \c Dialog
+ and invokes its \l{QDialog::exec()}{exec()} function.
+
+ \snippet dialogs/sipdialog/main.cpp main() function
+
+ \note Although this example uses a dialog, the techniques used here apply to
+ all top-level widgets respectively.
+*/
diff --git a/doc/src/examples/sliders.qdoc b/doc/src/examples/sliders.qdoc
new file mode 100644
index 0000000..650fdcb
--- /dev/null
+++ b/doc/src/examples/sliders.qdoc
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/sliders
+ \title Sliders Example
+
+ Qt provides three types of slider-like widgets: QSlider,
+ QScrollBar and QDial. They all inherit most of their
+ functionality from QAbstractSlider, and can in theory replace
+ each other in an application since the differences only concern
+ their look and feel. This example shows what they look like, how
+ they work and how their behavior and appearance can be
+ manipulated through their properties.
+
+ The example also demonstrates how signals and slots can be used to
+ synchronize the behavior of two or more widgets.
+
+ \image sliders-example.png Screenshot of the Sliders example
+
+ The Sliders example consists of two classes:
+
+ \list
+
+ \o \c SlidersGroup is a custom widget. It combines a QSlider, a
+ QScrollBar and a QDial.
+
+ \o \c Window is the main widget combining a QGroupBox and a
+ QStackedWidget. In this example, the QStackedWidget provides a
+ stack of two \c SlidersGroup widgets. The QGroupBox contain
+ several widgets that control the behavior of the slider-like
+ widgets.
+
+ \endlist
+
+ First we will review the \c Window class, then we
+ will take a look at the \c SlidersGroup class.
+
+ \section1 Window Class Definition
+
+ \snippet examples/widgets/sliders/window.h 0
+
+ The \c Window class inherits from QWidget. It displays the slider
+ widgets and allows the user to set their minimum, maximum and
+ current values and to customize their appearance, key bindings
+ and orientation. We use a private \c createControls() function to
+ create the widgets that provide these controlling mechanisms and
+ to connect them to the slider widgets.
+
+ \section1 Window Class Implementation
+
+ \snippet examples/widgets/sliders/window.cpp 0
+
+ In the constructor we first create the two \c SlidersGroup
+ widgets that display the slider widgets horizontally and
+ vertically, and add them to the QStackedWidget. QStackedWidget
+ provides a stack of widgets where only the top widget is visible.
+ With \c createControls() we create a connection from a
+ controlling widget to the QStackedWidget, making the user able to
+ choose between horizontal and vertical orientation of the slider
+ widgets. The rest of the controlling mechanisms is implemented by
+ the same function call.
+
+ \snippet examples/widgets/sliders/window.cpp 1
+ \snippet examples/widgets/sliders/window.cpp 2
+
+ Then we connect the \c horizontalSliders, \c verticalSliders and
+ \c valueSpinBox to each other, so that the slider widgets and the
+ control widget will behave synchronized when the current value of
+ one of them changes. The \c valueChanged() signal is emitted with
+ the new value as argument. The \c setValue() slot sets the
+ current value of the widget to the new value, and emits \c
+ valueChanged() if the new value is different from the old one.
+
+ We put the group of control widgets and the stacked widget in a
+ horizontal layout before we initialize the minimum, maximum and
+ current values. The initialization of the current value will
+ propagate to the slider widgets through the connection we made
+ between \c valueSpinBox and the \c SlidersGroup widgets. The
+ minimum and maximum values propagate through the connections we
+ created with \c createControls().
+
+ \snippet examples/widgets/sliders/window.cpp 3
+ \snippet examples/widgets/sliders/window.cpp 4
+
+ In the private \c createControls() function, we let a QGroupBox
+ (\c controlsGroup) display the control widgets. A group box can
+ provide a frame, a title and a keyboard shortcut, and displays
+ various other widgets inside itself. The group of control widgets
+ is composed by two checkboxes, three spin boxes (with labels) and
+ one combobox.
+
+ After creating the labels, we create the two checkboxes.
+ Checkboxes are typically used to represent features in an
+ application that can be enabled or disabled. When \c
+ invertedAppearance is enabled, the slider values are inverted.
+ The table below shows the appearance for the different
+ slider-like widgets:
+
+ \table
+ \header \o \o{2,1} QSlider \o{2,1} QScrollBar \o{2,1} QDial
+ \header \o \o Normal \o Inverted \o Normal \o Inverted \o Normal \o Inverted
+ \row \o Qt::Horizontal \o Left to right \o Right to left \o Left to right \o Right to left \o Clockwise \o Counterclockwise
+ \row \o Qt::Vertical \o Bottom to top \o Top to bottom \o Top to bottom \o Bottom to top \o Clockwise \o Counterclockwise
+ \endtable
+
+ It is common to invert the appearance of a vertical QSlider. A
+ vertical slider that controls volume, for example, will typically
+ go from bottom to top (the non-inverted appearance), whereas a
+ vertical slider that controls the position of an object on screen
+ might go from top to bottom, because screen coordinates go from
+ top to bottom.
+
+ When the \c invertedKeyBindings option is enabled (corresponding
+ to the QAbstractSlider::invertedControls property), the slider's
+ wheel and key events are inverted. The normal key bindings mean
+ that scrolling the mouse wheel "up" or using keys like page up
+ will increase the slider's current value towards its maximum.
+ Inverted, the same wheel and key events will move the value
+ toward the slider's minimum. This can be useful if the \e
+ appearance of a slider is inverted: Some users might expect the
+ keys to still work the same way on the value, whereas others
+ might expect \key PageUp to mean "up" on the screen.
+
+ Note that for horizontal and vertical scroll bars, the key
+ bindings are inverted by default: \key PageDown increases the
+ current value, and \key PageUp decreases it.
+
+ \snippet examples/widgets/sliders/window.cpp 5
+ \snippet examples/widgets/sliders/window.cpp 6
+
+ Then we create the spin boxes. QSpinBox allows the user to choose
+ a value by clicking the up and down buttons or pressing the \key
+ Up and \key Down keys on the keyboard to modify the value
+ currently displayed. The user can also type in the value
+ manually. The spin boxes control the minimum, maximum and current
+ values for the QSlider, QScrollBar, and QDial widgets.
+
+ We create a QComboBox that allows the user to choose the
+ orientation of the slider widgets. The QComboBox widget is a
+ combined button and popup list. It provides a means of presenting
+ a list of options to the user in a way that takes up the minimum
+ amount of screen space.
+
+ \snippet examples/widgets/sliders/window.cpp 7
+ \snippet examples/widgets/sliders/window.cpp 8
+
+ We synchronize the behavior of the control widgets and the slider
+ widgets through their signals and slots. We connect each control
+ widget to both the horizontal and vertical group of slider
+ widgets. We also connect \c orientationCombo to the
+ QStackedWidget, so that the correct "page" is shown. Finally, we
+ lay out the control widgets in a QGridLayout within the \c
+ controlsGroup group box.
+
+ \section1 SlidersGroup Class Definition
+
+ \snippet examples/widgets/sliders/slidersgroup.h 0
+
+ The \c SlidersGroup class inherits from QGroupBox. It provides a
+ frame and a title, and contains a QSlider, a QScrollBar and a
+ QDial.
+
+ We provide a \c valueChanged() signal and a public \c setValue()
+ slot with equivalent functionality to the ones in QAbstractSlider
+ and QSpinBox. In addition, we implement several other public
+ slots to set the minimum and maximum value, and invert the slider
+ widgets' appearance as well as key bindings.
+
+ \section1 SlidersGroup Class Implementation
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 0
+
+ First we create the slider-like widgets with the appropiate
+ properties. In particular we set the focus policy for each
+ widget. Qt::FocusPolicy is an enum type that defines the various
+ policies a widget can have with respect to acquiring keyboard
+ focus. The Qt::StrongFocus policy means that the widget accepts
+ focus by both tabbing and clicking.
+
+ Then we connect the widgets with each other, so that they will
+ stay synchronized when the current value of one of them changes.
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 1
+ \snippet examples/widgets/sliders/slidersgroup.cpp 2
+
+ We connect \c {dial}'s \c valueChanged() signal to the
+ \c{SlidersGroup}'s \c valueChanged() signal, to notify the other
+ widgets in the application (i.e., the control widgets) of the
+ changed value.
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 3
+ \codeline
+ \snippet examples/widgets/sliders/slidersgroup.cpp 4
+
+ Finally, depending on the \l {Qt::Orientation}{orientation} given
+ at the time of construction, we choose and create the layout for
+ the slider widgets within the group box.
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 5
+ \snippet examples/widgets/sliders/slidersgroup.cpp 6
+
+ The \c setValue() slot sets the value of the QSlider. We don't
+ need to explicitly call
+ \l{QAbstractSlider::setValue()}{setValue()} on the QScrollBar and
+ QDial widgets, since QSlider will emit the
+ \l{QAbstractSlider::valueChanged()}{valueChanged()} signal when
+ its value changes, triggering a domino effect.
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 7
+ \snippet examples/widgets/sliders/slidersgroup.cpp 8
+ \codeline
+ \snippet examples/widgets/sliders/slidersgroup.cpp 9
+ \snippet examples/widgets/sliders/slidersgroup.cpp 10
+
+ The \c setMinimum() and \c setMaximum() slots are used by the \c
+ Window class to set the range of the QSlider, QScrollBar, and
+ QDial widgets.
+
+ \snippet examples/widgets/sliders/slidersgroup.cpp 11
+ \snippet examples/widgets/sliders/slidersgroup.cpp 12
+ \codeline
+ \snippet examples/widgets/sliders/slidersgroup.cpp 13
+ \snippet examples/widgets/sliders/slidersgroup.cpp 14
+
+ The \c invertAppearance() and \c invertKeyBindings() slots
+ control the child widgets'
+ \l{QAbstractSlider::invertedAppearance}{invertedAppearance} and
+ \l{QAbstractSlider::invertedControls}{invertedControls}
+ properties.
+*/
diff --git a/doc/src/examples/spinboxdelegate.qdoc b/doc/src/examples/spinboxdelegate.qdoc
new file mode 100644
index 0000000..542eebd
--- /dev/null
+++ b/doc/src/examples/spinboxdelegate.qdoc
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/spinboxdelegate
+ \title Spin Box Delegate Example
+
+ The Spin Box Delegate example shows how to create an editor for a custom delegate in
+ the model/view framework by reusing a standard Qt editor widget.
+
+ The model/view framework provides a standard delegate that is used by default
+ with the standard view classes. For most purposes, the selection of editor
+ widgets available through this delegate is sufficient for editing text, boolean
+ values, and other simple data types. However, for specific data types, it is
+ sometimes necessary to use a custom delegate to either display the data in a
+ specific way, or allow the user to edit it with a custom control.
+
+ \image spinboxdelegate-example.png
+
+ This concepts behind this example are covered in the
+ \l{model-view-delegate.html}{Delegate Classes} chapter of the
+ \l{model-view-programming.html}{Model/View Programming} overview.
+
+ \section1 SpinBoxDelegate Class Definition
+
+ The definition of the delegate is as follows:
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.h 0
+
+ The delegate class declares only those functions that are needed to
+ create an editor widget, display it at the correct location in a view,
+ and communicate with a model. Custom delegates can also provide their
+ own painting code by reimplementing the \c paintEvent() function.
+
+ \section1 SpinBoxDelegate Class Implementation
+
+ Since the delegate is stateless, the constructor only needs to
+ call the base class's constructor with the parent QObject as its
+ argument:
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 0
+
+ Since the delegate is a subclass of QItemDelegate, the data it retrieves
+ from the model is displayed in a default style, and we do not need to
+ provide a custom \c paintEvent().
+
+ The \c createEditor() function returns an editor widget, in this case a
+ spin box that restricts values from the model to integers from 0 to 100
+ inclusive.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 1
+
+ We install an event filter on the spin box to ensure that it behaves in
+ a way that is consistent with other delegates. The implementation for
+ the event filter is provided by the base class.
+
+ The \c setEditorData() function reads data from the model, converts it
+ to an integer value, and writes it to the editor widget.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 2
+
+ Since the view treats delegates as ordinary QWidget instances, we have
+ to use a static cast before we can set the value in the spin box.
+
+ The \c setModelData() function reads the contents of the spin box, and
+ writes it to the model.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 3
+
+ We call \l{QSpinBox::interpretText()}{interpretText()} to make sure that
+ we obtain the most up-to-date value in the spin box.
+
+ The \c updateEditorGeometry() function updates the editor widget's
+ geometry using the information supplied in the style option. This is the
+ minimum that the delegate must do in this case.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 4
+
+ More complex editor widgets may divide the rectangle available in
+ \c{option.rect} between different child widgets if required.
+
+ \section1 The Main Function
+
+ This example is written in a slightly different way to many of the
+ other examples supplied with Qt. To demonstrate the use of a custom
+ editor widget in a standard view, it is necessary to set up a model
+ containing some arbitrary data and a view to display it.
+
+ We set up the application in the normal way, construct a standard item
+ model to hold some data, set up a table view to use the data in the
+ model, and construct a custom delegate to use for editing:
+
+ \snippet examples/itemviews/spinboxdelegate/main.cpp 0
+
+ The table view is informed about the delegate, and will use it to
+ display each of the items. Since the delegate is a subclass of
+ QItemDelegate, each cell in the table will be rendered using standard
+ painting operations.
+
+ We insert some arbitrary data into the model for demonstration purposes:
+
+ \snippet examples/itemviews/spinboxdelegate/main.cpp 1
+ \snippet examples/itemviews/spinboxdelegate/main.cpp 2
+
+ Finally, the table view is displayed with a window title, and we start
+ the application's event loop:
+
+ \snippet examples/itemviews/spinboxdelegate/main.cpp 3
+
+ Each of the cells in the table can now be edited in the usual way, but
+ the spin box ensures that the data returned to the model is always
+ constrained by the values allowed by the spin box delegate.
+*/
diff --git a/doc/src/examples/spinboxes.qdoc b/doc/src/examples/spinboxes.qdoc
new file mode 100644
index 0000000..d8b0daa
--- /dev/null
+++ b/doc/src/examples/spinboxes.qdoc
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/spinboxes
+ \title Spin Boxes Example
+
+ The Spin Boxes example shows how to use the many different types of spin boxes
+ available in Qt, from a simple QSpinBox widget to more complex editors like
+ the QDateTimeEdit widget.
+
+ \image spinboxes-example.png
+
+ The example consists of a single \c Window class that is used to display the
+ different spin box-based widgets available with Qt.
+
+ \section1 Window Class Definition
+
+ The \c Window class inherits QWidget and contains two slots that are used
+ to provide interactive features:
+
+ \snippet examples/widgets/spinboxes/window.h 0
+
+ The private functions are used to set up each type of spin box in the window.
+ We use member variables to keep track of various widgets so that they can
+ be reconfigured when required.
+
+ \section1 Window Class Implementation
+
+ The constructor simply calls private functions to set up the different types
+ of spin box used in the example, and places each group in a layout:
+
+ \snippet examples/widgets/spinboxes/window.cpp 0
+
+ We use the layout to manage the arrangement of the window's child widgets,
+ and change the window title.
+
+ The \c createSpinBoxes() function constructs a QGroupBox and places three
+ QSpinBox widgets inside it with descriptive labels to indicate the types of
+ input they expect.
+
+ \snippet examples/widgets/spinboxes/window.cpp 1
+
+ The first spin box shows the simplest way to use QSpinBox. It accepts values
+ from -20 to 20, the current value can be increased or decreased by 1 with
+ either the arrow buttons or \key{Up} and \key{Down} keys, and the default
+ value is 0.
+
+ The second spin box uses a larger step size and displays a suffix to
+ provide more information about the type of data the number represents:
+
+ \snippet examples/widgets/spinboxes/window.cpp 2
+
+ This spin box also displays a
+ \l{QAbstractSpinBox::specialValueText}{special value} instead of the minimum
+ value defined for it. This means that it will never show \gui{0%}, but will
+ display \gui{Automatic} when the minimum value is selected.
+
+ The third spin box shows how a prefix can be used:
+
+ \snippet examples/widgets/spinboxes/window.cpp 4
+
+ For simplicity, we show a spin box with a prefix and no suffix. It is also
+ possible to use both at the same time.
+
+ \snippet examples/widgets/spinboxes/window.cpp 5
+
+ The rest of the function sets up a layout for the group box and places each
+ of the widgets inside it.
+
+ The \c createDateTimeEdits() function constructs another group box with a
+ selection of spin boxes used for editing dates and times.
+
+ \snippet examples/widgets/spinboxes/window.cpp 6
+
+ The first spin box is a QDateEdit widget that is able to accept dates
+ within a given range specified using QDate values. The arrow buttons and
+ \key{Up} and \key{Down} keys can be used to increase and decrease the
+ values for year, month, and day when the cursor is in the relevant section.
+
+ The second spin box is a QTimeEdit widget:
+
+ \snippet examples/widgets/spinboxes/window.cpp 7
+
+ Acceptable values for the time are defined using QTime values.
+
+ The third spin box is a QDateTimeEdit widget that can display both date and
+ time values, and we place a label above it to indicate the range of allowed
+ times for a meeting. These widgets will be updated when the user changes a
+ format string.
+
+ \snippet examples/widgets/spinboxes/window.cpp 8
+
+ The format string used for the date time editor, which is also shown in the
+ string displayed by the label, is chosen from a set of strings in a combobox:
+
+ \snippet examples/widgets/spinboxes/window.cpp 9
+ \codeline
+ \snippet examples/widgets/spinboxes/window.cpp 10
+
+ A signal from this combobox is connected to a slot in the \c Window class
+ (shown later).
+
+ \snippet examples/widgets/spinboxes/window.cpp 11
+
+ Each child widget of the group box in placed in a layout.
+
+ The \c setFormatString() slot is called whenever the user selects a new
+ format string in the combobox. The display format for the QDateTimeEdit
+ widget is set using the raw string passed by the signal:
+
+ \snippet examples/widgets/spinboxes/window.cpp 12
+
+ Depending on the visible sections in the widget, we set a new date or time
+ range, and update the associated label to provide relevant information for
+ the user:
+
+ \snippet examples/widgets/spinboxes/window.cpp 13
+
+ When the format string is changed, there will be an appropriate label and
+ entry widget for dates, times, or both types of input.
+
+ The \c createDoubleSpinBoxes() function constructs three spin boxes that are
+ used to input double-precision floating point numbers:
+
+ \snippet examples/widgets/spinboxes/window.cpp 14
+
+ Before the QDoubleSpinBox widgets are constructed, we create a spin box to
+ control how many decimal places they show. By default, only two decimal places
+ are shown in the following spin boxes, each of which is the equivalent of a
+ spin box in the group created by the \c createSpinBoxes() function.
+
+ The first double spin box shows a basic double-precision spin box with the
+ same range, step size, and default value as the first spin box in the
+ \c createSpinBoxes() function:
+
+ \snippet examples/widgets/spinboxes/window.cpp 15
+
+ However, this spin box also allows non-integer values to be entered.
+
+ The second spin box displays a suffix and shows a special value instead
+ of the minimum value:
+
+ \snippet examples/widgets/spinboxes/window.cpp 16
+
+ The third spin box displays a prefix instead of a suffix:
+
+ \snippet examples/widgets/spinboxes/window.cpp 17
+
+ We connect the QSpinBox widget that specifies the precision to a slot in
+ the \c Window class.
+
+ \snippet examples/widgets/spinboxes/window.cpp 18
+
+ The rest of the function places each of the widgets into a layout for the
+ group box.
+
+ The \c changePrecision() slot is called when the user changes the value in
+ the precision spin box:
+
+ \snippet examples/widgets/spinboxes/window.cpp 19
+
+ This function simply uses the integer supplied by the signal to specify the
+ number of decimal places in each of the QDoubleSpinBox widgets. Each one
+ of these will be updated automatically when their
+ \l{QDoubleSpinBox::decimals}{decimals} property is changed.
+*/
diff --git a/doc/src/examples/sqlwidgetmapper.qdoc b/doc/src/examples/sqlwidgetmapper.qdoc
new file mode 100644
index 0000000..173aea4
--- /dev/null
+++ b/doc/src/examples/sqlwidgetmapper.qdoc
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/sqlwidgetmapper
+ \title SQL Widget Mapper Example
+
+ The SQL Widget Mapper example shows how to use a map information from a
+ database to widgets on a form.
+
+ \image sql-widget-mapper.png
+
+ In the \l{Combo Widget Mapper Example}, we showed how to use a named
+ mapping between a widget mapper and a QComboBox widget with a special
+ purpose model to relate values in the model to a list of choices.
+
+ Again, we create a \c Window class with an almost identical user interface,
+ providing a combo box to allow their addresses to be classified as "Home",
+ "Work" or "Other". However, instead of using a separate model to hold these
+ address types, we use one database table to hold the example data and
+ another to hold the address types. In this way, we store all the
+ information in the same place.
+
+ \section1 Window Class Definition
+
+ The class provides a constructor, a slot to keep the buttons up to date,
+ and a private function to set up the model:
+
+ \snippet examples/sql/sqlwidgetmapper/window.h Window definition
+
+ In addition to the QDataWidgetMapper object and the controls used to make
+ up the user interface, we use a QStandardItemModel to hold our data and
+ a QStringListModel to hold information about the types of address that
+ can be applied to each person's data.
+
+ \section1 Window Class Implementation
+
+ The first act performed by the \c Window class constructor is to set up
+ the model used to hold the example data. Since this is a key part of the
+ example, we will look at this first.
+
+ The model is initialized in the window's \c{setupModel()} function. Here,
+ we create a SQLite database containing a "person" table with primary key,
+ name, address and type fields.
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Set up the main table
+
+ On each row of the table, we insert default values for these fields,
+ including values for the address types that correspond to the address
+ types are stored in a separate table.
+
+ \image widgetmapper-sql-mapping-table.png
+
+ We create an "addresstype" table containing the identifiers used in the
+ "person" table and the corresponding strings:
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Set up the address type table
+
+ The "typeid" field in the "person" table is related to the contents of
+ the "addresstype" table via a relation in a QSqlRelationalTableModel.
+ This kind of model performs all the necessary work to store the data in
+ a database and also allows any relations to be used as models in their
+ own right.
+
+ In this case, we have defined a relation for the "typeid" field in the
+ "person" table that relates it to the "id" field in the "addresstype"
+ table and which causes the contents of the "description" field to be
+ used wherever the "typeid" is presented to the user. (See the
+ QSqlRelationalTableModel::setRelation() documentation for details.)
+
+ \image widgetmapper-sql-mapping.png
+
+ The constructor of the \c Window class can be explained in three parts.
+ In the first part, we set up the model used to hold the data, then we set
+ up the widgets used for the user interface:
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Set up widgets
+
+ We obtain a model for the combo box from the main model, based on the
+ relation we set up for the "typeid" field. The call to the combo box's
+ \l{QComboBox::}{setModelColumn()} selects the field in the field in the
+ model to display.
+
+ Note that this approach is similar to the one used in the
+ \l{Combo Widget Mapper Example} in that we set up a model for the
+ combo box. However, in this case, we obtain a model based on a relation
+ in the QSqlRelationalTableModel rather than create a separate one.
+
+ Next, we set up the widget mapper, relating each input widget to a field
+ in the model:
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Set up the mapper
+
+ For the combo box, we already know the index of the field in the model
+ from the \c{setupModel()} function. We use a QSqlRelationalDelegate as
+ a proxy between the mapper and the input widgets to match up the "typeid"
+ values in the model with those in the combo box's model and populate the
+ combo box with descriptions rather than integer values.
+
+ As a result, the user is able to select an item from the combo box,
+ and the associated value is written back to the model.
+
+ The rest of the constructor is very similar to that of the
+ \l{Simple Widget Mapper Example}:
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Set up connections and layouts
+
+ We show the implementation of the \c{updateButtons()} slot for
+ completeness:
+
+ \snippet examples/sql/sqlwidgetmapper/window.cpp Slot for updating the buttons
+
+ \omit
+ \section1 Delegate Class Definition and Implementation
+
+ The delegate we use to mediate interaction between the widget mapper and
+ the input widgets is a small QItemDelegate subclass:
+
+ \snippet examples/sql/sqlwidgetmapper/delegate.h Delegate class definition
+
+ This provides implementations of the two standard functions used to pass
+ data between editor widgets and the model (see the \l{Delegate Classes}
+ documentation for a more general description of these functions).
+
+ Since we only provide an empty implementation of the constructor, we
+ concentrate on the other two functions.
+
+ The \l{QItemDelegate::}{setEditorData()} implementation takes the data
+ referred to by the model index supplied and processes it according to
+ the presence of a \c currentIndex property in the editor widget:
+
+ \snippet examples/sql/sqlwidgetmapper/delegate.cpp setEditorData implementation
+
+ If, like QComboBox, the editor widget has this property, it is set using
+ the value from the model. Since we are passing around QVariant values,
+ the strings stored in the model are automatically converted to the integer
+ values needed for the \c currentIndex property.
+
+ As a result, instead of showing "0", "1" or "2" in the combo box, one of
+ its predefined set of items is shown. We call QItemDelegate::setEditorData()
+ for widgets without the \c currentIndex property.
+
+ The \l{QItemDelegate::}{setModelData()} implementation performs the reverse
+ process, taking the value stored in the widget's \c currentIndex property
+ and storing it back in the model:
+
+ \snippet examples/sql/sqlwidgetmapper/delegate.cpp setModelData implementation
+ \endomit
+
+ \section1 Summary and Further Reading
+
+ The use of a separate model for the combo box and a special delegate for the
+ widget mapper allows us to present a menu of choices to the user. Although
+ the choices are stored in the same database as the user's data, they are held
+ in a separate table. Using this approach, we can reconstructed complete records
+ at a later time while using database features appropriately.
+
+ If SQL models are not being used, it is still possible to use more than
+ one model to present choices to the user. This is covered by the
+ \l{Combo Widget Mapper Example}.
+*/
diff --git a/doc/src/examples/standarddialogs.qdoc b/doc/src/examples/standarddialogs.qdoc
new file mode 100644
index 0000000..db533ed
--- /dev/null
+++ b/doc/src/examples/standarddialogs.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/standarddialogs
+ \title Standard Dialogs Example
+
+ The Standard Dialogs example shows the standard dialogs that are provided by Qt.
+
+ \image standarddialogs-example.png
+*/
diff --git a/doc/src/examples/stardelegate.qdoc b/doc/src/examples/stardelegate.qdoc
new file mode 100644
index 0000000..fde3316
--- /dev/null
+++ b/doc/src/examples/stardelegate.qdoc
@@ -0,0 +1,310 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example itemviews/stardelegate
+ \title Star Delegate Example
+
+ The Star Delegate example shows how to create a delegate that
+ can paint itself and that supports editing.
+
+ \image stardelegate.png The Star Delegate Example
+
+ When displaying data in a QListView, QTableView, or QTreeView,
+ the individual items are drawn by a
+ \l{Delegate Classes}{delegate}. Also, when the user starts
+ editing an item (e.g., by double-clicking the item), the delegate
+ provides an editor widget that is placed on top of the item while
+ editing takes place.
+
+ Delegates are subclasses of QAbstractItemDelegate. Qt provides
+ QItemDelegate, which inherits QAbstractItemDelegate and handles
+ the most common data types (notably \c int and QString). If we
+ need to support custom data types, or want to customize the
+ rendering or the editing for existing data types, we can subclass
+ QAbstractItemDelegate or QItemDelegate. See \l{Delegate Classes}
+ for more information about delegates, and \l{Model/View
+ Programming} if you need a high-level introduction to Qt's
+ model/view architecture (including delegates).
+
+ In this example, we will see how to implement a custom delegate
+ to render and edit a "star rating" data type, which can store
+ values such as "1 out of 5 stars".
+
+ The example consists of the following classes:
+
+ \list
+ \o \c StarRating is the custom data type. It stores a rating
+ expressed as stars, such as "2 out of 5 stars" or "5 out of
+ 6 stars".
+
+ \o \c StarDelegate inherits QItemDelegate and provides support
+ for \c StarRating (in addition to the data types already
+ handled by QItemDelegate).
+
+ \o \c StarEditor inherits QWidget and is used by \c StarDelegate
+ to let the user edit a star rating using the mouse.
+ \endlist
+
+ To show the \c StarDelegate in action, we will fill a
+ QTableWidget with some data and install the delegate on it.
+
+ \section1 StarDelegate Class Definition
+
+ Here's the definition of the \c StarDelegate class:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.h 0
+
+ All public functions are reimplemented virtual functions from
+ QItemDelegate to provide custom rendering and editing.
+
+ \section1 StarDelegate Class Implementation
+
+ The \l{QAbstractItemDelegate::}{paint()} function is
+ reimplemented from QItemDelegate and is called whenever the view
+ needs to repaint an item:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 0
+
+ The function is invoked once for each item, represented by a
+ QModelIndex object from the model. If the data stored in the item
+ is a \c StarRating, we paint it ourselves; otherwise, we let
+ QItemDelegate paint it for us. This ensures that the \c
+ StarDelegate can handle the most common data types.
+
+ In the case where the item is a \c StarRating, we draw the
+ background if the item is selected, and we draw the item using \c
+ StarRating::paint(), which we will review later.
+
+ \c{StartRating}s can be stored in a QVariant thanks to the
+ Q_DECLARE_METATYPE() macro appearing in \c starrating.h. More on
+ this later.
+
+ The \l{QAbstractItemDelegate::}{createEditor()} function is
+ called when the user starts editing an item:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 2
+
+ If the item is a \c StarRating, we create a \c StarEditor and
+ connect its \c editingFinished() signal to our \c
+ commitAndCloseEditor() slot, so we can update the model when the
+ editor closes.
+
+ Here's the implementation of \c commitAndCloseEditor():
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 5
+
+ When the user is done editing, we emit
+ \l{QAbstractItemDelegate::}{commitData()} and
+ \l{QAbstractItemDelegate::}{closeEditor()} (both declared in
+ QAbstractItemDelegate), to tell the model that there is edited
+ data and to inform the view that the editor is no longer needed.
+
+ The \l{QAbstractItemDelegate::}{setEditorData()} function is
+ called when an editor is created to initialize it with data
+ from the model:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 3
+
+ We simply call \c setStarRating() on the editor.
+
+ The \l{QAbstractItemDelegate::}{setModelData()} function is
+ called when editing is finished, to commit data from the editor
+ to the model:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 4
+
+ The \c sizeHint() function returns an item's preferred size:
+
+ \snippet examples/itemviews/stardelegate/stardelegate.cpp 1
+
+ We simply forward the call to \c StarRating.
+
+ \section1 StarEditor Class Definition
+
+ The \c StarEditor class was used when implementing \c
+ StarDelegate. Here's the class definition:
+
+ \snippet examples/itemviews/stardelegate/stareditor.h 0
+
+ The class lets the user edit a \c StarRating by moving the mouse
+ over the editor. It emits the \c editingFinished() signal when
+ the user clicks on the editor.
+
+ The protected functions are reimplemented from QWidget to handle
+ mouse and paint events. The private function \c starAtPosition()
+ is a helper function that returns the number of the star under
+ the mouse pointer.
+
+ \section1 StarEditor Class Implementation
+
+ Let's start with the constructor:
+
+ \snippet examples/itemviews/stardelegate/stareditor.cpp 0
+
+ We enable \l{QWidget::setMouseTracking()}{mouse tracking} on the
+ widget so we can follow the cursor even when the user doesn't
+ hold down any mouse button. We also turn on QWidget's
+ \l{QWidget::autoFillBackground}{auto-fill background} feature to
+ obtain an opaque background. (Without the call, the view's
+ background would shine through the editor.)
+
+ The \l{QWidget::}{paintEvent()} function is reimplemented from
+ QWidget:
+
+ \snippet examples/itemviews/stardelegate/stareditor.cpp 1
+
+ We simply call \c StarRating::paint() to draw the stars, just
+ like we did when implementing \c StarDelegate.
+
+ \snippet examples/itemviews/stardelegate/stareditor.cpp 2
+
+ In the mouse event handler, we call \c setStarCount() on the
+ private data member \c myStarRating to reflect the current cursor
+ position, and we call QWidget::update() to force a repaint.
+
+ \snippet examples/itemviews/stardelegate/stareditor.cpp 3
+
+ When the user releases a mouse button, we simply emit the \c
+ editingFinished() signal.
+
+ \snippet examples/itemviews/stardelegate/stareditor.cpp 4
+
+ The \c starAtPosition() function uses basic linear algebra to
+ find out which star is under the cursor.
+
+ \section1 StarRating Class Definition
+
+ \snippet examples/itemviews/stardelegate/starrating.h 0
+ \codeline
+ \snippet examples/itemviews/stardelegate/starrating.h 1
+
+ The \c StarRating class represents a rating as a number of stars.
+ In addition to holding the data, it is also capable of painting
+ the stars on a QPaintDevice, which in this example is either a
+ view or an editor. The \c myStarCount member variable stores the
+ current rating, and \c myMaxStarCount stores the highest possible
+ rating (typically 5).
+
+ The Q_DECLARE_METATYPE() macro makes the type \c StarRating known
+ to QVariant, making it possible to store \c StarRating values in
+ QVariant.
+
+ \section1 StarRating Class Implementation
+
+ The constructor initializes \c myStarCount and \c myMaxStarCount,
+ and sets up the polygons used to draw stars and diamonds:
+
+ \snippet examples/itemviews/stardelegate/starrating.cpp 0
+
+ The \c paint() function paints the stars in this \c StarRating
+ object on a paint device:
+
+ \snippet examples/itemviews/stardelegate/starrating.cpp 2
+
+ We first set the pen and brush we will use for painting. The \c
+ mode parameter can be either \c Editable or \c ReadOnly. If \c
+ mode is editable, we use the \l{QPalette::}{Highlight} color
+ instead of the \l{QPalette::}{Foreground} color to draw the
+ stars.
+
+ Then we draw the stars. If we are in \c Edit mode, we paint
+ diamonds in place of stars if the rating is less than the highest
+ rating.
+
+ The \c sizeHint() function returns the preferred size for an area
+ to paint the stars on:
+
+ \snippet examples/itemviews/stardelegate/starrating.cpp 1
+
+ The preferred size is just enough to paint the maximum number of
+ stars. The function is called by both \c StarDelegate::sizeHint()
+ and \c StarEditor::sizeHint().
+
+ \section1 The \c main() Function
+
+ Here's the program's \c main() function:
+
+ \snippet examples/itemviews/stardelegate/main.cpp 5
+
+ The \c main() function creates a QTableWidget and sets a \c
+ StarDelegate on it. \l{QAbstractItemView::}{DoubleClicked} and
+ \l{QAbstractItemView::}{SelectedClicked} are set as
+ \l{QAbstractItemView::editTriggers()}{edit triggers}, so that the
+ editor is opened with a single click when the star rating item is
+ selected.
+
+ The \c populateTableWidget() function fills the QTableWidget with
+ data:
+
+ \snippet examples/itemviews/stardelegate/main.cpp 0
+ \snippet examples/itemviews/stardelegate/main.cpp 1
+ \dots
+ \snippet examples/itemviews/stardelegate/main.cpp 2
+ \snippet examples/itemviews/stardelegate/main.cpp 3
+ \codeline
+ \snippet examples/itemviews/stardelegate/main.cpp 4
+
+ Notice the call to qVariantFromValue to convert a \c
+ StarRating to a QVariant.
+
+ \section1 Possible Extensions and Suggestions
+
+ There are many ways to customize Qt's \l{Model/View
+ Programming}{model/view framework}. The approach used in this
+ example is appropriate for most custom delegates and editors.
+ Examples of possibilities not used by the star delegate and star
+ editor are:
+
+ \list
+ \o It is possible to open editors programmatically by calling
+ QAbstractItemView::edit(), instead of relying on edit
+ triggers. This could be use to support other edit triggers
+ than those offered by the QAbstractItemView::EditTrigger enum.
+ For example, in the Star Delegate example, hovering over an
+ item with the mouse might make sense as a way to pop up an
+ editor.
+
+ \o By reimplementing QAbstractItemDelegate::editorEvent(), it is
+ possible to implement the editor directly in the delegate,
+ instead of creating a separate QWidget subclass.
+ \endlist
+*/
diff --git a/doc/src/examples/styleplugin.qdoc b/doc/src/examples/styleplugin.qdoc
new file mode 100644
index 0000000..0dea7bf
--- /dev/null
+++ b/doc/src/examples/styleplugin.qdoc
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/styleplugin
+ \title Style Plugin Example
+
+ This example shows how to create a plugin that extends Qt with a new
+ GUI look and feel.
+
+ \image stylepluginexample.png
+
+ On some platforms, the native style will prevent the button
+ from having a red background. In this case, try to run the example
+ in another style (e.g., plastique).
+
+ A plugin in Qt is a class stored in a shared library that can be
+ loaded by a QPluginLoader at run-time. When you create plugins in
+ Qt, they either extend a Qt application or Qt itself. Writing a
+ plugin that extends Qt itself is achieved by inheriting one of the
+ plugin \l{Plugin Classes}{base classes}, reimplementing functions
+ from that class, and adding a macro. In this example we extend Qt
+ by adding a new GUI look and feel (i.e., making a new QStyle
+ available). A high-level introduction to plugins is given in the
+ plugin \l{How to Create Qt Plugins}{overview document}.
+
+ Plugins that provide new styles inherit the QStylePlugin base
+ class. Style plugins are loaded by Qt and made available through
+ QStyleFactory; we will look at this later. We have implemented \c
+ SimpleStylePlugin, which provides \c SimpleStyle. The new style
+ inherits QWindowsStyle and contributes to widget styling by
+ drawing button backgrounds in red - not a major contribution, but
+ it still makes a new style. We test the plugin with \c
+ StyleWindow, in which we display a QPushButton.
+
+ The \c SimpleStyle and \c StyleWindow classes do not contain any
+ plugin specific functionality and their implementations are
+ trivial; we will therefore leap past them and head on to the \c
+ SimpleStylePlugin and the \c main() function. After we have looked
+ at that, we examine the plugin's profile.
+
+
+ \section1 SimpleStylePlugin Class Definition
+
+ \c SimpleStylePlugin inherits QStylePlugin and is the plugin
+ class.
+
+ \snippet examples/tools/styleplugin/plugin/simplestyleplugin.h 0
+
+ \c keys() returns a list of style names that this plugin can
+ create, while \c create() takes such a string and returns the
+ QStyle corresponding to the key. Both functions are pure virtual
+ functions reimplemented from QStylePlugin. When an application
+ requests an instance of the \c SimpleStyle style, which this
+ plugin creates, Qt will create it with this plugin.
+
+
+ \section1 SimpleStylePlugin Class Implementation
+
+ Here is the implementation of \c keys():
+
+ \snippet examples/tools/styleplugin/plugin/simplestyleplugin.cpp 0
+
+ Since this plugin only supports one style, we return a QStringList
+ with the class name of that style.
+
+ Here is the \c create() function:
+
+ \snippet examples/tools/styleplugin/plugin/simplestyleplugin.cpp 1
+
+ Note that the key for style plugins are case insensitive.
+ The case sensitivity varies from plugin to plugin, so you need to
+ check this when implementing new plugins.
+
+ \section1 The \c main() function
+
+ \snippet examples/tools/styleplugin/stylewindow/main.cpp 0
+
+ Qt loads the available style plugins when the QApplication object
+ is initialized. The QStyleFactory class knows about all styles and
+ produces them with \l{QStyleFactory::}{create()} (it is a
+ wrapper around all the style plugins).
+
+ \section1 The Simple Style Plugin Profile
+
+ The \c SimpleStylePlugin lives in its own directory and have
+ its own profile:
+
+ \snippet examples/tools/styleplugin/plugin/plugin.pro 0
+
+ In the plugin profile we need to set the lib template as we are
+ building a shared library instead of an executable. We must also
+ set the config to plugin. We set the library to be stored in the
+ styles folder under stylewindow because this is a path in which Qt
+ will search for style plugins.
+
+ \section1 Related articles and examples
+
+ In addition to the plugin \l{How to Create Qt Plugins}{overview
+ document}, we have other examples and articles that concern
+ plugins.
+
+ In the \l{Echo Plugin Example}{echo plugin example} we show how to
+ implement plugins that extends Qt applications rather than Qt
+ itself, which is the case with the style plugin of this example.
+ The \l{Plug & Paint Example}{plug & paint} example shows how to
+ implement a static plugin as well as being a more involved example
+ on plugins that extend applications.
+*/
diff --git a/doc/src/examples/styles.qdoc b/doc/src/examples/styles.qdoc
new file mode 100644
index 0000000..b68a310
--- /dev/null
+++ b/doc/src/examples/styles.qdoc
@@ -0,0 +1,486 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/styles
+ \title Styles Example
+
+ The Styles example illustrates how to create custom widget
+ drawing styles using Qt, and demonstrates Qt's predefined styles.
+
+ \image styles-enabledwood.png Screenshot of the Styles example
+
+ A style in Qt is a subclass of QStyle or of one of its
+ subclasses. Styles perform drawing on behalf of widgets. Qt
+ provides a whole range of predefined styles, either built into
+ the \l QtGui library or found in plugins. Custom styles are
+ usually created by subclassing one of Qt's existing style and
+ reimplementing a few virtual functions.
+
+ In this example, the custom style is called \c NorwegianWoodStyle
+ and derives from QMotifStyle. Its main features are the wooden
+ textures used for filling most of the widgets and its round
+ buttons and comboboxes.
+
+ To implement the style, we use some advanced features provided by
+ QPainter, such as \l{QPainter::Antialiasing}{antialiasing} (to
+ obtain smoother button edges), \l{QColor::alpha()}{alpha blending}
+ (to make the buttons appeared raised or sunken), and
+ \l{QPainterPath}{painter paths} (to fill the buttons and draw the
+ outline). We also use many features of QBrush and QPalette.
+
+ The example consists of the following classes:
+
+ \list
+ \o \c NorwegianWoodStyle inherits from QMotifStyle and implements
+ the Norwegian Wood style.
+ \o \c WidgetGallery is a \c QDialog subclass that shows the most
+ common widgets and allows the user to switch style
+ dynamically.
+ \endlist
+
+ \section1 NorwegianWoodStyle Class Definition
+
+ Here's the definition of the \c NorwegianWoodStyle class:
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.h 0
+
+ The public functions are all declared in QStyle (QMotifStyle's
+ grandparent class) and reimplemented here to override the Motif
+ look and feel. The private functions are helper functions.
+
+ \section1 NorwegianWoodStyle Class Implementation
+
+ We will now review the implementation of the \c
+ NorwegianWoodStyle class.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 0
+
+ The \c polish() function is reimplemented from QStyle. It takes a
+ QPalette as a reference and adapts the palette to fit the style.
+ Most styles don't need to reimplement that function. The
+ Norwegian Wood style reimplements it to set a "wooden" palette.
+
+ We start by defining a few \l{QColor}s that we'll need. Then we
+ load two PNG images. The \c : prefix in the file path indicates
+ that the PNG files are \l{The Qt Resource System}{embedded
+ resources}.
+
+ \table
+ \row \o \inlineimage widgets/styles/images/woodbackground.png
+
+ \o \bold{woodbackground.png}
+
+ This texture is used as the background of most widgets.
+ The wood pattern is horizontal.
+
+ \row \o \inlineimage widgets/styles/images/woodbutton.png
+
+ \o \bold{woodbutton.png}
+
+ This texture is used for filling push buttons and
+ comboboxes. The wood pattern is vertical and more reddish
+ than the texture used for the background.
+ \endtable
+
+ The \c midImage variable is initialized to be the same as \c
+ buttonImage, but then we use a QPainter and fill it with a 25%
+ opaque black color (a black with an \l{QColor::alpha()}{alpha
+ channel} of 63). The result is a somewhat darker image than \c
+ buttonImage. This image will be used for filling buttons that the
+ user is holding down.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 1
+
+ We initialize the palette. Palettes have various
+ \l{QPalette::ColorRole}{color roles}, such as QPalette::Base
+ (used for filling text editors, item views, etc.), QPalette::Text
+ (used for foreground text), and QPalette::Background (used for
+ the background of most widgets). Each role has its own QBrush,
+ which usually is a plain color but can also be a brush pattern or
+ even a texture (a QPixmap).
+
+ In addition to the roles, palettes have several
+ \l{QPalette::ColorGroup}{color groups}: active, disabled, and
+ inactive. The active color group is used for painting widgets in
+ the active window. The disabled group is used for disabled
+ widgets. The inactive group is used for all other widgets. Most
+ palettes have identical active and inactive groups, while the
+ disabled group uses darker shades.
+
+ We initialize the QPalette object with a brown color. Qt
+ automatically derivates all color roles for all color groups from
+ that single color. We then override some of the default values. For
+ example, we use Qt::darkGreen instead of the default
+ (Qt::darkBlue) for the QPalette::Highlight role. The
+ QPalette::setBrush() overload that we use here sets the same
+ color or brush for all three color groups.
+
+ The \c setTexture() function is a private function that sets the
+ texture for a certain color role, while preserving the existing
+ color in the QBrush. A QBrush can hold both a solid color and a
+ texture at the same time. The solid color is used for drawing
+ text and other graphical elements where textures don't look good.
+
+ At the end, we set the brush for the disabled color group of the
+ palette. We use \c woodbackground.png as the texture for all
+ disabled widgets, including buttons, and use a darker color to
+ accompany the texture.
+
+ \image styles-disabledwood.png The Norwegian Wood style with disabled widgets
+
+ Let's move on to the other functions reimplemented from
+ QMotifStyle:
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 3
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 4
+
+ This QStyle::polish() overload is called once on every widget
+ drawn using the style. We reimplement it to set the Qt::WA_Hover
+ attribute on \l{QPushButton}s and \l{QComboBox}es. When this
+ attribute is set, Qt generates paint events when the mouse
+ pointer enters or leaves the widget. This makes it possible to
+ render push buttons and comboboxes differently when the mouse
+ pointer is over them.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 5
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 6
+
+ This QStyle::unpolish() overload is called to undo any
+ modification done to the widget in \c polish(). For simplicity,
+ we assume that the flag wasn't set before \c polish() was called.
+ In an ideal world, we would remember the original state for each
+ widgets (e.g., using a QMap<QWidget *, bool>) and restore it in
+ \c unpolish().
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 7
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 8
+
+ The \l{QStyle::pixelMetric()}{pixelMetric()} function returns the
+ size in pixels for a certain user interface element. By
+ reimplementing this function, we can affect the way certain
+ widgets are drawn and their size hint. Here, we return 8 as the
+ width around a shown in a QComboBox, ensuring that there is
+ enough place around the text and the arrow for the Norwegian Wood
+ round corners. The default value for this setting in the Motif
+ style is 2.
+
+ We also change the extent of \l{QScrollBar}s, i.e., the height
+ for a horizontal scroll bar and the width for a vertical scroll
+ bar, to be 4 pixels more than in the Motif style. This makes the
+ style a bit more distinctive.
+
+ For all other QStyle::PixelMetric elements, we use the Motif
+ settings.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 9
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 10
+
+ The \l{QStyle::styleHint()}{styleHint()} function returns some
+ hints to widgets or to the base style (in our case QMotifStyle)
+ about how to draw the widgets. The Motif style returns \c true
+ for the QStyle::SH_DitherDisabledText hint, resulting in a most
+ unpleasing visual effect. We override this behavior and return \c
+ false instead. We also return \c true for the
+ QStyle::SH_EtchDisabledText hint, meaning that disabled text is
+ rendered with an embossed look (as QWindowsStyle does).
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 11
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 12
+
+ The \l{QStyle::drawPrimitive()}{drawPrimitive()} function is
+ called by Qt widgets to draw various fundamental graphical
+ elements. Here we reimplement it to draw QPushButton and
+ QComboBox with round corners. The button part of these widgets is
+ drawn using the QStyle::PE_PanelButtonCommand primitive element.
+
+ The \c option parameter, of type QStyleOption, contains
+ everything we need to know about the widget we want to draw on.
+ In particular, \c option->rect gives the rectangle within which
+ to draw the primitive element. The \c painter parameter is a
+ QPainter object that we can use to draw on the widget.
+
+ The \c widget parameter is the widget itself. Normally, all the
+ information we need is available in \c option and \c painter, so
+ we don't need \c widget. We can use it to perform special
+ effects; for example, QMacStyle uses it to animate default
+ buttons. If you use it, be aware that the caller is allowed to
+ pass a null pointer.
+
+ We start by defining three \l{QColor}s that we'll need later on.
+ We also put the x, y, width, and height components of the
+ widget's rectangle in local variables. The value used for the \c
+ semiTransparentWhite and for the \c semiTransparentBlack color's
+ alpha channel depends on whether the mouse cursor is over the
+ widget or not. Since we set the Qt::WA_Hover attribute on
+ \l{QPushButton}s and \l{QComboBox}es, we can rely on the
+ QStyle::State_MouseOver flag to be set when the mouse is over the
+ widget.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 13
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 14
+
+ The \c roundRect variable is a QPainterPath. A QPainterPath is is
+ a vectorial specification of a shape. Any shape (rectangle,
+ ellipse, spline, etc.) or combination of shapes can be expressed
+ as a path. We will use \c roundRect both for filling the button
+ background with a wooden texture and for drawing the outline. The
+ \c roundRectPath() function is a private function; we will come
+ back to it later.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 15
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 16
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 17
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 18
+
+ We define two variables, \c brush and \c darker, and initialize
+ them based on the state of the button:
+
+ \list
+ \o If the button is a \l{QPushButton::flat}{flat button}, we use
+ the \l{QPalette::Background}{Background} brush. We set \c
+ darker to \c true if the button is
+ \l{QAbstractButton::down}{down} or
+ \l{QAbstractButton::checked}{checked}.
+ \o If the button is currently held down by the user or in the
+ \l{QAbstractButton::checked}{checked} state, we use the
+ \l{QPalette::Mid}{Mid} component of the palette. We set
+ \c darker to \c true if the button is
+ \l{QAbstractButton::checked}{checked}.
+ \o Otherwise, we use the \l{QPalette::Button}{Button} component
+ of the palette.
+ \endlist
+
+ The screenshot below illustrates how \l{QPushButton}s are
+ rendered based on their state:
+
+ \image styles-woodbuttons.png Norwegian Wood buttons in different states
+
+ To discover whether the button is flat or not, we need to cast
+ the \c option parameter to QStyleOptionButton and check if the
+ \l{QStyleOptionButton::features}{features} member specifies the
+ QStyleOptionButton::Flat flag. The qstyleoption_cast() function
+ performs a dynamic cast; if \c option is not a
+ QStyleOptionButton, qstyleoption_cast() returns a null pointer.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 19
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 20
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 21
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 22
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 23
+
+ We turn on antialiasing on QPainter. Antialiasing is a technique
+ that reduces the visual distortion that occurs when the edges of
+ a shape are converted into pixels. For the Norwegian Wood style,
+ we use it to obtain smoother edges for the round buttons.
+
+ \image styles-aliasing.png Norwegian wood buttons with and without antialiasing
+
+ The first call to QPainter::fillPath() draws the background of
+ the button with a wooden texture. The second call to
+ \l{QPainter::fillPath()}{fillPath()} paints the same area with a
+ semi-transparent black color (a black color with an alpha channel
+ of 63) to make the area darker if \c darker is true.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 24
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 25
+
+ Next, we draw the outline. The top-left half of the outline and
+ the bottom-right half of the outline are drawn using different
+ \l{QPen}s to produce a 3D effect. Normally, the top-left half of
+ the outline is drawn lighter whereas the bottom-right half is
+ drawn darker, but if the button is
+ \l{QAbstractButton::down}{down} or
+ \l{QAbstractButton::checked}{checked}, we invert the two
+ \l{QPen}s to give a sunken look to the button.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 26
+
+ We draw the top-left part of the outline by calling
+ QPainter::drawPath() with an appropriate
+ \l{QPainter::setClipRegion()}{clip region}. If the
+ \l{QStyleOption::direction}{layout direction} is right-to-left
+ instead of left-to-right, we swap the \c x1, \c x2, \c x3, and \c
+ x4 variables to obtain correct results. On right-to-left desktop,
+ the "light" comes from the top-right corner of the screen instead
+ of the top-left corner; raised and sunken widgets must be drawn
+ accordingly.
+
+ The diagram below illustrates how 3D effects are drawn according
+ to the layout direction. The area in red on the diagram
+ corresponds to the \c topHalf polygon:
+
+ \image styles-3d.png
+
+ An easy way to test how a style looks in right-to-left mode is to
+ pass the \c -reverse command-line option to the application. This
+ option is recognized by the QApplication constructor.
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 32
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 33
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 34
+
+ The bottom-right part of the outline is drawn in a similar
+ fashion. Then we draw a one-pixel wide outline around the entire
+ button, using the \l{QPalette::Foreground}{Foreground} component
+ of the QPalette.
+
+ This completes the QStyle::PE_PanelButtonCommand case of the \c
+ switch statement. Other primitive elements are handled by the
+ base style. Let's now turn to the other \c NorwegianWoodStyle
+ member functions:
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 35
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 36
+
+ We reimplement QStyle::drawControl() to draw the text on a
+ QPushButton in a bright color when the button is
+ \l{QAbstractButton::down}{down} or
+ \l{QAbstractButton::checked}{checked}.
+
+ If the \c option parameter points to a QStyleOptionButton object
+ (it normally should), we take a copy of the object and modify its
+ \l{QStyleOption::palette}{palette} member to make the
+ QPalette::ButtonText be the same as the QPalette::BrightText
+ component (unless the widget is disabled).
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 37
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 38
+
+ The \c setTexture() function is a private function that sets the
+ \l{QBrush::texture()}{texture} component of the \l{QBrush}es for
+ a certain \l{QPalette::ColorRole}{color role}, for all three
+ \l{QPalette::ColorGroup}{color groups} (active, disabled,
+ inactive). We used it to initialize the Norwegian Wood palette in
+ \c polish(QPalette &).
+
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 39
+ \snippet examples/widgets/styles/norwegianwoodstyle.cpp 40
+
+ The \c roundRectPath() function is a private function that
+ constructs a QPainterPath object for round buttons. The path
+ consists of eight segments: four arc segments for the corners and
+ four lines for the sides.
+
+ With around 250 lines of code, we have a fully functional custom
+ style based on one of the predefined styles. Custom styles can be
+ used to provide a distinct look to an application or family of
+ applications.
+
+ \section1 WidgetGallery Class
+
+ For completeness, we will quickly review the \c WidgetGallery
+ class, which contains the most common Qt widgets and allows the
+ user to change style dynamically. Here's the class definition:
+
+ \snippet examples/widgets/styles/widgetgallery.h 0
+ \dots
+ \snippet examples/widgets/styles/widgetgallery.h 1
+
+ Here's the \c WidgetGallery constructor:
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 0
+
+ We start by creating child widgets. The \gui Style combobox is
+ initialized with all the styles known to QStyleFactory, in
+ addition to \c NorwegianWood. The \c create...() functions are
+ private functions that set up the various parts of the \c
+ WidgetGallery.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 1
+ \snippet examples/widgets/styles/widgetgallery.cpp 2
+
+ We connect the \gui Style combobox to the \c changeStyle()
+ private slot, the \gui{Use style's standard palette} check box to
+ the \c changePalette() slot, and the \gui{Disable widgets} check
+ box to the child widgets'
+ \l{QWidget::setDisabled()}{setDisabled()} slot.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 3
+ \snippet examples/widgets/styles/widgetgallery.cpp 4
+
+ Finally, we put the child widgets in layouts.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 5
+ \snippet examples/widgets/styles/widgetgallery.cpp 6
+
+ When the user changes the style in the combobox, we call
+ QApplication::setStyle() to dynamically change the style of the
+ application.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 7
+ \snippet examples/widgets/styles/widgetgallery.cpp 8
+
+ If the user turns the \gui{Use style's standard palette} on, the
+ current style's \l{QStyle::standardPalette()}{standard palette}
+ is used; otherwise, the system's default palette is honored.
+
+ For the Norwegian Wood style, this makes no difference because we
+ always override the palette with our own palette in \c
+ NorwegianWoodStyle::polish().
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 9
+ \snippet examples/widgets/styles/widgetgallery.cpp 10
+
+ The \c advanceProgressBar() slot is called at regular intervals
+ to advance the progress bar. Since we don't know how long the
+ user will keep the Styles application running, we use a
+ logarithmic formula: The closer the progress bar gets to 100%,
+ the slower it advances.
+
+ We will review \c createProgressBar() in a moment.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 11
+ \snippet examples/widgets/styles/widgetgallery.cpp 12
+
+ The \c createTopLeftGroupBox() function creates the QGroupBox
+ that occupies the top-left corner of the \c WidgetGallery. We
+ skip the \c createTopRightGroupBox(), \c
+ createBottomLeftTabWidget(), and \c createBottomRightGroupBox()
+ functions, which are very similar.
+
+ \snippet examples/widgets/styles/widgetgallery.cpp 13
+
+ In \c createProgressBar(), we create a QProgressBar at the bottom
+ of the \c WidgetGallery and connect its
+ \l{QTimer::timeout()}{timeout()} signal to the \c
+ advanceProgressBar() slot.
+*/
diff --git a/doc/src/examples/stylesheet.qdoc b/doc/src/examples/stylesheet.qdoc
new file mode 100644
index 0000000..811d65c
--- /dev/null
+++ b/doc/src/examples/stylesheet.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/stylesheet
+ \title Style Sheet Example
+
+ The Style Sheet Example shows how to use style sheets.
+
+ \image stylesheet-pagefold.png Screen Shot of the Pagefold style sheet
+*/
+
diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc
new file mode 100644
index 0000000..c94d408
--- /dev/null
+++ b/doc/src/examples/svgalib.qdoc
@@ -0,0 +1,360 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qws/svgalib
+ \title Accelerated Graphics Driver Example
+
+ The Accelerated Graphics Driver example shows how you can write
+ your own accelerated graphics driver and \l {add your graphics
+ driver to Qt for Embedded Linux}. In \l{Qt for Embedded Linux},
+ painting is a pure software implementation and is normally performed
+ in two steps:
+ The clients render each window onto a corresponding surface
+ (stored in memory) using a paint engine, and then the server uses
+ the graphics driver to compose the surface images and copy them to
+ the screen. (See the \l{Qt for Embedded Linux Architecture} documentation
+ for details.)
+
+ The rendering can be accelerated in two ways: Either by
+ accelerating the copying of pixels to the screen, or by
+ accelerating the explicit painting operations. The first is done
+ in the graphics driver implementation, the latter is performed by
+ the paint engine implementation. Typically, both the pixel copying
+ and the painting operations are accelerated using the following
+ approach:
+
+ \list 1
+ \o \l {Step 1: Creating a Custom Graphics Driver}
+ {Creating a Custom Graphics Driver}
+
+ \o \l {Step 2: Implementing a Custom Raster Paint Engine}
+ {Implementing a Custom Paint Engine}
+
+ \o \l {Step 3: Making the Widgets Aware of the Custom Paint
+ Engine}{Making the Widgets Aware of the Custom Paint Engine}
+
+ \endlist
+
+ After compiling the example code, install the graphics driver
+ plugin with the command \c {make install}. To start an application
+ using the graphics driver, you can either set the environment
+ variable \l QWS_DISPLAY and then run the application, or you can
+ just run the application using the \c -display switch:
+
+ \snippet doc/src/snippets/code/doc_src_examples_svgalib.qdoc 0
+
+ \table
+ \header \o SVGAlib
+ \row \o
+
+ Instead of interfacing the graphics hardware directly, this
+ example relies on \l {http://www.svgalib.org}{SVGAlib} being
+ installed on your system. \l {http://www.svgalib.org}{SVGAlib} is
+ a small graphics library which provides acceleration for many
+ common graphics cards used on desktop computers. It should work on
+ most workstations and has a small and simple API.
+
+ \endtable
+
+ \section1 Step 1: Creating a Custom Graphics Driver
+
+ The custom graphics driver is created by deriving from the QScreen
+ class. QScreen is the base class for implementing screen/graphics
+ drivers in Qt for Embedded Linux.
+
+ \snippet examples/qws/svgalib/svgalibscreen.h 0
+ \codeline
+ \snippet examples/qws/svgalib/svgalibscreen.h 1
+
+ The \l {QScreen::}{connect()}, \l {QScreen::}{disconnect()}, \l
+ {QScreen::}{initDevice()} and \l {QScreen::}{shutdownDevice()}
+ functions are declared as pure virtual functions in QScreen and
+ must be implemented. They are used to configure the hardware, or
+ query its configuration: \l {QScreen::}{connect()} and \l
+ {QScreen::}{disconnect()} are called by both the server and client
+ processes, while the \l {QScreen::}{initDevice()} and \l
+ {QScreen::}{shutdownDevice()} functions are only called by the
+ server process.
+
+ QScreen's \l {QScreen::}{setMode()} and \l {QScreen::}{blank()}
+ functions are also pure virtual, but our driver's implementations
+ are trivial. The last two functions (\l {QScreen::}{blit()} and \l
+ {QScreen::}{solidFill()}) are the ones involved in putting pixels
+ on the screen, i.e., we reimplement these functions to perform the
+ pixel copying acceleration.
+
+ Finally, the \c context variable is a pointer to a \l
+ {http://www.svgalib.org}{SVGAlib} specific type. Note that the
+ details of using the \l {http://www.svgalib.org}{SVGAlib} library
+ is beyond the scope of this example.
+
+ \section2 SvgalibScreen Class Implementation
+
+ The \l {QScreen::}{connect()} function is the first function that
+ is called after the constructor returns. It queries \l
+ {http://www.svgalib.org}{SVGAlib} about the graphics mode and
+ initializes the variables.
+
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 0
+
+ It is important that the \l {QScreen::}{connect()} function
+ initializes the \c data, \c lstep, \c w, \c h, \c dw, \c dh, \c d,
+ \c physWidth and \c physHeight variables (inherited from QScreen)
+ to ensure that the driver is in a state consistent with the driver
+ configuration.
+
+ In this particular example we do not have any information of the
+ real physical size of the screen, so we set these values with the
+ assumption of a screen with 72 DPI.
+
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 1
+
+ When the \l {QScreen::}{connect()} function returns, the server
+ process calls the \l {QScreen::}{initDevice()} function which is
+ expected to do the necessary hardware initialization, leaving the
+ hardware in a state consistent with the driver configuration.
+
+ Note that we have chosen to use the software cursor. If you want
+ to use a hardware cursor, you should create a subclass of
+ QScreenCursor, create an instance of it, and make the global
+ variable \c qt_screencursor point to this instance.
+
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 2
+ \codeline
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 3
+
+ Before exiting, the server process will call the \l
+ {QScreen::}{shutdownDevice()} function to do the necessary
+ hardware cleanup. Again, it is important that the function leaves
+ the hardware in a state consistent with the driver
+ configuration. When \l {QScreen::}{shutdownDevice()} returns, the
+ \l {QScreen::}{disconnect()} function is called. Our
+ implementation of the latter function is trivial.
+
+ Note that, provided that the \c QScreen::data variable points to a
+ valid linear framebuffer, the graphics driver is fully functional
+ as a simple screen driver at this point. The rest of this example
+ will show where to take advantage of the accelerated capabilities
+ available on the hardware.
+
+ Whenever an area on the screen needs to be updated, the server will
+ call the \l {QScreen::}{exposeRegion()} function that paints the
+ given region on screen. The default implementation will do the
+ necessary composing of the top-level windows and call \l
+ {QScreen::}{solidFill()} and \l {QScreen::}{blit()} whenever it is
+ required. We do not want to change this behavior in the driver so
+ we do not reimplement \l {QScreen::}{exposeRegion()}.
+
+ To control how the pixels are put onto the screen we need to
+ reimplement the \l {QScreen::}{solidFill()} and \l
+ {QScreen::}{blit()} functions.
+
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 4
+ \codeline
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 5
+
+ \section1 Step 2: Implementing a Custom Raster Paint Engine
+
+ \l{Qt for Embedded Linux} uses QRasterPaintEngine (a raster-based
+ implementation of QPaintEngine) to implement the painting
+ operations.
+
+ Acceleration of the painting operations is done by deriving from
+ QRasterPaintEngine class. This is a powerful mechanism for
+ accelerating graphic primitives while getting software fallbacks
+ for all the primitives you do not accelerate.
+
+ \snippet examples/qws/svgalib/svgalibpaintengine.h 0
+
+ In this example, we will only accelerate one of the \l
+ {QRasterPaintEngine::}{drawRects()} functions, i.e., only
+ non-rotated, aliased and opaque rectangles will be rendered using
+ accelerated painting. All other primitives are rendered using the
+ base class's unaccelerated implementation.
+
+ The paint engine's state is stored in the private member
+ variables, and we reimplement the \l
+ {QPaintEngine::}{updateState()} function to ensure that our
+ custom paint engine's state is updated properly whenever it is
+ required. The private \c setClip() and \c updateClip() functions
+ are only helper function used to simplify the \l
+ {QPaintEngine::}{updateState()} implementation.
+
+ We also reimplement QRasterPaintEngine's \l
+ {QRasterPaintEngine::}{begin()} and \l
+ {QRasterPaintEngine::}{end()} functions to initialize the paint
+ engine and to do the cleanup when we are done rendering,
+ respectively.
+
+ \table
+ \header \o Private Header Files
+ \row
+ \o
+
+ Note the \c include statement used by this class. The files
+ prefixed with \c private/ are private headers file within
+ \l{Qt for Embedded Linux}. Private header files are not part of
+ the standard installation and are only present while
+ compiling Qt. To be able to compile using
+ private header files you need to use a \c qmake binary within a
+ compiled \l{Qt for Embedded Linux} package.
+
+ \warning Private header files may change without notice between
+ releases.
+
+ \endtable
+
+ The \l {QRasterPaintEngine::}{begin()} function initializes the
+ internal state of the paint engine. Note that it also calls the
+ base class implementation to initialize the parts inherited from
+ QRasterPaintEngine:
+
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 0
+ \codeline
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 1
+
+ The implementation of the \l {QRasterPaintEngine::}{end()}
+ function removes the clipping constraints that might have been set
+ in \l {http://www.svgalib.org}{SVGAlib}, before calling the
+ corresponding base class implementation.
+
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 2
+
+ The \l {QPaintEngine::}{updateState()} function updates our
+ custom paint engine's state. The QPaintEngineState class provides
+ information about the active paint engine's current state.
+
+ Note that we only accept and save the current matrix if it doesn't
+ do any shearing. The pen is accepted if it is opaque and only one
+ pixel wide. The rest of the engine's properties are updated
+ following the same pattern. Again it is important that the
+ QPaintEngine::updateState() function is called to update the
+ parts inherited from the base class.
+
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 3
+ \codeline
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 4
+
+ The \c setClip() helper function is called from our custom
+ implementation of \l {QPaintEngine::}{updateState()}, and
+ enables clipping to the given region. An empty region means that
+ clipping is disabled.
+
+ Our custom update function also makes use of the \c updateClip()
+ helper function that checks if the clip is "simple", i.e., that it
+ can be represented by only one rectangle, and updates the clip
+ region in \l {http://www.svgalib.org}{SVGAlib}.
+
+ \snippet examples/qws/svgalib/svgalibpaintengine.cpp 5
+
+ Finally, we accelerated that drawing of non-rotated, aliased and
+ opaque rectangles in our reimplementation of the \l
+ {QRasterPaintEngine::}{drawRects()} function. The
+ QRasterPaintEngine fallback is used whenever the rectangle is not
+ simple enough.
+
+ \section1 Step 3: Making the Widgets Aware of the Custom Paint Engine
+
+ To activate the custom paint engine, we also need to implement a
+ corresponding paint device and window surface and make some minor
+ adjustments of the graphics driver.
+
+ \list
+ \o \l {Implementing a Custom Paint Device}
+ \o \l {Implementing a Custom Window Surface}
+ \o \l {Adjusting the Graphics Driver}
+ \endlist
+
+ \section2 Implementing a Custom Paint Device
+
+ The custom paint device can be derived from the
+ QCustomRasterPaintDevice class. Reimplement its \l
+ {QCustomRasterPaintDevice::}{paintEngine()} and \l
+ {QCustomRasterPaintDevice::}{memory()} functions to activate the
+ accelerated paint engine:
+
+ \snippet examples/qws/svgalib/svgalibpaintdevice.h 0
+
+ The \l {QCustomRasterPaintDevice::}{paintEngine()} function should
+ return an instance of the \c SvgalibPaintEngine class. The \l
+ {QCustomRasterPaintDevice::}{memory()} function should return a
+ pointer to the buffer which should be used when drawing the
+ widget.
+
+ Our example driver is rendering directly to the screen without any
+ buffering, i.e., our custom pain device's \l
+ {QCustomRasterPaintDevice::}{memory()} function returns a pointer
+ to the framebuffer. For this reason, we must also reimplement the
+ \l {QPaintDevice::}{metric()} function to reflect the metrics of
+ framebuffer.
+
+ \section2 Implementing a Custom Window Surface
+
+ The custom window surface can be derived from the QWSWindowSurface
+ class. QWSWindowSurface manages the memory used when drawing a
+ window.
+
+ \snippet examples/qws/svgalib/svgalibsurface.h 0
+
+ We can implement most of the pure virtual functions inherited from
+ QWSWindowSurface as trivial inline functions, except the
+ \l {QWindowSurface::}{scroll()} function that actually makes use
+ of some hardware acceleration:
+
+ \snippet examples/qws/svgalib/svgalibsurface.cpp 0
+
+ \section2 Adjusting the Graphics Driver
+
+ Finally, we enable the graphics driver to recognize an instance of
+ our custom window surface:
+
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 7
+ \codeline
+ \snippet examples/qws/svgalib/svgalibscreen.cpp 8
+
+ The \l {QScreen::}{createSurface()} functions are factory
+ functions that determines what kind of surface a top-level window
+ is using. In our example we only use the custom surface if the
+ given window has the Qt::WA_PaintOnScreen attribute or the
+ QT_ONSCREEN_PAINT environment variable is set.
+*/
+
diff --git a/doc/src/examples/svgviewer.qdoc b/doc/src/examples/svgviewer.qdoc
new file mode 100644
index 0000000..affc85f
--- /dev/null
+++ b/doc/src/examples/svgviewer.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/svgviewer
+ \title SVG Viewer Example
+
+ The SVG Viewer example shows how to add SVG viewing support to applications.
+
+ \image svgviewer-example.png
+
+ Scalable Vector Graphics (SVG) is an XML-based language for describing two-dimensional
+ vector graphics. Qt provides classes for rendering and displaying SVG drawings in
+ widgets and on other paint devices. This example allows the user to load SVG files
+ and view them in a QGraphicsView using a QGraphicsSvgItem. Based on the selected
+ renderer the QGraphicsView uses either a QWidget or QGLWidget as its viewport. A
+ third render mode is also provided, where the QGraphicsView draws indirectly though
+ a QImage. This allows testing of drawing accuracy and performance for both the
+ native, raster, and OpenGL paint engines.
+
+ See the QtSvg module documentation for more information about SVG and Qt's SVG classes.
+*/
diff --git a/doc/src/examples/syntaxhighlighter.qdoc b/doc/src/examples/syntaxhighlighter.qdoc
new file mode 100644
index 0000000..7cc9e61
--- /dev/null
+++ b/doc/src/examples/syntaxhighlighter.qdoc
@@ -0,0 +1,256 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example richtext/syntaxhighlighter
+ \title Syntax Highlighter Example
+
+ The Syntax Highlighter example shows how to perform simple syntax
+ highlighting by subclassing the QSyntaxHighlighter class.
+
+ \image syntaxhighlighter-example.png
+
+ The Syntax Highlighter application displays C++ files with custom
+ syntax highlighting.
+
+ The example consists of two classes:
+
+ \list
+ \o The \c Highlighter class defines and applies the
+ highlighting rules.
+ \o The \c MainWindow widget is the application's main window.
+ \endlist
+
+ We will first review the \c Highlighter class to see how you can
+ customize the QSyntaxHighlighter class to fit your preferences,
+ then we will take a look at the relevant parts of the \c
+ MainWindow class to see how you can use your custom highlighter
+ class in an application.
+
+ \section1 Highlighter Class Definition
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.h 0
+
+ To provide your own syntax highlighting, you must subclass
+ QSyntaxHighlighter, reimplement the \l
+ {QSyntaxHighlighter::highlightBlock()}{highlightBlock()} function,
+ and define your own highlighting rules.
+
+ We have chosen to store our highlighting rules using a private
+ struct: A rule consists of a QRegExp pattern and a QTextCharFormat
+ instance. The various rules are then stored using a QVector.
+
+ The QTextCharFormat class provides formatting information for
+ characters in a QTextDocument specifying the visual properties of
+ the text, as well as information about its role in a hypertext
+ document. In this example, we will only define the font weight and
+ color using the QTextCharFormat::setFontWeight() and
+ QTextCharFormat::setForeground() functions.
+
+ \section1 Highlighter Class Implementation
+
+ When subclassing the QSyntaxHighlighter class you must pass the
+ parent parameter to the base class constructor. The parent is the
+ text document upon which the syntax highligning will be
+ applied. In this example, we have also chosen to define our
+ highlighting rules in the constructor:
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 0
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 1
+
+ First we define a keyword rule which recognizes the most common
+ C++ keywords. We give the \c keywordFormat a bold, dark blue
+ font. For each keyword, we assign the keyword and the specified
+ format to a HighlightingRule object and append the object to our
+ list of rules.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 2
+ \codeline
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 4
+ \codeline
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 5
+
+ Then we create a format that we will apply to Qt class names. The
+ class names will be rendered with a dark magenta color and a bold
+ style. We specify a string pattern that is actually a regular
+ expression capturing all Qt class names. Then we assign the
+ regular expression and the specified format to a HighlightingRule
+ object and append the object to our list of rules.
+
+ We also define highlighting rules for quotations and functions
+ using the same approach: The patterns have the form of regular
+ expressions and are stored in HighlightingRule objects with the
+ associated format.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 3
+ \codeline
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 6
+
+ The C++ language has two variations of comments: The single line
+ comment (\c //) and the multiline comment (\c{/*...}\starslash). The single
+ line comment can easily be defined through a highlighting rule
+ similar to the previous ones. But the multiline comment needs
+ special care due to the design of the QSyntaxHighlighter class.
+
+ After a QSyntaxHighlighter object is created, its \l
+ {QSyntaxHighlighter::highlightBlock()}{highlightBlock()} function
+ will be called automatically whenever it is necessary by the rich
+ text engine, highlighting the given text block. The problem
+ appears when a comment spans several text blocks. We will take a
+ closer look at how this problem can be solved when reviewing the
+ implementation of the \c Highlighter::highlightBlock()
+ function. At this point we only specify the multiline comment's
+ color.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 7
+
+ The highlightBlock() function is called automatically whenever it
+ is necessary by the rich text engine, i.e. when there are text
+ blocks that have changed.
+
+ First we apply the syntax highlighting rules that we stored in the
+ \c highlightingRules vector. For each rule (i.e. for each
+ HighlightingRule object) we search for the pattern in the given
+ textblock using the QString::indexOf() function. When the first
+ occurrence of the pattern is found, we use the
+ QRegExp::matchedLength() function to determine the string that
+ will be formatted. QRegExp::matchedLength() returns the length of
+ the last matched string, or -1 if there was no match.
+
+ To perform the actual formatting the QSyntaxHighlighter class
+ provides the \l {QSyntaxHighlighter::setFormat()}{setFormat()}
+ function. This function operates on the text block that is passed
+ as argument to the \c highlightBlock() function. The specified
+ format is applied to the text from the given start position for
+ the given length. The formatting properties set in the given
+ format are merged at display time with the formatting information
+ stored directly in the document. Note that the document itself
+ remains unmodified by the format set through this function.
+
+ This process is repeated until the last occurrence of the pattern
+ in the current text block is found.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 8
+
+ To deal with constructs that can span several text blocks (like
+ the C++ multiline comment), it is necessary to know the end state
+ of the previous text block (e.g. "in comment"). Inside your \c
+ highlightBlock() implementation you can query the end state of the
+ previous text block using the
+ QSyntaxHighlighter::previousBlockState() function. After parsing
+ the block you can save the last state using
+ QSyntaxHighlighter::setCurrentBlockState().
+
+ The \l
+ {QSyntaxHighlighter::previousBlockState()}{previousBlockState()}
+ function return an int value. If no state is set, the returned
+ value is -1. You can designate any other value to identify any
+ given state using the \l
+ {QSyntaxHighlighter::setCurrentBlockState()}{setCurrentBlockState()}
+ function. Once the state is set, the QTextBlock keeps that value
+ until it is set again or until the corresponding paragraph of text
+ is deleted.
+
+ In this example we have chosen to use 0 to represent the "not in
+ comment" state, and 1 for the "in comment" state. When the stored
+ syntax highlighting rules are applied we initialize the current
+ block state to 0.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 9
+
+ If the previous block state was "in comment" (\c
+ {previousBlockState() == 1}), we start the search for an end
+ expression at the beginning of the text block. If the
+ previousBlockState() returns 0, we start the search at the
+ location of the first occurrence of a start expression.
+
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 10
+ \snippet examples/richtext/syntaxhighlighter/highlighter.cpp 11
+
+ When an end expression is found, we calculate the length of the
+ comment and apply the multiline comment format. Then we search for
+ the next occurrence of the start expression and repeat the
+ process. If no end expression can be found in the current text
+ block we set the current block state to 1, i.e. "in comment".
+
+ This completes the \c Highlighter class implementation; it is now
+ ready for use.
+
+ \section1 MainWindow Class Definition
+
+ Using a QSyntaxHighlighter subclass is simple; just provide your
+ application with an instance of the class and pass it the document
+ upon which you want the highlighting to be applied.
+
+ \snippet examples/richtext/syntaxhighlighter/mainwindow.h 0
+
+ In this example we declare a pointer to a \c Highlighter instance
+ which we later will initialize in the private \c setupEditor()
+ function.
+
+ \section1 MainWindow Class Implementation
+
+ The constructor of the main window is straight forward. We first
+ set up the menus, then we initialize the editor and make it the
+ central widget of the application. Finally we set the main
+ window's title.
+
+ \snippet examples/richtext/syntaxhighlighter/mainwindow.cpp 0
+
+ We initialize and install the \c Highlighter object in the private
+ setupEditor() convenience function:
+
+ \snippet examples/richtext/syntaxhighlighter/mainwindow.cpp 1
+
+ First we create the font we want to use in the editor, then we
+ create the editor itself which is an instance of the QTextEdit
+ class. Before we initialize the editor with the \c MainWindow
+ class definition file, we create a \c Highlighter instance passing
+ the editor's document as argument. This is the document that the
+ highlighting will be applied to. Then we are done.
+
+ A QSyntaxHighlighter object can only be installed on one document
+ at the time, but you can easily reinstall the highlighter on
+ another document using the QSyntaxHighlighter::setDocument()
+ function. The QSyntaxHighlighter class also provides the \l
+ {QSyntaxHighlighter::document()}{document()} function which
+ returns the currently set document.
+*/
diff --git a/doc/src/examples/systray.qdoc b/doc/src/examples/systray.qdoc
new file mode 100644
index 0000000..62bc05c
--- /dev/null
+++ b/doc/src/examples/systray.qdoc
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example desktop/systray
+ \title System Tray Icon Example
+
+
+ The System Tray Icon example shows how to add an icon with a menu
+ and popup messages to a desktop environment's system tray.
+
+ \image systemtray-example.png Screenshot of the System Tray Icon.
+
+ Modern operating systems usually provide a special area on the
+ desktop, called the system tray or notification area, where
+ long-running applications can display icons and short messages.
+
+ This example consists of one single class, \c Window, providing
+ the main application window (i.e., an editor for the system tray
+ icon) and the associated icon.
+
+ \image systemtray-editor.png
+
+ The editor allows the user to choose the preferred icon as well as
+ set the balloon message's type and duration. The user can also
+ edit the message's title and body. Finally, the editor provide a
+ checkbox controlling whether the icon is actually shown in the
+ system tray, or not.
+
+ \section1 Window Class Definition
+
+ The \c Window class inherits QWidget:
+
+ \snippet examples/desktop/systray/window.h 0
+
+ We implement several private slots to respond to user
+ interaction. The other private functions are only convenience
+ functions provided to simplify the constructor.
+
+ The tray icon is an instance of the QSystemTrayIcon class. To
+ check whether a system tray is present on the user's desktop, call
+ the static QSystemTrayIcon::isSystemTrayAvailable()
+ function. Associated with the icon, we provide a menu containing
+ the typical \gui minimize, \gui maximize, \gui restore and \gui
+ quit actions. We reimplement the QWidget::setVisible() function to
+ update the tray icon's menu whenever the editor's appearance
+ changes, e.g., when maximizing or minimizing the main application
+ window.
+
+ Finally, we reimplement QWidget's \l {QWidget::}{closeEvent()}
+ function to be able to inform the user (when closing the editor
+ window) that the program will keep running in the system tray
+ until the user chooses the \gui Quit entry in the icon's context
+ menu.
+
+ \section1 Window Class Implementation
+
+ When constructing the editor widget, we first create the various
+ editor elements before we create the actual system tray icon:
+
+ \snippet examples/desktop/systray/window.cpp 0
+
+ We ensure that the application responds to user input by
+ connecting most of the editor's input widgets (including the
+ system tray icon) to the application's private slots. But note the
+ visibility checkbox; its \l {QCheckBox::}{toggled()} signal is
+ connected to the \e {icon}'s \l {QSystemTrayIcon::}{setVisible()}
+ function instead.
+
+ \snippet examples/desktop/systray/window.cpp 3
+
+ The \c setIcon() slot is triggered whenever the current index in
+ the icon combobox changes, i.e., whenever the user chooses another
+ icon in the editor. Note that it is also called when the user
+ activates the tray icon with the left mouse button, triggering the
+ icon's \l {QSystemTrayIcon::}{activated()} signal. We will come
+ back to this signal shortly.
+
+ The QSystemTrayIcon::setIcon() function sets the \l
+ {QSystemTrayIcon::}{icon} property that holds the actual system
+ tray icon. On Windows, the system tray icon size is 16x16; on X11,
+ the preferred size is 22x22. The icon will be scaled to the
+ appropriate size as necessary.
+
+ Note that on X11, due to a limitation in the system tray
+ specification, mouse clicks on transparent areas in the icon are
+ propagated to the system tray. If this behavior is unacceptable,
+ we suggest using an icon with no transparency.
+
+ \snippet examples/desktop/systray/window.cpp 4
+
+ Whenever the user activates the system tray icon, it emits its \l
+ {QSystemTrayIcon::}{activated()} signal passing the triggering
+ reason as parameter. QSystemTrayIcon provides the \l
+ {QSystemTrayIcon::}{ActivationReason} enum to describe how the
+ icon was activated.
+
+ In the constructor, we connected our icon's \l
+ {QSystemTrayIcon::}{activated()} signal to our custom \c
+ iconActivated() slot: If the user has clicked the icon using the
+ left mouse button, this function changes the icon image by
+ incrementing the icon combobox's current index, triggering the \c
+ setIcon() slot as mentioned above. If the user activates the icon
+ using the middle mouse button, it calls the custom \c
+ showMessage() slot:
+
+ \snippet examples/desktop/systray/window.cpp 5
+
+ When the \e showMessage() slot is triggered, we first retrieve the
+ message icon depending on the currently chosen message type. The
+ QSystemTrayIcon::MessageIcon enum describes the icon that is shown
+ when a balloon message is displayed. Then we call
+ QSystemTrayIcon's \l {QSystemTrayIcon::}{showMessage()} function
+ to show the message with the title, body, and icon for the time
+ specified in milliseconds.
+
+ Mac OS X users note: The Growl notification system must be
+ installed for QSystemTrayIcon::showMessage() to display messages.
+
+ QSystemTrayIcon also has the corresponding, \l {QSystemTrayIcon::}
+ {messageClicked()} signal, which is emitted when the user clicks a
+ message displayed by \l {QSystemTrayIcon::}{showMessage()}.
+
+ \snippet examples/desktop/systray/window.cpp 6
+
+ In the constructor, we connected the \l
+ {QSystemTrayIcon::}{messageClicked()} signal to our custom \c
+ messageClicked() slot that simply displays a message using the
+ QMessageBox class.
+
+ QMessageBox provides a modal dialog with a short message, an icon,
+ and buttons laid out depending on the current style. It supports
+ four severity levels: "Question", "Information", "Warning" and
+ "Critical". The easiest way to pop up a message box in Qt is to
+ call one of the associated static functions, e.g.,
+ QMessageBox::information().
+
+ As we mentioned earlier, we reimplement a couple of QWidget's
+ virtual functions:
+
+ \snippet examples/desktop/systray/window.cpp 1
+
+ Our reimplementation of the QWidget::setVisible() function updates
+ the tray icon's menu whenever the editor's appearance changes,
+ e.g., when maximizing or minimizing the main application window,
+ before calling the base class implementation.
+
+ \snippet examples/desktop/systray/window.cpp 2
+
+ We have reimplemented the QWidget::closeEvent() event handler to
+ receive widget close events, showing the above message to the
+ users when they are closing the editor window.
+
+ In addition to the functions and slots discussed above, we have
+ also implemented several convenience functions to simplify the
+ constructor: \c createIconGroupBox(), \c createMessageGroupBox(),
+ \c createActions() and \c createTrayIcon(). See the \l
+ {desktop/systray/window.cpp}{window.cpp} file for details.
+*/
diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc
new file mode 100644
index 0000000..c9500af
--- /dev/null
+++ b/doc/src/examples/tabdialog.qdoc
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/tabdialog
+ \title Tab Dialog Example
+
+ The Tab Dialog example shows how to construct a tab dialog using the
+ QTabWidget class.
+
+ Dialogs provide an efficient way for the application to communicate
+ with the user, but complex dialogs suffer from the problem that they
+ often take up too much screen area. By using a number of tabs in a
+ dialog, information can be split into different categories, while
+ remaining accessible.
+
+ \image tabdialog-example.png
+
+ The Tab Dialog example consists of a single \c TabDialog class that
+ provides three tabs, each containing information about a particular
+ file, and two standard push buttons that are used to accept or reject
+ the contents of the dialog.
+
+ \section1 TabDialog Class Definition
+
+ The \c TabDialog class is a subclass of QDialog that displays a
+ QTabWidget and two standard dialog buttons. The class definition
+ only contain the class constructor and a private data member for
+ the QTabWidget:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.h 3
+
+ In the example, the widget will be used as a top-level window, but
+ we define the constructor so that it can take a parent widget. This
+ allows the dialog to be centered on top of an application's main
+ window.
+
+ \section1 TabDialog Class Implementation
+
+ The constructor calls the QDialog constructor and creates a QFileInfo
+ object for the specified filename.
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 0
+
+ The tab widget is populated with three custom widgets that each
+ contain information about the file. We construct each of these
+ without a parent widget because the tab widget will reparent
+ them as they are added to it.
+
+ We create two standard push buttons, and connect each of them to
+ the appropriate slots in the dialog:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 1
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 3
+
+ We arrange the the tab widget above the buttons in the dialog:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 4
+
+ Finally, we set the dialog's title:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 5
+
+ Each of the tabs are subclassed from QWidget, and only provide
+ constructors.
+
+ \section1 GeneralTab Class Definition
+
+ The GeneralTab widget definition is simple because we are only interested
+ in displaying the contents of a widget within a tab:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.h 0
+
+ \section1 GeneralTab Class Implementation
+
+ The GeneralTab widget simply displays some information about the file
+ passed by the TabDialog. Various widgets for this purpose, and these
+ are arranged within a vertical layout:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 6
+
+ \section1 PermissionsTab Class Definition
+
+ Like the GeneralTab, the PermissionsTab is just used as a placeholder
+ widget for its children:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.h 1
+
+ \section1 PermissionsTab Class Implementation
+
+ The PermissionsTab shows information about the file's access information,
+ displaying details of the file permissions and owner in widgets that are
+ arranged in nested layouts:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 7
+
+ \section1 ApplicationsTab Class Definition
+
+ The ApplicationsTab is another placeholder widget that is mostly
+ cosmetic:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.h 2
+
+ \section1 ApplicationsTab Class Implementation
+
+ The ApplicationsTab does not show any useful information, but could be
+ used as a template for a more complicated example:
+
+ \snippet examples/dialogs/tabdialog/tabdialog.cpp 8
+*/
diff --git a/doc/src/examples/tablemodel.qdoc b/doc/src/examples/tablemodel.qdoc
new file mode 100644
index 0000000..e3d4a22
--- /dev/null
+++ b/doc/src/examples/tablemodel.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example sql/tablemodel
+ \title Table Model Example
+
+ The Table Model example shows how to use a specialized SQL table model with table
+ views to edit information in a database.
+
+ \image tablemodel-example.png
+*/
diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc
new file mode 100644
index 0000000..476bba1
--- /dev/null
+++ b/doc/src/examples/tablet.qdoc
@@ -0,0 +1,380 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/tablet
+ \title Tablet Example
+
+ This example shows how to use a Wacom tablet in Qt applications.
+
+ \image tabletexample.png
+
+ When you use a tablet with Qt applications, \l{QTabletEvent}s are
+ genarated. You need to reimplement the
+ \l{QWidget::}{tabletEvent()} event handler if you want to handle
+ tablet events. Events are generated when the device used for
+ drawing enters and leaves the proximity of the tablet (i.e., when
+ it is close but not pressed down on it), when a device is pushed
+ down and released from it, and when a device is moved on the
+ tablet.
+
+ The information available in QTabletEvent depends on the device
+ used. The tablet in this example has two different devices for
+ drawing: a stylus and an airbrush. For both devices the event
+ contains the position of the device, pressure on the tablet,
+ vertical tilt, and horizontal tilt (i.e, the angle between the
+ device and the perpendicular of the tablet). The airbrush has a
+ finger wheel; the position of this is also available in the tablet
+ event.
+
+ In this example we implement a drawing program. You can use the
+ stylus to draw on the tablet as you use a pencil on paper. When
+ you draw with the airbrush you get a spray of paint; the finger
+ wheel is used to change the density of the spray. The pressure and
+ tilt can change the alpha and saturation values of the QColor and the
+ width of the QPen used for drawing.
+
+ The example consists of the following:
+
+ \list
+ \o The \c MainWindow class inherits QMainWindow and creates
+ the examples menus and connect their slots and signals.
+ \o The \c TabletCanvas class inherits QWidget and
+ receives tablet events. It uses the events to paint on a
+ QImage, which it draws onto itself.
+ \o The \c TabletApplication class inherits QApplication. This
+ class handles tablet events that are not sent to \c tabletEvent().
+ We will look at this later.
+ \o The \c main() function creates a \c MainWindow and shows it
+ as a top level window.
+ \endlist
+
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow creates a \c TabletCanvas and sets it as its
+ center widget.
+
+ \snippet examples/widgets/tablet/mainwindow.h 0
+
+ The QActions let the user select if the tablets pressure and
+ tilt should change the pen width, color alpha component and color
+ saturation. \c createActions() creates all actions, and \c
+ createMenus() sets up the menus with the actions. We have one
+ QActionGroup for the actions that alter the alpha channel, color
+ saturation and line width respectively. The action groups are
+ connected to the \c alphaActionTriggered(), \c
+ colorSaturationActiontriggered(), and \c
+ lineWidthActionTriggered() slots, which calls functions in \c
+ myCanvas.
+
+
+ \section1 MainWindow Class Implementation
+
+ We start width a look at the constructor \c MainWindow():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 0
+
+ In the constructor we create the canvas, actions, and menus.
+ We set the canvas as the center widget. We also initialize the
+ canvas to match the state of our menus and start drawing with a
+ red color.
+
+ Here is the implementation of \c brushColorAct():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 1
+
+ We let the user pick a color with a QColorDialog. If it is valid,
+ we set a new drawing color with \c setColor().
+
+ Here is the implementation of \c alphaActionTriggered():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 2
+
+ The \c TabletCanvas class supports two ways by which the alpha
+ channel of the drawing color can be changed: tablet pressure and
+ tilt. We have one action for each and an action if the alpha
+ channel should not be changed.
+
+ Here is the implementation of \c lineWidthActionTriggered():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 3
+
+ We check which action is selected in \c lineWidthGroup, and set
+ how the canvas should change the drawing line width.
+
+ Here is the implementation of \c saturationActionTriggered():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 4
+
+ We check which action is selected in \c colorSaturationGroup, and
+ set how the canvas should change the color saturation of the
+ drawing color.
+
+ Here is the implementation of \c saveAct():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 5
+
+ We use the QFileDialog to let the user select a file to save the
+ drawing in. It is the \c TabletCanvas that save the drawing, so we
+ call its \c saveImage() function.
+
+ Here is the implementation of \c loadAct():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 6
+
+ We let the user select the image file to be opened with
+ a QFileDialog; we then ask the canvas to load the image with \c
+ loadImage().
+
+ Here is the implementation of \c aboutAct():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 7
+
+ We show a message box with a short description of the example.
+
+ \c createActions() creates all actions and action groups of
+ the example. We look at the creation of one action group and its
+ actions. See the \l{Application Example}{application example} if
+ you want a high-level introduction to QActions.
+
+ Here is the implementation of \c createActions:
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 8
+ \dots
+ \snippet examples/widgets/tablet/mainwindow.cpp 9
+
+ We want the user to be able to choose if the drawing color's
+ alpha component should be changed by the tablet pressure or tilt.
+ We have one action for each choice and an action if the alpha
+ channel is not to be changed, i.e, the color is opaque. We make
+ the actions checkable; the \c alphaChannelGroup will then ensure
+ that only one of the actions are checked at any time. The \c
+ triggered() signal is emitted when an action is checked.
+
+ \dots
+ \snippet examples/widgets/tablet/mainwindow.cpp 10
+
+ Here is the implementation of \c createMenus():
+
+ \snippet examples/widgets/tablet/mainwindow.cpp 11
+
+ We create the menus of the example and add the actions to them.
+
+
+ \section1 TabletCanvas Class Definition
+
+ The \c TabletCanvas class provides a surface on which the
+ user can draw with a tablet.
+
+ \snippet examples/widgets/tablet/tabletcanvas.h 0
+
+ The canvas can change the alpha channel, color saturation,
+ and line width of the drawing. We have one enum for each of
+ these; their values decide if it is the tablet pressure or tilt
+ that will alter them. We keep a private variable for each, the \c
+ alphaChannelType, \c colorSturationType, and \c penWidthType,
+ which we provide access functions for.
+
+ We draw on a QImage with \c myPen and \c myBrush using \c
+ myColor. The \c saveImage() and \c loadImage() saves and loads
+ the QImage to disk. The image is drawn on the widget in \c
+ paintEvent(). The \c pointerType and \c deviceType keeps the type
+ of pointer, which is either a pen or an eraser, and device
+ currently used on the tablet, which is either a stylus or an
+ airbrush.
+
+ The interpretation of events from the tablet is done in \c
+ tabletEvent(); \c paintImage(), \c updateBrush(), and \c
+ brushPattern() are helper functions used by \c tabletEvent().
+
+
+ \section1 TabletCanvas Class Implementation
+
+ We start with a look at the constructor:
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 0
+
+ In the constructor we initialize our class variables. We need
+ to draw the background of our image, as the default is gray.
+
+ Here is the implementation of \c saveImage():
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 1
+
+ QImage implements functionality to save itself to disk, so we
+ simply call \l{QImage::}{save()}.
+
+ Here is the implementation of \c loadImage():
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 2
+
+ We simply call \l{QImage::}{load()}, which loads the image in \a
+ file.
+
+ Here is the implementation of \c tabletEvent():
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 3
+
+ We get three kind of events to this function: TabletPress,
+ TabletRelease, and TabletMove, which is generated when a device
+ is pressed down on, leaves, or moves on the tablet. We set the \c
+ deviceDown to true when a device is pressed down on the tablet;
+ we then know when we should draw when we receive move events. We
+ have implemented the \c updateBrush() and \c paintImage() helper
+ functions to update \c myBrush and \c myPen after the state of \c
+ alphaChannelType, \c colorSaturationType, and \c lineWidthType.
+
+ Here is the implementation of \c paintEvent():
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 4
+
+ We simply draw the image to the top left of the widget.
+
+ Here is the implementation of \c paintImage():
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 5
+
+ In this function we draw on the image based on the movement of the
+ device. If the device used on the tablet is a stylus we want to draw a
+ line between the positions of the stylus recorded in \c polyLine.
+ If it is an airbrush we want to draw a circle of points with a
+ point density based on the tangential pressure, which is the position
+ of the finger wheel on the airbrush. We use the Qt::BrushStyle to
+ draw the points as it has styles that draw points with different
+ density; we select the style based on the tangential pressure in
+ \c brushPattern().
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 6
+
+ We return a brush style with a point density that increases with
+ the tangential pressure.
+
+ In \c updateBrush() we set the pen and brush used for drawing
+ to match \c alphaChannelType, \c lineWidthType, \c
+ colorSaturationType, and \c myColor. We will examine the code to
+ set up \c myBrush and \c myPen for each of these variables:
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 7
+
+ We fetch the current drawingcolor's hue, saturation, value,
+ and alpha values. \c hValue and \c vValue are set to the
+ horizontal and vertical tilt as a number from 0 to 255. The
+ original values are in degrees from -60 to 60, i.e., 0 equals
+ -60, 127 equals 0, and 255 equals 60 degrees. The angle measured
+ is between the device and the perpendicular of the tablet (see
+ QTabletEvent for an illustration).
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 8
+
+ The alpha channel of QColor is given as a number between 0
+ and 255 where 0 is transparent and 255 is opaque.
+ \l{QTabletEvent::}{pressure()} returns the pressure as a qreal
+ between 0.0 and 1.0. By subtracting 127 from the tilt values and
+ taking the absolute value we get the smallest alpha values (i.e.,
+ the color is most transparent) when the pen is perpendicular to
+ the tablet. We select the largest of the vertical and horizontal
+ tilt value.
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 9
+
+ The colorsaturation is given as a number between 0 and 255. It is
+ set with \l{QColor::}{setHsv()}. We can set the tilt values
+ directly, but must multiply the pressure to a number between 0 and
+ 255.
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 10
+
+ The width of the pen increases with the pressure. When the pen
+ width is controlled with the tilt we let the width increse with
+ the angle between the device and the perpendicular of the tablet.
+
+ \snippet examples/widgets/tablet/tabletcanvas.cpp 11
+
+ We finally check wether the pointer is the stylus or the eraser.
+ If it is the eraser, we set the color to the background color of
+ the image an let the pressure decide the pen width, else we set
+ the colors we have set up previously in the function.
+
+
+ \section1 TabletApplication Class Definition
+
+ We inherit QApplication in this class because we want to
+ reimplement the \l{QApplication::}{event()} function.
+
+ \snippet examples/widgets/tablet/tabletapplication.h 0
+
+ We keep a \c TabletCanvas we send the device type of the events we
+ handle in the \c event() function to. The TabletEnterProximity
+ and TabletLeaveProximity events are not sendt to the QApplication
+ object, while other tablet events are sendt to the QWidget's
+ \c event(), which sends them on to \l{QWidget::}{tabletEvent()}.
+ Since we want to handle these events we have implemented \c
+ TabletApplication.
+
+
+ \section1 TabletApplication Class Implementation
+
+ Here is the implementation of \c event():
+
+ \snippet examples/widgets/tablet/tabletapplication.cpp 0
+
+ We use this function to handle the TabletEnterProximity and
+ TabletLeaveProximity events, which is generated when a device
+ enters and leaves the proximity of the tablet. The intended use of these
+ events is to do work that is dependent on what kind of device is
+ used on the tablet. This way, you don't have to do this work
+ when other events are generated, which is more frequently than the
+ leave and enter proximity events. We call \c setTabletDevice() in
+ \c TabletCanvas.
+
+ \section1 The \c main() function
+
+ Here is the examples \c main() function:
+
+ \snippet examples/widgets/tablet/main.cpp 0
+
+ In the \c main() function we create a \c MainWinow and display it
+ as a top level window. We use the \c TabletApplication class. We
+ need to set the canvas after the application is created. We cannot
+ use classes that implement event handling before an QApplication
+ object is instantiated.
+*/
diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc
new file mode 100644
index 0000000..b02da6c
--- /dev/null
+++ b/doc/src/examples/taskmenuextension.qdoc
@@ -0,0 +1,457 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/taskmenuextension
+ \title Task Menu Extension Example
+
+ The Task Menu Extension example shows how to create a custom
+ widget plugin for \l {Qt Designer Manual}{\QD}, and how to to use
+ the QDesignerTaskMenuExtension class to provide custom task menu
+ entries associated with the plugin.
+
+ \image taskmenuextension-example-faded.png
+
+ To provide a custom widget that can be used with \QD, we need to
+ supply a self-contained implementation. In this example we use a
+ custom widget designed to show the task menu extension feature:
+ The TicTacToe widget.
+
+ An extension is an object which modifies the behavior of \QD. The
+ QDesignerTaskMenuExtension can provide custom task menu entries
+ when a widget with this extension is selected.
+
+ There are four available types of extensions in \QD:
+
+ \list
+ \o QDesignerContainerExtension provides an extension that allows
+ you to add (and delete) pages to a multi-page container plugin
+ in \QD.
+ \o QDesignerMemberSheetExtension provides an extension that allows
+ you to manipulate a widget's member functions which is displayed
+ when configuring connections using Qt Designer's mode for editing
+ signals and slots.
+ \o QDesignerPropertySheetExtension provides an extension that
+ allows you to manipulate a widget's properties which is displayed
+ in Qt Designer's property editor.
+ \o QDesignerTaskMenuExtension provides an extension that allows
+ you to add custom menu entries to \QD's task menu.
+ \endlist
+
+ You can use all the extensions following the same pattern as in
+ this example, only replacing the respective extension base
+ class. For more information, see the \l {QtDesigner Module}.
+
+ The Task Menu Extension example consists of five classes:
+
+ \list
+ \o \c TicTacToe is a custom widget that lets the user play
+ the Tic-Tac-Toe game.
+ \o \c TicTacToePlugin exposes the \c TicTacToe class to \QD.
+ \o \c TicTacToeTaskMenuFactory creates a \c TicTacToeTaskMenu object.
+ \o \c TicTacToeTaskMenu provides the task menu extension, i.e the
+ plugin's associated task menu entries.
+ \o \c TicTacToeDialog lets the user modify the state of a
+ Tic-Tac-Toe plugin loaded into \QD.
+ \endlist
+
+ The project file for custom widget plugins needs some additional
+ information to ensure that they will work within \QD. For example,
+ custom widget plugins rely on components supplied with \QD, and
+ this must be specified in the project file that we use. We will
+ first take a look at the plugin's project file.
+
+ Then we will continue by reviewing the \c TicTacToePlugin class,
+ and take a look at the \c TicTacToeTaskMenuFactory and \c
+ TicTacToeTaskMenu classes. Finally, we will review the \c
+ TicTacToeDialog class before we take a quick look at the \c
+ TicTacToe widget's class definition.
+
+ \section1 The Project File: taskmenuextension.pro
+
+ The project file must contain some additional information to
+ ensure that the plugin will work as expected:
+
+ \snippet examples/designer/taskmenuextension/taskmenuextension.pro 0
+ \snippet examples/designer/taskmenuextension/taskmenuextension.pro 1
+
+ The \c TEMPLATE variable's value makes \c qmake create the custom
+ widget as a library. Later, we will ensure that the widget will be
+ recognized as a plugin by Qt by using the Q_EXPORT_PLUGIN2() macro to
+ export the relevant widget information.
+
+ The \c CONFIG variable contains two values, \c designer and \c
+ plugin:
+
+ \list
+ \o \c designer: Since custom widgets plugins rely on components
+ supplied with \QD, this value ensures that our plugin links against
+ \QD's library (\c libQtDesigner.so).
+
+ \o \c plugin: We also need to ensure that \c qmake considers the
+ custom widget a \e plugin library.
+ \endlist
+
+ When Qt is configured to build in both debug and release modes,
+ \QD will be built in release mode. When this occurs, it is
+ necessary to ensure that plugins are also built in release
+ mode. For that reason we add the \c debug_and_release value to
+ the \c CONFIG variable. Otherwise, if a plugin is built in a mode
+ that is incompatible with \QD, it won't be loaded and
+ installed.
+
+ The header and source files for the widget are declared in the
+ usual way:
+
+ \snippet examples/designer/taskmenuextension/taskmenuextension.pro 2
+
+ We provide an implementation of the plugin interface so that \QD
+ can use the custom widget. In this particular example we also
+ provide implementations of the task menu extension and the
+ extension factory as well as a dialog implementation.
+
+ It is important to ensure that the plugin is installed in a
+ location that is searched by \QD. We do this by specifying a
+ target path for the project and adding it to the list of items to
+ install:
+
+ \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc 0
+
+ The task menu extension is created as a library, and will be
+ installed alongside the other \QD plugins when the project is
+ installed (using \c{make install} or an equivalent installation
+ procedure).
+
+ Note that if you want the plugins to appear in a Visual Studio
+ integration, the plugins must be built in release mode and their
+ libraries must be copied into the plugin directory in the install
+ path of the integration (for an example, see \c {C:/program
+ files/trolltech as/visual studio integration/plugins}).
+
+ For more information about plugins, see the \l {How to Create Qt
+ Plugins} documentation.
+
+ \section1 TicTacToePlugin Class Definition
+
+ The \c TicTacToePlugin class exposes \c the TicTacToe class to
+ \QD. Its definition is equivalent to the \l
+ {designer/customwidgetplugin}{Custom Widget Plugin} example's
+ plugin class which is explained in detail. The only part of the
+ class definition that is specific to this particular custom widget
+ is the class name:
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.h 0
+
+ The plugin class provides \QD with basic information about our
+ plugin, such as its class name and its include file. Furthermore
+ it knows how to create instances of the \c TicTacToe widget.
+ TicTacToePlugin also defines the \l
+ {QDesignerCustomWidgetInterface::initialize()}{initialize()}
+ function which is called after the plugin is loaded into \QD. The
+ function's QDesignerFormEditorInterface parameter provides the
+ plugin with a gateway to all of \QD's API's.
+
+ The \c TicTacToePlugin class inherits from both QObject and
+ QDesignerCustomWidgetInterface. It is important to remember, when
+ using multiple inheritance, to ensure that all the interfaces
+ (i.e. the classes that doesn't inherit Q_OBJECT) are made known to
+ the meta object system using the Q_INTERFACES() macro. This
+ enables \QD to use \l qobject_cast() to query for supported
+ interfaces using nothing but a QObject pointer.
+
+ \section1 TicTacToePlugin Class Implementation
+
+ The TicTacToePlugin class implementation is in most parts
+ equivalent to the \l {designer/customwidgetplugin}{Custom Widget
+ Plugin} example's plugin class:
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.cpp 0
+
+ The only function that differs significantly is the initialize()
+ function:
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.cpp 1
+
+ The \c initialize() function takes a QDesignerFormEditorInterface
+ object as argument. The QDesignerFormEditorInterface class
+ provides access to Qt Designer's components.
+
+ In \QD you can create two kinds of plugins: custom widget plugins
+ and tool plugins. QDesignerFormEditorInterface provides access to
+ all the \QD components that you normally need to create a tool
+ plugin: the extension manager, the object inspector, the property
+ editor and the widget box. Custom widget plugins have access to
+ the same components.
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.cpp 2
+
+ When creating extensions associated with custom widget plugins, we
+ need to access \QD's current extension manager which we retrieve
+ from the QDesignerFormEditorInterface parameter.
+
+ \QD's QDesignerFormEditorInterface holds information about all Qt
+ Designer's components: The action editor, the object inspector,
+ the property editor, the widget box, and the extension and form
+ window managers.
+
+ The QExtensionManager class provides extension management
+ facilities for \QD. Using \QD's current extension manager you can
+ retrieve the extension for a given object. You can also register
+ and unregister an extension for a given object. Remember that an
+ extension is an object which modifies the behavior of \QD.
+
+ When registrering an extension, it is actually the associated
+ extension factory that is registered. In \QD, extension factories
+ are used to look up and create named extensions as they are
+ required. So, in this example, the task menu extension itself is
+ not created until a task menu is requested by the user.
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.cpp 3
+
+ We create a \c TicTacToeTaskMenuFactory object that we register
+ using \QD's current \l {QExtensionManager}{extension manager}
+ retrieved from the QDesignerFormEditorInterface parameter. The
+ first argument is the newly created factory and the second
+ argument is an extension identifier which is a string. The \c
+ Q_TYPEID() macro simply converts the string into a QLatin1String.
+
+ The \c TicTacToeTaskMenuFactory class is a subclass of
+ QExtensionFactory. When the user request a task menu by clicking
+ the right mouse button over a widget with the specified task menu
+ extension, \QD's extension manager will run through all its
+ registered factories invoking the first one that is able to create
+ a task menu extension for the selected widget. This factory will
+ in turn create a \c TicTacToeTaskMenu object (the extension).
+
+ We omit to reimplement the
+ QDesignerCustomWidgetInterface::domXml() function (which include
+ default settings for the widget in the standard XML format used by
+ Qt Designer), since no default values are necessary.
+
+ \snippet examples/designer/taskmenuextension/tictactoeplugin.cpp 4
+
+ Finally, we use the Q_EXPORT_PLUGIN2() macro to export the
+ TicTacToePlugin class for use with Qt's plugin handling classes:
+ This macro ensures that \QD can access and construct the custom
+ widget. Without this macro, there is no way for \QD to use the
+ widget.
+
+ \section1 TicTacToeTaskMenuFactory Class Definition
+
+ The \c TicTacToeTaskMenuFactory class inherits QExtensionFactory
+ which provides a standard extension factory for \QD.
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.h 1
+
+ The subclass's purpose is to reimplement the
+ QExtensionFactory::createExtension() function, making it able to
+ create a \c TicTacToe task menu extension.
+
+ \section1 TicTacToeTaskMenuFactory Class Implementation
+
+ The class constructor simply calls the QExtensionFactory base
+ class constructor:
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 4
+
+ As described above, the factory is invoked when the user request a
+ task menu by clicking the right mouse button over a widget with
+ the specified task menu extension in \QD.
+
+ \QD's behavior is the same whether the requested extension is
+ associated with a container, a member sheet, a property sheet or a
+ task menu: Its extension manager runs through all its registered
+ extension factories calling \c createExtension() for each until
+ one responds by creating the requested extension.
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 5
+
+ So the first thing we do in \c
+ TicTacToeTaskMenuFactory::createExtension() is to check if the
+ requested extension is a task menu extension. If it is, and the
+ widget requesting it is a \c TicTacToe widget, we create and
+ return a \c TicTacToeTaskMenu object. Otherwise, we simply return
+ a null pointer, allowing \QD's extension manager to continue its
+ search through the registered factories.
+
+
+ \section1 TicTacToeTaskMenu Class Definition
+
+ \image taskmenuextension-menu.png
+
+ The \c TicTacToeTaskMenu class inherits QDesignerTaskMenuExtension
+ which allows you to add custom entries (in the form of QActions)
+ to the task menu in \QD.
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.h 0
+
+ We reimplement the \c preferredEditAction() and \c taskActions()
+ functions. Note that we implement a constructor that takes \e two
+ arguments: the parent widget, and the \c TicTacToe widget for
+ which the task menu is requested.
+
+ In addition we declare the private \c editState() slot, our custom
+ \c editStateAction and a private pointer to the \c TicTacToe
+ widget which state we want to modify.
+
+ \section1 TicTacToeTaskMenu Class Implementation
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 0
+
+ In the constructor we first save the reference to the \c TicTacToe
+ widget sent as parameter, i.e the widget which state we want to
+ modify. We will need this later when our custom action is
+ invoked. We also create our custom \c editStateAction and connect
+ it to the \c editState() slot.
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 1
+
+ The \c editState() slot is called whenever the user chooses the
+ \gui {Edit State...} option in a \c TicTacToe widget's task menu. The
+ slot creates a \c TicTacToeDialog presenting the current state of
+ the widget, and allowing the user to edit its state by playing the
+ game.
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 2
+
+ We reimplement the \c preferredEditAction() function to return our
+ custom \c editStateAction as the action that should be invoked
+ when selecting a \c TicTacToe widget and pressing \key F2 .
+
+ \snippet examples/designer/taskmenuextension/tictactoetaskmenu.cpp 3
+
+ We reimplement the \c taskActions() function to return a list of
+ our custom actions making these appear on top of the default menu
+ entries in a \c TicTacToe widget's task menu.
+
+ \section1 TicTacToeDialog Class Definition
+
+ \image taskmenuextension-dialog.png
+
+ The \c TicTacToeDialog class inherits QDialog. The dialog lets the
+ user modify the state of the currently selected Tic-Tac-Toe
+ plugin.
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.h 0
+
+ We reimplement the \c sizeHint() function. We also declare two
+ private slots: \c resetState() and \c saveState(). In addition to
+ the dialog's buttons and layouts we declare two \c TicTacToe
+ pointers, one to the widget the user can interact with and the
+ other to the original custom widget plugin which state the user
+ wants to edit.
+
+ \section1 TicTacToeDialog Class Implementation
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 0
+
+ In the constructor we first save the reference to the TicTacToe
+ widget sent as parameter, i.e the widget which state the user want
+ to modify. Then we create a new \c TicTacToe widget, and set its
+ state to be equivalent to the parameter widget's state.
+
+ Finally, we create the dialog's buttons and layout.
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 1
+
+ We reimplement the \c sizeHint() function to ensure that the
+ dialog is given a reasonable size.
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 2
+
+ The \c resetState() slot is called whenever the user press the
+ \gui Reset button. The only thing we do is to call the \c
+ clearBoard() function for the editor widget, i.e. the \c TicTacToe
+ widget we created in the dialog's constructor.
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 3
+
+ The \c saveState() slot is called whenever the user press the \gui
+ OK button, and transfers the state of the editor widget to the
+ widget which state we want to modify. In order to make the change
+ of state visible to \QD we need to set the latter widget's state
+ property using the QDesignerFormWindowInterface class.
+
+ QDesignerFormWindowInterface provides you with information about
+ the associated form window as well as allowing you to alter its
+ properties. The interface is not intended to be instantiated
+ directly, but to provide access to Qt Designer's current form
+ windows controlled by Qt Designer's form window manager.
+
+ If you are looking for the form window containing a specific
+ widget, you can use the static
+ QDesignerFormWindowInterface::findFormWindow() function:
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 4
+
+ After retrieving the form window of the widget (which state we
+ want to modify), we use the QDesignerFormWindowInterface::cursor()
+ function to retrieve the form window's cursor.
+
+ The QDesignerFormWindowCursorInterface class provides an interface
+ to the form window's text cursor. Once we have cursor, we can
+ finally set the state property using the
+ QDesignerFormWindowCursorInterface::setProperty() function.
+
+ \snippet examples/designer/taskmenuextension/tictactoedialog.cpp 5
+
+ In the end we call the QEvent::accept() function which sets the
+ accept flag of the event object. Setting the \c accept parameter
+ indicates that the event receiver wants the event. Unwanted events
+ might be propagated to the parent widget.
+
+ \section1 TicTacToe Class Definition
+
+ The \c TicTacToe class is a custom widget that lets the user play
+ the Tic-Tac-Toe game.
+
+ \snippet examples/designer/taskmenuextension/tictactoe.h 0
+
+ The main details to observe in the \c TicTacToe class defintion is
+ the declaration of the \c state property and its \c state() and \c
+ setState() functions.
+
+ We need to declare the \c TicTacToe widget's state as a property
+ to make it visible to \QD; allowing \QD to manage it in the same
+ way it manages the properties the \c TicTacToe widget inherits
+ from QWidget and QObject, for example featuring the property
+ editor.
+*/
diff --git a/doc/src/examples/tetrix.qdoc b/doc/src/examples/tetrix.qdoc
new file mode 100644
index 0000000..b9adb98
--- /dev/null
+++ b/doc/src/examples/tetrix.qdoc
@@ -0,0 +1,445 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/tetrix
+ \title Tetrix Example
+
+ The Tetrix example is a Qt version of the classic Tetrix game.
+
+ \image tetrix-example.png
+
+ The object of the game is to stack pieces dropped from the top of the
+ playing area so that they fill entire rows at the bottom of the playing area.
+
+ When a row is filled, all the blocks on that row are removed, the player earns
+ a number of points, and the pieces above are moved down to occupy that row.
+ If more than one row is filled, the blocks on each row are removed, and the
+ player earns extra points.
+
+ The \gui{Left} cursor key moves the current piece one space to the left, the
+ \gui{Right} cursor key moves it one space to the right, the \gui{Up} cursor
+ key rotates the piece counter-clockwise by 90 degrees, and the \gui{Down}
+ cursor key rotates the piece clockwise by 90 degrees.
+
+ To avoid waiting for a piece to fall to the bottom of the board, press \gui{D}
+ to immediately move the piece down by one row, or press the \gui{Space} key to
+ drop it as close to the bottom of the board as possible.
+
+ This example shows how a simple game can be created using only three classes:
+
+ \list
+ \o The \c TetrixWindow class is used to display the player's score, number of
+ lives, and information about the next piece to appear.
+ \o The \c TetrixBoard class contains the game logic, handles keyboard input, and
+ displays the pieces on the playing area.
+ \o The \c TetrixPiece class contains information about each piece.
+ \endlist
+
+ In this approach, the \c TetrixBoard class is the most complex class, since it
+ handles the game logic and rendering. One benefit of this is that the
+ \c TetrixWindow and \c TetrixPiece classes are very simple and contain only a
+ minimum of code.
+
+ \section1 TetrixWindow Class Definition
+
+ The \c TetrixWindow class is used to display the game information and contains
+ the playing area:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.h 0
+
+ We use private member variables for the board, various display widgets, and
+ buttons to allow the user to start a new game, pause the current game, and quit.
+
+ Although the window inherits QWidget, the constructor does not provide an
+ argument to allow a parent widget to be specified. This is because the window
+ will always be used as a top-level widget.
+
+ \section1 TetrixWindow Class Implementation
+
+ The constructor sets up the user interface elements for the game:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 0
+
+ We begin by constructing a \c TetrixBoard instance for the playing area and a
+ label that shows the next piece to be dropped into the playing area; the label
+ is initially empty.
+
+ Three QLCDNumber objects are used to display the score, number of lives, and
+ lines removed. These initially show default values, and will be filled in
+ when a game begins:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 1
+
+ Three buttons with shortcuts are constructed so that the user can start a
+ new game, pause the current game, and quit the application:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 2
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 3
+
+ These buttons are configured so that they never receive the keyboard focus;
+ we want the keyboard focus to remain with the \c TetrixBoard instance so that
+ it receives all the keyboard events. Nonetheless, the buttons will still respond
+ to \key{Alt} key shortcuts.
+
+ We connect \l{QAbstractButton::}{clicked()} signals from the \gui{Start}
+ and \gui{Pause} buttons to the board, and from the \gui{Quit} button to the
+ application's \l{QApplication::}{quit()} slot.
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 4
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 5
+
+ Signals from the board are also connected to the LCD widgets for the purpose of
+ updating the score, number of lives, and lines removed from the playing area.
+
+ We place the label, LCD widgets, and the board into a QGridLayout
+ along with some labels that we create with the \c createLabel() convenience
+ function:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 6
+
+ Finally, we set the grid layout on the widget, give the window a title, and
+ resize it to an appropriate size.
+
+ The \c createLabel() convenience function simply creates a new label on the
+ heap, gives it an appropriate alignment, and returns it to the caller:
+
+ \snippet examples/widgets/tetrix/tetrixwindow.cpp 7
+
+ Since each label will be used in the widget's layout, it will become a child
+ of the \c TetrixWindow widget and, as a result, it will be deleted when the
+ window is deleted.
+
+ \section1 TetrixPiece Class Definition
+
+ The \c TetrixPiece class holds information about a piece in the game's
+ playing area, including its shape, position, and the range of positions it can
+ occupy on the board:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.h 0
+
+ Each shape contains four blocks, and these are defined by the \c coords private
+ member variable. Additionally, each piece has a high-level description that is
+ stored internally in the \c pieceShape variable.
+
+ The constructor is written inline in the definition, and simply ensures that
+ each piece is initially created with no shape. The \c shape() function simply
+ returns the contents of the \c pieceShape variable, and the \c x() and \c y()
+ functions return the x and y-coordinates of any given block in the shape.
+
+ \section1 TetrixPiece Class Implementation
+
+ The \c setRandomShape() function is used to select a random shape for a piece:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 0
+
+ For convenience, it simply chooses a random shape from the \c TetrixShape enum
+ and calls the \c setShape() function to perform the task of positioning the
+ blocks.
+
+ The \c setShape() function uses a look-up table of pieces to associate each
+ shape with an array of block positions:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 1
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 2
+
+ These positions are read from the table into the piece's own array of positions,
+ and the piece's internal shape information is updated to use the new shape.
+
+ The \c x() and \c y() functions are implemented inline in the class definition,
+ returning positions defined on a grid that extends horizontally and vertically
+ with coordinates from -2 to 2. Although the predefined coordinates for each
+ piece only vary horizontally from -1 to 1 and vertically from -1 to 2, each
+ piece can be rotated by 90, 180, and 270 degrees.
+
+ The \c minX() and \c maxX() functions return the minimum and maximum horizontal
+ coordinates occupied by the blocks that make up the piece:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 3
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 4
+
+ Similarly, the \c minY() and \c maxY() functions return the minimum and maximum
+ vertical coordinates occupied by the blocks:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 5
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 6
+
+ The \c rotatedLeft() function returns a new piece with the same shape as an
+ existing piece, but rotated counter-clockwise by 90 degrees:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 7
+
+ Similarly, the \c rotatedRight() function returns a new piece with the same
+ shape as an existing piece, but rotated clockwise by 90 degrees:
+
+ \snippet examples/widgets/tetrix/tetrixpiece.cpp 9
+
+ These last two functions enable each piece to create rotated copies of itself.
+
+ \section1 TetrixBoard Class Definition
+
+ The \c TetrixBoard class inherits from QFrame and contains the game logic and display features:
+
+ \snippet examples/widgets/tetrix/tetrixboard.h 0
+
+ Apart from the \c setNextPieceLabel() function and the \c start() and \c pause()
+ public slots, we only provide public functions to reimplement QWidget::sizeHint()
+ and QWidget::minimumSizeHint(). The signals are used to communicate changes to
+ the player's information to the \c TetrixWindow instance.
+
+ The rest of the functionality is provided by reimplementations of protected event
+ handlers and private functions:
+
+ \snippet examples/widgets/tetrix/tetrixboard.h 1
+
+ The board is composed of a fixed-size array whose elements correspond to
+ spaces for individual blocks. Each element in the array contains a \c TetrixShape
+ value corresponding to the type of shape that occupies that element.
+
+ Each shape on the board will occupy four elements in the array, and these will
+ all contain the enum value that corresponds to the type of the shape.
+
+ We use a QBasicTimer to control the rate at which pieces fall toward the bottom
+ of the playing area. This allows us to provide an implementation of
+ \l{QObject::}{timerEvent()} that we can use to update the widget.
+
+ \section1 TetrixBoard Class Implementation
+
+ In the constructor, we customize the frame style of the widget, ensure that
+ keyboard input will be received by the widget by using Qt::StrongFocus for the
+ focus policy, and initialize the game state:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 0
+
+ The first (next) piece is also set up with a random shape.
+
+ The \c setNextPieceLabel() function is used to pass in an externally-constructed
+ label to the board, so that it can be shown alongside the playing area:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 1
+
+ We provide a reasonable size hint and minimum size hint for the board, based on
+ the size of the space for each block in the playing area:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 2
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 3
+
+ By using a minimum size hint, we indicate to the layout in the parent widget
+ that the board should not shrink below a minimum size.
+
+ A new game is started when the \c start() slot is called. This resets the
+ game's state, the player's score and level, and the contents of the board:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 4
+
+ We also emit signals to inform other components of these changes before creating
+ a new piece that is ready to be dropped into the playing area. We start the
+ timer that determines how often the piece drops down one row on the board.
+
+ The \c pause() slot is used to temporarily stop the current game by stopping the
+ internal timer:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 5
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 6
+
+ We perform checks to ensure that the game can only be paused if it is already
+ running and not already paused.
+
+ The \c paintEvent() function is straightforward to implement. We begin by
+ calling the base class's implementation of \l{QWidget::}{paintEvent()} before
+ constructing a QPainter for use on the board:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 7
+
+ Since the board is a subclass of QFrame, we obtain a QRect that covers the area
+ \e inside the frame decoration before drawing our own content.
+
+ If the game is paused, we want to hide the existing state of the board and
+ show some text. We achieve this by painting text onto the widget and returning
+ early from the function. The rest of the painting is performed after this point.
+
+ The position of the top of the board is found by subtracting the total height
+ of each space on the board from the bottom of the frame's internal rectangle.
+ For each space on the board that is occupied by a piece, we call the
+ \c drawSquare() function to draw a block at that position.
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 8
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 9
+
+ Spaces that are not occupied by blocks are left blank.
+
+ Unlike the existing pieces on the board, the current piece is drawn
+ block-by-block at its current position:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 10
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 11
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 12
+
+ The \c keyPressEvent() handler is called whenever the player presses a key while
+ the \c TetrixBoard widget has the keyboard focus.
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 13
+
+ If there is no current game, the game is running but paused, or if there is no
+ current shape to control, we simply pass on the event to the base class.
+
+ We check whether the event is about any of the keys that the player uses to
+ control the current piece and, if so, we call the relevant function to handle
+ the input:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 14
+
+ In the case where the player presses a key that we are not interested in, we
+ again pass on the event to the base class's implementation of
+ \l{QWidget::}{keyPressEvent()}.
+
+ The \c timerEvent() handler is called every time the class's QBasicTimer
+ instance times out. We need to check that the event we receive corresponds to
+ our timer. If it does, we can update the board:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 15
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 16
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 17
+
+ If a row (or line) has just been filled, we create a new piece and reset the
+ timer; otherwise we move the current piece down by one row. We let the base
+ class handle other timer events that we receive.
+
+ The \c clearBoard() function simply fills the board with the
+ \c TetrixShape::NoShape value:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 18
+
+ The \c dropDown() function moves the current piece down as far as possible on
+ the board, either until it is touching the bottom of the playing area or it is
+ stacked on top of another piece:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 19
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 20
+
+ The number of rows the piece has dropped is recorded and passed to the
+ \c pieceDropped() function so that the player's score can be updated.
+
+ The \c oneLineDown() function is used to move the current piece down by one row
+ (line), either when the user presses the \gui{D} key or when the piece is
+ scheduled to move:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 21
+
+ If the piece cannot drop down by one line, we call the \c pieceDropped() function
+ with zero as the argument to indicate that it cannot fall any further, and that
+ the player should receive no extra points for the fall.
+
+ The \c pieceDropped() function itself is responsible for awarding points to the
+ player for positioning the current piece, checking for full rows on the board
+ and, if no lines have been removed, creating a new piece to replace the current
+ one:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 22
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 23
+
+ We call \c removeFullLines() each time a piece has been dropped. This scans
+ the board from bottom to top, looking for blank spaces on each row.
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 24
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 25
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 26
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 27
+
+ If a row contains no blank spaces, the rows above it are copied down by one row
+ to compress the stack of pieces, the top row on the board is cleared, and the
+ number of full lines found is incremented.
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 28
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 29
+
+ If some lines have been removed, the player's score and the total number of lines
+ removed are updated. The \c linesRemoved() and \c scoreChanged() signals are
+ emitted to send these new values to other widgets in the window.
+
+ Additionally, we set the timer to elapse after half a second, set the
+ \c isWaitingAfterLine flag to indicate that lines have been removed, unset
+ the piece's shape to ensure that it is not drawn, and update the widget.
+ The next time that the \c timerEvent() handler is called, a new piece will be
+ created and the game will continue.
+
+ The \c newPiece() function places the next available piece at the top of the
+ board, and creates a new piece with a random shape:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 30
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 31
+
+ We place a new piece in the middle of the board at the top. The game is over if
+ the piece can't move, so we unset its shape to prevent it from being drawn, stop
+ the timer, and unset the \c isStarted flag.
+
+ The \c showNextPiece() function updates the label that shows the next piece to
+ be dropped:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 32
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 33
+
+ We draw the piece's component blocks onto a pixmap that is then set on the label.
+
+ The \c tryMove() function is used to determine whether a piece can be positioned
+ at the specified coordinates:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 34
+
+ We examine the spaces on the board that the piece needs to occupy and, if they
+ are already occupied by other pieces, we return \c false to indicate that the
+ move has failed.
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 35
+
+ If the piece could be placed on the board at the desired location, we update the
+ current piece and its position, update the widget, and return \c true to indicate
+ success.
+
+ The \c drawSquare() function draws the blocks (normally squares) that make up
+ each piece using different colors for pieces with different shapes:
+
+ \snippet examples/widgets/tetrix/tetrixboard.cpp 36
+
+ We obtain the color to use from a look-up table that relates each shape to an
+ RGB value, and use the painter provided to draw the block at the specified
+ coordinates.
+*/
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
new file mode 100644
index 0000000..2eea15d
--- /dev/null
+++ b/doc/src/examples/textfinder.qdoc
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example uitools/textfinder
+ \title Text Finder Example
+
+ The Text Finder example demonstrates how to dynamically process forms
+ using the QtUiTools module. Dynamic form processing enables a form to
+ be processed at run-time only by changing the .ui file for the project.
+ The program allows the user to look up a particular word within the
+ contents of a text file. This text file is included in the project's
+ resource and is loaded into the display at startup.
+
+ \table
+ \row \o \inlineimage textfinder-example-find.png
+ \o \inlineimage textfinder-example-find2.png
+ \endtable
+
+ \section1 Setting Up The Resource File
+
+ The resources required for Text Finder are:
+ \list
+ \o \e{textfinder.ui} - the user interface file created in QtDesigner
+ \o \e{input.txt} - a text file containing some text to be displayed
+ in the QTextEdit
+ \endlist
+
+ \e{textfinder.ui} contains all the necessary QWidget objects for the
+ Text Finder. A QLineEdit is used for the user input, a QTextEdit is
+ used to display the contents of \e{input.txt}, a QLabel is used to
+ display the text "Keyword", and a QPushButton is used for the "Find"
+ button. The screenshot below shows the preview obtained in QtDesigner.
+
+ \image textfinder-example-userinterface.png
+
+ A \e{textfinder.qrc} file is used to store both the \e{textfinder.ui}
+ and \e{input.txt} in the application's executable. The file contains
+ the following code:
+
+ \quotefile examples/uitools/textfinder/textfinder.qrc
+
+ For more information on resource files, see \l{The Qt Resource System}.
+
+ To generate a form at run-time, the example is linked against the
+ QtUiTools module library. This is done in the \c{textfinder.pro} file
+ that contains the following lines:
+
+ \snippet doc/src/snippets/code/doc_src_examples_textfinder.qdoc 0
+
+ \section1 TextFinder Class Definition
+
+ The \c TextFinder class is a subclass of QWidget and it hosts the
+ \l{QWidget}s we need to access in the user interface. The QLabel in the
+ user interface is not declared here as we do not need to access it.
+
+ \snippet examples/uitools/textfinder/textfinder.h 0
+
+ The slot \c{on_find_Button_clicked()} is a slot named according to the
+ \l{Using a Designer .ui File in Your Application#Automatic Connections}
+ {Automatic Connection} naming convention required
+ by \c uic.
+
+ \section1 TextFinder Class Implementation
+
+ The \c TextFinder class's constructor calls the \c loadUiFile() function
+ and then uses \c qFindChild() to access the user interface's
+ \l{QWidget}s.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 0
+
+ We then use QMetaObject's system to enable signal and slot connections.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 2
+
+ The loadTextFile() function is called to load \c{input.txt} into
+ QTextEdit to displays its contents.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 3a
+
+ The \c{TextFinder}'s layout is set with \l{QWidget::}{setLayout()}.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 3b
+
+ Finally, the window title is set to \e {Text Finder} and \c isFirstTime is
+ set to true.
+
+ \c isFirstTime is used as a flag to indicate whether the search operation
+ has been performed more than once. This is further explained with the
+ \c{on_findButton_clicked()} function.
+
+ The \c{loadUiFile()} function is used to load the user interface file
+ previously created in QtDesigner. The QUiLoader class is instantiated
+ and its \c load() function is used to load the form into \c{formWidget}
+ that acts as a place holder for the user interface. The function then
+ returns \c{formWidget} to its caller.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 4
+
+ As mentioned earlier, the loadTextFile() function loads \e{input.txt}
+ into QTextEdit to display its contents. Data is read using QTextStream
+ into a QString object, \c line with the QTextStream::readAll() function.
+ The contents of \c line are then appended to \c{ui_textEdit}.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 5
+
+ The \c{on_findButton_clicked()} function is a slot that is connected to
+ \c{ui_findButton}'s \c clicked() signal. The \c searchString is extracted
+ from the \c ui_lineEdit and the \c document is extracted from \c textEdit.
+ In event there is an empty \c searchString, a QMessageBox is used,
+ requesting the user to enter a word. Otherwise, we traverse through the
+ words in \c ui_textEdit, and highlight all ocurrences of the
+ \c searchString . Two QTextCursor objects are used: One to traverse through
+ the words in \c line and another to keep track of the edit blocks.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 7
+
+ The \c isFirstTime flag is set to false the moment \c findButton is
+ clicked. This is necessary to undo the previous text highlight before
+ highlighting the user's next search string. Also, the \c found flag
+ is used to indicate if the \c searchString was found within the contents
+ of \c ui_textEdit. If it was not found, a QMessageBox is used
+ to inform the user.
+
+ \snippet examples/uitools/textfinder/textfinder.cpp 9
+
+ \section1 \c main() Function
+
+ \snippet examples/uitools/textfinder/main.cpp 0
+
+ The \c main() function initialises the \e{textfinder.qrc} resource file
+ and instantiates as well as displays \c TextFinder.
+
+ \sa{Calculator Builder Example}, {World Time Clock Builder Example}
+ */
diff --git a/doc/src/examples/textobject.qdoc b/doc/src/examples/textobject.qdoc
new file mode 100644
index 0000000..cc5a6b6
--- /dev/null
+++ b/doc/src/examples/textobject.qdoc
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example richtext/textobject
+ \title Text Object Example
+
+ The Text Object example shows how to insert an SVG file into a
+ QTextDocument.
+
+ \image textobject-example.png
+
+ A QTextDocument consists of a hierarchy of elements, such as text blocks and
+ frames. A text object describes the structure or format of one or more of these
+ elements. For instance, images imported from HTML are implemented using text
+ objects. Text objects are used by the document's
+ \l{QAbstractTextDocumentLayout}{layout} to lay out and render (paint) the
+ document. Each object knows how to paint the elements they govern, and
+ calculates their size.
+
+ To be able to insert an SVG image into a text document, we create
+ a text object, and implement painting for that object. This object
+ can then be \l{QTextCharFormat::setObjectType()}{set} on a
+ QTextCharFormat. We also register the text object with the layout
+ of the document, enabling it to draw \l{QTextCharFormat}s governed
+ by our text object. We can summarize the procedure with the
+ following steps:
+
+ \list
+ \o Implement the text object.
+ \o Register the text object with the layout of the text
+ document.
+ \o Set the text object on a QTextCharFormat.
+ \o Insert a QChar::ObjectReplacementCharacter with that
+ text char format into the document.
+ \endlist
+
+ The example consists of the following classes:
+
+ \list
+ \o \c{SvgTextObject} implements the text object.
+ \o \c{Window} shows a QTextEdit into which SVG images can be
+ inserted.
+ \endlist
+
+ \section1 SvgTextObject Class Definition
+
+ Let's take a look at the header file of \c {SvgTextObject}:
+
+ \snippet examples/richtext/textobject/svgtextobject.h 0
+
+ A text object is a QObject that implements QTextObjectInterface.
+ Note that the first class inherited must be QObject, and that
+ you must use Q_INTERFACES to let Qt know that your class
+ implements QTextObjectInterface.
+
+ The document layout keeps a collection of text objects stored as
+ \l{QObject}s, each of which has an associated object type. The
+ layout casts the QObject for the associated object type into the
+ QTextObjectInterface.
+
+ The \l{QTextObjectInterface::}{intrinsicSize()} and
+ \l{QTextObjectInterface::}{drawObject()} functions are then used
+ to calculate the size of the text object and draw it.
+
+ \section1 SvgTextObject Class Implementation
+
+ We start of by taking a look at the
+ \l{QTextObjectInterface::}{intrinsicSize()} function:
+
+ \snippet examples/richtext/textobject/svgtextobject.cpp 0
+
+ \c intrinsicSize() is called by the layout to calculate the size
+ of the text object. Notice that we have drawn the SVG image on a
+ QImage. This is because SVG rendering is quite expensive. The
+ example would lag seriously for large images if we drew them
+ with a QSvgRenderer each time.
+
+ \snippet examples/richtext/textobject/svgtextobject.cpp 1
+
+ In \c drawObject(), we paint the SVG image using the QPainter
+ provided by the layout.
+
+ \section1 Window Class Definition
+
+ The \c Window class is a self-contained window that has a
+ QTextEdit in which SVG images can be inserted.
+
+ \snippet examples/richtext/textobject/window.h 0
+
+ The \c insertTextObject() slot inserts an SVG image at the current
+ cursor position, while \c setupTextObject() creates and registers
+ the SvgTextObject with the layout of the text edit's document.
+
+ The constructor simply calls \c setupTextObject() and \c
+ setupGui(), which creates and lays out the widgets of the \c
+ Window.
+
+ \section1 Window Class Implementation
+
+ We will now take a closer look at the functions that are relevant
+ to our text object, starting with the \c setupTextObject()
+ function.
+
+ \snippet examples/richtext/textobject/window.cpp 3
+
+ \c {SvgTextFormat}'s value is the number of our object type. It is
+ used to identify object types by the document layout.
+
+ Note that we only create one SvgTextObject instance; it will be
+ used for all QTextCharFormat's with the \c SvgTextFormat object
+ type.
+
+ Let's move on to the \c insertTextObject() function:
+
+ \snippet examples/richtext/textobject/window.cpp 1
+
+ First, the \c .svg file is opened and its contents are read
+ into the \c svgData array.
+
+ \snippet examples/richtext/textobject/window.cpp 2
+
+ To speed things up, we buffer the SVG image in a QImage. We use
+ \l{QTextFormat::}{setProperty()} to store the QImage in the in the
+ QTextCharFormat. We can retrieve it later with
+ \l{QTextCharFormat::}{property()}.
+
+ We insert the char format in the standard way - using a
+ QTextCursor. Notice that we use the special QChar
+ \l{QChar::}{ObjectReplacementCharacter}.
+*/
+
diff --git a/doc/src/examples/textures.qdoc b/doc/src/examples/textures.qdoc
new file mode 100644
index 0000000..2f0389c3
--- /dev/null
+++ b/doc/src/examples/textures.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/textures
+ \title Textures Example
+
+ The Textures example demonstrates the use of Qt's image classes as textures in
+ applications that use both OpenGL and Qt to display graphics.
+
+ \image textures-example.png
+*/
diff --git a/doc/src/examples/threadedfortuneserver.qdoc b/doc/src/examples/threadedfortuneserver.qdoc
new file mode 100644
index 0000000..d5f2571
--- /dev/null
+++ b/doc/src/examples/threadedfortuneserver.qdoc
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/threadedfortuneserver
+ \title Threaded Fortune Server Example
+
+ The Threaded Fortune Server example shows how to create a server for a
+ simple network service that uses threads to handle requests from different
+ clients. It is intended to be run alongside the Fortune Client example.
+
+ \image threadedfortuneserver-example.png
+
+ The implementation of this example is similar to that of the
+ \l{network/fortuneserver}{Fortune Server} example, but here we will
+ implement a subclass of QTcpServer that starts each connection in a
+ different thread.
+
+ For this we need two classes: FortuneServer, a QTcpServer subclass, and
+ FortuneThread, which inherits QThread.
+
+ \snippet examples/network/threadedfortuneserver/fortuneserver.h 0
+
+ FortuneServer inherits QTcpServer and reimplements
+ QTcpServer::incomingConnection(). We also use it for storing the list of
+ random fortunes.
+
+ \snippet examples/network/threadedfortuneserver/fortuneserver.cpp 0
+
+ We use FortuneServer's constructor to simply generate the list of
+ fortunes.
+
+ \snippet examples/network/threadedfortuneserver/fortuneserver.cpp 1
+
+ Our implementation of QTcpServer::incomingConnection() creates a
+ FortuneThread object, passing the incoming socket descriptor and a random
+ fortune to FortuneThread's constructor. By connecting FortuneThread's
+ finished() signal to QObject::deleteLater(), we ensure that the thread
+ gets deleted once it has finished. We can then call QThread::start(),
+ which starts the thread.
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.h 0
+
+ Moving on to the FortuneThread class, this is a QThread subclass whose job
+ is to write the fortune to the connected socket. The class reimplements
+ QThread::run(), and it has a signal for reporting errors.
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.cpp 0
+
+ FortuneThread's constructor simply stores the socket descriptor and
+ fortune text, so that they are available for run() later on.
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.cpp 1
+
+ The first thing our run() function does is to create a QTcpSocket object
+ on the stack. What's worth noticing is that we are creating this object
+ inside the thread, which automatically associates the socket to the
+ thread's event loop. This ensures that Qt will not try to deliver events
+ to our socket from the main thread while we are accessing it from
+ FortuneThread::run().
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.cpp 2
+
+ The socket is initialized by calling QTcpSocket::setSocketDescriptor(),
+ passing our socket descriptor as an argument. We expect this to succeed,
+ but just to be sure, (although unlikely, the system may run out of
+ resources,) we catch the return value and report any error.
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.cpp 3
+
+ As with the \l{network/fortuneserver}{Fortune Server} example, we encode
+ the fortune into a QByteArray using QDataStream.
+
+ \snippet examples/network/threadedfortuneserver/fortunethread.cpp 4
+
+ But unlike the previous example, we finish off by calling
+ QTcpSocket::waitForDisconnected(), which blocks the calling thread until
+ the socket has disconnected. Because we are running in a separate thread,
+ the GUI will remain responsive.
+
+ \sa {Fortune Server Example}, {Fortune Client Example}, {Blocking Fortune
+ Client Example}
+*/
diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc
new file mode 100644
index 0000000..5daa2b2
--- /dev/null
+++ b/doc/src/examples/tooltips.qdoc
@@ -0,0 +1,408 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/tooltips
+ \title Tool Tips Example
+
+ The Tool Tips example shows how to provide static and dynamic tool
+ tips for an application's widgets.
+
+ The simplest and most common way to set a widget's tool tip is by
+ calling its QWidget::setToolTip() function (static tool
+ tips). Then the tool tip is shown whenever the cursor points at
+ the widget. We show how to do this with our application's tool
+ buttons. But it is also possible to show different tool tips
+ depending on the cursor's position (dynamic tooltips). This
+ approach uses mouse tracking and event handling to determine what
+ widgets are located under the cursor at any point in time, and
+ displays their tool tips. The tool tips for the shape items in our
+ application are implemented using the latter approach.
+
+ \image tooltips-example.png
+
+ With the \c Tooltips application the user can create new shape
+ items with the provided tool buttons, and move the items around
+ using the mouse. Tooltips are provided whenever the cursor is
+ pointing to a shape item or one of the buttons.
+
+ The Tooltips example consists of two classes:
+
+ \list
+ \o \c ShapeItem is a custom widget representing one single shape item.
+ \o \c SortingBox inherits from QWidget and is the application's main
+ widget.
+ \endlist
+
+ First we will review the \c SortingBox class, then we will take a
+ look at the \c ShapeItem class.
+
+ \section1 SortingBox Class Definition
+
+ \snippet examples/widgets/tooltips/sortingbox.h 0
+
+ The \c SortingBox class inherits QWidget, and it is the Tooltips
+ application's main widget. We reimplement several of the event
+ handlers.
+
+ The \c event() function provides tooltips, the \c resize()
+ function makes sure the application appears consistently when the
+ user resizes the main widget, and the \c paintEvent() function
+ displays the shape items within the \c SortingBox widget. The
+ mouse event handlers are reimplemented to make the user able to
+ move the items around.
+
+ In addition we need three private slots to make the user able to
+ create new shape items.
+
+ \snippet examples/widgets/tooltips/sortingbox.h 1
+
+ We also create several private functions: We use the \c
+ initialItemPosition(), \c initialItemColor() and \c
+ createToolButton() functions when we are constructing the widget,
+ and we use the \c updateButtonGeometry() function whenever the
+ user is resizing the application's main widget.
+
+ The \c itemAt() function determines if there is a shape item at a
+ particular position, and the \c moveItemTo() function moves an
+ item to a new position. We use the \c createShapeItem(), \c
+ randomItemPosition() and \c randomItemColor() functions to create
+ new shape items.
+
+ \snippet examples/widgets/tooltips/sortingbox.h 2
+
+ We keep all the shape items in a QList, and we keep three
+ QPainterPath objects holding the shapes of a circle, a square and
+ a triangle. We also need to have a pointer to an item when it is
+ moving, and we need to know its previous position.
+
+ \section1 SortingBox Class Implementation
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 0
+
+ In the constructor, we first set the Qt::WA_StaticContents
+ attribute on the widget. This attribute indicates that the widget
+ contents are north-west aligned and static. On resize, such a
+ widget will receive paint events only for the newly visible part
+ of itself.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 1
+
+ To be able to show the appropiate tooltips while the user is
+ moving the cursor around, we need to enable mouse tracking for the
+ widget.
+
+ If mouse tracking is disabled (the default), the widget only
+ receives mouse move events when at least one mouse button is
+ pressed while the mouse is being moved. If mouse tracking is
+ enabled, the widget receives mouse move events even if no buttons
+ are pressed.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 2
+
+ A widget's background role defines the brush from the widget's
+ palette that is used to render the background, and QPalette::Base
+ is typically white.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 3
+
+ After creating the application's tool buttons using the private \c
+ createToolButton() function, we construct the shapes of a circle,
+ a square and a triangle using QPainterPath.
+
+ The QPainterPath class provides a container for painting
+ operations, enabling graphical shapes to be constructed and
+ reused. The main advantage of painter paths over normal drawing
+ operations is that complex shapes only need to be created once,
+ but they can be drawn many times using only calls to
+ QPainter::drawPath().
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 4
+
+ Then we set the window title, resize the widget to a suitable
+ size, and finally create three initial shape items using the
+ private \c createShapeItem(), \c initialItemPosition() and \c
+ initialItemColor() functions.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 5
+
+ QWidget::event() is the main event handler and receives all the
+ widget's events. Normally, we recommend reimplementing one of the
+ specialized event handlers instead of this function. But here we
+ want to catch the QEvent::ToolTip events, and since these are
+ rather rare, there exists no specific event handler. For that
+ reason we reimplement the main event handler, and the first thing
+ we need to do is to determine the event's type:
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 6
+
+ If the type is QEvent::ToolTip, we cast the event to a QHelpEvent,
+ otherwise we propagate the event using the QWidget::event()
+ function.
+
+ The QHelpEvent class provides an event that is used to request
+ helpful information about a particular point in a widget.
+
+ For example, the QHelpEvent::pos() function returns the event's
+ position relative to the widget to which the event is dispatched.
+ Here we use this information to determine if the position of the
+ event is contained within the area of any of the shape items. If
+ it is, we display the shape item's tooltip at the position of the
+ event. If not, we hide the tooltip and explicitly ignore the event.
+ This makes sure that the calling code does not start any tooltip
+ specific modes as a result of the event. Note that the
+ QToolTip::showText() function needs the event's position in global
+ coordinates provided by QHelpEvent::globalPos().
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 7
+
+ The \c resizeEvent() function is reimplemented to receive the
+ resize events dispatched to the widget. It makes sure that the
+ tool buttons keep their position relative to the main widget when
+ the widget is resized. We want the buttons to always be vertically
+ aligned in the application's bottom right corner, so each time the
+ main widget is resized we update the buttons geometry.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 8
+
+ The \c paintEvent() function is reimplemented to receive paint
+ events for the widget. We create a QPainter for the \c SortingBox
+ widget, and run through the list of created shape items, drawing
+ each item at its defined position.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 9
+
+ The painter will by default draw all the shape items at position
+ (0,0) in the \c SortingBox widget. The QPainter::translate()
+ function translates the coordinate system by the given offset,
+ making each shape item appear at its defined position. But
+ remember to translate the coordinate system back when the item is
+ drawn, otherwise the next shape item will appear at a position
+ relative to the item we drawed last.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 10
+
+ The QPainter::setBrush() function sets the current brush used by
+ the painter. When the provided argument is a QColor, the function
+ calls the appropiate QBrush constructor which creates a brush with
+ the specified color and Qt::SolidPattern style. The
+ QPainter::drawPath() function draws the given path using the
+ current pen for outline and the current brush for filling.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 11
+
+ The \c mousePressEvent() function is reimplemented to receive the
+ mouse press events dispatched to the widget. It determines if an
+ event's position is contained within the area of any of the shape
+ items, using the private \c itemAt() function.
+
+ If an item covers the position, we store a pointer to that item
+ and the event's position. If several of the shape items cover the
+ position, we store the pointer to the uppermost item. Finally, we
+ move the shape item to the end of the list, and make a call to the
+ QWidget::update() function to make the item appear on top.
+
+ The QWidget::update() function does not cause an immediate
+ repaint; instead it schedules a paint event for processing when Qt
+ returns to the main event loop.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 12
+
+ The \c mouseMoveEvent() function is reimplemented to receive mouse
+ move events for the widget. If the left mouse button is pressed
+ and there exists a shape item in motion, we use the private \c
+ moveItemTo() function to move the item with an offset
+ corresponding to the offset between the positions of the current
+ mouse event and the previous one.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 13
+
+ The \c mouseReleaseEvent() function is reimplemented to receive
+ the mouse release events dispatched to the widget. If the left
+ mouse button is pressed and there exists a shape item in motion,
+ we use the private \c moveItemTo() function to move the item like
+ we did in \c mouseMoveEvent(). But then we remove the pointer to
+ the item in motion, making the shape item's position final for
+ now. To move the item further, the user will need to press the
+ left mouse button again.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 14
+ \codeline
+ \snippet examples/widgets/tooltips/sortingbox.cpp 15
+ \codeline
+ \snippet examples/widgets/tooltips/sortingbox.cpp 16
+
+ The \c createNewCircle(), \c createNewSquare() and \c
+ createNewTriangle() slots simply create new shape items, using the
+ private \c createShapeItem(), \c randomItemPosition() and \c
+ randomItemColor() functions.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 17
+
+ In the \c itemAt() function, we run through the list of created
+ shape items to check if the given position is contained within the
+ area of any of the shape items.
+
+ For each shape item we use the QPainterPath::contains() function
+ to find out if the item's painter path contains the position. If
+ it does we return the index of the item, otherwise we return
+ -1. We run through the list backwards to get the index of the
+ uppermost shape item in case several items cover the position.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 18
+
+ The \c moveItemTo() function moves the shape item in motion, and
+ the parameter \c pos is the position of a mouse event. First we
+ calculate the offset between the parameter \c pos and the previous
+ mouse event position. Then we add the offset to the current
+ position of the item in motion.
+
+ It is tempting to simply set the position of the item to be the
+ parameter \c pos. But an item's position defines the top left
+ corner of the item's bounding rectangle, and the parameter \c pos
+ can be any point; The suggested shortcut would cause the item to
+ jump to a position where the cursor is pointing to the bounding
+ rectangle's top left corner, regardless of the item's previous
+ position.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 19
+
+ Finally, we update the previous mouse event position, and make a
+ call to the QWidget::update() function to make the item appear at
+ its new position.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 20
+
+ In the \c updateButtonGeometry() function we set the geometry for
+ the given button. The parameter coordinates define the bottom
+ right corner of the button. We use these coordinates and the
+ button's size hint to determine the position of the upper left
+ corner. This position, and the button's width and height, are the
+ arguments required by the QWidget::setGeometry() function.
+
+ In the end, we calculate and return the y-coordinate of the bottom
+ right corner of the next button. We use the QWidget::style()
+ function to retrieve the widget's GUI style, and then
+ QStyle::pixelMetric() to determine the widget's preferred default
+ spacing between its child widgets.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 21
+
+ The \c createShapeItem() function creates a single shape item. It
+ sets the path, tooltip, position and color, using the item's own
+ functions. In the end, the function appends the new item to the
+ list of shape items, and calls the QWidget::update() function to
+ make it appear with the other items within the \c SortingBox
+ widget.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 22
+
+ The \c createToolButton() function is called from the \c
+ SortingBox constructor. We create a tool button with the given
+ tooltip and icon. The button's parent is the \c SortingBox widget,
+ and its size is 32 x 32 pixels. Before we return the button, we
+ connect it to the given slot.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 23
+
+ The \c initialItemPosition() function is also called from the
+ constructor. We want the three first items to initially be
+ centered in the middle of the \c SortingBox widget, and we use
+ this function to calculate their positions.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 24
+
+ Whenever the user creates a new shape item, we want the new item
+ to appear at a random position, and we use the \c
+ randomItemPosition() function to calculate such a position. We
+ make sure that the item appears within the the visible area of the
+ \c SortingBox widget, using the widget's current width and heigth
+ when calculating the random coordinates.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 25
+
+ As with \c initialItemPosition(), the \c initialItemColor()
+ function is called from the constructor. The purposes of both
+ functions are purely cosmetic: We want to control the inital
+ position and color of the three first items.
+
+ \snippet examples/widgets/tooltips/sortingbox.cpp 26
+
+ Finally the \c randomItemColor() function is implemented to give
+ the shape items the user creates, a random color.
+
+ \section1 ShapeItem Class Definition
+
+ \snippet examples/widgets/tooltips/shapeitem.h 0
+
+ The \c ShapeItem class is a custom widget representing one single
+ shape item. The widget has a path, a position, a color and a
+ tooltip. We need functions to set or modify these objects, as well
+ as functions that return them. We make the latter functions \c
+ const to prohibit any modifications of the objects,
+ i.e. prohibiting unauthorized manipulation of the shape items
+ appearance.
+
+ \section1 ShapeItem Class Implementation
+
+ \snippet examples/widgets/tooltips/shapeitem.cpp 0
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 1
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 2
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 3
+
+ This first group of functions simply return the objects that are
+ requested. The objects are returned as constants, i.e. they cannot
+ be modified.
+
+ \snippet examples/widgets/tooltips/shapeitem.cpp 4
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 5
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 6
+ \codeline
+ \snippet examples/widgets/tooltips/shapeitem.cpp 7
+
+ The last group of functions set or modify the shape item's path,
+ position, color and tooltip, respectively.
+*/
diff --git a/doc/src/examples/torrent.qdoc b/doc/src/examples/torrent.qdoc
new file mode 100644
index 0000000..8805dad
--- /dev/null
+++ b/doc/src/examples/torrent.qdoc
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/torrent
+ \title Torrent Example
+
+ The Torrent example is a functional BitTorrent client that
+ illustrates how to write a complex TCP/IP application using Qt.
+
+ \image torrent-example.png
+
+ \section1 License Information
+
+ The implementation of the US Secure Hash Algorithm 1 (SHA1) in this example is
+ derived from the original description in \l{RFC 3174}.
+
+ \legalese
+ Copyright (C) The Internet Society (2001). All Rights Reserved.
+
+ This document and translations of it may be copied and furnished to
+ others, and derivative works that comment on or otherwise explain it
+ or assist in its implementation may be prepared, copied, published
+ and distributed, in whole or in part, without restriction of any
+ kind, provided that the above copyright notice and this paragraph are
+ included on all such copies and derivative works. However, this
+ document itself may not be modified in any way, such as by removing
+ the copyright notice or references to the Internet Society or other
+ Internet organizations, except as needed for the purpose of
+ developing Internet standards in which case the procedures for
+ copyrights defined in the Internet Standards process must be
+ followed, or as required to translate it into languages other than
+ English.
+
+ The limited permissions granted above are perpetual and will not be
+ revoked by the Internet Society or its successors or assigns.
+
+ This document and the information contained herein is provided on an
+ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ \endlegalese
+*/
diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc
new file mode 100644
index 0000000..c9b6890
--- /dev/null
+++ b/doc/src/examples/trafficinfo.qdoc
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xmlpatterns/trafficinfo
+ \title TrafficInfo Example
+
+ Shows how XQuery can be used extract information from WML documents provided by a WAP service.
+
+ \section1 Overview
+
+ The WAP service used in this example is \l{Trafikanten}{wap.trafikanten.no}
+ that is run by the Norwegian governmental agency for public transport in
+ Oslo. The service provides real time information about the departure of
+ busses, trams and undergrounds for every station in the city area.
+
+ This example application displays the departure information for a specific
+ station and provides the feature to filter for a special bus or tram line.
+
+ \image trafficinfo-example.png
+
+ \section1 Retrieving the Data
+
+ Without the knowledge of XQuery, one would use QNetworkAccessManager to
+ query the WML document from the WAP service and then using the QDom
+ classes or QXmlStreamReader classes to iterate over the document and
+ extract the needed information.
+ However this approach results in a lot of glue code and consumes valuable
+ developer time, so we are looking for something that can access XML
+ documents locally or over the network and extract data according to given
+ filter rules. That's the point where XQuery enters the stage!
+
+ If we want to know when the underground number 6 in direction
+ \Aring\c{}sjordet is passing the underground station in Nydalen on November
+ 14th 2008 after 1pm, we use the following URL:
+
+ \c{http://wap.trafikanten.no/F.asp?f=03012130&t=13&m=00&d=14.11.2008&start=1}
+
+ The parameters have the following meanings:
+ \list
+ \o \e{f} The unique station ID of Nydalen.
+ \o \e{t} The hour in 0-23 format.
+ \o \e{m} The minute in 0-59 format.
+ \o \e{d} The date in dd.mm.yyyy format.
+ \o \e{start} Not interesting for our use but should be passed.
+ \endlist
+
+ As a result we get the following document:
+
+ \quotefile examples/xmlpatterns/trafficinfo/time_example.wml
+
+ So for every departure we have a \c <a> tag that contains the time as a
+ text element, and the following text element contains the line number
+ and direction.
+
+ To encapsulate the XQuery code in the example application, we create a
+ custom \c TimeQuery class. This provides the \c queryInternal() function
+ that takes a station ID and date/time as input and returns the list of
+ times and directions:
+
+ \snippet examples/xmlpatterns/trafficinfo/timequery.cpp 1
+
+ The first lines of this function synthesize the XQuery strings that fetch
+ the document and extract the data.
+ For better readability, two separated queries are used here: the first one
+ fetches the times and the second fetches the line numbers and directions.
+
+ The \c doc() XQuery method opens a local or remote XML document and returns
+ it, so the \c{/wml/card/p/small/} statement behind it selects all XML nodes
+ that can be reached by the path, \c wml \rarrow \c card \rarrow \c p \rarrow
+ \c small.
+ Now we are on the node that contains all the XML nodes we are interested in.
+
+ In the first query we select all \c a nodes that have a \c href attribute
+ starting with the string "Rute" and return the text of these nodes.
+
+ In the second query we select all text nodes that are children of the
+ \c small node which start with a number.
+ These two queries are passed to the QXmlQuery instance and are evaluated
+ to string lists. After some sanity checking, we have collected all the
+ information we need.
+
+ In the section above we have seen that an unique station ID must be passed
+ as an argument to the URL for retrieving the time, so how to find out which
+ is the right station ID to use? The WAP service provides a page for that
+ as well, so the URL
+
+ \c{http://wap.trafikanten.no/FromLink1.asp?fra=Nydalen}
+
+ will return the following document:
+
+ \snippet examples/xmlpatterns/trafficinfo/station_example.wml 0
+
+ The names of the available stations are listed as separate text elements
+ and the station ID is part of the \c href attribute of the parent \c a
+ (anchor) element. In our example, the \c StationQuery class encapsulates
+ the action of querying the stations that match the given name pattern with
+ the following code:
+
+ \snippet examples/xmlpatterns/trafficinfo/stationquery.cpp 0
+
+ Just as in the \c TimeQuery implementation, the first step is to
+ synthesize the XQuery strings for selecting the station names and the
+ station IDs. As the station name that we pass in the URL will be input
+ from the user, we should protect the XQuery from code injection by using
+ the QXmlQuery::bindVariable() method to do proper quoting of the variable
+ content for us instead of concatenating the two strings manually.
+
+ So, we define a XQuery \c $station variable that is bound to the user
+ input. This variable is concatenated inside the XQuery code with the
+ \c concat method. To extract the station IDs, we select all \c a elements
+ that have an \c title attribute with the content "Velg", and from these
+ elements we take the substring of the \c href attribute that starts at the
+ 18th character.
+
+ The station name can be extracted a bit more easily by just taking the
+ text elements of the selected \a elements.
+
+ After some sanity checks we have all the station IDs and the corresponding
+ names available.
+
+ The rest of the code in this example is just for representing the time and
+ station information to the user, and uses techniques described in the
+ \l{Qt Examples#Widgets}{Widgets examples}.
+*/
diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc
new file mode 100644
index 0000000..eabb803
--- /dev/null
+++ b/doc/src/examples/transformations.qdoc
@@ -0,0 +1,385 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/transformations
+ \title Transformations Example
+
+ The Transformations example shows how transformations influence
+ the way that QPainter renders graphics primitives. In particular
+ it shows how the order of transformations affect the result.
+
+ \image transformations-example.png
+
+ The application allows the user to manipulate the rendering of a
+ shape by changing the translation, rotation and scale of
+ QPainter's coordinate system.
+
+ The example consists of two classes and a global enum:
+
+ \list
+ \o The \c RenderArea class controls the rendering of a given shape.
+ \o The \c Window class is the application's main window.
+ \o The \c Operation enum describes the various transformation
+ operations available in the application.
+ \endlist
+
+ First we will take a quick look at the \c Operation enum, then we
+ will review the \c RenderArea class to see how a shape is
+ rendered. Finally, we will take a look at the Transformations
+ application's features implemented in the \c Window class.
+
+ \section1 Transformation Operations
+
+ Normally, the QPainter operates on the associated device's own
+ coordinate system, but it also has good support for coordinate
+ transformations.
+
+ The default coordinate system of a paint device has its origin at
+ the top-left corner. The x values increase to the right and the y
+ values increase downwards. You can scale the coordinate system by
+ a given offset using the QPainter::scale() function, you can
+ rotate it clockwise using the QPainter::rotate() function and you
+ can translate it (i.e. adding a given offset to the points) using
+ the QPainter::translate() function. You can also twist the
+ coordinate system around the origin (called shearing) using the
+ QPainter::shear() function.
+
+ All the tranformation operations operate on QPainter's
+ tranformation matrix that you can retrieve using the
+ QPainter::matrix() function. A matrix transforms a point in the
+ plane to another point. For more information about the
+ transformation matrix, see the \l {The Coordinate System} and
+ QMatrix documentation.
+
+ \snippet examples/painting/transformations/renderarea.h 0
+
+ The global \c Operation enum is declared in the \c renderarea.h
+ file and describes the various transformation operations available
+ in the Transformations application.
+
+ \section1 RenderArea Class Definition
+
+ The \c RenderArea class inherits QWidget, and controls the
+ rendering of a given shape.
+
+ \snippet examples/painting/transformations/renderarea.h 1
+
+ We declare two public functions, \c setOperations() and
+ \c setShape(), to be able to specify the \c RenderArea widget's shape
+ and to transform the coordinate system the shape is rendered
+ within.
+
+ We reimplement the QWidget's \l
+ {QWidget::minimumSizeHint()}{minimumSizeHint()} and \l
+ {QWidget::sizeHint()}{sizeHint()} functions to give the \c
+ RenderArea widget a reasonable size within our application, and we
+ reimplement the QWidget::paintEvent() event handler to draw the
+ render area's shape applying the user's transformation choices.
+
+ \snippet examples/painting/transformations/renderarea.h 2
+
+ We also declare several convenience functions to draw the shape,
+ the coordinate system's outline and the coordinates, and to
+ transform the painter according to the chosen transformations.
+
+ In addition, the \c RenderArea widget keeps a list of the
+ currently applied transformation operations, a reference to its
+ shape, and a couple of convenience variables that we will use when
+ rendering the coordinates.
+
+ \section1 RenderArea Class Implementation
+
+ The \c RenderArea widget controls the rendering of a given shape,
+ including the transformations of the coordinate system, by
+ reimplementing the QWidget::paintEvent() event handler. But first
+ we will take a quick look at the constructor and at the functions
+ that provides access to the \c RenderArea widget:
+
+ \snippet examples/painting/transformations/renderarea.cpp 0
+
+ In the constructor we pass the parent parameter on to the base
+ class, and customize the font that we will use to render the
+ coordinates. The QWidget::font() funtion returns the font
+ currently set for the widget. As long as no special font has been
+ set, or after QWidget::setFont() is called, this is either a
+ special font for the widget class, the parent's font or (if this
+ widget is a top level widget) the default application font.
+
+ After ensuring that the font's size is 12 points, we extract the
+ rectangles enclosing the coordinate letters, 'x' and 'y', using the
+ QFontMetrics class.
+
+ QFontMetrics provides functions to access the individual metrics
+ of the font, its characters, and for strings rendered in the
+ font. The QFontMetrics::boundingRect() function returns the
+ bounding rectangle of the given character relative to the
+ left-most point on the base line.
+
+ \snippet examples/painting/transformations/renderarea.cpp 1
+ \codeline
+ \snippet examples/painting/transformations/renderarea.cpp 2
+
+ In the \c setShape() and \c setOperations() functions we update
+ the \c RenderArea widget by storing the new value or values
+ followed by a call to the QWidget::update() slot which schedules a
+ paint event for processing when Qt returns to the main event loop.
+
+ \snippet examples/painting/transformations/renderarea.cpp 3
+ \codeline
+ \snippet examples/painting/transformations/renderarea.cpp 4
+
+ We reimplement the QWidget's \l
+ {QWidget::minimumSizeHint()}{minimumSizeHint()} and \l
+ {QWidget::sizeHint()}{sizeHint()} functions to give the \c
+ RenderArea widget a reasonable size within our application. The
+ default implementations of these functions returns an invalid size
+ if there is no layout for this widget, and returns the layout's
+ minimum size or preferred size, respectively, otherwise.
+
+ \snippet examples/painting/transformations/renderarea.cpp 5
+
+ The \c paintEvent() event handler recieves the \c RenderArea
+ widget's paint events. A paint event is a request to repaint all
+ or part of the widget. It can happen as a result of
+ QWidget::repaint() or QWidget::update(), or because the widget was
+ obscured and has now been uncovered, or for many other reasons.
+
+ First we create a QPainter for the \c RenderArea widget. The \l
+ {QPainter::RenderHint}{QPainter::Antialiasing} render hint
+ indicates that the engine should antialias edges of primitives if
+ possible. Then we erase the area that needs to be repainted using
+ the QPainter::fillRect() function.
+
+ We also translate the coordinate system with an constant offset to
+ ensure that the original shape is renderend with a suitable
+ margin.
+
+ \snippet examples/painting/transformations/renderarea.cpp 6
+
+ Before we start to render the shape, we call the QPainter::save()
+ function.
+
+ QPainter::save() saves the current painter state (i.e. pushes the
+ state onto a stack) including the current coordinate system. The
+ rationale for saving the painter state is that the following call
+ to the \c transformPainter() function will transform the
+ coordinate system depending on the currently chosen transformation
+ operations, and we need a way to get back to the original state to
+ draw the outline.
+
+ After transforming the coordinate system, we draw the \c
+ RenderArea's shape, and then we restore the painter state using
+ the the QPainter::restore() function (i.e. popping the saved state off
+ the stack).
+
+ \snippet examples/painting/transformations/renderarea.cpp 7
+
+ Then we draw the square outline.
+
+ \snippet examples/painting/transformations/renderarea.cpp 8
+
+ Since we want the coordinates to correspond with the coordinate
+ system the shape is rendered within, we must make another call to
+ the \c transformPainter() function.
+
+ The order of the painting operations is essential with respect to
+ the shared pixels. The reason why we don't render the coordinates
+ when the coordinate system already is transformed to render the
+ shape, but instead defer their rendering to the end, is that we
+ want the coordinates to appear on top of the shape and its
+ outline.
+
+ There is no need to save the QPainter state this time since
+ drawing the coordinates is the last painting operation.
+
+ \snippet examples/painting/transformations/renderarea.cpp 9
+ \codeline
+ \snippet examples/painting/transformations/renderarea.cpp 10
+ \codeline
+ \snippet examples/painting/transformations/renderarea.cpp 11
+
+ The \c drawCoordinates(), \c drawOutline() and \c drawShape() are
+ convenience functions called from the \c paintEvent() event
+ handler. For more information about QPainter's basic drawing
+ operations and how to display basic graphics primitives, see the
+ \l {painting/basicdrawing}{Basic Drawing} example.
+
+ \snippet examples/painting/transformations/renderarea.cpp 12
+
+ The \c transformPainter() convenience function is also called from
+ the \c paintEvent() event handler, and transforms the given
+ QPainter's coordinate system according to the user's
+ transformation choices.
+
+ \section1 Window Class Definition
+
+ The \c Window class is the Transformations application's main
+ window.
+
+ The application displays four \c RenderArea widgets. The left-most
+ widget renders the shape in QPainter's default coordinate system,
+ the others render the shape with the chosen transformation in
+ addition to all the transformations applied to the \c RenderArea
+ widgets to their left.
+
+ \snippet examples/painting/transformations/window.h 0
+
+ We declare two public slots to make the application able to
+ respond to user interaction, updating the displayed \c RenderArea
+ widgets according to the user's transformation choices.
+
+ The \c operationChanged() slot updates each of the \c RenderArea
+ widgets applying the currently chosen transformation operations, and
+ is called whenever the user changes the selected operations. The
+ \c shapeSelected() slot updates the \c RenderArea widgets' shapes
+ whenever the user changes the preferred shape.
+
+ \snippet examples/painting/transformations/window.h 1
+
+ We also declare a private convenience function, \c setupShapes(),
+ that is used when constructing the \c Window widget, and we
+ declare pointers to the various components of the widget. We
+ choose to keep the available shapes in a QList of \l
+ {QPainterPath}s. In addition we declare a private enum counting
+ the number of displayed \c RenderArea widgets except the widget
+ that renders the shape in QPainter's default coordinate system.
+
+ \section1 Window Class Implementation
+
+ In the constructor we create and initialize the application's
+ components:
+
+ \snippet examples/painting/transformations/window.cpp 0
+
+ First we create the \c RenderArea widget that will render the
+ shape in the default coordinate system. We also create the
+ associated QComboBox that allows the user to choose among four
+ different shapes: A clock, a house, a text and a truck. The shapes
+ themselves are created at the end of the constructor, using the
+ \c setupShapes() convenience function.
+
+ \snippet examples/painting/transformations/window.cpp 1
+
+ Then we create the \c RenderArea widgets that will render their
+ shapes with coordinate tranformations. By default the applied
+ operation is \gui {No Transformation}, i.e. the shapes are
+ rendered within the default coordinate system. We create and
+ initialize the associated \l {QComboBox}es with items
+ corresponding to the various transformation operations decribed by
+ the global \c Operation enum.
+
+ We also connect the \l {QComboBox}es' \l
+ {QComboBox::activated()}{activated()} signal to the \c
+ operationChanged() slot to update the application whenever the
+ user changes the selected transformation operations.
+
+ \snippet examples/painting/transformations/window.cpp 2
+
+ Finally, we set the layout for the application window using the
+ QWidget::setLayout() function, construct the available shapes
+ using the private \c setupShapes() convenience function, and make
+ the application show the clock shape on startup using the public
+ \c shapeSelected() slot before we set the window title.
+
+
+ \snippet examples/painting/transformations/window.cpp 3
+ \snippet examples/painting/transformations/window.cpp 4
+ \snippet examples/painting/transformations/window.cpp 5
+ \snippet examples/painting/transformations/window.cpp 6
+ \dots
+
+ \snippet examples/painting/transformations/window.cpp 7
+
+ The \c setupShapes() function is called from the constructor and
+ create the QPainterPath objects representing the shapes that are
+ used in the application. For construction details, see the \l
+ {painting/transformations/window.cpp}{window.cpp} example
+ file. The shapes are stored in a QList. The QList::append()
+ function inserts the given shape at the end of the list.
+
+ We also connect the associated QComboBox's \l
+ {QComboBox::activated()}{activated()} signal to the \c
+ shapeSelected() slot to update the application when the user
+ changes the preferred shape.
+
+ \snippet examples/painting/transformations/window.cpp 8
+
+ The public \c operationChanged() slot is called whenever the user
+ changes the selected operations.
+
+ We retrieve the chosen transformation operation for each of the
+ transformed \c RenderArea widgets by querying the associated \l
+ {QComboBox}{QComboBoxes}. The transformed \c RenderArea widgets
+ are supposed to render the shape with the transformation specified
+ by its associated combobox \e {in addition to} all the
+ transformations applied to the \c RenderArea widgets to its
+ left. For that reason, for each widget we query, we append the
+ associated operation to a QList of transformations which we apply
+ to the widget before proceeding to the next.
+
+ \snippet examples/painting/transformations/window.cpp 9
+
+ The \c shapeSelected() slot is called whenever the user changes
+ the preferred shape, updating the \c RenderArea widgets using
+ their public \c setShape() function.
+
+ \section1 Summary
+
+ The Transformations example shows how transformations influence
+ the way that QPainter renders graphics primitives. Normally, the
+ QPainter operates on the device's own coordinate system, but it
+ also has good support for coordinate transformations. With the
+ Transformations application you can scale, rotate and translate
+ QPainter's coordinate system. The order in which these
+ tranformations are applied is essential for the result.
+
+ All the tranformation operations operate on QPainter's
+ tranformation matrix. For more information about the
+ transformation matrix, see the \l {The Coordinate System} and
+ QMatrix documentation.
+
+ The Qt reference documentation provides several painting
+ demos. Among these is the \l {demos/affine}{Affine
+ Transformations} demo that shows Qt's ability to perform
+ transformations on painting operations. The demo also allows the
+ user to experiment with the various transformation operations.
+*/
diff --git a/doc/src/examples/treemodelcompleter.qdoc b/doc/src/examples/treemodelcompleter.qdoc
new file mode 100644
index 0000000..82e9c24
--- /dev/null
+++ b/doc/src/examples/treemodelcompleter.qdoc
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/treemodelcompleter
+ \title Tree Model Completer Example
+
+ The Tree Model Completer example shows how to provide completion
+ facilities for a hierarchical model, using a period as the separator
+ to access Child, GrandChild and GrandGrandChild level objects.
+
+ \image treemodelcompleter-example.png
+
+ Similar to the \l{Completer Example}, we provide QComboBox objects to
+ enable selection for completion mode and case sensitivity, as well as
+ a QCheckBox for wrap completions.
+
+ \section1 The Resource File
+
+ The contents of the TreeModelCompleter is read from \e treemodel.txt.
+ This file is embedded within the \e treemodelcompleter.qrc resource file,
+ which contains the following:
+
+ \quotefile examples/tools/treemodelcompleter/treemodelcompleter.qrc
+
+ \section1 TreeModelCompleter Class Definition
+
+ The \c TreeModelCompleter is a subclass of QCompleter with two
+ constructors - one with \a parent as an argument and another with
+ \a parent and \a model as arguments.
+
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.h 0
+
+ The class reimplements the protected functions
+ \l{QCompleter::splitPath()}{splitPath()} and
+ \l{QCompleter::pathFromIndex()}{pathFromIndex()} to suit a tree model.
+ For more information on customizing QCompleter to suit tree models, refer
+ to \l{QCompleter#Handling Tree Models}{Handling Tree Models}.
+
+ \c TreeModelCompleter also has a separator property which is declared
+ using the Q_PROPERTY() macro. The separator has READ and WRITE attributes
+ and the corresponding functions \c separator() and \c setSeparator(). For
+ more information on Q_PROPERTY(), refer to \l{Qt's Property System}.
+
+ \section1 TreeModelCompleter Class Implementation
+
+ The first constructor constructs a \c TreeModelCompleter object with a
+ parent while the second constructor constructs an object with a parent
+ and a QAbstractItemModel, \a model.
+
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.cpp 0
+ \codeline
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.cpp 1
+
+ The \c separator() function is a getter function that returns the
+ separator string.
+
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.cpp 2
+
+ As mentioned earlier, the \c splitPath() function is reimplemented because
+ the default implementation is more suited to QDirModel or list models. In
+ order for QCompleter to split the path into a list of strings that are
+ matched at each level, we split it using QString::split() with \c sep as its
+ separator.
+
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.cpp 3
+
+ The \c pathFromIndex() function returns data for the completionRole() for a
+ tree model. This function is reimplemented as its default implementation is
+ more suitable for list models. If there is no separator, we use
+ \l{QCompleter}'s default implementation, otherwise we use the
+ \l{QStringList::prepend()}{prepend()} function to navigate upwards and
+ accumulate the data. The function then returns a QStringList, \c dataList,
+ using a separator to join objects of different levels.
+
+ \snippet examples/tools/treemodelcompleter/treemodelcompleter.cpp 4
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow and implements five
+ custom slots: \c about(), \c changeCase(), \c changeMode(),
+ \c highlight(), and \c updateContentsLabel().
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.h 0
+
+ In addition, the class has two private functions, \c createMenu() and
+ \c modelFromFile(), as well as private instances of QTreeView, QComboBox,
+ QLabel, \c TreeModelCompleter and QLineEdit.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.h 1
+
+ \section1 MainWindow Class Implementation
+
+ The \c{MainWindow}'s constructor creates a \c MainWindow object with a
+ parent and initializes the \c completer and \c lineEdit. The
+ \c createMenu() function is invoked to set up the "File" menu and "Help"
+ menu. The \c{completer}'s model is set to the QAbstractItemModel obtained
+ from \c modelFromFile(), and the \l{QCompleter::highlighted()}
+ {highlighted()} signal is connected to \c{MainWindow}'s \c highlight()
+ slot.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 0
+
+ The QLabel objects \c modelLabel, \c modeLabel and \c caseLabel are
+ instantiated. Also, the QComboBox objects, \c modeCombo and \c caseCombo,
+ are instantiated and populated. By default, the \c{completer}'s mode is
+ "Filtered Popup" and the case is insensitive.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 1
+ \codeline
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 2
+
+ We use a QGridLayout to place all the objects in the \c MainWindow.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 3
+
+ The \c createMenu() function sets up the QAction objects required and
+ adds them to the "File" menu and "Help" menu. The
+ \l{QAction::triggered()}{triggered()} signals from these actions are
+ connected to their respective slots.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 4
+
+ The \c changeMode() function accepts an \a index corresponding to the
+ user's choice of completion mode and changes the \c{completer}'s mode
+ accordingly.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 5
+
+ The \c about() function provides a brief description on the Tree Model
+ Completer example.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 6
+
+ The \c changeCase() function alternates between \l{Qt::CaseSensitive}
+ {Case Sensitive} and \l{Qt::CaseInsensitive}{Case Insensitive} modes,
+ depending on the value of \a cs.
+
+ \snippet examples/tools/treemodelcompleter/mainwindow.cpp 7
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates \c MainWindow and invokes the
+ \l{QWidget::show()}{show()} function to display it.
+
+ \snippet examples/tools/treemodelcompleter/main.cpp 0
+*/
diff --git a/doc/src/examples/trivialwizard.qdoc b/doc/src/examples/trivialwizard.qdoc
new file mode 100644
index 0000000..360ea00
--- /dev/null
+++ b/doc/src/examples/trivialwizard.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example dialogs/trivialwizard
+ \title Trivial Wizard Example
+
+ The Trivial Wizard example illustrates how to create a linear three-page
+ registration wizard using three instances of QWizardPage and one instance
+ of QWizard.
+
+ \image trivialwizard-example-flow.png
+
+ \section1 Introduction Page
+
+ \image trivialwizard-example-introduction.png
+
+ The introduction page is created with the \c createIntroPage()
+ function where a QWizardPage is created and its title is set to
+ "Introduction". A QLabel is used to hold the description of \c page.
+ A QVBoxLayout is used to hold the \c label. This \c page is returned
+ when the \c createIntroPage() function is called.
+
+ \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 0
+
+ \section1 Registration Page
+
+ \image trivialwizard-example-registration.png
+
+ The registration page is created with the \c createRegistrationPage()
+ function. QLineEdit objects are used to allow the user to input a name
+ and an e-mail address. A QGridLayout is used to hold the QLabel and
+ QLineEdit objects.
+
+ \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 2
+
+ \section1 Conclusion Page
+
+ \image trivialwizard-example-conclusion.png
+
+ The conclusion page is created in the \c createConclusionPage()
+ function. This function's content is similar to \c createIntroPage(). A
+ QLabel is used to inform the user that the registration process has
+ completed successfully.
+
+ \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 6
+
+ \section1 \c main() Function
+
+ The \c main() function instantiates a QWizard object, \c wizard, and
+ adds all three QWizardPage objects to it. The \c wizard window title is
+ set to "Trivial Wizard" and its \c show() function is invoked to display
+ it.
+
+ \snippet examples/dialogs/trivialwizard/trivialwizard.cpp 10
+
+ \sa QWizard, {Class Wizard Example}, {License Wizard Example}
+*/
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
new file mode 100644
index 0000000..38251ee
--- /dev/null
+++ b/doc/src/examples/trollprint.qdoc
@@ -0,0 +1,275 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example linguist/trollprint
+ \title Troll Print Example
+
+ Troll Print is an example application that lets the user choose
+ printer settings. It comes in two versions: English and
+ Portuguese.
+
+ \image linguist-trollprint_10_en.png
+
+ We've included a translation file, \c trollprint_pt.ts, which contains some
+ Portuguese translations for this example.
+
+ We will consider two releases of the same application: Troll Print
+ 1.0 and 1.1. We will learn to reuse the translations created for one
+ release in a subsequent release. (In this tutorial, you need to edit
+ some source files. It's probably best to copy all the files to a new
+ temporary directory and work from there.)
+
+ See the \l{Qt Linguist manual} for more information about
+ translating Qt application.
+
+ \section1 Line by Line Walkthrough
+
+ The \c PrintPanel class is defined in \c printpanel.h.
+
+ \snippet examples/linguist/trollprint/printpanel.h 0
+
+ \c PrintPanel is a QWidget. It needs the \c Q_OBJECT macro for \c
+ tr() to work properly.
+
+ The implementation file is \c printpanel.cpp.
+
+ \snippet examples/linguist/trollprint/printpanel.cpp 0
+
+ Some of the code is commented out in Troll Print 1.0; you will
+ uncomment it later, for Troll Print 1.1.
+
+ \snippet examples/linguist/trollprint/printpanel.cpp 1
+ \snippet examples/linguist/trollprint/printpanel.cpp 2
+
+ Notice the two occurrences of \c tr("Enabled") and of \c
+ tr("Disabled") in PrintPanel. Since both "Enabled"s and "Disabled"s
+ appear in the same context \e {Qt Linguist} will only display one
+ occurrence of each and will use the same translations for the
+ duplicates that it doesn't display. Whilst this is a useful
+ timesaver, in some languages, such as Portuguese, the second
+ occurrence requires a separate translation. We will see how \e {Qt
+ Linguist} can be made to display all the occurrences for separate
+ translation shortly.
+
+ The header file for \c MainWindow, \c mainwindow.h, contains no
+ surprises. In the implementation, \c mainwindow.cpp, we have some
+ user-visible source texts that must be marked for translation.
+
+ \snippet examples/linguist/trollprint/mainwindow.cpp 0
+
+ We must translate the window title.
+
+ \snippet examples/linguist/trollprint/mainwindow.cpp 1
+ \snippet examples/linguist/trollprint/mainwindow.cpp 3
+
+ We also need to translate the actions and menus. Note that the
+ two argument form of \c tr() is used for the keyboard
+ accelerator, "Ctrl+Q", since the second argument is the only clue
+ the translator has to indicate what function that accelerator
+ will perform.
+
+ \snippet examples/linguist/trollprint/main.cpp 0
+
+ The \c main() function in \c main.cpp is the same as the one in
+ the \l{linguist/arrowpad}{Arrow Pad} example. In particular, it
+ chooses a translation file based on the current locale.
+
+ \section1 Running Troll Print 1.0 in English and in Portuguese
+
+ We will use the translations in the \c trollprint_pt.ts file that is provided.
+
+ Set the \c LANG environment variable to \c pt, and then run \c
+ trollprint. You should still see the English version. Now run \c
+ lrelease, e.g. \c {lrelease trollprint.pro}, and then run the
+ example again. Now you should see the Portuguese edition (Troll
+ Imprimir 1.0):
+
+ \image linguist-trollprint_10_pt_bad.png
+
+ Whilst the translation has appeared correctly, it is in fact wrong. In
+ good Portuguese, the second occurrence of "Enabled" should be
+ "Ativadas", not "Ativado" and the ending for the second translation of
+ "Disabled" must change similarly too.
+
+ If you open \c trollprint_pt.ts using \e {Qt Linguist}, you will see that
+ there is just one occurrence of "Enabled" and of "Disabled" in the
+ translation source file, even though there are two of each in the
+ source code. This is because \e {Qt Linguist} tries to minimize the
+ translator's work by using the same translation for duplicate source
+ texts. In cases such as this where an identical translation is wrong,
+ the programmer must disambiguate the duplicate occurrences. This is
+ easily achieved by using the two argument form of \c tr().
+
+ We can easily determine which file must be changed because the
+ translator's "context" is in fact the class name for the class where
+ the texts that must be changed appears. In this case the file is \c
+ printpanel.cpp, where the there are four lines to change. Add the
+ second argument "two-sided" in the appropriate \c tr() calls to the
+ first pair of radio buttons:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+
+ and add the second argument "colors" in the appropriate \c tr() calls
+ for the second pair of radio buttons:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+
+ Now run \c lupdate and open \c trollprint_pt.ts with \e {Qt Linguist}. You
+ should now see two changes.
+
+ First, the translation source file now contains \e three "Enabled",
+ "Disabled" pairs. The first pair is marked "(obs.)" signifying that they
+ are obsolete. This is because these texts appeared in \c tr() calls that
+ have been replaced by new calls with two arguments. The second pair has
+ "two-sided" as their comment, and the third pair has "colors" as their
+ comment. The comments are shown in the \gui {Source text and comments}
+ area in \e {Qt Linguist}.
+
+ Second, the translation text "Ativado" and "Desativado" have been
+ automatically used as translations for the new "Enabled" and "Disabled"
+ texts, again to minimize the translator's work. Of course in this case
+ these are not correct for the second occurrence of each word, but they
+ provide a good starting point.
+
+ Change the second "Ativado" into "Ativadas" and the second
+ "Desativado" into "Desativadas", then save and quit. Run \c lrelease
+ to obtain an up-to-date binary \c trollprint_pt.qm file, and run Troll Print
+ (or rather Troll Imprimir).
+
+ \image linguist-trollprint_10_pt_good.png
+
+ The second argument to \c tr() calls, called "comments" in \e {Qt
+ Linguist}, distinguish between identical source texts that occur in
+ the same context (class). They are also useful in other cases to give
+ clues to the translator, and in the case of Ctrl key accelerators are
+ the only means of conveying the function performed by the accelerator to
+ the translator.
+
+ An additional way of helping the translator is to provide information on
+ how to navigate to the particular part of the application that contains
+ the source texts they must translate. This helps them see the context
+ in which the translation appears and also helps them to find and test
+ the translations. This can be achieved by using a \c TRANSLATOR comment
+ in the source code:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+
+ Try adding these comments to some source files, particularly to
+ dialog classes, describing the navigation necessary to reach the
+ dialogs. You could also add them to the example files, e.g. \c
+ mainwindow.cpp and \c printpanel.cpp are appropriate files. Run \c
+ lupdate and then start \e {Qt Linguist} and load in \c trollprint_pt.ts.
+ You should see the comments in the \gui {Source text and comments} area
+ as you browse through the list of source texts.
+
+ Sometimes, particularly with large programs, it can be difficult for
+ the translator to find their translations and check that they're
+ correct. Comments that provide good navigation information can save
+ them time:
+
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+
+ \section1 Troll Print 1.1
+
+ We'll now prepare release 1.1 of Troll Print. Start your favorite text
+ editor and follow these steps:
+
+ \list
+ \o Uncomment the two lines that create a QLabel with the text
+ "\<b\>TROLL PRINT\</b\>" in \c printpanel.cpp.
+ \o Word-tidying: Replace "2-sided" by "Two-sided" in \c printpanel.cpp.
+ \o Replace "1.0" with "1.1" everywhere it occurs in \c mainwindow.cpp.
+ \o Update the copyright year to 1999-2000 in \c mainwindow.cpp.
+ \endlist
+
+ (Of course the version number and copyright year would be consts or
+ #defines in a real application.)
+
+ Once finished, run \c lupdate, then open \c trollprint_pt.ts in \e {Qt
+ Linguist}. The following items are of special interest:
+
+ \list
+ \o \c MainWindow
+ \list
+ \o Troll Print 1.0 - marked "(obs.)", obsolete
+ \o About Troll Print 1.0 - marked "(obs.)", obsolete
+ \o Troll Print 1.0. Copyright 1999 Software, Inc. -
+ marked obsolete
+ \o Troll Print 1.1 - automatically translated as
+ "Troll Imprimir 1.1"
+ \o About Troll Print 1.1 - automatically translated as
+ "Troll Imprimir 1.1"
+ \o Troll Print 1.1. Copyright 1999-2000 Software,
+ Inc. - automatically translated as "Troll Imprimir 1.1.
+ Copyright 1999-2000 Software, Inc."
+ \endlist
+ \o \c PrintPanel
+ \list
+ \o 2-sided - marked "(obs.)", obsolete
+ \o \<b\>TROLL PRINT\</b\> - unmarked, i.e. untranslated
+ \o Two-sided - unmarked, i.e. untranslated.
+ \endlist
+ \endlist
+
+ Notice that \c lupdate works hard behind the scenes to make revisions
+ easier, and it's pretty smart with numbers.
+
+ Go over the translations in \c MainWindow and mark these as "done".
+ Translate "\<b\>TROLL PRINT\</b\>" as "\<b\>TROLL IMPRIMIR\</b\>".
+ When you're translating "Two-sided", press the \gui {Guess Again}
+ button to translate "Two-sided", but change the "2" into "Dois".
+
+ Save and quit, then run \c lrelease. The Portuguese version
+ should look like this:
+
+ \image linguist-trollprint_11_pt.png
+
+ Choose \gui{Ajuda|Sobre} (\gui{Help|About}) to see the about box.
+
+ If you choose \gui {Ajuda|Sobre Qt} (\gui {Help|About Qt}), you'll get
+ an English dialog. Oops! Qt itself needs to be translated. See
+ \l{Internationalization with Qt} for details.
+
+ Now set \c LANG=en to get the original English version:
+
+ \image linguist-trollprint_11_en.png
+*/
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
new file mode 100644
index 0000000..3d0965f
--- /dev/null
+++ b/doc/src/examples/undoframework.qdoc
@@ -0,0 +1,306 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example tools/undoframework
+ \title Undo Framework Example
+
+ This example shows how to implement undo/redo functionality
+ with the Qt undo framework.
+
+ \image undoframeworkexample.png The Undo Diagram Example
+
+ In the Qt undo framework, all actions that the user performs are
+ implemented in classes that inherit QUndoCommand. An undo command
+ class knows how to both \l{QUndoCommand::}{redo()} - or just do
+ the first time - and \l{QUndoCommand::}{undo()} an action. For
+ each action the user performs, a command is placed on a
+ QUndoStack. Since the stack contains all commands executed
+ (stacked in chronological order) on the document, it can roll the
+ state of the document backwards and forwards by undoing and redoing
+ its commands. See the \l{Overview of Qt's Undo Framework}{overview
+ document} for a high-level introduction to the undo framework.
+
+ The undo example implements a simple diagram application. It is
+ possible to add and delete items, which are either box or
+ rectangular shaped, and move the items by dragging them with the
+ mouse. The undo stack is shown in a QUndoView, which is a list in
+ which the commands are shown as list items. Undo and redo are
+ available through the edit menu. The user can also select a command
+ from the undo view.
+
+ We use the \l{The Graphics View Framework}{graphics view
+ framework} to implement the diagram. We only treat the related
+ code briefly as the framework has examples of its own (e.g., the
+ \l{Diagram Scene Example}).
+
+ The example consists of the following classes:
+
+ \list
+ \o \c MainWindow is the main window and arranges the
+ example's widgets. It creates the commands based
+ on user input and keeps them on the command stack.
+ \o \c AddCommand adds an item to the scene.
+ \o \c DeleteCommand deletes an item from the scene.
+ \o \c MoveCommand when an item is moved the MoveCommand keeps record
+ of the start and stop positions of the move, and it
+ moves the item according to these when \c redo() and \c undo()
+ is called.
+ \o \c DiagramScene inherits QGraphicsScene and
+ emits signals for the \c MoveComands when an item is moved.
+ \o \c DiagramItem inherits QGraphicsPolygonItem and represents
+ an item in the diagram.
+ \endlist
+
+ \section1 MainWindow Class Definition
+
+ \snippet examples/tools/undoframework/mainwindow.h 0
+
+ The \c MainWindow class maintains the undo stack, i.e., it creates
+ \l{QUndoCommand}s and pushes and pops them from the stack when it
+ receives the \c triggered() signal from \c undoAction and \c
+ redoAction.
+
+ \section1 MainWindow Class Implementation
+
+ We will start with a look at the constructor:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 0
+
+ In the constructor, we set up the DiagramScene and QGraphicsView.
+
+ Here is the \c createUndoView() function:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 1
+
+ The QUndoView is a widget that display the text, which is set with
+ the \l{QUndoCommand::}{setText()} function, for each QUndoCommand
+ in the undo stack in a list.
+
+ Here is the \c createActions() function:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 2
+ \codeline
+ \snippet examples/tools/undoframework/mainwindow.cpp 3
+ \dots
+ \snippet examples/tools/undoframework/mainwindow.cpp 5
+
+ The \c createActions() function sets up all the examples actions
+ in the manner shown above. The
+ \l{QUndoStack::}{createUndoAction()} and
+ \l{QUndoStack::}{createRedoAction()} helps us crate actions that
+ are disabled and enabled based on the state of the stack. Also,
+ the text of the action will be updated automatically based on the
+ \l{QUndoCommand::}{text()} of the undo commands. For the other
+ actions we have implemented slots in the \c MainWindow class.
+
+ Here is the \c createMenus() function:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 6
+
+ \dots
+ \snippet examples/tools/undoframework/mainwindow.cpp 7
+ \dots
+ \snippet examples/tools/undoframework/mainwindow.cpp 8
+
+ We have to use the QMenu \c aboutToShow() and \c aboutToHide()
+ signals since we only want \c deleteAction to be enabled when we
+ have selected an item.
+
+ Here is the \c itemMoved() slot:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 9
+
+ We simply push a MoveCommand on the stack, which calls \c redo()
+ on it.
+
+ Here is the \c deleteItem() slot:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 10
+
+ An item must be selected to be deleted. We need to check if it is
+ selected as the \c deleteAction may be enabled even if an item is
+ not selected. This can happen as we do not catch a signal or event
+ when an item is selected.
+
+ Here is the \c itemMenuAboutToShow() and itemMenuAboutToHide() slots:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 11
+ \codeline
+ \snippet examples/tools/undoframework/mainwindow.cpp 12
+
+ We implement \c itemMenuAboutToShow() and \c itemMenuAboutToHide()
+ to get a dynamic item menu. These slots are connected to the
+ \l{QMenu::}{aboutToShow()} and \l{QMenu::}{aboutToHide()} signals.
+ We need this to disable or enable the \c deleteAction.
+
+ Here is the \c addBox() slot:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 13
+
+ The \c addBox() function creates an AddCommand and pushes it on
+ the undo stack.
+
+ Here is the \c addTriangle() sot:
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 14
+
+ The \c addTriangle() function creates an AddCommand and pushes it
+ on the undo stack.
+
+ Here is the implementation of \c about():
+
+ \snippet examples/tools/undoframework/mainwindow.cpp 15
+
+ The about slot is triggered by the \c aboutAction and displays an
+ about box for the example.
+
+ \section1 AddCommand Class Definition
+
+ \snippet examples/tools/undoframework/commands.h 2
+
+ The \c AddCommand class adds DiagramItem graphics items to the
+ DiagramScene.
+
+ \section1 AddCommand Class Implementation
+
+ We start with the constructor:
+
+ \snippet examples/tools/undoframework/commands.cpp 7
+
+ We first create the DiagramItem to add to the DiagramScene. The
+ \l{QUndoCommand::}{setText()} function let us set a QString that
+ describes the command. We use this to get custom messages in the
+ QUndoView and in the menu of the main window.
+
+ \snippet examples/tools/undoframework/commands.cpp 8
+
+ \c undo() removes the item from the scene. We need to update the
+ scene as ...(ask Andreas)
+
+ \snippet examples/tools/undoframework/commands.cpp 9
+
+ We set the position of the item as we do not do this in the
+ constructor.
+
+ \section1 DeleteCommand Class Definition
+
+ \snippet examples/tools/undoframework/commands.h 1
+
+ The DeleteCommand class implements the functionality to remove an
+ item from the scene.
+
+ \section1 DeleteCommand Class Implementation
+
+ \snippet examples/tools/undoframework/commands.cpp 4
+
+ We know that there must be one selected item as it is not possible
+ to create a DeleteCommand unless the item to be deleted is
+ selected and that only one item can be selected at any time.
+ The item must be unselected if it is inserted back into the
+ scene.
+
+ \snippet examples/tools/undoframework/commands.cpp 5
+
+ The item is simply reinserted into the scene.
+
+ \snippet examples/tools/undoframework/commands.cpp 6
+
+ The item is removed from the scene.
+
+ \section1 MoveCommand Class Definition
+
+ \snippet examples/tools/undoframework/commands.h 0
+
+ The \l{QUndoCommand::}{mergeWith()} is reimplemented to make
+ consecutive moves of an item one MoveCommand, i.e, the item will
+ be moved back to the start position of the first move.
+
+ \section1 MoveCommand Class Implementation
+
+
+ The constructor of MoveCommand looks like this:
+
+ \snippet examples/tools/undoframework/commands.cpp 0
+
+ We save both the old and new positions for undo and redo
+ respectively.
+
+ \snippet examples/tools/undoframework/commands.cpp 2
+
+ We simply set the items old position and update the scene.
+
+ \snippet examples/tools/undoframework/commands.cpp 3
+
+ We set the item to its new position.
+
+ \snippet examples/tools/undoframework/commands.cpp 1
+
+ Whenever a MoveCommand is created, this function is called to
+ check if it should be merged with the previous command. It is the
+ previous command object that is kept on the stack. The function
+ returns true if the command is merged; otherwise false.
+
+ We first check whether it is the same item that has been moved
+ twice, in which case we merge the commands. We update the position
+ of the item so that it will take the last position in the move
+ sequence when undone.
+
+ \section1 DiagramScene Class Definition
+
+ \snippet examples/tools/undoframework/diagramscene.h 0
+
+ The DiagramScene implements the functionality to move a
+ DiagramItem with the mouse. It emits a signal when a move is
+ completed. This is caught by the \c MainWindow, which makes
+ MoveCommands. We do not examine the implementation of DiagramScene
+ as it only deals with graphics framework issues.
+
+ \section1 The \c main() Function
+
+ The \c main() function of the program looks like this:
+
+ \snippet examples/tools/undoframework/main.cpp 0
+
+ We draw a grid in the background of the DiagramScene, so we use a
+ resource file. The rest of the function creates the \c MainWindow and
+ shows it as a top level window.
+*/
diff --git a/doc/src/examples/waitconditions.qdoc b/doc/src/examples/waitconditions.qdoc
new file mode 100644
index 0000000..dce0411
--- /dev/null
+++ b/doc/src/examples/waitconditions.qdoc
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example threads/waitconditions
+ \title Wait Conditions Example
+
+ The Wait Conditions example shows how to use QWaitCondition and
+ QMutex to control access to a circular buffer shared by a
+ producer thread and a consumer thread.
+
+ The producer writes data to the buffer until it reaches the end
+ of the buffer, at which point it restarts from the beginning,
+ overwriting existing data. The consumer thread reads the data as
+ it is produced and writes it to standard error.
+
+ Wait conditions make it possible to have a higher level of
+ concurrency than what is possible with mutexes alone. If accesses
+ to the buffer were simply guarded by a QMutex, the consumer
+ thread couldn't access the buffer at the same time as the
+ producer thread. Yet, there is no harm in having both threads
+ working on \e{different parts} of the buffer at the same time.
+
+ The example comprises two classes: \c Producer and \c Consumer.
+ Both inherit from QThread. The circular buffer used for
+ communicating between these two classes and the synchronization
+ tools that protect it are global variables.
+
+ An alternative to using QWaitCondition and QMutex to solve the
+ producer-consumer problem is to use QSemaphore. This is what the
+ \l{threads/semaphores}{Semaphores} example does.
+
+ \section1 Global Variables
+
+ Let's start by reviewing the circular buffer and the associated
+ synchronization tools:
+
+ \snippet examples/threads/waitconditions/waitconditions.cpp 0
+
+ \c DataSize is the amount of data that the producer will generate.
+ To keep the example as simple as possible, we make it a constant.
+ \c BufferSize is the size of the circular buffer. It is less than
+ \c DataSize, meaning that at some point the producer will reach
+ the end of the buffer and restart from the beginning.
+
+ To synchronize the producer and the consumer, we need two wait
+ conditions and one mutex. The \c bufferNotEmpty condition is
+ signalled when the producer has generated some data, telling the
+ consumer that it can start reading it. The \c bufferNotFull
+ condition is signalled when the consumer has read some data,
+ telling the producer that it can generate more. The \c numUsedBytes
+ is the number of bytes in the buffer that contain data.
+
+ Together, the wait conditions, the mutex, and the \c numUsedBytes
+ counter ensure that the producer is never more than \c BufferSize
+ bytes ahead of the consumer, and that the consumer never reads
+ data that the consumer hasn't generated yet.
+
+ \section1 Producer Class
+
+ Let's review the code for the \c Producer class:
+
+ \snippet examples/threads/waitconditions/waitconditions.cpp 1
+ \snippet examples/threads/waitconditions/waitconditions.cpp 2
+
+ The producer generates \c DataSize bytes of data. Before it
+ writes a byte to the circular buffer, it must first check whether
+ the buffer is full (i.e., \c numUsedBytes equals \c BufferSize).
+ If the buffer is full, the thread waits on the \c bufferNotFull
+ condition.
+
+ At the end, the producer increments \c numUsedBytes and signalls
+ that the condition \c bufferNotEmpty is true, since \c
+ numUsedBytes is necessarily greater than 0.
+
+ We guard all accesses to the \c numUsedBytes variable with a
+ mutex. In addition, the QWaitCondition::wait() function accepts a
+ mutex as its argument. This mutex is unlocked before the thread
+ is put to sleep and locked when the thread wakes up. Furthermore,
+ the transition from the locked state to the wait state is atomic,
+ to prevent race conditions from occurring.
+
+ \section1 Consumer Class
+
+ Let's turn to the \c Consumer class:
+
+ \snippet examples/threads/waitconditions/waitconditions.cpp 3
+ \snippet examples/threads/waitconditions/waitconditions.cpp 4
+
+ The code is very similar to the producer. Before we read the
+ byte, we check whether the buffer is empty (\c numUsedBytes is 0)
+ instead of whether it's full and wait on the \c bufferNotEmpty
+ condition if it's empty. After we've read the byte, we decrement
+ \c numUsedBytes (instead of incrementing it), and we signal the
+ \c bufferNotFull condition (instead of the \c bufferNotEmpty
+ condition).
+
+ \section1 The main() Function
+
+ In \c main(), we create the two threads and call QThread::wait()
+ to ensure that both threads get time to finish before we exit:
+
+ \snippet examples/threads/waitconditions/waitconditions.cpp 5
+ \snippet examples/threads/waitconditions/waitconditions.cpp 6
+
+ So what happens when we run the program? Initially, the producer
+ thread is the only one that can do anything; the consumer is
+ blocked waiting for the \c bufferNotEmpty condition to be
+ signalled (\c numUsedBytes is 0). Once the producer has put one
+ byte in the buffer, \c numUsedBytes is \c BufferSize - 1 and the
+ \c bufferNotEmpty condition is signalled. At that point, two
+ things can happen: Either the consumer thread takes over and
+ reads that byte, or the consumer gets to produce a second byte.
+
+ The producer-consumer model presented in this example makes it
+ possible to write highly concurrent multithreaded applications.
+ On a multiprocessor machine, the program is potentially up to
+ twice as fast as the equivalent mutex-based program, since the
+ two threads can be active at the same time on different parts of
+ the buffer.
+
+ Be aware though that these benefits aren't always realized.
+ Locking and unlocking a QMutex has a cost. In practice, it would
+ probably be worthwhile to divide the buffer into chunks and to
+ operate on chunks instead of individual bytes. The buffer size is
+ also a parameter that must be selected carefully, based on
+ experimentation.
+*/
diff --git a/doc/src/examples/wiggly.qdoc b/doc/src/examples/wiggly.qdoc
new file mode 100644
index 0000000..5406c77
--- /dev/null
+++ b/doc/src/examples/wiggly.qdoc
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/wiggly
+ \title Wiggly Example
+
+ The Wiggly example shows how to animate a widget using
+ QBasicTimer and \l{QObject::timerEvent()}{timerEvent()}. In
+ addition, the example demonstrates how to use QFontMetrics to
+ determine the size of text on screen.
+
+ \image wiggly-example.png Screenshot of the Wiggly example
+
+ QBasicTimer is a low-level class for timers. Unlike QTimer,
+ QBasicTimer doesn't inherit from QObject; instead of emitting a
+ \l{QTimer::timeout()}{timeout()} signal when a certain amount of
+ time has passed, it sends a QTimerEvent to a QObject of our
+ choice. This makes QBasicTimer a more lightweight alternative to
+ QTimer. Qt's built-in widgets use it internally, and it is
+ provided in Qt's API for highly-optimized applications (e.g.,
+ \l{Qt for Embedded Linux} applications).
+
+ The example consists of two classes:
+
+ \list
+ \o \c WigglyWidget is the custom widget displaying the text
+ in a wiggly line.
+
+ \o \c Dialog is the dialog widget allowing the user to enter a
+ text. It combines a \c WigglyWidget and a \c QLineEdit.
+ \endlist
+
+ We will first take a quick look at the \c Dialog class, then we
+ will review the \c WigglyWidget class.
+
+ \section1 Dialog Class Definition
+
+ \snippet examples/widgets/wiggly/dialog.h 0
+
+ The \c Dialog class provides a dialog widget that allows the user
+ to enter a text. The text is then rendered by \c WigglyWidget.
+
+ \section1 Dialog Class Implementation
+
+ \snippet examples/widgets/wiggly/dialog.cpp 0
+
+ In the constructor we create a wiggly widget along with a
+ \l{QLineEdit}{line edit}, and we put the two widgets in a
+ vertical layout. We connect the line edit's \l
+ {QLineEdit::textChanged()}{textChanged()} signal to the wiggly
+ widget's \c setText() slot to obtain the real time interaction
+ with the wiggly widget. The widget's default text is "Hello
+ world!".
+
+ \section1 WigglyWidget Class Definition
+
+ \snippet examples/widgets/wiggly/wigglywidget.h 0
+
+ The \c WigglyWidget class provides the wiggly line displaying the
+ text. We subclass QWidget and reimplement the standard \l
+ {QWidget::paintEvent()}{paintEvent()} and \l
+ {QObject::timerEvent()}{timerEvent()} functions to draw and update
+ the widget. In addition we implement a public \c setText() slot
+ that sets the widget's text.
+
+ The \c timer variable, of type QBasicTimer, is used to update the
+ widget at regular intervals, making the widget move. The \c text
+ variable is used to store the currently displayed text, and \c
+ step to calculate position and color for each character on the
+ wiggly line.
+
+ \section1 WigglyWidget Class Implementation
+
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 0
+
+ In the constructor, we make the widget's background slightly
+ lighter than the usual background using the QPalette::Midlight
+ color role. The background role defines the brush from the
+ widget's palette that Qt uses to paint the background. Then we
+ enlarge the widget's font with 20 points.
+
+ Finally we start the timer; the call to QBasicTimer::start()
+ makes sure that \e this particular wiggly widget will receive the
+ timer events generated when the timer times out (every 60
+ milliseconds).
+
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 1
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 2
+
+ The \c paintEvent() function is called whenever a QPaintEvent is
+ sent to the widget. Paint events are sent to widgets that need to
+ update themselves, for instance when part of a widget is exposed
+ because a covering widget was moved. For the wiggly widget, a
+ paint event will also be generated every 60 milliseconds from
+ the \c timerEvent() slot.
+
+ The \c sineTable represents y-values of the sine curve,
+ multiplied by 100. It is used to make the wiggly widget move
+ along the sine curve.
+
+ The QFontMetrics object provides information about the widget's
+ font. The \c x variable is the horizontal position where we start
+ drawing the text. The \c y variable is the vertical position of
+ the text's base line. Both variables are computed so that the
+ text is horizontally and vertically centered. To compute the base
+ line, we take into account the font's ascent (the height of the
+ font above the base line) and font's descent (the height of the
+ font below the base line). If the descent equals the ascent, they
+ cancel out each other and the base line is at \c height() / 2.
+
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 3
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 4
+
+ Each time the \c paintEvent() function is called, we create a
+ QPainter object \c painter to draw the contents of the widget.
+ For each character in \c text, we determine the color and the
+ position on the wiggly line based on \c step. In addition, \c x
+ is incremented by the character's width.
+
+ For simplicity, we assume that QFontMetrics::width(\c text)
+ returns the sum of the individual character widths
+ (QFontMetrics::width(\c text[i])). In practice, this is not
+ always the case because QFontMetrics::width(\c text) also takes
+ into account the kerning between certain letters (e.g., 'A' and
+ 'V'). The result is that the text isn't perfectly centered. You
+ can verify this by typing "AVAVAVAVAVAV" in the line edit.
+
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 5
+ \snippet examples/widgets/wiggly/wigglywidget.cpp 6
+
+ The \c timerEvent() function receives all the timer events that
+ are generated for this widget. If a timer event is sent from the
+ widget's QBasicTimer, we increment \c step to make the text move,
+ and call QWidget::update() to refresh the display. Any other
+ timer event is passed on to the base class's implementation of
+ the \l{QWidget::timerEvent()}{timerEvent()} function.
+
+ The QWidget::update() slot does not cause an immediate repaint;
+ instead the slot schedules a paint event for processing when Qt
+ returns to the main event loop. The paint events are then handled
+ by \c{WigglyWidget}'s \c paintEvent() function.
+*/
diff --git a/doc/src/examples/windowflags.qdoc b/doc/src/examples/windowflags.qdoc
new file mode 100644
index 0000000..b25206e
--- /dev/null
+++ b/doc/src/examples/windowflags.qdoc
@@ -0,0 +1,230 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/windowflags
+ \title Window Flags Example
+
+ The Window Flags example shows how to use the window flags
+ available in Qt.
+
+ A window flag is either a type or a hint. A type is used to
+ specify various window-system properties for the widget. A widget
+ can only have one type, and the default is Qt::Widget. However, a
+ widget can have zero or more hints. The hints are used to
+ customize the appearance of top-level windows.
+
+ A widget's flags are stored in a Qt::WindowFlags type which stores
+ an OR combination of the flags.
+
+ \image windowflags-example.png Screenshot of the Window Flags example
+
+ The example consists of two classes:
+
+ \list
+ \o \c ControllerWindow is the main application widget that allows
+ the user to choose among the available window flags, and displays
+ the effect on a separate preview window.
+ \o \c PreviewWindow is a custom widget displaying the name of
+ its currently set window flags in a read-only text editor.
+ \endlist
+
+ We will start by reviewing the \c ControllerWindow class, then we
+ will take a look at the \c PreviewWindow class.
+
+ \section1 ControllerWindow Class Definition
+
+ \snippet examples/widgets/windowflags/controllerwindow.h 0
+
+ The \c ControllerWindow class inherits QWidget. The widget allows
+ the user to choose among the available window flags, and displays
+ the effect on a separate preview window.
+
+ We declare a private \c updatePreview() slot to refresh the
+ preview window whenever the user changes the window flags.
+
+ We also declare several private functions to simplify the
+ constructor: We call the \c createTypeGroupBox() function to
+ create a radio button for each available window type, using the
+ private \c createButton() function, and gather them within a group
+ box. In a similar way we use the \c createHintsGroupBox() function
+ to create a check box for each available hint, using the private
+ \c createCheckBox() function.
+
+ In addition to the various radio buttons and checkboxes, we need
+ an associated \c PreviewWindow to show the effect of the currently
+ chosen window flags.
+
+ \image windowflags_controllerwindow.png Screenshot of the Controller Window
+
+ \section1 ControllerWindow Class Implementation
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 0
+
+ In the constructor we first create the preview window. Then we
+ create the group boxes containing the available window flags using
+ the private \c createTypeGroupBox() and \c createHintsGroupBox()
+ functions. In addition we create a \gui Quit button. We put the
+ button and a stretchable space in a separate layout to make the
+ button appear in the \c WindowFlag widget's right bottom corner.
+
+ Finally, we add the button's layout and the two goup boxes to a
+ QVBoxLayout, set the window title and refresh the preview window
+ using the \c updatePreview() slot.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 1
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 2
+
+ The \c updatePreview() slot is called whenever the user changes
+ any of the window flags. First we create an empty Qt::WindowFlags
+ \c flags, then we determine which one of the types that is checked
+ and add it to \c flags.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 3
+
+ We also determine which of the hints that are checked, and add
+ them to \c flags using an OR operator. We use \c flags to set the
+ window flags for the preview window.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 4
+
+ We adjust the position of the preview window. The reason we do
+ that, is that playing around with the window's frame may on some
+ platforms cause the window's position to be changed behind our
+ back. If a window is located in the upper left corner of the
+ screen, parts of the window may not be visible. So we adjust the
+ widget's position to make sure that, if this happens, the window
+ is moved within the screen's boundaries. Finally, we call
+ QWidget::show() to make sure the preview window is visible.
+
+ \omit
+ \skipto pos
+ \printuntil /^\}/
+ \endomit
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 5
+
+ The private \c createTypeGroupBox() function is called from the
+ constructor.
+
+ First we create a group box, and then we create a radio button
+ (using the private \c createRadioButton() function) for each of
+ the available types among the window flags. We make Qt::Window the
+ initially applied type. We put the radio buttons into a
+ QGridLayout and install the layout on the group box.
+
+ We do not include the default Qt::Widget type. The reason is that
+ it behaves somewhat different than the other types. If the type is
+ not specified for a widget, and it has no parent, the widget is a
+ window. However, if it has a parent, it is a standard child
+ widget. The other types are all top-level windows, and since the
+ hints only affect top-level windows, we abandon the Qt::Widget
+ type.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 6
+
+ The private \c createHintsGroupBox() function is also called from
+ the constructor.
+
+ Again, the first thing we do is to create a group box. Then we
+ create a checkbox, using the private \c createCheckBox() function,
+ for each of the available hints among the window flags. We put the
+ checkboxes into a QGridLayout and install the layout on the group
+ box.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 7
+
+ The private \c createCheckBox() function is called from \c
+ createHintsGroupBox().
+
+ We simply create a QCheckBox with the provided text, connect it to
+ the private \c updatePreview() slot, and return a pointer to the
+ checkbox.
+
+ \snippet examples/widgets/windowflags/controllerwindow.cpp 8
+
+ In the private \c createRadioButton() function it is a
+ QRadioButton we create with the provided text, and connect to the
+ private \c updatePreview() slot. The function is called from \c
+ createTypeGroupBox(), and returns a pointer to the button.
+
+ \section1 PreviewWindow Class Definition
+
+ \snippet examples/widgets/windowflags/previewwindow.h 0
+
+ The \c PreviewWindow class inherits QWidget. It is a custom widget
+ that displays the names of its currently set window flags in a
+ read-only text editor. It is also provided with a QPushbutton that
+ closes the window.
+
+ We reimplement the constructor to create the \gui Close button and
+ the text editor, and the QWidget::setWindowFlags() function to
+ display the names of the window flags.
+
+ \image windowflags_previewwindow.png Screenshot of the Preview Window
+
+ \section1 PreviewWindow Class Implementation
+
+ \snippet examples/widgets/windowflags/previewwindow.cpp 0
+
+ In the constructor, we first create a QTextEdit and make sure that
+ it is read-only.
+
+ We also prohibit any line wrapping in the text editor using the
+ QTextEdit::setLineWrapMode() function. The result is that a
+ horizontal scrollbar appears when a window flag's name exceeds the
+ width of the editor. This is a reasonable solution since we
+ construct the displayed text with built-in line breaks. If no line
+ breaks were guaranteed, using another QTextEdit::LineWrapMode
+ would perhaps make more sense.
+
+ Then we create the \gui Close button, and put both the widgets
+ into a QVBoxLayout before we set the window title.
+
+ \snippet examples/widgets/windowflags/previewwindow.cpp 1
+
+ In our reimplementation of the \c setWindowFlags() function, we
+ first set the widgets flags using the QWidget::setWindowFlags()
+ function. Then we run through the available window flags, creating
+ a text that contains the names of the flags that matches the \c
+ flags parameter. Finally, we display the text in the widgets text
+ editor.
+*/
diff --git a/doc/src/examples/worldtimeclockbuilder.qdoc b/doc/src/examples/worldtimeclockbuilder.qdoc
new file mode 100644
index 0000000..644ffdb
--- /dev/null
+++ b/doc/src/examples/worldtimeclockbuilder.qdoc
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/worldtimeclockbuilder
+ \title World Time Clock Builder Example
+
+ The World Time Clock Builder example shows how forms created with Qt
+ Designer that contain custom widgets can be dynamically generated at
+ run-time.
+
+ \image worldtimeclockbuilder-example.png
+
+ This example uses a form containing the custom widget plugin described in the
+ \l{designer/worldtimeclockplugin}{World Time Clock Plugin} example, and
+ dynamically generates a user interface using the QUiLoader class, part of
+ the QtUiTools module.
+
+ \section1 Preparation
+
+ As with the \l{designer/calculatorbuilder}{Calculator Builder} example, the
+ project file for this example needs to include the appropriate definitions
+ to ensure that it is built against the required Qt modules.
+
+ \snippet examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro 0
+
+ By appending \c form to the \c CONFIG declaration, we instruct \c qmake to
+ generate a dependency on the \c libQtUiTools library containing the QtUiTools
+ classes.
+
+ Note that we do not inform \c qmake about any .ui files, and so none will
+ be processed and built into the application. The resource file contains
+ an entry for the particular form that we wish to use:
+
+ \quotefile examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc
+
+ Forms do not need to be included with the application in this way. We only
+ include a form in the application's resources for convenience, and to keep
+ the example short.
+
+ \section1 Loading and Building the Form
+
+ Since this example only loads and displays a pre-prepared form, all of the
+ work can be done in the main() function. We are using a class from the
+ QtUiTools library so, in addition to any other Qt classes that are normally
+ required to write an application, we must include the appropriate header
+ file:
+
+ \snippet examples/designer/worldtimeclockbuilder/main.cpp 0
+
+ The main function initializes the resource system with the Q_INIT_RESOURCE()
+ macro and constructs an QApplication instance in the usual way:
+
+ \snippet examples/designer/worldtimeclockbuilder/main.cpp 1
+
+ We construct a QUiLoader object to handle the form we want to use.
+
+ The form itself is obtained from the resource file system using the path
+ defined in the resource file. We use the form loader to load and construct
+ the form:
+
+ \snippet examples/designer/worldtimeclockbuilder/main.cpp 2
+
+ Once the form has been loaded, the resource file can be closed and the
+ widget is shown.
+
+ \snippet examples/designer/worldtimeclockbuilder/main.cpp 3
+
+ The form loader ensures that all the signal and slot connections between
+ objects in the form are set up correctly when the form is loaded. As a
+ result, the time is updated by the World Time Clock widget, and the time
+ zone spin box can be used to change the position of the hour hand.
+*/
diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc
new file mode 100644
index 0000000..072b1f0
--- /dev/null
+++ b/doc/src/examples/worldtimeclockplugin.qdoc
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example designer/worldtimeclockplugin
+ \title World Time Clock Plugin Example
+
+ The World Time Clock Plugin example shows how to create a custom
+ widget plugin for \QD that uses signals and slots.
+
+ \image worldtimeclockplugin-example.png
+
+ In this example, we simply extend the \l
+ {designer/customwidgetplugin}{Custom Widget Plugin} example and
+ its custom widget (based on the \l{widgets/analogclock}{Analog
+ Clock} example), by introducing the concept of signals and slots.
+
+ The World Time Clock Plugin example consists of two classes:
+
+ \list
+ \o \c WorldTimeClock is a custom clock widget with hour and
+ minute hands that is automatically updated every few seconds.
+ \o \c WorldTimeClockPlugin exposes the \c WorldTimeClock class to \QD.
+ \endlist
+
+ First we will take a look at the \c WorldTimeClock class which
+ extends the \l {designer/customwidgetplugin}{Custom Widget Plugin}
+ example's \c AnalogClock class by providing a signal and a
+ slot. Then we will take a quick look at the \c
+ WorldTimeClockPlugin class, but this class is in most parts
+ identical to the \l {designer/customwidgetplugin}{Custom Widget
+ Plugin} example's implementation.
+
+ Finally we take a look at the plugin's project file. The project
+ file for custom widget plugins needs some additional information
+ to ensure that they will work within \QD. This is also covered in
+ the \l {designer/customwidgetplugin}{Custom Widget Plugin} example,
+ but due to its importance (custom widget plugins rely on
+ components supplied with \QD which must be specified in the
+ project file that we use) we will repeat it here.
+
+ \section1 WorldTimeClock Class
+
+ The \c WorldTimeClock class inherits QWidget, and is a custom
+ clock widget with hour and minute hands that is automatically
+ updated every few seconds. What makes this example different from
+ the \l {designer/customwidgetplugin}{Custom Widget Plugin}
+ example, is the introduction of the signal and slot in the custom
+ widget class:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 1
+
+ Note the use of the QDESIGNER_WIDGET_EXPORT macro. This is needed
+ to ensure that \QD can create instances of the widget on some
+ platforms, but it is a good idea to use it on all platforms.
+
+ We declare the \c setTimeZone() slot with an associated \c
+ timeZoneOffset variable, and we declare an \c updated() signal
+ which takes the current time as argument and is emitted whenever
+ the widget is repainted.
+
+ \image worldtimeclock-connection.png
+
+ In \QD's workspace we can then, for example, connect the \c
+ WorldTimeClock widget's \c updated() signal to a QTimeEdit's \l
+ {QDateTimeEdit::setTime()}{setTime()} slot using \QD's mode
+ for editing signal and slots.
+
+ \image worldtimeclock-signalandslot.png
+
+ We can also connect a QSpinBox's \l
+ {QSpinBox::valueChanged()}{valueChanged()} signal to the \c
+ WorldTimeClock's \c setTimeZone() slot.
+
+ \section1 WorldTimeClockPlugin Class
+
+ The \c WorldTimeClockPlugin class exposes the \c WorldTimeClock
+ class to \QD. Its definition is equivalent to the \l
+ {designer/customwidgetplugin}{Custom Widget Plugin} example's
+ plugin class which is explained in detail. The only part of the
+ class definition that is specific to this particular custom widget
+ is the class name:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.h 0
+
+ The plugin class provides \QD with basic information about our
+ plugin, such as its class name and its include file. Furthermore
+ it knows how to create instances of the \c WorldTimeClockPlugin
+ widget. \c WorldTimeClockPlugin also defines the \l
+ {QDesignerCustomWidgetInterface::initialize()}{initialize()}
+ function which is called after the plugin is loaded into \QD. The
+ function's QDesignerFormEditorInterface parameter provides the
+ plugin with a gateway to all of \QD's API's.
+
+ The \c WorldTimeClockPlugin class inherits from both QObject and
+ QDesignerCustomWidgetInterface. It is important to remember, when
+ using multiple inheritance, to ensure that all the interfaces
+ (i.e. the classes that doesn't inherit Q_OBJECT) are made known to
+ the meta object system using the Q_INTERFACES() macro. This
+ enables \QD to use \l qobject_cast() to query for supported
+ interfaces using nothing but a QObject pointer.
+
+ The implementation of the \c WorldTimeClockPlugin is also
+ equivalent to the plugin interface implementation in the \l
+ {designer/customwidgetplugin}{Custom Widget Plugin} example (only
+ the class name and the implementation of
+ QDesignerCustomWidgetInterface::domXml() differ). The main thing
+ to remember is to use the Q_EXPORT_PLUGIN2() macro to export the \c
+ WorldTimeClockPlugin class for use with \QD:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp 0
+
+ Without this macro, there is no way for Qt Designer to use the
+ widget.
+
+ \section1 The Project File: worldtimeclockplugin.pro
+
+ The project file for custom widget plugins needs some additional
+ information to ensure that they will work as expected within \QD:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro 0
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro 1
+
+ The \c TEMPLATE variable's value make \c qmake create the custom
+ widget as a library. The \c CONFIG variable contains two values,
+ \c designer and \c plugin:
+
+ \list
+ \o \c designer: Since custom widgets plugins rely on components
+ supplied with \QD, this value ensures that our plugin links against
+ \QD's library (\c libQtDesigner.so).
+
+ \o \c plugin: We also need to ensure that \c qmake considers the
+ custom widget a \e plugin library.
+ \endlist
+
+ When Qt is configured to build in both debug and release modes,
+ \QD will be built in release mode. When this occurs, it is
+ necessary to ensure that plugins are also built in release
+ mode. For that reason you might have to add a \c release value to
+ your \c CONFIG variable. Otherwise, if a plugin is built in a mode
+ that is incompatible with \QD, it won't be loaded and
+ installed.
+
+ The header and source files for the widget are declared in the
+ usual way, and in addition we provide an implementation of the
+ plugin interface so that \QD can use the custom widget.
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro 2
+
+ It is important to ensure that the plugin is installed in a location that
+ is searched by \QD. We do this by specifying a target path for the project
+ and adding it to the list of items to install:
+
+ \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc 0
+
+ The custom widget is created as a library, and will be installed
+ alongside the other \QD plugins when the project is installed
+ (using \c{make install} or an equivalent installation procedure).
+ Later, we will ensure that it is recognized as a plugin by \QD by
+ using the Q_EXPORT_PLUGIN2() macro to export the relevant widget
+ information.
+
+ Note that if you want the plugins to appear in a Visual Studio
+ integration, the plugins must be built in release mode and their
+ libraries must be copied into the plugin directory in the install
+ path of the integration (for an example, see \c {C:/program
+ files/trolltech as/visual studio integration/plugins}).
+
+ For more information about plugins, see the \l {How to Create Qt
+ Plugins} document.
+*/
diff --git a/doc/src/examples/xmlstreamlint.qdoc b/doc/src/examples/xmlstreamlint.qdoc
new file mode 100644
index 0000000..925a7a0
--- /dev/null
+++ b/doc/src/examples/xmlstreamlint.qdoc
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/xmlstreamlint
+ \title XML Stream Lint Example
+
+ The XML Stream Lint example provides a simple command line utility that
+ accepts a file name as its single argument and writes it to the standard
+ output file.
+
+ The specified file is parsed using an QXmlStreamReader object and written
+ to the standard output file using an QXmlStreamWriter object. If the file
+ does not contain a well-formed XML document or the use of namespaces in
+ the document is incorrect, a description of the error is printed to
+ the standard error file and will appear in the console.
+
+ \section1 Basic Operation
+
+ The main function of the example opens the file specified by the user
+ for input (\c inputFile), and it uses QFile to access the standard output
+ file.
+
+ Reading XML is handled by an instance of the QXmlStreamReader class, which
+ operates on the input file object; writing is handled by an instance of
+ QXmlStreamWriter operating on the output file object:
+
+ \snippet examples/xml/xmlstreamlint/main.cpp 0
+
+ The work of parsing and rewriting the XML is done in a while loop, and is
+ driven by input from the reader:
+
+ \snippet examples/xml/xmlstreamlint/main.cpp 1
+
+ If more input is available, the next token from the input file is read
+ and parsed. If an error occurred, information is written to the standard
+ error file via a stream, and the example exits by returning a non-zero
+ value from the main function.
+
+ \snippet examples/xml/xmlstreamlint/main.cpp 2
+
+ For valid input, the writer is fed the current token from the reader,
+ and this is written to the output file that was specified when it was
+ constructed.
+
+ When there is no more input, the loop terminates, and the example can
+ exit successfully.
+*/
diff --git a/doc/src/exportedfunctions.qdoc b/doc/src/exportedfunctions.qdoc
new file mode 100644
index 0000000..f67950c
--- /dev/null
+++ b/doc/src/exportedfunctions.qdoc
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page exportedfunctions.html
+ \title Special-Purpose Global Functions Exported by Qt
+ \ingroup classlists
+
+ Qt provides a few low-level global functions for fine-tuning
+ applications. Most of these perform very specific tasks and are
+ platform-specific. In general, we recommend that you try using
+ Qt's public API before resorting to using any functions mentioned
+ here.
+
+ These functions are exported by \l QtCore and \l QtGui, but most
+ of them aren't declared in Qt's header files. To use them in your
+ application, you must declare them before calling them. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_exportedfunctions.qdoc 0
+
+ These functions will remain as part of Qt for the lifetime of Qt
+ 4.
+
+ Functions:
+
+ \tableofcontents
+
+ \section1 void qt_set_library_config_file(const QString &\e{fileName})
+
+ Specifies the location of the Qt configuration file. You must
+ call this function before constructing a QApplication or
+ QCoreApplication object. If no location is specified, Qt
+ automatically finds an appropriate location.
+
+ \section1 void qt_set_sequence_auto_mnemonic(bool \e{enable})
+
+ Specifies whether mnemonics for menu items, labels, etc., should
+ be honored or not. On Windows and X11, this feature is
+ on by default; on Mac OS X, it is off. When this feature is off,
+ the QKeySequence::mnemonic() function always returns an empty
+ string. This feature is also enabled on embedded Linux.
+
+ \section1 void qt_x11_wait_for_window_manager(QWidget *\e{widget})
+
+ Blocks until the X11 window manager has shown the widget after a
+ call to QWidget::show().
+
+ \section1 void qt_mac_secure_keyboard(bool \e{enable})
+
+ Turns the Mac OS X secure keyboard feature on or off. QLineEdit
+ uses this when the echo mode is QLineEdit::Password or
+ QLineEdit::NoEcho to guard the editor against keyboard sniffing.
+ If you implement your own password editor, you might want to turn
+ on this feature in your editor's
+ \l{QWidget::focusInEvent()}{focusInEvent()} and turn it off in
+ \l{QWidget::focusOutEvent()}{focusOutEvent()}.
+
+ \section1 void qt_mac_set_dock_menu(QMenu *\e{menu})
+
+ Sets the menu to display in the Mac OS X Dock for the
+ application. This menu is shown when the user attempts a
+ press-and-hold operation on the application's dock icon or
+ \key{Ctrl}-clicks on it while the application is running.
+
+ The menu will be turned into a Mac menu and the items added to the default
+ Dock menu. There is no merging of the Qt menu items with the items that are
+ in the Dock menu (i.e., it is not recommended to include actions that
+ duplicate functionality of items already in the Dock menu).
+
+ \section1 void qt_mac_set_menubar_icons(bool \e{enable})
+
+ Specifies whether icons associated to menu items for the
+ application's menu bar should be shown on Mac OS X. By default,
+ icons are shown on Mac OS X just like on the other platforms.
+
+ In Qt 4.4, this is equivalent to
+ \c { QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus); }.
+
+ \section1 void qt_mac_set_menubar_merge(bool \e{enable})
+
+ Specifies whether Qt should attempt to relocate standard menu
+ items (such as \gui Quit, \gui Preferences, and \gui About) to
+ the application menu on Mac OS X. This feature is on by default.
+ See \l{Qt for Mac OS X - Specific Issues} for the list of menu items for
+ which this applies.
+
+ \section1 void qt_mac_set_native_menubar(bool \e{enable})
+
+ Specifies whether the application should use the native menu bar
+ on Mac OS X or be part of the main window. This feature is on by
+ default.
+
+ \section1 void qt_mac_set_press_and_hold_context(bool \e{enable})
+
+ Turns emulation of the right mouse button by clicking and holding
+ the left mouse button on or off. This feature is off by default.
+*/
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
new file mode 100644
index 0000000..f48c3d7
--- /dev/null
+++ b/doc/src/external-resources.qdoc
@@ -0,0 +1,349 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \externalpage http://www.freedesktop.org/
+ \title freedesktop.org
+*/
+
+/*!
+ \externalpage http://www.freedesktop.org/Standards/xembed-spec
+ \title XEmbed Specification
+*/
+
+/*!
+ \externalpage http://www.freedesktop.org/Standards/icon-theme-spec
+ \title Icon Themes Specification
+*/
+
+/*!
+ \externalpage http://www.cups.org/
+ \title Common Unix Printing System (CUPS)
+ \keyword CUPS
+*/
+
+/*!
+ \externalpage http://www.freedesktop.org/wiki/Standards_2fdesktop_2dentry_2dspec
+ \title Desktop Entry Specification
+*/
+
+/*!
+ \externalpage http://www.kde.org/
+ \title The K Desktop Environment
+ \keyword KDE
+*/
+
+/*!
+ \externalpage http://www.gnome.org/
+ \title GNOME
+*/
+
+/*!
+ \externalpage http://www.gnu.org/software/emacs/
+ \title GNU Emacs
+*/
+
+/*!
+ \externalpage http://www.amnesty.org/
+ \title Amnesty International
+*/
+
+/*!
+ \externalpage http://www.w3.org/Graphics/SVG/About.html
+ \title About SVG
+ \keyword Scalable Vector Graphics
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/SVG/types.html#ColorKeywords
+ \title SVG color keyword names
+*/
+
+/*!
+ \externalpage http://www.w3.org/Graphics/SVG/
+ \title SVG Working Group
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/SVGMobile/
+ \title Mobile SVG Profiles
+ \omit
+ Mobile SVG Profiles: SVG Tiny and SVG Basic
+ \endomit
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/SVGMobile12/
+ \title SVG 1.2 Tiny
+*/
+
+/*!
+ \externalpage http://www.w3.org/Graphics/SVG/feature/1.2/#SVG-static
+ \title SVG 1.2 Tiny Static Features
+*/
+
+/*!
+ \externalpage http://www.ietf.org/rfc/rfc1179.txt
+ \title RFC 1179
+ \keyword lpr
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc1738.txt
+ \title RFC 1738
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc1928.txt
+ \title RFC 1928
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc1929.txt
+ \title RFC 1929
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc2045.txt
+ \title RFC 2045
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc2109.txt
+ \title RFC 2109
+ HTTP State Management Mechanism
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc2965.txt
+ \title RFC 2965
+ HTTP State Management Mechanism
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc3174.txt
+ \title RFC 3174
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc3491.txt
+ \title RFC 3491
+*/
+
+/*!
+ \externalpage http://www.rfc-editor.org/rfc/rfc3986.txt
+ \title RFC 3986
+*/
+
+/*!
+ \externalpage http://www.dependencywalker.com/
+ \title Dependency Walker
+*/
+
+/*!
+ \externalpage http://www.ecma-international.org/publications/standards/Ecma-262.htm
+ \title ECMA-262
+*/
+
+/*!
+ \externalpage http://www.davidflanagan.com/javascript5/
+ \title JavaScript: The Definitive Guide
+*/
+
+/*!
+ \externalpage http://webkit.org/
+ \title WebKit Open Source Project
+*/
+
+/*!
+ \externalpage http://www.informit.com/store/product.aspx?isbn=0132354160
+ \title C++ GUI Programming with Qt 4, 2nd Edition
+*/
+
+/*!
+ \externalpage http://www.openssl.org/
+ \title OpenSSL Toolkit
+*/
+
+/*!
+ \externalpage http://arora-browser.org/
+ \title Arora Browser
+*/
+
+/*!
+ \externalpage http://www.activestate.com/Products/activeperl/index.mhtml
+ \title ActivePerl
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/html401/
+ \title HTML 4
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/html5/
+ \title HTML 5
+*/
+
+/*!
+ \externalpage http://pyxml.sourceforge.net/topics/xbel/
+ \title XML Bookmark Exchange Language Resource Page
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/xquery/#errors
+ \title error handling in the XQuery language
+*/
+
+/*!
+ \externalpage http://xaos.sourceforge.net/
+ \title XaoS
+*/
+
+/*!
+ \externalpage http://www.unixodbc.org
+ \title http://www.unixodbc.org
+*/
+
+/*!
+ \externalpage http://www.postgresql.org
+ \title http://www.postgresql.org
+*/
+
+/*!
+ \externalpage http://www.postgresql.org/docs/faqs.FAQ_MINGW.html
+ \title Compiling PostgreSQL On Native Win32 FAQ
+*/
+
+/*!
+ \externalpage http://www.freetds.org
+ \title http://www.freetds.org
+*/
+
+/*!
+ \externalpage http://www.sybase.com
+ \title http://www.sybase.com
+*/
+
+/*!
+ \externalpage http://linux.sybase.com
+ \title http://linux.sybase.com
+*/
+
+/*!
+ \externalpage http://www.sqlite.org
+ \title http://www.sqlite.org
+*/
+
+/*!
+ \externalpage http://www.amazon.com/exec/obidos/ASIN/0134436989/trolltech/t
+ \title Threads Primer: A Guide to Multithreaded Programming
+*/
+
+/*!
+ \externalpage http://www.amazon.com/exec/obidos/ASIN/0131900676/trolltech/t
+ \title Thread Time: The Multithreaded Programming Guide
+*/
+
+/*!
+ \externalpage http://www.amazon.com/exec/obidos/ASIN/1565921151/trolltech/t
+ \title Pthreads Programming: A POSIX Standard for Better Multiprocessing
+*/
+
+/*!
+ \externalpage http://www.amazon.com/exec/obidos/ASIN/1565922964/trolltech/t
+ \title Win32 Multithreaded Programming
+*/
+
+/*!
+ \externalpage http://www.iana.org/assignments/character-sets
+ \title IANA character-sets encoding file
+*/
+
+/*!
+ \externalpage http://www.phptr.com/content/images/0131872494/samplechapter/blanchette_ch10.pdf
+ \title "Item View Classes" Chapter of C++ GUI Programming with Qt 4
+*/
+
+/*!
+ \externalpage http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIntro/chapter_1_section_1.html
+ \title Mac OS X Aqua
+*/
+
+/*!
+ \externalpage http://www.kdedevelopers.org/node/2345
+ \title KDE applications
+*/
+
+/*!
+ \externalpage http://cgi.netscape.com/newsref/std/cookie_spec.html
+ \title Netscape Cookie Specification
+*/
+
+/*!
+ \externalpage http://msdn.microsoft.com/en-us/library/ms533046(VS.85).aspx
+ \title Mitigating Cross-site Scripting With HTTP-only Cookies
+*/
+
+/*!
+ \externalpage http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html
+ \title Framebuffer HOWTO
+*/
+
+/*!
+ \externalpage http://wap.trafikanten.no
+ \title Trafikanten
+*/
+
+/*!
+ \externalpage http://www.gnu.org/licenses/gpl.html
+ \title GNU General Public License
+*/
+
+/*!
+ \externalpage http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
+ \title GNU Lesser General Public License, version 2.1
+*/
+
+/*!
+ \externalpage http://developers.sun.com/sunstudio/downloads/patches/index.jsp
+ \title Sun Studio Patches
+*/
diff --git a/doc/src/focus.qdoc b/doc/src/focus.qdoc
new file mode 100644
index 0000000..defb3e0
--- /dev/null
+++ b/doc/src/focus.qdoc
@@ -0,0 +1,213 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation of focus handling in Qt.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page focus.html
+ \title Keyboard Focus
+ \ingroup architecture
+ \ingroup gui-programming
+ \brief An overview of the keyboard focus management and handling.
+
+ \keyword keyboard focus
+
+ Qt's widgets handle keyboard focus in the ways that have become
+ customary in GUIs.
+
+ The basic issue is that the user's key strokes can be directed at any
+ of several windows on the screen, and any of several widgets inside
+ the intended window. When the user presses a key, they expect it to go
+ to the right place, and the software must try to meet this
+ expectation. The system must determine which application the key stroke
+ is directed at, which window within that application, and which widget
+ within that window.
+
+ \section1 Focus Motion
+
+ The customs which have evolved for directing keyboard focus to a
+ particular widget are these:
+
+ \list 1
+
+ \o The user presses \key Tab (or \key Shift+Tab).
+ \o The user clicks a widget.
+ \o The user presses a keyboard shortcut.
+ \o The user uses the mouse wheel.
+ \o The user moves the focus to a window, and the application must
+ determine which widget within the window should get the focus.
+ \endlist
+
+ Each of these motion mechanisms is different, and different types of
+ widgets receive focus in only some of them. We'll cover each of them
+ in turn.
+
+ \section2 Tab or Shift+Tab
+
+ Pressing \key Tab is by far the most common way to move focus
+ using the keyboard. (Sometimes in data-entry applications Enter
+ does the same as \key{Tab}; this can easily be achieved in Qt by
+ implementing an \l{Events and Event Filters}{event filter}.)
+
+ Pressing \key Tab, in all window systems in common use today,
+ moves the keyboard focus to the next widget in a circular
+ per-window list. \key Tab moves focus along the circular list in
+ one direction, \key Shift+Tab in the other. The order in which
+ \key Tab presses move from widget to widget is called the tab order.
+
+ You can customize the tab order using QWidget::setTabOrder(). (If
+ you don't, \key Tab generally moves focus in the order of widget
+ construction.) \l{Qt Designer} provides a means of visually
+ changing the tab order.
+
+ Since pressing \key Tab is so common, most widgets that can have focus
+ should support tab focus. The major exception is widgets that are
+ rarely used, and where there is some keyboard accelerator or error
+ handler that moves the focus.
+
+ For example, in a data entry dialog, there might be a field that
+ is only necessary in one per cent of all cases. In such a dialog,
+ \key Tab could skip this field, and the dialog could use one of
+ these mechanisms:
+
+ \list 1
+
+ \o If the program can determine whether the field is needed, it can
+ move focus there when the user finishes entry and presses \gui OK, or when
+ the user presses Enter after finishing the other fields. Alternately,
+ include the field in the tab order but disable it. Enable it if it
+ becomes appropriate in view of what the user has set in the other
+ fields.
+
+ \o The label for the field can include a keyboard shortcut that moves
+ focus to this field.
+
+ \endlist
+
+ Another exception to \key Tab support is text-entry widgets that
+ must support the insertion of tabs; almost all text editors fall
+ into this class. Qt treats \key Ctrl+Tab as \key Tab and \key
+ Ctrl+Shift+Tab as \key Shift+Tab, and such widgets can
+ reimplement QWidget::event() and handle Tab before calling
+ QWidget::event() to get normal processing of all other keys.
+ However, since some systems use \key Ctrl+Tab for other purposes,
+ and many users aren't aware of \key Ctrl+Tab anyway, this isn't a
+ complete solution.
+
+ \section2 The User Clicks a Widget
+
+ This is perhaps even more common than pressing \key Tab on
+ computers with a mouse or other pointing device.
+
+ Clicking to move the focus is slightly more powerful than \key
+ Tab. While it moves the focus \e to a widget, for editor widgets
+ it also moves the text cursor (the widget's internal focus) to
+ the spot where the mouse is clicked.
+
+ Since it is so common and people are used to it, it's a good idea to
+ support it for most widgets. However, there is also an important
+ reason to avoid it: you may not want to remove focus from the widget
+ where it was.
+
+ For example, in a word processor, when the user clicks the 'B' (bold)
+ tool button, what should happen to the keyboard focus? Should it
+ remain where it was, almost certainly in the editing widget, or should
+ it move to the 'B' button?
+
+ We advise supporting click-to-focus for widgets that support text
+ entry, and to avoid it for most widgets where a mouse click has a
+ different effect. (For buttons, we also recommend adding a keyboard
+ shortcut: QAbstractButton and its subclasses make this very easy.)
+
+ In Qt, only the QWidget::setFocusPolicy() function affects
+ click-to-focus.
+
+ \section2 The User Presses a Keyboard Shortcut
+
+ It's not unusual for keyboard shortcuts to move the focus. This
+ can happen implicitly by opening modal dialogs, but also
+ explicitly using focus accelerators such as those provided by
+ QLabel::setBuddy(), QGroupBox, and QTabBar.
+
+ We advise supporting shortcut focus for all widgets that the user
+ may want to jump to. For example, a tab dialog can have keyboard
+ shortcuts for each of its pages, so the user can press e.g. \key
+ Alt+P to step to the \underline{P}rinting page. It is easy to
+ overdo this: there are only a few keys, and it's also important
+ to provide keyboard shortcuts for commands. \key Alt+P is also
+ used for Paste, Play, Print, and Print Here in the \l{Standard
+ Accelerator Keys} list, for example.
+
+ \section2 The User Rotates the Mouse Wheel
+
+ On Microsoft Windows, mouse wheel usage is always handled by the
+ widget that has keyboard focus. On Mac OS X and X11, it's handled by
+ the widget that gets other mouse events.
+
+ The way Qt handles this platform difference is by letting widgets move
+ the keyboard focus when the wheel is used. With the right focus policy
+ on each widget, applications can work idiomatically correctly on
+ Windows, Mac OS X, and X11.
+
+ \section2 The User Moves the Focus to This Window
+
+ In this situation the application must determine which widget within
+ the window should receive the focus.
+
+ This can be simple: If the focus has been in this window before,
+ then the last widget to have focus should regain it. Qt does this
+ automatically.
+
+ If focus has never been in this window before and you know where
+ focus should start out, call QWidget::setFocus() on the widget
+ which should receive focus before you call QWidget::show() it. If
+ you don't, Qt will pick a suitable widget.
+*/
diff --git a/doc/src/functions.qdoc b/doc/src/functions.qdoc
new file mode 100644
index 0000000..4aa0851
--- /dev/null
+++ b/doc/src/functions.qdoc
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Documentation for class overview.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page functions.html
+ \title Member Function Index
+ \ingroup classlists
+
+ Here is the list of all the documented member functions in the Qt
+ API with links to the class documentation for each function.
+
+ \generatelist functionindex
+*/
diff --git a/doc/src/gallery-cde.qdoc b/doc/src/gallery-cde.qdoc
new file mode 100644
index 0000000..36916a2
--- /dev/null
+++ b/doc/src/gallery-cde.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-cde.html
+
+ \title CDE Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "cde" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.
+\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cde-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cde-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-cleanlooks.qdoc b/doc/src/gallery-cleanlooks.qdoc
new file mode 100644
index 0000000..7ae5385
--- /dev/null
+++ b/doc/src/gallery-cleanlooks.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-cleanlooks.html
+
+ \title Cleanlooks Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "cleanlooks" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage cleanlooks-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-gtk.qdoc b/doc/src/gallery-gtk.qdoc
new file mode 100644
index 0000000..8251f04
--- /dev/null
+++ b/doc/src/gallery-gtk.qdoc
@@ -0,0 +1,358 @@
+/*!
+ \page gallery-gtk.html
+
+ \title GTK Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "gtk" style.
+
+ Take a look at the \l{Qt Widget Gallery} to see how Qt
+ applications appear in other styles.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-toolbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-frame.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage gtk-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td align="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td align="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage gtk-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-macintosh.qdoc b/doc/src/gallery-macintosh.qdoc
new file mode 100644
index 0000000..608713d
--- /dev/null
+++ b/doc/src/gallery-macintosh.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-macintosh.html
+
+ \title Macintosh Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "macintosh" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage macintosh-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage macintosh-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-motif.qdoc b/doc/src/gallery-motif.qdoc
new file mode 100644
index 0000000..79c44b1
--- /dev/null
+++ b/doc/src/gallery-motif.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-motif.html
+
+ \title Motif Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "motif" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage motif-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage motif-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-plastique.qdoc b/doc/src/gallery-plastique.qdoc
new file mode 100644
index 0000000..b184ea8
--- /dev/null
+++ b/doc/src/gallery-plastique.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-plastique.html
+
+ \title Plastique Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "plastique" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage plastique-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage plastique-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-windows.qdoc b/doc/src/gallery-windows.qdoc
new file mode 100644
index 0000000..40ba7ce
--- /dev/null
+++ b/doc/src/gallery-windows.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-windows.html
+
+ \title Windows Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "windows" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windows-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windows-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-windowsvista.qdoc b/doc/src/gallery-windowsvista.qdoc
new file mode 100644
index 0000000..1ad8823
--- /dev/null
+++ b/doc/src/gallery-windowsvista.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-windowsvista.html
+
+ \title Windows Vista Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "windowsvista" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsvista-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsvista-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery-windowsxp.qdoc b/doc/src/gallery-windowsxp.qdoc
new file mode 100644
index 0000000..dcb8e82
--- /dev/null
+++ b/doc/src/gallery-windowsxp.qdoc
@@ -0,0 +1,392 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page gallery-windowsxp.html
+
+ \title Windows XP Style Widget Gallery
+ \ingroup gallery
+
+ This page shows some of the widgets available in Qt
+ when configured to use the "windowsxp" style.
+
+\raw HTML
+<h2 align="center">Buttons</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-pushbutton.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-toolbutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QPushButton widget provides a command button.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-checkbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-radiobutton.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QCheckBox widget provides a checkbox with a text label.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Containers</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-groupbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-tabwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QGroupBox widget provides a group box frame with a title.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTabWidget class provides a stack of tabbed widgets.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-frame.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-toolbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFrame widget provides a simple decorated container for other widgets.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QToolBox class provides a column of tabbed widget items.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Item Views</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-listview.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-treeview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-tableview.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Display Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-progressbar.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-lcdnumber.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QProgressBar widget provides a horizontal progress bar.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLCDNumber widget displays a number with LCD-like digits.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-label.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QLabel widget provides a text or image display.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+\raw HTML
+<h2 align="center">Input Widgets</h2>
+
+<table align="center" cellspacing="20%" width="100%">
+<colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+</colgroup>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-slider.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-lineedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSlider widget provides a vertical or horizontal slider.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QLineEdit widget is a one-line text editor.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-combobox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-doublespinbox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QComboBox widget is a combined button and pop-up list.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-spinbox.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-timeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QSpinBox class provides a spin box widget.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QTimeEdit class provides a widget for editing times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-dateedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-datetimeedit.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDateEdit class provides a widget for editing dates.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-textedit.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-horizontalscrollbar.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QTextEdit class provides a widget that is used to edit and
+ display both plain and rich text.\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-dial.png
+\raw HTML
+</td>
+<td align="center">
+\endraw
+\inlineimage windowsxp-calendarwidget.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QDial class provides a rounded range control (like a
+ speedometer or potentiometer).\raw HTML
+</td>
+<td halign="justify" valign="top">
+\endraw
+The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML
+</td>
+</tr>
+<tr>
+<td align="center">
+\endraw
+\inlineimage windowsxp-fontcombobox.png
+\raw HTML
+</td>
+</tr><tr>
+<td halign="justify" valign="top">
+\endraw
+The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML
+</td>
+</tr>
+</table>
+\endraw
+*/
diff --git a/doc/src/gallery.qdoc b/doc/src/gallery.qdoc
new file mode 100644
index 0000000..dc9f732
--- /dev/null
+++ b/doc/src/gallery.qdoc
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group gallery
+ \title Qt Widget Gallery
+ \ingroup topics
+ \brief Qt widgets shown in different styles on various platforms.
+
+ Qt's support for widget styles and themes enables your application to fit in
+ with the native desktop enviroment. Below, you can find links to the various
+ widget styles that are supplied with Qt 4.
+
+ \raw HTML
+ <table align="center" cellspacing="20%" width="100%">
+ <colgroup span="2">
+ <col width="40%" />
+ <col width="40%" />
+ </colgroup>
+ <tr>
+ <td align="center">
+ \endraw
+ \image plastique-tabwidget.png Plastique Style Widget Gallery
+
+ \bold{\l{Plastique Style Widget Gallery}}
+
+ The Plastique style is provided by QPlastiqueStyle.
+ \raw HTML
+ </td>
+ <td align="center">
+ \endraw
+ \image windowsxp-tabwidget.png Windows XP Style Widget Gallery
+
+ \bold{\l{Windows XP Style Widget Gallery}}
+
+ The Windows XP style is provided by QWindowsXPStyle.
+ \raw HTML
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ \endraw
+ \image gtk-tabwidget.png GTK Style Widget Gallery
+
+ \bold{\l{GTK Style Widget Gallery}}
+
+ The GTK style is provided by QGtkStyle.
+ \raw HTML
+ </td>
+ <td align="center">
+ \endraw
+ \image macintosh-tabwidget.png Macintosh Style Widget Gallery
+
+ \bold{\l{Macintosh Style Widget Gallery}}
+
+ The Macintosh style is provided by QMacStyle.
+ \raw HTML
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ \endraw
+ \image cleanlooks-tabwidget.png Cleanlooks Style Widget Gallery
+
+ \bold{\l{Cleanlooks Style Widget Gallery}}
+
+ The Cleanlooks style is provided by QCleanlooksStyle.
+ \raw HTML
+ </td>
+ <td align="center">
+ \endraw
+ \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery
+
+ \bold{\l{Windows Vista Style Widget Gallery}}
+
+ The Windows Vista style is provided by QWindowsVistaStyle.
+ \raw HTML
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ \endraw
+ \image motif-tabwidget.png Motif Style Widget Gallery
+
+ \bold{\l{Motif Style Widget Gallery}}
+
+ The Motif style is provided by QMotifStyle.
+ \raw HTML
+ </td>
+ <td align="center">
+ \endraw
+ \image windows-tabwidget.png Windows Style Widget Gallery
+
+ \bold{\l{Windows Style Widget Gallery}}
+
+ The Windows style is provided by QWindowsStyle.
+ \raw HTML
+ </td>
+ </tr>
+ <tr>
+ <td align="center">
+ \endraw
+ \image cde-tabwidget.png CDE Style Widget Gallery
+
+ \bold{\l{CDE Style Widget Gallery}}
+
+ The Common Desktop Environment style is provided by QCDEStyle.
+ \raw HTML
+ </td>
+ </tr>
+ </table>
+ \endraw
+*/
diff --git a/doc/src/geometry.qdoc b/doc/src/geometry.qdoc
new file mode 100644
index 0000000..b17aa39
--- /dev/null
+++ b/doc/src/geometry.qdoc
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page geometry.html
+ \title Window Geometry
+ \ingroup architecture
+ \brief An overview of window geometry handling and management.
+
+ QWidget provides several functions that deal with a widget's
+ geometry. Some of these functions operate on the pure client area
+ (i.e. the window excluding the window frame), others include the
+ window frame. The differentiation is done in a way that covers the
+ most common usage transparently.
+
+ \list
+ \o \bold{Including the window frame:}
+ \l{QWidget::x()}{x()},
+ \l{QWidget::y()}{y()},
+ \l{QWidget::frameGeometry()}{frameGeometry()},
+ \l{QWidget::pos()}{pos()}, and
+ \l{QWidget::move()}{move()}.
+ \o \bold{Excluding the window frame:}
+ \l{QWidget::geometry()}{geometry()},
+ \l{QWidget::width()}{width()},
+ \l{QWidget::height()}{height()},
+ \l{QWidget::rect()}{rect()}, and
+ \l{QWidget::size()}{size()}.
+ \endlist
+
+ Note that the distinction only matters for decorated top-level
+ widgets. For all child widgets, the frame geometry is equal to the
+ widget's client geometry.
+
+ This diagram shows most of the functions in use:
+ \img geometry.png Geometry diagram
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 X11 Peculiarities
+
+ On X11, a window does not have a frame until the window manager
+ decorates it. This happens asynchronously at some point in time
+ after calling QWidget::show() and the first paint event the
+ window receives, or it does not happen at all. Bear in mind that
+ X11 is policy-free (others call it flexible). Thus you cannot
+ make any safe assumption about the decoration frame your window
+ will get. Basic rule: There's always one user who uses a window
+ manager that breaks your assumption, and who will complain to
+ you.
+
+ Furthermore, a toolkit cannot simply place windows on the screen. All
+ Qt can do is to send certain hints to the window manager. The window
+ manager, a separate process, may either obey, ignore or misunderstand
+ them. Due to the partially unclear Inter-Client Communication
+ Conventions Manual (ICCCM), window placement is handled quite
+ differently in existing window managers.
+
+ X11 provides no standard or easy way to get the frame geometry
+ once the window is decorated. Qt solves this problem with nifty
+ heuristics and clever code that works on a wide range of window
+ managers that exist today. Don't be surprised if you find one
+ where QWidget::frameGeometry() returns wrong results though.
+
+ Nor does X11 provide a way to maximize a window.
+ QWidget::showMaximized() has to emulate the feature. Its result
+ depends on the result of QWidget::frameGeometry() and the
+ capability of the window manager to do proper window placement,
+ neither of which can be guaranteed.
+
+ \section1 Restoring a Window's Geometry
+
+ Since version 4.2, Qt provides functions that saves and restores a
+ window's geometry and state for you. QWidget::saveGeometry()
+ saves the window geometry and maximized/fullscreen state, while
+ QWidget::restoreGeometry() restores it. The restore function also
+ checks if the restored geometry is outside the available screen
+ geometry, and modifies it as appropriate if it is.
+
+ The rest of this document describes how to save and restore the
+ geometry using the geometry properties. On Windows, this is
+ basically storing the result of QWidget::geometry() and calling
+ QWidget::setGeometry() in the next session before calling
+ \l{QWidget::show()}{show()}. On X11, this won't work because an
+ invisible window doesn't have a frame yet. The window manager
+ will decorate the window later. When this happens, the window
+ shifts towards the bottom/right corner of the screen depending on
+ the size of the decoration frame. Although X provides a way to
+ avoid this shift, most window managers fail to implement this
+ feature.
+
+ A workaround is to call \l{QWidget::setGeometry()}{setGeometry()}
+ after \l{QWidget::show()}{show()}. This has the two disadvantages
+ that the widget appears at a wrong place for a millisecond
+ (results in flashing) and that currently only every second window
+ manager gets it right. A safer solution is to store both
+ \l{QWidget::pos()}{pos()} and \l{QWidget::size()}{size()} and to
+ restore the geometry using \l{QWidget::resize()} and
+ \l{QWidget::move()}{move()} before calling
+ \l{QWidget::show()}{show()}, as demonstrated in the following
+ code snippets (from the \l{mainwindows/application}{Application}
+ example):
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 35
+ \codeline
+ \snippet examples/mainwindows/application/mainwindow.cpp 38
+
+ This method works on Windows, Mac OS X, and most X11 window
+ managers.
+*/
diff --git a/doc/src/gpl.qdoc b/doc/src/gpl.qdoc
new file mode 100644
index 0000000..e423171
--- /dev/null
+++ b/doc/src/gpl.qdoc
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*! \page gpl.html
+\title GNU General Public License (GPL)
+\ingroup licensing
+\brief About the GPL license used for Qt.
+
+The Qt GUI Toolkit is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+Contact: Qt Software Information (qt-info@nokia.com)
+
+Qt is available under the GPL.
+
+\section1 The GNU General Public License (Version 3)
+
+Reference: \l{GNU General Public License}
+
+\snippet doc/src/snippets/code/doc_src_gpl.qdoc GPL v3
+*/
+
+/*! \page lgpl.html
+\title GNU Lesser General Public License (LGPL)
+\ingroup licensing
+\brief About the LGPL license used for Qt.
+
+The Qt GUI Toolkit is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+Contact: Qt Software Information (qt-info@nokia.com)
+
+Qt is available under the LGPL.
+
+\section1 The GNU Lesser General Public License (Version 2.1)
+
+Reference: \l{GNU Lesser General Public License, version 2.1}
+
+\snippet doc/src/snippets/code/doc_src_lgpl.qdoc LGPL v2.1
+
+\section1 Nokia Qt LGPL Exception version 1.0
+
+As a special exception to the GNU Lesser General Public License version 2.1,
+the object code form of a "work that uses the Library" may incorporate material
+from a header file that is part of the Library. You may distribute such object
+code under terms of your choice, provided that the incorporated material
+(i) does not exceed more than 5% of the total size of the Library; and
+(ii) is limited to numerical parameters, data structure layouts, accessors,
+macros, inline functions and templates.
+*/
diff --git a/doc/src/graphicsview.qdoc b/doc/src/graphicsview.qdoc
new file mode 100644
index 0000000..049b0c3
--- /dev/null
+++ b/doc/src/graphicsview.qdoc
@@ -0,0 +1,544 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page graphicsview.html
+ \title The Graphics View Framework
+ \ingroup architecture
+ \ingroup multimedia
+ \brief An overview of the Graphics View framework for interactive 2D
+ graphics.
+
+ \keyword Graphics View
+ \keyword GraphicsView
+ \keyword Graphics
+ \keyword Canvas
+ \since 4.2
+
+ Graphics View provides a surface for managing and interacting with a large
+ number of custom-made 2D graphical items, and a view widget for
+ visualizing the items, with support for zooming and rotation.
+
+ The framework includes an event propagation architecture that allows
+ precise double-precision interaction capabilities for the items on the
+ scene. Items can handle key events, mouse press, move, release and
+ double click events, and they can also track mouse movement.
+
+ Graphics View uses a BSP (Binary Space Partitioning) tree to provide very
+ fast item discovery, and as a result of this, it can visualize large
+ scenes in real-time, even with millions of items.
+
+ Graphics View was introduced in Qt 4.2, replacing its predecessor,
+ QCanvas. If you are porting from QCanvas, see \l{Porting to Graphics
+ View}.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 The Graphics View Architecture
+
+ Graphics View provides an item-based approach to model-view programming,
+ much like InterView's convenience classes QTableView, QTreeView and
+ QListView. Several views can observe a single scene, and the scene
+ contains items of varying geometric shapes.
+
+ \section2 The Scene
+
+ QGraphicsScene provides the Graphics View scene. The scene has the
+ following responsibilities:
+
+ \list
+ \o Providing a fast interface for managing a large number of items
+ \o Propagating events to each item
+ \o Managing item state, such as selection and focus handling
+ \o Providing untransformed rendering functionality; mainly for printing
+ \endlist
+
+ The scene serves as a container for QGraphicsItem objects. Items are
+ added to the scene by calling QGraphicsScene::addItem(), and then
+ retrieved by calling one of the many item discovery functions.
+ QGraphicsScene::items() and its overloads return all items contained
+ by or intersecting with a point, a rectangle, a polygon or a general
+ vector path. QGraphicsScene::itemAt() returns the topmost item at a
+ particular point. All item discovery functions return the items in
+ descending stacking order (i.e., the first returned item is topmost,
+ and the last item is bottom-most).
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 0
+
+ QGraphicsScene's event propagation architecture schedules scene events
+ for delivery to items, and also manages propagation between items. If
+ the scene receives a mouse press event at a certain position, the
+ scene passes the event on to whichever item is at that position.
+
+ QGraphicsScene also manages certain item states, such as item
+ selection and focus. You can select items on the scene by calling
+ QGraphicsScene::setSelectionArea(), passing an arbitrary shape. This
+ functionality is also used as a basis for rubberband selection in
+ QGraphicsView. To get the list of all currently selected items, call
+ QGraphicsScene::selectedItems(). Another state handled by
+ QGraphicsScene is whether or not an item has keyboard input focus. You
+ can set focus on an item by calling QGraphicsScene::setFocusItem() or
+ QGraphicsItem::setFocus(), or get the current focus item by calling
+ QGraphicsScene::focusItem().
+
+ Finally, QGraphicsScene allows you to render parts of the scene into a
+ paint device through the QGraphicsScene::render() function. You can
+ read more about this in the Printing section later in this document.
+
+ \section2 The View
+
+ QGraphicsView provides the view widget, which visualizes the contents
+ of a scene. You can attach several views to the same scene, to provide
+ several viewports into the same data set. The view widget is a scroll
+ area, and provides scroll bars for navigating through large scenes. To
+ enable OpenGL support, you can set a QGLWidget as the viewport by
+ calling QGraphicsView::setViewport().
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 1
+
+ The view receives input events from the keyboard and mouse, and
+ translates these to scene events (converting the coordinates used
+ to scene coordinates where appropriate), before sending the events
+ to the visualized scene.
+
+ Using its transformation matrix, QGraphicsView::matrix(), the view can
+ \e transform the scene's coordinate system. This allows advanced
+ navigation features such as zooming and rotation. For convenience,
+ QGraphicsView also provides functions for translating between view and
+ scene coordinates: QGraphicsView::mapToScene() and
+ QGraphicsView::mapFromScene().
+
+ \img graphicsview-view.png
+
+ \section2 The Item
+
+ QGraphicsItem is the base class for graphical items in a
+ scene. Graphics View provides several standard items for typical
+ shapes, such as rectangles (QGraphicsRectItem), ellipses
+ (QGraphicsEllipseItem) and text items (QGraphicsTextItem), but the
+ most powerful QGraphicsItem features are available when you write a
+ custom item. Among other things, QGraphicsItem supports the following
+ features:
+
+ \list
+ \o Mouse press, move, release and double click events, as well as mouse
+ hover events, wheel events, and context menu events.
+ \o Keyboard input focus, and key events
+ \o Drag and drop
+ \o Grouping, both through parent-child relationships, and with
+ QGraphicsItemGroup
+ \o Collision detection
+ \endlist
+
+ Items live in a local coordinate system, and like QGraphicsView, it
+ also provides many functions for mapping coordinates between the item
+ and the scene, and from item to item. Also, like QGraphicsView, it can
+ transform its coordinate system using a matrix:
+ QGraphicsItem::matrix(). This is useful for rotating and scaling
+ individual items.
+
+ Items can contain other items (children). Parent items'
+ transformations are inherited by all its children. Regardless of an
+ item's accumulated transformation, though, all its functions (e.g.,
+ QGraphicsItem::contains(), QGraphicsItem::boundingRect(),
+ QGraphicsItem::collidesWith()) still operate in local coordinates.
+
+ QGraphicsItem supports collision detection through the
+ QGraphicsItem::shape() function, and QGraphicsItem::collidesWith(),
+ which are both virtual functions. By returning your item's shape as a
+ local coordinate QPainterPath from QGraphicsItem::shape(),
+ QGraphicsItem will handle all collision detection for you. If you want
+ to provide your own collision detection, however, you can reimplement
+ QGraphicsItem::collidesWith().
+
+ \img graphicsview-items.png
+
+ \section1 The Graphics View Coordinate System
+
+ Graphics View is based on the Cartesian coordinate system; items'
+ position and geometry on the scene are represented by sets of two
+ numbers: the x-coordinate, and the y-coordinate. When observing a scene
+ using an untransformed view, one unit on the scene is represented by
+ one pixel on the screen.
+
+ There are three effective coordinate systems in play in Graphics View:
+ Item coordinates, scene coordinates, and view coordinates. To simplify
+ your implementation, Graphics View provides convenience functions that
+ allow you to map between the three coordinate systems.
+
+ When rendering, Graphics View's scene coordinates correspond to
+ QPainter's \e logical coordinates, and view coordinates are the same as
+ \e device coordinates. In \l{The Coordinate System}, you can read about
+ the relationship between logical coordinates and device coordinates.
+
+ \img graphicsview-parentchild.png
+
+ \section2 Item Coordinates
+
+ Items live in their own local coordinate system. Their coordinates
+ are usually centered around its center point (0, 0), and this is
+ also the center for all transformations. Geometric primitives in the
+ item coordinate system are often referred to as item points, item
+ lines, or item rectangles.
+
+ When creating a custom item, item coordinates are all you need to
+ worry about; QGraphicsScene and QGraphicsView will perform all
+ transformations for you. This makes it very easy to implement custom
+ items. For example, if you receive a mouse press or a drag enter
+ event, the event position is given in item coordinates. The
+ QGraphicsItem::contains() virtual function, which returns true if a
+ certain point is inside your item, and false otherwise, takes a
+ point argument in item coordinates. Similarly, an item's bounding
+ rect and shape are in item coordinates.
+
+ At item's \e position is the coordinate of the item's center point
+ in its parent's coordinate system; sometimes referred to as \e
+ parent coordinates. The scene is in this sense regarded as all
+ parent-less items' "parent". Top level items' position are in scene
+ coordinates.
+
+ Child coordinates are relative to the parent's coordinates. If the
+ child is untransformed, the difference between a child coordinate
+ and a parent coordinate is the same as the distance between the
+ items in parent coordinates. For example: If an untransformed child
+ item is positioned precisely in its parent's center point, then the
+ two items' coordinate systems will be identical. If the child's
+ position is (10, 0), however, the child's (0, 10) point will
+ correspond to its parent's (10, 10) point.
+
+ Because items' position and transformation are relative to the
+ parent, child items' coordinates are unaffected by the parent's
+ transformation, although the parent's transformation implicitly
+ transforms the child. In the above example, even if the parent is
+ rotated and scaled, the child's (0, 10) point will still correspond
+ to the parent's (10, 10) point. Relative to the scene, however, the
+ child will follow the parent's transformation and position. If the
+ parent is scaled (2x, 2x), the child's position will be at scene
+ coordinate (20, 0), and its (10, 0) point will correspond to the
+ point (40, 0) on the scene.
+
+ With QGraphicsItem::pos() being one of the few exceptions,
+ QGraphicsItem's functions operate in item coordinates, regardless of
+ the item, or any of its parents' transformation. For example, an
+ item's bounding rect (i.e. QGraphicsItem::boundingRect()) is always
+ given in item coordinates.
+
+ \section2 Scene Coordinates
+
+ The scene represents the base coordinate system for all its items.
+ The scene coordinate system describes the position of each top-level
+ item, and also forms the basis for all scene events delivered to the
+ scene from the view. Each item on the scene has a scene position
+ and bounding rectangle (QGraphicsItem::scenePos(),
+ QGraphicsItem::sceneBoundingRect()), in addition to its local item
+ pos and bounding rectangle. The scene position describes the item's
+ position in scene coordinates, and its scene bounding rect forms the
+ basis for how QGraphicsScene determines what areas of the scene have
+ changed. Changes in the scene are communicated through the
+ QGraphicsScene::changed() signal, and the argument is a list of
+ scene rectangles.
+
+ \section2 View Coordinates
+
+ View coordinates are the coordinates of the widget. Each unit in
+ view coordinates corresponds to one pixel. What's special about this
+ coordinate system is that it is relative to the widget, or viewport,
+ and unaffected by the observed scene. The top left corner of
+ QGraphicsView's viewport is always (0, 0), and the bottom right
+ corner is always (viewport width, viewport height). All mouse events
+ and drag and drop events are originally received as view
+ coordinates, and you need to map these coordinates to the scene in
+ order to interact with items.
+
+ \section2 Coordinate Mapping
+
+ Often when dealing with items in a scene, it can be useful to map
+ coordinates and arbitrary shapes from the scene to an item, from
+ item to item, or from the view to the scene. For example, when you
+ click your mouse in QGraphicsView's viewport, you can ask the scene
+ what item is under the cursor by calling
+ QGraphicsView::mapToScene(), followed by
+ QGraphicsScene::itemAt(). If you want to know where in the viewport
+ an item is located, you can call QGraphicsItem::mapToScene() on the
+ item, then QGraphicsView::mapFromScene() on the view. Finally, if
+ you use want to find what items are inside a view ellipse, you can
+ pass a QPainterPath to mapToScene(), and then pass the mapped path
+ to QGraphicsScene::items().
+
+ You can map coordinates and shapes to and from and item's scene by
+ calling QGraphicsItem::mapToScene() and
+ QGraphicsItem::mapFromScene(). You can also map to an item's parent
+ item by calling QGraphicsItem::mapToParent() and
+ QGraphicsItem::mapFromParent(), or between items by calling
+ QGraphicsItem::mapToItem() and QGraphicsItem::mapFromItem(). All
+ mapping functions can map both points, rectangles, polygons and
+ paths.
+
+ The same mapping functions are available in the view, for mapping to
+ and from the scene. QGraphicsView::mapFromScene() and
+ QGraphicsView::mapToScene(). To map from a view to an item, you
+ first map to the scene, and then map from the scene to the item.
+
+ \section1 Key Features
+
+ \section2 Zooming and rotating
+
+ QGraphicsView supports the same affine transformations as QPainter
+ does through QGraphicsView::setMatrix(). By applying a transformation
+ to the view, you can easily add support for common navigation features
+ such as zooming and rotating.
+
+ Here is an example of how to implement zoom and rotate slots in a
+ subclass of QGraphicsView:
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 2
+
+ The slots could be connected to \l{QToolButton}{QToolButtons} with
+ \l{QAbstractButton::autoRepeat}{autoRepeat} enabled.
+
+ QGraphicsView keeps the center of the view aligned when you transform
+ the view.
+
+ See also the \l{Elastic Nodes Example}{Elastic Nodes} example for
+ code that shows how to implement basic zooming features.
+
+ \section2 Printing
+
+ Graphics View provides single-line printing through its rendering
+ functions, QGraphicsScene::render() and QGraphicsView::render(). The
+ functions provide the same API: You can have the scene or the view
+ render all or parts of their contents into any paint device by passing
+ a QPainter to either of the rendering functions. This example shows
+ how to print the whole scene into a full page, using QPrinter.
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 3
+
+ The difference between the scene and view rendering functions is that
+ one operates in scene coordinates, and the other in view coordinates.
+ QGraphicsScene::render() is often preferred for printing whole
+ segments of a scene untransformed, such as for plotting geometrical
+ data, or for printing a text document. QGraphicsView::render(), on the
+ other hand, is suitable for taking screenshots; its default behavior
+ is to render the exact contents of the viewport using the provided
+ painter.
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 4
+
+ When the source and target areas' sizes do not match, the source
+ contents are stretched to fit into the target area. By passing a
+ Qt::AspectRatioMode to the rendering function you are using, you can
+ choose to maintain or ignore the aspect ratio of the scene when the
+ contents are stretched.
+
+ \section2 Drag and Drop
+
+ Because QGraphicsView inherits QWidget indirectly, it already provides
+ the same drag and drop functionality that QWidget provides. In
+ addition, as a convenience, the Graphics View framework provides drag
+ and drop support for the scene, and for each and every item. As the
+ view receives a drag, it translates the drag and drop events into a
+ QGraphicsSceneDragDropEvent, which is then forwarded to the scene. The
+ scene takes over scheduling of this event, and sends it to the first
+ item under the mouse cursor that accepts drops.
+
+ To start a drag from an item, create a QDrag object, passing a pointer
+ to the widget that starts the drag. Items can be observed by many
+ views at the same time, but only one view can start the drag. Drags
+ are in most cases started as a result of pressing or moving the mouse,
+ so in mousePressEvent() or mouseMoveEvent(), you can get the
+ originating widget pointer from the event. For example:
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 5
+
+ To intercept drag and drop events for the scene, you reimplement
+ QGraphicsScene::dragEnterEvent() and whichever event handlers your
+ particular scene needs, in a QGraphicsItem subclass. You can read more
+ about drag and drop in Graphics View in the documentation for each of
+ QGraphicsScene's event handlers.
+
+ Items can enable drag and drop support by calling
+ QGraphicsItem::setAcceptDrops(). To handle the incoming drag,
+ reimplement QGraphicsItem::dragEnterEvent(),
+ QGraphicsItem::dragMoveEvent(), QGraphicsItem::dragLeaveEvent(), and
+ QGraphicsItem::dropEvent().
+
+ See also the \l{Drag and Drop Robot Example}{Drag and Drop Robot} example
+ for a demonstration of Graphics View's support for drag and drop
+ operations.
+
+ \section2 Cursors and Tooltips
+
+ Like QWidget, QGraphicsItem also supports cursors
+ (QGraphicsItem::setCursor()), and tooltips
+ (QGraphicsItem::setToolTip()). The cursors and tooltips are activated
+ by QGraphicsView as the mouse cursor enters the item's area (detected
+ by calling QGraphicsItem::contains()).
+
+ You can also set a default cursor directly on the view by calling
+ QGraphicsView::setCursor().
+
+ See also the \l{Drag and Drop Robot Example}{Drag and Drop Robot}
+ example for code that implements tooltips and cursor shape handling.
+
+ \section2 Animation
+
+ Graphics View supports animation at several levels. You can easily
+ assemble animation paths by associating a QGraphicsItemAnimation with
+ your item. This allows timeline controlled animations that operate at
+ a steady speed on all platforms (although the frame rate may vary
+ depending on the platform's performance). QGraphicsItemAnimation
+ allows you to create a path for an item's position, rotation, scale,
+ shear and translation. The animation can be controlled by a QSlider,
+ or more commonly by QTimeLine.
+
+ Another option is to create a custom item that inherits from QObject
+ and QGraphicsItem. The item can the set up its own timers, and control
+ animations with incremental steps in QObject::timerEvent().
+
+ A third option, which is mostly available for compatibility with
+ QCanvas in Qt 3, is to \e advance the scene by calling
+ QGraphicsScene::advance(), which in turn calls
+ QGraphicsItem::advance().
+
+ See also the \l{Drag and Drop Robot Example}{Drag and Drop Robot}
+ example for an illustration of timeline-based animation techniques.
+
+ \section2 OpenGL Rendering
+
+ To enable OpenGL rendering, you simply set a new QGLWidget as the
+ viewport of QGraphicsView by calling QGraphicsView::setViewport(). If
+ you want OpenGL with antialiasing, you need OpenGL sample buffer
+ support (see QGLFormat::sampleBuffers()).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 6
+
+ \section2 Item Groups
+
+ By making an item a child of another, you can achieve the most
+ essential feature of item grouping: the items will move together, and
+ all transformations are propagated from parent to child. QGraphicsItem
+ can also handle all events for its children (see
+ QGraphicsItem::setHandlesChildEvents()). This allows the parent item
+ to act on behalf of its children, effectively treating all items as
+ one.
+
+ In addition, QGraphicsItemGroup is a special item that combines child
+ event handling with a useful interface for adding and removing items
+ to and from a group. Adding an item to a QGraphicsItemGroup will keep
+ the item's original position and transformation, whereas reparenting
+ items in general will cause the child to reposition itself relative to
+ its new parent. For convenience, you can create
+ \l{QGraphicsItemGroup}s through the scene by calling
+ QGraphicsScene::createItemGroup().
+
+ \section2 Widgets and Layouts
+
+ Qt 4.4 introduced support for geometry and layout-aware items through
+ QGraphicsWidget. This special base item is similar to QWidget, but
+ unlike QWidget, it doesn't inherit from QPaintDevice; rather from
+ QGraphicsItem instead. This allows you to write complete widgets with
+ events, signals & slots, size hints and policies, and you can also
+ manage your widgets geometries in layouts through
+ QGraphicsLinearLayout and QGraphicsGridLayout.
+
+ \section3 QGraphicsWidget
+
+ Building on top of QGraphicsItem's capabilities and lean footprint,
+ QGraphicsWidget provides the best of both worlds: extra
+ functionality from QWidget, such as the style, font, palette, layout
+ direction, and its geometry, and resolution independence and
+ transformation support from QGraphicsItem. Because Graphics View
+ uses real coordinates instead of integers, QGraphicsWidget's
+ geometry functions also operate on QRectF and QPointF. This also
+ applies to frame rects, margins and spacing. With QGraphicsWidget
+ it's not uncommon to specify contents margins of (0.5, 0.5, 0.5,
+ 0.5), for example. You can create both subwidgets and "top-level"
+ windows; in some cases you can now use Graphics View for advanced
+ MDI applications.
+
+ Some of QWidget's properties are supported, including window flags
+ and attributes, but not all. You should refer to QGraphicsWidget's
+ class documentation for a complete overview of what is and what is
+ not supported. For example, you can create decorated windows by
+ passing the Qt::Window window flag to QGraphicsWidget's constructor,
+ but Graphics View currently doesn't support the Qt::Sheet and
+ Qt::Drawer flags that are common on Mac OS X.
+
+ The capabilities of QGraphicsWidget are expected to grow depending
+ on community feedback.
+
+ \section3 QGraphicsLayout
+
+ QGraphicsLayout is part of a second-generation layout framework
+ designed specifically for QGraphicsWidget. Its API is very similar
+ to that of QLayout. You can manage widgets and sublayouts inside
+ either QGraphicsLinearLayout and QGraphicsGridLayout. You can also
+ easily write your own layout by subclassing QGraphicsLayout
+ yourself, or add your own QGraphicsItem items to the layout by
+ writing an adaptor subclass of QGraphicsLayoutItem.
+
+ \section2 Embedded Widget Support
+
+ Graphics View provides seamless support for embedding any widget
+ into the scene. You can embed simple widgets, such as QLineEdit or
+ QPushButton, complex widgets such as QTabWidget, and even complete
+ main windows. To embed your widget to the scene, simply call
+ QGraphicsScene::addWidget(), or create an instance of
+ QGraphicsProxyWidget to embed your widget manually.
+
+ Through QGraphicsProxyWidget, Graphics View is able to deeply
+ integrate the client widget features including its cursors,
+ tooltips, mouse, tablet and keyboard events, child widgets,
+ animations, pop-ups (e.g., QComboBox or QCompleter), and the widget's
+ input focus and activation. QGraphicsProxyWidget even integrates the
+ embedded widget's tab order so that you can tab in and out of
+ embedded widgets. You can even embed a new QGraphicsView into your
+ scene to provide complex nested scenes.
+
+ When transforming an embedded widget, Graphics View makes sure that
+ the widget is transformed resolution independently, allowing the
+ fonts and style to stay crisp when zoomed in. (Note that the effect
+ of resolution independence depends on the style.)
+*/
diff --git a/doc/src/groups.qdoc b/doc/src/groups.qdoc
new file mode 100644
index 0000000..c9cedc4
--- /dev/null
+++ b/doc/src/groups.qdoc
@@ -0,0 +1,599 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group groups
+ \title Grouped Classes
+ \ingroup classlists
+
+ This page provides a way of navigating Qt's classes by grouping
+ related classes together. Some classes may appear in more than one group.
+
+ \generatelist{related}
+
+ \omit
+ \row
+ \o \l{Component Model}
+ \o Interfaces and helper classes for the Qt Component Model.
+ \endomit
+
+*/
+
+/*!
+ \group advanced
+ \title Advanced Widgets
+ \ingroup groups
+
+ \brief Advanced GUI widgets such as tab widgets and progress bars.
+
+ These classes provide more complex user interface widgets (controls).
+
+*/
+
+/*!
+ \group abstractwidgets
+ \title Abstract Widget Classes
+ \ingroup groups
+
+ \brief Abstract widget classes usable through subclassing.
+
+ These classes are abstract widgets; they are generally not usable in
+ themselves, but provide functionality that can be used by inheriting
+ these classes.
+
+*/
+
+/*!
+ \group accessibility
+ \title Accessibility Classes
+ \ingroup groups
+ \ingroup topics
+
+ \brief Classes that provide support for accessibility.
+
+ Accessible applications are able to be used by users who cannot use
+ conventional means of interaction. These classes provide support for
+ accessible applications.
+
+*/
+
+/*!
+ \group appearance
+ \title Widget Appearance and Style
+ \ingroup groups
+
+ \brief Appearance customization with styles, fonts, colors etc.
+
+ These classes are used to customize an application's appearance and
+ style.
+
+*/
+
+/*!
+ \group application
+ \title Main Window and Related Classes
+ \ingroup groups
+
+ \brief Everything you need for a typical modern main application window,
+ including menus, toolbars, workspace, etc.
+
+ These classes provide everything you need for a typical modern main
+ application window, like the main window itself, menu and tool bars,
+ a status bar, etc.
+
+*/
+
+
+/*!
+ \group basicwidgets
+ \title Basic Widgets
+ \ingroup groups
+
+ \brief Basic GUI widgets such as buttons, comboboxes and scroll bars.
+
+ These basic widgets (controls) are designed for direct use.
+ There are also some \l{Abstract Widget Classes} that are designed for
+ subclassing, and some more complex \l{Advanced Widgets}.
+
+*/
+
+/* \group componentmodel
+ \title Component Model
+
+ These classes and interfaces form the basis of the \l{Qt Component Model}.
+
+*/
+
+/*!
+ \group database
+ \title Database Classes
+ \ingroup groups
+
+ \brief Database related classes, e.g. for SQL databases.
+
+ These classes provide access to SQL databases.
+*/
+
+
+/*!
+ \group dialogs
+ \title Standard Dialog Classes
+ \ingroup groups
+
+ \brief Ready-made dialogs for file, font, color selection and more.
+
+ These classes are complex widgets, composed of simpler widgets; dialog
+ boxes, generally.
+*/
+
+/*!
+ \group desktop
+ \title Desktop Environment Classes
+ \ingroup groups
+
+ \brief Classes for interacting with the user's desktop environment.
+
+ These classes provide ways to interact with the user's desktop environment and
+ take advantage of common services.
+*/
+
+/*!
+ \group draganddrop
+ \title Drag And Drop Classes
+ \ingroup groups
+
+ \brief Classes dealing with drag and drop and mime type encoding and decoding.
+
+ These classes deal with drag and drop and the necessary mime type
+ encoding and decoding. See also \link dnd.html Drag and Drop with
+ Qt. \endlink
+*/
+
+/*!
+ \group environment
+ \title Environment Classes
+ \ingroup groups
+
+ \brief Classes providing various global services such as event handling,
+ access to system settings and internationalization.
+
+ These classes providing various global services to your application such as
+ event handling, access to system settings, internationalization, etc.
+
+*/
+
+/*!
+ \group events
+ \title Event Classes
+ \ingroup groups
+
+ \brief Classes used to create and handle events.
+
+ These classes are used to create and handle events.
+
+ For more information see the \link object.html Object model\endlink
+ and \link signalsandslots.html Signals and Slots\endlink.
+*/
+
+/*!
+ \group explicitly-shared
+ \ingroup groups
+
+ \title Explicitly Shared Classes
+ \brief Classes that use explicit sharing to manage internal data.
+
+ \keyword explicit sharing
+ \keyword explicitly shared
+
+ Unlike many of Qt's data types, which use \l{implicit sharing}, these
+ classes use explicit sharing to manage internal data.
+*/
+
+/*!
+ \group geomanagement
+ \title Layout Management
+ \ingroup groups
+
+ \brief Classes handling automatic resizing and moving of widgets, for
+ composing complex dialogs.
+
+ These classes provide automatic geometry (layout) management of widgets.
+
+*/
+
+/*!
+ \group graphicsview-api
+ \title Graphics View Classes
+ \ingroup groups
+
+ \brief Classes in the Graphics View framework for interactive applications.
+
+ These classes are provided by \l{The Graphics View Framework} for interactive
+ applications and are part of a larger collection of classes related to
+ \l{Multimedia, Graphics and Printing}.
+
+ \note These classes are part of the \l{Open Source Versions of Qt} and
+ \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial users.
+*/
+
+/*!
+ \group helpsystem
+ \title Help System
+ \ingroup groups
+
+ \brief Classes used to provide online-help for applications.
+
+ \keyword help system
+
+ These classes provide for all forms of online-help in your application,
+ with three levels of detail:
+
+ \list 1
+ \o Tool Tips and Status Bar message - flyweight help, extremely brief,
+ entirely integrated in the user interface, requiring little
+ or no user interaction to invoke.
+ \o What's This? - lightweight, but can be
+ a three-paragraph explanation.
+ \o Online Help - can encompass any amount of information,
+ but is typically slower to call up, somewhat separated
+ from the user's work, and often users feel that using online
+ help is a digression from their real task.
+ \endlist
+
+*/
+
+
+/*!
+ \group io
+ \title Input/Output and Networking
+ \ingroup groups
+
+ \brief Classes providing file input and output along with directory and
+ network handling.
+
+ These classes are used to handle input and output to and from external
+ devices, processes, files etc. as well as manipulating files and directories.
+*/
+
+/*!
+ \group misc
+ \title Miscellaneous Classes
+ \ingroup groups
+
+ \brief Various other useful classes.
+
+ These classes are useful classes not fitting into any other category.
+
+*/
+
+
+/*!
+ \group model-view
+ \title Model/View Classes
+ \ingroup groups
+
+ \brief Classes that use the model/view design pattern.
+
+ These classes use the model/view design pattern in which the
+ underlying data (in the model) is kept separate from the way the data
+ is presented and manipulated by the user (in the view). See also
+ \link model-view-programming.html Model/View Programming\endlink.
+
+*/
+
+/*!
+ \group multimedia
+ \title Multimedia, Graphics and Printing
+ \ingroup groups
+
+ \brief Classes that provide support for graphics (2D, and with OpenGL, 3D),
+ image encoding, decoding, and manipulation, sound, animation,
+ printing, etc.
+
+ These classes provide support for graphics (2D, and with OpenGL, 3D),
+ image encoding, decoding, and manipulation, sound, animation, printing
+ etc.
+
+ See also this introduction to the \link coordsys.html Qt
+ coordinate system. \endlink
+
+*/
+
+/*!
+ \group objectmodel
+ \title Object Model
+ \ingroup groups
+
+ \brief The Qt GUI toolkit's underlying object model.
+
+ These classes form the basis of the \l{Qt Object Model}.
+
+*/
+
+/*!
+ \group organizers
+ \title Organizers
+ \ingroup groups
+
+ \brief User interface organizers such as splitters, tab bars, button groups, etc.
+
+ These classes are used to organize and group GUI primitives into more
+ complex applications or dialogs.
+
+*/
+
+
+/*!
+ \group plugins
+ \title Plugin Classes
+ \ingroup groups
+
+ \brief Plugin related classes.
+
+ These classes deal with shared libraries, (e.g. .so and DLL files),
+ and with Qt plugins.
+
+ See the \link plugins-howto.html plugins documentation\endlink.
+
+ See also the \l{ActiveQt framework} for Windows.
+
+*/
+
+/*!
+ \group qws
+ \title Qt for Embedded Linux Classes
+ \ingroup groups
+
+ \ingroup qt-embedded-linux
+ \brief Classes that are specific to Qt for Embedded Linux.
+
+ These classes are relevant to \l{Qt for Embedded Linux} users.
+*/
+
+/*!
+ \group shared
+ \title Implicitly Shared Classes
+ \ingroup architecture
+ \ingroup groups
+
+ \brief Classes that use reference counting for fast copying.
+
+ \keyword implicit data sharing
+ \keyword implicit sharing
+ \keyword implicitly shared
+ \keyword reference counting
+ \keyword shared implicitly
+ \keyword shared classes
+
+ Many C++ classes in Qt use implicit data sharing to maximize
+ resource usage and minimize copying. Implicitly shared classes are
+ both safe and efficient when passed as arguments, because only a
+ pointer to the data is passed around, and the data is copied only
+ if and when a function writes to it, i.e., \e {copy-on-write}.
+
+ \tableofcontents
+
+ \section1 Overview
+
+ A shared class consists of a pointer to a shared data block that
+ contains a reference count and the data.
+
+ When a shared object is created, it sets the reference count to 1. The
+ reference count is incremented whenever a new object references the
+ shared data, and decremented when the object dereferences the shared
+ data. The shared data is deleted when the reference count becomes
+ zero.
+
+ \keyword deep copy
+ \keyword shallow copy
+
+ When dealing with shared objects, there are two ways of copying an
+ object. We usually speak about \e deep and \e shallow copies. A deep
+ copy implies duplicating an object. A shallow copy is a reference
+ copy, i.e. just a pointer to a shared data block. Making a deep copy
+ can be expensive in terms of memory and CPU. Making a shallow copy is
+ very fast, because it only involves setting a pointer and incrementing
+ the reference count.
+
+ Object assignment (with operator=()) for implicitly shared objects is
+ implemented using shallow copies.
+
+ The benefit of sharing is that a program does not need to duplicate
+ data unnecessarily, which results in lower memory use and less copying
+ of data. Objects can easily be assigned, sent as function arguments,
+ and returned from functions.
+
+ Implicit sharing takes place behind the scenes; the programmer
+ does not need to worry about it. Even in multithreaded
+ applications, implicit sharing takes place, as explained in
+ \l{Threads and Implicit Sharing}.
+
+ \section1 Implicit Sharing in Detail
+
+ Implicit sharing automatically detaches the object from a shared
+ block if the object is about to change and the reference count is
+ greater than one. (This is often called \e {copy-on-write} or
+ \e {value semantics}.)
+
+ An implicitly shared class has total control of its internal data. In
+ any member functions that modify its data, it automatically detaches
+ before modifying the data.
+
+ The QPen class, which uses implicit sharing, detaches from the shared
+ data in all member functions that change the internal data.
+
+ Code fragment:
+ \snippet doc/src/snippets/code/doc_src_groups.qdoc 0
+
+ \section1 List of Classes
+
+ The classes listed below automatically detach from common data if
+ an object is about to be changed. The programmer will not even
+ notice that the objects are shared. Thus you should treat
+ separate instances of them as separate objects. They will always
+ behave as separate objects but with the added benefit of sharing
+ data whenever possible. For this reason, you can pass instances
+ of these classes as arguments to functions by value without
+ concern for the copying overhead.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_groups.qdoc 1
+
+ In this example, \c p1 and \c p2 share data until QPainter::begin()
+ is called for \c p2, because painting a pixmap will modify it.
+
+ \warning Do not copy an implicitly shared container (QMap,
+ QVector, etc.) while you are iterating over it using an non-const
+ \l{STL-style iterator}.
+*/
+
+/*!
+ \group ssl
+ \title Secure Sockets Layer (SSL) Classes
+ \ingroup groups
+
+ \brief Classes for secure communication over network sockets.
+ \keyword SSL
+
+ The classes below provide support for secure network communication using
+ the Secure Sockets Layer (SSL) protocol, using the \l{OpenSSL Toolkit} to
+ perform encryption and protocol handling.
+
+ See the \l{General Qt Requirements} page for information about the
+ versions of OpenSSL that are known to work with Qt.
+
+ \note Due to import and export restrictions in some parts of the world, we
+ are unable to supply the OpenSSL Toolkit with Qt packages. Developers wishing
+ to use SSL communication in their deployed applications should either ensure
+ that their users have the appropriate libraries installed, or they should
+ consult a suitably qualified legal professional to ensure that applications
+ using code from the OpenSSL project are correctly certified for import
+ and export in relevant regions of the world.
+
+ When the QtNetwork module is built with SSL support, the library is linked
+ against OpenSSL in a way that requires OpenSSL license compliance.
+*/
+
+/*!
+ \group text
+ \title Text Processing Classes
+ \ingroup groups
+ \ingroup text-processing
+
+ \brief Classes for text processing. (See also \l{XML Classes}.)
+
+ These classes are relevant to text processing. See also the
+ \l{Rich Text Processing} overview and the
+ \l{XML classes}.
+*/
+
+/*!
+ \group thread
+ \title Threading Classes
+ \ingroup groups
+
+ \brief Classes that provide threading support.
+
+ These classes are relevant to threaded applications. See
+ \l{Thread Support in Qt} for an overview of the features
+ Qt provides to help with multithreaded programming.
+*/
+
+
+/*!
+ \group time
+ \title Date and Time Classes
+ \ingroup groups
+
+ \brief Classes for handling date and time.
+
+ These classes provide system-independent date and time abstractions.
+
+*/
+
+/*!
+ \group tools
+ \title Non-GUI Classes
+ \ingroup groups
+
+ \brief Collection classes such as list, queue, stack and string, along
+ with other classes that can be used without needing QApplication.
+
+ The non-GUI classes are general-purpose collection and string classes
+ that may be used independently of the GUI classes.
+
+ In particular, these classes do not depend on QApplication at all,
+ and so can be used in non-GUI programs.
+
+*/
+
+/*!
+ \group xml-tools
+ \title XML Classes
+ \ingroup groups
+
+ \brief Classes that support XML, via, for example DOM and SAX.
+
+ These classes are relevant to XML users.
+*/
+
+/*!
+ \group script
+ \title Scripting Classes
+ \ingroup groups
+ \ingroup scripting
+
+ \brief Qt Script-related classes and overviews.
+
+ These classes are relevant to Qt Script users.
+*/
+
+/*!
+ \group scripttools
+ \title Script Tools
+ \ingroup groups
+ \ingroup scripting
+
+ \brief Classes for managing and debugging scripts.
+
+ These classes are relevant to developers who are working with Qt Script's
+ debugging features.
+*/
diff --git a/doc/src/guibooks.qdoc b/doc/src/guibooks.qdoc
new file mode 100644
index 0000000..888368b
--- /dev/null
+++ b/doc/src/guibooks.qdoc
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page guibooks.html
+
+ \title Books about GUI Design
+ \ingroup gui-programming
+
+ This is not a comprehensive list -- there are many other books worth
+ buying. Here we mention just a few user interface books that don't
+ gather dust on our shelves.
+
+ \bold{\l{http://www.amazon.com/gp/product/0132354160/ref=ase_trolltech/}{C++
+ GUI Programming with Qt 4, Second Edition}}
+ by Jasmin Blanchette and Mark
+ Summerfield, ISBN 0-13-235416-0. This is the official Qt book written
+ by two veteran Trolls. The first edition, which is based on Qt 4.1, is available
+ \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{online}.
+
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/0385267746/trolltech/t}{The Design of Everyday Things}}
+ by Donald Norman, ISBN 0-38526774-6, is one of the classics of human
+ interface design. Norman shows how badly something as simple as a
+ kitchen stove can be designed, and everyone should read it who will
+ design a dialog box, write an error message, or design just about
+ anything else humans are supposed to use.
+
+ \target fowler
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/0070592748/trolltech/t}{GUI Design Handbook}}
+ by Susan Fowler, ISBN 0-07-059274-8, is an
+ alphabetical dictionary of widgets and other user interface elements,
+ with comprehensive coverage of each. Each chapter covers one widget
+ or other element, contains the most important recommendation from the
+ Macintosh, Windows and Motif style guides, notes about common
+ problems, comparison with other widgets that can serve some of the
+ same roles as this one, etc.
+
+ \target Design Patterns
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/0201633612/103-8144203-3273444}
+ {Design Patterns - Elements of Reusable Object-Oriented Software}}
+ by Gamma, Helm, Johnson, and Vlissides, ISBN 0-201-63361-2, provides
+ more information on the Model-View-Controller (MVC) paradigm, explaining
+ MVC and its sub-patterns in detail.
+
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/0201622165/trolltech/t}{Macintosh
+ Human Interface Guidelines}}, Second Edition, ISBN
+ 0-201-62216-5, is worth buying for the \e {don't}s alone. Even
+ if you're not writing Macintosh software, avoiding most of what it
+ advises against will produce more easily comprehensible software.
+ Doing what it tells you to do may also help. This book is now available
+ \link http://developer.apple.com/techpubs/mac/HIGuidelines/HIGuidelines-2.html
+ online\endlink and there is a
+ \link http://developer.apple.com/techpubs/mac/HIGOS8Guide/thig-2.html Mac
+ OS 8 addendum.\endlink
+
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/047159900X/trolltech/t}{The
+ Microsoft Windows User Experience}}, ISBN 1-55615-679-0,
+ is Microsoft's look and feel bible. Indispensable for everyone who
+ has customers that worship Microsoft, and it's quite good, too.
+ It is also available
+ \link http://msdn.microsoft.com/library/en-us/dnwue/html/welcome.asp online\endlink.
+
+ \bold{\l{http://www.amazon.com/exec/obidos/ASIN/047159900X/trolltech/t}{The Icon Book}}
+ by William Horton, ISBN 0-471-59900-X, is perhaps the only thorough
+ coverage of icons and icon use in software. In order for icons to be
+ successful, people must be able to do four things with them: decode,
+ recognize, find and activate them. This book explains these goals
+ from scratch and how to reach them, both with single icons and icon
+ families. Some 500 examples are scattered throughout the text.
+
+
+ \section1 Buying these Books from Amazon.com
+
+ These books are made available in association with Amazon.com, our
+ favorite online bookstore. Here is more information about
+ \link http://www.amazon.com/exec/obidos/subst/help/shipping-policy.html/t
+ Amazon.com's shipping options\endlink and its
+ \link http://www.amazon.com/exec/obidos/subst/help/desk.html/t
+ customer service.\endlink When you buy a book by following one of these
+ links, Amazon.com gives about 15% of the purchase price to
+ \link http://www.amnesty.org/ Amnesty International.\endlink
+
+*/
diff --git a/doc/src/hierarchy.qdoc b/doc/src/hierarchy.qdoc
new file mode 100644
index 0000000..2b70964
--- /dev/null
+++ b/doc/src/hierarchy.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page hierarchy.html
+
+ \title Class Inheritance Hierarchy
+ \ingroup classlists
+
+ This list shows the C++ class inheritance relations between the
+ classes in the Qt API.
+
+ \generatelist classhierarchy
+*/
diff --git a/doc/src/how-to-learn-qt.qdoc b/doc/src/how-to-learn-qt.qdoc
new file mode 100644
index 0000000..4b16294
--- /dev/null
+++ b/doc/src/how-to-learn-qt.qdoc
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page how-to-learn-qt.html
+ \brief Links to guides and resources for learning Qt.
+ \title How to Learn Qt
+ \ingroup howto
+
+ We assume that you already know C++ and will be using it for Qt
+ development. See the \l{Qt website} for more information about
+ using other programming languages with Qt.
+
+ The best way to learn Qt is to read the official Qt book,
+ \l{http://www.amazon.com/gp/product/0132354160/ref=ase_trolltech/}{C++
+ GUI Programming with Qt 4, Second Edition} (ISBN 0-13-235416-0). This book
+ provides comprehensive coverage of Qt programming all the way
+ from "Hello Qt" to advanced features such as multithreading, 2D and
+ 3D graphics, networking, item view classes, and XML. (The first edition,
+ which is based on Qt 4.1, is available
+ \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{online}.)
+
+ If you want to program purely in C++, designing your interfaces
+ in code without the aid of any design tools, take a look at the
+ \l{Tutorials}. These are designed to get you into Qt programming,
+ with an emphasis on working code rather than being a tour of features.
+
+ If you want to design your user interfaces using a design tool, then
+ read at least the first few chapters of the \l{Qt Designer manual}.
+
+ By now you'll have produced some small working applications and have a
+ broad feel for Qt programming. You could start work on your own
+ projects straight away, but we recommend reading a couple of key
+ overviews to deepen your understanding of Qt: \l{Qt Object Model}
+ and \l{Signals and Slots}.
+
+ At this point, we recommend looking at the
+ \l{All Overviews and HOWTOs}{overviews} and reading those that are
+ relevant to your projects. You may also find it useful to browse the
+ source code of the \l{Qt Examples}{examples} that have things in
+ common with your projects. You can also read Qt's source code since
+ this is supplied.
+
+ \table
+ \row \o \inlineimage qtdemo-small.png
+ \o \bold{Getting an Overview}
+
+ If you run the \l{Examples and Demos Launcher}, you'll see many of Qt's
+ widgets in action.
+
+ The \l{Qt Widget Gallery} also provides overviews of selected Qt
+ widgets in each of the styles used on various supported platforms.
+ \endtable
+
+ Qt comes with extensive documentation, with hypertext
+ cross-references throughout, so you can easily click your way to
+ whatever interests you. The part of the documentation that you'll
+ probably use the most is the \link index.html API
+ Reference\endlink. Each link provides a different way of
+ navigating the API Reference; try them all to see which work best
+ for you. You might also like to try \l{Qt Assistant}:
+ this tool is supplied with Qt and provides access to the entire
+ Qt API, and it provides a full text search facility.
+
+ There are also a growing number of books about Qt programming; see
+ \l{Books about Qt Programming} for a complete list of Qt books,
+ including translations to various languages.
+
+ Another valuable source of example code and explanations of Qt
+ features is the archive of articles from \l {http://doc.trolltech.com/qq}
+ {Qt Quarterly}, a quarterly newsletter for users of Qt.
+
+ For documentation on specific Qt modules and other guides, refer to
+ \l{All Overviews and HOWTOs}.
+
+ Good luck, and have fun!
+*/
diff --git a/doc/src/i18n.qdoc b/doc/src/i18n.qdoc
new file mode 100644
index 0000000..5018b51
--- /dev/null
+++ b/doc/src/i18n.qdoc
@@ -0,0 +1,508 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group i18n
+ \title Internationalization with Qt
+ \ingroup topics
+
+ \brief Information about Qt's support for internationalization and multiple languages.
+
+ \keyword internationalization
+ \keyword i18n
+
+ The internationalization of an application is the process of making
+ the application usable by people in countries other than one's own.
+
+ \tableofcontents
+
+ In some cases internationalization is simple, for example, making a US
+ application accessible to Australian or British users may require
+ little more than a few spelling corrections. But to make a US
+ application usable by Japanese users, or a Korean application usable
+ by German users, will require that the software operate not only in
+ different languages, but use different input techniques, character
+ encodings and presentation conventions.
+
+ Qt tries to make internationalization as painless as possible for
+ developers. All input widgets and text drawing methods in Qt offer
+ built-in support for all supported languages. The built-in font engine
+ is capable of correctly and attractively rendering text that contains
+ characters from a variety of different writing systems at the same
+ time.
+
+ Qt supports most languages in use today, in particular:
+ \list
+ \o All East Asian languages (Chinese, Japanese and Korean)
+ \o All Western languages (using Latin script)
+ \o Arabic
+ \o Cyrillic languages (Russian, Ukrainian, etc.)
+ \o Greek
+ \o Hebrew
+ \o Thai and Lao
+ \o All scripts in Unicode 4.0 that do not require special processing
+ \endlist
+
+ On Windows, Unix/X11 with FontConfig (client side font support)
+ and Qt for Embedded Linux the following languages are also supported:
+ \list
+ \o Bengali
+ \o Devanagari
+ \o Dhivehi (Thaana)
+ \o Gujarati
+ \o Gurmukhi
+ \o Kannada
+ \o Khmer
+ \o Malayalam
+ \o Myanmar
+ \o Syriac
+ \o Tamil
+ \o Telugu
+ \o Tibetan
+ \endlist
+
+ Many of these writing systems exhibit special features:
+
+ \list
+
+ \o \bold{Special line breaking behavior.} Some of the Asian languages are
+ written without spaces between words. Line breaking can occur either
+ after every character (with exceptions) as in Chinese, Japanese and
+ Korean, or after logical word boundaries as in Thai.
+
+ \o \bold{Bidirectional writing.} Arabic and Hebrew are written from right to
+ left, except for numbers and embedded English text which is written
+ left to right. The exact behavior is defined in the
+ \l{http://www.unicode.org/unicode/reports/tr9/}{Unicode Technical Annex #9}.
+
+ \o \bold{Non-spacing or diacritical marks (accents or umlauts in European
+ languages).} Some languages such as Vietnamese make extensive use of
+ these marks and some characters can have more than one mark at the
+ same time to clarify pronunciation.
+
+ \o \bold{Ligatures.} In special contexts, some pairs of characters get
+ replaced by a combined glyph forming a ligature. Common examples are
+ the fl and fi ligatures used in typesetting US and European books.
+
+ \endlist
+
+ Qt tries to take care of all the special features listed above. You
+ usually don't have to worry about these features so long as you use
+ Qt's input widgets (e.g. QLineEdit, QTextEdit, and derived classes)
+ and Qt's display widgets (e.g. QLabel).
+
+ Support for these writing systems is transparent to the
+ programmer and completely encapsulated in \l{rich text
+ processing}{Qt's text engine}. This means that you don't need to
+ have any knowledge about the writing system used in a particular
+ language, except for the following small points:
+
+ \list
+
+ \o QPainter::drawText(int x, int y, const QString &str) will always
+ draw the string with its left edge at the position specified with
+ the x, y parameters. This will usually give you left aligned strings.
+ Arabic and Hebrew application strings are usually right
+ aligned, so for these languages use the version of drawText() that
+ takes a QRect since this will align in accordance with the language.
+
+ \o When you write your own text input controls, use \l
+ QFontMetrics::charWidth() to determine the width of a character in a
+ string. In some languages (e.g. Arabic or languages from the Indian
+ subcontinent), the width and shape of a glyph changes depending on the
+ surrounding characters. Writing input controls usually requires a
+ certain knowledge of the scripts it is going to be used in. Usually
+ the easiest way is to subclass QLineEdit or QTextEdit.
+
+ \endlist
+
+ The following sections give some information on the status of the
+ internationalization (i18n) support in Qt. See also the \l{Qt
+ Linguist manual}.
+
+ \section1 Step by Step
+
+ Writing cross-platform international software with Qt is a gentle,
+ incremental process. Your software can become internationalized in
+ the following stages:
+
+ \section2 Use QString for All User-Visible Text
+
+ Since QString uses the Unicode 4.0 encoding internally, every
+ language in the world can be processed transparently using
+ familiar text processing operations. Also, since all Qt functions
+ that present text to the user take a QString as a parameter,
+ there is no \c{char *} to QString conversion overhead.
+
+ Strings that are in "programmer space" (such as QObject names
+ and file format texts) need not use QString; the traditional
+ \c{char *} or the QByteArray class will suffice.
+
+ You're unlikely to notice that you are using Unicode;
+ QString, and QChar are just like easier versions of the crude
+ \c{const char *} and char from traditional C.
+
+ \section2 Use tr() for All Literal Text
+
+ Wherever your program uses "quoted text" for text that will
+ be presented to the user, ensure that it is processed by the \l
+ QCoreApplication::translate() function. Essentially all that is necessary
+ to achieve this is to use QObject::tr(). For example, assuming the
+ \c LoginWidget is a subclass of QWidget:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 0
+
+ This accounts for 99% of the user-visible strings you're likely to
+ write.
+
+ If the quoted text is not in a member function of a
+ QObject subclass, use either the tr() function of an
+ appropriate class, or the QCoreApplication::translate() function
+ directly:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 1
+
+ If you need to have translatable text completely
+ outside a function, there are two macros to help: QT_TR_NOOP()
+ and QT_TRANSLATE_NOOP(). They merely mark the text for
+ extraction by the \c lupdate utility described below.
+ The macros expand to just the text (without the context).
+
+ Example of QT_TR_NOOP():
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 2
+
+ Example of QT_TRANSLATE_NOOP():
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 3
+
+ If you disable the \c{const char *} to QString automatic
+ conversion by compiling your software with the macro \c
+ QT_NO_CAST_FROM_ASCII defined, you'll be very likely to catch any
+ strings you are missing. See QString::fromLatin1() for more
+ information. Disabling the conversion can make programming a bit
+ cumbersome.
+
+ If your source language uses characters outside Latin1, you
+ might find QObject::trUtf8() more convenient than
+ QObject::tr(), as tr() depends on the
+ QTextCodec::codecForTr(), which makes it more fragile than
+ QObject::trUtf8().
+
+ \section2 Use QKeySequence() for Accelerator Values
+
+ Accelerator values such as Ctrl+Q or Alt+F need to be translated
+ too. If you hardcode Qt::CTRL + Qt::Key_Q for "quit" in your
+ application, translators won't be able to override it. The
+ correct idiom is
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 20
+
+ \section2 Use QString::arg() for Dynamic Text
+
+ The QString::arg() functions offer a simple means for substituting
+ arguments:
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 4
+
+ In some languages the order of arguments may need to change, and this
+ can easily be achieved by changing the order of the % arguments. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 5
+
+ produces the correct output in English and Norwegian:
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 6
+
+ \section2 Produce Translations
+
+ Once you are using tr() throughout an application, you can start
+ producing translations of the user-visible text in your program.
+
+ The \l{Qt Linguist manual} provides further information about
+ Qt's translation tools, \e{Qt Linguist}, \c lupdate and \c
+ lrelease.
+
+ Translation of a Qt application is a three-step process:
+
+ \list 1
+
+ \o Run \c lupdate to extract translatable text from the C++
+ source code of the Qt application, resulting in a message file
+ for translators (a \c .ts file). The utility recognizes the tr()
+ construct and the \c{QT_TR*_NOOP()} macros described above and
+ produces \c .ts files (usually one per language).
+
+ \o Provide translations for the source texts in the \c .ts file, using
+ \e{Qt Linguist}. Since \c .ts files are in XML format, you can also
+ edit them by hand.
+
+ \o Run \c lrelease to obtain a light-weight message file (a \c .qm
+ file) from the \c .ts file, suitable only for end use. Think of the \c
+ .ts files as "source files", and \c .qm files as "object files". The
+ translator edits the \c .ts files, but the users of your application
+ only need the \c .qm files. Both kinds of files are platform and
+ locale independent.
+
+ \endlist
+
+ Typically, you will repeat these steps for every release of your
+ application. The \c lupdate utility does its best to reuse the
+ translations from previous releases.
+
+ Before you run \c lupdate, you should prepare a project file. Here's
+ an example project file (\c .pro file):
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 7
+
+ When you run \c lupdate or \c lrelease, you must give the name of the
+ project file as a command-line argument.
+
+ In this example, four exotic languages are supported: Danish,
+ Finnish, Norwegian and Swedish. If you use \l{qmake}, you usually
+ don't need an extra project file for \c lupdate; your \c qmake
+ project file will work fine once you add the \c TRANSLATIONS
+ entry.
+
+ In your application, you must \l QTranslator::load() the translation
+ files appropriate for the user's language, and install them using \l
+ QCoreApplication::installTranslator().
+
+ \c linguist, \c lupdate and \c lrelease are installed in the \c bin
+ subdirectory of the base directory Qt is installed into. Click Help|Manual
+ in \e{Qt Linguist} to access the user's manual; it contains a tutorial
+ to get you started.
+
+ \target qt-itself
+ Qt itself contains over 400 strings that will also need to be
+ translated into the languages that you are targeting. You will find
+ translation files for French, German and Simplified Chinese in
+ \c{$QTDIR/translations}, as well as a template for translating to
+ other languages. (This directory also contains some additional
+ unsupported translations which may be useful.)
+
+ Typically, your application's \c main() function will look like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+
+ Note the use of QLibraryInfo::location() to locate the Qt translations.
+ Developers should request the path to the translations at run-time by
+ passing QLibraryInfo::TranslationsPath to this function instead of
+ using the \c QTDIR environment variable in their applications.
+
+ \section2 Support for Encodings
+
+ The QTextCodec class and the facilities in QTextStream make it easy to
+ support many input and output encodings for your users' data. When an
+ application starts, the locale of the machine will determine the 8-bit
+ encoding used when dealing with 8-bit data: such as for font
+ selection, text display, 8-bit text I/O, and character input.
+
+ The application may occasionally require encodings other than the
+ default local 8-bit encoding. For example, an application in a
+ Cyrillic KOI8-R locale (the de-facto standard locale in Russia) might
+ need to output Cyrillic in the ISO 8859-5 encoding. Code for this
+ would be:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 9
+
+ For converting Unicode to local 8-bit encodings, a shortcut is
+ available: the QString::toLocal8Bit() function returns such 8-bit
+ data. Another useful shortcut is QString::toUtf8(), which returns
+ text in the 8-bit UTF-8 encoding: this perfectly preserves
+ Unicode information while looking like plain ASCII if the text is
+ wholly ASCII.
+
+ For converting the other way, there are the QString::fromUtf8() and
+ QString::fromLocal8Bit() convenience functions, or the general code,
+ demonstrated by this conversion from ISO 8859-5 Cyrillic to Unicode
+ conversion:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 10
+
+ Ideally Unicode I/O should be used as this maximizes the portability
+ of documents between users around the world, but in reality it is
+ useful to support all the appropriate encodings that your users will
+ need to process existing documents. In general, Unicode (UTF-16 or
+ UTF-8) is best for information transferred between arbitrary people,
+ while within a language or national group, a local standard is often
+ more appropriate. The most important encoding to support is the one
+ returned by QTextCodec::codecForLocale(), as this is the one the user
+ is most likely to need for communicating with other people and
+ applications (this is the codec used by local8Bit()).
+
+ Qt supports most of the more frequently used encodings natively. For a
+ complete list of supported encodings see the \l QTextCodec
+ documentation.
+
+ In some cases and for less frequently used encodings it may be
+ necessary to write your own QTextCodec subclass. Depending on the
+ urgency, it may be useful to contact Qt's technical support team or
+ ask on the \c qt-interest mailing list to see if someone else is
+ already working on supporting the encoding.
+
+ \keyword localization
+
+ \section2 Localize
+
+ Localization is the process of adapting to local conventions, for
+ example presenting dates and times using the locally preferred
+ formats. Such localizations can be accomplished using appropriate tr()
+ strings.
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 11
+
+ In the example, for the US we would leave the translation of
+ "AMPM" as it is and thereby use the 12-hour clock branch; but in
+ Europe we would translate it as something else and this will make
+ the code use the 24-hour clock branch.
+
+ For localized numbers use the QLocale class.
+
+ Localizing images is not recommended. Choose clear icons that are
+ appropriate for all localities, rather than relying on local puns or
+ stretched metaphors. The exception is for images of left and right
+ pointing arrows which may need to be reversed for Arabic and Hebrew
+ locales.
+
+ \section1 Dynamic Translation
+
+ Some applications, such as Qt Linguist, must be able to support changes
+ to the user's language settings while they are still running. To make
+ widgets aware of changes to the installed QTranslators, reimplement the
+ widget's \l{QWidget::changeEvent()}{changeEvent()} function to check whether
+ the event is a \l{QEvent::LanguageChange}{LanguageChange} event, and update
+ the text displayed by widgets using the \l{QObject::tr()}{tr()} function
+ in the usual way. For example:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 12
+
+ All other change events should be passed on by calling the default
+ implementation of the function.
+
+ The list of installed translators might change in reaction to a
+ \l{QEvent::LocaleChange}{LocaleChange} event, or the application might
+ provide a user interface that allows the user to change the current
+ application language.
+
+ The default event handler for QWidget subclasses responds to the
+ QEvent::LanguageChange event, and will call this function when necessary;
+ other application components can also force widgets to update themselves
+ by posting the \l{QEvent::LanguageChange}{LanguageChange} event to them.
+
+ \section1 Translating Non-Qt Classes
+
+ It is sometimes necessary to provide internationalization support for
+ strings used in classes that do not inherit QObject or use the Q_OBJECT
+ macro to enable translation features. Since Qt translates strings at
+ run-time based on the class they are associated with and \c lupdate
+ looks for translatable strings in the source code, non-Qt classes must
+ use mechanisms that also provide this information.
+
+ One way to do this is to add translation support to a non-Qt class
+ using the Q_DECLARE_TR_FUNCTIONS() macro; for example:
+
+ \snippet doc/src/snippets/i18n-non-qt-class/myclass.h 0
+ \dots
+ \snippet doc/src/snippets/i18n-non-qt-class/myclass.h 1
+
+ This provides the class with \l{QObject::}{tr()} functions that can
+ be used to translate strings associated with the class, and makes it
+ possible for \c lupdate to find translatable strings in the source
+ code.
+
+ Alternatively, the QCoreApplication::translate() function can be called
+ with a specific context, and this will be recognized by \c lupdate and
+ Qt Linguist.
+
+ \section1 System Support
+
+ Some of the operating systems and windowing systems that Qt runs on
+ only have limited support for Unicode. The level of support available
+ in the underlying system has some influence on the support that Qt can
+ provide on those platforms, although in general Qt applications need
+ not be too concerned with platform-specific limitations.
+
+ \section2 Unix/X11
+
+ \list
+ \o Locale-oriented fonts and input methods. Qt hides these and
+ provides Unicode input and output.
+ \o Filesystem conventions such as
+ \l{http://www.ietf.org/rfc/rfc2279.txt}{UTF-8}
+ are under development in some Unix variants. All Qt file
+ functions allow Unicode, but convert filenames to the local
+ 8-bit encoding, as this is the Unix convention (see
+ QFile::setEncodingFunction() to explore alternative
+ encodings).
+ \o File I/O defaults to the local 8-bit encoding,
+ with Unicode options in QTextStream.
+ \o Many Unix distributions contain only partial support for some locales.
+ For example, if you have a \c /usr/share/locale/ja_JP.EUC directory,
+ this does not necessarily mean you can display Japanese text; you also
+ need JIS encoded fonts (or Unicode fonts), and the
+ \c /usr/share/locale/ja_JP.EUC directory needs to be complete. For
+ best results, use complete locales from your system vendor.
+ \endlist
+
+ \section2 Windows
+
+ \list
+ \o Qt provides full Unicode support, including input methods, fonts,
+ clipboard, drag-and-drop and file names.
+ \o File I/O defaults to Latin1, with Unicode options in QTextStream.
+ Note that some Windows programs do not understand big-endian
+ Unicode text files even though that is the order prescribed by
+ the Unicode Standard in the absence of higher-level protocols.
+ \o Unlike programs written with MFC or plain winlib, Qt programs
+ are portable between Windows 98 and Windows NT.
+ \e {You do not need different binaries to support Unicode.}
+ \endlist
+
+ \section2 Mac OS X
+
+ For details on Mac-specific translation, refer to the Qt/Mac Specific Issues
+ document \l{Qt for Mac OS X - Specific Issues#Translating the Application Menu and Native Dialogs}{here}.
+
+ \section1 Relevant Qt Classes
+
+ These classes are relevant to internationalizing Qt applications.
+*/
diff --git a/doc/src/images/2dpainting-example.png b/doc/src/images/2dpainting-example.png
new file mode 100644
index 0000000..2a77e7d
--- /dev/null
+++ b/doc/src/images/2dpainting-example.png
Binary files differ
diff --git a/doc/src/images/abstract-connections.png b/doc/src/images/abstract-connections.png
new file mode 100644
index 0000000..18d2f4e
--- /dev/null
+++ b/doc/src/images/abstract-connections.png
Binary files differ
diff --git a/doc/src/images/accessibilityarchitecture.png b/doc/src/images/accessibilityarchitecture.png
new file mode 100644
index 0000000..40cd6dc
--- /dev/null
+++ b/doc/src/images/accessibilityarchitecture.png
Binary files differ
diff --git a/doc/src/images/accessibleobjecttree.png b/doc/src/images/accessibleobjecttree.png
new file mode 100644
index 0000000..8b82158
--- /dev/null
+++ b/doc/src/images/accessibleobjecttree.png
Binary files differ
diff --git a/doc/src/images/addressbook-adddialog.png b/doc/src/images/addressbook-adddialog.png
new file mode 100644
index 0000000..e2bab80
--- /dev/null
+++ b/doc/src/images/addressbook-adddialog.png
Binary files differ
diff --git a/doc/src/images/addressbook-classes.png b/doc/src/images/addressbook-classes.png
new file mode 100644
index 0000000..2920f16
--- /dev/null
+++ b/doc/src/images/addressbook-classes.png
Binary files differ
diff --git a/doc/src/images/addressbook-editdialog.png b/doc/src/images/addressbook-editdialog.png
new file mode 100644
index 0000000..fd41ee6
--- /dev/null
+++ b/doc/src/images/addressbook-editdialog.png
Binary files differ
diff --git a/doc/src/images/addressbook-example.png b/doc/src/images/addressbook-example.png
new file mode 100644
index 0000000..b743c16
--- /dev/null
+++ b/doc/src/images/addressbook-example.png
Binary files differ
diff --git a/doc/src/images/addressbook-filemenu.png b/doc/src/images/addressbook-filemenu.png
new file mode 100644
index 0000000..ebd14b6
--- /dev/null
+++ b/doc/src/images/addressbook-filemenu.png
Binary files differ
diff --git a/doc/src/images/addressbook-newaddresstab.png b/doc/src/images/addressbook-newaddresstab.png
new file mode 100644
index 0000000..ff215a4
--- /dev/null
+++ b/doc/src/images/addressbook-newaddresstab.png
Binary files differ
diff --git a/doc/src/images/addressbook-signals.png b/doc/src/images/addressbook-signals.png
new file mode 100644
index 0000000..cda4269
--- /dev/null
+++ b/doc/src/images/addressbook-signals.png
Binary files differ
diff --git a/doc/src/images/addressbook-toolsmenu.png b/doc/src/images/addressbook-toolsmenu.png
new file mode 100644
index 0000000..092e9a2
--- /dev/null
+++ b/doc/src/images/addressbook-toolsmenu.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-layout.png b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
new file mode 100644
index 0000000..ef514c8
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part1-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
new file mode 100644
index 0000000..4381079
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part1-labeled-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part1-screenshot.png b/doc/src/images/addressbook-tutorial-part1-screenshot.png
new file mode 100644
index 0000000..cf15627
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part1-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-contact.png b/doc/src/images/addressbook-tutorial-part2-add-contact.png
new file mode 100644
index 0000000..330858d
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-add-contact.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-flowchart.png b/doc/src/images/addressbook-tutorial-part2-add-flowchart.png
new file mode 100644
index 0000000..ca9af37
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-add-flowchart.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-add-successful.png b/doc/src/images/addressbook-tutorial-part2-add-successful.png
new file mode 100644
index 0000000..3b108fb
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-add-successful.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-labeled-layout.png b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
new file mode 100644
index 0000000..73f6dfb
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-signals-and-slots.png b/doc/src/images/addressbook-tutorial-part2-signals-and-slots.png
new file mode 100644
index 0000000..e49f8dc
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-signals-and-slots.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part2-stretch-effects.png b/doc/src/images/addressbook-tutorial-part2-stretch-effects.png
new file mode 100644
index 0000000..d9f7f31
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part2-stretch-effects.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-labeled-layout.png b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
new file mode 100644
index 0000000..662fa7f
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part3-labeled-layout.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-linkedlist.png b/doc/src/images/addressbook-tutorial-part3-linkedlist.png
new file mode 100644
index 0000000..e7f4725
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part3-linkedlist.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part3-screenshot.png b/doc/src/images/addressbook-tutorial-part3-screenshot.png
new file mode 100644
index 0000000..97d1357
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part3-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part4-remove.png b/doc/src/images/addressbook-tutorial-part4-remove.png
new file mode 100644
index 0000000..42b0f92
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part4-remove.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-finddialog.png b/doc/src/images/addressbook-tutorial-part5-finddialog.png
new file mode 100644
index 0000000..18e5451
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part5-finddialog.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-notfound.png b/doc/src/images/addressbook-tutorial-part5-notfound.png
new file mode 100644
index 0000000..be7172e
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part5-notfound.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-screenshot.png b/doc/src/images/addressbook-tutorial-part5-screenshot.png
new file mode 100644
index 0000000..ea4a66c
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part5-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part5-signals-and-slots.png b/doc/src/images/addressbook-tutorial-part5-signals-and-slots.png
new file mode 100644
index 0000000..1771e7b
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part5-signals-and-slots.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-load.png b/doc/src/images/addressbook-tutorial-part6-load.png
new file mode 100644
index 0000000..95fdcaf
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part6-load.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-save.png b/doc/src/images/addressbook-tutorial-part6-save.png
new file mode 100644
index 0000000..c0deb70
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part6-save.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part6-screenshot.png b/doc/src/images/addressbook-tutorial-part6-screenshot.png
new file mode 100644
index 0000000..f77bf03
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part6-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-part7-screenshot.png b/doc/src/images/addressbook-tutorial-part7-screenshot.png
new file mode 100644
index 0000000..d6b0a50
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-part7-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial-screenshot.png b/doc/src/images/addressbook-tutorial-screenshot.png
new file mode 100644
index 0000000..d6727dc
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial-screenshot.png
Binary files differ
diff --git a/doc/src/images/addressbook-tutorial.png b/doc/src/images/addressbook-tutorial.png
new file mode 100644
index 0000000..495edda
--- /dev/null
+++ b/doc/src/images/addressbook-tutorial.png
Binary files differ
diff --git a/doc/src/images/affine-demo.png b/doc/src/images/affine-demo.png
new file mode 100644
index 0000000..534d695
--- /dev/null
+++ b/doc/src/images/affine-demo.png
Binary files differ
diff --git a/doc/src/images/alphachannelimage.png b/doc/src/images/alphachannelimage.png
new file mode 100644
index 0000000..57b17c6
--- /dev/null
+++ b/doc/src/images/alphachannelimage.png
Binary files differ
diff --git a/doc/src/images/alphafill.png b/doc/src/images/alphafill.png
new file mode 100644
index 0000000..3feff296
--- /dev/null
+++ b/doc/src/images/alphafill.png
Binary files differ
diff --git a/doc/src/images/analogclock-example.png b/doc/src/images/analogclock-example.png
new file mode 100644
index 0000000..ffd7baa
--- /dev/null
+++ b/doc/src/images/analogclock-example.png
Binary files differ
diff --git a/doc/src/images/analogclock-viewport.png b/doc/src/images/analogclock-viewport.png
new file mode 100644
index 0000000..31ce0c3
--- /dev/null
+++ b/doc/src/images/analogclock-viewport.png
Binary files differ
diff --git a/doc/src/images/antialiased.png b/doc/src/images/antialiased.png
new file mode 100644
index 0000000..70619cc
--- /dev/null
+++ b/doc/src/images/antialiased.png
Binary files differ
diff --git a/doc/src/images/application-menus.png b/doc/src/images/application-menus.png
new file mode 100644
index 0000000..1815a2a
--- /dev/null
+++ b/doc/src/images/application-menus.png
Binary files differ
diff --git a/doc/src/images/application.png b/doc/src/images/application.png
new file mode 100644
index 0000000..2fb7f2f
--- /dev/null
+++ b/doc/src/images/application.png
Binary files differ
diff --git a/doc/src/images/arthurplugin-demo.png b/doc/src/images/arthurplugin-demo.png
new file mode 100644
index 0000000..6d372c2
--- /dev/null
+++ b/doc/src/images/arthurplugin-demo.png
Binary files differ
diff --git a/doc/src/images/assistant-address-toolbar.png b/doc/src/images/assistant-address-toolbar.png
new file mode 100644
index 0000000..7f00942
--- /dev/null
+++ b/doc/src/images/assistant-address-toolbar.png
Binary files differ
diff --git a/doc/src/images/assistant-assistant.png b/doc/src/images/assistant-assistant.png
new file mode 100644
index 0000000..d728889
--- /dev/null
+++ b/doc/src/images/assistant-assistant.png
Binary files differ
diff --git a/doc/src/images/assistant-dockwidgets.png b/doc/src/images/assistant-dockwidgets.png
new file mode 100644
index 0000000..17bc064
--- /dev/null
+++ b/doc/src/images/assistant-dockwidgets.png
Binary files differ
diff --git a/doc/src/images/assistant-docwindow.png b/doc/src/images/assistant-docwindow.png
new file mode 100644
index 0000000..c5bac58
--- /dev/null
+++ b/doc/src/images/assistant-docwindow.png
Binary files differ
diff --git a/doc/src/images/assistant-examples.png b/doc/src/images/assistant-examples.png
new file mode 100644
index 0000000..47c01bc
--- /dev/null
+++ b/doc/src/images/assistant-examples.png
Binary files differ
diff --git a/doc/src/images/assistant-filter-toolbar.png b/doc/src/images/assistant-filter-toolbar.png
new file mode 100644
index 0000000..e1411e4
--- /dev/null
+++ b/doc/src/images/assistant-filter-toolbar.png
Binary files differ
diff --git a/doc/src/images/assistant-preferences-documentation.png b/doc/src/images/assistant-preferences-documentation.png
new file mode 100644
index 0000000..42c1fd0
--- /dev/null
+++ b/doc/src/images/assistant-preferences-documentation.png
Binary files differ
diff --git a/doc/src/images/assistant-preferences-filters.png b/doc/src/images/assistant-preferences-filters.png
new file mode 100644
index 0000000..6844d88
--- /dev/null
+++ b/doc/src/images/assistant-preferences-filters.png
Binary files differ
diff --git a/doc/src/images/assistant-preferences-fonts.png b/doc/src/images/assistant-preferences-fonts.png
new file mode 100644
index 0000000..172fcce
--- /dev/null
+++ b/doc/src/images/assistant-preferences-fonts.png
Binary files differ
diff --git a/doc/src/images/assistant-preferences-options.png b/doc/src/images/assistant-preferences-options.png
new file mode 100644
index 0000000..f04499f
--- /dev/null
+++ b/doc/src/images/assistant-preferences-options.png
Binary files differ
diff --git a/doc/src/images/assistant-search.png b/doc/src/images/assistant-search.png
new file mode 100644
index 0000000..ef75c33
--- /dev/null
+++ b/doc/src/images/assistant-search.png
Binary files differ
diff --git a/doc/src/images/assistant-toolbar.png b/doc/src/images/assistant-toolbar.png
new file mode 100644
index 0000000..1b41825
--- /dev/null
+++ b/doc/src/images/assistant-toolbar.png
Binary files differ
diff --git a/doc/src/images/basicdrawing-example.png b/doc/src/images/basicdrawing-example.png
new file mode 100644
index 0000000..043acbe
--- /dev/null
+++ b/doc/src/images/basicdrawing-example.png
Binary files differ
diff --git a/doc/src/images/basicgraphicslayouts-example.png b/doc/src/images/basicgraphicslayouts-example.png
new file mode 100644
index 0000000..5c8f4cb
--- /dev/null
+++ b/doc/src/images/basicgraphicslayouts-example.png
Binary files differ
diff --git a/doc/src/images/basiclayouts-example.png b/doc/src/images/basiclayouts-example.png
new file mode 100644
index 0000000..f293423
--- /dev/null
+++ b/doc/src/images/basiclayouts-example.png
Binary files differ
diff --git a/doc/src/images/basicsortfiltermodel-example.png b/doc/src/images/basicsortfiltermodel-example.png
new file mode 100644
index 0000000..7f3bfdf
--- /dev/null
+++ b/doc/src/images/basicsortfiltermodel-example.png
Binary files differ
diff --git a/doc/src/images/bearings.png b/doc/src/images/bearings.png
new file mode 100644
index 0000000..0010892
--- /dev/null
+++ b/doc/src/images/bearings.png
Binary files differ
diff --git a/doc/src/images/blockingfortuneclient-example.png b/doc/src/images/blockingfortuneclient-example.png
new file mode 100644
index 0000000..cdb7cac
--- /dev/null
+++ b/doc/src/images/blockingfortuneclient-example.png
Binary files differ
diff --git a/doc/src/images/books-demo.png b/doc/src/images/books-demo.png
new file mode 100644
index 0000000..5bcc20b
--- /dev/null
+++ b/doc/src/images/books-demo.png
Binary files differ
diff --git a/doc/src/images/borderlayout-example.png b/doc/src/images/borderlayout-example.png
new file mode 100644
index 0000000..e856e06
--- /dev/null
+++ b/doc/src/images/borderlayout-example.png
Binary files differ
diff --git a/doc/src/images/boxes-demo.png b/doc/src/images/boxes-demo.png
new file mode 100644
index 0000000..6ad253c
--- /dev/null
+++ b/doc/src/images/boxes-demo.png
Binary files differ
diff --git a/doc/src/images/broadcastreceiver-example.png b/doc/src/images/broadcastreceiver-example.png
new file mode 100644
index 0000000..b837895
--- /dev/null
+++ b/doc/src/images/broadcastreceiver-example.png
Binary files differ
diff --git a/doc/src/images/broadcastsender-example.png b/doc/src/images/broadcastsender-example.png
new file mode 100644
index 0000000..bf7ccbe
--- /dev/null
+++ b/doc/src/images/broadcastsender-example.png
Binary files differ
diff --git a/doc/src/images/browser-demo.png b/doc/src/images/browser-demo.png
new file mode 100644
index 0000000..466f218
--- /dev/null
+++ b/doc/src/images/browser-demo.png
Binary files differ
diff --git a/doc/src/images/brush-outline.png b/doc/src/images/brush-outline.png
new file mode 100644
index 0000000..f560c9f
--- /dev/null
+++ b/doc/src/images/brush-outline.png
Binary files differ
diff --git a/doc/src/images/brush-styles.png b/doc/src/images/brush-styles.png
new file mode 100644
index 0000000..eecb006
--- /dev/null
+++ b/doc/src/images/brush-styles.png
Binary files differ
diff --git a/doc/src/images/buttonbox-gnomelayout-horizontal.png b/doc/src/images/buttonbox-gnomelayout-horizontal.png
new file mode 100644
index 0000000..b2f74bb
--- /dev/null
+++ b/doc/src/images/buttonbox-gnomelayout-horizontal.png
Binary files differ
diff --git a/doc/src/images/buttonbox-gnomelayout-vertical.png b/doc/src/images/buttonbox-gnomelayout-vertical.png
new file mode 100644
index 0000000..e7843dc
--- /dev/null
+++ b/doc/src/images/buttonbox-gnomelayout-vertical.png
Binary files differ
diff --git a/doc/src/images/buttonbox-kdelayout-horizontal.png b/doc/src/images/buttonbox-kdelayout-horizontal.png
new file mode 100644
index 0000000..5da11f4
--- /dev/null
+++ b/doc/src/images/buttonbox-kdelayout-horizontal.png
Binary files differ
diff --git a/doc/src/images/buttonbox-kdelayout-vertical.png b/doc/src/images/buttonbox-kdelayout-vertical.png
new file mode 100644
index 0000000..6f5dfc6
--- /dev/null
+++ b/doc/src/images/buttonbox-kdelayout-vertical.png
Binary files differ
diff --git a/doc/src/images/buttonbox-mac-modeless-horizontal.png b/doc/src/images/buttonbox-mac-modeless-horizontal.png
new file mode 100644
index 0000000..2e853d3
--- /dev/null
+++ b/doc/src/images/buttonbox-mac-modeless-horizontal.png
Binary files differ
diff --git a/doc/src/images/buttonbox-mac-modeless-vertical.png b/doc/src/images/buttonbox-mac-modeless-vertical.png
new file mode 100644
index 0000000..f59bd8d
--- /dev/null
+++ b/doc/src/images/buttonbox-mac-modeless-vertical.png
Binary files differ
diff --git a/doc/src/images/buttonbox-maclayout-horizontal.png b/doc/src/images/buttonbox-maclayout-horizontal.png
new file mode 100644
index 0000000..89ae84d
--- /dev/null
+++ b/doc/src/images/buttonbox-maclayout-horizontal.png
Binary files differ
diff --git a/doc/src/images/buttonbox-maclayout-vertical.png b/doc/src/images/buttonbox-maclayout-vertical.png
new file mode 100644
index 0000000..7287600
--- /dev/null
+++ b/doc/src/images/buttonbox-maclayout-vertical.png
Binary files differ
diff --git a/doc/src/images/buttonbox-winlayout-horizontal.png b/doc/src/images/buttonbox-winlayout-horizontal.png
new file mode 100644
index 0000000..dd4ce1c
--- /dev/null
+++ b/doc/src/images/buttonbox-winlayout-horizontal.png
Binary files differ
diff --git a/doc/src/images/buttonbox-winlayout-vertical.png b/doc/src/images/buttonbox-winlayout-vertical.png
new file mode 100644
index 0000000..539de1a
--- /dev/null
+++ b/doc/src/images/buttonbox-winlayout-vertical.png
Binary files differ
diff --git a/doc/src/images/cachedtable-example.png b/doc/src/images/cachedtable-example.png
new file mode 100644
index 0000000..db770df
--- /dev/null
+++ b/doc/src/images/cachedtable-example.png
Binary files differ
diff --git a/doc/src/images/calculator-example.png b/doc/src/images/calculator-example.png
new file mode 100644
index 0000000..6f1158d
--- /dev/null
+++ b/doc/src/images/calculator-example.png
Binary files differ
diff --git a/doc/src/images/calculator-ugly.png b/doc/src/images/calculator-ugly.png
new file mode 100644
index 0000000..cdfa902
--- /dev/null
+++ b/doc/src/images/calculator-ugly.png
Binary files differ
diff --git a/doc/src/images/calculatorbuilder-example.png b/doc/src/images/calculatorbuilder-example.png
new file mode 100644
index 0000000..561e500
--- /dev/null
+++ b/doc/src/images/calculatorbuilder-example.png
Binary files differ
diff --git a/doc/src/images/calculatorform-example.png b/doc/src/images/calculatorform-example.png
new file mode 100644
index 0000000..91432ac
--- /dev/null
+++ b/doc/src/images/calculatorform-example.png
Binary files differ
diff --git a/doc/src/images/calendar-example.png b/doc/src/images/calendar-example.png
new file mode 100644
index 0000000..895ce76
--- /dev/null
+++ b/doc/src/images/calendar-example.png
Binary files differ
diff --git a/doc/src/images/calendarwidgetexample.png b/doc/src/images/calendarwidgetexample.png
new file mode 100644
index 0000000..464be90
--- /dev/null
+++ b/doc/src/images/calendarwidgetexample.png
Binary files differ
diff --git a/doc/src/images/cannon-tutorial.png b/doc/src/images/cannon-tutorial.png
new file mode 100644
index 0000000..7347153
--- /dev/null
+++ b/doc/src/images/cannon-tutorial.png
Binary files differ
diff --git a/doc/src/images/capabilitiesexample.png b/doc/src/images/capabilitiesexample.png
new file mode 100644
index 0000000..d760592
--- /dev/null
+++ b/doc/src/images/capabilitiesexample.png
Binary files differ
diff --git a/doc/src/images/cde-calendarwidget.png b/doc/src/images/cde-calendarwidget.png
new file mode 100644
index 0000000..9615eae
--- /dev/null
+++ b/doc/src/images/cde-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/cde-checkbox.png b/doc/src/images/cde-checkbox.png
new file mode 100644
index 0000000..b2528dc
--- /dev/null
+++ b/doc/src/images/cde-checkbox.png
Binary files differ
diff --git a/doc/src/images/cde-combobox.png b/doc/src/images/cde-combobox.png
new file mode 100644
index 0000000..7458643
--- /dev/null
+++ b/doc/src/images/cde-combobox.png
Binary files differ
diff --git a/doc/src/images/cde-dateedit.png b/doc/src/images/cde-dateedit.png
new file mode 100644
index 0000000..ebb24d5
--- /dev/null
+++ b/doc/src/images/cde-dateedit.png
Binary files differ
diff --git a/doc/src/images/cde-datetimeedit.png b/doc/src/images/cde-datetimeedit.png
new file mode 100644
index 0000000..9ac659a
--- /dev/null
+++ b/doc/src/images/cde-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/cde-dial.png b/doc/src/images/cde-dial.png
new file mode 100644
index 0000000..956d19c
--- /dev/null
+++ b/doc/src/images/cde-dial.png
Binary files differ
diff --git a/doc/src/images/cde-doublespinbox.png b/doc/src/images/cde-doublespinbox.png
new file mode 100644
index 0000000..30a9af6
--- /dev/null
+++ b/doc/src/images/cde-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/cde-fontcombobox.png b/doc/src/images/cde-fontcombobox.png
new file mode 100644
index 0000000..043ca1d
--- /dev/null
+++ b/doc/src/images/cde-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/cde-frame.png b/doc/src/images/cde-frame.png
new file mode 100644
index 0000000..221576e
--- /dev/null
+++ b/doc/src/images/cde-frame.png
Binary files differ
diff --git a/doc/src/images/cde-groupbox.png b/doc/src/images/cde-groupbox.png
new file mode 100644
index 0000000..8bad69b
--- /dev/null
+++ b/doc/src/images/cde-groupbox.png
Binary files differ
diff --git a/doc/src/images/cde-horizontalscrollbar.png b/doc/src/images/cde-horizontalscrollbar.png
new file mode 100644
index 0000000..6e7cde8
--- /dev/null
+++ b/doc/src/images/cde-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/cde-label.png b/doc/src/images/cde-label.png
new file mode 100644
index 0000000..4e906ea
--- /dev/null
+++ b/doc/src/images/cde-label.png
Binary files differ
diff --git a/doc/src/images/cde-lcdnumber.png b/doc/src/images/cde-lcdnumber.png
new file mode 100644
index 0000000..97324c1
--- /dev/null
+++ b/doc/src/images/cde-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/cde-lineedit.png b/doc/src/images/cde-lineedit.png
new file mode 100644
index 0000000..6c1527b
--- /dev/null
+++ b/doc/src/images/cde-lineedit.png
Binary files differ
diff --git a/doc/src/images/cde-listview.png b/doc/src/images/cde-listview.png
new file mode 100644
index 0000000..2e58140
--- /dev/null
+++ b/doc/src/images/cde-listview.png
Binary files differ
diff --git a/doc/src/images/cde-progressbar.png b/doc/src/images/cde-progressbar.png
new file mode 100644
index 0000000..41715de
--- /dev/null
+++ b/doc/src/images/cde-progressbar.png
Binary files differ
diff --git a/doc/src/images/cde-pushbutton.png b/doc/src/images/cde-pushbutton.png
new file mode 100644
index 0000000..2d9bdd2
--- /dev/null
+++ b/doc/src/images/cde-pushbutton.png
Binary files differ
diff --git a/doc/src/images/cde-radiobutton.png b/doc/src/images/cde-radiobutton.png
new file mode 100644
index 0000000..e053665
--- /dev/null
+++ b/doc/src/images/cde-radiobutton.png
Binary files differ
diff --git a/doc/src/images/cde-slider.png b/doc/src/images/cde-slider.png
new file mode 100644
index 0000000..bd84371
--- /dev/null
+++ b/doc/src/images/cde-slider.png
Binary files differ
diff --git a/doc/src/images/cde-spinbox.png b/doc/src/images/cde-spinbox.png
new file mode 100644
index 0000000..5f53c8e
--- /dev/null
+++ b/doc/src/images/cde-spinbox.png
Binary files differ
diff --git a/doc/src/images/cde-tableview.png b/doc/src/images/cde-tableview.png
new file mode 100644
index 0000000..7a99217
--- /dev/null
+++ b/doc/src/images/cde-tableview.png
Binary files differ
diff --git a/doc/src/images/cde-tabwidget.png b/doc/src/images/cde-tabwidget.png
new file mode 100644
index 0000000..8cf5473
--- /dev/null
+++ b/doc/src/images/cde-tabwidget.png
Binary files differ
diff --git a/doc/src/images/cde-textedit.png b/doc/src/images/cde-textedit.png
new file mode 100644
index 0000000..c65b8da
--- /dev/null
+++ b/doc/src/images/cde-textedit.png
Binary files differ
diff --git a/doc/src/images/cde-timeedit.png b/doc/src/images/cde-timeedit.png
new file mode 100644
index 0000000..6a5a4b9
--- /dev/null
+++ b/doc/src/images/cde-timeedit.png
Binary files differ
diff --git a/doc/src/images/cde-toolbox.png b/doc/src/images/cde-toolbox.png
new file mode 100644
index 0000000..c0dd4e9
--- /dev/null
+++ b/doc/src/images/cde-toolbox.png
Binary files differ
diff --git a/doc/src/images/cde-toolbutton.png b/doc/src/images/cde-toolbutton.png
new file mode 100644
index 0000000..baff25c
--- /dev/null
+++ b/doc/src/images/cde-toolbutton.png
Binary files differ
diff --git a/doc/src/images/cde-treeview.png b/doc/src/images/cde-treeview.png
new file mode 100644
index 0000000..df3184b
--- /dev/null
+++ b/doc/src/images/cde-treeview.png
Binary files differ
diff --git a/doc/src/images/charactermap-example.png b/doc/src/images/charactermap-example.png
new file mode 100644
index 0000000..c1f25a5
--- /dev/null
+++ b/doc/src/images/charactermap-example.png
Binary files differ
diff --git a/doc/src/images/chart-example.png b/doc/src/images/chart-example.png
new file mode 100644
index 0000000..9823666
--- /dev/null
+++ b/doc/src/images/chart-example.png
Binary files differ
diff --git a/doc/src/images/chip-demo.png b/doc/src/images/chip-demo.png
new file mode 100644
index 0000000..8889424
--- /dev/null
+++ b/doc/src/images/chip-demo.png
Binary files differ
diff --git a/doc/src/images/classwizard-flow.png b/doc/src/images/classwizard-flow.png
new file mode 100644
index 0000000..ad9446c
--- /dev/null
+++ b/doc/src/images/classwizard-flow.png
Binary files differ
diff --git a/doc/src/images/classwizard.png b/doc/src/images/classwizard.png
new file mode 100644
index 0000000..ea740bd
--- /dev/null
+++ b/doc/src/images/classwizard.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-calendarwidget.png b/doc/src/images/cleanlooks-calendarwidget.png
new file mode 100644
index 0000000..99c57b6
--- /dev/null
+++ b/doc/src/images/cleanlooks-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-checkbox.png b/doc/src/images/cleanlooks-checkbox.png
new file mode 100644
index 0000000..aaf2daa
--- /dev/null
+++ b/doc/src/images/cleanlooks-checkbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-combobox.png b/doc/src/images/cleanlooks-combobox.png
new file mode 100644
index 0000000..5fff4c8
--- /dev/null
+++ b/doc/src/images/cleanlooks-combobox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-dateedit.png b/doc/src/images/cleanlooks-dateedit.png
new file mode 100644
index 0000000..384136a
--- /dev/null
+++ b/doc/src/images/cleanlooks-dateedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-datetimeedit.png b/doc/src/images/cleanlooks-datetimeedit.png
new file mode 100644
index 0000000..7a62ceb
--- /dev/null
+++ b/doc/src/images/cleanlooks-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-dial.png b/doc/src/images/cleanlooks-dial.png
new file mode 100644
index 0000000..259a088
--- /dev/null
+++ b/doc/src/images/cleanlooks-dial.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-dialogbuttonbox.png b/doc/src/images/cleanlooks-dialogbuttonbox.png
new file mode 100644
index 0000000..907dfda
--- /dev/null
+++ b/doc/src/images/cleanlooks-dialogbuttonbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-doublespinbox.png b/doc/src/images/cleanlooks-doublespinbox.png
new file mode 100644
index 0000000..93b11f9
--- /dev/null
+++ b/doc/src/images/cleanlooks-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-fontcombobox.png b/doc/src/images/cleanlooks-fontcombobox.png
new file mode 100644
index 0000000..47a5907
--- /dev/null
+++ b/doc/src/images/cleanlooks-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-frame.png b/doc/src/images/cleanlooks-frame.png
new file mode 100644
index 0000000..2427b08
--- /dev/null
+++ b/doc/src/images/cleanlooks-frame.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-groupbox.png b/doc/src/images/cleanlooks-groupbox.png
new file mode 100644
index 0000000..89c6eb2
--- /dev/null
+++ b/doc/src/images/cleanlooks-groupbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-horizontalscrollbar.png b/doc/src/images/cleanlooks-horizontalscrollbar.png
new file mode 100644
index 0000000..ca1c806
--- /dev/null
+++ b/doc/src/images/cleanlooks-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-label.png b/doc/src/images/cleanlooks-label.png
new file mode 100644
index 0000000..199758f
--- /dev/null
+++ b/doc/src/images/cleanlooks-label.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-lcdnumber.png b/doc/src/images/cleanlooks-lcdnumber.png
new file mode 100644
index 0000000..c6e3412
--- /dev/null
+++ b/doc/src/images/cleanlooks-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-lineedit.png b/doc/src/images/cleanlooks-lineedit.png
new file mode 100644
index 0000000..3e9f1a4
--- /dev/null
+++ b/doc/src/images/cleanlooks-lineedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-listview.png b/doc/src/images/cleanlooks-listview.png
new file mode 100644
index 0000000..95f836c
--- /dev/null
+++ b/doc/src/images/cleanlooks-listview.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-progressbar.png b/doc/src/images/cleanlooks-progressbar.png
new file mode 100644
index 0000000..53fc6c1
--- /dev/null
+++ b/doc/src/images/cleanlooks-progressbar.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-pushbutton-menu.png b/doc/src/images/cleanlooks-pushbutton-menu.png
new file mode 100644
index 0000000..0d5cb59
--- /dev/null
+++ b/doc/src/images/cleanlooks-pushbutton-menu.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-pushbutton.png b/doc/src/images/cleanlooks-pushbutton.png
new file mode 100644
index 0000000..7b3b335
--- /dev/null
+++ b/doc/src/images/cleanlooks-pushbutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-radiobutton.png b/doc/src/images/cleanlooks-radiobutton.png
new file mode 100644
index 0000000..4e07768
--- /dev/null
+++ b/doc/src/images/cleanlooks-radiobutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-slider.png b/doc/src/images/cleanlooks-slider.png
new file mode 100644
index 0000000..8dfaa01
--- /dev/null
+++ b/doc/src/images/cleanlooks-slider.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-spinbox.png b/doc/src/images/cleanlooks-spinbox.png
new file mode 100644
index 0000000..ad5b5a0
--- /dev/null
+++ b/doc/src/images/cleanlooks-spinbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-tableview.png b/doc/src/images/cleanlooks-tableview.png
new file mode 100644
index 0000000..d89fecc
--- /dev/null
+++ b/doc/src/images/cleanlooks-tableview.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-tabwidget.png b/doc/src/images/cleanlooks-tabwidget.png
new file mode 100644
index 0000000..bcff296
--- /dev/null
+++ b/doc/src/images/cleanlooks-tabwidget.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-textedit.png b/doc/src/images/cleanlooks-textedit.png
new file mode 100644
index 0000000..0c825a1
--- /dev/null
+++ b/doc/src/images/cleanlooks-textedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-timeedit.png b/doc/src/images/cleanlooks-timeedit.png
new file mode 100644
index 0000000..00420a2
--- /dev/null
+++ b/doc/src/images/cleanlooks-timeedit.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-toolbox.png b/doc/src/images/cleanlooks-toolbox.png
new file mode 100644
index 0000000..63366e5
--- /dev/null
+++ b/doc/src/images/cleanlooks-toolbox.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-toolbutton.png b/doc/src/images/cleanlooks-toolbutton.png
new file mode 100644
index 0000000..bcf86ea
--- /dev/null
+++ b/doc/src/images/cleanlooks-toolbutton.png
Binary files differ
diff --git a/doc/src/images/cleanlooks-treeview.png b/doc/src/images/cleanlooks-treeview.png
new file mode 100644
index 0000000..5bc4a06
--- /dev/null
+++ b/doc/src/images/cleanlooks-treeview.png
Binary files differ
diff --git a/doc/src/images/codecs-example.png b/doc/src/images/codecs-example.png
new file mode 100644
index 0000000..8e7ae95
--- /dev/null
+++ b/doc/src/images/codecs-example.png
Binary files differ
diff --git a/doc/src/images/codeeditor-example.png b/doc/src/images/codeeditor-example.png
new file mode 100644
index 0000000..b176406
--- /dev/null
+++ b/doc/src/images/codeeditor-example.png
Binary files differ
diff --git a/doc/src/images/collidingmice-example.png b/doc/src/images/collidingmice-example.png
new file mode 100644
index 0000000..41561de
--- /dev/null
+++ b/doc/src/images/collidingmice-example.png
Binary files differ
diff --git a/doc/src/images/coloreditorfactoryimage.png b/doc/src/images/coloreditorfactoryimage.png
new file mode 100644
index 0000000..cd839a6
--- /dev/null
+++ b/doc/src/images/coloreditorfactoryimage.png
Binary files differ
diff --git a/doc/src/images/combo-widget-mapper.png b/doc/src/images/combo-widget-mapper.png
new file mode 100644
index 0000000..910d6ed
--- /dev/null
+++ b/doc/src/images/combo-widget-mapper.png
Binary files differ
diff --git a/doc/src/images/completer-example-country.png b/doc/src/images/completer-example-country.png
new file mode 100644
index 0000000..fa7c8a9
--- /dev/null
+++ b/doc/src/images/completer-example-country.png
Binary files differ
diff --git a/doc/src/images/completer-example-dirmodel.png b/doc/src/images/completer-example-dirmodel.png
new file mode 100644
index 0000000..94b75b0
--- /dev/null
+++ b/doc/src/images/completer-example-dirmodel.png
Binary files differ
diff --git a/doc/src/images/completer-example-qdirmodel.png b/doc/src/images/completer-example-qdirmodel.png
new file mode 100644
index 0000000..904c198
--- /dev/null
+++ b/doc/src/images/completer-example-qdirmodel.png
Binary files differ
diff --git a/doc/src/images/completer-example-word.png b/doc/src/images/completer-example-word.png
new file mode 100644
index 0000000..aa3fb9c
--- /dev/null
+++ b/doc/src/images/completer-example-word.png
Binary files differ
diff --git a/doc/src/images/completer-example.png b/doc/src/images/completer-example.png
new file mode 100644
index 0000000..dcaa253
--- /dev/null
+++ b/doc/src/images/completer-example.png
Binary files differ
diff --git a/doc/src/images/complexwizard-detailspage.png b/doc/src/images/complexwizard-detailspage.png
new file mode 100644
index 0000000..58eeae4
--- /dev/null
+++ b/doc/src/images/complexwizard-detailspage.png
Binary files differ
diff --git a/doc/src/images/complexwizard-evaluatepage.png b/doc/src/images/complexwizard-evaluatepage.png
new file mode 100644
index 0000000..23f200e
--- /dev/null
+++ b/doc/src/images/complexwizard-evaluatepage.png
Binary files differ
diff --git a/doc/src/images/complexwizard-finishpage.png b/doc/src/images/complexwizard-finishpage.png
new file mode 100644
index 0000000..60703a0
--- /dev/null
+++ b/doc/src/images/complexwizard-finishpage.png
Binary files differ
diff --git a/doc/src/images/complexwizard-flow.png b/doc/src/images/complexwizard-flow.png
new file mode 100644
index 0000000..c74b0ee
--- /dev/null
+++ b/doc/src/images/complexwizard-flow.png
Binary files differ
diff --git a/doc/src/images/complexwizard-registerpage.png b/doc/src/images/complexwizard-registerpage.png
new file mode 100644
index 0000000..18a359c
--- /dev/null
+++ b/doc/src/images/complexwizard-registerpage.png
Binary files differ
diff --git a/doc/src/images/complexwizard-titlepage.png b/doc/src/images/complexwizard-titlepage.png
new file mode 100644
index 0000000..29acbbc
--- /dev/null
+++ b/doc/src/images/complexwizard-titlepage.png
Binary files differ
diff --git a/doc/src/images/complexwizard.png b/doc/src/images/complexwizard.png
new file mode 100644
index 0000000..d08942e
--- /dev/null
+++ b/doc/src/images/complexwizard.png
Binary files differ
diff --git a/doc/src/images/composition-demo.png b/doc/src/images/composition-demo.png
new file mode 100644
index 0000000..942bc58
--- /dev/null
+++ b/doc/src/images/composition-demo.png
Binary files differ
diff --git a/doc/src/images/concentriccircles-example.png b/doc/src/images/concentriccircles-example.png
new file mode 100644
index 0000000..fd308b5
--- /dev/null
+++ b/doc/src/images/concentriccircles-example.png
Binary files differ
diff --git a/doc/src/images/conceptaudio.png b/doc/src/images/conceptaudio.png
new file mode 100644
index 0000000..b4eabad
--- /dev/null
+++ b/doc/src/images/conceptaudio.png
Binary files differ
diff --git a/doc/src/images/conceptprocessor.png b/doc/src/images/conceptprocessor.png
new file mode 100644
index 0000000..2b76df3
--- /dev/null
+++ b/doc/src/images/conceptprocessor.png
@@ -0,0 +1 @@
+This is a temporary placeholder.
diff --git a/doc/src/images/conceptvideo.png b/doc/src/images/conceptvideo.png
new file mode 100644
index 0000000..1777b21
--- /dev/null
+++ b/doc/src/images/conceptvideo.png
Binary files differ
diff --git a/doc/src/images/configdialog-example.png b/doc/src/images/configdialog-example.png
new file mode 100644
index 0000000..20d917b
--- /dev/null
+++ b/doc/src/images/configdialog-example.png
Binary files differ
diff --git a/doc/src/images/conicalGradient.png b/doc/src/images/conicalGradient.png
new file mode 100644
index 0000000..013f6ef
--- /dev/null
+++ b/doc/src/images/conicalGradient.png
Binary files differ
diff --git a/doc/src/images/containerextension-example.png b/doc/src/images/containerextension-example.png
new file mode 100644
index 0000000..2427f91
--- /dev/null
+++ b/doc/src/images/containerextension-example.png
Binary files differ
diff --git a/doc/src/images/context2d-example-smileysmile.png b/doc/src/images/context2d-example-smileysmile.png
new file mode 100644
index 0000000..369f32e
--- /dev/null
+++ b/doc/src/images/context2d-example-smileysmile.png
Binary files differ
diff --git a/doc/src/images/context2d-example.png b/doc/src/images/context2d-example.png
new file mode 100644
index 0000000..0c12754
--- /dev/null
+++ b/doc/src/images/context2d-example.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-analogclock.png b/doc/src/images/coordinatesystem-analogclock.png
new file mode 100644
index 0000000..16e3091
--- /dev/null
+++ b/doc/src/images/coordinatesystem-analogclock.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line-antialias.png b/doc/src/images/coordinatesystem-line-antialias.png
new file mode 100644
index 0000000..90dfa87
--- /dev/null
+++ b/doc/src/images/coordinatesystem-line-antialias.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line-raster.png b/doc/src/images/coordinatesystem-line-raster.png
new file mode 100644
index 0000000..65201bd
--- /dev/null
+++ b/doc/src/images/coordinatesystem-line-raster.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-line.png b/doc/src/images/coordinatesystem-line.png
new file mode 100644
index 0000000..fbf6873
--- /dev/null
+++ b/doc/src/images/coordinatesystem-line.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect-antialias.png b/doc/src/images/coordinatesystem-rect-antialias.png
new file mode 100644
index 0000000..162e1df
--- /dev/null
+++ b/doc/src/images/coordinatesystem-rect-antialias.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect-raster.png b/doc/src/images/coordinatesystem-rect-raster.png
new file mode 100644
index 0000000..be3690d
--- /dev/null
+++ b/doc/src/images/coordinatesystem-rect-raster.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-rect.png b/doc/src/images/coordinatesystem-rect.png
new file mode 100644
index 0000000..76c06be
--- /dev/null
+++ b/doc/src/images/coordinatesystem-rect.png
Binary files differ
diff --git a/doc/src/images/coordinatesystem-transformations.png b/doc/src/images/coordinatesystem-transformations.png
new file mode 100644
index 0000000..2736213
--- /dev/null
+++ b/doc/src/images/coordinatesystem-transformations.png
Binary files differ
diff --git a/doc/src/images/coordsys.png b/doc/src/images/coordsys.png
new file mode 100644
index 0000000..181f2f6
--- /dev/null
+++ b/doc/src/images/coordsys.png
Binary files differ
diff --git a/doc/src/images/cursor-arrow.png b/doc/src/images/cursor-arrow.png
new file mode 100644
index 0000000..a69ef4e
--- /dev/null
+++ b/doc/src/images/cursor-arrow.png
Binary files differ
diff --git a/doc/src/images/cursor-busy.png b/doc/src/images/cursor-busy.png
new file mode 100644
index 0000000..53717e4
--- /dev/null
+++ b/doc/src/images/cursor-busy.png
Binary files differ
diff --git a/doc/src/images/cursor-closedhand.png b/doc/src/images/cursor-closedhand.png
new file mode 100644
index 0000000..b78dd1d
--- /dev/null
+++ b/doc/src/images/cursor-closedhand.png
Binary files differ
diff --git a/doc/src/images/cursor-cross.png b/doc/src/images/cursor-cross.png
new file mode 100644
index 0000000..fe38e74
--- /dev/null
+++ b/doc/src/images/cursor-cross.png
Binary files differ
diff --git a/doc/src/images/cursor-forbidden.png b/doc/src/images/cursor-forbidden.png
new file mode 100644
index 0000000..2b08c4e
--- /dev/null
+++ b/doc/src/images/cursor-forbidden.png
Binary files differ
diff --git a/doc/src/images/cursor-hand.png b/doc/src/images/cursor-hand.png
new file mode 100644
index 0000000..d2004ae
--- /dev/null
+++ b/doc/src/images/cursor-hand.png
Binary files differ
diff --git a/doc/src/images/cursor-hsplit.png b/doc/src/images/cursor-hsplit.png
new file mode 100644
index 0000000..1beda25
--- /dev/null
+++ b/doc/src/images/cursor-hsplit.png
Binary files differ
diff --git a/doc/src/images/cursor-ibeam.png b/doc/src/images/cursor-ibeam.png
new file mode 100644
index 0000000..097fc5f
--- /dev/null
+++ b/doc/src/images/cursor-ibeam.png
Binary files differ
diff --git a/doc/src/images/cursor-openhand.png b/doc/src/images/cursor-openhand.png
new file mode 100644
index 0000000..9181c85
--- /dev/null
+++ b/doc/src/images/cursor-openhand.png
Binary files differ
diff --git a/doc/src/images/cursor-sizeall.png b/doc/src/images/cursor-sizeall.png
new file mode 100644
index 0000000..69f13eb
--- /dev/null
+++ b/doc/src/images/cursor-sizeall.png
Binary files differ
diff --git a/doc/src/images/cursor-sizeb.png b/doc/src/images/cursor-sizeb.png
new file mode 100644
index 0000000..f37d7b9
--- /dev/null
+++ b/doc/src/images/cursor-sizeb.png
Binary files differ
diff --git a/doc/src/images/cursor-sizef.png b/doc/src/images/cursor-sizef.png
new file mode 100644
index 0000000..3b127a0
--- /dev/null
+++ b/doc/src/images/cursor-sizef.png
Binary files differ
diff --git a/doc/src/images/cursor-sizeh.png b/doc/src/images/cursor-sizeh.png
new file mode 100644
index 0000000..a9f40cb
--- /dev/null
+++ b/doc/src/images/cursor-sizeh.png
Binary files differ
diff --git a/doc/src/images/cursor-sizev.png b/doc/src/images/cursor-sizev.png
new file mode 100644
index 0000000..1edbab2
--- /dev/null
+++ b/doc/src/images/cursor-sizev.png
Binary files differ
diff --git a/doc/src/images/cursor-uparrow.png b/doc/src/images/cursor-uparrow.png
new file mode 100644
index 0000000..d3e70ef
--- /dev/null
+++ b/doc/src/images/cursor-uparrow.png
Binary files differ
diff --git a/doc/src/images/cursor-vsplit.png b/doc/src/images/cursor-vsplit.png
new file mode 100644
index 0000000..a5667e3
--- /dev/null
+++ b/doc/src/images/cursor-vsplit.png
Binary files differ
diff --git a/doc/src/images/cursor-wait.png b/doc/src/images/cursor-wait.png
new file mode 100644
index 0000000..69056c4
--- /dev/null
+++ b/doc/src/images/cursor-wait.png
Binary files differ
diff --git a/doc/src/images/cursor-whatsthis.png b/doc/src/images/cursor-whatsthis.png
new file mode 100644
index 0000000..b47601c
--- /dev/null
+++ b/doc/src/images/cursor-whatsthis.png
Binary files differ
diff --git a/doc/src/images/customcompleter-example.png b/doc/src/images/customcompleter-example.png
new file mode 100644
index 0000000..a525208
--- /dev/null
+++ b/doc/src/images/customcompleter-example.png
Binary files differ
diff --git a/doc/src/images/customcompleter-insertcompletion.png b/doc/src/images/customcompleter-insertcompletion.png
new file mode 100644
index 0000000..0bb2c25
--- /dev/null
+++ b/doc/src/images/customcompleter-insertcompletion.png
Binary files differ
diff --git a/doc/src/images/customsortfiltermodel-example.png b/doc/src/images/customsortfiltermodel-example.png
new file mode 100644
index 0000000..d7ee8bd
--- /dev/null
+++ b/doc/src/images/customsortfiltermodel-example.png
Binary files differ
diff --git a/doc/src/images/customtypesending-example.png b/doc/src/images/customtypesending-example.png
new file mode 100644
index 0000000..fbc3953
--- /dev/null
+++ b/doc/src/images/customtypesending-example.png
Binary files differ
diff --git a/doc/src/images/customwidgetplugin-example.png b/doc/src/images/customwidgetplugin-example.png
new file mode 100644
index 0000000..87fde81
--- /dev/null
+++ b/doc/src/images/customwidgetplugin-example.png
Binary files differ
diff --git a/doc/src/images/datetimewidgets.png b/doc/src/images/datetimewidgets.png
new file mode 100644
index 0000000..c2d498c
--- /dev/null
+++ b/doc/src/images/datetimewidgets.png
Binary files differ
diff --git a/doc/src/images/dbus-chat-example.png b/doc/src/images/dbus-chat-example.png
new file mode 100644
index 0000000..ad66d08
--- /dev/null
+++ b/doc/src/images/dbus-chat-example.png
Binary files differ
diff --git a/doc/src/images/defaultprototypes-example.png b/doc/src/images/defaultprototypes-example.png
new file mode 100644
index 0000000..72fe3c4
--- /dev/null
+++ b/doc/src/images/defaultprototypes-example.png
Binary files differ
diff --git a/doc/src/images/deform-demo.png b/doc/src/images/deform-demo.png
new file mode 100644
index 0000000..2f037f0
--- /dev/null
+++ b/doc/src/images/deform-demo.png
Binary files differ
diff --git a/doc/src/images/delayedecoding-example.png b/doc/src/images/delayedecoding-example.png
new file mode 100644
index 0000000..1cafba6
--- /dev/null
+++ b/doc/src/images/delayedecoding-example.png
Binary files differ
diff --git a/doc/src/images/deployment-mac-application.png b/doc/src/images/deployment-mac-application.png
new file mode 100644
index 0000000..99ad23f
--- /dev/null
+++ b/doc/src/images/deployment-mac-application.png
Binary files differ
diff --git a/doc/src/images/deployment-mac-bundlestructure.png b/doc/src/images/deployment-mac-bundlestructure.png
new file mode 100644
index 0000000..db7a298
--- /dev/null
+++ b/doc/src/images/deployment-mac-bundlestructure.png
Binary files differ
diff --git a/doc/src/images/deployment-windows-depends.png b/doc/src/images/deployment-windows-depends.png
new file mode 100644
index 0000000..56c8439
--- /dev/null
+++ b/doc/src/images/deployment-windows-depends.png
Binary files differ
diff --git a/doc/src/images/designer-action-editor.png b/doc/src/images/designer-action-editor.png
new file mode 100644
index 0000000..7d17573
--- /dev/null
+++ b/doc/src/images/designer-action-editor.png
Binary files differ
diff --git a/doc/src/images/designer-add-custom-toolbar.png b/doc/src/images/designer-add-custom-toolbar.png
new file mode 100644
index 0000000..fe16586
--- /dev/null
+++ b/doc/src/images/designer-add-custom-toolbar.png
Binary files differ
diff --git a/doc/src/images/designer-add-files-button.png b/doc/src/images/designer-add-files-button.png
new file mode 100644
index 0000000..45ff4a0
--- /dev/null
+++ b/doc/src/images/designer-add-files-button.png
Binary files differ
diff --git a/doc/src/images/designer-add-resource-entry-button.png b/doc/src/images/designer-add-resource-entry-button.png
new file mode 100644
index 0000000..e29fcf8
--- /dev/null
+++ b/doc/src/images/designer-add-resource-entry-button.png
Binary files differ
diff --git a/doc/src/images/designer-adding-dockwidget.png b/doc/src/images/designer-adding-dockwidget.png
new file mode 100644
index 0000000..87b0fb8
--- /dev/null
+++ b/doc/src/images/designer-adding-dockwidget.png
Binary files differ
diff --git a/doc/src/images/designer-adding-dynamic-property.png b/doc/src/images/designer-adding-dynamic-property.png
new file mode 100644
index 0000000..a92320e
--- /dev/null
+++ b/doc/src/images/designer-adding-dynamic-property.png
Binary files differ
diff --git a/doc/src/images/designer-adding-menu-action.png b/doc/src/images/designer-adding-menu-action.png
new file mode 100644
index 0000000..cf2a9c9
--- /dev/null
+++ b/doc/src/images/designer-adding-menu-action.png
Binary files differ
diff --git a/doc/src/images/designer-adding-toolbar-action.png b/doc/src/images/designer-adding-toolbar-action.png
new file mode 100644
index 0000000..e2201cb
--- /dev/null
+++ b/doc/src/images/designer-adding-toolbar-action.png
Binary files differ
diff --git a/doc/src/images/designer-buddy-making.png b/doc/src/images/designer-buddy-making.png
new file mode 100644
index 0000000..3d8e8a1
--- /dev/null
+++ b/doc/src/images/designer-buddy-making.png
Binary files differ
diff --git a/doc/src/images/designer-buddy-mode.png b/doc/src/images/designer-buddy-mode.png
new file mode 100644
index 0000000..48197f6
--- /dev/null
+++ b/doc/src/images/designer-buddy-mode.png
Binary files differ
diff --git a/doc/src/images/designer-buddy-tool.png b/doc/src/images/designer-buddy-tool.png
new file mode 100644
index 0000000..2a42870
--- /dev/null
+++ b/doc/src/images/designer-buddy-tool.png
Binary files differ
diff --git a/doc/src/images/designer-choosing-form.png b/doc/src/images/designer-choosing-form.png
new file mode 100644
index 0000000..fa6e470
--- /dev/null
+++ b/doc/src/images/designer-choosing-form.png
Binary files differ
diff --git a/doc/src/images/designer-code-viewer.png b/doc/src/images/designer-code-viewer.png
new file mode 100644
index 0000000..c9d8528
--- /dev/null
+++ b/doc/src/images/designer-code-viewer.png
Binary files differ
diff --git a/doc/src/images/designer-connection-dialog.png b/doc/src/images/designer-connection-dialog.png
new file mode 100644
index 0000000..28dfeae
--- /dev/null
+++ b/doc/src/images/designer-connection-dialog.png
Binary files differ
diff --git a/doc/src/images/designer-connection-editing.png b/doc/src/images/designer-connection-editing.png
new file mode 100644
index 0000000..90b6a3a
--- /dev/null
+++ b/doc/src/images/designer-connection-editing.png
Binary files differ
diff --git a/doc/src/images/designer-connection-editor.png b/doc/src/images/designer-connection-editor.png
new file mode 100644
index 0000000..fd4d17d
--- /dev/null
+++ b/doc/src/images/designer-connection-editor.png
Binary files differ
diff --git a/doc/src/images/designer-connection-highlight.png b/doc/src/images/designer-connection-highlight.png
new file mode 100644
index 0000000..089d1e4
--- /dev/null
+++ b/doc/src/images/designer-connection-highlight.png
Binary files differ
diff --git a/doc/src/images/designer-connection-making.png b/doc/src/images/designer-connection-making.png
new file mode 100644
index 0000000..a7ce33f
--- /dev/null
+++ b/doc/src/images/designer-connection-making.png
Binary files differ
diff --git a/doc/src/images/designer-connection-mode.png b/doc/src/images/designer-connection-mode.png
new file mode 100644
index 0000000..8b98f9f
--- /dev/null
+++ b/doc/src/images/designer-connection-mode.png
Binary files differ
diff --git a/doc/src/images/designer-connection-to-form.png b/doc/src/images/designer-connection-to-form.png
new file mode 100644
index 0000000..320f70f
--- /dev/null
+++ b/doc/src/images/designer-connection-to-form.png
Binary files differ
diff --git a/doc/src/images/designer-connection-tool.png b/doc/src/images/designer-connection-tool.png
new file mode 100644
index 0000000..71c9b07
--- /dev/null
+++ b/doc/src/images/designer-connection-tool.png
Binary files differ
diff --git a/doc/src/images/designer-containers-dockwidget.png b/doc/src/images/designer-containers-dockwidget.png
new file mode 100644
index 0000000..f4dcc0b
--- /dev/null
+++ b/doc/src/images/designer-containers-dockwidget.png
Binary files differ
diff --git a/doc/src/images/designer-containers-frame.png b/doc/src/images/designer-containers-frame.png
new file mode 100644
index 0000000..d16823a
--- /dev/null
+++ b/doc/src/images/designer-containers-frame.png
Binary files differ
diff --git a/doc/src/images/designer-containers-groupbox.png b/doc/src/images/designer-containers-groupbox.png
new file mode 100644
index 0000000..d347e2f
--- /dev/null
+++ b/doc/src/images/designer-containers-groupbox.png
Binary files differ
diff --git a/doc/src/images/designer-containers-stackedwidget.png b/doc/src/images/designer-containers-stackedwidget.png
new file mode 100644
index 0000000..3239e52
--- /dev/null
+++ b/doc/src/images/designer-containers-stackedwidget.png
Binary files differ
diff --git a/doc/src/images/designer-containers-tabwidget.png b/doc/src/images/designer-containers-tabwidget.png
new file mode 100644
index 0000000..dab3dfd
--- /dev/null
+++ b/doc/src/images/designer-containers-tabwidget.png
Binary files differ
diff --git a/doc/src/images/designer-containers-toolbox.png b/doc/src/images/designer-containers-toolbox.png
new file mode 100644
index 0000000..e51fad6
--- /dev/null
+++ b/doc/src/images/designer-containers-toolbox.png
Binary files differ
diff --git a/doc/src/images/designer-creating-dynamic-property.png b/doc/src/images/designer-creating-dynamic-property.png
new file mode 100644
index 0000000..0d4f838
--- /dev/null
+++ b/doc/src/images/designer-creating-dynamic-property.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu-entry1.png b/doc/src/images/designer-creating-menu-entry1.png
new file mode 100644
index 0000000..1fcac22
--- /dev/null
+++ b/doc/src/images/designer-creating-menu-entry1.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu-entry2.png b/doc/src/images/designer-creating-menu-entry2.png
new file mode 100644
index 0000000..e7a537c
--- /dev/null
+++ b/doc/src/images/designer-creating-menu-entry2.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu-entry3.png b/doc/src/images/designer-creating-menu-entry3.png
new file mode 100644
index 0000000..f50a448
--- /dev/null
+++ b/doc/src/images/designer-creating-menu-entry3.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu-entry4.png b/doc/src/images/designer-creating-menu-entry4.png
new file mode 100644
index 0000000..aea6639
--- /dev/null
+++ b/doc/src/images/designer-creating-menu-entry4.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu.png b/doc/src/images/designer-creating-menu.png
new file mode 100644
index 0000000..5268aac
--- /dev/null
+++ b/doc/src/images/designer-creating-menu.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu1.png b/doc/src/images/designer-creating-menu1.png
new file mode 100644
index 0000000..ee2732a
--- /dev/null
+++ b/doc/src/images/designer-creating-menu1.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu2.png b/doc/src/images/designer-creating-menu2.png
new file mode 100644
index 0000000..95808d5
--- /dev/null
+++ b/doc/src/images/designer-creating-menu2.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu3.png b/doc/src/images/designer-creating-menu3.png
new file mode 100644
index 0000000..b9d80c0
--- /dev/null
+++ b/doc/src/images/designer-creating-menu3.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menu4.png b/doc/src/images/designer-creating-menu4.png
new file mode 100644
index 0000000..e05c931
--- /dev/null
+++ b/doc/src/images/designer-creating-menu4.png
Binary files differ
diff --git a/doc/src/images/designer-creating-menubar.png b/doc/src/images/designer-creating-menubar.png
new file mode 100644
index 0000000..87606f7
--- /dev/null
+++ b/doc/src/images/designer-creating-menubar.png
Binary files differ
diff --git a/doc/src/images/designer-custom-widget-box.png b/doc/src/images/designer-custom-widget-box.png
new file mode 100644
index 0000000..f3b9c1a
--- /dev/null
+++ b/doc/src/images/designer-custom-widget-box.png
Binary files differ
diff --git a/doc/src/images/designer-customize-toolbar.png b/doc/src/images/designer-customize-toolbar.png
new file mode 100644
index 0000000..3fad021
--- /dev/null
+++ b/doc/src/images/designer-customize-toolbar.png
Binary files differ
diff --git a/doc/src/images/designer-dialog-final.png b/doc/src/images/designer-dialog-final.png
new file mode 100644
index 0000000..0a75670
--- /dev/null
+++ b/doc/src/images/designer-dialog-final.png
Binary files differ
diff --git a/doc/src/images/designer-dialog-initial.png b/doc/src/images/designer-dialog-initial.png
new file mode 100644
index 0000000..a2ebbf0
--- /dev/null
+++ b/doc/src/images/designer-dialog-initial.png
Binary files differ
diff --git a/doc/src/images/designer-dialog-layout.png b/doc/src/images/designer-dialog-layout.png
new file mode 100644
index 0000000..bae945d
--- /dev/null
+++ b/doc/src/images/designer-dialog-layout.png
Binary files differ
diff --git a/doc/src/images/designer-dialog-preview.png b/doc/src/images/designer-dialog-preview.png
new file mode 100644
index 0000000..1059aea
--- /dev/null
+++ b/doc/src/images/designer-dialog-preview.png
Binary files differ
diff --git a/doc/src/images/designer-disambiguation.png b/doc/src/images/designer-disambiguation.png
new file mode 100644
index 0000000..364e70d
--- /dev/null
+++ b/doc/src/images/designer-disambiguation.png
Binary files differ
diff --git a/doc/src/images/designer-dragging-onto-form.png b/doc/src/images/designer-dragging-onto-form.png
new file mode 100644
index 0000000..07b4393
--- /dev/null
+++ b/doc/src/images/designer-dragging-onto-form.png
Binary files differ
diff --git a/doc/src/images/designer-edit-resource.png b/doc/src/images/designer-edit-resource.png
new file mode 100644
index 0000000..390087c
--- /dev/null
+++ b/doc/src/images/designer-edit-resource.png
Binary files differ
diff --git a/doc/src/images/designer-edit-resources-button.png b/doc/src/images/designer-edit-resources-button.png
new file mode 100644
index 0000000..1697836
--- /dev/null
+++ b/doc/src/images/designer-edit-resources-button.png
Binary files differ
diff --git a/doc/src/images/designer-editing-mode.png b/doc/src/images/designer-editing-mode.png
new file mode 100644
index 0000000..cd1c802
--- /dev/null
+++ b/doc/src/images/designer-editing-mode.png
Binary files differ
diff --git a/doc/src/images/designer-embedded-preview.png b/doc/src/images/designer-embedded-preview.png
new file mode 100644
index 0000000..afa6faf
--- /dev/null
+++ b/doc/src/images/designer-embedded-preview.png
Binary files differ
diff --git a/doc/src/images/designer-english-dialog.png b/doc/src/images/designer-english-dialog.png
new file mode 100644
index 0000000..591d971
--- /dev/null
+++ b/doc/src/images/designer-english-dialog.png
Binary files differ
diff --git a/doc/src/images/designer-examples.png b/doc/src/images/designer-examples.png
new file mode 100644
index 0000000..36e54f9
--- /dev/null
+++ b/doc/src/images/designer-examples.png
Binary files differ
diff --git a/doc/src/images/designer-file-menu.png b/doc/src/images/designer-file-menu.png
new file mode 100644
index 0000000..ae65f04
--- /dev/null
+++ b/doc/src/images/designer-file-menu.png
Binary files differ
diff --git a/doc/src/images/designer-find-icon.png b/doc/src/images/designer-find-icon.png
new file mode 100644
index 0000000..aa84bad
--- /dev/null
+++ b/doc/src/images/designer-find-icon.png
Binary files differ
diff --git a/doc/src/images/designer-form-layout-cleanlooks.png b/doc/src/images/designer-form-layout-cleanlooks.png
new file mode 100644
index 0000000..13d5674
--- /dev/null
+++ b/doc/src/images/designer-form-layout-cleanlooks.png
Binary files differ
diff --git a/doc/src/images/designer-form-layout-macintosh.png b/doc/src/images/designer-form-layout-macintosh.png
new file mode 100644
index 0000000..ead3069
--- /dev/null
+++ b/doc/src/images/designer-form-layout-macintosh.png
Binary files differ
diff --git a/doc/src/images/designer-form-layout-windowsXP.png b/doc/src/images/designer-form-layout-windowsXP.png
new file mode 100644
index 0000000..8389986
--- /dev/null
+++ b/doc/src/images/designer-form-layout-windowsXP.png
Binary files differ
diff --git a/doc/src/images/designer-form-layout.png b/doc/src/images/designer-form-layout.png
new file mode 100644
index 0000000..3fb5747
--- /dev/null
+++ b/doc/src/images/designer-form-layout.png
Binary files differ
diff --git a/doc/src/images/designer-form-layoutfunction.png b/doc/src/images/designer-form-layoutfunction.png
new file mode 100644
index 0000000..0c25605
--- /dev/null
+++ b/doc/src/images/designer-form-layoutfunction.png
Binary files differ
diff --git a/doc/src/images/designer-form-settings.png b/doc/src/images/designer-form-settings.png
new file mode 100644
index 0000000..522a978
--- /dev/null
+++ b/doc/src/images/designer-form-settings.png
Binary files differ
diff --git a/doc/src/images/designer-form-viewcode.png b/doc/src/images/designer-form-viewcode.png
new file mode 100644
index 0000000..d79fedd
--- /dev/null
+++ b/doc/src/images/designer-form-viewcode.png
Binary files differ
diff --git a/doc/src/images/designer-french-dialog.png b/doc/src/images/designer-french-dialog.png
new file mode 100644
index 0000000..f76a6e9
--- /dev/null
+++ b/doc/src/images/designer-french-dialog.png
Binary files differ
diff --git a/doc/src/images/designer-getting-started.png b/doc/src/images/designer-getting-started.png
new file mode 100644
index 0000000..7daea6c
--- /dev/null
+++ b/doc/src/images/designer-getting-started.png
Binary files differ
diff --git a/doc/src/images/designer-layout-inserting.png b/doc/src/images/designer-layout-inserting.png
new file mode 100644
index 0000000..2c3a8ce
--- /dev/null
+++ b/doc/src/images/designer-layout-inserting.png
Binary files differ
diff --git a/doc/src/images/designer-main-window.png b/doc/src/images/designer-main-window.png
new file mode 100644
index 0000000..99a6592
--- /dev/null
+++ b/doc/src/images/designer-main-window.png
Binary files differ
diff --git a/doc/src/images/designer-making-connection.png b/doc/src/images/designer-making-connection.png
new file mode 100644
index 0000000..b311536
--- /dev/null
+++ b/doc/src/images/designer-making-connection.png
Binary files differ
diff --git a/doc/src/images/designer-manual-containerextension.png b/doc/src/images/designer-manual-containerextension.png
new file mode 100644
index 0000000..1a82251
--- /dev/null
+++ b/doc/src/images/designer-manual-containerextension.png
Binary files differ
diff --git a/doc/src/images/designer-manual-membersheetextension.png b/doc/src/images/designer-manual-membersheetextension.png
new file mode 100644
index 0000000..7634d63
--- /dev/null
+++ b/doc/src/images/designer-manual-membersheetextension.png
Binary files differ
diff --git a/doc/src/images/designer-manual-propertysheetextension.png b/doc/src/images/designer-manual-propertysheetextension.png
new file mode 100644
index 0000000..a8d2d42
--- /dev/null
+++ b/doc/src/images/designer-manual-propertysheetextension.png
Binary files differ
diff --git a/doc/src/images/designer-manual-taskmenuextension.png b/doc/src/images/designer-manual-taskmenuextension.png
new file mode 100644
index 0000000..cf949bc
--- /dev/null
+++ b/doc/src/images/designer-manual-taskmenuextension.png
Binary files differ
diff --git a/doc/src/images/designer-multiple-screenshot.png b/doc/src/images/designer-multiple-screenshot.png
new file mode 100644
index 0000000..1531903
--- /dev/null
+++ b/doc/src/images/designer-multiple-screenshot.png
Binary files differ
diff --git a/doc/src/images/designer-object-inspector.png b/doc/src/images/designer-object-inspector.png
new file mode 100644
index 0000000..c7f3180
--- /dev/null
+++ b/doc/src/images/designer-object-inspector.png
Binary files differ
diff --git a/doc/src/images/designer-palette-brush-editor.png b/doc/src/images/designer-palette-brush-editor.png
new file mode 100644
index 0000000..b4a9e0f
--- /dev/null
+++ b/doc/src/images/designer-palette-brush-editor.png
Binary files differ
diff --git a/doc/src/images/designer-palette-editor.png b/doc/src/images/designer-palette-editor.png
new file mode 100644
index 0000000..7333abe
--- /dev/null
+++ b/doc/src/images/designer-palette-editor.png
Binary files differ
diff --git a/doc/src/images/designer-palette-gradient-editor.png b/doc/src/images/designer-palette-gradient-editor.png
new file mode 100644
index 0000000..d4b4d66
--- /dev/null
+++ b/doc/src/images/designer-palette-gradient-editor.png
Binary files differ
diff --git a/doc/src/images/designer-palette-pattern-editor.png b/doc/src/images/designer-palette-pattern-editor.png
new file mode 100644
index 0000000..8117e0e
--- /dev/null
+++ b/doc/src/images/designer-palette-pattern-editor.png
Binary files differ
diff --git a/doc/src/images/designer-preview-device-skin.png b/doc/src/images/designer-preview-device-skin.png
new file mode 100644
index 0000000..5fc7836
--- /dev/null
+++ b/doc/src/images/designer-preview-device-skin.png
Binary files differ
diff --git a/doc/src/images/designer-preview-deviceskin-selection.png b/doc/src/images/designer-preview-deviceskin-selection.png
new file mode 100644
index 0000000..3b6aec4
--- /dev/null
+++ b/doc/src/images/designer-preview-deviceskin-selection.png
Binary files differ
diff --git a/doc/src/images/designer-preview-style-selection.png b/doc/src/images/designer-preview-style-selection.png
new file mode 100644
index 0000000..e64cf6e
--- /dev/null
+++ b/doc/src/images/designer-preview-style-selection.png
Binary files differ
diff --git a/doc/src/images/designer-preview-style.png b/doc/src/images/designer-preview-style.png
new file mode 100644
index 0000000..54a243a
--- /dev/null
+++ b/doc/src/images/designer-preview-style.png
Binary files differ
diff --git a/doc/src/images/designer-preview-stylesheet.png b/doc/src/images/designer-preview-stylesheet.png
new file mode 100644
index 0000000..ef9ef4f
--- /dev/null
+++ b/doc/src/images/designer-preview-stylesheet.png
Binary files differ
diff --git a/doc/src/images/designer-promoting-widgets.png b/doc/src/images/designer-promoting-widgets.png
new file mode 100644
index 0000000..2377560
--- /dev/null
+++ b/doc/src/images/designer-promoting-widgets.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor-add-dynamic.png b/doc/src/images/designer-property-editor-add-dynamic.png
new file mode 100644
index 0000000..c7f4cf1
--- /dev/null
+++ b/doc/src/images/designer-property-editor-add-dynamic.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor-configure.png b/doc/src/images/designer-property-editor-configure.png
new file mode 100644
index 0000000..2a96fe3
--- /dev/null
+++ b/doc/src/images/designer-property-editor-configure.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor-link.png b/doc/src/images/designer-property-editor-link.png
new file mode 100644
index 0000000..e43a530
--- /dev/null
+++ b/doc/src/images/designer-property-editor-link.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor-remove-dynamic.png b/doc/src/images/designer-property-editor-remove-dynamic.png
new file mode 100644
index 0000000..cb6ccaa
--- /dev/null
+++ b/doc/src/images/designer-property-editor-remove-dynamic.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor-toolbar.png b/doc/src/images/designer-property-editor-toolbar.png
new file mode 100644
index 0000000..ae6345e
--- /dev/null
+++ b/doc/src/images/designer-property-editor-toolbar.png
Binary files differ
diff --git a/doc/src/images/designer-property-editor.png b/doc/src/images/designer-property-editor.png
new file mode 100644
index 0000000..fad2309
--- /dev/null
+++ b/doc/src/images/designer-property-editor.png
Binary files differ
diff --git a/doc/src/images/designer-reload-resources-button.png b/doc/src/images/designer-reload-resources-button.png
new file mode 100644
index 0000000..c101e76
--- /dev/null
+++ b/doc/src/images/designer-reload-resources-button.png
Binary files differ
diff --git a/doc/src/images/designer-remove-custom-toolbar.png b/doc/src/images/designer-remove-custom-toolbar.png
new file mode 100644
index 0000000..3fecfc2
--- /dev/null
+++ b/doc/src/images/designer-remove-custom-toolbar.png
Binary files differ
diff --git a/doc/src/images/designer-remove-resource-entry-button.png b/doc/src/images/designer-remove-resource-entry-button.png
new file mode 100644
index 0000000..aa3b9d6
--- /dev/null
+++ b/doc/src/images/designer-remove-resource-entry-button.png
Binary files differ
diff --git a/doc/src/images/designer-resource-browser.png b/doc/src/images/designer-resource-browser.png
new file mode 100644
index 0000000..213a58b
--- /dev/null
+++ b/doc/src/images/designer-resource-browser.png
Binary files differ
diff --git a/doc/src/images/designer-resource-selector.png b/doc/src/images/designer-resource-selector.png
new file mode 100644
index 0000000..31a4cb1
--- /dev/null
+++ b/doc/src/images/designer-resource-selector.png
Binary files differ
diff --git a/doc/src/images/designer-resource-tool.png b/doc/src/images/designer-resource-tool.png
new file mode 100644
index 0000000..7ef511c
--- /dev/null
+++ b/doc/src/images/designer-resource-tool.png
Binary files differ
diff --git a/doc/src/images/designer-resources-adding.png b/doc/src/images/designer-resources-adding.png
new file mode 100644
index 0000000..a417bbd
--- /dev/null
+++ b/doc/src/images/designer-resources-adding.png
Binary files differ
diff --git a/doc/src/images/designer-resources-editing.png b/doc/src/images/designer-resources-editing.png
new file mode 100644
index 0000000..6b8aee7
--- /dev/null
+++ b/doc/src/images/designer-resources-editing.png
Binary files differ
diff --git a/doc/src/images/designer-resources-empty.png b/doc/src/images/designer-resources-empty.png
new file mode 100644
index 0000000..47a45d0
--- /dev/null
+++ b/doc/src/images/designer-resources-empty.png
Binary files differ
diff --git a/doc/src/images/designer-resources-using.png b/doc/src/images/designer-resources-using.png
new file mode 100644
index 0000000..4ce9ca2
--- /dev/null
+++ b/doc/src/images/designer-resources-using.png
Binary files differ
diff --git a/doc/src/images/designer-screenshot-small.png b/doc/src/images/designer-screenshot-small.png
new file mode 100644
index 0000000..ad4096b
--- /dev/null
+++ b/doc/src/images/designer-screenshot-small.png
Binary files differ
diff --git a/doc/src/images/designer-screenshot.png b/doc/src/images/designer-screenshot.png
new file mode 100644
index 0000000..1700b06
--- /dev/null
+++ b/doc/src/images/designer-screenshot.png
Binary files differ
diff --git a/doc/src/images/designer-selecting-widget.png b/doc/src/images/designer-selecting-widget.png
new file mode 100644
index 0000000..a358d30
--- /dev/null
+++ b/doc/src/images/designer-selecting-widget.png
Binary files differ
diff --git a/doc/src/images/designer-selecting-widgets.png b/doc/src/images/designer-selecting-widgets.png
new file mode 100644
index 0000000..93d315f
--- /dev/null
+++ b/doc/src/images/designer-selecting-widgets.png
Binary files differ
diff --git a/doc/src/images/designer-set-layout.png b/doc/src/images/designer-set-layout.png
new file mode 100644
index 0000000..86b4ecc
--- /dev/null
+++ b/doc/src/images/designer-set-layout.png
Binary files differ
diff --git a/doc/src/images/designer-set-layout2.png b/doc/src/images/designer-set-layout2.png
new file mode 100644
index 0000000..e93f4dc
--- /dev/null
+++ b/doc/src/images/designer-set-layout2.png
Binary files differ
diff --git a/doc/src/images/designer-splitter-layout.png b/doc/src/images/designer-splitter-layout.png
new file mode 100644
index 0000000..2646c28
--- /dev/null
+++ b/doc/src/images/designer-splitter-layout.png
Binary files differ
diff --git a/doc/src/images/designer-stylesheet-options.png b/doc/src/images/designer-stylesheet-options.png
new file mode 100644
index 0000000..a6893e7
--- /dev/null
+++ b/doc/src/images/designer-stylesheet-options.png
Binary files differ
diff --git a/doc/src/images/designer-stylesheet-usage.png b/doc/src/images/designer-stylesheet-usage.png
new file mode 100644
index 0000000..f687590
--- /dev/null
+++ b/doc/src/images/designer-stylesheet-usage.png
Binary files differ
diff --git a/doc/src/images/designer-tab-order-mode.png b/doc/src/images/designer-tab-order-mode.png
new file mode 100644
index 0000000..8135f3b
--- /dev/null
+++ b/doc/src/images/designer-tab-order-mode.png
Binary files differ
diff --git a/doc/src/images/designer-tab-order-tool.png b/doc/src/images/designer-tab-order-tool.png
new file mode 100644
index 0000000..f54faf9
--- /dev/null
+++ b/doc/src/images/designer-tab-order-tool.png
Binary files differ
diff --git a/doc/src/images/designer-validator-highlighter.png b/doc/src/images/designer-validator-highlighter.png
new file mode 100644
index 0000000..a6661d5
--- /dev/null
+++ b/doc/src/images/designer-validator-highlighter.png
Binary files differ
diff --git a/doc/src/images/designer-widget-box.png b/doc/src/images/designer-widget-box.png
new file mode 100644
index 0000000..bfbc5b7
--- /dev/null
+++ b/doc/src/images/designer-widget-box.png
Binary files differ
diff --git a/doc/src/images/designer-widget-filter.png b/doc/src/images/designer-widget-filter.png
new file mode 100644
index 0000000..ac13a0a
--- /dev/null
+++ b/doc/src/images/designer-widget-filter.png
Binary files differ
diff --git a/doc/src/images/designer-widget-final.png b/doc/src/images/designer-widget-final.png
new file mode 100644
index 0000000..f8acd9f
--- /dev/null
+++ b/doc/src/images/designer-widget-final.png
Binary files differ
diff --git a/doc/src/images/designer-widget-initial.png b/doc/src/images/designer-widget-initial.png
new file mode 100644
index 0000000..d564fbe
--- /dev/null
+++ b/doc/src/images/designer-widget-initial.png
Binary files differ
diff --git a/doc/src/images/designer-widget-layout.png b/doc/src/images/designer-widget-layout.png
new file mode 100644
index 0000000..4788170
--- /dev/null
+++ b/doc/src/images/designer-widget-layout.png
Binary files differ
diff --git a/doc/src/images/designer-widget-morph.png b/doc/src/images/designer-widget-morph.png
new file mode 100644
index 0000000..974bc0e
--- /dev/null
+++ b/doc/src/images/designer-widget-morph.png
Binary files differ
diff --git a/doc/src/images/designer-widget-preview.png b/doc/src/images/designer-widget-preview.png
new file mode 100644
index 0000000..e456564
--- /dev/null
+++ b/doc/src/images/designer-widget-preview.png
Binary files differ
diff --git a/doc/src/images/designer-widget-tool.png b/doc/src/images/designer-widget-tool.png
new file mode 100644
index 0000000..e1aa353
--- /dev/null
+++ b/doc/src/images/designer-widget-tool.png
Binary files differ
diff --git a/doc/src/images/desktop-examples.png b/doc/src/images/desktop-examples.png
new file mode 100644
index 0000000..86b16b4
--- /dev/null
+++ b/doc/src/images/desktop-examples.png
Binary files differ
diff --git a/doc/src/images/diagonalGradient.png b/doc/src/images/diagonalGradient.png
new file mode 100644
index 0000000..623d362
--- /dev/null
+++ b/doc/src/images/diagonalGradient.png
Binary files differ
diff --git a/doc/src/images/diagramscene.png b/doc/src/images/diagramscene.png
new file mode 100644
index 0000000..c84fc81
--- /dev/null
+++ b/doc/src/images/diagramscene.png
Binary files differ
diff --git a/doc/src/images/dialog-examples.png b/doc/src/images/dialog-examples.png
new file mode 100644
index 0000000..26537b5
--- /dev/null
+++ b/doc/src/images/dialog-examples.png
Binary files differ
diff --git a/doc/src/images/dialogbuttonboxexample.png b/doc/src/images/dialogbuttonboxexample.png
new file mode 100644
index 0000000..baa62d3
--- /dev/null
+++ b/doc/src/images/dialogbuttonboxexample.png
Binary files differ
diff --git a/doc/src/images/dialogs-examples.png b/doc/src/images/dialogs-examples.png
new file mode 100644
index 0000000..45bf0ab
--- /dev/null
+++ b/doc/src/images/dialogs-examples.png
Binary files differ
diff --git a/doc/src/images/digitalclock-example.png b/doc/src/images/digitalclock-example.png
new file mode 100644
index 0000000..4739866
--- /dev/null
+++ b/doc/src/images/digitalclock-example.png
Binary files differ
diff --git a/doc/src/images/directapproach-calculatorform.png b/doc/src/images/directapproach-calculatorform.png
new file mode 100644
index 0000000..2b87ed1
--- /dev/null
+++ b/doc/src/images/directapproach-calculatorform.png
Binary files differ
diff --git a/doc/src/images/dirview-example.png b/doc/src/images/dirview-example.png
new file mode 100644
index 0000000..6412ead
--- /dev/null
+++ b/doc/src/images/dirview-example.png
Binary files differ
diff --git a/doc/src/images/dockwidget-cross.png b/doc/src/images/dockwidget-cross.png
new file mode 100644
index 0000000..35db6a2
--- /dev/null
+++ b/doc/src/images/dockwidget-cross.png
Binary files differ
diff --git a/doc/src/images/dockwidget-neighbors.png b/doc/src/images/dockwidget-neighbors.png
new file mode 100644
index 0000000..d299ce6
--- /dev/null
+++ b/doc/src/images/dockwidget-neighbors.png
Binary files differ
diff --git a/doc/src/images/dockwidgets-example.png b/doc/src/images/dockwidgets-example.png
new file mode 100644
index 0000000..2a2d6f8
--- /dev/null
+++ b/doc/src/images/dockwidgets-example.png
Binary files differ
diff --git a/doc/src/images/dombookmarks-example.png b/doc/src/images/dombookmarks-example.png
new file mode 100644
index 0000000..abacacb
--- /dev/null
+++ b/doc/src/images/dombookmarks-example.png
Binary files differ
diff --git a/doc/src/images/draganddrop-examples.png b/doc/src/images/draganddrop-examples.png
new file mode 100644
index 0000000..89d9e50
--- /dev/null
+++ b/doc/src/images/draganddrop-examples.png
Binary files differ
diff --git a/doc/src/images/draganddroppuzzle-example.png b/doc/src/images/draganddroppuzzle-example.png
new file mode 100644
index 0000000..8122782
--- /dev/null
+++ b/doc/src/images/draganddroppuzzle-example.png
Binary files differ
diff --git a/doc/src/images/dragdroprobot-example.png b/doc/src/images/dragdroprobot-example.png
new file mode 100644
index 0000000..53aae77
--- /dev/null
+++ b/doc/src/images/dragdroprobot-example.png
Binary files differ
diff --git a/doc/src/images/draggableicons-example.png b/doc/src/images/draggableicons-example.png
new file mode 100644
index 0000000..003ce13
--- /dev/null
+++ b/doc/src/images/draggableicons-example.png
Binary files differ
diff --git a/doc/src/images/draggabletext-example.png b/doc/src/images/draggabletext-example.png
new file mode 100644
index 0000000..f9b2281
--- /dev/null
+++ b/doc/src/images/draggabletext-example.png
Binary files differ
diff --git a/doc/src/images/draw_arc.png b/doc/src/images/draw_arc.png
new file mode 100644
index 0000000..6e72108
--- /dev/null
+++ b/doc/src/images/draw_arc.png
Binary files differ
diff --git a/doc/src/images/draw_chord.png b/doc/src/images/draw_chord.png
new file mode 100644
index 0000000..4d4ab50
--- /dev/null
+++ b/doc/src/images/draw_chord.png
Binary files differ
diff --git a/doc/src/images/drilldown-example.png b/doc/src/images/drilldown-example.png
new file mode 100644
index 0000000..68353f7
--- /dev/null
+++ b/doc/src/images/drilldown-example.png
Binary files differ
diff --git a/doc/src/images/dropsite-example.png b/doc/src/images/dropsite-example.png
new file mode 100644
index 0000000..42b988d
--- /dev/null
+++ b/doc/src/images/dropsite-example.png
Binary files differ
diff --git a/doc/src/images/dynamiclayouts-example.png b/doc/src/images/dynamiclayouts-example.png
new file mode 100644
index 0000000..65d8150
--- /dev/null
+++ b/doc/src/images/dynamiclayouts-example.png
Binary files differ
diff --git a/doc/src/images/echopluginexample.png b/doc/src/images/echopluginexample.png
new file mode 100644
index 0000000..7cb1e4d
--- /dev/null
+++ b/doc/src/images/echopluginexample.png
Binary files differ
diff --git a/doc/src/images/effectwidget.png b/doc/src/images/effectwidget.png
new file mode 100644
index 0000000..d4a0fc4
--- /dev/null
+++ b/doc/src/images/effectwidget.png
Binary files differ
diff --git a/doc/src/images/elasticnodes-example.png b/doc/src/images/elasticnodes-example.png
new file mode 100644
index 0000000..840f74fe
--- /dev/null
+++ b/doc/src/images/elasticnodes-example.png
Binary files differ
diff --git a/doc/src/images/embedded-demo-launcher.png b/doc/src/images/embedded-demo-launcher.png
new file mode 100644
index 0000000..deafc7b
--- /dev/null
+++ b/doc/src/images/embedded-demo-launcher.png
Binary files differ
diff --git a/doc/src/images/embedded-simpledecoration-example-styles.png b/doc/src/images/embedded-simpledecoration-example-styles.png
new file mode 100644
index 0000000..b2ad83c
--- /dev/null
+++ b/doc/src/images/embedded-simpledecoration-example-styles.png
Binary files differ
diff --git a/doc/src/images/embedded-simpledecoration-example.png b/doc/src/images/embedded-simpledecoration-example.png
new file mode 100644
index 0000000..bfd0450
--- /dev/null
+++ b/doc/src/images/embedded-simpledecoration-example.png
Binary files differ
diff --git a/doc/src/images/embeddeddialogs-demo.png b/doc/src/images/embeddeddialogs-demo.png
new file mode 100644
index 0000000..d0da4b6
--- /dev/null
+++ b/doc/src/images/embeddeddialogs-demo.png
Binary files differ
diff --git a/doc/src/images/extension-example.png b/doc/src/images/extension-example.png
new file mode 100644
index 0000000..dfaacc0
--- /dev/null
+++ b/doc/src/images/extension-example.png
Binary files differ
diff --git a/doc/src/images/extension_more.png b/doc/src/images/extension_more.png
new file mode 100644
index 0000000..2b06809
--- /dev/null
+++ b/doc/src/images/extension_more.png
Binary files differ
diff --git a/doc/src/images/fetchmore-example.png b/doc/src/images/fetchmore-example.png
new file mode 100644
index 0000000..d2359dc
--- /dev/null
+++ b/doc/src/images/fetchmore-example.png
Binary files differ
diff --git a/doc/src/images/filedialogurls.png b/doc/src/images/filedialogurls.png
new file mode 100644
index 0000000..7d22ef3
--- /dev/null
+++ b/doc/src/images/filedialogurls.png
Binary files differ
diff --git a/doc/src/images/filetree_1-example.png b/doc/src/images/filetree_1-example.png
new file mode 100644
index 0000000..7e19174
--- /dev/null
+++ b/doc/src/images/filetree_1-example.png
Binary files differ
diff --git a/doc/src/images/filetree_2-example.png b/doc/src/images/filetree_2-example.png
new file mode 100644
index 0000000..cb794c5
--- /dev/null
+++ b/doc/src/images/filetree_2-example.png
Binary files differ
diff --git a/doc/src/images/findfiles-example.png b/doc/src/images/findfiles-example.png
new file mode 100644
index 0000000..acb5ea1
--- /dev/null
+++ b/doc/src/images/findfiles-example.png
Binary files differ
diff --git a/doc/src/images/findfiles_progress_dialog.png b/doc/src/images/findfiles_progress_dialog.png
new file mode 100644
index 0000000..05eda2c
--- /dev/null
+++ b/doc/src/images/findfiles_progress_dialog.png
Binary files differ
diff --git a/doc/src/images/flowlayout-example.png b/doc/src/images/flowlayout-example.png
new file mode 100644
index 0000000..27660d6
--- /dev/null
+++ b/doc/src/images/flowlayout-example.png
Binary files differ
diff --git a/doc/src/images/fontsampler-example.png b/doc/src/images/fontsampler-example.png
new file mode 100644
index 0000000..7df4a50
--- /dev/null
+++ b/doc/src/images/fontsampler-example.png
Binary files differ
diff --git a/doc/src/images/foreignkeys.png b/doc/src/images/foreignkeys.png
new file mode 100644
index 0000000..7a6a19b
--- /dev/null
+++ b/doc/src/images/foreignkeys.png
Binary files differ
diff --git a/doc/src/images/formextractor-example.png b/doc/src/images/formextractor-example.png
new file mode 100644
index 0000000..155cdaa
--- /dev/null
+++ b/doc/src/images/formextractor-example.png
Binary files differ
diff --git a/doc/src/images/fortuneclient-example.png b/doc/src/images/fortuneclient-example.png
new file mode 100644
index 0000000..b34a987
--- /dev/null
+++ b/doc/src/images/fortuneclient-example.png
Binary files differ
diff --git a/doc/src/images/fortuneserver-example.png b/doc/src/images/fortuneserver-example.png
new file mode 100644
index 0000000..73f27d5
--- /dev/null
+++ b/doc/src/images/fortuneserver-example.png
Binary files differ
diff --git a/doc/src/images/framebufferobject-example.png b/doc/src/images/framebufferobject-example.png
new file mode 100644
index 0000000..df9b6db
--- /dev/null
+++ b/doc/src/images/framebufferobject-example.png
Binary files differ
diff --git a/doc/src/images/framebufferobject2-example.png b/doc/src/images/framebufferobject2-example.png
new file mode 100644
index 0000000..bafb05a
--- /dev/null
+++ b/doc/src/images/framebufferobject2-example.png
Binary files differ
diff --git a/doc/src/images/frames.png b/doc/src/images/frames.png
new file mode 100644
index 0000000..13c0850
--- /dev/null
+++ b/doc/src/images/frames.png
Binary files differ
diff --git a/doc/src/images/fridgemagnets-example.png b/doc/src/images/fridgemagnets-example.png
new file mode 100644
index 0000000..9adb572
--- /dev/null
+++ b/doc/src/images/fridgemagnets-example.png
Binary files differ
diff --git a/doc/src/images/ftp-example.png b/doc/src/images/ftp-example.png
new file mode 100644
index 0000000..504c658
--- /dev/null
+++ b/doc/src/images/ftp-example.png
Binary files differ
diff --git a/doc/src/images/geometry.png b/doc/src/images/geometry.png
new file mode 100644
index 0000000..c69e11d
--- /dev/null
+++ b/doc/src/images/geometry.png
Binary files differ
diff --git a/doc/src/images/grabber-example.png b/doc/src/images/grabber-example.png
new file mode 100644
index 0000000..6a05b94
--- /dev/null
+++ b/doc/src/images/grabber-example.png
Binary files differ
diff --git a/doc/src/images/gradientText.png b/doc/src/images/gradientText.png
new file mode 100644
index 0000000..9ee7164
--- /dev/null
+++ b/doc/src/images/gradientText.png
Binary files differ
diff --git a/doc/src/images/gradients-demo.png b/doc/src/images/gradients-demo.png
new file mode 100644
index 0000000..d80708e
--- /dev/null
+++ b/doc/src/images/gradients-demo.png
Binary files differ
diff --git a/doc/src/images/graphicsview-ellipseitem-pie.png b/doc/src/images/graphicsview-ellipseitem-pie.png
new file mode 100644
index 0000000..136175a
--- /dev/null
+++ b/doc/src/images/graphicsview-ellipseitem-pie.png
Binary files differ
diff --git a/doc/src/images/graphicsview-ellipseitem.png b/doc/src/images/graphicsview-ellipseitem.png
new file mode 100644
index 0000000..7c7a8e5
--- /dev/null
+++ b/doc/src/images/graphicsview-ellipseitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-examples.png b/doc/src/images/graphicsview-examples.png
new file mode 100644
index 0000000..b58bdc3
--- /dev/null
+++ b/doc/src/images/graphicsview-examples.png
Binary files differ
diff --git a/doc/src/images/graphicsview-items.png b/doc/src/images/graphicsview-items.png
new file mode 100644
index 0000000..73be2dd
--- /dev/null
+++ b/doc/src/images/graphicsview-items.png
Binary files differ
diff --git a/doc/src/images/graphicsview-lineitem.png b/doc/src/images/graphicsview-lineitem.png
new file mode 100644
index 0000000..952a3c2
--- /dev/null
+++ b/doc/src/images/graphicsview-lineitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-map.png b/doc/src/images/graphicsview-map.png
new file mode 100644
index 0000000..e7f5ac6
--- /dev/null
+++ b/doc/src/images/graphicsview-map.png
Binary files differ
diff --git a/doc/src/images/graphicsview-parentchild.png b/doc/src/images/graphicsview-parentchild.png
new file mode 100644
index 0000000..0fc2dbf
--- /dev/null
+++ b/doc/src/images/graphicsview-parentchild.png
Binary files differ
diff --git a/doc/src/images/graphicsview-pathitem.png b/doc/src/images/graphicsview-pathitem.png
new file mode 100644
index 0000000..c1ddd56
--- /dev/null
+++ b/doc/src/images/graphicsview-pathitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-pixmapitem.png b/doc/src/images/graphicsview-pixmapitem.png
new file mode 100644
index 0000000..d14fac5
--- /dev/null
+++ b/doc/src/images/graphicsview-pixmapitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-polygonitem.png b/doc/src/images/graphicsview-polygonitem.png
new file mode 100644
index 0000000..3cd2232
--- /dev/null
+++ b/doc/src/images/graphicsview-polygonitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-rectitem.png b/doc/src/images/graphicsview-rectitem.png
new file mode 100644
index 0000000..a5917e5
--- /dev/null
+++ b/doc/src/images/graphicsview-rectitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-shapes.png b/doc/src/images/graphicsview-shapes.png
new file mode 100644
index 0000000..466eb33
--- /dev/null
+++ b/doc/src/images/graphicsview-shapes.png
Binary files differ
diff --git a/doc/src/images/graphicsview-simpletextitem.png b/doc/src/images/graphicsview-simpletextitem.png
new file mode 100644
index 0000000..908d67f
--- /dev/null
+++ b/doc/src/images/graphicsview-simpletextitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-text.png b/doc/src/images/graphicsview-text.png
new file mode 100644
index 0000000..e7441df
--- /dev/null
+++ b/doc/src/images/graphicsview-text.png
Binary files differ
diff --git a/doc/src/images/graphicsview-textitem.png b/doc/src/images/graphicsview-textitem.png
new file mode 100644
index 0000000..f1ae3c0
--- /dev/null
+++ b/doc/src/images/graphicsview-textitem.png
Binary files differ
diff --git a/doc/src/images/graphicsview-view.png b/doc/src/images/graphicsview-view.png
new file mode 100644
index 0000000..212195f
--- /dev/null
+++ b/doc/src/images/graphicsview-view.png
Binary files differ
diff --git a/doc/src/images/graphicsview-zorder.png b/doc/src/images/graphicsview-zorder.png
new file mode 100644
index 0000000..a1cc3d0
--- /dev/null
+++ b/doc/src/images/graphicsview-zorder.png
Binary files differ
diff --git a/doc/src/images/gridlayout.png b/doc/src/images/gridlayout.png
new file mode 100644
index 0000000..ae76c04
--- /dev/null
+++ b/doc/src/images/gridlayout.png
Binary files differ
diff --git a/doc/src/images/groupbox-example.png b/doc/src/images/groupbox-example.png
new file mode 100644
index 0000000..443f812
--- /dev/null
+++ b/doc/src/images/groupbox-example.png
Binary files differ
diff --git a/doc/src/images/gtk-calendarwidget.png b/doc/src/images/gtk-calendarwidget.png
new file mode 100644
index 0000000..568cd1a
--- /dev/null
+++ b/doc/src/images/gtk-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/gtk-checkbox.png b/doc/src/images/gtk-checkbox.png
new file mode 100644
index 0000000..1fd5fc7
--- /dev/null
+++ b/doc/src/images/gtk-checkbox.png
Binary files differ
diff --git a/doc/src/images/gtk-columnview.png b/doc/src/images/gtk-columnview.png
new file mode 100644
index 0000000..548ce8b
--- /dev/null
+++ b/doc/src/images/gtk-columnview.png
Binary files differ
diff --git a/doc/src/images/gtk-combobox.png b/doc/src/images/gtk-combobox.png
new file mode 100644
index 0000000..3b4544d
--- /dev/null
+++ b/doc/src/images/gtk-combobox.png
Binary files differ
diff --git a/doc/src/images/gtk-dateedit.png b/doc/src/images/gtk-dateedit.png
new file mode 100644
index 0000000..25229f0
--- /dev/null
+++ b/doc/src/images/gtk-dateedit.png
Binary files differ
diff --git a/doc/src/images/gtk-datetimeedit.png b/doc/src/images/gtk-datetimeedit.png
new file mode 100644
index 0000000..0c934a4
--- /dev/null
+++ b/doc/src/images/gtk-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/gtk-dial.png b/doc/src/images/gtk-dial.png
new file mode 100644
index 0000000..18e14b3
--- /dev/null
+++ b/doc/src/images/gtk-dial.png
Binary files differ
diff --git a/doc/src/images/gtk-doublespinbox.png b/doc/src/images/gtk-doublespinbox.png
new file mode 100644
index 0000000..3a69043
--- /dev/null
+++ b/doc/src/images/gtk-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/gtk-fontcombobox.png b/doc/src/images/gtk-fontcombobox.png
new file mode 100644
index 0000000..4cb1bc1
--- /dev/null
+++ b/doc/src/images/gtk-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/gtk-frame.png b/doc/src/images/gtk-frame.png
new file mode 100644
index 0000000..c1bf52f
--- /dev/null
+++ b/doc/src/images/gtk-frame.png
Binary files differ
diff --git a/doc/src/images/gtk-groupbox.png b/doc/src/images/gtk-groupbox.png
new file mode 100644
index 0000000..6d217c8
--- /dev/null
+++ b/doc/src/images/gtk-groupbox.png
Binary files differ
diff --git a/doc/src/images/gtk-horizontalscrollbar.png b/doc/src/images/gtk-horizontalscrollbar.png
new file mode 100644
index 0000000..2887730
--- /dev/null
+++ b/doc/src/images/gtk-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/gtk-label.png b/doc/src/images/gtk-label.png
new file mode 100644
index 0000000..006d013
--- /dev/null
+++ b/doc/src/images/gtk-label.png
Binary files differ
diff --git a/doc/src/images/gtk-lcdnumber.png b/doc/src/images/gtk-lcdnumber.png
new file mode 100644
index 0000000..142d298
--- /dev/null
+++ b/doc/src/images/gtk-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/gtk-lineedit.png b/doc/src/images/gtk-lineedit.png
new file mode 100644
index 0000000..8fb513c
--- /dev/null
+++ b/doc/src/images/gtk-lineedit.png
Binary files differ
diff --git a/doc/src/images/gtk-listview.png b/doc/src/images/gtk-listview.png
new file mode 100644
index 0000000..d32f8e8
--- /dev/null
+++ b/doc/src/images/gtk-listview.png
Binary files differ
diff --git a/doc/src/images/gtk-progressbar.png b/doc/src/images/gtk-progressbar.png
new file mode 100644
index 0000000..6162484
--- /dev/null
+++ b/doc/src/images/gtk-progressbar.png
Binary files differ
diff --git a/doc/src/images/gtk-pushbutton.png b/doc/src/images/gtk-pushbutton.png
new file mode 100644
index 0000000..f4f4d7c
--- /dev/null
+++ b/doc/src/images/gtk-pushbutton.png
Binary files differ
diff --git a/doc/src/images/gtk-radiobutton.png b/doc/src/images/gtk-radiobutton.png
new file mode 100644
index 0000000..b3620fa
--- /dev/null
+++ b/doc/src/images/gtk-radiobutton.png
Binary files differ
diff --git a/doc/src/images/gtk-slider.png b/doc/src/images/gtk-slider.png
new file mode 100644
index 0000000..3d8e0ee
--- /dev/null
+++ b/doc/src/images/gtk-slider.png
Binary files differ
diff --git a/doc/src/images/gtk-spinbox.png b/doc/src/images/gtk-spinbox.png
new file mode 100644
index 0000000..a39eb3a
--- /dev/null
+++ b/doc/src/images/gtk-spinbox.png
Binary files differ
diff --git a/doc/src/images/gtk-style-screenshot.png b/doc/src/images/gtk-style-screenshot.png
new file mode 100644
index 0000000..2d493a0
--- /dev/null
+++ b/doc/src/images/gtk-style-screenshot.png
Binary files differ
diff --git a/doc/src/images/gtk-tableview.png b/doc/src/images/gtk-tableview.png
new file mode 100644
index 0000000..a025193
--- /dev/null
+++ b/doc/src/images/gtk-tableview.png
Binary files differ
diff --git a/doc/src/images/gtk-tabwidget.png b/doc/src/images/gtk-tabwidget.png
new file mode 100644
index 0000000..089c76d
--- /dev/null
+++ b/doc/src/images/gtk-tabwidget.png
Binary files differ
diff --git a/doc/src/images/gtk-textedit.png b/doc/src/images/gtk-textedit.png
new file mode 100644
index 0000000..e4b91c0
--- /dev/null
+++ b/doc/src/images/gtk-textedit.png
Binary files differ
diff --git a/doc/src/images/gtk-timeedit.png b/doc/src/images/gtk-timeedit.png
new file mode 100644
index 0000000..acf6730
--- /dev/null
+++ b/doc/src/images/gtk-timeedit.png
Binary files differ
diff --git a/doc/src/images/gtk-toolbox.png b/doc/src/images/gtk-toolbox.png
new file mode 100644
index 0000000..25e6137
--- /dev/null
+++ b/doc/src/images/gtk-toolbox.png
Binary files differ
diff --git a/doc/src/images/gtk-toolbutton.png b/doc/src/images/gtk-toolbutton.png
new file mode 100644
index 0000000..f0eb86e
--- /dev/null
+++ b/doc/src/images/gtk-toolbutton.png
Binary files differ
diff --git a/doc/src/images/gtk-treeview.png b/doc/src/images/gtk-treeview.png
new file mode 100644
index 0000000..7b4e304
--- /dev/null
+++ b/doc/src/images/gtk-treeview.png
Binary files differ
diff --git a/doc/src/images/hellogl-es-example.png b/doc/src/images/hellogl-es-example.png
new file mode 100644
index 0000000..7e55f09
--- /dev/null
+++ b/doc/src/images/hellogl-es-example.png
Binary files differ
diff --git a/doc/src/images/hellogl-example.png b/doc/src/images/hellogl-example.png
new file mode 100644
index 0000000..ecb3a3a
--- /dev/null
+++ b/doc/src/images/hellogl-example.png
Binary files differ
diff --git a/doc/src/images/http-example.png b/doc/src/images/http-example.png
new file mode 100644
index 0000000..16b0539
--- /dev/null
+++ b/doc/src/images/http-example.png
Binary files differ
diff --git a/doc/src/images/httpstack.png b/doc/src/images/httpstack.png
new file mode 100644
index 0000000..658927b
--- /dev/null
+++ b/doc/src/images/httpstack.png
Binary files differ
diff --git a/doc/src/images/i18n-example.png b/doc/src/images/i18n-example.png
new file mode 100644
index 0000000..20c46c9
--- /dev/null
+++ b/doc/src/images/i18n-example.png
Binary files differ
diff --git a/doc/src/images/icon.png b/doc/src/images/icon.png
new file mode 100644
index 0000000..cc2b6ac
--- /dev/null
+++ b/doc/src/images/icon.png
Binary files differ
diff --git a/doc/src/images/icons-example.png b/doc/src/images/icons-example.png
new file mode 100644
index 0000000..ae4b1d3
--- /dev/null
+++ b/doc/src/images/icons-example.png
Binary files differ
diff --git a/doc/src/images/icons-view-menu.png b/doc/src/images/icons-view-menu.png
new file mode 100644
index 0000000..7fc02a0
--- /dev/null
+++ b/doc/src/images/icons-view-menu.png
Binary files differ
diff --git a/doc/src/images/icons_find_normal.png b/doc/src/images/icons_find_normal.png
new file mode 100644
index 0000000..c92c7e1
--- /dev/null
+++ b/doc/src/images/icons_find_normal.png
Binary files differ
diff --git a/doc/src/images/icons_find_normal_disabled.png b/doc/src/images/icons_find_normal_disabled.png
new file mode 100644
index 0000000..534d6de
--- /dev/null
+++ b/doc/src/images/icons_find_normal_disabled.png
Binary files differ
diff --git a/doc/src/images/icons_images_groupbox.png b/doc/src/images/icons_images_groupbox.png
new file mode 100644
index 0000000..f4942f7
--- /dev/null
+++ b/doc/src/images/icons_images_groupbox.png
Binary files differ
diff --git a/doc/src/images/icons_monkey.png b/doc/src/images/icons_monkey.png
new file mode 100644
index 0000000..141a87c
--- /dev/null
+++ b/doc/src/images/icons_monkey.png
Binary files differ
diff --git a/doc/src/images/icons_monkey_active.png b/doc/src/images/icons_monkey_active.png
new file mode 100644
index 0000000..edb5132
--- /dev/null
+++ b/doc/src/images/icons_monkey_active.png
Binary files differ
diff --git a/doc/src/images/icons_monkey_mess.png b/doc/src/images/icons_monkey_mess.png
new file mode 100644
index 0000000..c23eed6
--- /dev/null
+++ b/doc/src/images/icons_monkey_mess.png
Binary files differ
diff --git a/doc/src/images/icons_preview_area.png b/doc/src/images/icons_preview_area.png
new file mode 100644
index 0000000..098afae
--- /dev/null
+++ b/doc/src/images/icons_preview_area.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_16x16.png b/doc/src/images/icons_qt_extended_16x16.png
new file mode 100644
index 0000000..9274369
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_16x16.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_17x17.png b/doc/src/images/icons_qt_extended_17x17.png
new file mode 100644
index 0000000..e9bb24a
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_17x17.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_32x32.png b/doc/src/images/icons_qt_extended_32x32.png
new file mode 100644
index 0000000..cd3d0f3
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_32x32.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_33x33.png b/doc/src/images/icons_qt_extended_33x33.png
new file mode 100644
index 0000000..a67565c
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_33x33.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_48x48.png b/doc/src/images/icons_qt_extended_48x48.png
new file mode 100644
index 0000000..5aa2d73
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_48x48.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_64x64.png b/doc/src/images/icons_qt_extended_64x64.png
new file mode 100644
index 0000000..5aa2d73
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_64x64.png
Binary files differ
diff --git a/doc/src/images/icons_qt_extended_8x8.png b/doc/src/images/icons_qt_extended_8x8.png
new file mode 100644
index 0000000..8de7fce
--- /dev/null
+++ b/doc/src/images/icons_qt_extended_8x8.png
Binary files differ
diff --git a/doc/src/images/icons_size_groupbox.png b/doc/src/images/icons_size_groupbox.png
new file mode 100644
index 0000000..1360280
--- /dev/null
+++ b/doc/src/images/icons_size_groupbox.png
Binary files differ
diff --git a/doc/src/images/icons_size_spinbox.png b/doc/src/images/icons_size_spinbox.png
new file mode 100644
index 0000000..a23ee9f
--- /dev/null
+++ b/doc/src/images/icons_size_spinbox.png
Binary files differ
diff --git a/doc/src/images/imagecomposition-example.png b/doc/src/images/imagecomposition-example.png
new file mode 100644
index 0000000..697c980
--- /dev/null
+++ b/doc/src/images/imagecomposition-example.png
Binary files differ
diff --git a/doc/src/images/imageviewer-example.png b/doc/src/images/imageviewer-example.png
new file mode 100644
index 0000000..69b4f7a
--- /dev/null
+++ b/doc/src/images/imageviewer-example.png
Binary files differ
diff --git a/doc/src/images/imageviewer-fit_to_window_1.png b/doc/src/images/imageviewer-fit_to_window_1.png
new file mode 100644
index 0000000..0fe1ba1
--- /dev/null
+++ b/doc/src/images/imageviewer-fit_to_window_1.png
Binary files differ
diff --git a/doc/src/images/imageviewer-fit_to_window_2.png b/doc/src/images/imageviewer-fit_to_window_2.png
new file mode 100644
index 0000000..29e3a93
--- /dev/null
+++ b/doc/src/images/imageviewer-fit_to_window_2.png
Binary files differ
diff --git a/doc/src/images/imageviewer-original_size.png b/doc/src/images/imageviewer-original_size.png
new file mode 100644
index 0000000..c0443eb
--- /dev/null
+++ b/doc/src/images/imageviewer-original_size.png
Binary files differ
diff --git a/doc/src/images/imageviewer-zoom_in_1.png b/doc/src/images/imageviewer-zoom_in_1.png
new file mode 100644
index 0000000..05b0fff
--- /dev/null
+++ b/doc/src/images/imageviewer-zoom_in_1.png
Binary files differ
diff --git a/doc/src/images/imageviewer-zoom_in_2.png b/doc/src/images/imageviewer-zoom_in_2.png
new file mode 100644
index 0000000..0c36111
--- /dev/null
+++ b/doc/src/images/imageviewer-zoom_in_2.png
Binary files differ
diff --git a/doc/src/images/inputdialogs.png b/doc/src/images/inputdialogs.png
new file mode 100644
index 0000000..135c2f6
--- /dev/null
+++ b/doc/src/images/inputdialogs.png
Binary files differ
diff --git a/doc/src/images/insertrowinmodelview.png b/doc/src/images/insertrowinmodelview.png
new file mode 100644
index 0000000..bddc401
--- /dev/null
+++ b/doc/src/images/insertrowinmodelview.png
Binary files differ
diff --git a/doc/src/images/interview-demo.png b/doc/src/images/interview-demo.png
new file mode 100644
index 0000000..d4a1956
--- /dev/null
+++ b/doc/src/images/interview-demo.png
Binary files differ
diff --git a/doc/src/images/interview-shareddirmodel.png b/doc/src/images/interview-shareddirmodel.png
new file mode 100644
index 0000000..0213a8d
--- /dev/null
+++ b/doc/src/images/interview-shareddirmodel.png
Binary files differ
diff --git a/doc/src/images/itemview-examples.png b/doc/src/images/itemview-examples.png
new file mode 100644
index 0000000..71d29fe
--- /dev/null
+++ b/doc/src/images/itemview-examples.png
Binary files differ
diff --git a/doc/src/images/itemviews-editabletreemodel-indexes.png b/doc/src/images/itemviews-editabletreemodel-indexes.png
new file mode 100644
index 0000000..4c66e88
--- /dev/null
+++ b/doc/src/images/itemviews-editabletreemodel-indexes.png
Binary files differ
diff --git a/doc/src/images/itemviews-editabletreemodel-items.png b/doc/src/images/itemviews-editabletreemodel-items.png
new file mode 100644
index 0000000..35fcb75
--- /dev/null
+++ b/doc/src/images/itemviews-editabletreemodel-items.png
Binary files differ
diff --git a/doc/src/images/itemviews-editabletreemodel-model.png b/doc/src/images/itemviews-editabletreemodel-model.png
new file mode 100644
index 0000000..592e0ff
--- /dev/null
+++ b/doc/src/images/itemviews-editabletreemodel-model.png
Binary files differ
diff --git a/doc/src/images/itemviews-editabletreemodel-values.png b/doc/src/images/itemviews-editabletreemodel-values.png
new file mode 100644
index 0000000..0ace1cc
--- /dev/null
+++ b/doc/src/images/itemviews-editabletreemodel-values.png
Binary files differ
diff --git a/doc/src/images/itemviews-editabletreemodel.png b/doc/src/images/itemviews-editabletreemodel.png
new file mode 100644
index 0000000..a151ea8
--- /dev/null
+++ b/doc/src/images/itemviews-editabletreemodel.png
Binary files differ
diff --git a/doc/src/images/itemviews-examples.png b/doc/src/images/itemviews-examples.png
new file mode 100644
index 0000000..7c026c2
--- /dev/null
+++ b/doc/src/images/itemviews-examples.png
Binary files differ
diff --git a/doc/src/images/itemviewspuzzle-example.png b/doc/src/images/itemviewspuzzle-example.png
new file mode 100644
index 0000000..05ae28b
--- /dev/null
+++ b/doc/src/images/itemviewspuzzle-example.png
Binary files differ
diff --git a/doc/src/images/javaiterators1.png b/doc/src/images/javaiterators1.png
new file mode 100644
index 0000000..7dfcde0
--- /dev/null
+++ b/doc/src/images/javaiterators1.png
Binary files differ
diff --git a/doc/src/images/javaiterators2.png b/doc/src/images/javaiterators2.png
new file mode 100644
index 0000000..c04e3cc
--- /dev/null
+++ b/doc/src/images/javaiterators2.png
Binary files differ
diff --git a/doc/src/images/javastyle/branchindicatorimage.png b/doc/src/images/javastyle/branchindicatorimage.png
new file mode 100644
index 0000000..f2cfc4b
--- /dev/null
+++ b/doc/src/images/javastyle/branchindicatorimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/button.png b/doc/src/images/javastyle/button.png
new file mode 100644
index 0000000..c3a9742
--- /dev/null
+++ b/doc/src/images/javastyle/button.png
Binary files differ
diff --git a/doc/src/images/javastyle/checkbox.png b/doc/src/images/javastyle/checkbox.png
new file mode 100644
index 0000000..bc841a6
--- /dev/null
+++ b/doc/src/images/javastyle/checkbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/checkboxexample.png b/doc/src/images/javastyle/checkboxexample.png
new file mode 100644
index 0000000..69217fb
--- /dev/null
+++ b/doc/src/images/javastyle/checkboxexample.png
Binary files differ
diff --git a/doc/src/images/javastyle/checkingsomestuff.png b/doc/src/images/javastyle/checkingsomestuff.png
new file mode 100644
index 0000000..88e8cad
--- /dev/null
+++ b/doc/src/images/javastyle/checkingsomestuff.png
Binary files differ
diff --git a/doc/src/images/javastyle/combobox.png b/doc/src/images/javastyle/combobox.png
new file mode 100644
index 0000000..de9745a
--- /dev/null
+++ b/doc/src/images/javastyle/combobox.png
Binary files differ
diff --git a/doc/src/images/javastyle/comboboximage.png b/doc/src/images/javastyle/comboboximage.png
new file mode 100644
index 0000000..1f05e5f
--- /dev/null
+++ b/doc/src/images/javastyle/comboboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/conceptualpushbuttontree.png b/doc/src/images/javastyle/conceptualpushbuttontree.png
new file mode 100644
index 0000000..910000a
--- /dev/null
+++ b/doc/src/images/javastyle/conceptualpushbuttontree.png
Binary files differ
diff --git a/doc/src/images/javastyle/dockwidget.png b/doc/src/images/javastyle/dockwidget.png
new file mode 100644
index 0000000..4bfec14
--- /dev/null
+++ b/doc/src/images/javastyle/dockwidget.png
Binary files differ
diff --git a/doc/src/images/javastyle/dockwidgetimage.png b/doc/src/images/javastyle/dockwidgetimage.png
new file mode 100644
index 0000000..eefe171
--- /dev/null
+++ b/doc/src/images/javastyle/dockwidgetimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/groupbox.png b/doc/src/images/javastyle/groupbox.png
new file mode 100644
index 0000000..a39cd42
--- /dev/null
+++ b/doc/src/images/javastyle/groupbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/groupboximage.png b/doc/src/images/javastyle/groupboximage.png
new file mode 100644
index 0000000..5baf609
--- /dev/null
+++ b/doc/src/images/javastyle/groupboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/header.png b/doc/src/images/javastyle/header.png
new file mode 100644
index 0000000..b4546d8
--- /dev/null
+++ b/doc/src/images/javastyle/header.png
Binary files differ
diff --git a/doc/src/images/javastyle/headerimage.png b/doc/src/images/javastyle/headerimage.png
new file mode 100644
index 0000000..4117149
--- /dev/null
+++ b/doc/src/images/javastyle/headerimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/menu.png b/doc/src/images/javastyle/menu.png
new file mode 100644
index 0000000..8d44da4
--- /dev/null
+++ b/doc/src/images/javastyle/menu.png
Binary files differ
diff --git a/doc/src/images/javastyle/menubar.png b/doc/src/images/javastyle/menubar.png
new file mode 100644
index 0000000..e68e4a3
--- /dev/null
+++ b/doc/src/images/javastyle/menubar.png
Binary files differ
diff --git a/doc/src/images/javastyle/menubarimage.png b/doc/src/images/javastyle/menubarimage.png
new file mode 100644
index 0000000..b0cf28e
--- /dev/null
+++ b/doc/src/images/javastyle/menubarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/menuimage.png b/doc/src/images/javastyle/menuimage.png
new file mode 100644
index 0000000..282dde7
--- /dev/null
+++ b/doc/src/images/javastyle/menuimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/plastiquetabimage.png b/doc/src/images/javastyle/plastiquetabimage.png
new file mode 100644
index 0000000..56491ff
--- /dev/null
+++ b/doc/src/images/javastyle/plastiquetabimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/plastiquetabtest.png b/doc/src/images/javastyle/plastiquetabtest.png
new file mode 100644
index 0000000..e537773
--- /dev/null
+++ b/doc/src/images/javastyle/plastiquetabtest.png
Binary files differ
diff --git a/doc/src/images/javastyle/progressbar.png b/doc/src/images/javastyle/progressbar.png
new file mode 100644
index 0000000..de3a838
--- /dev/null
+++ b/doc/src/images/javastyle/progressbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/progressbarimage.png b/doc/src/images/javastyle/progressbarimage.png
new file mode 100644
index 0000000..433b900
--- /dev/null
+++ b/doc/src/images/javastyle/progressbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/pushbutton.png b/doc/src/images/javastyle/pushbutton.png
new file mode 100644
index 0000000..e5f92be
--- /dev/null
+++ b/doc/src/images/javastyle/pushbutton.png
Binary files differ
diff --git a/doc/src/images/javastyle/rubberband.png b/doc/src/images/javastyle/rubberband.png
new file mode 100644
index 0000000..087424a
--- /dev/null
+++ b/doc/src/images/javastyle/rubberband.png
Binary files differ
diff --git a/doc/src/images/javastyle/rubberbandimage.png b/doc/src/images/javastyle/rubberbandimage.png
new file mode 100644
index 0000000..2794638
--- /dev/null
+++ b/doc/src/images/javastyle/rubberbandimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/scrollbar.png b/doc/src/images/javastyle/scrollbar.png
new file mode 100644
index 0000000..c1ecb5d
--- /dev/null
+++ b/doc/src/images/javastyle/scrollbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/scrollbarimage.png b/doc/src/images/javastyle/scrollbarimage.png
new file mode 100644
index 0000000..6d3e29d
--- /dev/null
+++ b/doc/src/images/javastyle/scrollbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/sizegrip.png b/doc/src/images/javastyle/sizegrip.png
new file mode 100644
index 0000000..667e6fb
--- /dev/null
+++ b/doc/src/images/javastyle/sizegrip.png
Binary files differ
diff --git a/doc/src/images/javastyle/sizegripimage.png b/doc/src/images/javastyle/sizegripimage.png
new file mode 100644
index 0000000..ccbf525
--- /dev/null
+++ b/doc/src/images/javastyle/sizegripimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/slider.png b/doc/src/images/javastyle/slider.png
new file mode 100644
index 0000000..a382233
--- /dev/null
+++ b/doc/src/images/javastyle/slider.png
Binary files differ
diff --git a/doc/src/images/javastyle/sliderhandle.png b/doc/src/images/javastyle/sliderhandle.png
new file mode 100644
index 0000000..28b7544
--- /dev/null
+++ b/doc/src/images/javastyle/sliderhandle.png
Binary files differ
diff --git a/doc/src/images/javastyle/sliderimage.png b/doc/src/images/javastyle/sliderimage.png
new file mode 100644
index 0000000..df700dd
--- /dev/null
+++ b/doc/src/images/javastyle/sliderimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/slidertroubble.png b/doc/src/images/javastyle/slidertroubble.png
new file mode 100644
index 0000000..79eee81
--- /dev/null
+++ b/doc/src/images/javastyle/slidertroubble.png
Binary files differ
diff --git a/doc/src/images/javastyle/spinbox.png b/doc/src/images/javastyle/spinbox.png
new file mode 100644
index 0000000..ec9d6e0
--- /dev/null
+++ b/doc/src/images/javastyle/spinbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/spinboximage.png b/doc/src/images/javastyle/spinboximage.png
new file mode 100644
index 0000000..d0d57c8
--- /dev/null
+++ b/doc/src/images/javastyle/spinboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/splitter.png b/doc/src/images/javastyle/splitter.png
new file mode 100644
index 0000000..5983804
--- /dev/null
+++ b/doc/src/images/javastyle/splitter.png
Binary files differ
diff --git a/doc/src/images/javastyle/tab.png b/doc/src/images/javastyle/tab.png
new file mode 100644
index 0000000..616580c
--- /dev/null
+++ b/doc/src/images/javastyle/tab.png
Binary files differ
diff --git a/doc/src/images/javastyle/tabwidget.png b/doc/src/images/javastyle/tabwidget.png
new file mode 100644
index 0000000..737155c
--- /dev/null
+++ b/doc/src/images/javastyle/tabwidget.png
Binary files differ
diff --git a/doc/src/images/javastyle/titlebar.png b/doc/src/images/javastyle/titlebar.png
new file mode 100644
index 0000000..5d7ecc4
--- /dev/null
+++ b/doc/src/images/javastyle/titlebar.png
Binary files differ
diff --git a/doc/src/images/javastyle/titlebarimage.png b/doc/src/images/javastyle/titlebarimage.png
new file mode 100644
index 0000000..50287ae
--- /dev/null
+++ b/doc/src/images/javastyle/titlebarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbar.png b/doc/src/images/javastyle/toolbar.png
new file mode 100644
index 0000000..e69e8df
--- /dev/null
+++ b/doc/src/images/javastyle/toolbar.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbarimage.png b/doc/src/images/javastyle/toolbarimage.png
new file mode 100644
index 0000000..b9025f5
--- /dev/null
+++ b/doc/src/images/javastyle/toolbarimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbox.png b/doc/src/images/javastyle/toolbox.png
new file mode 100644
index 0000000..c5f61ec
--- /dev/null
+++ b/doc/src/images/javastyle/toolbox.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolboximage.png b/doc/src/images/javastyle/toolboximage.png
new file mode 100644
index 0000000..7bcbd26
--- /dev/null
+++ b/doc/src/images/javastyle/toolboximage.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbutton.png b/doc/src/images/javastyle/toolbutton.png
new file mode 100644
index 0000000..9167e83
--- /dev/null
+++ b/doc/src/images/javastyle/toolbutton.png
Binary files differ
diff --git a/doc/src/images/javastyle/toolbuttonimage.png b/doc/src/images/javastyle/toolbuttonimage.png
new file mode 100644
index 0000000..3217172
--- /dev/null
+++ b/doc/src/images/javastyle/toolbuttonimage.png
Binary files differ
diff --git a/doc/src/images/javastyle/windowstabimage.png b/doc/src/images/javastyle/windowstabimage.png
new file mode 100644
index 0000000..485e847
--- /dev/null
+++ b/doc/src/images/javastyle/windowstabimage.png
Binary files differ
diff --git a/doc/src/images/layout-examples.png b/doc/src/images/layout-examples.png
new file mode 100644
index 0000000..eb28127
--- /dev/null
+++ b/doc/src/images/layout-examples.png
Binary files differ
diff --git a/doc/src/images/layout1.png b/doc/src/images/layout1.png
new file mode 100644
index 0000000..98cee45
--- /dev/null
+++ b/doc/src/images/layout1.png
Binary files differ
diff --git a/doc/src/images/layout2.png b/doc/src/images/layout2.png
new file mode 100644
index 0000000..dfa2815
--- /dev/null
+++ b/doc/src/images/layout2.png
Binary files differ
diff --git a/doc/src/images/layouts-examples.png b/doc/src/images/layouts-examples.png
new file mode 100644
index 0000000..a7121a9
--- /dev/null
+++ b/doc/src/images/layouts-examples.png
Binary files differ
diff --git a/doc/src/images/licensewizard-example.png b/doc/src/images/licensewizard-example.png
new file mode 100644
index 0000000..97b3aaa
--- /dev/null
+++ b/doc/src/images/licensewizard-example.png
Binary files differ
diff --git a/doc/src/images/licensewizard-flow.png b/doc/src/images/licensewizard-flow.png
new file mode 100644
index 0000000..76df63a
--- /dev/null
+++ b/doc/src/images/licensewizard-flow.png
Binary files differ
diff --git a/doc/src/images/licensewizard.png b/doc/src/images/licensewizard.png
new file mode 100644
index 0000000..40925cc
--- /dev/null
+++ b/doc/src/images/licensewizard.png
Binary files differ
diff --git a/doc/src/images/lineedits-example.png b/doc/src/images/lineedits-example.png
new file mode 100644
index 0000000..ff5e318
--- /dev/null
+++ b/doc/src/images/lineedits-example.png
Binary files differ
diff --git a/doc/src/images/linguist-arrowpad_en.png b/doc/src/images/linguist-arrowpad_en.png
new file mode 100644
index 0000000..9a95eb2
--- /dev/null
+++ b/doc/src/images/linguist-arrowpad_en.png
Binary files differ
diff --git a/doc/src/images/linguist-arrowpad_fr.png b/doc/src/images/linguist-arrowpad_fr.png
new file mode 100644
index 0000000..fc33f9f
--- /dev/null
+++ b/doc/src/images/linguist-arrowpad_fr.png
Binary files differ
diff --git a/doc/src/images/linguist-arrowpad_nl.png b/doc/src/images/linguist-arrowpad_nl.png
new file mode 100644
index 0000000..f2645a8
--- /dev/null
+++ b/doc/src/images/linguist-arrowpad_nl.png
Binary files differ
diff --git a/doc/src/images/linguist-auxlanguages.png b/doc/src/images/linguist-auxlanguages.png
new file mode 100644
index 0000000..634605e
--- /dev/null
+++ b/doc/src/images/linguist-auxlanguages.png
Binary files differ
diff --git a/doc/src/images/linguist-batchtranslation.png b/doc/src/images/linguist-batchtranslation.png
new file mode 100644
index 0000000..2423e9e
--- /dev/null
+++ b/doc/src/images/linguist-batchtranslation.png
Binary files differ
diff --git a/doc/src/images/linguist-check-empty.png b/doc/src/images/linguist-check-empty.png
new file mode 100644
index 0000000..759a41b
--- /dev/null
+++ b/doc/src/images/linguist-check-empty.png
Binary files differ
diff --git a/doc/src/images/linguist-check-obsolete.png b/doc/src/images/linguist-check-obsolete.png
new file mode 100644
index 0000000..b852b63
--- /dev/null
+++ b/doc/src/images/linguist-check-obsolete.png
Binary files differ
diff --git a/doc/src/images/linguist-check-off.png b/doc/src/images/linguist-check-off.png
new file mode 100644
index 0000000..640b689
--- /dev/null
+++ b/doc/src/images/linguist-check-off.png
Binary files differ
diff --git a/doc/src/images/linguist-check-on.png b/doc/src/images/linguist-check-on.png
new file mode 100644
index 0000000..afcaf63
--- /dev/null
+++ b/doc/src/images/linguist-check-on.png
Binary files differ
diff --git a/doc/src/images/linguist-check-warning.png b/doc/src/images/linguist-check-warning.png
new file mode 100644
index 0000000..f689c33
--- /dev/null
+++ b/doc/src/images/linguist-check-warning.png
Binary files differ
diff --git a/doc/src/images/linguist-danger.png b/doc/src/images/linguist-danger.png
new file mode 100644
index 0000000..e101577
--- /dev/null
+++ b/doc/src/images/linguist-danger.png
Binary files differ
diff --git a/doc/src/images/linguist-doneandnext.png b/doc/src/images/linguist-doneandnext.png
new file mode 100644
index 0000000..18f2fb6
--- /dev/null
+++ b/doc/src/images/linguist-doneandnext.png
Binary files differ
diff --git a/doc/src/images/linguist-editcopy.png b/doc/src/images/linguist-editcopy.png
new file mode 100644
index 0000000..d542c3b
--- /dev/null
+++ b/doc/src/images/linguist-editcopy.png
Binary files differ
diff --git a/doc/src/images/linguist-editcut.png b/doc/src/images/linguist-editcut.png
new file mode 100644
index 0000000..38e55f7
--- /dev/null
+++ b/doc/src/images/linguist-editcut.png
Binary files differ
diff --git a/doc/src/images/linguist-editfind.png b/doc/src/images/linguist-editfind.png
new file mode 100644
index 0000000..6ea35e9
--- /dev/null
+++ b/doc/src/images/linguist-editfind.png
Binary files differ
diff --git a/doc/src/images/linguist-editpaste.png b/doc/src/images/linguist-editpaste.png
new file mode 100644
index 0000000..717dd86
--- /dev/null
+++ b/doc/src/images/linguist-editpaste.png
Binary files differ
diff --git a/doc/src/images/linguist-editredo.png b/doc/src/images/linguist-editredo.png
new file mode 100644
index 0000000..9d679fe
--- /dev/null
+++ b/doc/src/images/linguist-editredo.png
Binary files differ
diff --git a/doc/src/images/linguist-editundo.png b/doc/src/images/linguist-editundo.png
new file mode 100644
index 0000000..eee23d2
--- /dev/null
+++ b/doc/src/images/linguist-editundo.png
Binary files differ
diff --git a/doc/src/images/linguist-examples.png b/doc/src/images/linguist-examples.png
new file mode 100644
index 0000000..c39ed5d
--- /dev/null
+++ b/doc/src/images/linguist-examples.png
Binary files differ
diff --git a/doc/src/images/linguist-fileopen.png b/doc/src/images/linguist-fileopen.png
new file mode 100644
index 0000000..1b3e69f
--- /dev/null
+++ b/doc/src/images/linguist-fileopen.png
Binary files differ
diff --git a/doc/src/images/linguist-fileprint.png b/doc/src/images/linguist-fileprint.png
new file mode 100644
index 0000000..2afb769
--- /dev/null
+++ b/doc/src/images/linguist-fileprint.png
Binary files differ
diff --git a/doc/src/images/linguist-filesave.png b/doc/src/images/linguist-filesave.png
new file mode 100644
index 0000000..46eac82
--- /dev/null
+++ b/doc/src/images/linguist-filesave.png
Binary files differ
diff --git a/doc/src/images/linguist-finddialog.png b/doc/src/images/linguist-finddialog.png
new file mode 100644
index 0000000..831a393
--- /dev/null
+++ b/doc/src/images/linguist-finddialog.png
Binary files differ
diff --git a/doc/src/images/linguist-hellotr_en.png b/doc/src/images/linguist-hellotr_en.png
new file mode 100644
index 0000000..6b3d807
--- /dev/null
+++ b/doc/src/images/linguist-hellotr_en.png
Binary files differ
diff --git a/doc/src/images/linguist-hellotr_la.png b/doc/src/images/linguist-hellotr_la.png
new file mode 100644
index 0000000..f1ecdb0
--- /dev/null
+++ b/doc/src/images/linguist-hellotr_la.png
Binary files differ
diff --git a/doc/src/images/linguist-linguist.png b/doc/src/images/linguist-linguist.png
new file mode 100644
index 0000000..303d20b
--- /dev/null
+++ b/doc/src/images/linguist-linguist.png
Binary files differ
diff --git a/doc/src/images/linguist-linguist_2.png b/doc/src/images/linguist-linguist_2.png
new file mode 100644
index 0000000..9ef1c2c
--- /dev/null
+++ b/doc/src/images/linguist-linguist_2.png
Binary files differ
diff --git a/doc/src/images/linguist-menubar.png b/doc/src/images/linguist-menubar.png
new file mode 100644
index 0000000..bc510be
--- /dev/null
+++ b/doc/src/images/linguist-menubar.png
Binary files differ
diff --git a/doc/src/images/linguist-next.png b/doc/src/images/linguist-next.png
new file mode 100644
index 0000000..7700d6f
--- /dev/null
+++ b/doc/src/images/linguist-next.png
Binary files differ
diff --git a/doc/src/images/linguist-nextunfinished.png b/doc/src/images/linguist-nextunfinished.png
new file mode 100644
index 0000000..05c92bd
--- /dev/null
+++ b/doc/src/images/linguist-nextunfinished.png
Binary files differ
diff --git a/doc/src/images/linguist-phrasebookdialog.png b/doc/src/images/linguist-phrasebookdialog.png
new file mode 100644
index 0000000..eb5da70
--- /dev/null
+++ b/doc/src/images/linguist-phrasebookdialog.png
Binary files differ
diff --git a/doc/src/images/linguist-phrasebookopen.png b/doc/src/images/linguist-phrasebookopen.png
new file mode 100644
index 0000000..1b35455
--- /dev/null
+++ b/doc/src/images/linguist-phrasebookopen.png
Binary files differ
diff --git a/doc/src/images/linguist-prev.png b/doc/src/images/linguist-prev.png
new file mode 100644
index 0000000..99dc873
--- /dev/null
+++ b/doc/src/images/linguist-prev.png
Binary files differ
diff --git a/doc/src/images/linguist-previewtool.png b/doc/src/images/linguist-previewtool.png
new file mode 100644
index 0000000..c4fca3c
--- /dev/null
+++ b/doc/src/images/linguist-previewtool.png
Binary files differ
diff --git a/doc/src/images/linguist-prevunfinished.png b/doc/src/images/linguist-prevunfinished.png
new file mode 100644
index 0000000..15c13ea
--- /dev/null
+++ b/doc/src/images/linguist-prevunfinished.png
Binary files differ
diff --git a/doc/src/images/linguist-toolbar.png b/doc/src/images/linguist-toolbar.png
new file mode 100644
index 0000000..b45c31b
--- /dev/null
+++ b/doc/src/images/linguist-toolbar.png
Binary files differ
diff --git a/doc/src/images/linguist-translationfilesettings.png b/doc/src/images/linguist-translationfilesettings.png
new file mode 100644
index 0000000..e524c05
--- /dev/null
+++ b/doc/src/images/linguist-translationfilesettings.png
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_en.png b/doc/src/images/linguist-trollprint_10_en.png
new file mode 100644
index 0000000..e460481
--- /dev/null
+++ b/doc/src/images/linguist-trollprint_10_en.png
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_pt_bad.png b/doc/src/images/linguist-trollprint_10_pt_bad.png
new file mode 100644
index 0000000..b96d477
--- /dev/null
+++ b/doc/src/images/linguist-trollprint_10_pt_bad.png
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_10_pt_good.png b/doc/src/images/linguist-trollprint_10_pt_good.png
new file mode 100644
index 0000000..293c44a
--- /dev/null
+++ b/doc/src/images/linguist-trollprint_10_pt_good.png
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_11_en.png b/doc/src/images/linguist-trollprint_11_en.png
new file mode 100644
index 0000000..f718c99
--- /dev/null
+++ b/doc/src/images/linguist-trollprint_11_en.png
Binary files differ
diff --git a/doc/src/images/linguist-trollprint_11_pt.png b/doc/src/images/linguist-trollprint_11_pt.png
new file mode 100644
index 0000000..0ff8c39
--- /dev/null
+++ b/doc/src/images/linguist-trollprint_11_pt.png
Binary files differ
diff --git a/doc/src/images/linguist-validateaccelerators.png b/doc/src/images/linguist-validateaccelerators.png
new file mode 100644
index 0000000..4f72648
--- /dev/null
+++ b/doc/src/images/linguist-validateaccelerators.png
Binary files differ
diff --git a/doc/src/images/linguist-validatephrases.png b/doc/src/images/linguist-validatephrases.png
new file mode 100644
index 0000000..30c3ee6
--- /dev/null
+++ b/doc/src/images/linguist-validatephrases.png
Binary files differ
diff --git a/doc/src/images/linguist-validateplacemarkers.png b/doc/src/images/linguist-validateplacemarkers.png
new file mode 100644
index 0000000..cc127fd
--- /dev/null
+++ b/doc/src/images/linguist-validateplacemarkers.png
Binary files differ
diff --git a/doc/src/images/linguist-validatepunctuation.png b/doc/src/images/linguist-validatepunctuation.png
new file mode 100644
index 0000000..3492f95
--- /dev/null
+++ b/doc/src/images/linguist-validatepunctuation.png
Binary files differ
diff --git a/doc/src/images/linguist-whatsthis.png b/doc/src/images/linguist-whatsthis.png
new file mode 100644
index 0000000..0b5d46a
--- /dev/null
+++ b/doc/src/images/linguist-whatsthis.png
Binary files differ
diff --git a/doc/src/images/localfortuneclient-example.png b/doc/src/images/localfortuneclient-example.png
new file mode 100644
index 0000000..614784b
--- /dev/null
+++ b/doc/src/images/localfortuneclient-example.png
Binary files differ
diff --git a/doc/src/images/localfortuneserver-example.png b/doc/src/images/localfortuneserver-example.png
new file mode 100644
index 0000000..2f04c75
--- /dev/null
+++ b/doc/src/images/localfortuneserver-example.png
Binary files differ
diff --git a/doc/src/images/loopback-example.png b/doc/src/images/loopback-example.png
new file mode 100644
index 0000000..2b1bd4a
--- /dev/null
+++ b/doc/src/images/loopback-example.png
Binary files differ
diff --git a/doc/src/images/mac-cocoa.png b/doc/src/images/mac-cocoa.png
new file mode 100644
index 0000000..06c0ba0
--- /dev/null
+++ b/doc/src/images/mac-cocoa.png
Binary files differ
diff --git a/doc/src/images/macintosh-calendarwidget.png b/doc/src/images/macintosh-calendarwidget.png
new file mode 100644
index 0000000..2f74350
--- /dev/null
+++ b/doc/src/images/macintosh-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/macintosh-checkbox.png b/doc/src/images/macintosh-checkbox.png
new file mode 100644
index 0000000..d0130e3
--- /dev/null
+++ b/doc/src/images/macintosh-checkbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-combobox.png b/doc/src/images/macintosh-combobox.png
new file mode 100644
index 0000000..c1dc3c0
--- /dev/null
+++ b/doc/src/images/macintosh-combobox.png
Binary files differ
diff --git a/doc/src/images/macintosh-dateedit.png b/doc/src/images/macintosh-dateedit.png
new file mode 100644
index 0000000..45aee90
--- /dev/null
+++ b/doc/src/images/macintosh-dateedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-datetimeedit.png b/doc/src/images/macintosh-datetimeedit.png
new file mode 100644
index 0000000..62af02d
--- /dev/null
+++ b/doc/src/images/macintosh-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-dial.png b/doc/src/images/macintosh-dial.png
new file mode 100644
index 0000000..df0ffe2
--- /dev/null
+++ b/doc/src/images/macintosh-dial.png
Binary files differ
diff --git a/doc/src/images/macintosh-doublespinbox.png b/doc/src/images/macintosh-doublespinbox.png
new file mode 100644
index 0000000..a0695ff
--- /dev/null
+++ b/doc/src/images/macintosh-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-fontcombobox.png b/doc/src/images/macintosh-fontcombobox.png
new file mode 100644
index 0000000..8a5a3c7
--- /dev/null
+++ b/doc/src/images/macintosh-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/macintosh-frame.png b/doc/src/images/macintosh-frame.png
new file mode 100644
index 0000000..fee61a3
--- /dev/null
+++ b/doc/src/images/macintosh-frame.png
Binary files differ
diff --git a/doc/src/images/macintosh-groupbox.png b/doc/src/images/macintosh-groupbox.png
new file mode 100644
index 0000000..f6c7bce
--- /dev/null
+++ b/doc/src/images/macintosh-groupbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-horizontalscrollbar.png b/doc/src/images/macintosh-horizontalscrollbar.png
new file mode 100644
index 0000000..8b63572
--- /dev/null
+++ b/doc/src/images/macintosh-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/macintosh-label.png b/doc/src/images/macintosh-label.png
new file mode 100644
index 0000000..753aa4d
--- /dev/null
+++ b/doc/src/images/macintosh-label.png
Binary files differ
diff --git a/doc/src/images/macintosh-lcdnumber.png b/doc/src/images/macintosh-lcdnumber.png
new file mode 100644
index 0000000..2ea9ea0
--- /dev/null
+++ b/doc/src/images/macintosh-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/macintosh-lineedit.png b/doc/src/images/macintosh-lineedit.png
new file mode 100644
index 0000000..0e992c7
--- /dev/null
+++ b/doc/src/images/macintosh-lineedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-listview.png b/doc/src/images/macintosh-listview.png
new file mode 100644
index 0000000..346e6427
--- /dev/null
+++ b/doc/src/images/macintosh-listview.png
Binary files differ
diff --git a/doc/src/images/macintosh-menu.png b/doc/src/images/macintosh-menu.png
new file mode 100644
index 0000000..59bdcea
--- /dev/null
+++ b/doc/src/images/macintosh-menu.png
Binary files differ
diff --git a/doc/src/images/macintosh-progressbar.png b/doc/src/images/macintosh-progressbar.png
new file mode 100644
index 0000000..2dfc8ab
--- /dev/null
+++ b/doc/src/images/macintosh-progressbar.png
Binary files differ
diff --git a/doc/src/images/macintosh-pushbutton.png b/doc/src/images/macintosh-pushbutton.png
new file mode 100644
index 0000000..7ec1491
--- /dev/null
+++ b/doc/src/images/macintosh-pushbutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-radiobutton.png b/doc/src/images/macintosh-radiobutton.png
new file mode 100644
index 0000000..8b02f50
--- /dev/null
+++ b/doc/src/images/macintosh-radiobutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-slider.png b/doc/src/images/macintosh-slider.png
new file mode 100644
index 0000000..bf0c546
--- /dev/null
+++ b/doc/src/images/macintosh-slider.png
Binary files differ
diff --git a/doc/src/images/macintosh-spinbox.png b/doc/src/images/macintosh-spinbox.png
new file mode 100644
index 0000000..4196c37
--- /dev/null
+++ b/doc/src/images/macintosh-spinbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-tableview.png b/doc/src/images/macintosh-tableview.png
new file mode 100644
index 0000000..e651249
--- /dev/null
+++ b/doc/src/images/macintosh-tableview.png
Binary files differ
diff --git a/doc/src/images/macintosh-tabwidget.png b/doc/src/images/macintosh-tabwidget.png
new file mode 100644
index 0000000..1d174a4
--- /dev/null
+++ b/doc/src/images/macintosh-tabwidget.png
Binary files differ
diff --git a/doc/src/images/macintosh-textedit.png b/doc/src/images/macintosh-textedit.png
new file mode 100644
index 0000000..4f0ce36
--- /dev/null
+++ b/doc/src/images/macintosh-textedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-timeedit.png b/doc/src/images/macintosh-timeedit.png
new file mode 100644
index 0000000..4bcfce3
--- /dev/null
+++ b/doc/src/images/macintosh-timeedit.png
Binary files differ
diff --git a/doc/src/images/macintosh-toolbox.png b/doc/src/images/macintosh-toolbox.png
new file mode 100644
index 0000000..18d41ea
--- /dev/null
+++ b/doc/src/images/macintosh-toolbox.png
Binary files differ
diff --git a/doc/src/images/macintosh-toolbutton.png b/doc/src/images/macintosh-toolbutton.png
new file mode 100644
index 0000000..f91331c
--- /dev/null
+++ b/doc/src/images/macintosh-toolbutton.png
Binary files differ
diff --git a/doc/src/images/macintosh-treeview.png b/doc/src/images/macintosh-treeview.png
new file mode 100644
index 0000000..afda6d8
--- /dev/null
+++ b/doc/src/images/macintosh-treeview.png
Binary files differ
diff --git a/doc/src/images/macintosh-unified-toolbar.png b/doc/src/images/macintosh-unified-toolbar.png
new file mode 100644
index 0000000..dadd836
--- /dev/null
+++ b/doc/src/images/macintosh-unified-toolbar.png
Binary files differ
diff --git a/doc/src/images/macmainwindow.png b/doc/src/images/macmainwindow.png
new file mode 100644
index 0000000..84eb11c
--- /dev/null
+++ b/doc/src/images/macmainwindow.png
Binary files differ
diff --git a/doc/src/images/mainwindow-contextmenu.png b/doc/src/images/mainwindow-contextmenu.png
new file mode 100644
index 0000000..439ab21
--- /dev/null
+++ b/doc/src/images/mainwindow-contextmenu.png
Binary files differ
diff --git a/doc/src/images/mainwindow-custom-dock.png b/doc/src/images/mainwindow-custom-dock.png
new file mode 100644
index 0000000..ca86471
--- /dev/null
+++ b/doc/src/images/mainwindow-custom-dock.png
Binary files differ
diff --git a/doc/src/images/mainwindow-demo.png b/doc/src/images/mainwindow-demo.png
new file mode 100644
index 0000000..5799dc0
--- /dev/null
+++ b/doc/src/images/mainwindow-demo.png
Binary files differ
diff --git a/doc/src/images/mainwindow-docks-example.png b/doc/src/images/mainwindow-docks-example.png
new file mode 100644
index 0000000..a5641fd
--- /dev/null
+++ b/doc/src/images/mainwindow-docks-example.png
Binary files differ
diff --git a/doc/src/images/mainwindow-docks.png b/doc/src/images/mainwindow-docks.png
new file mode 100644
index 0000000..24f42a2
--- /dev/null
+++ b/doc/src/images/mainwindow-docks.png
Binary files differ
diff --git a/doc/src/images/mainwindow-examples.png b/doc/src/images/mainwindow-examples.png
new file mode 100644
index 0000000..3e946a6
--- /dev/null
+++ b/doc/src/images/mainwindow-examples.png
Binary files differ
diff --git a/doc/src/images/mainwindow-vertical-dock.png b/doc/src/images/mainwindow-vertical-dock.png
new file mode 100644
index 0000000..b6996ec
--- /dev/null
+++ b/doc/src/images/mainwindow-vertical-dock.png
Binary files differ
diff --git a/doc/src/images/mainwindow-vertical-tabs.png b/doc/src/images/mainwindow-vertical-tabs.png
new file mode 100644
index 0000000..fcb901a
--- /dev/null
+++ b/doc/src/images/mainwindow-vertical-tabs.png
Binary files differ
diff --git a/doc/src/images/mainwindowlayout.png b/doc/src/images/mainwindowlayout.png
new file mode 100644
index 0000000..4776ce4
--- /dev/null
+++ b/doc/src/images/mainwindowlayout.png
Binary files differ
diff --git a/doc/src/images/mainwindows-examples.png b/doc/src/images/mainwindows-examples.png
new file mode 100644
index 0000000..45bf0ab
--- /dev/null
+++ b/doc/src/images/mainwindows-examples.png
Binary files differ
diff --git a/doc/src/images/mandelbrot-example.png b/doc/src/images/mandelbrot-example.png
new file mode 100644
index 0000000..f581783
--- /dev/null
+++ b/doc/src/images/mandelbrot-example.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_scroll1.png b/doc/src/images/mandelbrot_scroll1.png
new file mode 100644
index 0000000..b800455
--- /dev/null
+++ b/doc/src/images/mandelbrot_scroll1.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_scroll2.png b/doc/src/images/mandelbrot_scroll2.png
new file mode 100644
index 0000000..704ea0a
--- /dev/null
+++ b/doc/src/images/mandelbrot_scroll2.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_scroll3.png b/doc/src/images/mandelbrot_scroll3.png
new file mode 100644
index 0000000..8b48211
--- /dev/null
+++ b/doc/src/images/mandelbrot_scroll3.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_zoom1.png b/doc/src/images/mandelbrot_zoom1.png
new file mode 100644
index 0000000..30190e4
--- /dev/null
+++ b/doc/src/images/mandelbrot_zoom1.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_zoom2.png b/doc/src/images/mandelbrot_zoom2.png
new file mode 100644
index 0000000..148ac77
--- /dev/null
+++ b/doc/src/images/mandelbrot_zoom2.png
Binary files differ
diff --git a/doc/src/images/mandelbrot_zoom3.png b/doc/src/images/mandelbrot_zoom3.png
new file mode 100644
index 0000000..a669f4b
--- /dev/null
+++ b/doc/src/images/mandelbrot_zoom3.png
Binary files differ
diff --git a/doc/src/images/masterdetail-example.png b/doc/src/images/masterdetail-example.png
new file mode 100644
index 0000000..bc282b7
--- /dev/null
+++ b/doc/src/images/masterdetail-example.png
Binary files differ
diff --git a/doc/src/images/mdi-cascade.png b/doc/src/images/mdi-cascade.png
new file mode 100644
index 0000000..ca55a5b
--- /dev/null
+++ b/doc/src/images/mdi-cascade.png
Binary files differ
diff --git a/doc/src/images/mdi-example.png b/doc/src/images/mdi-example.png
new file mode 100644
index 0000000..240f9e2
--- /dev/null
+++ b/doc/src/images/mdi-example.png
Binary files differ
diff --git a/doc/src/images/mdi-tile.png b/doc/src/images/mdi-tile.png
new file mode 100644
index 0000000..1486d96
--- /dev/null
+++ b/doc/src/images/mdi-tile.png
Binary files differ
diff --git a/doc/src/images/mediaplayer-demo.png b/doc/src/images/mediaplayer-demo.png
new file mode 100644
index 0000000..2c1f9b4
--- /dev/null
+++ b/doc/src/images/mediaplayer-demo.png
Binary files differ
diff --git a/doc/src/images/menus-example.png b/doc/src/images/menus-example.png
new file mode 100644
index 0000000..81e6e0d
--- /dev/null
+++ b/doc/src/images/menus-example.png
Binary files differ
diff --git a/doc/src/images/modelindex-no-parent.png b/doc/src/images/modelindex-no-parent.png
new file mode 100644
index 0000000..9c6258e
--- /dev/null
+++ b/doc/src/images/modelindex-no-parent.png
Binary files differ
diff --git a/doc/src/images/modelindex-parent.png b/doc/src/images/modelindex-parent.png
new file mode 100644
index 0000000..26d4158
--- /dev/null
+++ b/doc/src/images/modelindex-parent.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-append-columns.png b/doc/src/images/modelview-begin-append-columns.png
new file mode 100644
index 0000000..8d13b17
--- /dev/null
+++ b/doc/src/images/modelview-begin-append-columns.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-append-rows.png b/doc/src/images/modelview-begin-append-rows.png
new file mode 100644
index 0000000..50d04c3
--- /dev/null
+++ b/doc/src/images/modelview-begin-append-rows.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-insert-columns.png b/doc/src/images/modelview-begin-insert-columns.png
new file mode 100644
index 0000000..30eeb82
--- /dev/null
+++ b/doc/src/images/modelview-begin-insert-columns.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-insert-rows.png b/doc/src/images/modelview-begin-insert-rows.png
new file mode 100644
index 0000000..b4d6eda
--- /dev/null
+++ b/doc/src/images/modelview-begin-insert-rows.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-remove-columns.png b/doc/src/images/modelview-begin-remove-columns.png
new file mode 100644
index 0000000..aee60e0
--- /dev/null
+++ b/doc/src/images/modelview-begin-remove-columns.png
Binary files differ
diff --git a/doc/src/images/modelview-begin-remove-rows.png b/doc/src/images/modelview-begin-remove-rows.png
new file mode 100644
index 0000000..8e95187
--- /dev/null
+++ b/doc/src/images/modelview-begin-remove-rows.png
Binary files differ
diff --git a/doc/src/images/modelview-listmodel.png b/doc/src/images/modelview-listmodel.png
new file mode 100644
index 0000000..6be5e15
--- /dev/null
+++ b/doc/src/images/modelview-listmodel.png
Binary files differ
diff --git a/doc/src/images/modelview-models.png b/doc/src/images/modelview-models.png
new file mode 100644
index 0000000..183a7cf
--- /dev/null
+++ b/doc/src/images/modelview-models.png
Binary files differ
diff --git a/doc/src/images/modelview-overview.png b/doc/src/images/modelview-overview.png
new file mode 100644
index 0000000..41e3a68
--- /dev/null
+++ b/doc/src/images/modelview-overview.png
Binary files differ
diff --git a/doc/src/images/modelview-roles.png b/doc/src/images/modelview-roles.png
new file mode 100644
index 0000000..2a60ce7
--- /dev/null
+++ b/doc/src/images/modelview-roles.png
Binary files differ
diff --git a/doc/src/images/modelview-tablemodel.png b/doc/src/images/modelview-tablemodel.png
new file mode 100644
index 0000000..9a9ea2f
--- /dev/null
+++ b/doc/src/images/modelview-tablemodel.png
Binary files differ
diff --git a/doc/src/images/modelview-treemodel.png b/doc/src/images/modelview-treemodel.png
new file mode 100644
index 0000000..f7b02eb
--- /dev/null
+++ b/doc/src/images/modelview-treemodel.png
Binary files differ
diff --git a/doc/src/images/motif-calendarwidget.png b/doc/src/images/motif-calendarwidget.png
new file mode 100644
index 0000000..4ce6aeb
--- /dev/null
+++ b/doc/src/images/motif-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/motif-checkbox.png b/doc/src/images/motif-checkbox.png
new file mode 100644
index 0000000..2a26327
--- /dev/null
+++ b/doc/src/images/motif-checkbox.png
Binary files differ
diff --git a/doc/src/images/motif-combobox.png b/doc/src/images/motif-combobox.png
new file mode 100644
index 0000000..2a288d9
--- /dev/null
+++ b/doc/src/images/motif-combobox.png
Binary files differ
diff --git a/doc/src/images/motif-dateedit.png b/doc/src/images/motif-dateedit.png
new file mode 100644
index 0000000..d00c45f
--- /dev/null
+++ b/doc/src/images/motif-dateedit.png
Binary files differ
diff --git a/doc/src/images/motif-datetimeedit.png b/doc/src/images/motif-datetimeedit.png
new file mode 100644
index 0000000..cc43ef8
--- /dev/null
+++ b/doc/src/images/motif-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/motif-dial.png b/doc/src/images/motif-dial.png
new file mode 100644
index 0000000..36b3ff7
--- /dev/null
+++ b/doc/src/images/motif-dial.png
Binary files differ
diff --git a/doc/src/images/motif-doublespinbox.png b/doc/src/images/motif-doublespinbox.png
new file mode 100644
index 0000000..6092913
--- /dev/null
+++ b/doc/src/images/motif-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/motif-fontcombobox.png b/doc/src/images/motif-fontcombobox.png
new file mode 100644
index 0000000..c07452d
--- /dev/null
+++ b/doc/src/images/motif-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/motif-frame.png b/doc/src/images/motif-frame.png
new file mode 100644
index 0000000..55dcc32
--- /dev/null
+++ b/doc/src/images/motif-frame.png
Binary files differ
diff --git a/doc/src/images/motif-groupbox.png b/doc/src/images/motif-groupbox.png
new file mode 100644
index 0000000..13742b1
--- /dev/null
+++ b/doc/src/images/motif-groupbox.png
Binary files differ
diff --git a/doc/src/images/motif-horizontalscrollbar.png b/doc/src/images/motif-horizontalscrollbar.png
new file mode 100644
index 0000000..dab1d3f
--- /dev/null
+++ b/doc/src/images/motif-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/motif-label.png b/doc/src/images/motif-label.png
new file mode 100644
index 0000000..7ae6674
--- /dev/null
+++ b/doc/src/images/motif-label.png
Binary files differ
diff --git a/doc/src/images/motif-lcdnumber.png b/doc/src/images/motif-lcdnumber.png
new file mode 100644
index 0000000..e2cc9a8
--- /dev/null
+++ b/doc/src/images/motif-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/motif-lineedit.png b/doc/src/images/motif-lineedit.png
new file mode 100644
index 0000000..a335c8c
--- /dev/null
+++ b/doc/src/images/motif-lineedit.png
Binary files differ
diff --git a/doc/src/images/motif-listview.png b/doc/src/images/motif-listview.png
new file mode 100644
index 0000000..47bd3ea
--- /dev/null
+++ b/doc/src/images/motif-listview.png
Binary files differ
diff --git a/doc/src/images/motif-menubar.png b/doc/src/images/motif-menubar.png
new file mode 100644
index 0000000..f1d9f4b
--- /dev/null
+++ b/doc/src/images/motif-menubar.png
Binary files differ
diff --git a/doc/src/images/motif-progressbar.png b/doc/src/images/motif-progressbar.png
new file mode 100644
index 0000000..f6d6979
--- /dev/null
+++ b/doc/src/images/motif-progressbar.png
Binary files differ
diff --git a/doc/src/images/motif-pushbutton.png b/doc/src/images/motif-pushbutton.png
new file mode 100644
index 0000000..9dc6a9d
--- /dev/null
+++ b/doc/src/images/motif-pushbutton.png
Binary files differ
diff --git a/doc/src/images/motif-radiobutton.png b/doc/src/images/motif-radiobutton.png
new file mode 100644
index 0000000..468e54c
--- /dev/null
+++ b/doc/src/images/motif-radiobutton.png
Binary files differ
diff --git a/doc/src/images/motif-slider.png b/doc/src/images/motif-slider.png
new file mode 100644
index 0000000..6301e2b
--- /dev/null
+++ b/doc/src/images/motif-slider.png
Binary files differ
diff --git a/doc/src/images/motif-spinbox.png b/doc/src/images/motif-spinbox.png
new file mode 100644
index 0000000..9acc282
--- /dev/null
+++ b/doc/src/images/motif-spinbox.png
Binary files differ
diff --git a/doc/src/images/motif-tableview.png b/doc/src/images/motif-tableview.png
new file mode 100644
index 0000000..a1d205a
--- /dev/null
+++ b/doc/src/images/motif-tableview.png
Binary files differ
diff --git a/doc/src/images/motif-tabwidget.png b/doc/src/images/motif-tabwidget.png
new file mode 100644
index 0000000..19da66a
--- /dev/null
+++ b/doc/src/images/motif-tabwidget.png
Binary files differ
diff --git a/doc/src/images/motif-textedit.png b/doc/src/images/motif-textedit.png
new file mode 100644
index 0000000..205bc19
--- /dev/null
+++ b/doc/src/images/motif-textedit.png
Binary files differ
diff --git a/doc/src/images/motif-timeedit.png b/doc/src/images/motif-timeedit.png
new file mode 100644
index 0000000..1ad459b
--- /dev/null
+++ b/doc/src/images/motif-timeedit.png
Binary files differ
diff --git a/doc/src/images/motif-todo.png b/doc/src/images/motif-todo.png
new file mode 100644
index 0000000..be39c48
--- /dev/null
+++ b/doc/src/images/motif-todo.png
Binary files differ
diff --git a/doc/src/images/motif-toolbox.png b/doc/src/images/motif-toolbox.png
new file mode 100644
index 0000000..4bc3c37
--- /dev/null
+++ b/doc/src/images/motif-toolbox.png
Binary files differ
diff --git a/doc/src/images/motif-toolbutton.png b/doc/src/images/motif-toolbutton.png
new file mode 100644
index 0000000..8ef51dd
--- /dev/null
+++ b/doc/src/images/motif-toolbutton.png
Binary files differ
diff --git a/doc/src/images/motif-treeview.png b/doc/src/images/motif-treeview.png
new file mode 100644
index 0000000..a7dd0f2
--- /dev/null
+++ b/doc/src/images/motif-treeview.png
Binary files differ
diff --git a/doc/src/images/movie-example.png b/doc/src/images/movie-example.png
new file mode 100644
index 0000000..713f563
--- /dev/null
+++ b/doc/src/images/movie-example.png
Binary files differ
diff --git a/doc/src/images/msgbox1.png b/doc/src/images/msgbox1.png
new file mode 100644
index 0000000..1380e20
--- /dev/null
+++ b/doc/src/images/msgbox1.png
Binary files differ
diff --git a/doc/src/images/msgbox2.png b/doc/src/images/msgbox2.png
new file mode 100644
index 0000000..e794699
--- /dev/null
+++ b/doc/src/images/msgbox2.png
Binary files differ
diff --git a/doc/src/images/msgbox3.png b/doc/src/images/msgbox3.png
new file mode 100644
index 0000000..bd81f4d
--- /dev/null
+++ b/doc/src/images/msgbox3.png
Binary files differ
diff --git a/doc/src/images/msgbox4.png b/doc/src/images/msgbox4.png
new file mode 100644
index 0000000..dbe6701
--- /dev/null
+++ b/doc/src/images/msgbox4.png
Binary files differ
diff --git a/doc/src/images/multipleinheritance-example.png b/doc/src/images/multipleinheritance-example.png
new file mode 100644
index 0000000..9e89292
--- /dev/null
+++ b/doc/src/images/multipleinheritance-example.png
Binary files differ
diff --git a/doc/src/images/musicplayer.png b/doc/src/images/musicplayer.png
new file mode 100644
index 0000000..4f3ebf7
--- /dev/null
+++ b/doc/src/images/musicplayer.png
Binary files differ
diff --git a/doc/src/images/network-chat-example.png b/doc/src/images/network-chat-example.png
new file mode 100644
index 0000000..949bb07
--- /dev/null
+++ b/doc/src/images/network-chat-example.png
Binary files differ
diff --git a/doc/src/images/network-examples.png b/doc/src/images/network-examples.png
new file mode 100644
index 0000000..15dfba8
--- /dev/null
+++ b/doc/src/images/network-examples.png
Binary files differ
diff --git a/doc/src/images/noforeignkeys.png b/doc/src/images/noforeignkeys.png
new file mode 100644
index 0000000..62a4452
--- /dev/null
+++ b/doc/src/images/noforeignkeys.png
Binary files differ
diff --git a/doc/src/images/opengl-examples.png b/doc/src/images/opengl-examples.png
new file mode 100644
index 0000000..8acdf8c
--- /dev/null
+++ b/doc/src/images/opengl-examples.png
Binary files differ
diff --git a/doc/src/images/orderform-example-detailsdialog.png b/doc/src/images/orderform-example-detailsdialog.png
new file mode 100644
index 0000000..8826369
--- /dev/null
+++ b/doc/src/images/orderform-example-detailsdialog.png
Binary files differ
diff --git a/doc/src/images/orderform-example.png b/doc/src/images/orderform-example.png
new file mode 100644
index 0000000..c8545ad
--- /dev/null
+++ b/doc/src/images/orderform-example.png
Binary files differ
diff --git a/doc/src/images/overpainting-example.png b/doc/src/images/overpainting-example.png
new file mode 100644
index 0000000..0368dca
--- /dev/null
+++ b/doc/src/images/overpainting-example.png
Binary files differ
diff --git a/doc/src/images/padnavigator-example.png b/doc/src/images/padnavigator-example.png
new file mode 100644
index 0000000..d766557
--- /dev/null
+++ b/doc/src/images/padnavigator-example.png
Binary files differ
diff --git a/doc/src/images/painterpaths-example.png b/doc/src/images/painterpaths-example.png
new file mode 100644
index 0000000..7e1220d
--- /dev/null
+++ b/doc/src/images/painterpaths-example.png
Binary files differ
diff --git a/doc/src/images/painting-examples.png b/doc/src/images/painting-examples.png
new file mode 100644
index 0000000..214004c
--- /dev/null
+++ b/doc/src/images/painting-examples.png
Binary files differ
diff --git a/doc/src/images/paintsystem-antialiasing.png b/doc/src/images/paintsystem-antialiasing.png
new file mode 100644
index 0000000..1275841
--- /dev/null
+++ b/doc/src/images/paintsystem-antialiasing.png
Binary files differ
diff --git a/doc/src/images/paintsystem-core.png b/doc/src/images/paintsystem-core.png
new file mode 100644
index 0000000..7d6a8e5
--- /dev/null
+++ b/doc/src/images/paintsystem-core.png
Binary files differ
diff --git a/doc/src/images/paintsystem-devices.png b/doc/src/images/paintsystem-devices.png
new file mode 100644
index 0000000..7b81b7c
--- /dev/null
+++ b/doc/src/images/paintsystem-devices.png
Binary files differ
diff --git a/doc/src/images/paintsystem-fancygradient.png b/doc/src/images/paintsystem-fancygradient.png
new file mode 100644
index 0000000..701df29
--- /dev/null
+++ b/doc/src/images/paintsystem-fancygradient.png
Binary files differ
diff --git a/doc/src/images/paintsystem-gradients.png b/doc/src/images/paintsystem-gradients.png
new file mode 100644
index 0000000..50b2ed3
--- /dev/null
+++ b/doc/src/images/paintsystem-gradients.png
Binary files differ
diff --git a/doc/src/images/paintsystem-icon.png b/doc/src/images/paintsystem-icon.png
new file mode 100644
index 0000000..4623db0
--- /dev/null
+++ b/doc/src/images/paintsystem-icon.png
Binary files differ
diff --git a/doc/src/images/paintsystem-movie.png b/doc/src/images/paintsystem-movie.png
new file mode 100644
index 0000000..992ea9e
--- /dev/null
+++ b/doc/src/images/paintsystem-movie.png
Binary files differ
diff --git a/doc/src/images/paintsystem-painterpath.png b/doc/src/images/paintsystem-painterpath.png
new file mode 100644
index 0000000..f8154f2
--- /dev/null
+++ b/doc/src/images/paintsystem-painterpath.png
Binary files differ
diff --git a/doc/src/images/paintsystem-stylepainter.png b/doc/src/images/paintsystem-stylepainter.png
new file mode 100644
index 0000000..a67c6c5
--- /dev/null
+++ b/doc/src/images/paintsystem-stylepainter.png
Binary files differ
diff --git a/doc/src/images/paintsystem-svg.png b/doc/src/images/paintsystem-svg.png
new file mode 100644
index 0000000..ecc8ef8
--- /dev/null
+++ b/doc/src/images/paintsystem-svg.png
Binary files differ
diff --git a/doc/src/images/palette.png b/doc/src/images/palette.png
new file mode 100644
index 0000000..832a5a5
--- /dev/null
+++ b/doc/src/images/palette.png
Binary files differ
diff --git a/doc/src/images/parent-child-widgets.png b/doc/src/images/parent-child-widgets.png
new file mode 100644
index 0000000..094e2e9
--- /dev/null
+++ b/doc/src/images/parent-child-widgets.png
Binary files differ
diff --git a/doc/src/images/pathexample.png b/doc/src/images/pathexample.png
new file mode 100644
index 0000000..7a07db3
--- /dev/null
+++ b/doc/src/images/pathexample.png
Binary files differ
diff --git a/doc/src/images/pathstroke-demo.png b/doc/src/images/pathstroke-demo.png
new file mode 100644
index 0000000..2df765f
--- /dev/null
+++ b/doc/src/images/pathstroke-demo.png
Binary files differ
diff --git a/doc/src/images/patternist-importFlow.png b/doc/src/images/patternist-importFlow.png
new file mode 100644
index 0000000..cca5fa0
--- /dev/null
+++ b/doc/src/images/patternist-importFlow.png
Binary files differ
diff --git a/doc/src/images/patternist-wordProcessor.png b/doc/src/images/patternist-wordProcessor.png
new file mode 100644
index 0000000..0901330
--- /dev/null
+++ b/doc/src/images/patternist-wordProcessor.png
Binary files differ
diff --git a/doc/src/images/pbuffers-example.png b/doc/src/images/pbuffers-example.png
new file mode 100644
index 0000000..bafb05a
--- /dev/null
+++ b/doc/src/images/pbuffers-example.png
Binary files differ
diff --git a/doc/src/images/pbuffers2-example.png b/doc/src/images/pbuffers2-example.png
new file mode 100644
index 0000000..4a9c717
--- /dev/null
+++ b/doc/src/images/pbuffers2-example.png
Binary files differ
diff --git a/doc/src/images/phonon-examples.png b/doc/src/images/phonon-examples.png
new file mode 100644
index 0000000..56b5137
--- /dev/null
+++ b/doc/src/images/phonon-examples.png
Binary files differ
diff --git a/doc/src/images/pixelator-example.png b/doc/src/images/pixelator-example.png
new file mode 100644
index 0000000..b6273c7
--- /dev/null
+++ b/doc/src/images/pixelator-example.png
Binary files differ
diff --git a/doc/src/images/pixmapfilter-example.png b/doc/src/images/pixmapfilter-example.png
new file mode 100644
index 0000000..29a6ddc
--- /dev/null
+++ b/doc/src/images/pixmapfilter-example.png
Binary files differ
diff --git a/doc/src/images/pixmapfilterexample-colorize.png b/doc/src/images/pixmapfilterexample-colorize.png
new file mode 100644
index 0000000..0e023a5
--- /dev/null
+++ b/doc/src/images/pixmapfilterexample-colorize.png
Binary files differ
diff --git a/doc/src/images/pixmapfilterexample-dropshadow.png b/doc/src/images/pixmapfilterexample-dropshadow.png
new file mode 100644
index 0000000..be43659
--- /dev/null
+++ b/doc/src/images/pixmapfilterexample-dropshadow.png
Binary files differ
diff --git a/doc/src/images/plaintext-layout.png b/doc/src/images/plaintext-layout.png
new file mode 100644
index 0000000..9172d7a
--- /dev/null
+++ b/doc/src/images/plaintext-layout.png
Binary files differ
diff --git a/doc/src/images/plastique-calendarwidget.png b/doc/src/images/plastique-calendarwidget.png
new file mode 100644
index 0000000..5e65945
--- /dev/null
+++ b/doc/src/images/plastique-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/plastique-checkbox.png b/doc/src/images/plastique-checkbox.png
new file mode 100644
index 0000000..91a5109
--- /dev/null
+++ b/doc/src/images/plastique-checkbox.png
Binary files differ
diff --git a/doc/src/images/plastique-colordialog.png b/doc/src/images/plastique-colordialog.png
new file mode 100644
index 0000000..68bf4d0
--- /dev/null
+++ b/doc/src/images/plastique-colordialog.png
Binary files differ
diff --git a/doc/src/images/plastique-combobox.png b/doc/src/images/plastique-combobox.png
new file mode 100644
index 0000000..e3bf8a3
--- /dev/null
+++ b/doc/src/images/plastique-combobox.png
Binary files differ
diff --git a/doc/src/images/plastique-dateedit.png b/doc/src/images/plastique-dateedit.png
new file mode 100644
index 0000000..2e28a40
--- /dev/null
+++ b/doc/src/images/plastique-dateedit.png
Binary files differ
diff --git a/doc/src/images/plastique-datetimeedit.png b/doc/src/images/plastique-datetimeedit.png
new file mode 100644
index 0000000..810bf16
--- /dev/null
+++ b/doc/src/images/plastique-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/plastique-dial.png b/doc/src/images/plastique-dial.png
new file mode 100644
index 0000000..b65e7c7
--- /dev/null
+++ b/doc/src/images/plastique-dial.png
Binary files differ
diff --git a/doc/src/images/plastique-dialogbuttonbox.png b/doc/src/images/plastique-dialogbuttonbox.png
new file mode 100644
index 0000000..823b352
--- /dev/null
+++ b/doc/src/images/plastique-dialogbuttonbox.png
Binary files differ
diff --git a/doc/src/images/plastique-doublespinbox.png b/doc/src/images/plastique-doublespinbox.png
new file mode 100644
index 0000000..627c4a2
--- /dev/null
+++ b/doc/src/images/plastique-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/plastique-filedialog.png b/doc/src/images/plastique-filedialog.png
new file mode 100644
index 0000000..60f3c4b
--- /dev/null
+++ b/doc/src/images/plastique-filedialog.png
Binary files differ
diff --git a/doc/src/images/plastique-fontcombobox-open.png b/doc/src/images/plastique-fontcombobox-open.png
new file mode 100644
index 0000000..37816c4
--- /dev/null
+++ b/doc/src/images/plastique-fontcombobox-open.png
Binary files differ
diff --git a/doc/src/images/plastique-fontcombobox.png b/doc/src/images/plastique-fontcombobox.png
new file mode 100644
index 0000000..d382308
--- /dev/null
+++ b/doc/src/images/plastique-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/plastique-fontdialog.png b/doc/src/images/plastique-fontdialog.png
new file mode 100644
index 0000000..7e799a8
--- /dev/null
+++ b/doc/src/images/plastique-fontdialog.png
Binary files differ
diff --git a/doc/src/images/plastique-frame.png b/doc/src/images/plastique-frame.png
new file mode 100644
index 0000000..9f81f6c
--- /dev/null
+++ b/doc/src/images/plastique-frame.png
Binary files differ
diff --git a/doc/src/images/plastique-groupbox.png b/doc/src/images/plastique-groupbox.png
new file mode 100644
index 0000000..d353c40
--- /dev/null
+++ b/doc/src/images/plastique-groupbox.png
Binary files differ
diff --git a/doc/src/images/plastique-horizontalscrollbar.png b/doc/src/images/plastique-horizontalscrollbar.png
new file mode 100644
index 0000000..d20300c
--- /dev/null
+++ b/doc/src/images/plastique-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/plastique-label.png b/doc/src/images/plastique-label.png
new file mode 100644
index 0000000..d2a55a8
--- /dev/null
+++ b/doc/src/images/plastique-label.png
Binary files differ
diff --git a/doc/src/images/plastique-lcdnumber.png b/doc/src/images/plastique-lcdnumber.png
new file mode 100644
index 0000000..74149ee
--- /dev/null
+++ b/doc/src/images/plastique-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/plastique-lineedit.png b/doc/src/images/plastique-lineedit.png
new file mode 100644
index 0000000..f455383
--- /dev/null
+++ b/doc/src/images/plastique-lineedit.png
Binary files differ
diff --git a/doc/src/images/plastique-listview.png b/doc/src/images/plastique-listview.png
new file mode 100644
index 0000000..64bd00f
--- /dev/null
+++ b/doc/src/images/plastique-listview.png
Binary files differ
diff --git a/doc/src/images/plastique-menu.png b/doc/src/images/plastique-menu.png
new file mode 100644
index 0000000..88df249
--- /dev/null
+++ b/doc/src/images/plastique-menu.png
Binary files differ
diff --git a/doc/src/images/plastique-menubar.png b/doc/src/images/plastique-menubar.png
new file mode 100644
index 0000000..642f95d
--- /dev/null
+++ b/doc/src/images/plastique-menubar.png
Binary files differ
diff --git a/doc/src/images/plastique-messagebox.png b/doc/src/images/plastique-messagebox.png
new file mode 100644
index 0000000..89178fc
--- /dev/null
+++ b/doc/src/images/plastique-messagebox.png
Binary files differ
diff --git a/doc/src/images/plastique-printdialog-properties.png b/doc/src/images/plastique-printdialog-properties.png
new file mode 100644
index 0000000..38c1ae7
--- /dev/null
+++ b/doc/src/images/plastique-printdialog-properties.png
Binary files differ
diff --git a/doc/src/images/plastique-printdialog.png b/doc/src/images/plastique-printdialog.png
new file mode 100644
index 0000000..3f8af01
--- /dev/null
+++ b/doc/src/images/plastique-printdialog.png
Binary files differ
diff --git a/doc/src/images/plastique-progressbar.png b/doc/src/images/plastique-progressbar.png
new file mode 100644
index 0000000..fe8dd90
--- /dev/null
+++ b/doc/src/images/plastique-progressbar.png
Binary files differ
diff --git a/doc/src/images/plastique-progressdialog.png b/doc/src/images/plastique-progressdialog.png
new file mode 100644
index 0000000..4373bca
--- /dev/null
+++ b/doc/src/images/plastique-progressdialog.png
Binary files differ
diff --git a/doc/src/images/plastique-pushbutton-menu.png b/doc/src/images/plastique-pushbutton-menu.png
new file mode 100644
index 0000000..d090033
--- /dev/null
+++ b/doc/src/images/plastique-pushbutton-menu.png
Binary files differ
diff --git a/doc/src/images/plastique-pushbutton.png b/doc/src/images/plastique-pushbutton.png
new file mode 100644
index 0000000..83c44fd
--- /dev/null
+++ b/doc/src/images/plastique-pushbutton.png
Binary files differ
diff --git a/doc/src/images/plastique-radiobutton.png b/doc/src/images/plastique-radiobutton.png
new file mode 100644
index 0000000..a2c820d
--- /dev/null
+++ b/doc/src/images/plastique-radiobutton.png
Binary files differ
diff --git a/doc/src/images/plastique-sizegrip.png b/doc/src/images/plastique-sizegrip.png
new file mode 100644
index 0000000..09a551e
--- /dev/null
+++ b/doc/src/images/plastique-sizegrip.png
Binary files differ
diff --git a/doc/src/images/plastique-slider.png b/doc/src/images/plastique-slider.png
new file mode 100644
index 0000000..492f0fd
--- /dev/null
+++ b/doc/src/images/plastique-slider.png
Binary files differ
diff --git a/doc/src/images/plastique-spinbox.png b/doc/src/images/plastique-spinbox.png
new file mode 100644
index 0000000..af15db3
--- /dev/null
+++ b/doc/src/images/plastique-spinbox.png
Binary files differ
diff --git a/doc/src/images/plastique-statusbar.png b/doc/src/images/plastique-statusbar.png
new file mode 100644
index 0000000..c8f9792
--- /dev/null
+++ b/doc/src/images/plastique-statusbar.png
Binary files differ
diff --git a/doc/src/images/plastique-tabbar-truncated.png b/doc/src/images/plastique-tabbar-truncated.png
new file mode 100644
index 0000000..8e906d9
--- /dev/null
+++ b/doc/src/images/plastique-tabbar-truncated.png
Binary files differ
diff --git a/doc/src/images/plastique-tabbar.png b/doc/src/images/plastique-tabbar.png
new file mode 100644
index 0000000..3371dda
--- /dev/null
+++ b/doc/src/images/plastique-tabbar.png
Binary files differ
diff --git a/doc/src/images/plastique-tableview.png b/doc/src/images/plastique-tableview.png
new file mode 100644
index 0000000..b20c1cc
--- /dev/null
+++ b/doc/src/images/plastique-tableview.png
Binary files differ
diff --git a/doc/src/images/plastique-tabwidget.png b/doc/src/images/plastique-tabwidget.png
new file mode 100644
index 0000000..92ae398
--- /dev/null
+++ b/doc/src/images/plastique-tabwidget.png
Binary files differ
diff --git a/doc/src/images/plastique-textedit.png b/doc/src/images/plastique-textedit.png
new file mode 100644
index 0000000..a802d75
--- /dev/null
+++ b/doc/src/images/plastique-textedit.png
Binary files differ
diff --git a/doc/src/images/plastique-timeedit.png b/doc/src/images/plastique-timeedit.png
new file mode 100644
index 0000000..2d70b84
--- /dev/null
+++ b/doc/src/images/plastique-timeedit.png
Binary files differ
diff --git a/doc/src/images/plastique-toolbox.png b/doc/src/images/plastique-toolbox.png
new file mode 100644
index 0000000..10bcd7a
--- /dev/null
+++ b/doc/src/images/plastique-toolbox.png
Binary files differ
diff --git a/doc/src/images/plastique-toolbutton.png b/doc/src/images/plastique-toolbutton.png
new file mode 100644
index 0000000..4e51831
--- /dev/null
+++ b/doc/src/images/plastique-toolbutton.png
Binary files differ
diff --git a/doc/src/images/plastique-treeview.png b/doc/src/images/plastique-treeview.png
new file mode 100644
index 0000000..db0bc01
--- /dev/null
+++ b/doc/src/images/plastique-treeview.png
Binary files differ
diff --git a/doc/src/images/plugandpaint-plugindialog.png b/doc/src/images/plugandpaint-plugindialog.png
new file mode 100644
index 0000000..4b601bd
--- /dev/null
+++ b/doc/src/images/plugandpaint-plugindialog.png
Binary files differ
diff --git a/doc/src/images/plugandpaint.png b/doc/src/images/plugandpaint.png
new file mode 100644
index 0000000..bd5d001
--- /dev/null
+++ b/doc/src/images/plugandpaint.png
Binary files differ
diff --git a/doc/src/images/portedasteroids-example.png b/doc/src/images/portedasteroids-example.png
new file mode 100644
index 0000000..8dbe673
--- /dev/null
+++ b/doc/src/images/portedasteroids-example.png
Binary files differ
diff --git a/doc/src/images/portedcanvas-example.png b/doc/src/images/portedcanvas-example.png
new file mode 100644
index 0000000..b5fce51
--- /dev/null
+++ b/doc/src/images/portedcanvas-example.png
Binary files differ
diff --git a/doc/src/images/previewer-example.png b/doc/src/images/previewer-example.png
new file mode 100644
index 0000000..d930250
--- /dev/null
+++ b/doc/src/images/previewer-example.png
Binary files differ
diff --git a/doc/src/images/previewer-ui.png b/doc/src/images/previewer-ui.png
new file mode 100644
index 0000000..c92d136
--- /dev/null
+++ b/doc/src/images/previewer-ui.png
Binary files differ
diff --git a/doc/src/images/printer-rects.png b/doc/src/images/printer-rects.png
new file mode 100644
index 0000000..8ebea60
--- /dev/null
+++ b/doc/src/images/printer-rects.png
Binary files differ
diff --git a/doc/src/images/progressBar-stylesheet.png b/doc/src/images/progressBar-stylesheet.png
new file mode 100644
index 0000000..b4bf755
--- /dev/null
+++ b/doc/src/images/progressBar-stylesheet.png
Binary files differ
diff --git a/doc/src/images/progressBar2-stylesheet.png b/doc/src/images/progressBar2-stylesheet.png
new file mode 100644
index 0000000..8b5ecc0
--- /dev/null
+++ b/doc/src/images/progressBar2-stylesheet.png
Binary files differ
diff --git a/doc/src/images/propagation-custom.png b/doc/src/images/propagation-custom.png
new file mode 100644
index 0000000..866b44d
--- /dev/null
+++ b/doc/src/images/propagation-custom.png
Binary files differ
diff --git a/doc/src/images/propagation-standard.png b/doc/src/images/propagation-standard.png
new file mode 100644
index 0000000..b010fcc
--- /dev/null
+++ b/doc/src/images/propagation-standard.png
Binary files differ
diff --git a/doc/src/images/q3painter_rationale.png b/doc/src/images/q3painter_rationale.png
new file mode 100644
index 0000000..3c4835b
--- /dev/null
+++ b/doc/src/images/q3painter_rationale.png
Binary files differ
diff --git a/doc/src/images/qactiongroup-align.png b/doc/src/images/qactiongroup-align.png
new file mode 100644
index 0000000..65683e0
--- /dev/null
+++ b/doc/src/images/qactiongroup-align.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-grid.png b/doc/src/images/qcalendarwidget-grid.png
new file mode 100644
index 0000000..3df4dd9
--- /dev/null
+++ b/doc/src/images/qcalendarwidget-grid.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-maximum.png b/doc/src/images/qcalendarwidget-maximum.png
new file mode 100644
index 0000000..1e78d20
--- /dev/null
+++ b/doc/src/images/qcalendarwidget-maximum.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget-minimum.png b/doc/src/images/qcalendarwidget-minimum.png
new file mode 100644
index 0000000..f860429
--- /dev/null
+++ b/doc/src/images/qcalendarwidget-minimum.png
Binary files differ
diff --git a/doc/src/images/qcalendarwidget.png b/doc/src/images/qcalendarwidget.png
new file mode 100644
index 0000000..354a67a
--- /dev/null
+++ b/doc/src/images/qcalendarwidget.png
Binary files differ
diff --git a/doc/src/images/qcanvasellipse.png b/doc/src/images/qcanvasellipse.png
new file mode 100644
index 0000000..1fe82d0
--- /dev/null
+++ b/doc/src/images/qcanvasellipse.png
Binary files differ
diff --git a/doc/src/images/qcdestyle.png b/doc/src/images/qcdestyle.png
new file mode 100644
index 0000000..74fb332
--- /dev/null
+++ b/doc/src/images/qcdestyle.png
Binary files differ
diff --git a/doc/src/images/qcolor-cmyk.png b/doc/src/images/qcolor-cmyk.png
new file mode 100644
index 0000000..dfe8f67
--- /dev/null
+++ b/doc/src/images/qcolor-cmyk.png
Binary files differ
diff --git a/doc/src/images/qcolor-hsv.png b/doc/src/images/qcolor-hsv.png
new file mode 100644
index 0000000..49fdf77
--- /dev/null
+++ b/doc/src/images/qcolor-hsv.png
Binary files differ
diff --git a/doc/src/images/qcolor-hue.png b/doc/src/images/qcolor-hue.png
new file mode 100644
index 0000000..144b27c
--- /dev/null
+++ b/doc/src/images/qcolor-hue.png
Binary files differ
diff --git a/doc/src/images/qcolor-rgb.png b/doc/src/images/qcolor-rgb.png
new file mode 100644
index 0000000..fea4c63
--- /dev/null
+++ b/doc/src/images/qcolor-rgb.png
Binary files differ
diff --git a/doc/src/images/qcolor-saturation.png b/doc/src/images/qcolor-saturation.png
new file mode 100644
index 0000000..f28776a
--- /dev/null
+++ b/doc/src/images/qcolor-saturation.png
Binary files differ
diff --git a/doc/src/images/qcolor-value.png b/doc/src/images/qcolor-value.png
new file mode 100644
index 0000000..0e06912
--- /dev/null
+++ b/doc/src/images/qcolor-value.png
Binary files differ
diff --git a/doc/src/images/qcolumnview.png b/doc/src/images/qcolumnview.png
new file mode 100644
index 0000000..1d312bf
--- /dev/null
+++ b/doc/src/images/qcolumnview.png
Binary files differ
diff --git a/doc/src/images/qconicalgradient.png b/doc/src/images/qconicalgradient.png
new file mode 100644
index 0000000..8260306
--- /dev/null
+++ b/doc/src/images/qconicalgradient.png
Binary files differ
diff --git a/doc/src/images/qdatawidgetmapper-simple.png b/doc/src/images/qdatawidgetmapper-simple.png
new file mode 100644
index 0000000..784a433
--- /dev/null
+++ b/doc/src/images/qdatawidgetmapper-simple.png
Binary files differ
diff --git a/doc/src/images/qdesktopwidget.png b/doc/src/images/qdesktopwidget.png
new file mode 100644
index 0000000..02f8e8b
--- /dev/null
+++ b/doc/src/images/qdesktopwidget.png
Binary files differ
diff --git a/doc/src/images/qdockwindow.png b/doc/src/images/qdockwindow.png
new file mode 100644
index 0000000..98d2502
--- /dev/null
+++ b/doc/src/images/qdockwindow.png
Binary files differ
diff --git a/doc/src/images/qerrormessage.png b/doc/src/images/qerrormessage.png
new file mode 100644
index 0000000..b905f8a
--- /dev/null
+++ b/doc/src/images/qerrormessage.png
Binary files differ
diff --git a/doc/src/images/qfiledialog-expanded.png b/doc/src/images/qfiledialog-expanded.png
new file mode 100644
index 0000000..07d2606
--- /dev/null
+++ b/doc/src/images/qfiledialog-expanded.png
Binary files differ
diff --git a/doc/src/images/qfiledialog-small.png b/doc/src/images/qfiledialog-small.png
new file mode 100644
index 0000000..94d7aa5
--- /dev/null
+++ b/doc/src/images/qfiledialog-small.png
Binary files differ
diff --git a/doc/src/images/qformlayout-kde.png b/doc/src/images/qformlayout-kde.png
new file mode 100644
index 0000000..c32bb12
--- /dev/null
+++ b/doc/src/images/qformlayout-kde.png
Binary files differ
diff --git a/doc/src/images/qformlayout-mac.png b/doc/src/images/qformlayout-mac.png
new file mode 100644
index 0000000..0a0824e
--- /dev/null
+++ b/doc/src/images/qformlayout-mac.png
Binary files differ
diff --git a/doc/src/images/qformlayout-qpe.png b/doc/src/images/qformlayout-qpe.png
new file mode 100644
index 0000000..3abecc5
--- /dev/null
+++ b/doc/src/images/qformlayout-qpe.png
Binary files differ
diff --git a/doc/src/images/qformlayout-win.png b/doc/src/images/qformlayout-win.png
new file mode 100644
index 0000000..1ed44bd
--- /dev/null
+++ b/doc/src/images/qformlayout-win.png
Binary files differ
diff --git a/doc/src/images/qformlayout-with-6-children.png b/doc/src/images/qformlayout-with-6-children.png
new file mode 100644
index 0000000..f743599
--- /dev/null
+++ b/doc/src/images/qformlayout-with-6-children.png
Binary files differ
diff --git a/doc/src/images/qgradient-conical.png b/doc/src/images/qgradient-conical.png
new file mode 100644
index 0000000..cf06b70
--- /dev/null
+++ b/doc/src/images/qgradient-conical.png
Binary files differ
diff --git a/doc/src/images/qgradient-linear.png b/doc/src/images/qgradient-linear.png
new file mode 100644
index 0000000..5a5e880
--- /dev/null
+++ b/doc/src/images/qgradient-linear.png
Binary files differ
diff --git a/doc/src/images/qgradient-radial.png b/doc/src/images/qgradient-radial.png
new file mode 100644
index 0000000..95b9e9c
--- /dev/null
+++ b/doc/src/images/qgradient-radial.png
Binary files differ
diff --git a/doc/src/images/qgraphicsproxywidget-embed.png b/doc/src/images/qgraphicsproxywidget-embed.png
new file mode 100644
index 0000000..10d8f6f
--- /dev/null
+++ b/doc/src/images/qgraphicsproxywidget-embed.png
Binary files differ
diff --git a/doc/src/images/qgridlayout-with-5-children.png b/doc/src/images/qgridlayout-with-5-children.png
new file mode 100644
index 0000000..8d0c296
--- /dev/null
+++ b/doc/src/images/qgridlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/qhbox-m.png b/doc/src/images/qhbox-m.png
new file mode 100644
index 0000000..4f0bc57
--- /dev/null
+++ b/doc/src/images/qhbox-m.png
Binary files differ
diff --git a/doc/src/images/qhboxlayout-with-5-children.png b/doc/src/images/qhboxlayout-with-5-children.png
new file mode 100644
index 0000000..9b48dc5
--- /dev/null
+++ b/doc/src/images/qhboxlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/qimage-32bit.png b/doc/src/images/qimage-32bit.png
new file mode 100644
index 0000000..2a76d40
--- /dev/null
+++ b/doc/src/images/qimage-32bit.png
Binary files differ
diff --git a/doc/src/images/qimage-32bit_scaled.png b/doc/src/images/qimage-32bit_scaled.png
new file mode 100644
index 0000000..6932327
--- /dev/null
+++ b/doc/src/images/qimage-32bit_scaled.png
Binary files differ
diff --git a/doc/src/images/qimage-8bit.png b/doc/src/images/qimage-8bit.png
new file mode 100644
index 0000000..454e501
--- /dev/null
+++ b/doc/src/images/qimage-8bit.png
Binary files differ
diff --git a/doc/src/images/qimage-8bit_scaled.png b/doc/src/images/qimage-8bit_scaled.png
new file mode 100644
index 0000000..7cbf0f1
--- /dev/null
+++ b/doc/src/images/qimage-8bit_scaled.png
Binary files differ
diff --git a/doc/src/images/qimage-scaling.png b/doc/src/images/qimage-scaling.png
new file mode 100644
index 0000000..fcd7144
--- /dev/null
+++ b/doc/src/images/qimage-scaling.png
Binary files differ
diff --git a/doc/src/images/qline-coordinates.png b/doc/src/images/qline-coordinates.png
new file mode 100644
index 0000000..ac4fb98
--- /dev/null
+++ b/doc/src/images/qline-coordinates.png
Binary files differ
diff --git a/doc/src/images/qline-point.png b/doc/src/images/qline-point.png
new file mode 100644
index 0000000..3bc3664
--- /dev/null
+++ b/doc/src/images/qline-point.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-pad.png b/doc/src/images/qlineargradient-pad.png
new file mode 100644
index 0000000..d77eb3d
--- /dev/null
+++ b/doc/src/images/qlineargradient-pad.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-reflect.png b/doc/src/images/qlineargradient-reflect.png
new file mode 100644
index 0000000..dd12665
--- /dev/null
+++ b/doc/src/images/qlineargradient-reflect.png
Binary files differ
diff --git a/doc/src/images/qlineargradient-repeat.png b/doc/src/images/qlineargradient-repeat.png
new file mode 100644
index 0000000..e38203c
--- /dev/null
+++ b/doc/src/images/qlineargradient-repeat.png
Binary files differ
diff --git a/doc/src/images/qlinef-angle-identicaldirection.png b/doc/src/images/qlinef-angle-identicaldirection.png
new file mode 100644
index 0000000..18d6323
--- /dev/null
+++ b/doc/src/images/qlinef-angle-identicaldirection.png
Binary files differ
diff --git a/doc/src/images/qlinef-angle-oppositedirection.png b/doc/src/images/qlinef-angle-oppositedirection.png
new file mode 100644
index 0000000..bf52cfe
--- /dev/null
+++ b/doc/src/images/qlinef-angle-oppositedirection.png
Binary files differ
diff --git a/doc/src/images/qlinef-bounded.png b/doc/src/images/qlinef-bounded.png
new file mode 100644
index 0000000..136dd50
--- /dev/null
+++ b/doc/src/images/qlinef-bounded.png
Binary files differ
diff --git a/doc/src/images/qlinef-normalvector.png b/doc/src/images/qlinef-normalvector.png
new file mode 100644
index 0000000..b7d944f
--- /dev/null
+++ b/doc/src/images/qlinef-normalvector.png
Binary files differ
diff --git a/doc/src/images/qlinef-unbounded.png b/doc/src/images/qlinef-unbounded.png
new file mode 100644
index 0000000..75ead98
--- /dev/null
+++ b/doc/src/images/qlinef-unbounded.png
Binary files differ
diff --git a/doc/src/images/qlistbox-m.png b/doc/src/images/qlistbox-m.png
new file mode 100644
index 0000000..5b956bc
--- /dev/null
+++ b/doc/src/images/qlistbox-m.png
Binary files differ
diff --git a/doc/src/images/qlistbox-w.png b/doc/src/images/qlistbox-w.png
new file mode 100644
index 0000000..19798ea
--- /dev/null
+++ b/doc/src/images/qlistbox-w.png
Binary files differ
diff --git a/doc/src/images/qlistviewitems.png b/doc/src/images/qlistviewitems.png
new file mode 100644
index 0000000..fe862c7
--- /dev/null
+++ b/doc/src/images/qlistviewitems.png
Binary files differ
diff --git a/doc/src/images/qmacstyle.png b/doc/src/images/qmacstyle.png
new file mode 100644
index 0000000..dda3c35
--- /dev/null
+++ b/doc/src/images/qmacstyle.png
Binary files differ
diff --git a/doc/src/images/qmainwindow-qdockareas.png b/doc/src/images/qmainwindow-qdockareas.png
new file mode 100644
index 0000000..0eff42d
--- /dev/null
+++ b/doc/src/images/qmainwindow-qdockareas.png
Binary files differ
diff --git a/doc/src/images/qmatrix-combinedtransformation.png b/doc/src/images/qmatrix-combinedtransformation.png
new file mode 100644
index 0000000..f791bfa
--- /dev/null
+++ b/doc/src/images/qmatrix-combinedtransformation.png
Binary files differ
diff --git a/doc/src/images/qmatrix-representation.png b/doc/src/images/qmatrix-representation.png
new file mode 100644
index 0000000..2e3efd3
--- /dev/null
+++ b/doc/src/images/qmatrix-representation.png
Binary files differ
diff --git a/doc/src/images/qmatrix-simpletransformation.png b/doc/src/images/qmatrix-simpletransformation.png
new file mode 100644
index 0000000..dde8f4b
--- /dev/null
+++ b/doc/src/images/qmatrix-simpletransformation.png
Binary files differ
diff --git a/doc/src/images/qmdiarea-arrange.png b/doc/src/images/qmdiarea-arrange.png
new file mode 100644
index 0000000..14b0af5
--- /dev/null
+++ b/doc/src/images/qmdiarea-arrange.png
Binary files differ
diff --git a/doc/src/images/qmdisubwindowlayout.png b/doc/src/images/qmdisubwindowlayout.png
new file mode 100644
index 0000000..ffe5cc3
--- /dev/null
+++ b/doc/src/images/qmdisubwindowlayout.png
Binary files differ
diff --git a/doc/src/images/qmessagebox-crit.png b/doc/src/images/qmessagebox-crit.png
new file mode 100644
index 0000000..f30d3ee
--- /dev/null
+++ b/doc/src/images/qmessagebox-crit.png
Binary files differ
diff --git a/doc/src/images/qmessagebox-info.png b/doc/src/images/qmessagebox-info.png
new file mode 100644
index 0000000..1399406
--- /dev/null
+++ b/doc/src/images/qmessagebox-info.png
Binary files differ
diff --git a/doc/src/images/qmessagebox-quest.png b/doc/src/images/qmessagebox-quest.png
new file mode 100644
index 0000000..5943fdd
--- /dev/null
+++ b/doc/src/images/qmessagebox-quest.png
Binary files differ
diff --git a/doc/src/images/qmessagebox-warn.png b/doc/src/images/qmessagebox-warn.png
new file mode 100644
index 0000000..26a212e
--- /dev/null
+++ b/doc/src/images/qmessagebox-warn.png
Binary files differ
diff --git a/doc/src/images/qmotifstyle.png b/doc/src/images/qmotifstyle.png
new file mode 100644
index 0000000..b0a6d86
--- /dev/null
+++ b/doc/src/images/qmotifstyle.png
Binary files differ
diff --git a/doc/src/images/qobjectxmlmodel-example.png b/doc/src/images/qobjectxmlmodel-example.png
new file mode 100644
index 0000000..e40ba15
--- /dev/null
+++ b/doc/src/images/qobjectxmlmodel-example.png
Binary files differ
diff --git a/doc/src/images/qpainter-affinetransformations.png b/doc/src/images/qpainter-affinetransformations.png
new file mode 100644
index 0000000..fe2f9a0
--- /dev/null
+++ b/doc/src/images/qpainter-affinetransformations.png
Binary files differ
diff --git a/doc/src/images/qpainter-angles.png b/doc/src/images/qpainter-angles.png
new file mode 100644
index 0000000..00bd7d4
--- /dev/null
+++ b/doc/src/images/qpainter-angles.png
Binary files differ
diff --git a/doc/src/images/qpainter-arc.png b/doc/src/images/qpainter-arc.png
new file mode 100644
index 0000000..8cb9cec
--- /dev/null
+++ b/doc/src/images/qpainter-arc.png
Binary files differ
diff --git a/doc/src/images/qpainter-basicdrawing.png b/doc/src/images/qpainter-basicdrawing.png
new file mode 100644
index 0000000..3be48c8
--- /dev/null
+++ b/doc/src/images/qpainter-basicdrawing.png
Binary files differ
diff --git a/doc/src/images/qpainter-chord.png b/doc/src/images/qpainter-chord.png
new file mode 100644
index 0000000..a809086
--- /dev/null
+++ b/doc/src/images/qpainter-chord.png
Binary files differ
diff --git a/doc/src/images/qpainter-clock.png b/doc/src/images/qpainter-clock.png
new file mode 100644
index 0000000..3634754
--- /dev/null
+++ b/doc/src/images/qpainter-clock.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositiondemo.png b/doc/src/images/qpainter-compositiondemo.png
new file mode 100644
index 0000000..40f62c7
--- /dev/null
+++ b/doc/src/images/qpainter-compositiondemo.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositionmode.png b/doc/src/images/qpainter-compositionmode.png
new file mode 100644
index 0000000..1557720
--- /dev/null
+++ b/doc/src/images/qpainter-compositionmode.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositionmode1.png b/doc/src/images/qpainter-compositionmode1.png
new file mode 100644
index 0000000..6753093
--- /dev/null
+++ b/doc/src/images/qpainter-compositionmode1.png
Binary files differ
diff --git a/doc/src/images/qpainter-compositionmode2.png b/doc/src/images/qpainter-compositionmode2.png
new file mode 100644
index 0000000..fc05afb
--- /dev/null
+++ b/doc/src/images/qpainter-compositionmode2.png
Binary files differ
diff --git a/doc/src/images/qpainter-concentriccircles.png b/doc/src/images/qpainter-concentriccircles.png
new file mode 100644
index 0000000..4889dcd
--- /dev/null
+++ b/doc/src/images/qpainter-concentriccircles.png
Binary files differ
diff --git a/doc/src/images/qpainter-ellipse.png b/doc/src/images/qpainter-ellipse.png
new file mode 100644
index 0000000..e7e78c3
--- /dev/null
+++ b/doc/src/images/qpainter-ellipse.png
Binary files differ
diff --git a/doc/src/images/qpainter-gradients.png b/doc/src/images/qpainter-gradients.png
new file mode 100644
index 0000000..b7bc6a3
--- /dev/null
+++ b/doc/src/images/qpainter-gradients.png
Binary files differ
diff --git a/doc/src/images/qpainter-line.png b/doc/src/images/qpainter-line.png
new file mode 100644
index 0000000..5f1cd97
--- /dev/null
+++ b/doc/src/images/qpainter-line.png
Binary files differ
diff --git a/doc/src/images/qpainter-painterpaths.png b/doc/src/images/qpainter-painterpaths.png
new file mode 100644
index 0000000..0762ca9
--- /dev/null
+++ b/doc/src/images/qpainter-painterpaths.png
Binary files differ
diff --git a/doc/src/images/qpainter-path.png b/doc/src/images/qpainter-path.png
new file mode 100644
index 0000000..3570b16
--- /dev/null
+++ b/doc/src/images/qpainter-path.png
Binary files differ
diff --git a/doc/src/images/qpainter-pathstroking.png b/doc/src/images/qpainter-pathstroking.png
new file mode 100644
index 0000000..ab73c6a
--- /dev/null
+++ b/doc/src/images/qpainter-pathstroking.png
Binary files differ
diff --git a/doc/src/images/qpainter-pie.png b/doc/src/images/qpainter-pie.png
new file mode 100644
index 0000000..7803901
--- /dev/null
+++ b/doc/src/images/qpainter-pie.png
Binary files differ
diff --git a/doc/src/images/qpainter-polygon.png b/doc/src/images/qpainter-polygon.png
new file mode 100644
index 0000000..3b6ea3c
--- /dev/null
+++ b/doc/src/images/qpainter-polygon.png
Binary files differ
diff --git a/doc/src/images/qpainter-rectangle.png b/doc/src/images/qpainter-rectangle.png
new file mode 100644
index 0000000..05fdc88
--- /dev/null
+++ b/doc/src/images/qpainter-rectangle.png
Binary files differ
diff --git a/doc/src/images/qpainter-rotation.png b/doc/src/images/qpainter-rotation.png
new file mode 100644
index 0000000..6e24a0e
--- /dev/null
+++ b/doc/src/images/qpainter-rotation.png
Binary files differ
diff --git a/doc/src/images/qpainter-roundrect.png b/doc/src/images/qpainter-roundrect.png
new file mode 100644
index 0000000..876a277
--- /dev/null
+++ b/doc/src/images/qpainter-roundrect.png
Binary files differ
diff --git a/doc/src/images/qpainter-scale.png b/doc/src/images/qpainter-scale.png
new file mode 100644
index 0000000..4fe582e
--- /dev/null
+++ b/doc/src/images/qpainter-scale.png
Binary files differ
diff --git a/doc/src/images/qpainter-text.png b/doc/src/images/qpainter-text.png
new file mode 100644
index 0000000..af7821c
--- /dev/null
+++ b/doc/src/images/qpainter-text.png
Binary files differ
diff --git a/doc/src/images/qpainter-translation.png b/doc/src/images/qpainter-translation.png
new file mode 100644
index 0000000..b3716ca
--- /dev/null
+++ b/doc/src/images/qpainter-translation.png
Binary files differ
diff --git a/doc/src/images/qpainter-vectordeformation.png b/doc/src/images/qpainter-vectordeformation.png
new file mode 100644
index 0000000..aff95f4
--- /dev/null
+++ b/doc/src/images/qpainter-vectordeformation.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addellipse.png b/doc/src/images/qpainterpath-addellipse.png
new file mode 100644
index 0000000..98f8517
--- /dev/null
+++ b/doc/src/images/qpainterpath-addellipse.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addpolygon.png b/doc/src/images/qpainterpath-addpolygon.png
new file mode 100644
index 0000000..d36bde8
--- /dev/null
+++ b/doc/src/images/qpainterpath-addpolygon.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addrectangle.png b/doc/src/images/qpainterpath-addrectangle.png
new file mode 100644
index 0000000..be9283e
--- /dev/null
+++ b/doc/src/images/qpainterpath-addrectangle.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-addtext.png b/doc/src/images/qpainterpath-addtext.png
new file mode 100644
index 0000000..803a958
--- /dev/null
+++ b/doc/src/images/qpainterpath-addtext.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-arcto.png b/doc/src/images/qpainterpath-arcto.png
new file mode 100644
index 0000000..fe60b08
--- /dev/null
+++ b/doc/src/images/qpainterpath-arcto.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-construction.png b/doc/src/images/qpainterpath-construction.png
new file mode 100644
index 0000000..4beeba1
--- /dev/null
+++ b/doc/src/images/qpainterpath-construction.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-cubicto.png b/doc/src/images/qpainterpath-cubicto.png
new file mode 100644
index 0000000..465bfec
--- /dev/null
+++ b/doc/src/images/qpainterpath-cubicto.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-demo.png b/doc/src/images/qpainterpath-demo.png
new file mode 100644
index 0000000..ceeed2f
--- /dev/null
+++ b/doc/src/images/qpainterpath-demo.png
Binary files differ
diff --git a/doc/src/images/qpainterpath-example.png b/doc/src/images/qpainterpath-example.png
new file mode 100644
index 0000000..f2bd359
--- /dev/null
+++ b/doc/src/images/qpainterpath-example.png
Binary files differ
diff --git a/doc/src/images/qpen-bevel.png b/doc/src/images/qpen-bevel.png
new file mode 100644
index 0000000..8a30779
--- /dev/null
+++ b/doc/src/images/qpen-bevel.png
Binary files differ
diff --git a/doc/src/images/qpen-custom.png b/doc/src/images/qpen-custom.png
new file mode 100644
index 0000000..a2a038a
--- /dev/null
+++ b/doc/src/images/qpen-custom.png
Binary files differ
diff --git a/doc/src/images/qpen-dash.png b/doc/src/images/qpen-dash.png
new file mode 100644
index 0000000..67082c3
--- /dev/null
+++ b/doc/src/images/qpen-dash.png
Binary files differ
diff --git a/doc/src/images/qpen-dashdot.png b/doc/src/images/qpen-dashdot.png
new file mode 100644
index 0000000..64b3846
--- /dev/null
+++ b/doc/src/images/qpen-dashdot.png
Binary files differ
diff --git a/doc/src/images/qpen-dashdotdot.png b/doc/src/images/qpen-dashdotdot.png
new file mode 100644
index 0000000..ff1b2e6
--- /dev/null
+++ b/doc/src/images/qpen-dashdotdot.png
Binary files differ
diff --git a/doc/src/images/qpen-dashpattern.png b/doc/src/images/qpen-dashpattern.png
new file mode 100644
index 0000000..e33cf58
--- /dev/null
+++ b/doc/src/images/qpen-dashpattern.png
Binary files differ
diff --git a/doc/src/images/qpen-demo.png b/doc/src/images/qpen-demo.png
new file mode 100644
index 0000000..3ea5108
--- /dev/null
+++ b/doc/src/images/qpen-demo.png
Binary files differ
diff --git a/doc/src/images/qpen-dot.png b/doc/src/images/qpen-dot.png
new file mode 100644
index 0000000..54e81c9
--- /dev/null
+++ b/doc/src/images/qpen-dot.png
Binary files differ
diff --git a/doc/src/images/qpen-flat.png b/doc/src/images/qpen-flat.png
new file mode 100644
index 0000000..06e2195
--- /dev/null
+++ b/doc/src/images/qpen-flat.png
Binary files differ
diff --git a/doc/src/images/qpen-miter.png b/doc/src/images/qpen-miter.png
new file mode 100644
index 0000000..025e003
--- /dev/null
+++ b/doc/src/images/qpen-miter.png
Binary files differ
diff --git a/doc/src/images/qpen-miterlimit.png b/doc/src/images/qpen-miterlimit.png
new file mode 100644
index 0000000..17a9072
--- /dev/null
+++ b/doc/src/images/qpen-miterlimit.png
Binary files differ
diff --git a/doc/src/images/qpen-roundcap.png b/doc/src/images/qpen-roundcap.png
new file mode 100644
index 0000000..77b22b2
--- /dev/null
+++ b/doc/src/images/qpen-roundcap.png
Binary files differ
diff --git a/doc/src/images/qpen-roundjoin.png b/doc/src/images/qpen-roundjoin.png
new file mode 100644
index 0000000..155e2aa
--- /dev/null
+++ b/doc/src/images/qpen-roundjoin.png
Binary files differ
diff --git a/doc/src/images/qpen-solid.png b/doc/src/images/qpen-solid.png
new file mode 100644
index 0000000..e042b18
--- /dev/null
+++ b/doc/src/images/qpen-solid.png
Binary files differ
diff --git a/doc/src/images/qpen-square.png b/doc/src/images/qpen-square.png
new file mode 100644
index 0000000..ebc5d1e
--- /dev/null
+++ b/doc/src/images/qpen-square.png
Binary files differ
diff --git a/doc/src/images/qplastiquestyle.png b/doc/src/images/qplastiquestyle.png
new file mode 100644
index 0000000..519f01d
--- /dev/null
+++ b/doc/src/images/qplastiquestyle.png
Binary files differ
diff --git a/doc/src/images/qprintpreviewdialog.png b/doc/src/images/qprintpreviewdialog.png
new file mode 100644
index 0000000..a78a3f1
--- /dev/null
+++ b/doc/src/images/qprintpreviewdialog.png
Binary files differ
diff --git a/doc/src/images/qprogbar-m.png b/doc/src/images/qprogbar-m.png
new file mode 100644
index 0000000..dbe9b0a
--- /dev/null
+++ b/doc/src/images/qprogbar-m.png
Binary files differ
diff --git a/doc/src/images/qprogbar-w.png b/doc/src/images/qprogbar-w.png
new file mode 100644
index 0000000..3a85ffe
--- /dev/null
+++ b/doc/src/images/qprogbar-w.png
Binary files differ
diff --git a/doc/src/images/qprogdlg-m.png b/doc/src/images/qprogdlg-m.png
new file mode 100644
index 0000000..bc83ece
--- /dev/null
+++ b/doc/src/images/qprogdlg-m.png
Binary files differ
diff --git a/doc/src/images/qprogdlg-w.png b/doc/src/images/qprogdlg-w.png
new file mode 100644
index 0000000..eda1f5c
--- /dev/null
+++ b/doc/src/images/qprogdlg-w.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-pad.png b/doc/src/images/qradialgradient-pad.png
new file mode 100644
index 0000000..6c1a6cb
--- /dev/null
+++ b/doc/src/images/qradialgradient-pad.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-reflect.png b/doc/src/images/qradialgradient-reflect.png
new file mode 100644
index 0000000..5122b18
--- /dev/null
+++ b/doc/src/images/qradialgradient-reflect.png
Binary files differ
diff --git a/doc/src/images/qradialgradient-repeat.png b/doc/src/images/qradialgradient-repeat.png
new file mode 100644
index 0000000..aa639b7
--- /dev/null
+++ b/doc/src/images/qradialgradient-repeat.png
Binary files differ
diff --git a/doc/src/images/qrect-coordinates.png b/doc/src/images/qrect-coordinates.png
new file mode 100644
index 0000000..2a2dae2
--- /dev/null
+++ b/doc/src/images/qrect-coordinates.png
Binary files differ
diff --git a/doc/src/images/qrect-diagram-one.png b/doc/src/images/qrect-diagram-one.png
new file mode 100644
index 0000000..a893be2
--- /dev/null
+++ b/doc/src/images/qrect-diagram-one.png
Binary files differ
diff --git a/doc/src/images/qrect-diagram-three.png b/doc/src/images/qrect-diagram-three.png
new file mode 100644
index 0000000..84fb35b
--- /dev/null
+++ b/doc/src/images/qrect-diagram-three.png
Binary files differ
diff --git a/doc/src/images/qrect-diagram-two.png b/doc/src/images/qrect-diagram-two.png
new file mode 100644
index 0000000..e19caac
--- /dev/null
+++ b/doc/src/images/qrect-diagram-two.png
Binary files differ
diff --git a/doc/src/images/qrect-diagram-zero.png b/doc/src/images/qrect-diagram-zero.png
new file mode 100644
index 0000000..90e3db0
--- /dev/null
+++ b/doc/src/images/qrect-diagram-zero.png
Binary files differ
diff --git a/doc/src/images/qrect-intersect.png b/doc/src/images/qrect-intersect.png
new file mode 100644
index 0000000..db68cd5
--- /dev/null
+++ b/doc/src/images/qrect-intersect.png
Binary files differ
diff --git a/doc/src/images/qrect-unite.png b/doc/src/images/qrect-unite.png
new file mode 100644
index 0000000..3f6239f
--- /dev/null
+++ b/doc/src/images/qrect-unite.png
Binary files differ
diff --git a/doc/src/images/qrectf-coordinates.png b/doc/src/images/qrectf-coordinates.png
new file mode 100644
index 0000000..ccc6d82
--- /dev/null
+++ b/doc/src/images/qrectf-coordinates.png
Binary files differ
diff --git a/doc/src/images/qrectf-diagram-one.png b/doc/src/images/qrectf-diagram-one.png
new file mode 100644
index 0000000..842289c
--- /dev/null
+++ b/doc/src/images/qrectf-diagram-one.png
Binary files differ
diff --git a/doc/src/images/qrectf-diagram-three.png b/doc/src/images/qrectf-diagram-three.png
new file mode 100644
index 0000000..e05106a
--- /dev/null
+++ b/doc/src/images/qrectf-diagram-three.png
Binary files differ
diff --git a/doc/src/images/qrectf-diagram-two.png b/doc/src/images/qrectf-diagram-two.png
new file mode 100644
index 0000000..192d00d
--- /dev/null
+++ b/doc/src/images/qrectf-diagram-two.png
Binary files differ
diff --git a/doc/src/images/qscrollarea-noscrollbars.png b/doc/src/images/qscrollarea-noscrollbars.png
new file mode 100644
index 0000000..a1520f3
--- /dev/null
+++ b/doc/src/images/qscrollarea-noscrollbars.png
Binary files differ
diff --git a/doc/src/images/qscrollarea-onescrollbar.png b/doc/src/images/qscrollarea-onescrollbar.png
new file mode 100644
index 0000000..b4f7976
--- /dev/null
+++ b/doc/src/images/qscrollarea-onescrollbar.png
Binary files differ
diff --git a/doc/src/images/qscrollarea-twoscrollbars.png b/doc/src/images/qscrollarea-twoscrollbars.png
new file mode 100644
index 0000000..bf720e4
--- /dev/null
+++ b/doc/src/images/qscrollarea-twoscrollbars.png
Binary files differ
diff --git a/doc/src/images/qscrollbar-picture.png b/doc/src/images/qscrollbar-picture.png
new file mode 100644
index 0000000..898e014
--- /dev/null
+++ b/doc/src/images/qscrollbar-picture.png
Binary files differ
diff --git a/doc/src/images/qscrollbar-values.png b/doc/src/images/qscrollbar-values.png
new file mode 100644
index 0000000..cea744b
--- /dev/null
+++ b/doc/src/images/qscrollbar-values.png
Binary files differ
diff --git a/doc/src/images/qscrollview-cl.png b/doc/src/images/qscrollview-cl.png
new file mode 100644
index 0000000..a5cb0db
--- /dev/null
+++ b/doc/src/images/qscrollview-cl.png
Binary files differ
diff --git a/doc/src/images/qscrollview-vp.png b/doc/src/images/qscrollview-vp.png
new file mode 100644
index 0000000..fc8b022
--- /dev/null
+++ b/doc/src/images/qscrollview-vp.png
Binary files differ
diff --git a/doc/src/images/qscrollview-vp2.png b/doc/src/images/qscrollview-vp2.png
new file mode 100644
index 0000000..8d1c3a3
--- /dev/null
+++ b/doc/src/images/qscrollview-vp2.png
Binary files differ
diff --git a/doc/src/images/qsortfilterproxymodel-sorting.png b/doc/src/images/qsortfilterproxymodel-sorting.png
new file mode 100644
index 0000000..de99d41
--- /dev/null
+++ b/doc/src/images/qsortfilterproxymodel-sorting.png
Binary files differ
diff --git a/doc/src/images/qspinbox-plusminus.png b/doc/src/images/qspinbox-plusminus.png
new file mode 100644
index 0000000..3b35a40
--- /dev/null
+++ b/doc/src/images/qspinbox-plusminus.png
Binary files differ
diff --git a/doc/src/images/qspinbox-updown.png b/doc/src/images/qspinbox-updown.png
new file mode 100644
index 0000000..a6caa44
--- /dev/null
+++ b/doc/src/images/qspinbox-updown.png
Binary files differ
diff --git a/doc/src/images/qstatustipevent-action.png b/doc/src/images/qstatustipevent-action.png
new file mode 100644
index 0000000..c5dcfd2
--- /dev/null
+++ b/doc/src/images/qstatustipevent-action.png
Binary files differ
diff --git a/doc/src/images/qstatustipevent-widget.png b/doc/src/images/qstatustipevent-widget.png
new file mode 100644
index 0000000..3cc0a1f
--- /dev/null
+++ b/doc/src/images/qstatustipevent-widget.png
Binary files differ
diff --git a/doc/src/images/qstyle-comboboxes.png b/doc/src/images/qstyle-comboboxes.png
new file mode 100644
index 0000000..aecec91
--- /dev/null
+++ b/doc/src/images/qstyle-comboboxes.png
Binary files differ
diff --git a/doc/src/images/qstyleoptiontoolbar-position.png b/doc/src/images/qstyleoptiontoolbar-position.png
new file mode 100644
index 0000000..5eaae7e
--- /dev/null
+++ b/doc/src/images/qstyleoptiontoolbar-position.png
Binary files differ
diff --git a/doc/src/images/qt-colors.png b/doc/src/images/qt-colors.png
new file mode 100644
index 0000000..524123f
--- /dev/null
+++ b/doc/src/images/qt-colors.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-accelerateddriver.png b/doc/src/images/qt-embedded-accelerateddriver.png
new file mode 100644
index 0000000..c44d0b6
--- /dev/null
+++ b/doc/src/images/qt-embedded-accelerateddriver.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-architecture.png b/doc/src/images/qt-embedded-architecture.png
new file mode 100644
index 0000000..97a29d0
--- /dev/null
+++ b/doc/src/images/qt-embedded-architecture.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-architecture2.png b/doc/src/images/qt-embedded-architecture2.png
new file mode 100644
index 0000000..f8c7fb1
--- /dev/null
+++ b/doc/src/images/qt-embedded-architecture2.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-characterinputlayer.png b/doc/src/images/qt-embedded-characterinputlayer.png
new file mode 100644
index 0000000..bedc2b8
--- /dev/null
+++ b/doc/src/images/qt-embedded-characterinputlayer.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-clamshellphone-closed.png b/doc/src/images/qt-embedded-clamshellphone-closed.png
new file mode 100644
index 0000000..2070f88
--- /dev/null
+++ b/doc/src/images/qt-embedded-clamshellphone-closed.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-clamshellphone-pressed.png b/doc/src/images/qt-embedded-clamshellphone-pressed.png
new file mode 100644
index 0000000..e728bea
--- /dev/null
+++ b/doc/src/images/qt-embedded-clamshellphone-pressed.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-clamshellphone.png b/doc/src/images/qt-embedded-clamshellphone.png
new file mode 100644
index 0000000..dd3bd60
--- /dev/null
+++ b/doc/src/images/qt-embedded-clamshellphone.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-client.png b/doc/src/images/qt-embedded-client.png
new file mode 100644
index 0000000..da64203
--- /dev/null
+++ b/doc/src/images/qt-embedded-client.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-clientrendering.png b/doc/src/images/qt-embedded-clientrendering.png
new file mode 100644
index 0000000..49ae8f1
--- /dev/null
+++ b/doc/src/images/qt-embedded-clientrendering.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-clientservercommunication.png b/doc/src/images/qt-embedded-clientservercommunication.png
new file mode 100644
index 0000000..0bdcb60
--- /dev/null
+++ b/doc/src/images/qt-embedded-clientservercommunication.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-drawingonscreen.png b/doc/src/images/qt-embedded-drawingonscreen.png
new file mode 100644
index 0000000..fca1eba
--- /dev/null
+++ b/doc/src/images/qt-embedded-drawingonscreen.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-examples.png b/doc/src/images/qt-embedded-examples.png
new file mode 100644
index 0000000..7fc6965
--- /dev/null
+++ b/doc/src/images/qt-embedded-examples.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-fontfeatures.png b/doc/src/images/qt-embedded-fontfeatures.png
new file mode 100644
index 0000000..c339171
--- /dev/null
+++ b/doc/src/images/qt-embedded-fontfeatures.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-opengl1.png b/doc/src/images/qt-embedded-opengl1.png
new file mode 100644
index 0000000..28e2a5f
--- /dev/null
+++ b/doc/src/images/qt-embedded-opengl1.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-opengl2.png b/doc/src/images/qt-embedded-opengl2.png
new file mode 100644
index 0000000..3547cd7
--- /dev/null
+++ b/doc/src/images/qt-embedded-opengl2.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-opengl3.png b/doc/src/images/qt-embedded-opengl3.png
new file mode 100644
index 0000000..0316b71
--- /dev/null
+++ b/doc/src/images/qt-embedded-opengl3.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-pda.png b/doc/src/images/qt-embedded-pda.png
new file mode 100644
index 0000000..2bd9881
--- /dev/null
+++ b/doc/src/images/qt-embedded-pda.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-phone.png b/doc/src/images/qt-embedded-phone.png
new file mode 100644
index 0000000..29df579
--- /dev/null
+++ b/doc/src/images/qt-embedded-phone.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-pointerhandlinglayer.png b/doc/src/images/qt-embedded-pointerhandlinglayer.png
new file mode 100644
index 0000000..b82fb3b
--- /dev/null
+++ b/doc/src/images/qt-embedded-pointerhandlinglayer.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-qconfigtool.png b/doc/src/images/qt-embedded-qconfigtool.png
new file mode 100644
index 0000000..fbab4d6
--- /dev/null
+++ b/doc/src/images/qt-embedded-qconfigtool.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-qvfbfilemenu.png b/doc/src/images/qt-embedded-qvfbfilemenu.png
new file mode 100644
index 0000000..e82287b
--- /dev/null
+++ b/doc/src/images/qt-embedded-qvfbfilemenu.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-qvfbviewmenu.png b/doc/src/images/qt-embedded-qvfbviewmenu.png
new file mode 100644
index 0000000..403bc66
--- /dev/null
+++ b/doc/src/images/qt-embedded-qvfbviewmenu.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-reserveregion.png b/doc/src/images/qt-embedded-reserveregion.png
new file mode 100644
index 0000000..e20a748
--- /dev/null
+++ b/doc/src/images/qt-embedded-reserveregion.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-runningapplication.png b/doc/src/images/qt-embedded-runningapplication.png
new file mode 100644
index 0000000..d7f9a51
--- /dev/null
+++ b/doc/src/images/qt-embedded-runningapplication.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-setwindowattribute.png b/doc/src/images/qt-embedded-setwindowattribute.png
new file mode 100644
index 0000000..44daba9
--- /dev/null
+++ b/doc/src/images/qt-embedded-setwindowattribute.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-virtualframebuffer.png b/doc/src/images/qt-embedded-virtualframebuffer.png
new file mode 100644
index 0000000..d5a5221
--- /dev/null
+++ b/doc/src/images/qt-embedded-virtualframebuffer.png
Binary files differ
diff --git a/doc/src/images/qt-embedded-vnc-screen.png b/doc/src/images/qt-embedded-vnc-screen.png
new file mode 100644
index 0000000..da06387
--- /dev/null
+++ b/doc/src/images/qt-embedded-vnc-screen.png
Binary files differ
diff --git a/doc/src/images/qt-fillrule-oddeven.png b/doc/src/images/qt-fillrule-oddeven.png
new file mode 100644
index 0000000..f39d105
--- /dev/null
+++ b/doc/src/images/qt-fillrule-oddeven.png
Binary files differ
diff --git a/doc/src/images/qt-fillrule-winding.png b/doc/src/images/qt-fillrule-winding.png
new file mode 100644
index 0000000..8018248
--- /dev/null
+++ b/doc/src/images/qt-fillrule-winding.png
Binary files differ
diff --git a/doc/src/images/qt-for-wince-landscape.png b/doc/src/images/qt-for-wince-landscape.png
new file mode 100644
index 0000000..127f799
--- /dev/null
+++ b/doc/src/images/qt-for-wince-landscape.png
Binary files differ
diff --git a/doc/src/images/qt-logo.png b/doc/src/images/qt-logo.png
new file mode 100644
index 0000000..14ddf2a
--- /dev/null
+++ b/doc/src/images/qt-logo.png
Binary files differ
diff --git a/doc/src/images/qt.png b/doc/src/images/qt.png
new file mode 100644
index 0000000..cbed1a9
--- /dev/null
+++ b/doc/src/images/qt.png
Binary files differ
diff --git a/doc/src/images/qtableitems.png b/doc/src/images/qtableitems.png
new file mode 100644
index 0000000..c62813a
--- /dev/null
+++ b/doc/src/images/qtableitems.png
Binary files differ
diff --git a/doc/src/images/qtabletevent-tilt.png b/doc/src/images/qtabletevent-tilt.png
new file mode 100644
index 0000000..546d7da
--- /dev/null
+++ b/doc/src/images/qtabletevent-tilt.png
Binary files differ
diff --git a/doc/src/images/qtableview-resized.png b/doc/src/images/qtableview-resized.png
new file mode 100644
index 0000000..813256e
--- /dev/null
+++ b/doc/src/images/qtableview-resized.png
Binary files differ
diff --git a/doc/src/images/qtconcurrent-progressdialog.png b/doc/src/images/qtconcurrent-progressdialog.png
new file mode 100644
index 0000000..2e8b773
--- /dev/null
+++ b/doc/src/images/qtconcurrent-progressdialog.png
Binary files differ
diff --git a/doc/src/images/qtconfig-appearance.png b/doc/src/images/qtconfig-appearance.png
new file mode 100644
index 0000000..27f7f2f
--- /dev/null
+++ b/doc/src/images/qtconfig-appearance.png
Binary files differ
diff --git a/doc/src/images/qtdemo-small.png b/doc/src/images/qtdemo-small.png
new file mode 100644
index 0000000..d987ffa
--- /dev/null
+++ b/doc/src/images/qtdemo-small.png
Binary files differ
diff --git a/doc/src/images/qtdemo.png b/doc/src/images/qtdemo.png
new file mode 100644
index 0000000..e7267a9
--- /dev/null
+++ b/doc/src/images/qtdemo.png
Binary files differ
diff --git a/doc/src/images/qtdesignerextensions.png b/doc/src/images/qtdesignerextensions.png
new file mode 100644
index 0000000..d48701e
--- /dev/null
+++ b/doc/src/images/qtdesignerextensions.png
Binary files differ
diff --git a/doc/src/images/qtdesignerscreenshot.png b/doc/src/images/qtdesignerscreenshot.png
new file mode 100644
index 0000000..d71c986
--- /dev/null
+++ b/doc/src/images/qtdesignerscreenshot.png
Binary files differ
diff --git a/doc/src/images/qtextblock-fragments.png b/doc/src/images/qtextblock-fragments.png
new file mode 100644
index 0000000..777fba0
--- /dev/null
+++ b/doc/src/images/qtextblock-fragments.png
Binary files differ
diff --git a/doc/src/images/qtextblock-sequence.png b/doc/src/images/qtextblock-sequence.png
new file mode 100644
index 0000000..85f208e
--- /dev/null
+++ b/doc/src/images/qtextblock-sequence.png
Binary files differ
diff --git a/doc/src/images/qtextdocument-frames.png b/doc/src/images/qtextdocument-frames.png
new file mode 100644
index 0000000..96a2dbb
--- /dev/null
+++ b/doc/src/images/qtextdocument-frames.png
Binary files differ
diff --git a/doc/src/images/qtextfragment-split.png b/doc/src/images/qtextfragment-split.png
new file mode 100644
index 0000000..c232c40
--- /dev/null
+++ b/doc/src/images/qtextfragment-split.png
Binary files differ
diff --git a/doc/src/images/qtextframe-style.png b/doc/src/images/qtextframe-style.png
new file mode 100644
index 0000000..6151307
--- /dev/null
+++ b/doc/src/images/qtextframe-style.png
Binary files differ
diff --git a/doc/src/images/qtexttable-cells.png b/doc/src/images/qtexttable-cells.png
new file mode 100644
index 0000000..8460e60
--- /dev/null
+++ b/doc/src/images/qtexttable-cells.png
Binary files differ
diff --git a/doc/src/images/qtexttableformat-cell.png b/doc/src/images/qtexttableformat-cell.png
new file mode 100644
index 0000000..bbf85ff
--- /dev/null
+++ b/doc/src/images/qtexttableformat-cell.png
Binary files differ
diff --git a/doc/src/images/qtransform-combinedtransformation.png b/doc/src/images/qtransform-combinedtransformation.png
new file mode 100644
index 0000000..df1e226
--- /dev/null
+++ b/doc/src/images/qtransform-combinedtransformation.png
Binary files differ
diff --git a/doc/src/images/qtransform-combinedtransformation2.png b/doc/src/images/qtransform-combinedtransformation2.png
new file mode 100644
index 0000000..c037a0d
--- /dev/null
+++ b/doc/src/images/qtransform-combinedtransformation2.png
Binary files differ
diff --git a/doc/src/images/qtransform-representation.png b/doc/src/images/qtransform-representation.png
new file mode 100644
index 0000000..2608872
--- /dev/null
+++ b/doc/src/images/qtransform-representation.png
Binary files differ
diff --git a/doc/src/images/qtransform-simpletransformation.png b/doc/src/images/qtransform-simpletransformation.png
new file mode 100644
index 0000000..743e4e3
--- /dev/null
+++ b/doc/src/images/qtransform-simpletransformation.png
Binary files differ
diff --git a/doc/src/images/qtscript-calculator-example.png b/doc/src/images/qtscript-calculator-example.png
new file mode 100644
index 0000000..f2db906
--- /dev/null
+++ b/doc/src/images/qtscript-calculator-example.png
Binary files differ
diff --git a/doc/src/images/qtscript-calculator.png b/doc/src/images/qtscript-calculator.png
new file mode 100644
index 0000000..113c46b
--- /dev/null
+++ b/doc/src/images/qtscript-calculator.png
Binary files differ
diff --git a/doc/src/images/qtscript-context2d.png b/doc/src/images/qtscript-context2d.png
new file mode 100644
index 0000000..05eaf6e
--- /dev/null
+++ b/doc/src/images/qtscript-context2d.png
Binary files differ
diff --git a/doc/src/images/qtscript-debugger-small.png b/doc/src/images/qtscript-debugger-small.png
new file mode 100644
index 0000000..ffa60f4
--- /dev/null
+++ b/doc/src/images/qtscript-debugger-small.png
Binary files differ
diff --git a/doc/src/images/qtscript-debugger.png b/doc/src/images/qtscript-debugger.png
new file mode 100644
index 0000000..c417d0b
--- /dev/null
+++ b/doc/src/images/qtscript-debugger.png
Binary files differ
diff --git a/doc/src/images/qtscript-examples.png b/doc/src/images/qtscript-examples.png
new file mode 100644
index 0000000..d2e9179
--- /dev/null
+++ b/doc/src/images/qtscript-examples.png
Binary files differ
diff --git a/doc/src/images/qtscripttools-examples.png b/doc/src/images/qtscripttools-examples.png
new file mode 100644
index 0000000..369f32e
--- /dev/null
+++ b/doc/src/images/qtscripttools-examples.png
Binary files differ
diff --git a/doc/src/images/qtwizard-aero1.png b/doc/src/images/qtwizard-aero1.png
new file mode 100644
index 0000000..fe9e9bc
--- /dev/null
+++ b/doc/src/images/qtwizard-aero1.png
Binary files differ
diff --git a/doc/src/images/qtwizard-aero2.png b/doc/src/images/qtwizard-aero2.png
new file mode 100644
index 0000000..261c065
--- /dev/null
+++ b/doc/src/images/qtwizard-aero2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-classic1.png b/doc/src/images/qtwizard-classic1.png
new file mode 100644
index 0000000..be3edbe
--- /dev/null
+++ b/doc/src/images/qtwizard-classic1.png
Binary files differ
diff --git a/doc/src/images/qtwizard-classic2.png b/doc/src/images/qtwizard-classic2.png
new file mode 100644
index 0000000..165f569
--- /dev/null
+++ b/doc/src/images/qtwizard-classic2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-mac1.png b/doc/src/images/qtwizard-mac1.png
new file mode 100644
index 0000000..bc8cd9b
--- /dev/null
+++ b/doc/src/images/qtwizard-mac1.png
Binary files differ
diff --git a/doc/src/images/qtwizard-mac2.png b/doc/src/images/qtwizard-mac2.png
new file mode 100644
index 0000000..850f6b8
--- /dev/null
+++ b/doc/src/images/qtwizard-mac2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-macpage.png b/doc/src/images/qtwizard-macpage.png
new file mode 100644
index 0000000..1ba3122
--- /dev/null
+++ b/doc/src/images/qtwizard-macpage.png
Binary files differ
diff --git a/doc/src/images/qtwizard-modern1.png b/doc/src/images/qtwizard-modern1.png
new file mode 100644
index 0000000..223e3dd
--- /dev/null
+++ b/doc/src/images/qtwizard-modern1.png
Binary files differ
diff --git a/doc/src/images/qtwizard-modern2.png b/doc/src/images/qtwizard-modern2.png
new file mode 100644
index 0000000..d66c374
--- /dev/null
+++ b/doc/src/images/qtwizard-modern2.png
Binary files differ
diff --git a/doc/src/images/qtwizard-nonmacpage.png b/doc/src/images/qtwizard-nonmacpage.png
new file mode 100644
index 0000000..cbe464d
--- /dev/null
+++ b/doc/src/images/qtwizard-nonmacpage.png
Binary files differ
diff --git a/doc/src/images/querymodel-example.png b/doc/src/images/querymodel-example.png
new file mode 100644
index 0000000..908d500
--- /dev/null
+++ b/doc/src/images/querymodel-example.png
Binary files differ
diff --git a/doc/src/images/queuedcustomtype-example.png b/doc/src/images/queuedcustomtype-example.png
new file mode 100644
index 0000000..4399b63
--- /dev/null
+++ b/doc/src/images/queuedcustomtype-example.png
Binary files differ
diff --git a/doc/src/images/qundoview.png b/doc/src/images/qundoview.png
new file mode 100644
index 0000000..3bdb1cf
--- /dev/null
+++ b/doc/src/images/qundoview.png
Binary files differ
diff --git a/doc/src/images/qurl-authority.png b/doc/src/images/qurl-authority.png
new file mode 100644
index 0000000..54de2a7
--- /dev/null
+++ b/doc/src/images/qurl-authority.png
Binary files differ
diff --git a/doc/src/images/qurl-authority2.png b/doc/src/images/qurl-authority2.png
new file mode 100644
index 0000000..fe8d4d8
--- /dev/null
+++ b/doc/src/images/qurl-authority2.png
Binary files differ
diff --git a/doc/src/images/qurl-authority3.png b/doc/src/images/qurl-authority3.png
new file mode 100644
index 0000000..242063e
--- /dev/null
+++ b/doc/src/images/qurl-authority3.png
Binary files differ
diff --git a/doc/src/images/qurl-fragment.png b/doc/src/images/qurl-fragment.png
new file mode 100644
index 0000000..e93a252
--- /dev/null
+++ b/doc/src/images/qurl-fragment.png
Binary files differ
diff --git a/doc/src/images/qurl-ftppath.png b/doc/src/images/qurl-ftppath.png
new file mode 100644
index 0000000..d88df49
--- /dev/null
+++ b/doc/src/images/qurl-ftppath.png
Binary files differ
diff --git a/doc/src/images/qurl-mailtopath.png b/doc/src/images/qurl-mailtopath.png
new file mode 100644
index 0000000..34ec153
--- /dev/null
+++ b/doc/src/images/qurl-mailtopath.png
Binary files differ
diff --git a/doc/src/images/qurl-querystring.png b/doc/src/images/qurl-querystring.png
new file mode 100644
index 0000000..7c3309a
--- /dev/null
+++ b/doc/src/images/qurl-querystring.png
Binary files differ
diff --git a/doc/src/images/qvbox-m.png b/doc/src/images/qvbox-m.png
new file mode 100644
index 0000000..2a2a595
--- /dev/null
+++ b/doc/src/images/qvbox-m.png
Binary files differ
diff --git a/doc/src/images/qvboxlayout-with-5-children.png b/doc/src/images/qvboxlayout-with-5-children.png
new file mode 100644
index 0000000..57c37d7
--- /dev/null
+++ b/doc/src/images/qvboxlayout-with-5-children.png
Binary files differ
diff --git a/doc/src/images/qwebview-diagram.png b/doc/src/images/qwebview-diagram.png
new file mode 100644
index 0000000..ada865e
--- /dev/null
+++ b/doc/src/images/qwebview-diagram.png
Binary files differ
diff --git a/doc/src/images/qwebview-url.png b/doc/src/images/qwebview-url.png
new file mode 100644
index 0000000..3c40080
--- /dev/null
+++ b/doc/src/images/qwebview-url.png
Binary files differ
diff --git a/doc/src/images/qwindowsstyle.png b/doc/src/images/qwindowsstyle.png
new file mode 100644
index 0000000..6b387a7
--- /dev/null
+++ b/doc/src/images/qwindowsstyle.png
Binary files differ
diff --git a/doc/src/images/qwindowsxpstyle.png b/doc/src/images/qwindowsxpstyle.png
new file mode 100644
index 0000000..b24bdeb
--- /dev/null
+++ b/doc/src/images/qwindowsxpstyle.png
Binary files differ
diff --git a/doc/src/images/qwsserver_keyboardfilter.png b/doc/src/images/qwsserver_keyboardfilter.png
new file mode 100644
index 0000000..9efc080
--- /dev/null
+++ b/doc/src/images/qwsserver_keyboardfilter.png
Binary files differ
diff --git a/doc/src/images/radialGradient.png b/doc/src/images/radialGradient.png
new file mode 100644
index 0000000..b6ab6c8
--- /dev/null
+++ b/doc/src/images/radialGradient.png
Binary files differ
diff --git a/doc/src/images/recentfiles-example.png b/doc/src/images/recentfiles-example.png
new file mode 100644
index 0000000..8a1f2e5
--- /dev/null
+++ b/doc/src/images/recentfiles-example.png
Binary files differ
diff --git a/doc/src/images/recipes-example.png b/doc/src/images/recipes-example.png
new file mode 100644
index 0000000..21ebc9b
--- /dev/null
+++ b/doc/src/images/recipes-example.png
Binary files differ
diff --git a/doc/src/images/regexp-example.png b/doc/src/images/regexp-example.png
new file mode 100644
index 0000000..0f31a2f
--- /dev/null
+++ b/doc/src/images/regexp-example.png
Binary files differ
diff --git a/doc/src/images/relationaltable.png b/doc/src/images/relationaltable.png
new file mode 100644
index 0000000..bdfd40f
--- /dev/null
+++ b/doc/src/images/relationaltable.png
Binary files differ
diff --git a/doc/src/images/relationaltablemodel-example.png b/doc/src/images/relationaltablemodel-example.png
new file mode 100644
index 0000000..44fc858
--- /dev/null
+++ b/doc/src/images/relationaltablemodel-example.png
Binary files differ
diff --git a/doc/src/images/remotecontrolledcar-car-example.png b/doc/src/images/remotecontrolledcar-car-example.png
new file mode 100644
index 0000000..7e08340
--- /dev/null
+++ b/doc/src/images/remotecontrolledcar-car-example.png
Binary files differ
diff --git a/doc/src/images/remotecontrolledcar-controller-example.png b/doc/src/images/remotecontrolledcar-controller-example.png
new file mode 100644
index 0000000..cae1ab8
--- /dev/null
+++ b/doc/src/images/remotecontrolledcar-controller-example.png
Binary files differ
diff --git a/doc/src/images/resources.png b/doc/src/images/resources.png
new file mode 100644
index 0000000..eb7af96
--- /dev/null
+++ b/doc/src/images/resources.png
Binary files differ
diff --git a/doc/src/images/richtext-document.png b/doc/src/images/richtext-document.png
new file mode 100644
index 0000000..4ae5d16
--- /dev/null
+++ b/doc/src/images/richtext-document.png
Binary files differ
diff --git a/doc/src/images/richtext-examples.png b/doc/src/images/richtext-examples.png
new file mode 100644
index 0000000..1091c20
--- /dev/null
+++ b/doc/src/images/richtext-examples.png
Binary files differ
diff --git a/doc/src/images/rintersect.png b/doc/src/images/rintersect.png
new file mode 100644
index 0000000..025ea93
--- /dev/null
+++ b/doc/src/images/rintersect.png
Binary files differ
diff --git a/doc/src/images/rsslistingexample.png b/doc/src/images/rsslistingexample.png
new file mode 100644
index 0000000..6bac295
--- /dev/null
+++ b/doc/src/images/rsslistingexample.png
Binary files differ
diff --git a/doc/src/images/rsubtract.png b/doc/src/images/rsubtract.png
new file mode 100644
index 0000000..add6405
--- /dev/null
+++ b/doc/src/images/rsubtract.png
Binary files differ
diff --git a/doc/src/images/runion.png b/doc/src/images/runion.png
new file mode 100644
index 0000000..5b11e8c
--- /dev/null
+++ b/doc/src/images/runion.png
Binary files differ
diff --git a/doc/src/images/rxor.png b/doc/src/images/rxor.png
new file mode 100644
index 0000000..f86e6d6
--- /dev/null
+++ b/doc/src/images/rxor.png
Binary files differ
diff --git a/doc/src/images/samplebuffers-example.png b/doc/src/images/samplebuffers-example.png
new file mode 100644
index 0000000..b751c14
--- /dev/null
+++ b/doc/src/images/samplebuffers-example.png
Binary files differ
diff --git a/doc/src/images/saxbookmarks-example.png b/doc/src/images/saxbookmarks-example.png
new file mode 100644
index 0000000..54d793b
--- /dev/null
+++ b/doc/src/images/saxbookmarks-example.png
Binary files differ
diff --git a/doc/src/images/screenshot-example.png b/doc/src/images/screenshot-example.png
new file mode 100644
index 0000000..8689486
--- /dev/null
+++ b/doc/src/images/screenshot-example.png
Binary files differ
diff --git a/doc/src/images/scribble-example.png b/doc/src/images/scribble-example.png
new file mode 100644
index 0000000..a2cb1de
--- /dev/null
+++ b/doc/src/images/scribble-example.png
Binary files differ
diff --git a/doc/src/images/sdi-example.png b/doc/src/images/sdi-example.png
new file mode 100644
index 0000000..8cd7aa0
--- /dev/null
+++ b/doc/src/images/sdi-example.png
Binary files differ
diff --git a/doc/src/images/securesocketclient.png b/doc/src/images/securesocketclient.png
new file mode 100644
index 0000000..8736cbc
--- /dev/null
+++ b/doc/src/images/securesocketclient.png
Binary files differ
diff --git a/doc/src/images/securesocketclient2.png b/doc/src/images/securesocketclient2.png
new file mode 100644
index 0000000..23db851
--- /dev/null
+++ b/doc/src/images/securesocketclient2.png
Binary files differ
diff --git a/doc/src/images/selected-items1.png b/doc/src/images/selected-items1.png
new file mode 100644
index 0000000..12b572d
--- /dev/null
+++ b/doc/src/images/selected-items1.png
Binary files differ
diff --git a/doc/src/images/selected-items2.png b/doc/src/images/selected-items2.png
new file mode 100644
index 0000000..ad247d9
--- /dev/null
+++ b/doc/src/images/selected-items2.png
Binary files differ
diff --git a/doc/src/images/selected-items3.png b/doc/src/images/selected-items3.png
new file mode 100644
index 0000000..d7aa7be
--- /dev/null
+++ b/doc/src/images/selected-items3.png
Binary files differ
diff --git a/doc/src/images/selection-extended.png b/doc/src/images/selection-extended.png
new file mode 100644
index 0000000..8ca488d
--- /dev/null
+++ b/doc/src/images/selection-extended.png
Binary files differ
diff --git a/doc/src/images/selection-multi.png b/doc/src/images/selection-multi.png
new file mode 100644
index 0000000..766e4a1
--- /dev/null
+++ b/doc/src/images/selection-multi.png
Binary files differ
diff --git a/doc/src/images/selection-single.png b/doc/src/images/selection-single.png
new file mode 100644
index 0000000..d9d0655
--- /dev/null
+++ b/doc/src/images/selection-single.png
Binary files differ
diff --git a/doc/src/images/session.png b/doc/src/images/session.png
new file mode 100644
index 0000000..b9159ae
--- /dev/null
+++ b/doc/src/images/session.png
Binary files differ
diff --git a/doc/src/images/settingseditor-example.png b/doc/src/images/settingseditor-example.png
new file mode 100644
index 0000000..7a5be05
--- /dev/null
+++ b/doc/src/images/settingseditor-example.png
Binary files differ
diff --git a/doc/src/images/shapedclock-dragging.png b/doc/src/images/shapedclock-dragging.png
new file mode 100644
index 0000000..1b25afb
--- /dev/null
+++ b/doc/src/images/shapedclock-dragging.png
Binary files differ
diff --git a/doc/src/images/shapedclock-example.png b/doc/src/images/shapedclock-example.png
new file mode 100644
index 0000000..31ceeca
--- /dev/null
+++ b/doc/src/images/shapedclock-example.png
Binary files differ
diff --git a/doc/src/images/shareddirmodel.png b/doc/src/images/shareddirmodel.png
new file mode 100644
index 0000000..6daa9d3
--- /dev/null
+++ b/doc/src/images/shareddirmodel.png
Binary files differ
diff --git a/doc/src/images/sharedmemory-example_1.png b/doc/src/images/sharedmemory-example_1.png
new file mode 100644
index 0000000..53244d3
--- /dev/null
+++ b/doc/src/images/sharedmemory-example_1.png
Binary files differ
diff --git a/doc/src/images/sharedmemory-example_2.png b/doc/src/images/sharedmemory-example_2.png
new file mode 100644
index 0000000..fc71aed
--- /dev/null
+++ b/doc/src/images/sharedmemory-example_2.png
Binary files differ
diff --git a/doc/src/images/sharedmodel-tableviews.png b/doc/src/images/sharedmodel-tableviews.png
new file mode 100644
index 0000000..d241e4c
--- /dev/null
+++ b/doc/src/images/sharedmodel-tableviews.png
Binary files differ
diff --git a/doc/src/images/sharedselection-tableviews.png b/doc/src/images/sharedselection-tableviews.png
new file mode 100644
index 0000000..ccbda25
--- /dev/null
+++ b/doc/src/images/sharedselection-tableviews.png
Binary files differ
diff --git a/doc/src/images/signals-n-slots-aw-nat.png b/doc/src/images/signals-n-slots-aw-nat.png
new file mode 100644
index 0000000..8ab545b
--- /dev/null
+++ b/doc/src/images/signals-n-slots-aw-nat.png
Binary files differ
diff --git a/doc/src/images/simpledommodel-example.png b/doc/src/images/simpledommodel-example.png
new file mode 100644
index 0000000..b8e3f92
--- /dev/null
+++ b/doc/src/images/simpledommodel-example.png
Binary files differ
diff --git a/doc/src/images/simpletextviewer-example.png b/doc/src/images/simpletextviewer-example.png
new file mode 100644
index 0000000..95d2905
--- /dev/null
+++ b/doc/src/images/simpletextviewer-example.png
Binary files differ
diff --git a/doc/src/images/simpletextviewer-findfiledialog.png b/doc/src/images/simpletextviewer-findfiledialog.png
new file mode 100644
index 0000000..f6e55f0
--- /dev/null
+++ b/doc/src/images/simpletextviewer-findfiledialog.png
Binary files differ
diff --git a/doc/src/images/simpletextviewer-mainwindow.png b/doc/src/images/simpletextviewer-mainwindow.png
new file mode 100644
index 0000000..98c1c61
--- /dev/null
+++ b/doc/src/images/simpletextviewer-mainwindow.png
Binary files differ
diff --git a/doc/src/images/simpletreemodel-example.png b/doc/src/images/simpletreemodel-example.png
new file mode 100644
index 0000000..9655d10
--- /dev/null
+++ b/doc/src/images/simpletreemodel-example.png
Binary files differ
diff --git a/doc/src/images/simplewidgetmapper-example.png b/doc/src/images/simplewidgetmapper-example.png
new file mode 100644
index 0000000..f85ad0e
--- /dev/null
+++ b/doc/src/images/simplewidgetmapper-example.png
Binary files differ
diff --git a/doc/src/images/simplewizard-page1.png b/doc/src/images/simplewizard-page1.png
new file mode 100644
index 0000000..d6f701a
--- /dev/null
+++ b/doc/src/images/simplewizard-page1.png
Binary files differ
diff --git a/doc/src/images/simplewizard-page2.png b/doc/src/images/simplewizard-page2.png
new file mode 100644
index 0000000..f065d85
--- /dev/null
+++ b/doc/src/images/simplewizard-page2.png
Binary files differ
diff --git a/doc/src/images/simplewizard-page3.png b/doc/src/images/simplewizard-page3.png
new file mode 100644
index 0000000..e200808
--- /dev/null
+++ b/doc/src/images/simplewizard-page3.png
Binary files differ
diff --git a/doc/src/images/simplewizard.png b/doc/src/images/simplewizard.png
new file mode 100644
index 0000000..5a7f0c7
--- /dev/null
+++ b/doc/src/images/simplewizard.png
Binary files differ
diff --git a/doc/src/images/sipdialog-closed.png b/doc/src/images/sipdialog-closed.png
new file mode 100644
index 0000000..50408ed
--- /dev/null
+++ b/doc/src/images/sipdialog-closed.png
Binary files differ
diff --git a/doc/src/images/sipdialog-opened.png b/doc/src/images/sipdialog-opened.png
new file mode 100644
index 0000000..981587d
--- /dev/null
+++ b/doc/src/images/sipdialog-opened.png
Binary files differ
diff --git a/doc/src/images/sliders-example.png b/doc/src/images/sliders-example.png
new file mode 100644
index 0000000..a67ce1d
--- /dev/null
+++ b/doc/src/images/sliders-example.png
Binary files differ
diff --git a/doc/src/images/smooth.png b/doc/src/images/smooth.png
new file mode 100644
index 0000000..0d53e55
--- /dev/null
+++ b/doc/src/images/smooth.png
Binary files differ
diff --git a/doc/src/images/sortingmodel-example.png b/doc/src/images/sortingmodel-example.png
new file mode 100644
index 0000000..a23febe
--- /dev/null
+++ b/doc/src/images/sortingmodel-example.png
Binary files differ
diff --git a/doc/src/images/spinboxdelegate-example.png b/doc/src/images/spinboxdelegate-example.png
new file mode 100644
index 0000000..5e57a9c
--- /dev/null
+++ b/doc/src/images/spinboxdelegate-example.png
Binary files differ
diff --git a/doc/src/images/spinboxes-example.png b/doc/src/images/spinboxes-example.png
new file mode 100644
index 0000000..14c42d2
--- /dev/null
+++ b/doc/src/images/spinboxes-example.png
Binary files differ
diff --git a/doc/src/images/spreadsheet-demo.png b/doc/src/images/spreadsheet-demo.png
new file mode 100644
index 0000000..ae7dde2
--- /dev/null
+++ b/doc/src/images/spreadsheet-demo.png
Binary files differ
diff --git a/doc/src/images/sql-examples.png b/doc/src/images/sql-examples.png
new file mode 100644
index 0000000..e8d2b35
--- /dev/null
+++ b/doc/src/images/sql-examples.png
Binary files differ
diff --git a/doc/src/images/sql-widget-mapper.png b/doc/src/images/sql-widget-mapper.png
new file mode 100644
index 0000000..dfa64ab
--- /dev/null
+++ b/doc/src/images/sql-widget-mapper.png
Binary files differ
diff --git a/doc/src/images/sqlbrowser-demo.png b/doc/src/images/sqlbrowser-demo.png
new file mode 100644
index 0000000..101ec5a
--- /dev/null
+++ b/doc/src/images/sqlbrowser-demo.png
Binary files differ
diff --git a/doc/src/images/standard-views.png b/doc/src/images/standard-views.png
new file mode 100644
index 0000000..836ae36
--- /dev/null
+++ b/doc/src/images/standard-views.png
Binary files differ
diff --git a/doc/src/images/standarddialogs-example.png b/doc/src/images/standarddialogs-example.png
new file mode 100644
index 0000000..b6b8a07
--- /dev/null
+++ b/doc/src/images/standarddialogs-example.png
Binary files differ
diff --git a/doc/src/images/stardelegate.png b/doc/src/images/stardelegate.png
new file mode 100644
index 0000000..24fa9fb
--- /dev/null
+++ b/doc/src/images/stardelegate.png
Binary files differ
diff --git a/doc/src/images/stliterators1.png b/doc/src/images/stliterators1.png
new file mode 100644
index 0000000..6d71e47
--- /dev/null
+++ b/doc/src/images/stliterators1.png
Binary files differ
diff --git a/doc/src/images/stringlistmodel.png b/doc/src/images/stringlistmodel.png
new file mode 100644
index 0000000..eedbff3
--- /dev/null
+++ b/doc/src/images/stringlistmodel.png
Binary files differ
diff --git a/doc/src/images/stylepluginexample.png b/doc/src/images/stylepluginexample.png
new file mode 100644
index 0000000..05d8c6b
--- /dev/null
+++ b/doc/src/images/stylepluginexample.png
Binary files differ
diff --git a/doc/src/images/styles-3d.png b/doc/src/images/styles-3d.png
new file mode 100644
index 0000000..8344b4c
--- /dev/null
+++ b/doc/src/images/styles-3d.png
Binary files differ
diff --git a/doc/src/images/styles-aliasing.png b/doc/src/images/styles-aliasing.png
new file mode 100644
index 0000000..c351446
--- /dev/null
+++ b/doc/src/images/styles-aliasing.png
Binary files differ
diff --git a/doc/src/images/styles-disabledwood.png b/doc/src/images/styles-disabledwood.png
new file mode 100644
index 0000000..261bbae
--- /dev/null
+++ b/doc/src/images/styles-disabledwood.png
Binary files differ
diff --git a/doc/src/images/styles-enabledwood.png b/doc/src/images/styles-enabledwood.png
new file mode 100644
index 0000000..168c1d2
--- /dev/null
+++ b/doc/src/images/styles-enabledwood.png
Binary files differ
diff --git a/doc/src/images/styles-woodbuttons.png b/doc/src/images/styles-woodbuttons.png
new file mode 100644
index 0000000..176d7df
--- /dev/null
+++ b/doc/src/images/styles-woodbuttons.png
Binary files differ
diff --git a/doc/src/images/stylesheet-border-image-normal.png b/doc/src/images/stylesheet-border-image-normal.png
new file mode 100644
index 0000000..8afe3c9
--- /dev/null
+++ b/doc/src/images/stylesheet-border-image-normal.png
Binary files differ
diff --git a/doc/src/images/stylesheet-border-image-stretched.png b/doc/src/images/stylesheet-border-image-stretched.png
new file mode 100644
index 0000000..3f9ca92
--- /dev/null
+++ b/doc/src/images/stylesheet-border-image-stretched.png
Binary files differ
diff --git a/doc/src/images/stylesheet-border-image-wrong.png b/doc/src/images/stylesheet-border-image-wrong.png
new file mode 100644
index 0000000..19d6e44
--- /dev/null
+++ b/doc/src/images/stylesheet-border-image-wrong.png
Binary files differ
diff --git a/doc/src/images/stylesheet-boxmodel.png b/doc/src/images/stylesheet-boxmodel.png
new file mode 100644
index 0000000..a0249d7
--- /dev/null
+++ b/doc/src/images/stylesheet-boxmodel.png
Binary files differ
diff --git a/doc/src/images/stylesheet-branch-closed.png b/doc/src/images/stylesheet-branch-closed.png
new file mode 100644
index 0000000..213ffdd
--- /dev/null
+++ b/doc/src/images/stylesheet-branch-closed.png
Binary files differ
diff --git a/doc/src/images/stylesheet-branch-end.png b/doc/src/images/stylesheet-branch-end.png
new file mode 100644
index 0000000..54915b3
--- /dev/null
+++ b/doc/src/images/stylesheet-branch-end.png
Binary files differ
diff --git a/doc/src/images/stylesheet-branch-more.png b/doc/src/images/stylesheet-branch-more.png
new file mode 100644
index 0000000..664ad44
--- /dev/null
+++ b/doc/src/images/stylesheet-branch-more.png
Binary files differ
diff --git a/doc/src/images/stylesheet-branch-open.png b/doc/src/images/stylesheet-branch-open.png
new file mode 100644
index 0000000..e8cad95
--- /dev/null
+++ b/doc/src/images/stylesheet-branch-open.png
Binary files differ
diff --git a/doc/src/images/stylesheet-coffee-cleanlooks.png b/doc/src/images/stylesheet-coffee-cleanlooks.png
new file mode 100644
index 0000000..e75df0d
--- /dev/null
+++ b/doc/src/images/stylesheet-coffee-cleanlooks.png
Binary files differ
diff --git a/doc/src/images/stylesheet-coffee-plastique.png b/doc/src/images/stylesheet-coffee-plastique.png
new file mode 100644
index 0000000..d3bbe27
--- /dev/null
+++ b/doc/src/images/stylesheet-coffee-plastique.png
Binary files differ
diff --git a/doc/src/images/stylesheet-coffee-xp.png b/doc/src/images/stylesheet-coffee-xp.png
new file mode 100644
index 0000000..8bedd80
--- /dev/null
+++ b/doc/src/images/stylesheet-coffee-xp.png
Binary files differ
diff --git a/doc/src/images/stylesheet-designer-options.png b/doc/src/images/stylesheet-designer-options.png
new file mode 100644
index 0000000..446ce10
--- /dev/null
+++ b/doc/src/images/stylesheet-designer-options.png
Binary files differ
diff --git a/doc/src/images/stylesheet-pagefold-mac.png b/doc/src/images/stylesheet-pagefold-mac.png
new file mode 100644
index 0000000..5c061b9
--- /dev/null
+++ b/doc/src/images/stylesheet-pagefold-mac.png
Binary files differ
diff --git a/doc/src/images/stylesheet-pagefold.png b/doc/src/images/stylesheet-pagefold.png
new file mode 100644
index 0000000..5ccb4ed
--- /dev/null
+++ b/doc/src/images/stylesheet-pagefold.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton1.png b/doc/src/images/stylesheet-redbutton1.png
new file mode 100644
index 0000000..cb03375
--- /dev/null
+++ b/doc/src/images/stylesheet-redbutton1.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton2.png b/doc/src/images/stylesheet-redbutton2.png
new file mode 100644
index 0000000..5325708
--- /dev/null
+++ b/doc/src/images/stylesheet-redbutton2.png
Binary files differ
diff --git a/doc/src/images/stylesheet-redbutton3.png b/doc/src/images/stylesheet-redbutton3.png
new file mode 100644
index 0000000..dd976f0
--- /dev/null
+++ b/doc/src/images/stylesheet-redbutton3.png
Binary files differ
diff --git a/doc/src/images/stylesheet-scrollbar1.png b/doc/src/images/stylesheet-scrollbar1.png
new file mode 100644
index 0000000..666ff11
--- /dev/null
+++ b/doc/src/images/stylesheet-scrollbar1.png
Binary files differ
diff --git a/doc/src/images/stylesheet-scrollbar2.png b/doc/src/images/stylesheet-scrollbar2.png
new file mode 100644
index 0000000..439cf80
--- /dev/null
+++ b/doc/src/images/stylesheet-scrollbar2.png
Binary files differ
diff --git a/doc/src/images/stylesheet-treeview.png b/doc/src/images/stylesheet-treeview.png
new file mode 100644
index 0000000..883d190
--- /dev/null
+++ b/doc/src/images/stylesheet-treeview.png
Binary files differ
diff --git a/doc/src/images/stylesheet-vline.png b/doc/src/images/stylesheet-vline.png
new file mode 100644
index 0000000..8f0c336
--- /dev/null
+++ b/doc/src/images/stylesheet-vline.png
Binary files differ
diff --git a/doc/src/images/svg-image.png b/doc/src/images/svg-image.png
new file mode 100644
index 0000000..5a71ea7
--- /dev/null
+++ b/doc/src/images/svg-image.png
Binary files differ
diff --git a/doc/src/images/svgviewer-example.png b/doc/src/images/svgviewer-example.png
new file mode 100644
index 0000000..14f1377
--- /dev/null
+++ b/doc/src/images/svgviewer-example.png
Binary files differ
diff --git a/doc/src/images/syntaxhighlighter-example.png b/doc/src/images/syntaxhighlighter-example.png
new file mode 100644
index 0000000..d0e7f12
--- /dev/null
+++ b/doc/src/images/syntaxhighlighter-example.png
Binary files differ
diff --git a/doc/src/images/system-tray.png b/doc/src/images/system-tray.png
new file mode 100644
index 0000000..298b193
--- /dev/null
+++ b/doc/src/images/system-tray.png
Binary files differ
diff --git a/doc/src/images/systemtray-editor.png b/doc/src/images/systemtray-editor.png
new file mode 100644
index 0000000..fb15dea
--- /dev/null
+++ b/doc/src/images/systemtray-editor.png
Binary files differ
diff --git a/doc/src/images/systemtray-example.png b/doc/src/images/systemtray-example.png
new file mode 100644
index 0000000..98b5c81
--- /dev/null
+++ b/doc/src/images/systemtray-example.png
Binary files differ
diff --git a/doc/src/images/t1.png b/doc/src/images/t1.png
new file mode 100644
index 0000000..744721f
--- /dev/null
+++ b/doc/src/images/t1.png
Binary files differ
diff --git a/doc/src/images/t10.png b/doc/src/images/t10.png
new file mode 100644
index 0000000..54aa587
--- /dev/null
+++ b/doc/src/images/t10.png
Binary files differ
diff --git a/doc/src/images/t11.png b/doc/src/images/t11.png
new file mode 100644
index 0000000..64b25fa
--- /dev/null
+++ b/doc/src/images/t11.png
Binary files differ
diff --git a/doc/src/images/t12.png b/doc/src/images/t12.png
new file mode 100644
index 0000000..7a23230
--- /dev/null
+++ b/doc/src/images/t12.png
Binary files differ
diff --git a/doc/src/images/t13.png b/doc/src/images/t13.png
new file mode 100644
index 0000000..8734249
--- /dev/null
+++ b/doc/src/images/t13.png
Binary files differ
diff --git a/doc/src/images/t14.png b/doc/src/images/t14.png
new file mode 100644
index 0000000..f947dbe
--- /dev/null
+++ b/doc/src/images/t14.png
Binary files differ
diff --git a/doc/src/images/t2.png b/doc/src/images/t2.png
new file mode 100644
index 0000000..4b24119
--- /dev/null
+++ b/doc/src/images/t2.png
Binary files differ
diff --git a/doc/src/images/t3.png b/doc/src/images/t3.png
new file mode 100644
index 0000000..79c6413
--- /dev/null
+++ b/doc/src/images/t3.png
Binary files differ
diff --git a/doc/src/images/t4.png b/doc/src/images/t4.png
new file mode 100644
index 0000000..34c6c75
--- /dev/null
+++ b/doc/src/images/t4.png
Binary files differ
diff --git a/doc/src/images/t5.png b/doc/src/images/t5.png
new file mode 100644
index 0000000..46b3d75
--- /dev/null
+++ b/doc/src/images/t5.png
Binary files differ
diff --git a/doc/src/images/t6.png b/doc/src/images/t6.png
new file mode 100644
index 0000000..75c2c7e
--- /dev/null
+++ b/doc/src/images/t6.png
Binary files differ
diff --git a/doc/src/images/t7.png b/doc/src/images/t7.png
new file mode 100644
index 0000000..b0518df
--- /dev/null
+++ b/doc/src/images/t7.png
Binary files differ
diff --git a/doc/src/images/t8.png b/doc/src/images/t8.png
new file mode 100644
index 0000000..13b1b00
--- /dev/null
+++ b/doc/src/images/t8.png
Binary files differ
diff --git a/doc/src/images/t9.png b/doc/src/images/t9.png
new file mode 100644
index 0000000..54c3941
--- /dev/null
+++ b/doc/src/images/t9.png
Binary files differ
diff --git a/doc/src/images/t9_1.png b/doc/src/images/t9_1.png
new file mode 100644
index 0000000..bdcc640
--- /dev/null
+++ b/doc/src/images/t9_1.png
Binary files differ
diff --git a/doc/src/images/t9_2.png b/doc/src/images/t9_2.png
new file mode 100644
index 0000000..c1e23ca
--- /dev/null
+++ b/doc/src/images/t9_2.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet1.png b/doc/src/images/tabWidget-stylesheet1.png
new file mode 100644
index 0000000..fc8fc19
--- /dev/null
+++ b/doc/src/images/tabWidget-stylesheet1.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet2.png b/doc/src/images/tabWidget-stylesheet2.png
new file mode 100644
index 0000000..2cbf2bf
--- /dev/null
+++ b/doc/src/images/tabWidget-stylesheet2.png
Binary files differ
diff --git a/doc/src/images/tabWidget-stylesheet3.png b/doc/src/images/tabWidget-stylesheet3.png
new file mode 100644
index 0000000..f57a9c9
--- /dev/null
+++ b/doc/src/images/tabWidget-stylesheet3.png
Binary files differ
diff --git a/doc/src/images/tabdialog-example.png b/doc/src/images/tabdialog-example.png
new file mode 100644
index 0000000..219a85f
--- /dev/null
+++ b/doc/src/images/tabdialog-example.png
Binary files differ
diff --git a/doc/src/images/tableWidget-stylesheet.png b/doc/src/images/tableWidget-stylesheet.png
new file mode 100644
index 0000000..e99e7a9
--- /dev/null
+++ b/doc/src/images/tableWidget-stylesheet.png
Binary files differ
diff --git a/doc/src/images/tablemodel-example.png b/doc/src/images/tablemodel-example.png
new file mode 100644
index 0000000..3ae2a8c
--- /dev/null
+++ b/doc/src/images/tablemodel-example.png
Binary files differ
diff --git a/doc/src/images/tabletexample.png b/doc/src/images/tabletexample.png
new file mode 100644
index 0000000..a9b098d
--- /dev/null
+++ b/doc/src/images/tabletexample.png
Binary files differ
diff --git a/doc/src/images/taskmenuextension-dialog.png b/doc/src/images/taskmenuextension-dialog.png
new file mode 100644
index 0000000..7ad6d40
--- /dev/null
+++ b/doc/src/images/taskmenuextension-dialog.png
Binary files differ
diff --git a/doc/src/images/taskmenuextension-example-faded.png b/doc/src/images/taskmenuextension-example-faded.png
new file mode 100644
index 0000000..7e96f3a
--- /dev/null
+++ b/doc/src/images/taskmenuextension-example-faded.png
Binary files differ
diff --git a/doc/src/images/taskmenuextension-example.png b/doc/src/images/taskmenuextension-example.png
new file mode 100644
index 0000000..f1d46d2
--- /dev/null
+++ b/doc/src/images/taskmenuextension-example.png
Binary files differ
diff --git a/doc/src/images/taskmenuextension-menu.png b/doc/src/images/taskmenuextension-menu.png
new file mode 100644
index 0000000..d626c81
--- /dev/null
+++ b/doc/src/images/taskmenuextension-menu.png
Binary files differ
diff --git a/doc/src/images/tcpstream.png b/doc/src/images/tcpstream.png
new file mode 100644
index 0000000..7975376
--- /dev/null
+++ b/doc/src/images/tcpstream.png
Binary files differ
diff --git a/doc/src/images/tetrix-example.png b/doc/src/images/tetrix-example.png
new file mode 100644
index 0000000..c9764dc
--- /dev/null
+++ b/doc/src/images/tetrix-example.png
Binary files differ
diff --git a/doc/src/images/textedit-demo.png b/doc/src/images/textedit-demo.png
new file mode 100644
index 0000000..3cf2883
--- /dev/null
+++ b/doc/src/images/textedit-demo.png
Binary files differ
diff --git a/doc/src/images/textfinder-example-find.png b/doc/src/images/textfinder-example-find.png
new file mode 100644
index 0000000..886bbc1
--- /dev/null
+++ b/doc/src/images/textfinder-example-find.png
Binary files differ
diff --git a/doc/src/images/textfinder-example-find2.png b/doc/src/images/textfinder-example-find2.png
new file mode 100644
index 0000000..908f114
--- /dev/null
+++ b/doc/src/images/textfinder-example-find2.png
Binary files differ
diff --git a/doc/src/images/textfinder-example-userinterface.png b/doc/src/images/textfinder-example-userinterface.png
new file mode 100644
index 0000000..2bebe2e
--- /dev/null
+++ b/doc/src/images/textfinder-example-userinterface.png
Binary files differ
diff --git a/doc/src/images/textfinder-example.png b/doc/src/images/textfinder-example.png
new file mode 100644
index 0000000..87322df
--- /dev/null
+++ b/doc/src/images/textfinder-example.png
Binary files differ
diff --git a/doc/src/images/textobject-example.png b/doc/src/images/textobject-example.png
new file mode 100644
index 0000000..626c102
--- /dev/null
+++ b/doc/src/images/textobject-example.png
Binary files differ
diff --git a/doc/src/images/texttable-merge.png b/doc/src/images/texttable-merge.png
new file mode 100644
index 0000000..3b32239
--- /dev/null
+++ b/doc/src/images/texttable-merge.png
Binary files differ
diff --git a/doc/src/images/texttable-split.png b/doc/src/images/texttable-split.png
new file mode 100644
index 0000000..2fa17b8
--- /dev/null
+++ b/doc/src/images/texttable-split.png
Binary files differ
diff --git a/doc/src/images/textures-example.png b/doc/src/images/textures-example.png
new file mode 100644
index 0000000..b583ede
--- /dev/null
+++ b/doc/src/images/textures-example.png
Binary files differ
diff --git a/doc/src/images/thread-examples.png b/doc/src/images/thread-examples.png
new file mode 100644
index 0000000..4f4dbac
--- /dev/null
+++ b/doc/src/images/thread-examples.png
Binary files differ
diff --git a/doc/src/images/threadedfortuneserver-example.png b/doc/src/images/threadedfortuneserver-example.png
new file mode 100644
index 0000000..57c66a5
--- /dev/null
+++ b/doc/src/images/threadedfortuneserver-example.png
Binary files differ
diff --git a/doc/src/images/threadsandobjects.png b/doc/src/images/threadsandobjects.png
new file mode 100644
index 0000000..8357d25
--- /dev/null
+++ b/doc/src/images/threadsandobjects.png
Binary files differ
diff --git a/doc/src/images/tool-examples.png b/doc/src/images/tool-examples.png
new file mode 100644
index 0000000..592602a
--- /dev/null
+++ b/doc/src/images/tool-examples.png
Binary files differ
diff --git a/doc/src/images/tooltips-example.png b/doc/src/images/tooltips-example.png
new file mode 100644
index 0000000..f2236b4
--- /dev/null
+++ b/doc/src/images/tooltips-example.png
Binary files differ
diff --git a/doc/src/images/torrent-example.png b/doc/src/images/torrent-example.png
new file mode 100644
index 0000000..1032716
--- /dev/null
+++ b/doc/src/images/torrent-example.png
Binary files differ
diff --git a/doc/src/images/trafficinfo-example.png b/doc/src/images/trafficinfo-example.png
new file mode 100644
index 0000000..1717e40
--- /dev/null
+++ b/doc/src/images/trafficinfo-example.png
Binary files differ
diff --git a/doc/src/images/transformations-example.png b/doc/src/images/transformations-example.png
new file mode 100644
index 0000000..0fa185b
--- /dev/null
+++ b/doc/src/images/transformations-example.png
Binary files differ
diff --git a/doc/src/images/treemodel-structure.png b/doc/src/images/treemodel-structure.png
new file mode 100644
index 0000000..778841b
--- /dev/null
+++ b/doc/src/images/treemodel-structure.png
Binary files differ
diff --git a/doc/src/images/treemodelcompleter-example.png b/doc/src/images/treemodelcompleter-example.png
new file mode 100644
index 0000000..000405f
--- /dev/null
+++ b/doc/src/images/treemodelcompleter-example.png
Binary files differ
diff --git a/doc/src/images/trivialwizard-example-conclusion.png b/doc/src/images/trivialwizard-example-conclusion.png
new file mode 100644
index 0000000..c625ae4
--- /dev/null
+++ b/doc/src/images/trivialwizard-example-conclusion.png
Binary files differ
diff --git a/doc/src/images/trivialwizard-example-flow.png b/doc/src/images/trivialwizard-example-flow.png
new file mode 100644
index 0000000..79b6fce
--- /dev/null
+++ b/doc/src/images/trivialwizard-example-flow.png
Binary files differ
diff --git a/doc/src/images/trivialwizard-example-introduction.png b/doc/src/images/trivialwizard-example-introduction.png
new file mode 100644
index 0000000..0bbceed
--- /dev/null
+++ b/doc/src/images/trivialwizard-example-introduction.png
Binary files differ
diff --git a/doc/src/images/trivialwizard-example-registration.png b/doc/src/images/trivialwizard-example-registration.png
new file mode 100644
index 0000000..30b985e
--- /dev/null
+++ b/doc/src/images/trivialwizard-example-registration.png
Binary files differ
diff --git a/doc/src/images/trolltech-logo.png b/doc/src/images/trolltech-logo.png
new file mode 100644
index 0000000..19e3789
--- /dev/null
+++ b/doc/src/images/trolltech-logo.png
Binary files differ
diff --git a/doc/src/images/tutorial8-layout.png b/doc/src/images/tutorial8-layout.png
new file mode 100644
index 0000000..190a9f8
--- /dev/null
+++ b/doc/src/images/tutorial8-layout.png
Binary files differ
diff --git a/doc/src/images/tutorial8-reallayout.png b/doc/src/images/tutorial8-reallayout.png
new file mode 100644
index 0000000..4f6eb60
--- /dev/null
+++ b/doc/src/images/tutorial8-reallayout.png
Binary files differ
diff --git a/doc/src/images/udppackets.png b/doc/src/images/udppackets.png
new file mode 100644
index 0000000..bd66c3f
--- /dev/null
+++ b/doc/src/images/udppackets.png
Binary files differ
diff --git a/doc/src/images/uitools-examples.png b/doc/src/images/uitools-examples.png
new file mode 100644
index 0000000..8c85cdb
--- /dev/null
+++ b/doc/src/images/uitools-examples.png
Binary files differ
diff --git a/doc/src/images/undodemo.png b/doc/src/images/undodemo.png
new file mode 100644
index 0000000..85c3622
--- /dev/null
+++ b/doc/src/images/undodemo.png
Binary files differ
diff --git a/doc/src/images/undoframeworkexample.png b/doc/src/images/undoframeworkexample.png
new file mode 100644
index 0000000..7e0a1df
--- /dev/null
+++ b/doc/src/images/undoframeworkexample.png
Binary files differ
diff --git a/doc/src/images/unsmooth.png b/doc/src/images/unsmooth.png
new file mode 100644
index 0000000..2e1bdbe
--- /dev/null
+++ b/doc/src/images/unsmooth.png
Binary files differ
diff --git a/doc/src/images/wVista-Cert-border-small.png b/doc/src/images/wVista-Cert-border-small.png
new file mode 100644
index 0000000..ea78525
--- /dev/null
+++ b/doc/src/images/wVista-Cert-border-small.png
Binary files differ
diff --git a/doc/src/images/webkit-examples.png b/doc/src/images/webkit-examples.png
new file mode 100644
index 0000000..55bbd92
--- /dev/null
+++ b/doc/src/images/webkit-examples.png
Binary files differ
diff --git a/doc/src/images/webkit-netscape-plugin.png b/doc/src/images/webkit-netscape-plugin.png
new file mode 100644
index 0000000..df15123
--- /dev/null
+++ b/doc/src/images/webkit-netscape-plugin.png
Binary files differ
diff --git a/doc/src/images/whatsthis.png b/doc/src/images/whatsthis.png
new file mode 100644
index 0000000..2267c3d
--- /dev/null
+++ b/doc/src/images/whatsthis.png
Binary files differ
diff --git a/doc/src/images/widget-examples.png b/doc/src/images/widget-examples.png
new file mode 100644
index 0000000..1e4e97c
--- /dev/null
+++ b/doc/src/images/widget-examples.png
Binary files differ
diff --git a/doc/src/images/widgetdelegate.png b/doc/src/images/widgetdelegate.png
new file mode 100644
index 0000000..3df4c4b
--- /dev/null
+++ b/doc/src/images/widgetdelegate.png
Binary files differ
diff --git a/doc/src/images/widgetmapper-combo-mapping.png b/doc/src/images/widgetmapper-combo-mapping.png
new file mode 100644
index 0000000..f87cfaf
--- /dev/null
+++ b/doc/src/images/widgetmapper-combo-mapping.png
Binary files differ
diff --git a/doc/src/images/widgetmapper-simple-mapping.png b/doc/src/images/widgetmapper-simple-mapping.png
new file mode 100644
index 0000000..3ef3f29
--- /dev/null
+++ b/doc/src/images/widgetmapper-simple-mapping.png
Binary files differ
diff --git a/doc/src/images/widgetmapper-sql-mapping-table.png b/doc/src/images/widgetmapper-sql-mapping-table.png
new file mode 100644
index 0000000..98734b3
--- /dev/null
+++ b/doc/src/images/widgetmapper-sql-mapping-table.png
Binary files differ
diff --git a/doc/src/images/widgetmapper-sql-mapping.png b/doc/src/images/widgetmapper-sql-mapping.png
new file mode 100644
index 0000000..88718c6
--- /dev/null
+++ b/doc/src/images/widgetmapper-sql-mapping.png
Binary files differ
diff --git a/doc/src/images/widgets-examples.png b/doc/src/images/widgets-examples.png
new file mode 100644
index 0000000..2b314d1
--- /dev/null
+++ b/doc/src/images/widgets-examples.png
Binary files differ
diff --git a/doc/src/images/widgets-tutorial-childwidget.png b/doc/src/images/widgets-tutorial-childwidget.png
new file mode 100644
index 0000000..0d42d70
--- /dev/null
+++ b/doc/src/images/widgets-tutorial-childwidget.png
Binary files differ
diff --git a/doc/src/images/widgets-tutorial-nestedlayouts.png b/doc/src/images/widgets-tutorial-nestedlayouts.png
new file mode 100644
index 0000000..1e2a9f4
--- /dev/null
+++ b/doc/src/images/widgets-tutorial-nestedlayouts.png
Binary files differ
diff --git a/doc/src/images/widgets-tutorial-toplevel.png b/doc/src/images/widgets-tutorial-toplevel.png
new file mode 100644
index 0000000..a80d13c
--- /dev/null
+++ b/doc/src/images/widgets-tutorial-toplevel.png
Binary files differ
diff --git a/doc/src/images/widgets-tutorial-windowlayout.png b/doc/src/images/widgets-tutorial-windowlayout.png
new file mode 100644
index 0000000..fce52cd
--- /dev/null
+++ b/doc/src/images/widgets-tutorial-windowlayout.png
Binary files differ
diff --git a/doc/src/images/wiggly-example.png b/doc/src/images/wiggly-example.png
new file mode 100644
index 0000000..b20fbc4
--- /dev/null
+++ b/doc/src/images/wiggly-example.png
Binary files differ
diff --git a/doc/src/images/windowflags-example.png b/doc/src/images/windowflags-example.png
new file mode 100644
index 0000000..9028b9b
--- /dev/null
+++ b/doc/src/images/windowflags-example.png
Binary files differ
diff --git a/doc/src/images/windowflags_controllerwindow.png b/doc/src/images/windowflags_controllerwindow.png
new file mode 100644
index 0000000..d8ce239
--- /dev/null
+++ b/doc/src/images/windowflags_controllerwindow.png
Binary files differ
diff --git a/doc/src/images/windowflags_previewwindow.png b/doc/src/images/windowflags_previewwindow.png
new file mode 100644
index 0000000..cafcd37
--- /dev/null
+++ b/doc/src/images/windowflags_previewwindow.png
Binary files differ
diff --git a/doc/src/images/windows-calendarwidget.png b/doc/src/images/windows-calendarwidget.png
new file mode 100644
index 0000000..ad01623
--- /dev/null
+++ b/doc/src/images/windows-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windows-checkbox.png b/doc/src/images/windows-checkbox.png
new file mode 100644
index 0000000..eb1be4b
--- /dev/null
+++ b/doc/src/images/windows-checkbox.png
Binary files differ
diff --git a/doc/src/images/windows-combobox.png b/doc/src/images/windows-combobox.png
new file mode 100644
index 0000000..d6bc483
--- /dev/null
+++ b/doc/src/images/windows-combobox.png
Binary files differ
diff --git a/doc/src/images/windows-dateedit.png b/doc/src/images/windows-dateedit.png
new file mode 100644
index 0000000..95587ec
--- /dev/null
+++ b/doc/src/images/windows-dateedit.png
Binary files differ
diff --git a/doc/src/images/windows-datetimeedit.png b/doc/src/images/windows-datetimeedit.png
new file mode 100644
index 0000000..6aa1766
--- /dev/null
+++ b/doc/src/images/windows-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windows-dial.png b/doc/src/images/windows-dial.png
new file mode 100644
index 0000000..0aa3a26
--- /dev/null
+++ b/doc/src/images/windows-dial.png
Binary files differ
diff --git a/doc/src/images/windows-doublespinbox.png b/doc/src/images/windows-doublespinbox.png
new file mode 100644
index 0000000..244b5f6
--- /dev/null
+++ b/doc/src/images/windows-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windows-fontcombobox.png b/doc/src/images/windows-fontcombobox.png
new file mode 100644
index 0000000..bf98cad
--- /dev/null
+++ b/doc/src/images/windows-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windows-frame.png b/doc/src/images/windows-frame.png
new file mode 100644
index 0000000..5979b31
--- /dev/null
+++ b/doc/src/images/windows-frame.png
Binary files differ
diff --git a/doc/src/images/windows-groupbox.png b/doc/src/images/windows-groupbox.png
new file mode 100644
index 0000000..88f46a3
--- /dev/null
+++ b/doc/src/images/windows-groupbox.png
Binary files differ
diff --git a/doc/src/images/windows-horizontalscrollbar.png b/doc/src/images/windows-horizontalscrollbar.png
new file mode 100644
index 0000000..1f36b9a
--- /dev/null
+++ b/doc/src/images/windows-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windows-label.png b/doc/src/images/windows-label.png
new file mode 100644
index 0000000..a1c3a39
--- /dev/null
+++ b/doc/src/images/windows-label.png
Binary files differ
diff --git a/doc/src/images/windows-lcdnumber.png b/doc/src/images/windows-lcdnumber.png
new file mode 100644
index 0000000..b463511
--- /dev/null
+++ b/doc/src/images/windows-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windows-lineedit.png b/doc/src/images/windows-lineedit.png
new file mode 100644
index 0000000..270e451
--- /dev/null
+++ b/doc/src/images/windows-lineedit.png
Binary files differ
diff --git a/doc/src/images/windows-listview.png b/doc/src/images/windows-listview.png
new file mode 100644
index 0000000..2884fae
--- /dev/null
+++ b/doc/src/images/windows-listview.png
Binary files differ
diff --git a/doc/src/images/windows-progressbar.png b/doc/src/images/windows-progressbar.png
new file mode 100644
index 0000000..361799a
--- /dev/null
+++ b/doc/src/images/windows-progressbar.png
Binary files differ
diff --git a/doc/src/images/windows-pushbutton.png b/doc/src/images/windows-pushbutton.png
new file mode 100644
index 0000000..14528d6
--- /dev/null
+++ b/doc/src/images/windows-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windows-radiobutton.png b/doc/src/images/windows-radiobutton.png
new file mode 100644
index 0000000..db328cb
--- /dev/null
+++ b/doc/src/images/windows-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windows-slider.png b/doc/src/images/windows-slider.png
new file mode 100644
index 0000000..fde8502
--- /dev/null
+++ b/doc/src/images/windows-slider.png
Binary files differ
diff --git a/doc/src/images/windows-spinbox.png b/doc/src/images/windows-spinbox.png
new file mode 100644
index 0000000..d4e93c5
--- /dev/null
+++ b/doc/src/images/windows-spinbox.png
Binary files differ
diff --git a/doc/src/images/windows-tableview.png b/doc/src/images/windows-tableview.png
new file mode 100644
index 0000000..89da89f
--- /dev/null
+++ b/doc/src/images/windows-tableview.png
Binary files differ
diff --git a/doc/src/images/windows-tabwidget.png b/doc/src/images/windows-tabwidget.png
new file mode 100644
index 0000000..8622f7e
--- /dev/null
+++ b/doc/src/images/windows-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windows-textedit.png b/doc/src/images/windows-textedit.png
new file mode 100644
index 0000000..fd21ade
--- /dev/null
+++ b/doc/src/images/windows-textedit.png
Binary files differ
diff --git a/doc/src/images/windows-timeedit.png b/doc/src/images/windows-timeedit.png
new file mode 100644
index 0000000..6ae0e40
--- /dev/null
+++ b/doc/src/images/windows-timeedit.png
Binary files differ
diff --git a/doc/src/images/windows-toolbox.png b/doc/src/images/windows-toolbox.png
new file mode 100644
index 0000000..99b471e
--- /dev/null
+++ b/doc/src/images/windows-toolbox.png
Binary files differ
diff --git a/doc/src/images/windows-toolbutton.png b/doc/src/images/windows-toolbutton.png
new file mode 100644
index 0000000..9ceb846
--- /dev/null
+++ b/doc/src/images/windows-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windows-treeview.png b/doc/src/images/windows-treeview.png
new file mode 100644
index 0000000..f55cd69
--- /dev/null
+++ b/doc/src/images/windows-treeview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-calendarwidget.png b/doc/src/images/windowsvista-calendarwidget.png
new file mode 100644
index 0000000..3cb1ab7
--- /dev/null
+++ b/doc/src/images/windowsvista-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windowsvista-checkbox.png b/doc/src/images/windowsvista-checkbox.png
new file mode 100644
index 0000000..b9bc909
--- /dev/null
+++ b/doc/src/images/windowsvista-checkbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-combobox.png b/doc/src/images/windowsvista-combobox.png
new file mode 100644
index 0000000..f53192f
--- /dev/null
+++ b/doc/src/images/windowsvista-combobox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-dateedit.png b/doc/src/images/windowsvista-dateedit.png
new file mode 100644
index 0000000..bb79482
--- /dev/null
+++ b/doc/src/images/windowsvista-dateedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-datetimeedit.png b/doc/src/images/windowsvista-datetimeedit.png
new file mode 100644
index 0000000..0a104de
--- /dev/null
+++ b/doc/src/images/windowsvista-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-dial.png b/doc/src/images/windowsvista-dial.png
new file mode 100644
index 0000000..7081269
--- /dev/null
+++ b/doc/src/images/windowsvista-dial.png
Binary files differ
diff --git a/doc/src/images/windowsvista-doublespinbox.png b/doc/src/images/windowsvista-doublespinbox.png
new file mode 100644
index 0000000..6efa937
--- /dev/null
+++ b/doc/src/images/windowsvista-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-fontcombobox.png b/doc/src/images/windowsvista-fontcombobox.png
new file mode 100644
index 0000000..3771e84
--- /dev/null
+++ b/doc/src/images/windowsvista-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-frame.png b/doc/src/images/windowsvista-frame.png
new file mode 100644
index 0000000..63b8422
--- /dev/null
+++ b/doc/src/images/windowsvista-frame.png
Binary files differ
diff --git a/doc/src/images/windowsvista-groupbox.png b/doc/src/images/windowsvista-groupbox.png
new file mode 100644
index 0000000..967d887
--- /dev/null
+++ b/doc/src/images/windowsvista-groupbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-horizontalscrollbar.png b/doc/src/images/windowsvista-horizontalscrollbar.png
new file mode 100644
index 0000000..996865d
--- /dev/null
+++ b/doc/src/images/windowsvista-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windowsvista-label.png b/doc/src/images/windowsvista-label.png
new file mode 100644
index 0000000..caef8d8
--- /dev/null
+++ b/doc/src/images/windowsvista-label.png
Binary files differ
diff --git a/doc/src/images/windowsvista-lcdnumber.png b/doc/src/images/windowsvista-lcdnumber.png
new file mode 100644
index 0000000..911438e
--- /dev/null
+++ b/doc/src/images/windowsvista-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windowsvista-lineedit.png b/doc/src/images/windowsvista-lineedit.png
new file mode 100644
index 0000000..9fcde3a
--- /dev/null
+++ b/doc/src/images/windowsvista-lineedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-listview.png b/doc/src/images/windowsvista-listview.png
new file mode 100644
index 0000000..36a0343
--- /dev/null
+++ b/doc/src/images/windowsvista-listview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-progressbar.png b/doc/src/images/windowsvista-progressbar.png
new file mode 100644
index 0000000..0bda010
--- /dev/null
+++ b/doc/src/images/windowsvista-progressbar.png
Binary files differ
diff --git a/doc/src/images/windowsvista-pushbutton.png b/doc/src/images/windowsvista-pushbutton.png
new file mode 100644
index 0000000..3bc438d
--- /dev/null
+++ b/doc/src/images/windowsvista-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-radiobutton.png b/doc/src/images/windowsvista-radiobutton.png
new file mode 100644
index 0000000..fdfd2d6
--- /dev/null
+++ b/doc/src/images/windowsvista-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-slider.png b/doc/src/images/windowsvista-slider.png
new file mode 100644
index 0000000..be2fffb
--- /dev/null
+++ b/doc/src/images/windowsvista-slider.png
Binary files differ
diff --git a/doc/src/images/windowsvista-spinbox.png b/doc/src/images/windowsvista-spinbox.png
new file mode 100644
index 0000000..4a2293e
--- /dev/null
+++ b/doc/src/images/windowsvista-spinbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-tableview.png b/doc/src/images/windowsvista-tableview.png
new file mode 100644
index 0000000..96f4937
--- /dev/null
+++ b/doc/src/images/windowsvista-tableview.png
Binary files differ
diff --git a/doc/src/images/windowsvista-tabwidget.png b/doc/src/images/windowsvista-tabwidget.png
new file mode 100644
index 0000000..259c4f1
--- /dev/null
+++ b/doc/src/images/windowsvista-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windowsvista-textedit.png b/doc/src/images/windowsvista-textedit.png
new file mode 100644
index 0000000..5e56966
--- /dev/null
+++ b/doc/src/images/windowsvista-textedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-timeedit.png b/doc/src/images/windowsvista-timeedit.png
new file mode 100644
index 0000000..e24fdd2
--- /dev/null
+++ b/doc/src/images/windowsvista-timeedit.png
Binary files differ
diff --git a/doc/src/images/windowsvista-toolbox.png b/doc/src/images/windowsvista-toolbox.png
new file mode 100644
index 0000000..8cfe5f9
--- /dev/null
+++ b/doc/src/images/windowsvista-toolbox.png
Binary files differ
diff --git a/doc/src/images/windowsvista-toolbutton.png b/doc/src/images/windowsvista-toolbutton.png
new file mode 100644
index 0000000..0baa980
--- /dev/null
+++ b/doc/src/images/windowsvista-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windowsvista-treeview.png b/doc/src/images/windowsvista-treeview.png
new file mode 100644
index 0000000..db211e4
--- /dev/null
+++ b/doc/src/images/windowsvista-treeview.png
Binary files differ
diff --git a/doc/src/images/windowsxp-calendarwidget.png b/doc/src/images/windowsxp-calendarwidget.png
new file mode 100644
index 0000000..9a5fa6e
--- /dev/null
+++ b/doc/src/images/windowsxp-calendarwidget.png
Binary files differ
diff --git a/doc/src/images/windowsxp-checkbox.png b/doc/src/images/windowsxp-checkbox.png
new file mode 100644
index 0000000..505d3a3
--- /dev/null
+++ b/doc/src/images/windowsxp-checkbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-combobox.png b/doc/src/images/windowsxp-combobox.png
new file mode 100644
index 0000000..2363c84
--- /dev/null
+++ b/doc/src/images/windowsxp-combobox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-dateedit.png b/doc/src/images/windowsxp-dateedit.png
new file mode 100644
index 0000000..060ba07
--- /dev/null
+++ b/doc/src/images/windowsxp-dateedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-datetimeedit.png b/doc/src/images/windowsxp-datetimeedit.png
new file mode 100644
index 0000000..4e41f0f
--- /dev/null
+++ b/doc/src/images/windowsxp-datetimeedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-dial.png b/doc/src/images/windowsxp-dial.png
new file mode 100644
index 0000000..0aa3a26
--- /dev/null
+++ b/doc/src/images/windowsxp-dial.png
Binary files differ
diff --git a/doc/src/images/windowsxp-doublespinbox.png b/doc/src/images/windowsxp-doublespinbox.png
new file mode 100644
index 0000000..3165a61
--- /dev/null
+++ b/doc/src/images/windowsxp-doublespinbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-fontcombobox.png b/doc/src/images/windowsxp-fontcombobox.png
new file mode 100644
index 0000000..96292b8
--- /dev/null
+++ b/doc/src/images/windowsxp-fontcombobox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-frame.png b/doc/src/images/windowsxp-frame.png
new file mode 100644
index 0000000..5979b31
--- /dev/null
+++ b/doc/src/images/windowsxp-frame.png
Binary files differ
diff --git a/doc/src/images/windowsxp-groupbox.png b/doc/src/images/windowsxp-groupbox.png
new file mode 100644
index 0000000..0b6f7e2
--- /dev/null
+++ b/doc/src/images/windowsxp-groupbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-horizontalscrollbar.png b/doc/src/images/windowsxp-horizontalscrollbar.png
new file mode 100644
index 0000000..38812ec
--- /dev/null
+++ b/doc/src/images/windowsxp-horizontalscrollbar.png
Binary files differ
diff --git a/doc/src/images/windowsxp-label.png b/doc/src/images/windowsxp-label.png
new file mode 100644
index 0000000..a1c3a39
--- /dev/null
+++ b/doc/src/images/windowsxp-label.png
Binary files differ
diff --git a/doc/src/images/windowsxp-lcdnumber.png b/doc/src/images/windowsxp-lcdnumber.png
new file mode 100644
index 0000000..102023c
--- /dev/null
+++ b/doc/src/images/windowsxp-lcdnumber.png
Binary files differ
diff --git a/doc/src/images/windowsxp-lineedit.png b/doc/src/images/windowsxp-lineedit.png
new file mode 100644
index 0000000..9102b53
--- /dev/null
+++ b/doc/src/images/windowsxp-lineedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-listview.png b/doc/src/images/windowsxp-listview.png
new file mode 100644
index 0000000..b0fc9bd
--- /dev/null
+++ b/doc/src/images/windowsxp-listview.png
Binary files differ
diff --git a/doc/src/images/windowsxp-menu.png b/doc/src/images/windowsxp-menu.png
new file mode 100644
index 0000000..b8ca947
--- /dev/null
+++ b/doc/src/images/windowsxp-menu.png
Binary files differ
diff --git a/doc/src/images/windowsxp-progressbar.png b/doc/src/images/windowsxp-progressbar.png
new file mode 100644
index 0000000..c8a73d6
--- /dev/null
+++ b/doc/src/images/windowsxp-progressbar.png
Binary files differ
diff --git a/doc/src/images/windowsxp-pushbutton.png b/doc/src/images/windowsxp-pushbutton.png
new file mode 100644
index 0000000..bf6b7bf
--- /dev/null
+++ b/doc/src/images/windowsxp-pushbutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-radiobutton.png b/doc/src/images/windowsxp-radiobutton.png
new file mode 100644
index 0000000..ad8a908
--- /dev/null
+++ b/doc/src/images/windowsxp-radiobutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-slider.png b/doc/src/images/windowsxp-slider.png
new file mode 100644
index 0000000..9e2fca7
--- /dev/null
+++ b/doc/src/images/windowsxp-slider.png
Binary files differ
diff --git a/doc/src/images/windowsxp-spinbox.png b/doc/src/images/windowsxp-spinbox.png
new file mode 100644
index 0000000..e42073c
--- /dev/null
+++ b/doc/src/images/windowsxp-spinbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-tableview.png b/doc/src/images/windowsxp-tableview.png
new file mode 100644
index 0000000..5d12137
--- /dev/null
+++ b/doc/src/images/windowsxp-tableview.png
Binary files differ
diff --git a/doc/src/images/windowsxp-tabwidget.png b/doc/src/images/windowsxp-tabwidget.png
new file mode 100644
index 0000000..3c8e777
--- /dev/null
+++ b/doc/src/images/windowsxp-tabwidget.png
Binary files differ
diff --git a/doc/src/images/windowsxp-textedit.png b/doc/src/images/windowsxp-textedit.png
new file mode 100644
index 0000000..d89c75c
--- /dev/null
+++ b/doc/src/images/windowsxp-textedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-timeedit.png b/doc/src/images/windowsxp-timeedit.png
new file mode 100644
index 0000000..751cca9
--- /dev/null
+++ b/doc/src/images/windowsxp-timeedit.png
Binary files differ
diff --git a/doc/src/images/windowsxp-toolbox.png b/doc/src/images/windowsxp-toolbox.png
new file mode 100644
index 0000000..99b471e
--- /dev/null
+++ b/doc/src/images/windowsxp-toolbox.png
Binary files differ
diff --git a/doc/src/images/windowsxp-toolbutton.png b/doc/src/images/windowsxp-toolbutton.png
new file mode 100644
index 0000000..ea63e16
--- /dev/null
+++ b/doc/src/images/windowsxp-toolbutton.png
Binary files differ
diff --git a/doc/src/images/windowsxp-treeview.png b/doc/src/images/windowsxp-treeview.png
new file mode 100644
index 0000000..050cc2f
--- /dev/null
+++ b/doc/src/images/windowsxp-treeview.png
Binary files differ
diff --git a/doc/src/images/worldtimeclock-connection.png b/doc/src/images/worldtimeclock-connection.png
new file mode 100644
index 0000000..42c2560
--- /dev/null
+++ b/doc/src/images/worldtimeclock-connection.png
Binary files differ
diff --git a/doc/src/images/worldtimeclock-signalandslot.png b/doc/src/images/worldtimeclock-signalandslot.png
new file mode 100644
index 0000000..d9d3271
--- /dev/null
+++ b/doc/src/images/worldtimeclock-signalandslot.png
Binary files differ
diff --git a/doc/src/images/worldtimeclockbuilder-example.png b/doc/src/images/worldtimeclockbuilder-example.png
new file mode 100644
index 0000000..4b91af3
--- /dev/null
+++ b/doc/src/images/worldtimeclockbuilder-example.png
Binary files differ
diff --git a/doc/src/images/worldtimeclockplugin-example.png b/doc/src/images/worldtimeclockplugin-example.png
new file mode 100644
index 0000000..89481ad
--- /dev/null
+++ b/doc/src/images/worldtimeclockplugin-example.png
Binary files differ
diff --git a/doc/src/images/x11_dependencies.png b/doc/src/images/x11_dependencies.png
new file mode 100644
index 0000000..02bce1a
--- /dev/null
+++ b/doc/src/images/x11_dependencies.png
Binary files differ
diff --git a/doc/src/images/xform.png b/doc/src/images/xform.png
new file mode 100644
index 0000000..8221a00
--- /dev/null
+++ b/doc/src/images/xform.png
Binary files differ
diff --git a/doc/src/images/xml-examples.png b/doc/src/images/xml-examples.png
new file mode 100644
index 0000000..617ffef
--- /dev/null
+++ b/doc/src/images/xml-examples.png
Binary files differ
diff --git a/doc/src/images/xmlstreamexample-filemenu.png b/doc/src/images/xmlstreamexample-filemenu.png
new file mode 100644
index 0000000..e074fb7
--- /dev/null
+++ b/doc/src/images/xmlstreamexample-filemenu.png
Binary files differ
diff --git a/doc/src/images/xmlstreamexample-helpmenu.png b/doc/src/images/xmlstreamexample-helpmenu.png
new file mode 100644
index 0000000..0dc4392
--- /dev/null
+++ b/doc/src/images/xmlstreamexample-helpmenu.png
Binary files differ
diff --git a/doc/src/images/xmlstreamexample-screenshot.png b/doc/src/images/xmlstreamexample-screenshot.png
new file mode 100644
index 0000000..bbaa423
--- /dev/null
+++ b/doc/src/images/xmlstreamexample-screenshot.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
new file mode 100644
index 0000000..49dfafd
--- /dev/null
+++ b/doc/src/index.qdoc
@@ -0,0 +1,244 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page index.html
+
+ \keyword Qt Reference Documentation
+
+ \if defined(qtopiacore)
+ \if defined(opensourceedition)
+ \title Qt for Embedded Linux Reference Documentation (Open Source Edition)
+ \endif
+
+ \if defined(desktoplightedition)
+ \title Qt for Embedded Linux Reference Documentation (GUI Framework Edition)
+ \endif
+
+ \if defined(desktopedition)
+ \title Qt for Embedded Linux Reference Documentation (Full Framework Edition)
+ \endif
+
+ \if !defined(opensourceedition) \
+ && !defined(desktoplightedition) \
+ && !defined(desktopedition)
+ \title Qt for Embedded Linux Reference Documentation
+ \endif
+
+ \subtitle Qt for Embedded Linux
+ \endif
+ \if !defined(qtopiacore)
+ \if defined(opensourceedition)
+ \title Qt Reference Documentation (Open Source Edition)
+ \endif
+
+ \if defined(desktoplightedition)
+ \title Qt Reference Documentation (GUI Framework Edition)
+ \endif
+
+ \if defined(desktopedition)
+ \title Qt Reference Documentation (Full Framework Edition)
+ \endif
+
+ \if !defined(opensourceedition) \
+ && !defined(desktoplightedition) \
+ && !defined(desktopedition)
+ \title Qt Reference Documentation
+ \endif
+ \endif
+
+ \if defined(opensourceedition)
+ \bold{Note:} This edition is for the development of \l{Qt
+ Open Source Edition}{Free and Open Source} software only; see
+ \l{Qt Commercial Editions}.
+ \endif
+
+ \raw HTML
+ <table cellpadding="2" cellspacing="1" border="0" width="100%" bgcolor="#e5e5e5">
+ <tr>
+ <th bgcolor="#66b036" width="33%">
+ Getting Started
+ </th>
+ <th bgcolor="#66b036" width="33%">
+ General
+ </th>
+ <th bgcolor="#66b036" width="33%">
+ Developer Resources
+ </th>
+ </tr>
+ <tr>
+ <td valign="top">
+ <ul>
+ <li><strong><a href="qt4-5-intro.html">What's New in Qt 4.5</a></strong></li>
+ <li><a href="how-to-learn-qt.html">How to Learn Qt</a></li>
+ <li><a href="installation.html">Installation</a></li>
+ <li><a href="tutorials.html">Tutorials</a>, <a href="examples.html">Examples</a> and <a href="demos.html">Demonstrations</a></li>
+ <li><a href="porting4.html">Porting from Qt 3 to Qt 4</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="http://www.qtsoftware.com/products">About Qt</a></li>
+ <li><a href="http://www.qtsoftware.com/about">About Us</a></li>
+ <li><a href="commercialeditions.html">Commercial Edition</a></li>
+ <li><a href="opensourceedition.html">Open Source Edition</a></li>
+ <li><a href="supported-platforms.html">Supported Platforms</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="http://www.qtsoftware.com/developer/faqs/">Frequently Asked Questions</a></li>
+ <li><a href="http://www.qtsoftware.com/developer/community/">Qt Community Web Sites</a></li>
+ <li><a href="http://doc.trolltech.com/qq/">Qt Quarterly</a></li>
+ <li><a href="bughowto.html">How to Report a Bug</a></li>
+ <li><a href="http://www.qtsoftware.com/developer/">Other Online Resources</a></li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <th bgcolor="#66b036">
+ API Reference
+ </th>
+ <th bgcolor="#66b036">
+ Core Features
+ </th>
+ <th bgcolor="#66b036">
+ Key Technologies
+ </th>
+ </tr>
+ <tr>
+ <td valign="top">
+ <ul>
+ <li><a href="classes.html">All Classes</a></li>
+ <li><a href="mainclasses.html">Main Classes</a></li>
+ <li><a href="groups.html">Grouped Classes</a></li>
+ <li><a href="annotated.html">Annotated Classes</a></li>
+ <li><a href="modules.html">Qt Classes by Module</a></li>
+ <li><a href="namespaces.html">All Namespaces</a></li>
+ <li><a href="hierarchy.html">Inheritance Hierarchy</a></li>
+ <li><a href="functions.html">All Functions</a></li>
+ <li><a href="qt-embedded.html">Qt for Embedded Platforms</a></li>
+ <li><a href="overviews.html">All Overviews and HOWTOs</a></li>
+ <li><a href="gallery.html">Qt Widget Gallery</a></li>
+ <li><a href="http://doc.trolltech.com/extras/qt43-class-chart.pdf">Class Chart</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="signalsandslots.html">Signals and Slots</a></li>
+ <li><a href="object.html">Object Model</a></li>
+ <li><a href="layout.html">Layout Management</a></li>
+ <li><a href="qt4-mainwindow.html">Main Window Architecture</a></li>
+ <li><a href="paintsystem.html">Paint System</a></li>
+ <li><a href="graphicsview.html">Graphics View</a></li>
+ <li><a href="accessible.html">Accessibility</a></li>
+ <li><a href="containers.html">Tool and Container Classes</a></li>
+ <li><a href="richtext.html">Rich Text Processing</a></li>
+ <li><a href="i18n.html">Internationalization</a></li>
+ <li><a href="plugins-howto.html">Plugin System</a></li>
+ <li><a href="threads.html">Multithreaded Programming</a></li>
+ <li><a href="ipc.html">Inter-Process Communication (IPC)</a></li>
+ <li><a href="qtestlib-manual.html">Unit Testing Framework</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="model-view-programming.html">Model/View Programming</a></li>
+ <li><a href="stylesheet.html">Style Sheets</a></li>
+ <li><a href="qthelp.html">Help Module</a></li>
+ <li><a href="qtnetwork.html">Network Module</a></li>
+ <li><a href="qtopengl.html">OpenGL Module</a></li>
+ <li><a href="qtscript.html">Script Module</a></li>
+ <li><a href="qtsql.html">SQL Module</a></li>
+ <li><a href="qtsvg.html">SVG Module</a></li>
+ <li><a href="qtwebkit.html">WebKit Integration</a></li>
+ <li><a href="qtxml.html">XML Module</a></li>
+ <li><a href="qtxmlpatterns.html">XML Patterns: XQuery &amp; XPath</a></li>
+ <li><a href="phonon-module.html">Phonon Multimedia Framework</a></li>
+ <li><a href="qtscripttools.html">Script Tools Module</a></li>
+ <li><a href="activeqt.html">ActiveQt Framework</a></li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <th bgcolor="#66b036">
+ Add-ons &amp; Services
+ </th>
+ <th bgcolor="#66b036">
+ Tools
+ </th>
+ <th bgcolor="#66b036">
+ Licenses &amp; Credits
+ </th>
+ </tr>
+ <tr>
+ <td valign="top">
+ <ul>
+ <li><a href="http://www.qtsoftware.com/products/add-on-products">Qt Solutions</a></li>
+ <li><a href="http://www.qtsoftware.com/products/qt/3rdparty/">Partner Add-ons</a></li>
+ <li><a href="http://qt-apps.org">Third-Party Qt Components (qt-apps.org)</a></li>
+ <li><a href="http://www.qtsoftware.com/support/">Support</a></li>
+ <li><a href="http://www.qtsoftware.com/support/training/">Training</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="designer-manual.html">Qt Designer</a></li>
+ <li><a href="assistant-manual.html">Qt Assistant</a></li>
+ <li><a href="linguist-manual.html">Qt Linguist</a></li>
+ <li><a href="qmake-manual.html">qmake</a></li>
+ <li><a href="qttools.html">All Tools</a></li>
+ </ul>
+ </td>
+ <td valign="top">
+ <ul>
+ <li><a href="gpl.html">GNU GPL</a>, <a href="lgpl.html">GNU LGPL</a></li>
+ <li><a href="3rdparty.html">Third-Party Licenses Used in Qt</a></li>
+ <li><a href="licenses.html">Other Licenses Used in Qt</a></li>
+ <li><a href="trademarks.html">Trademark Information</a></li>
+ <li><a href="credits.html">Credits</a></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ \endraw
+
+*/
diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc
new file mode 100644
index 0000000..6d02801
--- /dev/null
+++ b/doc/src/installation.qdoc
@@ -0,0 +1,759 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+** Please remember to update the corresponding INSTALL files.
+****************************************************************************/
+
+/*!
+\group installation
+\title Installation
+\ingroup buildsystem
+\ingroup topics
+\brief Installing Qt on supported platforms.
+
+The installation procedure is different on each Qt platform.
+Please follow the instructions for your platform from the following list.
+
+\generatelist{related}
+*/
+
+/*! \page install-x11.html
+\title Installing Qt on X11 Platforms
+\ingroup installation
+\brief How to install Qt on platforms with X11.
+\previouspage Installation
+
+\note Qt for X11 has some requirements that are given in more detail
+in the \l{Qt for X11 Requirements} document.
+
+\list 1
+\o If you have the commercial edition of Qt, install your license
+ file as \c{$HOME/.qt-license}.
+
+ For the open source version you do not need a license file.
+
+\o Unpack the archive if you have not done so already. For example,
+ if you have the \c{qt-x11-opensource-desktop-%VERSION%.tar.gz}
+ package, type the following commands at a command line prompt:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 0
+
+ This creates the directory \c{/tmp/qt-x11-opensource-desktop-%VERSION%}
+ containing the files from the archive. We only support the GNU version of
+ the tar archiving utility. Note that on some systems it is called gtar.
+
+\o Building
+
+ To configure the Qt library for your machine type, run the
+ \c{./configure} script in the package directory.
+
+ By default, Qt is configured for installation in the
+ \c{/usr/local/Trolltech/Qt-%VERSION%} directory, but this can be
+ changed by using the \c{-prefix} option.
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 1
+
+ Type \c{./configure -help} to get a list of all available options.
+
+ To create the library and compile all the demos, examples, tools,
+ and tutorials, type:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 2
+
+ If \c{-prefix} is outside the build directory, you need to install
+ the library, demos, examples, tools, and tutorials in the appropriate
+ place. To do this, type:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 3
+
+ , as root if necessary.
+
+ Note that on some systems the make utility is named differently,
+ e.g. gmake. The configure script tells you which make utility to
+ use.
+
+ \bold{Note:} If you later need to reconfigure and rebuild Qt from the
+ same location, ensure that all traces of the previous configuration are
+ removed by entering the build directory and typing \c{make confclean}
+ before running \c configure again.
+
+\o Environment variables
+
+ In order to use Qt, some environment variables needs to be
+ extended.
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 4
+
+ This is done like this:
+
+ In \c{.profile} (if your shell is bash, ksh, zsh or sh), add the
+ following lines:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 5
+
+ In \c{.login} (in case your shell is csh or tcsh), add the following line:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 6
+
+ If you use a different shell, please modify your environment
+ variables accordingly.
+
+ For compilers that do not support rpath you must also extended the
+ \c LD_LIBRARY_PATH environment variable to include
+ \c{/usr/local/Trolltech/Qt-%VERSION%/lib}. On Linux with GCC this step
+ is not needed.
+
+\o That's all. Qt is now installed.
+
+ If you are new to Qt, we suggest that you take a look at the demos
+ and examples to see Qt in action. Run the Qt Examples and Demos
+ either by typing \c qtdemo on the command line or through the
+ desktop's Main menu.
+
+ You might also want to try the following links:
+
+ \list
+ \o \l{Configuring Qt}
+ \o \l{How to Learn Qt}
+ \o \l{Tutorials}
+ \o \l{Developer Zone}
+ \o \l{Deploying Qt Applications}
+ \endlist
+\endlist
+
+ We hope you will enjoy using Qt. Good luck!
+
+*/
+
+/*!
+\page install-win.html
+\title Installing Qt on Windows
+\ingroup installation
+\brief How to install Qt on Windows.
+\previouspage Installation
+
+\note Qt for Windows has some requirements that are given in more detail
+in the \l{Qt for Windows Requirements} document.
+
+\table
+\row \o \bold{Notes:}
+\list
+\o If you have obtained a binary package for this platform,
+consult the installation instructions provided instead of the ones in
+this document.
+\o \l{Open Source Versions of Qt} is not officially supported for use with
+any version of Visual Studio. Integration with Visual Studio is available
+as part of the \l{Qt Commercial Editions}.
+
+\endlist
+\endtable
+
+\list 1
+\o If you have the commercial edition of Qt, copy the license file
+ from your account on dist.trolltech.com into your home directory
+ (this may be known as the \c userprofile environment variable) and
+ rename it to \c{.qt-license}. This renaming process must be done
+ using a \e{command prompt} on Windows, \bold{not} with Windows Explorer.
+ For example on Windows 2000, \c{%USERPROFILE%} should be something
+ like \c{C:\Documents and Settings\username}
+
+ For the open source version you do not need a license file.
+
+\o Uncompress the files into the directory you want Qt installed;
+ e.g. \c{C:\Qt\%VERSION%}.
+
+ \note The install path must not contain any spaces or Windows specific
+ file system characters.
+
+\o Environment variables
+
+ In order to build and use Qt, the \c PATH environment variable needs to be
+ extended:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 7
+
+ This is done by adding \c{c:\Qt\%VERSION%\bin} to the \c PATH variable.
+
+ For newer versions of Windows, \c PATH can be extended through
+ the \menu{Control Panel|System|Advanced|Environment variables} menu.
+
+ You may also need to ensure that the locations of your compiler and
+ other build tools are listed in the \c PATH variable. This will depend
+ on your choice of software development environment.
+
+ \bold{Note}: If you don't use the configured shells, which is
+ available in the application menu, in the \l{Open Source Versions of Qt},
+ \c configure requires that \c sh.exe is not in the path
+ or that it is run from \c msys. This also goes for mingw32-make.
+
+\o Building
+
+ To configure the Qt library for your machine, type the following command
+ in a \bold{Visual Studio} command prompt:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 8
+
+ Type \c{configure -help} to get a list of all available options.
+
+ If you have multiple compilers installed, and want to build the Qt library
+ using a specific compiler, you must specify a \c qmake specification.
+ This is done by pasing \c{-platform <spec>} to configure; for example:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 9
+
+ In some cases you need to set up the compilation environment before running
+ configure in order to use the right compiler. For instance, you need to do this
+ if you have Visual Studio 2005 installed and want to compile Qt using the x64
+ compiler because the 32-bit and 64-bit compiler both use the same
+ \c qmake specification file.
+ This is usually done by selecting
+ \menu{Microsoft Visual Studio 2005|Visual Studio Tools|<Command Prompt>}
+ from the \gui Start menu.
+
+ The actual commands needed to build Qt depends on your development
+ system. For Microsoft Visual Studio to create the library and
+ compile all the demos, examples, tools and tutorials type:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 10
+
+ \note If you later need to reconfigure and rebuild Qt from the
+ same location, ensure that all traces of the previous configuration are
+ removed by entering the build directory and typing \c{nmake distclean}
+ before running \c configure again.
+
+\o That's all. Qt is now installed.
+
+ If you are new to Qt, we suggest that you take a look at the demos
+ and examples to see Qt in action. Run the Qt Examples and Demos
+ either by typing \c qtdemo on the command line or through the
+ desktop's Start menu.
+
+ You might also want to try the following links:
+
+ \list
+ \o \l{How to Learn Qt}
+ \o \l{Tutorials}
+ \o \l{Developer Zone}
+ \o \l{Deploying Qt Applications}
+ \endlist
+
+\endlist
+
+ We hope you will enjoy using Qt. Good luck!
+
+*/
+
+/*! \page install-mac.html
+\title Installing Qt on Mac OS X
+\ingroup installation
+\brief How to install Qt on Mac OS X.
+\previouspage Installation
+
+\note Qt for Mac OS X has some requirements that are given in more detail
+in the \l{Qt for Mac OS X Requirements} document.
+
+\bold{Note for the binary package}: If you have the binary package, simply double-click on the Qt.mpkg
+and follow the instructions to install Qt. You can later run the \c{uninstall-qt.py}
+script to uninstall the binary package. The script is located in /Developer/Tools and
+must be run as root.
+
+The following instructions describe how to install Qt from the source package.
+
+\list 1
+\o If you have the commercial edition of Qt, install your license
+ file as \c{$HOME/.qt-license}.
+
+ For the open source version you do not need a license file.
+
+\o Unpack the archive if you have not done so already. For example,
+ if you have the \c{qt-mac-opensource-desktop-%VERSION%.tar.gz}
+ package, type the following commands at a command line prompt:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 11
+
+ This creates the directory \c{/tmp/qt-mac-opensource-desktop-%VERSION%}
+ containing the files from the archive.
+
+\o Building
+
+ To configure the Qt library for your machine type, run the
+ \c{./configure} script in the package directory.
+
+ By default, Qt is configured for installation in the
+ \c{/usr/local/Trolltech/Qt-%VERSION%} directory, but this can be
+ changed by using the \c{-prefix} option.
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 12
+
+ Type \c{./configure -help} to get a list of all available options.
+
+ Note that you will need to specify \c{-universal} if you want to
+ build universal binaries, and also supply a path to the \c{-sdk}
+ option if your development machine has a PowerPC CPU. By default,
+ Qt is built as a framework, but you can built it as a set of
+ dynamic libraries (dylibs) by specifying the \c{-no-framework}
+ option.
+
+ Qt can also be configured to be built with debugging symbols. This
+ process is described in detail in the \l{Debugging Techniques}
+ document.
+
+ To create the library and compile all the demos, examples, tools,
+ and tutorials, type:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 13
+
+ If \c{-prefix} is outside the build directory, you need to install
+ the library, demos, examples, tools, and tutorials in the appropriate
+ place. To do this, type:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 14
+
+ as root, if neccessary (note that this requires that you have administrator access
+ to your machine).
+
+ There is a potential race condition when running make install with multiple
+ jobs. It is best to only run one make job (-j1) for the install.
+
+ \bold{Note:} If you later need to reconfigure and rebuild Qt from the
+ same location, ensure that all traces of the previous configuration are
+ removed by entering the build directory and typing \c{make confclean}
+ before running \c configure again.
+
+\o Environment variables
+
+ In order to use Qt, some environment variables need to be
+ extended.
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 15
+
+ This is done like this:
+
+ In \c{.profile} (if your shell is bash), add the following lines:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 16
+
+ In \c{.login} (in case your shell is csh or tcsh), add the following line:
+
+\snippet doc/src/snippets/code/doc_src_installation.qdoc 17
+
+ If you use a different shell, please modify your environment
+ variables accordingly.
+
+\o That's all. Qt is now installed.
+
+ If you are new to Qt, we suggest that you take a look at the demos
+ and examples to see Qt in action. Run the Qt Examples and Demos
+ either by typing \c qtdemo on the command line or through the
+ desktop's Start menu.
+
+ You might also want to try the following links:
+
+ \list
+ \o \l{How to Learn Qt}
+ \o \l{Tutorials}
+ \o \l{Developer Zone}
+ \o \l{Deploying Qt Applications}
+ \endlist
+\endlist
+
+ We hope you will enjoy using Qt. Good luck!
+
+*/
+
+/*! \page install-wince.html
+\title Installing Qt on Windows CE
+\ingroup installation
+\ingroup qtce
+\brief How to install Qt on Windows CE.
+\previouspage Installation
+
+\note Qt for Windows CE has some requirements that are given in more detail
+in the \l{Qt for Windows CE Requirements} document.
+
+\list 1
+ \o Uncompress the files into the directory you want to install Qt into;
+ e.g., \c{C:\Qt\%VERSION%}.
+
+ \note The install path must not contain any spaces.
+
+ \o Environment variables
+
+ In order to build and use Qt, the \c PATH environment variable needs
+ to be extended:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 18
+
+ This is done by adding \c{c:\Qt\%VERSION%\bin} to the \c PATH variable.
+
+ For newer versions of Windows, \c PATH can be extended through
+ "Control Panel->System->Advanced->Environment variables" and for
+ older versions by editing \c{c:\autoexec.bat}.
+
+ Make sure the enviroment variables for your compiler are set.
+ Visual Studio includes \c{vcvars32.bat} for that purpose - or simply
+ use the "Visual Studio Command Prompt" from the Start menu.
+
+ \o Configuring Qt
+
+ To configure Qt for Windows Mobile 5.0 for Pocket PC, type the
+ following:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 19
+
+ If you want to configure Qt for another platform or with other
+ options, type \c{configure -help} to get a list of all available
+ options. See the \c README file for the list of supported platforms.
+
+
+ \o Building Qt
+
+ Now, to build Qt you first have to update your \c PATH, \c INCLUDE
+ and \c LIB paths to point to the correct resources for your target
+ platforms. For a default installation of the Windows Mobile 5.0
+ Pocket PC SDK, this is done with the following commands:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 20
+
+ We provide a convenience script for this purpose, called \c{setcepaths}.
+ Simply type:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 21
+
+ Then to build Qt type:
+
+ \snippet doc/src/snippets/code/doc_src_installation.qdoc 22
+
+ \o That's all. Qt is now installed.
+
+ To get started with Qt, you can check out the examples found in the
+ \c{examples} directory of your Qt installation. The documentation can
+ be found in \c{doc\html}.
+
+ \bold{Remember:} If you reconfigure Qt for a different platform,
+ make sure you start with a new clean console to get rid of the
+ platform dependent include directories.
+
+ The links below provide further information for using Qt:
+ \list
+ \o \l{How to Learn Qt}
+ \o \l{Tutorials}
+ \o \l{Developer Zone}
+ \o \l{Deploying Qt Applications}
+ \endlist
+
+ You might also want to try the following Windows CE specific links:
+ \list
+ \o \l{Windows CE - Introduction to using Qt}
+ \o \l{Windows CE - Working with Custom SDKs}
+ \o \l{Windows CE - Using shadow builds}
+ \endlist
+
+ Information on feature and performance tuning for embedded builds can
+ be found on the following pages:
+ \list
+ \o \l{Fine-Tuning Features in Qt}
+ \o \l{Qt Performance Tuning}
+ \endlist
+\endlist
+
+ We hope you will enjoy using Qt. Good luck!
+*/
+
+/*!
+ \page requirements.html
+ \title General Qt Requirements
+ \ingroup installation
+ \brief Outlines the general requirements and dependencies needed to install Qt.
+
+ This page describes the specific requirements of libraries and components on which
+ Qt depends. For information about installing Qt, see the \l{Installation} page.
+
+ \section1 OpenSSL (version 0.9.7 or later)
+
+ Support for \l{SSL}{Secure Sockets Layer (SSL)} communication is provided by the
+ \l{OpenSSL Toolkit}, which must be obtained separately.
+
+ \section1 Platform-Specific Requirements
+
+ Each platform has its own specific set of dependencies. Please see the relevant
+ page for more details about the components that are required to build and install
+ Qt on your platform.
+
+ \list
+ \o \l{Qt for Embedded Linux Requirements}
+ \o \l{Qt for Mac OS X Requirements}
+ \o \l{Qt for Windows CE Requirements}
+ \o \l{Qt for Windows Requirements}
+ \o \l{Qt for X11 Requirements}
+ \endlist
+*/
+
+/*!
+ \page requirements-win.html
+ \title Qt for Windows Requirements
+ \ingroup installation
+ \brief Setting up the Windows environment for Qt.
+ \previouspage General Qt Requirements
+
+ If you are using a binary version of Qt with Visual Studio 2005, you must
+ first install the Visual Studio Service Pack 1 available
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&amp;displaylang=en}{here}
+ to avoid runtime conflicts.
+
+ To build Qt with Phonon on Windows, you require:
+
+ \list
+ \o Microsoft's DirectX Software Development Kit which can be
+ downloaded
+ \l{http://msdn2.microsoft.com/en-us/directx/aa937788.aspx}{here}, and
+ \o Microsoft's Windows Server 2003 R2 Platform SDK which is available
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&amp;DisplayLang=en}{here}.
+ \endlist
+
+ \sa {Known Issues in %VERSION%}
+*/
+
+/*!
+ \page requirements-mac.html
+ \title Qt for Mac OS X Requirements
+ \ingroup installation
+ \brief Setting up the Mac OS X environment for Qt.
+ \previouspage General Qt Requirements
+
+ \sa {Known Issues in %VERSION%}
+*/
+
+/*!
+ \page requirements-x11.html
+ \title Qt for X11 Requirements
+ \ingroup installation
+ \brief Setting up the X11 environment for Qt.
+ \previouspage General Qt Requirements
+
+ \tableofcontents
+
+ \section1 QtGui Dependencies
+
+ \image x11_dependencies.png Qt for X11 Dependencies
+
+ \raw HTML
+ <style type="text/css" id="colorstyles">
+ #QtGuiColor { background-color: #98fd00; color: black }
+ #QtCoreColor { background-color: #9c9cff; color: black }
+ #DefaultColor { background-color: #f6f6dc; color: black }
+ #FreetypeColor { background-color: #e6e6fa; color: black }
+ #GLColor { background-color: #ffc0cb; color: black }
+ #PthreadColor { background-color: #bdb76b; color: black }
+ #OptionalColor { background-color: #cae1ff; color: black }
+ #SMColor { background-color: #c2fafa; color: black }
+ #MiscColor { background-color: #f0f9ff; color: black }
+ #GlibColor { background-color: #b3b3b3; color: black }
+ </style>
+ \endraw
+
+ The QtGui module and the QtCore module, which provides the non-GUI features required
+ by QtGui, depend on the libraries described in the following table.
+
+ \table 90%
+ \header \o Name \o Library \o Notes \o Configuration options \o Minimum working version
+ \raw HTML
+ <tr id="OptionalColor">
+ <td> XRender </td><td> libXrender </td><td> X Rendering Extension; used for anti-aliasing</td>
+ <td><tt>-xrender</tt> or auto-detected</td><td>0.9.0</td>
+ </tr><tr id="OptionalColor">
+ <td> Xrandr </td><td> libXrandr </td><td> X Resize and Rotate Extension</td>
+ <td><tt>-xrandr</tt> or auto-detected</td><td>1.0.2</td>
+ </tr><tr id="OptionalColor">
+ <td> Xcursor </td><td> libXcursor </td><td> X Cursor Extension</td>
+ <td><tt>-xcursor</tt> or auto-detected</td><td>1.1.4</td>
+ </tr><tr id="OptionalColor">
+ <td> Xfixes </td><td> libXfixes </td><td> X Fixes Extension</td>
+ <td><tt>-xfixes</tt> or auto-detected</td><td>3.0.0</td>
+ </tr><tr id="OptionalColor">
+ <td> Xinerama </td><td> libXinerama </td><td> Multi-head support</td>
+ <td><tt>-xinerama</tt> or auto-detected</td><td>1.1.0</td>
+ </tr><tr id="DefaultColor">
+ <td> Xi </td><td> libXi </td><td> X11 Input Extensions</td>
+ <td>auto-detected</td><td>1.3.0</td>
+ </tr><tr id="DefaultColor">
+ <td> Xt </td><td> libXt </td><td> Xt Intrinsics</td><td></td><td>0.99</td>
+ </tr><tr id="DefaultColor">
+ <td> Xext </td><td> libXext </td><td> X Extensions</td><td></td><td>6.4.3</td>
+ </tr><tr id="DefaultColor">
+ <td> X11 </td><td> libX11 </td><td> X11 Client-Side Library</td><td></td><td>6.2.1</td>
+ </tr><tr id="SMColor">
+ <td> SM </td><td> libSM </td><td> X Session Management</td>
+ <td><tt>-sm</tt> or auto-detected</td><td>6.0.4</td>
+ </tr><tr id="SMColor">
+ <td> ICE </td><td> libICE </td><td> Inter-Client Exchange</td>
+ <td><tt>-sm</tt> or auto-detected</td><td>6.3.5</td>
+ </tr><tr id="GlibColor">
+ <td> glib </td><td> libglib-2.0 </td><td> Common event loop handling</td>
+ <td><tt>-glib</tt> or auto-detected</td><td>2.8.3</td>
+ </tr><tr id="PthreadColor">
+ <td> pthread </td><td> libpthread </td><td> Multithreading</td>
+ <td></td><td>2.3.5</td>
+ </tr>
+ \endraw
+ \endtable
+
+ \note You must compile with XRender support to get alpha transparency
+ support for pixmaps and images.
+
+ \section1 Phonon Dependencies
+
+ As described in the \l{Phonon Overview}, Phonon uses the GStreamer multimedia
+ framework as the backend for audio and video playback on X11. The minimum required
+ version of GStreamer is 0.10.
+
+ To build Phonon, you need the GStreamer library, base plugins, and development
+ files for your system. The package names for GStreamer vary between Linux
+ distributions; try searching for \c gstreamer or \c libgstreamer in your
+ distribution's package repository to find suitable packages.
+
+ \sa {Known Issues in %VERSION%}
+*/
+
+/*!
+ \page requirements-wince.html
+ \title Qt for Windows CE Requirements
+ \ingroup installation
+ \brief Setting up the Windows CE environment for Qt.
+ \previouspage General Qt Requirements
+
+ Qt is known to work with Visual Studio 2005 and the following SDKs for
+ Windows CE development on Windows XP and Windows Vista:
+
+ \list
+ \o Windows CE 5.0 Standard SDK for ARM, X86, and MIPS
+ \o Windows CE 6.0 SDKs for ARM generated using the defaults found in
+ Platform Builder
+ \o Windows Mobile 5.0 (\e{Pocket PC}, \e{Smartphone} and
+ \e{Pocket PC with Phone} editions)
+ \o Windows Mobile 6.0 (\e{Standard}, \e{Classic} and
+ \e{Professional} editions)
+ \endlist
+
+ Below is a list of links to download the SDKs:
+
+ \list
+ \o \l{http://www.microsoft.com/downloads/details.aspx?familyid=fa1a3d66-3f61-4ddc-9510-ae450e2318c3&amp;displaylang=en}
+ {Windows CE 5 Standard SDK}
+ \o \l{http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED&amp;displaylang=en}
+ {Windows Mobile 5 Pocket PC}
+ \o \l{http://www.microsoft.com/downloads/details.aspx?familyid=DC6C00CB-738A-4B97-8910-5CD29AB5F8D9&amp;displaylang=en}
+ {Windows Mobile 5 Smartphone}
+ \o \l{http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&amp;displaylang=en }
+ {Windows Mobile 6 Professional/Standard}
+ \endlist
+
+ \table
+ \row \bold{Note:}
+ \o
+ \list 1
+ \o Currently, there is only compile support for Windows CE 5.0
+ Standard SDK for SH-4.
+ \o There is currently no "out of the box" support for the
+ Windows CE Automotive or Portable Media SDKs from Microsoft.
+ \endlist
+ \endtable
+
+
+ Device manufacturers may prefer to make their own customized version of
+ Windows CE using Platform Builder. In order for Qt for Windows CE to
+ support a custom SDK, a build specification needs to be created. More
+ information on Windows CE Customization can be found
+ \l{Windows CE - Working with Custom SDKs}{here}.
+
+ \sa {Known Issues in %VERSION%}
+*/
+
+/*!
+ \page requirements-embedded-linux.html
+ \title Qt for Embedded Linux Requirements
+ \ingroup installation
+ \brief Setting up the Embedded Linux environment for Qt.
+ \previouspage General Qt Requirements
+
+ \sa {Known Issues in %VERSION%}
+
+ \section1 Building Qt for Embedded Linux with uclibc
+
+ If you intend to include the QtWebKit module in your Qt build then you should
+ use version \bold{uClibc 0.9.29 or greater} as that is the earliest version
+ with sufficient pthread support.
+
+ \section1 Memory Requirements
+
+ The memory and storage requirements for Qt for Embedded Linux depend on a
+ an variety of different factors, including the target architecture and the
+ features enabled in the Qt build.
+
+ The following table shows typical library sizes for the most common Qt
+ libraries on different architectures, built in release mode with different
+ feature profiles.
+
+ \table
+ \header \o{1,2} Architecture \o{1,2} Compiler \o{2,1} QtCore \o{2,1} QtGui \o{2,1} QtNetwork \o{2,1} QtWebKit
+ \header \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal \o Minimal \o Normal
+ \row \o linux-x86-g++ \o GCC 4.2.4 \o 1.7M \o 2.7M \o 3.3M \o 9.9M \o 653K \o 1.1M \o N/A \o 17M
+ \row \o linux-arm-g++ \o GCC 4.1.1 \o 1.9M \o 3.2M \o 4.1M \o 11M \o 507K \o 1.0M \o N/A \o 17M
+ \row \o linux-arm-g++ (thumb)
+ \o GCC 4.1.1 \o 1.7M \o 2.8M \o 4.0M \o 9.8M \o 409K \o 796K \o N/A \o 17M
+ \row \o linux-mips-g++ (MIPS32)
+ \o GCC 4.2.4 \o 2.0M \o 3.2M \o 4.5M \o 12M \o 505K \o 1003K \o N/A \o 21M
+ \endtable
+
+ Library sizes are given in the following units: K = 1024 bytes; M = 1024K.
+ QtWebKit is excluded from the minimal configuration.
+
+ The \l{Fine-Tuning Features in Qt} document covers the process of configuring
+ Qt builds to avoid the inclusion of unnecessary features.
+
+ \section1 Additional X11 Libraries for QVFb
+
+ The Virtual Framebuffer (QVFb) application requires the \c libxtst library
+ in addition to the libraries used to build Qt for X11. This library
+ enables the use of the Record extension to the X protocol to be used in
+ applications.
+*/
diff --git a/doc/src/introtodbus.qdoc b/doc/src/introtodbus.qdoc
new file mode 100644
index 0000000..71c65d5
--- /dev/null
+++ b/doc/src/introtodbus.qdoc
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page intro-to-dbus.html
+ \title Introduction to D-Bus
+
+ \keyword QtDBus
+ \ingroup architecture
+ \brief An introduction to Inter-Process Communication and Remote Procedure Calling with D-Bus.
+
+ \section1 Introduction
+
+ D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
+ Calling (RPC) mechanism originally developed for Linux to replace
+ existing and competing IPC solutions with one unified protocol. It
+ has also been designed to allow communication between system-level
+ processes (such as printer and hardware driver services) and
+ normal user processes.
+
+ It uses a fast, binary message-passing protocol, which is suitable
+ for same-machine communication due to its low latency and low
+ overhead. Its specification is currently defined by the
+ \tt{freedesktop.org} project, and is available to all parties.
+
+ Communication in general happens through a central server
+ application, called the "bus" (hence the name), but direct
+ application-to-application communication is also possible. When
+ communicating on a bus, applications can query which other
+ applications and services are available, as well as activate one
+ on demand.
+
+ \section1 The Buses
+
+ D-Bus buses are used to when many-to-many communication is
+ desired. In order to achieve that, a central server is launched
+ before any applications can connect to the bus: this server is
+ responsible for keeping track of the applications that are
+ connected and for properly routing messages from their source to
+ their destination.
+
+ In addition, D-Bus defines two well-known buses, called the
+ system bus and the session bus. These buses are special in the
+ sense that they have well-defined semantics: some services are
+ defined to be found in one or both of these buses.
+
+ For example, an application wishing to query the list of hardware
+ devices attached to the computer will probably communicate to a
+ service available on the system bus, while the service providing
+ opening of the user's web browser will be probably found on the
+ session bus.
+
+ On the system bus, one can also expect to find restrictions on
+ what services each application is allowed to offer. Therefore, one
+ can be reasonably certain that, if a certain service is present,
+ it is being offered by a trusted application.
+
+ \section1 Concepts
+
+ \section2 Messages
+
+ On the low level, applications communicate over D-Bus by sending
+ messages to one another. Messages are used to relay the remote
+ procedure calls as well as the replies and errors associated
+ with them. When used over a bus, messages have a destination,
+ which means they are routed only to the interested parties,
+ avoiding congestion due to "swarming" or broadcasting.
+
+ A special kind of message called a "signal message"
+ (a concept based on Qt's \l {Signals and Slots} mechanism),
+ however, does not have a pre-defined destination. Since its
+ purpose is to be used in a one-to-many context, signal messages
+ are designed to work over an "opt-in" mechanism.
+
+ The QtDBus module fully encapsulates the low-level concept of
+ messages into a simpler, object-oriented approach familiar to Qt
+ developers. In most cases, the developer need not worry about
+ sending or receiving messages.
+
+ \section2 Service Names
+
+ When communicating over a bus, applications obtain what is
+ called a "service name": it is how that application chooses to be
+ known by other applications on the same bus. The service names
+ are brokered by the D-Bus bus daemon and are used to
+ route messages from one application to another. An analogous
+ concept to service names are IP addresses and hostnames: a
+ computer normally has one IP address and may have one or more
+ hostnames associated with it, according to the services that it
+ provides to the network.
+
+ On the other hand, if a bus is not used, service names are also
+ not used. If we compare this to a computer network again, this
+ would equate to a point-to-point network: since the peer is
+ known, there is no need to use hostnames to find it or its IP
+ address.
+
+ The format of a D-Bus service name is in fact very similar to a
+ host name: it is a dot-separated sequence of letters and
+ digits. The common practice is even to name one's service name
+ according to the domain name of the organization that defined
+ that service.
+
+ For example, the D-Bus service is defined by
+ \tt{freedesktop.org} and can be found on the bus under the
+ service name:
+
+ \snippet doc/src/snippets/code/doc_src_introtodbus.qdoc 0
+
+ \section2 Object Paths
+
+ Like network hosts, applications provide specific services to
+ other applications by exporting objects. Those objects are
+ hierarchically organised, much like the parent-child
+ relationship that classes derived from QObject possess. One
+ difference, however, is that there is the concept of "root
+ object", that all objects have as ultimate parent.
+
+ If we continue our analogy with Web services, object paths
+ equate to the path part of a URL:
+
+ \img qurl-ftppath.png
+
+ Like them, object paths in D-Bus are formed resembling path
+ names on the filesystem: they are slash-separated labels, each
+ consisting of letters, digits and the underscore character
+ ("_"). They must always start with a slash and must not end with
+ one.
+
+ \section2 Interfaces
+
+ Interfaces are similar to C++ abstract classes and Java's
+ \c interface keyword and declare the "contract" that is
+ established between caller and callee. That is, they establish
+ the names of the methods, signals and properties that are
+ available as well as the behavior that is expected from either
+ side when communication is established.
+
+ Qt uses a very similar mechanism in its \l {How to Create Qt
+ Plugins}{Plugin system}: Base classes in C++ are associated
+ with a unique identifier by way of the Q_DECLARE_INTERFACE()
+ macro.
+
+ D-Bus interface names are, in fact, named in a manner similar to
+ what is suggested by the Qt Plugin System: an identifier usually
+ constructed from the domain name of the entity that defined that
+ interface.
+
+ \section2 Cheat Sheet
+
+ To facilitate remembering of the naming formats and their
+ purposes, the following table can be used:
+
+ \table 90%
+ \header \o D-Bus Concept \o Analogy \o Name format
+ \row \o Service name \o Network hostnames \o Dot-separated
+ ("looks like a hostname")
+ \row \o Object path \o URL path component \o Slash-separated
+ ("looks like a path")
+ \row \o Interface \o Plugin identifier \o Dot-separated
+ \endtable
+
+ \section2 Further Reading
+
+ The following documents contain information about Qt's D-Bus integration
+ features, and provide details about the mechanisms used to send and receive
+ type information over the bus:
+
+ \list
+ \o \l{Using QtDBus Adaptors}
+ \o \l{The QtDBus Type System}
+ \o \l{QtDBus XML compiler (qdbusxml2cpp)}
+ \endlist
+*/
diff --git a/doc/src/ipc.qdoc b/doc/src/ipc.qdoc
new file mode 100644
index 0000000..97ed22e
--- /dev/null
+++ b/doc/src/ipc.qdoc
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group ipc
+ \title Inter-Process Communication in Qt
+ \ingroup groups
+ \ingroup architecture
+ \brief Inter-Process communication in Qt applications.
+
+ Qt provides several ways to implement Inter-Process Communication
+ (IPC) in Qt applications.
+
+ \section1 D-Bus
+
+ The \l{QtDBus} module is a Unix-only library
+ you can use to implement IPC using the D-Bus protocol. It extends
+ Qt's \l{signalsandslots.html} {Signals and Slots} mechanism to the
+ IPC level, allowing a signal emitted by one process to be
+ connected to a slot in another process. This \l {Introduction to
+ D-Bus} page has detailed information on how to use the \l{QtDBus}
+ module.
+
+ \section1 TCP/IP
+
+ The cross-platform \l{QtNetwork} module
+ provides classes that make network programming portable and
+ easy. It offers high-level classes (e.g., QHttp, QFtp) that
+ communicate using specific application-level protocols, and
+ lower-level classes (e.g., QTcpSocket, QTcpServer, QSslSocket) for
+ implementing protocols.
+
+ \section1 Shared Memory
+
+ The cross-platform shared memory class, QSharedMemory, provides
+ access to the operating system's shared memory implementation.
+ It allows safe access to shared memory segments by multiple threads
+ and processes. Additionally, QSystemSemaphore can be used to control
+ access to resources shared by the system, as well as to communicate
+ between processes.
+
+ \section1 Qt COmmunications Protocol (QCOP)
+
+ The QCopChannel class implements a protocol for transferring messages
+ between client processes across named channels. QCopChannel is
+ only available in \l{Qt for Embedded Linux}. Like the \l{QtDBus}
+ module, QCOP extends Qt's \l{Signals and Slots} mechanism to the
+ IPC level, allowing a signal emitted by one process to be
+ connected to a slot in another process, but unlike QtDBus, QCOP
+ does not depend on a third party library.
+
+*/
+
diff --git a/doc/src/known-issues.qdoc b/doc/src/known-issues.qdoc
new file mode 100644
index 0000000..60fd63d
--- /dev/null
+++ b/doc/src/known-issues.qdoc
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page known-issues.html
+ \title Known Issues in %VERSION%
+ \ingroup platform-notes
+ \brief A summary of known issues in Qt %VERSION% at the time of release.
+
+ An up-to-date list of known issues with Qt %VERSION% can be found via the
+ \l{Task Tracker} on the Qt website which provides additional information
+ about known issues and tasks related to Qt.
+
+ \section1 General Issues
+
+ When running Qt applications on Windows or with \c{-graphicssystem raster},
+ any process that triggers a QWidget::update() from within a destructor
+ might result in a crash.
+
+
+ \section1 Issues with Third Party Software
+
+ \section2 Intel Compiler Support
+
+ Although it is possible to build applications against Qt 4.5.0 using Intel
+ CC 10, these applications will crash when run. A fix for this issue is
+ scheduled for Qt 4.5.1. We recommend that developers who rely on this
+ compiler wait until the fix is applied before upgrading to the Qt 4.5.x
+ series of releases.
+
+ \section2 X11 Hardware Support
+
+ \list
+ \o There is a bug in the 169.xx NVIDIA drivers on certain GeForce 8 series
+ cards that is triggered by the OpenGL paint engine when using QPainter
+ on a QGLWidget to draw paths and polygons. Some other painting
+ operations that end up in the path fallback are affected as well. The
+ bug causes the whole X server to repeatedly hang for several seconds at
+ a time.
+ \o There is an issue with NVIDIA's 9xxx driver series on X11 that causes a
+ crash in cases where there are several \l{QGLContext}s and the extended
+ composition modes are used (the composition modes between and including
+ QPainter::CompositionMode_Multiply and
+ QPainter::CompositionMode_Exclusion). This affects the composition mode
+ demo in Qt 4.5, for example. The crash does not occur in newer versions
+ of the drivers.
+ \endlist
+
+ \section2 Windows Hardware Support
+
+ \list
+ \o When using version 6.14.11.6921 of the NVIDIA drivers for the GeForce
+ 6600 GT under Windows XP, Qt applications which use drag and drop will
+ display reduced size drag and drop icons when run alongside
+ applications that use OpenGL. This problem can be worked around by
+ reducing the level of graphics acceleration provided by the driver, or
+ by disabling hardware acceleration completely.
+ \endlist
+
+ \section2 Windows Software Issues
+
+ \list
+
+ \o When building Qt 4.5.0 with Windows 7, the build fails with an error
+ message regarding failing to embed manifest. This a known issue with
+ Windows 7, explained in the Windows 7 SDK Beta
+ \l{http://download.microsoft.com/download/8/8/0/8808A472-6450-4723-9C87-977069714B27/ReleaseNotes.Htm}
+ {release notes}. A workaround for this issue is to patch the
+ \bold{embed_manifest_exe.prf} file with the following:
+
+ \code
+ diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
+ index e1747f1..05f116e 100644
+ --- a/mkspecs/features/win32/embed_manifest_exe.prf
+ +++ b/mkspecs/features/win32/embed_manifest_exe.prf
+ @@ -8,4 +8,9 @@ if(win32-msvc2005|win32-msvc2008):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.ma
+ nifest\" -outputresource:$(DESTDIR_TARGET);1$$escape_expand(\n\t))
+ QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
+ QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
+ + isEmpty(RC_FILE) {
+ + system("echo.>$$replace(OUT_PWD,/,\\)\\$$replace(OBJECTS_DIR,/,\\)\\Windows7WorkAround.rc")
+ + RC_FILE = $$replace(OUT_PWD,/,\\)\\$$replace(OBJECTS_DIR,/,\\)\\Windows7WorkAround.rc
+ + }
+ +
+ }
+ \endcode
+
+ \o Under certain circumstances Visual Studio Integration v1.4.0 will not
+ be able to install the integration for Visual Studio 2005 on Windows
+ Vista. An error message states that .NET Framework v2.0 Service Pack 1
+ is not installed. This is due to a problem with the built-in
+ installation of this on Windows Vista. This issue can be fixed by
+ installing .NET Framework version 3.5.
+
+ \o With NVIDIA GeForce 7950 GT (driver version 6.14.11.7824), a fullscreen
+ QGLWidget flickers when child widgets are shown/hidden. The workaround
+ for this is to use \l{QWidget::}{setGeometry()} with a width/height 1
+ pixel bigger than your geometry and call \l{QWidget::}{show()}.
+
+ \o A bug in the Firebird database can cause an application to crash when
+ \c{fbembed.dll} is unloaded. The bug is fixed in version 2.5.
+
+ \endlist
+
+ \section2 Mac OS X Software Support
+
+ \list
+ \o If a sheet is opened for a given window, clicking the title bar of that
+ window will cause it to flash. This behavior has been reported to Apple
+ (bug number 5827676).
+ \endlist
+*/
diff --git a/doc/src/layout.qdoc b/doc/src/layout.qdoc
new file mode 100644
index 0000000..38163c8
--- /dev/null
+++ b/doc/src/layout.qdoc
@@ -0,0 +1,381 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page layout.html
+
+ \title Layout Classes
+ \ingroup architecture
+ \ingroup classlists
+ \brief A tour of the standard layout managers and an introduction to custom
+ layouts.
+
+ The Qt layout system provides a simple and powerful way of automatically
+ arranging child widgets within a widget to ensure that they make good use
+ of the available space.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Qt includes a set of layout management classes that are used to describe
+ how widgets are laid out in an application's user interface. These layouts
+ automatically position and resize widgets when the amount of space
+ available for them changes, ensuring that they are consistently arranged
+ and that the user interface as a whole remains usable.
+
+ All QWidget subclasses can use layouts to manage their children. The
+ QWidget::setLayout() function applies a layout to a widget. When a layout
+ is set on a widget in this way, it takes charge of the following tasks:
+
+ \list
+ \o Positioning of child widgets.
+ \o Sensible default sizes for windows.
+ \o Sensible minimum sizes for windows.
+ \o Resize handling.
+ \o Automatic updates when contents change:
+ \list
+ \o Font size, text or other contents of child widgets.
+ \o Hiding or showing a child widget.
+ \o Removal of child widgets.
+ \endlist
+ \endlist
+
+ Qt's layout classes were designed for hand-written C++ code, allowing
+ measurements to be specified in pixels for simplicity, so they are easy to
+ understand and use. The code generated for forms created using \QD also
+ uses the layout classes. \QD is useful to use when experimenting with the
+ design of a form since it avoids the compile, link and run cycle usually
+ involved in user interface development.
+
+
+ \section1 Horizontal, Vertical, Grid, and Form Layouts
+
+ The easiest way to give your widgets a good layout is to use the built-in
+ layout managers: QHBoxLayout, QVBoxLayout, QGridLayout, and QFormLayout.
+ These classes inherit from QLayout, which in turn derives from QObject (not
+ QWidget). They take care of geometry management for a set of widgets. To
+ create more complex layouts, you can nest layout managers inside each other.
+
+ \list
+ \o A QHBoxLayout lays out widgets in a horizontal row, from left to
+ right (or right to left for right-to-left languages).
+ \image qhboxlayout-with-5-children.png
+
+ \o A QVBoxLayout lays out widgets in a vertical column, from top to
+ bottom.
+ \image qvboxlayout-with-5-children.png
+
+ \o A QGridLayout lays out widgets in a two-dimensional grid. Widgets
+ can occupy multiple cells.
+ \image qgridlayout-with-5-children.png
+
+ \o A QFormLayout lays out widgets in a 2-column descriptive label-
+ field style.
+ \image qformlayout-with-6-children.png
+ \endlist
+
+
+ \section2 Laying Out Widgets in Code
+
+ The following code creates a QHBoxLayout that manages the geometry of five
+ \l{QPushButton}s, as shown on the first screenshot above:
+
+ \snippet doc/src/snippets/layouts/layouts.cpp 0
+ \snippet doc/src/snippets/layouts/layouts.cpp 1
+ \snippet doc/src/snippets/layouts/layouts.cpp 2
+ \codeline
+ \snippet doc/src/snippets/layouts/layouts.cpp 3
+ \snippet doc/src/snippets/layouts/layouts.cpp 4
+ \snippet doc/src/snippets/layouts/layouts.cpp 5
+
+ The code for QVBoxLayout is identical, except the line where the layout is
+ created. The code for QGridLayout is a bit different, because we need to
+ specify the row and column position of the child widget:
+
+ \snippet doc/src/snippets/layouts/layouts.cpp 12
+ \snippet doc/src/snippets/layouts/layouts.cpp 13
+ \snippet doc/src/snippets/layouts/layouts.cpp 14
+ \codeline
+ \snippet doc/src/snippets/layouts/layouts.cpp 15
+ \snippet doc/src/snippets/layouts/layouts.cpp 16
+ \snippet doc/src/snippets/layouts/layouts.cpp 17
+
+ The third QPushButton spans 2 columns. This is possible by specifying 2 as
+ the fifth argument to QGridLayout::addWidget().
+
+ Finally, the code for QFormLayout is ..
+
+
+ \section2 Tips for Using Layouts
+
+ When you use a layout, you do not need to pass a parent when constructing
+ the child widgets. The layout will automatically reparent the widgets
+ (using QWidget::setParent()) so that they are children of the widget on
+ which the layout is installed.
+
+ \note Widgets in a layout are children of the widget on which the layout
+ is installed, \e not of the layout itself. Widgets can only have other
+ widgets as parent, not layouts.
+
+ You can nest layouts using \c addLayout() on a layout; the inner layout
+ then becomes a child of the layout it is inserted into.
+
+
+ \section1 Adding Widgets to a Layout
+
+ When you add widgets to a layout, the layout process works as follows:
+
+ \list 1
+ \o All the widgets will initially be allocated an amount of space in
+ accordance with their QWidget::sizePolicy() and
+ QWidget::sizeHint().
+
+ \o If any of the widgets have stretch factors set, with a value
+ greater than zero, then they are allocated space in proportion to
+ their stretch factor (explained below).
+
+ \o If any of the widgets have stretch factors set to zero they will
+ only get more space if no other widgets want the space. Of these,
+ space is allocated to widgets with an
+ \l{QSizePolicy::Expanding}{Expanding} size policy first.
+
+ \o Any widgets that are allocated less space than their minimum size
+ (or minimum size hint if no minimum size is specified) are
+ allocated this minimum size they require. (Widgets don't have to
+ have a minimum size or minimum size hint in which case the strech
+ factor is their determining factor.)
+
+ \o Any widgets that are allocated more space than their maximum size
+ are allocated the maximum size space they require. (Widgets do not
+ have to have a maximum size in which case the strech factor is
+ their determining factor.)
+ \endlist
+
+
+ \section2 Stretch Factors
+ \keyword stretch factor
+
+ Widgets are normally created without any stretch factor set. When they are
+ laid out in a layout the widgets are given a share of space in accordance
+ with their QWidget::sizePolicy() or their minimum size hint whichever is
+ the greater. Stretch factors are used to change how much space widgets are
+ given in proportion to one another.
+
+ If we have three widgets laid out using a QHBoxLayout with no stretch
+ factors set we will get a layout like this:
+
+ \img layout1.png Three widgets in a row
+
+ If we apply stretch factors to each widget, they will be laid out in
+ proportion (but never less than their minimum size hint), e.g.
+
+ \img layout2.png Three widgets with different stretch factors in a row
+
+
+ \section1 Custom Widgets in Layouts
+
+ When you make your own widget class, you should also communicate its layout
+ properties. If the widget has a one of Qt's layouts, this is already taken
+ care of. If the widget does not have any child widgets, or uses manual
+ layout, you can change the behavior of the widget using any or all of the
+ following mechanisms:
+
+ \list
+ \o Reimplement QWidget::sizeHint() to return the preferred size of the
+ widget.
+ \o Reimplement QWidget::minimumSizeHint() to return the smallest size
+ the widget can have.
+ \o Call QWidget::setSizePolicy() to specify the space requirements of
+ the widget.
+ \endlist
+
+ Call QWidget::updateGeometry() whenever the size hint, minimum size hint or
+ size policy changes. This will cause a layout recalculation. Multiple
+ consecutive calls to QWidget::updateGeometry() will only cause one layout
+ recalculation.
+
+ If the preferred height of your widget depends on its actual width (e.g.,
+ a label with automatic word-breaking), set the
+ \l{QSizePolicy::hasHeightForWidth()}{height-for-width} flag in the
+ widget's \l{QWidget::sizePolicy}{size policy} and reimplement
+ QWidget::heightForWidth().
+
+ Even if you implement QWidget::heightForWidth(), it is still a good idea to
+ provide a reasonable sizeHint().
+
+ For further guidance when implementing these functions, see the
+ \e{Qt Quarterly} article
+ \l{http://doc.trolltech.com/qq/qq04-height-for-width.html}
+ {Trading Height for Width}.
+
+
+ \section1 Layout Issues
+
+ The use of rich text in a label widget can introduce some problems to the
+ layout of its parent widget. Problems occur due to the way rich text is
+ handled by Qt's layout managers when the label is word wrapped.
+
+ In certain cases the parent layout is put into QLayout::FreeResize mode,
+ meaning that it will not adapt the layout of its contents to fit inside
+ small sized windows, or even prevent the user from making the window too
+ small to be usable. This can be overcome by subclassing the problematic
+ widgets, and implementing suitable \l{QWidget::}{sizeHint()} and
+ \l{QWidget::}{minimumSizeHint()} functions.
+
+ In some cases, it is relevant when a layout is added to a widget. When
+ you set the widget of a QDockWidget or a QScrollArea (with
+ QDockWidget::setWidget() and QScrollArea::setWidget()), the layout must
+ already have been set on the widget. If not, the widget will not be
+ visible.
+
+
+ \section1 Manual Layout
+
+ If you are making a one-of-a-kind special layout, you can also make a
+ custom widget as described above. Reimplement QWidget::resizeEvent() to
+ calculate the required distribution of sizes and call
+ \l{QWidget::}{setGeometry()} on each child.
+
+ The widget will get an event of type QEvent::LayoutRequest when the
+ layout needs to be recalculated. Reimplement QWidget::event() to handle
+ QEvent::LayoutRequest events.
+
+
+ \section1 How to Write A Custom Layout Manager
+
+ An alternative to manual layout is to write your own layout manager by
+ subclassing QLayout. The \l{layouts/borderlayout}{Border Layout} and
+ \l{layouts/flowlayout}{Flow Layout} examples show how to do this.
+
+ Here we present an example in detail. The \c CardLayout class is inspired
+ by the Java layout manager of the same name. It lays out the items (widgets
+ or nested layouts) on top of each other, each item offset by
+ QLayout::spacing().
+
+ To write your own layout class, you must define the following:
+ \list
+ \o A data structure to store the items handled by the layout. Each
+ item is a \link QLayoutItem QLayoutItem\endlink. We will use a
+ QList in this example.
+ \o \l{QLayout::}{addItem()}, how to add items to the layout.
+ \o \l{QLayout::}{setGeometry()}, how to perform the layout.
+ \o \l{QLayout::}{sizeHint()}, the preferred size of the layout.
+ \o \l{QLayout::}{itemAt()}, how to iterate over the layout.
+ \o \l{QLayout::}{takeAt()}, how to remove items from the layout.
+ \endlist
+
+ In most cases, you will also implement \l{QLayout::}{minimumSize()}.
+
+
+ \section2 The Header File (\c card.h)
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 0
+
+
+ \section2 The Implementation File (\c card.cpp)
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 1
+
+ First we define two functions that iterate over the layout: \c{itemAt()}
+ and \c{takeAt()}. These functions are used internally by the layout system
+ to handle deletion of widgets. They are also available for application
+ programmers.
+
+ \c{itemAt()} returns the item at the given index. \c{takeAt()} removes the
+ item at the given index, and returns it. In this case we use the list index
+ as the layout index. In other cases where we have a more complex data
+ structure, we may have to spend more effort defining a linear order for the
+ items.
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 2
+
+ \c{addItem()} implements the default placement strategy for layout items.
+ This function must be implemented. It is used by QLayout::add(), by the
+ QLayout constructor that takes a layout as parent. If your layout has
+ advanced placement options that require parameters, you must provide extra
+ access functions such as the row and column spanning overloads of
+ QGridLayout::addItem(), QGridLayout::addWidget(), and
+ QGridLayout::addLayout().
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 3
+
+ The layout takes over responsibility of the items added. Since QLayoutItem
+ does not inherit QObject, we must delete the items manually. The function
+ QLayout::deleteAllItems() uses \c{takeAt()} defined above to delete all the
+ items in the layout.
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 4
+
+ The \c{setGeometry()} function actually performs the layout. The rectangle
+ supplied as an argument does not include \c{margin()}. If relevant, use
+ \c{spacing()} as the distance between items.
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 5
+
+ \c{sizeHint()} and \c{minimumSize()} are normally very similar in
+ implementation. The sizes returned by both functions should include
+ \c{spacing()}, but not \c{margin()}.
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 6
+
+
+ \section2 Further Notes
+
+ \list
+ \o This custom layout does not handle height for width.
+ \o We ignore QLayoutItem::isEmpty(); this means that the layout will
+ treat hidden widgets as visible.
+ \o For complex layouts, speed can be greatly increased by caching
+ calculated values. In that case, implement
+ QLayoutItem::invalidate() to mark the cached data is dirty.
+ \o Calling QLayoutItem::sizeHint(), etc. may be expensive. So, you
+ should store the value in a local variable if you need it again
+ later within in the same function.
+ \o You should not call QLayoutItem::setGeometry() twice on the same
+ item in the smae function. This call can be very expensive if the
+ item has several child widgets, because the layout manager must do
+ a complete layout every time. Instead, calculate the geometry and
+ then set it. (This does not only apply to layouts, you should do
+ the same if you implement your own resizeEvent(), for example.)
+ \endlist
+*/
+
diff --git a/doc/src/licenses.qdoc b/doc/src/licenses.qdoc
new file mode 100644
index 0000000..b42b882
--- /dev/null
+++ b/doc/src/licenses.qdoc
@@ -0,0 +1,465 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page licenses.html
+ \title Other Licenses Used in Qt
+ \ingroup licensing
+ \brief Information about other licenses used for Qt components and third-party code.
+
+ Qt contains some code that is not provided under the the
+ \l{GNU General Public License (GPL)},
+ \l{GNU Lesser General Public License (LGPL)} or the
+ \l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under
+ specific licenses from the original authors. Some pieces of code were developed
+ by Qt Software and others originated from third parties.
+ This page lists the licenses used, names the authors, and links
+ to the places where it is used.
+
+ Nokia gratefully acknowledges these and other contributions
+ to Qt. We recommend that programs that use Qt also acknowledge
+ these contributions, and quote these license statements in an
+ appendix to the documentation.
+
+ See also: \l{Licenses for Fonts Used in Qt for Embedded Linux}
+
+ \generatelist legalese
+
+ \hr
+
+ Copyright (C) 2000-2004, International Business Machines\br
+ Corporation and others. All Rights Reserved.\br
+ Copyright (C) 2007 Apple Inc. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ software and associated documentation files (the "Software"), to deal in the Software
+ without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, and/or sell copies of the Software, and to permit persons
+ to whom the Software is furnished to do so, provided that the above copyright notice(s)
+ and this permission notice appear in all copies of the Software and that both the above
+ copyright notice(s) and this permission notice appear in supporting documentation.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER
+ OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ Except as contained in this notice, the name of a copyright holder shall not be used in
+ advertising or otherwise to promote the sale, use or other dealings in this Software
+ without prior written authorization of the copyright holder.
+
+ \list
+ \o Parts of WebKit used by the QtWebKit module
+ \endlist
+
+ \hr
+
+ Copyright (c) 1998 by Bjorn Reese <breese@imada.ou.dk>
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+
+ \list
+ \o Parts of the QCrashHandler class
+ \endlist
+
+ \hr
+
+ Parts of the FreeType projects have been modified and put into Qt
+ for use in the painting subsystem. These files are ftraster.h,
+ ftraster.c, ftgrays.h and ftgrays.c. The following modifications
+ has been made to these files:
+
+ \list
+ \i Renamed FT_ and ft_ symbols to QT_FT_ and qt_ft_ to avoid name
+ conflicts in \c{qrasterdefs_p.h}.
+ \i Removed parts of code not relevant when compiled with
+ _STANDALONE_ defined.
+ \i Changed behavior in \c{ftraster.c} to follow X polygon filling
+ rules.
+ \i Implemented support in \c{ftraster.c} for winding / odd even
+ polygon fill rules.
+ \i Replaced bitmap generation with span generation in \c{ftraster.c}.
+ \i Renamed \c{ftraster.h} as \c{qblackraster_p.h}.
+ \i Renamed \c{ftraster.c} as \c{qblackraster.c}.
+ \i Renamed \c{ftgrays.h} as \c{qgrayraster_p.h}.
+ \i Renamed \c{ftgrays.c} as \c{qgrayraster.c}.
+ \endlist
+
+ See \c src/3rdparty/freetype/docs/FTL.txt and \c
+ src/3rdparty/freetype/docs/GPL.txt for license details.
+
+ \hr
+
+ Copyright (c) 1985, 1986, 1987 X Consortium
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name of the X Consortium shall
+ not be used in advertising or otherwise to promote the sale, use or
+ other dealings in this Software without prior written authorization
+ from the X Consortium.
+
+ \list
+ \o Parts of the Q3PolygonScanner class used in Qt for Embedded Linux
+ \endlist
+
+ \hr
+
+ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for any purpose and without fee is hereby granted,
+ provided that the above copyright notice appear in all copies and that
+ both that copyright notice and this permission notice appear in
+ supporting documentation, and that the name of Digital not be
+ used in advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.
+
+ DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+
+ \list
+ \o Parts of the Q3PolygonScanner class used in Qt for Embedded Linux
+ \endlist
+
+ \hr
+
+ Copyright 1985, 1987, 1998 The Open Group
+
+ Permission to use, copy, modify, distribute, and sell this software and its
+ documentation for any purpose is hereby granted without fee, provided that
+ the above copyright notice appear in all copies and that both that
+ copyright notice and this permission notice appear in supporting
+ documentation.
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name of The Open Group shall not be
+ used in advertising or otherwise to promote the sale, use or other dealings
+ in this Software without prior written authorization from The Open Group.
+
+ \list
+ \o Parts of the internal QKeyMapper class on X11 platforms
+ \endlist
+
+ \hr
+
+ pnmscale.c - read a portable anymap and scale it
+
+ Copyright (C) 1989, 1991 by Jef Poskanzer.
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for any purpose and without fee is hereby granted, provided
+ that the above copyright notice appear in all copies and that both that
+ copyright notice and this permission notice appear in supporting
+ documentation. This software is provided "as is" without express or
+ implied warranty.
+
+ \list
+ \o Parts of the internal QImageSmoothScaler::scale() function use code
+ based on pnmscale.c by Jef Poskanzer.
+ \endlist
+*/
+
+/*!
+ \page licenses-fonts.html
+ \title Licenses for Fonts Used in Qt for Embedded Linux
+ \ingroup qt-embedded-linux
+ \ingroup licensing
+ \brief Information about the licenses of fonts supplied with Qt for Embedded Linux.
+
+ The fonts supplied with Qt for Embedded Linux have been obtained under a
+ variety of different licenses listed below.
+
+ \tableofcontents
+
+ See also: \l{Other Licenses Used in Qt}
+
+ \section1 Adobe Helvetica
+
+ Copyright 1984-1989, 1994 Adobe Systems Incorporated.
+ Copyright 1988, 1994 Digital Equipment Corporation.
+
+ Adobe is a trademark of Adobe Systems Incorporated which may be
+ registered in certain jurisdictions.
+ Permission to use these trademarks is hereby granted only in
+ association with the images described in this file.
+
+ Permission to use, copy, modify, distribute and sell this software
+ and its documentation for any purpose and without fee is hereby
+ granted, provided that the above copyright notices appear in all
+ copies and that both those copyright notices and this permission
+ notice appear in supporting documentation, and that the names of
+ Adobe Systems and Digital Equipment Corporation not be used in
+ advertising or publicity pertaining to distribution of the software
+ without specific, written prior permission. Adobe Systems and
+ Digital Equipment Corporation make no representations about the
+ suitability of this software for any purpose. It is provided "as
+ is" without express or implied warranty.
+
+ \section1 Adobe Utopia
+
+ Permission to use, reproduce, display and distribute the listed
+ typefaces is hereby granted, provided that the Adobe Copyright notice
+ appears in all whole and partial copies of the software and that the
+ following trademark symbol and attribution appear in all unmodified
+ copies of the software:
+
+ Copyright (c) 1989 Adobe Systems Incorporated
+ Utopia (R)
+ Utopia is a registered trademark of Adobe Systems Incorporated
+
+ The Utopia font
+ Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights
+ Reserved.Utopia is a registered trademark of Adobe Systems
+ Incorporated.
+
+ \section1 Babelfish
+
+ \snippet doc/src/snippets/code/doc_src_licenses.qdoc 1
+
+ \section1 Bigelow & Holmes Luxi
+
+ Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font
+ instruction code copyright (c) 2001 by URW++ GmbH. All Rights
+ Reserved. Luxi is a registered trademark of Bigelow & Holmes Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of these Fonts and associated documentation files (the "Font
+ Software"), to deal in the Font Software, including without
+ limitation the rights to use, copy, merge, publish, distribute,
+ sublicense, and/or sell copies of the Font Software, and to permit
+ persons to whom the Font Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright and trademark notices and this permission notice
+ shall be included in all copies of one or more of the Font Software.
+
+ The Font Software may not be modified, altered, or added to, and in
+ particular the designs of glyphs or characters in the Fonts may not
+ be modified nor may additional glyphs or characters be added to the
+ Fonts. This License becomes null and void when the Fonts or Font
+ Software have been modified.
+
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+ BIGELOW & HOLMES INC. OR URW++ GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES
+ OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT,
+ INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
+ INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
+ SOFTWARE.
+
+ Except as contained in this notice, the names of Bigelow & Holmes
+ Inc. and URW++ GmbH. shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Font Software without
+ prior written authorization from Bigelow & Holmes Inc. and URW++ GmbH.
+
+ For further information, contact:
+
+ info@urwpp.de
+ or
+ design@bigelowandholmes.com
+
+ \section1 Bitstream Charter and Courier
+
+ (c) Copyright 1989-1992, Bitstream Inc., Cambridge, MA.
+
+ You are hereby granted permission under all Bitstream propriety rights
+ to use, copy, modify, sublicense, sell, and redistribute the 4 Bitstream
+ Charter (r) Type 1 outline fonts and the 4 Courier Type 1 outline fonts
+ for any purpose and without restriction; provided, that this notice is
+ left intact on all copies of such fonts and that Bitstream's trademark
+ is acknowledged as shown below on all unmodified copies of the 4 Charter
+ Type 1 fonts.
+
+ BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
+
+ \section1 Bitstream Vera
+
+ Copyright (c) 2003 by Bitstream, Inc.
+
+ All Rights Reserved.
+
+ Bitstream Vera is a trademark of Bitstream, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the fonts accompanying this license ("Fonts") and associated
+ documentation files (the "Font Software"), to reproduce and distribute
+ the Font Software, including without limitation the rights to use,
+ copy, merge, publish, distribute, and/or sell copies of the Font
+ Software, and to permit persons to whom the Font Software is furnished
+ to do so, subject to the following conditions:
+
+ The above copyright and trademark notices and this permission notice
+ shall be included in all copies of one or more of the Font Software
+ typefaces.
+
+ The Font Software may be modified, altered, or added to, and in
+ particular the designs of glyphs or characters in the Fonts may be
+ modified and additional glyphs or characters may be added to the
+ Fonts, only if the fonts are renamed to names not containing either
+ the words "Bitstream" or the word "Vera".
+
+ This License becomes null and void to the extent applicable to Fonts
+ or Font Software that has been modified and is distributed under the
+ "Bitstream Vera" names.
+
+ The Font Software may be sold as part of a larger software package but
+ no copy of one or more of the Font Software typefaces may be sold by
+ itself.
+
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+ BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+ OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+ SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+ Except as contained in this notice, the names of Gnome, the Gnome
+ Foundation, and Bitstream Inc., shall not be used in advertising or
+ otherwise to promote the sale, use or other dealings in this Font
+ Software without prior written authorization from the Gnome Foundation
+ or Bitstream Inc., respectively. For further information, contact:
+ fonts at gnome dot org.
+
+ \omit
+ http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts
+ \endomit
+
+ See also:
+ \l{http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html}{Vera Open Source Fonts}
+
+ \section1 Cursor
+
+ The Cursor font is distributed with the following declaration:
+
+ \e{Copyright (c) 2000 XFree86, Inc.}
+
+ \section1 DejaVu Fonts
+
+ DejaVu fonts come with the following copyright statement:
+
+ Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Glyphs imported from Arev fonts are (c) Tavmjung Bah (see below)
+
+ \snippet doc/src/snippets/code/doc_src_licenses.qdoc 2
+
+ \section1 Fixed Fonts
+
+ The 5x7 and 6x13 fonts each contain the following copyright notice:
+
+ \e{Public domain font. Share and enjoy.}
+
+ \section1 IBM Courier
+
+ IBM Courier - Copyright (c) IBM Corporation 1990, 1991
+
+ You are hereby granted permission under the terms of the IBM/MIT X Consortium
+ Courier Typefont agreement to execute, reproduce, distribute, display, market,
+ sell and otherwise transfer copies of the IBM Courier font to third parties.
+
+ The font is provided "AS IS" without charge. NO WARRANTIES OR INDEMNIFICATION
+ ARE GIVEN, WHETHER EXPRESS OR IMPLIED INCLUDING, BUT LIMITED TO THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ \section1 Micro
+
+ The Micro font contains the following copyright notice:
+
+ \e{Public domain font. Share and enjoy.}
+
+ \section1 Unifont
+
+ The Unifont font was originally obtained from
+ \l{http://www.czyborra.com/}{Roman Czyborra} under the following license:
+
+ \e{All of my works you find here are freeware. You may freely copy, use, quote,
+ modify or redistribute them as long as you properly attribute my contribution
+ and have given a quick thought about whether Roman might perhaps be interested
+ to read what you did with his stuff. Horizontal rules don't apply.}
+*/
diff --git a/doc/src/linguist-manual.qdoc b/doc/src/linguist-manual.qdoc
new file mode 100644
index 0000000..92e3bed
--- /dev/null
+++ b/doc/src/linguist-manual.qdoc
@@ -0,0 +1,1513 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page linguist-manual.html
+ \title Qt Linguist Manual
+ \ingroup qttools
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage Qt Linguist Manual: Release Manager
+
+ \keyword Qt Linguist
+
+ Qt provides excellent support for translating applications into local
+ languages. This Guide explains how to use Qt's translation tools for
+ each of the roles involved in translating an application. The Guide
+ begins with a brief overview of the issues that must be considered,
+ followed by chapters devoted to each role and the supporting tools
+ provided.
+
+ The \l{linguist-manager.html}{Release Manager} chapter is aimed
+ at the person with overall responsibility for the release of the
+ application. They will typically coordinate the work of the
+ software engineers and the translator. The chapter describes the
+ use of two tools. The \l{lupdate} tool is used to synchronize
+ source code and translations. The \l{lrelease} tool is used to
+ create runtime translation files for use by the released
+ application.
+
+ The \l{linguist-translators.html}{Translators} chapter is for
+ translators. It describes the use of the \QL tool.
+ No computer knowledge beyond the ability to start a program and
+ use a text editor or word processor is required.
+
+ The \l{linguist-programmers.html}{Programmers} chapter is for Qt
+ programmers. It explains how to create Qt applications that are
+ able to use translated text. It also provides guidance on how to
+ help the translator identify the context in which phrases appear.
+ This chapter's three short tutorials cover everything the
+ programmer needs to do.
+
+ \section1 Overview of the Translation Process
+
+ Most of the text that must be translated in an application program
+ consists of either single words or short phrases. These typically
+ appear as window titles, menu items, pop-up help text (balloon help),
+ and labels to buttons, check boxes and radio buttons.
+
+ The phrases are entered into the source code by the programmer in
+ their native language using a simple but special syntax to identify
+ that the phrases require translation. The Qt tools provide context
+ information for each of the phrases to help the translator, and the
+ programmer is able to add additional context information to phrases
+ when necessary. The release manager generates a set of translation
+ files that are produced from the source files and passes these to the
+ translator. The translator opens the translation files using \QL,
+ enters their translations and saves the results back into
+ the translation files, which they pass back to the release manager.
+ The release manager then generates fast compact versions of these
+ translation files ready for use by the application. The tools are
+ designed to be used in repeated cycles as applications change and
+ evolve, preserving existing translations and making it easy to
+ identify which new translations are required. \QL also
+ provides a phrase book facility to help ensure consistent
+ translations across multiple applications and projects.
+
+ Translators and programmers must address a number of issues because
+ of the subtleties and complexities of human language:
+
+ \list
+
+ \o A single phrase may need to be translated into several
+ different forms depending on context, e.g. \e open in English
+ might become \e{\ouml\c{}ffnen}, "open file", or \e aufbauen,
+ "open internet connection", in German.
+
+ \o Keyboard accelerators may need to be changed but without
+ introducing conflicts, e.g. "\&Quit" in English becomes "Avslutt"
+ in Norwegian which doesn't contain a "Q". We cannot use a letter
+ that is already in use - unless we change several accelerators.
+
+ \o Phrases that contain variables, for example, "The 25 files
+ selected will take 63 seconds to process", where the two numbers
+ are inserted programmatically at runtime may need to be reworded
+ because in a different language the word order and therefore the
+ placement of the variables may have to change.
+
+ \endlist
+
+ The Qt translation tools provide clear and simple solutions to these
+ issues.
+
+ Chapters:
+
+ \list
+ \o \l{Qt Linguist Manual: Release Manager}{Release Manager}
+ \o \l{Qt Linguist Manual: Translators}{Translators}
+ \o \l{Qt Linguist Manual: Programmers}{Programmers}
+ \o \l{Qt Linguist Manual: TS File Format}{TS File Format}
+ \endlist
+
+ \QL and \c lupdate are able to import and export XML Localization
+ Interchange File Format (XLIFF) files, making it possible to take
+ advantage of tools and translation services that work with this
+ format. See the \l{Qt Linguist Manual: Translators} {Translators}
+ section for more information on working with these files.
+
+ \table
+
+ \row \o{1,2} \inlineimage wVista-Cert-border-small.png
+ \o \e{Qt Linguist 4.3 is Certified for Windows Vista}
+
+ \row \o Windows Vista and the Windows Vista Start button are
+ trademarks or registered trademarks of Microsoft Corporation in
+ the United States and/or other countries.
+
+ \endtable
+*/
+
+/*!
+ \page linguist-manager.html
+ \title Qt Linguist Manual: Release Manager
+
+ \contentspage {Qt Linguist Manual}{Contents}
+ \previouspage Qt Linguist Manual
+ \nextpage Qt Linguist Manual: Translators
+
+ \keyword lupdate
+ \keyword lrelease
+
+ Two tools are provided for the release manager, \l lupdate and \l
+ lrelease. These tools can process \l qmake project files, or operate
+ directly on the file system.
+
+ \section1 Qt Project Files
+
+ The easiest method to use \l{#lupdate} {lupdate} and \l{#lrelease}
+ {lrelease} is by specifing a \c .pro Qt project file. There must
+ be an entry in the \c TRANSLATIONS section of the project file for
+ each language that is additional to the native language. A typical
+ entry looks like this:
+
+ \snippet examples/linguist/arrowpad/arrowpad.pro 1
+
+ Using a locale within the translation file name is useful for
+ determining which language to load at runtime. This is explained
+ in the \l{linguist-programmers.html} {Programmers} chapter.
+
+ An example of a complete \c .pro file with four translation source
+ files:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+
+ QTextCodec::setCodecForTr() makes it possible to choose a 8-bit
+ encoding for literal strings that appear within \c tr() calls.
+ This is useful for applications whose source language is, for
+ example, Chinese or Japanese. If no encoding is set, \c tr() uses
+ Latin1.
+
+ If you do use the QTextCodec::codecForTr() mechanism in your
+ application, \QL needs you to set the \c CODECFORTR
+ entry in the \c .pro file as well. For example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+
+ Also, if your compiler uses a different encoding for its runtime
+ system as for its source code and you want to use non-ASCII
+ characters in string literals, you will need to set the \c
+ CODECFORSRC. For example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 2
+
+ Microsoft Visual Studio 2005 .NET appears to be the only compiler
+ for which this is necessary. However, if you want to write
+ portable code, we recommend that you avoid non-ASCII characters
+ in your source files. You can still specify non-ASCII characters
+ portably using escape sequences, for example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 3
+
+ \target lupdate manual
+ \section1 lupdate
+
+ Usage: \c {lupdate myproject.pro}
+
+ \l lupdate is a command line tool that finds the translatable
+ strings in the specified source, header and \e {Qt Designer}
+ interface files, and produces or updates \c .ts translation
+ files. The files to process and the files to update can be set at
+ the command line, or provided in a \c .pro file specified as an
+ command line argument. The produced translation files are given to
+ the translator who uses \QL to read the files and insert the
+ translations.
+
+ Companies that have their own translators in-house may find it
+ useful to run \l lupdate regularly, perhaps monthly, as the
+ application develops. This will lead to a fairly low volume of
+ translation work spread evenly over the life of the project and
+ will allow the translators to support a number of projects
+ simultaneously.
+
+ Companies that hire in translators as required may prefer to run
+ \l lupdate only a few times in the application's life cycle, the
+ first time might be just before the first test phase. This will
+ provide the translator with a substantial single block of work and
+ any bugs that the translator detects may easily be included with
+ those found during the initial test phase. The second and any
+ subsequent \l lupdate runs would probably take place during the
+ final beta phase.
+
+ The \c .ts file format is a simple human-readable XML format that
+ can be used with version control systems if required. \c lupdate
+ can also process Localization Interchange File Format (XLIFF)
+ format files; file in this format typically have file names that
+ end with the \c .xlf suffix.
+
+ Pass the \c -help option to \c lupdate to obtain the list of
+ supported options:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 4
+
+ \QL is also able to import and export XLIFF files. See the
+ \l{Qt Linguist Manual: Translators}{Translators} section for more
+ information.
+
+ \section1 lrelease
+
+ Usage: \c {lrelease myproject.pro}
+
+ \l lrelease is a command line tool that produces \c .qm files out
+ of \c .ts files. The \c .qm file format is a compact binary format
+ that is used by the localized application. It provides extremely
+ fast lookups for translations. The \c .ts files \l lrelease
+ processes can be specified at the command line, or given
+ indirectly by a Qt \c .pro project file.
+
+ This tool is run whenever a release of the application is to be
+ made, from initial test version through to final release
+ version. If the \c .qm files are not created, e.g. because an
+ alpha release is required before any translation has been
+ undertaken, the application will run perfectly well using the text
+ the programmers placed in the source files. Once the \c .qm files
+ are available the application will detect them and use them
+ automatically.
+
+ Note that lrelease will only incorporate translations that are
+ marked as "finished". Otherwise the original text will be used
+ instead.
+
+ Pass the \c -help option to \c lrelease to obtain the list of
+ supported options:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 5
+
+ \section1 Missing Translations
+
+ Both \l lupdate and \l lrelease may be used with \c .ts
+ translation source files which are incomplete. Missing
+ translations will be replaced with the native language phrases at
+ runtime.
+*/
+
+/*!
+ \page linguist-translators.html
+ \title Qt Linguist Manual: Translators
+
+ \contentspage {Qt Linguist Manual}{Contents}
+ \previouspage Qt Linguist Manual: Release Manager
+ \nextpage Qt Linguist Manual: Programmers
+
+ Contents
+
+ \tableofcontents
+
+ \section1 The One Minute Guide to Using Qt Linguist
+
+ \QL is a tool for adding translations to Qt applications. Run \QL
+ from the taskbar menu, or by double clicking the desktop icon, or
+ by entering the command \c {linguist} at the command line. Once
+ \QL has started, choose \menu{File|Open} from the \l{menubar}
+ {menu bar} and select a translation source (\c{.ts} file) to
+ load. If you don't have a \c{.ts} file, see the \l {Qt Linguist
+ Manual: Release Manager} {release manager manual} to learn how to
+ generate one.
+
+ The \QL main window is divided into several, dockable subwindows
+ arranged around a central \l{The Translation Area} {translation
+ area}. The \l{Context Window} {context list} is normally shown
+ on the left, and the \l{Sources and Forms Window} {source code},
+ \l{Strings Window} {string list}, and either the \l{Phrases and
+ Guesses Window} {prhrases and guesses}, or the \l{Warnings Window}
+ {warnings} are shown above and below the \l{The Translation Area}
+ {translations area}.
+
+ With a translation file loaded, select a context from the
+ \l{Context Window} {context list} on the left. Selecting a context
+ loads the translatable strings found in that context into the
+ \l{Strings Window} {string list}. Selecting one of the strings
+ copies that string as the \key{Source text} in the \l{The
+ Translation Area} {translation area}. Click in the text entry
+ widget below the copied string and type your translation for that
+ string. To accept the translation, either press the green
+ \key{tick mark} button on the toolbar, or click the icon to the
+ left of the selected source string in the string list. Repeat this
+ process until all strings in the string list are marked with
+ \inlineimage linguist-check-on.png
+ or
+ \inlineimage linguist-check-warning.png
+ . Then select the next context and continue.
+
+ Translation options are shown in the \l{Phrases and Guesses
+ Window} {phrases and guesses window}. If the phrases and guesses
+ window is not visible, click the \key{Phrases and guesses} tab at
+ the bottom of the main window. The phrases and guesses window
+ shows possible translations for the current string. These
+ translation "guesses" have been read from phrase books
+ (\menu{Phrases|Open Phrase Book...}). The current string's
+ current translation is also shown here. To select a guess, double
+ click it in the prases and guesses window or use the keyboard
+ shortcut shown to the right of the guess.
+
+ \QL can automatically check whether your translation strings pass
+ a list of \l{Validation Tests} {validation tests}. Validation test
+ failures are shown in the \l{Warnings Window} {warnings window}.
+ If the warnings window is not visible, click the \key{Warnings}
+ tab at the bottom of the main window.
+
+ Finally, if the source code for the contexts is accessible, the
+ \l{Sources and Forms Window} {source code window} shows the
+ context where the current string is used. If the source code
+ window is not visible, click the \key{Sources and Forms} tab at
+ the bottom of the main window.
+
+ At the end of the session choose \menu{File|Save} from the menu
+ bar and then \menu{File|Exit} to quit.
+
+ \section1 The Qt Linguist Window
+
+ \image linguist-linguist.png "Linguist UI Snapshot"
+
+ This \QL main window is divided into dockable subwindows arranged
+ around a central \l{The Translation Area} {translation area}. The
+ subwindows are: \l{Context Window} {Context}, \l{Sources and Forms
+ Window} {Sources and Forms}, \l{Strings Window} {Strings},
+ \l{Phrases and Guesses Window} {Phrases and guesses}, and
+ \l{Warnings Window} {Warnings} (hidden in the UI snapsot). The
+ translation area is always visible, but the dockable subwindows
+ can be activated or deactivated in the \menu{View|Views} menu, and
+ dragged around by their title bars and dropped in the translation
+ area or even outside the main window.
+
+ \section2 Context Window
+
+ The context window normally appears on the left side of the main
+ window. It lists the contexts in which strings to be translated
+ appear. The column labeled \e{Context} lists the context names in
+ alphabetical order. Each context is the name of a subclass of
+ QObject. There can also be a context for QObject itself, which
+ contains strings passed to the static function QObject::tr().
+ There can also be an \e{<unnamed context>}, which contains strings
+ that aren't in a subclass of QObject.
+
+ To the left of the \e{Context} column is a column labeled
+ \inlineimage linguist-check-obsolete.png
+ . This column uses the following list of icons to summarize the
+ current translation state for each context:
+
+ \list
+
+ \o \inlineimage linguist-check-on.png
+ All strings in the context have been translated, and all the
+ translations passed the \l{Validation Tests} {validation tests}.
+
+ \o \inlineimage linguist-check-warning.png
+ All strings in the context have been translated or marked as
+ translated, but at least one translation failed the \l{Validation
+ Tests} {validation tests}.
+
+ \o \inlineimage linguist-check-off.png
+ At least one string in the context has not been translated or is
+ not marked as translated.
+
+ \o \inlineimage linguist-check-obsolete.png
+ None of the translated strings still appears in the context. This
+ usually means the context itself no longer exists in the
+ application.
+
+ \endlist
+
+ To the right of the \e{Context} column is the \e{Items} column.
+ Each entry in the \e{Items} column is a pair of numbers separated
+ by a slash ("/"). The number to the right of the slash is the
+ number of translatable strings in the context. The number to the
+ left of the slash is the number of those strings that currently
+ have translations. i.e., if the numbers are equal, all the
+ translatable strings in the context have translations.
+
+ In the UI snapshot above, the \bold{MessageEditor} context is
+ selected. Its \e{Items} entry shows \bold{18/18}, which means it
+ has 18 translatable strings and all 18 strings currently have
+ translations. However, the context has been marked with the
+ \inlineimage linguist-check-warning.png
+ icon, which means that at least one of the current translations
+ failed a \l{Validation Tests} {validation test}. In the
+ \l{Strings Window} {strings window} to the right, we see that one
+ of the strings is indeed marked with the
+ \inlineimage linguist-check-warning.png
+ icon.
+
+ The context window is a dockable window. It can be dragged to
+ another position in the main window, or dragged out of the main
+ window to be a separate window. If you move the context window,
+ \QL remembers the new position and puts the context window there
+ whenever you start the program. If the context window has been
+ closed, it can be restored by pressing \key{F6}.
+
+ \section2 Strings Window
+
+ The strings window normally appears on the right in the main
+ window, above the \l{The Translation Area} {translation area}. Its
+ \e{Source text} column lists all the translatable strings found in
+ the current context. Selecting a string makes that string the
+ current string in the \l{The Translation Area} {translation area}.
+
+ To the left of the \e{Source text} column is a column labeled
+ \inlineimage linguist-check-obsolete.png
+ . This column is similar to the one in the \l{Context Window}
+ {context window}, but here you can click on the icon to change the
+ translation acceptance state for each string in the list. A tick
+ mark, green or yellow, means the string has been translated and
+ the user has accepted the translation. A question mark means
+ either that the user has not accepted the string's translation or
+ that the string doesn't have a translation. The table below
+ explains the acceptance states and their icons:
+
+ \target String Translation States
+
+ \table
+ \header
+ \o State
+ \o Icon
+ \o Description
+
+ \row
+ \o Accepted/Correct
+ \o \inlineimage linguist-check-on.png
+ \o The source string has a translation (possibly empty); the user
+ has accepted the translation, and the translation passes all the
+ \l{Validation Tests} {validation tests}. If the translation is
+ empty, the user has chosen to leave it empty. Click the icon to
+ revoke acceptance of the translation and decrement the number of
+ accepted translations in the \e{Items} column of the \l{Context
+ Window} {context list} by 1. The state is reset to
+ \inlineimage linguist-check-off.png
+ if the string has a translation, or to
+ \inlineimage linguist-check-empty.png
+ if the string's translation is empty. If \c{lupdate} changes the
+ contents of a string, its acceptance state is automatically reset
+ to \inlineimage linguist-check-off.png
+ .
+
+ \row
+ \o Accepted/Warnings
+ \o \inlineimage linguist-check-warning.png
+ \o The user has accepted the translation, but the translation does
+ not pass all the \l{Validation Tests} {validation tests}. The
+ validation test failures are shown in the \l{Warnings Window}
+ {warnings window}. Click the icon to revoke acceptance of the
+ translation. The state is reset to \inlineimage linguist-danger.png
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is decremented by 1.
+
+ \row
+ \o Not Accepted
+ \o \inlineimage linguist-check-off.png
+ \o The string has a non-empty translation that passes all the
+ \l{Validation Tests} {validation tests}, but the user has not yet
+ accepted the translation. Click the icon or press \key{Ctrl+Enter}
+ to accept the translation. The state is reset to
+ \inlineimage linguist-check-on.png
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is incremented by 1.
+
+ \row
+ \o No Translation
+ \o \inlineimage linguist-check-empty.png
+ \o The string does not have a translation. Click the icon to
+ accpet the empty translation anyway. The state is reset to
+ \inlineimage linguist-check-on.png
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is incremented by 1.
+
+ \row
+ \o Validation Failures
+ \o \inlineimage linguist-danger.png
+ \o The string has a translation, but the translation does not
+ pass all the \l{Validation Tests} {validation tests}. Validation
+ test failures are shown in the \l{Warnings Window} {warnings}
+ window. Click on the icon or press \key{Ctrl+Return} to accept
+ the translation even with validation failures. The state is
+ reset to \inlineimage linguist-check-warning.png
+ . We recommended editing the translation to fix the causes of
+ the validation failures. The state will reset automatically to
+ \inlineimage linguist-check-off.png
+ , when all the failures have been fixed.
+
+ \row
+ \o Obsolete
+ \o \inlineimage linguist-check-obsolete.png
+ \o The string is obsolete. It is no longer used in the context.
+ See the \l{Qt Linguist Manual: Release Manager} {Release Manager}
+ for instructions on how to remove obsolete messages from the file.
+
+ \endtable
+
+ The string list is a dockable subwindow. If it has been closed,
+ restored it by pressing \key{F7}.
+
+ \section2 The Translation Area
+
+ The translation area is in the middle of the main window, to the
+ right of the \l{Context Window} {context list}. It doesn't have a
+ title bar, so you can't drag it around. Instead, you drag and drop
+ the other subwindows to arrange them around the translation area.
+ The string currently selected in the \l{Strings Window} {string
+ list} appears at the top of the translation area, under the label
+ \menu{Source text}. Note that all blanks in the source text have
+ been replaced by "." so the translator can see the spacing
+ required within the text.
+
+ If the developer provides a \l{QObject::tr()} {disambiguating
+ comment}, it will appear below the source text area, under the
+ label \menu{Developer comments}.
+
+ Below the source text and optional developer comments are two text
+ entry widgets for the translator, one for entering the translation
+ of the current string, and one for the translator to enter an
+ optional comment to be read by other translators.
+
+ When \l{Translating Multiple Languages Simultaneously} {multiple
+ languages} are being translated, this sequence of fields is
+ repeated for each language. See aso \l {Changing the Target
+ Locale}.
+
+ \section2 Phrases and Guesses Window
+
+ If the current string in the \l{Strings Window} {string list}
+ appears in one or more of the \l{Phrase Books} {phrase books}
+ that have been loaded, the current string and its phrase book
+ translation(s) will be listed in this window. If the current
+ string is the same as, or similar to, another string that has
+ already been translated, that other string and its translation
+ will also be listed in this window.
+
+ To use a translation from the Phrases and Guesses Window, you can
+ double click the translation, and it will be copied into the
+ translation area, or you can use the translation's \e{Guess}
+ hotkey on the right. You can also press \key{F10} to move the
+ focus to the Phrases and Guesses Window, then use the up and down
+ arrow keys to find the desired translation, and and then press
+ \key{Enter} to copy it to the translation area. If you decide
+ that you don't want to copy a phrase after all, press \key{Esc} to
+ return the focus to the translation area.
+
+ The Phrases and Guesses Window is a dockable window. If it has
+ been closed, it can be made visible by pressing the \e{Phrases and
+ guesses} tab at the bottom of the window, or by pressing
+ \key{F10}.
+
+ \section2 Sources and Forms Window
+
+ If the source files containing the translatable strings are
+ available to \QL, this window shows the source context of the
+ current string in the \l{Strings Window} {string list}. The source
+ code line containing the current string should be shown and
+ highlighted. If the file containing the source string is not
+ found, the expected absolute file path is shown.
+
+ If the source context shows the wrong source line, it probably
+ means the translation file is out of sync with the source files.
+ To re-sync the translation file with the source files, see the
+ \l{lupdate manual} {lupdate manual}.
+
+ The Sources and Forms window is a dockable window. If it has been
+ closed, it can be made visible again by pressing the \e{Sources
+ and Forms} tab at the bottom of the window, or by pressing
+ \key{F9}.
+
+ \section2 Warnings Window
+
+ If the translation you enter for the current string fails any of
+ the active \l{Validation Tests} {validation tests}, the failures
+ are listed in the warnings window. The first of these failure
+ messages is also shown in the status bar at the bottom of the main
+ window. Note that only \e{active} validation tests are
+ reported. To see which validation tests are currently active, or
+ to activate or deactivate tests, use the \menu{Validation} menu
+ from the \l{menubar}{menu bar}.
+
+ The Warnings window is a dockable window. If it has been closed,
+ it can be made visible by pressing the \e{Warnings} tab at the
+ bottom of the window, or by pressing \key{F8}.
+
+ \target multiple languages
+ \section2 Translating Multiple Languages Simultaneously
+
+ Qt Linguist can now load and edit multiple translation files
+ simultaneously. One use for this is the case where you know two
+ languages better than you know English (Polish and Japanese, say),
+ and you are given an application's Polish translation file and
+ asked to update the application's Japanese translation file. You
+ are more comfortable translating Polish to Japanese than you are
+ translating English to Japanese.
+
+ Below is the UI snapshot shown earlier, but this time with both
+ \e{Polish} and \e{Japanese} translation files loaded.
+
+ \image linguist-linguist_2.png
+
+ The first thing to notice is that the \l{The Translation Area}
+ {translation area} has text editing areas for both Polish and
+ Japanese, and these are color-coded for easier separation.
+ Second, the \l{Context Window} and the \l{Strings Window} both
+ have two clomuns labeled \inlineimage linguist-check-obsolete.png
+ instead of one, and although it may be hard to tell, these columns
+ are also color-coded with the same colors. The left-most column in
+ either case applies to the top-most language area (Polish above)
+ in the \l{The Translation Area} {translation area}, and the
+ right-most column applies to the bottom language area.
+
+ The \e{Items} column in the \l{Context Window} combines the values
+ for both languages. The best way to see this is to look at the
+ value for the \bold{MessageEditor} context, which is the one
+ selected in the snapshot shown above. Recall that in the first UI
+ snapshot (Polish only), the numbers for this context were
+ \e{18/18}, meaning 18 translatable strings had been found in the
+ context, and all 18 strings had accepted translations. In the UI
+ snapshot above, the numbers for the \bold{MessageEditor} context
+ are now \e{1/18}, meaning that both languages have 18 translatable
+ strings for that context, but for Japanese, only 1 of the 18
+ strings has an accepted translation. The
+ \inlineimage linguist-check-off.png
+ icon in the Japanese column means that at least one string in the
+ context doesn't have an accepted Japanese translation yet. In fact,
+ 17 of the 18 strings don't have accepted Japanese translations yet.
+ We will see \e{18/18} in the \e{Items} column when all 18 strings
+ have accepted translations for all the loaded translation files,
+ e.g., both Polish and Japanese in the snapshot.
+
+ \section1 Common Tasks
+
+ \section2 Leaving a Translation for Later
+
+ If you wish to leave a translation press \key{Ctrl+L} (Next
+ Unfinished) to move to the next unfinished translation. To move to
+ the next translation (whether finished or unfinished) press
+ \key{Shift+Ctrl+L}. You can also navigate using the Translation
+ menu. If you want to go to a different context entirely, click the
+ context you want to work on in the Context list, then click the
+ source text in the \l{Strings Window} {string list}.
+
+ \section2 Phrases That Require Multiple Translations Depending on Context
+
+ The same phrase may occur in two or more contexts without conflict. Once
+ a phrase has been translated in one context, \QL notes
+ that the translation has been made and when the translator reaches a
+ later occurrence of the same phrase \QL will provide
+ the previous translation as a possible translation candidate in the
+ \l{Phrases and Guesses Window}.
+
+ If a phrase occurs more than once in a particular context it will
+ only be shown once in \QL's \l{Context Window} {context list} and
+ the translation will be applied to every occurrence within the
+ context. If the same phrase needs to be translated differently
+ within the same context the programmer must provide a
+ distinguishing comment for each of the phrases concerned. If such
+ comments are used the duplicate phrases will appear in the
+ \l{Context Window} {context list}. The programmers comments will
+ appear in the \l{The Translation Area} {translation area} on a
+ light blue background.
+
+ \section2 Changing Keyboard Accelerators
+
+ A keyboard accelerator is a key combination that, when pressed,
+ causes an application to perform an action. There are two kinds of
+ keyboard accelerators: Alt key and Ctrl key accelerators.
+
+ \section3 Alt Key Accellerators
+
+ Alt key accelerators are used in menu selection and on buttons.
+ The underlined character in a menu item or button label signifies
+ that pressing the Alt key with the underlined character will
+ perform the same action as clicking the menu item or pressing the
+ button. For example, most applications have a \e{File} menu with
+ the "F" in the word "File" underlined. In these applications the
+ \e{File} menu can be invoked either by clicking the word "File" on
+ the menu bar or by pressing \e{Alt+F}. To identify an accelerator
+ key in the translation text ("File") precede it with an ampersand,
+ e.g. \e{\&File}. If a string to be translated has an ampersand in
+ it, then the translation for that string should also have an
+ ampersand in it, preferably in front of the same character.
+
+ The meaning of an Alt key accelerator can be determined from the
+ phrase in which the ampersand is embedded. The translator can
+ change the character part of the Alt key accelerator, if the
+ translated phrase does not contain the same character or if that
+ character has already been used in the translation of some other
+ Alt key accelerator. Conflicts with other Alt key accelerators
+ must be avoided within a context. Note that some Alt key
+ accelerators, usually those on the menu bar, may apply in other
+ contexts.
+
+ \section3 Ctrl Key Accelerators
+
+ Ctrl key accelerators can exist independently of any visual
+ control. They are often used to invoke actions in menus that would
+ otherwise require multiple keystrokes or mouse clicks. They may
+ also be used to perform actions that do not appear in any menu or
+ on any button. For example, most applications that have a \e{File}
+ menu have a \e{New} submenu item in the \e{File} menu. The \e{New}
+ item might appear as "\underline{N}ew Ctrl+N" in the \e{File}
+ menu, meaning the \e{New} menu can be invoked by simply pressing
+ \key{Ctrl+N}, instead of either clicking \e{File} with the mouse
+ and then clicking \e{New} with the mouse, or by entering \e{Alt+F}
+ and \e{N}.
+
+ Each Ctrl key accelerator is shown in the \l{Strings Window}
+ {string list} as a separte string, e.g. \key{Ctrl+Enter}. Since
+ the string doesn't have a context to give it meaning, e.g. like
+ the context of the phrase in which an Alt key accelerator appears,
+ the translator must rely on the UI developer to include a
+ \l{QObject::tr()} {disambiguation comment} to explain the action
+ the Ctrl key accelerator is meant to perform. This disambiguating
+ comment (if provided by the developer) will appear under
+ \e{Developer comments} in the \l{The Translation Area}
+ {translation area} under the \e{Source text} area.
+
+ Ideally Ctrl key accelerators are translated simply by copying
+ them directly using \e {Copy from source text} in the
+ \menu{Translation} menu. However, in some cases the character will
+ not make sense in the target language, and it must be
+ changed. Whichever character (alpha or digit) is chosen, the
+ translation must be in the form "Ctrl+" followed by the upper case
+ character. \e{Qt} will automatically display the correct name at
+ runtime. As with Alt key accelerators, if the translator changes
+ the character, the new character must not conflict with any other
+ Ctrl key accelerator.
+
+ \warning Do not translate the "Alt", "Ctrl" or "Shift" parts of
+ the accelerators. \e{Qt} relies on these strings being there. For
+ supported languages, \e {Qt} automatically translates these
+ strings.
+
+ \section2 Handling Numbered Arguments
+
+ Some phrases contain numbered arguments. A numbered argument is a
+ placeholder that will be replaced with text at runtime. A numbered
+ argument appears in a source string as a percent sign followed by
+ a digit. Consider an example: \c{After processing file %1, file %2
+ is next in line}. In this string to be translated, \c{%1} and
+ \c{%2} are numbered arguments. At runtime, \c{%1} and \c{%2} will
+ be replaced with the first and next file names respectively. The
+ same numbered arguments must appear in the translation, but not
+ necessarily in the same order. A German translation of the string
+ might reverse the phrases, e.g. \c{Datei %2 wird bearbeitet, wenn
+ Datei %1 fertig ist}. Both numbered arguments appear in the
+ translation, but in the reverse order. \c{%i} will always be
+ replaced by the same text in the translation stringss, regardless
+ of where argument \e{i} appears in the argument sequence in the
+ source string.
+
+ \section2 Reusing Translations
+
+ If the translated text is similar to the source text, choose the
+ \e {Copy from source text} entry in the \menu Translation menu (press
+ \key{Ctrl+B}) which will copy the source text into the
+ \l{The Translation Area} {translation area}.
+
+ \QL automatically lists possible translations from any open
+ \l{Phrase Books} {phrase books} in the \l{Phrases and Guesses
+ Window}, as well as similar or identical phrases that have already
+ been translated.
+
+ \section2 Changing the Target Locale
+
+ \QL displays the target language in the \l{The Translation Area}
+ {translation area}, and adapts the number of input fields for
+ plural forms accordingly. If not explicitly set, \QL guesses the
+ target language and country by evaluating the translation source
+ file name: E.g. \c app_de.ts sets the target language to German,
+ and \c app_de_ch.ts sets the target language to German and the
+ target country to Switzerland (this also helps loading
+ translations for the current locale automatically; see
+ \l{linguist-programmers.html}{Programmers Manual} for details).
+ If your files do not follow this convention, you can also set the
+ locale information explicitly using \e {Translation File Settings}
+ in the \menu Edit menu.
+
+ \image linguist-translationfilesettings.png
+
+ \section1 Phrase Books
+
+ A \QL phrase book is a set of source phrases, target
+ (translated) phrases, and optional definitions. Typically one phrase book
+ will be created per language and family of applications. Phrase books
+ are used to provide a common set of translations to help ensure consistency.
+ They can also be used to avoid duplication of effort since the translations
+ for a family of applications can be produced once in the phrase book.
+ If the translator reaches an untranslated phrase that is the same as a
+ source phrase in a phrase book, \QL will show the
+ phrase book entry in the \l {Phrases and Guesses Window}.
+
+ \section2 Creating and Editing Phrase Books
+
+ \image linguist-phrasebookdialog.png
+
+ Before a phrase book can be edited it must be created or, if it already
+ exists, opened. Create a new phrase book by selecting
+ \menu{Phrase|New Phrase Book} from the menu bar. You must enter a
+ filename and may change the location of the file if you wish. A newly
+ created phrase book is automatically opened. Open an existing phrase
+ book by choosing \menu{Phrase|Open Phrase Book} from the menu bar.
+
+ The phrase book contents can be displayed and changed by selecting
+ \menu{Phrase|Edit Phrase Book}, and then activating the phrase book you
+ want to work on. This will pop up the Phrase Book Dialog as shown
+ in the image above. To add a new phrase click the \gui{New Phrase}
+ button (or press Alt+N) and type in a new source phrase. Press Tab and
+ type in the translation. Optionally press Tab and enter a definition --
+ this is useful to distinguish different translations of the same source
+ phrase. This process may be repeated as often as necessary. You can delete
+ a phrase by selecting it in the phrases list and clicking
+ Remove Phrase. Click the \gui Close button (press Esc) once you've finished
+ adding (and removing) phrases.
+
+ \section2 Shortcuts for Editing Phrase Books
+
+ You can also create a new phrase book entry directly out of the translation you
+ are working on: Clicking \menu{Phrases|Add to Phrase Book} or pressing
+ \key{Ctrl+T} will add the source text and the content of the first translation
+ field to the current phrase book. If multiple phrase books are loaded,
+ you have to specify the phrase book to add the entry to in a dialogue.
+ If you detect an error in a phrase book entry that is shown in the
+ \l{Phrases and Guesses Window}, you can also edit it in place by right
+ clicking on the entry, and selecting \menu{Edit}. After fixing the error
+ press \key{Return} to leave the editing mode.
+
+ \section2 Batch Translation
+
+ \image linguist-batchtranslation.png
+
+ Use the batch translation feature of \QL to automatically
+ translate source texts that are also in a phrase book. Selecting
+ \menu{Tools|Batch Translation} will show you the batch translation dialog,
+ which let you configure which phrase books to use in what order during the
+ batch translation process. Furthermore you can set whether only entries
+ with no present translation should be considered, and whether batch translated
+ entries should be set to finished (see also \l {String Translation States}).
+
+ \section1 Validation Tests
+
+ \QL provides four kinds of validation tests for translations.
+
+ \list 1
+ \o \e {Accelerator validation} detects translated phrases
+ that do not have an ampersand when the source phrase does and vice
+ versa.
+ \o \e {Punctuation validation} detects differences in the
+ terminating punctuation between source and translated phrases when this
+ may be significant, e.g. warns if the source phrase ends with an
+ ellipsis, exclamation mark or question mark, and the translated phrase
+ doesn't and vice versa.
+ \o \e {Phrases validation} detects source phrases that are
+ also in the phrase book but whose translation differs from that given in
+ the phrase book.
+ \o \e {Place marker validation} detects whether the same variables
+ (like \c %1, \c %2) are used both in the source text and in the translation.
+ \endlist
+
+ Validation may be switched on or off from the menu bar's
+ Validation item or using the toolbar buttons. Unfinished phrases
+ that fail validation are marked with an exclamation mark in the
+ source text pane. Finished phrases will get a yellow tick
+ instead. If you switch validation off and then switch it on later,
+ \QL will recheck all phrases and mark any that fail
+ validation. See also \l{String Translation States}.
+
+ \section1 Form Preview
+
+ \image linguist-previewtool.png
+
+ Forms created by \e{Qt Designer} are stored in special \c .ui files.
+ \QL can make use of these \c .ui files to show the translations
+ done so far on the form itself. This of course requires access to the \c .ui
+ files during the translation process. Activate
+ \menu{Tools|Open/Refresh Form Preview} to open the window shown above.
+ The list of \c .ui files \QL has detected are displayed in the Forms
+ List on the left hand. If the path to the files has changed, you can load
+ the files manually via \menu{File|Open Form...}. Double-click on an entry
+ in the Forms List to display the Form File. Select \e{<No Translation>} from
+ the toolbar to display the untranslated form.
+
+ \section1 Qt Linguist Reference
+
+
+ \section2 File Types
+
+ \QL makes use of four kinds of files:
+
+ \list
+ \o \c .ts \e {translation source files} \BR are human-readable XML
+ files containing source phrases and their translations. These files are
+ usually created and updated by \l lupdate and are specific to an
+ application.
+ \o \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere
+ to the international XML Localization Interchange File Format. \QL
+ can be used to edit XLIFF files generated by other programs. For standard
+ Qt projects, however, only the \c .ts file format is used.
+ \o \c .qm \e {Qt message files} \BR are binary files that contain
+ translations used by an application at runtime. These files are
+ generated by \l lrelease, but can also be generated by \QL.
+ \o \c .qph \e {Qt phrase book files} \BR are human-readable XML
+ files containing standard phrases and their translations. These files
+ are created and updated by \QL and may be used by any
+ number of projects and applications.
+ \endlist
+
+ \target menubar
+ \section2 The Menu Bar
+
+ \image linguist-menubar.png
+
+ \list
+ \o \gui {File}
+ \list
+ \o \gui {Open... Ctrl+O} \BR pops up an open file dialog from which a
+ translation source \c .ts or \c .xlf file can be chosen.
+ \o \gui {Recently opened files} \BR shows the \c .ts files that
+ have been opened recently, click one to open it.
+ \o \gui {Save Ctrl+S} \BR saves the current translation source file.
+ \o \gui {Save As...} \BR pops up a save as file dialog so that the
+ current translation source file may be saved with a different
+ name, format and/or put in a different location.
+ \o \gui {Release} \BR create a Qt message \c .qm file with the same base
+ name as the current translation source file. The release manager's
+ command line tool \l lrelease performs the same function on
+ \e all of an application's translation source files.
+ \o \gui {Release As...} \BR pops up a save as file dialog. The
+ filename entered will be a Qt message \c .qm file of the translation
+ based on the current translation source file. The release manager's
+ command line tool \l lrelease performs the same function on
+ \e all of an application's translation source files.
+ \o \gui {Print... Ctrl+P} \BR pops up a print dialog. If you click
+ OK the translation source and the translations will be printed.
+ \o \gui {Exit Ctrl+Q} \BR closes \QL.
+ \endlist
+
+ \o \gui {Edit}
+ \list
+ \o \gui {Undo Ctrl+Z} \BR undoes the last editing action in the
+ translation pane.
+ \o \gui {Redo Ctrl+Y} \BR redoes the last editing action in the
+ translation pane.
+ \o \gui {Cut Ctrl+X} \BR deletes any highlighted text in the
+ translation pane and saves a copy to the clipboard.
+ \o \gui {Copy Ctrl+C} \BR copies the highlighted text in the
+ translation pane to the clipboard.
+ \o \gui {Paste Ctrl+V} \BR pastes the clipboard text into the
+ translation pane.
+ \omit
+ \o \gui {Delete} \BR deletes the highlighted text in the
+ translation pane.
+ \endomit
+ \o \gui {Select All Ctrl+A} \BR selects all the text in the
+ translation pane ready for copying or deleting.
+ \o \gui {Find... Ctrl+F} \BR pops up the
+ Find dialog. When the dialog pops up
+ enter the text to be found and click the \gui {Find Next} button.
+ Source phrases, translations and comments may be searched.
+ \o \gui {Find Next F3} \BR finds the next occurrence of the text that
+ was last entered in the Find dialog.
+ \o \gui {Search and Translate...} \BR pops up the Search and
+ Replace Dialog. Use this dialog to translate the same text in multiple items.
+ \o \gui {Translation File Settings...} \BR let you configure the target
+ language and the country/region of a translation source file.
+ \endlist
+
+ \o \gui {Translation}
+ \list
+ \o \gui {Prev Unfinished Ctrl+K} \BR moves to the nearest previous
+ unfinished source phrase (unfinished means untranslated or
+ translated but failed validation).
+ \o \gui {Next Unfinished Ctrl+L} \BR moves to the next unfinished source
+ phrase.
+ \o \gui {Prev Shift+Ctrl+K} \BR moves to the previous source phrase.
+ \o \gui {Next Shift+Ctrl+L} \BR moves to the next source phrase.
+ \o \gui {Done \& Next Ctrl+Enter} \BR mark this phrase as 'done'
+ (translated) and move to the next unfinished source phrase.
+ \o \gui {Copy from source text Ctrl+B} \BR copies the source text into
+ the translation.
+ \endlist
+
+ \o \gui {Validation} (See \l{Validation Tests})
+ \list
+ \o \gui {Accelerators} \BR toggles validation on or off for Alt
+ accelerators.
+ \o \gui {Ending Punctuation} \BR switches validation on or off
+ for phrase ending punctuation, e.g. ellipsis, exclamation mark,
+ question mark, etc.
+ \o \gui {Phrase Matches} \BR sets validation on or off for
+ matching against translations that are in the current phrase book.
+ \o \gui {Place Marker Matches} \BR sets validation on or off for
+ the use of the same place markers in the source and translation.
+ \endlist
+
+ \o \gui {Phrases} (See the section \l {Phrase Books} for details.)
+ \list
+
+ \o \gui {New Phrase Book... Ctrl+N} \BR pops up a save as file
+ dialog. You must enter a filename to be used for the phrase
+ book and save the file. Once saved you should open the phrase
+ book to begin using it.
+
+ \o \gui {Open Phrase Book... Ctrl+H} \BR pops up an open file
+ dialog. Find and choose a phrase book to open.
+
+ \o \gui {Close Phrase Book} \BR displays the list of phrase
+ books currently opened. Clicking on one of the items will
+ close the phrase book. If the phrase book has been modified, a
+ dialog box asks whether \QL should save the changes.
+
+ \o \gui {Edit Phrase Book...} \BR displays the list of phrase
+ books currently opened. Clicking on one of the items will open
+ the \l{Creating and Editing Phrase Books}{Phrase Book Dialog}
+ where you can add, edit or delete phrases.
+
+ \o \gui {Print Phrase Book...} \BR displays the list of phrase
+ books currently opened. Clicking on one of the items pops up a
+ print dialog. If you click OK the phrase book will be
+ printed.
+
+ \o \gui {Add to Phrase Book Ctrl+T} \BR Adds the source text
+ and translation currently shown in the \l{The Translation
+ Area} {translation area} to a phrase book. If multiple phrase
+ books are loaded, a dialog box let you specify select one.
+
+ \endlist
+
+ \o \gui {Tools}
+ \list
+
+ \o \gui {Batch Translation...} \BR Opens a \l{Batch
+ Translation}{dialog} which let you automatically insert
+ translations for source texts which are in a phrase book.
+
+ \o \gui {Open/Refresh Form Preview F3} \BR Opens the \l{Form
+ Preview}. This window let you instantly see translations for
+ forms created with \QD. \endlist
+
+ \o \gui {View}
+ \list
+
+ \o \gui {Revert Sorting} \BR puts the items in the \l{Context
+ Window} {context list} and in the \l{Strings Window} {string
+ list} into their original order.
+
+ \o \gui {Display Guesses} \BR turns the display of phrases and
+ guesses on or off.
+
+ \o \gui {Statistics} \BR toggles the visibility of the
+ Statistics dialog.
+
+ \o \gui {Views} \BR toggles the visibility of the \l{Context
+ Window}, \l{Strings Window}, \l{Phrases and Guesses Window},
+ \l{Warnings Window}, or \l{Sources and Forms Window}.
+
+ \o \gui {Toolbars} \BR toggles the visibility of the different
+ toolbars.
+
+ \endlist
+
+ \o \gui {Help}
+ \list
+ \o \gui {Manual F1} \BR opens this manual.
+ \o \gui {About Qt Linguist} \BR Shows information about \QL.
+ \o \gui {About Qt} \BR Shows information about \e{Qt}.
+ \o \gui {What's This? Shift+F1} \BR Click on one item in the main window
+ to get additional information about it.
+ \endlist
+
+ \endlist
+
+ \section2 The Toolbar
+
+ \image linguist-toolbar.png
+
+ \list
+ \o \inlineimage linguist-fileopen.png
+ \BR
+ Pops up the open file dialog to open a new translation source \c .ts
+ file.
+
+ \o \inlineimage linguist-filesave.png
+ \BR
+ Saves the current translation source \c .ts file.
+
+ \o \inlineimage linguist-fileprint.png
+ \BR
+ Prints the current translation source \c .ts file.
+
+ \o \inlineimage linguist-phrasebookopen.png
+ \BR
+ Pops up the file open dialog to open a new phrase book \c .qph file.
+
+ \o \inlineimage linguist-editundo.png
+ \BR
+ Undoes the last editing action in the translation pane.
+
+ \o \inlineimage linguist-editredo.png
+ \BR
+ Redoes the last editing action in the translation pane.
+
+ \o \inlineimage linguist-editcut.png
+ \BR
+ Deletes any highlighted text in the translation pane and save a copy to
+ the clipboard.
+
+ \o \inlineimage linguist-editcopy.png
+ \BR
+ Copies the highlighted text in the translation pane to the clipboard.
+
+ \o \inlineimage linguist-editpaste.png
+ \BR
+ Pastes the clipboard text into the translation pane.
+
+ \o \inlineimage linguist-editfind.png
+ \BR
+ Pops up the Find dialog .
+
+ \o \inlineimage linguist-prev.png
+ \BR
+ Moves to the previous source phrase.
+
+ \o \inlineimage linguist-next.png
+ \BR
+ Moves to the next source phrase.
+
+ \o \inlineimage linguist-prevunfinished.png
+ \BR
+ Moves to the previous unfinished source phrase.
+
+ \o \inlineimage linguist-nextunfinished.png
+ \BR
+ Moves to the next unfinished source phrase.
+
+ \o \inlineimage linguist-doneandnext.png
+ \BR
+ Marks the phrase as 'done' (translated) and move to the next
+ unfinished source phrase.
+
+ \o \inlineimage linguist-validateaccelerators.png
+ \BR
+ Toggles accelerator validation on and off.
+
+ \o \inlineimage linguist-validatepunctuation.png
+ \BR
+ Toggles phrase ending punctuation validation on and off.
+
+ \o \inlineimage linguist-validatephrases.png
+ \BR
+ Toggles phrase book validation on or off.
+
+ \o \inlineimage linguist-validateplacemarkers.png
+ \BR
+ Toggles place marker validation on or off.
+
+ \endlist
+
+*/
+
+/*!
+ \page linguist-programmers.html
+ \title Qt Linguist Manual: Programmers
+
+ \contentspage {Qt Linguist Manual}{Contents}
+ \previouspage Qt Linguist Manual: Translators
+ \nextpage Qt Linguist Manual: TS File Format
+
+ Support for multiple languages is extremely simple in Qt
+ applications, and adds little overhead to the programmer's workload.
+
+ Qt minimizes the performance cost of using translations by
+ translating the phrases for each window as they are created. In most
+ applications the main window is created just once. Dialogs are often
+ created once and then shown and hidden as required. Once the initial
+ translation has taken place there is no further runtime overhead for
+ the translated windows. Only those windows that are created,
+ destroyed and subsequently created will have a translation
+ performance cost.
+
+ Creating applications that can switch language at runtime is possible
+ with Qt, but requires a certain amount of programmer intervention and
+ will of course incur some runtime performance cost.
+
+ \section1 Making the Application Translation-Aware
+
+ Programmers should make their application look for and load the
+ appropriate translation file and mark user-visible text and Ctrl
+ keyboard accelerators as targets for translation.
+
+ Each piece of text that requires translating requires context to help
+ the translator identify where in the program the text occurs. In the
+ case of multiple identical texts that require different translations,
+ the translator also requires some information to disambiguate the
+ source texts. Marking text for translation will automatically cause
+ the class name to be used as basic context information. In some cases
+ the programmer may be required to add additional information to help
+ the translator.
+
+ \section2 Creating Translation Files
+
+ Translation files consist of all the user-visible text and Ctrl key
+ accelerators in an application and translations of that text.
+ Translation files are created as follows:
+
+ \list 1
+ \o Run \l lupdate initially to generate the first set of \c .ts
+ translation source files with all the user-visible text but no
+ translations.
+ \o The \c .ts files are given to the translator who adds translations
+ using \QL. \QL takes care of any changed
+ or deleted source text.
+ \o Run \l lupdate to incorporate any new text added to the
+ application. \l lupdate synchronizes the user-visible text from the
+ application with the translations; it does not destroy any data.
+ \o Steps 2 and 3 are repeated as often as necessary.
+ \o When a release of the application is needed \l lrelease is run to
+ read the \c .ts files and produce the \c .qm files used by the
+ application at runtime.
+ \endlist
+
+ For \l lupdate to work successfully, it must know which translation
+ files to produce. The files are simply listed in the application's \c
+ .pro Qt project file, for example:
+
+ \snippet examples/linguist/arrowpad/arrowpad.pro 1
+
+ If your sources contain genuine non-Latin1 strings, \l lupdate needs
+ to be told about it in the \c .pro file by using, for example,
+ the following line:
+
+ \code
+ CODECFORTR = UTF-8
+ \endcode
+
+ See the \l lupdate and \l lrelease sections.
+
+ \section2 Loading Translations
+
+ \snippet examples/linguist/hellotr/main.cpp 1
+ \snippet examples/linguist/hellotr/main.cpp 3
+
+ This is how a simple \c main() function of a Qt application begins.
+
+ \snippet examples/linguist/hellotr/main.cpp 1
+ \snippet examples/linguist/hellotr/main.cpp 4
+
+ For a translation-aware application a translator object is created, a
+ translation is loaded and the translator object installed into the
+ application.
+
+ \snippet examples/linguist/arrowpad/main.cpp 0
+ \snippet examples/linguist/arrowpad/main.cpp 1
+
+ For non-Latin1 strings in the sources you will also need for example:
+
+ \code
+ QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
+ \endcode
+
+ In production applications a more flexible approach, for example,
+ loading translations according to locale, might be more appropriate. If
+ the \c .ts files are all named according to a convention such as
+ \e appname_locale, e.g. \c tt2_fr, \c tt2_de etc, then the
+ code above will load the current locale's translation at runtime.
+
+ If there is no translation file for the current locale the application
+ will fall back to using the original source text.
+
+ Note that if you need to programmatically add translations at
+ runtime, you can reimplement QTranslator::translate().
+
+ \section2 Making the Application Translate User-Visible Strings
+
+ User-visible strings are marked as translation targets by wrapping them
+ in a \c tr() call, for example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 6
+
+ would become
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 7
+
+ All QObject subclasses that use the \c Q_OBJECT macro implement
+ the \c tr() function.
+
+ Although the \c tr() call is normally made directly since it is
+ usually called as a member function of a QObject subclass, in
+ other cases an explicit class name can be supplied, for example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 8
+
+ or
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9
+
+ \section2 Distinguishing Identical Strings That Require Different Translations
+
+ The \l lupdate program automatically provides a \e context for every
+ source text. This context is the class name of the class that contains
+ the \c tr() call. This is sufficient in the vast majority of cases.
+ Sometimes however, the translator will need further information to
+ uniquely identify a source text; for example, a dialog that contained
+ two separate frames, each of which contained an "Enabled" option would
+ need each identified because in some languages the translation would
+ differ between the two. This is easily achieved using the
+ two argument form of the \c tr() call, e.g.
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 10
+
+ and
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 11
+
+ Ctrl key accelerators are also translatable:
+
+ \snippet examples/linguist/trollprint/mainwindow.cpp 2
+
+ It is strongly recommended that the two argument form of \c tr() is used
+ for Ctrl key accelerators. The second argument is the only clue the
+ translator has as to the function performed by the accelerator.
+
+ \section2 Helping the Translator with Navigation Information
+
+ In large complex applications it may be difficult for the translator to
+ see where a particular source text comes from. This problem can be
+ solved by adding a comment using the keyword \e TRANSLATOR which
+ describes the navigation steps to reach the text in question; e.g.
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 12
+
+ These comments are particularly useful for widget classes.
+
+ \section2 Handling Plural Forms
+
+ Qt includes a \c tr() overload that will make it very easy to
+ write "plural-aware" internationalized applications. This overload
+ has the following signature:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 17
+
+ Depending on the value of \c n, the \c tr() function will return a different
+ translation, with the correct grammatical number for the target language.
+ Also, any occurrence of \c %n is replaced with \c{n}'s value. For example:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 18
+
+ If a French translation is loaded, this will expand to "0 item
+ remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
+ remplac\unicode{233}s", etc., depending on \c{n}'s value.
+ And if no translation is loaded, the orignal string is used, with \c %n
+ replaced with count's value (e.g., "6 item(s) replaced").
+
+ To handle plural forms in the native language, you need to load a
+ translation file for this language, too. \l lupdate has the
+ \c -pluralonly command line option, which allows the creation of
+ \c .ts files containing only entries with plural forms.
+
+ See the \l{http://doc.trolltech.com/qq/}{Qt Quarterly} Article
+ \l{http://doc.trolltech.com/qq/qq19-plurals.html}{Plural Forms in Translations}
+ for further details on this issue.
+
+ \section2 Coping With C++ Namespaces
+
+ C++ namespaces and the \c {using namespace} statement can confuse
+ \l lupdate. It will interpret \c MyClass::tr() as meaning just
+ that, not as \c MyNamespace::MyClass::tr(), even if \c MyClass is
+ defined in the \c MyNamespace namespace. Runtime translation of
+ these strings will fail because of that.
+
+ You can work around this limitation by putting a \e TRANSLATOR
+ comment at the beginning of the source files that use \c
+ MyClass::tr():
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 13
+
+ After the comment, all references to \c MyClass::tr() will be
+ understood as meaning \c MyNamespace::MyClass::tr().
+
+ \section2 Translating Text That is Outside of a QObject Subclass
+
+ \section3 Using QCoreApplication::translate()
+
+ If the quoted text is not in a member function of a QObject subclass,
+ use either the tr() function of an appropriate class, or the
+ QCoreApplication::translate() function directly:
+
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 14
+
+ \section3 Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()
+
+ If you need to have translatable text completely outside a function,
+ there are two macros to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP().
+ These macros merely mark the text for extraction by \l{lupdate}.
+ The macros expand to just the text (without the context).
+
+ Example of QT_TR_NOOP():
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 15
+
+ Example of QT_TRANSLATE_NOOP():
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 16
+
+ \section1 Tutorials
+
+ Three tutorials are presented:
+
+ \list 1
+ \o \l{linguist/hellotr}{Hello tr()} demonstrates the creation of
+ a \l QTranslator object. It also shows the simplest use of
+ the \c tr() function to mark user-visible source text for
+ translation.
+
+ \o \l{linguist/arrowpad}{Arrow Pad} explains how to make the application load the
+ translation file applicable to the current locale. It also shows the
+ use of the two-argument form of \c tr() which provides additional
+ information to the translator.
+
+ \o \l{linguist/trollprint}{Troll Print} explains how
+ identical source texts can be distinguished even when they occur in
+ the same context. This tutorial also discusses how the translation
+ tools help minimize the translator's work when an application is
+ upgraded.
+ \endlist
+
+ These tutorials cover all that you need to know to prepare your Qt
+ applications for translation.
+
+ At the beginning of a project add the translation source files to be
+ used to the project file and add calls to \l lupdate and \l lrelease to
+ the makefile.
+
+ During the project all the programmer must do is wrap any user-visible
+ text in \c tr() calls. They should also use the two argument form for
+ Ctrl key accelerators, or when asked by the translator for the cases
+ where the same text translates into two different forms in the same
+ context. The programmer should also include \c TRANSLATION comments to
+ help the translator navigate the application.
+*/
+
+/*!
+ \page linguist-ts-file-format.html
+ \title Qt Linguist Manual: TS File Format
+
+ \contentspage {Qt Linguist Manual}{Contents}
+ \previouspage Qt Linguist Manual: Programmers
+
+ The \c .ts file format used by \QL is described by the
+ \l{http://www.w3.org/TR/1998/REC-xml-19980210}{DTD} presented below,
+ which we include for your convenience. Be aware that the format
+ may change in future Qt releases.
+
+ \quotefile tools/linguist/shared/ts.dtd
+
+*/
diff --git a/doc/src/mac-differences.qdoc b/doc/src/mac-differences.qdoc
new file mode 100644
index 0000000..573e62d
--- /dev/null
+++ b/doc/src/mac-differences.qdoc
@@ -0,0 +1,339 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page mac-differences.html
+ \title Qt for Mac OS X - Specific Issues
+ \brief A description of issues with Qt that are specific to Mac OS X.
+ \ingroup platform-notes
+
+ This file outlines known issues and possible workarounds when
+ using Qt on Mac OS X. Contact Qt's technical support team if you find
+ additional issues which are not covered here. (See also the
+ document \l{qtmac-as-native.html} {Qt is Mac OS X Native}.)
+
+ \tableofcontents
+
+ \section1 GUI Applications
+
+ Mac OS X handles most applications as "bundles". A bundle is a
+ directory structure that groups related files together (e.g.,
+ widgets.app/). GUI applications in particular must be run from a
+ bundle or by using the open(1), because Mac OS X needs the bundle
+ to dispatch events correctly, as well as for accessing the menu
+ bar.
+
+ If you are using older versions of GDB you must run with the full
+ path to the executable. Later versions allow you to pass the
+ bundle name on the command line.
+
+ \section1 Painting
+
+ Mac OS X always double buffers the screen so the
+ Qt::WA_PaintOnScreen attribute has no effect. Also it is
+ impossible to paint outside of a paint event so
+ Qt::WA_PaintOutsidePaintEvent has no effect either.
+
+ \section1 Library Support
+
+ \section2 Qt libraries as frameworks
+
+ By default, Qt is built as a set of frameworks. Frameworks is the
+ Mac OS X "preferred" way of distributing libraries. There are
+ definite advantages to using them. See
+ \l{http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/index.html}
+ {Apple's Framework Programming Guide} for more information.
+
+ In general, this shouldn't be an issue because qmake takes care of
+ the specifics for you. The
+ \l{http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/index.html}
+ {Framework Programming Guide} discusses issues to keep in mind
+ when choosing frameworks over the more typical, dynamic libraries.
+ However, one point to remember is: \bold {Frameworks always link
+ with "release" versions of libraries}.
+
+ If you actually want to use a \e{debug} version of a Qt framework,
+ you must ensure that your application actually loads that debug
+ version. This is often done by using the DYLD_IMAGE_SUFFIX
+ environment variables, but that way often doesn't work so well.
+ Instead, you can temporarily swap your debug and release versions,
+ which is documented in
+ \l{http://developer.apple.com/technotes/tn2004/tn2124.html#SECJUSTONELIB}
+ {Apple's "Debugging Magic" technical note}.
+
+ If you don't want to use frameworks, simply configure Qt with
+ \c{-no-framework}.
+
+ \section2 Bundle-Based Libraries
+
+ If you want to use some dynamic libraries in your Mac OS X
+ application bundle (the application directory), create a
+ subdirectory named "Frameworks" in the application bundle
+ directory and place your dynamic libraries there. The application
+ will find a dynamic library if it has the install name
+ \e{@executable_path/../Frameworks/libname.dylib}.
+
+ If you use \c qmake and Makefiles, use the \c QMAKE_LFLAGS_SONAME setting:
+
+ \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 0
+
+ Alternatively, you can modify the install name using the
+ install_name_tool(1) on the command line. See its manpage for more
+ information.
+
+ Note that the \c DYLD_LIBRARY_PATH environment variable will
+ override these settings, and any other default paths, such as a
+ lookup of dynamic libraries inside \c /usr/lib and similar default
+ locations.
+
+ \section2 Combining Libraries
+
+ If you want to build a new dynamic library combining the Qt 4
+ dynamic libraries, you need to introduce the \c{ld -r} flag. Then
+ relocation information is stored in the the output file, so that
+ this file could be the subject of another \c ld run. This is done
+ by setting the \c -r flag in the \c .pro file, and the \c LFLAGS
+ settings.
+
+ \section2 Initialization Order
+
+ dyld(1) calls global static initializers in the order they are
+ linked into your application. If a library links against Qt and
+ references globals in Qt (from global initializers in your own
+ library), be sure to link your application against Qt before
+ linking it against the library. Otherwise the result will be
+ undefined because Qt's global initializers have not been called
+ yet.
+
+ \section1 Compile-Time Flags
+
+ The follewing flags are helpful when you want to define Mac OS X specific
+ code:
+
+ \list
+
+ \o Q_OS_DARWIN is defined when Qt detects you are on a
+ Darwin-based system (including the Open Source version)
+
+ \o Q_WS_MAC is defined when the Mac OS X GUI is present.
+
+ \o QT_MAC_USE_COCOA is defined when Qt is built to use the Cocoa framework.
+ If it is not present, then Qt is using Carbon.
+
+ \endlist
+
+ A additional flag, Q_OS_MAC, is defined as a convenience whenever
+ Q_OS_DARWIN is defined.
+
+ If you want to define code for specific versions of Mac OS X, use
+ the availability macros defined in /usr/include/AvailabilityMacros.h.
+
+ See QSysInfo for information on runtime version checking.
+
+ \section1 Mac OS X Native API Access
+
+ \section2 Accessing the Bundle Path
+
+ The Mac OS X application is actually a directory (ending with \c
+ .app). This directory contains sub-directories and files. It may
+ be useful to place items (e.g. plugins, online-documentation,
+ etc.) inside this bundle. You might then want to find out where
+ the bundle resides on the disk. The following code returns the
+ path of the application bundle:
+
+ \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 1
+
+ Note: When OS X is set to use Japanese, a bug causes this sequence
+ to fail and return an empty string. Therefore, always test the
+ returned string.
+
+ For more information about using the CFBundle API, see
+ \l{http://developer.apple.com/documentation/CoreFoundation/Reference/CFBundleRef/index.html}
+ {Apple's Developer Website}.
+
+ \section2 Translating the Application Menu and Native Dialogs
+
+ The items in the Application Menu will be merged correctly for
+ your localized application, but they will not show up translated
+ until you
+ \l{http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Concepts/BundleAnatomy.html#//apple_ref/doc/uid/20001119-105003-BAJFDAAG}
+ {add a localized resource folder} to the application bundle.
+ The main thing you need to do is create a file called
+ locversion.plist. Here is an example for Norwegian:
+
+ \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 2
+
+ Now when you run the application with your preferred language set
+ to Norwegian, you should see menu items like "Avslutt" instead of
+ "Quit".
+
+ \section1 User Interface
+
+ \section2 Right-Mouse Clicks
+
+ If you want to provide right-mouse click support for Mac OS X, use
+ the QContextMenuEvent class. This will map to a context menu
+ event, i.e., a menu that will display a pop-up selection. This is
+ the most common use of right-mouse clicks, and maps to a
+ control-click with the Mac OS X one-button mouse support.
+
+ \section2 Menu Bar
+
+ Qt will automatically detect your menu bars for you and turn
+ them into Mac native menu bars. Fitting this into your existing Qt
+ application will normally be automatic. However, if you have
+ special needs, the Qt implementation currently selects a menu
+ bar by starting at the active window
+ (i.e. QApplication::activeWindow()) and applying the following
+ tests:
+
+ \list 1
+
+ \i If the window has a QMenuBar, then it is used.
+
+ \i If the window is modal, then its menu bar is used. If no menu
+ bar is specified, then a default menu bar is used (as
+ documented below).
+
+ \i If the window has no parent, then the default menu bar is used
+ (as documented below).
+
+ \endlist
+
+ These tests are followed all the way up the parent window chain
+ until one of the above rules is satisifed. If all else fails, a
+ default menu bar will be created. Note the default menu bar on
+ Qt is an empty menu bar. However, you can create a different
+ default menu bar by creating a parentless QMenuBar. The first one
+ created will be designated the default menu bar and will be used
+ whenever a default menu bar is needed.
+
+ Note that using native menu bars introduces certain limitations on
+ Qt classes. See the \l{#Limitations}{list of limitations} below
+ for more information about these.
+
+ \section2 Special Keys
+
+ To provide the expected behavior for Qt applications on Mac OS X,
+ the Qt::Meta, Qt::MetaModifier, and Qt::META enum values
+ correspond to the Control keys on the standard Macintosh keyboard,
+ and the Qt::Control, Qt::ControlModifier, and Qt::CTRL enum values
+ correspond to the Command keys.
+
+ \section1 Limitations
+
+ \section2 Menu Actions
+
+ \list
+
+ \o Actions in a QMenu with accelerators that have more than one
+ keystroke (QKeySequence) will not display correctly, when the
+ QMenu is translated into a Mac native menu bar. The first key
+ will be displayed. However, the shortcut will still be
+ activated as on all other platforms.
+
+ \o QMenu objects used in the native menu bar are not able to
+ handle Qt events via the normal event handlers.
+ For Carbon, you will have to install a Carbon event handler on
+ the menu bar in order to receive Carbon events that are similar
+ to \l{QMenu::}{showEvent()}, \l{QMenu::}{hideEvent()}, and
+ \l{QMenu::}{mouseMoveEvent()}. For Cocoa, you will have to
+ install a delegate on the menu itself to be notified of these
+ changes. Alternatively, consider using the QMenu::aboutToShow()
+ and QMenu::aboutToHide() signals to keep track of menu visibility;
+ these provide a solution that should work on all platforms
+ supported by Qt.
+
+ \endlist
+
+ \section2 Native Widgets
+
+ Qt has support for sheets and drawers, represented in the
+ window flags by Qt::Sheet and Qt::Drawer respectiviely. Brushed
+ metal windows can also be created by using the
+ Qt::WA_MacMetalStyle window attribute.
+
+*/
+
+/*!
+ \page qt-mac-cocoa-licensing.html
+
+ \title Contributions to the Following QtGui Files: qapplication_cocoa_p.h, qapplication_mac.mm, qdesktopwidget_mac.mm qeventdispatcher_mac.mm qeventdispatcher_mac_p.h qmacincludes_mac.h qt_cocoa_helpers.mm qt_cocoa_helpers_p.h qwidget_mac.mm qsystemtrayicon_mac.mm
+
+ \contentspage {Other Licenses Used in Qt}{Contents}
+
+ \ingroup licensing
+ \brief License information for contributions by Apple, Inc. to specific parts of the Qt/Mac Cocoa port.
+
+ \legalese
+
+ Copyright (C) 2007-2008, Apple, Inc.
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ \list
+ \o Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ \o Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ \o Neither the name of Apple, Inc. nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ \endlist
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ \endlegalese
+*/
diff --git a/doc/src/mainclasses.qdoc b/doc/src/mainclasses.qdoc
new file mode 100644
index 0000000..da041fa
--- /dev/null
+++ b/doc/src/mainclasses.qdoc
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page mainclasses.html
+ \title Qt's Main Classes
+ \ingroup classlists
+
+ These are the most frequently used Qt classes. For the complete
+ list see \link classes.html Qt's Classes \endlink.
+
+ \generatelist mainclasses
+*/
diff --git a/doc/src/metaobjects.qdoc b/doc/src/metaobjects.qdoc
new file mode 100644
index 0000000..4c91a90
--- /dev/null
+++ b/doc/src/metaobjects.qdoc
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page metaobjects.html
+ \title Meta-Object System
+ \brief An overview of Qt's meta-object system and introspection capabilities.
+ \ingroup architecture
+ \keyword meta-object
+
+ Qt's meta-object system provides the signals and slots mechanism for
+ inter-object communication, run-time type information, and the dynamic
+ property system.
+
+ The meta-object system is based on three things:
+
+ \list 1
+ \o The \l QObject class provides a base class for objects that can
+ take advantage of the meta-object system.
+ \o The Q_OBJECT macro inside the private section of the class
+ declaration is used to enable meta-object features, such as
+ dynamic properties, signals, and slots.
+ \o The \l{moc}{Meta-Object Compiler} (\c moc) supplies each
+ QObject subclass with the necessary code to implement
+ meta-object features.
+ \endlist
+
+ The \c moc tool reads a C++ source file. If it finds one or more
+ class declarations that contain the Q_OBJECT macro, it
+ produces another C++ source file which contains the meta-object
+ code for each of those classes. This generated source file is
+ either \c{#include}'d into the class's source file or, more
+ usually, compiled and linked with the class's implementation.
+
+ In addition to providing the \l{signals and slots} mechanism for
+ communication between objects (the main reason for introducing
+ the system), the meta-object code provides the following
+ additional features:
+
+ \list
+ \o QObject::metaObject() returns the associated
+ \l{QMetaObject}{meta-object} for the class.
+ \o QMetaObject::className() returns the class name as a
+ string at run-time, without requiring native run-time type information
+ (RTTI) support through the C++ compiler.
+ \o QObject::inherits() function returns whether an object is an
+ instance of a class that inherits a specified class within the
+ QObject inheritance tree.
+ \o QObject::tr() and QObject::trUtf8() translate strings for
+ \l{Internationalization with Qt}{internationalization}.
+ \o QObject::setProperty() and QObject::property()
+ dynamically set and get properties by name.
+ \o QMetaObject::newInstance() constructs a new instance of the class.
+ \endlist
+
+ \target qobjectcast
+ It is also possible to perform dynamic casts using qobject_cast()
+ on QObject classes. The qobject_cast() function behaves similarly
+ to the standard C++ \c dynamic_cast(), with the advantages
+ that it doesn't require RTTI support and it works across dynamic
+ library boundaries. It attempts to cast its argument to the pointer
+ type specified in angle-brackets, returning a non-zero pointer if the
+ object is of the correct type (determined at run-time), or 0
+ if the object's type is incompatible.
+
+ For example, let's assume \c MyWidget inherits from QWidget and
+ is declared with the Q_OBJECT macro:
+
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 0
+
+ The \c obj variable, of type \c{QObject *}, actually refers to a
+ \c MyWidget object, so we can cast it appropriately:
+
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 1
+
+ The cast from QObject to QWidget is successful, because the
+ object is actually a \c MyWidget, which is a subclass of QWidget.
+ Since we know that \c obj is a \c MyWidget, we can also cast it to
+ \c{MyWidget *}:
+
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 2
+
+ The cast to \c MyWidget is successful because qobject_cast()
+ makes no distinction between built-in Qt types and custom types.
+
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 3
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 4
+
+ The cast to QLabel, on the other hand, fails. The pointer is then
+ set to 0. This makes it possible to handle objects of different
+ types differently at run-time, based on the type:
+
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 5
+ \snippet doc/src/snippets/qtcast/qtcast.cpp 6
+
+ While it is possible to use QObject as a base class without the
+ Q_OBJECT macro and without meta-object code, neither signals
+ and slots nor the other features described here will be available
+ if the Q_OBJECT macro is not used. From the meta-object
+ system's point of view, a QObject subclass without meta code is
+ equivalent to its closest ancestor with meta-object code. This
+ means for example, that QMetaObject::className() will not return
+ the actual name of your class, but the class name of this
+ ancestor.
+
+ Therefore, we strongly recommend that all subclasses of QObject
+ use the Q_OBJECT macro regardless of whether or not they
+ actually use signals, slots, and properties.
+
+ \sa QMetaObject, {Qt's Property System}, {Signals and Slots}
+*/
diff --git a/doc/src/moc.qdoc b/doc/src/moc.qdoc
new file mode 100644
index 0000000..b7283c4
--- /dev/null
+++ b/doc/src/moc.qdoc
@@ -0,0 +1,336 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page moc.html
+ \title Using the Meta-Object Compiler (moc)
+ \ingroup buildsystem
+ \ingroup qttools
+ \keyword moc
+
+ The Meta-Object Compiler, \c moc, is the program that handles
+ \l{Meta-Object System}{Qt's C++ extensions}.
+
+ The \c moc tool reads a C++ header file. If it finds one or more
+ class declarations that contain the Q_OBJECT macro, it
+ produces a C++ source file containing the meta-object code for
+ those classes. Among other things, meta-object code is required
+ for the signals and slots mechanism, the run-time type information,
+ and the dynamic property system.
+
+ The C++ source file generated by \c moc must be compiled and
+ linked with the implementation of the class.
+
+ If you use \l qmake to create your makefiles, build rules will be
+ included that call the moc when required, so you will not need to
+ use the moc directly. For more background information on \c moc,
+ see \l{Why Doesn't Qt Use Templates for Signals and Slots?}
+
+ \section1 Usage
+
+ \c moc is typically used with an input file containing class
+ declarations like this:
+
+ \snippet doc/src/snippets/moc/myclass1.h 0
+
+ In addition to the signals and slots shown above, \c moc also
+ implements object properties as in the next example. The
+ Q_PROPERTY() macro declares an object property, while
+ Q_ENUMS() declares a list of enumeration types within the class
+ to be usable inside the \l{Qt's Property System}{property
+ system}.
+
+ In the following example, we declare a property of the
+ enumeration type \c Priority that is also called \c priority and
+ has a get function \c priority() and a set function \c
+ setPriority().
+
+ \snippet doc/src/snippets/moc/myclass2.h 0
+
+ The Q_FLAGS() macro declares enums that are to be used
+ as flags, i.e. OR'd together. Another macro, Q_CLASSINFO(),
+ allows you to attach additional name/value pairs to the class's
+ meta-object:
+
+ \snippet doc/src/snippets/moc/myclass3.h 0
+
+ The output produced by \c moc must be compiled and linked, just
+ like the other C++ code in your program; otherwise, the build
+ will fail in the final link phase. If you use \c qmake, this is
+ done automatically. Whenever \c qmake is run, it parses the
+ project's header files and generates make rules to invoke \c moc
+ for those files that contain a Q_OBJECT macro.
+
+ If the class declaration is found in the file \c myclass.h, the
+ moc output should be put in a file called \c moc_myclass.cpp.
+ This file should then be compiled as usual, resulting in an
+ object file, e.g., \c moc_myclass.obj on Windows. This object
+ should then be included in the list of object files that are
+ linked together in the final building phase of the program.
+
+ \section1 Writing Make Rules for Invoking \c moc
+
+ For anything but the simplest test programs, it is recommended
+ that you automate running the \c{moc}. By adding some rules to
+ your program's makefile, \c make can take care of running moc
+ when necessary and handling the moc output.
+
+ We recommend using the \l qmake makefile generation tool for
+ building your makefiles. This tool generates a makefile that does
+ all the necessary \c moc handling.
+
+ If you want to create your makefiles yourself, here are some tips
+ on how to include moc handling.
+
+ For Q_OBJECT class declarations in header files, here is a
+ useful makefile rule if you only use GNU make:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 0
+
+ If you want to write portably, you can use individual rules of
+ the following form:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 1
+
+ You must also remember to add \c moc_foo.cpp to your \c SOURCES
+ (substitute your favorite name) variable and \c moc_foo.o or \c
+ moc_foo.obj to your \c OBJECTS variable.
+
+ Both examples assume that \c $(DEFINES) and \c $(INCPATH) expand
+ to the define and include path options that are passed to the C++
+ compiler. These are required by \c moc to preprocess the source
+ files.
+
+ While we prefer to name our C++ source files \c .cpp, you can use
+ any other extension, such as \c .C, \c .cc, \c .CC, \c .cxx, and
+ \c .c++, if you prefer.
+
+ For Q_OBJECT class declarations in implementation (\c .cpp)
+ files, we suggest a makefile rule like this:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 2
+
+ This guarantees that make will run the moc before it compiles
+ \c foo.cpp. You can then put
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 3
+
+ at the end of \c foo.cpp, where all the classes declared in that
+ file are fully known.
+
+ \section1 Command-Line Options
+
+ Here are the command-line options supported by the moc:
+
+ \table
+ \header \o Option \o Description
+
+ \row
+ \o \c{-o<file>}
+ \o Write output to \c <file> rather than to standard output.
+
+ \row
+ \o \c{-f[<file>]}
+ \o Force the generation of an \c #include statement in the
+ output. This is the default for header files whose extension
+ starts with \c H or \c h. This option is useful if you have
+ header files that do not follow the standard naming conventions.
+ The \c <file> part is optional.
+
+ \row
+ \o \c -i
+ \o Do not generate an \c #include statement in the output.
+ This may be used to run the moc on on a C++ file containing one or
+ more class declarations. You should then \c #include the meta-object
+ code in the \c .cpp file.
+
+ \row
+ \o \c -nw
+ \o Do not generate any warnings. (Not recommended.)
+
+ \row
+ \o \c {-p<path>}
+ \o Makes the moc prepend \c {<path>/} to the file name in the
+ generated \c #include statement.
+
+ \row
+ \o \c {-I<dir>}
+ \o Add dir to the include path for header files.
+
+ \row
+ \o \c{-E}
+ \o Preprocess only; do not generate meta-object code.
+
+ \row
+ \o \c {-D<macro>[=<def>]}
+ \o Define macro, with optional definition.
+
+ \row
+ \o \c{-U<macro>}
+ \o Undefine macro.
+
+ \row
+ \o \c{@<file>}
+ \o Read additional command-line options from \c{<file>}.
+ Each line of the file is treated as a single option. Empty lines
+ are ignored. Note that this option is not supported within the
+ options file itself (i.e. an options file can't "include" another
+ file).
+
+ \row
+ \o \c{-h}
+ \o Display the usage and the list of options.
+
+ \row
+ \o \c {-v}
+ \o Display \c{moc}'s version number.
+
+ \row
+ \o \c{-Fdir}
+
+ \o Mac OS X. Add the framework directory \c{dir} to the head of
+ the list of directories to be searched for header files. These
+ directories are interleaved with those specified by -I options
+ and are scanned in a left-to-right order (see the manpage for
+ gcc). Normally, use -F /Library/Frameworks/
+
+ \endtable
+
+ You can explicitly tell the moc not to parse parts of a header
+ file. \c moc defines the preprocessor symbol \c Q_MOC_RUN. Any
+ code surrounded by
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 4
+
+ is skipped by the \c moc.
+
+ \section1 Diagnostics
+
+ \c moc will warn you about a number of dangerous or illegal
+ constructs in the Q_OBJECT class declarations.
+
+ If you get linkage errors in the final building phase of your
+ program, saying that \c YourClass::className() is undefined or
+ that \c YourClass lacks a vtable, something has been done wrong.
+ Most often, you have forgotten to compile or \c #include the
+ moc-generated C++ code, or (in the former case) include that
+ object file in the link command. If you use \c qmake, try
+ rerunning it to update your makefile. This should do the trick.
+
+ \section1 Limitations
+
+ \c moc does not handle all of C++. The main problem is that class
+ templates cannot have signals or slots. Here is an example:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 5
+
+ Another limitation is that moc does not expand macros, so you
+ for example cannot use a macro to declare a signal/slot
+ or use one to define a base class for a QObject.
+
+ Less importantly, the following constructs are illegal. All of
+ them have alternatives which we think are usually better, so
+ removing these limitations is not a high priority for us.
+
+ \section2 Multiple Inheritance Requires QObject to Be First
+
+ If you are using multiple inheritance, \c moc assumes that the
+ first inherited class is a subclass of QObject. Also, be sure
+ that only the first inherited class is a QObject.
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 6
+
+ Virtual inheritance with QObject is \e not supported.
+
+ \section2 Function Pointers Cannot Be Signal or Slot Parameters
+
+ In most cases where you would consider using function pointers as
+ signal or slot parameters, we think inheritance is a better
+ alternative. Here is an example of illegal syntax:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 7
+
+ You can work around this restriction like this:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 8
+
+ It may sometimes be even better to replace the function pointer
+ with inheritance and virtual functions.
+
+ \section2 Enums and Typedefs Must Be Fully Qualified for Signal and Slot Parameters
+
+ When checking the signatures of its arguments, QObject::connect()
+ compares the data types literally. Thus,
+ \l{Qt::Alignment}{Alignment} and \l{Qt::Alignment} are treated as
+ two distinct types. To work around this limitation, make sure to
+ fully qualify the data types when declaring signals and slots,
+ and when establishing connections. For example:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 9
+
+ \section2 Type Macros Cannot Be Used for Signal and Slot Parameters
+
+ Since \c moc doesn't expand \c{#define}s, type macros that take
+ an argument will not work in signals and slots. Here is an
+ illegal example:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 10
+
+ A macro without parameters will work.
+
+ \section2 Nested Classes Cannot Have Signals or Slots
+
+ Here's an example of the offending construct:
+
+ \snippet doc/src/snippets/code/doc_src_moc.qdoc 11
+
+ \section2 Signal/Slot return types cannot be references
+
+ Signals and slots can have return types, but signals or slots returning references
+ will be treated as returning void.
+
+ \section2 Only Signals and Slots May Appear in the \c signals and \c slots Sections of a Class
+
+ \c moc will complain if you try to put other constructs in the \c
+ signals or \c slots sections of a class than signals and slots.
+
+ \sa {Meta-Object System}, {Signals and Slots}, {Qt's Property System}
+*/
diff --git a/doc/src/model-view-programming.qdoc b/doc/src/model-view-programming.qdoc
new file mode 100644
index 0000000..bf0c1c8
--- /dev/null
+++ b/doc/src/model-view-programming.qdoc
@@ -0,0 +1,2447 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page model-view-programming.html
+ \nextpage An Introduction to Model/View Programming
+ \startpage index.html Qt Reference Documentation
+
+ \title Model/View Programming
+ \ingroup architecture
+ \brief A guide to the extensible model/view architecture used by Qt's
+ item view classes.
+
+ \list
+ \o \l{An Introduction to Model/View Programming}
+ \tableofcontents{1 An Introduction to Model/View Programming}
+ \o \l{Using Models and Views}
+ \tableofcontents{1 Using Models and Views}
+ \o \l{Model Classes}
+ \tableofcontents{1 Model Classes}
+ \o \l{Creating New Models}
+ \tableofcontents{1 Creating New Models}
+ \o \l{View Classes}
+ \tableofcontents{1 View Classes}
+ \o \l{Handling Selections in Item Views}
+ \tableofcontents{1 Handling Selections in Item Views}
+ \o \l{Delegate Classes}
+ \tableofcontents{1 Delegate Classes}
+ \o \l{Item View Convenience Classes}
+ \tableofcontents{1 Item View Convenience Classes}
+ \o \l{Using Drag and Drop with Item Views}
+ \tableofcontents{1 Using Drag and Drop with Item Views}
+ \o \l{Proxy Models}
+ \tableofcontents{1 Proxy Models}
+ \o \l{Model Subclassing Reference}
+ \tableofcontents{1 Model Subclassing Reference}
+ \endlist
+
+ See also the list of \l{Model/View Classes}.
+
+ \section1 Related Examples
+
+ \list
+ \o \l{itemviews/dirview}{Dir View}
+ \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}
+ \o \l{itemviews/pixelator}{Pixelator}
+ \o \l{itemviews/simpletreemodel}{Simple Tree Model}
+ \o \l{itemviews/chart}{Chart}
+ \endlist
+*/
+
+/*!
+ \page model-view-introduction.html
+ \previouspage Model/View Programming
+ \nextpage Using Models and Views
+ \startpage index.html Qt Reference Documentation
+
+ \title An Introduction to Model/View Programming
+
+ \tableofcontents
+
+ Qt 4 introduces a new set of item view classes that use a model/view
+ architecture to manage the relationship between data and the way it
+ is presented to the user. The separation of functionality introduced by
+ this architecture gives developers greater flexibility to customize the
+ presentation of items, and provides a standard model interface to allow
+ a wide range of data sources to be used with existing item views.
+ In this document, we give a brief introduction to the model/view paradigm,
+ outline the concepts involved, and describe the architecture of the item
+ view system. Each of the components in the architecture is explained,
+ and examples are given that show how to use the classes provided.
+
+ \section1 The Model/View Architecture
+
+ Model-View-Controller (MVC) is a design pattern originating from
+ Smalltalk that is often used when building user interfaces.
+ In \l{Design Patterns}, Gamma et al. write:
+
+ \quotation
+ MVC consists of three kinds of objects. The Model is the application
+ object, the View is its screen presentation, and the Controller defines
+ the way the user interface reacts to user input. Before MVC, user
+ interface designs tended to lump these objects together. MVC decouples
+ them to increase flexibility and reuse.
+ \endquotation
+
+ If the view and the controller objects are combined, the result is
+ the model/view architecture. This still separates the way that data
+ is stored from the way that it is presented to the user, but provides
+ a simpler framework based on the same principles. This separation
+ makes it possible to display the same data in several different views,
+ and to implement new types of views, without changing the underlying
+ data structures.
+ To allow flexible handling of user input, we introduce the concept of
+ the \e delegate. The advantage of having a delegate in this framework
+ is that it allows the way items of data are rendered and edited to be
+ customized.
+
+ \table
+ \row \i \inlineimage modelview-overview.png
+ \i \bold{The model/view architecture}
+
+ The model communicates with a source of data, providing an \e interface
+ for the other components in the architecture. The nature of the
+ communication depends on the type of data source, and the way the model
+ is implemented.
+
+ The view obtains \e{model indexes} from the model; these are references
+ to items of data. By supplying model indexes to the model, the view can
+ retrieve items of data from the data source.
+
+ In standard views, a \e delegate renders the items of data. When an item
+ is edited, the delegate communicates with the model directly using
+ model indexes.
+ \endtable
+
+ Generally, the model/view classes can be separated into the three groups
+ described above: models, views, and delegates. Each of these components
+ is defined by \e abstract classes that provide common interfaces and,
+ in some cases, default implementations of features.
+ Abstract classes are meant to be subclassed in order to provide the full
+ set of functionality expected by other components; this also allows
+ specialized components to be written.
+
+ Models, views, and delegates communicate with each other using \e{signals
+ and slots}:
+
+ \list
+ \o Signals from the model inform the view about changes to the data
+ held by the data source.
+ \o Signals from the view provide information about the user's interaction
+ with the items being displayed.
+ \o Signals from the delegate are used during editing to tell the
+ model and view about the state of the editor.
+ \endlist
+
+ \section2 Models
+
+ All item models are based on the QAbstractItemModel class. This class
+ defines an interface that is used by views and delegates to access data.
+ The data itself does not have to be stored in the model; it can be held
+ in a data structure or repository provided by a separate class, a file,
+ a database, or some other application component.
+
+ The basic concepts surrounding models are presented in the section
+ on \l{Model Classes}.
+
+ QAbstractItemModel
+ provides an interface to data that is flexible enough to handle views
+ that represent data in the form of tables, lists, and trees. However,
+ when implementing new models for list and table-like data structures,
+ the QAbstractListModel and QAbstractTableModel classes are better
+ starting points because they provide appropriate default implementations
+ of common functions. Each of these classes can be subclassed to provide
+ models that support specialized kinds of lists and tables.
+
+ The process of subclassing models is discussed in the section on
+ \l{Creating New Models}.
+
+ Qt provides some ready-made models that can be used to handle items of
+ data:
+
+ \list
+ \o QStringListModel is used to store a simple list of QString items.
+ \o QStandardItemModel manages more complex tree structures of items, each
+ of which can contain arbitrary data.
+ \o QDirModel provides information about files and directories in the local
+ filing system.
+ \o QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel are used
+ to access databases using model/view conventions.
+ \endlist
+
+ If these standard models do not meet your requirements, you can subclass
+ QAbstractItemModel, QAbstractListModel, or QAbstractTableModel to create
+ your own custom models.
+
+ \section2 Views
+
+ Complete implementations are provided for different kinds of
+ views: QListView displays a list of items, QTableView displays data
+ from a model in a table, and QTreeView shows model items of data in a
+ hierarchical list. Each of these classes is based on the
+ QAbstractItemView abstract base class. Although these classes are
+ ready-to-use implementations, they can also be subclassed to provide
+ customized views.
+
+ The available views are examined in the section on \l{View Classes}.
+
+ \section2 Delegates
+
+ QAbstractItemDelegate is the abstract base class for delegates in the
+ model/view framework. Since Qt 4.4, the default delegate implementation is
+ provided by QStyledItemDelegate, and this is used as the default delegate
+ by Qt's standard views. However, QStyledItemDelegate and QItemDelegate are
+ independent alternatives to painting and providing editors for items in
+ views. The difference between them is that QStyledItemDelegate uses the
+ current style to paint its items. We therefore recommend using
+ QStyledItemDelegate as the base class when implementing custom delegates or
+ when working with Qt style sheets.
+
+ Delegates are described in the section on \l{Delegate Classes}.
+
+ \section2 Sorting
+
+ There are two ways of approaching sorting in the model/view
+ architecture; which approach to choose depends on your underlying
+ model.
+
+ If your model is sortable, i.e, if it reimplements the
+ QAbstractItemModel::sort() function, both QTableView and QTreeView
+ provide an API that allows you to sort your model data
+ programmatically. In addition, you can enable interactive sorting
+ (i.e. allowing the users to sort the data by clicking the view's
+ headers), by connecting the QHeaderView::sectionClicked() signal
+ to the QTableView::sortByColumn() slot or the
+ QTreeView::sortByColumn() slot, respectively.
+
+ The alternative approach, if your model do not have the required
+ interface or if you want to use a list view to present your data,
+ is to use a proxy model to transform the structure of your model
+ before presenting the data in the view. This is covered in detail
+ in the section on \l {Proxy Models}.
+
+ \section2 Convenience Classes
+
+ A number of \e convenience classes are derived from the standard view
+ classes for the benefit of applications that rely on Qt's item-based
+ item view and table classes. They are not intended to be subclassed,
+ but simply exist to provide a familiar interface to the equivalent classes
+ in Qt 3.
+ Examples of such classes include \l QListWidget, \l QTreeWidget, and
+ \l QTableWidget; these provide similar behavior to the \c QListBox,
+ \c QListView, and \c QTable classes in Qt 3.
+
+ These classes are less flexible than the view classes, and cannot be
+ used with arbitrary models. We recommend that you use a model/view
+ approach to handling data in item views unless you strongly need an
+ item-based set of classes.
+
+ If you wish to take advantage of the features provided by the model/view
+ approach while still using an item-based interface, consider using view
+ classes, such as QListView, QTableView, and QTreeView with
+ QStandardItemModel.
+
+ \section1 The Model/View Components
+
+ The following sections describe the way in which the model/view pattern
+ is used in Qt. Each section provides an example of use, and is followed
+ by a section showing how you can create new components.
+*/
+
+/*!
+ \page model-view-using.html
+ \contentspage model-view-programming.html Contents
+ \previouspage An Introduction to Model/View Programming
+ \nextpage Model Classes
+
+ \title Using Models and Views
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Two of the standard models provided by Qt are QStandardItemModel and
+ QDirModel. QStandardItemModel is a multi-purpose model that can be used
+ to represent various different data structures needed by list, table,
+ and tree views. This model also holds the items of data.
+ QDirModel is a model that maintains information about the contents of a
+ directory. As a result, it does not hold any items of data itself, but
+ simply represents files and directories on the local filing system.
+
+ QDirModel provides a ready-to-use model to experiment with, and can be
+ easily configured to use existing data. Using this model, we can show how
+ to set up a model for use with ready-made views, and explore how to
+ manipulate data using model indexes.
+
+ \section1 Using Views with an Existing Model
+
+ The QListView and QTreeView classes are the most suitable views
+ to use with QDirModel. The example presented below displays the
+ contents of a directory in a tree view next to the same information in
+ a list view. The views share the user's selection so that the selected
+ items are highlighted in both views.
+
+ \img shareddirmodel.png
+
+ We set up a QDirModel so that it is ready for use, and create some
+ views to display the contents of a directory. This shows the simplest
+ way to use a model. The construction and use of the model is
+ performed from within a single \c main() function:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 0
+
+ The model is set up to use data from a default directory. We create two
+ views so that we can examine the items held in the model in two
+ different ways:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 5
+
+ The views are constructed in the same way as other widgets. Setting up
+ a view to display the items in the model is simply a matter of calling its
+ \l{QAbstractItemView::setModel()}{setModel()} function with the directory
+ model as the argument. The calls to
+ \l{QAbstractItemView::setRootIndex()}{setRootIndex()} tell the views which
+ directory to display by supplying a \e{model index} that we obtain from
+ the directory model.
+
+ The \c index() function used in this case is unique to QDirModel; we supply
+ it with a directory and it returns a model index. Model indexes are
+ discussed in the \l{Model Classes} chapter.
+
+ The rest of the function just displays the views within a splitter
+ widget, and runs the application's event loop:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 8
+
+ In the above example, we neglected to mention how to handle selections
+ of items. This subject is covered in more detail in the chapter on
+ \l{Handling Selections in Item Views}. Before examining how selections
+ are handled, you may find it useful to read the \l{Model Classes} chapter
+ which describes the concepts used in the model/view framework.
+*/
+
+/*!
+ \page model-view-model.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Using Models and Views
+ \nextpage Creating New Models
+
+ \title Model Classes
+
+ \tableofcontents
+
+ \section1 Basic Concepts
+
+ In the model/view architecture, the model provides a standard interface
+ that views and delegates use to access data. In Qt, the standard
+ interface is defined by the QAbstractItemModel class. No matter how
+ the items of data are stored in any underlying data structure, all
+ subclasses of QAbstractItemModel represent the data as a hierarchical
+ structure containing tables of items.
+ Views use this \e convention to access items of data in the model, but
+ they are not restricted in the way that they present this information
+ to the user.
+
+ \image modelview-models.png
+
+ Models also notify any attached views about changes to data through the
+ signals and slots mechanism.
+
+ This chapter describes some basic concepts that are central to the way
+ item of data are accessed by other components via a model class. More
+ advanced concepts are discussed in later chapters.
+
+ \section2 Model Indexes
+
+ To ensure that the representation of the data is kept separate from the
+ way it is accessed, the concept of a \e{model index} is introduced.
+ Each piece of information that can be obtained via a model is
+ represented by a model index. Views and delegates use these indexes to
+ request items of data to display.
+
+ As a result, only the model needs to know how to obtain data, and the
+ type of data managed by the model can be defined fairly generally.
+ Model indexes contain a pointer to the model that created them, and
+ this prevents confusion when working with more than one model.
+
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 0
+
+ Model indexes provide \e temporary references to pieces of information,
+ and can be used to retrieve or modify data via the model. Since models
+ may reorganize their internal structures from time to time, model
+ indexes may become invalid, and \e{should not be stored}. If a
+ long-term reference to a piece of information is required, a
+ \e{persistent model index} must be created. This provides a reference
+ to the information that the model keeps up-to-date.
+ Temporary model indexes are provided by the QModelIndex class, and
+ persistent model indexes are provided by the QPersistentModelIndex
+ class.
+
+ To obtain a model index that corresponds to an item of data, three
+ properties must be specified to the model: a row number, a column number,
+ and the model index of a parent item. The following sections describe
+ and explain these properties in detail.
+
+ \section2 Rows and Columns
+
+ In its most basic form, a model can be accessed as a simple table
+ in which items are located by their row and column numbers. \e{This does
+ not mean that the underlying pieces of data are stored in an array
+ structure}; the use of row and column numbers is only a convention to
+ allow components to communicate with each other.
+ We can retrieve information about any given item by specifying its row
+ and column numbers to the model, and we receive an index that
+ represents the item:
+
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 1
+
+ Models that provide interfaces to simple, single level data structures
+ like lists and tables do not need any other information to be provided
+ but, as the above code indicates, we need to supply more information
+ when obtaining a model index.
+
+ \table
+ \row \i \inlineimage modelview-tablemodel.png
+ \i \bold{Rows and columns}
+
+ The diagram shows a representation of a basic table model in which each
+ item is located by a pair of row and column numbers.
+ By passing the relevant row and column numbers to the model we
+ obtain a model index that refers to an item of data.
+
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 2
+
+ Top level items in a model are always referenced by specifying
+ \c QModelIndex() as their parent item. This is discussed in the next
+ section.
+ \endtable
+
+ \section2 Parents of Items
+
+ The table-like interface to item data provided by models is ideal when
+ using data in a table or list view; the row and column number system
+ maps exactly to the way the views display items.
+ However, structures such as tree views require the model to expose a more
+ flexible interface to the items within. As a result, each item can also be
+ the parent of another table of items, in much the same way that a top-level
+ item in a tree view can contain another list of items.
+
+ When requesting an index for a model item, we must provide some
+ information about the item's parent. Outside the model, the only way to
+ refer to an item is through a model index, so a parent model index must
+ also be given:
+
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 3
+
+ \table
+ \row \i \inlineimage modelview-treemodel.png
+ \i \bold{Parents, rows, and columns}
+
+ The diagram shows a representation of a tree model in which each item
+ is referred to by a parent, a row number, and a column number.
+
+ Items "A" and "C" are represented as top-level siblings in the model:
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 4
+
+ Item "A" has a number of children. A model index for item "B" is
+ obtained with the following code:
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 5
+ \endtable
+
+ \section2 Item Roles
+
+ Items in a model can perform various \e roles for other components,
+ allowing different kinds of data to be supplied for different situations.
+ For example, Qt::DisplayRole is used to access a string that can be
+ displayed as text in a view.
+ Typically, items contain data for a number of different roles, and the
+ standard roles are defined by Qt::ItemDataRole.
+
+ We can ask the model for the item's data by passing it the model index
+ corresponding to the item, and by specifying a role to obtain the type
+ of data we want:
+
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 6
+
+ \table
+ \row \i \inlineimage modelview-roles.png
+ \i \bold{Item roles}
+
+ The role indicates to the model which type of data is being referred to.
+ Views can display the roles in different ways, so it is important to
+ supply appropriate information for each role.
+
+ The \l{Creating New Models} section covers some specific uses of roles
+ in more detail.
+ \endtable
+
+ Most common uses for item data are covered by the standard roles defined
+ in Qt::ItemDataRole. By supplying appropriate item data for each role,
+ models can provide hints to views and delegates about how items should be
+ presented to the user. Different kinds of views have the freedom to
+ interpret or ignore this information as required. It is also possible to
+ define additional roles for application-specific purposes.
+
+ \section2 Summary of Concepts
+
+ \list
+ \o Model indexes give views and delegates information about the location
+ of items provided by models in a way that is independent of any
+ underlying data structures.
+ \o Items are referred to by their row and column numbers, and by the model
+ index of their parent items.
+ \o Model indexes are constructed by models at the request of other
+ components, such as views and delegates.
+ \o If a valid model index is specified for the parent item when an index is
+ requested using \l{QAbstractItemModel::index()}{index()}, the index
+ returned will refer to an item beneath that parent item in the
+ model.
+ The index obtained refers to a child of that item.
+ \o If an invalid model index is specified for the parent item when an index
+ is requested using \l{QAbstractItemModel::index()}{index()}, the index
+ returned will refer to a top-level item in the model.
+ \o The \l{Qt::ItemDataRole}{role} distinguishes between the
+ different kinds of data associated with an item.
+ \endlist
+
+ \section2 Using Model Indexes
+
+ To demonstrate how data can be retrieved from a model, using model
+ indexes, we set up a QDirModel without a view and display the
+ names of files and directories in a widget.
+ Although this does not show a normal way of using a model, it demonstrates
+ the conventions used by models when dealing with model indexes.
+
+ We construct a directory model in the following way:
+
+ \snippet doc/src/snippets/simplemodel-use/main.cpp 0
+
+ In this case, we set up a default QDirModel, obtain a parent index using
+ a specific implementation of \l{QDirModel::index()}{index()} provided by
+ that model, and we count the number of rows in the model using the
+ \l{QDirModel::rowCount()}{rowCount()} function.
+
+ For simplicity, we are only interested in the items in the first column
+ of the model. We examine each row in turn, obtaining a model index for
+ the first item in each row, and read the data stored for that item
+ in the model.
+
+ \snippet doc/src/snippets/simplemodel-use/main.cpp 1
+
+ To obtain a model index, we specify the row number, column number (zero
+ for the first column), and the appropriate model index for the parent
+ of all the items that we want.
+ The text stored in each item is retrieved using the model's
+ \l{QDirModel::data()}{data()} function. We specify the model index and
+ the \l{Qt::ItemDataRole}{DisplayRole} to obtain data for the
+ item in the form of a string.
+
+ \snippet doc/src/snippets/simplemodel-use/main.cpp 2
+ \codeline
+ \snippet doc/src/snippets/simplemodel-use/main.cpp 3
+
+ The above example demonstrates the basic principles used to retrieve
+ data from a model:
+
+ \list
+ \i The dimensions of a model can be found using
+ \l{QAbstractItemModel::rowCount()}{rowCount()} and
+ \l{QAbstractItemModel::columnCount()}{columnCount()}.
+ These functions generally require a parent model index to be
+ specified.
+ \i Model indexes are used to access items in the model. The row, column,
+ and parent model index are needed to specify the item.
+ \i To access top-level items in a model, specify a null model index
+ as the parent index with \c QModelIndex().
+ \i Items contain data for different roles. To obtain the data for a
+ particular role, both the model index and the role must be supplied
+ to the model.
+ \endlist
+
+
+ \section1 Further Reading
+
+ New models can be created by implementing the standard interface provided
+ by QAbstractItemModel. In the \l{Creating New Models} chapter, we will
+ demonstrate this by creating a convenient ready-to-use model for holding
+ lists of strings.
+*/
+
+/*!
+ \page model-view-view.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Creating New Models
+ \nextpage Handling Selections in Item Views
+
+ \title View Classes
+
+ \tableofcontents
+
+ \section1 Concepts
+
+ In the model/view architecture, the view obtains items of data from the
+ model and presents them to the user. The way that the data is
+ presented need not resemble the representation of the data provided by
+ the model, and may be \e{completely different} from the underlying data
+ structure used to store items of data.
+
+ The separation of content and presentation is achieved by the use of a
+ standard model interface provided by QAbstractItemModel, a standard view
+ interface provided by QAbstractItemView, and the use of model indexes
+ that represent items of data in a general way.
+ Views typically manage the overall layout of the data obtained from
+ models. They may render individual items of data themselves, or use
+ \l{Delegate Classes}{delegates} to handle both rendering and editing
+ features.
+
+ As well as presenting data, views handle navigation between items,
+ and some aspects of item selection. The views also implement basic
+ user interface features, such as context menus and drag and drop.
+ A view can provide default editing facilities for items, or it may
+ work with a \l{Delegate Classes}{delegate} to provide a custom
+ editor.
+
+ A view can be constructed without a model, but a model must be
+ provided before it can display useful information. Views keep track of
+ the items that the user has selected through the use of
+ \l{Handling Selections in Item Views}{selections} which can be maintained
+ separately for each view, or shared between multiple views.
+
+ Some views, such as QTableView and QTreeView, display headers as well
+ as items. These are also implemented by a view class, QHeaderView.
+ Headers usually access the same model as the view that contains them.
+ They retrieve data from the model using the
+ \l{QAbstractItemModel::headerData()} function, and usually display
+ header information in the form of a label. New headers can be
+ subclassed from the QHeaderView class to provide more specialized
+ labels for views.
+
+ \section1 Using an Existing View
+
+ Qt provides three ready-to-use view classes that present data from
+ models in ways that are familiar to most users.
+ QListView can display items from a model as a simple list, or in the
+ form of a classic icon view. QTreeView displays items from a
+ model as a hierarchy of lists, allowing deeply nested structures to be
+ represented in a compact way. QTableView presents items from a model
+ in the form of a table, much like the layout of a spreadsheet
+ application.
+
+ \img standard-views.png
+
+ The default behavior of the standard views shown above should be
+ sufficient for most applications. They provide basic editing
+ facilities, and can be customized to suit the needs of more specialized
+ user interfaces.
+
+ \section2 Using a Model
+
+ We take the string list model that \l{Creating New Models}{we created as
+ an example model}, set it up with some data, and construct a view to
+ display the contents of the model. This can all be performed within a
+ single function:
+
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 0
+
+ Note that the \c StringListModel is declared as a \l QAbstractItemModel.
+ This allows us to use the abstract interface to the model, and
+ ensures that the code will still work even if we replace the string list
+ model with a different model in the future.
+
+ The list view provided by \l QListView is sufficient for presenting
+ the items in the string list model. We construct the view, and set up
+ the model using the following lines of code:
+
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 2
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 4
+
+ The view is shown in the normal way:
+
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 5
+
+ The view renders the contents of a model, accessing data via the model's
+ interface. When the user tries to edit an item, the view uses a default
+ delegate to provide an editor widget.
+
+ \img stringlistmodel.png
+
+ The above image shows how a QListView represents the data in the string
+ list model. Since the model is editable, the view automatically allows
+ each item in the list to be edited using the default delegate.
+
+ \section2 Using Multiple Views onto the Same Model
+
+ Providing multiple views onto the same model is simply a matter of
+ setting the same model for each view. In the following code we create
+ two table views, each using the same simple table model which we have
+ created for this example:
+
+ \snippet doc/src/snippets/sharedtablemodel/main.cpp 0
+ \codeline
+ \snippet doc/src/snippets/sharedtablemodel/main.cpp 1
+
+ The use of signals and slots in the model/view architecture means that
+ changes to the model can be propagated to all the attached views,
+ ensuring that we can always access the same data regardless of the
+ view being used.
+
+ \img sharedmodel-tableviews.png
+
+ The above image shows two different views onto the same model, each
+ containing a number of selected items. Although the data from the model
+ is shown consistently across view, each view maintains its own internal
+ selection model. This can be useful in certain situations but, for
+ many applications, a shared selection model is desirable.
+
+ \section1 Handling Selections of Items
+
+ The mechanism for handling selections of items within views is provided
+ by the \l QItemSelectionModel class. All of the standard views construct
+ their own selection models by default, and interact with them in the
+ normal way. The selection model being used by a view can be obtained
+ through the \l{QAbstractItemView::selectionModel()}{selectionModel()}
+ function, and a replacement selection model can be specified with
+ \l{QAbstractItemView::setSelectionModel()}{setSelectionModel()}.
+ The ability to control the selection model used by a view is useful
+ when we want to provide multiple consistent views onto the same model
+ data.
+
+ Generally, unless you are subclassing a model or view, you will not
+ need to manipulate the contents of selections directly. However, the
+ interface to the selection model can be accessed, if required, and
+ this is explored in the chapter on
+ \l{Handling Selections in Item Views}.
+
+ \section2 Sharing Selections Between Views
+
+ Although it is convenient that the view classes provide their own
+ selection models by default, when we use more than one view onto the
+ same model it is often desirable that both the model's data and the
+ user's selection are shown consistently in all views.
+ Since the view classes allow their internal selection models to be
+ replaced, we can achieve a unified selection between views with the
+ following line:
+
+ \snippet doc/src/snippets/sharedtablemodel/main.cpp 2
+
+ The second view is given the selection model for the first view.
+ Both views now operate on the same selection model, keeping both
+ the data and the selected items synchronized.
+
+ \img sharedselection-tableviews.png
+
+ In the example shown above, two views of the same type were used to
+ display the same model's data. However, if two different types of view
+ were used, the selected items may be represented very differently in
+ each view; for example, a contiguous selection in a table view can be
+ represented as a fragmented set of highlighted items in a tree view.
+
+*/
+
+/*!
+ \page model-view-delegate.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Handling Selections in Item Views
+ \nextpage Item View Convenience Classes
+
+ \title Delegate Classes
+
+ \tableofcontents
+
+ \section1 Concepts
+
+ Unlike the Model-View-Controller pattern, the model/view design does not
+ include a completely separate component for managing interaction with
+ the user. Generally, the view is responsible for the presentation of
+ model data to the user, and for processing user input. To allow some
+ flexibility in the way this input is obtained, the interaction is
+ performed by delegates. These components provide input capabilities
+ and are also responsible for rendering individual items in some views.
+ The standard interface for controlling delegates is defined in the
+ \l QAbstractItemDelegate class.
+
+ Delegates are expected to be able to render their contents themselves
+ by implementing the \l{QItemDelegate::paint()}{paint()}
+ and \l{QItemDelegate::sizeHint()}{sizeHint()} functions.
+ However, simple widget-based delegates can subclass \l QItemDelegate
+ instead of \l QAbstractItemDelegate, and take advantage of the default
+ implementations of these functions.
+
+ Editors for delegates can be implemented either by using widgets to manage
+ the editing process or by handling events directly.
+ The first approach is covered later in this chapter, and it is also
+ shown in the \l{Spin Box Delegate Example}{Spin Box Delegate} example.
+
+ The \l{Pixelator Example}{Pixelator} example shows how to create a
+ custom delegate that performs specialized rendering for a table view.
+
+ \section1 Using an Existing Delegate
+
+ The standard views provided with Qt use instances of \l QItemDelegate
+ to provide editing facilities. This default implementation of the
+ delegate interface renders items in the usual style for each of the
+ standard views: \l QListView, \l QTableView, and \l QTreeView.
+
+ All the standard roles are handled by the default delegate used by
+ the standard views. The way these are interpreted is described in the
+ QItemDelegate documentation.
+
+ The delegate used by a view is returned by the
+ \l{QAbstractItemView::itemDelegate()}{itemDelegate()} function.
+ The \l{QAbstractItemView::setItemDelegate()}{setItemDelegate()} function
+ allows you to install a custom delegate for a standard view, and it is
+ necessary to use this function when setting the delegate for a custom
+ view.
+
+ \section1 A Simple Delegate
+
+ The delegate implemented here uses a \l QSpinBox to provide editing
+ facilities, and is mainly intended for use with models that display
+ integers. Although we set up a custom integer-based table model for
+ this purpose, we could easily have used \l QStandardItemModel instead
+ since the custom delegate will control data entry. We construct a
+ table view to display the contents of the model, and this will use
+ the custom delegate for editing.
+
+ \img spinboxdelegate-example.png
+
+ We subclass the delegate from \l QItemDelegate because we do not want
+ to write custom display functions. However, we must still provide
+ functions to manage the editor widget:
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.h 0
+
+ Note that no editor widgets are set up when the delegate is
+ constructed. We only construct an editor widget when it is needed.
+
+ \section2 Providing an Editor
+
+ In this example, when the table view needs to provide an editor, it
+ asks the delegate to provide an editor widget that is appropriate
+ for the item being modified. The
+ \l{QAbstractItemDelegate::createEditor()}{createEditor()} function is
+ supplied with everything that the delegate needs to be able to set up
+ a suitable widget:
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 1
+
+ Note that we do not need to keep a pointer to the editor widget because
+ the view takes responsibility for destroying it when it is no longer
+ needed.
+
+ We install the delegate's default event filter on the editor to ensure
+ that it provides the standard editing shortcuts that users expect.
+ Additional shortcuts can be added to the editor to allow more
+ sophisticated behavior; these are discussed in the section on
+ \l{#EditingHints}{Editing Hints}.
+
+ The view ensures that the editor's data and geometry are set
+ correctly by calling functions that we define later for these purposes.
+ We can create different editors depending on the model index supplied
+ by the view. For example, if we have a column of integers and a column
+ of strings we could return either a \c QSpinBox or a \c QLineEdit,
+ depending on which column is being edited.
+
+ The delegate must provide a function to copy model data into the
+ editor. In this example, we read the data stored in the
+ \l{Qt::ItemDataRole}{display role}, and set the value in the
+ spin box accordingly.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 2
+
+ In this example, we know that the editor widget is a spin box, but we
+ could have provided different editors for different types of data in
+ the model, in which case we would need to cast the widget to the
+ appropriate type before accessing its member functions.
+
+ \section2 Submitting Data to the Model
+
+ When the user has finished editing the value in the spin box, the view
+ asks the delegate to store the edited value in the model by calling the
+ \l{QAbstractItemDelegate::setModelData()}{setModelData()} function.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 3
+
+ Since the view manages the editor widgets for the delegate, we only
+ need to update the model with the contents of the editor supplied.
+ In this case, we ensure that the spin box is up-to-date, and update
+ the model with the value it contains using the index specified.
+
+ The standard \l QItemDelegate class informs the view when it has
+ finished editing by emitting the
+ \l{QAbstractItemDelegate::closeEditor()}{closeEditor()} signal.
+ The view ensures that the editor widget is closed and destroyed. In
+ this example, we only provide simple editing facilities, so we need
+ never emit this signal.
+
+ All the operations on data are performed through the interface
+ provided by \l QAbstractItemModel. This makes the delegate mostly
+ independent from the type of data it manipulates, but some
+ assumptions must be made in order to use certain types of
+ editor widgets. In this example, we have assumed that the model
+ always contains integer values, but we can still use this
+ delegate with different kinds of models because \l{QVariant}
+ provides sensible default values for unexpected data.
+
+ \section2 Updating the Editor's Geometry
+
+ It is the responsibility of the delegate to manage the editor's
+ geometry. The geometry must be set when the editor is created, and
+ when the item's size or position in the view is changed. Fortunately,
+ the view provides all the necessary geometry information inside a
+ \l{QStyleOptionViewItem}{view option} object.
+
+ \snippet examples/itemviews/spinboxdelegate/delegate.cpp 4
+
+ In this case, we just use the geometry information provided by the
+ view option in the item rectangle. A delegate that renders items with
+ several elements would not use the item rectangle directly. It would
+ position the editor in relation to the other elements in the item.
+
+ \target EditingHints
+ \section2 Editing Hints
+
+ After editing, delegates should provide hints to the other components
+ about the result of the editing process, and provide hints that will
+ assist any subsequent editing operations. This is achieved by
+ emitting the \l{QAbstractItemDelegate::closeEditor()}{closeEditor()}
+ signal with a suitable hint. This is taken care of by the default
+ QItemDelegate event filter which we installed on the spin box when
+ it was constructed.
+
+ The behavior of the spin box could be adjusted to make it more user
+ friendly. In the default event filter supplied by QItemDelegate, if
+ the user hits \key Return to confirm their choice in the spin box,
+ the delegate commits the value to the model and closes the spin box.
+ We can change this behavior by installing our own event filter on the
+ spin box, and provide editing hints that suit our needs; for example,
+ we might emit \l{QAbstractItemDelegate::closeEditor()}{closeEditor()}
+ with the \l{QAbstractItemDelegate::EndEditHint}{EditNextItem} hint to
+ automatically start editing the next item in the view.
+
+ Another approach that does not require the use of an event
+ filter is to provide our own editor widget, perhaps subclassing
+ QSpinBox for convenience. This alternative approach would give us
+ more control over how the editor widget behaves at the cost of
+ writing additional code. It is usually easier to install an event
+ filter in the delegate if you need to customize the behavior of
+ a standard Qt editor widget.
+
+ Delegates do not have to emit these hints, but those that do not will
+ be less integrated into applications, and will be less usable than
+ those that emit hints to support common editing actions.
+*/
+
+/*!
+ \page model-view-selection.html
+ \contentspage model-view-programming.html Contents
+ \previouspage View Classes
+ \nextpage Delegate Classes
+
+ \title Handling Selections in Item Views
+
+ \tableofcontents
+
+ \section1 Concepts
+
+ The selection model used in the new item view classes offers many
+ improvements over the selection model used in Qt 3. It provides a
+ more general description of selections based on the facilities of
+ the model/view architecture. Although the standard classes for
+ manipulating selections are sufficient for the item views provided,
+ the selection model allows you to create specialized selection models
+ to suit the requirements for your own item models and views.
+
+ Information about the items selected in a view is stored in an instance
+ of the \l QItemSelectionModel class. This maintains model indexes for
+ items in a single model, and is independent of any views. Since there
+ can be many views onto a model, it is possible to share selections
+ between views, allowing applications to show multiple views in a
+ consistent way.
+
+ Selections are made up of \e{selection ranges}. These efficiently
+ maintain information about large selections of items by recording
+ only the starting and ending model indexes for each range of selected
+ items. Non-contiguous selections of items are constructed by using
+ more than one selection range to describe the selection.
+
+ Selections are applied to a collection of model indexes held by
+ a selection model. The most recent selection of items applied is
+ known as the \e{current selection}. The effects of this selection can
+ be modified even after its application through the use of certain
+ types of selection commands. These are discussed later in this
+ section.
+
+ When manipulating selections, it is often helpful to think of
+ \l QItemSelectionModel as a record of the selection state of all the
+ items in an item model. Once a selection model is set up, collections
+ of items can be selected, deselected, or their selection states can
+ be toggled without the need to know which items are already selected.
+ The indexes of all selected items can be retrieved at any time, and
+ other components can be informed of changes to the selection model
+ via the signals and slots mechanism.
+
+
+ \section1 Using a Selection Model
+
+ The standard view classes provide default selection models that can
+ be used in most applications. A selection model belonging to one view
+ can be obtained using the view's
+ \l{QAbstractItemView::selectionModel()}{selectionModel()} function,
+ and shared between many views with
+ \l{QAbstractItemView::setSelectionModel()}{setSelectionModel()},
+ so the construction of new selection models is generally not required.
+
+ A selection is created by specifying a model, and a pair of model
+ indexes to a \l QItemSelection. This uses the indexes to refer to items
+ in the given model, and interprets them as the top-left and bottom-right
+ items in a block of selected items.
+ To apply the selection to items in a model requires the selection to be
+ submitted to a selection model; this can be achieved in a number of ways,
+ each having a different effect on the selections already present in the
+ selection model.
+
+
+ \section2 Selecting Items
+
+ To demonstrate some of the principal features of selections, we construct
+ an instance of a custom table model with 32 items in total, and open a
+ table view onto its data:
+
+ \snippet doc/src/snippets/itemselection/main.cpp 0
+
+ The table view's default selection model is retrieved for later use.
+ We do not modify any items in the model, but instead select a few
+ items that the view will display at the top-left of the table. To do
+ this, we need to retrieve the model indexes corresponding to the
+ top-left and bottom-right items in the region to be selected:
+
+ \snippet doc/src/snippets/itemselection/main.cpp 1
+
+ To select these items in the model, and see the corresponding change
+ in the table view, we need to construct a selection object then apply
+ it to the selection model:
+
+ \snippet doc/src/snippets/itemselection/main.cpp 2
+
+ The selection is applied to the selection model using a command
+ defined by a combination of
+ \l{QItemSelectionModel::SelectionFlag}{selection flags}.
+ In this case, the flags used cause the items recorded in the
+ selection object to be included in the selection model, regardless
+ of their previous state. The resulting selection is shown by the view.
+
+ \img selected-items1.png
+
+ The selection of items can be modified using various operations that
+ are defined by the selection flags. The selection that results from
+ these operations may have a complex structure, but will be represented
+ efficiently by the selection model. The use of different selection
+ flags to manipulate the selected items is described when we examine
+ how to update a selection.
+
+ \section2 Reading the Selection State
+
+ The model indexes stored in the selection model can be read using
+ the \l{QItemSelectionModel::selectedIndexes()}{selectedIndexes()}
+ function. This returns an unsorted list of model indexes that we can
+ iterate over as long as we know which model they are for:
+
+ \snippet doc/src/snippets/reading-selections/window.cpp 0
+
+ The above code uses Qt's convenient \l{Generic Containers}{foreach
+ keyword} to iterate over, and modify, the items corresponding to the
+ indexes returned by the selection model.
+
+ The selection model emits signals to indicate changes in the
+ selection. These notify other components about changes to both the
+ selection as a whole and the currently focused item in the item
+ model. We can connect the
+ \l{QItemSelectionModel::selectionChanged()}{selectionChanged()}
+ signal to a slot, and examine the items in the model that are selected or
+ deselected when the selection changes. The slot is called with two
+ \l{QItemSelection} objects: one contains a list of indexes that
+ correspond to newly selected items; the other contains indexes that
+ correspond to newly deselected items.
+
+ In the following code, we provide a slot that receives the
+ \l{QItemSelectionModel::selectionChanged()}{selectionChanged()}
+ signal, fills in the selected items with
+ a string, and clears the contents of the deselected items.
+
+ \snippet doc/src/snippets/updating-selections/window.cpp 0
+ \snippet doc/src/snippets/updating-selections/window.cpp 1
+ \codeline
+ \snippet doc/src/snippets/updating-selections/window.cpp 2
+
+ We can keep track of the currently focused item by connecting the
+ \l{QItemSelectionModel::currentChanged()}{currentChanged()} signal
+ to a slot that is called with two model indexes. These correspond to
+ the previously focused item, and the currently focused item.
+
+ In the following code, we provide a slot that receives the
+ \l{QItemSelectionModel::currentChanged()}{currentChanged()} signal,
+ and uses the information provided to update the status bar of a
+ \l QMainWindow:
+
+ \snippet doc/src/snippets/updating-selections/window.cpp 3
+
+ Monitoring selections made by the user is straightforward with these
+ signals, but we can also update the selection model directly.
+
+ \section2 Updating a Selection
+
+ Selection commands are provided by a combination of selection flags,
+ defined by \l{QItemSelectionModel::SelectionFlag}.
+ Each selection flag tells the selection model how to update its
+ internal record of selected items when either of the
+ \l{QItemSelection::select()}{select()} functions are called.
+ The most commonly used flag is the
+ \l{QItemSelectionModel::SelectionFlag}{Select} flag
+ which instructs the selection model to record the specified items as
+ being selected. The
+ \l{QItemSelectionModel::SelectionFlag}{Toggle} flag causes the
+ selection model to invert the state of the specified items,
+ selecting any deselected items given, and deselecting any currently
+ selected items. The \l{QItemSelectionModel::SelectionFlag}{Deselect}
+ flag deselects all the specified items.
+
+ Individual items in the selection model are updated by creating a
+ selection of items, and applying them to the selection model. In the
+ following code, we apply a second selection of items to the table
+ model shown above, using the
+ \l{QItemSelectionModel::SelectionFlag}{Toggle} command to invert the
+ selection state of the items given.
+
+ \snippet doc/src/snippets/itemselection/main.cpp 3
+
+ The results of this operation are displayed in the table view,
+ providing a convenient way of visualizing what we have achieved:
+
+ \img selected-items2.png
+
+ By default, the selection commands only operate on the individual
+ items specified by the model indexes. However, the flag used to
+ describe the selection command can be combined with additional flags
+ to change entire rows and columns. For example if you call
+ \l{QItemSelectionModel::select()}{select()} with only one index, but
+ with a command that is a combination of
+ \l{QItemSelectionModel::SelectionFlag}{Select} and
+ \l{QItemSelectionModel::SelectionFlag}{Rows}, the
+ entire row containing the item referred to will be selected.
+ The following code demonstrates the use of the
+ \l{QItemSelectionModel::SelectionFlag}{Rows} and
+ \l{QItemSelectionModel::SelectionFlag}{Columns} flags:
+
+ \snippet doc/src/snippets/itemselection/main.cpp 4
+
+ Although only four indexes are supplied to the selection model, the
+ use of the
+ \l{QItemSelectionModel::SelectionFlag}{Columns} and
+ \l{QItemSelectionModel::SelectionFlag}{Rows} selection flags means
+ that two columns and two rows are selected. The following image shows
+ the result of these two selections:
+
+ \img selected-items3.png
+
+ The commands performed on the example model have all involved
+ accumulating a selection of items in the model. It is also possible
+ to clear the selection, or to replace the current selection with
+ a new one.
+
+ To replace the current selection with a new selection, combine
+ the other selection flags with the
+ \l{QItemSelectionModel::SelectionFlag}{Current} flag. A command using
+ this flag instructs the selection model to replace its current collection
+ of model indexes with those specified in a call to
+ \l{QItemSelectionModel::select()}{select()}.
+ To clear all selections before you start adding new ones,
+ combine the other selection flags with the
+ \l{QItemSelectionModel::SelectionFlag}{Clear} flag. This
+ has the effect of resetting the selection model's collection of model
+ indexes.
+
+ \section2 Selecting All Items in a Model
+
+ To select all items in a model, it is necessary to create a
+ selection for each level of the model that covers all items in that
+ level. We do this by retrieving the indexes corresponding to the
+ top-left and bottom-right items with a given parent index:
+
+ \snippet doc/src/snippets/reading-selections/window.cpp 2
+
+ A selection is constructed with these indexes and the model. The
+ corresponding items are then selected in the selection model:
+
+ \snippet doc/src/snippets/reading-selections/window.cpp 3
+
+ This needs to be performed for all levels in the model.
+ For top-level items, we would define the parent index in the usual way:
+
+ \snippet doc/src/snippets/reading-selections/window.cpp 1
+
+ For hierarchical models, the
+ \l{QAbstractItemModel::hasChildren()}{hasChildren()} function is used to
+ determine whether any given item is the parent of another level of
+ items.
+*/
+
+/*!
+ \page model-view-creating-models.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Model Classes
+ \nextpage View Classes
+
+ \title Creating New Models
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ The separation of functionality between the model/view components allows
+ models to be created that can take advantage of existing views. This
+ approach lets us present data from a variety of sources using standard
+ graphical user interface components, such as QListView, QTableView, and
+ QTreeView.
+
+ The QAbstractItemModel class provides an interface that is flexible
+ enough to support data sources that arrange information in hierarchical
+ structures, allowing for the possibility that data will be inserted,
+ removed, modified, or sorted in some way. It also provides support for
+ drag and drop operations.
+
+ The QAbstractListModel and QAbstractTableModel classes provide support
+ for interfaces to simpler non-hierarchical data structures, and are
+ easier to use as a starting point for simple list and table models.
+
+ In this chapter, we create a simple read-only model to explore
+ the basic principles of the model/view architecture. Later in this
+ chapter, we will adapt this simple model so that items can be modified
+ by the user.
+
+ For an example of a more complex model, see the
+ \l{itemviews/simpletreemodel}{Simple Tree Model} example.
+
+ The requirements of QAbstractItemModel subclasses is described in more
+ detail in the \l{Model Subclassing Reference} document.
+
+ \section1 Designing a Model
+
+ When creating a new model for an existing data structure, it is important
+ to consider which type of model should be used to provide an interface
+ onto the data. If the data structure can be represented as a
+ list or table of items, you can subclass QAbstractListModel or
+ QAbstractTableModel since these classes provide suitable default
+ implementations for many functions.
+
+ However, if the underlying data structure can only be represented by a
+ hierarchical tree structure, it is necessary to subclass
+ QAbstractItemModel. This approach is taken in the
+ \l{itemviews/simpletreemodel}{Simple Tree Model} example.
+
+ In this chapter, we will implement a simple model based on a list of
+ strings, so the QAbstractListModel provides an ideal base class on
+ which to build.
+
+ Whatever form the underlying data structure takes, it is
+ usually a good idea to supplement the standard QAbstractItemModel API
+ in specialized models with one that allows more natural access to the
+ underlying data structure. This makes it easier to populate the model
+ with data, yet still enables other general model/view components to
+ interact with it using the standard API. The model described below
+ provides a custom constructor for just this purpose.
+
+ \section1 A Read-Only Example Model
+
+ The model implemented here is a simple, non-hierarchical, read-only data
+ model based on the standard QStringListModel class. It has a \l QStringList
+ as its internal data source, and implements only what is needed to make a
+ functioning model. To make the implementation easier, we subclass
+ \l QAbstractListModel because it defines sensible default behavior for list
+ models, and it exposes a simpler interface than the \l QAbstractItemModel
+ class.
+
+ When implementing a model it is important to remember that
+ \l QAbstractItemModel does not store any data itself, it merely
+ presents an interface that the views use to access the data.
+ For a minimal read-only model it is only necessary to implement a few
+ functions as there are default implementations for most of the
+ interface. The class declaration is as follows:
+
+
+ \snippet doc/src/snippets/stringlistmodel/model.h 0
+ \snippet doc/src/snippets/stringlistmodel/model.h 1
+ \codeline
+ \snippet doc/src/snippets/stringlistmodel/model.h 5
+
+ Apart from the model's constructor, we only need to implement two
+ functions: \l{QAbstractItemModel::rowCount()}{rowCount()} returns the
+ number of rows in the model and \l{QAbstractItemModel::data()}{data()}
+ returns an item of data corresponding to a specified model index.
+
+ Well behaved models also implement
+ \l{QAbstractItemModel::headerData()}{headerData()} to give tree and
+ table views something to display in their headers.
+
+ Note that this is a non-hierarchical model, so we don't have to worry
+ about the parent-child relationships. If our model was hierarchical, we
+ would also have to implement the
+ \l{QAbstractItemModel::index()}{index()} and
+ \l{QAbstractItemModel::parent()}{parent()} functions.
+
+ The list of strings is stored internally in the \c stringList private
+ member variable.
+
+ \section2 Dimensions of The Model
+
+ We want the number of rows in the model to be the same as the number of
+ strings in the string list. We implement the
+ \l{QAbstractItemModel::rowCount()}{rowCount()} function with this in
+ mind:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 0
+
+ Since the model is non-hierarchical, we can safely ignore the model index
+ corresponding to the parent item. By default, models derived from
+ QAbstractListModel only contain one column, so we do not need to
+ reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
+ function.
+
+ \section2 Model Headers and Data
+
+ For items in the view, we want to return the strings in the string list.
+ The \l{QAbstractItemModel::data()}{data()} function is responsible for
+ returning the item of data that corresponds to the index argument:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 1
+
+ We only return a valid QVariant if the model index supplied is valid,
+ the row number is within the range of items in the string list, and the
+ requested role is one that we support.
+
+ Some views, such as QTreeView and QTableView, are able to display headers
+ along with the item data. If our model is displayed in a view with headers,
+ we want the headers to show the row and column numbers. We can provide
+ information about the headers by subclassing the
+ \l{QAbstractItemModel::headerData()}{headerData()} function:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 2
+
+ Again, we return a valid QVariant only if the role is one that we support.
+ The orientation of the header is also taken into account when deciding the
+ exact data to return.
+
+ Not all views display headers with the item data, and those that do may
+ be configured to hide them. Nonetheless, it is recommended that you
+ implement the \l{QAbstractItemModel::headerData()}{headerData()} function
+ to provide relevant information about the data provided by the model.
+
+ An item can have several roles, giving out different data depending on the
+ role specified. The items in our model only have one role,
+ \l{Qt::ItemDataRole}{DisplayRole}, so we return the data
+ for items irrespective of the role specified.
+ However, we could reuse the data we provide for the
+ \l{Qt::ItemDataRole}{DisplayRole} in
+ other roles, such as the
+ \l{Qt::ItemDataRole}{ToolTipRole} that views can use to
+ display information about items in a tooltip.
+
+ \section1 An Editable Model
+
+ The read-only model shows how simple choices could be presented to the
+ user but, for many applications, an editable list model is much more
+ useful. We can modify the read-only model to make the items editable
+ by implementing two extra functions:
+ \l{QAbstractItemModel::flags()}{flags()} and
+ \l{QAbstractItemModel::setData()}{setData()}.
+ The following function declarations are added to the class definition:
+
+ \snippet doc/src/snippets/stringlistmodel/model.h 2
+ \snippet doc/src/snippets/stringlistmodel/model.h 3
+
+ \section2 Making the Model Editable
+
+ A delegate checks whether an item is editable before creating an
+ editor. The model must let the delegate know that its items are
+ editable. We do this by returning the correct flags for each item in
+ the model; in this case, we enable all items and make them both
+ selectable and editable:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 3
+
+ Note that we do not have to know how the delegate performs the actual
+ editing process. We only have to provide a way for the delegate to set the
+ data in the model. This is achieved through the
+ \l{QAbstractItemModel::setData()}{setData()} function:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 4
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 5
+
+ In this model, the item in the string list that corresponds to the
+ model index is replaced by the value provided. However, before we
+ can modify the string list, we must make sure that the index is
+ valid, the item is of the correct type, and that the role is
+ supported. By convention, we insist that the role is the
+ \l{Qt::ItemDataRole}{EditRole} since this is the role used by the
+ standard item delegate. For boolean values, however, you can use
+ Qt::CheckStateRole and set the Qt::ItemIsUserCheckable flag; a
+ checkbox will then be used for editing the value. The underlying
+ data in this model is the same for all roles, so this detail just
+ makes it easier to integrate the model with standard components.
+
+ When the data has been set, the model must let the views know that some
+ data has changed. This is done by emitting the
+ \l{QAbstractItemModel::dataChanged()}{dataChanged()} signal. Since only
+ one item of data has changed, the range of items specified in the signal
+ is limited to just one model index.
+
+ \section2 Inserting and Removing Rows
+
+ It is possible to change the number of rows and columns in a model. In the
+ string list model it only makes sense to change the number of rows, so we
+ only reimplement the functions for inserting and removing rows. These are
+ declared in the class definition:
+
+ \snippet doc/src/snippets/stringlistmodel/model.h 4
+
+ Since rows in this model correspond to strings in a list, the
+ \c insertRows() function inserts a number of empty strings into the string
+ list before the specified position. The number of strings inserted is
+ equivalent to the number of rows specified.
+
+ The parent index is normally used to determine where in the model the
+ rows should be added. In this case, we only have a single top-level list
+ of strings, so we just insert empty strings into that list.
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 6
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 7
+
+ The model first calls the
+ \l{QAbstractItemModel::beginInsertRows()}{beginInsertRows()} function to
+ inform other components that the number of rows is about to change. The
+ function specifies the row numbers of the first and last new rows to be
+ inserted, and the model index for their parent item. After changing the
+ string list, it calls
+ \l{QAbstractItemModel::endInsertRows()}{endInsertRows()} to complete the
+ operation and inform other components that the dimensions of the model
+ have changed, returning true to indicate success.
+
+ The function to remove rows from the model is also simple to write.
+ The rows to be removed from the model are specified by the position and
+ the number of rows given.
+ We ignore the parent index to simplify our implementation, and just
+ remove the corresponding items from the string list.
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 8
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 9
+
+ The \l{QAbstractItemModel::beginRemoveRows()}{beginRemoveRows()} function
+ is always called before any underlying data is removed, and specifies the
+ first and last rows to be removed. This allows other components to access
+ the data before it becomes unavailable.
+ After the rows have been removed, the model emits
+ \l{QAbstractItemModel::endRemoveRows()}{endRemoveRows()} to finish the
+ operation and let other components know that the dimensions of the model
+ have changed.
+
+ \section1 Next Steps
+
+ We can display the data provided by this model, or any other model, using
+ the \l QListView class to present the model's items in the form of a vertical
+ list.
+ For the string list model, this view also provides a default editor so that
+ the items can be manipulated. We examine the possibilities made available by
+ the standard view classes in the chapter on \l{View Classes}.
+
+ The \l{Model Subclassing Reference} document discusses the requirements of
+ QAbstractItemModel subclasses in more detail, and provides a guide to the
+ virtual functions that must be implemented to enable various features in
+ different types of models.
+*/
+
+/*!
+ \page model-view-convenience.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Delegate Classes
+ \nextpage Using Drag and Drop with Item Views
+
+ \title Item View Convenience Classes
+
+ \tableofcontents
+
+ \section1 Overview
+
+ Alongside the model/view classes, Qt 4 also includes standard widgets to
+ provide classic item-based container widgets. These behave in a similar
+ way to the item view classes in Qt 3, but have been rewritten to use the
+ underlying model/view framework for performance and maintainability. The
+ old item view classes are still available in the compatibility library
+ (see the \l{porting4.html}{Porting Guide} for more information).
+
+ The item-based widgets have been given names which reflect their uses:
+ \c QListWidget provides a list of items, \c QTreeWidget displays a
+ multi-level tree structure, and \c QTableWidget provides a table of cell
+ items. Each class inherits the behavior of the \c QAbstractItemView
+ class which implements common behavior for item selection and header
+ management.
+
+ \section1 List Widgets
+
+ Single level lists of items are typically displayed using a \c QListWidget
+ and a number of \c{QListWidgetItem}s. A list widget is constructed in the
+ same way as any other widget:
+
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 0
+
+ List items can be added directly to the list widget when they are
+ constructed:
+
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 3
+
+ They can also be constructed without a parent list widget and added to
+ a list at some later time:
+
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 6
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 7
+
+ Each item in a list can display a text label and an icon. The colors
+ and font used to render the text can be changed to provide a customized
+ appearance for items. Tooltips, status tips, and "What's
+ This?" help are all easily configured to ensure that the list is properly
+ integrated into the application.
+
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 8
+
+ By default, items in a list are presented in the order of their creation.
+ Lists of items can be sorted according to the criteria given in
+ \l{Qt::SortOrder} to produce a list of items that is sorted in forward or
+ reverse alphabetical order:
+
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 4
+ \snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 5
+
+
+ \section1 Tree Widgets
+
+ Trees or hierarchical lists of items are provided by the \c QTreeWidget
+ and \c QTreeWidgetItem classes. Each item in the tree widget can have
+ child items of its own, and can display a number of columns of
+ information. Tree widgets are created just like any other widget:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 0
+
+ Before items can be added to the tree widget, the number of columns must
+ be set. For example, we could define two columns, and create a header
+ to provide labels at the top of each column:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 1
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 2
+
+ The easiest way to set up the labels for each section is to supply a string
+ list. For more sophisticated headers, you can construct a tree item,
+ decorate it as you wish, and use that as the tree widget's header.
+
+ Top-level items in the tree widget are constructed with the tree widget as
+ their parent widget. They can be inserted in an arbitrary order, or you
+ can ensure that they are listed in a particular order by specifying the
+ previous item when constructing each item:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 3
+ \codeline
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 4
+
+ Tree widgets deal with top-level items slightly differently to other
+ items from deeper within the tree. Items can be removed from the top
+ level of the tree by calling the tree widget's
+ \l{QTreeWidget::takeTopLevelItem()}{takeTopLevelItem()} function, but
+ items from lower levels are removed by calling their parent item's
+ \l{QTreeWidgetItem::takeChild()}{takeChild()} function.
+ Items are inserted in the top level of the tree with the
+ \l{QTreeWidget::insertTopLevelItem()}{insertTopLevelItem()} function.
+ At lower levels in the tree, the parent item's
+ \l{QTreeWidgetItem::insertChild()}{insertChild()} function is used.
+
+ It is easy to move items around between the top level and lower levels
+ in the tree. We just need to check whether the items are top-level items
+ or not, and this information is supplied by each item's \c parent()
+ function. For example, we can remove the current item in the tree widget
+ regardless of its location:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 10
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 11
+
+ Inserting the item somewhere else in the tree widget follows the same
+ pattern:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 8
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 9
+
+
+ \section1 Table Widgets
+
+ Tables of items similar to those found in spreadsheet applications
+ are constructed with the \c QTableWidget and \c QTableWidgetItem. These
+ provide a scrolling table widget with headers and items to use within it.
+
+ Tables can be created with a set number of rows and columns, or these
+ can be added to an unsized table as they are needed.
+
+ \snippet doc/src/snippets/qtablewidget-using/mainwindow.h 0
+ \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 0
+
+ Items are constructed outside the table before being added to the table
+ at the required location:
+
+ \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 3
+
+ Horizontal and vertical headers can be added to the table by constructing
+ items outside the table and using them as headers:
+
+ \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 1
+
+ Note that the rows and columns in the table begin at zero.
+
+ \section1 Common Features
+
+ There are a number of item-based features common to each of the
+ convenience classes that are available through the same interfaces
+ in each class. We present these in the following sections with some
+ examples for different widgets.
+ Look at the list of \l{Model/View Classes} for each of the widgets
+ for more details about the use of each function used.
+
+ \section2 Hidden Items
+
+ It is sometimes useful to be able to hide items in an item view widget
+ rather than remove them. Items for all of the above widgets can be
+ hidden and later shown again. You can determine whether an item is hidden
+ by calling the isItemHidden() function, and items can be hidden with
+ \c setItemHidden().
+
+ Since this operation is item-based, the same function is available for
+ all three convenience classes.
+
+ \section2 Selections
+
+ The way items are selected is controlled by the widget's selection mode
+ (\l{QAbstractItemView::SelectionMode}).
+ This property controls whether the user can select one or many items and,
+ in many-item selections, whether the selection must be a continuous range
+ of items. The selection mode works in the same way for all of the
+ above widgets.
+
+ \table
+ \row
+ \i \img selection-single.png
+ \i \bold{Single item selections:}
+ Where the user needs to choose a single item from a widget, the
+ default \c SingleSelection mode is most suitable. In this mode, the
+ current item and the selected item are the same.
+
+ \row
+ \i \img selection-multi.png
+ \i \bold{Multi-item selections:}
+ In this mode, the user can toggle the selection state of any item in the
+ widget without changing the existing selection, much like the way
+ non-exclusive checkboxes can be toggled independently.
+
+ \row
+ \i \img selection-extended.png
+ \i \bold{Extended selections:}
+ Widgets that often require many adjacent items to be selected, such
+ as those found in spreadsheets, require the \c ExtendedSelection mode.
+ In this mode, continuous ranges of items in the widget can be selected
+ with both the mouse and the keyboard.
+ Complex selections, involving many items that are not adjacent to other
+ selected items in the widget, can also be created if modifier keys are
+ used.
+
+ If the user selects an item without using a modifier key, the existing
+ selection is cleared.
+ \endtable
+
+ The selected items in a widget are read using the \c selectedItems()
+ function, providing a list of relevant items that can be iterated over.
+ For example, we can find the sum of all the numeric values within a
+ list of selected items with the following code:
+
+ \snippet doc/src/snippets/qtablewidget-using/mainwindow.cpp 4
+
+ Note that for the single selection mode, the current item will be in
+ the selection. In the multi-selection and extended selection modes, the
+ current item may not lie within the selection, depending on the way the
+ user formed the selection.
+
+ \section2 Searching
+
+ It is often useful to be able to find items within an item view widget,
+ either as a developer or as a service to present to users. All three
+ item view convenience classes provide a common \c findItems() function
+ to make this as consistent and simple as possible.
+
+ Items are searched for by the text that they contain according to
+ criteria specified by a selection of values from Qt::MatchFlags.
+ We can obtain a list of matching items with the \c findItems()
+ function:
+
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 6
+ \snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 7
+
+ The above code causes items in a tree widget to be selected if they
+ contain the text given in the search string. This pattern can also be
+ used in the list and table widgets.
+*/
+
+/*!
+ \page model-view-dnd.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Item View Convenience Classes
+ \nextpage Proxy Models
+
+ \title Using Drag and Drop with Item Views
+
+ \tableofcontents
+
+ \section1 Overview
+
+ Qt's drag and drop infrastructure is fully supported by the model/view framework.
+ Items in lists, tables, and trees can be dragged within the views, and data can be
+ imported and exported as MIME-encoded data.
+
+ The standard views automatically support internal drag and drop, where items are
+ moved around to change the order in which they are displayed. By default, drag and
+ drop is not enabled for these views because they are configured for the simplest,
+ most common uses. To allow items to be dragged around, certain properties of the
+ view need to be enabled, and the items themselves must also allow dragging to occur.
+
+ The requirements for a model that only allows items to be exported from a
+ view, and which does not allow data to be dropped into it, are fewer than
+ those for a fully-enabled drag and drop model.
+
+ See also the \l{Model Subclassing Reference} for more information about
+ enabling drag and drop support in new models.
+
+ \section1 Using Convenience Views
+
+ Each of the types of item used with QListWidget, QTableWidget, and QTreeWidget
+ is configured to use a different set of flags by default. For example, each
+ QListWidgetItem or QTreeWidgetItem is initially enabled, checkable, selectable,
+ and can be used as the source of a drag and drop operation; each QTableWidgetItem
+ can also be edited and used as the target of a drag and drop operation.
+
+ Although all of the standard items have one or both flags set for drag and drop,
+ you generally need to set various properties in the view itself to take advantage
+ of the built-in support for drag and drop:
+
+ \list
+ \o To enable item dragging, set the view's
+ \l{QAbstractItemView::dragEnabled}{dragEnabled} property to \c true.
+ \o To allow the user to drop either internal or external items within the view,
+ set the view's \l{QAbstractScrollArea::}{viewport()}'s
+ \l{QWidget::acceptDrops}{acceptDrops} property to \c true.
+ \o To show the user where the item currently being dragged will be placed if
+ dropped, set the view's \l{QAbstractItemView::showDropIndicator}{showDropIndicator}
+ property. This provides the user with continuously updating information about
+ item placement within the view.
+ \endlist
+
+ For example, we can enable drag and drop in a list widget with the following lines
+ of code:
+
+ \snippet doc/src/snippets/qlistwidget-dnd/mainwindow.cpp 0
+
+ The result is a list widget which allows the items to be copied
+ around within the view, and even lets the user drag items between
+ views containing the same type of data. In both situations, the
+ items are copied rather than moved.
+
+ To enable the user to move the items around within the view, we
+ must set the list widget's \l {QAbstractItemView::}{dragDropMode}:
+
+ \snippet doc/src/snippets/qlistwidget-dnd/mainwindow.cpp 1
+
+ \section1 Using Model/View Classes
+
+ Setting up a view for drag and drop follows the same pattern used with the
+ convenience views. For example, a QListView can be set up in the same way as a
+ QListWidget:
+
+ \snippet doc/src/snippets/qlistview-dnd/mainwindow.cpp 0
+
+ Since access to the data displayed by the view is controlled by a model, the
+ model used also has to provide support for drag and drop operations. The
+ actions supported by a model can be specified by reimplementing the
+ QAbstractItemModel::supportedDropActions() function. For example, copy and
+ move operations are enabled with the following code:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 10
+
+ Although any combination of values from Qt::DropActions can be given, the
+ model needs to be written to support them. For example, to allow Qt::MoveAction
+ to be used properly with a list model, the model must provide an implementation
+ of QAbstractItemModel::removeRows(), either directly or by inheriting the
+ implementation from its base class.
+
+ \section2 Enabling Drag and Drop for Items
+
+ Models indicate to views which items can be dragged, and which will accept drops,
+ by reimplementing the QAbstractItemModel::flags() function to provide suitable
+ flags.
+
+ For example, a model which provides a simple list based on QAbstractListModel
+ can enable drag and drop for each of the items by ensuring that the flags
+ returned contain the \l Qt::ItemIsDragEnabled and \l Qt::ItemIsDropEnabled
+ values:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 7
+
+ Note that items can be dropped into the top level of the model, but dragging is
+ only enabled for valid items.
+
+ In the above code, since the model is derived from QStringListModel, we
+ obtain a default set of flags by calling its implementation of the flags()
+ function.
+
+ \section2 Encoding Exported Data
+
+ When items of data are exported from a model in a drag and drop operation, they
+ are encoded into an appropriate format corresponding to one or more MIME types.
+ Models declare the MIME types that they can use to supply items by reimplementing
+ the QAbstractItemModel::mimeTypes() function, returning a list of standard MIME
+ types.
+
+ For example, a model that only provides plain text would provide the following
+ implementation:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 9
+
+ The model must also provide code to encode data in the advertised format. This
+ is achieved by reimplementing the QAbstractItemModel::mimeData() function to
+ provide a QMimeData object, just as in any other drag and drop operation.
+
+ The following code shows how each item of data, corresponding to a given list of
+ indexes, is encoded as plain text and stored in a QMimeData object.
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 8
+
+ Since a list of model indexes is supplied to the function, this approach is general
+ enough to be used in both hierarchical and non-heirarchical models.
+
+ Note that custom datatypes must be declared as \l{QMetaObject}{meta objects}
+ and that stream operators must be implemented for them. See the QMetaObject
+ class description for details.
+
+ \section2 Inserting Dropped Data into a Model
+
+ The way that any given model handles dropped data depends on both its type
+ (list, table, or tree) and the way its contents is likely to be presented to
+ the user. Generally, the approach taken to accommodate dropped data should
+ be the one that most suits the model's underlying data store.
+
+ Different types of model tend to handle dropped data in different ways. List
+ and table models only provide a flat structure in which items of data are
+ stored. As a result, they may insert new rows (and columns) when data is
+ dropped on an existing item in a view, or they may overwrite the item's
+ contents in the model using some of the data supplied. Tree models are
+ often able to add child items containing new data to their underlying data
+ stores, and will therefore behave more predictably as far as the user
+ is concerned.
+
+ Dropped data is handled by a model's reimplementation of
+ QAbstractItemModel::dropMimeData(). For example, a model that handles a
+ simple list of strings can provide an implementation that handles data
+ dropped onto existing items separately to data dropped into the top level
+ of the model (i.e., onto an invalid item).
+
+ The model first has to make sure that the operation should be acted on,
+ the data supplied is in a format that can be used, and that its destination
+ within the model is valid:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 0
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 1
+
+ A simple one column string list model can indicate failure if the data
+ supplied is not plain text, or if the column number given for the drop
+ is invalid.
+
+ The data to be inserted into the model is treated differently depending on
+ whether it is dropped onto an existing item or not. In this simple example,
+ we want to allow drops between existing items, before the first item in the
+ list, and after the last item.
+
+ When a drop occurs, the model index corresponding to the parent item will
+ either be valid, indicating that the drop occurred on an item, or it will
+ be invalid, indicating that the drop occurred somewhere in the view that
+ corresponds to top level of the model.
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 2
+
+ We initially examine the row number supplied to see if we can use it
+ to insert items into the model, regardless of whether the parent index is
+ valid or not.
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 3
+
+ If the parent model index is valid, the drop occurred on an item. In this
+ simple list model, we find out the row number of the item and use that
+ value to insert dropped items into the top level of the model.
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 4
+
+ When a drop occurs elsewhere in the view, and the row number is unusable,
+ we append items to the top level of the model.
+
+ In hierarchical models, when a drop occurs on an item, it would be better to
+ insert new items into the model as children of that item. In the simple
+ example shown here, the model only has one level, so this approach is not
+ appropriate.
+
+ \section2 Decoding Imported Data
+
+ Each implementation of \l{QAbstractItemModel::dropMimeData()}{dropMimeData()} must
+ also decode the data and insert it into the model's underlying data structure.
+
+ For a simple string list model, the encoded items can be decoded and streamed
+ into a QStringList:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 5
+
+ The strings can then be inserted into the underlying data store. For consistency,
+ this can be done through the model's own interface:
+
+ \snippet doc/src/snippets/qlistview-dnd/model.cpp 6
+
+ Note that the model will typically need to provide implementations of the
+ QAbstractItemModel::insertRows() and QAbstractItemModel::setData() functions.
+
+ \sa {Item Views Puzzle Example}
+*/
+
+/*!
+ \page model-view-proxy-models.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Using Drag and Drop with Item Views
+ \nextpage Model Subclassing Reference
+
+ \title Proxy Models
+
+ \tableofcontents
+
+ \section1 Overview
+
+ In the model/view framework, items of data supplied by a single model can be shared
+ by any number of views, and each of these can possibly represent the same information
+ in completely different ways.
+ Custom views and delegates are effective ways to provide radically different
+ representations of the same data. However, applications often need to provide
+ conventional views onto processed versions of the same data, such as differently-sorted
+ views onto a list of items.
+
+ Although it seems appropriate to perform sorting and filtering operations as internal
+ functions of views, this approach does not allow multiple views to share the results
+ of such potentially costly operations. The alternative approach, involving sorting
+ within the model itself, leads to the similar problem where each view has to display
+ items of data that are organized according to the most recent processing operation.
+
+ To solve this problem, the model/view framework uses proxy models to manage the
+ information supplied between individual models and views. Proxy models are components
+ that behave like ordinary models from the perspective of a view, and access data from
+ source models on behalf of that view. The signals and slots used by the model/view
+ framework ensure that each view is updated appropriately no matter how many proxy models
+ are placed between itself and the source model.
+
+ \section1 Using Proxy Models
+
+ Proxy models can be inserted between an existing model and any number of views.
+ Qt is supplied with a standard proxy model, QSortFilterProxyModel, that is usually
+ instantiated and used directly, but can also be subclassed to provide custom filtering
+ and sorting behavior. The QSortFilterProxyModel class can be used in the following way:
+
+ \snippet doc/src/snippets/qsortfilterproxymodel/main.cpp 0
+ \codeline
+ \snippet doc/src/snippets/qsortfilterproxymodel/main.cpp 1
+
+ Since proxy models are inherit from QAbstractItemModel, they can be connected to
+ any kind of view, and can be shared between views. They can also be used to
+ process the information obtained from other proxy models in a pipeline arrangement.
+
+ The QSortFilterProxyModel class is designed to be instantiated and used directly
+ in applications. More specialized proxy models can be created by subclassing this
+ classes and implementing the required comparison operations.
+
+ \section1 Customizing Proxy Models
+
+ Generally, the type of processing used in a proxy model involves mapping each item of
+ data from its original location in the source model to either a different location in
+ the proxy model. In some models, some items may have no corresponding location in the
+ proxy model; these models are \e filtering proxy models. Views access items using
+ model indexes provided by the proxy model, and these contain no information about the
+ source model or the locations of the original items in that model.
+
+ QSortFilterProxyModel enables data from a source model to be filtered before
+ being supplied to views, and also allows the contents of a source model to
+ be supplied to views as pre-sorted data.
+
+ \section2 Custom Filtering Models
+
+ The QSortFilterProxyModel class provides a filtering model that is fairly versatile,
+ and which can be used in a variety of common situations. For advanced users,
+ QSortFilterProxyModel can be subclassed, providing a mechanism that enables custom
+ filters to be implemented.
+
+ Subclasses of QSortFilterProxyModel can reimplement two virtual functions that are
+ called whenever a model index from the proxy model is requested or used:
+
+ \list
+ \o \l{QSortFilterProxyModel::filterAcceptsColumn()}{filterAcceptsColumn()} is used to
+ filter specific columns from part of the source model.
+ \o \l{QSortFilterProxyModel::filterAcceptsRow()}{filterAcceptsRow()} is used to filter
+ specific rows from part of the source model.
+ \endlist
+
+ The default implementations of the above functions in QSortFilterProxyModel
+ return true to ensure that all items are passed through to views; reimplementations
+ of these functions should return false to filter out individual rows and columns.
+
+ \section2 Custom Sorting Models
+
+ QSortFilterProxyModel instances use Qt's built-in qStableSort() function to set up
+ mappings between items in the source model and those in the proxy model, allowing a
+ sorted hierarchy of items to be exposed to views without modifying the structure of the
+ source model. To provide custom sorting behavior, reimplement the
+ \l{QSortFilterProxyModel::lessThan()}{lessThan()} function to perform custom
+ comparisons.
+*/
+
+/*!
+ \page model-view-model-subclassing.html
+ \contentspage model-view-programming.html Contents
+ \previouspage Proxy Models
+
+ \title Model Subclassing Reference
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Model subclasses need to provide implementations of many of the virtual functions
+ defined in the QAbstractItemModel base class. The number of these functions that need
+ to be implemented depends on the type of model - whether it supplies views with
+ a simple list, a table, or a complex hierarchy of items. Models that inherit from
+ QAbstractListModel and QAbstractTableModel can take advantage of the default
+ implementations of functions provided by those classes. Models that expose items
+ of data in tree-like structures must provide implementations for many of the
+ virtual functions in QAbstractItemModel.
+
+ The functions that need to be implemented in a model subclass can be divided into three
+ groups:
+
+ \list
+ \o \bold{Item data handling:} All models need to implement functions to enable views and
+ delegates to query the dimensions of the model, examine items, and retrieve data.
+ \o \bold{Navigation and index creation:} Hierarchical models need to provide functions
+ that views can call to navigate the tree-like structures they expose, and obtain
+ model indexes for items.
+ \o \bold{Drag and drop support and MIME type handling:} Models inherit functions that
+ control the way that internal and external drag and drop operations are performed.
+ These functions allow items of data to be described in terms of MIME types that
+ other components and applications can understand.
+ \endlist
+
+ For more information, see the \l
+ {"Item View Classes" Chapter of C++ GUI Programming with Qt 4}.
+
+ \section1 Item Data Handling
+
+ Models can provide varying levels of access to the data they provide: They can be
+ simple read-only components, some models may support resizing operations, and
+ others may allow items to be edited.
+
+ \section2 Read-Only Access
+
+ To provide read-only access to data provided by a model, the following functions
+ \e{must} be implemented in the model's subclass:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::flags()}{flags()}
+ \o Used by other components to obtain information about each item provided by
+ the model. In many models, the combination of flags should include
+ Qt::ItemIsEnabled and Qt::ItemIsSelectable.
+ \row \o \l{QAbstractItemModel::data()}{data()}
+ \o Used to supply item data to views and delegates. Generally, models only
+ need to supply data for Qt::DisplayRole and any application-specific user
+ roles, but it is also good practice to provide data for Qt::ToolTipRole,
+ Qt::AccessibleTextRole, and Qt::AccessibleDescriptionRole.
+ \row \o \l{QAbstractItemModel::headerData()}{headerData()}
+ \o Provides views with information to show in their headers. The information is
+ only retrieved by views that can display header information.
+ \row \o \l{QAbstractItemModel::rowCount()}{rowCount()}
+ \o Provides the number of rows of data exposed by the model.
+ \endtable
+
+ These four functions must be implemented in all types of model, including list models
+ (QAbstractListModel subclasses) and table models (QAbstractTableModel subclasses).
+
+ Additionally, the following functions \e{must} be implemented in direct subclasses
+ of QAbstractTableModel and QAbstractItemModel:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::columnCount()}{columnCount()}
+ \o Provides the number of columns of data exposed by the model. List models do not
+ provide this function because it is already implemented in QAbstractListModel.
+ \endtable
+
+ \section2 Editable Items
+
+ Editable models allow items of data to be modified, and may also provide
+ functions to allow rows and columns to be inserted and removed. To enable
+ editing, the following functions must be implemented correctly:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::flags()}{flags()}
+ \o Must return an appropriate combination of flags for each item. In particular,
+ the value returned by this function must include \l{Qt::ItemIsEditable} in
+ addition to the values applied to items in a read-only model.
+ \row \o \l{QAbstractItemModel::setData()}{setData()}
+ \o Used to modify the item of data associated with a specified model index.
+ To be able to accept user input, provided by user interface elements, this
+ function must handle data associated with Qt::EditRole.
+ The implementation may also accept data associated with many different kinds
+ of roles specified by Qt::ItemDataRole. After changing the item of data,
+ models must emit the \l{QAbstractItemModel::dataChanged()}{dataChanged()}
+ signal to inform other components of the change.
+ \row \o \l{QAbstractItemModel::setHeaderData()}{setHeaderData()}
+ \o Used to modify horizontal and vertical header information. After changing
+ the item of data, models must emit the
+ \l{QAbstractItemModel::headerDataChanged()}{headerDataChanged()}
+ signal to inform other components of the change.
+ \endtable
+
+ \section2 Resizable Models
+
+ All types of model can support the insertion and removal of rows. Table models
+ and hierarchical models can also support the insertion and removal of columns.
+ It is important to notify other components about changes to the model's dimensions
+ both \e before and \e after they occur. As a result, the following functions
+ can be implemented to allow the model to be resized, but implementations must
+ ensure that the appropriate functions are called to notify attached views and
+ delegates:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::insertRows()}{insertRows()}
+ \o Used to add new rows and items of data to all types of model.
+ Implementations must call
+ \l{QAbstractItemModel::beginInsertRows()}{beginInsertRows()} \e before
+ inserting new rows into any underlying data structures, and call
+ \l{QAbstractItemModel::endInsertRows()}{endInsertRows()}
+ \e{immediately afterwards}.
+ \row \o \l{QAbstractItemModel::removeRows()}{removeRows()}
+ \o Used to remove rows and the items of data they contain from all types of model.
+ Implementations must call
+ \l{QAbstractItemModel::beginRemoveRows()}{beginRemoveRows()}
+ \e before inserting new columns into any underlying data structures, and call
+ \l{QAbstractItemModel::endRemoveRows()}{endRemoveRows()}
+ \e{immediately afterwards}.
+ \row \o \l{QAbstractItemModel::insertColumns()}{insertColumns()}
+ \o Used to add new columns and items of data to table models and hierarchical models.
+ Implementations must call
+ \l{QAbstractItemModel::beginInsertColumns()}{beginInsertColumns()} \e before
+ rows are removed from any underlying data structures, and call
+ \l{QAbstractItemModel::endInsertColumns()}{endInsertColumns()}
+ \e{immediately afterwards}.
+ \row \o \l{QAbstractItemModel::removeColumns()}{removeColumns()}
+ \o Used to remove columns and the items of data they contain from table models and
+ hierarchical models.
+ Implementations must call
+ \l{QAbstractItemModel::beginRemoveColumns()}{beginRemoveColumns()}
+ \e before columns are removed from any underlying data structures, and call
+ \l{QAbstractItemModel::endRemoveColumns()}{endRemoveColumns()}
+ \e{immediately afterwards}.
+ \endtable
+
+ Generally, these functions should return true if the operation was successful.
+ However, there may be cases where the operation only partly succeeded; for example,
+ if less than the specified number of rows could be inserted. In such cases, the
+ model should return false to indicate failure to enable any attached components to
+ handle the situation.
+
+ The signals emitted by the functions called in implementations of the resizing
+ API give attached components the chance to take action before any data becomes
+ unavailable. The encapsulation of insert and remove operations with begin and end
+ functions also enable the model to manage
+ \l{QPersistentModelIndex}{persistent model indexes} correctly.
+
+ Normally, the begin and end functions are capable of informing other components
+ about changes to the model's underlying structure. For more complex changes to the
+ model's structure, perhaps involving internal reorganization or sorting of data,
+ it is necessary to emit the \l{QAbstractItemModel::layoutChanged()}{layoutChanged()}
+ signal to cause any attached views to be updated.
+
+ \section2 Lazy Population of Model Data
+
+ Lazy population of model data effectively allows requests for information
+ about the model to be deferred until it is actually needed by views.
+
+ Some models need to obtain data from remote sources, or must perform
+ time-consuming operations to obtain information about the way the
+ data is organized. Since views generally request as much information
+ as possible in order to accurately display model data, it can be useful
+ to restrict the amount of information returned to them to reduce
+ unnecessary follow-up requests for data.
+
+ In hierarchical models where finding the number of children of a given
+ item is an expensive operation, it is useful to ensure that the model's
+ \l{QAbstractItemModel::}{rowCount()} implementation is only called when
+ necessary. In such cases, the \l{QAbstractItemModel::}{hasChildren()}
+ function can be reimplemented to provide an inexpensive way for views to
+ check for the presence of children and, in the case of QTreeView, draw
+ the appropriate decoration for their parent item.
+
+ Whether the reimplementation of \l{QAbstractItemModel::}{hasChildren()}
+ returns \c true or \c false, it may not be necessary for the view to call
+ \l{QAbstractItemModel::}{rowCount()} to find out how many children are
+ present. For example, QTreeView does not need to know how many children
+ there are if the parent item has not been expanded to show them.
+
+ If it is known that many items will have children, reimplementing
+ \l{QAbstractItemModel::}{hasChildren()} to unconditionally return \c true
+ is sometimes a useful approach to take. This ensures that each item can
+ be later examined for children while making initial population of model
+ data as fast as possible. The only disadvantage is that items without
+ children may be displayed incorrectly in some views until the user
+ attempts to view the non-existent child items.
+
+
+ \section1 Navigation and Model Index Creation
+
+ Hierarchical models need to provide functions that views can call to navigate the
+ tree-like structures they expose, and obtain model indexes for items.
+
+ \section2 Parents and Children
+
+ Since the structure exposed to views is determined by the underlying data
+ structure, it is up to each model subclass to create its own model indexes
+ by providing implementations of the following functions:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::index()}{index()}
+ \o Given a model index for a parent item, this function allows views and delegates
+ to access children of that item. If no valid child item - corresponding to the
+ specified row, column, and parent model index, can be found, the function
+ must return QModelIndex(), which is an invalid model index.
+ \row \o \l{QAbstractItemModel::parent()}{parent()}
+ \o Provides a model index corresponding to the parent of any given child item.
+ If the model index specified corresponds to a top-level item in the model, or if
+ there is no valid parent item in the model, the function must return
+ an invalid model index, created with the empty QModelIndex() constructor.
+ \endtable
+
+ Both functions above use the \l{QAbstractItemModel::createIndex()}{createIndex()}
+ factory function to generate indexes for other components to use. It is normal for
+ models to supply some unique identifier to this function to ensure that
+ the model index can be re-associated with its corresponding item later on.
+
+ \section1 Drag and Drop Support and MIME Type Handling
+
+ The model/view classes support drag and drop operations, providing default behavior
+ that is sufficient for many applications. However, it is also possible to customize
+ the way items are encoded during drag and drop operations, whether they are copied
+ or moved by default, and how they are inserted into existing models.
+
+ Additionally, the convenience view classes implement specialized behavior that
+ should closely follow that expected by existing developers.
+ The \l{#Convenience Views}{Convenience Views} section provides an overview of this
+ behavior.
+
+ \section2 MIME Data
+
+ By default, the built-in models and views use an internal MIME type
+ (\c{application/x-qabstractitemmodeldatalist}) to pass around information about
+ model indexes. This specifies data for a list of items, containing the row and
+ column numbers of each item, and information about the roles that each item
+ supports.
+
+ Data encoded using this MIME type can be obtained by calling
+ QAbstractItemModel::mimeData() with a QModelIndexList containing the items to
+ be serialized.
+ \omit
+ The following types are used to store information about
+ each item as it is streamed into a QByteArray and stored in a QMimeData object:
+
+ \table 90%
+ \header \o Description \o Type
+ \row \o Row \o int
+ \row \o Column \o int
+ \row \o Data for each role \o QMap<int, QVariant>
+ \endtable
+
+ This information can be retrieved for use in non-model classes by calling
+ QMimeData::data() with the \c{application/x-qabstractitemmodeldatalist} MIME
+ type and streaming out the items one by one.
+ \endomit
+
+ When implementing drag and drop support in a custom model, it is possible to
+ export items of data in specialized formats by reimplementing the following
+ function:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::mimeData()}{mimeData()}
+ \o This function can be reimplemented to return data in formats other
+ than the default \c{application/x-qabstractitemmodeldatalist} internal
+ MIME type.
+
+ Subclasses can obtain the default QMimeData object from the base class
+ and add data to it in additional formats.
+ \endtable
+
+ For many models, it is useful to provide the contents of items in common format
+ represented by MIME types such as \c{text/plain} and \c{image/png}. Note that
+ images, colors and HTML documents can easily be added to a QMimeData object with
+ the QMimeData::setImageData(), QMimeData::setColorData(), and
+ QMimeData::setHtml() functions.
+
+ \section2 Accepting Dropped Data
+
+ When a drag and drop operation is performed over a view, the underlying model is
+ queried to determine which types of operation it supports and the MIME types
+ it can accept. This information is provided by the
+ QAbstractItemModel::supportedDropActions() and QAbstractItemModel::mimeTypes()
+ functions. Models that do not override the implementations provided by
+ QAbstractItemModel support copy operations and the default internal MIME type
+ for items.
+
+ When serialized item data is dropped onto a view, the data is inserted into
+ the current model using its implementation of QAbstractItemModel::dropMimeData().
+ The default implementation of this function will never overwrite any data in the
+ model; instead, it tries to insert the items of data either as siblings of an
+ item, or as children of that item.
+
+ To take advantage of QAbstractItemModel's default implementation for the built-in
+ MIME type, new models must provide reimplementations of the following functions:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::insertRows()}{insertRows()}
+ \o {1, 2} These functions enable the model to automatically insert new data using
+ the existing implementation provided by QAbstractItemModel::dropMimeData().
+ \row \o \l{QAbstractItemModel::insertColumns()}{insertColumns()}
+ \row \o \l{QAbstractItemModel::setData()}{setData()}
+ \o Allows the new rows and columns to be populated with items.
+ \row \o \l{QAbstractItemModel::setItemData()}{setItemData()}
+ \o This function provides more efficient support for populating new items.
+ \endtable
+
+ To accept other forms of data, these functions must be reimplemented:
+
+ \table 90%
+ \row \o \l{QAbstractItemModel::supportedDropActions()}{supportedDropActions()}
+ \o Used to return a combination of \l{Qt::DropActions}{drop actions},
+ indicating the types of drag and drop operations that the model accepts.
+ \row \o \l{QAbstractItemModel::mimeTypes()}{mimeTypes()}
+ \o Used to return a list of MIME types that can be decoded and handled by
+ the model. Generally, the MIME types that are supported for input into
+ the model are the same as those that it can use when encoding data for
+ use by external components.
+ \row \o \l{QAbstractItemModel::dropMimeData()}{dropMimeData()}
+ \o Performs the actual decoding of the data transferred by drag and drop
+ operations, determines where in the model it will be set, and inserts
+ new rows and columns where necessary. How this function is implemented
+ in subclasses depends on the requirements of the data exposed by each
+ model.
+ \endtable
+
+ If the implementation of the \l{QAbstractItemModel::dropMimeData()}{dropMimeData()}
+ function changes the dimensions of a model by inserting or removing rows or
+ columns, or if items of data are modified, care must be taken to ensure that
+ all relevant signals are emitted. It can be useful to simply call
+ reimplementations of other functions in the subclass, such as
+ \l{QAbstractItemModel::setData()}{setData()},
+ \l{QAbstractItemModel::insertRows()}{insertRows()}, and
+ \l{QAbstractItemModel::insertColumns()}{insertColumns()}, to ensure that the
+ model behaves consistently.
+
+ In order to ensure drag operations work properly, it is important to
+ reimplement the following functions that remove data from the model:
+
+ \list
+ \o \l{QAbstractItemModel::}{removeRows()}
+ \o \l{QAbstractItemModel::}{removeRow()}
+ \o \l{QAbstractItemModel::}{removeColumns()}
+ \o \l{QAbstractItemModel::}{removeColumn()}
+ \endlist
+
+ For more information about drag and drop with item views, refer to
+ \l{Using Drag and Drop with Item Views}.
+
+ \section2 Convenience Views
+
+ The convenience views (QListWidget, QTableWidget, and QTreeWidget) override
+ the default drag and drop functionality to provide less flexible, but more
+ natural behavior that is appropriate for many applications. For example,
+ since it is more common to drop data into cells in a QTableWidget, replacing
+ the existing contents with the data being transferred, the underlying model
+ will set the data of the target items rather than insert new rows and columns
+ into the model. For more information on drag and drop in convenience views,
+ you can see \l{Using Drag and Drop with Item Views}.
+
+ \section1 Performance Optimization for Large Amounts of Data
+
+ The \l{QAbstractItemModel::}{canFetchMore()} function checks if the parent
+ has more data available and returns true or false accordingly. The
+ \l{QAbstractItemModel::}{fetchMore()} function fetches data based on the
+ parent specified. Both these functions can be combined, for example, in a
+ database query involving incremental data to populate a QAbstractItemModel.
+ We reimplement \l{QAbstractItemModel::}{canFetchMore()} to indicate if there
+ is more data to be fetched and \l{QAbstractItemModel::}{fetchMore()} to
+ populate the model as required.
+
+ Another example would be dynamically populated tree models, where we
+ reimplement \l{QAbstractItemModel::}{fetchMore()} when a branch in the tree
+ model is expanded.
+
+ If your reimplementation of \l{QAbstractItemModel::}{fetchMore()} adds rows
+ to the model, you need to call \l{QAbstractItemModel::}{beginInsertRows()}
+ and \l{QAbstractItemModel::}{endInsertRows()}. Also, both
+ \l{QAbstractItemModel::}{canFetchMore()} and \l{QAbstractItemModel::}
+ {fetchMore()} must be reimplemented as their default implementation returns
+ false and does nothing.
+*/
+
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
new file mode 100644
index 0000000..7372994
--- /dev/null
+++ b/doc/src/modules.qdoc
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group modules
+ \title Qt's Modules
+ \startpage index.html Qt Reference Documentation
+ \nextpage QtCore
+
+ Qt 4 consists of several modules, each of which lives in a
+ separate library.
+
+ Modules for general software development:
+
+ \table 80%
+ \row \o \l{QtCore} \o Core non-graphical classes used by other modules
+ \row \o \l{QtGui} \o Graphical user interface (GUI) components
+ \row \o \l{QtNetwork} \o Classes for network programming
+ \row \o \l{QtOpenGL} \o OpenGL support classes
+ \row \o \l{QtScript} \o Classes for evaluating Qt Scripts
+ \row \o \l{QtScriptTools} \o Additional Qt Script components
+ \row \o \l{QtSql} \o Classes for database integration using SQL
+ \row \o \l{QtSvg} \o Classes for displaying the contents of SVG files
+ \row \o \l{QtWebKit} \o Classes for displaying and editing Web content
+ \row \o \l{QtXml} \o Classes for handling XML
+ \row \o \l{QtXmlPatterns} \o An XQuery & XPath engine for XML and custom data models
+ \row \o \l{Phonon Module}{Phonon} \o Multimedia framework classes
+ \row \o \l{Qt3Support} \o Qt 3 compatibility classes
+ \endtable
+
+ Modules for working with Qt's tools:
+
+ \table 80%
+ \row \o \l{QtDesigner} \o Classes for extending \QD
+ \row \o \l{QtUiTools} \o Classes for handling \QD forms in applications
+ \row \o \l{QtHelp} \o Classes for online help
+ \row \o \l{QtAssistant} \o Support for online help
+ \row \o \l{QtTest} \o Tool classes for unit testing
+ \endtable
+
+ The following extension modules are available in the \l{Qt
+ Commercial Editions} on Windows:
+
+ \table 80%
+ \row \o \l{QAxContainer} \o Extension for accessing ActiveX controls
+ \row \o \l{QAxServer} \o Extension for writing ActiveX servers
+ \endtable
+
+ The following extension module is available in all \l {Qt Editions}
+ on Unix platforms:
+
+ \table 80%
+ \row \o \l{QtDBus} \o Classes for Inter-Process Communication using the D-Bus
+ \endtable
+
+ If you use \l qmake to build your projects, the QtCore and QtGui
+ modules are included by default. To link only against QtCore, add
+ the following line to your \c .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_modules.qdoc 0
+
+ On Windows, if you do not use \l qmake, the \l{Visual Studio Integration}
+ available to \l{Qt Commercial Editions}{commercial licensees}, or other
+ build tools such as CMake, you also need to link against the \c qtmain library.
+
+ \sa {Qt's Classes}
+*/
diff --git a/doc/src/object.qdoc b/doc/src/object.qdoc
new file mode 100644
index 0000000..3bd563a
--- /dev/null
+++ b/doc/src/object.qdoc
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page object.html
+ \title Qt Object Model
+ \ingroup architecture
+ \brief A description of the powerful features made possible by Qt's dynamic object model.
+
+ The standard C++ object model provides very efficient runtime
+ support for the object paradigm. But its static nature is
+ inflexibile in certain problem domains. Graphical user interface
+ programming is a domain that requires both runtime efficiency and
+ a high level of flexibility. Qt provides this, by combining the
+ speed of C++ with the flexibility of the Qt Object Model.
+
+ Qt adds these features to C++:
+
+ \list
+ \o a very powerful mechanism for seamless object
+ communication called \l{signals and slots}
+ \o queryable and designable \l{Qt's Property System}{object
+ properties}
+ \o powerful \l{events and event filters}
+ \o contextual \l{i18n}{string translation for internationalization}
+ \o sophisticated interval driven \l timers that make it possible
+ to elegantly integrate many tasks in an event-driven GUI
+ \o hierarchical and queryable \l{Object Trees and Object Ownership}{object
+ trees} that organize object ownership in a natural way
+ \o guarded pointers (QPointer) that are automatically
+ set to 0 when the referenced object is destroyed, unlike normal C++
+ pointers which become dangling pointers when their objects are destroyed
+ \o a \l{metaobjects.html#qobjectcast}{dynamic cast} that works across
+ library boundaries.
+ \endlist
+
+ Many of these Qt features are implemented with standard C++
+ techniques, based on inheritance from QObject. Others, like the
+ object communication mechanism and the dynamic property system,
+ require the \l{Meta-Object System} provided
+ by Qt's own \l{moc}{Meta-Object Compiler (moc)}.
+
+ The meta-object system is a C++ extension that makes the language
+ better suited to true component GUI programming. Although
+ templates can be used to extend C++, the meta-object system
+ provides benefits using standard C++ that cannot be achieved with
+ templates; see \l{Why Doesn't Qt Use Templates for Signals and
+ Slots?}
+
+ \target Identity vs Value
+ \section1 Qt Objects: Identity vs Value
+
+ Some of the added features listed above for the Qt Object Model,
+ require that we think of Qt Objects as identities, not values.
+ Values are copied or assigned; identities are cloned. Cloning
+ means to create a new identity, not an exact copy of the old
+ one. For example, twins have different identities. They may look
+ identical, but they have different names, different locations, and
+ may have completely different social networks.
+
+ Then cloning an identity is a more complex operation than copying
+ or assigning a value. We can see what this means in the Qt Object
+ Model.
+
+ \bold{A Qt Object...}
+
+ \list
+
+ \o might have a unique \l{QObject::objectName()}. If we copy a Qt
+ Object, what name should we give the copy?
+
+ \o has a location in an \l{Object Trees and Object Ownership}
+ {object hierarchy}. If we copy a Qt Object, where should the copy
+ be located?
+
+ \o can be connected to other Qt Objects to emit signals to them or
+ to receive signals emitted by them. If we copy a Qt Object, how
+ should we transfer these connections to the copy?
+
+ \o can have \l{Qt's Property System} {new properties} added to it
+ at runtime that are not declared in the C++ class. If we copy a Qt
+ Object, should the copy include the properties that were added to
+ the original?
+
+ \endlist
+
+ For these reasons, Qt Objects should be treated as identities, not
+ as values. Identities are cloned, not copied or assigned, and
+ cloning an identity is a more complex operation than copying or
+ assigning a value. Therefore, QObject and all subclasses of
+ QObject (direct or indirect) have their \l{No copy constructor}
+ {copy constructor and assignment operator} disabled.
+
+ */
diff --git a/doc/src/objecttrees.qdoc b/doc/src/objecttrees.qdoc
new file mode 100644
index 0000000..4b868c0
--- /dev/null
+++ b/doc/src/objecttrees.qdoc
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page objecttrees.html
+\title Object Trees and Object Ownership
+\ingroup architecture
+\brief Information about the parent-child pattern used to describe
+object ownership in Qt.
+
+\section1 Overview
+
+\link QObject QObjects\endlink organize themselves in object trees.
+When you create a QObject with another object as parent, it's added to
+the parent's \link QObject::children() children() \endlink list, and
+is deleted when the parent is. It turns out that this approach fits
+the needs of GUI objects very well. For example, a \l QShortcut
+(keyboard shortcut) is a child of the relevant window, so when the
+user closes that window, the shorcut is deleted too.
+
+\l QWidget, the base class of everything that appears on the screen,
+extends the parent-child relationship. A child normally also becomes a
+child widget, i.e. it is displayed in its parent's coordinate system
+and is graphically clipped by its parent's boundaries. For example,
+when the application deletes a message box after it has been
+closed, the message box's buttons and label are also deleted, just as
+we'd want, because the buttons and label are children of the message
+box.
+
+You can also delete child objects yourself, and they will remove
+themselves from their parents. For example, when the user removes a
+toolbar it may lead to the application deleting one of its \l QToolBar
+objects, in which case the tool bar's \l QMainWindow parent would
+detect the change and reconfigure its screen space accordingly.
+
+The debugging functions \l QObject::dumpObjectTree() and \l
+QObject::dumpObjectInfo() are often useful when an application looks or
+acts strangely.
+
+\target note on the order of construction/destruction of QObjects
+\section1 Construction/Destruction Order of QObjects
+
+When \l {QObject} {QObjects} are created on the heap (i.e., created
+with \e new), a tree can be constructed from them in any order, and
+later, the objects in the tree can be destroyed in any order. When any
+QObject in the tree is deleted, if the object has a parent, the
+destructor automatically removes the object from its parent. If the
+object has children, the destructor automatically deletes each
+child. No QObject is deleted twice, regardless of the order of
+destruction.
+
+When \l {QObject} {QObjects} are created on the stack, the same
+behavior applies. Normally, the order of destruction still doesn't
+present a problem. Consider the following snippet:
+
+\snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 0
+
+The parent, \c window, and the child, \c quit, are both \l {QObject}
+{QObjects} because QPushButton inherits QWidget, and QWidget inherits
+QObject. This code is correct: the destructor of \c quit is \e not
+called twice because the C++ language standard \e {(ISO/IEC 14882:2003)}
+specifies that destructors of local objects are called in the reverse
+order of their constructors. Therefore, the destructor of
+the child, \c quit, is called first, and it removes itself from its
+parent, \c window, before the destructor of \c window is called.
+
+But now consider what happens if we swap the order of construction, as
+shown in this second snippet:
+
+\snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 1
+
+In this case, the order of destruction causes a problem. The parent's
+destructor is called first because it was created last. It then calls
+the destructor of its child, \c quit, which is incorrect because \c
+quit is a local variable. When \c quit subsequently goes out of scope,
+its destructor is called again, this time correctly, but the damage has
+already been done.
+
+*/
diff --git a/doc/src/opensourceedition.qdoc b/doc/src/opensourceedition.qdoc
new file mode 100644
index 0000000..d8253d3
--- /dev/null
+++ b/doc/src/opensourceedition.qdoc
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page opensourceedition.html
+
+ \title Open Source Versions of Qt
+ \ingroup licensing
+ \brief Information about the license and features of the Open Source Edition.
+
+ Free (or open source) software is software that comes with a license
+ that gives users certain rights. In particular the right to use the
+ software, to modify it, to obtain its source, and to pass it on (under
+ the same terms). Notice that the term "free" is about rights, not
+ money. The Free Software Foundation (creators of the GNU GPL) speaks
+ of free in this context as in "free speech", not as in "no cost".
+
+ Qt Software supports the free software concept by providing the Qt Open Source
+ Edition, which is licensed under the \l{GNU General Public License (GPL)}
+ (version 3) and the \l{GNU Lesser General Public License (LGPL)} (version 2.1).
+ You can use this edition of Qt to create and distribute software with licenses
+ that are compatible to these free software licenses.
+
+ The support of open source with the Open Source Versions of Qt has enabled large
+ successful software projects like KDE to thrive, with thousands of developers
+ around the world using open source versions of Qt at no cost to themselves. With
+ the release of Qt 4, open source versions of Qt became available for Unix/X11,
+ Mac OS X, and Windows platforms.
+
+ The Open Source Edition can be downloaded from the \l{Downloads}{Qt website}.
+
+ Please refer to the online \l{License FAQ} for answers to frequently asked
+ questions on open source licensing and its implications.
+
+ More information on Free and Open Source software is available online:
+
+ \list
+ \o GNU GPL: \l http://www.gnu.org/.
+ \o Open Source licensing: \l http://www.opensource.org/.
+ \endlist
+
+ See \l{Licensing Information} for a collection of documents about licenses
+ used in Qt.
+
+ Information about Qt Commercial License Agreements is available
+ in the \l{Qt Licensing Overview} on the Qt website or by email
+ from \l{mailto:qt-sales@nokia.com}{qt-sales@nokia.com}.
+
+ If you are in doubt what edition of Qt is right for your project,
+ please contact
+ \l{mailto:qt-info@nokia.com}{qt-info@nokia.com}.
+
+*/
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
new file mode 100644
index 0000000..8eb4e35
--- /dev/null
+++ b/doc/src/overviews.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page overviews.html
+
+ \title All Overviews and HOWTOs
+
+ \generatelist overviews
+*/
diff --git a/doc/src/paintsystem.qdoc b/doc/src/paintsystem.qdoc
new file mode 100644
index 0000000..11b9a5b
--- /dev/null
+++ b/doc/src/paintsystem.qdoc
@@ -0,0 +1,485 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page paintsystem.html
+
+ \title The Paint System
+
+ Qt's paint system enables painting on screen and print devices
+ using the same API, and is primarily based on the QPainter,
+ QPaintDevice, and QPaintEngine classes.
+
+ QPainter is used to perform drawing operations, QPaintDevice is an
+ abstraction of a two-dimensional space that can be painted on
+ using a QPainter, and QPaintEngine provides the interface that the
+ painter uses to draw onto different types of devices. The
+ QPaintEngine class is used internally by QPainter and
+ QPaintDevice, and is hidden from application programmers unless
+ they create their own device type.
+
+ \image paintsystem-core.png
+
+ The main benefit of this approach is that all painting follows the
+ same painting pipeline making it easy to add support for new
+ features and providing default implementations for unsupported
+ ones.
+
+ Alternatively, Qt provides the QtOpenGL module, offering classes
+ that makes it easy to use OpenGL in Qt applications. Among others,
+ the module provides an OpenGL widget class that can be used just
+ like any other Qt widget, except that it opens an OpenGL display
+ buffer where the OpenGL API can be used to render the contents.
+
+ \tableofcontents section1
+
+ \section1 Drawing
+
+ QPainter provides highly optimized functions to do most of the
+ drawing GUI programs require. It can draw everything from simple
+ graphical primitives (represented by the QPoint, QLine, QRect,
+ QRegion and QPolygon classes) to complex shapes like vector
+ paths. In Qt vector paths are represented by the QPainterPath
+ class. QPainterPath provides a container for painting operations,
+ enabling graphical shapes to be constructed and reused.
+
+ \table 100%
+ \row
+ \o \image paintsystem-painterpath.png
+ \o \bold QPainterPath
+
+ A painter path is an object composed of lines and curves. For
+ example, a rectangle is composed by lines and an ellipse is
+ composed by curves.
+
+ The main advantage of painter paths over normal drawing operations
+ is that complex shapes only need to be created once; then they can
+ be drawn many times using only calls to the QPainter::drawPath()
+ function.
+
+ A QPainterPath object can be used for filling, outlining, and
+ clipping. To generate fillable outlines for a given painter path,
+ use the QPainterPathStroker class.
+
+ \endtable
+
+ Lines and outlines are drawn using the QPen class. A pen is
+ defined by its style (i.e. its line-type), width, brush, how the
+ endpoints are drawn (cap-style) and how joins between two
+ connected lines are drawn (join-style). The pen's brush is a
+ QBrush object used to fill strokes generated with the pen,
+ i.e. the QBrush class defines the fill pattern.
+
+ QPainter can also draw aligned text and pixmaps.
+
+ When drawing text, the font is specified using the QFont class. Qt
+ will use the font with the specified attributes, or if no matching
+ font exists, Qt will use the closest matching installed font. The
+ attributes of the font that is actually used can be retrieved
+ using the QFontInfo class. In addition, the QFontMetrics class
+ provides the font measurements, and the QFontDatabase class
+ provides information about the fonts available in the underlying
+ window system.
+
+ Normally, QPainter draws in a "natural" coordinate system, but it
+ is able to perform view and world transformations using the
+ QMatrix class. For more information, see \l {The Coordinate
+ System} documentation which also describes the rendering process,
+ i.e. the relation between the logical representation and the
+ rendered pixels, and the benefits of anti-aliased painting.
+
+ \table 100%
+ \row \o
+ \bold {Anti-Aliased Painting}
+
+ When drawing, the pixel rendering is controlled by the
+ QPainter::Antialiasing render hint. The QPainter::RenderHint enum
+ is used to specify flags to QPainter that may or may not be
+ respected by any given engine.
+
+ The QPainter::Antialiasing value indicates that the engine should
+ antialias edges of primitives if possible, i.e. smoothing the
+ edges by using different color intensities.
+
+ \o \image paintsystem-antialiasing.png
+
+ \endtable
+
+ \section1 Filling
+
+ Shapes are filled using the QBrush class. A brush is defined
+ by its color and its style (i.e. its fill pattern).
+
+ Any color in Qt is represented by the QColor class which supports
+ the RGB, HSV and CMYK color models. QColor also support
+ alpha-blended outlining and filling (specifying the transparency
+ effect), and the class is platform and device independent (the
+ colors are mapped to hardware using the QColormap class). For more
+ information, see the QColor class documentation.
+
+ When creating a new widget, it is recommend to use the colors in
+ the widget's palette rather than hard-coding specific colors. All
+ widgets in Qt contain a palette and use their palette to draw
+ themselves. A widget's palette is represented by the QPalette
+ class which contains color groups for each widget state.
+
+ The available fill patterns are described by the Qt::BrushStyle
+ enum. These include basic patterns spanning from uniform color to
+ very sparse pattern, various line combinations, gradient fills and
+ textures. Qt provides the QGradient class to define custom
+ gradient fills, while texture patterns are specified using the
+ QPixmap class.
+
+ \table 100%
+ \row
+ \o \image paintsystem-fancygradient.png
+ \o \bold QGradient
+
+ The QGradient class is used in combination with QBrush to specify
+ gradient fills.
+
+ \image paintsystem-gradients.png
+
+ Qt currently supports three types of gradient fills: Linear
+ gradients interpolate colors between start and end points, radial
+ gradients interpolate colors between a focal point and end points
+ on a circle surrounding it, and conical gradients interpolate
+ colors around a center point.
+
+ \endtable
+
+ \section1 Creating a Paint Device
+
+ The QPaintDevice class is the base class of objects that can be
+ painted, i.e. QPainter can draw on any QPaintDevice
+ subclass. QPaintDevice's drawing capabilities are currently
+ implemented by the QWidget, QImage, QPixmap, QGLWidget,
+ QGLPixelBuffer, QPicture and QPrinter subclasses.
+
+ \image paintsystem-devices.png
+
+ \table 100%
+ \row \o \bold {Custom Backends}
+
+ Support for a new backend can be implemented by deriving from the
+ QPaintDevice class and reimplementing the virtual
+ QPaintDevice::paintEngine() function to tell QPainter which paint
+ engine should be used to draw on this particular device. To
+ actually be able to draw on the device, this paint engine must be
+ a custom paint engine created by deriving from the QPaintEngine
+ class.
+
+ \endtable
+
+ \section2 Widget
+
+ The QWidget class is the base class of all user interface
+ objects. The widget is the atom of the user interface: it receives
+ mouse, keyboard and other events from the window system, and
+ paints a representation of itself on the screen.
+
+ \section2 Image
+
+ The QImage class provides a hardware-independent image
+ representation which is designed and optimized for I/O, and for
+ direct pixel access and manipulation. QImage supports several
+ image formats including monochrome, 8-bit, 32-bit and
+ alpha-blended images.
+
+ One advantage of using QImage as a paint device is that it is
+ possible to guarantee the pixel exactness of any drawing operation
+ in a platform-independent way. Another benefit is that the
+ painting can be performed in another thread than the current GUI
+ thread.
+
+ \section2 Pixmap
+
+ The QPixmap class is an off-screen image representation which is
+ designed and optimized for showing images on screen. Unlike
+ QImage, the pixel data in a pixmap is internal and is managed by
+ the underlying window system, i.e. pixels can only be accessed
+ through QPainter functions or by converting the QPixmap to a
+ QImage.
+
+ To optimize drawing with QPixmap, Qt provides the QPixmapCache
+ class which can be used to store temporary pixmaps that are
+ expensive to generate without using more storage space than the
+ cache limit.
+
+ Qt also provides the QBitmap convenience class, inheriting
+ QPixmap. QBitmap guarantees monochrome (1-bit depth) pixmaps, and
+ is mainly used for creating custom QCursor and QBrush objects,
+ constructing QRegion objects, and for setting masks for pixmaps
+ and widgets.
+
+ \section2 OpenGL Widget
+
+ As mentioned above, Qt provides the QtOpenGL module offering
+ classes that makes it easy to use OpenGL in Qt applications. For
+ example, the QGLWidget enables the OpenGL API for
+ rendering.
+
+ But QGLWidget is also a QWidget subclass, and can be used by
+ QPainter as any other paint device. One huge benefit from this is
+ that it enables Qt to utilize the high performance of OpenGL for
+ most drawing operations, such as transformations and pixmap
+ drawing.
+
+ \section2 Pixel Buffer
+
+ The QtOpenGL module also provides the QGLPixelBuffer class which
+ inherits QPaintDevice directly.
+
+ QGLPixelBuffer encapsulates an OpenGL pbuffer. Rendering into a
+ pbuffer is normally done using full hardware acceleration which
+ can be significantly faster than rendering into a QPixmap.
+
+ \section2 Framebuffer Object
+
+ The QtOpenGL module also provides the QGLFramebufferObject class
+ which inherits QPaintDevice directly.
+
+ QGLFramebufferObject encapsulates an OpenGL framebuffer object.
+ Framebuffer objects can also be used for off-screen rendering, and
+ offer several advantages over pixel buffers for this purpose.
+ These are described in the QGLFramebufferObject class documentation.
+
+ \section2 Picture
+
+ The QPicture class is a paint device that records and replays
+ QPainter commands. A picture serializes painter commands to an IO
+ device in a platform-independent format. QPicture is also
+ resolution independent, i.e. a QPicture can be displayed on
+ different devices (for example svg, pdf, ps, printer and screen)
+ looking the same.
+
+ Qt provides the QPicture::load() and QPicture::save() functions
+ for loading and saving pictures. But in addition the QPictureIO
+ class is provided to enable the programmer to install new picture
+ file formats in addition to those that Qt provides.
+
+ \section2 Printer
+
+ The QPrinter class is a paint device that paints on a printer. On
+ Windows or Mac OS X, QPrinter uses the built-in printer
+ drivers. On X11, QPrinter generates postscript and sends that to
+ lpr, lp, or another print program. QPrinter can also print to any
+ other QPrintEngine object.
+
+ The QPrintEngine class defines an interface for how QPrinter
+ interacts with a given printing subsystem. The common case when
+ creating your own print engine, is to derive from both
+ QPaintEngine and QPrintEngine.
+
+ The output format is by default determined by the platform the
+ printer is running on, but by explicitly setting the output format
+ to QPrinter::PdfFormat, QPrinter will generate its output as a PDF
+ file.
+
+ \section1 Reading and Writing Image Files
+
+ The most common way to read images is through QImage and QPixmap's
+ constructors, or by calling the QImage::load() and QPixmap::load()
+ functions. In addition, Qt provides the QImageReader class which
+ gives more control over the process. Depending on the underlying
+ support in the image format, the functions provided by the class
+ can save memory and speed up loading of images.
+
+ Likewise, Qt provides the QImageWriter class which supports
+ setting format specific options, such as the gamma level,
+ compression level and quality, prior to storing the image. If you
+ do not need such options, you can use QImage::save() or
+ QPixmap::save() instead.
+
+ \table 100%
+ \row
+ \o \bold QMovie
+
+ QMovie is a convenience class for displaying animations, using the
+ QImageReader class internally. Once created, the QMovie class
+ provides various functions for both running and controlling the
+ given animation.
+
+ \o \image paintsystem-movie.png
+ \endtable
+
+ The QImageReader and QImageWriter classes rely on the
+ QImageIOHandler class which is the common image I/O interface for
+ all image formats in Qt. QImageIOHandler objects are used
+ internally by QImageReader and QImageWriter to add support for
+ different image formats to Qt.
+
+ A list of the supported file formats are available through the
+ QImageReader::supportedImageFormats() and
+ QImageWriter::supportedImageFormats() functions. Qt supports
+ several file formats by default, and in addition new formats can
+ be added as plugins. The currently supported formats are listed in
+ the QImageReader and QImageWriter class documentation.
+
+ Qt's plugin mechanism can also be used to write a custom image
+ format handler. This is done by deriving from the QImageIOHandler
+ class, and creating a QImageIOPlugin object which is a factory for
+ creating QImageIOHandler objects. When the plugin is installed,
+ QImageReader and QImageWriter will automatically load the plugin
+ and start using it.
+
+ \table 100%
+ \row
+ \o \image paintsystem-svg.png
+ \o \bold {SVG Rendering}
+
+ Scalable Vector Graphics (SVG) is an language for describing both
+ static and animated two-dimensional vector graphics. Qt includes
+ support for the static features of SVG 1.2 Tiny.
+
+ SVG drawings can be rendered onto any QPaintDevice subclass. This
+ approach gives developers the flexibility to experiment, in order
+ to find the best solution for each application.
+
+ The easiest way to render SVG files is to construct a QSvgWidget
+ and load an SVG file using one of the QSvgWidget::load()
+ functions. The rendering is performed by the QSvgRenderer class
+ which also can be used directly to provide SVG support for custom
+ widgets.
+
+ For more information, see the QtSvg module documentation.
+
+ \endtable
+
+ \section1 Styling
+
+ Qt's built-in widgets use the QStyle class to perform nearly all
+ of their drawing. QStyle is an abstract base class that
+ encapsulates the look and feel of a GUI, and can be used to make
+ the widgets look exactly like the equivalent native widgets or to
+ give the widgets a custom look.
+
+ Qt provides a set of QStyle subclasses that emulate the native
+ look of the different platforms supported by Qt (QWindowsStyle,
+ QMacStyle, QMotifStyle, etc.). These styles are built into the
+ QtGui library, other styles can be made available using Qt's
+ plugin mechansim.
+
+ Most functions for drawing style elements take four arguments:
+
+ \list
+ \o an enum value specifying which graphical element to draw
+ \o a QStyleOption object specifying how and where to render that element
+ \o a QPainter object that should be used to draw the element
+ \o a QWidget object on which the drawing is performed (optional)
+ \endlist
+
+ The style gets all the information it needs to render the
+ graphical element from the QStyleOption class. The widget is
+ passed as the last argument in case the style needs it to perform
+ special effects (such as animated default buttons on Mac OS X),
+ but it isn't mandatory. In fact, QStyle can be used to draw on any
+ paint device (not just widgets), in which case the widget argument
+ is a zero pointer.
+
+ \image paintsystem-stylepainter.png
+
+ The paint system also provides the QStylePainter class inheriting
+ from QPainter. QStylePainter is a convenience class for drawing
+ QStyle elements inside a widget, and extends QPainter with a set
+ of high-level drawing functions implemented on top of QStyle's
+ API. The advantage of using QStylePainter is that the parameter
+ lists get considerably shorter.
+
+ \table 100%
+ \row
+ \o \inlineimage paintsystem-icon.png
+ \o \bold QIcon
+
+ The QIcon class provides scalable icons in different modes and states.
+
+ QIcon can generate pixmaps reflecting an icon's state, mode and
+ size. These pixmaps are generated from the set of pixmaps
+ made available to the icon, and are used by Qt widgets to show an
+ icon representing a particular action.
+
+ The rendering of a QIcon object is handled by the QIconEngine
+ class. Each icon has a corresponding icon engine that is
+ responsible for drawing the icon with a requested size, mode and
+ state.
+
+ \endtable
+
+ \section1 Selecting the Painting Backend
+
+ Since Qt 4.5, it is possible to replace the paint engines and paint
+ devices used for widgets, pixmaps and the offscreen double buffer. By
+ default the backends are:
+
+ \table
+ \row
+ \o Windows
+ \o Software Rasterizer
+ \row
+ \o X11
+ \o X11
+ \row
+ \o Mac OS X
+ \o CoreGraphics
+ \row
+ \o Embedded
+ \o Software Rasterizer
+ \endtable
+
+ Passing a command line parameter to the application, such as,
+ \c{-graphicssystem raster}, specifies that Qt should use the software
+ rasterizer for this application. The Software rasterizer is fully
+ supported on all platforms.
+
+ \code
+ > analogclock -graphicssystem raster
+ \endcode
+
+ There is also a \c{-graphicssystem opengl} mode that uses OpenGL for
+ all drawing. Currently, this engine is experimental as it does not draw
+ everything correctly.
+
+ Qt also supports being configured using \c {-graphicssystem
+ raster|opengl} in which case all applications will use the
+ specified graphics system for its graphics.
+
+ */
+
diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc
new file mode 100644
index 0000000..01f7c8a
--- /dev/null
+++ b/doc/src/phonon-api.qdoc
@@ -0,0 +1,4993 @@
+/*
+ This file is part of the KDE project
+ Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org>
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ Contact: Qt Software Information (qt-info@nokia.com)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+/*!
+ \enum Phonon::DiscType
+ Enum to identify the media discs supported by MediaObject.
+
+ \value NoDisc
+ No disc was selected. This is only useful as a return value from
+ MediaSource::diskType().
+ \value Cd Identifies Audio CDs.
+ \value Dvd Identifies DVDs (not arbitrary data DVDs, only movie DVDs).
+ \value Vcd Identifies Video CDs.
+
+ \sa MediaSource, MediaObject
+*/
+
+/*!
+ \enum Phonon::MetaData
+
+ Provided as keys for Phonon::MediaObject::metaData(). The enum
+ values matches strings defined in the Ogg Vorbis specification
+
+ \value ArtistMetaData
+ \value AlbumMetaData
+ \value TitleMetaData
+ \value DateMetaData
+ \value GenreMetaData
+ \value TracknumberMetaData
+ \value DescriptionMetaData
+ \value MusicBrainzDiscIdMetaData
+*/
+
+/*!
+ \enum Phonon::State
+ \since 4.4
+
+ The state enum describes the different states a media object can
+ take. Several functions of \l{Phonon::}{MediaObject} are
+ asynchronous, so even if a you have requested a state change
+ through a function call, e.g., through
+ \l{Phonon::MediaObject::}{play()}, you cannot be sure that the
+ change has taken place before you receive the
+ \l{Phonon::MediaObject::}{stateChanged()} signal.
+
+ A media object can at any time change into any state, regardless
+ of the state it previously had. \omit In the
+ \l{Phonon::}{MediaObject} class description explains the typical
+ state changes in the life of a media object. \endomit
+
+ \value LoadingState
+ After construction it might take a while before the media object
+ is ready to \l{Phonon::MediaObject::}{play()}. This state is
+ commonly used by backends to initialize the \l{Phonon
+ Overview}{media graph} and loading the source. When
+ the object leaves the loading state, it will enter the
+ StoppedState unless an error occurred or another state is
+ requested through a function call, e.g.,
+ \l{Phonon::}{MediaObject::play()}.
+
+ \value StoppedState
+ In the stopped state, the media object is ready to play its
+ current media source. The current
+ \l{MediaObject::seek()}{position} in the media stream is then 0.
+
+ \value PlayingState
+ The media object is playing back its media source.
+
+ \value BufferingState
+ The Player is waiting for data to be able to start or continue
+ playing. This state is commonly used to wait for media data over a
+ network connection.
+
+ \value PausedState
+ The media player has currently paused its playback, i.e., it
+ stops playing but keeps the current playback position in the
+ stream.
+
+ \value ErrorState
+ When a media object enters the error state a problem with the
+ playback has occurred. The possible errors are grouped into
+ two categories by Phonon::ErrorType, and the type can be
+ queried through \l{Phonon::MediaObject::}{errorType()}. A
+ \l{Phonon::}{FatalError} implies that the playback
+ cannot continue, but one can still try with a new media
+ source. With a \l{Phonon::}{NormalError} it might
+ be possible to continue playback, and a media object may
+ therefore change state from the ErrorState.
+
+ \sa MediaObject
+*/
+
+/*!
+ \enum Phonon::Category
+
+ Sets the category your program should be listed in in the mixer.
+
+ \value NoCategory
+ Will make use of the default device.
+ \value NotificationCategory
+ If the sounds produced are notifications (ping, beep and such) you
+ should use this category.
+ \value MusicCategory
+ If your application is a music player (like a jukebox or media player
+ playing an audio file).
+ \value VideoCategory
+ If the sound is the audio channel of a video.
+ \value CommunicationCategory
+ If your applications produces sounds from communication with somebody
+ else (VoIP, voice chat).
+ \value GameCategory
+ Sound produced by a computer game should go into this category.
+ \value AccessibilityCategory
+ Sounds produced for accessibility (e.g., Text-To-Speech)
+ \omitvalue LastCategory
+ Holds the largest value of categories.
+ \omitvalue AccessibilityCategory
+
+ A Jukebox will set this to Music, a VoIP program to Communication, a
+ DVD player to video, and so on.
+
+ \note These categories can also become useful for an application that
+ controls the volumes automatically, like turning down the music when a call
+ comes in, or turning down the notifications when the media player knows
+ it's playing classical music.
+*/
+
+/*!
+ \enum Phonon::ErrorType
+
+ This enum describes the severity when an error has occurred during
+ playback.
+
+ After a media object has entered the \l{Phonon::}{ErrorState}, one
+ can query the type of error from
+ \l{Phonon::}{MediaObject::errorType()}. Note that you should query
+ the error when receiving the
+ \l{Phonon::}{MediaObject::stateChanged()} signal, because the
+ error type will be lost if the media object leaves the error
+ state.
+
+ \value NoError No error. MediaObject::errorType() returns this if
+ MediaObject::state() != Phonon::ErrorState.
+
+ \value NormalError An error has occurred with the playback of the current
+ source. It might be possible to continue playback, for instance, if only the
+ audio stream in a video cannot be played back. The media object will then
+ leave the error state again.
+
+ \value FatalError. Something important does not work. Your program cannot continue
+ the playback of the current source, but it might be possible to try another.
+
+ \sa MediaObject::errorType()
+*/
+
+/*!
+ \fn QString Phonon::categoryToString(Category c)
+
+ Returns a (translated) string to show to the user identifying the given
+ Category (\a c).
+*/
+
+/*!
+ \enum Phonon::ObjectDescriptionType
+ \relates Phonon::ObjectDescription
+
+ This enum defines the type of information that is contained in a
+ \l{Phonon::}{ObjectDescription} object.
+
+ \value AudioOutputDeviceType An audio output device (\l{Phonon::}{AudioOutputDevice}).
+ This can be soundcards (with different drivers),
+ sound servers, or other virtual outputs like playback on a different
+ computer on the network.
+
+ \value EffectType An audio effect (\l{Phonon::}{EffectDescription}).
+ \omitvalue SubtitleType
+ \omitvalue AudioCaptureDeviceType
+ \omitvalue AudioChannelType
+*/
+
+/*!
+ \typedef Phonon::AudioOutputDevice
+ \relates Phonon::ObjectDescription
+
+ This typedef of \l{Phonon::}{ObjectDescription} describes an audio output
+ device, such as soundcards (with different drivers), sound servers, or other
+ virtual outputs like playback on a different computer on the network.
+
+ \omit
+ For Hardware devices the backend should use libkaudiodevicelist
+ (AudioDevice and AudioDeviceEnumerator) which will list removable
+ devices even when they are unplugged and provide a unique identifier
+ that can make backends use the same identifiers.
+ \endomit
+
+ A list of available devices is given by the backend with
+ Backendcapabilities::availableAudioOutputDevices()
+
+ \snippet doc/src/snippets/phononobjectdescription.cpp 1
+
+*/
+
+/*!
+ \fn Phonon::phononVersion()
+ \inmodule Phonon
+ \since 4.5
+
+ Returns the Phonon version.
+*/
+
+/*!
+ \class Phonon::ObjectDescription
+ \inmodule Phonon
+ \inheaderfile Phonon/ObjectDescription
+ \since 4.4
+ \brief The ObjectDescription class provides information about Phonon objects.
+
+ Phonon currently uses this class to describe audio effects and
+ audio output devices - using the typedefs AudioOutputDevice and
+ EffectDescription. The type of an ObjectDescription is also
+ described through the \l{Phonon::}{ObjectDescriptionType} enum.
+ Objects of the same \l{Phonon::ObjectDescriptionType}{type} are
+ uniquely identified by an index().
+
+ The class gives a description() and a name() of the object, both
+ of which are strings appropriate for end users of a Phonon
+ application. You can also check whether the device or effect
+ described is \l{isValid()}{valid}. This does not guarantee that
+ the device or effect functions as expected, but that the
+ ObjectDescription describes an existing device or effect.
+
+ Audio output devices and effect descriptions are used to select
+ the audio output device to be used for playback and to create
+ effects; we show examples of this in the snippet below. The
+ available descriptions can be fetched with
+ \l{Phonon::BackendCapabilities::}{availableAudioOutputDevices()}
+ and \l{Phonon::BackendCapabilities::}{availableAudioEffects()}
+ static functions in the Phonon::BackendCapabilities namespace
+
+ \snippet doc/src/snippets/phononobjectdescription.cpp 0
+
+ Other types of ObjectDescriptions might be possible in the future,
+ e.g., descriptions of audio capture devices, such as microphones.
+
+ \omit Not implemented yet.
+ Need a new paragraph on that some descriptions 'belong
+ together', such as chained audio effects.
+
+ Some parts give the end user choices, e.g. what source to capture
+ audio from. These choices are described by the name and
+ description methods of this class and identified with the id
+ method. Subclasses then define additional information like which
+ audio and video choices belong together. \endomit
+
+ \sa Phonon::AudioOutputDevice, Phonon::EffectDescription, {Capabilities Example}, {Phonon Module}
+*/
+
+/*!
+ \fn Phonon::ObjectDescription::ObjectDescription()
+ \brief constructs a new object description.
+ \internal
+*/
+
+/*!
+ \fn Phonon::ObjectDescription::ObjectDescription (int index, const QHash<QByteArray, QVariant> & properties)
+ \internal
+*/
+
+/*!
+ \fn Phonon::ObjectDescription::ObjectDescription(const QExplicitlySharedDataPointer<ObjectDescriptionData> &dd)
+ \internal
+*/
+
+/*!
+ \fn static inline ObjectDescription<T> Phonon::ObjectDescription::fromIndex(int index)
+ \internal
+
+ \omit Currently indices are not unique for all ObjectDescription types, making
+ the behavior of this function undefined. \endomit
+
+ Returns a new description object that describes the
+ device/effect/codec/... with the given \a index.
+*/
+
+/*!
+ \fn inline bool Phonon::ObjectDescription::operator==(const ObjectDescription &otherDescription) const
+
+ Returns \c true if this ObjectDescription describes the same
+ object as \a otherDescription; otherwise, returns \c false.
+*/
+
+/*!
+ \fn inline bool Phonon::ObjectDescription::operator!=(const ObjectDescription &otherDescription) const
+ Returns \c false if this ObjectDescription describes the same
+ as \a otherDescription; otherwise, returns \c true.
+*/
+
+/*!
+ \fn inline QString Phonon::ObjectDescription::name() const
+
+ Returns a string appropriate for a user to select between
+ object descriptions, e.g., from a QComboBox.
+
+ \sa description()
+*/
+
+/*!
+ \fn inline QString Phonon::ObjectDescription::description() const
+
+ Returns a more extensive description than the name() function.
+
+ For example, in the case of \l{Phonon::}{AudioOutputDevice}s, this
+ text should make clear which sound source is described; this is
+ sometimes hard to describe or understand from just the name.
+
+ The text is appropriate to present to an end user in for example
+ tool tips of items, with the name()'s as text, in a QComboBox.
+
+*/
+
+/*!
+ \fn inline QVariant Phonon::ObjectDescription::property(const char *name) const
+
+ Returns the property named \a name. A property can be used for
+ extended information, such as the manufacturer of a sound card. The
+ information will usually be given as text.
+
+ If the property is not set an invalid QVariant is returned.
+
+ Qt's backends do not use properties at the time of this writing.
+
+ \sa propertyNames()
+*/
+
+/*!
+ \fn inline QList<QByteArray> Phonon::ObjectDescription::propertyNames() const
+
+ Properties can be used for extended information about a
+ ObjectDescription, e.g., a manufacturer of a sound card. The
+ information will usually be given text.
+
+ This function returns all names that return valid data when
+ property() is called.
+
+ Currently, Qt backends do not use properties for their object
+ descriptions.
+
+ \sa property()
+*/
+
+/*!
+ \fn inline bool Phonon::ObjectDescription::isValid() const
+
+ Returns true if the device or effect described exists.
+
+ An ObjectDescription that is invalid, will also have an
+ index() of -1.
+
+ \sa index()
+*/
+
+/*!
+ \fn inline int Phonon::ObjectDescription::index() const
+
+ Returns a unique identifier for this ObjectDescription. Used
+ internally to distinguish between the descriptions.
+
+ Notice that the identifiers are only unique to the type of
+ description, e.g., \l{Phonon::}{AudioOutputDevice} or
+ \l{Phonon::}{EffectDescription}.
+*/
+
+/*!
+ \class Phonon::ObjectDescriptionPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+
+*/
+
+/*!
+ \class Phonon::StreamInterface
+ \inmodule Phonon
+ \since 4.4
+ \brief Backend interface to handle media streams (AbstractMediaStream).
+ \internal
+*/
+
+/*!
+ \fn virtual Phonon::StreamInterface::~StreamInterface()
+*/
+
+/*!
+ \fn virtual void Phonon::StreamInterface::writeData(const QByteArray &data) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::StreamInterface::endOfData() = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::StreamInterface::setStreamSize(qint64 newSize) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::StreamInterface::setStreamSeekable(bool s) = 0
+ \internal
+*/
+
+/*!
+ \fn void Phonon::StreamInterface::connectToSource(const MediaSource &mediaSource)
+ \internal
+*/
+
+/*!
+ \fn void Phonon::StreamInterface::needData()
+ \internal
+*/
+
+/*!
+ \fn void Phonon::StreamInterface::enoughData()
+ \internal
+*/
+
+/*!
+ \fn void Phonon::StreamInterface::seekStream(qint64)
+ \internal
+*/
+
+/*!
+ \fn void Phonon::StreamInterface::reset()
+ \internal
+*/
+
+/*!
+ \fn Phonon::StreamInterface::StreamInterface()
+ \internal
+ \omit
+ For subclasses.
+ \endomit
+*/
+
+/*!
+ \class StreamInterfacePrivate
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \class Phonon::AbstractVideoOutput
+ \inmodule Phonon
+ \internal
+ \since 4.4
+ \brief The AbstractVideoOutput class is the common base class for all video output classes.
+
+ \sa VideoWidget
+*/
+
+/*!
+ \namespace Phonon::Experimental
+ \internal
+*/
+
+/*!
+ \fn Phonon::AbstractVideoOutput::AbstractVideoOutput(AbstractVideoOutputPrivate &d)
+ \internal
+
+ Constructor that is called from derived classes.
+
+ \param parent Standard QObject parent.
+*/
+
+/*!
+ \class Phonon::AbstractVideoOutputPrivate
+ \inmodule Phonon
+ \internal
+ \since 4.4
+*/
+
+/*!
+ \class Phonon::VolumeFaderEffect
+ \inmodule Phonon
+ \internal
+ \since 4.4
+
+ This effect differs from gradually changing the output volume in that
+ a dedicated effect can change the volume in the smallest possible
+ steps while every other volume control will make more or less
+ noticeable steps.
+
+ \sa AudioOutput::volume()
+*/
+
+/*!
+ \property Phonon::VolumeFaderEffect::volume
+
+ This is the current volume of the output as voltage factor.
+ Setting this property changes the volume immediately.
+
+ 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
+
+ \sa volumeDecibel
+*/
+
+/*!
+ \property Phonon::VolumeFaderEffect::volumeDecibel
+
+ This is the current volume of the output in decibel.
+ Setting this property changes the volume immediately.
+
+ 0 dB means no change in volume, -6dB means an attenuation of the
+ voltage to 50% and an attenuation of the power to 25%, -inf dB means
+ silence.
+
+ \sa volume
+*/
+
+/*!
+ \property Phonon::VolumeFaderEffect::fadeCurve
+
+ This property holds the fade curve to be used for the fadeIn(), fadeOut()
+ and fadeTo() slots.
+
+ Defaults to Fade3Decibel.
+
+ \sa FadeCurve
+*/
+
+/*!
+ \enum Phonon::VolumeFaderEffect::FadeCurve
+ Determines the curve of the volume change.
+
+ \value Fade3Decibel Crossfade curve/fast fade out.
+ This is the default fade curve.
+ \value Fade6Decibel Linear fade out.
+ \value Fade9Decibel Slow fade out.
+ \value Fade12Decibel A more extreme version of the -9dB fade.
+
+ \bold{Notes:}
+
+ \c Fade3Decibel is often the best fade for a crossfade, as after half
+ of the time the volume reached -3dB. This means that half the
+ possible power (which is proportional to the square of the
+ voltage) is reached. Summed, the maximum power of two audio
+ signals fading with a -3dB curve will always be equal.
+
+ For fading in or out the -3dB curve is too abrupt in the end.
+
+ With a -6dB fade curve, a volume of -6dB is reached after half of
+ the fading time. -6dB is equal to half of the voltage meaning
+ that the voltage multiplier changes linearly from the start
+ of the fade to the end.
+
+ With the \c Fade9Decibel fade, a volume of -9dB is reached after
+ half of the fade time, so the fade is fast in the beginning and
+ slow at the end. This is a good fade for ending music.
+*/
+
+/*!
+ \fn void Phonon::VolumeFaderEffect::fadeIn(int fadeTime)
+
+ Tells the Fader to change the volume from the current volume to 100%
+ in \a fadeTime milliseconds.
+
+ Short for \c fadeTo(1.0, fadeTime).
+
+ \param fadeTime the fade duration in milliseconds
+
+ \sa fadeTo(), volume
+*/
+
+/*!
+ \fn void Phonon::VolumeFaderEffect::fadeOut(int fadeTime)
+
+ Tells the Fader to change the volume from the current volume to 0%
+ in \a fadeTime milliseconds.
+ Short for \c fadeTo(0.0, fadeTime).
+
+ \param fadeTime the fade duration in milliseconds
+
+ \sa fadeTo
+*/
+
+/*!
+ \fn void Phonon::VolumeFaderEffect::fadeTo(float volume, int fadeTime)
+
+ Tells the Fader to change the volume from the current value to
+ \a volume in \a fadeTime milliseconds.
+
+ \sa fadeIn(), fadeOut()
+*/
+
+/*!
+ \class Phonon::VolumeFaderEffectPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::VolumeFaderInterface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn virtual Phonon::VolumeFaderInterface::~VolumeFaderInterface()
+ \internal
+*/
+
+/*!
+ \fn virtual float Phonon::VolumeFaderInterface::volume() const
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VolumeFaderInterface::setVolume(float)
+ \internal
+*/
+
+/*!
+ \fn virtual Phonon::VolumeFaderEffect::FadeCurve Phonon::VolumeFaderInterface::fadeCurve() const
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VolumeFaderInterface::setFadeCurve(Phonon::VolumeFaderEffect::FadeCurve)
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VolumeFaderInterface::fadeTo(float, int)
+ \internal
+*/
+
+/*!
+ \class Phonon::AbstractMediaStream
+ \inmodule Phonon
+ \internal
+ \since 4.4
+ \brief The AbstractMediaStream class is the base class for custom media data streams.
+ \inheaderfile Phonon/AbstractMediaStream
+
+ This class is subclassed to provide custom data streams for
+ \l{Phonon::}{MediaSource}s.
+
+ The \l{Phonon::}{MediaSource} knows how to handle the most common
+ media sources, such as files and CD. If you need to fetch
+ multimedia from other sources, you can reimplement this class,
+ which can be used by a \l{Phonon::}{MediaSource}.
+
+ When a backend needs more data from the stream, needData() will be
+ called. You must then use writeData() to write the data to the
+ backend. You can either write one time and wait for a new
+ needData() call, or continue to write data until you receive an
+ enoughData() call. When the stream is at its end, call endOfData()
+ instead of writeData().
+
+ Before the custom stream is passed to a \l{Phonon::}{MediaSource},
+ setStreamSize() needs to be called, and also setStreamSeekable()
+ (if the stream is seekable). A good place to do this work is in
+ the constructor. A seekable stream must also reimplement
+ seekStream().
+
+ We show two examples. The first writes data repeatedly until it
+ receives the enoughData() call, while the second only writes once
+ and waits for a new needData() call.
+
+ Example where data is written repeatedly.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 0
+
+ Example where data is written once:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 1
+
+ \sa Phonon::MediaSource, Phonon::MediaObject
+
+*/
+
+/*!
+ \fn Phonon::AbstractMediaStream::AbstractMediaStream(QObject *parent = 0)
+ \internal
+
+ Constructs an AbstractMediaStream object with the given \a parent.
+
+*/
+
+/*!
+ \fn qint64 Phonon::AbstractMediaStream::streamSize() const
+
+ Returns the stream size that was set with setStreamSize().
+
+ A negative value means that the length of the stream cannot be known.
+
+ Defaults to 0.
+
+ \sa setStreamSize()
+*/
+
+/*!
+ \fn void Phonon::AbstractMediaStream::setStreamSize(qint64 size)
+
+ Sets the \a size of the stream in number of bytes.
+
+ A negative value means that the length of the stream cannot be known.
+
+ Defaults to 0.
+
+ This function has to be called. A backend will not call needData()
+ until the stream size is set.
+
+ \sa streamSize()
+
+*/
+
+/*!
+ \fn bool Phonon::AbstractMediaStream::streamSeekable() const
+
+ Returns whether your data stream is set as seekable.
+
+ Defaults to \c false.
+
+ \sa setStreamSeekable()
+
+*/
+
+/*!
+ \fn void Phonon::AbstractMediaStream::setStreamSeekable(bool s)
+
+ Sets whether your data stream is seekable. \a s should be true if
+ the stream is seekable; otherwise false.
+
+ Defaults to \c false.
+
+ If you set this to \c true you have to implement the seekStream()
+ function.
+
+ \sa streamSeekable()
+*/
+
+/*!
+ \fn void Phonon::AbstractMediaStream::writeData(const QByteArray &data)
+
+ Sends the media \a data to the backend for decoding.
+
+ Use this function to send data to the backend after needData() has
+ been called.
+
+ If your stream is a push stream, data should be written until the
+ enoughData() function is called. For a pull stream, write data
+ once before the call to needData() function returns.
+
+ If the data is depleted, call endOfData() instead of writeData().
+
+ \warning Don't call this function before the first needData() is emitted.
+
+ \sa needData(), endOfData()
+
+*/
+
+/*!
+ \fn void Phonon::AbstractMediaStream::endOfData()
+
+ Tells the backend that the media data stream is at its end.
+
+ \warning Don't call this function before the first needData() is emitted.
+
+ \sa writeData(), needData()
+*/
+
+/*!
+ \fn void Phonon::AbstractMediaStream::error(Phonon::ErrorType errorType, const QString &errorString)
+
+ If an I/O error occurs you should call this function to make
+ MediaObject go into ErrorState. \c errorType classifies the error,
+ while \a errorString is a textual description of the error suitable
+ for users of Phonon applications.
+
+ \sa MediaObject::errorType(), MediaObject::errorString()
+*/
+
+/*!
+ \fn virtual void Phonon::AbstractMediaStream::reset() = 0
+
+ Reimplement this function to reset the stream. Subsequent calls to writeData should start
+ from the first position of the data unless a seek is requested.
+
+ The function is necessary for the case where a non-seekable MediaStream is
+ played more than once. For a seekable stream the implementation can simply call
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 2
+
+ \sa writeData(), needData()
+*/
+
+/*!
+ \fn virtual void Phonon::AbstractMediaStream::needData() = 0
+
+ Reimplement this function to be notified when the backend needs data.
+
+ When this function is called you should write data to the backend
+ (See writeData()).
+
+ \sa writeData(), endOfData(), enoughData()
+*/
+
+/*!
+ \fn virtual void Phonon::AbstractMediaStream::enoughData()
+
+ If your stream is a push stream, reimplement this function to be
+ notified when the backend has enough data and your stream object
+ may take a break.
+
+ This method is important for pushing data to the backend in order
+ to not fill the backend buffer unnecessarily.
+
+ \sa needData()
+*/
+
+/*!
+ \fn virtual void Phonon::AbstractMediaStream::seekStream(qint64 offset)
+
+ Reimplement this function if your stream is seekable.
+
+ When this function is called the next call to writeData has to be at the
+ requested \a offset.
+
+ \warning Do not call the parent implementation.
+
+ \sa setStreamSeekable(), streamSeekable(), needData()
+*/
+
+/*!
+ \class Phonon::BackendInterface
+ \inmodule Phonon
+ \since 4.4
+ \brief Main Backend class interface
+ \internal
+
+ This interface defines the main factory of the backend. The createObject() function creates all the
+ objects needed by the frontend.
+
+ The objectDescriptionIndexes and objectDescriptionProperties functions return information about
+ available devices, effects and codecs.
+
+ An implementation could look like this:
+ \snippet snippets/phonon/samplebackend/main.cpp snippet
+
+*/
+
+/*!
+ \fn virtual Phonon::BackendInterface::~BackendInterface()
+ \internal
+
+ Silence gcc's warning.
+*/
+
+/*!
+ \enum Phonon::BackendInterface::Class
+ \internal
+
+ Classes that the createObject() function has to handle.
+
+ \value MediaObjectClass Request to return a \c MediaObject object.
+ \value VolumeFaderEffectClass Request to return a \c VolumeFaderEffect
+ object.
+ \value AudioOutputClass Request to return an \c AudioOutput object.
+ \value AudioDataOutputClass Request to return an \c AudioDataOutput object.
+ \value VisualizationClass Request to return a \c Visualization object.
+ \value VideoDataOutputClass Request to return a \c VideoDataOutput object.
+ \value EffectClass Request to return a \c Effect object.
+ Takes an additional int that specifies the effect ID.
+ \value VideoWidgetClass Request to return a \c VideoWidget object.
+*/
+
+/*!
+ \fn virtual QObject *Phonon::BackendInterface::createObject(Class c, QObject *parent, const QList<QVariant> &args = QList<QVariant>()) = 0
+ \internal
+
+ Returns a new instance of the requested class.
+
+ \param c The requested class.
+ \param parent The parent object.
+ \param args Additional arguments (documented in Class).
+*/
+
+
+/*!
+ \fn virtual QList<int> Phonon::BackendInterface::objectDescriptionIndexes(ObjectDescriptionType type) const = 0
+ \internal
+
+ Returns the unique identifiers for the devices/effects/codecs of the given \a type.
+
+ \param type see ObjectDescriptionType
+*/
+
+/*!
+ \fn virtual QHash<QByteArray, QVariant> Phonon::BackendInterface::objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0
+ \internal
+
+ Given a unique identifier that was returned from objectDescriptionIndexes this function
+ returns a hash mapping property names to values.
+
+ The property "name" must always be present. All other properties are optional.
+
+ \table
+ \header \o Property \o Description
+ \row \o name \o The name of the device/effect/codec/...
+ \row \o description \o A text explaining what this device/effect/codec/... is/can do
+ \row \o icon \o An icon name (using the freedesktop naming scheme) or a QIcon for this
+ device/effect/codec/...
+ \row \o available \o A bool telling whether the device is present or unplugged.
+ \endtable
+
+ \param type see ObjectDescriptionType
+ \param index The unique identifier that is returned from objectDescriptionIndexes
+*/
+
+/*!
+ \fn virtual bool Phonon::BackendInterface::startConnectionChange(QSet<QObject *>) = 0;
+ \internal
+
+ When this function is called the nodes given in the parameter list should
+ not lose any signal data when connections are changed.
+*/
+
+/*!
+ \fn virtual bool Phonon::BackendInterface::connectNodes(QObject *, QObject *) = 0
+ \internal
+
+ Defines a signal connection between the two given nodes.
+*/
+
+/*!
+ \fn virtual bool Phonon::BackendInterface::disconnectNodes(QObject *, QObject *) = 0
+ \internal
+
+ Cuts a signal connection between the two given nodes.
+*/
+
+/*!
+ \fn virtual bool Phonon::BackendInterface::endConnectionChange(QSet<QObject *>) = 0
+ \internal
+
+ When this function is called the nodes given in the parameter list may lose
+ signal data when a port is not connected.
+*/
+
+/*!
+ \fn virtual QStringList Phonon::BackendInterface::availableMimeTypes() const = 0
+ \internal
+
+ Returns all available MIME types.
+*/
+
+/*!
+ \class Phonon::MediaSource
+ \inmodule Phonon
+ \inheaderfile Phonon/MediaSource
+ \since 4.4
+ \brief The MediaSource class provides multimedia data for media objects.
+
+ The MediaSource class manages a source of multimedia content, such
+ as a music or video file, of which data is given to a
+ \l{Phonon::}{MediaObject}.
+
+ The media source knows how fetch its data from several sources,
+ e.g., from files, a QIODevice, or a CD. The possible source types
+ are described by the \l{MediaSource::}{Type} enum. The type of the
+ source is set by the media source itself, and is dependent on the
+ constructor used to create it. Note that it is possible to provide
+ data from any source by implementing a QIODevice.
+
+ The class has several functions to acquire information about the
+ source it manages, e.g., fileName() and url(). The return from
+ these functions are dependent on the type() of the media source.
+
+ Normally, a programmer does not need to be concerned with media
+ sources. It's constructors are implicit, so one can, for instance,
+ send an URL or filename directly to the constructors of the
+ \l{Phonon::}{MediaObject}.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 3
+
+ A MediaSource object cannot be reused for another multimedia
+ source. It is possible to play the same source again, and also
+ stop and start a non-seekable media source, such as a radio
+ stream, with the same MediaSource object.
+
+ \section1 Qt Backends
+
+ Currently, Qt's backends support files in local and remote
+ locations. Support for other sources, such as CD/DVD, are planned
+ for the future.
+
+ \sa MediaObject, {Phonon Module}
+*/
+
+/*!
+ \enum Phonon::MediaSource::Type
+
+ Identifies the type of media described by the MediaSource object.
+
+ \value Invalid The MediaSource object does not describe any valid source.
+ \value LocalFile The MediaSource object describes a local file.
+ \value Url The MediaSource object describes an URL, which can be either a
+ local file or a file on the network.
+ \value Disc The MediaSource object describes a disc, e.g., a CD.
+ \value Stream The MediaSource object describes a data stream.
+ This is the type used for \l{QIODevice}s. Note
+ that a stream opened with a QUrl, will still be of the Url type.
+
+ \sa MediaSource::type()
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource()
+ \internal
+
+ Creates an invalid MediaSource object.
+
+ \sa Invalid
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(const QString &fileName)
+
+ Creates a MediaSource object for the file specified by \a
+ fileName. You can also use this constructor with \l{The Qt
+ Resource System}{Qt resources}
+
+ \omit
+ \param fileName file name of a local media file or a Qt resource that was compiled in.
+ \endomit
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(const QUrl &url)
+
+ Creates a MediaSource object for a the URL specified by \a url.
+
+ If the multimedia content you would like to play back is on a
+ remote network location, you should use this constructor; though,
+ it also possible to specify an URL to a local file.
+
+ \sa QUrl
+*/
+
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(Phonon::DiscType discType, const QString &deviceName = QString())
+
+ Creates a MediaSource object for the type of disc specified by \a discType in the named
+ device referred to by \a deviceName.
+
+ \note \a deviceName is a platform dependent device name. It can be useful to specify this
+ if the computer has more than one CD drive. On KDE, it is recommended to use the Solid
+ hardware discovery framework to retrieve the device name in a portable way.
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(AbstractMediaStream *stream)
+ \internal
+ Creates a MediaSource object for a data stream.
+
+ Your application can provide the media data by subclassing AbstractMediaStream and
+ passing a pointer to that object. Phonon will never delete the \a stream.
+
+ \param stream The AbstractMediaStream subclass to provide the media data.
+
+ \sa setAutoDelete
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(QIODevice *ioDevice)
+
+ Creates a MediaSource object for the QIODevice specified by \a ioDevice.
+
+ This constructor can be very handy in the combination of
+ QByteArray and QBuffer.
+
+ If you need to fetch multimedia data from a source that is not
+ supported by MediaSource, you should subclass QIODevice and use
+ this MediaSource constructor. It is important that you reimplement
+ QIODevice::isSequential(), as it is used by MediaSource to
+ determine if the media source is seekable.
+
+ \a ioDevice is an arbitrary readable QIODevice subclass. If the device is not opened
+ MediaSource will open it as QIODevice::ReadOnly.
+
+ \note Sequential devices can also be used, but MediaObject::isSeekable() will
+ return false as a result.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(MediaSourcePrivate &)
+ \internal
+*/
+
+/*!
+ \fn Phonon::MediaSource::~MediaSource()
+
+ Destroys the MediaSource object. You should never delete a
+ MediaSource yourself, the MediaObject will handle this.
+
+*/
+
+/*!
+ \fn Phonon::MediaSource::MediaSource(const MediaSource &other)
+
+ Constructs a copy of the \a other media source.
+
+ This constructor is fast thanks to explicit sharing.
+*/
+
+/*!
+ \fn MediaSource &Phonon::MediaSource::operator=(const MediaSource &other)
+
+ Assigns the \a other media source to this media source and returns a
+ reference to it.
+
+ This operation is fast thanks to explicit sharing.
+*/
+
+/*!
+ \fn bool Phonon::MediaSource::operator==(const MediaSource &other) const
+
+ Returns true if this media source is equal to the \a other media source;
+ otherwise returns false.
+*/
+
+/*!
+ \fn void Phonon::MediaSource::setAutoDelete(bool enable)
+
+ If \a enable is true, the media source will take ownership of the
+ object passed in the \l{Phonon::}{MediaSource}'s constructor
+ object that was passed in the constructor; otherwise, the
+ programmer is responsible for deletion of this object.
+
+ This setting is false by default. If you enable it, you should
+ only access the stream or device as long as you keep the media
+ source object around. As long as you keep the media source
+ wrapping the stream or device, the object will not get deleted.
+
+ \sa autoDelete()
+*/
+
+/*!
+ \fn bool Phonon::MediaSource::autoDelete() const
+
+ Returns the setting of the auto-delete option. The default is
+ false.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Type Phonon::MediaSource::type() const
+
+ Returns the type of the MediaSource (depends on the constructor
+ that was used).
+
+ \sa Type
+*/
+
+/*!
+ \fn QString Phonon::MediaSource::fileName() const
+
+ Returns the file name of the MediaSource if type() ==
+ LocalFile; otherwise, returns QString().
+
+ \sa type()
+*/
+
+/*!
+ \fn QUrl Phonon::MediaSource::url() const
+ Returns the URL of the MediaSource if type() == URL or type() == LocalFile;
+ otherwise returns QUrl().
+
+ \sa type()
+*/
+
+/*!
+ \fn Phonon::DiscType Phonon::MediaSource::discType() const
+ Returns the disc type of the MediaSource if type() == Disc; otherwise
+ returns NoDisc.
+
+ \sa type()
+*/
+
+/*!
+ \fn QString Phonon::MediaSource::deviceName() const
+
+ Returns the device name of the MediaSource if type() == Disc; otherwise
+ returns QString().
+
+ \sa type()
+*/
+
+/*!
+ \fn AbstractMediaStream *Phonon::MediaSource::stream() const
+ \internal
+ Returns the media stream of the MediaSource if type() == Stream; otherwise
+ returns 0.
+ QIODevices are handled as streams, too.
+*/
+
+/*!
+ \class Phonon::MediaSourcePrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::SeekSlider
+ \inmodule Phonon
+ \inheaderfile Phonon/SeekSlider
+ \since 4.4
+ \brief The SeekSlider class provides a slider for seeking to positions in media streams.
+
+ The SeekSlider connects to a \l{Phonon::}{MediaObject}, and
+ controls the seek position in the object's media stream.
+
+ The slider will connect to the necessary signals to keep track of
+ the sliders maximum, minimum, and current values. It will also
+ disable itself for non-seekable streams, and update the media
+ object when the current value of the slider changes.
+
+ Here follows a typical example of SeekSlider usage:
+
+ \snippet doc/src/snippets/seekslider.cpp 0
+
+ \sa Phonon::VolumeSlider, Phonon::VideoWidget, {Music Player Example}, {Phonon Module}
+
+*/
+
+/*!
+ \property Phonon::SeekSlider::iconVisible
+ \brief whether the icon next to the slider is visible
+
+ By default the icon is visible if the platform provides an icon; else
+ it's hidden.
+
+*/
+
+/*!
+ \property Phonon::SeekSlider::tracking
+ \brief whether slider tracking is enabled
+
+ If tracking is enabled (the default), the media seeks
+ while the slider is being dragged. If tracking is
+ disabled, the media seeks only when the user
+ releases the slider.
+*/
+
+/*!
+ \property Phonon::SeekSlider::pageStep
+ \brief the page step interval
+
+ The larger of two natural steps that a slider provides and
+ typically corresponds to the user pressing PageUp or PageDown.
+
+ Defaults to 5 seconds.
+*/
+
+/*!
+ \property Phonon::SeekSlider::singleStep
+ \brief the single step interval
+
+ The smaller of two natural steps that a slider provides and
+ typically corresponds to the user pressing an arrow key.
+
+ Defaults to 0.5 seconds.
+*/
+
+/*!
+ \property Phonon::SeekSlider::orientation
+ \brief the orientation of the slider
+
+ The orientation must be Qt::Vertical or Qt::Horizontal (the default).
+*/
+
+/*!
+ \property Phonon::SeekSlider::iconSize
+ \brief the icon size used for the mute button/icon.
+
+ The default size is defined by the GUI style.
+*/
+
+/*!
+ \fn explicit Phonon::SeekSlider::SeekSlider(QWidget *parent = 0)
+
+ Constructs a seek slider widget with the given \a parent.
+*/
+
+/*!
+ \fn explicit Phonon::SeekSlider::SeekSlider(MediaObject *media, QWidget *parent = 0)
+
+ Constructs a seek slider widget for the specified \a media with the
+ given \a parent.
+*/
+
+/*!
+ \fn Phonon::SeekSlider::~SeekSlider()
+ Destroys the seek slider.
+*/
+
+/*!
+ \fn Phonon::MediaObject *Phonon::SeekSlider::mediaObject() const
+
+ Return the media object this SeekSlider controls.
+*/
+
+/*!
+ \class Phonon::SeekSliderPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn void Phonon::SeekSlider::setMediaObject(MediaObject *media)
+
+ Sets the media object to be controlled by this slider to the \a media specified.
+*/
+
+/*!
+ \class Phonon::VideoPlayer
+ \inmodule Phonon
+ \inheaderfile Phonon/VideoPlayer
+ \since 4.4
+ \brief The VideoPlayer widget is used to perform playback of video.
+
+ With VideoPlayer you can get results quickly and easily. You can
+ do the standard playback tasks like play(), pause(), and stop(),
+ but also set a playback volume and seek - if the media and backend
+ supports seeking.
+
+ VideoPlayer is provided for convenience and removes the need to
+ create a media graph with a \l{Phonon::}{MediaObject},
+ \l{Phonon::}{AudioOutput}, and \l{Phonon::}{VideoWidget}. If
+ you need functionality not supported by the player, you can build
+ this \l{Building Graphs}{graph} yourself.
+
+ Keep in mind that when the VideoPlayer instance is deleted the
+ playback will stop.
+
+ Note also that most of the functions in this class are
+ asynchronous. For instance, a media source may not play
+ immediately after you call the play() function.
+
+ A play and forget code example:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 4
+
+ \sa {Phonon Module}, MediaObject
+*/
+
+/*!
+ \fn Phonon::VideoPlayer::VideoPlayer(QWidget *parent = 0)
+
+ Constructs a new video widget with a \a parent using
+ Phonon::VideoCategory as its category.
+
+ \param parent The QObject parent.
+*/
+
+/*!
+ \fn Phonon::VideoPlayer::VideoPlayer(Phonon::Category category, QWidget *parent = 0)
+
+ Constructs a new VideoPlayer instance with the specified \a
+ parent.
+
+ \a category is the category used for the audio output device.
+*/
+
+/*!
+ \fn Phonon::VideoPlayer::~VideoPlayer()
+
+ On destruction the playback is stopped, also the audio output is
+ removed so that the desktop mixer will not show the application
+ anymore. If you need a persistent audio output don't use
+ VideoPlayer but MediaObject, VideoPath and VideoOutput.
+*/
+
+/*!
+ \fn qint64 Phonon::VideoPlayer::totalTime() const
+
+ Get the total time (in milliseconds) of the file currently being played.
+*/
+
+/*!
+ \fn qint64 Phonon::VideoPlayer::currentTime() const
+
+ Get the current time (in milliseconds) of the file currently being played.
+*/
+
+/*!
+ \fn float Phonon::VideoPlayer::volume() const
+
+ This is the current volume of the output as voltage factor.
+
+ 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
+*/
+
+/*!
+ \fn bool Phonon::VideoPlayer::isPlaying() const
+
+ Returns true if it is currently playing; otherwise returns false if it
+ is currently stopped or paused
+*/
+
+/*!
+ \fn bool Phonon::VideoPlayer::isPaused() const
+
+ Returns true if it is currently paused; otherwise returns false if it
+ is currently playing or stopped.
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::load(const Phonon::MediaSource &source)
+
+ Starts pre-loading the media data from the specified \a source and
+ filling audio buffers in the backend.
+
+ When there's already a media playing (or paused) it will be stopped
+ (the finished signal will not be emitted).
+
+ \sa MediaObject::setCurrentSource()
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::play(const Phonon::MediaSource &source)
+
+ Plays the media from the given \a source. Starts playback as fast as
+ possible.
+ This can take a considerable time depending on the URL and the
+ backend.
+
+ If you need low latency between calling play() and the sound actually
+ starting to play on your output device you need to use MediaObject
+ and be able to set the URL before calling play(). Note that
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 5
+ doesn't make a difference: the application should be idle between the
+ load and play calls so that the backend can start preloading the
+ media and fill audio buffers.
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::play()
+
+ Continues playback of paused media. Restarts playback of a stopped
+ (or newly loaded) media.
+
+ \sa MediaObject::play(), play()
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::pause()
+
+ Pauses the playback.
+
+ \sa MediaObject::pause()
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::stop()
+
+ Stops the playback.
+
+ \sa MediaObject::stop()
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::seek(qint64 ms)
+
+ Seeks to the requested time. Note that the backend is free to
+ ignore the seek request if the media source isn't seekable; you
+ can check this by asking the media object of the VideoPlayer.
+
+ \snippet doc/src/snippets/videomedia.cpp 0
+
+ The \a ms parameter is the time in milliseconds from the start of
+ the media.
+
+ The call is asynchronous, so currentTime() can still be the old
+ value right after this method was called. If all you need is a
+ slider that shows the current position and allows the user to
+ seek, use the class SeekSlider.
+
+ \sa MediaObject::seek(), MediaObject::isSeekable(), mediaObject()
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::setVolume(float volume)
+
+ Sets the \a volume of the output as voltage factor.
+
+ 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
+*/
+
+/*!
+ \fn MediaObject *Phonon::VideoPlayer::mediaObject() const
+
+ Returns the media object being used by the player.
+
+ The media object can be accessed directly instead of using the
+ \l{VideoPlayer}s convenience functions, e.g., play() and stop().
+ It is also possible to give the object to other Phonon widgets,
+ e.g., a \l{Phonon::}{SeekSlider} or a \l{Phonon::}{VolumeSlider}.
+
+ \sa Phonon::SeekSlider, Phonon::MediaObject
+*/
+
+/*!
+ \fn AudioOutput *Phonon::VideoPlayer::audioOutput() const
+
+ Returns the audio output object being used by the player.
+
+*/
+
+/*!
+ \fn VideoWidget *Phonon::VideoPlayer::videoWidget() const
+
+ Returns the video widget being used by the player.
+*/
+
+/*!
+ \fn void Phonon::VideoPlayer::finished()
+
+ This signal is emitted when the playback finished.
+
+*/
+
+/*!
+ \class Phonon::VideoWidgetPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::MediaObject
+ \inmodule Phonon
+ \inheaderfile Phonon/MediaObject
+ \since 4.4
+ \brief The MediaObject class provides an interface for media playback.
+
+
+ The media object manages a \l{Phonon::}{MediaSource}, which
+ supplies the media object with multimedia content, e.g., from a
+ file. A playback in Phonon is always started by calling the
+ \l{Phonon::MediaObject::}{play()} function.
+
+ The state of play (play, pause, stop, seek) is controlled by the
+ media object, and you can also query the current
+ \l{Phonon::MediaObject::}{state()}. It keeps track of the playback
+ position in the media stream, and emits the
+ \l{Phonon::MediaObject::}{tick()} signal when the current position
+ in the stream changes.
+
+ Notice that most functions of this class are asynchronous, so you
+ cannot rely on that a state is entered after a function call
+ before you receive the \l{Phonon::MediaObject::}{stateChanged()}
+ signal. The description of the \l{Phonon::}{State} enum gives a
+ description of the different states.
+
+ Before play() is called, the media object should be connected to
+ \l{Sinks}{output nodes}, which outputs the media to the
+ underlying hardware. The output nodes required are dependent on
+ the contents of the multimedia file that is played back. Phonon
+ has currently two output nodes: the \l{Phonon::}{AudioOutput} for
+ audio content and \l{Phonon::}{VideoWidget} for video content. If
+ a \l{Phonon::}{MediaSource} contains both audio and video, both
+ nodes need to be connected to the media object.
+
+ \snippet snippets/phonon.cpp 4
+ \snippet snippets/phonon.cpp 5
+
+ The media object can queue sources for playback. When it has
+ finished to play one source, it will start playing the next in the
+ queue; the new source is then removed from the queue. The
+ queue can be altered at any time.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 7
+
+ You can also make use of the
+ \l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
+ guaranteed to be emitted in time for altering the queue.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 8
+
+ When playback is finishing, i.e., when a media source has been
+ played to the end and the queue is empty, several signals are
+ emitted. First, the media object will emit aboutToFinish() -
+ shortly before the playback has finished - and then finished().
+ The stateChanged() signal will also be emitted with
+ \l{Phonon::}{PausedState}, which is the state the media object
+ takes when the playback is finished. If you wish to enter another
+ state, you can connect a slot to finished() and set a new state
+ there.
+
+ The media object resolves the meta information, such as title,
+ artist, and album. The meta data is not resolved immediately after
+ a new source is provided, but will be resolved before the object
+ leaves the \l{Phonon::}{LoadingState}. The data is queried by
+ string keys - which should follow the Ogg Vorbis specification
+ \l http://xiph.org/vorbis/doc/v-comment.html - or by using the
+ \l{Phonon::}{MetaData} enum. The data available will depend on the
+ type and content of the individual media files. metaDataChanged()
+ will be emitted when the media object has resolved new meta data.
+
+ Errors encountered during playback and loading of media sources
+ are reported by emitting a state changed signal with
+ \l{Phonon::}{ErrorState}. The severity of the error can be queried
+ by the \l{Phonon::}{ErrorType}. With a \l{Phonon::}{NormalError},
+ it might be possible to continue the playback, for instance, if
+ only audio playback fails for a media source which also has video.
+ A \l{Phonon::}{FatalError} indicates that Phonon cannot continue
+ playback of the current source, but it is possible to try with a
+ different one. A user readable error message is given by
+ errorString().
+
+ \sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget,
+ {Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer,
+ Phonon::createPlayer(), {Phonon Module}
+
+*/
+
+/*!
+ \property Phonon::MediaObject::transitionTime
+ \brief Defines the time between playback of two media sources
+ in the media queue.
+
+ A positive transition time defines a gap of silence between queued
+ media sources.
+
+ A transition time of 0 ms requests gapless playback (i.e., the
+ next source in the media queue starts immediately after the
+ playback of the current source finishes).
+
+ A negative transition time defines a crossfade between the queued
+ media sources.
+
+ Defaults to 0 (gapless playback).
+
+ \warning This feature might not work reliably with every
+ backend.
+*/
+
+/*!
+ \property Phonon::MediaObject::prefinishMark
+ \brief the time when the prefinishMarkReached signal is emitted before playback ends.
+
+ This property specifies the time in milliseconds the
+ prefinishMarkReached() signal is emitted before the playback
+ finishes. A value of \c 0 disables the signal. The signal is only
+ emitted for the last source in the \l{queue()}{media queue}.
+
+ Defaults to \c 0 (disabled).
+
+ \warning For some media data the total time cannot be determined
+ accurately, therefore the accuracy of the prefinishMarkReached signal
+ can be bad sometimes. Still, it is better to use this method than to
+ look at totalTime() and currentTime() to emulate the behavior
+ because the backend might have more information available than your
+ application does through totalTime() and currentTime().
+
+ \sa prefinishMarkReached()
+*/
+
+/*!
+ \property Phonon::MediaObject::tickInterval
+ \brief The time interval in milliseconds between two ticks.
+
+ The tick() signal is emitted continuously during playback.
+ The tick interval is the time that elapses between the emission of two tick signals.
+ If you set the interval to \c 0 the tick signal gets disabled.
+
+ The tick() signal can, for instance, be used to update widgets
+ that show the current position in the playback of a media source.
+
+ Defaults to \c 0 (disabled).
+
+ \warning The back-end is free to choose a different tick interval close
+ to what you asked for. This means that the following code \c may fail:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 9
+ On the other hand the following is guaranteed:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 10
+
+ \sa tick()
+*/
+
+/*!
+ \fn Phonon::MediaObject::~MediaObject()
+
+ Destroys the MediaObject.
+*/
+
+/*!
+ \fn State Phonon::MediaObject::state() const
+
+ Returns the current Phonon::State of the object.
+
+ \sa Phonon::State, stateChanged()
+*/
+
+/*!
+ \fn bool Phonon::MediaObject::hasVideo() const
+
+ Check whether the current media source includes a video stream.
+
+ \warning This information is not resolved immediately after a
+ media object gets a new source. Listen to the hasVideoChanged()
+ signal instead.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 11
+
+ Returns \c true if the media contains video data; otherwise,
+ returns \c false.
+
+ \sa hasVideoChanged()
+*/
+
+/*!
+ \fn bool Phonon::MediaObject::isSeekable() const
+
+ Check whether it is possible to seek, i.e., change the
+ playback position in the media stream.
+
+ \warning This information is not solved immediately after the
+ media object gets a new media source. The hasVideoChanged() signal
+ is emitted after this information is available.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 12
+
+ Returns \c true if the current media may be seeked; otherwise,
+ returns \c false.
+
+ \sa seekableChanged()
+*/
+
+/*!
+ \fn QStringList Phonon::MediaObject::metaData(const QString &key) const
+
+ Returns the strings associated with the given \a key.
+
+ Backends should use the keys specified in the Ogg Vorbis
+ documentation: \l http://xiph.org/vorbis/doc/v-comment.html
+
+ Therefore the following should work with every backend:
+
+ Note that meta data is not resolved before the \c
+ metaDataChanged() signal is emitted.
+
+ A typical usage looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 13
+*/
+
+/*!
+ \fn QStringList Phonon::MediaObject::metaData(Phonon::MetaData key) const
+
+ Returns the strings associated with the given \a key.
+
+ Same as above except that the keys are defined in the
+ Phonon::MetaData enum.
+
+ \sa metaDataChanged()
+*/
+
+/*!
+ \fn QMultiMap<QString, QString> Phonon::MediaObject::metaData() const
+
+ Returns all meta data in a multi map.
+
+ \sa metaDataChanged()
+*/
+
+/*!
+ \fn QString Phonon::MediaObject::errorString() const
+
+ Returns a human-readable description of the last error that occurred.
+ The strings given may vary between backends.
+
+ The error description can be used to give a message to the user -
+ and the developer - when the stateChanged() signal is emitted with
+ \l{Phonon::}{ErrorState}.
+
+ \section1 Qt Backends
+
+ On Windows, Qt fetches its error messages from the DirectShow
+ backend. This usually includes an error number, which can be
+ looked up in the DirectShow documentation:
+ \l{http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/htm/errorandsuccesscodes.asp}.
+
+ On Linux and Mac, the error strings are not fetched directly from
+ the backend, but are created in the backend.
+
+ \sa Phonon::ErrorState, stateChanged()
+*/
+
+/*!
+ \fn ErrorType Phonon::MediaObject::errorType() const
+
+ Tells your program what to do about the last error that occurred.
+ Use this function after receiving a stateChanged() signal with
+ \l{Phonon::}{ErrorState}.
+
+ \sa Phonon::ErrorType, Phonon::ErrorState, stateChanged()
+*/
+
+/*!
+ \fn MediaSource Phonon::MediaObject::currentSource() const
+
+ Returns the current media source, i.e., the media source that is
+ being played back. The current source is either set with
+ setCurrentSource() or taken from the media queue() when a media
+ source has finished playing.
+
+ \sa setCurrentSource()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::setCurrentSource(const MediaSource &source)
+
+ Set the media source the MediaObject should use.
+
+ After the media object receives a new source, it will enter the
+ \l{Phonon::}{LoadingState}. When it is ready to play, it
+ enters the \l{Phonon::}{StoppedState} unless another state
+ has been requested, e.g., by calling play().
+
+ \a source is the MediaSource object to the media data. You can
+ just as well use a QUrl or QString (for a local file) here.
+
+ We show an example:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
+
+ \sa currentSource()
+*/
+
+/*!
+ \fn QList<MediaSource> Phonon::MediaObject::queue() const
+
+ Returns the queued media sources.
+
+ This does list does not include the current source,
+ returned by currentSource().
+
+ \sa enqueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::setQueue(const QList<MediaSource> &sources)
+
+ Set the \a sources to play when the current source has finished.
+
+ This function will overwrite the current queue.
+
+ \sa clearQueue(), enqueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::setQueue(const QList<QUrl> &urls)
+
+ Set the \a urls to play when the current media has finished.
+
+ This function overwrites the current queue.
+
+ \sa clearQueue(), enqueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::enqueue(const MediaSource &source)
+
+ Appends \a source to the queue.
+
+ You can use this function to provide the next source after the
+ aboutToFinish() signal has been emitted.
+
+ \sa aboutToFinish(), setQueue(), clearQueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::enqueue(const QList<MediaSource> &sources)
+
+ Appends multiple \a sources to the queue.
+
+ \sa setQueue(), clearQueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::enqueue(const QList<QUrl> &urls)
+
+ Appends the URLs in \a urls to the media source queue.
+
+ The function will create \l{MediaSource}s from the \l{QUrl}s, and
+ append these to the queue.
+
+ \sa setQueue(), clearQueue()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::clearQueue()
+
+ Clears the queue of media sources.
+
+ \sa queue(), enqueue()
+*/
+
+/*!
+ \fn qint64 Phonon::MediaObject::currentTime() const
+
+ Returns the current time (in milliseconds), i.e., position in the
+ media stream, of the file currently being played.
+
+ \sa tick(), totalTime(), remainingTime()
+*/
+
+/*!
+ \fn qint64 Phonon::MediaObject::totalTime() const
+
+ Get the total time (in milliseconds) of the file currently being played.
+
+ Returns the total time in milliseconds.
+
+ \warning The total time is not defined before the media object
+ enters the \l{Phonon::}{LoadingState}.
+
+ \sa totalTimeChanged()
+*/
+
+/*!
+ \fn qint64 Phonon::MediaObject::remainingTime() const
+
+ Get the remaining time (in milliseconds) of the file currently being played.
+
+ Returns the remaining time in milliseconds.
+
+ \sa totalTime(), currentTime(), totalTimeChanged()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::play()
+
+ Requests playback of the media data to start.
+
+ Playback starts when the stateChanged() signal is emitted with
+ \l{Phonon::}{PlayingState}.
+
+ If the media object is already in a
+ \l{Phonon::}{PlayingState}, nothing happens.
+
+ \sa stop(), pause(), stateChanged()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::pause()
+
+ Requests playback to pause, and the media object to enter the
+ \l{Phonon::}{PausedState}. If it was paused already, nothing
+ changes.
+
+ This function is asynchronous and the media might not be paused
+ immediately.
+
+ \sa play(), stop(), stateChanged()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::stop()
+
+ Requests playback to stop, and the media object to enter the
+ \l{Phonon::}{StoppedState}. If it was stopped before
+ nothing changes.
+
+ This function is asynchronous and the media might not be
+ stopped immediately.
+
+ \sa play(), pause(), stateChanged()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::seek(qint64 time)
+
+ Requests a seek to the \a time indicated, specified in milliseconds.
+
+ You can only seek if state() is PlayingState, BufferingState or PausedState.
+
+ The call is asynchronous, so currentTime can still be the old
+ value right after this method was called. If all you need is a
+ slider that shows the current position and allows the user to
+ seek, use the class SeekSlider.
+
+ If the current source of the media object is not seekable, calls
+ to this functions do nothing.
+
+ \sa SeekSlider, tick()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate)
+
+ This signal is emitted when the state of the MediaObject has changed.
+ The \a oldstate and \a newstate parameters indicate the previous
+ state and current state of the media object.
+
+ If you are only interested in the new state of the media object, you can
+ connect this signal to a slot that accepts only one State argument.
+*/
+
+/*!
+ \fn void Phonon::MediaObject::tick(qint64 time)
+
+ This signal is emitted in intervals defined by the
+ \l{tickInterval} property. The current position of the media
+ object in the stream is given by the \a time parameter. The \a
+ time is specified in milliseconds.
+
+ \sa tickInterval
+*/
+
+/*!
+ \fn void Phonon::MediaObject::metaDataChanged()
+
+ This signal is emitted when the media object has resolved new meta
+ data. This will happen before the media object leaves the
+ \l{Phonon::}{LoadingState} after a new source has been set.
+
+ This signal is not emitted when the media object removes the
+ current data, i.e., when a new source is set or an error has
+ occurred. If you need to know this, you can listen for the
+ \l{Phonon::}{ErrorState}, and connect to the
+ \l{Phonon::MediaObject::}{currentSourceChanged()} signal.
+
+ You can get the new meta data with the metaData methods.
+
+ \sa metaData(), currentSourceChanged(), stateChanged(), Phonon::State
+*/
+
+/*!
+ \fn void Phonon::MediaObject::seekableChanged(bool isSeekable)
+
+ This signal is emitted when the media object's ability to seek in
+ the media stream changes. \a isSeekable is true if it is possible
+ to seek(); otherwise, it is false.
+
+ Change in the ability to seek in the stream usually happens when
+ the current source changes or when an error occurs.
+
+ \omit Emitted whenever the return value of isSeekable()
+ changes. \endomit
+
+ Normally you'll check isSeekable() after setting a new media
+ source, and then let this signal tell you when seeking is
+ possible. That way you don't have to poll isSeekable().
+*/
+
+/*!
+ \fn void Phonon::MediaObject::hasVideoChanged(bool hasVideo)
+
+ Emitted whenever the return value of hasVideo() changes, i.e.,
+ the media source being played back contains video.
+
+ Normally you'll check hasVideo() first and then let this signal
+ tell you whether video is available now or not. That way you
+ don't have to poll hasVideo().
+
+ \a hasVideo is true when the stream contains video and adding a
+ VideoWidget will show a video, and false if there is no video data
+ in the stream and adding a VideoWidget will show an empty (black)
+ VideoWidget.
+*/
+
+/*!
+ \fn void Phonon::MediaObject::bufferStatus(int percentFilled)
+
+ Provides information about the status of the buffer.
+
+ When a MediaObject is in the \l{Phonon::}{BufferingState}, it will
+ send this signal regularly. \a percentFilled is a number between 0
+ and 100 telling you how much the buffer is filled.
+
+ You can use this signal to show a progress bar to the user when
+ in BufferingState:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 15
+
+ Note that the \l{Phonon::}{BufferingState} is commonly used when
+ waiting for data over a network connection, but this might not be
+ true for all backends.
+*/
+
+/*!
+ \fn void Phonon::MediaObject::finished()
+
+ Emitted when the object has finished playback. It is not emitted
+ if you call stop(), pause() or load(). It is emitted only when the
+ current media source has finished playing and the media queue() is
+ empty, or when a \l{Phonon::FatalError}{fatal error} occurs.
+
+ \warning This signal is not emitted when the current source has
+ finished and there's another source in the queue. It is only
+ emitted when the queue is empty.
+
+ \sa currentSourceChanged(), aboutToFinish(), prefinishMarkReached()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::currentSourceChanged(const Phonon::MediaSource &newSource)
+
+ Emitted when the MediaObject fetches a new MediaSource from the
+ queue() and before it enters the \l{Phonon::}{LoadingState} for
+ the new source. The media object will take a new source from the
+ queue() when it has finished the playback of the
+ \l{currentSource()}{current source}.
+
+ \a newSource is the source that starts to play at the time the
+ signal is emitted.
+*/
+
+/*!
+ \fn void Phonon::MediaObject::aboutToFinish()
+
+ Emitted before the playback of the whole queue ends. When this
+ signal is emitted you still have time to enqueue() a new
+ MediaSource, so that playback continues.
+
+ If you need a signal to be emitted at a specific time before
+ playback is finished, you should use the prefinishMarkReached()
+ signal instead.
+
+ \sa enqueue(), prefinishMark, prefinishMarkReached()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::prefinishMarkReached(qint32 msecToEnd)
+
+ Emitted when there are only \a msecToEnd milliseconds left
+ of playback.
+
+ \warning This signal is not emitted when there is another source
+ in the queue. It is only emitted when the queue is empty.
+
+ \sa setPrefinishMark(), prefinishMark(), aboutToFinish(), finished()
+*/
+
+/*!
+ \fn void Phonon::MediaObject::totalTimeChanged(qint64 newTotalTime)
+
+ This signal is emitted as soon as the total time of the media file is
+ known or has changed. For most non-local media data the total
+ time of the media can only be known after some time. At that time the
+ totalTime function can not return useful information. You have
+ to wait for this signal to know the real total time.
+
+ \a newTotalTime is the length of the media file in milliseconds.
+
+ \sa totalTime()
+*/
+
+/*!
+ \fn MediaObject *Phonon::createPlayer(Phonon::Category category, const MediaSource &source = MediaSource())
+
+ Convenience function to create a MediaObject and AudioOutput
+ connected by a path. The \l{Phonon::}{MediaObject} return will
+ have \a source set as its current source and the specified \a
+ category.
+
+*/
+
+/*!
+ \class Phonon::MediaObjectPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \namespace Phonon::BackendCapabilities
+ \inmodule Phonon
+ \since 4.4
+ \brief The BackendCapabilities namespace contains functions to describe the capabilities of the multimedia backend.
+
+*/
+
+/*!
+ \class Phonon::BackendCapabilitiesPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::BackendCapabilities::Notifier
+ \since 4.4
+ \inmodule Phonon
+ \inheaderfile Phonon/BackendCapabilities
+
+ Notifications about backend capabilities.
+*/
+
+/*!
+ \fn void Phonon::BackendCapabilities::Notifier::capabilitiesChanged()
+
+ This signal is emitted if the capabilities have changed. This can
+ happen if the user has requested a backend change.
+*/
+
+/*!
+ \fn void Phonon::BackendCapabilities::Notifier::availableAudioOutputDevicesChanged()
+
+ This signal is emitted when audio output devices were plugged or
+ unplugged.
+
+ Check BackendCapabilities::availableAudioOutputDevices to get the
+ current list of available devices.
+*/
+
+/*!
+ \fn Notifier *Phonon::BackendCapabilities::notifier()
+
+ Use this function to get a QObject pointer to connect to the capabilitiesChanged signal.
+
+ \return a pointer to a QObject.
+
+ The capabilitiesChanged signal is emitted if the capabilities have changed. This can
+ happen if the user has requested a backend change.
+
+ To connect to this signal do the following:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 16
+
+ \sa Notifier::capabilitiesChanged()
+*/
+
+/*!
+ \fn QStringList Phonon::BackendCapabilities::availableMimeTypes()
+
+ Returns a list of mime types that the Backend can decode.
+
+ \sa isMimeTypeAvailable()
+*/
+
+/*!
+ \fn bool Phonon::BackendCapabilities::isMimeTypeAvailable(const QString &mimeType)
+
+ Often all you want to know is whether one given MIME type can be
+ decoded by the backend. Use this method in favor of
+ availableMimeTypes() as it can give you a negative answer without
+ having a backend loaded.
+
+ Returns true if the given \a mimeType is supported by the backend;
+ otherwise, returns false.
+
+ \sa availableMimeTypes()
+*/
+
+/*!
+ \fn QList<AudioOutputDevice> Phonon::BackendCapabilities::availableAudioOutputDevices()
+
+ Returns the audio output devices the backend supports.
+
+ \return A list of AudioOutputDevice objects that give a name and
+ description for every supported audio output device.
+*/
+
+/*!
+ \fn QList<EffectDescription> Phonon::BackendCapabilities::availableAudioEffects()
+
+ Returns descriptions for the audio effects the backend supports.
+
+ \return A list of AudioEffectDescription objects that give a name and
+ description for every supported audio effect.
+*/
+
+/*!
+ \internal
+ \class ObjectDescriptionModelData
+ \internal
+ \inmodule Phonon
+ \brief Data class for models for ObjectDescription objects.
+*/
+
+/*!
+ \typedef Phonon::EffectDescription
+ \relates Phonon::ObjectDescription
+
+ EffectDescription gives a description of an \l{Processors}{audio
+ effect}. It is a typedef of the \l{Phonon::}{ObjectDescription}
+ class. Please see its class description for details.
+
+ EffectDescription is used to create audio \l{Phonon::}{Effect}s,
+ which can be inserted into a media graph, altering an audio
+ stream.
+
+ \sa Phonon::ObjectDescription, {Capabilities Example}, {Media
+ Player}
+
+*/
+
+/*!
+ \class Phonon::ObjectDescriptionModel
+ \inmodule Phonon
+ \internal
+ \since 4.4
+ \brief The ObjectDescriptionModel class provides a model from
+ a list of ObjectDescription objects.
+
+ ObjectDescriptionModel is a read only model that supplies a list
+ using ObjectDescription::name() for the text and
+ ObjectDescription::description() for the tooltip. If set the properties
+ "icon" and "available" are used to set the decoration and disable the
+ item (disabled only visually, you can still select and drag it).
+
+ It also provides the methods moveUp() and moveDown() to order the list.
+ Additionally drag and drop is possible so that
+ QAbstractItemView::InternalMove can be used.
+ The resulting order of the ObjectDescription::index() values can then be
+ retrieved using tupleIndexOrder().
+
+ An example use case would be to give the user a QComboBox to select
+ the output device:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 17
+
+ And to retrieve the selected AudioOutputDevice:
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 18
+
+*/
+
+/*!
+ \fn inline int Phonon::ObjectDescriptionModel::rowCount(const QModelIndex &parent = QModelIndex()) const
+
+ Returns the number of rows in the model. This value corresponds
+ to the size of the list passed through setModelData.
+
+ \param parent The optional \a parent argument is used in most models to specify
+ the parent of the rows to be counted. Because this is a list if a
+ valid parent is specified the result will always be 0.
+
+ Reimplemented from QAbstractItemModel.
+
+ \sa QAbstractItemModel::rowCount()
+*/
+
+/*!
+ \fn inline QVariant Phonon::ObjectDescriptionModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const
+
+ Returns data from the item with the given \a index for the specified
+ \a role.
+ If the view requests an invalid index, an invalid variant is
+ returned.
+
+ Reimplemented from QAbstractItemModel.
+
+ \sa QAbstractItemModel::data(), Qt::ItemDataRole
+*/
+
+/*!
+ \fn inline Qt::ItemFlags Phonon::ObjectDescriptionModel::flags(const QModelIndex &index) const
+ \internal
+
+ Reimplemented to show unavailable devices as disabled (but still
+ selectable). The \a index of the model index for which to return
+ flags.
+
+*/
+
+/*!
+ \fn inline QList<int> Phonon::ObjectDescriptionModel::tupleIndexOrder() const
+
+ Returns a list of indexes in the same order as they are in the
+ model. The indexes come from the ObjectDescription::index
+ method.
+
+ This is useful to let the user define a list of preference.
+*/
+
+/*!
+ \fn inline int Phonon::ObjectDescriptionModel::tupleIndexAtPositionIndex(int positionIndex) const
+
+ Returns the ObjectDescription::index for the tuple
+ at the given position \a positionIndex. For example a
+ QComboBox will give you the currentIndex as the
+ position in the list. But to select the according
+ AudioOutputDevice using AudioOutputDevice::fromIndex
+ you can use this method.
+
+ \param positionIndex The position in the list.
+*/
+
+/*!
+ \class Phonon::ObjectDescriptionModelDataPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn inline QMimeData *Phonon::ObjectDescriptionModel::mimeData(const QModelIndexList &indexes) const
+ \internal
+
+ Returns the MIME data that dropMimeData() can use to create new
+ items.
+*/
+
+/*!
+ \fn inline void Phonon::ObjectDescriptionModel::moveUp(const QModelIndex &index)
+
+ Moves the item at the given \a index up. In the resulting list
+ the items at index.row() and index.row() - 1 are swapped.
+
+ Connected views are updated automatically.
+*/
+
+/*!
+ \fn inline void Phonon::ObjectDescriptionModel::moveDown(const QModelIndex &index)
+
+ Moves the item at the given \a index down. In the resulting list
+ the items at index.row() and index.row() + 1 are swapped.
+
+ Connected views are updated automatically.
+*/
+
+/*!
+ \fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(QObject *parent = 0)
+
+ Constructs a ObjectDescription model with the
+ given \a parent.
+*/
+
+/*!
+ \fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(const QList<ObjectDescription<type> > &data, QObject *parent = 0)
+
+ Constructs a ObjectDescription model with the
+ given \a parent and the given \a data.
+*/
+
+/*!
+ \fn inline void Phonon::ObjectDescriptionModel::setModelData(const QList<ObjectDescription<type> > &data)
+
+ Sets the model data using the list provided by \a data.
+
+ All previous model data is cleared.
+*/
+
+/*!
+ \fn inline QList<ObjectDescription<type> > Phonon::ObjectDescriptionModel::modelData() const
+
+ Returns the model data.
+
+ As the order of the list might have changed this can be different
+ to what was set using setModelData().
+*/
+
+/*!
+ \fn inline ObjectDescription<type> Phonon::ObjectDescriptionModel::modelData(const QModelIndex &index) const
+
+ Returns one ObjectDescription of the model data for the given \a index.
+*/
+
+/*!
+ \fn inline Qt::DropActions Phonon::ObjectDescriptionModel::supportedDropActions() const
+
+ This model supports drag and drop to copy or move
+ items.
+*/
+
+/*!
+ \fn inline bool Phonon::ObjectDescriptionModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
+
+ Accept drops from other models of the same ObjectDescriptionType.
+
+ The \a data is dropped at the given \a row and \a column; you
+ also receive the \a parent model index.
+
+ If a valid \a parent is given the dropped items will be inserted
+ above that item.
+*/
+
+/*!
+ \fn inline bool Phonon::ObjectDescriptionModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
+
+ Removes count rows starting with the given row.
+
+ If a valid \a parent is given no rows are removed since this is a
+ list model.
+
+ Returns true if the rows were successfully removed; otherwise returns false.
+*/
+
+/*!
+ \fn inline QStringList Phonon::ObjectDescriptionModel::mimeTypes() const
+
+ Returns a list of supported drag and drop MIME types. Currently
+ it only supports one type used internally.
+*/
+
+/*!
+ \class Phonon::EffectInterface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::Effect
+ \inmodule Phonon
+ \inheaderfile Phonon/Effect
+ \since 4.4
+ \brief The Effect class is used to transform audio streams.
+
+ An effect is a media node which is inserted into a path between a
+ \l{Phonon::}{MediaObject} and an audio output node, for instance,
+ an \l{Phonon::}{AudioOutput}. The Effect transforms the media
+ stream on that path.
+
+ Examples may include simple modifiers, such as fading or pitch
+ shifting, and more complex mathematical transformations. You can
+ query the backend for available effects with
+ BackendCapabilities::availableAudioEffects(). Note that the
+ effects available is dependent on the underlying system
+ (DirectDraw, GStreamer, or QuickTime).
+
+ In order to use an effect, insert it into the path as follows:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 19
+
+ The effect will immediately begin applying it's transformations on
+ the path. To stop it, remove the Effect from the path.
+
+ To create an effect, you use the \l{Phonon::}{EffectDescription}
+ class, which you get from
+ \l{BackendCapabilities::}{availableAudioEffects()}. We give a code
+ example below.
+
+ \snippet doc/src/snippets/audioeffects.cpp 0
+
+ An effect can have one or more parameters, which let you alter how
+ the effect works, for instance, by specifying the depth of a
+ reverb effect. See the EffectParameter class description for
+ details.
+
+ Phonon also provides EffectWidget, which lets the user modify the
+ parameters of an effect an the fly, e.g., with comboboxes.
+
+ \sa {Phonon Module}, EffectWidget
+*/
+
+/*!
+ \fn explicit Phonon::Effect::Effect(const EffectDescription &description, QObject *parent = 0)
+
+ Constructs a new effect object with the given \a description and \a parent object.
+
+ The EffectDescription object determines the type of the effect.
+
+ \sa {Phonon::BackendCapabilities::availableAudioEffects()}
+*/
+
+/*!
+ \fn Phonon::Effect::Effect(EffectPrivate &dd, QObject *parent)
+ \internal
+*/
+
+/*!
+ \fn Phonon::Effect::~Effect()
+ \internal
+*/
+
+/*!
+ \fn QVariant Phonon::Effect::parameterValue(const EffectParameter &parameter) const
+
+ Returns the value of the given effect \a parameter. You can fetch
+ the available parameters for an effect with parameters().
+
+ \sa setParameterValue(), EffectParameter
+*/
+
+/*!
+ \fn void Phonon::Effect::setParameterValue(const EffectParameter &parameter, const QVariant &value)
+
+ Sets the given effect \a parameter to the specified \a value.
+
+ Parameters for an effect are returned by parameters(). You can
+ check which QVariant::Type an EffectParameter takes with the
+ EffectParameter::type() function.
+
+ \sa parameterValue(), EffectParameter
+*/
+
+/*!
+ \fn EffectDescription Phonon::Effect::description() const;
+
+ Returns the description of this effect. This is the same
+ description that was passed to the constructor.
+*/
+
+/*!
+ \fn QList<EffectParameter> Phonon::Effect::parameters() const;
+
+ Returns a list of parameters that this effect provides to control
+ its behavior.
+
+ \sa EffectParameter, EffectWidget
+*/
+
+/*!
+ \class Phonon::EffectPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::AudioOutput
+ \inmodule Phonon
+ \inheaderfile Phonon/AudioOutput
+ \since 4.4
+ \brief The AudioOutput class is used to send data to audio output devices.
+
+ The AudioOutput class plays sound over a sound device. The audio
+ output needs to be connected to a \l{Phonon::}{MediaObject} using
+ \l{Phonon::}{createPath()}. To start playback, you call
+ \l{Phonon::MediaObject::}{play()} on the media object.
+
+ \snippet snippets/phonon.cpp 2
+
+ The class supports changing the volume(). It is also possible to
+ mute the sound.
+
+ To find out what \l{Phonon::}{AudioOutputDevice}s are available
+ for AudioOutput, you can call
+ BackendCapabilities::availableAudioDevices(). A default device is
+ selected by the backend, but it is possible to set the device to
+ be used with setOutputDevice(). The outputDeviceChanged() signal
+ will be emitted if the device changes.
+
+ If an error occurs with the playback, for instance, if no valid
+ output device is found, the media object will receive a
+ stateChanged() signal with the \l{Phonon::}{ErrorState}.
+
+ Note that the default values of properties are dependent on the
+ backend.
+
+ \sa Phonon::VolumeSlider, {Music Player Example}, BackendCapabilities, {Phonon Module}
+*/
+
+/*!
+ \property Phonon::AudioOutput::name
+
+ This is the name that appears in Mixer applications that control
+ the volume of this output.
+
+*/
+
+/*!
+ \property Phonon::AudioOutput::volume
+
+ This is the current loudness of the output. \omit The volume is a
+ real value between 0.0 (minimum) and 1.0 (maximum). The volume
+ follows the sound device used, with 1.0 being the maximum volume
+ the device can produce. \endomit
+
+ (it is using Stevens' law
+ to calculate the change in voltage internally).
+
+ \sa volumeDecibel
+*/
+
+/*!
+ \property Phonon::AudioOutput::volumeDecibel
+
+ This is the current volume of the output in decibel.
+
+ 0 dB means no change in volume, -6dB means an attenuation of the
+ voltage to 50% and an attenuation of the power to 25%, -inf dB means
+ silence.
+
+ \sa volume
+*/
+
+/*!
+ \property Phonon::AudioOutput::outputDevice
+ This property holds the (hardware) destination for the output.
+
+ The default device is determined by the \l{Phonon::}{Category} and the global
+ configuration for that category. Normally you don't need
+ to override this setting - letting the user change the global
+ configuration is the right choice. You can still override the
+ device though, if you have good reasons to do so.
+
+ \sa outputDeviceChanged()
+*/
+
+/*!
+ \property Phonon::AudioOutput::muted
+ This property tells whether the output is muted.
+
+ Muting the output has the same effect as calling setVolume(0.0).
+*/
+
+/*!
+ \fn explicit Phonon::AudioOutput::AudioOutput(Phonon::Category category, QObject *parent = 0)
+
+ Creates a new AudioOutput with the given \a parent that defines
+ output to a physical device.
+
+ The \a category can be used by mixer applications to group volume
+ controls of applications into categories. That makes it easier for
+ the user to identify the programs.
+ The category is also used for the default output device that is
+ configured centrally. As an example: often users want to have the
+ audio signal of a VoIP application go to their USB headset while
+ all other sounds should go to the internal soundcard.
+
+ \sa Phonon::categoryToString(), outputDevice
+*/
+
+/*!
+ \fn explicit Phonon::AudioOutput::AudioOutput(QObject *parent = 0)
+
+ Creates a new AudioOutput that defines output to the system
+ default device with the \{Phonon::Category::}{NoCategory} category
+
+ \sa Phonon::categoryToString(), outputDevice
+*/
+
+/*!
+ \fn Phonon::Category Phonon::AudioOutput::category() const
+
+ Returns the category of this output.
+
+ \sa Phonon::AudioOutput::AudioOutput()
+*/
+
+/*!
+ \fn void Phonon::AudioOutput::volumeChanged(qreal newVolume)
+
+ This signal is emitted whenever the volume has changed. As the
+ volume can change without a call to setVolume (calls over dbus)
+ this is important to keep a widget showing the current volume up
+ to date.
+
+ \a newVolume is the new volume level.
+
+ \sa setVolume(), volume()
+*/
+
+/*!
+ \fn void Phonon::AudioOutput::mutedChanged(bool muted)
+
+ This signal is emitted when the muted property has changed. The \a muted
+ value passed by the signal indicates the state of the muted property.
+ As this property can change by IPC (DBus) calls a UI element showing
+ the muted property should listen to this signal.
+*/
+
+/*!
+ \fn void Phonon::AudioOutput::outputDeviceChanged(const Phonon::AudioOutputDevice &newAudioOutputDevice)
+
+ This signal is emitted when the (hardware) device for the output
+ has changed. \a newAudioOutputDevice is the new device.
+
+ The change can happen either through setOutputDevice or if the
+ global configuration for the used category has changed.
+
+ \sa outputDevice
+*/
+
+/*!
+ \class Phonon::AudioOutputPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::EffectParameter
+ \inmodule Phonon
+ \inheaderfile Phonon/EffectParameter
+ \since 4.4
+ \brief The EffectParameter class describes one parameter of an effect.
+
+ You fetch the parameters of an \l{Phonon::}{Effect} with
+ \l{Phonon::}{Effect::parameters()}.
+
+ \snippet doc/src/snippets/phononeffectparameter.cpp 0
+
+ To describe itself, an effect parameter gives a name() and
+ possibly description() (depending on the backend used). These are
+ suited to present the effect parameter to the user of a Phonon
+ application.
+
+ Note that effects are created by the backend, and that
+ their name and descriptions may vary.
+
+ The value of an effect parameter is stored in a \l{QVariant},
+ of which type() is usually \c int or \c double.
+
+ The value is retrieved with \l{Phonon::}{Effect::parameterValue()}
+ and set with \l{Phonon::Effect::}{setParameterValue()} - both of
+ which takes the EffectParameter as argument. Note that not all
+ effect parameters support setting of their value.
+
+ You get the values a parameter can take with possibleValues(); an
+ empty list is returned if the values are continuous.
+
+ A parameter may also specify default(), minimum(), and maximum()
+ values. Values are returned as \l{QVariant}s. If the parameter
+ does not have the requested value, an \l{QVariant::Invalid}
+ invalid QVariant is returned from these functions.
+
+ The \l{Phonon::}{EffectWidget} provides a widget with which one
+ can control the parameters of an \l{Phonon::}{Effect}.
+
+ \snippet doc/src/snippets/phononeffectparameter.cpp 1
+
+ \sa Effect, EffectWidget, {Capabilities Example}, {Phonon Module}
+*/
+
+/*!
+ \fn Phonon::EffectParameter::EffectParameter()
+ \internal
+
+ Creates an invalid effect parameter.
+*/
+
+/*!
+ \fn Phonon::EffectParameter::~EffectParameter()
+
+ Destroys the effect parameter.
+*/
+
+/*!
+ \fn Phonon::EffectParameter::EffectParameter(const EffectParameter &other)
+
+ Constructs a copy of the \a other effect parameter.
+*/
+
+/*!
+ \fn const QString &Phonon::EffectParameter::name() const
+
+ The name of the parameter. Can be used as the label.
+
+ \return A label for the parameter.
+*/
+
+/*!
+ \fn const QString &Phonon::EffectParameter::description() const
+
+ The parameter may come with a description (LADSPA doesn't have a
+ field for this, so don't expect many effects to provide a
+ description).
+
+ The description can be used for a tooltip or WhatsThis help.
+
+ \return A text describing the parameter.
+*/
+
+/*!
+ \fn QVariant::Type Phonon::EffectParameter::type() const
+
+ Returns the parameter type.
+
+ Common types are QVariant::Int, QVariant::Double, QVariant::Bool and QVariant::String. When
+ QVariant::String is returned you get the possible values from possibleValues.
+*/
+
+/*!
+ \fn bool Phonon::EffectParameter::isLogarithmicControl() const
+
+ Returns whether the parameter should be
+ displayed using a logarithmic scale. This is particularly useful for
+ frequencies and gains.
+*/
+
+/*!
+ \fn QVariant Phonon::EffectParameter::minimumValue() const
+
+ The minimum value to be used for the control to edit the parameter.
+
+ If the returned QVariant is invalid the value is not bounded from
+ below.
+*/
+
+/*!
+ \fn QVariant Phonon::EffectParameter::maximumValue() const
+
+ The maximum value to be used for the control to edit the parameter.
+
+ If the returned QVariant is invalid the value is not bounded from
+ above.
+*/
+
+/*!
+ \fn QVariant Phonon::EffectParameter::defaultValue() const
+
+ The default value.
+*/
+
+/*!
+ \fn QVariantList Phonon::EffectParameter::possibleValues() const
+
+ The possible values to be used for the control to edit the parameter.
+
+ if the value of this parameter is to be picked from predefined values
+ this returns the list (otherwise it returns an empty QVariantList).
+*/
+
+/*!
+ \fn bool Phonon::EffectParameter::operator<(const EffectParameter &rhs) const
+
+ \internal
+ compares the ids of the parameters
+*/
+
+/*!
+ \fn bool Phonon::EffectParameter::operator>(const EffectParameter &rhs) const
+
+ \internal
+ compares the ids of the parameters
+*/
+
+/*!
+ \fn bool Phonon::EffectParameter::operator==(const EffectParameter &rhs) const
+
+ \internal
+ compares the ids of the parameters
+*/
+
+/*!
+ \fn Phonon::EffectParameter &Phonon::EffectParameter::operator=(const EffectParameter &other)
+
+ Assigns the \a other effect parameter to this parameter and returns
+ a reference to this parameter.
+*/
+
+/*!
+ \enum Phonon::EffectParameter::Hint
+
+ Only for backend developers:
+
+ Flags to set the return values of isToggleControl(),
+ isLogarithmicControl(), isIntegerControl(), isBoundedBelow() and
+ isBoundedAbove(). The values of the flags correspond to the values
+ used for LADSPA effects.
+
+ \value ToggledHint
+ If this hint is set it means that
+ the the control has only two states: zero and non-zero
+ (see isToggleControl()).
+
+ \value LogarithmicHint
+ LADSPA's SAMPLE_RATE hint needs to be translated by the backend
+ to normal bounds, as the backend knows the sample rate - and the
+ frontend doesn't (see isLogarithmicControl()).
+
+ \value IntegerHint See isIntegerControl().
+*/
+
+/*!
+ \fn Phonon::EffectParameter::EffectParameter(int parameterId,
+ const QString &name, EffectParameter::Hints hints,
+ const QVariant &defaultValue, const QVariant &min = QVariant(),
+ const QVariant &max = QVariant(), const QVariantList &values = QVariantList(),
+ const QString &description = QString())
+
+ Only to be used by backend implementations:
+
+ Creates a new effect parameter.
+
+ \a parameterId This is a number to uniquely identify the
+ parameter. The id is used for value() and setValue().
+
+ \a name is the name/label for this parameter.
+
+ \a hints sets the hints for the type of parameter.
+
+ \a defaultValue The value that should be used as a default.
+
+ \a min is the minimum value allowed for this parameter. You only
+ need to set this if the BoundedBelowHint is set.
+
+ \a max is the maximum value allowed for this parameter. You only
+ need to set this if the BoundedAboveHint is set.
+
+ The \a values parameter is the values that the effect parameter
+ can take (only applies if non-continuous)
+
+ \a description is a descriptive text for the parameter
+ (explaining what it controls) to be used as a tooltip or
+ WhatsThis help.
+*/
+
+/*!
+ \fn int Phonon::EffectParameter::id() const
+
+ \internal
+
+ Returns the parameter's identifier.
+*/
+
+/*!
+ \class Phonon::AudioOutputInterface40
+ \inmodule Phonon
+ \since 4.4
+ \internal
+ \brief Interface for AudioOutput objects
+
+*/
+
+/*!
+ \fn virtual Phonon::AudioOutputInterface40::~AudioOutputInterface40()
+ \internal
+*/
+
+/*!
+ \fn virtual qreal Phonon::AudioOutputInterface40::volume() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::AudioOutputInterface40::setVolume(qreal) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual int Phonon::AudioOutputInterface40::outputDevice() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual bool Phonon::AudioOutputInterface40::setOutputDevice(int) = 0
+ \internal
+*/
+
+/*!
+ \class Phonon::Path
+ \inmodule Phonon
+ \inheaderfile Phonon/Path
+ \since 4.4
+ \brief The Path class describes connections between media nodes.
+
+ In a \l{Building Graphs}{media graph}, \l{Phonon::}{MediaNode}s
+ are connected by Paths. The multimedia travels in streams over
+ these paths.
+
+ You create a path between two media nodes using the static
+ Phonon::createPath() function, which takes two nodes as arguments.
+ The first argument will send the media stream to the second.
+ Please refer to the class description of the individual media
+ nodes and the Phonon \l{Phonon Overview}{overview} to see which
+ nodes can be connected to each other.
+
+ Paths are also used to insert audio \l{Phonon::}{Effect}s between
+ two media nodes. The effect will then alter the stream on the
+ path. Notice that \l{Phonon::}{Effect}s also are media nodes, but
+ that insertEffect() - instead of Phonon::createPath() - is used to
+ insert them into the media graph.
+
+ The following code example shows how to create a path between two
+ media nodes and insert an effect on that path.
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 20
+
+ \sa Phonon::MediaNode, Phonon::MediaObject, Phonon::AudioOutput,
+ Phonon::VideoWidget, {Phonon Module}
+*/
+
+/*!
+ \fn Phonon::Path::~Path();
+
+ Destroys this reference to the Path. If the path was valid the connection is not broken
+ as both the source and the sink MediaNodes still keep a reference to the Path.
+
+ \sa disconnect()
+*/
+
+/*!
+ \fn Phonon::Path::Path();
+
+ Creates an invalid path.
+
+ You can still make it a valid path by calling reconnect. It is
+ recommended to use the Phonon::createPath() function to create
+ paths.
+
+ \sa Phonon::createPath(), isValid()
+*/
+
+/*!
+ \fn Phonon::Path::Path(const Path &path);
+
+ Constructs a copy of the other \a path specified.
+
+ This constructor is fast thanks to explicit sharing.
+*/
+
+/*!
+ \fn bool Phonon::Path::isValid() const;
+
+ A path is considered valid if it is connected to two media nodes,
+ in which case this function returns true. If it is connected to
+ one or no media nodes, it is consider invalid, and this function
+ will then return false.
+*/
+
+/*!
+ \fn Effect *Phonon::Path::insertEffect(const EffectDescription &desc, Effect *insertBefore = 0);
+
+ Creates and inserts an effect into the path.
+
+ You may insert effects of the same class as often as you like,
+ but if you insert the same object, the call will fail.
+
+ \a desc is the EffectDescription object for the effect to be inserted.
+
+ If you already inserted an effect you can
+ tell with \a insertBefore in which order the data gets
+ processed. If this is \c 0 the effect is appended at the end of
+ the processing list. If the effect has not been inserted before
+ the method will do nothing and return \c false.
+
+ Returns a pointer to the effect object if it could be inserted
+ at the specified position. If \c 0 is returned, the effect was not
+ inserted.
+
+ Below is a code example for inserting an effect into a path:
+
+ \snippet doc/src/snippets/audioeffects.cpp 0
+
+ \sa removeEffect(), effects()
+*/
+
+/*!
+ \fn bool Phonon::Path::insertEffect(Effect *effect, Effect *insertBefore = 0);
+
+ Inserts the given \a effect into the path before the effect specified by \a insertBefore
+ and returns true if successful; otherwise returns false.
+
+ If \a insertBefore is zero, the effect is appended to the processing list.
+
+ You may insert effects of the same class as often as you like, but if you insert
+ the same object, the call will fail.
+
+ \a effect will be inserted right before \a insertBefore. If
+ \a insertBefore is \c 0, the effect is appended at the end of the
+ processing list. If the effect has not been inserted before the
+ method will do nothing and return \c false.
+
+ Returns whether the effect could be inserted at the specified
+ position. If \c false is returned the effect was not inserted.
+
+ \sa removeEffect(), effects()
+*/
+
+/*!
+ \fn bool Phonon::Path::removeEffect(Effect *effect);
+
+ Removes the given \a effect from the path and returns true; otherwise returns false.
+
+ Removes an \a effect from the path.
+
+ If the effect is deleted while it is still connected, the effect will be removed
+ automatically.
+
+ \omit
+ \param effect The effect to be removed.
+
+ \return Returns whether the call was successful. If it returns
+ \c false the effect could not be found in the path, meaning it
+ has not been inserted before.
+ \endomit
+
+ \sa insertEffect(), effects()
+*/
+
+/*!
+ \fn QList<Effect *> Phonon::Path::effects() const;
+
+ Returns a list of Effect objects that are currently
+ used as effects. The order in the list determines the order the
+ signal is sent through the effects.
+
+ \return A list with all current effects.
+
+ \sa insertEffect(), removeEffect()
+*/
+
+/*!
+ \fn bool Phonon::Path::reconnect(MediaNode *source, MediaNode *sink);
+
+ Changes the media nodes the path is connected to by connecting the path
+ to the \a source and \a sink nodes specified. Returns true if successful;
+ otherwise returns false.
+
+ If unsuccessful, the path remains connected to the same nodes as before.
+
+ \sa Phonon::createPath(), {Phonon Overview}
+*/
+
+/*!
+ \fn bool Phonon::Path::disconnect();
+
+ Tries to disconnect the path from the MediaNodes it is connected to, returning
+ true if successful or false if unsuccessful.
+
+ If successful, the path is invalidated: isValid() will returns false.
+*/
+
+/*!
+ \fn Path &Phonon::Path::operator=(const Path &p);
+
+ Assigns \a p to this Path and returns a reference to this Path.
+
+ This operation is fast thanks to explicit sharing.
+*/
+
+/*!
+ \fn bool Phonon::Path::operator==(const Path &p) const;
+
+ Returns true if this Path is equal to \a p; otherwise returns false;
+*/
+
+/*!
+ \fn bool Phonon::Path::operator!=(const Path &p) const;
+
+ Returns true if this Path is not equal to \a p; otherwise returns false;
+*/
+
+/*!
+ \fn Path Phonon::createPath(MediaNode *source, MediaNode *sink);
+
+ \relates Phonon::Path
+ Creates a new Path connecting the two MediaNodes \a source and \a sink.
+
+ The implementation will automatically select the right format and media type. E.g. connecting a
+ MediaObject and AudioOutput will create a Path object connecting the audio. This might be
+ represented as PCM or perhaps even AC3 depending on the AudioOutput object.
+
+ \param source The MediaNode to connect an output from
+ \param sink The MediaNode to connect to.
+*/
+
+/*!
+ \class Phonon::PathPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::MediaObjectInterface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+ \brief Backend interface for media sources.
+
+ The backend implementation has to provide two signals, that are not defined
+ in this interface:
+ \list
+ \o \target phonon_MediaObjectInterface_stateChanged
+ void stateChanged(Phonon::State newstate, Phonon::State oldstate)
+
+ Emitted when the state of the MediaObject has changed.
+ In case you're not interested in the old state you can also
+ connect to a slot that only has one State argument.
+
+ \param newstate The state the Player is in now.
+ \param oldstate The state the Player was in before.
+
+ \o \target phonon_MediaObjectInterface_tick
+ void tick(qint64 time)
+
+ This signal gets emitted every tickInterval milliseconds.
+
+ \param time The position of the media file in milliseconds.
+
+ \sa setTickInterval()
+ \sa tickInterval()
+ \endlist
+
+ \sa MediaObject
+*/
+
+/*!
+ \fn virtual Phonon::MediaObjectInterface::~MediaObjectInterface()
+ \internal
+*/
+
+/*!
+ \fn virtual qint64 Phonon::MediaObjectInterface::remainingTime() const
+ \internal
+*/
+
+/*!
+ \fn virtual qint32 Phonon::MediaObjectInterface::prefinishMark() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::setPrefinishMark(qint32) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual qint32 Phonon::MediaObjectInterface::transitionTime() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::setTransitionTime(qint32) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::play() = 0
+ \internal
+
+ Requests the playback to start.
+
+ This method is only called if the state transition to PlayingState is possible.
+
+ The backend should react immediately
+ by either going into PlayingState or BufferingState if the
+ former is not possible.
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::pause() = 0
+ \internal
+
+ Requests the playback to pause.
+
+ This method is only called if the state transition to PausedState is possible.
+
+ The backend should react as fast as possible. Go to PausedState
+ as soon as playback is paused.
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::stop() = 0
+ \internal
+
+ Requests the playback to be stopped.
+
+ This method is only called if the state transition to StoppedState is possible.
+
+ The backend should react as fast as possible. Go to StoppedState
+ as soon as playback is stopped.
+
+ A subsequent call to play() will start playback at the beginning of
+ the media.
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::seek(qint64 milliseconds) = 0
+ \internal
+
+ Requests the playback to be seeked to the given time.
+
+ The backend does not have to finish seeking while in this function
+ (i.e. the backend does not need to block the thread until the seek is
+ finished; even worse it might lead to deadlocks when using a
+ ByteStream which gets its data from the thread this function would
+ block).
+
+ As soon as the seek is done the currentTime() function and
+ the tick() signal will report it.
+
+ \param milliseconds The time where playback should seek to in
+ milliseconds.
+*/
+
+/*!
+ \fn virtual qint32 Phonon::MediaObjectInterface::tickInterval() const = 0
+ \internal
+
+ Return the time interval in milliseconds between two ticks.
+
+ Returns the tick interval that it was set to (might not
+ be the same as you asked for).
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::setTickInterval(qint32 interval) = 0
+ \internal
+
+ Change the interval the tick signal is emitted. Set \a interval to 0 to
+ disable the signal.
+
+ \a interval tick interval in milliseconds
+
+ Returns the tick interval that it was set to (might not be the same as you
+ asked for).
+
+*/
+
+/*!
+ \fn virtual bool Phonon::MediaObjectInterface::hasVideo() const = 0
+ \internal
+
+ Check whether the media data includes a video stream.
+
+ Returns true if the media contains video data.
+*/
+
+/*!
+ \fn virtual bool Phonon::MediaObjectInterface::isSeekable() const = 0
+ \internal
+
+ If the current media may be seeked this function returns true;
+ otherwise, false.
+
+ Returns whether the current media may be seeked.
+*/
+
+/*!
+ \fn virtual qint64 Phonon::MediaObjectInterface::currentTime() const = 0
+ \internal
+
+ Get the current time (in milliseconds) of the file currently being played.
+*/
+
+/*!
+ \fn virtual Phonon::State Phonon::MediaObjectInterface::state() const = 0
+ \internal
+
+ Get the current state.
+*/
+
+/*!
+ \fn virtual QString Phonon::MediaObjectInterface::errorString() const = 0
+ \internal
+
+ A translated string describing the error.
+*/
+
+/*!
+ \fn virtual Phonon::ErrorType Phonon::MediaObjectInterface::errorType() const = 0
+ \internal
+
+ Tells your program what to do about the error.
+
+ \sa Phonon::ErrorType
+*/
+
+/*!
+ \fn virtual qint64 Phonon::MediaObjectInterface::totalTime() const = 0
+ \internal
+
+ Returns the total time of the media in milliseconds.
+
+ If the total time is not know return -1. Do not block until it is
+ known, instead emit the totalTimeChanged signal as soon as the total
+ time is known or changes.
+*/
+
+/*!
+ \fn virtual MediaSource Phonon::MediaObjectInterface::source() const = 0
+ \internal
+
+ Returns the current source.
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::setSource(const MediaSource &) = 0
+ \internal
+
+ Sets the current source. When this function is called the MediaObject is
+ expected to stop all current activity and start loading the new
+ source (i.e. go into LoadingState).
+
+ It is expected that the
+ backend now starts preloading the media data, filling the audio
+ and video buffers and making all media meta data available. It
+ will also trigger the totalTimeChanged signal.
+
+ If the backend does not know how to handle the source it needs to
+ change state to Phonon::ErrorState. Don't bother about handling KIO
+ URLs. It is enough to handle AbstractMediaStream sources correctly.
+
+ \warning Keep the MediaSource object around as long as the backend
+ uses the AbstractMediaStream returned by the MediaSource. In case
+ that no other reference to the MediaSource exists and it is set to
+ MediaSource::autoDelete, the AbstractMediaStream is deleted when the
+ last MediaSource ref is deleted.
+*/
+
+/*!
+ \fn virtual void Phonon::MediaObjectInterface::setNextSource(const MediaSource &source) = 0
+ \internal
+
+ Sets the next source to be used for transitions. When a next source
+ is set playback should continue with the new source. In that case
+ finished and prefinishMarkReached are not emitted.
+
+ \param source The source to transition to (crossfade/gapless/gap). If
+ \a source is an invalid MediaSource object then the queue is empty
+ and the playback should stop normally.
+
+ \warning Keep the MediaSource object around as long as the backend
+ uses the AbstractMediaStream returned by the MediaSource. In case
+ that no other reference to the MediaSource exists and it is set to
+ MediaSource::autoDelete, the AbstractMediaStream is deleted when the
+ last MediaSource ref is deleted.
+*/
+
+/*!
+ \class Phonon::EffectWidget effectwidget.h Phonon/EffectWidget
+ \inmodule Phonon
+ \inheaderfile Phonon/EffectWidget
+ \since 4.4
+ \brief The EffectWidget class provides a widget to control the parameters of an Effect.
+
+ The EffectWidget class provides a widget, with which an effects
+ parameters can be controlled. The widget does not have an API,
+ and is constructed with the \l{Phonon::}{Effect}, of which
+ parameters should be controlled.
+
+ \snippet doc/src/snippets/audioeffects.cpp 1
+
+ The following image shows an example of an effect widget.
+
+ \image effectwidget.png
+
+ Note that some audio effects do not have parameters, and the
+ widget will then not \l{QWidget::}{show()} at all.
+
+ \sa Effect, BackendCapabilities, EffectDescription, {Phonon Module}
+*/
+
+/*!
+ \class Phonon::AbstractAudioOutput
+ \inmodule Phonon
+ \internal
+ \brief Provides a common base class for all audio outputs.
+
+ \sa AudioOutput
+*/
+
+/*!
+ \fn Phonon::AbstractAudioOutput::~AbstractAudioOutput()
+ \internal
+*/
+
+/*!
+ \class Phonon::AbstractAudioOutputPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class AudioOutputAdaptor
+ \inmodule Phonon
+ \brief Provides an adaptor class for interface org.kde.Phonon.AudioOutput
+ \internal
+*/
+
+/*!
+ \class Phonon::VolumeSlider
+ \inmodule Phonon
+ \inheaderfile Phonon/VolumeSlider
+ \since 4.4
+ \brief The VolumeSlider widget provides a slider that is used to control the volume of an audio output device.
+
+ The slider also displays an icon indicating if the volume of the
+ \l{Phonon::}{AudioOutput} it is connected to is muted. The icon
+ can be removed with setMuteVisible().
+
+ It is possible to set the \l{maximumVolume}{maximum} value of the
+ slider. By default, the minimum and maximum values of the slider
+ are 0.0 (no sound) to 1.0 (the maximum volume the audio output can
+ produce).
+
+ Here follows a code example:
+
+ \snippet doc/src/snippets/volumeslider.cpp 0
+
+ \omit mention how to change the style of the slider. \endomit
+
+ \sa {Phonon Module}
+*/
+
+/*!
+ \property Phonon::VolumeSlider::maximumVolume
+
+ This property holds the maximum volume that can be set with this slider.
+
+ By default the maximum value is 1.0 (100%).
+*/
+
+/*!
+ \property Phonon::VolumeSlider::orientation
+ This property holds the orientation of the slider.
+
+ The orientation must be Qt::Vertical (the default) or Qt::Horizontal.
+*/
+
+/*!
+ \property Phonon::VolumeSlider::tracking
+ This property holds whether slider tracking is enabled.
+
+ If tracking is enabled (the default), the volume changes
+ while the slider is being dragged. If tracking is
+ disabled, the volume changes only when the user
+ releases the slider.
+*/
+
+/*!
+ \property Phonon::VolumeSlider::pageStep
+ This property holds the page step.
+
+ The larger of two natural steps that a slider provides and
+ typically corresponds to the user pressing PageUp or PageDown.
+
+ Defaults to 5 (5% of the voltage).
+*/
+
+/*!
+ \property Phonon::VolumeSlider::singleStep
+ This property holds the single step.
+
+ The smaller of two natural steps that a slider provides and
+ typically corresponds to the user pressing an arrow key.
+
+ Defaults to 1 (1% of the voltage).
+*/
+
+/*!
+ \property Phonon::VolumeSlider::muteVisible
+ This property holds whether the mute button/icon next to the slider is visible.
+
+ By default the mute button/icon is visible.
+*/
+
+/*!
+ \property Phonon::VolumeSlider::iconSize
+ \brief the icon size used for the mute button/icon.
+
+ The default size is defined by the GUI style.
+*/
+
+/*!
+ \fn explicit Phonon::VolumeSlider::VolumeSlider(QWidget *parent = 0)
+ Constructs a new volume slider with the given \a parent.
+*/
+
+/*!
+ \fn explicit Phonon::VolumeSlider::VolumeSlider(AudioOutput *output, QWidget *parent = 0)
+ Constructs a new volume slider with the given \a output object and \a parent.
+*/
+
+/*!
+ \fn Phonon::VolumeSlider::~VolumeSlider()
+*/
+
+/*!
+ \fn AudioOutput *Phonon::VolumeSlider::audioOutput() const
+*/
+
+/*!
+ \fn void Phonon::VolumeSlider::setAudioOutput(Phonon::AudioOutput *output)
+
+ Sets the audio output object to be controlled by this slider to the specified
+ \a output object.
+*/
+
+/*!
+ \class Phonon::VolumeSliderPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::MediaController
+ \inmodule Phonon
+ \inheaderfile Phonon/MediaController
+ \since 4.4
+ \brief The MediaController class controls optional features of a media file/device.
+
+ Some media sources have content that the \l{Phonon::}{MediaObject}
+ does not provide control over, for instance, chapters in a DVD
+ file. The functionality the media controller offers is
+ dependent on the type of media source that is played back.
+ Commonly, the media controller allows you to:
+
+ \list
+ \o Navigate between \bold chapters.
+ \o Navigate between \bold titles.
+ \o Select between \bold angles.
+ \endlist
+
+ The \l{Phonon::MediaController::}{Feature} enum explains these
+ terms in more detail, and their context in playback of CD and DVD.
+
+ The media controller keeps a \l{Phonon::}{MediaObject}, of which
+ \l{Phonon::MediaObject::currentSource()}{media source} is played
+ back. You can still call the media object's functions, e.g.,
+ \l{Phonon::MediaObject::}{stop()}; this is all handled correctly
+ by the media controller. You have the option of letting the media
+ controller play all titles of a source in sequence by setting the
+ \l{autoplayTitles()}{autoplay titles} option.
+
+ To start a playback using a media object, you call
+ \l{Phonon::MediaObject::}{play()} on the media object. To play a
+ specific title, use setCurrentTitle() and then call
+ \l{Phonon::MediaObject::}{play()}.
+
+ \warning The Phonon::MediaController class is not yet supported by
+ Qt backends.
+
+ \sa {Phonon Module}
+*/
+
+/*!
+ \fn int Phonon::MediaController::availableAudioChannels() const
+ \internal
+*/
+
+/*!
+ \fn void Phonon::MediaController::availableAudioChannelsChanged()
+ \internal
+*/
+
+/*!
+ \fn QList<SubtitleDescription> Phonon::MediaController::availableSubtitles() const
+ \internal
+*/
+
+/*!
+ \fn void Phonon::MediaController::availableSubtitlesChanged()
+ \internal
+*/
+
+/*!
+ \fn AudioChannelDescription Phonon::MediaController::currentAudioChannel() const
+ \internal
+*/
+
+/*!
+ \fn SubtitleDescription Phonon::MediaController::currentSubtitle() const
+ \internal
+*/
+
+/*!
+ \fn void Phonon::MediaController::setCurrentAudioChannel(const Phonon::AudioChannelDescription &stream)
+ \internal
+*/
+
+/*!
+ \fn void Phonon::MediaController::setCurrentSubtitle(const Phonon::SubtitleDescription &stream)
+ \internal
+*/
+
+/*!
+ \fn Phonon::BackendCapabilities::availableAudioCaptureDevices()
+ \internal
+*/
+
+/*!
+ \fn Phonon::BackendCapabilities::Notifier::availableAudioCaptureDevicesChanged()
+ \internal
+*/
+
+/*!
+ \enum Phonon::MediaController::Feature
+
+ The values of this enum are interpreted differently depending on
+ the type of media source, e.g., DVD or CD. We give examples for
+ these sources.
+
+ \value Angles In the VOB (DVD) format, it is possible to to give
+ several video streams of the same scene, each of which displays
+ the scene from a different angle. The DVD viewer can then change
+ between these angles.
+
+ \value Chapters In the VOB format, chapters are points in a
+ single video stream that can be played and seeked to
+ separately.
+
+ \value Titles On a CD, a title is a separate sound track. On DVD,
+ a title is a separate VOB file.
+
+*/
+
+/*!
+ \fn Phonon::MediaController::MediaController(MediaObject *parent)
+
+ Constructs a new MediaController with the media object (\a parent)
+ to be used by the media controller.
+
+ \sa MediaObject, Feature
+*/
+
+/*!
+ \fn Phonon::MediaController::~MediaController()
+*/
+
+/*!
+ \fn Features Phonon::MediaController::supportedFeatures() const
+*/
+
+/*!
+ \fn int Phonon::MediaController::availableAngles() const
+
+ Returns the available angles that is available for the current
+ media source.
+
+ \sa Feature
+*/
+
+/*!
+ \fn int Phonon::MediaController::currentAngle() const
+
+ Returns the angle that is currently used.
+
+ \sa Feature
+*/
+
+/*!
+ \fn int Phonon::MediaController::availableChapters() const
+
+ Returns the number of chapters the current media source
+ contains.
+
+ \sa Feature
+*/
+
+/*!
+ \fn int Phonon::MediaController::currentChapter() const
+
+ Returns the chapter that is currently being played back.
+
+ \sa Feature
+*/
+
+/*!
+ \fn int Phonon::MediaController::availableTitles() const
+
+ Returns the number of titles that the current media source
+ contains.
+
+ \sa Feature
+*/
+
+/*!
+ \fn int Phonon::MediaController::currentTitle() const
+
+ Returns the title that is currently played back.
+
+ The current title is 0 (the first) by default.
+
+ \sa Feature
+*/
+
+/*!
+ \fn bool Phonon::MediaController::autoplayTitles() const
+
+ Returns true if titles will automatically be played when the media
+ is played; otherwise returns false.
+
+ The media controller will play the titles of the media source in
+ sequence when the media object's \l{Phonon::MediaObject::}{play()}
+ function is called. If the autoplay option is disabled, the media
+ object will play the
+ \l{Phonon::}{MediaController::currentTitle()}{current title} and then
+ finish the playback.
+
+ \sa setAutoplayTitles(), currentTitle()
+*/
+
+/*!
+ \fn void Phonon::MediaController::setAutoplayTitles(bool enable)
+
+ Sets the titles to play automatically when the media is played if
+ \a enable is true; otherwise disables this option.
+
+ The media controller will play the titles of the media source in
+ sequence when the media object's \l{Phonon::MediaObject::}{play()}
+ function is called. If the autoplay option is disabled, the media
+ object will play the
+ \l{Phonon::}{MediaController::currentTitle()}{current title} and then
+ finish the playback.
+
+ \sa autoplayTitles(), currentTitle()
+*/
+
+/*!
+ \fn void Phonon::MediaController::setCurrentAngle(int angleNumber)
+
+ Sets the current angle to the given \a angleNumber if the media
+ file or device supports navigation by angle number.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::setCurrentChapter(int chapterNumber)
+
+ Sets the current chapter to the given \a chapterNumber if the media
+ file or device supports navigation by chapter number.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::setCurrentTitle(int titleNumber)
+
+ Skips to the given title \a titleNumber.
+
+ If it was playing before the title change it will start playback on the new title if
+ autoplayTitles is enabled.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::nextTitle()
+
+ Skips to the next title.
+
+ If it was playing before the title change it will start playback on the next title if
+ autoplayTitles is enabled.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::previousTitle()
+
+ Skips to the previous title.
+
+ If it was playing before the title change it will start playback on the previous title if
+ autoplayTitles is enabled.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::availableAnglesChanged(int availableAngles)
+
+ This signal is emitted whenever the number of available angles changes.
+ The new number of available angles is given by \a availableAngles.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::angleChanged(int angleNumber)
+
+ This signal is emitted whenever the current angle changes.
+ The new angle number is given by \a angleNumber.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::availableChaptersChanged(int availableChapters)
+
+ This signal is emitted whenever the number of available chapters changes.
+ The new number of available chapters is given by \a availableChapters.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::chapterChanged(int chapterNumber)
+
+ This signal is emitted whenever the current chapter changes.
+ The new chapter number is given by \a chapterNumber.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::availableTitlesChanged(int availableTitles)
+
+ This signal is emitted whenever the number of available titles changes.
+ The new number of available titles is given by \a availableTitles.
+
+ \sa Feature
+*/
+
+/*!
+ \fn void Phonon::MediaController::titleChanged(int titleNumber)
+
+ This signal is emitted whenever the current title changes.
+ The new title number is given by \a titleNumber.
+
+ \sa Feature
+*/
+
+/*!
+ \class Phonon::VideoWidget
+ \inmodule Phonon
+ \inheaderfile Phonon/VideoWidget
+ \since 4.4
+ \ingroup advanced
+ \ingroup multimedia
+ \brief The VideoWidget class provides a widget that is used to display video.
+
+ The VideoWidget class renders the video of a media stream on a
+ QWidget. It is connected to the \l{Phonon::}{MediaObject}, of
+ which video stream it should render. You connect the two objects
+ using the Phonon::createPath() function.
+
+ The widget has some possibilities to manipulate the video
+ stream. You can change the brightness(), hue(), saturation(),
+ and contrast().
+
+ Resizing of the video is handled automatically, but you can affect
+ the way the video is resized with the aspectRatio and scaleMode
+ properties. By default, the widget will use the aspect ratio of
+ the video stream itself.
+
+ The video widget takes the size of the video when it receives a new video
+ stream (i.e., when a new MediaSource is set on the MediaObject to which it is
+ connected). If you need to know the size of the video, you can call
+ \l{QWidget::}{sizeHint()} after the video has been loaded (i.e., after the
+ MediaObject leaves the \l{Phonon::}{LoadingState}).
+
+ It is also possible to go to \l{fullScreen}{full screen} mode.
+
+ A typical example of usage follows below:
+
+ \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 21
+
+ \sa {Phonon Module}
+*/
+
+/*!
+ \fn Phonon::VideoWidget::VideoWidget(QWidget *parent = 0)
+
+ Constructs a new video widget with the specified \a parent.
+*/
+
+/*!
+ \fn Phonon::VideoWidget::VideoWidget(VideoWidgetPrivate &d, QWidget *parent)
+ \internal
+
+ Constructs a new video widget with the specified \a parent.
+*/
+
+/*!
+ \fn bool Phonon::VideoWidget::event(QEvent *)
+ \reimp
+*/
+
+/*!
+ \fn void Phonon::VideoWidget::mouseMoveEvent(QMouseEvent *)
+ \reimp
+*/
+
+/*!
+ \enum Phonon::VideoWidget::ScaleMode
+
+ The ScaleMode enum describes how to treat aspect ratio during
+ resizing of video.
+
+ \value FitInView The video will be fitted to fill the view
+ keeping aspect ratio.
+ \value ScaleAndCrop The video is scaled
+
+
+*/
+
+/*!
+ \property Phonon::VideoWidget::fullScreen
+ This property holds whether the video is shown using the complete
+ screen.
+
+ The property differs from QWidget::fullScreen in that it is
+ writeable.
+
+ By default the widget is not shown in fullScreen.
+
+ \warning When switching to full screen mode using setFullScreen(),
+ the widget onto which the video is rendered is shown as a
+ top-level window. Key event forwarding is handled by VideoWidget,
+ but if you need to handle other events, e.g., mouse events, you
+ should handle fullscreen mode yourself.
+
+*/
+
+/*!
+ \property Phonon::VideoWidget::aspectRatio
+ Defaults to AspectRatioAuto.
+
+ \sa AspectRatio
+*/
+
+/*!
+ \property Phonon::VideoWidget::scaleMode
+
+ If the size of the widget and the size of the video are not equal.
+ The video will be zoomed to fit the widget. The smaller zoom
+ (AddBarsScaleMode) adds black bars at the left/right or top/bottom to
+ make all of the image visible (default). The bigger zoom (ExpandMode)
+ fills the widget completely, keeping all information in one direction
+ and leaving parts of the image outside of the widget in the other
+ direction.
+*/
+
+/*!
+ \property Phonon::VideoWidget::brightness
+
+ This property holds brightness of the video.
+
+ Default is 0. Acceptable values are in range of -1, 1.
+*/
+
+/*!
+ \property Phonon::VideoWidget::contrast
+
+ This property holds the contrast of the video.
+
+ Default is 0. Acceptable values are in range of -1, 1.
+*/
+
+/*!
+ \property Phonon::VideoWidget::hue
+
+ This property holds the hue of the video.
+
+ Default is 0. Acceptable values are in range of -1, 1.
+*/
+
+/*!
+ \property Phonon::VideoWidget::saturation
+
+ This property holds saturation of the video.
+
+ Default is 0. Acceptable values are in range of -1, 1.
+*/
+
+/*!
+ \enum Phonon::VideoWidget::AspectRatio
+
+ Defines the width:height to be used for the video.
+
+ \value AspectRatioAuto
+ Let the decoder find the aspect ratio automatically from the
+ media file (this is the default).
+
+ \value AspectRatioWidget
+ Fits the video into the widget making the aspect ratio depend
+ solely on the size of the widget. This way the aspect ratio
+ is freely resizeable by the user.
+
+ \value AspectRatio4_3
+ Make width/height == 4/3, which is the old TV size and
+ monitor size (1024/768 == 4/3). (4:3)
+
+ \value AspectRatio16_9
+ Make width/height == 16/9, which is the size of most current
+ media. (16:9)
+*/
+
+/*!
+ \fn void Phonon::VideoWidget::exitFullScreen()
+
+ Convenience slot, calling setFullScreen(false)
+*/
+
+
+/*!
+ \fn void Phonon::VideoWidget::enterFullScreen()
+
+ Convenience slot, calling setFullScreen(true)
+*/
+
+/*!
+ \class Phonon::VideoWidgetInterface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn virtual Phonon::VideoWidgetInterface::~VideoWidgetInterface()
+*/
+
+/*!
+ \fn virtual Phonon::VideoWidget::AspectRatio Phonon::VideoWidgetInterface::aspectRatio() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setAspectRatio(Phonon::VideoWidget::AspectRatio ratio) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual qreal Phonon::VideoWidgetInterface::brightness() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setBrightness(qreal) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual Phonon::VideoWidget::ScaleMode Phonon::VideoWidgetInterface::scaleMode() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setScaleMode(Phonon::VideoWidget::ScaleMode mode) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual qreal Phonon::VideoWidgetInterface::contrast() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setContrast(qreal) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual qreal Phonon::VideoWidgetInterface::hue() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setHue(qreal) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual qreal Phonon::VideoWidgetInterface::saturation() const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual void Phonon::VideoWidgetInterface::setSaturation(qreal) = 0
+ \internal
+*/
+
+/*!
+ \fn virtual QWidget *Phonon::VideoWidgetInterface::widget() = 0
+ \internal
+*/
+
+/*!
+ \class Phonon::PlatformPlugin
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn virtual AbstractMediaStream *Phonon::PlatformPlugin::createMediaStream(const QUrl &url, QObject *parent) = 0
+
+ Creates a AbstractMediaStream object with the given \a parent that provides the data
+ for the given URL specified by \a url.
+ \omit
+ On KDE this uses KIO.
+ \endomit
+*/
+
+/*!
+ \fn virtual QIcon Phonon::PlatformPlugin::icon(const QString &name) const = 0
+
+ Returns the icon for the given icon name.
+*/
+
+/*!
+ \fn virtual void Phonon::PlatformPlugin::notification(const char *notificationName, const QString &text,
+ const QStringList &actions, QObject *receiver, const char *actionSlot) const = 0
+
+ Shows a notification pop-up with the given \a notificationName and \a text.
+ Each action in the associated list of \a actions is connected to the \a actionSlot
+ of the specified \a receiver object, which is expected to act on the actions as
+ they are triggered by the user.
+*/
+
+/*!
+ \fn virtual QString Phonon::PlatformPlugin::applicationName() const = 0
+
+ Returns the name of the application. For most Qt application this is
+ QCoreApplication::applicationName(), but for KDE this is overridden by KAboutData.
+*/
+
+
+/*!
+ \fn virtual QObject *Phonon::PlatformPlugin::createBackend() = 0
+
+ Creates a backend object. This way the platform can decide the backend preference.
+*/
+
+/*!
+ \fn virtual QObject *Phonon::PlatformPlugin::createBackend(const QString &library, const QString &version) = 0
+
+ Using the library loader of the platform, loads a given backend provided the
+ specified \a library and \a version.
+*/
+
+/*!
+ \fn virtual bool Phonon::PlatformPlugin::isMimeTypeAvailable(const QString &mimeType) const = 0
+
+ Tries to check whether the default backend supports the MIME type specified by \a mimeType
+ without loading the actual backend library.
+ \omit
+ On KDE this reads the MIME type list from the .desktop file of
+ the backend.
+ \endomit
+*/
+
+/*!
+ \fn virtual void Phonon::PlatformPlugin::saveVolume(const QString &outputName, qreal volume) = 0
+
+ Saves the volume for the given output.
+*/
+
+/*!
+ \fn virtual qreal Phonon::PlatformPlugin::loadVolume(const QString &outputName) const = 0
+
+ Loads the volume for the given output.
+*/
+
+/*!
+ \class Phonon::MediaNode
+ \inmodule Phonon
+ \inheaderfile Phonon/MediaNode
+ \since 4.4
+ \brief The MediaNode class is the base class for all nodes in a media graph.
+
+ In all phonon applications, one builds a media graph consisting of
+ MediaNodes. The graph will take multimedia content, e.g., from a
+ file, as input. After its nodes have processed the multimedia, the
+ graph will output the media again, e.g., to a sound card.
+
+ The multimedia content is streamed over \l{Phonon::}{Path}s
+ between the nodes in the graph. You can query the paths that are
+ connected to a media node with inputPaths() and outputPaths().
+
+ You can check whether the node is implemented by the current
+ backend by calling isValid(). This does not guarantee that an
+ instance of the class works as expected, but that the backend has
+ implemented functionality for the class.
+
+ Currently, Phonon has four media nodes: \l{Phonon::}{MediaObject},
+ \l{Phonon::}{AudioOutput}, \l{Phonon::}{VideoWidget}, and \l{Phonon::}{Effect}.
+ Please refer to their class descriptions for details about their usage, and to
+ find out which nodes can be connected to each other. See also \l{Building
+ Graphs} in Phonon's \l{Phonon Overview}{overview} document.
+
+ Two nodes are connected to each other using the
+ Phonon::createPath() or \l{Phonon::}{Path::insertEffect()}
+ functions (only \l{Phonon::Effect}s use
+ \l{Phonon::Path::}{insertEffect()}). We show a code example below,
+ in which we build a media graph for video playback and then query
+ its media nodes for their \l{Phonon::}{Path}s:
+
+ \snippet doc/src/snippets/medianodesnippet.cpp 0
+
+ When you create a Phonon application, you will likely build the
+ graph yourself. This makes isValid() the most useful function of
+ this class. The other two functions help navigate the graph, which
+ you do not need to do as you created the nodes yourself.
+
+ \sa {Phonon Overview}, Phonon::MediaObject,
+ Phonon::AudioOutput, Phonon::VideoWidget, {Phonon Module}
+*/
+
+/*!
+ \fn virtual Phonon::MediaNode::~MediaNode()
+
+ Destroys the media node and any paths connecting it to other
+ nodes. Any \l{Phonon::}{Effect}s connected to these paths will
+ also be deleted.
+*/
+
+/*!
+ \fn bool Phonon::MediaNode::isValid() const
+
+ Returns true if the backend provides an implementation of this
+ class; otherwise returns false.
+
+ This does not guarantee that instances of the class works as
+ expected, but that the backend has implemented the functionality
+ for this class. For instance, Qt's GStreamer backend will return
+ true for instances of the \l{Phonon::}{AudioOutput} class, even if
+ there is a problem with GStreamer and it could not play sound.
+
+*/
+
+/*!
+ \fn QList<Path> Phonon::MediaNode::inputPaths() const
+
+ Returns the paths that inputs multimedia to this media node.
+
+ \sa outputPaths()
+*/
+
+/*!
+ \fn QList<Path> Phonon::MediaNode::outputPaths() const
+
+ Returns the paths to which this media node outputs media.
+
+ \sa inputPaths()
+*/
+
+/*!
+ \fn Phonon::MediaNode::MediaNode(MediaNodePrivate &dd)
+ \internal
+*/
+
+/*!
+ \class Phonon::GlobalConfig
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn Phonon::GlobalConfig::GlobalConfig()
+ \internal
+*/
+
+/*!
+ \fn Phonon::GlobalConfig::~GlobalConfig()
+ \internal
+*/
+
+/*!
+ \fn QList<int> Phonon::GlobalConfig::audioOutputDeviceListFor(Phonon::Category category, HideAdvancedDevicesOverride override = FromSettings) const
+ \internal
+*/
+
+/*!
+ \fn int Phonon::GlobalConfig::audioOutputDeviceFor(Phonon::Category category) const
+ \internal
+*/
+
+/*!
+ \class Phonon::ObjectDescriptionData
+ \inmodule Phonon
+ \since 4.4
+ \internal
+ \brief Data class for objects describing devices or features of the backend.
+
+ \sa Phonon::BackendCapabilities
+*/
+
+/*!
+ \fn bool Phonon::ObjectDescriptionData::operator==(const ObjectDescriptionData &otherDescription) const
+
+ Returns \c true if this ObjectDescription describes the same
+ as \a otherDescription; otherwise returns \c false.
+*/
+
+/*!
+ \fn QString Phonon::ObjectDescriptionData::name() const
+
+ Returns the name of the capture source.
+
+ \return A string that should be presented to the user to
+ choose the capture source.
+*/
+
+/*!
+ \fn QString Phonon::ObjectDescriptionData::description() const
+
+ Returns a description of the capture source. This text should
+ make clear what sound source this is, which is sometimes hard
+ to describe or understand from just the name.
+
+ \return A string describing the capture source.
+*/
+
+/*!
+ \fn QVariant Phonon::ObjectDescriptionData::property(const char *name) const
+
+ Returns a named property.
+
+ If the property is not set an invalid value is returned.
+
+ \sa propertyNames()
+*/
+
+/*!
+ \fn QList<QByteArray> Phonon::ObjectDescriptionData::propertyNames() const
+
+ Returns all names that return valid data when property() is called.
+
+ \sa property()
+*/
+
+/*!
+ \fn bool Phonon::ObjectDescriptionData::isValid() const
+
+ Returns true if the Tuple is valid (index != -1); otherwise returns
+ false.
+*/
+
+/*!
+ \fn int Phonon::ObjectDescriptionData::index() const
+
+ A unique identifier for this device/. Used internally
+ to distinguish between the devices/.
+
+ \return An integer that uniquely identifies every device.
+*/
+
+/*!
+ \fn static ObjectDescriptionData *Phonon::ObjectDescriptionData::fromIndex(ObjectDescriptionType type, int index)
+ \internal
+*/
+
+/*!
+ \fn Phonon::ObjectDescriptionData::~ObjectDescriptionData()
+ \internal
+*/
+
+/*!
+ \fn Phonon::ObjectDescriptionData::ObjectDescriptionData(ObjectDescriptionPrivate * = 0)
+ \internal
+*/
+
+/*!
+ \class Phonon::AddonInterface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+ \brief Interface for Menu, Chapter, Angle and Title/Track control.
+*/
+
+/*!
+ \fn virtual Phonon::AddonInterface::~AddonInterface()
+ \internal
+*/
+
+/*!
+ \enum Phonon::AddonInterface::Interface
+
+ This enum describes the type of interface represented by an AddonInterface object.
+
+ \value NavigationInterface
+ \value ChapterInterface
+ \value AngleInterface
+ \value TitleInterface
+*/
+
+/*!
+ \enum Phonon::AddonInterface::NavigationCommand
+ \internal
+ \value Menu1Button
+*/
+
+/*!
+ \enum Phonon::AddonInterface::ChapterCommand
+ \internal
+ \value availableChapters
+ \value chapter
+ \value setChapter
+*/
+
+/*!
+ \enum Phonon::AddonInterface::AngleCommand
+ \internal
+ \value availableAngles
+ \value angle
+ \value setAngle
+*/
+
+/*!
+ \enum Phonon::AddonInterface::TitleCommand
+ \internal
+ \value availableTitles
+ \value title
+ \value setTitle
+ \value autoplayTitles
+ \value setAutoplayTitles
+*/
+
+/*!
+ \fn virtual bool Phonon::AddonInterface::hasInterface(Interface iface) const = 0
+ \internal
+*/
+
+/*!
+ \fn virtual QVariant Phonon::AddonInterface::interfaceCall(Interface iface, int command,
+ const QList<QVariant> &arguments) = 0
+ \internal
+*/
+
+/*!
+ \class Phonon::MediaNodePrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \namespace Phonon::Factory
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \fn Sender *Phonon::Factory::sender()
+
+ Returns a pointer to the object emitting the signals.
+
+ \sa Sender::backendChanged()
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::createMediaObject(QObject *parent = 0)
+
+ Create a new backend object for a MediaObject.
+
+ \return a pointer to the MediaObject the backend provides.
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::createEffect(int effectId, QObject *parent = 0)
+
+ Create a new backend object for a Effect.
+
+ \return a pointer to the Effect the backend provides.
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::createVolumeFaderEffect(QObject *parent = 0)
+
+ Create a new backend object for a VolumeFaderEffect.
+
+ \return a pointer to the VolumeFaderEffect the backend provides.
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::createAudioOutput(QObject *parent = 0)
+
+ Create a new backend object for a AudioOutput.
+
+ \return a pointer to the AudioOutput the backend provides.
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::createVideoWidget(QObject *parent = 0)
+
+ Create a new backend object for a VideoWidget.
+
+ \return a pointer to the VideoWidget the backend provides.
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::backend(bool createWhenNull = true)
+
+ \return a pointer to the backend interface.
+*/
+
+/*!
+ \fn QString Phonon::Factory::identifier()
+
+ Unique identifier for the Backend. Can be used in configuration files
+ for example.
+*/
+
+
+/*!
+ \fn QString Phonon::Factory::backendName()
+
+ Get the name of the Backend.
+ \omit
+ It's the name from the .desktop file.
+ \endomit
+*/
+
+/*!
+ \fn QString Phonon::Factory::backendComment()
+
+ Get the comment of the Backend.
+ \omit
+ It's the comment from the .desktop file.
+ \endomit
+*/
+
+/*!
+ \fn QString Phonon::Factory::backendVersion()
+
+ Get the version of the Backend.
+ \omit
+ It's the version from the .desktop file.
+ \endomit
+
+ The version is especially interesting if there are several versions
+ available for binary incompatible versions of the backend's media
+ framework.
+*/
+
+/*!
+ \fn QString Phonon::Factory::backendIcon()
+
+ Get the icon (name) of the Backend.
+ \omit
+ It's the icon from the .desktop file.
+ \endomit
+*/
+
+/*!
+ \fn QString Phonon::Factory::backendWebsite()
+
+ Get the website of the Backend.
+ \omit
+ It's the website from the .desktop file.
+ \endomit
+*/
+
+/*!
+ \fn QObject *Phonon::Factory::registerQObject(QObject *object)
+
+ Registers the given backend \a object with the factory.
+*/
+
+/*!
+ \fn bool Phonon::Factory::isMimeTypeAvailable(const QString &mimeType)
+*/
+
+/*!
+ \fn void Phonon::Factory::registerFrontendObject(MediaNodePrivate *)
+ \internal
+*/
+
+/*!
+ \fn void Phonon::Factory::deregisterFrontendObject(MediaNodePrivate *)
+ \internal
+*/
+
+/*!
+ \fn void Phonon::Factory::setBackend(QObject *)
+*/
+
+/*!
+ \fn PlatformPlugin *Phonon::Factory::platformPlugin()
+*/
+
+/*!
+/*!
+ \class Phonon::AbstractMediaStreamPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::FrontendInterfacePrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::EffectWidgetPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::IODeviceStream
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \fn explicit Phonon::IODeviceStream::IODeviceStream(QIODevice *ioDevice, QObject *parent = 0)
+ \internal
+
+ Creates a new IODeviceStream with the given \a ioDevice and \a
+ parent.
+
+*/
+
+/*!
+ \fn Phonon::IODeviceStream::~IODeviceStream()
+ \internal
+*/
+
+/*!
+ \fn void Phonon::IODeviceStream::reset()
+ \internal
+*/
+
+/*!
+ \fn void Phonon::IODeviceStream::needData()
+ \internal
+*/
+
+/*!
+ \fn void Phonon::IODeviceStream::seekStream(qint64)
+ \internal
+*/
+
+/*!
+ \namespace Phonon::Platform
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::EffectDescriptionModel
+ \inmodule Phonon
+ \brief provides a item view model containing available audio effects.
+
+*/
+
+/*!
+ \typedef Phonon::SubtitleDescription
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::SubtitleDescriptionModel
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::AudioChannelDescription
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::AudioChannelDescriptionModel
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::AudioCaptureDevice
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::AudioCaptureDeviceModel
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef typedef void (*CleanUpFunction)()
+ \inmodule Phonon
+ \internal
+*/
+
+/*!
+ \typedef Phonon::QObjectPair
+ \inmodule Phonon
+ \since 4.4
+ \internal
+
+*/
+
+/*!
+ \typedef Phonon::AudioOutputDeviceModel
+ \inmodule Phonon
+ \brief provides an item view model containing available audio output devices.
+
+*/
+
+/*!
+ \fn uint Phonon::qHash(const Phonon::EffectParameter &param)
+ \internal
+
+*/
+
+/*!
+ \fn Phonon::CleanUpGlobalStatic::~CleanUpGlobalStatic()
+ \internal
+*/
+
+/*!
+ \class Phonon::ConstIface
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::CleanUpGlobalStatic
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class Phonon::EffectParameterPrivate
+ \inmodule Phonon
+ \since 4.4
+ \internal
+
+*/
+
+/*!
+ \class Phonon::QSettingsGroup
+ \inmodule Phonon
+ \since 4.4
+ \internal
+
+*/
+
+/*!
+ \class Phonon::MediaNodeDestructionHandler
+ \inmodule Phonon
+ \since 4.4
+ \internal
+
+*/
+
+/*!
+ \fn Phonon::MediaNodeDestructionHandler::~MediaNodeDestructionHandler()
+ \internal
+ Called from Base::~Base if this object was registered
+ using BasePrivate::addDestructionHandler().
+*/
+
+/*!
+ \fn Phonon::MediaNodeDestructionHandler::phononObjectDestroyed(MediaNodePrivate *)
+ \internal
+*/
+
+/*!
+ \fn explicit Phonon::EffectWidget::EffectWidget(Effect *effect, QWidget *parent = 0)
+ \internal
+
+ Constructs a new EffectWidget for the specified \a effect and with
+ the specified \a parent.
+*/
+
+/*!
+ \fn Phonon::EffectWidget::~EffectWidget()
+ \internal
+*/
+
+/*!
+ \fn QDebug Phonon::operator<<(QDebug s, const ObjectDescription<T> &o)
+ \internal
+*/
+
+/*!
+ \class Phonon::ListModelHelper
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
+/*!
+ \class AudioOutputInterface42
+ \inmodule Phonon
+ \since 4.4
+ \internal
+*/
+
diff --git a/doc/src/phonon.qdoc b/doc/src/phonon.qdoc
new file mode 100644
index 0000000..e86ccf6
--- /dev/null
+++ b/doc/src/phonon.qdoc
@@ -0,0 +1,642 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page phonon-overview.html
+ \title Phonon Overview
+ \ingroup multimedia
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Qt uses the Phonon multimedia framework to provide functionality
+ for playback of the most common multimedia formats.The media can
+ be read from files or streamed over a network, using a QURL to a
+ file.
+
+ In this overview, we take a look at the main concepts of Phonon.
+ We also explain the architecture, examine the
+ core API classes, and show examples on how to use the classes
+ provided.
+
+ \section1 Architecture
+
+ Phonon has three basic concepts: media objects, sinks, and paths.
+ A media object manages a media source, for instance, a music file;
+ it provides simple playback control, such as starting, stopping,
+ and pausing the playback. A sink outputs the media from Phonon,
+ e.g., by rendering video on a widget, or by sending audio to a
+ sound card. Paths are used to connect Phonon objects, i.e., a
+ media object and a sink, in a graph - called a media graph in
+ Phonon.
+
+ As an example, we show a media graph for an audio stream:
+
+ \image conceptaudio.png
+
+ The playback is started and managed by the media object, which
+ send the media stream to any sinks connected to it by a path. The
+ sink then plays the stream back, usually though a sound card.
+
+ \omit Not sure if this goes here, or anywhere...
+ All nodes in the graph are synchronized by the framework,
+ meaning that if more than one sink is connected to the same
+ media object, the framework will handle the synchronization
+ between the sinks; this happens for instance when a media
+ source containing video with sound is played back. More on
+ this later.
+ \endomit
+
+ \section2 Media Objects
+
+ The media object, an instance of the \l{Phonon::}{MediaObject}
+ class, lets you start, pause, and stop the playback of a media
+ stream, i.e., it provided basic control over the playback. You may
+ think of the object as a simple media player.
+
+ The media data is provided by a media source, which is
+ kept by the media object. The media source is a separate
+ object - an instance of \l{Phonon::}{MediaSource} - in Phonon, and
+ not part of the graph itself. The source will supply the media
+ object with raw data. The data can be read from files and streamed
+ over a network. The contents of the source will be interpreted by
+ the media object.
+
+ A media object is always instantiated with the default constructor
+ and then supplied with a media source. Concrete code examples are
+ given later in this overview.
+
+ As a complement to the media object, Phonon also provides
+ \l{Phonon::}{MediaController}, which provides control over
+ features that are optional for a given media. For instance, for
+ chapters, menus, and titles of a VOB (DVD) file will be features
+ managed by a \l{Phonon::}{MediaController}.
+
+ \section2 Sinks
+
+ A sink is a node that can output media from the graph, i.e., it
+ does not send its output to other nodes. A sink is usually a
+ rendering device.
+
+ The input of sinks in a Phonon media graph comes from a
+ \l{Phonon::}{MediaObject}, though it might have been processed
+ through other nodes on the way.
+
+ While the \l{Phonon::}{MediaObject} controls the playback, the
+ sink has basic controls for manipulation of the media. With an
+ audio sink, for instance, you can control the volume and mute the
+ sound, i.e., it represents a virtual audio device. Another example
+ is the \l{Phonon::}{VideoWidget}, which can render video on a
+ QWidget and alter the brightness, hue, and scaling of the video.
+
+ As an example we give an image of a graph used for playing back a
+ video file with sound.
+
+ \image conceptvideo.png
+
+ \section2 Processors
+
+ Phonon does not allow manipulation of media streams directly,
+ i.e., one cannot alter a media stream's bytes programmatically
+ after they have been given to a media object. We have other nodes
+ to help with this: processors, which are placed in the graph on
+ the path somewhere between the media object and its sinks. In
+ Phonon, processors are of the \l{Phonon::}{Effect} class.
+
+ When inserted into the rendering process, the processor will
+ alter the media stream, and will be active as long as it is part
+ of the graph. To stop, it needs to be removed.
+
+ \omit \image conceptprocessor.png \endomit
+
+ The \c {Effect}s may also have controls that affect how the media
+ stream is manipulated. A processor applying a depth effect to
+ audio, for instance, can have a value controlling the amount of
+ depth. An \c Effect can be configured at any point in time.
+
+ \section1 Playback
+
+ In some common cases, it is not necessary to build a graph
+ yourself.
+
+ Phonon has convenience functions for building common graphs. For
+ playing an audio file, you can use the
+ \l{Phonon::}{createPlayer()} function. This will set up the
+ necessary graph and return the media object node; the sound can
+ then be started by calling its \l{Phonon::MediaObject::}{play()}
+ function.
+
+ \snippet snippets/phonon.cpp 0
+
+ We have a similar solution for playing video files, the
+ \l{Phonon::}{VideoPlayer}.
+
+ \snippet snippets/phonon.cpp 1
+
+ The VideoPlayer is a widget onto which the video will be drawn.
+
+ The \c .pro file for a project needs the following line to be added:
+
+ \snippet doc/src/snippets/code/doc_src_phonon.qdoc 0
+
+ Phonon comes with several widgets that provide functionality
+ commonly associated with multimedia players - notably SeekSlider
+ for controlling the position of the stream, VolumeSlider for
+ controlling sound volume, and EffectWidget for controlling the
+ parameters of an effect. You can learn about them in the API
+ documentation.
+
+ \section1 Building Graphs
+
+ If you need more freedom than the convenience functions described
+ in the previous section offers you, you can build the graphs
+ yourself. We will now take a look at how some common graphs are
+ built. Starting a graph up is a matter of calling the
+ \l{Phonon::MediaObject::}{play()} function of the media object.
+
+ If the media source contains several types of media, for instance, a
+ stream with both video and audio, the graph will contain two
+ output nodes: one for the video and one for the audio.
+
+ We will now look at the code required to build the graphs discussed
+ previously in the \l{Architecture} section.
+
+ \section2 Audio
+
+ When playing back audio, you create the media object and connect
+ it to an audio output node - a node that inherits from
+ AbstractAudioOutput. Currently, AudioOutput, which outputs audio
+ to the sound card, is provided.
+
+ The code to create the graph is straight forward:
+
+ \snippet snippets/phonon.cpp 2
+
+ Notice that the type of media an input source has is resolved by
+ Phonon, so you need not be concerned with this. If a source
+ contains multiple media formats, this is also handled
+ automatically.
+
+ The media object is always created using the default constructor
+ since it handles all multimedia formats.
+
+ The setting of a Category, Phonon::MusicCategory in this case,
+ does not affect the actual playback; the category can be used by
+ KDE to control the playback through, for instance, the control
+ panel.
+
+ \omit Not sure about this
+ Users of KDE can often also choose to send sound with the
+ CommunicationCategory, e.g., given to VoIP, to their headset,
+ while sound with MusicCategory is sent to the sound card.
+ \endomit
+
+ The AudioOutput class outputs the audio media to a sound card,
+ that is, one of the audio devices of the operating system. An
+ audio device can be a sound card or a intermediate technology,
+ such as \c DirectShow on windows. A default device will be chosen
+ if one is not set with \l{Phonon::AudioOutput::}{setOutputDevice()}.
+
+ The AudioOutput node will work with all audio formats supported by
+ the back end, so you don't need to know what format a specific
+ media source has.
+
+ For a an extensive example of audio playback, see the \l{Music
+ Player Example}{Phonon Music Player}.
+
+ \section3 Audio Effects
+
+ Since a media stream cannot be manipulated directly, the backend
+ can produce nodes that can process the media streams. These nodes
+ are inserted into the graph between a media object and an output
+ node.
+
+ Nodes that process media streams inherit from the Effect class.
+ The effects available depends on the underlying system. Most of
+ these effects will be supported by Phonon. See the \l{Querying
+ Backends for Support} section for information on how to resolve
+ the available effects on a particular system.
+
+ We will now continue the example from above using the Path
+ variable \c path to add an effect. The code is again trivial:
+
+ \snippet snippets/phonon.cpp 3
+
+ Here we simply take the first available effect on the system.
+
+ The effect will start immediately after being inserted into the
+ graph if the media object is playing. To stop it, you have to
+ detach it again using \l{Phonon::Path::}{removeEffect()} of the Path.
+
+ \section2 Video
+
+ For playing video, VideoWidget is provided. This class functions
+ both as a node in the graph and as a widget upon which it draws
+ the video stream. The widget will automatically choose an available
+ device for playing the video, which is usually a technology
+ between the Qt application and the graphics card, such as \c
+ DirectShow on Windows.
+
+ The video widget does not play the audio (if any) in the media
+ stream. If you want to play the audio as well, you will need
+ an AudioOutput node. You create and connect it to the graph as
+ shown in the previous section.
+
+ The code for creating this graph is given below, after which
+ one can play the video with \l{Phonon::MediaObject::}{play()}.
+
+ \snippet snippets/phonon.cpp 4
+
+ The VideoWidget does not need to be set to a Category, it is
+ automatically classified to \l{Phonon::}{VideoCategory}, we only
+ need to assure that the audio is also classified in the same
+ category.
+
+ The media object will split files with different media content
+ into separate streams before sending them off to other nodes in
+ the graph. It is the media object that determines the type of
+ content appropriate for nodes that connect to it.
+
+ \omit This section is from the future
+
+ \section2 Multiple Audio Sources and Graph Outputs
+
+ In this section, we take a look at a graph that contains multiple
+ audio sources in addition to video. We have a video camera with
+ some embarrassing home footage from last weekend's party, a
+ microphone with which we intend to add commentary, and an audio
+ music file to set the correct mood. It would be an advantage to
+ write the graph output to a file for later viewing, but since this
+ is not yet supported by Qt backends, we will play it back
+ directly.
+
+ <image of party graph>
+
+ <code>
+
+ <code walkthrough>
+
+ \endomit
+
+ \section1 Backends
+
+ The multimedia functionality is not implemented by Phonon itself,
+ but by a back end - often also referred to as an engine. This
+ includes connecting to, managing, and driving the underlying
+ hardware or intermediate technology. For the programmer, this
+ implies that the media nodes, e.g., media objects, processors, and
+ sinks, are produced by the back end. Also, it is responsible for
+ building the graph, i.e., connecting the nodes.
+
+ The backends of Qt use the media systems DirectShow (which
+ requires DirectX) on Windows, QuickTime on Mac, and GStreamer on
+ Linux. The functionality provided on the different platforms are
+ dependent on these underlying systems and may vary somewhat, e.g.,
+ in the media formats supported.
+
+ Backends expose information about the underlying system. It can
+ tell which media formats are supported, e.g., \c AVI, \c mp3, or
+ \c OGG.
+
+ A user can often add support for new formats and filters to the
+ underlying system, by, for instance, installing the DivX codex. We
+ can therefore not give an exact overview of which formats are
+ available with the Qt backends.
+
+ \omit Not sure I want a separate section for this
+ \section2 Communication with the Backends
+
+ We cooperate with backends through static functions in the
+ Phonon namespace. We have already seen some of these functions
+ in code examples. Their two main responsibilities are creating
+ graph nodes and supplying information about the capabilities
+ of the various nodes. The nodes uses the backend internally
+ when created, so it is only connecting them in the graph that
+ you need to use the backend directly.
+
+ The main functions for graph building are:
+
+ \list
+ \o createPath(): This function creates a path between to
+ nodes, which it takes as arguments.
+ \o
+ \endlist
+
+ For more detailed information, please consult the API
+ documentation.
+
+ \endomit
+
+ \section2 Querying Backends for Support
+
+ As mentioned, Phonon depends on the backend to provide its
+ functionality. Depending on the individual backend, full support
+ of the API may not be in place. Applications therefore need to
+ check with the backend if functionality they require is
+ implemented. In this section, we take look at how this is done.
+
+ The backend provides the
+ \l{Phonon::BackendCapabilities::}{availableMimeTypes()} and
+ \l{Phonon::BackendCapabilities::}{isMimeTypeAvailable()} functions
+ to query which MIME types the backend can produce nodes for. The
+ types are listed as strings, which for any type is equal for any
+ backend or platform.
+
+ The backend will emit a signal -
+ \l{Phonon::BackendCapabilities::}{Notifier::capabilitiesChanged()}
+ - if its abilities have changed. If the available audio devices
+ have changed, the
+ \l{Phonon::BackendCapabilities::}{Notifier::availableAudioOutputDevicesChanged()}
+ signal is emitted instead.
+
+ To query the actual audio devices possible, we have the
+ \l{Phonon::BackendCapabilities::}{availableAudioOutputDevices()} as
+ mentioned in the \l{#Sinks}{Sinks} section. To query information
+ about the individual devices, you can examine its \c name(); this
+ string is dependent on the operating system, and the Qt backends
+ does not analyze the devices further.
+
+ The sink for playback of video does not have a selection of
+ devices. For convenience, the \l{Phonon::}{VideoWidget} is both a
+ node in the graph and a widget on which the video output is
+ rendered. To query the various video formats available, use
+ \l{Phonon::BackendCapabilities::}{isMimeTypeAvailable()}. To add
+ it to a path, you can use the Phonon::createPath() as usual. After
+ creating a media object, it is also possible to call its
+ \l{Phonon::MediaObject::}{hasVideo()} function.
+
+ See also the \l{Capabilities Example}.
+
+ \section1 Installing Phonon
+
+ When running the Qt configure script, you will be notified whether
+ Phonon support is available on your system. As mentioned
+ previously, to use develop and run Phonon applications, you also
+ need to link to a backend, which provides the multimedia
+ functionality.
+
+ Note that Phonon applications will compile and run without a
+ working backend, but will, of course, not work as expected.
+
+ The following sections explains requirements for each backend.
+
+ \section2 Windows
+
+ On Windows, building Phonon requires DirectX and DirectShow
+ version 9 or higher. You'll need additional SDKs you can download
+ from Microsoft.
+
+ \section3 Windows XP and later Windows versions
+
+ If you develop for Windows XP and up, you should download the Windows SDK
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&amp;DisplayLang=en}{here}.
+ Before building Qt, just call the script: \c {C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\setenv.cmd}
+
+ \note Visual C++ 2008 already contains the Windows SDK and doesn't
+ need that package and has already the environment set up for a
+ smooth compilation of phonon.
+
+ \section3 Earlier Windows versions than Windows XP
+
+ If you want to support previous Windows versions, you should download and install the Platform SDK. You find it
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;displaylang=en}{here}.
+
+ \note The platform SDK provided with Visual C++ is not
+ complete and
+ you'll need this one to have DirectShow 9.0 support. You can download the DirectX SDK
+ \l{http://www.microsoft.com/downloads/details.aspx?familyid=09F7578C-24AA-4E0A-BF91-5FEC24C8C7BF&amp;displaylang=en}{here}.
+
+ \section3 Setting up the environment
+
+ Once the SDKs are installed, please make sure to set your
+ environment variables LIB and INCLUDE correctly. The paths to the
+ include and lib directory of the SDKs should appear first.
+ Typically, to setup your environment, you would execute the
+ following script:
+
+ \code
+ Set DXSDK_DIR=C:\Program Files\Microsoft DirectX SDK (February 2007)
+ %DXSDK_DIR%\utilities\bin\dx_setenv.cmd
+ C:\program files\Microsoft Platform SDK\setenv.cmd
+ \endcode
+
+ If your environment is setup correctly, executing configure.exe on
+ your Qt installation should automatically activate Phonon.
+
+ \warning The MinGW version of Qt does not support building the
+ Qt backend.
+
+ \section2 Linux
+
+ The Qt backend on Linux uses GStreamer (minimum version is 0.10),
+ which must be installed on the system. At a minimum, you need the
+ GStreamer library and base plugins, which provides support for \c
+ .ogg files. The package names may vary between Linux
+ distributions; on Mandriva, they have the following names:
+
+ \table
+ \header
+ \o Package
+ \o Description
+ \row
+ \o libgstreamer0.10_0.10
+ \o The GStreamer base library.
+ \row
+ \o libgstreamer0.10_0.10-devel
+ \o Contains files for developing applications with
+ GStreamer.
+ \row
+ \o libgstreamer-plugins-base0.10
+ \o Contains the basic plugins for audio and video
+ playback, and will enable support for \c ogg files.
+ \row
+ \o libgstreamer-plugins-base0.10-devel
+ \o Makes it possible to develop applications using the
+ base plugins.
+ \endtable
+
+ \omit Should go in troubleshooting (in for example README)
+ alsasink backend for GStreamer
+ \table
+ \header
+ \o Variable
+ \o Description
+ \row
+ \o PHONON_GST_AUDIOSINK
+ \o Sets the audio sink to be used. Possible values are
+ ... alsasink.
+ \row
+ \o PHONON_GSTREAMER_DRIVER
+ \o Sets the driver for GStreamer. This driver will
+ usually be configured automatically when
+ installing.
+ \row
+ \o PHONON_GST_VIDEOWIDGET
+ \o This variable can be set to the name of a widget to
+ use as the video widget??
+ \row
+ \o PHONON_GST_DEBUG
+ \o Phonon will give debug information while running if
+ this variable is set to a number between 1 and 3.
+ \row
+ \o PHONON_TESTURL
+ \o ...
+ \endtable
+ \endomit
+
+ \section2 Mac OS X
+
+ On Mac OS X, Qt uses QuickTime for its backend. The minimum
+ supported version is 7.0.
+
+ \section1 Deploying Phonon Applications on Windows and Mac OS X
+
+ On Windows and Mac OS X, the Qt backend makes use of the
+ \l{QtOpenGL Module}{QtOpenGL} module. You therefore need to deploy
+ the QtOpenGL shared library. If this is not what you want, it is
+ possible to configure Qt without OpenGL support. In that case, you
+ need to run \c configure with the \c -no-opengl option.
+
+ \section1 Work in Progress
+
+ Phonon and its Qt backends, though fully functional for
+ multimedia playback, are still under development. Functionality to
+ come is the possibility to capture media and more processors for
+ both music and video files.
+
+ Another important consideration is to implement support for
+ storing media to files; i.e., not playing back media directly.
+
+ We also hope in the future to be able to support direct
+ manipulation of media streams. This will give the programmer more
+ freedom to manipulate streams than just through processors.
+
+ Currently, the multimedia framework supports one input source. It will be
+ possible to include several sources. This is useful in, for example, audio
+ mixer applications where several audio sources can be sent, processed and
+ output as a single audio stream.
+*/
+
+/*!
+ \namespace Phonon
+ \brief The Phonon namespace contains classes and functions for multimedia applications.
+ \since 4.4
+
+ This namespace contains classes to access multimedia functions for
+ audio and video playback. Those classes are not dependent on any specific
+ framework, but rather use exchangeable backends to do the work.
+
+ See the \l{Phonon Module} page for general information about the
+ framework.
+*/
+
+/*!
+ \page phonon-module.html
+ \module Phonon
+ \title Phonon Module
+ \contentspage Qt's Modules
+ \previouspage QtXmlPatterns
+ \nextpage Qt3Support
+ \ingroup modules
+
+ \brief The Phonon module contains namespaces and classes for multimedia functionality.
+
+ \generatelist{classesbymodule Phonon}
+
+ Phonon is a cross-platform multimedia framework that enables the use of
+ audio and video content in Qt applications. The \l{Phonon Overview}
+ document provides an introduction to the architecture and features included
+ in Phonon. The \l{Phonon} namespace contains a list of all classes, functions
+ and namespaces provided by the module.
+
+ Applications that use Phonon's classes need to
+ be configured to be built against the Phonon module.
+ The following declaration in a \c qmake project file ensures that
+ an application is compiled and linked appropriately:
+
+ \snippet doc/src/snippets/code/doc_src_phonon.qdoc 1
+
+ The Phonon module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ \section1 Qt Backends
+
+ Qt Backends are currently developed for Phonon version 4.1. The Phonon
+ project has moved on and introduced new features that the Qt Backends do not
+ implement. We have chosen not to document the part of Phonon that we do not
+ support. Any class or function not appearing in our documentation can be
+ considered unsupported.
+
+ \section1 License Information
+
+ Qt Commercial Edition licensees that wish to distribute applications that
+ use the Phonon module need to be aware of their obligations under the
+ GNU Lesser General Public License (LGPL).
+
+ Developers using the Open Source Edition can choose to redistribute
+ the module under the appropriate version of the GNU LGPL; version 2.1
+ for applications and libraries licensed under the GNU GPL version 2,
+ or version 3 for applications and libraries licensed under the GNU
+ GPL version 2.
+
+ \legalese
+ This file is part of the KDE project
+
+ Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org> \BR
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ Contact: Qt Software Information (qt-info@nokia.com)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ \endlegalese
+*/
diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc
new file mode 100644
index 0000000..d5eee27
--- /dev/null
+++ b/doc/src/platform-notes.qdoc
@@ -0,0 +1,740 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page platform-notes-platforms.html
+ \ingroup platform-notes
+ \title Platform Notes
+ \brief Information about the platforms on which Qt can be used.
+
+ This page contains information about the platforms Qt is currently known
+ to run on, with links to platform-specific notes, including any known bugs
+ or incompatibilities.
+
+ \list
+ \o \l{Platform Notes - X11}
+ \tableofcontents{1 Platform Notes - X11}
+ \o \l{Platform Notes - Windows}
+ \tableofcontents{1 Platform Notes - Windows}
+ \o \l{Platform Notes - Mac OS X}
+ \tableofcontents{1 Platform Notes - Mac OS X}
+ \o \l{Platform Notes - Embedded Linux}
+ \tableofcontents{1 Platform Notes - Embedded Linux}
+ \o \l{Platform Notes - Windows CE}
+ \tableofcontents{1 Platform Notes - Windows CE}
+ \endlist
+
+ See also the \l{Compiler Notes} for information about compiler-specific
+ build issues. Information about the combinations of platforms and compilers
+ supported by Qt can be found on the \l{Supported Platforms} page.
+
+ If you have anything to add to this list or any of the platform or
+ compiler-specific pages, please submit it via the \l{Bug Report Form}.
+*/
+
+/*!
+ \page platform-notes-x11.html
+ \title Platform Notes - X11
+ \contentspage Platform Notes
+
+ This page contains information about the X11 platforms Qt is currently
+ known to run on, with links to platform-specific notes. More information
+ about the combinations of platforms and compilers supported by Qt can be
+ found on the \l{Supported Platforms} page.
+
+ \tableofcontents
+
+ \target AIX
+ \section1 AIX - 5.2
+
+ Qt has been tested on AIX 5.2, using the
+ \l{Compiler Notes#IBM xlC (AIX)}{xlC} compiler.
+
+ \table
+ \header \o Compiler \o Notes
+ \row \o xlC
+ \o If Qt is built correctly but all symbols are reported to be missing
+ when you link an application, your makeC++SharedLib script might be out
+ of date. Make sure you have the latest version from the
+ \l{http://www-306.ibm.com/software/awdtools/vacpp/support/}{IBM website}.
+ \row \o GCC
+ \o We have tested earlier versions of Qt 4 successfully with GCC version
+ 3.3 and above. Some versions of GCC may fail to link Qt with a "TOC overflow"
+ message.
+ Fix this by upgrading to the latest maintenance release of the dynamic
+ linker. On AIX this is bos.rte.bind_cmds.4.1.5.3 or later.
+ Some versions of GCC may fail to build Qt with STL and large-file support
+ enabled, due to
+ \l{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9551}{a bug in GCC}.
+ Fix this by upgrading to the latest maintenance release of the compiler.
+ It is also possible to work around this problem by running configure with
+ either \c{-no-stl} or \c{-no-largefile}.
+ \endtable
+
+ \target FreeBSD
+ \section1 FreeBSD - 6.0-RELEASE
+
+ \note FreeBSD is a community supported platform. See the
+ \l{Supported Platforms} page for more information.
+
+ The system compiler on FreeBSD 4.x is gcc 2.95.4, which is not
+ officially supported by Qt 4. We develop using and recommend
+ ports/lang/gcc34. You will need to run configure with the
+ \c{-platform freebsd-g++34} arguments. Optionally, you may use
+ ports/lang/icc.
+
+ The system compiler on FreeBSD 5.x and 6.x is GCC 3.4.4, which should be
+ sufficient to build Qt. You do not need to add any special arguments when
+ running configure. Optionally, you may use ports/lang/icc.
+
+ Note that we do not actively test FreeBSD 4.x and 5.x. Our developers
+ migrated to 6.x after the Qt 4 launch. FreeBSD-CURRENT is not supported.
+
+ \target HP-UX
+ \section1 HP-UX
+
+ Qt supports HP-UX on both PA-RISC and the Itanium (IA64) architectures.
+
+ \section2 PA-RISC - B.11.11 or later
+
+ You can configure Qt for aCC in 32 and 64 bit mode (hpux-acc-64 or
+ hpux-acc-32), or gcc in 32 bit mode (hpux-g++). The default platform is
+ hpux-acc-32. The minimum required version for aCC (HP ANSI C++) on PA-RISC
+ is A.03.57. The supported gcc compiler is gcc 3.4.3.
+
+ \section2 Itanium - B.11.23 or later
+
+ You can configure Qt for aCC in 32 and 64 bit mode (hpuxi-acc-64 or
+ hpuxi-acc-32). gcc is currently unsupported. The default platform is
+ hpuxi-acc-64. The minimum required version for aCC (HP ANSI C++) on
+ Itanium is A.06.12.
+
+ \section2 OpenGL Support
+
+ Qt's \l{QtOpenGL}{OpenGL} module requires GLX 1.3 or later to be installed.
+ This is available for HP-UX 11i - see the
+ \l{http://docs.hp.com/en/5992-2331/ch04s02.html}{Graphics and Technical Computing Software}
+ section of the release notes for more information.
+
+ \target IRIX
+ \section1 IRIX - 6.5.x
+
+ \bold{IRIX is an unsupported platform - please see Qt Software's online
+ \l{Platform Support Policy} for details.}
+
+ Unpackaging and IRIX tar:
+ Because of long filenames some files will be cut off incorrectly with IRIX
+ tar. Please use GNU tar to unpack Qt packages.
+
+ \section1 Linux
+
+ There are no known problems with using Qt on production versions of
+ Linux/x86, Linux/ppc, Linux/amd64 and Linux/ia64 (including Altix(R)).
+
+ For the gcc/g++ compiler, please also see the relevant
+ \l{Compiler Notes#GCC}{compiler page}.
+
+ \section2 Installation problems
+
+ See also the \l{Installation FAQ}.
+
+ If you experience problems when installing new open source versions of Qt
+ versions, try to use the open source Qt archives (e.g., RPM)
+ provided by your Linux distribution. If you need to install the source (.tgz)
+ archive, be aware that you will probably end up with two different
+ versions of the Qt library installed on your system, which will probably
+ lead to link errors, like this:
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 0
+ Fix this by removing the old version of the library.
+
+ If you have problems installing open source versions of Qt
+ provided by your Linux distribution (e.g., RPM), please consult the
+ maintainers of the distribution, not us.
+
+ Some RPM versions have problems installing some of the Qt RPM archives
+ where installation stops with an error message warning about a
+ "Failed Dependency". Use the \c{--nodeps} option to \c rpm to workaround
+ this problem.
+
+ \target Solaris
+ \section1 Solaris - 9 or later
+
+ \section2 Unpackaging and Solaris tar
+
+ On some Solaris systems, both Solaris tar and GNU tar have been reported
+ to truncate long filenames. We recommend using star instead
+ (http://star.berlios.de).
+
+ \section2 CC on Solaris
+
+ Be sure to check our \l{Compiler Notes#Sun Studio}{Forte Developer / Sun Studio}
+ notes.
+
+ \section2 GCC on Solaris
+
+ Be sure to check the installation notes for \l{GCC on Solaris}.
+ Do not use GCC with Sun's assembler/linker, this will result in link-time
+ errors in shared libraries. Use GNU binutils instead.
+
+ GCC 3.2.* is known to miscompile Qt due to an optimizer bug that will
+ cause the resulting binaries to hang. Please use GCC 3.4.2 or later.
+*/
+
+/*!
+ \page platform-notes-windows.html
+ \title Platform Notes - Windows
+ \contentspage Platform Notes
+
+ This page contains information about the Windows platforms Qt is currently
+ known to run on, with links to platform-specific notes. More information
+ about the combinations of platforms and compilers supported by Qt can be
+ found on the \l{Supported Platforms} page.
+
+ \tableofcontents
+
+ \section1 Windows Vista
+
+ Known issues for Qt on Vista will be listed here.
+
+ As of Qt 4.2.0 no Vista-specific issues are known.
+
+ \target Windows NT
+ \section1 Windows XP, Windows 2000 and Windows NT
+
+ \section2 Installation location
+
+ Installing Qt into a directory with spaces, e.g. C:\\Program Files, may
+ cause linker errors like the following:
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 2
+
+ Install Qt into a subdirectory without spaces to avoid this problem.
+
+ \section2 AccelGALAXY graphic card
+
+ When you use a NT 4.0 machine with the driver number
+ 4,00,1381,1000,021,4.0.0 there is a problem with drag an drop and icons.
+ The computer freezes, and you have to reset. The problem disappears with
+ the newest version of the driver, available at
+ \l{http://www.es.com/}{www.es.com}.
+
+ \section2 Possible GL conflict
+
+ There is a known issue with running Microsoft NetMeeting, Lotus SameTime
+ and other applications that require screen grabbing while direct
+ rendering is enabled. Other GL-applications may not work as expected,
+ unless direct rendering is disabled.
+*/
+
+/*!
+ \page platform-notes-mac.html
+ \title Platform Notes - Mac OS X
+ \contentspage Platform Notes
+
+ This page contains information about the Mac OS X versions Qt is currently
+ known to run on, with links to platform-specific notes. More information
+ about the combinations of platforms and compilers supported by Qt can be
+ found on the \l{Supported Platforms} page.
+
+ \tableofcontents
+
+ \section1 General Information
+
+ Qt 4.4 and Qt 4.5 development is only supported on Mac OS X 10.4 and up.
+ Applications built against these version of Qt can be deployed on Mac OS X
+ 10.3, but cannot be developed on that version of the operating system due
+ to compiler issues.
+
+ Qt 4.3 has been tested to run on Mac OS X 10.3.9 and up. See notes on
+ the binary package for more information.
+
+ Qt 4.1 has been tested to run on Mac OS X 10.2.8 and up. Qt 4.1.4 is the
+ last release to work with Mac OS X 10.2.
+
+ \section2 Required GCC version
+
+ Apple's gcc 4 that is shipped with the Xcode Tools for both Mac OS X 10.4
+ and 10.5 will compile Qt. There is preliminary support for gcc 4.2 which
+ is included with Xcode Tools 3.1+ (configurable with
+ \c{-platform macx-g++42}).
+
+ \section2 Binary Package
+
+ The binary package requires that you have your .qt-license file in your
+ home directory. Installer.app cannot complete without a valid .qt-license
+ file. Evaluation users of Qt will have information about how to create
+ this file in the email they receive.
+
+ The binary package was built on Mac OS X 10.4 with Xcode Tools 2.1
+ (gcc 4.0.0) for Qt 4.1.0, Xcode Tools 2.2 (gcc 4.0.1) for Qt 4.1.1-4.1.4
+ and Xcode Tools 2.3 for 4.2.0. It will only link executables built
+ against 10.4 (or a 10.4 SDK). You should be able to run applications
+ linked against these frameworks on Mac OS X 10.3.9 and Mac OS X 10.4+.
+ If you require a different configuration, you will have to use the
+ source package and build with GCC 3.3.
+
+ \section2 Mac OS X on Intel hardware
+
+ Qt 4 fully supports both the Intel and PowerPC architectures on the Mac.
+ As of Qt 4.1 it is possible to support the Intel architecture by
+ creating Universal Binaries with qmake. As of Qt 4.1 it is possible to
+ build Qt as a set of universal binaries and frameworks from configure by
+ adding these extra flags:
+
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 3
+
+ If you are building on Intel hardware you can omit the sdk parameter, but
+ PowerPC hardware requires it.
+
+ You can also generate universal binaries using qmake. Simply add these
+ lines to your .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 4
+
+ \section2 Build Issues
+
+ If Qt does not build upon executing make, and fails with an error message
+ such as
+
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 5
+
+ this could be an indication you have upgraded your version of Mac OS X
+ (e.g. 10.3 to 10.4), without upgrading your Developer Tools (Xcode Tools).
+ These must match in order to successfully compile files.
+
+ Please be sure to upgrade both simultaneously. If problems still occur,
+ contact support.
+
+ \section2 Fink
+
+ If you have installed the Qt for X11 package from \l{Fink},
+ it will set the QMAKESPEC environment variable to darwin-g++. This will
+ cause problems when you build the Qt for Mac OS X package. To fix this, simply
+ unset your QMAKESPEC or set it to macx-g++ before you run configure.
+ You need to have a fresh Qt distribution (make confclean).
+
+ \section2 MySQL and Mac OS X
+
+ There seems to be a issue when both -prebind and -multi_module are
+ defined when linking static C libraries into dynamic library. If you
+ get the following error message when linking Qt:
+
+ \snippet doc/src/snippets/code/doc_src_platform-notes.qdoc 6
+
+ re-link Qt using -single_module. This is only a problem when building the
+ MySQL driver into Qt. It does not affect plugins or static builds.
+
+ \section2 Qt and Precompiled Headers (PCH)
+
+ Starting with Qt 3.3.0 it is possible to use precompiled headers. They
+ are not enabled by default as it appears that some versions of Apple's
+ GCC and make have problems with this feature. If you want to use
+ precompiled headers when building the Qt source package, specify the
+ -pch option to configure. If, while using precompiled headers, you
+ encounter an internal compile error, try removing the -include header
+ statement from the compile line and trying again. If this solves the
+ problem, it probably is a good idea to turn off precompiled headers.
+ Also, consider filing a bug report with Apple so that they can
+ improve support for this feature.
+*/
+
+/*!
+ \page supported-platforms.html
+ \title Supported Platforms
+ \brief The platforms supported by Nokia for Qt.
+ \ingroup platform-notes
+
+ Qt is supported on a variety of 32-bit and 64-bit platforms, and can
+ usually be built on each platform with GCC, a vendor-supplied compiler, or
+ a third party compiler. Although Qt may be built on a range of platform-compiler
+ combinations, only a subset of these are actively supported by Qt Software.
+
+ A more general overview of the platforms Qt runs on can be found on the
+ \l{Platform Notes} page. Information about the compilers used on each platform
+ can be found on the \l{Compiler Notes} page.
+
+ \tableofcontents
+
+ \section1 Most Common Actively Supported Platforms
+
+ \table
+ \header \o Platform \o Compilers
+ \row \o Apple Mac OS X (32-bit) \o gcc 4.0.1
+ \row \o Linux (32 and 64-bit) \o gcc 4.1, 4.2, 4.3
+ \row \o Microsoft Windows \o gcc 3.4.2 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit), 2008,
+ \l{Known Issues in %VERSION%}{Intel icc (see note)}
+ \endtable
+
+ Any platform-compiler combinations not listed here should be considered unsupported.
+
+ \section1 Actively Supported Platforms
+
+ \table
+ \header \o OS \o Architecture \o Makespec \o Compiler version(s)
+ \row \o AIX \o PowerPC \o aix-xlc \o xlC 6
+ \row \o AIX \o PowerPC \o aix-xlc-64 \o xlC 6
+ \row \o HPUX \o PA/RISC \o hpux-acc* \o A.03.57 (aCC 3.57)
+ \row \o HPUX \o PA/RISC \o hpux-g++ \o GCC 3.4.4
+ \row \o HPUX \o PA/RISC \o hpux-g++-64 \o GCC 3.4.4
+ \row \o HPUX \o Itanium \o hpuxi-acc* \o A.06.10 (aCC 6.10)
+ \row \o Embedded Linux \o ARM \o qws/linux-arm-g++ \o GCC 3.4, 4.1, 4.2, 4.3
+ \row \o Embedded Linux \o Intel 32-bit \o qws/linux-x86-g++ \o GCC 3.4, 4.1, 4.2, 4.3
+ \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 4.1, 4.2, 4.3
+ \row \o Linux \o Intel 32/64-bit \o linux-icc \o icc 10.1
+ \row \o Linux \o Intel 32-bit \o linux-icc-32 \o icc 10.1
+ \row \o Linux \o Intel 64-bit \o linux-icc-64 \o icc 10.1
+ \row \o Mac OS X \o Intel 32/64-bit, PowerPC \o macx-g++ \o GCC 4.0.1
+ \row \o Mac OS X \o Intel 32/64-bit, PowerPC \o macx-g++42 \o GCC 4.2
+ \row \o Solaris \o SPARC, Intel 32-bit \o solaris-cc* \o Sun CC 5.5
+ \row \o Solaris \o SPARC, Intel 32-bit \o solaris-g++* \o GCC 3.4.2
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-g++ \o GCC 3.4.2 (MinGW 5.1.4)
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-icc \o icc 9.1
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2003 \o Visual Studio 2003
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2005 \o Visual Studio 2005
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2008 \o Visual Studio 2008
+ \row \o Windows CE \o Intel 32-bit, ARMv4i, MIPS
+ \o wince*-msvc2005 \o Visual Studio 2005
+ \row \o Windows CE \o Intel 32-bit, ARMv4i, MIPS
+ \o wince*-msvc2008 \o Visual Studio 2008
+ \endtable
+
+ \section1 Community Supported Platforms
+
+ \table
+ \header \o OS \o Architecture \o Makespec \o Compiler version(s)
+ \row \o Mac OS X \o Intel 32-bit, PowerPC \o darwin-g++ \o -
+ \row \o FreeBSD \o - \o freebsd-g++ \o -
+ \row \o FreeBSD \o - \o freebsd-g++34 \o -
+ \row \o FreeBSD \o - \o freebsd-g++40 \o -
+ \row \o FreeBSD \o - \o freebsd-icc \o -
+ \row \o HPUX \o Itanium \o hpuxi-g++* \o GCC 4.1
+ \row \o Linux \o - \o linux-cxx \o -
+ \row \o Linux \o - \o linux-ecc-64 \o -
+ \row \o Linux \o Itanium \o linux-g++ \o GCC 3.4
+ \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 3.3, 3.4
+ \row \o Linux \o Intel 32/64-bit \o linux-g++ \o GCC 4.0
+ \row \o Linux \o - \o linux-kcc \o -
+ \row \o Linux \o - \o linux-llvm \o -
+ \row \o Linux \o - \o linux-lsb-g++ \o -
+ \row \o LynxOS \o - \o lynxos-g++ \o -
+ \row \o Mac OS X \o - \o macx-llvm \o -
+ \row \o NetBSD \o - \o netbsd-g++ \o -
+ \row \o OpenBSD \o - \o openbsd-g++ \o -
+ \row \o Embedded Linux \o MIPS, PowerPC \o qws/linux-g++ \o GCC 3.4, 4.1, 4.2, 4.3
+ \endtable
+
+ \section1 Unsupported Platforms
+
+ The following platforms were supported in previous releases, either as actively supported
+ or community supported platforms, but are now unsupported.
+
+ \table
+ \header \o OS \o Architecture \o Makespec \o Compiler version(s)
+ \row \o IRIX \o MIPS \o irix-cc* \o MIPS Pro
+ \row \o IRIX \o MIPS \o irix-g++* \o GCC 3.3
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc \o Visual C++ 6.0
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc2002 \o Visual Studio 2002
+ \row \o Windows XP/Vista \o Intel 32/64-bit \o win32-msvc.net \o Visual Studio 2002
+ \endtable
+
+ Qt Software's online \l{Platform Support Policy} for Qt describes the level of
+ support you should expect for these platforms.
+
+ \section1 Supported Features
+
+ Not all compilers used to build Qt are able to compile all modules. The following table
+ shows the compiler support for five modules that are not uniformly available for all
+ platforms and compilers.
+
+ \table
+ \header \o Compiler \o{5,1} Features
+ \header \o \o Concurrent \o XmlPatterns \o WebKit \o CLucene \o Phonon
+ \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X}
+ \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row
+ \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X}
+ \row
+ \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X}
+ \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row \o MIPSpro 7.4.2m \o{5,1} \e{Unsupported - see the Unsupported Platforms table}
+ \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X}
+ \row \o \l{Known Issues in %VERSION%}{Intel CC 10 (see note)}
+ \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \row
+ \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X}
+ \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
+ \endtable
+*/
+
+/*!
+ \page platform-notes-windows-ce.html
+ \title Platform Notes - Windows CE
+ \contentspage Platform Notes
+
+ This page contains information about the Windows CE and Windows Mobile
+ platforms Qt is currently known to run on, with links to platform-specific
+ notes. More information about the combinations of platforms and compilers
+ supported by Qt can be found on the \l{Supported Platforms} page.
+*/
+
+/*!
+ \page platform-notes-embedded-linux.html
+ \title Platform Notes - Embedded Linux
+ \contentspage Platform Notes
+
+ This page contains information about the Embedded Linux platforms Qt is
+ currently known to run on, with links to platform-specific notes. More
+ information about the combinations of platforms and compilers supported
+ by Qt can be found on the \l{Supported Platforms} page.
+*/
+
+/*!
+ \page compiler-notes.html
+ \ingroup platform-notes
+ \title Compiler Notes
+ \brief Information about the C++ compilers and tools used to build Qt.
+
+ This page contains information about the C++ compilers and tools used
+ to build Qt on various platforms.
+
+ \tableofcontents
+
+ Please refer to the \l{Platform Notes} for information on the platforms
+ Qt is currently known to run on, and see the \l{Supported Platforms}
+ page for information about the status of each platform.
+
+ If you have anything to add to this list or any of the platform or
+ compiler-specific pages, please submit it via the
+ \l{Bug Report Form}.
+
+ \target GCC
+ \section1 GCC
+
+ \section2 GCC on Windows (MinGW)
+
+ We have tested Qt with this compiler on Windows XP.
+ The minimal version of MinGW supported is:
+
+ \list
+ \o GCC 3.4.2
+ \o MinGW runtime 3.7
+ \o win32api 3.2
+ \o binutils 2.15.91
+ \o mingw32-make 3.80.0-3
+ \endlist
+
+ \section2 GCC 4.0.0
+
+ The released package of the compiler has some bugs that lead to miscompilations.
+ We recommend using GCC 4.0.1 or later, or to use a recent CVS snapshot of the
+ GCC 4.0 branch. The version of GCC 4.0.0 that is shipped with Mac OS X 10.4
+ "Tiger" is known to work with Qt for Mac OS X.
+
+ \section2 HP-UX
+
+ The hpux-g++ platform is tested with GCC 3.4.4.
+
+ \section2 Solaris
+
+ Please use GCC 3.4.2 or later.
+
+ \section2 Mac OS X
+
+ Please use the latest GCC 3.3 from Apple or a later version of GCC 3.
+ The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code.
+ Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}.
+
+ \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64)
+
+ This compiler is known to miscompile some parts of Qt when doing a
+ release build. There are several workarounds:
+
+ \list 1
+ \o Use a debug build instead.
+ \o For each miscompilation encountered, recompile the file, removing the -O2 option.
+ \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE.
+ \endlist
+
+ \section1 HP ANSI C++ (aCC)
+
+ The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The
+ hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10.
+
+ \section1 Intel C++ Compiler
+
+ \warning Please see the \l{Known Issues in %VERSION%} page for information
+ about an issue with this compiler.
+
+ \section2 Intel C++ Compiler for Linux
+
+ Qt Software currently tests the following compilers:
+
+ \list
+
+ \o Intel(R) C++ Compiler for applications running on IA-32,
+ Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
+
+ \o Intel(R) C++ Compiler for applications running on Intel(R) 64,
+ Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
+
+ \endlist
+
+ We do not currently test the IA-64 (Itanium) compiler.
+
+ \section2 Known Issues with Intel C++ Compiler for Linux
+
+ \list
+
+ \o Precompiled header support does not work in version 10.0.025
+ and older. For these compilers, you should configure Qt with
+ -no-pch. Precompiled header support works properly in version
+ 10.0.026 and later.
+ \o Version 10.0.026 for Intel 64 is known to miscompile qmake when
+ building in release mode. For now, configure Qt with
+ -debug. Version 10.1.008 and later can compile qmake in release
+ mode.
+ \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are
+ known crash with "(0): internal error: 0_47021" when compiling
+ QtXmlPatterns, QtWebKit, and Designer in release mode. Version
+ 10.1.017 compiles these modules correctly in release mode.
+ \endlist
+
+ \section2 Intel C++ Compiler (Windows, Altix)
+
+ Qt 4 has been tested successfully with:
+
+ \list
+ \o Windows - Intel(R) C++ Compiler for 32-bit applications,
+ Version 8.1 Build 20050309Z Package ID: W_CC_PC_8.1.026
+ \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based
+ applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030
+ \endlist
+
+ We currently only test the Intel compiler on 32-bit Windows versions.
+
+ \section1 MIPSpro (IRIX)
+
+ \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page
+ and Qt's Software's online \l{Platform Support Policy} page for details.}
+
+ Qt 4.4.x requires MIPSpro version 7.4.2m.
+
+ Note that MIPSpro version 7.4.4m is currently not supported, since it has
+ introduced a number of problems that have not yet been resolved.
+ We recommend using 7.4.2m for Qt development. However, please note the
+ unsupported status of this platform.
+
+ \target Sun Studio
+ \section1 Forte Developer / Sun Studio (Solaris)
+
+ \section2 Sun Studio
+
+ Qt is tested using Sun Studio 8 (Sun CC 5.5). Go to
+ \l{Sun Studio Patches} page on Sun's Web site to download
+ the latest patches for your Sun compiler.
+
+ \section2 Sun WorkShop 5.0
+
+ Sun WorkShop 5.0 is not supported with Qt 4.
+
+ \section1 Visual Studio (Windows)
+
+ We do most of our Windows development on Windows XP, using Microsoft
+ Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit
+ versions).
+
+ Qt works with the Standard Edition, the Professional Edition and Team
+ System Edition of Visual Studio 2005.
+
+ We also test Qt 4 on Windows XP with Visual Studio .NET and Visual Studio 2003.
+
+ In order to use Qt with the Visual Studio 2005/2008 Express Edition you need
+ to download and install the platform SDK. Due to limitations in the
+ Express Edition it is not possible for us to install the Qt Visual
+ Studio Integration. You will need to use our command line tools to
+ build Qt applications with this edition.
+
+ The Visual C++ Linker doesn't understand filenames with spaces (as in
+ \c{C:\Program files\Qt\}) so you will have to move it to another place,
+ or explicitly set the path yourself; for example:
+
+ \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0
+
+ If you are experiencing strange problems with using special flags that
+ modify the alignment of structure and union members (such as \c{/Zp2})
+ then you will need to recompile Qt with the flags set for the
+ application as well.
+
+ If you're using Visual Studio .NET (2002) Standard Edition, you should be
+ using the Qt binary package provided, and not the source package.
+ As the Standard Edition does not optimize compiled code, your compiled
+ version of Qt would perform suboptimally with respect to speed.
+
+ With Visual Studio 2005 Service Pack 1 a bug was introduced which
+ causes Qt not to compile, this has been fixed with a hotfix available
+ from Microsoft. See this
+ \l{http://www.qtsoftware.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry}
+ for more information.
+
+ \section1 IBM xlC (AIX)
+
+ The makeC++SharedLib utility must be in your PATH and be up to date to
+ build shared libraries. From IBM's
+ \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX}
+ Redbook:
+
+ \list
+ \o "The second step is to use the makeC++SharedLib command to create the
+ shared object. The command has many optional arguments, but in its
+ simplest form, can be used as follows:"
+ \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1
+ \o "The full path name to the command is not required; however, to avoid
+ this, you will have to add the directory in which it is located to
+ your PATH environment variable. The command is located in the
+ /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX,
+ Version 5 compiler."
+ \endlist
+
+ \section2 VisualAge C++ for AIX, Version 6.0
+
+ Make sure you have the
+ \l{http://www-1.ibm.com/support/search.wss?rs=32&amp;tc=SSEP5D&amp;dc=D400}{latest upgrades}
+ installed.
+*/
diff --git a/doc/src/plugins-howto.qdoc b/doc/src/plugins-howto.qdoc
new file mode 100644
index 0000000..2c2b031
--- /dev/null
+++ b/doc/src/plugins-howto.qdoc
@@ -0,0 +1,471 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page plugins-howto.html
+ \title How to Create Qt Plugins
+ \brief A guide to creating plugins to extend Qt applications and functionality provided by Qt.
+ \ingroup howto
+
+ \keyword QT_DEBUG_PLUGINS
+ \keyword QT_NO_PLUGIN_CHECK
+
+ Qt provides two APIs for creating plugins:
+
+ \list
+ \o A higher-level API for writing extensions to Qt itself: custom database
+ drivers, image formats, text codecs, custom styles, etc.
+ \o A lower-level API for extending Qt applications.
+ \endlist
+
+ For example, if you want to write a custom QStyle subclass and
+ have Qt applications load it dynamically, you would use the
+ higher-level API.
+
+ Since the higher-level API is built on top of the lower-level API,
+ some issues are common to both.
+
+ If you want to provide plugins for use with \QD, see the QtDesigner
+ module documentation.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 The Higher-Level API: Writing Qt Extensions
+
+ Writing a plugin that extends Qt itself is achieved by
+ subclassing the appropriate plugin base class, implementing a few
+ functions, and adding a macro.
+
+ There are several plugin base classes. Derived plugins are stored
+ by default in sub-directories of the standard plugin directory. Qt
+ will not find plugins if they are not stored in the right
+ directory.
+
+ \table
+ \header \o Base Class \o Directory Name \o Key Case Sensitivity
+ \row \o QAccessibleBridgePlugin \o \c accessiblebridge \o Case Sensitive
+ \row \o QAccessiblePlugin \o \c accessible \o Case Sensitive
+ \row \o QDecorationPlugin \o \c decorations \o Case Insensitive
+ \row \o QFontEnginePlugin \o \c fontengines \o Case Insensitive
+ \row \o QIconEnginePlugin \o \c iconengines \o Case Insensitive
+ \row \o QImageIOPlugin \o \c imageformats \o Case Sensitive
+ \row \o QInputContextPlugin \o \c inputmethods \o Case Sensitive
+ \row \o QKbdDriverPlugin \o \c kbddrivers \o Case Insensitive
+ \row \o QMouseDriverPlugin \o \c mousedrivers \o Case Insensitive
+ \row \o QPictureFormatPlugin \o \c pictureformats \o Case Sensitive
+ \row \o QScreenDriverPlugin \o \c gfxdrivers \o Case Insensitive
+ \row \o QScriptExtensionPlugin \o \c script \o Case Sensitive
+ \row \o QSqlDriverPlugin \o \c sqldrivers \o Case Sensitive
+ \row \o QStylePlugin \o \c styles \o Case Insensitive
+ \row \o QTextCodecPlugin \o \c codecs \o Case Sensitive
+ \endtable
+
+ But where is the \c{plugins} directory? When the application
+ is run, Qt will first treat the application's executable directory
+ as the \c{pluginsbase}. For example if the application is in
+ \c{C:\Program Files\MyApp} and has a style plugin, Qt will look in
+ \c{C:\Program Files\MyApp\styles}. (See
+ QCoreApplication::applicationDirPath() for how to find out where
+ the application's executable is.) Qt will also look in the
+ directory specified by
+ QLibraryInfo::location(QLibraryInfo::PluginsPath), which typically
+ is located in \c QTDIR/plugins (where \c QTDIR is the directory
+ where Qt is installed). If you want Qt to look in additional
+ places you can add as many paths as you need with calls to
+ QCoreApplication::addLibraryPath(). And if you want to set your
+ own path or paths you can use QCoreApplication::setLibraryPaths().
+ You can also use a \c qt.conf file to override the hard-coded
+ paths that are compiled into the Qt library. For more information,
+ see the \l {Using qt.conf} documentation. Yet another possibility
+ is to set the \c QT_PLUGIN_PATH environment variable before running
+ the application. If set, Qt will look for plugins in the
+ paths (separated by the system path separator) specified in the variable.
+
+ Suppose that you have a new style class called \c MyStyle that you
+ want to make available as a plugin. The required code is
+ straightforward, here is the class definition (\c
+ mystyleplugin.h):
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 0
+
+ Ensure that the class implementation is located in a \c .cpp file
+ (including the class definition):
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 1
+
+ (Note that QStylePlugin is case insensitive, and the lower-case
+ version of the key is used in our
+ \l{QStylePlugin::create()}{create()} implementation; most other
+ plugins are case sensitive.)
+
+ For database drivers, image formats, text codecs, and most other
+ plugin types, no explicit object creation is required. Qt will
+ find and create them as required. Styles are an exception, since
+ you might want to set a style explicitly in code. To apply a
+ style, use code like this:
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 2
+
+ Some plugin classes require additional functions to be
+ implemented. See the class documentation for details of the
+ virtual functions that must be reimplemented for each type of
+ plugin.
+
+ Qt applications automatically know which plugins are available,
+ because plugins are stored in the standard plugin subdirectories.
+ Because of this applications don't require any code to find and load
+ plugins, since Qt handles them automatically.
+
+ The default directory for plugins is \c{QTDIR/plugins} (where \c
+ QTDIR is the directory where Qt is installed), with each type of
+ plugin in a subdirectory for that type, e.g. \c styles. If you
+ want your applications to use plugins and you don't want to use
+ the standard plugins path, have your installation process
+ determine the path you want to use for the plugins, and save the
+ path, e.g. using QSettings, for the application to read when it
+ runs. The application can then call
+ QCoreApplication::addLibraryPath() with this path and your
+ plugins will be available to the application. Note that the final
+ part of the path (e.g., \c styles) cannot be changed.
+
+ The normal way to include a plugin with an application is either
+ to \l{Static Plugins}{compile it in with the application} or to
+ compile it into a dynamic library and use it like any other
+ library.
+
+ If you want the plugin to be loadable then one approach is to
+ create a subdirectory under the application and place the plugin
+ in that directory. If you distribute any of the plugins that come
+ with Qt (the ones located in the \c plugins directory), you must
+ copy the sub-directory under \c plugins where the plugin is
+ located to your applications root folder (i.e., do not include the
+ \c plugins directory).
+
+ For more information about deployment,
+ see the \l {Deploying Qt Applications} documentation.
+
+ The \l{Style Plugin Example} shows how to implement a plugin
+ that extends the QStylePlugin base class.
+
+ \section1 The Lower-Level API: Extending Qt Applications
+
+ Not only Qt itself but also Qt application can be extended
+ through plugins. This requires the application to detect and load
+ plugins using QPluginLoader. In that context, plugins may provide
+ arbitrary functionality and are not limited to database drivers,
+ image formats, text codecs, styles, and the other types of plugin
+ that extend Qt's functionality.
+
+ Making an application extensible through plugins involves the
+ following steps:
+
+ \list 1
+ \o Define a set of interfaces (classes with only pure virtual
+ functions) used to talk to the plugins.
+ \o Use the Q_DECLARE_INTERFACE() macro to tell Qt's
+ \l{meta-object system} about the interface.
+ \o Use QPluginLoader in the application to load the plugins.
+ \o Use qobject_cast() to test whether a plugin implements a given
+ interface.
+ \endlist
+
+ Writing a plugin involves these steps:
+
+ \list 1
+ \o Declare a plugin class that inherits from QObject and from the
+ interfaces that the plugin wants to provide.
+ \o Use the Q_INTERFACES() macro to tell Qt's \l{meta-object
+ system} about the interfaces.
+ \o Export the plugin using the Q_EXPORT_PLUGIN2() macro.
+ \o Build the plugin using a suitable \c .pro file.
+ \endlist
+
+ For example, here's the definition of an interface class:
+
+ \snippet examples/tools/plugandpaint/interfaces.h 2
+
+ Here's the definition of a plugin class that implements that
+ interface:
+
+ \snippet examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h 0
+
+ The \l{tools/plugandpaint}{Plug & Paint} example documentation
+ explains this process in detail. See also \l{Creating Custom
+ Widgets for Qt Designer} for information about issues that are
+ specific to \QD. You can also take a look at the \l{Echo Plugin
+ Example} is a more trivial example on how to implement a plugin
+ that extends Qt applications. Please note that a QCoreApplication
+ must have been initialized before plugins can be loaded.
+
+ \section1 Loading and Verifying Plugins Dynamically
+
+ When loading plugins, the Qt library does some sanity checking to
+ determine whether or not the plugin can be loaded and used. This
+ provides the ability to have multiple versions and configurations of
+ the Qt library installed side by side.
+
+ \list
+ \o Plugins linked with a Qt library that has a higher version number
+ will not be loaded by a library with a lower version number.
+
+ \br
+ \bold{Example:} Qt 4.3.0 will \e{not} load a plugin built with Qt 4.3.1.
+
+ \o Plugins linked with a Qt library that has a lower major version
+ number will not be loaded by a library with a higher major version
+ number.
+
+ \br
+ \bold{Example:} Qt 4.3.1 will \e{not} load a plugin built with Qt 3.3.1.
+ \br
+ \bold{Example:} Qt 4.3.1 will load plugins built with Qt 4.3.0 and Qt 4.2.3.
+
+ \o The Qt library and all plugins are built using a \e {build
+ key}. The build key in the Qt library is examined against the build
+ key in the plugin, and if they match, the plugin is loaded. If the
+ build keys do not match, then the Qt library refuses to load the
+ plugin.
+
+ \br \bold{Rationale:} See the \l{#The Build Key}{The Build Key} section below.
+ \endlist
+
+ When building plugins to extend an application, it is important to ensure
+ that the plugin is configured in the same way as the application. This means
+ that if the application was built in release mode, plugins should be built
+ in release mode, too.
+
+ If you configure Qt to be built in both debug and release modes,
+ but only build applications in release mode, you need to ensure that your
+ plugins are also built in release mode. By default, if a debug build of Qt is
+ available, plugins will \e only be built in debug mode. To force the
+ plugins to be built in release mode, add the following line to the plugin's
+ project file:
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 3
+
+ This will ensure that the plugin is compatible with the version of the library
+ used in the application.
+
+ \section2 The Build Key
+
+ When loading plugins, Qt checks the build key of each plugin against its
+ own configuration to ensure that only compatible plugins are loaded; any
+ plugins that are configured differently are not loaded.
+
+ The build key contains the following information:
+ \list
+ \o Architecture, operating system and compiler.
+
+ \e {Rationale:}
+ In cases where different versions of the same compiler do not
+ produce binary compatible code, the version of the compiler is
+ also present in the build key.
+
+ \o Configuration of the Qt library. The configuration is a list
+ of the missing features that affect the available API in the
+ library.
+
+ \e {Rationale:}
+ Two different configurations of the same version of
+ the Qt library are not binary compatible. The Qt library that
+ loads the plugin uses the list of (missing) features to
+ determine if the plugin is binary compatible.
+
+ \e {Note:} There are cases where a plugin can use features that are
+ available in two different configurations. However, the
+ developer writing plugins would need to know which features are
+ in use, both in their plugin and internally by the utility
+ classes in Qt. The Qt library would require complex feature
+ and dependency queries and verification when loading plugins.
+ Requiring this would place an unnecessary burden on the developer, and
+ increase the overhead of loading a plugin. To reduce both
+ development time and application runtime costs, a simple string
+ comparision of the build keys is used.
+
+ \o Optionally, an extra string may be specified on the configure
+ script command line.
+
+ \e {Rationale:}
+ When distributing binaries of the Qt library with an
+ application, this provides a way for developers to write
+ plugins that can only be loaded by the library with which the
+ plugins were linked.
+ \endlist
+
+ For debugging purposes, it is possible to override the run-time build key
+ checks by configuring Qt with the \c QT_NO_PLUGIN_CHECK preprocessor macro
+ defined.
+
+ \section1 Static Plugins
+
+ Plugins can be linked statically against your application. If you
+ build the static version of Qt, this is the only option for
+ including Qt's predefined plugins.
+
+ When compiled as a static library, Qt provides the following
+ static plugins:
+
+ \table
+ \header \o Plugin name \o Type \o Description
+ \row \o \c qtaccessiblecompatwidgets \o Accessibility \o Accessibility for Qt 3 support widgets
+ \row \o \c qtaccessiblewidgets \o Accessibility \o Accessibility for Qt widgets
+ \row \o \c qdecorationdefault \o Decorations (Qt Extended) \o Default style
+ \row \o \c qdecorationwindows \o Decorations (Qt Extended) \o Windows style
+ \row \o \c qgif \o Image formats \o GIF
+ \row \o \c qjpeg \o Image formats \o JPEG
+ \row \o \c qmng \o Image formats \o MNG
+ \row \o \c qico \o Image formats \o ICO
+ \row \o \c qsvg \o Image formats \o SVG
+ \row \o \c qtiff \o Image formats \o TIFF
+ \row \o \c qimsw_multi \o Input methods (Qt Extended) \o Input Method Switcher
+ \row \o \c qwstslibmousehandler \o Mouse drivers (Qt Extended) \o \c tslib mouse
+ \row \o \c qgfxtransformed \o Graphic drivers (Qt Extended) \o Transformed screen
+ \row \o \c qgfxvnc \o Graphic drivers (Qt Extended) \o VNC
+ \row \o \c qscreenvfb \o Graphic drivers (Qt Extended) \o Virtual frame buffer
+ \row \o \c qsqldb2 \o SQL driver \o IBM DB2 \row \o \c qsqlibase \o SQL driver \o Borland InterBase
+ \row \o \c qsqlite \o SQL driver \o SQLite version 3
+ \row \o \c qsqlite2 \o SQL driver \o SQLite version 2
+ \row \o \c qsqlmysql \o SQL driver \o MySQL
+ \row \o \c qsqloci \o SQL driver \o Oracle (OCI)
+ \row \o \c qsqlodbc \o SQL driver \o Open Database Connectivity (ODBC)
+ \row \o \c qsqlpsql \o SQL driver \o PostgreSQL
+ \row \o \c qsqltds \o SQL driver \o Sybase Adaptive Server (TDS)
+ \row \o \c qcncodecs \o Text codecs \o Simplified Chinese (People's Republic of China)
+ \row \o \c qjpcodecs \o Text codecs \o Japanese
+ \row \o \c qkrcodecs \o Text codecs \o Korean
+ \row \o \c qtwcodecs \o Text codecs \o Traditional Chinese (Taiwan)
+ \endtable
+
+ To link statically against those plugins, you need to use the
+ Q_IMPORT_PLUGIN() macro in your application and you need to add
+ the required plugins to your build using \c QTPLUGIN.
+ For example, in your \c main.cpp:
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 4
+
+ In the \c .pro file for your application, you need the following
+ entry:
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 5
+
+ It is also possible to create your own static plugins, by
+ following these steps:
+
+ \list 1
+ \o Add \c{CONFIG += static} to your plugin's \c .pro file.
+ \o Use the Q_IMPORT_PLUGIN() macro in your application.
+ \o Link your application with your plugin library using \c LIBS
+ in the \c .pro file.
+ \endlist
+
+ See the \l{tools/plugandpaint}{Plug & Paint} example and the
+ associated \l{tools/plugandpaintplugins/basictools}{Basic Tools}
+ plugin for details on how to do this.
+
+ \note If you are not using qmake to build your application you need
+ to make sure that the \c{QT_STATICPLUGIN} preprocessor macro is
+ defined.
+
+ \sa QPluginLoader, QLibrary, {Plug & Paint Example}
+
+ \section1 The Plugin Cache
+
+ In order to speed up loading and validation of plugins, some of
+ the information that is collected when plugins are loaded is cached
+ through QSettings. This includes information about whether or not
+ a plugin was successfully loaded, so that subsequent load operations
+ don't try to load an invalid plugin. However, if the "last modified"
+ timestamp of a plugin has changed, the plugin's cache entry is
+ invalidated and the plugin is reloaded regardless of the values in
+ the cache entry, and the cache entry itself is updated with the new
+ result.
+
+ This also means that the timestamp must be updated each time the
+ plugin or any dependent resources (such as a shared library) is
+ updated, since the dependent resources might influence the result
+ of loading a plugin.
+
+ Sometimes, when developing plugins, it is necessary to remove entries
+ from the plugin cache. Since Qt uses QSettings to manage the plugin
+ cache, the locations of plugins are platform-dependent; see
+ \l{QSettings#Platform-Specific Notes}{the QSettings documentation}
+ for more information about each platform.
+
+ For example, on Windows the entries are stored in the registry, and the
+ paths for each plugin will typically begin with either of these two strings:
+
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 6
+
+ \section1 Debugging Plugins
+
+ There are a number of issues that may prevent correctly-written plugins from
+ working with the applications that are designed to use them. Many of these
+ are related to differences in the way that plugins and applications have been
+ built, often arising from separate build systems and processes.
+
+ The following table contains descriptions of the common causes of problems
+ developers experience when creating plugins:
+
+ \table
+ \header \o Problem \o Cause \o Solution
+ \row \o Plugins sliently fail to load even when opened directly by the
+ application. \QD shows the plugin libraries in its
+ \gui{Help|About Plugins} dialog, but no plugins are listed under each
+ of them.
+ \o The application and its plugins are built in different modes.
+ \o Either share the same build information or build the plugins in both
+ debug and release modes by appending the \c debug_and_release to
+ the \l{qmake Variable Reference#CONFIG}{CONFIG} variable in each of
+ their project files.
+ \row \o A valid plugin that replaces an invalid (or broken) plugin fails to load.
+ \o The entry for the plugin in the plugin cache indicates that the original
+ plugin could not be loaded, causing Qt to ignore the replacement.
+ \o Either ensure that the plugin's timestamp is updated, or delete the
+ entry in the \l{#The Plugin Cache}{plugin cache}.
+ \endtable
+
+ You can also use the \c QT_DEBUG_PLUGINS environment variable to obtain
+ diagnostic information from Qt about each plugin it tries to load. Set this
+ variable to a non-zero value in the environment from which your application is
+ launched.
+*/
diff --git a/doc/src/porting-qsa.qdoc b/doc/src/porting-qsa.qdoc
new file mode 100644
index 0000000..0560060
--- /dev/null
+++ b/doc/src/porting-qsa.qdoc
@@ -0,0 +1,475 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Moving from QSA to Qt Script
+ \page porting-qsa.html
+ \ingroup porting
+
+ The purpose of this document is to map the differences between Qt
+ Script for Applications (QSA) and Qt Script, the ECMAScript compatible
+ engine supplied with Qt 4.3. This document is not supposed to be a
+ complete function by function porting guide, but will cover the most
+ obvious aspects.
+
+ First of all it is important to realize that Qt Script is only an
+ interpreter, it does not provide an editor, completion or script project
+ management, like QSA does. Qt Script however does provides almost full
+ compliance with the ECMAScript standard and performs significantly
+ better than the script engine provided by QSA.
+
+ \tableofcontents
+
+ \section1 The Scripting Language
+
+ The scripting language used in QSA, from here on referred to as QSA,
+ was derived from ECMAScript 3.0 and 4.0 and is a hybrid of these
+ standards. Most of the run-time logic, such as classes and scoping
+ rules, is based on the ECMAScript 4.0 proposal, while the library
+ implementation is based on the ECMAScript 3.0 standard.
+ Qt Script on the other hand is solely based on the ECMAScript 3.0
+ standard. Though the languages look identical at first glance,
+ there are a few differences that we'll cover in the sections below.
+
+
+ \section2 Classes vs. Objects and Properties
+
+ QSA implements classes and inheritance much in a familiar way to users
+ of other object oriented languages, like C++ and Java. However, the
+ ECMAScript 3.0 standard defines that everything is an object, and objects
+ can have named properties. For instance to create an point object with
+ the properties x and y one would write the following Qt Script code:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 0
+
+ The object \c point in this case is constructed as a plain object and
+ we assign two properties, \c x and \c y, to it with the values 12 and
+ 35. The \c point object is assigned to the "Global Object" as the
+ named property \c{point}. The global object can be considered the
+ global namespace of the script engine. Similarly, global functions are
+ named properties of the global object; for example:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 1
+
+ An equivalent construction that illustrates that the function is a
+ property of the global object is the following assignment:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 2
+
+ Since functions are objects, they can be assigned to objects as
+ properties, becoming member functions:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 3
+
+ In the code above, we see the first subtle difference between
+ QSA and Qt Script. In QSA one would write the point class like this:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 4
+
+ where in the \c manhattanLength() function we access \c x and \c y
+ directly because, when the function is called, the \c this object is
+ implicitly part of the current scope, as in C++. In Qt Script,
+ however, this is not the case, and we need to explicitly access
+ the \c x and \c y values via \c{this}.
+
+ All the code above runs with QSA except the assignment of a function
+ to \c{point.manhattanLength}, which we repeat here for clarity:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 5
+
+ This is because, in QSA, the value of \c this is decided based on
+ the location of the declaration of the function it is used in. In the
+ code above, the function is assigned to an object, but it is declared
+ in the global scope, hence there will be no valid \c this value.
+ In Qt Script, the value of \c this is decided at run-time,
+ hence you could have assigned the \c manhattanLength() function to any
+ object that had \c x and \c y values.
+
+
+ \section2 Constructors
+
+ In the code above, we use a rather awkward method for constructing
+ the objects, by first instantiating them, then manually
+ assigning properties to them. In QSA, the proper way to solve this
+ is to implement a constructor in the class:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 6
+
+ The equivalent in Qt Script is to create a constructor function:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 7
+
+ As we can see, the constructor is just a normal function. What is
+ special with is how we call it, namely prefixed with the \c new
+ keyword. This will create a new object and call the \c Car()
+ function with the newly created object as the \c this pointer.
+ So, in a sense, it is equivalent to:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 8
+
+ This is similar to the manhattenLength() example above. Again, the
+ main difference between QSA and Qt Script is that one has to
+ explicitly use the keyword \c this to access the members and that
+ instead of declaring the variable, \c regNumber, we just extend the
+ \c this object with the property.
+
+
+ \section2 Member Functions and Prototypes
+
+ As we saw above, one way of creating member functions of a Qt Script
+ object is to assign the member function to the object as a property
+ and use the \c this object inside the functions. So, if we add a
+ \c toString function to the \c Car class
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 9
+
+ one could write this in Qt Script as:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 10
+
+ In QSA, the member functions were part of the class declaration,
+ and were therefore shared between all instances of a given class.
+ In Qt Script, each instance has a instance member for each function.
+ This means that more memory is used when multiple instances are used.
+ Qt Script uses prototypes to remedy this.
+
+ The basic prototype-based inheritance mechanism works as follows.
+ Each Qt Script object has an internal link to another object, its
+ prototype. When a property is looked up in an object, and the object
+ itself does not have the property, the interpreter searches for the
+ property in the prototype object instead; if the prototype has the
+ property then that property is returned. If the prototype object does
+ not have the property, the interpreter searches for the property in
+ the prototype of the prototype object, and so on.
+
+ This chain of objects constitutes a prototype chain. The chain of
+ prototype objects is followed until the property is found or the end
+ of the chain is reached.
+
+ To make the \c toString() function part of the prototype, we write
+ code like this:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 11
+
+ Here, we made the \c toString() function part of the prototype so
+ that, when we call \c{car.toString()} it will be resolved via the
+ internal prototype object of the car object. Note, however, that the
+ \c this object is still the original object that the function was
+ called on, namely \c{car}.
+
+
+ \section2 Inheritance
+
+ Now that we've seen how to use prototypes to create a "class" members
+ in Qt Script, let's see how we can use prototypes to create
+ polymorphism. In QSA you would write
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 12
+
+ With Qt Script, we acheive the same effect by creating a prototype
+ chain. The default prototype of an object is a plain \c Object
+ without any special members, but it is possible to replace this
+ object with another prototype object.
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 13
+
+ In the code above, we have a constructor, \c{GasolineCar}, which
+ calls the "base class" implementation of the constructor to
+ initialize the \c this object with the property \c{regNumber},
+ based on the values passed in the constructor. The interesting line
+ in this case is the line after the constructor where we change the
+ default prototype for \c GasolineCar to be an instance of type
+ \c{Car}. This means that all members available in a \c Car object
+ are now available in all \c GasolineCar objects. In the last line,
+ we replace the \c toString() function in the prototype with our own,
+ thus overriding the \c toString() for all instances of
+ \c{GasolineCar}.
+
+
+ \section2 Static Members
+
+ QSA allowed users to declare static members in classes, and these
+ could be accessed both through instances of the class and through
+ the class itself. For example, the following variable is accessed
+ through the \c Car class:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 14
+
+ The equivalent in Qt Script is to assign variables that should appear
+ as static members as properties of the constructor function. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 15
+
+ Note that in QSA, static member variables were also accessible in
+ instances of the given class. In Qt Script, with the approach
+ illustrated above, the variable is a member of the constructor
+ object only, and thus only accessible through \c{Car.globalCount}.
+
+
+ \section1 The Built-in Functions and Library
+
+ The built-in functions in QSA are based on those defined in the
+ ECMAScript 3.0 standard, the same standard used for Qt Script, but
+ QSA adds some extensions to this, specifically for the \c String
+ and \c RegExp types. QSA also lacked some functions from the
+ standard, most notably the \c Date type. Below we list all the
+ differences. All changes made to Qt Script are to increase
+ compliance with ECMAScript 3.0.
+
+ \table
+ \header \o QSA Function \o Notes about Equivalent Qt Script Functions
+ \row \o eval()
+ \o The eval function in QSA opened a new scope for code being
+ executed in the eval function, so locally declared variables were not
+ accessible outside. In Qt Script, the eval() function shares the
+ current scope, making locally declared variables accessible outside
+ the eval() call.
+
+ \row \o debug()
+ \o This function is not available in Qt Script. Use print() instead.
+
+ \row \o connect()
+ \o QSA had closures, meaning that a member function
+ reference implicitly contained its \c this object. Qt Script does not
+ support this. See the Qt Script documentation for details on using the
+ connect function.
+
+ \row \o String.arg()
+ \o This function is not available in Qt Script. Use replace() or concat() instead.
+
+ \row \o String.argDec()
+ \o This function is not available in Qt Script. Use replace() or concat() instead.
+
+ \row \o String.argInt()
+ \o This function is not available in Qt Script. Use replace() or concat() instead.
+
+ \row \o String.argStr()
+ \o This function is not available in Qt Script. Use replace() or concat() instead.
+
+ \row \o String.endsWith()
+ \o This function is not available in Qt Script. Use lastIndexOf() instead.
+
+ \row \o String.find()
+ \o This function is not available in Qt Script. Use indexOf() instead.
+
+ \row \o String.findRev()
+ \o This function is not available in Qt Script. Use lastIndexOf() and length instead.
+
+ \row \o String.isEmpty()
+ \o This function is not available in Qt Script. Use length == 0 instead.
+
+ \row \o String.left()
+ \o This function is not available in Qt Script. Use substring() instead.
+
+ \row \o String.lower()
+ \o This function is not available in Qt Script. Use toLowerCase() instead.
+
+ \row \o String.mid()
+ \o This function is not available in Qt Script. Use substring() instead.
+
+ \row \o String.right()
+ \o This function is not available in Qt Script. Use substring() instead.
+
+ \row \o String.searchRev()
+ \o This function is not available in Qt Script. Use search() / match() instead.
+
+ \row \o String.startsWith()
+ \o This function is not available in Qt Script. Use indexOf() == 0 instead.
+
+ \row \o String.upper()
+ \o This function is not available in Qt Script. Use toUpperCase() instead.
+
+ \row \o RegExp.valid
+ \o This property is not available in Qt Script because it is not
+ required; a \c SyntaxError exception is thrown for bad \c RegExp objects.
+
+ \row \o RegExp.empty
+ \o This property is not available in Qt Script. Use \c{toString().length == 0} instead.
+
+ \row \o RegExp.matchedLength
+ \o This property is not available in Qt Script. RegExp.exec() returns an
+ array whose size is the matched length.
+
+ \row \o RegExp.capturedTexts
+ \o This property is not available in Qt Script. RegExp.exec() returns an
+ array of captured texts.
+
+ \row \o RegExp.search()
+ \o This function is not available in Qt Script. Use RegExp.exec() instead.
+
+ \row \o RegExp.searchRev()
+ \o This function is not available in Qt Script. Use RegExp.exec() or
+ String.search()/match() instead.
+
+ \row \o RegExp.exactMatch()
+ \o This function is not available in Qt Script. Use RegExp.exec() instead.
+
+ \row \o RegExp.pos()
+ \o This function is not available in Qt Script. Use String.match() instead.
+
+ \row \o RegExp.cap()
+ \o This function is not available in Qt Script. RegExp.exec() returns an
+ array of captured texts.
+ \endtable
+
+ QSA also defined some internal Qt API which is not present in Qt
+ Script. The types provided by QSA which are not provided by Qt Script are:
+
+ \list
+ \o Rect
+ \o Point
+ \o Size
+ \o Color
+ \o Palette
+ \o ColorGroup
+ \o Font
+ \o Pixmap
+ \o ByteArray
+ \endlist
+
+
+ \section1 The C++ API of QSA vs Qt Script
+
+ QSA is more than just a scripting engine. It provides project
+ management, an editor with completion and a minimalistic IDE to edit
+ scriptable projects. Qt Script on the other hand is just a scripting
+ engine. This means that equivalents to the classes \c QSEditor,
+ \c QSScript, \c QSProject and \c QSWorkbench do not exist in Qt Script.
+ QSA also provides some extension APIs through the \c QSUtilFactory and
+ \c QSInputDialogFactory. There is also no equivalent to these classes
+ in the Qt Script API.
+
+
+ \section2 Making QObjects Accessible from Scripts
+
+ There are two different ways of making \l{QObject}s accessible from
+ scripts in QSA. The first method is via the
+ \c QSInterpreter::addTransientObject() and \c QSProject::addObject()
+ functions. In this case objects are added to the global namespace of
+ the interpreter using their object names as the names of the
+ variables.
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 16
+
+ The code above adds the button to the global namespace under the name
+ "button". One obvious limitation here is that there is potential for
+ either unnamed \l{QObject}s or objects whose names conflict. Qt Script
+ provides a more flexible way of adding QObjects to the scripting
+ environment.
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 17
+
+ In the code above we create a QPushButton and wrap it in a script
+ value using the function, QScriptEngine::newQObject(). This gives us
+ a script value that we put into the global object using the name
+ "button". The concept of objects and properties discussed above is
+ quite visible here in the public C++ API as well. We have no
+ dependency on the object's name and we can also resolve name conflicts
+ more gracefully. Here, we operate directly on QScriptValue objects.
+ This is the actual object that is being passed around inside
+ the script engine, so we actually have low-level access to the
+ internal script data structures, far beyond that which is possible
+ in QSA. Properties, signals and slots of the QObject are accessible
+ to the scripter in Qt Script, just like in QSA.
+
+ The other way to expose \l{QObject}s in QSA was to create a
+ \c QSObjectFactory that made it possible to instantiate QObjects from
+ scripts.
+
+ Below is listed some code from the filter example in the QSA
+ package.
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 18
+
+ The equivalent in Qt Script is written in much the same way as
+ constructors are written in scripts. We register a callback C++
+ function under the name "ImageSource" in the global namespace and
+ return the QObject from this function:
+
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 19
+
+ In the Qt Script case we use the same approach that we use to expose
+ a QObject, namely via QScriptEngine::newQObject(). This function also
+ has the benefit that it is possible to specify if the QObject should
+ expose properties and slots of its base class. It is also possible to
+ specify custom ownership rules.
+
+ The reader might question why we don't add the constructor function
+ directly into the namespace, but create a meta-object script value for
+ it in addition. The plain function would certainly be good enough,
+ but by creating a QMetaObject based constructor we get the enums on
+ QPushButton for free in the QPushButton function object. Exposing
+ enums in QSA is rather painful in comparison.
+
+ If we want to add more "static" data to the QPushButton type in Qt
+ Script, we're free to add properties, similar to how we did for
+ the script. It is also possible to add custom functions to a Qt Script
+ QPushButton instance by setting more properties on it, such as making
+ the \l{QPushButton::}{setText()} C++ function available. It is also
+ possible to acheive this by installing a custom prototype, and be
+ memory efficient, as discussed in the script example above.
+
+
+ \section2 Accessing Non-QObjects
+
+ In QSA, it was possible to expose non-QObjects to QSA by wrapping them
+ in a QObject and using either \c QSWrapperFactory or \c QSObjectFactory
+ to expose them. Deciding when to use each of these classes could be
+ confusing, as one was used for script based construction and the other
+ for wrapping function parameters and return values, but in essence they
+ did exactly the same thing.
+
+ In Qt Script, providing access to QObjects and non-QObjects is done in
+ the same way as shown above, by creating a constructor function, and
+ by adding properties or a custom prototype to the constructed object.
+
+
+ \section2 Data Mapping
+
+ QSA supported a hardcoded set of type mappings which covered most
+ of the QVariant types, QObjects and primitives. For more complex type
+ signatures, such as the template-based tool classes, it had rather
+ limited support. Qt Script is significantly better at type mapping
+ and will convert lists of template types into arrays of the
+ appropriate types, given that all the types are declared to the
+ meta-type system.
+*/
diff --git a/doc/src/porting4-canvas.qdoc b/doc/src/porting4-canvas.qdoc
new file mode 100644
index 0000000..dcd1a1e
--- /dev/null
+++ b/doc/src/porting4-canvas.qdoc
@@ -0,0 +1,703 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page graphicsview-porting.html
+ \title Porting to Graphics View
+ \contentspage {Porting Guides}{Contents}
+ \previouspage Porting .ui Files to Qt 4
+ \nextpage qt3to4 - The Qt 3 to 4 Porting Tool
+ \ingroup porting
+ \ingroup multimedia
+ \brief Hints and tips to assist with porting canvas applications to the
+ Graphics View framework.
+
+ \keyword QGraphicsView GraphicsView Porting Graphics Canvas
+ \since 4.2
+
+ Graphics View provides a surface for managing and interacting with a large
+ number of custom-made 2D graphical items, and a view widget for
+ visualizing the items, with support for zooming and rotation. Graphics
+ View was introduced in Qt 4.2, replacing its predecessor, QCanvas. For
+ more on Graphics View, see \l{The Graphics View Framework}.
+
+ This document walks through the steps needed, class by class and function
+ by function, to port a QCanvas application to Graphics View.
+
+ \tableofcontents
+
+ Qt 4.2 provides two complete examples of Q3Canvas applications ported to
+ Graphics View:
+
+ \list
+ \o \l{Ported Canvas Example}, the canvas example from Qt 3.
+ \o \l{Ported Asteroids Example}, the Asteroids game from the Qt 3 demo.
+ \endlist
+
+ \section1 Introduction
+
+ Conceptually, the Graphics View classes from Qt 4 and the Canvas
+ classes from Qt 3 provide similar functionality using a similar
+ design. Instead of "canvas", we use the term "scene". Otherwise, the
+ class names and functions are almost the same as in Qt 3. The easiest
+ classes to port will be QCanvas and QCanvasView. Experience shows that
+ most time is spent porting the item classes, depending on the
+ complexity of the QCanvasItem classes you have been using before.
+
+ This porting guide will assume you have already ported your
+ application to Qt 4, by making use of Q3Canvas. If you have not done
+ so already, as a first step, run the \l qt3to4 tool on your
+ project. This tool will automate the most tedious part of the porting
+ effort.
+
+ Some additional steps are usually required before your application
+ will compile and run. You can read more about the porting process in
+ \l{Porting to Qt 4}.
+
+ \section1 Porting from Q3Canvas
+
+ QGraphicsScene is the closest equivalent to Q3Canvas. There
+ are some noticable differences in this new API: Whereas the
+ Q3Canvas classes use integer precision, QGraphicsScene is
+ entirely based on double coordinates, with graphical
+ primitives such as QPointF instead of QPoint, QRectF instead
+ of QRect, and QPolygonF and QPainterPath. The canvas area is
+ defined by a scene rectangle, allowing negative coordinates,
+ as opposed to Q3Canvas, which only defines a size (QSize), and
+ whose top-left corner is always (0, 0).
+
+ In addition, there is no explicit support for canvas tiles
+ anymore; see \l{Porting scenes with tiles} for more
+ information. The chunks-based indexing system has been
+ replaced with an implicitly maintained internal BSP tree.
+
+ \section2 Porting table
+
+ \table
+ \header \o Q3Canvas \o QGraphicsScene
+
+ \row \o Q3Canvas::Q3Canvas() \o There is no QPixmap based
+ constructor, and the concept of tiles is gone. You can use
+ QGraphicsScene::backgroundBrush to set a brush pattern for
+ the background, or reimplement
+ QGraphicsScene::drawBackground() in a QGraphicsScene
+ subclass (see \l{Porting scenes with tiles}). In addition,
+ the QGraphicsScene geometry is provided as a full
+ QRectF. Instead of Q3Canvas(int width, int height), you can
+ use QGraphicsScene(int top, int left, int width, int
+ height).
+
+ \row \o Q3Canvas::allItems() \o QGraphicsScene::items()
+ returns a list of all items on the scene.
+
+ \row \o Q3Canvas::backgroundColor() \o You can assign a color for the
+ background through the QGraphicsScene::backgroundBrush
+ or QGraphicsView::backgroundBrush properties.
+
+ \row \o Q3Canvas::backgroundPixmap() \o You can set a tiled
+ pixmap for the background through
+ QGraphicsScene::backgroundBrush or
+ QGraphicsView::backgroundBrush. For more control on the pixmap
+ positioning, you can reimplement
+ QGraphicsScene::drawBackground() or
+ QGraphicsView::drawBackground().
+
+ \row \o Q3Canvas::chunkSize() \o The closest equivalent to the
+ chunks size in Q3Canvas is the depth of QGraphicsScene's BSP
+ tree. QGraphicsScene assigns a depth automatically, and the
+ size of each scene segment depends on this depth, and
+ QGraphicsScene::sceneRect(). See
+ QGraphicsScene::itemIndexMethod.
+
+ \row \o Q3Canvas::collisions() \o QGraphicsScene provides
+ several means to detect item collisions. The
+ QGraphicsScene::items() overloads return items that collide
+ with a point, a rectangle, a polygon, or an arbitrary vector
+ path (QPainterPath). You can also call
+ QGraphicsScene::collidingItems() to determine collision with
+ an item.
+
+ \row \o Q3Canvas::drawArea() \o The QGraphicsScene::render()
+ function provides the original behavior
+ Q3Canvas::drawArea(). In addition, you can pass a source
+ rectangle for rendering only parts of the scene, and a
+ destination rectangle for rendering onto designated area of
+ the destination device. QGraphicsScene::render() can
+ optionally transform the source rectangle to fit into the
+ destination rectangle. See \l{Printing}
+
+ \row \o Q3Canvas::onCanvas() \o The is no equivalent to this
+ function in Graphics View. However, you can combine
+ QGraphicsScene::sceneRect() and QRectF::intersects():
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 0
+
+ \row \o Q3Canvas::rect() \o The equivalent,
+ QGraphicsScene::sceneRect(), returns a QRectF (double
+ precision coordinates). Its top-left corner can be an
+ arbitrary coordinate (Q3Canvas::rect().topLeft() is always (0,
+ 0)).
+
+ \row \o Q3Canvas::resize() \o You can call
+ QGraphicsScene::setSceneRect(0, 0, width, height) instead.
+
+ \row \o Q3Canvas::retune() \o See
+ QGraphicsScene::itemIndexMethod. You can tune the indexing by
+ setting a suitable sceneRect(). The optimal depth of
+ QGraphicsScene's BSP tree is determined automatically.
+
+ \row \o Q3Canvas::setAdvancePeriod() \o There is no concept of
+ an advance period in the new API; instead, you can connect
+ QTimer::timeout() to the QGraphicsScene::advance() slot to
+ obtain similar functionality. This will cause all items'
+ QGraphicsItem::advance() function to be called. See also
+ QGraphicsItemAnimation.
+
+ \row \o Q3Canvas::setAllChanged() \o You can call
+ QGraphicsScene::update() with no arguments.
+
+ \row \o Q3Canvas::setChanged() \o QGraphicsScene::update()
+ will trigger a repaint of the whole scene, or parts of the
+ scene.
+
+ \row \o Q3Canvas::setDoubleBuffering() \o Q3Canvas' double
+ buffering enabled cacheing of the scene contents in device
+ (i.e., viewport) coordinates. This cache layer has been moved
+ to the view instead; you can cache QGraphicsScene's background
+ through
+ QGraphicsView::setCacheMode(). QGraphicsView::resetCachedContent()
+ will reset the areas of the cache that has changed.
+
+ \row \o Q3Canvas::tile() \o See \l{Porting scenes with tiles}.
+
+ \row \o Q3Canvas::setTiles() \o See \l{Porting scenes with tiles}.
+
+ \row \o Q3Canvas::setUnchanged() \o There is no equivalent in
+ Graphics View. This call can usually be removed with no side
+ effects.
+
+ \row \o Q3Canvas::setUpdatePeriod() \o There is no concept of an
+ update period in the new API; instead, you can connect
+ QTimer::timeout() to the QGraphicsScene::update() slot to obtain
+ similar functionality. See also QGraphicsItemAnimation.
+
+ \row \o Q3Canvas::size() \o
+ \tt{QGraphicsScene::sceneRect().size()} returns a QSizeF, with
+ double precision coordinates.
+
+ \row \o Q3Canvas::validChunk() \o To determine if an area is
+ inside the scene area or not, you can combine
+ QRectF::intersects() with QGraphicsScene::sceneRect().
+
+ \row \o Q3Canvas::resized() \o QGraphicsScene emits
+ \l{QGraphicsScene::sceneRectChanged()}{sceneRectChanged()}
+ whenever the scene rect changes.
+
+ \row \o Q3Canvas::drawBackground() \o You can reimplement
+ QGraphicsScene::drawBackground() to render the scene
+ background. You can also reimplement
+ QGraphicsView::drawBackground() to override this background if
+ you need different backgrounds for different views.
+
+ \row \o Q3Canvas::drawForeground() \o You can reimplement
+ QGraphicsScene::drawForeground() to render the scene
+ foreground. You can also reimplement
+ QGraphicsView::drawForeground() to override this foreground if
+ you need different foregrounds for different views.
+
+ \endtable
+
+ \section2 Porting scenes with tiles
+
+ QGraphicsScene does not provide an API for tiles. However, you
+ can achieve similar behavior by drawing pixmaps in a reimplementation of
+ QGraphicsScene::drawBackground().
+
+ Q3Canvas' tile support is based on providing one pixmap
+ containing tiles of a fixed width and height, and then
+ accessing them (reading and replacing tiles) by index. The
+ tiles in the pixmap are arranged from the left to right, top
+ to bottom.
+
+ \table
+ \row \i 0 \i 1 \i 2 \i 3
+ \row \i 4 \i 5 \i 6 \i 7
+ \endtable
+
+ With Graphics View, this pixmap can be stored as a member of a
+ subclass of QGraphicsScene. The three main functions that make
+ out the public tile API can then be declared as new members of
+ this class. Here is one example of how to implement tile support:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 1
+
+ Depending on how your scene uses tiles, you may be able to
+ simplify this approach. In this example, we will try to mimic the behavior
+ of the Q3Canvas functions.
+
+ We start by creating a subclass of QGraphicsScene ("TileScene").
+ In this class, we declare two of the tile
+ functions from Q3Canvas, and we then add two helper function that returns the
+ rectangle for a certain tile in our tile pixmap. We will use a
+ two-dimensional vector of ints to keep track of what tiles should
+ be used at what parts of the scene.
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 2
+
+ In setTiles(), we store the pixmap and tile properties as
+ members of the class. Then we resize the tiles vector
+ to match the width and height of our tile grid.
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 3
+
+ The setTile() function updates the tiles index, and then
+ updates the corresponding rect in the scene by calling
+ tileRect().
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 4
+
+ The first tileRect() function returns a QRect for the tile at
+ position (x, y).
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 5
+
+ The second tileRect() function returns a QRect for a tile number.
+ With these functions in place, we can implement the drawBackground()
+ function.
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 6
+
+ In drawBackground(), we redraw all tiles that have been
+ exposed by intersecting each tile rect with the exposed background
+ area.
+
+ \section1 Porting from Q3CanvasView
+
+ The closest equivalent to Q3CanvasView in Graphics View is
+ called QGraphicsView. In most cases, this is the easiest
+ class to port. In addition to providing all of Q3CanvasView's
+ functionality, QGraphicsView includes some useful new features. You
+ can read more about this in QGraphicsView's documentation.
+
+ \section2 Porting table
+
+ \table
+ \header \o Q3CanvasView \o QGraphicsView
+
+ \row \o Q3CanvasView::Q3CanvasView() \o QGraphicsView provides
+ the same constructors as Q3CanvasView, but without the name
+ and flags arguments. You can set the name by calling
+ \l{QWidget::setObjectName()}{setObjectName()}, and the flags by
+ calling \l{QWidget::setWindowFlags()}{setWindowFlags()}.
+
+ \row \o Q3CanvasView::canvas() \o QGraphicsView::scene()
+ returns the scene that is currently associated with the
+ view. QGraphicsScene also provides the opposite function,
+ QGraphicsScene::views(), which returns a list of views
+ observing the scene.
+
+ \row \o Q3CanvasView::inverseWorldMatrix() \o You can call
+ QGraphicsView::matrix() and QMatrix::inverted().
+ QGraphicsView::mapToScene() and QGraphicsView::mapFromScene()
+ allow transforming of viewport shapes to scene shapes, and
+ vice versa.
+
+ \row \o Q3CanvasView::setCanvas() \o QGraphicsView::setScene().
+
+ \row \o Q3CanvasView::setWorldMatrix() \o
+ QGraphicsView::setMatrix(), QGraphicsView::rotate(),
+ QGraphicsView::scale(), QGraphicsView::shear() and
+ QGraphicsView::translate().
+
+ \row \o Q3CanvasView::worldMatrix() \o QGraphicsView::matrix()
+
+ \row \o Q3CanvasView::drawContents() \o The
+ QGraphicsView::drawBackground() function draws the background,
+ QGraphicsView::drawItems() draws the items, and
+ QGraphicsView::drawForeground() draws the foreground of the
+ scene in scene coordinates. You can also reimplement these
+ functions in QGraphicsScene.
+
+ \endtable
+
+ \section2 Other differences
+
+ QGraphicsView can cache the visible contents of the scene,
+ similar to how Q3Canvas::setDoubleBuffering() could cache the
+ entire scene contents. You can call
+ QGraphicsView::setCacheMode() to configure cacheing, and
+ QGraphicsView::resetCachedContent() invalidates the cache.
+
+ For improved navigation support, you can set a resize or
+ transformation anchor through QGraphicsView::resizeAnchor and
+ QGraphicsView::transformationAnchor. This allows you to easily
+ rotate and zoom the view while keeping the center fixed, or
+ zooming towards the position under the mouse cursor. In
+ addition, if you set the QGraphicsView::dragMode of the view,
+ QGraphicsView will provide rubber band selection or
+ click-and-pull navigation using the
+ \l{Qt::OpenHandCursor}{OpenHandCursor} and
+ \l{Qt::ClosedHandCursor}{ClosedHandCursor} cursors.
+
+ \section1 Porting from Q3CanvasItem
+
+ The closest equivalent to Q3CanvasItem in Graphics View is
+ called QGraphicsItem. Deriving from this class is very common,
+ and because of that, porting from Q3CanvasItem often involves
+ more work than Q3Canvas and Q3CanvasView.
+
+ Q3CanvasItem has become easier to use, easier to subclass, and more
+ powerful with QGraphicsItem. The key difference from Q3CanvasItem lies
+ in event propagation and item groups, but you will also find several
+ convenient new features, such as support for tooltips, cursors, item
+ transformation and drag and drop. You can read all about QGraphicsItem
+ in its own class documentation.
+
+ This section starts with a table that shows how to port each function
+ from Q3CanvasItem to QGraphicsItem. Immediately after that, each of
+ Q3CanvasItem's standard subclasses have a section of their own.
+
+ \table
+ \header \o Q3CanvasItem \o QGraphicsItem
+
+ \row \o Q3CanvasItem::advance() \o QGraphicsItem::advance() is
+ provided for compatibility. QGraphicsScene::advance() calls
+ QGraphicsItem::advance() for all items. See also QTimeLine and
+ QGraphicsItemAnimation.
+
+ \row \o Q3CanvasItem::animated() \o No equivalent; all items
+ are advanced by QGraphicsScene::advance().
+
+ \row \o Q3CanvasItem::boundingRectAdvanced() \o No
+ equivalent. You can translate QGraphicsItem::boundingRect()
+ instead (see QRectF::translate()).
+
+ \row \o Q3CanvasItem::canvas() \o QGraphicsItem::scene()
+
+ \row \o Q3CanvasItem::collidesWith() \o
+ QGraphicsItem::collidesWithItem() and
+ QGraphicsItem::collidesWithPath().
+
+ \row \o Q3CanvasItem::collisions() \o
+ QGraphicsItem::collidingItems() returns a list of all items
+ that collide with an item. You can specify whether you want
+ fast, rough estimate collision between bounding rectangles, or
+ the slower, more accurate shapes.
+
+ \row \o Q3CanvasItem::draw() \o QGraphicsItem::paint(). See
+ also QStyleOptionGraphicsItem, QGraphicsScene::drawItems() and
+ QGraphicsView::drawItems().
+
+ \row \o Q3CanvasItem::hide() \o QGraphicsItem::hide() or
+ QGraphicsItem::setVisible(). \l{QGraphicsItem}s are \e visible by
+ default; \l{Q3CanvasItem}s, however, are not.
+
+ \row \o Q3CanvasItem::isActive() \o No equivalent. To achieve
+ similar behavior, you can add this property in a custom
+ subclass of QGraphicsItem.
+
+ \row \o Q3CanvasItem::isVisible() \o
+ QGraphicsItem::isVisible(). \l{QGraphicsItem}s are \e visible by
+ default; \l{Q3CanvasItem}s, however, are not.
+
+ \row \o Q3CanvasItem::move() \o You can call
+ QGraphicsItem::setPos() to change the position of the item.
+
+ \row \o Q3CanvasItem::rtti() \o QGraphicsItem::type() and qgraphicsitem_cast().
+
+ \row \o Q3CanvasItem::setActive() \o No equivalent.
+
+ \row \o Q3CanvasItem::setAnimated() \o No equivalent; all
+ items are by default "animated" (i.e.,
+ QGraphicsScene::advance() advances all items on the scene).
+
+ \row \o Q3CanvasItem::setCanvas() \o You can call
+ QGraphicsScene::addItem(), or pass a pointer to the canvas to
+ QGraphicsItem's constructor.
+
+ \row \o Q3CanvasItem::setVelocity() \o No equivalent. You can
+ add x and y velocity as member data of your class, and call
+ QGraphicsItem::moveBy(x, y) from inside
+ QGraphicsItem::advance(). See also QTimeLine and
+ QGraphicsItemAnimation.
+
+ \row \o Q3CanvasItem::setVisible() \o
+ QGraphicsItem::setVisible(). \l{QGraphicsItem}s are \e visible by
+ default; \l{Q3CanvasItem}s, however, are not.
+
+ \row \o Q3CanvasItem::setX() \o QGraphicsItem::setPos()
+ \row \o Q3CanvasItem::setY() \o QGraphicsItem::setPos()
+
+ \row \o Q3CanvasItem::setXVelocity() \o No equivalent.
+ \row \o Q3CanvasItem::setYVelocity() \o No equivalent.
+
+ \row \o Q3CanvasItem::setZ() \o QGraphicsItem::setZValue()
+
+ \row \o Q3CanvasItem::show() \o QGraphicsItem::show() or
+ QGraphicsItem::setVisible(). \l{QGraphicsItem}s are \e visible by
+ default; \l{Q3CanvasItem}s, however, are not.
+
+ \row \o Q3CanvasItem::xVelocity() \o No equivalent.
+ \row \o Q3CanvasItem::yVelocity() \o No equivalent.
+
+ \endtable
+
+ Note that some virtual functions that have passed on to
+ QGraphicsItem have lost their virtuality. An example is
+ Q3CanvasItem::moveBy(), which was often used to track movement of
+ items. In this case, the virtual QGraphicsItem::itemChange() has
+ taken over as a substitute.
+
+ \section2 Q3CanvasPolygonalItem
+
+ The closest equivalent to Q3CanvasPolygonalItem in
+ Graphics View is called QAbstractGraphicsShapeItem. Unlike
+ Q3CanvasPolygonalItem, it does not define area points
+ (Q3CanvasPolygonalItem::areaPoints()); instead, each
+ item's geometry is stored as a member of the subclasses.
+
+ The Q3CanvasPolygonalItem::drawShape() function is no longer
+ available; instead, you can set the brush and pen from inside
+ QGraphicsItem::paint().
+
+ \table
+ \header \o Q3CanvasPolygonalItem \o QAbstractGraphicsShapeItem
+
+ \row \o Q3CanvasPolygonalItem::areaPoints() \o No equivalent; each
+ item's geometry is stored in the respective subclass.
+
+ \row \o Q3CanvasPolygonalItem::areaPointsAdvanced() \o No
+ equivalent; you can use QPolygonF::translate() or
+ QPainterPath::translate() instead.
+
+ \row \o Q3CanvasPolygonalItem::drawShape() \o
+ QGraphicsItem::paint(). You can set the pen and brush from inside
+ this function.
+
+ \row \o Q3CanvasPolygonalItem::invalidate() \o Call
+ QGraphicsItem::prepareGeometryChange() before changing the
+ item's geometry.
+
+ \row \o Q3CanvasPolygonalItem::isValid() \o No equivalent;
+ items' geometry is always in a valid state.
+
+ \row \o Q3CanvasPolygonalItem::winding() \o This function is only
+ useful for polygon items and path items; see
+ QGraphicsPolygonItem::fillRule(), and QPainterPath::fillRule() for
+ QGraphicsPathItem.
+
+ \endtable
+
+ \section2 Q3CanvasEllipse
+
+ The closest equivalent to Q3CanvasEllipse in Graphics View
+ is called QGraphicsEllipseItem. The most noticable
+ difference to QGraphicsEllipseItem is that the ellipse is
+ not longer drawn centered around its position; rather, it
+ is drawn using a bounding QRectF, just like
+ QPainter::drawEllipse().
+
+ For compatibility, you may want to shift the ellipse up and to the
+ left to keep the ellipse centered. Example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 7
+
+ Note: QGraphicsEllipseItem uses QAbstractGraphicsShapeItem::pen()
+ for outlines, whereas Q3CanvasEllipse did not use
+ Q3CanvasPolygonalItem::pen().
+
+ \table
+ \header \o Q3CanvasEllipse \o QGraphicsEllipseItem
+
+ \row \o Q3CanvasEllipse::angleLength() \o QGraphicsEllipseItem::spanAngle()
+
+ \row \o Q3CanvasEllipse::angleStart() \o QGraphicsEllipseItem::startAngle()
+
+ \row \o Q3CanvasEllipse::setAngles() \o
+ QGraphicsEllipseItem::setStartAngle() and
+ QGraphicsEllipseItem::setSpanAngle()
+
+ \row \o Q3CanvasEllipse::setSize() \o QGraphicsEllipseItem::setRect()
+
+ \endtable
+
+ \section2 Q3CanvasLine
+
+ The closest equivalent to Q3CanvasLine in Graphics View is
+ called QGraphicsLineItem.
+
+ \table
+ \header \o Q3CanvasLine \o QGraphicsLineItem
+
+ \row \o Q3CanvasLine::endPoint() \o QGraphicsLineItem::line() and QLineF::p2()
+
+ \row \o Q3CanvasLine::setPoints() \o QGraphicsLineItem::setLine()
+
+ \row \o Q3CanvasLine::startPoint() \o QGraphicsLineItem::line()
+ and QLineF::p1()
+
+ \endtable
+
+ \section2 Q3CanvasPolygon
+
+ The closest equivalent to Q3CanvasPolygon in Graphics View
+ is called QGraphicsPolygonItem.
+
+ \table
+ \header \o Q3CanvasPolygon \o QGraphicsPolygonItem
+
+ \row \o Q3CanvasPolygon::areaPoints() \o
+ QGraphicsPolygonItem::polygon() and QGraphicsItem::mapToParent()
+
+ \row \o Q3CanvasPolygon::points() \o QGraphicsPolygonItem::polygon()
+
+ \row \o Q3CanvasPolygon::setPoints() \o QGraphicsPolygonItem::setPolygon()
+
+ \endtable
+
+ \section2 Q3CanvasSpline
+
+ The closest equivalent to Q3CanvasSpline in Graphics View
+ is called QGraphicsPathItem. This item can be used to
+ describe any type of path supported by QPainter.
+
+ Q3CanvasSpline takes its control points as a Q3PointArray, but
+ QPainterPath operates on a sequence of calls to
+ QPainterPath::moveTo() and QPainterPath::cubicTo(). Here is how
+ you can convert a bezier curve Q3PointArray to a QPainterPath:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 8
+
+ Note: QGraphicsPathItem uses QAbstractGraphicsShapeItem::pen() for
+ outlines, whereas Q3CanvasSpline did not use
+ Q3CanvasPolygonalItem::pen().
+
+ \table
+ \header \o Q3CanvasSpline \o QGraphicsPathItem
+
+ \row \o Q3CanvasSpline::closed() \o No equivalent. You can call
+ QPainterPath::closeSubPath() to close a subpath explicitly.
+
+ \endtable
+
+ \section2 Q3CanvasRectangle
+
+ The closest equivalent to Q3CanvasRectangle in Graphics
+ View is called QGraphicsRectItem.
+
+ \table
+ \header \o Q3CanvasRectangle \o QGraphicsRectItem
+
+ \row \o Q3CanvasRectangle::height() \o QGraphicsRectItem::rect()
+ and QRectF::height()
+
+ \row \o Q3CanvasRectangle::setSize() \o QGraphicsRectItem::setRect()
+
+ \row \o Q3CanvasRectangle::size() \o QGraphicsRectItem::rect() and QRectF::size()
+
+ \row \o Q3CanvasRectangle::width() \o QGraphicsRectItem::rect() and QRectF::width()
+
+ \row \o Q3CanvasRectangle::chunks() \o No equivalent.
+
+ \endtable
+
+ \section2 Q3CanvasSprite
+
+ Q3CanvasSprite is the item class that differs the most from its
+ Q3Canvas predecessor. The closest resemblance of Q3CanvasSprite in
+ Graphics View is QGraphicsPixmapItem.
+
+ Q3CanvasSprite supports animated pixmaps; QGraphicsPixmapItem,
+ however, is a simple single-frame pixmap item. If all you need is
+ a pixmap item, porting is straight-forward. If you do need the
+ animation support, extra work is required; there is no direct
+ porting approach.
+
+ For the \l{Ported Asteroids Example}, a subclass of
+ QGraphicsPixmapItem is used to replace Q3CanvasSprite, storing a
+ list of pixmaps and a frame counter. The animation is advanced in
+ QGraphicsItem::advance().
+
+ \section3 Q3CanvasPixmap, Q3CanvasPixmapArray
+
+ These classes have been removed from the API. You can use
+ QPixmap instead of Q3CanvasPixmap, and QList instead of
+ Q3CanvasPixmapArray.
+
+ Q3CanvasPixmapArray included convenience for loading a
+ sequence of pixmaps or masks using a path with a wildcard (see
+ Q3CanvasPixmapArray::readPixmaps() and
+ Q3CanvasPixmapArray::readCollisionMasks()). To achieve similar
+ functionality using Graphics View, you can load the images by
+ using QDir:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 9
+
+ \section2 Q3CanvasText
+
+ Q3CanvasText has been split into two classes in Graphics View:
+ QGraphicsSimpleTextItem and QGraphicsTextItem. For porting,
+ QGraphicsSimpleTextItem should be adequate. QGraphicsTextItem
+ provides advanced document structuring features similar to that of
+ QTextEdit, and it also allows interaction (e.g., editing and
+ selection).
+
+ \table
+ \header \o Q3CanvasText \o QGraphicsSimpleTextItem
+
+ \row \o Q3CanvasText::color() \o QGraphicsSimpleTextItem::pen().
+
+ \row \o Q3CanvasText::setColor() \o QGraphicsSimpleTextItem::setPen().
+
+ \row \o Q3CanvasText::textFlags() \o Use QGraphicsTextItem instead.
+
+ \endtable
+
+
+ \section2 Q3CanvasItemList
+
+ Use QList instead.
+
+ \section1 Other Resources
+
+ The \l{Porting to Qt 4.2's Graphics View} article in Qt Quarterly 21 covered the
+ process of porting the Qt 3 canvas example to Qt 4.
+ The result of this is the \l{Ported Canvas Example}{Ported Canvas} example.
+*/
diff --git a/doc/src/porting4-designer.qdoc b/doc/src/porting4-designer.qdoc
new file mode 100644
index 0000000..9ae3c52
--- /dev/null
+++ b/doc/src/porting4-designer.qdoc
@@ -0,0 +1,349 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page porting4-designer.html
+ \title Porting .ui Files to Qt 4
+ \contentspage {Porting Guides}{Contents}
+ \previouspage Porting to Qt 4 - Drag and Drop
+ \nextpage Porting to Graphics View
+ \ingroup porting
+ \brief Information about changes to the .ui file format in Qt 4.
+
+ Qt Designer has changed significantly in the Qt 4 release. We
+ have moved away from viewing Qt Designer as an IDE and
+ concentrated on creating a robust form builder which can be
+ extended and embedded in existing IDEs. Our efforts are ongoing
+ and include the \l{Visual Studio Integration},
+ as well as integrating Designer with KDevelop and possibly other
+ IDEs.
+
+ The most important changes in Qt Designer 4 which affect porting
+ for \c .ui files are summarized below:
+
+ \list
+ \o \bold{Removed project manager.}
+ Qt Designer now only reads and edits \c .ui
+ files. It has no notion of a project (\c .pro file).
+
+ \o \bold{Removed code editor.}
+ Qt Designer can no longer be used to edit source files.
+
+ \o \bold{Changed format of \c .ui files.}
+ Qt Designer 4 cannot read files created by Qt Designer 3 and
+ vice versa. However, we provide the tool \c uic3 to generate Qt
+ 4 code out of Qt 3 \c .ui files, and to convert old \c .ui files
+ into a format readable by Qt Designer 4.
+
+ \o \bold{Changed structure of the code generated by \c uic.}
+ The \c myform.ui file containing the form \c MyForm is now
+ converted into a single header file \c ui_myform.h, which
+ contains the declaration and inline definition of a POD class
+ \c Ui::MyForm.
+
+ \o \bold{New resource file system.} Icon data is no longer
+ stored in the \c .ui file. Instead, icons are put into resource
+ files (\c .qrc).
+ \endlist
+
+ The rest of this document explains how to deal with the main
+ differences between Qt Designer 3 and Qt Designer 4:
+
+ \tableofcontents
+
+ See \l{Porting to Qt 4} and \l{qt3to4 - The Qt 3 to 4 Porting
+ Tool} for more information about porting from Qt 3 to Qt 4. See
+ also the \l{Qt Designer Manual}.
+
+ \section1 uic Output
+
+ In Qt 3, \c uic generated a header file and an implementation for
+ a class, which inherited from one of Qt's widgets. To use the
+ form, the programmer included the generated sources into the
+ application and created an instance of the class.
+
+ In Qt 4, \c uic creates a header file containing a POD class. The
+ name of this class is the object name of the main container,
+ qualified with the \c Ui namespace (e.g., \c Ui::MyForm). The
+ class is implemented using inline functions, removing the need of
+ a separate \c .cpp file. Just as in Qt 3, this class contains
+ pointers to all the widgets inside the form as public members. In
+ addition, the generated class provides the public method \c
+ setupUi().
+
+ The class generated by \c uic is not a QWidget; in fact, it's not
+ even a QObject. Instead, it is a class which knows how to
+ populate an instance of a main container with the contents of the
+ form. The programmer creates the main container himself, then
+ passes it to \c setupUi().
+
+ For example, here's the \c uic output for a simple \c
+ helloworld.ui form (some details were removed for simplicity):
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 0
+
+ In this case, the main container was specified to be a QWidget
+ (or any subclass of QWidget). Had we started with a QMainWindow
+ template in Qt Designer, \c setupUi()'s parameter would be of
+ type QMainWindow.
+
+ There are two ways to create an instance of our form. One
+ approach is to create an instance of the \c Ui::HelloWorld class,
+ an instance of the main container (a plain QWidget), and call \c
+ setupUi():
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 1
+
+ The second approach is to inherit from both the \c Ui::HelloWorld
+ class and the main container, and to call \c setupUi() in the
+ constructor of the subclass. In that case, QWidget (or one of
+ its subclasses, e.g. QDialog) must appear first in the base class
+ list so that \l{moc} picks it up correctly. For example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 2
+
+ This second method is useful when porting Qt 3 forms to Qt 4. \c
+ HelloWorldWidget is a class whose instance is the actual form
+ and which contains public pointers to all the widgets in it. It
+ therefore has an interface identical to that of a class generated
+ by \c uic in Qt 3.
+
+ Creating POD classes from \c .ui files is more flexible and
+ generic than the old approach of creating widgets. Qt Designer
+ doesn't need to know anything about the main container apart from
+ the base widget class it inherits. Indeed, \c Ui::HelloWorld can
+ be used to populate any container that inherits QWidget.
+ Conversely, all non-GUI aspects of the main container may be
+ implemented by the programmer in the application's sources
+ without reference to the form.
+
+ \section1 Working with uic3
+
+ Qt 4 comes with the tool \c uic3 for working with old \c .ui
+ files. It can be used in two ways:
+
+ \list 1
+ \o To generate headers and source code for a widget to implement any
+ custom signals and slots added using Qt Designer 3.
+ \o To generate a new \c .ui file that can be used with Qt Designer 4.
+ \endlist
+
+ You can use both these methods in combination to obtain \c{.ui}, header
+ and source files that you can use as a starting point when porting
+ your user interface to Qt 4.
+
+ The first method generates a Qt 3 style header and implementation
+ which uses Qt 4 widgets (this includes the Qt 3 compatibility classes
+ present in the Qt3Support library). This process should be familiar to
+ anyone used to working with Qt Designer 3:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 3
+
+ The resulting files \c myform.h and \c myform.cpp implement the
+ form in Qt 4 using a QWidget that will include custom signals,
+ slots and connections specified in the \c .ui file. However,
+ see below for the \l{#Limitations of uic3}{limitations} of this
+ method.
+
+ The second method is to use \c uic3 to convert a Qt Designer 3 \c .ui
+ file to the Qt Designer 4 format:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 4
+
+ The resulting file \c myform4.ui can be edited in Qt Designer 4. The
+ header file for the form is generated by Qt 4's \c uic. See the
+ \l{Using a Designer .ui File in Your Application} chapter of the
+ \l{Qt Designer Manual} for information about the preferred ways to
+ use forms created with Qt Designer 4.
+
+ \c uic3 tries very hard to map Qt 3 classes and their properties to
+ Qt 4. However, the behavior of some classes changed significantly
+ in Qt 4. To keep the form working, some Qt 3 classes are mapped
+ to classes in the Qt3Support library. Table 1 shows a list of
+ classes this applies to.
+
+ \table
+ \header \o Qt 3 class \o Qt 4 class
+ \row \o \c QButtonGroup \o Q3ButtonGroup
+ \row \o \c QDateEdit \o Q3DateEdit
+ \row \o \c QDateTimeEdit \o Q3DateTimeEdit
+ \row \o \c QGroupBox \o Q3GroupBox
+ \row \o \c QListBox \o Q3ListBox
+ \row \o \c QListView \o Q3ListView
+ \row \o \c QMainWindow \o Q3MainWindow
+ \row \o \c QTextEdit \o Q3TextEdit
+ \row \o \c QTextView \o Q3TextView
+ \row \o \c QTimeEdit \o Q3TimeEdit
+ \row \o \c QWidgetStack \o Q3WidgetStack
+ \row \o \c QWizard \o Q3Wizard
+ \endtable
+
+ \section1 Limitations of uic3
+
+ Converting Qt 3 \c .ui files to Qt 4 has some limitations. The
+ most noticeable limitation is the fact that since \c uic no
+ longer generates a QObject, it's not possible to define custom
+ signals or slots for the form. Instead, the programmer must
+ define these signals and slots in the main container and connect
+ them to the widgets in the form after calling \c setupUi(). For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 5
+
+ A quick and dirty way to port forms containing custom signals and
+ slots is to generate the code using \c uic3, rather than \c uic. Since
+ \c uic3 does generate a QWidget, it will populate it with custom
+ signals, slots and connections specified in the \c .ui file.
+ However, \c uic3 can only generate code from Qt 3 \c .ui files, which
+ implies that the \c .ui files never get translated and need to be
+ edited using Qt Designer 3.
+
+ Note also that it is possible to create implicit connections
+ between the widgets in a form and the main container. After \c
+ setupUi() populates the main container with child widgets it
+ scans the main container's list of slots for names with the form
+ \tt{on_\e{objectName}_\e{signalName}().}
+
+ If the form contains a widget whose object name is
+ \tt{\e{objectName}}, and if that widget has a signal called
+ \tt{\e{signalName}}, then this signal will be connected to the
+ main container's slot. For example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 6
+
+ Because of the naming convention, \c setupUi() automatically
+ connects \c pushButton's \c clicked() signal to \c
+ HelloWorldWidget's \c on_pushButton_clicked() slot.
+
+ \section1 Icons
+
+ In Qt 3, the binary data for the icons used by a form was stored
+ in the \c .ui file. In Qt 4 icons and any other external files
+ can be compiled into the application by listing them in a \l{The
+ Qt Resource System}{resource file} (\c .qrc). This file is
+ translated into a C++ source file using Qt's resource compiler
+ (\c rcc). The data in the files is then available to any Qt class
+ which takes a file name argument.
+
+ Imagine that we have two icons, \c yes.png and \c no.png. We
+ create a resource file called \c icons.qrc with the following
+ contents:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 7
+
+ Next, we add the resource file to our \c .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 8
+
+ When \c qmake is run, it will create the appropriate Makefile
+ rules to call \c rcc on the resource file, and compile and link
+ the result into the application. The icons may be accessed as
+ follows:
+
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 9
+
+ In each case, the leading colon tells Qt to look for the file in
+ the virtual file tree defined by the set of resource files
+ compiled into the application instead of the file system.
+
+ In the \c .qrc file, the \c qresource tag's \c prefix attribute
+ is used to arrange the files into categories and set a virtual
+ path where the files will be accessed.
+
+ Caveat: If the resource file was not linked directly into the
+ application, but instead into a dynamic or static library that
+ was later linked with the application, its virtual file tree will
+ not be available to QFile and friends until the Q_INIT_RESOURCE()
+ macro is called. This macro takes one argument, which is the name
+ of the \c .qrc file, without the path or the file extension. A
+ convenient place to initialize resources is at the top of the
+ application's \c main() function.
+
+ In Qt Designer 4, we can associate any number of resource files
+ with a form using the resource editor tool. The widgets in the
+ form can access all icons specified in its associated resource
+ files.
+
+ In short, porting of icons from a Qt 3 to a Qt 4 form involves
+ the following steps:
+
+ \list 1
+ \o Use \c{uic3 -convert} to obtain a \c .ui file understood by
+ Qt Designer 4.
+
+ \o Create a \c .qrc file with a list of all the icon files.
+
+ \o Add the resource file to the \c .pro file.
+
+ \o Open the form in Qt Designer 4 and add the resource file to the
+ form's resource editor.
+
+ \o Set the icon properties for the appropriate widgets.
+ \endlist
+
+ \section1 Custom Widgets
+
+ Qt Designer 3 supported defining custom widgets by specifying
+ their name, header file and methods. In Qt Designer 4, a custom
+ widget is always created by "promoting" an existing Qt widget to
+ a custom class. Qt Designer 4 assumes that the custom widget will
+ inherit from the widget that has been promoted. In the form
+ editor, the custom widget will retain the looks, behavior,
+ properties, signals and slots of the base widget. It is not
+ currently possible to tell Qt Designer 4 that the custom widget
+ will have additional signals or slots.
+
+ \c{uic3 -convert} handles the conversion of custom widgets to the
+ new \c .ui format, however all custom signals and slots are lost.
+ Furthermore, since Qt Designer 3 never knew the base widget class
+ of a custom widget, it is taken to be QWidget. This is often
+ sufficient. If not, the custom widgets have to be inserted
+ manually into the form.
+
+ Custom widget plugins, which contain custom widgets to be used in
+ Qt Designer, must themselves be ported before they can be used in
+ forms ported with \c{uic3}.
+ The \l{Porting to Qt 4} document contains information about general
+ porting issues that may apply to the custom widget code itself, and
+ the \l{Creating Custom Widgets for Qt Designer} chapter of the
+ \l{Qt Designer Manual} describes how the ported widget should be
+ built in order to work in Qt Designer 4.
+*/
diff --git a/doc/src/porting4-modifiedvirtual.qdocinc b/doc/src/porting4-modifiedvirtual.qdocinc
new file mode 100644
index 0000000..1164238
--- /dev/null
+++ b/doc/src/porting4-modifiedvirtual.qdocinc
@@ -0,0 +1,63 @@
+\row \o int QAccessibleInterface::navigate(NavDirection, int) const \o int QAccessibleInterface::navigate(RelationFlag, int, QAccessibleInterface **) const
+\row \o bool QApplication::winEventFilter(MSG *) \o bool QApplication::winEventFilter(MSG *, long *)
+\row \o Function: Offset QIODevice::at() const \o Function: Q_LONGLONG QIODevice::pos() const
+\row \o bool QIODevice::at(Offset) \o bool QIODevice::seek(Q_LONGLONG)
+\row \o bool QIODevice::open(int) \o bool QIODevice::open(OpenMode)
+\row \o Q_LONG QIODevice::readBlock(char *, Q_ULONG) \o Q_LONGLONG QIODevice::readData(char *, Q_LONGLONG)
+\row \o Q_LONG QIODevice::writeBlock(const char *, Q_ULONG) \o Q_LONGLONG QIODevice::writeData(const char *, Q_LONGLONG)
+\row \o const char * QImageFormatType::formatName() const \o QByteArray QImageFormatType::formatName() const
+\row \o QPopupMenu * QLineEdit::createPopupMenu() \o QMenu * QLineEdit::createPopupMenu()
+\row \o bool QMacMime::canConvert(const char *, int) \o bool QMacMime::canConvert(const QString &, int)
+\row \o QValueList<QByteArray> QMacMime::convertFromMime(QByteArray, const char *, int) \o QList<QByteArray> QMacMime::convertFromMime(QByteArray, const QString &, int)
+\row \o QByteArray QMacMime::convertToMime(QValueList<QByteArray> data, const char *, int) \o QByteArray QMacMime::convertToMime(QList<QByteArray> data, const QString &, int)
+\row \o const char * QMacMime::convertorName() \o QString QMacMime::convertorName()
+\row \o int QMacMime::flavorFor(const char *) \o int QMacMime::flavorFor(const QString &)
+\row \o const char * QMacMime::mimeFor(int) \o QString QMacMime::mimeFor(int)
+\row \o QMetaObject * QObject::metaObject() const \o const QMetaObject * QObject::metaObject() const
+\row \o bool QScreen::onCard(unsigned char *) const \o bool QScreen::onCard(const unsigned char *) const
+\row \o bool QScreen::onCard(unsigned char *, ulong &) const \o bool QScreen::onCard(const unsigned char *, ulong &) const
+\row \o int QSpinBox::mapTextToValue(bool *) \o int QSpinBox::mapTextToValue(QString *, QValidator::State *) const
+\row \o QString QSpinBox::mapValueToText(int) \o QString QSpinBox::mapValueToText(int) const
+\row \o bool QSqlDriver::open(const QString &, const QString &, const QString &, const QString &, int) \o bool QSqlDriver::open(const QString &, const QString &, const QString &, const QString &, int, const QString &)
+\row \o QStringList QSqlDriver::tables(const QString &) const \o QStringList QSqlDriver::tables(QSql::TableType) const
+\row \o bool QSqlQuery::prev() \o bool QSqlQuery::previous()
+\row \o bool QSqlResult::fetchPrev() \o bool QSqlResult::fetchPrevious()
+\row \o void QStyle::drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &, const QColorGroup &, SFlags, SCFlags, SCFlags, const QStyleOption &) const \o void QStyle::drawComplexControl(ComplexControl, const QStyleOptionComplex *, QPainter *, const QWidget *) const
+\row \o void QStyle::drawComplexControlMask(ComplexControl, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const \o void QStyle::drawComplexControlMask(ComplexControl, const QStyleOptionComplex *, QPainter *, const QWidget *) const
+\row \o void QStyle::drawControl(ControlElement, QPainter *, const QWidget *, const QRect &, const QColorGroup &, SFlags, const QStyleOption &) const \o void QStyle::drawControl(ControlElement, const QStyleOption *, QPainter *, const QWidget *) const
+\row \o void QStyle::drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const \o void QStyle::drawControlMask(ControlElement, const QStyleOption *, QPainter *, const QWidget *) const
+\row \o void QStyle::drawItem(QPainter *, const QRect &, int, const QColorGroup &, bool, const QPixmap *, const QString &, int, const QColor *) const \o void QStyle::drawItem(QPainter *, const QRect &, int, const QPalette &, bool, const QString &, int, const QColor *) const
+\row \o void QStyle::drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &, SFlags, const QStyleOption &) const \o void QStyle::drawPrimitive(PrimitiveElement, const QStyleOption *, QPainter *, const QWidget *) const
+\row \o QRect QStyle::itemRect(QPainter *, const QRect &, int, bool, const QPixmap *, const QString &, int) const \o QRect QStyle::itemTextRect(const QFontMetrics &, const QRect &, int, bool, const QString &, int) const
+\row \o int QStyle::pixelMetric(PixelMetric, const QWidget *) const \o int QStyle::pixelMetric(PixelMetric, const QStyleOption *, const QWidget *) const
+\row \o SubControl QStyle::querySubControl(ComplexControl, const QWidget *, const QPoint &, const QStyleOption &) const \o SubControl QStyle::hitTestComplexControl(ComplexControl, const QStyleOptionComplex *, const QPoint &, const QWidget *) const
+\row \o QRect QStyle::querySubControlMetrics(ComplexControl, const QWidget *, SubControl, const QStyleOption &) const \o QRect QStyle::subControlRect(ComplexControl, const QStyleOptionComplex *, SubControl, const QWidget *) const
+\row \o QSize QStyle::sizeFromContents(ContentsType, const QWidget *, const QSize &, const QStyleOption &) const \o QSize QStyle::sizeFromContents(ContentsType, const QStyleOption *, const QSize &, const QFontMetrics &, const QWidget *) const
+\row \o int QStyle::styleHint(StyleHint, const QWidget *, const QStyleOption &, QStyleHintReturn *) const \o int QStyle::styleHint(StyleHint, const QStyleOption *, const QWidget *, QStyleHintReturn *) const
+\row \o QPixmap QStyle::stylePixmap(StylePixmap, const QWidget *, const QStyleOption &) const \o QPixmap QStyle::standardPixmap(StandardPixmap, const QStyleOption *, const QWidget *) const
+\row \o QRect QStyle::subRect(SubRect, const QWidget *) const \o QRect QStyle::subRect(SubRect, const QStyleOption *, const QFontMetrics &, const QWidget *) const
+\row \o void QStyle::unPolish(QApplication *) \o void QStyle::unpolish(QApplication *)
+\row \o void QStyle::unPolish(QWidget *) \o void QStyle::unpolish(QWidget *)
+\row \o QCString QTextCodec::fromUnicode(const QString &, int &) const \o QByteArray QTextCodec::fromUnicode(const QString &, int &) const
+\row \o QValueList<int> QTextCodecPlugin::mibEnums() const \o QList<int> QTextCodecPlugin::mibEnums() const
+\row \o void QTextDrag::setSubtype(const QCString &) \o void QTextDrag::setSubtype(const QString &)
+\row \o QCString QTextEncoder::fromUnicode(const QString &, int &) \o QByteArray QTextEncoder::fromUnicode(const QString &, int &)
+\row \o void QUriDrag::setUris(QStrList) \o void QUriDrag::setUris(const QList<QByteArray> & list)
+\row \o void QUrlInfo::setSize(uint) \o void QUrlInfo::setSize(Q_LONGLONG)
+\row \o bool QWindowsMime::canConvert(const char *, int) \o bool QWindowsMime::canConvert(const QString &, int)
+\row \o int QWindowsMime::cfFor(const char *) \o int QWindowsMime::cfFor(const QString &)
+\row \o QByteArray QWindowsMime::convertFromMime(QByteArray, const char *, int) \o QByteArray QWindowsMime::convertFromMime(const QByteArray &, const QString &, int)
+\row \o QByteArray QWindowsMime::convertToMime(QByteArray, const char *, int) \o QByteArray QWindowsMime::convertToMime(const QByteArray &, const QString &, int)
+\row \o const char * QWindowsMime::convertorName() \o QString QWindowsMime::convertorName()
+\row \o void QWSMouseHandler::calibrate(QWSPointerCalibrationData *) \o void QWSMouseHandler::calibrate(const QWSPointerCalibrationData *)
+\row \o bool QWidget::macEvent(MSG *) \o bool QWidget::macEvent(EventHandlerCallRef, EventRef)
+\row \o bool QWidget::winEvent(MSG *) \o bool QWidget::winEvent(MSG *, long *)
+\row \o QString QXmlContentHandler::errorString() \o QString QXmlContentHandler::errorString() const
+\row \o QString QXmlDTDHandler::errorString() \o QString QXmlDTDHandler::errorString() const
+\row \o QString QXmlDeclHandler::errorString() \o QString QXmlDeclHandler::errorString() const
+\row \o QString QXmlEntityResolver::errorString() \o QString QXmlEntityResolver::errorString() const
+\row \o QString QXmlErrorHandler::errorString() \o QString QXmlErrorHandler::errorString() const
+\row \o QString QXmlInputSource::data() \o QString QXmlInputSource::data() const
+\row \o QString QXmlLexicalHandler::errorString() \o QString QXmlLexicalHandler::errorString() const
+\row \o int QXmlLocator::columnNumber() \o int QXmlLocator::columnNumber() const
+\row \o int QXmlLocator::lineNumber() \o int QXmlLocator::lineNumber() const
diff --git a/doc/src/porting4-obsoletedmechanism.qdocinc b/doc/src/porting4-obsoletedmechanism.qdocinc
new file mode 100644
index 0000000..1594570
--- /dev/null
+++ b/doc/src/porting4-obsoletedmechanism.qdocinc
@@ -0,0 +1,3 @@
+If you use this mechanism in your application, please submit a
+report to the \l{Task Tracker} on the Trolltech
+website and we will try to find a satisfactory substitute.
diff --git a/doc/src/porting4-overview.qdoc b/doc/src/porting4-overview.qdoc
new file mode 100644
index 0000000..b0146a6
--- /dev/null
+++ b/doc/src/porting4-overview.qdoc
@@ -0,0 +1,367 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page porting4-overview.html
+ \title Moving from Qt 3 to Qt 4
+ \ingroup porting
+ \brief Porting advice for authors of new and existing Qt 3 applications.
+
+ This document describes which parts of Qt should be used when
+ writing an application with Qt 3, so that it can be upgraded to
+ use Qt 4 later with a minimum of effort. However, the advice may
+ also be useful to developers who are porting existing applications
+ from Qt 3 to Qt 4.
+
+ For a detailed overview
+ of the porting process for existing Qt 3 applications, see the
+ \l{Porting to Qt 4} document.
+
+ \tableofcontents
+
+ Since Qt 4 provides important new functionality at the cost of
+ some compatibility with Qt 3, it is useful for developers of
+ Qt 3-based applications to learn how to take advantage of
+ Qt 3's API now while preparing for future changes that will be
+ needed when upgrading to Qt 4.
+
+ Certain advanced Qt 3 features were moved to the Qt 3 support
+ library (\l{Qt3Support}) in Qt 4.0, and have been gradually
+ replaced in subsequent releases of Qt 4.
+
+ Making Qt 3 applications as portable to Qt 4 as possible
+ enables a smooth transition between versions of Qt in the
+ long term, and allows for a stable development process
+ throughout.
+
+ \section1 Qt 3 Features to Avoid
+
+ Although we are proud of the level of stability we have achieved
+ with Qt, it is important to realise that, for Qt 4 to be a
+ substantial improvement over Qt 3, certain features have
+ been revised to make the framework more maintainable for us
+ and more usable for developers. It is therefore useful to
+ know which features of Qt 3 should be avoided to help save
+ time during a later porting effort to Qt 4. Note that it is
+ still possible to use many of the following classes and
+ features through the use of the \l{Qt3Support} module.
+
+ \section2 Painting Outside Paint Events
+
+ In Qt 3, under certain circumstances, it was possible to use
+ QPainter to draw on a given custom widget outside its
+ \l{QWidget::}{paintEvent()} reimplementation. In Qt 4, in most
+ situations, painting must occur within a widget's paint event
+ handler.
+
+ On X11, it is possible to set the \l{Qt::WA_PaintOutsidePaintEvent}
+ attribute on widgets to keep existing code, but we recommend
+ restricting the use of painting code to within paint event handlers
+ where possible.
+
+ More information about this change can be found in the
+ \l{Porting to Qt 4#Painting and Redrawing Widgets}{Painting and Redrawing Widgets}
+ section of the \l{Porting to Qt 4} document.
+
+ \section2 Qt Designer
+
+ The version of Qt Designer supplied with Qt 3 provided
+ extensive code editing and project management features
+ (control over \c{.ui.h} and \c{.pro} files), and encouraged
+ users to design main window applications from within the
+ Qt Designer environment.
+
+ The version of Qt Designer supplied with Qt 4 is intended
+ to be integrated with other software development tools (such
+ as integrated development environments), and does not
+ support these project-level features.
+
+ We recommend using one of the
+ \l{Using a Designer .ui File in Your Application}{form subclassing approaches}
+ with forms created using Qt Designer. This avoids the need
+ to use \c{.ui.h} files and special purpose code editors.
+
+ Existing Qt 3 forms created using Qt Designer can be gradually
+ ported to Qt 4 by following the advice in the
+ \l{Porting .ui Files to Qt 4} guide. However, some extra effort
+ will be required to move application logic from \c{.ui.h} files
+ into the main body of a Qt 4 application.
+
+ \section2 Menu Items (QMenuItem)
+
+ The old-style construction of menus by creating individual
+ menu items has been superseded in Qt 4 by the use of
+ generic actions which can be used in menus, toolbars, and
+ as keyboard shortcuts.
+
+ Qt 3 also supports this action-based approach, so, by using
+ QAction throughout your application, less work will be
+ required to adapt your application to Qt 4.
+
+ \section2 Pointer-Based Classes (QPtr*)
+
+ Qt 3 provides a group of pointer-based classes (\c QPtrList,
+ \c QPtrDict, \c QPtrVector, etc.) that help manage collections
+ of pointers to objects (usually QObject subclasses) in an
+ application. In addition, the value-based collection classes
+ (\c QValueList, \c QValueDict, \c QValueVector, etc.) provide
+ a way to store standard value types which cannot be easily stored
+ in pointer-based collections.
+
+ Qt 4 introduces a single set of collection classes which
+ does not require developers to pay as much attention to
+ memory allocation and object ownership issues. As a result,
+ Qt 3's pointer-based classes have no direct equivalent
+ classes in Qt 4.
+
+ To ease migration, use Qt 3's value-based classes to store
+ most objects, including pointers; for example, use
+ \c QValueVector<QWidget *> rather than
+ \c QPtrVector<QWidget *>. These can be replaced by
+ Qt 4's QVector, QLinkedList, and QList later.
+
+ \section2 Other Collection Classes (QStrList, Q*Dict)
+
+ Some collection classes in Qt 3 have been deprecated in
+ favor of easier to use, higher level alternatives. These
+ include the dictionary classes (\c QAsciiDict, \c QDict,
+ \c QIntDict, \c QPtrDict) and \c QStrList.
+
+ \c QStrList can usually replaced by the higher level QStringList
+ class in Qt 3; this is also available in Qt 4. It is
+ recommended that you use the QMap class instead of the \c QDict
+ classes. In Qt 4, QMap is also complemented by the QHash
+ class.
+
+ \section2 Memory Arrays (QMemArray)
+
+ In Qt 3, the \c QMemArray class is used as a simple array
+ container for simple data types. This class is deprecated in
+ Qt 4 in favor of the QVector and QVarLengthVector classes
+ which provide more powerful and consistent array objects.
+
+ Qt 3's closest equivalent class to Qt 4's QVector is the
+ \c QValueVector class. For many purposes, this can be used
+ instead of \c QMemArray.
+
+ \section2 URL Operations (QUrlOperator)
+
+ The URL operator in Qt 3 provides an abstract way to
+ handle files via HTTP, FTP, and on the local file system.
+ However, Qt 4 only provides this functionality through the
+ use of the Q3UrlOperator.
+
+ From Qt 4.4, the Network Access API provides a subset of the features
+ provided by \c QUrlOperator that are mostly intended for use with
+ applications that use the HTTP and FTP protocols. See the
+ QNetworkRequest, QNetworkReply, and QNetworkAccessManager documentation
+ for further details.
+
+ It is also possible to perform operations on remote files
+ through the QHttp and QFtp classes, and on local files with
+ the QFile class.
+
+ \section2 SQL Cursors (QSqlCursor)
+
+ In Qt 3, one of the preferred methods of working with SQL
+ is to use a cursor to manipulate the contents of a database.
+ In Qt 4, the preferred method of working with SQL is to use
+ the model/view architecture (QSqlQueryModel and QSqlTableModel)
+ and, as a result, the cursor interface is only supplied in the
+ Q3SqlCursor class.
+
+ The easiest way to ensure continuity between Qt 3 and Qt 4
+ is to use QSqlQuery rather than \c QSqlCursor,
+ and migrate to QSqlQueryModel later.
+
+ \section2 Domain Name Service (QDns)
+
+ The QDns class in Qt 4 provides a much simpler interface
+ than the QDns class in Qt 3, and is mainly used for host
+ name resolution.
+ As a result, many of the more complex features of Qt 3's
+ QDns class are only available through Qt 4's Q3Dns
+ compatibility class.
+
+ To resolve host names with Qt 3, it is recommended that you
+ use the higher level interface of QSocket rather than QDns.
+ The equivalent functionality is available in Qt 4 in the
+ QAbstractSocket and QHostInfo classes.
+
+ \section2 Wizard Dialogs (QWizard)
+
+ Qt 3 provides support for "wizard" dialogs in the form of
+ the \c QWizard class. Prior to Qt 4.3, this class was made
+ available as Q3Wizard, and provides the same interface for
+ creating relatively complex wizards.
+
+ In Qt 4.3 and later, a revised QWizard class can be used to
+ create this kind of dialog, but existing Qt 3 wizard
+ implementations may need to be redesigned to work with the
+ new QWizard API.
+
+ \section2 Abstract Grid Views (QGridView)
+
+ Before the introduction of the Qt 3 \c QTable class,
+ \c QGridView was the recommended way to create tables of
+ custom items.
+ With the introduction of \c QTable, the \c QGridView class was
+ effectively obsoleted, and the \c QTable class should now be
+ used to display tabular information in your Qt 3 application.
+ This approach allows you to use QTableWidget as a replacement
+ when later porting your application to Qt 4.
+
+ \section2 Specialized Scrolling Views
+
+ In Qt 3, the \c QScrollView class provides a viewport that can
+ be used to display part of a larger widget, and will
+ optionally provide scroll bars for navigation purposes.
+ In Qt 4, this functionality is superseded by classes such as
+ QScrollArea, which provides a more intuitive interface for
+ developers to use.
+ \c QScrollView is available in Qt 4 as the Q3ScrollView class.
+
+ In Qt 3, it is recommended that \c QScrollView should be
+ used with child widgets rather than subclassed. However, it
+ should be noted that this approach may not be appropriate if
+ you need to use extremely large scrolling areas in your
+ application, since Qt 3 widgets cannot be wider or taller
+ than 32767 pixels.
+
+ \section1 Significantly Changed Features
+
+ Some Qt 3 features have changed significantly for Qt 4.
+ and the recommended way of using them has therefore changed
+ significantly, too. This is most notably true for the drag
+ and drop API.
+
+ Additionally, some of the more specialized features in Qt 3 are
+ often used to help customize widgets and add extra polish to an
+ application.
+ Although these improvements make applications more presentable to
+ users, many of them are unnecessary with Qt 4, and may create
+ additional porting work.
+
+ \section2 Drag and Drop
+
+ Qt 4 introduces a simpler and more intuitive implementation
+ of drag and drop between widgets, and with other applications.
+ As a result, there is no simple approach that can be used to
+ make drag and drop in a Qt 3 application easier to port to
+ Qt 4.
+
+ \section2 Extensive Customization of Item Views
+
+ Each of the classes that are used to display list, tree,
+ and table items in Qt 3 can be subclassed for the purposes
+ of customizing their appearance. The item view framework
+ in Qt 4 is implemented according to a different paradigm
+ (model/view) which does not allow items to be customized
+ using this method.
+
+ Although Qt 4 provides compatibility classes (Q3ListBoxItem,
+ Q3ListViewItem, and Q3TableItem) that can be used in the same
+ way as their Qt 3 counterparts, these cannot be used within
+ the standard model/view framework. It is recommended that,
+ to minimize porting effort, extensive customization of item
+ classes should be avoided in Qt 3, if at all possible.
+
+ \section2 Double Buffering
+
+ Qt 3 applications often use double buffering for reducing
+ flicker when painting custom widgets. This approach is
+ unnecessary with Qt 4 because double buffering is
+ automatically performed by the paint engine.
+
+ It still makes sense to use double buffering in
+ Qt 4 in certain contexts. For example, in
+ Chapter 5 of \l{GUI Programming with Qt 3}, double buffering
+ was presented as a speed optimization and not just as a means
+ of reducing flicker.
+
+ \section2 Data-Aware Forms
+
+ The \c QDataTable, \c QDataBrowser, and \c QDataView classes
+ in Qt 3 allow integration between widgets and SQL-based
+ databases.
+
+ In Qt 4.1 and earlier, the preferred way to create a data-aware
+ widget is to connect an generic item view (such as a table view)
+ to a SQL model. In Qt 4.2 and later, the QDataWidgetMapper class
+ can be used to map data to widgets in a form-based user interface.
+
+ New applications written with Qt 3 should use QSqlQuery in
+ preference to an approach based on the old-style data-aware
+ widgets.
+ This offers a choice of porting strategies when later migrating
+ the application to Qt 4: You can either continue to use
+ QSqlQuery or take the opportunity to use the model/view
+ classes to handle database integration.
+
+ \section2 Dock Windows and Areas
+
+ In Qt 4, the way that dock windows are constructed and used
+ in main window applications differs significantly to the
+ pattern of use provided by Qt 3. As a result, the introduction
+ of a simpler and cleaner API means that Qt 3 applications that
+ make extensive use of dock window areas will require careful
+ examination when they are ported to Qt 4.
+
+ We recommend that the QMainWindow class be used in preference
+ to the Q3MainWindow compatibility class when an existing Qt 3
+ main window application is ported to Qt 4. Therefore, we
+ recommend that specialized use of dock window areas should
+ be avoided when writing a Qt 3 application with Qt 4 in mind.
+
+ \section2 Custom Styles
+
+ The style system used to provide consistent themes for Qt's
+ standard widgets has been revised for Qt 4. As a result,
+ custom styles for Qt 3 require some porting work to be done
+ before they can be used with Qt 4. To ease the porting process,
+ we recommend that you avoid implementing custom widget styles
+ for Qt 3 applications unless it is absolutely necessary for
+ your users.
+
+ In Qt 4.2 and later, \l{Qt Style Sheets} can be used to
+ implement many common modifications to existing styles, and
+ this may be sufficient for Qt 3 applications.
+*/
diff --git a/doc/src/porting4-removedenumvalues.qdocinc b/doc/src/porting4-removedenumvalues.qdocinc
new file mode 100644
index 0000000..fe38d0e
--- /dev/null
+++ b/doc/src/porting4-removedenumvalues.qdocinc
@@ -0,0 +1,6 @@
+\row \o QButton::SingleShot
+\row \o QButton::Toggle
+\row \o QButton::Tristate
+\row \o QEvent::AccelAvailable
+\row \o QEvent::ParentFontChange
+\row \o QEvent::ParentPaletteChange
diff --git a/doc/src/porting4-removedtypes.qdocinc b/doc/src/porting4-removedtypes.qdocinc
new file mode 100644
index 0000000..9d7c519
--- /dev/null
+++ b/doc/src/porting4-removedtypes.qdocinc
@@ -0,0 +1 @@
+\row \o QAbstractButton::ToggleType
diff --git a/doc/src/porting4-removedvariantfunctions.qdocinc b/doc/src/porting4-removedvariantfunctions.qdocinc
new file mode 100644
index 0000000..dfaa8f3
--- /dev/null
+++ b/doc/src/porting4-removedvariantfunctions.qdocinc
@@ -0,0 +1,16 @@
+\row \o toBitmap () \o QVariant::value()
+\row \o toBrush () \o QVariant::value()
+\row \o toColorGroup () \o Use QVariant::value() with QPalette instead.
+\row \o toColor () \o QVariant::value()
+\row \o toCString () \o QVariant::toByteArray()
+\row \o toCursor () \o QVariant::value()
+\row \o toFont () \o QVariant::value()
+\row \o toIconSet () \o Use QVariant::value() with QIcon instead.
+\row \o toImage () \o QVariant::value()
+\row \o toKeySequence () \o QVariant::value()
+\row \o toPalette () \o QVariant::value()
+\row \o toPen () \o QVariant::value()
+\row \o toPixmap () \o QVariant::value()
+\row \o toPointArray () \o QVariant::value()
+\row \o toRegion () \o QVariant::value()
+\row \o toSizePolicy () \o QVariant::value()
diff --git a/doc/src/porting4-removedvirtual.qdocinc b/doc/src/porting4-removedvirtual.qdocinc
new file mode 100644
index 0000000..3eedad2
--- /dev/null
+++ b/doc/src/porting4-removedvirtual.qdocinc
@@ -0,0 +1,605 @@
+\row \o void QAccessibleInterface::clearSelection() \o Port to the new QAccessibleInterface API.
+\row \o int QAccessibleInterface::controlAt(int, int) const \o Port to the new QAccessibleInterface API.
+\row \o bool QAccessibleInterface::doDefaultAction(int) \o Port to the new QAccessibleInterface API.
+\row \o QMemArray<int> QAccessibleInterface::selection() const \o Port to the new QAccessibleInterface API.
+\row \o bool QAccessibleInterface::setFocus(int) \o Port to the new QAccessibleInterface API.
+\row \o bool QAccessibleInterface::setSelected(int, bool, bool) \o Port to the new QAccessibleInterface API.
+\row \o bool QAction::addTo(QWidget *) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::addedTo(QWidget *, QWidget *) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::addedTo(int, QPopupMenu *) \o Use Q3Action instead or port to the new QAction API.
+\row \o bool QAction::removeFrom(QWidget *) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setAccel(const QKeySequence &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setEnabled(bool) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setIconSet(const QIcon &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setMenuText(const QString &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setOn(bool) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setStatusTip(const QString &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setText(const QString &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setToggleAction(bool) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setToolTip(const QString &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QAction::setWhatsThis(const QString &) \o Use Q3Action instead or port to the new QAction API.
+\row \o void QButton::drawButton(QPainter *) \o Use Q3Button instead or reimplement QButton::paintEvent().
+\row \o void QButton::drawButtonLabel(QPainter *) \o Use Q3Button instead or reimplement QButton::paintEvent().
+\row \o void QButton::setAccel(const QKeySequence &) \o Setter.
+\row \o void QButton::setAutoRepeat(bool) \o Setter.
+\row \o void QButton::setDown(bool) \o Setter.
+\row \o void QButton::setPixmap(const QPixmap &) \o Setter.
+\row \o void QButton::setState(ToggleState) \o Setter.
+\row \o void QButton::setText(const QString &) \o Use the QAbstractButton::setText() setter function.
+\row \o void QButton::setToggleType(ToggleType) \o Setter.
+\row \o void QButtonGroup::moveFocus(int) \o Use the QWidget::setFocus() setter function.
+\row \o void QButtonGroup::setButton(int) \o Setter.
+\row \o void QButtonGroup::setExclusive(bool) \o Setter.
+\row \o void QButtonGroup::setRadioButtonExclusive(bool) \o Setter.
+\row \o void QComboBox::setAutoCompletion(bool) \o Setter.
+\row \o void QComboBox::setAutoResize(bool) \o Setter.
+\row \o void QComboBox::setCurrentItem(int) \o Setter.
+\row \o void QComboBox::setCurrentText(const QString &) \o Setter.
+\row \o void QComboBox::setFont(const QFont &) \o Setter.
+\row \o void QComboBox::setInsertionPolicy(Policy) \o Setter.
+\row \o void QComboBox::setLineEdit(QLineEdit *) \o Setter.
+\row \o void QComboBox::setListBox(QListBox *) \o Setter.
+\row \o void QComboBox::setMaxCount(int) \o Setter.
+\row \o void QComboBox::setPalette(const QPalette &) \o Setter.
+\row \o void QComboBox::setSizeLimit(int) \o Setter.
+\row \o void QComboBox::setValidator(const QValidator *) \o Setter.
+\row \o void QDateEdit::fix() \o Port to the new QDateTimeEdit API.
+\row \o QString QDateEdit::sectionFormattedText(int) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setAutoAdvance(bool) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setDate(const QDate &) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setDay(int) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setMaxValue(const QDate &) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setMinValue(const QDate &) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setMonth(int) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setOrder(Order) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setRange(const QDate &, const QDate &) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setSeparator(const QString &) \o Port to the new QDateTimeEdit API.
+\row \o void QDateEdit::setYear(int) \o Port to the new QDateTimeEdit API.
+\row \o void QDateTimeEdit::setAutoAdvance(bool) \o Port to the new QDateTimeEdit API.
+\row \o void QDateTimeEdit::setDateTime(const QDateTime &) \o Port to the new QDateTimeEdit API.
+\row \o void QDial::rangeChange() \o Reimplement QDial::sliderChange() instead.
+\row \o void QDial::repaintScreen(const QRect *) \o Reimplement QDial::paintEvent() instead.
+\row \o void QDial::setNotchTarget(double) \o Setter.
+\row \o void QDial::setNotchesVisible(bool) \o Setter.
+\row \o void QDial::setTracking(bool) \o Setter.
+\row \o void QDial::setValue(int) \o Use QDial::sliderChange() instead.
+\row \o void QDial::setWrapping(bool) \o Setter.
+\row \o void QDial::valueChange() \o Use QDial::sliderChange() instead.
+\row \o QString QDir::absFilePath(const QString &, bool) const \o Value type.
+\row \o QString QDir::absPath() const \o Value type.
+\row \o QString QDir::canonicalPath() const \o Value type.
+\row \o bool QDir::cd(const QString &, bool) \o Value type.
+\row \o bool QDir::cdUp() \o Value type.
+\row \o void QDir::convertToAbs() \o Value type.
+\row \o QString QDir::dirName() const \o Value type.
+\row \o QStrList QDir::encodedEntryList(int, int) const \o Value type.
+\row \o QStrList QDir::encodedEntryList(const QString &, int, int) const \o Value type.
+\row \o const QFileInfoList * QDir::entryInfoList(int, int) const \o Value type.
+\row \o const QFileInfoList * QDir::entryInfoList(const QString &, int, int) const \o Value type.
+\row \o QStringList QDir::entryList(const QString &, int, int) const \o Value type.
+\row \o QStringList QDir::entryList(int, int) const \o Value type.
+\row \o bool QDir::exists() const \o Value type.
+\row \o bool QDir::exists(const QString &, bool) \o Value type.
+\row \o QString QDir::filePath(const QString &, bool) const \o Value type.
+\row \o bool QDir::isReadable() const \o Value type.
+\row \o bool QDir::isRelative() const \o Value type.
+\row \o bool QDir::isRoot() const \o Value type.
+\row \o bool QDir::mkdir(const QString &, bool) const \o Value type.
+\row \o bool QDir::operator!=() const \o Value type.
+\row \o bool QDir::operator==() const \o Value type.
+\row \o QString QDir::path() const \o Value type.
+\row \o bool QDir::remove(const QString &, bool) \o Value type.
+\row \o bool QDir::rename(const QString &, const QString &, bool) \o Value type.
+\row \o bool QDir::rmdir(const QString &, bool) const \o Value type.
+\row \o void QDir::setFilter(int) \o Value type.
+\row \o void QDir::setMatchAllDirs(bool) \o Value type.
+\row \o void QDir::setNameFilter(const QString &) \o Value type.
+\row \o void QDir::setPath(const QString &) \o Value type.
+\row \o void QDir::setSorting(int) \o Value type.
+\row \o void QDns::setLabel(const QString &) \o Use Q3Dns instead.
+\row \o void QDns::setLabel(const QHostAddress &) \o Use Q3Dns instead.
+\row \o void QDns::setRecordType(RecordType) \o Use Q3Dns instead.
+\row \o void QDockWindow::dock() \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setCloseMode(int) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setFixedExtentHeight(int) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setFixedExtentWidth(int) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setHorizontallyStretchable(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setMovingEnabled(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setNewLine(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setOffset(int) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setOpaqueMoving(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setOrientation(Orientation) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setResizeEnabled(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setVerticallyStretchable(bool) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::setWidget(QWidget *) \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o void QDockWindow::undock() \o Use Q3DockWindow instead or port to the new QDockWidget API.
+\row \o QString QDomAttr::name() const \o Value type.
+\row \o QDomElement QDomAttr::ownerElement() const \o Value type.
+\row \o void QDomAttr::setValue(const QString &) \o Value type.
+\row \o bool QDomAttr::specified() const \o Value type.
+\row \o QString QDomAttr::value() const \o Value type.
+\row \o void QDomCharacterData::appendData(const QString &) \o Value type.
+\row \o QString QDomCharacterData::data() const \o Value type.
+\row \o void QDomCharacterData::deleteData(unsigned, unsigned) \o Value type.
+\row \o void QDomCharacterData::insertData(unsigned, const QString &) \o Value type.
+\row \o uint QDomCharacterData::length() const \o Value type.
+\row \o void QDomCharacterData::replaceData(unsigned, unsigned, const QString &) \o Value type.
+\row \o void QDomCharacterData::setData(const QString &) \o Value type.
+\row \o QString QDomCharacterData::substringData(unsigned, unsigned) \o Value type.
+\row \o QDomNamedNodeMap QDomDocumentType::entities() const \o Value type.
+\row \o QString QDomDocumentType::internalSubset() const \o Value type.
+\row \o QString QDomDocumentType::name() const \o Value type.
+\row \o QDomNamedNodeMap QDomDocumentType::notations() const \o Value type.
+\row \o QString QDomDocumentType::publicId() const \o Value type.
+\row \o QString QDomDocumentType::systemId() const \o Value type.
+\row \o QDomNamedNodeMap QDomElement::attributes() const \o Value type.
+\row \o QDomNodeList QDomElement::elementsByTagName(const QString &) const \o Value type.
+\row \o QDomNodeList QDomElement::elementsByTagNameNS(const QString &, const QString &) const \o Value type.
+\row \o QString QDomEntity::notationName() const \o Value type.
+\row \o QString QDomEntity::publicId() const \o Value type.
+\row \o QString QDomEntity::systemId() const \o Value type.
+\row \o QDomDocument QDomImplementation::createDocument(const QString &, const QString &, const QDomDocumentType &) \o Value type.
+\row \o QDomDocumentType QDomImplementation::createDocumentType(const QString &, const QString &, const QString &) \o Value type.
+\row \o bool QDomImplementation::hasFeature(const QString &, const QString &) \o Value type.
+\row \o QDomImplementation::~QDomImplementation() \o Value type.
+\row \o QDomNode QDomNode::appendChild(const QDomNode &) \o Value type.
+\row \o QDomNamedNodeMap QDomNode::attributes() const \o Value type.
+\row \o QDomNodeList QDomNode::childNodes() const \o Value type.
+\row \o QDomNode QDomNode::cloneNode(bool) const \o Value type.
+\row \o QDomNode QDomNode::firstChild() const \o Value type.
+\row \o bool QDomNode::hasAttributes() const \o Value type.
+\row \o bool QDomNode::hasChildNodes() const \o Value type.
+\row \o QDomNode QDomNode::insertAfter(const QDomNode &, const QDomNode &) \o Value type.
+\row \o QDomNode QDomNode::insertBefore(const QDomNode &, const QDomNode &) \o Value type.
+\row \o bool QDomNode::isAttr() const \o Value type.
+\row \o bool QDomNode::isCDATASection() const \o Value type.
+\row \o bool QDomNode::isCharacterData() const \o Value type.
+\row \o bool QDomNode::isComment() const \o Value type.
+\row \o bool QDomNode::isDocument() const \o Value type.
+\row \o bool QDomNode::isDocumentFragment() const \o Value type.
+\row \o bool QDomNode::isDocumentType() const \o Value type.
+\row \o bool QDomNode::isElement() const \o Value type.
+\row \o bool QDomNode::isEntity() const \o Value type.
+\row \o bool QDomNode::isEntityReference() const \o Value type.
+\row \o bool QDomNode::isNotation() const \o Value type.
+\row \o bool QDomNode::isProcessingInstruction() const \o Value type.
+\row \o bool QDomNode::isSupported(const QString &, const QString &) const \o Value type.
+\row \o bool QDomNode::isText() const \o Value type.
+\row \o QDomNode QDomNode::lastChild() const \o Value type.
+\row \o QString QDomNode::localName() const \o Value type.
+\row \o QString QDomNode::namespaceURI() const \o Value type.
+\row \o QDomNode QDomNode::nextSibling() const \o Value type.
+\row \o QString QDomNode::nodeName() const \o Value type.
+\row \o QDomNode::NodeType QDomNode::nodeType() const \o Value type.
+\row \o QString QDomNode::nodeValue() const \o Value type.
+\row \o void QDomNode::normalize() \o Value type.
+\row \o QDomDocument QDomNode::ownerDocument() const \o Value type.
+\row \o QDomNode QDomNode::parentNode() const \o Value type.
+\row \o QString QDomNode::prefix() const \o Value type.
+\row \o QDomNode QDomNode::previousSibling() const \o Value type.
+\row \o QDomNode QDomNode::removeChild(const QDomNode &) \o Value type.
+\row \o QDomNode QDomNode::replaceChild(const QDomNode &, const QDomNode &) \o Value type.
+\row \o void QDomNode::setNodeValue(const QString &) \o Value type.
+\row \o void QDomNode::setPrefix(const QString &) \o Value type.
+\row \o QDomNode::~QDomNode() \o Value type.
+\row \o QDomNode QDomNodeList::item(int) const \o Value type.
+\row \o uint QDomNodeList::length() const \o Value type.
+\row \o QDomNodeList::~QDomNodeList() \o Value type.
+\row \o QString QDomProcessingInstruction::data() const \o Value type.
+\row \o void QDomProcessingInstruction::setData(const QString &) \o Value type.
+\row \o QString QDomProcessingInstruction::target() const \o Value type.
+\row \o int QEventLoop::enterLoop() \o Port to the new QAbstractEventDispatcher API.
+\row \o int QEventLoop::exec() \o Port to the new QAbstractEventDispatcher API.
+\row \o void QEventLoop::exit(int) \o Port to the new QAbstractEventDispatcher API.
+\row \o void QEventLoop::exitLoop() \o Port to the new QAbstractEventDispatcher API.
+\row \o bool QEventLoop::hasPendingEvents() const \o Port to the new QAbstractEventDispatcher API.
+\row \o int QEventLoop::loopLevel() const \o Port to the new QAbstractEventDispatcher API.
+\row \o bool QEventLoop::processEvents(ProcessEventsFlags) \o Port to the new QAbstractEventDispatcher API.
+\row \o void QEventLoop::registerSocketNotifier(QSocketNotifier *) \o Port to the new QAbstractEventDispatcher API.
+\row \o void QEventLoop::unregisterSocketNotifier(QSocketNotifier *) \o Port to the new QAbstractEventDispatcher API.
+\row \o void QEventLoop::wakeUp() \o Port to the new QAbstractEventDispatcher API.
+\row \o void QFrame::drawContents(QPainter *) \o Use Q3Frame or reimplement QFrame::paintEvent() instead.
+\row \o void QFrame::drawFrame(QPainter *) \o Use Q3Frame or reimplement QFrame::paintEvent() instead.
+\row \o void QFrame::frameChanged() \o Use Q3Frame or reimplement QFrame::resizeEvent() instead.
+\row \o void QFrame::setFrameRect(const QRect &) \o Setter.
+\row \o void QFrame::setFrameStyle(int) \o Setter.
+\row \o void QFrame::setLineWidth(int) \o Setter.
+\row \o void QFrame::setMargin(int) \o Setter.
+\row \o void QFrame::setMidLineWidth(int) \o Setter.
+\row \o void QGridLayout::setColStretch(int, int) \o Setter.
+\row \o void QGridLayout::setRowStretch(int, int) \o Setter.
+\row \o void QGroupBox::setAlignment(int) \o Setter.
+\row \o void QGroupBox::setColumnLayout(int, Orientation) \o Setter.
+\row \o void QGroupBox::setTitle(const QString &) \o Setter.
+\row \o QHostAddress::~QHostAddress() \o Value type.
+\row \o int QIODevice::getch() \o Port to the new QIODevice API.
+\row \o int QIODevice::putch(int) \o Port to the new QIODevice API.
+\row \o QByteArray QIODevice::readAll() \o Port to the new QIODevice API.
+\row \o Q_LONG QIODevice::readLine(char *, Q_ULONG) \o Port to the new QIODevice API.
+\row \o int QIODevice::ungetch(int) \o Port to the new QIODevice API.
+\row \o void QIcon::setPixmap(const QString &, Size, Mode, State) \o Value type.
+\row \o void QIcon::setPixmap(const QPixmap &, Size, Mode, State) \o Value type.
+\row \o QIcon::~QIcon() \o Value type.
+\row \o void QLabel::setAlignment(int) \o Setter.
+\row \o void QLabel::setAutoResize(bool) \o Setter.
+\row \o void QLabel::setBuddy(QWidget *) \o Setter.
+\row \o void QLabel::setMovie(const QMovie &) \o Setter.
+\row \o void QLabel::setNum(int) \o Setter.
+\row \o void QLabel::setNum(double) \o Setter.
+\row \o void QLabel::setPicture(const QPicture &) \o Setter.
+\row \o void QLabel::setPixmap(const QPixmap &) \o Setter.
+\row \o void QLabel::setText(const QString &) \o Setter.
+\row \o QLayoutIterator QLayout::iterator() \o Port to the new QLayout API.
+\row \o void QLayout::setAutoAdd(bool) \o Setter.
+\row \o void QLayout::setMargin(int) \o Setter.
+\row \o void QLayout::setMenuBar(QMenuBar *) \o Setter.
+\row \o void QLayout::setSpacing(int) \o Setter.
+\row \o QLayoutIterator QLayoutItem::iterator() \o Port to the new QLayoutItem API.
+\row \o void QLayoutItem::setAlignment(int) \o Setter.
+\row \o bool QLibrary::unload() \o Never used polymorphically in Qt.
+\row \o void QLineEdit::clear() \o Connect to QLineEdit::textChanged() instead.
+\row \o void QLineEdit::clearValidator() \o Never used polymorphically in Qt.
+\row \o void QLineEdit::copy() const \o Never used polymorphically in Qt.
+\row \o void QLineEdit::cut() \o Never used polymorphically in Qt.
+\row \o void QLineEdit::deselect() \o Connect to QLineEdit::selectionChanged() instead.
+\row \o void QLineEdit::insert(const QString &) \o Connect to QLineEdit::textChanged() instead.
+\row \o void QLineEdit::paste() \o Connect to QLineEdit::textChanged() instead.
+\row \o void QLineEdit::redo() \o Never used polymorphically in Qt.
+\row \o void QLineEdit::selectAll() \o Connect to QLineEdit::selectionChanged() instead.
+\row \o void QLineEdit::setAlignment(int) \o Setter.
+\row \o void QLineEdit::setCursorPosition(int) \o Connect to QLineEdit::cursorPositionChanged() instead.
+\row \o void QLineEdit::setDragEnabled(bool) \o Setter.
+\row \o void QLineEdit::setEchoMode(EchoMode) \o Setter.
+\row \o void QLineEdit::setFrame(bool) \o Setter.
+\row \o void QLineEdit::setMaxLength(int) \o Setter.
+\row \o void QLineEdit::setReadOnly(bool) \o Setter.
+\row \o void QLineEdit::setSelection(int, int) \o Connect to QLineEdit::selectionChanged() instead.
+\row \o void QLineEdit::setText(const QString &) \o Connect to QLineEdit::textChanged() instead.
+\row \o void QLineEdit::setValidator(const QValidator *) \o Setter.
+\row \o void QLineEdit::undo() \o Never used in a polymorphic way by Qt.
+\row \o void QMainWindow::addDockWindow(QDockWindow *, Dock, bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::addDockWindow(QDockWindow *, const QString &, Dock, bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::customize() \o Port to the new QMainWindow API.
+\row \o bool QMainWindow::isCustomizable() const \o Port to the new QMainWindow API.
+\row \o void QMainWindow::moveDockWindow(QDockWindow *, Dock) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::moveDockWindow(QDockWindow *, Dock, bool, int, int) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::removeDockWindow(QDockWindow *) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setAppropriate(QDockWindow *, bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setCentralWidget(QWidget *) \o Setter.
+\row \o void QMainWindow::setDockEnabled(QDockWindow *, Dock, bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setDockEnabled(Dock, bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setDockMenuEnabled(bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setDockWindowsMovable(bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setOpaqueMoving(bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setRightJustification(bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setUpLayout() \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setUsesBigPixmaps(bool) \o Port to the new QMainWindow API.
+\row \o void QMainWindow::setUsesTextLabel(bool) \o Port to the new QMainWindow API.
+\row \o bool QMainWindow::showDockMenu(const QPoint &) \o Port to the new QMainWindow API.
+\row \o void QMenuBar::activateItemAt(int) \o Port to the new QMenuBar API.
+\row \o void QMenuBar::menuContentsChanged() \o Port to the new QMenuBar API.
+\row \o void QMenuBar::menuDelPopup(QPopupMenu *) \o Port to the new QMenuBar API.
+\row \o void QMenuBar::menuInsPopup(QPopupMenu *) \o Port to the new QMenuBar API.
+\row \o void QMenuBar::menuStateChanged() \o Port to the new QMenuBar API.
+\row \o void QMenuBar::setId(int, int) \o Port to the new QMenuBar API.
+\row \o void QMenuBar::setSeparator(Separator) \o Port to the new QMenuBar API.
+\row \o void QMenuBar::updateItem(int) \o Port to the new QMenuBar API.
+\row \o QMutex::~QMutex() \o Value type.
+\row \o bool QObject::checkConnectArgs(const char *, const QObject *, const char *) \o Reimplementing this function is no longer possible.
+\row \o const char * QObject::className() const \o Reimplementing this function is no longer supported.
+\row \o void QObject::insertChild(QObject *) \o Reimplement QObject::childEvent() instead and handle QEvent::ChildAdded events.
+\row \o QVariant QObject::property(const char *) const \o Reimplementing this function is no longer supported.
+\row \o void QObject::removeChild(QObject *) \o Reimplement QObject::childEvent() instead and handle QEvent::ChildRemoved events.
+\row \o void QObject::setName(const char *) \o Setter.
+\row \o bool QObject::setProperty(const char *, const QVariant &) \o Setter.
+\row \o bool QPaintDevice::cmd(int , QPainter * , QPDevCmdParam *) \o Port to the new QPaintEngine API.
+\row \o Qt::HANDLE QPaintDevice::handle() const \o Port to the new QPaintDevice API.
+\row \o HDC QPaintDevice::handle() const \o Port to the new QPaintDevice API.
+\row \o void QPopupMenu::activateItemAt(int) \o Port to the new QMenu API.
+\row \o void QPopupMenu::menuContentsChanged() \o Port to the new QMenu API.
+\row \o void QPopupMenu::menuDelPopup(QPopupMenu *) \o Port to the new QMenu API.
+\row \o void QPopupMenu::menuInsPopup(QPopupMenu *) \o Port to the new QMenu API.
+\row \o void QPopupMenu::menuStateChanged() \o Port to the new QMenu API.
+\row \o void QPopupMenu::setActiveItem(int) \o Port to the new QMenu API.
+\row \o void QPopupMenu::setCheckable(bool) \o Port to the new QMenu API.
+\row \o void QPopupMenu::setId(int, int) \o Port to the new QMenu API.
+\row \o void QPopupMenu::updateItem(int) \o Port to the new QMenu API.
+\row \o int QPrinter::resolution() const \o Call QPrinter::setResolution() to change the resolution.
+\row \o void QPrinter::setColorMode(ColorMode) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setCreator(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setDocName(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setFromTo(int, int) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setFullPage(bool) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setMinMax(int, int) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setNumCopies(int) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setOrientation(Orientation) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setOutputFileName(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setOutputToFile(bool) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPageOrder(PageOrder) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPageSize(PageSize) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPaperSource(PaperSource) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPrintProgram(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPrinterName(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setPrinterSelectionOption(const QString &) \o Subclass QPrintEngine instead.
+\row \o void QPrinter::setResolution(int) \o Subclass QPrintEngine instead.
+\row \o void QProcess::addArgument(const QString &) \o Not used polymorphically in Qt.
+\row \o void QProcess::closeStdin() \o Not used polymorphically in Qt.
+\row \o bool QProcess::launch(const QByteArray & buf, QStringList *) \o Not used polymorphically in Qt.
+\row \o bool QProcess::launch(const QString & buf, QStringList *) \o Not used polymorphically in Qt.
+\row \o QString QProcess::readLineStderr() \o Not used polymorphically in Qt.
+\row \o QString QProcess::readLineStdout() \o Not used polymorphically in Qt.
+\row \o QByteArray QProcess::readStderr() \o Not used polymorphically in Qt.
+\row \o QByteArray QProcess::readStdout() \o Not used polymorphically in Qt.
+\row \o void QProcess::setArguments(const QStringList &) \o Not used polymorphically in Qt.
+\row \o void QProcess::setWorkingDirectory(const QDir &) \o Not used polymorphically in Qt.
+\row \o bool QProcess::start(QStringList *) \o Not used polymorphically in Qt.
+\row \o void QProcess::writeToStdin(const QByteArray &) \o Not used polymorphically in Qt.
+\row \o bool QProgressBar::setIndicator(QString &, int, int) \o Not used polymorphically in Qt.
+\row \o void QProgressBar::setProgress(int) \o Not used polymorphically in Qt.
+\row \o void QProgressBar::setTotalSteps(int) \o Not used polymorphically in Qt.
+\row \o void QPushButton::setAutoDefault(bool) \o Not used polymorphically in Qt.
+\row \o void QPushButton::setDefault(bool) \o Not used polymorphically in Qt.
+\row \o void QPushButton::setIsMenuButton(bool) \o Not used polymorphically in Qt.
+\row \o void QPushButton::setOn(bool) \o Connect to QPushButton::toggled(bool) instead.
+\row \o void QRadioButton::setChecked(bool) \o Connect to QRadioButton::toggled(bool) instead.
+\row \o uchar * QScreen::cache(int , int) \o Port to the new QScreen API.
+\row \o void QScreen::set(unsigned int , unsigned int , unsigned int , unsigned) \o Port to the new QScreen API.
+\row \o void QScreen::uncache(uchar *) \o Port to the new QScreen API.
+\row \o void QScrollBar::setOrientation(Orientation) \o Setter.
+\row \o void QScrollBar::setTracking(bool) \o Setter.
+\row \o void QSignalMapper::setMapping(const QObject *, const QString &) \o Setter.
+\row \o void QSignalMapper::setMapping(const QObject *, int) \o Setter.
+\row \o void QSlider::rangeChange() \o Reimplement QSlider::sliderChange() instead.
+\row \o void QSlider::setOrientation(Orientation) \o Setter.
+\row \o void QSlider::setPalette(const QPalette &) \o Setter.
+\row \o void QSlider::setTickInterval(int) \o Setter.
+\row \o void QSlider::setTickmarks(TickSetting) \o Setter.
+\row \o void QSlider::setTracking(bool) \o Setter.
+\row \o void QSlider::setValue(int) \o Reimplement QSlider::sliderChange() instead.
+\row \o void QSlider::valueChange() \o Reimplement QSlider::sliderChange() instead.
+\row \o QString QSpinBox::cleanText() const \o Port to the new QSpinBox API.
+\row \o void QSpinBox::interpretText() \o Port to the new QSpinBox API.
+\row \o QString QSpinBox::prefix() const \o Port to the new QSpinBox API.
+\row \o void QSpinBox::rangeChange() \o Reimplement QSpinBox::sliderChange() instead.
+\row \o void QSpinBox::selectAll() \o Port to the new QSpinBox API.
+\row \o void QSpinBox::setButtonSymbols(ButtonSymbols) \o Setter.
+\row \o void QSpinBox::setPrefix(const QString &) \o Setter.
+\row \o void QSpinBox::setSpecialValueText(const QString &) \o Setter.
+\row \o void QSpinBox::setSuffix(const QString &) \o Setter.
+\row \o void QSpinBox::setValidator(const QValidator *) \o Setter.
+\row \o void QSpinBox::setValue(int) \o Connect to QSpinBox::valueChanged().
+\row \o void QSpinBox::setWrapping(bool) \o Setter.
+\row \o void QSpinBox::stepDown() \o Reimplement QSpinBox::stepBy() instead.
+\row \o void QSpinBox::stepUp() \o Reimplement QSpinBox::stepBy() instead.
+\row \o QString QSpinBox::suffix() const \o Port to the new QSpinBox API.
+\row \o void QSpinBox::updateDisplay() \o Port to the new QSpinBox API.
+\row \o void QSpinBox::valueChange() \o Reimplement QSpinBox::sliderChange() instead.
+\row \o void QSplitter::drawSplitter(QPainter *, QCOORD, QCOORD, QCOORD, QCOORD) \o Reimplement QStyle::drawPrimitive() instead and handle QStyle::PE_Splitter.
+\row \o void QSplitter::setOpaqueResize(bool) \o Setter.
+\row \o void QSplitter::setOrientation(Orientation) \o Setter.
+\row \o void QSplitter::setResizeMode(QWidget *, ResizeMode) \o Setter.
+\row \o void QSqlDatabase::setDatabaseName(const QString &) \o Setter.
+\row \o void QSqlDatabase::setHostName(const QString &) \o Setter.
+\row \o void QSqlDatabase::setPassword(const QString &) \o Setter.
+\row \o void QSqlDatabase::setPort(int) \o Setter.
+\row \o void QSqlDatabase::setUserName(const QString &) \o Setter.
+\row \o QSqlQuery QSqlDriver::createQuery() const \o Port to the new QSqlDriver API.
+\row \o QString QSqlDriver::nullText() const \o Port to the new QSqlDriver API.
+\row \o QSqlRecord QSqlDriver::record(const QSqlQuery &) const \o Port to the new QSqlDriver API.
+\row \o QSqlRecordInfo QSqlDriver::recordInfo(const QSqlQuery &) const \o Port to the new QSqlDriver API.
+\row \o QSqlRecordInfo QSqlDriver::recordInfo(const QString &) const \o Port to the new QSqlDriver API.
+\row \o void QSqlError::setDatabaseText(const QString &) \o Value type.
+\row \o void QSqlError::setDriverText(const QString &) \o Value type.
+\row \o void QSqlError::setNumber(int) \o Value type.
+\row \o void QSqlError::setType(int) \o Value type.
+\row \o QSqlError::~QSqlError() \o Value type.
+\row \o void QSqlField::setName(const QString &) \o Value type.
+\row \o void QSqlField::setNull() \o Value type.
+\row \o void QSqlField::setReadOnly(bool) \o Value type.
+\row \o void QSqlField::setValue(const QVariant &) \o Value type.
+\row \o QVariant QSqlField::value() const \o Value type.
+\row \o QSqlField::~QSqlField() \o Value type.
+\row \o void QSqlFieldInfo::setCalculated(bool) \o Value type.
+\row \o void QSqlFieldInfo::setGenerated(bool) \o Value type.
+\row \o void QSqlFieldInfo::setTrim(bool) \o Value type.
+\row \o QSqlFieldInfo::~QSqlFieldInfo() \o Value type.
+\row \o void QSqlIndex::append(const QSqlField &) \o Value type.
+\row \o void QSqlIndex::append(const QSqlField &, bool) \o Value type.
+\row \o void QSqlIndex::setCursorName(const QString &) \o Value type.
+\row \o void QSqlIndex::setDescending(int, bool) \o Value type.
+\row \o void QSqlIndex::setName(const QString &) \o Value type.
+\row \o QVariant QSqlQuery::value(int) const \o Exists as a non-virtual function.
+\row \o void QSqlRecord::append(const QSqlField &) \o Value type.
+\row \o void QSqlRecord::clear() \o Value type.
+\row \o void QSqlRecord::clearValues(bool) \o Value type.
+\row \o void QSqlRecord::insert(int, const QSqlField &) \o Value type.
+\row \o void QSqlRecord::remove(int) \o Value type.
+\row \o void QSqlRecord::setGenerated(const QString &, bool) \o Value type.
+\row \o void QSqlRecord::setGenerated(int, bool) \o Value type.
+\row \o void QSqlRecord::setNull(int) \o Value type.
+\row \o void QSqlRecord::setNull(const QString &) \o Value type.
+\row \o void QSqlRecord::setValue(const QString &, const QVariant &) \o Value type.
+\row \o void QSqlRecord::setValue(int, const QVariant &) \o Value type.
+\row \o QString QSqlRecord::toString(const QString &, const QString &) const \o Value type.
+\row \o QStringList QSqlRecord::toStringList(const QString &) const \o Value type.
+\row \o QVariant QSqlRecord::value(int) const \o Value type.
+\row \o QVariant QSqlRecord::value(const QString &) const \o Value type.
+\row \o QSqlRecord::~QSqlRecord() \o Value type.
+\row \o void QStyle::polishPopupMenu(QPopupMenu *) \o Reimplement QStyle::polish(QWidget *) instead.
+\row \o int QTabBar::addTab(QTab *) \o Reimplement QTabBar::tabInserted() instead.
+\row \o int QTabBar::insertTab(QTab *, int) \o Reimplement QTabBar::tabInserted() instead.
+\row \o void QTabBar::layoutTabs() \o Reimplement QTabBar::tabLayoutChange() instead.
+\row \o void QTabBar::paint(QPainter *, QTab *, bool) const \o Reimplement QTabBar::paintEvent() instead.
+\row \o void QTabBar::paintLabel(QPainter *, const QRect &, QTab *, bool) const \o Reimplement QTabBar::paintEvent() instead.
+\row \o void QTabBar::removeTab(QTab *) \o Reimplement QTabBar::tabRemoved() instead.
+\row \o QTab * QTabBar::selectTab(const QPoint &) const \o Reimplement QTabBar::mousePressEvent() instead.
+\row \o void QTabBar::setCurrentTab(int) \o Connect to the QTabBar::currentChanged() signal.
+\row \o void QTabBar::setCurrentTab(QTab *) \o Connect to the QTabBar::currentChanged() signal.
+\row \o void QTabBar::setShape(Shape) \o Setter.
+\row \o void QTabBar::setTabEnabled(int, bool) \o Setter.
+\row \o void QTabWidget::addTab(QWidget *, const QString &) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::addTab(QWidget *, const QIcon &, const QString &) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::addTab(QWidget *, QTab *) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::insertTab(QWidget *, const QIcon &, const QString &, int) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::insertTab(QWidget *, const QString &, int) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::insertTab(QWidget *, QTab *, int) \o Reimplement QTabWidget::tabInserted() instead.
+\row \o void QTabWidget::removePage(QWidget *) \o Reimplement QTabWidget::tabRemoved() instead.
+\row \o void QTabWidget::showPage(QWidget *) \o Connect to QTabWidget::currentChanged() instead.
+\row \o void QTextEdit::append(const QString &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::clear() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::clearParagraphBackground(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::copy() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o QPopupMenu * QTextEdit::createPopupMenu(const QPoint &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o QPopupMenu * QTextEdit::createPopupMenu() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::cut() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::del() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::doKeyboardAction(KeyboardAction) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::ensureCursorVisible() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o bool QTextEdit::find(const QString &, bool, bool, bool, int *, int *) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o bool QTextEdit::focusNextPrevChild(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o int QTextEdit::heightForWidth(int) const \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::insert(const QString &, bool, bool, bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::insertAt(const QString &, int, int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::insertParagraph(const QString &, int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::moveCursor(CursorAction, bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::paste() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::pasteSubType(const QCString &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::placeCursor(const QPoint &, QTextCursor *) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::redo() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::removeParagraph(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::removeSelectedText(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::removeSelection(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::scrollToAnchor(const QString &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::scrollToBottom() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::selectAll(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setAlignment(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setBold(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setColor(const QColor &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setCurrentFont(const QFont &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setCursorPosition(int, int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setFamily(const QString &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setItalic(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setLinkUnderline(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setMimeSourceFactory(QMimeSourceFactory *) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setModified(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setOverwriteMode(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setPaper(const QBrush &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setParagraphBackgroundColor(int, const QColor &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setPointSize(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setReadOnly(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setSelection(int, int, int, int, int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setSelectionAttributes(int, const QColor &, bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setStyleSheet(QStyleSheet *) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setTabStopWidth(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setText(const QString &, const QString &) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setTextFormat(TextFormat) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setUnderline(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setUndoDepth(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setUndoRedoEnabled(bool) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setVerticalAlignment(VerticalAlignment) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setWordWrap(WordWrap) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setWrapColumnOrWidth(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::setWrapPolicy(WrapPolicy) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::sync() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::undo() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::zoomIn() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::zoomIn(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::zoomOut(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::zoomOut() \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o void QTextEdit::zoomTo(int) \o Use Q3TextEdit or port to the new QTextEdit API.
+\row \o QString QTimeEdit::sectionFormattedText(int) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setAutoAdvance(bool) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setHour(int) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setMaxValue(const QTime &) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setMinValue(const QTime &) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setMinute(int) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setRange(const QTime &, const QTime &) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setSecond(int) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setSeparator(const QString &) \o Port to the new QDateTimeEdit API.
+\row \o void QTimeEdit::setTime(const QTime &) \o Port to the new QDateTimeEdit API.
+\row \o void QToolBar::clear() \o Setter.
+\row \o void QToolBar::setLabel(const QString &) \o Setter.
+\row \o void QToolBar::setStretchableWidget(QWidget *) \o Setter.
+\row \o void QToolButton::setIconSet(const QIcon &) \o Setter.
+\row \o void QToolButton::setOn(bool) \o Connect to QToolButton::toggled(bool) instead.
+\row \o void QToolButton::setTextLabel(const QString &, bool) \o Setter.
+\row \o void QToolButton::setToggleButton(bool) \o Setter.
+\row \o void QToolButton::setUsesBigPixmap(bool) \o Setter.
+\row \o void QToolButton::setUsesTextLabel(bool) \o Setter.
+\row \o void QToolTip::maybeTip(const QPoint &) \o Port to the new QToolTip API.
+\row \o void QUrl::addPath(const QString &) \o Value type.
+\row \o bool QUrl::cdUp() \o Value type.
+\row \o bool QUrl::parse(const QString &) \o Value type.
+\row \o void QUrl::reset() \o Value type.
+\row \o void QUrl::setEncodedPathAndQuery(const QString &) \o Value type.
+\row \o void QUrl::setFileName(const QString &) \o Value type.
+\row \o void QUrl::setHost(const QString &) \o Value type.
+\row \o void QUrl::setPassword(const QString &) \o Value type.
+\row \o void QUrl::setPath(const QString &) \o Value type.
+\row \o void QUrl::setPort(int) \o Value type.
+\row \o void QUrl::setProtocol(const QString &) \o Value type.
+\row \o void QUrl::setQuery(const QString &) \o Value type.
+\row \o void QUrl::setRef(const QString &) \o Value type.
+\row \o void QUrl::setUser(const QString &) \o Value type.
+\row \o QString QUrl::toString(bool, bool) const \o Value type.
+\row \o QUrl::~QUrl() \o Value type.
+\row \o QWaitCondition::~QWaitCondition() \o Value type.
+\row \o bool QWhatsThis::clicked(const QString &) \o Port to the new QWhatsThis API.
+\row \o QString QWhatsThis::text(const QPoint &) \o Port to the new QWhatsThis API.
+\row \o QWhatsThis::~QWhatsThis() \o Port to the new QWhatsThis API.
+\row \o void QWidget::adjustSize() \o Reimplement QWidget::sizeHint() instead.
+\row \o bool QWidget::close(bool) \o Reimplement QWidget::closeEvent().
+\row \o void QWidget::create(WId, bool, bool) \o Not supported in Qt 4.
+\row \o bool QWidget::customWhatsThis() const \o Not supported in Qt 4.
+\row \o void QWidget::destroy(bool, bool) \o Not supported in Qt 4.
+\row \o void QWidget::enabledChange(bool) \o Reimplement QWidget::changeEvent() and handle QEvent::EnabledChange.
+\row \o void QWidget::fontChange(const QFont &) \o Reimplement QWidget::changeEvent() and handle QEvent::FontChange.
+\row \o void QWidget::imComposeEvent(QIMEvent *) \o Reimplement QWidget::inputMethodEvent() instead.
+\row \o void QWidget::imEndEvent(QIMEvent *) \o Reimplement QWidget::inputMethodEvent() instead.
+\row \o void QWidget::imStartEvent(QIMEvent *) \o Reimplement QWidget::inputMethodEvent() instead.
+\row \o void QWidget::move(int, int) \o Setter.
+\row \o void QWidget::paletteChange(const QPalette &) \o Reimplement QWidget::changeEvent() and handle QEvent::PaletteChange and/or QEvent::ApplicationPaletteChange.
+\row \o void QWidget::polish() \o Reimplement event() and handle the QEvent::Polish event type.
+\row \o void QWidget::reparent(QWidget *, WFlags, const QPoint &, bool) \o Reimplement QWidget::event() and handle QEvent::Reparent.
+\row \o void QWidget::resize(int, int) \o Reimplement QWidget::resizeEvent() instead.
+\row \o void QWidget::setAcceptDrops(bool) \o Setter.
+\row \o void QWidget::setActiveWindow() \o Reimplement QWidget::changeEvent() and handle QEvent::ActivationChange.
+\row \o void QWidget::setAutoMask(bool) \o Setter.
+\row \o void QWidget::setBackgroundColor(const QColor &) \o Setter.
+\row \o void QWidget::setBackgroundMode(BackgroundMode) \o Setter.
+\row \o void QWidget::setBackgroundOrigin(BackgroundOrigin) \o Setter.
+\row \o void QWidget::setBackgroundPixmap(const QPixmap &) \o Setter.
+\row \o void QWidget::setCaption(const QString &) \o Reimplement QWidget::changeEvent() and handle QEvent::WindowTitleChange.
+\row \o void QWidget::setCursor(const QCursor &) \o Setter.
+\row \o void QWidget::setEnabled(bool) \o Reimplement QWidget::changeEvent() and handle QEvent::EnabledChange.
+\row \o void QWidget::setEraseColor(const QColor &) \o Setter.
+\row \o void QWidget::setErasePixmap(const QPixmap &) \o Setter.
+\row \o void QWidget::setFocus() \o Reimplement QWidget::focusInEvent() or QWidget::focusOutEvent().
+\row \o void QWidget::setFocusPolicy(FocusPolicy) \o Setter.
+\row \o void QWidget::setFocusProxy(QWidget *) \o Setter.
+\row \o void QWidget::setFont(const QFont &) \o Reimplement QWidget::changeEvent() and handle QEvent::FontChange and/or QEvent::ApplicationFontChange.
+\row \o void QWidget::setGeometry(int, int, int, int) \o Setter.
+\row \o void QWidget::setGeometry(const QRect &) \o Setter.
+\row \o void QWidget::setIcon(const QPixmap &) \o Reimplement QWidget::changeEvent() and handle QEvent::WindowIconChange.
+\row \o void QWidget::setIconText(const QString &) \o Reimplement QWidget::changeEvent() and handle QEvent::IconTextChange.
+\row \o void QWidget::setKeyCompression(bool) \o Setter.
+\row \o void QWidget::setMask(const QRegion &) \o Setter.
+\row \o void QWidget::setMask(const QBitmap &) \o Setter.
+\row \o void QWidget::setMaximumSize(int, int) \o Setter.
+\row \o void QWidget::setMicroFocusHint(int, int, int, int, bool, QFont *) \o Setter.
+\row \o void QWidget::setMinimumSize(int, int) \o Setter.
+\row \o void QWidget::setMouseTracking(bool) \o Reimplement QWidget::changeEvent() and handle QEvent::MouseTrackingChange.
+\row \o void QWidget::setPalette(const QPalette &) \o Reimplement QWidget::changeEvent() and handle QEvent::PaletteChange and/or QEvent::ApplicationPaletteChange.
+\row \o void QWidget::setPaletteBackgroundColor(const QColor &) \o Setter.
+\row \o void QWidget::setPaletteBackgroundPixmap(const QPixmap &) \o Setter.
+\row \o void QWidget::setSizeIncrement(int, int) \o Setter.
+\row \o void QWidget::setSizePolicy(QSizePolicy) \o Setter.
+\row \o void QWidget::setUpdatesEnabled(bool) \o Setter.
+\row \o void QWidget::setWFlags(WFlags) \o Setter.
+\row \o void QWidget::show() \o Reimplement QWidget::showEvent().
+\row \o void QWidget::showMaximized() \o Reimplement QWidget::changeEvent() and handle QEvent::WindowStateChange.
+\row \o void QWidget::showMinimized() \o Reimplement QWidget::changeEvent() and handle QEvent::WindowStateChange.
+\row \o void QWidget::showNormal() \o Reimplement QWidget::changeEvent() and handle QEvent::WindowStateChange.
+\row \o void QWidget::styleChange(QStyle &) \o Reimplement QWidget::changeEvent() and handle QEvent::StyleChange.
+\row \o void QWidget::unsetCursor() \o Setter.
+\row \o void QWidget::windowActivationChange(bool) \o Reimplement QWidget::changeEvent() and handle QEvent::ActivationChange.
diff --git a/doc/src/porting4-renamedclasses.qdocinc b/doc/src/porting4-renamedclasses.qdocinc
new file mode 100644
index 0000000..ef315a1
--- /dev/null
+++ b/doc/src/porting4-renamedclasses.qdocinc
@@ -0,0 +1,3 @@
+\row \o QIconSet \o QIcon
+\row \o QWMatrix \o QMatrix
+\row \o QGuardedPtr \o QPointer
diff --git a/doc/src/porting4-renamedenumvalues.qdocinc b/doc/src/porting4-renamedenumvalues.qdocinc
new file mode 100644
index 0000000..9519da1
--- /dev/null
+++ b/doc/src/porting4-renamedenumvalues.qdocinc
@@ -0,0 +1,234 @@
+\row \o IO_Append \o QIODevice::Append
+\row \o IO_ReadOnly \o QIODevice::ReadOnly
+\row \o IO_ReadWrite \o QIODevice::ReadWrite
+\row \o IO_Translate \o QIODevice::Text
+\row \o IO_Truncate \o QIODevice::Truncate
+\row \o IO_WriteOnly \o QIODevice::WriteOnly
+\row \o IO_Raw \o QIODevice::Unbuffered
+\row \o QAccessible::Moveable \o QAccessible::Movable
+\row \o QApplication::CustomColors \o QApplication::CustomColor
+\row \o QApplication::NormalColors \o QApplication::NormalColor
+\row \o QButton::NoChange \o QCheckBox::NoChange
+\row \o QButton::Off \o QCheckBox::Off
+\row \o QButton::On \o QCheckBox::On
+\row \o QChar::Single \o QChar::NoDecomposition
+\row \o QChar::byteOrderMark \o QChar::ByteOrderMark
+\row \o QChar::byteOrderSwapped \o QChar::ByteOrderSwapped
+\row \o QChar::nbsp \o QChar::Nbsp
+\row \o QChar::null \o QChar::Null
+\row \o QChar::replacement \o QChar::ReplacementCharacter
+\row \o QComboBox::AfterCurrent \o QComboBox::InsertAfterCurrent
+\row \o QComboBox::AtBottom \o QComboBox::InsertAtBottom
+\row \o QComboBox::AtCurrent \o QComboBox::InsertAtCurrent
+\row \o QComboBox::AtTop \o QComboBox::InsertAtTop
+\row \o QComboBox::BeforeCurrent \o QComboBox::InsertBeforeCurrent
+\row \o QComboBox::NoInsertion \o QComboBox::NoInsert
+\row \o QDir::DefaultFilter \o QDir::NoFilter
+\row \o QDir::DefaultSort \o QDir::NoSort
+\row \o QEvent::Accel \o QEvent::Shortcut
+\row \o QEvent::AccelOverride \o QEvent::ShortcutOverride
+\row \o QEvent::CaptionChange \o QEvent::WindowTitleChange
+\row \o QEvent::ChildInserted \o QEvent::ChildAdded
+\row \o QEvent::IMCompose \o QEvent::InputMethodCompose
+\row \o QEvent::IMEnd \o QEvent::InputMethodEnd
+\row \o QEvent::IMStart \o QEvent::InputMethodStart
+\row \o QEvent::IconChange \o QEvent::WindowIconChange
+\row \o QEvent::LayoutHint \o QEvent::LayoutRequest
+\row \o QEvent::Reparent \o QEvent::ParentChange
+\row \o QFileInfo::ExeGroup \o QFile::ExeGroup
+\row \o QFileInfo::ExeOther \o QFile::ExeOther
+\row \o QFileInfo::ExeOwner \o QFile::ExeOwner
+\row \o QFileInfo::ExeUser \o QFile::ExeUser
+\row \o QFileInfo::ReadGroup \o QFile::ReadGroup
+\row \o QFileInfo::ReadOther \o QFile::ReadOther
+\row \o QFileInfo::ReadOwner \o QFile::ReadOwner
+\row \o QFileInfo::ReadUser \o QFile::ReadUser
+\row \o QFileInfo::WriteGroup \o QFile::WriteGroup
+\row \o QFileInfo::WriteOther \o QFile::WriteOther
+\row \o QFileInfo::WriteOwner \o QFile::WriteOwner
+\row \o QFileInfo::WriteUser \o QFile::WriteUser
+\row \o QFrame::GroupBoxPanel \o QFrame::StyledPanel
+\row \o QFrame::LineEditPanel \o QFrame::StyledPanel
+\row \o QFrame::MenuBarPanel \o QFrame::StyledPanel
+\row \o QFrame::PopupPanel \o QFrame::StyledPanel
+\row \o QFrame::TabWidgetPanel \o QFrame::StyledPanel
+\row \o QFrame::ToolBarPanel \o QFrame::StyledPanel
+\row \o QImage::ScaleFree \o Qt::IgnoreAspectRatio
+\row \o QImage::ScaleMax \o Qt::KeepAspectRatioByExpanding
+\row \o QImage::ScaleMin \o Qt::KeepAspectRatio
+\row \o Qt::Identical \o QKeySequence::ExactMatch
+\row \o Qt::NoMatch \o QKeySequence::NoMatch
+\row \o Qt::PartialMatch \o QKeySequence::PartialMatch
+\row \o QLayout::Auto \o QLayout::SetDefaultConstraint
+\row \o QLayout::Fixed \o QLayout::SetFixedSize
+\row \o QLayout::FreeResize \o QLayout::SetNoConstraint
+\row \o QLayout::Minimum \o QLayout::SetMinimumSize
+\row \o QMacStyle::SizeNone \o QMacStyle::SizeDefault
+\row \o QSettings::Global \o QSettings::SystemScope
+\row \o QSettings::User \o QSettings::UserScope
+\row \o QSize::ScaleFree \o Qt::IgnoreAspectRatio
+\row \o QSize::ScaleMax \o Qt::KeepAspectRatioByExpanding
+\row \o QSize::ScaleMin \o Qt::KeepAspectRatio
+\row \o QSizePolicy::Horizontal \o QSizePolicy::Horizontally
+\row \o QSizePolicy::Vertical \o QSizePolicy::Vertically
+\row \o QSlider::Above \o QSlider::TicksAbove
+\row \o QSlider::Below \o QSlider::TicksBelow
+\row \o QSlider::Both \o QSlider::TicksBothSides
+\row \o QSlider::Left \o QSlider::TicksLeft
+\row \o QSlider::NoMarks \o QSlider::NoTicks
+\row \o QSlider::Right \o QSlider::TicksRight
+\row \o QSocket::Closing \o Q3Socket::Closing
+\row \o QSocket::Connected \o Q3Socket::Connected
+\row \o QSocket::Connecting \o Q3Socket::Connecting
+\row \o QSocket::Connection \o Q3Socket::Connection
+\row \o QSocket::ErrConnectionRefused \o Q3Socket::ErrConnectionRefused
+\row \o QSocket::ErrHostNotFound \o Q3Socket::ErrHostNotFound
+\row \o QSocket::ErrSocketRead \o Q3Socket::ErrSocketRead
+\row \o QSocket::HostLookup \o QAbstractSocket::HostLookupState
+\row \o QSocket::Idle \o QAbstractSocket::UnconnectedState
+\row \o QSqlError::Connection \o QSqlError::ConnectionError
+\row \o QSqlError::None \o QSqlError::NoError
+\row \o QSqlError::Statement \o QSqlError::StatementError
+\row \o QSqlError::Transaction \o QSqlError::TransactionError
+\row \o QSqlError::Unknown \o QSqlError::UnknownError
+\row \o QStyle::CC_ListView \o QStyle::CC_Q3ListView
+\row \o QStyle::SH_UnderlineAccelerator \o QStyle::SH_UnderlineShortcut
+\row \o QStyle::Style_Active \o QStyle::State_Active
+\row \o QStyle::Style_AutoRaise \o QStyle::State_AutoRaise
+\row \o QStyle::Style_Bottom \o QStyle::State_Bottom
+\row \o QStyle::Style_Children \o QStyle::State_Children
+\row \o QStyle::Style_Default \o QStyle::State_None
+\row \o QStyle::Style_Down \o QStyle::State_DownArrow
+\row \o QStyle::Style_Editing \o QStyle::State_Editing
+\row \o QStyle::Style_Enabled \o QStyle::State_Enabled
+\row \o QStyle::Style_FocusAtBorder \o QStyle::State_FocusAtBorder
+\row \o QStyle::Style_HasFocus \o QStyle::State_HasFocus
+\row \o QStyle::Style_Horizontal \o QStyle::State_Horizontal
+\row \o QStyle::Style_Item \o QStyle::State_Item
+\row \o QStyle::Style_MouseOver \o QStyle::State_MouseOver
+\row \o QStyle::Style_NoChange \o QStyle::State_NoChange
+\row \o QStyle::Style_None \o QStyle::State_None
+\row \o QStyle::Style_Off \o QStyle::State_Off
+\row \o QStyle::Style_On \o QStyle::State_On
+\row \o QStyle::Style_Open \o QStyle::State_Open
+\row \o QStyle::Style_Raised \o QStyle::State_Raised
+\row \o QStyle::Style_Rectangle \o QStyle::State_Rectangle
+\row \o QStyle::Style_Selected \o QStyle::State_Selected
+\row \o QStyle::Style_Sibling \o QStyle::State_Sibling
+\row \o QStyle::Style_Sunken \o QStyle::State_Sunken
+\row \o QStyle::Style_Top \o QStyle::State_Top
+\row \o QStyle::Style_Up \o QStyle::State_Up
+\row \o QTabBar::RoundedAbove \o QTabBar::RoundedNorth
+\row \o QTabBar::RoundedBelow \o QTabBar:: RoundedSouth
+\row \o QTabBar::TriangularAbove \o QTabBar:: TriangularNorth
+\row \o QTabBar::TriangularBelow \o QTabBar:: TriangularSouth
+\row \o QTextEdit::MovePgDown \o QTextEdit::MovePageDown
+\row \o QTextEdit::MovePgUp \o QTextEdit::MovePageUp
+\row \o QToolButton::Right \o QToolButton::BesideIcon
+\row \o QToolButton::Under \o QToolButton::BelowIcon
+\row \o QValidator::Valid \o QValidator::Intermediate
+\row \o QVariant::IconSet \o QCoreVariant::Icon
+\row \o QWidget::ClickFocus \o Qt::ClickFocus
+\row \o QWidget::NoFocus \o Qt::NoFocus
+\row \o QWidget::StrongFocus \o Qt::StrongFocus
+\row \o QWidget::TabFocus \o Qt::TabFocus
+\row \o QWidget::WheelFocus \o Qt::WheelFocus
+\row \o Qt::AlignAuto \o Qt::AlignLeft
+\row \o Qt::AltButton \o Qt::AltModifier
+\row \o Qt::Ascending \o Qt::AscendingOrder
+\row \o Qt::Bottom \o Qt::DockBottom
+\row \o Qt::BottomLeft \o Qt::BottomLeftCorner
+\row \o Qt::BottomRight \o Qt::BottomRightCorner
+\row \o Qt::BreakAnywhere \o Qt::TextWrapAnywhere
+\row \o Qt::ControlButton \o Qt::ControlModifier
+\row \o Qt::CustomPattern \o Qt::TexturePattern
+\row \o Qt::Descending \o Qt::DescendingOrder
+\row \o Qt::DontClip \o Qt::TextDontClip
+\row \o Qt::DontPrint \o Qt::TextDontPrint
+\row \o Qt::ExpandTabs \o Qt::TextExpandTabs
+\row \o Qt::IncludeTrailingSpaces \o Qt::TextIncludeTrailingSpaces
+\row \o Qt::KeyButtonMask \o Qt::KeyboardModifierMask
+\row \o Qt::Key_BackSpace \o Qt::Key_Backspace
+\row \o Qt::Key_BackTab \o Qt::Key_Backtab
+\row \o Qt::Key_MediaPrev \o Qt::Key_MediaPrevious
+\row \o Qt::Key_Next \o Qt::Key_PageDown
+\row \o Qt::Key_Prior \o Qt::Key_PageUp
+\row \o Qt::Key_aacute \o Qt::Key_Aacute
+\row \o Qt::Key_acircumflex \o Qt::Key_Acircumflex
+\row \o Qt::Key_adiaeresis \o Qt::Key_Adiaeresis
+\row \o Qt::Key_ae \o Qt::Key_AE
+\row \o Qt::Key_agrave \o Qt::Key_Agrave
+\row \o Qt::Key_aring \o Qt::Key_Aring
+\row \o Qt::Key_atilde \o Qt::Key_Atilde
+\row \o Qt::Key_ccedilla \o Qt::Key_Ccedilla
+\row \o Qt::Key_eacute \o Qt::Key_Eacute
+\row \o Qt::Key_ecircumflex \o Qt::Key_Ecircumflex
+\row \o Qt::Key_ediaeresis \o Qt::Key_Ediaeresis
+\row \o Qt::Key_egrave \o Qt::Key_Egrave
+\row \o Qt::Key_eth \o Qt::Key_ETH
+\row \o Qt::Key_iacute \o Qt::Key_Iacute
+\row \o Qt::Key_icircumflex \o Qt::Key_Icircumflex
+\row \o Qt::Key_idiaeresis \o Qt::Key_Idiaeresis
+\row \o Qt::Key_igrave \o Qt::Key_Igrave
+\row \o Qt::Key_ntilde \o Qt::Key_Ntilde
+\row \o Qt::Key_oacute \o Qt::Key_Oacute
+\row \o Qt::Key_ocircumflex \o Qt::Key_Ocircumflex
+\row \o Qt::Key_odiaeresis \o Qt::Key_Odiaeresis
+\row \o Qt::Key_ograve \o Qt::Key_Ograve
+\row \o Qt::Key_oslash \o Qt::Key_Ooblique
+\row \o Qt::Key_otilde \o Qt::Key_Otilde
+\row \o Qt::Key_thorn \o Qt::Key_THORN
+\row \o Qt::Key_uacute \o Qt::Key_Uacute
+\row \o Qt::Key_ucircumflex \o Qt::Key_Ucircumflex
+\row \o Qt::Key_udiaeresis \o Qt::Key_Udiaeresis
+\row \o Qt::Key_ugrave \o Qt::Key_Ugrave
+\row \o Qt::Key_yacute \o Qt::Key_Yacute
+\row \o Qt::Keypad \o Qt::KeypadModifier
+\row \o Qt::Left \o Qt::DockLeft
+\row \o Qt::MV_10_DOT_0 \o QSysInfo::MV_10_0
+\row \o Qt::MV_10_DOT_1 \o QSysInfo::MV_10_1
+\row \o Qt::MV_10_DOT_2 \o QSysInfo::MV_10_2
+\row \o Qt::MV_10_DOT_3 \o QSysInfo::MV_10_3
+\row \o Qt::MV_10_DOT_4 \o QSysInfo::MV_10_4
+\row \o Qt::MV_9 \o QSysInfo::MV_9
+\row \o Qt::MV_CHEETAH \o QSysInfo::MV_10_0
+\row \o Qt::MV_JAGUAR \o QSysInfo::MV_10_2
+\row \o Qt::MV_PANTHER \o QSysInfo::MV_10_3
+\row \o Qt::MV_PUMA \o QSysInfo::MV_10_1
+\row \o Qt::MV_TIGER \o QSysInfo::MV_10_4
+\row \o Qt::MV_Unknown \o QSysInfo::MV_Unknown
+\row \o Qt::MetaButton \o Qt::MetaModifier
+\row \o Qt::Minimized \o Qt::DockMinimized
+\row \o Qt::NoAccel \o Qt::TextHideMnemonic
+\row \o Qt::Overline \o Qt::TextOverline
+\row \o Qt::Right \o Qt::DockRight
+\row \o Qt::ShiftButton \o Qt::ShiftModifier
+\row \o Qt::ShowPrefix \o Qt::TextShowMnemonic
+\row \o Qt::SingleLine \o Qt::TextSingleLine
+\row \o Qt::StrikeOut \o Qt::TextStrikeOut
+\row \o Qt::Top \o Qt::DockTop
+\row \o Qt::TopLeft \o Qt::TopLeftCorner
+\row \o Qt::TopRight \o Qt::TopRightCorner
+\row \o Qt::TornOff \o Qt::DockTornOff
+\row \o Qt::Underline \o Qt::TextUnderline
+\row \o Qt::Unmanaged \o Qt::DockUnmanaged
+\row \o Qt::WNorthWestGravity \o Qt::WStaticContents
+\row \o Qt::WRepaintNoErase \o Qt::WNoAutoErase
+\row \o Qt::WStyle_Dialog \o Qt::WType_Dialog
+\row \o Qt::WStyle_NoBorderEx \o Qt::WStyle_NoBorder
+\row \o Qt::WType_Modal \o (Qt::WType_Dialog | Qt::WShowModal)
+\row \o Qt::WV_2000 \o QSysInfo::WV_2000
+\row \o Qt::WV_2003 \o QSysInfo::WV_2003
+\row \o Qt::WV_32s \o QSysInfo::WV_32s
+\row \o Qt::WV_95 \o QSysInfo::WV_95
+\row \o Qt::WV_98 \o QSysInfo::WV_98
+\row \o Qt::WV_CE \o QSysInfo::WV_CE
+\row \o Qt::WV_CENET \o QSysInfo::WV_CENET
+\row \o Qt::WV_CE_based \o QSysInfo::WV_CE_based
+\row \o Qt::WV_DOS_based \o QSysInfo::WV_DOS_based
+\row \o Qt::WV_Me \o QSysInfo::WV_Me
+\row \o Qt::WV_NT \o QSysInfo::WV_NT
+\row \o Qt::WV_NT_based \o QSysInfo::WV_NT_based
+\row \o Qt::WV_XP \o QSysInfo::WV_XP
+\row \o Qt::WordBreak \o Qt::TextWordWrap
+\row \o Qt::IbeamCursor \o Qt::IBeamCursor
diff --git a/doc/src/porting4-renamedfunctions.qdocinc b/doc/src/porting4-renamedfunctions.qdocinc
new file mode 100644
index 0000000..3e59a82
--- /dev/null
+++ b/doc/src/porting4-renamedfunctions.qdocinc
@@ -0,0 +1,6 @@
+\row \o QRegExp::search() \o QRegExp::indexIn()
+\row \o QPixmap::convertFromImage \o QPixmap::fromImage() (static function)
+\row \o QStyle::querySubControl() \o QStyle::hitTestComplexControl()
+\row \o QStyle::querySubControlMetrics() \o QStyle::subControlRect()
+\row \o QStyle::unPolish() \o QStyle::unpolish()
+\row \o QThread::currentThread() \o QThread::currentThreadId()
diff --git a/doc/src/porting4-renamedstatic.qdocinc b/doc/src/porting4-renamedstatic.qdocinc
new file mode 100644
index 0000000..156ab73
--- /dev/null
+++ b/doc/src/porting4-renamedstatic.qdocinc
@@ -0,0 +1,3 @@
+\row \o QPixmap::fromMimeSource \o qPixmapFromMimeSource
+\row \o QImage::inputFormats \o QImageReader::supportedImageFormats
+\row \o QImage::outputFormats \o QImageWriter::supportedImageFormats
diff --git a/doc/src/porting4-renamedtypes.qdocinc b/doc/src/porting4-renamedtypes.qdocinc
new file mode 100644
index 0000000..fc8f604
--- /dev/null
+++ b/doc/src/porting4-renamedtypes.qdocinc
@@ -0,0 +1,26 @@
+\row \o QApplication::ColorMode \o QApplication::ColorSpec
+\row \o QButton::ToggleState \o QCheckBox::ToggleState
+\row \o QCursorShape \o Qt::CursorShape
+\row \o QFile::FilterSpec \o QFile::Filters
+\row \o QFile::PermissionSpec \o QFile::Permission
+\row \o QFile::SortSpec \o QFile::SortFlags
+\row \o QFile::Status \o QFile::Error
+\row \o QFileInfo::PermissionSpec \o QFile::Permission
+\row \o QGrid::Direction \o Qt::Orientation
+\row \o QGridWidget::Direction \o Qt::Orientation
+\row \o QIODevice::Offset \o qlonglong
+\row \o QImage::ScaleMode \o Qt::AspectRatioMode
+\row \o QSize::ScaleMode \o Qt::AspectRatioMode
+\row \o QSocket::Error \o Q3Socket::Error
+\row \o QSocket::State \o Q3Socket::State
+\row \o QStyle::SCFlags \o QStyle::SubControls
+\row \o QStyle::SFlags \o QStyle::State
+\row \o QTS \o QTextStream
+\row \o QUrlDrag \o QUriDrag
+\row \o QWidget::FocusPolicy \o Qt::FocusPolicy
+\row \o Q_LLONG \o qlonglong
+\row \o Q_ULLONG \o qulonglong
+\row \o Qt::Dock \o Qt::ToolBarDock
+\row \o Qt::MacintoshVersion \o QSysInfo::MacVersion
+\row \o Qt::TextFlags \o Qt::TextFlag
+\row \o Qt::WindowsVersion \o QSysInfo::WinVersion
diff --git a/doc/src/porting4.qdoc b/doc/src/porting4.qdoc
new file mode 100644
index 0000000..c8a9e2b
--- /dev/null
+++ b/doc/src/porting4.qdoc
@@ -0,0 +1,4215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page porting4.html
+ \title Porting to Qt 4
+ \contentspage {Porting Guides}{Contents}
+ \previouspage Porting Guides
+ \nextpage Porting to Qt 4 - Virtual Functions
+ \ingroup porting
+ \brief An overview of issues and techniques to consider when porting from Qt 3 to Qt 4.
+
+\omit
+ ### QFileInfo::PermissionSpec -> QFile::Permission(s?)
+ ### refer to porting4-renamedfunctions.qdoc
+ ### QApplication library mutex is gone
+ ### no integral conversion for containers? strings?
+ ### QVector etc. are initialized to 0 by default?
+ ### How to port from Qt 2.3 to Qt 4.
+ ### missing sort() functions?
+ ### QToolTipGroup
+ ### QServerSocket -> Q3ServerSocket
+
+ ### remove these when the classes are re-ported
+
+ ### QApplication::eventLoop()
+
+ \row \o void QCheckListItem::paintCell(QPainter *, const QColorGroup &, int, int, int)\row \o void Q3CheckListItem::paintCell(QPainter *, const QPalette &, int, int, int)
+ \row \o void QCheckListItem::paintFocus(QPainter *, const QColorGroup &, const QRect &) \o void Q3CheckListItem::paintFocus(QPainter *, const QPalette &, const QRect &)
+ \row \o QDataTable: a whole bunch of virtual functions have a different signature
+
+ < Function: void QIconViewItem::paintFocus(QPainter *, const QColorGroup &)
+ > Function: void QIconViewItem::paintFocus(QPainter *, const QPalette &)
+
+ < Function: void QIconViewItem::paintItem(QPainter *, const QColorGroup &)
+ > Function: void QIconViewItem::paintItem(QPainter *, const QPalette &)
+
+ < Function: bool QUrlOperator::checkValid()
+
+ < Function: void QWSInputMethod::setFont(const QFont &)
+
+ ### OpenMode or OpenMode
+
+ ### QWSDecoration
+\endomit
+
+ This document describes the process of porting applications from
+ Qt 3 to Qt 4.
+ If you haven't yet made the decision about porting, or are unsure
+ about whether it is worth it, take a look at the \l{What's New in
+ Qt 4}{key features} offered by Qt 4. See also
+ \l{Moving from Qt 3 to Qt 4} for tips on how to write Qt 3 code
+ that is easy to port to Qt 4.
+
+ \bold{Other porting guides:}
+
+ \list
+ \o \l{Moving from Qt 3 to Qt 4} \mdash covers some high level topics relevant
+ to developers porting from Qt 3 to Qt 4.
+ \o \l{Porting to Qt 4 - Drag and Drop} \mdash covers differences in the
+ way drag and drop is handled between Qt 3 and Qt 4.
+ \o \l{Porting .ui Files to Qt 4} \mdash describes the new format used to
+ describe forms created with \QD.
+ \o \l{Porting to Graphics View} \mdash provides a class-by-class overview
+ of the differences between Qt 3's canvas API and Qt 4's Graphics
+ View framework.
+ \o \l{qt3to4 - The Qt 3 to 4 Porting Tool} \mdash provides an overview
+ of a tool aimed at helping developers start the process of porting an
+ application to Qt 4.
+ \endlist
+
+ The Qt 4 series is not binary compatible with the 3 series. This
+ means programs compiled for Qt 3 must be recompiled to work with
+ Qt 4. Qt 4 is also not completely \e source compatible with 3,
+ however nearly all points of incompatibility cause compiler
+ errors or run-time messages (rather than mysterious results). Qt
+ 4 includes many additional features and discards obsolete
+ functionality. Porting from Qt 3 to Qt 4 requires some effort,
+ but once completed the considerable additional power and
+ flexibility of Qt 4 is available for use in your applications.
+
+ To port code from Qt 3 to Qt 4:
+
+ \list 1
+
+ \o Briefly read the porting notes below to get an idea of what to expect.
+
+ \o Be sure that your code compiles and runs well on all your target
+ platforms with Qt 3.
+
+ \o Add the line \c{QT += qt3support} to your \c .pro file if you use
+ \c qmake; otherwise, edit your makefile or project file to
+ link against the Qt3Support library and add \c -DQT3_SUPPORT to your
+ compiler flags. (You might also need to specify other
+ libraries. See \l{What's New in Qt 4} for details.)
+
+ \o Run the \l qt3to4 porting tool. The tool will go through your
+ source code and adapt it to Qt 4.
+
+ \o Follow the instructions in the \l{Porting .ui Files to Qt 4}
+ page to port Qt Designer files.
+
+ \o Recompile with Qt 4. For each error, search below for related
+ identifiers (e.g., function names, class names). This document
+ mentions all relevant identifiers to help you get the information
+ you need at the cost of being a little verbose.
+
+ \endlist
+
+ The \l qt3to4 porting tool replaces occurrences of Qt 3 classes
+ that don't exist anymore in Qt 4 with the corresponding Qt 3
+ support class; for example, \c QListBox is turned into \c
+ Q3ListBox.
+
+ At some point, you might want to stop linking against the Qt 3
+ support library (\l{Qt3Support}) and take advantage of Qt 4's
+ new features. The instructions below explain how to do that for
+ each compatibility class.
+
+ In addition to the Qt3Support classes (such as \c Q3Action, \c
+ Q3ListBox, and \c Q3ValueList), Qt 4 provides compatibility
+ functions when it's possible for an old API to cohabit with the
+ new one. For example, QString provides a
+ QString::simplifyWhiteSpace() compatibility function that's
+ implemented inline and that simply calls QString::simplified().
+ \bold{The compatibility functions are not documented here; instead,
+ they are documented for each class.}
+
+ If you have the line \c{QT += qt3support} in your \c .pro file, \c
+ qmake will automatically define the \c QT3_SUPPORT symbol, turning
+ on compatibility function support. You can also define the symbol
+ manually (e.g., if you don't want to link against the \c
+ Qt3Support library), or you can define \c QT3_SUPPORT_WARNINGS
+ instead, telling the compiler to emit a warning when a
+ compatibility function is called. (This works only with GCC 3.2+
+ and MSVC 7.)
+
+ If you get stuck, ask on the
+ \l{http://lists.trolltech.com/qt-interest/}{qt-interest}
+ mailing list. If you are a licensed customer, you can also contact
+ Qt's technical support team.
+
+\omit
+ ### what to do with slots that aren't slots anymore
+ ### what to do with virtual functions that aren't virtual anymore
+ ### what to do with virtual functions that changed signature
+\endomit
+
+\omit
+ ### <qtl.h> -- stuff that vanished?
+ ### implicit sharing
+ ### uint -> int indexes
+\endomit
+
+ Table of contents:
+
+ \tableofcontents{4}
+
+\omit
+ \section1 Header Files
+
+ ### New style of headers
+
+ \table
+ \header \o Old header \o New header
+ \row \o \c{<qtl.h>} \o \c{<qalgorithms.h>} or \c{<QtAlgorithms>}
+ \endtable
+
+ ### Some headers don't include each other anymore...
+\endomit
+
+ \section1 Casting and Object Types
+
+ In Qt 3, it was possible to use the \c qt_cast() function to determine
+ whether instances of QObject subclasses could be safely cast to derived
+ types of those subclasses. For example, if a QFrame instance is passed
+ to a function whose signature specifies a QWidget pointer as its argument,
+ \c qt_cast() could be used to obtain a QFrame pointer so that the
+ instance's functions can be accessed.
+
+ In Qt 4, much of this functionality is provided by the qobject_cast()
+ function, and additional functions also provide similar functionality for
+ certain non-QObject types:
+
+ \table
+ \header \o Qt 3 function \o Qt 4 function
+ \row \o T *qt_cast<T *>(QObject *) \o \l{qobject_cast()}{T *qobject_cast<T *>(QObject *)}
+ \row \o \o \l{qgraphicsitem_cast()}{T qgraphicsitem_cast<T>(QGraphicsItem *)}
+ \row \o \o \l{qstyleoption_cast()}{T qstyleoption_cast<T>(QStyleOption *)}
+ \row \o \o \l{qvariant_cast()}{T qvariant_cast<T>(const QVariant &)}
+ \row \o \o \l{qdbus_cast()}{T qdbus_cast(const QDBusArgument &)}
+ \endtable
+
+\omit
+ \section1 Global Functions
+
+ \table
+ \header \o Qt 3 function \o Qt 4 function
+ \row \o cstrcmp() \o strcmp()
+ \row \o cstrcpy() \o strcpy()
+ \row \o cstrlen() \o strlen()
+ \row \o cstrncmp() \o strncmp()
+ \row \o qmemmove() \o memmove()
+ \endtable
+
+ qGLVersion() ###
+
+ copyBlt() ###
+ bitBlt()
+
+ #ifdef compat classes:
+ * QLayoutIterator
+ * QColorGroup
+ * QMenuItem
+
+ QWidget visibleRect property compat
+ QWidget::BackgroundOrigin compat
+\endomit
+
+ \section1 Type Names
+
+ The table below lists the classes that have been renamed in Qt 4.
+ If you compile your applications with \c QT3_SUPPORT defined, the
+ old names will be available.
+
+ Whenever you see an occurrence of the name on the left, you can
+ safely replace it with the Qt 4 equivalent in your program. The
+ \l qt3to4 tool performs the conversion automatically.
+
+ \table
+ \header \o Qt 3 class name \o Qt 4 class name
+ \input porting4-renamedclasses.qdocinc
+ \endtable
+
+ The table below lists the enums and typedefs that have been
+ renamed in Qt 4. If you compile your applications with \c
+ QT3_SUPPORT defined, the old names will be available.
+
+ Whenever you see an occurrence of the name on the left, you can
+ safely replace it with the Qt 4 equivalent in your program. The
+ \l qt3to4 tool performs the conversion
+ automatically.
+
+ \table
+ \header \o Qt 3 type name \o Qt 4 type name
+ \input porting4-renamedtypes.qdocinc
+ \endtable
+
+ \omit
+ ###
+ \row \o QButton::ToggleState \o Use QCheckBox::ToggleState instead.
+ \endomit
+
+ \section1 Enum Values
+
+ The table below lists the enum values that have been renamed in
+ Qt 4. If you compile your applications with \c QT3_SUPPORT defined,
+ the old names will be available.
+
+ Whenever you see an occurrence of the name on the left, you can
+ safely replace it with the Qt 4 equivalent in your program. The
+ \l qt3to4 tool performs the conversion automatically.
+
+ \table
+ \header \o Qt 3 enum value name \o Qt 4 enum value name
+ \input porting4-renamedenumvalues.qdocinc
+ \endtable
+
+ In addition, the following \l{Qt::WindowFlags}{window flags} have
+ been either replaced with \l{Qt::WidgetAttribute}{widget
+ attributes} or have been deprecated:
+
+ \table
+ \header \o Qt 3 type \o Qt 4 equivalent
+ \row \o Qt::WDestructiveClose \o Use QWidget::setAttribute(Qt::WA_DeleteOnClose) instead.
+ \row \o Qt::WStaticContents \o{1,2} Use QWidget::setAttribute(Qt::WA_StaticContents) instead.
+ \row \o Qt::WNorthWestGravity
+ \row \o Qt::WNoAutoErase \o{1,3} Use QWidget::setAttribute(Qt::WA_NoBackground) instead.
+ \row \o Qt::WResizeNoErase
+ \row \o Qt::WRepaintNoErase
+ \row \o Qt::WPaintClever \o Unnecessary in Qt 4.
+ \omit ### Check with Matthias \endomit
+ \row \o Qt::WMacNoSheet \o Unnecessary in Qt 4.
+ \omit ### Check with Sam \endomit
+ \endtable
+
+ In Qt 4.1, the widget flags used to determine window modality were
+ replaced by a single enum that can be used to specify the modal
+ behavior of top-level widgets:
+
+ \table
+ \header \o Qt 3 type \o Qt 4 equivalent
+ \row \o Qt::WShowModal \o Use QWidget::setWindowModality(Qt::ApplicationModal) instead.
+ \row \o Qt::WGroupLeader \o Use QWidget::setWindowModality(Qt::WindowModal)
+ for each child dialog of the group leader, but do not change the modality
+ of the group leader itself.
+ \endtable
+
+ \target properties
+ \section1 Properties
+
+ Some properties have been renamed in Qt 4, to make Qt's API more
+ consistent and more intuitive. For example, QWidget's \c caption
+ property has been renamed \c windowTitle to make it clear that it
+ refers to the title shown in the window's title bar.
+
+ In addition, the property system has been extended to allow
+ properties to be redefined in subclasses with the \l Q_PROPERTY()
+ macro, removing the need for a \c Q_OVERRIDE() macro.
+
+ The table below lists the Qt properties that have been renamed in
+ Qt 4. Occurrences of these in \e{Qt Designer} \c .ui files are
+ automatically converted to the new name by \c uic.
+
+ \table
+ \header \o Qt 3 name \o Qt 4 name
+ \row \o QButton::accel \o QButton::shortcut
+ \row \o QButton::on \o QButton::checked
+ \row \o QButton::toggleButton \o QAbstractButton::checkable
+ \row \o QDial::lineStep \o QDial::singleStep
+ \row \o QDial::maxValue \o QDial::maximum
+ \row \o QDial::minValue \o QDial::minimum
+ \row \o QDialog::modal \o QDialog::isModal
+ \row \o QLineEdit::edited \o QLineEdit::modified
+ \row \o QLineEdit::hasMarkedText \o QLineEdit::hasSelectedText
+ \row \o QLineEdit::markedText \o QLineEdit::selectedText
+ \row \o QObject::name \o QObject::objectName
+ \row \o QProgressDialog::progress \o QProgressDialog::value
+ \row \o QProgressDialog::totalSteps \o QProgressDialog::maximum
+ \row \o QProgressDialog::wasCancelled \o QProgressDialog::wasCanceled
+ \row \o QPushButton::iconSet \o QPushButton::icon
+ \row \o QScrollBar::draggingSlider \o QScrollBar::sliderDown
+ \row \o QScrollBar::lineStep \o QScrollBar::singleStep
+ \row \o QScrollBar::maxValue \o QScrollBar::maximum
+ \row \o QScrollBar::minValue \o QScrollBar::minimum
+ \row \o QSlider::lineStep \o QSlider::singleStep
+ \row \o QSlider::maxValue \o QSlider::maximum
+ \row \o QSlider::minValue \o QSlider::minimum
+ \row \o QSpinBox::lineStep \o QSpinBox::singleStep
+ \row \o QSpinBox::maxValue \o QSpinBox::maximum
+ \row \o QSpinBox::minValue \o QSpinBox::minimum
+ \row \o QTabBar::currentTab \o QTabBar::currentIndex
+ \row \o QTabWidget::currentPage \o QTabWidget::currentWidget
+ \row \o QToolButton::iconSet \o QToolButton::icon
+ \row \o QToolButton::textLabel \o QToolButton::text
+ \row \o QWidget::caption \o QWidget::windowTitle
+ \row \o QWidget::icon \o QWidget::windowIcon
+ \row \o QWidget::iconText \o QWidget::windowIconText
+ \endtable
+
+ A handful of properties in Qt 3 are no longer properties in Qt 4,
+ but the access functions still exist as part of the Qt 4 API.
+ These are not used by \e{Qt Designer}; the only case where you
+ need to worry about them is in highly dynamic applications that
+ use Qt's meta-object system to access properties. Here's the list
+ of these properties with the read and write functions that you
+ can use instead:
+
+ \table
+ \header \o Qt 3 property \o Qt 4 read function \o Qt 4 write function
+ \row \o QSqlDatabase::connectOptions \o QSqlDatabase::connectOptions() \o QSqlDatabase::setConnectOptions()
+ \row \o QSqlDatabase::databaseName \o QSqlDatabase::databaseName() \o QSqlDatabase::setDatabaseName()
+ \row \o QSqlDatabase::hostName \o QSqlDatabase::hostName() \o QSqlDatabase::setHostName()
+ \row \o QSqlDatabase::password \o QSqlDatabase::password() \o QSqlDatabase::setPassword()
+ \row \o QSqlDatabase::port \o QSqlDatabase::port() \o QSqlDatabase::setPort()
+ \row \o QSqlDatabase::userName \o QSqlDatabase::userName() \o QSqlDatabase::setUserName()
+ \endtable
+
+ Some properties have been removed from Qt 4, but the associated
+ access functions are provided if \c QT3_SUPPORT is defined to help
+ porting to Qt 4. When converting Qt 3 \c .ui files to Qt 4, \c uic
+ generates calls to the Qt 3 compatibility functions. Note that
+ this only applies to the properties of the Qt3Support library,
+ i.e. \c QT3_SUPPORT properties of the other libraries must be
+ ported manually when converting Qt 3 .ui files to Qt 4.
+
+ The table below lists these properties with the read and write
+ functions that you can use instead. The documentation for the
+ individual functions explains how to replace them with
+ non-compatibility Qt 4 functions.
+
+ \table
+ \header \o Qt 3 property \o Qt 4 read function (\c QT3_SUPPORT)\o Qt 4 write function (\c QT3_SUPPORT)
+ \row \o QMenuBar::separator \o QMenuBar::separator() \o QMenuBar::setSeparator()
+ \row \o QPushButton::menuButton \o QPushButton::isMenuButton() \o N/A
+ \row \o QTabWidget::margin \o QTabWidget::margin() \o QTabWidget::setMargin()
+ \row \o QTextEdit::textFormat \o QTextEdit::textFormat() \o QTextEdit::setTextFormat()
+ \row \o QWidget::backgroundBrush \o QWidget::backgroundBrush() \o N/A
+ \row \o QWidget::backgroundMode \o QWidget::backgroundMode() \o QWidget::setBackgroundMode()
+ \row \o QWidget::backgroundOrigin \o QWidget::backgroundOrigin() \o QWidget::setBackgroundOrigin()
+ \row \o QWidget::colorGroup \o QWidget::colorGroup() \o QWidget::setColorGroup()
+ \row \o QWidget::customWhatsThis \o QWidget::customWhatsThis() \o QWidget::setCustomWhatsThis()
+ \row \o QWidget::inputMethodEnabled \o QWidget::inputMethodEnabled() \o QWidget::setInputMethodEnabled()
+ \row \o QWidget::ownCursor \o QWidget::ownCursor() \o N/A
+ \row \o QWidget::ownFont \o QWidget::ownFont() \o N/A
+ \row \o QWidget::ownPalette \o QWidget::ownPalette() \o N/A
+ \row \o QWidget::paletteBackgroundColor \o QWidget::paletteBackgroundColor() \o QWidget::setPaletteBackgroundColor()
+ \row \o QWidget::paletteBackgroundPixmap \o QWidget::paletteBackgroundPixmap() \o QWidget::setPaletteBackgroundPixmap()
+ \row \o QWidget::paletteForegroundColor \o QWidget::paletteForegroundColor() \o QWidget::setPaletteForegroundColor()
+ \row \o QWidget::underMouse \o QWidget::underMouse() \o N/A
+ \endtable
+
+ The following Qt 3 properties and their access functions are no
+ longer available in Qt 4. In most cases, Qt 4 provides similar
+ functionality.
+
+ \table
+ \header \o Qt 3 property \o Qt 4 equivalent
+ \row \o QButton::autoRepeat \o N/A
+ \row \o QButton::autoResize \o Call QWidget:setFixedSize(QWidget::sizeHint()) whenever you change the contents.
+ \row \o QButton::exclusiveToggle \o See \l QAbstractButton::autoExclusive.
+ \row \o QButton::pixmap \o Use QAbstractButton::icon instead.
+ \row \o QButton::toggleState \o Use QCheckBox::setState() and QCheckBox::state() instead.
+ \row \o QButton::toggleType \o Use QCheckBox::setTristate() instead.
+ \row \o QComboBox::autoResize \o Call QWidget:setFixedSize(QWidget::sizeHint()) whenever you change the contents.
+ \row \o QFrame::contentsRect \o Use Q3Frame::contentsRect() instead.
+ \row \o QFrame::margin \o Use QWidget::setContentsMargins() instead.
+ \row \o QTabBar::keyboardFocusTab \o N/A
+ \row \o QToolButton::offIconSet \o Use the \l{QIcon::Off}{off component} of QAbstractButton::icon instead.
+ \row \o QToolButton::onIconSet \o Use the \l{QIcon::On}{on component} of QAbstractButton::icon instead.
+ \row \o QWidget::microFocusHint \o N/A
+ \endtable
+
+\omit
+ \section1 Inheritance Chain
+
+ ### QMenuBar, etc.
+
+ \section1 Null vs. Empty
+
+ ###
+\endomit
+
+ \section1 Explicit Sharing
+
+ Qt 4 is the first version of Qt that contains no \link
+ http://doc.trolltech.com/3.3/shclass.html explicitly shared
+ \endlink classes. All classes that were explicitly shared in Qt 3
+ are \e implicitly shared in Qt 4:
+
+ \list
+ \o QImage
+ \o QBitArray
+ \o QByteArray
+ \o Q3PointArray
+ \endlist
+
+ This means that if you took a copy of an instance of the class
+ (using operator=() or the class's copy constructor), any
+ modification to the copy would affect the original and vice
+ versa. Needless to say, this behavior is rarely desirable.
+
+ Fortunately, nearly all Qt 3 applications don't rely on explicit
+ sharing. When porting, you typically only need to remove calls to
+ detach() and/or copy(), which aren't necessary anymore.
+
+ If you deliberately rely on explicit sharing in your application,
+ you can use pointers or references to achieve the same result in
+ Qt 4.
+
+ \oldcode
+ void asciify(QByteArray array)
+ {
+ for (int i = 0; i < (int)array.size(); ++i) {
+ if ((uchar)array[i] >= 128)
+ array[i] = '?';
+ }
+ }
+ \newcode
+ void asciify(QByteArray &array)
+ {
+ for (int i = 0; i < array.size(); ++i) {
+ if ((uchar)array[i] >= 128)
+ array[i] = '?';
+ }
+ }
+ \endcode
+
+ (Notice the \c & in the parameter declaration.)
+
+\omit
+ \section1 Qt Designer .ui Files
+
+ ###
+\endomit
+
+ \section1 Painting and Redrawing Widgets
+
+ When implementing custom widgets in Qt 3, it was possible to use
+ QPainter to draw on a widget outside paint events. This made it
+ possible to integrate Qt applications with third party libraries
+ and tools that impose their own rendering models. For example,
+ a widget might be repainted in a slot using data obtained from
+ an external source.
+
+ In Qt 4, it is only possible to paint on a widget from within its
+ \l{QWidget::}{paintEvent()} handler function. This restriction simplifies
+ Qt's interaction with native window systems, improves the performance
+ of applications by reducing the number of redraw operations, and
+ also enables features to be implemented to improve the appearance of
+ widgets, such as a backing store.
+
+ Generally, we recommend redesigning applications to perform all
+ painting operations in \l{QWidget::}{paintEvent()} functions, deferring
+ actual painting until the next time this function is called.
+ Applications can post paint events to trigger repaints, and it may be
+ possible to examine your widget's internal state to determine which
+ part of the widget needs to be repainted.
+
+ If asynchronous repaints are used extensively by your application,
+ and it is not practical to redesign the rendering model to perform
+ all painting operations from within a widget's \l{QWidget::}{paintEvent()}
+ function, it may be necessary to consider using an intermediate painting
+ step. In this approach, one or more images can be updated asynchronously
+ and painted on the widget in the paint event. To avoid excessive
+ buffering, it may be worthwhile disabling the backing store by setting
+ the widget's Qt::WA_PaintOnScreen widget attribute.
+
+ On certain platforms, the Qt::WA_PaintOutsidePaintEvent widget attribute
+ can be set to allow a widget to be painted from outside paint events.
+
+ \note Setting widget attributes to disable key features of Qt's widget
+ rendering model may also cause other features to be disabled.
+
+ \section1 QAccel
+
+ The \c QAccel class has been renamed Q3Accel and moved to the
+ Qt3Support module. In new applications, you have three options:
+
+ \list 1
+ \o You can use QAction and set a key sequence using QAction::setShortcut().
+ \o You can use QShortcut, a class that provides similar
+ functionality to Q3Accel.
+ \o You can use QWidget::grabShortcut() and process "shortcut"
+ events by reimplementing QWidget::event().
+ \endlist
+
+ The Q3Accel class also supports multiple accelerators using the
+ same object, by calling Q3Accel::insertItem() multiple times. In
+ Qt 4, the solution is to create multiple QShortcut objects.
+
+ \section1 QAccessibleInterface
+
+ The QAccessibleInterface class has undergone some API changes in
+ Qt 4, to make it more consistent with the rest of the Qt API.
+
+ If you have classes that inherit QAccessibleInterface or one of
+ its subclasses (QAccessibleObject, QAccessibleWidget, etc.), you
+ must port them the new QAccessibleInterface API.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions}
+ for a list of QAccessibleInterface virtual member functions in
+ Qt 3 that are no longer virtual in Qt 4.
+
+ \section1 QAccessibleTitleBar
+
+ The \c QAccessibleTitleBar has been renamed Q3AccessibleTitleBar
+ and moved to the Qt3Support library.
+
+ \target qaction.section
+ \section1 QAction
+
+ The QAction class has been redesigned in Qt 4 to integrate better
+ with the rest of the menu system. It unifies the old \c QMenuItem
+ class and the old \c QAction class into one class, avoiding
+ unnecessary data duplication and the need to learn two different
+ APIs.
+
+ The old \c QAction and \c QActionGroup classes have been renamed
+ Q3Action and Q3ActionGroup and moved to Qt3Support. In addition,
+ the new QAction class has compatibility functions to ease
+ transition to Qt 4. Note that when using Q3ToolBar and
+ Q3PopupMenu, their actions must be \l {Q3Action}s.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions}
+ for a list of QAction virtual member functions in Qt 3 that are
+ no longer virtual in Qt 4.
+
+ \section1 QActionGroup
+
+ The QAction class has been completely redesigned in Qt 4 to
+ integrate better with the rest of the menu system. See the
+ \l{#qaction.section}{section on QAction} for details.
+
+ \section1 QApplication
+
+ The QApplication class has been split into two classes:
+ QCoreApplication and QApplication. The new QApplication class
+ inherits QCoreApplication and adds GUI-related functionality. In
+ practice, this has no consequences for existing Qt applications.
+
+ In addition, the following API changes were made:
+
+ \list 1
+ \o QApplication::allWidgets() and QApplication::topLevelWidgets()
+ used to return a pointer to a QWidgetList. Now they return a
+ QWidgetList.
+
+ Also, QWidgetList has changed from being a typedef for
+ QPtrList<QWidget> to being a typedef for QList<QWidget *>.
+ See the \l{#qwidgetlist.section}{section on QWidgetList} below
+ for details.
+
+ \oldcode
+ QWidgetList *list = QApplication::topLevelWidgets();
+ QWidgetListIt it(*list);
+ QWidget *widget;
+ while ((widget = it.current())) {
+ if (widget->inherits("MainWindow"))
+ ((MainWindow *)widget)->updateRecentFileItems();
+ ++it;
+ }
+ delete list;
+ \newcode
+ QWidgetList list = QApplication::topLevelWidgets();
+ for (int i = 0; i < list.size(); ++i) {
+ if (MainWindow *mainWin = qobject_cast<MainWindow *>(list.at(i)))
+ mainWin->updateRecentFileItems();
+ }
+ \endcode
+ \o QApplication::setMainWidget() is no longer used. When all an application's
+ windows are closed, the application will exit normally.
+ \endlist
+
+ \section1 QAquaStyle
+
+ The \c QAquaStyle class first appeared in Qt 3.0, when the Qt for
+ Mac OS X port was first released. It emulated Apple's "Aqua" theme.
+ In Qt 3.1, QAquaStyle was obsoleted by QMacStyle, which uses Appearance
+ Manager to perform its drawing.
+
+ The \c QAquaStyle class is no longer provided in Qt 4. Use
+ QMacStyle instead.
+
+ \target qasciidict.section
+ \section1 QAsciiCache<T>
+
+ \c QAsciiCache<T> has been renamed Q3AsciiCache<T> and moved to
+ the Qt3Support library. It has been replaced by
+ QCache<QByteArray, T>.
+
+ For details, read the \l{#qcache.section}{section on QCache<T>},
+ mentally substituting QByteArray for QString.
+
+ \section1 QAsciiDict<T>
+
+ QAsciiDict<T> and QAsciiDictIterator<T> have been renamed
+ Q3AsciiDict<T> and Q3AsciiDictIterator<T> and moved to the
+ Qt3Support library. They have been replaced by the
+ more modern QHash<Key, T> and QMultiHash<Key, T> classes and
+ their associated iterator classes.
+
+ When porting old code that uses Q3AsciiDict<T> to Qt 4, there are
+ four classes that you can use:
+
+ \list
+ \o QMultiHash<QByteArray, T *>
+ \o QMultiHash<QByteArray, T>
+ \o QHash<QByteArray, T *>
+ \o QHash<QByteArray, T>
+ \endlist
+
+ For details, read the \l{#qdict.section}{section on QDict<T>},
+ mentally substituting QByteArray for QString.
+
+ \section1 QAsyncIO
+
+ The \c QAsyncIO class was used internally in Qt 2.x in
+ conjunction with QImageConsumer. It was obsoleted in Qt 3.0.
+
+ \input porting4-obsoletedmechanism.qdocinc
+
+ \section1 QBackInsertIterator
+
+ The undocumented \c QBackInsertIterator class has been removed
+ from the Qt library. If you need it in your application, feel
+ free to copy the source code from the Qt 3 \c <qtl.h> header
+ file.
+
+ \section1 QBitArray
+
+ In Qt 3, QBitArray inherited from QByteArray. In Qt 4, QBitArray
+ is a totally independent class. This makes very little difference
+ to the user, except that the new QBitArray doesn't provide any of
+ QByteArray's byte-based API anymore. These calls will result in a
+ compile-time error, except calls to QBitArray::truncate(), whose
+ parameter was a number of \e bytes in Qt 3 and a number of bits
+ in Qt 4.
+
+ QBitArray was an explicitly shared class in Qt 3. See \l{Explicit
+ Sharing} for more information.
+
+ The \c QBitVal class has been renamed QBitRef.
+
+ \section1 QButton
+
+ The \c QButton class has been replaced by QAbstractButton in Qt
+ 4. Classes like QPushButton and QRadioButton inherit from
+ QAbstractButton. As a help when porting older Qt applications,
+ the Qt3Support library contains a Q3Button class
+ implemented in terms of the new QAbstractButton.
+
+ If you used the \c QButton class as a base class for your own
+ button type and want to port your code to the newer
+ QAbstractButton, you need to be aware that QAbstractButton has no
+ equivalent for the Q3Button::drawButton(QPainter *) virtual
+ function. The solution is to reimplement QWidget::paintEvent() in
+ your QAbstractButton subclass as follows:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 0
+
+ \table
+ \header \o Q3Button function \o QAbstractButton equivalent
+ \row \o Q3Button::autoResize() \o Call QWidget:setFixedSize(QWidget::sizeHint()) whenever you change the contents.
+ \row \o Q3Button::isExclusiveToggle() \o Use QAbstractButton::group() or QAbstractButton::autoExclusive() instead.
+ \row \o Q3Button::pixmap() const \o QAbstractButton::icon()
+ \row \o Q3Button::setAutoResize() \o N/A
+ \row \o Q3Button::setPixmap(const QPixmap &) \o QAbstractButton::setIcon(const QIcon &)
+ \row \o Q3Button::setState(ToggleState) \o See remark below
+ \row \o Q3Button::setToggleType(ToggleType) \o See remark below
+ \row \o Q3Button::state() \o See remark below
+ \row \o Q3Button::stateChanged(int) \o See remark below
+ \row \o Q3Button::toggleType() \o See remark below
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o In Qt 3, \c QButton had a "toggle type", which could be
+ QButton::SingleShot, QButton::Toggle, or QButton::Tristate.
+ The new QAbstractButton class doesn't support "tristate"
+ directly; this feature is implemented in QCheckBox instead.
+ The two other "toggle types" (\c QButton::SingleShot and \c
+ QButton::Toggle) are replaced by a QAbstractButton::checkable
+ property.
+ \o In Qt 3, QButton had a "toggle state", which could be \c
+ QButton::Off, \c QButton::NoChange, or \c QButton::On. In Qt
+ 4, this mechanism has been moved to QCheckBox.
+ \endlist
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of \c QButton virtual member functions in Qt 3 that aren't
+ virtual in Qt 4.
+
+ See \l{#properties}{Properties} for a list of \c QButton properties
+ in Qt 3 that have changed in Qt 4.
+
+ \section1 QButtonGroup
+
+ The \c QButtonGroup class has been completely redesigned in Qt 4.
+ For compatibility, the old \c QButtonGroup class has been renamed
+ Q3ButtonGroup and has been moved to Qt3Support.
+ Likewise, the \c QHButtonGroup and \c QVButtonGroup convenience
+ subclasses have been renamed \c Q3HButtonGroup and \c Q3VButtonGroup and
+ moved to the Qt3Support library.
+
+ The old \c QButtonGroup, as well as Q3ButtonGroup, can be used in two ways:
+
+ \list 1
+ \o The button group is the parent widget of a number of buttons,
+ i.e. the button group is the parent argument in the button
+ constructor. The buttons are assigned identifiers 0, 1, 2, etc.,
+ in the order they are created. A Q3ButtonGroup can display a frame
+ and a title because it inherits Q3GroupBox.
+ \o The button group is an invisible widget and the contained
+ buttons have some other parent widget. In this usage, each
+ button must be manually inserted, using
+ Q3ButtonGroup::insert(), into the button group and given an
+ ID number.
+ \endlist
+
+ Unlike Q3ButtonGroup, the new QButtonGroup doesn't inherit
+ QWidget. It is very similar to a "hidden Q3ButtonGroup".
+
+ If you use a Q3ButtonGroup, Q3HButtonGroup, or Q3VButtonGroup as
+ a widget and want to port to Qt 4, you can replace it with
+ QGroupBox. In Qt 4, radio buttons with the same parent are
+ automatically part of an exclusive group, so you normally don't
+ need to do anything else. See also the
+ \l{#qgroupbox.section}{section on QGroupBox} below.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QButtonGroup virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \target qbytearray.section
+ \section1 QByteArray
+
+ In Qt 3, QByteArray was simply a typedef for QMemArray<char>. In
+ Qt 4, QByteArray is a class in its own right, with a higher-level
+ API in the style of QString.
+
+ Here are the main issues to be aware of when porting to Qt 4:
+
+ \list 1
+ \o The QMemArray(int size) constructor has been replaced with
+ QByteArray(int size, char ch). The second argument specifies
+ which character should be used for initializing the array;
+ pass '\\0' if you have no specific needs.
+
+ \oldcode
+ QByteArray ba(64);
+ \newcode
+ QByteArray ba(64, '\0');
+ \endcode
+
+ \o QMemArray::at() returned a non-const reference, whereas the
+ new QByteArray::at() returns a const value. Code like
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 1
+
+ will no longer compile. Instead, use QByteArray::operator[]:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 2
+
+ \o The QMemArray::contains(char) function has been renamed
+ QByteArray::count(char). In addition, there now exists a
+ QByteArray::contains(char) function that returns a boolean
+ value. Replace old calls to contains() with either count() or
+ contains(), depending on whether you care about the specific
+ number of occurrences of a character in the byte array or
+ only care about whether the array contains that character or
+ not.
+
+ \o The new QByteArray has no assign() function. Calls to
+ QMemArray::assign(const QMemArray &) can be replaced by calls
+ to QByteArray::operator=(). Calls to QMemArray::assign(const
+ T *, uint) have no equivalent in Qt 4; if you use it, the
+ solution is either to use QByteArray::fromRawData() and to
+ call free() yourself to avoid a memory leak, or to use the
+ QByteArray(const char *, int) constructor, which will take a
+ deep copy of the data.
+
+ \o QMemArray::bsearch() and QMemArray::sort() have no equivalent
+ in the new QByteArray class. Use \l qBinaryFind() and \l qSort()
+ if you need that functionality.
+ \endlist
+
+ QByteArray was an explicitly shared class in Qt 3. See
+ \l{Explicit Sharing} for more information.
+
+ \target qcache.section
+ \section1 QCache<T>
+
+ QCache<T> has been renamed Q3Cache<T> and moved to Qt3Support.
+ The new QCache class has a different API, and takes different
+ template parameters: QCache<Key, T>.
+
+ When porting to Qt 4, QCache<QString, T> is the obvious
+ substitute for Q3Cache<T>. The following table summarizes the API
+ differences.
+
+ \table
+ \header \o Q3Cache<T> function \o QCache<QString, T> equivalent
+ \row \o Q3Cache::Q3Cache(int maxCost, int size, bool caseSensitive) \o See remark below
+ \row \o Q3Cache::autoDelete() \o N/A
+ \row \o Q3Cache::count() \o QCache::count() or QCache::size() (equivalent)
+ \row \o Q3Cache::setAutoDelete() \o See remark below
+ \row \o Q3Cache::size() \o N/A
+ \row \o Q3Cache::statistics() \o N/A
+ \row \o Q3Cache::operator=() \o See remark below
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o Q3Cache requires the user to allocate a specific number of
+ buckets by passing a prime number (17 by default) to the
+ constructor. In contrast, the new QCache's hash table
+ automatically grows and shrinks as needed, and the
+ constructor doesn't take a prime number.
+
+ \o Q3Cache supportes case-insensitive lookups by passing false as
+ second argument to the constructor. This feature has no
+ equivalent in QMultiHash. Instead, call QString::toLower()
+ before you insert or lookup a key in the hash.
+
+ \o The Q3Cache::insert() function returns a \c bool value that
+ indicates whether or not the item actually was inserted in
+ the cache. If the item wasn't inserted, it was the caller's
+ responsibility to delete the item. The new QCache::insert()
+ function returns \c void and either adds it to the cache or
+ deletes it right away. Old code like
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 3
+
+ becomes
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 4
+
+ \o The new QCache class \e always takes ownership of the items
+ it stores (i.e. auto-delete is always on). If you use Q3Cache
+ with auto-delete turned off (the rarely useful default), you
+ cannot use QCache as a direct substitute. One unelegant trick
+ that works well in practice is to use QCache<QString, T *>
+ instead of QCache<QString, T>. In that case, QCache owns the
+ pointers, not the objects that the pointers refer to. For
+ example,
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 5
+
+ becomes
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 6
+
+ An alternative is to stick to using Q3Cache.
+ \endlist
+
+ QCacheIterator<T> has been renamed Q3CacheIterator<T> and moved
+ to the Qt3Support library. The new QCache class
+ doesn't offer any iterator types.
+
+ \section1 QCanvas
+
+ The canvas module classes have been
+ renamed and moved to the Qt3Support library.
+
+ \table
+ \header \o Qt 3 class name \o Compatibility class in Qt 4
+ \row \o \c QCanvas \o Q3Canvas
+ \row \o \c QCanvasEllipse \o Q3CanvasEllipse
+ \row \o \c QCanvasItem \o Q3CanvasItem
+ \row \o \c QCanvasItemList \o Q3CanvasItemList
+ \row \o \c QCanvasLine \o Q3CanvasLine
+ \row \o \c QCanvasPixmap \o Q3CanvasPixmap
+ \row \o \c QCanvasPixmapArray \o Q3CanvasPixmapArray
+ \row \o \c QCanvasPolygon \o Q3CanvasPolygon
+ \row \o \c QCanvasPolygonalItem \o Q3CanvasPolygonalItem
+ \row \o \c QCanvasRectangle \o Q3CanvasRectangle
+ \row \o \c QCanvasSpline \o Q3CanvasSpline
+ \row \o \c QCanvasSprite \o Q3CanvasSprite
+ \row \o \c QCanvasText \o Q3CanvasText
+ \row \o \c QCanvasView \o Q3CanvasView
+ \endtable
+
+ \l{The Graphics View Framework} replaces QCanvas. For more on porting to
+ Graphics View, see \l{Porting to Graphics View}.
+
+ \section1 QColor
+
+ In Qt 4, QColor is a value type like QPoint or QRect. Graphics
+ system-specific code has been implemented in QColormap.
+
+ The \c QColor::maxColors() function has been replaced
+ by QColormap::size().
+
+ The \c QColor::numBitPlanes() function has been replaced
+ by QColormap::depth().
+
+ The \c QColor::setNamedColor() function no longer supports
+ the named color in the same way as Qt 3. Qt 4's
+ \l{QColor::}{setNamedColor()} uses the new W3C convention
+ as stated
+ \l{http://www.w3.org/TR/SVG/types.html#ColorKeywords}{here}.
+
+ \table
+ \header \o{4,1} Predefined Qt Colors
+ \row \o Qt::color0 \o Qt::color1 \o Qt::black \o Qt::white
+ \row \o Qt::darkGray \o Qt::gray \o Qt::lightGray \o Qt::red
+ \row \o Qt::green \o Qt::blue \o Qt::cyan \o Qt::magenta
+ \row \o Qt::yellow \o Qt::darkRed \o Qt::darkGreen \o Qt::darkBlue
+ \row \o Qt::darkCyan \o Qt::darkMagenta \o Qt::darkYellow \o Qt::transparent
+ \endtable
+
+ The predefined colors listed in the table above were static
+ QColor objects in Qt 3. In Qt 4, they are enum values of type
+ Qt::GlobalColor. Thanks to the implicit QColor(Qt::GlobalColor)
+ constructor, the enum values are automatically converted to
+ \l{QColor}s in most contexts. Occasionally, you might need a
+ cast.
+
+ \oldcode
+ QColor lightCyan = Qt::cyan.light(180);
+ \newcode
+ QColor lightCyan = QColor(Qt::cyan).light(180);
+ \endcode
+
+ \section1 QColorGroup
+
+ In Qt 3, a QPalette consisted of three QColorGroup objects. In Qt
+ 4, the (rarely used) QColorGroup abstraction has been eliminated.
+ For source compatibility, a QColorGroup class is available when
+ \c QT3_SUPPORT is defined.
+
+ The new QPalette still works in terms of color groups, specified
+ through enum values (QPalette::Active, QPalette::Disabled, and
+ QPalette::Inactive). It also has the concept of a \e current
+ color group, which you can set using
+ QPalette::setCurrentColorGroup().
+
+ The QPalette object returned by QWidget::palette() returns a
+ QPalette initialized with the correct current color group for the
+ widget. This means that if you had code like
+
+ \badcode
+ painter.setBrush(colorGroup().brush(QColorGroup::Text));
+ \endcode
+
+ you can simply replace colorGroup() with palette():
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 7
+
+ \section1 QColorDrag
+
+ The \c QColorDrag class has been renamed Q3ColorDrag and moved to
+ the Qt3Support library. In Qt 4, use QMimeData
+ instead and call QMimeData::setColor() to set the color.
+
+ \section1 QComboBox
+
+ In Qt 3, the list box used to display the contents of a \c QComboBox
+ widget could be accessed by using the \c listBox() function. In Qt 4,
+ the standard list box is provided by a QListView widget, and can be
+ accessed with the \l{QComboBox::view()}{view()} function.
+
+ \omit ### \endomit
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QComboBox virtual member functions in Qt 3 that are no longer
+ virtual in Qt 4.
+
+ \section1 QCString
+
+ In Qt 3, QCString inherited from QByteArray. The main drawback
+ of this approach is that the user had the responsibility of
+ ensuring that the string is '\\0'-terminated. Another important
+ issue was that conversions between \c QCString and QByteArray often
+ gave confusing results. (See the
+ \l{http://doc.trolltech.com/qq/qq05-achtung.html#qcstringisastringofchars}{Achtung!
+ Binary and Character Data} article in \e{Qt Quarterly} for an
+ overview of the pitfalls.)
+
+ Qt 4 solves that problem by merging the QByteArray and \c QCString
+ classes into one class called QByteArray. Most functions that
+ were in \c QCString previously have been moved to QByteArray. The
+ '\\0' issue is handled by having QByteArray allocate one extra
+ byte that it always sets to '\\0'. For example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 8
+
+ The Qt3Support library contains a class called
+ Q3CString that inherits from the new QByteArray class and that
+ extends it to provide an API that is as close to the old \c QCString
+ class as possible. Note that the following functions aren't
+ provided by Q3CString:
+
+ \list
+ \o QCString::find(const QRegExp &, int)
+ \o QCString::findRev(const QRegExp &, int)
+ \o QCString::contains(const QRegExp &)
+ \o QCString::replace(const QRegExp &, const char *)
+ \endlist
+
+ The following functions have lost their last parameter, which
+ specified whether the search was case sensitive or not:
+
+ \list
+ \o QByteArray::find(char, int)
+ \o QByteArray::find(const char *, int)
+ \o QByteArray::findRev(char, int)
+ \o QByteArray::findRev(const char *, int)
+ \o QByteArray::contains(char)
+ \o QByteArray::contains(const char *)
+ \endlist
+
+ In both cases, the solution is to convert the \c QCString to a
+ QString and use the corresponding QString functions instead.
+
+ Also be aware that \c QCString::size() (inherited from
+ QByteArray) used to return the size of the character data \e
+ including the '\\0'-terminator, whereas the new
+ QByteArray::size() is just a synonym for QByteArray::length().
+ This brings QByteArray in line with QString.
+
+ When porting to Qt 4, occurrences of \c QCString should be
+ replaced with QByteArray or QString. The following table
+ summarizes the API differences between the Q3CString
+ class and the Qt 4 QByteArray and QString classes:
+
+ \table
+ \header \o Q3CString function \o Qt 4 equivalent
+ \row \o Q3CString::Q3CString(const char *, uint) \o See remark below
+ \row \o Q3CString::Q3CString(int) \o QByteArray::QByteArray(int, char)
+ \row \o Q3CString::leftJustify() \o QString::leftJustified()
+ \row \o Q3CString::length() \o QByteArray::length() or QByteArray::size() (equivalent)
+ \row \o Q3CString::lower() \o QByteArray::toLower()
+ \row \o Q3CString::rightJustify() \o QString::rightJustified()
+ \row \o Q3CString::setExpand() \o See remark below
+ \row \o Q3CString::simplifyWhiteSpace() \o QByteArray::simplified()
+ \row \o Q3CString::sprintf() \o QString::sprintf()
+ \row \o Q3CString::stripWhiteSpace() \o QByteArray::trimmed()
+ \row \o Q3CString::toDouble() \o QString::toDouble()
+ \row \o Q3CString::toFloat() \o QString::toFloat()
+ \row \o Q3CString::toInt() \o QString::toInt()
+ \row \o Q3CString::toLong() \o QString::toLong()
+ \row \o Q3CString::toShort() \o QString::toShort()
+ \row \o Q3CString::toUInt() \o QString::toUInt()
+ \row \o Q3CString::toULong() \o QString::toULong()
+ \row \o Q3CString::toUShort() \o QString::toUShort()
+ \row \o Q3CString::upper() \o QByteArray::toUpper()
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o Q3CString(const char *str, uint max) constructs a string of
+ length strlen(str) or \e max - 1, whichever is shorter.
+ QByteArray(const char *data, int size) constructs a byte
+ array containing exactly \e size bytes.
+
+ \oldcode
+ QCString str1("Hello", 4); // "Hel"
+ QCString str2("Hello world!", n);
+ \newcode
+ QByteArray str1("Hello", 3);
+ QByteArray str2("Hello world!");
+ str2.truncate(n - 1);
+ \endcode
+
+ \o Q3CString::setExpand(uint index, char ch) has no equivalent in
+ Qt 4.
+
+ \oldcode
+ QCString str("Hello world");
+ str.setExpand(16, '\n'); // "Hello world \n"
+ \newcode
+ QByteArray str("Hello world");
+ while (str.size() < 16)
+ str += ' ';
+ str += '\n';
+ \endcode
+ \endlist
+
+ Since the old \c QCString class inherited from QByteArray,
+ everything that is said in the \l{#qbytearray.section}{QByteArray
+ section} applies for \c QCString as well.
+
+ \section1 QCustomEvent
+
+ In Qt 3, developers could create a custom event by constructing
+ a new QCustomEvent, and send relevant data to other components in
+ the application by passing a void pointer, either on construction or
+ using the setData() function. Objects could receive custom events
+ by reimplementing the \l{QObject::customEvent()}{customEvent()}
+ function, and access the stored data using the event's data()
+ function.
+
+ In Qt 4, custom events are created by subclassing
+ QEvent. Event-specific data can be stored in a way that is
+ appropriate for your application. Custom events are still
+ delivered to each object's
+ \l{QObject::customEvent()}{customEvent()} handler function, but as
+ QEvent objects rather than as deprecated QCustomEvent objects.
+
+ \section1 QDataBrowser
+
+ The \c QDataBrowser class has been renamed Q3DataBrowser and
+ moved to the Qt3Support library. In Qt 4.2, you should use the
+ QDataWidgetMapper class to create data-aware forms.
+
+ See \l{QtSql Module} for an overview of the new SQL
+ classes.
+
+ \section1 QDataPump
+
+ The \c QDataPump class was used internally in Qt 2.x in
+ conjunction with QImageConsumer. It was obsoleted in Qt 3.0.
+
+ \input porting4-obsoletedmechanism.qdocinc
+
+ \section1 QDataSink
+
+ The \c QDataSink class was used internally in Qt 2.x in conjunction
+ with QImageConsumer. It was obsoleted in Qt 3.0.
+
+ \input porting4-obsoletedmechanism.qdocinc
+
+ \section1 QDataSource
+
+ The \c QDataSource class was used internally in Qt 2.x in
+ conjunction with QImageConsumer. It was obsoleted in Qt 3.0.
+ \input porting4-obsoletedmechanism.qdocinc
+
+ \section1 QDataTable
+
+ The \c QDataTable class has been renamed Q3DataTable and moved to
+ the Qt3Support library. In Qt 4.2, you should use the
+ QDataWidgetMapper class to create data-aware forms.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QDataView
+
+ The \c QDataView class has been renamed Q3DataView and moved to
+ the Qt3Support library. In Qt 4.2, you should use the
+ QDataWidgetMapper class to create data-aware forms.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QDateEdit
+
+ The QDateEdit class in Qt 4 is a convenience class based on
+ QDateTimeEdit. The old class has been renamed Q3DateEdit and moved
+ to the Qt3Support library.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of \c QDateEdit virtual member functions in Qt 3 that are
+ no longer virtual in Qt 4.
+
+ \section1 QDateTimeEditBase
+
+ The \c QDateTimeEditBase class has been renamed
+ Q3DateTimeEditBase and moved to Qt3Support. Use QDateTimeEdit or
+ QAbstractSpinBox instead.
+
+ \section1 QDateTimeEdit
+
+ The old \c QDateTimeEdit class has been renamed
+ Q3DateTimeEditBase and moved to Qt3Support. The new QDateTimeEdit
+ in Qt 4 has been rewritten from scratch to provide a more
+ flexible and powerful API.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QDateTimeEdit virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \section1 QDeepCopy<T>
+
+ The \c QDeepCopy<T> class in Qt 3 provided a means of ensuring that
+ implicitly shared and explicitly shared classes referenced unique
+ data. This was necessary because the reference counting in Qt's
+ container classes was done in a thread-unsafe manner.
+
+ With Qt 4, \c QDeepCopy<T> has been renamed Q3DeepCopy<T> and
+ moved to the Qt3Support library. Removing it from
+ existing code is straightforward.
+
+ \oldcode
+ QString str1 = "I am a string";
+ QDeepCopy<QString> str2 = str1;
+ QString str3 = QDeepCopy<QString>(str2);
+ \newcode
+ QString str1 = "I am a string";
+ QString str2 = str1;
+ QString str3 = str2;
+ \endcode
+
+ \section1 QDial
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QDial virtual member functions in Qt 3 that are no longer
+ virtual in Qt 4.
+
+ See \l{#properties}{Properties} for a list of QDial properties in
+ Qt 3 that have changed in Qt 4.
+
+ \target qdict.section
+ \section1 QDict<T>
+
+ \c QDict<T> has been renamed Q3Dict<T> and moved to Qt3Support.
+ It has been replaced by the more modern QHash<Key, T> and
+ QMultiHash<Key, T> classes.
+
+ When porting old code that uses QDict<T> to Qt 4, there are four
+ classes that you can use:
+
+ \table
+ \header \o Qt 4 class \o When to use it
+ \row \o QMultiHash<QString, T *>
+
+ \o Since Q3Dict<T> is pointer-based and allows duplicate
+ keys, this is usually the most straightforward conversion.
+
+ \row \o QMultiHash<QString, T>
+
+ \o If type \c T is an \l{assignable data type}, you can use
+ \c T as the value type rather than \c{T *}. This often
+ leads to nicer code.
+
+ \row \o QHash<QString, T *>
+
+ \o{1,2} If you don't use duplicate keys, you can use QHash
+ instead of QMultiHash. QMultiHash inherits from QHash.
+
+ \row \o QHash<QString, T>
+ \endtable
+
+ The APIs of Q3Dict<T> and QMultiHash<QString, T *> are quite
+ similar. The main issue is that Q3Dict supports auto-delete
+ whereas QMultiHash doesn't.
+
+ \omit
+ (See \l{What's Wrong with
+ Auto-Delete} for an explanation of why the Qt 4 containers don't
+ offer that feature.)
+ \endomit
+
+ The following table summarizes the API differences between the
+ two classes:
+
+ \table
+ \header \o Q3Dict function \o QMultiHash equivalent
+ \row \o Q3Dict::Q3Dict(int size, bool caseSensitive) \o See remarks below
+ \row \o Q3Dict::autoDelete() \o N/A
+ \row \o Q3Dict::count() \o QMultiHash::count() or QMultiHash::size() (equivalent)
+ \row \o Q3Dict::find(const QString &) \o QMultiHash::value(const QString &)
+ \row \o Q3Dict::remove(const QString &) \o QMultiHash::take(const QString &)
+ \row \o Q3Dict::resize(uint) \o QMultiHash::reserve(int)
+ \row \o Q3Dict::setAutoDelete() \o See discussion below
+ \row \o Q3Dict::size() \o QMultiHash::capacity()
+ \row \o Q3Dict::statistics() \o N/A
+ \row \o Q3Dict::operator[](const QString &) \o See remark below
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o Q3Dict requires the user to allocate a specific number of
+ buckets by passing a prime number (17 by default) to the
+ constructor and/or calling Q3Dict::resize() later on. In
+ contrast, QMultiHash's hash table automatically grows and
+ shrinks as needed, and the constructor doesn't take a prime
+ number.
+
+ \o Q3Dict supportes case-insensitive lookups by passing false as
+ second argument to the constructor. This feature has no
+ equivalent in QMultiHash. Instead, call QString::toLower()
+ before you insert or lookup a key in the hash.
+
+ \o Q3Dict::size() and QMultiHash::size() have different semantics.
+ The former returns the number of buckets in the container, whereas
+ the latter returns the number of \e items in the container.
+
+ \o If there are multiple items with the same key,
+ Q3Dict::remove() removes only the most recently inserted item,
+ whereas QMultiHash::remove() removes all items that share a
+ particular key. To remove only the most recently inserted item,
+ call QMultiHash::take().
+
+ \o Q3Dict has only one [] operator (Q3Dict::operator[]()),
+ providing const access to an item's value. QMultiHash also
+ has a non-const overload that can be used on the left side of
+ the assignment operator. If you use the [] operator on a
+ non-const QHash with an unexisting item, QHash will created
+ an element and initialize it to be a null pointer. For that
+ reason, Q3Dict::operator[] should be converted to
+ QMultiHash::value(), not QMultiHash::operator[].
+
+ \endlist
+
+ If you use Q3Dict's auto-delete feature (by calling
+ Q3Dict::setAutoDelete(true)), you need to do some more work. You
+ have two options: Either you call \c delete yourself whenever you
+ remove an item from the container, or you use
+ QMultiHash<QString, T> instead of QMultiHash<QString, T *> (i.e.
+ store values directly instead of pointers to values). Here, we'll
+ see when to call \c delete.
+
+ The following table summarizes the idioms that you need to watch
+ out for if you want to call \c delete yourself.
+
+ \table
+ \header \o Q3Dict idiom \o QMultiHash idiom
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 9
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 10
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 11
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 12
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 13
+
+ (also called from Q3Dict's destructor)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 14
+
+ In 99% of cases, the following idiom also works:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 15
+
+ However, it may lead to crashes if \c hash is referenced from
+ the value type's destructor, because \c hash contains
+ dangling pointers until clear() is called.
+ \endtable
+
+ Be aware that Q3Dict's destructor automatically calls clear(). If
+ you have a Q3Dict data member in a custom class and use the
+ auto-delete feature, you will need to call \c delete on all the
+ items in the container from your class destructor to avoid a
+ memory leak.
+
+ Finally, \c QDictIterator<T> (renamed Q3DictIterator<T>) must
+ also be ported. There are no fewer than four iterator classes
+ that can be used as a replacement: QHash::const_iterator,
+ QHash::iterator, QHashIterator, and QMutableHashIterator. The
+ most straightforward class to use when porting is
+ QHashIterator<QString, T *>. The following table summarizes the
+ API differences:
+
+ \table
+ \header \o Q3DictIterator functions \o Qt 4 equivalent
+ \row \o Q3DictIterator::count() \o QHash::count() or QHash::size()
+ \row \o Q3DictIterator::current() \o QHashIterator::value()
+ \row \o Q3DictIterator::currentKey() \o QHashIterator::key()
+ \row \o Q3DictIterator::isEmpty() \o QHash::isEmpty()
+ \row \o Q3DictIterator::toFirst() \o QHashIterator::toFront()
+ \row \o Q3DictIterator::operator()() \o QHashIterator::value()
+ \row \o Q3DictIterator::operator*() \o QHashIterator::value()
+ \row \o Q3DictIterator::operator++() \o See remark below
+ \endtable
+
+ Be aware that QHashIterator has a different way of iterating than
+ Q3DictIterator. A typical loop with Q3DictIterator looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 16
+
+ Here's the equivalent QHashIterator loop:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 17
+
+ See \l{Java-style iterators} for details.
+
+ \section1 QDir
+
+ The following functions used to have a boolean \c{acceptAbsPath}
+ parameter that defaulted to true:
+
+ \list
+ \i QDir::filePath()
+ \i QDir::absFilePath()
+ \i QDir::cd()
+ \i QDir::mkdir()
+ \i QDir::rmdir()
+ \i QDir::remove()
+ \i QDir::rename()
+ \i QDir::exists()
+ \endlist
+
+ In Qt 3, if \c acceptAbsPath is true, a file name starting with
+ '/' is be returned without change; if \c acceptAbsPath is false,
+ an absolute path is prepended to the file name. For example:
+
+ \table
+ \header \i Current directory \i File name \i \c acceptAbsPath \i File path
+ \row \i{1,2} /home/tsmith \i{1,2} index.html \i true \i /home/tsmith/index.html
+ \row \i false \i /home/tsmith/index.html
+ \row \i{1,2} /home/tsmith \i{1,2} /index.html \i true \i /index.html
+ \row \i false \i /home/tsmith/index.html
+ \endtable
+
+ In Qt 4, this parameter is no longer available. If you use it
+ in your code, you can check that QDir::isRelativePath() returns
+ false instead.
+
+ \oldcode
+ QDir dir("/home/tsmith");
+ QString path = dir.filePath(fileName, false);
+ \newcode
+ QDir dir("/home/tsmith");
+ QString path;
+ if (dir.isRelativePath(fileName))
+ path = dir.filePath(fileName);
+ else
+ path = fileName;
+ \endcode
+
+ QDir::encodedEntryList() has been removed.
+
+ fileInfoList(), entryInfoList(), and drives() now return a QList<QFileInfo>
+ and not a QPtrList<QFileInfo> *. Code using these methods will not work with
+ the Qt3Support library and must be adapted instead.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QDir virtual member functions in Qt 3 that are no longer
+ virtual in Qt 4.
+
+ QDir::match() now always matches case insensitively.
+
+ QDir::homeDirPath() has been removed. Use QDir::home() instead, and
+ extract the path separately.
+
+ \section1 QDns
+
+ Qt 3 used its own implementation of the DNS protocol and provided
+ a low-level \c QDns class. Qt 4's QHostInfo class uses the system's \c
+ gethostbyname() function from a thread instead.
+
+ The old \c QDns class has been renamed Q3Dns and moved to the
+ Qt3Support library. The new QHostInfo class has a
+ radically different API: It consists mainly of two static
+ functions, one of which is blocking (QHostInfo::fromName()), the
+ other non-blocking (QHostInfo::lookupHost()). See the QHostInfo
+ class documentation for details.
+
+ \section1 QDockArea
+
+ The \c QDockArea class has been renamed Q3DockArea and moved to
+ the Qt3Support library. In Qt 4, QMainWindow handles
+ the dock and toolbar areas itself. See the QMainWindow
+ documentation for details.
+
+ \section1 QDockWindow
+
+ The old \c QDockWindow class has been renamed Q3DockWindow and
+ moved to the Qt3Support library. In Qt 4, there is a
+ new QDockWidget class with a different API. See the class
+ documentation for details.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QDockWidget virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \note \l{Q3DockWindow}'s
+ \l{Q3DockWindow::setHorizontallyStretchable()}{horizontallyStretchable}
+ property can be achieved in QDockWidget with
+ \l{QWidget#Size Hints and Size Policies}{size policies}.
+
+ \section1 QDragObject
+
+ The \c QDragObject class has been renamed Q3DragObject and
+ moved to the Qt3Support library. In Qt 4, it has been
+ replaced by the QMimeData class. See the class documentation for
+ details.
+
+ Note that the Q3DragObject::DragCopyOrMove drag and drop mode is
+ interpreted differently to Qt 3's QDragObject::DragCopyOrMove mode.
+ In Qt 3, a move operation was performed by default, and the user had
+ to hold down the \key{Ctrl} key to perform a copy operation.
+ In Qt 4, a copy operation is performed by default; the user has to
+ hold down the \key{Shift} key to perform a move operation.
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QDropSite
+
+ The \c QDropSite class has been renamed Q3DropSite and moved to
+ the Qt3Support library.
+
+ The QDropSite class has been obsolete ever since Qt 2.0. The only
+ thing it does is call QWidget::setAcceptDrops(true).
+
+ \oldcode
+ class MyWidget : public QWidget, public QDropSite
+ {
+ public:
+ MyWidget(const QWidget *parent)
+ : QWidget(parent), QDropSite(this)
+ {
+ }
+ ...
+ }
+ \newcode
+ class MyWidget : public QWidget
+ {
+ public:
+ MyWidget(const QWidget *parent)
+ : QWidget(parent)
+ {
+ setAcceptDrops(true);
+ }
+ ...
+ }
+ \endcode
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QEditorFactory
+
+ The \c QEditorFactory class has been renamed Q3EditorFactory and
+ moved to the Qt3Support library.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QEventLoop
+
+ In Qt 3, \c QEventLoop combined the Qt event loop and the event
+ dispatching. In Qt 4, these tasks are now assigned to two
+ distinct classes: QEventLoop and QAbstractEventDispatcher.
+
+ If you subclassed QEventLoop to integrate with another library's
+ event loop, you must subclass QAbstractEventDispatcher instead. See
+ the class documentation for details.
+
+ Developers using \c{QEventLoop::loopLevel()} in Qt 3 should use
+ QCoreApplication::loopLevel() instead. Note that this function is
+ marked as obsolete, but it is expected to be available for the
+ lifetime of Qt 4.
+ \omit ### mention virtual functions that aren't virtual anymore \endomit
+
+ \omit
+ \section1 QFile
+
+ The QFile::readLine(QString&, Q_ULONG) method from qt3 has been removed
+ in qt4, but this change in the QFile interface is not documented in the
+ porting documentation as of qt-4.0.0-b1.
+ \endomit
+
+ \section1 QFileDialog
+
+ The QFileDialog class in Qt 4 has been totally rewritten. It
+ provides most of the functionality of the old \c QFileDialog
+ class, but with a different API. Some functionality, such as the
+ ability to preview files, is expected to be added in a later Qt 4
+ release.
+
+ The old \c QFileDialog, \c QFileIconProvider, and \c QFilePreview
+ classes has been renamed Q3FileDialog, Q3FileIconProvider, and
+ Q3FilePreview and have been moved to Qt3Support. You can use them
+ if you need some functionality not provided yet by the new
+ QFileDialog class.
+
+ The following table lists which functions have been renamed or
+ removed in Qt 4.
+
+ \table
+ \header \o Old function \o Qt 4 equivalent
+ \row \o Q3FileDialog::addFilter(const QString &) \o See remark below
+ \row \o Q3FileDialog::addLeftWidget(QWidget *) \o N/A
+ \row \o Q3FileDialog::addRightWidget(QWidget *) \o N/A
+ \row \o Q3FileDialog::addToolButton(QAbstractButton *, bool separator) \o N/A
+ \row \o Q3FileDialog::addWidgets(QLabel *, QWidget *, QPushButton *) \o N/A
+ \row \o Q3FileDialog::dir() \o QFileDialog::directory()
+ \row \o Q3FileDialog::dirPath() \o QFileDialog::directory().path()
+ \row \o Q3FileDialog::iconProvider() \o N/A
+ \row \o Q3FileDialog::isContentsPreviewEnabled() \o N/A
+ \row \o Q3FileDialog::isInfoPreviewEnabled() \o N/A
+ \row \o Q3FileDialog::previewMode() \o N/A
+ \row \o Q3FileDialog::rereadDir() \o N/A
+ \row \o Q3FileDialog::resortDir() \o N/A
+ \row \o Q3FileDialog::selectAll(bool) \o N/A
+ \row \o Q3FileDialog::setContentsPreview(QWidget *, Q3FilePreview *) \o N/A
+ \row \o Q3FileDialog::setContentsPreviewEnabled(bool) \o N/A
+ \row \o Q3FileDialog::setDir(const QString &) \o QFileDialog::setDirectory(const QString &)
+ \row \o Q3FileDialog::setFilters(const char **) \o Q3FileDialog::setFilters(const QStringList &)
+ \row \o Q3FileDialog::setIconProvider(Q3FileIconProvider *) \o N/A
+ \row \o Q3FileDialog::setInfoPreview(QWidget *, Q3FilePreview *) \o N/A
+ \row \o Q3FileDialog::setInfoPreviewEnabled(bool) \o N/A
+ \row \o Q3FileDialog::setPreviewMode(PreviewMode) \o N/A
+ \row \o Q3FileDialog::setSelectedFilter(const QString &) \o QFileDialog::selectFilter(const QString &)
+ \row \o Q3FileDialog::setSelectedFilter(int) \o See remark below
+ \row \o Q3FileDialog::setSelection(const QString &) \o QFileDialog::selectFile(const QString &)
+ \row \o Q3FileDialog::setShowHiddenFiles(bool) \o showHidden()
+ \row \o Q3FileDialog::setUrl(const QUrlOperator &) \o N/A
+ \row \o Q3FileDialog::showHiddenFiles() \o N/A
+ \row \o Q3FileDialog::url() \o QUrl::fromLocalFile(QFileDialog::directory())
+ \header \o Old signals \o Qt 4 equivalent
+ \row \o Q3FileDialog::fileHighlighted(const QString &) \o N/A
+ \row \o Q3FileDialog::fileSelected(const QString &) \o QFileDialog::filesSelected(const QStringList &)
+ \row \o Q3FileDialog::dirEntered(const QString &) \o N/A
+ \row \o Q3FileDialog::filterSelected(const QString &) \o N/A
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o The Q3FileDialog::addFilter(const QString &) function has no
+ direct equivalent in the new QFileDialog. Use
+ QFileDialog::setFilters() instead.
+
+ \oldcode
+ fileDialog->addFilter(tr("JPEG files (*.jpg *.jpeg)"));
+ \newcode
+ QStringList filters = fileDialog->filters();
+ filters << tr("JPEG files (*.jpg *.jpeg)");
+ fileDialog->setFilters(filters);
+ \endcode
+
+ \o The Q3FileDialog::setSelectedFilter(int) overload has no direct
+ equivalent in the new QFileDialog. Use
+ QFileDialog::selectFilter(const QString &) instead.
+
+ \oldcode
+ fileDialog->setSelectedFilter(3);
+ \newcode
+ fileDialog->selectFilter(fileDialog->filters().at(3));
+ \endcode
+ \endlist
+
+ There are no equivalent virtual functions to the two
+ Q3FileDialog::setSelectedFilter() virtual functions in the QFileDialog
+ API. In addition, these functions have been renamed or removed, as
+ described above.
+
+ \section1 QFocusData
+
+ The QFocusData class is not available in Qt 4. Some of its
+ functionality is available via the QWidget::nextInFocusChain()
+ and QWidget::focusNextPrevChild() functions.
+
+ \section1 QFocusEvent
+
+ The setReason() function is no longer present in Qt 4. It is
+ necessary to define the reason when constructing a focus event.
+
+ \section1 QFont
+
+ \c QFont::Script has been moved to QFontDatabase::WritingSystem.
+
+ \section1 QFrame
+
+ The QFrame class has been made more lightweight in Qt 4, by
+ reducing the number of properties and virtual functions. The
+ reduction in the number of virtual functions is significant
+ because QFrame is the base class of many Qt classes.
+
+ Here's an overview of the changes:
+
+ \list
+ \o QFrame no longer has a \c margin property (which wasn't
+ honored by Qt's layout managers anyway).
+
+ \o QFrame no longer has a frameChanged() function, reimplement
+ QFrame::resizeEvent() instead.
+
+ \o QFrame used to have drawFrame(QPainter *) and
+ drawContents(QPainter *) virtual functions. These are now
+ gone. In Qt 4, the frame is drawn by the QFrame::paintEvent()
+ function. If you want to change the way QFrame paints itself,
+ reimplement this function. To draw the contents of the frame,
+ reimplement QFrame:paintEvent() and call the base class
+ implementation of the function before you use the
+ \l {QWidget::}{contentsRect()} function inherited from QWidget,
+ to retrieve the rectangle to paint on.
+
+ \endlist
+
+ To help with porting, the Qt3Support library contains a Q3Frame
+ class that inherits QFrame and provides a similar API to the old
+ QFrame class. If you derived from QFrame in your application, you
+ might want to use Q3Frame as a base class as a first step in the
+ porting process, and later move on to the new QFrame class.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QFrame virtual member functions in Qt 3 that are no longer
+ virtual in Qt 4.
+
+ \section1 QFtp
+
+ QFtp no longer inherits from QNetworkProtocol. See the
+ \l{#qnetworkprotocol.section}{section on QNetworkProtocol} for
+ details.
+
+ The old \c QFtp class has been renamed Q3Ftp and moved to the
+ Qt3Support library.
+
+ \target qglayoutiterator.section
+ \section1 QGLayoutIterator
+
+ The QGLayoutIterator class no longer exists in Qt 4. This makes
+ only a difference if you implemented custom layout managers
+ (i.e., QLayout subclasses).
+
+ The new approach is much simpler: It consists in reimplementing
+ QLayout::itemAt() and QLayout::takeAt(). These functions operate
+ on indexes, eliminating the need for a layout iterator class.
+
+ \section1 QGrid
+
+ The \c QGrid class is now only available as Q3Grid in Qt 4. You
+ can achieve the same result as \c QGrid by creating a QWidget
+ with a grid layout:
+
+ \oldcode
+ QGrid *grid = new QGrid(2, Qt::Horizontal);
+ QPushButton *child1 = new QPushButton(grid);
+ QPushButton *child2 = new QPushButton(grid);
+ QPushButton *child3 = new QPushButton(grid);
+ QPushButton *child4 = new QPushButton(grid);
+ \newcode
+ QWidget *grid = new QWidget;
+ QPushButton *child1 = new QPushButton(grid);
+ QPushButton *child2 = new QPushButton(grid);
+ QPushButton *child3 = new QPushButton(grid);
+ QPushButton *child4 = new QPushButton(grid);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(child1, 0, 0);
+ layout->addWidget(child2, 0, 1);
+ layout->addWidget(child3, 1, 0);
+ layout->addWidget(child4, 1, 1);
+ grid->setLayout(layout);
+ \endcode
+
+ \section1 QGridLayout
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QGridLayout virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \section1 QGridView
+
+ The \c QGridView class has been renamed Q3GridView and moved to
+ the Qt3Support library. In Qt 4, we recommend that
+ you use QTableView or QAbstractItemView for presenting tabular
+ data.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \target qgroupbox.section
+ \section1 QGroupBox
+
+ The QGroupBox class has been redesigned in Qt 4. Many of the
+ features of the old \c QGroupBox class can be obtained by using
+ the Q3GroupBox class from the Qt3Support library.
+
+ The new QGroupBox is more lightweight. It doesn't attempt to
+ duplicate functionality already provided by QGridLayout, and it
+ does not inherit from QFrame. As a result, the following members
+ have been removed:
+
+ \list
+ \o Q3GroupBox::setColumns(), Q3GroupBox::columns()
+ \o Q3GroupBox::setOrientation(), Q3GroupBox::orientation()
+ \o Q3GroupBox::setInsideMargin(), Q3GroupBox::insideMargin()
+ \o Q3GroupBox::addSpace()
+ \endlist
+
+ Naturally, the \c columns and \c orientation properties have also
+ been removed.
+
+ If you rely on some of the missing functionality in your
+ application, you can use Q3GroupBox instead of QGroupBox as a
+ help to porting.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of QGroupBox virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \section1 QHBox
+
+ The \c QHBox class is now only available as Q3HBox in Qt 4. You
+ can achieve the same result as \c QHBox by creating a QWidget
+ with an horizontal layout:
+
+ \oldcode
+ QHBox *hbox = new QHBox;
+ QPushButton *child1 = new QPushButton(hbox);
+ QPushButton *child2 = new QPushButton(hbox);
+ \newcode
+ QWidget *hbox = new QWidget;
+ QPushButton *child1 = new QPushButton;
+ QPushButton *child2 = new QPushButton;
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(child1);
+ layout->addWidget(child2);
+ hbox->setLayout(layout);
+ \endcode
+
+ Note that child widgets are not automatically placed into the widget's
+ layout; you will need to manually add each widget to the QHBoxLayout.
+
+ \section1 QHeader
+
+ The \c QHeader class has been renamed Q3Header and moved to
+ the Qt3Support library. In Qt 4, it is replaced
+ by the QHeaderView class.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \section1 QHGroupBox
+
+ The \c QHGroupBox class has been renamed Q3HGroupBox and moved to
+ the Qt3Support library.
+ Qt 4 does not provide a specific replacement class for \c QHGroupBox
+ since QGroupBox is designed to be a generic container widget. As a
+ result, you need to supply your own layout for any child widgets.
+
+ See \l{#QGroupBox} for more information about porting code that uses
+ group boxes.
+
+ \section1 QHttp
+
+ QHttp no longer inherits from QNetworkProtocol. See the See the
+ \l{#qnetworkprotocol.section}{section on QNetworkProtocol} for
+ details.
+
+ The old \c QHttp, \c QHttpHeader, \c QHttpRequestHeader, and \c
+ QHttpResponseHeader classes have been renamed Q3Http,
+ Q3HttpHeader, Q3HttpRequestHeader, and Q3HttpResponseHeader and
+ have been moved to the Qt3Support library.
+
+ \section1 QIconFactory
+
+ The QIconFactory class is no longer part of Qt. It has been replaced by
+ the QIconEngine class.
+
+ \section1 QIconSet
+
+ The QIconSet class is no longer part of Qt. It has been replaced by
+ the QIcon class.
+
+ \section1 QIconView
+
+ The \c QIconView, \c QIconViewItem, \c QIconDrag, and \c
+ QIconDragItem classes has been renamed Q3IconView,
+ Q3IconViewItem, Q3IconDrag, and Q3IconDragItem and moved to the
+ Qt3Support library. New Qt applications should use
+ QListWidget or its base class QListView instead, and call
+ QListView::setViewMode(QListView::IconMode) to obtain an "icon
+ view" look.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \omit
+ ###
+
+ \section1 QImage
+
+ QImage::fromMimeSource(const QString &) -> qImageFromMimeSource(const QString &)
+ \endomit
+
+ \section1 QImageDrag
+
+ The \c QImageDrag class has been renamed Q3ImageDrag and moved to
+ the Qt3Support library. In Qt 4, use QMimeData
+ instead and call QMimeData::setImage() to set the image.
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QImageIO
+
+ The \c QImageIO class has been split into two classes:
+ QImageReader and QImageWriter. The table below shows the
+ correspondance between the two APIs:
+
+ \table
+ \header \o Qt 3 function \o Qt 4 equivalents
+ \row \o QImageIO::description() \o QImageWriter::description()
+ \row \o QImageIO::fileName() \o QImageReader::fileName() and QImageWriter::fileName()
+ \row \o QImageIO::format() \o QImageReader::format() and QImageWriter::format()
+ \row \o QImageIO::gamma() \o QImageWriter::gamma()
+ \row \o QImageIO::image() \o Return value of QImageReader::read()
+ \row \o QImageIO::inputFormats() \o QImageReader::supportedImageFormats()
+ \row \o QImageIO::ioDevice() \o QImageReader::device() and QImageWriter::device()
+ \row \o QImageIO::outputFormats() \o QImageWriter::supportedImageFormats()
+ \row \o QImageIO::parameters() \o N/A
+ \row \o QImageIO::quality() \o QImageWriter::quality()
+ \row \o QImageIO::read() \o QImageReader::read()
+ \row \o QImageIO::setDescription() \o QImageWriter::setDescription()
+ \row \o QImageIO::setFileName() \o QImageReader::setFileName() and QImageWriter::setFileName()
+ \row \o QImageIO::setFormat() \o QImageReader::setFormat() and QImageWriter::setFormat()
+ \row \o QImageIO::setGamma() \o QImageWriter::setGamma()
+ \row \o QImageIO::setIODevice() \o QImageReader::setDevice() and QImageWriter::setDevice()
+ \row \o QImageIO::setImage() \o Argument to QImageWriter::write()
+ \row \o QImageIO::setParameters() \o N/A
+ \row \o QImageIO::setQuality() \o QImageWriter::setQuality()
+ \row \o QImageIO::setStatus() \o N/A
+ \row \o QImageIO::status() \o QImageReader::error() and QImageWriter::error()
+ \row \o QImageIO::write() \o QImageWriter::write()
+ \endtable
+
+ \section1 QIntCache<T>
+
+ QIntCache<T> has been moved to Qt3Support. It has been replaced
+ by QCache<int, T>.
+
+ For details, read the \l{#qcache.section}{section on QCache<T>},
+ mentally substituting \c int for QString.
+
+ \section1 QIntDict<T>
+
+ QIntDict<T> and QIntDictIterator<T> have been moved to
+ Qt3Support. They have been replaced by the more modern QHash<Key,
+ T> and QMultiHash<Key, T> classes and their associated iterator
+ classes.
+
+ When porting old code that uses QIntDict<T> to Qt 4, there are
+ four classes that you can use:
+
+ \list
+ \o QMultiHash<int, T *>
+ \o QMultiHash<int, T>
+ \o QHash<int, T *>
+ \o QHash<int, T>
+ \endlist
+
+ For details, read the \l{#qdict.section}{section on QDict<T>},
+ mentally substituting \c int for QString.
+
+ \target qiodevice.section
+ \section1 QIODevice
+
+ The QIODevice class's API has been simplified to make it easier
+ to subclass and to make it work more smoothly with asynchronous
+ devices such as QTcpSocket and QProcess.
+
+ The following virtual functions have changed name or signature:
+
+ \table
+ \header \o Qt 3 function \o Comment
+ \row \o QIODevice::at() const \o Renamed QIODevice::pos().
+ \row \o QIODevice::at(Offset) \o Renamed QIODevice::seek().
+ \row \o QIODevice::open(int) \o The parameter is now of type QIODevice::OpenMode.
+ \row \o QIODevice::readBlock(char *, Q_ULONG) \o QIODevice::read(char *, qint64)
+ \row \o QIODevice::writeBlock(const char *, Q_ULONG) \o QIODevice::write(const char *, qint64)
+ \endtable
+
+ \note QIODevice::open(QIODevice::OpenMode) is no longer pure virtual.
+
+ The following functions are no longer virtual or don't exist anymore:
+
+ \table
+ \row \o QIODevice::getch() \o Renamed QIODevice::getChar() and implemented in terms of QIODevice::readData().
+ \row \o QIODevice::putch(int) \o Renamed QIODevice::putChar() and implemented in terms of QIODevice::writeData().
+ \row \o QIODevice::readAll() \o Implemented in terms of QIODevice::readData().
+ \row \o QIODevice::readLine(char *, Q_ULONG) \o Implemented in terms of QIODevice::readData()
+ \row \o QIODevice::ungetch(int) \o Renamed QIODevice::ungetChar() and simulated using an internal unget buffer.
+ \endtable
+
+ The \c IO_xxx flags have been revised, and the protected setFlags()
+ function removed. Most of the flags have been
+ eliminated because errors are best handled by implementing certain
+ functions in QIODevice subclasses rather than through the base classes.
+ The file access flags, such as \c IO_ReadOnly and \c IO_WriteOnly, have
+ been moved to the QIODevice class to avoid polluting the global
+ namespace. The table below shows the correspondence between the
+ Qt 3 \c IO_xxx flags and the Qt 4 API:
+
+ \table
+ \header \o Qt 3 constant \o Qt 4 equivalent
+ \row \o IO_Direct \o Use !QIODevice::isSequential() instead (notice the \e not).
+ \row \o IO_Sequential \o Use QIODevice::isSequential() instead.
+ \row \o IO_Combined \o N/A
+ \row \o IO_TypeMask \o N/A
+ \row \o IO_Raw \o QIODevice::Unbuffered
+ \row \o IO_Async \o N/A
+ \row \o IO_ReadOnly \o QIODevice::ReadOnly
+ \row \o IO_WriteOnly \o QIODevice::WriteOnly
+ \row \o IO_ReadWrite \o QIODevice::ReadWrite
+ \row \o IO_Append \o QIODevice::Append
+ \row \o IO_Truncate \o QIODevice::Truncate
+ \row \o IO_Translate \o QIODevice::Text
+ \row \o IO_ModeMask \o N/A
+ \row \o IO_Open \o Use QIODevice::isOpen() instead.
+ \row \o IO_StateMask \o N/A
+ \row \o IO_Ok \o N/A
+ \row \o IO_ReadError \o N/A
+ \row \o IO_WriteError \o N/A
+ \row \o IO_FatalError \o N/A
+ \row \o IO_ResourceError \o N/A
+ \row \o IO_OpenError \o N/A
+ \row \o IO_ConnectError \o N/A
+ \row \o IO_AbortError \o N/A
+ \row \o IO_TimeOutError \o N/A
+ \row \o IO_UnspecifiedError \o N/A
+ \endtable
+
+ \section1 QIODeviceSource
+
+ The QIODeviceSource class was used internally in Qt 2.x in
+ conjunction with QImageConsumer. It was obsoleted in Qt 3.0.
+ \input porting4-obsoletedmechanism.qdocinc
+
+ \section1 QLabel
+
+ QLabel doesn't enable word-wrap automatically anymore when rich
+ text is used. You can enable it by calling
+ QLabel::setWordWrap() or by setting the
+ \l{QLabel::wordWrap}{wordWrap} property. The reason for this
+ change is that the old behavior was confusing to many users.
+
+ Also, QLabel no longer offers an \c autoResize property. Instead,
+ you can call QWidget::setFixedSize() on the label, with
+ QLabel::sizeHint() as the argument, whenever you change the
+ contents of the QLabel.
+
+ See also \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions}
+ for a list of QLabel virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \section1 QLayout
+
+ In Qt 4, margins are always handled by layouts; there is no
+ QLayout::setSupportsMargin() function anymore.
+
+ The deleteAllItems() function is now only available if
+ \c QT3_SUPPORT is defined. If you maintain a QList of layout
+ items, you can use qDeleteAll() to remove all the items in one
+ go.
+
+ In Qt 3, it was possible to change the resizing behavior for layouts
+ in top-level widgets by adjusting the layout's \c resizeMode property.
+ In Qt 4, this property has been replaced by the QLayout::sizeConstraint
+ property which provides more control over how the layout behaves when
+ resized.
+
+ See also the \l{#qlayoutiterator.section}{section on
+ QLayoutIterator} and the \l{#qglayoutiterator.section}{section on
+ QGLayoutIterator}.
+
+ \target qlayoutiterator.section
+ \section1 QLayoutIterator
+
+ The QLayoutIterator class is obsoleted in Qt 4. It is available
+ only if \c QT3_SUPPORT is defined. It can be replaced by the
+ QLayout::itemAt() and QLayout::takeAt() functions, which operate
+ on indexes.
+
+ \oldcode
+ QLayoutIterator it = layout()->iterator();
+ QLayoutItem *child;
+ while ((child = it.current()) != 0) {
+ if (child->widget() == myWidget) {
+ it.takeCurrent();
+ return;
+ ++it;
+ }
+ \newcode
+ int i = 0;
+ QLayoutItem *child;
+ while ((child = layout()->itemAt(i)) != 0) {
+ if (child->widget() == myWidget) {
+ layout()->takeAt(i);
+ return;
+ }
+ ++i;
+ }
+ \endcode
+
+ \section1 QLineEdit
+
+ See \l{#properties}{Properties} for a list of QLineEdit
+ properties in Qt 3 that have changed in Qt 4.
+
+ The default value of QLineEdit's \l{QLineEdit::dragEnabled()}{dragEnabled}
+ property was \c true in Qt 3. In Qt 4, the default value is \c false.
+
+ Note that QLineEdit in Qt 4 is no longer a subclass of QFrame.
+ If you need to visually style a line edit with a frame, we recommend
+ either using a QFrame as a container for a QLineEdit or customizing
+ the line edit with a \l{Qt Style Sheets}{style sheet}.
+
+ \section1 QListBox
+
+ The \c QListBox, \c QListBoxItem, \c QListBoxText, and \c
+ QListBoxPixmap classes have been renamed Q3ListBox,
+ Q3ListBoxItem, Q3ListBoxText, and Q3ListBoxPixmap and have been
+ moved to the Qt3Support library. New Qt applications
+ should use QListWidget or its base class QListView instead.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \section1 QListView
+
+ The \c QListView, \c QListViewItem, \c QCheckListItem, and \c
+ QListViewItemIterator classes have been renamed Q3ListView,
+ Q3ListViewItem, Q3CheckListItem, and Q3ListViewItemIterator, and
+ have been moved to the Qt3Support library. New Qt
+ applications should use one of the following four classes
+ instead: QTreeView or QTreeWidget for tree-like structures;
+ QListWidget or the new QListView class for one-dimensional lists.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \section1 QLocalFs
+
+ The \c QLocalFs class is no longer part of the public Qt API. It
+ has been renamed Q3LocalFs and moved to Qt3Support. Use QDir,
+ QFileInfo, or QFile instead.
+
+ \section1 QMainWindow
+
+ The QMainWindow class has been redesigned in Qt 4 to provide a
+ more modern look and feel and more flexibility. The API has
+ changed to reflect that. The old \c QMainWindow class has been
+ renamed Q3MainWindow and moved to Qt3Support. See the QMainWindow
+ class documentation for details.
+
+ \omit ### More detail \endomit
+
+ \target qmemarray.section
+ \section1 QMemArray<T>
+
+ QMemArray<T> has been moved to Qt3Support. It has been replaced
+ by the QVector<T> class.
+
+ The following table summarizes the API differences between the
+ two classes.
+
+ \table
+ \row \o QMemArray::assign(const QMemArray<T> &) \o QVector::operator=()
+ \row \o QMemArray::assign(const T *, uint) \o See remark below
+ \row \o QMemArray::duplicate(const QMemArray &) \o QVector::operator=()
+ \row \o QMemArray::duplicate(const T *, uint) \o See remark below
+ \row \o QMemArray::setRawData(const T *, uint) \o N/A
+ \row \o QMemArray::resetRawData(const T *, uint) \o N/A
+ \row \o QMemArray::find(const T &, uint) \o QVector::indexOf(const T &, int)
+ \row \o QMemArray::contains(const T &) \o QVector::count(const T &)
+ \row \o QMemArray::sort() \o \l qSort()
+ \row \o QMemArray::bsearch(const T &d) \o \l qBinaryFind()
+ \row \o QMemArray::at(uint) \o QVector::operator[]()
+ \row \o QMemArray::operator const T *() \o QVector::constData()
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o QMemArray::assign(const T *, uint) and QMemArray::duplicate(const T *, uint)
+ can be replaced by QVector::resize() and qCopy().
+
+ \oldcode
+ QMemArray<QSize> array;
+ ...
+ array.assign(data, size);
+ \newcode
+ QVector<QSize> vector;
+ ...
+ vector.resize(size);
+ qCopy(data, data + size, vector.begin());
+ \endcode
+
+ \o QMemArray is an explicitly shared class, whereas QVector is
+ implicitly shared. See \l{Explicit Sharing} for more
+ information.
+ \endlist
+
+ \section1 QMenuBar
+
+ In Qt 3, QMenuBar inherited from QFrame and QMenuData; in Qt 4, it is
+ a direct subclass of QWidget. Applications that provided customized
+ menu bars will need to take advantage of the styling features described
+ in the \l{Qt Style Sheets} document.
+
+ It is not possible to add widgets to menu bars in Qt 4.
+
+ \section1 QMenuData
+
+ In Qt 4, the QMenu class provides a menu widget that can be used in all
+ the places where menus are used in an application. Unlike \c QMenuData,
+ QMenu is designed around the concept of actions, provided by the QAction
+ class, instead of the identifiers used in Qt 3.
+
+ In Qt 3, it was possible to insert widgets directly into menus by using
+ a specific \c QMenuData::insertItem() overload. In Qt 4.2 and later,
+ the QWidgetAction class can be used to wrap widgets for use in Qt 4's
+ action-based APIs.
+
+ \section1 QMessageBox
+
+ The QMessageBox::iconPixmap() function used to return a "const
+ QPixmap *". In Qt 4, it returns a QPixmap.
+
+ \section1 QMimeSourceFactory
+
+ The \c QMimeSourceFactory has been renamed Q3MimeSourceFactory
+ and moved to the Qt3Support library. New Qt applications should
+ use Qt 4's \l{Resource System} instead.
+
+ \section1 QMovie
+
+ The QMovie API has been revised in Qt 4 to make it more
+ consistent with the other Qt classes (notably QImageReader). The
+ table below summarizes the changes.
+
+ \table
+ \header \o Qt 3 function \o Qt 4 equivalent
+ \row \o QMovie::connectResize() \o Connect to QMovie::resized()
+ \row \o QMovie::connectStatus() \o Connect to QMovie::stateChanged()
+ \row \o QMovie::connectUpdate() \o Connect to QMovie::updated()
+ \row \o QMovie::disconnectResize() \o Disconnect from QMovie::resized()
+ \row \o QMovie::disconnectStatus() \o Disconnect from QMovie::stateChanged()
+ \row \o QMovie::disconnectUpdate() \o Disconnect from QMovie::updated()
+ \row \o QMovie::finished() \o Use QMovie::state() instead
+ \row \o QMovie::frameImage() \o Use QMovie::currentImage() instead
+ \row \o QMovie::frameNumber() \o Use QMovie::currentFrameNumber() instead
+ \row \o QMovie::framePixmap() \o Use QMovie::currentPixmap() instead
+ \row \o QMovie::getValidRect() \o Use frameRect() instead
+ \row \o QMovie::isNull() \o Use QMovie::isValid() instead
+ \row \o QMovie::pause() \o Use QMovie::setPaused(true) instead
+ \row \o QMovie::paused() \o Use QMovie::state() instead
+ \row \o QMovie::pushData() \o N/A
+ \row \o QMovie::pushSpace() \o N/A
+ \row \o QMovie::restart() \o Use QMovie::jumpToFrame(0) instead
+ \row \o QMovie::running() \o Use QMovie::state() instead
+ \row \o QMovie::step() \o Use QMovie::jumpToFrame() and QMovie::setPaused() instead
+ \row \o QMovie::step() \o Use QMovie::jumpToNextFrame() instead
+ \row \o QMovie::steps() \o Use QMovie::currentFrameNumber() and QMovie::frameCount() instead
+ \row \o QMovie::unpause() \o Use QMovie::setPaused(false) instead
+ \endtable
+
+ \section1 QMultiLineEdit
+
+ The \c QMultiLineEdit class in Qt 3 was a convenience QTextEdit
+ subclass that provided an interface compatible with Qt 2's
+ QMultiLineEdit class. In Qt 4, it is called Q3MultiLineEdit, it
+ inherits Q3TextEdit, and it is part of Qt3Support. Use QTextEdit
+ in new code.
+
+ \target qnetworkprotocol.section
+ \section1 QNetworkProtocol
+
+ The QNetworkProtocol, QNetworkProtocolFactoryBase,
+ QNetworkProtocolFactory<T>, and QNetworkOperation classes are no
+ longer part of the public Qt API. They have been renamed
+ Q3NetworkProtocol, Q3NetworkProtocolFactoryBase,
+ Q3NetworkProtocolFactory<T>, and Q3NetworkOperation and have been
+ moved to the Qt3Support library.
+
+ In Qt 4 applications, you can use classes like QFtp and QHttp
+ directly to perform file-related actions on a remote host.
+
+ \section1 QObject
+
+ QObject::children() now returns a QObjectList instead of a
+ pointer to a QObjectList. See also the comments on QObjectList
+ below.
+
+ Use QObject::findChildren() (or qFindChildren() if you need MSVC 6
+ compatibility) instead of QObject::queryList(). For example:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 18
+
+ QObject::killTimers() has been removed because it was unsafe to
+ use in subclass. (A subclass normally doesn't know whether the
+ base class uses timers or not.)
+
+ The \c QObject::name property has been renamed
+ QObject::objectName.
+
+ \c QObject::objectTrees() has been removed. If you are primarly
+ interested in widgets, use QApplication::allWidgets() or
+ QApplication::topLevelWidgets().
+
+ \section1 QObjectDictionary
+
+ The QObjectDictionary class is a synonym for
+ QAsciiDict<QMetaObject>. See the \l{#qasciidict.section}{section
+ on QAsciiDict<T>}.
+
+ \section1 QObjectList
+
+ In Qt 3, the QObjectList class was a typedef for
+ QPtrList<QObject>. In Qt 4, it is a typedef for QList<QObject *>.
+ See the \l{#qptrlist.section}{section on QPtrList<T>}.
+
+ \section1 QPaintDevice
+
+ To reimplement painter backends one previously needed to reimplement
+ the virtual function QPaintDevice::cmd(). This function is taken out
+ and should is replaced with the function QPaintDevice::paintEngine()
+ and the abstract class QPaintEngine. QPaintEngine provides virtual
+ functions for all drawing operations that can be performed on a
+ painter backend.
+
+ bitBlt() and copyBlt() are now only compatibility functions. Use
+ QPainter::drawPixmap() instead.
+
+ \section1 QPaintDeviceMetrics
+
+ All functions that used to be provided by the \c
+ QPaintDeviceMetrics class have now been moved to QPaintDevice.
+
+ \oldcode
+ QPaintDeviceMetrics metrics(widget);
+ int deviceDepth = metrics.depth();
+ \newcode
+ int deviceDepth = widget->depth();
+ \endcode
+
+ For compatibility, the old \c QPaintDeviceMetrics class has been
+ renamed Q3PaintDeviceMetrics and moved to Qt3Support.
+
+ \section1 QPainter
+
+ The QPainter class has undergone some changes in Qt 4 because of
+ the way rectangles are drawn. In Qt 4, the result of drawing a
+ QRect with a pen width of 1 pixel is 1 pixel wider and 1 pixel
+ taller than in Qt 3.
+
+ For compatibility, we provide a Q3Painter class in Qt3Support
+ that provides the old semantics. See the Q3Painter documentation
+ for details and for the reasons why we had to make this change.
+
+ The \l{http://doc.trolltech.com/3.3/qpainter.html#CoordinateMode-enum}{QPainter::CoordinateMode}
+ enum has been removed in Qt 4. All clipping
+ operations are now defined using logical coordinates and are subject
+ to transformation operations.
+
+ The
+ \l{http://doc.trolltech.com/3.3/qpainter.html#RasterOP-enum}{QPainter::RasterOP}
+ enum has been replaced with QPainter::CompositionMode.
+
+ \section1 QPicture
+
+ In Qt 3, a QPicture could be saved in the SVG file format. In Qt
+ 4, the SVG support is provided by the QtSvg module, which
+ includes classes for \e displaying the contents of SVG files.
+
+ If you would like to generate SVG files, you can use the Q3Picture
+ compatibility class or the QSvgGenerator class introduced in Qt 4.3.
+
+ \section1 QPixmap
+
+ The mask() function has been changed to return a reference to a QBitmap
+ rather than a pointer. As a result, it is no longer possible simply to
+ test for a null pointer when determining whether a pixmap has a mask.
+ Instead, you need to explicitly test whether the mask bitmap is null or
+ not.
+
+ \oldcode
+ if (pixmap.mask())
+ widget->setMask(*pixmap.mask());
+ \newcode
+ if (!pixmap.mask().isNull())
+ widget->setMask(pixmap.mask());
+ \endcode
+
+ The \c QPixmap::setOptimization() and \c QPixmap::setDefaultOptimization()
+ mechanism is no longer available in Qt 4.
+
+\omit
+ QPixmap::fromMimeSource(const QString &) -> qPixmapFromMimeSource(const QString &)
+\endomit
+
+ \section1 QPointArray
+
+ The \c QPointArray class has been renamed QPolygon in Qt 4 and
+ has undergone significant changes. In Qt 3, \c QPointArray
+ inherited from QMemArray<QPoint>. In Qt 4, QPolygon inherits from
+ QVector<QPoint>. Everything mentioned in the
+ \l{#qmemarray.section}{section on QMemArray<T>} apply for
+ QPointArray as well.
+
+ The Qt3Support library contains a Q3PointArray class
+ that inherits from QPolygon and provides a few functions that
+ existed in \c QPointArray but no longer exist in QPolygon. These
+ functions include Q3PointArray::makeArc(),
+ Q3PointArray::makeEllipse(), and Q3PointArray::cubicBezier().
+ In Qt 4, we recommend that you use QPainterPath for representing
+ arcs, ellipses, and Bezier curves, rather than QPolygon.
+
+ The QPolygon::setPoints() and QPolygon::putPoints() functions
+ return \c void in Qt 4. The corresponding Qt 3 functions returned
+ a \c bool indicating whether the array was successfully resized
+ or not. This can now be checked by checking QPolygon::size()
+ after the call.
+
+\omit
+ X11 Specific:
+
+ ::appDisplay() -> QX11Info::display()
+ QPaintDevice::x11Display() -> QX11Info::display()
+ QPaintDevice::x11AppDisplay() -> QX11Info::display()
+ QPaintDevice::x11Screen() -> QX11Info::appScreen()
+ QPaintDevice::x11AppScreen() -> ???
+ QPaintDevice::x11Depth() -> QX11Info::appDepth()
+ QPaintDevice::x11ColorMap() -> QX11Info::appColorMap()
+ QPaintDevice::x11DefaultColorMap() -> ???
+ QPaintDevice::x11Visual() -> QX11Info::appVisual()
+ QPaintDevice::x11DefaultVisual() -> ???
+
+ QPaintDevice::x11AppDpiX() -> QX11Info::appDpiX()
+ QPaintDevice::x11AppDpiY() -> QX11Info::appDpiY()
+ QPaintDevice::x11SetAppDpiX() -> QX11Info::setAppDpiX()
+ QPaintDevice::x11SetAppDpiY() -> QX11Info::setAppDpiY()
+
+ QPaintDevice::x11AppDepth() -> ???
+ QPaintDevice::x11AppCells() -> ???
+ QPaintDevice::x11AppRootWindow() -> ???
+ QPaintDevice::x11AppColorMap() -> ???
+ QPaintDevice::x11AppDefaultColorMap() -> ???
+ QPaintDevice::x11AppVisual() -> ???
+ QPaintDevice::x11AppDefaultVisual() -> ???
+
+ End of X11 Specific
+\endomit
+
+ \section1 QPopupMenu
+
+ For most purposes, QPopupMenu has been replaced by QMenu in Qt
+ 4. For compatibility with older applications, Q3PopupMenu provides
+ the old API and features that are specific to pop-up menus. Note
+ that, when using Q3PopupMenu, the menu's actions must be \l
+ {Q3Action}s.
+
+ In Qt 3, it was common practice to add entries to pop-up menus using the
+ insertItem() function, maintaining identifiers for future use; for
+ example, to dynamically change menu items.
+ In Qt 4, menu entries are completely represented
+ by actions for consistency with other user interface components, such as
+ toolbar buttons. Create new menus with the QMenu class, and use the
+ overloaded QMenu::addAction() functions to insert new entries.
+ If you need to manage a set of actions created for a particular menu,
+ we suggest that you construct a QActionGroup and add them to that.
+
+ The \l{Qt Examples#Main Windows}{Main Window examples} provided
+ show how to use Qt's action system to construct menus, toolbars, and other
+ common user interface elements.
+
+ \section1 QPrinter
+
+ The QPrinter class now expects printing to be set up from a
+ QPrintDialog.
+
+ \section1 QProcess
+
+ The QProcess class has undergone major improvements in Qt 4. It
+ now inherits QIODevice, which makes it possible to combine
+ QProcess with a QTextStream or a QDataStream.
+
+ The old \c QProcess class has been renamed Q3Process and moved to
+ the Qt3Support library.
+
+ \section1 QProgressBar
+
+ The QProgressBar API has been significantly improved in Qt 4. The
+ old \c QProgressBar API is available as Q3ProgressBar in the
+ Qt3Support library.
+
+ \section1 QProgressDialog
+
+ The QProgressDialog API has been significantly improved in Qt 4.
+ The old \c QProgressDialog API is available as Q3ProgressDialog
+ in the Qt3Support library.
+
+ See \l{#properties}{Properties} for a list of QProgressDialog
+ properties in Qt 3 that have changed in Qt 4.
+
+ \section1 QPtrCollection<T>
+
+ The \c QPtrCollection<T> abstract base class has been renamed
+ Q3PtrCollection<T> moved to the Qt3Support library.
+ There is no direct equivalent in Qt 4.
+
+ \omit
+ ###
+ The QPtrCollection entry is unsatisfactory. The xref is missing
+ its list and saying "no direct equivalent" with so suggestions
+ seems feeble.
+ \endomit
+
+ See \l{Generic Containers} for a list of Qt 4 containers.
+
+ \section1 QPtrDict<T>
+
+ \c QPtrDict<T> and \c QPtrDictIterator<T> have been renamed
+ Q3PtrDict<T> and Q3PtrDictIterator<T> and have been moved to the
+ Qt3Support library. They have been replaced by the
+ more modern QHash<Key, T> and QMultiHash<Key, T> classes and
+ their associated iterator classes.
+
+ When porting old code that uses Q3PtrDict<T> to Qt 4, there are
+ four classes that you can use:
+
+ \list
+ \o QMultiHash<void *, T *>
+ \o QMultiHash<void *, T>
+ \o QHash<void *, T *>
+ \o QHash<void *, T>
+ \endlist
+
+ (You can naturally use other types than \c{void *} for the key
+ type, e.g. \c{QWidget *}.)
+
+ To port Q3PtrDict<T> to Qt 4, read the \l{#qdict.section}{section
+ on QDict<T>}, mentally substituting \c{void *} for QString.
+
+ \target qptrlist.section
+ \section1 QPtrList<T>
+
+ QPtrList<T>, QPtrListIterator<T>, and QPtrListStdIterator<T> have
+ been moved to the Qt3Support library. They have been
+ replaced by the more modern QList and QLinkedList classes and
+ their associated iterator classes.
+
+ When porting to Qt 4, you have the choice of using QList<T> or
+ QLinkedList<T> as alternatives to QValueList<T>. QList<T> has an
+ index-based API and provides very fast random access
+ (QList::operator[]), whereas QLinkedList<T> has an iterator-based
+ API.
+
+ The following table summarizes the API differences between
+ QPtrList<T> and QList<T *>:
+
+ \table
+ \header \o QPtrList function \o QList equivalent
+ \row \o QPtrList::contains(const T *) \o QList::count(T *)
+ \row \o QPtrList::containsRef(const T *) \o QList::count(T *)
+ \row \o QPtrList::find(const T *) \o See remark below
+ \row \o QPtrList::findRef(const T *) \o See remark below
+ \row \o QPtrList::getFirst() \o QList::first()
+ \row \o QPtrList::getLast() \o QList::last()
+ \row \o QPtrList::inSort(const T *) \o N/A
+ \row \o QPtrList::remove(const T *) \o QList::removeAll(T *)
+ \row \o QPtrList::remove(uint) \o QList::removeAt(int)
+ \row \o QPtrList::removeNode(QLNode *) \o N/A
+ \row \o QPtrList::removeRef(const T *) \o QList::removeAll(T *)
+ \row \o QPtrList::sort() \o See remark below
+ \row \o QPtrList::takeNode(QLNode *) \o N/A
+ \row \o QPtrList::toVector(QGVector *) \o See remark below
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o QPtrList::toVector(QGVector *) can be replaced by
+ QVector::resize() and qCopy().
+
+ \oldcode
+ QPtrList<QWidget> list;
+ ...
+ QPtrVector<QWidget> vector;
+ list.toVector(&vector);
+ \newcode
+ QList<QWidget *> list;
+ ...
+ QVector<QWidget *> vector;
+ vector.resize(list.size());
+ qCopy(list.begin(), list.end(), vector.begin());
+ \endcode
+
+ \o QPtrList::sort() relied on the virtual compareItems() to
+ sort items. In Qt 4, you can use \l qSort() instead and pass
+ your "compare item" function as an argument.
+
+ \o QPtrList::find(const T *) returns an iterator, whereas
+ QList::indexOf(T *) returns an index. To convert an index
+ into an iterator, add the index to QList::begin().
+
+ \o QPtrList::removeFirst() and QPtrList::removeLast() return a \c
+ bool that indicates whether the element was removed or not.
+ The corresponding QList functions return \c void. You can
+ achieve the same result by calling QList::isEmpty() before
+ attempting to remove an item.
+ \endlist
+
+ If you use QPtrList's auto-delete feature (by calling
+ QPtrList::setAutoDelete(true)), you need to do some more work.
+ You have two options: Either you call \c delete yourself whenever
+ you remove an item from the container, or you can use QList<T>
+ instead of QList<T *> (i.e. store values directly instead of
+ pointers to values). Here, we'll see when to call \c delete.
+
+ \omit
+ (See \l{What's Wrong with Auto-Delete} for an explanation of why
+ the Qt 4 containers don't offer that feature.)
+ \endomit
+
+ The following table summarizes the idioms that you need to watch
+ out for if you want to call \c delete yourself.
+
+ \table
+ \header \o QPtrList idiom \o QList idiom
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 19
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 20
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 21
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 22
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 23
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 24
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 25
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 26
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 27
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 28
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 29
+ (removes the current item)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 30
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 31
+
+ (also called from QPtrList's destructor)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 32
+
+ In 99% of cases, the following idiom also works:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 33
+
+ However, it may lead to crashes if \c list is referenced from
+ the value type's destructor, because \c list contains
+ dangling pointers until clear() is called.
+ \endtable
+
+ Be aware that QPtrList's destructor automatically calls clear().
+ If you have a QPtrList data member in a custom class and use the
+ auto-delete feature, you will need to call \c delete on all the
+ items in the container from your class destructor to avoid a
+ memory leak.
+
+ QPtrList had the concept of a "current item", which could be used
+ for traversing the list without using an iterator. When porting
+ to Qt 4, you can use the Java-style QListIterator<T *> (or
+ QMutableListIterator<T *>) class instead. The following table
+ summarizes the API differences:
+
+ \table
+ \header \o QPtrList function \o QListIterator equivalent
+ \row \o QPtrList::at() \o N/A
+ \row \o QPtrList::current() \o QMutableListIterator::value()
+ \row \o QPtrList::currentNode() \o N/A
+ \row \o QPtrList::findNext(const T *) \o QListIterator::findNext(const T *)
+ \row \o QPtrList::findNextRef(const T *) \o QListIterator::findNext(const T *)
+ \row \o QPtrList::first() \o QPtrList::toFront()
+ \row \o QPtrList::last() \o QPtrList::toBack()
+ \row \o QPtrList::next() \o QPtrList::next()
+ \row \o QPtrList::prev() \o QPtrList::previous()
+ \row \o QPtrList::remove() \o QMutableListIterator::remove()
+ \row \o QPtrList::take() \o QMutableListIterator::remove()
+ \endtable
+
+ Be aware that QListIterator has a different way of iterating than
+ QPtrList. A typical loop with QPtrList looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 34
+
+ Here's the equivalent QListIterator loop:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 35
+
+ Finally, QPtrListIterator<T> must also be ported. There are no
+ fewer than four iterator classes that can be used as a
+ replacement: QList::const_iterator, QList::iterator,
+ QListIterator, and QMutableListIterator. The most straightforward
+ class to use when porting is QMutableListIterator<T *> (if you
+ modify the list through the iterator) or QListIterator<T *> (if
+ you don't). The following table summarizes the API differences:
+
+ \table
+ \header \o QPtrListIterator function \o Qt 4 equivalent
+ \row \o QPtrListIterator::atFirst() \o !QListIterator::hasPrevious() (notice the \c{!})
+ \row \o QPtrListIterator::atLast() \o !QListIterator::hasNext() (notice the \c{!})
+ \row \o QPtrListIterator::count() \o QList::count() or QList::size()
+ \row \o QPtrListIterator::current() \o QMutableListIterator::value()
+ \row \o QPtrListIterator::isEmpty() \o QList::isEmpty()
+ \row \o QPtrListIterator::toFirst() \o QListIterator::toFront()
+ \row \o QPtrListIterator::toLast() \o QListIterator::toBack()
+ \row \o QPtrListIterator::operator() \o QMutableListIterator::value()
+ \row \o QPtrListIterator::operator*() \o QMutableListIterator::value()
+ \endtable
+
+ Again, be aware that QListIterator has a different way of
+ iterating than QPtrList. A typical loop with QPtrList looks like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 36
+
+ Here's the equivalent QListIterator loop:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 37
+
+ Finally, QPtrListStdIterator<T> must also be ported. This is
+ easy, because QList also provides STL-style iterators
+ (QList::iterator and QList::const_iterator).
+
+ \section1 QPtrQueue<T>
+
+ QPtrQueue has been moved to the Qt3Support library.
+ It has been replaced by the more modern QQueue class.
+
+ The following table summarizes the differences between
+ QPtrQueue<T> and QQueue<T *>:
+
+ \table
+ \header \o QPtrQueue function \o QQueue equivalent
+ \row \o QPtrQueue::autoDelete() \o See discussion below
+ \row \o QPtrQueue::count() \o QQueue::count() or QQueue::size() (equivalent)
+ \row \o QPtrQueue::current() \o QQueue::head()
+ \row \o QPtrQueue::remove() \o QQueue::dequeue()
+ \row \o QPtrQueue::setAutoDelete() \o See discussion below
+ \endtable
+
+ If you use QPtrQueue's auto-delete feature (by calling
+ QPtrQueue::setAutoDelete(true)), you need to do some more work.
+ You have two options: Either you call \c delete yourself whenever
+ you remove an item from the container, or you can use QQueue<T>
+ instead of QQueue<T *> (i.e. store values directly instead of
+ pointers to values). Here, we will show when to call \c delete.
+
+ \omit
+ (See \l{What's Wrong with Auto-Delete} for an explanation of why
+ the Qt 4 containers don't offer that feature.)
+ \endomit
+
+ \table
+ \header \o QPtrQueue idiom \o QQueue idiom
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 38
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 39
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 40
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 41
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 42
+
+ (also called from QPtrQueue's destructor)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 43
+
+ In 99% of cases, the following idiom also works:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 44
+
+ However, it may lead to crashes if \c queue is referenced
+ from the value type's destructor, because \c queue contains
+ dangling pointers until clear() is called.
+ \endtable
+
+ \section1 QPtrStack<T>
+
+ QPtrStack has been moved to the Qt3Support library.
+ It has been replaced by the more modern QStack class.
+
+ The following table summarizes the differences between
+ QPtrStack<T> and QStack<T *>:
+
+ \table
+ \header \o QPtrStack function \o QStack equivalent
+ \row \o QPtrStack::autoDelete() \o See discussion below
+ \row \o QPtrStack::count() \o QStack::count() or QStack::size() (equivalent)
+ \row \o QPtrStack::current() \o QStack::top()
+ \row \o QPtrStack::remove() \o QStack::pop()
+ \row \o QPtrStack::setAutoDelete() \o See discussion below
+ \endtable
+
+ If you use QPtrStack's auto-delete feature (by calling
+ QPtrStack::setAutoDelete(true)), you need to do some more work.
+ You have two options: Either you call \c delete yourself whenever
+ you remove an item from the container, or you can use QStack<T>
+ instead of QStack<T *> (i.e. store values directly instead of
+ pointers to values). Here, we will show when to call \c delete.
+
+ \omit
+ (See \l{What's Wrong with Auto-Delete} for an explanation of why
+ the Qt 4 containers don't offer that feature.)
+ \endomit
+
+ \table
+ \header \o QPtrStack idiom \o QStack idiom
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 45
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 46
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 47
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 48
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 49
+
+ (also called from QPtrStack's destructor)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 50
+
+ In 99% of cases, the following idiom also works:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 51
+
+ However, it may lead to crashes if \c stack is referenced
+ from the value type's destructor, because \c stack contains
+ dangling pointers until clear() is called.
+ \endtable
+
+ \section1 QPtrVector<T>
+
+ QPtrVector<T> has been moved to Qt3Support. It has been replaced
+ by the more modern QVector class.
+
+ When porting to Qt 4, you can use QVector<T *> as an alternative
+ to QPtrVector<T>. The APIs of QPtrVector<T> and QVector<T *> are
+ somewhat similar. The main issue is that QPtrVector supports
+ auto-delete whereas QVector doesn't.
+
+ \omit
+ (See \l{What's Wrong with Auto-Delete} for an explanation of why
+ the Qt 4 containers don't offer that feature.)
+ \endomit
+
+ The following table summarizes the API differences between the
+ two classes:
+
+ \table
+ \header \o QPtrVector function \o QVector equivalent
+ \row \o QPtrVector::autoDelete() \o See discussion below
+ \row \o QPtrVector::bsearch(const T *) \o \l qBinaryFind()
+ \row \o QPtrVector::contains(const T *) \o QVector::count(T *)
+ \row \o QPtrVector::containsRef(const T *) \o QVector::count(T *)
+ \row \o QPtrVector::count() \o See remark below
+ \row \o QPtrVector::insert(uint, T *) \o See remark below
+ \row \o QPtrVector::isNull() \o N/A
+ \row \o QPtrVector::remove(uint) \o See remark below
+ \row \o QPtrVector::setAutoDelete() \o See discussion below
+ \row \o QPtrVector::sort() \o \l qSort()
+ \row \o QPtrVector::take(uint) \o See remark below
+ \row \o QPtrVector::toList(QGList *) \o QList::QList(const QVector &)
+ \endtable
+
+ Remarks:
+
+ \list 1
+ \o QPtrVector::insert(uint, T *) sets an item to store a certain
+ pointer value. This is \e not the same as QVector::insert(int, T *),
+ which creates space for the item by moving following items by
+ one position. Use \c{vect[i] = ptr} to set a QVector item to
+ a particular value.
+ \o QPtrVector::remove(uint) sets an item to be 0. This is \e not
+ the same as QVector::removeAt(int), which entirely erases the
+ item, reducing the size of the vector. Use \c{vect[i] = 0} to
+ set a QVector item to 0.
+ \o Likewise, QPtrVector::take(uint) sets an item to be 0 and
+ returns the previous value of the item. Again, this is easy to
+ achieve using QVector::operator[]().
+ \o QPtrVector::count() returns the number of non-null items in
+ the vector, whereas QVector::count() (like QVector::size())
+ returns the number of items (null or non-null) in the vector.
+ Fortunately, it's not too hard to simulate QPtrVector::count().
+
+ \oldcode
+ int numValidItems = vect.count();
+ \newcode
+ int numValidItems = vect.size() - vect.count(0);
+ \endcode
+ \endlist
+
+ If you use QVector's auto-delete feature (by calling
+ QVector::setAutoDelete(true)), you need to do some more work. You
+ have two options: Either you call \c delete yourself whenever you
+ remove an item from the container, or you use QVector<T> instead
+ of QVector<T *> (i.e. store values directly instead of pointers
+ to values). Here, we'll see when to call \c delete.
+
+ The following table summarizes the idioms that you need to watch
+ out for if you want to call \c delete yourself.
+
+ \table
+ \header \o QPtrVector idiom \o QVector idiom
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 52
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 53
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 54
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 55
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 56
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 57
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 58
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 59
+ \row
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 60
+
+ (also called from QPtrVector's destructor)
+
+ \o
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 61
+
+ In 99% of cases, the following idiom also works:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 62
+
+ However, it may lead to crashes if \c vect is referenced from
+ the value type's destructor, because \c vect contains
+ dangling pointers until clear() is called.
+ \endtable
+
+ Be aware that QPtrVector's destructor automatically calls
+ clear(). If you have a QPtrVector data member in a custom class
+ and use the auto-delete feature, you will need to call \c delete
+ on all the items in the container from your class destructor to
+ avoid a memory leak.
+
+ \section1 QPushButton
+
+ See \l{#properties}{Properties} for a list of QPushButton
+ properties in Qt 3 that have changed in Qt 4.
+
+ \section1 QRangeControl
+
+ In Qt 3, various "range control" widgets (QDial, QScrollBar,
+ QSlider, and QSpin) inherited from both QWidget and
+ \c QRangeControl.
+
+ In Qt 4, \c QRangeControl has been replaced with the new
+ QAbstractSlider and QAbstractSpinBox classes, which inherit from
+ QWidget and provides similar functionality. Apart from eliminating
+ unnecessary multiple inheritance, the new design allows
+ QAbstractSlider to provide signals, slots, and properties.
+
+ The old \c QRangeControl class has been renamed Q3RangeControl
+ and moved to the Qt3Support library, together with
+ the (undocumented) \c QSpinWidget class.
+
+ If you use \c QRangeControl as a base class in your application,
+ you can switch to use QAbstractSlider or QAbstractSpinBox instead.
+
+ \oldcode
+ class VolumeControl : public QWidget, public QRangeControl
+ {
+ ...
+ protected:
+ void valueChange() {
+ update();
+ emit valueChanged(value());
+ }
+ void rangeChange() {
+ update();
+ }
+ void stepChange() {
+ update();
+ }
+ };
+ \newcode
+ class VolumeControl : public QAbstractSlider
+ {
+ ...
+ protected:
+ void sliderChange(SliderChange change) {
+ update();
+ if (change == SliderValueChange)
+ emit valueChanged(value());
+ }
+ };
+ \endcode
+
+ \section1 QRegExp
+
+ The search() and searchRev() functions have been renamed to indexIn()
+ and lastIndexIn() respectively.
+
+ \section1 QRegion
+
+ The following changes have been made to QRegion in Qt 4:
+
+ \list
+ \o There is no longer any difference between a \e null region and
+ an \e empty region. Use isEmpty() in most places where you
+ would have used a null QRegion.
+ \o QRegion::rects() used to return a QMemArray<QRect>. It now returns
+ a QVector<QRect>.
+ \endlist
+
+ \section1 QScrollBar
+
+ See \l{#properties}{Properties} for a list of QScrollBar
+ properties in Qt 3 that have changed in Qt 4.
+
+ \section1 QScrollView
+
+ The \c QScrollView class has been renamed Q3ScrollView and moved
+ to the Qt3Support library. It has been replaced by
+ the QAbstractScrollArea and QScrollArea classes.
+
+ Note that Qt 4 in general uses the QScrollArea::widget() function
+ where Qt 3 used QScrollView::viewport(). The rationale for this is
+ that it is no longer possible to draw directly on a scroll
+ area. The QScrollArea::widget() function returns the widget set on
+ the scroll area.
+
+ \c QScrollView was designed to work around the 16-bit limitation
+ on widget coordinates found on most window systems. In Qt 4, this
+ is done transparently for \e all widgets, so there is no longer a
+ need for such functionality in \c QScrollView. For that reason,
+ the new QAbstractScrollArea and QScrollArea classes are much more
+ lightweight, and concentrate on handling scroll bars.
+
+ \section1 QServerSocket
+
+ The \c QServerSocket class has been renamed Q3ServerSocket and
+ moved to the Qt3Support library. In Qt 4, it has been
+ replaced by QTcpServer.
+
+ With Q3ServerSocket, connections are accepted by reimplementing a
+ virtual function (Q3ServerSocket::newConnection()). With
+ QTcpServer, on the other hand, you don't need to subclass.
+ Instead, simply connect to the QTcpServer::newConnection()
+ signal.
+
+ \section1 QSettings
+
+ The QSettings class has been rewritten to be more robust and to
+ respect existing standards (e.g., the INI file format). The API
+ has also been extensively revised. The old API is still provided
+ when Qt 3 support is enabled.
+
+ Since the format and location of settings have changed between Qt
+ 3 and Qt 4, the Qt 4 version of your application won't recognize
+ settings written using Qt 3.
+
+ \section1 QShared
+
+ The \c QShared class has been obsoleted by the more powerful
+ QSharedData and QSharedDataPointer as a means of creating custom
+ implicitly shared classes. It has been renamed Q3Shared moved to
+ the Qt3Support library.
+
+ An easy way of porting to Qt 4 is to include this class into your
+ project and to use it instead of \c QShared:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63
+
+ If possible, we recommend that you use QSharedData and
+ QSharedDataPointer instead. They provide thread-safe reference
+ counting and handle all the reference counting behind the scenes,
+ eliminating the risks of forgetting to increment or decrement the
+ reference count.
+
+ \section1 QSignal
+
+ The QSignal class has been renamed to Q3Signal and moved to the
+ Qt3Support library. The preferred approach is to create your own
+ QObject subclass with a signal that has the desired signature.
+ Alternatively, you can call QMetaObject::invokeMethod() if you
+ want to invoke a slot.
+
+ \section1 QSimpleRichText
+
+ QSimpleRichText has been obsoleted by QTextDocument. It has
+ bene renamed Q3SimpleRichText and moved to the Qt3Support
+ library.
+
+ Previously, you would do the following with Q3SimpleRichText:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63a
+
+ However, with QTextDocument, you use the following code instead:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63b
+
+ See \l{Rich Text Processing} for an overview of the Qt 4 rich
+ text classes.
+
+ \section1 QSlider
+
+ The QSlider::sliderStart() and QSlider::sliderRect() functions
+ have been removed.
+
+ The slider's rect can now be retrieved using the code snippet below:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63c
+
+ In addition, the direction of a vertical QSlider has changed,
+ i.e. the bottom is now the minimum, and the top the maximum. You
+ can use the QAbstractSlider::invertedAppearance property to
+ control this behavior.
+
+ See \l{#properties}{Properties} for a list of QSlider properties
+ in Qt 3 that have changed in Qt 4.
+
+ \section1 QSocket
+
+ The \c QSocket class has been renamed Q3Socket and moved to the
+ Qt3Support library. In Qt 4, it has been replaced by
+ the QTcpSocket class, which inherits most of its functionality
+ from QAbstractSocket.
+
+ \section1 QSocketDevice
+
+ The \c QSocketDevice class has been renamed Q3SocketDevice and
+ moved to the Qt3Support library. In Qt 4, there is no
+ direct equivalent to Q3SocketDevice:
+
+ \list
+ \o If you use Q3SocketDevice in a thread to perform blocking network
+ I/O (a technique encouraged by the \e{Qt Quarterly} article
+ \l{http://doc.trolltech.com/qq/qq09-networkthread.html}{Unblocking Networking}),
+ you can now use QTcpSocket, QFtp, or QHttp instead, which can now be used from
+ non-GUI threads.
+
+ \o If you use Q3SocketDevice for UDP, you can now use QUdpSocket instead.
+
+ \o If you use Q3SocketDevice for other uses, Qt 4 offers no
+ alternative right now. However, there is a \c QAbstractSocketEngine
+ internal class that offers a low-level socket API similar to
+ Q3SocketDevice. Should the need for such functionality arise in
+ Qt 4 applications, we will consider making this class public in a
+ future release.
+ \endlist
+
+ \section1 QSortedList
+
+ The QSortedList<T> class has been deprecated since Qt 3.0. In Qt
+ 4, it has been moved to the Qt3Support library.
+
+ In new code, we recommend that you use QList<T> instead and use
+ \l qSort() to sort the items.
+
+ \section1 QSplitter
+
+ The function setResizeMode() has been moved into Qt3Support. Set
+ the stretch factor in the widget's size policy to get equivalent
+ functionality.
+
+ The obsolete function drawSplitter() has been removed. Use
+ QStyle::drawPrimitive() to acheive similar functionality.
+
+ \section1 QSpinBox
+
+ See \l{#properties}{Properties} for a list of QSpinBox properties
+ in Qt 3 that have changed in Qt 4.
+
+ \section1 QSqlCursor
+
+ The \c QSqlCursor class has been renamed Q3SqlCursor and moved to
+ the Qt3Support library. In Qt 4, you can use
+ QSqlQuery, QSqlQueryModel, or QSqlTableModel, depending on
+ whether you want a low-level or a high-level interface for
+ accessing databases.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlDatabase
+
+ QSqlDatabase is now a smart pointer that is passed around by
+ value. Simply replace all QSqlDatabase pointers by QSqlDatabase
+ objects.
+
+ \section1 QSqlEditorFactory
+
+ The \c QSqlEditorFactory class has been renamed
+ Q3SqlEditorFactory and moved to Qt3Support.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlError
+
+ The enum \c{Type} was renamed to \c{ErrorType}, The values were renamed as well:
+
+ \list
+ \o None - use NoError instead
+ \o Connection - use ConnectionError instead
+ \o Statement - use StatementError instead
+ \o Transaction - use TransactionError instead
+ \o Unknown - use UnknownError instead
+ \endlist
+
+ \section1 QSqlFieldInfo
+
+ The QSqlFieldInfo class has been moved to Qt3Support. Its
+ functionality is now provided by the QSqlField class.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlForm
+
+ The \c QSqlForm class has been renamed Q3SqlForm and moved to the
+ Qt3Support library.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlPropertyMap
+
+ The \c QSqlPropertyMap class has been renamed Q3SqlPropertyMap
+ moved to the Qt3Support library.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlQuery
+
+ QSqlQuery::prev() was renamed to QSqlQuery::previous().
+ QSqlQuery::prev() remains, but it just calls previous().
+ QSqlQuery no longer has any virtual methods, i.e., exec(),
+ value(), seek(), next(), prev(), first(), last(), and the
+ destructor are no longer virtual.
+
+ \section1 QSqlRecord
+
+ QSqlRecord behaves like a vector now, QSqlRecord::insert() will
+ actually insert a new field instead of replacing the existing
+ one.
+
+ \section1 QSqlRecordInfo
+
+ The QSqlRecordInfo class has been moved to Qt3Support. Its
+ functionality is now provided by the QSqlRecord class.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QSqlSelectCursor
+
+ The \c QSqlSelectCursor class has been renamed Q3SqlSelectCursor
+ and moved to the Qt3Support library.
+
+ See \l{QtSql Module} for an overview of the new SQL classes.
+
+ \section1 QStoredDrag
+
+ The \c QStoredDrag class has been renamed Q3StoredDrag and moved
+ to the Qt3Support library. In Qt 4, use QMimeData
+ instead and call QMimeData::setData() to set the data.
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QStr(I)List
+
+ The QStrList and QStrIList convenience classes have been
+ deprecated since Qt 2.0. In Qt 4, they have been moved to the
+ Qt3Support library. If you used any of these, we
+ recommend that you use QStringList or QList<QByteArray> instead.
+
+ \section1 QStr(I)Vec
+
+ The QStrVec and QStrIVec convenience classes have been deprecated
+ since Qt 2.0. In Qt 4, they have been moved to Qt3Support. If you
+ used any of these, we recommend that you use QStringList or
+ QList<QByteArray> instead.
+
+ \section1 QString
+
+ Here are the main issues to be aware of when porting QString to
+ Qt 4:
+
+ \list 1
+ \o The QString::QString(QChar) constructor performed implicit
+ conversion in Qt 3. Now, you will need a cast to convert a
+ QChar to a QString.
+
+ \o The QString::QString(const QByteArray &) constructor used to
+ stop at the first '\\0' it encountered, for compatibility
+ with Qt 1. This quirk has now been fixed; in Qt 4, the
+ resulting QString always has the same length as the
+ QByteArray that was passed to the constructor.
+
+ \o The QString::null static constant has been deprecated in Qt
+ 4. For compatibility, Qt 4 provides a QString::null symbol
+ that behaves more or less the same as the old constant. The
+ new idiom is to write QString() instead of QString::null, or
+ to call clear().
+
+ \oldcode
+ str1 = QString::null;
+ if (str2 == QString::null)
+ do_something(QString::null);
+ \newcode
+ str1.clear();
+ if (str2.isNull())
+ do_something(QString());
+ \endcode
+
+ In new code, we recommend that you don't rely on the
+ distinction between a null string and a (non-null) empty
+ string. See \l{Distinction Between Null and Empty Strings}
+ for details.
+
+ \o QString::latin1() and QString::ascii() have been replaced
+ with QString::toLatin1() and QString::toAscii(), which return
+ a QByteArray instead of a (non-reentrant) \c{const char *}.
+ For consistency, QString::utf8() and QString::local8Bit(),
+ which already returned a QByteArray (actually a \c QCString),
+ have been renamed QString::toUtf8() and
+ QString::toLocal8Bit().
+
+ To obtain a \c{const char *} pointer to ASCII or Latin-1 data,
+ use QString::toAscii() or QString::toLatin1() to obtain a
+ QByteArray containing the data, then call QByteArray::constData()
+ to access the character data directly. Note that the pointer
+ returned by this function is only valid for the lifetime of the
+ byte array; you should avoid taking a pointer to the data
+ contained in temporary objects.
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 64
+
+ In the above example, the \c goodData pointer is valid for the lifetime
+ of the \c asciiData byte array. If you need to keep a copy of the data
+ in a non-Qt data structure, use standard C memory allocation and string
+ copying functions to do so \e before destroying the byte array.
+
+ \o QString::at() returned a non-const reference, whereas the
+ new QString::at() returns a const value. Code like
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 65
+
+ will no longer compile. Instead, use QString::operator[]:
+
+ \snippet doc/src/snippets/code/doc_src_porting4.qdoc 66
+
+ \o The QString::contains(\e x) function (where \e x is a
+ character or a string) has been renamed QString::count(\e x).
+ In addition, there now exists a set of QString::contains()
+ functions that returns a boolean value. Replace old calls to
+ contains() with either count() or contains(), depending on
+ whether you care about the specific number of occurrences of
+ a character in the string or only care about whether the
+ string contains that character or not.
+
+ \o Many functions in QString had a \c bool parameter that
+ specified case sensitivity. In Qt 4, in the interest of code
+ readability and maintainability, the \c bool parameters have
+ been replaced by the Qt::CaseSensitivity enum, which can take
+ the values Qt::CaseSensitive and Qt::CaseInsensitive.
+
+ \oldcode
+ if (url.startsWith("http:", false))
+ ...
+ \newcode
+ if (url.startsWith("http:", Qt::CaseInsensitive))
+ ...
+ \endcode
+
+ \o The QString::setExpand(uint, QChar) function, which already
+ was obsolete in Qt 3, is no longer available. Use
+ QString::operator[] instead.
+
+ \oldcode
+ str.setExpand(32, '$');
+ \newcode
+ str[32] = '$';
+ \endcode
+
+ \o The \c QT_NO_ASCII_CAST and \c QT_NO_CAST_ASCII macros have
+ been renamed \c QT_NO_CAST_TO_ASCII and \c
+ QT_NO_CAST_FROM_ASCII, respectively.
+
+ \o The QString::data() used to return the same as
+ QString::ascii(). It now returns a pointer to the Unicode
+ data stored in the QString object. Call QString::ascii() if
+ you want the old behavior.
+
+ \o QString::arg() now converts two-digit place markers, allowing
+ up to 99 place markers to be used in any given string.
+
+ \o Comparisons between QStrings and \c NULL in order to determine
+ whether strings are empty are no longer allowed.
+ Use \l{QString::}{isEmpty()} instead.
+
+ \endlist
+
+ \section1 QStringList
+
+ QStringList now inherits from QList<QString> and can no longer be
+ converted to a QValueList<QString>. Since QValueList inherits QList a
+ cast will work as expected.
+
+ This change implies some API incompatibilities for QStringList.
+ For example, at() returns the string, not an iterator. See the
+ \l{#qvaluelist.section}{section on QValueList} for details.
+
+ The static QStringList::split() function for splitting strings into
+ lists of smaller strings has been replaced by QString::split(),
+ which returns a QStringList.
+
+ \section1 QStyle
+
+ The QStyle API has been overhauled and improved. Most of the information on
+ why this change was done is described in \l{The Qt 4 Style API}{the QStyle overview}.
+
+ Since QStyle is mostly used internally by Qt's widgets and styles and since
+ it is not essential to the good functioning of an application, there is no
+ compatibility path. This means that we have changed many enums and
+ functions and the qt3to4 porting tool will not change much in your qstyle
+ code. To ease the pain, we list some of the major changes here.
+
+ QStyleOption has taken on a more central role and is no longer an optional
+ argument, please see the QStyleOption documentation for more information.
+
+ The QStyle::StyleFlags have been renamed QStyle::StateFlags and are now prefixed State_
+ instead of Style_, in addition the Style_ButtonDefault flag has moved to
+ QStyleOptionButton.
+
+ The QStyle::PrimitiveElement enumeration has undergone extensive change.
+ Some of the enums were moved to QStyle::ControlElement, some were removed
+ and all were renamed. This renaming is not done by the qt3to4 porting tool,
+ so you must do it yourself. The table below shows how things look
+ now.
+
+ \table
+ \header \o Old name \o New name \o Remark
+ \row \o \c PE_ButtonCommand \o QStyle::PE_PanelButtonCommand
+ \row \o \c PE_ButtonDefault \o QStyle::PE_FrameDefaultButton
+ \row \o \c PE_ButtonBevel \o QStyle::PE_PanelButtonBevel
+ \row \o \c PE_ButtonTool \o QStyle::PE_PanelButtonTool
+ \row \o \c PE_ButtonDropDown \o QStyle::PE_IndicatorButtonDropDown
+ \row \o \c PE_FocusRect \o QStyle::PE_FrameFocusRect
+ \row \o \c PE_ArrowUp \o QStyle::PE_IndicatorArrowUp
+ \row \o \c PE_ArrowDown \o QStyle::PE_IndicatorArrowDown
+ \row \o \c PE_ArrowRight \o QStyle::PE_IndicatorArrowRight
+ \row \o \c PE_ArrowLeft \o QStyle::PE_IndicatorArrowLeft
+ \row \o \c PE_SpinBoxUp \o QStyle::PE_IndicatorSpinUp
+ \row \o \c PE_SpinBoxDown \o QStyle::PE_IndicatorSpinDown
+ \row \o \c PE_SpinBoxPlus \o QStyle::PE_IndicatorSpinPlus
+ \row \o \c PE_SpinBoxMinus \o QStyle::PE_IndicatorSpinMinus
+ \row \o \c PE_SpinBoxSlider \o QStyle::CE_SpinBoxSlider \o uses QStyle::drawControl()
+ \row \o \c PE_Indicator \o QStyle::PE_IndicatorCheckBox
+ \row \o \c PE_IndicatorMask \o N/A \o use QStyle::styleHint() to retrieve mask
+ \row \o \c PE_ExclusiveIndicator \o QStyle::PE_IndicatorRadioButton
+ \row \o \c PE_ExclusiveIndicatorMask \o N/A \o use QStyle::styleHint() to retrieve mask
+ \row \o \c PE_DockWindowHandle \o QStyle::PE_IndicatorToolBarHandle
+ \row \o \c PE_DockWindowSeparator \o QStyle::PE_Q3DockWindowSeparator
+ \row \o \c PE_DockWindowResizeHandle \o QStyle::PE_IndicatorDockWindowResizeHandle
+ \row \o \c PE_DockWindowTitle \o QStyle::CE_DockWindowTitle \o uses QStyle::drawControl()
+ \row \o \c PE_Splitter \o QStyle::CE_Splitter \o uses QStyle::drawControl()
+ \row \o \c PE_Panel \o QStyle::PE_Frame
+ \row \o \c PE_PanelMenu \o QStyle::PE_FrameMenu
+ \row \o \c PE_PanelMenuBar \o QStyle::PE_PanelMenuBar
+ \row \o \c PE_PanelDockWindow \o QStyle::PE_FrameDockWindow
+ \row \o \c PE_TabBarBase \o QStyle::PE_FrameTabBarBase
+ \row \o \c PE_HeaderSection \o QStyle::CE_HeaderSection \o uses QStyle::drawControl()
+ \row \o \c PE_HeaderArrow \o QStyle::PE_IndicatorHeaderArrow
+ \row \o \c PE_StatusBarSection \o QStyle::PE_FrameStatusBar
+ \row \o \c PE_Separator \o QStyle::PE_Q3Separator
+ \row \o \c PE_SizeGrip \o QStyle::CE_SizeGrip \o uses QStyle::drawControl()
+ \row \o \c PE_CheckMark \o QStyle::PE_IndicatorMenuCheckMark
+ \row \o \c PE_ScrollBarAddLine \o QStyle::CE_ScrollBarAddLine \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarSubLine \o QStyle::CE_ScrollBarSubLine \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarAddPage \o QStyle::CE_ScrollBarAddPage \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarSubPage \o QStyle::CE_ScrollBarSubPage \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarSlider \o QStyle::CE_ScrollBarSlider \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarFirst \o QStyle::CE_ScrollBarFirst \o uses QStyle::drawControl()
+ \row \o \c PE_ScrollBarLast \o QStyle::CE_ScrollBarLast \o uses QStyle::drawControl()
+ \row \o \c PE_ProgressBarChunk \o QStyle::PE_IndicatorProgressChunk
+ \row \o \c PE_PanelLineEdit \o QStyle::PE_FrameLineEdit
+ \row \o \c PE_PanelTabWidget \o QStyle::PE_FrameTabWidget
+ \row \o \c PE_WindowFrame \o QStyle::PE_FrameWindow
+ \row \o \c PE_CheckListController \o QStyle::PE_Q3CheckListController
+ \row \o \c PE_CheckListIndicator \o QStyle::PE_Q3CheckListIndicator
+ \row \o \c PE_CheckListExclusiveIndicato\o QStyle::PE_Q3CheckListExclusiveIndicator
+ \row \o \c PE_PanelGroupBox \o QStyle::PE_FrameGroupBox
+ \row \o \c PE_TreeBranch \o QStyle::PE_IndicatorBranch
+ \row \o \c PE_RubberBand \o QStyle::CE_RubberBand \o uses QStyle::drawControl()
+ \row \o \c PE_PanelToolBar \o QStyle::PE_PanelToolBar
+ \row \o \c PE_ToolBarHandle \o QStyle::PE_IndicatorToolBarHandle
+ \row \o \c PE_ToolBarSeparator \o QStyle::PE_IndicatorToolBarSeparator
+ \endtable
+
+ The QStyle::drawControlMask() and QStyle::drawComplexControlMask()
+ functions have been removed. They are replaced with a style hint.
+
+ The QStyle::drawItem() overloads that took both a pixmap and a string have
+ been removed. Use QStyle::drawItemText() and QStyle::drawItemPixmap() directly.
+
+ The QStyle::itemRect() overload that took both a pixmap and a string is also removed, use
+ either QStyle::itemTextRect() or QStyle::itemPixmapRect() instead.
+
+ \section1 QStyleSheet
+
+ The QStyleSheet and QStyleSheetItem classes have been renamed
+ Q3StyleSheet and Q3StyleSheetItem, and have been moved to the
+ Qt3Support library.
+
+ See \l{Rich Text Processing} for an overview of the Qt 4 rich
+ text classes, and \l{Qt Style Sheets} for a description of
+ CSS-like style sheet support in Qt 4.2 and above.
+
+ \section1 QSyntaxHighlighter
+
+ The \c QSyntaxHighlighter class from Qt 3 has been renamed
+ Q3SyntaxHighlighter and moved to the Qt3Support library. Since Qt
+ 4.1, it has been replaced by a new QSyntaxHighlighter class based
+ on Qt 4's new rich text engine.
+
+ \section1 QTabBar
+
+ See \l{#properties}{Properties} for a list of QTabBar properties
+ in Qt 3 that have changed in Qt 4.
+
+ \section1 QTabDialog
+
+ The \c QTabDialog class is no longer part of the public Qt API.
+ It has been renamed Q3TabDialog and moved to Qt3Support. In Qt 4
+ applications, you can easily obtain the same result by combining
+ a QTabWidget with a QDialog and provide \l{QPushButton}s
+ yourself.
+
+ See also the \l{dialogs/tabdialog} example, which shows how to
+ implement tab dialogs in Qt 4.
+
+ \section1 QTabWidget
+
+ See \l{#properties}{Properties} for a list of QTabWidget
+ properties in Qt 3 that have changed in Qt 4.
+
+ \section1 QTable
+
+ The \c QTable, \c QTableItem, \c QComboTableItem, \c
+ QCheckTableItem, and \c QTableSelection classes have been renamed
+ Q3Table, Q3TableItem, Q3ComboTableItem, Q3CheckTableItem, and
+ Q3TableSelection and moved to the Qt3Support library.
+ New Qt applications should use the new QTableWidget or QTableView
+ class instead.
+
+ Some of these classes behave differently with respect to the way
+ they handle \c NULL pointers. For example, Q3TableItem::setPixmap()
+ no longer accepts \c NULL or 0 to indicate that the item should
+ contain a null pixmap; in this case, a null pixmap should be
+ constructed and passed explicitly to the function.
+
+ See \l{Model/View Programming} for an overview of the new item
+ view classes.
+
+ \section1 QTextCodec
+
+ The loadCharmap() and loadCharmapFromFile() functions are no longer
+ available in Qt 4. You need to create your own codec if you want to
+ create a codec based on a POSIX2 charmap definition.
+
+ \section1 QTextDrag
+
+ The \c QTextDrag class has been renamed Q3TextDrag and moved to
+ the Qt3Support library. In Qt 4, use QMimeData
+ instead and call QMimeData::setText() to set the data.
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QTextEdit
+
+ The old QTextEdit and QTextBrowser classes have been renamed
+ Q3TextEdit and Q3TextBrowser, and have been moved to Qt3Support.
+ The new QTextEdit and QTextBrowser have a somewhat different API.
+
+ The \c QTextEdit::setWrapPolicy() function has been renamed to \l{QTextEdit::setWordWrapMode()}{setWordWrapMode()} and the
+ \c QTextEdit::setWrapColumnOrWidth() function has been renamed to \l{QTextEdit::setLineWrapColumnOrWidth()}
+ {setLineWrapColumnOrWidth()}. The Q3TextEdit::setWrapPolicy() and Q3TextEdit::setWrapColumnOrWidth() still provide this
+ functionality in the Q3TextEdit class.
+
+
+ See \l{Rich Text Processing} for an overview of the Qt 4 rich
+ text classes.
+
+ \section1 QTextIStream
+
+ The QTextIStream convenience class is no longer provided in Qt 4. Use
+ QTextStream directly instead.
+
+ \section1 QTextOStream
+
+ The QTextOStream convenience class is no longer provided in Qt 4. Use
+ QTextStream directly instead.
+
+ \section1 QTextOStreamIterator
+
+ The undocumented \c QTextOStreamIterator class has been removed
+ from the Qt library. If you need it in your application, feel
+ free to copy the source code from the Qt 3 \c <qtl.h> header
+ file.
+
+ \section1 QTextStream
+
+ QTextStream has undergone a number of API and implementation enhancements,
+ and some of the changes affect QTextStream's behavior:
+
+ \list
+ \o QTextStream now uses buffered writing, which means that you need to
+ call QTextStream::flush(), or use the streaming manipulators \c endl or
+ \c flush if you need QTextStream to flush its write buffer. The stream is
+ flushed automatically if QTextStream is deleted or when the device is
+ closed.
+ \o QTextStream now uses buffered reading, so if you read a line from the
+ stream, QTextStream will read as much as it can from the device to
+ fill up its internal read buffer. This speeds up reading significantly,
+ but Qt 3 code that mixed QTextStream access and direct device access
+ may need to be updated.
+ \o While QTextStream in Qt 3 always translated end-of-line characters from
+ Windows style ("\\r\\n") to Unix style ("\\n") on Windows, QTextStream in
+ Qt 4 only does this on devices opened with the \c{QIODevice::Text} mode
+ (formerly \c{IO_Translate}).
+ \endlist
+
+ Note that when using a QTextStream on a QFile in Qt 4, calling
+ QIODevice::reset() on the QFile will not have the expected result
+ because QTextStream now buffers the file. Use the
+ QTextStream::seek() function instead.
+
+ \section1 QTextView
+
+ The \c QTextView class has been renamed Q3TextView and moved to the
+ Qt3Support library.
+
+ \section1 QTimeEdit
+
+ The QTimeEdit class in Qt 4 is a convenience class based on
+ QDateTimeEdit. The old class has been renamed Q3TimeEdit and moved
+ to the Qt3Support library.
+
+ See \l{Porting to Qt 4 - Virtual Functions}{Virtual Functions} for
+ a list of \c QTimeEdit virtual member functions in Qt 3 that are no
+ longer virtual in Qt 4.
+
+ \section1 QTimer
+
+ Windows restricts the granularity of timers, but starting with Qt 4,
+ we emulate a finer time resolution. On Windows XP we use the
+ multimedia timer API, which gives us 1 millisecond resolution for
+ QTimer.
+
+ Note that other versions of Windows have a lower timer resolution,
+ and that code relying on underlying system timer restrictions
+ encounters no such limitations using Qt 4 (e.g., setting an
+ interval of 0 millisecond results in Qt occupying all of the
+ processor time when no GUI events need processing).
+
+ \section1 QToolBar
+
+ The old \c QToolBar class, which worked with the old \c
+ QMainWindow and \c QDockArea classes and inherited from \c
+ QDockWindow, has been renamed Q3ToolBar and moved to
+ Qt3Support. Note that, when using Q3ToolBar, the toolbar's actions
+ must be \l {Q3Action}s.
+
+ Use the new QToolBar class in new applications.
+
+ \note \l{Q3ToolBar}'s
+ \l{Q3DockWindow::setHorizontallyStretchable()}{horizontallyStretchable}
+ property can be achieved in QToolBar with
+ \l{QWidget#Size Hints and Size Policies}{size policies}.
+
+ \section1 QToolButton
+
+ See \l{#properties}{Properties} for a list of QToolButton properties
+ in Qt 3 that have changed in Qt 4.
+
+ Note that many of the properties that could previously be set in
+ the constructor must now be set separately.
+
+ \section1 QToolTip
+
+ The QToolTip::setGloballyEnabled() function no longer exists.
+ Tooltips can be disabled by \l{QObject::installEventFilter()}{installing
+ an event filter} on qApp (the unique QApplication object) to block events
+ of type QEvent::ToolTip.
+
+ \section1 QUriDrag
+
+ The \c QUriDrag class has been renamed Q3UriDrag and moved to the
+ Qt3Support library. In Qt 4, use QMimeData instead
+ and call QMimeData::setUrl() to set the URL.
+
+ See \l{Porting to Qt 4 - Drag and Drop} for a comparison between
+ the drag and drop APIs in Qt 3 and Qt 4.
+
+ \section1 QUrl
+
+ The QUrl class has been rewritten from scratch in Qt 4 to be more
+ standard-compliant. The old QUrl class has been renamed Q3Url and
+ moved to the Qt3Support library.
+
+ The new QUrl class provides an extensive list of compatibility
+ functions to ease porting from Q3Url to QUrl. A few functions
+ require you to change your code:
+
+ \list
+ \o Q3Url::Q3Url(const Q3Url &, const QString &, bool) can be
+ simulated by combining the URLs manually (using
+ QString::operator+(), for example).
+ \o Q3Url::setEncodedPathAndQuery(const QString &) is replaced by
+ QUrl::setPath() and QUrl::setEncodedQuery().
+ \o Q3Url::encodedPathAndQuery() is replaced by QUrl::path() and
+ QUrl::encodedQuery().
+ \o Q3Url::isLocalFile() can be simulated by checking that
+ QUrl::protocol() is "file".
+ \o Q3Url::toString(bool, bool) is replaced by
+ QUrl::toString(int), where the \c int parameter specifies a
+ combination of \l{QUrl::FormattingOptions}{formatting
+ options}.
+ \endlist
+
+ \section1 QUrlOperator
+
+ The \c QUrlOperator class is no longer part of the public Qt API.
+ It has been renamed Q3UrlOperator and moved to Qt3Support.
+
+ From Qt 4.4, the Network Access API provides a subset of the features
+ provided by \c QUrlOperator that are mostly intended for use with
+ applications that use the HTTP and FTP protocols. See the
+ QNetworkRequest, QNetworkReply, and QNetworkAccessManager documentation
+ for further details.
+
+ \target qvaluelist.section
+ \section1 QValueList<T>
+
+ The QValueList<T> class has been replaced by QList<T> and
+ QLinkedList<T> in Qt 4. As a help when porting older Qt
+ applications, the Qt3Support library contains a
+ QValueList<T> class implemented in terms of the new
+ QLinkedList<T>. Similarly, it contains QValueListIterator<T> and
+ QValueListConstIterator<T> classes implemented in terms of
+ QLinkedList<T>::iterator and QLinkedList<T>::const_iterator.
+
+ When porting to Qt 4, you have the choice of using QList<T> or
+ QLinkedList<T> as alternatives to QValueList<T>. QList<T> has an
+ index-based API and provides very fast random access
+ (QList::operator[]), whereas QLinkedList<T> has an iterator-based
+ API.
+
+ Here's a list of problem functions:
+
+ \list
+ \o QValueList(const std::list<T> &) doesn't exist in QList or
+ QLinkedList. You can simulate it by calling
+ \l{QLinkedList::append()}{append()} in a loop.
+
+ \o QValueList::insert(iterator, size_type, const T& x) doesn't
+ exist in QList or QLinkedList. Call
+ \l{QLinkedList::insert()}{insert()} repeatedly instead.
+
+ \o QValueList::fromLast() doesn't exist in QList or QLinkedList. Use
+ QValueList::end() instead.
+
+ \oldcode
+ for (QValueList<T>::iterator i = list.fromLast(); i != list.begin(); --i)
+ do_something(*i);
+ \newcode
+ QLinkedList<T>::iterator i = list.end();
+ while (i != list.begin()) {
+ --i; // decrement i before using it
+ do_something(*i);
+ }
+ \endcode
+
+ \o QValueList::append() and QValueList::prepend() return an
+ iterator to the inserted item. QList's and QLinkedList's
+ corresponding functions don't, but it's not a problem because
+ QValueList::prepend() always returns begin() and append()
+ always returns QValueList::end() - 1.
+
+ \o QValueList::at(\e i) return an iterator to the item at index
+ \e i. This corresponds to QList::begin() + \e i.
+
+ \o QValueList::contains(const T &) corresponds to
+ QList::count(const T &) and QLinkedList::count(const T &).
+ \endlist
+
+ \section1 QValueVector<T>
+
+ The QValueVector<T> class has been replaced by QVector<T> in Qt
+ 4. As a help when porting older Qt applications, the Qt3Support
+ library contains a Q3ValueVector<T> class implemented in terms of
+ the new QVector<T>.
+
+ When porting from QValueVector<T> to QVector<T>, you might run
+ into the following incompatibilities:
+
+ \list
+ \o QValueVector(const std::vector<T> &) doesn't exist in QVector.
+ You can simulate it by calling QVector::append()} in a loop.
+ \o QValueVector::resize(int, const T &) doesn't exist in QVector.
+ If you want the new items to be initialized with a particular
+ value, use QVector::insert() instead.
+ \o QValueVector::at() on a non-const vector returns a non-const
+ reference. This corresponds to QVector::operator[]().
+ \o Both QValueVector::at() functions have an \e ok parameter of
+ type \c{bool *} that is set to true if the index is within
+ bounds. This functionality doesn't exist in QVector; instead,
+ check the index against QVector::size() yourself.
+ \endlist
+
+ See \l{Generic Containers} for an overview of the Qt 4 container
+ classes.
+
+ \section1 QVariant
+
+ Some changes to the rest of the Qt library have
+ implications on QVariant:
+
+ \list 1
+ \o The \c QVariant::ColorGroup enum value is defined only
+ if \c QT3_SUPPORT is defined.
+ \o The \c QVariant::IconSet enum value has been renamed
+ QVariant::Icon.
+ \o The \c QVariant::CString enum value is now a synonym for
+ QVariant::ByteArray.
+ \endlist
+
+ Also, the QVariant(bool, int) constructor has been replaced by QVariant(bool).
+ Old code like QVariant(true, 0) should be replaced with QVariant(true); otherwise,
+ the QVariant(int, void *) overload might accidentally be triggered.
+
+ Many of QVariant's convenience functions in Qt 3, such as toColor() and
+ toKeySequence(), have been removed to enable QVariant to be part of the
+ QtCore module. QVariant is still able to hold values of these types.
+
+ Types which are not supported by any of the QVariant constructors can be
+ stored as variants with the QVariant::fromValue() function. Types with no
+ suitable convenience function for unpacking can be retrieved with the
+ QVariant::value() function or passed directly to classes that implement
+ the QVariant() operator.
+
+ \table
+ \header \o Qt 3 function \o Qt 4 function
+ \input porting4-removedvariantfunctions.qdocinc
+ \endtable
+
+ See the QVariant::Type enum for a list of types supported by QVariant.
+
+ \section1 QVBox
+
+ The \c QVBox class is now only available as Q3VBox in Qt 4. You
+ can achieve the same result as \c QVBox by creating a QWidget
+ with a vertical layout:
+
+ \oldcode
+ QVBox *vbox = new QVBox;
+ QPushButton *child1 = new QPushButton(vbox);
+ QPushButton *child2 = new QPushButton(vbox);
+ \newcode
+ QWidget *vbox = new QWidget;
+ QPushButton *child1 = new QPushButton;
+ QPushButton *child2 = new QPushButton;
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(child1);
+ layout->addWidget(child2);
+ vbox->setLayout(layout);
+ \endcode
+
+ Note that child widgets are not automatically placed into the widget's
+ layout; you will need to manually add each widget to the QVBoxLayout.
+
+ \section1 QVGroupBox
+
+ The \c QVGroupBox class has been renamed Q3VGroupBox and moved to
+ the Qt3Support library.
+ Qt 4 does not provide a specific replacement class for \c QVGroupBox
+ since QGroupBox is designed to be a generic container widget. As a
+ result, you need to supply your own layout for any child widgets.
+
+ See \l{#QGroupBox} for more information about porting code that uses
+ group boxes.
+
+ \section1 QWhatsThis
+
+ The QWhatsThis class has been redesigned in Qt 4. The old \c
+ QWhatsThis class is available as Q3WhatsThis in Qt3Support.
+
+ \section1 QWidget
+
+ Widget background painting has been greatly improved, supporting
+ flicker-free updates and making it possible to have
+ semi-transparent widgets. This renders the following background
+ handling functions obsolete:
+
+ \list
+ \o QWidget::repaint(bool noErase) - the \c noErase boolean parameter is gone
+ \o QWidget::setBackgroundMode(BackgroundMode m)
+ \o QWidget::backgroundBrush() const
+ \o QWidget::setBackgroundPixmap(const QPixmap &pm)
+ \o QWidget::backgroundPixmap() const
+ \o QWidget::setBackgroundColor(const QColor &c)
+ \o QWidget::backgroundColor() const
+ \o QWidget::foregroundColor() const
+ \o QWidget::eraseColor() const
+ \o QWidget::setEraseColor(const QColor &c)
+ \o QWidget::erasePixmap() const
+ \o QWidget::setErasePixmap(const QPixmap &p)
+ \o QWidget::paletteForegroundColor()
+ \o QWidget::setPaletteForegroundColor(const QColor &c)
+ \o QWidget::paletteBackgroundColor()
+ \o QWidget::setPaletteBackgroundColor(const QColor &c)
+ \o QWidget::paletteBackgroundPixmap() const
+ \o QWidget::setPaletteBackgroundPixmap(const QPixmap &p)
+ \o QWidget::erase()
+ \o QWidget::erase(const QRect &r)
+ \o QWidget::setBackgroundOrigin( BackgroundOrigin )
+ \o QWidget::BackgroundOrigin backgroundOrigin() const
+ \o QWidget::backgroundOffset()
+ \endlist
+
+ Sample code on how to do obtain similar behavior from Qt 4, previously
+ handled by some of the above functions can be found in the
+ \l{http://doc.trolltech.com/qwidget-qt3.html}{Qt 3 Support Members for QWidget}
+ page.
+
+ A widget now receives change events in its QWidget::changeEvent()
+ handler. This makes the following virtual change handlers obsolete:
+
+ \list
+ \o QWidget::styleChange - use QEvent::StyleChange
+ \o QWidget::enabledChange - use QEvent::EnabledChange
+ \o QWidget::paletteChange - use QEvent::PaletteChange
+ \o QWidget::fontChange - use QEvent::FontChange
+ \o QWidget::windowActivationChange - use QEvent::ActivationChange
+ \o QWidget::languageChange - use QEvent::LanguageChange
+ \endlist
+
+ The following functions were slots, but are no more:
+ \list
+ \o QWidget::clearFocus()
+ \o QWidget::setMouseTracking()
+ \o QWidget::stackUnder(QWidget*)
+ \o QWidget::move(int x, int y)
+ \o QWidget::move(const QPoint &)
+ \o QWidget::resize(int w, int h)
+ \o QWidget::resize(const QSize &)
+ \o QWidget::setGeometry(int x, int y, int w, int h)
+ \o QWidget::setGeometry(const QRect &)
+ \o QWidget::adjustSize()
+ \o QWidget::update(int x, int y, int w, int h)
+ \o QWidget::update(const QRect&)
+ \o QWidget::repaint(bool erase)
+ \o QWidget::repaint(int x, int y, int w, int h, bool erase)
+ \o QWidget::repaint(const QRect &, bool erase)
+ \o QWidget::repaint(const QRegion &, bool erase)
+ \o QWidget::setCaption(const QString &)
+ \o QWidget::setIcon(const QPixmap &)
+ \o QWidget::setIconText(const QString &)
+ \endlist
+
+ The following functions were incorrectly marked as virtual:
+
+ \list
+ \o QWidget::close(bool alsoDelete)
+ \o QWidget::create(WId, bool, bool)
+ \o QWidget::destroy(bool)
+ \o QWidget::move(int x, int y)
+ \o QWidget::reparent(QWidget *parent, WFlags, const QPoint &, bool)
+ \o QWidget::resize(int w, int h)
+ \o QWidget::setAcceptDrops(bool on)
+ \o QWidget::setActiveWindow()
+ \o QWidget::setAutoMask(bool)
+ \o QWidget::setBackgroundColor(const QColor &)
+ \o QWidget::setBackgroundMode(BackgroundMode)
+ \o QWidget::setBackgroundOrigin(BackgroundOrigin)
+ \o QWidget::setBackgroundPixmap(const QPixmap &)
+ \o QWidget::setCaption(const QString &)
+ \o QWidget::setCursor(const QCursor &)
+ \o QWidget::setEnabled(bool)
+ \o QWidget::setEraseColor(const QColor &)
+ \o QWidget::setErasePixmap(const QPixmap &)
+ \o QWidget::setFocus()
+ \o QWidget::setFocusPolicy(FocusPolicy)
+ \o QWidget::setFocusProxy(QWidget *)
+ \o QWidget::setFont(const QFont &)
+ \o QWidget::setGeometry(const QRect &)
+ \o QWidget::setGeometry(int x, int y, int w, int h)
+ \o QWidget::setIcon(const QPixmap &)
+ \o QWidget::setIconText(const QString &)
+ \o QWidget::setKeyCompression(bool)
+ \o QWidget::setMask(const QBitmap &)
+ \o QWidget::setMask(const QRegion &)
+ \o QWidget::setMaximumSize(int maxw, int maxh)
+ \o QWidget::setMicroFocusHint(int x, int y, int w, int h, bool, QFont *f)
+ \o QWidget::setMinimumSize(int minw, int minh)
+ \o QWidget::setMouseTracking(bool enable)
+ \o QWidget::setPalette(const QPalette &)
+ \o QWidget::setPaletteBackgroundColor(const QColor &)
+ \o QWidget::setPaletteBackgroundPixmap(const QPixmap &)
+ \o QWidget::setSizeIncrement(int w, int h)
+ \o QWidget::setSizePolicy(QSizePolicy)
+ \o QWidget::setUpdatesEnabled(bool enable)
+ \o QWidget::setWState(uint)
+ \o QWidget::show()
+ \o QWidget::showFullScreen()
+ \o QWidget::showMaximized()
+ \o QWidget::showMinimized()
+ \o QWidget::showNormal()
+ \o QWidget::sizePolicy()
+ \o QWidget::unsetCursor()
+ \endlist
+
+ The internal clearWState() function was removed. Use
+ QWidget::setAttribute() instead.
+
+ setWFlags() was renamed QWidget::setWindowFlags().
+
+ clearWFlags() has no direct replacement. You can use
+ QWidget::setAttribute() instead. For example,
+ \c{setAttribute(..., false)} to clear an attribute. More information
+ is available \l{http://doc.trolltech.com/qwidget.html#setAttribute}{here}.
+
+ testWFlags() was renamed to \l{QWidget::testAttribute()}{testAttribute()}.
+
+ See \l{#properties}{Properties} for a list of QWidget properties
+ in Qt 3 that have changed in Qt 4.
+
+ \section1 QWidgetFactory
+
+ The \c QWidgetFactory class has been replaced by QFormBuilder in Qt 4.
+
+ \section1 QWidgetIntDict
+
+ The QWidgetIntDict class was a synonym for QIntDict<QWidget>. It
+ is no longer available in Qt 4. If you link against Qt3Support,
+ you can use Q3IntDict<QWidget> instead; otherwise, see the
+ \l{#qdict.section}{section on QDict<T>}.
+
+ \target qwidgetlist.section
+ \section1 QWidgetList
+
+ In Qt 3, the QWidgetList class was a typedef for
+ QPtrList<QWidget>. In Qt 4, it is a typedef for QList<QWidget *>.
+ See the \l{#qptrlist.section}{section on QPtrList<T>}.
+
+ \section1 QWidgetPlugin
+
+ The QWidgetPlugin class is no longer available in Qt 4. To create
+ custom widget plugins, subclass QDesignerCustomWidgetInterface to
+ provide information about the custom widget, and build a plugin in
+ the way described in the \l{designer/customwidgetplugin}{Custom
+ Widget Plugin} example.
+
+ \section1 QWidgetStack
+
+ The QWidgetStack class is no longer part of the Qt public API. It
+ has been renamed Q3WidgetStack and moved to Qt3Support. In Qt 4
+ applications, you can use QStackedWidget instead to obtain the
+ same results.
+
+ \section1 QWizard
+
+ The \c QWizard class was reintroduced in Qt 4.3. See the
+ \l{Trivial Wizard Example}, \l{License Wizard Example} and
+ \l{Class Wizard Example} for more details.
+
+ \section1 QWorkspace
+
+ The \c QWorkspace in Qt 4 class requires explicit adding of MDI
+ windows with QWorkspace::addWindow().
+*/
+
+/*!
+ \page porting4-virtual-functions.html
+ \title Porting to Qt 4 - Virtual Functions
+ \contentspage {Porting Guides}{Contents}
+ \previouspage Porting to Qt 4
+ \nextpage Porting to Qt 4 - Drag and Drop
+ \ingroup porting
+ \brief An overview of changes to virtual functions in Qt 4.
+
+ \section1 Virtual Functions
+
+ Virtual functions that changed their signature in Qt 4:
+
+ \table
+ \header \o Qt 3 function signature \o Qt 4 function signature
+ \input porting4-modifiedvirtual.qdocinc
+ \endtable
+
+ Virtual functions that are not virtual in Qt 4:
+
+ \table
+ \header \o Qt 3 function \o Comment
+ \input porting4-removedvirtual.qdocinc
+ \endtable
+*/
diff --git a/doc/src/printing.qdoc b/doc/src/printing.qdoc
new file mode 100644
index 0000000..e1c337a
--- /dev/null
+++ b/doc/src/printing.qdoc
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page printing.html
+ \title Printing with Qt
+ \ingroup multimedia
+ \ingroup text-processing
+ \brief A guide to producing printed output with Qt's paint system and widgets.
+
+ Qt provides extensive cross-platform support for printing. Using the printing
+ systems on each platform, Qt applications can print to attached printers and
+ across networks to remote printers. Qt's printing system also enables PostScript
+ and PDF files to be generated, providing the foundation for basic report
+ generation facilities.
+
+ \tableofcontents
+
+ \section1 Paint Devices and Printing
+
+ In Qt, printers are represented by QPrinter, a paint device that provides
+ functionality specific to printing, such as support for multiple pages and
+ double-sided output. As a result, printing involves using a QPainter to paint
+ onto a series of pages in the same way that you would paint onto a custom
+ widget or image.
+
+ \section2 Creating a QPrinter
+
+ Although QPrinter objects can be constructed and set up without requiring user
+ input, printing is often performed as a result of a request by the user;
+ for example, when the user selects the \gui{File|Print...} menu item in a GUI
+ application. In such cases, a newly-constructed QPrinter object is supplied to
+ a QPrintDialog, allowing the user to specify the printer to use, paper size, and
+ other printing properties.
+
+ \snippet examples/richtext/orderform/mainwindow.cpp 18
+
+ It is also possible to set certain default properties by modifying the QPrinter
+ before it is supplied to the print dialog. For example, applications that
+ generate batches of reports for printing may set up the QPrinter to
+ \l{QPrinter::setOutputFileName()}{write to a local file} by default rather than
+ to a printer.
+
+ \section2 Painting onto a Page
+
+ Once a QPrinter object has been constructed and set up, a QPainter can be used
+ to perform painting operations on it. We can construct and set up a painter in
+ the following way:
+
+ \snippet doc/src/snippets/printing-qprinter/object.cpp 0
+
+ Since the QPrinter starts with a blank page, we only need to call the
+ \l{QPrinter::}{newPage()} function after drawing each page, except for the
+ last page.
+
+ The document is sent to the printer, or written to a local file, when we call
+ \l{QPainter::}{end()}.
+
+ \section2 Coordinate Systems
+
+ QPrinter provides functions that can be used to obtain information about the
+ dimensions of the paper (the paper rectangle) and the dimensions of the
+ printable area (the page rectangle). These are given in logical device
+ coordinates that may differ from the physical coordinates used by the device
+ itself, indicating that the printer is able to render text and graphics at a
+ (typically higher) resolution than the user's display.
+
+ Although we do not need to handle the conversion between logical and physical
+ coordinates ourselves, we still need to apply transformations to painting
+ operations because the pixel measurements used to draw on screen are often
+ too small for the higher resolutions of typical printers.
+
+ \table
+ \row \o \bold{Printer and Painter Coordinate Systems}
+
+ The \l{QPrinter::}{paperRect()} and \l{QPrinter::}{pageRect()} functions
+ provide information about the size of the paper used for printing and the
+ area on it that can be painted on.
+
+ The rectangle returned by \l{QPrinter::}{pageRect()} usually lies inside
+ the rectangle returned by \l{QPrinter::}{paperRect()}. You do not need to
+ take the positions and sizes of these area into account when using a QPainter
+ with a QPrinter as the underlying paint device; the origin of the painter's
+ coordinate system will coincide with the top-left corner of the page
+ rectangle, and painting operations will be clipped to the bounds of the
+ drawable part of the page.
+
+ \o \inlineimage printer-rects.png
+ \endtable
+
+ The paint system automatically uses the correct device metrics when painting
+ text but, if you need to position text using information obtained from
+ font metrics, you need to ensure that the print device is specified when
+ you construct QFontMetrics and QFontMetricsF objects, or ensure that each QFont
+ used is constructed using the form of the constructor that accepts a
+ QPaintDevice argument.
+
+ \section1 Printing from Complex Widgets
+
+ Certain widgets, such as QTextEdit and QGraphicsView, display rich content
+ that is typically managed by instances of other classes, such as QTextDocument
+ and QGraphicsScene. As a result, it is these content handling classes that
+ usually provide printing functionality, either via a function that can be used
+ to perform the complete task, or via a function that accepts an existing
+ QPainter object. Some widgets provide convenience functions to expose underlying
+ printing features, avoiding the need to obtain the content handler just to call
+ a single function.
+
+ The following table shows which class and function are responsible for
+ printing from a selection of different widgets. For widgets that do not expose
+ printing functionality directly, the content handling classes containing this
+ functionality can be obtained via a function in the corresponding widget's API.
+
+ \table
+ \header \o Widget \o Printing function \o Accepts
+ \row \o QGraphicsView \o QGraphicsView::render() \o QPainter
+ \row \o QSvgWidget \o QSvgRenderer::render() \o QPainter
+ \row \o QTextEdit \o QTextDocument::print() \o QPrinter
+ \row \o QTextLayout \o QTextLayout::draw() \o QPainter
+ \row \o QTextLine \o QTextLine::draw() \o QPainter
+ \endtable
+
+ QTextEdit requires a QPrinter rather than a QPainter because it uses information
+ about the configured page dimensions in order to insert page breaks at the most
+ appropriate places in printed documents.
+*/
+
+/*!
+ \page pdf-licensing.html
+ \title Notes about PDF Licensing
+ \ingroup licensing
+ \brief Details of restrictions on the use of PDF-related trademarks.
+
+ Please note that Adobe\reg places restrictions on the use of its trademarks
+ (including logos) in conjunction with PDF; e.g. "Adobe PDF". Please refer
+ to \l{http://www.adobe.com}{www.adobe.com} for guidelines.
+*/
diff --git a/doc/src/properties.qdoc b/doc/src/properties.qdoc
new file mode 100644
index 0000000..0775b12
--- /dev/null
+++ b/doc/src/properties.qdoc
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page properties.html
+ \title Qt's Property System
+ \ingroup architecture
+ \brief An overview of Qt's property system.
+
+ Qt provides a sophisticated property system similar to the ones
+ supplied by some compiler vendors. However, as a compiler- and
+ platform-independent library, Qt does not rely on non-standard
+ compiler features like \c __property or \c [property]. The Qt
+ solution works with \e any standard C++ compiler on every platform
+ Qt supports. It is based on the \l {Meta-Object System} that also
+ provides inter-object communication via \l{signals and slots}.
+
+ \section1 Requirements for Declaring Properties
+
+ To declare a property, use the \l {Q_PROPERTY()} {Q_PROPERTY()}
+ macro in a class that inherits QObject.
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 0
+
+ Here are some typical examples of property declarations taken from
+ class QWidget.
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 1
+
+ A property behaves like a class data member, but it has additional
+ features accessible through the \l {Meta-Object System}.
+
+ \list
+
+ \o A \c READ accessor function is required. It is for reading the
+ property value. It must be const and must return either the
+ property's type or a pointer or reference to that type. e.g.,
+ QWidget::focus is a read-only property with \c READ function
+ QWidget::hasFocus().
+
+ \o A \c WRITE accessor function is optional. It is for setting the
+ property value. It must return void and must take exactly one
+ argument, either of the property's type or a pointer or reference
+ to that type. e.g., QWidget::enabled has the \c WRITE function
+ QWidget::setEnabled(). Read-only properties do not need \c WRITE
+ functions. e.g., QWidget::focus has no \c WRITE function.
+
+ \o A \c RESET function is optional. It is for setting the property
+ back to its context specific default value. e.g., QWidget::cursor
+ has the typical \c READ and \c WRITE functions, QWidget::cursor()
+ and QWidget::setCursor(), and it also has a \c RESET function,
+ QWidget::unsetCursor(), since no call to QWidget::setCursor() can
+ mean \e {reset to the context specific cursor}. The \c RESET
+ function musrt return void and take no parameters.
+
+ \o The \c DESIGNABLE attribute indicates whether the property
+ should be visible in the property editor of GUI design tool (e.g.,
+ \l {Qt Designer}). Most properties are \c DESIGNABLE (default
+ true). Instead of true or false, you can specify a boolean
+ member function.
+
+ \o The \c SCRIPTABLE attribute indicates whether this property
+ should be accessible by a scripting engine (default true).
+ Instead of true or false, you can specify a boolean member
+ function.
+
+ \o The \c STORED attribute indicates whether the property should
+ be thought of as existing on its own or as depending on other
+ values. It also indicates whether the property value must be saved
+ when storing the object's state. Most properties are \c STORED
+ (default true), but e.g., QWidget::minimumWidth() has \c STORED
+ false, because its value is just taken from the width component
+ of property QWidget::minimumSize(), which is a QSize.
+
+ \o The \c USER attribute indicates whether the property is
+ designated as the user-facing or user-editable property for the
+ class. Normally, there is only one \c USER property per class
+ (default false). e.g., QAbstractButton::checked is the user
+ editable property for (checkable) buttons. Note that QItemDelegate
+ gets and sets a widget's \c USER property.
+
+ \endlist
+
+ The \c READ, \c WRITE, and \c RESET functions can be inherited.
+ They can also be virtual. When they are inherited in classes where
+ multiple inheritance is used, they must come from the first
+ inherited class.
+
+ The property type can be any type supported by QVariant, or it can
+ be a user-defined type. In this example, class QDate is considered
+ to be a user-defined type.
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 2
+
+ Because QDate is user-defined, you must include the \c{<QDate>}
+ header file with the property declaration.
+
+ For QMap, QList, and QValueList properties, the property value is
+ a QVariant whose value is the entire list or map. Note that the
+ Q_PROPERTY string cannot contain commas, because commas separate
+ macro arguments. Therefore, you must use \c QMap as the property
+ type instead of \c QMap<QString,QVariant>. For consistency, also
+ use \c QList and \c QValueList instead of \c QList<QVariant> and
+ \c QValueList<QVariant>.
+
+ \section1 Reading and Writing Properties with the Meta-Object System
+
+ A property can be read and written using the generic functions
+ QObject::property() and QObject::setProperty(), without knowing
+ anything about the owning class except the property's name. In
+ the code snippet below, the call to QAbstractButton::setDown() and
+ the call to QObject::setProperty() both set property "down".
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 3
+
+ Accessing a property through its \c WRITE accessor is the better
+ of the two, because it is faster and gives better diagnostics at
+ compile time, but setting the property this way requires that you
+ know about the class at compile time. Accessing properties by name
+ lets you access classes you don't know about at compile time. You
+ can \e discover a class's properties at run time by querying its
+ QObject, QMetaObject, and \l {QMetaProperty} {QMetaProperties}.
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 4
+
+ In the above snippet, QMetaObject::property() is used to get \l
+ {QMetaProperty} {metadata} about each property defined in some
+ unknown class. The property name is fetched from the metadata and
+ passed to QObject::property() to get the \l {QVariant} {value} of
+ the property in the current \l {QObject}{object}.
+
+ \section1 A Simple Example
+
+ Suppose we have a class MyClass, which is derived from QObject and
+ which uses the Q_OBJECT macro in its private section. We want to
+ declare a property in MyClass to keep track of a priorty
+ value. The name of the property will be \e priority, and its type
+ will be an enumeration type named \e Priority, which is defined in
+ MyClass.
+
+ We declare the property with the Q_PROPERTY() macro in the private
+ section of the class. The required \c READ function is named \c
+ priority, and we include a \c WRITE function named \c setPriority.
+ The enumeration type must be registered with the \l {Meta-Object
+ System} using the Q_ENUMS() macro. Registering an enumeration type
+ makes the enumerator names available for use in calls to
+ QObject::setProperty(). We must also provide our own declarations
+ for the \c READ and \c WRITE functions. The declaration of MyClass
+ then might look like this:
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 5
+
+ The \c READ function is const and returns the property type. The
+ \c WRITE function returns void and has exactly one parameter of
+ the property type. The meta-object compiler enforces these
+ requirements.
+
+ Given a pointer to an instance of MyClass or a pointer to an
+ instance of QObject that happens to be an instance of MyClass, we
+ have two ways to set its priority property.
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 6
+
+ In the example, the enumeration type used for the property type
+ was locally declared in MyClass. Had it been declared in another
+ class, its fully qualified name (i.e., OtherClass::Priority) would
+ be required. In addition, that other class must also inherit
+ QObject and register the enum type using Q_ENUMS().
+
+ A similar macro, Q_FLAGS(), is also available. Like Q_ENUMS(), it
+ registers an enumeration type, but it marks the type as being a
+ set of \e flags, i.e. values that can be OR'd together. An I/O
+ class might have enumeration values \c Read and \c Write and then
+ QObject::setProperty() could accept \c{Read | Write}. Q_FLAGS()
+ should be used to register this enumeration type.
+
+ \section1 Dynamic Properties
+
+ QObject::setProperty() can also be used to add \e new properties
+ to an instance of a class at runtime. When it is called with a
+ name and a value, if a property with the given name exists in the
+ QObject, and if the given value is compatible with the property's
+ type, the value is stored in the property, and true is returned.
+ If the value is \e not compatible with the property's type, the
+ property is \e not changed, and false is returned. But if the
+ property with the given name doesn't exist in the QObject (i.e.,
+ if it wasn't declared with Q_PROPERTY(), a new property with the
+ given name and value is automatically added to the QObject, but
+ false is still returned. This means that a return of false can't
+ be used to determine whether a particular property was actually
+ set, unless you know in advance that the property already exists
+ in the QObject.
+
+ Note that \e dynamic properties are added on a per instance basis,
+ i.e., they are added to QObject, not QMetaObject. A property can
+ be removed from an instance by passing the property name and an
+ invalid QVariant value to QObject::setProperty(). The default
+ constructor for QVariant constructs an invalid QVariant.
+
+ Dynamic properties can be queried with QObject::property(), just
+ like properties declared at compile time with Q_PROPERTY().
+
+ \sa {Meta-Object System}, {Signals and Slots}
+
+ \section1 Properties and Custom Types
+
+ Custom types used by properties need to be registered using the
+ Q_DECLARE_METATYPE() macro so that their values can be stored in
+ QVariant objects. This makes them suitable for use with both
+ static properties declared using the Q_PROPERTY() macro in class
+ definitions and dynamic properties created at run-time.
+
+ \sa Q_DECLARE_METATYPE(), QMetaType, QVariant
+
+ \section1 Adding Additional Information to a Class
+
+ Connected to the property system is an additional macro,
+ Q_CLASSINFO(), that can be used to attach additional
+ \e{name}--\e{value} pairs to a class's meta-object, for example:
+
+ \snippet doc/src/snippets/code/doc_src_properties.qdoc 7
+
+ Like other meta-data, class information is accessible at run-time
+ through the meta-object; see QMetaObject::classInfo() for details.
+*/
diff --git a/doc/src/q3asciicache.qdoc b/doc/src/q3asciicache.qdoc
new file mode 100644
index 0000000..fbbb21b
--- /dev/null
+++ b/doc/src/q3asciicache.qdoc
@@ -0,0 +1,465 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3AsciiCache
+ \brief The Q3AsciiCache class is a template class that provides a cache based on char* keys.
+ \compat
+
+ Q3AsciiCache is implemented as a template class. Define a template
+ instance Q3AsciiCache\<X\> to create a cache that operates on
+ pointers to X (X*).
+
+ A cache is a least recently used (LRU) list of cache items. The
+ cache items are accessed via \c char* keys. For Unicode keys use
+ the Q3Cache template instead, which uses QString keys. A Q3Cache
+ has the same performace as a Q3AsciiCache.
+
+ Each cache item has a cost. The sum of item costs, totalCost(),
+ will not exceed the maximum cache cost, maxCost(). If inserting a
+ new item would cause the total cost to exceed the maximum cost,
+ the least recently used items in the cache are removed.
+
+ Apart from insert(), by far the most important function is find()
+ (which also exists as operator[]()). This function looks up an
+ item, returns it, and by default marks it as being the most
+ recently used item.
+
+ There are also methods to remove() or take() an object from the
+ cache. Calling \link Q3PtrCollection::setAutoDelete()
+ setAutoDelete(TRUE)\endlink tells the cache to delete items that
+ are removed. The default is to not delete items when then are
+ removed (i.e., remove() and take() are equivalent).
+
+ When inserting an item into the cache, only the pointer is copied,
+ not the item itself. This is called a shallow copy. It is possible
+ to make the cache copy all of the item's data (known as a deep
+ copy) when an item is inserted. insert() calls the virtual
+ function Q3PtrCollection::newItem() for the item to be inserted.
+ Inherit a cache and reimplement newItem() if you want deep copies.
+
+ When removing a cache item the virtual function
+ Q3PtrCollection::deleteItem() is called. Its default implementation
+ in Q3AsciiCache is to delete the item if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ There is a Q3AsciiCacheIterator which may be used to traverse the
+ items in the cache in arbitrary order.
+
+ \sa Q3AsciiCacheIterator, Q3Cache, Q3IntCache
+*/
+
+/*!
+ \fn Q3AsciiCache::Q3AsciiCache( const Q3AsciiCache<type> &c )
+
+ \internal
+
+ Do not use. A Q3AsciiCache cannot be copied. Calls qFatal() in debug version.
+*/
+
+
+/*!
+ \fn Q3AsciiCache::Q3AsciiCache( int maxCost, int size, bool caseSensitive, bool copyKeys )
+
+ Constructs a cache whose contents will never have a total cost
+ greater than \a maxCost and which is expected to contain less than
+ \a size items.
+
+ \a size is actually the size of an internal hash array; it's
+ usually best to make it prime and at least 50% bigger than the
+ largest expected number of items in the cache.
+
+ Each inserted item has an associated cost. When inserting a new
+ item, if the total cost of all items in the cache will exceed \a
+ maxCost, the cache will start throwing out the older (least
+ recently used) items until there is enough room for the new item
+ to be inserted.
+
+ If \a caseSensitive is TRUE (the default), the cache keys are case
+ sensitive; if it is FALSE, they are case-insensitive.
+ Case-insensitive comparison only affects the 26 letters in
+ US-ASCII. If \a copyKeys is TRUE (the default), Q3AsciiCache makes
+ a copy of the cache keys, otherwise it copies just the const char
+ * pointer - slightly faster if you can guarantee that the keys
+ will never change, but very risky.
+*/
+
+/*!
+ \fn Q3AsciiCache::~Q3AsciiCache()
+
+ Removes all items from the cache and destroys it.
+ All iterators that access this cache will be reset.
+*/
+
+/*!
+ \fn Q3AsciiCache<type>& Q3AsciiCache::operator=( const Q3AsciiCache<type> &c )
+
+ \internal
+
+ Do not use. A Q3AsciiCache cannot be copied. Calls qFatal() in debug version.
+*/
+
+/*!
+ \fn int Q3AsciiCache::maxCost() const
+
+ Returns the maximum allowed total cost of the cache.
+
+ \sa setMaxCost() totalCost()
+*/
+
+/*!
+ \fn int Q3AsciiCache::totalCost() const
+
+ Returns the total cost of the items in the cache. This is an
+ integer in the range 0 to maxCost().
+
+ \sa setMaxCost()
+*/
+
+/*!
+ \fn void Q3AsciiCache::setMaxCost( int m )
+
+ Sets the maximum allowed total cost of the cache to \a m. If the
+ current total cost is greater than \a m, some items are removed
+ immediately.
+
+ \sa maxCost() totalCost()
+*/
+
+/*!
+ \fn uint Q3AsciiCache::count() const
+
+ Returns the number of items in the cache.
+
+ \sa totalCost() size()
+*/
+
+/*!
+ \fn uint Q3AsciiCache::size() const
+
+ Returns the size of the hash array used to implement the cache.
+ This should be a bit bigger than count() is likely to be.
+*/
+
+/*!
+ \fn bool Q3AsciiCache::isEmpty() const
+
+ Returns TRUE if the cache is empty; otherwise returns FALSE.
+*/
+
+/*!
+ \fn bool Q3AsciiCache::insert( const char *k, const type *d, int c, int p )
+
+ Inserts the item \a d into the cache using key \a k, and with an
+ associated cost of \a c. Returns TRUE if the item is successfully
+ inserted. Returns FALSE if the item is not inserted, for example,
+ if the cost of the item exceeds maxCost().
+
+ The cache's size is limited, and if the total cost is too high,
+ Q3AsciiCache will remove old, least recently used items until there
+ is room for this new item.
+
+ Items with duplicate keys can be inserted.
+
+ The parameter \a p is internal and should be left at the default
+ value (0).
+
+ \warning If this function returns FALSE, you must delete \a d
+ yourself. Additionally, be very careful about using \a d after
+ calling this function, because any other insertions into the
+ cache, from anywhere in the application or within Qt itself, could
+ cause the object to be discarded from the cache and the pointer to
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3AsciiCache::remove( const char *k )
+
+ Removes the item with key \a k and returns TRUE if the item was
+ present in the cache; otherwise returns FALSE.
+
+ The item is deleted if auto-deletion has been enabled, i.e., if
+ you have called \link Q3PtrCollection::setAutoDelete()
+ setAutoDelete(TRUE)\endlink.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is removed.
+
+ All iterators that refer to the removed item are set to point to
+ the next item in the cache's traversal order.
+
+ \sa take(), clear()
+*/
+
+/*!
+ \fn type *Q3AsciiCache::take( const char *k )
+
+ Takes the item associated with \a k out of the cache without
+ deleting it and returns a pointer to the item taken out, or 0
+ if the key does not exist in the cache.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is taken.
+
+ All iterators that refer to the taken item are set to point to the
+ next item in the cache's traversal order.
+
+ \sa remove(), clear()
+*/
+
+/*!
+ \fn void Q3AsciiCache::clear()
+
+ Removes all items from the cache, and deletes them if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink has been
+ enabled.
+
+ All cache iterators that operate on this cache are reset.
+
+ \sa remove() take()
+*/
+
+/*!
+ \fn type *Q3AsciiCache::find( const char *k, bool ref ) const
+
+ Returns the item with key \a k, or 0 if the key does not exist
+ in the cache. If \a ref is TRUE (the default), the item is moved
+ to the front of the least recently used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is returned.
+*/
+
+/*!
+ \fn type *Q3AsciiCache::operator[]( const char *k ) const
+
+ Returns the item with key \a k, or 0 if \a k does not exist in
+ the cache, and moves the item to the front of the least recently
+ used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is returned.
+
+ This is the same as find( k, TRUE ).
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3AsciiCache::statistics() const
+
+ A debug-only utility function. Prints out cache usage, hit/miss,
+ and distribution information using qDebug(). This function does
+ nothing in the release library.
+*/
+
+/*!
+ \class Q3AsciiCacheIterator
+ \brief The Q3AsciiCacheIterator class provides an iterator for Q3AsciiCache collections.
+ \compat
+
+ Note that the traversal order is arbitrary; you are not guaranteed
+ any particular order. If new objects are inserted into the cache
+ while the iterator is active, the iterator may or may not see
+ them.
+
+ Multiple iterators are completely independent, even when they
+ operate on the same Q3AsciiCache. Q3AsciiCache updates all iterators
+ that refer an item when that item is removed.
+
+ Q3AsciiCacheIterator provides an operator++() and an operator+=()
+ to traverse the cache; current() and currentKey() to access the
+ current cache item and its key. It also provides atFirst() and
+ atLast(), which return TRUE if the iterator points to the first or
+ last item in the cache respectively. The isEmpty() function
+ returns TRUE if the cache is empty; and count() returns the number
+ of items in the cache.
+
+ Note that atFirst() and atLast() refer to the iterator's arbitrary
+ ordering, not to the cache's internal least recently used list.
+
+ \sa Q3AsciiCache
+*/
+
+/*!
+ \fn Q3AsciiCacheIterator::Q3AsciiCacheIterator( const Q3AsciiCache<type> &cache )
+
+ Constructs an iterator for \a cache. The current iterator item is
+ set to point to the first item in the \a cache.
+*/
+
+/*!
+ \fn Q3AsciiCacheIterator::Q3AsciiCacheIterator (const Q3AsciiCacheIterator<type> & ci)
+
+ Constructs an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current() but moves
+ independently from there on.
+*/
+
+/*!
+ \fn Q3AsciiCacheIterator<type>& Q3AsciiCacheIterator::operator=( const Q3AsciiCacheIterator<type> &ci )
+
+ Makes this an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current(), but moves
+ independently thereafter.
+*/
+
+/*!
+ \fn uint Q3AsciiCacheIterator::count() const
+
+ Returns the number of items in the cache over which this iterator
+ operates.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3AsciiCacheIterator::isEmpty() const
+
+ Returns TRUE if the cache is empty, i.e. count() == 0; otherwise
+ returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3AsciiCacheIterator::atFirst() const
+
+ Returns TRUE if the iterator points to the first item in the
+ cache; otherwise returns FALSE. Note that this refers to the
+ iterator's arbitrary ordering, not to the cache's internal least
+ recently used list.
+
+ \sa toFirst(), atLast()
+*/
+
+/*!
+ \fn bool Q3AsciiCacheIterator::atLast() const
+
+ Returns TRUE if the iterator points to the last item in the cache;
+ otherwise returns FALSE. Note that this refers to the iterator's
+ arbitrary ordering, not to the cache's internal least recently
+ used list.
+
+ \sa toLast(), atFirst()
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::toFirst()
+
+ Sets the iterator to point to the first item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0 and returns 0 if the cache is empty.
+
+ \sa toLast() isEmpty()
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::toLast()
+
+ Sets the iterator to point to the last item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0 and returns 0 if the cache is empty.
+
+ \sa toFirst() isEmpty()
+*/
+
+/*!
+ \fn Q3AsciiCacheIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::current() const
+
+ Returns a pointer to the current iterator item.
+*/
+
+/*!
+ \fn const char *Q3AsciiCacheIterator::currentKey() const
+
+ Returns the key for the current iterator item.
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the cache or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::operator+=( uint jump )
+
+ Returns the item \a jump positions after the current item, or 0
+ if it is beyond the last item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::operator-=( uint jump )
+
+ Returns the item \a jump positions before the current item, or 0
+ if it is before the first item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::operator++()
+
+ Prefix ++ makes the iterator point to the item just after
+ current(), and makes that the new current item for the iterator. If
+ current() was the last item, operator++() returns 0.
+*/
+
+/*!
+ \fn type *Q3AsciiCacheIterator::operator--()
+
+ Prefix -- makes the iterator point to the item just before
+ current(), and makes that the new current item for the iterator. If
+ current() was the first item, operator--() returns 0.
+*/
+
diff --git a/doc/src/q3asciidict.qdoc b/doc/src/q3asciidict.qdoc
new file mode 100644
index 0000000..0b5b790
--- /dev/null
+++ b/doc/src/q3asciidict.qdoc
@@ -0,0 +1,416 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3AsciiDict
+ \brief The Q3AsciiDict class is a template class that provides a dictionary based on char* keys.
+ \compat
+
+ Q3AsciiDict is implemented as a template class. Define a template
+ instance Q3AsciiDict\<X\> to create a dictionary that operates on
+ pointers to X (X*).
+
+ A dictionary is a collection of key-value pairs. The key is a
+ char* used for insertion, removal and lookup. The value is a
+ pointer. Dictionaries provide very fast insertion and lookup.
+
+ Q3AsciiDict cannot handle Unicode keys; use the Q3Dict template
+ instead, which uses QString keys. A Q3Dict has the same
+ performace as a Q3AsciiDict.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 0
+ In this example we use a dictionary to keep track of the line
+ edits we're using. We insert each line edit into the dictionary
+ with a unique name and then access the line edits via the
+ dictionary. See Q3PtrDict, Q3IntDict and Q3Dict.
+
+ See Q3Dict for full details, including the choice of dictionary
+ size, and how deletions are handled.
+
+ \sa Q3AsciiDictIterator, Q3Dict, Q3IntDict, Q3PtrDict
+*/
+
+
+/*!
+ \fn Q3AsciiDict::Q3AsciiDict( int size, bool caseSensitive, bool copyKeys )
+
+ Constructs a dictionary optimized for less than \a size entries.
+
+ We recommend setting \a size to a suitably large prime number (a
+ bit larger than the expected number of entries). This makes the
+ hash distribution better and will improve lookup performance.
+
+ When \a caseSensitive is TRUE (the default) Q3AsciiDict treats
+ "abc" and "Abc" as different keys; when it is FALSE "abc" and
+ "Abc" are the same. Case-insensitive comparison only considers the
+ 26 letters in US-ASCII.
+
+ If \a copyKeys is TRUE (the default), the dictionary copies keys
+ using strcpy(); if it is FALSE, the dictionary just copies the
+ pointers.
+*/
+
+/*!
+ \fn Q3AsciiDict::Q3AsciiDict( const Q3AsciiDict<type> &dict )
+
+ Constructs a copy of \a dict.
+
+ Each item in \a dict is inserted into this dictionary. Only the
+ pointers are copied (shallow copy).
+*/
+
+/*!
+ \fn Q3AsciiDict::~Q3AsciiDict()
+
+ Removes all items from the dictionary and destroys it.
+
+ The items are deleted if auto-delete is enabled.
+
+ All iterators that access this dictionary will be reset.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Q3AsciiDict<type> &Q3AsciiDict::operator=(const Q3AsciiDict<type> &dict)
+
+ Assigns \a dict to this dictionary and returns a reference to this
+ dictionary.
+
+ This dictionary is first cleared and then each item in \a dict is
+ inserted into this dictionary. Only the pointers are copied
+ (shallow copy) unless newItem() has been reimplemented().
+*/
+
+/*!
+ \fn uint Q3AsciiDict::count() const
+
+ Returns the number of items in the dictionary.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn uint Q3AsciiDict::size() const
+
+ Returns the size of the internal hash array (as specified in the
+ constructor).
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3AsciiDict::resize( uint newsize )
+
+ Changes the size of the hashtable to \a newsize. The contents of
+ the dictionary are preserved but all iterators on the dictionary
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3AsciiDict::isEmpty() const
+
+ Returns TRUE if the dictionary is empty, i.e. count() == 0;
+ otherwise it returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3AsciiDict::insert( const char *key, const type *item )
+
+ Inserts the \a key with the \a item into the dictionary.
+
+ Multiple items can have the same key, in which case only the last
+ item will be accessible using \l operator[]().
+
+ \a item may not be 0.
+
+ \sa replace()
+*/
+
+/*!
+ \fn void Q3AsciiDict::replace( const char *key, const type *item )
+
+ Replaces an item that has a key equal to \a key with \a item.
+
+ If the item does not already exist, it will be inserted.
+
+ \a item may not be 0.
+
+ Equivalent to:
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 1
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be replaced.
+
+ \sa insert()
+*/
+
+/*!
+ \fn bool Q3AsciiDict::remove( const char *key )
+
+ Removes the item associated with \a key from the dictionary.
+ Returns TRUE if successful, i.e. if the key existed in the
+ dictionary; otherwise returns FALSE.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be removed.
+
+ The removed item is deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that refer to the removed item will be
+ set to point to the next item in the dictionary traversal order.
+
+ \sa take(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3AsciiDict::take( const char *key )
+
+ Takes the item associated with \a key out of the dictionary
+ without deleting it (even if \link Q3PtrCollection::setAutoDelete()
+ auto-deletion\endlink is enabled).
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be taken.
+
+ Returns a pointer to the item taken out, or 0 if the key does not
+ exist in the dictionary.
+
+ All dictionary iterators that refer to the taken item will be set
+ to point to the next item in the dictionary traversal order.
+
+ \sa remove(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn void Q3AsciiDict::clear()
+
+ Removes all items from the dictionary.
+
+ The removed items are deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that operate on dictionary are reset.
+
+ \sa remove(), take(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3AsciiDict::find( const char *key ) const
+
+ Returns the item associated with \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ This function uses an internal hashing algorithm to optimize
+ lookup.
+
+ If there are two or more items with equal keys, then the item that
+ was most recently inserted will be found.
+
+ Equivalent to the [] operator.
+
+ \sa operator[]()
+*/
+
+/*!
+ \fn type *Q3AsciiDict::operator[]( const char *key ) const
+
+ Returns the item associated with \a key, or 0 if the key does
+ not exist in the dictionary.
+
+ This function uses an internal hashing algorithm to optimize
+ lookup.
+
+ If there are two or more items with equal keys, then the item that
+ was most recently inserted will be found.
+
+ Equivalent to the find() function.
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3AsciiDict::statistics() const
+
+ Debugging-only function that prints out the dictionary
+ distribution using qDebug().
+*/
+
+/*!
+ \fn QDataStream& Q3AsciiDict::read( QDataStream &s,
+ Q3PtrCollection::Item &item )
+
+ Reads a dictionary item from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3AsciiDict::write(QDataStream &s, Q3PtrCollection::Item item) const
+
+ Writes a dictionary \a item to the stream \a s and returns a
+ reference to the stream.
+
+ \sa read()
+*/
+
+/*!
+ \class Q3AsciiDictIterator
+ \brief The Q3AsciiDictIterator class provides an iterator for Q3AsciiDict collections.
+ \compat
+
+ Q3AsciiDictIterator is implemented as a template class. Define a
+ template instance Q3AsciiDictIterator\<X\> to create a dictionary
+ iterator that operates on Q3AsciiDict\<X\> (dictionary of X*).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 2
+ In the example we insert some line edits into a dictionary, then
+ iterate over the dictionary printing the strings associated with
+ those line edits.
+
+ Note that the traversal order is arbitrary; you are not guaranteed
+ any particular order.
+
+ Multiple iterators may independently traverse the same dictionary.
+ A Q3AsciiDict knows about all the iterators that are operating on
+ the dictionary. When an item is removed from the dictionary,
+ Q3AsciiDict updates all the iterators that are referring to the
+ removed item to point to the next item in the (arbitrary)
+ traversal order.
+
+ \sa Q3AsciiDict
+*/
+
+/*!
+ \fn Q3AsciiDictIterator::Q3AsciiDictIterator( const Q3AsciiDict<type> &dict )
+
+ Constructs an iterator for \a dict. The current iterator item is
+ set to point on the first item in the \a dict.
+*/
+
+/*!
+ \fn Q3AsciiDictIterator::~Q3AsciiDictIterator()
+
+ Destroys the iterator.
+*/
+
+/*!
+ \fn uint Q3AsciiDictIterator::count() const
+
+ Returns the number of items in the dictionary this iterator
+ operates over.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3AsciiDictIterator::isEmpty() const
+
+ Returns TRUE if the dictionary is empty, i.e. count() == 0,
+ otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn type *Q3AsciiDictIterator::toFirst()
+
+ Sets the current iterator item to point to the first item in the
+ dictionary and returns a pointer to the item. If the dictionary is
+ empty it sets the current item to 0 and returns 0.
+*/
+
+/*!
+ \fn Q3AsciiDictIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3AsciiDictIterator::current() const
+
+ Returns a pointer to the current iterator item.
+*/
+
+/*!
+ \fn const char *Q3AsciiDictIterator::currentKey() const
+
+ Returns a pointer to the key for the current iterator item.
+*/
+
+/*!
+ \fn type *Q3AsciiDictIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3AsciiDictIterator::operator++()
+
+ Prefix ++ makes the succeeding item current and returns the new
+ current item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3AsciiDictIterator::operator+=( uint jump )
+
+ Sets the current item to the item \a jump positions after the
+ current item, and returns a pointer to that item.
+
+ If that item is beyond the last item or if the dictionary is
+ empty, it sets the current item to 0 and returns 0.
+*/
diff --git a/doc/src/q3cache.qdoc b/doc/src/q3cache.qdoc
new file mode 100644
index 0000000..a54430f
--- /dev/null
+++ b/doc/src/q3cache.qdoc
@@ -0,0 +1,461 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3Cache
+ \brief The Q3Cache class is a template class that provides a cache based on QString keys.
+ \compat
+
+ A cache is a least recently used (LRU) list of cache items. Each
+ cache item has a key and a certain cost. The sum of item costs,
+ totalCost(), never exceeds the maximum cache cost, maxCost(). If
+ inserting a new item would cause the total cost to exceed the
+ maximum cost, the least recently used items in the cache are
+ removed.
+
+ Q3Cache is a template class. Q3Cache\<X\> defines a cache that
+ operates on pointers to X, or X*.
+
+ Apart from insert(), by far the most important function is find()
+ (which also exists as operator[]()). This function looks up an
+ item, returns it, and by default marks it as being the most
+ recently used item.
+
+ There are also methods to remove() or take() an object from the
+ cache. Calling setAutoDelete(TRUE) for a cache tells it to delete
+ items that are removed. The default is to not delete items when
+ they are removed (i.e., remove() and take() are equivalent).
+
+ When inserting an item into the cache, only the pointer is copied,
+ not the item itself. This is called a shallow copy. It is possible
+ to make the cache copy all of the item's data (known as a deep
+ copy) when an item is inserted. insert() calls the virtual
+ function Q3PtrCollection::newItem() for the item to be inserted.
+ Inherit a cache and reimplement newItem() if you want deep copies.
+
+ When removing a cache item, the virtual function
+ Q3PtrCollection::deleteItem() is called. The default
+ implementation deletes the item if auto-deletion is enabled, and
+ does nothing otherwise.
+
+ There is a Q3CacheIterator that can be used to traverse the items
+ in the cache in arbitrary order.
+
+ In Q3Cache, the cache items are accessed via QString keys, which
+ are Unicode strings. If you want to use non-Unicode, plain 8-bit
+ \c char* keys, use the Q3AsciiCache template. A Q3Cache has the
+ same performance as a Q3AsciiCache.
+
+ \sa Q3CacheIterator, Q3AsciiCache, Q3IntCache
+*/
+
+/*!
+ \fn Q3Cache::Q3Cache( const Q3Cache<type> &c )
+
+ \internal
+
+ Do not use. A Q3Cache cannot be copied. Calls qFatal() in debug version.
+*/
+
+
+/*!
+ \fn Q3Cache::Q3Cache( int maxCost, int size, bool caseSensitive )
+
+ Constructs a cache whose contents will never have a total cost
+ greater than \a maxCost and which is expected to contain less than
+ \a size items.
+
+ \a size is actually the size of an internal hash array; it's
+ usually best to make it a prime number and at least 50% bigger
+ than the largest expected number of items in the cache.
+
+ Each inserted item has an associated cost. When inserting a new
+ item, if the total cost of all items in the cache will exceed \a
+ maxCost, the cache will start throwing out the older (least
+ recently used) items until there is enough room for the new item
+ to be inserted.
+
+ If \a caseSensitive is TRUE (the default), the cache keys are case
+ sensitive; if it is FALSE, they are case-insensitive.
+ Case-insensitive comparison considers all Unicode letters.
+*/
+
+/*!
+ \fn Q3Cache::~Q3Cache()
+
+ Removes all items from the cache and destroys it. All iterators
+ that access this cache will be reset.
+*/
+
+/*!
+ \fn Q3Cache<type>& Q3Cache::operator=( const Q3Cache<type> &c )
+
+ \internal
+
+ Do not use. A Q3Cache cannot be copied. Calls qFatal() in debug version.
+*/
+
+/*!
+ \fn int Q3Cache::maxCost() const
+
+ Returns the maximum allowed total cost of the cache.
+
+ \sa setMaxCost() totalCost()
+*/
+
+/*!
+ \fn int Q3Cache::totalCost() const
+
+ Returns the total cost of the items in the cache. This is an
+ integer in the range 0 to maxCost().
+
+ \sa setMaxCost()
+*/
+
+/*!
+ \fn void Q3Cache::setMaxCost( int m )
+
+ Sets the maximum allowed total cost of the cache to \a m. If the
+ current total cost is greater than \a m, some items are deleted
+ immediately.
+
+ \sa maxCost() totalCost()
+*/
+
+/*!
+ \fn uint Q3Cache::count() const
+
+ Returns the number of items in the cache.
+
+ \sa totalCost()
+*/
+
+/*!
+ \fn uint Q3Cache::size() const
+
+ Returns the size of the hash array used to implement the cache.
+ This should be a bit bigger than count() is likely to be.
+*/
+
+/*!
+ \fn bool Q3Cache::isEmpty() const
+
+ Returns TRUE if the cache is empty; otherwise returns FALSE.
+*/
+
+/*!
+ \fn bool Q3Cache::insert( const QString &k, const type *d, int c, int p )
+
+ Inserts the item \a d into the cache with key \a k and associated
+ cost, \a c. Returns TRUE if it is successfully inserted; otherwise
+ returns FALSE.
+
+ The cache's size is limited, and if the total cost is too high,
+ Q3Cache will remove old, least recently used items until there is
+ room for this new item.
+
+ The parameter \a p is internal and should be left at the default
+ value (0).
+
+ \warning If this function returns FALSE (which could happen, e.g.
+ if the cost of this item alone exceeds maxCost()) you must delete
+ \a d yourself. Additionally, be very careful about using \a d
+ after calling this function because any other insertions into the
+ cache, from anywhere in the application or within Qt itself, could
+ cause the object to be discarded from the cache and the pointer to
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3Cache::remove( const QString &k )
+
+ Removes the item associated with \a k, and returns TRUE if the
+ item was present in the cache; otherwise returns FALSE.
+
+ The item is deleted if auto-deletion has been enabled, i.e., if
+ you have called setAutoDelete(TRUE).
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is removed.
+
+ All iterators that refer to the removed item are set to point to
+ the next item in the cache's traversal order.
+
+ \sa take(), clear()
+*/
+
+/*!
+ \fn type *Q3Cache::take( const QString &k )
+
+ Takes the item associated with \a k out of the cache without
+ deleting it, and returns a pointer to the item taken out, or 0
+ if the key does not exist in the cache.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is taken.
+
+ All iterators that refer to the taken item are set to point to the
+ next item in the cache's traversal order.
+
+ \sa remove(), clear()
+*/
+
+/*!
+ \fn void Q3Cache::clear()
+
+ Removes all items from the cache and deletes them if auto-deletion
+ has been enabled.
+
+ All cache iterators that operate this on cache are reset.
+
+ \sa remove() take()
+*/
+
+/*!
+ \fn type *Q3Cache::find( const QString &k, bool ref ) const
+
+ Returns the item associated with key \a k, or 0 if the key does
+ not exist in the cache. If \a ref is TRUE (the default), the item
+ is moved to the front of the least recently used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is returned.
+*/
+
+/*!
+ \fn type *Q3Cache::operator[]( const QString &k ) const
+
+ Returns the item associated with key \a k, or 0 if \a k does not
+ exist in the cache, and moves the item to the front of the least
+ recently used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted last is returned.
+
+ This is the same as find( k, TRUE ).
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3Cache::statistics() const
+
+ A debug-only utility function. Prints out cache usage, hit/miss,
+ and distribution information using qDebug(). This function does
+ nothing in the release library.
+*/
+
+/*****************************************************************************
+ Q3CacheIterator documentation
+ *****************************************************************************/
+
+/*!
+ \class Q3CacheIterator qcache.h
+ \brief The Q3CacheIterator class provides an iterator for Q3Cache collections.
+ \compat
+
+ Note that the traversal order is arbitrary; you are not guaranteed
+ any particular order. If new objects are inserted into the cache
+ while the iterator is active, the iterator may or may not see
+ them.
+
+ Multiple iterators are completely independent, even when they
+ operate on the same Q3Cache. Q3Cache updates all iterators that
+ refer an item when that item is removed.
+
+ Q3CacheIterator provides an operator++(), and an operator+=() to
+ traverse the cache. The current() and currentKey() functions are
+ used to access the current cache item and its key. The atFirst()
+ and atLast() return TRUE if the iterator points to the first or
+ last item in the cache respectively. The isEmpty() function
+ returns TRUE if the cache is empty, and count() returns the number
+ of items in the cache.
+
+ Note that atFirst() and atLast() refer to the iterator's arbitrary
+ ordering, not to the cache's internal least recently used list.
+
+ \sa Q3Cache
+*/
+
+/*!
+ \fn Q3CacheIterator::Q3CacheIterator( const Q3Cache<type> &cache )
+
+ Constructs an iterator for \a cache. The current iterator item is
+ set to point to the first item in the \a cache.
+*/
+
+/*!
+ \fn Q3CacheIterator::Q3CacheIterator (const Q3CacheIterator<type> & ci)
+
+ Constructs an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current(), but moves
+ independently from there on.
+*/
+
+/*!
+ \fn Q3CacheIterator<type>& Q3CacheIterator::operator=( const Q3CacheIterator<type> &ci )
+
+ Makes this an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current(), but moves
+ independently thereafter.
+*/
+
+/*!
+ \fn uint Q3CacheIterator::count() const
+
+ Returns the number of items in the cache on which this iterator
+ operates.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3CacheIterator::isEmpty() const
+
+ Returns TRUE if the cache is empty, i.e. count() == 0; otherwise
+ it returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3CacheIterator::atFirst() const
+
+ Returns TRUE if the iterator points to the first item in the
+ cache; otherwise returns FALSE. Note that this refers to the
+ iterator's arbitrary ordering, not to the cache's internal least
+ recently used list.
+
+ \sa toFirst(), atLast()
+*/
+
+/*!
+ \fn bool Q3CacheIterator::atLast() const
+
+ Returns TRUE if the iterator points to the last item in the cache;
+ otherwise returns FALSE. Note that this refers to the iterator's
+ arbitrary ordering, not to the cache's internal least recently
+ used list.
+
+ \sa toLast(), atFirst()
+*/
+
+/*!
+ \fn type *Q3CacheIterator::toFirst()
+
+ Sets the iterator to point to the first item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0 and returns 0 if the cache is empty.
+
+ \sa toLast() isEmpty()
+*/
+
+/*!
+ \fn type *Q3CacheIterator::toLast()
+
+ Sets the iterator to point to the last item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0 and returns 0 if the cache is empty.
+
+ \sa toFirst() isEmpty()
+*/
+
+/*!
+ \fn Q3CacheIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3CacheIterator::current() const
+
+ Returns a pointer to the current iterator item.
+*/
+
+/*!
+ \fn QString Q3CacheIterator::currentKey() const
+
+ Returns the key for the current iterator item.
+*/
+
+/*!
+ \fn type *Q3CacheIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the cache or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3CacheIterator::operator+=( uint jump )
+
+ Returns the item \a jump positions after the current item, or 0 if
+ it is beyond the last item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3CacheIterator::operator-=( uint jump )
+
+ Returns the item \a jump positions before the current item, or 0
+ if it is before the first item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3CacheIterator::operator++()
+
+ Prefix++ makes the iterator point to the item just after current()
+ and makes that the new current item for the iterator. If current()
+ was the last item, operator++() returns 0.
+*/
+
+/*!
+ \fn type *Q3CacheIterator::operator--()
+
+ Prefix-- makes the iterator point to the item just before
+ current() and makes that the new current item for the iterator. If
+ current() was the first item, operator--() returns 0.
+*/
+
diff --git a/doc/src/q3dict.qdoc b/doc/src/q3dict.qdoc
new file mode 100644
index 0000000..8a0c5b0
--- /dev/null
+++ b/doc/src/q3dict.qdoc
@@ -0,0 +1,446 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3Dict
+ \brief The Q3Dict class is a template class that provides a
+ dictionary based on QString keys.
+ \compat
+
+ Q3Dict is implemented as a template class. Define a template
+ instance Q3Dict\<X\> to create a dictionary that operates on
+ pointers to X (X *).
+
+ A dictionary is a collection of key-value pairs. The key is a
+ QString used for insertion, removal and lookup. The value is a
+ pointer. Dictionaries provide very fast insertion and lookup.
+
+ If you want to use non-Unicode, plain 8-bit \c char* keys, use the
+ Q3AsciiDict template. A Q3Dict has the same performance as a
+ Q3AsciiDict. If you want to have a dictionary that maps QStrings to
+ QStrings use QMap.
+
+ The size() of the dictionary is very important. In order to get
+ good performance, you should use a suitably large prime number.
+ Suitable means equal to or larger than the maximum expected number
+ of dictionary items. Size is set in the constructor but may be
+ changed with resize().
+
+ Items are inserted with insert(); 0 pointers cannot be inserted.
+ Items are removed with remove(). All the items in a dictionary can
+ be removed with clear(). The number of items in the dictionary is
+ returned by count(). If the dictionary contains no items isEmpty()
+ returns TRUE. You can change an item's value with replace(). Items
+ are looked up with operator[](), or with find() which return a
+ pointer to the value or 0 if the given key does not exist. You can
+ take an item out of the dictionary with take().
+
+ Calling setAutoDelete(TRUE) for a dictionary tells it to delete
+ items that are removed. The default behavior is not to delete
+ items when they are removed.
+
+ When an item is inserted, the key is converted (hashed) to an
+ integer index into an internal hash array. This makes lookup very
+ fast.
+
+ Items with equal keys are allowed. When inserting two items with
+ the same key, only the last inserted item will be accessible (last
+ in, first out) until it is removed.
+
+ The Q3DictIterator class can traverse the dictionary, but only in
+ an arbitrary order. Multiple iterators may independently traverse
+ the same dictionary.
+
+ When inserting an item into a dictionary, only the pointer is
+ copied, not the item itself, i.e. a shallow copy is made. It is
+ possible to make the dictionary copy all of the item's data (a
+ deep copy) when an item is inserted. insert() calls the virtual
+ function Q3PtrCollection::newItem() for the item to be inserted.
+ Inherit a dictionary and reimplement newItem() if you want deep
+ copies.
+
+ When removing a dictionary item, the virtual function
+ Q3PtrCollection::deleteItem() is called. Q3Dict's default
+ implementation is to delete the item if auto-deletion is enabled.
+
+ \sa Q3DictIterator, Q3AsciiDict, Q3IntDict, Q3PtrDict
+*/
+
+
+/*!
+ \fn Q3Dict::Q3Dict( int size, bool caseSensitive )
+
+ Constructs a dictionary optimized for less than \a size entries.
+
+ We recommend setting \a size to a suitably large prime number
+ (e.g. a prime that's slightly larger than the expected number of
+ entries). This makes the hash distribution better which will lead
+ to faster lookup.
+
+ If \a caseSensitive is TRUE (the default), keys which differ only
+ by case are considered different.
+*/
+
+/*!
+ \fn Q3Dict::Q3Dict( const Q3Dict<type> &dict )
+
+ Constructs a copy of \a dict.
+
+ Each item in \a dict is inserted into this dictionary. Only the
+ pointers are copied (shallow copy).
+*/
+
+/*!
+ \fn Q3Dict::~Q3Dict()
+
+ Removes all items from the dictionary and destroys it. If
+ setAutoDelete() is TRUE, each value is deleted. All iterators that
+ access this dictionary will be reset.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Q3Dict<type> &Q3Dict::operator=(const Q3Dict<type> &dict)
+
+ Assigns \a dict to this dictionary and returns a reference to this
+ dictionary.
+
+ This dictionary is first cleared, then each item in \a dict is
+ inserted into this dictionary. Only the pointers are copied
+ (shallow copy), unless newItem() has been reimplemented.
+*/
+
+/*!
+ \fn uint Q3Dict::count() const
+
+ Returns the number of items in the dictionary.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn uint Q3Dict::size() const
+
+ Returns the size of the internal hash array (as specified in the
+ constructor).
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3Dict::resize( uint newsize )
+
+ Changes the size of the hash table to \a newsize. The contents of
+ the dictionary are preserved, but all iterators on the dictionary
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3Dict::isEmpty() const
+
+ Returns TRUE if the dictionary is empty, i.e. count() == 0;
+ otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3Dict::insert( const QString &key, const type *item )
+
+ Inserts the key \a key with value \a item into the dictionary.
+
+ Multiple items can have the same key, in which case only the last
+ item will be accessible using \l operator[]().
+
+ \a item may not be 0.
+
+ \sa replace()
+*/
+
+/*!
+ \fn void Q3Dict::replace( const QString &key, const type *item )
+
+ Replaces the value of the key, \a key with \a item.
+
+ If the item does not already exist, it will be inserted.
+
+ \a item may not be 0.
+
+ Equivalent to:
+ \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 0
+
+ If there are two or more items with equal keys, then the last item
+ that was inserted will be replaced.
+
+ \sa insert()
+*/
+
+/*!
+ \fn bool Q3Dict::remove( const QString &key )
+
+ Removes the item with \a key from the dictionary. Returns TRUE if
+ successful, i.e. if the item is in the dictionary; otherwise
+ returns FALSE.
+
+ If there are two or more items with equal keys, then the last item
+ that was inserted will be removed.
+
+ The removed item is deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that refer to the removed item will be
+ set to point to the next item in the dictionary's traversal order.
+
+ \sa take(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3Dict::take( const QString &key )
+
+ Takes the item with \a key out of the dictionary without deleting
+ it (even if \link Q3PtrCollection::setAutoDelete()
+ auto-deletion\endlink is enabled).
+
+ If there are two or more items with equal keys, then the last item
+ that was inserted will be taken.
+
+ Returns a pointer to the item taken out, or 0 if the key does not
+ exist in the dictionary.
+
+ All dictionary iterators that refer to the taken item will be set
+ to point to the next item in the dictionary traversal order.
+
+ \sa remove(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn void Q3Dict::clear()
+
+ Removes all items from the dictionary.
+
+ The removed items are deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that operate on the dictionary are reset.
+
+ \sa remove(), take(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3Dict::find( const QString &key ) const
+
+ Returns the item with key \a key, or 0 if the key does not exist
+ in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to the [] operator.
+
+ \sa operator[]()
+*/
+
+/*!
+ \fn type *Q3Dict::operator[]( const QString &key ) const
+
+ Returns the item with key \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to the find() function.
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3Dict::statistics() const
+
+ Debugging-only function that prints out the dictionary
+ distribution using qDebug().
+*/
+
+/*!
+ \fn QDataStream& Q3Dict::read( QDataStream &s, Q3PtrCollection::Item &item )
+
+ Reads a dictionary item from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3Dict::write( QDataStream &s, Q3PtrCollection::Item item ) const
+
+ Writes a dictionary \a item to the stream \a s and returns a
+ reference to the stream.
+
+ \sa read()
+*/
+
+/*!
+ \class Q3DictIterator
+ \brief The Q3DictIterator class provides an iterator for Q3Dict collections.
+ \compat
+
+ Q3DictIterator is implemented as a template class. Define a
+ template instance Q3DictIterator\<X\> to create a dictionary
+ iterator that operates on Q3Dict\<X\> (dictionary of X*).
+
+ The traversal order is arbitrary; when we speak of the "first",
+ "last" and "next" item we are talking in terms of this arbitrary
+ order.
+
+ Multiple iterators may independently traverse the same dictionary.
+ A Q3Dict knows about all the iterators that are operating on the
+ dictionary. When an item is removed from the dictionary, Q3Dict
+ updates all iterators that are referring to the removed item to
+ point to the next item in the (arbitrary) traversal order.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 1
+ In the example we insert some pointers to line edits into a
+ dictionary, then iterate over the dictionary printing the strings
+ associated with the line edits.
+
+ \sa Q3Dict
+*/
+
+/*!
+ \fn Q3DictIterator::Q3DictIterator( const Q3Dict<type> &dict )
+
+ Constructs an iterator for \a dict. The current iterator item is
+ set to point to the first item in the dictionary, \a dict. First
+ in this context means first in the arbitrary traversal order.
+*/
+
+/*!
+ \fn Q3DictIterator::~Q3DictIterator()
+
+ Destroys the iterator.
+*/
+
+/*!
+ \fn uint Q3DictIterator::count() const
+
+ Returns the number of items in the dictionary over which the
+ iterator is operating.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3DictIterator::isEmpty() const
+
+ Returns TRUE if the dictionary is empty, i.e. count() == 0;
+ otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn type *Q3DictIterator::toFirst()
+
+ Resets the iterator, making the first item the first current item.
+ First in this context means first in the arbitrary traversal
+ order. Returns a pointer to this item.
+
+ If the dictionary is empty it sets the current item to 0 and
+ returns 0.
+*/
+
+/*!
+ \fn type *Q3DictIterator::operator*()
+ \internal
+*/
+
+/*!
+ \fn Q3DictIterator::operator type*() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+
+/*!
+ \fn type *Q3DictIterator::current() const
+
+ Returns a pointer to the current iterator item's value.
+*/
+
+/*!
+ \fn QString Q3DictIterator::currentKey() const
+
+ Returns the current iterator item's key.
+*/
+
+/*!
+ \fn type *Q3DictIterator::operator()()
+
+ Makes the next item current and returns the original current item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3DictIterator::operator++()
+
+ Prefix ++ makes the next item current and returns the new current
+ item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3DictIterator::operator+=( uint jump )
+ \internal
+ Sets the current item to the item \a jump positions after the current item,
+ and returns a pointer to that item.
+
+ If that item is beyond the last item or if the dictionary is empty,
+ it sets the current item to 0 and returns 0.
+*/
diff --git a/doc/src/q3intcache.qdoc b/doc/src/q3intcache.qdoc
new file mode 100644
index 0000000..bba79f1
--- /dev/null
+++ b/doc/src/q3intcache.qdoc
@@ -0,0 +1,446 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3IntCache
+ \brief The Q3IntCache class is a template class that provides a cache based on long keys.
+ \compat
+
+ Q3IntCache is implemented as a template class. Define a template
+ instance Q3IntCache\<X\> to create a cache that operates on
+ pointers to X, or X*.
+
+ A cache is a least recently used (LRU) list of cache items,
+ accessed via \c long keys. Each cache item has a cost. The sum
+ of item costs, totalCost(), will not exceed the maximum cache
+ cost, maxCost(). If inserting a new item would cause the total
+ cost to exceed the maximum cost, the least recently used items in
+ the cache are removed.
+
+ Apart from insert(), by far the most important function is find()
+ (which also exists as operator[]). This function looks up an
+ item, returns it, and by default marks it as being the most
+ recently used item.
+
+ There are also methods to remove() or take() an object from the
+ cache. Calling setAutoDelete(TRUE) for a cache tells it to delete
+ items that are removed. The default is to not delete items when
+ they are removed (i.e. remove() and take() are equivalent).
+
+ When inserting an item into the cache, only the pointer is copied,
+ not the item itself. This is called a shallow copy. It is possible
+ to make the cache copy all of the item's data (known as a deep
+ copy) when an item is inserted. insert() calls the virtual
+ function Q3PtrCollection::newItem() for the item to be inserted.
+ Inherit a dictionary and reimplement newItem() if you want deep
+ copies.
+
+ When removing a cache item, the item will be automatically
+ deleted if auto-deletion is enabled.
+
+ There is a Q3IntCacheIterator which may be used to traverse the
+ items in the cache in arbitrary order.
+
+ \sa Q3IntCacheIterator, Q3Cache, Q3AsciiCache
+*/
+
+/*!
+ \fn Q3IntCache::Q3IntCache( const Q3IntCache<type> &c )
+
+ \internal
+
+ Do not use. A Q3IntCache cannot be copied. Calls qFatal() in debug version.
+*/
+
+/*!
+ \fn Q3IntCache::Q3IntCache( int maxCost, int size )
+
+ Constructs a cache whose contents will never have a total cost
+ greater than \a maxCost and which is expected to contain less than
+ \a size items.
+
+ \a size is actually the size of an internal hash array; it's
+ usually best to make it prime and at least 50% bigger than the
+ largest expected number of items in the cache.
+
+ Each inserted item is associated with a cost. When inserting a new
+ item, if the total cost of all items in the cache will exceed \a
+ maxCost, the cache will start throwing out the older (least
+ recently used) items until there is enough room for the new item
+ to be inserted.
+*/
+
+/*!
+ \fn Q3IntCache::~Q3IntCache()
+
+ Removes all items from the cache and then destroys the int cache.
+ If auto-deletion is enabled the cache's items are deleted. All
+ iterators that access this cache will be reset.
+*/
+
+/*!
+ \fn Q3IntCache<type>& Q3IntCache::operator=( const Q3IntCache<type> &c )
+
+ \internal
+
+ Do not use. A Q3IntCache cannot be copied. Calls qFatal() in debug version.
+*/
+
+/*!
+ \fn int Q3IntCache::maxCost() const
+
+ Returns the maximum allowed total cost of the cache.
+
+ \sa setMaxCost() totalCost()
+*/
+
+/*!
+ \fn int Q3IntCache::totalCost() const
+
+ Returns the total cost of the items in the cache. This is an
+ integer in the range 0 to maxCost().
+
+ \sa setMaxCost()
+*/
+
+/*!
+ \fn void Q3IntCache::setMaxCost( int m )
+
+ Sets the maximum allowed total cost of the cache to \a m. If the
+ current total cost is greater than \a m, some items are removed
+ immediately.
+
+ \sa maxCost() totalCost()
+*/
+
+/*!
+ \fn uint Q3IntCache::count() const
+
+ Returns the number of items in the cache.
+
+ \sa totalCost()
+*/
+
+/*!
+ \fn uint Q3IntCache::size() const
+
+ Returns the size of the hash array used to implement the cache.
+ This should be a bit larger than count() is likely to be.
+*/
+
+/*!
+ \fn bool Q3IntCache::isEmpty() const
+
+ Returns TRUE if the cache is empty; otherwise returns FALSE.
+*/
+
+/*!
+ \fn bool Q3IntCache::insert( long k, const type *d, int c, int p )
+
+ Inserts the item \a d into the cache with key \a k and assigns it
+ a cost of \a c (default 1). Returns TRUE if it succeeds; otherwise
+ returns FALSE.
+
+ The cache's size is limited, and if the total cost is too high,
+ Q3IntCache will remove old, least-used items until there is room
+ for this new item.
+
+ The parameter \a p is internal and should be left at the default
+ value (0).
+
+ \warning If this function returns FALSE (for example, the cost \c,
+ exceeds maxCost()), you must delete \a d yourself. Additionally,
+ be very careful about using \a d after calling this function. Any
+ other insertions into the cache, from anywhere in the application
+ or within Qt itself, could cause the object to be discarded from
+ the cache and the pointer to become invalid.
+*/
+
+/*!
+ \fn bool Q3IntCache::remove( long k )
+
+ Removes the item associated with \a k, and returns TRUE if the
+ item was present in the cache; otherwise returns FALSE.
+
+ The item is deleted if auto-deletion has been enabled, i.e. if you
+ have called setAutoDelete(TRUE).
+
+ If there are two or more items with equal keys, the one that was
+ inserted most recently is removed.
+
+ All iterators that refer to the removed item are set to point to
+ the next item in the cache's traversal order.
+
+ \sa take(), clear()
+*/
+
+/*!
+ \fn type * Q3IntCache::take( long k )
+
+ Takes the item associated with \a k out of the cache without
+ deleting it, and returns a pointer to the item taken out or 0 if
+ the key does not exist in the cache.
+
+ If there are two or more items with equal keys, the one that was
+ inserted most recently is taken.
+
+ All iterators that refer to the taken item are set to point to the
+ next item in the cache's traversal order.
+
+ \sa remove(), clear()
+*/
+
+/*!
+ \fn void Q3IntCache::clear()
+
+ Removes all items from the cache, and deletes them if
+ auto-deletion has been enabled.
+
+ All cache iterators that operate this on cache are reset.
+
+ \sa remove() take()
+*/
+
+/*!
+ \fn type * Q3IntCache::find( long k, bool ref ) const
+
+ Returns the item associated with \a k, or 0 if the key does not
+ exist in the cache. If \a ref is TRUE (the default), the item is
+ moved to the front of the least recently used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted most recently is returned.
+*/
+
+/*!
+ \fn type * Q3IntCache::operator[]( long k ) const
+
+ Returns the item associated with \a k, or 0 if \a k does not exist
+ in the cache, and moves the item to the front of the least
+ recently used list.
+
+ If there are two or more items with equal keys, the one that was
+ inserted most recently is returned.
+
+ This is the same as find( k, TRUE ).
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3IntCache::statistics() const
+
+ A debug-only utility function. Prints out cache usage, hit/miss,
+ and distribution information using qDebug(). This function does
+ nothing in the release library.
+*/
+
+/*!
+ \class Q3IntCacheIterator
+ \brief The Q3IntCacheIterator class provides an iterator for Q3IntCache collections.
+ \compat
+
+ Note that the traversal order is arbitrary; you are not guaranteed
+ any particular order. If new objects are inserted into the cache
+ while the iterator is active, the iterator may or may not see
+ them.
+
+ Multiple iterators are completely independent, even when they
+ operate on the same Q3IntCache. Q3IntCache updates all iterators
+ that refer an item when that item is removed.
+
+ Q3IntCacheIterator provides an operator++(), and an operator+=() to
+ traverse the cache; current() and currentKey() to access the
+ current cache item and its key; atFirst() atLast(), which return
+ TRUE if the iterator points to the first/last item in the cache;
+ isEmpty(), which returns TRUE if the cache is empty; and count(),
+ which returns the number of items in the cache.
+
+ Note that atFirst() and atLast() refer to the iterator's arbitrary
+ ordering, not to the cache's internal least recently used list.
+
+ \sa Q3IntCache
+*/
+
+/*!
+ \fn Q3IntCacheIterator::Q3IntCacheIterator( const Q3IntCache<type> &cache )
+
+ Constructs an iterator for \a cache. The current iterator item is
+ set to point to the first item in the \a cache (or rather, the
+ first item is defined to be the item at which this constructor
+ sets the iterator to point).
+*/
+
+/*!
+ \fn Q3IntCacheIterator::Q3IntCacheIterator (const Q3IntCacheIterator<type> & ci)
+
+ Constructs an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current(), but moves
+ independently from there on.
+*/
+
+/*!
+ \fn Q3IntCacheIterator<type>& Q3IntCacheIterator::operator=( const Q3IntCacheIterator<type> &ci )
+
+ Makes this an iterator for the same cache as \a ci. The new
+ iterator starts at the same item as ci.current(), but moves
+ independently thereafter.
+*/
+
+/*!
+ \fn uint Q3IntCacheIterator::count() const
+
+ Returns the number of items in the cache on which this iterator
+ operates.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3IntCacheIterator::isEmpty() const
+
+ Returns TRUE if the cache is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3IntCacheIterator::atFirst() const
+
+ Returns TRUE if the iterator points to the first item in the
+ cache; otherwise returns FALSE. Note that this refers to the
+ iterator's arbitrary ordering, not to the cache's internal least
+ recently used list.
+
+ \sa toFirst(), atLast()
+*/
+
+/*!
+ \fn bool Q3IntCacheIterator::atLast() const
+
+ Returns TRUE if the iterator points to the last item in the cache;
+ otherwise returns FALSE. Note that this refers to the iterator's
+ arbitrary ordering, not to the cache's internal least recently
+ used list.
+
+ \sa toLast(), atFirst()
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::toFirst()
+
+ Sets the iterator to point to the first item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0, and returns 0, if the cache is empty.
+
+ \sa toLast() isEmpty()
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::toLast()
+
+ Sets the iterator to point to the last item in the cache and
+ returns a pointer to the item.
+
+ Sets the iterator to 0, and returns 0, if the cache is empty.
+
+ \sa toFirst() isEmpty()
+*/
+
+/*!
+ \fn Q3IntCacheIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::current() const
+
+ Returns a pointer to the current iterator item.
+*/
+
+/*!
+ \fn long Q3IntCacheIterator::currentKey() const
+
+ Returns the key for the current iterator item.
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the cache or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::operator+=( uint jump )
+
+ Returns the item \a jump positions after the current item, or 0 if
+ it is beyond the last item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::operator-=( uint jump )
+
+ Returns the item \a jump positions before the current item, or 0
+ if it is beyond the first item. Makes this the current item.
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::operator++()
+
+ Prefix ++ makes the iterator point to the item just after
+ current(), and makes it the new current item for the iterator. If
+ current() was the last item, operator--() returns 0.
+*/
+
+/*!
+ \fn type *Q3IntCacheIterator::operator--()
+
+ Prefix -- makes the iterator point to the item just before
+ current(), and makes it the new current item for the iterator. If
+ current() was the first item, operator--() returns 0.
+*/
diff --git a/doc/src/q3intdict.qdoc b/doc/src/q3intdict.qdoc
new file mode 100644
index 0000000..8f0aabf
--- /dev/null
+++ b/doc/src/q3intdict.qdoc
@@ -0,0 +1,390 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3IntDict
+ \brief The Q3IntDict class is a template class that provides a dictionary based on long keys.\
+ \compat
+
+ Q3IntDict is implemented as a template class. Define a template
+ instance Q3IntDict\<X\> to create a dictionary that operates on
+ pointers to X (X*).
+
+ A dictionary is a collection of key-value pairs. The key is an \c
+ long used for insertion, removal and lookup. The value is a
+ pointer. Dictionaries provide very fast insertion and lookup.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 0
+
+ See Q3Dict for full details, including the choice of dictionary
+ size, and how deletions are handled.
+
+ \sa Q3IntDictIterator, Q3Dict, Q3AsciiDict, Q3PtrDict
+*/
+
+
+/*!
+ \fn Q3IntDict::Q3IntDict( int size )
+
+ Constructs a dictionary using an internal hash array of size \a
+ size.
+
+ Setting \a size to a suitably large prime number (equal to or
+ greater than the expected number of entries) makes the hash
+ distribution better which leads to faster lookup.
+*/
+
+/*!
+ \fn Q3IntDict::Q3IntDict( const Q3IntDict<type> &dict )
+
+ Constructs a copy of \a dict.
+
+ Each item in \a dict is inserted into this dictionary. Only the
+ pointers are copied (shallow copy).
+*/
+
+/*!
+ \fn Q3IntDict::~Q3IntDict()
+
+ Removes all items from the dictionary and destroys it.
+
+ All iterators that access this dictionary will be reset.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Q3IntDict<type> &Q3IntDict::operator=(const Q3IntDict<type> &dict)
+
+ Assigns \a dict to this dictionary and returns a reference to this
+ dictionary.
+
+ This dictionary is first cleared and then each item in \a dict is
+ inserted into this dictionary. Only the pointers are copied
+ (shallow copy), unless newItem() has been reimplemented.
+*/
+
+/*!
+ \fn uint Q3IntDict::count() const
+
+ Returns the number of items in the dictionary.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn uint Q3IntDict::size() const
+
+ Returns the size of the internal hash array (as specified in the
+ constructor).
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3IntDict::resize( uint newsize )
+
+ Changes the size of the hashtable to \a newsize. The contents of
+ the dictionary are preserved, but all iterators on the dictionary
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3IntDict::isEmpty() const
+
+ Returns TRUE if the dictionary is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3IntDict::insert( long key, const type *item )
+
+ Insert item \a item into the dictionary using key \a key.
+
+ Multiple items can have the same key, in which case only the last
+ item will be accessible using \l operator[]().
+
+ \a item may not be 0.
+
+ \sa replace()
+*/
+
+/*!
+ \fn void Q3IntDict::replace( long key, const type *item )
+
+ If the dictionary has key \a key, this key's item is replaced with
+ \a item. If the dictionary doesn't contain key \a key, \a item is
+ inserted into the dictionary using key \a key.
+
+ \a item may not be 0.
+
+ Equivalent to:
+ \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 1
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be replaced.
+
+ \sa insert()
+*/
+
+/*!
+ \fn bool Q3IntDict::remove( long key )
+
+ Removes the item associated with \a key from the dictionary.
+ Returns TRUE if successful, i.e. if the \a key is in the
+ dictionary; otherwise returns FALSE.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be removed.
+
+ The removed item is deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that refer to the removed item will be
+ set to point to the next item in the dictionary's traversal
+ order.
+
+ \sa take(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3IntDict::take( long key )
+
+ Takes the item associated with \a key out of the dictionary
+ without deleting it (even if \link Q3PtrCollection::setAutoDelete()
+ auto-deletion\endlink is enabled).
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be taken.
+
+ Returns a pointer to the item taken out, or 0 if the key does not
+ exist in the dictionary.
+
+ All dictionary iterators that refer to the taken item will be set
+ to point to the next item in the dictionary's traversing order.
+
+ \sa remove(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn void Q3IntDict::clear()
+
+ Removes all items from the dictionary.
+
+ The removed items are deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that access this dictionary will be reset.
+
+ \sa remove(), take(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3IntDict::find( long key ) const
+
+ Returns the item associated with \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to operator[].
+
+ \sa operator[]()
+*/
+
+/*!
+ \fn type *Q3IntDict::operator[]( long key ) const
+
+ Returns the item associated with \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to the find() function.
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3IntDict::statistics() const
+
+ Debugging-only function that prints out the dictionary
+ distribution using qDebug().
+*/
+
+/*!
+ \fn QDataStream& Q3IntDict::read( QDataStream &s, Q3PtrCollection::Item &item )
+
+ Reads a dictionary item from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3IntDict::write( QDataStream &s, Q3PtrCollection::Item item ) const
+
+ Writes a dictionary \a item to the stream \a s and returns a
+ reference to the stream.
+
+ \sa read()
+*/
+
+/*!
+ \class Q3IntDictIterator
+ \brief The Q3IntDictIterator class provides an iterator for Q3IntDict collections.
+ \compat
+
+ Q3IntDictIterator is implemented as a template class. Define a
+ template instance Q3IntDictIterator\<X\> to create a dictionary
+ iterator that operates on Q3IntDict\<X\> (dictionary of X*).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 2
+
+ Note that the traversal order is arbitrary; you are not guaranteed the
+ order shown above.
+
+ Multiple iterators may independently traverse the same dictionary.
+ A Q3IntDict knows about all the iterators that are operating on the
+ dictionary. When an item is removed from the dictionary, Q3IntDict
+ updates all iterators that refer the removed item to point to the
+ next item in the traversal order.
+
+ \sa Q3IntDict
+*/
+
+/*!
+ \fn Q3IntDictIterator::Q3IntDictIterator( const Q3IntDict<type> &dict )
+
+ Constructs an iterator for \a dict. The current iterator item is
+ set to point to the 'first' item in the \a dict. The first item
+ refers to the first item in the dictionary's arbitrary internal
+ ordering.
+*/
+
+/*!
+ \fn Q3IntDictIterator::~Q3IntDictIterator()
+
+ Destroys the iterator.
+*/
+
+/*!
+ \fn uint Q3IntDictIterator::count() const
+
+ Returns the number of items in the dictionary this iterator
+ operates over.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3IntDictIterator::isEmpty() const
+
+ Returns TRUE if the dictionary is empty; otherwise eturns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn type *Q3IntDictIterator::toFirst()
+
+ Sets the current iterator item to point to the first item in the
+ dictionary and returns a pointer to the item. The first item
+ refers to the first item in the dictionary's arbitrary internal
+ ordering. If the dictionary is empty it sets the current item to
+ 0 and returns 0.
+*/
+
+/*!
+ \fn Q3IntDictIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3IntDictIterator::current() const
+
+ Returns a pointer to the current iterator item.
+*/
+
+/*!
+ \fn long Q3IntDictIterator::currentKey() const
+
+ Returns the key for the current iterator item.
+*/
+
+/*!
+ \fn type *Q3IntDictIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3IntDictIterator::operator++()
+
+ Prefix ++ makes the succeeding item current and returns the new
+ current item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3IntDictIterator::operator+=( uint jump )
+
+ Sets the current item to the item \a jump positions after the
+ current item, and returns a pointer to that item.
+
+ If that item is beyond the last item or if the dictionary is
+ empty, it sets the current item to 0 and returns 0.
+*/
diff --git a/doc/src/q3memarray.qdoc b/doc/src/q3memarray.qdoc
new file mode 100644
index 0000000..5ab7895
--- /dev/null
+++ b/doc/src/q3memarray.qdoc
@@ -0,0 +1,523 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3MemArray
+ \brief The Q3MemArray class is a template class that provides arrays of simple types.
+ \compat
+
+ Q3MemArray is implemented as a template class. Define a template
+ instance Q3MemArray\<X\> to create an array that contains X items.
+
+ Q3MemArray stores the array elements directly in the array. It can
+ only deal with simple types (i.e. C++ types, structs, and classes
+ that have no constructors, destructors, or virtual functions).
+ Q3MemArray uses bitwise operations to copy and compare array
+ elements.
+
+ The Q3PtrVector collection class is also a kind of array. Like most
+ old Qt collection classes, it uses pointers to the contained items.
+
+ Q3MemArray uses explicit sharing with a
+ reference count. If more than one array shares common data and one
+ of the arrays is modified, all the arrays are modified.
+
+ The benefit of sharing is that a program does not need to duplicate
+ data when it is not required, which results in lower memory use
+ and less copying of data.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 0
+
+ Program output:
+ \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 1
+
+ Note concerning the use of Q3MemArray for manipulating structs or
+ classes: Compilers will often pad the size of structs of odd sizes
+ up to the nearest word boundary. This will then be the size
+ Q3MemArray will use for its bitwise element comparisons. Because
+ the remaining bytes will typically be uninitialized, this can
+ cause find() etc. to fail to find the element. Example:
+
+ \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 2
+
+ To work around this, make sure that you use a struct where
+ sizeof() returns the same as the sum of the sizes of the members
+ either by changing the types of the struct members or by adding
+ dummy members.
+
+ Q3MemArray data can be traversed by iterators (see begin() and
+ end()). The number of items is returned by count(). The array can
+ be resized with resize() and filled using fill().
+
+ You can make a shallow copy of the array with assign() (or
+ operator=()) and a deep copy with duplicate().
+
+ Search for values in the array with find() and contains(). For
+ sorted arrays (see sort()) you can search using bsearch().
+
+ You can set the data directly using setRawData() and
+ resetRawData(), although this requires care.
+*/
+
+/*! \fn Q3MemArray::operator QVector<type>() const
+
+ Automatically converts the Q3MemArray<type> into a QVector<type>.
+*/
+
+/*! \typedef Q3MemArray::Iterator
+ A Q3MemArray iterator.
+ \sa begin() end()
+*/
+/*! \typedef Q3MemArray::ConstIterator
+ A const Q3MemArray iterator.
+ \sa begin() end()
+*/
+/*! \typedef Q3MemArray::ValueType
+ \internal
+*/
+
+/*!
+ \fn Q3MemArray::Q3MemArray()
+
+ Constructs a null array.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn Q3MemArray::Q3MemArray( int size )
+
+ Constructs an array with room for \a size elements. Makes a null
+ array if \a size == 0.
+
+ The elements are left uninitialized.
+
+ \sa resize(), isNull()
+*/
+
+/*!
+ \fn Q3MemArray::Q3MemArray( const Q3MemArray<type> &a )
+
+ Constructs a shallow copy of \a a.
+
+ \sa assign()
+*/
+
+/*!
+ \fn Q3MemArray::Q3MemArray(const QVector<type> &vector)
+
+ Constructs a copy of \a vector.
+*/
+
+/*!
+ \fn Q3MemArray::Q3MemArray(int arg1, int arg2)
+
+ Constructs an array \e{without allocating} array space. The
+ arguments \a arg1 and \a arg2 should be zero. Use at your own
+ risk.
+*/
+
+/*!
+ \fn Q3MemArray::~Q3MemArray()
+
+ Dereferences the array data and deletes it if this was the last
+ reference.
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::operator=( const Q3MemArray<type> &a )
+
+ Assigns a shallow copy of \a a to this array and returns a
+ reference to this array.
+
+ Equivalent to assign( a ).
+*/
+
+/*!
+ \fn type *Q3MemArray::data() const
+
+ Returns a pointer to the actual array data.
+
+ The array is a null array if data() == 0 (null pointer).
+
+ \sa isNull()
+*/
+
+/*!
+ \fn uint Q3MemArray::nrefs() const
+
+ Returns the reference count for the shared array data. This
+ reference count is always greater than zero.
+*/
+
+/*!
+ \fn uint Q3MemArray::size() const
+
+ Returns the size of the array (maximum number of elements).
+
+ The array is a null array if size() == 0.
+
+ \sa isNull(), resize()
+*/
+
+/*!
+ \fn uint Q3MemArray::count() const
+
+ Returns the same as size().
+
+ \sa size()
+*/
+
+/*!
+ \fn bool Q3MemArray::isEmpty() const
+
+ Returns TRUE if the array is empty; otherwise returns FALSE.
+
+ isEmpty() is equivalent to isNull() for Q3MemArray (unlike
+ QString).
+*/
+
+/*!
+ \fn bool Q3MemArray::isNull() const
+
+ Returns TRUE if the array is null; otherwise returns FALSE.
+
+ A null array has size() == 0 and data() == 0.
+*/
+
+/*!
+ \fn bool Q3MemArray::resize( uint size, Optimization optim )
+
+ Resizes (expands or shrinks) the array to \a size elements. The
+ array becomes a null array if \a size == 0.
+
+ Returns TRUE if successful, or FALSE if the memory cannot be
+ allocated.
+
+ New elements are not initialized.
+
+ \a optim is either Q3GArray::MemOptim (the default) or
+ Q3GArray::SpeedOptim. When optimizing for speed rather than memory
+ consumption, the array uses a smart grow and shrink algorithm that
+ might allocate more memory than is actually needed for \a size
+ elements. This speeds up subsequent resize operations, for example
+ when appending many elements to an array, since the space has
+ already been allocated.
+
+ \sa size()
+*/
+
+/*!
+ \fn bool Q3MemArray::resize( uint size )
+
+ \overload
+
+ Resizes (expands or shrinks) the array to \a size elements. The
+ array becomes a null array if \a size == 0.
+
+ Returns TRUE if successful, i.e. if the memory can be allocated;
+ otherwise returns FALSE.
+
+ New elements are not initialized.
+
+ \sa size()
+*/
+
+/*!
+ \fn bool Q3MemArray::truncate( uint pos )
+
+ Truncates the array at position \a pos.
+
+ Returns TRUE if successful, i.e. if the memory can be allocated;
+ otherwise returns FALSE.
+
+ Equivalent to resize(\a pos).
+
+ \sa resize()
+*/
+
+/*!
+ \fn bool Q3MemArray::fill( const type &v, int size )
+
+ Fills the array with the value \a v. If \a size is specified as
+ different from -1, then the array will be resized before being
+ filled.
+
+ Returns TRUE if successful, i.e. if \a size is -1, or \a size is
+ != -1 and the memory can be allocated; otherwise returns FALSE.
+
+ \sa resize()
+*/
+
+/*!
+ \fn void Q3MemArray::detach()
+
+ Detaches this array from shared array data; i.e. it makes a
+ private, deep copy of the data.
+
+ Copying will be performed only if the \link nrefs() reference
+ count\endlink is greater than one.
+
+ \sa copy()
+*/
+
+/*!
+ \fn Q3MemArray<type> Q3MemArray::copy() const
+
+ Returns a deep copy of this array.
+
+ \sa detach(), duplicate()
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::assign( const Q3MemArray<type> &a )
+
+ Shallow copy. Dereferences the current array and references the
+ data contained in \a a instead. Returns a reference to this array.
+
+ \sa operator=()
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::assign( const type *data, uint size )
+
+ \overload
+
+ Shallow copy. Dereferences the current array and references the
+ array data \a data, which contains \a size elements. Returns a
+ reference to this array.
+
+ Do not delete \a data later; Q3MemArray will call free() on it
+ at the right time.
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::duplicate( const Q3MemArray<type> &a )
+
+ Deep copy. Dereferences the current array and obtains a copy of
+ the data contained in \a a instead. Returns a reference to this
+ array.
+
+ \sa copy()
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::duplicate( const type *data, uint size )
+
+ \overload
+
+ Deep copy. Dereferences the current array and obtains a copy of
+ the array data \a data instead. Returns a reference to this array.
+ The size of the array is given by \a size.
+
+ \sa copy()
+*/
+
+/*!
+ \fn Q3MemArray<type> &Q3MemArray::setRawData( const type *data, uint size )
+
+ Sets raw data and returns a reference to the array.
+
+ Dereferences the current array and sets the new array data to \a
+ data and the new array size to \a size. Do not attempt to resize
+ or re-assign the array data when raw data has been set. Call
+ resetRawData(\a data, \a size) to reset the array.
+
+ Setting raw data is useful because it sets Q3MemArray data without
+ allocating memory or copying data.
+
+ Example I (intended use):
+ \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 3
+
+ Example II (you don't want to do this):
+ \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 4
+
+ \warning If you do not call resetRawData(), Q3MemArray will attempt
+ to deallocate or reallocate the raw data, which might not be too
+ good. Be careful.
+
+ \sa resetRawData()
+*/
+
+/*!
+ \fn void Q3MemArray::resetRawData( const type *data, uint size )
+
+ Removes internal references to the raw data that was set using
+ setRawData(). This means that Q3MemArray no longer has access to
+ the \a data, so you are free to manipulate \a data as you wish.
+ You can now use the Q3MemArray without affecting the original \a
+ data, for example by calling setRawData() with a pointer to some
+ other data.
+
+ The arguments must be the \a data and length, \a size, that were
+ passed to setRawData(). This is for consistency checking.
+
+ \sa setRawData()
+*/
+
+/*!
+ \fn int Q3MemArray::find( const type &v, uint index ) const
+
+ Finds the first occurrence of \a v, starting at position \a index.
+
+ Returns the position of \a v, or -1 if \a v could not be found.
+
+ \sa contains()
+*/
+
+/*!
+ \fn int Q3MemArray::contains( const type &v ) const
+
+ Returns the number of times \a v occurs in the array.
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3MemArray::sort()
+
+ Sorts the array elements in ascending order, using bitwise
+ comparison (memcmp()).
+
+ \sa bsearch()
+*/
+
+/*!
+ \fn int Q3MemArray::bsearch( const type &v ) const
+
+ In a sorted array (as sorted by sort()), finds the first
+ occurrence of \a v by using a binary search. For a sorted
+ array this is generally much faster than find(), which does
+ a linear search.
+
+ Returns the position of \a v, or -1 if \a v could not be found.
+
+ \sa sort(), find()
+*/
+
+/*!
+ \fn type &Q3MemArray::operator[]( int index ) const
+
+ Returns a reference to the element at position \a index in the
+ array.
+
+ This can be used to both read and set an element. Equivalent to
+ at().
+
+ \sa at()
+*/
+
+/*!
+ \fn type &Q3MemArray::at( uint index ) const
+
+ Returns a reference to the element at position \a index in the array.
+
+ This can be used to both read and set an element.
+
+ \sa operator[]()
+*/
+
+/*!
+ \fn Q3MemArray::operator const type *() const
+
+ Cast operator. Returns a pointer to the array.
+
+ \sa data()
+*/
+
+/*!
+ \fn bool Q3MemArray::operator==( const Q3MemArray<type> &a ) const
+
+ Returns TRUE if this array is equal to \a a; otherwise returns
+ FALSE.
+
+ The two arrays are compared bitwise.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool Q3MemArray::operator!=( const Q3MemArray<type> &a ) const
+
+ Returns TRUE if this array is different from \a a; otherwise
+ returns FALSE.
+
+ The two arrays are compared bitwise.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn Iterator Q3MemArray::begin()
+
+ Returns an iterator pointing at the beginning of this array. This
+ iterator can be used in the same way as the iterators of
+ Q3ValueList and QMap, for example.
+*/
+
+/*!
+ \fn Iterator Q3MemArray::end()
+
+ Returns an iterator pointing behind the last element of this
+ array. This iterator can be used in the same way as the iterators
+ of Q3ValueList and QMap, for example.
+*/
+
+/*!
+ \fn ConstIterator Q3MemArray::begin() const
+
+ \overload
+
+ Returns a const iterator pointing at the beginning of this array.
+ This iterator can be used in the same way as the iterators of
+ Q3ValueList and QMap, for example.
+*/
+
+/*!
+ \fn ConstIterator Q3MemArray::end() const
+
+ \overload
+
+ Returns a const iterator pointing behind the last element of this
+ array. This iterator can be used in the same way as the iterators
+ of Q3ValueList and QMap, for example.
+*/
diff --git a/doc/src/q3popupmenu.qdoc b/doc/src/q3popupmenu.qdoc
new file mode 100644
index 0000000..137115e
--- /dev/null
+++ b/doc/src/q3popupmenu.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PopupMenu
+ \brief The Q3PopupMenu class is a thin compatibility wrapper around QMenu.
+ \compat
+
+ Use QMenu in new applications. Note that the menu's actions must
+ be \l {Q3Action}s.
+*/
+
+/*!
+ \fn Q3PopupMenu::Q3PopupMenu(QWidget *parent, const char *name)
+
+ Constructs a menu with the given \a parent and \a name.
+*/
+
+/*!
+ \fn int Q3PopupMenu::exec()
+
+ Pops up the menu and returns the ID of the action that was
+ selected.
+
+ \sa QMenu::exec()
+*/
+
+/*!
+ \fn int Q3PopupMenu::exec(const QPoint & pos, int indexAtPoint)
+
+ Pops up the menu at coordinate \a pos and returns the ID of the
+ action that was selected.
+
+ If \a indexAtPoint is specified, the menu will pop up with the
+ item at index \a indexAtPoint under the mouse cursor.
+
+ \sa QMenu::exec()
+*/
diff --git a/doc/src/q3ptrdict.qdoc b/doc/src/q3ptrdict.qdoc
new file mode 100644
index 0000000..a7e3545
--- /dev/null
+++ b/doc/src/q3ptrdict.qdoc
@@ -0,0 +1,388 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PtrDict
+ \brief The Q3PtrDict class is a template class that provides a dictionary based on void* keys.
+ \compat
+
+ Q3PtrDict is implemented as a template class. Define a template
+ instance Q3PtrDict\<X\> to create a dictionary that operates on
+ pointers to X (X*).
+
+ A dictionary is a collection of key-value pairs. The key is a
+ void* used for insertion, removal and lookup. The value is a
+ pointer. Dictionaries provide very fast insertion and lookup.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 0
+ In this example we use a dictionary to add an extra property (a
+ char*) to the line edits we're using.
+
+ See Q3Dict for full details, including the choice of dictionary
+ size, and how deletions are handled.
+
+ \sa Q3PtrDictIterator, Q3Dict, Q3AsciiDict, Q3IntDict
+*/
+
+
+/*!
+ \fn Q3PtrDict::Q3PtrDict( int size )
+
+ Constructs a dictionary using an internal hash array with the size
+ \a size.
+
+ Setting \a size to a suitably large prime number (equal to or
+ greater than the expected number of entries) makes the hash
+ distribution better and improves lookup performance.
+*/
+
+/*!
+ \fn Q3PtrDict::Q3PtrDict( const Q3PtrDict<type> &dict )
+
+ Constructs a copy of \a dict.
+
+ Each item in \a dict is inserted into this dictionary. Only the
+ pointers are copied (shallow copy).
+*/
+
+/*!
+ \fn Q3PtrDict::~Q3PtrDict()
+
+ Removes all items from the dictionary and destroys it.
+
+ All iterators that access this dictionary will be reset.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Q3PtrDict<type> &Q3PtrDict::operator=(const Q3PtrDict<type> &dict)
+
+ Assigns \a dict to this dictionary and returns a reference to this
+ dictionary.
+
+ This dictionary is first cleared and then each item in \a dict is
+ inserted into the dictionary. Only the pointers are copied
+ (shallow copy), unless newItem() has been reimplemented.
+*/
+
+/*!
+ \fn uint Q3PtrDict::count() const
+
+ Returns the number of items in the dictionary.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn uint Q3PtrDict::size() const
+
+ Returns the size of the internal hash table (as specified in the
+ constructor).
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3PtrDict::resize( uint newsize )
+
+ Changes the size of the hash table to \a newsize. The contents of
+ the dictionary are preserved, but all iterators on the dictionary
+ become invalid.
+*/
+
+/*!
+ \fn bool Q3PtrDict::isEmpty() const
+
+ Returns TRUE if the dictionary is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn void Q3PtrDict::insert( void *key, const type *item )
+
+ Inserts the \a key with the \a item into the dictionary.
+
+ Multiple items can have the same key, in which case only the last
+ item will be accessible using \l operator[]().
+
+ \a item may not be 0.
+
+ \sa replace()
+*/
+
+/*!
+ \fn void Q3PtrDict::replace( void *key, const type *item )
+
+ If the dictionary has key \a key, this key's item is replaced with
+ \a item. If the dictionary doesn't contain key \a key, \a item is
+ inserted into the dictionary using key \a key.
+
+ \a item may not be 0.
+
+ Equivalent to
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 1
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be replaced.
+
+ \sa insert()
+*/
+
+/*!
+ \fn bool Q3PtrDict::remove( void *key )
+
+ Removes the item associated with \a key from the dictionary.
+ Returns TRUE if successful, i.e. if \a key is in the dictionary;
+ otherwise returns FALSE.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be removed.
+
+ The removed item is deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that refer to the removed item will be
+ set to point to the next item in the dictionary traversal order.
+
+ \sa take(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3PtrDict::take( void *key )
+
+ Takes the item associated with \a key out of the dictionary
+ without deleting it (even if \link Q3PtrCollection::setAutoDelete()
+ auto-deletion\endlink is enabled).
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be removed.
+
+ Returns a pointer to the item taken out, or 0 if the key does not
+ exist in the dictionary.
+
+ All dictionary iterators that refer to the taken item will be set
+ to point to the next item in the dictionary traversal order.
+
+ \sa remove(), clear(), setAutoDelete()
+*/
+
+/*!
+ \fn void Q3PtrDict::clear()
+
+ Removes all items from the dictionary.
+
+ The removed items are deleted if \link
+ Q3PtrCollection::setAutoDelete() auto-deletion\endlink is enabled.
+
+ All dictionary iterators that access this dictionary will be
+ reset.
+
+ \sa remove(), take(), setAutoDelete()
+*/
+
+/*!
+ \fn type *Q3PtrDict::find( void *key ) const
+
+ Returns the item associated with \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to operator[].
+
+ \sa operator[]()
+*/
+
+/*!
+ \fn type *Q3PtrDict::operator[]( void *key ) const
+
+ Returns the item associated with \a key, or 0 if the key does not
+ exist in the dictionary.
+
+ If there are two or more items with equal keys, then the most
+ recently inserted item will be found.
+
+ Equivalent to the find() function.
+
+ \sa find()
+*/
+
+/*!
+ \fn void Q3PtrDict::statistics() const
+
+ Debugging-only function that prints out the dictionary
+ distribution using qDebug().
+*/
+
+/*!
+ \fn QDataStream& Q3PtrDict::read( QDataStream &s, Q3PtrCollection::Item &item )
+
+ Reads a dictionary item from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrDict::write( QDataStream &s, Q3PtrCollection::Item item) const
+
+ Writes a dictionary \a item to the stream \a s and returns a
+ reference to the stream.
+
+ \sa read()
+*/
+
+/*!
+ \class Q3PtrDictIterator
+ \brief The Q3PtrDictIterator class provides an iterator for Q3PtrDict collections.
+ \compat
+
+ Q3PtrDictIterator is implemented as a template class. Define a
+ template instance Q3PtrDictIterator\<X\> to create a dictionary
+ iterator that operates on Q3PtrDict\<X\> (dictionary of X*).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 2
+ In the example we insert some line edits into a dictionary,
+ associating a string with each. We then iterate over the
+ dictionary printing the associated strings.
+
+ Multiple iterators may independently traverse the same dictionary.
+ A Q3PtrDict knows about all the iterators that are operating on the
+ dictionary. When an item is removed from the dictionary, Q3PtrDict
+ updates all iterators that refer the removed item to point to the
+ next item in the traversing order.
+
+ \sa Q3PtrDict
+*/
+
+/*!
+ \fn Q3PtrDictIterator::Q3PtrDictIterator( const Q3PtrDict<type> &dict )
+
+ Constructs an iterator for \a dict. The current iterator item is
+ set to point on the first item in the \a dict.
+*/
+
+/*!
+ \fn Q3PtrDictIterator::~Q3PtrDictIterator()
+
+ Destroys the iterator.
+*/
+
+/*!
+ \fn uint Q3PtrDictIterator::count() const
+
+ Returns the number of items in the dictionary this iterator
+ operates on.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3PtrDictIterator::isEmpty() const
+
+ Returns TRUE if the dictionary is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn type *Q3PtrDictIterator::toFirst()
+
+ Sets the current iterator item to point to the first item in the
+ dictionary and returns a pointer to the item. If the dictionary is
+ empty, it sets the current item to 0 and returns 0.
+*/
+
+/*!
+ \fn Q3PtrDictIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3PtrDictIterator::current() const
+
+ Returns a pointer to the current iterator item's value.
+*/
+
+/*!
+ \fn void *Q3PtrDictIterator::currentKey() const
+
+ Returns the current iterator item's key.
+*/
+
+/*!
+ \fn type *Q3PtrDictIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrDictIterator::operator++()
+
+ Prefix ++ makes the succeeding item current and returns the new
+ current item.
+
+ If the current iterator item was the last item in the dictionary
+ or if it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrDictIterator::operator+=( uint jump )
+
+ Sets the current item to the item \a jump positions after the
+ current item and returns a pointer to that item.
+
+ If that item is beyond the last item or if the dictionary is
+ empty, it sets the current item to 0 and returns 0.
+*/
diff --git a/doc/src/q3ptrlist.qdoc b/doc/src/q3ptrlist.qdoc
new file mode 100644
index 0000000..7eb4265
--- /dev/null
+++ b/doc/src/q3ptrlist.qdoc
@@ -0,0 +1,1157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PtrList
+ \brief The Q3PtrList class is a template class that provides a list.
+ \compat
+
+ Q3ValueList is an STL-compatible alternative to this class.
+
+ Define a template instance Q3PtrList\<X\> to create a list that
+ operates on pointers to X (X*).
+
+ The list class is indexable and has a \link at() current
+ index\endlink and a \link current() current item\endlink. The
+ first item corresponds to index position 0. The current index is
+ -1 if the current item is 0.
+
+ Items are inserted with prepend(), insert() or append(). Items are
+ removed with remove(), removeRef(), removeFirst() and
+ removeLast(). You can search for an item using find(), findNext(),
+ findRef() or findNextRef(). The list can be sorted with sort().
+ You can count the number of occurrences of an item with contains()
+ or containsRef(). You can get a pointer to the current item with
+ current(), to an item at a particular index position in the list
+ with at() or to the first or last item with getFirst() and
+ getLast(). You can also iterate over the list with first(),
+ last(), next() and prev() (which all update current()). The list's
+ deletion property is set with setAutoDelete().
+
+ \target example
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 0
+
+ The output is
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 1
+
+ Q3PtrList has several member functions for traversing the list, but
+ using a Q3PtrListIterator can be more practical. Multiple list
+ iterators may traverse the same list, independently of each other
+ and of the current list item.
+
+ In the example above we make the call setAutoDelete(true).
+ Enabling auto-deletion tells the list to delete items that are
+ removed. The default is to not delete items when they are removed
+ but this would cause a memory leak in the example because there
+ are no other references to the list items.
+
+ When inserting an item into a list only the pointer is copied, not
+ the item itself, i.e. a shallow copy. It is possible to make the
+ list copy all of the item's data (deep copy) when an item is
+ inserted. insert(), inSort() and append() call the virtual
+ function Q3PtrCollection::newItem() for the item to be inserted.
+ Inherit a list and reimplement newItem() to have deep copies.
+
+ When removing an item from a list, the virtual function
+ Q3PtrCollection::deleteItem() is called. Q3PtrList's default
+ implementation is to delete the item if auto-deletion is enabled.
+
+ The virtual function compareItems() can be reimplemented to
+ compare two list items. This function is called from all list
+ functions that need to compare list items, for instance
+ remove(const type*). If you only want to deal with pointers, there
+ are functions that compare pointers instead, for instance
+ removeRef(const type*). These functions are somewhat faster than
+ those that call compareItems().
+
+ List items are stored as \c void* in an internal Q3LNode, which
+ also holds pointers to the next and previous list items. The
+ functions currentNode(), removeNode(), and takeNode() operate
+ directly on the Q3LNode, but they should be used with care. The
+ data component of the node is available through Q3LNode::getData().
+
+ The Q3StrList class is a list of \c char*.
+ It reimplements newItem(), deleteItem() and compareItems(). (But
+ see QStringList for a list of Unicode QStrings.)
+
+ \sa Q3PtrListIterator
+*/
+
+
+/*!
+ \fn Q3PtrList::Q3PtrList()
+
+ Constructs an empty list.
+*/
+
+/*!
+ \fn Q3PtrList::Q3PtrList( const Q3PtrList<type> &list )
+
+ Constructs a copy of \a list.
+
+ Each item in \a list is \link append() appended\endlink to this
+ list. Only the pointers are copied (shallow copy).
+*/
+
+/*!
+ \fn Q3PtrList::~Q3PtrList()
+
+ Removes all items from the list and destroys the list.
+
+ All list iterators that access this list will be reset.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn Q3PtrList<type> &Q3PtrList::operator=(const Q3PtrList<type> &list)
+
+ Assigns \a list to this list and returns a reference to this list.
+
+ This list is first cleared and then each item in \a list is \link
+ append() appended\endlink to this list. Only the pointers are
+ copied (shallow copy) unless newItem() has been reimplemented.
+*/
+
+/*!
+ \fn bool Q3PtrList::operator==(const Q3PtrList<type> &list ) const
+
+ Compares this list with \a list. Returns TRUE if the lists contain
+ the same data; otherwise returns FALSE.
+*/
+
+/*!
+ \fn uint Q3PtrList::count() const
+
+ Returns the number of items in the list.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3PtrList::operator!=(const Q3PtrList<type> &list ) const
+
+ Compares this list with \a list. Returns TRUE if the lists contain
+ different data; otherwise returns FALSE.
+*/
+
+
+/*!
+ \fn void Q3PtrList::sort()
+
+ Sorts the list by the result of the virtual compareItems()
+ function.
+
+ The heap sort algorithm is used for sorting. It sorts n items with
+ O(n*log n) comparisons. This is the asymptotic optimal solution of
+ the sorting problem.
+
+ If the items in your list support operator<() and operator==(),
+ you might be better off with Q3SortedList because it implements the
+ compareItems() function for you using these two operators.
+
+ \sa inSort()
+*/
+
+/*!
+ \fn bool Q3PtrList::isEmpty() const
+
+ Returns TRUE if the list is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3PtrList::insert( uint index, const type *item )
+
+ Inserts the \a item at position \a index in the list.
+
+ Returns TRUE if successful, i.e. if \a index is in range;
+ otherwise returns FALSE. The valid range is 0 to count()
+ (inclusively). The item is appended if \a index == count().
+
+ The inserted item becomes the current list item.
+
+ \a item must not be 0.
+
+ \sa append(), current(), replace()
+*/
+
+/*!
+ \fn bool Q3PtrList::replace( uint index, const type *item )
+
+ Replaces the item at position \a index with the new \a item.
+
+ Returns TRUE if successful, i.e. \a index is in the range 0 to
+ count()-1.
+
+ \sa append(), current(), insert()
+*/
+
+/*!
+ \fn void Q3PtrList::inSort( const type *item )
+
+ Inserts the \a item at its sorted position in the list.
+
+ The sort order depends on the virtual compareItems() function. All
+ items must be inserted with inSort() to maintain the sorting
+ order.
+
+ The inserted item becomes the current list item.
+
+ \a item must not be 0.
+
+ \warning Using inSort() is slow. An alternative, especially if you
+ have lots of items, is to simply append() or insert() them and
+ then use sort(). inSort() takes up to O(n) compares. That means
+ inserting n items in your list will need O(n^2) compares whereas
+ sort() only needs O(n*log n) for the same task. So use inSort()
+ only if you already have a presorted list and want to insert just
+ a few additional items.
+
+ \sa insert(), compareItems(), current(), sort()
+*/
+
+/*!
+ \fn void Q3PtrList::append( const type *item )
+
+ Inserts the \a item at the end of the list.
+
+ The inserted item becomes the current list item. This is
+ equivalent to \c{insert( count(), item )}.
+
+ \a item must not be 0.
+
+ \sa insert(), current(), prepend()
+*/
+
+/*!
+ \fn void Q3PtrList::prepend( const type *item )
+
+ Inserts the \a item at the start of the list.
+
+ The inserted item becomes the current list item. This is
+ equivalent to \c{insert( 0, item )}.
+
+ \a item must not be 0.
+
+ \sa append(), insert(), current()
+*/
+
+/*!
+ \fn bool Q3PtrList::remove( uint index )
+
+ Removes the item at position \a index in the list.
+
+ Returns TRUE if successful, i.e. if \a index is in range;
+ otherwise returns FALSE. The valid range is \c{0..(count() - 1)}
+ inclusive.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa take(), clear(), setAutoDelete(), current() removeRef()
+*/
+
+/*!
+ \fn bool Q3PtrList::remove()
+
+ \overload
+
+ Removes the current list item.
+
+ Returns TRUE if successful, i.e. if the current item isn't 0;
+ otherwise returns FALSE.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa take(), clear(), setAutoDelete(), current() removeRef()
+*/
+
+/*!
+ \fn bool Q3PtrList::remove( const type *item )
+
+ \overload
+
+ Removes the first occurrence of \a item from the list.
+
+ Returns TRUE if successful, i.e. if \a item is in the list;
+ otherwise returns FALSE.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The compareItems() function is called when searching for the item
+ in the list. If compareItems() is not reimplemented, it is more
+ efficient to call removeRef().
+
+ If \a item is NULL then the current item is removed from the list.
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa removeRef(), take(), clear(), setAutoDelete(), compareItems(),
+ current()
+*/
+
+/*!
+ \fn bool Q3PtrList::removeRef( const type *item )
+
+ Removes the first occurrence of \a item from the list.
+
+ Returns TRUE if successful, i.e. if \a item is in the list;
+ otherwise returns FALSE.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ Equivalent to:
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 2
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa remove(), clear(), setAutoDelete(), current()
+*/
+
+/*!
+ \fn void Q3PtrList::removeNode( Q3LNode *node )
+
+ Removes the \a node from the list.
+
+ This node must exist in the list, otherwise the program may crash.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The first item in the list will become the new current list item.
+ The current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the item succeeding this item or to the preceding item if
+ the removed item was the last item.
+
+ \warning Do not call this function unless you are an expert.
+
+ \sa takeNode(), currentNode() remove() removeRef()
+*/
+
+/*!
+ \fn bool Q3PtrList::removeFirst()
+
+ Removes the first item from the list. Returns TRUE if successful,
+ i.e. if the list isn't empty; otherwise returns FALSE.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The first item in the list becomes the new current list item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa removeLast(), setAutoDelete(), current() remove()
+*/
+
+/*!
+ \fn bool Q3PtrList::removeLast()
+
+ Removes the last item from the list. Returns TRUE if successful,
+ i.e. if the list isn't empty; otherwise returns FALSE.
+
+ The removed item is deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ The last item in the list becomes the new current list item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the removed item will be set to
+ point to the new current item.
+
+ \sa removeFirst(), setAutoDelete(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::take( uint index )
+
+ Takes the item at position \a index out of the list without
+ deleting it (even if \link setAutoDelete() auto-deletion\endlink
+ is enabled).
+
+ Returns a pointer to the item taken out of the list, or 0 if the
+ index is out of range. The valid range is \c{0..(count() - 1)}
+ inclusive.
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the taken item will be set to
+ point to the new current item.
+
+ \sa remove(), clear(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::take()
+
+ \overload
+
+ Takes the current item out of the list without deleting it (even
+ if \link setAutoDelete() auto-deletion\endlink is enabled).
+
+ Returns a pointer to the item taken out of the list, or 0 if
+ the current item is 0.
+
+ The item after the removed item becomes the new current list item
+ if the removed item is not the last item in the list. If the last
+ item is removed, the new last item becomes the current item. The
+ current item is set to 0 if the list becomes empty.
+
+ All list iterators that refer to the taken item will be set to
+ point to the new current item.
+
+ \sa remove(), clear(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::takeNode( Q3LNode *node )
+
+ Takes the \a node out of the list without deleting its item (even
+ if \link setAutoDelete() auto-deletion\endlink is enabled).
+ Returns a pointer to the item taken out of the list.
+
+ This node must exist in the list, otherwise the program may crash.
+
+ The first item in the list becomes the new current list item.
+
+ All list iterators that refer to the taken item will be set to
+ point to the item succeeding this item or to the preceding item if
+ the taken item was the last item.
+
+ \warning Do not call this function unless you are an expert.
+
+ \sa removeNode(), currentNode()
+*/
+
+/*!
+ \fn void Q3PtrList::clear()
+
+ Removes all items from the list.
+
+ The removed items are deleted if \link setAutoDelete()
+ auto-deletion\endlink is enabled.
+
+ All list iterators that access this list will be reset.
+
+ \sa remove(), take(), setAutoDelete()
+*/
+
+/*!
+ \fn int Q3PtrList::find( const type *item )
+
+ Finds the first occurrence of \a item in the list.
+
+ If the item is found, the list sets the current item to point to
+ the found item and returns the index of this item. If the item is
+ not found, the list sets the current item to 0, the current
+ index to -1, and returns -1.
+
+ The compareItems() function is called when searching for the item
+ in the list. If compareItems() is not reimplemented, it is more
+ efficient to call findRef().
+
+ \sa findNext(), findRef(), compareItems(), current()
+*/
+
+/*!
+ \fn int Q3PtrList::findNext( const type *item )
+
+ Finds the next occurrence of \a item in the list, starting from
+ the current list item.
+
+ If the item is found, the list sets the current item to point to
+ the found item and returns the index of this item. If the item is
+ not found, the list sets the current item to 0, the current
+ index to -1, and returns -1.
+
+ The compareItems() function is called when searching for the item
+ in the list. If compareItems() is not reimplemented, it is more
+ efficient to call findNextRef().
+
+ \sa find(), findNextRef(), compareItems(), current()
+*/
+
+/*!
+ \fn int Q3PtrList::findRef( const type *item )
+
+ Finds the first occurrence of \a item in the list.
+
+ If the item is found, the list sets the current item to point to
+ the found item and returns the index of this item. If the item is
+ not found, the list sets the current item to 0, the current
+ index to -1, and returns -1.
+
+ Calling this function is much faster than find() because find()
+ compares \a item with each list item using compareItems(), whereas
+ this function only compares the pointers.
+
+ \sa findNextRef(), find(), current()
+*/
+
+/*!
+ \fn int Q3PtrList::findNextRef( const type *item )
+
+ Finds the next occurrence of \a item in the list, starting from
+ the current list item.
+
+ If the item is found, the list sets the current item to point to
+ the found item and returns the index of this item. If the item is
+ not found, the list sets the current item to 0, the current
+ index to -1, and returns -1.
+
+ Calling this function is much faster than findNext() because
+ findNext() compares \a item with each list item using
+ compareItems(), whereas this function only compares the pointers.
+
+ \sa findRef(), findNext(), current()
+*/
+
+/*!
+ \fn uint Q3PtrList::contains( const type *item ) const
+
+ Returns the number of occurrences of \a item in the list.
+
+ The compareItems() function is called when looking for the \a item
+ in the list. If compareItems() is not reimplemented, it is more
+ efficient to call containsRef().
+
+ This function does not affect the current list item.
+
+ \sa containsRef(), compareItems()
+*/
+
+/*!
+ \fn uint Q3PtrList::containsRef( const type *item ) const
+
+ Returns the number of occurrences of \a item in the list.
+
+ Calling this function is much faster than contains() because
+ contains() compares \a item with each list item using
+ compareItems(), whereas his function only compares the pointers.
+
+ This function does not affect the current list item.
+
+ \sa contains()
+*/
+
+/*!
+ \fn type *Q3PtrList::at( uint index )
+
+ Returns a pointer to the item at position \a index in the list, or
+ 0 if the index is out of range.
+
+ Sets the current list item to this item if \a index is valid. The
+ valid range is \c{0..(count() - 1)} inclusive.
+
+ This function is very efficient. It starts scanning from the first
+ item, last item, or current item, whichever is closest to \a
+ index.
+
+ \sa current()
+*/
+
+/*!
+ \fn int Q3PtrList::at() const
+
+ \overload
+
+ Returns the index of the current list item. The returned value is
+ -1 if the current item is 0.
+
+ \sa current()
+*/
+
+/*!
+ \fn type *Q3PtrList::current() const
+
+ Returns a pointer to the current list item. The current item may
+ be 0 (implies that the current index is -1).
+
+ \sa at()
+*/
+
+/*!
+ \fn Q3LNode *Q3PtrList::currentNode() const
+
+ Returns a pointer to the current list node.
+
+ The node can be kept and removed later using removeNode(). The
+ advantage is that the item can be removed directly without
+ searching the list.
+
+ \warning Do not call this function unless you are an expert.
+
+ \sa removeNode(), takeNode(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::getFirst() const
+
+ Returns a pointer to the first item in the list, or 0 if the list
+ is empty.
+
+ This function does not affect the current list item.
+
+ \sa first(), getLast()
+*/
+
+/*!
+ \fn type *Q3PtrList::getLast() const
+
+ Returns a pointer to the last item in the list, or 0 if the list
+ is empty.
+
+ This function does not affect the current list item.
+
+ \sa last(), getFirst()
+*/
+
+/*!
+ \fn type *Q3PtrList::first()
+
+ Returns a pointer to the first item in the list and makes this the
+ current list item; returns 0 if the list is empty.
+
+ \sa getFirst(), last(), next(), prev(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::last()
+
+ Returns a pointer to the last item in the list and makes this the
+ current list item; returns 0 if the list is empty.
+
+ \sa getLast(), first(), next(), prev(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::next()
+
+ Returns a pointer to the item succeeding the current item. Returns
+ 0 if the current item is 0 or equal to the last item.
+
+ Makes the succeeding item current. If the current item before this
+ function call was the last item, the current item will be set to
+ 0. If the current item was 0, this function does nothing.
+
+ \sa first(), last(), prev(), current()
+*/
+
+/*!
+ \fn type *Q3PtrList::prev()
+
+ Returns a pointer to the item preceding the current item. Returns
+ 0 if the current item is 0 or equal to the first item.
+
+ Makes the preceding item current. If the current item before this
+ function call was the first item, the current item will be set to
+ 0. If the current item was 0, this function does nothing.
+
+ \sa first(), last(), next(), current()
+*/
+
+/*!
+ \fn void Q3PtrList::toVector( Q3GVector *vec ) const
+
+ Stores all list items in the vector \a vec.
+
+ The vector must be of the same item type, otherwise the result
+ will be undefined.
+*/
+
+/*!
+ \typedef Q3PtrList::iterator
+
+ \internal
+*/
+
+/*!
+ \typedef Q3PtrList::Iterator
+
+ \internal
+*/
+
+/*!
+ \typedef Q3PtrList::ConstIterator
+
+ \internal
+*/
+
+/*!
+ \typedef Q3PtrList::const_iterator
+
+ \internal
+*/
+
+/*!
+ \fn Q3PtrList::constBegin() const
+
+ \internal
+*/
+
+/*!
+ \fn Q3PtrList::constEnd() const
+
+ \internal
+*/
+
+/*!
+ \fn Q3PtrList::erase(Iterator)
+
+ \internal
+*/
+
+
+/*****************************************************************************
+ Q3PtrListIterator documentation
+ *****************************************************************************/
+
+/*!
+ \class Q3PtrListIterator
+ \brief The Q3PtrListIterator class provides an iterator for
+ Q3PtrList collections.
+ \compat
+
+ Define a template instance Q3PtrListIterator\<X\> to create a list
+ iterator that operates on Q3PtrList\<X\> (list of X*).
+
+ The following example is similar to the
+ example in the Q3PtrList class documentation,
+ but it uses Q3PtrListIterator. The class Employee is
+ defined there.
+
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 3
+
+ The output is
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 4
+
+ Using a list iterator is a more robust way of traversing the list
+ than using the Q3PtrList member functions \link Q3PtrList::first()
+ first\endlink(), \link Q3PtrList::next() next\endlink(), \link
+ Q3PtrList::current() current\endlink(), etc., as many iterators can
+ traverse the same list independently.
+
+ An iterator has its own current list item and can get the next and
+ previous list items. It doesn't modify the list in any way.
+
+ When an item is removed from the list, all iterators that point to
+ that item are updated to point to Q3PtrList::current() instead to
+ avoid dangling references.
+
+ \sa Q3PtrList
+*/
+
+/*!
+ \fn Q3PtrListIterator::Q3PtrListIterator( const Q3PtrList<type> &list )
+
+ Constructs an iterator for \a list. The current iterator item is
+ set to point on the first item in the \a list.
+*/
+
+/*!
+ \fn Q3PtrListIterator::~Q3PtrListIterator()
+
+ Destroys the iterator.
+*/
+
+/*!
+ \fn uint Q3PtrListIterator::count() const
+
+ Returns the number of items in the list this iterator operates on.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn bool Q3PtrListIterator::isEmpty() const
+
+ Returns TRUE if the list is empty; otherwise returns FALSE.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3PtrListIterator::atFirst() const
+
+ Returns TRUE if the current iterator item is the first list item;
+ otherwise returns FALSE.
+
+ \sa toFirst(), atLast()
+*/
+
+/*!
+ \fn bool Q3PtrListIterator::atLast() const
+
+ Returns TRUE if the current iterator item is the last list item;
+ otherwise returns FALSE.
+
+ \sa toLast(), atFirst()
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::toFirst()
+
+ Sets the current iterator item to point to the first list item and
+ returns a pointer to the item. Sets the current item to 0 and
+ returns 0 if the list is empty.
+
+ \sa toLast(), atFirst()
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::toLast()
+
+ Sets the current iterator item to point to the last list item and
+ returns a pointer to the item. Sets the current item to 0 and
+ returns 0 if the list is empty.
+
+ \sa toFirst(), atLast()
+*/
+
+/*!
+ \fn Q3PtrListIterator::operator type *() const
+
+ Cast operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator*()
+
+ Asterisk operator. Returns a pointer to the current iterator item.
+ Same as current().
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::current() const
+
+ Returns a pointer to the current iterator item. If the iterator is
+ positioned before the first item in the list or after the last
+ item in the list, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator()()
+
+ Makes the succeeding item current and returns the original current
+ item.
+
+ If the current iterator item was the last item in the list or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator++()
+
+ Prefix ++ makes the succeeding item current and returns the new
+ current item.
+
+ If the current iterator item was the last item in the list or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator+=( uint jump )
+
+ Sets the current item to the item \a jump positions after the
+ current item and returns a pointer to that item.
+
+ If that item is beyond the last item or if the list is empty, it
+ sets the current item to 0 and returns 0
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator--()
+
+ Prefix - makes the preceding item current and returns the new
+ current item.
+
+ If the current iterator item was the first item in the list or if
+ it was 0, 0 is returned.
+*/
+
+/*!
+ \fn type *Q3PtrListIterator::operator-=( uint jump )
+
+ Returns the item \a jump positions before the current item or 0
+ if it is beyond the first item. Makes this the current item.
+*/
+
+/*!
+ \fn Q3PtrListIterator<type>& Q3PtrListIterator::operator=( const Q3PtrListIterator<type> &it )
+
+ Assignment. Makes a copy of the iterator \a it and returns a
+ reference to this iterator.
+*/
+
+/*!
+ \class Q3StrList
+ \brief The Q3StrList class provides a doubly-linked list of char*.
+ \compat
+
+ If you want a string list of \l{QString}s use QStringList.
+
+ This class is a Q3PtrList\<char\> instance (a list of char*).
+
+ Q3StrList can make deep or shallow copies of the strings that are
+ inserted.
+
+ A deep copy means that memory is allocated for the string and then
+ the string data is copied into that memory. A shallow copy is just
+ a copy of the pointer value and not of the string data itself.
+
+ The disadvantage of shallow copies is that because a pointer can
+ be deleted only once, the program must put all strings in a
+ central place and know when it is safe to delete them (i.e. when
+ the strings are no longer referenced by other parts of the
+ program). This can make the program more complex. The advantage of
+ shallow copies is that they consume far less memory than deep
+ copies. It is also much faster to copy a pointer (typically 4 or 8
+ bytes) than to copy string data.
+
+ A Q3StrList that operates on deep copies will, by default, turn on
+ auto-deletion (see setAutoDelete()). Thus, by default Q3StrList
+ will deallocate any string copies it allocates.
+
+ The virtual compareItems() function is reimplemented and does a
+ case-sensitive string comparison. The inSort() function will
+ insert strings in sorted order. In general it is fastest to insert
+ the strings as they come and sort() at the end; inSort() is useful
+ when you just have to add a few extra strings to an already sorted
+ list.
+
+ The Q3StrListIterator class is an iterator for Q3StrList.
+*/
+
+/*!
+ \fn Q3StrList::operator QList<QByteArray>() const
+
+ Automatically converts a Q3StrList into a QList<QByteArray>.
+*/
+
+/*!
+ \fn Q3StrList::Q3StrList( bool deepCopies )
+
+ Constructs an empty list of strings. Will make deep copies of all
+ inserted strings if \a deepCopies is TRUE, or use shallow copies
+ if \a deepCopies is FALSE.
+*/
+
+/*!
+ \fn Q3StrList::Q3StrList(const Q3StrList &list)
+ \fn Q3StrList::Q3StrList(const QList<QByteArray> &list)
+
+ Constructs a copy of \a list.
+*/
+
+/*!
+ \fn Q3StrList::~Q3StrList()
+
+ Destroys the list. All strings are removed.
+*/
+
+/*!
+ \fn Q3StrList& Q3StrList::operator=(const Q3StrList& list)
+ \fn Q3StrList &Q3StrList::operator=(const QList<QByteArray> &list)
+
+ Assigns \a list to this list and returns a reference to this list.
+*/
+
+/*!
+ \class Q3StrIList
+ \brief The Q3StrIList class provides a doubly-linked list of char*
+ with case-insensitive comparison.
+ \compat
+
+ This class is a Q3PtrList\<char\> instance (a list of char*).
+
+ Q3StrIList is identical to Q3StrList except that the virtual
+ compareItems() function is reimplemented to compare strings
+ case-insensitively. The inSort() function inserts strings in a
+ sorted order. In general it is fastest to insert the strings as
+ they come and sort() at the end; inSort() is useful when you just
+ have to add a few extra strings to an already sorted list.
+
+ The Q3StrListIterator class works for Q3StrIList.
+
+ \sa QStringList
+*/
+
+/*!
+ \fn Q3StrIList::Q3StrIList( bool deepCopies )
+
+ Constructs a list of strings. Will make deep copies of all
+ inserted strings if \a deepCopies is TRUE, or use shallow copies
+ if \a deepCopies is FALSE.
+*/
+
+/*!
+ \fn Q3StrIList::~Q3StrIList()
+
+ Destroys the list. All strings are removed.
+*/
+
+/*!
+ \fn int Q3PtrList::compareItems( Q3PtrCollection::Item item1,
+ Q3PtrCollection::Item item2 )
+
+ This virtual function compares two list items.
+
+ Returns:
+ \list
+ \i zero if \a item1 == \a item2
+ \i nonzero if \a item1 != \a item2
+ \endlist
+
+ This function returns \e int rather than \e bool so that
+ reimplementations can return three values and use it to sort by:
+
+ \list
+ \i 0 if \a item1 == \a item2
+ \i \> 0 (positive integer) if \a item1 \> \a item2
+ \i \< 0 (negative integer) if \a item1 \< \a item2
+ \endlist
+
+ inSort() requires that compareItems() is implemented as described
+ here.
+
+ This function should not modify the list because some const
+ functions call compareItems().
+
+ The default implementation compares the pointers.
+*/
+
+/*!
+ \fn QDataStream& Q3PtrList::read( QDataStream& s,
+ Q3PtrCollection::Item& item )
+
+ Reads a list item from the stream \a s and returns a reference to
+ the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrList::write( QDataStream& s,
+ Q3PtrCollection::Item item ) const
+
+ Writes a list item, \a item to the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation does nothing.
+
+ \sa read()
+*/
+
+/*! \fn iterator Q3PtrList::begin()
+\internal
+*/
+/*! \fn const_iterator Q3PtrList::begin() const
+\internal
+*/
+/*! \fn iterator Q3PtrList::end()
+\internal
+*/
+/*! \fn const_iterator Q3PtrList::end() const
+\internal
+*/
+
+/*!
+ \class Q3StrListIterator
+ \brief The Q3StrListIterator class is an iterator for the Q3StrList
+ and Q3StrIList classes.
+ \compat
+
+ This class is a Q3PtrListIterator\<char\> instance. It can traverse
+ the strings in the Q3StrList and Q3StrIList classes.
+*/
+
+
+/*
+ \class Q3PtrListAutoDelete
+ \brief The Q3PtrListAutoDelete class is a template class that provides a list that auto-deletes its data.
+ \compat
+
+ A Q3PtrListAutoDelete is identical to a Q3PtrList with
+ setAutoDelete(TRUE).
+*/
diff --git a/doc/src/q3ptrqueue.qdoc b/doc/src/q3ptrqueue.qdoc
new file mode 100644
index 0000000..8a3ef22
--- /dev/null
+++ b/doc/src/q3ptrqueue.qdoc
@@ -0,0 +1,230 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PtrQueue
+ \brief The Q3PtrQueue class is a template class that provides a queue.
+ \compat
+
+ Q3ValueVector can be used as an STL-compatible alternative to this
+ class.
+
+ A template instance Q3PtrQueue\<X\> is a queue that operates on
+ pointers to X (X*).
+
+ A queue is a first in, first out structure. Items are added to the
+ tail of the queue with enqueue() and retrieved from the head with
+ dequeue(). You can peek at the head item without dequeing it using
+ head().
+
+ You can control the queue's deletion policy with setAutoDelete().
+
+ For compatibility with the Q3PtrCollection classes, current() and
+ remove() are provided; both operate on the head().
+
+ \sa Q3PtrList Q3PtrStack
+*/
+
+/*!
+ \fn Q3PtrQueue::Q3PtrQueue ()
+
+ Creates an empty queue with autoDelete() set to FALSE.
+*/
+
+/*!
+ \fn Q3PtrQueue::Q3PtrQueue( const Q3PtrQueue<type>& queue )
+
+ Creates a queue from \a queue.
+
+ Only the pointers are copied; the items are not. The autoDelete()
+ flag is set to FALSE.
+*/
+
+/*!
+ \fn Q3PtrQueue::~Q3PtrQueue()
+
+ Destroys the queue. Items in the queue are deleted if autoDelete()
+ is TRUE.
+*/
+
+/*!
+ \fn Q3PtrQueue<type>& Q3PtrQueue::operator= (const Q3PtrQueue<type>& queue)
+
+ Assigns \a queue to this queue and returns a reference to this
+ queue.
+
+ This queue is first cleared and then each item in \a queue is
+ enqueued to this queue. Only the pointers are copied.
+
+ \warning The autoDelete() flag is not modified. If it is TRUE for
+ both \a queue and this queue, deleting the two lists will cause \e
+ double-deletion of the items.
+*/
+
+/*!
+ \fn bool Q3PtrQueue::isEmpty() const
+
+ Returns TRUE if the queue is empty; otherwise returns FALSE.
+
+ \sa count() dequeue() head()
+*/
+
+/*!
+ \fn void Q3PtrQueue::enqueue (const type* d)
+
+ Adds item \a d to the tail of the queue.
+
+ \sa count() dequeue()
+*/
+
+/*!
+ \fn type* Q3PtrQueue::dequeue ()
+
+ Takes the head item from the queue and returns a pointer to it.
+ Returns 0 if the queue is empty.
+
+ \sa enqueue() count()
+*/
+
+/*!
+ \fn bool Q3PtrQueue::remove()
+
+ Removes the head item from the queue, and returns TRUE if there
+ was an item, i.e. the queue wasn't empty; otherwise returns FALSE.
+
+ The item is deleted if autoDelete() is TRUE.
+
+ \sa head() isEmpty() dequeue()
+*/
+
+/*!
+ \fn void Q3PtrQueue::clear()
+
+ Removes all items from the queue, and deletes them if autoDelete()
+ is TRUE.
+
+ \sa remove()
+*/
+
+/*!
+ \fn uint Q3PtrQueue::count() const
+
+ Returns the number of items in the queue.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn type* Q3PtrQueue::head() const
+
+ Returns a pointer to the head item in the queue. The queue is not
+ changed. Returns 0 if the queue is empty.
+
+ \sa dequeue() isEmpty()
+*/
+
+/*!
+ \fn Q3PtrQueue::operator type*() const
+
+ Returns a pointer to the head item in the queue. The queue is not
+ changed. Returns 0 if the queue is empty.
+
+ \sa dequeue() isEmpty()
+*/
+
+/*!
+ \fn type* Q3PtrQueue::current() const
+
+ Returns a pointer to the head item in the queue. The queue is not
+ changed. Returns 0 if the queue is empty.
+
+ \sa dequeue() isEmpty()
+*/
+
+/*!
+ \fn bool Q3PtrQueue::autoDelete() const
+
+ Returns the setting of the auto-delete option. The default is
+ FALSE.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn void Q3PtrQueue::setAutoDelete( bool enable )
+
+ Sets the queue to auto-delete its contents if \a enable is TRUE
+ and not to delete them if \a enable is FALSE.
+
+ If auto-deleting is turned on, all the items in a queue are
+ deleted when the queue itself is deleted. This can be quite
+ convenient if the queue has the only pointer to the items.
+
+ The default setting is FALSE, for safety. If you turn it on, be
+ careful about copying the queue: you might find yourself with two
+ queues deleting the same items.
+
+ \sa autoDelete()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrQueue::read( QDataStream& s,
+ Q3PtrCollection::Item& item )
+
+ Reads a queue item, \a item, from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrQueue::write( QDataStream& s,
+ Q3PtrCollection::Item item ) const
+
+ Writes a queue item, \a item, to the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation does nothing.
+
+ \sa read()
+*/
diff --git a/doc/src/q3ptrstack.qdoc b/doc/src/q3ptrstack.qdoc
new file mode 100644
index 0000000..fcece9f
--- /dev/null
+++ b/doc/src/q3ptrstack.qdoc
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PtrStack
+ \brief The Q3PtrStack class is a template class that provides a stack.
+ \compat
+
+ Q3ValueStack is an STL-compatible alternative to this class.
+
+ Define a template instance Q3PtrStack\<X\> to create a stack that
+ operates on pointers to X, (X*).
+
+ A stack is a last in, first out (LIFO) structure. Items are added
+ to the top of the stack with push() and retrieved from the top
+ with pop(). Use top() to get a reference to the top element
+ without changing the stack.
+
+ You can control the stack's deletion policy with setAutoDelete().
+
+ For compatibility with the Q3PtrCollection classes current() and
+ remove() are provided; they both operate on the top().
+
+ \sa Q3PtrList Q3PtrQueue
+*/
+
+/*!
+ \fn Q3PtrStack::Q3PtrStack ()
+
+ Creates an empty stack.
+*/
+
+/*!
+ \fn Q3PtrStack::Q3PtrStack (const Q3PtrStack<type>& s)
+
+ Creates a stack by making a shallow copy of another stack \a s.
+*/
+
+/*!
+ \fn Q3PtrStack::~Q3PtrStack ()
+
+ Destroys the stack. All items will be deleted if autoDelete() is
+ true.
+*/
+
+/*!
+ \fn Q3PtrStack<type>& Q3PtrStack::operator= (const Q3PtrStack<type>& s)
+
+ Sets the contents of this stack by making a shallow copy of
+ another stack \a s. Elements currently in this stack will be
+ deleted if autoDelete() is true.
+*/
+
+/*!
+ \fn bool Q3PtrStack::isEmpty () const
+
+ Returns true if the stack contains no elements; otherwise returns
+ false.
+*/
+
+/*!
+ \fn void Q3PtrStack::push (const type* d)
+
+ Adds an element \a d to the top of the stack. Last in, first out.
+*/
+
+/*!
+ \fn type* Q3PtrStack::pop ()
+
+ Removes the top item from the stack and returns it. The stack must
+ not be empty.
+*/
+
+/*!
+ \fn bool Q3PtrStack::remove ()
+
+ Removes the top item from the stack and deletes it if autoDelete()
+ is true. Returns true if there was an item to pop; otherwise
+ returns false.
+
+ \sa clear()
+*/
+
+/*!
+ \fn void Q3PtrStack::clear()
+
+ Removes all items from the stack, deleting them if autoDelete() is
+ true.
+
+ \sa remove()
+*/
+
+/*!
+ \fn uint Q3PtrStack::count() const
+
+ Returns the number of items in the stack.
+
+ \sa isEmpty()
+*/
+
+/*!
+ \fn type* Q3PtrStack::top () const
+
+ Returns a pointer to the top item on the stack (most recently
+ pushed). The stack is not changed. Returns 0 if the stack is
+ empty.
+*/
+
+/*!
+ \fn Q3PtrStack::operator type* ()const
+
+ Returns a pointer to the top item on the stack (most recently
+ pushed). The stack is not changed. Returns 0 if the stack is
+ empty.
+*/
+
+/*!
+ \fn type* Q3PtrStack::current () const
+
+ Returns a pointer to the top item on the stack (most recently
+ pushed). The stack is not changed. Returns 0 if the stack is
+ empty.
+*/
+
+/*!
+ \fn bool Q3PtrStack::autoDelete() const
+
+ The same as Q3PtrCollection::autoDelete(). Returns true if
+ the auto-delete option is set. If the option is set, the
+ stack auto-deletes its contents.
+
+ \sa setAutoDelete()
+*/
+
+/*!
+ \fn void Q3PtrStack::setAutoDelete(bool enable)
+
+ Defines whether this stack auto-deletes its contents. The same as
+ Q3PtrCollection::setAutoDelete(). If \a enable is true, auto-delete
+ is turned on.
+
+ If auto-deleting is turned on, all the items in the stack are
+ deleted when the stack itself is deleted. This is convenient if
+ the stack has the only pointers to the items.
+
+ The default setting is false, for safety. If you turn it on, be
+ careful about copying the stack, or you might find yourself with
+ two stacks deleting the same items.
+
+ Note that the auto-delete setting may also affect other functions in
+ subclasses. For example, a subclass that has a remove() function
+ will remove the item from its data structure, and if auto-delete is
+ enabled, will also delete the item.
+
+ \sa autoDelete()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrStack::read(QDataStream& s, Q3PtrCollection::Item& item)
+
+ Reads a stack item, \a item, from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrStack::write(QDataStream& s,
+ Q3PtrCollection::Item item) const
+
+ Writes a stack item, \a item, to the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation does nothing.
+
+ \sa read()
+*/
diff --git a/doc/src/q3ptrvector.qdoc b/doc/src/q3ptrvector.qdoc
new file mode 100644
index 0000000..b539219
--- /dev/null
+++ b/doc/src/q3ptrvector.qdoc
@@ -0,0 +1,427 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3PtrVector
+ \brief The Q3PtrVector class is a template collection class that
+ provides a vector (array).
+ \compat
+
+ Q3ValueVector is an STL-compatible alternative to this class.
+
+ Q3PtrVector is implemented as a template class. Defines a template
+ instance Q3PtrVector\<X\> to create a vector that contains pointers
+ to X (X*).
+
+ A vector is the same as an array. The main difference between
+ Q3PtrVector and Q3MemArray is that Q3PtrVector stores pointers to the
+ elements, whereas Q3MemArray stores the elements themselves (i.e.
+ Q3MemArray is value-based and Q3PtrVector is pointer-based).
+
+ Items are added to the vector using insert() or fill(). Items are
+ removed with remove(). You can get a pointer to an item at a
+ particular index position using at().
+
+ Unless otherwise stated, all functions that remove items from the
+ vector will also delete the element pointed to if \link
+ setAutoDelete() auto-deletion\endlink is enabled. By default,
+ auto-deletion is disabled; see setAutoDelete(). This behavior can
+ be changed in a subclass by reimplementing the virtual function
+ deleteItem().
+
+ Functions that compare items (find() and sort() for example) will
+ do so using the virtual function compareItems(). The default
+ implementation of this function only compares the pointer values.
+ Reimplement compareItems() in a subclass to get searching and
+ sorting based on the item contents. You can perform a linear
+ search for a pointer in the vector using findRef(), or a binary
+ search (of a sorted vector) using bsearch(). You can count the
+ number of times an item appears in the vector with contains() or
+ containsRef().
+
+ \sa Q3MemArray
+*/
+
+/*!
+ \fn Q3PtrVector::Q3PtrVector()
+
+ Constructs a null vector.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn Q3PtrVector::Q3PtrVector(uint size)
+
+ Constructs an vector with room for \a size items. Makes a null
+ vector if \a size == 0.
+
+ All \a size positions in the vector are initialized to 0.
+
+ \sa size(), resize(), isNull()
+*/
+
+/*!
+ \fn Q3PtrVector::Q3PtrVector(const Q3PtrVector<type> &v)
+
+ Constructs a copy of \a v. Only the pointers are copied (i.e.
+ shallow copy).
+*/
+
+/*!
+ \fn Q3PtrVector::~Q3PtrVector()
+
+ Removes all items from the vector, and destroys the vector itself.
+
+ \sa clear()
+*/
+
+/*!
+ \fn Q3PtrVector<type> &Q3PtrVector::operator=(const Q3PtrVector<type> &v)
+
+ Assigns \a v to this vector and returns a reference to this
+ vector.
+
+ This vector is first cleared and then all the items from \a v are
+ copied into the vector. Only the pointers are copied (i.e. shallow
+ copy).
+
+ \sa clear()
+*/
+
+/*!
+ \fn type **Q3PtrVector::data() const
+
+ Returns a pointer to the actual vector data, which is an array of
+ type*.
+
+ The vector is a null vector if data() == 0 (null pointer).
+
+ \sa isNull()
+*/
+
+/*!
+ \fn uint Q3PtrVector::size() const
+
+ Returns the size of the vector, i.e. the number of vector
+ positions. This is also the maximum number of items the vector can
+ hold.
+
+ The vector is a null vector if size() == 0.
+
+ \sa isNull(), resize(), count()
+*/
+
+/*!
+ \fn uint Q3PtrVector::count() const
+
+ Returns the number of items in the vector. The vector is empty if
+ count() == 0.
+
+ \sa isEmpty(), size(), isNull()
+*/
+
+/*!
+ \fn bool Q3PtrVector::isEmpty() const
+
+ Returns true if the vector is empty; otherwise returns false.
+
+ \sa count()
+*/
+
+/*!
+ \fn bool Q3PtrVector::isNull() const
+
+ Returns true if the vector is null; otherwise returns false.
+
+ A null vector has size() == 0 and data() == 0.
+
+ \sa size()
+*/
+
+/*!
+ \fn bool Q3PtrVector::resize(uint size)
+
+ Resizes (expands or shrinks) the vector to \a size elements. The
+ vector becomes a null vector if \a size == 0.
+
+ Any items at position \a size or beyond in the vector are removed.
+ New positions are initialized to 0.
+
+ Returns true if successful, i.e. if the memory was successfully
+ allocated; otherwise returns false.
+
+ \sa size(), isNull()
+*/
+
+/*!
+ \fn bool Q3PtrVector::insert(uint i, const type *d)
+
+ Sets position \a i in the vector to contain the item \a d. \a i
+ must be less than size(). Any previous element in position \a i is
+ removed.
+
+ Returns true if \a i is within range; otherwise returns false.
+
+ \sa at()
+*/
+
+/*!
+ \fn bool Q3PtrVector::remove(uint i)
+
+ Removes the item at position \a i in the vector, if there is one.
+ \a i must be less than size().
+
+ Returns true if \a i is within range; otherwise returns false.
+
+ \sa take(), at()
+*/
+
+/*!
+ \fn type* Q3PtrVector::take(uint i)
+
+ Returns the item at position \a i in the vector, and removes that
+ item from the vector. \a i must be less than size(). If there is
+ no item at position \a i, 0 is returned.
+
+ Unlike remove(), this function does \e not call deleteItem() for
+ the removed item.
+
+ \sa remove(), at()
+*/
+
+/*!
+ \fn void Q3PtrVector::clear()
+
+ Removes all items from the vector, and destroys the vector itself.
+
+ The vector becomes a null vector.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn bool Q3PtrVector::fill(const type *d, int size)
+
+ Inserts item \a d in all positions in the vector. Any existing
+ items are removed. If \a d is 0, the vector becomes empty.
+
+ If \a size >= 0, the vector is first resized to \a size. By
+ default, \a size is -1.
+
+ Returns true if successful, i.e. \a size is the same as the
+ current size, or \a size is larger and the memory has successfully
+ been allocated; otherwise returns false.
+
+ \sa resize(), insert(), isEmpty()
+*/
+
+/*!
+ \fn void Q3PtrVector::sort()
+
+ Sorts the items in ascending order. Any empty positions will be
+ put last.
+
+ Compares items using the virtual function compareItems().
+
+ \sa bsearch()
+*/
+
+/*!
+ \fn int Q3PtrVector::bsearch(const type* d) const
+
+ In a sorted array, finds the first occurrence of \a d using a
+ binary search. For a sorted array, this is generally much faster
+ than find(), which performs a linear search.
+
+ Returns the position of \a d, or -1 if \a d could not be found. \a
+ d must not be 0.
+
+ Compares items using the virtual function compareItems().
+
+ \sa sort(), find()
+*/
+
+
+/*!
+ \fn int Q3PtrVector::findRef(const type *d, uint i) const
+
+ Finds the first occurrence of the item pointer \a d in the vector
+ using a linear search. The search starts at position \a i, which
+ must be less than size(). \a i is by default 0; i.e. the search
+ starts at the start of the vector.
+
+ Returns the position of \a d, or -1 if \a d could not be found.
+
+ This function does \e not use compareItems() to compare items.
+
+ Use the much faster bsearch() to search a sorted vector.
+
+ \sa find(), bsearch()
+*/
+
+/*!
+ \fn int Q3PtrVector::find(const type *d, uint i) const
+
+ Finds the first occurrence of item \a d in the vector using a
+ linear search. The search starts at position \a i, which must be
+ less than size(). \a i is by default 0; i.e. the search starts at
+ the start of the vector.
+
+ Returns the position of \a d, or -1 if \a d could not be found.
+
+ Compares items using the virtual function compareItems().
+
+ Use the much faster bsearch() to search a sorted vector.
+
+ \sa findRef(), bsearch()
+*/
+
+
+/*!
+ \fn uint Q3PtrVector::containsRef(const type *d) const
+
+ Returns the number of occurrences of the item pointer \a d in the
+ vector.
+
+ This function does \e not use compareItems() to compare items.
+
+ \sa findRef()
+*/
+
+/*!
+ \fn uint Q3PtrVector::contains(const type *d) const
+
+ Returns the number of occurrences of item \a d in the vector.
+
+ Compares items using the virtual function compareItems().
+
+ \sa containsRef()
+*/
+
+/*!
+ \fn type *Q3PtrVector::operator[](int i) const
+
+ Returns the item at position \a i, or 0 if there is no item at
+ that position. \a i must be less than size().
+
+ Equivalent to at(\a i).
+
+ \sa at()
+*/
+
+/*!
+ \fn type *Q3PtrVector::at(uint i) const
+
+ Returns the item at position \a i, or 0 if there is no item at
+ that position. \a i must be less than size().
+*/
+
+
+/*!
+ \fn void Q3PtrVector::toList(Q3GList *list) const
+
+ \internal
+
+ Copies all items in this vector to the list \a list. \a list is
+ first cleared and then all items are appended to \a list.
+
+ \sa Q3PtrList, Q3PtrStack, Q3PtrQueue
+*/
+
+/*!
+ \fn int Q3PtrVector::compareItems(Q3PtrCollection::Item d1,
+ Q3PtrCollection::Item d2)
+
+ This virtual function compares two list items.
+
+ Returns:
+ \list
+ \i zero if \a d1 == \a d2
+ \i nonzero if \a d1 != \a d2
+ \endlist
+
+ This function returns \e int rather than \e bool so that
+ reimplementations can return one of three values and use it to
+ sort by:
+ \list
+ \i 0 if \a d1 == \a d2
+ \i \> 0 (positive integer) if \a d1 \> \a d2
+ \i \< 0 (negative integer) if \a d1 \< \a d2
+ \endlist
+
+ The sort() and bsearch() functions require compareItems() to be
+ implemented as described here.
+
+ This function should not modify the vector because some const
+ functions call compareItems().
+*/
+
+/*!
+ \fn QDataStream& Q3PtrVector::read(QDataStream &s,
+ Q3PtrCollection::Item &item)
+
+ Reads a vector item, \a item, from the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation sets \a item to 0.
+
+ \sa write()
+*/
+
+/*!
+ \fn QDataStream& Q3PtrVector::write(QDataStream &s,
+ Q3PtrCollection::Item item) const
+
+ Writes a vector item, \a item, to the stream \a s and returns a
+ reference to the stream.
+
+ The default implementation does nothing.
+
+ \sa read()
+*/
+
+/*!
+ \fn bool Q3PtrVector::operator==(const Q3PtrVector<type> &v) const
+
+ Returns true if this vector and \a v are equal; otherwise returns
+ false.
+*/
diff --git a/doc/src/q3sqlfieldinfo.qdoc b/doc/src/q3sqlfieldinfo.qdoc
new file mode 100644
index 0000000..1b152c0
--- /dev/null
+++ b/doc/src/q3sqlfieldinfo.qdoc
@@ -0,0 +1,234 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3SqlFieldInfo
+ \brief The Q3SqlFieldInfo class stores meta data associated with a SQL field.
+
+ \compat
+
+ Q3SqlFieldInfo objects only store meta data; field values are
+ stored in QSqlField objects.
+
+ All values must be set in the constructor, and may be retrieved
+ using isRequired(), type(), length(), precision(), defaultValue(),
+ name(), isGenerated() and typeID().
+
+ \sa Q3SqlRecordInfo
+*/
+
+/*!
+ \fn Q3SqlFieldInfo::Q3SqlFieldInfo(const QString& name,
+ QVariant::Type typ,
+ int required,
+ int len,
+ int prec,
+ const QVariant& defValue,
+ int typeID,
+ bool generated,
+ bool trim,
+ bool calculated)
+
+ Constructs a Q3SqlFieldInfo with the following parameters:
+ \table
+ \row \i \a name \i the name of the field.
+ \row \i \a typ \i the field's type in a QVariant.
+ \row \i \a required \i greater than 0 if the field is required, 0
+ if its value can be NULL and less than 0 if it cannot be
+ determined whether the field is required or not.
+ \row \i \a len \i the length of the field. Note that for
+ non-character types some databases return either the length in
+ bytes or the number of digits. -1 signifies that the length cannot
+ be determined.
+ \row \i \a prec \i the precision of the field, or -1 if the field
+ has no precision or it cannot be determined.
+ \row \i \a defValue \i the default value that is inserted into
+ the table if none is specified by the user. QVariant() if there is
+ no default value or it cannot be determined.
+ \row \i \a typeID \i the internal typeID of the database system
+ (only useful for low-level programming). 0 if unknown.
+ \row \i \a generated \i TRUE indicates that this field should be
+ included in auto-generated SQL statments, e.g. in Q3SqlCursor.
+ \row \i \a trim \i TRUE indicates that widgets should remove
+ trailing whitespace from character fields. This does not affect
+ the field value but only its representation inside widgets.
+ \row \i \a calculated \i TRUE indicates that the value of this
+ field is calculated. The value of calculated fields can by
+ modified by subclassing Q3SqlCursor and overriding
+ Q3SqlCursor::calculateField().
+ \endtable
+*/
+
+/*!
+ \fn Q3SqlFieldInfo::~Q3SqlFieldInfo()
+
+ Destroys the object and frees any allocated resources.
+*/
+
+/*!
+ \fn Q3SqlFieldInfo::Q3SqlFieldInfo(const QSqlField & other)
+
+ Creates a Q3SqlFieldInfo object with the type and the name of the
+ QSqlField \a other.
+*/
+
+/*!
+ \fn bool Q3SqlFieldInfo::operator==(const Q3SqlFieldInfo& other) const
+
+ Assigns \a other to this field info and returns a reference to it.
+*/
+
+/*!
+ \fn QSqlField Q3SqlFieldInfo::toField() const
+
+ Returns an empty QSqlField based on the information in this
+ Q3SqlFieldInfo.
+*/
+
+/*!
+ \fn int Q3SqlFieldInfo::isRequired() const
+
+ Returns a value greater than 0 if the field is required (NULL
+ values are not allowed), 0 if it isn't required (NULL values are
+ allowed) or less than 0 if it cannot be determined whether the
+ field is required or not.
+*/
+
+/*!
+ \fn QVariant::Type Q3SqlFieldInfo::type() const
+
+ Returns the field's type or QVariant::Invalid if the type is
+ unknown.
+*/
+
+/*!
+ \fn int Q3SqlFieldInfo::length() const
+
+ Returns the field's length. For fields storing text the return
+ value is the maximum number of characters the field can hold. For
+ non-character fields some database systems return the number of
+ bytes needed or the number of digits allowed. If the length cannot
+ be determined -1 is returned.
+*/
+
+/*!
+ \fn int Q3SqlFieldInfo::precision() const
+
+ Returns the field's precision or -1 if the field has no precision
+ or it cannot be determined.
+*/
+
+/*!
+ \fn QVariant Q3SqlFieldInfo::defaultValue() const
+
+ Returns the field's default value or an empty QVariant if the
+ field has no default value or the value couldn't be determined.
+ The default value is the value inserted in the database when it
+ is not explicitly specified by the user.
+*/
+
+/*!
+ \fn QString Q3SqlFieldInfo::name() const
+
+ Returns the name of the field in the SQL table.
+*/
+
+/*!
+ \fn int Q3SqlFieldInfo::typeID() const
+
+ Returns the internal type identifier as returned from the database
+ system. The return value is 0 if the type is unknown.
+*/
+
+/*!
+ \fn bool Q3SqlFieldInfo::isGenerated() const
+
+ Returns TRUE if the field should be included in auto-generated
+ SQL statments, e.g. in Q3SqlCursor; otherwise returns FALSE.
+
+ \sa setGenerated()
+*/
+
+/*!
+ \fn bool Q3SqlFieldInfo::isTrim() const
+
+ Returns TRUE if trailing whitespace should be removed from
+ character fields; otherwise returns FALSE.
+
+ \sa setTrim()
+*/
+
+/*!
+ \fn bool Q3SqlFieldInfo::isCalculated() const
+
+ Returns TRUE if the field is calculated; otherwise returns FALSE.
+
+ \sa setCalculated()
+*/
+
+/*!
+ \fn void Q3SqlFieldInfo::setTrim(bool trim)
+
+ If \a trim is TRUE widgets should remove trailing whitespace from
+ character fields. This does not affect the field value but only
+ its representation inside widgets.
+
+ \sa isTrim()
+*/
+
+/*!
+ \fn void Q3SqlFieldInfo::setGenerated(bool generated)
+
+ \a generated set to FALSE indicates that this field should not appear
+ in auto-generated SQL statements (for example in Q3SqlCursor).
+
+ \sa isGenerated()
+*/
+
+/*!
+ \fn void Q3SqlFieldInfo::setCalculated(bool calculated)
+
+ \a calculated set to TRUE indicates that this field is a calculated
+ field. The value of calculated fields can by modified by subclassing
+ Q3SqlCursor and overriding Q3SqlCursor::calculateField().
+
+ \sa isCalculated()
+*/
diff --git a/doc/src/q3sqlrecordinfo.qdoc b/doc/src/q3sqlrecordinfo.qdoc
new file mode 100644
index 0000000..f8f6cd5
--- /dev/null
+++ b/doc/src/q3sqlrecordinfo.qdoc
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3SqlRecordInfo
+ \brief The Q3SqlRecordInfo class encapsulates a set of database field meta data.
+
+ \compat
+
+ This class is a list that holds a set of database field meta
+ data. Use contains() to see if a given field name exists in the
+ record, and use find() to get a QSqlFieldInfo record for a named
+ field.
+
+ \sa Q3SqlFieldInfo
+*/
+
+/*!
+ \fn Q3SqlRecordInfo::Q3SqlRecordInfo()
+
+ Constructs an empty record info object.
+*/
+
+/*!
+ \fn Q3SqlRecordInfo::Q3SqlRecordInfo(const Q3SqlFieldInfoList& other)
+ \fn Q3SqlRecordInfo::Q3SqlRecordInfo(const QSqlRecord& other)
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn size_type Q3SqlRecordInfo::contains(const QString& fieldName) const
+
+ Returns the number of times a field called \a fieldName occurs in
+ the record. Returns 0 if no field by that name could be found.
+*/
+
+/*!
+ \fn Q3SqlFieldInfo Q3SqlRecordInfo::find(const QString& fieldName) const
+
+ Returns a QSqlFieldInfo object for the first field in the record
+ which has the field name \a fieldName. If no matching field is
+ found then an empty QSqlFieldInfo object is returned.
+*/
+
+/*!
+ \fn QSqlRecord Q3SqlRecordInfo::toRecord() const
+
+ Returns an empty QSqlRecord based on the field information
+ in this Q3SqlRecordInfo.
+*/
diff --git a/doc/src/q3valuelist.qdoc b/doc/src/q3valuelist.qdoc
new file mode 100644
index 0000000..be315c2
--- /dev/null
+++ b/doc/src/q3valuelist.qdoc
@@ -0,0 +1,569 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3ValueList
+ \brief The Q3ValueList class is a value-based template class that
+ provides lists.
+ \compat
+
+ Q3ValueList is a Qt implementation of an STL-like list container.
+ It can be used in your application if the standard \c list is not
+ available for your target platforms.
+
+ Q3ValueList\<T\> defines a template instance to create a list of
+ values that all have the class T. Note that Q3ValueList does not
+ store pointers to the members of the list; it holds a copy of
+ every member. This is why these kinds of classes are called "value
+ based"; Q3PtrList and Q3Dict are "pointer based".
+
+ Q3ValueList contains and manages a collection of objects of type T
+ and provides iterators that allow the contained objects to be
+ addressed. Q3ValueList owns the contained items. For more relaxed
+ ownership semantics, see Q3PtrCollection and friends which are
+ pointer-based containers.
+
+ Some classes cannot be used within a Q3ValueList, for example, all
+ classes derived from QObject and thus all classes that implement
+ widgets. Only values can be used in a Q3ValueList. To qualify as a
+ value the class must provide:
+ \list
+ \i a copy constructor;
+ \i an assignment operator;
+ \i a default constructor, i.e. a constructor that does not take any arguments.
+ \endlist
+
+ Note that C++ defaults to field-by-field assignment operators and
+ copy constructors if no explicit version is supplied. In many
+ cases this is sufficient.
+
+ In addition, some compilers (e.g. Sun CC) might require that the
+ class provides an equality operator (operator==()).
+
+ Q3ValueList's function naming is consistent with the other Qt
+ classes (e.g. count(), isEmpty()). Q3ValueList also provides extra
+ functions for compatibility with STL algorithms, such as size()
+ and empty(). Programmers already familiar with the STL \c list may
+ prefer to use the STL-compatible functions.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 0
+
+
+ Notice that the latest changes to Mary's salary did not affect the
+ value in the list because the list created a copy of Mary's entry.
+
+ There are several ways to find items in the list. The begin() and
+ end() functions return iterators to the beginning and end of the
+ list. The advantage of getting an iterator is that you can move
+ forward or backward from this position by
+ incrementing/decrementing the iterator. The iterator returned by
+ end() points to the item which is one \e past the last item in the
+ container. The past-the-end iterator is still associated with the
+ list it belongs to, however it is \e not dereferenceable;
+ operator*() will not return a well-defined value. If the list is
+ empty(), the iterator returned by begin() will equal the iterator
+ returned by end().
+
+ It is safe to have multiple iterators a the list at the same
+ time. If some member of the list is removed, only iterators
+ pointing to the removed member become invalid. Inserting into the
+ list does not invalidate any iterator. For convenience, the
+ function last() returns a reference to the last item in the list,
+ and first() returns a reference to the the first item. If the
+ list is empty(), both last() and first() have undefined behavior
+ (your application will crash or do unpredictable things). Use
+ last() and first() with caution, for example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 1
+
+ Because Q3ValueList is value-based there is no need to be careful
+ about deleting items in the list. The list holds its own copies
+ and will free them if the corresponding member or the list itself
+ is deleted. You can force the list to free all of its items with
+ clear().
+
+ Q3ValueList is shared implicitly, which means it can be copied in
+ constant time, i.e. O(1). If multiple Q3ValueList instances share
+ the same data and one needs to modify its contents, this modifying
+ instance makes a copy and modifies its private copy; therefore it
+ does not affect the other instances; this takes O(n) time. This is
+ often called "copy on write". If a Q3ValueList is being used in a
+ multi-threaded program, you must protect all access to the list.
+ See \l QMutex.
+
+ There are several ways to insert items into the list. The
+ prepend() and append() functions insert items at the beginning and
+ the end of the list respectively. The insert() function comes in
+ several flavors and can be used to add one or more items at
+ specific positions within the list.
+
+ Items can also be removed from the list in several ways. There
+ are several variants of the remove() function, which removes a
+ specific item from the list. The remove() function will find and
+ remove items according to a specific item value.
+
+ \sa Q3ValueListIterator
+*/
+
+/*! \typedef Q3ValueList::iterator
+ The list's iterator type, Q3ValueListIterator. */
+/*! \typedef Q3ValueList::const_iterator
+ The list's const iterator type, Q3ValueListConstIterator. */
+/*! \typedef Q3ValueList::value_type
+ The type of the object stored in the list, T. */
+/*! \typedef Q3ValueList::pointer
+ The pointer to T type. */
+/*! \typedef Q3ValueList::const_pointer
+ The const pointer to T type. */
+/*! \typedef Q3ValueList::reference
+ The reference to T type. */
+/*! \typedef Q3ValueList::const_reference
+ The const reference to T type. */
+/*! \typedef Q3ValueList::size_type
+ An unsigned integral type, used to represent various sizes. */
+/*! \typedef Q3ValueList::difference_type
+ \internal
+*/
+/*!
+ \fn Q3ValueList::Q3ValueList()
+
+ Constructs an empty list.
+*/
+
+/*!
+ \fn Q3ValueList::Q3ValueList( const Q3ValueList<T>& l )
+ \fn Q3ValueList::Q3ValueList( const QList<T>& l )
+ \fn Q3ValueList::Q3ValueList( const QLinkedList<T>& l )
+
+ Constructs a copy of \a l.
+*/
+
+/*!
+ \fn Q3ValueList::Q3ValueList( const std::list<T>& l )
+
+ Contructs a copy of \a l.
+
+ This constructor is provided for compatibility with STL
+ containers.
+*/
+
+/*!
+ \fn Q3ValueList::~Q3ValueList()
+
+ Destroys the list. References to the values in the list and all
+ iterators of this list become invalidated. Note that it is
+ impossible for an iterator to check whether or not it is valid:
+ Q3ValueList is highly tuned for performance, not for error
+ checking.
+*/
+
+/*!
+ \fn bool Q3ValueList::operator== ( const Q3ValueList<T>& l ) const
+
+ Compares both lists.
+
+ Returns TRUE if this list and \a l are equal; otherwise returns
+ FALSE.
+*/
+
+/*!
+ \fn bool Q3ValueList::operator== ( const std::list<T>& l ) const
+
+ \overload
+
+ Returns TRUE if this list and \a l are equal; otherwise returns
+ FALSE.
+
+ This operator is provided for compatibility with STL containers.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator= ( const Q3ValueList<T>& l )
+
+ Assigns \a l to this list and returns a reference to this list.
+
+ All iterators of the current list become invalidated by this
+ operation. The cost of such an assignment is O(1) since Q3ValueList
+ is implicitly shared.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator= ( const QList<T>& l )
+
+ Assigns \a l to this list and returns a reference to this list.
+
+ All iterators of the current list become invalidated by this
+ operation.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator= ( const std::list<T>& l )
+
+ \overload
+
+ Assigns the contents of \a l to the list.
+
+ All iterators of the current list become invalidated by this
+ operation.
+*/
+
+/*!
+ \fn bool Q3ValueList::operator!= ( const Q3ValueList<T>& l ) const
+
+ Compares both lists.
+
+ Returns TRUE if this list and \a l are unequal; otherwise returns
+ FALSE.
+*/
+
+/*!
+ \fn iterator Q3ValueList::insert( typename Q3ValueList<T>::Iterator it, const T& x )
+
+ Inserts the value \a x in front of the item pointed to by the
+ iterator, \a it.
+
+ Returns an iterator pointing at the inserted item.
+
+ \sa append(), prepend()
+*/
+
+/*!
+ \fn uint Q3ValueList::remove( const T& x )
+
+ \overload
+
+ Removes all items that have value \a x and returns the number of
+ removed items.
+*/
+
+/*!
+ \fn QDataStream& operator>>( QDataStream& s, Q3ValueList<T>& l )
+
+ \relates Q3ValueList
+
+ Reads a list, \a l, from the stream \a s. The type T stored in the
+ list must implement the streaming operator.
+*/
+
+/*!
+ \fn QDataStream& operator<<( QDataStream& s, const Q3ValueList<T>& l )
+
+ \overload
+ \relates Q3ValueList
+
+ Writes a list, \a l, to the stream \a s. The type T stored in the
+ list must implement the streaming operator.
+*/
+
+/*!
+ \fn void Q3ValueList::insert( typename Q3ValueList<T>::Iterator pos,
+ typename Q3ValueList<T>::size_type n, const T& x )
+
+ \overload
+
+ Inserts \a n copies of \a x before position \a pos.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator<< ( const T& x )
+
+ Adds the value \a x to the end of the list.
+
+ Returns a reference to the list.
+*/
+
+/*!
+ \fn const T& Q3ValueList::operator[] ( typename Q3ValueList<T>::size_type i ) const
+
+ Returns a const reference to the item with index \a i in the list.
+ It is up to you to check whether this item really exists. You can
+ do that easily with the count() function. However this operator
+ does not check whether \a i is in range and will deliver undefined
+ results if it does not exist.
+
+ \warning This function uses a linear search and can be extremely
+ slow for large lists. Q3ValueList is not optimized for random item
+ access. If you need random access use a different container, such
+ as Q3ValueVector.
+*/
+
+/*!
+ \fn T& Q3ValueList::operator[] ( typename Q3ValueList<T>::size_type i )
+
+ \overload
+
+ Returns a non-const reference to the item with index \a i.
+*/
+
+/*!
+ \fn const_iterator Q3ValueList::at( typename Q3ValueList<T>::size_type i ) const
+
+ Returns an iterator pointing to the item at position \a i in the
+ list, or an undefined value if the index is out of range.
+
+ \warning This function uses a linear search and can be extremely
+ slow for large lists. Q3ValueList is not optimized for random item
+ access. If you need random access use a different container, such
+ as Q3ValueVector.
+*/
+
+/*!
+ \fn iterator Q3ValueList::at( typename Q3ValueList<T>::size_type i )
+
+ \overload
+
+ Returns an iterator pointing to the item at position \a i in the
+ list, or an undefined value if the index is out of range.
+
+*/
+
+/*!
+ \fn iterator Q3ValueList::fromLast()
+
+ \overload
+
+ Returns an iterator to the last item in the list, or end() if
+ there is no last item.
+
+ Use the end() function instead. For example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 2
+
+*/
+
+/*!
+ \fn const_iterator Q3ValueList::fromLast() const
+
+ Returns an iterator to the last item in the list, or end() if
+ there is no last item.
+
+ Use the end() function instead. For example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 3
+
+*/
+
+/*!
+ \fn Q3ValueList<T> Q3ValueList::operator+( const Q3ValueList<T>& l ) const
+
+ Creates a new list and fills it with the items of this list. Then
+ the items of \a l are appended. Returns the new list.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator+= ( const Q3ValueList<T>& l )
+
+ Appends the items of \a l to this list. Returns a reference to
+ this list.
+*/
+
+/*!
+ \fn Q3ValueList<T>& Q3ValueList::operator+= ( const T& x )
+
+ \overload
+
+ Appends the value \a x to the list. Returns a reference to the
+ list.
+*/
+
+/*!
+ \fn iterator Q3ValueList::append( const T& x )
+
+ Inserts \a x at the end of the list.
+
+ \sa insert(), prepend()
+*/
+
+/*!
+ \fn iterator Q3ValueList::prepend( const T& x )
+
+ Inserts \a x at the beginning of the list.
+
+ \sa insert(), append()
+*/
+
+/*!
+ \fn iterator Q3ValueList::remove( typename Q3ValueList<T>::Iterator it )
+
+ Removes the item pointed to by \a it from the list. No iterators
+ other than \a it or other iterators pointing at the same item as
+ \a it are invalidated. Returns an iterator to the next item after
+ \a it, or end() if there is no such item.
+
+ \sa clear()
+*/
+
+/*!
+ \fn uint Q3ValueList::contains( const T& x ) const
+
+ Returns the number of occurrences of the value \a x in the list.
+*/
+
+/*!
+ \class Q3ValueListIterator
+ \brief The Q3ValueListIterator class provides an iterator for Q3ValueList.
+ \compat
+
+ An iterator is a class for accessing the items of a container
+ class: a generalization of the index in an array. A pointer
+ into a "const char *" and an index into an "int[]" are both
+ iterators, and the general idea is to provide that functionality
+ for any data structure.
+
+ The Q3ValueListIterator class is an iterator for Q3ValueList
+ instantiations. You can create the appropriate iterator type by
+ using the \c iterator typedef provided by Q3ValueList.
+
+ The only way to access the items in a Q3ValueList is to use an
+ iterator.
+
+ Example (see Q3ValueList for the complete code):
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 4
+
+ Q3ValueList is highly optimized for performance and memory usage.
+ This means that you must be careful: Q3ValueList does not know
+ about all its iterators and the iterators don't know to which list
+ they belong. This makes things very fast, but if you're not
+ careful, you can get spectacular bugs. Always make sure iterators
+ are valid before dereferencing them or using them as parameters to
+ generic algorithms in the STL.
+
+ Using an invalid iterator is undefined (your application will
+ probably crash). Many Qt functions return const value lists; to
+ iterate over these you should make a copy and iterate over the
+ copy.
+
+ For every Iterator there is a ConstIterator. When accessing a
+ Q3ValueList in a const environment or if the reference or pointer
+ to the list is itself const, then you must use the ConstIterator.
+ Its semantics are the same as the Iterator, but it only returns
+ const references.
+
+ \sa Q3ValueList, Q3ValueListConstIterator
+*/
+
+/*!
+ \fn Q3ValueListIterator::Q3ValueListIterator()
+
+ Constructs an unitialized iterator.
+*/
+
+/*!
+ \fn Q3ValueListIterator::Q3ValueListIterator(const Q3ValueListIterator &o)
+ \fn Q3ValueListIterator::Q3ValueListIterator(const typename QLinkedList<T>::iterator &o)
+
+ Constucts a copy of iterator \a o.
+*/
+
+/*!
+ \class Q3ValueListConstIterator
+ \brief The Q3ValueListConstIterator class provides a const iterator
+ for Q3ValueList.
+ \compat
+
+ In contrast to Q3ValueListIterator, this class is used to iterate
+ over a const list. It does not allow modification of the values of
+ the list since that would break const semantics.
+
+ You can create the appropriate const iterator type by using the \c
+ const_iterator typedef provided by Q3ValueList.
+
+ For more information on Q3ValueList iterators, see
+ Q3ValueListIterator.
+
+ \sa Q3ValueListIterator, Q3ValueList
+*/
+
+/*!
+ \fn Q3ValueListConstIterator::Q3ValueListConstIterator()
+
+ Constructs an unitialized iterator.
+*/
+
+/*!
+ \fn Q3ValueListConstIterator::Q3ValueListConstIterator(const Q3ValueListConstIterator &o)
+ \fn Q3ValueListConstIterator::Q3ValueListConstIterator(const typename QLinkedList<T>::const_iterator &o)
+ \fn Q3ValueListConstIterator::Q3ValueListConstIterator(const typename QLinkedList<T>::iterator &o)
+
+ Constructs a copy of iterator \a o.
+*/
+
+/*!
+ \typedef Q3ValueList::Iterator
+
+ This iterator is an instantiation of Q3ValueListIterator for the
+ same type as this Q3ValueList. In other words, if you instantiate
+ Q3ValueList<int>, Iterator is a Q3ValueListIterator<int>. Several
+ member function use it, such as Q3ValueList::begin(), which returns
+ an iterator pointing to the first item in the list.
+
+ Functionally, this is almost the same as ConstIterator. The only
+ difference is that you cannot use ConstIterator for non-const
+ operations, and that the compiler can often generate better code
+ if you use ConstIterator.
+
+ \sa Q3ValueListIterator ConstIterator
+*/
+
+/*!
+ \typedef Q3ValueList::ConstIterator
+
+ This iterator is an instantiation of Q3ValueListConstIterator for
+ the same type as this Q3ValueList. In other words, if you
+ instantiate Q3ValueList<int>, ConstIterator is a
+ Q3ValueListConstIterator<int>. Several member function use it, such
+ as Q3ValueList::begin(), which returns an iterator pointing to the
+ first item in the list.
+
+ Functionally, this is almost the same as Iterator. The only
+ difference is you cannot use ConstIterator for non-const
+ operations, and that the compiler can often generate better code
+ if you use ConstIterator.
+
+ \sa Q3ValueListIterator Iterator
+*/
+
+/*!
+ \fn Q3ValueList::operator QList<T>() const
+
+ Automatically converts a Q3ValueList<T> into a QList<T>.
+*/
diff --git a/doc/src/q3valuestack.qdoc b/doc/src/q3valuestack.qdoc
new file mode 100644
index 0000000..40847ab
--- /dev/null
+++ b/doc/src/q3valuestack.qdoc
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3ValueStack
+ \brief The Q3ValueStack class is a value-based template class that provides a stack.
+ \compat
+
+ Define a template instance Q3ValueStack\<X\> to create a stack of
+ values that all have the class X.
+
+ Note that Q3ValueStack does not store pointers to the members of
+ the stack; it holds a copy of every member. That is why these
+ kinds of classes are called "value based"; Q3PtrStack, Q3PtrList,
+ Q3Dict, etc., are "pointer based".
+
+ A stack is a last in, first out (LIFO) structure. Items are added
+ to the top of the stack with push() and retrieved from the top
+ with pop(). The top() function provides access to the topmost item
+ without removing it.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3valuestack.qdoc 0
+
+ Q3ValueStack is a specialized Q3ValueList provided for convenience.
+ All of Q3ValueList's functionality also applies to Q3PtrStack, for
+ example the facility to iterate over all elements using
+ Q3ValueStack<T>::Iterator. See Q3ValueListIterator for further
+ details.
+
+ Some classes cannot be used within a Q3ValueStack, for example
+ everything derived from QObject and thus all classes that
+ implement widgets. Only values can be used in a Q3ValueStack. To
+ qualify as a value, the class must provide
+ \list
+ \i a copy constructor;
+ \i an assignment operator;
+ \i a default constructor, i.e. a constructor that does not take any arguments.
+ \endlist
+
+ Note that C++ defaults to field-by-field assignment operators and
+ copy constructors if no explicit version is supplied. In many
+ cases this is sufficient.
+*/
+
+
+/*!
+ \fn Q3ValueStack::Q3ValueStack()
+
+ Constructs an empty stack.
+*/
+
+/*!
+ \fn Q3ValueStack::~Q3ValueStack()
+
+ Destroys the stack. References to the values in the stack and all
+ iterators of this stack become invalidated. Because Q3ValueStack is
+ highly tuned for performance, you won't see warnings if you use
+ invalid iterators because it is impossible for an iterator to
+ check whether or not it is valid.
+*/
+
+
+/*!
+ \fn void Q3ValueStack::push( const T& d )
+
+ Adds element, \a d, to the top of the stack. Last in, first out.
+
+ This function is equivalent to append().
+
+ \sa pop(), top()
+*/
+
+/*!
+ \fn T& Q3ValueStack::top()
+
+ Returns a reference to the top item of the stack or the item
+ referenced by end() if no such item exists. Note that you must not
+ change the value the end() iterator points to.
+
+ This function is equivalent to last().
+
+ \sa pop(), push(), Q3ValueList::fromLast()
+*/
+
+
+/*!
+ \fn const T& Q3ValueStack::top() const
+
+ \overload
+
+ Returns a reference to the top item of the stack or the item
+ referenced by end() if no such item exists.
+
+ This function is equivalent to last().
+
+ \sa pop(), push(), Q3ValueList::fromLast()
+*/
+
+/*!
+ \fn T Q3ValueStack::pop()
+
+ Removes the top item from the stack and returns it.
+
+ \sa top() push()
+*/
+
+
+
+
+
diff --git a/doc/src/q3valuevector.qdoc b/doc/src/q3valuevector.qdoc
new file mode 100644
index 0000000..1af2bf3
--- /dev/null
+++ b/doc/src/q3valuevector.qdoc
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class Q3ValueVector
+ \brief The Q3ValueVector class is a value-based template class that provides a dynamic array.
+ \compat
+
+ Q3ValueVector is a Qt implementation of an STL-like vector
+ container. It can be used in your application if the standard \c
+ vector is not available for your target platforms.
+
+ Q3ValueVector\<T\> defines a template instance to create a vector
+ of values that all have the class T. Q3ValueVector does not store
+ pointers to the members of the vector; it holds a copy of every
+ member. Q3ValueVector is said to be value based; in contrast,
+ Q3PtrList and Q3Dict are pointer based.
+
+ Q3ValueVector contains and manages a collection of objects of type
+ T and provides random access iterators that allow the contained
+ objects to be addressed. Q3ValueVector owns the contained
+ elements. For more relaxed ownership semantics, see Q3PtrCollection
+ and friends, which are pointer-based containers.
+
+ Q3ValueVector provides good performance if you append or remove
+ elements from the end of the vector. If you insert or remove
+ elements from anywhere but the end, performance is very bad. The
+ reason for this is that elements must to be copied into new
+ positions.
+
+ Some classes cannot be used within a Q3ValueVector: for example,
+ all classes derived from QObject and thus all classes that
+ implement widgets. Only values can be used in a Q3ValueVector. To
+ qualify as a value the class must provide:
+ \list
+ \i a copy constructor;
+ \i an assignment operator;
+ \i a default constructor, i.e., a constructor that does not take any arguments.
+ \endlist
+
+ Note that C++ defaults to field-by-field assignment operators and
+ copy constructors if no explicit version is supplied. In many
+ cases this is sufficient.
+
+ Q3ValueVector uses an STL-like syntax to manipulate and address the
+ objects it contains.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 0
+
+ Program output:
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 1
+
+ As you can see, the most recent change to Joe's salary did not
+ affect the value in the vector because the vector created a copy
+ of Joe's entry.
+
+ Many Qt functions return const value vectors; to iterate over
+ these you should make a copy and iterate over the copy.
+
+ There are several ways to find items in the vector. The begin()
+ and end() functions return iterators to the beginning and end of
+ the vector. The advantage of getting an iterator is that you can
+ move forward or backward from this position by
+ incrementing/decrementing the iterator. The iterator returned by
+ end() points to the element which is one past the last element in
+ the container. The past-the-end iterator is still associated with
+ the vector it belongs to, however it is \e not dereferenceable;
+ operator*() will not return a well-defined value. If the vector is
+ empty(), the iterator returned by begin() will equal the iterator
+ returned by end().
+
+ The fastest way to access an element of a vector is by using
+ operator[]. This function provides random access and will return
+ a reference to the element located at the specified index. Thus,
+ you can access every element directly, in constant time, providing
+ you know the location of the element. It is undefined to access
+ an element that does not exist (your application will probably
+ crash). For example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 2
+
+ Whenever inserting, removing or referencing elements in a vector,
+ always make sure you are referring to valid positions. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 3
+
+ The iterators provided by vector are random access iterators,
+ therefore you can use them with many generic algorithms, for
+ example, algorithms provided by the STL.
+
+ It is safe to have multiple iterators on the vector at the same
+ time. Since Q3ValueVector manages memory dynamically, all iterators
+ can become invalid if a memory reallocation occurs. For example,
+ if some member of the vector is removed, iterators that point to
+ the removed element and to all following elements become
+ invalidated. Inserting into the middle of the vector will
+ invalidate all iterators. For convenience, the function back()
+ returns a reference to the last element in the vector, and front()
+ returns a reference to the first element. If the vector is
+ empty(), both back() and front() have undefined behavior (your
+ application will crash or do unpredictable things). Use back() and
+ front() with caution, for example:
+
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 4
+
+ Because Q3ValueVector manages memory dynamically, it is recommended
+ that you contruct a vector with an initial size. Inserting and
+ removing elements happens fastest when:
+ \list
+ \i Inserting or removing elements happens at the end() of the
+ vector;
+ \i The vector does not need to allocate additional memory.
+ \endlist
+
+ By creating a Q3ValueVector with a sufficiently large initial size,
+ there will be less memory allocations. Do not use an initial size
+ that is too big, since it will still take time to construct all
+ the empty entries, and the extra space will be wasted if it is
+ never used.
+
+ Because Q3ValueVector is value-based there is no need to be careful
+ about deleting elements in the vector. The vector holds its own
+ copies and will free them if the corresponding member or the
+ vector itself is deleted. You can force the vector to free all of
+ its items with clear().
+
+ Q3ValueVector is shared implicitly, which means it can be copied in
+ constant time. If multiple Q3ValueVector instances share the same
+ data and one needs to modify its contents, this modifying instance
+ makes a copy and modifies its private copy; it thus does not
+ affect the other instances. This is often called "copy on write".
+ If a Q3ValueVector is being used in a multi-threaded program, you
+ must protect all access to the vector. See QMutex.
+
+ There are several ways to insert elements into the vector. The
+ push_back() function insert elements into the end of the vector,
+ and is usually fastest. The insert() function can be used to add
+ elements at specific positions within the vector.
+
+ Items can be also be removed from the vector in several ways.
+ There are several variants of the erase() function which removes a
+ specific element, or range of elements, from the vector.
+
+ Q3ValueVector stores its elements in contiguous memory. This means
+ that you can use a Q3ValueVector in any situation that requires an
+ array.
+*/
+
+/*!
+ \fn Q3ValueVector::Q3ValueVector()
+
+ Constructs an empty vector without any elements. To create a
+ vector which reserves an initial amount of space for elements, use
+ \c Q3ValueVector(size_type n).
+*/
+
+/*!
+ \fn Q3ValueVector::Q3ValueVector( const Q3ValueVector<T>& v )
+
+ Constructs a copy of \a v.
+
+ This operation costs O(1) time because Q3ValueVector is implicitly
+ shared.
+
+ The first modification to the vector does takes O(n) time, because
+ the elements must be copied.
+*/
+
+/*!
+ \fn Q3ValueVector::Q3ValueVector( const std::vector<T>& v )
+
+ This operation costs O(n) time because \a v is copied.
+*/
+
+/*!
+ \fn Q3ValueVector::Q3ValueVector( QVector<T>::size_type n, const T& val )
+
+ Constructs a vector with an initial size of \a n elements. Each
+ element is initialized with the value of \a val.
+*/
+
+/*!
+ \fn Q3ValueVector<T>& Q3ValueVector::operator=( const Q3ValueVector<T>& v )
+
+ Assigns \a v to this vector and returns a reference to this vector.
+
+ All iterators of the current vector become invalidated by this
+ operation. The cost of such an assignment is O(1) since
+ Q3ValueVector is implicitly shared.
+*/
+
+/*!
+ \fn Q3ValueVector<T>& Q3ValueVector::operator=( const std::vector<T>& v )
+
+ \overload
+
+ Assigns \a v to this vector and returns a reference to this vector.
+
+ All iterators of the current vector become invalidated by this
+ operation. The cost of this assignment is O(n) since \a v is
+ copied.
+*/
+
+/*!
+ \fn T &Q3ValueVector::at( int i , bool* ok )
+
+ Returns a reference to the element with index \a i. If \a ok is
+ non-null, and the index \a i is out of range, *\a ok is set to
+ FALSE and the returned reference is undefined. If the index \a i
+ is within the range of the vector, and \a ok is non-null, *\a ok
+ is set to TRUE and the returned reference is well defined.
+*/
+
+/*!
+ \fn const T &Q3ValueVector::at( int i , bool* ok ) const
+
+ \overload
+
+ Returns a const reference to the element with index \a i. If \a ok
+ is non-null, and the index \a i is out of range, *\a ok is set to
+ FALSE and the returned reference is undefined. If the index \a i
+ is within the range of the vector, and \a ok is non-null, *\a ok
+ is set to TRUE and the returned reference is well defined.
+*/
+
+/*!
+ \fn void Q3ValueVector::resize( int n, const T& val = T() )
+
+ Changes the size of the vector to \a n. If \a n is greater than
+ the current size(), elements are added to the end and initialized
+ with the value of \a val. If \a n is less than size(), elements
+ are removed from the end. If \a n is equal to size() nothing
+ happens.
+*/
diff --git a/doc/src/qalgorithms.qdoc b/doc/src/qalgorithms.qdoc
new file mode 100644
index 0000000..459fb81
--- /dev/null
+++ b/doc/src/qalgorithms.qdoc
@@ -0,0 +1,648 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \headerfile <QtAlgorithms>
+ \title Generic Algorithms
+ \ingroup architecture
+
+ \brief The <QtAlgorithms> header provides generic template-based algorithms.
+
+ Qt provides a number of global template functions in \c
+ <QtAlgorithms> that work on containers and perform well-know
+ algorithms. You can use these algorithms with any \l {container
+ class} that provides STL-style iterators, including Qt's QList,
+ QLinkedList, QVector, QMap, and QHash classes.
+
+ These functions have taken their inspiration from similar
+ functions available in the STL \c <algorithm> header. Most of them
+ have a direct STL equivalent; for example, qCopyBackward() is the
+ same as STL's copy_backward() algorithm.
+
+ If STL is available on all your target platforms, you can use the
+ STL algorithms instead of their Qt counterparts. One reason why
+ you might want to use the the STL algorithms is that STL provides
+ dozens and dozens of algorithms, whereas Qt only provides the most
+ important ones, making no attempt to duplicate functionality that
+ is already provided by the C++ standard.
+
+ Most algorithms take \l {STL-style iterators} as parameters. The
+ algorithms are generic in the sense that they aren't bound to a
+ specific iterator class; you can use them with any iterators that
+ meet a certain set of requirements.
+
+ Let's take the qFill() algorithm as an example. Unlike QVector,
+ QList has no fill() function that can be used to fill a list with
+ a particular value. If you need that functionality, you can use
+ qFill():
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 0
+
+ qFill() takes a begin iterator, an end iterator, and a value.
+ In the example above, we pass \c list.begin() and \c list.end()
+ as the begin and end iterators, but this doesn't have to be
+ the case:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 1
+
+ Different algorithms can have different requirements for the
+ iterators they accept. For example, qFill() accepts two
+ \l {forward iterators}. The iterator types required are specified
+ for each algorithm. If an iterator of the wrong type is passed (for
+ example, if QList::ConstIterator is passed as an \l {output
+ iterator}), you will always get a compiler error, although not
+ necessarily a very informative one.
+
+ Some algorithms have special requirements on the value type
+ stored in the containers. For example, qEqual() requires that the
+ value type supports operator==(), which it uses to compare items.
+ Similarly, qDeleteAll() requires that the value type is a
+ non-const pointer type (for example, QWidget *). The value type
+ requirements are specified for each algorithm, and the compiler
+ will produce an error if a requirement isn't met.
+
+ \target binaryFind example
+
+ The generic algorithms can be used on other container classes
+ than those provided by Qt and STL. The syntax of STL-style
+ iterators is modeled after C++ pointers, so it's possible to use
+ plain arrays as containers and plain pointers as iterators. A
+ common idiom is to use qBinaryFind() together with two static
+ arrays: one that contains a list of keys, and another that
+ contains a list of associated values. For example, the following
+ code will look up an HTML entity (e.g., \c &amp;) in the \c
+ name_table array and return the corresponding Unicode value from
+ the \c value_table if the entity is recognized:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 2
+
+ This kind of code is for advanced users only; for most
+ applications, a QMap- or QHash-based approach would work just as
+ well:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 3
+
+ \section1 Types of Iterators
+
+ The algorithms have certain requirements on the iterator types
+ they accept, and these are specified individually for each
+ function. The compiler will produce an error if a requirement
+ isn't met.
+
+ \section2 Input Iterators
+
+ An \e{input iterator} is an iterator that can be used for reading
+ data sequentially from a container. It must provide the following
+ operators: \c{==} and \c{!=} for comparing two iterators, unary
+ \c{*} for retrieving the value stored in the item, and prefix
+ \c{++} for advancing to the next item.
+
+ The Qt containers' iterator types (const and non-const) are all
+ input iterators.
+
+ \section2 Output Iterators
+
+ An \e{output iterator} is an iterator that can be used for
+ writing data sequentially to a container or to some output
+ stream. It must provide the following operators: unary \c{*} for
+ writing a value (i.e., \c{*it = val}) and prefix \c{++} for
+ advancing to the next item.
+
+ The Qt containers' non-const iterator types are all output
+ iterators.
+
+ \section2 Forward Iterators
+
+ A \e{forward iterator} is an iterator that meets the requirements
+ of both input iterators and output iterators.
+
+ The Qt containers' non-const iterator types are all forward
+ iterators.
+
+ \section2 Bidirectional Iterators
+
+ A \e{bidirectional iterator} is an iterator that meets the
+ requirements of forward iterators but that in addition supports
+ prefix \c{--} for iterating backward.
+
+ The Qt containers' non-const iterator types are all bidirectional
+ iterators.
+
+ \section2 Random Access Iterators
+
+ The last category, \e{random access iterators}, is the most
+ powerful type of iterator. It supports all the requirements of a
+ bidirectional iterator, and supports the following operations:
+
+ \table
+ \row \i \c{i += n} \i advances iterator \c i by \c n positions
+ \row \i \c{i -= n} \i moves iterator \c i back by \c n positions
+ \row \i \c{i + n} or \c{n + i} \i returns the iterator for the item \c
+ n positions ahead of iterator \c i
+ \row \i \c{i - n} \i returns the iterator for the item \c n positions behind of iterator \c i
+ \row \i \c{i - j} \i returns the number of items between iterators \c i and \c j
+ \row \i \c{i[n]} \i same as \c{*(i + n)}
+ \row \i \c{i < j} \i returns true if iterator \c j comes after iterator \c i
+ \endtable
+
+ QList and QVector's non-const iterator types are random access iterators.
+
+ \sa {container classes}, <QtGlobal>
+*/
+
+/*! \fn OutputIterator qCopy(InputIterator begin1, InputIterator end1, OutputIterator begin2)
+ \relates <QtAlgorithms>
+
+ Copies the items from range [\a begin1, \a end1) to range [\a
+ begin2, ...), in the order in which they appear.
+
+ The item at position \a begin1 is assigned to that at position \a
+ begin2; the item at position \a begin1 + 1 is assigned to that at
+ position \a begin2 + 1; and so on.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 4
+
+ \sa qCopyBackward(), {input iterators}, {output iterators}
+*/
+
+/*! \fn BiIterator2 qCopyBackward(BiIterator1 begin1, BiIterator1 end1, BiIterator2 end2)
+ \relates <QtAlgorithms>
+
+ Copies the items from range [\a begin1, \a end1) to range [...,
+ \a end2).
+
+ The item at position \a end1 - 1 is assigned to that at position
+ \a end2 - 1; the item at position \a end1 - 2 is assigned to that
+ at position \a end2 - 2; and so on.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 5
+
+ \sa qCopy(), {bidirectional iterators}
+*/
+
+/*! \fn bool qEqual(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2)
+ \relates <QtAlgorithms>
+
+ Compares the items in the range [\a begin1, \a end1) with the
+ items in the range [\a begin2, ...). Returns true if all the
+ items compare equal; otherwise returns false.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 6
+
+ This function requires the item type (in the example above,
+ QString) to implement \c operator==().
+
+ \sa {input iterators}
+*/
+
+/*! \fn void qFill(ForwardIterator begin, ForwardIterator end, const T &value)
+ \relates <QtAlgorithms>
+
+ Fills the range [\a begin, \a end) with \a value.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 7
+
+ \sa qCopy(), {forward iterators}
+*/
+
+/*! \fn void qFill(Container &container, const T &value)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qFill(\a{container}.begin(), \a{container}.end(), \a value);
+*/
+
+/*! \fn InputIterator qFind(InputIterator begin, InputIterator end, const T &value)
+ \relates <QtAlgorithms>
+
+ Returns an iterator to the first occurrence of \a value in a
+ container in the range [\a begin, \a end). Returns \a end if \a
+ value isn't found.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 8
+
+ This function requires the item type (in the example above,
+ QString) to implement \c operator==().
+
+ If the items in the range are in ascending order, you can get
+ faster results by using qLowerBound() or qBinaryFind() instead of
+ qFind().
+
+ \sa qBinaryFind(), {input iterators}
+*/
+
+/*! \fn void qFind(const Container &container, const T &value)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qFind(\a{container}.begin(), \a{container}.end(), value);
+*/
+
+/*! \fn void qCount(InputIterator begin, InputIterator end, const T &value, Size &n)
+ \relates <QtAlgorithms>
+
+ Returns the number of occurrences of \a value in the range [\a begin, \a end),
+ which is returned in \a n. \a n is never initialized, the count is added to \a n.
+ It is the caller's responsibility to initialize \a n.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 9
+
+ This function requires the item type (in the example above,
+ \c int) to implement \c operator==().
+
+ \sa {input iterators}
+*/
+
+/*! \fn void qCount(const Container &container, const T &value, Size &n)
+\relates <QtAlgorithms>
+
+\overload
+
+Instead of operating on iterators, as in the other overload, this function
+operates on the specified \a container to obtain the number of instances
+of \a value in the variable passed as a reference in argument \a n.
+*/
+
+/*! \fn void qSwap(T &var1, T &var2)
+ \relates <QtAlgorithms>
+
+ Exchanges the values of variables \a var1 and \a var2.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 10
+*/
+
+/*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end)
+ \relates <QtAlgorithms>
+
+ Sorts the items in range [\a begin, \a end) in ascending order
+ using the quicksort algorithm.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 11
+
+ The sort algorithm is efficient on large data sets. It operates
+ in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
+
+ This function requires the item type (in the example above,
+ \c{int}) to implement \c operator<().
+
+ If neither of the two items is "less than" the other, the items are
+ taken to be equal. It is then undefined which one of the two
+ items will appear before the other after the sort.
+
+ \sa qStableSort(), {random access iterators}
+*/
+
+/*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ Uses the \a lessThan function instead of \c operator<() to
+ compare the items.
+
+ For example, here's how to sort the strings in a QStringList
+ in case-insensitive alphabetical order:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 12
+
+ To sort values in reverse order, pass
+ \l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 13
+
+ If neither of the two items is "less than" the other, the items are
+ taken to be equal. It is then undefined which one of the two
+ items will appear before the other after the sort.
+
+ An alternative to using qSort() is to put the items to sort in a
+ QMap, using the sort key as the QMap key. This is often more
+ convenient than defining a \a lessThan function. For example, the
+ following code shows how to sort a list of strings case
+ insensitively using QMap:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 14
+
+ \sa QMap
+*/
+
+/*! \fn void qSort(Container &container)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qSort(\a{container}.begin(), \a{container}.end());
+*/
+
+/*!
+ \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end)
+ \relates <QtAlgorithms>
+
+ Sorts the items in range [\a begin, \a end) in ascending order
+ using a stable sorting algorithm.
+
+ If neither of the two items is "less than" the other, the items are
+ taken to be equal. The item that appeared before the other in the
+ original container will still appear first after the sort. This
+ property is often useful when sorting user-visible data.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 15
+
+ The sort algorithm is efficient on large data sets. It operates
+ in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
+
+ This function requires the item type (in the example above,
+ \c{int}) to implement \c operator<().
+
+ \sa qSort(), {random access iterators}
+*/
+
+/*!
+ \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ Uses the \a lessThan function instead of \c operator<() to
+ compare the items.
+
+ For example, here's how to sort the strings in a QStringList
+ in case-insensitive alphabetical order:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 16
+
+ Note that earlier versions of Qt allowed using a lessThan function that took its
+ arguments by non-const reference. From 4.3 and on this is no longer possible,
+ the arguments has to be passed by const reference or value.
+
+ To sort values in reverse order, pass
+ \l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 17
+
+ If neither of the two items is "less than" the other, the items are
+ taken to be equal. The item that appeared before the other in the
+ original container will still appear first after the sort. This
+ property is often useful when sorting user-visible data.
+*/
+
+/*!
+ \fn void qStableSort(Container &container)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qStableSort(\a{container}.begin(), \a{container}.end());
+*/
+
+/*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+ \relates <QtAlgorithms>
+
+ Performs a binary search of the range [\a begin, \a end) and
+ returns the position of the first ocurrence of \a value. If no
+ such item is found, returns the position where it should be
+ inserted.
+
+ The items in the range [\a begin, \e end) must be sorted in
+ ascending order; see qSort().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 18
+
+ This function requires the item type (in the example above,
+ \c{int}) to implement \c operator<().
+
+ qLowerBound() can be used in conjunction with qUpperBound() to
+ iterate over all occurrences of the same value:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 19
+
+ \sa qUpperBound(), qBinaryFind()
+*/
+
+/*!
+ \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ Uses the \a lessThan function instead of \c operator<() to
+ compare the items.
+
+ Note that the items in the range must be sorted according to the order
+ specified by the \a lessThan object.
+*/
+
+/*!
+ \fn void qLowerBound(const Container &container, const T &value)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qLowerBound(\a{container}.begin(), \a{container}.end(), value);
+*/
+
+/*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+ \relates <QtAlgorithms>
+
+ Performs a binary search of the range [\a begin, \a end) and
+ returns the position of the one-past-the-last occurrence of \a
+ value. If no such item is found, returns the position where the
+ item should be inserted.
+
+ The items in the range [\a begin, \e end) must be sorted in
+ ascending order; see qSort().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 20
+
+ This function requires the item type (in the example above,
+ \c{int}) to implement \c operator<().
+
+ qUpperBound() can be used in conjunction with qLowerBound() to
+ iterate over all occurrences of the same value:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 21
+
+ \sa qLowerBound(), qBinaryFind()
+*/
+
+/*!
+ \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ Uses the \a lessThan function instead of \c operator<() to
+ compare the items.
+
+ Note that the items in the range must be sorted according to the order
+ specified by the \a lessThan object.
+*/
+
+/*!
+ \fn void qUpperBound(const Container &container, const T &value)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qUpperBound(\a{container}.begin(), \a{container}.end(), value);
+*/
+
+
+/*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+ \relates <QtAlgorithms>
+
+ Performs a binary search of the range [\a begin, \a end) and
+ returns the position of an occurrence of \a value. If there are
+ no occurrences of \a value, returns \a end.
+
+ The items in the range [\a begin, \a end) must be sorted in
+ ascending order; see qSort().
+
+ If there are many occurrences of the same value, any one of them
+ could be returned. Use qLowerBound() or qUpperBound() if you need
+ finer control.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 22
+
+ This function requires the item type (in the example above,
+ QString) to implement \c operator<().
+
+ See the \l{<QtAlgorithms>#binaryFind example}{detailed
+ description} for an example usage.
+
+ \sa qLowerBound(), qUpperBound(), {random access iterators}
+*/
+
+/*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ Uses the \a lessThan function instead of \c operator<() to
+ compare the items.
+
+ Note that the items in the range must be sorted according to the order
+ specified by the \a lessThan object.
+*/
+
+/*!
+ \fn void qBinaryFind(const Container &container, const T &value)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qBinaryFind(\a{container}.begin(), \a{container}.end(), value);
+*/
+
+
+/*!
+ \fn void qDeleteAll(ForwardIterator begin, ForwardIterator end)
+ \relates <QtAlgorithms>
+
+ Deletes all the items in the range [\a begin, \a end) using the
+ C++ \c delete operator. The item type must be a pointer type (for
+ example, \c{QWidget *}).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 23
+
+ Notice that qDeleteAll() doesn't remove the items from the
+ container; it merely calls \c delete on them. In the example
+ above, we call clear() on the container to remove the items.
+
+ This function can also be used to delete items stored in
+ associative containers, such as QMap and QHash. Only the objects
+ stored in each container will be deleted by this function; objects
+ used as keys will not be deleted.
+
+ \sa {forward iterators}
+*/
+
+/*!
+ \fn void qDeleteAll(const Container &c)
+ \relates <QtAlgorithms>
+
+ \overload
+
+ This is the same as qDeleteAll(\a{c}.begin(), \a{c}.end()).
+*/
+
+/*! \fn LessThan qLess()
+ \relates <QtAlgorithms>
+
+ Returns a functional object, or functor, that can be passed to qSort()
+ or qStableSort().
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 24
+
+ \sa {qGreater()}{qGreater<T>()}
+*/
+
+/*! \fn LessThan qGreater()
+ \relates <QtAlgorithms>
+
+ Returns a functional object, or functor, that can be passed to qSort()
+ or qStableSort().
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 25
+
+ \sa {qLess()}{qLess<T>()}
+*/
diff --git a/doc/src/qaxcontainer.qdoc b/doc/src/qaxcontainer.qdoc
new file mode 100644
index 0000000..48c76fc
--- /dev/null
+++ b/doc/src/qaxcontainer.qdoc
@@ -0,0 +1,260 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QAxContainer
+ \title QAxContainer Module
+ \contentspage Qt's Modules
+ \previouspage QtTest
+ \nextpage QAxServer
+ \ingroup modules
+
+ \brief The QAxContainer module is a Windows-only extension for
+ accessing ActiveX controls and COM objects.
+
+ The QAxContainer module is part of the \l ActiveQt framework. It
+ provides a library implementing a QWidget subclass, QAxWidget,
+ that acts as a container for ActiveX controls, and a QObject
+ subclass, QAxObject, that can be used to easily access non-visual
+ COM objects. Scripting COM objects embedded using these classes
+ is possible through the QAxScript, QAxScriptManager and
+ QAxScriptEngine classes, and a set of \l{Tools for ActiveQt}{tools}
+ makes it easy to access COM objects programmatically.
+
+ The module consists of six classes
+ \list 1
+ \o QAxBase is an abstract class that provides an API to initialize
+ and access a COM object or ActiveX control.
+ \o QAxObject provides a QObject that wraps a COM object.
+ \o QAxWidget is a QWidget that wraps an ActiveX control.
+ \o QAxScriptManager, QAxScript and QAxScriptEngine provide an
+ interface to the Windows Script Host.
+ \endlist
+
+ Some \l{Qt Examples#ActiveQt}{example applications} that use
+ standard ActiveX controls to provide high-level user interface
+ functionality are provided.
+
+ \sa {ActiveQt Framework}
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Using the Library
+
+ To build Qt applications that can host COM objects and ActiveX controls
+ link the application against the QAxContainer module by adding
+
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 0
+
+ to your application's \c .pro file.
+
+ \section2 Distributing QAxContainer Applications
+
+ The QAxContainer library is static, so there is no need to redistribute
+ any additional files when using this module. Note however that the
+ ActiveX server binaries you are using might not be installed on the
+ target system, so you have to ship them with your package and register
+ them during the installation process of your application.
+
+ \section1 Instantiating COM Objects
+
+ To instantiate a COM object use the QAxBase::setControl() API, or pass
+ the name of the object directly into the constructor of the QAxBase
+ subclass you are using.
+
+ The control can be specified in a variety of formats, but the fastest
+ and most powerful format is to use the class ID (CLSID) of the object
+ directly. The class ID can be prepended with information about a remote
+ machine that the object should run on, and can include a license key
+ for licensed controls.
+
+ \section2 Typical Error Messages
+
+ ActiveQt prints error messages to the debug output when it
+ encounters error situations at runtime. Usually you must run
+ your program in the debugger to see these messages (e.g. in Visual
+ Studio's Debug output).
+
+ \section3 Requested control could not be instantiated
+
+ The control requested in QAxBase::setControl() is not installed
+ on this system, or is not accessible for the current user.
+
+ The control might require administrator rights, or a license key.
+ If the control is licensed, pass the license key to QAxBase::setControl
+ as documented.
+
+ \section1 Accessing the Object API
+
+ ActiveQt provides a Qt API to the COM object, and replaces COM
+ datatypes with Qt equivalents.
+
+ There are four ways to call APIs on the COM object:
+
+ \list
+ \o Generating a C++ namespace
+ \o Call-by-name
+ \o Through a script engine
+ \o Using the native COM interfaces
+ \endlist
+
+ \section2 Generating a C++ Namespace
+
+ To generate a C++ namespace for the type library you want to access,
+ use the \l dumpcpp tool. Run this tool manually on the type library you
+ want to use, or integrate it into the build system by adding the type
+ libraries to the \c TYPELIBS variable in your application's \c .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 1
+
+ Note that \l dumpcpp might not be able to expose all APIs in the type
+ library.
+
+ Include the resulting header file in your code to access the
+ object APIs through the generated C++ classes. See the
+ \l{activeqt/qutlook}{Qutlook} example for more information.
+
+ \section2 Call-by-Name
+
+ Use QAxBase::dynamicCall() and QAxBase::querySubObject() as well as
+ the QObject::setProperty() and QObject::property() APIs to call the
+ methods and properties of the COM object through their name. Use the
+ \l dumpdoc tool to get the documentation of the Qt API for any COM
+ object and its subobjects; note that not all of the COM object's APIs
+ might be available.
+
+ See the \l{activeqt/webbrowser}{Webbrowser} example for more information.
+
+ \section2 Calling Function Through a Script Engine
+
+ A Qt application can host any ActiveScript engine installed on the system.
+ The script engine can then run script code that accesses the COM objects.
+
+ To instantiate a script engine, use QAxScriptManager::addObject() to
+ register the COM objects you want to access from script, and
+ QAxScriptManager::load() to load the script code into the engine. Then
+ call the script functions using QAxScriptManager::call() or
+ QAxScript::call().
+
+ Which APIs of the COM object are available through scripting depends on
+ the script language used.
+
+ The \l{testcon - An ActiveX Test Container (ActiveQt)}{ActiveX Test Container}
+ demonstrates loading of script files.
+
+ \section2 Calling a Function Using the Native COM Interfaces
+
+ To call functions of the COM object that can not be accessed via any
+ of the above methods it is possible to request the COM interface directly
+ using QAxBase::queryInterface(). To get a C++ definition of the respective
+ interface classes use the \c #import directive with the type library
+ provided with the control; see your compiler manual for details.
+
+ \section2 Typical Error Messages
+
+ ActiveQt prints error messages to the debug output when it
+ encounters error situations at runtime. Usually you must run
+ your program in the debugger to see these messages (e.g. in Visual
+ Studio's Debug output).
+
+ \section3 QAxBase::internalInvoke: No such method
+
+ A QAxBase::dynamicCall() failed - the function prototype did not
+ match any function available in the object's API.
+
+ \section3 Error calling IDispatch member: Non-optional parameter missing
+
+ A QAxBase::dynamicCall() failed - the function prototype was correct,
+ but too few parameters were provided.
+
+ \section3 Error calling IDispatch member: Type mismatch in parameter n
+
+ A QAxBase::dynamicCall() failed - the function prototype was correct,
+ but the paramter at index \c n was of the wrong type and could
+ not be coerced to the correct type.
+
+ \section3 QAxScriptManager::call(): No script provides this function
+
+ You try to call a function that is provided through an engine
+ that doesn't provide introspection (ie. ActivePython or
+ ActivePerl). You need to call the function directly on the
+ respective QAxScript object.
+
+ \section1 License Information
+
+ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
+ the \l{GNU Lesser General Public License (LGPL)}, or the
+ \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ the following license.
+
+ \legalese
+ Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+ All rights reserved.
+
+ Contact: Qt Software Information (qt-info@nokia.com)\br
+
+ You may use this file under the terms of the BSD license as follows:\br
+
+ "Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.\br
+ * Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or other
+ materials provided with the distribution.\br
+ * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor the names of
+ its contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ \endlegalese
+*/
diff --git a/doc/src/qaxserver.qdoc b/doc/src/qaxserver.qdoc
new file mode 100644
index 0000000..f0c317b
--- /dev/null
+++ b/doc/src/qaxserver.qdoc
@@ -0,0 +1,898 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QAxServer
+ \title QAxServer Module
+ \contentspage Qt's Modules
+ \previouspage QAxContainer
+ \nextpage QtDBus module
+ \ingroup modules
+
+ \brief The QAxServer module is a Windows-only static library that
+ you can use to turn a standard Qt binary into a COM server.
+
+ The QAxServer module is part of the \l ActiveQt framework. It
+ consists of three classes:
+
+ \list
+ \o QAxFactory defines a factory for the creation of COM objects.
+ \o QAxBindable provides an interface between the Qt widget and the
+ COM object.
+ \o QAxAggregated can be subclassed to implement additional COM interfaces.
+ \endlist
+
+ Some \l{Qt Examples#ActiveQt}{example implementations} of ActiveX
+ controls and COM objects are provided.
+
+ \sa {ActiveQt Framework}
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Using the Library
+
+ To turn a standard Qt application into a COM server using the
+ QAxServer library you must add \c qaxserver as a CONFIG setting
+ in your \c .pro file.
+
+ An out-of-process executable server is generated from a \c .pro
+ file like this:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 0
+
+ To build an in-process server, use a \c .pro file like this:
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 1
+
+ The files \c qaxserver.rc and \c qaxserver.def are part of the
+ framework and can be used from their usual location (specify a
+ path in the \c .pro file), or copied into the project directory.
+ You can modify these files as long as it includes any file as the
+ type library entry, ie. you can add version information or specify
+ a different toolbox icon.
+
+ The \c qaxserver configuration will cause the \c qmake tool to add the
+ required build steps to the build system:
+
+ \list
+ \o Link the binary against \c qaxserver.lib instead of \c qtmain.lib
+ \o Call the \l idc tool to generate an IDL file for the COM server
+ \o Compile the IDL into a type library using the MIDL tool (part of the
+ compiler installation)
+ \o Attach the resulting type library as a binary resource to the server
+ binary (again using the \l idc tool)
+ \o Register the server
+ \endlist
+
+ Note that the QAxServer build system is not supported on Windows 98/ME
+ (attaching of resources to a binary is not possible there), but a server
+ built on Windows NT/2000/XP will work on previous Windows versions as well.
+
+ To skip the post-processing step, also set the \c qaxserver_no_postlink
+ configuration.
+
+ Additionally you can specify a version number using the \c VERSION
+ variable, e.g.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 2
+
+ The version number specified will be used as the version of the type
+ library and of the server when registering.
+
+ \section2 Out-of-Process vs. In-Process
+
+ Whether your COM server should run as a stand-alone executable
+ or as a shared library in the client process depends mainly on the
+ type of COM objects you want to provide in the server.
+
+ An executable server has the advantage of being able to run as a
+ stand-alone application, but adds considerable overhead to the
+ communication between the COM client and the COM object. If the
+ control has a programming error only the server process running
+ the control will crash, and the client application will probably
+ continue to run. Not all COM clients support executable servers.
+
+ An in-process server is usually smaller and has faster startup
+ time. The communication between client and server is done directly
+ through virtual function calls and does not introduce the overhead
+ required for remote procedure calls. However, if the server crashes the
+ client application is likely to crash as well, and not every
+ functionality is available for in-process servers (i.e. register in
+ the COM's running-object-table).
+
+ Both server types can use Qt either as a shared library, or statically
+ linked into the server binary.
+
+ \section2 Typical Errors During the Post-Build Steps
+
+ For the ActiveQt specific post-processing steps to work the
+ server has to meet some requirements:
+
+ \list
+ \o All controls exposed can be created with nothing but a QApplication
+ instance being present
+ \o The initial linking of the server includes a temporary type
+ library resource
+ \o All dependencies required to run the server are in the system path
+ (or in the path used by the calling environment; note that Visual
+ Studio has its own set of environment variables listed in the
+ Tools|Options|Directories dialog).
+ \endlist
+
+ If those requirements are not met one ore more of the following
+ errors are likely to occur:
+
+ \section3 The Server Executable Crashes
+
+ To generate the IDL the widgets exposed as ActiveX controls need to
+ be instantiated (the constructor is called). At this point, nothing
+ else but a QApplication object exists. Your widget constructor must
+ not rely on any other objects to be created, e.g. it should check for
+ null-pointers.
+
+ To debug your server run it with -dumpidl outputfile and check where
+ it crashes.
+
+ Note that no functions of the control are called.
+
+ \section3 The Server Executable Is Not a Valid Win32 Application
+
+ Attaching the type library corrupted the server binary. This is a
+ bug in Windows and happens only with release builds.
+
+ The first linking step has to link a dummy type library into the
+ executable that can later be replaced by idc. Add a resource file
+ with a type library to your project as demonstrated in the examples.
+
+ \section3 "Unable to locate DLL"
+
+ The build system needs to run the server executable to generate
+ the interface definition, and to register the server. If a dynamic
+ link library the server links against is not in the path this
+ might fail (e.g. Visual Studio calls the server using the
+ enivronment settings specified in the "Directories" option). Make
+ sure that all DLLs required by your server are located in a
+ directory that is listed in the path as printed in the error
+ message box.
+
+ \section3 "Cannot open file ..."
+
+ The ActiveX server could not shut down properly when the last
+ client stopped using it. It usually takes about two seconds for
+ the application to terminate, but you might have to use the task
+ manager to kill the process (e.g. when a client doesn't release
+ the controls properly).
+
+ \section1 Implementing Controls
+
+ To implement a COM object with Qt, create a subclass of QObject
+ or any existing QObject subclass. If the class is a subclass of QWidget,
+ the COM object will be an ActiveX control.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 3
+
+ The Q_OBJECT macro is required to provide the meta object information
+ about the widget to the ActiveQt framework.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 4
+
+ Use the Q_CLASSINFO() macro to specify the COM identifiers for the COM
+ object. \c ClassID and \c InterfaceID are required, while \c EventsID is
+ only necessary when your object has signals. To generate these identifiers,
+ use system tools like \c uuidgen or \c guidgen.
+
+ You can specify additional attributes for each of your classes; see
+ \l{Class Information and Tuning} for details.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 5
+
+ Use the Q_PROPERTY() macro to declare properties for the ActiveX control.
+
+ Declare a standard constructor taking a parent object, and functions,
+ signals and slots like for any QObject subclass.
+ \footnote
+ If a standard constructor is not present the compiler will issue
+ an error "no overloaded function takes 2 parameters" when using
+ the default factory through the QAXFACTORY_DEFAULT() macro. If you
+ cannot provide a standard constructor you must implement a
+ QAxFactory custom factory and call the constructor you have in
+ your implementation of QAxFactory::create.
+ \endfootnote
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 6
+
+ The ActiveQt framework will expose properties and public slots as ActiveX
+ properties and methods, and signals as ActiveX events, and convert between
+ the Qt data types and the equivalent COM data types.
+
+ \section2 Data Types
+
+ The Qt data types that are supported for properties are:
+
+ \table
+ \header
+ \o Qt data type
+ \o COM property
+ \row
+ \o bool
+ \o VARIANT_BOOL
+ \row
+ \o QString
+ \o BSTR
+ \row
+ \o int
+ \o int
+ \row
+ \o uint
+ \o unsigned int
+ \row
+ \o double
+ \o double
+ \row
+ \o \l qlonglong
+ \o CY
+ \row
+ \o \l qulonglong
+ \o CY
+ \row
+ \o QColor
+ \o OLE_COLOR
+ \row
+ \o QDate
+ \o DATE
+ \row
+ \o QDateTime
+ \o DATE
+ \row
+ \o QTime
+ \o DATE
+ \row
+ \o QFont
+ \o IFontDisp*
+ \row
+ \o QPixmap
+ \o IPictureDisp*
+ \footnote
+ COM cannot marshal IPictureDisp accross process boundaries,
+ so QPixmap properties cannot be called for out-of-process servers. You
+ can however marshal the image data via e.g. temporary files. See the
+ Microsoft
+ \link http://support.microsoft.com/default.aspx?scid=kb;[LN];Q150034 KB article
+ Q150034 \endlink for more information.
+ \endfootnote
+ \row
+ \o QVariant
+ \o VARIANT
+ \row
+ \o QVariantList (same as QList\<QVariant\>)
+ \o SAFEARRAY(VARIANT)
+ \row
+ \o QStringList
+ \o SAFEARRAY(BSTR)
+ \row
+ \o QByteArray
+ \o SAFEARRAY(BYTE)
+ \row
+ \o QRect
+ \o User defined type
+ \row
+ \o QSize
+ \o User defined type
+ \row
+ \o QPoint
+ \o User defined type
+ \endtable
+
+ The Qt data types that are supported for parameters in signals and
+ slots are:
+ \table
+ \header
+ \o Qt data type
+ \o COM parameter
+ \row
+ \o bool
+ \o [in] VARIANT_BOOL
+ \row
+ \o bool&
+ \o [in, out] VARIANT_BOOL*
+ \row
+ \o QString, const QString&
+ \o [in] BSTR
+ \row
+ \o QString&
+ \o [in, out] BSTR*
+ \row
+ \o QString&
+ \o [in, out] BSTR*
+ \row
+ \o int
+ \o [in] int
+ \row
+ \o int&
+ \o [in,out] int
+ \row
+ \o uint
+ \o [in] unsigned int
+ \row
+ \o uint&
+ \o [in, out] unsigned int*
+ \row
+ \o double
+ \o [in] double
+ \row
+ \o double&
+ \o [in, out] double*
+ \row
+ \o QColor, const QColor&
+ \o [in] OLE_COLOR
+ \row
+ \o QColor&
+ \o [in, out] OLE_COLOR*
+ \row
+ \o QDate, const QDate&
+ \o [in] DATE
+ \row
+ \o QDate&
+ \o [in, out] DATE*
+ \row
+ \o QDateTime, const QDateTime&
+ \o [in] DATE
+ \row
+ \o QDateTime&
+ \o [in, out] DATE*
+ \row
+ \o QFont, const QFont&
+ \o [in] IFontDisp*
+ \row
+ \o QFont&
+ \o [in, out] IFontDisp**
+ \row
+ \o QPixmap, const QPixmap&
+ \o [in] IPictureDisp*
+ \row
+ \o QPixmap&
+ \o [in, out] IPictureDisp**
+ \row
+ \o QList\<QVariant\>, const QList\<QVariant\>&
+ \o [in] SAFEARRAY(VARIANT)
+ \row
+ \o QList\<QVariant\>&
+ \o [in, out] SAFEARRAY(VARIANT)*
+ \row
+ \o QStringList, const QStringList&
+ \o [in] SAFEARRAY(BSTR)
+ \row
+ \o QStringList&
+ \o [in, out] SAFEARRAY(BSTR)*
+ \row
+ \o QByteArray, const QByteArray&
+ \o [in] SAFEARRAY(BYTE)
+ \row
+ \o QByteArray&
+ \o [in, out] SAFEARRAY(BYTE)*
+ \row
+ \o QObject*
+ \o [in] IDispatch*
+ \row
+ \o QRect&
+ \footnote
+ OLE needs to marshal user defined types by reference (ByRef), and cannot
+ marshal them by value (ByVal). This is why const-references and object
+ parameters are not supported for QRect, QSize and QPoint. Also note that
+ servers with this datatype require Windows 98 or DCOM 1.2 to be installed.
+ \endfootnote
+ \o [in, out] struct QRect (user defined)
+ \row
+ \o QSize&
+ \o [in, out] struct QSize (user defined)
+ \row
+ \o QPoint&
+ \o [in, out] struct QPoint (user defined)
+ \endtable
+
+ Also supported are exported enums and flags (see Q_ENUMS() and
+ Q_FLAGS()). The in-parameter types are also supported as
+ return values.
+
+ Properties and signals/slots that have parameters using any other
+ data types are ignored by the ActiveQt framework.
+
+ \section2 Sub-Objects
+
+ COM objects can have multiple sub-objects that can represent a sub element
+ of the COM object. A COM object representing a multi-document spread sheet
+ application can for example provide one sub-object for each spread sheet.
+
+ Any QObject subclass can be used as the type for a sub object in ActiveX, as
+ long as it is known to the QAxFactory. Then the type can be used in properties,
+ or as the return type or paramter of a slot.
+
+ \section2 Property Notification
+
+ To make the properties bindable for the ActiveX client, use multiple
+ inheritance from the QAxBindable class:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 7
+
+ When implementing the property write functions, use the
+ QAxBindable class's requestPropertyChange() and propertyChanged()
+ functions to allow ActiveX clients to bind to the control
+ properties.
+ \footnote
+ This is not required, but gives the client more control over
+ the ActiveX control.
+ \endfootnote
+
+ \section1 Serving Controls
+
+ To make a COM server available to the COM system it must be registered
+ in the system registry using five unique identifiers.
+ These identifiers are provided by tools like \c guidgen or \c uuidgen.
+ The registration information allows COM to localize the binary providing
+ a requested ActiveX control, marshall remote procedure calls to the
+ control and read type information about the methods and properties exposed
+ by the control.
+
+ To create the COM object when the client asks for it the server must export
+ an implementation of a QAxFactory. The easist way to do this is to use a set
+ of macros:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 8
+
+ This will export \c MyWidget and \c MyWidget2 as COM objects that can be
+ created by COM clients, and will register \c MySubType as a type that can
+ be used in properties and parameters of \c MyWidget and \c MyWidget2.
+
+ The \link QAxFactory QAxFactory class documentation \endlink explains
+ how to use this macro, and how to implement and use custom factories.
+
+ For out-of-process executable servers you can implement a main()
+ function to instantiate a QApplication object and enter the event
+ loop just like any normal Qt application. By default the
+ application will start as a standard Qt application, but if you
+ pass \c -activex on the command line it will start as an ActiveX
+ server. Use QAxFactory::isServer() to create and run a standard
+ application interface, or to prevent a stand-alone execution:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 9
+
+ This is however not necessary as ActiveQt provides a default implementation
+ of a main function. The default implemenation calls QAxFactory::startServer(),
+ creates a QApplication instance and calls exec().
+
+ To build the ActiveX server executable run \c qmake
+ to generate the makefile, and use your compiler's
+ make tool as for any other Qt application. The make process will
+ also register the controls in the system registry by calling the
+ resulting executable with the \c -regserver command line option.
+
+ If the ActiveX server is an executable, the following command line
+ options are supported:
+ \table
+ \header \o Option \o Result
+ \row \o \c -regserver \o Registers the server in the system registry
+ \row \o \c -unregserver \o Unregisters the server from the system registry
+ \row \o \c -activex \o Starts the application as an ActiveX server
+ \row \o \c{-dumpidl <file> -version x.y} \o Writes the server's IDL to the
+ specified file. The type library will have version x.y
+ \endtable
+
+ In-process servers can be registered using the \c regsvr32 tool available
+ on all Windows systems.
+
+ \section2 Typical Compile-Time Problems
+
+ The compiler/linker errors listed are based on those issued by the
+ Microsoft Visual C++ 6.0 compiler.
+
+ \section3 "No overloaded function takes 2 parameters"
+
+ When the error occurs in code that uses the QAXFACTORY_DEFAULT()
+ macro, the widget class had no constructor that can be used by the
+ default factory. Either add a standard widget constructor or
+ implement a custom factory that doesn't require one.
+
+ When the error occurs in code that uses the QAXFACTORY_EXPORT()
+ macro, the QAxFactory subclass had no appropriate constructor.
+ Provide a public class constructor like
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 10
+
+ for your factory class.
+
+ \section3 "Syntax error: bad suffix on number"
+
+ The unique identifiers have not been passed as strings into the
+ QAXFACTORY_EXPORT() or QAXFACTORY_DEFAULT() macro.
+
+ \section3 "Unresolved external symbol _ucm_instantiate"
+
+ The server does not export an implementation of a QAxFactory. Use
+ the QAXFACTORY_EXPORT() macro in one of the project's
+ implementation files to instantiate and export a factory, or use
+ the QAXFACTORY_DEFAULT() macro to use the default factory.
+
+ \section3 "_ucm_initialize already defined in ..."
+
+ The server exports more than one implementation of a QAxFactory,
+ or exports the same implementation twice. If you use the default
+ factory, the QAXFACTORY_DEFAULT() macro must only be used once in
+ the project. Use a custom QAxFactory implementation and the
+ QAXFACTORY_EXPORT() macro if the server provides multiple ActiveX
+ controls.
+
+ \section2 Distributing QAxServer Binaries
+
+ ActiveX servers written with Qt can use Qt either as a shared
+ library, or have Qt linked statically into the binary. Both ways
+ will produce rather large packages (either the server binary
+ itself becomes large, or you have to ship the Qt DLL).
+
+ \section3 Installing Stand-Alone Servers
+
+ When your ActiveX server can also run as a stand-alone application,
+ run the server executable with the \c -regserver command line
+ parameter after installing the executable on the target system.
+ After that the controls provided by the server will be available to
+ ActiveX clients.
+
+ \section3 Installing In-Process Servers
+
+ When your ActiveX server is part of an installation package, use the
+ \c regsvr32 tool provided by Microsoft to register the controls on
+ the target system. If this tool is not present, load the DLL into
+ your installer process, resolve the \c DllRegisterServer symbol and
+ call the function:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 11
+
+ \section3 Distributing Servers over the Internet
+
+ If you want to use controls in your server in web-pages you need to
+ make the server available to the browser used to view your page, and
+ you need to specify the location of the server package in your page.
+
+ To specify the location of a server, use the CODEBASE attribute in
+ the OBJECT tag of your web-site. The value can point to the server
+ file itself, to an INF file listing other files the server requires
+ (e.g. the Qt DLL), or a compressed CAB archive.
+
+ INF and CAB files are documented in almost every book available about
+ ActiveX and COM programming as well as in the MSDN library and various
+ other Online resources. The examples include INF files that can be used
+ to build CAB archives:
+
+ \snippet examples/activeqt/simple/simple.inf 0
+
+ The CABARC tool from Microsoft can easily generate CAB archives:
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 12
+
+ The INF files assume a static build of Qt, so no dependencies to other DLLs
+ are listed in the INF files. To distribute an ActiveX server depending on
+ DLLs you must add the dependencies, and provide the library files
+ with the archive.
+
+ \section1 Using the Controls
+
+ To use the ActiveX controls, e.g. to embed them in a web page, use
+ the \c <object> HTML tag.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 13
+
+ To initialize the control's properties, use
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 14
+
+ If the web browser supports scripting use JavaScript, VBScript
+ and forms to script the control. The
+ \l{Qt Examples#ActiveQt}{ActiveQt examples} include demonstration
+ HTML pages for the example controls.
+
+ \section2 Supported and Unsupported ActiveX Clients
+
+ The following is largly based on our own experiements with ActiveX
+ controls and client applications, and is by no means complete.
+
+ \section3 Supported Clients
+
+ These standard applications work with ActiveX controls developed with
+ ActiveQt. Note that some clients support only in-process controls.
+
+ \list
+ \o Internet Explorer
+ \o Microsoft ActiveX Control Test Container
+ \o Microsoft Visual Studio 6.0
+ \o Microsoft Visual Studio.NET/2003
+ \o Microsoft Visual Basic 6.0
+ \o MFC- and ATL-based containers
+ \o Sybase PowerBuilder
+ \o ActiveQt based containers
+ \endlist
+
+ Microsoft Office applications are supported, but you need to register
+ the controls as "Insertable" objects. Reimplement QAxFactory::registerClass
+ to add this attribute to the COM class, or set the "Insertable" class info
+ for your class to "yes" using the Q_CLASSINFO macro.
+
+ \section3 Unsupported Clients
+
+ We have not managed to make ActiveQt based COM objects work with the
+ following client applications.
+
+ \list
+ \o Borland C++ Builder (Versions 5 and 6)
+ \o Borland Delphi
+ \endlist
+
+ \section2 Typical Runtime Errors
+
+ \section3 The Server Does Not Respond
+
+ If the system is unable to start the server (check with the task
+ manager whether the server runs a process), make sure that no DLL
+ the server depends on is missing from the system path (e.g. the Qt
+ DLL!). Use a dependency walker to view all dependencies of the server
+ binary.
+
+ If the server runs (e.g. the task manager lists a process), see
+ the following section for information on debugging your server.
+
+ \section3 The Object Cannot Be Created
+
+ If the server could be built and registered correctly during the build
+ process, but the object cannot be initiliazed e.g. by the OLE/COM Object
+ Viewer application, make sure that no DLL the server depends on is
+ missing from the system path (e.g. the Qt DLL). Use a dependency walker
+ to view all dependencies of the server binary.
+
+ If the server runs, see the following section for information on
+ debugging your server.
+
+ \section2 Debugging Runtime Errors
+
+ To debug an in-process server in Visual Studio, set the server project
+ as the active project, and specify a client "executable for debug
+ session" in the project settings (e.g. use the ActiveX Test Container).
+ You can set breakpoints in your code, and also step into ActiveQt and
+ Qt code if you installed the debug version.
+
+ To debug an executable server, run the application in a debugger
+ and start with the command line parameter \c -activex. Then start
+ your client and create an instance of your ActiveX control. COM
+ will use the existing process for the next client trying to create
+ an ActiveX control.
+
+ \section1 Class Information and Tuning
+
+ To provide attributes for each COM class, use the Q_CLASSINFO macro, which is part of
+ Qt's meta object system.
+
+ \table
+ \header
+ \o Key
+ \o Meaning of value
+ \row
+ \o Version
+ \o The version of the class (1.0 is default)
+ \row
+ \o Description
+ \o A string describing the class.
+ \row
+ \o ClassID
+ \o The class ID.
+ You must reimplement QAxFactory::classID if not specified.
+ \row
+ \o InterfaceID
+ \o The interface ID.
+ You must reimplement QAxFactory::interfaceID if not specified.
+ \row
+ \o EventsID
+ \o The event interface ID.
+ No signals are exposed as COM events if not specified.
+ \row
+ \o DefaultProperty
+ \o The property specified represents the default property of this class.
+ Ie. the default property of a push button would be "text".
+ \row
+ \o DefaultSignal
+ \o The signal specified respresents the default signal of this class.
+ Ie. the default signal of a push button would be "clicked".
+ \row
+ \o LicenseKey
+ \o Object creation requires the specified license key. The key can be
+ empty to require a licensed machine. By default classes are not
+ licensed. Also see the following section.
+ \row
+ \o StockEvents
+ \o Objects expose stock events if value is "yes".
+ See \l QAxFactory::hasStockEvents()
+ \row
+ \o ToSuperClass
+ \o Objects expose functionality of all super-classes up to and
+ including the class name in value.
+ See \l QAxFactory::exposeToSuperClass()
+ \row
+ \o Insertable
+ \o If the value is "yes" the class is registered to be "Insertable"
+ and will be listed in OLE 2 containers (ie. Microsoft Office). This
+ attribute is not be set by default.
+ \row
+ \o Aggregatable
+ \o If the value is "no" the class does not support aggregation. By
+ default aggregation is supported.
+ \row
+ \o Creatable
+ \o If the value is "no" the class cannot be created by the client,
+ and is only available through the API of another class (ie. the
+ class is a sub-type).
+ \row
+ \o RegisterObject
+ \o If the value is "yes" objects of this class are registered with
+ OLE and accessible from the running object table (ie. clients
+ can connect to an already running instance of this class). This
+ attribute is only supported in out-of-process servers.
+ \row
+ \o MIME
+ \o The object can handle data and files of the format specified in the
+ value. The value has the format mime:extension:description. Multiple
+ formats are separated by a semicolon.
+ \row
+ \o CoClassAlias
+ \o The classname used in the generated IDL and in the registry. This is
+ esp. useful for C++ classes that live in a namespace - by default,
+ ActiveQt just removes the "::" to make the IDL compile.
+ \endtable
+
+ Note that both keys and values are case sensitive.
+
+ The following declares version 2.0 of a class that exposes only its
+ own API, and is available in the "Insert Objects" dialog of Microsoft
+ Office applications.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 15
+
+ \section2 Developing Licensed Components
+
+ If you develop components you might want to control who is able to instantiate
+ those components. Since the server binary can be shipped to and registered on
+ any client machine it is possible for anybody to use those components in his
+ own software.
+
+ Licensing components can be done using a variety of techniques, e.g. the code
+ creating the control can provide a license key, or the machine on which the
+ control is supposed to run needs to be licensed.
+
+ To mark a Qt class as licensed specify a "LicenseKey" using the
+ Q_CLASSINFO() macro.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 16
+
+ The key is required to be able to create an instance of \c MyLicensedControl
+ on a machine that is not licensed itself. The licensed developer can now
+ redistributes the server binary with his application, which creates the control
+ using the value of "LicenseKey", while users of the application cannot create
+ the control without the license key.
+
+ If a single license key for the control is not sufficient (ie. you want
+ differnet developers to receive different license keys) you can specify an
+ empty key to indicate that the control requires a license, and reimplement
+ \l QAxFactory::validateLicenseKey() to verify that a license exists on the
+ system (ie. through a license file).
+
+ \section2 More Interfaces
+
+ ActiveX controls provided by ActiveQt servers support a minimal set of COM
+ interfaces to implement the OLE specifications. When the ActiveX class inherits
+ from the QAxBindable class it can also implement additional COM interfaces.
+
+ Create a new subclass of QAxAggregated and use multiple inheritance
+ to subclass additional COM interface classes.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 17
+
+ Reimplement the QAxAggregated::queryInterface() function to
+ support the additional COM interfaces.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 18
+
+ Since \c ISomeCOMInterface is a subclass of \c IUnknown you will
+ have to implement the \c QueryInterface(), \c AddRef(), and \c
+ Release() functions. Use the QAXAGG_IUNKNOWN macro in your
+ class definition to do that. If you implement the \c IUnknown
+ functions manually, delegate the calls to the interface pointer
+ returned by the QAxAggregated::controllingUnknown() function,
+ e.g.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 19
+
+ Do not support the \c IUnknown interface itself in your
+ \l{QAxAggregated::queryInterface()}{queryInterface()}
+ implementation.
+
+ Implement the methods of the COM interfaces, and use QAxAggregated::object()
+ if you need to make calls to the QObject subclass implementing the control.
+
+ In your QAxBindable subclass, implement
+ QAxBindable::createAggregate() to return a new object of the
+ QAxAggregated subclass.
+
+ \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 20
+
+ \section1 License Information
+
+ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
+ the \l{GNU Lesser General Public License (LGPL)}, or the
+ \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ the following license.
+
+ \legalese
+ Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+ All rights reserved.
+
+ Contact: Qt Software Information (qt-info@nokia.com)\br
+
+ You may use this file under the terms of the BSD license as follows:\br
+
+ "Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.\br
+ * Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or other
+ materials provided with the distribution.\br
+ * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor the names of
+ its contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ \endlegalese
+*/
diff --git a/doc/src/qcache.qdoc b/doc/src/qcache.qdoc
new file mode 100644
index 0000000..2c68640
--- /dev/null
+++ b/doc/src/qcache.qdoc
@@ -0,0 +1,244 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QCache
+ \brief The QCache class is a template class that provides a cache.
+
+ \ingroup tools
+ \ingroup shared
+ \mainclass
+ \reentrant
+
+ QCache\<Key, T\> defines a cache that stores objects of type T
+ associated with keys of type Key. For example, here's the
+ definition of a cache that stores objects of type Employee
+ associated with an integer key:
+
+ \snippet doc/src/snippets/code/doc_src_qcache.qdoc 0
+
+ Here's how to insert an object in the cache:
+
+ \snippet doc/src/snippets/code/doc_src_qcache.qdoc 1
+
+ The advantage of using QCache over some other key-based data
+ structure (such as QMap or QHash) is that QCache automatically
+ takes ownership of the objects that are inserted into the cache and
+ deletes them to make room for new objects, if necessary. When
+ inserting an object into the cache, you can specify a \e{cost},
+ which should bear some approximate relationship to the amount of
+ memory taken by the object. When the sum of all objects' costs
+ (totalCost()) exceeds the cache's limit (maxCost()), QCache starts
+ deleting objects in the cache to keep under the limit, starting with
+ less recently accessed objects.
+
+ By default, QCache's maxCost() is 100. You can specify a
+ different value in the QCache constructor:
+
+ \snippet doc/src/snippets/code/doc_src_qcache.qdoc 2
+
+ Each time you call insert(), you can specify a cost as third
+ argument (after the key and a pointer to the object to insert).
+ After the call, the inserted object is owned by the QCache, which
+ may delete it at any time to make room for other objects.
+
+ To look up objects in the cache, use object() or
+ operator[](). This function looks up an object by its key, and
+ returns either a pointer to the cached object (which is owned by
+ the cache) or 0.
+
+ If you want to remove an object from the cache for a particular key,
+ call remove(). This will also delete the object. If you want to
+ remove an object from the cache without the QCache deleting it, use
+ take().
+
+ \sa QPixmapCache, QHash, QMap
+*/
+
+/*! \fn QCache::QCache(int maxCost = 100)
+
+ Constructs a cache whose contents will never have a total cost
+ greater than \a maxCost.
+*/
+
+/*! \fn QCache::~QCache()
+
+ Destroys the cache. Deletes all the objects in the cache.
+*/
+
+/*! \fn int QCache::maxCost() const
+
+ Returns the maximum allowed total cost of the cache.
+
+ \sa setMaxCost(), totalCost()
+*/
+
+/*! \fn void QCache::setMaxCost(int cost)
+
+ Sets the maximum allowed total cost of the cache to \a cost. If
+ the current total cost is greater than \a cost, some objects are
+ deleted immediately.
+
+ \sa maxCost(), totalCost()
+*/
+
+/*! \fn int QCache::totalCost() const
+
+ Returns the total cost of the objects in the cache.
+
+ This value is normally below maxCost(), but QCache makes an
+ exception for Qt's \l{implicitly shared} classes. If a cached
+ object shares its internal data with another instance, QCache may
+ keep the object lying around, possibly contributing to making
+ totalCost() larger than maxCost().
+
+ \sa setMaxCost()
+*/
+
+/*! \fn int QCache::size() const
+
+ Returns the number of objects in the cache.
+
+ \sa isEmpty()
+*/
+
+/*! \fn int QCache::count() const
+
+ Same as size().
+*/
+
+/*! \fn bool QCache::isEmpty() const
+
+ Returns true if the cache contains no objects; otherwise
+ returns false.
+
+ \sa size()
+*/
+
+/*! \fn QList<Key> QCache::keys() const
+
+ Returns a list of the keys in the cache.
+*/
+
+/*! \fn void QCache::clear();
+
+ Deletes all the objects in the cache.
+
+ \sa remove(), take()
+*/
+
+
+/*! \fn bool QCache::insert(const Key &key, T *object, int cost = 1)
+
+ Inserts \a object into the cache with key \a key and
+ associated cost \a cost. Any object with the same key already in
+ the cache will be removed.
+
+ After this call, \a object is owned by the QCache and may be
+ deleted at any time. In particular, if \a cost is greater than
+ maxCost(), the object will be deleted immediately.
+
+ The function returns true if the object was inserted into the
+ cache; otherwise it returns false.
+
+ \sa take(), remove()
+*/
+
+/*! \fn T *QCache::object(const Key &key) const
+
+ Returns the object associated with key \a key, or 0 if the key does
+ not exist in the cache.
+
+ \warning The returned object is owned by QCache and may be
+ deleted at any time.
+
+ \sa take(), remove()
+*/
+
+/*! \fn bool QCache::contains(const Key &key) const
+
+ Returns true if the cache contains an object associated with key \a
+ key; otherwise returns false.
+
+ \sa take(), remove()
+*/
+
+/*! \fn T *QCache::operator[](const Key &key) const
+
+ Returns the object associated with key \a key, or 0 if the key does
+ not exist in the cache.
+
+ This is the same as object().
+
+ \warning The returned object is owned by QCache and may be
+ deleted at any time.
+*/
+
+/*! \fn bool QCache::remove(const Key &key)
+
+ Deletes the object associated with key \a key. Returns true if the
+ object was found in the cache; otherwise returns false.
+
+ \sa take(), clear()
+*/
+
+/*! \fn T *QCache::take(const Key &key)
+
+ Takes the object associated with key \a key out of the cache
+ without deleting it. Returns a pointer to the object taken out, or
+ 0 if the key does not exist in the cache.
+
+ The ownership of the returned object is passed to the caller.
+
+ \sa remove()
+*/
+
+/*!
+ \fn QCache::QCache(int maxCost, int dummy)
+
+ Use QCache(int) instead.
+*/
+
+/*!
+ \fn T *QCache::find(const Key &key) const
+
+ Use object() instead.
+*/
diff --git a/doc/src/qcolormap.qdoc b/doc/src/qcolormap.qdoc
new file mode 100644
index 0000000..dae4dc7
--- /dev/null
+++ b/doc/src/qcolormap.qdoc
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QColormap
+ \ingroup multimedia
+
+ \brief The QColormap class maps device independent QColors to device
+ dependent pixel values.
+*/
+
+/*! \enum QColormap::Mode
+
+ This enum describes how QColormap maps device independent RGB
+ values to device dependent pixel values.
+
+ \value Direct Pixel values are derived directly from the RGB
+ values, also known as "True Color."
+
+ \value Indexed Pixel values represent indexes into a vector of
+ available colors, i.e. QColormap uses the index of the color that
+ most closely matches an RGB value.
+
+ \value Gray Similar to \c Indexed, pixel values represent a vector
+ of available gray tones. QColormap uses the index of the gray
+ tone that most closely matches the computed gray tone of an RGB
+ value.
+*/
+
+/*!
+ \fn QColormap QColormap::instance(int screen)
+
+ Returns the colormap for the specified \a screen. If \a screen is
+ -1, this function returns the colormap for the default screen.
+*/
+
+/*!
+ \fn QColormap::QColormap(const QColormap &colormap)
+
+ Constructs a copy of another \a colormap.
+*/
+
+/*!
+ \fn QColormap::~QColormap()
+
+ Destroys the colormap.
+*/
+
+/*!
+ \fn int QColormap::size() const
+
+ Returns the size of the colormap for \c Indexed and \c Gray modes;
+ Returns -1 for \c Direct mode.
+
+ \sa colormap()
+*/
+
+/*!
+ \fn uint QColormap::pixel(const QColor &color) const
+
+ Returns a device dependent pixel value for the \a color.
+
+ \sa colorAt()
+*/
+
+/*!
+ \fn int QColormap::depth() const
+
+ Returns the depth of the device.
+
+ \sa size()
+*/
+
+/*!
+ \fn QColormap::Mode QColormap::mode() const
+
+ Returns the mode of this colormap.
+
+ \sa QColormap::Mode
+*/
+
+/*!
+ \fn const QColor QColormap::colorAt(uint pixel) const
+
+ Returns a QColor for the \a pixel.
+
+ \sa pixel()
+*/
+
+/*!
+ \fn const QVector<QColor> QColormap::colormap() const
+
+ Returns a vector of colors which represents the devices colormap
+ for \c Indexed and \c Gray modes. This function returns an empty
+ vector for \c Direct mode.
+
+ \sa size()
+*/
+
+/*! \fn HPALETTE QColormap::hPal()
+
+ This function is only available on Windows.
+
+ Returns an handle to the HPALETTE used by this colormap. If no
+ HPALETTE is being used, this function returns zero.
+*/
+
+/*! \since 4.2
+
+ \fn QColormap &QColormap::operator=(const QColormap &colormap)
+
+ Assigns the given \a colormap to \e this color map and returns
+ a reference to \e this color map.
+*/
diff --git a/doc/src/qdbusadaptors.qdoc b/doc/src/qdbusadaptors.qdoc
new file mode 100644
index 0000000..fc487aa
--- /dev/null
+++ b/doc/src/qdbusadaptors.qdoc
@@ -0,0 +1,518 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/** -*- mode: C++ -*-
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page usingadaptors.html
+ \title Using QtDBus Adaptors
+
+ Adaptors are special classes that are attached to any QObject-derived class
+ and provide the interface to the external world using D-Bus. Adaptors are
+ intended to be lightweight classes whose main purpose is to relay calls to
+ and from the real object, possibly validating or converting the input from
+ the external world and, thus, protecting the real object.
+
+ Unlike multiple inheritance, adaptors can be added at any time to any object
+ (but not removed), which allows for greater flexibility when exporting
+ existing classes. Another advantage of adaptors is to provide similar but not
+ identical functionality in methods of the same name in different interfaces,
+ a case which can be quite common when adding a new version of a standard
+ interface to an object.
+
+ In order to use an adaptor, one must create a class which inherits
+ QDBusAbstractAdaptor. Since that is a standard QObject-derived class, the
+ Q_OBJECT macro must appear in the declaration and the source file must be
+ processed with the \l {moc} tool. The class must also contain one
+ Q_CLASSINFO entry with the \c {"D-Bus Interface"} name, declaring which
+ interface it is exporting. Only one entry per class is supported.
+
+ Any public slot in the class will be accessible through the bus over messages
+ of the MethodCall type. (See \l {Declaring Slots in D-Bus Adaptors} for more
+ information). Signals in the class will be automatically relayed over D-Bus.
+ However, not all types are allowed signals or slots' parameter lists: see
+ \l {The QtDBus Type System} for more information.
+
+ Also, any property declared with Q_PROPERTY will be automatically exposed
+ over the Properties interface on D-Bus. Since the QObject property system
+ does not allow for non-readable properties, it is not possible to declare
+ write-only properties using adaptors.
+
+ More information:
+ \list
+ \o \l{Declaring Slots in D-Bus Adaptors}
+ \o \l{Declaring Signals in D-Bus Adaptors}
+ \o \l{The QtDBus Type System}
+ \o \l{D-Bus Adaptor Example}
+ \endlist
+
+ \sa QDBusAbstractAdaptor
+*/
+
+/*!
+ \page qdbusadaptorexample.html
+ \title D-Bus Adaptor Example
+
+ The following example code shows how a D-Bus interface can be implemented
+ using an adaptor.
+
+ A sample usage of QDBusAbstractAdaptor is as follows:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 0
+
+ The code above would create an interface that could be represented more or less in the following
+ canonical representation:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 1
+
+ This adaptor could be used in the application's main function as follows
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 2
+
+ Break-down analysis:
+ \tableofcontents
+
+ \section1 The header
+
+ The header of the example is:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 3
+
+ The code does the following:
+ \list
+ \o it declares the adaptor MainApplicationAdaptor, which descends from QDBusAbstractAdaptor
+ \o it declares the Qt meta-object data using the Q_OBJECT macro
+ \o it declares the name of the D-Bus interface it implements.
+ \endlist
+
+ \section1 The properties
+
+ The properties are declared as follows:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 4
+
+ And are implemented as follows:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 5
+
+ The code declares three properties: one of them is a read-write property called "caption" of
+ string type. The other two are read-only, also of the string type.
+
+ The properties organizationName and organizationDomain are simple relays of the app object's
+ organizationName and organizationDomain properties. However, the caption property requires
+ verifying if the application has a main window associated with it: if there isn't any, the
+ caption property is empty. Note how it is possible to access data defined in other objects
+ through the getter/setter functions.
+
+ \section1 The constructor
+
+ The constructor:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 6
+
+ The constructor does the following:
+ \list
+ \o it initialises its base class (QDBusAbstractAdaptor) with the parent object it is related to.
+ \o it stores the app pointer in a member variable. Note that it would be possible to access the
+ same object using the QDBusAbstractAdaptor::object() function, but it would be necessary to
+ use \a static_cast<> to properly access the methods in QApplication that are not part of
+ QObject.
+ \o it connects the application's signal \a aboutToQuit to its own signal \a aboutToQuit.
+ \o it connects the application's signal \a focusChanged to a private slot to do some further
+ processing before emitting a D-Bus signal.
+ \endlist
+
+ Note that there is no destructor in the example. An eventual destructor could be used to emit
+ one last signal before the object is destroyed, for instance.
+
+ \section1 Slots/methods
+
+ The public slots in the example (which will be exported as D-Bus methods) are the following:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 7
+
+ This snippet of code defines 4 methods with different properties each:
+ \list 1
+ \o \c quit: this method takes no parameters and is defined to be asynchronous. That is, callers
+ are expected to use "fire-and-forget" mechanism when calling this method, since it provides no
+ useful reply. This is represented in D-Bus by the use of the
+ org.freedesktop.DBus.Method.NoReply annotation. See \l Q_NOREPLY for more information on
+ asynchronous methods
+
+ \o \c reparseConfiguration: this simple method, with no input or output arguments simply relays
+ the call to the application's reparseConfiguration member function.
+
+ \o \c mainWindowObject: this method takes no input parameter, but returns one string output
+ argument, containing the path to the main window object (if the application has a main
+ window), or an empty string if it has no main window. Note that this method could have also
+ been written: void mainWindowObject(QString &path).
+
+ \o \c setSessionManagement: this method takes one input argument (a boolean) and, depending on
+ its value, it calls one function or another in the application.
+ \endlist
+
+ See also: \l Q_NOREPLY.
+
+ \section1 Signals
+
+ The signals in this example are defined as follows:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 8
+
+ However, signal definition isn't enough: signals have to be emitted. One simple way of emitting
+ signals is to connect another signal to them, so that Qt's signal handling system chains them
+ automatically. This is what is done for the \a aboutToQuit signal.
+
+ When this is the case, one can use the QDBusAbstractAdaptor::setAutoRelaySignals to
+ automatically connect every signal from the real object to the adaptor.
+
+ When simple signal-to-signal connection isn't enough, one can use a private slot do do some
+ work. This is what was done for the mainWindowHasFocus signal:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 9
+
+ This private slot (which will not be exported as a method via D-Bus) was connected to the
+ \c focusChanged signal in the adaptor's constructor. It is therefore able to shape the
+ application's signal into what the interface expects it to be.
+*/
+
+/*!
+ \page qdbusdeclaringslots.html
+ \title Declaring Slots in D-Bus Adaptors
+
+ Slots in D-Bus adaptors are declared just like normal, public slots, but their
+ parameters must follow certain rules (see \l{The QtDBus Type System} for more
+ information). Slots whose parameters do not follow those rules or that are not
+ public will not be accessible via D-Bus.
+
+ Slots can have one parameter of type \c{const QDBusMessage &}, which must
+ appear at the end of the input parameter list, before any output parameters.
+ This parameter, if present, will be initialized with a copy of the
+ current message being processed, which allows the callee to obtain
+ information about the caller, such as its connection name.
+
+ Slots can be of three kinds:
+ \list 1
+ \o Asynchronous
+ \o Input-only
+ \o Input-and-output
+ \endlist
+
+ \section1 Asynchronous Slots
+ Asynchronous slots are those that do not normally return any reply to the
+ caller. For that reason, they cannot take any output parameters. In most
+ cases, by the time the first line of the slot is run, the caller function
+ has already resumed working.
+
+ However, slots must not rely on that behavior. Scheduling and message-dispatching
+ issues could change the order in which the slot is run. Code intending to
+ synchronize with the caller should provide its own method of synchronization.
+
+ Asynchronous slots are marked by the keyword \l Q_NOREPLY in the method
+ signature, before the \c void return type and the slot name. (See the
+ \c quit() slot in the \l{D-Bus Adaptor Example}).
+
+ \section1 Input-Only Slots
+
+ Input-only slots are normal slots that take parameters passed by value or
+ by constant reference. However, unlike asynchronous slots, the caller is
+ usually waiting for completion of the callee before resuming operation.
+ Therefore, non-asynchronous slots should not block or should state it its
+ documentation that they may do so.
+
+ Input-only slots have no special marking in their signature, except that
+ they take only parameters passed by value or by constant reference.
+ Optionally, slots can take a QDBusMessage parameter as a last parameter,
+ which can be used to perform additional analysis of the method call message.
+
+ \section1 Input and Output Slots
+
+ Like input-only slots, input-and-output slots are those that the caller is
+ waiting for a reply. Unlike input-only ones, though, this reply will contain
+ data. Slots that output data may contain non-constant references and may
+ return a value as well. However, the output parameters must all appear at
+ the end of the argument list and may not have input arguments interleaved.
+ Optionally, a QDBusMessage argument may appear between the input and the
+ output arguments.
+
+ \section1 Automatic Replies
+
+ Method replies are generated automatically with the contents of the output
+ parameters (if there were any) by the QtDBus implementation. Slots need not
+ worry about constructing proper QDBusMessage objects and sending them over
+ the connection.
+
+ However, the possibility of doing so remains there. Should the slot find out
+ it needs to send a special reply or even an error, it can do so by using
+ QDBusMessage::createReply() or QDBusMessage::createErrorReply() on the
+ QDBusMessage parameter and send it with QDBusConnection::send(). The
+ QtDBus implementation will not generate any reply if the slot did so.
+
+ \warning When a caller places a method call and waits for a reply, it will
+ only wait for a limited amount of time. Slots intending to take a long time
+ to complete should make that fact clear in documentation so that callers
+ properly set higher timeouts.
+
+ \section1 Delayed Replies
+
+ In some circumstances, the called slot may not be able to process
+ the request immediately. This is frequently the case when the
+ request involves an I/O or networking operation which may block.
+
+ If this is the case, the slot should return control to the
+ application's main loop to avoid freezing the user interface, and
+ resume the process later. To accomplish this, it should make use
+ of the extra \c QDBusMessage parameter at the end of the input
+ parameter list and request a delayed reply.
+
+ We do this by writing a slot that stores the request data in a
+ persistent structure, indicating to the caller using
+ \l{QDBusMessage::setDelayedReply()}{QDBusMessage::setDelayedReply(true)}
+ that the response will be sent later.
+
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 10
+
+ The use of
+ \l{QDBusConnection::send()}{QDBusConnection::sessionBus().send(data->reply)}
+ is needed to explicitly inform the caller that the response will be delayed.
+ In this case, the return value is unimportant; we return an arbitrary value
+ to satisfy the compiler.
+
+ When the request is processed and a reply is available, it should be sent
+ using the \c QDBusMessage object that was obtained. In our example, the
+ reply code could be something as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 11
+
+ As can be seen in the example, when a delayed reply is in place,
+ the return value(s) from the slot will be ignored by QtDBus. They
+ are used only to determine the slot's signature when communicating
+ the adaptor's description to remote applications, or in case the
+ code in the slot decides not to use a delayed reply.
+
+ The delayed reply itself is requested from QtDBus by calling
+ QDBusMessage::reply() on the original message. It then becomes the
+ resposibility of the called code to eventually send a reply to the
+ caller.
+
+ \warning When a caller places a method call and waits for a reply, it will
+ only wait for a limited amount of time. Slots intending to take a long time
+ to complete should make that fact clear in documentation so that callers
+ properly set higher timeouts.
+
+ \sa {Using QtDBus Adaptors}, {Declaring Signals in D-Bus Adaptors},
+ {The QtDBus Type System}, QDBusConnection, QDBusMessage
+*/
+
+/*!
+ \page qdbusdeclaringsignals.html
+ \title Declaring Signals in D-Bus Adaptors
+
+ Any signal in a class derived from QDBusAbstractAdaptor will be automatically
+ relayed into D-Bus, provided that the signal's parameters conform to certain
+ rules (see \l{The QtDBus Type System} for more information). No special code
+ is necessary to make this relay.
+
+ However, signals must still be emitted. The easiest way to emit an adaptor
+ signal is to connect another signal to it, so that Qt's signals and slots
+ mechanism automatically emits the adaptor signal, too. This can be done in
+ the adaptor's constructor, as has been done in the
+ \l{D-Bus Adaptor Example}{D-Bus Adaptor example}.
+
+ The QDBusAbstractAdaptor::setAutoRelaySignals() convenience function can also
+ be used to make and break connections between signals in the real object and
+ the corresponding signals in the adaptor. It will inspect the list of signals
+ in both classes and connect those whose parameters match exactly.
+
+ \sa {Using QtDBus Adaptors},
+ {Declaring Slots in D-Bus Adaptors},
+ {The QtDBus Type System}, QDBusAbstractAdaptor
+*/
+
+/*!
+ \page qdbustypesystem.html
+ \title The QtDBus Type System
+
+ D-Bus has an extensible type system based on a few primitives and
+ composition of the primitives in arrays and structures. QtDBus
+ implements the interface to that type system through the
+ QDBusArgument class, allowing user programs to send and receive
+ practically every C++ type over the bus.
+
+ \section1 Primitive Types
+
+ The primitive types are supported natively by QDBusArgument and
+ need no special customization to be sent or received. They are
+ listed below, along with the C++ class they relate to:
+
+ \table
+ \header
+ \o Qt type
+ \o D-Bus equivalent type
+ \row
+ \o uchar
+ \o BYTE
+ \row
+ \o bool
+ \o BOOLEAN
+ \row
+ \o short
+ \o INT16
+ \row
+ \o ushort
+ \o UINT16
+ \row
+ \o int
+ \o INT32
+ \row
+ \o uint
+ \o UINT32
+ \row
+ \o qlonglong
+ \o INT64
+ \row
+ \o qulonglong
+ \o UINT64
+ \row
+ \o double
+ \o DOUBLE
+ \row
+ \o QString
+ \o STRING
+ \row
+ \o QDBusVariant
+ \o VARIANT
+ \row
+ \o QDBusObjectPath
+ \o OBJECT_PATH
+ \row
+ \o QDBusSignature
+ \o SIGNATURE
+ \endtable
+
+ Aside from the primitive types, QDBusArgument also supports two
+ non-primitive types natively, due to their widespread use in Qt
+ applications: QStringList and QByteArray.
+
+ \section1 Compound Types
+
+ D-Bus specifies three types of aggregations of primitive types
+ that allow one to create compound types. They are \c ARRAY, \c
+ STRUCT and maps/dictionaries.
+
+ Arrays are sets of zero or more elements of the same type, while
+ structures are a set of a fixed number of elements, each of any
+ type. Maps or dictionaries are implemented as arrays of a pair of
+ elements, so there can be zero or more elements in one map.
+
+ \section1 Extending the Type System
+
+ In order to use one's own type with QtDBus, the type has to be
+ declared as a Qt meta-type with the Q_DECLARE_METATYPE() macro and
+ registered with the qDBusRegisterMetaType() function. The
+ streaming operators \c{operator>>} and \c{operator<<} will be
+ automatically found by the registration system.
+
+ QtDBus provides template specializations for arrays and maps for
+ use with Qt's \l{Container classes}{container classes}, such as
+ QMap and QList, so it is not necessary to write the streaming
+ operator functions for those. For other types, and specially for
+ types implementing structures, the operators have to be explicitly
+ implemented.
+
+ See the documentation for QDBusArgument for examples for
+ structures, arrays and maps.
+
+ \section1 The Type System in Use
+
+ All of the QtDBus types (primitives and user-defined alike) can be
+ used to send and receive messages of all types over the bus.
+
+ \warning You may not use any type that is not on the list above,
+ including \a typedefs to the types listed. This also includes
+ QList<QVariant> and QMap<QString,QVariant>.
+*/
+
+/*!
+ \macro Q_NOREPLY
+ \relates QDBusAbstractAdaptor
+ \since 4.2
+
+ The Q_NOREPLY macro can be used to mark a method to be called and not wait for it to finish
+ processing before returning from QDBusInterface::call(). The called method cannot return any
+ output arguments and, if it does, any such arguments will be discarded.
+
+ You can use this macro in your own adaptors by placing it before your method's return value
+ (which must be "void") in the class declaration, as shown in the example:
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 12
+
+ Its presence in the method implementation (outside the class declaration) is optional.
+
+ \sa {Using QtDBus Adaptors}
+*/
diff --git a/doc/src/qdesktopwidget.qdoc b/doc/src/qdesktopwidget.qdoc
new file mode 100644
index 0000000..0361aae
--- /dev/null
+++ b/doc/src/qdesktopwidget.qdoc
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QDesktopWidget
+ \brief The QDesktopWidget class provides access to screen information on multi-head systems.
+
+ \ingroup advanced
+ \ingroup desktop
+ \ingroup environment
+ \mainclass
+
+ Systems with more than one graphics card and monitor can manage the
+ physical screen space available either as multiple desktops, or as a
+ large virtual desktop, which usually has the size of the bounding
+ rectangle of all the screens (see isVirtualDesktop()). For an
+ application, one of the available screens is the primary screen, i.e.
+ the screen where the main widget resides (see primaryScreen()). All
+ windows opened in the context of the application should be
+ constrained to the boundaries of the primary screen; for example,
+ it would be inconvenient if a dialog box popped up on a different
+ screen, or split over two screens.
+
+ The QDesktopWidget provides information about the geometry of the
+ available screens with screenGeometry(). The number of screens
+ available is returned by numScreens(). The screen number that a
+ particular point or widget is located in is returned by
+ screenNumber().
+
+ Widgets provided by Qt use this class, for example, to place
+ tooltips, menus and dialog boxes according to the parent or
+ application widget.
+
+ Applications can use this class to save window positions, or to place
+ child widgets on one screen.
+
+ \img qdesktopwidget.png Managing Multiple Screens
+
+ In the illustration above, Application One's primary screen is
+ screen 0, and App Two's primary screen is screen 1.
+
+ \target multiple screens note
+ \note QDesktopWidget inherits the QWidget properties, width() and
+ height(), which specify the size of the desktop. However, for
+ desktops with multiple screens, the size of the desktop is the union
+ of all the screen sizes, so width() and height() should \e not be
+ used for computing the size of a widget to be placed on one of the
+ screens. The correct width and height values are obtained using
+ availableGeometry() or screenGeometry() for a particular screen.
+
+ \sa QApplication, QX11Info::appRootWindow()
+*/
+
+/*!
+ \fn QDesktopWidget::QDesktopWidget()
+
+ Creates the desktop widget.
+
+ If the system supports a virtual desktop, this widget will have
+ the size of the virtual desktop; otherwise this widget will have
+ the size of the primary screen.
+
+ Instead of using QDesktopWidget directly, use QApplication::desktop().
+*/
+
+/*!
+ \fn QDesktopWidget::~QDesktopWidget()
+
+ Destroys the desktop widget and frees any allocated resources.
+*/
+
+/*!
+ \fn bool QDesktopWidget::isVirtualDesktop() const
+
+ Returns true if the system manages the available screens in a
+ virtual desktop; otherwise returns false.
+
+ For virtual desktops, screen() will always return the same widget.
+ The size of the virtual desktop is the size of this desktop
+ widget.
+*/
+
+/*!
+ \fn int QDesktopWidget::primaryScreen() const
+
+ Returns the index of the primary screen.
+
+ \sa numScreens()
+*/
+
+/*!
+ \fn int QDesktopWidget::numScreens() const
+
+ Returns the number of available screens.
+
+ \sa primaryScreen()
+*/
+
+/*!
+ \fn QWidget *QDesktopWidget::screen(int screen)
+
+ Returns a widget that represents the screen with index \a screen
+ (a value of -1 means the default screen).
+
+
+ If the system uses a virtual desktop, the returned widget will
+ have the geometry of the entire virtual desktop; i.e., bounding
+ every \a screen.
+
+ \sa primaryScreen(), numScreens(), isVirtualDesktop()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(int screen) const
+
+ Returns the available geometry of the screen with index \a screen. What
+ is available will be subrect of screenGeometry() based on what the
+ platform decides is available (for example excludes the dock and menu bar
+ on Mac OS X, or the task bar on Windows). The default screen is used if
+ \a screen is -1.
+
+ \sa screenNumber(), screenGeometry()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
+ \overload
+
+ Returns the available geometry of the screen which contains \a widget.
+
+ \sa screenGeometry()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(const QPoint &p) const
+ \overload
+
+ Returns the available geometry of the screen which contains \a p.
+
+ \sa screenGeometry()
+*/
+
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(int screen) const
+
+ Returns the geometry of the screen with index \a screen. The default
+ screen is used if \a screen is -1.
+
+ \sa screenNumber()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
+ \overload
+
+ Returns the geometry of the screen which contains \a widget.
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(const QPoint &p) const
+ \overload
+
+ Returns the geometry of the screen which contains \a p.
+*/
+
+
+/*!
+ \fn int QDesktopWidget::screenNumber(const QWidget *widget) const
+
+ Returns the index of the screen that contains the largest
+ part of \a widget, or -1 if the widget not on a screen.
+
+ \sa primaryScreen()
+*/
+
+/*!
+ \fn int QDesktopWidget::screenNumber(const QPoint &point) const
+
+ \overload
+ Returns the index of the screen that contains the \a point, or the
+ screen which is the shortest distance from the \a point.
+
+ \sa primaryScreen()
+*/
+
+/*!
+ \fn void QDesktopWidget::resizeEvent(QResizeEvent *event)
+ \reimp
+*/
+
+/*!
+ \fn void QDesktopWidget::resized(int screen)
+
+ This signal is emitted when the size of \a screen changes.
+*/
+
+/*!
+ \fn void QDesktopWidget::workAreaResized(int screen)
+
+ This signal is emitted when the work area available on \a screen changes.
+*/
diff --git a/doc/src/qiterator.qdoc b/doc/src/qiterator.qdoc
new file mode 100644
index 0000000..b1e95c6
--- /dev/null
+++ b/doc/src/qiterator.qdoc
@@ -0,0 +1,1431 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QListIterator
+ \inmodule QtCore
+
+ \brief The QListIterator class provides a Java-style const iterator for QList and QQueue.
+
+ QList has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ An alternative to using iterators is to use index positions. Most
+ QList member functions take an index as their first parameter,
+ making it possible to access, modify, and remove items without
+ using iterators.
+
+ QListIterator\<T\> allows you to iterate over a QList\<T\> (or a
+ QQueue\<T\>). If you want to modify the list as you iterate over
+ it, use QMutableListIterator\<T\> instead.
+
+ The QListIterator constructor takes a QList as argument. After
+ construction, the iterator is located at the very beginning of
+ the list (before the first item). Here's how to iterate over all
+ the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 0
+
+ The next() function returns the next item in the list and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, and returns the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 1
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ Multiple iterators can be used on the same list. If the list is
+ modified while a QListIterator is active, the QListIterator will
+ continue iterating over the original list, ignoring the modified
+ copy.
+
+ \sa QMutableListIterator, QList::const_iterator
+*/
+
+/*!
+ \class QLinkedListIterator
+ \inmodule QtCore
+
+ \brief The QLinkedListIterator class provides a Java-style const iterator for QLinkedList.
+
+ QLinkedList has both \l{Java-style iterators} and
+ \l{STL-style iterators}. The Java-style iterators are more
+ high-level and easier to use than the STL-style iterators; on the
+ other hand, they are slightly less efficient.
+
+ QLinkedListIterator\<T\> allows you to iterate over a
+ QLinkedList\<T\>. If you want to modify the list as you iterate
+ over it, use QMutableLinkedListIterator\<T\> instead.
+
+ The QLinkedListIterator constructor takes a QLinkedList as
+ argument. After construction, the iterator is located at the very
+ beginning of the list (before the first item). Here's how to
+ iterate over all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 2
+
+ The next() function returns the next item in the list and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, and returns the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 3
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ Multiple iterators can be used on the same list. If the list is
+ modified while a QLinkedListIterator is active, the
+ QLinkedListIterator will continue iterating over the original
+ list, ignoring the modified copy.
+
+ \sa QMutableLinkedListIterator, QLinkedList::const_iterator
+*/
+
+/*!
+ \class QVectorIterator
+ \inmodule QtCore
+ \brief The QVectorIterator class provides a Java-style const iterator for QVector and QStack.
+
+ QVector has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ An alternative to using iterators is to use index positions. Most
+ QVector member functions take an index as their first parameter,
+ making it possible to access, insert, and remove items without
+ using iterators.
+
+ QVectorIterator\<T\> allows you to iterate over a QVector\<T\>
+ (or a QStack\<T\>). If you want to modify the vector as you
+ iterate over it, use QMutableVectorIterator\<T\> instead.
+
+ The QVectorIterator constructor takes a QVector as argument.
+ After construction, the iterator is located at the very beginning
+ of the vector (before the first item). Here's how to iterate over
+ all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 4
+
+ The next() function returns the next item in the vector and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 5
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ Multiple iterators can be used on the same vector. If the vector
+ is modified while a QVectorIterator is active, the QVectorIterator
+ will continue iterating over the original vector, ignoring the
+ modified copy.
+
+ \sa QMutableVectorIterator, QVector::const_iterator
+*/
+
+/*!
+ \class QSetIterator
+ \inmodule QtCore
+ \brief The QSetIterator class provides a Java-style const iterator for QSet.
+
+ QSet supports both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QSetIterator\<T\> allows you to iterate over a QSet\<T\>. If you
+ want to modify the set as you iterate over it, use
+ QMutableSetIterator\<T\> instead.
+
+ The constructor takes a QSet as argument. After construction, the
+ iterator is located at the very beginning of the set (before
+ the first item). Here's how to iterate over all the elements
+ sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 6
+
+ The next() function returns the next item in the set and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 7
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ Multiple iterators can be used on the same set. If the set
+ is modified while a QSetIterator is active, the QSetIterator
+ will continue iterating over the original set, ignoring the
+ modified copy.
+
+ \sa QMutableSetIterator, QSet::const_iterator
+*/
+
+/*!
+ \class QMutableListIterator
+ \inmodule QtCore
+
+ \brief The QMutableListIterator class provides a Java-style non-const iterator for QList and QQueue.
+
+ QList has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ An alternative to using iterators is to use index positions. Most
+ QList member functions take an index as their first parameter,
+ making it possible to access, insert, and remove items without
+ using iterators.
+
+ QMutableListIterator\<T\> allows you to iterate over a QList\<T\>
+ (or a QQueue\<T\>) and modify the list. If you don't want to
+ modify the list (or have a const QList), use the slightly faster
+ QListIterator\<T\> instead.
+
+ The QMutableListIterator constructor takes a QList as argument.
+ After construction, the iterator is located at the very beginning
+ of the list (before the first item). Here's how to iterate over
+ all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 8
+
+ The next() function returns the next item in the list and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 9
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ If you want to remove items as you iterate over the list, use
+ remove(). If you want to modify the value of an item, use
+ setValue(). If you want to insert a new item in the list, use
+ insert().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 10
+
+ The example traverses a list, replacing negative numbers with
+ their absolute values, and eliminating zeroes.
+
+ Only one mutable iterator can be active on a given list at any
+ time. Furthermore, no changes should be done directly to the list
+ while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QListIterator, QList::iterator
+*/
+
+/*!
+ \class QMutableLinkedListIterator
+ \inmodule QtCore
+
+ \brief The QMutableLinkedListIterator class provides a Java-style non-const iterator for QLinkedList.
+
+ QLinkedList has both \l{Java-style iterators} and
+ \l{STL-style iterators}. The Java-style iterators are more
+ high-level and easier to use than the STL-style iterators; on the
+ other hand, they are slightly less efficient.
+
+ QMutableLinkedListIterator\<T\> allows you to iterate over a
+ QLinkedList\<T\> and modify the list. If you don't want to modify
+ the list (or have a const QLinkedList), use the slightly faster
+ QLinkedListIterator\<T\> instead.
+
+ The QMutableLinkedListIterator constructor takes a QLinkedList as
+ argument. After construction, the iterator is located at the very
+ beginning of the list (before the first item). Here's how to
+ iterate over all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 11
+
+ The next() function returns the next item in the list and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 12
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ If you want to remove items as you iterate over the list, use
+ remove(). If you want to modify the value of an item, use
+ setValue(). If you want to insert a new item in the list, use
+ insert().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 13
+
+ The example traverses a list, replacing negative numbers with
+ their absolute values, and eliminating zeroes.
+
+ Only one mutable iterator can be active on a given list at any
+ time. Furthermore, no changes should be done directly to the list
+ while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QLinkedListIterator, QLinkedList::iterator
+*/
+
+/*!
+ \class QMutableVectorIterator
+ \inmodule QtCore
+
+ \brief The QMutableVectorIterator class provides a Java-style non-const iterator for QVector and QStack.
+
+ QVector has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ An alternative to using iterators is to use index positions. Most
+ QVector member functions take an index as their first parameter,
+ making it possible to access, insert, and remove items without
+ using iterators.
+
+ QMutableVectorIterator\<T\> allows you to iterate over a
+ QVector\<T\> and modify the vector. If you don't want to modify
+ the vector (or have a const QVector), use the slightly faster
+ QVectorIterator\<T\> instead.
+
+ The QMutableVectorIterator constructor takes a QVector as
+ argument. After construction, the iterator is located at the very
+ beginning of the list (before the first item). Here's how to
+ iterate over all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 14
+
+ The next() function returns the next item in the vector and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 15
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop.
+
+ If you want to remove items as you iterate over the vector, use
+ remove(). If you want to modify the value of an item, use
+ setValue(). If you want to insert a new item in the vector, use
+ insert().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 16
+
+ The example traverses a vector, replacing negative numbers with
+ their absolute values, and eliminating zeroes.
+
+ Only one mutable iterator can be active on a given vector at any
+ time. Furthermore, no changes should be done directly to the
+ vector while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QVectorIterator, QVector::iterator
+*/
+
+/*!
+ \class QMutableSetIterator
+ \inmodule QtCore
+ \since 4.2
+
+ \brief The QMutableSetIterator class provides a Java-style non-const iterator for QSet.
+
+ QSet has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QMutableSetIterator\<T\> allows you to iterate over a QSet\<T\>
+ and remove items from the set as you iterate. If you don't want
+ to modify the set (or have a const QSet), use the slightly faster
+ QSetIterator\<T\> instead.
+
+ The QMutableSetIterator constructor takes a QSet as argument.
+ After construction, the iterator is located at the very beginning
+ of the set (before the first item). Here's how to iterate over
+ all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 17
+
+ The next() function returns the next item in the set and
+ advances the iterator. Unlike STL-style iterators, Java-style
+ iterators point \e between items rather than directly \e at
+ items. The first call to next() advances the iterator to the
+ position between the first and second item, and returns the first
+ item; the second call to next() advances the iterator to the
+ position between the second and third item, returning the second
+ item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 18
+
+ If you want to remove items as you iterate over the set, use
+ remove().
+
+ Only one mutable iterator can be active on a given set at any
+ time. Furthermore, no changes should be done directly to the set
+ while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QSetIterator, QSet::iterator
+*/
+
+/*!
+ \fn QListIterator::QListIterator(const QList<T> &list)
+ \fn QLinkedListIterator::QLinkedListIterator(const QLinkedList<T> &list)
+ \fn QMutableListIterator::QMutableListIterator(QList<T> &list)
+ \fn QMutableLinkedListIterator::QMutableLinkedListIterator(QLinkedList<T> &list)
+
+ Constructs an iterator for traversing \a list. The iterator is
+ set to be at the front of the list (before the first item).
+
+ \sa operator=()
+*/
+
+/*!
+ \fn QVectorIterator::QVectorIterator(const QVector<T> &vector)
+ \fn QMutableVectorIterator::QMutableVectorIterator(QVector<T> &vector)
+
+ Constructs an iterator for traversing \a vector. The iterator is
+ set to be at the front of the vector (before the first item).
+
+ \sa operator=()
+*/
+
+/*!
+ \fn QSetIterator::QSetIterator(const QSet<T> &set)
+ \fn QMutableSetIterator::QMutableSetIterator(QSet<T> &set)
+
+ Constructs an iterator for traversing \a set. The iterator is
+ set to be at the front of the set (before the first item).
+
+ \sa operator=()
+*/
+
+/*!
+ \fn QMutableListIterator::~QMutableListIterator()
+ \fn QMutableLinkedListIterator::~QMutableLinkedListIterator()
+ \fn QMutableVectorIterator::~QMutableVectorIterator()
+ \fn QMutableSetIterator::~QMutableSetIterator()
+
+ Destroys the iterator.
+
+ \sa operator=()
+*/
+
+/*! \fn QMutableListIterator &QMutableListIterator::operator=(QList<T> &list)
+ \fn QMutableLinkedListIterator &QMutableLinkedListIterator::operator=(QLinkedList<T> &list)
+ \fn QListIterator &QListIterator::operator=(const QList<T> &list)
+ \fn QLinkedListIterator &QLinkedListIterator::operator=(const QLinkedList<T> &list)
+
+ Makes the iterator operate on \a list. The iterator is set to be
+ at the front of the list (before the first item).
+
+ \sa toFront(), toBack()
+*/
+
+/*! \fn QVectorIterator &QVectorIterator::operator=(const QVector<T> &vector)
+ \fn QMutableVectorIterator &QMutableVectorIterator::operator=(QVector<T> &vector)
+
+ Makes the iterator operate on \a vector. The iterator is set to be
+ at the front of the vector (before the first item).
+
+ \sa toFront(), toBack()
+*/
+
+/*! \fn QSetIterator &QSetIterator::operator=(const QSet<T> &set)
+ \fn QMutableSetIterator &QMutableSetIterator::operator=(QSet<T> &set)
+
+ Makes the iterator operate on \a set. The iterator is set to be
+ at the front of the set (before the first item).
+
+ \sa toFront(), toBack()
+*/
+
+/*! \fn void QListIterator::toFront()
+ \fn void QLinkedListIterator::toFront()
+ \fn void QVectorIterator::toFront()
+ \fn void QSetIterator::toFront()
+ \fn void QMutableListIterator::toFront()
+ \fn void QMutableLinkedListIterator::toFront()
+ \fn void QMutableVectorIterator::toFront()
+ \fn void QMutableSetIterator::toFront()
+
+ Moves the iterator to the front of the container (before the
+ first item).
+
+ \sa toBack(), next()
+*/
+
+/*! \fn void QListIterator::toBack()
+ \fn void QLinkedListIterator::toBack()
+ \fn void QVectorIterator::toBack()
+ \fn void QSetIterator::toBack()
+ \fn void QMutableListIterator::toBack()
+ \fn void QMutableLinkedListIterator::toBack()
+ \fn void QMutableVectorIterator::toBack()
+ \fn void QMutableSetIterator::toBack()
+
+ Moves the iterator to the back of the container (after the last
+ item).
+
+ \sa toFront(), previous()
+*/
+
+/*! \fn bool QListIterator::hasNext() const
+ \fn bool QLinkedListIterator::hasNext() const
+ \fn bool QVectorIterator::hasNext() const
+ \fn bool QSetIterator::hasNext() const
+ \fn bool QMutableListIterator::hasNext() const
+ \fn bool QMutableLinkedListIterator::hasNext() const
+ \fn bool QMutableVectorIterator::hasNext() const
+ \fn bool QMutableSetIterator::hasNext() const
+
+ Returns true if there is at least one item ahead of the iterator,
+ i.e. the iterator is \e not at the back of the container;
+ otherwise returns false.
+
+ \sa hasPrevious(), next()
+*/
+
+/*! \fn const T &QListIterator::next()
+ \fn const T &QLinkedListIterator::next()
+ \fn const T &QVectorIterator::next()
+ \fn const T &QSetIterator::next()
+ \fn const T &QMutableSetIterator::next()
+
+ Returns the next item and advances the iterator by one position.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), peekNext(), previous()
+*/
+
+/*! \fn T &QMutableListIterator::next()
+ \fn T &QMutableLinkedListIterator::next()
+ \fn T &QMutableVectorIterator::next()
+
+ Returns a reference to the next item, and advances the iterator
+ by one position.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), peekNext(), previous()
+*/
+
+/*! \fn const T &QListIterator::peekNext() const
+ \fn const T &QLinkedListIterator::peekNext() const
+ \fn const T &QVectorIterator::peekNext() const
+ \fn const T &QSetIterator::peekNext() const
+ \fn const T &QMutableSetIterator::peekNext() const
+
+ Returns the next item without moving the iterator.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), next(), peekPrevious()
+*/
+
+/*! \fn T &QMutableListIterator::peekNext() const
+ \fn T &QMutableLinkedListIterator::peekNext() const
+ \fn T &QMutableVectorIterator::peekNext() const
+
+ Returns a reference to the next item, without moving the iterator.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), next(), peekPrevious()
+*/
+
+/*! \fn bool QListIterator::hasPrevious() const
+ \fn bool QLinkedListIterator::hasPrevious() const
+ \fn bool QVectorIterator::hasPrevious() const
+ \fn bool QSetIterator::hasPrevious() const
+ \fn bool QMutableListIterator::hasPrevious() const
+ \fn bool QMutableLinkedListIterator::hasPrevious() const
+ \fn bool QMutableVectorIterator::hasPrevious() const
+ \fn bool QMutableSetIterator::hasPrevious() const
+
+ Returns true if there is at least one item behind the iterator,
+ i.e. the iterator is \e not at the front of the container;
+ otherwise returns false.
+
+ \sa hasNext(), previous()
+*/
+
+/*! \fn const T &QListIterator::previous()
+ \fn const T &QLinkedListIterator::previous()
+ \fn const T &QVectorIterator::previous()
+ \fn const T &QSetIterator::previous()
+ \fn const T &QMutableSetIterator::previous()
+
+ Returns the previous item and moves the iterator back by one
+ position.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), peekPrevious(), next()
+*/
+
+/*! \fn T &QMutableListIterator::previous()
+ \fn T &QMutableLinkedListIterator::previous()
+ \fn T &QMutableVectorIterator::previous()
+
+ Returns a reference to the previous item and moves the iterator
+ back by one position.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), peekPrevious(), next()
+*/
+
+/*! \fn const T &QListIterator::peekPrevious() const
+ \fn const T &QLinkedListIterator::peekPrevious() const
+ \fn const T &QVectorIterator::peekPrevious() const
+ \fn const T &QSetIterator::peekPrevious() const
+ \fn const T &QMutableSetIterator::peekPrevious() const
+
+ Returns the previous item without moving the iterator.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), previous(), peekNext()
+*/
+
+/*! \fn T &QMutableListIterator::peekPrevious() const
+ \fn T &QMutableLinkedListIterator::peekPrevious() const
+ \fn T &QMutableVectorIterator::peekPrevious() const
+
+ Returns a reference to the previous item, without moving the iterator.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), previous(), peekNext()
+*/
+
+/*! \fn bool QListIterator::findNext(const T &value)
+ \fn bool QLinkedListIterator::findNext(const T &value)
+ \fn bool QVectorIterator::findNext(const T &value)
+ \fn bool QSetIterator::findNext(const T &value)
+ \fn bool QMutableListIterator::findNext(const T &value)
+ \fn bool QMutableLinkedListIterator::findNext(const T &value)
+ \fn bool QMutableVectorIterator::findNext(const T &value)
+ \fn bool QMutableSetIterator::findNext(const T &value)
+
+ Searches for \a value starting from the current iterator position
+ forward. Returns true if \a value is found; otherwise returns false.
+
+ After the call, if \a value was found, the iterator is positioned
+ just after the matching item; otherwise, the iterator is
+ positioned at the back of the container.
+
+ \sa findPrevious()
+*/
+
+/*! \fn bool QListIterator::findPrevious(const T &value)
+ \fn bool QLinkedListIterator::findPrevious(const T &value)
+ \fn bool QVectorIterator::findPrevious(const T &value)
+ \fn bool QSetIterator::findPrevious(const T &value)
+ \fn bool QMutableListIterator::findPrevious(const T &value)
+ \fn bool QMutableLinkedListIterator::findPrevious(const T &value)
+ \fn bool QMutableVectorIterator::findPrevious(const T &value)
+ \fn bool QMutableSetIterator::findPrevious(const T &value)
+
+ Searches for \a value starting from the current iterator position
+ backward. Returns true if \a value is found; otherwise returns
+ false.
+
+ After the call, if \a value was found, the iterator is positioned
+ just before the matching item; otherwise, the iterator is
+ positioned at the front of the container.
+
+ \sa findNext()
+*/
+
+/*! \fn void QMutableListIterator::remove()
+
+ Removes the last item that was jumped over using one of the
+ traversal functions (next(), previous(), findNext(), findPrevious()).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 19
+
+ \sa insert(), setValue()
+*/
+
+/*! \fn void QMutableLinkedListIterator::remove()
+
+ Removes the last item that was jumped over using one of the
+ traversal functions (next(), previous(), findNext(), findPrevious()).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 20
+
+ \sa insert(), setValue()
+*/
+
+/*! \fn void QMutableVectorIterator::remove()
+
+ Removes the last item that was jumped over using one of the
+ traversal functions (next(), previous(), findNext(), findPrevious()).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 21
+
+ \sa insert(), setValue()
+*/
+
+/*! \fn void QMutableSetIterator::remove()
+
+ Removes the last item that was jumped over using one of the
+ traversal functions (next(), previous(), findNext(), findPrevious()).
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 22
+
+ \sa value()
+*/
+
+/*! \fn void QMutableListIterator::setValue(const T &value) const
+
+ Replaces the value of the last item that was jumped over using
+ one of the traversal functions with \a value.
+
+ The traversal functions are next(), previous(), findNext(), and
+ findPrevious().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 23
+
+ \sa value(), remove(), insert()
+*/
+
+/*! \fn void QMutableLinkedListIterator::setValue(const T &value) const
+
+ Replaces the value of the last item that was jumped over using
+ one of the traversal functions with \a value.
+
+ The traversal functions are next(), previous(), findNext(), and
+ findPrevious().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 24
+
+ \sa value(), remove(), insert()
+*/
+
+/*! \fn void QMutableVectorIterator::setValue(const T &value) const
+
+ Replaces the value of the last item that was jumped over using
+ one of the traversal functions with \a value.
+
+ The traversal functions are next(), previous(), findNext(), and
+ findPrevious().
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 25
+
+ \sa value(), remove(), insert()
+*/
+
+/*! \fn const T &QMutableListIterator::value() const
+ \fn const T &QMutableLinkedListIterator::value() const
+ \fn const T &QMutableVectorIterator::value() const
+ \fn const T &QMutableSetIterator::value() const
+
+ Returns the value of the last item that was jumped over using one
+ of the traversal functions (next(), previous(), findNext(),
+ findPrevious()).
+
+ After a call to next() or findNext(), value() is equivalent to
+ peekPrevious(). After a call to previous() or findPrevious(), value() is
+ equivalent to peekNext().
+*/
+
+/*!
+ \fn T &QMutableListIterator::value()
+ \fn T &QMutableLinkedListIterator::value()
+ \fn T &QMutableVectorIterator::value()
+ \overload
+
+ Returns a non-const reference to the value of the last item that
+ was jumped over using one of the traversal functions.
+*/
+
+/*! \fn void QMutableListIterator::insert(const T &value)
+ \fn void QMutableLinkedListIterator::insert(const T &value)
+ \fn void QMutableVectorIterator::insert(const T &value)
+
+ Inserts \a value at the current iterator position. After the
+ call, the iterator is located just after the inserted item.
+
+ \sa remove(), setValue()
+*/
+
+/*!
+ \class QMapIterator
+ \inmodule QtCore
+
+ \brief The QMapIterator class provides a Java-style const iterator for QMap and QMultiMap.
+
+ QMap has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QMapIterator\<Key, T\> allows you to iterate over a QMap (or a
+ QMultiMap). If you want to modify the map as you iterate over
+ it, use QMutableMapIterator instead.
+
+ The QMapIterator constructor takes a QMap as argument. After
+ construction, the iterator is located at the very beginning of
+ the map (before the first item). Here's how to iterate over all
+ the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 26
+
+ The next() function returns the next item in the map and
+ advances the iterator. The key() and value() functions return the
+ key and value of the last item that was jumped over.
+
+ Unlike STL-style iterators, Java-style iterators point \e between
+ items rather than directly \e at items. The first call to next()
+ advances the iterator to the position between the first and
+ second item, and returns the first item; the second call to
+ next() advances the iterator to the position between the second
+ and third item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 27
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 28
+
+ Multiple iterators can be used on the same map. If the map is
+ modified while a QMapIterator is active, the QMapIterator will
+ continue iterating over the original map, ignoring the modified
+ copy.
+
+ \sa QMutableMapIterator, QMap::const_iterator
+*/
+
+/*!
+ \class QHashIterator
+ \inmodule QtCore
+
+ \brief The QHashIterator class provides a Java-style const iterator for QHash and QMultiHash.
+
+ QHash has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QHashIterator\<Key, T\> allows you to iterate over a QHash (or a
+ QMultiHash). If you want to modify the hash as you iterate over
+ it, use QMutableHashIterator instead.
+
+ The QHashIterator constructor takes a QHash as argument. After
+ construction, the iterator is located at the very beginning of
+ the hash (before the first item). Here's how to iterate over all
+ the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 29
+
+ The next() function returns the next item in the hash and
+ advances the iterator. The key() and value() functions return the
+ key and value of the last item that was jumped over.
+
+ Unlike STL-style iterators, Java-style iterators point \e between
+ items rather than directly \e at items. The first call to next()
+ advances the iterator to the position between the first and
+ second item, and returns the first item; the second call to
+ next() advances the iterator to the position between the second
+ and third item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 30
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 31
+
+ Multiple iterators can be used on the same hash. If the hash is
+ modified while a QHashIterator is active, the QHashIterator will
+ continue iterating over the original hash, ignoring the modified
+ copy.
+
+ \sa QMutableHashIterator, QHash::const_iterator
+*/
+
+/*!
+ \class QMutableMapIterator
+ \inmodule QtCore
+
+ \brief The QMutableMapIterator class provides a Java-style non-const iterator for QMap and QMultiMap.
+
+ QMap has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QMutableMapIterator\<Key, T\> allows you to iterate over a QMap
+ (or a QMultiMap) and modify the map. If you don't want to modify
+ the map (or have a const QMap), use the slightly faster
+ QMapIterator instead.
+
+ The QMutableMapIterator constructor takes a QMap as argument.
+ After construction, the iterator is located at the very beginning
+ of the map (before the first item). Here's how to iterate over
+ all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 32
+
+ The next() function returns the next item in the map and
+ advances the iterator. The key() and value() functions return the
+ key and value of the last item that was jumped over.
+
+ Unlike STL-style iterators, Java-style iterators point \e between
+ items rather than directly \e at items. The first call to next()
+ advances the iterator to the position between the first and
+ second item, and returns the first item; the second call to
+ next() advances the iterator to the position between the second
+ and third item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 33
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 34
+
+ If you want to remove items as you iterate over the map, use
+ remove(). If you want to modify the value of an item, use
+ setValue().
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 35
+
+ The example removes all (key, value) pairs where the key and the
+ value are the same.
+
+ Only one mutable iterator can be active on a given map at any
+ time. Furthermore, no changes should be done directly to the map
+ while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QMapIterator, QMap::iterator
+*/
+
+/*!
+ \class QMutableHashIterator
+ \inmodule QtCore
+
+ \brief The QMutableHashIterator class provides a Java-style non-const iterator for QHash and QMultiHash.
+
+ QHash has both \l{Java-style iterators} and \l{STL-style
+ iterators}. The Java-style iterators are more high-level and
+ easier to use than the STL-style iterators; on the other hand,
+ they are slightly less efficient.
+
+ QMutableHashIterator\<Key, T\> allows you to iterate over a QHash
+ (or a QMultiHash) and modify the hash. If you don't want to modify
+ the hash (or have a const QHash), use the slightly faster
+ QHashIterator instead.
+
+ The QMutableHashIterator constructor takes a QHash as argument.
+ After construction, the iterator is located at the very beginning
+ of the hash (before the first item). Here's how to iterate over
+ all the elements sequentially:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 36
+
+ The next() function returns the next item in the hash and
+ advances the iterator. The key() and value() functions return the
+ key and value of the last item that was jumped over.
+
+ Unlike STL-style iterators, Java-style iterators point \e between
+ items rather than directly \e at items. The first call to next()
+ advances the iterator to the position between the first and
+ second item, and returns the first item; the second call to
+ next() advances the iterator to the position between the second
+ and third item; and so on.
+
+ \img javaiterators1.png
+
+ Here's how to iterate over the elements in reverse order:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 37
+
+ If you want to find all occurrences of a particular value, use
+ findNext() or findPrevious() in a loop. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 38
+
+ If you want to remove items as you iterate over the hash, use
+ remove(). If you want to modify the value of an item, use
+ setValue().
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 39
+
+ The example removes all (key, value) pairs where the key and the
+ value are the same.
+
+ Only one mutable iterator can be active on a given hash at any
+ time. Furthermore, no changes should be done directly to the hash
+ while the iterator is active (as opposed to through the
+ iterator), since this could invalidate the iterator and lead to
+ undefined behavior.
+
+ \sa QHashIterator, QHash::iterator
+*/
+
+/*! \fn QMapIterator::QMapIterator(const QMap<Key, T> &map)
+ \fn QMutableMapIterator::QMutableMapIterator(QMap<Key, T> &map)
+
+ Constructs an iterator for traversing \a map. The iterator is set
+ to be at the front of the map (before the first item).
+
+ \sa operator=()
+*/
+
+/*! \fn QHashIterator::QHashIterator(const QHash<Key, T> &hash)
+ \fn QMutableHashIterator::QMutableHashIterator(QHash<Key, T> &hash)
+
+ Constructs an iterator for traversing \a hash. The iterator is
+ set to be at the front of the hash (before the first item).
+
+ \sa operator=()
+*/
+
+/*!
+ \fn QMutableMapIterator::~QMutableMapIterator()
+ \fn QMutableHashIterator::~QMutableHashIterator()
+
+ Destroys the iterator.
+
+ \sa operator=()
+*/
+
+/*! \fn QMapIterator &QMapIterator::operator=(const QMap<Key, T> &map)
+ \fn QMutableMapIterator &QMutableMapIterator::operator=(QMap<Key, T> &map)
+
+ Makes the iterator operate on \a map. The iterator is set to be
+ at the front of the map (before the first item).
+
+ \sa toFront(), toBack()
+*/
+
+/*! \fn QHashIterator &QHashIterator::operator=(const QHash<Key, T> &hash)
+ \fn QMutableHashIterator &QMutableHashIterator::operator=(QHash<Key, T> &hash)
+
+ Makes the iterator operate on \a hash. The iterator is set to be
+ at the front of the hash (before the first item).
+
+ \sa toFront(), toBack()
+*/
+
+/*! \fn void QMapIterator::toFront()
+ \fn void QHashIterator::toFront()
+ \fn void QMutableMapIterator::toFront()
+ \fn void QMutableHashIterator::toFront()
+
+ Moves the iterator to the front of the container (before the
+ first item).
+
+ \sa toBack(), next()
+*/
+
+/*! \fn void QMapIterator::toBack()
+ \fn void QHashIterator::toBack()
+ \fn void QMutableMapIterator::toBack()
+ \fn void QMutableHashIterator::toBack()
+
+ Moves the iterator to the back of the container (after the last
+ item).
+
+ \sa toFront(), previous()
+*/
+
+/*! \fn bool QMapIterator::hasNext() const
+ \fn bool QHashIterator::hasNext() const
+ \fn bool QMutableMapIterator::hasNext() const
+ \fn bool QMutableHashIterator::hasNext() const
+
+ Returns true if there is at least one item ahead of the iterator,
+ i.e. the iterator is \e not at the back of the container;
+ otherwise returns false.
+
+ \sa hasPrevious(), next()
+*/
+
+/*! \fn QMapIterator::Item QMapIterator::next()
+ \fn QHashIterator::Item QHashIterator::next()
+
+ Returns the next item and advances the iterator by one position.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), peekNext(), previous()
+*/
+
+/*! \fn QMutableMapIterator::Item QMutableMapIterator::next()
+ \fn QMutableHashIterator::Item QMutableHashIterator::next()
+
+ Returns the next item and advances the iterator by one position.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), peekNext(), previous()
+*/
+
+/*! \fn QMapIterator::Item QMapIterator::peekNext() const
+ \fn QHashIterator::Item QHashIterator::peekNext() const
+
+ Returns the next item without moving the iterator.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), next(), peekPrevious()
+*/
+
+/*! \fn QMutableMapIterator::Item QMutableMapIterator::peekNext() const
+ \fn QMutableHashIterator::Item QMutableHashIterator::peekNext() const
+
+ Returns a reference to the next item without moving the iterator.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), next(), peekPrevious()
+*/
+
+/*! \fn bool QMapIterator::hasPrevious() const
+ \fn bool QHashIterator::hasPrevious() const
+ \fn bool QMutableMapIterator::hasPrevious() const
+ \fn bool QMutableHashIterator::hasPrevious() const
+
+ Returns true if there is at least one item behind the iterator,
+ i.e. the iterator is \e not at the front of the container;
+ otherwise returns false.
+
+ \sa hasNext(), previous()
+*/
+
+/*! \fn QMapIterator::Item QMapIterator::previous()
+ \fn QHashIterator::Item QHashIterator::previous()
+
+ Returns the previous item and moves the iterator back by one
+ position.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), peekPrevious(), next()
+*/
+
+/*! \fn QMutableMapIterator::Item QMutableMapIterator::previous()
+ \fn QMutableHashIterator::Item QMutableHashIterator::previous()
+
+ Returns the previous item and moves the iterator back by one
+ position.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), peekPrevious(), next()
+*/
+
+/*! \fn QMapIterator::Item QMapIterator::peekPrevious() const
+ \fn QHashIterator::Item QHashIterator::peekPrevious() const
+
+ Returns the previous item without moving the iterator.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), previous(), peekNext()
+*/
+
+/*! \fn QMutableMapIterator::Item QMutableMapIterator::peekPrevious() const
+ \fn QMutableHashIterator::Item QMutableHashIterator::peekPrevious() const
+
+ Returns the previous item without moving the iterator.
+
+ Call key() on the return value to obtain the item's key, and
+ value() to obtain the value.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), previous(), peekNext()
+*/
+
+/*! \fn const T &QMapIterator::value() const
+ \fn const T &QHashIterator::value() const
+
+ Returns the value of the last item that was jumped over using one
+ of the traversal functions (next(), previous(), findNext(),
+ findPrevious()).
+
+ After a call to next() or findNext(), value() is
+ equivalent to peekPrevious().value(). After a call to previous()
+ or findPrevious(), value() is equivalent to peekNext().value().
+
+ \sa key()
+*/
+
+/*!
+ \fn const T &QMutableMapIterator::value() const
+ \fn const T &QMutableHashIterator::value() const
+
+ Returns the value of the last item that was jumped over using one
+ of the traversal functions (next(), previous(), findNext(),
+ findPrevious()).
+
+ After a call to next() or findNext(), value() is
+ equivalent to peekPrevious().value(). After a call to previous()
+ or findPrevious(), value() is equivalent to peekNext().value().
+
+ \sa key(), setValue()
+*/
+
+/*!
+ \fn T &QMutableMapIterator::value()
+ \fn T &QMutableHashIterator::value()
+ \overload
+
+ Returns a non-const reference to the value of
+ the last item that was jumped over using one
+ of the traversal functions.
+*/
+
+/*! \fn const Key &QMapIterator::key() const
+ \fn const Key &QHashIterator::key() const
+ \fn const Key &QMutableMapIterator::key() const
+ \fn const Key &QMutableHashIterator::key() const
+
+ Returns the key of the last item that was jumped over using one
+ of the traversal functions (next(), previous(), findNext(),
+ findPrevious()).
+
+ After a call to next() or findNext(), key() is
+ equivalent to peekPrevious().key(). After a call to previous() or
+ findPrevious(), key() is equivalent to peekNext().key().
+
+ \sa value()
+*/
+
+/*! \fn bool QMapIterator::findNext(const T &value)
+ \fn bool QHashIterator::findNext(const T &value)
+ \fn bool QMutableMapIterator::findNext(const T &value)
+ \fn bool QMutableHashIterator::findNext(const T &value)
+
+ Searches for \a value starting from the current iterator position
+ forward. Returns true if a (key, value) pair with value \a value
+ is found; otherwise returns false.
+
+ After the call, if \a value was found, the iterator is positioned
+ just after the matching item; otherwise, the iterator is
+ positioned at the back of the container.
+
+ \sa findPrevious()
+*/
+
+/*! \fn bool QMapIterator::findPrevious(const T &value)
+ \fn bool QHashIterator::findPrevious(const T &value)
+ \fn bool QMutableMapIterator::findPrevious(const T &value)
+ \fn bool QMutableHashIterator::findPrevious(const T &value)
+
+ Searches for \a value starting from the current iterator position
+ backward. Returns true if a (key, value) pair with value \a value
+ is found; otherwise returns false.
+
+ After the call, if \a value was found, the iterator is positioned
+ just before the matching item; otherwise, the iterator is
+ positioned at the front of the container.
+
+ \sa findNext()
+*/
+
+/*! \fn void QMutableMapIterator::remove()
+ \fn void QMutableHashIterator::remove()
+
+ Removes the last item that was jumped over using one of the
+ traversal functions (next(), previous(), findNext(), findPrevious()).
+
+ \sa setValue()
+*/
+
+/*! \fn void QMutableMapIterator::setValue(const T &value)
+ \fn void QMutableHashIterator::setValue(const T &value)
+
+ Replaces the value of the last item that was jumped over using
+ one of the traversal functions with \a value.
+
+ The traversal functions are next(), previous(), findNext(), and
+ findPrevious().
+
+ \sa key(), value(), remove()
+*/
diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc
new file mode 100644
index 0000000..30da8c6
--- /dev/null
+++ b/doc/src/qmake-manual.qdoc
@@ -0,0 +1,4175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qmake-manual.html
+ \title qmake Manual
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage qmake Tutorial
+
+ \ingroup buildsystem
+ \ingroup qttools
+ \keyword qmake
+
+ \c qmake is a tool that helps simplify the build
+ process for development project across different platforms. \c qmake
+ automates the generation of Makefiles so that only a few lines of
+ information are needed to create each Makefile. \c qmake can be used for
+ any software project, whether it is written in Qt or not.
+
+ \c qmake generates a Makefile based on the information in a project
+ file. Project files are created by the developer, and are usually
+ simple, but more sophisticated project files can be created for
+ complex projects.
+ \c qmake contains additional features to support development with Qt,
+ automatically including build rules for \l{moc.html}{moc}
+ and \l{uic.html}{uic}.
+ \c qmake can also generate projects for Microsoft Visual studio
+ without requiring the developer to change the project file.
+
+ \section1 Getting Started
+
+ The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews
+ that aim to help new users get started with \c qmake.
+
+ \list
+ \o \l{qmake Tutorial}
+ \tableofcontents{1 qmake Tutorial}
+ \endlist
+
+ \list
+ \o \l{qmake Common Projects}
+ \tableofcontents{1 qmake Common Projects}
+ \endlist
+
+ \section1 Table of Contents
+
+ \list
+ \o \l{Using qmake}
+ \tableofcontents{1 Using qmake}
+ \o \l{qmake Project Files}
+ \tableofcontents{1 qmake Project Files}
+ \o \l{Running qmake}
+ \tableofcontents{1 Running qmake}
+ \o \l{qmake Platform Notes}
+ \tableofcontents{1 qmake Platform Notes}
+ \o \l{qmake Advanced Usage}
+ \tableofcontents{1 qmake Advanced Usage}
+ \o \l{Using Precompiled Headers}
+ \tableofcontents{1 Using Precompiled Headers}
+ \o \l{qmake Reference}
+ \tableofcontents{1 qmake Reference}
+ \o \l{qmake Variable Reference}
+ \tableofcontents{1 qmake Variable Reference}
+ \o \l{qmake Function Reference}
+ \tableofcontents{1 qmake Function Reference}
+ \o \l{Configuring qmake's Environment}
+ \tableofcontents{1 Configuring qmake's Environment}
+ \endlist
+*/
+
+/*!
+ \page qmake-using.html
+ \title Using qmake
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Manual
+ \nextpage qmake Project Files
+
+ \c qmake provides a project-oriented system for managing the build
+ process for applications, libraries, and other components. This
+ approach gives developers control over the source files used, and
+ allows each of the steps in the process to be described concisely,
+ typically within a single file. \c qmake expands the information in
+ each project file to a Makefile that executes the necessary commands
+ for compiling and linking.
+
+ In this document, we provide a basic introduction to project files,
+ describe some of the main features of \c qmake, and show how to use
+ \c qmake on the command line.
+
+ \section1 Describing a Project
+
+ Projects are described by the contents of project (\c .pro) files.
+ The information within these is used by \c qmake to generate a Makefile
+ containing all the commands that are needed to build each project.
+ Project files typically contain a list of source and header files,
+ general configuration information, and any application-specific details,
+ such as a list of extra libraries to link against, or a list of extra
+ include paths to use.
+
+ Project files can contain a number of different elements, including
+ comments, variable declarations, built-in functions, and some simple
+ control structures. In most simple projects, it is only necessary
+ to declare the source and header files that are used to build the
+ project with some basic configuration options.
+
+ Complete examples of project files can be found in the
+ \l{qmake Tutorial}.
+ An introduction to project files can be found in the
+ \l{qmake Project Files} chapter, and a more detailed description is
+ available in the \l{qmake Reference}.
+
+ \section1 Building a Project
+
+ For simple projects, you only need to run \c qmake in the top
+ level directory of your project. By default, \c qmake generates a
+ Makefile that you then use to build the project, and you can then
+ run your platform's \c make tool to build the project.
+
+ \c qmake can also be used to generate project files. A full
+ description of \c{qmake}'s command line options can be found in the
+ \l{Running qmake} chapter of this manual.
+
+ \section1 Using Precompiled Headers
+
+ In large projects, it is possible to take advantage of precompiled
+ header files to speed up the build process. This feature is described
+ in detail in the \l{Using Precompiled Headers} chapter.
+*/
+
+/*!
+ \page qmake-project-files.html
+ \title qmake Project Files
+ \contentspage {qmake Manual}{Contents}
+ \previouspage Using qmake
+ \nextpage Running qmake
+
+ Project files contain all the information required by \c qmake to build
+ your application, library, or plugin. The resources used by your project
+ are generally specified using a series of declarations, but support for
+ simple programming constructs allow you to describe different build
+ processes for different platforms and environments.
+
+ \tableofcontents
+
+ \section1 Project File Elements
+
+ The project file format used by \c qmake can be used to support both
+ simple and fairly complex build systems. Simple project files will
+ use a straightforward declarative style, defining standard variables
+ to indicate the source and header files that are used in the project.
+ Complex projects may use the control flow structures to fine-tune the
+ build process.
+
+ The following sections describe the different types of elements used
+ in project files.
+
+ \section2 Variables
+
+ In a project file, variables are used to hold lists of strings.
+ In the simplest projects, these variables inform \c qmake about the
+ configuration options to use, or supply filenames and paths to use
+ in the build process.
+
+ \c qmake looks for certain variables in each project file, and it
+ uses the contents of these to determine what it should write to a
+ Makefile. For example, the list of values in the \c HEADERS and
+ \c SOURCES variables are used to tell \c qmake about header and
+ source files in the same directory as the project file.
+
+ Variables can also be used internally to store temporary lists of values,
+ and existing lists of values can be overwritten or extended with new
+ values.
+
+ The following lines show how lists of values are assigned to variables:
+
+ \snippet doc/src/snippets/qmake/variables.pro 0
+
+ Note that the first assignment only includes values that are specified on
+ the same line as the \c SOURCES variable. The second assignment splits
+ the items across lines by using the \c \\ character.
+
+ The list of values in a variable is extended in the following way:
+
+ \snippet doc/src/snippets/qmake/variables.pro 1
+
+ The \c CONFIG variable is another special variable that \c qmake
+ uses when generating a Makefile. It is discussed in the section on
+ \l{#GeneralConfiguration}{general configuration} later in this chapter.
+ In the above line, \c qt is added to the list of existing values
+ contained in \c CONFIG.
+
+ The following table lists the variables that \c qmake recognizes, and
+ describes what they should contain.
+
+ \table
+ \header \o Variable \o Contents
+ \row \o CONFIG \o General project configuration options.
+ \row \o DESTDIR \o The directory in which the executable or binary file will
+ be placed.
+ \row \o FORMS \o A list of .ui files to be processed by \c uic.
+ \row \o HEADERS \o A list of filenames of header (.h) files used when
+ building the project.
+ \row \o QT \o Qt-specific configuration options.
+ \row \o RESOURCES \o A list of resource (.rc) files to be included in the
+ final project. See the \l{The Qt Resource System} for
+ more information about these files.
+ \row \o SOURCES \o A list of source code files to be used when building
+ the project.
+ \row \o TEMPLATE \o The template to use for the project. This determines
+ whether the output of the build process will be an
+ application, a library, or a plugin.
+ \endtable
+
+ The contents of a variable can be read by prepending the variable name with
+ \c $$. This can be used to assign the contents of one variable to another:
+
+ \snippet doc/src/snippets/qmake/dereferencing.pro 0
+
+ The \c $$ operator is used extensively with built-in functions that operate
+ on strings and lists of values. These are described in the chapter on
+ \l{qmake Advanced Usage}.
+
+ Normally, variables are used to contain whitespace-separated lists
+ of values. However, it is sometimes necessary to specify values containing
+ spaces. These must be quoted in the following way:
+
+ \snippet doc/src/snippets/qmake/quoting.pro 0
+
+ The quoted text is treated as a single item in the list of values held by
+ the variable.
+
+ \section2 Comments
+
+ You can add comments to project files. Comments begin with the \c
+ # character and continue to the end of the same line. For example:
+
+ \snippet doc/src/snippets/qmake/comments.pro 0
+
+ To include the \c # character in variable assignments, it is necessary
+ to use the contents of the built-in \c LITERAL_HASH variable. See the
+ \l{qmake Variable Reference#LITERAL_HASH}{variable reference} for more
+ information.
+
+ \section2 Built-in Functions and Control Flow
+
+ \c qmake provides a number of built-in functions to allow the contents
+ of variables to be processed. The most commonly used function in simple
+ project files is the \c include function which takes a filename as an
+ argument. The contents of the given file are included in the project
+ file at the place where the \c include function is used.
+ The \c include function is most commonly used to include other project
+ files:
+
+ \snippet doc/src/snippets/qmake/include.pro 0
+
+ Support for conditional structures is made available via
+ \l{qmake Advanced Usage#scopes}{scopes} that behave like \c if
+ statements in programming languages:
+
+ \snippet doc/src/snippets/qmake/scopes.pro 0
+
+ The assignments inside the braces are only made if the condition is
+ true. In this case, the special \c win32 variable must be set; this
+ happens automatically on Windows, but this can also be specified on
+ other platforms by running \c qmake with the \c{-win32} command line
+ option (see \l{Running qmake} for more information). The opening
+ brace must stand on the same line as the condition.
+
+ Simple loops are constructed by iterating over lists of values using
+ the built-in \c for function. The following code adds directories
+ to the \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable, but
+ only if they exist:
+
+ \snippet doc/src/snippets/qmake/functions.pro 0
+
+ More complex operations on variables that would usually require loops
+ are provided by built-in functions such as \c find, \c unique, and
+ \c count. These functions, and many others are provided to manipulate
+ strings and paths, support user input, and call external tools. A list
+ of the functions available can be found in the
+ \l{qmake Advanced Usage} chapter of this manual.
+
+ \section1 Project Templates
+
+ The \c TEMPLATE variable is used to define the type of project that will
+ be built. If this is not declared in the project file, \c qmake assumes
+ that an application should be built, and will generate an appropriate
+ Makefile (or equivalent file) for the purpose.
+
+ The types of project available are listed in the following table with
+ information about the files that \c qmake will generate for each of them:
+
+ \table
+ \header \o Template \o Description of \c qmake output
+ \row \o app (default) \o Creates a Makefile to build an application.
+ \row \o lib \o Creates a Makefile to build a library.
+ \row \o subdirs \o Creates a Makefile containing rules for the
+ subdirectories specified using the \l{qmake Variable Reference#SUBDIRS}{SUBDIRS}
+ variable. Each subdirectory must contain its own project file.
+ \row \o vcapp \o Creates a Visual Studio Project file to build
+ an application.
+ \row \o vclib \o Creates a Visual Studio Project file to build a library.
+ \endtable
+
+ See the \l{qmake Tutorial} for advice on writing project files for
+ projects that use the \c app and \c lib templates.
+
+ When the \c subdirs template is used, \c qmake generates a Makefile
+ to examine each specified subdirectory, process any project file it finds
+ there, and run the platform's \c make tool on the newly-created Makefile.
+ The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to
+ contain a list of all the subdirectories to be processed.
+
+ \target GeneralConfiguration
+ \section1 General Configuration
+
+ The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the
+ options and features that the compiler should use and the libraries that
+ should be linked against. Anything can be added to the \c CONFIG variable,
+ but the options covered below are recognized by \c qmake internally.
+
+ The following options control the compiler flags that are used to build the
+ project:
+
+ \table
+ \header \o Option \o Description
+ \row \o release \o The project is to be built in release mode.
+ This is ignored if \c debug is also specified.
+ \row \o debug \o The project is to be built in debug mode.
+ \row \o debug_and_release \o The project is built in \e both debug and
+ release modes.
+ \row \o build_all \o If \c debug_and_release is specified, the project is
+ built in both debug and release modes by default.
+ \row \o ordered \o When using the \c subdirs template, this option
+ specifies that the directories listed should be processed in the
+ order in which they are given.
+ \row \o warn_on \o The compiler should output as many warnings as possible.
+ This is ignored if \c warn_off is specified.
+ \row \o warn_off \o The compiler should output as few warnings as possible.
+ \endtable
+
+ The \c debug_and_release option is special in that it enables \e both debug and
+ release versions of a project to be built. In such a case, the Makefile that
+ \c qmake generates includes a rule that builds both versions, and this can be
+ invoked in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 0
+
+ Adding the \c build_all option to the \c CONFIG variable makes this rule
+ the default when building the project, and installation targets will be
+ created for both debug and release builds.
+
+ Note that each of the options specified in the \c CONFIG variable can also be
+ used as a scope condition.
+ You can test for the presence of certain configuration options by using the
+ built-in \l{qmake Function Reference#CONFIG(config)}{CONFIG()} function.
+ For example, the following lines show the function as the condition in a scope
+ to test whether only the \c opengl option is in use:
+
+ \snippet doc/src/snippets/qmake/configscopes.pro 4
+ \snippet doc/src/snippets/qmake/configscopes.pro 5
+
+ This enables different configurations to be defined for \c release and
+ \c debug builds, and is described in more detail in the
+ \l{qmake Advanced Usage#Scopes}{Scopes} section of the
+ \l{qmake Advanced Usage}{Advanced Usage} chapter of this manual.
+
+ The following options define the type of project to be built. Note that some
+ of these options only take effect when used on the relevant platform. On other
+ platforms, they have no effect.
+
+ \table
+ \header \o Option \o Description
+ \row \o qt \o The project is a Qt application and should link against the Qt
+ library. You can use the \c QT variable to control any additional
+ Qt modules that are required by your application.
+ \row \o thread \o The project is a multi-threaded application.
+ \row \o x11 \o The project is an X11 application or library.
+ \endtable
+
+ When using \l{qmake Variable Reference#TEMPLATE}{application or library project
+ templates}, more specialized configuration options can be used to fine tune the
+ build process. These are explained in details in the
+ \l{qmake-common-projects.html}{Common Projects} chapter of this manual.
+
+ For example, if your application uses the Qt library and you want to
+ build it as a multi-threaded application in \c debug mode, your project
+ file will contain the following line:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 1
+
+ Note, that you must use "+=", not "=", or \c qmake will not be able to
+ use Qt's configuration to determine the settings needed for your project.
+
+ \section1 Declaring Qt Libraries
+
+ If the \c CONFIG variable contains the \c qt value, qmake's support for Qt
+ applications is enabled. This makes it possible to fine-tune which of the
+ Qt modules are used by your application. This is achieved with the \c QT
+ variable which can be used to declare the required extension modules.
+ For example, we can enable the XML and network modules in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 2
+
+ Note that \c QT includes the \c core and \c gui modules by default, so the
+ above declaration \e adds the network and XML modules to this default list.
+ The following assignment \e omits the default modules, and will lead to
+ errors when the application's source code is being compiled:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 3
+
+ If you want to build a project \e without the \c gui module, you need to
+ exclude it with the "-=" operator. By default, \c QT contains both
+ \c core and \c gui, so the following line will result in a minimal
+ Qt project being built:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 4
+
+ The table below shows the options that can be used with the \c QT variable
+ and the features that are associated with each of them:
+
+ \table
+ \header \o Option \o Features
+ \row \o core (included by default) \o QtCore module
+ \row \o gui (included by default) \o QtGui module
+ \row \o network \o QtNetwork module
+ \row \o opengl \o QtOpenGL module
+ \row \o sql \o QtSql module
+ \row \o svg \o QtSvg module
+ \row \o xml \o QtXml module
+ \row \o xmlpatterns \o QtXmlPatterns module
+ \row \o qt3support \o Qt3Support module
+ \endtable
+
+ Note that adding the \c opengl option to the \c QT variable automatically
+ causes the equivalent option to be added to the \c CONFIG variable.
+ Therefore, for Qt applications, it is not necessary to add the \c opengl
+ option to both \c CONFIG and \c{QT}.
+
+ \section1 Configuration Features
+
+ \c qmake can be set up with extra configuration features that are specified
+ in feature (.prf) files. These extra features often provide support for
+ custom tools that are used during the build process. To add a feature to
+ the build process, append the feature name (the stem of the feature filename)
+ to the \c CONFIG variable.
+
+ For example, \c qmake can configure the build process to take advantage
+ of external libraries that are supported by
+ \l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config},
+ such as the D-Bus and ogg libraries, with the following lines:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 5
+
+ More information about features can be found in the
+ \l{qmake Advanced Usage#Adding New Configuration Features}
+ {Adding New Configuration Features} section of the \l{qmake Advanced Usage}
+ chapter.
+
+ \section1 Declaring Other Libraries
+
+ If you are using other libraries in your project in addition to those
+ supplied with Qt, you need to specify them in your project file.
+
+ The paths that \c qmake searches for libraries and the specific libraries
+ to link against can be added to the list of values in the
+ \l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries
+ themselves can be given, or the familiar Unix-style notation for specifying
+ libraries and paths can be used if preferred.
+
+ For example, the following lines show how a library can be specified:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 6
+
+ The paths containing header files can also be specified in a similar way
+ using the \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} variable.
+
+ For example, it is possible to add several paths to be searched for header
+ files:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 7
+*/
+
+/*!
+ \page qmake-running.html
+ \title Running qmake
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Project Files
+ \nextpage qmake Platform Notes
+
+ The behavior of \c qmake can be customized when it is run by
+ specifying various options on the command line. These allow the
+ build process to be fine-tuned, provide useful diagnostic
+ information, and can be used to specify the target platform for
+ your project.
+
+ \tableofcontents
+
+ \target Commands
+ \section1 Command-Line Options
+
+ \section2 Syntax
+
+ The syntax used to run \c qmake takes the following simple form:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 8
+
+ \c qmake supports two different modes of operation: In the default mode,
+ \c qmake will use the description in a project file to generate a Makefile,
+ but it is also possible to use \c qmake to generate project files.
+ If you want to explicitly set the mode, you must specify it before all
+ other options. The \c mode can be either of the following two values:
+
+ \list
+ \o \c -makefile \BR
+ \c qmake output will be a Makefile.
+ \o \c -project \BR
+ \c qmake output will be a project file.
+ \endlist
+
+ The following \c options are used to specify both general and mode-specific
+ settings. Options that only apply to the Makefile mode are described in the
+ \l{#MakefileMode}{Makefile Mode Options} section; options that influence the
+ creation of project files are described in the
+ \l{#ProjectMode}{Project File Options} section.
+
+ The \c files argument represents a list of one or more project files, separated
+ by spaces.
+
+ \section2 Options
+
+ A wide range of options can be specified on the command line to \c qmake in
+ order to customize the build process, and to override default settings for
+ your platform. The following basic options provide usage information, specify
+ where \c qmake writes the output file, and control the level of debugging
+ information that will be written to the console:
+
+ \list
+ \o \c -help \BR
+ \c qmake will go over these features and give some useful help.
+ \o \c -o file \BR
+ \c qmake output will be directed to \e file. If this option
+ is not specified, \c qmake will try to use a suitable file name for its
+ output, depending on the mode it is running in.\BR
+ If '-' is specified, output is directed to stdout.
+ \o \c -d \BR
+ \c qmake will output debugging information.
+ \endlist
+
+ For projects that need to be built differently on each target platform, with
+ many subdirectories, you can run \c qmake with each of the following
+ options to set the corresponding platform-specific variable in each
+ project file:
+
+ \list
+ \o \c -unix \BR
+ \c qmake will run in unix mode. In this mode, Unix file
+ naming and path conventions will be used, additionally testing for \c unix
+ (as a scope) will succeed. This is the default mode on all Unices.
+ \o \c -macx \BR
+ \c qmake will run in Mac OS X mode. In this mode, Unix file
+ naming and path conventions will be used, additionally testing for \c macx
+ (as a scope) will succeed. This is the default mode on Mac OS X.
+ \o \c -win32 \BR
+ \c qmake will run in win32 mode. In this mode, Windows file naming and path
+ conventions will be used, additionally testing for \c win32 (as a scope)
+ will succeed. This is the default mode on Windows.
+ \endlist
+
+ The template used for the project is usually specified by the \c TEMPLATE
+ variable in the project file. We can override or modify this by using the
+ following options:
+
+ \list
+ \o \c -t tmpl \BR
+ \c qmake will override any set \c TEMPLATE variables with tmpl, but only
+ \e after the .pro file has been processed.
+ \o \c -tp prefix \BR
+ \c qmake will add the prefix to the \c TEMPLATE variable.
+ \endlist
+
+ The level of warning information can be fine-tuned to help you find problems in
+ your project file:
+
+ \list
+ \o \c -Wall \BR
+ \c qmake will report all known warnings.
+ \o \c -Wnone \BR
+ No warning information will be generated by \c qmake.
+ \o \c -Wparser \BR
+ \c qmake will only generate parser warnings. This will alert
+ you to common pitfalls and potential problems in the parsing of your
+ project files.
+ \o \c -Wlogic \BR
+ \c qmake will warn of common pitfalls and potential problems in your
+ project file. For example, \c qmake will report whether a file is placed
+ into a list of files multiple times, or if a file cannot be found.
+ \endlist
+
+ \target MakefileMode
+ \section2 Makefile Mode Options
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 9
+
+ In Makefile mode, \c qmake will generate a Makefile that is used to build the
+ project. Additionally, the following options may be used in this mode to
+ influence the way the project file is generated:
+
+ \list
+ \o \c -after \BR
+ \c qmake will process assignments given on the command line after
+ the specified files.
+ \o \c -nocache \BR
+ \c qmake will ignore the .qmake.cache file.
+ \o \c -nodepend \BR
+ \c qmake will not generate any dependency information.
+ \o \c -cache file \BR
+ \c qmake will use \e file as the cache file, ignoring any other
+ .qmake.cache files found.
+ \o \c -spec spec \BR
+ \c qmake will use \e spec as a path to platform and compiler information,
+ and the value of \c QMAKESPEC will be ignored.
+ \endlist
+
+ You may also pass \c qmake assignments on the command line;
+ they will be processed before all of the files specified. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 10
+
+ This will generate a Makefile, from test.pro with Unix pathnames. However
+ many of the specified options aren't necessary as they are the default.
+ Therefore, the line can be simplified on Unix to:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 11
+
+ If you are certain you want your variables processed after the
+ files specified, then you may pass the \c -after option. When this
+ is specified, all assignments on the command line after the \c -after
+ option will be postponed until after the specified files are parsed.
+
+ \target ProjectMode
+ \section2 Project Mode Options
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 12
+
+ In project mode, \c qmake will generate a project file. Additionally, you
+ may supply the following options in this mode:
+
+ \list
+ \o \c -r \BR
+ \c qmake will look through supplied directories recursively
+ \o \c -nopwd \BR
+ \c qmake will not look in your current working directory for
+ source code and only use the specified \c files
+ \endlist
+
+ In this mode, the \c files argument can be a list of files or directories.
+ If a directory is specified, it will be included in the \c DEPENDPATH
+ variable, and relevant code from there will be included in the generated
+ project file. If a file is given, it will be appended to the correct
+ variable, depending on its extension; for example, .ui files are added
+ to \c FORMS, and .cpp files are added to \c SOURCES.
+
+ You may also pass assignments on the command line in this mode. When doing
+ so, these assignments will be placed last in the generated project file.
+*/
+
+/*!
+ \page qmake-platform-notes.html
+ \title qmake Platform Notes
+ \contentspage {qmake Manual}{Contents}
+ \previouspage Running qmake
+ \nextpage qmake Advanced Usage
+
+ Many cross-platform projects can be handled by the \c{qmake}'s basic
+ configuration features. On some platforms, it is sometimes useful, or even
+ necessary, to take advantage of platform-specific features. \c qmake knows
+ about many of these features, and these can be accessed via specific
+ variables that only have an effect on the platforms where they are relevant.
+
+ \tableofcontents
+
+ \section1 Mac OS X
+
+ Features specific to this platform include support for creating universal
+ binaries, frameworks and bundles.
+
+ \section2 Source and Binary Packages
+
+ The version of \c qmake supplied in source packages is configured slightly
+ differently to that supplied in binary packages in that it uses a different
+ feature specification. Where the source package typically uses the
+ \c macx-g++ specification, the binary package is typically configured to
+ use the \c macx-xcode specification.
+
+ Users of each package can override this configuration by invoking \c qmake
+ with the \c -spec option (see \l{Running qmake} for more information). This
+ makes it possible, for example, to use \c qmake from a binary package to
+ create a Makefile in a project directory with the following command line
+ invocation:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 13
+
+ \section2 Using Frameworks
+
+ \c qmake is able to automatically generate build rules for linking against
+ frameworks in the standard framework directory on Mac OS X, located at
+ \c{/Library/Frameworks/}.
+
+ Directories other than the standard framework directory need to be specified
+ to the build system, and this is achieved by appending linker options to the
+ \l{qmake Variable Reference#QMAKE_LFLAGS}{QMAKE_LFLAGS} variable, as shown
+ in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 14
+
+ The framework itself is linked in by appending the \c{-framework} options and
+ the name of the framework to the \l{qmake Variable Reference#LIBS}{LIBS}
+ variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 15
+
+ \section2 Creating Frameworks
+
+ Any given library project can be configured so that the resulting library
+ file is placed in a
+ \l{http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html}
+ {framework}, ready for deployment. To do this, set up the project to use the
+ \l{qmake Variable Reference#TEMPLATE}{\c lib template} and add the
+ \c lib_bundle option to the
+ \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 16
+
+ The data associated with the library is specified using the
+ \l{qmake Variable Reference#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA}
+ variable. This holds items that will be installed with a library
+ bundle, and is often used to specify a collection of header files,
+ as in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 17
+
+ Here, the \c FRAMEWORK_HEADERS variable is a user-defined variable that
+ is used to define the headers required to use a particular framework.
+ Appending it to the \c QMAKE_BUNDLE_DATA variable ensures that the
+ information about these headers are added to the collection of
+ resources that will be installed with the library bundle. Also, the
+ framework's name and version are specified by
+ \l{qmake Variable Reference#QMAKE_FRAMEWORK_BUNDLE_NAME}
+ {QMAKE_FRAMEWORK_BUNDLE_NAME}
+ and \l{qmake Variable Reference#QMAKE_FRAMEWORK_VERSION}
+ {QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
+ these are obtained from the \l{qmake Variable Reference#TARGET}{TARGET}
+ and \l{qmake Variable Reference#VERSION}{VERSION} variables.
+
+ See \l{Deploying an Application on Mac OS X} for more information about
+ deploying applications and libraries.
+
+ \section2 Creating Universal Binaries
+
+ To create a universal binary for your application, you need to be using
+ a version of Qt that has been configured with the \c{-universal} option.
+
+ The architectures to be supported in the binary are specified with the
+ \l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the
+ following assignment causes \c qmake to generate build rules to create
+ a universal binary for both PowerPC and x86 architectures:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 18
+
+ Additionally, developers using a PowerPC-based platform need to set the
+ \l{qmake Variable Reference#QMAKE_MAC_SDK}{QMAKE_MAC_SDK} variable.
+ This process is discussed in more detail in the
+ \l{Deploying an Application on Mac OS X#Architecture Dependencies}{deployment guide for Mac OS X}.
+
+ \section2 Creating and Moving Xcode Projects
+
+ Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode
+ project files, as described in
+ \l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native},
+ by running \c qmake to generate an Xcode project from an existing \c qmake
+ project files. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 19
+
+ Note that, if a project is later moved on the disk, \c qmake must be run
+ again to process the project file and create a new Xcode project file.
+
+ \section1 Windows
+
+ Features specific to this platform include support for creating Visual
+ Studio project files and handling manifest files when deploying Qt
+ applications developed using Visual Studio 2005.
+
+ \section2 Creating Visual Studio Project Files
+
+ Developers using Visual Studio to write Qt applications can use the
+ Visual Studio integration facilities provided with the
+ \l{Qt Commercial Editions} and do not need to worry about how
+ project dependencies are managed.
+
+ However, some developers may need to import an existing \c qmake project
+ into Visual Studio. \c qmake is able to take a project file and create a
+ Visual Studio project that contains all the necessary information required
+ by the development environment. This is achieved by setting the \c qmake
+ \l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp
+ (for application projects) or \c vclib (for library projects).
+
+ This can also be set using a command line option, for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 20
+
+ It is possible to recursively generate \c{.vcproj} files in subdirectories
+ and a \c{.sln} file in the main directory, by typing:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21
+
+
+ Each time you update the project file, you need to run \c qmake to generate
+ an updated Visual Studio project.
+
+ \section2 Visual Studio 2005 Manifest Files
+
+ When deploying Qt applications built using Visual Studio 2005, it is
+ necessary to ensure that the manifest file, created when the application
+ was linked, is handled correctly. This is handled automatically for
+ projects that generate DLLs.
+
+ Removing manifest embedding for application executables can be done with
+ the following assignment to the \l{qmake Variable Reference#CONFIG}
+ {CONFIG} variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 22
+
+ Also, the manifest embedding for DLLs can be removed with the following
+ assignment to the \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 23
+
+ This is discussed in more detail in the
+ \l{Deploying an Application on Windows#Visual Studio 2005 Onwards}
+ {deployment guide for Windows}.
+*/
+
+/*!
+ \page qmake-reference.html
+ \title qmake Reference
+ \contentspage {qmake Manual}{Contents}
+ \previouspage Using Precompiled Headers
+ \nextpage qmake Variable Reference
+
+ This reference is a detailed index of all the variables and function
+ that are available for use in \c qmake project files.
+
+ \section1 Variable Reference
+
+ The \l{qmake Variable Reference} describes the variables that are
+ recognized by \c qmake when configuring the build process for
+ projects.
+
+ \section1 Function Reference
+
+ The \l{qmake Function Reference} describes the function that can be
+ used to process the contents of variables defined in project files.
+
+ \target FrequentlyUsedVariables
+ \section1 Frequently Used Variables
+
+ The following variables are frequently used in project files to describe
+ common aspects of the build process. These are fully described in the
+ \l{qmake-variable-reference.html}{Variable Reference}.
+
+ \list
+ \o \l{qmake Variable Reference#CONFIG}{CONFIG}
+ \o \l{qmake Variable Reference#DEF_FILE}{DEF_FILE}
+ \o \l{qmake Variable Reference#DEFINES}{DEFINES}
+ \o \l{qmake Variable Reference#DESTDIR}{DESTDIR}
+ \o \l{qmake Variable Reference#DISTFILES}{DISTFILES}
+ \o \l{qmake Variable Reference#DLLDESTDIR}{DLLDESTDIR}
+ \o \l{qmake Variable Reference#FORMS}{FORMS}
+ \o \l{qmake Variable Reference#FORMS3}{FORMS3}
+ \o \l{qmake Variable Reference#GUID}{GUID}
+ \o \l{qmake Variable Reference#HEADERS}{HEADERS}
+ \o \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH}
+ \o \l{qmake Variable Reference#LEXSOURCES}{LEXSOURCES}
+ \o \l{qmake Variable Reference#LIBS}{LIBS}
+ \o \l{qmake Variable Reference#MOC_DIR}{MOC_DIR}
+ \o \l{qmake Variable Reference#OBJECTS_DIR}{OBJECTS_DIR}
+ \o \l{qmake Variable Reference#QT}{QT}
+ \o \l{qmake Variable Reference#RCC_DIR}{RCC_DIR}
+ \o \l{qmake Variable Reference#REQUIRES}{REQUIRES}
+ \o \l{qmake Variable Reference#SOURCES}{SOURCES}
+ \o \l{qmake Variable Reference#SUBDIRS}{SUBDIRS}
+ \o \l{qmake Variable Reference#TARGET}{TARGET}
+ \o \l{qmake Variable Reference#TEMPLATE}{TEMPLATE}
+ \o \l{qmake Variable Reference#TRANSLATIONS}{TRANSLATIONS}
+ \o \l{qmake Variable Reference#UI_DIR}{UI_DIR}
+ \o \l{qmake Variable Reference#UI_HEADERS_DIR}{UI_HEADERS_DIR}
+ \o \l{qmake Variable Reference#UI_SOURCES_DIR}{UI_SOURCES_DIR}
+ \o \l{qmake Variable Reference#VERSION}{VERSION}
+ \o \l{qmake Variable Reference#YACCSOURCES}{YACCSOURCES}
+ \endlist
+
+ \section1 Environment Variables and Configuration
+
+ The \l{Configuring qmake's Environment} chapter of this manual
+ describes the environment variables that \c qmake uses when
+ configuring the build process.
+*/
+
+/*!
+ \page qmake-variable-reference.html
+ \title qmake Variable Reference
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Reference
+ \nextpage qmake Function Reference
+
+ \c{qmake}'s fundamental behavior is influenced by variable declarations that
+ define the build process of each project. Some of these declare resources,
+ such as headers and source files, that are common to each platform; others
+ are used to customize the behavior of compilers and linkers on specific
+ platforms.
+
+ Platform-specific variables follow the naming pattern of the
+ variables which they extend or modify, but include the name of the relevant
+ platform in their name. For example, \c QMAKE_LIBS can be used to specify a list
+ of libraries that a project needs to link against, and \c QMAKE_LIBS_X11 can be
+ used to extend or override this list.
+
+ \tableofcontents{3}
+
+ \target CONFIG
+ \section1 CONFIG
+
+ The \c CONFIG variable specifies project configuration and
+ compiler options. The values will be recognized internally by
+ \c qmake and have special meaning. They are as follows.
+
+ These \c CONFIG values control compilation flags:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o release \o The project is to be built in release mode.
+ This is ignored if \c debug is also specified.
+ \row \o debug \o The project is to be built in debug mode.
+ \row \o debug_and_release \o The project is built in \e both debug and
+ release modes. This can have some unexpected side effects (see
+ below for more information).
+ \row \o build_all \o If \c debug_and_release is specified, the project is
+ built in both debug and release modes by default.
+ \row \o ordered \o When using the \c subdirs template, this option
+ specifies that the directories listed should be processed in the
+ order in which they are given.
+ \row \o precompile_header \o Enables support for the use of
+ \l{Using Precompiled Headers}{precompiled headers} in projects.
+ \row \o warn_on \o The compiler should output as many warnings as possible.
+ This is ignored if \c warn_off is specified.
+ \row \o warn_off \o The compiler should output as few warnings as possible.
+ \omit
+ \row \o qt_debug \o Specifies that the project should be built against
+ debug versions of the Qt libraries specified using the
+ \l{#QT}{QT} variable.
+ \row \o qt_release \o Specifies that the project should be built against
+ release versions of the Qt libraries specified using the
+ \l{#QT}{QT} variable.
+ \endomit
+ \endtable
+
+ Since the \c debug option overrides the \c release option when both are
+ defined in the \c CONFIG variable, it is necessary to use the
+ \c debug_and_release option if you want to allow both debug and release
+ versions of a project to be built. In such a case, the Makefile that
+ \c qmake generates includes a rule that builds both versions, and this can
+ be invoked in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 24
+
+ On Windows (or if Qt is configured with \c{-debug_and_release}, adding the
+ \c build_all option to the \c CONFIG variable makes this rule the default
+ when building the project, and installation targets will be created for
+ both debug and release builds.
+
+ Additionally, adding \c debug_and_release to the \c CONFIG variable will
+ cause both \c debug and \c release to be defined in the contents of
+ \c CONFIG. When the project file is processed, the
+ \l{qmake Advanced Usage#Scopes}{scopes} that test for each value will be
+ processed for \e both debug and release modes. The \c{build_pass} variable
+ will be set for each of these mode, and you can test for this to perform
+ build-specific tasks. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 25
+
+ As a result, it may be useful to define mode-specific variables, such as
+ \l{#QMAKE_LFLAGS_RELEASE}{QMAKE_LFLAGS_RELEASE}, instead of general
+ variables, such as \l{#QMAKE_LFLAGS}{QMAKE_LFLAGS}, where possible.
+
+ The following options define the application/library type:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o qt \o The target is a Qt application/library and requires the Qt
+ library and header files. The proper include and library paths for the
+ Qt library will automatically be added to the project. This is defined
+ by default, and can be fine-tuned with the \c{\l{#qt}{QT}} variable.
+ \row \o thread \o The target is a multi-threaded application or library. The
+ proper defines and compiler flags will automatically be added to
+ the project.
+ \row \o x11 \o The target is a X11 application or library. The proper
+ include paths and libraries will automatically be added to the
+ project.
+ \row \o windows \o The target is a Win32 window application (app only). The
+ proper include paths, compiler flags and libraries will
+ automatically be added to the project.
+ \row \o console \o The target is a Win32 console application (app only). The
+ proper include paths, compiler flags and libraries will
+ automatically be added to the
+ project.
+ \row \o shared \o{1,3} The target is a shared object/DLL. The proper
+ include paths, compiler flags and libraries will automatically be
+ added to the project.
+ \row \o dll \o
+ \row \o dylib \o
+ \row \o static \o{1,2} The target is a static library (lib only). The proper
+ compiler flags will automatically be added to the project.
+ \row \o staticlib \o
+ \row \o plugin \o The target is a plugin (lib only). This enables dll as well.
+ \row \o designer \o The target is a plugin for \QD.
+ \row \o uic3 \o Configures qmake to run uic3 on the content of \c FORMS3 if
+ defined; otherwise the contents of \c FORMS will be processed instead.
+ \row \o no_lflags_merge \o Ensures that the list of libraries stored in the
+ \c LIBS variable is not reduced to a list of unique values before it is used.
+ \row \o resources \o Configures qmake to run rcc on the content of \c RESOURCES
+ if defined.
+ \endtable
+
+ These options are used to set the compiler flags:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o 3dnow \o AMD 3DNow! instruction support is enabled.
+ \row \o exceptions \o Exception support is enabled.
+ \row \o mmx \o Intel MMX instruction support is enabled.
+ \row \o rtti \o RTTI support is enabled.
+ \row \o stl \o STL support is enabled.
+ \row \o sse \o SSE support is enabled.
+ \row \o sse2 \o SSE2 support is enabled.
+ \endtable
+
+ These options define specific features on Windows only:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o flat \o When using the vcapp template this will put all the source
+ files into the source group and the header files into the header group
+ regardless of what directory they reside in. Turning this
+ option off will group the files within the source/header group depending
+ on the directory they reside. This is turned on by default.
+ \row \o embed_manifest_dll \o Embeds a manifest file in the DLL created
+ as part of a library project.
+ \row \o embed_manifest_exe \o Embeds a manifest file in the DLL created
+ as part of an application project.
+ \row \o incremental \o Used to enable or disable incremental linking in Visual
+ C++, depending on whether this feature is enabled or disabled by default.
+ \endtable
+
+ See \l{qmake Platform Notes#Visual Studio 2005 Manifest Files}{qmake Platform Notes}
+ for more information on the options for embedding manifest files.
+
+ These options only have an effect on Mac OS X:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o ppc \o Builds a PowerPC binary.
+ \row \o x86 \o Builds an i386 compatible binary.
+ \row \o app_bundle \o Puts the executable into a bundle (this is the default).
+ \row \o lib_bundle \o Puts the library into a library bundle.
+ \endtable
+
+ The build process for bundles is also influenced by
+ the contents of the \l{#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA} variable.
+
+ These options have an effect on Linux/Unix platforms:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o largefile \o Includes support for large files.
+ \row \o separate_debug_info \o Puts debugging information for libraries in
+ separate files.
+ \endtable
+
+ The \c CONFIG variable will also be checked when resolving scopes. You may
+ assign anything to this variable.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 26
+
+ \target DEFINES
+ \section1 DEFINES
+
+ \c qmake adds the values of this variable as compiler C
+ preprocessor macros (-D option).
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 27
+
+ \target DEF_FILE
+ \section1 DEF_FILE
+
+ \e {This is only used on Windows when using the \c app template}.
+
+ Specifies a \c .def file to be included in the project.
+
+ \target DEPENDPATH
+ \section1 DEPENDPATH
+
+ This variable contains the list of all directories to look in to
+ resolve dependencies. This will be used when crawling through
+ \c included files.
+
+ \target DEPLOYMENT
+ \section1 DEPLOYMENT
+
+ \e {This is only used on Windows CE.}
+
+ Specifies which additional files will be deployed. Deployment means the
+ transfer of files from the development system to the target device or
+ emulator.
+
+ Files can be deployed by either creating a Visual Studio project or using
+ the \l {Using QTestLib remotely on Windows CE}{cetest} executable.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 28
+
+ This will upload all PNG images in \c path to the same directory your
+ build target will be deployed to.
+
+ The default deployment target path for Windows CE is
+ \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to
+ \c{\Program Files\target}.
+
+ It is also possible to specify multiple \c sources to be deployed on
+ target \c paths. In addition, different variables can be used for
+ deployment to different directories.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 29
+
+ \note All linked Qt libraries will be deployed to the path specified
+ by \c{myFiles.path}.
+
+ \target DEPLOYMENT_PLUGIN
+ \section1 DEPLOYMENT_PLUGIN
+
+ \e {This is only used on Windows CE.}
+
+ This variable specifies the Qt plugins that will be deployed. All plugins
+ available in Qt can be explicitly deployed to the device. See
+ \l{Static Plugins}{Static Plugins} for a complete list.
+
+ \note No plugins will be deployed automatically. If the application
+ depends on plugins, these plugins have to be specified manually.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 128
+
+ This will upload the jpeg imageformat plugin to the plugins directory
+ on the Windows CE device.
+
+ \target DESTDIR
+ \section1 DESTDIR
+
+ Specifies where to put the \l{#TARGET}{target} file.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 30
+
+ \target DESTDIR_TARGET
+ \section1 DESTDIR_TARGET
+
+ This variable is set internally by \c qmake, which is basically the
+ \c DESTDIR variable with the \c TARGET variable appened at the end.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target DLLDESTDIR
+ \section1 DLLDESTDIR
+
+ Specifies where to copy the \l{#TARGET}{target} dll.
+
+ \target DISTFILES
+ \section1 DISTFILES
+
+ This variable contains a list of files to be included in the dist
+ target. This feature is supported by UnixMake specs only.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 31
+
+ \target DSP_TEMPLATE
+ \section1 DSP_TEMPLATE
+
+ This variable is set internally by \c qmake, which specifies where the
+ dsp template file for basing generated dsp files is stored. The value
+ of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target FORMS
+ \section1 FORMS
+
+ This variable specifies the .ui files (see \link
+ designer-manual.html Qt Designer \endlink) to be processed through \c uic
+ before compiling. All dependencies, headers and source files required
+ to build these .ui files will automatically be added to the project.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 32
+
+ If FORMS3 is defined in your project, then this variable must contain
+ forms for uic, and not uic3. If CONFIG contains uic3, and FORMS3 is not
+ defined, the this variable must contain only uic3 type forms.
+
+ \target FORMS3
+ \section1 FORMS3
+
+ This variable specifies the old style .ui files to be processed
+ through \c uic3 before compiling, when \c CONFIG contains uic3.
+ All dependencies, headers and source files required to build these
+ .ui files will automatically be added to the project.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 33
+
+ \target GUID
+ \section1 GUID
+
+ Specifies the GUID that is set inside a \c{.vcproj} file. The GUID is
+ usually randomly determined. However, should you require a fixed GUID,
+ it can be set using this variable.
+
+ This variable is specific to \c{.vcproj} files only; it is ignored
+ otherwise.
+
+ \target HEADERS
+ \section1 HEADERS
+
+ Defines the header files for the project.
+
+ \c qmake will generate dependency information (unless \c -nodepend
+ is specified on the \l{Running qmake#Commands}{command line})
+ for the specified headers. \c qmake will also automatically detect if
+ \c moc is required by the classes in these headers, and add the
+ appropriate dependencies and files to the project for generating and
+ linking the moc files.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 34
+
+ See also \l{#SOURCES}{SOURCES}.
+
+ \target INCLUDEPATH
+ \section1 INCLUDEPATH
+
+ This variable specifies the #include directories which should be
+ searched when compiling the project. Use ';' or a space as the
+ directory separator.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 35
+
+ \target INSTALLS
+ \section1 INSTALLS
+
+ This variable contains a list of resources that will be installed when
+ \c{make install} or a similar installation procedure is executed. Each
+ item in the list is typically defined with attributes that provide
+ information about where it will be installed.
+
+ For example, the following \c{target.path} definition describes where the
+ build target will be installed, and the \c INSTALLS assignment adds the
+ build target to the list of existing resources to be installed:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 36
+
+ \target LEXIMPLS
+ \section1 LEXIMPLS
+
+ This variable contains a list of lex implementation files. The value
+ of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
+
+ \target LEXOBJECTS
+ \section1 LEXOBJECTS
+
+ This variable contains the names of intermediate lex object
+ files.The value of this variable is typically handled by
+ \c qmake and rarely needs to be modified.
+
+ \target LEXSOURCES
+ \section1 LEXSOURCES
+
+ This variable contains a list of lex source files. All
+ dependencies, headers and source files will automatically be added to
+ the project for building these lex files.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 37
+
+ \target LIBS
+ \section1 LIBS
+
+ This variable contains a list of libraries to be linked into the project.
+ You can use the Unix \c -l (library) and -L (library path) flags and qmake
+ will do the correct thing with these libraries on Windows (namely this
+ means passing the full path of the library to the linker). The only
+ limitation to this is the library must exist, for qmake to find which
+ directory a \c -l lib lives in.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 38
+
+ \bold{Note:} On Windows, specifying libraries with the \c{-l} option,
+ as in the above example, will cause the library with the highest version
+ number to be used; for example, \c{libmath2.lib} could potentially be used
+ instead of \c{libmathlib}. To avoid this ambiguity, we recommend that you
+ explicitly specify the library to be used by including the \c{.lib}
+ file name suffix.
+
+ By default, the list of libraries stored in \c LIBS is reduced to a list of
+ unique names before it is used. To change this behavior, add the
+ \c no_lflags_merge option to the \c CONFIG variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 39
+
+ \target LITERAL_HASH
+ \section1 LITERAL_HASH
+
+ This variable is used whenever a literal hash character (\c{#}) is needed in
+ a variable declaration, perhaps as part of a file name or in a string passed
+ to some external application.
+
+ For example:
+
+ \snippet doc/src/snippets/qmake/comments.pro 1
+
+ By using \c LITERAL_HASH in this way, the \c # character can be used
+ to construct a URL for the \c message() function to print to the console.
+
+ \target MAKEFILE
+ \section1 MAKEFILE
+
+ This variable specifies the name of the Makefile which
+ \c qmake should use when outputting the dependency information
+ for building a project. The value of this variable is typically
+ handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target MAKEFILE_GENERATOR
+ \section1 MAKEFILE_GENERATOR
+
+ This variable contains the name of the Makefile generator to use
+ when generating a Makefile. The value of this variable is typically
+ handled internally by \c qmake and rarely needs to be modified.
+
+ \target MOC_DIR
+ \section1 MOC_DIR
+
+ This variable specifies the directory where all intermediate moc
+ files should be placed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 40
+
+ \target OBJECTS
+ \section1 OBJECTS
+
+ This variable is generated from the \link #SOURCES SOURCES
+ \endlink variable. The extension of each source file will have been
+ replaced by .o (Unix) or .obj (Win32). The value of this variable is
+ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
+
+ \target OBJECTS_DIR
+ \section1 OBJECTS_DIR
+
+ This variable specifies the directory where all intermediate
+ objects should be placed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 41
+
+ \target OBJMOC
+ \section1 OBJMOC
+
+ This variable is set by \c qmake if files can be found that
+ contain the Q_OBJECT macro. \c OBJMOC contains the
+ name of all intermediate moc object files. The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target POST_TARGETDEPS
+ \section1 POST_TARGETDEPS
+
+ All libraries that the \l{#TARGET}{target} depends on can be
+ listed in this variable. Some backends do not support this, these include
+ MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is supported
+ internally by these build tools, this is useful for explicitly listing
+ dependant static libraries.
+
+ This list will go after all builtin (and \link #PRE_TARGETDEPS
+ $$PRE_TARGETDEPS \endlink) dependencies.
+
+ \target PRE_TARGETDEPS
+ \section1 PRE_TARGETDEPS
+
+ All libraries that the \l{#TARGET}{target} depends on can be
+ listed in this variable. Some backends do not support this, these include
+ MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is supported
+ internally by these build tools, this is useful for explicitly listing
+ dependant static libraries.
+
+ This list will go before all builtin dependencies.
+
+ \target PRECOMPILED_HEADER
+ \section1 PRECOMPILED_HEADER
+
+ This variable indicates the header file for creating a precompiled
+ header file, to increase the compilation speed of a project.
+ Precompiled headers are currently only supported on some platforms
+ (Windows - all MSVC project types, Mac OS X - Xcode, Makefile,
+ Unix - gcc 3.3 and up).
+
+ On other platforms, this variable has different meaning, as noted
+ below.
+
+ This variable contains a list of header files that require some
+ sort of pre-compilation step (such as with moc). The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target PWD
+ \section1 PWD
+
+ This variable contains the full path leading to the directory where
+ the \c qmake project file (project.pro) is located.
+
+ \target OUT_PWD
+ \section1 OUT_PWD
+
+ This variable contains the full path leading to the directory where
+ \c qmake places the generated Makefile.
+
+ \target QMAKE_systemvariable
+ \section1 QMAKE
+
+ This variable contains the name of the \c qmake program
+ itself and is placed in generated Makefiles. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target QMAKESPEC_systemvariable
+ \section1 QMAKESPEC
+
+ This variable contains the name of the \c qmake
+ configuration to use when generating Makefiles. The value of this
+ variable is typically handled by \c qmake and rarely needs to be modified.
+
+ Use the \c{QMAKESPEC} environment variable to override the \c qmake configuration.
+ Note that, due to the way \c qmake reads project files, setting the \c{QMAKESPEC}
+ environment variable from within a project file will have no effect.
+
+ \target QMAKE_APP_FLAG
+ \section1 QMAKE_APP_FLAG
+
+ This variable is empty unless the \c app
+ \l{#TEMPLATE}{TEMPLATE} is specified. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified. Use the following instead:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 42
+
+ \target QMAKE_APP_OR_DLL
+ \section1 QMAKE_APP_OR_DLL
+
+ This variable is empty unless the \c app or \c dll
+ \l{#TEMPLATE}{TEMPLATE} is specified. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target QMAKE_AR_CMD
+ \section1 QMAKE_AR_CMD
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains the command for invoking the program which
+ creates, modifies and extracts archives. The value of this variable is
+ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
+
+ \target QMAKE_BUNDLE_DATA
+ \section1 QMAKE_BUNDLE_DATA
+
+ This variable is used to hold the data that will be installed with a library
+ bundle, and is often used to specify a collection of header files.
+
+ For example, the following lines add \c path/to/header_one.h
+ and \c path/to/header_two.h to a group containing information about the
+ headers supplied with the framework:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 43
+
+ The last line adds the information about the headers to the collection of
+ resources that will be installed with the library bundle.
+
+ Library bundles are created when the \c lib_bundle option is added to the
+ \l{#CONFIG}{CONFIG} variable.
+
+ See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
+ more information about creating library bundles.
+
+ \e{This is used on Mac OS X only.}
+
+ \section1 QMAKE_BUNDLE_EXTENSION
+
+ This variable defines the extension to be used for library bundles.
+ This allows frameworks to be created with custom extensions instead of the
+ standard \c{.framework} directory name extension.
+
+ For example, the following definition will result in a framework with the
+ \c{.myframework} extension:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 44
+
+ \e{This is used on Mac OS X only.}
+
+ \section1 QMAKE_CC
+
+ This variable specifies the C compiler that will be used when building
+ projects containing C source code. Only the file name of the compiler
+ executable needs to be specified as long as it is on a path contained
+ in the \c PATH variable when the Makefile is processed.
+
+ \target QMAKE_CFLAGS_DEBUG
+ \section1 QMAKE_CFLAGS_DEBUG
+
+ This variable contains the flags for the C compiler in debug mode.The value of this variable is
+ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_MT
+ \section1 QMAKE_CFLAGS_MT
+
+ This variable contains the compiler flags for creating a
+ multi-threaded application or when the version of Qt that you link
+ against is a multi-threaded statically linked library. The value of
+ this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_MT_DBG
+ \section1 QMAKE_CFLAGS_MT_DBG
+
+ This variable contains the compiler flags for creating a debuggable
+ multi-threaded application or when the version of Qt that you link
+ against is a debuggable multi-threaded statically linked library. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_MT_DLL
+ \section1 QMAKE_CFLAGS_MT_DLL
+
+ \e {This is used on Windows only.}
+
+ This variable contains the compiler flags for creating a
+ multi-threaded dll or when the version of Qt that you link
+ against is a multi-threaded dll. The value of this variable is typically
+ handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_MT_DLLDBG
+ \section1 QMAKE_CFLAGS_MT_DLLDBG
+
+ \e {This is used on Windows only.}
+
+ This variable contains the compiler flags for creating a debuggable
+ multi-threaded dll or when the version of Qt that you link
+ against is a debuggable multi-threaded statically linked library.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_RELEASE
+ \section1 QMAKE_CFLAGS_RELEASE
+
+ This variable contains the compiler flags for creating a non-debuggable
+ application. The value of this variable is typically
+ handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_SHLIB
+ \section1 QMAKE_CFLAGS_SHLIB
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains the compiler flags for creating a shared
+ library. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CFLAGS_THREAD
+ \section1 QMAKE_CFLAGS_THREAD
+
+ This variable contains the compiler flags for creating a multi-threaded
+ application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CFLAGS_WARN_OFF
+ \section1 QMAKE_CFLAGS_WARN_OFF
+
+ This variable is not empty if the warn_off
+ \l{#TEMPLATE}{TEMPLATE} option is specified. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
+
+ \target QMAKE_CFLAGS_WARN_ON
+ \section1 QMAKE_CFLAGS_WARN_ON
+
+ This variable is not empty if the warn_on
+ \l{#TEMPLATE}{TEMPLATE} option is specified.
+ The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CLEAN
+ \section1 QMAKE_CLEAN
+
+ This variable contains any files which are not generated files (such as moc and uic
+ generated files) and object files that should be removed when using "make clean".
+
+ \section1 QMAKE_CXX
+
+ This variable specifies the C++ compiler that will be used when building
+ projects containing C++ source code. Only the file name of the compiler
+ executable needs to be specified as long as it is on a path contained
+ in the \c PATH variable when the Makefile is processed.
+
+ \section1 QMAKE_CXXFLAGS
+
+ This variable contains the C++ compiler flags that are used when building
+ a project. The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The flags
+ specific to debug and release modes can be adjusted by modifying
+ the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables,
+ respectively.
+
+ \target QMAKE_CXXFLAGS_DEBUG
+ \section1 QMAKE_CXXFLAGS_DEBUG
+
+ This variable contains the C++ compiler flags for creating a debuggable
+ application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_MT
+ \section1 QMAKE_CXXFLAGS_MT
+
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_MT_DBG
+ \section1 QMAKE_CXXFLAGS_MT_DBG
+
+ This variable contains the C++ compiler flags for creating a debuggable multi-threaded
+ application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_MT_DLL
+ \section1 QMAKE_CXXFLAGS_MT_DLL
+
+ \c {This is used on Windows only.}
+
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ dll. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_MT_DLLDBG
+ \section1 QMAKE_CXXFLAGS_MT_DLLDBG
+
+ \c {This is used on Windows only.}
+
+ This variable contains the C++ compiler flags for creating a multi-threaded debuggable
+ dll. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_RELEASE
+ \section1 QMAKE_CXXFLAGS_RELEASE
+
+ This variable contains the C++ compiler flags for creating an
+ application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_SHLIB
+ \section1 QMAKE_CXXFLAGS_SHLIB
+
+ This variable contains the C++ compiler flags for creating a
+ shared library. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_THREAD
+ \section1 QMAKE_CXXFLAGS_THREAD
+
+ This variable contains the C++ compiler flags for creating a
+ multi-threaded application. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
+ to be modified.
+
+ \target QMAKE_CXXFLAGS_WARN_OFF
+ \section1 QMAKE_CXXFLAGS_WARN_OFF
+
+ This variable contains the C++ compiler flags for suppressing compiler warnings.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_CXXFLAGS_WARN_ON
+ \section1 QMAKE_CXXFLAGS_WARN_ON
+
+ This variable contains C++ compiler flags for generating compiler warnings.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_DISTCLEAN
+ \section1 QMAKE_DISTCLEAN
+
+ This variable removes extra files upon the invocation of \c{make distclean}.
+
+ \target QMAKE_EXTENSION_SHLIB
+ \section1 QMAKE_EXTENSION_SHLIB
+
+ This variable contains the extention for shared libraries. The value of this
+ variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
+
+ Note that platform-specific variables that change the extension will override
+ the contents of this variable.
+
+ \section1 QMAKE_EXT_MOC
+
+ This variable changes the extention used on included moc files.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
+
+ \section1 QMAKE_EXT_UI
+
+ This variable changes the extention used on /e Designer UI files.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
+
+ \section1 QMAKE_EXT_PRL
+
+ This variable changes the extention used on created PRL files.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
+ \l{Configuring qmake's Environment#libdepend}{Library Dependencies}.
+
+ \section1 QMAKE_EXT_LEX
+
+ This variable changes the extention used on files given to lex.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
+ \l{#LEXSOURCES}{LEXSOURCES}.
+
+ \section1 QMAKE_EXT_YACC
+ This variable changes the extention used on files given to yacc.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
+ \l{#YACCSOURCES}{YACCSOURCES}.
+
+ \section1 QMAKE_EXT_OBJ
+
+ This variable changes the extention used on generated object files.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
+
+ \section1 QMAKE_EXT_CPP
+
+ This variable changes the interpretation of all suffixes in this
+ list of values as files of type C++ source code.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
+
+ \section1 QMAKE_EXT_H
+
+ This variable changes the interpretation of all suffixes in this
+ list of values as files of type C header files.
+
+ See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
+
+ \section1 QMAKE_EXTRA_COMPILERS
+
+ This variable contains the extra compilers/preprocessors that have been added
+
+ See also \l{Configuring qmake's Environment#Customizing}{Customizing Makefile Output}
+
+ \section1 QMAKE_EXTRA_TARGETS
+
+ This variable contains the extra targets that have been added
+
+ See also \l{Configuring qmake's Environment#Customizing}{Customizing Makefile Output}
+
+ \target QMAKE_FAILED_REQUIREMENTS
+ \section1 QMAKE_FAILED_REQUIREMENTS
+
+ This variable contains the list of requirements that were failed to be met when
+ \c qmake was used. For example, the sql module is needed and wasn't compiled into Qt. The
+ value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
+
+ \target QMAKE_FILETAGS
+ \section1 QMAKE_FILETAGS
+
+ This variable contains the file tags needed to be entered into the Makefile, such as SOURCES
+ and HEADERS. The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_FRAMEWORK_BUNDLE_NAME
+
+ In a framework project, this variable contains the name to be used for the
+ framework that is built.
+
+ By default, this variable contains the same value as the \l{#TARGET}{TARGET}
+ variable.
+
+ See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
+ more information about creating frameworks and library bundles.
+
+ \e{This is used on Mac OS X only.}
+
+ \target QMAKE_FRAMEWORK_VERSION
+ \section1 QMAKE_FRAMEWORK_VERSION
+
+ For projects where the build target is a Mac OS X framework, this variable
+ is used to specify the version number that will be applied to the framework
+ that is built.
+
+ By default, this variable contains the same value as the \l{#VERSION}{VERSION}
+ variable.
+
+ See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
+ more information about creating frameworks.
+
+ \e{This is used on Mac OS X only.}
+
+ \target QMAKE_INCDIR
+ \section1 QMAKE_INCDIR
+
+ This variable contains the location of all known header files to be added to
+ INCLUDEPATH when building an application. The value of this variable is
+ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
+
+ \target QMAKE_INCDIR_OPENGL
+ \section1 QMAKE_INCDIR_OPENGL
+
+ This variable contains the location of OpenGL header files to be added
+ to INCLUDEPATH when building an application with OpenGL support. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_INCDIR_QT
+ \section1 QMAKE_INCDIR_QT
+
+ This variable contains the location of all known header file
+ paths to be added to INCLUDEPATH when building a Qt application. The value
+ of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_INCDIR_THREAD
+ \section1 QMAKE_INCDIR_THREAD
+
+ This variable contains the location of all known header file
+ paths to be added to INCLUDEPATH when building a multi-threaded application.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_INCDIR_X11
+ \section1 QMAKE_INCDIR_X11
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains the location of X11 header file paths to be
+ added to INCLUDEPATH when building a X11 application. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target QMAKE_INFO_PLIST
+ \section1 QMAKE_INFO_PLIST
+
+ \e {This is used on Mac OS X platforms only.}
+
+ This variable contains the name of the property list file, \c{.plist}, you
+ would like to include in your Mac OS X application bundle.
+
+ In the \c{.plist} file, you can define some variables, e.g., @EXECUTABLE@,
+ which qmake will replace with the actual executable name. Other variables
+ include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.
+
+ \note Most of the time, the default \c{Info.plist} is good enough.
+
+ \section1 QMAKE_LFLAGS
+
+ This variable contains a general set of flags that are passed to
+ the linker. If you need to change the flags used for a particular
+ platform or type of project, use one of the specialized variables
+ for that purpose instead of this variable.
+
+ \target QMAKE_LFLAGS_CONSOLE
+ \section1 QMAKE_LFLAGS_CONSOLE
+
+ \e {This is used on Windows only.}
+
+ This variable contains link flags when building console
+ programs. The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_CONSOLE_DLL
+
+ \e {This is used on Windows only.}
+
+ This variable contains link flags when building console
+ dlls. The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_DEBUG
+
+ This variable contains link flags when building debuggable applications. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_PLUGIN
+
+ This variable contains link flags when building plugins. The value
+ of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_QT_DLL
+
+ This variable contains link flags when building programs that
+ use the Qt library built as a dll. The value of this variable is
+ typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_RELEASE
+
+ This variable contains link flags when building applications for
+ release. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_SHAPP
+
+ This variable contains link flags when building applications which are using
+ the \c app template. The value of this variable is typically handled by
+ \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_SHLIB
+
+ This variable contains link flags when building shared libraries
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_SONAME
+
+ This variable specifies the link flags to set the name of shared objects,
+ such as .so or .dll. The value of this variable is typically handled by \c
+ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_THREAD
+
+ This variable contains link flags when building multi-threaded projects.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_WINDOWS
+
+ \e {This is used on Windows only.}
+
+ This variable contains link flags when building Windows GUI projects
+ (i.e. non-console applications).
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LFLAGS_WINDOWS_DLL
+
+ \e {This is used on Windows only.}
+
+ This variable contains link flags when building Windows DLL projects.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBDIR
+
+ This variable contains the location of all known library
+ directories.The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBDIR_FLAGS
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains the location of all library
+ directory with -L prefixed. The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBDIR_OPENGL
+
+ This variable contains the location of the OpenGL library
+ directory.The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBDIR_QT
+
+ This variable contains the location of the Qt library
+ directory.The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBDIR_X11
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains the location of the X11 library
+ directory.The value of this variable is typically handled by
+ \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS
+
+ This variable contains all project libraries. The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_CONSOLE
+
+ \e {This Windows-specific variable is no longer used.}
+
+ Prior to Qt 4.2, this variable was used to list the libraries
+ that should be linked against when building a console application
+ project on Windows. \l{#QMAKE_LIBS_WINDOW}{QMAKE_LIBS_WINDOW}
+ should now be used instead.
+
+ \section1 QMAKE_LIBS_OPENGL
+
+ This variable contains all OpenGL libraries. The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_OPENGL_QT
+
+ This variable contains all OpenGL Qt libraries.The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_QT
+
+ This variable contains all Qt libraries.The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_QT_DLL
+
+ \e {This is used on Windows only.}
+
+ This variable contains all Qt libraries when Qt is built as a dll. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_QT_OPENGL
+
+ This variable contains all the libraries needed to link against if
+ OpenGL support is turned on. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_QT_THREAD
+
+ This variable contains all the libraries needed to link against if
+ thread support is turned on. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_RT
+
+ \e {This is used with Borland compilers only.}
+
+ This variable contains the runtime library needed to link against when
+ building an application. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_RTMT
+
+ \e {This is used with Borland compilers only.}
+
+ This variable contains the runtime library needed to link against when
+ building a multi-threaded application. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_THREAD
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains all libraries that need to be linked against
+ when building a multi-threaded application. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_WINDOWS
+
+ \e {This is used on Windows only.}
+
+ This variable contains all windows libraries.The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_X11
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains all X11 libraries.The value of this
+ variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIBS_X11SM
+
+ \e {This is used on Unix platforms only.}
+
+ This variable contains all X11 session management libraries. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LIB_FLAG
+
+ This variable is not empty if the \c lib template is specified. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_LINK_SHLIB_CMD
+
+ This variable contains the command to execute when creating a
+ shared library. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_POST_LINK
+
+ This variable contains the command to execute after linking the TARGET
+ together. This variable is normally empty and therefore nothing is
+ executed, additionally some backends will not support this - mostly only
+ Makefile backends.
+
+ \section1 QMAKE_PRE_LINK
+
+ This variable contains the command to execute before linking the TARGET
+ together. This variable is normally empty and therefore nothing is
+ executed, additionally some backends will not support this - mostly only
+ Makefile backends.
+
+ \section1 QMAKE_LN_SHLIB
+
+ This variable contains the command to execute when creating a link
+ to a shared library. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_MAC_SDK
+
+ This variable is used on Mac OS X when building universal binaries.
+ This process is described in more detail in the
+ \l{Deploying an Application on Mac OS X#Architecture Dependencies}{Deploying
+ an Application on Mac OS X} document.
+
+ \section1 QMAKE_MACOSX_DEPLOYMENT_TARGET
+ This variable only has an effect when building on Mac OS X. On that
+ platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
+ environment variable, which is interpreted by the compiler or linker.
+ For more information, see the
+ \l{Deploying an Application on Mac OS X#Mac OS X Version Dependencies}{Deploying
+ an Application on Mac OS X} document.
+
+ \section1 QMAKE_MAKEFILE
+
+ This variable contains the name of the Makefile to create. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_MOC_SRC
+
+ This variable contains the names of all moc source files to
+ generate and include in the project. The value of this variable is
+ typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_QMAKE
+
+ This variable contains the location of qmake if it is not in the path.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_QT_DLL
+
+ This variable is not empty if Qt was built as a dll. The
+ value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_RESOURCE_FLAGS
+
+ This variable is used to customize the list of options passed to the
+ \l{rcc}{Resource Compiler} in each of the build rules where it is used.
+ For example, the following line ensures that the \c{-threshold} and
+ \c{-compress} options are used with particular values each time that
+ \c rcc is invoked:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45
+
+ \section1 QMAKE_RUN_CC
+
+ This variable specifies the individual rule needed to build an object.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_RUN_CC_IMP
+
+ This variable specifies the individual rule needed to build an object.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_RUN_CXX
+
+ This variable specifies the individual rule needed to build an object.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_RUN_CXX_IMP
+
+ This variable specifies the individual rule needed to build an object.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_TARGET
+
+ This variable contains the name of the project target. The value of
+ this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 QMAKE_UIC
+
+ This variable contains the location of uic if it is not in the path.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ It can be used to specify arguments to uic as well, such as additional plugin
+ paths. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 46
+
+ \section1 QT
+
+ The values stored in the \c QT variable control which of the Qt modules are
+ used by your project.
+
+ The table below shows the options that can be used with the \c QT variable
+ and the features that are associated with each of them:
+
+ \table
+ \header \o Option \o Features
+ \row \o core (included by default) \o QtCore module
+ \row \o gui (included by default) \o QtGui module
+ \row \o network \o QtNetwork module
+ \row \o opengl \o QtOpenGL module
+ \row \o phonon \o Phonon Multimedia Framework
+ \row \o sql \o QtSql module
+ \row \o svg \o QtSvg module
+ \row \o xml \o QtXml module
+ \row \o webkit \o WebKit integration
+ \row \o qt3support \o Qt3Support module
+ \endtable
+
+ By default, \c QT contains both \c core and \c gui, ensuring that standard
+ GUI applications can be built without further configuration.
+
+ If you want to build a project \e without the QtGui module, you need to
+ exclude the \c gui value with the "-=" operator; the following line will
+ result in a minimal Qt project being built:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 47
+
+ Note that adding the \c opengl option to the \c QT variable automatically
+ causes the equivalent option to be added to the \c CONFIG variable.
+ Therefore, for Qt applications, it is not necessary to add the \c opengl
+ option to both \c CONFIG and \c{QT}.
+
+ \section1 QTPLUGIN
+
+ This variable contains a list of names of static plugins that are to be
+ compiled with an application so that they are available as built-in
+ resources.
+
+ \target QT_VERSION
+ \section1 QT_VERSION
+
+ This variable contains the current version of Qt.
+
+ \target QT_MAJOR_VERSION
+ \section1 QT_MAJOR_VERSION
+
+ This variable contains the current major version of Qt.
+
+ \target QT_MINOR_VERSION
+ \section1 QT_MINOR_VERSION
+
+ This variable contains the current minor version of Qt.
+
+ \target QT_PATCH_VERSION
+ \section1 QT_PATCH_VERSION
+
+ This variable contains the current patch version of Qt.
+
+ \section1 RC_FILE
+
+ This variable contains the name of the resource file for the application.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target RCC_DIR
+ \section1 RCC_DIR
+
+ This variable specifies the directory where all intermediate
+ resource files should be placed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 48
+
+ \target REQUIRES
+ \section1 REQUIRES
+
+ This is a special variable processed by \c qmake. If the
+ contents of this variable do not appear in CONFIG by the time this
+ variable is assigned, then a minimal Makefile will be generated that
+ states what dependencies (the values assigned to REQUIRES) are
+ missing.
+
+ This is mainly used in Qt's build system for building the examples.
+
+ \section1 RES_FILE
+
+ This variable contains the name of the resource file for the application.
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target SIGNATURE_FILE
+ \section1 SIGNATURE_FILE
+
+ \e {This is only used on Windows CE.}
+
+ Specifies which signature file should be used to sign the project target.
+
+ \note This variable will overwrite the setting you have specified in configure,
+ with the \c -signature option.
+
+ \target SOURCES
+ \section1 SOURCES
+
+ This variable contains the name of all source files in the project.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 49
+
+ See also \l{#HEADERS}{HEADERS}
+
+ \section1 SRCMOC
+
+ This variable is set by \c qmake if files can be found that
+ contain the Q_OBJECT macro. \c SRCMOC contains the
+ name of all the generated moc files. The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target SUBDIRS
+ \section1 SUBDIRS
+
+ This variable, when used with the \l{#TEMPLATE}{\c subdirs template}
+ contains the names of all subdirectories that contain parts of the project
+ that need be built. Each subdirectory must contain its own project file.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 50
+
+ It is essential that the project file in each subdirectory has the same
+ name as the subdirectory itself, so that \c qmake can find it.
+ For example, if the subdirectory is called \c myapp then the project file
+ in that directory should be called \c myapp.pro.
+
+ If you need to ensure that the subdirectories are built in the order in
+ which they are specified, update the \l{#CONFIG}{CONFIG} variable to
+ include the \c ordered option:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 51
+
+ \target TARGET
+ \section1 TARGET
+
+ This specifies the name of the target file.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 52
+
+ The project file above would produce an executable named \c myapp on
+ unix and 'myapp.exe' on windows.
+
+ \section1 TARGET_EXT
+
+ This variable specifies the target's extension. The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \section1 TARGET_x
+
+ This variable specifies the target's extension with a major version number. The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \section1 TARGET_x.y.z
+
+ This variable specifies the target's extension with version number. The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \target TEMPLATE
+ \section1 TEMPLATE
+
+ This variable contains the name of the template to use when
+ generating the project. The allowed values are:
+
+ \table
+ \header \o Option \o Description
+ \row \o app \o Creates a Makefile for building applications (the default). (See
+ \l{qmake Common Projects#Application}{qmake Common Projects} for more information.)
+ \row \o lib \o Creates a Makefile for building libraries. (See
+ \l{qmake Common Projects#Library}{qmake Common Projects} for more information.)
+ \row \o subdirs \o Creates a Makefile for building targets in subdirectories.
+ The subdirectories are specified using the \l{#SUBDIRS}{SUBDIRS}
+ variable.
+ \row \o vcapp \o \e {Windows only} Creates an application project for Visual Studio.
+ (See \l{qmake Platform Notes#Creating Visual Studio Project Files}{qmake Platform Notes}
+ for more information.)
+ \row \o vclib \o \e {Windows only} Creates a library project for Visual Studio.
+ (See \l{qmake Platform Notes#Creating Visual Studio Project Files}{qmake Platform Notes}
+ for more information.)
+ \endtable
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 53
+
+ The template can be overridden by specifying a new template type with the
+ \c -t command line option. This overrides the template type \e after the .pro
+ file has been processed. With .pro files that use the template type to
+ determine how the project is built, it is necessary to declare TEMPLATE on
+ the command line rather than use the \c -t option.
+
+ \section1 TRANSLATIONS
+
+ This variable contains a list of translation (.ts) files that contain
+ translations of the user interface text into non-native languages.
+
+ See the \l{Qt Linguist Manual} for more information about
+ internationalization (i18n) and localization (l10n) with Qt.
+
+ \section1 UICIMPLS
+
+ This variable contains a list of the generated implementation files by UIC.
+ The value of this variable
+ is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
+ modified.
+
+ \section1 UICOBJECTS
+
+ This variable is generated from the UICIMPLS variable. The extension of each
+ file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is
+ typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
+
+ \target UI_DIR
+ \section1 UI_DIR
+
+ This variable specifies the directory where all intermediate files from uic
+ should be placed. This variable overrides both UI_SOURCES_DIR and
+ UI_HEADERS_DIR.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 54
+
+ \target UI_HEADERS_DIR
+ \section1 UI_HEADERS_DIR
+
+ This variable specifies the directory where all declaration files (as
+ generated by uic) should be placed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 55
+
+ \target UI_SOURCES_DIR
+ \section1 UI_SOURCES_DIR
+
+ This variable specifies the directory where all implementation files (as generated
+ by uic) should be placed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 56
+
+ \target VERSION
+ \section1 VERSION
+
+ This variable contains the version number of the application or library if
+ either the \c app \l{#TEMPLATE}{TEMPLATE} or the \c lib \l{#TEMPLATE}{TEMPLATE}
+ is specified.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 57
+
+ \section1 VER_MAJ
+
+ This variable contains the major version number of the library, if the
+ \c lib \l{#TEMPLATE}{template} is specified.
+
+ \section1 VER_MIN
+
+ This variable contains the minor version number of the library, if the
+ \c lib \l{#TEMPLATE}{template} is specified.
+
+ \section1 VER_PAT
+
+ This variable contains the patch version number of the library, if the
+ \c lib \l{#TEMPLATE}{template} is specified.
+
+ \section1 VPATH
+
+ This variable tells \c qmake where to search for files it cannot
+ open. With this you may tell \c qmake where it may look for things
+ like SOURCES, and if it finds an entry in SOURCES that cannot be
+ opened it will look through the entire VPATH list to see if it can
+ find the file on its own.
+
+ See also \l{#DEPENDPATH}{DEPENDPATH}.
+
+ \section1 YACCIMPLS
+
+ This variable contains a list of yacc source files. The value of
+ this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \section1 YACCOBJECTS
+
+ This variable contains a list of yacc object files. The value of
+ this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ \target YACCSOURCES
+ \section1 YACCSOURCES
+
+ This variable contains a list of yacc source files to be included
+ in the project. All dependencies, headers and source files will
+ automatically be included in the project.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 58
+
+ \section1 _PRO_FILE_
+
+ This variable contains the path to the project file in use.
+
+ For example, the following line causes the location of the project
+ file to be written to the console:
+
+ \snippet doc/src/snippets/qmake/project_location.pro project file
+
+ \section1 _PRO_FILE_PWD_
+
+ This variable contains the path to the directory containing the project
+ file in use.
+
+ For example, the following line causes the location of the directory
+ containing the project file to be written to the console:
+
+ \snippet doc/src/snippets/qmake/project_location.pro project file directory
+*/
+
+/*!
+ \page qmake-function-reference.html
+ \title qmake Function Reference
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Variable Reference
+ \nextpage Configuring qmake's Environment
+
+ \c qmake provides built-in functions to allow the contents of
+ variables to be processed, and to enable tests to be performed
+ during the configuration process. Functions that process the
+ contents of variables typically return values that can be assigned
+ to other variables, and these values are obtained by prefixing
+ function with the \c $$ operator. Functions that perform tests
+ are usually used as the conditional parts of scopes; these are
+ indicated in the function descriptions below.
+
+ \tableofcontents{2}
+
+ \section1 basename(variablename)
+
+ Returns the basename of the file specified. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 59
+
+ \section1 CONFIG(config)
+ [Conditional]
+
+ This function can be used to test for variables placed into the
+ \c CONFIG variable. This is the same as regular old style (tmake) scopes,
+ but has the added advantage a second parameter can be passed to test for
+ the active config. As the order of values is important in \c CONFIG
+ variables (i.e. the last one set will be considered the active config for
+ mutually exclusive values) a second parameter can be used to specify a set
+ of values to consider. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 60
+
+ Because release is considered the active setting (for feature parsing)
+ it will be the CONFIG used to generate the build file. In the common
+ case a second parameter is not needed, but for specific mutual
+ exclusive tests it is invaluable.
+
+ \section1 contains(variablename, value)
+ [Conditional]
+
+ Succeeds if the variable \e variablename contains the value \e value;
+ otherwise fails. You can check the return value of this function using
+ a scope.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 61
+
+ The contents of the scope are only processed if the \c drivers
+ variable contains the value, \c network. If this is the case, the
+ appropriate files are added to the \c SOURCES and \c HEADERS
+ variables.
+
+ \section1 count(variablename, number)
+ [Conditional]
+
+ Succeeds if the variable \e variablename contains a list with the
+ specified \e number of value; otherwise fails.
+
+ This function is used to ensure that declarations inside a scope are
+ only processed if the variable contains the correct number of values;
+ for example:
+
+ \snippet doc/src/snippets/qmake/functions.pro 2
+
+ \section1 dirname(file)
+
+ Returns the directory name part of the specified file. For example:
+
+ \snippet doc/src/snippets/qmake/dirname.pro 0
+
+ \section1 error(string)
+
+ This function never returns a value. \c qmake displays the given
+ \e string to the user, and exits. This function should only be used
+ for unrecoverable errors.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 62
+
+ \section1 eval(string)
+ [Conditional]
+
+ Evaluates the contents of the string using \c qmake's syntax rules
+ and returns true.
+ Definitions and assignments can be used in the string to modify the
+ values of existing variables or create new definitions.
+
+ For example:
+ \snippet doc/src/snippets/qmake/functions.pro 4
+
+ Note that quotation marks can be used to delimit the string, and that
+ the return value can be discarded if it is not needed.
+
+ \section1 exists(filename)
+ [Conditional]
+
+ Tests whether a file with the given \e filename exists.
+ If the file exists, the function succeeds; otherwise it fails.
+ If a regular expression is specified for the filename, this function
+ succeeds if any file matches the regular expression specified.
+
+ For example:
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 63
+
+ Note that "/" can be used as a directory separator, regardless of the
+ platform in use.
+
+ \section1 find(variablename, substr)
+
+ Places all the values in \e variablename that match \e substr. \e
+ substr may be a regular expression, and will be matched accordingly.
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 64
+
+ MY_VAR2 will contain '-Lone -Ltwo -Lthree -Lfour -Lfive', and MY_VAR3 will
+ contains 'three two three'.
+
+ \section1 for(iterate, list)
+
+ This special test function will cause a loop to be started that
+ iterates over all values in \e list, setting \e iterate to each
+ value in turn. As a convenience, if \e list is 1..10 then iterate will
+ iterate over the values 1 through 10.
+
+ The use of an else scope afer a condition line with a for() loop is
+ disallowed.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 65
+
+ \section1 include(filename)
+ [Conditional]
+
+ Includes the contents of the file specified by \e filename into the
+ current project at the point where it is included. This function
+ succeeds if \e filename is included; otherwise it fails. The included
+ file is processed immediately.
+
+ You can check whether the file was included by using this function as
+ the condition for a scope; for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 66
+
+ \section1 infile(filename, var, val)
+ [Conditional]
+
+ Succeeds if the file \e filename (when parsed by \c qmake itself)
+ contains the variable \e var with a value of \e val; otherwise fails.
+ If you do not specify a third argument (\e val), the function will
+ only test whether \e var has been declared in the file.
+
+ \section1 isEmpty(variablename)
+ [Conditional]
+
+ Succeeds if the variable \e variablename is empty; otherwise fails.
+ This is the equivalent of \c{count( variablename, 0 )}.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 67
+
+ \section1 join(variablename, glue, before, after)
+
+ Joins the value of \e variablename with \c glue. If this value is
+ non-empty it prefixes the value with \e before and suffix it with \e
+ after. \e variablename is the only required field, the others default
+ to empty strings. If you need to encode spaces in \e glue, \e before, or \e
+ after you must quote them.
+
+ \section1 member(variablename, position)
+
+ Returns the value at the given \e position in the list of items in
+ \e variablename.
+ If an item cannot be found at the position specified, an empty string is
+ returned. \e variablename is the only required field. If not specified,
+ \c position defaults to 0, causing the first value in the list to be
+ returned.
+
+ \section1 message(string)
+
+ This function simply writes a message to the console. Unlike the
+ \c error() function, this function allows processing to continue.
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 68
+
+ The above line causes "This is a message" to be written to the console.
+ The use of quotation marks is optional.
+
+ \note By default, messages are written out for each Makefile generated by
+ qmake for a given project. If you want to ensure that messages only appear
+ once for each project, test the \c build_pass variable
+ \l{qmake Advanced Usage}{in conjunction with a scope} to filter out
+ messages during builds; for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 69
+
+ \section1 prompt(question)
+
+ Displays the specified \e question, and returns a value read from stdin.
+
+ \section1 quote(string)
+
+ Converts a whole \e string into a single entity and returns the result.
+ Newlines, carriage returns, and tabs can be specified in the string
+ with \\n \\r and \\t. The return value does not contain either single
+ or double quotation marks unless you explicitly include them yourself,
+ but will be placed into a single entry (for literal expansion).
+
+ \section1 replace(string, old_string, new_string)
+
+ Replaces each instance of \c old_string with \c new_string in the
+ contents of the variable supplied as \c string. For example, the
+ code
+
+ \snippet doc/src/snippets/qmake/replace.pro 0
+
+ prints the message:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 70
+
+ \section1 sprintf(string, arguments...)
+
+ Replaces %1-%9 with the arguments passed in the comma-separated list
+ of function \e arguments and returns the processed string.
+
+ \section1 system(command)
+ [Conditional]
+
+ Executes the given \c command in a secondary shell, and succeeds
+ if the command returns with a zero exit status; otherwise fails.
+ You can check the return value of this function using a scope:
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 71
+
+ Alternatively, you can use this function to obtain stdout and stderr
+ from the command, and assign it to a variable. For example, you can
+ use this to interrogate information about the platform:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 72
+
+ \target unique
+ \section1 unique(variablename)
+
+ This will return a list of values in variable that are unique (that is
+ with repetitive entries removed). For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 73
+
+ \section1 warning(string)
+
+ This function will always succeed, and will display the given
+ \e string to the user. message() is a synonym for warning().
+*/
+
+/*!
+ \page qmake-environment-reference.html
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Function Reference
+
+ \title Configuring qmake's Environment
+
+ \tableofcontents
+
+ \target Properties
+ \section1 Properties
+
+ \c qmake has a system of persistant information, this allows you to
+ \c set a variable in qmake once, and each time qmake is invoked this
+ value can be queried. Use the following to set a property in qmake:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 74
+
+ The appropriate variable and value should be substituted for
+ \c VARIABLE and \c VALUE.
+
+ To retrieve this information back from qmake you can do:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 75
+
+ \note \c{qmake -query} will only list variables that you have
+ previously set with \c{qmake -set VARIABLE VALUE}.
+
+ This information will be saved into a QSettings object (meaning it
+ will be stored in different places for different platforms). As
+ \c VARIABLE is versioned as well, you can set one value in an older
+ version of \c qmake, and newer versions will retrieve this value. However,
+ if you set \c VARIABLE for a newer version of \c qmake, the older version
+ will not use this value. You can however query a specific version of a
+ variable if you prefix that version of \c qmake to \c VARIABLE, as in
+ the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 76
+
+ \c qmake also has the notion of \c builtin properties, for example you can
+ query the installation of Qt for this version of \c qmake with the
+ \c QT_INSTALL_PREFIX property:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 77
+
+ These built-in properties cannot have a version prefixed to them as
+ they are not versioned, and each version of \c qmake will have its own
+ built-in set of these values. The list below outlines the built-in
+ properties:
+
+ \list
+ \o \c QT_INSTALL_PREFIX - Where the version of Qt this qmake is built for resides
+ \o \c QT_INSTALL_DATA - Where data for this version of Qt resides
+ \o \c QMAKE_VERSION - The current version of qmake
+ \endlist
+
+ Finally, these values can be queried in a project file with a special
+ notation such as:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 78
+
+ \target QMAKESPEC
+ \section1 QMAKESPEC
+
+ \c qmake requires a platform and compiler description file which
+ contains many default values used to generate appropriate Makefiles.
+ The standard Qt distribution comes with many of these files, located
+ in the \c mkspecs subdirectory of the Qt installation.
+
+ The \c QMAKESPEC environment variable can contain any of the following:
+
+ \list
+ \o A complete path to a directory containing a \c{qmake.conf} file.
+ In this case \c qmake will open the \c{qmake.conf} file from within that
+ directory. If the file does not exist, \c qmake will exit with an
+ error.
+ \o The name of a platform-compiler combination. In this case, \c qmake
+ will search in the directory specified by the \c mkspecs subdirectory
+ of the data path specified when Qt was compiled (see
+ QLibraryInfo::DataPath).
+ \endlist
+
+ \bold{Note:} The \c QMAKESPEC path will automatically be added to the
+ \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} system variable.
+
+ \target INSTALLS
+ \section1 INSTALLS
+
+ It is common on Unix to also use the build tool to install applications
+ and libraries; for example, by invoking \c{make install}. For this reason,
+ \c qmake has the concept of an install set, an object which contains
+ instructions about the way part of a project is to be installed.
+ For example, a collection of documentation files can be described in the
+ following way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 79
+
+ The \c path member informs \c qmake that the files should be installed in
+ \c /usr/local/program/doc (the path member), and the \c files member
+ specifies the files that should be copied to the installation directory.
+ In this case, everything in the \c docs directory will be coped to
+ \c /usr/local/program/doc.
+
+ Once an install set has been fully described, you can append it to the
+ install list with a line like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 80
+
+ \c qmake will ensure that the specified files are copied to the installation
+ directory. If you require greater control over this process, you can also
+ provide a definition for the \c extra member of the object. For example,
+ the following line tells \c qmake to execute a series of commands for this
+ install set:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 81
+
+ The \c unix scope
+ (see \l{qmake Advanced Usage#Scopes and Conditions}{Scopes and Conditions})
+ ensures that these particular commands are only executed on Unix platforms.
+ Appropriate commands for other platforms can be defined using other scope
+ rules.
+
+ Commands specified in the \c extra member are executed before the instructions
+ in the other members of the object are performed.
+
+ If you append a built-in install set to the \c INSTALLS variable and do
+ not specify \c files or \c extra members, \c qmake will decide what needs to
+ be copied for you. Currently, the only supported built-in install set is
+ \c target:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 82
+
+ In the above lines, \c qmake knows what needs to be copied, and will handle
+ the installation process automatically.
+
+ \target cache
+ \section1 Cache File
+
+ The cache file is a special file \c qmake reads to find settings not specified
+ in the \c qmake.conf file, project files, or at the command line. If
+ \c -nocache is not specified when \c qmake is run, it will try to find a file
+ called \c{.qmake.cache} in parent directories of the current directory. If
+ it fails to find this file, it will silently ignore this step of processing.
+
+ \target LibDepend
+ \section1 Library Dependencies
+
+ Often when linking against a library, \c qmake relies on the underlying
+ platform to know what other libraries this library links against, and
+ lets the platform pull them in. In many cases, however, this is not
+ sufficent. For example, when statically linking a library, no other
+ libraries are linked to, and therefore no dependencies to those
+ libraries are created. However, an application that later links
+ against this library will need to know where to find the symbols that
+ the static library will require. To help with this situation, \c qmake
+ attempts to follow a library's dependencies where appropriate, but
+ this behavior must be explicitly enabled by following two steps.
+
+ The first step is to enable dependency tracking in the library itself.
+ To do this you must tell \c qmake to save information about the library:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 83
+
+ This is only relevant to the \c lib template, and will be ignored for
+ all others. When this option is enabled, \c qmake will create a file
+ ending in .prl which will save some meta-information about the
+ library. This metafile is just like an ordinary project file, but only
+ contains internal variable declarations. You are free to view this file
+ and, if it is deleted, \c qmake will know to recreate it when necessary,
+ either when the project file is later read, or if a dependent library
+ (described below) has changed. When installing this library, by
+ specifying it as a target in an \c INSTALLS declaration, \c qmake will
+ automatically copy the .prl file to the installation path.
+
+ The second step in this process is to enable reading of this meta
+ information in the applications that use the static library:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 84
+
+ When this is enabled, \c qmake will process all libraries linked to
+ by the application and find their meta-information. \c qmake will use
+ this to determine the relevant linking information, specifically adding
+ values to the application project file's list of \c DEFINES as well as
+ \c LIBS. Once \c qmake has processed this file, it will then look through
+ the newly introduced libraries in the \c LIBS variable, and find their
+ dependent .prl files, continuing until all libraries have been resolved.
+ At this point, the Makefile is created as usual, and the libraries are
+ linked explicitlyy against the application.
+
+ The internals of the .prl file are left closed so they can easily
+ change later. They are not designed to be changed by hand, should only
+ be created by \c qmake, and should not be transferred between operating
+ systems as they may contain platform-dependent information.
+
+ \target Extensions
+ \section1 File Extensions
+
+ Under normal circumstances \c qmake will try to use appropriate file extensions
+ for your platform. However, it is sometimes necessary to override the default
+ choices for each platform and explicitly define file extensions for \c qmake to use.
+ This is achieved by redefining certain built-in variables; for example the extension
+ used for \l moc files can be redefined with the following assignment in a project
+ file:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 85
+
+ The following variables can be used to redefine common file extensions recognized
+ by \c qmake:
+
+ \list
+ \o QMAKE_EXT_MOC - This modifies the extension placed on included moc files.
+ \o QMAKE_EXT_UI - This modifies the extension used for designer UI files (usually
+ in \c FORMS).
+ \o QMAKE_EXT_PRL - This modifies the extension placed on
+ \l{#LibDepend}{library dependency files}.
+ \o QMAKE_EXT_LEX - This changes the suffix used in files (usually in \c LEXSOURCES).
+ \o QMAKE_EXT_YACC - This changes the suffix used in files (usually in \c YACCSOURCES).
+ \o QMAKE_EXT_OBJ - This changes the suffix used on generated object files.
+ \endlist
+
+ All of the above accept just the first value, so you must assign to it just one
+ value that will be used throughout your project file. There are two variables that
+ accept a list of values:
+
+ \list
+ \o QMAKE_EXT_CPP - Causes \c qmake to interpret all files with these suffixes as
+ C++ source files.
+ \o QMAKE_EXT_H - Causes \c qmake to interpret all files with these suffixes as
+ C and C++ header files.
+ \endlist
+
+ \target Customizing
+ \section1 Customizing Makefile Output
+
+ \c qmake tries to do everything expected of a cross-platform build tool.
+ This is often less than ideal when you really need to run special
+ platform-dependent commands. This can be achieved with specific instructions
+ to the different \c qmake backends.
+
+ Customization of the Makefile output is performed through an object-style
+ API as found in other places in \c qmake. Objects are defined automatically
+ by specifying their members; for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 86
+
+ The definitions above define a \c qmake target called \c mytarget, containing
+ a Makefile target called \c{.buildfile} which in turn is generated with
+ the \c touch command. Finally, the \c{.depends} member specifies that
+ \c mytarget depends on \c mytarget2, another target that is defined afterwards.
+ \c mytarget2 is a dummy target; it is only defined to echo some text to
+ the console.
+
+ The final step is to instruct \c qmake that this object is a target to be built:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 87
+
+ This is all you need to do to actually build custom targets. Of course, you may
+ want to tie one of these targets to the
+ \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you simply need to
+ include your Makefile target in the list of
+ \l{qmake Variable Reference#PRE_TARGETDEPS}{PRE_TARGETDEPS}.
+
+ The following tables are an overview of the options available to you with the QMAKE_EXTRA_TARGETS
+ variable.
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o commands
+ \o The commands for generating the custom build target.
+ \row
+ \o CONFIG
+ \o Specific configuration options for the custom build target. See the CONFIG table for details.
+ \row
+ \o depends
+ \o The existing build targets that the custom build target depends on.
+ \row
+ \o recurse
+ \o Specifies which sub-targets should used when creating the rules in the Makefile to call in
+ the sub-target specific Makefile. This is only used when \c recursive is set in the CONFIG.
+ \row
+ \o recurse_target
+ \o Specifies the target that should be built via the sub-target Makefile for the rule in the Makefile.
+ This adds something like $(MAKE) -f Makefile.[subtarget] [recurse_target]. This is only used when
+ \c recursive is set in the CONFIG.
+ \row
+ \o target
+ \o The file being created by the custom build target.
+ \endtable
+
+ List of members specific to the CONFIG option:
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o recursive
+ \o Indicates that rules should be created in the Makefile and thus call
+ the relevant target inside the sub-target specific Makefile. This defaults to creating
+ an entry for each of the sub-targets.
+ \endtable
+
+ For convenience, there is also a method of customizing projects
+ for new compilers or preprocessors:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 88
+
+ With the above definitions, you can use a drop-in replacement for moc if one
+ is available. The commands is executed on all arguments given to the
+ \c NEW_HEADERS variable (from the \c input member), and the result is written
+ to the file defined by the \c output member; this file is added to the
+ other source files in the project.
+ Additionally, \c qmake will execute \c depend_command to generate dependency
+ information, and place this information in the project as well.
+
+ These commands can easily be placed into a cache file, allowing subsequent
+ project files to add arguments to \c NEW_HEADERS.
+
+ The following tables are an overview of the options available to you with the QMAKE_EXTRA_COMPILERS
+ variable.
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o commands
+ \o The commands used for for generating the output from the input.
+ \row
+ \o CONFIG
+ \o Specific configuration options for the custom compiler. See the CONFIG table for details.
+ \row
+ \o depend_command
+ \o Specifies a command used to generate the list of dependencies for the output.
+ \row
+ \o dependency_type
+ \o Specifies the type of file the output is, if it is a known type (such as TYPE_C,
+ TYPE_UI, TYPE_QRC) then it is handled as one of those type of files.
+ \row
+ \o depends
+ \o Specifies the dependencies of the output file.
+ \row
+ \o input
+ \o The variable that contains the files that should be processed with the custom compiler.
+ \row
+ \o name
+ \o A description of what the custom compiler is doing. This is only used in some backends.
+ \row
+ \o output
+ \o The filename that is created from the custom compiler.
+ \row
+ \o output_function
+ \o Specifies a custom qmake function that is used to specify the filename to be created.
+ \row
+ \o variables
+ \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to
+ in the pro file as $(VARNAME).
+ \row
+ \o variable_out
+ \o The variable that the files created from the output should be added to.
+ \endtable
+
+ List of members specific to the CONFIG option:
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o combine
+ \o Indicates that all of the input files are combined into a single output file.
+ \row
+ \o target_predeps
+ \o Indicates that the output should be added to the list of PRE_TARGETDEPS.
+ \row
+ \o explicit_dependencies
+ \o The dependencies for the output only get generated from the depends member and from
+ nowhere else.
+ \row
+ \o no_link
+ \o Indicates that the output should not be added to the list of objects to be linked in
+ \endtable
+*/
+
+/*!
+ \page qmake-advanced-usage.html
+ \title qmake Advanced Usage
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Platform Notes
+ \nextpage Using Precompiled Headers
+
+ Many \c qmake project files simply describe the sources and header files used
+ by the project, using a list of \c{name = value} and \c{name += value}
+ definitions. \c qmake also provides other operators, functions, and scopes
+ that can be used to process the information supplied in variable declarations.
+ These advanced features allow Makefiles to be generated for multiple platforms
+ from a single project file.
+
+ \tableofcontents
+
+ \section1 Operators
+
+ In many project files, the assignment (\c{=}) and append (\c{+=}) operators can
+ be used to include all the information about a project. The typical pattern of
+ use is to assign a list of values to a variable, and append more values
+ depending on the result of various tests. Since \c qmake defines certain
+ variables using default values, it is sometimes necessary to use the removal
+ (\c{-=}) operator to filter out values that are not required. The following
+ operators can be used to manipulate the contents of variables.
+
+ The \c = operator assigns a value to a variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 89
+
+ The above line sets the \c TARGET variable to \c myapp. This will overwrite any
+ values previously set for \c TARGET with \c myapp.
+
+ The \c += operator appends a new value to the list of values in a variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 90
+
+ The above line appends \c QT_DLL to the list of pre-processor defines to be put
+ in the generated Makefile.
+
+ The \c -= operator removes a value from the list of values in a variable:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 91
+
+ The above line removes \c QT_DLL from the list of pre-processor defines to be
+ put in the generated Makefile.
+
+ The \c *= operator adds a value to the list of values in a variable, but only
+ if it is not already present. This prevents values from being included many
+ times in a variable. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 92
+
+ In the above line, \c QT_DLL will only be added to the list of pre-processor
+ defines if it is not already defined. Note that the
+ \l{qmake Function Reference#unique}{unique()}
+ function can also be used to ensure that a variables only contains one
+ instance of each value.
+
+ The \c ~= operator replaces any values that match a regular expression with
+ the specified value:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 93
+
+ In the above line, any values in the list that start with \c QT_D or \c QT_T are
+ replaced with \c QT.
+
+ The \c $$ operator is used to extract the contents of a variable, and can be
+ used to pass values between variables or supply them to functions:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 94
+
+ \target Scopes
+ \section1 Scopes
+
+ Scopes are similar to \c if statements in procedural programming languages.
+ If a certain condition is true, the declarations inside the scope are processed.
+
+ \section2 Syntax
+
+ Scopes consist of a condition followed by an opening brace on the same line,
+ a sequence of commands and definitions, and a closing brace on a new line:
+
+ \snippet doc/src/snippets/qmake/scopes.pro syntax
+
+ The opening brace \e{must be written on the same line as the condition}.
+ Scopes may be concatenated to include more than one condition; see below
+ for examples.
+
+ \section2 Scopes and Conditions
+
+ A scope is written as a condition followed by a series of declarations
+ contained within a pair of braces; for example:
+
+ \snippet doc/src/snippets/qmake/scopes.pro 0
+
+ The above code will add the \c paintwidget_win.cpp file to the sources listed
+ in the generated Makefile if \c qmake is used on a Windows platform.
+ If \c qmake is used on a platform other than Windows, the define will be
+ ignored.
+
+ The conditions used in a given scope can also be negated to provide an
+ alternative set of declarations that will be processed only if the
+ original condition is false. For example, suppose we want to process
+ something on all platforms \e except for Windows. We can achieve this by
+ negating the scope like this:
+
+ \snippet doc/src/snippets/qmake/scopes.pro 1
+
+ Scopes can be nested to combine more than one condition. For instance, if
+ you want to include a particular file for a certain platform only if
+ debugging is enabled then you write the following:
+
+ \snippet doc/src/snippets/qmake/scopes.pro 2
+
+ To save writing many nested scopes, you can nest scopes using the \c :
+ operator. The nested scopes in the above example can be rewritten in
+ the following way:
+
+ \snippet doc/src/snippets/qmake/scopes.pro 3
+
+ You may also use the \c : operator to perform single line conditional
+ assignments; for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 95
+
+ The above line adds \c QT_DLL to the \c DEFINES variable only on the
+ Windows platform.
+ Generally, the \c : operator behaves like a logical AND operator, joining
+ together a number of conditions, and requiring all of them to be true.
+
+ There is also the \c | operator to act like a logical OR operator, joining
+ together a number of conditions, and requiring only one of them to be true.
+
+ \snippet doc/src/snippets/qmake/scopes.pro 4
+
+ You can also provide alternative declarations to those within a scope by
+ using an \c else scope. Each \c else scope is processed if the conditions
+ for the preceding scopes are false.
+ This allows you to write complex tests when combined with other scopes
+ (separated by the \c : operator as above). For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 96
+
+ \section2 Configuration and Scopes
+
+ The values stored in the
+ \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable}
+ are treated specially by \c qmake. Each of the possible values can be
+ used as the condition for a scope. For example, the list of values
+ held by \c CONFIG can be extended with the \c opengl value:
+
+ \snippet doc/src/snippets/qmake/configscopes.pro 0
+
+ As a result of this operation, any scopes that test for \c opengl will
+ be processed. We can use this feature to give the final executable an
+ appropriate name:
+
+ \snippet doc/src/snippets/qmake/configscopes.pro 1
+ \snippet doc/src/snippets/qmake/configscopes.pro 2
+ \snippet doc/src/snippets/qmake/configscopes.pro 3
+
+ This feature makes it easy to change the configuration for a project
+ without losing all the custom settings that might be needed for a specific
+ configuration. In the above code, the declarations in the first scope are
+ processed, and the final executable will be called \c application-gl.
+ However, if \c opengl is not specified, the declarations in the second
+ scope are processed instead, and the final executable will be called
+ \c application.
+
+ Since it is possible to put your own values on the \c CONFIG
+ line, this provides you with a convenient way to customize project files
+ and fine-tune the generated Makefiles.
+
+ \section2 Platform Scope Values
+
+ In addition to the \c win32, \c macx, and \c unix values used in many
+ scope conditions, various other built-in platform and compiler-specific
+ values can be tested with scopes. These are based on platform
+ specifications provided in Qt's \c mkspecs directory. For example, the
+ following lines from a project file show the current specification in
+ use and test for the \c linux-g++ specification:
+
+ \snippet doc/src/snippets/qmake/specifications.pro 0
+
+ You can test for any other platform-compiler combination as long as a
+ specification exists for it in the \c mkspecs directory.
+
+ \section1 Variables
+
+ Many of the variables used in project files are special variables that
+ \c qmake uses when generating Makefiles, such as \c DEFINES, \c SOURCES,
+ and \c HEADERS. It is possible for you to create variables for your own
+ use; \c qmake creates new variables with a given name when it encounters
+ an assignment to that name. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 97
+
+ There are no restricitions on what you do to your own variables, as \c
+ qmake will ignore them unless it needs to evaluate them when processing
+ a scope.
+
+ You can also assign the value of a current variable to another
+ variable by prefixing $$ to the variable name. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 98
+
+ Now the MY_DEFINES variable contains what is in the DEFINES variable at
+ this point in the project file. This is also equivalent to:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 99
+
+ The second notation allows you to append the contents of the variable to
+ another value without separating the two with a space. For example, the
+ following will ensure that the final executable will be given a name
+ that includes the project template being used:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 100
+
+ Variables can be used to store the contents of environment variables.
+ These can be evaluated at the time that \c qmake is run, or included
+ in the generated Makefile for evaluation when the project is built.
+
+ To obtain the contents of an environment value when \c qmake is run,
+ use the \c $$(...) operator:
+
+ \snippet doc/src/snippets/qmake/environment.pro 0
+
+ In the above assignment, the value of the \c PWD environment variable
+ is read when the project file is processed.
+
+ To obtain the contents of an environment value at the time when the
+ generated Makefile is processed, use the \c $(...) operator:
+
+ \snippet doc/src/snippets/qmake/environment.pro 1
+
+ In the above assignment, the value of \c PWD is read immediately
+ when the project file is processed, but \c $(PWD) is assigned to
+ \c DESTDIR in the generated Makefile. This makes the build process
+ more flexible as long as the environment variable is set correctly
+ when the Makefile is processed.
+
+ The special \c $$[...] operator can be used to access various
+ configuration options that were set when Qt was built:
+
+ \snippet doc/src/snippets/qmake/qtconfiguration.pro 0
+
+ The variables accessible with this operator are typically used to
+ enable third party plugins and components to be integrated with Qt.
+ For example, a \QD plugin can be installed alongside \QD's built-in
+ plugins if the following declaration is made in its project file:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 101
+
+ \target VariableProcessingFunctions
+ \section1 Variable Processing Functions
+
+ \c qmake provides a selection of built-in functions to allow the
+ contents of variables to be processed. These functions process the
+ arguments supplied to them and return a value, or list of values, as
+ a result. In order to assign a result to a variable, it is necessary
+ to use the \c $$ operator with this type of function in the same way
+ used to assign contents of one variable to another:
+
+ \snippet doc/src/snippets/qmake/functions.pro 1
+
+ This type of function should be used on the right-hand side of
+ assignments (i.e, as an operand).
+
+ It is possible to define your own functions for processing the
+ contents of variables. These functions can be defined in the following
+ way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 102
+
+ The following example function takes a variable name as its only
+ argument, extracts a list of values from the variable with the
+ \l{qmake-function-reference.html}{eval()} built-in function,
+ and compiles a list of files:
+
+ \snippet doc/src/snippets/qmake/replacefunction.pro 0
+
+ \target ConditionalFunctions
+ \section1 Conditional Functions
+
+ \c qmake provides built-in functions that can be used as conditions
+ when writing scopes. These functions do not return a value, but
+ instead indicate "success" or "failure":
+
+ \snippet doc/src/snippets/qmake/functions.pro 3
+
+ This type of function should be used in conditional expressions
+ only.
+
+ It is possible to define your own functions to provide conditions
+ for scopes. The following example tests whether each file in a list
+ exists and returns true if they all exist, or false if not:
+
+ \snippet doc/src/snippets/qmake/testfunction.pro 0
+
+ \section1 Adding New Configuration Features
+
+ \c qmake lets you create your own \e features that can be included in
+ project files by adding their names to the list of values specified by
+ the \c CONFIG variable. Features are collections of custom functions and
+ definitions in \c{.prf} files that can reside in one of many standard
+ directories. The locations of these directories are defined in a number
+ of places, and \c qmake checks each of them in the following order when
+ it looks for \c{.prf} files:
+
+ \list 1
+ \o In a directory listed in the \c QMAKEFEATURES environment variable;
+ this contains a colon-separated list of directories.
+ \o In a directory listed in the \c QMAKEFEATURES property variable; this
+ contains a colon-spearated list of directories.
+ \omit
+ \o In a features directory beneath the project's root directory (where
+ the \c{.qmake.cache} file is generated).
+ \endomit
+ \o In a features directory residing within a \c mkspecs directory.
+ \c mkspecs directories can be located beneath any of the directories
+ listed in the \c QMAKEPATH environment variable (a colon-separated list
+ of directories). (\c{$QMAKEPATH/mkspecs/<features>})
+ \o In a features directory residing beneath the directory provided by the
+ \c QMAKESPEC environment variable. (\c{$QMAKESPEC/<features>})
+ \o In a features directory residing in the \c data_install/mkspecs directory.
+ (\c{data_install/mkspecs/<features>})
+ \o In a features directory that exists as a sibling of the directory
+ specified by the \c QMAKESPEC environment variable.
+ (\c{$QMAKESPEC/../<features>})
+ \endlist
+
+ The following features directories are searched for features files:
+
+ \list 1
+ \o \c{features/unix}, \c{features/win32}, or \c{features/macx}, depending on
+ the platform in use
+ \o \c features/
+ \endlist
+
+ For example, consider the following assignment in a project file:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 103
+
+ With this addition to the \c CONFIG variable, \c qmake will search the
+ locations listed above for the \c myfeatures.prf file after it has
+ finished parsing your project file. On Unix systems, it will look for
+ the following file:
+
+ \list 1
+ \o \c $QMAKEFEATURES/myfeatures.prf (for each directory listed in the
+ \c QMAKEFEATURES environment variable)
+ \o \c $$QMAKEFEATURES/myfeatures.prf (for each directory listed in the
+ \c QMAKEFEATURES property variable)
+ \o \c myfeatures.prf (in the project's root directory)
+ \o \c $QMAKEPATH/mkspecs/features/unix/myfeatures.prf and
+ \c $QMAKEPATH/mkspecs/features/myfeatures.prf (for each directory
+ listed in the \c QMAKEPATH environment variable)
+ \o \c $QMAKESPEC/features/unix/myfeatures.prf and
+ \c $QMAKESPEC/features/myfeatures.prf
+ \o \c data_install/mkspecs/features/unix/myfeatures.prf and
+ \c data_install/mkspecs/features/myfeatures.prf
+ \o \c $QMAKESPEC/../features/unix/myfeatures.prf and
+ \c $QMAKESPEC/../features/myfeatures.prf
+ \endlist
+
+ \note The \c{.prf} files must have names in lower case.
+
+
+*/
+
+/*!
+ \page qmake-precompiledheaders.html
+ \title Using Precompiled Headers
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Advanced Usage
+ \nextpage qmake Reference
+ \ingroup buildsystem
+
+ \target Introduction
+
+ Precompiled headers are a performance feature supported by some
+ compilers to compile a stable body of code, and store the compiled
+ state of the code in a binary file. During subsequent compilations,
+ the compiler will load the stored state, and continue compiling the
+ specified file. Each subsequent compilation is faster because the
+ stable code does not need to be recompiled.
+
+ \c qmake supports the use of precompiled headers (PCH) on some
+ platforms and build environments, including:
+ \list
+ \o Windows
+ \list
+ \o nmake
+ \o Dsp projects (VC 6.0)
+ \o Vcproj projects (VC 7.0 \& 7.1)
+ \endlist
+ \o Mac OS X
+ \list
+ \o Makefile
+ \o Xcode
+ \endlist
+ \o Unix
+ \list
+ \o GCC 3.4 and above
+ \endlist
+ \endlist
+
+ \target ADD_PCH
+ \section1 Adding Precompiled Headers to Your Project
+
+ \target PCH_CONTENTS
+ \section2 Contents of the Precompiled Header File
+
+ The precompiled header must contain code which is \e stable
+ and \e static throughout your project. A typical PCH might look
+ like this:
+
+ \section3 Example: \c stable.h
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 104
+
+ Note that a precompiled header file needs to separate C includes from
+ C++ includes, since the precompiled header file for C files may not
+ contain C++ code.
+
+ \target PROJECT_OPTIONS
+ \section2 Project Options
+
+ To make your project use PCH, you only need to define the
+ \c PRECOMPILED_HEADER variable in your project file:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 105
+
+ \c qmake will handle the rest, to ensure the creation and use of the
+ precompiled header file. You do not need to include the precompiled
+ header file in \c HEADERS, as \c qmake will do this if the configuration
+ supports PCH.
+
+ All platforms that support precompiled headers have the configuration
+ option \c precompile_header set. Using this option, you may trigger
+ conditional blocks in your project file to add settings when using PCH.
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 106
+
+ \section1 Notes on Possible Issues
+
+ On some platforms, the file name suffix for precompiled header files is
+ the same as that for other object files. For example, the following
+ declarations may cause two different object files with the same name to
+ be generated:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 107
+
+ To avoid potential conflicts like these, it is good practice to ensure
+ that header files that will be precompiled are given distinctive names.
+
+ \target EXAMPLE_PROJECT
+ \section1 Example Project
+
+ You can find the following source code in the
+ \c{examples/qmake/precompile} directory in the Qt distribution:
+
+ \section2 \c mydialog.ui
+
+ \quotefromfile examples/qmake/precompile/mydialog.ui
+ \printuntil
+
+ \section2 \c stable.h
+
+ \snippet examples/qmake/precompile/stable.h 0
+
+ \section2 \c myobject.h
+
+ \snippet examples/qmake/precompile/myobject.h 0
+
+ \section2 \c myobject.cpp
+
+ \snippet examples/qmake/precompile/myobject.cpp 0
+
+ \section2 \c util.cpp
+
+ \snippet examples/qmake/precompile/util.cpp 0
+
+ \section2 \c main.cpp
+
+ \snippet examples/qmake/precompile/main.cpp 0
+
+ \section2 \c precompile.pro
+
+ \snippet examples/qmake/precompile/precompile.pro 0
+*/
+
+/*!
+ \page qmake-tutorial.html
+ \title qmake Tutorial
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Manual
+ \nextpage qmake Common Projects
+
+ This tutorial teaches you how to use \c qmake. We recommend that
+ you read the \c qmake user guide after completing this tutorial.
+
+ \section1 Starting off Simple
+
+ Let's assume that you have just finished a basic implementation of
+ your application, and you have created the following files:
+
+ \list
+ \o hello.cpp
+ \o hello.h
+ \o main.cpp
+ \endlist
+
+ You will find these files in the \c{examples/qmake/tutorial} directory
+ of the Qt distribution. The only other thing you know about the setup of
+ the application is that it's written in Qt. First, using your favorite
+ plain text editor, create a file called \c hello.pro in
+ \c{examples/qmake/tutorial}. The first thing you need to do is add the
+ lines that tell \c qmake about the source and header files that are part
+ of your development project.
+
+ We'll add the source files to the project file first. To do this you
+ need to use the \l{qmake Variable Reference#SOURCES}{SOURCES} variable.
+ Just start a new line with \c {SOURCES +=} and put hello.cpp after it.
+ You should have something like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+
+ We repeat this for each source file in the project, until we end up
+ with the following:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+
+ If you prefer to use a Make-like syntax, with all the files listed in
+ one go you can use the newline escaping like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+
+ Now that the source files are listed in the project file, the header
+ files must be added. These are added in exactly the same way as source
+ files, except that the variable name we use is
+ \l{qmake Variable Reference#HEADERS}{HEADERS}.
+
+ Once you have done this, your project file should look something like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+
+ The target name is set automatically; it is the same as the project
+ file, but with the suffix appropriate to the platform. For example, if
+ the project file is called \c hello.pro, the target will be \c hello.exe
+ on Windows and \c hello on Unix. If you want to use a different name
+ you can set it in the project file:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+
+ The final step is to set the \l{qmake Variable Reference#CONFIG}{CONFIG}
+ variable. Since this is a Qt application, we need to put \c qt on the
+ \c CONFIG line so that \c qmake will add the relevant libraries to be
+ linked against and ensure that build lines for \c moc and \c uic are
+ included in the generated Makefile.
+
+ The finished project file should look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+
+ You can now use \c qmake to generate a Makefile for your application.
+ On the command line, in your project's directory, type the following:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+
+ Then type \c make or \c nmake depending on the compiler you use.
+
+ For Visual Studio users, \c qmake can also generate \c .dsp or
+ \c .vcproj files, for example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+
+ \section1 Making an Application Debuggable
+
+ The release version of an application doesn't contain any debugging
+ symbols or other debugging information. During development it is useful
+ to produce a debugging version of the application that has the
+ relevant information. This is easily achieved by adding \c debug to the
+ \c CONFIG variable in the project file.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+
+ Use \c qmake as before to generate a Makefile and you will be able to
+ obtain useful information about your application when running it in
+ a debugging environment.
+
+ \section1 Adding Platform-Specific Source Files
+
+ After a few hours of coding, you might have made a start on the
+ platform-specific part of your application, and decided to keep the
+ platform-dependent code separate. So you now have two new files to
+ include into your project file: \c hellowin.cpp and \c
+ hellounix.cpp. We can't just add these to the \c SOURCES
+ variable since this will put both files in the Makefile. So, what we
+ need to do here is to use a scope which will be processed depending on
+ which platform \c qmake is run on.
+
+ A simple scope that will add in the platform-dependent file for
+ Windows looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+
+ So if \c qmake is run on Windows, it will add \c hellowin.cpp to the
+ list of source files. If \c qmake is run on any other platform, it
+ will simply ignore it. Now all that is left to be done is to create a
+ scope for the Unix-specific file.
+
+ When you have done that, your project file should now look
+ something like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+
+ Use \c qmake as before to generate a Makefile.
+
+ \section1 Stopping qmake If a File Doesn't Exist
+
+ You may not want to create a Makefile if a certain file doesn't exist.
+ We can check if a file exists by using the exists() function. We can
+ stop \c qmake from processing by using the error() function. This
+ works in the same way as scopes do. Simply replace the scope condition
+ with the function. A check for a \c main.cpp file looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+
+ The \c{!} symbol is used to negate the test; i.e. \c{exists( main.cpp )}
+ is true if the file exists, and \c{!exists( main.cpp )} is true if the
+ file doesn't exist.
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+
+ Use \c qmake as before to generate a makefile. If you rename \c
+ main.cpp temporarily, you will see the message and \c qmake will stop
+ processing.
+
+ \section1 Checking for More than One Condition
+
+ Suppose you use Windows and you want to be able to see statement
+ output with qDebug() when you run your application on the command line.
+ Unless you build your application with the appropriate console setting,
+ you won't see the output. We can easily put \c console on the \c CONFIG
+ line so that on Windows the makefile will have this setting. However,
+ let's say that we only want to add the \c CONFIG line if we are running
+ on Windows \e and when \c debug is already on the \c CONFIG line.
+ This requires using two nested scopes; just create one scope, then create
+ the other inside it. Put the settings to be processed inside the last
+ scope, like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+
+ Nested scopes can be joined together using colons, so the final
+ project file looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+
+ That's it! You have now completed the tutorial for \c qmake, and are
+ ready to write project files for your development projects.
+*/
+
+/*!
+ \page qmake-common-projects.html
+ \title qmake Common Projects
+ \contentspage {qmake Manual}{Contents}
+ \previouspage qmake Tutorial
+ \nextpage Using qmake
+
+ This chapter describes how to set up \c qmake project files for three
+ common project types that are based on Qt. Although all kinds of
+ projects use many of the same variables, each of them use project-specific
+ variables to customize output files.
+
+ Platform-specific variables are not described here; we refer the reader to
+ the \l{Deploying Qt Applications} document for information on issues such as
+ \l{Deploying an Application on Mac OS X#Architecture Dependencies}{building
+ universal binaries for Mac OS X} and
+ \l{Deploying an Application on Windows#Visual Studio 2005 Onwards}
+ {handling Visual Studio manifest files}.
+
+ \tableofcontents
+
+ \target Application
+ \section1 Building an Application
+
+ \section2 The app Template
+
+ The \c app template tells \c qmake to generate a Makefile that will build
+ an application. With this template, the type of application can be specified
+ by adding one of the following options to the \c CONFIG variable definition:
+
+ \table
+ \header \o Option \o Description
+ \row \o windows \o The application is a Windows GUI application.
+ \row \o console \o \c app template only: the application is a Windows console
+ application.
+ \endtable
+
+ When using this template the following \c qmake system variables are recognized.
+ You should use these in your .pro file to specify information about your
+ application.
+
+ \list
+ \o HEADERS - A list of all the header files for the application.
+ \o SOURCES - A list of all the source files for the application.
+ \o FORMS - A list of all the .ui files (created using \c{Qt Designer})
+ for the application.
+ \o LEXSOURCES - A list of all the lex source files for the application.
+ \o YACCSOURCES - A list of all the yacc source files for the application.
+ \o TARGET - Name of the executable for the application. This defaults
+ to the name of the project file. (The extension, if any, is added
+ automatically).
+ \o DESTDIR - The directory in which the target executable is placed.
+ \o DEFINES - A list of any additional pre-processor defines needed for the application.
+ \o INCLUDEPATH - A list of any additional include paths needed for the application.
+ \o DEPENDPATH - The dependency search path for the application.
+ \o VPATH - The search path to find supplied files.
+ \o DEF_FILE - Windows only: A .def file to be linked against for the application.
+ \o RC_FILE - Windows only: A resource file for the application.
+ \o RES_FILE - Windows only: A resource file to be linked against for the application.
+ \endlist
+
+ You only need to use the system variables that you have values for,
+ for instance, if you don't have any extra INCLUDEPATHs then you don't
+ need to specify any, \c qmake will add in the default ones needed.
+ For instance, an example project file might look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 123
+
+ For items that are single valued, e.g. the template or the destination
+ directory, we use "="; but for multi-valued items we use "+=" to \e
+ add to the existing items of that type. Using "=" replaces the item's
+ value with the new value, for example if we wrote \c{DEFINES=QT_DLL},
+ all other definitions would be deleted.
+
+ \target Library
+ \section1 Building a Library
+
+ \section2 The lib Template
+
+ The \c lib template tells \c qmake to generate a Makefile that will
+ build a library. When using this template, in addition to the system variables
+ mentioned above for the \c app template the \c VERSION variable is
+ supported. You should use these in your .pro file to specify
+ information about the library.
+
+ When using the \c lib template, the following options can be added to the
+ \c CONFIG variable to determine the type of library that is built:
+
+ \table
+ \header \o Option \o Description
+ \row \o dll \o The library is a shared library (dll).
+ \row \o staticlib \o The library is a static library.
+ \row \o plugin \o The library is a plugin; this also enables the dll option.
+ \endtable
+
+ The following option can also be defined to provide additional information about
+ the library.
+
+ \list
+ \o VERSION - The version number of the target library, for example, 2.3.1.
+ \endlist
+
+ The target file name for the library is platform-dependent. For example, on
+ X11 and Mac OS X, the library name will be prefixed by \c lib; on Windows,
+ no prefix is added to the file name.
+
+ \target Plugin
+ \section1 Building a Plugin
+
+ Plugins are built using the \c lib template, as described in the previous
+ section. This tells \c qmake to generate a Makefile for the project that will
+ build a plugin in a suitable form for each platform, usually in the form of a
+ library. As with ordinary libraries, the \c VERSION variable is used to specify
+ information about the plugin.
+
+ \list
+ \o VERSION - The version number of the target library, for example, 2.3.1.
+ \endlist
+
+ \section2 Building a Qt Designer Plugin
+
+ \QD plugins are built using a specific set of configuration settings that
+ depend on the way Qt was configured for your system. For convenience, these
+ settings can be enabled by adding \c designer to the project's \c CONFIG
+ variable. For example:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro 0
+
+ See the \l{Qt Examples#Qt Designer}{Qt Designer examples} for more
+ examples of plugin-based projects.
+
+ \section1 Building and Installing in Debug and Release Modes
+
+ Sometimes, it is necessary to build a project in both debug and release
+ modes. Although the \c CONFIG variable can hold both \c debug and \c release
+ options, the \c debug option overrides the \c release option.
+
+ \section2 Building in Both Modes
+
+ To enable a project to be built in both modes, you must add the
+ \c debug_and_release option to your project's \c CONFIG definition:
+
+ \snippet doc/src/snippets/qmake/debug_and_release.pro 0
+ \snippet doc/src/snippets/qmake/debug_and_release.pro 1
+
+ The scope in the above snippet modifies the build target in each mode to
+ ensure that the resulting targets have different names. Providing different
+ names for targets ensures that one will not overwrite the other.
+
+ When \c qmake processes the project file, it will generate a Makefile rule
+ to allow the project to be built in both modes. This can be invoked in the
+ following way:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 124
+
+ The \c build_all option can be added to the \c CONFIG variable in the
+ project file to ensure that the project is built in both modes by default:
+
+ \snippet doc/src/snippets/qmake/debug_and_release.pro 2
+
+ This allows the Makefile to be processed using the default rule:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 125
+
+ \section2 Installing in Both Modes
+
+ The \c build_all option also ensures that both versions of the target
+ will be installed when the installation rule is invoked:
+
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 126
+
+ It is possible to customize the names of the build targets depending on
+ the target platform. For example, a library or plugin may be named using a
+ different convention on Windows to the one used on Unix platforms:
+
+ \omit
+ Note: This was originally used in the customwidgetplugin.pro file, but is
+ no longer needed there.
+ \endomit
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 127
+
+ The default behavior in the above snippet is to modify the name used for
+ the build target when building in debug mode. An \c else clause could be
+ added to the scope to do the same for release mode; left as it is, the
+ target name remains unmodified.
+*/
+
diff --git a/doc/src/qmsdev.qdoc b/doc/src/qmsdev.qdoc
new file mode 100644
index 0000000..8cbd1d3
--- /dev/null
+++ b/doc/src/qmsdev.qdoc
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Documentation of Visual Studio Integration Plugin.
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/* NOT DOCUMENTED !
+ \page qmsdev.html
+
+ \title The QMsDev Plugin
+
+ The Visual Studio Integration Plugin is currently available only to users of
+ Visual Studio 6. It offers simple ways of doing common tasks when writing a
+ Qt application.
+
+ \tableofcontents
+
+ \section1 How to install the Visual Studio Integration Plugin
+
+ When you install Qt, the integration plugin should be installed for you,
+ however, sometimes this does not happen, so to install the integration
+ plugin manually just carry out the following steps.
+
+ \list
+ \i Start up Visual Studio.
+ \i Select Tools|Customize|Add-ins and Macro Files.
+ \i Ensure that there is a tick next to QMsDev Developer Studio Add-In.
+ \i Click Close.
+ \endlist
+
+ Now the integration plugin should be installed. If this doesn't
+ work, then contact Trolltech technical support giving details of
+ what went wrong.
+
+ \section1 How to uninstall the Visual Studio Integration Plugin
+
+ When you want to uninstall the integration plugin, just carry out the
+ following steps.
+
+ \list
+ \i Close down any instances of Visual Studio.
+ \i Delete the file '%MSDevDir%\\addins\\qmsdev.dll'
+ \endlist
+
+ \section1 What can the Visual Studio Integration Plugin do?
+
+ The integration plugin adds the following options to Visual Studio:
+
+ \list
+ \i New Qt Project
+ \i New Qt Dialog
+ \i Qt Designer
+ \i Open Qt Project
+ \i Write Qt Project
+ \i Use Qt In Current Project
+ \i Add MOC
+ \endlist
+
+ \section2 Using the 'New Qt Project' button
+
+ The 'New Qt Project' button allows you to create a simple Qt project
+ ready for development. Simply fill in the form and if you select
+ 'Dialog' or 'Main Window' without MDI support then it will
+ automatically start up \e{Qt Designer}. When you have finished with
+ the form in \e{Qt Designer} just save it and it will appear in a
+ ready made Qt project.
+
+ If you select 'Main Window' with 'MDI Support' then it will simply
+ give you a code skeleton in a project ready for you to populate with
+ your own code.
+
+ \section2 Using the 'New Qt Dialog' button
+
+ The 'New Qt Dialog' button works in two ways: You can use it to create a new
+ dialog for your project; or you can use it to insert an existing
+ dialog into your project.
+
+ If you want to create a new dialog then all you need to do is specify where
+ the dialog file should be saved and give it a name. This will start up
+ \e{Qt Designer} to allow you to design your new dialog, and will add it to
+ the existing project.
+
+ If you want to add an existing dialog to your project, then just select the
+ relevant \c .ui file. This will then add it to your existing project and add
+ the relevant steps to create the generated code.
+
+ \section2 Using the 'Qt Designer' button
+
+ The 'Qt Designer' button simply starts up \e{Qt Designer}, it has no ties to
+ your existing project so whatever you do with it will not affect your
+ existing projects. It can also be started up by using the Ctrl+Shift+D key
+ combination in Visual Studio.
+
+ \section2 Using the 'Open Qt Project' button
+
+ The 'Open Qt Project' button allows you to convert an existing \c
+ qmake project file into a \c .dsp file which you can insert into
+ your existing workspace. When you click the 'Open Qt Project'
+ button, just select an existing \c qmake project file (a \c .pro
+ file) and then click OK. You will get a message box at the end
+ which asks you to insert the newly created \c .dsp file into your
+ existing workspace.
+
+ \section2 Using the 'Write Qt Project' button
+
+ The 'Write Qt Project' button creates a \c qmake project (\c .pro)
+ file for your current project so that you can easily copy the files
+ onto another platform and be able to use \c qmake to create a Makefile
+ on that other platform. All you need to do is make the project you
+ want to create a \c .pro file for, and click on the button. Just
+ name your \c qmake project file and click Save.
+
+ \section2 Using the 'Use Qt In Current Project' button
+
+ The 'Use Qt In Current Project' button simply adds in the necessary
+ information for the current project so that it links against Qt and
+ sets any other settings needed to use Qt in that project.
+
+ \section2 Using the 'Add MOC' button
+
+ The 'Add MOC' button will add in the custom build step for the selected file
+ so that it creates any needed MOC files and it will add these generated
+ files to the project. All you need to do to use it is click on a file that
+ has Q_OBJECT and click the button.
+
+ You only need to use this button if you added a file that has
+ Q_OBJECT in it by hand, you don't need to use this if you used any
+ of the previously mentioned buttons. It can also be invoked by using
+ the \key{Ctrl+Shift+M} key combination in Visual Studio.
+
+*/
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
new file mode 100644
index 0000000..6220795
--- /dev/null
+++ b/doc/src/qnamespace.qdoc
@@ -0,0 +1,2660 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \namespace Qt
+
+ \brief The Qt namespace contains miscellaneous identifiers
+ used throughout the Qt library.
+
+ \ingroup misc
+*/
+
+/*!
+ \enum Qt::Orientation
+
+ This type is used to signify an object's orientation.
+
+ \value Horizontal
+ \value Vertical
+
+ Orientation is used with QScrollBar for example.
+*/
+
+/*!
+ \enum Qt::AlignmentFlag
+
+ This enum type is used to describe alignment. It contains
+ horizontal and vertical flags that can be combined to produce
+ the required effect.
+
+ The \l{TextElideMode} enum can also be used in many situations
+ to fine-tune the appearance of aligned text.
+
+ The horizontal flags are:
+
+ \value AlignLeft Aligns with the left edge.
+ \value AlignRight Aligns with the right edge.
+ \value AlignHCenter Centers horizontally in the available space.
+ \value AlignJustify Justifies the text in the available space.
+ \omitvalue AlignAuto
+
+ The vertical flags are:
+
+ \value AlignTop Aligns with the top.
+ \value AlignBottom Aligns with the bottom.
+ \value AlignVCenter Centers vertically in the available space.
+
+ You can use only one of the horizontal flags at a time. There is
+ one two-dimensional flag:
+
+ \value AlignCenter Centers in both dimensions.
+
+ You can use at most one horizontal and one vertical flag at a
+ time. Qt::AlignCenter counts as both horizontal and vertical.
+
+ Three enum values are useful in applications that can be run in
+ right-to-left mode:
+
+ \value AlignAbsolute If the widget's layout direction is
+ Qt::RightToLeft (instead of Qt::LeftToRight, the default),
+ Qt::AlignLeft refers to the \e right edge and Qt::AlignRight
+ to the \e left edge. This is normally the desired behavior.
+ If you want Qt::AlignLeft to always mean "left" and
+ Qt::AlignRight to always mean "right", combine the flag with
+ Qt::AlignAbsolute.
+ \value AlignLeading Synonym for Qt::AlignLeft.
+ \value AlignTrailing Synonym for Qt::AlignRight.
+
+ Masks:
+
+ \value AlignHorizontal_Mask
+ \value AlignVertical_Mask
+
+ Conflicting combinations of flags have undefined meanings.
+*/
+
+/*!
+ \enum Qt::ApplicationAttribute
+
+ This enum describes attributes that change the behavior of
+ application-wide features. These are enabled and disabled using
+ QCoreApplication::setAttribute(), and can be tested for with
+ QCoreApplication::testAttribute().
+
+ \value AA_ImmediateWidgetCreation Ensures that widgets are created
+ as soon as they are constructed. By default, resources for
+ widgets are allocated on demand to improve efficiency and
+ minimize resource usage. Setting or clearing this attribute
+ affects widgets constructed after the change. Setting it
+ tells Qt to create toplevel windows immediately.
+ Therefore, if it is important to minimize resource
+ consumption, do not set this attribute.
+
+ \value AA_MSWindowsUseDirect3DByDefault Is a Windows specific
+ attribute, that will make the Direct3D paint engine the
+ default Qt widget paint engine. Note that you can toggle
+ usage of the Direct3D engine on individual QWidgets by
+ setting/clearing the \c WA_MSWindowsUseDirect3D attribute
+ on a specific widget. \bold {This functionality is
+ experimental}.
+
+ \value AA_DontShowIconsInMenus Actions with the Icon property won't be
+ shown in any menus unless specifically set by the
+ QAction::iconVisibleInMenu property.
+
+ Menus that are currently open or menus already created in the native
+ Mac OS X menubar MAY NOT pick up a change in this attribute. Changes
+ in the QAction::iconVisibleInMenu property will always be picked up.
+
+ \value AA_NativeWindows Ensures that widgets have native windows.
+
+ \value AA_DontCreateNativeWidgetSiblings Ensures that siblings of native
+ widgets stay non-native unless specifically set by the
+ Qt::WA_NativeWindow attribute.
+
+ \value AA_MacPluginApplication Stops the a Qt mac application from doing
+ specific initializations that do not necessarily make sense when using Qt
+ to author a plugin. This includes avoiding loading our nib for the main
+ menu and not taking possession of the native menu bar.
+
+ \omitvalue AA_AttributeCount
+*/
+
+/*!
+ \enum Qt::MouseButton
+
+ This enum type describes the different mouse buttons.
+
+ \value NoButton The button state does not refer to any
+ button (see QMouseEvent::button()).
+ \value LeftButton The left button is pressed, or an event refers
+ to the left button. (The left button may be the right button on
+ left-handed mice.)
+ \value RightButton The right button.
+ \value MidButton The middle button.
+ \value XButton1 The first X button.
+ \value XButton2 The second X button.
+
+ \omitvalue MouseButtonMask
+
+ \sa KeyboardModifier Modifier
+*/
+
+/*!
+ \enum Qt::KeyboardModifier
+
+ This enum describes the modifier keys.
+
+ \value NoModifier No modifier key is pressed.
+ \value ShiftModifier A Shift key on the keyboard is pressed.
+ \value ControlModifier A Ctrl key on the keyboard is pressed.
+ \value AltModifier An Alt key on the keyboard is pressed.
+ \value MetaModifier A Meta key on the keyboard is pressed.
+ \value KeypadModifier A keypad button is pressed.
+ \value GroupSwitchModifier X11 only. A Mode_switch key on the keyboard is pressed.
+
+ \omitvalue KeyboardModifierMask
+
+ \note On Mac OS X, the \c ControlModifier value corresponds to
+ the Command keys on the Macintosh keyboard, and the \c MetaModifier value
+ corresponds to the Control keys. The \c KeypadModifier value will also be set
+ when an arrow key is pressed as the arrow keys are considered part of the
+ keypad.
+
+ \note On Windows Keyboards, Qt::MetaModifier and Qt::Key_Meta are mapped
+ to the Windows key.
+
+ \sa MouseButton Modifier
+*/
+
+/*!
+ \enum Qt::Modifier
+
+ This enum provides shorter names for the keyboard modifier keys
+ supported by Qt.
+
+ \bold{Note:} On Mac OS X, the \c CTRL value corresponds to
+ the Command keys on the Macintosh keyboard, and the \c META value
+ corresponds to the Control keys.
+
+ \value SHIFT The Shift keys provided on all standard keyboards.
+ \value META The Meta keys.
+ \value CTRL The Ctrl keys.
+ \value ALT The normal Alt keys, but not keys like AltGr.
+ \value UNICODE_ACCEL The shortcut is specified as a Unicode code
+ point, not as a Qt Key.
+ \omitvalue MODIFIER_MASK
+
+ \sa KeyboardModifier MouseButton
+*/
+
+/*!
+ \enum Qt::GlobalColor
+
+ \raw HTML
+ <style type="text/css" id="colorstyles">
+ #white { background-color: #ffffff; color: #000000 }
+ #black { background-color: #000000; color: #ffffff }
+ #red { background-color: #ff0000; color: #000000 }
+ #darkRed { background-color: #800000; color: #ffffff }
+ #green { background-color: #00ff00; color: #000000 }
+ #darkGreen { background-color: #008000; color: #ffffff }
+ #blue { background-color: #0000ff; color: #ffffff }
+ #darkBlue { background-color: #000080; color: #ffffff }
+ #cyan { background-color: #00ffff; color: #000000 }
+ #darkCyan { background-color: #008080; color: #ffffff }
+ #magenta { background-color: #ff00ff; color: #000000 }
+ #darkMagenta { background-color: #800080; color: #ffffff }
+ #yellow { background-color: #ffff00; color: #000000 }
+ #darkYellow { background-color: #808000; color: #ffffff }
+ #gray { background-color: #a0a0a4; color: #000000 }
+ #darkGray { background-color: #808080; color: #ffffff }
+ #lightGray { background-color: #c0c0c0; color: #000000 }
+ </style>
+ \endraw
+
+ Qt's predefined QColor objects:
+
+ \value white \raw HTML
+ White <tt id="white">(#ffffff)</tt>
+ \endraw
+ \value black \raw HTML
+ Black <tt id="black">(#000000)</tt>
+ \endraw
+ \value red \raw HTML
+ Red <tt id="red">(#ff0000)</tt>
+ \endraw
+ \value darkRed \raw HTML
+ Dark red <tt id="darkRed">(#800000)</tt>
+ \endraw
+ \value green \raw HTML
+ Green <tt id="green">(#00ff00)</tt>
+ \endraw
+ \value darkGreen \raw HTML
+ Dark green <tt id="darkGreen">(#008000)</tt>
+ \endraw
+ \value blue \raw HTML
+ Blue <tt id="blue">(#0000ff)</tt>
+ \endraw
+ \value darkBlue \raw HTML
+ Dark blue <tt id="darkBlue">(#000080)</tt>
+ \endraw
+ \value cyan \raw HTML
+ Cyan <tt id="cyan">(#00ffff)</tt>
+ \endraw
+ \value darkCyan \raw HTML
+ Dark cyan <tt id="darkCyan">(#008080)</tt>
+ \endraw
+ \value magenta \raw HTML
+ Magenta <tt id="magenta">(#ff00ff)</tt>
+ \endraw
+ \value darkMagenta \raw HTML
+ Dark magenta <tt id="darkMagenta">(#800080)</tt>
+ \endraw
+ \value yellow \raw HTML
+ Yellow <tt id="yellow">(#ffff00)</tt>
+ \endraw
+ \value darkYellow \raw HTML
+ Dark yellow <tt id="darkYellow">(#808000)</tt>
+ \endraw
+ \value gray \raw HTML
+ Gray <tt id="gray">(#a0a0a4)</tt>
+ \endraw
+ \value darkGray \raw HTML
+ Dark gray <tt id="darkGray">(#808080)</tt>
+ \endraw
+ \value lightGray \raw HTML
+ Light gray <tt id="lightGray">(#c0c0c0)</tt>
+ \endraw
+ \value transparent a transparent black value (i.e., QColor(0, 0, 0, 0))
+ \value color0 0 pixel value (for bitmaps)
+ \value color1 1 pixel value (for bitmaps)
+
+ \sa QColor
+
+*/
+
+/*!
+ \enum Qt::PenStyle
+
+ This enum type defines the pen styles that can be drawn using
+ QPainter. The styles are:
+
+ \table
+ \row
+ \o \inlineimage qpen-solid.png
+ \o \inlineimage qpen-dash.png
+ \o \inlineimage qpen-dot.png
+ \row
+ \o Qt::SolidLine
+ \o Qt::DashLine
+ \o Qt::DotLine
+ \row
+ \o \inlineimage qpen-dashdot.png
+ \o \inlineimage qpen-dashdotdot.png
+ \o \inlineimage qpen-custom.png
+ \row
+ \o Qt::DashDotLine
+ \o Qt::DashDotDotLine
+ \o Qt::CustomDashLine
+ \endtable
+
+ \value NoPen no line at all. For example, QPainter::drawRect()
+ fills but does not draw any boundary line.
+
+ \value SolidLine A plain line.
+ \value DashLine Dashes separated by a few pixels.
+ \value DotLine Dots separated by a few pixels.
+ \value DashDotLine Alternate dots and dashes.
+ \value DashDotDotLine One dash, two dots, one dash, two dots.
+ \value CustomDashLine A custom pattern defined using
+ QPainterPathStroker::setDashPattern().
+
+ \omitvalue MPenStyle
+
+ \sa QPen
+*/
+
+/*!
+ \enum Qt::PenCapStyle
+
+ This enum type defines the pen cap styles supported by Qt, i.e.
+ the line end caps that can be drawn using QPainter.
+
+ \table
+ \row
+ \o \inlineimage qpen-square.png
+ \o \inlineimage qpen-flat.png
+ \o \inlineimage qpen-roundcap.png
+ \row
+ \o Qt::SquareCap
+ \o Qt::FlatCap
+ \o Qt::RoundCap
+ \endtable
+
+ \value FlatCap a square line end that does not cover the end
+ point of the line.
+ \value SquareCap a square line end that covers the end point and
+ extends beyond it by half the line width.
+ \value RoundCap a rounded line end.
+ \omitvalue MPenCapStyle
+
+ \sa QPen
+*/
+
+/*!
+ \enum Qt::PenJoinStyle
+
+ This enum type defines the pen join styles supported by Qt, i.e.
+ which joins between two connected lines can be drawn using
+ QPainter.
+
+ \table
+ \row
+ \o \inlineimage qpen-bevel.png
+ \o \inlineimage qpen-miter.png
+ \o \inlineimage qpen-roundjoin.png
+ \row
+ \o Qt::BevelJoin
+ \o Qt::MiterJoin
+ \o Qt::RoundJoin
+ \endtable
+
+ \value MiterJoin The outer edges of the lines are extended to
+ meet at an angle, and this area is filled.
+ \value BevelJoin The triangular notch between the two lines is filled.
+ \value RoundJoin A circular arc between the two lines is filled.
+ \value SvgMiterJoin A miter join corresponding to the definition of
+ a miter join in the \l{SVG 1.2 Tiny} specification.
+ \omitvalue MPenJoinStyle
+
+ \sa QPen
+*/
+
+/*!
+ \enum Qt::BrushStyle
+
+ This enum type defines the brush styles supported by Qt, i.e. the
+ fill pattern of shapes drawn using QPainter.
+
+ \image brush-styles.png Brush Styles
+
+ \value NoBrush No brush pattern.
+ \value SolidPattern Uniform color.
+ \value Dense1Pattern Extremely dense brush pattern.
+ \value Dense2Pattern Very dense brush pattern.
+ \value Dense3Pattern Somewhat dense brush pattern.
+ \value Dense4Pattern Half dense brush pattern.
+ \value Dense5Pattern Somewhat sparse brush pattern.
+ \value Dense6Pattern Very sparse brush pattern.
+ \value Dense7Pattern Extremely sparse brush pattern.
+ \value HorPattern Horizontal lines.
+ \value VerPattern Vertical lines.
+ \value CrossPattern Crossing horizontal and vertical lines.
+ \value BDiagPattern Backward diagonal lines.
+ \value FDiagPattern Forward diagonal lines.
+ \value DiagCrossPattern Crossing diagonal lines.
+ \value LinearGradientPattern Linear gradient (set using a dedicated QBrush constructor).
+ \value ConicalGradientPattern Conical gradient (set using a dedicated QBrush constructor).
+ \value RadialGradientPattern Radial gradient (set using a dedicated QBrush constructor).
+ \value TexturePattern Custom pattern (see QBrush::setTexture()).
+
+ \omitvalue CustomPattern
+
+ \sa QBrush
+*/
+
+/*!
+ \enum Qt::TextFlag
+
+ This enum type is used to define some modifier flags. Some of
+ these flags only make sense in the context of printing:
+
+ \value TextSingleLine Treats all whitespace as spaces and prints just
+ one line.
+ \value TextDontClip If it's impossible to stay within the given bounds,
+ it prints outside.
+ \value TextExpandTabs Makes the U+0009 (ASCII tab) character move to
+ the next tab stop.
+ \value TextShowMnemonic Displays the string "\&P" as \underline{P}
+ (see QButton for an example). For an ampersand, use "\&\&".
+ \value TextWordWrap Breaks lines at appropriate points, e.g. at word
+ boundaries.
+ \value TextWrapAnywhere Breaks lines anywhere, even within words.
+ \value TextHideMnemonic Same as Qt::TextShowMnemonic but doesn't draw the underlines.
+ \value TextDontPrint Treat this text as "hidden" and don't print
+ it.
+ \value IncludeTrailingSpaces When this option is set, QTextLine::naturalTextWidth() and naturalTextRect() will
+ return a value that includes the width of trailing spaces in the text; otherwise
+ this width is excluded.
+ \value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces
+ \value TextJustificationForced Ensures that text lines are justified.
+
+ \omitvalue BreakAnywhere
+ \omitvalue DontClip
+ \omitvalue DontPrint
+ \omitvalue ExpandTabs
+ \omitvalue IncludeTrailingSpaces
+ \omitvalue NoAccel
+ \omitvalue ShowPrefix
+ \omitvalue SingleLine
+ \omitvalue WordBreak
+ \omitvalue TextForceLeftToRight
+ \omitvalue TextForceRightToLeft
+
+ You can use as many modifier flags as you want, except that
+ Qt::TextSingleLine and Qt::TextWordWrap cannot be combined.
+
+ Flags that are inappropriate for a given use are generally
+ ignored.
+*/
+
+/*!
+ \enum Qt::BGMode
+
+ Background mode:
+
+ \value TransparentMode
+ \value OpaqueMode
+*/
+
+/*!
+ \enum Qt::ConnectionType
+
+ This enum describes the types of connection that can be used between signals and
+ slots. In particular, it determines whether a particular signal is delivered to a
+ slot immediately or queued for delivery at a later time.
+
+ \omitvalue AutoCompatConnection
+ \value DirectConnection When emitted, the signal is immediately delivered to the slot.
+ \value QueuedConnection When emitted, the signal is queued until the event loop is
+ able to deliver it to the slot.
+ \value
+ BlockingQueuedConnection Same as QueuedConnection, except that the current thread blocks
+ until the slot has been delivered. This connection type should
+ only be used for receivers in a different thread. Note that misuse
+ of this type can lead to dead locks in your application.
+ \value AutoConnection If the signal is emitted from the thread
+ in which the receiving object lives, the
+ slot is invoked directly, as with
+ Qt::DirectConnection; otherwise the
+ signal is queued, as with
+ Qt::QueuedConnection.
+
+ With queued connections, the parameters must be of types that are known to
+ Qt's meta-object system, because Qt needs to copy the arguments to store them
+ in an event behind the scenes. If you try to use a queued connection and
+ get the error message
+
+ \snippet doc/src/snippets/code/doc_src_qnamespace.qdoc 0
+
+ call qRegisterMetaType() to register the data type before you
+ establish the connection.
+
+ \sa {Thread Support in Qt}, QObject::connect(), qRegisterMetaType()
+*/
+
+/*!
+ \enum Qt::DateFormat
+
+ \value TextDate The default Qt format, which includes the day and month name,
+ the day number in the month, and the year in full. The day and month names will
+ be short, localized names. This is basically equivalent to using the date format
+ string, "ddd MMM d yyyy". See QDate::toString() for more information.
+
+ \value ISODate ISO 8601 extended format: either \c{YYYY-MM-DD} for dates or
+ \c{YYYY-MM-DDTHH:MM:SS} for combined dates and times.
+
+ \value SystemLocaleShortDate The \l{QLocale::ShortFormat}{short format} used
+ by the \l{QLocale::system()}{operating system}.
+
+ \value SystemLocaleLongDate The \l{QLocale::LongFormat}{long format} used
+ by the \l{QLocale::system()}{operating system}.
+
+ \value DefaultLocaleShortDate The \l{QLocale::ShortFormat}{short format} specified
+ by the \l{QLocale::setDefault()}{application's locale}.
+
+ \value DefaultLocaleLongDate The \l{QLocale::LongFormat}{long format} used
+ by the \l{QLocale::setDefault()}{application's locale}.
+
+ \value SystemLocaleDate \e{This enum value is deprecated.} Use Qt::SystemLocaleShortDate
+ instead (or Qt::SystemLocaleLongDate if you want long dates).
+
+ \value LocaleDate \e{This enum value is deprecated.} Use Qt::DefaultLocaleShortDate
+ instead (or Qt::DefaultLocaleLongDate if you want long dates).
+
+ \value LocalDate \e{This enum value is deprecated.} Use Qt::SystemLocaleShortDate
+ instead (or Qt::SystemLocaleLongDate if you want long dates).
+
+ \note For \c ISODate formats, each \c Y, \c M and \c D represents a single digit
+ of the year, month and day used to specify the date. Each \c H, \c M and \c S
+ represents a single digit of the hour, minute and second used to specify the time.
+ The presence of a literal \c T character is used to separate the date and time when
+ both are specified.
+*/
+
+
+/*!
+ \enum Qt::TimeSpec
+
+ \value LocalTime Locale dependent time (Timezones and Daylight Savings Time).
+ \value UTC Coordinated Universal Time, replaces Greenwich Mean Time.
+ \value OffsetFromUTC An offset in seconds from Coordinated Universal Time.
+*/
+
+/*!
+ \enum Qt::DayOfWeek
+
+ \value Monday
+ \value Tuesday
+ \value Wednesday
+ \value Thursday
+ \value Friday
+ \value Saturday
+ \value Sunday
+*/
+
+/*!
+ \enum Qt::CaseSensitivity
+
+ \value CaseInsensitive
+ \value CaseSensitive
+*/
+
+/*!
+ \enum Qt::ToolBarArea
+
+ \value LeftToolBarArea
+ \value RightToolBarArea
+ \value TopToolBarArea
+ \value BottomToolBarArea
+ \value AllToolBarAreas
+ \value NoToolBarArea
+
+ \omitvalue ToolBarArea_Mask
+*/
+
+/*!
+ \enum Qt::DockWidgetArea
+
+ \value LeftDockWidgetArea
+ \value RightDockWidgetArea
+ \value TopDockWidgetArea
+ \value BottomDockWidgetArea
+ \value AllDockWidgetAreas
+ \value NoDockWidgetArea
+
+ \omitvalue DockWidgetArea_Mask
+*/
+
+/*!
+ \enum Qt::BackgroundMode
+
+ \compat
+
+ \value FixedColor
+ \value FixedPixmap
+ \value NoBackground
+ \value PaletteForeground
+ \value PaletteButton
+ \value PaletteLight
+ \value PaletteMidlight
+ \value PaletteDark
+ \value PaletteMid
+ \value PaletteText
+ \value PaletteBrightText
+ \value PaletteBase
+ \value PaletteBackground
+ \value PaletteShadow
+ \value PaletteHighlight
+ \value PaletteHighlightedText
+ \value PaletteButtonText
+ \value PaletteLink
+ \value PaletteLinkVisited
+ \value X11ParentRelative
+*/
+
+/*!
+ \enum Qt::ImageConversionFlag
+
+ The options marked "(default)" are set if no other values from
+ the list are included (since the defaults are zero):
+
+ Color/Mono preference (ignored for QBitmap):
+
+ \value AutoColor (default) - If the image has \link
+ QImage::depth() depth\endlink 1 and contains only
+ black and white pixels, the pixmap becomes monochrome.
+ \value ColorOnly The pixmap is dithered/converted to the
+ \link QPixmap::defaultDepth() native display depth\endlink.
+ \value MonoOnly The pixmap becomes monochrome. If necessary,
+ it is dithered using the chosen dithering algorithm.
+
+ Dithering mode preference for RGB channels:
+
+ \value DiffuseDither (default) - A high-quality dither.
+ \value OrderedDither A faster, more ordered dither.
+ \value ThresholdDither No dithering; closest color is used.
+
+ Dithering mode preference for alpha channel:
+
+ \value ThresholdAlphaDither (default) - No dithering.
+ \value OrderedAlphaDither A faster, more ordered dither.
+ \value DiffuseAlphaDither A high-quality dither.
+ \omitvalue NoAlpha
+
+ Color matching versus dithering preference:
+
+ \value PreferDither (default when converting to a pixmap) - Always dither
+ 32-bit images when the image is converted to 8 bits.
+ \value AvoidDither (default when converting for the purpose of saving to
+ file) - Dither 32-bit images only if the image has more than 256
+ colors and it is being converted to 8 bits.
+ \omitvalue AutoDither
+
+ \omitvalue ColorMode_Mask
+ \omitvalue Dither_Mask
+ \omitvalue AlphaDither_Mask
+ \omitvalue DitherMode_Mask
+ \omitvalue NoOpaqueDetection
+*/
+
+/*! \enum Qt::GUIStyle
+
+ \compat
+
+ \value WindowsStyle
+ \value MotifStyle
+ \value MacStyle
+ \value Win3Style
+ \value PMStyle
+*/
+
+/*!
+ \enum Qt::UIEffect
+
+ This enum describes the available UI effects.
+
+ By default, Qt will try to use the platform specific desktop
+ settings for each effect. Use the
+ QApplication::setDesktopSettingsAware() function (passing \c false
+ as argument) to prevent this, and the
+ QApplication::setEffectEnabled() to enable or disable a particular
+ effect.
+
+ Note that all effects are disabled on screens running at less than
+ 16-bit color depth.
+
+ \omitvalue UI_General
+
+ \value UI_AnimateMenu Show animated menus.
+ \value UI_FadeMenu Show faded menus.
+ \value UI_AnimateCombo Show animated comboboxes.
+ \value UI_AnimateTooltip Show tooltip animations.
+ \value UI_FadeTooltip Show tooltip fading effects.
+ \value UI_AnimateToolBox Reserved
+
+ \sa QApplication::setEffectEnabled(), QApplication::setDesktopSettingsAware()
+*/
+
+/*! \enum Qt::AspectRatioMode
+
+ This enum type defines what happens to the aspect ratio when
+ scaling an rectangle.
+
+ \image qimage-scaling.png
+
+ \value IgnoreAspectRatio The size is scaled freely. The aspect
+ ratio is not preserved.
+ \value KeepAspectRatio The size is scaled to a rectangle as
+ large as possible inside a given
+ rectangle, preserving the aspect ratio.
+ \value KeepAspectRatioByExpanding The size is scaled to a
+ rectangle as small as possible
+ outside a given rectangle,
+ preserving the aspect ratio.
+
+ \omitvalue ScaleFree
+ \omitvalue ScaleMin
+ \omitvalue ScaleMax
+
+ \sa QSize::scale(), QImage::scaled()
+*/
+
+/*! \typedef Qt::ScaleMode
+ \compat
+
+ Use Qt::AspectRatioMode instead.
+
+ The enum values have been renamed as follows:
+
+ \table
+ \row \i Old enum value \i New enum value
+ \row \i Qt::ScaleFree \i Qt::IgnoreAspectRatio
+ \row \i Qt::ScaleMin \i Qt::KeepAspectRatio
+ \row \i Qt::ScaleMax \i Qt::KeepAspectRatioByExpanding
+ \endtable
+*/
+
+/*! \enum Qt::TransformationMode
+
+ This enum type defines whether image transformations (e.g.,
+ scaling) should be smooth or not.
+
+ \value FastTransformation The transformation is performed
+ quickly, with no smoothing.
+ \value SmoothTransformation The resulting image is transformed
+ using bilinear filtering.
+
+ \sa QImage::scaled()
+*/
+
+/*! \enum Qt::Axis
+
+ This enum type defines three values to represent the three
+ axes in the cartesian coordinate system.
+
+ \value XAxis The X axis.
+ \value YAxis The Y axis.
+ \value ZAxis The Z axis.
+
+ \sa QTransform::rotate(), QTransform::rotateRadians()
+ */
+
+/*!
+ \enum Qt::WidgetAttribute
+
+ \keyword widget attributes
+
+ This enum type is used to specify various widget attributes.
+ Attributes are set and cleared with QWidget::setAttribute(), and
+ queried with QWidget::testAttribute(), although some have special
+ convenience functions which are mentioned below.
+
+ \value WA_AcceptDrops Allows data from drag and drop operations
+ to be dropped onto the widget (see QWidget::setAcceptDrops()).
+
+ \value WA_AlwaysShowToolTips Enables tooltips for inactive windows.
+
+ \value WA_ContentsPropagated This flag is superfluous and
+ obsolete; it no longer has any effect. Since Qt 4.1, all widgets
+ that do not set WA_PaintOnScreen propagate their contents.
+
+ \value WA_CustomWhatsThis Indicates that the widget wants to
+ continue operating normally in "What's This?" mode. This is set by the
+ widget's author.
+
+ \value WA_DeleteOnClose Makes Qt delete this widget when the
+ widget has accepted the close event (see QWidget::closeEvent()).
+
+ \value WA_Disabled Indicates that the widget is disabled, i.e.
+ it does not receive any mouse or keyboard events. There is also a
+ getter functions QWidget::isEnabled(). This is set/cleared by the
+ Qt kernel.
+
+ \omitvalue WA_DropSiteRegistered
+ \omitvalue WA_ForceAcceptDrops
+
+ \value WA_ForceDisabled Indicates that the widget is
+ explicitly disabled, i.e. it will remain disabled even when all
+ its ancestors are set to the enabled state. This implies
+ WA_Disabled. This is set/cleared by QWidget::setEnabled() and
+ QWidget::setDisabled().
+
+ \value WA_ForceUpdatesDisabled Indicates that updates are
+ explicitly disabled for the widget; i.e. it will remain disabled
+ even when all its ancestors are set to the updates-enabled state.
+ This implies WA_UpdatesDisabled. This is set/cleared by
+ QWidget::setUpdatesEnabled().
+
+ \value WA_GroupLeader
+ \e{This attribute has been deprecated.} Use QWidget::windowModality
+ instead.
+
+ \value WA_Hover Forces Qt to generate paint events when the mouse
+ enters or leaves the widget. This feature is typically used when
+ implementing custom styles; see the \l{widgets/styles}{Styles}
+ example for details.
+
+ \value WA_InputMethodEnabled Enables input methods for Asian languages.
+ Must be set when creating custom text editing widgets.
+ On Windows CE this flag can be used in addition to
+ QApplication::autoSipEnabled to automatically display the SIP when
+ entering a widget.
+
+ \value WA_KeyboardFocusChange Set on a toplevel window when
+ the users changes focus with the keyboard (tab, backtab, or shortcut).
+
+ \value WA_KeyCompression Enables key event compression if set,
+ and disables it if not set. By default key compression is off, so
+ widgets receive one key press event for each key press (or more,
+ since autorepeat is usually on). If you turn it on and your
+ program doesn't keep up with key input, Qt may try to compress key
+ events so that more than one character can be processed in each
+ event.
+ For example, a word processor widget might receive 2, 3 or more
+ characters in each QKeyEvent::text(), if the layout recalculation
+ takes too long for the CPU.
+ If a widget supports multiple character unicode input, it is
+ always safe to turn the compression on.
+ Qt performs key event compression only for printable characters.
+ Qt::Modifier keys, cursor movement keys, function keys and
+ miscellaneous action keys (e.g. Escape, Enter, Backspace,
+ PrintScreen) will stop key event compression, even if there are
+ more compressible key events available.
+ Platforms other than Mac and X11 do not support this compression,
+ in which case turning it on will have no effect.
+ This is set/cleared by the widget's author.
+
+ \value WA_LayoutOnEntireRect Indicates that the widget
+ wants QLayout to operate on the entire QWidget::rect(), not only
+ on QWidget::contentsRect(). This is set by the widget's author.
+
+ \value WA_LayoutUsesWidgetRect Ignore the layout item rect from the style
+ when laying out this widget with QLayout. This makes a difference in
+ QMacStyle and QPlastiqueStyle for some widgets.
+
+ \value WA_MacNoClickThrough When a widget that has this attribute set
+ is clicked, and its window is inactive, the click will make the window
+ active but won't be seen by the widget. Typical use of this attribute
+ is on widgets with "destructive" actions, such as a "Delete" button.
+ WA_MacNoClickThrough also applies to all child widgets of the widget
+ that has it set.
+
+ \value WA_MacOpaqueSizeGrip Indicates that the native Carbon size grip
+ should be opaque instead of transparent (the default). This attribute
+ is only applicable to Mac OS X and is set by the widget's author.
+
+ \value WA_MacShowFocusRect Indicates that this widget should get a
+ QFocusFrame around it. Some widgets draw their own focus halo
+ regardless of this attribute. Not that the QWidget::focusPolicy
+ also plays the main role in whether something is given focus or
+ not, this only controls whether or not this gets the focus
+ frame. This attribute is only applicable to Mac OS X.
+
+ \value WA_MacNormalSize Indicates the widget should have the
+ normal size for widgets in Mac OS X. This attribute is only
+ applicable to Mac OS X.
+
+ \value WA_MacSmallSize Indicates the widget should have the small
+ size for widgets in Mac OS X. This attribute is only applicable to
+ Mac OS X.
+
+ \value WA_MacMiniSize Indicates the widget should have the mini
+ size for widgets in Mac OS X. This attribute is only applicable to
+ Mac OS X.
+
+ \value WA_MacVariableSize Indicates the widget can choose between
+ alternative sizes for widgets to avoid clipping.
+ This attribute is only applicable to Mac OS X.
+
+ \value WA_MacBrushedMetal Indicates the widget should be drawn in
+ the brushed metal style as supported by the windowing system. This
+ attribute is only applicable to Mac OS X.
+
+ \omitvalue WA_MacMetalStyle
+
+ \value WA_Mapped Indicates that the widget is mapped on screen.
+ This is set/cleared by the Qt kernel.
+
+ \value WA_MouseNoMask Makes the widget receive mouse events for
+ the entire widget regardless of the currently set mask,
+ overriding QWidget::setMask(). This is not applicable for
+ top-level windows.
+
+ \value WA_MouseTracking Indicates that the widget has mouse
+ tracking enabled. See QWidget::mouseTracking.
+
+ \value WA_Moved Indicates that the widget has an explicit
+ position. This is set/cleared by QWidget::move() and
+ by QWidget::setGeometry().
+
+ \value WA_MSWindowsUseDirect3D Makes drawing to a widget
+ with this attribute set use the Direct3D paint engine, if the
+ Direct3D paint engine is available. \bold {This functionality
+ is experimental.}
+
+ \value WA_NoBackground This value is obsolete. Use
+ WA_OpaquePaintEvent instead.
+
+ \value WA_NoChildEventsForParent Indicates that the widget does
+ not want ChildAdded or ChildRemoved events sent to its
+ parent. This is rarely necessary but can help to avoid automatic
+ insertion widgets like splitters and layouts. This is set by a
+ widget's author.
+
+ \value WA_NoChildEventsFromChildren Indicates that the widget does
+ not want to receive ChildAdded or ChildRemoved events sent from its
+ children. This is set by a widget's author.
+
+ \value WA_NoMouseReplay Used for pop-up widgets. Indicates that the most
+ recent mouse press event should not be replayed when the pop-up widget
+ closes. The flag is set by the widget's author and cleared by the Qt kernel
+ every time the widget receives a new mouse event.
+
+ \value WA_NoMousePropagation Prohibits mouse events from being propagated
+ to the widget's parent. This attribute is disabled by default.
+
+ \value WA_TransparentForMouseEvents When enabled, this attribute disables
+ the delivery of mouse events to the widget and its children. Mouse events
+ are delivered to other widgets as if the widget and its children were not
+ present in the widget hierarchy; mouse clicks and other events effectively
+ "pass through" them. This attribute is disabled by default.
+
+ \value WA_NoSystemBackground Indicates that the widget has no background,
+ i.e. when the widget receives paint events, the background is not
+ automatically repainted. \note Unlike WA_OpaquePaintEvent, newly exposed
+ areas are \bold never filled with the background (e.g., after showing a
+ window for the first time the user can see "through" it until the
+ application processes the paint events). This flag is set or cleared by the
+ widget's author.
+
+ \value WA_OpaquePaintEvent Indicates that the widget paints all its pixels
+ when it receives a paint event. Thus, it is not required for operations
+ like updating, resizing, scrolling and focus changes to erase the widget
+ before generating paint events. The use of WA_OpaquePaintEvent provides a
+ small optimization by helping to reduce flicker on systems that do not
+ support double buffering and avoiding computational cycles necessary to
+ erase the background prior to painting. \note Unlike
+ WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid
+ transparent window backgrounds. This flag is set or cleared by the widget's
+ author.
+
+ \value WA_OutsideWSRange Indicates that the widget is outside
+ the valid range of the window system's coordinate system. A widget
+ outside the valid range cannot be mapped on screen. This is
+ set/cleared by the Qt kernel.
+
+ \value WA_PaintOnScreen Indicates that the widget wants to draw directly
+ onto the screen. Widgets with this attribute set do not participate in
+ composition management, i.e. they cannot be semi-transparent or shine
+ through semi-transparent overlapping widgets. \note This flag is only
+ supported on X11 and it disables double buffering. On Qt for Embedded
+ Linux, the flag only works when set on a top-level widget and it relies on
+ support from the active screen driver. This flag is set or cleared by the
+ widget's author. To render outside of Qt's paint system, e.g., if you
+ require native painting primitives, you need to reimplement
+ QWidget::paintEngine() to return 0 and set this flag.
+
+ \value WA_PaintOutsidePaintEvent Makes it possible to use QPainter to
+ paint on the widget outside \l{QWidget::paintEvent()}{paintEvent()}. This
+ flag is not supported on Windows, Mac OS X or Embedded Linux. We recommend
+ that you use it only when porting Qt 3 code to Qt 4.
+
+ \value WA_PaintUnclipped Makes all painters operating on this widget
+ unclipped. Children of this widget or other widgets in front of it do not
+ clip the area the painter can paint on. This flag is only supported for
+ widgets with the WA_PaintOnScreen flag set. The preferred way to do this in
+ a cross platform way is to create a transparent widget that lies in front
+ of the other widgets.
+
+ \value WA_PendingMoveEvent Indicates that a move event is pending, e.g.,
+ when a hidden widget was moved. This flag is set or cleared by the Qt
+ kernel.
+
+ \value WA_PendingResizeEvent Indicates that a resize event is pending,
+ e.g., when a hidden widget was resized. This flag is set or cleared by the
+ Qt kernel.
+
+ \value WA_QuitOnClose Makes Qt quit the application when the last widget
+ with the attribute set has accepted closeEvent(). This behavior can be
+ modified with the QApplication::quitOnLastWindowClosed property. By default
+ this attribute is set for all widgets of type Qt::Window.
+
+ \value WA_Resized Indicates that the widget has an explicit size. This flag
+ is set or cleared by QWidget::resize() and QWidget::setGeometry().
+
+ \value WA_RightToLeft Indicates that the layout direction for the widget
+ is right to left.
+
+ \value WA_SetCursor Indicates that the widget has a cursor of its own. This
+ flag is set or cleared by QWidget::setCursor() and QWidget::unsetCursor().
+
+ \value WA_SetFont Indicates that the widget has a font of its own. This
+ flag is set or cleared by QWidget::setFont().
+
+ \value WA_SetPalette Indicates that the widget has a palette of its own.
+ This flag is set or cleared by QWidget::setPalette().
+
+ \value WA_SetStyle Indicates that the widget has a style of its own. This
+ flag is set or cleared by QWidget::setStyle().
+
+ \value WA_ShowModal \e{This attribute has been deprecated.} Use
+ QWidget::windowModality instead.
+
+ \value WA_StaticContents Indicates that the widget contents are north-west
+ aligned and static. On resize, such a widget will receive paint events only
+ for parts of itself that are newly visible. This flag is set or cleared by
+ the widget's author.
+
+ \value WA_StyleSheet Indicates that the widget is styled using a
+ \l{Qt Style Sheets}{style sheet}.
+
+ \value WA_TranslucentBackground Indicates that the widget should have a
+ translucent background, i.e., any non-opaque regions of the widgets will be
+ translucent because the widget will have an alpha channel. Setting this
+ flag causes WA_NoSystemBackground to be set. On Windows the
+ widget also needs the Qt::FramelessWindowHint window flag to be set.
+ This flag is set or cleared by the widget's author.
+
+ \value WA_UnderMouse Indicates that the widget is under the mouse cursor.
+ The value is not updated correctly during drag and drop operations. There
+ is also a getter function, QWidget::underMouse(). This flag is set or
+ cleared by the Qt kernel.
+
+ \value WA_UpdatesDisabled Indicates that updates are blocked (including the
+ system background). This flag is set or cleared by the Qt kernel.
+ \warning This flag must \e never be set or cleared by the widget's author.
+
+ \value WA_WindowModified Indicates that the window is marked as modified.
+ On some platforms this flag will do nothing, on others (including Mac OS X
+ and Windows) the window will take a modified appearance. This flag is set
+ or cleared by QWidget::setWindowModified().
+
+ \value WA_WindowPropagation Makes a toplevel window inherit font and
+ palette from its parent.
+
+ \value WA_MacAlwaysShowToolWindow On Mac OS X, show the tool window even
+ when the application is not active. By default, all tool windows are
+ hidden when the application is inactive.
+
+ \value WA_SetLocale Indicates the locale should be taken into consideration
+ in the widget.
+
+ \value WA_StyledBackground Indicates the widget should be drawn using a
+ styled background.
+
+ \value WA_ShowWithoutActivating Show the widget without making it active.
+
+ \value WA_NativeWindow Indicates that a native window is created for the
+ widget. Enabling this flag will also force a native window for the widget's
+ ancestors unless Qt::WA_DontCreateNativeAncestors is set.
+
+ \value WA_DontCreateNativeAncestors Indicates that the widget's ancestors
+ are kept non-native even though the widget itself is native.
+
+ \value WA_X11NetWmWindowTypeDesktop Adds _NET_WM_WINDOW_TYPE_DESKTOP to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms.
+
+ \value WA_X11NetWmWindowTypeDock Adds _NET_WM_WINDOW_TYPE_DOCK to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms.
+
+ \value WA_X11NetWmWindowTypeToolBar Adds _NET_WM_WINDOW_TYPE_TOOLBAR to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automaticaly sets this
+ attribute for QToolBar.
+
+ \value WA_X11NetWmWindowTypeMenu Adds _NET_WM_WINDOW_TYPE_MENU to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for QMenu when torn-off.
+
+ \value WA_X11NetWmWindowTypeUtility Adds _NET_WM_WINDOW_TYPE_UTILITY to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for the Qt::Tool window type.
+
+ \value WA_X11NetWmWindowTypeSplash Adds _NET_WM_WINDOW_TYPE_SPLASH to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for the Qt::SplashScreen window type.
+
+ \value WA_X11NetWmWindowTypeDialog Adds _NET_WM_WINDOW_TYPE_DIALOG
+ to the window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This
+ attribute has no effect on non-X11 platforms. \note Qt automatically sets
+ this attribute for the Qt::Dialog and Qt::Sheet window types.
+
+ \value WA_X11NetWmWindowTypeDropDownMenu Adds
+ _NET_WM_WINDOW_TYPE_DROPDOWN_MENU to the window's
+ _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This
+ attribute has no effect on non-X11 platforms. \note Qt
+ automatically sets this attribute for QMenus added to a QMenuBar.
+
+ \value WA_X11NetWmWindowTypePopupMenu Adds _NET_WM_WINDOW_TYPE_POPUP_MENU
+ to the window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for QMenu.
+
+ \value WA_X11NetWmWindowTypeToolTip Adds _NET_WM_WINDOW_TYPE_TOOLTIP to the
+ window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for the Qt::ToolTip window type.
+
+ \value WA_X11NetWmWindowTypeNotification Adds
+ _NET_WM_WINDOW_TYPE_NOTIFICATION to the window's _NET_WM_WINDOW_TYPE X11
+ window property. See http://standards.freedesktop.org/wm-spec/ for more
+ details. This attribute has no effect on non-X11 platforms.
+
+ \value WA_X11NetWmWindowTypeCombo Adds _NET_WM_WINDOW_TYPE_COMBO
+ to the window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute for the QComboBox pop-up.
+
+ \value WA_X11NetWmWindowTypeDND Adds _NET_WM_WINDOW_TYPE_DND to
+ the window's _NET_WM_WINDOW_TYPE X11 window property. See
+ http://standards.freedesktop.org/wm-spec/ for more details. This attribute
+ has no effect on non-X11 platforms. \note Qt automatically sets this
+ attribute on the feedback widget used during a drag.
+
+ \value WA_MacFrameworkScaled Enables resolution independence aware mode
+ on Mac when using Carbon. This attribute has no effect on Cocoa.
+ The attribute is off by default and can be enabled on a per-window basis.
+
+ \omitvalue WA_SetLayoutDirection
+ \omitvalue WA_InputMethodTransparent
+ \omitvalue WA_WState_CompressKeys
+ \omitvalue WA_WState_ConfigPending
+ \omitvalue WA_WState_Created
+ \omitvalue WA_WState_DND
+ \omitvalue WA_WState_ExplicitShowHide
+ \omitvalue WA_WState_Hidden
+ \omitvalue WA_WState_InPaintEvent
+ \omitvalue WA_WState_OwnSizePolicy
+ \omitvalue WA_WState_Polished
+ \omitvalue WA_WState_Reparented
+ \omitvalue WA_WState_Visible
+ \omitvalue WA_SetWindowIcon
+ \omitvalue WA_PendingUpdate
+ \omitvalue WA_LaidOut
+ \omitvalue WA_GrabbedShortcut
+ \omitvalue WA_DontShowOnScreen
+ \omitvalue WA_InvalidSize
+ \omitvalue WA_ForceUpdatesDisabled
+ \omitvalue WA_NoX11EventCompression
+ \omitvalue WA_TintedBackground
+ \omitvalue WA_X11OpenGLOverlay
+ \omitvalue WA_CanHostQMdiSubWindowTitleBar
+ \omitvalue WA_AttributeCount
+ \omitvalue WA_StyleSheet
+ \omitvalue WA_X11BypassTransientForHint
+ \omitvalue WA_SetWindowModality
+ \omitvalue WA_WState_WindowOpacitySet
+*/
+
+/*! \typedef Qt::HANDLE
+
+ Platform-specific handle type for system objects. This is
+ equivalent to \c{void *} on Windows and Mac OS X, and embedded
+ Linux, and to \c{unsigned long} on X11.
+
+ \warning Using this type is not portable.
+*/
+
+/*!
+ \enum Qt::Key
+
+ The key names used by Qt.
+
+ \value Key_Escape
+ \value Key_Tab
+ \value Key_Backtab
+ \omitvalue Key_BackTab
+ \value Key_Backspace
+ \omitvalue Key_BackSpace
+ \value Key_Return
+ \value Key_Enter Typically located on the keypad.
+ \value Key_Insert
+ \value Key_Delete
+ \value Key_Pause
+ \value Key_Print
+ \value Key_SysReq
+ \value Key_Clear
+ \value Key_Home
+ \value Key_End
+ \value Key_Left
+ \value Key_Up
+ \value Key_Right
+ \value Key_Down
+ \value Key_PageUp
+ \omitvalue Key_Prior
+ \value Key_PageDown
+ \omitvalue Key_Next
+ \value Key_Shift
+ \value Key_Control On Mac OS X, this corresponds to the Command keys.
+ \value Key_Meta On Mac OS X, this corresponds to the Control keys.
+ On Windows keyboards, this key is mapped to the
+ Windows key.
+ \value Key_Alt
+ \value Key_AltGr On Windows, when the KeyDown event for this key is
+ sent, the Ctrl+Alt modifiers are also set.
+ \value Key_CapsLock
+ \value Key_NumLock
+ \value Key_ScrollLock
+ \value Key_F1
+ \value Key_F2
+ \value Key_F3
+ \value Key_F4
+ \value Key_F5
+ \value Key_F6
+ \value Key_F7
+ \value Key_F8
+ \value Key_F9
+ \value Key_F10
+ \value Key_F11
+ \value Key_F12
+ \value Key_F13
+ \value Key_F14
+ \value Key_F15
+ \value Key_F16
+ \value Key_F17
+ \value Key_F18
+ \value Key_F19
+ \value Key_F20
+ \value Key_F21
+ \value Key_F22
+ \value Key_F23
+ \value Key_F24
+ \value Key_F25
+ \value Key_F26
+ \value Key_F27
+ \value Key_F28
+ \value Key_F29
+ \value Key_F30
+ \value Key_F31
+ \value Key_F32
+ \value Key_F33
+ \value Key_F34
+ \value Key_F35
+ \value Key_Super_L
+ \value Key_Super_R
+ \value Key_Menu
+ \value Key_Hyper_L
+ \value Key_Hyper_R
+ \value Key_Help
+ \value Key_Direction_L
+ \value Key_Direction_R
+ \value Key_Space
+ \value Key_Any
+ \value Key_Exclam
+ \value Key_QuoteDbl
+ \value Key_NumberSign
+ \value Key_Dollar
+ \value Key_Percent
+ \value Key_Ampersand
+ \value Key_Apostrophe
+ \value Key_ParenLeft
+ \value Key_ParenRight
+ \value Key_Asterisk
+ \value Key_Plus
+ \value Key_Comma
+ \value Key_Minus
+ \value Key_Period
+ \value Key_Slash
+ \value Key_0
+ \value Key_1
+ \value Key_2
+ \value Key_3
+ \value Key_4
+ \value Key_5
+ \value Key_6
+ \value Key_7
+ \value Key_8
+ \value Key_9
+ \value Key_Colon
+ \value Key_Semicolon
+ \value Key_Less
+ \value Key_Equal
+ \value Key_Greater
+ \value Key_Question
+ \value Key_At
+ \value Key_A
+ \value Key_B
+ \value Key_C
+ \value Key_D
+ \value Key_E
+ \value Key_F
+ \value Key_G
+ \value Key_H
+ \value Key_I
+ \value Key_J
+ \value Key_K
+ \value Key_L
+ \value Key_M
+ \value Key_N
+ \value Key_O
+ \value Key_P
+ \value Key_Q
+ \value Key_R
+ \value Key_S
+ \value Key_T
+ \value Key_U
+ \value Key_V
+ \value Key_W
+ \value Key_X
+ \value Key_Y
+ \value Key_Z
+ \value Key_BracketLeft
+ \value Key_Backslash
+ \value Key_BracketRight
+ \value Key_AsciiCircum
+ \value Key_Underscore
+ \value Key_QuoteLeft
+ \value Key_BraceLeft
+ \value Key_Bar
+ \value Key_BraceRight
+ \value Key_AsciiTilde
+ \value Key_nobreakspace
+ \value Key_exclamdown
+ \value Key_cent
+ \value Key_sterling
+ \value Key_currency
+ \value Key_yen
+ \value Key_brokenbar
+ \value Key_section
+ \value Key_diaeresis
+ \value Key_copyright
+ \value Key_ordfeminine
+ \value Key_guillemotleft
+ \value Key_notsign
+ \value Key_hyphen
+ \value Key_registered
+ \value Key_macron
+ \value Key_degree
+ \value Key_plusminus
+ \value Key_twosuperior
+ \value Key_threesuperior
+ \value Key_acute
+ \value Key_mu
+ \value Key_paragraph
+ \value Key_periodcentered
+ \value Key_cedilla
+ \value Key_onesuperior
+ \value Key_masculine
+ \value Key_guillemotright
+ \value Key_onequarter
+ \value Key_onehalf
+ \value Key_threequarters
+ \value Key_questiondown
+ \value Key_Agrave
+ \value Key_Aacute
+ \value Key_Acircumflex
+ \value Key_Atilde
+ \value Key_Adiaeresis
+ \value Key_Aring
+ \value Key_AE
+ \value Key_Ccedilla
+ \value Key_Egrave
+ \value Key_Eacute
+ \value Key_Ecircumflex
+ \value Key_Ediaeresis
+ \value Key_Igrave
+ \value Key_Iacute
+ \value Key_Icircumflex
+ \value Key_Idiaeresis
+ \value Key_ETH
+ \value Key_Ntilde
+ \value Key_Ograve
+ \value Key_Oacute
+ \value Key_Ocircumflex
+ \value Key_Otilde
+ \value Key_Odiaeresis
+ \value Key_multiply
+ \value Key_Ooblique
+ \value Key_Ugrave
+ \value Key_Uacute
+ \value Key_Ucircumflex
+ \value Key_Udiaeresis
+ \value Key_Yacute
+ \value Key_THORN
+ \value Key_ssharp
+ \omitvalue Key_agrave
+ \omitvalue Key_aacute
+ \omitvalue Key_acircumflex
+ \omitvalue Key_atilde
+ \omitvalue Key_adiaeresis
+ \omitvalue Key_aring
+ \omitvalue Key_ae
+ \omitvalue Key_ccedilla
+ \omitvalue Key_egrave
+ \omitvalue Key_eacute
+ \omitvalue Key_ecircumflex
+ \omitvalue Key_ediaeresis
+ \omitvalue Key_igrave
+ \omitvalue Key_iacute
+ \omitvalue Key_icircumflex
+ \omitvalue Key_idiaeresis
+ \omitvalue Key_eth
+ \omitvalue Key_ntilde
+ \omitvalue Key_ograve
+ \omitvalue Key_oacute
+ \omitvalue Key_ocircumflex
+ \omitvalue Key_otilde
+ \omitvalue Key_odiaeresis
+ \value Key_division
+ \omitvalue Key_oslash
+ \omitvalue Key_ugrave
+ \omitvalue Key_uacute
+ \omitvalue Key_ucircumflex
+ \omitvalue Key_udiaeresis
+ \omitvalue Key_yacute
+ \omitvalue Key_thorn
+ \value Key_ydiaeresis
+ \value Key_Multi_key
+ \value Key_Codeinput
+ \value Key_SingleCandidate
+ \value Key_MultipleCandidate
+ \value Key_PreviousCandidate
+ \value Key_Mode_switch
+ \value Key_Kanji
+ \value Key_Muhenkan
+ \value Key_Henkan
+ \value Key_Romaji
+ \value Key_Hiragana
+ \value Key_Katakana
+ \value Key_Hiragana_Katakana
+ \value Key_Zenkaku
+ \value Key_Hankaku
+ \value Key_Zenkaku_Hankaku
+ \value Key_Touroku
+ \value Key_Massyo
+ \value Key_Kana_Lock
+ \value Key_Kana_Shift
+ \value Key_Eisu_Shift
+ \value Key_Eisu_toggle
+ \value Key_Hangul
+ \value Key_Hangul_Start
+ \value Key_Hangul_End
+ \value Key_Hangul_Hanja
+ \value Key_Hangul_Jamo
+ \value Key_Hangul_Romaja
+ \value Key_Hangul_Jeonja
+ \value Key_Hangul_Banja
+ \value Key_Hangul_PreHanja
+ \value Key_Hangul_PostHanja
+ \value Key_Hangul_Special
+ \value Key_Dead_Grave
+ \value Key_Dead_Acute
+ \value Key_Dead_Circumflex
+ \value Key_Dead_Tilde
+ \value Key_Dead_Macron
+ \value Key_Dead_Breve
+ \value Key_Dead_Abovedot
+ \value Key_Dead_Diaeresis
+ \value Key_Dead_Abovering
+ \value Key_Dead_Doubleacute
+ \value Key_Dead_Caron
+ \value Key_Dead_Cedilla
+ \value Key_Dead_Ogonek
+ \value Key_Dead_Iota
+ \value Key_Dead_Voiced_Sound
+ \value Key_Dead_Semivoiced_Sound
+ \value Key_Dead_Belowdot
+ \value Key_Dead_Hook
+ \value Key_Dead_Horn
+ \value Key_Back
+ \value Key_Forward
+ \value Key_Stop
+ \value Key_Refresh
+ \value Key_VolumeDown
+ \value Key_VolumeMute
+ \value Key_VolumeUp
+ \value Key_BassBoost
+ \value Key_BassUp
+ \value Key_BassDown
+ \value Key_TrebleUp
+ \value Key_TrebleDown
+ \value Key_MediaPlay
+ \value Key_MediaStop
+ \value Key_MediaPrevious
+ \omitvalue Key_MediaPrev
+ \value Key_MediaNext
+ \value Key_MediaRecord
+ \value Key_HomePage
+ \value Key_Favorites
+ \value Key_Search
+ \value Key_Standby
+ \value Key_OpenUrl
+ \value Key_LaunchMail
+ \value Key_LaunchMedia
+ \value Key_Launch0
+ \value Key_Launch1
+ \value Key_Launch2
+ \value Key_Launch3
+ \value Key_Launch4
+ \value Key_Launch5
+ \value Key_Launch6
+ \value Key_Launch7
+ \value Key_Launch8
+ \value Key_Launch9
+ \value Key_LaunchA
+ \value Key_LaunchB
+ \value Key_LaunchC
+ \value Key_LaunchD
+ \value Key_LaunchE
+ \value Key_LaunchF
+ \value Key_MediaLast
+ \value Key_unknown
+
+ \value Key_Call
+ \value Key_Context1
+ \value Key_Context2
+ \value Key_Context3
+ \value Key_Context4
+ \value Key_Flip
+ \value Key_Hangup
+ \value Key_No
+ \value Key_Select
+ \value Key_Yes
+
+ \value Key_Execute
+ \value Key_Printer
+ \value Key_Play
+ \value Key_Sleep
+ \value Key_Zoom
+ \value Key_Cancel
+
+ \sa QKeyEvent::key()
+*/
+
+/*!
+ \enum Qt::HitTestAccuracy
+
+ This enum contains the types of accuracy that can be used by the
+ QTextDocument class when testing for mouse clicks on text documents.
+
+ \value ExactHit The point at which input occurred must coincide
+ exactly with input-sensitive parts of the document.
+ \value FuzzyHit The point at which input occurred can lie close to
+ input-sensitive parts of the document.
+
+ This enum is defined in the \c <QTextDocument> header file.
+*/
+
+/*!
+ \enum Qt::WhiteSpaceMode
+
+ This enum describes the types of whitespace mode that are used by
+ the QTextDocument class to meet the requirements of different kinds
+ of textual information.
+
+ \value WhiteSpaceNormal The whitespace mode used to display
+ normal word wrapped text in paragraphs.
+ \value WhiteSpacePre A preformatted text mode in which
+ whitespace is reproduced exactly.
+ \value WhiteSpaceNoWrap
+
+ \omitvalue WhiteSpaceModeUndefined
+
+ This enum is defined in the \c <QTextDocument> header file.
+*/
+
+/*!
+ \enum Qt::ButtonState_enum
+ \compat
+ \value ShiftButton
+ \value ControlButton
+ \value AltButton
+ \value MetaButton
+ \value Keypad
+ \value KeyButtonMask
+
+ Use Qt::KeyboardModifier instead.
+*/
+
+/*!
+ \typedef Qt::ButtonState
+ \compat
+
+ Use Qt::KeyboardModifier instead.
+*/
+
+/*!
+ \enum Qt::CheckState
+
+ This enum describes the state of checkable items, controls, and widgets.
+
+ \value Unchecked The item is unchecked.
+ \value PartiallyChecked The item is partially checked. Items in hierarchical models
+ may be partially checked if some, but not all, of their
+ children are checked.
+ \value Checked The item is checked.
+
+ \sa QCheckBox, Qt::ItemFlags, Qt::ItemDataRole
+*/
+
+
+/*!
+ \enum Qt::ToolButtonStyle
+
+ The style of the tool button, describing how the button's text and
+ icon should be displayed.
+
+ \value ToolButtonIconOnly Only display the icon.
+ \value ToolButtonTextOnly Only display the text.
+ \value ToolButtonTextBesideIcon The text appears beside the icon.
+ \value ToolButtonTextUnderIcon The text appears under the icon.
+*/
+
+/*!
+ \enum Qt::Corner
+
+ This enum type specifies a corner in a rectangle:
+
+ \value TopLeftCorner The top-left corner of the rectangle.
+ \value TopRightCorner The top-right corner of the rectangle.
+ \value BottomLeftCorner The bottom-left corner of the rectangle.
+ \value BottomRightCorner The bottom-right corner of the rectangle.
+
+ \omitvalue TopLeft
+ \omitvalue TopRight
+ \omitvalue BottomLeft
+ \omitvalue BottomRight
+*/
+
+/*!
+ \enum Qt::ScrollBarPolicy
+
+ This enum type describes the various modes of QAbstractScrollArea's scroll
+ bars.
+
+ \value ScrollBarAsNeeded QAbstractScrollArea shows a scroll bar when the
+ content is too large to fit and not otherwise. This is the
+ default.
+
+ \value ScrollBarAlwaysOff QAbstractScrollArea never shows a scroll bar.
+
+ \value ScrollBarAlwaysOn QAbstractScrollArea always shows a scroll bar.
+
+ (The modes for the horizontal and vertical scroll bars are
+ independent.)
+*/
+
+/*!
+ \enum Qt::ArrowType
+
+ \value NoArrow
+ \value UpArrow
+ \value DownArrow
+ \value LeftArrow
+ \value RightArrow
+*/
+
+/*!
+ \enum Qt::FocusReason
+
+ This enum specifies why the focus changed. It will be passed
+ through QWidget::setFocus and can be retrieved in the QFocusEvent
+ sent to the widget upon focus change.
+
+ \value MouseFocusReason A mouse action occurred.
+ \value TabFocusReason The Tab key was pressed.
+ \value BacktabFocusReason A Backtab occurred. The input for this may
+ include the Shift or Control keys;
+ e.g. Shift+Tab.
+ \value ActiveWindowFocusReason The window system made this window either
+ active or inactive.
+ \value PopupFocusReason The application opened/closed a pop-up that
+ grabbed/released the keyboard focus.
+ \value ShortcutFocusReason The user typed a label's buddy shortcut
+ \value MenuBarFocusReason The menu bar took focus.
+ \value OtherFocusReason Another reason, usually application-specific.
+
+ \omitvalue NoFocusReason
+
+ \sa {Keyboard Focus}
+*/
+
+/*!
+ \enum Qt::WindowState
+
+ \keyword window state
+
+ This enum type is used to specify the current state of a top-level
+ window.
+
+ The states are
+
+ \value WindowNoState The window has no state set (in normal state).
+ \value WindowMinimized The window is minimized (i.e. iconified).
+ \value WindowMaximized The window is maximized with a frame around it.
+ \value WindowFullScreen The window fills the entire screen without any frame around it.
+ \value WindowActive The window is the active window, i.e. it has keyboard focus.
+
+*/
+
+/*!
+ \enum Qt::ContextMenuPolicy
+
+ This enum type defines the various policies a widget can have with
+ respect to showing a context menu.
+
+ \value NoContextMenu the widget does not feature a context menu,
+ context menu handling is deferred to the widget's parent.
+ \value PreventContextMenu the widget does not feature a context
+ menu, and in contrast to \c NoContextMenu, the handling is \e not
+ deferred to the widget's parent. This means that all right mouse
+ button events are guaranteed to be delivered to the widget itself
+ through mousePressEvent(), and mouseReleaseEvent().
+ \value DefaultContextMenu the widget's QWidget::contextMenuEvent() handler is called.
+ \value ActionsContextMenu the widget displays its QWidget::actions() as context menu.
+ \value CustomContextMenu the widget emits the QWidget::customContextMenuRequested() signal.
+*/
+
+/*!
+ \enum Qt::FocusPolicy
+
+ This enum type defines the various policies a widget can have with
+ respect to acquiring keyboard focus.
+
+ \value TabFocus the widget accepts focus by tabbing.
+ \value ClickFocus the widget accepts focus by clicking.
+ \value StrongFocus the widget accepts focus by both tabbing
+ and clicking. On Mac OS X this will also
+ be indicate that the widget accepts tab focus
+ when in 'Text/List focus mode'.
+ \value WheelFocus like Qt::StrongFocus plus the widget accepts
+ focus by using the mouse wheel.
+ \value NoFocus the widget does not accept focus.
+
+*/
+
+/*!
+ \enum Qt::ShortcutContext
+
+ For a QEvent::Shortcut event to occur, the shortcut's key sequence
+ must be entered by the user in a context where the shortcut is
+ active. The possible contexts are these:
+
+ \value WidgetShortcut The shortcut is active when its
+ parent widget has focus.
+ \value WidgetWithChildrenShortcut The shortcut is active
+ when its parent widget, or any of its children has focus.
+ Children which are top-level widgets, except pop-ups, are
+ not affected by this shortcut context.
+ \value WindowShortcut The shortcut is active when its
+ parent widget is a logical subwidget of the
+ active top-level window.
+ \value ApplicationShortcut The shortcut is active when one of
+ the applications windows are active.
+*/
+
+/*!
+ \typedef Qt::WFlags
+
+ Synonym for Qt::WindowFlags.
+*/
+
+/*!
+ \enum Qt::WindowType
+
+ \keyword window flag
+
+ This enum type is used to specify various window-system properties
+ for the widget. They are fairly unusual but necessary in a few
+ cases. Some of these flags depend on whether the underlying window
+ manager supports them.
+
+ The main types are
+
+ \value Widget This is the default type for QWidget. Widgets of
+ this type are child widgets if they have a parent,
+ and independent windows if they have no parent.
+ See also Qt::Window and Qt::SubWindow.
+
+ \value Window Indicates that the widget is a window, usually
+ with a window system frame and a title bar,
+ irrespective of whether the widget has a parent or
+ not. Note that it is not possible to unset this
+ flag if the widget does not have a parent.
+
+ \value Dialog Indicates that the widget is a window that should
+ be decorated as a dialog (i.e., typically no
+ maximize or minimize buttons in the title bar).
+ This is the default type for QDialog. If you want
+ to use it as a modal dialog, it should be launched
+ from another window, or have a parent and used
+ with the QWidget::windowModality property. If you make
+ it modal, the dialog will prevent other top-level
+ windows in the application from getting any input.
+ We refer to a top-level window that has a parent
+ as a \e secondary window.
+
+ \value Sheet Indicates that the widget is a Macintosh sheet.
+
+ \value Drawer Indicates that the widget is a Macintosh drawer.
+
+ \value Popup Indicates that the widget is a pop-up top-level
+ window, i.e. that it is modal, but has a window
+ system frame appropriate for pop-up menus.
+
+ \value Tool Indicates that the widget is a tool window. A tool
+ window is often a small window with a smaller than
+ usual title bar and decoration, typically used for
+ collections of tool buttons. It there is a parent,
+ the tool window will always be kept on top of it.
+ If there isn't a parent, you may consider using
+ Qt::WindowStaysOnTopHint as well. If the window
+ system supports it, a tool window can be decorated
+ with a somewhat lighter frame. It can also be
+ combined with Qt::FramelessWindowHint.
+ \br
+ \br
+ On Mac OS X, tool windows correspond to the
+ \l{http://developer.apple.com/documentation/Carbon/Conceptual/HandlingWindowsControls/hitb-wind_cont_concept/chapter_2_section_2.html}{Floating}
+ class of windows. This means that the window lives on a
+ level above normal windows; it impossible to put a normal
+ window on top of it. By default, tool windows will disappear
+ when the application is inactive. This can be controlled by
+ the Qt::WA_MacAlwaysShowToolWindow attribute.
+
+ \value ToolTip Indicates that the widget is a tooltip. This is
+ used internally to implement
+ \l{QWidget::toolTip}{tooltips}.
+
+ \value SplashScreen Indicates that the window is a splash screen.
+ This is the default type for QSplashScreen.
+
+ \value Desktop Indicates that this widget is the desktop. This
+ is the type for QDesktopWidget.
+
+ \value SubWindow Indicates that this widget is a sub-window, such
+ as a QMdiSubWindow widget.
+
+ There are also a number of flags which you can use to customize
+ the appearance of top-level windows. These have no effect on other
+ windows:
+
+ \value MSWindowsFixedSizeDialogHint Gives the window a thin dialog border on Windows.
+ This style is traditionally used for fixed-size dialogs.
+
+ \value MSWindowsOwnDC Gives the window its own display
+ context on Windows.
+
+ \value X11BypassWindowManagerHint Bypass the window
+ manager completely. This results in a borderless window
+ that is not managed at all (i.e., no keyboard input unless
+ you call QWidget::activateWindow() manually).
+
+ \value FramelessWindowHint Produces a borderless window.
+ The user cannot move or resize a borderless window via the window
+ system. On X11, the result of the flag is dependent on the window manager and its
+ ability to understand Motif and/or NETWM hints. Most existing
+ modern window managers can handle this.
+
+ The \c CustomizeWindowHint flag is used to enable customization of
+ the window controls. This flag must be set to allow the \c
+ WindowTitleHint, \c WindowSystemMenuHint, \c
+ WindowMinimizeButtonHint, \c WindowMaximizeButtonHint and \c
+ WindowCloseButtonHint flags to be changed.
+
+ \value CustomizeWindowHint Turns off the default window title hints.
+
+ \value WindowTitleHint Gives the window a title bar.
+
+ \value WindowSystemMenuHint Adds a window system menu, and
+ possibly a close button (for example on Mac). If you need to hide
+ or show a close button, it is more portable to use \c
+ WindowCloseButtonHint.
+
+ \value WindowMinimizeButtonHint Adds a minimize button. On
+ some platforms this implies Qt::WindowSystemMenuHint for it to work.
+
+ \value WindowMaximizeButtonHint Adds a maximize button. On
+ some platforms this implies Qt::WindowSystemMenuHint for it to work.
+
+ \value WindowMinMaxButtonsHint Adds a minimize and a maximize
+ button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
+
+ \value WindowCloseButtonHint Adds a close button. On
+ some platforms this implies Qt::WindowSystemMenuHint for it
+ to work.
+
+ \value WindowContextHelpButtonHint Adds a context help button to dialogs.
+ On some platforms this implies Qt::WindowSystemMenuHint for it to work.
+
+ \value MacWindowToolBarButtonHint On Mac OS X adds a tool bar button (i.e.,
+ the oblong button that is on the top right of windows that have toolbars.
+
+ \value BypassGraphicsProxyWidget Prevents the window and its children from
+ automatically embedding themselves into a QGraphicsProxyWidget if the
+ parent widget is already embedded. You can set this flag if you
+ want your widget to always be a toplevel widget on the desktop,
+ regardless of whether the parent widget is embedded in a scene or
+ not.
+
+ \value WindowShadeButtonHint
+
+ \value WindowStaysOnTopHint Informs the window system that the
+ window should stay on top of all other windows. Note that
+ on some window managers on X11 you also have to pass
+ Qt::X11BypassWindowManagerHint for this flag to work
+ correctly.
+
+ \value WindowStaysOnBottomHint Informs the window system that the
+ window should stay on bottom of all other windows. Note
+ that on X11 this hint will work only in window managers
+ that support _NET_WM_STATE_BELOW atom. If a window always
+ on the bottom has a parent, the parent will also be left on
+ the bottom. This window hint is currently not implemented
+ for Mac OS X.
+
+ \value WindowOkButtonHint Adds an OK button to the window decoration of a dialog.
+ Only supported for Windows CE.
+
+ \value WindowCancelButtonHint Adds a Cancel button to the window decoration of a dialog.
+ Only supported for Windows CE.
+
+ \value WindowType_Mask A mask for extracting the window type
+ part of the window flags.
+
+ Obsolete flags:
+
+ \value WMouseNoMask Use Qt::WA_MouseNoMask instead.
+ \value WDestructiveClose Use Qt::WA_DeleteOnClose instead.
+ \value WStaticContents Use Qt::WA_StaticContents instead.
+ \value WGroupLeader No longer needed.
+ \value WShowModal Use QWidget::windowModality instead.
+ \value WNoMousePropagation Use Qt::WA_NoMousePropagation instead.
+ \value WType_TopLevel Use Qt::Window instead.
+ \value WType_Dialog Use Qt::Dialog instead.
+ \value WType_Popup Use Qt::Popup instead.
+ \value WType_Desktop Use Qt::Desktop instead.
+ \value WType_Mask Use Qt::WindowType_Mask instead.
+
+ \value WStyle_Customize No longer needed.
+ \value WStyle_NormalBorder No longer needed.
+ \value WStyle_DialogBorder Use Qt::MSWindowsFixedSizeDialogHint instead.
+ \value WStyle_NoBorder Use Qt::FramelessWindowHint instead.
+ \value WStyle_Title Use Qt::WindowTitleHint instead.
+ \value WStyle_SysMenu Use Qt::WindowSystemMenuHint instead.
+ \value WStyle_Minimize Use Qt::WindowMinimizeButtonHint instead.
+ \value WStyle_Maximize Use Qt::WindowMaximizeButtonHint instead.
+ \value WStyle_MinMax Use Qt::WindowMinMaxButtonsHint instead.
+ \value WStyle_Tool Use Qt::Tool instead.
+ \value WStyle_StaysOnTop Use Qt::WindowStaysOnTopHint instead.
+ \value WStyle_ContextHelp Use Qt::WindowContextHelpButtonHint instead.
+
+ \value WPaintDesktop No longer needed.
+ \value WPaintClever No longer needed.
+
+ \value WX11BypassWM Use Qt::X11BypassWindowManagerHint instead.
+ \value WWinOwnDC Use Qt::MSWindowsOwnDC instead.
+ \value WMacSheet Use Qt::Sheet instead.
+ \value WMacDrawer Use Qt::Drawer instead.
+
+ \value WStyle_Splash Use Qt::SplashScreen instead.
+
+ \value WNoAutoErase No longer needed.
+ \value WRepaintNoErase No longer needed.
+ \value WNorthWestGravity Use Qt::WA_StaticContents instead.
+ \value WType_Modal Use Qt::Dialog and QWidget::windowModality instead.
+ \value WStyle_Dialog Use Qt::Dialog instead.
+ \value WStyle_NoBorderEx Use Qt::FramelessWindowHint instead.
+ \value WResizeNoErase No longer needed.
+ \value WMacNoSheet No longer needed.
+
+ \sa QWidget::windowFlags, {Window Flags Example}
+*/
+
+/*!
+ \enum Qt::DropAction
+
+ \value CopyAction Copy the data to the target.
+ \value MoveAction Move the data from the source to the target.
+ \value LinkAction Create a link from the source to the target.
+ \value ActionMask
+ \value IgnoreAction Ignore the action (do nothing with the data).
+ \value TargetMoveAction On Windows, this value is used when the ownership of the D&D data
+ should be taken over by the target application,
+ i.e., the source application should not delete
+ the data.
+
+ On X11 this value is used to do a move.
+
+ TargetMoveAction is not used on the Mac.
+*/
+
+#if defined(Q_OS_WIN) && defined(QT3_SUPPORT)
+/*!
+ \enum Qt::WindowsVersion
+ \compat
+
+ \value WV_32s
+ \value WV_95
+ \value WV_98
+ \value WV_Me
+ \value WV_DOS_based
+ \value WV_NT
+ \value WV_2000
+ \value WV_XP
+ \value WV_2003
+ \value WV_NT_based
+ \value WV_CE
+ \value WV_CENET
+ \value WV_CE_based
+ \value WV_CE_5
+ \value WV_CE_6
+*/
+#endif
+
+#if defined(Q_OS_MAC) && defined(QT3_SUPPORT)
+/*!
+ \enum Qt::MacintoshVersion
+ \compat
+
+ \value MV_Unknown Use QSysInfo::MV_Unknown instead.
+ \value MV_9 Use QSysInfo::MV_9 instead.
+ \value MV_10_DOT_0 Use QSysInfo::MV_10_0 instead.
+ \value MV_10_DOT_1 Use QSysInfo::MV_10_1 instead.
+ \value MV_10_DOT_2 Use QSysInfo::MV_10_2 instead.
+ \value MV_10_DOT_3 Use QSysInfo::MV_10_3 instead.
+ \value MV_10_DOT_4 Use QSysInfo::MV_10_4 instead.
+
+ \value MV_CHEETAH Use QSysInfo::MV_10_0 instead.
+ \value MV_PUMA Use QSysInfo::MV_10_1 instead.
+ \value MV_JAGUAR Use QSysInfo::MV_10_2 instead.
+ \value MV_PANTHER Use QSysInfo::MV_10_3 instead.
+ \value MV_TIGER Use QSysInfo::MV_10_4 instead.
+
+ \sa QSysInfo::MacVersion
+*/
+#endif
+
+/*! \typedef Qt::ToolBarDock
+ \compat
+
+ Use Qt::Dock instead.
+*/
+
+/*!
+ \enum Qt::Dock
+ \compat
+
+ Each dock window can be in one of the following positions:
+
+ \value DockUnmanaged not managed by a Q3MainWindow.
+
+ \value DockTornOff the dock window floats as its own top level
+ window which always stays on top of the main window.
+
+ \value DockTop above the central widget, below the menu bar.
+
+ \value DockBottom below the central widget, above the status bar.
+
+ \value DockRight to the right of the central widget.
+
+ \value DockLeft to the left of the central widget.
+
+ \value DockMinimized the dock window is not shown (this is
+ effectively a 'hidden' dock area); the handles of all minimized
+ dock windows are drawn in one row below the menu bar.
+
+ \omitvalue Bottom
+ \omitvalue Left
+ \omitvalue Minimized
+ \omitvalue Right
+ \omitvalue Top
+ \omitvalue TornOff
+ \omitvalue Unmanaged
+*/
+
+/*!
+ \enum Qt::AnchorAttribute
+
+ An anchor has one or more of the following attributes:
+
+ \value AnchorName the name attribute of the anchor. This attribute is
+ used when scrolling to an anchor in the document.
+
+ \value AnchorHref the href attribute of the anchor. This attribute is
+ used when a link is clicked to determine what content to load.
+*/
+
+/*!
+ \enum Qt::SortOrder
+
+ This enum describes how the items in a widget are sorted.
+
+ \value AscendingOrder The items are sorted ascending e.g. starts with
+ 'AAA' ends with 'ZZZ' in Latin-1 locales
+
+ \value DescendingOrder The items are sorted descending e.g. starts with
+ 'ZZZ' ends with 'AAA' in Latin-1 locales
+
+ \omitvalue Ascending
+ \omitvalue Descending
+*/
+
+/*!
+ \enum Qt::ClipOperation
+
+ \value NoClip This operation turns clipping off.
+
+ \value ReplaceClip Replaces the current clip path/rect/region with
+ the one supplied in the function call.
+
+ \value IntersectClip Intersects the current clip path/rect/region
+ with the one supplied in the function call.
+
+ \value UniteClip Unites the current clip path/rect/region with the
+ one supplied in the function call.
+*/
+
+/*!
+ \enum Qt::ItemSelectionMode
+
+ This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to
+ specify how items are selected, or how to determine if a shapes and items
+ collide.
+
+ \value ContainsItemShape The output list contains only items whose
+ \l{QGraphicsItem::shape()}{shape} is fully contained inside the
+ selection area. Items that intersect with the area's outline are
+ not included.
+
+ \value IntersectsItemShape The output list contains both items whose
+ \l{QGraphicsItem::shape()}{shape} is fully contained inside the
+ selection area, and items that intersect with the area's
+ outline. This is a common mode for rubber band selection.
+
+ \value ContainsItemBoundingRect The output list contains only items whose
+ \l{QGraphicsItem::boundingRect()}{bounding rectangle} is fully
+ contained inside the selection area. Items that intersect with the
+ area's outline are not included.
+
+ \value IntersectsItemBoundingRect The output list contains both items
+ whose \l{QGraphicsItem::boundingRect()}{bounding rectangle} is
+ fully contained inside the selection area, and items that intersect
+ with the area's outline. This method is commonly used for
+ determining areas that need redrawing.
+
+ \sa QGraphicsScene::items(), QGraphicsScene::collidingItems(),
+ QGraphicsView::items(), QGraphicsItem::collidesWithItem(),
+ QGraphicsItem::collidesWithPath()
+*/
+
+/*!
+ \enum Qt::FillRule
+
+ Specifies which method should be used to fill the paths and polygons.
+
+ \value OddEvenFill Specifies that the region is filled using the
+ odd even fill rule. With this rule, we determine whether a point
+ is inside the shape by using the following method.
+ Draw a horizontal line from the point to a location outside the shape,
+ and count the number of intersections. If the number of intersections
+ is an odd number, the point is inside the shape. This mode is the
+ default.
+
+ \value WindingFill Specifies that the region is filled using the
+ non zero winding rule. With this rule, we determine whether a
+ point is inside the shape by using the following method.
+ Draw a horizontal line from the point to a location outside the shape.
+ Determine whether the direction of the line at each intersection point
+ is up or down. The winding number is determined by summing the
+ direction of each intersection. If the number is non zero, the point
+ is inside the shape. This fill mode can also in most cases be considered
+ as the intersection of closed shapes.
+*/
+
+/*!
+ \enum Qt::PaintUnit
+
+ \compat
+
+ \value PixelUnit
+ \value LoMetricUnit Obsolete
+ \value HiMetricUnit Obsolete
+ \value LoEnglishUnit Obsolete
+ \value HiEnglishUnit Obsolete
+ \value TwipsUnit Obsolete
+*/
+
+/*!
+ \enum Qt::TextFormat
+
+ This enum is used in widgets that can display both plain text and
+ rich text, e.g. QLabel. It is used for deciding whether a text
+ string should be interpreted as one or the other. This is normally
+ done by passing one of the enum values to a setTextFormat()
+ function.
+
+ \value PlainText The text string is interpreted as a plain text
+ string.
+
+ \value RichText The text string is interpreted as a rich text
+ string.
+
+ \value AutoText The text string is interpreted as for
+ Qt::RichText if Qt::mightBeRichText() returns true, otherwise
+ as Qt::PlainText.
+
+ \value LogText A special, limited text format which is only used
+ by Q3TextEdit in an optimized mode.
+*/
+
+/*!
+ \enum Qt::CursorShape
+
+ This enum type defines the various cursors that can be used.
+
+ The standard arrow cursor is the default for widgets in a normal state.
+
+ \value ArrowCursor \inlineimage cursor-arrow.png
+ The standard arrow cursor.
+ \value UpArrowCursor \inlineimage cursor-uparrow.png
+ An arrow pointing upwards toward the top of the screen.
+ \value CrossCursor \inlineimage cursor-cross.png
+ A crosshair cursor, typically used to help the
+ user accurately select a point on the screen.
+ \value WaitCursor \inlineimage cursor-wait.png
+ An hourglass or watch cursor, usually shown during
+ operations that prevent the user from interacting with
+ the application.
+ \value IBeamCursor \inlineimage cursor-ibeam.png
+ A caret or ibeam cursor, indicating that a widget can
+ accept and display text input.
+ \value SizeVerCursor \inlineimage cursor-sizev.png
+ A cursor used for elements that are used to vertically
+ resize top-level windows.
+ \value SizeHorCursor \inlineimage cursor-sizeh.png
+ A cursor used for elements that are used to horizontally
+ resize top-level windows.
+ \value SizeBDiagCursor \inlineimage cursor-sizeb.png
+ A cursor used for elements that are used to diagonally
+ resize top-level windows at their top-right and
+ bottom-left corners.
+ \value SizeFDiagCursor \inlineimage cursor-sizef.png
+ A cursor used for elements that are used to diagonally
+ resize top-level windows at their top-left and
+ bottom-right corners.
+ \value SizeAllCursor \inlineimage cursor-sizeall.png
+ A cursor used for elements that are used to resize
+ top-level windows in any direction.
+ \value BlankCursor A blank/invisible cursor, typically used when the cursor
+ shape needs to be hidden.
+ \value SplitVCursor \inlineimage cursor-vsplit.png
+ A cursor used for vertical splitters, indicating that
+ a handle can be dragged horizontally to adjust the use
+ of available space.
+ \value SplitHCursor \inlineimage cursor-hsplit.png
+ A cursor used for horizontal splitters, indicating that
+ a handle can be dragged vertically to adjust the use
+ of available space.
+ \value PointingHandCursor \inlineimage cursor-hand.png
+ A pointing hand cursor that is typically used for
+ clickable elements such as hyperlinks.
+ \value ForbiddenCursor \inlineimage cursor-forbidden.png
+ A slashed circle cursor, typically used during drag
+ and drop operations to indicate that dragged content
+ cannot be dropped on particular widgets or inside
+ certain regions.
+ \value OpenHandCursor \inlineimage cursor-openhand.png
+ A cursor representing an open hand, typically used to
+ indicate that the area under the cursor is the visible
+ part of a canvas that the user can click and drag in
+ order to scroll around.
+ \value ClosedHandCursor \inlineimage cursor-closedhand.png
+ A cursor representing a closed hand, typically used to
+ indicate that a dragging operation is in progress that
+ involves scrolling.
+ \value WhatsThisCursor \inlineimage cursor-whatsthis.png
+ An arrow with a question mark, typically used to indicate
+ the presence of What's This? help for a widget.
+ \value BusyCursor \inlineimage cursor-wait.png
+ An hourglass or watch cursor, usually shown during
+ operations that allow the user to interact with
+ the application while they are performed in the
+ background.
+ \value BitmapCursor
+ \omitvalue LastCursor
+ \omitvalue CustomCursor
+
+ \omitvalue arrowCursor
+ \omitvalue upArrowCursor
+ \omitvalue crossCursor
+ \omitvalue waitCursor
+ \omitvalue ibeamCursor
+ \omitvalue sizeVerCursor
+ \omitvalue sizeHorCursor
+ \omitvalue sizeBDiagCursor
+ \omitvalue sizeFDiagCursor
+ \omitvalue sizeAllCursor
+ \omitvalue blankCursor
+ \omitvalue splitVCursor
+ \omitvalue splitHCursor
+ \omitvalue pointingHandCursor
+ \omitvalue forbiddenCursor
+ \omitvalue whatsThisCursor
+*/
+
+/*!
+ \typedef Qt::TextFlags
+ \compat
+
+ Use Qt::TextFlag instead.
+*/
+
+/*!
+ \enum Qt::LayoutDirection
+
+ Specifies the direction of Qt's layouts:
+
+ \value LeftToRight Left-to-right layout.
+ \value RightToLeft Right-to-left layout.
+
+ Right-to-left layouts are necessary for certain languages,
+ notably Arabic and Hebrew.
+
+ \sa QApplication::setLayoutDirection(), QWidget::setLayoutDirection()
+*/
+
+/*!
+ \enum Qt::InputMethodQuery
+
+ \value ImMicroFocus The rectangle covering the area of the input cursor in widget coordinates.
+ \value ImFont The currently used font for text input.
+ \value ImCursorPosition The logical position of the cursor within the text surrounding the input area (see ImSurroundingText).
+ If any text is selected, the position returned will be at the logical end of the
+ selection, even if the real cursor is located at the logical start.
+ \value ImSurroundingText The plain text around the input area, for example the current paragraph.
+ \value ImCurrentSelection The currently selected text.
+*/
+
+/*!
+ \enum Qt::ItemDataRole
+
+ Each item in the model has a set of data elements associated with
+ it, each with its own role. The roles are used by the view to indicate
+ to the model which type of data it needs.
+
+ The general purpose roles are:
+
+ \value DisplayRole The key data to be rendered in the form of text.
+ \value DecorationRole The data to be rendered as a decoration in the form
+ of an icon.
+ \value EditRole The data in a form suitable for editing in an
+ editor.
+ \value ToolTipRole The data displayed in the item's tooltip.
+ \value StatusTipRole The data displayed in the status bar.
+ \value WhatsThisRole The data displayed for the item in "What's This?"
+ mode.
+ \value SizeHintRole The size hint for the item that will be supplied
+ to views.
+
+ Roles describing appearance and meta data:
+
+ \value FontRole The font used for items rendered with the default
+ delegate.
+ \value TextAlignmentRole The alignment of the text for items rendered with the
+ default delegate.
+ \value BackgroundRole The background brush used for items rendered with
+ the default delegate.
+ \value BackgroundColorRole This role is obsolete. Use BackgroundRole instead.
+ \value ForegroundRole The foreground brush (text color, typically)
+ used for items rendered with the default delegate.
+ \value TextColorRole This role is obsolete. Use ForegroundRole instead.
+ \value CheckStateRole This role is used to obtain the checked state of
+ an item (see \l Qt::CheckState).
+
+ Accessibility roles:
+
+ \value AccessibleTextRole The text to be used by accessibility
+ extensions and plugins, such as screen
+ readers.
+ \value AccessibleDescriptionRole A description of the item for accessibility
+ purposes.
+
+ User roles:
+
+ \value UserRole The first role that can be used for application-specific purposes.
+
+ \omitvalue DisplayPropertyRole
+ \omitvalue DecorationPropertyRole
+ \omitvalue ToolTipPropertyRole
+ \omitvalue StatusTipPropertyRole
+ \omitvalue WhatsThisPropertyRole
+*/
+
+/*!
+ \enum Qt::ItemFlag
+
+ This enum describes the properties of an item:
+
+ \value NoItemFlags It does not have any properties set.
+ \value ItemIsSelectable It can be selected.
+ \value ItemIsEditable It can be edited.
+ \value ItemIsDragEnabled It can be dragged.
+ \value ItemIsDropEnabled It can be used as a drop target.
+ \value ItemIsUserCheckable It can be checked or unchecked by the user.
+ \value ItemIsEnabled The user can interact with the item.
+ \value ItemIsTristate The item is checkable with three separate states.
+
+ Note that checkable items need to be given both a suitable set of flags
+ and an initial state, indicating whether the item is checked or not.
+ This is handled automatically for model/view components, but needs
+ to be explicitly set for instances of QListWidgetItem, QTableWidgetItem,
+ and QTreeWidgetItem.
+
+ \sa QAbstractItemModel
+*/
+
+/*!
+ \enum Qt::MatchFlag
+
+ This enum describes the type of matches that can be used when searching
+ for items in a model.
+
+ \value MatchExactly Performs QVariant-based matching.
+ \value MatchFixedString Performs string-based matching.
+ String-based comparisons are case-insensitive unless the
+ \c MatchCaseSensitive flag is also specified.
+ \value MatchContains The search term is contained in the item.
+ \value MatchStartsWith The search term matches the start of the item.
+ \value MatchEndsWith The search term matches the end of the item.
+ \value MatchCaseSensitive The search is case sensitive.
+ \value MatchRegExp Performs string-based matching using a regular
+ expression as the search term.
+ \value MatchWildcard Performs string-based matching using a string with
+ wildcards as the search term.
+ \value MatchWrap Perform a search that wraps around, so that when
+ the search reaches the last item in the model, it begins again at
+ the first item and continues until all items have been examined.
+ \value MatchRecursive Searches the entire hierarchy.
+
+ \sa QString::compare(), QRegExp
+*/
+
+/*!
+ \enum Qt::TextElideMode
+
+ This enum specifies where the ellipsis should appear when
+ displaying texts that don't fit:
+
+ \value ElideLeft The ellipsis should appear at the beginning of the text.
+ \value ElideRight The ellipsis should appear at the end of the text.
+ \value ElideMiddle The ellipsis should appear in the middle of the text.
+ \value ElideNone Ellipsis should NOT appear in the text.
+
+ Qt::ElideMiddle is normally the most appropriate choice for URLs (e.g.,
+ "\l{http://www.qtsoftware.com/careers/movingto/beijing/}{http://www.qtsof...ovingto/beijing/}"),
+ whereas Qt::ElideRight is appropriate
+ for other strings (e.g.,
+ "\l{http://doc.trolltech.com/qq/qq09-mac-deployment.html}{Deploying Applications on Ma...}").
+
+ \sa QAbstractItemView::textElideMode, QFontMetrics::elidedText(), AlignmentFlag QTabBar::elideMode
+*/
+
+/*!
+ \enum Qt::WindowModality
+
+ \keyword modal
+
+ This enum specifies the behavior of a modal window. A modal window
+ is one that blocks input to other windows. Note that windows that
+ are children of a modal window are not blocked.
+
+ The values are:
+ \value NonModal The window is not modal and does not block input to other windows.
+ \value WindowModal The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.
+ \value ApplicationModal The window is modal to the application and blocks input to all windows.
+
+ \sa QWidget::windowModality, QDialog
+*/
+
+/*!
+ \enum Qt::TextInteractionFlag
+
+ This enum specifies how a text displaying widget reacts to user input.
+
+ \value NoTextInteraction No interaction with the text is possible.
+ \value TextSelectableByMouse Text can be selected with the mouse and copied to the clipboard using
+ a context menu or standard keyboard shortcuts.
+ \value TextSelectableByKeyboard Text can be selected with the cursor keys on the keyboard. A text cursor is shown.
+ \value LinksAccessibleByMouse Links can be highlighted and activated with the mouse.
+ \value LinksAccessibleByKeyboard Links can be focused using tab and activated with enter.
+ \value TextEditable The text is fully editable.
+
+ \value TextEditorInteraction The default for a text editor.
+ \value TextBrowserInteraction The default for QTextBrowser.
+*/
+
+/*!
+ \enum Qt::MaskMode
+
+ This enum specifies the behavior of the
+ QPixmap::createMaskFromColor() and QImage::createMaskFromColor()
+ functions.
+
+ \value MaskInColor Creates a mask where all pixels matching the given color are opaque.
+ \value MaskOutColor Creates a mask where all pixels matching the given color are transparent.
+*/
+
+/*!
+ \enum Qt::DockWidgetAreaSizes
+ \internal
+*/
+
+/*!
+ \enum Qt::ToolBarAreaSizes
+ \internal
+*/
+
+/*!
+ \enum Qt::EventPriority
+
+ This enum can be used to specify event priorities.
+
+ \value HighEventPriority Events with this priority are sent before
+ events with NormalEventPriority or LowEventPriority.
+
+ \value NormalEventPriority Events with this priority are sent
+ after events with HighEventPriority, but before events with
+ LowEventPriority.
+
+ \value LowEventPriority Events with this priority are sent after
+ events with HighEventPriority or NormalEventPriority.
+
+ Note that these values are provided purely for convenience, since
+ event priorities can be any value between \c INT_MAX and \c
+ INT_MIN, inclusive. For example, you can define custom priorities
+ as being relative to each other:
+
+ \snippet doc/src/snippets/code/doc_src_qnamespace.qdoc 1
+
+ \sa QCoreApplication::postEvent()
+*/
+/*!
+ \enum Qt::SizeHint
+ \since 4.4
+
+ This enum is used by QGraphicsLayoutItem::sizeHint()
+
+ \value MinimumSize is used to specify the minimum size of a graphics layout item.
+ \value PreferredSize is used to specify the preferred size of a graphics layout item.
+ \value MaximumSize is used to specify the maximum size of a graphics layout item.
+ \value MinimumDescent is used to specify the minimum descent of a text string in a graphics layout item.
+ \omitvalue NSizeHints
+
+ \sa QGraphicsLayoutItem::sizeHint()
+*/
+
+/*!
+ \enum Qt::SizeMode
+ \since 4.4
+
+ This enum is used by QPainter::drawRoundedRect() and QPainterPath::addRoundedRect()
+ functions to specify the radii of rectangle corners with respect to the dimensions
+ of the bounding rectangles specified.
+
+ \value AbsoluteSize Specifies the size using absolute measurements.
+ \value RelativeSize Specifies the size relative to the bounding rectangle,
+ typically using percentage measurements.
+*/
+
+/*!
+ \enum Qt::WindowFrameSection
+ \since 4.4
+
+ This enum is used to describe parts of a window frame. It is returned by
+ QGraphicsWidget::windowFrameSectionAt() to describe what section of the window
+ frame is under the mouse.
+
+ \value NoSection
+ \value LeftSection
+ \value TopLeftSection
+ \value TopSection
+ \value TopRightSection
+ \value RightSection
+ \value BottomRightSection
+ \value BottomSection
+ \value BottomLeftSection
+ \value TitleBarArea
+
+ \sa QGraphicsWidget::windowFrameEvent()
+ \sa QGraphicsWidget::paintWindowFrame()
+ \sa QGraphicsWidget::windowFrameSectionAt()
+
+*/
diff --git a/doc/src/qpagesetupdialog.qdoc b/doc/src/qpagesetupdialog.qdoc
new file mode 100644
index 0000000..66e4b96
--- /dev/null
+++ b/doc/src/qpagesetupdialog.qdoc
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPageSetupDialog
+
+ \brief The QPageSetupDialog class provides a configuration dialog
+ for the page-related options on a printer.
+
+ On Windows and Mac OS X the page setup dialog is implemented using
+ the native page setup dialogs.
+
+ Note that on Windows and Mac OS X custom paper sizes won't be
+ reflected in the native page setup dialogs. Additionally, custom
+ page margins set on a QPrinter won't show in the native Mac OS X
+ page setup dialog.
+
+ \sa QPrinter, QPrintDialog
+*/
+
+
+/*!
+ \fn QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
+
+ Constructs a page setup dialog that configures \a printer with \a
+ parent as the parent widget.
+*/
+
+/*!
+ \since 4.5
+
+ \fn QPageSetupDialog::QPageSetupDialog(QWidget *parent)
+
+ Constructs a page setup dialog that configures a default-constructed
+ QPrinter with \a parent as the parent widget.
+
+ \sa printer()
+*/
+
+/*!
+ \fn QPrinter *QPageSetupDialog::printer()
+
+ Returns the printer that was passed to the QPageSetupDialog
+ constructor.
+*/
+
diff --git a/doc/src/qpaintdevice.qdoc b/doc/src/qpaintdevice.qdoc
new file mode 100644
index 0000000..be2f4bb
--- /dev/null
+++ b/doc/src/qpaintdevice.qdoc
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPaintDevice
+ \brief The QPaintDevice class is the base class of objects that
+ can be painted.
+
+ \ingroup multimedia
+
+ A paint device is an abstraction of a two-dimensional space that
+ can be drawn using a QPainter. Its default coordinate system has
+ its origin located at the top-left position. X increases to the
+ right and Y increases downwards. The unit is one pixel.
+
+ The drawing capabilities of QPaintDevice are currently implemented
+ by the QWidget, QImage, QPixmap, QGLPixelBuffer, QPicture, and
+ QPrinter subclasses.
+
+ To implement support for a new backend, you must derive from
+ QPaintDevice and reimplement the virtual paintEngine() function to
+ tell QPainter which paint engine should be used to draw on this
+ particular device. Note that you also must create a corresponding
+ paint engine to be able to draw on the device, i.e derive from
+ QPaintEngine and reimplement its virtual functions.
+
+ \warning Qt requires that a QApplication object exists before
+ any paint devices can be created. Paint devices access window
+ system resources, and these resources are not initialized before
+ an application object is created.
+
+ The QPaintDevice class provides several functions returning the
+ various device metrics: The depth() function returns its bit depth
+ (number of bit planes). The height() function returns its height
+ in default coordinate system units (e.g. pixels for QPixmap and
+ QWidget) while heightMM() returns the height of the device in
+ millimeters. Similiarily, the width() and widthMM() functions
+ return the width of the device in default coordinate system units
+ and in millimeters, respectively. Alternatively, the protected
+ metric() function can be used to retrieve the metric information
+ by specifying the desired PaintDeviceMetric as argument.
+
+ The logicalDpiX() and logicalDpiY() functions return the
+ horizontal and vertical resolution of the device in dots per
+ inch. The physicalDpiX() and physicalDpiY() functions also return
+ the resolution of the device in dots per inch, but note that if
+ the logical and vertical resolution differ, the corresponding
+ QPaintEngine must handle the mapping. Finally, the numColors()
+ function returns the number of different colors available for the
+ paint device.
+
+ \sa QPaintEngine, QPainter, {The Coordinate System}, {The Paint
+ System}
+*/
+
+/*!
+ \enum QPaintDevice::PaintDeviceMetric
+
+ Describes the various metrics of a paint device.
+
+ \value PdmWidth The width of the paint device in default
+ coordinate system units (e.g. pixels for QPixmap and QWidget). See
+ also width().
+
+ \value PdmHeight The height of the paint device in default
+ coordinate system units (e.g. pixels for QPixmap and QWidget). See
+ also height().
+
+ \value PdmWidthMM The width of the paint device in millimeters. See
+ also widthMM().
+
+ \value PdmHeightMM The height of the paint device in millimeters. See
+ also heightMM().
+
+ \value PdmNumColors The number of different colors available for
+ the paint device. See also numColors().
+
+ \value PdmDepth The bit depth (number of bit planes) of the paint
+ device. See also depth().
+
+ \value PdmDpiX The horizontal resolution of the device in dots per
+ inch. See also logicalDpiX().
+
+ \value PdmDpiY The vertical resolution of the device in dots per inch. See
+ also logicalDpiY().
+
+ \value PdmPhysicalDpiX The horizontal resolution of the device in
+ dots per inch. See also physicalDpiX().
+
+ \value PdmPhysicalDpiY The vertical resolution of the device in
+ dots per inch. See also physicalDpiY().
+
+ \sa metric()
+*/
+
+/*!
+ \fn QPaintDevice::QPaintDevice()
+
+ Constructs a paint device. This constructor can be invoked only from
+ subclasses of QPaintDevice.
+*/
+
+/*!
+ \fn QPaintDevice::~QPaintDevice()
+
+ Destroys the paint device and frees window system resources.
+*/
+
+/*!
+ \fn int QPaintDevice::devType() const
+
+ \internal
+
+ Returns the device type identifier, which is QInternal::Widget
+ if the device is a QWidget, QInternal::Pixmap if it's a
+ QPixmap, QInternal::Printer if it's a QPrinter,
+ QInternal::Picture if it's a QPicture, or
+ QInternal::UnknownDevice in other cases.
+*/
+
+/*!
+ \fn bool QPaintDevice::paintingActive() const
+
+ Returns true if the device is currently being painted on, i.e. someone has
+ called QPainter::begin() but not yet called QPainter::end() for
+ this device; otherwise returns false.
+
+ \sa QPainter::isActive()
+*/
+
+/*!
+ \fn QPaintEngine *QPaintDevice::paintEngine() const
+
+ Returns a pointer to the paint engine used for drawing on the
+ device.
+*/
+
+/*!
+ \fn int QPaintDevice::metric(PaintDeviceMetric metric) const
+
+ Returns the metric information for the given paint device \a metric.
+
+ \sa PaintDeviceMetric
+*/
+
+/*!
+ \fn int QPaintDevice::width() const
+
+ Returns the width of the paint device in default coordinate system
+ units (e.g. pixels for QPixmap and QWidget).
+
+ \sa widthMM()
+*/
+
+/*!
+ \fn int QPaintDevice::height() const
+
+ Returns the height of the paint device in default coordinate
+ system units (e.g. pixels for QPixmap and QWidget).
+
+ \sa heightMM()
+*/
+
+/*!
+ \fn int QPaintDevice::widthMM() const
+
+ Returns the width of the paint device in millimeters. Due to platform
+ limitations it may not be possible to use this function to determine
+ the actual physical size of a widget on the screen.
+
+ \sa width()
+*/
+
+/*!
+ \fn int QPaintDevice::heightMM() const
+
+ Returns the height of the paint device in millimeters. Due to platform
+ limitations it may not be possible to use this function to determine
+ the actual physical size of a widget on the screen.
+
+ \sa height()
+*/
+
+/*!
+ \fn int QPaintDevice::numColors() const
+
+ Returns the number of different colors available for the paint
+ device. Since this value is an int, it will not be sufficient to represent
+ the number of colors on 32 bit displays, in this case INT_MAX is
+ returned instead.
+*/
+
+/*!
+ \fn int QPaintDevice::depth() const
+
+ Returns the bit depth (number of bit planes) of the paint device.
+*/
+
+/*!
+ \fn int QPaintDevice::logicalDpiX() const
+
+ Returns the horizontal resolution of the device in dots per inch,
+ which is used when computing font sizes. For X11, this is usually
+ the same as could be computed from widthMM().
+
+ Note that if the logicalDpiX() doesn't equal the physicalDpiX(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa logicalDpiY(), physicalDpiX()
+*/
+
+/*!
+ \fn int QPaintDevice::logicalDpiY() const
+
+ Returns the vertical resolution of the device in dots per inch,
+ which is used when computing font sizes. For X11, this is usually
+ the same as could be computed from heightMM().
+
+ Note that if the logicalDpiY() doesn't equal the physicalDpiY(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa logicalDpiX(), physicalDpiY()
+*/
+
+/*!
+ \fn int QPaintDevice::physicalDpiX() const
+
+ Returns the horizontal resolution of the device in dots per inch.
+ For example, when printing, this resolution refers to the physical
+ printer's resolution. The logical DPI on the other hand, refers to
+ the resolution used by the actual paint engine.
+
+ Note that if the physicalDpiX() doesn't equal the logicalDpiX(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa physicalDpiY(), logicalDpiX()
+*/
+
+/*!
+ \fn int QPaintDevice::physicalDpiY() const
+
+ Returns the horizontal resolution of the device in dots per inch.
+ For example, when printing, this resolution refers to the physical
+ printer's resolution. The logical DPI on the other hand, refers to
+ the resolution used by the actual paint engine.
+
+ Note that if the physicalDpiY() doesn't equal the logicalDpiY(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa physicalDpiX(), logicalDpiY()
+*/
diff --git a/doc/src/qpair.qdoc b/doc/src/qpair.qdoc
new file mode 100644
index 0000000..c31b7eb
--- /dev/null
+++ b/doc/src/qpair.qdoc
@@ -0,0 +1,229 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPair
+ \brief The QPair class is a template class that stores a pair of items.
+
+ \ingroup tools
+
+ QPair\<T1, T2\> can be used in your application if the STL \c
+ pair type is not available. It stores one value of type T1 and
+ one value of type T2. It can be used as a return value for a
+ function that needs to return two values, or as the value type of
+ a \l{generic container}.
+
+ Here's an example of a QPair that stores one QString and one \c
+ double value:
+
+ \snippet doc/src/snippets/code/doc_src_qpair.qdoc 0
+
+ The components are accessible as public data members called \l
+ first and \l second. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qpair.qdoc 1
+
+ QPair's template data types (T1 and T2) must be \l{assignable
+ data types}. You cannot, for example, store a QWidget as a value;
+ instead, store a QWidget *. A few functions have additional
+ requirements; these requirements are documented on a per-function
+ basis.
+
+ \sa {Generic Containers}
+*/
+
+/*! \typedef QPair::first_type
+
+ The type of the first element in the pair (T1).
+
+ \sa first
+*/
+
+/*! \typedef QPair::second_type
+
+ The type of the second element in the pair (T2).
+
+ \sa second
+*/
+
+/*! \variable QPair::first
+
+ The first element in the pair.
+*/
+
+/*! \variable QPair::second
+
+ The second element in the pair.
+*/
+
+/*! \fn QPair::QPair()
+
+ Constructs an empty pair. The \c first and \c second elements are
+ initialized with \l{default-constructed values}.
+*/
+
+/*!
+ \fn QPair::QPair(const T1 &value1, const T2 &value2)
+
+ Constructs a pair and initializes the \c first element with \a
+ value1 and the \c second element with \a value2.
+
+ \sa qMakePair()
+*/
+
+/*!
+ \fn QPair<T1, T2> &QPair::operator=(const QPair<T1, T2> &other)
+
+ Assigns \a other to this pair.
+*/
+
+/*! \fn bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is equal to \a p2; otherwise returns false.
+ Two pairs compare equal if their \c first data members compare
+ equal and if their \c second data members compare equal.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator==().
+*/
+
+/*! \fn bool operator!=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is not equal to \a p2; otherwise returns
+ false. Two pairs compare as not equal if their \c first data
+ members are not equal or if their \c second data members are not
+ equal.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator==().
+*/
+
+/*! \fn bool operator<(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is less than \a p2; otherwise returns
+ false. The comparison is done on the \c first members of \a p1
+ and \a p2; if they compare equal, the \c second members are
+ compared to break the tie.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator<().
+*/
+
+/*! \fn bool operator>(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is greater than \a p2; otherwise returns
+ false. The comparison is done on the \c first members of \a p1
+ and \a p2; if they compare equal, the \c second members are
+ compared to break the tie.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator<().
+*/
+
+/*! \fn bool operator<=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is less than or equal to \a p2; otherwise
+ returns false. The comparison is done on the \c first members of
+ \a p1 and \a p2; if they compare equal, the \c second members are
+ compared to break the tie.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator<().
+*/
+
+/*! \fn bool operator>=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+
+ \relates QPair
+
+ Returns true if \a p1 is greater than or equal to \a p2;
+ otherwise returns false. The comparison is done on the \c first
+ members of \a p1 and \a p2; if they compare equal, the \c second
+ members are compared to break the tie.
+
+ This function requires the T1 and T2 types to have an
+ implementation of \c operator<().
+*/
+
+/*!
+ \fn QPair<T1, T2> qMakePair(const T1 &value1, const T2 &value2)
+
+ \relates QPair
+
+ Returns a QPair\<T1, T2\> that contains \a value1 and \a value2.
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qpair.qdoc 2
+
+ This is equivalent to QPair<T1, T2>(\a value1, \a value2), but
+ usually requires less typing.
+*/
+
+/*! \fn QDataStream &operator>>(QDataStream &in, QPair<T1, T2> &pair)
+
+ \relates QPair
+
+ Reads a pair from stream \a in into \a pair.
+
+ This function requires the T1 and T2 types to implement \c operator>>().
+
+ \sa {Format of the QDataStream operators}
+*/
+
+/*! \fn QDataStream &operator<<(QDataStream &out, const QPair<T1, T2> &pair)
+
+ \relates QPair
+
+ Writes the pair \a pair to stream \a out.
+
+ This function requires the T1 and T2 types to implement \c operator<<().
+
+ \sa {Format of the QDataStream operators}
+*/
diff --git a/doc/src/qpatternistdummy.cpp b/doc/src/qpatternistdummy.cpp
new file mode 100644
index 0000000..8bedecb
--- /dev/null
+++ b/doc/src/qpatternistdummy.cpp
@@ -0,0 +1,1010 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+
+ This file exists only to make internal all the classes you see
+ below. they are all in the QPatternist namespace, but they don't
+ have qdoc documentation because they are all declared in xxx_p.h files. Without these \internal declarations, the class names
+ appear on the Inheritance Hierarchy page, which is bad because
+ clicking on them brings up the "File not found" page.
+ */
+
+#include "qitem_p.h"
+#include "qbuiltintypes_p.h"
+#include "qitem_p.h"
+#include "qschematypefactory_p.h"
+#include "qxmlname.h"
+#include "qatomictype_p.h"
+
+QT_BEGIN_NAMESPACE
+
+using namespace QPatternist;
+
+/*!
+ \class AtomicCaster
+ \internal
+ */
+
+/*!
+ \class AtomicComparator
+ \internal
+ */
+
+/*!
+ \class AtomicMathematician
+ \internal
+ */
+
+/*!
+ \class AtomicValue
+ \internal
+ */
+
+/*!
+ \class AbstractDateTime
+ \internal
+ */
+
+/*!
+ \class AbstractDuration
+ \internal
+ */
+
+/*!
+ \class AbstractFloatComparator
+ \internal
+ */
+
+/*!
+ \class AtomicString
+ \internal
+ */
+
+/*!
+ \class Base64Binary
+ \internal
+ */
+
+/*!
+ \class FunctionCall
+ \internal
+ */
+
+/*!
+ \class AddingAggregate
+ \internal
+ */
+
+/*!
+ \class AdjustTimezone
+ \internal
+ */
+
+/*!
+ \class Aggregator
+ \internal
+ */
+
+/*!
+ \class ComparesCaseAware
+ \internal
+ */
+
+/*!
+ \class EncodeString
+ \internal
+ */
+
+/*!
+ \class ExtractFromDateTimeFN
+ \internal
+ */
+
+/*!
+ \class ExtractFromDurationFN
+ \internal
+ */
+
+/*!
+ \class FunctionFactory
+ \internal
+ */
+
+/*!
+ \class Numeric
+ \internal
+ */
+
+/*!
+ \class ReportContext
+ \internal
+ */
+
+/*!
+ \class AbstractFunctionFactory
+ \internal
+ */
+
+/*!
+ \class DynamicContext
+ \internal
+ */
+
+/*!
+ \class IdFN
+ \internal
+ */
+
+/*!
+ \class IntegerType
+ \internal
+ */
+
+/*!
+ \class NamespaceResolver
+ \internal
+ */
+
+/*!
+ \class PatternPlatform
+ \internal
+ */
+
+/*! \class DocumentProjector
+ \internal */
+/*! \class NodeBuilder
+ \internal */
+/*! \class AccelTreeBuilder
+ \internal */
+/*! \class OutputValidator
+ \internal */
+/*! \class NetworkLoop
+ \internal */
+/*! \class QIODeviceDelegate
+ \internal */
+/*! \class URILoader
+ \internal */
+/*! \class AbsFN
+ \internal */
+/*! \class AbstractDateTimeComparator
+ \internal */
+/*! \class AbstractDateTimeMathematician
+ \internal */
+/*! \class AbstractDateTimeToDateCaster
+ \internal */
+/*! \class AbstractDateTimeToDateTimeCaster
+ \internal */
+/*! \class AbstractDateTimeToGDayCaster
+ \internal */
+/*! \class AbstractDateTimeToGMonthCaster
+ \internal */
+/*! \class AbstractDateTimeToGMonthDayCaster
+ \internal */
+/*! \class AbstractDateTimeToGYearCaster
+ \internal */
+/*! \class AbstractDateTimeToGYearMonthCaster
+ \internal */
+/*! \class AbstractDateTimeToTimeCaster
+ \internal */
+/*! \class AbstractDurationComparator
+ \internal */
+/*! \class AbstractDurationToDayTimeDurationCaster
+ \internal */
+/*! \class AbstractDurationToDurationCaster
+ \internal */
+/*! \class AbstractDurationToYearMonthDurationCaster
+ \internal */
+/*! \class AbstractFloat
+ \internal */
+/*! \class AbstractFloatMathematician
+ \internal */
+/*! \class AbstractFloatSortComparator
+ \internal */
+/*! \class ConstructorFunctionsFactory
+ \internal */
+/*! \class XPath10CoreFunctions
+ \internal */
+/*! \class XPath20CoreFunctions
+ \internal */
+/*! \class AdjustDateTimeToTimezoneFN
+ \internal */
+/*! \class AdjustDateToTimezoneFN
+ \internal */
+/*! \class AdjustTimeToTimezoneFN
+ \internal */
+/*! \class AnyToDerivedStringCaster
+ \internal */
+/*! \class AnyURI
+ \internal */
+/*! \class Atomizer
+ \internal */
+/*! \class AvgFN
+ \internal */
+/*! \class Base64BinaryComparatorLocator
+ \internal */
+/*! \class Base64BinaryToHexBinaryCaster
+ \internal */
+/*! \class Base64BinaryType
+ \internal */
+/*! \class BaseURIFN
+ \internal */
+/*! \class BinaryDataComparator
+ \internal */
+/*! \class Boolean
+ \internal */
+/*! \class BooleanComparator
+ \internal */
+/*! \class BooleanComparatorLocator
+ \internal */
+/*! \class BooleanFN
+ \internal */
+/*! \class BooleanToAbstractFloatCaster
+ \internal */
+/*! \class BooleanToDecimalCaster
+ \internal */
+/*! \class BooleanToDerivedIntegerCaster
+ \internal */
+/*! \class BooleanToIntegerCaster
+ \internal */
+/*! \class BooleanType
+ \internal */
+/*! \class BuiltinNodeType
+ \internal */
+/*! \class CardinalityVerifier
+ \internal */
+/*! \class CaseInsensitiveStringComparator
+ \internal */
+/*! \class CeilingFN
+ \internal */
+/*! \class CodepointEqualFN
+ \internal */
+/*! \class CodepointsToStringFN
+ \internal */
+/*! \class CollectionFN
+ \internal */
+/*! \class CompareFN
+ \internal */
+/*! \class ComparingAggregator
+ \internal */
+/*! \class ConcatFN
+ \internal */
+/*! \class ContainsFN
+ \internal */
+/*! \class CountFN
+ \internal */
+/*! \class CurrentDateFN
+ \internal */
+/*! \class CurrentDateTimeFN
+ \internal */
+/*! \class CurrentTimeFN
+ \internal */
+/*! \class Date
+ \internal */
+/*! \class DateComparatorLocator
+ \internal */
+/*! \class DateMathematicianLocator
+ \internal */
+/*! \class DateTime
+ \internal */
+/*! \class DateTimeComparatorLocator
+ \internal */
+/*! \class DateTimeDurationMathematician
+ \internal */
+/*! \class DateTimeFN
+ \internal */
+/*! \class DateTimeMathematicianLocator
+ \internal */
+/*! \class DateTimeType
+ \internal */
+/*! \class DateType
+ \internal */
+/*! \class DayFromAbstractDateTimeFN
+ \internal */
+/*! \class DayTimeDuration
+ \internal */
+/*! \class DayTimeDurationComparatorLocator
+ \internal */
+/*! \class DayTimeDurationMathematicianLocator
+ \internal */
+/*! \class DayTimeDurationType
+ \internal */
+/*! \class DaysFromDurationFN
+ \internal */
+/*! \class Decimal
+ \internal */
+/*! \class DecimalComparator
+ \internal */
+/*! \class DecimalComparatorLocator
+ \internal */
+/*! \class DecimalMathematician
+ \internal */
+/*! \class DecimalMathematicianLocator
+ \internal */
+/*! \class DecimalType
+ \internal */
+/*! \class DeduplicateIterator
+ \internal */
+/*! \class DeepEqualFN
+ \internal */
+/*! \class DefaultCollationFN
+ \internal */
+/*! \class DerivedInteger
+ \internal */
+/*! \class DerivedString
+ \internal */
+/*! \class DistinctValuesFN
+ \internal */
+/*! \class DocAvailableFN
+ \internal */
+/*! \class DocFN
+ \internal */
+/*! \class DocumentURIFN
+ \internal */
+/*! \class DoubleComparatorLocator
+ \internal */
+/*! \class DoubleMathematicianLocator
+ \internal */
+/*! \class DoubleType
+ \internal */
+/*! \class Duration
+ \internal */
+/*! \class DurationComparatorLocator
+ \internal */
+/*! \class DurationDurationDivisor
+ \internal */
+/*! \class DurationDurationMathematician
+ \internal */
+/*! \class DurationNumericMathematician
+ \internal */
+/*! \class DurationType
+ \internal */
+/*! \class DelegatingDynamicContext
+ \internal */
+/*! \class Focus
+ \internal */
+/*! \class ReceiverDynamicContext
+ \internal */
+/*! \class EmptyIterator
+ \internal */
+/*! \class EncodeForURIFN
+ \internal */
+/*! \class EndsWithFN
+ \internal */
+/*! \class ErrorFN
+ \internal */
+/*! \class EscapeHtmlURIFN
+ \internal */
+/*! \class EvaluationCache
+ \internal */
+/*! \class Existence
+ \internal */
+/*! \class ExpressionVisitor
+ \internal */
+/*! \class ExpressionVisitorResult
+ \internal */
+/*! \class FalseFN
+ \internal */
+/*! \class FloatComparatorLocator
+ \internal */
+/*! \class FloatMathematicianLocator
+ \internal */
+/*! \class FloatType
+ \internal */
+/*! \class FloorFN
+ \internal */
+/*! \class FunctionArgument
+ \internal */
+/*! \class FunctionAvailableFN
+ \internal */
+/*! \class FunctionFactoryCollection
+ \internal */
+/*! \class FunctionSignature
+ \internal */
+/*! \class GDay
+ \internal */
+/*! \class GDayComparatorLocator
+ \internal */
+/*! \class GDayType
+ \internal */
+/*! \class GMonth
+ \internal */
+/*! \class GMonthComparatorLocator
+ \internal */
+/*! \class GMonthDay
+ \internal */
+/*! \class GMonthDayComparatorLocator
+ \internal */
+/*! \class GMonthDayType
+ \internal */
+/*! \class GMonthType
+ \internal */
+/*! \class GYear
+ \internal */
+/*! \class GYearComparatorLocator
+ \internal */
+/*! \class GYearMonth
+ \internal */
+/*! \class GYearMonthComparatorLocator
+ \internal */
+/*! \class GYearMonthType
+ \internal */
+/*! \class GYearType
+ \internal */
+/*! \class HexBinary
+ \internal */
+/*! \class HexBinaryComparatorLocator
+ \internal */
+/*! \class HexBinaryToBase64BinaryCaster
+ \internal */
+/*! \class HexBinaryType
+ \internal */
+/*! \class HoursFromAbstractDateTimeFN
+ \internal */
+/*! \class HoursFromDurationFN
+ \internal */
+/*! \class IdrefFN
+ \internal */
+/*! \class ImplicitTimezoneFN
+ \internal */
+/*! \class InScopePrefixesFN
+ \internal */
+/*! \class IndexOfFN
+ \internal */
+/*! \class InsertBeforeFN
+ \internal */
+/*! \class Integer
+ \internal */
+/*! \class IntegerComparator
+ \internal */
+/*! \class IntegerComparatorLocator
+ \internal */
+/*! \class IntegerMathematician
+ \internal */
+/*! \class IntegerMathematicianLocator
+ \internal */
+/*! \class DerivedIntegerType
+ \internal */
+/*! \class IriToURIFN
+ \internal */
+/*! \class ItemMappingIterator
+ \internal */
+/*! \class ItemVerifier
+ \internal */
+/*! \class LangFN
+ \internal */
+/*! \class LastFN
+ \internal */
+/*! \class LocalNameFN
+ \internal */
+/*! \class LocalNameFromQNameFN
+ \internal */
+/*! \class LowerCaseFN
+ \internal */
+/*! \class MinutesFromAbstractDateTimeFN
+ \internal */
+/*! \class MinutesFromDurationFN
+ \internal */
+/*! \class MonthFromAbstractDateTimeFN
+ \internal */
+/*! \class MonthsFromDurationFN
+ \internal */
+/*! \class NOTATIONType
+ \internal */
+/*! \class NameFN
+ \internal */
+/*! \class NamePool
+ \internal */
+/*! \class DelegatingNamespaceResolver
+ \internal */
+/*! \class GenericNamespaceResolver
+ \internal */
+/*! \class NodeNamespaceResolver
+ \internal */
+/*! \class NamespaceURIFN
+ \internal */
+/*! \class NamespaceURIForPrefixFN
+ \internal */
+/*! \class NamespaceURIFromQNameFN
+ \internal */
+/*! \class NilledFN
+ \internal */
+/*! \class NodeNameFN
+ \internal */
+/*! \class NormalizeSpaceFN
+ \internal */
+/*! \class NormalizeUnicodeFN
+ \internal */
+/*! \class NotFN
+ \internal */
+/*! \class NumberFN
+ \internal */
+/*! \class NumericToAbstractFloatCaster
+ \internal */
+/*! \class NumericToBooleanCaster
+ \internal */
+/*! \class NumericToDecimalCaster
+ \internal */
+/*! \class NumericToDerivedIntegerCaster
+ \internal */
+/*! \class OperandSwitcherMathematician
+ \internal */
+/*! \class ParserContext
+ \internal */
+/*! \class MatchesFN
+ \internal */
+/*! \class ReplaceFN
+ \internal */
+/*! \class TokenizeFN
+ \internal */
+/*! \class PositionFN
+ \internal */
+/*! \class PrefixFromQNameFN
+ \internal */
+/*! \class AccelTree
+ \internal */
+/*! \class QNameComparator
+ \internal */
+/*! \class QNameComparatorLocator
+ \internal */
+/*! \class QNameFN
+ \internal */
+/*! \class QNameType
+ \internal */
+/*! \class QNameValue
+ \internal */
+/*! \class RemoveFN
+ \internal */
+/*! \class ResolveQNameFN
+ \internal */
+/*! \class ResolveURIFN
+ \internal */
+/*! \class ResourceLoader
+ \internal */
+/*! \class AccelTreeResourceLoader
+ \internal */
+/*! \class ReverseFN
+ \internal */
+/*! \class RootFN
+ \internal */
+/*! \class RoundFN
+ \internal */
+/*! \class RoundHalfToEvenFN
+ \internal */
+/*! \class SchemaTime
+ \internal */
+/*! \class SchemaTimeComparatorLocator
+ \internal */
+/*! \class SchemaTimeMathematicianLocator
+ \internal */
+/*! \class SchemaTimeType
+ \internal */
+/*! \class SecondsFromAbstractDateTimeFN
+ \internal */
+/*! \class SecondsFromDurationFN
+ \internal */
+/*! \class SelfToSelfCaster
+ \internal */
+/*! \class SequenceMappingIterator
+ \internal */
+/*! \class SingletonIterator
+ \internal */
+/*! \class SortTuple
+ \internal */
+/*! \class StartsWithFN
+ \internal */
+/*! \class StaticBaseURIFN
+ \internal */
+/*! \class StaticContext
+ \internal */
+/*! \class DelegatingStaticContext
+ \internal */
+/*! \class StaticFocusContext
+ \internal */
+/*! \class StaticNamespaceContext
+ \internal */
+/*! \class GenericStaticContext
+ \internal */
+/*! \class StringComparator
+ \internal */
+/*! \class StringComparatorLocator
+ \internal */
+/*! \class StringFN
+ \internal */
+/*! \class StringJoinFN
+ \internal */
+/*! \class StringLengthFN
+ \internal */
+/*! \class StringToAbstractFloatCaster
+ \internal */
+/*! \class StringToBase64BinaryCaster
+ \internal */
+/*! \class StringToBooleanCaster
+ \internal */
+/*! \class StringToCodepointsFN
+ \internal */
+/*! \class StringToDateCaster
+ \internal */
+/*! \class StringToDateTimeCaster
+ \internal */
+/*! \class StringToDayTimeDurationCaster
+ \internal */
+/*! \class StringToDecimalCaster
+ \internal */
+/*! \class StringToDerivedIntegerCaster
+ \internal */
+/*! \class StringToDurationCaster
+ \internal */
+/*! \class StringToGDayCaster
+ \internal */
+/*! \class StringToGMonthCaster
+ \internal */
+/*! \class StringToGMonthDayCaster
+ \internal */
+/*! \class StringToGYearCaster
+ \internal */
+/*! \class StringToGYearMonthCaster
+ \internal */
+/*! \class StringToHexBinaryCaster
+ \internal */
+/*! \class StringToIntegerCaster
+ \internal */
+/*! \class StringToTimeCaster
+ \internal */
+/*! \class StringToYearMonthDurationCaster
+ \internal */
+/*! \class StringType
+ \internal */
+/*! \class DerivedStringType
+ \internal */
+/*! \class SubsequenceFN
+ \internal */
+/*! \class SubstringAfterFN
+ \internal */
+/*! \class SubstringBeforeFN
+ \internal */
+/*! \class SubstringFN
+ \internal */
+/*! \class SumFN
+ \internal */
+/*! \class SystemPropertyFN
+ \internal */
+/*! \class TimezoneFromAbstractDateTimeFN
+ \internal */
+/*! \class ToAnyURICaster
+ \internal */
+/*! \class ToAnyURICasterLocator
+ \internal */
+/*! \class ToBase64BinaryCasterLocator
+ \internal */
+/*! \class ToBooleanCasterLocator
+ \internal */
+/*! \class ToDateCasterLocator
+ \internal */
+/*! \class ToDateTimeCasterLocator
+ \internal */
+/*! \class ToDayTimeDurationCasterLocator
+ \internal */
+/*! \class ToDecimalCasterLocator
+ \internal */
+/*! \class ToDoubleCasterLocator
+ \internal */
+/*! \class ToDurationCasterLocator
+ \internal */
+/*! \class ToFloatCasterLocator
+ \internal */
+/*! \class ToGDayCasterLocator
+ \internal */
+/*! \class ToGMonthCasterLocator
+ \internal */
+/*! \class ToGMonthDayCasterLocator
+ \internal */
+/*! \class ToGYearCasterLocator
+ \internal */
+/*! \class ToGYearMonthCasterLocator
+ \internal */
+/*! \class ToHexBinaryCasterLocator
+ \internal */
+/*! \class ToIntegerCasterLocator
+ \internal */
+/*! \class ToDerivedIntegerCasterLocator
+ \internal */
+/*! \class ToQNameCasterLocator
+ \internal */
+/*! \class ToSchemaTimeCasterLocator
+ \internal */
+/*! \class ToStringCaster
+ \internal */
+/*! \class ToStringCasterLocator
+ \internal */
+/*! \class ToDerivedStringCasterLocator
+ \internal */
+/*! \class ToUntypedAtomicCaster
+ \internal */
+/*! \class ToUntypedAtomicCasterLocator
+ \internal */
+/*! \class ToYearMonthDurationCasterLocator
+ \internal */
+/*! \class Tokenizer
+ \internal */
+/*! \class XQueryTokenizer
+ \internal */
+/*! \class TraceFN
+ \internal */
+/*! \class TranslateFN
+ \internal */
+/*! \class TrueFN
+ \internal */
+/*! \class UntypedAtomic
+ \internal */
+/*! \class UntypedAtomicConverter
+ \internal */
+/*! \class ArgumentConverter
+ \internal */
+/*! \class UntypedAtomicType
+ \internal */
+/*! \class UpperCaseFN
+ \internal */
+/*! \class ValidationError
+ \internal */
+/*! \class VariableDeclaration
+ \internal */
+/*! \class VariableLoader
+ \internal */
+/*! \class YearFromAbstractDateTimeFN
+ \internal */
+/*! \class YearMonthDuration
+ \internal */
+/*! \class YearMonthDurationComparatorLocator
+ \internal */
+/*! \class YearMonthDurationMathematicianLocator
+ \internal */
+/*! \class YearMonthDurationType
+ \internal */
+/*! \class YearsFromDurationFN
+ \internal
+ */
+/*! \class DocumentContentValidator
+ \internal */
+/*! \class AtomicTypeVisitor
+ \internal */
+/*! \class AtomicCasterLocator
+ \internal */
+/*! \class AtomicTypeVisitorResult
+ \internal */
+/*! \class Expression
+ \internal */
+/*! \class EmptyContainer
+ \internal */
+/*! \class AxisStep
+ \internal */
+/*! \class ContextItem
+ \internal */
+/*! \class EmptySequence
+ \internal */
+/*! \class ExternalVariableReference
+ \internal */
+/*! \class Literal
+ \internal */
+/*! \class LiteralSequence
+ \internal */
+/*! \class NamespaceConstructor
+ \internal */
+/*! \class ParentNodeAxis
+ \internal */
+/*! \class VariableReference
+ \internal */
+/*! \class ArgumentReference
+ \internal */
+/*! \class ExpressionVariableReference
+ \internal */
+/*! \class PositionalVariableReference
+ \internal */
+/*! \class RangeVariableReference
+ \internal */
+/*! \class PairContainer
+ \internal */
+/*! \class AndExpression
+ \internal */
+/*! \class OrExpression
+ \internal */
+/*! \class ArithmeticExpression
+ \internal */
+/*! \class UnaryExpression
+ \internal */
+/*! \class AttributeConstructor
+ \internal */
+/*! \class CombineNodes
+ \internal */
+/*! \class ElementConstructor
+ \internal */
+/*! \class ForClause
+ \internal */
+/*! \class GeneralComparison
+ \internal */
+/*! \class GenericPredicate
+ \internal */
+/*! \class TruthPredicate
+ \internal */
+/*! \class LetClause
+ \internal */
+/*! \class NodeComparison
+ \internal */
+/*! \class Path
+ \internal */
+/*! \class ProcessingInstructionConstructor
+ \internal */
+/*! \class QuantifiedExpression
+ \internal */
+/*! \class RangeExpression
+ \internal */
+/*! \class ValueComparison
+ \internal */
+/*! \class SingleContainer
+ \internal */
+/*! \class AttributeNameValidator
+ \internal */
+/*! \class CastAs
+ \internal */
+/*! \class CastableAs
+ \internal */
+/*! \class CollationChecker
+ \internal */
+/*! \class CommentConstructor
+ \internal */
+/*! \class CopyOf
+ \internal */
+/*! \class DocumentConstructor
+ \internal */
+/*! \class DynamicContextStore
+ \internal */
+/*! \class FirstItemPredicate
+ \internal */
+/*! \class InstanceOf
+ \internal */
+/*! \class NCNameConstructor
+ \internal */
+/*! \class NodeSortExpression
+ \internal */
+/*! \class OrderBy
+ \internal */
+/*! \class QNameConstructor
+ \internal */
+/*! \class SimpleContentConstructor
+ \internal */
+/*! \class TextNodeConstructor
+ \internal */
+/*! \class TreatAs
+ \internal */
+/*! \class TripleContainer
+ \internal */
+/*! \class IfThenClause
+ \internal */
+/*! \class UnlimitedContainer
+ \internal */
+/*! \class ExpressionSequence
+ \internal */
+/*! \class ReturnOrderBy
+ \internal */
+/*! \class UserFunctionCallsite
+ \internal */
+/*! \class ExpressionCreator
+ \internal */
+/*! \class ByIDCreator
+ \internal */
+/*! \class ExpressionFactory
+ \internal */
+/*! \class ExpressionIdentifier
+ \internal */
+/*! \class BooleanIdentifier
+ \internal */
+/*! \class ByIDIdentifier
+ \internal */
+/*! \class BySequenceTypeIdentifier
+ \internal */
+/*! \class ComparisonIdentifier
+ \internal */
+/*! \class IntegerIdentifier
+ \internal */
+/*! \class ExternalVariableLoader
+ \internal */
+/*! \class ItemType
+ \internal */
+/*! \class AnyItemType
+ \internal */
+/*! \class AnyNodeType
+ \internal */
+/*! \class AbstractNodeTest
+ \internal */
+/*! \class LocalNameTest
+ \internal */
+/*! \class NamespaceNameTest
+ \internal */
+/*! \class QNameTest
+ \internal */
+/*! \class AtomicType
+ \internal */
+/*! \class BuiltinAtomicType
+ \internal */
+/*! \class AnyAtomicType
+ \internal */
+/*! \class AnyURIType
+ \internal */
+/*! \class NumericType
+ \internal */
+/*! \class EBVType
+ \internal */
+/*! \class EmptySequenceType
+ \internal */
+/*! \class MultiItemType
+ \internal */
+/*! \class NoneType
+ \internal */
+/*! \class OptimizationPass
+ \internal */
+/*! \class ParameterizedAtomicTypeVisitor
+ \internal */
+/*! \class AtomicComparatorLocator
+ \internal */
+/*! \class AtomicMathematicianLocator
+ \internal */
+/*! \class SchemaComponent
+ \internal */
+/*! \class SchemaType
+ \internal */
+/*! \class AnyType
+ \internal */
+/*! \class AnySimpleType
+ \internal */
+/*! \class Untyped
+ \internal */
+/*! \class SchemaTypeFactory
+ \internal */
+/*! \class BasicTypesFactory
+ \internal */
+/*! \class SequenceType
+ \internal */
+/*! \class GenericSequenceType
+ \internal */
+/*! \class UserFunction
+ \internal
+*/
+QT_END_NAMESPACE
diff --git a/doc/src/qplugin.qdoc b/doc/src/qplugin.qdoc
new file mode 100644
index 0000000..7a93394
--- /dev/null
+++ b/doc/src/qplugin.qdoc
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \headerfile <QtPlugin>
+ \title Macros for Defining Plugins
+
+ \brief The <QtPlugin> header files defines macros for defining plugins.
+
+ \sa {How to Create Qt Plugins}
+*/
+
+/*!
+ \macro Q_DECLARE_INTERFACE(ClassName, Identifier)
+ \relates <QtPlugin>
+
+ This macro associates the given \a Identifier (a string literal)
+ to the interface class called \a ClassName. The \a Identifier must
+ be unique. For example:
+
+ \snippet examples/tools/plugandpaint/interfaces.h 3
+
+ This macro is normally used right after the class definition for
+ \a ClassName, in a header file. See the
+ \l{tools/plugandpaint}{Plug & Paint} example for details.
+
+ If you want to use Q_DECLARE_INTERFACE with interface classes
+ declared in a namespace then you have to make sure the Q_DECLARE_INTERFACE
+ is not inside a namespace though. For example:
+ \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 0
+
+ \sa Q_INTERFACES(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
+*/
+
+/*!
+ \macro Q_EXPORT_PLUGIN(ClassName)
+ \relates <QtPlugin>
+ \obsolete
+
+ Use Q_EXPORT_PLUGIN2() instead. This macro is equivalent to
+ Q_EXPORT_PLUGIN2(\a ClassName, \a ClassName).
+*/
+
+/*!
+ \macro Q_EXPORT_PLUGIN2(PluginName, ClassName)
+ \relates <QtPlugin>
+ \since 4.1
+ \keyword Q_EXPORT_PLUGIN2
+
+ This macro exports the plugin class \a ClassName for the plugin specified
+ by \a PluginName. The value of \a PluginName should correspond to the
+ \l{qmake Variable Reference#TARGET}{TARGET} specified in the plugin's
+ project file.
+
+ There should be exactly one occurrence of this macro in the source code
+ for a Qt plugin, and it should be used where the implementation is written
+ rather than in a header file.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 1
+
+ See the \l{tools/plugandpaint}{Plug & Paint} example for details.
+
+ \sa Q_DECLARE_INTERFACE(), {How to Create Qt Plugins}
+*/
+
+/*!
+ \macro Q_IMPORT_PLUGIN(PluginName)
+ \relates <QtPlugin>
+
+ This macro imports the plugin named \a PluginName, corresponding
+ to the \l{qmake Variable Reference#TARGET}{TARGET} specified in the
+ plugin's project file.
+
+ Inserting this macro into your application's source code will allow
+ you to make use of a static plugin.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 2
+
+ Static plugins must also be included by the linker when your
+ application is built. For Qt's predefined plugins,
+ you can use the \c QTPLUGIN to add
+ the required plugins to your build. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 3
+
+ \sa {Static Plugins}, {How to Create Qt Plugins}, {Using qmake}
+*/
+
+/*!
+ \macro Q_EXPORT_STATIC_PLUGIN(ClassName)
+ \relates <QtPlugin>
+ \internal
+*/
diff --git a/doc/src/qprintdialog.qdoc b/doc/src/qprintdialog.qdoc
new file mode 100644
index 0000000..6cac1c9
--- /dev/null
+++ b/doc/src/qprintdialog.qdoc
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \fn QPrinter *QPrintDialog::printer() const
+
+ Returns a pointer to the printer this dialog configures, or 0 if
+ this dialog does not operate on any printer.
+*/
+
+/*!
+ \fn void QPrintDialog::setPrinter(QPrinter *printer, bool pickupSettings)
+
+ Sets this dialog to configure printer \a printer, or no printer if \a printer
+ is null. If \a pickupSettings is true, the dialog reads most of
+ its settings from \a printer. If \a pickupSettings is false (the
+ default) the dialog keeps its old settings.
+*/
+
+/*!
+ \fn void QPrintDialog::addButton(QPushButton *button)
+
+ Adds the \a button to the layout of the print dialog. The added
+ buttons are arranged from the left to the right below the
+ last groupbox of the printdialog.
+*/
diff --git a/doc/src/qprinterinfo.qdoc b/doc/src/qprinterinfo.qdoc
new file mode 100644
index 0000000..ae900e0
--- /dev/null
+++ b/doc/src/qprinterinfo.qdoc
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPrinterInfo
+
+ \brief The QPrinterInfo class gives access to information about
+ existing printers.
+
+ Use the static functions to generate a list of QPrinterInfo
+ objects. Each QPrinterInfo object in the list represents a single
+ printer and can be queried for name, supported paper sizes, and
+ whether or not it is the default printer.
+
+ \since 4.4
+*/
+
+/*!
+ \fn QList<QPrinterInfo> QPrinterInfo::availablePrinters()
+
+ Returns a list of available printers on the system.
+*/
+
+/*!
+ \fn QPrinterInfo QPrinterInfo::defaultPrinter()
+
+ Returns the default printer on the system.
+
+ The return value should be checked using isNull() before being
+ used, in case there is no default printer.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo()
+
+ Constructs an empty QPrinterInfo object.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo(const QPrinterInfo& src)
+
+ Constructs a copy of \a src.
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo(const QPrinter& printer)
+
+ Constructs a QPrinterInfo object from \a printer.
+*/
+
+/*!
+ \fn QPrinterInfo::~QPrinterInfo()
+
+ Destroys the QPrinterInfo object. References to the values in the
+ object become invalid.
+*/
+
+/*!
+ \fn QPrinterInfo& QPrinterInfo::operator=(const QPrinterInfo& src)
+
+ Sets the QPrinterInfo object to be equal to \a src.
+*/
+
+/*!
+ \fn QString QPrinterInfo::printerName() const
+
+ Returns the name of the printer.
+
+ \sa QPrinter::setPrinterName()
+*/
+
+/*!
+ \fn bool QPrinterInfo::isNull() const
+
+ Returns whether this QPrinterInfo object holds a printer definition.
+
+ An empty QPrinterInfo object could result for example from calling
+ defaultPrinter() when there are no printers on the system.
+*/
+
+/*!
+ \fn bool QPrinterInfo::isDefault() const
+
+ Returns whether this printer is the default printer.
+*/
+
+/*!
+ \fn QList< QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
+ \since 4.4
+
+ Returns a list of supported paper sizes by the printer.
+
+ Not all printer drivers support this query, so the list may be empty.
+ On Mac OS X 10.3, this function always returns an empty list.
+*/
diff --git a/doc/src/qset.qdoc b/doc/src/qset.qdoc
new file mode 100644
index 0000000..9795123
--- /dev/null
+++ b/doc/src/qset.qdoc
@@ -0,0 +1,952 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QSet
+ \brief The QSet class is a template class that provides a hash-table-based set.
+
+ \ingroup tools
+ \ingroup shared
+ \reentrant
+ \mainclass
+
+ QSet<T> is one of Qt's generic \l{container classes}. It stores
+ values in an unspecified order and provides very fast lookup of
+ the values. Internally, QSet<T> is implemented as a QHash.
+
+ Here's an example QSet with QString values:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 0
+
+ To insert a value into the set, use insert():
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 1
+
+ Another way to insert items into the set is to use operator<<():
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 2
+
+ To test whether an item belongs to the set or not, use contains():
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 3
+
+ If you want to navigate through all the values stored in a QSet,
+ you can use an iterator. QSet supports both \l{Java-style
+ iterators} (QSetIterator and QMutableSetIterator) and \l{STL-style
+ iterators} (QSet::iterator and QSet::const_iterator). Here's how
+ to iterate over a QSet<QWidget *> using a Java-style iterator:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 4
+
+ Here's the same code, but using an STL-style iterator:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 5
+
+ QSet is unordered, so an iterator's sequence cannot be assumed to
+ be predictable. If ordering by key is required, use a QMap.
+
+ To navigate through a QSet, you can also use \l{foreach}:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 6
+
+ Items can be removed from the set using remove(). There is also a
+ clear() function that removes all items.
+
+ QSet's value data type must be an \l{assignable data type}. You
+ cannot, for example, store a QWidget as a value; instead, store a
+ QWidget *. In addition, the type must provide \c operator==(), and
+ there must also be a global qHash() function that returns a hash
+ value for an argument of the key's type. See the QHash
+ documentation for a list of types supported by qHash().
+
+ Internally, QSet uses a hash table to perform lookups. The hash
+ table automatically grows and shrinks to provide fast lookups
+ without wasting memory. You can still control the size of the hash
+ table by calling reserve(), if you already know approximately how
+ many elements the QSet will contain, but this isn't necessary to
+ obtain good performance. You can also call capacity() to retrieve
+ the hash table's size.
+
+ \sa QSetIterator, QMutableSetIterator, QHash, QMap
+*/
+
+/*!
+ \fn QSet::QSet()
+
+ Constructs an empty set.
+
+ \sa clear()
+*/
+
+/*!
+ \fn QSet::QSet(const QSet<T> &other)
+
+ Constructs a copy of \a other.
+
+ This operation occurs in \l{constant time}, because QSet is
+ \l{implicitly shared}. This makes returning a QSet from a
+ function very fast. If a shared instance is modified, it will be
+ copied (copy-on-write), and this takes \l{linear time}.
+
+ \sa operator=()
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator=(const QSet<T> &other)
+
+ Assigns the \a other set to this set and returns a reference to
+ this set.
+*/
+
+/*!
+ \fn bool QSet::operator==(const QSet<T> &other) const
+
+ Returns true if the \a other set is equal to this set; otherwise
+ returns false.
+
+ Two sets are considered equal if they contain the same elements.
+
+ This function requires the value type to implement \c operator==().
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QSet::operator!=(const QSet<T> &other) const
+
+ Returns true if the \a other set is not equal to this set; otherwise
+ returns false.
+
+ Two sets are considered equal if they contain the same elements.
+
+ This function requires the value type to implement \c operator==().
+
+ \sa operator==()
+*/
+
+/*!
+ \fn int QSet::size() const
+
+ Returns the number of items in the set.
+
+ \sa isEmpty(), count()
+*/
+
+/*!
+ \fn bool QSet::isEmpty() const
+
+ Returns true if the set contains no elements; otherwise returns
+ false.
+
+ \sa size()
+*/
+
+/*!
+ \fn int QSet::capacity() const
+
+ Returns the number of buckets in the set's internal hash
+ table.
+
+ The sole purpose of this function is to provide a means of fine
+ tuning QSet's memory usage. In general, you will rarely ever need
+ to call this function. If you want to know how many items are in
+ the set, call size().
+
+ \sa reserve(), squeeze()
+*/
+
+/*! \fn void QSet::reserve(int size)
+
+ Ensures that the set's internal hash table consists of at
+ least \a size buckets.
+
+ This function is useful for code that needs to build a huge set
+ and wants to avoid repeated reallocation. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 7
+
+ Ideally, \a size should be slightly more than the maximum number
+ of elements expected in the set. \a size doesn't have to be prime,
+ because QSet will use a prime number internally anyway. If \a size
+ is an underestimate, the worst that will happen is that the QSet
+ will be a bit slower.
+
+ In general, you will rarely ever need to call this function.
+ QSet's internal hash table automatically shrinks or grows to
+ provide good performance without wasting too much memory.
+
+ \sa squeeze(), capacity()
+*/
+
+/*!
+ \fn void QSet::squeeze()
+
+ Reduces the size of the set's internal hash table to save
+ memory.
+
+ The sole purpose of this function is to provide a means of fine
+ tuning QSet's memory usage. In general, you will rarely ever
+ need to call this function.
+
+ \sa reserve(), capacity()
+*/
+
+/*!
+ \fn void QSet::detach()
+
+ \internal
+
+ Detaches this set from any other sets with which it may share
+ data.
+
+ \sa isDetached()
+*/
+
+/*! \fn bool QSet::isDetached() const
+
+ \internal
+
+ Returns true if the set's internal data isn't shared with any
+ other set object; otherwise returns false.
+
+ \sa detach()
+*/
+
+/*!
+ \fn void QSet::setSharable(bool sharable)
+ \internal
+*/
+
+/*!
+ \fn void QSet::clear()
+
+ Removes all elements from the set.
+
+ \sa remove()
+*/
+
+/*!
+ \fn bool QSet::remove(const T &value)
+
+ Removes any occurrence of item \a value from the set. Returns
+ true if an item was actually removed; otherwise returns false.
+
+ \sa contains(), insert()
+*/
+
+/*!
+ \fn QSet::iterator QSet::erase(iterator pos)
+ \since 4.2
+
+ Removes the item at the iterator position \a pos from the set, and
+ returns an iterator positioned at the next item in the set.
+
+ Unlike remove(), this function never causes QSet to rehash its
+ internal data structure. This means that it can safely be called
+ while iterating, and won't affect the order of items in the set.
+
+ \sa remove(), find()
+*/
+
+/*! \fn QSet::const_iterator QSet::find(const T &value) const
+ \since 4.2
+
+ Returns a const iterator positioned at the item \a value in the
+ set. If the set contains no item \a value, the function returns
+ constEnd().
+
+ \sa constFind(), contains()
+*/
+
+/*! \fn QSet::iterator QSet::find(const T &value)
+ \since 4.2
+ \overload
+
+ Returns a non-const iterator positioned at the item \a value in
+ the set. If the set contains no item \a value, the function
+ returns end().
+*/
+
+/*! \fn QSet::const_iterator QSet::constFind(const T &value) const
+ \since 4.2
+
+ Returns a const iterator positioned at the item \a value in the
+ set. If the set contains no item \a value, the function returns
+ constEnd().
+
+ \sa find(), contains()
+*/
+
+/*!
+ \fn bool QSet::contains(const T &value) const
+
+ Returns true if the set contains item \a value; otherwise returns
+ false.
+
+ \sa insert(), remove(), find()
+*/
+
+/*!
+ \fn bool QSet::contains(const QSet<T> &other) const
+ \since 4.6
+
+ Returns true if the set contains all items from the \a other set;
+ otherwise returns false.
+
+ \sa insert(), remove(), find()
+*/
+
+/*! \fn QSet::const_iterator QSet::begin() const
+
+ Returns a const \l{STL-style iterator} positioned at the first
+ item in the set.
+
+ \sa constBegin(), end()
+*/
+
+/*! \fn QSet::iterator QSet::begin()
+ \since 4.2
+ \overload
+
+ Returns a non-const \l{STL-style iterator} positioned at the first
+ item in the set.
+*/
+
+/*! \fn QSet::const_iterator QSet::constBegin() const
+
+ Returns a const \l{STL-style iterator} positioned at the first
+ item in the set.
+
+ \sa begin(), constEnd()
+*/
+
+/*! \fn QSet::const_iterator QSet::end() const
+
+ Returns a const \l{STL-style iterator} positioned at the imaginary
+ item after the last item in the set.
+
+ \sa constEnd(), begin()
+*/
+
+/*! \fn QSet::iterator QSet::end()
+ \since 4.2
+ \overload
+
+ Returns a non-const \l{STL-style iterator} pointing to the
+ imaginary item after the last item in the set.
+*/
+
+/*! \fn QSet::const_iterator QSet::constEnd() const
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the set.
+
+ \sa constBegin(), end()
+*/
+
+/*!
+ \typedef QSet::Iterator
+ \since 4.2
+
+ Qt-style synonym for QSet::iterator.
+*/
+
+/*!
+ \typedef QSet::ConstIterator
+
+ Qt-style synonym for QSet::const_iterator.
+*/
+
+/*!
+ \typedef QSet::const_pointer
+
+ Typedef for const T *. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::const_reference
+
+ Typedef for const T &. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::difference_type
+
+ Typedef for const ptrdiff_t. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::key_type
+
+ Typedef for T. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::pointer
+
+ Typedef for T *. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::reference
+
+ Typedef for T &. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::size_type
+
+ Typedef for int. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QSet::value_type
+
+ Typedef for T. Provided for STL compatibility.
+*/
+
+/*!
+ \fn QSet::const_iterator QSet::insert(const T &value)
+
+ Inserts item \a value into the set, if \a value isn't already
+ in the set, and returns an iterator positioned at the inserted
+ item.
+
+ \sa operator<<(), remove(), contains()
+*/
+
+/*!
+ \fn QSet<T> &QSet::unite(const QSet<T> &other)
+
+ Each item in the \a other set that isn't already in this set is
+ inserted into this set. A reference to this set is returned.
+
+ \sa operator|=(), intersect(), subtract()
+*/
+
+/*!
+ \fn QSet<T> &QSet::intersect(const QSet<T> &other)
+
+ Removes all items from this set that are not contained in the
+ \a other set. A reference to this set is returned.
+
+ \sa operator&=(), unite(), subtract()
+*/
+
+/*!
+ \fn QSet<T> &QSet::subtract(const QSet<T> &other)
+
+ Removes all items from this set that are contained in the
+ \a other set. Returns a reference to this set.
+
+ \sa operator-=(), unite(), intersect()
+*/
+
+/*!
+ \fn bool QSet::empty() const
+
+ Returns true if the set is empty. This function is provided
+ for STL compatibility. It is equivalent to isEmpty().
+*/
+
+/*!
+ \fn bool QSet::count() const
+
+ Same as size().
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator<<(const T &value)
+ \fn QSet<T> &QSet::operator+=(const T &value)
+ \fn QSet<T> &QSet::operator|=(const T &value)
+
+ Inserts a new item \a value and returns a reference to the set.
+ If \a value already exists in the set, the set is left unchanged.
+
+ \sa insert()
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator-=(const T &value)
+
+ Removes the occurrence of item \a value from the set, if
+ it is found, and returns a reference to the set. If the
+ \a value is not contained the set, nothing is removed.
+
+ \sa remove()
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator|=(const QSet<T> &other)
+ \fn QSet<T> &QSet::operator+=(const QSet<T> &other)
+
+ Same as unite(\a other).
+
+ \sa operator|(), operator&=(), operator-=()
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator&=(const QSet<T> &other)
+
+ Same as intersect(\a other).
+
+ \sa operator&(), operator|=(), operator-=()
+*/
+
+/*!
+ \fn QSet<T> &QSet::operator&=(const T &value)
+
+ \overload
+
+ Same as intersect(\e{other}), if we consider \e{other} to be a set
+ that contains the singleton \a value.
+*/
+
+
+/*!
+ \fn QSet<T> &QSet::operator-=(const QSet<T> &other)
+
+ Same as subtract(\a{other}).
+
+ \sa operator-(), operator|=(), operator&=()
+*/
+
+/*!
+ \fn QSet<T> QSet::operator|(const QSet<T> &other) const
+ \fn QSet<T> QSet::operator+(const QSet<T> &other) const
+
+ Returns a new QSet that is the union of this set and the
+ \a other set.
+
+ \sa unite(), operator|=(), operator&(), operator-()
+*/
+
+/*!
+ \fn QSet<T> QSet::operator&(const QSet<T> &other) const
+
+ Returns a new QSet that is the intersection of this set and the
+ \a other set.
+
+ \sa intersect(), operator&=(), operator|(), operator-()
+*/
+
+/*!
+ \fn QSet<T> QSet::operator-(const QSet<T> &other) const
+
+ Returns a new QSet that is the set difference of this set and
+ the \a other set, i.e., this set - \a other set.
+
+ \sa subtract(), operator-=(), operator|(), operator&()
+*/
+
+/*!
+ \fn QSet<T> QSet::operator-(const QSet<T> &other)
+ \fn QSet<T> QSet::operator|(const QSet<T> &other)
+ \fn QSet<T> QSet::operator+(const QSet<T> &other)
+ \fn QSet<T> QSet::operator&(const QSet<T> &other)
+ \internal
+
+ These will go away in Qt 5.
+*/
+
+/*!
+ \class QSet::iterator
+ \since 4.2
+ \brief The QSet::iterator class provides an STL-style non-const iterator for QSet.
+
+ QSet features both \l{STL-style iterators} and
+ \l{Java-style iterators}. The STL-style iterators are more
+ low-level and more cumbersome to use; on the other hand, they are
+ slightly faster and, for developers who already know STL, have
+ the advantage of familiarity.
+
+ QSet<T>::iterator allows you to iterate over a QSet and to remove
+ items (using QSet::erase()) while you iterate. (QSet doesn't let
+ you \e modify a value through an iterator, because that
+ would potentially require moving the value in the internal hash
+ table used by QSet.) If you want to iterate over a const QSet,
+ you should use QSet::const_iterator. It is generally good
+ practice to use QSet::const_iterator on a non-const QSet as well,
+ unless you need to change the QSet through the iterator. Const
+ iterators are slightly faster, and can improve code readability.
+
+ QSet\<T\>::iterator allows you to iterate over a QSet\<T\> and
+ modify it as you go (using QSet::erase()). However,
+
+ The default QSet::iterator constructor creates an uninitialized
+ iterator. You must initialize it using a function like
+ QSet::begin(), QSet::end(), or QSet::insert() before you can
+ start iterating. Here's a typical loop that prints all the items
+ stored in a set:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 8
+
+ Here's a loop that removes certain items (all those that start
+ with 'J') from a set while iterating:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 9
+
+ STL-style iterators can be used as arguments to \l{generic
+ algorithms}. For example, here's how to find an item in the set
+ using the qFind() algorithm:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 10
+
+ Multiple iterators can be used on the same set. However, you may
+ not attempt to modify the container while iterating on it.
+
+ \sa QSet::const_iterator, QMutableSetIterator
+*/
+
+/*!
+ \class QSet::const_iterator
+ \brief The QSet::const_iterator class provides an STL-style const iterator for QSet.
+ \since 4.2
+
+ QSet features both \l{STL-style iterators} and
+ \l{Java-style iterators}. The STL-style iterators are more
+ low-level and more cumbersome to use; on the other hand, they are
+ slightly faster and, for developers who already know STL, have
+ the advantage of familiarity.
+
+ QSet\<Key, T\>::const_iterator allows you to iterate over a QSet.
+ If you want to modify the QSet as you iterate over it, you must
+ use QSet::iterator instead. It is generally good practice to use
+ QSet::const_iterator on a non-const QSet as well, unless you need
+ to change the QSet through the iterator. Const iterators are
+ slightly faster, and can improve code readability.
+
+ The default QSet::const_iterator constructor creates an
+ uninitialized iterator. You must initialize it using a function
+ like QSet::begin(), QSet::end(), or QSet::insert() before you can
+ start iterating. Here's a typical loop that prints all the items
+ stored in a set:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 11
+
+ STL-style iterators can be used as arguments to \l{generic
+ algorithms}. For example, here's how to find an item in the set
+ using the qFind() algorithm:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 12
+
+ Multiple iterators can be used on the same set. However, you may
+ not attempt to modify the container while iterating on it.
+
+ \sa QSet::iterator, QSetIterator
+*/
+
+/*!
+ \fn QSet::iterator::iterator()
+ \fn QSet::const_iterator::const_iterator()
+
+ Constructs an uninitialized iterator.
+
+ Functions like operator*() and operator++() should not be called
+ on an uninitialized iterator. Use operator=() to assign a value
+ to it before using it.
+
+ \sa QSet::begin(), QSet::end()
+*/
+
+/*!
+ \fn QSet::iterator::iterator(typename Hash::iterator i)
+ \fn QSet::const_iterator::const_iterator(typename Hash::const_iterator i)
+
+ \internal
+*/
+
+/*!
+ \typedef QSet::iterator::iterator_category
+ \typedef QSet::const_iterator::iterator_category
+
+ \internal
+*/
+
+/*!
+ \typedef QSet::iterator::difference_type
+ \typedef QSet::const_iterator::difference_type
+
+ \internal
+*/
+
+/*!
+ \typedef QSet::iterator::value_type
+ \typedef QSet::const_iterator::value_type
+
+ \internal
+*/
+
+/*!
+ \typedef QSet::iterator::pointer
+ \typedef QSet::const_iterator::pointer
+
+ \internal
+*/
+
+/*!
+ \typedef QSet::iterator::reference
+ \typedef QSet::const_iterator::reference
+
+ \internal
+*/
+
+/*!
+ \fn QSet::iterator::iterator(const iterator &other)
+ \fn QSet::const_iterator::const_iterator(const const_iterator &other)
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn QSet::const_iterator::const_iterator(const iterator &other)
+ \since 4.2
+ \overload
+
+ Constructs a copy of \a other.
+*/
+
+/*!
+ \fn QSet::iterator &QSet::iterator::operator=(const iterator &other)
+ \fn QSet::const_iterator &QSet::const_iterator::operator=(const const_iterator &other)
+
+ Assigns \a other to this iterator.
+*/
+
+/*!
+ \fn const T &QSet::iterator::operator*() const
+ \fn const T &QSet::const_iterator::operator*() const
+
+ Returns a reference to the current item.
+
+ \sa operator->()
+*/
+
+/*!
+ \fn const T *QSet::iterator::operator->() const
+ \fn const T *QSet::const_iterator::operator->() const
+
+ Returns a pointer to the current item.
+
+ \sa operator*()
+*/
+
+/*!
+ \fn bool QSet::iterator::operator==(const iterator &other) const
+ \fn bool QSet::const_iterator::operator==(const const_iterator &other) const
+
+ Returns true if \a other points to the same item as this
+ iterator; otherwise returns false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QSet::iterator::operator==(const const_iterator &other) const
+ \fn bool QSet::iterator::operator!=(const const_iterator &other) const
+
+ \overload
+*/
+
+/*!
+ \fn bool QSet::iterator::operator!=(const iterator &other) const
+ \fn bool QSet::const_iterator::operator!=(const const_iterator &other) const
+
+ Returns true if \a other points to a different item than this
+ iterator; otherwise returns false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn QSet::iterator &QSet::iterator::operator++()
+ \fn QSet::const_iterator &QSet::const_iterator::operator++()
+
+ The prefix ++ operator (\c{++it}) advances the iterator to the
+ next item in the set and returns an iterator to the new current
+ item.
+
+ Calling this function on QSet::constEnd() leads to
+ undefined results.
+
+ \sa operator--()
+*/
+
+/*!
+ \fn QSet::iterator QSet::iterator::operator++(int)
+ \fn QSet::const_iterator QSet::const_iterator::operator++(int)
+
+ \overload
+
+ The postfix ++ operator (\c{it++}) advances the iterator to the
+ next item in the set and returns an iterator to the previously
+ current item.
+*/
+
+/*!
+ \fn QSet::iterator &QSet::iterator::operator--()
+ \fn QSet::const_iterator &QSet::const_iterator::operator--()
+
+ The prefix -- operator (\c{--it}) makes the preceding item
+ current and returns an iterator to the new current item.
+
+ Calling this function on QSet::begin() leads to undefined
+ results.
+
+ \sa operator++()
+*/
+
+/*!
+ \fn QSet::iterator QSet::iterator::operator--(int)
+ \fn QSet::const_iterator QSet::const_iterator::operator--(int)
+
+ \overload
+
+ The postfix -- operator (\c{it--}) makes the preceding item
+ current and returns an iterator to the previously current item.
+*/
+
+/*!
+ \fn QSet::iterator QSet::iterator::operator+(int j) const
+ \fn QSet::const_iterator QSet::const_iterator::operator+(int j) const
+
+ Returns an iterator to the item at \a j positions forward from
+ this iterator. (If \a j is negative, the iterator goes backward.)
+
+ This operation can be slow for large \a j values.
+
+ \sa operator-()
+*/
+
+/*!
+ \fn QSet::iterator QSet::iterator::operator-(int j) const
+ \fn QSet::const_iterator QSet::const_iterator::operator-(int j) const
+
+ Returns an iterator to the item at \a j positions backward from
+ this iterator. (If \a j is negative, the iterator goes forward.)
+
+ This operation can be slow for large \a j values.
+
+ \sa operator+()
+*/
+
+/*!
+ \fn QSet::iterator &QSet::iterator::operator+=(int j)
+ \fn QSet::const_iterator &QSet::const_iterator::operator+=(int j)
+
+ Advances the iterator by \a j items. (If \a j is negative, the
+ iterator goes backward.)
+
+ This operation can be slow for large \a j values.
+
+ \sa operator-=(), operator+()
+*/
+
+/*!
+ \fn QSet::iterator &QSet::iterator::operator-=(int j)
+ \fn QSet::const_iterator &QSet::const_iterator::operator-=(int j)
+
+ Makes the iterator go back by \a j items. (If \a j is negative,
+ the iterator goes forward.)
+
+ This operation can be slow for large \a j values.
+
+ \sa operator+=(), operator-()
+*/
+
+/*! \fn QList<T> QSet<T>::toList() const
+
+ Returns a new QList containing the elements in the set. The
+ order of the elements in the QList is undefined.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 13
+
+ \sa fromList(), QList::fromSet(), qSort()
+*/
+
+/*! \fn QList<T> QSet<T>::values() const
+
+ Returns a new QList containing the elements in the set. The
+ order of the elements in the QList is undefined.
+
+ This is the same as toList().
+
+ \sa fromList(), QList::fromSet(), qSort()
+*/
+
+
+/*! \fn QSet<T> QSet<T>::fromList(const QList<T> &list)
+
+ Returns a new QSet object containing the data contained in \a
+ list. Since QSet doesn't allow duplicates, the resulting QSet
+ might be smaller than the \a list, because QList can contain
+ duplicates.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qset.qdoc 14
+
+ \sa toList(), QList::toSet()
+*/
+
+/*!
+ \fn QDataStream &operator<<(QDataStream &out, const QSet<T> &set)
+ \relates QSet
+
+ Writes the \a set to stream \a out.
+
+ This function requires the value type to implement \c operator<<().
+
+ \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+*/
+
+/*!
+ \fn QDataStream &operator>>(QDataStream &in, QSet<T> &set)
+ \relates QSet
+
+ Reads a set from stream \a in into \a set.
+
+ This function requires the value type to implement \c operator>>().
+
+ \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+*/
diff --git a/doc/src/qsignalspy.qdoc b/doc/src/qsignalspy.qdoc
new file mode 100644
index 0000000..cf9021e
--- /dev/null
+++ b/doc/src/qsignalspy.qdoc
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QSignalSpy
+ \inmodule QtTest
+
+ \brief The QSignalSpy class enables introspection of signal emission.
+
+ QSignalSpy can connect to any signal of any object and records its emission.
+ QSignalSpy itself is a list of QVariant lists. Each emission of the signal
+ will append one item to the list, containing the arguments of the signal.
+
+ The following example records all signal emissions for the \c clicked() signal
+ of a QCheckBox:
+
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 0
+
+ \c{spy.takeFirst()} returns the arguments for the first emitted signal, as a
+ list of QVariant objects. The \c clicked() signal has a single bool argument,
+ which is stored as the first entry in the list of arguments.
+
+ The example below catches a signal from a custom object:
+
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 1
+
+ \bold {Note:} Non-standard data types need to be registered, using
+ the qRegisterMetaType() function, before you can create a
+ QSignalSpy. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 2
+
+ To retrieve the \c QModelIndex, you can use qvariant_cast:
+
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 3
+ */
+
+/*! \fn QSignalSpy::QSignalSpy(QObject *object, const char *signal)
+
+ Constructs a new QSignalSpy that listens for emissions of the \a signal
+ from the QObject \a object. Neither \a signal nor \a object can be null.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 4
+*/
+
+/*! \fn QSignalSpy::isValid() const
+
+ Returns true if the signal spy listens to a valid signal, otherwise false.
+*/
+
+/*! \fn QSignalSpy::signal() const
+
+ Returns the normalized signal the spy is currently listening to.
+*/
+
+/*! \fn int QSignalSpy::qt_metacall(QMetaObject::Call call, int id, void **a)
+ \internal
+*/
+
diff --git a/doc/src/qsizepolicy.qdoc b/doc/src/qsizepolicy.qdoc
new file mode 100644
index 0000000..d82bb16
--- /dev/null
+++ b/doc/src/qsizepolicy.qdoc
@@ -0,0 +1,522 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QSizePolicy
+ \brief The QSizePolicy class is a layout attribute describing horizontal
+ and vertical resizing policy.
+
+ \ingroup appearance
+ \ingroup geomanagement
+
+ The size policy of a widget is an expression of its willingness to
+ be resized in various ways, and affects how the widget is treated
+ by the \l{Layout Management}{layout engine}. Each widget returns a
+ QSizePolicy that describes the horizontal and vertical resizing
+ policy it prefers when being laid out. You can change this for
+ a specific widget by changing its QWidget::sizePolicy property.
+
+ QSizePolicy contains two independent QSizePolicy::Policy values
+ and two stretch factors; one describes the widgets's horizontal
+ size policy, and the other describes its vertical size policy. It
+ also contains a flag to indicate whether the height and width of
+ its preferred size are related.
+
+ The horizontal and vertical policies can be set in the
+ constructor, and altered using the setHorizontalPolicy() and
+ setVerticalPolicy() functions. The stretch factors can be set
+ using the setHorizontalStretch() and setVerticalStretch()
+ functions. The flag indicating whether the widget's
+ \l{QWidget::sizeHint()}{sizeHint()} is width-dependent (such as a
+ menu bar or a word-wrapping label) can be set using the
+ setHeightForWidth() function.
+
+ The current size policies and stretch factors be retrieved using
+ the horizontalPolicy(), verticalPolicy(), horizontalStretch() and
+ verticalStretch() functions. Alternatively, use the transpose()
+ function to swap the horizontal and vertical policies and
+ stretches. The hasHeightForWidth() function returns the current
+ status of the flag indicating the size hint dependencies.
+
+ Use the expandingDirections() function to determine whether the
+ associated widget can make use of more space than its
+ \l{QWidget::sizeHint()}{sizeHint()} function indicates, as well as
+ find out in which directions it can expand.
+
+ Finally, the QSizePolicy class provides operators comparing this
+ size policy to a given policy, as well as a QVariant operator
+ storing this QSizePolicy as a QVariant object.
+
+ \sa QSize, QWidget::sizeHint(), QWidget::sizePolicy,
+ QLayoutItem::sizeHint()
+*/
+
+/*!
+ \enum QSizePolicy::PolicyFlag
+
+ These flags are combined together to form the various \l{Policy}
+ values:
+
+ \value GrowFlag The widget can grow beyond its size hint if necessary.
+ \value ExpandFlag The widget should get as much space as possible.
+ \value ShrinkFlag The widget can shrink below its size hint if necessary.
+ \value IgnoreFlag The widget's size hint is ignored. The widget will get
+ as much space as possible.
+
+ \sa Policy
+*/
+
+/*!
+ \enum QSizePolicy::Policy
+
+ This enum describes the various per-dimension sizing types used
+ when constructing a QSizePolicy.
+
+ \value Fixed The QWidget::sizeHint() is the only acceptable
+ alternative, so the widget can never grow or shrink (e.g. the
+ vertical direction of a push button).
+
+ \value Minimum The sizeHint() is minimal, and sufficient. The
+ widget can be expanded, but there is no advantage to it being
+ larger (e.g. the horizontal direction of a push button).
+ It cannot be smaller than the size provided by sizeHint().
+
+ \value Maximum The sizeHint() is a maximum. The widget can be
+ shrunk any amount without detriment if other widgets need the
+ space (e.g. a separator line).
+ It cannot be larger than the size provided by sizeHint().
+
+ \value Preferred The sizeHint() is best, but the widget can be
+ shrunk and still be useful. The widget can be expanded, but there
+ is no advantage to it being larger than sizeHint() (the default
+ QWidget policy).
+
+ \value Expanding The sizeHint() is a sensible size, but the
+ widget can be shrunk and still be useful. The widget can make use
+ of extra space, so it should get as much space as possible (e.g.
+ the horizontal direction of a horizontal slider).
+
+ \value MinimumExpanding The sizeHint() is minimal, and sufficient.
+ The widget can make use of extra space, so it should get as much
+ space as possible (e.g. the horizontal direction of a horizontal
+ slider).
+
+ \value Ignored The sizeHint() is ignored. The widget will get as
+ much space as possible.
+
+ \sa PolicyFlag, setHorizontalPolicy(), setVerticalPolicy()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy()
+
+ Constructs a QSizePolicy object with \l Fixed as its horizontal
+ and vertical policies.
+
+ The policies can be altered using the setHorizontalPolicy() and
+ setVerticalPolicy() functions. Use the setHeightForWidth()
+ function if the preferred height of the widget is dependent on the
+ width of the widget (for example, a QLabel with line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical)
+
+ Constructs a QSizePolicy object with the given \a horizontal and
+ \a vertical policies, and DefaultType as the control type.
+
+ Use setHeightForWidth() if the preferred height of the widget is
+ dependent on the width of the widget (for example, a QLabel with
+ line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, ControlType type)
+ \since 4.3
+
+ Constructs a QSizePolicy object with the given \a horizontal and
+ \a vertical policies, and the specified control \a type.
+
+ Use setHeightForWidth() if the preferred height of the widget is
+ dependent on the width of the widget (for example, a QLabel with
+ line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch(), controlType()
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::horizontalPolicy() const
+
+ Returns the horizontal component of the size policy.
+
+ \sa setHorizontalPolicy(), verticalPolicy(), horizontalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::verticalPolicy() const
+
+ Returns the vertical component of the size policy.
+
+ \sa setVerticalPolicy(), horizontalPolicy(), verticalStretch()
+*/
+
+/*!
+ \fn void QSizePolicy::setHorizontalPolicy(Policy policy)
+
+ Sets the horizontal component to the given \a policy.
+
+ \sa horizontalPolicy(), setVerticalPolicy(), setHorizontalStretch()
+*/
+
+/*!
+ \fn void QSizePolicy::setVerticalPolicy(Policy policy)
+
+ Sets the vertical component to the given \a policy.
+
+ \sa verticalPolicy(), setHorizontalPolicy(), setVerticalStretch()
+*/
+
+/*!
+ \fn Qt::Orientations QSizePolicy::expandingDirections() const
+
+ Returns whether a widget can make use of more space than the
+ QWidget::sizeHint() function indicates.
+
+ A value of Qt::Horizontal or Qt::Vertical means that the widget
+ can grow horizontally or vertically (i.e., the horizontal or
+ vertical policy is \l Expanding or \l MinimumExpanding), whereas
+ Qt::Horizontal | Qt::Vertical means that it can grow in both
+ dimensions.
+
+ \sa horizontalPolicy(), verticalPolicy()
+*/
+
+/*!
+ \fn ControlType QSizePolicy::controlType() const
+ \since 4.3
+
+ Returns the control type associated with the widget for which
+ this size policy applies.
+*/
+
+/*!
+ \fn void QSizePolicy::setControlType(ControlType type)
+ \since 4.3
+
+ Sets the control type associated with the widget for which this
+ size policy applies to \a type.
+
+ The control type specifies the type of the widget for which this
+ size policy applies. It is used by some styles, notably
+ QMacStyle, to insert proper spacing between widgets. For example,
+ the Mac OS X Aqua guidelines specify that push buttons should be
+ separated by 12 pixels, whereas vertically stacked radio buttons
+ only require 6 pixels.
+
+ \sa QStyle::layoutSpacing()
+*/
+
+/*!
+ \fn void QSizePolicy::setHeightForWidth(bool dependent)
+
+ Sets the flag determining whether the widget's preferred height
+ depends on its width, to \a dependent.
+
+ \sa hasHeightForWidth()
+*/
+
+/*!
+ \fn bool QSizePolicy::hasHeightForWidth() const
+
+ Returns true if the widget's preferred height depends on its
+ width; otherwise returns false.
+
+ \sa setHeightForWidth()
+*/
+
+/*!
+ \fn bool QSizePolicy::operator==(const QSizePolicy &other) const
+
+ Returns true if this policy is equal to \a other; otherwise
+ returns false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QSizePolicy::operator!=(const QSizePolicy &other) const
+
+ Returns true if this policy is different from \a other; otherwise
+ returns false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn int QSizePolicy::horizontalStretch() const
+
+ Returns the horizontal stretch factor of the size policy.
+
+ \sa setHorizontalStretch(), verticalStretch(), horizontalPolicy()
+*/
+
+/*!
+ \fn int QSizePolicy::verticalStretch() const
+
+ Returns the vertical stretch factor of the size policy.
+
+ \sa setVerticalStretch(), horizontalStretch(), verticalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::setHorizontalStretch(uchar stretchFactor)
+
+ Sets the horizontal stretch factor of the size policy to the given \a
+ stretchFactor.
+
+ \sa horizontalStretch(), setVerticalStretch(), setHorizontalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::setVerticalStretch(uchar stretchFactor)
+
+ Sets the vertical stretch factor of the size policy to the given
+ \a stretchFactor.
+
+ \sa verticalStretch(), setHorizontalStretch(), setVerticalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::transpose()
+
+ Swaps the horizontal and vertical policies and stretches.
+*/
+
+/*!
+ \enum QSizePolicy::ControlType
+ \since 4.3
+
+ This enum specifies the different types of widgets in terms of
+ layout interaction:
+
+ \value DefaultType The default type, when none is specified.
+ \value ButtonBox A QDialogButtonBox instance.
+ \value CheckBox A QCheckBox instance.
+ \value ComboBox A QComboBox instance.
+ \value Frame A QFrame instance.
+ \value GroupBox A QGroupBox instance.
+ \value Label A QLabel instance.
+ \value Line A QFrame instance with QFrame::HLine or QFrame::VLine.
+ \value LineEdit A QLineEdit instance.
+ \value PushButton A QPushButton instance.
+ \value RadioButton A QRadioButton instance.
+ \value Slider A QAbstractSlider instance.
+ \value SpinBox A QAbstractSpinBox instance.
+ \value TabWidget A QTabWidget instance.
+ \value ToolButton A QToolButton instance.
+
+ \sa setControlType(), controlType()
+*/
+
+#ifdef QT3_SUPPORT
+/*!
+ \typedef QSizePolicy::SizeType
+ \compat
+
+ Use the QSizePolicy::Policy enum instead.
+*/
+
+/*!
+ \enum QSizePolicy::ExpandData
+ \compat
+
+ Use the Qt::Orientations enum instead.
+
+ \value NoDirection Use 0 instead.
+ \value Horizontally Use Qt::Horizontal instead.
+ \value Vertically Use Qt::Vertical instead.
+ \value BothDirections Use Qt::Horizontal | Qt::Vertical instead.
+*/
+
+/*!
+ \fn bool QSizePolicy::mayShrinkHorizontally() const
+
+ Use the horizontalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayShrinkHorizontally();
+ \newcode
+ bool policy = horizontalPolicy() & QSizePolicy::ShrinkFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayShrinkVertically() const
+
+ Use the verticalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayShrinkVertically();
+ \newcode
+ bool policy = verticalPolicy() & QSizePolicy::ShrinkFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayGrowHorizontally() const
+
+ Use the horizontalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayGrowHorizontally();
+ \newcode
+ bool policy = horizontalPolicy() & QSizePolicy::GrowFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayGrowVertically() const
+
+ Use the verticalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayGrowVertically();
+ \newcode
+ bool policy = verticalPolicy() & QSizePolicy::GrowFlag;
+ \endcode
+*/
+
+/*!
+ \fn Qt::QSizePolicy::Orientations QSizePolicy::expanding() const
+
+ Use expandingDirections() instead.
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, bool dependent)
+
+ Use the QSizePolicy() constructor and the setHeightForWidth()
+ function instead.
+
+ \oldcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical, dependent);
+ \newcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
+ policy->setHeightForWidth(dependent);
+ \endcode
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, uchar horizontalStretch,
+ uchar verticalStretch, bool dependent)
+
+ Use the QSizePolicy() constructor and call the
+ setHorizontalStretch(), setVerticalStretch(), and
+ setHeightForWidth() functions instead.
+
+ \oldcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical,
+ horizontalStretch, verticalStretch,
+ dependent);
+ \newcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
+ policy->setHorizontalStretch(horizontalStretch);
+ policy->setVerticalStretch(verticalStretch);
+ policy->setHeightForWidth(dependent);
+ \endcode
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::horData() const
+
+ Use horizontalPolicy() instead.
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::verData() const
+
+ Use verticalPolicy() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setHorData(Policy policy)
+
+ Use setHorizontalPolicy() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setVerData(Policy policy)
+
+ Use setVerticalPolicy() instead.
+*/
+
+/*!
+ \fn uint QSizePolicy::horStretch() const
+
+ Use horizontalStretch() instead.
+*/
+
+/*!
+ \fn uint QSizePolicy::verStretch() const
+
+ Use verticalStretch() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setHorStretch(uchar stretch)
+
+ Use setHorizontalStretch() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setVerStretch(uchar stretch)
+
+ Use setVerticalStretch() instead.
+*/
+#endif
diff --git a/doc/src/qsql.qdoc b/doc/src/qsql.qdoc
new file mode 100644
index 0000000..e98d309
--- /dev/null
+++ b/doc/src/qsql.qdoc
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \namespace QSql
+ \brief The QSql namespace contains miscellaneous identifiers used throughout
+ the Qt SQL library.
+
+ \ingroup database
+ \mainclass
+ \omit ### \module sql \endomit
+
+ \sa {QtSql Module}
+*/
+
+/*!
+ \enum QSql::Confirm
+ \compat
+
+ This enum type describes edit confirmations.
+
+ \value Yes
+ \value No
+ \value Cancel
+*/
+
+/*!
+ \enum QSql::Op
+ \compat
+
+ This enum type describes edit operations.
+
+ \value None
+ \value Insert
+ \value Update
+ \value Delete
+*/
+
+
+/*!
+ \enum QSql::Location
+
+ This enum type describes special SQL navigation locations:
+
+ \value BeforeFirstRow Before the first record.
+ \value AfterLastRow After the last record.
+
+ \omitvalue BeforeFirst
+ \omitvalue AfterLast
+
+ \sa QSqlQuery::at()
+*/
+
+/*!
+ \enum QSql::ParamTypeFlag
+
+ This enum is used to specify the type of a bind parameter.
+
+ \value In The bind parameter is used to put data into the database.
+ \value Out The bind parameter is used to receive data from the database.
+ \value InOut The bind parameter is used to put data into the
+ database; it will be overwritten with output data on executing
+ a query.
+ \value Binary This must be OR'd with one of the other flags if
+ you want to indicate that the data being transferred is
+ raw binary data.
+*/
+
+/*!
+ \enum QSql::TableType
+
+ This enum type describes types of SQL tables.
+
+ \value Tables All the tables visible to the user.
+ \value SystemTables Internal tables used by the database.
+ \value Views All the views visible to the user.
+ \value AllTables All of the above.
+*/
+
+/*!
+ \enum QSql::NumericalPrecisionPolicy
+
+ This enum type describes at which precision levels numercial values are read from
+ a database.
+
+ Some databases support numerical values with a precision that is not storable in a
+ C++ basic data type. The default behavior is to bind these values as a QString.
+ This enum can be used to override this behavior.
+
+ \value LowPrecisionInt32 Force 32bit integer values. In case of floating point numbers,
+ the fractional part is silently discarded.
+ \value LowPrecisionInt64 Force 64bit integer values. In case of floating point numbers,
+ the fractional part is silently discarded.
+ \value LowPrecisionDouble Force \c double values.
+ \value HighPrecision The default behavior - try to preserve maximum precision.
+
+ Note: The actual behaviour if an overflow occurs is driver specific. The Oracle database
+ just returns an error in this case.
+*/
+
diff --git a/doc/src/qt-conf.qdoc b/doc/src/qt-conf.qdoc
new file mode 100644
index 0000000..d826600
--- /dev/null
+++ b/doc/src/qt-conf.qdoc
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-conf.html
+
+ \title Using qt.conf
+ \ingroup deployment
+
+ The \c qt.conf file overrides the hard-coded paths that are
+ compiled into the Qt library. These paths are accessible using the
+ QLibraryInfo class. Without \c qt.conf, the functions in
+ QLibraryInfo return these hard-coded paths; otherwise they return
+ the paths as specified in \c qt.conf.
+
+ Without \c qt.conf, the Qt libraries will use the hard-coded paths
+ to look for plugins, translations, and so on. These paths may not
+ exist on the target system, or they may not be
+ accesssible. Because of this, you need \c qt.conf to make the Qt
+ libraries look elsewhere.
+
+ QLibraryInfo will load \c qt.conf from one of the following locations:
+
+ \list 1
+
+ \o \c :/qt/etc/qt.conf using the resource system
+
+ \o on Mac OS X, in the Resource directory inside the appliction
+ bundle, for example \c assistant.app/Contents/Resources/qt.conf
+
+ \o in the directory containing the application executable, i.e.
+ QCoreApplication::applicationDirPath() + QDir::separator() + "qt.conf"
+
+ \endlist
+
+ The \c qt.conf file is an INI text file, as described in the \l
+ {QSettings::Format}{QSettings} documentation. The file should have
+ a \c Paths group which contains the entries that correspond to
+ each value of the QLibraryInfo::LibraryLocation enum. See the
+ QLibraryInfo documentation for details on the meaning of the
+ various locations.
+
+ \table
+
+ \header \o Entry \o Default Value
+
+ \row \o Prefix \o QCoreApplication::applicationDirPath()
+ \row \o Documentation \o \c doc
+ \row \o Headers \o \c include
+ \row \o Libraries \o \c lib
+ \row \o Binaries \o \c bin
+ \row \o Plugins \o \c plugins
+ \row \o Data \o \c .
+ \row \o Translations \o \c translations
+ \row \o Settings \o \c .
+ \row \o Examples \o \c .
+ \row \o Demos \o \c .
+
+ \endtable
+
+ Absolute paths are used as specified in the \c qt.conf file. All
+ paths are relative to the \c Prefix. On Windows and X11, the \c
+ Prefix is relative to the directory containing the application
+ executable (QCoreApplication::applicationDirPath()). On Mac OS X,
+ the \c Prefix is relative to the \c Contents in the application
+ bundle. For example, \c application.app/Contents/plugins/ is the
+ default location for loading Qt plugins. Note that the plugins
+ need to be placed in specific sub-directories under the
+ \c{plugins} directory (see \l{How to Create Qt Plugins} for
+ details).
+
+ For example, a \c qt.conf file could contain the following:
+
+ \snippet doc/src/snippets/code/doc_src_qt-conf.qdoc 0
+
+ Subgroups of the \c Paths group may be used to specify locations
+ for specific versions of the Qt libraries. Such subgroups are of
+ the form \c Paths/x.y.z, where x is the major version of the Qt
+ libraries, y the minor, and z the patch level. The subgroup that
+ most closely matches the current Qt version is used. If no
+ subgroup matches, the \c Paths group is used as the fallback. The
+ minor and patch level values may be omitted, in which case they
+ default to zero.
+
+ For example, given the following groups:
+
+ \snippet doc/src/snippets/code/doc_src_qt-conf.qdoc 1
+
+ The current version will be matched as shown:
+
+ \list
+ \o 4.0.1 matches \c Paths/4
+ \o 4.1.5 matches \c Paths/4.1
+ \o 4.6.3 matches \c Paths/4.2.5
+ \o 5.0.0 matches \c Paths
+ \o 6.0.2 matches \c Paths/6
+ \endlist
+*/
diff --git a/doc/src/qt-embedded.qdoc b/doc/src/qt-embedded.qdoc
new file mode 100644
index 0000000..f0eb096
--- /dev/null
+++ b/doc/src/qt-embedded.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group qt-embedded
+ \ingroup topics
+ \title Qt for Embedded Platforms
+ \brief Documents related to Qt for Embedded Platforms.
+
+ Qt is available for embedded platforms and devices as well as for a number
+ of desktop platforms. The features provided for each platform depend on the
+ capabilities and architecture of the operating system.
+
+ Currently, two embedded platforms are supported by Qt:
+
+ \table 90%
+ \header
+ \raw HTML
+ <td style="width: 40%">Embedded Linux</td>
+ <td style="background: white; width: 5%"></td>
+ <td style="width: 40%">Windows CE</td>
+ \endraw
+ \row \o \l{Qt for Embedded Linux} is designed to be used on Linux devices
+ without X11 or existing graphical environments. This flavor of
+ Qt includes a framework for creating both applications and an
+ environment for them. As a result, it includes features for
+ window management, inter-process communication and facilities
+ for handling input and display devices.
+ \raw HTML
+ <td style="background: white; width: 5%"></td>
+ \endraw
+ \o \l{Qt for Windows CE} is used to create applications running in
+ existing Windows CE and Windows Mobile environments.
+ Applications use the appropriate style for the embedded
+ environment and use native features, such as menus, to conform
+ to the native style guidelines.
+ \endtable
+*/
diff --git a/doc/src/qt3support.qdoc b/doc/src/qt3support.qdoc
new file mode 100644
index 0000000..30bc5a3
--- /dev/null
+++ b/doc/src/qt3support.qdoc
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module Qt3Support
+ \title Qt3Support Module
+ \contentspage Qt's Modules
+ \previouspage Phonon Module
+ \nextpage QtDesigner
+ \ingroup modules
+
+ \keyword Qt3Support
+ \brief The Qt3Support module provides classes that ease porting
+ from Qt 3 to Qt 4.
+
+ \warning The classes in this module are intended to be used in
+ intermediate stages of a porting process and are not intended
+ to be used in production code.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 1
+
+ \note Since this module provides compatibility classes for
+ diverse parts of the Qt 3 API, it has dependencies on the QtCore,
+ QtGui, QtNetwork, QtSql, and QtXml modules.
+
+ This module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}. Most classes offered by this module are
+ also part of the \l{Qt GUI Framework Edition}.
+\if defined(opensourceedition) || defined(desktoplightedition)
+ Classes that are not available for \l{Qt GUI Framework Edition}
+ users are marked as such in the class documentation.
+\endif
+
+ \sa {Porting to Qt 4}
+*/
diff --git a/doc/src/qt3to4.qdoc b/doc/src/qt3to4.qdoc
new file mode 100644
index 0000000..1297424
--- /dev/null
+++ b/doc/src/qt3to4.qdoc
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3to4.html
+ \title qt3to4 - The Qt 3 to 4 Porting Tool
+
+ \ingroup porting
+ \keyword qt3to4
+
+ The \c qt3to4 tool provides help when moving a project from Qt 3
+ to Qt 4. It is designed to automate the most tedious part of the
+ porting effort.
+
+ See \l{Porting to Qt 4} and \l{Porting .ui Files to Qt 4} for
+ more information about porting Qt 3 applications to Qt 4.
+
+ \section1 Usage
+
+ \c qt3to4 can be run either on individual C++ source or header
+ files, or on an entire project specified by a \c qmake \c .pro
+ file:
+
+ \snippet doc/src/snippets/code/doc_src_qt3to4.qdoc 0
+
+ In project mode, \c qt3to4 reads the \c .pro file and converts
+ all files specified in it. The tool modifies the files in place.
+ You might want to make a copy of your project before you run the
+ tool.
+
+ \section1 Porting Rules
+
+ The Qt porting tool loads its porting rules from an XML file
+ called \c q3porting.xml located in Qt's \c tools/porting/src directory.
+ By editing this file, you can add your own rules or remove some
+ rules.
+
+ The standard \c q3porting.xml file specifies the following
+ conversions:
+
+ \list
+ \o Rename classes that are now part of the Qt 3 support
+ library (e.g., replace \c QFileDialog with \c{Q3FileDialog}).
+ \o Prefix or rename enum values that have been moved or
+ renamed (e.g., replace \c QButton::On with \c{QCheckBox::On}) or
+ members of the Qt namespace (e.g., replace \c QWidget::red with
+ \c{Qt::red}).
+ \o Add \c #include directives that might be needed in Qt 4.
+ \endlist
+
+ \section2 Location of the qt3porting.xml File
+
+ You can now specify the location of the \c qt3porting.xml file with the
+ \c{-f} command line option. This is useful if you want to use a modified
+ file with your own rules.
+
+ If you you don't want to maintain a modified \c qt3porting.xml it is
+ possible to create a "patch" file that includes the original file and adds
+ or disables rules. The syntax for this file looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_qt3to4.qdoc 1
+
+ \section1 Logging
+
+ The porting tool logs all changes to a file called \c
+ portinglog.txt in the current directory. This file lists all
+ changes made to the source files.
+
+ \section1 Advanced Usage
+
+ When porting, \c qt3to4 parses the source files and ports the
+ contents according to the C++ language rules. This C++ parsing
+ step can be disabled with the \c -disableCppParsing option.
+
+ If C++ parsing is enabled, \c qt3to4 must be able to locate the
+ headers included from the source files. Necessary headers include
+ the public Qt headers and any headers that declares names that
+ may conflict with names in the public Qt headers. The standard
+ C++ headers and system headers are usually not needed.
+
+ You can tell \c qt3to4 where to look for headers by using the
+ \c{-I} command-line option. Qt 3.3 header information is built
+ in, so it is normaly not necessary to specify the location of the
+ Qt headers. If you are porting from a different version of Qt 3,
+ you may want to disable the built-in headers with
+ \c{-disableBuiltInQt3Headers}, and then add the path to the
+ actual headers with the \c{-I} option.
+
+ When porting a project, \c qt3to4 will read the \c INCLUDEPATH
+ and \c DEPENDPATH variables from the \c .pro file and add the
+ paths specified here to the list of include search directories.
+
+ To see which headers that are not found, use the \c{-missingFileWarnings}
+ option.
+
+ \section1 Limitations
+
+ In some cases, you might get compiler errors because of identifiers
+ in the global namespace (e.g., \c CTRL). Adding
+
+ \snippet doc/src/snippets/code/doc_src_qt3to4.qdoc 2
+
+ at the beginning of the source file that contains
+ the indentifier solves the problem.
+
+ \section1 Legal Notices
+
+ Some source code in \c qt3to4 is licensed under specific highly
+ permissive licenses from the original authors. Nokia gratefully
+ acknowledges these contributions to \c qt3to4 and all uses of
+ \c qt3to4 should also acknowledge these contributions and quote the
+ following license statements in an appendix to the documentation.
+
+ \list
+ \o \l{Contributions to the Following qt3to4 Files: treewalker.h,
+ treedump.cpp, treedump.h, treewalker.cpp}
+ \endlist
+*/
+
+/*!
+ \page qt3to4-treewalker.html
+ \title Contributions to the Following qt3to4 Files: treewalker.h, treedump.cpp, treedump.h, treewalker.cpp
+ \ingroup licensing
+ \brief License information for contributions to the qt3to4 source code.
+
+ \legalese
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). \BR
+ Copyright (C) 2005 Roberto Raggi
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, modify, market, reproduce,
+ grant sublicenses and distribute subject to the following
+ conditions: The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions of the
+ Software. These files are provided AS IS with NO WARRANTY OF ANY
+ KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTIBILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE.
+ \endlegalese
+*/
diff --git a/doc/src/qt4-accessibility.qdoc b/doc/src/qt4-accessibility.qdoc
new file mode 100644
index 0000000..05a25ee
--- /dev/null
+++ b/doc/src/qt4-accessibility.qdoc
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-accessibility.html
+ \title Cross-Platform Accessibility Support in Qt 4
+ \ingroup accessibility
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The New Qt Designer
+ \nextpage The Qt 4 Database GUI Layer
+
+ Qt 4 allows developers to write cross-platform applications that
+ are usable by visually impaired users as well as by users with
+ other disabilities. Qt accessibility will make applications
+ accessible to more users and opens the governmental market, where
+ accessibility is often a requirement.
+
+ \section1 General Overview
+
+ The accessibility classes have been extended in
+ various ways since Qt 3. We added new functions and new enum
+ values, and revised the API to make it more consistent with the
+ rest of Qt. We also added two properties to QWidget,
+ \l{QWidget::accessibleName}{accessibleName} and
+ \l{QWidget::accessibleDescription}{accessibleDescription}, that
+ can be set in \e{Qt Designer} to provide basic help texts without
+ having to write any code.
+
+ Qt's accessibility architecture is as follows. Qt offers one
+ generic interface, QAccessibleInterface, that can be used to
+ wrap all widgets and objects (e.g., QPushButton). This single
+ interface provides all the metadata necessary for the assistive
+ technologies. Qt provides implementations of this interface for
+ its built-in widgets as plugins.
+
+ A more detailed overview of the accessibility support in Qt can
+ be found on the \l Accessibility page.
+
+ \section1 Enabling Accessibility Support
+
+ By default, Qt applications are run with accessibility support
+ enabled on Windows and Mac OS X. On Unix/X11 platforms, applications
+ must be launched in an environment with the \c QT_ACCESSIBILITY
+ variable set to 1. For example, this is set in the following way with
+ the bash shell:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc environment
+
+ Accessibility features are built into Qt by default when the libraries
+ are configured and built.
+
+ \section1 Creating New Accessible Interfaces
+
+ When you develop custom widgets, you can create custom subclasses
+ of QAccessibleInterface and distribute them as plugins (using
+ QAccessiblePlugin) or compile them into the application.
+ Likewise, Qt's predefined accessibility support can be built as
+ plugin (the default) or directly into the Qt library. The main
+ advantage of using plugins is that the accessibility classes are
+ only loaded into memory if they are actually used; they don't
+ slow down the common case where no assistive technology is being
+ used.
+
+ In addition to QAccessibleInterface, Qt includes two convenience
+ classes, QAccessibleObject and QAccessibleWidget, that
+ provide the lowest common denominator of metadata (e.g., widget
+ geometry, window title, basic help text). You can use them as
+ base classes when wrapping your custom QObject or QWidget
+ subclasses.
+
+ Another new feature in Qt 4 is that Qt can now support other
+ backends in addition to the predefined ones. This is done by
+ subclassing QAccessibleBridge.
+
+ \omit
+ \section1 Software Layering
+
+ Qt Application
+ | links to
+ Qt Accessibility Module
+ | Plugin (in-process)
+ Qt ATK Bridge
+ | links to
+ ATK
+ | Plugin (in-process)
+ at-spi
+ | CORBA
+ assistive technologies
+
+ Windows:
+
+ Qt Application
+ | links to
+ Qt Accessibility Module
+ | COM (?)
+ MSAA
+ | ?
+ assistive technologies
+
+ Mac:
+
+ ?
+ \endomit
+
+ \section1 Example Code
+
+ The first example illustrates how to provide accessibility
+ information for a custom widget. We can use QAccessibleWidget as
+ a base class and reimplement various functions:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 0
+
+ Here's how we would implement the
+ \l{QAccessibleInterface::doAction()}{doAction()} function to call
+ a function named click() on the wrapped MyWidget object when the
+ user invokes the object's default action or "presses" it.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 1
+
+ To export the widget interface as a plugin, we must subclass
+ QAccessibleFactory:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 2
+*/
diff --git a/doc/src/qt4-arthur.qdoc b/doc/src/qt4-arthur.qdoc
new file mode 100644
index 0000000..8a29138
--- /dev/null
+++ b/doc/src/qt4-arthur.qdoc
@@ -0,0 +1,336 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-arthur.html
+ \title The Arthur Paint System
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Interview Framework
+ \nextpage The Scribe Classes
+
+ This document describes Qt 4's painting system, providing a
+ comparison between the approaches used by Qt when rendering
+ graphics in Qt 3 and Qt 4.
+
+ \tableofcontents
+
+ \section1 Architecture
+
+ The Qt 4 Paint System is primarily based on the classes
+ QPainter, QPaintDevice, and QPaintEngine. QPainter is the
+ class used to perform drawing operations, such as drawLine()
+ and drawRect(). QPaintDevice represents a device that can be
+ painted on using a QPainter; both QWidget and QPixmap are
+ QPaintDevices. QPaintEngine provides the interface that the
+ painter uses to draw onto different types of devices.
+
+ \section2 A Look Back at Qt 3
+
+ In Qt 3, QPainter could be used to draw on widgets and pixmaps.
+ (It could also be used to draw to printers on Windows and Mac OS
+ X.) When other paint devices needed to be supported, such as
+ QPrinter on X11, this was done by deriving from QPaintDevice and
+ reimplementing the virtual function QPaintDevice::cmd(). A
+ reimplemented paint device was treated as an external device.
+
+ QPainter was capable of recognizing external devices and could
+ serialize each paint operation to the reimplemented cmd()
+ function. This allowed reimplementation of arbitrary devices, but
+ the approach has some disadvantages which we have addressed in
+ Qt 4. One of these is that an external device could not reuse any
+ functionality implemented in QPainter since QPainter was tied to
+ widget/pixmap painting on that platform. Supporting multiple
+ device backends, such as OpenGL, was therefore inconvenient and
+ not very efficient.
+
+ This has led us to devise a more convenient and intuitive API for
+ Qt 4.
+
+ \section2 How Painting is Done in Qt 4
+
+ In Qt 4 we have introduced the QPaintEngine abstract class.
+ Implementations of this class provide the concrete functionality
+ needed to draw to specific device types. The QPaintEngine class
+ is only used internally by QPainter and QPaintDevice, and it is
+ hidden from application programmers unless they reimplement their own
+ device types for their own QPaintEngine subclasses. Qt currently
+ provides paint engines for the following platforms and APIs:
+
+ \list
+ \o A pixel-based engine for the Windows platform that is
+ also used to draw onto QImages on all platforms
+ \o OpenGL on all platforms
+ \o PostScript on Linux, Unix, and Mac OS X
+ \o QuickDraw and CoreGraphics on Mac OS X
+ \o X11 and the X Render Extension on Linux and Unix systems
+ \omit
+ \o QVFb, VNC, and LinuxFb for Qt for Embedded Linux
+ \endomit
+ \endlist
+
+ To implement support for a new backend, you must derive from
+ QPaintEngine and reimplement its virtual functions. You also need
+ to derive from QPaintDevice and reimplement the virtual function
+ QPaintDevice::paintEngine() to tell QPainter which paint engine
+ should be used to draw on this particular device.
+
+ The main benefit of this approach is that all painting follows the
+ same painting pipeline. This means that adding support for new features
+ and providing default implementations for unsupported ones has
+ become much simpler.
+
+ \section1 New Features in the Qt 4 Paint System
+
+ \section2 Gradient Brushes
+
+ With Qt 4 it is possible to fill shapes using gradient
+ brushes. A gradient in this case is used to describe the transition
+ from one color at a given point to different color at another point. A
+ gradient can span from one color to another or over a
+ number of colors by specifying multiple colors at positions in the
+ gradient area. Qt 4 supports linear, radial, and conical gradients.
+
+ Linear gradients are specified using two control points.
+ Setting a linear gradient brush is done by creating a QLinearGradient
+ object and setting it as a brush.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 0
+
+ The code shown above produces a pattern as show in the following
+ pixmap:
+
+ \img diagonalGradient.png
+
+ Radial gradients are specified using a center, a radius, and a
+ focal point. Setting a radial brush is done by creating a QRadialGradient
+ object and setting it as a brush.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 1
+
+ The code shown above produces a pattern as shown in the following
+ pixmap:
+
+ \img radialGradient.png
+
+ Conical gradients are specified using a center and a start
+ angle. Setting a conical brush is done by creating a
+ QConicalGradient object and setting it as a brush.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 2
+
+ The code shown above produces a pattern as shown in the following
+ pixmap:
+
+ \img conicalGradient.png
+
+ \section2 Alpha-Blended Drawing
+
+ With Qt 4 we support alpha-blended outlining and filling. The
+ alpha channel of a color is defined through QColor. The alpha
+ channel specifies the transparency effect, 0 represents a fully
+ transparent color, while 255 represents a fully opaque color. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 3
+
+ The code shown above produces the following output:
+
+ \img alphafill.png
+
+ Alpha-blended drawing is supported on Windows, Mac OS X, and on
+ X11 systems that have the X Render extension installed.
+
+
+ \section2 QPainter and QGLWidget
+
+ It is now possible to open a QPainter on a QGLWidget as if it
+ were a normal QWidget. One huge benefit from this is that we
+ utilize the high performance of OpenGL for most drawing
+ operations, such as transformations and pixmap drawing.
+
+
+ \section2 Anti-Aliased Edges
+
+ On platforms where this is supported by the native drawing API, we
+ provide the option of turning on anti-aliased edges when drawing
+ graphics primitives.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 4
+
+ This produces the following output:
+
+ \img antialiased.png
+
+ Anti-aliasing is supported when drawing to a QImage and on all
+ systems, except on X11 when XRender is not present.
+
+
+ \section2 Extensive Use of Native Graphics Operations
+
+ Where this makes sense, Qt uses native graphics
+ operations. The benefit we gain from this is that these operations
+ can potentially be performed in hardware, giving significant
+ speed improvements over many pure-software implementations.
+
+ Among these are native transformations (Mac OS X and OpenGL),
+ making painting with a world matrix much faster. Some pixmap
+ operations have also been moved closer to the underlying
+ hardware implementations.
+
+
+ \section2 Painter Paths
+
+ A painter path is an object composed of a number of graphical
+ building blocks, such as rectangles, ellipses, lines, and curves.
+ A painter path can be used for filling, outlining, and for clipping.
+ The main advantage of painter paths over normal drawing operations
+ is that it is possible to build up non-linear shapes which can be
+ drawn later in one go.
+
+ Building blocks can be joined in closed subpaths, such as a
+ rectangle or an ellipse, or they can exist independently as unclosed
+ subpaths, although an unclosed path will not be filled.
+
+ Below is a code example on how a path can be used. The
+ painter in this case has a pen width of 3 and a light blue brush. We
+ first add a rectangle, which becomes a closed subpath. We then add
+ two bezier curves, and finally draw the entire path.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 5
+
+ The code above produces the following output:
+
+ \img pathexample.png
+
+
+ \section2 Widget Double-Buffering
+
+ In Qt 4, all widgets are double-buffered by default.
+
+ In previous versions of Qt double-buffering was achieved by
+ painting to an off-screen pixmap then copying the pixmap to the
+ screen. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 6
+
+ Since the double-buffering is handled by QWidget internally this
+ now becomes:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 7
+
+ Double-buffering is turned on by default, but can be turned off for
+ individual widgets by setting the widget attribute
+ Qt::WA_PaintOnScreen.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 8
+
+ \section2 Pen and Brush Transformation
+
+ In Qt 3, pens and brushes weren't affected by the painter's
+ transformation matrix. For example, if you drew a rectangle with a
+ pen width of 1 using a scaled painter, the resulting line width
+ would still be 1. This made it difficult to implement features
+ such as zooming and high-resolution printing.
+
+ In Qt 4, pens and brushes honor the painter's transformation
+ matrix.
+
+ Note that this feature is still in development and not yet
+ supported on all platforms.
+
+ \section2 Custom Filled Pens
+
+ In Qt 4, it is possible to specify how an outline should be
+ filled. It can be a solid color or a QBrush, which makes it
+ possible to specify both texture and gradient fills for both
+ text and outlines.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 9
+
+ The code above produces the following output:
+
+ \img gradientText.png
+
+ \section2 QImage as a Paint Device
+
+ A great improvement of Qt 4 over previous versions it that it now
+ provides a pixel-based raster paint engine which allows users to
+ open a painter on a QImage. The QImage paint engine supports the
+ full feature set of QPainter (paths, antialiasing, alphablending,
+ etc.) and can be used on all platforms.
+
+ One advantage of this is that it is possible to guarantee the
+ pixel exactness of any drawing operation in a platform-independent
+ way.
+
+ Painting on an image is as simple as drawing on any other paint device.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 10
+
+ \section2 SVG Rendering Support
+
+ \l{Scalable Vector Graphics} (SVG) is an language for describing both static
+ and animated two-dimensional vector graphics. Qt includes support for the
+ \l{SVG 1.2 Tiny Static Features}{static features} of \l{SVG 1.2 Tiny}, taking
+ advantage of the improved paint system in Qt 4. SVG drawings can be rendered
+ onto any QPaintDevice subclass, such as QWidget, QImage, and QGLWidget, to
+ take advantage of specific advantages of each device. This approach gives
+ developers the flexibility to experiment, in order to find the best solution
+ for each application.
+
+ \image svg-image.png
+
+ Since SVG is an XML-based format, the QtXml module is required to read SVG
+ files. For this reason, classes for SVG handling are provided separately in
+ the QtSvg module.
+
+ Displaying an SVG drawing in an application is as simple as displaying a
+ bitmap image. QSvgWidget is a display widget that can be placed in an
+ appropriate place in a user interface, and new content can be loaded as
+ required. For example, a predetermined file can be loaded and displayed in
+ a widget with little effort:
+
+ \snippet doc/src/snippets/qsvgwidget/main.cpp 0
+
+ For applications with more specialized requirements, the QSvgRenderer class
+ provides more control over the way SVG drawings are rendered and animated.
+*/
diff --git a/doc/src/qt4-designer.qdoc b/doc/src/qt4-designer.qdoc
new file mode 100644
index 0000000..3f90390
--- /dev/null
+++ b/doc/src/qt4-designer.qdoc
@@ -0,0 +1,298 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-designer.html
+
+ \title The New Qt Designer
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Qt 4 Main Window Classes
+ \nextpage Cross-Platform Accessibility Support in Qt 4
+
+ \QD has been completely re-written based on our experience with
+ the previous versions of the product for Qt 3. One of the main new
+ ideas behind this new version is to release the application as a
+ collection of interchangeable components that include the property
+ editor, the widget box, and other useful tools for creating
+ graphical user interfaces with Qt. These components can either be
+ used together in the \QD application, or independently integrated
+ into other systems. As a result, certain features such as the
+ project editor and code editor have been removed from the version
+ included with this release.
+
+ The current version of \QD is near feature complete and can be used for
+ many tasks. However, it is still under continuous development. This
+ document will explain what is already in place.
+
+ See also the \l{Qt Designer Manual}.
+
+ \tableofcontents
+
+ \section1 The Current State of Qt Designer
+
+ When used as a standalone application, \QD includes a number of
+ components that work together to provide a flexible GUI design
+ tool. Widgets and dialog windows can be composed using a
+ form-based interface that fully supports drag and drop, clipboard
+ operations, and an undo/redo stack.
+
+ This version of \QD introduces a number of editing modes to make
+ different types of editing more natural. Each editing mode
+ displays the form in an appropriate way for that mode, and
+ provides a specialized user interface for manipulating its
+ contents. The current editing modes are Widget Editing, Signals
+ and Slots Editing, Buddy Editing, and Tab Order Editing.
+
+ \section2 User Interface Features
+
+ \table
+ \row \i \inlineimage designer-main-window.png
+ \i \bold{Widget Box}
+
+ The Widget Box displays a categorized list of widgets and other
+ objects that can be placed on a form using drag and drop.
+
+ When \QD is in multi-window mode, the window containing the Widget
+ Box also holds the main menu and the tool bar. When in workbench
+ mode, the Widget Box becomes an independent window within the \QD
+ workspace.
+
+ The contents of the Widget Box are defined in an XML file that
+ holds a collection of .ui documents for standard Qt widgets. This
+ file can be extended, making it possible to add custom widgets to
+ the Widget Box.
+ \endtable
+
+ \table
+ \row \i \bold{Property Editor}
+
+ The Property Editor allows designers to edit most properties of
+ widgets and layout objects. The property names and values are
+ presented in an editable tree view that shows the properties of
+ the currently selected object.
+
+ Certain resources, such as icons, can be configured in the
+ Property Editor. Resources can be taken from any currently
+ installed resource files, making it easier to design
+ self-contained components.
+
+ \i \inlineimage designer-property-editor.png
+ \endtable
+
+ \section2 Editing Features
+
+ \QD allows form designers to work on different aspects of their forms by
+ switching between specialized editing modes. Tools for editing widget
+ properties, resources, and actions provide context-sensitive information
+ about the forms being edited.
+
+ \table
+ \row \i \inlineimage designer-choosing-form.png
+ \i \bold{Form Templates}
+
+ Form templates provide ready-to-use forms for various types of widgets,
+ such as QWidget, QDialog, and QMainWindow. Custom templates based on
+ these widgets can also be created.
+
+ Templates can contain child widgets and layouts. Designers can
+ save time by creating templates for the most common user interface
+ features for repeated use.
+ \endtable
+
+ \table
+ \row
+ \i \bold{Widget Editing Mode}
+
+ The new \QD allows widgets to be dropped into existing layouts on
+ the form. Previously, it was necessary to break layouts in order
+ to add new widgets to them.
+
+ \QD now supports more direct manipulation of widgets:
+ You can clone a widget by dragging it with the \key CTRL key held down, and
+ it is even possible to drag widgets between forms.
+
+ In-place widget editors provide specialized editing facilities for
+ the most-used widget properties.
+
+ \i \inlineimage designer-editing-mode.png
+ \endtable
+
+ \table
+ \row
+ \i \inlineimage designer-connection-mode.png
+ \i \bold{Signals and Slots Editing Mode}
+
+ \QD now employs a "wired" approach when representing and editing
+ connections between objects on a form. The Signal and Slots
+ Editing mode displays all the signal and slot connections on your
+ form as arrows. These arrows can be manipulated visually, and
+ provide the user with an overview of the form's connection logic.
+
+ Connections can be made between objects on a form and the form itself.
+ This is particularly useful when designing dialogs.
+ \endtable
+
+ \table
+ \row
+ \i \bold{Buddy Editing Mode}
+
+ Widgets that cannot accept keyboard input are often given buddy
+ widgets that will take the keyboard focus on their behalf.
+
+ In Buddy Editing mode, \QD provides a similar approach to that
+ used in the Signals and Slots Editing mode to show the
+ relationships between widgets and their buddies.
+
+ \i \inlineimage designer-buddy-mode.png
+ \endtable
+
+ \table
+ \row
+ \i \inlineimage designer-tab-order-mode.png
+ \i \bold{Tab Order Mode}
+
+ In this mode, users can specify the order in which input widgets accept
+ the keyboard focus.
+
+ The way that the tab order is defined follows the approach taken
+ in Qt 3's version of \QD; The default tab order is based on the
+ order in which widgets are constructed.
+
+ \endtable
+
+ \table
+ \row
+ \i \bold{The Resource Editor}
+
+ The new \QD fully supports The Qt Resource System, and provide the
+ Resource Editor to help designers and developers manage the
+ resources that are needed by their applications.
+
+ Using the Resource Editor, resources can be associated with a
+ given form, and also modified and extended throught the editor's
+ file browser style interface.
+
+ The Resource Editor uses files that are processed by various
+ components of the \l{The Qt Resource System}{Qt Resource System}
+ to ensure that all required resources are embedded in the
+ application.
+
+ \i \inlineimage designer-resources-editing.png
+ \endtable
+
+ \table
+ \row
+ \i \inlineimage designer-action-editor.png
+ \i \bold{The Action Editor}
+
+ With the release of Qt 4.1, \QD introduces the Action Editor
+ simplifying the management of actions when creating main window
+ applications.
+
+ When creating a main window, you can add a menu bar and toolbars
+ using \QD's context menu. Once you have the menu bar or a toolbar
+ in place, you can create and add actions using the Action Editor.
+
+ \endtable
+
+ \section2 Plugin Support
+
+ \table
+ \row
+ \i \inlineimage worldtimeclockplugin-example.png
+ \i \bold{Custom Widgets}
+
+ Plugins can be used to add new custom widgets, special editors, and
+ support for widgets from the Qt 3 support library.
+
+ Support for custom widget plugins allows user interface designers to
+ use application-specific widgets in their designs as early as possible
+ in the development process.
+
+ \QD handles custom widgets in the same way as standard Qt widgets,
+ and allows custom signals and slots to be connected to other objects
+ from within Signals and Slots Editing mode.
+ \endtable
+
+ \table
+ \row
+ \i \bold{The QtDesigner Module}
+
+ The new modular \QD is designed to be integrated into other environments
+ and extended with custom components.
+
+ The QtDesigner Module is a library that developers can use to
+ write extensions and plugins for \QD, and enables \QD components
+ to be embedded into Integrated Development Environments
+ (IDEs).
+
+ With the release of Qt 4.1 the QtDesigner Module is fully
+ documented. The release also provides several new examples using
+ the QtDesigner API to create task menu extensions and custom
+ multi-page widgets (i.e. container extensions).
+
+ \i \inlineimage designer-manual-taskmenuextension.png
+ \endtable
+
+ \section1 Run-Time Support for Forms
+
+ With the Qt 4.1 release, the new QtUiTools module is introduced to
+ provide classes handling forms created with \QD.
+
+ Currently the module only contains the QUiLoader class.
+
+ QUiLoader can be used by standalone applications to
+ dynamically create form-based user interfaces at run-time. This
+ library can be statically linked with applications and
+ redistributed under the same terms as Qt.
+
+ \table
+ \row
+ \i \inlineimage calculatorbuilder-example.png
+ \i \bold{Dynamic Form Creation}
+
+ The QtUiTools library lets developers dynamically construct user interfaces at
+ run-time using the same techniques as \QD. Since forms can contain custom
+ widget plugins, the loading mechanism can be customized to search for
+ third party or application-specific plugins.
+ \endtable
+*/
diff --git a/doc/src/qt4-interview.qdoc b/doc/src/qt4-interview.qdoc
new file mode 100644
index 0000000..bceba85
--- /dev/null
+++ b/doc/src/qt4-interview.qdoc
@@ -0,0 +1,293 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-interview.html
+ \title The Interview Framework
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Tulip Container Classes
+ \nextpage The Arthur Paint System
+
+ The Interview classes provide a model/view framework for Qt
+ applications based on the well known Model-View-Controller design
+ pattern. In this document, we will describe Qt's model/view
+ architecture, provide some examples, and show the improvements
+ offered over Qt 3's item view classes.
+
+ \tableofcontents
+
+ \section1 Overview of The Model/View Architecture
+
+ The model/view architecture is a variation of the Model-View-Controller
+ (MVC) design pattern, originating from Smalltalk, that is often used when
+ building user interfaces.
+
+ In the model/view architecture, the view and the controller objects are
+ combined. This still separates the way that data is stored from the way
+ that it is presented to the user, but provides a simpler framework based
+ on the same principles. This separation makes it possible to display the
+ same data in several different views, and to implement new types of views,
+ without changing the underlying data structures.
+
+ User input is handled by \e delegates. The advantage of this approach is
+ that it allows rendering and editing of individual items of data to be
+ customized to suit each data type in use.
+
+ \table
+ \row \i \inlineimage modelview-overview.png
+ \i \bold{The model/view architecture}
+
+ The model communicates with a source of data, providing an \e interface
+ for the other components in the architecture. The nature of the
+ communication depends on the type of data source, and the way the model
+ is implemented.
+
+ The view obtains \e{model indexes} from the model; these are references
+ to items of data. By supplying model indexes to the model, the view can
+ retrieve items of data from the data source.
+
+ In standard views, a \e delegate renders the items of data. When an item
+ is edited, the delegate communicates with the model directly using
+ model indexes.
+ \endtable
+
+ \section1 Model/View Classes
+
+ On a fundamental level, the Interview classes define the interfaces and
+ common functionality for models, views, and delegates. All implemented
+ components subclass QAbstractItemModel, QAbstractItemView, or
+ QAbstractItemDelegate. The use of a common API ensures a level of
+ interoperability between the components.
+
+ \image standard-views.png
+
+ Interview provides ready-to-use implementations of views for table,
+ tree, and list widgets: QTableView, QTreeView, and QListView.
+ These standard views are suitable for displaying the most common
+ types of data structures used in applications, and can be used with
+ the ready-made models supplied with Qt:
+
+ \list
+ \o QStandardItemModel is a minimal convenience model that developers
+ can use to manage items of data.
+ \o QDirModel provides directory information for use with QListView and
+ QTreeView.
+ \o QStringListModel is a convenience model that can be used to hold
+ strings for views such as QListView and QComboBox.
+ \endlist
+
+ Two specialized abstract models are provided that can be subclassed
+ and extended (see the
+ \l{model-view-programming.html#related-examples}{Model/View Programming}
+ examples):
+
+ \list
+ \o QAbstractTableModel is a useful starting point for providing a custom
+ model that can be used with QTableView.
+ \o QAbstractListModel can be subclassed to produce a list-based model
+ for use with QListView.
+ \endlist
+
+ Operations on items, such as filtering and sorting, are handled by \e{proxy
+ models} that allow views to display processed data without having to
+ copy or modify data obtained from a source model. Interview provides
+ the QSortFilterProxyModel class to allow items of data from a source model
+ to be sorted and filtered before they are supplied to views.
+
+ Developers who are familiar with the conventional list, tree, and table
+ widgets may find QListWidget, QTreeWidget, and QTableWidget useful.
+ These present a simplified interface to the views that does not require a
+ knowledge of the underlying model/view architecture.
+
+ For details about how to use the model/view classes, see the
+ \l{Model/View Programming} document.
+
+ See also the \l{The Qt 4 Database GUI Layer}{Database GUI Layer} document
+ for information about Qt 4's database models.
+
+ \section1 Example Code
+
+ To illustrate how the Interview classes are used, we present two
+ examples that show different aspects of the model/view architecture.
+
+ \section2 Sharing a Model Between Views
+
+ In this example, we display the contents of a model using two
+ different views, and share the user's selection between
+ them. We will use the QDirModel supplied with Qt because it
+ requires very little configuration, and provides existing data to
+ the views.
+
+ The main() function for this example demonstrates all the
+ principles involved in setting up a model and two views. We also
+ share the selection between the two views:
+
+ \snippet doc/src/snippets/shareddirmodel/main.cpp 1
+
+ In the above function, we construct a directory model to display
+ the contents of a default directory. The two views are constructed
+ and given the same model to work with. By default, each view will
+ maintain and display its own selection of items from the model,
+ so we explicitly create a new selection that is shared between the
+ tree view and the list view. As a result, changes to the selection
+ in either of these views will automatically cause the selection in
+ the other to change.
+
+ \image interview-shareddirmodel.png
+
+ The model/view architecture allows us to replace the QDirModel in
+ this example with a completely different model, one that will perhaps
+ obtain data from a remote server, or from a database.
+
+ \section2 Creating a Custom Model
+
+ In this example, we display items of data obtained from a custom list
+ model using a standard view. The custom model is a subclass of
+ QAbstractListModel and provides implementations of a core set of
+ functions.
+
+ The complete declaration of our model is as follows:
+
+ \snippet doc/src/snippets/stringlistmodel/model.h 0
+ \snippet doc/src/snippets/stringlistmodel/model.h 1
+ \codeline
+ \snippet doc/src/snippets/stringlistmodel/model.h 5
+
+ The model takes a list of strings when constructed, and supplies these
+ to views as required. Since this is only a simple read-only model, we
+ only need to implement a few functions.
+
+ The underlying data structure used to hold the strings is a QStringList.
+ Since the model maps each item in the list to a row in the model, the
+ rowCount() function is quite simple:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 0
+
+ The data() function returns an item of data for each model index
+ supplied by a view:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 1
+
+ The data() function returns a QVariant containing the information
+ referred to by the model index. Items of data are returned to the view,
+ but only if a number of checks are satisfied; for example, if the view
+ specifies an invalid model index, the model indicates this by returning
+ an invalid QVariant.
+
+ Vertical and horizontal headers are supplied by the headerData()
+ function. In this model, the value returned for these items is the row
+ or column number, depending on the header:
+
+ \snippet doc/src/snippets/stringlistmodel/model.cpp 2
+
+ We only include an excerpt from the main() function for this short
+ example:
+
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 1
+ \dots
+ \snippet doc/src/snippets/stringlistmodel/main.cpp 3
+
+ We create a string list to use with the model, and we supply it to the
+ model when it is constructed. The information in the string list is
+ made available to the view via the model.
+
+ \image stringlistmodel.png
+
+ This example shows that it can be easy to populate views with data
+ from a simple model. The standard models and views planned for
+ Qt 4 will make the process even easier, and the convenience widgets
+ supplied provide support for the classic item-based approach.
+
+ \section1 What's Changed Since Qt 3?
+
+ The table and item view classes in Qt 3 implemented widgets that
+ both stored data and presented it to the user. These classes were
+ designed to be easy-to-use and consistent, but were sometimes
+ difficult to customize and extend.
+
+ The equivalent classes in Qt 4 are designed to be extensible while
+ remaining easy-to-use; the introduction of the model/view
+ architecture ensures that they will be more consistent than their
+ predecessors. The view classes provided can be summarized in the
+ following way:
+
+ \list
+ \i QListView class provides a view widget that looks similar to
+ Qt 3's QListBox widget, but displays data provided by a model.
+ It can also be used to display icons in a similar way to Qt 3's
+ QIconView.
+ \i The QTableView class is a view widget that displays tabular data
+ like Qt 3's QTable widget, but uses data provided by a model.
+ \i The QTreeView class provides a view widget that behaves like
+ Qt 3's QListView widget, except that it displays data provided
+ by a model.
+ \endlist
+
+ Since the model takes responsibility for supplying items of data,
+ and the view takes care of their presentation to the user, we do
+ not require item classes to represent individual items.
+ Delegates handle the painting and editing of data obtained from
+ the model.
+
+ Qt continues to provide a number of classic item view widgets with
+ familiar item-based interfaces that are not based on compatibility
+ classes:
+
+ \list
+ \i The QListWidget class provides a widget to display a
+ list of items, as found in Qt 3's QListBox class.
+ \i The QTreeWidget class implements the equivalent of Qt 3's
+ QListView class.
+ \i The QTableWidget class provides comparable functionality to
+ Qt 3's QTable class.
+ \endlist
+
+ Each of the convenience classes have a corresponding item class:
+ QListWidgetItem, QTreeWidgetItem, and QTableWidgetItem are the Qt 4
+ equivalents of Qt 3's QListBoxItem, QListViewItem, and QTableItem
+ respectively.
+
+ The move towards a model/view architecture presents both challenges
+ and opportunities for developers. Although the approach may appear to
+ be rather powerful for simple applications, it encourages greater
+ reuse of components within applications.
+*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
new file mode 100644
index 0000000..cd66c10
--- /dev/null
+++ b/doc/src/qt4-intro.qdoc
@@ -0,0 +1,641 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-intro.html
+ \title What's New in Qt 4
+
+ \startpage index.html Qt Reference Documentation
+ \nextpage The Tulip Container Classes
+
+ This document covers the most important differences between Qt 3
+ and Qt 4. Although it is not intended to be a comprehensive
+ porting guide, it tells you about the most important portability
+ issues that you may encounter. It also explains how to turn on Qt
+ 3 compatibility support.
+
+ \tableofcontents
+
+ \section1 New Technologies in Qt 4
+
+ Qt 4 introduces the following core technologies:
+
+ \list
+ \o \l{The Tulip Container Classes}{Tulip}, a new set of template container classes.
+
+ \o \l{The Interview Framework}{Interview}, a model/view architecture for item views.
+
+ \o \l{The Arthur Paint System}{Arthur}, the Qt 4 painting framework.
+
+ \o \l{The Scribe Classes}{Scribe}, the Unicode text renderer with a public API
+ for performing low-level text layout.
+
+ \o \l{The Qt 4 Main Window Classes}{Mainwindow}, a modern action-based
+ mainwindow, toolbar, menu, and docking architecture.
+
+ \o The new \l{The New Qt Designer}{\QD} user interface design tool.
+ \endlist
+
+ \section1 Recent Additions to Qt 4
+
+ The following features have been added to Qt since the first release of Qt 4:
+
+ In Qt 4.4:
+ \list
+ \o \l{QtWebkit Module}{Qt WebKit integration}, making it possible for developers
+ to use a fully-featured Web browser to display documents and access online
+ services.
+ \o A multimedia API provided by the \l{Phonon Overview}{Phonon Multimedia Framework}.
+ \o \l{QtXmlPatterns Module}{XQuery and XPath} support, providing facilities for
+ XML processing beyond that supported by the QtXml module.
+ \o Support for embedded widgets in \l{Graphics View} scenes.
+ \o The \l{Threading and Concurrent Programming}{QtConcurrent framework} for
+ concurrent programming using Qt paradigms and threading features.
+ \o An \l{QtHelp Module}{improved help system} that can be used in conjunction
+ with Qt Assistant or as an independent help resource manager.
+ \o Printing system improvements, including the QPrinterInfo, QPrintPreviewWidget
+ and QPrintPreviewDialog classes.
+ \o Support for \l{Windows CE - Introduction to using Qt}{Qt for Windows CE} as
+ a mainstream Qt platform.
+ \o Improvements in performance of Qt for Embedded Linux and extended support for
+ display hardware.
+ \endlist
+
+ In Qt 4.3:
+ \list
+ \o Support for different \l{The Qt 4 Main Window Classes}{main window paradigms and styles},
+ such as those found in Visual Studio or KDevelop.
+ \o The \l{QtScript} module, providing support for application scripting with ECMAScript.
+ \o Improved graphics features, including an experimental Direct3D paint engine
+ and improved provision for hardware accelerated rendering with OpenGL, and
+ support for OpenGL ES in Qt for Embedded Linux.
+ \o \l{QSvgGenerator}{Scalable Vector Graphics (SVG) export}, allowing SVG drawings to
+ be created using the standard QPainter API.
+ \o Support for arbitrary matrix transformations and set operations on painter paths.
+ \o Native look and feel on Windows Vista; improved look and feel on Mac OS X.
+ \o An improved \l{QMdiArea}{Multiple Document Interface (MDI)} implementation.
+ \o Continuous improvements to \QD, including support for
+ \l{Qt Designer's Widget Editing Mode#The Property Editor}{dynamic properties}.
+ \o Support for Secure Socket Layer (SSL) communications via the QSslSocket class.
+ \o Support for XML Localization Interchange File Format (XLIFF) files in \QL.
+ \o A new font subsystem for Qt for Embedded Linux.
+ \endlist
+
+ In Qt 4.2:
+ \list
+ \o The \l{Graphics View} framework for producing interactive graphics.
+ \o \l{Desktop Integration}{Desktop integration} facilities for applications.
+ \o \l{Qt Style Sheets} enable easy, yet powerful customization of
+ user interfaces.
+ \o Support for the \l{intro-to-dbus.html}{D-Bus} Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism.
+ \o An \l{Undo Framework}{Undo framework} based on the
+ \l{Books about GUI Design#Design Patterns}{Command pattern}.
+ \o Support for model-based \l{QCompleter}{text completion} in standard and
+ custom widgets.
+ \o New widgets and GUI features, such as QCalendarWidget and
+ QGLFramebufferObject.
+ \o Classes to provide higher level application infrastructure, such as
+ QFileSystemWatcher and QDataWidgetMapper.
+ \endlist
+
+ In Qt 4.1:
+ \list
+ \o Integrated support for rendering
+ \l{The Arthur Paint System#SVG Rendering Support}{Scalable Vector Graphics}
+ (SVG) drawings and animations.
+ \o Support for
+ \l{QWidget#Transparency and Double Buffering}{child widget transparency}
+ on all platforms.
+ \o A Portable Document Format (PDF) backend for Qt's printing system.
+ \o A \l{QTestLib Manual}{unit testing framework} for Qt applications and
+ libraries.
+ \o Modules for \l{QtDesigner}{extending \QD} and
+ \l{QtUiTools}{dynamic user interface building}.
+ \o New \l{Proxy Models}{proxy models} to enable view-specific sorting and
+ filtering of data displayed using item views.
+ \o Support for \l{Installing Qt on Mac OS X}{universal binaries} on Mac OS X.
+ \o Additional features for developers using \l{QtOpenGL}{OpenGL}, such as
+ support for pixel and sample buffers.
+ \o A flexible \l{QSyntaxHighlighter}{syntax highlighting class} based on the
+ \l{Scribe} rich text framework.
+ \o Support for \l{QNetworkProxy}{network proxy} servers using the SOCKS5
+ protocol.
+ \o Support for OLE verbs and MIME data handling in \l{ActiveQt}.
+ \endlist
+
+ For more information about improvements in the current release, see
+ the \l{http://www.qtsoftware.com/developer/changes/changes-4.1.4/}
+ {detailed list of changes}.
+
+ \section1 Significant Improvements
+
+ The following modules have been significantly improved for Qt 4:
+
+ \list
+ \o A fully cross-platform \l{accessibility}
+ module, with support for the emerging SP-API Unix standard in
+ addition to Microsoft and Mac Accessibility.
+ \o The \l{qt4-sql.html}{SQL module}, which is now based on the
+ Interview model/view framework.
+ \o The \l{qt4-network.html}{network module}, with better support
+ for UDP and synchronous sockets.
+ \o The \l{qt4-styles.html}{style API}, which is now decoupled from
+ the widgets, meaning that you can draw any user interface element on
+ any device (widget, pixmap, etc.).
+ \o Enhanced \l{qt4-threads.html}{thread support}, with signal-slot
+ connections across threads and per-thread event loops.
+ \o A new \l{resource system} for embedding images
+ and other resource files into the application executable.
+ \endlist
+
+ \section1 Build System
+
+ Unlike previous Qt releases, Qt 4 is a collection of smaller
+ libraries:
+
+ \table
+ \header \o Library \o Description
+ \row \o \l{QtCore} \o Core non-GUI functionality
+ \row \o \l{QtGui} \o Core GUI functionality
+ \row \o \l{QtNetwork} \o Network module
+ \row \o \l{QtOpenGL} \o OpenGL module
+ \row \o \l{QtSql} \o SQL module
+ \row \o \l{QtSvg} \o SVG rendering classes
+ \row \o \l{QtXml} \o XML module
+ \row \o \l{Qt3Support} \o Qt 3 support classes
+ \row \o \l{QAxContainer} \o ActiveQt client extension
+ \row \o \l{QAxServer} \o ActiveQt server extension
+ \row \o \l{QtAssistant} \o Classes for launching Qt Assistant
+ \row \o \l{QtDesigner} \o Classes for extending and embedding Qt Designer
+ \row \o \l{QtUiTools} \o Classes for dynamic GUI generation
+ \row \o \l{QtTest} \o Tool classes for unit testing
+ \endtable
+
+ QtCore contains tool classes like QString, QList, and QFile, as
+ well as kernel classes like QObject and QTimer. The QApplication
+ class has been refactored so that it can be used in non-GUI
+ applications. It is split into QCoreApplication (in \l QtCore)
+ and QApplication (in \l QtGui).
+
+ This split makes it possible to develop server applications using Qt
+ without linking in any unnecessary GUI-related code and without
+ requiring GUI-related system libraries to be present on the target
+ machine (e.g. Xlib on X11, Carbon on Mac OS X).
+
+ If you use qmake to generate your makefiles, qmake will by default
+ link your application against QtCore and QtGui. To remove the
+ dependency upon QtGui, add the line
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 0
+
+ to your .pro file. To enable the other libraries, add the line
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 1
+
+ Another change to the build system is that moc now understands
+ preprocessor directives. qmake automatically passes the defines set
+ for your project (using "DEFINES +=") on to moc, which has its own
+ built-in C++ preprocessor.
+
+ To compile code that uses .ui files, you will also need this line in
+ the .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 2
+
+ \section1 Include Syntax
+
+ The syntax for including Qt class definitions has become
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 3
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 4
+
+ This is guaranteed to work for any public Qt class. The old syntax,
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 5
+
+ still works, but we encourage you to switch to the new syntax.
+
+ If you attempt to include a header file from a library that isn't
+ linked against the application, this will result in a
+ compile-time warning (e.g., "QSqlQuery: No such file or
+ directory"). You can remedy to this problem either by removing
+ the offending include or by specifying the missing library in the
+ QT entry of your \c .pro file (see \l{Build System} above).
+
+ To include the definitions for all the classes in a library, simply
+ specify the name of that library. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 6
+
+ \section1 Namespaces
+
+ Qt 2 introduced a class called Qt for global-like constants
+ (e.g., \c{Qt::yellow}). The C++ namespace construct was not used
+ because not all compilers understood it when it was released.
+
+ With Qt 4, the Qt class has become the Qt namespace. If you want
+ to access a constant that is part of the Qt namespace, prefix it
+ with \c Qt:: (e.g., \c{Qt::yellow}), or add the directive
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 7
+
+ at the top of your source files, after your \c #include
+ directives. If you use the \c{using namespace} syntax you don't
+ need the prefix (e.g., \c yellow is sufficient).
+
+ When porting Qt 3 applications, you may run into some source
+ compatibility problems with some of these symbols. For example,
+ in Qt 3, it was legal to write \c QWidget::yellow instead of \c
+ Qt::yellow, because QWidget inherited from Qt. This won't work in
+ Qt 4; you must write \c Qt::yellow or add the "using namespace"
+ directive and drop the \c Qt:: prefix.
+
+ The \l{qt3to4 - The Qt 3 to 4 Porting Tool}{qt3to4} porting tool
+ automates this conversion.
+
+ \section1 QObject/QWidget Constructors
+
+ In Qt 4 we have tried to simplify the constructors of QObject/QWidget
+ subclasses. This makes subclassing easier, at the same time as it
+ helps make the Qt library more efficient.
+
+ Constructors no longer take a "const char *name" parameter. If
+ you want to specify a name for a QObject, you must call
+ QObject::setObjectName() after construction. The object name is
+ now a QString. The reasons for this change are:
+
+ \list
+ \o Code that used it looked confusing, for example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 8
+
+ \c label1 is a QLabel that displays the text "Hello"; \c
+ label2 is a QLabel with no text, with the object name
+ "Hello".
+
+ \o From surveys we did, most users didn't use the name, although
+ they blindly followed Qt's convention and provided a "const
+ char *name" in their subclasses's constructors. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 9
+
+ \o The name parameter was in Qt since version 1, and it always
+ was documented as: "It is not very useful in the current
+ version of Qt, but it will become increasingly important in
+ the future." Ten years later, it still hasn't fulfilled its
+ promise.
+ \endlist
+
+ QWidget's \c WFlags data type has been split in two:
+ Qt::WindowFlags specifies low-level window flags (the type of
+ window and the frame style), whereas Qt::WidgetAttribute
+ specifies various higher-level attributes about the widget (e.g.,
+ WA_StaticContents). Widget attributes can be set at any time
+ using QWidget::setAttribute(); low-level window flags can be
+ passed to the QWidget constructor or set later using
+ QWidget::setParent(). As a consequence, the constructors of most
+ QWidget subclasses don't need to provide a \c WFlags parameter.
+
+ The \e parent parameter of all QObject classes in Qt defaults to
+ a 0 pointer, as it used to do in Qt 1. This enables a style of
+ programming where widgets are created without parents and then
+ inserted in a layout, at which point the layout automatically
+ reparents them.
+
+ \section1 Dynamic Casts
+
+ Qt 4 provides a qobject_cast<>() function that performs a dynamic cast
+ based on the meta-information generated by moc for QObject
+ subclasses. Unlike the standard C++ dynamic_cast<>() construct,
+ qobject_cast<>() works even when RTTI is disabled, and it works correctly
+ across DLL boundaries.
+
+ Here's the Qt 3 idiom to cast a type to a subtype:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 10
+
+ The Qt 4 idiom is both cleaner and safer, because typos will always
+ result in compiler errors:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 11
+
+ \section1 QPointer<T>
+
+ The QPointer<T> class provides a pointer to type T (where T inherits
+ from QObject) that is automatically set to 0 when the referenced
+ object is destroyed. Guarded pointers are useful whenever you want to
+ store a pointer to an object you do not own.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 12
+
+ QPointer<T> is more or less the same as the old QGuardedPtr<T> class,
+ except that it is now implemented in a much more lightweight manner
+ than before. The cost of one QPointer<T> object is now approximately
+ the same as that of a signal--slot connection.
+
+ \section1 Paint Events
+
+ Qt 4 supports double buffering transparently on all platforms. This
+ feature can be turned off on a per-widget basis by calling
+ QWidget::setAttribute(Qt::WA_PaintOnScreen).
+
+ A consequence of this is that all painting must now be done from the
+ paintEvent() function. This is also required by the HIView API on Mac
+ OS X. In practice, this is seldom a problem, since you can call
+ update() from anywhere in your code to create a paint event, with the
+ region to update as the argument.
+
+ To help porting, QWidget supports a Qt::WA_PaintOutsidePaintEvent
+ attribute that can be set to make it possible to paint outside
+ \l{QWidget::paintEvent()}{paintEvent()} on Windows and X11.
+
+ \section1 Qt 3 Support Layer
+
+ Qt 4 provides an extension library that applications based on Qt 3,
+ called Qt3Support, that Qt applications can link against. This allows
+ for more compatibility than ever before, without bloating Qt.
+
+ \list
+ \o Classes that have been replaced by a different class with the
+ same name, such as QListView, and classes that no longer exist in Qt 4
+ are available with a \c 3 in their name (e.g., Q3ListView, Q3Accel).
+
+ \o Other classes provide compatibility functions. Most of these are
+ implemented inline, so that they don't bloat the Qt libraries.
+ \endlist
+
+ To enable the Qt 3 support classes and functions, add the line
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 13
+
+ to your \c .pro file.
+
+ On Visual C++ 7 and GCC 3.2+, using compatibility functions often results
+ in a compiler warning (e.g., "'find' is deprecated"). If you want to turn
+ off that warning, add the line
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 14
+
+ to your \c .pro file.
+
+ If you want to use compatibility functions but don't want to link
+ against the Qt3Support library, add the line
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 15
+
+ or
+
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 16
+
+ to your \c .pro file, depending on whether you want compatibility
+ function calls to generate compiler warnings or not.
+*/
+
+/*!
+ \page qt4-5-intro.html
+ \title What's New in Qt 4.5
+
+ Qt 4.5 provides many improvements and enhancements over the previous releases
+ in the Qt 4 series. This document covers the most important features in this
+ release, separated by category.
+
+ A comprehensive list of changes between Qt 4.4 and Qt 4.5 is included
+ in the \c changes-4.5.0 file
+ \l{http://www.qtsoftware.com/developer/changes/changes-4.5.0}{available online}.
+ A \l{Known Issues in %VERSION%}{list of known issues} for this release is also
+ available.
+ \omit
+ Changes between this release and the previous release are provided
+ in the \c{changes-%VERSION%} file (also
+ \l{http://www.qtsoftware.com/developer/changes/changes-%VERSION%}{available online}).
+ \endomit
+
+ A list of other Qt 4 features can be found on the
+ \bold{\l{What's New in Qt 4}} page.
+
+ \bold{Highlights}
+
+ \tableofcontents
+
+ \section1 Qt WebKit Integration
+
+ \image webkit-netscape-plugin.png
+
+ The WebKit browser engine included with Qt has been upgraded to the latest
+ upstream (trunk) version of WebKit, bringing the latest features and
+ improvements to Qt applications. These include:
+
+ \list
+ \o Support for full page zooming, with appropriate rescaling of images and fonts.
+ \o The CSS-based transformation and animation features provided by a WebKit
+ extension.
+ \o Performance improvements due to faster JavaScript engine and optimized
+ page loading.
+ \endlist
+
+ Standards compatibility improvements include provision for the Netscape plugin
+ API, allowing most Netscape plugins to be used in-process, support for HTML 5
+ audio and video elements using Qt's Phonon integration, and
+ \l{Web Application Support}{facilities for client-side storage of Web content}.
+
+ \section1 Performance Improvements
+
+ The introduction of the QtBenchLib performance benchmarking library enables
+ performance benchmarking and regression testing. Core parts of Qt itself have
+ undergone focused re-engineering for improved graphics performance, including
+ paint engine and text rendering improvements, Graphics View and style sheet
+ performance improvements.
+
+ The X11 paint engine now uses XSHM (the X shared memory extension), resulting
+ in reduced overhead for painting operations.
+
+ A new OpenGL ES 2.0-based paint engine complements the existing OpenGL paint
+ engine, but with a focus on embedded devices.
+
+ Qt now features a pluggable graphics system, making it possible for users
+ and developers to select raster, OpenGL or native graphics systems to take
+ into account the specific needs of their applications and get the best
+ performance out of them.
+
+ \section1 Mac OS X Cocoa Support
+
+ \image mac-cocoa.png
+
+ Qt for Mac OS X has been substantially rewritten to use Apple's Cocoa API,
+ enabling Qt applications to be deployed on 64-bit Macintosh hardware.
+ In addition, the new QMacCocoaViewContainer and QMacNativeWidget classes
+ provide integration with Cocoa's own features and controls.
+
+ For many applications, a simple recompilation is all that is required
+ to produce an executable for 64-bit systems. Applications that use
+ specific features may require a few changes first.
+
+ \section1 Windows CE Feature Parity
+
+ Qt for Windows CE has been updated to bring features of Qt 4.4 and Qt 4.5
+ to the Windows CE platform, including:
+
+ \list
+ \o Phonon Multimedia Framework, using a Direct-Show based backend for audio
+ and video playback and a Simple WaveOut backend for devices without DirectShow.
+ \o The inclusion of Qt WebKit integration features previously unavailable for
+ Qt 4.4 on Windows CE.
+ \endlist
+
+ Support on all Windows CE platforms; recommended for WinCE 6 and higher.
+
+ The inclusion of these features enables developers to easily integrate Web and
+ multimedia content into Qt applications on Windows CE Standard Edition while
+ retaining full cross-platform compatibility with other Qt platforms.
+
+ \section1 XML Transformations with XSLT
+
+ The QtXmlPatterns module has been extended to cover XSLT, a transformation language
+ for XML documents. A common application of this is the transformation of XML data
+ into human-readable formats for reporting purposes.
+
+ XSLT makes it simple to reformat XML content without changing data structures,
+ removes the need for an intermediate DOM layer for presentation, and enables
+ rapid solutions to be created; for example, creating reports as HTML or PDF.
+
+ \section1 Qt Script Debugger
+
+ \image qtscript-debugger-small.png
+
+ Developers using Qt Script in their applications can take advantage of
+ the new \l{Qt Script Debugger Manual}{Qt Script Debugger} to provide
+ error reporting for scripts, and to let users track down bugs in their
+ own scripts.
+
+ Many standard features of GUI debugging tools are present, allowing the
+ developer to step through running script code, inspect variables,
+ automatically catch exceptions, and set conditional breakpoints.
+
+ \section1 OpenDocument File Format Support
+
+ Qt 4.5 includes support for writing rich text documents as OpenDocument files via
+ the newly-introduced QTextDocumentWriter class. This provides an generic mechanism
+ for file export that can be used to introduce support for additional formats in
+ future releases.
+
+ \section1 Improved Network Proxy Support
+
+ Qt's networking classes have been updated with
+ \l{QtNetwork Module#Support for Network Proxies}{improved proxy support}.
+ This includes improved integration with system proxy settings and the added
+ ability to handle non-trivial proxy cases.
+
+ \section1 Qt Designer Improvements
+
+ \image designer-screenshot-small.png
+
+ Qt Designer 4.5 boasts some improvements on usability, for example:
+
+ \list
+ \o \bold{Icon Mode} for the widget box which substantially reduces
+ scrolling.
+ \o \bold{Morphing Widgets} which lets you morph similar widget types,
+ e.g., a QWidget to a QFrame, types via the context menu's
+ \e{Morph into} entry.
+ \o \bold{Filters} for the \gui{Property Editor} that lets you find
+ properties or widgets quickly.
+ \o \bold{Find option} for the \gui{Object Inspector} that performs an
+ incremental search on the form's widgets. Also, the objects' layout
+ state is displayed here with using an icon on the left. Broken
+ layouts are represented with the same icon used for the
+ \e{Break Layout} action.
+ \endlist
+
+ In addition, Qt Designer now features an \gui{Embedded Design} tab that can
+ be found in the \gui Preferences dialog. Within this tab, you can define
+ embedded device profiles. These profiles contains screen settings, e.g.,
+ display resolution, default font and default style. Qt Designer will use
+ these settings when you edit forms.
+
+ More information about these improvements can be found in the
+ \l{What's New in Qt Designer 4.5} overview.
+
+ \section1 Qt Linguist Improvements
+
+ Qt Linguist can now load and edit multiple translation files simultaneously.
+
+ Support for XML Localization Interchange File Format (XLIFF) files, previously added
+ to the \c lupdate tool in Qt 4.3, has been improved and extended to the rest of the
+ Qt Linguist toolchain. This enables files stored in Qt's TS translation format to
+ be exported for use with other tools.
+
+ The GNU Gettext PO format, which is commonly used in Open Source projects,
+ is now supported by Qt Linguist.
+
+ Support for a new way to annotate messages, using comments in the source code,
+ has been added to the toolchain. See the QObject::tr() documentation for a detailed
+ description and examples.
+
+ The new \c lconvert filter tool facilitates conversion between file formats and
+ can be used to perform other transformations on collections of translatable strings.
+
+ \section1 Graphics Enhancements
+
+ In addition to the performance improvements in this release, a number of graphics
+ enhancements extend support for existing features to more platforms and expand Qt's
+ core set of features with successful add-ons.
+
+ Widget style sheets can now be used on Mac OS X, making this approach to theming
+ and styling viable for truly cross-platform applications.
+
+ Support for ARGB top-level widgets, previously available as a separate solution,
+ is now provided as an integral part of Qt. This makes it possible to create windows
+ with translucent regions on systems with the appropriate support from the user's
+ window system. See the \l{QWidget#Creating Translucent Windows}{Creating Translucent
+ Windows} section of the QWidget documentation for details of this feature.
+
+
+ \image gtk-style-screenshot.png
+
+ Improved GTK+ integration provided by the QGtkStyle class improves the look and feel
+ of Qt applications in GNOME and other GTK-based environments. The screenshot above
+ illustrates this clearly.
+*/
diff --git a/doc/src/qt4-mainwindow.qdoc b/doc/src/qt4-mainwindow.qdoc
new file mode 100644
index 0000000..ad5aec2
--- /dev/null
+++ b/doc/src/qt4-mainwindow.qdoc
@@ -0,0 +1,250 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-mainwindow.html
+ \title The Qt 4 Main Window Classes
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Scribe Classes
+ \nextpage The New Qt Designer
+
+ Qt 4 introduces a new set of main window classes that supersede the
+ Qt 3 main window classes, providing a more efficient implementation
+ while remaining easy to use.
+
+ \tableofcontents
+
+ \section1 Overview of the Main Window Classes
+
+ The main window-related classes have been redesigned to satisfy a
+ number of requirements, addressing issues raised by our customers and
+ internal developers. The aim of this redesign is to provide a more
+ consistent and efficient framework for main window management.
+
+ \section1 The Main Window Classes
+
+ Qt 4 provides the following classes for managing main windows and
+ associated user interface components:
+
+ \list
+ \o QMainWindow remains the central class around which applications
+ can be built. The interface to this class has been simplified, and
+ much of the functionality previously included in this class is now
+ present in the companion QDockWidget and QToolBar classes.
+
+ \o QDockWidget provides a widget that can be used to create
+ detachable tool palettes or helper windows. Dock widgets keep track
+ of their own properties, and they can be moved, closed, and floated
+ as external windows.
+
+ \o QToolBar provides a generic toolbar widget that can hold a
+ number of different action-related widgets, such as buttons,
+ drop-down menus, comboboxes, and spin boxes. The emphasis on a
+ unified action model in Qt 4 means that toolbars cooperate well
+ with menus and keyboard shortcuts.
+ \endlist
+
+ \section1 Example Code
+
+ Using QMainWindow is straightforward. Generally, we subclass
+ QMainWindow and set up menus, toolbars, and dock widgets inside
+ the QMainWindow constructor.
+
+ To add a menu bar to the main window, we simply create the menus, and
+ add them to the main window's menu bar. Note that the
+ QMainWindow::menuBar() function will automatically create the menu bar
+ the first time it is called. You can also call
+ QMainWindow::setMenuBar() to use a custom menu bar in the main window.
+
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 0
+ \dots
+ \snippet examples/mainwindows/menus/mainwindow.cpp 5
+ \dots
+
+ Once actions have been created, we can add them to the main window
+ components. To begin with, we add them to the pop-up menus:
+
+ \snippet examples/mainwindows/menus/mainwindow.cpp 10
+ \dots
+ \snippet examples/mainwindows/menus/mainwindow.cpp 11
+ \dots
+
+ The QToolBar and QMenu classes use Qt's action system to provide a
+ consistent API. In the above code, some existing actions were added to
+ the file menu with the QMenu::addAction() function. QToolBar also
+ provides this function, making it easy to reuse actions in different
+ parts of the main window. This avoids unnecessary duplication of work.
+
+ We create a toolbar as a child of the main window, and add the desired
+ actions to it:
+
+ \snippet examples/mainwindows/sdi/mainwindow.cpp 0
+ \dots
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 1
+
+ In this example, the toolbar is restricted to the top and bottom
+ toolbar areas of the main window, and is initially placed in the
+ top tool bar area. We can see that the actions specified by \c
+ newAct and \c openAct will be displayed both on the toolbar and in
+ the file menu.
+
+ QDockWidget is used in a similar way to QToolBar. We create a
+ dock widget as a child of the main window, and add widgets as children
+ of the dock widget:
+
+ \snippet doc/src/snippets/dockwidgets/mainwindow.cpp 0
+
+ In this example, the dock widget can only be placed in the left and
+ right dock areas, and it is initially placed in the left dock area.
+
+ The QMainWindow API allows the programmer to customize which dock
+ widget areas occupy the four corners of the dock widget area. If
+ required, the default can be changed with the
+ QMainWindow::setCorner() function:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 2
+
+ The following diagram shows the configuration produced by the above code.
+ Note that the left and right dock widgets will occupy the top and bottom
+ corners of the main window in this layout.
+
+ \image mainwindow-docks-example.png
+
+ Once all of the main window components have been set up, the central widget
+ is created and installed by using code similar to the following:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 3
+
+ The central widget can be any subclass of QWidget.
+
+ \section1 What's Changed since Qt 3?
+
+ The main window classes in Qt 4 adds new functionality, mainly to
+ the dock widgets and toolbars. We have also made changes to the
+ design of the framework.
+
+ Although the QMainWindow class in Qt 3 provided support for
+ toolbars, dock widgets, and other standard user interface
+ components, its design meant that these items were managed
+ through a large number of QMainWindow member functions. In Qt 4,
+ the QMainWindow class delegates many of the management tasks to
+ QDockWidget and QToolBar (allowing more consistent behavior to be
+ defined and implemented).
+
+ The dock widget and toolbar classes are now separated into
+ independent classes. (write some more here)
+
+ (It is intended that these changes allow more consistent behavior
+ to be defined and implemented (which? example). In
+ response to feedback from customers, we hope to improve these classes
+ even further.)
+
+ \section2 New Functionality
+
+ Dock widgets are animated when docking or
+ detaching from a dock area. The dock areas will also adjust their
+ size to show where the dock widget will dock when it hovers over
+ it. This animation can be turned off with \c setAnimated().
+
+ By default, dock widgets are added to the dock areas in a single
+ row. By setting nesting enabled with \c setDockNestingEnabled(),
+ the widgets can be added both vertically and horizontally.
+
+ Two dock widgets can occupy the same space in a dock area. The user
+ can then choose which widget that is visible with a tab bar that
+ is located below the widgets. The QMainWindow::tabifyDockWidget()
+ joins two tab widgets in such a tabbed dock area. (revise the
+ entire paragraph)
+
+ \section2 Independent QDockWidget And QToolBar Classes
+
+ Toolbar and dock window functionality is provided by two independent
+ classes: QToolBar and QDockWidget. Toolbars and dock widgets
+ reside in separate areas, with toolbars outside the dock widget
+ area. This behavior differs from the Qt 3 behavior, where
+ QToolBar inherited functionality from QDockWidget, and both types of
+ component shared the same areas. The result is a more consistent
+ and predictable experience for users. Toolbars and dock widgets
+ provide feedback while being dragged into their new positions.
+
+ \image mainwindow-docks.png
+
+ The diagram above shows the layout of a main window that contains both
+ toolbars and dock widgets. Each corner area can be used by either
+ of the adjacent dock widget areas, allowing dock widget behavior and
+ main window layout to be specified precisely.
+
+ Toolbars and dock widgets are child widgets of the main window. They
+ are no longer reparented into a dock area widget by the main window.
+ Instead, layouts are used to manage the placement of toolbars and dock
+ widgets. One consequence is that the old QDockArea class is no
+ longer required in Qt 4.
+
+ \section2 Code Change Examples
+
+ QMainWindow retains the menuBar() function, but menus are always
+ constructed using QAction objects. All kinds of menus are
+ constructed using the general QMenu class.
+
+ Qt 3:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 4
+ Qt 4:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 5
+
+ Toolbars follow the same pattern as menus, with the new, more
+ consistent behavior:
+
+ Qt 3:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 6
+ Qt 4:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 7
+
+ The behavior of dock widgets is now configured through the member
+ functions of QDockWidget. For example, compare the old and new ways
+ of creating a dock widget in the dock area on the left hand side of the
+ main window.
+
+ In Qt 3:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 8
+ In Qt 4:
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 9
+*/
diff --git a/doc/src/qt4-network.qdoc b/doc/src/qt4-network.qdoc
new file mode 100644
index 0000000..35418cc
--- /dev/null
+++ b/doc/src/qt4-network.qdoc
@@ -0,0 +1,243 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-network.html
+ \title The Network Module in Qt 4
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Qt 4 Database GUI Layer
+ \nextpage The Qt 4 Style API
+
+ The network module in Qt 4 provides some new features, such as
+ support for internationalized domain names, better IPv6 support,
+ and better performance. And since Qt 4 allows us to break binary
+ compatibility with previous releases, we took this opportunity to
+ improve the class names and API to make them more intuitive to
+ use.
+
+ \tableofcontents
+
+ \section1 General Overview
+
+ Compared to Qt 3, the network module in Qt 4 brings the following
+ benefits:
+
+ \list
+ \o The Qt 4 network classes have more intuitive names and APIs.
+ For example, QServerSocket has been renamed QTcpServer.
+ \o The entire network module is \l{reentrant}, making it
+ possible to use them simultaneously from multiple threads.
+ \o It is now possible to send and receive UDP datagrams and to
+ use synchronous (i.e., blocking) sockets without having to
+ use a low-level API (QSocketDevice in Qt 3).
+ \o QHostAddress and QHostInfo support internationalized domain names
+ (RFC 3492).
+ \o QUrl is more lightweight and fully supports the latest URI
+ specification draft.
+ \o UDP broadcasting is now supported.
+ \endlist
+
+ The Qt 4 network module provides fundamental classes for writing
+ TCP and UDP applications, as well as higher-level classes that
+ implement the client side of the HTTP and FTP protocols.
+
+ Here's an overview of the TCP and UDP classes:
+
+ \list
+ \o QTcpSocket encapsulates a TCP socket. It inherits from
+ QIODevice, so you can use QTextStream and QDataStream to read
+ or write data. It is useful for writing both clients and
+ servers.
+ \o QTcpServer allows you to listen on a certain port on a
+ server. It emits a
+ \l{QTcpServer::newConnection()}{newConnection()} signal every
+ time a client tries to connect to the server. Once the
+ connection is established, you can talk to the client using
+ QTcpSocket.
+ \o QUdpSocket is an API for sending and receiving UDP datagrams.
+ \endlist
+
+ QTcpSocket and QUdpSocket inherit most of their functionality
+ from QAbstractSocket. You can also use QAbstractSocket directly
+ as a wrapper around a native socket descriptor.
+
+ By default, the socket classes work asynchronously (i.e., they
+ are non-blocking), emitting signals to notify when data has
+ arrived or when the peer has closed the connection. In
+ multithreaded applications and in non-GUI applications, you also
+ have the opportunity of using blocking (synchronous) functions on
+ the socket, which often results in a more straightforward style
+ of programming, with the networking logic concentrated in one or
+ two functions instead of spread across multiple slots.
+
+ QFtp and QHttp use QTcpSocket internally to implement the FTP and
+ HTTP protocols. Both classes work asynchronously and can schedule
+ (i.e., queue) requests.
+
+ The network module contains four helper classes: QHostAddress,
+ QHostInfo, QUrl, and QUrlInfo. QHostAddress stores an IPv4 or IPv6
+ address, QHostInfo resolves host names into addresses, QUrl stores a
+ URL, and QUrlInfo stores information about a resource pointed to
+ by a URL, such as the file size and modification date. (Because
+ QUrl is used by QTextBrowser, it is part of the QtCore library and
+ not of QtNetwork.)
+
+ See the \l QtNetwork module overview for more information.
+
+ \section1 Example Code
+
+ All the code snippets presented here are quoted from
+ self-contained, compilable examples located in Qt's \c
+ examples/network directory.
+
+ \section2 TCP Client
+
+ The first example illustrates how to write a TCP client using
+ QTcpSocket. The client talks to a fortune server that provides
+ fortune to the user. Here's how to set up the socket:
+
+ \snippet examples/network/fortuneclient/client.cpp 1
+ \codeline
+ \snippet examples/network/fortuneclient/client.cpp 2
+ \snippet examples/network/fortuneclient/client.cpp 4
+
+ When the user requests a new fortune, the client establishes a
+ connection to the server:
+
+ \snippet examples/network/fortuneclient/client.cpp 7
+
+ When the server answers, the following code is executed to read
+ the data from the socket:
+
+ \snippet examples/network/fortuneclient/client.cpp 9
+
+ The server's answer starts with a \e size field (which we store
+ in \c blockSize), followed by \e size bytes of data. If the
+ client hasn't received all the data yet, it waits for the server
+ to send more.
+
+ An alternative approach is to use a blocking socket. The code can
+ then be concentrated in one function:
+
+ \snippet examples/network/blockingfortuneclient/fortunethread.cpp 7
+
+ \section2 TCP Server
+
+ The following code snippets illustrate how to write a TCP server
+ using QTcpServer and QTcpSocket. Here's how to set up a TCP
+ server:
+
+ \snippet examples/network/fortuneserver/server.cpp 0
+ \codeline
+ \snippet examples/network/fortuneserver/server.cpp 3
+
+ When a client tries to connect to the server, the following code
+ in the sendFortune() slot is executed:
+
+ \snippet examples/network/fortuneserver/server.cpp 5
+
+ \section2 UDP Senders and Receivers
+
+ Here's how to broadcast a UDP datagram:
+
+ \snippet examples/network/broadcastsender/sender.cpp 0
+ \snippet examples/network/broadcastsender/sender.cpp 1
+
+ Here's how to receive a UDP datagram:
+
+ \snippet examples/network/broadcastreceiver/receiver.cpp 0
+ \codeline
+ \snippet examples/network/broadcastreceiver/receiver.cpp 1
+
+ Then in the processPendingDatagrams() slot:
+
+ \snippet examples/network/broadcastreceiver/receiver.cpp 2
+
+ \section1 Comparison with Qt 3
+
+ The main difference between Qt 3 and Qt 4 is that the very high
+ level QNetworkProtocol and QUrlOperator abstraction has been
+ eliminated. These classes attempted the impossible (unify FTP and
+ HTTP under one roof), and unsurprisingly failed at that. Qt 4
+ still provides QFtp and QHttp classes, but only with the more
+ mature API that appeared in Qt 3.1.
+
+ The QSocket class in Qt 3 has been renamed QTcpSocket. The new
+ class is reentrant and supports blocking. It's also easier to
+ handle closing than with Qt 3, where you had to connect to both
+ the QSocket::connectionClosed() and the
+ QSocket::delayedCloseFinished() signals.
+
+ The QServerSocket class in Qt 3 has been renamed QTcpServer. The
+ API has changed quite a bit. While in Qt 3 it was necessary to
+ subclass QServerSocket and reimplement the newConnection() pure
+ virtual function, QTcpServer now emits a
+ \l{QTcpServer::newConnection()}{newConnection()} signal that you
+ can connect to a slot.
+
+ The QHostInfo class has been redesigned to use the operating system's
+ getaddrinfo() function instead of implementing the DNS protocol.
+ Internally, QHostInfo simply starts a thread and calls getaddrinfo()
+ in that thread. This wasn't possible in Qt 3 because
+ getaddrinfo() is a blocking call and Qt 3 could be configured
+ without multithreading support.
+
+ The QSocketDevice class in Qt 3 is no longer part of the public
+ Qt API. If you used QSocketDevice to send or receive UDP
+ datagrams, use QUdpSocket instead. If you used QSocketDevice
+ because it supported blocking sockets, use QTcpSocket or
+ QUdpSocket instead and use the blocking functions
+ (\l{QAbstractSocket::waitForConnected()}{waitForConnected()},
+ \l{QAbstractSocket::waitForConnected()}{waitForReadyRead()},
+ etc.). If you used QSocketDevice from a non-GUI thread because it
+ was the only reentrant networking class in Qt 3, use QTcpSocket,
+ QTcpServer, or QUdpSocket instead.
+
+ Internally, Qt 4 has a class called QSocketLayer that provides a
+ cross-platform low-level socket API. It resembles the old
+ QSocketDevice class. We might make it public in a later release
+ if users ask for it.
+
+ As an aid to porting to Qt 4, the \l{Qt3Support}
+ library includes Q3Dns, Q3ServerSocket, Q3Socket, and Q3SocketDevice
+ classes.
+*/
diff --git a/doc/src/qt4-scribe.qdoc b/doc/src/qt4-scribe.qdoc
new file mode 100644
index 0000000..5061a82
--- /dev/null
+++ b/doc/src/qt4-scribe.qdoc
@@ -0,0 +1,257 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-scribe.html
+ \title The Scribe Classes
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Arthur Paint System
+ \nextpage The Qt 4 Main Window Classes
+
+ \keyword Scribe
+
+ Scribe introduces a set of text layout classes to Qt 4. These classes
+ replace the old rich text engine found in Qt 3, and provide new features
+ for processing and laying out both plain and rich text.
+
+ \tableofcontents
+
+ For more details about how to use the Scribe classes, see the
+ \l{richtext.html}{Rich Text Processing} document.
+
+ \section1 Overview of Scribe
+
+ Support for text rendering and layout in Qt 4 has been redesigned
+ around a system that allows textual content to be represented in a more
+ flexible way than was possible with Qt 3. Qt 4 also provides a more
+ convenient programming interface for editing documents. These
+ improvements are made available through a reimplementation of the
+ existing text rendering engine, and the introduction of several new
+ classes.
+
+ The following sections provide a brief overview of the main concepts
+ behind Scribe.
+
+ \section2 The Document Interface
+
+ Text documents are represented by the QTextDocument class, rather
+ than by QString objects. Each QTextDocument object contains
+ information about the document's internal representation, its
+ structure, and keeps track of modifications to provide undo/redo
+ facilities.
+ This approach allows features such as layout management to be
+ delegated to specialized classes, but also provides a focus for the
+ framework.
+
+ Documents are either converted from external sources or created from
+ scratch using Qt. The creation process can done by an editor widget,
+ such as QTextEdit, or by explicit calls to the Scribe API.
+
+ Text documents can be accessed in two complementary ways: as a linear
+ buffer for editors to use, and as an object hierarchy that is useful to
+ layout engines.
+ In the hierarchical document model, objects generally correspond to
+ visual elements such as frames, tables, and lists. At a lower level,
+ these elements describe properties such as the text style and alignment.
+ The linear representation of the document is used for editing and
+ manipulation of the document's contents.
+
+ \section2 Document Structure
+
+ Each document contains a root frame into which all other structural
+ elements are placed. This frame contains other structural elements,
+ including tables, text blocks, and other frames; these can be nested to
+ an arbitrary depth.
+
+ Frames provide logical separation between parts of the document, but
+ also have properties that determine how they will appear when rendered.
+ A table is a specialized type of frame that consists of a number of
+ cells, arranged into rows and columns, each of which can contain
+ further structure and text. Tables provide management and layout
+ features that allow flexible configurations of cells to be created.
+
+ Text blocks contain text fragments, each of which specifies text and
+ character format information. Textual properties are defined both at
+ the character level and at the block level. At the character level,
+ properties such as font family, text color, and font weight can be
+ specified. The block level properties control the higher level
+ appearance and behavior of the text, such as the direction of text
+ flow, alignment, and background color.
+
+ The document structure is not manipulated directly. Editing is
+ performed through a cursor-based interface.
+
+ \section2 Editing and Content Creation
+
+ Documents can be edited via the interface provided by the QTextCursor
+ class; cursors are either created using a constructor or obtained from
+ an editor widget. The cursor is used to perform editing operations that
+ correspond exactly to those the user is able to make themselves in an
+ editor. As a result, information about the document structure is also
+ available through the cursor, and this allows the structure to be
+ modified. The use of a cursor-oriented interface for editing makes the
+ process of writing a custom editor simpler for developers, since the
+ editing operations can be easily visualized.
+
+ The QTextCursor class also maintains information about any text it
+ has selected in the document, again following a model that is
+ conceptually similar to the actions made by the user to select text
+ in an editor.
+
+ \section2 Document Layout
+
+ The layout of a document is only relevant when it is to be displayed on
+ a device, or when some information is requested that requires a visual
+ representation of the document. Until this occurs, the document does
+ not need to be formatted and prepared for a device.
+
+ Each document's layout is managed by a subclass of the
+ QAbstractTextDocumentLayout class. This class provides a common
+ interface for layout and rendering engines. The default rendering
+ behavior is currently implemented in a private class. This approach
+ makes it possible to create custom layouts, and provides the
+ mechanism used when preparing pages for printing or exporting to
+ Portable Document Format (PDF) files.
+
+ \section1 Example Code
+
+ Here we present two different ways in which the Scribe classes can be
+ used: for creating and manipulating rich text, and for laying out
+ plain text.
+
+
+ \section2 Manipulating Rich Text
+
+ Rich text is stored in text documents that can either be created by
+ importing HTML from an external source, or generated using a
+ QTextCursor. The easiest way to use a rich text document is through
+ the QTextEdit class, providing an editable view onto a document. The code
+ below imports HTML into a document, and displays the document using a
+ text edit widget.
+
+ \snippet doc/src/snippets/scribe-overview/main.cpp 1
+
+ You can retrieve the document from the text edit using the
+ document() function. The document can then be edited programmatically
+ using the QTextCursor class. This class is modeled after a screen
+ cursor, and editing operations follow the same semantics. The following
+ code changes the first line of the document to a bold font, leaving all
+ other font properties untouched. The editor will be automatically
+ updated to reflect the changes made to the underlying document data.
+
+ \snippet doc/src/snippets/scribe-overview/main.cpp 0
+
+ Note that the cursor was moved from the start of the first line to the
+ end, but that it retained an anchor at the start of the line. This
+ demonstrates the cursor-based selection facilities of the
+ QTextCursor class.
+
+ Rich text can be generated very quickly using the cursor-based
+ approach. The following example shows a simple calendar in a
+ QTextEdit widget with bold headers for the days of the week:
+
+ \snippet doc/src/snippets/textdocument-blocks/mainwindow.cpp 0
+ \codeline
+ \snippet doc/src/snippets/textdocument-blocks/mainwindow.cpp 1
+ \snippet doc/src/snippets/textdocument-blocks/mainwindow.cpp 2
+ \snippet doc/src/snippets/textdocument-blocks/mainwindow.cpp 3
+
+ The above example demonstrates how simple it is to quickly generate new
+ rich text documents using a minimum amount of code. Although we have
+ generated a crude fixed-pitch calendar to avoid quoting too much code,
+ Scribe provides much more sophisticated layout and formatting features.
+
+ \section2 Plain Text Layout
+
+ Sometimes it is important to be able to format plain text within an
+ irregularly-shaped region, perhaps when rendering a custom widget, for
+ example. Scribe provides generic features, such as those provided by
+ the QTextLayout class, to help developers perform word-wrapping and
+ layout tasks without the need to create a document first.
+
+ \img plaintext-layout.png
+
+ Formatting and drawing a paragraph of plain text is straightforward.
+ The example below will lay out a paragraph of text, using a single
+ font, around the right hand edge of a circle.
+
+ \snippet doc/src/snippets/plaintextlayout/window.cpp 0
+
+ We create a text layout, specifying the text string we want to display
+ and the font to use. We ensure that the text we supplied is formatted
+ correctly by obtaining text lines from the text format, and wrapping
+ the remaining text using the available space. The lines are positioned
+ as we move down the page.
+
+ The formatted text can be drawn onto a paint device; in the above code,
+ the text is drawn directly onto a widget.
+
+ \section2 Printing Features
+
+ The layout system used to display rich text documents also supports
+ paged layout of documents, and this is used by Qt to generate output for
+ printing. The printing process is performed by QPrinter and controlled by
+ the user via options displayed in a QPrintDialog:
+
+ \snippet doc/src/snippets/textdocument-printing/mainwindow.cpp 0
+
+ Rich text documents can also be exported as PDF files using QPrinter and
+ the appropriate print engine:
+
+ \snippet demos/textedit/textedit.cpp 0
+
+ \section1 Comparison with Qt 3
+
+ The cursor-based editing features, combined with the structural document
+ model, provide a powerful set of tools for manipulating and displaying
+ rich text documents. These provide features that were unavailable in
+ Qt 3's public API. The engine used is a complete rewrite and does not
+ use the rich text engine supplied with Qt 3.
+
+ The QTextEdit class in Qt 4 has also been completely rewritten with an
+ API that is quite different from its Qt 3 counterpart. Some compatibility
+ methods have been added to allow the widget to be used, for basic cases,
+ in a way that is familiar to users of Qt 3. This class is provided as a
+ working example of an editor widget that uses the new API, showing that
+ it is possible to completely implement a document editor based on the
+ QTextCursor editing interface.
+*/
diff --git a/doc/src/qt4-sql.qdoc b/doc/src/qt4-sql.qdoc
new file mode 100644
index 0000000..cb94f54
--- /dev/null
+++ b/doc/src/qt4-sql.qdoc
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-sql.html
+ \title The Qt 4 Database GUI Layer
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage Cross-Platform Accessibility Support in Qt 4
+ \nextpage The Network Module in Qt 4
+
+ The GUI layer of the SQL module in Qt 4 has been entirely
+ redesigned to work with \l{qt4-interview.html}{Interview} (Qt's
+ new model/view classes). It consists of three model classes
+ (QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel)
+ that can be used with Qt's view classes, notably QTableView.
+
+ \section1 General Overview
+
+ The Qt 4 SQL classes are divided into three layers:
+
+ \list
+ \o The database drivers
+ \o The core SQL classes
+ \o The GUI classes
+ \endlist
+
+ The database drivers and the core SQL classes are mostly the same
+ as in Qt 3. The database item models are new with Qt 4; they
+ inherit from QAbstractItemModel and make it easy to present data
+ from a database in a view class such as QListView, QTableView,
+ and QTreeView.
+
+ The philosophy behind the Qt 4 SQL module is that it should be
+ possible to use database models for rendering and editing data
+ just like any other item models. By changing the model at
+ run-time, you can decide whether you want to store your data in
+ an SQL database or in, say, an XML file. This generic approach
+ has the additional benefit that you don't need to know anything
+ about SQL to display and edit data.
+
+ The Qt 4 SQL module includes three item models:
+
+ \list
+ \o QSqlQueryModel is a read-only model based on an arbitrary
+ SQL query.
+ \o QSqlTableModel is a read-write model that works on a single
+ table.
+ \o QSqlRelationalTableModel is a QSqlTableModel subclass with
+ foreign key support.
+ \endlist
+
+ Combined with Qt's view classes and Qt's default delegate class
+ (QItemDelegate), the models offer a very powerful mechanism for
+ accessing databases. For finer control on the rendering of the
+ fields, you can subclass one of the predefined models, or even
+ QAbstractItemDelegate or QItemDelegate if you need finer control.
+
+ You can also perform some customizations without subclassing. For
+ example, you can sort a table using QSqlTableModel::sort(), and
+ you can initialize new rows by connecting to the
+ QSqlTableModel::primeInsert() signal.
+
+ One nice feature supported by the read-write models is the
+ possibility to perform changes to the item model without
+ affecting the database until QSqlTableModel::submitAll() is
+ called. Changes can be dropped using QSqlTableModel::revertAll().
+
+ The new classes perform advantageously compared to the SQL
+ module's GUI layer in Qt 3. Speed and memory improvements in the
+ tool classes (especially QVariant, QString, and QMap) and in the
+ SQL drivers contribute to making Qt 4 database applications more
+ snappy.
+
+ See the \l QtSql module overview for a more complete introduction
+ to Qt's SQL classes.
+
+ \section1 Example Code
+
+ The simplest way to present data from a database is to simply
+ combine a QSqlQueryModel with a QTableView:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 0
+
+ To present the contents of a single table, we can use
+ QSqlTableModel instead:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 1
+
+ In practice, it's common that we need to customize the rendering
+ of a field in the database. In that case, we can create our own
+ model based on QSqlQueryModel. The next code snippet shows a
+ custom model that prepends '#' to the value in field 0 and
+ converts the value in field 2 to uppercase:
+
+ \snippet examples/sql/querymodel/customsqlmodel.h 0
+ \codeline
+ \snippet examples/sql/querymodel/customsqlmodel.cpp 0
+
+ It is also possible to subclass QSqlQueryModel to add support for
+ editing. This is done by reimplementing
+ QAbstractItemModel::flags() to specify which database fields are
+ editable and QAbstractItemModel::setData() to modify the
+ database. Here's an example of a setData() reimplementation that
+ changes the first or last name of a person:
+
+ \snippet examples/sql/querymodel/editablesqlmodel.cpp 1
+
+ It relies on helper functions called \c setFirstName() and
+ \c setLastName(), which execute an \c{update}. Here's
+ \c setFirstName():
+
+ \snippet examples/sql/querymodel/editablesqlmodel.cpp 2
+
+ See Qt's \c examples/sql directory for more examples.
+
+ \section1 Comparison with Qt 3
+
+ The core SQL database classes haven't changed so much since Qt 3.
+ Here's a list of the main changes:
+
+ \list
+ \o QSqlDatabase is now value-based instead of pointer-based.
+ \o QSqlFieldInfo and QSqlRecordInfo has been merged into
+ QSqlField and QSqlRecord.
+ \o The SQL query generation has been moved into the drivers. This
+ makes it possible to use non-standard SQL extensions. It also
+ opens the door to non-SQL databases.
+ \endlist
+
+ The GUI-related database classes have been entirely redesigned.
+ The QSqlCursor abstraction has been replaced with QSqlQueryModel
+ and QSqlTableModel; QSqlEditorFactory is replaced by
+ QAbstractItemDelegate; QDataTable is replaced by QTableView. The
+ old classes are part of the \l{Qt3Support} library to aid
+ porting to Qt 4.
+*/
diff --git a/doc/src/qt4-styles.qdoc b/doc/src/qt4-styles.qdoc
new file mode 100644
index 0000000..7e02ecc
--- /dev/null
+++ b/doc/src/qt4-styles.qdoc
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-styles.html
+ \title The Qt 4 Style API
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Network Module in Qt 4
+ \nextpage Thread Support in Qt 4
+
+ Qt's style API is responsible for performing the widget drawing
+ for built-in widgets. The Qt 4 style API has been revised to make
+ it possible for a style to draw widgets without calling any
+ functions on the widget.
+
+ Because Qt 4 is split across multiple libraries, Qt needed this
+ update to be able to draw widgets from other libraries than
+ QtGui. For application developers, this has other benefits, such
+ as more managable parameter lists and the possibility of drawing
+ any graphical element without having a widget of a specific
+ type.
+
+ \section1 General Overview
+
+ The QStyle class is an abstract base class that encapsulates
+ the look and feel of a GUI. Qt's built-in widgets use it to
+ perform nearly all of their drawing, ensuring that they look
+ exactly like the equivalent native widgets.
+
+ Most draw functions now take four arguments:
+
+ \list
+ \o an enum value specifying which graphical element to draw
+ \o a QStyleOption specifying how and where to render that element
+ \o a QPainter that should be used to draw the element
+ \o a QWidget on which the drawing is performed (optional)
+ \endlist
+
+ The style gets all the information it needs to render the
+ graphical element from QStyleOption. The widget is passed as the
+ last argument in case the style needs it to perform special
+ effects (such as animated default buttons on Mac OS X), but it
+ isn't mandatory. In fact, QStyle can be used to draw on any
+ paint device, not just widgets, by setting the QPainter properly.
+
+ Thanks to QStyleOption, it is now possible to make QStyle draw
+ widgets without linking in any code for the widget. This is how
+ Qt's built-in styles can draw Qt 3 widgets such as
+ Q3ListView without necessarily linking against the Qt3Support
+ library. Another significant benefit of the new approach is that
+ it's now possible to use \l{QStyle}'s draw functions on other
+ widgets than the built-in widgets; for example, you can draw a
+ combobox on any widget, not just on a QComboBox.
+
+ QStyleOption has various subclasses for the various types of
+ graphical elements that can be drawn, and it's possible to create
+ custom subclasses. For example, the QStyle::PE_FrameFocusRect
+ element expects a QStyleOptionFocusRect argument. This is
+ documented for each enum value.
+
+ When reimplementing QStyle functions that take a
+ QStyleOption parameter, you often need to cast the
+ QStyleOption to a subclass (e.g., QStyleOptionFocusRect). For
+ safety, you can use qstyleoption_cast() to ensure that the
+ pointer type is correct. If the object isn't of the right type,
+ qstyleoption_cast() returns 0. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 0
+
+ For performance reasons, there are few member functions and the
+ access to the variables is direct. This "low-level" feel makes
+ the structures use straightforward and emphasizes that these are
+ simply parameters used by the style functions. In addition, the
+ caller of a QStyle function usually creates QStyleOption
+ objects on the stack. This combined with Qt's extensive use of
+ \l{implicit sharing} for types such as QString, QPalette, and
+ QColor ensures that no memory allocation needlessly takes place.
+ (Dynamic memory allocation can be an expensive operation,
+ especially when drawing very often in a short time.)
+
+ \section1 Example Code
+
+ The following code snippet illustrates how to use QStyle to
+ draw the focus rectangle from a custom widget's paintEvent():
+
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 1
+
+ The next example shows how to derive from an existing style to
+ customize the look of a graphical element:
+
+ \snippet doc/src/snippets/customstyle/customstyle.h 0
+ \codeline
+ \snippet doc/src/snippets/customstyle/customstyle.cpp 2
+ \snippet doc/src/snippets/customstyle/customstyle.cpp 3
+ \snippet doc/src/snippets/customstyle/customstyle.cpp 4
+
+ See also the \l{Styles Example} for a more detailed description of
+ how custom styles can be created.
+
+ \section1 Comparison with Qt 3
+
+ The QStyle class has a similar API in Qt 4 as in Qt 3, with
+ more or less the same functions. What has changed is the
+ signature of the functions and the role played by QStyleOption.
+ For example, here's the signature of the QStyle::drawControl()
+ function in Qt 3:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 2
+
+ Here's the signature of the same function in Qt 4:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 3
+
+ In Qt 3, some of the information required to draw a graphical
+ element was stored in a QStyleOption parameter, while the rest
+ was deduced by querying the widget. In Qt 4, everything is stored
+ in the QStyleOption parameter.
+*/
diff --git a/doc/src/qt4-threads.qdoc b/doc/src/qt4-threads.qdoc
new file mode 100644
index 0000000..5239bba
--- /dev/null
+++ b/doc/src/qt4-threads.qdoc
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-threads.html
+ \title Thread Support in Qt 4
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage The Qt 4 Style API
+
+ Qt 4 makes it easier than ever to write multithreaded
+ applications. More classes have been made usable from non-GUI
+ threads, and the signals and slots mechanism can now be used to
+ communicate between threads.
+
+ \section1 General Overview
+
+ QThread now inherits QObject. It emits signals to indicate that
+ the thread started or finished executing, and provides a few
+ slots as well.
+
+ Each thread can now have its own event loop. The initial thread
+ starts its event loops using QCoreApplication::exec(); other
+ threads can start an event loop using QThread::exec(). Like
+ QCoreApplication, QThread also provides an
+ \l{QThread::exit()}{exit(int)} function and a
+ \l{QThread::quit()}{quit()} slot.
+
+ An event loop in a thread makes it possible for the thread to use
+ certain non-GUI Qt classes that require the presence of an event
+ loop (such as QTimer, QTcpSocket, and QProcess). It also makes it
+ possible to connect signals from any threads to slots of a
+ specific thread. When a signal is emitted, the slot isn't called
+ immediately; instead, it is invoked when control returns to the
+ event loop of the thread to which the object belongs. The slot is
+ executed in the thread where the receiver object lives. See
+ QObject::connect() for details.
+
+ Qt 4 also introduces a new synchronization class: QReadWriteLock.
+ It is similar to QMutex, except that it distinguishes between
+ "read" and "write" access to shared data and allows multiple
+ readers to access the data simultaneously. Using QReadWriteLock
+ instead of QMutex when it is possible can make multithreaded
+ programs more concurrent.
+
+ Since Qt 4, \l{implicitly shared} classes can safely be copied
+ across threads, like any other value classes. They are fully
+ reentrant. This is implemented using atomic reference counting
+ operations, which are implemented in assembly language for the
+ different platforms supported by Qt. Atomic reference counting is
+ very fast, much faster than using a mutex.
+
+ See \l{Thread Support in Qt} for more information.
+
+ \section1 Comparison with Qt 3
+
+ Earlier versions of Qt offered an option to build the library
+ without thread support. In Qt 4, threads are always enabled.
+
+ Qt 3 had a class called \c QDeepCopy that you could use to take a
+ deep copy of an implicitly shared object. In Qt 4, the atomic
+ reference counting makes this class superfluous.
+*/
diff --git a/doc/src/qt4-tulip.qdoc b/doc/src/qt4-tulip.qdoc
new file mode 100644
index 0000000..d1f925e
--- /dev/null
+++ b/doc/src/qt4-tulip.qdoc
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt4-tulip.html
+ \title The Tulip Container Classes
+
+ \contentspage {What's New in Qt 4}{Home}
+ \previouspage What's New in Qt 4
+ \nextpage The Interview Framework
+
+ Qt 4 introduces a new set of containers that supersede both the old
+ QCollection pointer-based containers and the newer QTL value-based
+ containers.
+
+ \tableofcontents
+
+ \section1 General Overview
+
+ The Tulip containers are similar to Qt 3's QTL containers
+ (QValueList, QValueVector, QMap), but have the following
+ advantages:
+
+ \list
+ \o The containers provide new iterators with a nicer, less
+ error-prone syntax than STL, inspired by Java's iterators. (The
+ STL-style iterators are still available as a lightweight,
+ STL-compatible alternative.)
+
+ \o The containers have been optimized for minimal code expansion.
+
+ \o An empty container performs no memory allocation, and only
+ requires the same space as a pointer.
+
+ \o Even though they are implicitly shared, they can safely be copied
+ across different threads without formality. There's no need to use
+ \c QDeepCopy.
+ \endlist
+
+ Tulip provides the following sequential containers: QList,
+ QLinkedList, QVector, QStack, and QQueue. For most
+ applications, QList is the best type to use. Although it is
+ implemented as an array-list, it provides very fast prepends and
+ appends. If you really need a linked-list, use QLinkedList; if you
+ want your items to occupy consecutive memory locations, use QVector.
+ QStack and QQueue are convenience classes that provide LIFO and
+ FIFO semantics.
+
+ Tulip also provides these associative containers: QMap,
+ QMultiMap, QHash, QMultiHash, and QSet. The "Multi" containers
+ conveniently support multiple values associated with a single
+ key. The "Hash" containers provide faster lookup by using a hash
+ function instead of a binary search on a sorted set.
+
+ The Tulip containers support the \l foreach keyword, a Qt-specific
+ addition to the C++ language that is implemented using the standard
+ C++ preprocessor. The syntax is:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 0
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 1
+
+ The iterator variable can also be defined outside the loop. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 2
+
+ Just like standard \c for loops, foreach supports braces, \c
+ break, \c continue, and nested loops. Qt makes a copy of the
+ container when it enters the loop. If you modify the container as
+ you are iterating, that won't affect the loop.
+
+ For details about the new containers, see the
+ \l{Generic Containers} and \l{Generic Algorithms} overview documents.
+
+ In addition to the new containers, considerable work has also gone into
+ QByteArray and QString. The Qt 3 QCString class has been
+ merged with QByteArray. The new QByteArray automatically provides
+ a '\0' terminator after the last character. For example, the byte array
+ of size 5 containing "abcde" has a null byte at position 5 (one past
+ the end). This solves all the typical problems that occurred in Qt 3
+ with conversions between QByteArray and QCString.
+
+ To avoid crashes, QByteArray::data() never returns a null
+ pointer. Furthermore, the distinction between null and empty
+ strings has been watered down so that \c{QByteArray() ==
+ QByteArray("")} and \c{QString() == QString("")}.
+
+ \section1 Examples
+
+ The first group of examples show how to use the new Java-style
+ iterators. The main difference between the Java-style iterators and the
+ STL-style iterators is that the Java-style ones point between items (or
+ before the first item, or after the last item), whereas the STL ones
+ point at an item (or past the last item). One advantage of the
+ Java-style iterators is that iterating forward and backward are
+ symmetric operations.
+
+ Traversing a container using a Java-style iterator:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 3
+
+ Modifying items using a Java-style iterator:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 4
+
+ Removing items using a Java-style iterator:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 5
+
+ Iterating over items with a particular value using STL-style vs.
+ Java-style iterators:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 6
+
+ Modifying and removing items using STL-style vs. Java-style
+ iterators:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 7
+
+ The next group of examples show the API of the container classes
+ themselves. The API is similar to the QTL classes of Qt 3, but is nicer
+ in many respects.
+
+ Iterating over a QList using an index (which is fast even for large
+ lists, because QList is implemented as an array-list):
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 8
+
+ Retrieving a value from a map, using a default value if the key
+ doesn't exist:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 9
+
+ Getting all the values for a particular key in a QMultiMap or QMultiHash:
+
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 10
+
+ \section1 Comparison with Qt 3
+
+ Tulip containers are value based. If you want to store a list where
+ each item is a QWidget *, use QList<QWidget *>.
+
+ The new containers do not support auto-delete. In practice, we
+ discovered that the only case where auto-delete proved worthwhile was
+ when the data really should be stored as a value rather than as a
+ pointer (e.g., QList<int> rather than QList<int *>). If you need
+ to delete all the items in a container, use qDeleteAll().
+
+ If you use QValueList in Qt 3, you can replace it with either
+ QList or QLinkedList in Qt 4. In most cases, QList is the best
+ choice: It is typically faster, results in less code in your
+ executable, and requires less memory. However, QLinkedList's
+ iterators provide stronger guarantees, and only QLinkedList provides
+ constant-time insertions in the middle, which can make a difference for
+ lists with thousands of items.
+
+ If you use QValueVector or QMap in Qt 3, the corresponding Qt 4
+ classes (QVector, QMap) are very similar to use.
+*/
diff --git a/doc/src/qtassistant.qdoc b/doc/src/qtassistant.qdoc
new file mode 100644
index 0000000..6be92fa
--- /dev/null
+++ b/doc/src/qtassistant.qdoc
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtAssistant
+ \title QtAssistant Module
+ \contentspage Qt's Modules
+ \previouspage QtHelp
+ \nextpage QtTest
+ \ingroup modules
+
+ \brief The QtAssistant module provides a means of launching \QA
+ to provide online help.
+
+ \sa {Qt Assistant Manual}
+*/
diff --git a/doc/src/qtcocoa-known-issues.qdoc b/doc/src/qtcocoa-known-issues.qdoc
new file mode 100644
index 0000000..eedbd68
--- /dev/null
+++ b/doc/src/qtcocoa-known-issues.qdoc
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtcocoa-known-issues.html
+ \title Known Issues with the Qt/Mac Cocoa Port
+
+ This document explains the current list of features in the Qt/Mac Cocoa port
+ that are currently not working. Most of the issues will be addressed in
+ upcoming snapshots and beta releases. We hope that all the issues should be
+ addressed by the time the of the final 4.5.0 release.
+
+ \tableofcontents
+
+ \section1 What Works
+
+ Here are the things that we can say about the current state of the Qt/Mac Cocoa port.
+
+ \list
+ \i \e{64-bit Support}:
+ The Qt libraries currently do build and link as 64-bit frameworks and it is
+ possible to build and run many of the Qt examples as 64-bit.
+
+ \i \e{HIViews are now NSViews}:
+ Every QWidget is now backed by an NSView pointer instead of an HIViewRef.
+ QWidget::winId() will return an NSView pointer that can be used in other
+ Cocoa technologies (e.g., Core Animation).
+
+ \i \e{Some Native Dialogs Work}:
+ QFileDialog and QColorDialog have been ported to use NSOpen-/NSSavePanel and
+ NSColorPanel respectively. QPrintDialog and QPageSetupDialog are not in
+ this release, but are on their way. Currently, none of these dialogs show
+ up as sheets pending the creation of an asynchronous API.
+
+ \i \e{Painting, Printing, and Styles}:
+ Since printing and painting used Quartz 2D and styling used HITheme, these
+ sub-systems work without any changes.
+
+ \i \e {OpenGL}:
+ OpenGL is fully supported,including pixel buffers and framebuffer objects.
+
+ \i \e{Clipboard}:
+ Using QClipboard to copy and paste data works as expected.
+
+ \i \e{Mouse, Keyboard, and Wheel events}:
+ Mouse, keyboard, and wheel events are dispatched to the proper
+ widget. The Qt/Mac Cocoa port respects Cocoa's idea of a "First
+ Responder."
+
+ \endlist
+
+ \section1 Current Known Issues
+
+ The following are items that don't currently work, but that we plan to have
+ resolved before the final release of the Qt/Mac Cocoa port. Please do not
+ file bugs on these.
+
+ \list
+ \i \e{Carbon Support}:
+ The current source tree for the Qt/Mac Cocoa port contains source for
+ building Qt/Mac with Cocoa. It contains some of the source code that is
+ used for the Carbon port, but it is currently not set up to build the
+ Carbon Qt/Mac libraries. Please use a normal release or snapshot if you
+ want to use Carbon.
+
+ \i \e{Drag and Drop Support}:
+ Drag and Drop is currently not implemented and needs to be ported to Cocoa,
+ but using the clipboard does work at this time.
+
+ \i \e {Accessibility}:
+ Accessibility support is not implemented and needs to be ported to Cocoa.
+
+ \i \e {Text}:
+ Most text rendering works fine for Latin-1 characters. However, rendering
+ non-Latin-1 characters has not been tested.
+
+ \i \e {Input Methods}:
+ Input methods also need to be ported to Cocoa.
+
+ \i \e {Shortcuts}:
+ Shortcuts that exist outside of the menu bar may not be dispatched.
+
+ \i \e {Tablet Support}:
+ The tablet support has not been ported from Carbon yet. However, it should
+ still be possible to use the tablet as a mouse.
+
+ \i \e {Phonon}:
+ Phonon uses the QuickTime backend that is only available on 32-bit. Using
+ Phonon in 64-bit requires a QTKit-based backend and has not been done.
+
+ \i \e {Unified Toolbar}:
+ The QMainWindow::setUnifiedTitleAndToolBarOnMac() method currently does nothing.
+
+ \i \e {Dialogs, Tool Windows, Sheets, and Drawers}:
+ At the moment, all windows are subclasses of NSWindow. This means that
+ window types like drawers and sheets do not work and tool windows do not
+ get the right decorations. Modal dialogs do show up at the correct window
+ level, but are not yet considered "panels." Many window flags are not
+ recognized.
+
+ \endlist
+
+ \section1 Things We Don't Expect to Support
+
+ The following items that we do not plan on spending any resources on unless
+ there is monumental outcry for their inclusion.
+
+ \list
+ \i \e{Qt3Support}:
+ At this time we have no plans for making the Qt3Support module work with
+ the Qt/Mac Cocoa port in 64-bit mode. Following in footsteps of Apple, we
+ would like to encourage you to consider the time of going Cocoa and 64-bit
+ as a chance to jettison Qt 3 constructs and classes.
+
+ \i \e{Support for versions of Mac OS X below 10.5}:
+ We are using methods and classes that are only available in 10.5 and
+ higher. Most of these functions don't have any equivalent on earlier
+ versions. We recommend using the Carbon version for earlier versions of Mac
+ OS X. We anticipate keeping the Carbon port supported at least for the
+ lifetime of 4.5.
+
+ \i \e{Support for -no-framework or -static}:
+ Cocoa requires that we load a nib in order to properly access the global
+ menu bar. This nib has to reside on disk somewhere. The most logical place
+ for it to reside is inside the QtGui framework. For this reason, building
+ Qt as standard "dylibs" or statically is no longer supported.
+
+ \endlist
+
+*/
diff --git a/doc/src/qtconfig.qdoc b/doc/src/qtconfig.qdoc
new file mode 100644
index 0000000..f515aa3
--- /dev/null
+++ b/doc/src/qtconfig.qdoc
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtconfig.html
+ \title Configuring Qt
+ \ingroup qttools
+ \keyword qtconfig
+
+ The \c qtconfig tool allows users to customize the default settings for
+ Qt applications on a per-user basis, enabling features such as the widget
+ style to be changed without requiring applications to be recompiled.
+
+ \c qtconfig is available on X11 platforms and should be installed alongside
+ the \l{Qt's Tools}{other tools} supplied with Qt.
+
+ \image qtconfig-appearance.png
+*/
diff --git a/doc/src/qtcore.qdoc b/doc/src/qtcore.qdoc
new file mode 100644
index 0000000..71a29b7
--- /dev/null
+++ b/doc/src/qtcore.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtCore
+ \title QtCore Module
+ \contentspage Qt's Modules
+ \previouspage Qt's Modules
+ \nextpage QtGui
+ \ingroup modules
+
+ \keyword QtCore
+
+ \brief The QtCore module contains core non-GUI functionality.
+
+ All other Qt modules rely on this module. To include the
+ definitions of the module's classes, use the following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0
+
+ The QtCore module is part of all \l{Qt editions}.
+*/
diff --git a/doc/src/qtdbus.qdoc b/doc/src/qtdbus.qdoc
new file mode 100644
index 0000000..37217e9
--- /dev/null
+++ b/doc/src/qtdbus.qdoc
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/** -*- mode: C++ -*-
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtDBus
+ \title QtDBus module
+ \contentspage Qt's Modules
+ \previouspage QAxServer
+ \ingroup modules
+
+ \keyword QtDBus
+ \target The QDBus compiler
+
+ \brief The QtDBus module is a Unix-only library that you can use
+ to make Inter-Process Communication using the \l {Introduction to
+ D-Bus} {D-Bus} protocol.
+
+ Applications using the QtDBus module can provide services to
+ other, remote applications by exporting objects, as well as use
+ services exported by those applications by placing calls and
+ accessing properties.
+
+ The QtDBus module provides an interface that extends the Qt \l
+ {signalsandslots.html}{Signals and Slots} mechanism, allowing one
+ to connect to a signal emitted remotely as well as to connect a
+ local signal to remote slot.
+
+ To use this module, use the following code in your application:
+
+ \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 0
+
+ If you're using qmake to build your application, you can add this
+ line to your .pro file to make it link against the QtDBus
+ libraries:
+
+ \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 1
+
+ \note The source code for this module is located in the \c{src/qdbus}
+ directory. When installing Qt from source, this module is built when Qt's
+ tools are built.
+
+ See the \l {Introduction to D-Bus} page for detailed information on
+ how to use this module.
+
+ This module is part of all \l{Qt editions}.
+*/
diff --git a/doc/src/qtdemo.qdoc b/doc/src/qtdemo.qdoc
new file mode 100644
index 0000000..7e23f6d
--- /dev/null
+++ b/doc/src/qtdemo.qdoc
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtdemo.html
+ \title Examples and Demos Launcher
+ \ingroup qttools
+ \keyword qtdemo
+
+ The Examples and Demos Launcher (\c qtdemo) allows the user to browse the
+ examples and demonstrations included with Qt, access the documentation
+ associated with each of them, and launch them as separate applications.
+
+ \image qtdemo.png
+
+ The \c qtdemo executable should be installed alongside the
+ \l{Qt's Tools}{other tools} supplied with Qt.
+
+ \list
+ \i On Windows, click the Start button, open the \e Programs submenu, open
+ the \e{Qt 4} submenu, and click \e{Examples and Demos}.
+ \i On Unix or Linux, you may find a \c qtdemo icon on the desktop background or
+ in the desktop start menu under the \e Programming or \e Development
+ submenus. You can launch this application from this icon. Alternatively, you can
+ enter \c qtdemo in a terminal window.
+ \i On Mac OS X, navigate to the \c /Developer/Applications/Qt directory in the
+ Finder and double click on the \c qtdemo.app icon.
+ \endlist
+*/
diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc
new file mode 100644
index 0000000..7e3b619
--- /dev/null
+++ b/doc/src/qtdesigner.qdoc
@@ -0,0 +1,1541 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtDesigner
+ \title QtDesigner Module
+ \contentspage Qt's Modules
+ \previouspage Qt3Support
+ \nextpage QtUiTools
+ \ingroup modules
+
+ \brief The QtDesigner module provides classes that allow you to
+ create your own custom widget plugins for Qt Designer, and classes
+ that enable you to access Qt Designer's components.
+
+ In addition, the QFormBuilder class provides the possibility of
+ constructing user interfaces from \c .ui files at run-time.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 0
+
+ To link against the module, add this line to your \c qmake .pro
+ file:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1
+
+ \note These classes are part of the \l{Open Source Versions of Qt} and
+ \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
+ users.
+
+ \tableofcontents
+
+ \section1 Creating Custom Widget Plugins
+
+ When implementing a custom widget plugin for \QD, you must
+ subclass QDesignerCustomWidgetInterface to expose your custom
+ widget to \QD. A single custom widget plugin is built as a
+ separate library. If you want to include several custom widget
+ plugins in the same library, you must in addition subclass
+ QDesignerCustomWidgetCollectionInterface.
+
+ To provide your custom widget plugin with the expected behavior
+ and functionality within \QD's workspace you can subclass the
+ associated extension classes:
+
+ The QDesignerContainerExtension class allows you to add pages to a
+ custom multi-page container. The QDesignerTaskMenuExtension class
+ allows you to add custom menu entries to \QD's task menu. The
+ QDesignerMemberSheetExtension class allows you to manipulate a
+ widget's member functions which is displayed when configuring
+ connections using \QD's mode for editing signals and slots. And
+ finally, the QDesignerPropertySheetExtension class allows you to
+ manipulate a widget's properties which is displayed in \QD's
+ property editor.
+
+ \image qtdesignerextensions.png
+
+ In \QD the extensions are not created until they are required. For
+ that reason, when implementing extensions, you must also subclass
+ QExtensionFactory, i.e create a class that is able to make
+ instances of your extensions. In addition, you must make \QD's
+ extension manager register your factory; the extension manager
+ controls the construction of extensions as they are required, and
+ you can access it through QDesignerFormEditorInterface and
+ QExtensionManager.
+
+ For a complete example creating a custom widget plugin with an
+ extension, see the \l {designer/taskmenuextension}{Task Menu
+ Extension} or \l {designer/containerextension}{Container
+ Extension} examples.
+
+ \section1 Retrieving Access to \QD Components
+
+ The purpose of the classes mentioned in this section is to provide
+ access to \QD's components, managers and workspace, and they are
+ not intended to be instantiated directly.
+
+ \QD is composed by several components. It has an action editor, a
+ property editor, widget box and object inspector which you can
+ view in its workspace.
+
+ \image qtdesignerscreenshot.png
+
+ \QD also has an object that works behind the scene; it contains
+ the logic that integrates all of \QD's components into a coherent
+ application. You can access this object, using the
+ QDesignerFormEditorInterface, to retrieve interfaces to \QD's
+ components:
+
+ \list
+ \o QDesignerActionEditorInterface
+ \o QDesignerObjectInspectorInterface
+ \o QDesignerPropertyEditorInterface
+ \o QDesignerWidgetBoxInterface
+ \endlist
+
+ In addition, you can use QDesignerFormEditorInterface to retrieve
+ interfaces to \QD's extension manager (QExtensionManager) and form
+ window manager (QDesignerFormWindowManagerInterface). The
+ extension manager controls the construction of extensions as they
+ are required, while the form window manager controls the form
+ windows appearing in \QD's workspace.
+
+ Once you have an interface to \QD's form window manager
+ (QDesignerFormWindowManagerInterface), you also have access to all
+ the form windows currently appearing in \QD's workspace: The
+ QDesignerFormWindowInterface class allows you to query and
+ manipulate the form windows, and it provides an interface to the
+ form windows' cursors. QDesignerFormWindowCursorInterface is a
+ convenience class allowing you to query and modify a given form
+ window's widget selection, and in addition modify the properties
+ of all the form's widgets.
+
+ \section1 Creating User Interfaces at Run-Time
+
+ The \c QtDesigner module contains the QFormBuilder class that
+ provides a mechanism for dynamically creating user interfaces at
+ run-time, based on \c .ui files created with \QD. This class is
+ typically used by custom components and applications that embed
+ \QD. Standalone applications that need to dynamically generate
+ user interfaces at run-time use the QUiLoader class, found in
+ the QtUiTools module.
+
+ For a complete example using QUiLoader, see
+ the \l {designer/calculatorbuilder}{Calculator Builder example}.
+
+ \sa {Qt Designer Manual}, {QtUiTools Module}
+*/
+
+/*!
+ \class QDesignerMemberSheetExtension
+
+ \brief The QDesignerMemberSheetExtension class allows you to
+ manipulate a widget's member functions which is displayed when
+ configuring connections using Qt Designer's mode for editing
+ signals and slots.
+
+ \inmodule QtDesigner
+
+ QDesignerMemberSheetExtension is a collection of functions that is
+ typically used to query a widget's member functions, and to
+ manipulate the member functions' appearance in \QD's signals and
+ slots editing mode. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2
+
+ When implementing a custom widget plugin, a pointer to \QD's
+ current QDesignerFormEditorInterface object (\c formEditor in the
+ example above) is provided by the
+ QDesignerCustomWidgetInterface::initialize() function's parameter.
+
+ The member sheet (and any other extension), can be retrieved by
+ querying \QD's extension manager using the qt_extension()
+ function. When you want to release the extension, you only need to
+ delete the pointer.
+
+ All widgets have a default member sheet used in \QD's signals and
+ slots editing mode with the widget's member functions. But
+ QDesignerMemberSheetExtension also provides an interface for
+ creating custom member sheet extensions.
+
+ \warning \QD uses the QDesignerMemberSheetExtension to facilitate
+ the signal and slot editing mode. Whenever a connection between
+ two widgets is requested, \QD will query for the widgets' member
+ sheet extensions. If a widget has an implemented member sheet
+ extension, this extension will override the default member sheet.
+
+ To create a member sheet extension, your extension class must
+ inherit from both QObject and QDesignerMemberSheetExtension. Then,
+ since we are implementing an interface, we must ensure that it's
+ made known to the meta object system using the Q_INTERFACES()
+ macro:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3
+
+ This enables \QD to use qobject_cast() to query for
+ supported interfaces using nothing but a QObject pointer.
+
+ In \QD the extensions are not created until they are
+ required. For that reason, when implementing a member sheet
+ extension, you must also create a QExtensionFactory, i.e a class
+ that is able to make an instance of your extension, and register
+ it using \QD's \l {QExtensionManager}{extension manager}.
+
+ When a widget's member sheet extension is required, \QD's \l
+ {QExtensionManager}{extension manager} will run through all its
+ registered factories calling QExtensionFactory::createExtension()
+ for each until the first one that is able to create a member sheet
+ extension for that widget, is found. This factory will then make
+ an instance of the extension. If no such factory is found, \QD
+ will use the default member sheet.
+
+ There are four available types of extensions in \QD:
+ QDesignerContainerExtension, QDesignerMemberSheetExtension,
+ QDesignerPropertySheetExtension and
+ QDesignerTaskMenuExtension. \QD's behavior is the same whether the
+ requested extension is associated with a multi page container, a
+ member sheet, a property sheet or a task menu.
+
+ The QExtensionFactory class provides a standard extension
+ factory, and can also be used as an interface for custom
+ extension factories. You can either create a new
+ QExtensionFactory and reimplement the
+ QExtensionFactory::createExtension() function. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4
+
+ Or you can use an existing factory, expanding the
+ QExtensionFactory::createExtension() function to make the factory
+ able to create a member sheet extension as well. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5
+
+ For a complete example using an extension class, see \l
+ {designer/taskmenuextension}{Task Menu Extension example}. The
+ example shows how to create a custom widget plugin for Qt
+ Designer, and how to to use the QDesignerTaskMenuExtension class
+ to add custom items to \QD's task menu.
+
+ \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget
+ Extensions}
+*/
+
+/*!
+ \fn QDesignerMemberSheetExtension::~QDesignerMemberSheetExtension()
+
+ Destroys the member sheet extension.
+*/
+
+/*!
+ \fn int QDesignerMemberSheetExtension::count() const
+
+ Returns the extension's number of member functions.
+*/
+
+/*!
+ \fn int QDesignerMemberSheetExtension::indexOf(const QString &name) const
+
+ Returns the index of the member function specified by the given \a
+ name.
+
+ \sa memberName()
+*/
+
+/*!
+ \fn QString QDesignerMemberSheetExtension::memberName(int index) const
+
+ Returns the name of the member function with the given \a index.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn QString QDesignerMemberSheetExtension::memberGroup(int index) const
+
+ Returns the name of the member group specified for the function
+ with the given \a index.
+
+ \sa indexOf(), setMemberGroup()
+*/
+
+/*!
+ \fn void QDesignerMemberSheetExtension::setMemberGroup(int index, const QString &group)
+
+ Sets the member group of the member function with the given \a
+ index, to \a group.
+
+ \sa indexOf(), memberGroup()
+*/
+
+/*!
+ \fn bool QDesignerMemberSheetExtension::isVisible(int index) const
+
+ Returns true if the member function with the given \a index is
+ visible in \QD's signal and slot editor, otherwise false.
+
+ \sa indexOf(), setVisible()
+*/
+
+/*!
+ \fn void QDesignerMemberSheetExtension::setVisible(int index, bool visible)
+
+ If \a visible is true, the member function with the given \a index
+ is visible in \QD's signals and slots editing mode; otherwise the
+ member function is hidden.
+
+ \sa indexOf(), isVisible()
+*/
+
+/*!
+ \fn virtual bool QDesignerMemberSheetExtension::isSignal(int index) const
+
+ Returns true if the member function with the given \a index is a
+ signal, otherwise false.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn bool QDesignerMemberSheetExtension::isSlot(int index) const
+
+ Returns true if the member function with the given \a index is a
+ slot, otherwise false.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn bool QDesignerMemberSheetExtension::inheritedFromWidget(int index) const
+
+ Returns true if the member function with the given \a index is
+ inherited from QWidget, otherwise false.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn QString QDesignerMemberSheetExtension::declaredInClass(int index) const
+
+ Returns the name of the class in which the member function with
+ the given \a index is declared.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn QString QDesignerMemberSheetExtension::signature(int index) const
+
+ Returns the signature of the member function with the given \a
+ index.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterTypes(int index) const
+
+ Returns the parameter types of the member function with the given
+ \a index, as a QByteArray list.
+
+ \sa indexOf(), parameterNames()
+*/
+
+/*!
+ \fn QList<QByteArray> QDesignerMemberSheetExtension::parameterNames(int index) const
+
+ Returns the parameter names of the member function with the given
+ \a index, as a QByteArray list.
+
+ \sa indexOf(), parameterTypes()
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerLayoutDecorationExtension
+ \brief The QDesignerLayoutDecorationExtension class provides an extension to a layout in \QD.
+ \inmodule QtDesigner
+ \internal
+*/
+
+/*!
+ \enum QDesignerLayoutDecorationExtension::InsertMode
+
+ This enum describes the modes that are used to insert items into a layout.
+
+ \value InsertWidgetMode Widgets are inserted into empty cells in a layout.
+ \value InsertRowMode Whole rows are inserted into a vertical or grid layout.
+ \value InsertColumnMode Whole columns are inserted into a horizontal or grid layout.
+*/
+
+/*!
+ \fn virtual QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension()
+
+ Destroys the extension.
+*/
+
+/*!
+ \fn virtual QList<QWidget*> QDesignerLayoutDecorationExtension::widgets(QLayout *layout) const
+
+ Returns the widgets that are managed by the given \a layout.
+
+ \sa insertWidget(), removeWidget()
+*/
+
+/*!
+ \fn QRect QDesignerLayoutDecorationExtension::itemInfo(int index) const
+
+ Returns the rectangle covered by the item at the given \a index in the layout.
+*/
+
+/*!
+ \fn int QDesignerLayoutDecorationExtension::indexOf(QWidget *widget) const
+
+ Returns the index of the specified \a widget in the layout.
+*/
+
+/*!
+ \fn int QDesignerLayoutDecorationExtension::indexOf(QLayoutItem *item) const
+
+ Returns the index of the specified layout \a item.
+*/
+
+/*!
+ \fn QDesignerLayoutDecorationExtension::InsertMode QDesignerLayoutDecorationExtension::currentInsertMode() const
+
+ Returns the current insertion mode.
+*/
+
+/*!
+ \fn int QDesignerLayoutDecorationExtension::currentIndex() const
+
+ Returns the current index in the layout.
+*/
+
+/*!
+ \fn QPair<int, int> QDesignerLayoutDecorationExtension::currentCell() const
+
+ Returns a pair containing the row and column of the current cell in the layout.
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::insertWidget(QWidget *widget, const QPair<int, int> &cell)
+
+ Inserts the given \a widget into the specified \a cell in the layout.
+
+ \sa removeWidget()
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::removeWidget(QWidget *widget)
+
+ Removes the specified \a widget from the layout.
+
+ \sa insertWidget()
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::insertRow(int row)
+
+ Inserts a new row into the form at the position specified by \a row.
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::insertColumn(int column)
+
+ Inserts a new column into the form at the position specified by \a column.
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::simplify()
+
+ Simplifies the layout by removing unnecessary empty rows and columns, and by changing the
+ number of rows or columns spanned by widgets.
+*/
+
+/*!
+ \fn int QDesignerLayoutDecorationExtension::findItemAt(const QPoint &position) const
+
+ Returns the index of the item in the layout that covers the given \a position.
+*/
+
+/*!
+ \fn int QDesignerLayoutDecorationExtension::findItemAt(int row, int column) const
+
+ Returns the item in the layout that occupies the specified \a row and \a column in the layout.
+
+ Currently, this only applies to grid layouts.
+*/
+
+/*!
+ \fn void QDesignerLayoutDecorationExtension::adjustIndicator(const QPoint &position, int index)
+
+ Adjusts the indicator for the item specified by \a index so that
+ it lies at the given \a position on the form.
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerContainerExtension
+ \brief The QDesignerContainerExtension class allows you to add pages to
+ a custom multi-page container in Qt Designer's workspace.
+ \inmodule QtDesigner
+
+ QDesignerContainerExtension provide an interface for creating
+ custom container extensions. A container extension consists of a
+ collection of functions that \QD needs to manage a multi-page
+ container plugin, and a list of the container's pages.
+
+ \image containerextension-example.png
+
+ \warning This is \e not an extension for container plugins in
+ general, only custom \e multi-page containers.
+
+ To create a container extension, your extension class must inherit
+ from both QObject and QDesignerContainerExtension. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6
+
+ Since we are implementing an interface, we must ensure that it's
+ made known to the meta object system using the Q_INTERFACES()
+ macro. This enables \QD to use the qobject_cast() function to
+ query for supported interfaces using nothing but a QObject
+ pointer.
+
+ You must reimplement several functions to enable \QD to manage a
+ custom multi-page container widget: \QD uses count() to keep track
+ of the number pages in your container, widget() to return the page
+ at a given index in the list of the container's pages, and
+ currentIndex() to return the list index of the selected page. \QD
+ uses the addWidget() function to add a given page to the
+ container, expecting it to be appended to the list of pages, while
+ it expects the insertWidget() function to add a given page to the
+ container by inserting it at a given index.
+
+ In \QD the extensions are not created until they are
+ required. For that reason you must also create a
+ QExtensionFactory, i.e a class that is able to make an instance of
+ your extension, and register it using \QD's \l
+ {QExtensionManager}{extension manager}.
+
+ When a container extension is required, \QD's \l
+ {QExtensionManager}{extension manager} will run through all its
+ registered factories calling QExtensionFactory::createExtension()
+ for each until the first one that is able to create a container
+ extension, is found. This factory will then create the extension
+ for the plugin.
+
+ There are four available types of extensions in \QD:
+ QDesignerContainerExtension , QDesignerMemberSheetExtension,
+ QDesignerPropertySheetExtension and QDesignerTaskMenuExtension.
+ \QD's behavior is the same whether the requested extension is
+ associated with a multi page container, a member sheet, a property
+ sheet or a task menu.
+
+ The QExtensionFactory class provides a standard extension factory,
+ and can also be used as an interface for custom extension
+ factories. You can either create a new QExtensionFactory and
+ reimplement the QExtensionFactory::createExtension() function. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7
+
+ Or you can use an existing factory, expanding the
+ QExtensionFactory::createExtension() function to make the factory
+ able to create a container extension as well. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8
+
+ For a complete example using the QDesignerContainerExtension
+ class, see the \l {designer/containerextension}{Container
+ Extension example}. The example shows how to create a custom
+ multi-page plugin for \QD.
+
+ \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget
+ Extensions}
+*/
+
+/*!
+ \fn QDesignerContainerExtension::~QDesignerContainerExtension()
+
+ Destroys the extension.
+*/
+
+/*!
+ \fn int QDesignerContainerExtension::count() const
+
+ Returns the number of pages in the container.
+*/
+
+/*!
+ \fn QWidget *QDesignerContainerExtension::widget(int index) const
+
+ Returns the page at the given \a index in the extension's list of
+ pages.
+
+ \sa addWidget(), insertWidget()
+*/
+
+/*!
+ \fn int QDesignerContainerExtension::currentIndex() const
+
+ Returns the index of the currently selected page in the
+ container.
+
+ \sa setCurrentIndex()
+*/
+
+/*!
+ \fn void QDesignerContainerExtension::setCurrentIndex(int index)
+
+ Sets the the currently selected page in the container to be the
+ page at the given \a index in the extension's list of pages.
+
+ \sa currentIndex()
+*/
+
+/*!
+ \fn void QDesignerContainerExtension::addWidget(QWidget *page)
+
+ Adds the given \a page to the container by appending it to the
+ extension's list of pages.
+
+ \sa insertWidget(), remove(), widget()
+*/
+
+/*!
+ \fn void QDesignerContainerExtension::insertWidget(int index, QWidget *page)
+
+ Adds the given \a page to the container by inserting it at the
+ given \a index in the extension's list of pages.
+
+ \sa addWidget(), remove(), widget()
+*/
+
+/*!
+ \fn void QDesignerContainerExtension::remove(int index)
+
+ Removes the page at the given \a index from the extension's list
+ of pages.
+
+ \sa addWidget(), insertWidget()
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerTaskMenuExtension
+ \brief The QDesignerTaskMenuExtension class allows you to add custom
+ menu entries to Qt Designer's task menu.
+ \inmodule QtDesigner
+
+ QDesignerTaskMenuExtension provides an interface for creating
+ custom task menu extensions. It is typically used to create task
+ menu entries that are specific to a plugin in \QD.
+
+ \QD uses the QDesignerTaskMenuExtension to feed its task
+ menu. Whenever a task menu is requested, \QD will query
+ for the selected widget's task menu extension.
+
+ \image taskmenuextension-example-faded.png
+
+ A task menu extension is a collection of QActions. The actions
+ appear as entries in the task menu when the plugin with the
+ specified extension is selected. The image above shows the custom
+ \gui {Edit State...} action which appears in addition to \QD's
+ default task menu entries: \gui Cut, \gui Copy, \gui Paste etc.
+
+ To create a custom task menu extension, your extension class must
+ inherit from both QObject and QDesignerTaskMenuExtension. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9
+
+ Since we are implementing an interface, we must ensure that it
+ is made known to the meta-object system using the Q_INTERFACES()
+ macro. This enables \QD to use the qobject_cast() function to
+ query for supported interfaces using nothing but a QObject
+ pointer.
+
+ You must reimplement the taskActions() function to return a list
+ of actions that will be included in \QD task menu. Optionally, you
+ can reimplement the preferredEditAction() function to set the
+ action that is invoked when selecting your plugin and pressing
+ \key F2. The preferred edit action must be one of the actions
+ returned by taskActions() and, if it's not defined, pressing the
+ \key F2 key will simply be ignored.
+
+ In \QD, extensions are not created until they are required. A
+ task menu extension, for example, is created when you click the
+ right mouse button over a widget in \QD's workspace. For that
+ reason you must also construct an extension factory, using either
+ QExtensionFactory or a subclass, and register it using \QD's
+ \l {QExtensionManager}{extension manager}.
+
+ When a task menu extension is required, \QD's \l
+ {QExtensionManager}{extension manager} will run through all its
+ registered factories calling QExtensionFactory::createExtension()
+ for each until it finds one that is able to create a task menu
+ extension for the selected widget. This factory will then make an
+ instance of the extension.
+
+ There are four available types of extensions in \QD:
+ QDesignerContainerExtension, QDesignerMemberSheetExtension,
+ QDesignerPropertySheetExtension, and QDesignerTaskMenuExtension.
+ \QD's behavior is the same whether the requested extension is
+ associated with a container, a member sheet, a property sheet or a
+ task menu.
+
+ The QExtensionFactory class provides a standard extension factory,
+ and can also be used as an interface for custom extension
+ factories. You can either create a new QExtensionFactory and
+ reimplement the QExtensionFactory::createExtension() function. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10
+
+ Or you can use an existing factory, expanding the
+ QExtensionFactory::createExtension() function to make the factory
+ able to create a task menu extension as well. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11
+
+ For a complete example using the QDesignerTaskMenuExtension class,
+ see the \l {designer/taskmenuextension}{Task Menu Extension
+ example}. The example shows how to create a custom widget plugin
+ for \QD, and how to to use the QDesignerTaskMenuExtension
+ class to add custom items to \QD's task menu.
+
+ \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget
+ Extensions}
+*/
+
+/*!
+ \fn QDesignerTaskMenuExtension::~QDesignerTaskMenuExtension()
+
+ Destroys the task menu extension.
+*/
+
+/*!
+ \fn QAction *QDesignerTaskMenuExtension::preferredEditAction() const
+
+ Returns the action that is invoked when selecting a plugin with
+ the specified extension and pressing \key F2.
+
+ The action must be one of the actions returned by taskActions().
+*/
+
+/*!
+ \fn QList<QAction*> QDesignerTaskMenuExtension::taskActions() const
+
+ Returns the task menu extension as a list of actions which will be
+ included in \QD's task menu when a plugin with the specified
+ extension is selected.
+
+ The function must be reimplemented to add actions to the list.
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerCustomWidgetCollectionInterface
+
+ \brief The QDesignerCustomWidgetCollectionInterface class allows
+ you to include several custom widgets in one single library.
+
+ \inmodule QtDesigner
+
+ When implementing a custom widget plugin, you build it as a
+ separate library. If you want to include several custom widget
+ plugins in the same library, you must in addition subclass
+ QDesignerCustomWidgetCollectionInterface.
+
+ QDesignerCustomWidgetCollectionInterface contains one single
+ function returning a list of the collection's
+ QDesignerCustomWidgetInterface objects. For example, if you have
+ several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and
+ \c CustomWidgetThree, the class definition may look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12
+
+ In the class constructor you add the interfaces to your custom
+ widgets to the list which you return in the customWidgets()
+ function:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13
+
+ Note that instead of exporting each custom widget plugin using the
+ Q_EXPORT_PLUGIN2() macro, you export the entire collection. The
+ Q_EXPORT_PLUGIN2() macro ensures that \QD can access and construct
+ the custom widgets. Without this macro, there is no way for \QD to
+ use them.
+
+ \sa QDesignerCustomWidgetInterface, {Creating Custom Widgets for
+ Qt Designer}
+*/
+
+/*!
+ \fn QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface() {
+
+ Destroys the custom widget collection interface.
+*/
+
+/*!
+ \fn QList<QDesignerCustomWidgetInterface*> QDesignerCustomWidgetCollectionInterface::customWidgets() const
+
+ Returns a list of interfaces to the collection's custom widgets.
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerCustomWidgetInterface
+
+ \brief The QDesignerCustomWidgetInterface class enables Qt Designer
+ to access and construct custom widgets.
+
+ \inmodule QtDesigner
+
+ QDesignerCustomWidgetInterface provides a custom widget with an
+ interface. The class contains a set of functions that must be subclassed
+ to return basic information about the widget, such as its class name and
+ the name of its header file. Other functions must be implemented to
+ initialize the plugin when it is loaded, and to construct instances of
+ the custom widget for \QD to use.
+
+ When implementing a custom widget you must subclass
+ QDesignerCustomWidgetInterface to expose your widget to \QD. For
+ example, this is the declaration for the plugin used in the
+ \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that
+ enables an analog clock custom widget to be used by \QD:
+
+ \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0
+
+ Note that the only part of the class definition that is specific
+ to this particular custom widget is the class name. In addition,
+ since we are implementing an interface, we must ensure that it's
+ made known to the meta object system using the Q_INTERFACES()
+ macro. This enables \QD to use the qobject_cast() function to
+ query for supported interfaces using nothing but a QObject
+ pointer.
+
+ After \QD loads a custom widget plugin, it calls the interface's
+ initialize() function to enable it to set up any resources that it
+ may need. This function is called with a QDesignerFormEditorInterface
+ parameter that provides the plugin with a gateway to all of \QD's API.
+
+ \QD constructs instances of the custom widget by calling the plugin's
+ createWidget() function with a suitable parent widget. Plugins must
+ construct and return an instance of a custom widget with the specified
+ parent widget.
+
+ In the implementation of the class you must remember to export
+ your custom widget plugin to \QD using the Q_EXPORT_PLUGIN2()
+ macro. For example, if a library called \c libcustomwidgetplugin.so
+ (on Unix) or \c libcustomwidget.dll (on Windows) contains a widget
+ class called \c MyCustomWidget, we can export it by adding the
+ following line to the file containing the plugin implementation:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14
+
+ This macro ensures that \QD can access and construct the custom widget.
+ Without this macro, there is no way for \QD to use it.
+
+ When implementing a custom widget plugin, you build it as a
+ separate library. If you want to include several custom widget
+ plugins in the same library, you must in addition subclass
+ QDesignerCustomWidgetCollectionInterface.
+
+ \warning If your custom widget plugin contains QVariant
+ properties, be aware that only the following \l
+ {QVariant::Type}{types} are supported:
+
+ \list
+ \o QVariant::ByteArray
+ \o QVariant::Bool
+ \o QVariant::Color
+ \o QVariant::Cursor
+ \o QVariant::Date
+ \o QVariant::DateTime
+ \o QVariant::Double
+ \o QVariant::Int
+ \o QVariant::Point
+ \o QVariant::Rect
+ \o QVariant::Size
+ \o QVariant::SizePolicy
+ \o QVariant::String
+ \o QVariant::Time
+ \o QVariant::UInt
+ \endlist
+
+ For a complete example using the QDesignerCustomWidgetInterface
+ class, see the \l {designer/customwidgetplugin}{Custom Widget
+ Example}. The example shows how to create a custom widget plugin
+ for \QD.
+
+ \sa QDesignerCustomWidgetCollectionInterface {Creating Custom
+ Widgets for Qt Designer}
+*/
+
+/*!
+ \fn QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface()
+
+ Destroys the custom widget interface.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::name() const
+
+ Returns the class name of the custom widget supplied by the interface.
+
+ The name returned \e must be identical to the class name used for the
+ custom widget.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::group() const
+
+ Returns the name of the group to which the custom widget belongs.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::toolTip() const
+
+ Returns a short description of the widget that can be used by \QD
+ in a tool tip.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::whatsThis() const
+
+ Returns a description of the widget that can be used by \QD in
+ "What's This?" help for the widget.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::includeFile() const
+
+ Returns the path to the include file that \l uic uses when
+ creating code for the custom widget.
+*/
+
+/*!
+ \fn QIcon QDesignerCustomWidgetInterface::icon() const
+
+ Returns the icon used to represent the custom widget in \QD's
+ widget box.
+*/
+
+/*!
+ \fn bool QDesignerCustomWidgetInterface::isContainer() const
+
+ Returns true if the custom widget is intended to be used as a
+ container; otherwise returns false.
+
+ Most custom widgets are not used to hold other widgets, so their
+ implementations of this function will return false, but custom
+ containers will return true to ensure that they behave correctly
+ in \QD.
+*/
+
+/*!
+ \fn QWidget *QDesignerCustomWidgetInterface::createWidget(QWidget *parent)
+
+ Returns a new instance of the custom widget, with the given \a
+ parent.
+*/
+
+/*!
+ \fn bool QDesignerCustomWidgetInterface::isInitialized() const
+
+ Returns true if the widget has been initialized; otherwise returns
+ false.
+
+ \sa initialize()
+*/
+
+/*!
+ \fn void QDesignerCustomWidgetInterface::initialize(QDesignerFormEditorInterface *formEditor)
+
+ Initializes the widget for use with the specified \a formEditor
+ interface.
+
+ \sa isInitialized()
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::domXml() const
+
+ Returns the XML that is used to describe the custom widget's
+ properties to \QD.
+*/
+
+/*!
+ \fn QString QDesignerCustomWidgetInterface::codeTemplate() const
+
+ This function is reserved for future use by \QD.
+
+ \omit
+ Returns the code template that \QD includes in forms that contain
+ the custom widget when they are saved.
+ \endomit
+*/
+
+/*!
+ \macro QDESIGNER_WIDGET_EXPORT
+ \relates QDesignerCustomWidgetInterface
+ \since 4.1
+
+ This macro is used when defining custom widgets to ensure that they are
+ correctly exported from plugins for use with \QD.
+
+ On some platforms, the symbols required by \QD to create new widgets
+ are removed from plugins by the build system, making them unusable.
+ Using this macro ensures that the symbols are retained on those platforms,
+ and has no side effects on other platforms.
+
+ For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin}
+ example exports a custom widget class with the following declaration:
+
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0
+ \dots
+ \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2
+
+ \sa {Creating Custom Widgets for Qt Designer}
+*/
+
+
+// Doc: Abstract class
+
+/*!
+ \class QDesignerDnDItemInterface
+ \brief The QDesignerDnDItemInterface class provides an interface that is used to manage items
+ during a drag and drop operation.
+ \inmodule QtDesigner
+ \internal
+*/
+
+/*!
+ \enum QDesignerDnDItemInterface::DropType
+
+ This enum describes the result of a drag and drop operation.
+
+ \value MoveDrop The item was moved.
+ \value CopyDrop The item was copied.
+*/
+
+/*!
+ \fn QDesignerDnDItemInterface::QDesignerDnDItemInterface()
+
+ Constructs a new interface to a drag and drop item.
+*/
+
+/*!
+ \fn QDesignerDnDItemInterface::~QDesignerDnDItemInterface()
+
+ Destroys the interface to the item.
+*/
+
+/*!
+ \fn DomUI *QDesignerDnDItemInterface::domUi() const
+
+ Returns a user interface object for the item.
+*/
+
+/*!
+ \fn QWidget *QDesignerDnDItemInterface::widget() const
+
+ Returns the widget being copied or moved in the drag and drop operation.
+
+ \sa source()
+*/
+
+/*!
+ \fn QWidget *QDesignerDnDItemInterface::decoration() const
+
+ Returns the widget used to represent the item.
+*/
+
+/*!
+ \fn QPoint QDesignerDnDItemInterface::hotSpot() const
+
+ Returns the cursor's hotspot.
+
+ \sa QDrag::hotSpot()
+*/
+
+/*!
+ \fn DropType QDesignerDnDItemInterface::type() const
+
+ Returns the type of drag and drop operation in progress.
+*/
+
+/*!
+ \fn QWidget *QDesignerDnDItemInterface::source() const
+
+ Returns the widget that is the source of the drag and drop operation; i.e. the original
+ container of the widget being dragged.
+
+ \sa widget()
+*/
+
+
+// Doc: Abstract class
+
+/*!
+ \class QDesignerIconCacheInterface
+ \brief The QDesignerIconCacheInterface class provides an interface to \QD's icon cache.
+ \inmodule QtDesigner
+ \internal
+*/
+
+/*!
+ \fn QDesignerIconCacheInterface::QDesignerIconCacheInterface(QObject *parent)
+
+ Constructs a new interface with the given \a parent.
+*/
+
+/*!
+ \fn QIcon QDesignerIconCacheInterface::nameToIcon(const QString &filePath, const QString &qrcPath)
+
+ Returns the icon associated with the name specified by \a filePath in the resource
+ file specified by \a qrcPath.
+
+ If \a qrcPath refers to a valid resource file, the name used for the file path is a path
+ within those resources; otherwise the file path refers to a local file.
+
+ \sa {The Qt Resource System}, nameToPixmap()
+*/
+
+/*!
+ \fn QPixmap QDesignerIconCacheInterface::nameToPixmap(const QString &filePath, const QString &qrcPath)
+
+ Returns the pixmap associated with the name specified by \a filePath in the resource
+ file specified by \a qrcPath.
+
+ If \a qrcPath refers to a valid resource file, the name used for the file path is a path
+ within those resources; otherwise the file path refers to a local file.
+
+ \sa {The Qt Resource System}, nameToIcon()
+*/
+
+/*!
+ \fn QString QDesignerIconCacheInterface::iconToFilePath(const QIcon &icon) const
+
+ Returns the file path associated with the given \a icon. The file path is a path within
+ an application resources.
+*/
+
+/*!
+ \fn QString QDesignerIconCacheInterface::iconToQrcPath(const QIcon &icon) const
+
+ Returns the path to the resource file that refers to the specified \a icon. The resource
+ path refers to a local file.
+*/
+
+/*!
+ \fn QString QDesignerIconCacheInterface::pixmapToFilePath(const QPixmap &pixmap) const
+
+ Returns the file path associated with the given \a pixmap. The file path is a path within
+ an application resources.
+*/
+
+/*!
+ \fn QString QDesignerIconCacheInterface::pixmapToQrcPath(const QPixmap &pixmap) const
+
+ Returns the path to the resource file that refers to the specified \a pixmap. The resource
+ path refers to a local file.
+*/
+
+/*!
+ \fn QList<QPixmap> QDesignerIconCacheInterface::pixmapList() const
+
+ Returns a list of pixmaps for the icons provided by the icon cache.
+*/
+
+/*!
+ \fn QList<QIcon> QDesignerIconCacheInterface::iconList() const
+
+ Returns a list of icons provided by the icon cache.
+*/
+
+/*!
+ \fn QString QDesignerIconCacheInterface::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory) const
+
+ Returns a path to a resource specified by the \a filePath within
+ the resource file located at \a qrcPath. If \a workingDirectory is
+ a valid path to a directory, the path returned will be relative to
+ that directory; otherwise an absolute path is returned.
+
+ \omit
+ ### Needs checking
+ \endomit
+*/
+
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerPropertySheetExtension
+
+ \brief The QDesignerPropertySheetExtension class allows you to
+ manipulate a widget's properties which is displayed in Qt
+ Designer's property editor.
+
+ \sa QDesignerDynamicPropertySheetExtension
+
+ \inmodule QtDesigner
+
+ QDesignerPropertySheetExtension provides a collection of functions that
+ are typically used to query a widget's properties, and to
+ manipulate the properties' appearance in the property editor. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15
+
+ Note that if you change the value of a property using the
+ QDesignerPropertySheetExtension::setProperty() function, the undo
+ stack is not updated. To ensure that a property's value can be
+ reverted using the undo stack, you must use the
+ QDesignerFormWindowCursorInterface::setProperty() function, or its
+ buddy \l
+ {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()},
+ instead.
+
+ When implementing a custom widget plugin, a pointer to \QD's
+ current QDesignerFormEditorInterface object (\c formEditor in the
+ example above) is provided by the
+ QDesignerCustomWidgetInterface::initialize() function's parameter.
+
+ The property sheet, or any other extension, can be retrieved by
+ querying \QD's extension manager using the qt_extension()
+ function. When you want to release the extension, you only need to
+ delete the pointer.
+
+ All widgets have a default property sheet which populates \QD's
+ property editor with the widget's properties (i.e the ones defined
+ with the Q_PROPERTY() macro). But QDesignerPropertySheetExtension
+ also provides an interface for creating custom property sheet
+ extensions.
+
+ \warning \QD uses the QDesignerPropertySheetExtension to feed its
+ property editor. Whenever a widget is selected in its workspace,
+ \QD will query for the widget's property sheet extension. If the
+ selected widget has an implemented property sheet extension, this
+ extension will override the default property sheet.
+
+ To create a property sheet extension, your extension class must
+ inherit from both QObject and
+ QDesignerPropertySheetExtension. Then, since we are implementing
+ an interface, we must ensure that it's made known to the meta
+ object system using the Q_INTERFACES() macro:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16
+
+ This enables \QD to use qobject_cast() to query for supported
+ interfaces using nothing but a QObject pointer.
+
+ In \QD the extensions are not created until they are
+ required. For that reason, when implementing a property sheet
+ extension, you must also create a QExtensionFactory, i.e a class
+ that is able to make an instance of your extension, and register
+ it using \QD's \l {QExtensionManager}{extension manager}.
+
+ When a property sheet extension is required, \QD's \l
+ {QExtensionManager}{extension manager} will run through all its
+ registered factories calling QExtensionFactory::createExtension()
+ for each until the first one that is able to create a property
+ sheet extension for the selected widget, is found. This factory
+ will then make an instance of the extension. If no such factory
+ can be found, \QD will use the default property sheet.
+
+ There are four available types of extensions in \QD:
+ QDesignerContainerExtension, QDesignerMemberSheetExtension,
+ QDesignerPropertySheetExtension and QDesignerTaskMenuExtension. Qt
+ Designer's behavior is the same whether the requested extension is
+ associated with a multi page container, a member sheet, a property
+ sheet or a task menu.
+
+ The QExtensionFactory class provides a standard extension factory,
+ and can also be used as an interface for custom extension
+ factories. You can either create a new QExtensionFactory and
+ reimplement the QExtensionFactory::createExtension() function. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17
+
+ Or you can use an existing factory, expanding the
+ QExtensionFactory::createExtension() function to make the factory
+ able to create a property sheet extension extension as well. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18
+
+ For a complete example using an extension class, see the \l
+ {designer/taskmenuextension}{Task Menu Extension example}. The
+ example shows how to create a custom widget plugin for Qt
+ Designer, and how to to use the QDesignerTaskMenuExtension class
+ to add custom items to \QD's task menu.
+
+ \sa QExtensionFactory, QExtensionManager, {Creating Custom Widget
+ Extensions}
+*/
+
+/*!
+ \fn QDesignerPropertySheetExtension::~QDesignerPropertySheetExtension()
+
+ Destroys the property sheet extension.
+*/
+
+/*!
+ \fn int QDesignerPropertySheetExtension::count() const
+
+ Returns the selected widget's number of properties.
+*/
+
+/*!
+ \fn int QDesignerPropertySheetExtension::indexOf(const QString &name) const
+
+ Returns the index for a given property \a name.
+
+ \sa propertyName()
+*/
+
+/*!
+ \fn QString QDesignerPropertySheetExtension::propertyName(int index) const
+
+ Returns the name of the property at the given \a index.
+
+ \sa indexOf()
+*/
+
+/*!
+ \fn QString QDesignerPropertySheetExtension::propertyGroup(int index) const
+
+ Returns the property group for the property at the given \a index.
+
+ \QD's property editor supports property groups, i.e. sections of
+ related properties. A property can be related to a group using the
+ setPropertyGroup() function. The default group of any property is
+ the name of the class that defines it. For example, the
+ QObject::objectName property appears within the QObject property
+ group.
+
+ \sa indexOf(), setPropertyGroup()
+*/
+
+/*!
+ \fn void QDesignerPropertySheetExtension::setPropertyGroup(int index, const QString &group)
+
+ Sets the property group for the property at the given \a index to
+ \a group.
+
+ Relating a property to a group makes it appear within that group's
+ section in the property editor. The default property group of any
+ property is the name of the class that defines it. For example,
+ the QObject::objectName property appears within the QObject
+ property group.
+
+ \sa indexOf(), property(), propertyGroup()
+*/
+
+/*!
+ \fn bool QDesignerPropertySheetExtension::hasReset(int index) const
+
+ Returns true if the property at the given \a index has a reset
+ button in \QD's property editor, otherwise false.
+
+ \sa indexOf(), reset()
+*/
+
+/*!
+ \fn bool QDesignerPropertySheetExtension::reset(int index)
+
+ Resets the value of the property at the given \a index, to the
+ default value. Returns true if a default value could be found, otherwise false.
+
+ \sa indexOf(), hasReset(), isChanged()
+*/
+
+/*!
+ \fn bool QDesignerPropertySheetExtension::isVisible(int index) const
+
+ Returns true if the property at the given \a index is visible in
+ \QD's property editor, otherwise false.
+
+ \sa indexOf(), setVisible()
+*/
+
+/*!
+ \fn void QDesignerPropertySheetExtension::setVisible(int index, bool visible)
+
+ If \a visible is true, the property at the given \a index is
+ visible in \QD's property editor; otherwise the property is
+ hidden.
+
+ \sa indexOf(), isVisible()
+*/
+
+/*!
+ \fn bool QDesignerPropertySheetExtension::isAttribute(int index) const
+
+ Returns true if the property at the given \a index is an attribute,
+ which will be \e excluded from the .ui file, otherwise false.
+
+ \sa indexOf(), setAttribute()
+*/
+
+/*!
+ \fn void QDesignerPropertySheetExtension::setAttribute(int index, bool attribute)
+
+ If \a attribute is true, the property at the given \a index is
+ made an attribute which will be \e excluded from the .ui file;
+ otherwise it will be included.
+
+ \sa indexOf(), isAttribute()
+*/
+
+/*!
+ \fn QVariant QDesignerPropertySheetExtension::property(int index) const
+
+ Returns the value of the property at the given \a index.
+
+ \sa indexOf(), setProperty(), propertyGroup()
+*/
+
+/*!
+ \fn void QDesignerPropertySheetExtension::setProperty(int index, const QVariant &value)
+
+ Sets the \a value of the property at the given \a index.
+
+ \warning If you change the value of a property using this
+ function, the undo stack is not updated. To ensure that a
+ property's value can be reverted using the undo stack, you must
+ use the QDesignerFormWindowCursorInterface::setProperty()
+ function, or its buddy \l
+ {QDesignerFormWindowCursorInterface::setWidgetProperty()}{setWidgetProperty()},
+ instead.
+
+ \sa indexOf(), property(), propertyGroup()
+*/
+
+/*!
+ \fn bool QDesignerPropertySheetExtension::isChanged(int index) const
+
+ Returns true if the value of the property at the given \a index
+ differs from the property's default value, otherwise false.
+
+ \sa indexOf(), setChanged(), reset()
+*/
+
+/*!
+ \fn void QDesignerPropertySheetExtension::setChanged(int index, bool changed)
+
+ Sets whether the property at the given \a index is different from
+ its default value, or not, depending on the \a changed parameter.
+
+ \sa indexOf(), isChanged()
+*/
+
+// Doc: Interface only
+
+/*!
+ \class QDesignerDynamicPropertySheetExtension
+
+ \brief The QDesignerDynamicPropertySheetExtension class allows you to
+ manipulate a widget's dynamic properties in Qt Designer's property editor.
+
+ \sa QDesignerPropertySheetExtension, {QObject#Dynamic Properties}{Dynamic Properties}
+
+ \inmodule QtDesigner
+ \since 4.3
+*/
+
+/*!
+ \fn QDesignerDynamicPropertySheetExtension::~QDesignerDynamicPropertySheetExtension()
+
+ Destroys the dynamic property sheet extension.
+*/
+
+/*!
+ \fn bool QDesignerDynamicPropertySheetExtension::dynamicPropertiesAllowed() const
+
+ Returns true if the widget supports dynamic properties; otherwise returns false.
+*/
+
+/*!
+ \fn int QDesignerDynamicPropertySheetExtension::addDynamicProperty(const QString &propertyName, const QVariant &value)
+
+ Adds a dynamic property named \a propertyName and sets its value to \a value.
+ Returns the index of the property if it was added successfully; otherwise returns -1 to
+ indicate failure.
+*/
+
+/*!
+ \fn bool QDesignerDynamicPropertySheetExtension::removeDynamicProperty(int index)
+
+ Removes the dynamic property at the given \a index.
+ Returns true if the operation succeeds; otherwise returns false.
+*/
+
+/*!
+ \fn bool QDesignerDynamicPropertySheetExtension::isDynamicProperty(int index) const
+
+ Returns true if the property at the given \a index is a dynamic property; otherwise
+ returns false.
+*/
+
+/*!
+ \fn bool QDesignerDynamicPropertySheetExtension::canAddDynamicProperty(const QString &propertyName) const
+
+ Returns true if \a propertyName is a valid, unique name for a dynamic
+ property; otherwise returns false.
+
+*/
diff --git a/doc/src/qtendian.qdoc b/doc/src/qtendian.qdoc
new file mode 100644
index 0000000..f4b5bb8
--- /dev/null
+++ b/doc/src/qtendian.qdoc
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \headerfile <QtEndian>
+ \title Endian Conversion Functions
+ \ingroup architecture
+ \brief The <QtEndian> header provides functions to convert between
+ little and big endian representations of numbers.
+*/
+
+/*!
+ \fn T qFromBigEndian(const uchar *src)
+ \since 4.3
+ \relates <QtEndian>
+
+ Reads a big-endian number from memory location \a src and returns the number in the
+ host byte order representation.
+ On CPU architectures where the host byte order is little-endian (such as x86) this
+ will swap the byte order; otherwise it will just read from \a src.
+
+ \note Template type \c{T} can either be a qint16, qint32 or qint64. Other types of
+ integers, e.g., qlong, are not applicable.
+
+ There are no data alignment constraints for \a src.
+
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
+/*!
+ \fn T qFromBigEndian(T src)
+ \since 4.3
+ \relates <QtEndian>
+ \overload
+
+ Converts \a src from big-endian byte order and returns the number in host byte order
+ representation of that number.
+ On CPU architectures where the host byte order is little-endian (such as x86) this
+ will return \a src with the byte order swapped; otherwise it will return \a src
+ unmodified.
+*/
+/*!
+ \fn T qFromLittleEndian(const uchar *src)
+ \since 4.3
+ \relates <QtEndian>
+
+ Reads a little-endian number from memory location \a src and returns the number in
+ the host byte order representation.
+ On CPU architectures where the host byte order is big-endian (such as PowerPC) this
+ will swap the byte order; otherwise it will just read from \a src.
+
+ \note Template type \c{T} can either be a qint16, qint32 or qint64. Other types of
+ integers, e.g., qlong, are not applicable.
+
+ There are no data alignment constraints for \a src.
+
+ \sa qFromBigEndian()
+ \sa qToBigEndian()
+ \sa qToLittleEndian()
+*/
+/*!
+ \fn T qFromLittleEndian(T src)
+ \since 4.3
+ \relates <QtEndian>
+ \overload
+
+ Converts \a src from little-endian byte order and returns the number in host byte
+ order representation of that number.
+ On CPU architectures where the host byte order is big-endian (such as PowerPC) this
+ will return \a src with the byte order swapped; otherwise it will return \a src
+ unmodified.
+*/
+/*!
+ \fn void qToBigEndian(T src, uchar *dest)
+ \since 4.3
+ \relates <QtEndian>
+
+ Writes the number \a src with template type \c{T} to the memory location at \a dest
+ in big-endian byte order.
+
+ Note that template type \c{T} can only be an integer data type (signed or unsigned).
+
+ There are no data alignment constraints for \a dest.
+
+ \sa qFromBigEndian()
+ \sa qFromLittleEndian()
+ \sa qToLittleEndian()
+*/
+/*!
+ \fn T qToBigEndian(T src)
+ \since 4.3
+ \relates <QtEndian>
+ \overload
+
+ Converts \a src from host byte order and returns the number in big-endian byte order
+ representation of that number.
+ On CPU architectures where the host byte order is little-endian (such as x86) this
+ will return \a src with the byte order swapped; otherwise it will return \a src
+ unmodified.
+*/
+/*!
+ \fn void qToLittleEndian(T src, uchar *dest)
+ \since 4.3
+ \relates <QtEndian>
+
+ Writes the number \a src with template type \c{T} to the memory location at \a dest
+ in little-endian byte order.
+
+ Note that template type \c{T} can only be an integer data type (signed or unsigned).
+
+ There are no data alignment constraints for \a dest.
+
+ \sa qFromBigEndian()
+ \sa qFromLittleEndian()
+ \sa qToBigEndian()
+*/
+/*!
+ \fn T qToLittleEndian(T src)
+ \since 4.3
+ \relates <QtEndian>
+ \overload
+
+ Converts \a src from host byte order and returns the number in little-endian byte
+ order representation of that number.
+ On CPU architectures where the host byte order is big-endian (such as PowerPC) this
+ will return \a src with the byte order swapped; otherwise it will return \a src
+ unmodified.
+*/
+
diff --git a/doc/src/qtestevent.qdoc b/doc/src/qtestevent.qdoc
new file mode 100644
index 0000000..f5edb19
--- /dev/null
+++ b/doc/src/qtestevent.qdoc
@@ -0,0 +1,191 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QTestEventList
+ \inmodule QtTest
+
+ \brief The QTestEventList class provides a list of GUI events.
+
+ QTestEventList inherits from QList<QTestEvent *>, and provides
+ convenience functions for populating the list.
+
+ A QTestEventList can be populated with GUI events that can be
+ stored as test data for later usage, or be replayed on any
+ QWidget.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qtestevent.qdoc 0
+
+ The example above simulates the user entering the character \c a
+ followed by a backspace, waiting for 200 milliseconds and
+ repeating it.
+*/
+
+/*! \fn QTestEventList::QTestEventList()
+
+ Constructs an empty QTestEventList.
+*/
+
+/*! \fn QTestEventList::QTestEventList(const QTestEventList &other)
+
+ Constructs a new QTestEventList as a copy of \a other.
+*/
+
+/*! \fn QTestEventList::~QTestEventList()
+
+ Empties the list and destroys all stored events.
+*/
+
+/*! \fn void QTestEventList::clear()
+
+ Removes all events from the list.
+*/
+
+/*! \fn void QTestEventList::addKeyClick(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ Adds a new key click to the list. The event will simulate the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyClick()
+*/
+
+/*! \fn void QTestEventList::addKeyPress(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ Adds a new key press to the list. The event will press the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyPress()
+*/
+
+/*! \fn void QTestEventList::addKeyRelease(Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ Adds a new key release to the list. The event will release the key \a qtKey with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyRelease()
+
+*/
+
+/*! \fn void QTestEventList::addKeyEvent(QTest::KeyAction action, Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+ \internal
+*/
+
+/*! \fn void QTestEventList::addKeyClick(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ \overload
+
+ Adds a new key click to the list. The event will simulate the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyClick()
+
+*/
+
+/*! \fn void QTestEventList::addKeyPress(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ \overload
+
+ Adds a new key press to the list. The event will press the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyPress()
+*/
+
+/*! \fn void QTestEventList::addKeyRelease(char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ \overload
+
+ Adds a new key release to the list. The event will release the key \a ascii with the modifier \a modifiers and then wait for \a msecs milliseconds.
+
+ \sa QTest::keyRelease()
+*/
+
+/*! \fn void QTestEventList::addKeyClicks(const QString &keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+
+ Adds new keyboard entries to the list. The event will press the \a keys with the \a modifiers and wait \a msecs milliseconds between each key.
+
+ \sa QTest::keyClicks()
+*/
+
+/*! \fn void QTestEventList::addKeyEvent(QTest::KeyAction action, char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1)
+ \internal
+*/
+
+/*! \fn void QTestEventList::addDelay(int msecs)
+
+ Adds a \a msecs milliseconds delay.
+
+ \sa QTest::qWait()
+*/
+
+/*! \fn void QTestEventList::simulate(QWidget *w)
+
+ Simulates the events from the list one by one on the widget \a w.
+ For an example, please read the \l QTestEventList class documentation.
+*/
+
+/*! \fn void QTestEventList::addMousePress(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
+
+ Add a mouse press to the list. The event will press the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
+
+ \sa QTest::mousePress()
+*/
+/*! \fn void QTestEventList::addMouseRelease(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
+
+ Add a mouse release to the list. The event will release the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
+
+ \sa QTest::mouseRelease()
+*/
+/*! \fn void QTestEventList::addMouseClick(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
+
+ Add a mouse click to the list. The event will click the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
+
+ \sa QTest::mouseClick()
+*/
+/*! \fn void QTestEventList::addMouseDClick(Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay=-1)
+
+ Add a double mouse click to the list. The event will double click the \a button with optional \a modifiers at the position \a pos with an optional \a delay. The default position is the center of the widget.
+
+ \sa QTest::mousePress()
+*/
+/*! \fn void QTestEventList::addMouseMove(QPoint pos = QPoint(), int delay=-1)
+
+ Adds a mouse move to the list. The event will move the mouse to the position \a pos. If a \a delay (in milliseconds) is set, the test will wait after moving the mouse. The default position is the center of the widget.
+
+ \sa QTest::mousePress()
+*/
+
diff --git a/doc/src/qtestlib.qdoc b/doc/src/qtestlib.qdoc
new file mode 100644
index 0000000..4e93107
--- /dev/null
+++ b/doc/src/qtestlib.qdoc
@@ -0,0 +1,779 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtestlib-manual.html
+ \title QTestLib Manual
+ \ingroup architecture
+ \brief An overview of Qt's unit testing framework.
+
+ \keyword qtestlib
+
+ The QTestLib framework, provided by Nokia, is a tool for unit
+ testing Qt based applications and libraries. QTestLib provides
+ all the functionality commonly found in unit testing frameworks as
+ well as extensions for testing graphical user interfaces.
+
+ Table of contents:
+
+ \tableofcontents
+
+ \section1 QTestLib Features
+
+ QTestLib is designed to ease the writing of unit tests for Qt
+ based applications and libraries:
+
+ \table
+ \header \o Feature \o Details
+ \row
+ \o \bold Lightweight
+ \o QTestLib consists of about 6000 lines of code and 60
+ exported symbols.
+ \row
+ \o \bold Self-contained
+ \o QTestLib requires only a few symbols from the Qt Core library
+ for non-gui testing.
+ \row
+ \o \bold {Rapid testing}
+ \o QTestLib needs no special test-runners; no special
+ registration for tests.
+ \row
+ \o \bold {Data-driven testing}
+ \o A test can be executed multiple times with different test data.
+ \row
+ \o \bold {Basic GUI testing}
+ \o QTestLib offers functionality for mouse and keyboard simulation.
+ \row
+ \o \bold {Benchmarking}
+ \o QTestLib supports benchmarking and provides several measurement back-ends.
+ \row
+ \o \bold {IDE friendly}
+ \o QTestLib outputs messages that can be interpreted by Visual
+ Studio and KDevelop.
+ \row
+ \o \bold Thread-safety
+ \o The error reporting is thread safe and atomic.
+ \row
+ \o \bold Type-safety
+ \o Extensive use of templates prevent errors introduced by
+ implicit type casting.
+ \row
+ \o \bold {Easily extendable}
+ \o Custom types can easily be added to the test data and test output.
+ \endtable
+
+ Note: For higher-level GUI and application testing needs, please
+ see the \l{Third-Party Tools}{Qt testing products provided by
+ Nokia partners}.
+
+
+ \section1 QTestLib API
+
+ All public methods are in the \l QTest namespace. In addition, the
+ \l QSignalSpy class provides easy introspection for Qt's signals and slots.
+
+
+ \section1 Using QTestLib
+
+ \section2 Creating a Test
+
+ To create a test, subclass QObject and add one or more private slots to it. Each
+ private slot is a testfunction in your test. QTest::qExec() can be used to execute
+ all testfunctions in the test object.
+
+ In addition, there are four private slots that are \e not treated as testfunctions.
+ They will be executed by the testing framework and can be used to initialize and
+ clean up either the entire test or the current test function.
+
+ \list
+ \o \c{initTestCase()} will be called before the first testfunction is executed.
+ \o \c{cleanupTestCase()} will be called after the last testfunction was executed.
+ \o \c{init()} will be called before each testfunction is executed.
+ \o \c{cleanup()} will be called after every testfunction.
+ \endlist
+
+ If \c{initTestCase()} fails, no testfunction will be executed. If \c{init()} fails,
+ the following testfunction will not be executed, the test will proceed to the next
+ testfunction.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 0
+
+ For more examples, refer to the \l{QTestLib Tutorial}.
+
+ \section2 Building a Test
+
+ If you are using \c qmake as your build tool, just add the
+ following to your project file:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 1
+
+ If you are using other buildtools, make sure that you add the location
+ of the QTestLib header files to your include path (usually \c{include/QtTest}
+ under your Qt installation directory). If you are using a release build
+ of Qt, link your test to the \c QtTest library. For debug builds, use
+ \c{QtTest_debug}.
+
+ See \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test} for a step by
+ step explanation.
+
+ \section2 QTestLib Command Line Arguments
+
+ \section3 Syntax
+
+ The syntax to execute an autotest takes the following simple form:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 2
+
+ Substitute \c testname with the name of your executable. \c
+ testfunctions can contain names of test functions to be
+ executed. If no \c testfunctions are passed, all tests are run. If you
+ append the name of an entry in \c testdata, the test function will be
+ run only with that test data.
+
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 3
+
+ Runs the test function called \c toUpper with all available test data.
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 4
+
+ Runs the \c toUpper test function with all available test data,
+ and the \c toInt test function with the testdata called \c
+ zero (if the specified test data doesn't exist, the associated test
+ will fail).
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 5
+
+ Runs the testMyWidget function test, outputs every signal
+ emission and waits 500 milliseconds after each simulated
+ mouse/keyboard event.
+
+ \section3 Options
+
+ The following command line arguments are understood:
+
+ \list
+ \o \c -help \BR
+ outputs the possible command line arguments and give some useful help.
+ \o \c -functions \BR
+ outputs all test functions available in the test.
+ \o \c -o \e filename \BR
+ write output to the specified file, rather than to standard output
+ \o \c -silent \BR
+ silent output, only shows warnings, failures and minimal status messages
+ \o \c -v1 \BR
+ verbose output; outputs information on entering and exiting test functions.
+ \o \c -v2 \BR
+ extended verbose output; also outputs each \l QCOMPARE() and \l QVERIFY()
+ \o \c -vs \BR
+ outputs every signal that gets emitted
+ \o \c -xml \BR
+ outputs XML formatted results instead of plain text
+ \o \c -lightxml \BR
+ outputs results as a stream of XML tags
+ \o \c -eventdelay \e ms \BR
+ if no delay is specified for keyboard or mouse simulation
+ (\l QTest::keyClick(),
+ \l QTest::mouseClick() etc.), the value from this parameter
+ (in milliseconds) is substituted.
+ \o \c -keydelay \e ms \BR
+ like -eventdelay, but only influences keyboard simulation and not mouse
+ simulation.
+ \o \c -mousedelay \e ms \BR
+ like -eventdelay, but only influences mouse simulation and not keyboard
+ simulation.
+ \o \c -keyevent-verbose \BR
+ output more verbose output for keyboard simulation
+ \o \c -maxwarnings \e number\BR
+ sets the maximum number of warnings to output. 0 for unlimited, defaults to 2000.
+ \endlist
+
+ \section2 Creating a Benchmark
+
+ To create a benchmark, follow the instructions for crating a test and then add a
+ QBENCHMARK macro to the test function that you want to benchmark.
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12
+
+ The code insde the QBENCHMARK macro will be measured, and possibly also repeated
+ several times in order to get an accurate measurement. This depends on the selected
+ measurement back-end. Several back-ends are available an can be selected on the
+ command line:
+
+ \target testlib-benchmarking-measurement
+
+ \table
+ \header \o Name
+ \o Commmand-line Arguemnt
+ \o Availability
+ \row \o Walltime
+ \o (default)
+ \o All platforms
+ \row \o CPU tick counter
+ \o -tickcounter
+ \o Windows, Mac OS X, Linux, many UNIX-like systems.
+ \row \o Valgrind/Callgrind
+ \o -callgrind
+ \o Linux (if installed)
+ \row \o Event Counter
+ \o -eventcounter
+ \o All platforms
+ \endtable
+
+ In short, walltime is always available but requires many repetitions to
+ get a useful result.
+ Tick counters are usually available and can provide
+ results with fewer repetitions, but can be susceptible to CPU frequency
+ scaling issues.
+ Valgrind provides exact results, but does not take
+ I/O waits into account, and is only available on a limited number of
+ platforms.
+ Event counting is available on all platforms and it provides the number of events
+ that were received by the event loop before they are sent to their corresponding
+ targets (this might include non-Qt events).
+
+ \note Depending on the device configuration, Tick counters on the
+ Windows CE platform may not be as fine-grained, compared to other platforms.
+ Devices that do not support high-resolution timers default to
+ one-millisecond granularity.
+
+ See the chapter 5 in the \l{QTestLib Tutorial} for more benchmarking examples.
+
+ \section1 Using QTestLib remotely on Windows CE
+ \c cetest is a convenience application which helps the user to launch an
+ application remotely on a Windows CE device or emulator.
+
+ It needs to be executed after the unit test has been successfully compiled.
+
+ Prior to launching, the following files are copied to the device:
+
+ \list
+ \o all Qt libraries the project links to
+ \o \l {QtRemote}{QtRemote.dll}
+ \o the c runtime library specified during installation
+ \o all files specified in the \c .pro file following the \l DEPLOYMENT rules.
+ \endlist
+
+ \section2 Using \c cetest
+ \section3 Syntax
+ The syntax to execute an autotest takes the following simple form:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 6
+
+ \section3 Options
+ \c cetest provides the same options as those for unit-testing on non cross-compiled
+ platforms. See \l {QTestLib Command Line Arguments} {Command Line Arguments} for
+ more information.
+
+ The following commands are also included:
+
+ \list
+ \o \c -debug \BR
+ Test version compiled in debug mode.
+ \o \c -release \BR
+ Test version compiled in release mode.
+ \o \c -libpath \e path \BR
+ Target path to copy Qt libraries to.
+ \o \c -qt-delete \BR
+ Delete Qt libraries after execution.
+ \o \c -project-delete \BR
+ Delete project files after execution.
+ \o \c -delete \BR
+ Delete project and Qt libraries after execution.
+ \o \c -conf \BR
+ Specifies a qt.conf file to be deployed to remote directory.
+ \endlist
+
+ \note \c{debug} is the default build option.
+
+ \section2 QtRemote
+ \c QtRemote is a small library which is build after QTestLib. It allows the host
+ system to create a process on a remote device and waits until its execution has
+ been finished.
+
+ \section2 Requirements
+ \c cetest uses Microsoft ActiveSync to establish a remote connection between the
+ host computer and the device. Thus header files and libraries are needed to compile
+ cetest and QtRemote successfully.
+
+ Prior to \l{Installing Qt on Windows CE}{installation} of Qt, you need to set your
+ \c INCLUDE and \c LIB environment variables properly.
+
+ A default installation of Windows Mobile 5 for Pocket PC can be obtained by:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 7
+
+ Note that Qt will remember the path, so you do not need to set it again
+ after switching the environments for cross-compilation.
+
+ \section1 3rd Party Code
+
+ The CPU tick counters used for benchmarking is licensed under the following
+ license: (from src/testlib/3rdparty/cycle.h)
+
+ \legalese
+ Copyright (c) 2003, 2006 Matteo Frigo\br
+ Copyright (c) 2003, 2006 Massachusetts Institute of Technology
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ \endlegalese
+*/
+
+/*!
+ \page qtestlib-tutorial.html
+ \brief A short introduction to testing with QTestLib.
+ \contentspage QTestLib Manual
+ \nextpage {Chapter 1: Writing a Unit Test}{Chapter 1}
+
+ \title QTestLib Tutorial
+ \ingroup howto
+
+ This tutorial gives a short introduction to how to use some of the
+ features of the QTestLib framework. It is divided into four
+ chapters:
+
+ \list 1
+ \o \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test}
+ \o \l {Chapter 2: Data Driven Testing}{Data Driven Testing}
+ \o \l {Chapter 3: Simulating GUI Events}{Simulating GUI Events}
+ \o \l {Chapter 4: Replaying GUI Events}{Replaying GUI Events}
+ \o \l {Chapter 5: Writing a Benchmark}{Writing a Benchmark}
+ \endlist
+
+*/
+
+
+/*!
+ \example qtestlib/tutorial1
+
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 2: Data Driven Testing}{Chapter 2}
+
+ \title Chapter 1: Writing a Unit Test
+
+ In this first chapter we will see how to write a simple unit test
+ for a class, and how to execute it.
+
+ \section1 Writing a Test
+
+ Let's assume you want to test the behavior of our QString class.
+ First, you need a class that contains your test functions. This class
+ has to inherit from QObject:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 0
+
+ Note that you need to include the QTest header, and that the
+ test functions have to be declared as private slots so the
+ test framework finds and executes it.
+
+ Then you need to implement the test function itself. The
+ implementation could look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+
+ The \l QVERIFY() macro evaluates the expression passed as its
+ argument. If the expression evaluates to true, the execution of
+ the test function continues. Otherwise, a message describing the
+ failure is appended to the test log, and the test function stops
+ executing.
+
+ But if you want a more verbose output to the test log, you should
+ use the \l QCOMPARE() macro instead:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 1
+
+ If the strings are not equal, the contents of both strings is
+ appended to the test log, making it immediately visible why the
+ comparison failed.
+
+ Finally, to make our test case a stand-alone executable, the
+ following two lines are needed:
+
+ \snippet examples/qtestlib/tutorial1/testqstring.cpp 2
+
+ The \l QTEST_MAIN() macro expands to a simple \c main()
+ method that runs all the test functions. Note that if both the
+ declaration and the implementation of our test class are in a \c
+ .cpp file, we also need to include the generated moc file to make
+ Qt's introspection work.
+
+ \section1 Executing a Test
+
+ Now that we finished writing our test, we want to execute
+ it. Assuming that our test was saved as \c testqstring.cpp in an
+ empty directory: we build the test using qmake to create a project
+ and generate a makefile.
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 9
+
+ \bold {Note:}If you're using windows, replace \c make with \c
+ nmake or whatever build tool you use.
+
+ Running the resulting executable should give you the following
+ output:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 10
+
+ Congratulations! You just wrote and executed your first unit test
+ using the QTestLib framework.
+*/
+
+/*!
+ \example qtestlib/tutorial2
+
+ \previouspage {Chapter 1: Writing a Unit Test}{Chapter 1}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 3: Simulating Gui Events}{Chapter 3}
+
+ \title Chapter 2: Data Driven Testing
+
+ In this chapter we will demonstrate how to execute a test
+ multiple times with different test data.
+
+ So far, we have hard coded the data we wanted to test into our
+ test function. If we add more test data, the function might look like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+
+ To prevent that the function ends up being cluttered by repetitive
+ code, QTestLib supports adding test data to a test function. All
+ we need is to add another private slot to our test class:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 0
+
+ \section1 Writing the Data Function
+
+ A test function's associated data function carries the same name,
+ appended by \c{_data}. Our data function looks like this:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 1
+
+ First, we define the two elements of our test table using the \l
+ QTest::addColumn() function: A test string, and the
+ expected result of applying the QString::toUpper() function to
+ that string.
+
+ Then we add some data to the table using the \l
+ QTest::newRow() function. Each set of data will become a
+ separate row in the test table.
+
+ \l QTest::newRow() takes one argument: A name that will be
+ associated with the data set. If the test fails, the name will be
+ used in the test log, referencing the failed data. Then we
+ stream the data set into the new table row: First an arbitrary
+ string, and then the expected result of applying the
+ QString::toUpper() function to that string.
+
+ You can think of the test data as a two-dimensional table. In
+ our case, it has two columns called \c string and \c result and
+ three rows. In addition a name as well as an index is associated
+ with each row:
+
+ \table
+ \header
+ \o index
+ \o name
+ \o string
+ \o result
+ \row
+ \o 0
+ \o all lower
+ \o "hello"
+ \o HELLO
+ \row
+ \o 1
+ \o mixed
+ \o "Hello"
+ \o HELLO
+ \row
+ \o 2
+ \o all upper
+ \o "HELLO"
+ \o HELLO
+ \endtable
+
+ \section1 Rewriting the Test Function
+
+ Our test function can now be rewritten:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 2
+
+ The TestQString::toUpper() function will be executed three times,
+ once for each entry in the test table that we created in the
+ associated TestQString::toUpper_data() function.
+
+ First, we fetch the two elements of the data set using the \l
+ QFETCH() macro. \l QFETCH() takes two arguments: The data type of
+ the element and the element name. Then we perform the test using
+ the \l QCOMPARE() macro.
+
+ This approach makes it very easy to add new data to the test
+ without modifying the test itself.
+
+ And again, to make our test case a stand-alone executable,
+ the following two lines are needed:
+
+ \snippet examples/qtestlib/tutorial2/testqstring.cpp 3
+
+ As before, the QTEST_MAIN() macro expands to a simple main()
+ method that runs all the test functions, and since both the
+ declaration and the implementation of our test class are in a .cpp
+ file, we also need to include the generated moc file to make Qt's
+ introspection work.
+*/
+
+/*!
+ \example qtestlib/tutorial3
+
+ \previouspage {Chapter 2 Data Driven Testing}{Chapter 2}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 4: Replaying GUI Events}{Chapter 4}
+
+ \title Chapter 3: Simulating GUI Events
+
+ QTestLib features some mechanisms to test graphical user
+ interfaces. Instead of simulating native window system events,
+ QTestLib sends internal Qt events. That means there are no
+ side-effects on the machine the tests are running on.
+
+ In this chapter we will se how to write a simple GUI test.
+
+ \section1 Writing a GUI test
+
+ This time, let's assume you want to test the behavior of our
+ QLineEdit class. As before, you will need a class that contains
+ your test function:
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 0
+
+ The only difference is that you need to include the QtGui class
+ definitions in addition to the QTest namespace.
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 1
+
+ In the implementation of the test function we first create a
+ QLineEdit. Then we simulate writing "hello world" in the line edit
+ using the \l QTest::keyClicks() function.
+
+ \note The widget must also be shown in order to correctly test keyboard
+ shortcuts.
+
+ QTest::keyClicks() simulates clicking a sequence of keys on a
+ widget. Optionally, a keyboard modifier can be specified as well
+ as a delay (in milliseconds) of the test after each key click. In
+ a similar way, you can use the QTest::keyClick(),
+ QTest::keyPress(), QTest::keyRelease(), QTest::mouseClick(),
+ QTest::mouseDClick(), QTest::mouseMove(), QTest::mousePress()
+ and QTest::mouseRelease() functions to simulate the associated
+ GUI events.
+
+ Finally, we use the \l QCOMPARE() macro to check if the line edit's
+ text is as expected.
+
+ As before, to make our test case a stand-alone executable, the
+ following two lines are needed:
+
+ \snippet examples/qtestlib/tutorial3/testgui.cpp 2
+
+ The QTEST_MAIN() macro expands to a simple main() method that
+ runs all the test functions, and since both the declaration and
+ the implementation of our test class are in a .cpp file, we also
+ need to include the generated moc file to make Qt's introspection
+ work.
+*/
+
+/*!
+ \example qtestlib/tutorial4
+
+ \previouspage {Chapter 3: Simulating GUI Event}{Chapter 3}
+ \contentspage {QTestLib Tutorial}{Contents}
+ \nextpage {Chapter 5: Writing a Benchmark}{Chapter 5}
+
+ \title Chapter 4: Replaying GUI Events
+
+ In this chapter, we will show how to simulate a GUI event,
+ and how to store a series of GUI events as well as replay them on
+ a widget.
+
+ The approach to storing a series of events and replay them, is
+ quite similar to the approach explained in \l {Chapter 2:
+ Data Driven Testing}{chapter 2}; all you need is to add a data
+ function to your test class:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 0
+
+ \section1 Writing the Data Function
+
+ As before, a test function's associated data function carries the
+ same name, appended by \c{_data}.
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 1
+
+ First, we define the elements of the table using the
+ QTest::addColumn() function: A list of GUI events, and the
+ expected result of applying the list of events on a QWidget. Note
+ that the type of the first element is \l QTestEventList.
+
+ A QTestEventList can be populated with GUI events that can be
+ stored as test data for later usage, or be replayed on any
+ QWidget.
+
+ In our current data function, we create two \l
+ {QTestEventList}s. The first list consists of a single click to
+ the 'a' key. We add the event to the list using the
+ QTestEventList::addKeyClick() function. Then we use the
+ QTest::newRow() function to give the data set a name, and
+ stream the event list and the expected result into the table.
+
+ The second list consists of two key clicks: an 'a' with a
+ following 'backspace'. Again we use the
+ QTestEventList::addKeyClick() to add the events to the list, and
+ QTest::newRow() to put the event list and the expected
+ result into the table with an associated name.
+
+ \section1 Rewriting the Test Function
+
+ Our test can now be rewritten:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 2
+
+ The TestGui::testGui() function will be executed two times,
+ once for each entry in the test data that we created in the
+ associated TestGui::testGui_data() function.
+
+ First, we fetch the two elements of the data set using the \l
+ QFETCH() macro. \l QFETCH() takes two arguments: The data type of
+ the element and the element name. Then we create a QLineEdit, and
+ apply the list of events on that widget using the
+ QTestEventList::simulate() function.
+
+ Finally, we use the QCOMPARE() macro to check if the line edit's
+ text is as expected.
+
+ As before, to make our test case a stand-alone executable,
+ the following two lines are needed:
+
+ \snippet examples/qtestlib/tutorial4/testgui.cpp 3
+
+ The QTEST_MAIN() macro expands to a simple main() method that
+ runs all the test functions, and since both the declaration and
+ the implementation of our test class are in a .cpp file, we also
+ need to include the generated moc file to make Qt's introspection
+ work.
+*/
+
+/*!
+ \example qtestlib/tutorial5
+
+ \previouspage {Chapter 4: Replaying GUI Events}{Chapter 4}
+ \contentspage {QTestLib Tutorial}{Contents}
+
+ \title Chapter 5: Writing a Benchmark
+
+ In this final chapter we will demonstrate how to write benchmarks
+ using QTestLib.
+
+ \section1 Writing a Benchmark
+ To create a benchmark we extend a test function with a QBENCHMARK macro.
+ A benchmark test function will then typically consist of setup code and
+ a QBENCHMARK macro that contains the code to be measured. This test
+ function benchmarks QString::localeAwareCompare().
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0
+
+ Setup can be done at the beginning of the function, the clock is not
+ running at this point. The code inside the QBENCHMARK macro will be
+ measured, and possibly repeated several times in order to get an
+ accurate measurement.
+
+ Several \l {testlib-benchmarking-measurement}{back-ends} are available
+ and can be selected on the command line.
+
+ \section1 Data Functions
+
+ Data functions are useful for creating benchmarks that compare
+ multiple data inputs, for example locale aware compare against standard
+ compare.
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 1
+
+ The test function then uses the data to determine what to benchmark.
+
+ \snippet examples/qtestlib/tutorial5/benchmarking.cpp 2
+
+ The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK
+ macro to avoid measuring its overhead. Each benchmark test function
+ can have one active QBENCHMARK macro.
+
+ \section1 External Tools
+
+ Tools for handling and visualizing test data are available as part of
+ the \l{qtestlib-tools} project on the Qt Labs Web site. These include
+ a tool for comparing performance data obtained from test runs and a
+ utility to generate Web-based graphs of performance data.
+
+ See the \l{qtestlib-tools Announcement} for more information on these
+ tools and a simple graphing example.
+
+*/
+
+
+
diff --git a/doc/src/qtgui.qdoc b/doc/src/qtgui.qdoc
new file mode 100644
index 0000000..08b492a
--- /dev/null
+++ b/doc/src/qtgui.qdoc
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtGui
+ \title QtGui Module
+ \contentspage Qt's Modules
+ \previouspage QtCore
+ \nextpage QtNetwork
+ \ingroup modules
+
+ \brief The QtGui module extends QtCore with GUI functionality.
+
+ To include the definitions of both modules' classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0
+
+ The QtGui module is part of the \l{Qt GUI Framework Edition},
+ the \l{Qt Full Framework Edition}, and the \l{Open Source Versions of Qt}.
+*/
diff --git a/doc/src/qthelp.qdoc b/doc/src/qthelp.qdoc
new file mode 100644
index 0000000..05bf3e3
--- /dev/null
+++ b/doc/src/qthelp.qdoc
@@ -0,0 +1,403 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtHelp
+ \title QtHelp Module
+ \contentspage Qt's Modules
+ \previouspage QtUiTools
+ \nextpage QtAssistant
+ \ingroup modules
+
+ \brief The QtHelp module provides classes for integrating
+ online documentation in applications.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 1
+
+ \note These classes are part of the \l{Open Source Versions of Qt} and
+ \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
+ users.
+
+ \section1 Topics
+
+ \tableofcontents
+
+ \section1 Overview
+ The Qt help system includes tools for generating and viewing
+ Qt help files. In addition it provides classes for accessing
+ help contents programatically to be able to integrate online
+ help into Qt applications.
+
+ The actual help data, meaning the table of contents, index
+ keywords or html documents, is contained in Qt compressed help
+ files. So, one such a help file represents usually one manual
+ or documentation set. Since most products are more comprehensive
+ and consist of a number of tools, one manual is rarely enough.
+ Instead, more manuals which should be accessible at the same
+ time, exist. Ideally, it should also be possible to reference
+ certain points of interest of one manual to another.
+ Therefore, the Qt help system operates on help collection files
+ which include any number of compressed help files.
+
+ However, having collection files to merge many documentation
+ sets may lead to some problems. For example, one index keyword
+ may be defined in different documentations. So, when only seeing
+ it in the index and activating it, you cannot be sure that
+ the expected documentation will be shown. Therefore, the Qt
+ help system offers the possibiltiy to filter the help contents
+ after certain attributes. This requires however, that the
+ attributes have been assigned to the help contents before the
+ generation of the compressed help file.
+
+ As already mentioned, the Qt compressed help file contains all
+ data, so there is no need any longer to ship all single html
+ files. Instead, only the compressed help file and optionally the
+ collection file has to be distributed. The collection file is
+ optional since any existing collection file, e.g. from an older
+ release could be used.
+
+ So, in general, there are four files interacting with the help
+ system, two used for generating Qt help and two meant for
+ distribution:
+
+ \table
+ \header
+ \o Name
+ \o Extension
+ \o Brief Description
+ \row
+ \o \l {Qt Help Project}
+ \o .qhp
+ \o The input file for the help generator consisting of the table
+ of contents, indices and references to the actual documentation
+ files (*.html); it also defines a unique namespace for the
+ documentation.
+
+ \row
+ \o Qt Compressed Help
+ \o .qch
+ \o The output file of the help generator. This binary file contains
+ all information specified in the help project file along with all
+ compressed documentation files.
+
+ \row
+ \o \l {Qt Help Collection Project}
+ \o .qhcp
+ \o The input file for the help collection generator. It contains
+ references to compressed help files which should be included in
+ the collection; it also may contain other information for
+ customizing Qt Assistant.
+
+ \row
+ \o Qt Help Collection
+ \o .qhc
+ \o The output of the help collection generator. This is the file
+ QHelpEngine operates on. It contains references to any number of
+ compressed help files as well as additional information, such as
+ custom filters.
+ \endtable
+
+ \section1 Generating Qt Help
+
+ Building help files for the Qt help system assumes that the html
+ documentation files already exist, i.e. the Qt help system does
+ not offer the possibility to create html files like e.g. Doxygen.
+
+ Once the html documentents are in place, a \l {Qt Help Project} file
+ has to be created. After specifying all relevant information in
+ this file, it needs to be compiled by calling:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 2
+
+ The file 'doc.qch' contains then all html files in compressed
+ form along with the table of contents and index keywords. To
+ test if the generated file is correct, open Qt Assistant and
+ install the file via the Settings|Documentation page.
+
+ \target Qt Help Collection Project
+ \section2 Creating a Qt Help Collection
+
+ The first step is to create a Qt Help Collection Project file.
+ Since a Qt help collection stores primarily references to
+ compressed help files, the project 'mycollection.qhcp' file
+ looks unsurprisingly simple:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 3
+
+ For actually creating the collection file call:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 4
+
+ Instead of running two tools, one for generating the compressed
+ help and one for generating the collection file, it is also
+ possible to just run the qcollectiongenerator tool with a
+ slightly modified project file instructing the generator to
+ create the compressed help first.
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 5
+
+ Of course, it is possible to specify more than one file in the
+ 'generate' or 'register' section, so any number of compressed
+ help files can be generated and registered in one go.
+
+ \section1 Using Qt Help
+
+ Accessing the help contents can be done in two ways: Using Qt
+ Assistant as documentation browser or using the QHelpEngine
+ API for embedding the help contents directly in an application.
+
+ \section2 Using Qt Assistant
+
+ \QA operates on a collection file which can be specified
+ before start up. If no collection file is given, a default one
+ will be created and used. In either case, it is possible to
+ register any Qt compressed help file and access the help contents.
+
+ When using Assistant as the help browser for an application, it
+ would be desirable that it can be customized to fit better to the
+ application and doesn't look like an independent, standalone
+ help browser. To achieve this, several additional properties can
+ be set in an Qt help collection file, to change e.g. the title
+ or application icon of Qt Assistant. For more information on
+ this topic have a look at the \l{assistant-manual.html}
+ {Qt Assistant manual}.
+
+ \section2 Using QHelpEngine API
+
+ Instead of showing the help in an external application like the
+ Qt Assistant, it is also possible to embed the online help in
+ the application. The contents can then be retrieved via the
+ QHelpEngine class and can be displayed in nearly any form.
+ Showing it in a QTextBrowser is probably the most common way, but
+ embedding it in What's This help is also perfectly possible.
+
+ Retrieving help data from the file engine does not involve a
+ lot of code. The first step is to create an instance of the
+ help engine. Then we ask the engine for the links assigned to
+ the identifier, in this case "MyDialog::ChangeButton". If a link
+ was found, meaning at least one help document exists to this topic,
+ we get the actual help contents by calling fileData() and display
+ the document to the user.
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 6
+
+ For further information on how to use the API, have a look at
+ the QHelpEngine class reference.
+
+ \section1 License Information
+
+ The QtHelp module uses the CLucene indexing library to provide full-text
+ searching capabilities for Qt Assistant and applications that use the
+ features of QtHelp.
+
+ Qt Commercial Edition licensees that wish to distribute applications that
+ use these features of the QtHelp module need to be aware of their
+ obligations under the GNU Lesser General Public License (LGPL).
+
+ Developers using the Open Source Edition can choose to redistribute
+ the module under the appropriate version of the GNU LGPL; version 2.1
+ for applications and libraries licensed under the GNU GPL version 2,
+ or version 3 for applications and libraries licensed under the GNU
+ GPL version 3.
+
+ \legalese
+ Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team \BR
+ Changes are Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ \endlegalese
+*/
+
+/*!
+ \page qthelpproject.html
+ \title Qt Help Project
+
+ A Qt help project collects all data necessary to generate a
+ compressed help file. Along with the actual help data, like
+ the table of contents, index keywords and help documents, it
+ contains some extra information like a namespace to identify
+ the help file. One help project stands for one documentation,
+ e.g. the Qt Assistant manual.
+
+ \section1 Qt Help Project File Format
+
+ The file format is XML based. For a better understanding of
+ the format we'll discuss the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 7
+
+ \section2 Namespace
+
+ To enable the QHelpEngine to retrieve the proper documentation to
+ a given link, every documentation set has to have a unique
+ identifier. A unique identifier makes is also possible for the
+ help collection to keep track of a documentation set without relying
+ on its file name. The Qt help system uses a namespace as identifier
+ which is defined by the mandatory namespace tags. In the example
+ above, the namespace is "mycompany.com.myapplication.1_0".
+
+ \target Virtual Folders
+ \section2 Virtual Folders
+
+ Having a namespace for every documentation naturally means that
+ the documentation sets are quite separated. From the help engines
+ point of view this is beneficial, but from the documentors view
+ it is often desirable to cross reference certain topic from one
+ manual to another without having to specify absolute links. To
+ solve this problem, the help system introduced the concept of
+ virtual folders.
+
+ A virtual folder will become the root directory of all files
+ referenced in a compressed help file. When two documentations
+ share the same virtual folder, they can use relative paths when
+ defining hyperlinks pointing to the other documentation. If a
+ file is contained in both documentations or manuals, the one
+ from the current manual has precedence over the other.
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 8
+
+ The above example specifies 'doc' as virtual folder. If another
+ manual, e.g. for a small helper tool for 'My Application'
+ specifies the same folder, it is sufficient to write
+ 'doc.html#section1' to reference the first section in the
+ 'My Application' manual.
+
+ The virtual folder tag is mandatory and the folder must not
+ contain any '/'.
+
+ \target Custom Filters
+ \section2 Custom Filters
+
+ Next in the Qt help project file are the optional definitions of
+ custom filters. A custom filter contains a list of filter
+ attributes which will be used later to display only the documentation
+ which has all those attributes assigned to. So, when setting the
+ current filter in the QHelpEngine to "My Application 1.0" only
+ the documentation which has "myapp" and "1.0" set as filter
+ attributes will be shown.
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 9
+
+ It is possible to define any number of custom filters in a help
+ project file. Important to know is, that the filter attributes have
+ not to be specified in the same project file; they can be defined
+ in any other help file. The definition of a filter attributes
+ takes place by specifying them in a filter section.
+
+ \target Filter Section
+ \section2 Filter Section
+
+ A filter section contains the actual documentation. One Qt help project
+ file may contain more than one filter sections. Every filter section
+ consists of four parts, the filter attributes section, the table of
+ contents, the keywords and the files list. In theory all parts are
+ optional but not specifying anything there will result in an empty
+ documentation.
+
+ \section3 Filter Attributes
+
+ Every filter section should have filter attributes assigned to it, to
+ enable documentation filtering. If no filter attribute is defined, the
+ documentation will only be shown if no filtering occurs, meaning the
+ current custom filter in the QHelpEngine does not contain any filter
+ attributes.
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 10
+
+ In this case, the filter attributes 'myapp' and '1.0' are assigned
+ to the filter section, i.e. all contents specified in this section
+ will only be shown if the current custom filter has 'myapp' or '1.0'
+ or both as filter attributes.
+
+ \section3 Table of contents
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 11
+
+ One section tag represents one item in the table of contents. The
+ sections can be nested to any degree, but from a users perspective
+ it shouldn't be more than four or five levels. A section is defined
+ by its title and reference. The reference, like all file references
+ in a Qt help project file are relative to the help project file
+ itself.
+
+ \section3 Keywords
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 12
+
+ The keyword section lists all keywords of this filter section. A
+ keyword consists basically of a name and a file reference. If the
+ attribute 'name' is used then the keyword specified there will appear in
+ the visible index, i.e. it will be accessible through the QHelpIndexModel.
+ If 'id' is used, the keyword does not appear in the index and is
+ only accessible via the linksForIdentifier() function of the
+ QHelpEngineCore. 'name' and 'id' can be specified at the same time.
+
+ \section3 Files
+
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 13
+
+ Finally, the actual documentation files have to be listed. Make sure
+ that all files neccessary to display the help are mentioned, i.e.
+ stylesheets or similar files need to be there as well. All listed files
+ will be compressed and written to the Qt compressed help file. So, in the
+ end, one single Qt help file contains all documentation files along with
+ the contents and indices.
+*/
diff --git a/doc/src/qtmac-as-native.qdoc b/doc/src/qtmac-as-native.qdoc
new file mode 100644
index 0000000..ecbc64c
--- /dev/null
+++ b/doc/src/qtmac-as-native.qdoc
@@ -0,0 +1,202 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Qt for Mac OS X documentation
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+**********************************************************************/
+
+/*!
+ \page qtmac-as-native.html
+ \title Qt is Mac OS X Native
+ \brief An explanation of Qt's native features on Mac OS X.
+ \ingroup platform-notes
+
+ This document explains what makes an application native on Mac OS X.
+ It shows the areas where Qt is compliant, and the grey areas where
+ compliance is more questionable. (See also the document
+ \l{mac-differences.html}{Qt for Mac OS X - Specific Issues}.)
+
+ Normally when referring to a native Mac application, one really means an
+ application that talks directly to the underlying window system, rather
+ than one that uses some intermediary (for example Apple's X11 server, or a
+ web browser). Qt applications run as first class citizens, just like
+ Cocoa, and Carbon applications. In fact, we use Carbon and HIView
+ internally to communicate with OS X.
+
+ When an application is running as a first class citizen, it means that
+ it can interact with specific components of the Mac OS X experience:
+
+ \tableofcontents
+
+ \section1 The Global Menu Bar
+
+ Qt does this via the QMenuBar abstraction. Mac users expect to
+ have a menu bar at the top of the screen and Qt honors this.
+
+ Additionally, users expect certain conventions to be respected, for
+ example the application menu should contain About, Preferences,
+ Quit, etc. Qt handles this automatically, although it does not
+ provide a means of interacting directly with the application menu.
+ (By doing this automatically, Qt makes it easier to port Qt
+ applications to other platforms.)
+
+ \section1 Aqua
+
+ This is a critical piece of Mac OS X (documentation can be found at
+ \l{http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html}).
+ It is a huge topic, but the most important guidelines for GUI
+ design are probably these:
+
+ \list
+ \i \e{Aqua look}
+
+ As with Cocoa/Carbon, Qt provides widgets that look like those
+ described in the Human Interface Descriptions. Qt's widgets use
+ Appearance Manager on Mac OS X 10.2 and the new HIThemes on Mac OS X 10.3
+ and higher to implement the look, in other words we use Apple's own API's
+ for doing the rendering.
+
+ \i \e{Aqua feel}
+
+ This is a bit more subjective, but certainly Qt strives to
+ provide the same feel as any Mac OS X application (and we
+ consider situations where it doesn't achieve this to be bugs).
+ Of course Qt has other concerns to bear in mind, especially
+ remaining cross-platform. Some "baggage" that Qt carries is in
+ an effort to provide a widget on a platform for which an
+ equivelant doesn't exist, or so that a single API can be used to
+ do something, even if the API doesn't make entire sense for a
+ specific widget.
+
+ \i \e{Aqua guides}
+
+ This is the most subjective, but there are many suggestions and
+ guidelines in the Aqua style guidelines. This is the area where Qt is
+ of least assistance. The decisions that must be made to conform (widget
+ sizes, widget layouts with respect to other widgets, window margins,
+ placement of OK and Cancel, etc) must be made based on the user
+ experience demanded by your application. If your user base is small or
+ mostly comes from the Windows or Unix worlds, these are minor issues much
+ less important than trying to make a mass market product. Qt for Mac OS X
+ is fully API compatible with Qt for Windows and X11, but Mac OS X is a
+ significantly different platform to Windows and some special
+ considerations must be made based on your audience.
+
+ \endlist
+
+ \section1 Dock
+
+ Interaction with the dock is possible. The icon can be set by calling
+ QWidget::setWindowIcon() on the main window in your application. The
+ setWindowIcon() call can be made as often as necessary, providing an
+ icon that can be easily updated.
+ \omit
+ It is also possible to set a QMenu as the dock menu through the use of the
+ qt_mac_set_dock_menu() function.
+ \endomit
+
+ \section1 Accessiblity
+
+ Although many users never use this, some users will only interact with your
+ applications via assistive devices. With Qt the aim is to make this
+ automatic in your application so that it conforms to accepted practice on
+ its platform. Qt uses Apple's accessibility framework to provide access
+ to users with diabilities.
+
+ \section1 Development Tools
+
+ Mac OS X developers expect a certain level of interopability
+ between their development toolkit and the platform's developer
+ tools (for example Visual Studio, gmake, etc). Qt supports both Unix
+ style Makefiles, and ProjectBuilder/Xcode project files by using
+ the \l qmake tool. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtmac-as-native.qdoc 0
+
+ will generate an Xcode project file from project.pro. With \l qmake
+ you do not have to worry about rules for Qt's preprocessors (\l moc
+ and \l uic) since \l qmake automatically handles them and ensures that
+ everything necessary is linked into your application.
+
+ Qt does not entirely interact with the development environment (for
+ example plugins to set a file to "mocable" from within the Xcode
+ user interface). Nokia is actively working on improving Qt's
+ interoperability with various IDEs.
+*/
diff --git a/doc/src/qtmain.qdoc b/doc/src/qtmain.qdoc
new file mode 100644
index 0000000..a6b234a
--- /dev/null
+++ b/doc/src/qtmain.qdoc
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtmain.html
+ \title The qtmain Library
+ \ingroup licensing
+ \ingroup platform-notes
+ \brief Describes the use and license of the qtmain helper library.
+
+ qtmain is a helper library that enables the developer to write a
+ cross-platform main() function on Windows.
+
+ If you do not use \l qmake or the \l{Visual Studio Integration}
+ available to \l{Qt Commercial Editions}{commercial licensees}, you also
+ need to link against the \c qtmain library.
+
+ \section1 License Information
+
+ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)},
+ the \l{GNU Lesser General Public License (LGPL)}, or the
+ \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under
+ the following license.
+
+ \legalese
+ Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+ All rights reserved.
+
+ Contact: Qt Software Information (qt-info@nokia.com)\br
+
+ You may use this file under the terms of the BSD license as follows:\br
+
+ "Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.\br
+ * Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or other
+ materials provided with the distribution.\br
+ * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor the names of
+ its contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ \endlegalese
+*/
diff --git a/doc/src/qtnetwork.qdoc b/doc/src/qtnetwork.qdoc
new file mode 100644
index 0000000..2be7457
--- /dev/null
+++ b/doc/src/qtnetwork.qdoc
@@ -0,0 +1,358 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtNetwork
+ \title QtNetwork Module
+ \contentspage Qt's Modules
+ \previouspage QtGui
+ \nextpage QtOpenGL
+ \ingroup modules
+
+ \brief The QtNetwork module offers classes that allow you to
+ write TCP/IP clients and servers.
+
+ The network module provides classes to make network programming
+ easier and portable. It offers classes such as QHttp and QFtp that
+ implement specific application-level protocols, lower-level classes
+ such as QTcpSocket, QTcpServer and QUdpSocket that represent low
+ level network concepts, and high level classes such as QNetworkRequest,
+ QNetworkReply and QNetworkAccessManager to perform network operations using common protocols.
+
+ The QtNetwork module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Configuring the Build Process
+
+ Applications that use Qt's networking classes need to
+ be configured to be built against the QtNetwork module.
+ The following declaration in a \c qmake project file ensures that
+ an application is compiled and linked appropriately:
+
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0
+
+ This line is necessary because only the QtCore and QtGui modules
+ are used in the default build process.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 1
+
+ \section1 High Level Network Operations
+
+ The Network Access API is a collection of classes for performing
+ common network operations. The API provides an abstraction layer
+ over the specific operations and protocols used (for example,
+ getting and posting data over HTTP), and only exposes classes,
+ functions, and signals for general or high level concepts.
+
+ Network requests are represented by the QNetworkRequest class,
+ which also acts as a general container for information associated
+ with a request, such as any header information and the encryption
+ used. The URL specified when a request object is constructed
+ determines the protocol used for a request.
+
+ The coordination of network operations is performed by the
+ QNetworkAccessManager class. Once a request has been created,
+ this class is used to dispatch it and emit signals to report on
+ its progress. The manager also coordinates the use of
+ \l{QNetworkCookieJar}{cookies} to store data on the client,
+ authentication requests, and the use of proxies.
+
+ Replies to network requests are represented by the QNetworkReply
+ class; these are created by QNetworkAccessManager when a request
+ is dispatched. The signals provided by QNetworkReply can be used
+ to monitor each reply individually, or developers may choose to
+ use the manager's signals for this purpose instead and discard
+ references to replies. Since QNetworkReply is a subclass of
+ QIODevice, replies can be handled synchronously or asynchronously;
+ i.e., as blocking or non-blocking operations.
+
+ Each application or library can create one or more instances of
+ QNetworkAccessManager to handle network communication.
+
+ \section1 Writing HTTP and FTP Clients with QHttp and QFtp
+
+ HTTP (Hypertext Transfer Protocol) is an application-level
+ network protocol used mainly for downloading HTML and XML files,
+ but it is also used as a high-level transport protocol for many
+ other types of data, from images and movies to purchase orders
+ and banking transactions. In contrast, FTP (File Transfer
+ Protocol) is a protocol used almost exclusively for browsing
+ remote directories and for transferring files.
+
+ \image httpstack.png HTTP Client and Server
+
+ HTTP is a simpler protocol than FTP in many ways. It uses only
+ one network connection, while FTP uses two (one for sending
+ commands, and one for transferring data). HTTP is a stateless
+ protocol; requests and responses are always self-contained. The
+ FTP protocol has a state and requires the client to send several
+ commands before a file transfer takes place.
+
+ In practice, HTTP clients often use separate connections for
+ separate requests, whereas FTP clients establish one connection
+ and keep it open throughout the session.
+
+ The QHttp and QFtp classes provide client-side support for HTTP
+ and FTP. Since the two protocols are used to solve the same
+ problems, the QHttp and QFtp classes have many features in
+ common:
+
+ \list
+
+ \o \e{Non-blocking behavior.} QHttp and QFtp are asynchronous.
+ You can schedule a series of commands (also called "requests" for
+ HTTP). The commands are executed later, when control returns to
+ Qt's event loop.
+
+ \o \e{Command IDs.} Each command has a unique ID number that you
+ can use to follow the execution of the command. For example, QFtp
+ emits the \l{QFtp::commandStarted()}{commandStarted()} and
+ \l{QFtp::commandFinished()}{commandFinished()} signal with the
+ command ID for each command that is executed. QHttp has a
+ \l{QHttp::requestStarted()}{requestStarted()} and a
+ \l{QHttp::requestFinished()}{requestFinished()} signal that work
+ the same way.
+
+ \o \e{Data transfer progress indicators.} QHttp and QFtp emit
+ signals whenever data is transferred
+ (QFtp::dataTransferProgress(), QHttp::dataReadProgress(), and
+ QHttp::dataSendProgress()). You could connect these signals to
+ QProgressBar::setProgress() or QProgressDialog::setProgress(),
+ for example.
+
+ \o \e{QIODevice support.} Both classes support convenient
+ uploading from and downloading to \l{QIODevice}s, in addition to a
+ QByteArray-based API.
+
+ \endlist
+
+ There are two main ways of using QHttp and QFtp. The most common
+ approach is to keep track of the command IDs and follow the
+ execution of every command by connecting to the appropriate
+ signals. The other approach is to schedule all commands at once
+ and only connect to the done() signal, which is emitted when all
+ scheduled commands have been executed. The first approach
+ requires more work, but it gives you more control over the
+ execution of individual commands and allows you to initiate new
+ commands based on the result of a previous command. It also
+ enables you to provide detailed feedback to the user.
+
+ The \l{network/http}{HTTP} and \l{network/ftp}{FTP} examples
+ illustrate how to write an HTTP and an FTP client.
+
+ Writing your own HTTP or FTP server is possible using the
+ lower-level classes QTcpSocket and QTcpServer.
+
+ \section1 Using TCP with QTcpSocket and QTcpServer
+
+ TCP (Transmission Control Protocol) is a low-level network
+ protocol used by most Internet protocols, including HTTP and FTP,
+ for data transfer. It is a reliable, stream-oriented,
+ connection-oriented transport protocol. It is particularly well
+ suited to the continuous transmission of data.
+
+ \image tcpstream.png A TCP Stream
+
+ The QTcpSocket class provides an interface for TCP. You can use
+ QTcpSocket to implement standard network protocols such as POP3,
+ SMTP, and NNTP, as well as custom protocols.
+
+ A TCP connection must be established to a remote host and port
+ before any data transfer can begin. Once the connection has been
+ established, the IP address and port of the peer are available
+ through QTcpSocket::peerAddress() and QTcpSocket::peerPort(). At
+ any time, the peer can close the connection, and data transfer
+ will then stop immediately.
+
+ QTcpSocket works asynchronously and emits signals to report status
+ changes and errors, just like QHttp and QFtp. It relies on the
+ event loop to detect incoming data and to automatically flush
+ outgoing data. You can write data to the socket using
+ QTcpSocket::write(), and read data using
+ QTcpSocket::read(). QTcpSocket represents two independent streams
+ of data: one for reading and one for writing.
+
+ Since QTcpSocket inherits QIODevice, you can use it with
+ QTextStream and QDataStream. When reading from a QTcpSocket, you
+ must make sure that enough data is available by calling
+ QTcpSocket::bytesAvailable() beforehand.
+
+ If you need to handle incoming TCP connections (e.g., in a server
+ application), use the QTcpServer class. Call QTcpServer::listen()
+ to set up the server, and connect to the
+ QTcpServer::newConnection() signal, which is emitted once for
+ every client that connects. In your slot, call
+ QTcpServer::nextPendingConnection() to accept the connection and
+ use the returned QTcpSocket to communicate with the client.
+
+ Although most of its functions work asynchronously, it's possible
+ to use QTcpSocket synchronously (i.e., blocking). To get blocking
+ behavior, call QTcpSocket's waitFor...() functions; these suspend
+ the calling thread until a signal has been emitted. For example,
+ after calling the non-blocking QTcpSocket::connectToHost()
+ function, call QTcpSocket::waitForConnected() to block the thread
+ until the \l{QTcpSocket::connected()}{connected()} signal has
+ been emitted.
+
+ Synchronous sockets often lead to code with a simpler flow of
+ control. The main disadvantage of the waitFor...() approach is
+ that events won't be processed while a waitFor...() function is
+ blocking. If used in the GUI thread, this might freeze the
+ application's user interface. For this reason, we recommend that
+ you use synchronous sockets only in non-GUI threads. When used
+ synchronously, QTcpSocket doesn't require an event loop.
+
+ The \l{network/fortuneclient}{Fortune Client} and
+ \l{network/fortuneserver}{Fortune Server} examples show how to use
+ QTcpSocket and QTcpServer to write TCP client-server
+ applications. See also \l{network/blockingfortuneclient}{Blocking
+ Fortune Client} for an example on how to use a synchronous
+ QTcpSocket in a separate thread (without using an event loop),
+ and \l{network/threadedfortuneserver}{Threaded Fortune Server}
+ for an example of a multithreaded TCP server with one thread per
+ active client.
+
+ \section1 Using UDP with QUdpSocket
+
+ UDP (User Datagram Protocol) is a lightweight, unreliable,
+ datagram-oriented, connectionless protocol. It can be used when
+ reliability isn't important. For example, a server that reports
+ the time of day could choose UDP. If a datagram with the time of
+ day is lost, the client can simply make another request.
+
+ \image udppackets.png UDP Packets
+
+ The QUdpSocket class allows you to send and receive UDP
+ datagrams. It inherits QAbstractSocket, and it therefore shares
+ most of QTcpSocket's interface. The main difference is that
+ QUdpSocket transfers data as datagrams instead of as a continuous
+ stream of data. In short, a datagram is a data packet of limited
+ size (normally smaller than 512 bytes), containing the IP address
+ and port of the datagram's sender and receiver in addition to the
+ data being transferred.
+
+ QUdpSocket supports IPv4 broadcasting. Broadcasting is often used
+ to implement network discovery protocols, such as finding which
+ host on the network has the most free hard disk space. One host
+ broadcasts a datagram to the network that all other hosts
+ receive. Each host that receives a request then sends a reply
+ back to the sender with its current amount of free disk space.
+ The originator waits until it has received replies from all
+ hosts, and can then choose the server with most free space to
+ store data. To broadcast a datagram, simply send it to the
+ special address QHostAddress::Broadcast (255.255.255.255), or
+ to your local network's broadcast address.
+
+ QUdpSocket::bind() prepares the socket for accepting incoming
+ datagrams, much like QTcpServer::listen() for TCP servers.
+ Whenever one or more datagrams arrive, QUdpSocket emits the
+ \l{QUdpSocket::readyRead()}{readyRead()} signal. Call
+ QUdpSocket::readDatagram() to read the datagram.
+
+ The \l{network/broadcastsender}{Broadcast Sender} and
+ \l{network/broadcastreceiver}{Broadcast Receiver} examples show
+ how to write a UDP sender and a UDP receiver using Qt.
+
+ \section1 Resolving Host Names using QHostInfo
+
+ Before establishing a network connection, QTcpSocket and
+ QUdpSocket perform a name lookup, translating the host name
+ you're connecting to into an IP address. This operation is
+ usually performed using the DNS (Domain Name Service) protocol.
+
+ QHostInfo provides a static function that lets you perform such a
+ lookup yourself. By calling QHostInfo::lookupHost() with a host
+ name, a QObject pointer, and a slot signature, QHostInfo will
+ perform the name lookup and invoke the given slot when the
+ results are ready. The actual lookup is done in a separate
+ thread, making use of the operating system's own methods for
+ performing name lookups.
+
+ QHostInfo also provides a static function called
+ QHostInfo::fromName() that takes the host name as argument and
+ returns the results. In this case, the name lookup is performed
+ in the same thread as the caller. This overload is useful for
+ non-GUI applications or for doing name lookups in a separate,
+ non-GUI thread. (Calling this function in a GUI thread may cause
+ your user interface to freeze while the function blocks as
+ it performs the lookup.)
+
+ \section1 Support for Network Proxies
+
+ Network communication with Qt can be performed through proxies,
+ which direct or filter network traffic between local and remote
+ connections.
+
+ Individual proxies are represented by the QNetworkProxy class,
+ which is used to describe and configure the connection to a proxy.
+ Proxy types which operate on different levels of network communication
+ are supported, with SOCKS 5 support allowing proxying of network
+ traffic at a low level, and HTTP and FTP proxying working at the
+ protocol level. See QNetworkProxy::ProxyType for more information.
+
+ Proxying can be enabled on a per-socket basis or for all network
+ communication in an application. A newly opened socket can be
+ made to use a proxy by calling its QAbstractSocket::setProxy()
+ function before it is connected. Application-wide proxying can
+ be enabled for all subsequent socket connections through the use
+ of the QNetworkProxy::setApplicationProxy() function.
+
+ Proxy factories are used to create policies for proxy use.
+ QNetworkProxyFactory supplies proxies based on queries for specific
+ proxy types. The queries themselves are encoded in QNetworkProxyQuery
+ objects which enable proxies to be selected based on key criteria,
+ such as the purpose of the proxy (TCP, UDP, TCP server, URL request),
+ local port, remote host and port, and the protocol in use (HTTP, FTP,
+ etc.).
+
+ QNetworkProxyFactory::proxyForQuery() is used to query the factory
+ directly. An application-wide policy for proxying can be implemented
+ by passing a factory to QNetworkProxyFactory::setApplicationProxyFactory()
+ and a custom proxying policy can be created by subclassing
+ QNetworkProxyFactory; see the class documentation for details.
+*/
diff --git a/doc/src/qtopengl.qdoc b/doc/src/qtopengl.qdoc
new file mode 100644
index 0000000..1052f14
--- /dev/null
+++ b/doc/src/qtopengl.qdoc
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtOpenGL
+ \title QtOpenGL Module
+ \contentspage Qt's Modules
+ \previouspage QtNetwork
+ \nextpage QtSql
+ \ingroup modules
+
+ \brief The QtOpenGL module offers classes that make it easy to
+ use OpenGL in Qt applications.
+
+ OpenGL is a standard API for rendering 3D graphics. OpenGL only
+ deals with 3D rendering and provides little or no support for GUI
+ programming issues. The user interface for an OpenGL application
+ must be created with another toolkit, such as Motif on the X
+ platform, Microsoft Foundation Classes (MFC) under Windows, or Qt
+ on both platforms.
+
+ \bold{Note:} OpenGL is a trademark of Silicon Graphics, Inc. in
+ the United States and other countries.
+
+ The Qt OpenGL module makes it easy to use OpenGL in Qt applications.
+ It provides an OpenGL widget class that can be used just like any
+ other Qt widget, except that it opens an OpenGL display buffer where
+ you can use the OpenGL API to render the contents.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 1
+
+ The Qt OpenGL module is implemented as a platform-independent Qt/C++
+ wrapper around the platform-dependent GLX (version 1.3 or later),
+ WGL, or AGL C APIs. Although the basic functionality provided is very
+ similar to Mark Kilgard's GLUT library, applications using the Qt
+ OpenGL module can take advantage of the whole Qt API for
+ non-OpenGL-specific GUI functionality.
+
+ \warning The QtOpenGL module is part of the \l{Qt Full Framework Edition}
+ and the \l{Open Source Versions of Qt}. It is available on Windows,
+ X11, and Mac OS X. \l{Qt for Embedded Linux} supports OpenGL ES (OpenGL for
+ Embedded Systems). To be able to use the OpenGL API in \l{Qt for Embedded Linux},
+ it must be integrated with the Q Window System (QWS). See the
+ \l{Qt for Embedded Linux and OpenGL} documentation for details.
+
+ \section1 Installation
+
+ When you install Qt for X11, the configure script will autodetect if
+ OpenGL headers and libraries are installed on your system, and if so,
+ it will include the QtOpenGL module in the Qt library. (If your
+ OpenGL headers or libraries are placed in a non-standard directory,
+ you may need to change the \c QMAKE_INCDIR_OPENGL and/or
+ \c QMAKE_LIBDIR_OPENGL in the config file for your system).
+
+ When you install Qt for Windows and Mac OS X, the QtOpenGL
+ module is always included. X11 users might like to read the notes
+ on overlays below.
+
+ The QGL documentation assumes that you are familiar with OpenGL
+ programming. If you're new to the subject a good starting point is
+ \l{http://www.opengl.org/}.
+
+ \section1 How to Use X11 Overlays with Qt
+
+ X11 overlays are a powerful mechanism for drawing
+ annotations etc., on top of an image without destroying it, thus saving
+ a great deal of image rendering time. For more information, see the highly
+ recommended book \e{OpenGL Programming for the X Window System} (Mark
+ Kilgard, Addison Wesley Developers Press 1996).
+
+ \warning The Qt OpenGL Extension includes direct support for the
+ use of OpenGL overlays. For many uses of overlays, this makes the
+ technique described below redundant. The following is a discussion
+ on how to use non-QGL widgets in overlay planes.
+
+ In the typical case, X11 overlays can easily be used together with the
+ current version of Qt and the Qt OpenGL Extension. The following
+ requirements apply:
+
+ \list 1
+ \i Your X server and graphics card/hardware must support overlays.
+ For many X servers, overlay support can be turned on with
+ a configuration option; consult your X server installation
+ documentation.
+
+ \i Your X server must (be configured to) use an overlay visual as the
+ default visual. Most modern X servers do this, since this has the
+ added advantage that pop-up menus, overlapping windows etc., will
+ \e not affect underlying images in the main plane, thereby
+ avoiding expensive redraws.
+
+ \i The best (deepest) visual for OpenGL rendering is in the main
+ plane. This is the normal case. Typically, X servers that support
+ overlays provide a 24-bit \c TrueColor visual in the main plane,
+ and an 8-bit \c PseudoColor (default) visual in the overlay plane.
+ \endlist
+
+ Assuming that the requirements mentioned above are met, a
+ QGLWidget will default to using the main plane visual, while all
+ other widgets will use the overlay visual. Thus, we can place a
+ normal widget on top of the QGLWidget, and do drawing on it,
+ without affecting the image in the OpenGL window. In other words,
+ we can use all the drawing capabilities of QPainter to draw
+ annotations, rubberbands, etc. For the typical use of overlays,
+ this is much easier than using OpenGL for rendering annotations.
+
+ An overlay plane has a specific color called the transparent
+ color. Pixels drawn in this color will not be visible; instead
+ the underlying OpenGL image will show through.
+
+ To use this technique, you must not use the
+ QApplication::ManyColor or QApplication::TrueColor color
+ specification for QApplication, because this will force the
+ normal Qt widgets to use a \c TrueColor visual, which will
+ typically be in the main plane, not in the overlay plane as
+ desired.
+*/
diff --git a/doc/src/qtopiacore-architecture.qdoc b/doc/src/qtopiacore-architecture.qdoc
new file mode 100644
index 0000000..8ec0136
--- /dev/null
+++ b/doc/src/qtopiacore-architecture.qdoc
@@ -0,0 +1,338 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-architecture.html
+
+ \title Qt for Embedded Linux Architecture
+ \ingroup qt-embedded-linux
+
+ A \l{Qt for Embedded Linux} application requires a server
+ application to be running, or to be the server application itself.
+ Any \l{Qt for Embedded Linux} application can act as the server.
+ When more than one application is running, the subsequent
+ applications connect to the existing server application as clients.
+
+ The server and client processes have different responsibilities:
+ The server process manages pointer handling, character input, and
+ screen output. In addition, the server controls the appearance of
+ the screen cursor and the screen saver. The client process
+ performs all application specific operations.
+
+ The server application is represented by an instance of the
+ QWSServer class, while the client applications are represented by
+ instances of the QWSClient class. On each side, there are several
+ classes performing the various operations.
+
+ \image qt-embedded-architecture2.png
+
+ All system generated events, including keyboard and mouse events,
+ are passed to the server application which then propagates the
+ event to the appropriate client.
+
+ When rendering, the default behavior is for each client to render
+ its widgets into memory while the server is responsible for
+ putting the contents of the memory onto the screen. But when the
+ hardware is known and well defined, as is often the case with
+ software for embedded devices, it may be useful for the clients to
+ manipulate and control the underlying hardware directly.
+ \l{Qt for Embedded Linux} provides two different approaches to
+ achieve this behavior, see the graphics rendering section below for
+ details.
+
+ \tableofcontents
+
+ \section1 Client/Server Communication
+
+ The running applications continuously alter the appearance of the
+ screen by adding and removing widgets. The server maintains
+ information about each top-level window in a corresponding
+ QWSWindow object.
+
+ Whenever the server receives an event, it queries its stack of
+ top-level windows to find the window containing the event's
+ position. Each window can identify the client application that
+ created it, and returns its ID to the server upon
+ request. Finally, the server forwards the event, encapsulated by
+ an instance of the QWSEvent class, to the appropriate client.
+
+ \image qt-embedded-clientservercommunication.png
+
+ If an input method is installed, it is used as a filter between
+ the server and the client application. Derive from the
+ QWSInputMethod class to implement custom input methods, and use
+ the server's \l {QWSServer::}{setCurrentInputMethod()} function to
+ install it. In addition, it is possible to implement global,
+ low-level filters on key events using the
+ QWSServer::KeyboardFilter class; this can be used to implement
+ things like advanced power management suspended from a button
+ without having to filter for it in all applications.
+
+ \table 100%
+ \header \o UNIX Domain Socket
+ \row
+ \o
+
+ \image qt-embedded-client.png
+
+ The server communicates with the client applications over the UNIX
+ domain socket. You can retrieve direct access to all the events a
+ client receives from the server, by reimplementing QApplication's
+ \l {QApplication::}{qwsEventFilter()} function.
+
+ \endtable
+
+ The clients (and the server) communicate with each other using the
+ QCopChannel class. QCOP is a many-to-many communication protocol
+ for transferring messages on various channels. A channel is
+ identified by a name, and anyone who wants to can listen to
+ it. The QCOP protocol allows clients to communicate both within
+ the same address space and between different processes.
+
+ \section1 Pointer Handling Layer
+
+ \list
+ \o QWSMouseHandler
+ \o QMouseDriverPlugin
+ \o QMouseDriverFactory
+ \endlist
+
+ The mouse driver (represented by an instance of the
+ QWSMouseHandler class) is loaded by the server application when it
+ starts running, using Qt's \l {How to Create Qt Plugins}{plugin
+ system}.
+
+ \image qt-embedded-pointerhandlinglayer.png
+
+ A mouse driver receives mouse events from the device and
+ encapsulates each event with an instance of the QWSEvent class
+ which it then passes to the server.
+
+ \l{Qt for Embedded Linux} provides ready-made drivers for several mouse
+ protocols, see the \l{Qt for Embedded Linux Pointer Handling}{pointer
+ handling} documentation for details. Custom mouse drivers can be
+ implemented by subclassing the QWSMouseHandler class and creating
+ a mouse driver plugin. The default implementation of the
+ QMouseDriverFactory class will automatically detect the plugin,
+ loading the driver into the server application at runtime.
+
+ In addition to the generic mouse handler, \l{Qt for Embedded Linux}
+ provides a calibrated mouse handler. Use the
+ QWSCalibratedMouseHandler class as the base class when the system
+ device does not have a fixed mapping between device and screen
+ coordinates and/or produces noisy events, e.g. a touchscreen.
+
+ See also: \l{Qt for Embedded Linux Pointer Handling} and
+ \l{How to Create Qt Plugins}.
+
+ \section1 Character Input Layer
+
+ \list
+ \o QWSKeyboardHandler
+ \o QKbdDriverPlugin
+ \o QKbdDriverFactory
+ \endlist
+
+ The keyboard driver (represented by an instance of the
+ QWSKeyboardHandler class) is loaded by the server application when
+ it starts running, using Qt's \l {How to Create Qt Plugins}{plugin
+ system}.
+
+ \image qt-embedded-characterinputlayer.png
+
+ A keyboard driver receives keyboard events from the device and
+ encapsulates each event with an instance of the QWSEvent class
+ which it then passes to the server.
+
+ \l{Qt for Embedded Linux} provides ready-made drivers for several keyboard
+ protocols, see the \l {Qt for Embedded Linux Character Input}{character
+ input} documentation for details. Custom keyboard drivers can be
+ implemented by subclassing the QWSKeyboardHandler class and
+ creating a keyboard driver plugin. The default implementation of the
+ QKbdDriverFactory class will automatically detect the plugin, loading the
+ driver into the server application at run-time.
+
+ See also: \l{Qt for Embedded Linux Character Input} and \l {How to Create
+ Qt Plugins}.
+
+ \section1 Graphics Rendering
+
+ \list
+ \o QApplication
+ \o QDecoration
+ \o QDecorationPlugin
+ \o QDecorationFactory
+ \endlist
+
+ The default behavior is for each client to render its widgets as well
+ as its decorations into memory, while the server copies the memory content
+ to the device's framebuffer.
+
+ Whenever a client receives an event that alters any of its
+ widgets, the application updates the relevant parts of its memory
+ buffer:
+
+ \image qt-embedded-clientrendering.png
+
+ The decoration is loaded by the client application when it starts
+ running (using Qt's \l {How to Create Qt Plugins}{plugin system}),
+ and can be customized by deriving from the QDecoration class and
+ creating a decoration plugin. The default implementation of
+ the QDecorationFactory class will automatically detect the plugin,
+ loading the decoration into the application at runtime. Call the
+ QApplication::qwsSetDecoration() function to actually apply the
+ given decoration to an application.
+
+ \table 100%
+ \header \o Direct Painting \target Direct Painting
+ \row
+ \o
+
+ It is possible for the clients to manipulate and control the
+ underlying hardware directly. There are two ways of achieving
+ this: The first approach is to set the Qt::WA_PaintOnScreen window
+ attribute for each widget, the other is to use the QDirectPainter
+ class to reserve a region of the framebuffer.
+
+ \image qt-embedded-setwindowattribute.png
+
+ By setting the Qt::WA_PaintOnScreen attribute, the application
+ renders the widget directly onto the screen and the affected
+ region will not be modified by the screen driver \e unless another
+ window with a higher focus requests (parts of) the same
+ region. Note that if you want to render all of an application's
+ widgets directly on screen, it might be easier to set the
+ QT_ONSCREEN_PAINT environment variable.
+
+ \image qt-embedded-reserveregion.png
+
+ Using QDirectPainter, on the other hand, provides a complete
+ control over the reserved region, i.e., the screen driver will
+ never modify the given region.
+
+ To draw on a region reserved by a QDirectPainter instance, the
+ application must get hold of a pointer to the framebuffer. In
+ general, a pointer to the framebuffer can be retrieved using the
+ QDirectPainter::frameBuffer() function. But note that if the
+ current screen has subscreens, you must query the screen driver
+ instead to identify the correct subscreen. A pointer to the
+ current screen driver can always be retrieved using the static
+ QScreen::instance() function. Then use QScreen's \l
+ {QScreen::}{subScreenIndexAt()} and \l {QScreen::}{subScreens()}
+ functions to access the correct subscreen, and the subscreen's \l
+ {QScreen::}{base()} function to retrieve a pointer to the
+ framebuffer.
+
+ Note that \l{Qt for Embedded Linux} also provides the QWSEmbedWidget class,
+ making it possible to embed the reserved region (i.e., the
+ QDirectPainter object) in a regular widget.
+
+ \endtable
+
+ \section1 Drawing on Screen
+
+ \list
+ \o QScreen
+ \o QScreenDriverPlugin
+ \o QScreenDriverFactory
+ \endlist
+
+ When a screen update is required, the server runs through all the
+ top-level windows that intersect with the region that is about to
+ be updated, and ensures that the associated clients have updated
+ their memory buffer. Then the server uses the screen driver
+ (represented by an instance of the QScreen class) to copy the
+ content of the memory to the screen.
+
+ The screen driver is loaded by the server application when it
+ starts running, using Qt's plugin system. \l{Qt for Embedded Linux}
+ provides ready-made drivers for several screen protocols, see the
+ \l{Qt for Embedded Linux Display Management}{display management}
+ documentation for details. Custom screen drivers can be
+ implemented by subclassing the QScreen class and creating a screen
+ driver plugin. The default implementation of the QScreenDriverFactory
+ class will automatically detect the plugin, loading the driver into
+ the server application at run-time.
+
+ \image qt-embedded-drawingonscreen.png
+
+ To locate the relevant parts of memory, the driver is provided
+ with the list of top-level windows that intersect with the given
+ region. Associated with each of the top-level windows there is an
+ instance of the QWSWindowSurface class representing the drawing
+ area of the window. The driver uses these objects to retrieve
+ pointers to the various memory blocks. Finally, the screen driver
+ composes the surface images before copying the updated region to
+ the framebuffer.
+
+ \table 100%
+ \header \o Accelerated Graphics
+ \row
+ \o
+
+ In \l{Qt for Embedded Linux}, painting is a pure software implementation,
+ but (starting with Qt 4.2) it is possible to add an accelerated
+ graphics driver to take advantage of available hardware resources.
+
+ \image qt-embedded-accelerateddriver.png
+
+ The clients render each window onto a corresponding window surface
+ object using Qt's paint system, and then store the surface in
+ memory. The screen driver accesses the memory and composes the
+ surface images before it copies them to the screen as explained
+ above.
+
+ To add an accelerated graphics driver you must create a custom
+ screen and implement a custom raster paint engine
+ (\l{Qt for Embedded Linux} uses a raster-based paint engine to
+ implement the painting operations). Then you must create a custom
+ paint device that is aware of your paint engine, a custom window
+ surface that knows about your paint device, and make your screen
+ able to recognize your window surface.
+
+ See the \l{Adding an Accelerated Graphics Driver to Qt for Embedded Linux}
+ {accelerated graphics driver} documentation for details.
+
+ \endtable
+
+ See also: \l{Qt for Embedded Linux Display Management} and
+ \l{How to Create Qt Plugins}.
+*/
diff --git a/doc/src/qtopiacore-displaymanagement.qdoc b/doc/src/qtopiacore-displaymanagement.qdoc
new file mode 100644
index 0000000..7cfa91f
--- /dev/null
+++ b/doc/src/qtopiacore-displaymanagement.qdoc
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt-embedded-displaymanagement.html
+
+ \title Qt for Embedded Linux Display Management
+ \ingroup qt-embedded-linux
+
+ When rendering, the default behavior for each Qt for Embedded Linux
+ client is to render its widgets into memory, while the server is
+ responsible for putting the contents of the memory onto the
+ screen. The server uses the screen driver to copy the content of
+ the memory to the display.
+
+ The screen driver is loaded by the server application when it
+ starts running, using Qt's \l {How to Create Qt Plugins}{plugin
+ system}.
+
+ Contents:
+
+ \tableofcontents
+
+ \section1 Available Drivers
+
+ \l{Qt for Embedded Linux} provides drivers for the Linux framebuffer, the
+ virtual framebuffer, transformed screens, VNC servers and multi
+ screens. Run the \c configure script to list the available
+ drivers:
+
+ \if defined(QTOPIA_DOCS)
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 0
+ \else
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 1
+ \endif
+
+ \if defined(QTOPIA_DOCS)
+ In the default Qt Extended configuration, only an unaccelerated Linux
+ framebuffer driver (\c /dev/fb0) is enabled. The various drivers
+ can be enabled and disabled using the \c configure script. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 2
+ \else
+ In the default Qt configuration, only an unaccelerated Linux
+ framebuffer driver (\c /dev/fb0) is enabled. The various drivers
+ can be enabled and disabled using the \c configure script. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 3
+ \endif
+
+ Custom screen drivers can be implemented by subclassing the
+ QScreen class and creating a screen driver plugin (derived from
+ the QScreenDriverPlugin class). The default implementation
+ of the QScreenDriverFactory class will automatically detect the
+ plugin, loading the driver into the server application at run-time.
+
+ \section1 Specifying a Driver
+
+ To specify which driver to use, set the QWS_DISPLAY environment
+ variable. For example (if the current shell is bash, ksh, zsh or
+ sh):
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 4
+
+ The valid values for the \c <driver> argument are \c LinuxFb, \c
+ QVFb, \c VNC, \c Transformed, \c Multi and \l
+ {QScreenDriverPlugin::keys()}{keys} identifying custom drivers,
+ and the \c {<display num>} argument is used to separate screens
+ that are using the same screen driver and to enable multiple
+ displays (see the \l {Running Qt for Embedded Linux Applications}
+ documentation for more details). The driver specific options are
+ described in the table below.
+
+ \table
+ \header
+ \o Driver Specific Option \o Available For \o Description
+ \row
+ \o \c tty=<device>
+ \o LinuxFb
+ \o Passes the device file to the console the application is
+ running on.
+ \row
+ \o \c nographicsmodeswitch
+ \o LinuxFb
+ \o Ensures that the application is not in graphics mode.
+ \row
+ \o \c littleendian
+ \o LinuxFb
+ \o Tells the driver it must handle a little-endian frame
+ buffer in a big-endian system.
+ \row
+ \o \c mmWidth=<value> \target mmWidth
+ \o LinuxFb, QVFb
+ \o The screen's physical width (used to calculate DPI).
+ \row
+ \o \c mmHeight=<value> \target mmHeight
+ \o LinuxFb, QVFb
+ \o The screen's physical height (used to calculate DPI).
+ \row
+ \o \c <device>
+ \o LinuxFb
+ \o
+ \row
+ \o \c <subdriver>
+ \o VNC, Transformed, Multi
+ \o Specifies a subdriver.
+ \row
+ \o \c <RotX>
+ \o Transformed
+ \o Specifies the rotation of the screen. The valid values of
+ \c X are 90, 180 and 270.
+ \row
+ \o \c offset=<x,y>
+ \o Multi
+ \o Specifies the coordinates of a subscreens top-left corner
+ (by default 0,0).
+
+ \endtable
+
+ The QWS_DISPLAY environment variable can also be set using the \c
+ -display option when running an application. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 5
+
+ \section1 Subdrivers and Multiple Drivers
+
+ The VNC, Transformed and Multi screen drivers depend on
+ subdrivers. The general syntax for specifying a driver is as
+ follows:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 6
+
+ In the case of subdrivers, it is important to add a space between
+ each subdriver and before the display number to separate the
+ various drivers and displays. Note that \c Multi screen drivers
+ can have several subdrivers. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 7
+
+ Note also that the VNC screen driver defaults to a virtual screen
+ driver if no subdriver is specified. In this case the VNC driver accepts a
+ few additional (optional) arguments specifying the size and depth
+ of the default virtual screen:
+
+ \list
+ \o \c {size=<width x height>}
+ \o \c {depth=<value>}
+ \o \c {mmHeight=<physical height in millimeters>}
+ \o \c {mmWidth=<physical width in millimeters>}
+ \endlist
+
+ Example running the VNC screen driver with a virtual screen of size
+ 720x480 with 32 bits per pixel:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 8
+
+ Example running the VNC screen driver on top of the Linux framebuffer
+ driver:
+
+ \snippet doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc 9
+
+ In this last example, Qt is using two screen drivers simultaneously,
+ displaying output on both the device's screen and across a network on
+ VNC client displays.
+*/
diff --git a/doc/src/qtopiacore-opengl.qdoc b/doc/src/qtopiacore-opengl.qdoc
new file mode 100644
index 0000000..ceaff22
--- /dev/null
+++ b/doc/src/qtopiacore-opengl.qdoc
@@ -0,0 +1,227 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qt-embedded-opengl.html
+
+\title Qt for Embedded Linux and OpenGL
+\ingroup qt-embedded-linux
+
+\section1 Introduction
+
+\l {http://www.opengl.org}{OpenGL} is an industry standard API for
+2D/3D graphics. It provides a powerful, low-level interface between
+software and acceleration hardware, and it is operating system and
+window system independent.
+
+\l {http://www.khronos.org/opengles}{OpenGL ES} is a subset
+of the \l {http://www.opengl.org}{OpenGL} standard.
+Because it is meant for use in embedded systems, it has a smaller,
+more constrained API.
+
+For reference, Nokia provides a plugin which integrates \l
+{http://www.khronos.org/opengles}{OpenGL ES} with Qt for Embedded Linux,
+but Qt for Embedded Linux can be adapted to a wide range of OpenGL
+versions.
+
+There are three ways to use OpenGL with Qt for Embedded Linux:
+\list
+ \o Perform OpenGL 3D graphics operations in applications;
+ \o Accelerate normal 2D painting operations;
+ \o Implement window compositing and special effects.
+\endlist
+
+Qt for Embedded Linux is shipped with a reference integration example
+that demonstrates all three uses.
+
+\section2 Using OpenGL 3D Graphics in Applications
+
+The \l {QtOpenGL module} offers classes that make it easy to draw 3D
+graphics in GUI applications. The module API is cross-platform, so it
+is also available on Windows, X11, and Mac OS X.
+
+To use OpenGL-enabled widgets in a Qt for Embedded Linux application,
+all that is required is to subclass the QGLWidget and draw into instances of
+the subclass with standard OpenGL functions.
+
+\section2 Using OpenGL to Accelerate Normal 2D Painting
+
+Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that
+translates QPainter operations into OpenGL calls. This specialized
+paint engine can be used to improve 2D rendering performance on
+appropriate hardware. It can also overlay controls and decorations
+onto 3D scenes drawn using OpenGL.
+
+\section2 Using OpenGL to Implement Window Compositing and Effects
+
+Qt for Embedded Linux includes a complete windowing system, which implements
+real transparency. The windowing system can be accelerated using
+OpenGL to implement top level window compositing. This makes it easy
+to add 3D effects to applications, for instance when windows are
+minimized or maximized.
+
+\section1 Acceleration Architecture
+
+The diagram below shows the Qt for Embedded Linux painting architecture.
+
+\image qt-embedded-opengl3.png
+
+A client process widget uses a paint engine to draw into a window
+surface. The server then combines the window surfaces and displays the
+composition on the screen. This architecture lets you
+control the steps of the painting process by subclassing.
+
+Subclassing QPaintEngine allows you to implement the QPainter API
+using accelerated hardware. Subclassing QWindowSurface lets you
+decide the properties of the space your widgets will draw themselves
+into, as well as which paint engine they should use to draw themselves
+into that space. Subclassing QScreen lets you control the creation of
+window surfaces and lets you decide how to implement window
+compositing. Using subclassing, your implementation work is minimized
+since you can reuse base class functionality you don't need to change.
+
+The elements of an accelerated Qt for Embedded Linux system are shown in the
+diagram below.
+
+\image qt-embedded-opengl1.png
+
+The applications, using the Qt API, do not depend on the presence of
+the acceleration plugin. The plugin uses the graphics hardware to
+accelerate painting primitives. Any operations not accelerated by the
+plugin are done in software by the software paint engine.
+
+To integrate an OpenGL implementation into Qt for Embedded Linux for a
+particular platform, you use the same mechanisms you would use for
+writing any other accelerated driver. Base classes, e.g., QGLScreen
+and QWSGLWindowSurface, are provided to minimize the need for
+reimplementing common functionality.
+
+\section1 The Reference Integration
+
+The \l{OpenGL for Embedded Systems Example} is the reference implementation
+for integrating OpenGL ES and \l{http://www.khronos.org/egl/}{EGL} with
+the graphics acceleration architecture of Qt for Embedded Linux.
+(\l{http://www.khronos.org/egl/}{EGL} is a library that binds OpenGL ES to
+native windowing systems.)
+
+The diagram below shows how OpenGL ES is used within the acceleration architecture:
+
+\image qt-embedded-opengl2.png
+
+The example implements a screen driver plugin that demonstrates all
+three uses of OpenGL in Qt for Embedded Linux: 2D graphics acceleration, 3D
+graphics operations using the \l {QtOpenGL module}, and top-level
+window compositing and special effects. The applications still do
+not talk directly to the accelerated plugin.
+
+For 2D graphics, applications use the normal Qt painting API. The example accelerates 2D
+painting by using the QOpenGLPaintEngine, which is included in the \l {QtOpenGL module}.
+
+For 3D graphics applications use the OpenGL API directly, together with the functionality
+in the Qt OpenGL support classes. The example supports this by creating a
+QWSGLWindowSurface whenever a QGLWidget is instantiated.
+
+All access to the display is done through OpenGL. The example subclasses
+QWSGLWindowSurface implementation and uses the \l
+{http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt}
+{OpenGL Framebuffer Object extension} to draw windows into an offscreen buffer. This
+lets the example use OpenGL to implement top level window compositing of opaque and
+semi-transparent windows, and to provide a 3D animated transition effect as each new
+window is shown.
+
+The specific OpenGL library being used by the example restricts all
+OpenGL operations to occur in a single process. Hence the example
+creates instances of QWSGLWindowSurface only in the server process.
+Other processes then perform 2D graphics by creating instances
+of the standard QWindowSurface classes for client processes. The
+standard window surface performs software-based rendering into a
+shared memory segment. The server then transfers the contents of this
+shared memory into an OpenGL texture before they are drawn onto the
+screen during window compositing.
+
+\omit
+
+\section1 Future Directions
+
+\section2 API Improvements
+
+Nokia is now working on enhancing the API for integrating OpenGL
+with Qt for Embedded Linux. The current design plan includes the following
+features:
+
+\list
+
+ \o Provide convenience classes, e.g., QEGLScreen and
+ QWSEGLWindowSurface, which implement common uses of the EGL
+ API. These classes will simplify implementing an OpenGL ES
+ integration.
+
+ \o Extend the screen driver API to provide more control over window
+ properties and animations, and provide a software-based integration
+ to enable testing on the desktop.
+
+ \o Improve performance as opportunities arise.
+
+\endlist
+
+\section2 OpenVG Support
+
+\l {http://www.khronos.org/openvg} {OpenVG} is a dedicated API for 2D
+graphics on mobile devices. It is therefore more likely to be a better
+alternative for 2D acceleration than OpenGL. Until recently, no
+OpenVG-capable hardware has been available, so Nokia has not yet
+included an OpenVG solution in Qt for Embedded Linux.
+
+However, Nokia has done a feasibility study, implementing an
+OpenVG paint engine on top of a software OpenVG implementation.
+Assuming availability of the appropriate hardware, this OpenVG paint
+engine can easily be completed and integrated using the existing
+acceleration architecture. Since OpenVG shares the same EGL layer as
+OpenGL ES, the work already done on the OpenGL integration can be
+reused.
+
+Related technologies included in the \l
+{http://www.khronos.org/openkode} {OpenKODE} API set will also be
+considered.
+
+\endomit
+
+*/
diff --git a/doc/src/qtopiacore.qdoc b/doc/src/qtopiacore.qdoc
new file mode 100644
index 0000000..43e31eb
--- /dev/null
+++ b/doc/src/qtopiacore.qdoc
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group qt-embedded-linux
+ \ingroup topics
+ \ingroup qt-embedded
+ \title Qt for Embedded Linux
+ \brief Documents specifically about Qt for Embedded Linux.
+
+ Qt for Embedded Linux is a C++ framework for GUI and application development
+ for embedded devices. It runs on a variety of processors, usually
+ with Embedded Linux. Qt for Embedded Linux provides the standard Qt API for
+ embedded devices with a lightweight window system.
+
+ \image qt-embedded-architecture.png
+
+ Qt for Embedded Linux applications write directly to the framebuffer,
+ eliminating the need for the X Window System and saving memory.
+ The Linux framebuffer is enabled by default on all modern Linux
+ distributions. For information on older versions, please refer to
+ the \l{Framebuffer HOWTO} document. For development
+ and debugging purposes, Qt for Embedded Linux provides a \l {The
+ Virtual Framebuffer}{virtual framebuffer}. It is also possible to
+ run an application using the
+ \l{The VNC Protocol and Qt for Embedded Linux}{VNC protocol}.
+
+ \table 100%
+ \header \o Getting Started \o Reference \o Features
+ \row
+ \o
+ \list
+ \o \l {Qt for Embedded Linux Architecture}{Architecture Overview}
+ \o \l {Installing Qt for Embedded Linux}{Installation}
+ \o \l {Running Qt for Embedded Linux Applications}{Running Applications}
+ \o \l {Qt Examples#Qt for Embedded Linux}{Examples}
+ \endlist
+ \o
+ \list
+ \o \l {Qt for Embedded Linux Classes}{Classes}
+ \o \l {Qt for Embedded Linux Environment Variables}{Environment Variables}
+ \o \l {Licenses for Fonts Used in Qt for Embedded Linux}{Font Licenses}
+ \endlist
+ \o
+ \list
+ \o \l {Qt for Embedded Linux Pointer Handling}{Pointer Handling}
+ \o \l {Qt for Embedded Linux Character Input}{Character Input}
+ \o \l {Qt for Embedded Linux Display Management}{Display Management}
+ \o \l {Qt for Embedded Linux and OpenGL}{OpenGL}
+ \o \l {Qt for Embedded Linux Fonts}{Fonts}
+ \endlist
+
+ \header \o Development \o Porting \o Optimization
+ \row
+ \o
+ \list
+ \o \l {The Virtual Framebuffer}{Virtual Framebuffer}
+ \o \l {The VNC Protocol and Qt for Embedded Linux}{VNC Protocol}
+ \o \l {Testing the Linux Framebuffer}
+ \o \l {Cross Compiling Qt for Embedded Linux Applications}{Cross Compiling Applications}
+ \o \l {Deploying Qt for Embedded Linux Applications}{Deploying Applications}
+ \endlist
+ \o
+ \list
+ \o \l {Porting Qt Applications to Qt for Embedded Linux}
+ \o \l {Porting Qt for Embedded Linux to a New Architecture}
+ \o \l {Porting Qt for Embedded Linux to Another Operating System}
+ \endlist
+ \o
+ \list
+ \o \l {Qt Performance Tuning}
+ \o \l {Fine-Tuning Features in Qt}
+ \o \l {Adding an Accelerated Graphics Driver to Qt for Embedded Linux}{Adding an Accelerated Graphics Driver}
+ \endlist
+ \endtable
+*/
diff --git a/doc/src/qtscript.qdoc b/doc/src/qtscript.qdoc
new file mode 100644
index 0000000..4a2bbf6
--- /dev/null
+++ b/doc/src/qtscript.qdoc
@@ -0,0 +1,1934 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtScript
+ \title QtScript Module
+ \since 4.3
+ \contentspage Qt's Modules
+ \previouspage QtOpenGL
+ \nextpage QtScriptTools
+ \ingroup modules
+ \ingroup scripting
+
+ \brief The QtScript module provides classes for making Qt applications scriptable.
+
+ \tableofcontents
+
+ \section1 Configuring the Build Process
+
+ Applications that use Qt's Script classes need to
+ be configured to be built against the QtScript module.
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
+
+ The QtScript module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ The QtScript module only provides core scripting facilities; the
+ QtScriptTools module provides additional Qt Script-related
+ components that application developers may find useful.
+
+ \section1 Language Overview
+
+ Qt Script is based on the ECMAScript scripting language, as defined
+ in standard \l{ECMA-262}. Microsoft's JScript, and Netscape's
+ JavaScript are also based on the ECMAScript standard. For an
+ overview of ECMAScript, see the
+ \l{ECMAScript Reference}{ECMAScript reference}.
+ If you are not familiar with the ECMAScript language, there are
+ several existing tutorials and books that cover this subject, such
+ as \l{JavaScript: The Definitive Guide}.
+
+ Existing users of \l{Qt Script for Applications (QSA)} may find the
+ \l{Moving from QSA to Qt Script} document useful when porting
+ QSA scripts to Qt Script.
+
+ \section1 Basic Usage
+
+ To evaluate script code, you create a QScriptEngine and call its
+ evaluate() function, passing the script code (text) to evaluate
+ as argument.
+
+ \snippet doc/src/snippets/qtscript/evaluation/main.cpp 0
+
+ The return value will be the result of the evaluation (represented
+ as a QScriptValue object); this can be converted to standard C++
+ and Qt types.
+
+ Custom properties can be made available to scripts by registering
+ them with the script engine. This is most easily done by setting
+ properties of the script engine's \e{Global Object}:
+
+ \snippet doc/src/snippets/qtscript/registeringvalues/main.cpp 0
+
+ This places the properties in the script environment, thus making them
+ available to script code.
+
+ \section1 Making a QObject Available to the Script Engine
+
+ Any QObject-based instance can be made available for use with scripts.
+
+ When a QObject is passed to the QScriptEngine::newQObject() function,
+ a Qt Script wrapper object is created that can be used to make the
+ QObject's signals, slots, properties, and child objects available
+ to scripts.
+
+ Here's an example of making an instance of a QObject subclass
+ available to script code under the name \c{"myObject"}:
+
+ \snippet doc/src/snippets/qtscript/registeringobjects/main.cpp 0
+
+ This will create a global variable called \c{myObject} in the
+ script environment. The variable serves as a proxy to the
+ underlying C++ object. Note that the name of the script variable
+ can be anything; i.e., it is not dependent upon QObject::objectName().
+
+ The \l{QScriptEngine::}{newQObject()} function accepts two additional
+ optional arguments: one is the ownership mode, and the other is a
+ collection of options that allow you to control certain aspects of how
+ the QScriptValue that wraps the QObject should behave. We will come
+ back to the usage of these arguments later.
+
+ \section2 Using Signals and Slots
+
+ Qt Script adapts Qt's central \l{Signals and Slots} feature for
+ scripting. There are three principal ways to use signals and slots
+ with Qt Script:
+
+ \list
+ \i \bold{Hybrid C++/script}: C++ application code connects a
+ signal to a script function. The script function can, for example, be
+ a function that the user has typed in, or one that you have read from a
+ file. This approach is useful if you have a QObject but don't want
+ to expose the object itself to the scripting environment; you just
+ want a script to be able to define how a signal should be reacted
+ to, and leave it up to the C++ side of your application to establish
+ the connection.
+
+ \i \bold{Hybrid script/C++}: A script can connect signals and slots
+ to establish connections between pre-defined objects that the
+ application exposes to the scripting environment. In this scenario,
+ the slots themselves are still written in C++, but the definition of
+ the connections is fully dynamic (script-defined).
+
+ \i \bold{Purely script-defined}: A script can both define signal
+ handler functions (effectively "slots written in Qt Script"),
+ \e{and} set up the connections that utilize those handlers. For
+ example, a script can define a function that will handle the
+ QLineEdit::returnPressed() signal, and then connect that signal to the
+ script function.
+ \endlist
+
+ Use the qScriptConnect() function to connect a C++ signal to a
+ script function. In the following example a script signal handler is
+ defined that will handle the QLineEdit::textChanged() signal:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 47
+
+ The first two arguments to qScriptConnect() are the same
+ as you would pass to QObject::connect() to establish a normal C++
+ connection. The third argument is the script object that will act
+ as the \c this object when the signal handler is invoked; in the above
+ example we pass an invalid script value, so the \c this object will
+ be the Global Object. The fourth argument is the script function
+ ("slot") itself. The following example shows how the \c this argument
+ can be put to use:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 48
+
+ We create two QLineEdit objects and define a single signal handler
+ function. The connections use the same handler function, but the
+ function will be invoked with a different \c this object depending on
+ which object's signal was triggered, so the output of the print()
+ statement will be different for each.
+
+ In script code, Qt Script uses a different syntax for connecting to
+ and disconnecting from signals than the familiar C++ syntax; i.e.,
+ QObject::connect().
+ To connect to a signal, you reference the relevant signal as a property
+ of the sender object, and invoke its \c{connect()} function. There
+ are three overloads of \c{connect()}, each with a corresponding
+ \c{disconnect()} overload. The following subsections describe these
+ three forms.
+
+ \section3 Signal to Function Connections
+
+ \c{connect(function)}
+
+ In this form of connection, the argument to \c{connect()} is the
+ function to connect to the signal.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 2
+
+ The argument can be a Qt Script function, as in the above
+ example, or it can be a QObject slot, as in
+ the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 3
+
+ When the argument is a QObject slot, the argument types of the
+ signal and slot do not necessarily have to be compatible;
+ QtScript will, if necessary, perform conversion of the signal
+ arguments to match the argument types of the slot.
+
+ To disconnect from a signal, you invoke the signal's
+ \c{disconnect()} function, passing the function to disconnect
+ as argument:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 4
+
+ When a script function is invoked in response to a signal, the
+ \c this object will be the Global Object.
+
+ \section3 Signal to Member Function Connections
+
+ \c{connect(thisObject, function)}
+
+ In this form of the \c{connect()} function, the first argument
+ is the object that will be bound to the variable, \c this, when
+ the function specified using the second argument is invoked.
+
+ If you have a push button in a form, you typically want to do
+ something involving the form in response to the button's
+ \c{clicked} signal; passing the form as the \c this object
+ makes sense in such a case.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 5
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 6
+
+ \section3 Signal to Named Member Function Connections
+
+ \c{connect(thisObject, functionName)}
+
+ In this form of the \c{connect()} function, the first argument is
+ the object that will be bound to the variable, \c this, when
+ a function is invoked in response to the signal. The second argument
+ specifies the name of a function that is connected to the signal,
+ and this refers to a member function of the object passed as the
+ first argument (\c thisObject in the above scheme).
+
+ Note that the function is resolved when the connection is made, not
+ when the signal is emitted.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 7
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 8
+
+ \section3 Error Handling
+
+ When \c{connect()} or \c{disconnect()} succeeds, the function will
+ return \c{undefined}; otherwise, it will throw a script exception.
+ You can obtain an error message from the resulting \c{Error} object.
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 9
+
+ \section3 Emitting Signals from Scripts
+
+ To emit a signal from script code, you simply invoke the signal
+ function, passing the relevant arguments:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 10
+
+ It is currently not possible to define a new signal in a script;
+ i.e., all signals must be defined by C++ classes.
+
+ \section3 Overloaded Signals and Slots
+
+ When a signal or slot is overloaded, QtScript will attempt to
+ pick the right overload based on the actual types of the QScriptValue arguments
+ involved in the function invocation. For example, if your class has slots \c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following script code will behave reasonably:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 11
+
+ You can specify a particular overload by using array-style property access with the \l{QMetaObject::normalizedSignature()}{normalized signature} of the C++ function as the property name:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 12
+
+ If the overloads have different number of arguments, QtScript will
+ pick the overload with the argument count that best matches the
+ actual number of arguments passed to the slot.
+
+ For overloaded signals, Qt Script will throw an error if you try to connect
+ to the signal by name; you have to refer to the signal with the full
+ normalized signature of the particular overload you want to connect to.
+
+ \section2 Accessing Properties
+
+ The properties of the QObject are available as properties
+ of the corresponding QtScript object. When you manipulate
+ a property in script code, the C++ get/set method for that
+ property will automatically be invoked. For example, if your
+ C++ class has a property declared as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 13
+
+ then script code can do things like the following:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 14
+
+ \section2 Accessing Child QObjects
+
+ Every named child of the QObject (that is, for which
+ QObject::objectName() is not an empty string) is by default available as
+ a property of the QtScript wrapper object. For example,
+ if you have a QDialog with a child widget whose \c{objectName} property is
+ \c{"okButton"}, you can access this object in script code through
+ the expression
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 15
+
+ Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
+ the name in script code to, for example, rename an object:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 16
+
+ You can also use the functions \c{findChild()} and \c{findChildren()}
+ to find children. These two functions behave identically to
+ QObject::findChild() and QObject::findChildren(), respectively.
+
+ For example, we can use these functions to find objects using strings
+ and regular expressions:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 17
+
+ You typically want to use \c{findChild()} when manipulating a form
+ that uses nested layouts; that way the script is isolated from the
+ details about which particular layout a widget is located in.
+
+ \section2 Controlling QObject Ownership
+
+ Qt Script uses garbage collection to reclaim memory used by script
+ objects when they are no longer needed; an object's memory can be
+ automatically reclaimed when it is no longer referenced anywhere in
+ the scripting environment. Qt Script lets you control what happens
+ to the underlying C++ QObject when the wrapper object is reclaimed
+ (i.e., whether the QObject is deleted or not); you do this when you
+ create an object by passing an ownership mode as the second argument
+ to QScriptEngine::newQObject().
+
+ Knowing how Qt Script deals with ownership is important, since it can
+ help you avoid situations where a C++ object isn't deleted when it
+ should be (causing memory leaks), or where a C++ object \e{is}
+ deleted when it shouldn't be (typically causing a crash if C++ code
+ later tries to access that object).
+
+ \section3 Qt Ownership
+
+ By default, the script engine does not take ownership of the
+ QObject that is passed to QScriptEngine::newQObject(); the object
+ is managed according to Qt's object ownership (see
+ \l{Object Trees and Object Ownership}). This mode is appropriate
+ when, for example, you are wrapping C++ objects that are part of
+ your application's core; that is, they should persist regardless of
+ what happens in the scripting environment. Another way of stating
+ this is that the C++ objects should outlive the script engine.
+
+ \section3 Script Ownership
+
+ Specifying QScriptEngine::ScriptOwnership as the ownership mode
+ will cause the script engine to take full ownership of the QObject
+ and delete it when it determines that it is safe to do so
+ (i.e., when there are no more references to it in script code).
+ This ownership mode is appropriate if the QObject does not have a
+ parent object, and/or the QObject is created in the context of the
+ script engine and is not intended to outlive the script engine.
+
+ For example, a constructor function that constructs QObjects
+ only to be used in the script environment is a good candidate:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 18
+
+ \section3 Auto-Ownership
+
+ With QScriptEngine::AutoOwnership the ownership is based on whether
+ the QObject has a parent or not.
+ If the QtScript garbage collector finds that the QObject is no
+ longer referenced within the script environment, the QObject will
+ be deleted \e{only} if it does not have a parent.
+
+ \section3 What Happens When Someone Else Deletes the QObject?
+
+ It is possible that a wrapped QObject is deleted outside of
+ Qt Script's control; i.e., without regard to the ownership mode
+ specified. In this case, the wrapper object will still
+ be an object (unlike the C++ pointer it wraps, the script object
+ won't become null). Any attempt to access properties of the script
+ object will, however, result in a script exception being thrown.
+
+ Note that QScriptValue::isQObject() will still return true for a
+ deleted QObject, since it tests the type of the script object, not
+ whether the internal pointer is non-null. In other words, if
+ QScriptValue::isQObject() returns true but QScriptValue::toQObject()
+ returns a null pointer, this indicates that the QObject has been
+ deleted outside of Qt Script (perhaps accidentally).
+
+ \section2 Customizing Access to the QObject
+
+ QScriptEngine::newQObject() can take a third argument which allows
+ you to control various aspects of the access to the QObject through
+ the QtScript wrapper object it returns.
+
+ QScriptEngine::ExcludeChildObjects specifies that child objects of
+ the QObject should not appear as properties of the wrapper object.
+
+ QScriptEngine::ExcludeSuperClassProperties and
+ QScriptEngine::ExcludeSuperClassMethods can be used to avoid
+ exposing members that are inherited from the QObject's superclass.
+ This is useful for defining a "pure" interface where inherited members
+ don't make sense from a scripting perspective; e.g., you don't want
+ script authors to be able to change the \c{objectName} property of
+ the object or invoke the \c{deleteLater()} slot.
+
+ QScriptEngine::AutoCreateDynamicProperties specifies that properties
+ that don't already exist in the QObject should be created as dynamic
+ properties of the QObject, rather than as properties of the QtScript
+ wrapper object. If you want new properties to truly become persistent
+ properties of the QObject, rather than properties that are destroyed
+ along with the wrapper object (and that aren't shared if the QObject
+ is wrapped multiple times with QScriptEngine::newQObject()), you
+ should use this option.
+
+ QScriptEngine::SkipMethodsInEnumeration specifies that signals and
+ slots should be skipped when enumerating the properties of the QObject
+ wrapper in a for-in script statement. This is useful when defining
+ prototype objects, since by convention function properties of
+ prototypes should not be enumerable.
+
+ \section2 Making a QObject-based Class New-able from a Script
+
+ The QScriptEngine::newQObject() function is used to wrap an
+ existing QObject instance, so that it can be made available to
+ scripts. A different scenario is that you want scripts to be
+ able to construct new objects, not just access existing ones.
+
+ The Qt meta-type system currently does not provide dynamic
+ binding of constructors for QObject-based classes. If you want to
+ make such a class new-able from scripts, Qt Script can generate
+ a reasonable script constructor for you; see
+ QScriptEngine::scriptValueFromQMetaObject().
+
+ You can also use QScriptEngine::newFunction() to wrap your own
+ factory function, and add it to the script environment; see
+ QScriptEngine::newQMetaObject() for an example.
+
+ \section2 Enum Values
+
+ Values for enums declared with Q_ENUMS are not available as
+ properties of individual wrapper objects; rather, they are
+ properties of the QMetaObject wrapper object that can be created
+ with QScriptEngine::newQMetaObject().
+
+ \section1 Conversion Between QtScript and C++ Types
+
+ QtScript will perform type conversion when a value needs to be
+ converted from the script side to the C++ side or vice versa; for
+ instance, when a C++ signal triggers a script function, when
+ you access a QObject property in script code, or when
+ you call QScriptEngine::toScriptValue() or
+ QScriptEngine::fromScriptValue() in C++. QtScript provides default
+ conversion operations for many of the built-in Qt types. You can
+ change the conversion operation for a type (including your custom
+ C++ types) by registering your own conversion functions with
+ qScriptRegisterMetaType().
+
+ \section2 Default Conversion from Qt Script to C++
+
+ The following table describes the default conversion from a
+ QScriptValue to a C++ type.
+
+ \table 80%
+ \header \o C++ Type \o Default Conversion
+ \row \o bool \o QScriptValue::toBool()
+ \row \o int \o QScriptValue::toInt32()
+ \row \o uint \o QScriptValue::toUInt32()
+ \row \o float \o float(QScriptValue::toNumber())
+ \row \o double \o QScriptValue::toNumber()
+ \row \o short \o short(QScriptValue::toInt32())
+ \row \o ushort \o QScriptValue::toUInt16()
+ \row \o char \o char(QScriptValue::toInt32())
+ \row \o uchar \o unsigned char(QScriptValue::toInt32())
+ \row \o qlonglong \o qlonglong(QScriptValue::toInteger())
+ \row \o qulonglong \o qulonglong(QScriptValue::toInteger())
+ \row \o QString \o An empty string if the QScriptValue is null
+ or undefined; QScriptValue::toString() otherwise.
+ \row \o QDateTime \o QScriptValue::toDateTime()
+ \row \o QDate \o QScriptValue::toDateTime().date()
+ \row \o QRegExp \o QScriptValue::toRegExp()
+ \row \o QObject* \o QScriptValue::toQObject()
+ \row \o QWidget* \o QScriptValue::toQObject()
+ \row \o QVariant \o QScriptValue::toVariant()
+ \row \o QChar \o If the QScriptValue is a string, the result
+ is the first character of the string, or a null QChar
+ if the string is empty; otherwise, the result is a QChar
+ constructed from the unicode obtained by converting the
+ QScriptValue to a \c{ushort}.
+ \row \o QStringList \o If the QScriptValue is an array, the
+ result is a QStringList constructed from the result of
+ QScriptValue::toString() for each array element; otherwise,
+ the result is an empty QStringList.
+ \row \o QVariantList \o If the QScriptValue is an array, the result
+ is a QVariantList constructed from the result of
+ QScriptValue::toVariant() for each array element; otherwise,
+ the result is an empty QVariantList.
+ \row \o QVariantMap \o If the QScriptValue is an object, the result
+ is a QVariantMap with a (key, value) pair of the form
+ (propertyName, propertyValue.toVariant()) for each property,
+ using QScriptValueIterator to iterate over the object's
+ properties.
+ \row \o QObjectList \o If the QScriptValue is an array, the result
+ is a QObjectList constructed from the result of
+ QScriptValue::toQObject() for each array element; otherwise,
+ the result is an empty QObjectList.
+ \row \o QList<int> \o If the QScriptValue is an array, the result is
+ a QList<int> constructed from the result of
+ QScriptValue::toInt32() for each array element; otherwise,
+ the result is an empty QList<int>.
+ \endtable
+
+ Additionally, QtScript will handle the following cases:
+
+ \list
+ \i If the QScriptValue is a QObject and the target type name ends with
+ \c * (i.e., it is a pointer), the QObject pointer will be cast to the
+ target type with qobject_cast().
+ \i If the QScriptValue is a QVariant and the target type name ends with
+ \c * (i.e., it is a pointer), and the \l{QVariant::userType()}{userType()}
+ of the QVariant is the type that the target type points to, the result
+ is a pointer to the QVariant's data.
+ \i If the QScriptValue is a QVariant and it can be converted to the
+ target type (according to QVariant::canConvert()), the QVariant will
+ be cast to the target type with qvariant_cast().
+ \endlist
+
+ \section2 Default Conversion from C++ to Qt Script
+
+ The following table describes the default behavior when a QScriptValue is
+ constructed from a C++ type:
+
+ \table 80%
+ \header \o C++ Type \o Default Construction
+ \row \o void \o QScriptEngine::undefinedValue()
+ \row \o bool \o QScriptValue(engine, value)
+ \row \o int \o QScriptValue(engine, value)
+ \row \o uint \o QScriptValue(engine, value)
+ \row \o float \o QScriptValue(engine, value)
+ \row \o double \o QScriptValue(engine, value)
+ \row \o short \o QScriptValue(engine, value)
+ \row \o ushort \o QScriptValue(engine, value)
+ \row \o char \o QScriptValue(engine, value)
+ \row \o uchar \o QScriptValue(engine, value)
+ \row \o QString \o QScriptValue(engine, value)
+ \row \o qlonglong \o QScriptValue(engine, qsreal(value)). Note that
+ the conversion may lead to loss of precision, since not all
+ 64-bit integers can be represented using the qsreal type.
+ \row \o qulonglong \o QScriptValue(engine, qsreal(value)). Note that
+ the conversion may lead to loss of precision, since not all
+ 64-bit unsigned integers can be represented using the qsreal
+ type.
+ \row \o QChar \o QScriptValue(this, value.unicode())
+ \row \o QDateTime \o \l{QScriptEngine::newDate()}{QScriptEngine::newDate}(value)
+ \row \o QDate \o \l{QScriptEngine::newDate()}{QScriptEngine::newDate}(value)
+ \row \o QRegExp \o \l{QScriptEngine::newRegExp()}{QScriptEngine::newRegExp}(value)
+ \row \o QObject* \o \l{QScriptEngine::newQObject()}{QScriptEngine::newQObject}(value)
+ \row \o QWidget* \o \l{QScriptEngine::newQObject()}{QScriptEngine::newQObject}(value)
+ \row \o QVariant \o \l{QScriptEngine::newVariant()}{QScriptEngine::newVariant}(value)
+ \row \o QStringList \o A new script array (created with
+ QScriptEngine::newArray()), whose elements are created using
+ the QScriptValue(QScriptEngine *, QString) constructor for
+ each element of the list.
+ \row \o QVariantList \o A new script array (created with
+ QScriptEngine::newArray()), whose elements are created using
+ QScriptEngine::newVariant() for each element of the list.
+ \row \o QVariantMap \o A new script object (created with
+ QScriptEngine::newObject()), whose properties are initialized
+ according to the (key, value) pairs of the map.
+ \row \o QObjectList \o A new script array (created with
+ QScriptEngine::newArray()), whose elements are created using
+ QScriptEngine::newQObject() for each element of the list.
+ \row \o QList<int> \o A new script array (created with
+ QScriptEngine::newArray()), whose elements are created using
+ the QScriptValue(QScriptEngine *, int) constructor for each
+ element of the list.
+ \endtable
+
+ Other types (including custom types) will be wrapped using
+ QScriptEngine::newVariant(). For null pointers of any type, the
+ result is QScriptEngine::nullValue().
+
+ \section1 How to Design and Implement Application Objects
+
+ This section explains how to implement application objects and
+ provides the necessary technical background material.
+
+ \section2 Making a C++ object available to Scripts Written in QtScript
+
+ Making C++ classes and objects available to a scripting language is
+ not trivial because scripting languages tend to be more dynamic than
+ C++, and it must be possible to introspect objects (query information
+ such as function names, function signatures, properties, etc., at
+ run-time). Standard C++ does not provide features for this.
+
+ We can achieve the functionality we want by extending C++, using
+ C++'s own facilities so our code is still standard C++. The Qt
+ meta-object system provides the necessary additional functionality.
+ It allows us to write using an extended C++ syntax, but converts this
+ into standard C++ using a small utility program called \l{moc}
+ (Meta-Object Compiler). Classes that wish to take advantage of the
+ meta-object facilities are either subclasses of QObject, or use the
+ \c{Q_OBJECT} macro. Qt has used this approach for many years and it has
+ proven to be solid and reliable. QtScript uses this meta-object
+ technology to provide scripters with dynamic access to C++ classes
+ and objects.
+
+ To completely understand how to make C++ objects available to Qt
+ Script, some basic knowledge of the Qt meta-object system is very
+ helpful. We recommend that you read the \l{Qt Object Model}. The
+ information in this document and the documents it links to are very
+ useful for understanding how to implement application objects.
+
+ However, this knowledge is not essential in the simplest cases.
+ To make an object available in QtScript, it must derive from
+ QObject. All classes which derive from QObject can be introspected
+ and can provide the information needed by the scripting engine at
+ run-time; e.g., class name, functions, signatures. Because we obtain
+ the information we need about classes dynamically at run-time, there
+ is no need to write wrappers for QObject derived classes.
+
+ \section2 Making C++ Class Member Functions Available in QtScript
+
+ The meta-object system also makes information about signals and slots
+ dynamically available at run-time. By default, for QObject subclasses,
+ only the signals and slots are automatically made available to scripts.
+ This is very convenient because, in practice, we normally only want to
+ make specially chosen functions available to scripters. When you create
+ a QObject subclass, make sure that the functions you want to expose to
+ QtScript are public slots.
+
+ For example, the following class definition enables scripting only for
+ certain functions:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 19
+
+ In the example above, aNonScriptableFunction() is not declared as a
+ slot, so it will not be available in QtScript. The other three
+ functions will automatically be made available in QtScript because
+ they are declared in the \c{public slots} section of the class
+ definition.
+
+ It is possible to make any function script-invokable by specifying
+ the \c{Q_INVOKABLE} modifier when declaring the function:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 20
+
+ Once declared with \c{Q_INVOKABLE}, the method can be invoked from
+ QtScript code just as if it were a slot. Although such a method is
+ not a slot, you can still specify it as the target function in a
+ call to \c{connect()} in script code; \c{connect()} accepts both
+ native and non-native functions as targets.
+
+ \section2 Making C++ Class Properties Available in QtScript
+
+ In the previous example, if we wanted to get or set a property using
+ QtScript we would have to write code like the following:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 21
+
+ Scripting languages often provide a property syntax to modify and
+ retrieve properties (in our case the enabled state) of an
+ object. Many script programmers would want to write the above code
+ like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 22
+
+ To make this possible, you must define properties in the C++ QObject
+ subclass. For example, the following \c MyObject class declaration
+ declares a boolean property called \c enabled, which uses the function
+ \c{setEnabled(bool)} as its setter function and \c{isEnabled()} as its
+ getter function:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 23
+
+ The only difference from the original code is the use of the macro
+ \c{Q_PROPERTY}, which takes the type and name of the property, and
+ the names of the setter and getter functions as arguments.
+
+ If you don't want a property of your class to be accessible in
+ QtScript, you set the \c{SCRIPTABLE} attribute to \c false when
+ declaring the property; by default, the \c{SCRIPTABLE} attribute is
+ \c true. For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 24
+
+ \section2 Reacting to C++ Objects Signals in Scripts
+
+ In the Qt object model, signals are used as a notification mechanism
+ between QObjects. This means one object can connect a signal to
+ another object's slot and, every time the signal is emitted, the slot
+ is called. This connection is established using the QObject::connect()
+ function.
+
+ The signals and slots mechanism is also available to QtScript
+ programmers. The code to declare a signal in C++ is the same,
+ regardless of whether the signal will be connected to a slot in C++
+ or in QtScript.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 25
+
+ The only change we have made to the code in the previous section is
+ to declare a signals section with the relevant signal. Now, the
+ script writer can define a function and connect to the object like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 26
+
+ \section2 Design of Application Objects
+
+ The previous section described how to implement C++ objects which
+ can be used in QtScript. Application objects are the same kind of
+ objects, and they make your application's functionality available to
+ QtScript scripters. Since the C++ application is already written
+ in Qt, many objects are already QObjects. The easiest approach would
+ be to simply add all these QObjects as application objects to the
+ scripting engine. For small applications this might be sufficient,
+ but for larger applications this is probably not the right
+ approach. The problem is that this method reveals too much of the
+ internal API and gives script programmers access to application
+ internals which should not be exposed.
+
+ Generally, the best way of making application functionality available
+ to scripters is to code some QObjects which define the applications
+ public API using signals, slots, and properties. This gives you
+ complete control of the functionality made available by the
+ application. The implementations of these objects simply call the
+ functions in the application which do the real work. So, instead of
+ making all your QObjects available to the scripting engine, just add
+ the wrapper QObjects.
+
+ \section3 Returning QObject Pointers
+
+ If you have a slot that returns a QObject pointer, you should note
+ that, by default, Qt Script only handles conversion of the types
+ QObject* and QWidget*. This means that if your slot is declared
+ with a signature like "MyObject* getMyObject()", QtScript doesn't
+ automatically know that MyObject* should be handled in the same way
+ as QObject* and QWidget*. The simplest way to solve this is to only
+ use QObject* and QWidget* in the method signatures of your scripting
+ interface.
+
+ Alternatively, you can register conversion functions for your custom
+ type with the qScriptRegisterMetaType() function. In this way, you
+ can preserve the precise typing in your C++ declarations, while
+ still allowing pointers to your custom objects to flow seamlessly
+ between C++ and scripts. Example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 43
+
+ \section1 Function Objects and Native Functions
+
+ In Qt Script, functions are first-class values; they are objects that
+ can have properties of their own, just like any other type of
+ object. They can be stored in variables and passed as arguments to
+ other functions. Knowing how function calls in Qt Script behave is
+ useful when you want to define and use your own script functions.
+ This section discusses this matter, and also explains how you can
+ implement native functions; that is, Qt Script functions written in
+ C++, as opposed to functions written in the scripting language
+ itself. Even if you will be relying mostly on the dynamic QObject
+ binding that Qt Script provides, knowing about these powerful
+ concepts and techniques is important to understand what's actually
+ going on when script functions are executed.
+
+ \section2 Calling a Qt Script Function from C++
+
+ Calling a Qt Script function from C++ is achieved with the
+ QScriptValue::call() function. A typical scenario is that you evaluate a
+ script that defines a function, and at some point you want to call that
+ function from C++, perhaps passing it some arguments, and then handle the
+ result. The following script defines a Qt Script object that has a
+ toKelvin() function:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 90
+
+ The toKelvin() function takes a temperature in Kelvin as argument, and
+ returns the temperature converted to Celsius. The following snippet shows
+ how the toKelvin() function might be obtained and called from C++:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 91
+
+ If a script defines a global function, you can access the function as a
+ property of QScriptEngine::globalObject(). For example, the following script
+ defines a global function add():
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+
+ C++ code might call the add() function as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 92
+
+ As already mentioned, functions are just values in Qt Script; a function by
+ itself is not "tied to" a particular object. This is why you have to specify
+ a \c{this} object (the first argument to QScriptValue::call()) that the
+ function should be applied to.
+
+ If the function is supposed to act as a method (i.e. it can only be applied
+ to a certain class of objects), it is up to the function itself to check
+ that it is being called with a compatible \c{this} object.
+
+ Passing an invalid QScriptValue as the \c{this} argument to
+ QScriptValue::call() indicates that the Global Object should be used as the
+ \c{this} object; in other words, that the function should be invoked as a
+ global function.
+
+ \section2 The \c this Object
+
+ When a Qt Script function is invoked from a script, the \e{way} in which it
+ is invoked determines the \c this object when the function body is executed,
+ as the following script example illustrates:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 49
+
+ An important thing to note is that in Qt Script, unlike C++ and Java, the
+ \c this object is not part of the execution scope. This means that
+ member functions (i.e., functions that operate on \c this) must always
+ use the \c this keyword to access the object's properties. For example,
+ the following script probably doesn't do what you want:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 50
+
+ You will get a reference error saying that 'a is not defined' or, worse,
+ two totally unrelated global variables \c a and \c b will be used to
+ perform the computation, if they exist. Instead, the script should look
+ like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 51
+
+ Accidentally omitting the \c this keyword is a typical source of
+ error for programmers who are used to the scoping rules of C++ and Java.
+
+ \section2 Wrapping a Native Function
+
+ Qt Script provides QScriptEngine::newFunction() as a way of wrapping a
+ C++ function pointer; this enables you to implement a function in
+ C++ and add it to the script environment, so that scripts can invoke
+ your function as if it were a "normal" script function. Here is how the
+ previous \c{getProperty()} function can be written in C++:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 52
+
+ Call QScriptEngine::newFunction() to wrap the function. This will
+ produce a special type of function object that carries a pointer to
+ the C++ function internally. Once the resulting wrapper has been
+ added to the scripting environment (e.g., by setting it as a property
+ of the Global Object), scripts can call the function without having
+ to know nor care that it is, in fact, a native function.
+
+ Note that the name of the C++ function doesn't matter in the
+ scripting sense; the name by which the function is invoked by
+ scripts depends only on what you call the script object property
+ in which you store the function wrapper.
+
+ It is currently not possible to wrap member functions; i.e., methods
+ of a C++ class that require a \c this object.
+
+ \section2 The QScriptContext Object
+
+ A QScriptContext holds all the state associated with a particular
+ invocation of your function. Through the QScriptContext, you can:
+ \list
+ \i Get the arguments that were passed to the function.
+ \i Get the \c this object.
+ \i Find out whether the function was called with the \c new operator
+ (the significance of this will be explained later).
+ \i Throw a script error.
+ \i Get the function object that's being invoked.
+ \i Get the activation object (the object used to hold local variables).
+ \endlist
+
+ The following sections explain how to make use of this
+ functionality.
+
+ \section2 Processing Function Arguments
+
+ Two things are worth noting about function arguments:
+
+ \list 1
+ \o Any script function \mdash including native functions \mdash can
+ be invoked with any number of arguments. This means that it is up to
+ the function itself to check the argument count if necessary, and act
+ accordingly (e.g., throw an error if the number of arguments is
+ too large, or prepare a default value if the number is too small).
+ \o A value of any type can be supplied as an argument to any
+ function. This means that it is up to you to check the type of the
+ arguments if necessary, and act accordingly (e.g., throw an error
+ if an argument is not an object of a certain type).
+ \endlist
+
+ In summary: Qt Script does not automatically enforce any constraints on the
+ number or type of arguments involved in a function call.
+
+ \section3 Formal Parameters and the Arguments Object
+
+ A native Qt Script function is analogous to a script function that defines no
+ formal parameters and only uses the built-in \c arguments variable to
+ process its arguments. To see this, let's first consider how a
+ script would normally define an \c{add()} function that takes two
+ arguments, adds them together and returns the result:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+
+ When a script function is defined with formal parameters, their
+ names can be viewed as mere aliases of properties of the \c
+ arguments object; for example, in the \c{add(a, b)} definition's
+ function body, \c a and \c arguments[0] refer to the same
+ variable. This means that the \c{add()} function can equivalently be
+ written like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 57
+
+ This latter form closely matches what a native implementation
+ typically looks like:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 58
+
+ \section3 Checking the Number of Arguments
+
+ Again, remember that the presence (or lack) of formal parameter
+ names in a function definition does not affect how the function
+ may be invoked; \c{add(1, 2, 3)} is allowed by the engine, as is
+ \c{add(42)}. In the case of the \c {add()} function, the function
+ really needs two arguments in order to do something useful. This
+ can be expressed by the script definition as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 59
+
+ This would result in an error being thrown if a script invokes
+ \c{add()} with anything other than two arguments. The native
+ function can be modified to perform the same check:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 62
+
+ \section3 Checking the Types of Arguments
+
+ In addition to expecting a certain number of arguments, a function might
+ expect that those arguments are of certain types (e.g., that the first
+ argument is a number and that the second is a string). Such a function
+ should explicitly check the type of arguments and/or perform a conversion,
+ or throw an error if the type of an argument is incompatible.
+
+ As it is, the native implementation of \c{add()} shown above doesn't
+ have the exact same semantics as the script counterpart; this is
+ because the behavior of the Qt Script \c{+} operator depends on the
+ types of its operands (for example, if one of the operands is a string,
+ string concatenation is performed). To give the script function
+ stricter semantics (namely, that it should only add numeric
+ operands), the argument types can be tested:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 60
+
+ Then an invocation like \c{add("foo", new Array())} will
+ cause an error to be thrown.
+
+ The C++ version can call QScriptValue::isNumber() to perform similar
+ tests:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 63
+
+ A less strict script implementation might settle for performing an
+ explicit to-number conversion before applying the \c{+} operator:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 61
+
+ In a native implementation, this is equivalent to calling
+ QScriptValue::toNumber() without performing any type test first,
+ since QScriptValue::toNumber() will automatically perform a type
+ conversion if necessary.
+
+ To check if an argument is of a certain object type (class),
+ scripts can use the \c instanceof operator (e.g., \c{"arguments[0]
+ instanceof Array"} evaluates to true if the first argument is an
+ Array object); native functions can call QScriptValue::instanceOf().
+
+ To check if an argument is of a custom C++ type, you typically use
+ qscriptvalue_cast() and check if the result is valid. For object types,
+ this means casting to a pointer and checking if it is non-zero; for
+ value types, the class should have an \c{isNull()}, \c{isValid()}
+ or similar method. Alternatively, since most custom types are
+ transported in \l{QVariant}s, you can check if the script value is a
+ QVariant using QScriptValue::isVariant(), and then check if the
+ QVariant can be converted to your type using QVariant::canConvert().
+
+ \section3 Functions with Variable Numbers of Arguments
+
+ Because of the presence of the built-in \c arguments object,
+ implementing functions that take a variable number of arguments
+ is simple. In fact, as we have seen, in the technical sense \e{all}
+ Qt Script functions can be seen as variable-argument functions).
+ As an example, consider a concat() function that takes an arbitrary
+ number of arguments, converts the arguments to their string
+ representation and concatenates the results; for example,
+ \c{concat("Qt", " ", "Script ", 101)} would return "Qt Script 101".
+ A script definition of \c{concat()} might look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 64
+
+ Here is an equivalent native implementation:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 65
+
+ A second use case for a variable number of arguments is to implement
+ optional arguments. Here's how a script definition typically does
+ it:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 66
+
+ And here's the native equivalent:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 67
+
+ A third use case for a variable number of arguments is to simulate
+ C++ overloads. This involves checking the number of arguments and/or
+ their type at the beginning of the function body (as already shown),
+ and acting accordingly. It might be worth thinking twice before
+ doing this, and instead favor unique function names; e.g., having
+ separate \c{processNumber(number)} and \c{processString(string)}
+ functions rather than a generic \c{process(anything)} function.
+ On the caller side, this makes it harder for scripts to accidentally
+ call the wrong overload (since they don't know or don't comprehend
+ your custom sophisticated overloading resolution rules), and on the
+ callee side, you avoid the need for potentially complex (read:
+ error-prone) checks to resolve ambiguity.
+
+ \section3 Accessing the Arguments Object
+
+ Most native functions use the QScriptContext::argument() function to
+ access function arguments. However, it is also possible to access
+ the built-in \c arguments object itself (the one referred to by the
+ \c arguments variable in script code), by calling the
+ QScriptContext::argumentsObject() function. This has three principal
+ applications:
+
+ \list
+ \o The \c arguments object can be used to easily forward a function
+ call to another function. In script code, this is what it
+ typically looks like:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 68
+
+ For example, \c{foo(10, 20, 30)} would result in the \c{foo()} function
+ executing the equivalent of \c{bar(10, 20, 30)}. This is useful if
+ you want to perform some special pre- or post-processing when
+ calling a function (e.g., to log the call to \c{bar()} without having
+ to modify the \c{bar()} function itself, like the above example), or if
+ you want to call a "base implementation" from a prototype
+ function that has the exact same "signature". In C++, the forwarding
+ function might look like this:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 69
+
+ \o The arguments object can serve as input to a QScriptValueIterator,
+ providing a generic way to iterate over the arguments. A debugger
+ might use this to display the arguments object in a general purpose
+ "Qt Script Object Explorer", for example.
+
+ \o The arguments object can be serialized (e.g., with JSON) and transferred
+ to another entity (e.g., a script engine running in another thread),
+ where the object can be deserialized and passed as argument to
+ another script function.
+ \endlist
+
+ \section2 Constructor Functions
+
+ Some script functions are constructors; they are expected to initialize
+ new objects. The following snippet is a small example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 75
+
+ There is nothing special about constructor functions. In fact, any
+ script function can act as a constructor function (i.e., any function
+ can serve as the operand to \c{new}). Some functions behave differently
+ depending on whether they are called as part of a \c{new} expression
+ or not; for example, the expression \c{new Number(1)} will create a
+ Number object, whereas \c{Number("123")} will perform a type
+ conversion. Other functions, like \c{Array()}, will always create
+ and initialize a new object (e.g., \c{new Array()} and \c{Array()} have
+ the same effect).
+
+ A native Qt Script function can call the
+ QScriptContext::isCalledAsConstructor() function to determine if it
+ is being called as a constructor or as a regular function. When a
+ function is called as a constructor (i.e., it is the operand in a
+ \c{new} expression), this has two important implications:
+
+ \list
+ \i The \c this object, QScriptContext::thisObject(), contains
+ the new object to be initialized; the engine creates this
+ new object automatically before invoking your function. This means
+ that your native constructor function normally doesn't have to (and
+ shouldn't) create a new object when it is called as a
+ constructor, since the engine has already prepared a new
+ object. Instead your function should operate on the supplied
+ \c this object.
+ \i The constructor function should return an undefined value,
+ QScriptEngine::undefinedValue(), to tell the engine that the
+ \c this object should be the final result of the \c new
+ operator. Alternatively, the function can return the \c this
+ object itself.
+ \endlist
+
+ When QScriptContext::isCalledAsConstructor() returns false, how your
+ constructor handles this case depends on what behavior you desire.
+ If, like the built-in \c{Number()} function, a plain function call should
+ perform a type conversion of its argument, then you perform the conversion
+ and return the result. If, on the other hand, you want your constructor
+ to behave \e{as if it was called as a constructor} (with
+ \c{new}), you have to explicitly create a new object (that is,
+ ignore the \c this object), initialize that object, and return it.
+
+ The following example implements a constructor function that always
+ creates and initializes a new object:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 76
+
+ Given this constructor, scripts would be able to use either the
+ expression \c{new Person("Bob")} or \c{Person("Bob")} to create a
+ new \c{Person} object; both behave in the same way.
+
+ There is no equivalent way for a function defined in script
+ code to determine whether or not it was invoked as a constructor.
+
+ Note that, even though it is not considered good practice, there is
+ nothing that stops you from choosing to ignore the default
+ constructed (\c this) object when your function is called as a
+ constructor and creating your own object anyway; simply have the
+ constructor return that object. The object will "override" the
+ default object that the engine constructed (i.e., the default
+ object will simply be discarded internally).
+
+ \section2 Associating Data with a Function
+
+ Even if a function is global \mdash i.e., not associated with any particular
+ (type of) object \mdash you might still want to associate some data with it,
+ so that it becomes self-contained; for example, the function could have
+ a pointer to some C++ resource that it needs to access. If your application
+ only uses a single script engine, or the same C++ resource can/should be
+ shared among all script engines, you can simply use a static C++ variable
+ and access it from within the native Qt Script function.
+
+ In the case where a static C++ variable or singleton class is
+ not appropriate, you can call QScriptValue::setProperty() on the
+ function object, but be aware that those properties will also be
+ accessible to script code. The alternative is to use QScriptValue::setData();
+ this data is not script-accessible. The implementation can access this
+ internal data through the QScriptContext::callee() function, which
+ returns the function object being invoked. The following example
+ shows how this might be used:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 55
+
+ \section2 Native Functions as Arguments to Functions
+
+ As previously mentioned, a function object can be passed as argument
+ to another function; this is also true for native functions,
+ naturally. As an example, here's a native comparison function
+ that compares its two arguments numerically:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 53
+
+ The above function can be passed as argument to the standard
+ \c{Array.prototype.sort} function to sort an array numerically,
+ as the following C++ code illustrates:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 54
+
+ Note that, in this case, we are truly treating the native function
+ object as a value \mdash i.e., we don't store it as a property of the
+ scripting environment \mdash we simply pass it on as an "anonymous"
+ argument to another script function and then forget about it.
+
+ \section2 The Activation Object
+
+ Every Qt Script function invocation has an \e{activation object}
+ associated with it; this object is accessible through the
+ QScriptContext::activationObject() function. The activation object
+ is a script object whose properties are the local variables
+ associated with the invocation (including the arguments for which
+ the script function has a corresponding formal parameter name).
+ Thus, getting, modifying, creating and deleting local variables
+ from C++ is done using the regular QScriptValue::property() and
+ QScriptValue::setProperty() functions. The activation object itself
+ is not directly accessible from script code (but it is implicitly
+ accessed whenever a local variable is read from or written to).
+
+ For C++ code, there are two principal applications of the
+ activation object:
+
+ \list
+ \i The activation object provides a standard way to traverse the
+ variables associated with a function call, by using it as the input
+ to QScriptValueIterator. This is useful for debugging purposes.
+
+ \i The activation object can be used to prepare local variables
+ that should be available when a script is evaluated inline; this
+ can be viewed as a way of passing arguments to the script
+ itself. This technique is typically used in conjunction with
+ QScriptEngine::pushContext(), as in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 77
+
+ We create a temporary execution context, create a local variable
+ for it, evaluate the script, and finally restore the old context.
+ \endlist
+
+ \section2 Nested Functions and the Scope Chain
+
+ This is an advanced topic; feel free to skip it.
+
+ A nested function can be used to "capture" the execution context in which a
+ nested function object is created; this is typically referred to as creating
+ a \e closure. When, at some later time, the nested function is invoked, it
+ can access the variables that were created when the enclosing function was
+ invoked. This can perhaps best be illustrated through a small example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 70
+
+ The \c{counter()} function initializes a local variable to zero,
+ and returns a nested function. The nested function increments
+ the "outer" variable and returns its new value. The variable
+ persists over function calls, as shown in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 71
+
+ The \c{counter()} function can be implemented as a native function, too
+ \mdash or rather, as a pair of native functions: One for the outer and
+ one for the inner. The definition of the outer function is as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 72
+
+ The function creates a local variable and initializes it to zero.
+ Then it wraps the inner native function, and sets the scope of
+ the resulting function object to be the activation object associated
+ with this (the outer) function call. The inner function accesses
+ the "outer" activation through the scope of the callee:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 73
+
+ It is also possible to have a hybrid approach, where the outer function
+ is a native function and the inner function is defined by a script:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 74
+
+ \section2 Property Getters and Setters
+
+ A script object property can be defined in terms of a getter/setter
+ function, similar to how a Qt C++ property has read and write
+ functions associated with it. This makes it possible for a script to
+ use expressions like \c{object.x} instead of \c{object.getX()}; the
+ getter/setter function for \c{x} will implicitly be invoked
+ whenever the property is accessed. To scripts, the property looks
+ and behaves just like a regular object property.
+
+ A single Qt Script function can act as both getter and setter for
+ a property. When it is called as a getter, the argument count is 0.
+ When it is called as a setter, the argument count is 1; the argument
+ is the new value of the property. In the following example, we
+ define a native combined getter/setter that transforms the value
+ slightly:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 78
+
+ The example uses the internal data of the object to store and
+ retrieve the transformed value. Alternatively, the property
+ could be stored in another, "hidden" property of the object itself
+ (e.g., \c{__x__}). A native function is free to implement whatever
+ storage scheme it wants, as long as the external behavior of the
+ property itself is consistent (e.g., that scripts should not be able
+ to distinguish it from a regular property).
+
+ The following C++ code shows how an object property can be defined
+ in terms of the native getter/setter:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 79
+
+ When the property is accessed, like in the following script, the
+ getter/setter does its job behind the scenes:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 80
+
+ \note It is important that the setter function, not just the getter,
+ returns the value of the property; i.e., the setter should \e{not}
+ return QScriptValue::UndefinedValue. This is because the result of
+ the property assignment is the value returned by the setter, and
+ not the right-hand side expression. Also note that you normally
+ should not attempt to read the same property that the getter modifies
+ within the getter itself, since this will cause the getter to be
+ called recursively.
+
+ You can remove a property getter/setter by calling
+ QScriptValue::setProperty(), passing an invalid QScriptValue
+ as the getter/setter. Remember to specify the
+ QScriptValue::PropertyGetter/QScriptValue::PropertySetter flag(s),
+ otherwise the only thing that will happen is that the setter will be
+ invoked with an invalid QScriptValue as its argument!
+
+ Property getters and setters can be defined and installed by script
+ code as well, as in the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 81
+
+ Getters and setters can only be used to implement "a priori
+ properties"; i.e., the technique can't be used to react to an access
+ to a property that the object doesn't already have. To gain total
+ control of property access in this way, you need to subclass
+ QScriptClass.
+
+ \section1 Making Use of Prototype-Based Inheritance
+
+ In ECMAScript, inheritance is based on the concept of \e{shared
+ prototype objects}; this is quite different from the class-based
+ inheritance familiar to C++ programmers. With QtScript, you can
+ associate a custom prototype object with a C++ type using
+ QScriptEngine::setDefaultPrototype(); this is the key to providing
+ a script interface to that type. Since the QtScript module is built
+ on top of Qt's meta-type system, this can be done for any C++ type.
+
+ You might be wondering when exactly you would need to use this
+ functionality in your application; isn't the automatic binding
+ provided by QScriptEngine::newQObject() enough? No, not under all
+ circumstances.
+ Firstly, not every C++ type is derived from QObject; types that
+ are not QObjects cannot be introspected through Qt's meta-object
+ system (they do not have properties, signals and slots). Secondly,
+ even if a type is QObject-derived, the functionality you want to
+ expose to scripts might not all be available, since it is unusual to
+ define every function to be a slot (and it's not always
+ possible/desirable to change the C++ API to make it so).
+
+ It is perfectly possible to solve this problem by using "conventional"
+ C++ techniques. For instance, the QRect class could effectively be
+ made scriptable by creating a QObject-based C++ wrapper class with
+ \c{x}, \c{y}, \c{width} properties and so on, which forwarded property
+ access and function calls to the wrapped value. However, as we shall
+ see, by taking advantage of the ECMAScript object model and combining
+ it with Qt's meta-object system, we can arrive at a solution that is
+ more elegant, consistent and lightweight, supported by a small API.
+
+ This section explains the underlying concepts of prototype-based
+ inheritance. Once these concepts are understood, the associated
+ practices can be applied throughout the QtScript API in order to
+ create well-behaved, consistent bindings to C++ that will fit nicely
+ into the ECMAScript universe.
+
+ When experimenting with QtScript objects and inheritance, it can be
+ helpful to use the interactive interpreter included with the
+ \l{Qt Examples#Qt Script}{Qt Script examples}, located in
+ \c{examples/script/qscript}.
+
+ \section2 Prototype Objects and Shared Properties
+
+ The purpose of a QtScript \e{prototype object} is to define
+ behavior that should be shared by a set of other QtScript
+ objects. We say that objects which share the same prototype object
+ belong to the same \e{class} (again, on the technical side this
+ should not to be confused with the class constructs of languages
+ like C++ and Java; ECMAScript has no such construct).
+
+ The basic prototype-based inheritance mechanism works as follows: Each
+ QtScript object has an internal link to another object, its
+ \e{prototype}. When a property is looked up in an object, and the
+ object itself does not have the property, the property is looked up
+ in the prototype object instead; if the prototype has the property,
+ then that property is returned. Otherwise, the property is looked up
+ in the prototype of the prototype object, and so on; this chain of
+ objects constitutes a \e{prototype chain}. The chain of prototype
+ objects is followed until the property is found or the end of the
+ chain is reached.
+
+ For example, when you create a new object by the expression \c{new
+ Object()}, the resulting object will have as its prototype the
+ standard \c{Object} prototype, \c{Object.prototype}; through this
+ prototype relation, the new object inherits a set of properties,
+ including the \c{hasOwnProperty()} function and \c{toString()}
+ function:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 27
+
+ The \c{toString()} function itself is not defined in \c{o} (since we
+ did not assign anything to \c{o.toString}), so instead the
+ \c{toString()} function in the standard \c{Object} prototype is
+ called, which returns a highly generic string representation of
+ \c{o} ("[object Object]").
+
+ Note that the properties of the prototype object are not \e{copied} to
+ the new object; only a \e{link} from the new object to the prototype
+ object is maintained. This means that changes done to the prototype
+ object will immediately be reflected in the behavior of all objects
+ that have the modified object as their prototype.
+
+ \section2 Defining Classes in a Prototype-Based Universe
+
+ In QtScript, a class is not defined explicitly; there is no
+ \c{class} keyword. Instead, you define a new class in two steps:
+
+ \list 1
+ \i Define a \e{constructor function} that will initialize new objects.
+ \i Set up a \e{prototype object} that defines the class interface, and
+ assign this object to the public \c{prototype} property of the
+ constructor function.
+ \endlist
+
+ With this arrangement, the constructor's public \c{prototype}
+ property will automatically be set as the prototype of objects created
+ by applying the \c{new} operator to your constructor function;
+ e.g., the prototype of an object created by \c{new Foo()} will be the
+ value of \c{Foo.prototype}.
+
+ Functions that don't operate on the \c this object ("static" methods)
+ are typically stored as properties of the constructor function, not
+ as properties of the prototype object. The same is true for
+ constants, such as enum values.
+
+ The following code defines a simple constructor function for a class
+ called \c{Person}:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 28
+
+ Next, you want to set up \c{Person.prototype} as your prototype
+ object; i.e., define the interface that should be common to all
+ \c{Person} objects. QtScript automatically creates a default
+ prototype object (by the expression \c{new Object()}) for every
+ script function; you can add properties to this object, or you can
+ assign your own custom object. (Generally speaking, any QtScript
+ object can act as prototype for any other object.)
+
+ Here's an example of how you might want to override the
+ \c{toString()} function that \c{Person.prototype} inherits from
+ \c{Object.prototype}, to give your \c{Person} objects a more
+ appropriate string representation:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 29
+
+ This resembles the process of reimplementing a virtual function
+ in C++. Henceforth, when the property named \c{toString} is
+ looked up in a \c{Person} object, it will be resolved in
+ \c{Person.prototype}, not in \c{Object.prototype} as before:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 30
+
+ There are also some other interesting things we can learn about a
+ \c{Person} object:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 31
+
+ The \c{hasOwnProperty()} function is not inherited from
+ \c{Person.prototype}, but rather from \c{Object.prototype}, which is
+ the prototype of \c{Person.prototype} itself; i.e., the prototype
+ chain of \c{Person} objects is \c{Person.prototype} followed by
+ \c{Object.prototype}. This prototype chain establishes a \e{class
+ hierarchy}, as demonstrated by applying the \c{instanceof} operator;
+ \c{instanceof} checks if the value of the public \c{prototype}
+ property of the constructor function on the right-hand side is
+ reached by following the prototype chain of the object on the
+ left-hand side.
+
+ When defining subclasses, there's a general pattern you can use. The
+ following example shows how one can create a subclass of \c{Person}
+ called \c{Employee}:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 32
+
+ Again, you can use the \c{instanceof} to verify that the
+ class relationship between \c{Employee} and \c{Person} has been
+ correctly established:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 33
+
+ This shows that the prototype chain of \c{Employee} objects is the
+ same as that of \c{Person} objects, but with \c{Employee.prototype}
+ added to the front of the chain.
+
+ \section2 Prototype-Based Programming with the QtScript C++ API
+
+ You can use QScriptEngine::newFunction() to wrap
+ native functions. When implementing a constructor function,
+ you also pass the prototype object as an argument to
+ QScriptEngine::newFunction().
+ You can call QScriptValue::construct() to call a constructor
+ function, and you can use QScriptValue::call() from within a
+ native constructor function if you need to call a base class
+ constructor.
+
+ The QScriptable class provides a convenient way to implement a
+ prototype object in terms of C++ slots and properties. Take a look
+ at the \l{Default Prototypes Example} to see how this is done.
+ Alternatively, the prototype functionality can be implemented in
+ terms of standalone native functions that you wrap with
+ QScriptEngine::newFunction() and set as properties of your prototype
+ object by calling QScriptValue::setProperty().
+
+ In the implementation of your prototype functions, you use
+ QScriptable::thisObject() (or QScriptContext::thisObject()) to
+ obtain a reference to the QScriptValue being operated upon; then you
+ call qscriptvalue_cast() to cast it to your C++ type, and perform
+ the relevant operations using the usual C++ API for the type.
+
+ You associate a prototype object with a C++ type by calling
+ QScriptEngine::setDefaultPrototype(). Once this mapping is
+ established, QtScript will automatically assign the correct
+ prototype when a value of such a type is wrapped in a QScriptValue;
+ either when you explicitly call QScriptEngine::toScriptValue(), or
+ when a value of such a type is returned from a C++ slot and
+ internally passed back to script code by the engine. This means you
+ \e{don't} have to implement wrapper classes if you use this
+ approach.
+
+ As an example, let's consider how the \c{Person} class from the
+ preceding section can be implemented in terms of the Qt Script API.
+ We begin with the native constructor function:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 34
+
+ Here's the native equivalent of the \c{Person.prototype.toString}
+ function we saw before:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 35
+
+ The \c{Person} class can then be initialized as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 36
+
+ The implementation of the \c{Employee} subclass is similar. We
+ use QScriptValue::call() to call the super-class (Person) constructor:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 37
+
+ The \c{Employee} class can then be initialized as follows:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 38
+
+ When implementing the prototype object of a class, you may want to use
+ the QScriptable class, as it enables you to define the API of your
+ script class in terms of Qt properties, signals and slots, and
+ automatically handles value conversion between the Qt Script and C++
+ side.
+
+ \section2 Implementing Prototype Objects for Value-based Types
+
+ When implementing a prototype object for a value-based type --
+ e.g. QPointF -- the same general technique applies; you populate
+ a prototype object with functionality that should be shared
+ among instances. You then associate the prototype object with
+ the type by calling QScriptEngine::setDefaultPrototype(). This
+ ensures that when e.g. a value of the relevant type is returned
+ from a slot back to the script, the prototype link of the script
+ value will be initialized correctly.
+
+ When values of the custom type are stored in QVariants -- which Qt
+ Script does by default --, qscriptvalue_cast() enables you to safely
+ cast the script value to a pointer to the C++ type. This makes it
+ easy to do type-checking, and, for prototype functions that should
+ modify the underlying C++ value, lets you modify the actual value
+ contained in the script value (and not a copy of it).
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 39
+
+ \section2 Implementing Constructors for Value-based Types
+
+ You can implement a constructor function for a value-based type
+ by wrapping a native factory function. For example, the following
+ function implements a simple constructor for QPoint:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 44
+
+ In the above code we simplified things a bit, e.g. we didn't check
+ the argument count to decide which QPoint C++ constructor to use.
+ In your own constructors you have to do this type of resolution
+ yourself, i.e. by checking the number of arguments passed to the
+ native function, and/or by checking the type of the arguments and
+ converting the arguments to the desired type. If you detect a problem
+ with the arguments you may want to signal this by throwing a script
+ exception; see QScriptContext::throwError().
+
+ \section2 Managing Non-QObject-based Objects
+
+ For value-based types (e.g. QPoint), the C++ object will be destroyed when
+ the Qt Script object is garbage-collected, so managing the memory of the C++
+ object is not an issue. For QObjects, Qt Script provides several
+ alternatives for managing the underlying C++ object's lifetime; see the
+ \l{Controlling QObject Ownership} section. However, for polymorphic types
+ that don't inherit from QObject, and when you can't (or won't) wrap the type
+ in a QObject, you have to manage the lifetime of the C++ object yourself.
+
+ A behavior that's often reasonable when a Qt Script object wraps a C++
+ object, is that the C++ object is deleted when the Qt Script object is
+ garbage-collected; this is typically the case when the objects can be
+ constructed by scripts, as opposed to the application providing the scripts
+ with pre-made "environment" objects. A way of making the lifetime of the C++
+ object follow the lifetime of the Qt Script object is by using a shared
+ pointer class, such as QSharedPointer, to hold a pointer to your object;
+ when the Qt Script object containing the QSharedPointer is
+ garbage-collected, the underlying C++ object will be deleted if there are no
+ other references to the object.
+
+ The following snippet shows a constructor function that constructs
+ QXmlStreamReader objects that are stored using QSharedPointer:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 93
+
+ Prototype functions can use qscriptvalue_cast() to cast the \c this object
+ to the proper type:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 94
+
+ The prototype and constructor objects are set up in the usual way:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 95
+
+ Scripts can now construct QXmlStreamReader objects by calling the \c
+ XmlStreamReader constructor, and when the Qt Script object is
+ garbage-collected (or the script engine is destroyed), the QXmlStreamReader
+ object is destroyed as well.
+
+ \section1 Defining Custom Script Classes with QScriptClass
+
+ There are cases where neither the dynamic QObject binding provided
+ by QScriptEngine::newQObject() or the manual binding provided by
+ QScriptEngine::newFunction() is sufficient. For example, you might
+ want to implement a dynamic script proxy to an underlying object;
+ or you might want to implement an array-like class (i.e. that gives
+ special treatment to properties that are valid array indexes, and
+ to the property "length"). In such cases, you can subclass
+ QScriptClass to achieve the desired behavior.
+
+ QScriptClass allows you to handle all property access for a
+ (class of) script object through virtual get/set property functions.
+ Iteration of custom properties is also supported through the
+ QScriptClassPropertyIterator class; this means you can advertise
+ properties to be reported by for-in script statements and
+ QScriptValueIterator.
+
+ \section1 Error Handling and Debugging Facilities
+
+ Syntax errors in scripts will be reported as soon as a script is
+ evaluated; QScriptEngine::evaluate() will return a SyntaxError object
+ that you can convert to a string to get a description of the error.
+
+ The QScriptEngine::uncaughtExceptionBacktrace() function gives you
+ a human-readable backtrace of the last uncaught exception. In order
+ to get useful filename information in backtraces, you should pass
+ proper filenames to QScriptEngine::evaluate() when evaluating your
+ scripts.
+
+ Often an exception doesn't happen at the time the script is evaluated,
+ but at a later time when a function defined by the script is actually
+ executed. For C++ signal handlers, this is tricky; consider the case
+ where the clicked() signal of a button is connected to a script function,
+ and that script function causes a script exception when it is handling
+ the signal. Where is that script exception propagated to?
+
+ The solution is to connect to the QScriptEngine::signalHandlerException()
+ signal; this will give you notification when a signal handler causes
+ an exception, so that you can find out what happened and/or recover
+ from it.
+
+ In Qt 4.4 the QScriptEngineAgent class was introduced. QScriptEngineAgent
+ provides an interface for reporting low-level "events" in a script engine,
+ such as when a function is entered or when a new script statement is
+ reached. By subclassing QScriptEngineAgent you can be notified of these
+ events and perform some action, if you want. QScriptEngineAgent itself
+ doesn't provide any debugging-specific functionality (e.g. setting
+ breakpoints), but it is the basis of tools that do.
+
+ The QScriptEngineDebugger class introduced in Qt 4.5 provides a Qt Script
+ debugger that can be embedded into your application.
+
+ \section2 Redefining print()
+
+ Qt Script provides a built-in print() function that can be useful for
+ simple debugging purposes. The built-in print() function writes to
+ standard output. You can redefine the print() function (or add your
+ own function, e.g. debug() or log()) that redirects the text to
+ somewhere else. The following code shows a custom print() that adds
+ text to a QPlainTextEdit.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 45
+
+ The following code shows how the custom print() function may be
+ initialized and used.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 46
+
+ A pointer to the QPlainTextEdit is stored as an internal property
+ of the script function itself, so that it can be retrieved when
+ the function is called.
+
+ \section1 Using QtScript Extensions
+
+ The QScriptEngine::importExtension() function can be used to load plugins
+ into a script engine. Plugins typically add some extra functionality to
+ the engine; for example, a plugin might add full bindings for the Qt
+ Arthur painting API, so that those classes may be used from Qt Script
+ scripts. There are currently no script plugins shipped with Qt.
+
+ If you are implementing some Qt Script functionality that you want other
+ Qt application developers to be able to use, developing an extension (e.g.
+ by subclassing QScriptExtensionPlugin) is worth looking into.
+
+ \section1 Internationalization
+
+ Since Qt 4.5, Qt Script supports internationalization of scripts by building
+ on the C++ internationalization functionality (see \l{Internationalization
+ with Qt}).
+
+ \section2 Use qsTr() for All Literal Text
+
+ Wherever your script uses "quoted text" for text that will be presented to
+ the user, ensure that it is processed by the QCoreApplication::translate()
+ function. Essentially all that is necessary to achieve this is to use
+ the qsTr() script function. Example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 82
+
+ This accounts for 99% of the user-visible strings you're likely to write.
+
+ The qsTr() function uses the basename of the script's filename (see
+ QFileInfo::baseName()) as the translation context; if the filename is not
+ unique in your project, you should use the qsTranslate() function and pass a
+ suitable context as the first argument. Example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 83
+
+ If you need to have translatable text completely outside a function, there
+ are two functions to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP(). They merely
+ mark the text for extraction by the \c lupdate utility described below. At
+ runtime, these functions simply return the text to translate unmodified.
+
+ Example of QT_TR_NOOP():
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 84
+
+ Example of QT_TRANSLATE_NOOP():
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 85
+
+ \section2 Use String.prototype.arg() for Dynamic Text
+
+ The String.prototype.arg() function (which is modeled after QString::arg())
+ offers a simple means for substituting arguments:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 86
+
+ \section2 Produce Translations
+
+ Once you are using qsTr() and/or qsTranslate() throughout your scripts, you
+ can start producing translations of the user-visible text in your program.
+
+ The \l{Qt Linguist manual} provides further information about
+ Qt's translation tools, \e{Qt Linguist}, \c lupdate and \c
+ lrelease.
+
+ Translation of Qt Script scripts is a three-step process:
+
+ \list 1
+
+ \o Run \c lupdate to extract translatable text from the script source code
+ of the Qt application, resulting in a message file for translators (a \c
+ .ts file). The utility recognizes qsTr(), qsTranslate() and the
+ \c{QT_TR*_NOOP()} functions described above and produces \c .ts files
+ (usually one per language).
+
+ \o Provide translations for the source texts in the \c .ts file, using
+ \e{Qt Linguist}. Since \c .ts files are in XML format, you can also
+ edit them by hand.
+
+ \o Run \c lrelease to obtain a light-weight message file (a \c .qm
+ file) from the \c .ts file, suitable only for end use. Think of the \c
+ .ts files as "source files", and \c .qm files as "object files". The
+ translator edits the \c .ts files, but the users of your application
+ only need the \c .qm files. Both kinds of files are platform and
+ locale independent.
+
+ \endlist
+
+ Typically, you will repeat these steps for every release of your
+ application. The \c lupdate utility does its best to reuse the
+ translations from previous releases.
+
+ When running \c lupdate, you must specify the location of the script(s),
+ and the name of the \c{.ts} file to produce. Examples:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 87
+
+ will extract translatable text from \c myscript.qs and create the
+ translation file \c myscript_la.qs.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 88
+
+ will extract translatable text from all files ending with \c{.qs} in the
+ \c scripts folder and create the translation file \c scripts_la.qs.
+
+ Alternatively, you can create a separate qmake project file that sets up
+ the \c SOURCES and \c TRANSLATIONS variables appropriately; then run
+ \c lupdate with the project file as input.
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 89
+
+ When running \c lrelease, you must specify the name of the \c{.ts} input
+ file; or, if you are using a qmake project file to manage script
+ translations, you specify the name of that file. \c lrelease will create
+ \c myscript_la.qm, the binary representation of the translation.
+
+ \section2 Apply Translations
+
+ In your application, you must use QTranslator::load() to load the
+ translation files appropriate for the user's language, and install them
+ using QCoreApplication::installTranslator(). Finally, you must call
+ QScriptEngine::installTranslatorFunctions() to make the script translation
+ functions (qsTr(), qsTranslate() and \c{QT_TR*_NOOP()}) available to scripts
+ that are subsequently evaluated by QScriptEngine::evaluate(). For scripts
+ that are using the qsTr() function, the proper filename must be passed as
+ second argument to QScriptEngine::evaluate().
+
+ \c linguist, \c lupdate and \c lrelease are installed in the \c bin
+ subdirectory of the base directory Qt is installed into. Click Help|Manual
+ in \e{Qt Linguist} to access the user's manual; it contains a tutorial
+ to get you started.
+
+ See also the \l{Hello Script Example}.
+
+ \section1 ECMAScript Compatibility
+
+ QtScript implements all the built-in classes and functions defined
+ in ECMA-262.
+
+ The Date parsing and string conversion functions are implemented using
+ QDateTime::fromString() and QDateTime::toString(), respectively.
+
+ The RegExp class is a wrapper around QRegExp. The QRegExp semantics
+ do not precisely match the semantics for regular expressions defined
+ in ECMA-262.
+
+ \section1 QtScript Extensions to ECMAScript
+
+ \list
+ \i \c{__proto__} \br
+ The prototype of an object (QScriptValue::prototype())
+ can be accessed through its \c{__proto__} property in script code.
+ This property has the QScriptValue::Undeletable flag set.
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 40
+
+ \i \c{Object.prototype.__defineGetter__} \br
+ This function installs a
+ getter function for a property of an object. The first argument is
+ the property name, and the second is the function to call to get
+ the value of that property. When the function is invoked, the
+ \c this object will be the object whose property is accessed.
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 41
+
+ \i \c{Object.prototype.__defineSetter__} \br
+ This function installs a
+ setter function for a property of an object. The first argument is
+ the property name, and the second is the function to call to set
+ the value of that property. When the function is invoked, the
+ \c this object will be the object whose property is accessed.
+ For example:
+
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 42
+
+ \i \c{Function.prototype.connect} \br
+ This function connects
+ a signal to a slot. Usage of this function is described in
+ the section \l{Using Signals and Slots}.
+
+ \i \c{Function.prototype.disconnect} \br
+ This function disconnects
+ a signal from a slot. Usage of this function is described in
+ the section \l{Using Signals and Slots}.
+
+ \i \c{QObject.prototype.findChild} \br
+ This function is semantically equivalent to QObject::findChild().
+
+ \i \c{QObject.prototype.findChildren} \br
+ This function is semantically equivalent to QObject::findChildren().
+
+ \i \c{QObject.prototype.toString} \br
+ This function returns a default string representation of a QObject.
+
+ \i \c{gc} \br
+ This function invokes the garbage collector.
+
+ \i \c{Error.prototype.backtrace} \br
+ This function returns a human-readable backtrace, in the form of
+ an array of strings.
+
+ \i Error objects have the following additional properties:
+ \list
+ \i \c{lineNumber}: The line number where the error occurred.
+ \i \c{fileName}: The file name where the error occurred (if a file name
+ was passed to QScriptEngine::evaluate()).
+ \i \c{stack}: An array of objects describing the stack. Each object has
+ the following properties:
+ \list
+ \i \c{functionName}: The function name, if available.
+ \i \c{fileName}: The file name, if available.
+ \i \c{lineNumber}: The line number, if available.
+ \endlist
+ \endlist
+
+ \endlist
+
+ */
diff --git a/doc/src/qtscriptdebugger-manual.qdoc b/doc/src/qtscriptdebugger-manual.qdoc
new file mode 100644
index 0000000..3dfe879
--- /dev/null
+++ b/doc/src/qtscriptdebugger-manual.qdoc
@@ -0,0 +1,437 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtscriptdebugger-manual.html
+ \title Qt Script Debugger Manual
+ \ingroup scripting
+ \brief A manual describing how to use the Qt Script debugger.
+
+ The Qt Script debugger is a tool for debugging script execution in
+ Qt applications that use Qt Script. Application developers can embed
+ the debugger into their application through the
+ QScriptEngineDebugger class. This manual describes how to use the
+ debugger. We assume that the reader is somewhat familiar with
+ general debugging concepts and existing debugging tools.
+
+ We assume that the debugger has been integrated into the application
+ through the QScriptEngineDebugger::standardWindow()
+ function, which provides the standard debugger configuration.
+
+ \tableofcontents
+
+ \section1 Getting Started
+
+ The following image shows the debugger as created with
+ \l{QScriptEngineDebugger::}{standardWindow()}:
+
+ \image qtscript-debugger.png Running a script under the Qt Script debugger.
+
+ The debugger will start, i.e., take control over the script's
+ execution when any of these conditions are met:
+
+ \list
+ \o The \c{debugger} statement is encountered in the script.
+ \o Clicking the \gui Interrupt menu item from the \gui Debug
+ menu in the main window.
+ \o A breakpoint is reached.
+ \o An uncaught script exception is thrown.
+ \endlist
+
+ Once the debugger is started, the execution state can be inspected,
+ e.g., the value of variables can be queried and the current program
+ stack shown. New breakpoints can be set.
+
+ The debugger will resume, i.e., give the control back to the script
+ engine, when the user clicks \gui Continue menu item from the \gui
+ Debug menu. It will be invoked again if one of the conditions
+ described in the list above is met.
+
+ \section1 Overview of Debugger Components
+
+ The debugger's functionality is divided into a series of components,
+ each being a widget that can be shown in the main window of the
+ debugger. The following table describes each component and how they
+ relate to each other.
+
+ \table
+ \header
+ \o Component
+ \o Description
+ \row
+ \o Console Widget
+ \o The console widget provides a command-line interface to the
+ debugger's functionality, and also serves as an interactive script
+ interpreter. The set of commands and their syntax is inspired by
+ GDB, the GNU Debugger. Commands and script variables are
+ auto-completed through the TAB key.
+
+ Any console command that causes a change in the debugger or debugger
+ target's state will immediately be reflected in the other debugger
+ components (e.g. breakpoints or local variables changed).
+
+ The console provides a simple and powerful way of manipulating the
+ script environment. For example, typing "x" and hitting enter will
+ evaluate "x" in the current stack frame and display the result.
+ Typing "x = 123" will assign the value 123 to the variable \c{x} in
+ the current scope (or create a global variable \c{x} if there isn't
+ one -- scripts evaluated through the console can have arbitrary side
+ effects, so be careful).
+
+ \row
+ \o Stack Widget
+ \o The stack widget shows a backtrace of the script execution state.
+ Each row represents one frame in the stack. A row contains the
+ frame index (0 being the inner-most frame), the name of the script function,
+ and the location (file name and line number). To select a particular
+ stack frame to inspect, click on its row.
+
+ \row
+ \o Locals Widget
+ \o The locals widget shows the variables that are local to the
+ currently selected stack frame; that is, the properties of the
+ objects in the scope chain and the \c{this}-object. Objects can be
+ expanded, so that their properties can be examined, recursively.
+ Properties whose value has changed are shown in bold font.
+
+ Properties that are not read-only can be edited. Double-click on the
+ value and type in the new value; the value can be an arbitrary
+ expression. The expression will be evaluated in the associated stack
+ frame. While typing, you can press the TAB key to get possible
+ completions for the expression.
+
+ \row
+ \o Code Widget
+ \o The code widget shows the code of the currently selected script.
+ The widget displays an arrow in the left margin, marking the
+ code line that is being executed.
+ Clicking in the margin of a line will cause a breakpoint to be
+ toggled at that line. A breakpoint has to be set on a line that
+ contains an actual statement in order to be useful.When an uncaught script exception occurs, the
+ offending line will be shown with a red background.
+
+ The code widget is read-only; it cannot currently be used to edit
+ and (re)evaluate scripts. This is however possible from the
+ command-line interface, see \l{Console Command Reference}.
+
+ \row
+ \o Scripts Widget
+
+ \o The scripts widget shows the scripts that are currently loaded in
+ the script engine. Clicking on a script will cause its code to be
+ shown in the code widget. When a script is no longer referenced by
+ the debugger target it is removed from the scripts widget. Code
+ evaluated through QScriptEngine::evaluate() without a name specified, will be
+ displayed in the widget as Anonymous.
+
+ \row
+ \o Breakpoints Widget
+
+ \o The breakpoints widget shows all the breakpoints that are set. A
+ breakpoint can be disabled or enabled by clicking the checkbox next
+ to the breakpoint's ID (the ID is provided so that the breakpoint
+ can be manipulated through the console widget as well).
+
+ A condition can be associated with the breakpoint; the condition can
+ be an arbitrary expression that should evaluate to true or
+ false. The breakpoint will only be triggered when its location is
+ reached \bold{and} the condition evaluates to true.
+
+ Similarly, if the breakpoint's ignore-count is set to N, the
+ breakpoint will be ignored the next N times it is hit.
+
+ A new breakpoint can be set by clicking the New Breakpoint button
+ and typing in a location of the form <filename>\bold{:}<linenumber>.
+ The breakpoint location can refer to an already loaded script, or
+ one that has not been loaded yet.
+
+ \row
+ \o Debug Output Widget
+ \o The debug output widget shows messages generated by the print()
+ script function. Scripts can use the special variables \c{__FILE__}
+ and \c{__LINE__} to include the current location information in the
+ messages.
+
+ \row
+ \o Error Log Widget
+ \o The error log widget shows error messages that have been generated.
+ All uncaught exceptions that occur in the engine will appear here.
+
+ \endtable
+
+ \section2 Resuming Script Evaluation
+
+ Script evaluation can be resumed in one of the following ways:
+
+ \list
+ \o \bold{Continue}: Evaluation will resume normally.
+ \o \bold{Step Into}: Evaluation will resume until the next statement is reached.
+ \o \bold{Step Over}: Evaluation will resume until the next statement is reached;
+ but if the current statement is a function call, the debugger
+ will treat it as a single statement.
+ \o \bold{Step Out}: Evaluation will resume until the current function exits and
+ the next statement is reached.
+ \o \bold{Run to Cursor}: Run until the statement at the cursor is reached.
+ \o \bold{Run to New Script}: Run until the first statement of a new script is reached.
+ \endlist
+
+ In any case, script evaluation can also be stopped due to either of the
+ following reasons:
+
+ \list
+ \o A \c{debugger} statement is encountered.
+ \o A breakpoint is hit.
+ \o An uncaught script exception occurs.
+ \endlist
+
+ \section2 Resuming After an Uncaught Exception
+
+ When an uncaught script exception occurs, it is not possible to
+ continue evaluating the current function normally. However, you can
+ use the console command \bold{return} to catch the exception and
+ return a value to the calling function.
+
+ \section1 Console Command Reference
+
+ Note that you can also get help on the available commands by typing
+ ".help" in the console.
+
+ \section2 Breakpoint-related Commands
+
+ Break points is set
+
+ \section3 break <location>
+
+ Sets a breakpoint at a given code line.
+
+ \code
+ .break foo.qs:123
+ \endcode
+
+ This command sets a breakpoint at \c{foo.qs}, line 123.
+
+ \code
+ .break 123
+ \endcode
+
+ This command sets a breakpoint at line 123 in the current script; the current script
+ is the script associated with the current stack frame.
+
+ Each breakpoint has a unique identifier (an integer) associated with it.
+ This identifier is needed by other breakpoint-related commands.
+
+ \section3 clear <location>
+
+ \code
+ .clear foo.qs:123
+ \endcode
+
+ clears (deletes) the breakpoint at \c{foo.qs}, line 123.
+
+ \code
+ clear 123
+ \endcode
+
+ clears (deletes) the breakpoint at line 123 in the current script;
+ the current script is the script associated with the current stack
+ frame.
+
+ \section3 condition <breakpoint-id> <expression>
+
+ Sets a condition for a breakpoint.
+
+ \code
+ .condition 1 i > 42
+ \endcode
+
+ specifies that breakpoint 1 should only be triggered if the variable \c{i}
+ is greater than 42.
+
+ The expression can be an arbitrary one, i.e. it can have
+ side-effects. It can be any valid QScript conditional
+ expression.
+
+ \section3 delete <breakpoint-id>
+
+ Deletes a breakpoint, i.e., removes it from the current debugging
+ session.
+
+ \section3 disable <breakpoint-id>
+
+ Disables a breakpoint. The breakpoint will continue to exist, but
+ will not stop program execution.
+
+ \section3 enable <breakpoint-id>
+
+ Enables a breakpoint. Breakpoints are enabled by default, so you
+ only need to use this command if you have disabled to breakpoint
+ previously.
+
+ \section3 ignore <breakpoint-id> <count>
+
+ Sets the ignore-count of a breakpoint, i.e., the breakpoint will not
+ stop the program execution unless it have been reached \c count
+ times. This can, for instance, be useful in loops to stop at a
+ specific iteration.
+
+ \code
+ .ignore 1 5
+ \endcode
+
+ Specifies that breakpoint 1 should be ignored the next 5 times it is
+ hit.
+
+ \section3 info breakpoints
+
+ Lists the breakpoints that are set.
+
+ \code
+ .info breakpoints
+ \endcode
+
+ \section3 tbreak <location>
+
+ Sets a temporary breakpoint. This command is identical to the
+ \c{break} command, only the breakpoint will be automatically deleted
+ the first time it is hit.
+
+ \section2 File-related Commands
+
+ \section3 list <location>
+
+ Lists the contents of a script around a given location, where the
+ location is given as a line number and, optionally, the name of the
+ file from which you will print. If only a line number is given, \c
+ {.list} will use the file of the current stack frame.
+
+ \code
+ .list foo.qs:125
+ \endcode
+
+ When no arguments are given, \c{list} will incrementally list
+ sections of the current script.
+
+ \section3 info scripts
+
+ Lists the scripts that are currently loaded.
+
+ \section2 Execution-related Commands
+
+ \section3 advance <location>
+
+ Advances execution to a given location. The syntax of the location
+ is the same as for setting breakpoints. For example:
+
+ \code
+ .advance foo.qs:125
+ \endcode
+
+ \section3 continue
+
+ Continues execution normally, i.e, gives the execution control over
+ the script back the the QScriptEngine.
+
+ \section3 eval <program>
+
+ Evaluates a program.
+
+ \section3 finish
+
+ Continues execution until the current function exits and the next
+ statement is reached (i.e., the statement after the call to the
+ function).
+
+ \section3 interrupt
+
+ Requests that execution should be interrupted. Interruption will
+ occur as soon as a new script statement is reached.
+
+ \section3 next <count = 1>
+
+ Continues execution until a new statement is reached; but if the
+ current statement is a function call, the function call will be
+ treated as a single statement. This will be done \c count times
+ before execution is stopped; the default is one.
+
+ \section3 return <expression>
+
+ Makes the current frame return to its caller. If \c expression is
+ given, it will sent as the result of the function (i.e., replacing
+ the functions return value). \c expression can be any valid QScript
+ expression.
+
+ \section3 step <count = 1>
+
+ Continues execution until a new statement is reached. If the number
+ \c count is given as argument, this will be done \c count times
+ before execution is stopped. As opposed to \l{next <count = 1>}, \c
+ step will enter functions when encountering a function call
+ statement.
+
+ \section2 Stack-related Commands
+
+ \section3 backtrace
+
+ Shows a backtrace of the current execution. The trace will list the
+ function name and its position in the script for each stack frame.
+
+ \section3 down
+
+ Selects the previous (inner) stack frame. The execution will not
+ return to this frame, but you will get access to its local
+ variables.
+
+ \section3 frame <index>
+
+ This command moves to the stack frame with the given \c index. The
+ index of the frame on the top of the stack is 0. Previous frames are
+ numbered from 1 and upwards (the bottom frame in the stack has the
+ largest index).
+
+ \section3 info locals
+
+ Lists the variables that are in the scope of the current frame.
+
+ \section3 up
+
+ Selects the next (outer) stack frame.
+
+*/
diff --git a/doc/src/qtscriptextensions.qdoc b/doc/src/qtscriptextensions.qdoc
new file mode 100644
index 0000000..2a7d569
--- /dev/null
+++ b/doc/src/qtscriptextensions.qdoc
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Qt GUI Toolkit.
+** EDITIONS: FREE, PROFESSIONAL, ENTERPRISE
+**
+****************************************************************************/
+
+/*!
+ \page qtscriptextensions.html
+ \title Creating QtScript Extensions
+ \ingroup scripting
+ \brief A guide to creating and using QtScript extensions.
+
+ QtScript extensions can make additional functionality available to scripts
+ evaluated by a QScriptEngine. Extensions are imported by calling
+ the QScriptEngine::importExtension() function.
+
+ There are three ways to create an extension:
+
+ \list
+ \o Subclass QScriptExtensionPlugin and implement the desired functionality.
+ \o Implement the functionality in a script file.
+ \o Use a hybrid approach, where part of the functionality is implemented in a
+ QScriptExtensionPlugin, and part is implemented in a script file.
+ \endlist
+
+ The (dot-qualified) extension name is used to determine the path (relative to
+ the application's plugin path) where QScriptEngine will look for the script
+ file that will initialize the extension; if a file called \c{__init__.js}
+ (usually located in \c{[application plugin path]/script/foo/}) is
+ found in the corresponding folder, its contents will be evaluated by the engine
+ when the extension is imported.
+ As an example, if the extension is called \c{"foo.bar.baz"}, the engine will look
+ for \c{__init__.js} in \c{foo/bar/baz}. Additionally, before importing
+ \c{"foo.bar.baz"}, the engine will ensure that the extensions \c{"foo"} and \c{"foo.bar"}
+ are imported, locating and evaluating the corresponding \c{__init__.js}
+ in the same manner (in folders \c{foo} and \c{foo/bar}, respectively).
+
+ The contents of \c{__init__.js} are evaluated in a new QScriptContext,
+ as if it were the body of a function. The engine's Global Object acts as
+ the \c{this} object. The following local variables are initially available
+ to the script:
+
+ \list
+ \o \bold{__extension__}: The name of the extension (e.g. \c{"foo.bar.baz"}).
+ \o \bold{__setupPackage__}: A convenience function for setting up a "namespace" in the script environment. A typical application is to call \c{__setupPackage__()} with \c{__extension__} as argument; e.g. \c{__setupPackage__("foo.bar.baz")} would ensure that the object chain represented by the expression \c{foo.bar.baz} exists in the script environment. (This function is semantically equivalent to QScriptExtensionPlugin::setupPackage().)
+ \o \bold{__postInit__}: By default, this variable is undefined. If you assign a function to it, that function will be called \bold{after} the C++ plugin's initialize() function has been called. You can use this to perform further initialization that depends on e.g. native functions that the C++ plugin registers.
+ \endlist
+
+ An example of a simple \c{__init__.js}:
+
+ \snippet doc/src/snippets/code/doc_src_qtscriptextensions.qdoc 0
+
+ QScriptEngine will look for a QScriptExtensionPlugin that provides
+ the relevant extension by querying each plugin for its keys()
+ until a match is found. The plugin's initialize() function will be
+ called \bold{after} the relevant \c{__init__.js} (if any) has been
+ evaluated.
+
+ Continuining with the example of our imaginary extension \c{"foo.bar.baz"},
+ the following steps will be performed by QScriptEngine::importExtension():
+
+ \list
+ \o If it exists, \c{foo/__init__.js} is evaluated.
+ \o If a plugin with \c{"foo"} in its list of keys is found, its initialize() function is called with \c{"foo"} as key.
+ \o If it exists, \c{foo/bar/__init__.js} is evaluated.
+ \o If a plugin with \c{"foo.bar"} in its list of keys is found, its initialize() function is called with \c{"foo.bar"} as key.
+ \o If it exists, \c{foo/bar/baz/__init__.js} is evaluated.
+ \o If a plugin with "foo.bar.baz" in its list of keys is found, its initialize() function is called with \c{"foo.bar.baz"} as key.
+ \endlist
+
+ \section1 Static Extensions
+
+ When an extension is compiled and linked into your application as a
+ static plugin, Qt Script will look for the optional \c{__init__.js}
+ script in a resource, prefixed by \c{:/qtscriptextension}. For example,
+ if the extension key is "foo.bar", Qt Script will evaluate the contents
+ of the file \c{:/qtscriptextension/foo/bar/__init__.js}, if it
+ exists. Note that if the resource is built into the plugin, you may
+ need to use the Q_INIT_RESOURCE() macro to initialize the resource
+ before importing the extension.
+*/
diff --git a/doc/src/qtscripttools.qdoc b/doc/src/qtscripttools.qdoc
new file mode 100644
index 0000000..7d4bee1
--- /dev/null
+++ b/doc/src/qtscripttools.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtScriptTools
+ \title QtScriptTools Module
+ \since 4.5
+ \contentspage Qt's Modules
+ \previouspage QtScript
+ \nextpage QtSql
+ \ingroup modules
+ \ingroup scripting
+
+ \brief The QtScriptTools module provides additional components for applications that use Qt Script.
+
+ \tableofcontents
+
+ \section1 Configuring the Build Process
+
+ Applications that use the Qt Script Tools classes need to
+ be configured to be built against the QtScriptTools module.
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1
+
+ The QtScriptTools module is part of the \l{Qt Full Framework Edition} and
+ the \l{Open Source Versions of Qt}.
+
+ */
diff --git a/doc/src/qtsql.qdoc b/doc/src/qtsql.qdoc
new file mode 100644
index 0000000..c00410b
--- /dev/null
+++ b/doc/src/qtsql.qdoc
@@ -0,0 +1,568 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtSql
+ \title QtSql Module
+ \contentspage Qt's Modules
+ \previouspage QtScript
+ \nextpage QtSvg
+ \ingroup modules
+
+ \brief The QtSql module helps you provide seamless database
+ integration to your Qt applications.
+
+ The SQL classes are divided into three layers:
+
+ \table
+ \header \o Layer \o Description
+ \row \o \bold{Driver Layer}
+ \o This comprises the classes QSqlDriver,
+ QSqlDriverCreator<T>, QSqlDriverCreatorBase,
+ QSqlDriverPlugin, and QSqlResult. This layer provides the
+ low-level bridge between the specific databases and the
+ SQL API layer. See \l{SQL Database Drivers} for more
+ information.
+ \row \o \bold{SQL API Layer}
+ \o These classes provide access to databases. Connections
+ are made using the QSqlDatabase class. Database
+ interaction is achieved by using the QSqlQuery class.
+ In addition to QSqlDatabase and QSqlQuery, the SQL API
+ layer is supported by QSqlError, QSqlField, QSqlIndex,
+ and QSqlRecord.
+
+ \row \o \bold{User Interface Layer}
+ \o These classes link the data from a database to
+ data-aware widgets. They include QSqlQueryModel,
+ QSqlTableModel, and QSqlRelationalTableModel. These
+ classes are designed to work with Qt's model/view
+ framework.
+ \endtable
+
+ Note that to use any of these classes, a QCoreApplication object
+ must have been instantiated first. To include the definitions of
+ the module's classes, use the following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1
+
+ The QtSql module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ This overview assumes that you have at least a basic knowledge of
+ SQL. You should be able to understand simple \c SELECT, \c
+ INSERT, \c UPDATE, and \c DELETE statements. Although the \l
+ QSqlTableModel class provides an interface to database browsing
+ and editing that does not require a knowledge of SQL, a basic
+ understanding of SQL is highly recommended. A standard text
+ covering SQL databases is \e {An Introduction to Database Systems}
+ (7th Ed.) by C. J. Date, ISBN 0201385902.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Connecting to Databases
+
+ To access a database with QSqlQuery or QSqlQueryModel, create and
+ open one or more database connections. Database connections are
+ normally identified by connection name, \e{not} by database name.
+ You can have multiple connections to the same database.
+ QSqlDatabase also supports the concept of a \e{default}
+ connection, which is an unnamed connection. When calling QSqlQuery
+ or QSqlQueryModel member functions that take a connection name
+ argument, if you don't pass a connection name, the default
+ connection will be used. Creating a default connection is
+ convenient when your application only requires one database
+ connection.
+
+ Note the difference between creating a connection and opening it.
+ Creating a connection involves creating an instance of class
+ QSqlDatabase. The connection is not usable until it is opened. The
+ following snippet shows how to create a \e{default} connection
+ and then open it:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 26
+
+ The first line creates the connection object, and the last line
+ opens it for use. In between, we initialize some connection
+ information, including the \l{QSqlDatabase::setDatabaseName()}
+ {database name}, the \l{QSqlDatabase::setHostName()} {host name},
+ the \l{QSqlDatabase::setUserName()} {user name}, and the
+ \l{QSqlDatabase::setPassword()} {password}. In this case, we are
+ connecting to the MySQL database \c{flightdb} on the host
+ \c{bigblue}. The \c{"QMYSQL"} argument to
+ \l{QSqlDatabase::addDatabase()} {addDatabase()} specifies the type
+ of database driver to use for the connection. The set of database
+ drivers included with Qt are shown in the table of \l{SQL Database
+ Drivers#Supported Databases} {supported database drivers}.
+
+ The connection in the snippet will be the \e{default} connection,
+ because we don't pass the second argument to
+ \l{QSqlDatabase::addDatabase()} {addDatabase()}, which is the
+ connection name. For example, here we establish two MySQL database
+ connections named \c{"first"} and \c{"second"}:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 27
+
+ After these connections have been initialized, \l{QSqlDatabase::}
+ {open()} for each one to establish the live connections. If the
+ \l{QSqlDatabase::} {open()} fails, it returns false. In that case,
+ call QSqlDatabase::lastError() to get error information.
+
+ Once a connection is established, we can call the static function
+ QSqlDatabase::database() from anywhere with a connection name to
+ get a pointer to that database connection. If we don't pass a
+ connection name, it will return the default connection. For
+ example:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 28
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 29
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 30
+
+ To remove a database connection, first close the database using
+ QSqlDatabase::close(), then remove it using the static method
+ QSqlDatabase::removeDatabase().
+
+ \section1 Executing SQL Statements
+
+ The QSqlQuery class provides an interface for executing SQL
+ statements and navigating through the result set of a query.
+
+ The QSqlQueryModel and QSqlTableModel classes described in the
+ next section provide a higher-level interface for accessing
+ databases. If you are unfamiliar with SQL, you might want to skip
+ directly to the next section (\l{Using the SQL Model Classes}).
+
+ \section2 Executing a Query
+
+ To execute an SQL statement, simply create a QSqlQuery object and
+ call QSqlQuery::exec() like this:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 31
+
+ The QSqlQuery constructor accepts an optional QSqlDatabase object
+ that specifies which database connection to use. In the example
+ above, we don't specify any connection, so the default connection
+ is used.
+
+ If an error occurs, \l{QSqlQuery::exec()}{exec()} returns false.
+ The error is then available as QSqlQuery::lastError().
+
+ \section2 Navigating the Result Set
+
+ QSqlQuery provides access to the result set one record at a time.
+ After the call to \l{QSqlQuery::exec()}{exec()}, QSqlQuery's
+ internal pointer is located one position \e{before} the first
+ record. We must call QSqlQuery::next() once to advance to the
+ first record, then \l{QSqlQuery::next()}{next()} again repeatedly
+ to access the other records, until it returns false. Here's a
+ typical loop that iterates over all the records in order:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 32
+
+ The QSqlQuery::value() function returns the value of a field in
+ the current record. Fields are specified as zero-based indexes.
+ QSqlQuery::value() returns a QVariant, a type that can hold
+ various C++ and core Qt data types such as \c int, QString, and
+ QByteArray. The different database types are automatically mapped
+ into the closest Qt equivalent. In the code snippet, we call
+ QVariant::toString() and QVariant::toInt() to convert
+ variants to QString and \c int.
+
+ You can iterate back and forth using QSqlQuery::next(),
+ QSqlQuery::previous(), QSqlQuery::first(), QSqlQuery::last(), and
+ QSqlQuery::seek(). The current row index is returned by
+ QSqlQuery::at(), and the total number of rows in the result set
+ is avaliable as QSqlQuery::size() for databases that support it.
+
+ To determine whether a database driver supports a given feature,
+ use QSqlDriver::hasFeature(). In the following example, we call
+ QSqlQuery::size() to determine the size of a result set of
+ the underlying database supports that feature; otherwise, we
+ navigate to the last record and use the query's position to tell
+ us how many records there are.
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 33
+
+ If you iterate through a result set only using next() and seek()
+ with positive values, you can call
+ QSqlQuery::setForwardOnly(true) before calling exec(). This is an
+ easy optimization that will speed up the query significantly when
+ operating on large result sets.
+
+ \section2 Inserting, Updating, and Deleting Records
+
+ QSqlQuery can execute arbitrary SQL statements, not just
+ \c{SELECT}s. The following example inserts a record into a table
+ using \c{INSERT}:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 34
+
+ If you want to insert many records at the same time, it is often
+ more efficient to separate the query from the actual values being
+ inserted. This can be done using placeholders. Qt supports two
+ placeholder syntaxes: named binding and positional binding.
+ Here's an example of named binding:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 35
+
+ Here's an example of positional binding:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 36
+
+ Both syntaxes work with all database drivers provided by Qt. If
+ the database supports the syntax natively, Qt simply forwards the
+ query to the DBMS; otherwise, Qt simulates the placeholder syntax
+ by preprocessing the query. The actual query that ends up being
+ executed by the DBMS is available as QSqlQuery::executedQuery().
+
+ When inserting multiple records, you only need to call
+ QSqlQuery::prepare() once. Then you call
+ \l{QSqlQuery::bindValue()}{bindValue()} or
+ \l{QSqlQuery::addBindValue()}{addBindValue()} followed by
+ \l{QSqlQuery::exec()}{exec()} as many times as necessary.
+
+ Besides performance, one advantage of placeholders is that you
+ can easily specify arbitrary values without having to worry about
+ escaping special characters.
+
+ Updating a record is similar to inserting it into a table:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 37
+
+ You can also use named or positional binding to associate
+ parameters to actual values.
+
+ Finally, here's an example of a \c DELETE statement:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 38
+
+ \section2 Transactions
+
+ If the underlying database engine supports transactions,
+ QSqlDriver::hasFeature(QSqlDriver::Transactions) will return
+ true. You can use QSqlDatabase::transaction() to initiate a
+ transaction, followed by the SQL commands you want to execute
+ within the context of the transaction, and then either
+ QSqlDatabase::commit() or QSqlDatabase::rollback(). When
+ using transactions you must start the transaction before you
+ create your query.
+
+ Example:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 39
+
+ Transactions can be used to ensure that a complex operation is
+ atomic (for example, looking up a foreign key and creating a
+ record), or to provide a means of canceling a complex change in
+ the middle.
+
+ \omit
+ It would be useful to mention transactions, and the fact that
+ some databases don't support them.
+ \endomit
+
+ \section1 Using the SQL Model Classes
+
+ In addition to QSqlQuery, Qt offers three higher-level classes
+ for accessing databases. These classes are QSqlQueryModel,
+ QSqlTableModel, and QSqlRelationalTableModel.
+
+ \table
+ \row \o QSqlQueryModel
+ \o A read-only model based on an arbitrary SQL query.
+ \row \o QSqlTableModel
+ \o A read-write model that works on a single table.
+ \row \o QSqlRelationalTableModel
+ \o A QSqlTableModel subclass with foreign key support.
+ \endtable
+
+ These classes derive from QAbstractTableModel (which in turn
+ inherits from QAbstractItemModel) and make it easy to present
+ data from a database in an item view class such as QListView and
+ QTableView. This is explained in detail in the \l{Presenting Data
+ in a Table View} section.
+
+ Another advantage of using these classes is that it can make your
+ code easier to adapt to other data sources. For example, if you
+ use QSqlTableModel and later decide to use XML files to store
+ data instead of a database, it is essentially just a matter of
+ replacing one data model with another.
+
+ \section2 The SQL Query Model
+
+ QSqlQueryModel offers a read-only model based on an SQL query.
+
+ Example:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 40
+
+ After setting the query using QSqlQueryModel::setQuery(), you can
+ use QSqlQueryModel::record(int) to access the individual records.
+ You can also use QSqlQueryModel::data() and any of the other
+ functions inherited from QAbstractItemModel.
+
+ There's also a \l{QSqlQueryModel::setQuery()}{setQuery()}
+ overload that takes a QSqlQuery object and operates on its result
+ set. This enables you to use any features of QSqlQuery to set up
+ the query (e.g., prepared queries).
+
+ \section2 The SQL Table Model
+
+ QSqlTableModel offers a read-write model that works on a single
+ SQL table at a time.
+
+ Example:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 41
+
+ QSqlTableModel is a high-level alternative to QSqlQuery for
+ navigating and modifying individual SQL tables. It typically
+ results in less code and requires no knowledge of SQL syntax.
+
+ Use QSqlTableModel::record() to retrieve a row in the table, and
+ QSqlTableModel::setRecord() to modify the row. For example, the
+ following code will increase every employee's salary by 10 per
+ cent:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 42
+
+ You can also use QSqlTableModel::data() and
+ QSqlTableModel::setData(), which are inherited from
+ QAbstractItemModel, to access the data. For example, here's how
+ to update a record using
+ \l{QSqlTableModel::setData()}{setData()}:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 43
+
+ Here's how to insert a row and populate it:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 44
+
+ Here's how to delete five consecutive rows:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 45
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 46
+
+ The first argument to QSqlTableModel::removeRows() is the index
+ of the first row to delete.
+
+ When you're finished changing a record, you should always call
+ QSqlTableModel::submitAll() to ensure that the changes are
+ written to the database.
+
+ When and whether you actually \e need to call submitAll() depends
+ on the table's \l{QSqlTableModel::editStrategy()}{edit strategy}.
+ The default strategy is QSqlTableModel::OnRowChange, which
+ specifies that pending changes are applied to the database when
+ the user selects a different row. Other strategies are
+ QSqlTableModel::OnManualSubmit (where all changes are cached in
+ the model until you call submitAll()) and
+ QSqlTableModel::OnFieldChange (where no changes are cached).
+ These are mostly useful when QSqlTableModel is used with a view.
+
+ QSqlTableModel::OnFieldChange seems to deliver the promise that
+ you never need to call submitAll() explicitly. There are two
+ pitfalls, though:
+
+ \list
+ \o Without any caching, performance may drop significantly.
+ \o If you modify a primary key, the record might slip through
+ your fingers while you are trying to populate it.
+ \endlist
+
+ \section2 The SQL Relational Table Model
+
+ QSqlRelationalTableModel extends QSqlTableModel to provide
+ support for foreign keys. A foreign key is a 1-to-1 mapping
+ between a field in one table and the primary key field of another
+ table. For example, if a \c book table has a field called \c
+ authorid that refers to the author table's \c id field, we say
+ that \c authorid is a foreign key.
+
+ \table
+ \row \o \inlineimage noforeignkeys.png
+ \o \inlineimage foreignkeys.png
+ \endtable
+
+ The screenshot on the left shows a plain QSqlTableModel in a
+ QTableView. Foreign keys (\c city and \c country) aren't resolved
+ to human-readable values. The screenshot on the right shows a
+ QSqlRelationalTableModel, with foreign keys resolved into
+ human-readable text strings.
+
+ The following code snippet shows how the QSqlRelationalTableModel
+ was set up:
+
+ \snippet examples/sql/relationaltablemodel/relationaltablemodel.cpp 0
+ \codeline
+ \snippet examples/sql/relationaltablemodel/relationaltablemodel.cpp 1
+ \snippet examples/sql/relationaltablemodel/relationaltablemodel.cpp 2
+
+ See the QSqlRelationalTableModel documentation for details.
+
+ \section1 Presenting Data in a Table View
+
+ The QSqlQueryModel, QSqlTableModel, and QSqlRelationalTableModel
+ classes can be used as a data source for Qt's view classes such
+ as QListView, QTableView, and QTreeView. In practice, QTableView
+ is by far the most common choice, because an SQL result set is
+ essentially a two-dimensional data structure.
+
+ \image relationaltable.png A table view displaying a QSqlTableModel
+
+ The following example creates a view based on an SQL data model:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 17
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 18
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 19
+
+ If the model is a read-write model (e.g., QSqlTableModel), the
+ view lets the user edit the fields. You can disable this by
+ calling
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 20
+
+ You can use the same model as a data source for multiple views.
+ If the user edits the model through one of the views, the other
+ views will reflect the changes immediately. The
+ \l{sql/tablemodel}{Table Model} example shows how it works.
+
+ View classes display a header at the top to label the columns. To
+ change the header texts, call
+ \l{QAbstractItemModel::setHeaderData()}{setHeaderData()} on the
+ model. The header's labels default to the table's field names.
+ For example:
+
+ \snippet examples/sql/relationaltablemodel/relationaltablemodel.cpp 3
+
+ QTableView also has a vertical header on the left with numbers
+ identifying the rows. If you insert rows programmatically using
+ QSqlTableModel::insertRows(), the new rows will be marked with an
+ asterisk (*) until they are submitted using
+ \l{QSqlTableModel::submitAll()}{submitAll()} or automatically
+ when the user moves to another record (assuming the
+ \l{QSqlTableModel::EditStrategy}{edit strategy} is
+ QSqlTableModel::OnRowChange).
+
+ \image insertrowinmodelview.png Inserting a row in a model
+
+ Likewise, if you remove rows using
+ \l{QSqlTableModel::removeRows()}{removeRows()}, the rows will be
+ marked with an exclamation mark (!) until the change is
+ submitted.
+
+ The items in the view are rendered using a delegate. The default
+ delegate, QItemDelegate, handles the most common data types (\c
+ int, QString, QImage, etc.). The delegate is also responsible for
+ providing editor widgets (e.g., a combobox) when the user starts
+ editing an item in the view. You can create your own delegates by
+ subclassing QAbstractItemDelegate or QItemDelegate. See
+ \l{Model/View Programming} for more information.
+
+ QSqlTableModel is optimized to operate on a single table at a
+ time. If you need a read-write model that operates on an
+ arbitrary result set, you can subclass QSqlQueryModel and
+ reimplement \l{QAbstractItemModel::flags()}{flags()} and
+ \l{QAbstractItemModel::setData()}{setData()} to make it
+ read-write. The following two functions make fields 1 and 2 of a
+ query model editable:
+
+ \snippet examples/sql/querymodel/editablesqlmodel.cpp 0
+ \codeline
+ \snippet examples/sql/querymodel/editablesqlmodel.cpp 1
+
+ The setFirstName() helper function is defined as follows:
+
+ \snippet examples/sql/querymodel/editablesqlmodel.cpp 2
+
+ The setLastName() function is similar. See the
+ \l{sql/querymodel}{Query Model} example for the complete source code.
+
+ Subclassing a model makes it possible to customize it in many
+ ways: You can provide tooltips for the items, change the
+ background color, provide calculated values, provide different
+ values for viewing and editing, handle null values specially, and
+ more. See \l{Model/View Programming} as well as the \l
+ QAbstractItemView reference documentation for details.
+
+ If all you need is to resolve a foreign key to a more
+ human-friendly string, you can use QSqlRelationalTableModel. For
+ best results, you should also use QSqlRelationalDelegate, a
+ delegate that provides combobox editors for editing foreign keys.
+
+ \image relationaltable.png Editing a foreign key in a relational table
+
+ The \l{sql/relationaltablemodel}{Relational Table Model} example
+ illustrates how to use QSqlRelationalTableModel in conjunction with
+ QSqlRelationalDelegate to provide tables with foreign key
+ support.
+
+ \section1 Creating Data-Aware Forms
+
+ Using the SQL models described above, the contents of a database can
+ be presented to other model/view components. For some applications,
+ it is sufficient to present this data using a standard item view,
+ such as QTableView. However, users of record-based applications often
+ require a form-based user interface in which data from a specific
+ row or column in a database table is used to populate editor widgets
+ on a form.
+
+ Such data-aware forms can be created with the QDataWidgetMapper class,
+ a generic model/view component that is used to map data from a model
+ to specific widgets in a user interface.
+
+ QDataWidgetMapper operates on a specific database table, mapping items
+ in the table on a row-by-row or column-by-column basis. As a result,
+ using QDataWidgetMapper with a SQL model is as simple as using it with
+ any other table model.
+
+ \image qdatawidgetmapper-simple.png
+
+ The \l{demos/books}{Books} demonstration shows how information can
+ be presented for easy access by using QDataWidgetMapper and a set of
+ simple input widgets.
+*/
diff --git a/doc/src/qtsvg.qdoc b/doc/src/qtsvg.qdoc
new file mode 100644
index 0000000..083c669
--- /dev/null
+++ b/doc/src/qtsvg.qdoc
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtSvg
+ \title QtSvg Module
+ \since 4.1
+ \contentspage Qt's Modules
+ \previouspage QtSql
+ \nextpage QtWebKit
+ \ingroup modules
+
+ \brief The QtSvg module provides classes for displaying the contents of SVG
+ files.
+
+ Scalable Vector Graphics (SVG) is a language for describing two-dimensional
+ graphics and graphical applications in XML. SVG 1.1 is a W3C Recommendation
+ and forms the core of the current SVG developments in Qt. SVG 1.2 is the
+ specification currently being developed by the \l{SVG Working Group}, and it
+ is \l{http://www.w3.org/TR/SVG12/}{available in draft form}.
+ The \l{Mobile SVG Profiles} (SVG Basic and SVG Tiny) are aimed at
+ resource-limited devices and are part of the 3GPP platform for third generation
+ mobile phones. You can read more about SVG at \l{About SVG}.
+
+ \tableofcontents
+
+ \section1 SVG Support
+ Qt supports the \l{SVG 1.2 Tiny Static Features}{static features} of
+ \l{SVG 1.2 Tiny}. ECMA scripts and DOM manipulation are currently not
+ supported.
+
+ \section1 Configuring the Build Process
+
+ Applications that use Qt's SVG classes need to
+ be configured to be built against the QtSvg module.
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
+
+ The QtSvg module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ \section1 Rendering SVG files
+
+ The easiest way to render SVG files is to construct a QSvgWidget and
+ load an SVG file using one of the QSvgWidget::load() functions.
+
+ QSvgRenderer is the class responsible for rendering SVG files for
+ QSvgWidget, and it can be used directly to provide SVG support for
+ custom widgets.
+ To load an SVG file, construct a QSvgRenderer with a file name or the
+ contents of a file, or call QSvgRenderer::load() on an existing
+ renderer. If the SVG file has been loaded successfully the
+ QSvgRenderer::isValid() will return true.
+
+ Once you have loaded the SVG file successfully, you can render it
+ with the QSvgRenderer::render() function. Note that this scheme allows
+ you to render SVG files on all paint devices supported by Qt, including
+ QWidget, QGLWidget, and QImage. See the \l{SVG Viewer Example}{SVG Viewer}
+ example for more details.
+
+ \section1 Additional Information
+
+ Some code for arc handling in this module is derived from code with
+ the following license:
+
+ \legalese
+ Copyright 2002 USC/Information Sciences Institute
+
+ Permission to use, copy, modify, distribute, and sell this software
+ and its documentation for any purpose is hereby granted without
+ fee, provided that the above copyright notice appear in all copies
+ and that both that copyright notice and this permission notice
+ appear in supporting documentation, and that the name of
+ Information Sciences Institute not be used in advertising or
+ publicity pertaining to distribution of the software without
+ specific, written prior permission. Information Sciences Institute
+ makes no representations about the suitability of this software for
+ any purpose. It is provided "as is" without express or implied
+ warranty.
+
+ INFORMATION SCIENCES INSTITUTE DISCLAIMS ALL WARRANTIES WITH REGARD
+ TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL INFORMATION SCIENCES
+ INSTITUTE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ \endlegalese
+*/
diff --git a/doc/src/qttest.qdoc b/doc/src/qttest.qdoc
new file mode 100644
index 0000000..566ff5a
--- /dev/null
+++ b/doc/src/qttest.qdoc
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtTest
+ \title QtTest Module
+ \contentspage Qt's Modules
+ \previouspage QtAssistant
+ \nextpage QAxContainer
+ \ingroup modules
+
+ \keyword QtTest
+
+ \brief The QtTest module provides classes for unit testing Qt applications and libraries.
+
+ Applications that use Qt's unit testing classes need to
+ be configured to be built against the QtTest module.
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qttest.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qttest.qdoc 1
+
+ See the \l{QTestLib Manual} for a detailed introduction on how to use
+ Qt's unit testing features with your applications.
+
+ The QtTest module is part of all \l{Qt editions}.
+*/
diff --git a/doc/src/qtuiloader.qdoc b/doc/src/qtuiloader.qdoc
new file mode 100644
index 0000000..746738b
--- /dev/null
+++ b/doc/src/qtuiloader.qdoc
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtUiTools
+ \title QtUiTools Module
+ \since 4.1
+ \contentspage Qt's Modules
+ \previouspage QtDesigner
+ \nextpage QtHelp
+ \ingroup modules
+
+ \brief The QtUiTools module provides classes to handle forms created
+ with Qt Designer.
+
+ These forms are processed at run-time to produce dynamically-generated
+ user interfaces. In order to generate a form at run-time, a resource
+ file containing a \c{.ui} file is needed. Applications that use the
+ form handling classes need to be configured to be built against the
+ QtUiTools module. This is done by including the following declaration
+ in a \c qmake project file to ensure that the application is compiled
+ and linked appropriately.
+
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 0
+
+ A form loader object, provided by the QUiLoader class, is used to
+ construct the user interface. This user interface can
+ be retrieved from any QIODevice; for example, a QFile object can be
+ used to obtain a form stored in a project's resources. The
+ QUiLoader::load() function takes the user interface description
+ contained in the file and constructs the form widget.
+
+ To include the definitions of the module's classes, use the following
+ directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1
+
+ \note These classes are part of the \l{Open Source Versions of Qt} and
+ \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial
+ users.
+
+ \sa{Calculator Builder Example}, {World Time Clock Builder Example}
+*/
+
diff --git a/doc/src/qtwebkit.qdoc b/doc/src/qtwebkit.qdoc
new file mode 100644
index 0000000..0092950
--- /dev/null
+++ b/doc/src/qtwebkit.qdoc
@@ -0,0 +1,189 @@
+/*!
+ \module QtWebKit
+ \title QtWebKit Module
+ \contentspage Qt's Modules
+ \previouspage QtSvg
+ \nextpage QtXml
+ \ingroup architecture
+ \ingroup modules
+ \brief An introduction to the QtWebKit module.
+
+ \keyword Browser
+ \keyword Web Browser
+
+ \since 4.4
+
+ QtWebKit provides a Web browser engine that makes it easy to embed content
+ from the World Wide Web into your Qt application. At the same time Web
+ content can be enhanced with native controls.
+
+ QtWebKit provides facilities for rendering of HyperText Markup Language
+ (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector
+ Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and
+ scripted with JavaScript.
+
+ A bridge between the JavaScript execution environment and the Qt object
+ model makes it possible for custom QObjects to be scripted. Integration
+ with the Qt networking module enables Web pages to be transparently loaded
+ from Web servers, the local file system or even the Qt resource system.
+
+ In addition to providing pure rendering features, HTML documents can be
+ made fully editable to the user through the use of the \c{contenteditable}
+ attribute on HTML elements.
+
+ QtWebKit is based on the Open Source WebKit engine. More information about
+ WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
+
+ The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the
+ \l{Open Source Versions of Qt}.
+
+ \note Building the QtWebKit module with debugging symbols is problematic
+ on many platforms due to the size of the WebKit engine. We recommend
+ building the module in release mode only for embedded platforms.
+
+ \note Web site icons, also known as "FavIcons", are currently not supported
+ on Windows. We plan to address this in a future release.
+
+ \note WebKit has certain minimum requirements that must be met on
+ Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements}
+ document for more information.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Configuring the Build Process
+
+ Applications that use QtWebKit's classes need to be configured to be built
+ against the QtWebKit module. The following declaration in a \c qmake
+ project file ensures that an application is compiled and linked
+ appropriately:
+
+ \snippet doc/src/snippets/code/doc_src_qtwebkit.qdoc 0
+
+ This line is necessary because only the QtCore and QtGui modules are used
+ in the default build process.
+
+ To include the definitions of the module's classes, use the following
+ directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtwebkit.qdoc 1
+
+ \section1 Architecture
+
+ The easiest way to render content is through the QWebView class. As a
+ widget it can be embedded into your forms or a graphics view, and it
+ provides convenience functions for downloading and rendering web sites.
+
+ \snippet snippets/webkit/simple/main.cpp Using QWebView
+
+ QWebView acts as a view onto Web pages, each of which is represented by an
+ instance of the QWebPage class. QWebPage provides access to the document
+ structure in a page, describing features such as frames, the navigation
+ history, and the undo/redo stack for editable content.
+
+ HTML documents can be nested using frames in a frameset. An individual
+ frame in HTML is represented using the QWebFrame class. It includes the
+ bridge to the JavaScript window object and can be painted using QPainter.
+ Each QWebPage has one QWebFrame object as its main frame.
+
+ Individual browser features, defaults and other settings can be configured
+ through the QWebSettings class. It is possible to provide defaults for all
+ QWebPage instances through the default settings. Individual attributes
+ can be overidden by the page specific settings object.
+
+ \section1 Netscape Plugin Support
+
+ Since WebKit supports the Netscape Plugin API, Qt applications can display
+ Web pages that embed common plugins, as long as the user has the appropriate
+ binary files for those plugins installed.
+
+ The following locations are searched for plugins:
+
+ \table
+ \header \o Linux/Unix \o Windows
+ \row \o{1,3}
+ \list
+ \o \c{.mozilla/plugins} in the user's home directory
+ \o \c{.netscape/plugins} in the user's home directory
+ \o System locations, such as
+ \list
+ \o \c{/usr/lib/browser/plugins}
+ \o \c{/usr/local/lib/mozilla/plugins}
+ \o \c{/usr/lib/firefox/plugins}
+ \o \c{/usr/lib64/browser-plugins}
+ \o \c{/usr/lib/browser-plugins}
+ \o \c{/usr/lib/mozilla/plugins}
+ \o \c{/usr/local/netscape/plugins}
+ \o \c{/opt/mozilla/plugins}
+ \o \c{/opt/mozilla/lib/plugins}
+ \o \c{/opt/netscape/plugins}
+ \o \c{/opt/netscape/communicator/plugins}
+ \o \c{/usr/lib/netscape/plugins}
+ \o \c{/usr/lib/netscape/plugins-libc5}
+ \o \c{/usr/lib/netscape/plugins-libc6}
+ \o \c{/usr/lib64/netscape/plugins}
+ \o \c{/usr/lib64/mozilla/plugins}
+ \endlist
+ \o Locations specified by environment variables:
+ \list
+ \o \c{$MOZILLA_HOME/plugins}
+ \o \c{$MOZ_PLUGIN_PATH}
+ \o \c{$QTWEBKIT_PLUGIN_PATH}
+ \endlist
+ \endlist
+
+ \o
+ \list
+ \o The user's \c{Application Data\Mozilla\plugins} directory
+ \o Standard system locations of plugins for Quicktime, Flash, etc.
+ \endlist
+
+ \row
+ \raw HTML
+ <th class="qt-style">Mac OS X</th>
+ \endraw
+ \row
+ \o
+ \list
+ \o \c{Library/Internet Plug-Ins} in the user's home directory
+ \o The system \c{/Library/Internet Plug-Ins} directory
+ \endlist
+ \endtable
+
+ \section1 License Information
+
+ This is a snapshot of the Qt port of WebKit. The exact version information
+ can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
+
+ Qt Commercial Edition licensees that wish to distribute applications that
+ use the QtWebKit module need to be aware of their obligations under the
+ GNU Lesser General Public License (LGPL).
+
+ Developers using the Open Source Edition can choose to redistribute
+ the module under the appropriate version of the GNU LGPL; version 2.1
+ for applications and libraries licensed under the GNU GPL version 2,
+ or version 3 for applications and libraries licensed under the GNU
+ GPL version 2.
+
+ \legalese
+ WebKit is licensed under the GNU Library General Public License.
+ Individual contributor names and copyright dates can be found
+ inline in the code.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ \endlegalese
+*/
diff --git a/doc/src/qtxml.qdoc b/doc/src/qtxml.qdoc
new file mode 100644
index 0000000..e826403
--- /dev/null
+++ b/doc/src/qtxml.qdoc
@@ -0,0 +1,615 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtXml
+ \title QtXml Module
+ \contentspage Qt's Modules
+ \previouspage QtSvg
+ \nextpage QtXmlPatterns
+ \ingroup modules
+
+ \brief The QtXml module provides a stream reader and writer for
+ XML documents, and C++ implementations of SAX and DOM.
+
+ SAX is an event-based standard interface for XML parsers.
+ The Qt interface follows the design of the SAX2 Java implementation.
+ Its naming scheme was adapted to fit the Qt naming conventions.
+ Details on SAX2 can be found at \l{http://www.saxproject.org}.
+
+ Support for SAX2 filters and the reader factory are under
+ development. The Qt implementation does not include the SAX1
+ compatibility classes present in the Java interface.
+ For an introduction to Qt's SAX2 classes, see \l{The Qt SAX2 Classes}.
+
+ DOM Level 2 is a W3C Recommendation for XML interfaces that maps the
+ constituents of an XML document to a tree structure. The specification
+ of DOM Level 2 can be found at \l{http://www.w3.org/DOM/}.
+ For more information about the DOM classes in Qt is provided, see
+ \l{The Qt DOM Classes}.
+
+ Since version 4.3, Qt provides two new classes for reading and
+ writing XML: QXmlStreamReader and QXmlStreamWriter.
+
+ In addition to core XML support, classes for higher level querying
+ and manipulation of XML data, are provided by the QtXmlPatterns
+ module. In the QtSvg module, the QSvgRenderer and QSvgGenerator
+ classes can read and write a subset of SVG, an XML-based file
+ format. Qt also provides helper functions that may be useful to
+ those working with XML and XHTML: see Qt::escape() and
+ Qt::convertFromPlainText().
+
+ Further XML support is provided by the \l{Qt Solutions} group who
+ provide, for example, classes that support SOAP and MML with the
+ Qt XML classes.
+
+ This module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 Configuring the Build Process
+
+ Applications that use Qt's XML classes need to be configured to
+ be built against the QtXml module. The following declaration in a
+ \c qmake project file ensures that an application is compiled and
+ linked appropriately:
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 1
+
+ This line is necessary because only the QtCore and QtGui modules
+ are used in the default build process.
+
+ \section1 The QtXml Stream Classes
+
+ The QXmlStreamReader and QXmlStreamWriter are two new classes provided
+ in Qt 4.3 and later. A stream reader reports an XML document as a stream
+ of tokens. This differs from SAX as SAX applications provide handlers to
+ receive XML events from the parser whereas the QXmlStreamReader drives the
+ loop, pulling tokens from the reader when they are needed.
+ This pulling approach makes it possible to build recursive descent parsers,
+ allowing XML parsing code to be split into different methods or classes.
+
+ QXmlStreamReader is a well-formed XML 1.0 parser that excludes external
+ parsed entities. Hence, data provided by the stream reader adheres to the
+ W3C's criteria for well-formed XML, as long as no error occurs. Otherwise,
+ functions such as \l{QXmlStreamReader::atEnd()}{atEnd()},
+ \l{QXmlStreamReader::error()}{error()} and \l{QXmlStreamReader::hasError()}
+ {hasError()} can be used to check and view the errors.
+
+ An example of QXmlStreamReader implementation would be the \c XbelReader in
+ \l{QXmlStream Bookmarks Example}, which is a subclass of QXmlStreamReader.
+ The constructor takes \a treeWidget as a parameter and the class has Xbel
+ specific functions:
+
+ \snippet examples/xml/streambookmarks/xbelreader.h 1
+
+ \dots
+ \snippet examples/xml/streambookmarks/xbelreader.h 2
+ \dots
+
+ The \c read() function accepts a QIODevice and sets it with
+ \l{QXmlStreamReader::setDevice()}{setDevice()}. The
+ \l{QXmlStreamReader::raiseError()}{raiseError()} function is used to
+ display a custom error message, inidicating that the file's version
+ is incorrect.
+
+ \snippet examples/xml/streambookmarks/xbelreader.cpp 1
+
+ The pendent to QXmlStreamReader is QXmlStreamWriter, which provides an XML
+ writer with a simple streaming API. QXmlStreamWriter operates on a
+ QIODevice and has specialised functions for all XML tokens or events you
+ want to write, such as \l{QXmlStreamWriter::writeDTD()}{writeDTD()},
+ \l{QXmlStreamWriter::writeCharacters()}{writeCharacters()},
+ \l{QXmlStreamWriter::writeComment()}{writeComment()} and so on.
+
+ To write XML document with QXmlStreamWriter, you start a document with the
+ \l{QXmlStreamWriter::writeStartDocument()}{writeStartDocument()} function
+ and end it with \l{QXmlStreamWriter::writeEndDocument()}
+ {writeEndDocument()}, which implicitly closes all remaining open tags.
+ Element tags are opened with \l{QXmlStreamWriter::writeStartDocument()}
+ {writeStartDocument()} and followed by
+ \l{QXmlStreamWriter::writeAttribute()}{writeAttribute()} or
+ \l{QXmlStreamWriter::writeAttributes()}{writeAttributes()},
+ element content, and then \l{QXmlStreamWriter::writeEndDocument()}
+ {writeEndDocument()}. Also, \l{QXmlStreamWriter::writeEmptyElement()}
+ {writeEmptyElement()} can be used to write empty elements.
+
+ Element content comprises characters, entity references or nested elements.
+ Content can be written with \l{QXmlStreamWriter::writeCharacters()}
+ {writeCharacters()}, a function that also takes care of escaping all
+ forbidden characters and character sequences,
+ \l{QXmlStreamWriter::writeEntityReference()}{writeEntityReference()},
+ or subsequent calls to \l{QXmlStreamWriter::writeStartElement()}
+ {writeStartElement()}.
+
+ The \c XbelWriter class from \l{QXmlStream Bookmarks Example} is a subclass
+ of QXmlStreamWriter. Its \c writeFile() function illustrates the core
+ functions of QXmlStreamWriter mentioned above:
+
+ \snippet examples/xml/streambookmarks/xbelwriter.cpp 1
+
+ \section1 The Qt SAX2 Classes
+
+ \section2 Introduction to SAX2
+
+ The SAX2 interface is an event-driven mechanism to provide the user with
+ document information. An "event" in this context means something
+ reported by the parser, for example, it has encountered a start tag,
+ or an end tag, etc.
+
+ To make it less abstract consider the following example:
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 3
+
+ Whilst reading (a SAX2 parser is usually referred to as "reader")
+ the above document three events would be triggered:
+ \list 1
+ \o A start tag occurs (\c{<quote>}).
+ \o Character data (i.e. text) is found, "A quotation.".
+ \o An end tag is parsed (\c{</quote>}).
+ \endlist
+
+ Each time such an event occurs the parser reports it; you can set up
+ event handlers to respond to these events.
+
+ Whilst this is a fast and simple approach to read XML documents,
+ manipulation is difficult because data is not stored, simply handled
+ and discarded serially. The \link #dom DOM interface
+ \endlink reads in and stores the whole document in a tree structure;
+ this takes more memory, but makes it easier to manipulate the
+ document's structure..
+
+ The Qt XML module provides an abstract class, \l QXmlReader, that
+ defines the interface for potential SAX2 readers. Qt includes a reader
+ implementation, \l QXmlSimpleReader, that is easy to adapt through
+ subclassing.
+
+ The reader reports parsing events through special handler classes:
+ \table
+ \header \o Handler class \o Description
+ \row \o \l QXmlContentHandler
+ \o Reports events related to the content of a document (e.g. the start tag
+ or characters).
+ \row \o \l QXmlDTDHandler
+ \o Reports events related to the DTD (e.g. notation declarations).
+ \row \o \l QXmlErrorHandler
+ \o Reports errors or warnings that occurred during parsing.
+ \row \o \l QXmlEntityResolver
+ \o Reports external entities during parsing and allows users to resolve
+ external entities themselves instead of leaving it to the reader.
+ \row \o \l QXmlDeclHandler
+ \o Reports further DTD related events (e.g. attribute declarations).
+ \row \o \l QXmlLexicalHandler
+ \o Reports events related to the lexical structure of the
+ document (the beginning of the DTD, comments etc.).
+ \endtable
+
+ These classes are abstract classes describing the interface. The \l
+ QXmlDefaultHandler class provides a "do nothing" default
+ implementation for all of them. Therefore users only need to overload
+ the QXmlDefaultHandler functions they are interested in.
+
+ To read input XML data a special class \l QXmlInputSource is used.
+
+ Apart from those already mentioned, the following SAX2 support classes
+ provide additional useful functionality:
+ \table
+ \header \o Class \o Description
+ \row \o \l QXmlAttributes
+ \o Used to pass attributes in a start element event.
+ \row \o \l QXmlLocator
+ \o Used to obtain the actual parsing position of an event.
+ \row \o \l QXmlNamespaceSupport
+ \o Used to implement namespace support for a reader. Note that
+ namespaces do not change the parsing behavior. They are only
+ reported through the handler.
+ \endtable
+
+ The \l{SAX Bookmarks example} illustrates how to subclass
+ QXmlDefaultHandler to read an XML bookmark file (XBEL) and
+ how to generate XML by hand.
+
+ \section2 SAX2 Features
+
+ The behavior of an XML reader depends on its support for certain
+ optional features. For example, a reader may have the feature "report
+ attributes used for namespace declarations and prefixes along with
+ the local name of a tag". Like every other feature this has a unique
+ name represented by a URI: it is called
+ \e http://xml.org/sax/features/namespace-prefixes.
+
+ The Qt SAX2 implementation can report whether the reader has
+ particular functionality using the QXmlReader::hasFeature()
+ function. Available features can be tested with QXmlReader::feature(),
+ and switched on or off using QXmlReader::setFeature().
+
+ Consider the example
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 4
+ A reader that does not support the \e
+ http://xml.org/sax/features/namespace-prefixes feature would report
+ the element name \e document but not its attributes \e xmlns:book and
+ \e xmlns with their values. A reader with the feature \e
+ http://xml.org/sax/features/namespace-prefixes reports the namespace
+ attributes if the \link QXmlReader::feature() feature\endlink is
+ switched on.
+
+ Other features include \e http://xml.org/sax/features/namespace
+ (namespace processing, implies \e
+ http://xml.org/sax/features/namespace-prefixes) and \e
+ http://xml.org/sax/features/validation (the ability to report
+ validation errors).
+
+ Whilst SAX2 leaves it to the user to define and implement whatever
+ features are required, support for \e
+ http://xml.org/sax/features/namespace (and thus \e
+ http://xml.org/sax/features/namespace-prefixes) is mandantory.
+ The \l QXmlSimpleReader implementation of \l QXmlReader,
+ supports them, and can do namespace processing.
+
+ \l QXmlSimpleReader is not validating, so it
+ does not support \e http://xml.org/sax/features/validation.
+
+ \section2 Namespace Support via Features
+
+ As we have seen in the previous section, we can configure the
+ behavior of the reader when it comes to namespace
+ processing. This is done by setting and unsetting the
+ \e http://xml.org/sax/features/namespaces and
+ \e http://xml.org/sax/features/namespace-prefixes features.
+
+ They influence the reporting behavior in the following way:
+ \list 1
+ \o Namespace prefixes and local parts of elements and attributes can
+ be reported.
+ \o The qualified names of elements and attributes are reported.
+ \o \l QXmlContentHandler::startPrefixMapping() and \l
+ QXmlContentHandler::endPrefixMapping() are called by the reader.
+ \o Attributes that declare namespaces (i.e. the attribute \e xmlns and
+ attributes starting with \e{xmlns:}) are reported.
+ \endlist
+
+ Consider the following element:
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 5
+ With \e http://xml.org/sax/features/namespace-prefixes set to true
+ the reader will report four attributes; but with the \e
+ namespace-prefixes feature set to false only three, with the \e
+ xmlns:fnord attribute defining a namespace being "invisible" to the
+ reader.
+
+ The \e http://xml.org/sax/features/namespaces feature is responsible
+ for reporting local names, namespace prefixes and URIs. With \e
+ http://xml.org/sax/features/namespaces set to true the parser will
+ report \e title as the local name of the \e fnord:title attribute, \e
+ fnord being the namespace prefix and \e http://www.qtsoftware.com/fnord/ as
+ the namespace URI. When \e http://xml.org/sax/features/namespaces is
+ false none of them are reported.
+
+ In the current implementation the Qt XML classes follow the definition
+ that the prefix \e xmlns itself isn't associated with any namespace at all
+ (see \link http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-using
+ http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-using \endlink).
+ Therefore even with \e http://xml.org/sax/features/namespaces and
+ \e http://xml.org/sax/features/namespace-prefixes both set to true
+ the reader won't return either a local name, a namespace prefix or
+ a namespace URI for \e xmlns:fnord.
+
+ This might be changed in the future following the W3C suggestion
+ \link http://www.w3.org/2000/xmlns/ http://www.w3.org/2000/xmlns/ \endlink
+ to associate \e xmlns with the namespace \e http://www.w3.org/2000/xmlns.
+
+ As the SAX2 standard suggests, \l QXmlSimpleReader defaults to having
+ \e http://xml.org/sax/features/namespaces set to true and
+ \e http://xml.org/sax/features/namespace-prefixes set to false.
+ When changing this behavior using \l QXmlSimpleReader::setFeature()
+ note that the combination of both features set to
+ false is illegal.
+
+ \section3 Summary
+
+ \l QXmlSimpleReader implements the following behavior:
+
+ \table
+ \header \o (namespaces, namespace-prefixes)
+ \o Namespace prefix and local part
+ \o Qualified names
+ \o Prefix mapping
+ \o xmlns attributes
+ \row \o (true, false) \o Yes \o Yes* \o Yes \o No
+ \row \o (true, true) \o Yes \o Yes \o Yes \o Yes
+ \row \o (false, true) \o No* \o Yes \o No* \o Yes
+ \row \o (false, false) \i41 Illegal
+ \endtable
+
+ The behavior of the entries marked with an asterisk (*) is not specified by SAX.
+
+ \section2 Properties
+
+ Properties are a more general concept. They have a unique name,
+ represented as an URI, but their value is \c void*. Thus nearly
+ anything can be used as a property value. This concept involves some
+ danger, though: there is no means of ensuring type-safety; the user
+ must take care that they pass the right type. Properties are
+ useful if a reader supports special handler classes.
+
+ The URIs used for features and properties often look like URLs, e.g.
+ \c http://xml.org/sax/features/namespace. This does not mean that the
+ data required is at this address. It is simply a way of defining
+ unique names.
+
+ Anyone can define and use new SAX2 properties for their readers.
+ Property support is not mandatory.
+
+ To set or query properties the following functions are provided: \l
+ QXmlReader::setProperty(), \l QXmlReader::property() and \l
+ QXmlReader::hasProperty().
+
+
+ \target dom
+ \section1 The Qt DOM Classes
+
+ \target domIntro
+ \section2 Introduction to DOM
+
+ DOM provides an interface to access and change the content and
+ structure of an XML file. It makes a hierarchical view of the document
+ (a tree view). Thus -- in contrast to the SAX2 interface -- an object
+ model of the document is resident in memory after parsing which makes
+ manipulation easy.
+
+ All DOM nodes in the document tree are subclasses of \l QDomNode. The
+ document itself is represented as a \l QDomDocument object.
+
+ Here are the available node classes and their potential child classes:
+
+ \list
+ \o \l QDomDocument: Possible children are
+ \list
+ \o \l QDomElement (at most one)
+ \o \l QDomProcessingInstruction
+ \o \l QDomComment
+ \o \l QDomDocumentType
+ \endlist
+ \o \l QDomDocumentFragment: Possible children are
+ \list
+ \o \l QDomElement
+ \o \l QDomProcessingInstruction
+ \o \l QDomComment
+ \o \l QDomText
+ \o \l QDomCDATASection
+ \o \l QDomEntityReference
+ \endlist
+ \o \l QDomDocumentType: No children
+ \o \l QDomEntityReference: Possible children are
+ \list
+ \o \l QDomElement
+ \o \l QDomProcessingInstruction
+ \o \l QDomComment
+ \o \l QDomText
+ \o \l QDomCDATASection
+ \o \l QDomEntityReference
+ \endlist
+ \o \l QDomElement: Possible children are
+ \list
+ \o \l QDomElement
+ \o \l QDomText
+ \o \l QDomComment
+ \o \l QDomProcessingInstruction
+ \o \l QDomCDATASection
+ \o \l QDomEntityReference
+ \endlist
+ \o \l QDomAttr: Possible children are
+ \list
+ \o \l QDomText
+ \o \l QDomEntityReference
+ \endlist
+ \o \l QDomProcessingInstruction: No children
+ \o \l QDomComment: No children
+ \o \l QDomText: No children
+ \o \l QDomCDATASection: No children
+ \o \l QDomEntity: Possible children are
+ \list
+ \o \l QDomElement
+ \o \l QDomProcessingInstruction
+ \o \l QDomComment
+ \o \l QDomText
+ \o \l QDomCDATASection
+ \o \l QDomEntityReference
+ \endlist
+ \o \l QDomNotation: No children
+ \endlist
+
+ With \l QDomNodeList and \l QDomNamedNodeMap two collection classes
+ are provided: \l QDomNodeList is a list of nodes,
+ and \l QDomNamedNodeMap is used to handle unordered sets of nodes
+ (often used for attributes).
+
+ The \l QDomImplementation class allows the user to query features of the
+ DOM implementation.
+
+ To get started please refer to the \l QDomDocument documentation.
+ You might also want to take a look at the \l{DOM Bookmarks example},
+ which illustrates how to read and write an XML bookmark file (XBEL)
+ using DOM.
+
+ \target namespaces
+ \section1 An Introduction to Namespaces
+
+ Parts of the Qt XML module documentation assume that you are familiar
+ with XML namespaces. Here we present a brief introduction; skip to
+ \link #namespacesConventions Qt XML documentation conventions \endlink
+ if you already know this material.
+
+ Namespaces are a concept introduced into XML to allow a more modular
+ design. With their help data processing software can easily resolve
+ naming conflicts in XML documents.
+
+ Consider the following example:
+
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 6
+
+ Here we find three different uses of the name \e title. If you wish to
+ process this document you will encounter problems because each of the
+ \e titles should be displayed in a different manner -- even though
+ they have the same name.
+
+ The solution would be to have some means of identifying the first
+ occurrence of \e title as the title of a book, i.e. to use the \e
+ title element of a book namespace to distinguish it from, for example,
+ the chapter title, e.g.:
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 7
+
+ \e book in this case is a \e prefix denoting the namespace.
+
+ Before we can apply a namespace to element or attribute names we must
+ declare it.
+
+ Namespaces are URIs like \e http://www.qtsoftware.com/fnord/book/. This
+ does not mean that data must be available at this address; the URI is
+ simply used to provide a unique name.
+
+ We declare namespaces in the same way as attributes; strictly speaking
+ they \e are attributes. To make for example \e
+ http://www.qtsoftware.com/fnord/ the document's default XML namespace \e
+ xmlns we write
+
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 8
+
+ To distinguish the \e http://www.qtsoftware.com/fnord/book/ namespace from
+ the default, we must supply it with a prefix:
+
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 9
+
+ A namespace that is declared like this can be applied to element and
+ attribute names by prepending the appropriate prefix and a ":"
+ delimiter. We have already seen this with the \e book:title element.
+
+ Element names without a prefix belong to the default namespace. This
+ rule does not apply to attributes: an attribute without a prefix does
+ not belong to any of the declared XML namespaces at all. Attributes
+ always belong to the "traditional" namespace of the element in which
+ they appear. A "traditional" namespace is not an XML namespace, it
+ simply means that all attribute names belonging to one element must be
+ different. Later we will see how to assign an XML namespace to an
+ attribute.
+
+ Due to the fact that attributes without prefixes are not in any XML
+ namespace there is no collision between the attribute \e title (that
+ belongs to the \e author element) and for example the \e title element
+ within a \e chapter.
+
+ Let's clarify this with an example:
+ \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 10
+
+ Within the \e document element we have two namespaces declared. The
+ default namespace \e http://www.qtsoftware.com/fnord/ applies to the \e
+ book element, the \e chapter element, the appropriate \e title element
+ and of course to \e document itself.
+
+ The \e book:author and \e book:title elements belong to the namespace
+ with the URI \e http://www.qtsoftware.com/fnord/book/.
+
+ The two \e book:author attributes \e title and \e name have no XML
+ namespace assigned. They are only members of the "traditional"
+ namespace of the element \e book:author, meaning that for example two
+ \e title attributes in \e book:author are forbidden.
+
+ In the above example we circumvent the last rule by adding a \e title
+ attribute from the \e http://www.qtsoftware.com/fnord/ namespace to \e
+ book:author: the \e fnord:title comes from the namespace with the
+ prefix \e fnord that is declared in the \e book:author element.
+
+ Clearly the \e fnord namespace has the same namespace URI as the
+ default namespace. So why didn't we simply use the default namespace
+ we'd already declared? The answer is quite complex:
+ \list
+ \o attributes without a prefix don't belong to any XML namespace at
+ all, not even to the default namespace;
+ \o additionally omitting the prefix would lead to a \e title-title clash;
+ \o writing it as \e xmlns:title would declare a new namespace with the
+ prefix \e title instead of applying the default \e xmlns namespace.
+ \endlist
+
+ With the Qt XML classes elements and attributes can be accessed in two
+ ways: either by refering to their qualified names consisting of the
+ namespace prefix and the "real" name (or \e local name) or by the
+ combination of local name and namespace URI.
+
+ More information on XML namespaces can be found at
+ \l http://www.w3.org/TR/REC-xml-names/.
+
+
+ \target namespacesConventions
+ \section2 Conventions Used in the Qt XML Documentation
+
+ The following terms are used to distinguish the parts of names within
+ the context of namespaces:
+ \list
+ \o The \e {qualified name}
+ is the name as it appears in the document. (In the above example \e
+ book:title is a qualified name.)
+ \o A \e {namespace prefix} in a qualified name
+ is the part to the left of the ":". (\e book is the namespace prefix in
+ \e book:title.)
+ \o The \e {local part} of a name (also refered to as the \e {local
+ name}) appears to the right of the ":". (Thus \e title is the
+ local part of \e book:title.)
+ \o The \e {namespace URI} ("Uniform Resource Identifier") is a unique
+ identifier for a namespace. It looks like a URL
+ (e.g. \e http://www.qtsoftware.com/fnord/ ) but does not require
+ data to be accessible by the given protocol at the named address.
+ \endlist
+
+ Elements without a ":" (like \e chapter in the example) do not have a
+ namespace prefix. In this case the local part and the qualified name
+ are identical (i.e. \e chapter).
+
+ \sa {DOM Bookmarks Example}, {SAX Bookmarks Example}
+*/
diff --git a/doc/src/qtxmlpatterns.qdoc b/doc/src/qtxmlpatterns.qdoc
new file mode 100644
index 0000000..cb260fc
--- /dev/null
+++ b/doc/src/qtxmlpatterns.qdoc
@@ -0,0 +1,893 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtXmlPatterns
+ \title QtXmlPatterns Module
+ \since 4.4
+ \contentspage Qt's Modules
+ \previouspage QtXml
+ \nextpage Phonon Module
+ \ingroup modules
+ \ingroup scripting
+
+ \keyword Patternist
+
+ \brief An overview of Qt's support for using XQuery and XPath in
+ Qt programs.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ XQuery is a language for traversing XML documents to select and
+ aggregate items of interest and to transform them for output as
+ XML or some other format. XPath is the \e{element selection} part
+ of XQuery.
+
+ The QtXmlPatterns module supports using
+ \l{http://www.w3.org/TR/xquery} {XQuery 1.0} and
+ \l{http://www.w3.org/TR/xpath20} {XPath 2.0} in Qt applications,
+ for querying XML data \e{and} for querying
+ \l{QAbstractXmlNodeModel} {non-XML data that can be modeled to
+ look like XML}. The QtXmlPatterns module is included in the \l{Qt
+ Full Framework Edition}, and the \l{Open Source Versions of Qt}.
+ Readers who are not familiar with the XQuery/XPath language can read
+ \l {A Short Path to XQuery} for a brief introduction.
+
+ \section1 Advantages of using QtXmlPatterns and XQuery
+
+ The XQuery/XPath language simplifies data searching and
+ transformation tasks by eliminating the need for doing a lot of
+ C++ or Java procedural programming for each new query task. Here
+ is an XQuery that constructs a bibliography of the contents of a
+ library:
+
+ \target qtxmlpatterns_example_query
+ \quotefile snippets/patternist/introductionExample.xq
+
+ First, the query opens a \c{<bibliography>} element in the
+ output. The
+ \l{xquery-introduction.html#using-path-expressions-to-match-select-items}
+ {embedded path expression} then loads the XML document describing
+ the contents of the library (\c{library.xml}) and begins the
+ search. For each \c{<book>} element it finds, where the publisher
+ was Addison-Wesley and the publication year was after 1991, it
+ creates a new \c{<book>} element in the output as a child of the
+ open \c{<bibliography>} element. Each new \c{<book>} element gets
+ the book's title as its contents and the book's publication year
+ as an attribute. Finally, the \c{<bibliography>} element is
+ closed.
+
+ The advantages of using QtXmlPatterns and XQuery in your Qt
+ programs are summarized as follows:
+
+ \list
+
+ \o \bold{Ease of development}: All the C++ programming required to
+ perform data query tasks can be replaced by a simple XQuery
+ like the example above.
+
+ \o \bold{Comprehensive functionality}: The
+ \l{http://www.w3.org/TR/xquery/#id-expressions} {expression
+ syntax} and rich set of
+ \l{http://www.w3.org/TR/xpath-functions} {functions and
+ operators} provided by XQuery are sufficient for performing any
+ data searching, selecting, and sorting tasks.
+
+ \o \bold{Conformance to standards}: Conformance to all applicable
+ XML and XQuery standards ensures that QtXmlPatterns can always
+ process XML documents generated by other conformant
+ applications, and that XML documents created with QtXmlPatterns
+ can be processed by other conformant applications.
+
+ \o \bold{Maximal flexibility} The QtXmlPatterns module can be used
+ to query XML data \e{and} non-XML data that can be
+ \l{QAbstractXmlNodeModel} {modeled to look like XML}.
+
+ \endlist
+
+ \section1 Using the QtXmlPatterns module
+
+ There are two ways QtXmlPatterns can be used to evaluate queries.
+ You can run the query engine in your Qt application using the
+ QtXmlPatterns C++ API, or you can run the query engine from the
+ command line using Qt's \c{xmlpatterns} command line utility.
+
+ \section2 Running the query engine from your Qt application
+
+ To access the QtXmlPatterns C++ API from your Qt application,
+ include the QtXmlPatterns classes at compile time:
+
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 0
+
+ Link the compiled application with the QtXmlPatterns module by
+ adding the following line to the
+ \l{qmake-project-files.html#declaring-qt-libraries} {QT line} in
+ your qmake \c{.pro} file:
+
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
+
+ If we save the example XQuery shown above in a text file (e.g.
+ \c{myquery.xq}), we can run it from a Qt application using a
+ standard QtXmlPatterns code sequence:
+
+ \snippet doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp 3
+
+ First construct a QFile for the text file containing the XQuery
+ (\c{myquery.xq}). Then create an instance of QXmlQuery and call
+ its \l{QXmlQuery::}{setQuery()} function to load and parse the
+ XQuery file. Then create an \l{QXmlSerializer} {XML serializer} to
+ output the query's result set as unformatted XML. Finally, call
+ the \l{QXmlQuery::}{evaluateTo()} function to evaluate the query
+ and serialize the results as XML.
+
+ \note If you compile Qt yourself, the QtXmlPatterns module will
+ \e{not} be built if exceptions are disabled, or if you compile Qt
+ with a compiler that doesn't support member templates, e.g., MSVC
+ 6.
+
+ See the QXmlQuery documentation for more information about the
+ QtXmlPatterns C++ API.
+
+ \section2 Running the query engine from the command line utility
+
+ \e xmlpatterns is a command line utility for running XQueries. It
+ expects the name of a file containing the XQuery text.
+
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 2
+
+ The XQuery in \c{myQuery.xq} will be evaluated and its output
+ written to \c stdout. Pass the \c -help switch to get the list of
+ input flags and their meanings.
+
+ xmlpatterns can be used in scripting. However, the descriptions
+ and messages it outputs were not meant to be parsed and may be
+ changed in future releases of Qt.
+
+ \target QtXDM
+ \section1 The XQuery Data Model
+
+ XQuery represents data items as \e{atomic values} or \e{nodes}. An
+ atomic value is a value in the domain of one of the
+ \l{http://www.w3.org/TR/xmlschema-2/#built-in-datatypes} {built-in
+ datatypes} defined in \l{http://www.w3.org/TR/xmlschema-2} {Part
+ 2} of the W3C XML Schema. A node is normally an XML element or
+ attribute, but when non-XML data is \l{QAbstractXmlNodeModel}
+ {modeled to look like XML}, a node can also represent a non-XML
+ data items.
+
+ When you run an XQuery using the C++ API in a Qt application, you
+ will often want to bind program variables to $variables in the
+ XQuery. After the query is evaluated, you will want to interpret
+ the sequence of data items in the result set.
+
+ \section2 Binding program variables to XQuery variables
+
+ When you want to run a parameterized XQuery from your Qt
+ application, you will need to \l{QXmlQuery::bindVariable()} {bind
+ variables} in your program to $name variables in your XQuery.
+
+ Suppose you want to parameterize the bibliography XQuery in the
+ example above. You could define variables for the catalog that
+ contains the library (\c{$file}), the publisher name
+ (\c{$publisher}), and the year of publication (\c{$year}):
+
+ \target qtxmlpatterns_example_query2
+ \quotefile snippets/patternist/introExample2.xq
+
+ Modify the QtXmlPatterns code to use one of the \l{QXmlQuery::}
+ {bindVariable()} functions to bind a program variable to each
+ XQuery $variable:
+
+ \snippet doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp 4
+
+ Each program variable is passed to QtXmlPatterns as a QVariant of
+ the type of the C++ variable or constant from which it is
+ constructed. Note that QtXmlPatterns assumes that the type of the
+ QVariant in the bindVariable() call is the correct type, so the
+ $variable it is bound to must be used in the XQuery accordingly.
+ The following table shows how QVariant types are mapped to XQuery
+ $variable types:
+
+ \table
+
+ \header
+ \o QVariant type
+ \o XQuery $variable type
+
+ \row
+ \o QVariant::LongLong
+ \o \c xs:integer
+
+ \row
+ \o QVariant::Int
+ \o \c xs:integer
+
+ \row
+ \o QVariant::UInt
+ \o \c xs:nonNegativeInteger
+
+ \row
+ \o QVariant::ULongLong
+ \o \c xs:unsignedLong
+
+ \row
+ \o QVariant::String
+ \o \c xs:string
+
+ \row
+ \o QVariant::Double
+ \o \c xs:double
+
+ \row
+ \o QVariant::Bool
+ \o \c xs:boolean
+
+ \row
+ \o QVariant::Double
+ \o \c xs:decimal
+
+ \row
+ \o QVariant::ByteArray
+ \o \c xs:base64Binary
+
+ \row
+ \o QVariant::StringList
+ \o \c xs:string*
+
+ \row
+ \o QVariant::Url
+ \o \c xs:string
+
+ \row
+ \o QVariant::Date
+ \o \c xs:date.
+
+ \row
+ \o QVariant::DateTime
+ \o \c xs:dateTime
+
+ \row
+ \o QVariant::Time.
+ \o \c xs:time. (see \l{Binding To Time}{Binding To
+ QVariant::Time} below)
+
+ \row
+ \o QVariantList
+ \o (see \l{Binding To QVariantList}{Binding To QVariantList}
+ below)
+
+ \endtable
+
+ A type not shown in the table is not supported and will cause
+ undefined XQuery behavior or a $variable binding error, depending
+ on the context in the XQuery where the variable is used.
+
+ \target Binding To Time
+ \section3 Binding To QVariant::Time
+
+ Because the instance of QTime used in QVariant::Time does not
+ include a zone offset, an instance of QVariant::Time should not be
+ bound to an XQuery variable of type \c xs:time, unless the QTime is
+ UTC. When binding a non-UTC QTime to an XQuery variable, it should
+ first be passed as a string, or converted to a QDateTime with an arbitrary
+ date, and then bound to an XQuery variable of type \c xs:dateTime.
+
+ \target Binding To QVariantList
+ \section3 Binding To QVariantList
+
+ A QVariantList can be bound to an XQuery $variable. All the
+ \l{QVariant}s in the list must be of the same atomic type, and the
+ $variable the variant list is bound to must be of that same atomic
+ type. If the QVariants in the list are not all of the same atomic
+ type, the XQuery behavior is undefined.
+
+ \section2 Interpreting XQuery results
+
+ When the results of an XQuery are returned in a sequence of \l
+ {QXmlResultItems} {result items}, atomic values in the sequence
+ are treated as instances of QVariant. Suppose that instead of
+ serializing the results of the XQuery as XML, we process the
+ results programatically. Modify the standard QtXmlPatterns code
+ sequence to call the overload of QXmlQuery::evaluateTo() that
+ populates a sequence of \l {QXmlResultItems} {result items} with
+ the XQuery results:
+
+ \snippet doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp 5
+
+ Iterate through the \l {QXmlResultItems} {result items} and test
+ each QXmlItem to see if it is an atomic value or a node. If it is
+ an atomic value, convert it to a QVariant with \l {QXmlItem::}
+ {toAtomicValue()} and switch on its \l {QVariant::type()} {variant
+ type} to handle all the atomic values your XQuery might return.
+ The following table shows the QVariant type to expect for each
+ atomic value type (or QXmlName):
+
+ \table
+
+ \header
+ \o XQuery result item type
+ \o QVariant type returned
+
+ \row
+ \o \c xs:QName
+ \o QXmlName (see \l{Handling QXmlNames}{Handling QXmlNames}
+ below)
+
+ \row
+ \o \c xs:integer
+ \o QVariant::LongLong
+
+ \row
+ \o \c xs:string
+ \o QVariant::String
+
+ \row
+ \o \c xs:string*
+ \o QVariant::StringList
+
+ \row
+ \o \c xs:double
+ \o QVariant::Double
+
+ \row
+ \o \c xs:float
+ \o QVariant::Double
+
+ \row
+ \o \c xs:boolean
+ \o QVariant::Bool
+
+ \row
+ \o \c xs:decimal
+ \o QVariant::Double
+
+ \row
+ \o \c xs:hexBinary
+ \o QVariant::ByteArray
+
+ \row
+ \o \c xs:base64Binary
+ \o QVariant::ByteArray
+
+ \row
+ \o \c xs:gYear
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:gYearMonth
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:gMonthDay
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:gDay
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:gMonth
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:anyURI
+ \o QVariant::Url
+
+ \row
+ \o \c xs:untypedAtomic
+ \o QVariant::String
+
+ \row
+ \o \c xs:ENTITY
+ \o QVariant::String
+
+ \row
+ \o \c xs:date
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:dateTime
+ \o QVariant::DateTime
+
+ \row
+ \o \c xs:time
+ \o (see \l{xstime-not-mapped}{No mapping for xs:time} below)
+
+ \endtable
+
+ \target Handling QXmlNames
+ \section3 Handling QXmlNames
+
+ If your XQuery can return atomic value items of type \c{xs:QName},
+ they will appear in your QXmlResultItems as instances of QXmlName.
+ Since the QVariant class does not support the QXmlName class
+ directly, extracting them from QXmlResultItems requires a bit of
+ slight-of-hand using the \l{QMetaType} {Qt metatype system}. We
+ must modify our example to use a couple of template functions, a
+ friend of QMetaType (qMetaTypeId<T>()) and a friend of QVariant
+ (qVariantValue<T>()):
+
+ \snippet doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp 6
+
+ To access the strings in a QXmlName returned by an
+ \l{QXmlQuery::evaluateTo()} {XQuery evaluation}, the QXmlName must
+ be accessed with the \l{QXmlNamePool} {name pool} from the
+ instance of QXmlQuery that was used for the evaluation.
+
+ \target xstime-not-mapped
+ \section3 No mapping for xs:time
+
+ An instance of \c xs:time can't be represented correctly as an
+ instance of QVariant::Time, unless the \c xs:time is a UTC time.
+ This is because xs:time has a zone offset (0 for UTC) in addition
+ to the time value, which the QTime in QVariant::Time does not
+ have. This means that if an XQuery tries to return an atomic value
+ of type \c xs:time, an invalid QVariant will be returned. A query
+ can return an atomic value of type xs:time by either converting it
+ to an \c xs:dateTime with an arbitrary date, or to an \c xs:string.
+
+ \section1 Using XQuery with Non-XML Data
+
+ Although the XQuery language was designed for querying XML, with
+ QtXmlPatterns one can use XQuery for querying any data that can
+ be modeled to look like XML. Non-XML data is modeled to look like
+ XML by loading it into a custom subclass of QAbstractXmlNodeModel,
+ where it is then presented to the QtXmlPatterns XQuery engine via
+ the same API the XQuery engine uses for querying XML.
+
+ When QtXmlPatterns loads and queries XML files and produces XML
+ output, it can always load the XML data into its default XML node
+ model, where it can be traversed efficiently. The XQuery below
+ traverses the product orders found in the XML file \e myOrders.xml
+ to find all the skin care product orders and output them ordered
+ by shipping date.
+
+ \quotefile snippets/patternist/introAcneRemover.xq
+
+ QtXmlPatterns can be used out of the box to perform this
+ query, provided \e myOrders.xml actually contains well-formed XML. It
+ can be loaded directly into the default XML node model and
+ traversed. But suppose we want QtXmlPatterns to perform queries on
+ the hierarchical structure of the local file system. The default
+ XML node model in QtXmlPatterns is not suitable for navigating the
+ file system, because there is no XML file to load that contains a
+ description of it. Such an XML file, if it existed, might look
+ something like this:
+
+ \quotefile snippets/patternist/introFileHierarchy.xml
+
+ The \l{File System Example}{File System Example} does exactly this.
+
+ There is no such file to load into the default XML node model, but
+ one can write a subclass of QAbstractXmlNodeModel to represent the
+ file system. This custom XML node model, once populated with all
+ the directory and file descriptors obtained directly from the
+ system, presents the complete file system hierarchy to the query
+ engine via the same API used by the default XML node model to
+ present the contents of an XML file. In other words, once the
+ custom XML node model is populated, it presents the file system to
+ the query engine as if a description of it had been loaded into
+ the default XML node model from an XML file like the one shown
+ above.
+
+ Now we can write an XQuery to find all the XML files and parse
+ them to find the ones that don't contain well-formed XML.
+
+ \quotefromfile snippets/patternist/introNavigateFS.xq
+ \skipto <html>
+ \printuntil
+
+ Without QtXmlPatterns, there is no simple way to solve this kind
+ of problem. You might do it by writing a C++ program to traverse
+ the file system, sniff out all the XML files, and submit each one
+ to an XML parser to test that it contains valid XML. The C++ code
+ required to write that program will probably be more complex than
+ the C++ code required to subclass QAbstractXmlNodeModel, but even
+ if the two are comparable, your custom C++ program can be used
+ only for that one task, while your custom XML node model can be
+ used by any XQuery that must navigate the file system.
+
+ The general approach to using XQuery to perform queries on non-XML
+ data has been a three step process. In the first step, the data is
+ loaded into a non-XML data model. In the second step, the non-XML
+ data model is serialized as XML and output to XML (text) files. In
+ the final step, an XML tool loads the XML files into a second, XML
+ data model, where the XQueries can be performed. The development
+ cost of implementing this process is often high, and the three
+ step system that results is inefficient because the two data
+ models must be built and maintained separately.
+
+ With QtXmlPatterns, subclassing QAbstractXmlNodeModel eliminates
+ the transformation required to convert the non-XML data model to
+ the XML data model, because there is only ever one data model
+ required. The non-XML data model presents the non-XML data to the
+ query engine via the XML data model API. Also, since the query
+ engine uses the API to access the QAbstractXmlNodeModel, the data
+ model subclass can construct the elements, attributes and other
+ data on demand, responding to the query's specific requests. This
+ can greatly improve efficiency, because it means the entire model
+ might not have to be built. For example, in the file system model
+ above, it is not necessary to build an instance for a whole
+ XML file representing the whole file system. Instead nodes are
+ created on demand, which also likely is a small subset of the file
+ system.
+
+ Examples of other places where XQuery could be used in
+ QtXmlPatterns to query non-XML data:
+
+ \list
+
+ \o The internal representation for word processor documents
+
+ \o The set of dependencies for a software build system
+
+ \o The hierarchy (or graph) that links a set of HTML documents
+ from a web crawler
+
+ \o The images and meta-data in an image collection
+
+ \o The set of D-Bus interfaces available in a system
+
+ \o A QObject hierarchy, as seen in the \l{QObject XML Model
+ Example} {QObject XML Model example}.
+
+ \endlist
+
+ See the QAbstractXmlNodeModel documentation for information about
+ how to implement custom XML node models.
+
+ \section1 More on using QtXmlPatterns with non-XML Data
+
+ Subclassing QAbstractXmlNodeModel to let the query engine access
+ non-XML data by the same API it uses for XML is the feature that
+ enables QtXmlPatterns to query non-XML data with XQuery. It allows
+ XQuery to be used as a mapping layer between different non-XML
+ node models or between a non-XML node model and the built-in XML
+ node model. Once the subclass(es) of QAbstractXmlNodeModel have
+ been written, XQuery can be used to select a set of elements from
+ one node model, transform the selected elements, and then write
+ them out, either as XML using QXmlQuery::evaluateTo() and QXmlSerializer,
+ or as some other format using a subclass of QAbstractXmlReceiver.
+
+ Consider a word processor application that must import and export
+ data in several different formats. Rather than writing a lot of
+ C++ code to convert each input format to an intermediate form, and
+ more C++ code to convert the intermediate form back to each
+ output format, one can implement a solution based on QtXmlPatterns
+ that uses simple XQueries to transform each XML or non-XML format
+ (e.g. MathFormula.xml below) to the intermediate form (e.g. the
+ DocumentRepresentation node model class below), and more simple
+ XQueries to transform the intermediate form back to each XML or
+ non-XML format.
+
+ \image patternist-wordProcessor.png
+
+ Because CSV files are not XML, a subclass of QAbstractXmlNodeModel
+ is used to present the CSV data to the XQuery engine as if it were
+ XML. What are not shown are the subclasses of QAbstractXmlReceiver
+ that would then send the selected elements into the
+ DocumentRepresentation node model, and the subclasses of
+ QAbstractXmlNodeModel that would ultimately write the output files
+ in each format.
+
+ \section1 Security Considerations
+
+ \section2 Code Injection
+
+ XQuery is vulnerable to
+ \l{http://en.wikipedia.org/wiki/Code_injection} {code injection
+ attacks} in the same way as the SQL language. If an XQuery is
+ constructed by concatenating strings, and the strings come from
+ user input, the constructed XQuery could be malevolent. The best
+ way to prevent code injection attacks is to not construct XQueries
+ from user-written strings, but only accept user data input using
+ QVariant and variable bindings. See QXmlQuery::bindVariable().
+
+ The articles
+ \l{http://www.ibm.com/developerworks/xml/library/x-xpathinjection.html}
+ {Avoid the dangers of XPath injection}, by Robi Sen and
+ \l{http://www.packetstormsecurity.org/papers/bypass/Blind_XPath_Injection_20040518.pdf}
+ {Blind XPath Injection}, by Amit Klein, discuss the XQuery code
+ injection problem in more detail.
+
+ \section2 Denial of Service Attacks
+
+ Applications using QtXmlPatterns are subject to the same
+ limitations of software as other systems. Generally, these can not
+ be checked. This means QtXmlPatterns does not prevent rogue
+ queries from consuming too many resources. For example, a query
+ could take too much time to execute or try to transfer too much
+ data. A query could also do too much recursion, which could crash
+ the system. XQueries can do these things accidentally, but they
+ can also be done as deliberate denial of service attacks.
+
+ \section1 Features and Conformance
+
+ \section2 XQuery 1.0
+
+ QtXmlPatterns aims at being a
+ \l{http://www.w3.org/TR/xquery/#id-xquery-conformance} {conformant
+ XQuery processor}. It adheres to
+ \l{http://www.w3.org/TR/xquery/#id-minimal-conformance} {Minimal
+ Conformance} and supports the
+ \l{http://www.w3.org/TR/xquery/#id-serialization-feature}
+ {Serialization Feature} and the
+ \l{http://www.w3.org/TR/xquery/#id-full-axis-feature} {Full Axis
+ Feature}. QtXmlPatterns currently passes 97% of the tests in the
+ \l{http://www.w3.org/XML/Query/test-suite} {XML Query Test Suite}.
+ Areas where conformance may be questionable and where behavior may
+ be changed in future releases include:
+
+ \list
+
+ \o Some corner cases involving namespaces and element constructors
+ are incorrect.
+
+ \o XPath is a subset of XQuery and the implementation of
+ QtXmlPatterns uses XPath 2.0 with XQuery 1.0.
+
+ \endlist
+
+ The specifications discusses conformance further:
+ \l{http://www.w3.org/TR/xquery/}{XQuery 1.0: An XML Query
+ Language}. W3C's XQuery testing effort can be of interest as
+ well, \l{http://www.w3.org/XML/Query/test-suite/}{XML Query Test
+ Suite}.
+
+ Currently \c fn:collection() does not access any data set, and
+ there is no API for providing data through the collection. As a
+ result, evaluating \c fn:collection() returns the empty
+ sequence. We intend to provide functionality for this in a future
+ release of Qt.
+
+ Only queries encoded in UTF-8 are supported.
+
+ \section2 XSLT 2.0
+
+ Partial support for XSLT was introduced in Qt 4.5. Future
+ releases of QtXmlPatterns will aim to support these XSLT
+ features:
+
+ \list
+ \o Basic XSLT 2.0 processor
+ \o Serialization feature
+ \o Backwards Compatibility feature
+ \endlist
+
+ For details, see \l{http://www.w3.org/TR/xslt20/#conformance}{XSL
+ Transformations (XSLT) Version 2.0, 21 Conformance}.
+
+ \note In this release, XSLT support is considered experimental.
+
+ Unsupported or partially supported XSLT features are documented
+ in the following table. The implementation of XSLT in Qt 4.5 can
+ be seen as XSLT 1.0 but with the data model of XPath 2.0 and
+ XSLT 2.0, and using the using the functionality of XPath 2.0 and
+ its accompanying function library. When QtXmlPatterns encounters
+ an unsupported or partially support feature, it will either report
+ a syntax error or silently continue, unless otherwise noted in the
+ table.
+
+ The implementation currently passes 42% of W3C's XSLT test suite,
+ which focus on features introduced in XSLT 2.0.
+
+ \table
+ \header
+ \o XSL Feature
+ \o Support Status
+ \row
+ \o \c xsl:key and \c fn:key()
+ \o not supported
+ \row
+ \o \c xsl:include
+ \o not supported
+ \row
+ \o \c xsl:import
+ \o not supported
+ \row
+ \o \c xsl:copy
+
+ \o The \c copy-namespaces and \c inherit-namespaces attributes
+ have no effect. For copied comments, attributes and
+ processing instructions, the copy has the same node
+ identity as the original.
+
+ \row
+ \o \c xsl:copy-of
+ \o The \c copy-namespaces attribute has no effect.
+ \row
+ \o \c fn:format-number()
+ \o not supported
+ \row
+ \o \c xsl:message
+ \o not supported
+ \row
+ \o \c xsl:use-when
+ \o not supported
+ \row
+ \o \c Tunnel Parameters
+ \o not supported
+ \row
+ \o \c xsl:attribute-set
+ \o not supported
+ \row
+ \o \c xsl:decimal-format
+ \o not supported
+ \row
+ \o \c xsl:fallback
+ \o not supported
+ \row
+ \o \c xsl:apply-imports
+ \o not supported
+ \row
+ \o \c xsl:character-map
+ \o not supported
+ \row
+ \o \c xsl:number
+ \o not supported
+ \row
+ \o \c xsl:namespace-alias
+ \o not supported
+ \row
+ \o \c xsl:output
+ \o not supported
+ \row
+ \o \c xsl:output-character
+ \o not supported
+ \row
+ \o \c xsl:preserve-space
+ \o not supported
+ \row
+ \o \c xsl:result-document
+ \o not supported
+ \row
+ \o Patterns
+ \o Complex patterns or patterns with predicates have issues.
+ \row
+ \o \c 2.0 Compatibility Mode
+
+ \o Stylesheets are interpreted as XSLT 2.0 stylesheets, even
+ if the \c version attribute is in the XSLT source is
+ 1.0. In other words, the version attribute is ignored.
+
+ \row
+ \o Grouping
+
+ \o \c fn:current-group(), \c fn:grouping-key() and \c
+ xsl:for-each-group.
+
+ \row
+ \o Regexp elements
+ \o \c xsl:analyze-string, \c xsl:matching-substring,
+ \c xsl:non-matching-substring, and \c fn:regex-group()
+ \row
+ \o Date & Time formatting
+ \o \c fn:format-dateTime(), \c fn:format-date() and fn:format-time().
+
+ \row
+ \o XPath Conformance
+ \o Since XPath is a subset of XSLT, its issues are in affect too.
+ \endtable
+
+ The QtXmlPatterns implementation of the XPath Data Model does not
+ include entities (due to QXmlStreamReader not reporting them).
+ This means that functions \c unparsed-entity-uri() and \c
+ unparsed-entity-public-id() always return negatively.
+
+ \section2 XPath 2.0
+
+ Since XPath 2.0 is a subset of XQuery 1.0, XPath 2.0 is
+ supported. Areas where conformance may be questionable and,
+ consequently, where behavior may be changed in future releases
+ include:
+
+ \list
+ \o Regular expression support is currently not conformant
+ but follows Qt's QRegExp standard syntax.
+
+ \o Operators for \c xs:time, \c xs:date, and \c xs:dateTime
+ are incomplete.
+
+ \o Formatting of very large or very small \c xs:double, \c
+ xs:float, and \c xs:decimal values may be incorrect.
+ \endlist
+
+ \section2 xml:id
+
+ Processing of XML files supports \c xml:id. This allows elements
+ that have an attribute named \c xml:id to be looked up efficiently
+ with the \c fn:id() function. See
+ \l{http://www.w3.org/TR/xml-id/}{xml:id Version 1.0} for details.
+
+ \section2 Resource Loading
+
+ When QtXmlPatterns loads an XML resource, e.g., using the
+ \c fn:doc() function, the following schemes are supported:
+
+ \table
+ \header
+ \o Scheme Name
+ \o Description
+ \row
+ \o \c file
+ \o Local files.
+ \row
+ \o \c data
+
+ \o The bytes are encoded in the URI itself. e.g., \c
+ data:application/xml,%3Ce%2F%3E is \c <e/>.
+
+ \row
+ \o \c ftp
+ \o Resources retrieved via FTP.
+ \row
+ \o \c http
+ \o Resources retrieved via HTTP.
+ \row
+ \o \c https
+ \o Resources retrieved via HTTPS. This will succeed if no SSL
+ errors are encountered.
+ \row
+ \o \c qrc
+ \o Qt Resource files. Expressing it as an empty scheme, :/...,
+ is not supported.
+
+ \endtable
+
+ \section2 XML
+
+ XML 1.0 and XML Namespaces 1.0 are supported, as opposed to the
+ 1.1 versions. When a strings is passed to a query as a QString,
+ the characters must be XML 1.0 characters. Otherwise, the behavior
+ is undefined. This is not checked.
+
+ URIs are first passed to QAbstractUriResolver. Check
+ QXmlQuery::setUriResolver() for possible rewrites.
+
+*/
+
+/*!
+ \namespace QPatternist
+ \brief The QPatternist namespace contains classes and functions required by the QtXmlPatterns module.
+ \internal
+*/
diff --git a/doc/src/qundo.qdoc b/doc/src/qundo.qdoc
new file mode 100644
index 0000000..5358c12
--- /dev/null
+++ b/doc/src/qundo.qdoc
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qundo.html
+\title Overview of Qt's Undo Framework
+\keyword Undo framework
+\ingroup architecture
+
+\section1 Introduction
+
+Qt's Undo Framework is an implementation of the Command pattern, for
+implementing undo/redo functionality in applications.
+
+The Command pattern is based on the idea that all editing in
+an application is done by creating instances of command objects.
+Command objects apply changes to the document and are stored
+on a command stack. Furthermore, each command knows how to undo its
+changes to bring the document back to its previous state. As long
+as the application only uses command objects to change the state of
+the document, it is possible to undo a sequence of commands by
+traversing the stack downwards and calling undo
+on each command in turn. It is also possible to redo a sequence of
+commands by traversing the stack upwards and calling
+redo on each command.
+
+\section1 Classes
+
+The framework consists of four classes:
+
+\list
+\i \l QUndoCommand is the base class of all commands stored on an
+ undo stack. It can apply (redo) or undo a single change in the document.
+\i \l QUndoStack is a list of QUndoCommand objects. It contains all the
+ commands executed on the document and can roll the document's state
+ backwards or forwards by undoing or redoing them.
+\i \l QUndoGroup is a group of undo stacks. It is useful when an application
+ contains more than one undo stack, typically one for each opened
+ document. QUndoGroup provides a single pair of undo/redo slots for all
+ the stacks in the group. It forwards undo and redo requests to
+ the active stack, which is the stack associated with the document that
+ is currently being edited by the user.
+\i \l QUndoView is a widget which shows the contents of an undo stack. Clicking
+ on a command in the view rolls the document's state backwards or
+ forwards to that command.
+\endlist
+
+\section1 Concepts
+
+The following concepts are supported by the framework:
+
+\list
+\i \bold{Clean state:} Used to signal when the document enters and leaves a
+ state that has been saved to disk. This is typically used to disable or
+ enable the save actions, and to update the document's title bar.
+\i \bold{Command compression:} Used to compress sequences of commands into a
+ single command.
+ For example: In a text editor, the commands that insert individual
+ characters into the document can be compressed into a single command that
+ inserts whole sections of text. These bigger changes are more convenient
+ for the user to undo and redo.
+\i \bold{Command macros:} A sequence of commands, all of which are undone or
+ redone in one step.
+ These simplify the task of writing an application, since a set of simpler
+ commands can be composed into more complex commands. For example, a command
+ that moves a set of selected objects in a document can be created by
+ combining a set of commands, each of which moves a single object.
+\endlist
+
+QUndoStack provides convenient undo and redo QAction objects that
+can be inserted into a menu or a toolbar. The text properties of these
+actions always reflect what command will be undone or redone when
+they are triggered. Similarly, QUndoGroup provides undo and redo actions
+that always behave like the undo and redo actions of the active stack.
+*/
diff --git a/doc/src/qvarlengtharray.qdoc b/doc/src/qvarlengtharray.qdoc
new file mode 100644
index 0000000..6513b3e
--- /dev/null
+++ b/doc/src/qvarlengtharray.qdoc
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QVarLengthArray
+ \brief The QVarLengthArray class provides a low-level variable-length array.
+
+ \ingroup tools
+ \reentrant
+
+ The C++ language doesn't support variable-length arrays on the stack.
+ For example, the following code won't compile:
+
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 0
+
+ The alternative is to allocate the array on the heap (with
+ \c{new}):
+
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 1
+
+ However, if myfunc() is called very frequently from the
+ application's inner loop, heap allocation can be a major source
+ of slowdown.
+
+ QVarLengthArray is an attempt to work around this gap in the C++
+ language. It allocates a certain number of elements on the stack,
+ and if you resize the array to a larger size, it automatically
+ uses the heap instead. Stack allocation has the advantage that
+ it is much faster than heap allocation.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 2
+
+ In the example above, QVarLengthArray will preallocate 1024
+ elements on the stack and use them unless \c{n + 1} is greater
+ than 1024. If you omit the second template argument,
+ QVarLengthArray's default of 256 is used.
+
+ QVarLengthArray's value type must be an \l{assignable data type}.
+ This covers most data types that are commonly used, but the
+ compiler won't let you, for example, store a QWidget as a value;
+ instead, store a QWidget *.
+
+ QVarLengthArray, like QVector, provides a resizable array data
+ structure. The main differences between the two classes are:
+
+ \list
+ \o QVarLengthArray's API is much more low-level. It provides no
+ iterators and lacks much of QVector's functionality.
+
+ \o QVarLengthArray doesn't initialize the memory if the value is
+ a basic type. (QVector always does.)
+
+ \o QVector uses \l{implicit sharing} as a memory optimization.
+ QVarLengthArray doesn't provide that feature; however, it
+ usually produces slightly better performance due to reduced
+ overhead, especially in tight loops.
+ \endlist
+
+ In summary, QVarLengthArray is a low-level optimization class
+ that only makes sense in very specific cases. It is used a few
+ places inside Qt and was added to Qt's public API for the
+ convenience of advanced users.
+
+ \sa QVector, QList, QLinkedList
+*/
+
+/*! \fn QVarLengthArray::QVarLengthArray(int size)
+
+ Constructs an array with an initial size of \a size elements.
+
+ If the value type is a primitive type (e.g., char, int, float) or
+ a pointer type (e.g., QWidget *), the elements are not
+ initialized. For other types, the elements are initialized with a
+ \l{default-constructed value}.
+*/
+
+/*! \fn QVarLengthArray::~QVarLengthArray()
+
+ Destroys the array.
+*/
+
+/*! \fn int QVarLengthArray::size() const
+
+ Returns the number of elements in the array.
+
+ \sa isEmpty(), resize()
+*/
+
+/*! \fn int QVarLengthArray::count() const
+
+ Same as size().
+
+ \sa isEmpty(), resize()
+*/
+
+/*! \fn bool QVarLengthArray::isEmpty() const
+
+ Returns true if the array has size 0; otherwise returns false.
+
+ \sa size(), resize()
+*/
+
+/*! \fn void QVarLengthArray::clear()
+
+ Removes all the elements from the array.
+
+ Same as resize(0).
+*/
+
+/*! \fn void QVarLengthArray::resize(int size)
+
+ Sets the size of the array to \a size. If \a size is greater than
+ the current size, elements are added to the end. If \a size is
+ less than the current size, elements are removed from the end.
+
+ If the value type is a primitive type (e.g., char, int, float) or
+ a pointer type (e.g., QWidget *), new elements are not
+ initialized. For other types, the elements are initialized with a
+ \l{default-constructed value}.
+
+ \sa size()
+*/
+
+/*! \fn int QVarLengthArray::capacity() const
+
+ Returns the maximum number of elements that can be stored in the
+ array without forcing a reallocation.
+
+ The sole purpose of this function is to provide a means of fine
+ tuning QVarLengthArray's memory usage. In general, you will rarely ever
+ need to call this function. If you want to know how many items are
+ in the array, call size().
+
+ \sa reserve()
+*/
+
+/*! \fn void QVarLengthArray::reserve(int size)
+
+ Attempts to allocate memory for at least \a size elements. If you
+ know in advance how large the array can get, you can call this
+ function and if you call resize() often, you are likely to get
+ better performance. If \a size is an underestimate, the worst
+ that will happen is that the QVarLengthArray will be a bit
+ slower.
+
+ The sole purpose of this function is to provide a means of fine
+ tuning QVarLengthArray's memory usage. In general, you will
+ rarely ever need to call this function. If you want to change the
+ size of the array, call resize().
+
+ \sa capacity()
+*/
+
+/*! \fn T &QVarLengthArray::operator[](int i)
+
+ Returns a reference to the item at index position \a i.
+
+ \a i must be a valid index position in the array (i.e., 0 <= \a i
+ < size()).
+
+ \sa data()
+*/
+
+/*! \fn const T &QVarLengthArray::operator[](int i) const
+
+ \overload
+*/
+
+
+/*!
+ \fn void QVarLengthArray::append(const T &t)
+
+ Appends item \a t to the array, extending the array if necessary.
+
+ \sa removeLast()
+*/
+
+
+/*!
+ \fn inline void QVarLengthArray::removeLast()
+ \since 4.5
+
+ Decreases the size of the array by one. The allocated size is not changed.
+
+ \sa append()
+*/
+
+/*!
+ \fn void QVarLengthArray::append(const T *buf, int size)
+
+ Appends \a size amount of items referenced by \a buf to this array.
+*/
+
+
+/*! \fn T *QVarLengthArray::data()
+
+ Returns a pointer to the data stored in the array. The pointer can
+ be used to access and modify the items in the array.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 3
+
+ The pointer remains valid as long as the array isn't reallocated.
+
+ This function is mostly useful to pass an array to a function
+ that accepts a plain C++ array.
+
+ \sa constData(), operator[]()
+*/
+
+/*! \fn const T *QVarLengthArray::data() const
+
+ \overload
+*/
+
+/*! \fn const T *QVarLengthArray::constData() const
+
+ Returns a const pointer to the data stored in the array. The
+ pointer can be used to access the items in the array. The
+ pointer remains valid as long as the array isn't reallocated.
+
+ This function is mostly useful to pass an array to a function
+ that accepts a plain C++ array.
+
+ \sa data(), operator[]()
+*/
+
+/*! \fn QVarLengthArray<T, Prealloc> &QVarLengthArray::operator=(const QVarLengthArray<T, Prealloc> &other)
+ Assigns \a other to this array and returns a reference to this array.
+ */
+
+/*! \fn QVarLengthArray::QVarLengthArray(const QVarLengthArray<T, Prealloc> &other)
+ Constructs a copy of \a other.
+ */
+
diff --git a/doc/src/qwaitcondition.qdoc b/doc/src/qwaitcondition.qdoc
new file mode 100644
index 0000000..4a64cfe
--- /dev/null
+++ b/doc/src/qwaitcondition.qdoc
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QWaitCondition
+ \brief The QWaitCondition class provides a condition variable for
+ synchronizing threads.
+
+ \threadsafe
+
+ \ingroup thread
+ \ingroup environment
+
+ QWaitCondition allows a thread to tell other threads that some
+ sort of condition has been met. One or many threads can block
+ waiting for a QWaitCondition to set a condition with wakeOne() or
+ wakeAll(). Use wakeOne() to wake one randomly selected condition or
+ wakeAll() to wake them all.
+
+ For example, let's suppose that we have three tasks that should
+ be performed whenever the user presses a key. Each task could be
+ split into a thread, each of which would have a
+ \l{QThread::run()}{run()} body like this:
+
+ \snippet doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp 0
+
+ Here, the \c keyPressed variable is a global variable of type
+ QWaitCondition.
+
+ A fourth thread would read key presses and wake the other three
+ threads up every time it receives one, like this:
+
+ \snippet doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp 1
+
+ The order in which the three threads are woken up is undefined.
+ Also, if some of the threads are still in \c do_something() when
+ the key is pressed, they won't be woken up (since they're not
+ waiting on the condition variable) and so the task will not be
+ performed for that key press. This issue can be solved using a
+ counter and a QMutex to guard it. For example, here's the new
+ code for the worker threads:
+
+ \snippet doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp 2
+
+ Here's the code for the fourth thread:
+
+ \snippet doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp 3
+
+ The mutex is necessary because the results of two threads
+ attempting to change the value of the same variable
+ simultaneously are unpredictable.
+
+ Wait conditions are a powerful thread synchronization primitive.
+ The \l{threads/waitconditions}{Wait Conditions} example shows how
+ to use QWaitCondition as an alternative to QSemaphore for
+ controlling access to a circular buffer shared by a producer
+ thread and a consumer thread.
+
+ \sa QMutex, QSemaphore, QThread, {Wait Conditions Example}
+*/
+
+/*!
+ \fn QWaitCondition::QWaitCondition()
+
+ Constructs a new wait condition object.
+*/
+
+/*!
+ \fn QWaitCondition::~QWaitCondition()
+
+ Destroys the wait condition object.
+*/
+
+/*!
+ \fn void QWaitCondition::wakeOne()
+
+ Wakes one thread waiting on the wait condition. The thread that
+ is woken up depends on the operating system's scheduling
+ policies, and cannot be controlled or predicted.
+
+ If you want to wake up a specific thread, the solution is
+ typically to use different wait conditions and have different
+ threads wait on different conditions.
+
+ \sa wakeAll()
+*/
+
+/*!
+ \fn void QWaitCondition::wakeAll()
+
+ Wakes all threads waiting on the wait condition. The order in
+ which the threads are woken up depends on the operating system's
+ scheduling policies and cannot be controlled or predicted.
+
+ \sa wakeOne()
+*/
+
+/*!
+ \fn bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
+
+ Releases the locked \a mutex and waits on the wait condition. The
+ \a mutex must be initially locked by the calling thread. If \a
+ mutex is not in a locked state, this function returns
+ immediately. If \a mutex is a recursive mutex, this function
+ returns immediately. The \a mutex will be unlocked, and the
+ calling thread will block until either of these conditions is met:
+
+ \list
+ \o Another thread signals it using wakeOne() or wakeAll(). This
+ function will return true in this case.
+ \o \a time milliseconds has elapsed. If \a time is \c ULONG_MAX
+ (the default), then the wait will never timeout (the event
+ must be signalled). This function will return false if the
+ wait timed out.
+ \endlist
+
+ The mutex will be returned to the same locked state. This
+ function is provided to allow the atomic transition from the
+ locked state to the wait state.
+
+ \sa wakeOne(), wakeAll()
+*/
+
+/*!
+ \fn bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
+ \since 4.4
+
+ Releases the locked \a readWriteLock and waits on the wait
+ condition. The \a readWriteLock must be initially locked by the
+ calling thread. If \a readWriteLock is not in a locked state, this
+ function returns immediately. The \a readWriteLock must not be
+ locked recursively, otherwise this function will not release the
+ lock properly. The \a readWriteLock will be unlocked, and the
+ calling thread will block until either of these conditions is met:
+
+ \list
+ \o Another thread signals it using wakeOne() or wakeAll(). This
+ function will return true in this case.
+ \o \a time milliseconds has elapsed. If \a time is \c ULONG_MAX
+ (the default), then the wait will never timeout (the event
+ must be signalled). This function will return false if the
+ wait timed out.
+ \endlist
+
+ The \a readWriteLock will be returned to the same locked
+ state. This function is provided to allow the atomic transition
+ from the locked state to the wait state.
+
+ \sa wakeOne(), wakeAll()
+*/
diff --git a/doc/src/rcc.qdoc b/doc/src/rcc.qdoc
new file mode 100644
index 0000000..d67a3bf
--- /dev/null
+++ b/doc/src/rcc.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page rcc.html
+ \title Resource Compiler (rcc)
+ \ingroup buildsystem
+ \ingroup qttools
+ \keyword rcc
+
+ The \c rcc tool is used to embed resources into a Qt application during
+ the build process. It works by generating a C++ source file containing
+ data specified in a Qt resource (.qrc) file.
+
+ Usage:
+ \snippet doc/src/snippets/code/doc_src_rcc.qdoc 0
+
+ RCC accepts the following command line options:
+
+ \table
+ \header \o Option \o Argument \o Description
+
+ \row \o \c{-o} \o \o Writes output to file rather than
+ stdout.
+
+ \row \o \c{-name} \o \c name \o Creates an external initialization
+ function with name.
+
+ \row \o \c{-threshold} \o \c level \o Specifies a threshold (in bytes)
+ to use when compressing files. If
+ the file is smaller than the
+ threshold, it will not be
+ compressed, independent of what
+ the compression level is.
+
+ \row \o \c{-compress} \o \c level \o Compresses input files with the
+ given level. Level is an integer
+ from 1 to 9 - 1 being the fastest,
+ producing the least compression;
+ 9 being the slowest, producing
+ the most compression.
+
+ \row \o \c{-root} \o \c path \o Prefixes the resource access path
+ with root path.
+
+ \row \o \c{-no-compress} \o \o Disables all compression.
+
+ \row \o \c{-binary} \o \o Outputs a binary file for use as
+ a dynamic resource.
+
+ \row \o \c{-version} \o \o Displays version information.
+
+ \row \o \c{-help} \o \o Displays usage information.
+ \endtable
+
+ See also \l{The Qt Resource System} for more information about embedding
+ resources in Qt applications.
+*/
diff --git a/doc/src/resources.qdoc b/doc/src/resources.qdoc
new file mode 100644
index 0000000..7997b9f
--- /dev/null
+++ b/doc/src/resources.qdoc
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page resources.html
+ \title The Qt Resource System
+ \ingroup buildsystem
+
+ \keyword resource system
+
+ The Qt resource system is a platform-independent mechanism for
+ storing binary files in the application's executable. This is
+ useful if your application always needs a certain set of files
+ (icons, translation files, etc.) and you don't want to run the
+ risk of losing the files.
+
+ The resource system is based on tight cooperation between \l qmake,
+ \l rcc (Qt's resource compiler), and QFile. It obsoletes Qt 3's
+ \c qembed tool and the
+ \l{http://doc.trolltech.com/qq/qq05-iconography.html#imagestorage}{image
+ collection} mechanism.
+
+ \section1 Resource Collection Files (\c{.qrc})
+
+ The resources associated with an application are specified in a
+ \c .qrc file, an XML-based file format that lists files on the
+ disk and optionally assigns them a resource name that the
+ application must use to access the resource.
+
+ Here's an example \c .qrc file:
+
+ \quotefile mainwindows/application/application.qrc
+
+ The resource files listed in the \c .qrc file are files that are
+ part of the application's source tree. The specified paths are
+ relative to the directory containing the \c .qrc file. Note that
+ the listed resource files must be located in the same directory as
+ the \c .qrc file, or one of its subdirectories.
+
+ Resource data can either be compiled into the binary and thus accessed
+ immediately in application code, or a binary resource can be created
+ and at a later point in application code registered with the resource
+ system.
+
+ By default, resources are accessible in the application under the
+ same name as they have in the source tree, with a \c :/ prefix.
+ For example, the path \c :/images/cut.png would give access to the
+ \c cut.png file, whose location in the application's source tree
+ is \c images/cut.png. This can be changed using the \c file tag's
+ \c alias attribute:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 0
+
+ The file is then accessible as \c :/cut-img.png from the
+ application. It is also possible to specify a path prefix for all
+ files in the \c .qrc file using the \c qresource tag's \c prefix
+ attribute:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 1
+
+ In this case, the file is accessible as \c
+ :/myresources/cut-img.png.
+
+ Some resources, such as translation files and icons, many need to
+ change based on the user's locale. This is done by adding a \c lang
+ attribute to the \c qresource tag, specifying a suitable locale
+ string. For example:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 2
+
+ If the user's locale is French (i.e., QLocale::system().name() returns
+ "fr_FR"), \c :/cut.jpg becomes a reference to the \c cut_fr.jpg
+ image. For other locales, \c cut.jpg is used.
+
+ See the QLocale documentation for a description of the format to use
+ for locale strings.
+
+
+ \section2 External Binary Resources
+
+ For an external binary resource to be created you must create the resource
+ data (commonly given the \c .rcc extension) by passing the -binary switch to
+ \l rcc. Once the binary resource is created you can register the resource
+ with the QResource API.
+
+ For example, a set of resource data specified in a \c .qrc file can be
+ compiled in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 3
+
+ In the application, this resource would be registered with code like this:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 4
+
+ \section2 Compiled-In Resources
+
+ For a resource to be compiled into the binary the \c .qrc file must be
+ mentioned in the application's \c .pro file so that \c qmake knows
+ about it. For example:
+
+ \snippet examples/mainwindows/application/application.pro 0
+
+ \c qmake will produce make rules to generate a file called \c
+ qrc_application.cpp that is linked into the application. This
+ file contains all the data for the images and other resources as
+ static C++ arrays of compressed binary data. The \c
+ qrc_application.cpp file is automatically regenerated whenever
+ the \c .qrc file changes or one of the files that it refers to
+ changes. If you don't use \c .pro files, you can either invoke
+ \c rcc manually or add build rules to your build system.
+
+ \image resources.png Building resources into an application
+
+ Currently, Qt always stores the data directly in the executable,
+ even on Windows and Mac OS X, where the operating system provides
+ native support for resources. This might change in a future Qt
+ release.
+
+ \section1 Using Resources in the Application
+
+ In the application, resource paths can be used in most places
+ instead of ordinary file system paths. In particular, you can
+ pass a resource path instead of a file name to the QIcon, QImage,
+ or QPixmap constructor:
+
+ \snippet examples/mainwindows/application/mainwindow.cpp 21
+
+ See the \l{mainwindows/application}{Application} example for an
+ actual application that uses Qt's resource system to store its
+ icons.
+
+ In memory, resources are represented by a tree of resource
+ objects. The tree is automatically built at startup and used by
+ QFile for resolving paths to resources. You can use a QDir initialized
+ with ":/" to navigate through the resource tree from the root.
+
+ Qt's resources support the concept of a search path list. If you then
+ refer to a resource with \c : instead of \c :/ as the prefix, the
+ resource will be looked up using the search path list. The search
+ path list is empty at startup; call QDir::addResourceSearchPath() to
+ add paths to it.
+
+ If you have resources in a static library, you might need to
+ force initialization of your resources by calling \l
+ Q_INIT_RESOURCE() with the base name of the \c .qrc file. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_resources.qdoc 5
+
+ Similarly, if you must unload a set of resources explicitly
+ (because a plugin is being unloaded or the resources are not valid
+ any longer), you can force removal of your resources by calling
+ Q_CLEANUP_RESOURCE() with the same base name as above.
+*/
diff --git a/doc/src/richtext.qdoc b/doc/src/richtext.qdoc
new file mode 100644
index 0000000..fbd8adb
--- /dev/null
+++ b/doc/src/richtext.qdoc
@@ -0,0 +1,1073 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page richtext.html
+\nextpage Rich Text Document Structure
+
+\title Rich Text Processing
+\ingroup architecture
+\ingroup text-processing
+\brief An overview of Qt's rich text processing, editing and display features.
+
+The Scribe framework provides a set of classes for reading and manipulating
+structured rich text documents. Unlike previous rich text support in Qt, the
+new classes are centered around the QTextDocument class rather than raw
+textual information. This enables the developer to create and modify
+structured rich text documents without having to prepare content in an
+intermediate markup format.
+
+The information within a document can be accessed via two complementary
+interfaces: A cursor-based interface is used for editing, and a read-only
+hierarchical interface provides a high level overview of the document
+structure. The main advantage of the cursor-based interface is that the
+text can be edited using operations that mimic a user's interaction with
+an editor, without losing the underlying structure of the document. The
+read-only hierarchical interface is most useful when performing operations
+such as searching and document export.
+
+This document is divided up into chapters for convenient reference:
+
+\list
+\i \l{Rich Text Document Structure} outlines
+ the different kinds of elements in a QTextDocument, and describes how
+ they are arranged in a document structure.
+\i \l{The QTextCursor Interface} explains how rich
+ text documents can be edited using the cursor-based interface.
+\i \l{Common Rich Text Editing Tasks} examines some
+ common tasks that involve reading or manipulating rich text documents.
+\i \l{Advanced Rich Text Processing} examines advanced rich text editing tasks.
+\i \l{Supported HTML Subset} lists the HTML tags supported by QTextDocument.
+\endlist
+
+See also the list of \l{Text Processing Classes}.
+
+*/
+
+/*!
+\page richtext-structure.html
+\contentspage richtext.html Contents
+\previouspage Rich Text Processing
+\nextpage The QTextCursor Interface
+
+\title Rich Text Document Structure
+
+\tableofcontents
+
+The structured representation of a text document presents its contents as
+a hierarchy of text blocks, frames, tables, and other objects. These provide
+a logical structure to the document and describe how their contents will be
+displayed. Generally, frames and tables are used to group other
+structures while text blocks contain the actual textual information.
+
+New elements are created and inserted into the document programmatically
+\l{richtext-cursor.html}{with a QTextCursor} or by using an editor
+widget, such as QTextEdit. Elements can be given a particular format when
+they are created; otherwise they take the cursor's current format for the
+element.
+
+\table
+\row
+\i \inlineimage richtext-document.png
+\i \bold{Basic structure}
+
+The "top level" of a document might be populated in the way shown.
+Each document always contains a root frame, and this always contains
+at least one text block.
+
+For documents with some textual content, the root
+frame usually contains a sequence of blocks and other elements.
+
+Sequences of frames and tables are always separated by text blocks in a
+document, even if the text blocks contain no information. This ensures that
+new elements can always be inserted between existing structures.
+\endtable
+
+In this chapter, we look at each of the structural elements
+used in a rich text document, outline their features and uses, and show
+how to examine their contents. Document editing is described in
+\l{richtext-cursor.html}{The QTextCursor Interface}.
+
+\section1 Rich Text Documents
+
+QTextDocument objects contain all the information required to construct
+rich text documents for use with a QTextEdit widget or in a custom editor.
+Although QTextEdit makes it easy to display and edit rich text, documents
+can also be used independently of any editor widget, for example:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 0
+
+Alternatively, they can be extracted from an existing editor:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 1
+
+This flexibility enables applications to handle multiple rich text
+documents without the overhead of multiple editor widgets, or requiring
+documents to be stored in some intermediate format.
+
+An empty document contains a root frame which itself contains a single
+empty text block. The \l{richtext-cursor.html}{text cursor interface}
+automatically inserts new document elements into the root frame, and
+ensures that it is padded with empty blocks where necessary.
+
+We obtain the root frame in the following manner:
+
+\snippet doc/src/snippets/textdocument-frames/xmlwriter.h 0
+\snippet doc/src/snippets/textdocument-frames/xmlwriter.cpp 0
+
+When navigating the document structure, it is useful to begin at the
+root frame because it provides access to the entire document structure.
+
+\section1 Document Elements
+
+Rich text documents usually consist of common elements such as paragraphs,
+frames, tables, and lists. These are represented in a QTextDocument
+by the QTextBlock, QTextFrame, QTextTable, and QTextList classes.
+Unlike the other elements in a document, images are represented by
+specially formatted text fragments. This enables them to be placed
+formatted inline with the surrounding text.
+
+The basic structural building blocks in documents are QTextBlock and
+QTextFrame. Blocks themselves contain fragments of rich text
+(QTextFragment), but these do not directly influence the high level
+structure of a document.
+
+Elements which can group together other document elements are typically
+subclasses of QTextObject, and fall into two categories: Elements that
+group together text blocks are subclasses of QTextBlockGroup, and those
+that group together frames and other elements are subclasses of QTextFrame.
+
+\section2 Text Blocks
+
+Text blocks are provided by the QTextBlock class.
+
+Text blocks group together fragments of text with different character formats,
+and are used to represent paragraphs in the document. Each block
+typically contains a number of text fragments with different styles.
+Fragments are created when text is inserted into the document, and more
+of them are added when the document is edited. The document splits, merges,
+and removes fragments to efficiently represent the different styles
+of text in the block.
+
+The fragments within a given block can be examined by using a
+QTextBlock::iterator to traverse the block's internal structure:
+
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 3
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 5
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 6
+
+Blocks are also used to represent list items. As a result, blocks can
+define their own character formats which contain information about
+block-level decoration, such as the type of bullet points used for
+list items. The formatting for the block itself is described by the
+QTextBlockFormat class, and describes properties such as text alignment,
+indentation, and background color.
+
+Although a given document may contain complex structures, once we have a
+reference to a valid block in the document, we can navigate between each
+of the text blocks in the order in which they were written:
+
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 0
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 1
+\snippet doc/src/snippets/textblock-fragments/xmlwriter.cpp 2
+
+This method is useful for when you want to extract just the rich text from a
+document because it ignores frames, tables, and other types of structure.
+
+QTextBlock provides comparison operators that make it easier to manipulate
+blocks: \l{QTextBlock::operator==()}{operator==()} and
+\l{QTextBlock::operator!=()}{operator!=()} are used to test whether two
+blocks are the same, and \l{QTextBlock::operator<()}{operator<()} is used
+to determine which one occurs first in a document.
+
+\section2 Frames
+
+Frames are provided by the QTextFrame class.
+
+Text frames group together blocks of text and child frames, creating
+document structures that are larger than paragraphs. The format of a frame
+specifies how it is rendered and positioned on the page. Frames are
+either inserted into the text flow, or they float on the left or right
+hand side of the page.
+Each document contains a root frame that contains all the other document
+elements. As a result, all frames except the root frame have a parent
+frame.
+
+Since text blocks are used to separate other document elements, each
+frame will always contain at least one text block, and zero or more
+child frames. We can inspect the contents of a frame by using a
+QTextFrame::iterator to traverse the frame's child elements:
+
+\snippet doc/src/snippets/textdocument-frames/xmlwriter.cpp 1
+\snippet doc/src/snippets/textdocument-frames/xmlwriter.cpp 2
+
+Note that the iterator selects both frames and blocks, so it is necessary
+to check which it is referring to. This allows us to navigate the document
+structure on a frame-by-frame basis yet still access text blocks if
+required. Both the QTextBlock::iterator and QTextFrame::iterator classes
+can be used in complementary ways to extract the required structure from
+a document.
+
+\section2 Tables
+
+Tables are provided by the QTextTable class.
+
+Tables are collections of cells that are arranged in rows and columns.
+Each table cell is a document element with its own character format, but it
+can also contain other elements, such as frames and text blocks. Table cells
+are automatically created when the table is constructed, or when extra rows
+or columns are added. They can also be moved between tables.
+
+QTextTable is a subclass of QTextFrame, so tables are treated like frames
+in the document structure. For each frame that we encounter in the
+document, we can test whether it represents a table, and deal with it in a
+different way:
+
+\snippet doc/src/snippets/textdocument-tables/xmlwriter.cpp 0
+\snippet doc/src/snippets/textdocument-tables/xmlwriter.cpp 1
+
+The cells within an existing table can be examined by iterating through
+the rows and columns.
+
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 9
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 10
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 11
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 12
+
+
+\section2 Lists
+
+Lists are provided by the QTextList class.
+
+Lists are sequences of text blocks that are formatted in the usual way, but
+which also provide the standard list decorations such as bullet points and
+enumerated items. Lists can be nested, and will be indented if the list's
+format specifies a non-zero indentation.
+
+We can refer to each list item by its index in the list:
+
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 0
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 1
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 2
+
+Since QTextList is a subclass of QTextBlockGroup, it does not group the
+list items as child elements, but instead provides various functions for
+managing them. This means that any text block we find when traversing a
+document may actually be a list item. We can ensure that list items are
+correctly identified by using the following code:
+
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 3
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 4
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 5
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 6
+\snippet doc/src/snippets/textdocument-listitems/mainwindow.cpp 7
+
+
+\section2 Images
+
+Images in QTextDocument are represented by text fragments that reference
+external images via the resource mechanism. Images are created using the
+cursor interface, and can be modified later by changing the character
+format of the image's text fragment:
+
+\snippet doc/src/snippets/textdocument-imageformat/main.cpp 0
+\snippet doc/src/snippets/textdocument-imageformat/main.cpp 1
+\snippet doc/src/snippets/textdocument-imageformat/main.cpp 2
+
+The fragment that represents the image can be found by iterating over
+the fragments in the text block that contains the image.
+*/
+
+/*!
+\page richtext-cursor.html
+\contentspage richtext.html Contents
+\previouspage Rich Text Document Structure
+\nextpage Common Rich Text Editing Tasks
+
+\title The QTextCursor Interface
+
+\tableofcontents
+
+The QTextCursor interface allows documents and their structure to be
+edited in a way that should be familiar to most users of text editors and
+document editing software. Rich text documents can have multiple cursors
+associated with them, and each of these contains information about their
+position in the document and any selections that they may hold. This
+cursor-based paradigm makes common operations, such as cutting and pasting
+text, simple to implement programmatically, yet it also allows more complex
+editing operations to be performed on the document.
+
+This chapter describes most of the common editing operations that you
+will need to perform using a cursor, from basic insertion of text and
+document elements to more complex manipulation of document structures.
+
+\section1 Cursor-Based Editing
+
+At the simplest level, text documents are made up of a string of characters,
+marked up in some way to represent the block structure of the text within the
+document. QTextCursor provides a cursor-based interface that allows the
+contents of a QTextDocument to be manipulated at the character level. Since
+the elements (blocks, frames, tables, etc.) are also encoded in the character
+stream, the document structure can itself be changed by the cursor.
+
+The cursor keeps track of its location within its parent document, and can
+report information about the surrounding structure, such as the enclosing
+text block, frame, table, or list. The formats of the enclosing structures
+can also be directly obtained through the cursor.
+
+\section2 Using a Cursor
+
+The main use of a cursor is to insert or modify text within a block.
+We can use a text editor's cursor to do this:
+
+\snippet doc/src/snippets/textblock-formats/main.cpp 0
+
+Alternatively, we can obtain a cursor directly from a document:
+
+\snippet doc/src/snippets/textdocument-images/main.cpp 0
+
+The cursor is positioned at the start of the document so that we can write
+into the first (empty) block in the document.
+
+\section2 Grouping Cursor Operations
+
+A series of editing operations can be packaged together so that they can
+be replayed, or undone together in a single action. This is achieved by
+using the \c beginEditBlock() and \c endEditBlock() functions in the
+following way, as in the following example where we select the word that
+contains the cursor:
+
+\snippet doc/src/snippets/textdocument-selections/mainwindow.cpp 0
+
+If editing operations are not grouped, the document automatically records
+the individual operations so that they can be undone later. Grouping
+operations into larger packages can make editing more efficient both for
+the user and for the application, but care has to be taken not to group too
+many operations together as the user may want find-grained control over the
+undo process.
+
+\section2 Multiple Cursors
+
+Multiple cursors can be used to simultaneously edit the same document,
+although only one will be visible to the user in a QTextEdit widget.
+The QTextDocument ensures that each cursor writes text correctly and
+does not interfere with any of the others.
+
+\omit
+\snippet doc/src/snippets/textdocument-cursors/main.cpp 0
+\snippet doc/src/snippets/textdocument-cursors/main.cpp 1
+\endomit
+
+\section1 Inserting Document Elements
+
+QTextCursor provides several functions that can be used to change the
+structure of a rich text document. Generally, these functions allow
+document elements to be created with relevant formatting information,
+and they are inserted into the document at the cursor's position.
+
+The first group of functions insert block-level elements, and update the
+cursor position, but they do not return the element that was inserted:
+
+\list
+\i \l{QTextCursor::insertBlock()}{insertBlock()} inserts a new text block
+ (paragraph) into a document at the cursor's position, and moves the
+ cursor to the start of the new block.
+\i \l{QTextCursor::insertFragment()}{insertFragment()} inserts an existing
+ text fragment into a document at the cursor's position.
+\i \l{QTextCursor::insertImage()}{insertImage()} inserts an image into a
+ document at the cursor's position.
+\i \l{QTextCursor::insertText()}{insertText()} inserts text into the
+ document at the cursor's position.
+\endlist
+
+You can examine the contents of the element that was inserted through the
+cursor interface.
+
+The second group of functions insert elements that provide structure to
+the document, and return the structure that was inserted:
+
+\list
+\i \l{QTextCursor::insertFrame()}{insertFrame()} inserts a frame into the
+ document \e after the cursor's current block, and moves the cursor to
+ the start of the empty block in the new frame.
+\i \l{QTextCursor::insertList()}{insertList()} inserts a list into the
+ document at the cursor's position, and moves the cursor to the start
+ of the first item in the list.
+\i \l{QTextCursor::insertTable()}{insertTable()} inserts a table into
+ the document \e after the cursor's current block, and moves the cursor
+ to the start of the block following the table.
+\endlist
+
+These elements either contain or group together other elements in the
+document.
+
+\section2 Text and Text Fragments
+
+Text can be inserted into the current block in the current character
+format, or in a custom format that is specified with the text:
+
+\snippet doc/src/snippets/textdocument-charformats/main.cpp 0
+
+Once the character format has been used with a cursor, that format becomes
+the default format for any text inserted with that cursor until another
+character format is specified.
+
+If a cursor is used to insert text without specifying a character format,
+the text will be given the character format used at that position in the
+document.
+
+\section2 Blocks
+
+Text blocks are inserted into the document with the
+\l{QTextCursor::insertBlock()}{insertBlock()} function.
+
+\snippet doc/src/snippets/textblock-formats/main.cpp 1
+
+The cursor is positioned at the start of the new block.
+
+\section2 Frames
+
+Frames are inserted into a document using the cursor, and will be placed
+within the cursor's current frame \e after the current block.
+The following code shows how a frame can be inserted between two text
+blocks in a document's root frame. We begin by finding the cursor's
+current frame:
+
+\snippet doc/src/snippets/textdocument-frames/mainwindow.cpp 0
+
+We insert some text in this frame then set up a frame format for the
+child frame:
+
+\snippet doc/src/snippets/textdocument-frames/mainwindow.cpp 1
+
+The frame format will give the frame an external margin of 32 pixels,
+internal padding of 8 pixels, and a border that is 4 pixels wide.
+See the QTextFrameFormat documentation for more information about
+frame formats.
+
+The frame is inserted into the document after the preceding text:
+
+\snippet doc/src/snippets/textdocument-frames/mainwindow.cpp 2
+
+We add some text to the document immediately after we insert the frame.
+Since the text cursor is positioned \e{inside the frame} when it is inserted
+into the document, this text will also be inserted inside the frame.
+
+Finally, we position the cursor outside the frame by taking the last
+available cursor position inside the frame we recorded earlier:
+
+\snippet doc/src/snippets/textdocument-frames/mainwindow.cpp 3
+
+The text that we add last is inserted after the child frame in the
+document. Since each frame is padded with text blocks, this ensures that
+more elements can always be inserted with a cursor.
+
+\section2 Tables
+
+Tables are inserted into the document using the cursor, and will be
+placed within the cursor's current frame \e after the current block:
+
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 0
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 3
+
+Tables can be created with a specific format that defines the overall
+properties of the table, such as its alignment, background color, and
+the cell spacing used. It can also determine the constraints on each
+column, allowing each of them to have a fixed width, or resize according
+to the available space.
+
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 2
+
+The columns in the table created above will each take up a certain
+percentage of the available width. Note that the table format is
+optional; if you insert a table without a format, some sensible
+default values will be used for the table's properties.
+
+Since cells can contain other document elements, they too can be
+formatted and styled as necessary.
+
+Text can be added to the table by navigating to each cell with the cursor
+and inserting text.
+
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 4
+
+We can create a simple timetable by following this approach:
+
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 5
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 6
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 7
+\snippet doc/src/snippets/textdocument-tables/mainwindow.cpp 8
+
+\section2 Lists
+
+Lists of block elements can be automatically created and inserted into the
+document at the current cursor position. Each list that is created in this
+way requires a list format to be specified:
+
+\snippet doc/src/snippets/textdocument-lists/mainwindow.cpp 0
+
+The above code first checks whether the cursor is within an existing list
+and, if so, gives the list format for the new list a suitable level of
+indentation. This allows nested lists to be created with increasing
+levels of indentation. A more sophisticated implementation would also use
+different kinds of symbol for the bullet points in each level of the list.
+
+\section2 Images
+
+Inline images are added to documents through the cursor in the usual manner.
+Unlike many other elements, all of the image properties are specified by the
+image's format. This means that a QTextImageFormat object has to be
+created before an image can be inserted:
+
+\snippet doc/src/snippets/textdocument-images/main.cpp 1
+
+The image name refers to an entry in the application's resource file.
+The method used to derive this name is described in
+\l{resources.html}{The Qt Resource System}.
+
+*/
+
+/*!
+\page richtext-common-tasks.html
+\contentspage richtext.html Contents
+\previouspage The QTextCursor Interface
+\nextpage Advanced Rich Text Processing
+
+\title Common Rich Text Editing Tasks
+
+\tableofcontents
+
+There are a number of tasks that are often performed by developers
+when editing and processing text documents using Qt. These include the use
+of display widgets such as QTextBrowser and QTextEdit, creation of
+documents with QTextDocument, editing using a QTextCursor, and
+exporting the document structure.
+This document outlines some of the more common ways of using the rich
+text classes to perform these tasks, showing convenient patterns that can
+be reused in your own applications.
+
+\section1 Using QTextEdit
+
+A text editor widget can be constructed and used to display HTML in the
+following way:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 2
+
+By default, the text editor contains a document with a root frame, inside
+which is an empty text block. This document can be obtained so that it can
+be modified directly by the application:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 3
+
+The text editor's cursor may also be used to edit a document:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 4
+
+Although a document can be edited using many cursors at once, a QTextEdit
+only displays a single cursor at a time. Therefore, if we want to update the
+editor to display a particular cursor or its selection, we need to set the
+editor's cursor after we have modified the document:
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 5
+
+\section1 Selecting Text
+
+Text is selected by moving the cursor using operations that are similar to
+those performed by a user in a text editor. To select text between two
+points in the document, we need to position the cursor at the first point
+then move it using a special mode (\l{QTextCursor::MoveMode}) with a
+move operation (\l{QTextCursor::MoveOperation}).
+When we select the text, we leave the selection anchor at the old cursor
+position just as the user might do by holding down the Shift key when
+selecting text:
+
+\snippet doc/src/snippets/textdocument-selections/mainwindow.cpp 1
+
+In the above code, a whole word is selected using this method. QTextCursor
+provides a number of common move operations for selecting individual
+characters, words, lines, and whole blocks.
+
+\section1 Finding Text
+
+QTextDocument provides a cursor-based interface for searching, making
+it easy to find and modify text in the style of a text editor. The following
+code finds all the instances of a particular word in a document, and changes
+the color of each:
+
+\snippet doc/src/snippets/textdocument-find/main.cpp 0
+\snippet doc/src/snippets/textdocument-find/main.cpp 1
+
+Note that the cursor does not have to be moved after each search and replace
+operation; it is always positioned at the end of the word that was just
+replaced.
+
+\section1 Printing Documents
+
+QTextEdit is designed for the display of large rich text documents that are
+read on screen, rendering them in the same way as a web browser. As a result,
+it does not automatically break the contents of the document into page-sized
+pieces that are suitable for printing.
+
+QTextDocument provides a \l{QTextDocument::print()}{print()} function to
+allow documents to be printed using the QPrinter class. The following code
+shows how to prepare a document in a QTextEdit for printing with a QPrinter:
+
+\snippet doc/src/snippets/textdocument-printing/mainwindow.cpp 0
+
+The document is obtained from the text editor, and a QPrinter is constructed
+then configured using a QPrintDialog. If the user accepts the printer's
+configuration then the document is formatted and printed using the
+\l{QTextDocument::print()}{print()} function.
+
+*/
+
+/*!
+\page richtext-advanced-processing.html
+\contentspage richtext.html Contents
+\previouspage Common Rich Text Editing Tasks
+\nextpage Supported HTML Subset
+
+\title Advanced Rich Text Processing
+
+\section1 Handling Large Files
+
+Qt does not limit the size of files that are used for text
+processing. In most cases, this will not present a problem. For
+especially large files, however, you might experience that your
+application will become unresponsive or that you will run out of
+memory. The size of the files you can load depends on your
+hardware and on Qt's and your own application's implementation.
+
+If you are faced with this problem, we recommend that you address the
+following issues:
+
+\list
+ \o You should consider breaking up large paragraphs into smaller
+ ones as Qt handles small paragraphs better. You could also
+ insert line breaks at regular intervals, which will look the
+ same as one large paragraph in a QTextEdit.
+ \o You can reduce the amount of blocks in a QTextDocument with
+ \l{QTextDocument::}{maximumBlockCount()}. The document is only
+ as large as the number of blocks as far as QTextEdit is concerned.
+ \o When adding text to a text edit, it is an advantage to add it
+ in an edit block (see example below). The result is that the
+ text edit does not need to build the entire document structure at once.
+\endlist
+
+We give an example of the latter technique from the list. We assume that
+the text edit is visible.
+
+\snippet doc/src/snippets/code/doc_src_richtext.qdoc 6
+
+\omit
+Ideas for other sections:
+
+ * Hiding QTextBlock elements.
+ * Changing the word wrapping mode in QTextEdit. Custom word wrapping?
+\endomit
+*/
+
+/*!
+ \page richtext-html-subset.html
+ \title Supported HTML Subset
+ \brief Describes the support for HTML markup in text widgets.
+
+ \contentspage richtext.html Contents
+ \previouspage Common Rich Text Editing Tasks
+
+ Qt's text widgets are able to display rich text, specified using a subset of \l{HTML 4}
+ markup. Widgets that use QTextDocument, such as QLabel, QTextEdit, QTreeWidgetItem and
+ the other item widgets, are able to display rich text specified in this way.
+
+ \tableofcontents
+
+ \section1 Using HTML Markup in Text Widgets
+
+ Widgets automatically detect HTML markup and display rich text accordingly. For example,
+ setting a label's \l{QLabel::}{text} property with the string \c{"<b>Hello</b> <i>Qt!</i>"}
+ will result in the label displaying text like this: \bold{Hello} \e{Qt!}
+
+ When HTML markup is used for text, Qt follows the rules defined by the \l{HTML 4}
+ specification. This includes default properties for text layout, such as the
+ direction of the text flow (left-to-right) which can be changed by applying the
+ \l{#Block Attributes}{\c dir} attribute to blocks of text.
+
+ \section1 Supported Tags
+
+ The following table lists the HTML tags supported by Qt's
+ \l{Rich Text Processing}{rich text} engine:
+
+ \table
+ \header \o Tag
+ \o Description
+ \o Comment
+ \row \o \c a
+ \o Anchor or link
+ \o Supports the \c href and \c name attributes.
+ \row \o \c address
+ \o Address
+ \o
+ \row \o \c b
+ \o Bold
+ \o
+ \row \o \c big
+ \o Larger font
+ \o
+ \row \o \c blockquote
+ \o Indented paragraph
+ \o
+ \row \o \c body
+ \o Document body
+ \o Supports the \c bgcolor attribute, which
+ can be a Qt \l{QColor::setNamedColor()}{color name}
+ or a \c #RRGGBB color specification.
+ \row \o \c br
+ \o Line break
+ \o
+ \row \o \c center
+ \o Centered paragraph
+ \o
+ \row \o \c cite
+ \o Inline citation
+ \o Same as \c i.
+ \row \o \c code
+ \o Code
+ \o Same as \c tt.
+ \row \o \c dd
+ \o Definition data
+ \o
+ \row \o \c dfn
+ \o Definition
+ \o Same as \c i.
+ \row \o \c div
+ \o Document division
+ \o Supports the standard \l{block attributes}.
+ \row \o \c dl
+ \o Definition list
+ \o Supports the standard \l{block attributes}.
+ \row \o \c dt
+ \o Definition term
+ \o Supports the standard \l{block attributes}.
+ \row \o \c em
+ \o Emphasized
+ \o Same as \c i.
+ \row \o \c font
+ \o Font size, family, and/or color
+ \o Supports the following attributes:
+ \c size, \c face, and \c color (Qt
+ \l{QColor::setNamedColor()}{color names} or
+ \c #RRGGBB).
+ \row \o \c h1
+ \o Level 1 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c h2
+ \o Level 2 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c h3
+ \o Level 3 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c h4
+ \o Level 4 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c h5
+ \o Level 5 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c h6
+ \o Level 6 heading
+ \o Supports the standard \l{block attributes}.
+ \row \o \c head
+ \o Document header
+ \o
+ \row \o \c hr
+ \o Horizontal line
+ \o Supports the \c width attribute, which can
+ be specified as an absolute or relative (\c %) value.
+ \row \o \c html
+ \o HTML document
+ \o
+ \row \o \c i
+ \o Italic
+ \o
+ \row \o \c img
+ \o Image
+ \o Supports the \c src, \c source
+ (for Qt 3 compatibility), \c width, and \c height
+ attributes.
+ \row \o \c kbd
+ \o User-entered text
+ \o
+ \row \o \c meta
+ \o Meta-information
+ \o If a text encoding is specified using the \c{meta} tag,
+ it is picked up by Qt::codecForHtml().
+ Likewise, if an encoding is specified to
+ QTextDocument::toHtml(), the encoding is stored using
+ a \c meta tag, for example:
+
+ \snippet doc/src/snippets/code/doc_src_richtext.qdoc 7
+
+ \row \o \c li
+ \o List item
+ \o
+ \row \o \c nobr
+ \o Non-breakable text
+ \o
+ \row \o \c ol
+ \o Ordered list
+ \o Supports the standard \l{list attributes}.
+ \row \o \c p
+ \o Paragraph
+ \o Left-aligned by default. Supports the standard
+ \l{block attributes}.
+ \row \o \c pre
+ \o Preformated text
+ \o
+ \row \o \c qt
+ \o Qt rich-text document
+ \o Synonym for \c html. Provided for compatibility with
+ earlier versions of Qt.
+ \row \o \c s
+ \o Strikethrough
+ \o
+ \row \o \c samp
+ \o Sample code
+ \o Same as \c tt.
+ \row \o \c small
+ \o Small font
+ \o
+ \row \o \c span
+ \o Grouped elements
+ \o
+ \row \o \c strong
+ \o Strong
+ \o Same as \c b.
+ \row \o \c sub
+ \o Subscript
+ \o
+ \row \o \c sup
+ \o Superscript
+ \o
+ \row \o \c table
+ \o Table
+ \o Supports the following attributes: \c border,
+ \c bgcolor (Qt \l{QColor::setNamedColor()}{color names}
+ or \c #RRGGBB), \c cellspacing, \c cellpadding,
+ \c width (absolute or relative), and \c height.
+ \row \o \c tbody
+ \o Table body
+ \o Does nothing.
+ \row \o \c td
+ \o Table data cell
+ \o Supports the standard \l{table cell attributes}.
+ \row \o \c tfoot
+ \o Table footer
+ \o Does nothing.
+ \row \o \c th
+ \o Table header cell
+ \o Supports the standard \l{table cell attributes}.
+ \row \o \c thead
+ \o Table header
+ \o If the \c thead tag is specified, it is used when printing tables
+ that span multiple pages.
+ \row \o \c title
+ \o Document title
+ \o The value specified using the \c
+ title tag is available through
+ QTextDocument::metaInformation().
+ \row \o \c tr
+ \o Table row
+ \o Supports the \c bgcolor attribute, which
+ can be a Qt \l{QColor::setNamedColor()}{color name}
+ or a \c #RRGGBB color specification.
+ \row \o \c tt
+ \o Typewrite font
+ \o
+ \row \o \c u
+ \o Underlined
+ \o
+ \row \o \c ul
+ \o Unordered list
+ \o Supports the standard \l{list attributes}.
+ \row \o \c var
+ \o Variable
+ \o Same as \c i.
+ \endtable
+
+ \section1 Block Attributes
+
+ The following attributes are supported by the \c div, \c dl, \c
+ dt, \c h1, \c h2, \c h3, \c h4, \c h5, \c h6, \c p tags:
+
+ \list
+ \o \c align (\c left, \c right, \c center, \c justify)
+ \o \c dir (\c ltr, \c rtl)
+ \endlist
+
+ \section1 List Attributes
+
+ The following attribute is supported by the \c ol and \c ul tags:
+
+ \list
+ \o \c type (\c 1, \c a, \c A, \c square, \c disc, \c circle)
+ \endlist
+
+ \section1 Table Cell Attributes
+
+ The following attributes are supported by the \c td and \c th
+ tags:
+
+ \list
+ \o \c width (absolute, relative, or no-value)
+ \o \c bgcolor (Qt \l{QColor::setNamedColor()}{color names} or \c #RRGGBB)
+ \o \c colspan
+ \o \c rowspan
+ \o \c align (\c left, \c right, \c center, \c justify)
+ \o \c valign (\c top, \c middle, \c bottom)
+ \endlist
+
+ \section1 CSS Properties
+ The following table lists the CSS properties supported by Qt's
+ \l{Rich Text Processing}{rich text} engine:
+
+ \table
+ \header \o Property
+ \o Values
+ \o Description
+ \row
+ \o \c background-color
+ \o <color>
+ \o Background color for elements
+ \row
+ \o \c background-image
+ \o <uri>
+ \o Background image for elements
+ \row \o \c color
+ \o <color>
+ \o Text foreground color
+ \row \o \c font-family
+ \o <family name>
+ \o Font family name
+ \row \o \c font-size
+ \o [ small | medium | large | x-large | xx-large ] | <size>pt | <size>px
+ \o Font size relative to the document font, or specified in points or pixels
+ \row \o \c font-style
+ \o [ normal | italic | oblique ]
+ \o
+ \row \o \c font-weight
+ \o [ normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ]
+ \o Specifies the font weight used for text, where \c normal and \c bold
+ are mapped to the corresponding QFont weights. Numeric values are
+ 8 times the equivalent QFont weight values.
+ \row \o \c text-decoration
+ \o none | [ underline || overline || line-through ]
+ \o Additional text effects
+ \row \o \c font
+ \o [ [ <'font-style'> || <'font-weight'> ]? <'font-size'> <'font-family'> ]
+ \o Font shorthand property
+ \row \o \c text-indent
+ \o <length>px
+ \o First line text indentation in pixels
+ \row \o \c white-space
+ \o normal | pre | nowrap | pre-wrap
+ \o Declares how whitespace in HTML is handled.
+ \row \o \c margin-top
+ \o <length>px
+ \o Top paragraph margin in pixels
+ \row \o \c margin-bottom
+ \o <length>px
+ \o Bottom paragraph margin in pixels
+ \row \o \c margin-left
+ \o <length>px
+ \o Left paragraph margin in pixels
+ \row \o \c margin-right
+ \o <length>px
+ \o Right paragraph margin in pixels
+ \row \o \c padding-top
+ \o <length>px
+ \o Top table cell padding in pixels
+ \row \o \c padding-bottom
+ \o <length>px
+ \o Bottom table cell padding in pixels
+ \row \o \c padding-left
+ \o <length>px
+ \o Left table cell padding in pixels
+ \row \o \c padding-right
+ \o <length>px
+ \o Right table cell padding in pixels
+ \row \o \c padding
+ \o <length>px
+ \o Shorthand for setting all the padding properties at once.
+ \row \o \c vertical-align
+ \o baseline | sub | super | middle | top | bottom
+ \o Vertical text alignment. For vertical alignment in text table cells only middle, top, and bottom apply.
+ \row \o \c border-color
+ \o <color>
+ \o Border color for text tables.
+ \row \o \c border-style
+ \o none | dotted | dashed | dot-dash | dot-dot-dash | solid | double | groove | ridge | inset | outset
+ \o Border style for text tables.
+ \row \o \c background
+ \o [ <'background-color'> || <'background-image'> ]
+ \o Background shorthand property
+ \row \o \c page-break-before
+ \o [ auto | always ]
+ \o Make it possible to enforce a page break before the paragraph/table
+ \row \o \c page-break-after
+ \o [ auto | always ]
+ \o Make it possible to enforce a page break after the paragraph/table
+ \row \o float
+ \o [ left | right | none ]
+ \o Specifies where an image or a text will be placed in another element. Note that the \c float property is
+ only supported for tables and images.
+ \row \o \c text-transform
+ \o [ uppercase | lowercase | smallcaps ]
+ \o Select the transformation that will be performed on the text prior to displaying it.
+ \row \o \c word-spacing
+ \o <width>px
+ \o Specifies an alternate spacing between each word.
+ \endtable
+
+ \section1 Supported CSS Selectors
+
+ All CSS 2.1 selector classes are supported except pseudo-class selectors such
+ as \c{:first-child}, \c{:visited} and \c{:hover}.
+
+*/
diff --git a/doc/src/session.qdoc b/doc/src/session.qdoc
new file mode 100644
index 0000000..f47c245
--- /dev/null
+++ b/doc/src/session.qdoc
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page session.html
+ \title Session Management
+ \ingroup gui-programming
+
+ A \e session is a group of running applications, each of which has a
+ particular state. The session is controlled by a service called the \e
+ session \e manager. The applications participating in the session are
+ called \e{session clients}.
+
+ The session manager issues commands to its clients on behalf of the
+ user. These commands may cause clients to commit unsaved changes (for
+ example by saving open files), to preserve their state for future
+ sessions, or to terminate gracefully. The set of these operations is
+ called \e session \e management.
+
+ In the common case, a session consists of all applications that a
+ user runs on their desktop at a time. Under Unix/X11, however, a
+ session may include applications running on different computers and
+ may span multiple displays.
+
+ \section1 Shutting a Session Down
+
+ A session is shut down by the session manager, usually on behalf of
+ the user when they want to log out. A system might also perform an
+ automatic shutdown in an emergency situation, for example, if power is
+ about to be lost. Clearly there is a significant difference between
+ these types of shutdown. During the first, the user may want to
+ interact with the application, specifying exactly which files should
+ be saved and which should be discarded. In the latter case, there's no
+ time for interaction. There may not even be a user sitting in front of
+ the machine!
+
+
+ \section1 Protocols and Support on Different Platforms
+
+ On Mac OS X, and Microsoft Windows versions prior to Windows 2000,
+ there is nothing like complete session management for applications
+ yet, i.e. no restoring of previous sessions. (Windows 2000 and XP
+ provide "hibernation" where the entire memory is saved to disk and
+ restored when the machine is restarted.) They do support graceful
+ logouts where applications have the opportunity to cancel the process
+ after getting confirmation from the user. This is the functionality
+ that corresponds to the QApplication::commitData() method.
+
+ X11 has supported complete session management since X11R6.
+
+ \section1 Getting Session Management to Work with Qt
+
+ Start by reimplementing QApplication::commitData() to
+ enable your application to take part in the graceful logout process. If
+ you are only targeting the Microsoft Windows platform, this is all you can
+ and must provide. Ideally, your application should provide a shutdown
+ dialog similar to the following:
+
+ \img session.png A typical dialog on shutdown
+
+ Example code for this dialog can be found in the documentation of
+ QSessionManager::allowsInteraction().
+
+ For complete session management (only supported on X11R6 at present),
+ you must also take care of saving the application's state, and
+ potentially of restoring the state in the next life cycle of the
+ session. This saving is done by reimplementing
+ QApplication::saveState(). All state data you are saving in this
+ function, should be marked with the session identifier
+ QApplication::sessionId(). This application specific identifier is
+ globally unique, so no clashes will occur. (See QSessionManager for
+ information on saving/restoring the state of a particular Qt
+ application.)
+
+ Restoration is usually done in the application's main()
+ function. Check if QApplication::isSessionRestored() is \c true. If
+ that's the case, use the session identifier
+ QApplication::sessionId() again to access your state data and restore
+ the state of the application.
+
+ \bold{Important:} In order to allow the window manager to
+ restore window attributes such as stacking order or geometry
+ information, you must identify your top level widgets with
+ unique application-wide object names (see QObject::setObjectName()). When
+ restoring the application, you must ensure that all restored
+ top level widgets are given the same unique names they had before.
+
+ \section1 Testing and Debugging Session Management
+
+ Session management support on Mac OS X and Windows is fairly limited
+ due to the lack of this functionality in the operating system
+ itself. Simply shut the session down and verify that your application
+ behaves as expected. It may be useful to launch another application,
+ usually the integrated development environment, before starting your
+ application. This other application will get the shutdown message
+ afterwards, thus permitting you to cancel the shutdown. Otherwise you
+ would have to log in again after each test run, which is not a problem
+ per se, but is time consuming.
+
+ On Unix you can either use a desktop environment that supports
+ standard X11R6 session management or, the recommended method, use the
+ session manager reference implementation provided by the X Consortium.
+ This sample manager is called \c xsm and is part of a standard X11R6
+ installation. As always with X11, a useful and informative manual page
+ is provided. Using \c xsm is straightforward (apart from the clumsy
+ Athena-based user interface). Here's a simple approach:
+
+ \list
+ \i Run X11R6.
+ \i Create a dot file \c .xsmstartup in your home directory which
+ contains the single line
+ \snippet doc/src/snippets/code/doc_src_session.qdoc 0
+ This tells \c xsm that the default/failsafe session is just an xterm
+ and nothing else. Otherwise \c xsm would try to invoke lots of
+ clients including the windowmanager \c twm, which isn't very helpful.
+ \i Now launch \c xsm from another terminal window. Both a session
+ manager window and the xterm will appear. The xterm has a nice
+ property that sets it apart from all the other shells you are
+ currently running: within its shell, the \c SESSION_MANAGER
+ environment variable points to the session manager you just started.
+ \i Launch your application from the new xterm window. It will connect
+ itself automatically to the session manager. You can check with the \e
+ ClientList push button whether the connect was successful.
+
+ \bold{Note:} Never keep the \e ClientList open when you
+ start or end session managed clients! Otherwise \c xsm is likely to
+ crash.
+ \i Use the session manager's \e Checkpoint and \e Shutdown buttons
+ with different settings and see how your application behaves. The save
+ type \e local means that the clients should save their state. It
+ corresponds to the QApplication::saveState() function. The \e
+ global save type asks applications to save their unsaved changes in
+ permanent, globally accessible storage. It invokes
+ QApplication::commitData().
+ \i Whenever something crashes, blame \c xsm and not Qt. \c xsm is far
+ from being a usable session manager on a user's desktop. It is,
+ however, stable and useful enough to serve as testing environment.
+ \endlist
+*/
diff --git a/doc/src/signalsandslots.qdoc b/doc/src/signalsandslots.qdoc
new file mode 100644
index 0000000..5432bd4
--- /dev/null
+++ b/doc/src/signalsandslots.qdoc
@@ -0,0 +1,418 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page signalsandslots.html
+ \title Signals and Slots
+ \ingroup architecture
+ \brief An overview of Qt's signals and slots inter-object
+ communication mechanism.
+
+ Signals and slots are used for communication between objects. The
+ signals and slots mechanism is a central feature of Qt and
+ probably the part that differs most from the features provided by
+ other frameworks.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ In GUI programming, when we change one widget, we often want
+ another widget to be notified. More generally, we want objects of
+ any kind to be able to communicate with one another. For example,
+ if a user clicks a \gui{Close} button, we probably want the
+ window's \l{QWidget::close()}{close()} function to be called.
+
+ Older toolkits achieve this kind of communication using
+ callbacks. A callback is a pointer to a function, so if you want
+ a processing function to notify you about some event you pass a
+ pointer to another function (the callback) to the processing
+ function. The processing function then calls the callback when
+ appropriate. Callbacks have two fundamental flaws: Firstly, they
+ are not type-safe. We can never be certain that the processing
+ function will call the callback with the correct arguments.
+ Secondly, the callback is strongly coupled to the processing
+ function since the processing function must know which callback
+ to call.
+
+ \section1 Signals and Slots
+
+ In Qt, we have an alternative to the callback technique: We use
+ signals and slots. A signal is emitted when a particular event
+ occurs. Qt's widgets have many predefined signals, but we can
+ always subclass widgets to add our own signals to them. A slot
+ is a function that is called in response to a particular signal.
+ Qt's widgets have many pre-defined slots, but it is common
+ practice to subclass widgets and add your own slots so that you
+ can handle the signals that you are interested in.
+
+ \img abstract-connections.png
+ \omit
+ \caption An abstract view of some signals and slots connections
+ \endomit
+
+ The signals and slots mechanism is type safe: The signature of a
+ signal must match the signature of the receiving slot. (In fact a
+ slot may have a shorter signature than the signal it receives
+ because it can ignore extra arguments.) Since the signatures are
+ compatible, the compiler can help us detect type mismatches.
+ Signals and slots are loosely coupled: A class which emits a
+ signal neither knows nor cares which slots receive the signal.
+ Qt's signals and slots mechanism ensures that if you connect a
+ signal to a slot, the slot will be called with the signal's
+ parameters at the right time. Signals and slots can take any
+ number of arguments of any type. They are completely type safe.
+
+ All classes that inherit from QObject or one of its subclasses
+ (e.g., QWidget) can contain signals and slots. Signals are emitted by
+ objects when they change their state in a way that may be interesting
+ to other objects. This is all the object does to communicate. It
+ does not know or care whether anything is receiving the signals it
+ emits. This is true information encapsulation, and ensures that the
+ object can be used as a software component.
+
+ Slots can be used for receiving signals, but they are also normal
+ member functions. Just as an object does not know if anything receives
+ its signals, a slot does not know if it has any signals connected to
+ it. This ensures that truly independent components can be created with
+ Qt.
+
+ You can connect as many signals as you want to a single slot, and a
+ signal can be connected to as many slots as you need. It is even
+ possible to connect a signal directly to another signal. (This will
+ emit the second signal immediately whenever the first is emitted.)
+
+ Together, signals and slots make up a powerful component programming
+ mechanism.
+
+ \section1 A Small Example
+
+ A minimal C++ class declaration might read:
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.h 0
+
+ A small QObject-based class might read:
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.h 1
+ \codeline
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.h 2
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.h 3
+
+ The QObject-based version has the same internal state, and provides
+ public methods to access the state, but in addition it has support
+ for component programming using signals and slots. This class can
+ tell the outside world that its state has changed by emitting a
+ signal, \c{valueChanged()}, and it has a slot which other objects
+ can send signals to.
+
+ All classes that contain signals or slots must mention
+ Q_OBJECT at the top of their declaration. They must also derive
+ (directly or indirectly) from QObject.
+
+ Slots are implemented by the application programmer.
+ Here is a possible implementation of the \c{Counter::setValue()}
+ slot:
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 0
+
+ The \c{emit} line emits the signal \c valueChanged() from the
+ object, with the new value as argument.
+
+ In the following code snippet, we create two \c Counter objects
+ and connect the first object's \c valueChanged() signal to the
+ second object's \c setValue() slot using QObject::connect():
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 1
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 2
+ \codeline
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 3
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 4
+
+ Calling \c{a.setValue(12)} makes \c{a} emit a
+ \c{valueChanged(12)} signal, which \c{b} will receive in its
+ \c{setValue()} slot, i.e. \c{b.setValue(12)} is called. Then
+ \c{b} emits the same \c{valueChanged()} signal, but since no slot
+ has been connected to \c{b}'s \c{valueChanged()} signal, the
+ signal is ignored.
+
+ Note that the \c{setValue()} function sets the value and emits
+ the signal only if \c{value != m_value}. This prevents infinite
+ looping in the case of cyclic connections (e.g., if
+ \c{b.valueChanged()} were connected to \c{a.setValue()}).
+
+ A signal is emitted for every connection you make; if you
+ duplicate a connection, two signals will be emitted. You can
+ always break a connection using QObject::disconnect().
+
+ This example illustrates that objects can work together without needing to
+ know any information about each other. To enable this, the objects only
+ need to be connected together, and this can be achieved with some simple
+ QObject::connect() function calls, or with \c{uic}'s
+ \l{Using a Designer .ui File in Your Application#Automatic Connections}
+ {automatic connections} feature.
+
+ \section1 Building the Example
+
+ The C++ preprocessor changes or removes the \c{signals},
+ \c{slots}, and \c{emit} keywords so that the compiler is
+ presented with standard C++.
+
+ By running the \l moc on class definitions that contain signals
+ or slots, a C++ source file is produced which should be compiled
+ and linked with the other object files for the application. If
+ you use \l qmake, the makefile rules to automatically invoke \c
+ moc will be added to your project's makefile.
+
+ \section1 Signals
+
+ Signals are emitted by an object when its internal state has changed
+ in some way that might be interesting to the object's client or owner.
+ Only the class that defines a signal and its subclasses can emit the
+ signal.
+
+ When a signal is emitted, the slots connected to it are usually
+ executed immediately, just like a normal function call. When this
+ happens, the signals and slots mechanism is totally independent of
+ any GUI event loop. Execution of the code following the \c emit
+ statement will occur once all slots have returned. The situation is
+ slightly different when using \l{Qt::ConnectionType}{queued
+ connections}; in such a case, the code following the \c emit keyword
+ will continue immediately, and the slots will be executed later.
+
+ If several slots are connected to one signal, the slots will be
+ executed one after the other, in an arbitrary order, when the signal
+ is emitted.
+
+ Signals are automatically generated by the \l moc and must not be
+ implemented in the \c .cpp file. They can never have return types
+ (i.e. use \c void).
+
+ A note about arguments: Our experience shows that signals and slots
+ are more reusable if they do not use special types. If
+ QScrollBar::valueChanged() were to use a special type such as the
+ hypothetical QScrollBar::Range, it could only be connected to
+ slots designed specifically for QScrollBar. Connecting different
+ input widgets together would be impossible.
+
+ \section1 Slots
+
+ A slot is called when a signal connected to it is emitted. Slots are
+ normal C++ functions and can be called normally; their only special
+ feature is that signals can be connected to them.
+
+ Since slots are normal member functions, they follow the normal C++
+ rules when called directly. However, as slots, they can be invoked
+ by any component, regardless of its access level, via a signal-slot
+ connection. This means that a signal emitted from an instance of an
+ arbitrary class can cause a private slot to be invoked in an instance
+ of an unrelated class.
+
+ You can also define slots to be virtual, which we have found quite
+ useful in practice.
+
+ Compared to callbacks, signals and slots are slightly slower
+ because of the increased flexibility they provide, although the
+ difference for real applications is insignificant. In general,
+ emitting a signal that is connected to some slots, is
+ approximately ten times slower than calling the receivers
+ directly, with non-virtual function calls. This is the overhead
+ required to locate the connection object, to safely iterate over
+ all connections (i.e. checking that subsequent receivers have not
+ been destroyed during the emission), and to marshall any
+ parameters in a generic fashion. While ten non-virtual function
+ calls may sound like a lot, it's much less overhead than any \c
+ new or \c delete operation, for example. As soon as you perform a
+ string, vector or list operation that behind the scene requires
+ \c new or \c delete, the signals and slots overhead is only
+ responsible for a very small proportion of the complete function
+ call costs.
+
+ The same is true whenever you do a system call in a slot; or
+ indirectly call more than ten functions. On an i586-500, you can
+ emit around 2,000,000 signals per second connected to one
+ receiver, or around 1,200,000 per second connected to two
+ receivers. The simplicity and flexibility of the signals and
+ slots mechanism is well worth the overhead, which your users
+ won't even notice.
+
+ Note that other libraries that define variables called \c signals
+ or \c slots may cause compiler warnings and errors when compiled
+ alongside a Qt-based application. To solve this problem, \c
+ #undef the offending preprocessor symbol.
+
+ \section1 Meta-Object Information
+
+ The meta-object compiler (\l moc) parses the class declaration in
+ a C++ file and generates C++ code that initializes the
+ meta-object. The meta-object contains the names of all the signal
+ and slot members, as well as pointers to these functions.
+
+ The meta-object contains additional information such as the
+ object's \link QObject::className() class name\endlink. You can
+ also check if an object \link QObject::inherits()
+ inherits\endlink a specific class, for example:
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 5
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 6
+
+ The meta-object information is also used by qobject_cast<T>(), which
+ is similar to QObject::inherits() but is less error-prone:
+
+ \snippet doc/src/snippets/signalsandslots/signalsandslots.cpp 7
+
+ See \l{Meta-Object System} for more information.
+
+ \section1 A Real Example
+
+ Here is a simple commented example of a widget.
+
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 0
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 1
+ \codeline
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 2
+ \codeline
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 3
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 4
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 5
+
+ \c LcdNumber inherits QObject, which has most of the signal-slot
+ knowledge, via QFrame and QWidget. It is somewhat similar to the
+ built-in QLCDNumber widget.
+
+ The Q_OBJECT macro is expanded by the preprocessor to declare
+ several member functions that are implemented by the \c{moc}; if
+ you get compiler errors along the lines of "undefined reference
+ to vtable for \c{LcdNumber}", you have probably forgotten to
+ \l{moc}{run the moc} or to include the moc output in the link
+ command.
+
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 6
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 7
+
+ It's not obviously relevant to the moc, but if you inherit
+ QWidget you almost certainly want to have the \c parent argument
+ in your constructor and pass it to the base class's constructor.
+
+ Some destructors and member functions are omitted here; the \c
+ moc ignores member functions.
+
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 8
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 9
+
+ \c LcdNumber emits a signal when it is asked to show an impossible
+ value.
+
+ If you don't care about overflow, or you know that overflow
+ cannot occur, you can ignore the \c overflow() signal, i.e. don't
+ connect it to any slot.
+
+ If on the other hand you want to call two different error
+ functions when the number overflows, simply connect the signal to
+ two different slots. Qt will call both (in arbitrary order).
+
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 10
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 11
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 12
+ \codeline
+ \snippet doc/src/snippets/signalsandslots/lcdnumber.h 13
+
+ A slot is a receiving function used to get information about
+ state changes in other widgets. \c LcdNumber uses it, as the code
+ above indicates, to set the displayed number. Since \c{display()}
+ is part of the class's interface with the rest of the program,
+ the slot is public.
+
+ Several of the example programs connect the
+ \l{QScrollBar::valueChanged()}{valueChanged()} signal of a
+ QScrollBar to the \c display() slot, so the LCD number
+ continuously shows the value of the scroll bar.
+
+ Note that \c display() is overloaded; Qt will select the
+ appropriate version when you connect a signal to the slot. With
+ callbacks, you'd have to find five different names and keep track
+ of the types yourself.
+
+ Some irrelevant member functions have been omitted from this
+ example.
+
+ \section1 Advanced Signals and Slots Usage
+
+ For cases where you may require information on the sender of the
+ signal, Qt provides the QObject::sender() function, which returns
+ a pointer to the object that sent the signal.
+
+ The QSignalMapper class is provided for situations where many
+ signals are connected to the same slot and the slot needs to
+ handle each signal differently.
+
+ Suppose you have three push buttons that determine which file you
+ will open: "Tax File", "Accounts File", or "Report File".
+
+ In order to open the correct file, you use QSignalMapper::setMapping() to
+ map all the clicked() signals to a QSignalMapper object. Then you connect
+ the file's QPushButton::clicked() signal to the QSignalMapper::map() slot.
+
+ \snippet doc/src/snippets/signalmapper/filereader.cpp 0
+
+ Then, you connect the \l{QSignalMapper::}{mapped()} signal to
+ \c{readFile()} where a different file will be opened, depending on
+ which push button is pressed.
+
+ \snippet doc/src/snippets/signalmapper/filereader.cpp 1
+
+ \sa {Meta-Object System}, {Qt's Property System}
+
+ \target 3rd Party Signals and Slots
+ \section2 Using Qt with 3rd Party Signals and Slots
+
+ It is possible to use Qt with a 3rd party signal/slot mechanism.
+ You can even use both mechanisms in the same project. Just add the
+ following line to your qmake project (.pro) file.
+
+ \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+
+ It tells Qt not to define the moc keywords \c{signals}, \c{slots},
+ and \c{emit}, because these names will be used by a 3rd party
+ library, e.g. Boost. Then to continue using Qt signals and slots
+ with the \c{no_keywords} flag, simply replace all uses of the Qt
+ moc keywords in your sources with the corresponding Qt macros
+ Q_SIGNALS (or Q_SIGNAL), Q_SLOTS (or Q_SLOT), and Q_EMIT.
+*/
diff --git a/doc/src/snippets/accessibilityfactorysnippet.cpp b/doc/src/snippets/accessibilityfactorysnippet.cpp
new file mode 100644
index 0000000..1dbc38a
--- /dev/null
+++ b/doc/src/snippets/accessibilityfactorysnippet.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+//! [0]
+QAccessibleInterface *sliderFactory(const QString &classname, QObject *object)
+{
+ QAccessibleInterface *interface = 0;
+
+ if (classname == "QSlider" && object && object->isWidgetType())
+ interface = new SliderInterface(classname,
+ static_cast<QWidget *>(object));
+
+ return interface;
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ QAccessible::installFactory(sliderFactory);
+//! [0]
+
+ QMainWindow mainWindow;
+ mainWindow.show();
+
+ return app.exec();
+//! [1]
+}
+//! [1]
diff --git a/doc/src/snippets/accessibilitypluginsnippet.cpp b/doc/src/snippets/accessibilitypluginsnippet.cpp
new file mode 100644
index 0000000..228f11c
--- /dev/null
+++ b/doc/src/snippets/accessibilitypluginsnippet.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class SliderPlugin : public QAccessiblePlugin
+{
+public:
+ SliderPlugin() {}
+
+ QStringList keys() const;
+ QAccessibleInterface *create(const QString &classname, QObject *object);
+};
+
+//! [0]
+QStringList SliderPlugin::keys() const
+{
+ return QStringList() << "QSlider";
+}
+//! [0]
+
+//! [1]
+QAccessibleInterface *SliderPlugin::create(const QString &classname, QObject *object)
+{
+ QAccessibleInterface *interface = 0;
+
+ if (classname == "QSlider" && object && object->isWidgetType())
+ interface = new AccessibleSlider(classname, static_cast<QWidget *>(object));
+
+ return interface;
+}
+//! [1]
+
+//! [2]
+Q_EXPORT_STATIC_PLUGIN(SliderPlugin)
+Q_EXPORT_PLUGIN2(acc_sliderplugin, SliderPlugin)
+//! [2]
diff --git a/doc/src/snippets/accessibilityslidersnippet.cpp b/doc/src/snippets/accessibilityslidersnippet.cpp
new file mode 100644
index 0000000..5c4b7fb
--- /dev/null
+++ b/doc/src/snippets/accessibilityslidersnippet.cpp
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+//! [0]
+QAccessibleSlider::QAccessibleSlider(QWidget *w)
+: QAccessibleAbstractSlider(w)
+{
+ Q_ASSERT(slider());
+ addControllingSignal(QLatin1String("valueChanged(int)"));
+}
+//! [0]
+
+QSlider *QAccessibleSlider::slider() const
+{
+ return qobject_cast<QSlider*>(object());
+}
+
+//! [1]
+QRect QAccessibleSlider::rect(int child) const
+{
+//! [1]
+ QRect rect;
+ if (!slider()->isVisible())
+ return rect;
+ const QStyleOptionSlider option = qt_qsliderStyleOption(slider());
+ QRect srect = slider()->style()->subControlRect(QStyle::CC_Slider, &option,
+ QStyle::SC_SliderHandle, slider());
+
+//! [2]
+ switch (child) {
+ case PageLeft:
+ if (slider()->orientation() == Qt::Vertical)
+ rect = QRect(0, 0, slider()->width(), srect.y());
+ else
+ rect = QRect(0, 0, srect.x(), slider()->height());
+ break;
+ case Position:
+ rect = srect;
+ break;
+ case PageRight:
+ if (slider()->orientation() == Qt::Vertical)
+ rect = QRect(0, srect.y() + srect.height(), slider()->width(), slider()->height()- srect.y() - srect.height());
+ else
+ rect = QRect(srect.x() + srect.width(), 0, slider()->width() - srect.x() - srect.width(), slider()->height());
+ break;
+ default:
+ return QAccessibleAbstractSlider::rect(child);
+ }
+//! [2] //! [3]
+
+ QPoint tp = slider()->mapToGlobal(QPoint(0,0));
+ return QRect(tp.x() + rect.x(), tp.y() + rect.y(), rect.width(), rect.height());
+}
+//! [3]
+
+int QAccessibleSlider::childCount() const
+{
+ if (!slider()->isVisible())
+ return 0;
+ return PageRight;
+}
+
+//! [4]
+QString QAccessibleSlider::text(Text t, int child) const
+{
+ if (!slider()->isVisible())
+ return QString();
+ switch (t) {
+ case Value:
+ if (!child || child == 2)
+ return QString::number(slider()->value());
+ return QString();
+ case Name:
+ switch (child) {
+ case PageLeft:
+ return slider()->orientation() == Qt::Horizontal ?
+ QSlider::tr("Page left") : QSlider::tr("Page up");
+ case Position:
+ return QSlider::tr("Position");
+ case PageRight:
+ return slider()->orientation() == Qt::Horizontal ?
+ QSlider::tr("Page right") : QSlider::tr("Page down");
+ }
+ break;
+ default:
+ break;
+ }
+ return QAccessibleAbstractSlider::text(t, child);
+}
+//! [4]
+
+//! [5]
+QAccessible::Role QAccessibleSlider::role(int child) const
+{
+ switch (child) {
+ case PageLeft:
+ case PageRight:
+ return PushButton;
+ case Position:
+ return Indicator;
+ default:
+ return Slider;
+ }
+}
+//! [5]
+
+//! [6]
+QAccessible::State QAccessibleSlider::state(int child) const
+{
+ const State parentState = QAccessibleAbstractSlider::state(0);
+//! [6]
+
+ if (child == 0)
+ return parentState;
+
+ // Inherit the Invisible state from parent.
+ State state = parentState & QAccessible::Invisible;
+
+ // Disable left/right if we are at the minimum/maximum.
+ const QSlider * const slider = QAccessibleSlider::slider();
+//! [7]
+ switch (child) {
+ case PageLeft:
+ if (slider->value() <= slider->minimum())
+ state |= Unavailable;
+ break;
+ case PageRight:
+ if (slider->value() >= slider->maximum())
+ state |= Unavailable;
+ break;
+ case Position:
+ default:
+ break;
+ }
+
+ return state;
+}
+//! [7]
+
+int QAccessibleSlider::defaultAction(int child) const
+{
+ switch (child) {
+ case SliderSelf:
+ return SetFocus;
+ case PageLeft:
+ return Press;
+ case PageRight:
+ return Press;
+ }
+
+ return 0;
+}
+
+// Name, Description, Value, Help, Accelerator
+static const char * const actionTexts[][5] =
+{
+ {"Press", "Decreases the value of the slider", "", "", "Ctrl+L"},
+ {"Press", "Increaces the value of the slider", "", "", "Ctrl+R"}
+};
+
+QString QAccessibleSlider::actionText(int action, Text text, int child) const
+{
+ if (action != Press || child < 1 || child > 2)
+ return QAccessibleAbstractSlider::actionText(action, text, child);
+
+ return actionTexts[child - 1][t];
+}
+
+bool QAccessibleSlider::doAction(int action, int child)
+{
+ if (action != Press || child < 1 || child > 2)
+ return false;
+
+ if (child == PageLeft)
+ slider()->setValue(slider()->value() - slider()->pageStep());
+ else
+ slider()->setValue(slider()->value() + slider()->pageStep());
+}
+
+QAccessibleAbstractSlider::QAccessibleAbstractSlider(QWidget *w, Role r)
+ : QAccessibleWidgetEx(w, r)
+{
+ Q_ASSERT(qobject_cast<QAbstractSlider *>(w));
+}
+
+QVariant QAccessibleAbstractSlider::invokeMethodEx(Method method, int child, const QVariantList &params)
+{
+ switch (method) {
+ case ListSupportedMethods: {
+ QSet<QAccessible::Method> set;
+ set << ListSupportedMethods;
+ return qVariantFromValue(set | qvariant_cast<QSet<QAccessible::Method> >(
+ QAccessibleWidgetEx::invokeMethodEx(method, child, params)));
+ }
+ default:
+ return QAccessibleWidgetEx::invokeMethodEx(method, child, params);
+ }
+}
+
+QVariant QAccessibleAbstractSlider::currentValue()
+{
+ return abstractSlider()->value();
+}
+
+void QAccessibleAbstractSlider::setCurrentValue(const QVariant &value)
+{
+ abstractSlider()->setValue(value.toInt());
+}
+
+QVariant QAccessibleAbstractSlider::maximumValue()
+{
+ return abstractSlider()->maximum();
+}
+
+QVariant QAccessibleAbstractSlider::minimumValue()
+{
+ return abstractSlider()->minimum();
+}
+
+QAbstractSlider *QAccessibleAbstractSlider::abstractSlider() const
+{
+ return static_cast<QAbstractSlider *>(object());
+}
diff --git a/doc/src/snippets/alphachannel.cpp b/doc/src/snippets/alphachannel.cpp
new file mode 100644
index 0000000..7783271
--- /dev/null
+++ b/doc/src/snippets/alphachannel.cpp
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qapplication.h>
+#include <qlabel.h>
+#include <qpixmap.h>
+#include <qprinter.h>
+#include <qpainter.h>
+#include <qfile.h>
+#include <qdir.h>
+#include <qfileinfo.h>
+
+#if (QT_VERSION) >= 0x040000
+#include <QtGui>
+#include <QtCore>
+#endif
+
+class MyClass : public QWidget
+{
+public:
+ MyClass(QWidget *parent = 0) : QWidget(parent) { }
+
+protected:
+ void paintEvent(QPaintEvent *e)
+ {
+ /*QRadialGradient rg(50, 50, 50, 50, 50);
+ rg.setColorAt(0, QColor::fromRgbF(1, 0, 0, 1));
+ rg.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0));
+ QPainter pmp(&pm);
+ pmp.fillRect(0, 0, 100, 100, rg);
+ pmp.end();*/
+
+ createImage();
+
+ QPainter p(this);
+ p.fillRect(rect(), Qt::white);
+
+ p.drawPixmap(0, 0, pixmap);
+
+ p.drawPixmap(100, 0, channelImage);
+ }
+
+ void createImage()
+ {
+//! [0]
+ pixmap = QPixmap(100, 100);
+ pixmap.fill(Qt::transparent);
+
+ QRadialGradient gradient(50, 50, 50, 50, 50);
+ gradient.setColorAt(0, QColor::fromRgbF(1, 0, 0, 1));
+ gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0));
+ QPainter painter(&pixmap);
+ painter.fillRect(0, 0, 100, 100, gradient);
+
+ channelImage = pixmap.alphaChannel();
+ update();
+//! [0]
+ }
+
+ QPixmap channelImage, pixmap;
+ QSize sizeHint() const { return QSize(500, 500); }
+};
+
+
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ MyClass cl;
+ cl.show();
+ QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+
+ int ret = app.exec();
+ return ret;
+}
diff --git a/doc/src/snippets/audioeffects.cpp b/doc/src/snippets/audioeffects.cpp
new file mode 100644
index 0000000..febf349
--- /dev/null
+++ b/doc/src/snippets/audioeffects.cpp
@@ -0,0 +1,42 @@
+#include <QtGui>
+
+#include <phonon/audiooutput.h>
+#include <phonon/mediaobject.h>
+#include <phonon/backendcapabilities.h>
+#include <phonon/effect.h>
+#include <phonon/effectwidget.h>
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ app.setApplicationName("Audio effect tester");
+
+ Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
+ mediaObject->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
+
+ Phonon::AudioOutput *audioOutput =
+ new Phonon::AudioOutput(Phonon::MusicCategory);
+
+//! [0]
+ QList<Phonon::EffectDescription> effectDescriptions =
+ Phonon::BackendCapabilities::availableAudioEffects();
+ Phonon::EffectDescription effectDescription = effectDescriptions.at(4);
+
+ Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
+
+//! [1]
+ Phonon::Effect *effect = new Phonon::Effect(effectDescription);
+ path.insertEffect(effect);
+//! [0]
+
+ Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect);
+ effectWidget->show();
+//! [1]
+
+ mediaObject->play();
+
+ effectWidget->setWindowTitle("Effect Name: " + effectDescription.name());
+
+ app.exec();
+}
diff --git a/doc/src/snippets/brush/brush.cpp b/doc/src/snippets/brush/brush.cpp
new file mode 100644
index 0000000..c4583c0
--- /dev/null
+++ b/doc/src/snippets/brush/brush.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main()
+{
+ QWidget anyPaintDevice;
+ {
+ // PEN SNIPPET
+ QPainter painter;
+ QPen pen(Qt::red, 2); // red solid line, 2 pixels wide
+ painter.begin(&anyPaintDevice); // paint something
+ painter.setPen(pen); // set the red, wide pen
+ painter.drawRect(40,30, 200,100); // draw a rectangle
+ painter.setPen(Qt::blue); // set blue pen, 0 pixel width
+ painter.drawLine(40,30, 240,130); // draw a diagonal in rectangle
+ painter.end(); // painting done
+ }
+
+ {
+ // BRUSH SNIPPET
+ QPainter painter;
+ QBrush brush(Qt::yellow); // yellow solid pattern
+ painter.begin(&anyPaintDevice); // paint something
+ painter.setBrush(brush); // set the yellow brush
+ painter.setPen(Qt::NoPen); // do not draw outline
+ painter.drawRect(40,30, 200,100); // draw filled rectangle
+ painter.setBrush(Qt::NoBrush); // do not fill
+ painter.setPen(Qt::black); // set black pen, 0 pixel width
+ painter.drawRect(10,10, 30,20); // draw rectangle outline
+ painter.end(); // painting done
+ }
+
+ // LINEAR
+//! [0]
+ QLinearGradient linearGrad(QPointF(100, 100), QPointF(200, 200));
+ linearGrad.setColorAt(0, Qt::black);
+ linearGrad.setColorAt(1, Qt::white);
+//! [0]
+
+ // RADIAL
+//! [1]
+ QRadialGradient radialGrad(QPointF(100, 100), 100);
+ radialGrad.setColorAt(0, Qt::red);
+ radialGrad.setColorAt(0.5, Qt::blue);
+ radialGrad.setColorAt(1, Qt::green);
+//! [1]
+}
diff --git a/doc/src/snippets/brush/brush.pro b/doc/src/snippets/brush/brush.pro
new file mode 100644
index 0000000..6a5f0da
--- /dev/null
+++ b/doc/src/snippets/brush/brush.pro
@@ -0,0 +1 @@
+SOURCES += brush.cpp
diff --git a/doc/src/snippets/brush/gradientcreationsnippet.cpp b/doc/src/snippets/brush/gradientcreationsnippet.cpp
new file mode 100644
index 0000000..a7a50ef
--- /dev/null
+++ b/doc/src/snippets/brush/gradientcreationsnippet.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//! [0]
+ QRadialGradient gradient(50, 50, 50, 50, 50);
+ gradient.setColorAt(0, QColor::fromRgbF(0, 1, 0, 1));
+ gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0));
+
+ QBrush brush(gradient);
+//! [0]
+
+ QWidget widget;
+ QPalette palette;
+ palette.setBrush(widget.backgroundRole(), brush);
+ widget.setPalette(palette);
+ widget.show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/brushstyles/brushstyles.pro b/doc/src/snippets/brushstyles/brushstyles.pro
new file mode 100644
index 0000000..80de531
--- /dev/null
+++ b/doc/src/snippets/brushstyles/brushstyles.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed Dec 14 11:46:57 2005
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += renderarea.h stylewidget.h
+SOURCES += main.cpp renderarea.cpp stylewidget.cpp
diff --git a/doc/src/snippets/brushstyles/main.cpp b/doc/src/snippets/brushstyles/main.cpp
new file mode 100644
index 0000000..ed32fc3
--- /dev/null
+++ b/doc/src/snippets/brushstyles/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "stylewidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ StyleWidget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/brushstyles/qt-logo.png b/doc/src/snippets/brushstyles/qt-logo.png
new file mode 100644
index 0000000..2dc6716
--- /dev/null
+++ b/doc/src/snippets/brushstyles/qt-logo.png
Binary files differ
diff --git a/doc/src/snippets/brushstyles/renderarea.cpp b/doc/src/snippets/brushstyles/renderarea.cpp
new file mode 100644
index 0000000..0be6c71
--- /dev/null
+++ b/doc/src/snippets/brushstyles/renderarea.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "renderarea.h"
+
+RenderArea::RenderArea(QBrush *brush, QWidget *parent)
+ : QWidget(parent)
+{
+ currentBrush = brush;
+}
+
+QSize RenderArea::minimumSizeHint() const
+{
+ return QSize(120, 60);
+}
+
+void RenderArea::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(Qt::NoPen);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+
+ if(currentBrush->style() == Qt::LinearGradientPattern) {
+ currentBrush = new QBrush(QLinearGradient(0, 0, width(), 60));
+ } else if(currentBrush->style() == Qt::RadialGradientPattern) {
+ QRadialGradient radial(width() / 2, 30, width() / 2, width() / 2, 30);
+ radial.setColorAt(0, Qt::white);
+ radial.setColorAt(1, Qt::black);
+ currentBrush = new QBrush(radial);
+ } else if(currentBrush->style() == Qt::ConicalGradientPattern) {
+ currentBrush = new QBrush(QConicalGradient(width() / 2, 30, 90));
+ }
+ painter.setBrush(*currentBrush);
+
+ QPainterPath path;
+ path.addRect(0, 0, parentWidget()->width(), 60);
+ painter.drawPath(path);
+}
diff --git a/doc/src/snippets/brushstyles/renderarea.h b/doc/src/snippets/brushstyles/renderarea.h
new file mode 100644
index 0000000..5a1df67
--- /dev/null
+++ b/doc/src/snippets/brushstyles/renderarea.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERAREA_H
+#define RENDERAREA_H
+
+#include <QWidget>
+
+class RenderArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ RenderArea(QBrush *brush, QWidget *parent = 0);
+ QSize minimumSizeHint() const;
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QBrush *currentBrush;
+};
+
+#endif
diff --git a/doc/src/snippets/brushstyles/stylewidget.cpp b/doc/src/snippets/brushstyles/stylewidget.cpp
new file mode 100644
index 0000000..21ff711
--- /dev/null
+++ b/doc/src/snippets/brushstyles/stylewidget.cpp
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stylewidget.h"
+
+StyleWidget::StyleWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ solid = new RenderArea(new QBrush(Qt::SolidPattern));
+ dense1 = new RenderArea(new QBrush(Qt::Dense1Pattern));
+ dense2 = new RenderArea(new QBrush(Qt::Dense2Pattern));
+ dense3 = new RenderArea(new QBrush(Qt::Dense3Pattern));
+ dense4 = new RenderArea(new QBrush(Qt::Dense4Pattern));
+ dense5 = new RenderArea(new QBrush(Qt::Dense5Pattern));
+ dense6 = new RenderArea(new QBrush(Qt::Dense6Pattern));
+ dense7 = new RenderArea(new QBrush(Qt::Dense7Pattern));
+ no = new RenderArea(new QBrush(Qt::NoBrush));
+ hor = new RenderArea(new QBrush(Qt::HorPattern));
+ ver = new RenderArea(new QBrush(Qt::VerPattern));
+ cross = new RenderArea(new QBrush(Qt::CrossPattern));
+ bdiag = new RenderArea(new QBrush(Qt::BDiagPattern));
+ fdiag = new RenderArea(new QBrush(Qt::FDiagPattern));
+ diagCross = new RenderArea(new QBrush(Qt::DiagCrossPattern));
+ linear = new RenderArea(new QBrush(QLinearGradient()));
+ radial = new RenderArea(new QBrush(QRadialGradient()));
+ conical = new RenderArea(new QBrush(QConicalGradient()));
+ texture = new RenderArea(new QBrush(QPixmap("qt-logo.png")));
+
+ solidLabel = new QLabel("Qt::SolidPattern");
+ dense1Label = new QLabel("Qt::Dense1Pattern");
+ dense2Label = new QLabel("Qt::Dense2Pattern");
+ dense3Label = new QLabel("Qt::Dense3Pattern");
+ dense4Label = new QLabel("Qt::Dense4Pattern");
+ dense5Label = new QLabel("Qt::Dense5Pattern");
+ dense6Label = new QLabel("Qt::Dense6Pattern");
+ dense7Label = new QLabel("Qt::Dense7Pattern");
+ noLabel = new QLabel("Qt::NoPattern");
+ horLabel = new QLabel("Qt::HorPattern");
+ verLabel = new QLabel("Qt::VerPattern");
+ crossLabel = new QLabel("Qt::CrossPattern");
+ bdiagLabel = new QLabel("Qt::BDiagPattern");
+ fdiagLabel = new QLabel("Qt::FDiagPattern");
+ diagCrossLabel = new QLabel("Qt::DiagCrossPattern");
+ linearLabel = new QLabel("Qt::LinearGradientPattern");
+ radialLabel = new QLabel("Qt::RadialGradientPattern");
+ conicalLabel = new QLabel("Qt::ConicalGradientPattern");
+ textureLabel = new QLabel("Qt::TexturePattern");
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(solid, 0, 0);
+ layout->addWidget(dense1, 0, 1);
+ layout->addWidget(dense2, 0, 2);
+ layout->addWidget(solidLabel, 1, 0);
+ layout->addWidget(dense1Label, 1, 1);
+ layout->addWidget(dense2Label, 1, 2);
+
+ layout->addWidget(dense3, 2, 0 );
+ layout->addWidget(dense4, 2, 1);
+ layout->addWidget(dense5, 2, 2);
+ layout->addWidget(dense3Label, 3, 0);
+ layout->addWidget(dense4Label, 3, 1);
+ layout->addWidget(dense5Label, 3, 2);
+
+ layout->addWidget(dense6, 4, 0);
+ layout->addWidget(dense7, 4, 1);
+ layout->addWidget(no, 4, 2);
+ layout->addWidget(dense6Label, 5, 0);
+ layout->addWidget(dense7Label, 5, 1);
+ layout->addWidget(noLabel, 5, 2);
+
+ layout->addWidget(hor, 6, 0);
+ layout->addWidget(ver, 6, 1);
+ layout->addWidget(cross, 6, 2);
+ layout->addWidget(horLabel, 7, 0);
+ layout->addWidget(verLabel, 7, 1);
+ layout->addWidget(crossLabel, 7, 2);
+
+ layout->addWidget(bdiag, 8, 0);
+ layout->addWidget(fdiag, 8, 1);
+ layout->addWidget(diagCross, 8, 2);
+ layout->addWidget(bdiagLabel, 9, 0);
+ layout->addWidget(fdiagLabel, 9, 1);
+ layout->addWidget(diagCrossLabel, 9, 2);
+
+ layout->addWidget(linear, 10, 0);
+ layout->addWidget(radial, 10, 1);
+ layout->addWidget(conical, 10, 2);
+ layout->addWidget(linearLabel, 11, 0);
+ layout->addWidget(radialLabel, 11, 1);
+ layout->addWidget(conicalLabel, 11, 2);
+
+ layout->addWidget(texture, 12, 0, 1, 3);
+ layout->addWidget(textureLabel, 13, 0, 1, 3);
+
+ setLayout(layout);
+
+ QPalette newPalette = palette();
+ newPalette.setColor(QPalette::Window, Qt::white);
+ setPalette(newPalette);
+
+ setWindowTitle(tr("Brush Styles"));
+ resize(430, 605);
+}
+
+
diff --git a/doc/src/snippets/brushstyles/stylewidget.h b/doc/src/snippets/brushstyles/stylewidget.h
new file mode 100644
index 0000000..c5c3f02
--- /dev/null
+++ b/doc/src/snippets/brushstyles/stylewidget.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STYLEWIDGET_H
+#define STYLEWIDGET_H
+
+#include <QWidget>
+#include <QPainterPath>
+#include "renderarea.h"
+
+class QLabel;
+
+class StyleWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ StyleWidget(QWidget *parent = 0);
+
+private:
+ RenderArea *solid;
+ RenderArea *dense1;
+ RenderArea *dense2;
+ RenderArea *dense3;
+ RenderArea *dense4;
+ RenderArea *dense5;
+ RenderArea *dense6;
+ RenderArea *dense7;
+ RenderArea *no;
+ RenderArea *hor;
+ RenderArea *ver;
+ RenderArea *cross;
+ RenderArea *bdiag;
+ RenderArea *fdiag;
+ RenderArea *diagCross;
+ RenderArea *linear;
+ RenderArea *radial;
+ RenderArea *conical;
+ RenderArea *texture;
+
+ QLabel *solidLabel;
+ QLabel *dense1Label;
+ QLabel *dense2Label;
+ QLabel *dense3Label;
+ QLabel *dense4Label;
+ QLabel *dense5Label;
+ QLabel *dense6Label;
+ QLabel *dense7Label;
+ QLabel *noLabel;
+ QLabel *horLabel;
+ QLabel *verLabel;
+ QLabel *crossLabel;
+ QLabel *bdiagLabel;
+ QLabel *fdiagLabel;
+ QLabel *diagCrossLabel;
+ QLabel *linearLabel;
+ QLabel *radialLabel;
+ QLabel *conicalLabel;
+ QLabel *textureLabel;
+};
+#endif
diff --git a/doc/src/snippets/buffer/buffer.cpp b/doc/src/snippets/buffer/buffer.cpp
new file mode 100644
index 0000000..3df2ed0
--- /dev/null
+++ b/doc/src/snippets/buffer/buffer.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QBuffer>
+#include <QPalette>
+
+static void main_snippet()
+{
+//! [0]
+ QBuffer buffer;
+ char ch;
+
+ buffer.open(QBuffer::ReadWrite);
+ buffer.write("Qt rocks!");
+ buffer.seek(0);
+ buffer.getChar(&ch); // ch == 'Q'
+ buffer.getChar(&ch); // ch == 't'
+ buffer.getChar(&ch); // ch == ' '
+ buffer.getChar(&ch); // ch == 'r'
+//! [0]
+}
+
+static void write_datastream_snippets()
+{
+//! [1]
+ QByteArray byteArray;
+ QBuffer buffer(&byteArray);
+ buffer.open(QIODevice::WriteOnly);
+
+ QDataStream out(&buffer);
+ out << QApplication::palette();
+//! [1]
+}
+
+static void read_datastream_snippets()
+{
+ QByteArray byteArray;
+
+//! [2]
+ QPalette palette;
+ QBuffer buffer(&byteArray);
+ buffer.open(QIODevice::ReadOnly);
+
+ QDataStream in(&buffer);
+ in >> palette;
+//! [2]
+}
+
+static void bytearray_ptr_ctor_snippet()
+{
+//! [3]
+ QByteArray byteArray("abc");
+ QBuffer buffer(&byteArray);
+ buffer.open(QIODevice::WriteOnly);
+ buffer.seek(3);
+ buffer.write("def", 3);
+ buffer.close();
+ // byteArray == "abcdef"
+//! [3]
+}
+
+static void setBuffer_snippet()
+{
+//! [4]
+ QByteArray byteArray("abc");
+ QBuffer buffer;
+ buffer.setBuffer(&byteArray);
+ buffer.open(QIODevice::WriteOnly);
+ buffer.seek(3);
+ buffer.write("def", 3);
+ buffer.close();
+ // byteArray == "abcdef"
+//! [4]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ main_snippet();
+ bytearray_ptr_ctor_snippet();
+ write_datastream_snippets();
+ read_datastream_snippets();
+ setBuffer_snippet();
+ return 0;
+}
diff --git a/doc/src/snippets/buffer/buffer.pro b/doc/src/snippets/buffer/buffer.pro
new file mode 100644
index 0000000..87eab9f
--- /dev/null
+++ b/doc/src/snippets/buffer/buffer.pro
@@ -0,0 +1,14 @@
+######################################################################
+# Automatically generated by qmake (1.08a) Tue Jan 4 13:19:41 2005
+######################################################################
+
+TEMPLATE = app
+CONFIG -= moc
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += buffer.cpp
+CONFIG += qt warn_on debug create_prl link_prl
+OBJECTS_DIR=.obj/debug-shared
+MOC_DIR=.moc/debug-shared
diff --git a/doc/src/snippets/clipboard/clipboard.pro b/doc/src/snippets/clipboard/clipboard.pro
new file mode 100644
index 0000000..a26fea6
--- /dev/null
+++ b/doc/src/snippets/clipboard/clipboard.pro
@@ -0,0 +1,3 @@
+HEADERS = clipwindow.h
+SOURCES = clipwindow.cpp \
+ main.cpp
diff --git a/doc/src/snippets/clipboard/clipwindow.cpp b/doc/src/snippets/clipboard/clipwindow.cpp
new file mode 100644
index 0000000..e0eb383
--- /dev/null
+++ b/doc/src/snippets/clipboard/clipwindow.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "clipwindow.h"
+
+ClipWindow::ClipWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ clipboard = QApplication::clipboard();
+
+ QWidget *centralWidget = new QWidget(this);
+ QWidget *currentItem = new QWidget(centralWidget);
+ QLabel *mimeTypeLabel = new QLabel(tr("MIME types:"), currentItem);
+ mimeTypeCombo = new QComboBox(currentItem);
+ QLabel *dataLabel = new QLabel(tr("Data:"), currentItem);
+ dataInfoLabel = new QLabel("", currentItem);
+
+ previousItems = new QListWidget(centralWidget);
+
+//! [0]
+ connect(clipboard, SIGNAL(dataChanged()), this, SLOT(updateClipboard()));
+//! [0]
+ connect(mimeTypeCombo, SIGNAL(activated(const QString &)),
+ this, SLOT(updateData(const QString &)));
+
+ QVBoxLayout *currentLayout = new QVBoxLayout(currentItem);
+ currentLayout->addWidget(mimeTypeLabel);
+ currentLayout->addWidget(mimeTypeCombo);
+ currentLayout->addWidget(dataLabel);
+ currentLayout->addWidget(dataInfoLabel);
+ currentLayout->addStretch(1);
+
+ QHBoxLayout *mainLayout = new QHBoxLayout(centralWidget);
+ mainLayout->addWidget(currentItem, 1);
+ mainLayout->addWidget(previousItems);
+
+ setCentralWidget(centralWidget);
+ setWindowTitle(tr("Clipboard"));
+}
+
+//! [1]
+void ClipWindow::updateClipboard()
+{
+ QStringList formats = clipboard->mimeData()->formats();
+ QByteArray data = clipboard->mimeData()->data(format);
+//! [1]
+
+ mimeTypeCombo->clear();
+ mimeTypeCombo->insertStringList(formats);
+
+ int size = clipboard->mimeData()->data(formats[0]).size();
+ QListWidgetItem *newItem = new QListWidgetItem(previousItems);
+ newItem->setText(tr("%1 (%2 bytes)").arg(formats[0]).arg(size));
+
+ updateData(formats[0]);
+//! [2]
+}
+//! [2]
+
+void ClipWindow::updateData(const QString &format)
+{
+ QByteArray data = clipboard->mimeData()->data(format);
+ dataInfoLabel->setText(tr("%1 bytes").arg(data.size()));
+}
diff --git a/doc/src/snippets/clipboard/clipwindow.h b/doc/src/snippets/clipboard/clipwindow.h
new file mode 100644
index 0000000..ab3b654
--- /dev/null
+++ b/doc/src/snippets/clipboard/clipwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLIPWINDOW_H
+#define CLIPWINDOW_H
+
+#include <QMainWindow>
+
+class QClipboard;
+class QComboBox;
+class QLabel;
+class QListWidget;
+class QMimeData;
+class QWidget;
+
+class ClipWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ ClipWindow(QWidget *parent = 0);
+
+public slots:
+ void updateClipboard();
+ void updateData(const QString &format);
+
+private:
+ int currentItem;
+ QClipboard *clipboard;
+ QComboBox *mimeTypeCombo;
+ QLabel *dataInfoLabel;
+ QListWidget *previousItems;
+};
+
+#endif
diff --git a/doc/src/snippets/clipboard/main.cpp b/doc/src/snippets/clipboard/main.cpp
new file mode 100644
index 0000000..7947ff1
--- /dev/null
+++ b/doc/src/snippets/clipboard/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "clipwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ClipWindow *window = new ClipWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/code/doc.src.qtscripttools.qdoc b/doc/src/snippets/code/doc.src.qtscripttools.qdoc
new file mode 100644
index 0000000..c691f17
--- /dev/null
+++ b/doc/src/snippets/code/doc.src.qtscripttools.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+ #include <QtScriptTools>
+//! [0]
+
+
+//! [1]
+ QT += scripttools
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc
new file mode 100644
index 0000000..df1d542
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc
@@ -0,0 +1,25 @@
+//! [0]
+Outlook::Application *outlook = new Outlook::Application;
+//! [0]
+
+
+//! [1]
+Outlook::_NameSpace *session = outlook->Session();
+//! [1]
+
+
+//! [2]
+Outlook::NameSpace *session = outlook->Session();
+//! [2]
+
+
+//! [3]
+Outlook::_NameSpace *tmp = outlook->Session();
+Outlook::NameSpace *session = new Outlook::NameSpace(tmp);
+delete tmp; // or any other use of tmp: segfault
+//! [3]
+
+
+//! [4]
+Outlook::NameSpace *session = new Outlook::NameSpace(outlook->Session());
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_appicon.qdoc b/doc/src/snippets/code/doc_src_appicon.qdoc
new file mode 100644
index 0000000..c8883fe
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_appicon.qdoc
@@ -0,0 +1,23 @@
+//! [0]
+IDI_ICON1 ICON DISCARDABLE "myappico.ico"
+//! [0]
+
+
+//! [1]
+RC_FILE = myapp.rc
+//! [1]
+
+
+//! [2]
+ICON = myapp.icns
+//! [2]
+
+
+//! [3]
+kde-config --path icon
+//! [3]
+
+
+//! [4]
+gnome-config --datadir
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_assistant-manual.qdoc b/doc/src/snippets/code/doc_src_assistant-manual.qdoc
new file mode 100644
index 0000000..383bd61
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_assistant-manual.qdoc
@@ -0,0 +1,110 @@
+//! [0]
+assistant -collectionFile file
+//! [0]
+
+
+//! [1]
+<?xml version="1.0" encoding="utf-8" ?>
+<QHelpCollectionProject version="1.0">
+ <assistant>
+ <title>My Application Help</title>
+ <startPage>qthelp://com.mycompany.1_0_0/doc/index.html</startPage>
+ <currentFilter>myfilter</currentFilter>
+ <applicationIcon>application.png</applicationIcon>
+ <enableFilterFunctionality>false</enableFilterFunctionality>
+ <enableDocumentationManager>false</enableDocumentationManager>
+ <enableAddressBar visible="true">true</enableAddressBar>
+ <cacheDirectory>mycompany/myapplication</cacheDirectory>
+ <aboutMenuText>
+ <text>About My Application</text>
+ <text language="de">Über meine Applikation...</text>
+ </aboutMenuText>
+ <aboutDialog>
+ <file>about.txt</file>
+ <file language="de">ueber.txt</file>
+ <icon>about.png</icon>
+ </aboutDialog>
+ </assistant>
+ <docFiles>
+ <generate>
+ <file>
+ <input>myapplication-manual.qhp</input>
+ <output>myapplication-manual.qch</output>
+ </file>
+ </generate>
+ <register>
+ <file>myapplication-manual.qch</file>
+ </register>
+ </docFiles>
+</QHelpCollectionProject>
+//! [1]
+
+
+//! [2]
+QProcess *process = new QProcess;
+QStringList args;
+args << QLatin1String("-collectionFile")
+ << QLatin1String("mycollection.qhc")
+ << QLatin1String("-enableRemoteControl");
+process->start(QLatin1String("assistant"), args);
+if (!process->waitForStarted())
+ return;
+//! [2]
+
+
+//! [3]
+QByteArray ba;
+ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
+ba.append('\0');
+process->write(ba);
+//! [3]
+
+
+//! [4]
+QByteArray ba;
+ba.append("hide bookmarks;");
+ba.append("hide index;");
+ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
+ba.append('\0');
+process->write(ba);
+//! [4]
+
+//! [5]
+<?xml version="1.0" encoding="utf-8" ?>
+<QHelpCollectionProject version="1.0">
+ ...
+ <docFiles>
+ <register>
+ <file>myapplication-manual.qch</file>
+ <file>another-manual.qch</file>
+ </register>
+ </docFiles>
+</QHelpCollectionProject>
+//! [5]
+
+//! [6]
+assistant -collectionFile mycollection.qhc -register myapplication-manual.qch
+//! [6]
+
+//! [7]
+<?xml version="1.0" encoding="utf-8" ?>
+<QHelpCollectionProject version="1.0">
+ <assistant>
+ <title>My Application Help</title>
+ <cacheDirectory>mycompany/myapplication</cacheDirectory>
+ ...
+ </assistant>
+</QHelpCollectionProject>
+//! [7]
+
+//! [8]
+assistant -collectionFile mycollection.qhc
+//! [8]
+
+//! [9]
+%QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
+//! [9]
+
+//! [10]
+qcollectiongenerator mycollection.qhcp -o mycollection.qhc
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_atomic-operations.qdoc b/doc/src/snippets/code/doc_src_atomic-operations.qdoc
new file mode 100644
index 0000000..acda5e4
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_atomic-operations.qdoc
@@ -0,0 +1,71 @@
+//! [0]
+if (*ptr == expected) {
+ *ptr = newval;
+ return !0;
+}
+return 0;
+//! [0]
+
+
+//! [1]
+if (*ptr == expected) {
+ *ptr = newval;
+ return !0;
+}
+return 0;
+//! [1]
+
+
+//! [2]
+++(*ptr);
+return *ptr ? !0 : 0;
+//! [2]
+
+
+//! [3]
+return ++(*ptr);
+//! [3]
+
+
+//! [4]
+++(*ptr);
+return !(ControlRegister & ZeroFlag);
+//! [4]
+
+
+//! [5]
+--(*ptr);
+return *ptr ? : 0;
+//! [5]
+
+
+//! [6]
+return --(*ptr);
+//! [6]
+
+
+//! [7]
+--(*ptr);
+return !(ControlRegister & ZeroFlag);
+//! [7]
+
+
+//! [8]
+tmp = *ptr;
+*ptr = newval;
+return tmp;
+//! [8]
+
+
+//! [9]
+tmp = *ptr;
+*ptr = newval;
+return tmp;
+//! [9]
+
+
+//! [10]
+tmp = *ptr;
+*ptr += value;
+return tmp;
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_compiler-notes.qdoc b/doc/src/snippets/code/doc_src_compiler-notes.qdoc
new file mode 100644
index 0000000..12095d0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_compiler-notes.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QTDIR=C:\Progra~1\Qt
+//! [0]
+
+
+//! [1]
+/usr/vacpp/bin/makeC++SharedLib -o shr1.o cplussource1.o
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_containers.qdoc b/doc/src/snippets/code/doc_src_containers.qdoc
new file mode 100644
index 0000000..9d6ba8d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_containers.qdoc
@@ -0,0 +1,235 @@
+//! [0]
+class Employee
+{
+public:
+ Employee() {}
+ Employee(const Employee &other);
+
+ Employee &operator=(const Employee &other);
+
+private:
+ QString myName;
+ QDate myDateOfBirth;
+};
+//! [0]
+
+
+//! [1]
+QList<QString> list;
+list << "A" << "B" << "C" << "D";
+
+QListIterator<QString> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [1]
+
+
+//! [2]
+QListIterator<QString> i(list);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [2]
+
+
+//! [3]
+QMutableListIterator<int> i(list);
+while (i.hasNext()) {
+ if (i.next() % 2 != 0)
+ i.remove();
+}
+//! [3]
+
+
+//! [4]
+QMutableListIterator<int> i(list);
+i.toBack();
+while (i.hasPrevious()) {
+ if (i.previous() % 2 != 0)
+ i.remove();
+}
+//! [4]
+
+
+//! [5]
+QMutableListIterator<int> i(list);
+while (i.hasNext()) {
+ if (i.next() > 128)
+ i.setValue(128);
+}
+//! [5]
+
+
+//! [6]
+QMutableListIterator<int> i(list);
+while (i.hasNext())
+ i.next() *= 2;
+//! [6]
+
+
+//! [7]
+QMap<QString, QString> map;
+map.insert("Paris", "France");
+map.insert("Guatemala City", "Guatemala");
+map.insert("Mexico City", "Mexico");
+map.insert("Moscow", "Russia");
+...
+
+QMutableMapIterator<QString, QString> i(map);
+while (i.hasNext()) {
+ if (i.next().key().endsWith("City"))
+ i.remove();
+}
+//! [7]
+
+
+//! [8]
+QMap<int, QWidget *> map;
+QHash<int, QWidget *> hash;
+
+QMapIterator<int, QWidget *> i(map);
+while (i.hasNext()) {
+ i.next();
+ hash.insert(i.key(), i.value());
+}
+//! [8]
+
+
+//! [9]
+QMutableMapIterator<int, QWidget *> i(map);
+while (i.findNext(widget))
+ i.remove();
+//! [9]
+
+
+//! [10]
+QList<QString> list;
+list << "A" << "B" << "C" << "D";
+
+QList<QString>::iterator i;
+for (i = list.begin(); i != list.end(); ++i)
+ *i = (*i).toLower();
+//! [10]
+
+
+//! [11]
+QList<QString> list;
+list << "A" << "B" << "C" << "D";
+
+QList<QString>::iterator i = list.end();
+while (i != list.begin()) {
+ --i;
+ *i = (*i).toLower();
+}
+//! [11]
+
+
+//! [12]
+QList<QString>::const_iterator i;
+for (i = list.constBegin(); i != list.constEnd(); ++i)
+ qDebug() << *i;
+//! [12]
+
+
+//! [13]
+QMap<int, int> map;
+...
+QMap<int, int>::const_iterator i;
+for (i = map.constBegin(); i != map.constEnd(); ++i)
+ qDebug() << i.key() << ":" << i.value();
+//! [13]
+
+
+//! [14]
+// RIGHT
+const QList<int> sizes = splitter->sizes();
+QList<int>::const_iterator i;
+for (i = sizes.begin(); i != sizes.end(); ++i)
+ ...
+
+// WRONG
+QList<int>::const_iterator i;
+for (i = splitter->sizes().begin();
+ i != splitter->sizes().end(); ++i)
+ ...
+//! [14]
+
+
+//! [15]
+QLinkedList<QString> list;
+...
+QString str;
+foreach (str, list)
+ qDebug() << str;
+//! [15]
+
+
+//! [16]
+QLinkedList<QString> list;
+...
+QLinkedListIterator<QString> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [16]
+
+
+//! [17]
+QLinkedList<QString> list;
+...
+foreach (QString str, list)
+ qDebug() << str;
+//! [17]
+
+
+//! [18]
+QLinkedList<QString> list;
+...
+foreach (QString str, list) {
+ if (str.isEmpty())
+ break;
+ qDebug() << str;
+}
+//! [18]
+
+
+//! [19]
+QMap<QString, int> map;
+...
+foreach (QString str, map.keys())
+ qDebug() << str << ":" << map.value(str);
+//! [19]
+
+
+//! [20]
+QMultiMap<QString, int> map;
+...
+foreach (QString str, map.uniqueKeys()) {
+ foreach (int i, map.values(str))
+ qDebug() << str << ":" << i;
+}
+//! [20]
+
+
+//! [21]
+forever {
+ ...
+}
+//! [21]
+
+
+//! [22]
+CONFIG += no_keywords
+//! [22]
+
+
+//! [23]
+QString onlyLetters(const QString &in)
+{
+ QString out;
+ for (int j = 0; j < in.size(); ++j) {
+ if (in[j].isLetter())
+ out += in[j];
+ }
+ return out;
+}
+//! [23]
diff --git a/doc/src/snippets/code/doc_src_coordsys.qdoc b/doc/src/snippets/code/doc_src_coordsys.qdoc
new file mode 100644
index 0000000..4674e75
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_coordsys.qdoc
@@ -0,0 +1,47 @@
+//! [0]
+QPainter painter(this);
+
+painter.setPen(Qt::darkGreen);
+painter.drawRect(1, 2, 6, 4);
+//! [0]
+
+
+//! [1]
+QPainter painter(this);
+
+painter.setPen(Qt::darkGreen);
+painter.drawLine(2, 7, 6, 1);
+//! [1]
+
+
+//! [2]
+QPainter painter(this);
+painter.setRenderHint(
+ QPainter::Antialiasing);
+painter.setPen(Qt::darkGreen);
+painter.drawRect(1, 2, 6, 4);
+//! [2]
+
+
+//! [3]
+QPainter painter(this);
+painter.setRenderHint(
+ QPainter::Antialiasing);
+painter.setPen(Qt::darkGreen);
+painter.drawLine(2, 7, 6, 1);
+//! [3]
+
+
+//! [4]
+QPainter painter(this);
+painter.setWindow(QRect(-50, -50, 100, 100));
+//! [4]
+
+
+//! [5]
+int side = qMin(width(), height())
+int x = (width() - side / 2);
+int y = (height() - side / 2);
+
+painter.setViewport(x, y, side, side);
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_debug.qdoc b/doc/src/snippets/code/doc_src_debug.qdoc
new file mode 100644
index 0000000..0e8a1c5
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_debug.qdoc
@@ -0,0 +1,24 @@
+//! [0]
+qDebug() << "Widget" << widget << "at position" << widget->pos();
+//! [0]
+
+
+//! [1]
+char *alloc(int size)
+{
+ Q_ASSERT(size > 0);
+ char *ptr = new char[size];
+ Q_CHECK_PTR(ptr);
+ return ptr;
+}
+//! [1]
+
+
+//! [2]
+char *alloc(int size)
+{
+ char *ptr;
+ Q_CHECK_PTR(ptr = new char[size]); // WRONG
+ return ptr;
+}
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
new file mode 100644
index 0000000..b8bf571
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -0,0 +1,414 @@
+//! [0]
+cd /path/to/Qt
+./configure -static -prefix /path/to/Qt <other parameters>
+make sub-src
+//! [0]
+
+
+//! [1]
+cd /path/to/Qt/examples/tools/plugandpaint
+//! [1]
+
+
+//! [2]
+make clean
+PATH=/path/to/Qt/bin:$PATH
+export PATH
+qmake -config release
+make
+//! [2]
+
+
+//! [3]
+ldd ./application
+//! [3]
+
+
+//! [4]
+cd /path/to/Qt/examples/tools/plugandpaint
+//! [4]
+
+
+//! [5]
+make clean
+qmake -config release
+make
+//! [5]
+
+
+//! [6]
+cd ../plugandpaintplugins
+make clean
+qmake -config release
+make
+//! [6]
+
+
+//! [7]
+#!/bin/sh
+appname=`basename $0 | sed s,\.sh$,,`
+
+dirname=`dirname $0`
+tmp="${dirname#?}"
+
+if [ "${dirname%$tmp}" != "/" ]; then
+dirname=$PWD/$dirname
+fi
+LD_LIBRARY_PATH=$dirname
+export LD_LIBRARY_PATH
+$dirname/$appname $*
+//! [7]
+
+
+//! [8]
+DESTDIR = /path/to/Qt/plugandpaint/plugins
+//! [8]
+
+
+//! [9]
+qApp->addLibraryPath("/some/other/path");
+//! [9]
+
+
+//! [10]
+ldd ./application
+//! [10]
+
+
+//! [11]
+cd C:\path\to\Qt
+configure -static <any other options you need>
+//! [11]
+
+
+//! [12]
+nmake sub-src
+//! [12]
+
+
+//! [13]
+cd examples\tools\plugandpaint
+//! [13]
+
+
+//! [14]
+nmake clean
+qmake -config release
+nmake
+//! [14]
+
+
+//! [15]
+cd examples\tools\plugandpaint
+//! [15]
+
+
+//! [16]
+nmake clean
+qmake -config release
+nmake
+//! [16]
+
+
+//! [17]
+cd ..\plugandpaintplugins
+nmake clean
+qmake -config release
+nmake
+//! [17]
+
+
+//! [18]
+plugins\pnp_basictools.dll
+plugins\pnp_extrafilters.dll
+//! [18]
+
+
+//! [19]
+qApp->addLibraryPath("C:\some\other\path");
+//! [19]
+
+
+//! [20]
+embed_manifest_dll
+embed_manifest_exe
+//! [20]
+
+
+//! [21]
+CONFIG += embed_manifest_exe
+//! [21]
+
+
+//! [22]
+<Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
+//! [22]
+
+
+//! [23]
+CONFIG-=embed_manifest_dll
+//! [23]
+
+
+//! [24]
+depends <application executable>
+//! [24]
+
+
+//! [25]
+C:<path to Qt>\plugins
+//! [25]
+
+
+//! [26]
+CONFIG-=app_bundle
+//! [26]
+
+
+//! [27]
+cd /path/to/Qt
+./configure -static <other parameters>
+make sub-src
+//! [27]
+
+
+//! [28]
+cd /path/to/Qt/examples/tools/plugandpaint
+//! [28]
+
+
+//! [29]
+make clean
+qmake -config release
+make
+//! [29]
+
+
+//! [30]
+otool -L plugandpaint.app/Contents/MacOs/plugandpaint
+//! [30]
+
+
+//! [31]
+plugandpaint.app/Contents/MacOS/plugandpaint:
+/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
+ (compatibility version 2.0.0, current version 128.0.0)
+/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
+ (compatibility version 1.0.0, current version 10.0.0)
+/usr/lib/libz.1.dylib
+ (compatibility version 1.0.0, current version 1.2.3)
+/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
+ (compatibility version 1.0.0, current version 22.0.0)
+/usr/lib/libstdc++.6.dylib
+ (compatibility version 7.0.0, current version 7.3.0)
+/usr/lib/libgcc_s.1.dylib
+ (compatibility version 1.0.0, current version 1.0.0)
+/usr/lib/libmx.A.dylib
+ (compatibility version 1.0.0, current version 92.0.0)
+/usr/lib/libSystem.B.dylib
+ (compatibility version 1.0.0, current version 88.0.0)
+//! [31]
+
+
+//! [32]
+-lQtGui
+//! [32]
+
+
+//! [33]
+/where/static/qt/lib/is/libQtGui.a
+//! [33]
+
+
+//! [34]
+cd /path/to/Qt/examples/tools/plugandpaint
+//! [34]
+
+
+//! [35]
+make clean
+qmake -config release
+make
+//! [35]
+
+
+//! [36]
+cd ../plugandpaintplugins
+make clean
+qmake -config release
+make
+//! [36]
+
+
+//! [37]
+otool -L QtGui.framework/QtGui
+//! [37]
+
+
+//! [38]
+QtGui.framework/QtGui:
+/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
+ (compatibility version 4.0.0, current version 4.0.1)
+/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
+ (compatibility version 2.0.0, current version 128.0.0)
+/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
+ (compatibility version 1.0.0, current version 10.0.0)
+/path/to/Qt/QtCore.framework/Versions/4.0/QtCore
+ (compatibility version 4.0.0, current version 4.0.1)
+/usr/lib/libz.1.dylib
+ (compatibility version 1.0.0, current version 1.2.3)
+/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
+ (compatibility version 1.0.0, current version 22.0.0)
+/usr/lib/libstdc++.6.dylib
+ (compatibility version 7.0.0, current version 7.3.0)
+/usr/lib/libgcc_s.1.dylib
+ (compatibility version 1.0.0, current version 1.0.0)
+/usr/lib/libmx.A.dylib
+ (compatibility version 1.0.0, current version 92.0.0)
+/usr/lib/libSystem.B.dylib
+ (compatibility version 1.0.0, current version 88.0.0)
+//! [38]
+
+
+//! [39]
+mkdir plugandpaint.app/Contents/Frameworks
+cp -R /path/to/Qt/lib/QtCore.framework
+ plugandpaint.app/Contents/Frameworks
+cp -R /path/to/Qt/lib/QtGui.framework
+ plugandpaint.app/Contents/Frameworks
+//! [39]
+
+
+//! [40]
+install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
+ plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
+install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
+ plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
+//! [40]
+
+
+//! [41]
+install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
+ @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
+ plugandpaint.app/Contents/MacOs/plugandpaint
+install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
+ @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
+ plugandpaint.app/Contents/MacOs/plugandpaint
+//! [41]
+
+
+//! [42]
+install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
+ @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
+ plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
+//! [42]
+
+
+//! [43]
+mv plugins plugandpaint.app/Contents
+//! [43]
+
+
+//! [44]
+libpnp_basictools.dylib:
+libpnp_basictools.dylib
+ (compatibility version 0.0.0, current version 0.0.0)
+/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
+ (compatibility version 4.0.0, current version 4.0.1)
+/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
+ (compatibility version 2.0.0, current version 128.0.0)
+/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
+ (compatibility version 1.0.0, current version 10.0.0)
+/path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
+ (compatibility version 4.0.0, current version 4.0.1)
+/usr/lib/libz.1.dylib
+ (compatibility version 1.0.0, current version 1.2.3)
+/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
+ (compatibility version 1.0.0, current version 22.0.0)
+/usr/lib/libstdc++.6.dylib
+ (compatibility version 7.0.0, current version 7.3.0)
+/usr/lib/libgcc_s.1.dylib
+ (compatibility version 1.0.0, current version 1.0.0)
+/usr/lib/libmx.A.dylib
+ (compatibility version 1.0.0, current version 92.0.0)
+/usr/lib/libSystem.B.dylib
+ (compatibility version 1.0.0, current version 88.0.0)
+//! [44]
+
+
+//! [45]
+install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
+ @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
+ plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
+install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
+ @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
+ plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
+//! [45]
+
+
+//! [46]
+#elif defined(Q_OS_MAC)
+if (pluginsDir.dirName() == "MacOS") {
+ pluginsDir.cdUp();
+}
+#endif
+//! [46]
+
+
+//! [47]
+cp -R /path/to/Qt/plugins/imageformats
+ pluginandpaint.app/Contents/plugins
+//! [47]
+
+
+//! [48]
+install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
+ @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
+ plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
+install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
+ @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
+ plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
+//! [48]
+
+
+//! [49]
+QDir dir(QApplication::applicationDirPath());
+dir.cdUp();
+dir.cd("plugins");
+QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
+//! [49]
+
+
+//! [50]
+otool -L MyApp.app/Contents/MacOS/MyApp
+//! [50]
+
+
+//! [51]
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
+//! [51]
+
+//! [51a]
+install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
+Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
+Versions/A/QuartzCore libphonon_qt7.dylib
+//! [51a]
+
+//! [51b]
+./CONFIGURE - SDK MacOSX10.4u.sdk
+//! [51b]
+
+//! [52]
+./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
+//! [52]
+
+
+//! [53]
+QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
+CONFIG+=x86 ppc
+//! [53]
+
+
+//! [54]
+qApp->addLibraryPath("C:/customPath/plugins");
+//! [54]
diff --git a/doc/src/snippets/code/doc_src_designer-manual.qdoc b/doc/src/snippets/code/doc_src_designer-manual.qdoc
new file mode 100644
index 0000000..6730815
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_designer-manual.qdoc
@@ -0,0 +1,98 @@
+//! [0]
+CONFIG += uitools
+//! [0]
+
+
+//! [1]
+#include <QtUiTools>
+//! [1]
+
+
+//! [2]
+void on_<object name>_<signal name>(<signal parameters>);
+//! [2]
+
+
+//! [3]
+CONFIG += release
+//! [3]
+
+
+//! [4]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [4]
+
+
+//! [5]
+QT += script
+//! [5]
+
+
+//! [6]
+widget.text = 'Hi - I was built ' + new Date().toString();
+//! [6]
+
+
+//! [7]
+class MyExtension: public QObject,
+ public QdesignerContainerExtension
+{
+ Q_OBJECT
+ Q_INTERFACE(QDesignerContainerExtension)
+
+ ...
+}
+//! [7]
+
+
+//! [8]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerContainerExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+ (object))
+ return new MyContainerExtension(widget, parent);
+
+ return 0;
+}
+//! [8]
+
+
+//! [9]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MyContainerExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+}
+//! [9]
+
+
+//! [10]
+void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor)
+{
+ if (initialized)
+ return;
+
+ QExtensionManager *manager = formEditor->extensionManager();
+ Q_ASSERT(manager != 0);
+
+ manager->registerExtensions(new MyExtensionFactory(manager),
+ Q_TYPEID(QDesignerTaskMenuExtension));
+
+ initialized = true;
+}
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_dnd.qdoc b/doc/src/snippets/code/doc_src_dnd.qdoc
new file mode 100644
index 0000000..40df804
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_dnd.qdoc
@@ -0,0 +1,34 @@
+//! [0]
+void MyQt3Widget::customStartDragFunction()
+{
+ QDragObject *d = new QTextDrag( myHighlightedText(), this );
+ d->dragCopy();
+ // do NOT delete d.
+}
+//! [0]
+
+
+//! [1]
+void MyQt3Widget::dragEnterEvent(QDragEnterEvent* event)
+{
+ event->accept(
+ QTextDrag::canDecode(event) ||
+ QImageDrag::canDecode(event)
+ );
+}
+//! [1]
+
+
+//! [2]
+void MyQt3Widget::dropEvent(QDropEvent* event)
+{
+ QImage image;
+ QString text;
+
+ if ( QImageDrag::decode(event, image) ) {
+ insertImageAt(image, event->pos());
+ } else if ( QTextDrag::decode(event, text) ) {
+ insertTextAt(text, event->pos());
+ }
+}
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_emb-charinput.qdoc b/doc/src/snippets/code/doc_src_emb-charinput.qdoc
new file mode 100644
index 0000000..2539e13
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-charinput.qdoc
@@ -0,0 +1,20 @@
+//! [0]
+./configure -help
+//! [0]
+
+
+//! [1]
+configure -qt-kbd-s15000
+//! [1]
+
+
+//! [2]
+export QWS_KEYBOARD=<driver>[:<driver specific options>]
+//! [2]
+
+
+//! [3]
+export QWS_KEYBOARD="<driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]"
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc b/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc
new file mode 100644
index 0000000..3791bfc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-crosscompiling.qdoc
@@ -0,0 +1,36 @@
+//! [0]
+export PATH=path/to/cross/compiler:$PATH
+//! [0]
+
+
+//! [1]
+./configure -embedded arm -xplatform qws/linux-arm-g++ <other options>
+//! [1]
+
+
+//! [2]
+cp path/to/QtEmbedded/mkspecs/qws/linux-mips-g++/...
+ path/to/QtEmbedded/mkspecs/qws/linux-myarchitecture-g++/...
+//! [2]
+
+
+//! [3]
+cd path/to/QtEmbedded
+./configure -embedded <architecture> -qt-kbd-<keyboarddriver>
+ -qt-mouse-<mousedriver> -qt-gfx-<screendriver>
+//! [3]
+
+
+//! [4]
+cd path/to/QtEmbedded
+./configure <other options>
+ -L /path/to/libjpeg/libraries -I /path/to/libjpeg/headers
+//! [4]
+
+
+//! [5]
+cd path/to/myApplication
+qmake -project
+qmake
+make
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_emb-envvars.qdoc b/doc/src/snippets/code/doc_src_emb-envvars.qdoc
new file mode 100644
index 0000000..c242ff3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-envvars.qdoc
@@ -0,0 +1,38 @@
+//! [0]
+export QWS_DISPLAY=<driver>[:<driver specific options>]...
+ [:<display num>]
+//! [0]
+
+
+//! [1]
+export QWS_SIZE=<width>x<height>
+//! [1]
+
+
+//! [2]
+export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
+//! [2]
+
+
+//! [3]
+export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]"
+//! [3]
+
+
+//! [4]
+export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
+//! [4]
+
+
+//! [5]
+export QWS_KEYBOARD=<driver>[:<driver specific options>]
+//! [5]
+
+
+//! [6]
+export QWS_KEYBOARD="<driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]"
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_emb-features.qdoc b/doc/src/snippets/code/doc_src_emb-features.qdoc
new file mode 100644
index 0000000..e64a0ae
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-features.qdoc
@@ -0,0 +1,18 @@
+//! [0]
+configure.exe -D QT_NO_THREAD
+//! [0]
+
+
+//! [1]
+./configure -no-feature-thread
+//! [1]
+
+
+//! [2]
+configure.exe -qconfig myfile
+//! [2]
+
+
+//! [3]
+./configure -qconfig myfile
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_emb-fonts.qdoc b/doc/src/snippets/code/doc_src_emb-fonts.qdoc
new file mode 100644
index 0000000..b39cb6f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-fonts.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+name file renderer italic weight size flags
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_emb-install.qdoc b/doc/src/snippets/code/doc_src_emb-install.qdoc
new file mode 100644
index 0000000..fe53614
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-install.qdoc
@@ -0,0 +1,37 @@
+//! [0]
+cd <anywhere>
+gunzip qt-embedded-linux-commercial-src-%VERSION%.tar.gz
+tar xf qt-embedded-linux-commercial-src-%VERSION%.tar
+//! [0]
+
+
+//! [1]
+~/qt-embedded-linux-commercial-src-%VERSION%
+//! [1]
+
+
+//! [2]
+cd ~/qt-embedded-linux-commercial-src-%VERSION%
+./configure -embedded [architecture]
+//! [2]
+
+
+//! [3]
+make
+//! [3]
+
+
+//! [4]
+su -c "make install"
+//! [4]
+
+
+//! [5]
+PATH=/usr/local/Trolltech/QtEmbedded-%VERSION%/bin:$PATH
+export PATH
+//! [5]
+
+
+//! [6]
+setenv PATH /usr/local/Trolltech/QtEmbedded-%VERSION%/bin:$PATH
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_emb-performance.qdoc b/doc/src/snippets/code/doc_src_emb-performance.qdoc
new file mode 100644
index 0000000..7dcba12
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-performance.qdoc
@@ -0,0 +1,36 @@
+//! [0]
+./configure -static
+//! [0]
+
+
+//! [1]
+void *operator new[](size_t size)
+{
+ return malloc(size);
+}
+
+void *operator new(size_t size)
+{
+ return malloc(size);
+}
+
+void operator delete[](void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete[](void *ptr, size_t)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr, size_t)
+{
+ free(ptr);
+}
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
new file mode 100644
index 0000000..37eb9c6
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -0,0 +1,68 @@
+//! [0]
+ <qtopia-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse
+//! [0]
+
+
+//! [1]
+ ./configure -extra-qtopiacore-config -qt-mouse-tslib
+//! [1]
+
+
+//! [2]
+ ./configure -help
+//! [2]
+
+
+//! [3]
+ configure -qt-mouse-tslib
+//! [3]
+
+
+//! [4]
+export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
+//! [4]
+
+
+//! [5]
+export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]
+ <driver>[:<driver specific options>]"
+//! [5]
+
+
+//! [6]
+export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
+//! [6]
+
+
+//! [7]
+./configure -L <path to tslib library> -I <path to tslib headers>
+//! [7]
+
+
+//! [8]
+module_raw input
+module linear
+//! [8]
+
+
+//! [9]
+QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
+//! [9]
+
+
+//! [10]
+cat /dev/input/mouse0 | hexdump
+//! [10]
+
+
+//! [11]
+QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
+//! [11]
+
+
+//! [12]
+chmod a+rw /dev/input/mouse0
+//! [12]
+
+
diff --git a/doc/src/snippets/code/doc_src_emb-qvfb.qdoc b/doc/src/snippets/code/doc_src_emb-qvfb.qdoc
new file mode 100644
index 0000000..827c84a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-qvfb.qdoc
@@ -0,0 +1,70 @@
+//! [0]
+cd path/to/QtEmbedded
+./configure -qvfb
+make
+//! [0]
+
+
+//! [1]
+cd path/to/Qt/tools/qvfb
+make
+./qvfb
+//! [1]
+
+
+//! [2]
+cd path/to/Qt/tools/qvfb/ClamshellPhone.skin/
+//! [2]
+
+
+//! [3]
+[SkinFile]
+Up=ClamshellPhone1-5.png
+Down=ClamshellPhone1-5-pressed.png
+Closed=ClamshellPhone1-5-closed.png
+Screen=72 84 176 208
+Areas=22
+
+"Power" 0x0100000a 205 563 249 586
+"1" 0x0031 62 414 119 438
+"2" 0x0032 130 414 189 438
+"3" 0x0033 198 413 257 438
+"4" 0x0034 54 444 117 470
+"5" 0x0035 128 444 189 471
+"6" 0x0036 202 444 264 471
+"7" 0x0037 47 477 113 507
+"8" 0x0038 126 477 190 507
+"9" 0x0039 205 478 270 509
+"*" 0x002a 39 515 110 552
+"0" 0x0030 122 515 195 553
+"#" 0x0023 207 516 280 553
+"Context1" 0x01100000 137 360 108 383 123 410 90 409 60 387 63 378
+ 100 362
+"Back" 0x01000061 184 361 206 376 213 387 197 410 226 410 256 392
+ 258 381 244 369
+"Backspace" 0x01000003 68 563 113 587
+"Select" 0x01010000 160 391 172 390 181 386 184 381 180 377 173
+ 373 165 372 155 372 145 375 138 378 136
+ 382 138 387 147 390
+"Left" 0x1000012 141 390 136 385 136 381 143 375 132 371 120
+ 380 121 393 129 401
+"Down" 0x1000015 143 389 130 402 162 412 191 404 175 390
+"Right" 0x1000014 186 370 176 375 184 382 182 387 175 390 190 404
+ 201 396 202 375
+"Up" 0x1000013 133 370 143 374 176 374 185 370 169 362 149 362
+"Flip" 0x01100006 98 325 225 353
+//! [3]
+
+
+//! [4]
+cd path/to/QtEmbedded/examples/widgets/analogclock
+make
+./analogclock -qws
+//! [4]
+
+
+//! [5]
+cd path/to/QtEmbedded/examples/widgets/analogclock
+make
+./analogclock -qws -display QVFb:0
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_emb-running.qdoc b/doc/src/snippets/code/doc_src_emb-running.qdoc
new file mode 100644
index 0000000..b15cfc1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-running.qdoc
@@ -0,0 +1,61 @@
+//! [0]
+cd path/to/QtEmbedded/demos/textedit
+./textedit -qws
+//! [0]
+
+
+//! [1]
+./myfirstserverapplication -qws -display "transformed:rot90:1"
+./mysecondserverapplication -qws -display "QVFb:2"
+//! [1]
+
+
+//! [2]
+./myclientapplication -display "QVFb:2"
+//! [2]
+
+
+//! [3]
+./myserverapplication -qws -display "Multi: QVFb:0
+ QVFb:1:offset=0,0 VNC:offset=640,0 :2"
+//! [3]
+
+
+//! [4]
+./myapplication -fn helvetica
+//! [4]
+
+
+//! [5]
+./myapplication -bg blue
+//! [5]
+
+
+//! [6]
+./myapplication -btn green
+//! [6]
+
+
+//! [7]
+./myapplication -fg 'dark blue'
+//! [7]
+
+
+//! [8]
+./myapplication -name texteditapplication
+//! [8]
+
+
+//! [9]
+./myapplication -title 'Text Edit'
+//! [9]
+
+
+//! [10]
+./myapplication -geometry 300x200+50+50
+//! [10]
+
+
+//! [11]
+./myapplication -decoration windows
+//! [11]
diff --git a/doc/src/snippets/code/doc_src_emb-vnc.qdoc b/doc/src/snippets/code/doc_src_emb-vnc.qdoc
new file mode 100644
index 0000000..c35274f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-vnc.qdoc
@@ -0,0 +1,25 @@
+//! [0]
+cd path/to/QtEmbedded
+./configure -qt-gfx-vnc
+make
+//! [0]
+
+
+//! [1]
+cd path/to/QtEmbedded/examples/widgets/analogclock
+./analogclock -qws -display VNC:0
+//! [1]
+
+
+//! [2]
+vncviewer localhost:0
+//! [2]
+
+//! [Starting server]
+analogclock -qws -display VNC:0
+//! [Starting server]
+//! [Starting clients]
+calculator -display VNC:0
+scribble -display VNC:0
+imageviewer -display VNC:0
+//! [Starting clients]
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc
new file mode 100644
index 0000000..0414e50
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_activeqt_comapp.qdoc
@@ -0,0 +1,39 @@
+//! [0]
+Private Application As comappLib.Application
+Private MyApp As Boolean
+
+Private Sub UpdateList()
+ DocumentList.Clear
+ DocumentsCount.Caption = Application.documents.Count
+ For Index = 0 To Application.documents.Count - 1
+ DocumentList.AddItem (Application.documents.Item(Index).Title)
+ Next
+End Sub
+
+Private Sub Form_Load()
+ On Error GoTo CreateNew
+ Set Application = GetObject(, "comapp.Application")
+ MyApp = False
+ GoTo Initialized
+CreateNew:
+ On Error GoTo InitializeFailed
+ Set Application = New Application
+ Application.Visible = True
+ MyApp = True
+Initialized:
+ Caption = Application.id
+ UpdateList
+InitializeFailed:
+End Sub
+
+Private Sub Form_Unload(Cancel As Integer)
+ If MyApp Then
+ Application.quit
+ End If
+End Sub
+
+Private Sub NewDocument_Click()
+ Application.documents.addDocument
+ UpdateList
+End Sub
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc
new file mode 100644
index 0000000..3bdf9fa
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_activeqt_dotnet.qdoc
@@ -0,0 +1,4 @@
+//! [0]
+' VB is case insensitive, but our C++ controls are not.
+' Me.resetButton.enabled = True
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc b/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc
new file mode 100644
index 0000000..18849dd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_activeqt_menus.qdoc
@@ -0,0 +1,6 @@
+//! [0]
+<object ID="QMenus" CLASSID="CLSID:4dc3f340-a6f7-44e4-a79b-3e9217695fbd"
+CODEBASE="http://qtsoftware.com/demos/menusax.cab">
+[Object not available! Did you forget to build and register the server?]
+</object>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_ahigl.qdoc b/doc/src/snippets/code/doc_src_examples_ahigl.qdoc
new file mode 100644
index 0000000..bf29cda
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_ahigl.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+myApplication -qws -display ahigl
+//! [0]
+
+
+//! [1]
+myApplication -qws -display ahigl
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_application.qdoc b/doc/src/snippets/code/doc_src_examples_application.qdoc
new file mode 100644
index 0000000..85e04f7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_application.qdoc
@@ -0,0 +1,5 @@
+//! [0]
+application -style=windows
+application -style=motif
+application -style=cde
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
new file mode 100644
index 0000000..ba7f8eb
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
@@ -0,0 +1,19 @@
+//! [0]
+qApp->translate("ArrowPad", x)
+//! [0]
+
+
+//! [1]
+lrelease arrowpad.pro
+//! [1]
+
+
+//! [2]
+export LANG=fr
+setenv LANG fr
+//! [2]
+
+
+//! [3]
+set LANG=fr
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc b/doc/src/snippets/code/doc_src_examples_containerextension.qdoc
new file mode 100644
index 0000000..299c0dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_containerextension.qdoc
@@ -0,0 +1,4 @@
+//! [0]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc
new file mode 100644
index 0000000..299c0dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc
@@ -0,0 +1,4 @@
+//! [0]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_dropsite.qdoc b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc
new file mode 100644
index 0000000..fd949ea
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_dropsite.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+foreach(variable, container)
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc
new file mode 100644
index 0000000..2475842
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QVariant a = model->index(0, 0, QModelIndex()).data();
+//! [0]
+
+
+//! [1]
+QVariant b = model->index(1, 0, QModelIndex()).data();
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
new file mode 100644
index 0000000..4f31bc0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_hellotr.qdoc
@@ -0,0 +1,31 @@
+//! [0]
+lupdate -verbose hellotr.pro
+//! [0]
+
+
+//! [1]
+<!DOCTYPE TS><TS>
+<context>
+ <name>QPushButton</name>
+ <message>
+ <source>Hello world!</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
+//! [1]
+
+
+//! [2]
+linguist hellotr_la.ts
+//! [2]
+
+
+//! [3]
+<translation type='unfinished'></translation>
+//! [3]
+
+
+//! [4]
+<translation>Orbis, te saluto!</translation>
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc
new file mode 100644
index 0000000..3d33dff
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_icons.qdoc
@@ -0,0 +1,14 @@
+//! [0]
+if (!condition)
+ qFatal("ASSERT: "condition" in file ...");
+//! [0]
+
+
+//! [1]
+qmake "CONFIG += debug" icons.pro
+//! [1]
+
+
+//! [2]
+qmake "CONFIG += release" icons.pro
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
new file mode 100644
index 0000000..c1854ec
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
@@ -0,0 +1,24 @@
+//! [0]
+imageLabel->resize(imageLabel->pixmap()->size());
+//! [0]
+
+
+//! [1]
+if (!imageLabel->pixmap())
+ qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
+//! [1]
+
+
+//! [2]
+qmake "CONFIG += debug" foo.pro
+//! [2]
+
+
+//! [3]
+qmake "CONFIG += release" foo.pro
+//! [3]
+
+
+//! [4]
+scrollBar->setValue(int(factor * scrollBar->value()));
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc
new file mode 100644
index 0000000..f958cc9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc
@@ -0,0 +1,35 @@
+//! [0]
+var ba = new ByteArray(); // constructs an empty ByteArray
+var ba2 = new ByteArray(10); // constructs a ByteArray of length 10 (all bytes initialized to 0)
+//! [0]
+
+
+//! [1]
+for (var i = 0; i < ba.length; ++i)
+ ba[i] = 123;
+//! [1]
+
+
+//! [2]
+ba[0] = 257;
+print(ba[0]); // 1
+//! [2]
+
+
+//! [3]
+var ba3 = new ByteArray();
+print(ba3.length); // 0
+ba[0] = 64;
+print(ba3.length); // 1
+//! [3]
+
+
+//! [4]
+ba["foo"] = "Hello";
+//! [4]
+
+
+//! [5]
+var ba64 = ba.toBase64();
+print(ba64.toLatin1String());
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc
new file mode 100644
index 0000000..c74a176
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc
@@ -0,0 +1,20 @@
+//! [0]
+// file is an open QFile object.
+QDomDocument document;
+if (document.setContent(&file)) {
+
+ QDomElement documentElement = document.documentElement();
+ QString text;
+ QDomNode node = documentElement.firstChild();
+
+ while (!node.isNull()) {
+ if (node.isText())
+ text += node.nodeValue();
+ else if (node.hasChildNodes()) {
+ // Examine the node's children and read any text found.
+ ...
+ }
+ node = node.nextSibling();
+ }
+}
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
new file mode 100644
index 0000000..907f3db
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
@@ -0,0 +1,12 @@
+//! [0]
+Getting Started How to familiarize yourself with Qt Designer
+ Launching Designer Running the Qt Designer application
+ The User Interface How to interact with Qt Designer
+//! [0]
+
+
+//! [1]
+Connection Editing Mode Connecting widgets together with signals and slots
+ Connecting Objects Making connections in Qt Designer
+ Editing Connections Changing existing connections
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_svgalib.qdoc b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc
new file mode 100644
index 0000000..3b63146
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_svgalib.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+myApplication -qws -display svgalib
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc b/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc
new file mode 100644
index 0000000..299c0dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc
@@ -0,0 +1,4 @@
+//! [0]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc b/doc/src/snippets/code/doc_src_examples_textfinder.qdoc
new file mode 100644
index 0000000..349becf
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_textfinder.qdoc
@@ -0,0 +1,6 @@
+//! [0]
+CONFIG += uitools
+HEADERS = textfinder.h
+RESOURCES = textfinder.qrc
+SOURCES = textfinder.cpp main.cpp
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc b/doc/src/snippets/code/doc_src_examples_trollprint.qdoc
new file mode 100644
index 0000000..7f51a15
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_trollprint.qdoc
@@ -0,0 +1,35 @@
+//! [0]
+twoSidedEnabledRadio = new QRadioButton(tr("Enabled", "two-sided"));
+twoSidedDisabledRadio = new QRadioButton(tr("Disabled", "two-sided"));
+//! [0]
+
+
+//! [1]
+colorsEnabledRadio = new QRadioButton(tr("Enabled", "colors"), colors);
+colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
+//! [1]
+
+
+//! [2]
+/*
+ TRANSLATOR MainWindow
+
+ In this application the whole application is a MainWindow.
+ Choose Help|About from the menu bar to see some text
+ belonging to MainWindow.
+
+ ...
+//! [2]
+
+
+//! [3]
+/*
+ TRANSLATOR ZClientErrorDialog
+
+ Choose Client|Edit to reach the Client Edit dialog, then choose
+ Client Specification from the drop down list at the top and pick
+ client Bartel Leendert van der Waerden. Now check the Profile
+ checkbox and then click the Start Processing button. You should
+ now see a pop up window with the text "Error: Name too long!".
+ This window is a ZClientErrorDialog.
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_tutorial.qdoc b/doc/src/snippets/code/doc_src_examples_tutorial.qdoc
new file mode 100644
index 0000000..0b79563
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_tutorial.qdoc
@@ -0,0 +1,10 @@
+//! [0]
+qmake -project
+qmake
+//! [0]
+
+
+//! [1]
+qmake -project
+qmake
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc
new file mode 100644
index 0000000..299c0dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc
@@ -0,0 +1,4 @@
+//! [0]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_exportedfunctions.qdoc b/doc/src/snippets/code/doc_src_exportedfunctions.qdoc
new file mode 100644
index 0000000..f0e5fb5
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_exportedfunctions.qdoc
@@ -0,0 +1,17 @@
+//! [0]
+#ifdef Q_WS_X11
+void qt_x11_wait_for_window_manager(QWidget *widget);
+#endif
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ...
+ window.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&window);
+#endif
+ ...
+ return app.exec();
+}
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_gpl.qdoc b/doc/src/snippets/code/doc_src_gpl.qdoc
new file mode 100644
index 0000000..b6ef954
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_gpl.qdoc
@@ -0,0 +1,679 @@
+//! [GPL v3]
+ You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ GNU General Public License version 3, which is displayed below.
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+//! [GPL v3]
diff --git a/doc/src/snippets/code/doc_src_graphicsview.qdoc b/doc/src/snippets/code/doc_src_graphicsview.qdoc
new file mode 100644
index 0000000..4c19784
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_graphicsview.qdoc
@@ -0,0 +1,77 @@
+//! [0]
+QGraphicsScene scene;
+QGraphicsRectItem *rect = scene.addRect(QRectF(0, 0, 100, 100));
+
+QGraphicsItem *item = scene.itemAt(50, 50);
+// item == rect
+//! [0]
+
+
+//! [1]
+QGraphicsScene scene;
+myPopulateScene(&scene);
+
+QGraphicsView view(&scene);
+view.show();
+//! [1]
+
+
+//! [2]
+class View : public QGraphicsView
+{
+Q_OBJECT
+ ...
+public slots:
+ void zoomIn() { scale(1.2, 1.2); }
+ void zoomOut() { scale(1 / 1.2, 1 / 1.2); }
+ void rotateLeft() { rotate(-10); }
+ void rotateRight() { rotate(10); }
+ ...
+};
+//! [2]
+
+
+//! [3]
+QGraphicsScene scene;
+scene.addRect(QRectF(0, 0, 100, 200), QPen(Qt::black), QBrush(Qt::green));
+
+QPrinter printer;
+if (QPrintDialog(&printer).exec() == QDialog::Accepted) {
+ QPainter painter(&printer);
+ painter.setRenderHint(QPainter::Antialiasing);
+ scene.render(&painter);
+}
+//! [3]
+
+
+//! [4]
+QGraphicsScene scene;
+scene.addRect(QRectF(0, 0, 100, 200), QPen(Qt::black), QBrush(Qt::green));
+
+QPixmap pixmap;
+QPainter painter(&pixmap);
+painter.setRenderHint(QPainter::Antialiasing);
+scene.render(&painter);
+painter.end();
+
+pixmap.save("scene.png");
+//! [4]
+
+
+//! [5]
+void CustomItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ QMimeData *data = new QMimeData;
+ data->setColor(Qt::green);
+
+ QDrag *drag = new QDrag(event->widget());
+ drag->setMimeData(data);
+ drag->start();
+}
+//! [5]
+
+
+//! [6]
+QGraphicsView view(&scene);
+view.setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_groups.qdoc b/doc/src/snippets/code/doc_src_groups.qdoc
new file mode 100644
index 0000000..51c2944
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_groups.qdoc
@@ -0,0 +1,26 @@
+//! [0]
+void QPen::setStyle(Qt::PenStyle style)
+{
+ detach(); // detach from common data
+ d->style = style; // set the style member
+}
+
+void QPen::detach()
+{
+ if (d->ref != 1) {
+ ... // perform a deep copy
+ }
+}
+//! [0]
+
+
+//! [1]
+QPixmap p1, p2;
+p1.load("image.bmp");
+p2 = p1; // p1 and p2 share data
+
+QPainter paint;
+paint.begin(&p2); // cuts p2 loose from p1
+paint.drawText(0,50, "Hi");
+paint.end();
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc
new file mode 100644
index 0000000..857e70c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_i18n.qdoc
@@ -0,0 +1,155 @@
+//! [0]
+LoginWidget::LoginWidget()
+{
+ QLabel *label = new QLabel(tr("Password:"));
+ ...
+}
+//! [0]
+
+
+//! [1]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"), logwid);
+}
+//! [1]
+
+
+//! [2]
+QString FriendlyConversation::greeting(int type)
+{
+ static const char *greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[type]);
+}
+//! [2]
+
+
+//! [3]
+static const char *greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int type)
+{
+ return tr(greeting_strings[type]);
+}
+
+QString global_greeting(int type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[type]);
+}
+//! [3]
+
+
+//! [4]
+void FileCopier::showProgress(int done, int total,
+ const QString &currentFile)
+{
+ label.setText(tr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFile));
+}
+//! [4]
+
+
+//! [5]
+QString s1 = "%1 of %2 files copied. Copying: %3";
+QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
+
+qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
+qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
+//! [5]
+
+
+//! [6]
+5 of 10 files copied. Copying: somefile.txt
+Kopierer nu somefile.txt. Av totalt 10 filer er 5 kopiert.
+//! [6]
+
+
+//! [7]
+HEADERS = funnydialog.h \
+ wackywidget.h
+SOURCES = funnydialog.cpp \
+ main.cpp \
+ wackywidget.cpp
+FORMS = fancybox.ui
+TRANSLATIONS = superapp_dk.ts \
+ superapp_fi.ts \
+ superapp_no.ts \
+ superapp_se.ts
+//! [7]
+
+
+//! [8]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QTranslator qtTranslator;
+ qtTranslator.load("qt_" + QLocale::system().name(),
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ app.installTranslator(&qtTranslator);
+
+ QTranslator myappTranslator;
+ myappTranslator.load("myapp_" + QLocale::system().name());
+ app.installTranslator(&myappTranslator);
+
+ ...
+ return app.exec();
+}
+//! [8]
+
+
+//! [9]
+QString string = ...; // some Unicode text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QByteArray encodedString = codec->fromUnicode(string);
+//! [9]
+
+
+//! [10]
+QByteArray encodedString = ...; // some ISO 8859-5 encoded text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QString string = codec->toUnicode(encodedString);
+//! [10]
+
+
+//! [11]
+void Clock::setTime(const QTime &time)
+{
+ if (tr("AMPM") == "AMPM") {
+ // 12-hour clock
+ } else {
+ // 24-hour clock
+ }
+}
+//! [11]
+
+
+//! [12]
+void QWidget::changeEvent(QEvent *event)
+{
+ if (e->type() == QEvent::LanguageChange) {
+ titleLabel->setText(tr("Document Title"));
+ ...
+ okPushButton->setText(tr("&OK"));
+ } else
+ QWidget::changeEvent(event);
+}
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc
new file mode 100644
index 0000000..66bb998
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_installation.qdoc
@@ -0,0 +1,127 @@
+//! [0]
+cd /tmp
+gunzip qt-x11-opensource-desktop-%VERSION%.tar.gz # uncompress the archive
+tar xvf qt-x11-opensource-desktop-%VERSION%.tar # unpack it
+//! [0]
+
+
+//! [1]
+cd /tmp/qt-x11-opensource-desktop-%VERSION%
+./configure
+//! [1]
+
+
+//! [2]
+make
+//! [2]
+
+
+//! [3]
+make install
+//! [3]
+
+
+//! [4]
+PATH - to locate qmake, moc and other Qt tools
+//! [4]
+
+
+//! [5]
+PATH=/usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
+export PATH
+//! [5]
+
+
+//! [6]
+setenv PATH /usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
+//! [6]
+
+
+//! [7]
+PATH - to locate qmake, moc and other Qt tools
+//! [7]
+
+
+//! [8]
+C:
+cd /D C:\Qt\4.4.0-rc1
+configure
+//! [8]
+
+
+//! [9]
+configure -platform win32-msvc
+//! [9]
+
+
+//! [10]
+nmake
+//! [10]
+
+
+//! [11]
+cd /tmp
+gunzip qt-mac-opensource-desktop-%VERSION%.tar.gz # uncompress the archive
+tar xvf qt-mac-opensource-desktop-%VERSION%.tar # unpack it
+//! [11]
+
+
+//! [12]
+cd /tmp/qt-mac-opensource-desktop-%VERSION%
+./configure
+//! [12]
+
+
+//! [13]
+make
+//! [13]
+
+
+//! [14]
+sudo make -j1 install
+//! [14]
+
+
+//! [15]
+PATH - to locate qmake, moc and other Qt tools
+//! [15]
+
+
+//! [16]
+PATH=/usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
+export PATH
+//! [16]
+
+
+//! [17]
+setenv PATH /usr/local/Trolltech/Qt-%VERSION%/bin:$PATH
+//! [17]
+
+
+//! [18]
+PATH - to locate qmake, moc and other Qt tools
+//! [18]
+
+
+//! [19]
+C:
+cd \Qt\%VERSION%
+configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005
+//! [19]
+
+
+//! [20]
+set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Include\Armv4i
+set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I
+set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%
+//! [20]
+
+
+//! [21]
+setcepaths wincewm50pocket-msvc2005
+//! [21]
+
+
+//! [22]
+nmake
+//! [22]
diff --git a/doc/src/snippets/code/doc_src_introtodbus.qdoc b/doc/src/snippets/code/doc_src_introtodbus.qdoc
new file mode 100644
index 0000000..bedfe7f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_introtodbus.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+org.freedesktop.DBus
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.qdoc
new file mode 100644
index 0000000..48e10e9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_layout.qdoc
@@ -0,0 +1,119 @@
+//! [0]
+#ifndef CARD_H
+#define CARD_H
+
+#include <QLayout>
+#include <QList>
+
+class CardLayout : public QLayout
+{
+public:
+ CardLayout(QWidget *parent, int dist)
+ : QLayout(parent, 0, dist) {}
+ CardLayout(QLayout *parent, int dist)
+ : QLayout(parent, dist) {}
+ CardLayout(int dist)
+ : QLayout(dist) {}
+ ~CardLayout();
+
+ void addItem(QLayoutItem *item);
+ QSize sizeHint() const;
+ QSize minimumSize() const;
+ QLayoutItem *itemAt(int) const;
+ QLayoutItem *takeAt(int);
+ void setGeometry(const QRect &rect);
+
+private:
+ QList<QLayoutItem*> list;
+};
+#endif
+//! [0]
+
+
+//! [1]
+#include "card.h"
+//! [1]
+
+
+//! [2]
+QLayoutItem *CardLayout::itemAt(int idx) const
+{
+ // QList::value() performs index checking, and returns 0 if we are
+ // outside the valid range
+ return list.value(idx);
+}
+
+QLayoutItem *CardLayout::takeAt(int idx)
+{
+ // QList::take does not do index checking
+ return idx >= 0 && idx < list.size() ? list.takeAt(idx) : 0;
+}
+//! [2]
+
+
+//! [3]
+void CardLayout::addItem(QLayoutItem *item)
+{
+ list.append(item);
+}
+//! [3]
+
+
+//! [4]
+CardLayout::~CardLayout()
+{
+ deleteAllItems();
+}
+//! [4]
+
+
+//! [5]
+void CardLayout::setGeometry(const QRect &r)
+{
+ QLayout::setGeometry(r);
+
+ if (list.size() == 0)
+ return;
+
+ int w = r.width() - (list.count() - 1) * spacing();
+ int h = r.height() - (list.count() - 1) * spacing();
+ int i = 0;
+ while (i < list.size()) {
+ QLayoutItem *o = list.at(i);
+ QRect geom(r.x() + i * spacing(), r.y() + i * spacing(), w, h);
+ o->setGeometry(geom);
+ ++i;
+ }
+}
+//! [5]
+
+
+//! [6]
+QSize CardLayout::sizeHint() const
+{
+ QSize s(0,0);
+ int n = list.count();
+ if (n > 0)
+ s = QSize(100,70); //start with a nice default size
+ int i = 0;
+ while (i < n) {
+ QLayoutItem *o = list.at(i);
+ s = s.expandedTo(o->sizeHint());
+ ++i;
+ }
+ return s + n*QSize(spacing(), spacing());
+}
+
+QSize CardLayout::minimumSize() const
+{
+ QSize s(0,0);
+ int n = list.count();
+ int i = 0;
+ while (i < n) {
+ QLayoutItem *o = list.at(i);
+ s = s.expandedTo(o->minimumSize());
+ ++i;
+ }
+ return s + n*QSize(spacing(), spacing());
+}
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_lgpl.qdoc b/doc/src/snippets/code/doc_src_lgpl.qdoc
new file mode 100644
index 0000000..dc76d85
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_lgpl.qdoc
@@ -0,0 +1,507 @@
+//! [LGPL v2.1]
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+//! [LGPL v2.1]
diff --git a/doc/src/snippets/code/doc_src_licenses.qdoc b/doc/src/snippets/code/doc_src_licenses.qdoc
new file mode 100644
index 0000000..4a95a50
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_licenses.qdoc
@@ -0,0 +1,108 @@
+//! [1]
+ [utopiafonts] 1999 free font
+ ----------------------------------------------------
+
+ this font is provided free for personal or commercial use,
+ it can be redistributed however it may not be sold.
+ ----------------------------------------------------
+ (C) 1999 utopiafonts. dale_thorpe@bssc.edu.au
+//! [1]
+
+
+//! [2]
+ Bitstream Vera Fonts Copyright
+ ------------------------------
+
+ Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
+ a trademark of Bitstream, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of the fonts accompanying this license ("Fonts") and associated
+ documentation files (the "Font Software"), to reproduce and distribute the
+ Font Software, including without limitation the rights to use, copy, merge,
+ publish, distribute, and/or sell copies of the Font Software, and to permit
+ persons to whom the Font Software is furnished to do so, subject to the
+ following conditions:
+
+ The above copyright and trademark notices and this permission notice shall
+ be included in all copies of one or more of the Font Software typefaces.
+
+ The Font Software may be modified, altered, or added to, and in particular
+ the designs of glyphs or characters in the Fonts may be modified and
+ additional glyphs or characters may be added to the Fonts, only if the fonts
+ are renamed to names not containing either the words "Bitstream" or the word
+ "Vera".
+
+ This License becomes null and void to the extent applicable to Fonts or Font
+ Software that has been modified and is distributed under the "Bitstream
+ Vera" names.
+
+ The Font Software may be sold as part of a larger software package but no
+ copy of one or more of the Font Software typefaces may be sold by itself.
+
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+ TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+ FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
+ FONT SOFTWARE.
+
+ Except as contained in this notice, the names of Gnome, the Gnome
+ Foundation, and Bitstream Inc., shall not be used in advertising or
+ otherwise to promote the sale, use or other dealings in this Font Software
+ without prior written authorization from the Gnome Foundation or Bitstream
+ Inc., respectively. For further information, contact: fonts at gnome dot
+ org.
+
+ Arev Fonts Copyright
+ ------------------------------
+
+ Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the fonts accompanying this license ("Fonts") and
+ associated documentation files (the "Font Software"), to reproduce
+ and distribute the modifications to the Bitstream Vera Font Software,
+ including without limitation the rights to use, copy, merge, publish,
+ distribute, and/or sell copies of the Font Software, and to permit
+ persons to whom the Font Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright and trademark notices and this permission notice
+ shall be included in all copies of one or more of the Font Software
+ typefaces.
+
+ The Font Software may be modified, altered, or added to, and in
+ particular the designs of glyphs or characters in the Fonts may be
+ modified and additional glyphs or characters may be added to the
+ Fonts, only if the fonts are renamed to names not containing either
+ the words "Tavmjong Bah" or the word "Arev".
+
+ This License becomes null and void to the extent applicable to Fonts
+ or Font Software that has been modified and is distributed under the
+ "Tavmjong Bah Arev" names.
+
+ The Font Software may be sold as part of a larger software package but
+ no copy of one or more of the Font Software typefaces may be sold by
+ itself.
+
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+ TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
+
+ Except as contained in this notice, the name of Tavmjong Bah shall not
+ be used in advertising or otherwise to promote the sale, use or other
+ dealings in this Font Software without prior written authorization
+ from Tavmjong Bah. For further information, contact: tavmjong @ free
+ . fr.
+
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
new file mode 100644
index 0000000..ce3b997
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
@@ -0,0 +1,183 @@
+//! [0]
+HEADERS = main-dlg.h \
+ options-dlg.h
+SOURCES = main-dlg.cpp \
+ options-dlg.cpp \
+ main.cpp
+FORMS = search-dlg.ui
+TRANSLATIONS = superapp_dk.ts \
+ superapp_fi.ts \
+ superapp_no.ts \
+ superapp_se.ts
+//! [0]
+
+
+//! [1]
+CODECFORTR = ISO-8859-5
+//! [1]
+
+
+//! [2]
+CODECFORSRC = UTF-8
+//! [2]
+
+
+//! [3]
+label->setText(tr("F\374r \310lise"));
+//! [3]
+
+
+//! [4]
+Usage:
+ lupdate [options] [project-file]
+ lupdate [options] [source-file|path]... -ts ts-files
+Options:
+ -help Display this information and exit.
+ -noobsolete
+ Drop all obsolete strings.
+ -extensions <ext>[,<ext>]...
+ Process files with the given extensions only.
+ The extension list must be separated with commas, not with whitespace.
+ Default: 'ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx'.
+ -pluralonly
+ Only include plural form messages.
+ -silent
+ Don't explain what is being done.
+ -version
+ Display the version of lupdate and exit.
+//! [4]
+
+
+//! [5]
+Usage:
+ lrelease [options] project-file
+ lrelease [options] ts-files [-qm qm-file]
+Options:
+ -help Display this information and exit
+ -compress
+ Compress the .qm files
+ -nounfinished
+ Do not include unfinished translations
+ -removeidentical
+ If the translated text is the same as
+ the source text, do not include the message
+ -silent
+ Don't explain what is being done
+ -version
+ Display the version of lrelease and exit
+//! [5]
+
+
+void wrapInFunction()
+{
+//! [6]
+button = new QPushButton("&Quit", this);
+//! [6]
+
+
+//! [7]
+button = new QPushButton(tr("&Quit"), this);
+//! [7]
+
+
+//! [8]
+QPushButton::tr("&Quit")
+//! [8]
+
+
+//! [9]
+QObject::tr("&Quit")
+//! [9]
+
+
+//! [10]
+rbc = new QRadioButton(tr("Enabled", "Color frame"), this);
+//! [10]
+
+
+//! [11]
+rbh = new QRadioButton(tr("Enabled", "Hue frame"), this);
+//! [11]
+}
+
+
+//! [12]
+/*
+ TRANSLATOR FindDialog
+
+ Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
+ Find dialog.
+
+ ...
+*/
+//! [12]
+
+//! [13]
+/*
+ TRANSLATOR MyNamespace::MyClass
+
+ Necessary for lupdate.
+
+ ...
+*/
+//! [13]
+
+//! [14]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"),
+ logwid);
+}
+//! [14]
+
+
+//! [15]
+QString FriendlyConversation::greeting(int greet_type)
+{
+ static const char* greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[greet_type]);
+}
+//! [15]
+
+
+//! [16]
+static const char* greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int greet_type)
+{
+ return tr(greeting_strings[greet_type]);
+}
+
+QString global_greeting(int greet_type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[greet_type]);
+}
+//! [16]
+
+void wrapInFunction()
+{
+
+//! [17]
+QString tr(const char *text, const char *comment, int n);
+//! [17]
+
+//! [18]
+tr("%n item(s) replaced", "", count);
+//! [18]
+
+}
+
diff --git a/doc/src/snippets/code/doc_src_mac-differences.qdoc b/doc/src/snippets/code/doc_src_mac-differences.qdoc
new file mode 100644
index 0000000..a4d9578
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.qdoc
@@ -0,0 +1,36 @@
+//! [0]
+QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
+//! [0]
+
+
+//! [1]
+#ifdef Q_WS_MAC
+ CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef,
+ kCFURLPOSIXPathStyle);
+ const char *pathPtr = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ qDebug("Path = %s", pathPtr);
+ CFRelease(appUrlRef);
+ CFRelease(macPath);
+#endif
+//! [1]
+
+
+//! [2]
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>LprojCompatibleVersion</key>
+ <string>123</string>
+ <key>LprojLocale</key>
+ <string>no</string>
+ <key>LprojRevisionLevel</key>
+ <string>1</string>
+ <key>LprojVersion</key>
+ <string>123</string>
+</dict>
+</plist>
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_moc.qdoc b/doc/src/snippets/code/doc_src_moc.qdoc
new file mode 100644
index 0000000..59739e1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_moc.qdoc
@@ -0,0 +1,124 @@
+//! [0]
+moc_%.cpp: %.h
+ moc $(DEFINES) $(INCPATH) $< -o $@
+//! [0]
+
+
+//! [1]
+moc_foo.cpp: foo.h
+ moc $(DEFINES) $(INCPATH) $< -o $@
+//! [1]
+
+
+//! [2]
+foo.o: foo.moc
+
+foo.moc: foo.cpp
+ moc $(DEFINES) $(INCPATH) -i $< -o $@
+//! [2]
+
+
+//! [3]
+#include "foo.moc"
+//! [3]
+
+
+//! [4]
+#ifndef Q_MOC_RUN
+ ...
+#endif
+//! [4]
+
+
+//! [5]
+class SomeTemplate<int> : public QFrame
+{
+ Q_OBJECT
+ ...
+
+signals:
+ void mySignal(int);
+};
+//! [5]
+
+
+//! [6]
+// correct
+class SomeClass : public QObject, public OtherClass
+{
+ ...
+};
+//! [6]
+
+
+//! [7]
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(void (*apply)(List *, void *), char *); // WRONG
+};
+//! [7]
+
+
+//! [8]
+typedef void (*ApplyFunction)(List *, void *);
+
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(ApplyFunction, char *);
+};
+//! [8]
+
+
+//! [9]
+class MyClass : public QObject
+{
+ Q_OBJECT
+
+ enum Error {
+ ConnectionRefused,
+ RemoteHostClosed,
+ UnknownError
+ };
+
+signals:
+ void stateChanged(MyClass::Error error);
+};
+//! [9]
+
+
+//! [10]
+#ifdef ultrix
+#define SIGNEDNESS(a) unsigned a
+#else
+#define SIGNEDNESS(a) a
+#endif
+
+class Whatever : public QObject
+{
+ Q_OBJECT
+
+signals:
+ void someSignal(SIGNEDNESS(int));
+};
+//! [10]
+
+
+//! [11]
+class A
+{
+public:
+ class B
+ {
+ Q_OBJECT
+
+ public slots: // WRONG
+ void b();
+ };
+};
+//! [11]
diff --git a/doc/src/snippets/code/doc_src_model-view-programming.qdoc b/doc/src/snippets/code/doc_src_model-view-programming.qdoc
new file mode 100644
index 0000000..3501ce0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_model-view-programming.qdoc
@@ -0,0 +1,36 @@
+//! [0]
+QAbstractItemModel *model = index.model();
+//! [0]
+
+
+//! [1]
+QModelIndex index = model->index(row, column, ...);
+//! [1]
+
+
+//! [2]
+QModelIndex indexA = model->index(0, 0, QModelIndex());
+QModelIndex indexB = model->index(1, 1, QModelIndex());
+QModelIndex indexC = model->index(2, 1, QModelIndex());
+//! [2]
+
+
+//! [3]
+QModelIndex index = model->index(row, column, parent);
+//! [3]
+
+
+//! [4]
+QModelIndex indexA = model->index(0, 0, QModelIndex());
+QModelIndex indexC = model->index(2, 1, QModelIndex());
+//! [4]
+
+
+//! [5]
+QModelIndex indexB = model->index(1, 0, indexA);
+//! [5]
+
+
+//! [6]
+QVariant value = model->data(index, role);
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_modules.qdoc b/doc/src/snippets/code/doc_src_modules.qdoc
new file mode 100644
index 0000000..e9006fd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_modules.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+QT -= gui
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_objecttrees.qdoc b/doc/src/snippets/code/doc_src_objecttrees.qdoc
new file mode 100644
index 0000000..216027f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_objecttrees.qdoc
@@ -0,0 +1,20 @@
+//![0]
+int main()
+{
+ QWidget window;
+ QPushButton quit("Quit", &window);
+ ...
+}
+//![0]
+
+
+//![1]
+int main()
+{
+ QPushButton quit("Quit");
+ QWidget window;
+
+ quit.setParent(&window);
+ ...
+}
+//![1]
diff --git a/doc/src/snippets/code/doc_src_phonon-api.qdoc b/doc/src/snippets/code/doc_src_phonon-api.qdoc
new file mode 100644
index 0000000..e230792
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_phonon-api.qdoc
@@ -0,0 +1,224 @@
+//! [0]
+PushStream::PushStream(QObject *parent)
+ : AbstractMediaStream(parent), m_timer(new QTimer(this))
+{
+ setStreamSize(getMediaStreamSize());
+
+ connect(m_timer, SIGNAL(timeout()), SLOT(moreData()));
+ m_timer->setInterval(0);
+}
+
+void PushStream::moreData()
+{
+ const QByteArray data = getMediaData();
+ if (data.isEmpty()) {
+ endOfData();
+ } else {
+ writeData(data);
+ }
+}
+
+void PushStream::needData()
+{
+ m_timer->start();
+ moreData();
+}
+
+void PushStream::enoughData()
+{
+ m_timer->stop();
+}
+//! [0]
+
+
+//! [1]
+PullStream::PullStream(QObject *parent)
+ : AbstractMediaStream(parent)
+{
+ setStreamSize(getMediaStreamSize());
+}
+
+void PullStream::needData()
+{
+ const QByteArray data = getMediaData();
+ if (data.isEmpty()) {
+ endOfData();
+ } else {
+ writeData(data);
+ }
+}
+//! [1]
+
+
+//! [2]
+seekStream(0);
+//! [2]
+
+
+//! [3]
+MediaObject m;
+QString fileName("/home/foo/bar.ogg");
+QUrl url("http://www.example.com/stream.mp3");
+QBuffer *someBuffer;
+m.setCurrentSource(fileName);
+m.setCurrentSource(url);
+m.setCurrentSource(someBuffer);
+m.setCurrentSource(Phonon::Cd);
+//! [3]
+
+
+//! [4]
+VideoPlayer *player = new VideoPlayer(Phonon::VideoCategory, parentWidget);
+connect(player, SIGNAL(finished()), player, SLOT(deleteLater()));
+player->play(url);
+//! [4]
+
+
+//! [5]
+audioPlayer->load(url);
+audioPlayer->play();
+//! [5]
+
+
+//! [6]
+media = new MediaObject(this);
+connect(media, SIGNAL(finished()), SLOT(slotFinished());
+media->setCurrentSource("/home/username/music/filename.ogg");
+
+...
+
+media->play();
+//! [6]
+
+
+//! [7]
+media->setCurrentSource(":/sounds/startsound.ogg");
+media->enqueue("/home/username/music/song.mp3");
+media->enqueue(":/sounds/endsound.ogg");
+//! [7]
+
+
+//! [8]
+ media->setCurrentSource(":/sounds/startsound.ogg");
+ connect(media, SIGNAL(aboutToFinish()), SLOT(enqueueNextSource()));
+}
+
+void enqueueNextSource()
+{
+ media->enqueue("/home/username/music/song.mp3");
+}
+//! [8]
+
+
+//! [9]
+int x = 200;
+media->setTickInterval(x);
+Q_ASSERT(x == producer->tickInterval());
+//! [9]
+
+
+//! [10]
+int x = 200;
+media->setTickInterval(x);
+Q_ASSERT(x >= producer->tickInterval() &&
+ x <= 2producer->tickInterval());
+//! [10]
+
+
+//! [11]
+ connect(media, SIGNAL(hasVideoChanged(bool)), hasVideoChanged(bool));
+ media->setCurrentSource("somevideo.avi");
+ media->hasVideo(); // returns false;
+}
+
+void hasVideoChanged(bool b)
+{
+ // b == true
+ media->hasVideo(); // returns true;
+}
+//! [11]
+
+
+//! [12]
+ connect(media, SIGNAL(hasVideoChanged(bool)), hasVideoChanged(bool));
+ media->setCurrentSource("somevideo.avi");
+ media->hasVideo(); // returns false;
+}
+
+void hasVideoChanged(bool b)
+{
+ // b == true
+ media->hasVideo(); // returns true;
+}
+//! [12]
+
+
+//! [13]
+setMetaArtist(media->metaData("ARTIST"));
+setMetaAlbum(media->metaData("ALBUM"));
+setMetaTitle(media->metaData("TITLE"));
+setMetaDate(media->metaData("DATE"));
+setMetaGenre(media->metaData("GENRE"));
+setMetaTrack(media->metaData("TRACKNUMBER"));
+setMetaComment(media->metaData("DESCRIPTION"));
+//! [13]
+
+
+//! [14]
+QUrl url("http://www.example.com/music.ogg");
+media->setCurrentSource(url);
+//! [14]
+
+
+//! [15]
+progressBar->setRange(0, 100); // this is the default
+connect(media, SIGNAL(bufferStatus(int)), progressBar, SLOT(setValue(int)));
+//! [15]
+
+
+//! [16]
+QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ...
+//! [16]
+
+
+//! [17]
+QComboBox *cb = new QComboBox(parentWidget);
+ObjectDescriptionModel *model = new ObjectDescriptionModel(cb);
+model->setModelData(BackendCapabilities::availableAudioOutputDevices());
+cb->setModel(model);
+cb->setCurrentIndex(0); // select first entry
+//! [17]
+
+
+//! [18]
+int cbIndex = cb->currentIndex();
+AudioOutputDevice selectedDevice = model->modelData(cbIndex);
+//! [18]
+
+
+//! [19]
+Path path = Phonon::createPath(...);
+Effect *effect = new Effect(this);
+path.insertEffect(effect);
+//! [19]
+
+
+//! [20]
+MediaObject *media = new MediaObject;
+AudioOutput *output = new AudioOutput(Phonon::MusicCategory);
+Path path = Phonon::createPath(media, output);
+Q_ASSERT(path.isValid()); // for this simple case the path should always be
+ //valid - there are unit tests to ensure it
+// insert an effect
+QList<EffectDescription> effectList = BackendCapabilities::availableAudioEffects();
+if (!effectList.isEmpty()) {
+ Effect *effect = path.insertEffect(effectList.first());
+}
+//! [20]
+
+
+//! [21]
+MediaObject *media = new MediaObject(parent);
+VideoWidget *vwidget = new VideoWidget(parent);
+Phonon::createPath(media, vwidget);
+//! [21]
diff --git a/doc/src/snippets/code/doc_src_phonon.qdoc b/doc/src/snippets/code/doc_src_phonon.qdoc
new file mode 100644
index 0000000..3e4bce4
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_phonon.qdoc
@@ -0,0 +1,13 @@
+//! [0]
+QT += phonon
+//! [0]
+
+
+//! [1]
+QT += phonon
+//! [1]
+
+
+//! [2]
+#include <Phonon/MediaObject>
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_platform-notes.qdoc b/doc/src/snippets/code/doc_src_platform-notes.qdoc
new file mode 100644
index 0000000..ed56a08
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_platform-notes.qdoc
@@ -0,0 +1,39 @@
+//! [0]
+undefined reference to `_vt.11QPushButton'
+//! [0]
+
+
+//! [1]
+ANSI C++ forbids declaration ... with no type
+//! [1]
+
+
+//! [2]
+c:\program.obj not found
+//! [2]
+
+
+//! [3]
+-universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
+//! [3]
+
+
+//! [4]
+QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
+CONFIG+=x86 ppc
+//! [4]
+
+
+//! [5]
+/usr/bin/ld: /System/Library/Frameworks/Carbon.framework/Carbon
+load command 20 unknown cmd field
+/usr/bin/ld: /usr/lib/libSystem.dylib
+load command 6 unknown cmd field
+//! [5]
+
+
+//! [6]
+ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
+/usr/local/mysql/lib/libmysqlclient.a(my_error.o) definition of common _errbuff (size 512)
+/usr/bin/libtool: internal link edit command failed
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.qdoc b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
new file mode 100644
index 0000000..45c8690
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
@@ -0,0 +1,67 @@
+//! [0]
+class MyStylePlugin : public QStylePlugin
+{
+public:
+ QStringList keys() const;
+ QStyle *create(const QString &key);
+};
+//! [0]
+
+
+//! [1]
+#include "mystyleplugin.h"
+
+QStringList MyStylePlugin::keys() const
+{
+ return QStringList() << "MyStyle";
+}
+
+QStyle *MyStylePlugin::create(const QString &key)
+{
+ if (key.toLower() == "mystyle")
+ return new MyStyle;
+ return 0;
+}
+
+Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
+//! [1]
+
+
+//! [2]
+QApplication::setStyle(QStyleFactory::create("MyStyle"));
+//! [2]
+
+
+//! [3]
+CONFIG += release
+//! [3]
+
+
+//! [4]
+#include <QApplication>
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN(qjpeg)
+Q_IMPORT_PLUGIN(qgif)
+Q_IMPORT_PLUGIN(qkrcodecs)
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
+
+
+//! [5]
+QTPLUGIN += qjpeg \
+ qgif \
+ qkrcodecs
+//! [5]
+
+
+//! [6]
+HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.debug
+HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.false
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.qdoc b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
new file mode 100644
index 0000000..0dc572c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
@@ -0,0 +1,187 @@
+//! [0]
+point = new Object();
+point.x = 12;
+point.y = 35;
+//! [0]
+
+
+//! [1]
+function manhattanLength(point) {
+ return point.x + point.y;
+}
+//! [1]
+
+
+//! [2]
+manhattanLength = function(point) {
+ return point.x + point.y;
+}
+//! [2]
+
+
+//! [3]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [3]
+
+
+//! [4]
+class Point() {
+ var x;
+ var y;
+ function manhattanLength() { return x + y; }
+}
+//! [4]
+
+
+//! [5]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [5]
+
+
+//! [6]
+class Car {
+ var regNumber;
+ function Car(regnr) {
+ regNumber = regnr;
+ }
+}
+var car = new Car("ABC 123");
+//! [6]
+
+
+//! [7]
+function Car(regnr) {
+ this.regNumber = regnr;
+}
+var car = new Car("ABC 123");
+//! [7]
+
+
+//! [8]
+var car = new Object();
+car.constructor = function(regnr) { ... }
+car.constructor();
+//! [8]
+
+
+//! [9]
+class Car {
+ var regNumber;
+ function Car(regnr) {
+ regNumber = regnr;
+ }
+ function toString() {
+ return regNumber;
+ }
+}
+//! [9]
+
+
+//! [10]
+function Car(regnr) {
+ this.regNumber = regnr;
+ this.toString = function() { return this.regNumber; }
+}
+//! [10]
+
+
+//! [11]
+function Car(regnr) {
+ this.regNumber = regnr;
+}
+Car.prototype.toString = function() { return this.regNumber; }
+//! [11]
+
+
+//! [12]
+class GasolineCar extends Car {
+ function GasolineCar(regnr) {
+ Car(regnr);
+ }
+ function toString() {
+ return "GasolineCar(" + regNumber + ")";
+ }
+}
+//! [12]
+
+
+//! [13]
+function GasolineCar(regnr) {
+ Car(regnr);
+}
+GasolineCar.prototype = new Car();
+GasolineCar.prototype.toString = function() {
+ return "GasolineCar(" + this.regNumber + ")";
+}
+//! [13]
+
+
+//! [14]
+class Car {
+ static var globalCount = 0;
+}
+print(Car.globalCount);
+//! [14]
+
+
+//! [15]
+Car.globalCount = 0;
+print(Car.globalCount);
+//! [15]
+
+
+//! [16]
+QPushButton *button = new QPushButton();
+button->setObjectName("button");
+interpreter->addTransientObject(button);
+//! [16]
+
+
+//! [17]
+QPushButton *button = new QPushButton();
+QScriptValue scriptButton = engine.newQObject(button);
+engine.globalObject().setProperty("button", scriptButton);
+//! [17]
+
+
+//! [18]
+ModuleFactory::ModuleFactory()
+{
+ registerClass( "ImageSource", &ImgSource::staticMetaObject);
+ ...
+}
+
+QObject *ModuleFactory::create( const QString &type,
+ const QVariantList &,
+ QObject * )
+{
+ if ( type == "ImageSource" )
+ return new ImgSource();
+ ...
+}
+
+...
+
+interpreter.addObjectFactory(new ModuleFactory());
+//! [18]
+
+
+//! [19]
+QScriptValue construct_QPushButton(QScriptContext *, QScriptEngine *engine) {
+ return engine->newQObject(new QPushButton());
+}
+
+...
+
+QScriptValue constructor = engine.newFunction(construct_QPushButton);
+QScriptValue value =
+ engine.newQMetaObject(&QPushButton::staticMetaObject,
+ constructor);
+engine.globalObject().setProperty("QPushButton", value);
+//! [19]
diff --git a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc b/doc/src/snippets/code/doc_src_porting4-canvas.qdoc
new file mode 100644
index 0000000..e386607
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-canvas.qdoc
@@ -0,0 +1,116 @@
+//! [0]
+item->scene().sceneRect().intersects(item->sceneBoundingRect());
+//! [0]
+
+
+//! [1]
+class TileScene : public QGraphicsScene
+{
+public:
+ ...
+
+ void setTiles(const QPixmap &pixmap, int h, int v,
+ int tileHeight, int tileWidth);
+ void setTile(int x, int y, int tilenum);
+
+private:
+ QRect tileRect(int x, int y) const;
+ QRect tileRect(int tileNum) const;
+
+ QVector<QVector<int> > tiles;
+ QPixmap tilePixmap;
+ int tileW, tileH;
+ int hTiles, vTiles;
+};
+//! [1]
+
+
+//! [2]
+void TileScene::setTiles(const QPixmap &pixmap, int h, int v,
+ int tileHeight, int tileWidth)
+{
+ tilePixmap = pixmap;
+ tileW = tileWidth;
+ tileH = tileHeight;
+ hTiles = h;
+ vTiles = v;
+
+ tiles.resize(v);
+ for (int y = 0; y < v; ++y)
+ tiles[y].resize(h);
+}
+//! [2]
+
+
+//! [3]
+void TileScene::setTile(int x, int y, int tilenum)
+{
+ tiles[y][x] = tilenum;
+ update(tileRect(x, y));
+}
+//! [3]
+
+
+//! [4]
+QRect TileScene::tileRect(int x, int y) const
+{
+ return QRect(x * tileW, y * tileH, tileW, tileH);
+}
+//! [4]
+
+
+//! [5]
+QRect TileScene::tileRect(int tileNum) const
+{
+ int numHTiles = tilePixmap.width() / tileW;
+ int numVTiles = tilePixmap.height() / tileH;
+ return tileRect(tileNum % numHTiles, tileNum / numHTiles);
+}
+//! [5]
+
+
+//! [6]
+void drawBackground(QPainter *painter, const QRectF &exposed)
+{
+ for (int y = 0; y < vTiles; ++y) {
+ for (int x = 0; x < hTiles; ++x) {
+ QRect destRect = tileRect(x, y);
+ if (exposed.intersects(destRect)) {
+ painter->drawPixmap(destRect, tilePixmap,
+ tileRect(tiles[y][x]));
+ }
+ }
+ }
+}
+//! [6]
+
+
+//! [7]
+ // Before
+ Q3CanvasEllipse ellipse(10, 10);
+
+ // After
+ QGraphicsEllipseItem ellipse(-5, -5, 10, 10);
+//! [7]
+
+
+//! [8]
+static QPainterPath fromControlPoints(const Q3PointArray &pa)
+{
+ QPainterPath path;
+ path.moveTo(pa[0]);
+ for (int i = 1; i < pa.size(); i += 3)
+ path.cubicTo(pa[i], pa[(i + 1) % pa.size()], pa[(i + 2) % pa.size()]);
+ return path;
+}
+//! [8]
+
+
+//! [9]
+wildcardPath.replace("%1", "*");
+QFileInfo fi(wildcardPath);
+
+QList<QPixmap> frames;
+foreach (QString entry, QDir(fi.path(), fi.fileName()).entryList())
+ frames << QPixmap(fi.path() + "/" + entry);
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.qdoc b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
new file mode 100644
index 0000000..d4abaa0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
@@ -0,0 +1,159 @@
+//! [0]
+namespace Ui {
+
+class HelloWorld
+{
+public:
+ QVBoxLayout *vboxLayout;
+ QPushButton *pushButton;
+
+ void setupUi(QWidget *HelloWorld)
+ {
+ HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));
+
+ vboxLayout = new QVBoxLayout(HelloWorld);
+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+
+ pushButton = new QPushButton(HelloWorld);
+ pushButton->setObjectName(QString::fromUtf8("pushButton"));
+
+ vboxLayout->addWidget(pushButton);
+
+ retranslateUi(HelloWorld);
+ }
+};
+
+}
+//! [0]
+
+
+//! [1]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QWidget w;
+ Ui::HelloWorld ui;
+ ui.setupUi(&w);
+
+ w.show();
+ return app.exec();
+}
+//! [1]
+
+
+//! [2]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0)
+ : QWidget(parent)
+ { setupUi(this); }
+};
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ HelloWorldWidget w;
+ w.show();
+ return app.exec();
+}
+//! [2]
+
+
+//! [3]
+uic3 myform.ui > myform.h
+uic3 -impl myform.h myform.ui > myform.cpp
+//! [3]
+
+
+//! [4]
+uic3 -convert myform3.ui > myform4.ui
+//! [4]
+
+
+//! [5]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void mySlot();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ QObject::connect(pushButton, SIGNAL(clicked()),
+ this, SLOT(mySlot()));
+}
+
+void HelloWorldWidget::mySlot()
+{
+ ...
+}
+//! [5]
+
+
+//! [6]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void on_pushButton_clicked();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+
+void HelloWorldWidget::on_pushButton_clicked()
+{
+ ...
+}
+//! [6]
+
+
+//! [7]
+<RCC version="1.0">
+ <qresource prefix="/icons">
+ <file>yes.png</file>
+ <file>no.png</file>
+ </qresource>
+</RCC>
+//! [7]
+
+
+//! [8]
+RESOURCES += icons.qrc
+//! [8]
+
+
+//! [9]
+QFile file(":/icons/yes.png");
+QIcon icon(":/icons/no.png");
+QPixmap pixmap(":/icons/no.png");
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4.qdoc b/doc/src/snippets/code/doc_src_porting4.qdoc
new file mode 100644
index 0000000..14fddf8
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4.qdoc
@@ -0,0 +1,473 @@
+//! [0]
+void MyButton::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ drawButton(&painter);
+}
+//! [0]
+
+
+//! [1]
+ba.at(0) = 'X';
+//! [1]
+
+
+//! [2]
+ba[0] = 'X';
+//! [2]
+
+
+//! [3]
+if (!cache.insert(key, object))
+ delete object;
+//! [3]
+
+
+//! [4]
+cache.insert(key, object);
+//! [4]
+
+
+//! [5]
+Q3Cache<QWidget> cache;
+cache.insert(widget->name(), widget);
+...
+QWidget *foo = cache.take("foo");
+if (foo)
+ foo->show();
+//! [5]
+
+
+//! [6]
+typedef QWidget *QWidgetPtr;
+QCache<QString, QWidgetPtr> cache;
+cache.insert(widget->name(), new QWidgetPtr(widget));
+...
+QWidgetPtr *ptr = cache.take("foo");
+if (ptr) {
+ QWidget *foo = *ptr;
+ delete ptr;
+ foo->show();
+}
+//! [6]
+
+
+//! [7]
+painter.setBrush(palette().brush(QPalette::Text));
+//! [7]
+
+
+//! [8]
+QByteArray ba("Hello");
+ba.size(); // returns 5 (the '\0' is not counted)
+ba.length(); // returns 5
+ba.data()[5]; // returns '\0'
+//! [8]
+
+
+//! [9]
+dict.replace(key, value);
+//! [9]
+
+
+//! [10]
+delete hash.take(key);
+hash.insert(key, value);
+//! [10]
+
+
+//! [11]
+dict.remove(key, value);
+//! [11]
+
+
+//! [12]
+delete hash.take(key);
+//! [12]
+
+
+//! [13]
+dict.clear();
+//! [13]
+
+
+//! [14]
+while (!hash.isEmpty()) {
+ T *value = *hash.begin();
+ hash.erase(hash.begin());
+ delete value;
+}
+//! [14]
+
+
+//! [15]
+qDeleteAll(hash);
+hash.clear();
+//! [15]
+
+
+//! [16]
+Q3DictIterator<QWidget> i(dict);
+while (i.current() != 0) {
+ do_something(i.currentKey(), i.current());
+ ++i;
+}
+//! [16]
+
+
+//! [17]
+QHashIterator<QString, QWidget *> i(hash);
+while (i.hasNext()) {
+ i.next(); // must come first
+ do_something(i.key(), i.value());
+}
+//! [17]
+
+
+//! [18]
+QList<QWidget *> myWidgets = qFindChildren<QWidget *>(myParent);
+//! [18]
+
+
+//! [19]
+list.replace(index, value);
+//! [19]
+
+
+//! [20]
+delete list[index];
+list[index] = value;
+//! [20]
+
+
+//! [21]
+list.removeFirst();
+//! [21]
+
+
+//! [22]
+delete list.takeFirst();
+//! [22]
+
+
+//! [23]
+list.removeLast();
+//! [23]
+
+
+//! [24]
+delete list.takeLast();
+//! [24]
+
+
+//! [25]
+list.remove(index);
+//! [25]
+
+
+//! [26]
+delete list.takeAt(index);
+//! [26]
+
+
+//! [27]
+list.remove(value);
+//! [27]
+
+
+//! [28]
+int i = list.indexOf(value);
+if (i != -1)
+ delete list.takeAt(i);
+//! [28]
+
+
+//! [29]
+list.remove();
+//! [29]
+
+
+//! [30]
+QMutableListIterator<T *> i;
+...
+delete i.value();
+i.remove();
+//! [30]
+
+
+//! [31]
+list.clear();
+//! [31]
+
+
+//! [32]
+while (!list.isEmpty())
+ delete list.takeFirst();
+//! [32]
+
+
+//! [33]
+qDeleteAll(list);
+list.clear();
+//! [33]
+
+
+//! [34]
+QPtrList<QWidget> list;
+...
+while (list.current() != 0) {
+ do_something(list.current());
+ list.next();
+}
+//! [34]
+
+
+//! [35]
+QList<QWidget *> list;
+...
+QListIterator<QWidget *> i(list);
+while (i.hasNext())
+ do_something(i.next());
+//! [35]
+
+
+//! [36]
+QPtrList<QWidget> list;
+...
+QPtrListIterator<QWidget> i;
+while (i.current() != 0) {
+ do_something(i.current());
+ i.next();
+}
+//! [36]
+
+
+//! [37]
+QList<QWidget *> list;
+...
+QListIterator<QWidget *> i(list);
+while (i.hasNext())
+ do_something(i.next());
+//! [37]
+
+
+//! [38]
+queue.dequeue();
+//! [38]
+
+
+//! [39]
+delete queue.dequeue();
+//! [39]
+
+
+//! [40]
+queue.remove();
+//! [40]
+
+
+//! [41]
+delete queue.dequeue();
+//! [41]
+
+
+//! [42]
+queue.clear();
+//! [42]
+
+
+//! [43]
+while (!queue.isEmpty())
+ delete queue.dequeue();
+//! [43]
+
+
+//! [44]
+qDeleteAll(queue);
+queue.clear();
+//! [44]
+
+
+//! [45]
+stack.pop();
+//! [45]
+
+
+//! [46]
+delete stack.pop();
+//! [46]
+
+
+//! [47]
+stack.remove();
+//! [47]
+
+
+//! [48]
+delete stack.pop();
+//! [48]
+
+
+//! [49]
+stack.clear();
+//! [49]
+
+
+//! [50]
+while (!stack.isEmpty())
+ delete stack.pop();
+//! [50]
+
+
+//! [51]
+qDeleteAll(stack);
+stack.clear();
+//! [51]
+
+
+//! [52]
+vect.insert(i, ptr);
+//! [52]
+
+
+//! [53]
+delete vect[i];
+vect[i] = ptr;
+//! [53]
+
+
+//! [54]
+vect.remove(i);
+//! [54]
+
+
+//! [55]
+delete vect[i];
+vect[i] = 0;
+//! [55]
+
+
+//! [56]
+T *ptr = vect.take(i);
+//! [56]
+
+
+//! [57]
+T *ptr = vect[i];
+vect[i] = 0;
+//! [57]
+
+
+//! [58]
+vect.resize(n)
+//! [58]
+
+
+//! [59]
+while (n > vect.size())
+ vect.append(0);
+while (n < vect.size() {
+ T *ptr = vect.last();
+ vect.remove(vect.size() - 1);
+ delete ptr;
+}
+//! [59]
+
+
+//! [60]
+vect.clear();
+//! [60]
+
+
+//! [61]
+for (int i = 0; i < vect.size(); ++i)
+ T *ptr = vect[i];
+ vect[i] = 0;
+ delete ptr;
+}
+//! [61]
+
+
+//! [62]
+qDeleteAll(vect);
+vect.clear();
+//! [62]
+
+
+//! [63]
+struct Shared
+{
+ Shared() : count(1) {}
+ void ref() { ++count; }
+ bool deref() { return !--count; }
+ uint count;
+};
+//! [63]
+
+//! [63a]
+// Declare the object
+QSimpleRichText richText(text, font);
+
+// Set the width of the paragraph to w
+richText.setWidth(w);
+
+// Or set a resonable default size
+richText.adjustSize();
+
+// Query for its used size
+int width = richText.widthUsed();
+int height = richText.height();
+
+// Draw
+richText.draw(painter, x, y, clipRect, colorGroup);
+//! [63a]
+
+
+//! [63b]
+// Declare the object
+QTextDocument doc;
+
+// If text is rich text, use setHtml()
+doc.setHtml(text);
+
+// Otherwise, use setPlainText()
+doc.setPlainText(text);
+
+// Set the width of the paragraph of text to w
+doc.setTextWidth(w);
+
+// Query for the used size
+int width = doc.idealWidth();
+int height = doc.size().height();
+
+// Draw
+painter.translate(x, y);
+doc.drawContents(painter, clipRect);
+
+// If you have a palette/colorgroup you can draw using lower-level functions:
+QAbstractTextDocumentLayout::PaintContext context;
+context.palette = myPalette;
+doc.documentLayout()->draw(painter, context);
+//! [63b]
+
+//! [63c]
+QSlider *slider;
+slider->style()->subControlRect(CC_Slider, sliderOption, SC_SliderHandle, slider);
+//! [63c]
+
+//! [64]
+QString greeting = "Hello";
+const char *badData = greeting.toAscii().constData(); // data is invalid
+QByteArray asciiData = greeting.toAscii();
+const char *goodData = asciiData.constData();
+//! [64]
+
+
+//! [65]
+str.at(0) = 'X';
+//! [65]
+
+
+//! [66]
+str[0] = 'X';
+//! [66]
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.qdoc
new file mode 100644
index 0000000..ba7f79b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_properties.qdoc
@@ -0,0 +1,77 @@
+//! [0]
+Q_PROPERTY(type name
+ READ getFunction
+ [WRITE setFunction]
+ [RESET resetFunction]
+ [DESIGNABLE bool]
+ [SCRIPTABLE bool]
+ [STORED bool]
+ [USER bool])
+//! [0]
+
+
+//! [1]
+Q_PROPERTY(bool focus READ hasFocus)
+Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
+Q_PROPERTY(QCursor cursor READ cursor WRITE setCursor RESET unsetCursor)
+//! [1]
+
+
+//! [2]
+Q_PROPERTY(QDate date READ getDate WRITE setDate)
+//! [2]
+
+
+//! [3]
+QPushButton *button = new QPushButton;
+QObject *object = button;
+
+button->setDown(true);
+object->setProperty("down", true);
+//! [3]
+
+
+//! [4]
+QObject *object = ...
+const QMetaObject *metaobject = object->metaObject();
+int count = metaobject->propertyCount();
+for (int i=0; i<count; ++i) {
+ QMetaProperty metaproperty = metaobject->property(i);
+ const char *name = metaproperty.name();
+ QVariant value = object->property(name);
+ ...
+}
+//! [4]
+
+
+//! [5]
+class MyClass : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority)
+ Q_ENUMS(Priority)
+
+public:
+ MyClass(QObject *parent = 0);
+ ~MyClass();
+
+ enum Priority { High, Low, VeryHigh, VeryLow };
+
+ void setPriority(Priority priority);
+ Priority priority() const;
+};
+//! [5]
+
+
+//! [6]
+MyClass *myinstance = new MyClass;
+QObject *object = myinstance;
+
+myinstance->setPriority(MyClass::VeryHigh);
+object->setProperty("priority", "VeryHigh");
+//! [6]
+
+
+//! [7]
+Q_CLASSINFO("Version", "3.0.0")
+//! [7]
diff --git a/doc/src/snippets/code/doc_src_q3asciidict.qdoc b/doc/src/snippets/code/doc_src_q3asciidict.qdoc
new file mode 100644
index 0000000..e2c876a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3asciidict.qdoc
@@ -0,0 +1,52 @@
+//! [0]
+Q3AsciiDict<QLineEdit> fields; // char* keys, QLineEdit* values
+fields.insert( "forename", new QLineEdit( this ) );
+fields.insert( "surname", new QLineEdit( this ) );
+
+fields["forename"]->setText( "Homer" );
+fields["surname"]->setText( "Simpson" );
+
+Q3AsciiDictIterator<QLineEdit> it( fields ); // See Q3AsciiDictIterator
+for( ; it.current(); ++it )
+ cout << it.currentKey() << ": " << it.current()->text() << endl;
+cout << endl;
+
+if ( fields["forename"] && fields["surname"] )
+ cout << fields["forename"]->text() << " "
+ << fields["surname"]->text() << endl; // Prints "Homer Simpson"
+
+fields.remove( "forename" ); // Does not delete the line edit
+if ( ! fields["forename"] )
+ cout << "forename is not in the dictionary" << endl;
+//! [0]
+
+
+//! [1]
+Q3AsciiDict<char> dict;
+ ...
+if ( dict.find(key) )
+ dict.remove( key );
+dict.insert( key, item );
+//! [1]
+
+
+//! [2]
+Q3AsciiDict<QLineEdit> fields;
+fields.insert( "forename", new QLineEdit( this ) );
+fields.insert( "surname", new QLineEdit( this ) );
+fields.insert( "age", new QLineEdit( this ) );
+
+fields["forename"]->setText( "Homer" );
+fields["surname"]->setText( "Simpson" );
+fields["age"]->setText( "45" );
+
+Q3AsciiDictIterator<QLineEdit> it( fields );
+for( ; it.current(); ++it )
+ cout << it.currentKey() << ": " << it.current()->text() << endl;
+cout << endl;
+
+// Output (random order):
+// age: 45
+// surname: Simpson
+// forename: Homer
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_q3dict.qdoc b/doc/src/snippets/code/doc_src_q3dict.qdoc
new file mode 100644
index 0000000..f79d0f7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3dict.qdoc
@@ -0,0 +1,29 @@
+//! [0]
+Q3Dict<char> dict;
+ ...
+if ( dict.find( key ) )
+ dict.remove( key );
+dict.insert( key, item );
+//! [0]
+
+
+//! [1]
+Q3Dict<QLineEdit> fields;
+fields.insert( "forename", new QLineEdit( this ) );
+fields.insert( "surname", new QLineEdit( this ) );
+fields.insert( "age", new QLineEdit( this ) );
+
+fields["forename"]->setText( "Homer" );
+fields["surname"]->setText( "Simpson" );
+fields["age"]->setText( "45" );
+
+Q3DictIterator<QLineEdit> it( fields );
+for( ; it.current(); ++it )
+ cout << it.currentKey() << ": " << it.current()->text() << endl;
+cout << endl;
+
+// Output (random order):
+// age: 45
+// surname: Simpson
+// forename: Homer
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_q3intdict.qdoc b/doc/src/snippets/code/doc_src_q3intdict.qdoc
new file mode 100644
index 0000000..0fae2c8
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3intdict.qdoc
@@ -0,0 +1,51 @@
+//! [0]
+Q3IntDict<QLineEdit> fields; // long int keys, QLineEdit* values
+for ( int i = 0; i < 3; i++ )
+ fields.insert( i, new QLineEdit( this ) );
+
+fields[0]->setText( "Homer" );
+fields[1]->setText( "Simpson" );
+fields[2]->setText( "45" );
+
+Q3IntDictIterator<QLineEdit> it( fields );
+for ( ; it.current(); ++it )
+ cout << it.currentKey() << ": " << it.current()->text() << endl;
+
+for ( int i = 0; i < 3; i++ )
+ cout << fields[i]->text() << " "; // Prints "Homer Simpson 45"
+cout << endl;
+
+fields.remove( 1 ); // Does not delete the line edit
+for ( int i = 0; i < 3; i++ )
+ if ( fields[i] )
+ cout << fields[i]->text() << " "; // Prints "Homer 45"
+//! [0]
+
+
+//! [1]
+Q3IntDict<char> dict;
+// ...
+if ( dict.find(key) )
+ dict.remove( key );
+dict.insert( key, item );
+//! [1]
+
+
+//! [2]
+Q3IntDict<QLineEdit> fields;
+for ( int i = 0; i < 3; i++ )
+ fields.insert( i, new QLineEdit( this ) );
+
+fields[0]->setText( "Homer" );
+fields[1]->setText( "Simpson" );
+fields[2]->setText( "45" );
+
+Q3IntDictIterator<QLineEdit> it( fields );
+for ( ; it.current(); ++it )
+ cout << it.currentKey() << ": " << it.current()->text() << endl;
+
+// Output (random order):
+// 0: Homer
+// 1: Simpson
+// 2: 45
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_q3memarray.qdoc b/doc/src/snippets/code/doc_src_q3memarray.qdoc
new file mode 100644
index 0000000..b56ef4e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3memarray.qdoc
@@ -0,0 +1,80 @@
+//! [0]
+#include <q3memarray.h>
+#include <stdio.h>
+
+Q3MemArray<int> fib( int num ) // returns fibonacci array
+{
+ Q_ASSERT( num > 2 );
+ Q3MemArray<int> f( num ); // array of ints
+
+ f[0] = f[1] = 1;
+ for ( int i = 2; i < num; i++ )
+ f[i] = f[i-1] + f[i-2];
+
+ return f;
+}
+
+int main()
+{
+ Q3MemArray<int> a = fib( 6 ); // get first 6 fibonaccis
+ for ( int i = 0; i < a.size(); i++ )
+ qDebug( "%d: %d", i, a[i] );
+
+ qDebug( "1 is found %d times", a.contains(1) );
+ qDebug( "5 is found at index %d", a.find(5) );
+
+ return 0;
+}
+//! [0]
+
+
+//! [1]
+0: 1
+1: 1
+2: 2
+3: 3
+4: 5
+5: 8
+1 is found 2 times
+5 is found at index 4
+//! [1]
+
+
+//! [2]
+// MyStruct may be padded to 4 or 8 bytes
+struct MyStruct
+{
+ short i; // 2 bytes
+ char c; // 1 byte
+};
+
+Q3MemArray<MyStruct> a(1);
+a[0].i = 5;
+a[0].c = 't';
+
+MyStruct x;
+x.i = '5';
+x.c = 't';
+int i = a.find( x ); // may return -1 if the pad bytes differ
+//! [2]
+
+
+//! [3]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+QDataStream s( a, IO_ReadOnly ); // open on a's data
+s >> <something>; // read raw bindata
+a.resetRawData( bindata, sizeof(bindata) ); // finished
+//! [3]
+
+
+//! [4]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a, b;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+a.resize( 8 ); // will crash
+b = a; // will crash
+a[2] = 123; // might crash
+// forget to resetRawData: will crash
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc b/doc/src/snippets/code/doc_src_q3ptrdict.qdoc
new file mode 100644
index 0000000..d23824b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3ptrdict.qdoc
@@ -0,0 +1,66 @@
+//! [0]
+Q3PtrDict<char> fields; // void* keys, char* values
+
+QLineEdit *le1 = new QLineEdit( this );
+le1->setText( "Simpson" );
+QLineEdit *le2 = new QLineEdit( this );
+le2->setText( "Homer" );
+QLineEdit *le3 = new QLineEdit( this );
+le3->setText( "45" );
+
+fields.insert( le1, "Surname" );
+fields.insert( le2, "Forename" );
+fields.insert( le3, "Age" );
+
+Q3PtrDictIterator<char> it( fields );
+for( ; it.current(); ++it )
+ cout << it.current() << endl;
+cout << endl;
+
+if ( fields[le1] ) // Prints "Surname: Simpson"
+ cout << fields[le1] << ": " << le1->text() << endl;
+if ( fields[le2] ) // Prints "Forename: Homer"
+ cout << fields[le2] << ": " << le2->text() << endl;
+
+fields.remove( le1 ); // Removes le1 from the dictionary
+cout << le1->text() << endl; // Prints "Simpson"
+//! [0]
+
+
+//! [1]
+Q3PtrDict<ItemType> dict;
+ ...
+if ( dict.find( key ) )
+ dict.remove( key );
+dict.insert( key, item );
+//! [1]
+
+
+//! [2]
+Q3PtrDict<char> fields;
+
+QLineEdit *le1 = new QLineEdit( this );
+le1->setText( "Simpson" );
+QLineEdit *le2 = new QLineEdit( this );
+le2->setText( "Homer" );
+QLineEdit *le3 = new QLineEdit( this );
+le3->setText( "45" );
+
+fields.insert( le1, "Surname" );
+fields.insert( le2, "Forename" );
+fields.insert( le3, "Age" );
+
+Q3PtrDictIterator<char> it( fields );
+for( ; it.current(); ++it ) {
+ QLineEdit *le = (QLineEdit)it.currentKey();
+ cout << it.current() << ": " << le->text() << endl;
+}
+cout << endl;
+
+// Output (random order):
+// Forename: Homer
+// Age: 45
+// Surname: Simpson
+//! [2]
+
+
diff --git a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc b/doc/src/snippets/code/doc_src_q3ptrlist.qdoc
new file mode 100644
index 0000000..f416784
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3ptrlist.qdoc
@@ -0,0 +1,82 @@
+//! [0]
+class Employee
+{
+public:
+ Employee() : sn( 0 ) { }
+ Employee( const QString& forename, const QString& surname, int salary )
+ : fn( forename ), sn( surname ), sal( salary )
+ { }
+
+ void setSalary( int salary ) { sal = salary; }
+
+ QString forename() const { return fn; }
+ QString surname() const { return sn; }
+ int salary() const { return sal; }
+
+private:
+ QString fn;
+ QString sn;
+ int sal;
+};
+
+Q3PtrList<Employee> list;
+list.setAutoDelete( TRUE ); // the list owns the objects
+
+list.append( new Employee("John", "Doe", 50000) );
+list.append( new Employee("Jane", "Williams", 80000) );
+list.append( new Employee("Tom", "Jones", 60000) );
+
+Employee *employee;
+for ( employee = list.first(); employee; employee = list.next() )
+ cout << employee->surname().latin1() << ", " <<
+ employee->forename().latin1() << " earns " <<
+ employee->salary() << endl;
+cout << endl;
+
+// very inefficient for big lists
+for ( uint i = 0; i < list.count(); ++i )
+ if ( list.at(i) )
+ cout << list.at( i )->surname().latin1() << endl;
+//! [0]
+
+
+//! [1]
+Doe, John earns 50000
+Williams, Jane earns 80000
+Jones, Tom earns 60000
+
+Doe
+Williams
+Jones
+//! [1]
+
+
+//! [2]
+if ( list.findRef( item ) != -1 )
+ list.remove();
+//! [2]
+
+
+//! [3]
+Q3PtrList<Employee> list;
+
+list.append( new Employee("John", "Doe", 50000) );
+list.append( new Employee("Jane", "Williams", 80000) );
+list.append( new Employee("Tom", "Jones", 60000) );
+
+Q3PtrListIterator<Employee> it( list );
+Employee *employee;
+while ( (employee = it.current()) != 0 ) {
+ ++it;
+ cout << employee->surname().latin1() << ", " <<
+ employee->forename().latin1() << " earns " <<
+ employee->salary() << endl;
+}
+//! [3]
+
+
+//! [4]
+Doe, John earns 50000
+Williams, Jane earns 80000
+Jones, Tom earns 60000
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3valuelist.qdoc b/doc/src/snippets/code/doc_src_q3valuelist.qdoc
new file mode 100644
index 0000000..5a6d564
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3valuelist.qdoc
@@ -0,0 +1,95 @@
+//! [0]
+class Employee
+{
+public:
+ Employee(): sn(0) {}
+ Employee( const QString& forename, const QString& surname, int salary )
+ : fn(forename), sn(surname), sal(salary)
+ {}
+
+ QString forename() const { return fn; }
+ QString surname() const { return sn; }
+ int salary() const { return sal; }
+ void setSalary( int salary ) { sal = salary; }
+
+private:
+ QString fn;
+ QString sn;
+ int sal;
+};
+
+typedef Q3ValueList<Employee> EmployeeList;
+EmployeeList list;
+
+list.append( Employee("John", "Doe", 50000) );
+list.append( Employee("Jane", "Williams", 80000) );
+list.append( Employee("Tom", "Jones", 60000) );
+
+Employee mary( "Mary", "Hawthorne", 90000 );
+list.append( mary );
+mary.setSalary( 100000 );
+
+EmployeeList::iterator it;
+for ( it = list.begin(); it != list.end(); ++it )
+ cout << (*it).surname().latin1() << ", " <<
+ (*it).forename().latin1() << " earns " <<
+ (*it).salary() << endl;
+
+// Output:
+// Doe, John earns 50000
+// Williams, Jane earns 80000
+// Hawthorne, Mary earns 90000
+// Jones, Tom earns 60000
+//! [0]
+
+
+//! [1]
+Q3ValueList<int> list;
+list.append( 1 );
+list.append( 2 );
+list.append( 3 );
+...
+if ( !list.empty() ) {
+ // OK, modify the first item
+ int& i = list.first();
+ i = 18;
+}
+...
+Q3ValueList<double> dlist;
+double d = dlist.last(); // undefined
+//! [1]
+
+
+//! [2]
+Q3ValueList<int> l;
+...
+Q3ValueList<int>::iterator it = l.end();
+--it;
+if ( it != end() )
+ // ...
+//! [2]
+
+
+//! [3]
+Q3ValueList<int> l;
+...
+Q3ValueList<int>::iterator it = l.end();
+--it;
+if ( it != end() )
+ // ...
+//! [3]
+
+
+//! [4]
+EmployeeList::iterator it;
+for ( it = list.begin(); it != list.end(); ++it )
+ cout << (*it).surname().latin1() << ", " <<
+ (*it).forename().latin1() << " earns " <<
+ (*it).salary() << endl;
+
+// Output:
+// Doe, John earns 50000
+// Williams, Jane earns 80000
+// Hawthorne, Mary earns 90000
+// Jones, Tom earns 60000
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3valuestack.qdoc b/doc/src/snippets/code/doc_src_q3valuestack.qdoc
new file mode 100644
index 0000000..61d564b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3valuestack.qdoc
@@ -0,0 +1,13 @@
+//! [0]
+Q3ValueStack<int> stack;
+stack.push( 1 );
+stack.push( 2 );
+stack.push( 3 );
+while ( ! stack.isEmpty() )
+ cout << "Item: " << stack.pop() << endl;
+
+// Output:
+// Item: 3
+// Item: 2
+// Item: 1
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_q3valuevector.qdoc b/doc/src/snippets/code/doc_src_q3valuevector.qdoc
new file mode 100644
index 0000000..792bfac
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3valuevector.qdoc
@@ -0,0 +1,85 @@
+//! [0]
+#include <qvaluevector.h>
+#include <qstring.h>
+#include <stdio.h>
+
+class Employee
+{
+public:
+ Employee(): s(0) {}
+ Employee( const QString& name, int salary )
+ : n( name ), s( salary )
+ { }
+
+ QString name() const { return n; }
+ int salary() const { return s; }
+ void setSalary( int salary ) { s = salary; }
+private:
+ QString n;
+ int s;
+};
+
+int main()
+{
+ typedef Q3ValueVector<Employee> EmployeeVector;
+ EmployeeVector vec( 3 ); // vector of 3 Employees
+
+ vec[0] = Employee( "Bill", 50000 );
+ vec[1] = Employee( "Steve", 80000 );
+ vec[2] = Employee( "Ron", 60000 );
+
+ Employee joe( "Joe", 50000 );
+ vec.push_back( joe ); // vector expands to accommodate 4 Employees
+ joe.setSalary( 70000 );
+
+ EmployeeVector::iterator it;
+ for( it = vec.begin(); it != vec.end(); ++it )
+ printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() );
+
+ return 0;
+}
+//! [0]
+
+
+//! [1]
+Bill earns 50000
+Steve earns 80000
+Ron earns 60000
+Joe earns 50000
+//! [1]
+
+
+//! [2]
+Q3ValueVector<int> vec1; // an empty vector
+vec1[10] = 4; // WARNING: undefined, probably a crash
+
+Q3ValueVector<QString> vec2(25); // initialize with 25 elements
+vec2[10] = "Dave"; // OK
+//! [2]
+
+
+//! [3]
+void func( Q3ValueVector<int>& vec )
+{
+ if ( vec.size() > 10 ) {
+ vec[9] = 99; // OK
+ }
+};
+//! [3]
+
+
+//! [4]
+Q3ValueVector<int> vec( 3 );
+vec.push_back( 1 );
+vec.push_back( 2 );
+vec.push_back( 3 );
+...
+if ( !vec.empty() ) {
+ // OK: modify the first element
+ int& i = vec.front();
+ i = 18;
+}
+...
+Q3ValueVector<double> dvec;
+double d = dvec.back(); // undefined behavior
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_qalgorithms.qdoc b/doc/src/snippets/code/doc_src_qalgorithms.qdoc
new file mode 100644
index 0000000..69d943c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qalgorithms.qdoc
@@ -0,0 +1,314 @@
+//! [0]
+QStringList list;
+list << "one" << "two" << "three";
+
+qFill(list.begin(), list.end(), "eleven");
+// list: [ "eleven", "eleven", "eleven" ]
+//! [0]
+
+
+//! [1]
+qFill(list.begin() + 1, list.end(), "six");
+// list: [ "eleven", "six", "six" ]
+//! [1]
+
+
+//! [2]
+QChar resolveEntity(const QString &entity)
+{
+ static const QLatin1String name_table[] = {
+ "AElig", "Aacute", ..., "zwnj"
+ };
+ static const ushort value_table[] = {
+ 0x0061, 0x00c1, ..., 0x200c
+ };
+ int N = sizeof(name_table) / sizeof(name_table[0]);
+
+ const QLatin1String *name = qBinaryFind(name_table, name_table + N,
+ entity);
+ int index = name - name_table;
+ if (index == N)
+ return QChar();
+
+ return QChar(value_table[index]);
+}
+//! [2]
+
+
+//! [3]
+QChar resolveEntity(const QString &entity)
+{
+ static QMap<QString, int> entityMap;
+
+ if (!entityMap) {
+ entityMap.insert("AElig", 0x0061);
+ entityMap.insert("Aacute", 0x00c1);
+ ...
+ entityMap.insert("zwnj", 0x200c);
+ }
+ return QChar(entityMap.value(entity));
+}
+//! [3]
+
+
+//! [4]
+QStringList list;
+list << "one" << "two" << "three";
+
+QVector<QString> vect1(3);
+qCopy(list.begin(), list.end(), vect1.begin());
+// vect: [ "one", "two", "three" ]
+
+QVector<QString> vect2(8);
+qCopy(list.begin(), list.end(), vect2.begin() + 2);
+// vect: [ "", "", "one", "two", "three", "", "", "" ]
+//! [4]
+
+
+//! [5]
+QStringList list;
+list << "one" << "two" << "three";
+
+QVector<QString> vect(5);
+qCopyBackward(list.begin(), list.end(), vect.end());
+// vect: [ "", "", "one", "two", "three" ]
+//! [5]
+
+
+//! [6]
+QStringList list;
+list << "one" << "two" << "three";
+
+QVector<QString> vect(3);
+vect[0] = "one";
+vect[1] = "two";
+vect[2] = "three";
+
+bool ret1 = qEqual(list.begin(), list.end(), vect.begin());
+// ret1 == true
+
+vect[2] = "seven";
+bool ret2 = qEqual(list.begin(), list.end(), vect.begin());
+// ret2 == false
+//! [6]
+
+
+//! [7]
+QStringList list;
+list << "one" << "two" << "three";
+
+qFill(list.begin(), list.end(), "eleven");
+// list: [ "eleven", "eleven", "eleven" ]
+
+qFill(list.begin() + 1, list.end(), "six");
+// list: [ "eleven", "six", "six" ]
+//! [7]
+
+
+//! [8]
+QStringList list;
+list << "one" << "two" << "three";
+
+QStringList::iterator i1 = qFind(list.begin(), list.end(), "two");
+// i1 == list.begin() + 1
+
+QStringList::iterator i2 = qFind(list.begin(), list.end(), "seventy");
+// i2 == list.end()
+//! [8]
+
+
+//! [9]
+QList<int> list;
+list << 3 << 3 << 6 << 6 << 6 << 8;
+
+int countOf6 = 0;
+qCount(list.begin(), list.end(), 6, countOf6);
+// countOf6 == 3
+
+int countOf7 = 0;
+qCount(list.begin(), list.end(), 7, countOf7);
+// countOf7 == 0
+//! [9]
+
+
+//! [10]
+double pi = 3.14;
+double e = 2.71;
+
+qSwap(pi, e);
+// pi == 2.71, e == 3.14
+//! [10]
+
+
+//! [11]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qSort(list.begin(), list.end());
+// list: [ 6, 12, 12, 33, 68 ]
+//! [11]
+
+
+//! [12]
+bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
+{
+ return s1.toLower() < s2.toLower();
+}
+
+int doSomething()
+{
+ QStringList list;
+ list << "AlPha" << "beTA" << "gamma" << "DELTA";
+ qSort(list.begin(), list.end(), caseInsensitiveLessThan);
+ // list: [ "AlPha", "beTA", "DELTA", "gamma" ]
+}
+//! [12]
+
+
+//! [13]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qSort(list.begin(), list.end(), qGreater<int>());
+// list: [ 68, 33, 12, 12, 6 ]
+//! [13]
+
+
+//! [14]
+QStringList list;
+list << "AlPha" << "beTA" << "gamma" << "DELTA";
+
+QMap<QString, QString> map;
+foreach (QString str, list)
+ map.insert(str.toLower(), str);
+
+list = map.values();
+//! [14]
+
+
+//! [15]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qStableSort(list.begin(), list.end());
+// list: [ 6, 12, 12, 33, 68 ]
+//! [15]
+
+
+//! [16]
+bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
+{
+ return s1.toLower() < s2.toLower();
+}
+
+int doSomething()
+{
+ QStringList list;
+ list << "AlPha" << "beTA" << "gamma" << "DELTA";
+ qStableSort(list.begin(), list.end(), caseInsensitiveLessThan);
+ // list: [ "AlPha", "beTA", "DELTA", "gamma" ]
+}
+//! [16]
+
+
+//! [17]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qStableSort(list.begin(), list.end(), qGreater<int>());
+// list: [ 68, 33, 12, 12, 6 ]
+//! [17]
+
+
+//! [18]
+QList<int> list;
+list << 3 << 3 << 6 << 6 << 6 << 8;
+
+QList<int>::iterator i = qLowerBound(list.begin(), list.end(), 5);
+list.insert(i, 5);
+// list: [ 3, 3, 5, 6, 6, 6, 8 ]
+
+i = qLowerBound(list.begin(), list.end(), 12);
+list.insert(i, 12);
+// list: [ 3, 3, 5, 6, 6, 6, 8, 12 ]
+//! [18]
+
+
+//! [19]
+QVector<int> vect;
+vect << 3 << 3 << 6 << 6 << 6 << 8;
+QVector<int>::iterator begin6 =
+ qLowerBound(vect.begin(), vect.end(), 6);
+QVector<int>::iterator end6 =
+ qUpperBound(begin6, vect.end(), 6);
+
+QVector<int>::iterator i = begin6;
+while (i != end6) {
+ *i = 7;
+ ++i;
+}
+// vect: [ 3, 3, 7, 7, 7, 8 ]
+//! [19]
+
+
+//! [20]
+QList<int> list;
+list << 3 << 3 << 6 << 6 << 6 << 8;
+
+QList<int>::iterator i = qUpperBound(list.begin(), list.end(), 5);
+list.insert(i, 5);
+// list: [ 3, 3, 5, 6, 6, 6, 8 ]
+
+i = qUpperBound(list.begin(), list.end(), 12);
+list.insert(i, 12);
+// list: [ 3, 3, 5, 6, 6, 6, 8, 12 ]
+//! [20]
+
+
+//! [21]
+QVector<int> vect;
+vect << 3 << 3 << 6 << 6 << 6 << 8;
+QVector<int>::iterator begin6 =
+ qLowerBound(vect.begin(), vect.end(), 6);
+QVector<int>::iterator end6 =
+ qUpperBound(vect.begin(), vect.end(), 6);
+
+QVector<int>::iterator i = begin6;
+while (i != end6) {
+ *i = 7;
+ ++i;
+}
+// vect: [ 3, 3, 7, 7, 7, 8 ]
+//! [21]
+
+
+//! [22]
+QVector<int> vect;
+vect << 3 << 3 << 6 << 6 << 6 << 8;
+
+QVector<int>::iterator i =
+ qBinaryFind(vect.begin(), vect.end(), 6);
+// i == vect.begin() + 2 (or 3 or 4)
+//! [22]
+
+
+//! [23]
+QList<Employee *> list;
+list.append(new Employee("Blackpool", "Stephen"));
+list.append(new Employee("Twist", "Oliver"));
+
+qDeleteAll(list.begin(), list.end());
+list.clear();
+//! [23]
+
+
+//! [24]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qSort(list.begin(), list.end(), qLess<int>());
+// list: [ 68, 33, 12, 12, 6 ]
+//! [24]
+
+
+//! [25]
+QList<int> list;
+list << 33 << 12 << 68 << 6 << 12;
+qSort(list.begin(), list.end(), qGreater<int>());
+// list: [ 68, 33, 12, 12, 6 ]
+//! [25]
diff --git a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc b/doc/src/snippets/code/doc_src_qaxcontainer.qdoc
new file mode 100644
index 0000000..9edd87f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxcontainer.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+CONFIG += qaxcontainer
+//! [0]
+
+
+//! [1]
+TYPELIBS = file.tlb
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.qdoc b/doc/src/snippets/code/doc_src_qaxserver.qdoc
new file mode 100644
index 0000000..9b51e66
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxserver.qdoc
@@ -0,0 +1,223 @@
+//! [0]
+TEMPLATE = app
+CONFIG += qaxserver
+
+RC_FILE = qaxserver.rc
+...
+//! [0]
+
+
+//! [1]
+TEMPLATE = lib
+CONFIG += qaxserver dll
+
+DEF_FILE = qaxserver.def
+RC_FILE = qaxserver.rc
+...
+//! [1]
+
+
+//! [2]
+TEMPLATE = lib
+VERSION = 2.5
+...
+//! [2]
+
+
+//! [3]
+#include <QWidget>
+
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+//! [3]
+
+
+//! [4]
+Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+//! [4]
+
+
+//! [5]
+Q_PROPERTY(int value READ value WRITE setValue)
+//! [5]
+
+
+//! [6]
+public:
+ MyActiveX(QWidget *parent = 0)
+ ...
+
+ int value() const;
+
+public slots:
+ void setValue(int v);
+ ...
+
+signals:
+ void valueChange(int v);
+ ...
+
+};
+//! [6]
+
+
+//! [7]
+#include <QAxBindable>
+#include <QWidget>
+
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+//! [7]
+
+
+//! [8]
+QAXFACTORY_BEGIN("{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
+ "{a8f21901-7ff7-4f6a-b939-789620c03d83}")
+ QAXCLASS(MyWidget)
+ QAXCLASS(MyWidget2)
+ QAXTYPE(MySubType)
+QAXFACTORY_END()
+//! [8]
+
+
+//! [9]
+#include <QApplication>
+#include <QAxFactory>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!QAxFactory::isServer()) {
+ // create and show main window
+ }
+ return app.exec();
+}
+//! [9]
+
+
+//! [10]
+MyFactory(const QUuid &, const QUuid &);
+//! [10]
+
+
+//! [11]
+HMODULE dll = LoadLibrary("myserver.dll");
+typedef HRESULT(__stdcall *DllRegisterServerProc)();
+DllRegisterServerProc DllRegisterServer =
+ (DllRegisterServerProc)GetProcAddress(dll, "DllRegisterServer");
+
+HRESULT res = E_FAIL;
+if (DllRegisterServer)
+ res = DllRegisterServer();
+if (res != S_OK)
+ // error handling
+//! [11]
+
+
+//! [12]
+cabarc N simpleax.cab simpleax.exe simple.inf
+//! [12]
+
+
+//! [13]
+<object ID="MyActiveX1" CLASSID="CLSID:ad90301a-849e-4e8b-9a91-0a6dc5f6461f">
+ ...
+<\object>
+//! [13]
+
+
+//! [14]
+<object ID=...>
+ <param name="name" value="value">
+<\object>
+//! [14]
+
+
+//! [15]
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("Version", "2.0")
+ Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
+ Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
+ Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
+ Q_CLASSINFO("Insertable", "yes")
+ Q_CLASSINFO("ToSuperClass", "MyActiveX")
+ Q_PROPERTY(...)
+
+public:
+ MyActiveX(QWidget *parent = 0);
+
+ ...
+};
+//! [15]
+
+
+//! [16]
+class MyLicensedControl : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("LicenseKey", "<key string>")
+ ...
+};
+//! [16]
+
+
+//! [17]
+class AxImpl : public QAxAggregated, public ISomeCOMInterface
+{
+public:
+ AxImpl() {}
+
+ long queryInterface(const QUuid &iid, void **iface);
+
+ // IUnknown
+ QAXAGG_IUNKNOWN
+
+ // ISomeCOMInterface
+ ...
+}
+//! [17]
+
+
+//! [18]
+long AxImpl::queryInterface(const QUuid &iid, void **iface)
+{
+ *iface = 0;
+ if (iid == IID_ISomeCOMInterface)
+ *iface = (ISomeCOMInterface *)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+//! [18]
+
+
+//! [19]
+HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
+{
+ return controllingUnknown()->QueryInterface(iid, iface);
+}
+//! [19]
+
+
+//! [20]
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+
+public:
+ MyActiveX(QWidget *parent);
+
+ QAxAggregated *createAggregate()
+ {
+ return new AxImpl();
+ }
+};
+//! [20]
diff --git a/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/src/snippets/code/doc_src_qcache.qdoc
new file mode 100644
index 0000000..66bda6a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qcache.qdoc
@@ -0,0 +1,17 @@
+//! [0]
+QCache<int, Employee> cache;
+//! [0]
+
+
+//! [1]
+Employee *employee = new Employee;
+employee->setId(37);
+employee->setName("Richard Schmit");
+...
+cache.insert(employee->id(), employee);
+//! [1]
+
+
+//! [2]
+QCache<int, MyDataStructure> cache(5000);
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc b/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc
new file mode 100644
index 0000000..7f69a90
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc
@@ -0,0 +1,253 @@
+//! [0]
+ class MainApplicationAdaptor: public QDBusAbstractAdaptor
+ {
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+
+ private:
+ QApplication *app;
+
+ public:
+ MainApplicationAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+ {
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+ }
+
+ QString caption()
+ {
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString(""); // must not return a null QString
+ }
+
+ void setCaption(const QString &newCaption)
+ {
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+ }
+
+ QString organizationName()
+ {
+ return app->organizationName();
+ }
+
+ QString organizationDomain()
+ {
+ return app->organizationDomain();
+ }
+
+ public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+
+ private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+
+ signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+ };
+//! [0]
+
+
+//! [1]
+interface org.kde.DBus.MainApplication
+{
+ property readwrite STRING caption
+ property read STRING organizationName
+ property read STRING organizationDomain
+
+ method quit() annotation("org.freedesktop.DBus.Method.NoReply", "true")
+ method reparseConfiguration()
+ method mainWindowObject(out STRING)
+ method disableSessionManagement(in BOOLEAN enable)
+
+ signal aboutToQuit()
+ signal mainWindowHasFocus()
+}
+//! [1]
+
+
+//! [2]
+int main(int argc, char **argv)
+{
+ // create the QApplication object
+ QApplication app(argc, argv);
+
+ // create the MainApplication adaptor:
+ new MainApplicationAdaptor(app);
+
+ // connect to D-Bus and register as an object:
+ QDBusConnection::sessionBus().registerObject("/MainApplication", app);
+
+ // add main window, etc.
+ [...]
+
+ app.exec();
+}
+//! [2]
+
+
+//! [3]
+class MainApplicationAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+//! [3]
+
+
+//! [4]
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+//! [4]
+
+
+//! [5]
+QString caption()
+{
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString();
+}
+
+void setCaption(const QString &newCaption)
+{
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+}
+
+QString organizationName()
+{
+ return app->organizationName();
+}
+
+QString organizationDomain()
+{
+ return app->organizationDomain();
+}
+//! [5]
+
+
+//! [6]
+MyInterfaceAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+{
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit());
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+}
+//! [6]
+
+
+//! [7]
+public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+//! [7]
+
+
+//! [8]
+signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+//! [8]
+
+
+//! [9]
+private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+//! [9]
+
+
+//! [10]
+struct RequestData
+{
+ QString request;
+ QString processedData;
+ QDBusMessage reply;
+};
+
+QString processRequest(const QString &request, const QDBusMessage &message)
+{
+ RequestData *data = new RequestData;
+ data->request = request;
+ message.setDelayedReply(true);
+ data->reply = message.createReply();
+ QDBusConnection::sessionBus().send(data->reply);
+
+ appendRequest(data);
+ return QString();
+}
+//! [10]
+
+
+//! [11]
+void sendReply(RequestData *data)
+{
+ // data->processedData has been initialized with the request's reply
+ QDBusMessage &reply = &data->reply;
+
+ // send the reply over D-Bus:
+ reply << data->processedData;
+ QDBusConnection::sessionBus().send(reply);
+
+ // dispose of the transaction data
+ delete data;
+}
+//! [11]
+
+
+//! [12]
+Q_NOREPLY void myMethod();
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_qiterator.qdoc b/doc/src/snippets/code/doc_src_qiterator.qdoc
new file mode 100644
index 0000000..3dfa68a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qiterator.qdoc
@@ -0,0 +1,380 @@
+//! [0]
+QList<float> list;
+...
+QListIterator<float> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [0]
+
+
+//! [1]
+QListIterator<float> i(list);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [1]
+
+
+//! [2]
+QLinkedList<float> list;
+...
+QLinkedListIterator<float> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [2]
+
+
+//! [3]
+QLinkedListIterator<float> i(list);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [3]
+
+
+//! [4]
+QVector<float> vector;
+...
+QVectorIterator<float> i(vector);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [4]
+
+
+//! [5]
+QVectorIterator<float> i(vector);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [5]
+
+
+//! [6]
+QSet<QString> set;
+...
+QSetIterator<QString> i(set);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [6]
+
+
+//! [7]
+QSetIterator<QString> i(set);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [7]
+
+
+//! [8]
+QList<float> list;
+...
+QMutableListIterator<float> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [8]
+
+
+//! [9]
+QMutableListIterator<float> i(list);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [9]
+
+
+//! [10]
+QMutableListIterator<int> i(list);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < 0) {
+ i.setValue(-val);
+ } else if (val == 0) {
+ i.remove();
+ }
+}
+//! [10]
+
+
+//! [11]
+QLinkedList<float> list;
+...
+QMutableLinkedListIterator<float> i(list);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [11]
+
+
+//! [12]
+QMutableLinkedListIterator<float> i(list);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [12]
+
+
+//! [13]
+QMutableLinkedListIterator<int> i(list);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < 0) {
+ i.setValue(-val);
+ } else if (val == 0) {
+ i.remove();
+ }
+}
+//! [13]
+
+
+//! [14]
+QVector<float> vector;
+...
+QMutableVectorIterator<float> i(vector);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [14]
+
+
+//! [15]
+QMutableVectorIterator<float> i(vector);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [15]
+
+
+//! [16]
+QMutableVectorIterator<int> i(vector);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < 0) {
+ i.setValue(-val);
+ } else if (val == 0) {
+ i.remove();
+ }
+}
+//! [16]
+
+
+//! [17]
+QSet<float> set;
+...
+QMutableSetIterator<float> i(set);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [17]
+
+
+//! [18]
+QMutableSetIterator<float> i(set);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [18]
+
+
+//! [19]
+QMutableListIterator<int> i(list);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < -32768 || val > 32767)
+ i.remove();
+}
+//! [19]
+
+
+//! [20]
+QMutableLinkedListIterator<int> i(list);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < -32768 || val > 32767)
+ i.remove();
+}
+//! [20]
+
+
+//! [21]
+QMutableVectorIterator<int> i(vector);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < -32768 || val > 32767)
+ i.remove();
+}
+//! [21]
+
+
+//! [22]
+QMutableSetIterator<int> i(set);
+while (i.hasNext()) {
+ int val = i.next();
+ if (val < -32768 || val > 32767)
+ i.remove();
+}
+//! [22]
+
+
+//! [23]
+QMutableListIterator<double> i(list);
+while (i.hasNext()) {
+ double val = i.next();
+ i.setValue(sqrt(val));
+}
+//! [23]
+
+
+//! [24]
+QMutableLinkedListIterator<double> i(list);
+while (i.hasNext()) {
+ double val = i.next();
+ i.setValue(sqrt(val));
+}
+//! [24]
+
+
+//! [25]
+QMutableVectorIterator<double> i(list);
+while (i.hasNext()) {
+ double val = i.next();
+ i.setValue(sqrt(val));
+}
+//! [25]
+
+
+//! [26]
+QMap<int, QWidget *> map;
+...
+QMapIterator<int, QWidget *> i(map);
+while (i.hasNext()) {
+ i.next();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [26]
+
+
+//! [27]
+QMapIterator<int, QWidget *> i(map);
+i.toBack();
+while (i.hasPrevious()) {
+ i.previous();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [27]
+
+
+//! [28]
+QMapIterator<int, QWidget *> i(map);
+while (i.findNext(widget)) {
+ qDebug() << "Found widget " << widget << " under key "
+ << i.key();
+}
+//! [28]
+
+
+//! [29]
+QHash<int, QWidget *> hash;
+...
+QHashIterator<int, QWidget *> i(hash);
+while (i.hasNext()) {
+ i.next();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [29]
+
+
+//! [30]
+QHashIterator<int, QWidget *> i(hash);
+i.toBack();
+while (i.hasPrevious()) {
+ i.previous();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [30]
+
+
+//! [31]
+QHashIterator<int, QWidget *> i(hash);
+while (i.findNext(widget)) {
+ qDebug() << "Found widget " << widget << " under key "
+ << i.key();
+}
+//! [31]
+
+
+//! [32]
+QMap<int, QWidget *> map;
+...
+QMutableMapIterator<int, QWidget *> i(map);
+while (i.hasNext()) {
+ i.next();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [32]
+
+
+//! [33]
+QMutableMapIterator<int, QWidget *> i(map);
+i.toBack();
+while (i.hasPrevious()) {
+ i.previous();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [33]
+
+
+//! [34]
+QMutableMapIterator<int, QWidget *> i(map);
+while (i.findNext(widget)) {
+ qDebug() << "Found widget " << widget << " under key "
+ << i.key();
+}
+//! [34]
+
+
+//! [35]
+QMutableMapIterator<QString, QString> i(map);
+while (i.hasNext()) {
+ i.next();
+ if (i.key() == i.value())
+ i.remove();
+}
+//! [35]
+
+
+//! [36]
+QHash<int, QWidget *> hash;
+...
+QMutableHashIterator<QString, QWidget *> i(hash);
+while (i.hasNext()) {
+ i.next();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [36]
+
+
+//! [37]
+QMutableHashIterator<int, QWidget *> i(hash);
+i.toBack();
+while (i.hasPrevious()) {
+ i.previous();
+ qDebug() << i.key() << ": " << i.value();
+}
+//! [37]
+
+
+//! [38]
+QMutableHashIterator<int, QWidget *> i(hash);
+while (i.findNext(widget)) {
+ qDebug() << "Found widget " << widget << " under key "
+ << i.key();
+}
+//! [38]
+
+
+//! [39]
+QMutableHashIterator<QString, QString> i(hash);
+while (i.hasNext()) {
+ i.next();
+ if (i.key() == i.value())
+ i.remove();
+}
+//! [39]
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
new file mode 100644
index 0000000..edb66bc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc
@@ -0,0 +1,813 @@
+//! [0]
+make all
+//! [0]
+
+
+//! [1]
+CONFIG += qt thread debug
+//! [1]
+
+
+//! [2]
+CONFIG += qt
+QT += network xml
+//! [2]
+
+
+//! [3]
+QT = network xml # This will omit the core and gui modules.
+//! [3]
+
+
+//! [4]
+QT -= gui # Only the core module is used.
+//! [4]
+
+
+//! [5]
+CONFIG += link_pkgconfig
+PKGCONFIG += ogg dbus-1
+//! [5]
+
+
+//! [6]
+LIBS += -L/usr/local/lib -lmath
+//! [6]
+
+
+//! [7]
+INCLUDEPATH = c:/msdev/include d:/stl/include
+//! [7]
+
+
+//! [8]
+qmake [mode] [options] files
+//! [8]
+
+
+//! [9]
+qmake -makefile [options] files
+//! [9]
+
+
+//! [10]
+qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro
+//! [10]
+
+
+//! [11]
+qmake "CONFIG+=test" test.pro
+//! [11]
+
+
+//! [12]
+qmake -project [options] files
+//! [12]
+
+
+//! [13]
+qmake -spec macx-g++
+//! [13]
+
+
+//! [14]
+QMAKE_LFLAGS += -F/path/to/framework/directory/
+//! [14]
+
+
+//! [15]
+LIBS += -framework TheFramework
+//! [15]
+
+
+//! [16]
+TEMPLATE = lib
+CONFIG += lib_bundle
+//! [16]
+
+
+//! [17]
+FRAMEWORK_HEADERS.version = Versions
+FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
+FRAMEWORK_HEADERS.path = Headers
+QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+//! [17]
+
+
+//! [18]
+CONFIG += x86 ppc
+//! [18]
+
+
+//! [19]
+qmake -spec macx-xcode project.pro
+//! [19]
+
+
+//! [20]
+qmake -tp vc
+//! [20]
+
+
+//! [21]
+qmake -tp vc -r
+//! [21]
+
+
+//! [22]
+CONFIG -= embed_manifest_exe
+//! [22]
+
+
+//! [23]
+CONFIG -= embed_manifest_dll
+//! [23]
+
+
+//! [24]
+make all
+//! [24]
+
+
+//! [25]
+build_pass:CONFIG(debug, debug|release) {
+ unix: TARGET = $$join(TARGET,,,_debug)
+ else: TARGET = $$join(TARGET,,,d)
+}
+//! [25]
+
+
+//! [26]
+CONFIG += qt console newstuff
+...
+newstuff {
+ SOURCES += new.cpp
+ HEADERS += new.h
+}
+//! [26]
+
+
+//! [27]
+DEFINES += USE_MY_STUFF QT_DLL
+//! [27]
+
+
+//! [28]
+myFiles.sources = path\*.png
+DEPLOYMENT += myFiles
+//! [28]
+
+
+//! [29]
+myFiles.sources = path\file1.ext1 path2\file2.ext1 path3\*
+myFiles.path = \some\path\on\device
+someother.sources = C:\additional\files\*
+someother.path = \myFiles\path2
+DEPLOYMENT += myFiles someother
+//! [29]
+
+
+//! [30]
+DESTDIR = ../../lib
+//! [30]
+
+
+//! [31]
+DISTFILES += ../program.txt
+//! [31]
+
+
+//! [32]
+FORMS = mydialog.ui \
+ mywidget.ui \
+ myconfig.ui
+//! [32]
+
+
+//! [33]
+FORMS3 = my_uic3_dialog.ui \
+ my_uic3_widget.ui \
+ my_uic3_config.ui
+//! [33]
+
+
+//! [34]
+HEADERS = myclass.h \
+ login.h \
+ mainwindow.h
+//! [34]
+
+
+//! [35]
+INCLUDEPATH = c:/msdev/include d:/stl/include
+//! [35]
+
+
+//! [36]
+target.path += $$[QT_INSTALL_PLUGINS]/imageformats
+INSTALLS += target
+//! [36]
+
+
+//! [37]
+LEXSOURCES = lexer.l
+//! [37]
+
+
+//! [38]
+unix:LIBS += -L/usr/local/lib -lmath
+win32:LIBS += c:/mylibs/math.lib
+//! [38]
+
+
+//! [39]
+CONFIG += no_lflags_merge
+//! [39]
+
+
+//! [40]
+unix:MOC_DIR = ../myproject/tmp
+win32:MOC_DIR = c:/myproject/tmp
+//! [40]
+
+
+//! [41]
+unix:OBJECTS_DIR = ../myproject/tmp
+win32:OBJECTS_DIR = c:/myproject/tmp
+//! [41]
+
+
+//! [42]
+app {
+ # Conditional code for 'app' template here
+}
+//! [42]
+
+
+//! [43]
+FRAMEWORK_HEADERS.version = Versions
+FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
+FRAMEWORK_HEADERS.path = Headers
+QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+//! [43]
+
+
+//! [44]
+QMAKE_BUNDLE_EXTENSION = .myframework
+//! [44]
+
+
+//! [45]
+QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
+//! [45]
+
+
+//! [46]
+QMAKE_UIC = uic -L /path/to/plugin
+//! [46]
+
+
+//! [47]
+QT -= gui # Only the core module is used.
+//! [47]
+
+
+//! [48]
+unix:RCC_DIR = ../myproject/resources
+win32:RCC_DIR = c:/myproject/resources
+//! [48]
+
+
+//! [49]
+SOURCES = myclass.cpp \
+ login.cpp \
+ mainwindow.cpp
+//! [49]
+
+
+//! [50]
+SUBDIRS = kernel \
+ tools
+//! [50]
+
+
+//! [51]
+CONFIG += ordered
+//! [51]
+
+
+//! [52]
+TEMPLATE = app
+TARGET = myapp
+SOURCES = main.cpp
+//! [52]
+
+
+//! [53]
+TEMPLATE = lib
+SOURCES = main.cpp
+TARGET = mylib
+//! [53]
+
+
+//! [54]
+unix:UI_DIR = ../myproject/ui
+win32:UI_DIR = c:/myproject/ui
+//! [54]
+
+
+//! [55]
+unix:UI_HEADERS_DIR = ../myproject/ui/include
+win32:UI_HEADERS_DIR = c:/myproject/ui/include
+//! [55]
+
+
+//! [56]
+unix:UI_SOURCES_DIR = ../myproject/ui/src
+win32:UI_SOURCES_DIR = c:/myproject/ui/src
+//! [56]
+
+
+//! [57]
+VERSION = 1.2.3
+//! [57]
+
+
+//! [58]
+YACCSOURCES = moc.y
+//! [58]
+
+
+//! [59]
+FILE = /etc/passwd
+FILENAME = $$basename(FILE) #passwd
+//! [59]
+
+
+//! [60]
+CONFIG = debug
+CONFIG += release
+CONFIG(release, debug|release):message(Release build!) #will print
+CONFIG(debug, debug|release):message(Debug build!) #no print
+//! [60]
+
+
+//! [61]
+contains( drivers, network ) {
+ # drivers contains 'network'
+ message( "Configuring for network build..." )
+ HEADERS += network.h
+ SOURCES += network.cpp
+}
+//! [61]
+
+
+//! [62]
+error(An error has occurred in the configuration process.)
+//! [62]
+
+
+//! [63]
+exists( $(QTDIR)/lib/libqt-mt* ) {
+ message( "Configuring for multi-threaded Qt..." )
+ CONFIG += thread
+}
+//! [63]
+
+
+//! [64]
+MY_VAR = one two three four
+MY_VAR2 = $$join(MY_VAR, " -L", -L) -Lfive
+MY_VAR3 = $$member(MY_VAR, 2) $$find(MY_VAR, t.*)
+//! [64]
+
+
+//! [65]
+LIST = 1 2 3
+for(a, LIST):exists(file.$${a}):message(I see a file.$${a}!)
+//! [65]
+
+
+//! [66]
+include( shared.pri )
+OPTIONS = standard custom
+!include( options.pri ) {
+ message( "No custom build options specified" )
+OPTIONS -= custom
+}
+//! [66]
+
+
+//! [67]
+isEmpty( CONFIG ) {
+CONFIG += qt warn_on debug
+}
+//! [67]
+
+
+//! [68]
+message( "This is a message" )
+//! [68]
+
+
+//! [69]
+!build_pass:message( "This is a message" )
+//! [69]
+
+
+//! [70]
+This is a test.
+//! [70]
+
+
+//! [71]
+system(ls /bin):HAS_BIN=FALSE
+//! [71]
+
+
+//! [72]
+UNAME = $$system(uname -s)
+contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
+//! [72]
+
+
+//! [73]
+ARGS = 1 2 3 2 5 1
+ARGS = $$unique(ARGS) #1 2 3 5
+//! [73]
+
+
+//! [74]
+qmake -set VARIABLE VALUE
+//! [74]
+
+
+//! [75]
+qmake -query VARIABLE
+qmake -query #queries all current VARIABLE/VALUE pairs..
+//! [75]
+
+
+//! [76]
+qmake -query "1.06a/VARIABLE"
+//! [76]
+
+
+//! [77]
+qmake -query "QT_INSTALL_PREFIX"
+//! [77]
+
+
+//! [78]
+QMAKE_VERS = $$[QMAKE_VERSION]
+//! [78]
+
+
+//! [79]
+documentation.path = /usr/local/program/doc
+documentation.files = docs/*
+//! [79]
+
+
+//! [80]
+INSTALLS += documentation
+//! [80]
+
+
+//! [81]
+unix:documentation.extra = create_docs; mv master.doc toc.doc
+//! [81]
+
+
+//! [82]
+target.path = /usr/local/myprogram
+INSTALLS += target
+//! [82]
+
+
+//! [83]
+CONFIG += create_prl
+//! [83]
+
+
+//! [84]
+CONFIG += link_prl
+//! [84]
+
+
+//! [85]
+QMAKE_EXT_MOC = .mymoc
+//! [85]
+
+
+//! [86]
+mytarget.target = .buildfile
+mytarget.commands = touch $$mytarget.target
+mytarget.depends = mytarget2
+
+mytarget2.commands = @echo Building $$mytarget.target
+//! [86]
+
+
+//! [87]
+QMAKE_EXTRA_TARGETS += mytarget mytarget2
+//! [87]
+
+
+//! [88]
+new_moc.output = moc_${QMAKE_FILE_BASE}.cpp
+new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
+new_moc.depend_command = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
+new_moc.input = NEW_HEADERS
+QMAKE_EXTRA_COMPILERS += new_moc
+//! [88]
+
+
+//! [89]
+TARGET = myapp
+//! [89]
+
+
+//! [90]
+DEFINES += QT_DLL
+//! [90]
+
+
+//! [91]
+DEFINES -= QT_DLL
+//! [91]
+
+
+//! [92]
+DEFINES *= QT_DLL
+//! [92]
+
+
+//! [93]
+DEFINES ~= s/QT_[DT].+/QT
+//! [93]
+
+
+//! [94]
+EVERYTHING = $$SOURCES $$HEADERS
+message("The project contains the following files:")
+message($$EVERYTHING)
+//! [94]
+
+
+//! [95]
+win32:DEFINES += QT_DLL
+//! [95]
+
+
+//! [96]
+win32:xml {
+ message(Building for Windows)
+ SOURCES += xmlhandler_win.cpp
+} else:xml {
+ SOURCES += xmlhandler.cpp
+} else {
+ message("Unknown configuration")
+}
+//! [96]
+
+
+//! [97]
+MY_VARIABLE = value
+//! [97]
+
+
+//! [98]
+MY_DEFINES = $$DEFINES
+//! [98]
+
+
+//! [99]
+MY_DEFINES = $${DEFINES}
+//! [99]
+
+
+//! [100]
+TARGET = myproject_$${TEMPLATE}
+//! [100]
+
+
+//! [101]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+//! [101]
+
+
+//! [102]
+defineReplace(functionName){
+ #function code
+}
+//! [102]
+
+
+//! [103]
+CONFIG += myfeatures
+//! [103]
+
+
+//! [104]
+// Add C includes here
+
+#if defined __cplusplus
+// Add C++ includes here
+#include <stdlib>
+#include <iostream>
+#include <vector>
+#include <QApplication> // Qt includes
+#include <QPushButton>
+#include <QLabel>
+#include "thirdparty/include/libmain.h"
+#include "my_stable_class.h"
+...
+#endif
+//! [104]
+
+
+//! [105]
+PRECOMPILED_HEADER = stable.h
+//! [105]
+
+
+//! [106]
+precompile_header:!isEmpty(PRECOMPILED_HEADER) {
+DEFINES += USING_PCH
+}
+//! [106]
+
+
+//! [107]
+PRECOMPILED_HEADER = window.h
+SOURCES = window.cpp
+//! [107]
+
+
+//! [108]
+SOURCES += hello.cpp
+//! [108]
+
+
+//! [109]
+SOURCES += hello.cpp
+SOURCES += main.cpp
+//! [109]
+
+
+//! [110]
+SOURCES = hello.cpp \
+ main.cpp
+//! [110]
+
+
+//! [111]
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+//! [111]
+
+
+//! [112]
+TARGET = helloworld
+//! [112]
+
+
+//! [113]
+CONFIG += qt
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+//! [113]
+
+
+//! [114]
+qmake -o Makefile hello.pro
+//! [114]
+
+
+//! [115]
+qmake -tp vc -o hello.dsp hello.pro
+//! [115]
+
+
+//! [116]
+CONFIG += qt debug
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+//! [116]
+
+
+//! [117]
+win32 {
+ SOURCES += hellowin.cpp
+}
+//! [117]
+
+
+//! [118]
+CONFIG += qt debug
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+win32 {
+ SOURCES += hellowin.cpp
+}
+unix {
+ SOURCES += hellounix.cpp
+}
+//! [118]
+
+
+//! [119]
+!exists( main.cpp ) {
+ error( "No main.cpp file found" )
+}
+//! [119]
+
+
+//! [120]
+CONFIG += qt debug
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+win32 {
+ SOURCES += hellowin.cpp
+}
+unix {
+ SOURCES += hellounix.cpp
+}
+!exists( main.cpp ) {
+ error( "No main.cpp file found" )
+}
+//! [120]
+
+
+//! [121]
+win32 {
+ debug {
+ CONFIG += console
+ }
+}
+//! [121]
+
+
+//! [122]
+CONFIG += qt debug
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+win32 {
+ SOURCES += hellowin.cpp
+}
+unix {
+ SOURCES += hellounix.cpp
+}
+!exists( main.cpp ) {
+ error( "No main.cpp file found" )
+}
+win32:debug {
+ CONFIG += console
+}
+//! [122]
+
+
+//! [123]
+TEMPLATE = app
+DESTDIR = c:/helloapp
+HEADERS += hello.h
+SOURCES += hello.cpp
+SOURCES += main.cpp
+DEFINES += QT_DLL
+CONFIG += qt warn_on release
+//! [123]
+
+
+//! [124]
+make all
+//! [124]
+
+
+//! [125]
+make
+//! [125]
+
+
+//! [126]
+make install
+//! [126]
+
+
+//! [127]
+CONFIG(debug, debug|release) {
+ mac: TARGET = $$join(TARGET,,,_debug)
+ win32: TARGET = $$join(TARGET,,d)
+}
+//! [127]
+
+//! [128]
+DEPLOYMENT_PLUGIN += qjpeg
+//! [128]
diff --git a/doc/src/snippets/code/doc_src_qnamespace.qdoc b/doc/src/snippets/code/doc_src_qnamespace.qdoc
new file mode 100644
index 0000000..250d62d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qnamespace.qdoc
@@ -0,0 +1,24 @@
+//! [0]
+QObject::connect: Cannot queue arguments of type 'MyType'
+//! [0]
+
+
+//! [1]
+enum CustomEventPriority
+{
+ // An important event
+ ImportantEventPriority = Qt::HighEventPriority,
+
+ // A more important event
+ MoreImportantEventPriority = ImportantEventPriority + 1,
+
+ // A critical event
+ CriticalEventPriority = 100 * MoreImportantEventPriority,
+
+ // Not that important
+ StatusEventPriority = Qt::LowEventPriority,
+
+ // These are less important than Status events
+ IdleProcessingDoneEventPriority = StatusEventPriority - 1
+};
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qpair.qdoc b/doc/src/snippets/code/doc_src_qpair.qdoc
new file mode 100644
index 0000000..74c7c83
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qpair.qdoc
@@ -0,0 +1,15 @@
+//! [0]
+QPair<QString, double> pair;
+//! [0]
+
+
+//! [1]
+pair.first = "pi";
+pair.second = 3.14159265358979323846;
+//! [1]
+
+
+//! [2]
+QList<QPair<int, double> > list;
+list.append(qMakePair(66, 3.14159));
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qplugin.qdoc b/doc/src/snippets/code/doc_src_qplugin.qdoc
new file mode 100644
index 0000000..d9b627e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qplugin.qdoc
@@ -0,0 +1,24 @@
+//! [0]
+namespace Foo
+{
+ struct MyInterface { ... };
+}
+
+Q_DECLARE_INTERFACE(Foo::MyInterface, "org.examples.MyInterface")
+//! [0]
+
+
+//! [1]
+Q_EXPORT_PLUGIN2(pnp_extrafilters, ExtraFiltersPlugin)
+//! [1]
+
+
+//! [2]
+Q_IMPORT_PLUGIN(qjpeg)
+//! [2]
+
+
+//! [3]
+TEMPLATE = app
+QTPLUGIN += qjpeg qgif qmng # image formats
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_qset.qdoc b/doc/src/snippets/code/doc_src_qset.qdoc
new file mode 100644
index 0000000..7469d2a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qset.qdoc
@@ -0,0 +1,126 @@
+//! [0]
+QSet<QString> set;
+//! [0]
+
+
+//! [1]
+set.insert("one");
+set.insert("three");
+set.insert("seven");
+//! [1]
+
+
+//! [2]
+set << "twelve" << "fifteen" << "nineteen";
+//! [2]
+
+
+//! [3]
+if (!set.contains("ninety-nine"))
+ ...
+//! [3]
+
+
+//! [4]
+QSetIterator<QWidget *> i(set);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [4]
+
+
+//! [5]
+QSet<QWidget *>::const_iterator i = set.constBegin();
+while (i != set.constEnd()) {
+ qDebug() << *i;
+ ++i;
+}
+//! [5]
+
+
+//! [6]
+QSet<QString> set;
+...
+foreach (QString value, set)
+ qDebug() << value;
+//! [6]
+
+
+//! [7]
+QSet<QString> set;
+set.reserve(20000);
+for (int i = 0; i < 20000; ++i)
+ set.insert(values[i]);
+//! [7]
+
+
+//! [8]
+QSet<QString> set;
+set << "January" << "February" << ... << "December";
+
+QSet<QString>::iterator i;
+for (i = set.begin(); i != set.end(); ++i)
+ qDebug() << *i;
+//! [8]
+
+
+//! [9]
+QSet<QString> set;
+set << "January" << "February" << ... << "December";
+
+QSet<QString>::iterator i = set.begin();
+while (i != set.end()) {
+ if ((*i).startsWith('J')) {
+ i = set.erase(i);
+ } else {
+ ++i;
+ }
+}
+//! [9]
+
+
+//! [10]
+QSet<QString> set;
+...
+QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
+if (it != set.end())
+ cout << "Found Jeanette" << endl;
+//! [10]
+
+
+//! [11]
+QSet<QString> set;
+set << "January" << "February" << ... << "December";
+
+QSet<QString>::const_iterator i;
+for (i = set.begin(); i != set.end(); ++i)
+ qDebug() << *i;
+//! [11]
+
+
+//! [12]
+QSet<QString> set;
+...
+QSet<QString>::iterator it = qFind(set.begin(), set.end(), "Jeanette");
+if (it != set.constEnd())
+ cout << "Found Jeanette" << endl;
+//! [12]
+
+
+//! [13]
+QSet<QString> set;
+set << "red" << "green" << "blue" << ... << "black";
+
+QList<QString> list = set.toList();
+qSort(list);
+//! [13]
+
+
+//! [14]
+QStringList list;
+list << "Julia" << "Mike" << "Mike" << "Julia" << "Julia";
+
+QSet<QString> set = QSet<QString>::fromList(list);
+set.contains("Julia"); // returns true
+set.contains("Mike"); // returns true
+set.size(); // returns 2
+//! [14]
diff --git a/doc/src/snippets/code/doc_src_qsignalspy.qdoc b/doc/src/snippets/code/doc_src_qsignalspy.qdoc
new file mode 100644
index 0000000..d6b65dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qsignalspy.qdoc
@@ -0,0 +1,41 @@
+//! [0]
+QCheckBox *box = ...;
+QSignalSpy spy(box, SIGNAL(clicked(bool)));
+
+// do something that triggers the signal
+box->animateClick();
+
+QCOMPARE(spy.count(), 1); // make sure the signal was emitted exactly one time
+QList<QVariant> arguments = spy.takeFirst(); // take the first signal
+
+QVERIFY(arguments.at(0).toBool() == true); // verify the first argument
+//! [0]
+
+
+//! [1]
+QSignalSpy spy(myCustomObject, SIGNAL(mySignal(int, QString, double)));
+
+myCustomObject->doSomething(); // trigger emission of the signal
+
+QList<QVariant> arguments = spy.takeFirst();
+QVERIFY(arguments.at(0).type() == QVariant::Int);
+QVERIFY(arguments.at(1).type() == QVariant::QString);
+QVERIFY(arguments.at(2).type() == QVariant::double);
+//! [1]
+
+
+//! [2]
+qRegisterMetaType<QModelIndex>("QModelIndex");
+QSignalSpy spy(&model, SIGNAL(whatever(QModelIndex)));
+//! [2]
+
+
+//! [3]
+// get the first argument from the first received signal:
+QModelIndex result = qvariant_cast<QModelIndex>(spy.at(0).at(0));
+//! [3]
+
+
+//! [4]
+QSignalSpy spy(myPushButton, SIGNAL(clicked(bool)));
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_qt-conf.qdoc b/doc/src/snippets/code/doc_src_qt-conf.qdoc
new file mode 100644
index 0000000..d675795
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt-conf.qdoc
@@ -0,0 +1,14 @@
+//! [0]
+[Paths]
+Prefix = /some/path
+Translations = i18n
+//! [0]
+
+
+//! [1]
+Paths
+Paths/4
+Paths/4.1
+Paths/4.2.5
+Paths/6
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc b/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc
new file mode 100644
index 0000000..a3ab4dd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt-embedded-displaymanagement.qdoc
@@ -0,0 +1,51 @@
+//! [0]
+$QPEDIR/qtopiacore/qt/configure -help
+//! [0]
+
+
+//! [1]
+./configure -help
+//! [1]
+
+
+//! [2]
+./configure -extra-qt-embedded-config "-qt-gfx-transformed"
+//! [2]
+
+
+//! [3]
+./configure -qt-gfx-transformed
+//! [3]
+
+
+//! [4]
+export QWS_DISPLAY="<driver>[:<driver specific options>]...
+ [:<display num>]"
+//! [4]
+
+
+//! [5]
+myApplication -display "<driver>[:<driver specific options>]...
+ [:<display num>]"
+//! [5]
+
+
+//! [6]
+export QWS_DISPLAY="<driver>[:<subdriver>][:<subdriver options>]...
+ [ :<display num>]"
+//! [6]
+
+
+//! [7]
+export QWS_DISPLAY="Multi: QVFb:0 QVFb:offset=640,0:1 :2"
+//! [7]
+
+
+//! [8]
+export QWS_DISPLAY="VNC:size=720x480:depth=32"
+//! [8]
+
+
+//! [9]
+export QWS_DISPLAY="VNC:LinuxFb"
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_qt3support.qdoc b/doc/src/snippets/code/doc_src_qt3support.qdoc
new file mode 100644
index 0000000..e6f0272
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3support.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <Qt3Support>
+//! [0]
+
+
+//! [1]
+QT += qt3support
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qt3to4.qdoc b/doc/src/snippets/code/doc_src_qt3to4.qdoc
new file mode 100644
index 0000000..da0832d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3to4.qdoc
@@ -0,0 +1,26 @@
+//! [0]
+qt3to4 myfile.cpp
+qt3to4 myapp.pro
+//! [0]
+
+
+//! [1]
+<Rules>
+ <Include>/path/to/q3porting.xml</Include>
+
+ <item Type="RenamedHeader" Disable="True" >
+ <Qt4>q3sqlselectcursor.h</Qt4>
+ <Qt3>qsqlselectcursor.h</Qt3>
+ </item>
+
+ <item Type="RenamedHeader" >
+ <Qt4>newclass.h</Qt4>
+ <Qt3>oldclass.h</Qt3>
+ </item>
+</Rules>
+//! [1]
+
+
+//! [2]
+using namespace Qt;
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc b/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc
new file mode 100644
index 0000000..8bed0a9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc
@@ -0,0 +1,59 @@
+//! [environment]
+export QT_ACCESSIBILITY=1
+//! [environment]
+
+//! [0]
+class MyWidgetInterface : public QAccessibleWidget
+{
+public:
+ MyWidgetInterface(QWidget *widget, Role role);
+
+ QString text(Text text, int child) const;
+ State state(int child) const;
+ QString actionText(int action, Text text, int child) const;
+ bool doAction(int action, int child, const QVariantList &params);
+ ...
+};
+//! [0]
+
+
+//! [1]
+bool MyWidgetInterface::doAction(int action, int child,
+ const QVariantList &params)
+{
+ if (child || !widget()->isEnabled())
+ return false;
+
+ switch (action) {
+ case DefaultAction:
+ case Press:
+ {
+ MyWidget *widget = qobject_cast<MyWidget *>(object());
+ if (widget)
+ widget->click();
+ }
+ return true;
+ }
+ return QAccessibleWidget::doAction(action, child, params);
+}
+//! [1]
+
+
+//! [2]
+QStringList MyFactory::keys() const
+{
+ return QStringList() << "MyWidget" << "MyOtherWidget";
+}
+
+QAccessibleInterface *MyFactory::create(const QString &className,
+ QObject *object)
+{
+ if (classname == "MyWidget")
+ return new MyWidgetInterface(object);
+ if (classname == "MyOtherWidget")
+ return new MyOtherWidgetInterface(object);
+ return 0;
+}
+
+Q_EXPORT_PLUGIN2(myfactory, MyFactory)
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc b/doc/src/snippets/code/doc_src_qt4-arthur.qdoc
new file mode 100644
index 0000000..6ac30ae
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-arthur.qdoc
@@ -0,0 +1,104 @@
+//! [0]
+QLinearGradient gradient(0, 0, 100, 100);
+gradient.setColorAt(0, Qt::red);
+gradient.setColorAt(0.5, Qt::green);
+gradient.setColorAt(1, Qt::blue);
+painter.setBrush(gradient);
+painter.drawRect(0, 0, 100, 100);
+//! [0]
+
+
+//! [1]
+QRadialGradient gradient(50, 50, 50, 30, 30);
+gradient.setColorAt(0.2, Qt::white);
+gradient.setColorAt(0.8, Qt::green);
+gradient.setColorAt(1, Qt::black);
+painter.setBrush(gradient);
+painter.drawEllipse(0, 0, 100, 100);
+//! [1]
+
+
+//! [2]
+QConicalGradient gradient(60, 40, 0);
+gradient.setColorAt(0, Qt::black);
+gradient.setColorAt(0.4, Qt::green);
+gradient.setColorAt(0.6, Qt::white);
+gradient.setColorAt(1, Qt::black);
+painter.setBrush(gradient);
+painter.drawEllipse(0, 0, 100, 100);
+//! [2]
+
+
+//! [3]
+// Specfiy semi-transparent red
+painter.setBrush(QColor(255, 0, 0, 127));
+painter.drawRect(0, 0, width()/2, height());
+
+// Specify semi-transparend blue
+painter.setBrush(QColor(0, 0, 255, 127));
+painter.drawRect(0, 0, width(), height()/2);
+//! [3]
+
+
+//! [4]
+// One line without anti-aliasing
+painter.drawLine(0, 0, width()/2, height());
+
+// One line with anti-aliasing
+painter.setRenderHint(QPainter::Antialiasing);
+painter.drawLine(width()/2, 0, width()/2, height());
+//! [4]
+
+
+//! [5]
+QPainterPath path;
+path.addRect(20, 20, 60, 60);
+path.addBezier(0, 0, 99, 0, 50, 50, 99, 99);
+path.addBezier(99, 99, 0, 99, 50, 50, 0, 0);
+painter.drawPath(path);
+//! [5]
+
+
+//! [6]
+QPixmap buffer(size());
+QPainter painter(&buffer);
+
+// Paint code here
+
+painter.end();
+bitBlt(this, 0, 0, &buffer);
+//! [6]
+
+
+//! [7]
+QPainter painter(this);
+
+// Paint code here
+
+painter.end();
+//! [7]
+
+
+//! [8]
+unbufferedWidget->setAttribute(Qt::WA_PaintOnScreen);
+//! [8]
+
+
+//! [9]
+QLinearGradient gradient(0, 0, 100, 100);
+gradient.setColorAt(0, Qt::blue);
+gradient.setColorAt(1, Qt::red);
+painter.setPen(QPen(gradient, 0));
+for (int y=fontSize; y<100; y+=fontSize)
+ drawText(0, y, text);
+//! [9]
+
+
+//! [10]
+QImage image(100, 100, 32);
+QPainter painter(&image);
+
+// painter commands.
+
+painter.end();
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_qt4-intro.qdoc b/doc/src/snippets/code/doc_src_qt4-intro.qdoc
new file mode 100644
index 0000000..ced563e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-intro.qdoc
@@ -0,0 +1,101 @@
+//! [0]
+QT -= gui
+//! [0]
+
+
+//! [1]
+QT += network opengl sql qt3support
+//! [1]
+
+
+//! [2]
+CONFIG += uic3
+//! [2]
+
+
+//! [3]
+#include <QClassName>
+//! [3]
+
+
+//! [4]
+#include <QString>
+#include <QApplication>
+#include <QSqlTableModel>
+//! [4]
+
+
+//! [5]
+#include <qclassname.h>
+//! [5]
+
+
+//! [6]
+#include <QtCore>
+//! [6]
+
+
+//! [7]
+using namespace Qt;
+//! [7]
+
+
+//! [8]
+QLabel *label1 = new QLabel("Hello", this);
+QLabel *label2 = new QLabel(this, "Hello");
+//! [8]
+
+
+//! [9]
+MyWidget::MyWidget(QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ ...
+}
+//! [9]
+
+
+//! [10]
+// DEPRECATED
+if (obj->inherits("QPushButton")) {
+ QPushButton *pushButton = (QPushButton *)obj;
+ ...
+}
+//! [10]
+
+
+//! [11]
+QPushButton *pushButton = qobject_cast<QPushButton *>(obj);
+if (pushButton) {
+ ...
+}
+//! [11]
+
+
+//! [12]
+QLabel *label = new QLabel;
+QPointer<QLabel> safeLabel = label;
+safeLabel->setText("Hello world!");
+delete label;
+// safeLabel is now 0, whereas label is a dangling pointer
+//! [12]
+
+
+//! [13]
+QT += qt3support
+//! [13]
+
+
+//! [14]
+DEFINES += QT3_SUPPORT
+//! [14]
+
+
+//! [15]
+DEFINES += QT3_SUPPORT_WARNINGS
+//! [15]
+
+
+//! [16]
+DEFINES += QT3_SUPPORT
+//! [16]
diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc b/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc
new file mode 100644
index 0000000..9e81fd1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc
@@ -0,0 +1,70 @@
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+//! [0]
+
+
+//! [1]
+fileToolbar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
+addToolBar(Qt::TopToolBarArea, fileToolbar);
+//! [1]
+
+
+//! [2]
+setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
+setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
+setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
+setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
+//! [2]
+
+
+//! [3]
+QWidget *centralWidget = new QWidget(this);
+setCentralWidget(centralWidget);
+//! [3]
+
+
+//! [4]
+QPopupMenu *fileMenu = new QPopupMenu(this);
+openAction->addTo(fileMenu);
+saveAction->addTo(fileMenu);
+...
+menuBar()->insertItem(tr("&File"), fileMenu);
+//! [4]
+
+
+//! [5]
+QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+fileMenu->addAction(openAction);
+fileMenu->addAction(saveAction);
+...
+//! [5]
+
+
+//! [6]
+QToolBar *fileTools = new QToolBar(this, "file toolbar");
+openAction->addTo(fileTools);
+saveAction->addTo(fileTools);
+...
+//! [6]
+
+
+//! [7]
+QToolBar *fileTools = addToolBar(tr("File Tool Bar"));
+fileTools->addAction(openAction);
+fileTools->addAction(saveAction);
+...
+//! [7]
+
+
+//! [8]
+QDockWidget *dockWidget = new QDockWidget(this);
+mainWin->moveDockWidget(dockWidget, Qt::DockLeft);
+//! [8]
+
+
+//! [9]
+QDockWidget *dockWidget = new QDockWidget(mainWindow);
+mainWindow->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_qt4-sql.qdoc b/doc/src/snippets/code/doc_src_qt4-sql.qdoc
new file mode 100644
index 0000000..74b04eb
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-sql.qdoc
@@ -0,0 +1,19 @@
+//! [0]
+QSqlQueryModel model;
+model.setQuery("select * from person");
+
+QTableView view;
+view.setModel(&model);
+view.show();
+//! [0]
+
+
+//! [1]
+QSqlTableModel model;
+model.setTable("person");
+model.select();
+
+QTableView view;
+view.setModel(&model);
+view.show();
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qt4-styles.qdoc b/doc/src/snippets/code/doc_src_qt4-styles.qdoc
new file mode 100644
index 0000000..b75c135
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-styles.qdoc
@@ -0,0 +1,42 @@
+//! [0]
+const QStyleOptionFocusRect *focusRectOption =
+ qstyleoption_cast<const QStyleOptionFocusRect *>(option);
+if (focusRectOption) {
+ ...
+}
+//! [0]
+
+
+//! [1]
+void MyWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(this);
+ ...
+
+ QStyleOptionFocusRect option(1);
+ option.init(this);
+ option.backgroundColor = palette().color(QPalette::Window);
+
+ style().drawPrimitive(QStyle::PE_FrameFocusRect, &option, &painter,
+ this);
+}
+//! [1]
+
+
+//! [2]
+void drawControl(ControlElement element,
+ QPainter *painter,
+ const QWidget *widget,
+ const QRect &rect,
+ const QColorGroup &colorGroup,
+ SFlags how = Style_Default,
+ const QStyleOption &option = QStyleOption::Default) const;
+//! [2]
+
+
+//! [3]
+void drawControl(ControlElement element,
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget = 0) const;
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
new file mode 100644
index 0000000..2bc5af1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
@@ -0,0 +1,100 @@
+//! [0]
+foreach (variable, container)
+ statement;
+//! [0]
+
+
+//! [1]
+QList<QString> list;
+...
+foreach (QString str, list)
+ cout << str.ascii() << endl;
+//! [1]
+
+
+//! [2]
+QString str;
+foreach (str, list)
+ cout << str.ascii() << endl;
+//! [2]
+
+
+//! [3]
+// forward // backward
+QList<QString> list; QList<QString> list;
+... ...
+QListIterator<QString> i(list); QListIterator<QString> i(list);
+while (i.hasNext()) i.toBack();
+ cout << i.next().ascii() << endl; while (i.hasPrev())
+ cout << i.prev().ascii() << endl;
+//! [3]
+
+
+//! [4]
+// forward // backward
+QMutableListIterator<int> i(list); QMutableListIterator<int> i(list);
+while (i.hasNext()) i.toBack();
+ if (i.next() > 128) while (i.hasPrev())
+ i.setValue(128); if (i.prev() > 128)
+ i.setValue(128);
+//! [4]
+
+
+//! [5]
+// forward // backward
+QMutableListIterator<int> i(list); QMutableListIterator<int> i(list);
+while (i.hasNext()) i.toBack();
+ if (i.next() % 2 != 0) while (i.hasPrev())
+ i.remove(); if (i.prev() % 2 != 0)
+ i.remove();
+//! [5]
+
+
+//! [6]
+// STL-style // Java-style
+QMap<int, QWidget *>::const_iterator i; QMapIterator<int, QWidget *> i(map);
+for (i = map.begin(); i != map.end(); ++i) while (i.findNext(widget))
+ if (i.value() == widget) cout << "Found widget " << widget
+ cout << "Found widget " << widget << " under key "
+ << " under key " << i.key() << endl;
+ << i.key() << endl;
+//! [6]
+
+
+//! [7]
+// STL-style // Java-style
+QList<int>::iterator i = list.begin(); QMutableListIterator<int> i(list);
+while (i != list.end()) { while (i.hasNext()) {
+ if (*i == 0) { int val = i.next();
+ i = list.erase(i); if (val < 0)
+ } else { i.setValue(-val);
+ if (*i < 0) else if (val == 0)
+ *i = -*i; i.remove();
+ ++i; }
+ }
+}
+//! [7]
+
+
+//! [8]
+QList<double> list;
+...
+for (int i = 0; i < list.size(); ++i) {
+ if (list[i] < 0.0)
+ list[i] = 0.0;
+}
+//! [8]
+
+
+//! [9]
+QMap<QString, int> map;
+...
+map.value("TIMEOUT", 30); // returns 30 if "TIMEOUT" isn't in the map
+//! [9]
+
+
+//! [10]
+QMultiMap<QString, int> map;
+...
+QList<int> values = map.values("TIMEOUT");
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_qtcore.qdoc b/doc/src/snippets/code/doc_src_qtcore.qdoc
new file mode 100644
index 0000000..efa155f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtcore.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+#include <QtCore>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtdbus.qdoc b/doc/src/snippets/code/doc_src_qtdbus.qdoc
new file mode 100644
index 0000000..4c8c4b0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdbus.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <QtDBus>
+//! [0]
+
+
+//! [1]
+QT += dbus
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtdesigner.qdoc b/doc/src/snippets/code/doc_src_qtdesigner.qdoc
new file mode 100644
index 0000000..b19a747
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdesigner.qdoc
@@ -0,0 +1,293 @@
+//! [0]
+#include <QtDesigner>
+//! [0]
+
+
+//! [1]
+CONFIG += designer
+//! [1]
+
+
+//! [2]
+QDesignerMemberSheetExtension *memberSheet = 0;
+QExtensionManager manager = formEditor->extensionManager();
+
+memberSheet = qt_extension<QDesignerMemberSheetExtension*>(manager, widget);
+int index = memberSheet->indexOf(setEchoMode);
+memberSheet->setVisible(index, false);
+
+delete memberSheet;
+//! [2]
+
+
+//! [3]
+class MyMemberSheetExtension : public QObject,
+ public QDesignerMemberSheetExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerMemberSheetExtension)
+
+public:
+ ...
+}
+//! [3]
+
+
+//! [4]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerMemberSheetExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+ (object))
+ return new MyMemberSheetExtension(widget, parent);
+
+ return 0;
+}
+//! [4]
+
+
+//! [5]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerMemberSheetExtension))) {
+ return new MyMemberSheetExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+}
+//! [5]
+
+
+//! [6]
+class MyContainerExtension : public QObject,
+ public QDesignerContainerExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerContainerExtension)
+
+public:
+ MyContainerExtension(MyCustomWidget *widget,
+ QObject *parent = 0);
+ int count() const;
+ QWidget *widget(int index) const;
+ int currentIndex() const;
+ void setCurrentIndex(int index);
+ void addWidget(QWidget *widget);
+ void insertWidget(int index, QWidget *widget);
+ void remove(int index);
+
+private:
+ MyCustomWidget *myWidget;
+};
+//! [6]
+
+
+//! [7]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerContainerExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+ (object))
+ return new MyContainerExtension(widget, parent);
+
+ return 0;
+}
+//! [7]
+
+
+//! [8]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MyContainerExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+}
+//! [8]
+
+
+//! [9]
+class MyTaskMenuExtension : public QObject,
+ public QDesignerTaskMenuExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerTaskMenuExtension)
+
+public:
+ MyTaskMenuExtension(MyCustomWidget *widget, QObject *parent);
+
+ QAction *preferredEditAction() const;
+ QList<QAction *> taskActions() const;
+
+private slots:
+ void mySlot();
+
+private:
+ MyCustomWidget *widget;
+ QAction *myAction;
+};
+//! [9]
+
+
+//! [10]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object))
+ return new MyTaskMenuExtension(widget, parent);
+
+ return 0;
+}
+//! [10]
+
+
+//! [11]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MyContainerExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+}
+//! [11]
+
+
+//! [12]
+#include customwidgetoneinterface.h
+#include customwidgettwointerface.h
+#include customwidgetthreeinterface.h
+
+#include <QtDesigner/QtDesigner>
+#include <QtCore/qplugin.h>
+
+class MyCustomWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
+
+public:
+ MyCustomWidgets(QObject *parent = 0);
+
+ virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
+
+private:
+ QList<QDesignerCustomWidgetInterface*> widgets;
+};
+//! [12]
+
+
+//! [13]
+MyCustomWidgets::MyCustomWidgets(QObject *parent)
+ : QObject(parent)
+{
+ widgets.append(new CustomWidgetOneInterface(this));
+ widgets.append(new CustomWidgetTwoInterface(this));
+ widgets.append(new CustomWidgetThreeInterface(this));
+}
+
+QList<QDesignerCustomWidgetInterface*> MyCustomWidgets::customWidgets() const
+{
+ return widgets;
+}
+
+Q_EXPORT_PLUGIN2(customwidgetsplugin, MyCustomWidgets)
+//! [13]
+
+
+//! [14]
+Q_EXPORT_PLUGIN2(customwidgetplugin, MyCustomWidget)
+//! [14]
+
+
+//! [15]
+QDesignerPropertySheetExtension *propertySheet = 0;
+QExtensionManager manager = formEditor->extensionManager();
+
+propertySheet = qt_extension<QDesignerPropertySheetExtension*>(manager, widget);
+int index = propertySheet->indexOf(QLatin1String("margin"));
+
+propertySheet->setProperty(index, 10);
+propertySheet->setChanged(index, true);
+
+delete propertySheet;
+//! [15]
+
+
+//! [16]
+class MyPropertySheetExtension : public QObject,
+ public QDesignerPropertySheetExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerPropertySheetExtension)
+
+public:
+ ...
+}
+//! [16]
+
+
+//! [17]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerPropertySheetExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+ (object))
+ return new MyPropertySheetExtension(widget, parent);
+
+ return 0;
+}
+//! [17]
+
+
+//! [18]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+{
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerPropertySheetExtension))) {
+ return new MyPropertySheetExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+}
+//! [18]
diff --git a/doc/src/snippets/code/doc_src_qtestevent.qdoc b/doc/src/snippets/code/doc_src_qtestevent.qdoc
new file mode 100644
index 0000000..87591e0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestevent.qdoc
@@ -0,0 +1,11 @@
+//! [0]
+QTestEventList events;
+events.addKeyClick('a');
+events.addKeyClick(Qt::Key_Backspace);
+events.addDelay(200);
+
+QLineEdit *lineEdit = new QLineEdit(myParent);
+...
+events.simulate(lineEdit);
+events.simulate(lineEdit);
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtestlib.qdoc b/doc/src/snippets/code/doc_src_qtestlib.qdoc
new file mode 100644
index 0000000..a4ef52e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestlib.qdoc
@@ -0,0 +1,102 @@
+//! [0]
+class MyFirstTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase()
+ { qDebug("called before everything else"); }
+ void myFirstTest()
+ { QVERIFY(1 == 1); }
+ void mySecondTest()
+ { QVERIFY(1 != 2); }
+ void cleanupTestCase()
+ { qDebug("called after myFirstTest and mySecondTest"); }
+};
+//! [0]
+
+
+//! [1]
+QT += testlib
+//! [1]
+
+
+//! [2]
+testname [options] [testfunctions[:testdata]]...
+//! [2]
+
+
+//! [3]
+/myTestDirectory$ testQString toUpper
+//! [3]
+
+
+//! [4]
+/myTestDirectory$ testQString toUpper toInt:zero
+//! [4]
+
+
+//! [5]
+/myTestDirectory$ testMyWidget -vs -eventdelay 500
+//! [5]
+
+
+//! [6]
+cetest [options] ...
+//! [6]
+
+
+//! [7]
+set INCLUDE=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc;%INCLUDE%
+set LIB=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Lib;%LIB%
+//! [7]
+
+
+//! [8]
+void TestQString::toUpper()
+{
+ QString str = "Hello";
+ QVERIFY(str.toUpper() == "HELLO");
+}
+//! [8]
+
+
+//! [9]
+/myTestDirectory$ qmake -project "QT += testlib"
+/myTestDirectory$ qmake
+/myTestDirectory$ make
+//! [9]
+
+
+//! [10]
+********* Start testing of TestQString *********
+Config: Using QTest library 4.1.0, Qt 4.1.0
+PASS : TestQString::initTestCase()
+PASS : TestQString::toUpper()
+PASS : TestQString::cleanupTestCase()
+Totals: 3 passed, 0 failed, 0 skipped
+********* Finished testing of TestQString *********
+//! [10]
+
+
+//! [11]
+QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
+//! [11]
+
+//! [12]
+class MyFirstBenchmark: public QObject
+{
+ Q_OBJECT
+private slots:
+ void myFirstBenchmark()
+ {
+ QString string1;
+ QString string2;
+ QBENCHMARK {
+ string1.localeAwareCompare(string2);
+ }
+ }
+};
+//! [12] \ No newline at end of file
diff --git a/doc/src/snippets/code/doc_src_qtgui.qdoc b/doc/src/snippets/code/doc_src_qtgui.qdoc
new file mode 100644
index 0000000..ff3afcf
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtgui.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+#include <QtGui>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc
new file mode 100644
index 0000000..11d231f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qthelp.qdoc
@@ -0,0 +1,161 @@
+//! [0]
+#include <QtHelp>
+//! [0]
+
+
+//! [1]
+CONFIG += help
+//! [1]
+
+
+//! [2]
+qhelpgenerator doc.qhp -o doc.qch
+//! [2]
+
+
+//! [3]
+<?xml version="1.0" encoding="utf-8" ?>
+<QHelpCollectionProject version="1.0">
+ <docFiles>
+ <register>
+ <file>doc.qch</file>
+ </register>
+ </docFiles>
+</QHelpCollectionProject>
+//! [3]
+
+
+//! [4]
+qcollectiongenerator mycollection.qhcp -o mycollection.qhc
+//! [4]
+
+
+//! [5]
+...
+<docFiles>
+ <generate>
+ <file>
+ <input>doc.qhp</input>
+ <output>doc.qch</output>
+ </file>
+ </generate>
+ <register>
+ <file>doc.qch</file>
+ </register>
+</docFiles>
+...
+//! [5]
+
+
+//! [6]
+QHelpEngineCore helpEngine("mycollection.qhc");
+...
+
+// get all file references for the identifier
+QMap<QString, QUrl> links =
+ helpEngine.linksForIdentifier(QLatin1String("MyDialog::ChangeButton"));
+
+// If help is available for this keyword, get the help data
+// of the first file reference.
+if (links.count()) {
+ QByteArray helpData = helpEngine->fileData(links.constBegin().value());
+ // show the documentation to the user
+ if (!helpData.isEmpty())
+ displayHelp(helpData);
+}
+//! [6]
+
+
+//! [7]
+<?xml version="1.0" encoding="UTF-8"?>
+<QtHelpProject version="1.0">
+ <namespace>mycompany.com.myapplication.1_0</namespace>
+ <virtualFolder>doc</virtualFolder>
+ <customFilter name="My Application 1.0">
+ <filterAttribute>myapp</filterAttribute>
+ <filterAttribute>1.0</filterAttribute>
+ </customFilter>
+ <filterSection>
+ <filterAttribute>myapp</filterAttribute>
+ <filterAttribute>1.0</filterAttribute>
+ <toc>
+ <section title="My Application Manual" ref="index.html">
+ <section title="Chapter 1" ref="doc.html#chapter1"/>
+ <section title="Chapter 2" ref="doc.html#chapter2"/>
+ <section title="Chapter 3" ref="doc.html#chapter3"/>
+ </section>
+ </toc>
+ <keywords>
+ <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/>
+ <keyword name="bar" ref="doc.html#bar"/>
+ <keyword id="MyApplication::foobar" ref="doc.html#foobar"/>
+ </keywords>
+ <files>
+ <file>classic.css</file>
+ <file>index.html</file>
+ <file>doc.html</file>
+ </files>
+ </filterSection>
+</QtHelpProject>
+//! [7]
+
+
+//! [8]
+...
+<virtualFolder>doc</virtualFolder>
+...
+//! [8]
+
+
+//! [9]
+...
+<customFilter name="My Application 1.0">
+ <filterAttribute>myapp</filterAttribute>
+ <filterAttribute>1.0</filterAttribute>
+</customFilter>
+...
+//! [9]
+
+
+//! [10]
+...
+<filterSection>
+ <filterAttribute>myapp</filterAttribute>
+ <filterAttribute>1.0</filterAttribute>
+...
+//! [10]
+
+
+//! [11]
+...
+<toc>
+ <section title="My Application Manual" ref="index.html">
+ <section title="Chapter 1" ref="doc.html#chapter1"/>
+ <section title="Chapter 2" ref="doc.html#chapter2"/>
+ <section title="Chapter 3" ref="doc.html#chapter3"/>
+ </section>
+</toc>
+...
+//! [11]
+
+
+//! [12]
+...
+<keywords>
+ <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/>
+ <keyword name="bar" ref="doc.html#bar"/>
+ <keyword id="MyApplication::foobar" ref="doc.html#foobar"/>
+</keywords>
+...
+//! [12]
+
+
+//! [13]
+...
+<files>
+ <file>classic.css</file>
+ <file>index.html</file>
+ <file>doc.html</file>
+</files>
+...
+//! [13]
diff --git a/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc b/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc
new file mode 100644
index 0000000..6ad42b9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtmac-as-native.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+qmake -spec macx-xcode project.pro
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.qdoc b/doc/src/snippets/code/doc_src_qtnetwork.qdoc
new file mode 100644
index 0000000..4856686
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtnetwork.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QT += network
+//! [0]
+
+
+//! [1]
+#include <QtNetwork>
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtopengl.qdoc b/doc/src/snippets/code/doc_src_qtopengl.qdoc
new file mode 100644
index 0000000..e13cdf0
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtopengl.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <QtOpenGL>
+//! [0]
+
+
+//! [1]
+QT += opengl
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtscript.qdoc b/doc/src/snippets/code/doc_src_qtscript.qdoc
new file mode 100644
index 0000000..4031fef
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.qdoc
@@ -0,0 +1,948 @@
+//! [0]
+#include <QtScript>
+//! [0]
+
+
+//! [1]
+QT += script
+//! [1]
+
+
+//! [2]
+function myInterestingScriptFunction() { ... }
+...
+myQObject.somethingChanged.connect(myInterestingScriptFunction);
+//! [2]
+
+
+//! [3]
+myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+//! [3]
+
+
+//! [4]
+myQObject.somethingChanged.disconnect(myInterestingFunction);
+myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+//! [4]
+
+
+//! [5]
+var obj = { x: 123 };
+var fun = function() { print(this.x); };
+myQObject.somethingChanged.connect(obj, fun);
+//! [5]
+
+
+//! [6]
+myQObject.somethingChanged.disconnect(obj, fun);
+//! [6]
+
+
+//! [7]
+var obj = { x: 123, fun: function() { print(this.x); } };
+myQObject.somethingChanged.connect(obj, "fun");
+//! [7]
+
+
+//! [8]
+myQObject.somethingChanged.disconnect(obj, "fun");
+//! [8]
+
+
+//! [9]
+try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+} catch (e) {
+ print(e);
+}
+//! [9]
+
+
+//! [10]
+myQObject.somethingChanged("hello");
+//! [10]
+
+
+//! [11]
+myQObject.myOverloadedSlot(10); // will call the int overload
+myQObject.myOverloadedSlot("10"); // will call the QString overload
+//! [11]
+
+
+//! [12]
+myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+//! [12]
+
+
+//! [13]
+Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+//! [13]
+
+
+//! [14]
+myQObject.enabled = true;
+
+...
+
+myQObject.enabled = !myQObject.enabled;
+//! [14]
+
+
+//! [15]
+myDialog.okButton
+//! [15]
+
+
+//! [16]
+myDialog.okButton.objectName = "cancelButton";
+// from now on, myDialog.cancelButton references the button
+//! [16]
+
+
+//! [17]
+var okButton = myDialog.findChild("okButton");
+if (okButton != null) {
+ // do something with the OK button
+}
+
+var buttons = myDialog.findChildren(RegExp("button[0-9]+"));
+for (var i = 0; i < buttons.length; ++i) {
+ // do something with buttons[i]
+}
+//! [17]
+
+
+//! [18]
+QScriptValue myQObjectConstructor(QScriptContext *context, QScriptEngine *engine)
+{
+ // let the engine manage the new object's lifetime.
+ return engine->newQObject(new MyQObject(), QScriptEngine::ScriptOwnership);
+}
+//! [18]
+
+
+//! [19]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [19]
+
+
+//! [20]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+};
+//! [20]
+
+
+//! [21]
+var obj = new MyObject;
+obj.setEnabled( true );
+print( "obj is enabled: " + obj.isEnabled() );
+//! [21]
+
+
+//! [22]
+var obj = new MyObject;
+obj.enabled = true;
+print( "obj is enabled: " + obj.enabled );
+//! [22]
+
+
+//! [23]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [23]
+
+
+//! [24]
+Q_PROPERTY(int nonScriptableProperty READ foo WRITE bar SCRIPTABLE false)
+//! [24]
+
+
+//! [25]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+signals: // the signals
+ void enabledChanged( bool newState );
+
+private:
+ ....
+
+};
+//! [25]
+
+
+//! [26]
+function enabledChangedHandler( b )
+{
+ print( "state changed to: " + b );
+}
+
+function init()
+{
+ var obj = new MyObject();
+ // connect a script function to the signal
+ obj["enabledChanged(bool)"].connect(enabledChangedHandler);
+ obj.enabled = true;
+ print( "obj is enabled: " + obj.enabled );
+}
+//! [26]
+
+
+//! [27]
+var o = new Object();
+o.foo = 123;
+print(o.hasOwnProperty('foo')); // true
+print(o.hasOwnProperty('bar')); // false
+print(o); // calls o.toString(), which returns "[object Object]"
+//! [27]
+
+
+//! [28]
+function Person(name)
+{
+ this.name = name;
+}
+//! [28]
+
+
+//! [29]
+Person.prototype.toString = function() { return "Person(name: " + this.name + ")"; }
+//! [29]
+
+
+//! [30]
+var p1 = new Person("John Doe");
+var p2 = new Person("G.I. Jane");
+print(p1); // "Person(name: John Doe)"
+print(p2); // "Person(name: G.I. Jane)"
+//! [30]
+
+
+//! [31]
+print(p1.hasOwnProperty('name')); // 'name' is an instance variable, so this returns true
+print(p1.hasOwnProperty('toString')); // returns false; inherited from prototype
+print(p1 instanceof Person); // true
+print(p1 instanceof Object); // true
+//! [31]
+
+
+//! [32]
+function Employee(name, salary)
+{
+ Person.call(this, name); // call base constructor
+
+ this.salary = salary;
+}
+
+// set the prototype to be an instance of the base class
+Employee.prototype = new Person();
+
+// initialize prototype
+Employee.prototype.toString = function() { ... }
+//! [32]
+
+
+//! [33]
+var e = new Employee("Johnny Bravo", 5000000);
+print(e instanceof Employee); // true
+print(e instanceof Person); // true
+print(e instanceof Object); // true
+print(e instanceof Array); // false
+//! [33]
+
+
+//! [34]
+QScriptValue Person_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->argument(0).toString();
+ context->thisObject().setProperty("name", name);
+ return engine->undefinedValue();
+}
+//! [34]
+
+
+//! [35]
+QScriptValue Person_prototype_toString(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->thisObject().property("name").toString();
+ QString result = QString::fromLatin1("Person(name: %0)").arg(name);
+ return result;
+}
+//! [35]
+
+
+//! [36]
+QScriptEngine engine;
+QScriptValue ctor = engine.newFunction(Person_ctor);
+ctor.property("prototype").setProperty("toString", engine.newFunction(Person_prototype_toString));
+QScriptValue global = engine.globalObject();
+global.setProperty("Person", ctor);
+//! [36]
+
+
+//! [37]
+QScriptValue Employee_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue super = context->callee().property("prototype").property("constructor");
+ super.call(context->thisObject(), QScriptValueList() << context->argument(0));
+ context->thisObject().setProperty("salary", context->argument(1));
+ return engine->undefinedValue();
+}
+//! [37]
+
+
+//! [38]
+QScriptValue empCtor = engine.newFunction(Employee_ctor);
+empCtor.setProperty("prototype", global.property("Person").construct());
+global.setProperty("Employee", empCtor);
+//! [38]
+
+
+//! [39]
+Q_DECLARE_METATYPE(QPointF)
+Q_DECLARE_METATYPE(QPointF*)
+
+QScriptValue QPointF_prototype_x(QScriptContext *context, QScriptEngine *engine)
+{
+ // Since the point is not to be modified, it's OK to cast to a value here
+ QPointF point = qscriptvalue_cast<QPointF>(context->thisObject());
+ return point.x();
+}
+
+QScriptValue QPointF_prototype_setX(QScriptContext *context, QScriptEngine *engine)
+{
+ // Cast to a pointer to be able to modify the underlying C++ value
+ QPointF *point = qscriptvalue_cast<QPointF*>(context->thisObject());
+ if (!point)
+ return context->throwError(QScriptContext::TypeError, "QPointF.prototype.setX: this object is not a QPointF");
+ point->setX(context->argument(0).toNumber());
+ return engine->undefinedValue();
+}
+//! [39]
+
+
+//! [40]
+var o = new Object();
+(o.__proto__ === Object.prototype); // this evaluates to true
+//! [40]
+
+
+//! [41]
+var o = new Object();
+o.__defineGetter__("x", function() { return 123; });
+var y = o.x; // 123
+//! [41]
+
+
+//! [42]
+var o = new Object();
+o.__defineSetter__("x", function(v) { print("and the value is:", v); });
+o.x = 123; // will print "and the value is: 123"
+//! [42]
+
+
+//! [43]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ ...
+};
+
+Q_DECLARE_METATYPE(MyObject*)
+
+QScriptValue myObjectToScriptValue(QScriptEngine *engine, MyObject* const &in)
+{ return engine->newQObject(in); }
+
+void myObjectFromScriptValue(const QScriptValue &object, MyObject* &out)
+{ out = qobject_cast<MyObject*>(object.toQObject()); }
+
+...
+
+qScriptRegisterMetaType(&engine, myObjectToScriptValue, myObjectFromScriptValue);
+//! [43]
+
+//! [44]
+QScriptValue QPoint_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ int x = context->argument(0).toInt32();
+ int y = context->argument(1).toInt32();
+ return engine->toScriptValue(QPoint(x, y));
+}
+
+...
+
+engine.globalObject().setProperty("QPoint", engine.newFunction(QPoint_ctor));
+//! [44]
+
+//! [45]
+QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
+{
+ QString result;
+ for (int i = 0; i < context->argumentCount(); ++i) {
+ if (i > 0)
+ result.append(" ");
+ result.append(context->argument(i).toString());
+ }
+
+ QScriptValue calleeData = context->callee().data();
+ QPlainTextEdit *edit = qobject_cast<QPlainTextEdit*>(calleeData.toQObject());
+ edit->appendPlainText(result);
+
+ return engine->undefinedValue();
+}
+//! [45]
+
+//! [46]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QScriptEngine eng;
+ QPlainTextEdit edit;
+
+ QScriptValue fun = eng.newFunction(myPrintFunction);
+ fun.setData(eng.newQObject(&edit));
+ eng.globalObject().setProperty("print", fun);
+
+ eng.evaluate("print('hello', 'world')");
+
+ edit.show();
+ return app.exec();
+}
+//! [46]
+
+
+//! [47]
+QScriptEngine eng;
+QLineEdit *edit = new QLineEdit(...);
+QScriptValue handler = eng.evaluate("function(text) { print('text was changed to', text); }");
+qScriptConnect(edit, SIGNAL(textChanged(const QString &)), QScriptValue(), handler);
+//! [47]
+
+//! [48]
+QLineEdit *edit1 = new QLineEdit(...);
+QLineEdit *edit2 = new QLineEdit(...);
+
+QScriptValue handler = eng.evaluate("function() { print('I am', this.name); }");
+QScriptValue obj1 = eng.newObject();
+obj1.setProperty("name", "the walrus");
+QScriptValue obj2 = eng.newObject();
+obj2.setProperty("name", "Sam");
+
+qScriptConnect(edit1, SIGNAL(returnPressed()), obj1, handler);
+qScriptConnect(edit2, SIGNAL(returnPressed()), obj2, handler);
+//! [48]
+
+//! [49]
+var getProperty = function(name) { return this[name]; };
+
+name = "Global Object"; // creates a global variable
+print(getProperty("name")); // "Global Object"
+
+var myObject = { name: 'My Object' };
+print(getProperty.call(myObject, "name")); // "My Object"
+
+myObject.getProperty = getProperty;
+print(myObject.getProperty("name")); // "My Object"
+
+getProperty.name = "The getProperty() function";
+getProperty.getProperty = getProperty;
+getProperty.getProperty("name"); // "The getProperty() function"
+//! [49]
+
+//! [50]
+var o = { a: 1, b: 2, sum: function() { return a + b; } };
+print(o.sum()); // reference error, or sum of global variables a and b!!
+//! [50]
+
+//! [51]
+var o = { a: 1, b: 2, sum: function() { return this.a + this.b; } };
+print(o.sum()); // 3
+//! [51]
+
+//! [52]
+QScriptValue getProperty(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString name = ctx->argument(0).toString();
+ return ctx->thisObject().property(name);
+}
+//! [52]
+
+//! [53]
+QScriptValue myCompare(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double first = ctx->argument(0).toNumber();
+ double second = ctx->argument(1).toNumber();
+ int result;
+ if (first == second)
+ result = 0;
+ else if (first < second)
+ result = -1;
+ else
+ result = 1;
+ return result;
+}
+//! [53]
+
+//! [54]
+QScriptEngine eng;
+QScriptValue comparefn = eng.newFunction(myCompare);
+QScriptValue array = eng.evaluate("new Array(10, 5, 20, 15, 30)");
+array.property("sort").call(array, QScriptValueList() << comparefn);
+
+// prints "5,10,15,20,30"
+qDebug() << array.toString();
+//! [54]
+
+//! [55]
+QScriptValue rectifier(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QRectF magicRect = qscriptvalue_cast<QRectF>(ctx->callee().data());
+ QRectF sourceRect = qscriptvalue_cast<QRectF>(ctx->argument(0));
+ return eng->toScriptValue(sourceRect.intersected(magicRect));
+}
+
+...
+
+QScriptValue fun = eng.newFunction(rectifier);
+QRectF magicRect = QRectF(10, 20, 30, 40);
+fun.setData(eng.toScriptValue(magicRect));
+eng.globalObject().setProperty("rectifier", fun);
+//! [55]
+
+//! [56]
+function add(a, b) {
+ return a + b;
+}
+//! [56]
+
+//! [57]
+function add() {
+ return arguments[0] + arguments[1];
+}
+//! [57]
+
+//! [58]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [58]
+
+//! [59]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return arguments[0] + arguments[1];
+}
+//! [59]
+
+//! [60]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ if (typeof arguments[0] != "number")
+ throw TypeError("add(): first argument is not a number");
+ if (typeof arguments[1] != "number")
+ throw TypeError("add(): second argument is not a number");
+ return arguments[0] + arguments[1];
+}
+//! [60]
+
+//! [61]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return Number(arguments[0]) + Number(arguments[1]);
+}
+//! [61]
+
+//! [62]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [62]
+
+//! [63]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ if (!ctx->argument(0).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): first argument is not a number");
+ if (!ctx->argument(1).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): second argument is not a number");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [63]
+
+//! [64]
+function concat() {
+ var result = "";
+ for (var i = 0; i < arguments.length; ++i)
+ result += String(arguments[i]);
+ return result;
+}
+//! [64]
+
+//! [65]
+QScriptValue concat(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString result = "";
+ for (int i = 0; i < ctx->argumentCount(); ++i)
+ result += ctx->argument(i).toString();
+ return result;
+}
+//! [65]
+
+//! [66]
+function sort(comparefn) {
+ if (comparefn == undefined)
+ comparefn = /* the built-in comparison function */;
+ else if (typeof comparefn != "function")
+ throw TypeError("sort(): argument must be a function");
+ ...
+}
+//! [66]
+
+//! [67]
+QScriptValue sort(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue comparefn = ctx->argument(0);
+ if (comparefn.isUndefined())
+ comparefn = /* the built-in comparison function */;
+ else if (!comparefn.isFunction())
+ return ctx->throwError(QScriptContext::TypeError, "sort(): argument is not a function");
+ ...
+}
+//! [67]
+
+//! [68]
+function foo() {
+ // Let bar() take care of this.
+ print("calling bar() with " + arguments.length + "arguments");
+ var result = return bar.apply(this, arguments);
+ print("bar() returned" + result);
+ return result;
+}
+//! [68]
+
+//! [69]
+QScriptValue foo(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue bar = eng->globalObject().property("bar");
+ QScriptValue arguments = ctx->argumentsObject();
+ qDebug() << "calling bar() with" << arguments.property("length").toInt32() << "arguments";
+ QScriptValue result = bar.apply(ctx->thisObject(), arguments);
+ qDebug() << "bar() returned" << result.toString();
+ return result;
+}
+//! [69]
+
+//! [70]
+function counter() {
+ var count = 0;
+ return function() {
+ return count++;
+ }
+}
+//! [70]
+
+//! [71]
+var c1 = counter(); // create a new counter function
+var c2 = counter(); // create a new counter function
+print(c1()); // 0
+print(c1()); // 1
+print(c2()); // 0
+print(c2()); // 1
+//! [71]
+
+//! [72]
+QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ QScriptValue result = eng->newFunction(counter_inner);
+ result.setScope(act);
+ return result;
+}
+//! [72]
+
+//! [73]
+QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue outerAct = ctx->callee().scope();
+ double count = outerAct.property("count").toNumber();
+ outerAct.setProperty("count", count+1);
+ return count;
+}
+//! [73]
+
+//! [74]
+QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ return eng->evaluate("function() { return count++; }");
+}
+//! [74]
+
+//! [75]
+function Book(isbn) {
+ this.isbn = isbn;
+}
+
+var coolBook1 = new Book("978-0131872493");
+var coolBook2 = new Book("978-1593271473");
+//! [75]
+
+//! [76]
+QScriptValue Person_ctor(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue object;
+ if (ctx->isCalledAsConstructor()) {
+ object = ctx->thisObject();
+ } else {
+ object = eng->newObject();
+ object.setPrototype(ctx->callee().property("prototype"));
+ }
+ object.setProperty("name", ctx->argument(0));
+ return object;
+}
+//! [76]
+
+//! [77]
+QScriptContext *ctx = eng.pushContext();
+QScriptValue act = ctx->activationObject();
+act.setProperty("digit", 7);
+
+qDebug() << eng.evaluate("digit + 1").toNumber(); // 8
+
+eng.popContext();
+//! [77]
+
+//! [78]
+QScriptValue getSet(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue obj = ctx->thisObject();
+ QScriptValue data = obj.data();
+ if (!data.isValid()) {
+ data = eng->newObject();
+ obj.setData(data);
+ }
+ QScriptValue result;
+ if (ctx->argumentCount() == 1) {
+ QString str = ctx->argument(0).toString();
+ str.replace("Roberta", "Ken");
+ result = str;
+ data.setProperty("x", result);
+ } else {
+ result = data.property("x");
+ }
+ return result;
+}
+//! [78]
+
+//! [79]
+QScriptEngine eng;
+QScriptValue obj = eng.newObject();
+obj.setProperty("x", eng.newFunction(getSet),
+ QScriptValue::PropertyGetter|QScriptValue::PropertySetter);
+//! [79]
+
+//! [80]
+obj.x = "Roberta sent me";
+print(obj.x); // "Ken sent me"
+obj.x = "I sent the bill to Roberta";
+print(obj.x); // "I sent the bill to Ken"
+//! [80]
+
+//! [81]
+obj = {};
+obj.__defineGetter__("x", function() { return this._x; });
+obj.__defineSetter__("x", function(v) { print("setting x to", v); this._x = v; });
+obj.x = 123;
+//! [81]
+
+//! [82]
+myButton.text = qsTr("Hello world!");
+//! [82]
+
+//! [83]
+myButton.text = qsTranslate("MyAwesomeScript", "Hello world!");
+//! [83]
+
+//! [84]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ ];
+ }
+ return qsTr(FriendlyConversation.greeting_strings[type]);
+}
+//! [84]
+
+//! [85]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+ ];
+ }
+ return qsTranslate("FriendlyConversation", FriendlyConversation.greeting_strings[type]);
+}
+//! [85]
+
+//! [86]
+FileCopier.prototype.showProgress = function(done, total, currentFileName)
+{
+ this.label.text = qsTr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFileName));
+}
+//! [86]
+
+//! [87]
+lupdate myscript.qs -ts myscript_la.ts
+//! [87]
+
+//! [88]
+lupdate -extensions qs scripts/ -ts scripts_la.ts
+//! [88]
+
+//! [89]
+lrelease myscript_la.ts
+//! [89]
+
+//! [90]
+({ unitName: "Celsius",
+ toKelvin: function(x) { return x + 273; }
+ })
+//! [90]
+
+//! [91]
+QScriptValue object = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })");
+QScriptValue toKelvin = object.property("toKelvin");
+QScriptValue result = toKelvin.call(object, QScriptValueList() << 100);
+qDebug() << result.toNumber(); // 373
+//! [91]
+
+//! [92]
+QScriptValue add = engine.globalObject().property("add");
+qDebug() << add.call(QScriptValue(), QScriptValueList() << 1 << 2).toNumber(); // 3
+//! [92]
+
+//! [93]
+typedef QSharedPointer<QXmlStreamReader> XmlStreamReaderPointer;
+
+Q_DECLARE_METATYPE(XmlStreamReaderPointer)
+
+QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *engine)
+{
+ if (!context->isCalledAsConstructor())
+ return context->throwError(QScriptContext::SyntaxError, "please use the 'new' operator");
+
+ QIODevice *device = qobject_cast<QIODevice*>(context->argument(0).toQObject());
+ if (!device)
+ return context->throwError(QScriptContext::TypeError, "please supply a QIODevice as first argument");
+
+ // Create the C++ object
+ QXmlStreamReader *reader = new QXmlStreamReader(device);
+
+ XmlStreamReaderPointer pointer(reader);
+
+ // store the shared pointer in the script object that we are constructing
+ return engine->newVariant(context->thisObject(), qVariantFromValue(pointer));
+}
+//! [93]
+
+//! [94]
+QScriptValue xmlStreamReader_atEnd(QScriptContext *context, QScriptEngine *)
+{
+ XmlStreamReaderPointer reader = qscriptvalue_cast<XmlStreamReaderPointer>(context->thisObject());
+ if (!reader)
+ return context->throwError(QScriptContext::TypeError, "this object is not an XmlStreamReader");
+ return reader->atEnd();
+}
+//! [94]
+
+//! [95]
+ QScriptEngine engine;
+ QScriptValue xmlStreamReaderProto = engine.newObject();
+ xmlStreamReaderProto.setProperty("atEnd", engine.newFunction(xmlStreamReader_atEnd));
+
+ QScriptValue xmlStreamReaderCtor = engine.newFunction(constructXmlStreamReader, xmlStreamReaderProto);
+ engine.globalObject().setProperty("XmlStreamReader", xmlStreamReaderCtor);
+//! [95]
diff --git a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc b/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc
new file mode 100644
index 0000000..24fb254
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc
@@ -0,0 +1,7 @@
+//! [0]
+print("importing " + __extension__);
+__setupPackage__("cool.stuff");
+
+cool.stuff.add = function(a, b) { return a + b; }
+cool.stuff.subtract = function(a, b) { return a - b; }
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtsql.qdoc b/doc/src/snippets/code/doc_src_qtsql.qdoc
new file mode 100644
index 0000000..1a687db
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsql.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <QtSql>
+//! [0]
+
+
+//! [1]
+QT += sql
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsvg.qdoc b/doc/src/snippets/code/doc_src_qtsvg.qdoc
new file mode 100644
index 0000000..c99ea41
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsvg.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <QtSvg>
+//! [0]
+
+
+//! [1]
+QT += svg
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qttest.qdoc b/doc/src/snippets/code/doc_src_qttest.qdoc
new file mode 100644
index 0000000..c2aa27b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qttest.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+#include <QtTest>
+//! [0]
+
+
+//! [1]
+CONFIG += qtestlib
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtuiloader.qdoc b/doc/src/snippets/code/doc_src_qtuiloader.qdoc
new file mode 100644
index 0000000..64f3eac
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtuiloader.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+CONFIG += uitools
+//! [0]
+
+
+//! [1]
+#include <QtUiTools>
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtwebkit.qdoc b/doc/src/snippets/code/doc_src_qtwebkit.qdoc
new file mode 100644
index 0000000..d4fc2bd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtwebkit.qdoc
@@ -0,0 +1,8 @@
+//! [0]
+QT += webkit
+//! [0]
+
+
+//! [1]
+#include <QtWebKit>
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtxml.qdoc b/doc/src/snippets/code/doc_src_qtxml.qdoc
new file mode 100644
index 0000000..f5dc5a5
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxml.qdoc
@@ -0,0 +1,77 @@
+//! [0]
+#include <QtXml>
+//! [0]
+
+
+//! [1]
+QT += xml
+//! [1]
+
+
+//! [2]
+QT += xml
+//! [2]
+
+
+//! [3]
+<quote>A quotation.</quote>
+//! [3]
+
+
+//! [4]
+<document xmlns:book = 'http://qtsoftware.com/fnord/book/'
+ xmlns = 'http://qtsoftware.com/fnord/' >
+//! [4]
+
+
+//! [5]
+<author xmlns:fnord = 'http://qtsoftware.com/fnord/'
+ title="Ms"
+ fnord:title="Goddess"
+ name="Eris Kallisti"/>
+//! [5]
+
+
+//! [6]
+<document>
+<book>
+ <title>Practical XML</title>
+ <author title="Ms" name="Eris Kallisti"/>
+ <chapter>
+ <title>A Namespace Called fnord</title>
+ </chapter>
+</book>
+</document>
+//! [6]
+
+
+//! [7]
+<book:title>Practical XML</book:title>
+//! [7]
+
+
+//! [8]
+xmlns="http://qtsoftware.com/fnord/"
+//! [8]
+
+
+//! [9]
+xmlns:book="http://qtsoftware.com/fnord/book/"
+//! [9]
+
+
+//! [10]
+<document xmlns:book = 'http://qtsoftware.com/fnord/book/'
+ xmlns = 'http://qtsoftware.com/fnord/' >
+<book>
+ <book:title>Practical XML</book:title>
+ <book:author xmlns:fnord = 'http://qtsoftware.com/fnord/'
+ title="Ms"
+ fnord:title="Goddess"
+ name="Eris Kallisti"/>
+ <chapter>
+ <title>A Namespace Called fnord</title>
+ </chapter>
+</book>
+</document>
+//! [10]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
new file mode 100644
index 0000000..638bf93
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
@@ -0,0 +1,349 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+#include <QtXmlPatterns>
+//! [0]
+
+
+//! [1]
+QT += xmlpatterns
+//! [1]
+
+//! [2]
+xmlpatterns myQuery.xq
+//! [2]
+
+//! [3]
+declare namespace c = "http://cookbook/namespace";
+doc('cookbook.xml')//c:recipe/c:title
+//! [3]
+
+//! [4]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')//recipe/title
+//! [4]
+
+//! [5]
+<title xmlns="http://cookbook/namespace">Quick and Easy Mushroom Soup</title>
+<title xmlns="http://cookbook/namespace">Cheese on Toast</title>
+<title xmlns="http://cookbook/namespace">Hard-Boiled Eggs</title>
+//! [5]
+
+//! [6]
+xmlpatterns file.xq
+//! [6]
+
+//! [7]
+doc('cookbook.xml')//@xml:*
+//! [7]
+
+//! [8]
+doc('cookbook.xml')//@*:name
+//! [8]
+
+//! [9]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/@*
+//! [9]
+
+//! [10]
+declare default element namespace "http://cookbook/namespace";
+doc("cookbook.xml")/cookbook/recipe[title = "Hard-Boiled Eggs"]
+//! [10]
+
+//! [11]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')//method[string-length(.) = 0]
+//! [11]
+
+//! [12]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')//method[string-length() = 0]
+//! [12]
+
+//! [13]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[2]
+//! [13]
+
+//! [14]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[position() = 2]
+//! [14]
+
+//! [15]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[position() > 1]
+//! [15]
+
+//! [16]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[last()]
+//! [16]
+
+//! [17]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[last() - 1]
+//! [17]
+
+//! [18]
+doc('cookbook.xml')//recipe
+//! [18]
+
+//! [19]
+doc('cookbook.xml')//recipe/title
+//! [19]
+
+//! [20]
+<recipe/>
+//! [20]
+
+//! [21]
+ <html xmlns="http://www.w3.org/1999/xhtml/"
+ xml:id="{doc("other.html")/html/@xml:id}"/>
+//! [21]
+
+//! [22]
+doc('cookbook.xml')/descendant-or-self::element(recipe)/child::element(title)
+//! [22]
+
+//! [23]
+<cookbook>
+//! [23]
+
+//! [24]
+<cookbook xmlns="http://cookbook/namespace">
+//! [24]
+
+//! [25]
+for $i in doc("cookbook.xml")//@xml:*
+return <p>{$i}</p>
+//! [25]
+
+//! [26]
+for $i in doc("cookbook.xml")//@*:name
+return <p>{$i}</p>
+//! [26]
+
+//! [27]
+declare default element namespace "http://cookbook/namespace";
+for $i in doc("cookbook.xml")/cookbook/@*
+return <p>{$i}</p>
+//! [27]
+
+//! [28]
+<p xml:id="MushroomSoup"/>
+<p xml:id="CheeseOnToast"/>
+<p xml:id="HardBoiledEggs"/>
+//! [28]
+
+//! [29]
+<p name="Fresh mushrooms"/>
+<p name="Garlic"/>
+<p name="Olive oil"/>
+<p name="Milk"/>
+<p name="Water"/>
+<p name="Cream"/>
+<p name="Vegetable soup cube"/>
+<p name="Ground black pepper"/>
+<p name="Dried parsley"/>
+<p name="Bread"/>
+<p name="Cheese"/>
+<p name="Eggs"/>
+//! [29]
+
+//! [30]
+<p xmlns="http://cookbook/namespace" count="3"/>
+//! [30]
+
+//! [31]
+<method xmlns="http://cookbook/namespace"/>
+//! [31]
+
+//! [32]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')//recipe[string-length(method) = 0]
+//! [32]
+
+//! [33]
+<recipe xmlns="http://cookbook/namespace" xml:id="HardBoiledEggs">
+ <title>Hard-Boiled Eggs</title>
+ <ingredient name="Eggs" quantity="3" unit="eggs"/>
+ <time quantity="3" unit="minutes"/>
+ <method/>
+</recipe>
+//! [33]
+
+//! [34]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[method[empty(step)]]
+//! [34]
+
+//! [35]
+declare default element namespace "http://cookbook/namespace";
+doc('cookbook.xml')/cookbook/recipe[not(normalize-space(method))]
+//! [35]
+
+//! [36]
+<e>{sum((1, 2, 3))}</e>
+//! [36]
+
+//! [37]
+<e>6</e>
+//! [37]
+
+//![38]
+declare variable $insertion := "example";
+<p class="important {$insertion} obsolete"/>
+//![38]
+
+//! [39]
+<p class="important example obsolete"/>
+//! [39]
+
+//! [40]
+declare default element namespace "http://cookbook/namespace";
+let $docURI := 'cookbook.xml'
+return if(doc-available($docURI))
+ then doc($docURI)//recipe/<resept>{./node()}</resept>
+ else <resept>Failed to load {$docURI}</resept>
+//! [40]
+
+//! [41]
+<span>1</span>
+<span>3</span>
+<span>5</span>
+<span>7</span>
+<span>9</span>
+<span>b</span>
+<span>d</span>
+<span>f</span>
+//! [41]
+
+//! [42]
+<span>1</span>
+//! [42]
+
+//! [43]
+let $doc := doc('doc.txt')
+return $doc/doc/p[1]/span[1]
+//! [43]
+
+//! [44]
+for $a in doc('doc.txt')/doc/p/span[1]
+return $a
+//! [44]
+
+//! [45]
+doc('doc.txt')/doc/p/span[1]
+//! [45]
+
+//! [46]
+doc('doc.txt')//p/<p>{span/node()}</p>
+//! [46]
+
+//! [47]
+<p>78</p>
+<p>9a</p>
+<p>12</p>
+<p>bc</p>
+<p>de</p>
+<p>34</p>
+<p>56</p>
+<p>f0</p>
+//! [47]
+
+//! [48]
+for $a in doc('doc.txt')//p
+ return <p>{$a/span/node()}</p>
+//! [48]
+
+//! [49]
+<p>12</p>
+<p>34</p>
+<p>56</p>
+<p>78</p>
+<p>9a</p>
+<p>bc</p>
+<p>de</p>
+<p>f0</p>
+//! [49]
+
+//! [100]
+<?xml version="1.0" encoding="UTF-8"?>
+<cookbook>
+ <recipe xml:id="MushroomSoup">
+ <title>Quick and Easy Mushroom Soup</title>
+ <ingredient name="Fresh mushrooms"
+ quantity="7"
+ unit="pieces"/>
+ <ingredient name="Garlic"
+ quantity="1"
+ unit="cloves"/>
+ <ingredient name="Olive oil"
+ quantity="2"
+ unit="tablespoons"/>
+ <ingredient name="Milk"
+ quantity="200"
+ unit="milliliters"/>
+ <ingredient name="Water"
+ quantity="200"
+ unit="milliliters"/>
+ <ingredient name="Cream"
+ quantity="100"
+ unit="milliliters"/>
+ <ingredient name="Vegetable soup cube"
+ quantity="1/2"
+ unit="cubes"/>
+ <ingredient name="Ground black pepper"
+ quantity="1/2"
+ unit="teaspoons"/>
+ <ingredient name="Dried parsley"
+ quantity="1"
+ unit="teaspoons"/>
+ <time quantity="20"
+ unit="minutes"/>
+ <method>
+ <step>1. Slice mushrooms and garlic.</step>
+ <step>2. Fry mushroom slices and garlic with olive oil.</step>
+ <step>3. Once mushrooms are cooked, add milk, cream water. Stir.</step>
+ <step>4. Add vegetable soup cube.</step>
+ <step>5. Reduce heat, add pepper and parsley.</step>
+ <step>6. Turn off the stove before the mixture boils.</step>
+ <step>7. Blend the mixture.</step>
+ </method>
+ </recipe>
+ <recipe xml:id="CheeseOnToast">
+ <title>Cheese on Toast</title>
+ <ingredient name="Bread"
+ quantity="2"
+ unit="slices"/>
+ <ingredient name="Cheese"
+ quantity="2"
+ unit="slices"/>
+ <time quantity="3"
+ unit="minutes"/>
+ <method>
+ <step>1. Slice the bread and cheese.</step>
+ <step>2. Grill one side of each slice of bread.</step>
+ <step>3. Turn over the bread and place a slice of cheese on each piece.</step>
+ <step>4. Grill until the cheese has started to melt.</step>
+ <step>5. Serve and enjoy!</step>
+ </method>
+ </recipe>
+ <recipe xml:id="HardBoiledEggs">
+ <title>Hard-Boiled Eggs</title>
+ <ingredient name="Eggs"
+ quantity="3"
+ unit="eggs"/>
+ <time quantity="3"
+ unit="minutes"/>
+ <method/>
+ </recipe>
+</cookbook>
+//! [100]
+
+}
+
diff --git a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc b/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc
new file mode 100644
index 0000000..95db9d3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc
@@ -0,0 +1,38 @@
+//! [0]
+int myfunc(int n)
+{
+ int table[n + 1]; // WRONG
+ ...
+ return table[n];
+}
+//! [0]
+
+
+//! [1]
+int myfunc(int n)
+{
+ int *table = new int[n + 1];
+ ...
+ int ret = table[n];
+ delete[] table;
+ return ret;
+}
+//! [1]
+
+
+//! [2]
+int myfunc(int n)
+{
+ QVarLengthArray<int, 1024> array(n + 1);
+ ...
+ return array[n];
+}
+//! [2]
+
+
+//! [3]
+QVarLengthArray<int> array(10);
+int *data = array.data();
+for (int i = 0; i < 10; ++i)
+ data[i] = 2 * i;
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_rcc.qdoc b/doc/src/snippets/code/doc_src_rcc.qdoc
new file mode 100644
index 0000000..423f8e6
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_rcc.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+rcc [options] <inputs>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/doc/src/snippets/code/doc_src_resources.qdoc
new file mode 100644
index 0000000..bc85341
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_resources.qdoc
@@ -0,0 +1,41 @@
+//! [0]
+<file alias="cut-img.png">images/cut.png</file>
+//! [0]
+
+
+//! [1]
+<qresource prefix="/myresources">
+ <file alias="cut-img.png">images/cut.png</file>
+</qresource>
+//! [1]
+
+
+//! [2]
+<qresource>
+ <file>cut.jpg</file>
+</qresource>
+<qresource lang="fr">
+ <file alias="cut.jpg">cut_fr.jpg</file>
+</qresource>
+//! [2]
+
+
+//! [3]
+rcc -binary myresource.qrc -o myresource.rcc
+//! [3]
+
+
+//! [4]
+QResource::registerResource("/path/to/myresource.rcc");
+//! [4]
+
+
+//! [5]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(graphlib);
+ ...
+ return app.exec();
+}
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_richtext.qdoc b/doc/src/snippets/code/doc_src_richtext.qdoc
new file mode 100644
index 0000000..d6f54c2
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_richtext.qdoc
@@ -0,0 +1,50 @@
+//! [0]
+QTextDocument *newDocument = new QTextDocument;
+//! [0]
+
+
+//! [1]
+QTextEdit *editor = new QTextEdit;
+QTextDocument *editorDocument = editor->document();
+//! [1]
+
+
+//! [2]
+QTextEdit *editor = new QTextEdit(parent);
+editor->setHtml(aStringContainingHTMLtext);
+editor->show();
+//! [2]
+
+
+//! [3]
+QTextDocument *document = editor->document();
+//! [3]
+
+
+//! [4]
+QTextCursor cursor = editor->textCursor();
+//! [4]
+
+
+//! [5]
+editor->setTextCursor(cursor);
+//! [5]
+
+
+//! [6]
+textEdit.show();
+
+textCursor.beginEditBlock();
+
+for (int i = 0; i < 1000; ++i) {
+ textCursor.insertBlock();
+ textCursor.insertText(paragraphText.at(i));
+}
+
+textCursor.endEditBlock();
+//! [6]
+
+
+//! [7]
+<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
+//! [7]
diff --git a/doc/src/snippets/code/doc_src_session.qdoc b/doc/src/snippets/code/doc_src_session.qdoc
new file mode 100644
index 0000000..6a32863
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_session.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+xterm
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc
new file mode 100644
index 0000000..74cd8dc
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc
@@ -0,0 +1,239 @@
+//! [0]
+-no-sql-<driver> ... Disable SQL <driver> entirely.
+-qt-sql-<driver> ... Enable a SQL <driver> in the Qt Library, by default
+ none are turned on.
+-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
+ at run time.
+
+ Possible values for <driver>:
+ [ db2 ibase mysql oci odbc psql sqlite sqlite2 tds ]
+//! [0]
+
+
+//! [1]
+create procedure qtestproc (OUT param1 INT, OUT param2 INT)
+BEGIN
+ set param1 = 42;
+ set param2 = 43;
+END
+//! [1]
+
+
+//! [2]
+QSqlQuery q;
+q.exec("call qtestproc (@outval1, @outval2)");
+q.exec("select @outval1, @outval2");
+q.next();
+qDebug() << q.value(0) << q.value(1); // outputs "42" and "43"
+//! [2]
+
+
+//! [3]
+cd $QTDIR/src/plugins/sqldrivers/mysql
+qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
+make
+//! [3]
+
+
+//! [4]
+cd $QTDIR/src/plugins/sqldrivers/mysql
+make install
+//! [4]
+
+
+//! [5]
+cd %QTDIR%\src\plugins\sqldrivers\mysql
+qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
+nmake
+//! [5]
+
+
+//! [6]
+cd $QTDIR/src/plugins/sqldrivers/oci
+qmake "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh -lwtc9" oci.pro
+make
+//! [6]
+
+
+//! [7]
+cd $QTDIR/src/plugins/sqldrivers/oci
+qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client/" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib" oci.pro
+make
+//! [7]
+
+
+//! [8]
+set INCLUDE=%INCLUDE%;c:\oracle\oci\include
+set LIB=%LIB%;c:\oracle\oci\lib\msvc
+cd %QTDIR%\src\plugins\sqldrivers\oci
+qmake oci.pro
+nmake
+//! [8]
+
+
+//! [9]
+set PATH=%PATH%;c:\oracle\bin
+//! [9]
+
+
+//! [10]
+\\ STORED_PROC uses the return statement or returns multiple result sets
+QSqlQuery query;
+query.setForwardOnly(true);
+query.exec("{call STORED_PROC}");
+//! [10]
+
+
+//! [11]
+cd $QTDIR/src/plugins/sqldrivers/odbc
+qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
+make
+//! [11]
+
+
+//! [12]
+cd %QTDIR%\src\plugins\sqldrivers\odbc
+qmake odbc.pro
+nmake
+//! [12]
+
+
+//! [13]
+cd $QTDIR/src/plugins/sqldrivers/psql
+qmake "INCLUDEPATH+=/usr/include/pgsql" "LIBS+=-L/usr/lib -lpq" psql.pro
+make
+//! [13]
+
+
+//! [14]
+cd $QTDIR/src/plugins/sqldrivers/psql
+make install
+//! [14]
+
+
+//! [15]
+cd %QTDIR%\src\plugins\sqldrivers\psql
+qmake "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
+nmake
+//! [15]
+
+
+//! [16]
+cd $QTDIR/src/plugins/sqldrivers/tds
+qmake "INCLUDEPATH=$SYBASE/include" "LIBS=-L$SYBASE/lib -lsybdb"
+make
+//! [16]
+
+
+//! [17]
+cd %QTDIR%\src\plugins\sqldrivers\tds
+qmake "LIBS+=NTWDBLIB.LIB" tds.pro
+nmake
+//! [17]
+
+
+//! [18]
+cd $QTDIR/src/plugins/sqldrivers/db2
+qmake "INCLUDEPATH+=$DB2DIR/include" "LIBS+=-L$DB2DIR/lib -ldb2"
+make
+//! [18]
+
+
+//! [19]
+cd $QTDIR/src/plugins/sqldrivers/db2
+make install
+//! [19]
+
+
+//! [20]
+cd %QTDIR%\src\plugins\sqldrivers\db2
+qmake "INCLUDEPATH+=<DB2 home>/sqllib/include" "LIBS+=<DB2 home>/sqllib/lib/db2cli.lib"
+nmake
+//! [20]
+
+
+//! [21]
+cd $QTDIR/src/plugins/sqldrivers/sqlite
+qmake "INCLUDEPATH+=$SQLITE/include" "LIBS+=-L$SQLITE/lib -lsqlite"
+make
+//! [21]
+
+
+//! [22]
+cd $QTDIR/src/plugins/sqldrivers/sqlite
+make install
+//! [22]
+
+
+//! [23]
+cd %QTDIR%\src\plugins\sqldrivers\sqlite
+qmake "INCLUDEPATH+=C:\SQLITE\INCLUDE" "LIBS+=C:\SQLITE\LIB\SQLITE3.LIB" sqlite.pro
+nmake
+//! [23]
+
+
+//! [24]
+db.setHostName("MyServer");
+db.setDatabaseName("C:\\test.gdb");
+//! [24]
+
+
+//! [25]
+// connect to database using the Latin-1 character set
+db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1");
+db.open();
+//! [25]
+
+
+//! [26]
+QSqlQuery q;
+q.exec("execute procedure my_procedure");
+q.next();
+qDebug() << q.value(0); // outputs the first RETURN/OUT value
+//! [26]
+
+
+//! [27]
+cd $QTDIR/src/plugins/sqldrivers/ibase
+qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro
+make
+//! [27]
+
+
+//! [28]
+cd $QTDIR/src/plugins/sqldrivers/ibase
+qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib -lfbclient" ibase.pro
+make
+//! [28]
+
+
+//! [29]
+cd %QTDIR%\src\plugins\sqldrivers\ibase
+qmake "INCLUDEPATH+=C:\interbase\include" ibase.pro
+nmake
+//! [29]
+
+
+//! [30]
+cd %QTDIR%\src\plugins\sqldrivers\ibase
+qmake "INCLUDEPATH+=C:\interbase\include" "LIBS+=-lfbclient" ibase.pro
+nmake
+//! [30]
+
+
+//! [31]
+QSqlDatabase: QMYSQL driver not loaded
+QSqlDatabase: available drivers: QMYSQL
+//! [31]
+
+//! [32]
+configure -I /usr/include/oracle/10.1.0.3/client -L /usr/lib/oracle/10.1.0.3/client/lib -R /usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10
+make
+//! [32]
+
+//! [33]
+cd $QTDIR/src/plugins/sqldrivers/oci
+qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib -Wl,-rpath,/usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10" oci.pro
+make
+//! [33]
+
diff --git a/doc/src/snippets/code/doc_src_styles.qdoc b/doc/src/snippets/code/doc_src_styles.qdoc
new file mode 100644
index 0000000..e11dc05
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_styles.qdoc
@@ -0,0 +1,94 @@
+//! [0]
+ opt.init(q);
+ if (down)
+ opt.state |= QStyle::State_Sunken;
+ if (tristate && noChange)
+ opt.state |= QStyle::State_NoChange;
+ else
+ opt.state |= checked ? QStyle::State_On :
+ QStyle::State_Off;
+ if (q->testAttribute(Qt::WA_Hover) && q->underMouse()) {
+ if (hovering)
+ opt.state |= QStyle::State_MouseOver;
+ else
+ opt.state &= ~QStyle::State_MouseOver;
+ }
+ opt.text = text;
+ opt.icon = icon;
+ opt.iconSize = q->iconSize();
+//! [0]
+
+
+//! [1]
+ state = QStyle::State_None;
+ if (widget->isEnabled())
+ state |= QStyle::State_Enabled;
+ if (widget->hasFocus())
+ state |= QStyle::State_HasFocus;
+ if (widget->window()->testAttribute(Qt::WA_KeyboardFocusChange))
+ state |= QStyle::State_KeyboardFocusChange;
+ if (widget->underMouse())
+ state |= QStyle::State_MouseOver;
+ if (widget->window()->isActiveWindow())
+ state |= QStyle::State_Active;
+#ifdef Q_WS_MAC
+ extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
+ if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
+ state &= ~QStyle::State_Enabled;
+#endif
+#ifdef QT_KEYPAD_NAVIGATION
+ if (widget->hasEditFocus())
+ state |= QStyle::State_HasEditFocus;
+#endif
+
+ direction = widget->layoutDirection();
+ rect = widget->rect();
+ palette = widget->palette();
+ fontMetrics = widget->fontMetrics();
+//! [1]
+
+
+//! [2]
+ QStylePainter p(this);
+ QStyleOptionButton opt = d->getStyleOption();
+ p.drawControl(QStyle::CE_CheckBox, opt);
+//! [2]
+
+
+//! [3]
+ QStyleOptionButton subopt = *btn;
+ subopt.rect = subElementRect(SE_CheckBoxIndicator, btn, widget);
+ drawPrimitive(PE_IndicatorCheckBox, &subopt, p, widget);
+ subopt.rect = subElementRect(SE_CheckBoxContents, btn, widget);
+ drawControl(CE_CheckBoxLabel, &subopt, p, widget);
+
+ if (btn->state & State_HasFocus) {
+ QStyleOptionFocusRect fropt;
+ fropt.QStyleOption::operator=(*btn);
+ fropt.rect = subElementRect(SE_CheckBoxFocusRect, btn, widget);
+ drawPrimitive(PE_FrameFocusRect, &fropt, p, widget);
+ }
+//! [3]
+
+
+//! [4]
+ const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt);
+ uint alignment = visualAlignment(btn->direction, Qt::AlignLeft | Qt::AlignVCenter);
+
+ if (!styleHint(SH_UnderlineShortcut, btn, widget))
+ alignment |= Qt::TextHideMnemonic;
+ QPixmap pix;
+ QRect textRect = btn->rect;
+ if (!btn->icon.isNull()) {
+ pix = btn->icon.pixmap(btn->iconSize, btn->state & State_Enabled ? QIcon::Normal : QIcon::Disabled);
+ drawItemPixmap(p, btn->rect, alignment, pix);
+ if (btn->direction == Qt::RightToLeft)
+ textRect.setRight(textRect.right() - btn->iconSize.width() - 4);
+ else
+ textRect.setLeft(textRect.left() + btn->iconSize.width() + 4);
+ }
+ if (!btn->text.isEmpty()){
+ drawItemText(p, textRect, alignment | Qt::TextShowMnemonic,
+ btn->palette, btn->state & State_Enabled, btn->text, QPalette::WindowText);
+ }
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
new file mode 100644
index 0000000..60622d3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
@@ -0,0 +1,1911 @@
+//! [0]
+QLineEdit { background: yellow }
+QCheckBox { color: red }
+//! [0]
+
+
+//! [1]
+QPushButton { color: red }
+//! [1]
+
+
+//! [2]
+QPushButton, QLineEdit, QComboBox { color: red }
+//! [2]
+
+
+//! [3]
+QPushButton { color: red }
+QLineEdit { color: red }
+QComboBox { color: red }
+//! [3]
+
+
+//! [4]
+QPushButton { color: red; background-color: white }
+//! [4]
+
+
+//! [5]
+QComboBox::drop-down { image: url(dropdown.png) }
+//! [5]
+
+
+//! [6]
+QComboBox {
+ margin-right: 20px;
+}
+QComboBox::drop-down {
+ subcontrol-origin: margin;
+}
+//! [6]
+
+
+//! [7]
+QComboBox::down-arrow {
+ image: url(down_arrow.png);
+}
+QComboBox::down-arrow:pressed {
+ position: relative;
+ top: 1px; left: 1px;
+}
+//! [7]
+
+
+//! [8]
+QPushButton:hover { color: white }
+//! [8]
+
+
+//! [9]
+QRadioButton:!hover { color: red }
+//! [9]
+
+
+//! [10]
+QCheckBox:hover:checked { color: white }
+//! [10]
+
+
+//! [11]
+QPushButton:hover:!pressed { color: blue; }
+//! [11]
+
+
+//! [12]
+QCheckBox:hover, QCheckBox:checked { color: white }
+//! [12]
+
+
+//! [13]
+QComboBox::drop-down:hover { image: url(dropdown_bright.png) }
+//! [13]
+
+
+//! [14]
+QPushButton#okButton { color: gray }
+QPushButton { color: red }
+//! [14]
+
+
+//! [15]
+QPushButton:hover { color: white }
+QPushButton { color: red }
+//! [15]
+
+
+//! [16]
+QPushButton:hover { color: white }
+QPushButton:enabled { color: red }
+//! [16]
+
+
+//! [17]
+QPushButton:enabled { color: red }
+QPushButton:hover { color: white }
+//! [17]
+
+
+//! [18]
+QPushButton:hover:enabled { color: white }
+QPushButton:enabled { color: red }
+//! [18]
+
+
+//! [19]
+QPushButton { color: red }
+QAbstractButton { color: gray }
+//! [19]
+
+
+//! [20]
+* {} /* a=0 b=0 c=0 -> specificity = 0 */
+LI {} /* a=0 b=0 c=1 -> specificity = 1 */
+UL LI {} /* a=0 b=0 c=2 -> specificity = 2 */
+UL OL+LI {} /* a=0 b=0 c=3 -> specificity = 3 */
+H1 + *[REL=up]{} /* a=0 b=1 c=1 -> specificity = 11 */
+UL OL LI.red {} /* a=0 b=1 c=3 -> specificity = 13 */
+LI.red.level {} /* a=0 b=2 c=1 -> specificity = 21 */
+#x34y {} /* a=1 b=0 c=0 -> specificity = 100 */
+//! [20]
+
+
+//! [21]
+qApp->setStyleSheet("QPushButton { color: white }");
+//! [21]
+
+
+//! [22]
+myPushButton->setStyleSheet("* { color: blue }");
+//! [22]
+
+
+//! [23]
+myPushButton->setStyleSheet("color: blue");
+//! [23]
+
+
+//! [24]
+qApp->setStyleSheet("QGroupBox { color: red; } ");
+//! [24]
+
+
+//! [25]
+qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
+//! [25]
+
+
+//! [26]
+class MyPushButton : public QPushButton {
+ // ...
+}
+
+// ...
+qApp->setStyleSheet("MyPushButton { background: yellow; }");
+//! [26]
+
+
+//! [27]
+namespace ns {
+ class MyPushButton : public QPushButton {
+ // ...
+ }
+}
+
+// ...
+qApp->setSytleSheet("ns--MyPushButton { background: yellow; }");
+//! [27]
+
+
+//! [28]
+MyLabel { qproperty-pixmap: url(pixmap.png); }
+MyGroupBox { qproperty-titleColor: rgb(100, 200, 100); }
+QPushButton { qproperty-iconSize: 20px 20px; }
+//! [28]
+
+
+//! [30]
+QPushButton { background-color: red; border: none; }
+//! [30]
+
+
+//! [31]
+QToolButton { background-color: red; border: none; }
+//! [31]
+
+
+//! [32]
+void CustomWidget::paintEvent(QPaintEvent *)
+{
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}
+//! [32]
+
+
+//! [33]
+QTreeView {
+ alternate-background-color: blue;
+ background: yellow;
+}
+//! [33]
+
+
+//! [34]
+QTextEdit { background: yellow }
+//! [34]
+
+
+//! [35]
+QLabel {
+ background-image: url(dense6pattern.png);
+ background-repeat: repeat-xy;
+}
+//! [35]
+
+
+//! [36]
+QLabel { background-color: yellow }
+QLineEdit { background-color: rgb(255, 0, 0) }
+//! [36]
+
+
+//! [37]
+QFrame { background-image: url(:/images/hydro.png) }
+//! [37]
+
+
+//! [38]
+QFrame {
+ background: white url(:/images/ring.png);
+ background-repeat: repeat-y;
+ background-position: left;
+}
+//! [38]
+
+
+//! [39]
+QFrame {
+ background: url(:/images/footer.png);
+ background-position: bottom left;
+}
+//! [39]
+
+
+//! [40]
+QTextEdit {
+ background-image: url("leaves.png");
+ background-attachment: fixed;
+}
+//! [40]
+
+
+//! [41]
+QFrame {
+ background-image: url(:/images/header.png);
+ background-position: top left;
+ background-origin: content;
+ background-clip: padding;
+}
+//! [41]
+
+
+//! [42]
+QFrame {
+ background-image: url(:/images/header.png);
+ background-position: top left;
+ background-origin: content;
+}
+//! [42]
+
+
+//! [43]
+QLineEdit { border: 1px solid white }
+//! [43]
+
+
+//! [44]
+QLineEdit {
+ border-width: 1px;
+ border-style: solid;
+ border-color: white;
+}
+//! [44]
+
+
+//! [45]
+QLineEdit {
+ border-width: 1px;
+ border-style: solid;
+ border-radius: 4px;
+}
+//! [45]
+
+
+//! [46]
+QLineEdit {
+ border-width: 1px;
+ border-style: solid;
+ border-color: blue;
+}
+//! [46]
+
+
+//! [47]
+QLineEdit {
+ border-width: 2px;
+ border-style: solid;
+ border-color: darkblue;
+}
+//! [47]
+
+
+//! [48]
+QSpinBox::down-button { bottom: 2px }
+//! [48]
+
+
+//! [49]
+* { button-layout: 2 }
+//! [49]
+
+
+//! [50]
+QPushButton { color: red }
+//! [50]
+
+
+//! [51]
+QDialogButtonBox { dialogbuttonbox-buttons-have-icons: 1; }
+//! [51]
+
+
+//! [52]
+* { etch-disabled-text: 1 }
+//! [52]
+
+
+//! [53]
+QCheckBox { font: bold italic large "Times New Roman" }
+//! [53]
+
+
+//! [54]
+QCheckBox { font-family: "New Century Schoolbook" }
+//! [54]
+
+
+//! [55]
+QTextEdit { font-size: 12px }
+//! [55]
+
+
+//! [56]
+QTextEdit { font-style: italic }
+//! [56]
+
+
+//! [57]
+* { gridline-color: gray }
+//! [57]
+
+
+//! [58]
+QSpinBox::down-button { height: 10px }
+//! [58]
+
+
+//! [59]
+/* implicitly sets the size of down-button to the size of spindown.png */
+QSpinBox::down-button { image: url(:/images/spindown.png) }
+
+QTextEdit { image: url(x1.png) url(x2.png) }
+QTextEdit { image: url(pic1.svg) }
+//! [59]
+
+
+//! [60]
+QSpinBox::down-button { left: 2px }
+//! [60]
+
+
+//! [61]
+* { lineedit-password-character: 9679 }
+//! [61]
+
+
+//! [62]
+QLineEdit { margin: 2px }
+//! [62]
+
+
+//! [63]
+QSpinBox { max-height: 24px }
+//! [63]
+
+
+//! [64]
+QComboBox { max-width: 72px }
+//! [64]
+
+
+//! [65]
+QMessageBox { messagebox-text-interaction-flags: 5 }
+//! [65]
+
+
+//! [66]
+QComboBox { min-height: 24px }
+//! [66]
+
+
+//! [67]
+QComboBox { min-width: 72px }
+//! [67]
+
+
+//! [68]
+QToolTip { opacity: 223 }
+//! [68]
+
+
+//! [69]
+QLineEdit { padding: 3px }
+//! [69]
+
+
+//! [70]
+QSpinBox::down-button { right: 2px }
+//! [70]
+
+
+//! [71]
+QTextEdit { selection-background-color: darkblue }
+//! [71]
+
+
+//! [72]
+QTextEdit { selection-color: white }
+//! [72]
+
+
+//! [73]
+* { show-decoration-selected: 1 }
+//! [73]
+
+
+//! [74]
+QMenuBar { spacing: 10 }
+//! [74]
+
+
+//! [75]
+QSpinBox::up-button {
+ image: url(:/images/spinup.png);
+ subcontrol-origin: content;
+ subcontrol-position: right top;
+}
+//! [75]
+
+
+//! [76]
+QSpinBox::down-button {
+ image: url(:/images/spindown.png);
+ subcontrol-origin: padding;
+ subcontrol-position: right bottom;
+}
+//! [76]
+
+
+//! [77]
+QPushButton {
+ text-align: left;
+}
+//! [77]
+
+
+//! [78]
+QSpinBox::up-button { top: 2px }
+//! [78]
+
+
+//! [79]
+QSpinBox::up-button { width: 12px }
+//! [79]
+
+
+//! [80]
+QTextEdit { background-position: bottom center }
+//! [80]
+
+
+//! [81]
+QDialog { etch-disabled-text: 1 }
+//! [81]
+
+
+//! [82]
+QLabel { border-color: red } /* red red red red */
+QLabel { border-color: red blue } /* red blue red blue */
+QLabel { border-color: red blue green } /* red blue green blue */
+QLabel { border-color: red blue green yellow } /* red blue green yellow */
+//! [82]
+
+
+//! [83]
+QLabel { border-width: 1px } /* 1px 1px 1px 1px */
+QLabel { border-width: 1px 2px } /* 1px 2px 1px 2px */
+QLabel { border-width: 1px 2px 3px } /* 1px 2px 3px 2px */
+QLabel { border-width: 1px 2px 3px 4px } /* 1px 2px 3px 4px */
+//! [83]
+
+
+//! [84]
+QLabel { border-color: red } /* opaque red */
+QLabel { border-color: #FF0000 } /* opaque red */
+QLabel { border-color: rgba(255, 0, 0, 75%) } /* 75% opaque red */
+QLabel { border-color: rgb(255, 0, 0) } /* opaque red */
+QLabel { border-color: rgb(100%, 0%, 0%) } /* opaque red */
+QLabel { border-color: hsv(60, 255, 255) } /* opaque yellow */
+QLabel { border-color: hsva(240, 255, 255, 75%) } /* 75% blue */
+//! [84]
+
+
+//! [85]
+/* linear gradient from white to green */
+QTextEdit {
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
+ stop:0 white, stop: 0.4 gray, stop:1 green)
+}
+
+/* linear gradient from white to green */
+QTextEdit {
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
+ stop:0 white, stop: 0.4 rgba(10, 20, 30, 40), stop:1 rgb(0, 200, 230, 200))
+}
+
+
+/* conical gradient from white to green */
+QTextEdit {
+ background: qconicalgradient(cx:0.5, cy:0.5, angle:30,
+ stop:0 white, stop:1 #00FF00)
+}
+
+/* radial gradient from white to green */
+QTextEdit {
+ background: qradialgradient(cx:0, cy:0, radius: 1,
+ fx:0.5, fy:0.5, stop:0 white, stop:1 green)
+}
+//! [85]
+
+
+//! [86]
+* {
+ file-icon: url(file.png),
+ url(file_selected.png) selected;
+ }
+
+QMessageBox {
+ dialogbuttonbox-buttons-have-icons: true;
+ dialog-ok-icon: url(ok.svg);
+ dialog-cancel-icon: url(cancel.png), url(grayed_cancel.png) disabled;
+}
+//! [86]
+
+
+//! [87]
+QPushButton { color: palette(dark); }
+//! [87]
+
+
+//! [88]
+qApp->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [88]
+
+
+//! [89]
+myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [89]
+
+
+//! [90]
+myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
+//! [90]
+
+
+//! [91]
+nameEdit->setStyleSheet("background-color: yellow");
+//! [91]
+
+
+//! [92]
+nameEdit->setStyleSheet("color: blue; background-color: yellow");
+//! [92]
+
+
+//! [93]
+nameEdit->setStyleSheet("color: blue;"
+ "background-color: yellow;"
+ "selection-color: yellow;"
+ "selection-background-color: blue;");
+//! [93]
+
+
+//! [94]
+*[mandatoryField="true"] { background-color: yellow }
+//! [94]
+
+
+//! [95]
+QLineEdit *nameEdit = new QLineEdit(this);
+nameEdit->setProperty("mandatoryField", true);
+
+QLineEdit *emailEdit = new QLineEdit(this);
+emailEdit->setProperty("mandatoryField", true);
+
+QSpinBox *ageSpinBox = new QSpinBox(this);
+ageSpinBox->setProperty("mandatoryField", true);
+//! [95]
+
+
+//! [96]
+QPushButton#evilButton { background-color: red }
+//! [96]
+
+
+//! [97]
+QPushButton#evilButton {
+ background-color: red;
+ border-style: outset;
+ border-width: 2px;
+ border-color: beige;
+}
+//! [97]
+
+
+//! [98]
+QPushButton#evilButton {
+ background-color: red;
+ border-style: outset;
+ border-width: 2px;
+ border-radius: 10px;
+ border-color: beige;
+ font: bold 14px;
+ min-width: 10em;
+ padding: 6px;
+}
+//! [98]
+
+
+//! [99]
+QPushButton#evilButton {
+ background-color: red;
+ border-style: outset;
+ border-width: 2px;
+ border-radius: 10px;
+ border-color: beige;
+ font: bold 14px;
+ min-width: 10em;
+ padding: 6px;
+}
+QPushButton#evilButton:pressed {
+ background-color: rgb(224, 0, 0);
+ border-style: inset;
+}
+//! [99]
+
+
+//! [100]
+QPushButton#evilButton::menu-indicator {
+ image: url(myindicator.png);
+}
+//! [100]
+
+
+//! [101]
+QPushButton::menu-indicator {
+ image: url(myindicator.png);
+ subcontrol-position: right center;
+ subcontrol-origin: padding;
+ left: -2px;
+}
+//! [101]
+
+
+//! [102]
+QLineEdit { color: red }
+//! [102]
+
+
+//! [103]
+QLineEdit { color: red }
+QLineEdit[readOnly="true"] { color: gray }
+//! [103]
+
+
+//! [104]
+QLineEdit { color: red }
+QLineEdit[readOnly="true"] { color: gray }
+#registrationDialog QLineEdit { color: brown }
+//! [104]
+
+
+//! [105]
+QLineEdit { color: red }
+QLineEdit[readOnly="true"] { color: gray }
+QDialog QLineEdit { color: brown }
+//! [105]
+
+
+//! [106]
+QTextEdit, QListView {
+ background-color: white;
+ background-image: url(draft.png);
+ background-attachment: scroll;
+}
+//! [106]
+
+
+//! [107]
+QTextEdit, QListView {
+ background-color: white;
+ background-image: url(draft.png);
+ background-attachment: fixed;
+}
+//! [107]
+
+
+//! [108]
+QCheckBox {
+ spacing: 5px;
+}
+
+QCheckBox::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+QCheckBox::indicator:unchecked {
+ image: url(:/images/checkbox_unchecked.png);
+}
+
+QCheckBox::indicator:unchecked:hover {
+ image: url(:/images/checkbox_unchecked_hover.png);
+}
+
+QCheckBox::indicator:unchecked:pressed {
+ image: url(:/images/checkbox_unchecked_pressed.png);
+}
+
+QCheckBox::indicator:checked {
+ image: url(:/images/checkbox_checked.png);
+}
+
+QCheckBox::indicator:checked:hover {
+ image: url(:/images/checkbox_checked_hover.png);
+}
+
+QCheckBox::indicator:checked:pressed {
+ image: url(:/images/checkbox_checked_pressed.png);
+}
+
+QCheckBox::indicator:indeterminate:hover {
+ image: url(:/images/checkbox_indeterminate_hover.png);
+}
+
+QCheckBox::indicator:indeterminate:pressed {
+ image: url(:/images/checkbox_indeterminate_pressed.png);
+}
+//! [108]
+
+
+//! [109]
+QComboBox {
+ border: 1px solid gray;
+ border-radius: 3px;
+ padding: 1px 18px 1px 3px;
+ min-width: 6em;
+}
+
+QComboBox:editable {
+ background: white;
+}
+
+QComboBox:!editable, QComboBox::drop-down:editable {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+}
+
+/* QComboBox gets the "on" state when the popup is open */
+QComboBox:!editable:on, QComboBox::drop-down:editable:on {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
+ stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
+}
+
+QComboBox:on { /* shift the text when the popup opens */
+ padding-top: 3px;
+ padding-left: 4px;
+}
+
+QComboBox::drop-down {
+ subcontrol-origin: padding;
+ subcontrol-position: top right;
+ width: 15px;
+
+ border-left-width: 1px;
+ border-left-color: darkgray;
+ border-left-style: solid; /* just a single line */
+ border-top-right-radius: 3px; /* same radius as the QComboBox */
+ border-bottom-right-radius: 3px;
+}
+
+QComboBox::down-arrow {
+ image: url(/usr/share/icons/crystalsvg/16x16/actions/1downarrow.png);
+}
+
+QComboBox::down-arrow:on { /* shift the arrow when popup is open */
+ top: 1px;
+ left: 1px;
+}
+//! [109]
+
+
+//! [110]
+QComboBox QAbstractItemView {
+ border: 2px solid darkgray;
+ selection-background-color: lightgray;
+}
+//! [110]
+
+
+//! [111]
+QDockWidget {
+ border: 1px solid lightgray;
+ titlebar-close-icon: url(close.png);
+ titlebar-normal-icon: url(undock.png);
+}
+
+QDockWidget::title {
+ text-align: left; /* align the text to the left */
+ background: lightgray;
+ padding-left: 5px;
+}
+
+QDockWidget::close-button, QDockWidget::float-button {
+ border: 1px solid transparent;
+ background: darkgray;
+ padding: 0px;
+}
+
+QDockWidget::close-button:hover, QDockWidget::float-button:hover {
+ background: gray;
+}
+
+QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
+ padding: 1px -1px -1px 1px;
+}
+//! [111]
+
+
+//! [112]
+QDockWidget {
+ border: 1px solid lightgray;
+ titlebar-close-icon: url(close.png);
+ titlebar-normal-icon: url(float.png);
+}
+
+QDockWidget::title {
+ text-align: left;
+ background: lightgray;
+ padding-left: 35px;
+}
+
+QDockWidget::close-button, QDockWidget::float-button {
+ background: darkgray;
+ padding: 0px;
+ icon-size: 14px; /* maximum icon size */
+}
+
+QDockWidget::close-button:hover, QDockWidget::float-button:hover {
+ background: gray;
+}
+
+QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
+ padding: 1px -1px -1px 1px;
+}
+
+QDockWidget::close-button {
+ subcontrol-position: top left;
+ subcontrol-origin: margin;
+ position: absolute;
+ top: 0px; left: 0px; bottom: 0px;
+ width: 14px;
+}
+
+QDockWidget::float-button {
+ subcontrol-position: top left;
+ subcontrol-origin: margin;
+ position: absolute;
+ top: 0px; left: 16px; bottom: 0px;
+ width: 14px;
+}
+//! [112]
+
+
+//! [113]
+QFrame, QLabel, QToolTip {
+ border: 2px solid green;
+ border-radius: 4px;
+ padding: 2px;
+ background-image: url(images/welcome.png);
+}
+//! [113]
+
+
+//! [114]
+QGroupBox {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E0E0E0, stop: 1 #FFFFFF);
+ border: 2px solid gray;
+ border-radius: 5px;
+ margin-top: 1ex; /* leave space at the top for the title */
+}
+
+QGroupBox::title {
+ subcontrol-origin: margin;
+ subcontrol-position: top center; /* position at the top center */
+ padding: 0 3px;
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #FFOECE, stop: 1 #FFFFFF);
+}
+//! [114]
+
+
+//! [115]
+QGroupBox::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+QGroupBox::indicator:unchecked {
+ image: url(:/images/checkbox_unchecked.png);
+}
+
+/* proceed with styling just like QCheckBox */
+//! [115]
+
+
+//! [116]
+QHeaderView::section {
+ background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
+ stop:0 #616161, stop: 0.5 #505050,
+ stop: 0.6 #434343, stop:1 #656565);
+ color: white;
+ padding-left: 4px;
+ border: 1px solid #6c6c6c;
+}
+
+/* style the sort indicator */
+QHeaderView::down-arrow {
+ image: url(down_arrow.png);
+}
+
+QHeaderView::up-arrow {
+ image: url(up_arrow.png);
+}
+//! [116]
+
+
+//! [117]
+QLineEdit {
+ border: 2px solid gray;
+ border-radius: 10px;
+ padding: 0 8px;
+ background: yellow;
+ selection-background-color: darkgray;
+}
+//! [117]
+
+
+//! [118]
+QLineEdit[echoMode="2"] {
+ lineedit-password-character: 9679;
+}
+//! [118]
+
+
+//! [119]
+QLineEdit:read-only {
+ background: lightblue;
+//! [119]
+
+
+//! [120]
+QListView {
+ alternate-background-color: yellow;
+}
+//! [120]
+
+
+//! [121]
+QListView {
+ show-decoration-selected: 1; /* make the selection span the entire width of the view */
+}
+
+QListView::item:alternate {
+ background: #EEEEEE;
+}
+
+QListView::item:selected {
+ border: 1px solid #6a6ea9;
+}
+
+QListView::item:selected:!active {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #ABAFE5, stop: 1 #8588B2);
+}
+
+QListView::item:selected:active {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #6a6ea9, stop: 1 #888dd9);
+}
+
+QListView::item:hover {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #FAFBFE, stop: 1 #DCDEF1);
+}
+//! [121]
+
+
+//! [122]
+QMainWindow::separator {
+ background: yellow;
+ width: 10px; /* when vertical */
+ height: 10px; /* when horizontal */
+}
+
+QMainWindow::separator:hover {
+ background: red;
+}
+//! [122]
+
+
+//! [123]
+QMenu {
+ background-color: #ABABAB; /* sets background of the menu */
+ border: 1px solid black;
+}
+
+QMenu::item {
+ /* sets background of menu item. set this to something non-transparent
+ if you want menu color and menu item color to be different */
+ background-color: transparent;
+}
+
+QMenu::item:selected { /* when user selects item using mouse or keyboard */
+ background-color: #654321;
+}
+//! [123]
+
+
+//! [124]
+QMenu {
+ background-color: white;
+ margin: 2px; /* some spacing around the menu */
+}
+
+QMenu::item {
+ padding: 2px 25px 2px 20px;
+ border: 1px solid transparent; /* reserve space for selection border */
+}
+
+QMenu::item:selected {
+ border-color: darkblue;
+ background: rgba(100, 100, 100, 150);
+}
+
+QMenu::icon:checked { /* appearance of a 'checked' icon */
+ background: gray;
+ border: 1px inset gray;
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ bottom: 1px;
+ left: 1px;
+}
+
+QMenu::separator {
+ height: 2px;
+ background: lightblue;
+ margin-left: 10px;
+ margin-right: 5px;
+}
+
+QMenu::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
+QMenu::indicator:non-exclusive:unchecked {
+ image: url(:/images/checkbox_unchecked.png);
+}
+
+QMenu::indicator:non-exclusive:unchecked:selected {
+ image: url(:/images/checkbox_unchecked_hover.png);
+}
+
+QMenu::indicator:non-exclusive:checked {
+ image: url(:/images/checkbox_checked.png);
+}
+
+QMenu::indicator:non-exclusive:checked:selected {
+ image: url(:/images/checkbox_checked_hover.png);
+}
+
+/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
+QMenu::indicator:exclusive:unchecked {
+ image: url(:/images/radiobutton_unchecked.png);
+}
+
+QMenu::indicator:exclusive:unchecked:selected {
+ image: url(:/images/radiobutton_unchecked_hover.png);
+}
+
+QMenu::indicator:exclusive:checked {
+ image: url(:/images/radiobutton_checked.png);
+}
+
+QMenu::indicator:exclusive:checked:selected {
+ image: url(:/images/radiobutton_checked_hover.png);
+}
+
+//! [124]
+
+
+//! [125]
+QMenuBar {
+ background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
+ stop:0 lightgray, stop:1 darkgray);
+}
+
+QMenuBar::item {
+ spacing: 3px; /* spacing between menu bar items */
+ padding: 1px 4px;
+ background: transparent;
+ border-radius: 4px;
+}
+
+QMenuBar::item:selected { /* when selected using mouse or keyboard */
+ background: #a8a8a8;
+}
+
+QMenuBar::item:pressed {
+ background: #888888;
+}
+//! [125]
+
+
+//! [126]
+QProgressBar {
+ border: 2px solid grey;
+ border-radius: 5px;
+}
+
+QProgressBar::chunk {
+ background-color: #05B8CC;
+ width: 20px;
+}
+//! [126]
+
+
+//! [127]
+QProgressBar {
+ border: 2px solid grey;
+ border-radius: 5px;
+ text-align: center;
+}
+//! [127]
+
+
+//! [128]
+QProgressBar::chunk {
+ background-color: #CD96CD;
+ width: 10px;
+ margin: 0.5px;
+}
+//! [128]
+
+
+//! [129]
+QPushButton {
+ border: 2px solid #8f8f91;
+ border-radius: 6px;
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #f6f7fa, stop: 1 #dadbde);
+ min-width: 80px;
+}
+
+QPushButton:pressed {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #dadbde, stop: 1 #f6f7fa);
+}
+
+QPushButton:flat {
+ border: none; /* no border for a flat push button */
+}
+
+QPushButton:default {
+ border-color: navy; /* make the default button prominent */
+}
+//! [129]
+
+
+//! [130]
+QPushButton:open { /* when the button has its menu open */
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #dadbde, stop: 1 #f6f7fa);
+}
+
+QPushButton::menu-indicator {
+ image: url(menu_indicator.png);
+ subcontrol-origin: padding;
+ subcontrol-position: bottom right;
+}
+
+QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
+ position: relative;
+ top: 2px; left: 2px; /* shift the arrow by 2 px */
+}
+//! [130]
+
+
+//! [131]
+QRadioButton::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+QRadioButton::indicator::unchecked {
+ image: url(:/images/radiobutton_unchecked.png);
+}
+
+QRadioButton::indicator:unchecked:hover {
+ image: url(:/images/radiobutton_unchecked_hover.png);
+}
+
+QRadioButton::indicator:unchecked:pressed {
+ image: url(:/images/radiobutton_unchecked_pressed.png);
+}
+
+QRadioButton::indicator::checked {
+ image: url(:/images/radiobutton_checked.png);
+}
+
+QRadioButton::indicator:checked:hover {
+ image: url(:/images/radiobutton_checked_hover.png);
+}
+
+QRadioButton::indicator:checked:pressed {
+ image: url(:/images/radiobutton_checked_pressed.png);
+}
+//! [131]
+
+
+//! [132]
+QScrollBar:horizontal {
+ border: 2px solid grey;
+ background: #32CC99;
+ height: 15px;
+ margin: 0px 20px 0 20px;
+}
+//! [132]
+
+
+//! [133]
+QScrollBar::handle:horizontal {
+ background: white;
+ min-width: 20px;
+}
+//! [133]
+
+
+//! [134]
+QScrollBar::add-line:horizontal {
+ border: 2px solid grey;
+ background: #32CC99;
+ width: 20px;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line:horizontal {
+ border: 2px solid grey;
+ background: #32CC99;
+ width: 20px;
+ subcontrol-position: left;
+ subcontrol-origin: margin;
+}
+//! [134]
+
+
+//! [135]
+QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
+ border: 2px solid grey;
+ width: 3px;
+ height: 3px;
+ background: white;
+}
+
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
+ background: none;
+}
+//! [135]
+
+
+//! [136]
+QScrollBar:horizontal {
+ border: 2px solid green;
+ background: cyan;
+ height: 15px;
+ margin: 0px 40px 0 0px;
+}
+
+QScrollBar::handle:horizontal {
+ background: gray;
+ min-width: 20px;
+}
+
+QScrollBar::add-line:horizontal {
+ background: blue;
+ width: 16px;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+ border: 2px solid black;
+}
+
+QScrollBar::sub-line:horizontal {
+ background: magenta;
+ width: 16px;
+ subcontrol-position: top right;
+ subcontrol-origin: margin;
+ border: 2px solid black;
+ position: absolute;
+ right: 20px;
+}
+
+QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
+ width: 3px;
+ height: 3px;
+ background: pink;
+}
+
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
+ background: none;
+}
+
+//! [136]
+
+
+//! [137]
+ QScrollBar:vertical {
+ border: 2px solid grey;
+ background: #32CC99;
+ width: 15px;
+ margin: 22px 0 22px 0;
+ }
+ QScrollBar::handle:vertical {
+ background: white;
+ min-height: 20px;
+ }
+ QScrollBar::add-line:vertical {
+ border: 2px solid grey;
+ background: #32CC99;
+ height: 20px;
+ subcontrol-position: bottom;
+ subcontrol-origin: margin;
+ }
+
+ QScrollBar::sub-line:vertical {
+ border: 2px solid grey;
+ background: #32CC99;
+ height: 20px;
+ subcontrol-position: top;
+ subcontrol-origin: margin;
+ }
+ QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
+ border: 2px solid grey;
+ width: 3px;
+ height: 3px;
+ background: white;
+ }
+
+ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
+ background: none;
+ }
+//! [137]
+
+
+//! [138]
+QSizeGrip {
+ image: url(:/images/sizegrip.png);
+ width: 16px;
+ height: 16px;
+}
+//! [138]
+
+
+//! [139]
+QSlider::groove:horizontal {
+ border: 1px solid #999999;
+ height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);
+ margin: 2px 0;
+}
+
+QSlider::handle:horizontal {
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
+ border: 1px solid #5c5c5c;
+ width: 18px;
+ margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
+ border-radius: 3px;
+}
+//! [139]
+
+
+//! [140]
+QSlider::groove:vertical {
+ background: red;
+ position: absolute; /* absolutely position 4px from the left and right of the widget. setting margins on the widget should work too... */
+ left: 4px; right: 4px;
+}
+
+QSlider::handle:vertical {
+ height: 10px;
+ background: green;
+ margin: 0 -4px; /* expand outside the groove */
+}
+
+QSlider::add-page:vertical {
+ background: white;
+}
+
+QSlider::sub-page:vertical {
+ background: pink;
+}
+//! [140]
+
+
+//! [141]
+QSpinBox {
+ padding-right: 15px; /* make room for the arrows */
+ border-image: url(:/images/frame.png) 4;
+ border-width: 3;
+}
+
+QSpinBox::up-button {
+ subcontrol-origin: border;
+ subcontrol-position: top right; /* position at the top right corner */
+
+ width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
+ border-image: url(:/images/spinup.png) 1;
+ border-width: 1px;
+}
+
+QSpinBox::up-button:hover {
+ border-image: url(:/images/spinup_hover.png) 1;
+}
+
+QSpinBox::up-button:pressed {
+ border-image: url(:/images/spinup_pressed.png) 1;
+}
+
+QSpinBox::up-arrow {
+ image: url(:/images/up_arrow.png);
+ width: 7px;
+ height: 7px;
+}
+
+QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off { /* off state when value is max */
+ image: url(:/images/up_arrow_disabled.png);
+}
+
+QSpinBox::down-button {
+ subcontrol-origin: border;
+ subcontrol-position: bottom right; /* position at bottom right corner */
+
+ width: 16px;
+ border-image: url(:/images/spindown.png) 1;
+ border-width: 1px;
+ border-top-width: 0;
+}
+
+QSpinBox::down-button:hover {
+ border-image: url(:/images/spindown_hover.png) 1;
+}
+
+QSpinBox::down-button:pressed {
+ border-image: url(:/images/spindown_pressed.png) 1;
+}
+
+QSpinBox::down-arrow {
+ image: url(:/images/down_arrow.png);
+ width: 7px;
+ height: 7px;
+}
+
+QSpinBox::down-arrow:disabled,
+QSpinBox::down-arrow:off { /* off state when value in min */
+ image: url(:/images/down_arrow_disabled.png);
+}
+
+//! [141]
+
+
+//! [142]
+QSplitter::handle {
+ image: url(images/splitter.png);
+}
+
+QSplitter::handle:horizontal {
+ width: 2px;
+}
+
+QSplitter::handle:vertical {
+ height: 2px;
+}
+//! [142]
+
+
+//! [143]
+QStatusBar {
+ background: brown;
+}
+
+QStatusBar::item {
+ border: 1px solid red;
+ border-radius: 3px;
+}
+//! [143]
+
+
+//! [144]
+QStatusBar QLabel {
+ border: 3px solid white;
+}
+//! [144]
+
+
+//! [145]
+QTabWidget::pane { /* The tab widget frame */
+ border-top: 2px solid #C2C7CB;
+}
+
+QTabWidget::tab-bar {
+ left: 5px; /* move to the right by 5px */
+}
+
+/* Style the tab using the tab sub-control. Note that
+ it reads QTabBar _not_ QTabWidget */
+QTabBar::tab {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+ border: 2px solid #C4C4C3;
+ border-bottom-color: #C2C7CB; /* same as the pane color */
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ min-width: 8ex;
+ padding: 2px;
+}
+
+QTabBar::tab:selected, QTabBar::tab:hover {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #fafafa, stop: 0.4 #f4f4f4,
+ stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
+}
+
+QTabBar::tab:selected {
+ border-color: #9B9B9B;
+ border-bottom-color: #C2C7CB; /* same as pane color */
+}
+
+QTabBar::tab:!selected {
+ margin-top: 2px; /* make non-selected tabs look smaller */
+}
+//! [145]
+
+
+//! [146]
+QTabWidget::pane { /* The tab widget frame */
+ border-top: 2px solid #C2C7CB;
+}
+
+QTabWidget::tab-bar {
+ left: 5px; /* move to the right by 5px */
+}
+
+/* Style the tab using the tab sub-control. Note that
+ it reads QTabBar _not_ QTabWidget */
+QTabBar::tab {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+ border: 2px solid #C4C4C3;
+ border-bottom-color: #C2C7CB; /* same as the pane color */
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ min-width: 8ex;
+ padding: 2px;
+}
+
+QTabBar::tab:selected, QTabBar::tab:hover {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #fafafa, stop: 0.4 #f4f4f4,
+ stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
+}
+
+QTabBar::tab:selected {
+ border-color: #9B9B9B;
+ border-bottom-color: #C2C7CB; /* same as pane color */
+}
+
+QTabBar::tab:!selected {
+ margin-top: 2px; /* make non-selected tabs look smaller */
+}
+
+/* make use of negative margins for overlapping tabs */
+QTabBar::tab:selected {
+ /* expand/overlap to the left and right by 4px */
+ margin-left: -4px;
+ margin-right: -4px;
+}
+
+QTabBar::tab:first:selected {
+ margin-left: 0; /* the first selected tab has nothing to overlap with on the left */
+}
+
+QTabBar::tab:last:selected {
+ margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
+}
+
+QTabBar::tab:only-one {
+ margin: 0; /* if there is only one tab, we don't want overlapping margins */
+}
+//! [146]
+
+
+//! [147]
+QTabWidget::pane { /* The tab widget frame */
+ border-top: 2px solid #C2C7CB;
+ position: absolute;
+ top: -0.5em;
+}
+
+QTabWidget::tab-bar {
+ alignment: center;
+}
+
+/* Style the tab using the tab sub-control. Note that
+ it reads QTabBar _not_ QTabWidget */
+QTabBar::tab {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+ border: 2px solid #C4C4C3;
+ border-bottom-color: #C2C7CB; /* same as the pane color */
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ min-width: 8ex;
+ padding: 2px;
+}
+
+QTabBar::tab:selected, QTabBar::tab:hover {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #fafafa, stop: 0.4 #f4f4f4,
+ stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
+}
+
+QTabBar::tab:selected {
+ border-color: #9B9B9B;
+ border-bottom-color: #C2C7CB; /* same as pane color */
+}
+//! [147]
+
+
+//! [148]
+QTabBar::tear {
+ image: url(tear_indicator.png);
+}
+
+QTabBar::scroller { /* the width of the scroll buttons */
+ width: 20px;
+}
+
+QTabBar QToolButton { /* the scroll buttons are tool buttons */
+ border-image: url(scrollbutton.png) 2;
+ border-width: 2px;
+}
+
+QTabBar QToolButton::right-arrow { /* the arrow mark in the tool buttons */
+ image: url(rightarrow.png);
+}
+
+QTabBar QToolButton::left-arrow {
+ image: url(leftarrow.png);
+}
+//! [148]
+
+
+//! [149]
+QTableView {
+ selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,
+ stop: 0 #FF92BB, stop: 1 white);
+}
+//! [149]
+
+
+//! [150]
+QTableView QTableCornerButton::section {
+ background: red;
+ border: 2px outset red;
+}
+//! [150]
+
+
+//! [151]
+QToolBar {
+ background: red;
+ spacing: 3px; /* spacing between items in the tool bar */
+}
+
+QToolBar::handle {
+ image: url(handle.png);
+}
+//! [151]
+
+
+//! [152]
+QToolBox::tab {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+ border-radius: 5px;
+ color: darkgray;
+}
+
+QToolBox::tab:selected { /* italicize selected tabs */
+ font: italic;
+ color: white;
+}
+//! [152]
+
+
+//! [153]
+QToolButton { /* all types of tool button */
+ border: 2px solid #8f8f91;
+ border-radius: 6px;
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #f6f7fa, stop: 1 #dadbde);
+}
+
+QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
+ padding-right: 20px; /* make way for the popup button */
+}
+
+QToolButton:pressed {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #dadbde, stop: 1 #f6f7fa);
+}
+
+/* the subcontrols below are used only in the MenuButtonPopup mode */
+QToolButton::menu-button {
+ border: 2px solid gray;
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ /* 16px width + 4px for border = 20px allocated above */
+ width: 16px;
+}
+
+QToolButton::menu-arrow {
+ image: url(downarrow.png);
+}
+
+QToolButton::menu-arrow:open {
+ top: 1px; left: 1px; /* shift it a bit */
+}
+//! [153]
+
+
+//! [154]
+QToolTip {
+ border: 2px solid darkkhaki;
+ padding: 5px;
+ border-radius: 3px;
+ opacity: 200;
+}
+//! [154]
+
+
+//! [155]
+QTreeView {
+ alternate-background-color: yellow;
+}
+//! [155]
+
+
+//! [156]
+QTreeView {
+ show-decoration-selected: 1;
+}
+
+QTreeView::item {
+ border: 1px solid #d9d9d9;
+ border-top-color: transparent;
+ border-bottom-color: transparent;
+}
+
+QTreeView::item:hover {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
+ border: 1px solid #bfcde4;
+}
+
+QTreeView::item:selected {
+ border: 1px solid #567dbc;
+}
+
+QTreeView::item:selected:active{
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
+}
+
+QTreeView::item:selected:!active {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf);
+}
+//! [156]
+
+
+//! [157]
+QTreeView::branch {
+ background: palette(base);
+}
+
+QTreeView::branch:has-siblings:!adjoins-item {
+ background: cyan;
+}
+
+QTreeView::branch:has-siblings:adjoins-item {
+ background: red;
+}
+
+QTreeView::branch:!has-children:!has-siblings:adjoins-item {
+ background: blue;
+}
+
+QTreeView::branch:closed:has-children:has-siblings {
+ background: pink;
+}
+
+QTreeView::branch:has-children:!has-siblings:closed {
+ background: gray;
+}
+
+QTreeView::branch:open:has-children:has-siblings {
+ background: magenta;
+}
+
+QTreeView::branch:open:has-children:!has-siblings {
+ background: green;
+}
+
+//! [157]
+
+
+//! [158]
+QTreeView::branch:has-siblings:!adjoins-item {
+ border-image: url(vline.png) 0;
+}
+
+QTreeView::branch:has-siblings:adjoins-item {
+ border-image: url(branch-more.png) 0;
+}
+
+QTreeView::branch:!has-children:!has-siblings:adjoins-item {
+ border-image: url(branch-end.png) 0;
+}
+
+QTreeView::branch:has-children:!has-siblings:closed,
+QTreeView::branch:closed:has-children:has-siblings {
+ border-image: none;
+ image: url(branch-closed.png);
+}
+
+QTreeView::branch:open:has-children:!has-siblings,
+QTreeView::branch:open:has-children:has-siblings {
+ border-image: none;
+ image: url(branch-open.png);
+}
+//! [158]
diff --git a/doc/src/snippets/code/doc_src_uic.qdoc b/doc/src/snippets/code/doc_src_uic.qdoc
new file mode 100644
index 0000000..310e839
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_uic.qdoc
@@ -0,0 +1,15 @@
+//! [0]
+uic [options] <uifile>
+//! [0]
+
+
+//! [1]
+ui_%.h: %.ui
+ uic $< -o $@
+//! [1]
+
+
+//! [2]
+ui_foo.h: foo.ui
+ uic $< -o $@
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_unicode.qdoc b/doc/src/snippets/code/doc_src_unicode.qdoc
new file mode 100644
index 0000000..30a3710
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_unicode.qdoc
@@ -0,0 +1,18 @@
+//! [0]
+label->setText("Password:");
+//! [0]
+
+
+//! [1]
+label->setText(tr("Password:"));
+//! [1]
+
+
+//! [2]
+QFile file(QString::fromLatin1("appicon.png"));
+//! [2]
+
+
+//! [3]
+QFile file(QLatin1String("appicon.png"));
+//! [3]
diff --git a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc b/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc
new file mode 100644
index 0000000..8abcba6
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc
@@ -0,0 +1,110 @@
+//! [0]
+class MyDaemon : public QObject
+{
+ Q_OBJECT
+
+ public:
+ MyDaemon(QObject *parent = 0, const char *name = 0);
+ ~MyDaemon();
+
+ // Unix signal handlers.
+ static void hupSignalHandler(int unused);
+ static void termSignalHandler(int unused);
+
+ public slots:
+ // Qt signal handlers.
+ void handleSigHup();
+ void handleSigTerm();
+
+ private:
+ static int sighupFd[2];
+ static int sigtermFd[2];
+
+ QSocketNotifier *snHup;
+ QSocketNotifier *snTerm;
+};
+//! [0]
+
+
+//! [1]
+MyDaemon::MyDaemon(QObject *parent, const char *name)
+ : QObject(parent,name)
+{
+ if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sighupFd))
+ qFatal("Couldn't create HUP socketpair");
+
+ if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd))
+ qFatal("Couldn't create TERM socketpair");
+ snHup = new QSocketNotifier(sighupFd[1], QSocketNotifier::Read, this);
+ connect(snHup, SIGNAL(activated(int)), this, SLOT(handleSigHup()));
+ snTerm = new QSocketNotifier(sigtermFd[1], QSocketNotifier::Read, this);
+ connect(snTerm, SIGNAL(activated(int)), this, SLOT(handleSigTerm()));
+
+ ...
+}
+//! [1]
+
+
+//! [2]
+static int setup_unix_signal_handlers()
+{
+ struct sigaction hup, term;
+
+ hup.sa_handler = MyDaemon::hupSignalHandler;
+ sigemptyset(&hup.sa_mask);
+ hup.sa_flags = 0;
+ hup.sa_flags |= SA_RESTART;
+
+ if (sigaction(SIGHUP, &hup, 0) > 0)
+ return 1;
+
+ term.sa_handler = MyDaemon::termSignalHandler;
+ sigemptyset(&term.sa_mask);
+ term.sa_flags |= SA_RESTART;
+
+ if (sigaction(SIGTERM, &term, 0) > 0)
+ return 2;
+
+ return 0;
+}
+//! [2]
+
+
+//! [3]
+void MyDaemon::hupSignalHandler(int)
+{
+ char a = 1;
+ ::write(sighupFd[0], &a, sizeof(a));
+}
+
+void MyDaemon::termSignalHandler(int)
+{
+ char a = 1;
+ ::write(sigtermFd[0], &a, sizeof(a));
+}
+//! [3]
+
+
+//! [4]
+void MyDaemon::handleSigTerm()
+{
+ snTerm->setEnabled(false);
+ char tmp;
+ ::read(sigtermFd[1], &tmp, sizeof(tmp));
+
+ // do Qt stuff
+
+ snTerm->setEnabled(true);
+}
+
+void MyDaemon::handleSigHup()
+{
+ snHup->setEnabled(false);
+ char tmp;
+ ::read(sighupFd[1], &tmp, sizeof(tmp));
+
+ // do Qt stuff
+
+ snHup->setEnabled(true);
+}
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_wince-customization.qdoc b/doc/src/snippets/code/doc_src_wince-customization.qdoc
new file mode 100644
index 0000000..0399231
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_wince-customization.qdoc
@@ -0,0 +1,70 @@
+//! [0]
+wince<version><SDK-shortcut>-[architecture]-msvc2005
+//! [0]
+
+
+//! [1]
+CE_SDK = Windows Mobile 5.0 Pocket PC SDK
+CE_ARCH = ARMV4I
+//! [1]
+
+
+//! [2]
+DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG
+//! [2]
+
+
+//! [3]
+set PATH=C:\Qt\mobile5-shadow\bin;%PATH%
+//! [3]
+
+
+//! [4]
+cd c:\Qt\mobile5-shadow
+C:\Qt\%VERSION%\configure.exe -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -release
+//! [4]
+
+
+//! [5]
+set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;
+ C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Include\Armv4i
+set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;
+ C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I
+set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;
+ %PATH%
+//! [5]
+
+
+//! [6]
+setcepaths wincewm50pocket-msvc2005
+//! [6]
+
+
+//! [7]
+nmake
+//! [7]
+
+//! [8]
+if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
+ DEFINES -= _M_ARM
+}
+//! [8]
+
+//! [9]
+wchar_t* libraries[] = {
+ L"QtCore4.dll",
+ L"QtGui4.dll",
+ 0
+};
+
+for (int i = 0; libraries[i] != 0; ++i) {
+ HINSTANCE instance = LoadLibraryW(libraries[i]);
+ OutputDebugStringW(libraries[i]);
+ if (instance != NULL) {
+ OutputDebugStringW(L" : Successfully instantiated\n");
+ FreeLibrary(instance);
+ } else {
+ OutputDebugStringW(L" : Could not be loaded\n");
+ }
+}
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_wince-introduction.qdoc b/doc/src/snippets/code/doc_src_wince-introduction.qdoc
new file mode 100644
index 0000000..ffb4cfb
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_wince-introduction.qdoc
@@ -0,0 +1,9 @@
+//! [0]
+qmake
+nmake
+//! [0]
+
+
+//! [1]
+qmake -tp vc
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_wince-opengl.qdoc b/doc/src/snippets/code/doc_src_wince-opengl.qdoc
new file mode 100644
index 0000000..db2bfaa
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_wince-opengl.qdoc
@@ -0,0 +1,3 @@
+//! [0]
+configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -opengl-es-cl
+//! [0]
diff --git a/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
new file mode 100644
index 0000000..3f206ea
--- /dev/null
+++ b/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
@@ -0,0 +1,5 @@
+//! [0]
+ QTextDocumentWriter writer;
+ writer.setFormat("odf"); // same as writer.setFormat("ODF");
+//! [0]
+
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
new file mode 100644
index 0000000..c9b3b7c
--- /dev/null
+++ b/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
@@ -0,0 +1,24 @@
+{
+//! [0]
+ QDBusPendingCall async = iface->asyncCall("RemoteMethod", value1, value2);
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
+
+ QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
+ this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
+//! [0]
+
+}
+
+//! [1]
+void MyClass::callFinishedSlot(QDBusPendingCallWatcher *call)
+{
+ QDBusPendingReply<QString, QByteArray> reply = *call;
+ if (reply.isError()) {
+ showError();
+ } else {
+ QString text = reply.argumentAt<0>();
+ QByteArray data = reply.argumentAt<1>();
+ showReply(text, data);
+ }
+}
+//! [1]
diff --git a/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
new file mode 100644
index 0000000..49363a8
--- /dev/null
+++ b/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
@@ -0,0 +1,23 @@
+{
+//! [0]
+ QDBusPendingReply<QString> reply = interface->asyncCall("RemoteMethod");
+ reply.waitForFinished();
+ if (reply.isError())
+ // call failed. Show an error condition.
+ showError(reply.error());
+ else
+ // use the returned value
+ useValue(reply.value());
+//! [0]
+
+//! [2]
+ QDBusPendingReply<bool, QString> reply = interface->asyncCall("RemoteMethod");
+ reply.waitForFinished();
+ if (!reply.isError()) {
+ if (reply.argumentAt<0>())
+ showSuccess(reply.argumentAt<1>());
+ else
+ showFailure(reply.argumentAt<1>());
+ }
+//! [2]
+}
diff --git a/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp b/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
new file mode 100644
index 0000000..f81611c
--- /dev/null
+++ b/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
@@ -0,0 +1,9 @@
+//! [0]
+ QScriptEngine engine;
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&engine);
+//! [0]
+
+//! [1]
+ engine.evaluate("debugger");
+//! [1]
diff --git a/doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp b/doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp
new file mode 100644
index 0000000..f04cd29
--- /dev/null
+++ b/doc/src/snippets/code/src_3rdparty_webkit_WebKit_qt_Api_qwebview.cpp
@@ -0,0 +1,35 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+ view->page()->history();
+//! [0]
+
+
+//! [1]
+ view->page()->settings();
+//! [1]
+
+
+//! [2]
+ view->triggerAction(QWebPage::Copy);
+//! [2]
+
+
+//! [3]
+ view->page()->triggerPageAction(QWebPage::Stop);
+//! [3]
+
+
+//! [4]
+ view->page()->triggerPageAction(QWebPage::GoBack);
+//! [4]
+
+
+//! [5]
+ view->page()->triggerPageAction(QWebPage::GoForward);
+//! [5]
+
+}
+
diff --git a/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp b/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp
new file mode 100644
index 0000000..94b0da8
--- /dev/null
+++ b/doc/src/snippets/code/src_activeqt_container_qaxbase.cpp
@@ -0,0 +1,159 @@
+//! [0]
+connect(buttonBack, SIGNAL(clicked()), webBrowser, SLOT(GoBack()));
+//! [0]
+
+
+//! [1]
+activeX->setProperty("text", "some text");
+int value = activeX->property("value");
+//! [1]
+
+
+//! [2]
+webBrowser->dynamicCall("GoHome()");
+//! [2]
+
+
+//! [3]
+connect(webBrowser, SIGNAL(TitleChanged(QString)),
+ this, SLOT(setCaption(QString)));
+//! [3]
+
+
+//! [4]
+dispinterface IControl
+{
+properties:
+ [id(1)] BSTR text;
+ [id(2)] IFontDisp *font;
+
+methods:
+ [id(6)] void showColumn([in] int i);
+ [id(3)] bool addColumn([in] BSTR t);
+ [id(4)] int fillList([in, out] SAFEARRAY(VARIANT) *list);
+ [id(5)] IDispatch *item([in] int i);
+};
+//! [4]
+
+
+//! [5]
+QAxObject object("<CLSID>");
+
+QString text = object.property("text").toString();
+object.setProperty("font", QFont("Times New Roman", 12));
+
+connect(this, SIGNAL(clicked(int)), &object, SLOT(showColumn(int)));
+bool ok = object.dynamicCall("addColumn(const QString&)", "Column 1").toBool();
+
+QList<QVariant> varlist;
+QList<QVariant> parameters;
+parameters << QVariant(varlist);
+int n = object.dynamicCall("fillList(QList<QVariant>&)", parameters).toInt();
+
+QAxObject *item = object.querySubItem("item(int)", 5);
+//! [5]
+
+
+//! [6]
+IUnknown *iface = 0;
+activeX->queryInterface(IID_IUnknown, (void**)&iface);
+if (iface) {
+ // use the interface
+ iface->Release();
+}
+//! [6]
+
+
+//! [7]
+ctrl->setControl("{8E27C92B-1264-101C-8A2F-040224009C02}");
+//! [7]
+
+
+//! [8]
+ctrl->setControl("MSCal.Calendar");
+//! [8]
+
+
+//! [9]
+ctrl->setControl("Calendar Control 9.0");
+//! [9]
+
+
+//! [10]
+ctrl->setControl("c:/files/file.doc");
+//! [10]
+
+
+//! [11]
+<domain/username>:<password>@server/{8E27C92B-1264-101C-8A2F-040224009C02}
+//! [11]
+
+
+//! [12]
+{8E27C92B-1264-101C-8A2F-040224009C02}:<LicenseKey>
+//! [12]
+
+
+//! [13]
+{8E27C92B-1264-101C-8A2F-040224009C02}&
+//! [13]
+
+
+//! [14]
+ctrl->setControl("DOMAIN/user:password@server/{8E27C92B-1264-101C-8A2F-040224009C02}:LicenseKey");
+//! [14]
+
+
+//! [15]
+activeX->dynamicCall("Navigate(const QString&)", "qtsoftware.com");
+//! [15]
+
+
+//! [16]
+activeX->dynamicCall("Navigate(\"qtsoftware.com\")");
+//! [16]
+
+
+//! [17]
+activeX->dynamicCall("Value", 5);
+QString text = activeX->dynamicCall("Text").toString();
+//! [17]
+
+
+//! [18]
+IWebBrowser2 *webBrowser = 0;
+activeX->queryInterface(IID_IWebBrowser2, (void **)&webBrowser);
+if (webBrowser) {
+ webBrowser->Navigate2(pvarURL);
+ webBrowser->Release();
+}
+//! [18]
+
+
+//! [19]
+QAxWidget outlook("Outlook.Application");
+QAxObject *session = outlook.querySubObject("Session");
+if (session) {
+ QAxObject *defFolder = session->querySubObject(
+ "GetDefaultFolder(OlDefaultFolders)",
+ "olFolderContacts");
+ //...
+}
+//! [19]
+
+
+//! [20]
+void Receiver::slot(const QString &name, int argc, void *argv)
+{
+ VARIANTARG *params = (VARIANTARG*)argv;
+ if (name.startsWith("BeforeNavigate2(")) {
+ IDispatch *pDisp = params[argc-1].pdispVal;
+ VARIANTARG URL = *params[argc-2].pvarVal;
+ VARIANTARG Flags = *params[argc-3].pvarVal;
+ VARIANTARG TargetFrameName = *params[argc-4].pvarVal;
+ VARIANTARG PostData = *params[argc-5].pvarVal;
+ VARIANTARG Headers = *params[argc-6].pvarVal;
+ bool *Cancel = params[argc-7].pboolVal;
+ }
+}
+//! [20]
diff --git a/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp b/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp
new file mode 100644
index 0000000..07fca1e
--- /dev/null
+++ b/doc/src/snippets/code/src_activeqt_container_qaxscript.cpp
@@ -0,0 +1,18 @@
+//! [0]
+function setNumber(number)
+{
+ n = number;
+}
+//! [0]
+
+
+//! [1]
+QValueList args;
+args << 5;
+script->call("setNumber(const QVariant&)", args);
+//! [1]
+
+
+//! [2]
+script->call("setNumber(5)");
+//! [2]
diff --git a/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp b/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp
new file mode 100644
index 0000000..c296789
--- /dev/null
+++ b/doc/src/snippets/code/src_activeqt_control_qaxbindable.cpp
@@ -0,0 +1,60 @@
+//! [0]
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+ Q_PROPERTY(int value READ value WRITE setValue)
+
+public:
+ MyActiveX(QWidget *parent = 0);
+ ...
+
+ int value() const;
+ void setValue(int);
+};
+//! [0]
+
+
+//! [1]
+void MyActiveQt::setText(const QString &text)
+{
+ if (!requestPropertyChange("text"))
+ return;
+
+ // update property
+
+ propertyChanged("text");
+}
+//! [1]
+
+
+//! [2]
+long AxImpl::queryInterface(const QUuid &iid, void **iface)
+{
+ *iface = 0;
+ if (iid == IID_ISomeCOMInterface)
+ *iface = (ISomeCOMInterface*)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+//! [2]
+
+
+//! [3]
+HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
+{
+ return controllingUnknown()->QueryInterface(iid, iface);
+}
+
+ulong AxImpl::AddRef()
+{
+ return controllingUnknown()->AddRef();
+}
+
+ulong AxImpl::Release()
+{
+ return controllingUnknown()->Release();
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp b/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp
new file mode 100644
index 0000000..6eca434
--- /dev/null
+++ b/doc/src/snippets/code/src_activeqt_control_qaxfactory.cpp
@@ -0,0 +1,155 @@
+//! [0]
+QStringList ActiveQtFactory::featureList() const
+{
+ QStringList list;
+ list << "ActiveX1";
+ list << "ActiveX2";
+ return list;
+}
+
+QObject *ActiveQtFactory::createObject(const QString &key)
+{
+ if (key == "ActiveX1")
+ return new ActiveX1(parent);
+ if (key == "ActiveX2")
+ return new ActiveX2(parent);
+ return 0;
+}
+
+const QMetaObject *ActiveQtFactory::metaObject(const QString &key) const
+{
+ if (key == "ActiveX1")
+ return &ActiveX1::staticMetaObject;
+ if (key == "ActiveX2")
+ return &ActiveX2::staticMetaObject;
+}
+
+QUuid ActiveQtFactory::classID(const QString &key) const
+{
+ if (key == "ActiveX1")
+ return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+ ...
+ return QUuid();
+}
+
+QUuid ActiveQtFactory::interfaceID(const QString &key) const
+{
+ if (key == "ActiveX1")
+ return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+ ...
+ return QUuid();
+}
+
+QUuid ActiveQtFactory::eventsID(const QString &key) const
+{
+ if (key == "ActiveX1")
+ return "{01234567-89AB-CDEF-0123-456789ABCDEF}";
+ ...
+ return QUuid();
+}
+
+QAXFACTORY_EXPORT(
+ ActiveQtFactory, // factory class
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+//! [0]
+
+
+//! [1]
+QAXFACTORY_BEGIN(
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+ QAXCLASS(Class1)
+ QAXCLASS(Class2)
+QAXFACTORY_END()
+//! [1]
+
+
+//! [2]
+#include <qapplication.h>
+#include <qaxfactory.h>
+
+#include "theactivex.h"
+
+QAXFACTORY_DEFAULT(
+ TheActiveX, // widget class
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+//! [2]
+
+
+//! [3]
+settings->setValue("/CLSID/" + classID(key)
+ + "/Implemented Categories/"
+ + "/{00000000-0000-0000-000000000000}/.",
+ QString());
+//! [3]
+
+
+//! [4]
+settings->remove("/CLSID/" + classID(key)
+ + "/Implemented Categories"
+ + "/{00000000-0000-0000-000000000000}/.");
+//! [4]
+
+
+//! [5]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!QAxFactory::isServer()) {
+ // initialize for stand-alone execution
+ }
+ return app.exec();
+}
+//! [5]
+
+
+//! [6]
+if (QAxFactory::isServer()) {
+ QAxFactory::stopServer();
+ QAxFactory::startServer(QAxFactory::SingleInstance);
+}
+//! [6]
+
+
+//! [7]
+#include <qaxfactory.h>
+
+#include "theactivex.h"
+
+QAXFACTORY_DEFAULT(
+ TheActiveX, // widget class
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+//! [7]
+
+
+//! [8]
+QAXFACTORY_EXPORT(
+ MyFactory, // factory class
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+//! [8]
+
+
+//! [9]
+QAXFACTORY_BEGIN(
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID
+ "{01234567-89AB-CDEF-0123-456789ABCDEF}" // application ID
+)
+ QAXCLASS(Class1)
+ QAXCLASS(Class2)
+QAXFACTORY_END()
+//! [9]
diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
new file mode 100644
index 0000000..1dfd325
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
@@ -0,0 +1,34 @@
+//! [0]
+QByteArray encodedString = "...";
+QTextCodec *codec = QTextCodec::codecForName("KOI8-R");
+QString string = codec->toUnicode(encodedString);
+//! [0]
+
+
+//! [1]
+QString string = "...";
+QTextCodec *codec = QTextCodec::codecForName("KOI8-R");
+QByteArray encodedString = codec->fromUnicode(string);
+//! [1]
+
+
+//! [2]
+QTextCodec *codec = QTextCodec::codecForName("Shift-JIS");
+QTextDecoder *decoder = codec->makeDecoder();
+
+QString string;
+while (new_data_available()) {
+ QByteArray chunk = get_new_data();
+ string += decoder->toUnicode(chunk);
+}
+//! [2]
+
+
+//! [3]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextCodec::setCodecForTr(QTextCodec::codecForName("eucKR"));
+ ...
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
new file mode 100644
index 0000000..a6870b8
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
@@ -0,0 +1,16 @@
+//! [0]
+QList<QByteArray> MyCodecPlugin::names() const
+{
+ return QList<QByteArray> << "IBM01140" << "hp15-tw";
+}
+
+QTextCodec *MyCodecPlugin::createForName(const QByteArray &name)
+{
+ if (name == "IBM01140") {
+ return new Ibm01140Codec;
+ } else if (name == "hp15-tw") {
+ return new Hp15TwCodec;
+ }
+ return 0;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
new file mode 100644
index 0000000..24fc791
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
@@ -0,0 +1,24 @@
+//! [0]
+QFuture<QString> future = ...;
+
+QFuture<QString>::const_iterator i;
+for (i = future.constBegin(); i != future.constEnd(); ++i)
+ cout << *i << endl;
+//! [0]
+
+
+//! [1]
+QFuture<QString> future;
+...
+QFutureIterator<QString> i(future);
+while (i.hasNext())
+ qDebug() << i.next();
+//! [1]
+
+
+//! [2]
+QFutureIterator<QString> i(future);
+i.toBack();
+while (i.hasPrevious())
+ qDebug() << i.previous();
+//! [2]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
new file mode 100644
index 0000000..a50a99e
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
@@ -0,0 +1,13 @@
+//! [0]
+void someFunction()
+{
+ QFutureSynchronizer<void> synchronizer;
+
+ ...
+
+ synchronizer.addFuture(QtConcurrent::run(anotherFunction));
+ synchronizer.addFuture(QtConcurrent::map(list, mapFunction));
+
+ return; // QFutureSynchronizer waits for all futures to finish
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
new file mode 100644
index 0000000..e1f06cc
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
@@ -0,0 +1,10 @@
+//! [0]
+// Instantiate the objects and connect to the finished signal.
+MyClass myObject;
+QFutureWatcher<int> watcher;
+connect(&watcher, SIGNAL(finished()), &myObject, SLOT(handleFinished()));
+
+// Start the computation.
+QFuture<int> future = QtConcurrent::run(...);
+watcher.setFuture(future);
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
new file mode 100644
index 0000000..8b4d10a
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
@@ -0,0 +1,35 @@
+//! [0]
+
+class MyException : public QtConcurrent::Exception
+{
+public:
+ void raise() const { throw *this; }
+ Exception *clone() const { return new MyException(*this); }
+};
+
+//! [0]
+
+
+//! [1]
+
+try {
+ QtConcurrent::blockingMap(list, throwFunction); // throwFunction throws MyException
+} catch (MyException &e) {
+ // handle exception
+}
+
+//! [1]
+
+
+//! [2]
+
+void MyException::raise() const { throw *this; }
+
+//! [2]
+
+
+//! [3]
+
+MyException *MyException::clone() const { return new MyException(*this); }
+
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
new file mode 100644
index 0000000..d284d02
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
@@ -0,0 +1,131 @@
+//! [0]
+bool function(const T &t);
+//! [0]
+
+
+//! [1]
+bool allLowerCase(const QString &string)
+{
+ return string.lowered() == string;
+}
+
+QStringList strings = ...;
+QFuture<QString> lowerCaseStrings = QtConcurrent::filtered(strings, allLowerCase);
+//! [1]
+
+
+//! [2]
+QStringList strings = ...;
+QFuture<void> future = QtConcurrent::filter(strings, allLowerCase);
+//! [2]
+
+
+//! [3]
+V function(T &result, const U &intermediate)
+//! [3]
+
+
+//! [4]
+void addToDictionary(QSet<QString> &dictionary, const QString &string)
+{
+ dictionary.insert(string);
+}
+
+QStringList strings = ...;
+QFuture<QSet<QString> > dictionary = QtConcurrent::filteredReduced(strings, allLowerCase, addToDictionary);
+//! [4]
+
+
+//! [5]
+QStringList strings = ...;
+QFuture<QString> lowerCaseStrings = QtConcurrent::filtered(strings.constBegin(), strings.constEnd(), allLowerCase);
+
+// filter in-place only works on non-const iterators
+QFuture<void> future = QtConcurrent::filter(strings.begin(), strings.end(), allLowerCase);
+
+QFuture<QSet<QString> > dictionary = QtConcurrent::filteredReduced(strings.constBegin(), strings.constEnd(), allLowerCase, addToDictionary);
+//! [5]
+
+
+//! [6]
+QStringList strings = ...;
+
+// each call blocks until the entire operation is finished
+QStringList lowerCaseStrings = QtConcurrent::blockingFiltered(strings, allLowerCase);
+
+
+QtConcurrent::blockingFilter(strings, allLowerCase);
+
+QSet<QString> dictionary = QtConcurrent::blockingFilteredReduced(strings, allLowerCase, addToDictionary);
+//! [6]
+
+
+//! [7]
+// keep only images with an alpha channel
+QList<QImage> images = ...;
+QFuture<void> alphaImages = QtConcurrent::filter(strings, &QImage::hasAlphaChannel);
+
+// keep only gray scale images
+QList<QImage> images = ...;
+QFuture<QImage> grayscaleImages = QtConcurrent::filtered(images, &QImage::isGrayscale);
+
+// create a set of all printable characters
+QList<QChar> characters = ...;
+QFuture<QSet<QChar> > set = QtConcurrent::filteredReduced(characters, &QChar::isPrint, &QSet<QChar>::insert);
+//! [7]
+
+
+//! [8]
+// can mix normal functions and member functions with QtConcurrent::filteredReduced()
+
+// create a dictionary of all lower cased strings
+extern bool allLowerCase(const QString &string);
+QStringList strings = ...;
+QFuture<QSet<int> > averageWordLength = QtConcurrent::filteredReduced(strings, allLowerCase, QSet<QString>::insert);
+
+// create a collage of all gray scale images
+extern void addToCollage(QImage &collage, const QImage &grayscaleImage);
+QList<QImage> images = ...;
+QFuture<QImage> collage = QtConcurrent::filteredReduced(images, &QImage::isGrayscale, addToCollage);
+//! [8]
+
+
+//! [9]
+bool QString::contains(const QRegExp &regexp) const;
+//! [9]
+
+
+//! [10]
+boost::bind(&QString::contains, QRegExp("^\\S+$")); // matches strings without whitespace
+//! [10]
+
+
+//! [11]
+bool contains(const QString &string)
+//! [11]
+
+
+//! [12]
+QStringList strings = ...;
+boost::bind(static_cast<bool(QString::*)(const QRegExp&)>( &QString::contains ), QRegExp("..." ));
+//! [12]
+
+//! [13]
+struct StartsWith
+{
+ StartsWith(const QString &string)
+ : m_string(string) { }
+
+ typedef bool result_type;
+
+ bool operator()(const QString &testString)
+ {
+ return testString.startsWith(m_string);
+ }
+
+ QString m_string;
+};
+
+QList<QString> strings = ...;
+QFuture<QString> fooString = QtConcurrent::filtered(images, StartsWith(QLatin1String("Foo")));
+//! [13]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
new file mode 100644
index 0000000..cbff318
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
@@ -0,0 +1,144 @@
+//! [0]
+U function(const T &t);
+//! [0]
+
+
+//! [1]
+QImage scaled(const QImage &image)
+{
+ return image.scaled(100, 100);
+}
+
+QList<QImage> images = ...;
+QFuture<QImage> thumbnails = QtConcurrent::mapped(images, scaled);
+//! [1]
+
+
+//! [2]
+U function(T &t);
+//! [2]
+
+
+//! [3]
+void scale(QImage &image)
+{
+ image = image.scaled(100, 100);
+}
+
+QList<QImage> images = ...;
+QFuture<void> future = QtConcurrent::map(images, scale);
+//! [3]
+
+
+//! [4]
+V function(T &result, const U &intermediate)
+//! [4]
+
+
+//! [5]
+void addToCollage(QImage &collage, const QImage &thumbnail)
+{
+ QPainter p(&collage);
+ static QPoint offset = QPoint(0, 0);
+ p.drawImage(offset, thumbnail);
+ offset += ...;
+}
+
+QList<QImage> images = ...;
+QFuture<QImage> collage = QtConcurrent::mappedReduced(images, scaled, addToCollage);
+//! [5]
+
+
+//! [6]
+QList<QImage> images = ...;
+
+QFuture<QImage> thumbnails = QtConcurrent::mapped(images.constBegin(), images.constEnd(), scaled);
+
+// map in-place only works on non-const iterators
+QFuture<void> future = QtConcurrent::map(images.begin(), images.end(), scale);
+
+QFuture<QImage> collage = QtConcurrent::mappedReduced(images.constBegin(), images.constEnd(), scaled, addToCollage);
+//! [6]
+
+
+//! [7]
+QList<QImage> images = ...;
+
+// each call blocks until the entire operation is finished
+QList<QImage> future = QtConcurrent::blockingMapped(images, scaled);
+
+QtConcurrent::blockingMap(images, scale);
+
+QImage collage = QtConcurrent::blockingMappedReduced(images, scaled, addToCollage);
+//! [7]
+
+
+//! [8]
+// squeeze all strings in a QStringList
+QStringList strings = ...;
+QFuture<void> squeezedStrings = QtConcurrent::map(strings, &QString::squeeze);
+
+// swap the rgb values of all pixels on a list of images
+QList<QImage> images = ...;
+QFuture<QImage> bgrImages = QtConcurrent::mapped(images, &QImage::rgbSwapped);
+
+// create a set of the lengths of all strings in a list
+QStringList strings = ...;
+QFuture<QSet<int> > wordLengths = QtConcurrent::mappedReduced(string, &QString::length, &QSet<int>::insert);
+//! [8]
+
+
+//! [9]
+// can mix normal functions and member functions with QtConcurrent::mappedReduced()
+
+// compute the average length of a list of strings
+extern void computeAverage(int &average, int length);
+QStringList strings = ...;
+QFuture<int> averageWordLength = QtConcurrent::mappedReduced(strings, &QString::length, computeAverage);
+
+// create a set of the color distribution of all images in a list
+extern int colorDistribution(const QImage &string);
+QList<QImage> images = ...;
+QFuture<QSet<int> > totalColorDistribution = QtConcurrent::mappedReduced(images, colorDistribution, QSet<int>::insert);
+//! [9]
+
+
+//! [10]
+QImage QImage::scaledToWidth(int width, Qt::TransformationMode) const;
+//! [10]
+
+
+//! [11]
+boost::bind(&QImage::scaledToWidth, 100, Qt::SmoothTransformation)
+//! [11]
+
+
+//! [12]
+QImage scaledToWith(const QImage &image)
+//! [12]
+
+
+//! [13]
+QList<QImage> images = ...;
+QFuture<QImage> thumbnails = QtConcurrent::mapped(images, boost::bind(&QImage::scaledToWidth, 100 Qt::SmoothTransformation));
+//! [13]
+
+//! [14]
+struct Scaled
+{
+ Scaled(int size)
+ : m_size(size) { }
+
+ typedef QImage result_type;
+
+ QImage operator()(const QImage &image)
+ {
+ return image.scaled(m_size, m_size);
+ }
+
+ int m_size;
+};
+
+QList<QImage> images = ...;
+QFuture<QImage> thumbnails = QtConcurrent::mapped(images, Scaled(100));
+//! [14]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
new file mode 100644
index 0000000..99583ba
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
@@ -0,0 +1,60 @@
+//! [0]
+extern void aFunction();
+QFuture<void> future = QtConcurrent::run(aFunction);
+//! [0]
+
+
+//! [1]
+extern void aFunctionWithArguments(int arg1, double arg2, const QString &string);
+
+int integer = ...;
+double floatingPoint = ...;
+QString string = ...;
+
+QFuture<void> future = QtConcurrent::run(aFunctionWithArguments, integer, floatingPoint, string);
+//! [1]
+
+
+//! [2]
+extern QString functionReturningAString();
+QFuture<QString> future = QtConcurrent::run(functionReturningAString);
+...
+QString result = future.result();
+//! [2]
+
+
+//! [3]
+extern QString someFunction(const QByteArray &input);
+
+QByteArray bytearray = ...;
+
+QFuture<QString> future = QtConcurrent::run(someFunction, bytearray);
+...
+QString result = future.result();
+//! [3]
+
+
+//! [4]
+// call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread
+QString string = ...;
+QFuture<QStringList> future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive);
+...
+QStringList result = future.result();
+//! [4]
+
+
+//! [5]
+// call 'void QImage::invertPixels(InvertMode mode)' in a separate thread
+QImage image = ...;
+QFuture<void> future = QtConcurrent::run(image, &QImage::invertPixels, QImage::InvertRgba);
+...
+future.waitForFinished();
+// At this point, the pixels in 'image' have been inverted
+//! [5]
+
+
+//! [6]
+void someFunction(int arg1, double arg2);
+QFuture<void> future = QtConcurrent::run(boost::bind(someFunction, 1, 2.0));
+...
+//! [6]
diff --git a/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
new file mode 100644
index 0000000..327a00f
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
@@ -0,0 +1,13 @@
+//! [0]
+class HelloWorldTask : public QRunnable
+{
+ void run()
+ {
+ qDebug() << "Hello world from thread" << QThread::currentThread();
+ }
+}
+
+HelloWorldTask *hello = new HelloWorldTask();
+// QThreadPool takes ownership and deletes 'hello' automatically
+QThreadPool::globalInstance()->start(hello);
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
new file mode 100644
index 0000000..72663e9
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
@@ -0,0 +1,458 @@
+//! [0]
+label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+//! [0]
+
+
+//! [1]
+class MyClass
+{
+public:
+ enum Option {
+ NoOptions = 0x0,
+ ShowTabs = 0x1,
+ ShowAll = 0x2,
+ SqueezeBlank = 0x4
+ };
+ Q_DECLARE_FLAGS(Options, Option)
+ ...
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(MyClass::Options)
+//! [1]
+
+//! [meta-object flags]
+Q_FLAGS(Options)
+//! [meta-object flags]
+
+//! [2]
+typedef QFlags<Enum> Flags;
+//! [2]
+
+
+//! [3]
+int myValue = 10;
+int minValue = 2;
+int maxValue = 6;
+
+int boundedValue = qBound(minValue, myValue, maxValue);
+// boundedValue == 6
+//! [3]
+
+
+//! [4]
+if (!driver()->isOpen() || driver()->isOpenError()) {
+ qWarning("QSqlQuery::exec: database not open");
+ return false;
+}
+//! [4]
+
+
+//! [5]
+qint64 value = Q_INT64_C(932838457459459);
+//! [5]
+
+
+//! [6]
+quint64 value = Q_UINT64_C(932838457459459);
+//! [6]
+
+
+//! [7]
+void myMsgHandler(QtMsgType, const char *);
+//! [7]
+
+
+//! [8]
+qint64 value = Q_INT64_C(932838457459459);
+//! [8]
+
+
+//! [9]
+quint64 value = Q_UINT64_C(932838457459459);
+//! [9]
+
+
+//! [10]
+int absoluteValue;
+int myValue = -4;
+
+absoluteValue = qAbs(myValue);
+// absoluteValue == 4
+//! [10]
+
+
+//! [11]
+qreal valueA = 2.3;
+qreal valueB = 2.7;
+
+int roundedValueA = qRound(valueA);
+// roundedValueA = 2
+int roundedValueB = qRound(valueB);
+// roundedValueB = 3
+//! [11]
+
+
+//! [12]
+qreal valueA = 42949672960.3;
+qreal valueB = 42949672960.7;
+
+int roundedValueA = qRound(valueA);
+// roundedValueA = 42949672960
+int roundedValueB = qRound(valueB);
+// roundedValueB = 42949672961
+//! [12]
+
+
+//! [13]
+int myValue = 6;
+int yourValue = 4;
+
+int minValue = qMin(myValue, yourValue);
+// minValue == yourValue
+//! [13]
+
+
+//! [14]
+int myValue = 6;
+int yourValue = 4;
+
+int maxValue = qMax(myValue, yourValue);
+// maxValue == myValue
+//! [14]
+
+
+//! [15]
+int myValue = 10;
+int minValue = 2;
+int maxValue = 6;
+
+int boundedValue = qBound(minValue, myValue, maxValue);
+// boundedValue == 6
+//! [15]
+
+
+//! [16]
+#if QT_VERSION >= 0x040100
+ QIcon icon = style()->standardIcon(QStyle::SP_TrashIcon);
+#else
+ QPixmap pixmap = style()->standardPixmap(QStyle::SP_TrashIcon);
+ QIcon icon(pixmap);
+#endif
+//! [16]
+
+
+//! [17]
+// File: div.cpp
+
+#include <QtGlobal>
+
+int divide(int a, int b)
+{
+ Q_ASSERT(b != 0);
+ return a / b;
+}
+//! [17]
+
+
+//! [18]
+ASSERT: "b == 0" in file div.cpp, line 7
+//! [18]
+
+
+//! [19]
+// File: div.cpp
+
+#include <QtGlobal>
+
+int divide(int a, int b)
+{
+ Q_ASSERT_X(b != 0, "divide", "division by zero");
+ return a / b;
+}
+//! [19]
+
+
+//! [20]
+ASSERT failure in divide: "division by zero", file div.cpp, line 7
+//! [20]
+
+
+//! [21]
+int *a;
+
+Q_CHECK_PTR(a = new int[80]); // WRONG!
+
+a = new (nothrow) int[80]; // Right
+Q_CHECK_PTR(a);
+//! [21]
+
+
+//! [22]
+template<typename TInputType>
+const TInputType &myMin(const TInputType &value1, const TInputType &value2)
+{
+ qDebug() << Q_FUNC_INFO << "was called with value1:" << value1 << "value2:" << value2;
+
+ if(value1 < value2)
+ return value1;
+ else
+ return value2;
+}
+//! [22]
+
+
+//! [23]
+#include <qapplication.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void myMessageOutput(QtMsgType type, const char *msg)
+{
+ switch (type) {
+ case QtDebugMsg:
+ fprintf(stderr, "Debug: %s\n", msg);
+ break;
+ case QtWarningMsg:
+ fprintf(stderr, "Warning: %s\n", msg);
+ break;
+ case QtCriticalMsg:
+ fprintf(stderr, "Critical: %s\n", msg);
+ break;
+ case QtFatalMsg:
+ fprintf(stderr, "Fatal: %s\n", msg);
+ abort();
+ }
+}
+
+int main(int argc, char **argv)
+{
+ qInstallMsgHandler(myMessageOutput);
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [23]
+
+
+//! [24]
+qDebug("Items in list: %d", myList.size());
+//! [24]
+
+
+//! [25]
+qDebug() << "Brush:" << myQBrush << "Other value:" << i;
+//! [25]
+
+
+//! [26]
+void f(int c)
+{
+ if (c > 200)
+ qWarning("f: bad argument, c == %d", c);
+}
+//! [26]
+
+
+//! [27]
+qWarning() << "Brush:" << myQBrush << "Other value:"
+<< i;
+//! [27]
+
+
+//! [28]
+void load(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.exists())
+ qCritical("File '%s' does not exist!", qPrintable(fileName));
+}
+//! [28]
+
+
+//! [29]
+qCritical() << "Brush:" << myQBrush << "Other
+value:" << i;
+//! [29]
+
+
+//! [30]
+int divide(int a, int b)
+{
+ if (b == 0) // program error
+ qFatal("divide: cannot divide by zero");
+ return a / b;
+}
+//! [30]
+
+
+//! [31]
+forever {
+ ...
+}
+//! [31]
+
+
+//! [32]
+CONFIG += no_keywords
+//! [32]
+
+
+//! [33]
+CONFIG += no_keywords
+//! [33]
+
+
+//! [34]
+QString FriendlyConversation::greeting(int type)
+{
+static const char *greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+};
+return tr(greeting_strings[type]);
+}
+//! [34]
+
+
+//! [35]
+static const char *greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int type)
+{
+ return tr(greeting_strings[type]);
+}
+
+QString global_greeting(int type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[type]);
+}
+//! [35]
+
+
+//! [36]
+
+static { const char *source; const char *comment; } greeting_strings[] =
+{
+ QT_TRANSLATE_NOOP3("FriendlyConversation", "Hello",
+ "A really friendly hello"),
+ QT_TRANSLATE_NOOP3("FriendlyConversation", "Goodbye",
+ "A really friendly goodbye")
+};
+
+QString FriendlyConversation::greeting(int type)
+{
+ return tr(greeting_strings[type].source,
+ greeting_strings[type].comment);
+}
+
+QString global_greeting(int type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[type].source,
+ greeting_strings[type].comment);
+}
+//! [36]
+
+
+//! [37]
+qWarning("%s: %s", qPrintable(key), qPrintable(value));
+//! [37]
+
+
+//! [38]
+struct Point2D
+{
+ int x;
+ int y;
+};
+
+Q_DECLARE_TYPEINFO(Point2D, Q_PRIMITIVE_TYPE);
+//! [38]
+
+
+//! [39]
+class Point2D
+{
+public:
+ Point2D() { data = new int[2]; }
+ Point2D(const Point2D &other) { ... }
+ ~Point2D() { delete[] data; }
+
+ Point2D &operator=(const Point2D &other) { ... }
+
+ int x() const { return data[0]; }
+ int y() const { return data[1]; }
+
+private:
+ int *data;
+};
+
+Q_DECLARE_TYPEINFO(Point2D, Q_MOVABLE_TYPE);
+//! [39]
+
+
+//! [40]
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+...
+#endif
+
+or
+
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+...
+#endif
+
+//! [40]
+
+
+//! [41]
+
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
+...
+#endif
+
+//! [41]
+
+
+//! [42]
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+...
+#endif
+
+//! [42]
+
+//! [begin namespace macro]
+namespace QT_NAMESPACE {
+//! [begin namespace macro]
+
+//! [end namespace macro]
+}
+//! [end namespace macro]
+
+//! [43]
+class MyClass : public QObject
+{
+
+ private:
+ Q_DISABLE_COPY(MyClass)
+};
+
+//! [43]
+
+//! [44]
+class MyClass : public QObject
+{
+
+ private:
+ MyClass(const MyClass &);
+ MyClass &operator=(const MyClass &);
+};
+//! [44]
+
+//! [45]
+ QWidget w = QWidget();
+//! [45]
diff --git a/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
new file mode 100644
index 0000000..a7d7c75
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
@@ -0,0 +1,80 @@
+//! [0]
+class ZipEngineHandler : public QAbstractFileEngineHandler
+{
+public:
+ QAbstractFileEngine *create(const QString &fileName) const;
+};
+
+QAbstractFileEngine *ZipEngineHandler::create(const QString &fileName) const
+{
+ // ZipEngineHandler returns a ZipEngine for all .zip files
+ return fileName.toLower().endsWith(".zip") ? new ZipEngine(fileName) : 0;
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ ZipEngineHandler engine;
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
+//! [0]
+
+
+//! [1]
+QAbstractSocketEngine *ZipEngineHandler::create(const QString &fileName) const
+{
+ // ZipEngineHandler returns a ZipEngine for all .zip files
+ return fileName.toLower().endsWith(".zip") ? new ZipEngine(fileName) : 0;
+}
+//! [1]
+
+
+//! [2]
+QAbstractFileEngineIterator *
+CustomFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames)
+{
+ return new CustomFileEngineIterator(filters, filterNames);
+}
+//! [2]
+
+
+//! [3]
+class CustomIterator : public QAbstractFileEngineIterator
+{
+public:
+ CustomIterator(const QStringList &nameFilters, QDir::Filters filters)
+ : QAbstractFileEngineIterator(nameFilters, filters), index(0)
+ {
+ // In a real iterator, these entries are fetched from the
+ // file system based on the value of path().
+ entries << "entry1" << "entry2" << "entry3";
+ }
+
+ bool hasNext() const
+ {
+ return index < entries.size() - 1;
+ }
+
+ QString next()
+ {
+ if (!hasNext())
+ return QString();
+ ++index;
+ return currentFilePath();
+ }
+
+ QString currentFileName()
+ {
+ return entries.at(index);
+ }
+
+private:
+ QStringList entries;
+ int index;
+};
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_io_qdatastream.cpp b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
new file mode 100644
index 0000000..fd6d564
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
@@ -0,0 +1,81 @@
+void wrapInFunction()
+{
+
+//! [0]
+QFile file("file.dat");
+file.open(QIODevice::WriteOnly);
+QDataStream out(&file); // we will serialize the data into the file
+out << "the answer is"; // serialize a string
+out << (qint32)42; // serialize an integer
+//! [0]
+
+
+//! [1]
+QFile file("file.dat");
+file.open(QIODevice::ReadOnly);
+QDataStream in(&file); // read the data serialized from the file
+QString str;
+qint32 a;
+in >> str >> a; // extract "the answer is" and 42
+//! [1]
+
+
+//! [2]
+stream.setVersion(QDataStream::Qt_4_0);
+//! [2]
+
+
+//! [3]
+QFile file("file.xxx");
+file.open(QIODevice::WriteOnly);
+QDataStream out(&file);
+
+// Write a header with a "magic number" and a version
+out << (quint32)0xA0B0C0D0;
+out << (qint32)123;
+
+out.setVersion(QDataStream::Qt_4_0);
+
+// Write the data
+out << lots_of_interesting_data;
+//! [3]
+
+
+//! [4]
+QFile file("file.xxx");
+file.open(QIODevice::ReadOnly);
+QDataStream in(&file);
+
+// Read and check the header
+quint32 magic;
+in >> magic;
+if (magic != 0xA0B0C0D0)
+ return XXX_BAD_FILE_FORMAT;
+
+// Read the version
+qint32 version;
+in >> version;
+if (version < 100)
+ return XXX_BAD_FILE_TOO_OLD;
+if (version > 123)
+ return XXX_BAD_FILE_TOO_NEW;
+
+if (version <= 110)
+ in.setVersion(QDataStream::Qt_3_2);
+else
+ in.setVersion(QDataStream::Qt_4_0);
+
+// Read the data
+in >> lots_of_interesting_data;
+if (version >= 120)
+ in >> data_new_in_XXX_version_1_2;
+in >> other_interesting_data;
+//! [4]
+
+
+//! [5]
+QDataStream out(file);
+out.setVersion(QDataStream::Qt_4_0);
+//! [5]
+
+}
diff --git a/doc/src/snippets/code/src_corelib_io_qdir.cpp b/doc/src/snippets/code/src_corelib_io_qdir.cpp
new file mode 100644
index 0000000..4af4d4b
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qdir.cpp
@@ -0,0 +1,135 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+QDir("/home/user/Documents")
+QDir("C:/Documents and Settings")
+//! [0]
+
+
+//! [1]
+QDir("images/landscape.png")
+//! [1]
+
+
+//! [2]
+QDir("Documents/Letters/Applications").dirName() // "Applications"
+QDir().dirName() // "."
+//! [2]
+
+
+//! [3]
+QDir directory("Documents/Letters");
+QString path = directory.filePath("contents.txt");
+QString absolutePath = directory.absoluteFilePath("contents.txt");
+//! [3]
+
+
+//! [4]
+QDir dir("example");
+if (!dir.exists())
+ qWarning("Cannot find the example directory");
+//! [4]
+
+
+//! [5]
+QDir dir = QDir::root(); // "/"
+if (!dir.cd("tmp")) { // "/tmp"
+ qWarning("Cannot find the \"/tmp\" directory");
+} else {
+ QFile file(dir.filePath("ex1.txt")); // "/tmp/ex1.txt"
+ if (!file.open(QIODevice::ReadWrite))
+ qWarning("Cannot create the file %s", file.name());
+}
+//! [5]
+
+
+//! [6]
+QString bin = "/local/bin"; // where /local/bin is a symlink to /usr/bin
+QDir binDir(bin);
+QString canonicalBin = binDir.canonicalPath();
+// canonicalBin now equals "/usr/bin"
+
+QString ls = "/local/bin/ls"; // where ls is the executable "ls"
+QDir lsDir(ls);
+QString canonicalLs = lsDir.canonicalPath();
+// canonicalLS now equals "/usr/bin/ls".
+//! [6]
+
+
+//! [7]
+QDir dir("/home/bob");
+QString s;
+
+s = dir.relativeFilePath("images/file.jpg"); // s is "images/file.jpg"
+s = dir.relativeFilePath("/home/mary/file.txt"); // s is "../mary/file.txt"
+//! [7]
+
+
+//! [8]
+QDir::setSearchPaths("icons", QStringList(QDir::homePath() + "/images"));
+QDir::setSearchPaths("docs", QStringList(":/embeddedDocuments"));
+...
+QPixmap pixmap("icons:undo.png"); // will look for undo.png in QDir::homePath() + "/images"
+QFile file("docs:design.odf"); // will look in the :/embeddedDocuments resource path
+//! [8]
+
+
+//! [9]
+QDir dir("/tmp/root_link");
+dir = dir.canonicalPath();
+if (dir.isRoot())
+ qWarning("It is a root link");
+//! [9]
+
+
+//! [10]
+// The current directory is "/usr/local"
+QDir d1("/usr/local/bin");
+QDir d2("bin");
+if (d1 == d2)
+ qDebug("They're the same");
+//! [10]
+
+
+//! [11]
+// The current directory is "/usr/local"
+QDir d1("/usr/local/bin");
+d1.setFilter(QDir::Executable);
+QDir d2("bin");
+if (d1 != d2)
+ qDebug("They differ");
+//! [11]
+
+
+//! [12]
+C:/Documents and Settings/Username
+//! [12]
+
+
+//! [13]
+Q_INIT_RESOURCE(myapp);
+//! [13]
+
+
+//! [14]
+inline void initMyResource() { Q_INIT_RESOURCE(myapp); }
+
+namespace MyNamespace
+{
+ ...
+
+ void myFunction()
+ {
+ initMyResource();
+ }
+}
+//! [14]
+
+
+//! [15]
+Q_CLEANUP_RESOURCE(myapp);
+//! [15]
+
+}
diff --git a/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
new file mode 100644
index 0000000..2983a25
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
@@ -0,0 +1,12 @@
+//! [0]
+QDirIterator it("/etc", QDirIterator::Subdirectories);
+while (it.hasNext()) {
+ qDebug() << it.next();
+
+ // /etc/.
+ // /etc/..
+ // /etc/X11
+ // /etc/X11/fs
+ // ...
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_io_qfile.cpp b/doc/src/snippets/code/src_corelib_io_qfile.cpp
new file mode 100644
index 0000000..84b8b4a
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qfile.cpp
@@ -0,0 +1,35 @@
+//! [0]
+QFile file;
+QDir::setCurrent("/tmp");
+file.setFileName("readme.txt");
+QDir::setCurrent("/home");
+file.open(QIODevice::ReadOnly); // opens "/home/readme.txt" under Unix
+//! [0]
+
+
+//! [1]
+QByteArray myEncoderFunc(const QString &fileName);
+//! [1]
+
+
+//! [2]
+QString myDecoderFunc(const QByteArray &localFileName);
+//! [2]
+
+
+//! [3]
+#include <stdio.h>
+
+void printError(const char* msg)
+{
+ QFile file;
+ file.open(stderr, QIODevice::WriteOnly);
+ file.write(msg, qstrlen(msg)); // write to stderr
+ file.close();
+}
+//! [3]
+
+
+//! [4]
+CONFIG += console
+//! [4]
diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
new file mode 100644
index 0000000..2ab15ee
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
@@ -0,0 +1,106 @@
+
+//![newstuff]
+ QFileInfo fi("c:/temp/foo"); => fi.absoluteFilePath() => "C:/temp/foo"
+//![newstuff]
+
+//! [0]
+#ifdef Q_OS_UNIX
+
+QFileInfo info1("/home/bob/bin/untabify");
+info1.isSymLink(); // returns true
+info1.absoluteFilePath(); // returns "/home/bob/bin/untabify"
+info1.size(); // returns 56201
+info1.symLinkTarget(); // returns "/opt/pretty++/bin/untabify"
+
+QFileInfo info2(info1.symLinkTarget());
+info1.isSymLink(); // returns false
+info1.absoluteFilePath(); // returns "/opt/pretty++/bin/untabify"
+info1.size(); // returns 56201
+
+#endif
+//! [0]
+
+
+//! [1]
+#ifdef Q_OS_WIN
+
+QFileInfo info1("C:\\Documents and Settings\\Bob\\untabify.lnk");
+info1.isSymLink(); // returns true
+info1.absoluteFilePath(); // returns "C:/Documents and Settings/Bob/untabify.lnk"
+info1.size(); // returns 743
+info1.symLinkTarget(); // returns "C:/Pretty++/untabify"
+
+QFileInfo info2(info1.symLinkTarget());
+info1.isSymLink(); // returns false
+info1.absoluteFilePath(); // returns "C:/Pretty++/untabify"
+info1.size(); // returns 63942
+
+#endif
+//! [1]
+
+
+//! [2]
+QString absolute = "/local/bin";
+QString relative = "local/bin";
+QFileInfo absFile(absolute);
+QFileInfo relFile(relative);
+
+QDir::setCurrent(QDir::rootPath());
+// absFile and relFile now point to the same file
+
+QDir::setCurrent("/tmp");
+// absFile now points to "/local/bin",
+// while relFile points to "/tmp/local/bin"
+//! [2]
+
+
+//! [3]
+QFileInfo fi("/tmp/archive.tar.gz");
+QString name = fi.fileName(); // name = "archive.tar.gz"
+//! [3]
+
+
+//! [4]
+QFileInfo fi("/Applications/Safari.app");
+QString bundle = fi.bundleName(); // name = "Safari"
+//! [4]
+
+
+//! [5]
+QFileInfo fi("/tmp/archive.tar.gz");
+QString base = fi.baseName(); // base = "archive"
+//! [5]
+
+
+//! [6]
+QFileInfo fi("/tmp/archive.tar.gz");
+QString base = fi.completeBaseName(); // base = "archive.tar"
+//! [6]
+
+
+//! [7]
+QFileInfo fi("/tmp/archive.tar.gz");
+QString ext = fi.completeSuffix(); // ext = "tar.gz"
+//! [7]
+
+
+//! [8]
+QFileInfo fi("/tmp/archive.tar.gz");
+QString ext = fi.suffix(); // ext = "gz"
+//! [8]
+
+
+//! [9]
+QFileInfo info(fileName);
+if (info.isSymLink())
+ fileName = info.symLinkTarget();
+//! [9]
+
+
+//! [10]
+QFileInfo fi("/tmp/archive.tar.gz");
+if (fi.permission(QFile::WriteUser | QFile::ReadGroup))
+ qWarning("I can change the file; my group can read the file");
+if (fi.permission(QFile::WriteGroup | QFile::WriteOther))
+ qWarning("The group or others can change the file");
+//! [10]
diff --git a/doc/src/snippets/code/src_corelib_io_qiodevice.cpp b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
new file mode 100644
index 0000000..422ca11
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
@@ -0,0 +1,59 @@
+//! [0]
+QProcess gzip;
+gzip.start("gzip", QStringList() << "-c");
+if (!gzip.waitForStarted())
+ return false;
+
+gzip.write("uncompressed data");
+
+QByteArray compressed;
+while (gzip.waitForReadyRead())
+ compressed += gzip.readAll();
+//! [0]
+
+
+//! [1]
+qint64 CustomDevice::bytesAvailable() const
+{
+ return buffer.size() + QIODevice::bytesAvailable();
+}
+//! [1]
+
+
+//! [2]
+QFile file("box.txt");
+if (file.open(QFile::ReadOnly)) {
+ char buf[1024];
+ qint64 lineLength = file.readLine(buf, sizeof(buf));
+ if (lineLength != -1) {
+ // the line is available in buf
+ }
+}
+//! [2]
+
+
+//! [3]
+bool CustomDevice::canReadLine() const
+{
+ return buffer.contains('\n') || QIODevice::canReadLine();
+}
+//! [3]
+
+
+//! [4]
+bool isExeFile(QFile *file)
+{
+ char buf[2];
+ if (file->peek(buf, sizeof(buf)) == sizeof(buf))
+ return (buf[0] == 'M' && buf[1] == 'Z');
+ return false;
+}
+//! [4]
+
+
+//! [5]
+bool isExeFile(QFile *file)
+{
+ return file->peek(2) == "MZ";
+}
+//! [5]
diff --git a/doc/src/snippets/code/src_corelib_io_qprocess.cpp b/doc/src/snippets/code/src_corelib_io_qprocess.cpp
new file mode 100644
index 0000000..6eb8ccb
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qprocess.cpp
@@ -0,0 +1,94 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+QProcess builder;
+builder.setProcessChannelMode(QProcess::MergedChannels);
+builder.start("make", QStringList() << "-j2");
+
+if (!builder.waitForFinished())
+ qDebug() << "Make failed:" << builder.errorString();
+else
+ qDebug() << "Make output:" << builder.readAll();
+//! [0]
+
+
+//! [1]
+QProcess more;
+more.start("more");
+more.write("Text to display");
+more.closeWriteChannel();
+// QProcess will emit readyRead() once "more" starts printing
+//! [1]
+
+
+//! [2]
+command1 | command2
+//! [2]
+
+
+//! [3]
+QProcess process1;
+QProcess process2;
+
+process1.setStandardOutputProcess(process2);
+
+process1.start("command1");
+process2.start("command2");
+//! [3]
+
+
+//! [4]
+class SandboxProcess : public QProcess
+{
+ ...
+ protected:
+ void setupChildProcess();
+ ...
+};
+
+void SandboxProcess::setupChildProcess()
+{
+ // Drop all privileges in the child process, and enter
+ // a chroot jail.
+#if defined Q_OS_UNIX
+ ::setgroups(0, 0);
+ ::chroot("/etc/safe");
+ ::chdir("/");
+ ::setgid(safeGid);
+ ::setuid(safeUid);
+ ::umask(0);
+#endif
+}
+
+//! [4]
+
+
+//! [5]
+QProcess process;
+process.start("del /s *.txt");
+// same as process.start("del", QStringList() << "/s" << "*.txt");
+...
+//! [5]
+
+
+//! [6]
+QProcess process;
+process.start("dir \"My Documents\"");
+//! [6]
+
+
+//! [7]
+QProcess process;
+process.start("dir \"\"\"My Documents\"\"\"");
+//! [7]
+
+
+//! [8]
+QStringList environment = QProcess::systemEnvironment();
+// environment = {"PATH=/usr/bin:/usr/local/bin",
+// "USER=greg", "HOME=/home/greg"}
+//! [8]
+
+}
diff --git a/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
new file mode 100644
index 0000000..dfe666f
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qsettings.cpp
@@ -0,0 +1,276 @@
+//! [0]
+QSettings settings("MySoft", "Star Runner");
+QColor color = settings.value("DataPump/bgcolor").value<QColor>();
+//! [0]
+
+
+//! [1]
+QSettings settings("MySoft", "Star Runner");
+QColor color = palette().background().color();
+settings.setValue("DataPump/bgcolor", color);
+//! [1]
+
+
+//! [2]
+QSettings settings("/home/petra/misc/myapp.ini",
+ QSettings::IniFormat);
+//! [2]
+
+
+//! [3]
+QSettings settings("/Users/petra/misc/myapp.plist",
+ QSettings::NativeFormat);
+//! [3]
+
+
+//! [4]
+QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Office",
+ QSettings::NativeFormat);
+//! [4]
+
+
+//! [5]
+settings.setValue("11.0/Outlook/Security/DontTrustInstalledFiles", 0);
+//! [5]
+
+
+//! [6]
+settings.setValue("HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy", "Milkyway");
+settings.setValue("HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Sun", "OurStar");
+settings.value("HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Default"); // returns "Milkyway"
+//! [6]
+
+
+//! [7]
+#ifdef Q_WS_MAC
+ QSettings settings("grenoullelogique.fr", "Squash");
+#else
+ QSettings settings("Grenoulle Logique", "Squash");
+#endif
+//! [7]
+
+
+//! [8]
+pos = @Point(100 100)
+//! [8]
+
+
+//! [9]
+windir = C:\Windows
+//! [9]
+
+
+//! [10]
+QSettings settings("Moose Tech", "Facturo-Pro");
+//! [10]
+
+
+//! [11]
+QSettings settings("Moose Soft", "Facturo-Pro");
+//! [11]
+
+
+//! [12]
+QCoreApplication::setOrganizationName("Moose Soft");
+QCoreApplication::setApplicationName("Facturo-Pro");
+QSettings settings;
+//! [12]
+
+
+//! [13]
+settings.beginGroup("mainwindow");
+settings.setValue("size", win->size());
+settings.setValue("fullScreen", win->isFullScreen());
+settings.endGroup();
+
+settings.beginGroup("outputpanel");
+settings.setValue("visible", panel->isVisible());
+settings.endGroup();
+//! [13]
+
+
+//! [14]
+settings.beginGroup("alpha");
+// settings.group() == "alpha"
+
+settings.beginGroup("beta");
+// settings.group() == "alpha/beta"
+
+settings.endGroup();
+// settings.group() == "alpha"
+
+settings.endGroup();
+// settings.group() == ""
+//! [14]
+
+
+//! [15]
+struct Login {
+ QString userName;
+ QString password;
+};
+QList<Login> logins;
+...
+
+QSettings settings;
+int size = settings.beginReadArray("logins");
+for (int i = 0; i < size; ++i) {
+ settings.setArrayIndex(i);
+ Login login;
+ login.userName = settings.value("userName").toString();
+ login.password = settings.value("password").toString();
+ logins.append(login);
+}
+settings.endArray();
+//! [15]
+
+
+//! [16]
+struct Login {
+ QString userName;
+ QString password;
+};
+QList<Login> logins;
+...
+
+QSettings settings;
+settings.beginWriteArray("logins");
+for (int i = 0; i < logins.size(); ++i) {
+ settings.setArrayIndex(i);
+ settings.setValue("userName", list.at(i).userName);
+ settings.setValue("password", list.at(i).password);
+}
+settings.endArray();
+//! [16]
+
+
+//! [17]
+QSettings settings;
+settings.setValue("fridge/color", Qt::white);
+settings.setValue("fridge/size", QSize(32, 96));
+settings.setValue("sofa", true);
+settings.setValue("tv", false);
+
+QStringList keys = settings.allKeys();
+// keys: ["fridge/color", "fridge/size", "sofa", "tv"]
+//! [17]
+
+
+//! [18]
+settings.beginGroup("fridge");
+keys = settings.allKeys();
+// keys: ["color", "size"]
+//! [18]
+
+
+//! [19]
+QSettings settings;
+settings.setValue("fridge/color", Qt::white);
+settings.setValue("fridge/size", QSize(32, 96));
+settings.setValue("sofa", true);
+settings.setValue("tv", false);
+
+QStringList keys = settings.childKeys();
+// keys: ["sofa", "tv"]
+//! [19]
+
+
+//! [20]
+settings.beginGroup("fridge");
+keys = settings.childKeys();
+// keys: ["color", "size"]
+//! [20]
+
+
+//! [21]
+QSettings settings;
+settings.setValue("fridge/color", Qt::white);
+settings.setValue("fridge/size", QSize(32, 96));
+settings.setValue("sofa", true);
+settings.setValue("tv", false);
+
+QStringList groups = settings.childGroups();
+// group: ["fridge"]
+//! [21]
+
+
+//! [22]
+settings.beginGroup("fridge");
+groups = settings.childGroups();
+// groups: []
+//! [22]
+
+
+//! [23]
+QSettings settings;
+settings.setValue("interval", 30);
+settings.value("interval").toInt(); // returns 30
+
+settings.setValue("interval", 6.55);
+settings.value("interval").toDouble(); // returns 6.55
+//! [23]
+
+
+//! [24]
+QSettings settings;
+settings.setValue("ape");
+settings.setValue("monkey", 1);
+settings.setValue("monkey/sea", 2);
+settings.setValue("monkey/doe", 4);
+
+settings.remove("monkey");
+QStringList keys = settings.allKeys();
+// keys: ["ape"]
+//! [24]
+
+
+//! [25]
+QSettings settings;
+settings.setValue("ape");
+settings.setValue("monkey", 1);
+settings.setValue("monkey/sea", 2);
+settings.setValue("monkey/doe", 4);
+
+settings.beginGroup("monkey");
+settings.remove("");
+settings.endGroup();
+
+QStringList keys = settings.allKeys();
+// keys: ["ape"]
+//! [25]
+
+
+//! [26]
+QSettings settings;
+settings.setValue("animal/snake", 58);
+settings.value("animal/snake", 1024).toInt(); // returns 58
+settings.value("animal/zebra", 1024).toInt(); // returns 1024
+settings.value("animal/zebra").toInt(); // returns 0
+//! [26]
+
+
+//! [27]
+bool myReadFunc(QIODevice &device, QSettings::SettingsMap &map);
+//! [27]
+
+
+//! [28]
+bool myWriteFunc(QIODevice &device, const QSettings::SettingsMap &map);
+//! [28]
+
+
+//! [29]
+bool readXmlFile(QIODevice &device, QSettings::SettingsMap &map);
+bool writeXmlFile(QIODevice &device, const QSettings::SettingsMap &map);
+
+int main(int argc, char *argv[])
+{
+ const QSettings::Format XmlFormat =
+ QSettings::registerFormat("xml", readXmlFile, writeXmlFile);
+
+ QSettings settings(XmlFormat, QSettings::UserSettings, "MySoft",
+ "Star Runner");
+
+ ...
+}
+//! [29]
diff --git a/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
new file mode 100644
index 0000000..adb8a71
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
@@ -0,0 +1,13 @@
+{
+//! [0]
+ // Within a function/method...
+
+ QTemporaryFile file;
+ if (file.open()) {
+ // file.fileName() returns the unique file name
+ }
+
+ // The QTemporaryFile destructor removes the temporary file
+ // as it goes out of scope.
+//! [0]
+}
diff --git a/doc/src/snippets/code/src_corelib_io_qtextstream.cpp b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
new file mode 100644
index 0000000..e85fcc1
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
@@ -0,0 +1,89 @@
+//! [0]
+QFile data("output.txt");
+if (data.open(QFile::WriteOnly | QFile::Truncate)) {
+ QTextStream out(&data);
+ out << "Result: " << qSetFieldWidth(10) << left << 3.14 << 2.7;
+ // writes "Result: 3.14 2.7 "
+}
+//! [0]
+
+
+//! [1]
+QTextStream stream(stdin);
+QString line;
+do {
+ line = stream.readLine();
+} while (!line.isNull());
+//! [1]
+
+
+//! [2]
+QTextStream in("0x50 0x20");
+int firstNumber, secondNumber;
+
+in >> firstNumber; // firstNumber == 80
+in >> dec >> secondNumber; // secondNumber == 0
+
+char ch;
+in >> ch; // ch == 'x'
+//! [2]
+
+
+//! [3]
+int main(int argc, char *argv[])
+{
+ // read numeric arguments (123, 0x20, 4.5...)
+ for (int i = 1; i < argc; ++i) {
+ int number;
+ QTextStream in(argv[i]);
+ in >> number;
+ ...
+ }
+}
+//! [3]
+
+
+//! [4]
+QString str;
+QTextStream in(stdin);
+in >> str;
+//! [4]
+
+
+//! [5]
+QString s;
+QTextStream out(&s);
+out.setFieldWidth(10);
+out.setFieldAlignment(QTextStream::AlignCenter);
+out.setPadChar('-');
+out << "Qt" << "rocks!";
+//! [5]
+
+
+//! [6]
+----Qt------rocks!--
+//! [6]
+
+
+//! [7]
+QTextStream in(file);
+QChar ch1, ch2, ch3;
+in >> ch1 >> ch2 >> ch3;
+//! [7]
+
+
+//! [8]
+QTextStream out(stdout);
+out << "Qt rocks!" << endl;
+//! [8]
+
+
+//! [9]
+stream << '\n' << flush;
+//! [9]
+
+
+//! [10]
+QTextStream out(&file);
+out.setCodec("UTF-8");
+//! [10]
diff --git a/doc/src/snippets/code/src_corelib_io_qurl.cpp b/doc/src/snippets/code/src_corelib_io_qurl.cpp
new file mode 100644
index 0000000..95de86c
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_io_qurl.cpp
@@ -0,0 +1,47 @@
+//! [0]
+QUrl url("http://www.example.com/List of holidays.xml");
+// url.toEncoded() == "http://www.example.com/List%20of%20holidays.xml"
+//! [0]
+
+
+//! [1]
+QUrl url = QUrl::fromEncoded("http://qtsoftware.com/List%20of%20holidays.xml");
+//! [1]
+
+
+//! [2]
+bool checkUrl(const QUrl &url) {
+ if (!url.isValid()) {
+ qDebug(QString("Invalid URL: %1").arg(url.toString()));
+ return false;
+ }
+
+ return true;
+}
+//! [2]
+
+
+//! [3]
+QFtp ftp;
+ftp.connectToHost(url.host(), url.port(21));
+//! [3]
+
+
+//! [4]
+http://www.example.com/cgi-bin/drawgraph.cgi?type-pie/color-green
+//! [4]
+
+
+//! [5]
+QUrl baseUrl("http://qtsoftware.com/support");
+QUrl relativeUrl("../products/solutions");
+qDebug(baseUrl.resolved(relativeUrl).toString());
+// prints "http://qtsoftware.com/products/solutions"
+//! [5]
+
+
+//! [6]
+QByteArray ba = QUrl::toPercentEncoding("{a fishy string?}", "{}", "s");
+qDebug(ba.constData());
+// prints "{a fi%73hy %73tring%3F}"
+//! [6]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
new file mode 100644
index 0000000..a531f22
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
@@ -0,0 +1,3 @@
+//! [0]
+bool myEventFilter(void *message);
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
new file mode 100644
index 0000000..31576d5
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -0,0 +1,28 @@
+//! [0]
+beginInsertRows(parent, 2, 4);
+//! [0]
+
+
+//! [1]
+beginInsertRows(parent, 4, 5);
+//! [1]
+
+
+//! [2]
+beginRemoveRows(parent, 2, 3);
+//! [2]
+
+
+//! [3]
+beginInsertColumns(parent, 4, 6);
+//! [3]
+
+
+//! [4]
+beginInsertColumns(parent, 6, 8);
+//! [4]
+
+
+//! [5]
+beginRemoveColumns(parent, 4, 6);
+//! [5]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
new file mode 100644
index 0000000..748d894
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
@@ -0,0 +1,86 @@
+//! [0]
+QMouseEvent event(QEvent::MouseButtonPress, pos, 0, 0, 0);
+QApplication::sendEvent(mainWindow, &event);
+//! [0]
+
+
+//! [1]
+QPushButton *quitButton = new QPushButton("Quit");
+connect(quitButton, SIGNAL(clicked()), &app, SLOT(quit()));
+//! [1]
+
+
+//! [2]
+foreach (QString path, app.libraryPaths())
+ do_something(path);
+//! [2]
+
+
+//! [3]
+bool myEventFilter(void *message, long *result);
+//! [3]
+
+
+//! [4]
+static int *global_ptr = 0;
+
+static void cleanup_ptr()
+{
+ delete [] global_ptr;
+ global_ptr = 0;
+}
+
+void init_ptr()
+{
+ global_ptr = new int[100]; // allocate data
+ qAddPostRoutine(cleanup_ptr); // delete later
+}
+//! [4]
+
+
+//! [5]
+class MyPrivateInitStuff : public QObject
+{
+public:
+ static MyPrivateInitStuff *initStuff(QObject *parent)
+ {
+ if (!p)
+ p = new MyPrivateInitStuff(parent);
+ return p;
+ }
+
+ ~MyPrivateInitStuff()
+ {
+ // cleanup goes here
+ }
+
+private:
+ MyPrivateInitStuff(QObject *parent)
+ : QObject(parent)
+ {
+ // initialization goes here
+ }
+
+ MyPrivateInitStuff *p;
+};
+//! [5]
+
+
+//! [6]
+static inline QString tr(const char *sourceText,
+ const char *comment = 0);
+static inline QString trUtf8(const char *sourceText,
+ const char *comment = 0);
+//! [6]
+
+
+//! [7]
+class MyMfcView : public CView
+{
+ Q_DECLARE_TR_FUNCTIONS(MyMfcView)
+
+public:
+ MyMfcView();
+ ...
+};
+//! [7]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
new file mode 100644
index 0000000..c181a40
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
@@ -0,0 +1,96 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+class MyClass
+{
+ Q_OBJECT
+ Q_CLASSINFO("author", "Sabrina Schweinsteiger")
+ Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
+
+public:
+ ...
+};
+//! [0]
+
+
+//! [1]
+QByteArray normType = QMetaObject::normalizedType(" int const *");
+// normType is now "const int*"
+//! [1]
+
+
+//! [2]
+QMetaObject::invokeMethod(pushButton, "animateClick",
+ Qt::QueuedConnection);
+//! [2]
+
+
+//! [3]
+QMetaObject::invokeMethod: Unable to handle unregistered datatype 'MyType'
+//! [3]
+
+
+//! [4]
+QString retVal;
+QMetaObject::invokeMethod(obj, "compute", Qt::DirectConnection,
+ Q_RETURN_ARG(QString, retVal),
+ Q_ARG(QString, "sqrt"),
+ Q_ARG(int, 42),
+ Q_ARG(double, 9.7));
+//! [4]
+
+
+//! [5]
+class MyClass
+{
+ Q_OBJECT
+ Q_CLASSINFO("author", "Sabrina Schweinsteiger")
+ Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")
+
+public:
+ ...
+};
+//! [5]
+
+
+//! [propertyCount]
+const QMetaObject* metaObject = obj->metaObject();
+QStringList properties;
+for(int i = metaObject->propertyOffset(); i < metaObject->propertyCount(); ++i)
+ properties << QString::fromLatin1(metaObject->property(i).name());
+//! [propertyCount]
+
+
+//! [methodCount]
+const QMetaObject* metaObject = obj->metaObject();
+QStringList methods;
+for(int i = metaObject->methodOffset(); i < metaObject->methodCount(); ++i)
+ methods << QString::fromLatin1(metaObject->method(i).signature());
+//! [methodCount]
+
+//! [6]
+int methodIndex = pushButton->metaObject()->indexOfMethod("animateClick()");
+QMetaMethod method = metaObject->method(methodIndex);
+method.invoke(pushButton, Qt::QueuedConnection);
+//! [6]
+
+//! [7]
+QMetaMethod::invoke: Unable to handle unregistered datatype 'MyType'
+//! [7]
+
+//! [8]
+QString retVal;
+QByteArray normalizedSignature = QMetaObject::normalizedSignature("compute(QString, int, double)");
+int methodIndex = obj->metaObject()->indexOfMethod(normalizedSignature);
+QMetaMethod method = metaObject->method(methodIndex);
+method.invoke(obj,
+ Qt::DirectConnection,
+ Q_RETURN_ARG(QString, retVal),
+ Q_ARG(QString, "sqrt"),
+ Q_ARG(int, 42),
+ Q_ARG(double, 9.7));
+//! [8]
+
+}
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
new file mode 100644
index 0000000..355a237
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -0,0 +1,69 @@
+//! [0]
+struct MyStruct
+{
+ int i;
+ ...
+};
+
+Q_DECLARE_METATYPE(MyStruct)
+//! [0]
+
+
+//! [1]
+namespace MyNamespace
+{
+ ...
+}
+
+Q_DECLARE_METATYPE(MyNamespace::MyStruct)
+//! [1]
+
+
+//! [2]
+MyStruct s;
+QVariant var;
+var.setValue(s); // copy s into the variant
+
+...
+
+// retrieve the value
+MyStruct s2 = var.value<MyStruct>();
+//! [2]
+
+
+//! [3]
+int id = QMetaType::type("MyClass");
+if (id != -1) {
+ void *myClassPtr = QMetaType::construct(id);
+ ...
+ QMetaType::destroy(id, myClassPtr);
+ myClassPtr = 0;
+}
+//! [3]
+
+
+//! [4]
+qRegisterMetaType<MyClass>("MyClass");
+//! [4]
+
+
+//! [5]
+qRegisterMetaTypeStreamOperators<MyClass>("MyClass");
+//! [5]
+
+
+//! [6]
+QDataStream &operator<<(QDataStream &out, const MyClass &myObj);
+QDataStream &operator>>(QDataStream &in, MyClass &myObj);
+//! [6]
+
+
+//! [7]
+int id = qRegisterMetaType<MyStruct>();
+//! [7]
+
+
+//! [8]
+int id = qMetaTypeId<QString>(); // id is now QMetaType::QString
+id = qMetaTypeId<MyStruct>(); // compile error if MyStruct not declared
+//! [8]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
new file mode 100644
index 0000000..94f1dc9
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
@@ -0,0 +1,68 @@
+//! [0]
+void MyWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasUrls())
+ event->acceptProposedAction();
+}
+
+void MyWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasUrls()) {
+ foreach (QUrl url, event->mimeData()->urls()) {
+ ...
+ }
+ }
+}
+//! [0]
+
+
+//! [1]
+QByteArray csvData = ...;
+
+QMimeData *mimeData = new QMimeData;
+mimeData->setData("text/csv", csvData);
+//! [1]
+
+
+//! [2]
+void MyWidget::dropEvent(QDropEvent *event)
+{
+ const MyMimeData *myData =
+ qobject_cast<const MyMimeData *>(event->mimeData());
+ if (myData) {
+ // access myData's data directly (not through QMimeData's API)
+ }
+}
+//! [2]
+
+
+//! [3]
+application/x-qt-windows-mime;value="<custom type>"
+//! [3]
+
+
+//! [4]
+application/x-qt-windows-mime;value="FileGroupDescriptor"
+application/x-qt-windows-mime;value="FileContents"
+//! [4]
+
+
+//! [5]
+if (event->mimeData()->hasImage()) {
+ QImage image = qvariant_cast<QImage>(event->mimeData()->imageData());
+ ...
+}
+//! [5]
+
+
+//! [6]
+mimeData->setImageData(QImage("beautifulfjord.png"));
+//! [6]
+
+
+//! [7]
+if (event->mimeData()->hasColor()) {
+ QColor color = qvariant_cast<QColor>(event->mimeData()->colorData());
+ ...
+}
+//! [7]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
new file mode 100644
index 0000000..5a7c5a7
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -0,0 +1,381 @@
+//! [0]
+QLineEdit *lineEdit = static_cast<QLineEdit *>(
+ qt_find_obj_child(myWidget, "QLineEdit", "my line edit"));
+if (lineEdit)
+ lineEdit->setText("Default");
+//! [0]
+
+
+//! [1]
+QObject *obj = new QPushButton;
+obj->metaObject()->className(); // returns "QPushButton"
+
+QPushButton::staticMetaObject.className(); // returns "QPushButton"
+//! [1]
+
+
+//! [2]
+QPushButton::staticMetaObject.className(); // returns "QPushButton"
+
+QObject *obj = new QPushButton;
+obj->metaObject()->className(); // returns "QPushButton"
+//! [2]
+
+
+//! [3]
+QObject *obj = new QTimer; // QTimer inherits QObject
+
+QTimer *timer = qobject_cast<QTimer *>(obj);
+// timer == (QObject *)obj
+
+QAbstractButton *button = qobject_cast<QAbstractButton *>(obj);
+// button == 0
+//! [3]
+
+
+//! [4]
+QTimer *timer = new QTimer; // QTimer inherits QObject
+timer->inherits("QTimer"); // returns true
+timer->inherits("QObject"); // returns true
+timer->inherits("QAbstractButton"); // returns false
+
+// QLayout inherits QObject and QLayoutItem
+QLayout *layout = new QLayout;
+layout->inherits("QObject"); // returns true
+layout->inherits("QLayoutItem"); // returns false
+//! [4]
+
+
+//! [5]
+qDebug("MyClass::setPrecision(): (%s) invalid precision %f",
+ qPrintable(objectName()), newPrecision);
+//! [5]
+
+
+//! [6]
+class MainWindow : public QMainWindow
+{
+public:
+ MainWindow();
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *ev);
+
+private:
+ QTextEdit *textEdit;
+};
+
+MainWindow::MainWindow()
+{
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ textEdit->installEventFilter(this);
+}
+
+bool MainWindow::eventFilter(QObject *obj, QEvent *event)
+{
+ if (obj == textEdit) {
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ qDebug() << "Ate key press" << keyEvent->key();
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ // pass the event on to the parent class
+ return QMainWindow::eventFilter(obj, event);
+ }
+}
+//! [6]
+
+
+//! [7]
+myObject->moveToThread(QApplication::instance()->thread());
+//! [7]
+
+
+//! [8]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyObject(QObject *parent = 0);
+
+protected:
+ void timerEvent(QTimerEvent *event);
+};
+
+MyObject::MyObject(QObject *parent)
+ : QObject(parent)
+{
+ startTimer(50); // 50-millisecond timer
+ startTimer(1000); // 1-second timer
+ startTimer(60000); // 1-minute timer
+}
+
+void MyObject::timerEvent(QTimerEvent *event)
+{
+ qDebug() << "Timer ID:" << event->timerId();
+}
+//! [8]
+
+
+//! [9]
+QList<QObject *> list = window()->queryList("QAbstractButton"));
+foreach (QObject *obj, list)
+ static_cast<QAbstractButton *>(obj)->setEnabled(false);
+//! [9]
+
+
+//! [10]
+QPushButton *button = parentWidget->findChild<QPushButton *>("button1");
+//! [10]
+
+
+//! [11]
+QListWidget *list = parentWidget->findChild<QListWidget *>();
+//! [11]
+
+
+//! [12]
+QList<QWidget *> widgets = parentWidget.findChildren<QWidget *>("widgetname");
+//! [12]
+
+
+//! [13]
+QList<QPushButton *> allPButtons = parentWidget.findChildren<QPushButton *>();
+//! [13]
+
+
+//! [14]
+monitoredObj->installEventFilter(filterObj);
+//! [14]
+
+
+//! [15]
+class KeyPressEater : public QObject
+{
+ Q_OBJECT
+ ...
+
+protected:
+ bool eventFilter(QObject *obj, QEvent *event);
+};
+
+bool KeyPressEater::eventFilter(QObject *obj, QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+ qDebug("Ate key press %d", keyEvent->key());
+ return true;
+ } else {
+ // standard event processing
+ return QObject::eventFilter(obj, event);
+ }
+}
+//! [15]
+
+
+//! [16]
+KeyPressEater *keyPressEater = new KeyPressEater(this);
+QPushButton *pushButton = new QPushButton(this);
+QListView *listView = new QListView(this);
+
+pushButton->installEventFilter(keyPressEater);
+listView->installEventFilter(keyPressEater);
+//! [16]
+
+
+//! [17]
+MyWindow::MyWindow()
+{
+ QLabel *senderLabel = new QLabel(tr("Name:"));
+ QLabel *recipientLabel = new QLabel(tr("Name:", "recipient"));
+ ...
+}
+//! [17]
+
+
+//! [18]
+int n = messages.count();
+showMessage(tr("%n message(s) saved", "", n));
+//! [18]
+
+
+//! [19]
+n == 1 ? tr("%n message saved") : tr("%n messages saved")
+//! [19]
+
+
+//! [20]
+label->setText(tr("F\374r \310lise"));
+//! [20]
+
+
+//! [21]
+if (receivers(SIGNAL(valueChanged(QByteArray))) > 0) {
+ QByteArray data;
+ get_the_value(&data); // expensive operation
+ emit valueChanged(data);
+}
+//! [21]
+
+
+//! [22]
+QLabel *label = new QLabel;
+QScrollBar *scrollBar = new QScrollBar;
+QObject::connect(scrollBar, SIGNAL(valueChanged(int)),
+ label, SLOT(setNum(int)));
+//! [22]
+
+
+//! [23]
+// WRONG
+QObject::connect(scrollBar, SIGNAL(valueChanged(int value)),
+ label, SLOT(setNum(int value)));
+//! [23]
+
+
+//! [24]
+class MyWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MyWidget();
+
+signals:
+ void buttonClicked();
+
+private:
+ QPushButton *myButton;
+};
+
+MyWidget::MyWidget()
+{
+ myButton = new QPushButton(this);
+ connect(myButton, SIGNAL(clicked()),
+ this, SIGNAL(buttonClicked()));
+}
+//! [24]
+
+
+//! [25]
+QObject::connect: Cannot queue arguments of type 'MyType'
+(Make sure 'MyType' is registered using qRegisterMetaType().)
+//! [25]
+
+
+//! [26]
+disconnect(myObject, 0, 0, 0);
+//! [26]
+
+
+//! [27]
+myObject->disconnect();
+//! [27]
+
+
+//! [28]
+disconnect(myObject, SIGNAL(mySignal()), 0, 0);
+//! [28]
+
+
+//! [29]
+myObject->disconnect(SIGNAL(mySignal()));
+//! [29]
+
+
+//! [30]
+disconnect(myObject, 0, myReceiver, 0);
+//! [30]
+
+
+//! [31]
+myObject->disconnect(myReceiver);
+//! [31]
+
+
+//! [32]
+if (QLatin1String(signal) == SIGNAL(valueChanged(int))) {
+ // signal is valueChanged(int)
+}
+//! [32]
+
+
+//! [33]
+void on_<object name>_<signal name>(<signal parameters>);
+//! [33]
+
+
+//! [34]
+void on_button1_clicked();
+//! [34]
+
+
+//! [35]
+class MyClass : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("Author", "Pierre Gendron")
+ Q_CLASSINFO("URL", "http://www.my-organization.qc.ca")
+
+public:
+ ...
+};
+//! [35]
+
+
+//! [36]
+Q_PROPERTY(type name
+ READ getFunction
+ [WRITE setFunction]
+ [RESET resetFunction]
+ [DESIGNABLE bool]
+ [SCRIPTABLE bool]
+ [STORED bool]
+ [USER bool])
+//! [36]
+
+
+//! [37]
+Q_PROPERTY(QString title READ title WRITE setTitle USER true)
+//! [37]
+
+
+//! [38]
+class MyClass : public QObject
+{
+ Q_OBJECT
+ Q_ENUMS(Priority)
+
+public:
+ MyClass(QObject *parent = 0);
+ ~MyClass();
+
+ enum Priority { High, Low, VeryHigh, VeryLow };
+ void setPriority(Priority priority);
+ Priority priority() const;
+};
+//! [38]
+
+
+//! [39]
+Q_FLAGS(Options Alignment)
+//! [39]
+
+
+//! [40]
+//: This name refers to a host name.
+hostNameLabel->setText(tr("Name:"));
+
+/*: This text refers to a C++ code example. */
+QString example = tr("Example");
+//! [40]
+
+//! [explicit tr context]
+QString text = QScrollBar::tr("Page up");
+//! [explicit tr context]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
new file mode 100644
index 0000000..cd5665f
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
@@ -0,0 +1,21 @@
+//! [0]
+QSystemSemaphore sem("market", 3, QSystemSemaphore::Create);
+ // resources available == 3
+sem.acquire(); // resources available == 2
+sem.acquire(); // resources available == 1
+sem.acquire(); // resources available == 0
+sem.release(); // resources available == 1
+sem.release(2); // resources available == 3
+//! [0]
+
+
+//! [1]
+QSystemSemaphore sem("market", 5, QSystemSemaphore::Create);
+sem.acquire(5); // acquire all 5 resources
+sem.release(5); // release the 5 resources
+//! [1]
+
+
+//! [2]
+sem.release(10); // "create" 10 new resources
+//! [2]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
new file mode 100644
index 0000000..02cdc0a
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
@@ -0,0 +1,12 @@
+//! [0]
+#include <QApplication>
+#include <QTimer>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTimer::singleShot(600000, &app, SLOT(quit()));
+ ...
+ return app.exec();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
new file mode 100644
index 0000000..ef19dbb
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_kernel_qvariant.cpp
@@ -0,0 +1,97 @@
+//! [0]
+QDataStream out(...);
+QVariant v(123); // The variant now contains an int
+int x = v.toInt(); // x = 123
+out << v; // Writes a type tag and an int to out
+v = QVariant("hello"); // The variant now contains a QByteArray
+v = QVariant(tr("hello")); // The variant now contains a QString
+int y = v.toInt(); // y = 0 since v cannot be converted to an int
+QString s = v.toString(); // s = tr("hello") (see QObject::tr())
+out << v; // Writes a type tag and a QString to out
+...
+QDataStream in(...); // (opening the previously written stream)
+in >> v; // Reads an Int variant
+int z = v.toInt(); // z = 123
+qDebug("Type is %s", // prints "Type is int"
+ v.typeName());
+v = v.toInt() + 100; // The variant now hold the value 223
+v = QVariant(QStringList());
+//! [0]
+
+
+//! [1]
+QVariant x, y(QString()), z(QString(""));
+x.convert(QVariant::Int);
+// x.isNull() == true
+// y.isNull() == true, z.isNull() == false
+// y.isEmpty() == true, z.isEmpty() == true
+//! [1]
+
+
+//! [2]
+QVariant variant;
+...
+QColor color = variant.value<QColor>();
+//! [2]
+
+
+//! [3]
+QColor color = palette().background().color();
+QVariant variant = color;
+//! [3]
+
+
+//! [4]
+QVariant v;
+
+v.setValue(5);
+int i = v.toInt(); // i is now 5
+QString s = v.toString() // s is now "5"
+
+MyCustomStruct c;
+v.setValue(c);
+
+...
+
+MyCustomStruct c2 = v.value<MyCustomStruct>();
+//! [4]
+
+
+//! [5]
+QVariant v;
+
+MyCustomStruct c;
+if (v.canConvert<MyCustomStruct>())
+ c = v.value<MyCustomStruct>(v);
+
+v = 7;
+int i = v.value<int>(); // same as v.toInt()
+QString s = v.value<QString>(); // same as v.toString(), s is now "7"
+MyCustomStruct c2 = v.value<MyCustomStruct>(); // conversion failed, c2 is empty
+//! [5]
+
+
+//! [6]
+QVariant v = 42;
+
+v.canConvert<int>(); // returns true
+v.canConvert<QString>(); // returns true
+
+MyCustomStruct s;
+v.setValue(s);
+
+v.canConvert<int>(); // returns false
+v.canConvert<MyCustomStruct>(); // returns true
+//! [6]
+
+
+//! [7]
+MyCustomStruct s;
+return QVariant::fromValue(s);
+//! [7]
+
+
+//! [8]
+QObject *object = getObjectFromSomewhere();
+QVariant data = qVariantFromValue(object);
+//! [8]
diff --git a/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
new file mode 100644
index 0000000..0659061
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
@@ -0,0 +1,44 @@
+//! [0]
+QLibrary myLib("mylib");
+typedef void (*MyPrototype)();
+MyPrototype myFunction = (MyPrototype) myLib.resolve("mysymbol");
+if (myFunction)
+ myFunction();
+//! [0]
+
+
+//! [1]
+typedef void (*MyPrototype)();
+MyPrototype myFunction =
+ (MyPrototype) QLibrary::resolve("mylib", "mysymbol");
+if (myFunction)
+ myFunction();
+//! [1]
+
+
+//! [2]
+typedef int (*AvgFunction)(int, int);
+
+AvgFunction avg = (AvgFunction) library->resolve("avg");
+if (avg)
+ return avg(5, 8);
+else
+ return -1;
+//! [2]
+
+
+//! [3]
+extern "C" MY_EXPORT int avg(int a, int b)
+{
+ return (a + b) / 2;
+}
+//! [3]
+
+
+//! [4]
+#ifdef Q_WS_WIN
+#define MY_EXPORT __declspec(dllexport)
+#else
+#define MY_EXPORT
+#endif
+//! [4]
diff --git a/doc/src/snippets/code/src_corelib_plugin_quuid.cpp b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
new file mode 100644
index 0000000..5c91afc
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
@@ -0,0 +1,4 @@
+//! [0]
+// {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
+QUuid IID_MyInterface(0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee)
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_thread_qatomic.cpp b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
new file mode 100644
index 0000000..3f67ddf
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
@@ -0,0 +1,58 @@
+//! [0]
+MySharedType &MySharedType::operator=(const MySharedType &other)
+{
+ (void) other.data->atomicInt.ref();
+ if (!data->atomicInt.deref()) {
+ // The last reference has been released
+ delete d;
+ }
+ d = other.d;
+ return *this;
+}
+//! [0]
+
+
+//! [1]
+if (currentValue == expectedValue) {
+ currentValue = newValue;
+ return true;
+}
+return false;
+//! [1]
+
+
+//! [2]
+int originalValue = currentValue;
+currentValue = newValue;
+return originalValue;
+//! [2]
+
+
+//! [3]
+int originalValue = currentValue;
+currentValue += valueToAdd;
+return originalValue;
+//! [3]
+
+
+//! [4]
+if (currentValue == expectedValue) {
+ currentValue = newValue;
+ return true;
+}
+return false;
+//! [4]
+
+
+//! [5]
+T *originalValue = currentValue;
+currentValue = newValue;
+return originalValue;
+//! [5]
+
+
+//! [6]
+T *originalValue = currentValue;
+currentValue += valueToAdd;
+return originalValue;
+//! [6]
diff --git a/doc/src/snippets/code/src_corelib_thread_qmutex.cpp b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
new file mode 100644
index 0000000..e79bb35
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
@@ -0,0 +1,153 @@
+//! [0]
+int number = 6;
+
+void method1()
+{
+ number *= 5;
+ number /= 4;
+}
+
+void method2()
+{
+ number *= 3;
+ number /= 2;
+}
+//! [0]
+
+
+//! [1]
+// method1()
+number *= 5; // number is now 30
+number /= 4; // number is now 7
+
+// method2()
+number *= 3; // number is now 21
+number /= 2; // number is now 10
+//! [1]
+
+
+//! [2]
+// Thread 1 calls method1()
+number *= 5; // number is now 30
+
+// Thread 2 calls method2().
+//
+// Most likely Thread 1 has been put to sleep by the operating
+// system to allow Thread 2 to run.
+number *= 3; // number is now 90
+number /= 2; // number is now 45
+
+// Thread 1 finishes executing.
+number /= 4; // number is now 11, instead of 10
+//! [2]
+
+
+//! [3]
+QMutex mutex;
+int number = 6;
+
+void method1()
+{
+ mutex.lock();
+ number *= 5;
+ number /= 4;
+ mutex.unlock();
+}
+
+void method2()
+{
+ mutex.lock();
+ number *= 3;
+ number /= 2;
+ mutex.unlock();
+}
+//! [3]
+
+
+//! [4]
+int complexFunction(int flag)
+{
+ mutex.lock();
+
+ int retVal = 0;
+
+ switch (flag) {
+ case 0:
+ case 1:
+ mutex.unlock();
+ return moreComplexFunction(flag);
+ case 2:
+ {
+ int status = anotherFunction();
+ if (status < 0) {
+ mutex.unlock();
+ return -2;
+ }
+ retVal = status + flag;
+ }
+ break;
+ default:
+ if (flag > 10) {
+ mutex.unlock();
+ return -1;
+ }
+ break;
+ }
+
+ mutex.unlock();
+ return retVal;
+}
+//! [4]
+
+
+//! [5]
+int complexFunction(int flag)
+{
+ QMutexLocker locker(&mutex);
+
+ int retVal = 0;
+
+ switch (flag) {
+ case 0:
+ case 1:
+ return moreComplexFunction(flag);
+ case 2:
+ {
+ int status = anotherFunction();
+ if (status < 0)
+ return -2;
+ retVal = status + flag;
+ }
+ break;
+ default:
+ if (flag > 10)
+ return -1;
+ break;
+ }
+
+ return retVal;
+}
+//! [5]
+
+
+//! [6]
+class SignalWaiter
+{
+private:
+ QMutexLocker locker;
+
+public:
+ SignalWaiter(QMutex *mutex)
+ : locker(mutex)
+ {
+ }
+
+ void waitForSignal()
+ {
+ ...
+ while (!signalled)
+ waitCondition.wait(locker.mutex());
+ ...
+ }
+};
+//! [6]
diff --git a/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
new file mode 100644
index 0000000..8e64a36
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
@@ -0,0 +1,21 @@
+//! [0]
+class Number {
+public:
+ Number(double n) : num (n) { }
+
+ void setNumber(double n) { num = n; }
+ double number() const { return num; }
+
+private:
+ double num;
+};
+//! [0]
+
+
+//! [1]
+void calcSquare(Number *num)
+{
+ QMutexLocker locker(mutexpool.get(num));
+ num.setNumber(num.number() * num.number());
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
new file mode 100644
index 0000000..f0f4935
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
@@ -0,0 +1,69 @@
+//! [0]
+QReadWriteLock lock;
+
+void ReaderThread::run()
+{
+ ...
+ lock.lockForRead();
+ read_file();
+ lock.unlock();
+ ...
+}
+
+void WriterThread::run()
+{
+ ...
+ lock.lockForWrite();
+ write_file();
+ lock.unlock();
+ ...
+}
+//! [0]
+
+
+//! [1]
+QReadWriteLock lock;
+
+QByteArray readData()
+{
+ QReadLocker locker(&lock);
+ ...
+ return data;
+}
+//! [1]
+
+
+//! [2]
+QReadWriteLock lock;
+
+QByteArray readData()
+{
+ locker.lockForRead();
+ ...
+ locker.unlock();
+ return data;
+}
+//! [2]
+
+
+//! [3]
+QReadWriteLock lock;
+
+void writeData(const QByteArray &data)
+{
+ QWriteLocker locker(&lock);
+ ...
+}
+//! [3]
+
+
+//! [4]
+QReadWriteLock lock;
+
+void writeData(const QByteArray &data)
+{
+ locker.lockForWrite();
+ ...
+ locker.unlock();
+}
+//! [4]
diff --git a/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
new file mode 100644
index 0000000..e02f05e
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
@@ -0,0 +1,33 @@
+//! [0]
+QSemaphore sem(5); // sem.available() == 5
+
+sem.acquire(3); // sem.available() == 2
+sem.acquire(2); // sem.available() == 0
+sem.release(5); // sem.available() == 5
+sem.release(5); // sem.available() == 10
+
+sem.tryAcquire(1); // sem.available() == 9, returns true
+sem.tryAcquire(250); // sem.available() == 9, returns false
+//! [0]
+
+
+//! [1]
+QSemaphore sem(5); // a semaphore that guards 5 resources
+sem.acquire(5); // acquire all 5 resources
+sem.release(5); // release the 5 resources
+sem.release(10); // "create" 10 new resources
+//! [1]
+
+
+//! [2]
+QSemaphore sem(5); // sem.available() == 5
+sem.tryAcquire(250); // sem.available() == 5, returns false
+sem.tryAcquire(3); // sem.available() == 2, returns true
+//! [2]
+
+
+//! [3]
+QSemaphore sem(5); // sem.available() == 5
+sem.tryAcquire(250, 1000); // sem.available() == 5, waits 1000 milliseconds and returns false
+sem.tryAcquire(3, 30000); // sem.available() == 2, returns true without waiting
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_thread_qthread.cpp b/doc/src/snippets/code/src_corelib_thread_qthread.cpp
new file mode 100644
index 0000000..58c35e5
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qthread.cpp
@@ -0,0 +1,16 @@
+//! [0]
+class MyThread : public QThread
+{
+public:
+ void run();
+};
+
+void MyThread::run()
+{
+ QTcpSocket socket;
+ // connect QTcpSocket's signals somewhere meaningful
+ ...
+ socket.connectToHost(hostName, portNumber);
+ exec();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
new file mode 100644
index 0000000..5c83d97
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
@@ -0,0 +1,49 @@
+//! [0]
+forever {
+ mutex.lock();
+ keyPressed.wait(&mutex);
+ do_something();
+ mutex.unlock();
+}
+//! [0]
+
+
+//! [1]
+forever {
+ getchar();
+ keyPressed.wakeAll();
+}
+//! [1]
+
+
+//! [2]
+forever {
+ mutex.lock();
+ keyPressed.wait(&mutex);
+ ++count;
+ mutex.unlock();
+
+ do_something();
+
+ mutex.lock();
+ --count;
+ mutex.unlock();
+}
+//! [2]
+
+
+//! [3]
+forever {
+ getchar();
+
+ mutex.lock();
+ // Sleep until there are no busy worker threads
+ while (count > 0) {
+ mutex.unlock();
+ sleep(1);
+ mutex.lock();
+ }
+ keyPressed.wakeAll();
+ mutex.unlock();
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
new file mode 100644
index 0000000..e931d40
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
@@ -0,0 +1,136 @@
+//! [0]
+QBitArray ba(200);
+//! [0]
+
+
+//! [1]
+QBitArray ba;
+ba.resize(3);
+ba[0] = true;
+ba[1] = false;
+ba[2] = true;
+//! [1]
+
+
+//! [2]
+QBitArray ba(3);
+ba.setBit(0, true);
+ba.setBit(1, false);
+ba.setBit(2, true);
+//! [2]
+
+
+//! [3]
+QBitArray x(5);
+x.setBit(3, true);
+// x: [ 0, 0, 0, 1, 0 ]
+
+QBitArray y(5);
+y.setBit(4, true);
+// y: [ 0, 0, 0, 0, 1 ]
+
+x |= y;
+// x: [ 0, 0, 0, 1, 1 ]
+//! [3]
+
+
+//! [4]
+QBitArray().isNull(); // returns true
+QBitArray().isEmpty(); // returns true
+
+QBitArray(0).isNull(); // returns false
+QBitArray(0).isEmpty(); // returns true
+
+QBitArray(3).isNull(); // returns false
+QBitArray(3).isEmpty(); // returns false
+//! [4]
+
+
+//! [5]
+QBitArray().isNull(); // returns true
+QBitArray(0).isNull(); // returns false
+QBitArray(3).isNull(); // returns false
+//! [5]
+
+
+//! [6]
+QBitArray ba(8);
+ba.fill(true);
+// ba: [ 1, 1, 1, 1, 1, 1, 1, 1 ]
+
+ba.fill(false, 2);
+// ba: [ 0, 0 ]
+//! [6]
+
+
+//! [7]
+QBitArray a(3);
+a[0] = false;
+a[1] = true;
+a[2] = a[0] ^ a[1];
+//! [7]
+
+
+//! [8]
+QBitArray a(3);
+QBitArray b(2);
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+a &= b; // a: [ 1, 0, 0 ]
+//! [8]
+
+
+//! [9]
+QBitArray a(3);
+QBitArray b(2);
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+a |= b; // a: [ 1, 1, 1 ]
+//! [9]
+
+
+//! [10]
+QBitArray a(3);
+QBitArray b(2);
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+a ^= b; // a: [ 0, 1, 1 ]
+//! [10]
+
+
+//! [11]
+QBitArray a(3);
+QBitArray b;
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b = ~a; // b: [ 0, 1, 0 ]
+//! [11]
+
+
+//! [12]
+QBitArray a(3);
+QBitArray b(2);
+QBitArray c;
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+c = a & b; // c: [ 1, 0, 0 ]
+//! [12]
+
+
+//! [13]
+QBitArray a(3);
+QBitArray b(2);
+QBitArray c;
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+c = a | b; // c: [ 1, 1, 1 ]
+//! [13]
+
+
+//! [14]
+QBitArray a(3);
+QBitArray b(2);
+QBitArray c;
+a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ]
+b[0] = 1; b[1] = 0; // b: [ 1, 1 ]
+c = a ^ b; // c: [ 0, 1, 1 ]
+//! [14]
diff --git a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
new file mode 100644
index 0000000..3c5b413
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -0,0 +1,364 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+QByteArray ba("Hello");
+//! [0]
+
+
+//! [1]
+QByteArray ba;
+ba.resize(5);
+ba[0] = 0x3c;
+ba[1] = 0xb8;
+ba[2] = 0x64;
+ba[3] = 0x18;
+ba[4] = 0xca;
+//! [1]
+
+
+//! [2]
+for (int i = 0; i < ba.size(); ++i) {
+ if (ba.at(i) >= 'a' && ba.at(i) <= 'f')
+ cout << "Found character in range [a-f]" << endl;
+}
+//! [2]
+
+
+//! [3]
+QByteArray x("and");
+x.prepend("rock "); // x == "rock and"
+x.append(" roll"); // x == "rock and roll"
+x.replace(5, 3, "&"); // x == "rock & roll"
+//! [3]
+
+
+//! [4]
+QByteArray ba("We must be <b>bold</b>, very <b>bold</b>");
+int j = 0;
+while ((j = ba.indexOf("<b>", j)) != -1) {
+ cout << "Found <b> tag at index position " << j << endl;
+ ++j;
+}
+//! [4]
+
+
+//! [5]
+QByteArray().isNull(); // returns true
+QByteArray().isEmpty(); // returns true
+
+QByteArray("").isNull(); // returns false
+QByteArray("").isEmpty(); // returns true
+
+QByteArray("abc").isNull(); // returns false
+QByteArray("abc").isEmpty(); // returns false
+//! [5]
+
+
+//! [6]
+QByteArray ba("Hello");
+int n = ba.size(); // n == 5
+ba.data()[0]; // returns 'H'
+ba.data()[4]; // returns 'o'
+ba.data()[5]; // returns '\0'
+//! [6]
+
+
+//! [7]
+QByteArray().isEmpty(); // returns true
+QByteArray("").isEmpty(); // returns true
+QByteArray("abc").isEmpty(); // returns false
+//! [7]
+
+
+//! [8]
+QByteArray ba("Hello world");
+char *data = ba.data();
+while (*data) {
+ cout << "[" << *data << "]" << endl;
+ ++data;
+}
+//! [8]
+
+
+//! [9]
+QByteArray ba;
+for (int i = 0; i < 10; ++i)
+ ba[i] = 'A' + i;
+// ba == "ABCDEFGHIJ"
+//! [9]
+
+
+//! [10]
+QByteArray ba("Stockholm");
+ba.truncate(5); // ba == "Stock"
+//! [10]
+
+
+//! [11]
+QByteArray ba("STARTTLS\r\n");
+ba.chop(2); // ba == "STARTTLS"
+//! [11]
+
+
+//! [12]
+QByteArray x("free");
+QByteArray y("dom");
+x += y;
+// x == "freedom"
+//! [12]
+
+
+//! [13]
+QByteArray().isNull(); // returns true
+QByteArray("").isNull(); // returns false
+QByteArray("abc").isNull(); // returns false
+//! [13]
+
+
+//! [14]
+QByteArray ba("Istambul");
+ba.fill('o');
+// ba == "oooooooo"
+
+ba.fill('X', 2);
+// ba == "XX"
+//! [14]
+
+
+//! [15]
+QByteArray x("ship");
+QByteArray y("air");
+x.prepend(y);
+// x == "airship"
+//! [15]
+
+
+//! [16]
+QByteArray x("free");
+QByteArray y("dom");
+x.append(y);
+// x == "freedom"
+//! [16]
+
+
+//! [17]
+QByteArray ba("Meal");
+ba.insert(1, QByteArray("ontr"));
+// ba == "Montreal"
+//! [17]
+
+
+//! [18]
+QByteArray ba("Montreal");
+ba.remove(1, 4);
+// ba == "Meal"
+//! [18]
+
+
+//! [19]
+QByteArray x("Say yes!");
+QByteArray y("no");
+x.replace(4, 3, y);
+// x == "Say no!"
+//! [19]
+
+
+//! [20]
+QByteArray ba("colour behaviour flavour neighbour");
+ba.replace(QByteArray("ou"), QByteArray("o"));
+// ba == "color behavior flavor neighbor"
+//! [20]
+
+
+//! [21]
+QByteArray x("sticky question");
+QByteArray y("sti");
+x.indexOf(y); // returns 0
+x.indexOf(y, 1); // returns 10
+x.indexOf(y, 10); // returns 10
+x.indexOf(y, 11); // returns -1
+//! [21]
+
+
+//! [22]
+QByteArray ba("ABCBA");
+ba.indexOf("B"); // returns 1
+ba.indexOf("B", 1); // returns 1
+ba.indexOf("B", 2); // returns 3
+ba.indexOf("X"); // returns -1
+//! [22]
+
+
+//! [23]
+QByteArray x("crazy azimuths");
+QByteArray y("azy");
+x.lastIndexOf(y); // returns 6
+x.lastIndexOf(y, 6); // returns 6
+x.lastIndexOf(y, 5); // returns 2
+x.lastIndexOf(y, 1); // returns -1
+//! [23]
+
+
+//! [24]
+QByteArray ba("ABCBA");
+ba.lastIndexOf("B"); // returns 3
+ba.lastIndexOf("B", 3); // returns 3
+ba.lastIndexOf("B", 2); // returns 1
+ba.lastIndexOf("X"); // returns -1
+//! [24]
+
+
+//! [25]
+QByteArray url("ftp://ftp.trolltech.com/");
+if (url.startsWith("ftp:"))
+ ...
+//! [25]
+
+
+//! [26]
+QByteArray url("http://qtsoftware.com/index.html");
+if (url.endsWith(".html"))
+ ...
+//! [26]
+
+
+//! [27]
+QByteArray x("Pineapple");
+QByteArray y = x.left(4);
+// y == "Pine"
+//! [27]
+
+
+//! [28]
+QByteArray x("Pineapple");
+QByteArray y = x.right(5);
+// y == "apple"
+//! [28]
+
+
+//! [29]
+QByteArray x("Five pineapples");
+QByteArray y = x.mid(5, 4); // y == "pine"
+QByteArray z = x.mid(5); // z == "pineapples"
+//! [29]
+
+
+//! [30]
+QByteArray x("TROlltECH");
+QByteArray y = x.toLower();
+// y == "trolltech"
+//! [30]
+
+
+//! [31]
+QByteArray x("TROlltECH");
+QByteArray y = x.toUpper();
+// y == "TROLLTECH"
+//! [31]
+
+
+//! [32]
+QByteArray ba(" lots\t of\nwhitespace\r\n ");
+ba = ba.simplified();
+// ba == "lots of whitespace";
+//! [32]
+
+
+//! [33]
+QByteArray ba(" lots\t of\nwhitespace\r\n ");
+ba = ba.trimmed();
+// ba == "lots\t of\nwhitespace";
+//! [33]
+
+
+//! [34]
+QByteArray x("apple");
+QByteArray y = x.leftJustified(8, '.'); // y == "apple..."
+//! [34]
+
+
+//! [35]
+QByteArray x("apple");
+QByteArray y = x.rightJustified(8, '.'); // y == "...apple"
+//! [35]
+
+
+//! [36]
+QByteArray str("FF");
+bool ok;
+int hex = str.toInt(&ok, 16); // hex == 255, ok == true
+int dec = str.toInt(&ok, 10); // dec == 0, ok == false
+//! [36]
+
+
+//! [37]
+QByteArray str("FF");
+bool ok;
+long hex = str.toLong(&ok, 16); // hex == 255, ok == true
+long dec = str.toLong(&ok, 10); // dec == 0, ok == false
+//! [37]
+
+
+//! [38]
+QByteArray string("1234.56");
+double a = string.toDouble(); // a == 1234.56
+//! [38]
+
+
+//! [39]
+QByteArray text("Qt is great!");
+text.toBase64(); // returns "UXQgaXMgZ3JlYXQh"
+//! [39]
+
+
+//! [40]
+QByteArray ba;
+int n = 63;
+ba.setNum(n); // ba == "63"
+ba.setNum(n, 16); // ba == "3f"
+//! [40]
+
+
+//! [41]
+int n = 63;
+QByteArray::number(n); // returns "63"
+QByteArray::number(n, 16); // returns "3f"
+QByteArray::number(n, 16).toUpper(); // returns "3F"
+//! [41]
+
+
+//! [42]
+QByteArray ba = QByteArray::number(12.3456, 'E', 3);
+// ba == 1.235E+01
+//! [42]
+
+
+//! [43]
+ static const char mydata[] = {
+ 0x00, 0x00, 0x03, 0x84, 0x78, 0x9c, 0x3b, 0x76,
+ 0xec, 0x18, 0xc3, 0x31, 0x0a, 0xf1, 0xcc, 0x99,
+ ...
+ 0x6d, 0x5b
+};
+
+QByteArray data = QByteArray::fromRawData(mydata, sizeof(mydata));
+QDataStream in(&data, QIODevice::ReadOnly);
+...
+//! [43]
+
+
+//! [44]
+QByteArray text = QByteArray::fromBase64("UXQgaXMgZ3JlYXQh");
+text.data(); // returns "Qt is great!"
+//! [44]
+
+
+//! [45]
+QByteArray text = QByteArray::fromHex("517420697320677265617421");
+text.data(); // returns "Qt is great!"
+//! [45]
+
+}
+
diff --git a/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
new file mode 100644
index 0000000..a1424f4
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
@@ -0,0 +1,106 @@
+//! [0]
+QDate d1(1995, 5, 17); // May 17, 1995
+QDate d2(1995, 5, 20); // May 20, 1995
+d1.daysTo(d2); // returns 3
+d2.daysTo(d1); // returns -3
+//! [0]
+
+
+//! [1]
+QDate date = QDate::fromString("1MM12car2003", "d'MM'MMcaryyyy");
+// date is 1 December 2003
+//! [1]
+
+
+//! [2]
+QDate date = QDate::fromString("130", "Md"); // invalid
+//! [2]
+
+
+//! [3]
+QDate::fromString("1.30", "M.d"); // January 30 1900
+QDate::fromString("20000110", "yyyyMMdd"); // January 10, 2000
+QDate::fromString("20000110", "yyyyMd"); // January 10, 2000
+//! [3]
+
+
+//! [4]
+QDate::isValid(2002, 5, 17); // true
+QDate::isValid(2002, 2, 30); // false (Feb 30 does not exist)
+QDate::isValid(2004, 2, 29); // true (2004 is a leap year)
+QDate::isValid(2000, 2, 29); // true (2000 is a leap year)
+QDate::isValid(2006, 2, 29); // false (2006 is not a leap year)
+QDate::isValid(2100, 2, 29); // false (2100 is not a leap year)
+QDate::isValid(1202, 6, 6); // true (even though 1202 is pre-Gregorian)
+//! [4]
+
+
+//! [5]
+QTime n(14, 0, 0); // n == 14:00:00
+QTime t;
+t = n.addSecs(70); // t == 14:01:10
+t = n.addSecs(-70); // t == 13:58:50
+t = n.addSecs(10 * 60 * 60 + 5); // t == 00:00:05
+t = n.addSecs(-15 * 60 * 60); // t == 23:00:00
+//! [5]
+
+
+//! [6]
+QTime time = QTime::fromString("1mm12car00", "m'mm'hcarss");
+// time is 12:01.00
+//! [6]
+
+
+//! [7]
+QTime time = QTime::fromString("00:710", "hh:ms"); // invalid
+//! [7]
+
+
+//! [8]
+QTime time = QTime::fromString("1.30", "m.s");
+// time is 00:01:30.000
+//! [8]
+
+
+//! [9]
+QTime::isValid(21, 10, 30); // returns true
+QTime::isValid(22, 5, 62); // returns false
+//! [9]
+
+
+//! [10]
+QTime t;
+t.start();
+some_lengthy_task();
+qDebug("Time elapsed: %d ms", t.elapsed());
+//! [10]
+
+
+//! [11]
+QDateTime now = QDateTime::currentDateTime();
+QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0));
+qDebug("There are %d seconds to Christmas", now.secsTo(xmas));
+//! [11]
+
+
+//! [12]
+QTime time1 = QTime::fromString("131", "HHh");
+// time1 is 13:00:00
+QTime time1 = QTime::fromString("1apA", "1amAM");
+// time1 is 01:00:00
+
+QDateTime dateTime2 = QDateTime::fromString("M1d1y9800:01:02",
+ "'M'M'd'd'y'yyhh:mm:ss");
+// dateTime is 1 January 1998 00:01:02
+//! [12]
+
+
+//! [13]
+QDateTime dateTime = QDateTime::fromString("130", "Mm"); // invalid
+//! [13]
+
+
+//! [14]
+QDateTime dateTime = QDateTime::fromString("1.30.1", "M.d.s");
+// dateTime is January 30 in 1900 at 00:00:01.
+//! [14]
diff --git a/doc/src/snippets/code/src_corelib_tools_qhash.cpp b/doc/src/snippets/code/src_corelib_tools_qhash.cpp
new file mode 100644
index 0000000..05f6eb3
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qhash.cpp
@@ -0,0 +1,259 @@
+//! [0]
+QHash<QString, int> hash;
+//! [0]
+
+
+//! [1]
+hash["one"] = 1;
+hash["three"] = 3;
+hash["seven"] = 7;
+//! [1]
+
+
+//! [2]
+hash.insert("twelve", 12);
+//! [2]
+
+
+//! [3]
+int num1 = hash["thirteen"];
+int num2 = hash.value("thirteen");
+//! [3]
+
+
+//! [4]
+int timeout = 30;
+if (hash.contains("TIMEOUT"))
+ timeout = hash.value("TIMEOUT");
+//! [4]
+
+
+//! [5]
+int timeout = hash.value("TIMEOUT", 30);
+//! [5]
+
+
+//! [6]
+// WRONG
+QHash<int, QWidget *> hash;
+...
+for (int i = 0; i < 1000; ++i) {
+ if (hash[i] == okButton)
+ cout << "Found button at index " << i << endl;
+}
+//! [6]
+
+
+//! [7]
+QHashIterator<QString, int> i(hash);
+while (i.hasNext()) {
+ i.next();
+ cout << i.key() << ": " << i.value() << endl;
+}
+//! [7]
+
+
+//! [8]
+QHash<QString, int>::const_iterator i = hash.constBegin();
+while (i != hash.constEnd()) {
+ cout << i.key() << ": " << i.value() << endl;
+ ++i;
+}
+//! [8]
+
+
+//! [9]
+hash.insert("plenty", 100);
+hash.insert("plenty", 2000);
+// hash.value("plenty") == 2000
+//! [9]
+
+
+//! [10]
+QList<int> values = hash.values("plenty");
+for (int i = 0; i < values.size(); ++i)
+ cout << values.at(i) << endl;
+//! [10]
+
+
+//! [11]
+QHash<QString, int>::iterator i = hash.find("plenty");
+while (i != hash.end() && i.key() == "plenty") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [11]
+
+
+//! [12]
+QHash<QString, int> hash;
+...
+foreach (int value, hash)
+ cout << value << endl;
+//! [12]
+
+
+//! [13]
+#ifndef EMPLOYEE_H
+#define EMPLOYEE_H
+
+class Employee
+{
+public:
+ Employee() {}
+ Employee(const QString &name, const QDate &dateOfBirth);
+ ...
+
+private:
+ QString myName;
+ QDate myDateOfBirth;
+};
+
+inline bool operator==(const Employee &e1, const Employee &e2)
+{
+ return e1.name() == e2.name()
+ && e1.dateOfBirth() == e2.dateOfBirth();
+}
+
+inline uint qHash(const Employee &key)
+{
+ return qHash(key.name()) ^ key.dateOfBirth().day();
+}
+
+#endif // EMPLOYEE_H
+//! [13]
+
+
+//! [14]
+QHash<QString, int> hash;
+hash.reserve(20000);
+for (int i = 0; i < 20000; ++i)
+ hash.insert(keys[i], values[i]);
+//! [14]
+
+
+//! [15]
+QHash<QObject *, int> objectHash;
+...
+QHash<QObject *, int>::iterator i = objectHash.find(obj);
+while (i != objectHash.end() && i.key() == obj) {
+ if (i.value() == 0) {
+ i = objectHash.erase(i);
+ } else {
+ ++i;
+ }
+}
+//! [15]
+
+
+//! [16]
+QHash<QString, int> hash;
+...
+QHash<QString, int>::const_iterator i = hash.find("HDR");
+while (i != hash.end() && i.key() == "HDR") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [16]
+
+
+//! [17]
+QHash<QString, int> hash;
+hash.insert("January", 1);
+hash.insert("February", 2);
+...
+hash.insert("December", 12);
+
+QHash<QString, int>::iterator i;
+for (i = hash.begin(); i != hash.end(); ++i)
+ cout << i.key() << ": " << i.value() << endl;
+//! [17]
+
+
+//! [18]
+QHash<QString, int>::iterator i;
+for (i = hash.begin(); i != hash.end(); ++i)
+ i.value() += 2;
+//! [18]
+
+
+//! [19]
+QHash<QString, int>::iterator i = hash.begin();
+while (i != hash.end()) {
+ if (i.key().startsWith("_"))
+ i = hash.erase(i);
+ else
+ ++i;
+}
+//! [19]
+
+
+//! [20]
+QHash<QString, int>::iterator i = hash.begin();
+while (i != hash.end()) {
+ QHash<QString, int>::iterator prev = i;
+ ++i;
+ if (prev.key().startsWith("_"))
+ hash.erase(prev);
+}
+//! [20]
+
+
+//! [21]
+// WRONG
+while (i != hash.end()) {
+ if (i.key().startsWith("_"))
+ hash.erase(i);
+ ++i;
+}
+//! [21]
+
+
+//! [22]
+if (i.key() == "Hello")
+ i.value() = "Bonjour";
+//! [22]
+
+
+//! [23]
+QHash<QString, int> hash;
+hash.insert("January", 1);
+hash.insert("February", 2);
+...
+hash.insert("December", 12);
+
+QHash<QString, int>::const_iterator i;
+for (i = hash.constBegin(); i != hash.constEnd(); ++i)
+ cout << i.key() << ": " << i.value() << endl;
+//! [23]
+
+
+//! [24]
+QMultiHash<QString, int> hash1, hash2, hash3;
+
+hash1.insert("plenty", 100);
+hash1.insert("plenty", 2000);
+// hash1.size() == 2
+
+hash2.insert("plenty", 5000);
+// hash2.size() == 1
+
+hash3 = hash1 + hash2;
+// hash3.size() == 3
+//! [24]
+
+
+//! [25]
+QList<int> values = hash.values("plenty");
+for (int i = 0; i < values.size(); ++i)
+ cout << values.at(i) << endl;
+//! [25]
+
+
+//! [26]
+QMultiHash<QString, int>::iterator i = hash.find("plenty");
+while (i != hash.end() && i.key() == "plenty") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [26]
diff --git a/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
new file mode 100644
index 0000000..3d63b2c
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
@@ -0,0 +1,164 @@
+//! [0]
+QLinkedList<int> integerList;
+QLinkedList<QTime> timeList;
+//! [0]
+
+
+//! [1]
+QLinkedList<QString> list;
+list << "one" << "two" << "three";
+// list: ["one", "two", "three"]
+//! [1]
+
+
+//! [2]
+QLinkedList<QWidget *> list;
+...
+while (!list.isEmpty())
+ delete list.takeFirst();
+//! [2]
+
+
+//! [3]
+QLinkedList<QString> list;
+list.append("one");
+list.append("two");
+list.append("three");
+// list: ["one", "two", "three"]
+//! [3]
+
+
+//! [4]
+QLinkedList<QString> list;
+list.prepend("one");
+list.prepend("two");
+list.prepend("three");
+// list: ["three", "two", "one"]
+//! [4]
+
+
+//! [5]
+QList<QString> list;
+list << "sun" << "cloud" << "sun" << "rain";
+list.removeAll("sun");
+// list: ["cloud", "rain"]
+//! [5]
+
+
+//! [6]
+QList<QString> list;
+list << "sun" << "cloud" << "sun" << "rain";
+list.removeOne("sun");
+// list: ["cloud", "sun", "rain"]
+//! [6]
+
+
+//! [7]
+QLinkedList<QString> list;
+list.append("January");
+list.append("February");
+...
+list.append("December");
+
+QLinkedList<QString>::iterator i;
+for (i = list.begin(); i != list.end(); ++i)
+ cout << *i << endl;
+//! [7]
+
+
+//! [8]
+QLinkedList<QString> list;
+...
+QLinkedList<QString>::iterator it = qFind(list.begin(),
+ list.end(), "Joel");
+if (it != list.end())
+ cout << "Found Joel" << endl;
+//! [8]
+
+
+//! [9]
+QLinkedList<int>::iterator i;
+for (i = list.begin(); i != list.end(); ++i)
+ *i += 2;
+//! [9]
+
+
+//! [10]
+QLinkedList<QString> list;
+...
+QLinkedList<QString>::iterator i = list.begin();
+while (i != list.end()) {
+ if ((*i).startsWith("_"))
+ i = list.erase(i);
+ else
+ ++i;
+}
+//! [10]
+
+
+//! [11]
+QLinkedList<QString>::iterator i = list.begin();
+while (i != list.end()) {
+ QLinkedList<QString>::iterator previous = i;
+ ++i;
+ if ((*previous).startsWith("_"))
+ list.erase(previous);
+}
+//! [11]
+
+
+//! [12]
+// WRONG
+while (i != list.end()) {
+ if ((*i).startsWith("_"))
+ list.erase(i);
+ ++i;
+}
+//! [12]
+
+
+//! [13]
+if (*it == "Hello")
+ *it = "Bonjour";
+//! [13]
+
+
+//! [14]
+QLinkedList<QString> list;
+list.append("January");
+list.append("February");
+...
+list.append("December");
+
+QLinkedList<QString>::const_iterator i;
+for (i = list.constBegin(); i != list.constEnd(); ++i)
+ cout << *i << endl;
+//! [14]
+
+
+//! [15]
+QLinkedList<QString> list;
+...
+QLinkedList<QString>::iterator it = qFind(list.constBegin(),
+ list.constEnd(), "Joel");
+if (it != list.constEnd())
+ cout << "Found Joel" << endl;
+//! [15]
+
+
+//! [16]
+std::list<double> stdlist;
+list.push_back(1.2);
+list.push_back(0.5);
+list.push_back(3.14);
+
+QLinkedList<double> list = QLinkedList<double>::fromStdList(stdlist);
+//! [16]
+
+
+//! [17]
+QLinkedList<double> list;
+list << 1.2 << 0.5 << 3.14;
+
+std::list<double> stdlist = list.toStdList();
+//! [17]
diff --git a/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
new file mode 100644
index 0000000..7d75e1b
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
@@ -0,0 +1,227 @@
+//! [0]
+QList<int> integerList;
+QList<QDate> dateList;
+//! [0]
+
+
+//! [1]
+QList<QString> list;
+list << "one" << "two" << "three";
+// list: ["one", "two", "three"]
+//! [1]
+
+
+//! [2]
+if (list[0] == "Bob")
+ list[0] = "Robert";
+//! [2]
+
+
+//! [3]
+for (int i = 0; i < list.size(); ++i) {
+ if (list.at(i) == "Jane")
+ cout << "Found Jane at position " << i << endl;
+}
+//! [3]
+
+
+//! [4]
+QList<QWidget *> list;
+...
+while (!list.isEmpty())
+ delete list.takeFirst();
+//! [4]
+
+
+//! [5]
+int i = list.indexOf("Jane");
+if (i != -1)
+ cout << "First occurrence of Jane is at position " << i << endl;
+//! [5]
+
+
+//! [6]
+QList<QString> list;
+list.append("one");
+list.append("two");
+list.append("three");
+// list: ["one", "two", "three"]
+//! [6]
+
+
+//! [7]
+QList<QString> list;
+list.prepend("one");
+list.prepend("two");
+list.prepend("three");
+// list: ["three", "two", "one"]
+//! [7]
+
+
+//! [8]
+QList<QString> list;
+list << "alpha" << "beta" << "delta";
+list.insert(2, "gamma");
+// list: ["alpha", "beta", "gamma", "delta"]
+//! [8]
+
+
+//! [9]
+QList<QString> list;
+list << "sun" << "cloud" << "sun" << "rain";
+list.removeAll("sun");
+// list: ["cloud", "rain"]
+//! [9]
+
+
+//! [10]
+QList<QString> list;
+list << "sun" << "cloud" << "sun" << "rain";
+list.removeOne("sun");
+// list: ["cloud", ,"sun", "rain"]
+//! [10]
+
+
+//! [11]
+QList<QString> list;
+list << "A" << "B" << "C" << "D" << "E" << "F";
+list.move(1, 4);
+// list: ["A", "C", "D", "E", "B", "F"]
+//! [11]
+
+
+//! [12]
+QList<QString> list;
+list << "A" << "B" << "C" << "D" << "E" << "F";
+list.swap(1, 4);
+// list: ["A", "E", "C", "D", "B", "F"]
+//! [12]
+
+
+//! [13]
+QList<QString> list;
+list << "A" << "B" << "C" << "B" << "A";
+list.indexOf("B"); // returns 1
+list.indexOf("B", 1); // returns 1
+list.indexOf("B", 2); // returns 3
+list.indexOf("X"); // returns -1
+//! [13]
+
+
+//! [14]
+QList<QString> list;
+list << "A" << "B" << "C" << "B" << "A";
+list.lastIndexOf("B"); // returns 3
+list.lastIndexOf("B", 3); // returns 3
+list.lastIndexOf("B", 2); // returns 1
+list.lastIndexOf("X"); // returns -1
+//! [14]
+
+
+//! [15]
+QList<QString> list;
+list.append("January");
+list.append("February");
+...
+list.append("December");
+
+QList<QString>::iterator i;
+for (i = list.begin(); i != list.end(); ++i)
+ cout << *i << endl;
+//! [15]
+
+
+//! [16]
+QList<int>::iterator i;
+for (i = list.begin(); i != list.end(); ++i)
+ *i += 2;
+//! [16]
+
+
+//! [17]
+QList<QWidget *> list;
+...
+qDeleteAll(list.begin(), list.end());
+//! [17]
+
+
+//! [18]
+if (*it == "Hello")
+ *it = "Bonjour";
+//! [18]
+
+
+//! [19]
+QList<QString> list;
+list.append("January");
+list.append("February");
+...
+list.append("December");
+
+QList<QString>::const_iterator i;
+for (i = list.constBegin(); i != list.constEnd(); ++i)
+ cout << *i << endl;
+//! [19]
+
+
+//! [20]
+QList<QWidget *> list;
+...
+qDeleteAll(list.constBegin(), list.constEnd());
+//! [20]
+
+
+//! [21]
+QVector<double> vect;
+vect << 20.0 << 30.0 << 40.0 << 50.0;
+
+QList<double> list = QVector<T>::fromVector(vect);
+// list: [20.0, 30.0, 40.0, 50.0]
+//! [21]
+
+
+//! [22]
+QStringList list;
+list << "Sven" << "Kim" << "Ola";
+
+QVector<QString> vect = list.toVector();
+// vect: ["Sven", "Kim", "Ola"]
+//! [22]
+
+
+//! [23]
+QSet<double> set;
+set << 20.0 << 30.0 << 40.0 << ... << 70.0;
+
+QList<double> list = QList<double>::fromSet(set);
+qSort(list);
+//! [23]
+
+
+//! [24]
+QStringList list;
+list << "Julia" << "Mike" << "Mike" << "Julia" << "Julia";
+
+QSet<QString> set = list.toSet();
+set.contains("Julia"); // returns true
+set.contains("Mike"); // returns true
+set.size(); // returns 2
+//! [24]
+
+
+//! [25]
+std::list<double> stdlist;
+list.push_back(1.2);
+list.push_back(0.5);
+list.push_back(3.14);
+
+QList<double> list = QList<double>::fromStdList(stdlist);
+//! [25]
+
+
+//! [26]
+QList<double> list;
+list << 1.2 << 0.5 << 3.14;
+
+std::list<double> stdlist = list.toStdList();
+//! [26]
diff --git a/doc/src/snippets/code/src_corelib_tools_qlocale.cpp b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
new file mode 100644
index 0000000..37ddb4e
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
@@ -0,0 +1,55 @@
+//! [0]
+QLocale egyptian(QLocale::Arabic, QLocale::Egypt);
+QString s1 = egyptian.toString(1.571429E+07, 'e');
+QString s2 = egyptian.toString(10);
+
+double d = egyptian.toDouble(s1);
+int i = egyptian.toInt(s2);
+//! [0]
+
+
+//! [1]
+QLocale::setDefault(QLocale(QLocale::Hebrew, QLocale::Israel));
+QLocale hebrew; // Constructs a default QLocale
+QString s1 = hebrew.toString(15714.3, 'e');
+
+bool ok;
+double d;
+
+QLocale::setDefault(QLocale::C);
+d = QString("1234,56").toDouble(&ok); // ok == false
+d = QString("1234.56").toDouble(&ok); // ok == true, d == 1234.56
+
+QLocale::setDefault(QLocale::German);
+d = QString("1234,56").toDouble(&ok); // ok == true, d == 1234.56
+d = QString("1234.56").toDouble(&ok); // ok == true, d == 1234.56
+
+QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
+str = QString("%1 %L2 %L3")
+ .arg(12345).arg(12345).arg(12345, 0, 16);
+// str == "12345 12,345 3039"
+//! [1]
+
+
+//! [2]
+QLocale korean("ko");
+QLocale swiss("de_CH");
+//! [2]
+
+
+//! [3]
+bool ok;
+double d;
+
+QLocale c(QLocale::C);
+d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56
+d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
+d = c.toDouble( "1234,56", &ok ); // ok == false
+
+QLocale german(QLocale::German);
+d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56
+d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
+d = german.toDouble( "1234.56", &ok ); // ok == false
+
+d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0
+//! [3]
diff --git a/doc/src/snippets/code/src_corelib_tools_qmap.cpp b/doc/src/snippets/code/src_corelib_tools_qmap.cpp
new file mode 100644
index 0000000..924ed22
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qmap.cpp
@@ -0,0 +1,273 @@
+//! [0]
+QMap<QString, int> map;
+//! [0]
+
+
+//! [1]
+map["one"] = 1;
+map["three"] = 3;
+map["seven"] = 7;
+//! [1]
+
+
+//! [2]
+map.insert("twelve", 12);
+//! [2]
+
+
+//! [3]
+int num1 = map["thirteen"];
+int num2 = map.value("thirteen");
+//! [3]
+
+
+//! [4]
+int timeout = 30;
+if (map.contains("TIMEOUT"))
+ timeout = map.value("TIMEOUT");
+//! [4]
+
+
+//! [5]
+int timeout = map.value("TIMEOUT", 30);
+//! [5]
+
+
+//! [6]
+// WRONG
+QMap<int, QWidget *> map;
+...
+for (int i = 0; i < 1000; ++i) {
+ if (map[i] == okButton)
+ cout << "Found button at index " << i << endl;
+}
+//! [6]
+
+
+//! [7]
+QMapIterator<QString, int> i(map);
+while (i.hasNext()) {
+ i.next();
+ cout << i.key() << ": " << i.value() << endl;
+}
+//! [7]
+
+
+//! [8]
+QMap<QString, int>::const_iterator i = map.constBegin();
+while (i != map.constEnd()) {
+ cout << i.key() << ": " << i.value() << endl;
+ ++i;
+}
+//! [8]
+
+
+//! [9]
+map.insert("plenty", 100);
+map.insert("plenty", 2000);
+// map.value("plenty") == 2000
+//! [9]
+
+
+//! [10]
+QList<int> values = map.values("plenty");
+for (int i = 0; i < values.size(); ++i)
+ cout << values.at(i) << endl;
+//! [10]
+
+
+//! [11]
+QMap<QString, int>::iterator i = map.find("plenty");
+while (i != map.end() && i.key() == "plenty") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [11]
+
+
+//! [12]
+QMap<QString, int> map;
+...
+foreach (int value, map)
+ cout << value << endl;
+//! [12]
+
+
+//! [13]
+#ifndef EMPLOYEE_H
+#define EMPLOYEE_H
+
+class Employee
+{
+public:
+ Employee() {}
+ Employee(const QString &name, const QDate &dateOfBirth);
+ ...
+
+private:
+ QString myName;
+ QDate myDateOfBirth;
+};
+
+inline bool operator<(const Employee &e1, const Employee &e2)
+{
+ if (e1.name() != e2.name())
+ return e1.name() < e2.name();
+ return e1.dateOfBirth() < e2.dateOfBirth();
+}
+
+#endif // EMPLOYEE_H
+//! [13]
+
+
+//! [14]
+QMap<QString, int> map;
+...
+QMap<QString, int>::const_iterator i = map.find("HDR");
+while (i != map.end() && i.key() == "HDR") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [14]
+
+
+//! [15]
+QMap<int, QString> map;
+map.insert(1, "one");
+map.insert(5, "five");
+map.insert(10, "ten");
+
+map.lowerBound(0); // returns iterator to (1, "one")
+map.lowerBound(1); // returns iterator to (1, "one")
+map.lowerBound(2); // returns iterator to (5, "five")
+map.lowerBound(10); // returns iterator to (10, "ten")
+map.lowerBound(999); // returns end()
+//! [15]
+
+
+//! [16]
+QMap<QString, int> map;
+...
+QMap<QString, int>::const_iterator i = map.lowerBound("HDR");
+QMap<QString, int>::const_iterator upperBound = map.upperBound("HDR");
+while (i != upperBound) {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [16]
+
+
+//! [17]
+QMap<int, QString> map;
+map.insert(1, "one");
+map.insert(5, "five");
+map.insert(10, "ten");
+
+map.upperBound(0); // returns iterator to (1, "one")
+map.upperBound(1); // returns iterator to (5, "five")
+map.upperBound(2); // returns iterator to (5, "five")
+map.upperBound(10); // returns end()
+map.upperBound(999); // returns end()
+//! [17]
+
+
+//! [18]
+QMap<QString, int> map;
+map.insert("January", 1);
+map.insert("February", 2);
+...
+map.insert("December", 12);
+
+QMap<QString, int>::iterator i;
+for (i = map.begin(); i != map.end(); ++i)
+ cout << i.key() << ": " << i.value() << endl;
+//! [18]
+
+
+//! [19]
+QMap<QString, int>::iterator i;
+for (i = map.begin(); i != map.end(); ++i)
+ i.value() += 2;
+//! [19]
+
+
+//! [20]
+QMap<QString, int>::iterator i = map.begin();
+while (i != map.end()) {
+ if (i.key().startsWith("_"))
+ i = map.erase(i);
+ else
+ ++i;
+}
+//! [20]
+
+
+//! [21]
+QMap<QString, int>::iterator i = map.begin();
+while (i != map.end()) {
+ QMap<QString, int>::iterator prev = i;
+ ++i;
+ if (prev.key().startsWith("_"))
+ map.erase(prev);
+}
+//! [21]
+
+
+//! [22]
+// WRONG
+while (i != map.end()) {
+ if (i.key().startsWith("_"))
+ map.erase(i);
+ ++i;
+}
+//! [22]
+
+
+//! [23]
+if (i.key() == "Hello")
+ i.value() = "Bonjour";
+//! [23]
+
+
+//! [24]
+QMap<QString, int> map;
+map.insert("January", 1);
+map.insert("February", 2);
+...
+map.insert("December", 12);
+
+QMap<QString, int>::const_iterator i;
+for (i = map.constBegin(); i != map.constEnd(); ++i)
+ cout << i.key() << ": " << i.value() << endl;
+//! [24]
+
+
+//! [25]
+QMultiMap<QString, int> map1, map2, map3;
+
+map1.insert("plenty", 100);
+map1.insert("plenty", 2000);
+// map1.size() == 2
+
+map2.insert("plenty", 5000);
+// map2.size() == 1
+
+map3 = map1 + map2;
+// map3.size() == 3
+//! [25]
+
+
+//! [26]
+QList<int> values = map.values("plenty");
+for (int i = 0; i < values.size(); ++i)
+ cout << values.at(i) << endl;
+//! [26]
+
+
+//! [27]
+QMultiMap<QString, int>::iterator i = map.find("plenty");
+while (i != map.end() && i.key() == "plenty") {
+ cout << i.value() << endl;
+ ++i;
+}
+//! [27]
diff --git a/doc/src/snippets/code/src_corelib_tools_qpoint.cpp b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
new file mode 100644
index 0000000..f16d856
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
@@ -0,0 +1,109 @@
+//! [0]
+QPoint p;
+
+p.setX(p.x() + 1);
+p += QPoint(1, 0);
+p.rx()++;
+//! [0]
+
+
+//! [1]
+QPoint p(1, 2);
+p.rx()--; // p becomes (0, 2)
+//! [1]
+
+
+//! [2]
+QPoint p(1, 2);
+p.ry()++; // p becomes (1, 3)
+//! [2]
+
+
+//! [3]
+QPoint p( 3, 7);
+QPoint q(-1, 4);
+p += q; // p becomes (2, 11)
+//! [3]
+
+
+//! [4]
+QPoint p( 3, 7);
+QPoint q(-1, 4);
+p -= q; // p becomes (4, 3)
+//! [4]
+
+
+//! [5]
+QPoint p(-1, 4);
+p *= 2.5; // p becomes (-3, 10)
+//! [5]
+
+
+//! [6]
+QPoint p(-3, 10);
+p /= 2.5; // p becomes (-1, 4)
+//! [6]
+
+
+//! [7]
+QPoint oldPosition;
+
+MyWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ QPoint point = event->pos() - oldPosition;
+ if (point.manhattanLength() > 3)
+ // the mouse has moved more than 3 pixels since the oldPosition
+}
+//! [7]
+
+
+//! [8]
+double trueLength = sqrt(pow(x(), 2) + pow(y(), 2));
+//! [8]
+
+
+//! [9]
+QPointF p;
+
+p.setX(p.x() + 1.0);
+p += QPointF(1.0, 0.0);
+p.rx()++;
+//! [9]
+
+
+//! [10]
+ QPointF p(1.1, 2.5);
+ p.rx()--; // p becomes (0.1, 2.5)
+//! [10]
+
+
+//! [11]
+QPointF p(1.1, 2.5);
+p.ry()++; // p becomes (1.1, 3.5)
+//! [11]
+
+
+//! [12]
+QPointF p( 3.1, 7.1);
+QPointF q(-1.0, 4.1);
+p += q; // p becomes (2.1, 11.2)
+//! [12]
+
+
+//! [13]
+QPointF p( 3.1, 7.1);
+QPointF q(-1.0, 4.1);
+p -= q; // p becomes (4.1, 3.0)
+//! [13]
+
+
+//! [14]
+QPointF p(-1.1, 4.1);
+p *= 2.5; // p becomes (-2.75, 10.25)
+//! [14]
+
+
+//! [15]
+QPointF p(-2.75, 10.25);
+p /= 2.5; // p becomes (-1.1, 4.1)
+//! [15]
diff --git a/doc/src/snippets/code/src_corelib_tools_qqueue.cpp b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
new file mode 100644
index 0000000..da4c4a6
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QQueue<int> queue;
+queue.enqueue(1);
+queue.enqueue(2);
+queue.enqueue(3);
+while (!queue.isEmpty())
+ cout << queue.dequeue() << endl;
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_tools_qrect.cpp b/doc/src/snippets/code/src_corelib_tools_qrect.cpp
new file mode 100644
index 0000000..fdab506
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qrect.cpp
@@ -0,0 +1,10 @@
+//! [0]
+QRect r1(100, 200, 11, 16);
+QRect r2(QPoint(100, 200), QSize(11, 16));
+//! [0]
+
+
+//! [1]
+QRectF r1(100, 200, 11, 16);
+QRectF r2(QPoint(100, 200), QSize(11, 16));
+//! [1]
diff --git a/doc/src/snippets/code/src_corelib_tools_qregexp.cpp b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
new file mode 100644
index 0000000..ae25885
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
@@ -0,0 +1,184 @@
+//! [0]
+QRegExp rx("(\\d+)");
+QString str = "Offsets: 12 14 99 231 7";
+QStringList list;
+int pos = 0;
+
+while ((pos = rx.indexIn(str, pos)) != -1) {
+ list << rx.cap(1);
+ pos += rx.matchedLength();
+}
+// list: ["12", "14", "99", "231", "7"]
+//! [0]
+
+
+//! [1]
+QRegExp rx("*.txt");
+rx.setPatternSyntax(QRegExp::Wildcard);
+rx.exactMatch("README.txt"); // returns true
+rx.exactMatch("welcome.txt.bak"); // returns false
+//! [1]
+
+
+//! [2]
+QRegExp rx("ro+m");
+rx.setMinimal(true);
+//! [2]
+
+
+//! [3]
+QRegExp mark("\\b" // word boundary
+ "[Mm]ark" // the word we want to match
+ );
+//! [3]
+
+
+//! [4]
+QRegExp rx("^\\d\\d?$"); // match integers 0 to 99
+rx.indexIn("123"); // returns -1 (no match)
+rx.indexIn("-6"); // returns -1 (no match)
+rx.indexIn("6"); // returns 0 (matched as position 0)
+//! [4]
+
+
+//! [5]
+QRegExp rx("^\\S+$"); // match strings without whitespace
+rx.indexIn("Hello world"); // returns -1 (no match)
+rx.indexIn("This_is-OK"); // returns 0 (matched at position 0)
+//! [5]
+
+
+//! [6]
+QRegExp rx("\\b(mail|letter|correspondence)\\b");
+rx.indexIn("I sent you an email"); // returns -1 (no match)
+rx.indexIn("Please write the letter"); // returns 17
+//! [6]
+
+
+//! [7]
+QString captured = rx.cap(1); // captured == "letter"
+//! [7]
+
+
+//! [8]
+QRegExp rx("&(?!amp;)"); // match ampersands but not &amp;
+QString line1 = "This & that";
+line1.replace(rx, "&amp;");
+// line1 == "This &amp; that"
+QString line2 = "His &amp; hers & theirs";
+line2.replace(rx, "&amp;");
+// line2 == "His &amp; hers &amp; theirs"
+//! [8]
+
+
+//! [9]
+QString str = "One Eric another Eirik, and an Ericsson. "
+ "How many Eiriks, Eric?";
+QRegExp rx("\\b(Eric|Eirik)\\b"); // match Eric or Eirik
+int pos = 0; // where we are in the string
+int count = 0; // how many Eric and Eirik's we've counted
+while (pos >= 0) {
+ pos = rx.indexIn(str, pos);
+ if (pos >= 0) {
+ ++pos; // move along in str
+ ++count; // count our Eric or Eirik
+ }
+}
+//! [9]
+
+
+//! [10]
+str = "Nokia Corporation and/or its subsidiary(-ies)\tqtsoftware.com\tNorway";
+QString company, web, country;
+rx.setPattern("^([^\t]+)\t([^\t]+)\t([^\t]+)$");
+if (rx.indexIn(str) != -1) {
+ company = rx.cap(1);
+ web = rx.cap(2);
+ country = rx.cap(3);
+}
+//! [10]
+
+
+//! [11]
+QStringList field = str.split("\t");
+//! [11]
+
+
+//! [12]
+QRegExp rx("*.html");
+rx.setPatternSyntax(QRegExp::Wildcard);
+rx.exactMatch("index.html"); // returns true
+rx.exactMatch("default.htm"); // returns false
+rx.exactMatch("readme.txt"); // returns false
+//! [12]
+
+
+//! [13]
+QString str = "offsets: 1.23 .50 71.00 6.00";
+QRegExp rx("\\d*\\.\\d+"); // primitive floating point matching
+int count = 0;
+int pos = 0;
+while ((pos = rx.indexIn(str, pos)) != -1) {
+ ++count;
+ pos += rx.matchedLength();
+}
+// pos will be 9, 14, 18 and finally 24; count will end up as 4
+//! [13]
+
+
+//! [14]
+QRegExp rx("(\\d+)(\\s*)(cm|inch(es)?)");
+int pos = rx.indexIn("Length: 36 inches");
+QStringList list = rx.capturedTexts();
+// list is now ("36 inches", "36", " ", "inches", "es")
+//! [14]
+
+
+//! [15]
+QRegExp rx("(\\d+)(?:\\s*)(cm|inch(?:es)?)");
+int pos = rx.indexIn("Length: 36 inches");
+QStringList list = rx.capturedTexts();
+// list is now ("36 inches", "36", "inches")
+//! [15]
+
+
+//! [16]
+QStringList list = rx.capturedTexts();
+QStringList::iterator it = list.begin();
+while (it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [16]
+
+
+//! [17]
+QRegExp rxlen("(\\d+)(?:\\s*)(cm|inch)");
+int pos = rxlen.indexIn("Length: 189cm");
+if (pos > -1) {
+ QString value = rxlen.cap(1); // "189"
+ QString unit = rxlen.cap(2); // "cm"
+ // ...
+}
+//! [17]
+
+
+//! [18]
+QRegExp rx("/([a-z]+)/([a-z]+)");
+rx.indexIn("Output /dev/null"); // returns 7 (position of /dev/null)
+rx.pos(0); // returns 7 (position of /dev/null)
+rx.pos(1); // returns 8 (position of dev)
+rx.pos(2); // returns 12 (position of null)
+//! [18]
+
+
+//! [19]
+s1 = QRegExp::escape("bingo"); // s1 == "bingo"
+s2 = QRegExp::escape("f(x)"); // s2 == "f\\(x\\)"
+//! [19]
+
+
+//! [20]
+QRegExp rx("(" + QRegExp::escape(name) +
+ "|" + QRegExp::escape(alias) + ")");
+//! [20]
diff --git a/doc/src/snippets/code/src_corelib_tools_qsize.cpp b/doc/src/snippets/code/src_corelib_tools_qsize.cpp
new file mode 100644
index 0000000..4804dd0
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qsize.cpp
@@ -0,0 +1,96 @@
+//! [0]
+QSize t1(10, 12);
+t1.scale(60, 60, Qt::IgnoreAspectRatio);
+// t1 is (60, 60)
+
+QSize t2(10, 12);
+t2.scale(60, 60, Qt::KeepAspectRatio);
+// t2 is (50, 60)
+
+QSize t3(10, 12);
+t3.scale(60, 60, Qt::KeepAspectRatioByExpanding);
+// t3 is (60, 72)
+//! [0]
+
+
+//! [1]
+QSize size(100, 10);
+size.rwidth() += 20;
+
+// size becomes (120,10)
+//! [1]
+
+
+//! [2]
+QSize size(100, 10);
+size.rheight() += 5;
+
+// size becomes (100,15)
+//! [2]
+
+
+//! [3]
+QSize s( 3, 7);
+QSize r(-1, 4);
+s += r;
+
+// s becomes (2,11)
+//! [3]
+
+
+//! [4]
+QSize s( 3, 7);
+QSize r(-1, 4);
+s -= r;
+
+// s becomes (4,3)
+//! [4]
+
+
+//! [5]
+QSizeF t1(10, 12);
+t1.scale(60, 60, Qt::IgnoreAspectRatio);
+// t1 is (60, 60)
+
+QSizeF t2(10, 12);
+t2.scale(60, 60, Qt::KeepAspectRatio);
+// t2 is (50, 60)
+
+QSizeF t3(10, 12);
+t3.scale(60, 60, Qt::KeepAspectRatioByExpanding);
+// t3 is (60, 72)
+//! [5]
+
+
+//! [6]
+QSizeF size(100.3, 10);
+size.rwidth() += 20.5;
+
+ // size becomes (120.8,10)
+//! [6]
+
+
+//! [7]
+QSizeF size(100, 10.2);
+size.rheight() += 5.5;
+
+// size becomes (100,15.7)
+//! [7]
+
+
+//! [8]
+QSizeF s( 3, 7);
+QSizeF r(-1, 4);
+s += r;
+
+// s becomes (2,11)
+//! [8]
+
+
+//! [9]
+QSizeF s( 3, 7);
+QSizeF r(-1, 4);
+s -= r;
+
+// s becomes (4,3)
+//! [9]
diff --git a/doc/src/snippets/code/src_corelib_tools_qstring.cpp b/doc/src/snippets/code/src_corelib_tools_qstring.cpp
new file mode 100644
index 0000000..13cdbd5
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qstring.cpp
@@ -0,0 +1,47 @@
+//! [0]
+DEFINES += QT_NO_CAST_FROM_ASCII \
+ QT_NO_CAST_TO_ASCII
+//! [0]
+
+
+//! [1]
+QString url = QLatin1String("http://www.unicode.org/");
+//! [1]
+
+
+//! [2]
+double d = 12.34;
+QString str = QString("delta: %1").arg(d, 0, 'E', 3);
+// str == "delta: 1.234E+01"
+//! [2]
+
+
+//! [3]
+if (str == "auto" || str == "extern"
+ || str == "static" || str == "register") {
+ ...
+}
+//! [3]
+
+
+//! [4]
+if (str == QString("auto") || str == QString("extern")
+ || str == QString("static") || str == QString("register")) {
+ ...
+}
+//! [4]
+
+
+//! [5]
+if (str == QLatin1String("auto")
+ || str == QLatin1String("extern")
+ || str == QLatin1String("static")
+ || str == QLatin1String("register") {
+ ...
+}
+//! [5]
+
+
+//! [6]
+QLabel *label = new QLabel(QLatin1String("MOD"), this);
+//! [6]
diff --git a/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
new file mode 100644
index 0000000..a16205f
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
@@ -0,0 +1,15 @@
+//! [0]
+...
+progressBar = new QProgressBar(this);
+progressBar->setRange(0, 100);
+
+// Construct a 1-second timeline with a frame range of 0 - 100
+QTimeLine *timeLine = new QTimeLine(1000, this);
+timeLine->setFrameRange(0, 100);
+connect(timeLine, SIGNAL(frameChanged(int)), progressBar, SLOT(setValue(int)));
+
+// Clicking the push button will start the progress bar animation
+pushButton = new QPushButton(tr("Start animation"), this);
+connect(pushButton, SIGNAL(clicked()), timeLine, SLOT(start()));
+...
+//! [0]
diff --git a/doc/src/snippets/code/src_corelib_tools_qvector.cpp b/doc/src/snippets/code/src_corelib_tools_qvector.cpp
new file mode 100644
index 0000000..bbe7ca2
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_tools_qvector.cpp
@@ -0,0 +1,143 @@
+//! [0]
+QVector<int> integerVector;
+QVector<QString> stringVector;
+//! [0]
+
+
+//! [1]
+QVector<QString> vector(200);
+//! [1]
+
+
+//! [2]
+QVector<QString> vector(200, "Pass");
+//! [2]
+
+
+//! [3]
+if (vector[0] == "Liz")
+ vector[0] = "Elizabeth";
+//! [3]
+
+
+//! [4]
+for (int i = 0; i < vector.size(); ++i) {
+ if (vector.at(i) == "Alfonso")
+ cout << "Found Alfonso at position " << i << endl;
+}
+//! [4]
+
+
+//! [5]
+int i = vector.indexOf("Harumi");
+if (i != -1)
+ cout << "First occurrence of Harumi is at position " << i << endl;
+//! [5]
+
+
+//! [6]
+QVector<int> vector(10);
+int *data = vector.data();
+for (int i = 0; i < 10; ++i)
+ data[i] = 2 * i;
+//! [6]
+
+
+//! [7]
+QVector<QString> vector(0);
+vector.append("one");
+vector.append("two");
+vector.append("three");
+// vector: ["one", "two", "three"]
+//! [7]
+
+
+//! [8]
+QVector<QString> vector;
+vector.prepend("one");
+vector.prepend("two");
+vector.prepend("three");
+// vector: ["three", "two", "one"]
+//! [8]
+
+
+//! [9]
+QVector<QString> vector;
+vector << "alpha" << "beta" << "delta";
+vector.insert(2, "gamma");
+// vector: ["alpha", "beta", "gamma", "delta"]
+//! [9]
+
+
+//! [10]
+QVector<double> vector;
+vector << 2.718 << 1.442 << 0.4342;
+vector.insert(1, 3, 9.9);
+// vector: [2.718, 9.9, 9.9, 9.9, 1.442, 0.4342]
+//! [10]
+
+
+//! [11]
+QVector<QString> vector(3);
+vector.fill("Yes");
+// vector: ["Yes", "Yes", "Yes"]
+
+vector.fill("oh", 5);
+// vector: ["oh", "oh", "oh", "oh", "oh"]
+//! [11]
+
+
+//! [12]
+QVector<QString> vector;
+vector << "A" << "B" << "C" << "B" << "A";
+vector.indexOf("B"); // returns 1
+vector.indexOf("B", 1); // returns 1
+vector.indexOf("B", 2); // returns 3
+vector.indexOf("X"); // returns -1
+//! [12]
+
+
+//! [13]
+QList<QString> vector;
+vector << "A" << "B" << "C" << "B" << "A";
+vector.lastIndexOf("B"); // returns 3
+vector.lastIndexOf("B", 3); // returns 3
+vector.lastIndexOf("B", 2); // returns 1
+vector.lastIndexOf("X"); // returns -1
+//! [13]
+
+
+//! [14]
+QVector<double> vect;
+vect << "red" << "green" << "blue" << "black";
+
+QList<double> list = vect.toList();
+// list: ["red", "green", "blue", "black"]
+//! [14]
+
+
+//! [15]
+QStringList list;
+list << "Sven" << "Kim" << "Ola";
+
+QVector<QString> vect = QVector<QString>::fromList(list);
+// vect: ["Sven", "Kim", "Ola"]
+//! [15]
+
+
+//! [16]
+std::vector<double> stdvector;
+vector.push_back(1.2);
+vector.push_back(0.5);
+vector.push_back(3.14);
+
+QVector<double> vector = QVector<double>::fromStdVector(stdvector);
+//! [16]
+
+
+//! [17]
+QVector<double> vector;
+vector << 1.2 << 0.5 << 3.14;
+
+std::vector<double> stdvector = vector.toStdVector();
+//! [17]
diff --git a/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
new file mode 100644
index 0000000..b445a61
--- /dev/null
+++ b/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
@@ -0,0 +1,27 @@
+//! [0]
+ QXmlStreamReader xml;
+ ...
+ while (!xml.atEnd()) {
+ xml.readNext();
+ ... // do processing
+ }
+ if (xml.hasError()) {
+ ... // do error handling
+ }
+//! [0]
+
+
+//! [1]
+ writeStartElement(qualifiedName);
+ writeCharacters(text);
+ writeEndElement();
+//! [1]
+
+
+//! [2]
+ writeStartElement(namespaceUri, name);
+ writeCharacters(text);
+ writeEndElement();
+//! [2]
+
+
diff --git a/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
new file mode 100644
index 0000000..69ebeb2
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QAccessibleInterface *child = 0;
+int targetChild = object->navigate(Accessible::Child, 1, &child);
+if (child) {
+ // ...
+ delete child;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
new file mode 100644
index 0000000..e947bd7
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
@@ -0,0 +1,6 @@
+//! [0]
+QPrintDialog printDialog(printer, parent);
+if (printDialog.exec() == QDialog::Accepted) {
+ // print ...
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
new file mode 100644
index 0000000..6962f4d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
@@ -0,0 +1,91 @@
+//! [0]
+fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Image"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)"));
+//! [0]
+
+
+//! [1]
+"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+//! [1]
+
+
+//! [2]
+QFileDialog dialog(this);
+dialog.setFileMode(QFileDialog::AnyFile);
+//! [2]
+
+
+//! [3]
+dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"));
+//! [3]
+
+
+//! [4]
+dialog.setViewMode(QFileDialog::Detail);
+//! [4]
+
+
+//! [5]
+QStringList fileNames;
+if (dialog.exec())
+ fileNames = dialog.selectedFiles();
+//! [5]
+
+
+//! [6]
+dialog.setNameFilter("All C++ files (*.cpp *.cc *.C *.cxx *.c++)");
+dialog.setNameFilter("*.cpp *.cc *.C *.cxx *.c++");
+//! [6]
+
+
+//! [7]
+QStringList filters;
+filters << "Image files (*.png *.xpm *.jpg)"
+ << "Text files (*.txt)"
+ << "Any files (*)";
+
+QFileDialog dialog(this);
+dialog.setNameFilters(filters);
+dialog.exec();
+//! [7]
+
+
+//! [8]
+QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
+ "/home",
+ tr("Images (*.png *.xpm *.jpg)"));
+//! [8]
+
+
+//! [9]
+QStringList files = QFileDialog::getOpenFileNames(
+ this,
+ "Select one or more files to open",
+ "/home",
+ "Images (*.png *.xpm *.jpg)");
+//! [9]
+
+
+//! [10]
+QStringList list = files;
+QStringList::Iterator it = list.begin();
+while(it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [10]
+
+
+//! [11]
+QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
+ "/home/jana/untitled.png",
+ tr("Images (*.png *.xpm *.jpg)"));
+//! [11]
+
+
+//! [12]
+QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
+ "/home",
+ QFileDialog::ShowDirsOnly
+ | QFileDialog::DontResolveSymlinks);
+//! [12]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
new file mode 100644
index 0000000..f1b06ec
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
@@ -0,0 +1,45 @@
+//! [0]
+bool ok;
+QFont font = QFontDialog::getFont(
+ &ok, QFont("Helvetica [Cronyx]", 10), this);
+if (ok) {
+ // the user clicked OK and font is set to the font the user selected
+} else {
+ // the user canceled the dialog; font is set to the initial
+ // value, in this case Helvetica [Cronyx], 10
+}
+//! [0]
+
+
+//! [1]
+myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));
+//! [1]
+
+
+//! [2]
+bool ok;
+QFont font = QFontDialog::getFont(&ok, QFont("Times", 12), this);
+if (ok) {
+ // font is set to the font the user selected
+} else {
+ // the user canceled the dialog; font is set to the initial
+ // value, in this case Times, 12.
+}
+//! [2]
+
+
+//! [3]
+myWidget.setFont(QFontDialog::getFont(0, myWidget.font()));
+//! [3]
+
+
+//! [4]
+bool ok;
+QFont font = QFontDialog::getFont(&ok, this);
+if (ok) {
+ // font is set to the font the user selected
+} else {
+ // the user canceled the dialog; font is set to the default
+ // application font, QApplication::font()
+}
+//! [4]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp
new file mode 100644
index 0000000..ff0d128
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_dialogs_qmessagebox.cpp
@@ -0,0 +1,108 @@
+//! [0]
+int ret = QMessageBox::warning(this, tr("My Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel,
+ QMessageBox::Save);
+//! [0]
+
+
+//! [1]
+QMessageBox msgBox;
+msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+switch (msgBox.exec()) {
+case QMessageBox::Yes:
+ // yes was clicked
+ break;
+case QMessageBox::No:
+ // no was clicked
+ break;
+default:
+ // should never be reached
+ break;
+}
+//! [1]
+
+
+//! [2]
+QMessageBox msgBox;
+QPushButton *connectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole);
+QPushButton *abortButton = msgBox.addButton(QMessageBox::Abort);
+
+msgBox.exec();
+
+if (msgBox.clickedButton() == connectButton) {
+ // connect
+} else if (msgBox.clickedButton() == abortButton) {
+ // abort
+}
+//! [2]
+
+
+//! [3]
+QMessageBox messageBox(this);
+QAbstractButton *disconnectButton =
+ messageBox.addButton(tr("Disconnect"), QMessageBox::ActionRole);
+...
+messageBox.exec();
+if (messageBox.clickedButton() == disconnectButton) {
+ ...
+}
+//! [3]
+
+
+//! [4]
+#include <QApplication>
+#include <QMessageBox>
+
+int main(int argc, char *argv[])
+{
+ QT_REQUIRE_VERSION(argc, argv, "4.0.2")
+
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
+
+//! [5]
+QMessageBox msgBox;
+msgBox.setText("The document has been modified.");
+msgBox.exec();
+//! [5]
+
+//! [6]
+QMessageBox msgBox;
+msgBox.setText("The document has been modified.");
+msgBox.setInformativeText("Do you want to save your changes?");
+msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+msgBox.setDefaultButton(QMessageBox::Save);
+int ret = msgBox.exec();
+//! [6]
+
+//! [7]
+switch (ret) {
+ case QMessageBox::Save:
+ // Save was clicked
+ break;
+ case QMessageBox::Discard:
+ // Don't Save was clicked
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+}
+//! [7]
+
+//! [9]
+QMessageBox msgBox(this);
+msgBox.setText(tr("The document has been modified.\n"
+ "Do you want to save your changes?"));
+msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+msgBox.setDefaultButton(QMessageBox::Save);
+//! [9]
diff --git a/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
new file mode 100644
index 0000000..7890e13
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
@@ -0,0 +1,40 @@
+//! [0]
+int LicenseWizard::nextId() const
+{
+ switch (currentId()) {
+ case Page_Intro:
+ if (field("intro.evaluate").toBool()) {
+ return Page_Evaluate;
+ } else {
+ return Page_Register;
+ }
+ case Page_Evaluate:
+ return Page_Conclusion;
+ case Page_Register:
+ if (field("register.upgradeKey").toString().isEmpty()) {
+ return Page_Details;
+ } else {
+ return Page_Conclusion;
+ }
+ case Page_Details:
+ return Page_Conclusion;
+ case Page_Conclusion:
+ default:
+ return -1;
+ }
+}
+//! [0]
+
+
+//! [1]
+MyWizard::MyWizard(QWidget *parent)
+ : QWizard(parent)
+{
+ ...
+ QList<QWizard::WizardButton> layout;
+ layout << QWizard::Stretch << QWizard::BackButton << QWizard::CancelButton
+ << QWizard::NextButton << QWizard::FinishButton;
+ setButtonLayout(layout);
+ ...
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
new file mode 100644
index 0000000..98fa4a9
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qcopchannel_qws.cpp
@@ -0,0 +1,26 @@
+//! [0]
+void MyClass::receive(const QString &message, const QByteArray &data)
+{
+ QDataStream in(data);
+ if (message == "execute(QString,QString)") {
+ QString cmd;
+ QString arg;
+ in >> cmd >> arg;
+ ...
+ } else if (message == "delete(QString)") {
+ QString fileName;
+ in >> fileName;
+ ...
+ } else {
+ ...
+ }
+}
+//! [0]
+
+
+//! [1]
+QByteArray data;
+QDataStream out(&data, QIODevice::WriteOnly);
+out << QString("cat") << QString("file.txt");
+QCopChannel::send("System/Shell", "execute(QString,QString)", data);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
new file mode 100644
index 0000000..0ad3997
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qmouse_qws.cpp
@@ -0,0 +1,4 @@
+//! [0]
+s*Xs = a*Xd + b*Yd + c
+s*Ys = d*Xd + e*Yd + f
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
new file mode 100644
index 0000000..26cd76c
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qmousetslib_qws.cpp
@@ -0,0 +1,9 @@
+//! [0]
+configure -L <path to tslib library> -I <path to tslib headers>
+//! [0]
+
+
+//! [1]
+module_raw input
+module linear
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
new file mode 100644
index 0000000..52ce3b7
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qscreen_qws.cpp
@@ -0,0 +1,8 @@
+//! [0]
+[screen driver][:driver specific options][:display number]
+//! [0]
+
+
+//! [1]
+Mach64:/dev/fb1:2
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
new file mode 100644
index 0000000..5ccebe2
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qtransportauth_qws.cpp
@@ -0,0 +1,47 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+QTransportAuth::Data *conData;
+QTransportAuth *a = QTransportAuth::getInstance();
+
+conData = a->connectTransport(
+ QTransportAuth::Trusted | QTransportAuth::UnixStreamSock,
+ socketDescriptor );
+//! [0]
+
+
+//! [1]
+// mySocket can be any QIODevice subclass
+AuthDevice *ad = a->recvBuf( d, mySocket );
+
+// proxy in the auth device where the socket would have gone
+connect( ad, SIGNAL(readyRead()), this, SLOT(mySocketReadyRead()));
+//! [1]
+
+
+//! [2]
+AuthDevice *ad = a->authBuf( d, mySocket );
+
+ad->write( someData );
+//! [2]
+
+
+//! [3]
+policyCheck( QTransportAuth::Data &, const QString & )
+//! [3]
+
+
+//! [4]
+QTransportAuth::Result r = d.status & QTransportAuth::ErrMask;
+qWarning( "error: %s", QTransportAuth::errorStrings[r] );
+//! [4]
+
+
+//! [5]
+MD5(K XOR opad, MD5(K XOR ipad, text))
+//! [5]
+
+}
+
diff --git a/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
new file mode 100644
index 0000000..1364f23
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_embedded_qwindowsystem_qws.cpp
@@ -0,0 +1,45 @@
+//! [0]
+bool MyScreenSaver::save( int level )
+{
+ switch ( level ) {
+ case 0:
+ if ( dim_enabled ) {
+ // dim the screen
+ }
+ return true;
+ case 1:
+ if ( screenoff_enabled ) {
+ // turn off the screen
+ }
+ return true;
+ case 2:
+ if ( suspend_enabled ) {
+ // suspend
+ }
+ return true;
+ default:
+ return false;
+ }
+}
+
+...
+
+int timings[4];
+timings[0] = 5000; // dim after 5 seconds
+timings[1] = 10000; // light off after 15 seconds
+timings[2] = 45000; // suspend after 60 seconds
+timings[3] = 0;
+QWSServer::setScreenSaverIntervals( timings );
+
+// ignore the key/mouse event that turns on the screen
+int blocklevel = 1;
+if ( !screenoff_enabled ) {
+ // screenoff is disabled, ignore the key/mouse event that wakes from suspend
+ blocklevel = 2;
+ if ( !suspend_enabled ) {
+ // suspend is disabled, never ignore events
+ blocklevel = -1;
+ }
+}
+QWSServer::setScreenSaverBlockLevel( blocklevel );
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
new file mode 100644
index 0000000..ed09b97
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
@@ -0,0 +1,13 @@
+//! [0]
+QGraphicsScene scene;
+QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit);
+QGraphicsWidget *pushButton = scene.addWidget(new QPushButton);
+
+QGraphicsGridLayout *layout = new QGraphicsGridLayout;
+layout->addItem(textEdit, 0, 0);
+layout->addItem(pushButton, 0, 1);
+
+QGraphicsWidget *form = new QGraphicsWidget;
+form->setLayout(layout);
+scene.addItem(form);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
new file mode 100644
index 0000000..a57de9d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
@@ -0,0 +1,221 @@
+//! [0]
+class SimpleItem : public QGraphicsItem
+{
+public:
+ QRectF boundingRect() const
+ {
+ qreal penWidth = 1;
+ return QRectF(-10 - penWidth / 2, -10 - penWidth / 2,
+ 20 + penWidth / 2, 20 + penWidth / 2);
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+ {
+ painter->drawRoundedRect(-10, -10, 20, 20, 5, 5);
+ }
+};
+//! [0]
+
+
+//! [1]
+class CustomItem : public QGraphicsItem
+{
+ ...
+ enum { Type = UserType + 1 };
+
+ int type() const
+ {
+ // Enable the use of qgraphicsitem_cast with this item.
+ return Type;
+ }
+ ...
+};
+//! [1]
+
+
+//! [2]
+item->setCursor(Qt::IBeamCursor);
+//! [2]
+
+
+//! [3]
+item->setCursor(Qt::IBeamCursor);
+//! [3]
+
+
+//! [4]
+QGraphicsRectItem rect;
+rect.setPos(100, 100);
+
+rect.sceneTransform().map(QPointF(0, 0));
+// returns QPointF(100, 100);
+
+rect.sceneTransform().inverted().map(QPointF(100, 100));
+// returns QPointF(0, 0);
+//! [4]
+
+
+//! [5]
+QGraphicsRectItem rect;
+rect.setPos(100, 100);
+
+rect.deviceTransform(view->viewportTransform()).map(QPointF(0, 0));
+// returns the item's (0, 0) point in view's viewport coordinates
+
+rect.deviceTransform(view->viewportTransform()).inverted().map(QPointF(100, 100));
+// returns view's viewport's (100, 100) coordinate in item coordinates
+//! [5]
+
+
+//! [6]
+// Rotate an item 45 degrees around (0, 0).
+item->rotate(45);
+
+// Rotate an item 45 degrees around (x, y).
+item->setTransform(QTransform().translate(x, y).rotate(45).translate(-x, -y));
+//! [6]
+
+
+//! [7]
+// Scale an item by 3x2 from its origin
+item->scale(3, 2);
+
+// Scale an item by 3x2 from (x, y)
+item->setTransform(QTransform().translate(x, y).scale(3, 2).translate(-x, -y));
+//! [7]
+
+
+//! [8]
+QRectF CircleItem::boundingRect() const
+{
+ qreal penWidth = 1;
+ return QRectF(-radius - penWidth / 2, -radius - penWidth / 2,
+ diameter + penWidth, diameter + penWidth);
+}
+//! [8]
+
+
+//! [9]
+QPainterPath RoundItem::shape() const
+{
+ QPainterPath path;
+ path.addEllipse(boundingRect());
+ return path;
+}
+//! [9]
+
+
+//! [10]
+void RoundRectItem::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+{
+ painter->drawRoundedRect(-10, -10, 20, 20, 5, 5);
+}
+//! [10]
+
+
+//! [11]
+static const int ObjectName = 0;
+
+QGraphicsItem *item = scene.itemAt(100, 50);
+if (item->data(ObjectName).toString().isEmpty()) {
+ if (qgraphicsitem_cast<ButtonItem *>(item))
+ item->setData(ObjectName, "Button");
+}
+//! [11]
+
+
+//! [12]
+QGraphicsScene scene;
+QGraphicsEllipseItem *ellipse = scene.addEllipse(QRectF(-10, -10, 20, 20));
+QGraphicsLineItem *line = scene.addLine(QLineF(-10, -10, 20, 20));
+
+line->installSceneEventFilter(ellipse);
+// line's events are filtered by ellipse's sceneEventFilter() function.
+
+ellipse->installSceneEventFilter(line);
+// ellipse's events are filtered by line's sceneEventFilter() function.
+//! [12]
+
+
+//! [13]
+void CustomItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
+{
+ QMenu menu;
+ QAction *removeAction = menu.addAction("Remove");
+ QAction *markAction = menu.addAction("Mark");
+ QAction *selectedAction = menu.exec(event->screenPos());
+ // ...
+}
+//! [13]
+
+
+//! [14]
+CustomItem::CustomItem()
+{
+ setAcceptDrops(true);
+ ...
+}
+
+void CustomItem::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
+{
+ event->setAccepted(event->mimeData()->hasFormat("text/plain"));
+}
+//! [14]
+
+
+//! [15]
+QVariant Component::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if (change == ItemPositionChange && scene()) {
+ // value is the new position.
+ QPointF newPos = value.toPointF();
+ QRectF rect = scene()->sceneRect();
+ if (!rect.contains(newPos)) {
+ // Keep the item inside the scene rect.
+ newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left())));
+ newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top())));
+ return newPos;
+ }
+ }
+ return QGraphicsItem::itemChange(change, value);
+}
+//! [15]
+
+
+//! [16]
+void CircleItem::setRadius(qreal newRadius)
+{
+ if (radius != newRadius) {
+ prepareGeometryChange();
+ radius = newRadius;
+ }
+}
+//! [16]
+
+
+//! [17]
+// Group all selected items together
+QGraphicsItemGroup *group = scene->createItemGroup(scene->selecteditems());
+
+// Destroy the group, and delete the group item
+scene->destroyItemGroup(group);
+//! [17]
+
+
+//! [QGraphicsItem type]
+class CustomItem : public QGraphicsItem
+{
+ ...
+ enum { Type = UserType + 1 };
+
+ int type() const
+ {
+ // Enable the use of qgraphicsitem_cast with this item.
+ return Type;
+ }
+ ...
+};
+//! [QGraphicsItem type]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
new file mode 100644
index 0000000..77f7491
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
@@ -0,0 +1,13 @@
+//! [0]
+QGraphicsScene scene;
+QGraphicsWidget *textEdit = scene.addWidget(new QTextEdit);
+QGraphicsWidget *pushButton = scene.addWidget(new QPushButton);
+
+QGraphicsLinearLayout *layout = new QGraphicsLinearLayout;
+layout->addItem(textEdit);
+layout->addItem(pushButton);
+
+QGraphicsWidget *form = new QGraphicsWidget;
+form->setLayout(layout);
+scene.addItem(form);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
new file mode 100644
index 0000000..6c62f26
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
@@ -0,0 +1,47 @@
+//! [0]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QTabWidget *tabWidget = new QTabWidget;
+
+ QGraphicsScene scene;
+ QGraphicsProxyWidget *proxy = scene.addWidget(tabWidget);
+
+ QGraphicsView view(&scene);
+ view.show();
+
+ return app.exec();
+}
+//! [0]
+
+//! [1]
+QGroupBox *groupBox = new QGroupBox("Contact Details");
+QLabel *numberLabel = new QLabel("Telephone number");
+QLineEdit *numberEdit = new QLineEdit;
+
+QFormLayout *layout = new QFormLayout;
+layout->addRow(numberLabel, numberEdit);
+groupBox->setLayout(layout);
+
+QGraphicsScene scene;
+QGraphicsProxyWidget *proxy = scene.addWidget(groupBox);
+
+QGraphicsView view(&scene);
+view.show();
+//! [1]
+
+//! [2]
+QGraphicsScene scene;
+
+QLineEdit *edit = new QLineEdit;
+QGraphicsProxyWidget *proxy = scene.addWidget(edit);
+
+edit->isVisible(); // returns true
+proxy->isVisible(); // also returns true
+
+edit->hide();
+
+edit->isVisible(); // returns false
+proxy->isVisible(); // also returns false
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
new file mode 100644
index 0000000..20b0979
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
@@ -0,0 +1,82 @@
+//! [0]
+QGraphicsScene scene;
+scene.addText("Hello, world!");
+
+QGraphicsView view(&scene);
+view.show();
+//! [0]
+
+
+//! [1]
+QGraphicsScene scene;
+scene.addItem(...
+...
+QPrinter printer(QPrinter::HighResolution);
+printer.setPaperSize(QPrinter::A4);
+
+QPainter painter(&printer);
+scene.render(&painter);
+//! [1]
+
+
+//! [2]
+QSizeF segmentSize = sceneRect().size() / pow(2, depth - 1);
+//! [2]
+
+
+//! [3]
+QGraphicsScene scene;
+QGraphicsView view(&scene);
+view.show();
+
+// a blue background
+scene.setBackgroundBrush(Qt::blue);
+
+// a gradient background
+QRadialGradient gradient(0, 0, 10);
+gradient.setSpread(QGradient::RepeatSpread);
+scene.setBackgroundBrush(gradient);
+//! [3]
+
+
+//! [4]
+QGraphicsScene scene;
+QGraphicsView view(&scene);
+view.show();
+
+// a white semi-transparent foreground
+scene.setForegroundBrush(QColor(255, 255, 255, 127));
+
+// a grid foreground
+scene.setForegroundBrush(QBrush(Qt::lightGray, Qt::CrossPattern));
+//! [4]
+
+
+//! [5]
+QRectF TileScene::rectForTile(int x, int y) const
+{
+ // Return the rectangle for the tile at position (x, y).
+ return QRectF(x * tileWidth, y * tileHeight, tileWidth, tileHeight);
+}
+
+void TileScene::setTile(int x, int y, const QPixmap &pixmap)
+{
+ // Sets or replaces the tile at position (x, y) with pixmap.
+ if (x >= 0 && x < numTilesH && y >= 0 && y < numTilesV) {
+ tiles[y][x] = pixmap;
+ invalidate(rectForTile(x, y), BackgroundLayer);
+ }
+}
+
+void TileScene::drawBackground(QPainter *painter, const QRectF &exposed)
+{
+ // Draws all tiles that intersect the exposed area.
+ for (int y = 0; y < numTilesV; ++y) {
+ for (int x = 0; x < numTilesH; ++x) {
+ QRectF rect = rectForTile(x, y);
+ if (exposed.intersects(rect))
+ painter->drawPixmap(rect.topLeft(), tiles[y][x]);
+ }
+ }
+}
+//! [5]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
new file mode 100644
index 0000000..9b6c22e
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
@@ -0,0 +1,5 @@
+//! [0]
+
+setDropAction(proposedAction());
+
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
new file mode 100644
index 0000000..d22b872
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
@@ -0,0 +1,92 @@
+//! [0]
+QGraphicsScene scene;
+scene.addText("Hello, world!");
+
+QGraphicsView view(&scene);
+view.show();
+//! [0]
+
+
+//! [1]
+QGraphicsScene scene;
+scene.addRect(QRectF(-10, -10, 20, 20));
+
+QGraphicsView view(&scene);
+view.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+view.show();
+//! [1]
+
+
+//! [2]
+QGraphicsView view;
+view.setBackgroundBrush(QImage(":/images/backgroundtile.png"));
+view.setCacheMode(QGraphicsView::CacheBackground);
+//! [2]
+
+
+//! [3]
+QGraphicsScene scene;
+scene.addText("GraphicsView rotated clockwise");
+
+QGraphicsView view(&scene);
+view.rotate(90); // the text is rendered with a 90 degree clockwise rotation
+view.show();
+//! [3]
+
+
+//! [4]
+QGraphicsScene scene;
+scene.addItem(...
+...
+
+QGraphicsView view(&scene);
+view.show();
+...
+
+QPrinter printer(QPrinter::HighResolution);
+printer.setPageSize(QPrinter::A4);
+QPainter painter(&printer);
+
+// print, fitting the viewport contents into a full page
+view.render(&painter);
+
+// print the upper half of the viewport into the lower.
+// half of the page.
+QRect viewport = view.viewport()->rect();
+view.render(&painter,
+ QRectF(0, printer.height() / 2,
+ printer.width(), printer.height() / 2),
+ viewport.adjusted(0, 0, 0, -viewport.height() / 2));
+
+//! [4]
+
+
+//! [5]
+void CustomView::mousePressEvent(QMouseEvent *event)
+{
+ qDebug() << "There are" << items(event->pos()).size()
+ << "items at position" << mapToScene(event->pos());
+}
+//! [5]
+
+
+//! [6]
+void CustomView::mousePressEvent(QMouseEvent *event)
+{
+ if (QGraphicsItem *item = itemAt(event->pos())) {
+ qDebug() << "You clicked on item" << item;
+ } else {
+ qDebug() << "You didn't click on an item.";
+ }
+}
+//! [6]
+
+
+//! [7]
+QGraphicsScene scene;
+scene.addText("GraphicsView rotated clockwise");
+
+QGraphicsView view(&scene);
+view.rotate(90); // the text is rendered with a 90 degree clockwise rotation
+view.show();
+//! [7]
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
new file mode 100644
index 0000000..06fa642
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
@@ -0,0 +1,26 @@
+//! [0]
+void MyGroupBoxWidget::initStyleOption(QStyleOption *option) const
+{
+ QGraphicsWidget::initStyleOption(option);
+ if (QStyleOptionGroupBox *box = qstyleoption_cast<QStyleOptionGroupBox *>(option)) {
+ // Add group box specific state.
+ box->flat = isFlat();
+ ...
+ }
+}
+//! [0]
+
+
+//! [1]
+setTabOrder(a, b); // a to b
+setTabOrder(b, c); // a to b to c
+setTabOrder(c, d); // a to b to c to d
+//! [1]
+
+
+//! [2]
+// WRONG
+setTabOrder(c, d); // c to d
+setTabOrder(a, b); // a to b AND c to d
+setTabOrder(b, c); // a to b to c, but not c to d
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_image_qbitmap.cpp b/doc/src/snippets/code/src_gui_image_qbitmap.cpp
new file mode 100644
index 0000000..fa8317a
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qbitmap.cpp
@@ -0,0 +1,4 @@
+//! [0]
+uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };
+QBitmap bm(8, 8, arrow_bits, true);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_image_qicon.cpp b/doc/src/snippets/code/src_gui_image_qicon.cpp
new file mode 100644
index 0000000..2b7c893
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qicon.cpp
@@ -0,0 +1,22 @@
+//! [0]
+QToolButton *button = new QToolButton;
+button->setIcon(QIcon("open.xpm"));
+//! [0]
+
+
+//! [1]
+button->setIcon(QIcon());
+//! [1]
+
+
+//! [2]
+void MyWidget::drawIcon(QPainter *painter, QPoint pos)
+{
+ QPixmap pixmap = icon.pixmap(QSize(22, 22),
+ isEnabled() ? QIcon::Normal
+ : QIcon::Disabled,
+ isOn() ? QIcon::On
+ : QIcon::Off);
+ painter->drawPixmap(pos, pixmap);
+}
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_image_qimage.cpp b/doc/src/snippets/code/src_gui_image_qimage.cpp
new file mode 100644
index 0000000..3b7d8de
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qimage.cpp
@@ -0,0 +1,42 @@
+//! [0]
+QImage image(3, 3, QImage::Format_RGB32);
+QRgb value;
+
+value = qRgb(189, 149, 39); // 0xffbd9527
+image.setPixel(1, 1, value);
+
+value = qRgb(122, 163, 39); // 0xff7aa327
+image.setPixel(0, 1, value);
+image.setPixel(1, 0, value);
+
+value = qRgb(237, 187, 51); // 0xffedba31
+image.setPixel(2, 1, value);
+//! [0]
+
+
+//! [1]
+QImage image(3, 3, QImage::Format_Indexed8);
+QRgb value;
+
+value = qRgb(122, 163, 39); // 0xff7aa327
+image.setColor(0, value);
+
+value = qRgb(237, 187, 51); // 0xffedba31
+image.setColor(1, value);
+
+value = qRgb(189, 149, 39); // 0xffbd9527
+image.setColor(2, value);
+
+image.setPixel(0, 1, 0);
+image.setPixel(1, 0, 0);
+image.setPixel(1, 1, 2);
+image.setPixel(2, 1, 1);
+//! [1]
+
+
+//! [2]
+static const char * const start_xpm[] = {
+ "16 15 8 1",
+ "a c #cec6bd",
+....
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_image_qimagereader.cpp b/doc/src/snippets/code/src_gui_image_qimagereader.cpp
new file mode 100644
index 0000000..c645144
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qimagereader.cpp
@@ -0,0 +1,26 @@
+//! [0]
+QImageReader reader;
+reader.setFormat("png"); // same as reader.setFormat("PNG");
+//! [0]
+
+
+//! [1]
+QImageReader reader("image.png");
+// reader.format() == "png"
+//! [1]
+
+
+//! [2]
+QImage icon(64, 64, QImage::Format_RGB32);
+QImageReader reader("icon_64x64.bmp");
+if (reader.read(&icon)) {
+ // Display icon
+}
+//! [2]
+
+
+//! [3]
+QImageReader reader(":/image.png");
+if (reader.supportsOption(QImageIOHandler::Size))
+ qDebug() << "Size:" << reader.size();
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_image_qimagewriter.cpp b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
new file mode 100644
index 0000000..d4a4118
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
@@ -0,0 +1,19 @@
+//! [0]
+QImageWriter writer;
+writer.setFormat("png"); // same as writer.setFormat("PNG");
+//! [0]
+
+
+//! [1]
+QImage image("some/image.jpeg");
+QImageWriter writer("images/outimage.png", "png");
+writer.setText("Author", "John Smith");
+writer.write(image);
+//! [1]
+
+
+//! [2]
+QImageWriter writer(fileName);
+if (writer.supportsOption(QImageIOHandler::Description))
+ writer.setText("Author", "John Smith");
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_image_qmovie.cpp b/doc/src/snippets/code/src_gui_image_qmovie.cpp
new file mode 100644
index 0000000..77130e8
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qmovie.cpp
@@ -0,0 +1,13 @@
+//! [0]
+QLabel label;
+QMovie *movie = new QMovie("animations/fire.gif");
+
+label.setMovie(movie);
+movie->start();
+//! [0]
+
+
+//! [1]
+QMovie movie("racecar.gif");
+movie.setSpeed(200); // 2x speed
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/doc/src/snippets/code/src_gui_image_qpixmap.cpp
new file mode 100644
index 0000000..822b466
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qpixmap.cpp
@@ -0,0 +1,18 @@
+//! [0]
+static const char * const start_xpm[]={
+ "16 15 8 1",
+ "a c #cec6bd",
+....
+//! [0]
+
+
+//! [1]
+QPixmap myPixmap;
+myPixmap->setMask(myPixmap->createHeuristicMask());
+//! [1]
+
+//! [2]
+QPixmap pixmap("background.png");
+QRegion exposed;
+pixmap.scroll(10, 10, pixmap.rect(), &exposed);
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
new file mode 100644
index 0000000..c4b6353
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
@@ -0,0 +1,21 @@
+//! [0]
+QPixmap* pp;
+QPixmap p;
+if ((pp=QPixmapCache::find("my_big_image", pm))) {
+ p = *pp;
+} else {
+ p.load("bigimage.png");
+ QPixmapCache::insert("my_big_image", new QPixmap(p));
+}
+painter->drawPixmap(0, 0, p);
+//! [0]
+
+
+//! [1]
+QPixmap pm;
+if (!QPixmapCache::find("my_big_image", pm)) {
+ pm.load("bigimage.png");
+ QPixmapCache::insert("my_big_image", pm);
+}
+painter->drawPixmap(0, 0, pm);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
new file mode 100644
index 0000000..e305109
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
@@ -0,0 +1,22 @@
+//! [0]
+QPixmapColorizeFilter *myFilter = new QPixmapColorFilter;
+myFilter->setColor(QColor(128, 0, 0));
+myFilter->draw(painter, QPoint(0, 0), originalPixmap);
+//! [0]
+
+//! [1]
+QPixmapConvolutionFilter *myFilter = new QPixmapConvolutionFilter;
+qreal kernel[] = {
+ 0.0,-1.0, 0.0,
+ -1.0, 5.0,-1.0,
+ 0.0,-1.0, 0.0
+ };
+myFilter->setConvolutionKernel(kernel, 3, 3);
+myFilter->draw(painter, QPoint(0, 0), originalPixmap);
+//! [1]
+
+//! [2]
+QPixmapDropShadowFilter *myFilter = new QPixmapDropShadowFilter;
+myFilter->draw(painter, QPoint(0, 0), originalPixmap);
+//! [2]
+
diff --git a/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
new file mode 100644
index 0000000..9814c74
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
@@ -0,0 +1,18 @@
+//! [0]
+void MyView::resizeEvent(QResizeEvent *event) {
+ horizontalScrollBar()->setRange(0, realWidth - width());
+ ...
+}
+//! [0]
+
+//! [1]
+setIndexWidget(index, new QLineEdit);
+...
+setIndexWidget(index, new QTextEdit);
+//! [1]
+
+//! [2]
+QItemSelectionModel *m = view->selectionModel();
+view->setModel(new model);
+delete m;
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
new file mode 100644
index 0000000..ea5363c
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
@@ -0,0 +1,23 @@
+//! [0]
+QDataWidgetMapper *mapper = new QDataWidgetMapper;
+mapper->setModel(model);
+mapper->addMapping(mySpinBox, 0);
+mapper->addMapping(myLineEdit, 1);
+mapper->addMapping(myCountryChooser, 2);
+mapper->toFirst();
+//! [0]
+
+
+//! [1]
+QDataWidgetMapper *mapper = new QDataWidgetMapper();
+mapper->setModel(myModel);
+mapper->addMapping(nameLineEdit, 0);
+mapper->addMapping(ageSpinBox, 1);
+//! [1]
+
+
+//! [2]
+QDataWidgetMapper *mapper = new QDataWidgetMapper();
+connect(myTableView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
+ mapper, SLOT(setCurrentModelIndex(QModelIndex)));
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
new file mode 100644
index 0000000..29601bf
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
@@ -0,0 +1,23 @@
+//! [0]
+Q_PROPERTY(QColor color READ color WRITE setColor USER true)
+//! [0]
+
+
+//! [1]
+QItemEditorCreator<MyEditor> *itemCreator =
+ new QItemEditorCreator<MyEditor>("myProperty");
+
+QItemEditorFactory *factory = new QItemEditorFactory;
+//! [1]
+
+
+//! [2]
+QItemEditorFactory *editorFactory = new QItemEditorFactory;
+QItemEditorCreatorBase *creator = new QStandardItemEditorCreator<MyFancyDateTimeEdit>();
+editorFactory->registerEditor(QVariant::DateType, creator);
+//! [2]
+
+
+//! [3]
+Q_PROPERTY(QColor color READ color WRITE setColor USER true)
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
new file mode 100644
index 0000000..9302fa6
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
@@ -0,0 +1,10 @@
+//! [0]
+QItemSelection *selection = new QItemSelection(topLeft, bottomRight);
+//! [0]
+
+
+//! [1]
+QItemSelection *selection = new QItemSelection();
+...
+selection->select(topLeft, bottomRight);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
new file mode 100644
index 0000000..7480ccd
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
@@ -0,0 +1,42 @@
+//! [0]
+QStandardItemModel model(4, 4);
+for (int row = 0; row < 4; ++row) {
+ for (int column = 0; column < 4; ++column) {
+ QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column));
+ model.setItem(row, column, item);
+ }
+}
+//! [0]
+
+
+//! [1]
+QStandardItemModel model;
+QStandardItem *parentItem = model.invisibleRootItem();
+for (int i = 0; i < 4; ++i) {
+ QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ parentItem->appendRow(item);
+ parentItem = item;
+}
+//! [1]
+
+
+//! [2]
+QTreeView *treeView = new QTreeView(this);
+treeView->setModel(myStandardItemModel);
+connect(treeView, SIGNAL(clicked(QModelIndex)),
+ this, SLOT(clicked(QModelIndex)));
+//! [2]
+
+
+//! [3]
+void MyWidget::clicked(const QModelIndex &index)
+{
+ QStandardItem *item = myStandardItemModel->itemFromIndex(index);
+ // Do stuff with the item ...
+}
+//! [3]
+
+
+//! [4]
+treeView->scrollTo(item->index());
+//! [4]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
new file mode 100644
index 0000000..80adc0b
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
@@ -0,0 +1,5 @@
+//! [0]
+setCellWidget(index, new QLineEdit);
+...
+setCellWidget(index, new QTextEdit);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
new file mode 100644
index 0000000..ea0478e
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QTreeWidget *treeWidget = new QTreeWidget();
+treeWidget->setColumnCount(1);
+QList<QTreeWidgetItem *> items;
+for (int i = 0; i < 10; ++i)
+ items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("item: %1").arg(i))));
+treeWidget->insertTopLevelItems(0, items);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qaction.cpp b/doc/src/snippets/code/src_gui_kernel_qaction.cpp
new file mode 100644
index 0000000..b052feb
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qaction.cpp
@@ -0,0 +1,9 @@
+//! [0]
+QApplication app(argc, argv);
+app.setAttribute(Qt::AA_DontShowIconsInMenus); // Icons are *no longer shown* in menus
+// ...
+QAction *myAction = new QAction();
+// ...
+myAction->setIcon(SomeIcon);
+myAction->setIconVisibleInMenu(true); // Icon *will* be shown in menus for *this* action.
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
new file mode 100644
index 0000000..bfb09e3
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
@@ -0,0 +1,143 @@
+//! [0]
+int main(int argc, char **argv)
+{
+#ifdef Q_WS_X11
+ bool useGUI = getenv("DISPLAY") != 0;
+#else
+ bool useGUI = true;
+#endif
+ QApplication app(argc, argv, useGUI);
+
+ if (useGUI) {
+ // start GUI version
+ ...
+ } else {
+ // start non-GUI version
+ ...
+ }
+ return app.exec();
+}
+//! [0]
+
+
+//! [1]
+QApplication::setStyle(new QWindowsStyle);
+//! [1]
+
+
+//! [2]
+int main(int argc, char *argv[])
+{
+ QApplication::setColorSpec(QApplication::ManyColor);
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [2]
+
+
+//! [3]
+QSize MyWidget::sizeHint() const
+{
+ return QSize(80, 25).expandedTo(QApplication::globalStrut());
+}
+//! [3]
+
+
+//! [4]
+void showAllHiddenTopLevelWidgets()
+{
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ if (widget->isHidden())
+ widget->show();
+ }
+}
+//! [4]
+
+
+//! [5]
+void updateAllWidgets()
+{
+ foreach (QWidget *widget, QApplication::allWidgets())
+ widget->update();
+}
+//! [5]
+
+
+//! [6]
+int main(int argc, char *argv[])
+{
+ QApplication::setDesktopSettingsAware(false);
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [6]
+
+
+//! [7]
+if ((startPos - currentPos).manhattanLength() >=
+ QApplication::startDragDistance())
+ startTheDrag();
+//! [7]
+
+
+//! [8]
+void MyApplication::commitData(QSessionManager& manager)
+{
+ if (manager.allowsInteraction()) {
+ int ret = QMessageBox::warning(
+ mainWindow,
+ tr("My Application"),
+ tr("Save changes to document?"),
+ QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+
+ switch (ret) {
+ case QMessageBox::Save:
+ manager.release();
+ if (!saveDocument())
+ manager.cancel();
+ break;
+ case QMessageBox::Discard:
+ break;
+ case QMessageBox::Cancel:
+ default:
+ manager.cancel();
+ }
+ } else {
+ // we did not get permission to interact, then
+ // do something reasonable instead
+ }
+}
+//! [8]
+
+
+//! [9]
+appname -session id
+//! [9]
+
+
+//! [10]
+foreach (QString command, mySession.restartCommand())
+ do_something(command);
+//! [10]
+
+
+//! [11]
+foreach (QString command, mySession.discardCommand())
+ do_something(command);
+//! [11]
+
+
+//! [12]
+QWidget *widget = qApp->widgetAt(x, y);
+if (widget)
+ widget = widget->window();
+//! [12]
+
+
+//! [13]
+QWidget *widget = qApp->widgetAt(point);
+if (widget)
+ widget = widget->window();
+//! [13]
diff --git a/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
new file mode 100644
index 0000000..2782200
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
@@ -0,0 +1,5 @@
+//! [0]
+QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+calculateHugeMandelbrot(); // lunch time...
+QApplication::restoreOverrideCursor();
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
new file mode 100644
index 0000000..5d1cf2b
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
@@ -0,0 +1,13 @@
+//! [0]
+QClipboard *clipboard = QApplication::clipboard();
+QString originalText = clipboard->text();
+...
+clipboard->setText(newText);
+//! [0]
+
+
+//! [1]
+QMimeData *data = new QMimeData;
+data->setImageData(image);
+clipboard->setMimeData(data, mode);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_kernel_qevent.cpp b/doc/src/snippets/code/src_gui_kernel_qevent.cpp
new file mode 100644
index 0000000..cd3d019
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qevent.cpp
@@ -0,0 +1,14 @@
+//! [0]
+void MyWidget::wheelEvent(QWheelEvent *event)
+{
+ int numDegrees = event->delta() / 8;
+ int numSteps = numDegrees / 15;
+
+ if (event->orientation() == Qt::Horizontal) {
+ scrollHorizontally(numSteps);
+ } else {
+ scrollVertically(numSteps);
+ }
+ event->accept();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
new file mode 100644
index 0000000..aed6956
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
@@ -0,0 +1,36 @@
+//! [0]
+QFormLayout *formLayout = new QFormLayout;
+formLayout->addRow(tr("&Name:"), nameLineEdit);
+formLayout->addRow(tr("&Email:"), emailLineEdit);
+formLayout->addRow(tr("&Age:"), ageSpinBox);
+setLayout(formLayout);
+//! [0]
+
+
+//! [1]
+nameLabel = new QLabel(tr("&Name:"));
+nameLabel->setBuddy(nameLineEdit);
+
+emailLabel = new QLabel(tr("&Name:"));
+emailLabel->setBuddy(emailLineEdit);
+
+ageLabel = new QLabel(tr("&Name:"));
+ageLabel->setBuddy(ageSpinBox);
+
+QGridLayout *gridLayout = new QGridLayout;
+gridLayout->addWidget(nameLabel, 0, 0);
+gridLayout->addWidget(nameLineEdit, 0, 1);
+gridLayout->addWidget(emailLabel, 1, 0);
+gridLayout->addWidget(emailLineEdit, 1, 1);
+gridLayout->addWidget(ageLabel, 2, 0);
+gridLayout->addWidget(ageSpinBox, 2, 1);
+setLayout(gridLayout);
+//! [1]
+
+
+//! [2]
+formLayout->setRowWrapPolicy(QFormLayout::DontWrapRows);
+formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
+formLayout->setFormAlignment(Qt::AlignHCenter | Qt::AlignTop);
+formLayout->setLabelAlignment(Qt::AlignLeft);
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
new file mode 100644
index 0000000..a5c734d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
@@ -0,0 +1,19 @@
+//! [0]
+QKeySequence(QKeySequence::Print);
+QKeySequence(tr("Ctrl+P"));
+QKeySequence(tr("Ctrl+p"));
+QKeySequence(Qt::CTRL + Qt::Key_P);
+//! [0]
+
+
+//! [1]
+QKeySequence(tr("Ctrl+X, Ctrl+C"));
+QKeySequence(Qt::CTRL + Qt::Key_X, Qt::CTRL + Qt::Key_C);
+//! [1]
+
+
+//! [2]
+QMenu *file = new QMenu(this);
+file->addAction(tr("&Open..."), this, SLOT(open()),
+ QKeySequence(tr("Ctrl+O", "File|Open")));
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayout.cpp b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
new file mode 100644
index 0000000..26d178f
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
@@ -0,0 +1,27 @@
+//! [0]
+static void paintLayout(QPainter *painter, QLayoutItem *item)
+{
+ QLayout *layout = item->layout();
+ if (layout) {
+ for (int i = 0; i < layout->count(); ++i)
+ paintLayout(painter, layout->itemAt(i));
+ }
+ painter->drawRect(item->geometry());
+}
+
+void MyWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ if (layout())
+ paintLayout(&painter, layout());
+}
+//! [0]
+
+
+//! [1]
+QLayoutItem *child;
+while ((child = layout->takeAt(0)) != 0) {
+ ...
+ delete child;
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
new file mode 100644
index 0000000..db6438e
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
@@ -0,0 +1,13 @@
+//! [0]
+int MyLayout::heightForWidth(int w) const
+{
+ if (cache_dirty || cached_width != w) {
+ // not all C++ compilers support "mutable"
+ MyLayout *that = (MyLayout*)this;
+ int h = calculateHeightForWidth(w);
+ that->cached_hfw = h;
+ return h;
+ }
+ return cached_hfw;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
new file mode 100644
index 0000000..b5fdf95
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
@@ -0,0 +1,15 @@
+//! [0]
+shortcut = new QShortcut(QKeySequence(tr("Ctrl+O", "File|Open")),
+ parent);
+//! [0]
+
+
+//! [1]
+setKey(0); // no signal emitted
+setKey(QKeySequence()); // no signal emitted
+setKey(0x3b1); // Greek letter alpha
+setKey(Qt::Key_D); // 'd', e.g. to delete
+setKey('q'); // 'q', e.g. to quit
+setKey(Qt::CTRL + Qt::Key_P); // Ctrl+P, e.g. to print document
+setKey("Ctrl+P"); // Ctrl+P, e.g. to print document
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
new file mode 100644
index 0000000..6a85c3e
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
@@ -0,0 +1,3 @@
+//! [0]
+key = QKeySequence();
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_kernel_qsound.cpp b/doc/src/snippets/code/src_gui_kernel_qsound.cpp
new file mode 100644
index 0000000..bdbd1ce
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qsound.cpp
@@ -0,0 +1,9 @@
+//! [0]
+QSound::play("mysounds/bells.wav");
+//! [0]
+
+
+//! [1]
+QSound bells("mysounds/bells.wav");
+bells.play();
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_kernel_qwidget.cpp b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
new file mode 100644
index 0000000..4285edd
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
@@ -0,0 +1,97 @@
+//! [0]
+w->setWindowState(w->windowState() ^ Qt::WindowFullScreen);
+//! [0]
+
+
+//! [1]
+w->setWindowState(w->windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
+//! [1]
+
+
+//! [2]
+width = baseSize().width() + i * sizeIncrement().width();
+height = baseSize().height() + j * sizeIncrement().height();
+//! [2]
+
+
+//! [3]
+aWidget->window()->setWindowTitle("New Window Title");
+//! [3]
+
+
+//! [4]
+QFont font("Helvetica", 12, QFont::Bold);
+setFont(font);
+//! [4]
+
+
+//! [5]
+QFont font;
+font.setBold(false);
+setFont(font);
+//! [5]
+
+
+//! [6]
+setCursor(Qt::IBeamCursor);
+//! [6]
+
+
+//! [7]
+QPixmap pixmap(widget->size());
+widget->render(&pixmap);
+//! [7]
+
+
+//! [8]
+QPainter painter(this);
+...
+painter.end();
+myWidget->render(this);
+//! [8]
+
+
+//! [9]
+setTabOrder(a, b); // a to b
+setTabOrder(b, c); // a to b to c
+setTabOrder(c, d); // a to b to c to d
+//! [9]
+
+
+//! [10]
+// WRONG
+setTabOrder(c, d); // c to d
+setTabOrder(a, b); // a to b AND c to d
+setTabOrder(b, c); // a to b to c, but not c to d
+//! [10]
+
+
+//! [11]
+void MyWidget::closeEvent(QCloseEvent *event)
+{
+ QSettings settings("MyCompany", "MyApp");
+ settings.setValue("geometry", saveGeometry());
+ QWidget::closeEvent(event);
+}
+//! [11]
+
+
+//! [12]
+QSettings settings("MyCompany", "MyApp");
+myWidget->restoreGeometry(settings.value("myWidget/geometry").toByteArray());
+//! [12]
+
+
+//! [13]
+setUpdatesEnabled(false);
+bigVisualChanges();
+setUpdatesEnabled(true);
+//! [13]
+
+
+//! [14]
+...
+extern void qt_x11_set_global_double_buffer(bool);
+qt_x11_set_global_double_buffer(false);
+...
+//! [14]
diff --git a/doc/src/snippets/code/src_gui_painting_qbrush.cpp b/doc/src/snippets/code/src_gui_painting_qbrush.cpp
new file mode 100644
index 0000000..8cb5310
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qbrush.cpp
@@ -0,0 +1,11 @@
+//! [0]
+QPainter painter(this);
+
+painter.setBrush(Qt::cyan);
+painter.setPen(Qt::darkCyan);
+painter.drawRect(0, 0, 100,100);
+
+painter.setBrush(Qt::NoBrush);
+painter.setPen(Qt::darkGreen);
+painter.drawRect(40, 40, 100, 100);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_painting_qcolor.cpp b/doc/src/snippets/code/src_gui_painting_qcolor.cpp
new file mode 100644
index 0000000..c21e589
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qcolor.cpp
@@ -0,0 +1,9 @@
+//! [0]
+// Specify semi-transparent red
+painter.setBrush(QColor(255, 0, 0, 127));
+painter.drawRect(0, 0, width()/2, height());
+
+// Specify semi-transparent blue
+painter.setBrush(QColor(0, 0, 255, 127));
+painter.drawRect(0, 0, width(), height()/2);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
new file mode 100644
index 0000000..7e94d59
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
@@ -0,0 +1,58 @@
+//! [0]
+QFrame frame:
+frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);
+//! [0]
+
+
+//! [1]
+QFrame frame:
+frame.setFrameStyle(QFrame::Box | QFrame::Raised);
+//! [1]
+
+
+//! [2]
+QFrame frame:
+frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);
+//! [2]
+
+
+//! [3]
+QFrame frame:
+frame.setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+//! [3]
+
+
+//! [4]
+QFrame frame:
+frame.setFrameStyle(QFrame::Box | QFrame::Plain);
+//! [4]
+
+
+//! [5]
+QFrame frame:
+frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);
+//! [5]
+
+
+//! [6]
+QFrame frame:
+frame.setFrameStyle(QFrame::Box | QFrame::Raised);
+//! [6]
+
+
+//! [7]
+QFrame frame:
+frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);
+//! [7]
+
+
+//! [8]
+QFrame frame:
+frame.setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+//! [8]
+
+
+//! [9]
+QFrame frame:
+frame.setFrameStyle(QFrame::Box | QFrame::Plain);
+//! [9]
diff --git a/doc/src/snippets/code/src_gui_painting_qmatrix.cpp b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
new file mode 100644
index 0000000..4a8a427
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
@@ -0,0 +1,22 @@
+//! [0]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+//! [0]
+
+
+//! [1]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+//! [1]
+
+
+//! [2]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+//! [2]
+
+
+//! [3]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
new file mode 100644
index 0000000..611daae
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
@@ -0,0 +1,202 @@
+//! [0]
+void SimpleExampleWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(Qt::blue);
+ painter.setFont(QFont("Arial", 30));
+ painter.drawText(rect(), Qt::AlignCenter, "Qt");
+}
+//! [0]
+
+
+//! [1]
+void MyWidget::paintEvent(QPaintEvent *)
+{
+ QPainter p;
+ p.begin(this);
+ p.drawLine(...); // drawing code
+ p.end();
+}
+//! [1]
+
+
+//! [2]
+void MyWidget::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ p.drawLine(...); // drawing code
+}
+//! [2]
+
+
+//! [3]
+painter->begin(0); // impossible - paint device cannot be 0
+
+QPixmap image(0, 0);
+painter->begin(&image); // impossible - image.isNull() == true;
+
+painter->begin(myWidget);
+painter2->begin(myWidget); // impossible - only one painter at a time
+//! [3]
+
+
+//! [4]
+void QPainter::rotate(qreal angle)
+{
+ QMatrix matrix;
+ matrix.rotate(angle);
+ setWorldMatrix(matrix, true);
+}
+//! [4]
+
+
+//! [5]
+QPainterPath path;
+path.moveTo(20, 80);
+path.lineTo(20, 30);
+path.cubicTo(80, 0, 50, 50, 80, 80);
+
+QPainter painter(this);
+painter.drawPath(path);
+//! [5]
+
+
+//! [6]
+QLineF line(10.0, 80.0, 90.0, 20.0);
+
+QPainter(this);
+painter.drawLine(line);
+//! [6]
+
+
+//! [7]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+
+QPainter painter(this);
+painter.drawRect(rectangle);
+//! [7]
+
+
+//! [8]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+
+QPainter painter(this);
+painter.drawRoundedRect(rectangle, 20.0, 15.0);
+//! [8]
+
+
+//! [9]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+
+QPainter painter(this);
+painter.drawEllipse(rectangle);
+//! [9]
+
+
+//! [10]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+int startAngle = 30 * 16;
+int spanAngle = 120 * 16;
+
+QPainter painter(this);
+painter.drawArc(rectangle, startAngle, spanAngle);
+//! [10]
+
+
+//! [11]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+int startAngle = 30 * 16;
+int spanAngle = 120 * 16;
+
+QPainter painter(this);
+painter.drawPie(rectangle, startAngle, spanAngle);
+//! [11]
+
+
+//! [12]
+QRectF rectangle(10.0, 20.0, 80.0, 60.0);
+int startAngle = 30 * 16;
+int spanAngle = 120 * 16;
+
+QPainter painter(this);
+painter.drawChord(rect, startAngle, spanAngle);
+//! [12]
+
+
+//! [13]
+static const QPointF points[3] = {
+ QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+};
+
+QPainter painter(this);
+painter.drawPolyline(points, 3);
+//! [13]
+
+
+//! [14]
+static const QPointF points[4] = {
+ QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+ QPointF(90.0, 70.0)
+};
+
+QPainter painter(this);
+painter.drawPolygon(points, 4);
+//! [14]
+
+
+//! [15]
+static const QPointF points[4] = {
+ QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+ QPointF(90.0, 70.0)
+};
+
+QPainter painter(this);
+painter.drawConvexPolygon(points, 4);
+//! [15]
+
+
+//! [16]
+QRectF target(10.0, 20.0, 80.0, 60.0);
+QRectF source(0.0, 0.0, 70.0, 40.0);
+QPixmap pixmap(":myPixmap.png");
+
+QPainter(this);
+painter.drawPixmap(target, image, source);
+//! [16]
+
+
+//! [17]
+QPainter painter(this);
+painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nTrolltech"));
+//! [17]
+
+
+//! [18]
+QPicture picture;
+QPointF point(10.0, 20.0)
+picture.load("drawing.pic");
+
+QPainter painter(this);
+painter.drawPicture(0, 0, picture);
+//! [18]
+
+
+//! [19]
+fillRect(rectangle, background()).
+//! [19]
+
+
+//! [20]
+QRectF target(10.0, 20.0, 80.0, 60.0);
+QRectF source(0.0, 0.0, 70.0, 40.0);
+QImage image(":/images/myImage.png");
+
+QPainter painter(this);
+painter.drawImage(target, image, source);
+//! [20]
diff --git a/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
new file mode 100644
index 0000000..f5d1e8b
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
@@ -0,0 +1,109 @@
+//! [0]
+QPainterPath path;
+path.addRect(20, 20, 60, 60);
+
+path.moveTo(0, 0);
+path.cubicTo(99, 0, 50, 50, 99, 99);
+path.cubicTo(0, 99, 50, 50, 0, 0);
+
+QPainter painter(this);
+painter.fillRect(0, 0, 100, 100, Qt::white);
+painter.setPen(QPen(QColor(79, 106, 25), 1, Qt::SolidLine,
+ Qt::FlatCap, Qt::MiterJoin));
+painter.setBrush(QColor(122, 163, 39));
+
+painter.drawPath(path);
+//! [0]
+
+
+//! [1]
+QLinearGradient myGradient;
+QPen myPen;
+
+QPainterPath myPath;
+myPath.cubicTo(c1, c2, endPoint);
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [1]
+
+
+//! [2]
+QLinearGradient myGradient;
+QPen myPen;
+
+QPointF center, startPoint;
+
+QPainterPath myPath;
+myPath.moveTo(center);
+myPath.arcTo(boundingRect, startAngle,
+ sweepLength);
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [2]
+
+
+//! [3]
+QLinearGradient myGradient;
+QPen myPen;
+QRectF myRectangle;
+
+QPainterPath myPath;
+myPath.addRect(myRectangle);
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [3]
+
+
+//! [4]
+QLinearGradient myGradient;
+QPen myPen;
+QPolygonF myPolygon;
+
+QPainterPath myPath;
+myPath.addPolygon(myPolygon);
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [4]
+
+
+//! [5]
+QLinearGradient myGradient;
+QPen myPen;
+QRectF boundingRectangle;
+
+QPainterPath myPath;
+myPath.addEllipse(boundingRectangle);
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [5]
+
+
+//! [6]
+QLinearGradient myGradient;
+QPen myPen;
+QFont myFont;
+QPointF baseline(x, y);
+
+QPainterPath myPath;
+myPath.addText(baseline, myFont, tr("Qt"));
+
+QPainter painter(this);
+painter.setBrush(myGradient);
+painter.setPen(myPen);
+painter.drawPath(myPath);
+//! [6]
diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/doc/src/snippets/code/src_gui_painting_qpen.cpp
new file mode 100644
index 0000000..538fa09
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qpen.cpp
@@ -0,0 +1,41 @@
+//! [0]
+QPainter painter(this);
+QPen pen(Qt::green, 3, Qt::DashDotLine, Qt::RoundCap, Qt::RoundJoin);
+painter.setPen(pen);
+//! [0]
+
+
+//! [1]
+QPainter painter(this);
+QPen pen(); // creates a default pen
+
+pen.setStyle(Qt::DashDotLine);
+pen.setWidth(3);
+pen.setBrush(Qt::green);
+pen.setCapStyle(Qt::RoundCap);
+pen.setJoinStyle(Qt::RoundJoin);
+
+painter.setPen(pen);
+//! [1]
+
+
+//! [2]
+QPen pen;
+QVector<qreal> dashes;
+qreal space = 4;
+
+dashes << 1 << space << 3 << space << 9 << space
+ << 27 << space << 9;
+
+pen.setDashPattern(dashes);
+//! [2]
+
+
+//! [3]
+QPen pen;
+QVector<qreal> dashes;
+qreal space = 4;
+dashes << 1 << space << 3 << space << 9 << space
+ << 27 << space << 9;
+pen.setDashPattern(dashes);
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_painting_qregion.cpp b/doc/src/snippets/code/src_gui_painting_qregion.cpp
new file mode 100644
index 0000000..6c5dfa5
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qregion.cpp
@@ -0,0 +1,13 @@
+//! [0]
+void MyWidget::paintEvent(QPaintEvent *)
+{
+ QRegion r1(QRect(100, 100, 200, 80), // r1: elliptic region
+ QRegion::Ellipse);
+ QRegion r2(QRect(100, 120, 90, 30)); // r2: rectangular region
+ QRegion r3 = r1.intersected(r2); // r3: intersection
+
+ QPainter painter(this);
+ painter.setClipRegion(r3);
+ ... // paint clipped graphics
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
new file mode 100644
index 0000000..50771ef
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
@@ -0,0 +1,18 @@
+//! [0]
+QRegion r1(10, 10, 20, 20);
+r1.isNull(); // false
+r1.isEmpty(); // false
+
+QRegion r2(40, 40, 20, 20);
+QRegion r3;
+r3.isNull(); // true
+r3.isEmpty(); // true
+
+r3 = r1.intersected(r2); // r3: intersection of r1 and r2
+r3.isNull(); // false
+r3.isEmpty(); // true
+
+r3 = r1.united(r2); // r3: union of r1 and r2
+r3.isNull(); // false
+r3.isEmpty(); // false
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_painting_qtransform.cpp b/doc/src/snippets/code/src_gui_painting_qtransform.cpp
new file mode 100644
index 0000000..91b1e94
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_painting_qtransform.cpp
@@ -0,0 +1,42 @@
+//! [0]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+if (is not affine) {
+ w' = m13*x + m23*y + m33
+ x' /= w'
+ y' /= w'
+}
+//! [0]
+
+
+//! [1]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+if (is not affine) {
+ w' = m13*x + m23*y + m33
+ x' /= w'
+ y' /= w'
+}
+//! [1]
+
+
+//! [2]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+if (is not affine) {
+ w' = m13*x + m23*y + m33
+ x' /= w'
+ y' /= w'
+}
+//! [2]
+
+
+//! [3]
+x' = m11*x + m21*y + dx
+y' = m22*y + m12*x + dy
+if (is not affine) {
+ w' = m13*x + m23*y + m33
+ x' /= w'
+ y' /= w'
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_styles_qstyle.cpp b/doc/src/snippets/code/src_gui_styles_qstyle.cpp
new file mode 100644
index 0000000..a78a6c8
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_styles_qstyle.cpp
@@ -0,0 +1,8 @@
+//! [0]
+./myapplication -style motif
+//! [0]
+
+
+//! [1]
+./myapplication -style custom
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
new file mode 100644
index 0000000..bf0c670
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
@@ -0,0 +1,14 @@
+//! [0]
+int MyStyle::styleHint(StyleHint stylehint, const QStyleOption *opt,
+ const QWidget *widget, QStyleHintReturn* returnData) const;
+{
+ if (stylehint == SH_RubberBand_Mask) {
+ const QStyleHintReturnMask *maskReturn =
+ qstyleoption_cast<const QStyleHintReturnMask *>(hint);
+ if (maskReturn) {
+ ...
+ }
+ }
+ ...
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_text_qfont.cpp b/doc/src/snippets/code/src_gui_text_qfont.cpp
new file mode 100644
index 0000000..c74772c
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qfont.cpp
@@ -0,0 +1,27 @@
+//! [0]
+QFont serifFont("Times", 10, QFont::Bold);
+QFont sansFont("Helvetica [Cronyx]", 12);
+//! [0]
+
+
+//! [1]
+QFont f("Helvetica");
+//! [1]
+
+
+//! [2]
+QFont f("Helvetica [Cronyx]");
+//! [2]
+
+
+//! [3]
+QFontInfo info(f1);
+QString family = info.family();
+//! [3]
+
+
+//! [4]
+QFontMetrics fm(f1);
+int textWidthInPixels = fm.width("How many pixels wide is this text?");
+int textHeightInPixels = fm.height();
+//! [4]
diff --git a/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
new file mode 100644
index 0000000..d7b17ab
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
@@ -0,0 +1,14 @@
+//! [0]
+QFont font("times", 24);
+QFontMetrics fm(font);
+int pixelsWide = fm.width("What's the width of this text?");
+int pixelsHigh = fm.height();
+//! [0]
+
+
+//! [1]
+QFont font("times", 24);
+QFontMetricsF fm(font);
+qreal pixelsWide = fm.width("What's the width of this text?");
+qreal pixelsHigh = fm.height();
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
new file mode 100644
index 0000000..5dd2e0d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
@@ -0,0 +1,86 @@
+//! [0]
+QTextEdit *editor = new QTextEdit;
+MyHighlighter *highlighter = new MyHighlighter(editor->document());
+//! [0]
+
+
+//! [1]
+void MyHighlighter::highlightBlock(const QString &text)
+{
+ QTextCharFormat myClassFormat;
+ myClassFormat.setFontWeight(QFont::Bold);
+ myClassFormat.setForeground(Qt::darkMagenta);
+ QString pattern = "\\bMy[A-Za-z]+\\b";
+
+ QRegExp expression(pattern);
+ int index = text.indexOf(expression);
+ while (index >= 0) {
+ int length = expression.matchedLength();
+ setFormat(index, length, myClassFormat);
+ index = text.indexOf(expression, index + length);
+ }
+}
+//! [1]
+
+
+//! [2]
+QTextCharFormat multiLineCommentFormat;
+multiLineCommentFormat.setForeground(Qt::red);
+
+QRegExp startExpression("/\\*");
+QRegExp endExpression("\\*/");
+
+setCurrentBlockState(0);
+
+int startIndex = 0;
+if (previousBlockState() != 1)
+ startIndex = text.indexOf(startExpression);
+
+while (startIndex >= 0) {
+ int endIndex = text.indexOf(endExpression, startIndex);
+ int commentLength;
+ if (endIndex == -1) {
+ setCurrentBlockState(1);
+ commentLength = text.length() - startIndex;
+ } else {
+ commentLength = endIndex - startIndex
+ + endExpression.matchedLength();
+ }
+ setFormat(startIndex, commentLength, multiLineCommentFormat);
+ startIndex = text.indexOf(startExpression,
+ startIndex + commentLength);
+}
+//! [2]
+
+
+//! [3]
+void MyHighlighter::highlightBlock(const QString &text)
+{
+ QTextCharFormat myClassFormat;
+ myClassFormat.setFontWeight(QFont::Bold);
+ myClassFormat.setForeground(Qt::darkMagenta);
+ QString pattern = "\\bMy[A-Za-z]+\\b";
+
+ QRegExp expression(pattern);
+ int index = text.indexOf(expression);
+ while (index >= 0) {
+ int length = expression.matchedLength();
+ setFormat(index, length, myClassFormat);
+ index = text.indexOf(expression, index + length);
+ }
+ }
+//! [3]
+
+
+//! [4]
+struct ParenthesisInfo
+{
+ QChar char;
+ int position;
+};
+
+struct BlockData : public QTextBlockUserData
+{
+ QVector<ParenthesisInfo> parentheses;
+};
+//! [4]
diff --git a/doc/src/snippets/code/src_gui_text_qtextcursor.cpp b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
new file mode 100644
index 0000000..19c60b9
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
@@ -0,0 +1,40 @@
+//! [0]
+cursor.clearSelection();
+cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor);
+cursor.insertText("Hello World");
+//! [0]
+
+
+//! [1]
+QImage img = ...
+textDocument->addResource(QTextDocument::ImageResource, QUrl("myimage"), img);
+cursor.insertImage("myimage");
+//! [1]
+
+
+//! [2]
+QTextCursor cursor(textDocument);
+cursor.beginEditBlock();
+cursor.insertText("Hello");
+cursor.insertText("World");
+cursor.endEditBlock();
+
+textDocument->undo();
+//! [2]
+
+
+//! [3]
+QTextCursor cursor(textDocument);
+cursor.beginEditBlock();
+cursor.insertText("Hello");
+cursor.insertText("World");
+cursor.endEditBlock();
+
+...
+
+cursor.joinPreviousEditBlock();
+cursor.insertText("Hey");
+cursor.endEditBlock();
+
+textDocument->undo();
+//! [3]
diff --git a/doc/src/snippets/code/src_gui_text_qtextdocument.cpp b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
new file mode 100644
index 0000000..60840f7
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qtextdocument.cpp
@@ -0,0 +1,10 @@
+//! [0]
+QString plain = "#include <QtCore>"
+QString html = Qt::escape(plain);
+// html == "#include &lt;QtCore&gt;"
+//! [0]
+
+
+//! [1]
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>...
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
new file mode 100644
index 0000000..548bb78
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
@@ -0,0 +1,24 @@
+//! [0]
+int leading = fontMetrics.leading();
+qreal height = 0;
+qreal widthUsed = 0;
+textLayout.beginLayout();
+while (1) {
+ QTextLine line = textLayout.createLine();
+ if (!line.isValid())
+ break;
+
+ line.setLineWidth(lineWidth);
+ height += leading;
+ line.setPosition(QPointF(0, height));
+ height += line.height();
+ widthUsed = qMax(widthUsed, line.naturalTextWidth());
+}
+textLayout.endLayout();
+//! [0]
+
+
+//! [1]
+QPainter painter(this);
+textLayout.draw(&painter, QPoint(0, 0));
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_util_qcompleter.cpp b/doc/src/snippets/code/src_gui_util_qcompleter.cpp
new file mode 100644
index 0000000..3017d8c
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_util_qcompleter.cpp
@@ -0,0 +1,23 @@
+//! [0]
+QStringList wordList;
+wordList << "alpha" << "omega" << "omicron" << "zeta";
+
+QLineEdit *lineEdit = new QLineEdit(this);
+
+QCompleter *completer = new QCompleter(wordList, this);
+completer->setCaseSensitivity(Qt::CaseInsensitive);
+lineEdit->setCompleter(completer);
+//! [0]
+
+
+//! [1]
+QCompleter *completer = new QCompleter(this);
+completer->setModel(new QDirModel(completer));
+lineEdit->setCompleter(completer);
+//! [1]
+
+
+//! [2]
+for (int i = 0; completer->setCurrentRow(i); i++)
+ qDebug() << completer->currentCompletion() << " is match number " << i;
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
new file mode 100644
index 0000000..a9c630b
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
@@ -0,0 +1,17 @@
+//! [0]
+class MyHelpHandler : public QObject
+{
+ Q_OBJECT
+public:
+ ...
+public slots:
+ void showHelp(const QUrl &url);
+};
+
+QDesktopServices::setUrlHandler("help", helpInstance, "showHelp");
+//! [0]
+
+
+//! [1]
+mailto:user@foo.com?subject=Test&body=Just a test
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_util_qundostack.cpp b/doc/src/snippets/code/src_gui_util_qundostack.cpp
new file mode 100644
index 0000000..3949e1e
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_util_qundostack.cpp
@@ -0,0 +1,69 @@
+//! [0]
+class AppendText : public QUndoCommand
+{
+public:
+ AppendText(QString *doc, const QString &text)
+ : m_document(doc), m_text(text) { setText("append text"); }
+ virtual void undo()
+ { m_document->chop(m_text.length()); }
+ virtual void redo()
+ { m_document->append(m_text); }
+private:
+ QString *m_document;
+ QString m_text;
+};
+//! [0]
+
+
+//! [1]
+MyCommand *command1 = new MyCommand();
+stack->push(command1);
+MyCommand *command2 = new MyCommand();
+stack->push(command2);
+
+stack->undo();
+
+MyCommand *command3 = new MyCommand();
+stack->push(command3); // command2 gets deleted
+//! [1]
+
+
+//! [2]
+QUndoCommand *insertRed = new QUndoCommand(); // an empty command
+insertRed->setText("insert red text");
+
+new InsertText(document, idx, text, insertRed); // becomes child of insertRed
+new SetColor(document, idx, text.length(), Qt::red, insertRed);
+
+stack.push(insertRed);
+//! [2]
+
+
+//! [3]
+bool AppendText::mergeWith(const QUndoCommand *other)
+{
+ if (other->id() != id()) // make sure other is also an AppendText command
+ return false;
+ m_text += static_cast<const AppendText*>(other)->m_text;
+ return true;
+}
+//! [3]
+
+
+//! [4]
+stack.beginMacro("insert red text");
+stack.push(new InsertText(document, idx, text));
+stack.push(new SetColor(document, idx, text.length(), Qt::red));
+stack.endMacro(); // indexChanged() is emitted
+//! [4]
+
+
+//! [5]
+QUndoCommand *insertRed = new QUndoCommand(); // an empty command
+insertRed->setText("insert red text");
+
+new InsertText(document, idx, text, insertRed); // becomes child of insertRed
+new SetColor(document, idx, text.length(), Qt::red, insertRed);
+
+stack.push(insertRed);
+//! [5]
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
new file mode 100644
index 0000000..3c2b192
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
@@ -0,0 +1,20 @@
+//! [0]
+QPushButton *button = new QPushButton(tr("Ro&ck && Roll"), this);
+//! [0]
+
+
+//! [1]
+button->setIcon(QIcon(":/images/print.png"));
+button->setShortcut(tr("Alt+F7"));
+//! [1]
+
+
+//! [2]
+void MyWidget::reactToToggle(bool checked)
+{
+ if (checked) {
+ // Examine the new button states.
+ ...
+ }
+}
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
new file mode 100644
index 0000000..67cfeb7
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QSpinBox *spinBox = new QSpinBox(this);
+spinBox->setRange(0, 100);
+spinBox->setWrapping(true);
+spinBox->setValue(100);
+spinBox->stepBy(1);
+// value is 0
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
new file mode 100644
index 0000000..10ceecc
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
@@ -0,0 +1,39 @@
+//! [0]
+QCalendarWidget *calendar;
+calendar->setGridVisible(true);
+//! [0]
+
+
+//! [1]
+QCalendarWidget *calendar;
+calendar->setGridVisible(true);
+calendar->setMinimumDate(QDate(2006, 6, 19));
+//! [1]
+
+
+//! [2]
+QCalendarWidget *calendar;
+calendar->setGridVisible(true);
+calendar->setMaximumDate(QDate(2006, 7, 3));
+//! [2]
+
+
+//! [3]
+QCalendarWidget *calendar;
+
+calendar->setDateRange(min, max);
+//! [3]
+
+
+//! [4]
+QCalendarWidget *calendar;
+
+calendar->setMinimumDate(min);
+calendar->setMaximumDate(max);
+//! [4]
+
+
+//! [5]
+QCalendarWidget *calendar;
+calendar->setGridVisible(true);
+//! [5]
diff --git a/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
new file mode 100644
index 0000000..7300838
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
@@ -0,0 +1,3 @@
+//! [0]
+QCheckBox *checkbox = new QCheckBox("C&ase sensitive", this);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
new file mode 100644
index 0000000..796358d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
@@ -0,0 +1,39 @@
+//! [0]
+QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate());
+dateEdit->setMinimumDate(QDate::currentDate().addDays(-365));
+dateEdit->setMaximumDate(QDate::currentDate().addDays(365));
+dateEdit->setDisplayFormat("yyyy.MM.dd");
+//! [0]
+
+
+//! [1]
+setDateTimeRange(min, max);
+//! [1]
+
+
+//! [2]
+setMinimumDateTime(min);
+setMaximumDateTime(max);
+//! [2]
+
+
+//! [3]
+setDateRange(min, max);
+//! [3]
+
+
+//! [4]
+setMinimumDate(min);
+setMaximumDate(max);
+//! [4]
+
+
+//! [5]
+setTimeRange(min, max);
+//! [5]
+
+
+//! [6]
+setMinimumTime(min);
+setMaximumTime(max);
+//! [6]
diff --git a/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
new file mode 100644
index 0000000..2204e11
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QDockWidget *dockWidget = qobject_cast<QDockWidget*>(parentWidget());
+if (dockWidget->features() & QDockWidget::DockWidgetVerticalTitleBar) {
+ // I need to be vertical
+} else {
+ // I need to be horizontal
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qframe.cpp b/doc/src/snippets/code/src_gui_widgets_qframe.cpp
new file mode 100644
index 0000000..99fe79d
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qframe.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QLabel label(...);
+label.setFrameStyle(QFrame::Panel | QFrame::Raised);
+label.setLineWidth(2);
+
+QProgressBar pbar(...);
+label.setFrameStyle(QFrame::NoFrame);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
new file mode 100644
index 0000000..efd2246
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
@@ -0,0 +1,3 @@
+//! [0]
+g->setTitle("&User information");
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qlabel.cpp b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
new file mode 100644
index 0000000..d3b9254
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
@@ -0,0 +1,24 @@
+//! [0]
+QLabel *label = new QLabel(this);
+label->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+label->setText("first line\nsecond line");
+label->setAlignment(Qt::AlignBottom | Qt::AlignRight);
+//! [0]
+
+
+//! [1]
+QLineEdit* phoneEdit = new QLineEdit(this);
+QLabel* phoneLabel = new QLabel("&Phone:", this);
+phoneLabel->setBuddy(phoneEdit);
+//! [1]
+
+
+//! [2]
+QLineEdit *nameEd = new QLineEdit(this);
+QLabel *nameLb = new QLabel("&Name:", this);
+nameLb->setBuddy(nameEd);
+QLineEdit *phoneEd = new QLineEdit(this);
+QLabel *phoneLb = new QLabel("&Phone:", this);
+phoneLb->setBuddy(phoneEd);
+// (layout setup not shown)
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
new file mode 100644
index 0000000..8191a4f
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
@@ -0,0 +1,10 @@
+//! [0]
+void LineEdit::contextMenuEvent(QContextMenuEvent *event)
+{
+ QMenu *menu = createStandardContextMenu();
+ menu->addAction(tr("My Menu Item"));
+ //...
+ menu->exec(event->globalPos());
+ delete menu;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenu.cpp b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
new file mode 100644
index 0000000..f30ac35
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
@@ -0,0 +1,37 @@
+//! [0]
+exec(QCursor::pos());
+//! [0]
+
+
+//! [1]
+exec(somewidget.mapToGlobal(QPoint(0,0)));
+//! [1]
+
+
+//! [2]
+exec(e->globalPos());
+//! [2]
+
+
+//! [3]
+exec(QCursor::pos());
+//! [3]
+
+
+//! [4]
+exec(somewidget.mapToGlobal(QPoint(0, 0)));
+//! [4]
+
+
+//! [5]
+exec(e->globalPos());
+//! [5]
+
+
+//! [6]
+QMenu menu;
+QAction *at = actions[0]; // Assumes actions is not empty
+foreach (QAction *a, actions)
+ menu.addAction(a);
+menu.exec(pos, at);
+//! [6]
diff --git a/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
new file mode 100644
index 0000000..3ff24d3
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
@@ -0,0 +1,8 @@
+//! [0]
+menubar->addMenu(fileMenu);
+//! [0]
+
+
+//! [1]
+QMenuBar *menuBar = new QMenuBar(0);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
new file mode 100644
index 0000000..7f18995
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
@@ -0,0 +1,15 @@
+//! [0]
+void MyQPlainTextEdit::contextMenuEvent(QContextMenuEvent *event)
+{
+ QMenu *menu = createStandardContextMenu();
+ menu->addAction(tr("My Menu Item"));
+ //...
+ menu->exec(event->globalPos());
+ delete menu;
+}
+//! [0]
+
+
+//! [1]
+edit->textCursor().insertText(text);
+//! [1]
diff --git a/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
new file mode 100644
index 0000000..e4fc4ce
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
@@ -0,0 +1,3 @@
+//! [0]
+QPushButton *button = new QPushButton("&Download", this);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
new file mode 100644
index 0000000..05344fc
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
@@ -0,0 +1,3 @@
+//! [0]
+QRadioButton *button = new QRadioButton("Search from the &cursor", this);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
new file mode 100644
index 0000000..38a0dad
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
@@ -0,0 +1,22 @@
+//! [0]
+void Widget::mousePressEvent(QMouseEvent *event)
+{
+ origin = event->pos();
+ if (!rubberBand)
+ rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
+ rubberBand->setGeometry(QRect(origin, QSize()));
+ rubberBand->show();
+}
+
+void Widget::mouseMoveEvent(QMouseEvent *event)
+{
+ rubberBand->setGeometry(QRect(origin, event->pos()).normalized());
+}
+
+void Widget::mouseReleaseEvent(QMouseEvent *event)
+{
+ rubberBand->hide();
+ // determine selection, for example using QRect::intersects()
+ // and QRect::contains().
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
new file mode 100644
index 0000000..a77dc20
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
@@ -0,0 +1,9 @@
+//! [0]
+QLabel *imageLabel = new QLabel;
+QImage image("happyguy.png");
+imageLabel->setPixmap(QPixmap::fromImage(image));
+
+scrollArea = new QScrollArea;
+scrollArea->setBackgroundRole(QPalette::Dark);
+scrollArea->setWidget(imageLabel);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
new file mode 100644
index 0000000..7dbd6d6
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
@@ -0,0 +1,40 @@
+//! [0]
+sb->setPrefix("$");
+//! [0]
+
+
+//! [1]
+sb->setSuffix(" km");
+//! [1]
+
+
+//! [2]
+setRange(minimum, maximum);
+//! [2]
+
+
+//! [3]
+setMinimum(minimum);
+setMaximum(maximum);
+//! [3]
+
+
+//! [4]
+spinbox->setPrefix("$");
+//! [4]
+
+
+//! [5]
+spinbox->setSuffix(" km");
+//! [5]
+
+
+//! [6]
+setRange(minimum, maximum);
+//! [6]
+
+
+//! [7]
+setMinimum(minimum);
+setMaximum(maximum);
+//! [7]
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
new file mode 100644
index 0000000..d20f1f2
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
@@ -0,0 +1,15 @@
+//! [0]
+QPixmap pixmap(":/splash.png");
+QSplashScreen *splash = new QSplashScreen(pixmap);
+splash->show();
+
+... // Loading some items
+splash->showMessage("Loaded modules");
+
+qApp->processEvents();
+
+... // Establishing connections
+splash->showMessage("Established connections");
+
+qApp->processEvents();
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
new file mode 100644
index 0000000..62f5db1
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
@@ -0,0 +1,7 @@
+//! [0]
+QWidget *widget = splitter->widget(index);
+QSizePolicy policy = widget->sizePolicy();
+policy.setHorizontalStretch(stretch);
+policy.setVerticalStretch(stretch);
+widget->setSizePolicy(policy);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
new file mode 100644
index 0000000..d03f5af
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
@@ -0,0 +1,3 @@
+//! [0]
+statusBar()->addWidget(new MyReadWriteIndication);
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
new file mode 100644
index 0000000..0beb133
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
@@ -0,0 +1,4 @@
+//! [0]
+backaction.setToolTip(browser.historyTitle(-1));
+forwardaction.setToolTip(browser.historyTitle(+1));
+//! [0]
diff --git a/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
new file mode 100644
index 0000000..5f0b73f
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
@@ -0,0 +1,20 @@
+//! [0]
+void MyTextEdit::contextMenuEvent(QContextMenuEvent *event)
+{
+ QMenu *menu = createStandardContextMenu();
+ menu->addAction(tr("My Menu Item"));
+ //...
+ menu->exec(event->globalPos());
+ delete menu;
+}
+//! [0]
+
+
+//! [1]
+edit->textCursor().insertText(text);
+//! [1]
+
+
+//! [2]
+edit->textCursor().insertHtml(fragment);
+//! [2]
diff --git a/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
new file mode 100644
index 0000000..0240eea
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qvalidator.cpp
@@ -0,0 +1,95 @@
+//! [0]
+QValidator *validator = new QIntValidator(100, 999, this);
+QLineEdit *edit = new QLineEdit(this);
+
+// the edit lineedit will only accept integers between 100 and 999
+edit->setValidator(validator);
+//! [0]
+
+
+//! [1]
+QString str;
+int pos = 0;
+QIntValidator v(100, 900, this);
+
+str = "1";
+v.validate(str, pos); // returns Intermediate
+str = "012";
+v.validate(str, pos); // returns Intermediate
+
+str = "123";
+v.validate(str, pos); // returns Acceptable
+str = "678";
+v.validate(str, pos); // returns Acceptable
+
+str = "999";
+v.validate(str, pos); // returns Intermediate
+
+str = "1234";
+v.validate(str, pos); // returns Invalid
+str = "-123";
+v.validate(str, pos); // returns Invalid
+str = "abc";
+v.validate(str, pos); // returns Invalid
+str = "12cm";
+v.validate(str, pos); // returns Invalid
+//! [1]
+
+
+//! [2]
+int pos = 0;
+
+s = "abc";
+v.validate(s, pos); // returns Invalid
+
+s = "5";
+v.validate(s, pos); // returns Intermediate
+
+s = "50";
+v.validate(s, pos); // returns Acceptable
+//! [2]
+
+
+//! [3]
+// regexp: optional '-' followed by between 1 and 3 digits
+QRegExp rx("-?\\d{1,3}");
+QValidator *validator = new QRegExpValidator(rx, this);
+
+QLineEdit *edit = new QLineEdit(this);
+edit->setValidator(validator);
+//! [3]
+
+
+//! [4]
+// integers 1 to 9999
+QRegExp rx("[1-9]\\d{0,3}");
+// the validator treats the regexp as "^[1-9]\\d{0,3}$"
+QRegExpValidator v(rx, 0);
+QString s;
+int pos = 0;
+
+s = "0"; v.validate(s, pos); // returns Invalid
+s = "12345"; v.validate(s, pos); // returns Invalid
+s = "1"; v.validate(s, pos); // returns Acceptable
+
+rx.setPattern("\\S+"); // one or more non-whitespace characters
+v.setRegExp(rx);
+s = "myfile.txt"; v.validate(s, pos); // Returns Acceptable
+s = "my file.txt"; v.validate(s, pos); // Returns Invalid
+
+// A, B or C followed by exactly five digits followed by W, X, Y or Z
+rx.setPattern("[A-C]\\d{5}[W-Z]");
+v.setRegExp(rx);
+s = "a12345Z"; v.validate(s, pos); // Returns Invalid
+s = "A12345Z"; v.validate(s, pos); // Returns Acceptable
+s = "B12"; v.validate(s, pos); // Returns Intermediate
+
+// match most 'readme' files
+rx.setPattern("read\\S?me(\.(txt|asc|1st))?");
+rx.setCaseSensitive(false);
+v.setRegExp(rx);
+s = "readme"; v.validate(s, pos); // Returns Acceptable
+s = "README.1ST"; v.validate(s, pos); // Returns Acceptable
+s = "read me.txt"; v.validate(s, pos); // Returns Invalid
+s = "readm"; v.validate(s, pos); // Returns Intermediate
+//! [4]
diff --git a/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
new file mode 100644
index 0000000..0c55e5f
--- /dev/null
+++ b/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
@@ -0,0 +1,8 @@
+//! [0]
+MainWindow::MainWindow()
+{
+ workspace = new QWorkspace;
+ setCentralWidget(workspace);
+ ...
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_network_access_qftp.cpp b/doc/src/snippets/code/src_network_access_qftp.cpp
new file mode 100644
index 0000000..25e3da3
--- /dev/null
+++ b/doc/src/snippets/code/src_network_access_qftp.cpp
@@ -0,0 +1,59 @@
+//! [0]
+QFtp *ftp = new QFtp(parent);
+ftp->connectToHost("ftp.trolltech.com");
+ftp->login();
+//! [0]
+
+
+//! [1]
+ftp->connectToHost("ftp.trolltech.com"); // id == 1
+ftp->login(); // id == 2
+ftp->cd("qt"); // id == 3
+ftp->get("INSTALL"); // id == 4
+ftp->close(); // id == 5
+//! [1]
+
+
+//! [2]
+start(1)
+stateChanged(HostLookup)
+stateChanged(Connecting)
+stateChanged(Connected)
+finished(1, false)
+
+start(2)
+stateChanged(LoggedIn)
+finished(2, false)
+
+start(3)
+finished(3, false)
+
+start(4)
+dataTransferProgress(0, 3798)
+dataTransferProgress(2896, 3798)
+readyRead()
+dataTransferProgress(3798, 3798)
+readyRead()
+finished(4, false)
+
+start(5)
+stateChanged(Closing)
+stateChanged(Unconnected)
+finished(5, false)
+
+done(false)
+//! [2]
+
+
+//! [3]
+start(1)
+stateChanged(HostLookup)
+stateChanged(Connecting)
+stateChanged(Connected)
+finished(1, false)
+
+start(2)
+finished(2, true)
+
+done(true)
+//! [3]
diff --git a/doc/src/snippets/code/src_network_access_qhttp.cpp b/doc/src/snippets/code/src_network_access_qhttp.cpp
new file mode 100644
index 0000000..57698a0
--- /dev/null
+++ b/doc/src/snippets/code/src_network_access_qhttp.cpp
@@ -0,0 +1,85 @@
+//! [0]
+content-type: text/html
+//! [0]
+
+
+//! [1]
+header.setValue("content-type", "text/html");
+QString contentType = header.value("content-type");
+//! [1]
+
+
+//! [2]
+QHttpRequestHeader header("GET", QUrl::toPercentEncoding("/index.html"));
+header.setValue("Host", "qtsoftware.com");
+http->setHost("qtsoftware.com");
+http->request(header);
+//! [2]
+
+
+//! [3]
+http->setHost("qtsoftware.com"); // id == 1
+http->get(QUrl::toPercentEncoding("/index.html")); // id == 2
+//! [3]
+
+
+//! [4]
+requestStarted(1)
+requestFinished(1, false)
+
+requestStarted(2)
+stateChanged(Connecting)
+stateChanged(Sending)
+dataSendProgress(77, 77)
+stateChanged(Reading)
+responseHeaderReceived(responseheader)
+dataReadProgress(5388, 0)
+readyRead(responseheader)
+dataReadProgress(18300, 0)
+readyRead(responseheader)
+stateChanged(Connected)
+requestFinished(2, false)
+
+done(false)
+
+stateChanged(Closing)
+stateChanged(Unconnected)
+//! [4]
+
+
+//! [5]
+http->setHost("www.foo.bar"); // id == 1
+http->get("/index.html"); // id == 2
+http->post("register.html", data); // id == 3
+//! [5]
+
+
+//! [6]
+requestStarted(1)
+requestFinished(1, false)
+
+requestStarted(2)
+stateChanged(HostLookup)
+requestFinished(2, true)
+
+done(true)
+
+stateChanged(Unconnected)
+//! [6]
+
+
+//! [7]
+void Ticker::getTicks()
+{
+ http = new QHttp(this);
+ connect(http, SIGNAL(done(bool)), this, SLOT(showPage()));
+ http->setProxy("proxy.example.com", 3128);
+ http->setHost("ticker.example.com");
+ http->get("/ticks.asp");
+}
+
+void Ticker::showPage()
+{
+ display(http->readAll());
+}
+//! [7]
diff --git a/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
new file mode 100644
index 0000000..0ef0a3b
--- /dev/null
+++ b/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
@@ -0,0 +1,21 @@
+//! [0]
+QNetworkAccessManager *manager = new QNetworkAccessManager(this);
+connect(manager, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(replyFinished(QNetworkReply*)));
+
+manager->get(QNetworkRequest(QUrl("http://qtsoftware.com")));
+//! [0]
+
+
+//! [1]
+QNetworkRequest request;
+request.setUrl(QUrl("http://qtsoftware.com"));
+request.setRawHeader("User-Agent", "MyOwnBrowser 1.0");
+
+QNetworkReply *reply = manager->get(request);
+connect(reply, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
+connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
+ this, SLOT(slotError(QNetworkReply::NetworkError)));
+connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
+ this, SLOT(slotSslErrors(QList<QSslError>)));
+//! [1]
diff --git a/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
new file mode 100644
index 0000000..d1f6962
--- /dev/null
+++ b/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
@@ -0,0 +1,3 @@
+//! [0]
+request.setRawHeader("Last-Modified", "Sun, 06 Nov 1994 08:49:37 GMT");
+//! [0]
diff --git a/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
new file mode 100644
index 0000000..0b90404
--- /dev/null
+++ b/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
@@ -0,0 +1,8 @@
+//! [0]
+Q_IPV6ADDR addr = hostAddr.toIPv6Address();
+// addr contains 16 unsigned characters
+
+for (int i = 0; i < 16; ++i) {
+ // process addr[i]
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
new file mode 100644
index 0000000..e748f90
--- /dev/null
+++ b/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
@@ -0,0 +1,50 @@
+//! [0]
+// To find the IP address of qtsoftware.com
+QHostInfo::lookupHost("qtsoftware.com",
+ this, SLOT(printResults(QHostInfo)));
+
+// To find the host name for 4.2.2.1
+QHostInfo::lookupHost("4.2.2.1",
+ this, SLOT(printResults(QHostInfo)));
+//! [0]
+
+
+//! [1]
+QHostInfo info = QHostInfo::fromName("qtsoftware.com");
+//! [1]
+
+
+//! [2]
+QHostInfo::lookupHost("www.kde.org",
+ this, SLOT(lookedUp(QHostInfo)));
+//! [2]
+
+
+//! [3]
+void MyWidget::lookedUp(const QHostInfo &host)
+{
+ if (host.error() != QHostInfo::NoError) {
+ qDebug() << "Lookup failed:" << host.errorString();
+ return;
+ }
+
+ foreach (QHostAddress address, host.addresses())
+ qDebug() << "Found address:" << address.toString();
+}
+//! [3]
+
+
+//! [4]
+QHostInfo::lookupHost("4.2.2.1",
+ this, SLOT(lookedUp(QHostInfo)));
+//! [4]
+
+
+//! [5]
+QHostInfo info;
+...
+if (!info.addresses().isEmpty()) {
+ QHostAddress address = info.addresses().first();
+ // use the first IP address
+}
+//! [5]
diff --git a/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
new file mode 100644
index 0000000..34e9466
--- /dev/null
+++ b/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
@@ -0,0 +1,14 @@
+//! [0]
+QNetworkProxy proxy;
+proxy.setType(QNetworkProxy::Socks5Proxy);
+proxy.setHostName("proxy.example.com");
+proxy.setPort(1080);
+proxy.setUser("username");
+proxy.setPassword("password");
+QNetworkProxy::setApplicationProxy(proxy);
+//! [0]
+
+
+//! [1]
+serverSocket->setProxy(QNetworkProxy::NoProxy);
+//! [1]
diff --git a/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
new file mode 100644
index 0000000..d64931a
--- /dev/null
+++ b/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
@@ -0,0 +1,30 @@
+//! [0]
+socket->connectToHost("imap", 143);
+if (socket->waitForConnected(1000))
+ qDebug("Connected!");
+//! [0]
+
+
+//! [1]
+socket->disconnectFromHost();
+ if (socket->state() == QAbstractSocket::UnconnectedState ||
+ socket->waitForDisconnected(1000))
+ qDebug("Disconnected!");
+//! [1]
+
+
+//! [2]
+ // This slot is connected to QAbstractSocket::readyRead()
+ void SocketClass::readyReadSlot()
+ {
+ while (!socket.atEnd()) {
+ QByteArray data = socket.read(100);
+ ....
+ }
+ }
+//! [2]
+
+
+//! [3]
+socket->setProxy(QNetworkProxy::NoProxy);
+//! [3]
diff --git a/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
new file mode 100644
index 0000000..da96e6f
--- /dev/null
+++ b/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
@@ -0,0 +1,12 @@
+//! [0]
+socket->connectToServer("market");
+if (socket->waitForConnected(1000))
+ qDebug("Connected!");
+//! [0]
+
+
+//! [1]
+socket->disconnectFromServer();
+if (socket->waitForDisconnected(1000))
+ qDebug("Disconnected!");
+//! [1]
diff --git a/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
new file mode 100644
index 0000000..2aca1e1
--- /dev/null
+++ b/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
@@ -0,0 +1,21 @@
+//! [0]
+QNativeSocketEngine socketLayer;
+socketLayer.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol);
+socketLayer.connectToHost(QHostAddress::LocalHost, 22);
+// returns false
+
+socketLayer.waitForWrite();
+socketLayer.connectToHost(QHostAddress::LocalHost, 22);
+// returns true
+//! [0]
+
+
+//! [1]
+QNativeSocketEngine socketLayer;
+socketLayer.bind(QHostAddress::Any, 4000);
+socketLayer.listen();
+if (socketLayer.waitForRead()) {
+ int clientSocket = socketLayer.accept();
+ // a client is connected
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_network_socket_qtcpserver.cpp b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
new file mode 100644
index 0000000..0021e3b
--- /dev/null
+++ b/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
@@ -0,0 +1,3 @@
+//! [0]
+server->setProxy(QNetworkProxy::NoProxy);
+//! [0]
diff --git a/doc/src/snippets/code/src_network_socket_qudpsocket.cpp b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
new file mode 100644
index 0000000..966fb50
--- /dev/null
+++ b/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
@@ -0,0 +1,25 @@
+//! [0]
+void Server::initSocket()
+{
+ udpSocket = new QUdpSocket(this);
+ udpSocket->bind(QHostAddress::LocalHost, 7755);
+
+ connect(udpSocket, SIGNAL(readyRead()),
+ this, SLOT(readPendingDatagrams()));
+}
+
+void Server::readPendingDatagrams()
+{
+ while (udpSocket->hasPendingDatagrams()) {
+ QByteArray datagram;
+ datagram.resize(udpSocket->pendingDatagramSize());
+ QHostAddress sender;
+ quint16 senderPort;
+
+ udpSocket->readDatagram(datagram.data(), datagram.size(),
+ &sender, &senderPort);
+
+ processTheDatagram(datagram);
+ }
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
new file mode 100644
index 0000000..2ec84ae
--- /dev/null
+++ b/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
@@ -0,0 +1,6 @@
+//! [0]
+foreach (QSslCertificate cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem", QSsl::Pem,
+ QRegExp::Wildcard)) {
+ qDebug() << cert.issuerInfo(QSslCertificate::Organization);
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
new file mode 100644
index 0000000..fb3e1ab
--- /dev/null
+++ b/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
@@ -0,0 +1,5 @@
+//! [0]
+QSslConfiguration config = sslSocket.sslConfiguration();
+config.setProtocol(QSsl::TlsV1);
+sslSocket.setSslConfiguration(config);
+//! [0]
diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
new file mode 100644
index 0000000..afffbab
--- /dev/null
+++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
@@ -0,0 +1,56 @@
+//! [0]
+QSslSocket *socket = new QSslSocket(this);
+connect(socket, SIGNAL(encrypted()), this, SLOT(ready()));
+
+socket->connectToHostEncrypted("imap.example.com", 993);
+//! [0]
+
+
+//! [1]
+void SslServer::incomingConnection(int socketDescriptor)
+{
+ QSslSocket *serverSocket = new QSslSocket;
+ if (serverSocket->setSocketDescriptor(socketDescriptor)) {
+ connect(serverSocket, SIGNAL(encrypted()), this, SLOT(ready()));
+ serverSocket->startServerEncryption();
+ } else {
+ delete serverSocket;
+ }
+}
+//! [1]
+
+
+//! [2]
+QSslSocket socket;
+socket.connectToHostEncrypted("http.example.com", 443);
+if (!socket.waitForEncrypted()) {
+ qDebug() << socket.errorString();
+ return false;
+}
+
+socket.write("GET / HTTP/1.0\r\n\r\n");
+while (socket.waitForReadyRead())
+ qDebug() << socket.readAll().data();
+//! [2]
+
+
+//! [3]
+QSslSocket socket;
+connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted()));
+
+socket.connectToHostEncrypted("imap", 993);
+socket->write("1 CAPABILITY\r\n");
+//! [3]
+
+
+//! [4]
+QSslSocket socket;
+socket.setCiphers("DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA");
+//! [4]
+
+
+//! [5]
+socket->connectToHostEncrypted("imap", 993);
+if (socket->waitForEncrypted(1000))
+ qDebug("Encrypted!");
+//! [5]
diff --git a/doc/src/snippets/code/src_opengl_qgl.cpp b/doc/src/snippets/code/src_opengl_qgl.cpp
new file mode 100644
index 0000000..15b0005
--- /dev/null
+++ b/doc/src/snippets/code/src_opengl_qgl.cpp
@@ -0,0 +1,132 @@
+//! [0]
+QGLFormat fmt;
+fmt.setAlpha(true);
+fmt.setStereo(true);
+QGLFormat::setDefaultFormat(fmt);
+//! [0]
+
+
+//! [1]
+QGLFormat fmt;
+fmt.setDoubleBuffer(false); // single buffer
+fmt.setDirectRendering(false); // software rendering
+MyGLWidget* myWidget = new MyGLWidget(fmt, ...);
+//! [1]
+
+
+//! [2]
+QGLFormat fmt;
+fmt.setOverlay(true);
+fmt.setStereo(true);
+MyGLWidget* myWidget = new MyGLWidget(fmt, ...);
+if (!myWidget->format().stereo()) {
+ // ok, goggles off
+ if (!myWidget->format().hasOverlay()) {
+ qFatal("Cool hardware required");
+ }
+}
+//! [2]
+
+
+//! [3]
+// The rendering in MyGLWidget depends on using
+// stencil buffer and alpha channel
+MyGLWidget::MyGLWidget(QWidget* parent)
+ : QGLWidget(QGLFormat(QGL::StencilBuffer | QGL::AlphaChannel), parent)
+{
+ if (!format().stencil())
+ qWarning("Could not get stencil buffer; results will be suboptimal");
+ if (!format().alpha())
+ qWarning("Could not get alpha channel; results will be suboptimal");
+ ...
+}
+//! [3]
+
+
+//! [4]
+QApplication a(argc, argv);
+QGLFormat f;
+f.setDoubleBuffer(false);
+QGLFormat::setDefaultFormat(f);
+//! [4]
+
+
+//! [5]
+QGLFormat f = QGLFormat::defaultOverlayFormat();
+f.setDoubleBuffer(true);
+QGLFormat::setDefaultOverlayFormat(f);
+//! [5]
+
+
+//! [6]
+// ...continued from above
+MyGLWidget* myWidget = new MyGLWidget(QGLFormat(QGL::HasOverlay), ...);
+if (myWidget->format().hasOverlay()) {
+ // Yes, we got an overlay, let's check _its_ format:
+ QGLContext* olContext = myWidget->overlayContext();
+ if (olContext->format().doubleBuffer())
+ ; // yes, we got a double buffered overlay
+ else
+ ; // no, only single buffered overlays are available
+}
+//! [6]
+
+
+//! [7]
+QGLContext *cx;
+// ...
+QGLFormat f;
+f.setStereo(true);
+cx->setFormat(f);
+if (!cx->create())
+ exit(); // no OpenGL support, or cannot render on the specified paintdevice
+if (!cx->format().stereo())
+ exit(); // could not create stereo context
+//! [7]
+
+
+//! [8]
+class MyGLDrawer : public QGLWidget
+{
+ Q_OBJECT // must include this if you use Qt signals/slots
+
+public:
+ MyGLDrawer(QWidget *parent)
+ : QGLWidget(parent) {}
+
+protected:
+
+ void initializeGL()
+ {
+ // Set up the rendering context, define display lists etc.:
+ ...
+ glClearColor(0.0, 0.0, 0.0, 0.0);
+ glEnable(GL_DEPTH_TEST);
+ ...
+ }
+
+ void resizeGL(int w, int h)
+ {
+ // setup viewport, projection etc.:
+ glViewport(0, 0, (GLint)w, (GLint)h);
+ ...
+ glFrustum(...);
+ ...
+ }
+
+ void paintGL()
+ {
+ // draw the scene:
+ ...
+ glRotatef(...);
+ glMaterialfv(...);
+ glBegin(GL_QUADS);
+ glVertex3f(...);
+ glVertex3f(...);
+ ...
+ glEnd();
+ ...
+ }
+
+};
+//! [8]
diff --git a/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/doc/src/snippets/code/src_opengl_qglcolormap.cpp
new file mode 100644
index 0000000..b47de76
--- /dev/null
+++ b/doc/src/snippets/code/src_opengl_qglcolormap.cpp
@@ -0,0 +1,21 @@
+//! [0]
+#include <QApplication>
+#include <QGLColormap>
+
+int main()
+{
+ QApplication app(argc, argv);
+
+ MySuperGLWidget widget; // a QGLWidget in color-index mode
+ QGLColormap colormap;
+
+ // This will fill the colormap with colors ranging from
+ // black to white.
+ for (int i = 0; i < colormap.size(); i++)
+ colormap.setEntry(i, qRgb(i, i, i));
+
+ widget.setColormap(colormap);
+ widget.show();
+ return app.exec();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
new file mode 100644
index 0000000..589ffc0
--- /dev/null
+++ b/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
@@ -0,0 +1,19 @@
+//! [0]
+QGLPixelBuffer pbuffer(...);
+...
+pbuffer.makeCurrent();
+GLuint dynamicTexture = pbuffer.generateDynamicTexture();
+pbuffer.bindToDynamicTexture(dynamicTexture);
+...
+pbuffer.releaseFromDynamicTexture();
+//! [0]
+
+
+//! [1]
+QGLPixelBuffer pbuffer(...);
+...
+pbuffer.makeCurrent();
+GLuint dynamicTexture = pbuffer.generateDynamicTexture();
+...
+pbuffer.updateDynamicTexture(dynamicTexture);
+//! [1]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
new file mode 100644
index 0000000..cc5b86d
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbusabstractinterface.cpp
@@ -0,0 +1,20 @@
+//! [0]
+QString value = retrieveValue();
+QDBusMessage reply;
+
+QDBusReply<int> api = interface->call(QLatin1String("GetAPIVersion"));
+if (api >= 14)
+ reply = interface->call(QLatin1String("ProcessWorkUnicode"), value);
+else
+ reply = interface->call(QLatin1String("ProcessWork"), QLatin1String("UTF-8"), value.toUtf8());
+//! [0]
+
+//! [1]
+QString value = retrieveValue();
+QDBusPendingCall pcall = interface->asyncCall(QLatin1String("Process"), value);
+
+QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
+
+QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
+ this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
+//! [1]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusargument.cpp b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
new file mode 100644
index 0000000..b982510
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbusargument.cpp
@@ -0,0 +1,151 @@
+//! [0]
+struct MyStructure
+{
+ int count;
+ QString name;
+};
+QT_DECLARE_METATYPE(MyStructure)
+
+// Marshall the MyStructure data into a D-Bus argument
+QDBusArgument &operator<<(QDBusArgument &argument, const MyStructure &mystruct)
+{
+ argument.beginStructure();
+ argument << mystruct.count << mystruct.name;
+ argument.endStructure();
+ return argument;
+}
+
+// Retrieve the MyStructure data from the D-Bus argument
+const QDBusArgument &operator>>(const QDBusArgument &argument, MyStructure &mystruct)
+{
+ argument.beginStructure();
+ argument >> mystruct.count >> mystruct.name;
+ argument.endStructure();
+ return argument;
+}
+//! [0]
+
+
+//! [1]
+qDBusRegisterMetaType<MyStructure>();
+//! [1]
+
+
+//! [2]
+MyType item = qdbus_cast<Type>(argument);
+//! [2]
+
+
+//! [3]
+MyType item;
+argument >> item;
+//! [3]
+
+
+//! [4]
+QDBusArgument &operator<<(QDBusArgument &argument, const MyStructure &mystruct)
+{
+ argument.beginStructure();
+ argument << mystruct.member1 << mystruct.member2 << ... ;
+ argument.endStructure();
+ return argument;
+}
+//! [4]
+
+
+//! [5]
+QDBusArgument &operator<<(QDBusArgument &argument, const MyStructure &mystruct)
+{
+ argument.beginStructure();
+ argument << mystruct.member1 << mystruct.member2;
+
+ argument.beginStructure();
+ argument << mystruct.member3.subMember1 << mystruct.member3.subMember2;
+ argument.endStructure();
+
+ argument << mystruct.member4;
+ argument.endStructure();
+ return argument;
+}
+//! [5]
+
+
+//! [6]
+// append an array of MyElement types
+QDBusArgument &operator<<(QDBusArgument &argument, const MyArray &myarray)
+{
+ argument.beginArray( qMetaTypeId<MyElement>() );
+ for ( int i = 0; i < myarray.length; ++i )
+ argument << myarray.elements[i];
+ argument.endArray();
+ return argument;
+}
+//! [6]
+
+
+//! [7]
+// append a dictionary that associates ints to MyValue types
+QDBusArgument &operator<<(QDBusArgument &argument, const MyDictionary &mydict)
+{
+ argument.beginMap( QVariant::Int, qMetaTypeId<MyValue>() );
+ for ( int i = 0; i < mydict.length; ++i ) {
+ argument.beginMapEntry();
+ argument << mydict.data[i].key << mydict.data[i].value;
+ argument.endMapEntry();
+ }
+ argument.endMap();
+ return argument;
+}
+//! [7]
+
+
+//! [8]
+const QDBusArgument &operator>>(const QDBusArgument &argument, MyStructure &mystruct)
+{
+ argument.beginStructure()
+ argument >> mystruct.member1 >> mystruct.member2 >> mystruct.member3 >> ...;
+ argument.endStructure();
+ return argument;
+}
+//! [8]
+
+
+//! [9]
+// extract a MyArray array of MyElement elements
+const QDBusArgument &operator>>(const QDBusArgument &argument, MyArray &myarray)
+{
+ argument.beginArray();
+ myarray.clear();
+
+ while ( !argument.atEnd() ) {
+ MyElement element;
+ argument >> element;
+ myarray.append( element );
+ }
+
+ argument.endArray();
+ return argument;
+}
+//! [9]
+
+
+//! [10]
+// extract a MyDictionary map that associates ints to MyValue elements
+const QDBusArgument &operator>>(const QDBusArgument &argument, MyDictionary &mydict)
+{
+ argument.beginMap();
+ mydict.clear();
+
+ while ( !argMap.atEnd() ) {
+ int key;
+ MyValue value;
+ argument.beginMapEntry();
+ argument >> key >> value;
+ argument.endMapEntry();
+ mydict.append( key, value );
+ }
+
+ argument.endMap();
+ return argument;
+}
+//! [10]
diff --git a/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
new file mode 100644
index 0000000..2a8c868
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbuscontext.cpp
@@ -0,0 +1,32 @@
+//! [0]
+class MyObject: public QObject,
+ protected QDBusContext
+{
+ Q_OBJECT
+ QDBusConnection conn;
+ QDBusMessage msg;
+
+...
+
+protected slots:
+ void process();
+public slots:
+ void methodWithError();
+ QString methodWithDelayedReply();
+};
+
+void MyObject::methodWithError()
+{
+ sendErrorReply(QDBusError::NotSupported,
+ "The method call 'methodWithError()' is not supported");
+}
+
+QString MyObject::methodWithDelayedReply()
+{
+ conn = connection();
+ msg = message();
+ setDelayedReply(true);
+ QMetaObject::invokeMethod(this, "process", Qt::QueuedConnection);
+ return QString();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
new file mode 100644
index 0000000..df883e7
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbusinterface.cpp
@@ -0,0 +1,11 @@
+//! [0]
+QDBusInterface remoteApp( "com.example.Calculator", "/Calculator/Operations",
+ "org.mathematics.RPNCalculator" );
+remoteApp.call( "PushOperand", 2 );
+remoteApp.call( "PushOperand", 2 );
+remoteApp.call( "ExecuteOperation", "+" );
+QDBusReply<int> reply = remoteApp.call( "PopOperand" );
+
+if ( reply.isValid() )
+ printf( "%d", reply.value() ); // prints 4
+//! [0]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
new file mode 100644
index 0000000..99fd6e4
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbusmetatype.cpp
@@ -0,0 +1,3 @@
+//! [0]
+qDBusRegisterMetaType<MyClass>();
+//! [0]
diff --git a/doc/src/snippets/code/src_qdbus_qdbusreply.cpp b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
new file mode 100644
index 0000000..4dc896f
--- /dev/null
+++ b/doc/src/snippets/code/src_qdbus_qdbusreply.cpp
@@ -0,0 +1,14 @@
+//! [0]
+QDBusReply<QString> reply = interface->call("RemoteMethod");
+if (reply.isValid())
+ // use the returned value
+ useValue(reply.value());
+else
+ // call failed. Show an error condition.
+ showError(reply.error());
+//! [0]
+
+
+//! [1]
+QString reply = interface->call("RemoteMethod");
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp b/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp
new file mode 100644
index 0000000..bca056c
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_canvas_q3canvas.cpp
@@ -0,0 +1,51 @@
+//! [0]
+QPrinter pr;
+if (pr.setup()) {
+ QPainter p(&pr);
+ canvas.drawArea(canvas.rect(), &p);
+}
+//! [0]
+
+
+//! [1]
+void MyCanvasView::contentsMousePressEvent(QMouseEvent* e)
+{
+ Q3CanvasItemList l = canvas()->collisions(e->pos());
+ for (Q3CanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
+ if ((*it)->rtti() == Q3CanvasRectangle::RTTI)
+ qDebug("A Q3CanvasRectangle lies somewhere at this point");
+ }
+}
+//! [1]
+
+
+//! [2]
+QMatrix wm;
+wm.scale(2, 2); // Zooms in by 2 times
+wm.rotate(90); // Rotates 90 degrees counter clockwise
+ // around the origin.
+wm.translate(0, -canvas->height());
+ // moves the canvas down so what was visible
+ // before is still visible.
+myCanvasView->setWorldMatrix(wm);
+//! [2]
+
+
+//! [3]
+QRect rc = QRect(myCanvasView->contentsX(), myCanvasView->contentsY(),
+ myCanvasView->visibleWidth(), myCanvasView->visibleHeight());
+QRect canvasRect = myCanvasView->inverseWorldMatrix().mapRect(rc);
+//! [3]
+
+
+//! [4]
+Q3CanvasItem* item;
+// Find an item, e.g. with Q3CanvasItem::collisions().
+...
+if (item->rtti() == MySprite::RTTI) {
+ MySprite* s = (MySprite*)item;
+ if (s->isDamagable()) s->loseHitPoints(1000);
+ if (s->isHot()) myself->loseHitPoints(1000);
+ ...
+}
+//! [4]
diff --git a/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp b/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp
new file mode 100644
index 0000000..ea66985
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_dialogs_q3filedialog.cpp
@@ -0,0 +1,229 @@
+//! [0]
+QString s = Q3FileDialog::getOpenFileName(
+ "/home",
+ "Images (*.png *.xpm *.jpg)",
+ this,
+ "open file dialog",
+ "Choose a file");
+//! [0]
+
+
+//! [1]
+"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"
+//! [1]
+
+
+//! [2]
+Q3FileDialog* fd = new Q3FileDialog(this, "file dialog", true);
+fd->setMode(Q3FileDialog::AnyFile);
+//! [2]
+
+
+//! [3]
+fd->setFilter("Images (*.png *.xpm *.jpg)");
+//! [3]
+
+
+//! [4]
+fd->setViewMode(Q3FileDialog::Detail);
+//! [4]
+
+
+//! [5]
+QString fileName;
+if (fd->exec() == QDialog::Accepted)
+ fileName = fd->selectedFile();
+//! [5]
+
+
+//! [6]
+class Preview : public QLabel, public Q3FilePreview
+{
+public:
+ Preview(QWidget *parent=0) : QLabel(parent) {}
+
+ void previewUrl(const Q3Url &u)
+ {
+ QString path = u.path();
+ QPixmap pix(path);
+ if (pix.isNull())
+ setText("This is not a pixmap");
+ else
+ setPixmap(pix);
+ }
+};
+//! [6]
+
+
+//! [7]
+Preview* p = new Preview;
+
+Q3FileDialog* fd = new Q3FileDialog(this);
+fd->setContentsPreviewEnabled(true);
+fd->setContentsPreview(p, p);
+fd->setPreviewMode(Q3FileDialog::Contents);
+fd->show();
+//! [7]
+
+
+//! [8]
+QStringList list = myFileDialog.selectedFiles();
+QStringList::Iterator it = list.begin();
+while(it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [8]
+
+
+//! [9]
+fd->setFilter("All C++ files (*.cpp *.cc *.C *.cxx *.c++)");
+fd->setFilter("*.cpp *.cc *.C *.cxx *.c++");
+fd->setFilter("All C++ files (*.cpp;*.cc;*.C;*.cxx;*.c++)");
+fd->setFilter("*.cpp;*.cc;*.C;*.cxx;*.c++");
+//! [9]
+
+
+//! [10]
+QString s = Q3FileDialog::getOpenFileName(
+ "/home",
+ "Images (*.png *.xpm *.jpg)",
+ this,
+ "open file dialog",
+ "Choose a file to open");
+//! [10]
+
+
+//! [11]
+QString s = Q3FileDialog::getSaveFileName(
+ "/home",
+ "Images (*.png *.xpm *.jpg)",
+ this,
+ "save file dialog",
+ "Choose a filename to save under");
+//! [11]
+
+
+//! [12]
+QString s = Q3FileDialog::getExistingDirectory(
+ "/home",
+ this,
+ "get existing directory",
+ "Choose a directory",
+ true);
+//! [12]
+
+
+//! [13]
+MyFileDialog::MyFileDialog(QWidget* parent, const char* name) :
+ Q3FileDialog(parent, name)
+{
+ QLabel* label = new QLabel("Added widgets", this);
+ QLineEdit* lineedit = new QLineEdit(this);
+ QPushButton* pushbutton = new QPushButton(this);
+
+ addWidgets(label, lineedit, pushbutton);
+}
+//! [13]
+
+
+//! [14]
+QString types("Image files (*.png *.xpm *.jpg);;"
+ "Text files (*.txt);;"
+ "Any files (*)");
+Q3FileDialog fd = new Q3FileDialog(this);
+fd->setFilters(types);
+fd->show();
+//! [14]
+
+
+//! [15]
+Q3FileDialog* fd = new Q3FileDialog(this);
+fd->addFilter("Images (*.png *.jpg *.xpm)");
+fd->show();
+//! [15]
+
+
+//! [16]
+QStringList files = Q3FileDialog::getOpenFileNames(
+ "Images (*.png *.xpm *.jpg)",
+ "/home",
+ this,
+ "open files dialog",
+ "Select one or more files to open");
+//! [16]
+
+
+//! [17]
+QStringList list = files;
+QStringList::Iterator it = list.begin();
+while(it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [17]
+
+
+//! [18]
+class Preview : public QLabel, public Q3FilePreview
+{
+public:
+ Preview(QWidget *parent=0) : QLabel(parent) {}
+
+ void previewUrl(const Q3Url &u)
+ {
+ QString path = u.path();
+ QPixmap pix(path);
+ if (pix.isNull())
+ setText("This is not a pixmap");
+ else
+ setText("This is a pixmap");
+ }
+};
+
+//...
+
+int main(int argc, char** argv)
+{
+ Preview* p = new Preview;
+
+ Q3FileDialog* fd = new Q3FileDialog(this);
+ fd->setInfoPreviewEnabled(true);
+ fd->setInfoPreview(p, p);
+ fd->setPreviewMode(Q3FileDialog::Info);
+ fd->show();
+}
+
+//! [18]
+
+
+//! [19]
+class Preview : public QLabel, public Q3FilePreview
+{
+public:
+ Preview(QWidget *parent=0) : QLabel(parent) {}
+
+ void previewUrl(const Q3Url &u)
+ {
+ QString path = u.path();
+ QPixmap pix(path);
+ if (pix.isNull())
+ setText("This is not a pixmap");
+ else
+ setPixmap(pix);
+ }
+};
+
+//...
+
+int main(int argc, char** argv)
+{
+ Preview* p = new Preview;
+
+ Q3FileDialog* fd = new Q3FileDialog(this);
+ fd->setContentsPreviewEnabled(true);
+ fd->setContentsPreview(p, p);
+ fd->setPreviewMode(Q3FileDialog::Contents);
+ fd->show();
+}
+//! [19]
diff --git a/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp b/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp
new file mode 100644
index 0000000..8aeafe8
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_dialogs_q3progressdialog.cpp
@@ -0,0 +1,41 @@
+//! [0]
+Q3ProgressDialog progress("Copying files...", "Abort Copy", numFiles,
+ this, "progress", true);
+for (int i = 0; i < numFiles; i++) {
+ progress.setProgress(i);
+ qApp->processEvents();
+
+ if (progress.wasCanceled())
+ break;
+ //... copy one file
+}
+progress.setProgress(numFiles);
+//! [0]
+
+
+//! [1]
+Operation::Operation(QObject *parent = 0)
+ : QObject(parent), steps(0)
+{
+ pd = new Q3ProgressDialog("Operation in progress.", "Cancel", 100);
+ connect(pd, SIGNAL(canceled()), this, SLOT(cancel()));
+ t = new QTimer(this);
+ connect(t, SIGNAL(timeout()), this, SLOT(perform()));
+ t->start(0);
+}
+
+void Operation::perform()
+{
+ pd->setProgress(steps);
+ //... perform one percent of the operation
+ steps++;
+ if (steps > pd->totalSteps())
+ t->stop();
+}
+
+void Operation::cancel()
+{
+ t->stop();
+ //... cleanup
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp
new file mode 100644
index 0000000..8c30389
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_itemviews_q3iconview.cpp
@@ -0,0 +1,75 @@
+//! [0]
+(void) new Q3IconViewItem(
+ iconView, // A pointer to a Q3IconView
+ "This is the text of the item",
+ aPixmap);
+//! [0]
+
+
+//! [1]
+Q3IconViewItem *item;
+for (item = iconView->firstItem(); item; item = item->nextItem())
+ do_something_with(item);
+//! [1]
+
+
+//! [2]
+Q3IconViewItem *item;
+for (item = iconView->firstItem(); item; item = item->nextItem())
+ do_something_with(item);
+//! [2]
+
+
+//! [3]
+int MyIconViewItem::compare(Q3IconViewItem *i) const
+{
+ return key().compare(i->key());
+}
+//! [3]
+
+
+//! [4]
+Q3IconView *iv = new Q3IconView(this);
+QDir dir(path, "*.xpm");
+for (uint i = 0; i < dir.count(); i++) {
+ (void) new Q3IconViewItem(iv, dir[i], QPixmap(path + dir[i]));
+}
+iv->resize(600, 400);
+iv->show();
+//! [4]
+
+
+//! [5]
+for (Q3IconViewItem *item = iv->firstItem(); item; item = item->nextItem())
+ do_something(item);
+//! [5]
+
+
+//! [6]
+Q3DragObject *MyIconView::dragObject()
+{
+ return new Q3TextDrag(currentItem()->text(), this);
+}
+//! [6]
+
+
+//! [7]
+bool MyIconViewItem::acceptDrop(const QMimeSource *mime) const
+{
+ if (mime->provides("text/plain"))
+ return true;
+ return false;
+}
+
+void MyIconViewItem::dropped(QDropEvent *evt, const Q3ValueList<Q3IconDragItem>&)
+{
+ QString label;
+ if (Q3TextDrag::decode(evt, label))
+ setText(label);
+}
+//! [7]
+
+
+//! [8]
+(void) new Q3IconViewItem(myIconview, "The text of the item", aPixmap);
+//! [8]
diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp
new file mode 100644
index 0000000..615f124
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_itemviews_q3listview.cpp
@@ -0,0 +1,73 @@
+//! [0]
+(void) new Q3ListViewItem(listView, "Column 1", "Column 2");
+(void) new Q3ListViewItem(listView->firstChild(), "A", "B", "C");
+//! [0]
+
+
+//! [1]
+Q3ListViewItem * myChild = myItem->firstChild();
+while(myChild) {
+ doSomething(myChild);
+ myChild = myChild->nextSibling();
+}
+//! [1]
+
+
+//! [2]
+Q3ListViewItemIterator it(listview);
+while (it.current()) {
+ Q3ListViewItem *item = it.current();
+ doSomething(item);
+ ++it;
+}
+//! [2]
+
+
+//! [3]
+int MyListViewItem::compare(Q3ListViewItem *i, int col,
+ bool ascending) const
+{
+ return key(col, ascending).compare(i->key(col, ascending));
+}
+//! [3]
+
+
+//! [4]
+Q3ListViewItem *i = itemAt(p);
+if (i) {
+ if (p.x() > header()->sectionPos(header()->mapToIndex(0)) +
+ treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin() ||
+ p.x() < header()->sectionPos(header()->mapToIndex(0))) {
+ ; // p is not on root decoration
+ else
+ ; // p is on the root decoration
+}
+//! [4]
+
+
+//! [5]
+QRect r(listView->itemRect(item));
+r.setHeight(qMin(item->totalHeight(),
+ listView->viewport->height() - r.y()))
+//! [5]
+
+
+//! [6]
+QList<Q3ListViewItem *> lst;
+Q3ListViewItemIterator it(myListView);
+while (it.current()) {
+ if (it.current()->isSelected())
+ lst.append(it.current());
+ ++it;
+}
+//! [6]
+
+
+//! [7]
+QList<Q3ListViewItem *> lst;
+Q3ListViewItemIterator it(myListView, Selected);
+while (it.current()) {
+ lst.append(it.current());
+ ++it;
+}
+//! [7]
diff --git a/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp b/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp
new file mode 100644
index 0000000..47f9c4e
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_itemviews_q3table.cpp
@@ -0,0 +1,57 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+for (int row = 0; row < table->numRows(); row++) {
+ for (int col = 0; col < table->numCols(); col++) {
+ table->setItem(row, col,
+ new Q3TableItem(table, Q3TableItem::WhenCurrent, QString::number(row * col)));
+ }
+}
+//! [0]
+
+
+//! [1]
+QWidget* MyTableItem::createEditor() const
+{
+ QHBox* hbox = new QHBox(table()->viewport());
+ hbox->setFocusProxy(new QLineEdit(hbox));
+ new QLineEdit(hbox);
+ return hbox;
+}
+//! [1]
+
+
+//! [2]
+p->setClipRect(table()->cellRect(row, col), QPainter::ClipPainter);
+//... your drawing code
+p->setClipping(false);
+//! [2]
+
+
+//! [3]
+Q3Table *table = new Q3Table(100, 250, this);
+table->setPixmap(3, 2, pix);
+table->setText(3, 2, "A pixmap");
+//! [3]
+
+
+//! [4]
+p->setClipRect(cellRect(row, col), QPainter::CoordPainter);
+//... your drawing code
+p->setClipping(false);
+//! [4]
+
+
+//! [5]
+Q3TableItem *i = item(row, col);
+if (initFromCell || (i && !i->isReplaceable()))
+ // If we had a Q3TableItem ask the base class to create the editor
+ return Q3Table::createEditor(row, col, initFromCell);
+else
+ return ...(create your own editor)
+//! [5]
+
+}
+
diff --git a/doc/src/snippets/code/src_qt3support_network_q3dns.cpp b/doc/src/snippets/code/src_qt3support_network_q3dns.cpp
new file mode 100644
index 0000000..9638ff1
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3dns.cpp
@@ -0,0 +1,58 @@
+//! [0]
+QStringList list = myDns.qualifiedNames();
+QStringList::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [0]
+
+
+//! [1]
+Q3ValueList<QHostAddress> list = myDns.addresses();
+Q3ValueList<QHostAddress>::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [1]
+
+
+//! [2]
+Q3ValueList<Q3Dns::MailServer> list = myDns.mailServers();
+Q3ValueList<Q3Dns::MailServer>::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [2]
+
+
+//! [3]
+Q3ValueList<Q3Dns::Server> list = myDns.servers();
+Q3ValueList<Q3Dns::Server>::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [3]
+
+
+//! [4]
+QStringList list = myDns.hostNames();
+QStringList::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [4]
+
+
+//! [5]
+QStringList list = myDns.texts();
+QStringList::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [5]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp b/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp
new file mode 100644
index 0000000..37e17d4
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3ftp.cpp
@@ -0,0 +1,65 @@
+//! [0]
+QUrlOperator op( "ftp://ftp.trolltech.com" );
+op.listChildren(); // Asks the server to provide a directory listing
+//! [0]
+
+
+//! [1]
+Q3Ftp *ftp = new Q3Ftp( this ); // this is an optional QObject parent
+ftp->connectToHost( "ftp.trolltech.com" );
+ftp->login();
+//! [1]
+
+
+//! [2]
+ftp->connectToHost( "ftp.trolltech.com" ); // id == 1
+ftp->login(); // id == 2
+ftp->cd( "qt" ); // id == 3
+ftp->get( "INSTALL" ); // id == 4
+ftp->close(); // id == 5
+//! [2]
+
+
+//! [3]
+start( 1 )
+stateChanged( HostLookup )
+stateChanged( Connecting )
+stateChanged( Connected )
+finished( 1, false )
+
+start( 2 )
+stateChanged( LoggedIn )
+finished( 2, false )
+
+start( 3 )
+finished( 3, false )
+
+start( 4 )
+dataTransferProgress( 0, 3798 )
+dataTransferProgress( 2896, 3798 )
+readyRead()
+dataTransferProgress( 3798, 3798 )
+readyRead()
+finished( 4, false )
+
+start( 5 )
+stateChanged( Closing )
+stateChanged( Unconnected )
+finished( 5, false )
+
+done( false )
+//! [3]
+
+
+//! [4]
+start( 1 )
+stateChanged( HostLookup )
+stateChanged( Connecting )
+stateChanged( Connected )
+finished( 1, false )
+
+start( 2 )
+finished( 2, true )
+
+done( true )
+//! [4]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3http.cpp b/doc/src/snippets/code/src_qt3support_network_q3http.cpp
new file mode 100644
index 0000000..6729c5f
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3http.cpp
@@ -0,0 +1,74 @@
+//! [0]
+content-type: text/html
+//! [0]
+
+
+//! [1]
+header.setValue( "content-type", "text/html" );
+QString contentType = header.value( "content-type" );
+//! [1]
+
+
+//! [2]
+QUrlOperator op( "http://qtsoftware.com" );
+op.get( "index.html" );
+//! [2]
+
+
+//! [3]
+Q3HttpRequestHeader header( "GET", "/index.html" );
+header.setValue( "Host", "qtsoftware.com" );
+http->setHost( "qtsoftware.com" );
+http->request( header );
+//! [3]
+
+
+//! [4]
+http->setHost( "qtsoftware.com" ); // id == 1
+http->get( "/index.html" ); // id == 2
+//! [4]
+
+
+//! [5]
+requestStarted( 1 )
+requestFinished( 1, false )
+
+requestStarted( 2 )
+stateChanged( Connecting )
+stateChanged( Sending )
+dataSendProgress( 77, 77 )
+stateChanged( Reading )
+responseHeaderReceived( responseheader )
+dataReadProgress( 5388, 0 )
+readyRead( responseheader )
+dataReadProgress( 18300, 0 )
+readyRead( responseheader )
+stateChanged( Connected )
+requestFinished( 2, false )
+
+done( false )
+
+stateChanged( Closing )
+stateChanged( Unconnected )
+//! [5]
+
+
+//! [6]
+http->setHost( "www.foo.bar" ); // id == 1
+http->get( "/index.html" ); // id == 2
+http->post( "register.html", data ); // id == 3
+//! [6]
+
+
+//! [7]
+requestStarted( 1 )
+requestFinished( 1, false )
+
+requestStarted( 2 )
+stateChanged( HostLookup )
+requestFinished( 2, true )
+
+done( true )
+
+stateChanged( Unconnected )
+//! [7]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp b/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp
new file mode 100644
index 0000000..243be9e
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3localfs.cpp
@@ -0,0 +1,4 @@
+//! [0]
+Q3UrlOperator op( "file:///tmp" );
+op.listChildren(); // Asks the server to provide a directory listing
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp b/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp
new file mode 100644
index 0000000..51d1059
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3networkprotocol.cpp
@@ -0,0 +1,8 @@
+//! [0]
+Q3NetworkProtocol::registerNetworkProtocol( "nntp", new Q3NetworkProtocolFactory<Nntp> );
+//! [0]
+
+
+//! [1]
+Q3Ftp *ftp = Q3NetworkProtocol::getNetworkProtocol( "ftp" );
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3socket.cpp b/doc/src/snippets/code/src_qt3support_network_q3socket.cpp
new file mode 100644
index 0000000..34474fb
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3socket.cpp
@@ -0,0 +1,4 @@
+//! [0]
+while( !socket->canReadLine() ) // WRONG
+ ;
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp b/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp
new file mode 100644
index 0000000..cd50fd2
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3socketdevice.cpp
@@ -0,0 +1,4 @@
+//! [0]
+::close( sd->socket() );
+sd->writeBlock( someData, 42 );
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3url.cpp b/doc/src/snippets/code/src_qt3support_network_q3url.cpp
new file mode 100644
index 0000000..3b78a57
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3url.cpp
@@ -0,0 +1,43 @@
+//! [0]
+Q3Url url( "http://qtsoftware.com" );
+// or
+Q3Url url( "file:///home/myself/Mail", "Inbox" );
+//! [0]
+
+
+//! [1]
+Q3Url url( "http://qtsoftware.com" );
+QString s = url;
+// or
+QString s( "http://qtsoftware.com" );
+Q3Url url( s );
+//! [1]
+
+
+//! [2]
+Q3Url url( "ftp://ftp.trolltech.com/qt/source", "qt-2.1.0.tar.gz" );
+//! [2]
+
+
+//! [3]
+Q3Url url( "ftp://ftp.trolltech.com/qt/source", "/usr/local" );
+//! [3]
+
+
+//! [4]
+Q3Url url( "ftp://ftp.trolltech.com/qt/source", "file:///usr/local" );
+//! [4]
+
+
+//! [5]
+QString url = http://qtsoftware.com
+Q3Url::encode( url );
+// url is now "http%3A//www%20trolltech%20com"
+//! [5]
+
+
+//! [6]
+QString url = "http%3A//www%20trolltech%20com"
+Q3Url::decode( url );
+// url is now "http://qtsoftware.com"
+//! [6]
diff --git a/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp b/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp
new file mode 100644
index 0000000..03b8f7b
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_network_q3urloperator.cpp
@@ -0,0 +1,37 @@
+//! [0]
+Q3UrlOperator *op = new Q3UrlOperator();
+op->copy( QString("ftp://ftp.trolltech.com/qt/source/qt-2.1.0.tar.gz"),
+ "file:///tmp" );
+//! [0]
+
+
+//! [1]
+Q3UrlOperator op( "http://www.whatever.org/cgi-bin/search.pl?cmd=Hello" );
+op.get();
+//! [1]
+
+
+//! [2]
+Q3UrlOperator op( "ftp://ftp.whatever.org/pub" );
+// do some other stuff like op.listChildren() or op.mkdir( "new_dir" )
+op.get( "a_file.txt" );
+//! [2]
+
+
+//! [3]
+Q3UrlOperator op( "http://www.whatever.org/cgi-bin" );
+op.get( "search.pl?cmd=Hello" ); // WRONG!
+//! [3]
+
+
+//! [4]
+Q3UrlOperator op( "ftp://ftp.whatever.com/home/me/filename.dat" );
+op.put( data );
+//! [4]
+
+
+//! [5]
+Q3UrlOperator op( "ftp://ftp.whatever.com/home/me" );
+// do some other stuff like op.listChildren() or op.mkdir( "new_dir" )
+op.put( data, "filename.dat" );
+//! [5]
diff --git a/doc/src/snippets/code/src_qt3support_other_q3accel.cpp b/doc/src/snippets/code/src_qt3support_other_q3accel.cpp
new file mode 100644
index 0000000..ba315c0
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_other_q3accel.cpp
@@ -0,0 +1,40 @@
+//! [0]
+QPushButton p("&Exit", parent); // automatic shortcut Alt+E
+Q3PopupMenu *fileMenu = new fileMenu(parent);
+fileMenu->insertItem("Undo", parent, SLOT(undo()),
+ Qt::CTRL + Qt::Key_Z);
+//! [0]
+
+
+//! [1]
+accelerator->insertItem(QKeySequence("M"));
+//! [1]
+
+
+//! [2]
+Q3Accel *a = new Q3Accel(myWindow);
+a->connectItem(a->insertItem(Qt::CTRL + Qt::Key_P),
+ myWindow, SLOT(printDoc()));
+//! [2]
+
+
+//! [3]
+Q3Accel *a = new Q3Accel(myWindow); // create accels for myWindow
+a->insertItem(CTRL + Key_P, 200); // Ctrl+P, e.g. to print document
+a->insertItem(ALT + Key_X, 201); // Alt+X, e.g. to quit
+a->insertItem(UNICODE_ACCEL + 'q', 202); // Unicode 'q', e.g. to quit
+a->insertItem(Key_D); // gets a unique negative id < -1
+a->insertItem(CTRL + SHIFT + Key_P); // gets a unique negative id < -1
+//! [3]
+
+
+//! [4]
+a->connectItem(201, mainView, SLOT(quit()));
+//! [4]
+
+
+//! [5]
+Q3PopupMenu *file = new Q3PopupMenu(this);
+file->insertItem(p1, tr("&Open..."), this, SLOT(open()),
+ Q3Accel::stringToKey(tr("Ctrl+O", "File|Open")));
+//! [5]
diff --git a/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp b/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp
new file mode 100644
index 0000000..f00ad73
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_other_q3mimefactory.cpp
@@ -0,0 +1,32 @@
+//! [0]
+static const char* myimage_data[]={
+"...",
+...
+"..."};
+//! [0]
+
+
+//! [1]
+Q3MimeSourceFactory::defaultFactory()->setImage("myimage", QImage(myimage_data));
+//! [1]
+
+
+//! [2]
+QLabel* label = new QLabel(
+ "Rich text with embedded image:<img source=\"myimage\">"
+ "Isn't that <em>cute</em>?");
+//! [2]
+
+
+//! [3]
+delete label;
+Q3MimeSourceFactory::defaultFactory()->setData("myimage", 0);
+//! [3]
+
+
+//! [4]
+setExtensionType("html", "text/html;charset=iso8859-1");
+setExtensionType("htm", "text/html;charset=iso8859-1");
+setExtensionType("txt", "text/plain");
+setExtensionType("xml", "text/xml;charset=UTF-8");
+//! [4]
diff --git a/doc/src/snippets/code/src_qt3support_other_q3process.cpp b/doc/src/snippets/code/src_qt3support_other_q3process.cpp
new file mode 100644
index 0000000..2ce94bb
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_other_q3process.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QStringList list = myProcess.arguments();
+QStringList::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp b/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp
new file mode 100644
index 0000000..c443c2e
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_other_q3process_unix.cpp
@@ -0,0 +1,4 @@
+//! [0]
+process->tryTerminate();
+QTimer::singleShot( 5000, process, SLOT(kill()) );
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp b/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp
new file mode 100644
index 0000000..1e807d5
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_painting_q3paintdevicemetrics.cpp
@@ -0,0 +1,4 @@
+//! [0]
+Q3PaintDeviceMetrics pdm(myWidget);
+double aspect = (double)pdm.widthMM() / (double)pdm.heightMM();
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp b/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp
new file mode 100644
index 0000000..e932250
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_painting_q3painter.cpp
@@ -0,0 +1,4 @@
+//! [0]
+QPainter p(myWidget);
+p.drawArc(QRect(10,10, 70,100), 100*16, 160*16); // draws a "(" arc
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp b/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp
new file mode 100644
index 0000000..709b386
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_painting_q3picture.cpp
@@ -0,0 +1,14 @@
+//! [0]
+Q3Picture picture;
+picture.load("drawing.svg", SVG);
+//! [0]
+
+
+//! [1]
+Q3Picture picture;
+QPainter painter;
+painter.begin(&picture); // paint in picture
+...
+painter.end(); // painting done
+picture.save("drawing.svg", SVG); // save picture
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp b/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp
new file mode 100644
index 0000000..cb86b32
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3databrowser.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QStringList list = myDataBrowser.sort();
+QStringList::Iterator it = list.begin();
+while(it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp b/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp
new file mode 100644
index 0000000..aa72f44
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3datatable.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QStringList list = myDataTable.sort();
+QStringList::Iterator it = list.begin();
+while( it != list.end() ) {
+ myProcessing( *it );
+ ++it;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp b/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp
new file mode 100644
index 0000000..b0b9a59
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3dataview.cpp
@@ -0,0 +1,4 @@
+//! [0]
+myView.setRecord(record);
+myView.readFields();
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp
new file mode 100644
index 0000000..b3b643d
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlcursor.cpp
@@ -0,0 +1,100 @@
+//! [0]
+Q3SqlCursor cur( "staff" ); // Specify the table/view name
+cur.select(); // We'll retrieve every record
+while ( cur.next() ) {
+ qDebug( cur.value( "id" ).toString() + ": " +
+ cur.value( "surname" ).toString() + ' ' +
+ cur.value( "salary" ).toString() );
+}
+//! [0]
+
+
+//! [1]
+Q3SqlCursor cur( "prices" );
+cur.select( "id=202" );
+if ( cur.next() ) {
+ QSqlRecord *buffer = cur.primeUpdate();
+ double price = buffer->value( "price" ).toDouble();
+ double newprice = price * 1.05;
+ buffer->setValue( "price", newprice );
+ cur.update();
+}
+//! [1]
+
+
+//! [2]
+Q3SqlCursor cur("Employee"); // Use the Employee table or view
+cur.select("deptno=10"); // select all records in department 10
+while(cur.next()) {
+ ... // process data
+}
+...
+// select records in other departments, ordered by department number
+cur.select("deptno>10", cur.index("deptno"));
+...
+//! [2]
+
+
+//! [3]
+Q3SqlCursor cur("Employee");
+cur.select("deptno=10"); // select all records in department 10
+while(cur.next()) {
+ ... // process data
+}
+...
+cur.select(); // re-selects all records in department 10
+...
+//! [3]
+
+
+//! [4]
+Q3SqlCursor cur("Employee");
+QSqlIndex pk = cur.primaryIndex();
+cur.setValue("id", 10);
+cur.select(pk, pk); // generates "SELECT ... FROM Employee WHERE id=10 ORDER BY id"
+...
+//! [4]
+
+
+//! [5]
+Q3SqlCursor cur("Employee");
+cur.setMode(Q3SqlCursor::Writable); // allow insert/update/delete
+...
+cur.setMode(Q3SqlCursor::Insert | Q3SqlCursor::Update); // allow inserts and updates only
+...
+cur.setMode(Q3SqlCursor::ReadOnly); // no inserts/updates/deletes allowed
+
+//! [5]
+
+
+//! [6]
+Q3SqlCursor cur("prices");
+QSqlRecord *buffer = cur.primeInsert();
+buffer->setValue("id", 53981);
+buffer->setValue("name", "Thingy");
+buffer->setValue("price", 105.75);
+cur.insert();
+//! [6]
+
+
+//! [7]
+Q3SqlCursor cur("prices");
+cur.select("id=202");
+if (cur.next()) {
+ QSqlRecord *buffer = cur.primeUpdate();
+ double price = buffer->value("price").toDouble();
+ double newprice = price * 1.05;
+ buffer->setValue("price", newprice);
+ cur.update();
+}
+//! [7]
+
+
+//! [8]
+Q3SqlCursor cur("prices");
+cur.select("id=999");
+if (cur.next()) {
+ cur.primeDelete();
+ cur.del();
+}
+//! [8]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp
new file mode 100644
index 0000000..e91b7ed
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlform.cpp
@@ -0,0 +1,26 @@
+//! [0]
+QLineEdit myEditor(this);
+Q3SqlForm myForm(this);
+Q3SqlCursor myCursor("mytable");
+
+// Execute a query to make the cursor valid
+myCursor.select();
+// Move the cursor to a valid record (the first record)
+myCursor.next();
+// Set the form's record pointer to the cursor's edit buffer (which
+// contains the current record's values)
+myForm.setRecord(myCursor.primeUpdate());
+
+// Insert a field into the form that uses myEditor to edit the
+// field 'somefield' in 'mytable'
+myForm.insert(&myEditor, "somefield");
+
+// Update myEditor with the value from the mapped database field
+myForm.readFields();
+...
+// Let the user edit the form
+...
+// Update the database
+myForm.writeFields(); // Update the cursor's edit buffer from the form
+myCursor.update(); // Update the database from the cursor's buffer
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp
new file mode 100644
index 0000000..9d5b2c1
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlmanager_p.cpp
@@ -0,0 +1,11 @@
+//! [0]
+Q3SqlCursor* myCursor = myManager.cursor();
+...
+QSqlRecord* buf = myCursor->primeUpdate();
+buf->setValue("name", "Ola");
+buf->setValue("city", "Oslo");
+...
+myCursor->update(); // update current record
+myCursor->select(); // refresh the cursor
+myManager.findBuffer(myCursor->primaryIndex()); // go to the updated record
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp
new file mode 100644
index 0000000..55146de
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlpropertymap.cpp
@@ -0,0 +1,35 @@
+//! [0]
+Q3SqlPropertyMap *myMap = new Q3SqlPropertyMap();
+Q3SqlForm *myForm = new Q3SqlForm(this);
+MyEditor myEditor(this);
+
+// Set the Q3SqlForm's record buffer to the update buffer of
+// a pre-existing Q3SqlCursor called 'cur'.
+myForm->setRecord(cur->primeUpdate());
+
+// Install the customized map
+myMap->insert("MyEditor", "content");
+myForm->installPropertyMap(myMap); // myForm now owns myMap
+...
+// Insert a field into the form that uses a myEditor to edit the
+// field 'somefield'
+myForm->insert(&myEditor, "somefield");
+
+// Update myEditor with the value from the mapped database field
+myForm->readFields();
+...
+// Let the user edit the form
+...
+// Update the database fields with the values in the form
+myForm->writeFields();
+...
+//! [0]
+
+
+//! [1]
+Q3SqlPropertyMap *myMap = new Q3SqlPropertyMap;
+
+myMap->insert("MyEditor", "content");
+Q3SqlPropertyMap::installDefaultMap(myMap);
+...
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp b/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp
new file mode 100644
index 0000000..bfb7b04
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_sql_q3sqlselectcursor.cpp
@@ -0,0 +1,11 @@
+//! [0]
+...
+Q3SqlSelectCursor* cur = new Q3SqlSelectCursor("SELECT id, firstname, lastname FROM author");
+Q3DataTable* table = new Q3DataTable(this);
+table->setSqlCursor(cur, true, true);
+table->refresh();
+...
+cur->exec("SELECT * FROM books");
+table->refresh();
+...
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp b/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp
new file mode 100644
index 0000000..073d716
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_text_q3simplerichtext.cpp
@@ -0,0 +1,3 @@
+//! [0]
+Q3SimpleRichText myrichtext(contents, mywidget->font());
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp b/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp
new file mode 100644
index 0000000..b042efb
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_text_q3textbrowser.cpp
@@ -0,0 +1,3 @@
+//! [0]
+mimeSourceFactory()->setExtensionType("qml", "text/utf8");
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp b/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp
new file mode 100644
index 0000000..e8d5784
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_text_q3textedit.cpp
@@ -0,0 +1,31 @@
+//! [0]
+QFile file(fileName); // Read the text from a file
+if (file.open(IO_ReadOnly)) {
+ QTextStream stream(&file);
+ textEdit->setText(stream.read());
+}
+
+QFile file(fileName); // Write the text to a file
+if (file.open(IO_WriteOnly)) {
+ QTextStream stream(&file);
+ stream << textEdit->text();
+ textEdit->setModified(false);
+}
+//! [0]
+
+
+//! [1]
+This is <font color=red>red</font> while <b>this</b> is <font color=blue>blue</font>.
+<font color=green><font color=yellow>Yellow,</font> and <u>green</u>.
+//! [1]
+
+
+//! [2]
+Q3TextEdit * log = new Q3TextEdit(this);
+log->setTextFormat(Qt::LogText);
+Q3StyleSheetItem * item = new Q3StyleSheetItem(log->styleSheet(), "mytag");
+item->setColor("red");
+item->setFontWeight(QFont::Bold);
+item->setFontUnderline(true);
+log->append("This is a <mytag>custom tag</mytag>!");
+//! [2]
diff --git a/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp b/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp
new file mode 100644
index 0000000..664a690
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_text_q3textstream.cpp
@@ -0,0 +1,29 @@
+//! [0]
+QString str;
+Q3TextStream ts( &str, IO_WriteOnly );
+ts << "pi = " << 3.14; // str == "pi = 3.14"
+//! [0]
+
+
+//! [1]
+QString str = "pi = 3.14";
+Q3TextStream ts( &str, IO_WriteOnly );
+ts << "2+2 = " << 2+2; // str == "2+2 = 414"
+//! [1]
+
+
+//! [2]
+QByteArray array;
+Q3TextStream ts( array, IO_WriteOnly );
+ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14"
+//! [2]
+
+
+//! [3]
+QByteArray array;
+QBuffer buf( array );
+buf.open( IO_WriteOnly );
+Q3TextStream ts( &buf );
+ts << "pi = " << 3.14 << '\0'; // array == "pi = 3.14"
+buf.close();
+//! [3]
diff --git a/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp b/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp
new file mode 100644
index 0000000..9985e9d
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_tools_q3cstring.cpp
@@ -0,0 +1,40 @@
+//! [0]
+Q3CString str("helloworld", 6); // assigns "hello" to str
+//! [0]
+
+
+//! [1]
+Q3CString a; // a.data() == 0, a.size() == 0, a.length() == 0
+Q3CString b == ""; // b.data() == "", b.size() == 1, b.length() == 0
+a.isNull(); // true because a.data() == 0
+a.isEmpty(); // true because a.length() == 0
+b.isNull(); // false because b.data() == ""
+b.isEmpty(); // true because b.length() == 0
+//! [1]
+
+
+//! [2]
+Q3CString s = "truncate this string";
+s.truncate(5); // s == "trunc"
+//! [2]
+
+
+//! [3]
+Q3CString s;
+s.sprintf("%d - %s", 1, "first"); // result < 256 chars
+
+Q3CString big(25000); // very long string
+big.sprintf("%d - %s", 2, longString); // result < 25000 chars
+//! [3]
+
+
+//! [4]
+Q3CString s("apple");
+Q3CString t = s.leftJustify(8, '.'); // t == "apple..."
+//! [4]
+
+
+//! [5]
+Q3CString s("pie");
+Q3CString t = s.rightJustify(8, '.'); // t == ".....pie"
+//! [5]
diff --git a/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp b/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp
new file mode 100644
index 0000000..36f7491
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_tools_q3deepcopy.cpp
@@ -0,0 +1,58 @@
+//! [0]
+// all 5 strings share the same data
+QString s1 = "abcd";
+QString s2 = s1;
+QString s3 = s2;
+QString s4 = s3;
+QString s5 = s2;
+//! [0]
+
+
+//! [1]
+// s1, s2 and s5 share the same data, neither s3 nor s4 are shared
+QString s1 = "abcd";
+QString s2 = s1;
+Q3DeepCopy<QString> s3 = s2; // s3 is a deep copy of s2
+QString s4 = s3; // s4 is a deep copy of s3
+QString s5 = s2;
+//! [1]
+
+
+//! [2]
+// s1, s2 and s5 share the same data, s3 and s4 share the same data
+QString s1 = "abcd";
+QString s2 = s1;
+QString s3 = Q3DeepCopy<QString>( s2 ); // s3 is a deep copy of s2
+QString s4 = s3; // s4 is a shallow copy of s3
+QString s5 = s2;
+//! [2]
+
+
+//! [3]
+Q3DeepCopy<QString> global_string; // global string data
+QMutex global_mutex; // mutex to protext global_string
+
+...
+
+void setGlobalString( const QString &str )
+{
+ global_mutex.lock();
+ global_string = str; // global_string is a deep copy of str
+ global_mutex.unlock();
+}
+
+...
+
+void MyThread::run()
+{
+ global_mutex.lock();
+ QString str = global_string; // str is a deep copy of global_string
+ global_mutex.unlock();
+
+ // process the string data
+ ...
+
+ // update global_string
+ setGlobalString( str );
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp b/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp
new file mode 100644
index 0000000..7108262
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_tools_q3garray.cpp
@@ -0,0 +1,20 @@
+//! [0]
+static uchar bindata[] = { 231, 1, 44, ... };
+QByteArray a;
+a.setRawData(bindata, sizeof(bindata)); // a points to bindata
+QDataStream s(a, IO_ReadOnly); // open on a's data
+s >> <something>; // read raw bindata
+s.close();
+a.resetRawData(bindata, sizeof(bindata)); // finished
+//! [0]
+
+
+//! [1]
+static uchar bindata[] = { 231, 1, 44, ... };
+QByteArray a, b;
+a.setRawData(bindata, sizeof(bindata)); // a points to bindata
+a.resize(8); // will crash
+b = a; // will crash
+a[2] = 123; // might crash
+ // forget to resetRawData - will crash
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp b/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp
new file mode 100644
index 0000000..7793ba2
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_tools_q3signal.cpp
@@ -0,0 +1,38 @@
+//! [0]
+#include <q3signal.h>
+
+class MyClass
+{
+public:
+ MyClass();
+ ~MyClass();
+
+ void doSomething();
+
+ void connect(QObject *receiver, const char *member);
+
+private:
+ Q3Signal *sig;
+};
+
+MyClass::MyClass()
+{
+ sig = new Q3Signal;
+}
+
+MyClass::~MyClass()
+{
+ delete sig;
+}
+
+void MyClass::doSomething()
+{
+ // ... does something
+ sig->activate(); // emits the signal
+}
+
+void MyClass::connect(QObject *receiver, const char *member)
+{
+ sig->connect(receiver, member);
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp
new file mode 100644
index 0000000..90d7b14
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3combobox.cpp
@@ -0,0 +1,15 @@
+//! [0]
+Q3ComboBox *c = new Q3ComboBox(this, tr("read-only combobox"));
+//! [0]
+
+
+//! [1]
+Q3ComboBox *c1 = new Q3ComboBox(false, this, tr("read-only combobox"));
+Q3ComboBox *c2 = new Q3ComboBox(true, this, tr("editable combobox"));
+//! [1]
+
+
+//! [2]
+static const char* items[] = { "red", "green", "blue", 0 };
+combo->insertStrList( items );
+//! [2]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp
new file mode 100644
index 0000000..74070ec
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3datetimeedit.cpp
@@ -0,0 +1,28 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+Q3DateEdit *dateEdit = new Q3DateEdit(QDate::currentDate(), this);
+dateEdit->setRange(QDate::currentDate().addDays(-365),
+ QDate::currentDate().addDays( 365));
+dateEdit->setOrder(Q3DateEdit::MDY);
+dateEdit->setAutoAdvance(true);
+//! [0]
+
+
+//! [1]
+QTime timeNow = QTime::currentTime();
+Q3TimeEdit *timeEdit = new Q3TimeEdit(timeNow, this);
+timeEdit->setRange(timeNow, timeNow.addSecs(60 * 60));
+//! [1]
+
+
+//! [2]
+Q3DateTimeEdit *dateTimeEdit = new Q3DateTimeEdit(QDateTime::currentDateTime(), this);
+dateTimeEdit->dateEdit()->setRange(QDateTime::currentDate(),
+ QDateTime::currentDate().addDays(7));
+//! [2]
+
+}
+
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp
new file mode 100644
index 0000000..bde7d84
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3dockarea.cpp
@@ -0,0 +1,8 @@
+//! [0]
+ts << *myDockArea;
+//! [0]
+
+
+//! [1]
+ts >> *myDockArea;
+//! [1]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp
new file mode 100644
index 0000000..1476dcb
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3dockwindow.cpp
@@ -0,0 +1,4 @@
+//! [0]
+Q3ToolBar *fileTools = new Q3ToolBar(this, "File Actions");
+moveDockWindow(fileTools, Left);
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp
new file mode 100644
index 0000000..43dca3e
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3gridview.cpp
@@ -0,0 +1,6 @@
+//! [0]
+p->setClipRect(cellRect(), QPainter::CoordPainter);
+//... your drawing code
+p->setClipping(false);
+
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp
new file mode 100644
index 0000000..684d182
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3header.cpp
@@ -0,0 +1,6 @@
+//! [0]
+// Allow resizing of all current and future sections
+header->setResizeEnabled(true);
+// Disable resizing of section 3, (the fourth section added)
+header->setResizeEnabled(false, 3);
+//! [0]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp
new file mode 100644
index 0000000..c63b481
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3mainwindow.cpp
@@ -0,0 +1,45 @@
+//! [0]
+Q3MainWindow *mw = new Q3MainWindow;
+QTextEdit *edit = new QTextEdit(mw, "editor");
+edit->setFocus();
+mw->setWindowTitle("Main Window");
+mw->setCentralWidget(edit);
+mw->show();
+//! [0]
+
+
+//! [1]
+Q3ToolBar *tb = new Q3ToolBar(this);
+addDockWindow(tb, tr("Menubar"), Top, false);
+QMenuBar *mb = new QMenuBar(tb);
+mb->setFrameStyle(QFrame::NoFrame);
+tb->setStretchableWidget(mb);
+setDockEnabled(tb, Left, false);
+setDockEnabled(tb, Right, false);
+//! [1]
+
+
+//! [2]
+QFile file(filename);
+if (file.open(IO_WriteOnly)) {
+ QTextStream stream(&file);
+ stream << *mainWindow;
+ file.close();
+}
+//! [2]
+
+
+//! [3]
+QFile file(filename);
+if (file.open(IO_ReadOnly)) {
+ QTextStream stream(&file);
+ stream >> *mainWindow;
+ file.close();
+}
+//! [3]
+
+
+//! [4]
+Q3PopupMenu * help = new Q3PopupMenu(this);
+help->insertItem("What's &This", this , SLOT(enterWhatsThis()), Qt::SHIFT+Qt::Key_F1);
+//! [4]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp
new file mode 100644
index 0000000..58d5acf
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3scrollview.cpp
@@ -0,0 +1,61 @@
+//! [0]
+Q3ScrollView* sv = new Q3ScrollView(...);
+QWidget *widget = new QWidget(sv->viewport());
+QVBoxLayout *layout = new QVBoxLayout(widget);
+addChild(widget);
+//! [0]
+
+
+//! [1]
+QLabel* child1 = new QLabel("CHILD", widget);
+QLabel* child2 = new QLabel("CHILD", widget);
+QLabel* child3 = new QLabel("CHILD", widget);
+layout->addWidget(child1);
+layout->addWidget(child2);
+layout->addWidget(child3);
+...
+//! [1]
+
+
+//! [2]
+Q3ScrollView* sv = new Q3ScrollView(...);
+QLabel* child1 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child1);
+QLabel* child2 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child2);
+QLabel* child3 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child3);
+//! [2]
+
+
+//! [3]
+Q3ScrollView* sv = new Q3ScrollView(...);
+sv->enableClipper(true);
+QLabel* child1 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child1);
+QLabel* child2 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child2);
+QLabel* child3 = new QLabel("CHILD", sv->viewport());
+sv->addChild(child3);
+//! [3]
+
+
+//! [4]
+{
+ // Fill a 40000 by 50000 rectangle at (100000,150000)
+
+ // Calculate the coordinates...
+ int x1 = 100000, y1 = 150000;
+ int x2 = x1+40000-1, y2 = y1+50000-1;
+
+ // Clip the coordinates so X/Windows will not have problems...
+ if (x1 < clipx) x1=clipx;
+ if (y1 < clipy) y1=clipy;
+ if (x2 > clipx+clipw-1) x2=clipx+clipw-1;
+ if (y2 > clipy+cliph-1) y2=clipy+cliph-1;
+
+ // Paint using the small coordinates...
+ if (x2 >= x1 && y2 >= y1)
+ p->fillRect(x1, y1, x2-x1+1, y2-y1+1, red);
+}
+//! [4]
diff --git a/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp b/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp
new file mode 100644
index 0000000..f7b48ba
--- /dev/null
+++ b/doc/src/snippets/code/src_qt3support_widgets_q3whatsthis.cpp
@@ -0,0 +1,3 @@
+//! [0]
+(void)Q3WhatsThis::whatsThisButton( my_help_tool_bar );
+//! [0]
diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
new file mode 100644
index 0000000..c143e33
--- /dev/null
+++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
@@ -0,0 +1,188 @@
+
+void wrapInFunction()
+{
+
+//! [0]
+QVERIFY(1 + 1 == 2);
+//! [0]
+
+
+//! [1]
+QVERIFY2(1 + 1 == 2, "A breach in basic arithmetic occured.");
+//! [1]
+
+
+//! [2]
+QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
+//! [2]
+
+
+//! [3]
+void TestQString::toInt_data()
+{
+ QTest::addColumn<QString>("aString");
+ QTest::addColumn<int>("expected");
+
+ QTest::newRow("positive value") << "42" << 42;
+ QTest::newRow("negative value") << "-42" << -42;
+ QTest::newRow("zero") << "0" << 0;
+}
+//! [3]
+
+
+//! [4]
+void TestQString::toInt()
+{
+ QFETCH(QString, aString);
+ QFETCH(int, expected);
+
+ QCOMPARE(aString.toInt(), expected);
+}
+//! [4]
+
+
+//! [5]
+if (sizeof(int) != 4)
+ QFAIL("This test has not been ported to this platform yet.");
+//! [5]
+
+
+//! [6]
+QFETCH(QString, myString);
+QCOMPARE(QString("hello").toUpper(), myString);
+//! [6]
+
+
+//! [7]
+QTEST(QString("hello").toUpper(), "myString");
+//! [7]
+
+
+//! [8]
+if (!QSqlDatabase::drivers().contains("SQLITE"))
+ QSKIP("This test requires the SQLITE database driver", SkipAll);
+//! [8]
+
+
+//! [9]
+QEXPECT_FAIL("", "Will fix in the next release", Continue);
+QCOMPARE(i, 42);
+QCOMPARE(j, 43);
+//! [9]
+
+
+//! [10]
+QEXPECT_FAIL("data27", "Oh my, this is soooo broken", Abort);
+QCOMPARE(i, 42);
+//! [10]
+
+
+//! [11]
+class TestQString: public QObject { ... };
+QTEST_MAIN(TestQString)
+//! [11]
+
+
+//! [12]
+#ifdef Q_WS_X11
+ QTEST_MAIN(MyX11Test)
+#else
+ // do nothing on non-X11 platforms
+ QTEST_NOOP_MAIN
+#endif
+//! [12]
+
+
+//! [13]
+QTest::keyClick(myWidget, 'a');
+//! [13]
+
+
+//! [14]
+QTest::keyClick(myWidget, Qt::Key_Escape);
+
+QTest::keyClick(myWidget, Qt::Key_Escape, Qt::ShiftModifier, 200);
+//! [14]
+
+
+//! [15]
+QTest::keyClicks(myWidget, "hello world");
+//! [15]
+
+
+//! [16]
+namespace QTest {
+ template<>
+ char *toString(const MyPoint &point)
+ {
+ QByteArray ba = "MyPoint(";
+ ba += QByteArray::number(point.x()) + ", " + QByteArray::number(point.y());
+ ba += ")";
+ return qstrdup(ba.data());
+ }
+}
+//! [16]
+
+
+//! [17]
+int i = 0;
+while (myNetworkServerNotResponding() && i++ < 50)
+ QTest::qWait(250);
+//! [17]
+
+
+//! [18]
+MyFirstTestObject test1;
+QTest::qExec(&test1);
+
+MySecondTestObject test2;
+QTest::qExec(&test2);
+//! [18]
+
+
+//! [19]
+QDir dir;
+
+QTest::ignoreMessage(QtWarningMsg, "QDir::mkdir: Empty or null file name(s)");
+dir.mkdir("");
+//! [19]
+
+
+//! [20]
+void myTestFunction_data()
+{
+ QTest::addColumn<QString>("aString");
+ QTest::newRow("just hello") << QString("hello");
+ QTest::newRow("a null string") << QString();
+}
+//! [20]
+
+
+//! [21]
+void myTestFunction_data() {
+ QTest::addColumn<int>("intval");
+ QTest::addColumn<QString>("str");
+ QTest::addColumn<double>("dbl");
+
+ QTest::newRow("row1") << 1 << "hello" << 1.5;
+}
+//! [21]
+
+
+//! [22]
+void MyTestClass::cleanup()
+{
+ if (qstrcmp(currentTestFunction(), "myDatabaseTest") == 0) {
+ // clean up all database connections
+ closeAllDatabases();
+ }
+}
+//! [22]
+
+
+//! [23]
+QTest::qSleep(250);
+//! [23]
+
+}
+
diff --git a/doc/src/snippets/code/src_script_qscriptable.cpp b/doc/src/snippets/code/src_script_qscriptable.cpp
new file mode 100644
index 0000000..3a02d51
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptable.cpp
@@ -0,0 +1,25 @@
+//! [0]
+class MyScriptableObject: public QObject,
+ protected QScriptable
+{
+ Q_OBJECT
+...
+
+public slots:
+ void doSomething();
+ double doSomethingElse();
+}
+//! [0]
+
+
+//! [1]
+void MyScriptableObject::doSomething()
+{
+ context()->throwError("Threw an error from a slot");
+}
+
+double MyScriptableObject::doSomethingElse()
+{
+ return qscriptvalue_cast<double>(thisObject());
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_script_qscriptclass.cpp b/doc/src/snippets/code/src_script_qscriptclass.cpp
new file mode 100644
index 0000000..9d55e0f
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptclass.cpp
@@ -0,0 +1,10 @@
+//! [0]
+if (extension == Callable) {
+ QScriptContext *context = qvariant_cast<QScriptContext*>(argument);
+ QScriptEngine *engine = context->engine();
+ double sum = 0;
+ for (int i = 0; i < context->argumentCount(); ++i)
+ sum += context->argument(i).toNumber();
+ return sum;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_script_qscriptcontext.cpp b/doc/src/snippets/code/src_script_qscriptcontext.cpp
new file mode 100644
index 0000000..a2f18158
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptcontext.cpp
@@ -0,0 +1,28 @@
+//! [0]
+foo(20.5, "hello", new Object())
+//! [0]
+
+
+//! [1]
+QScriptValue Person_prototype_fullName(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue self = context->thisObject();
+ QString result;
+ result += self.property("firstName").toString();
+ result += QLatin1String(" ");
+ result += self.property("lastName").toString();
+ return result;
+}
+//! [1]
+
+
+//! [2]
+QScriptValue myInclude(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString fileName = ctx->argument(0).toString();
+ QString contents = readTheFile(fileName);
+ ctx->setActivationObject(ctx->parentContext()->activationObject());
+ ctx->setThisObject(ctx->parentContext()->thisObject());
+ return eng->evaluate(contents, fileName);
+}
+//! [2]
diff --git a/doc/src/snippets/code/src_script_qscriptengine.cpp b/doc/src/snippets/code/src_script_qscriptengine.cpp
new file mode 100644
index 0000000..81d4fbc
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptengine.cpp
@@ -0,0 +1,292 @@
+//! [0]
+QScriptEngine myEngine;
+QScriptValue three = myEngine.evaluate("1 + 2");
+//! [0]
+
+
+//! [1]
+QScriptValue fun = myEngine.evaluate("function(a, b) { return a + b; }");
+QScriptValueList args;
+args << 1 << 2;
+QScriptValue threeAgain = fun.call(QScriptValue(), args);
+//! [1]
+
+
+//! [2]
+QString fileName = "helloworld.qs";
+QFile scriptFile(fileName);
+if (!scriptFile.open(QIODevice::ReadOnly))
+ // handle error
+QTextStream stream(&scriptFile);
+QString contents = stream.readAll();
+scriptFile.close();
+myEngine.evaluate(contents, fileName);
+//! [2]
+
+
+//! [3]
+myEngine.globalObject().setProperty("myNumber", 123);
+...
+QScriptValue myNumberPlusOne = myEngine.evaluate("myNumber + 1");
+//! [3]
+
+
+//! [4]
+QScriptValue result = myEngine.evaluate(...);
+if (myEngine.hasUncaughtException()) {
+ int line = myEngine.uncaughtExceptionLineNumber();
+ qDebug() << "uncaught exception at line" << line << ":" << result.toString();
+}
+//! [4]
+
+
+//! [5]
+QPushButton button;
+QScriptValue scriptButton = myEngine.newQObject(&button);
+myEngine.globalObject().setProperty("button", scriptButton);
+
+myEngine.evaluate("button.checkable = true");
+
+qDebug() << scriptButton.property("checkable").toBoolean();
+scriptButton.property("show").call(); // call the show() slot
+//! [5]
+
+
+//! [6]
+QScriptValue myAdd(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue a = context->argument(0);
+ QScriptValue b = context->argument(1);
+ return a.toNumber() + b.toNumber();
+}
+//! [6]
+
+
+//! [7]
+QScriptValue fun = myEngine.newFunction(myAdd);
+myEngine.globalObject().setProperty("myAdd", fun);
+//! [7]
+
+
+//! [8]
+QScriptValue result = myEngine.evaluate("myAdd(myNumber, 1)");
+//! [8]
+
+
+//! [9]
+QScriptValue Foo(QScriptContext *context, QScriptEngine *engine)
+{
+ if (context->calledAsConstructor()) {
+ // initialize the new object
+ context->thisObject().setProperty("bar", ...);
+ // ...
+ // return a non-object value to indicate that the
+ // thisObject() should be the result of the "new Foo()" expression
+ return engine->undefinedValue();
+ } else {
+ // not called as "new Foo()", just "Foo()"
+ // create our own object and return that one
+ QScriptValue object = engine->newObject();
+ object.setPrototype(context->callee().property("prototype"));
+ object.setProperty("baz", ...);
+ return object;
+ }
+}
+
+...
+
+QScriptValue fooProto = engine->newObject();
+fooProto.setProperty("whatever", ...);
+engine->globalObject().setProperty("Foo", engine->newFunction(Foo, fooProto));
+//! [9]
+
+
+//! [10]
+class Bar { ... };
+
+Q_DECLARE_METATYPE(Bar)
+
+QScriptValue constructBar(QScriptContext *context, QScriptEngine *engine)
+{
+ Bar bar;
+ // initialize from arguments in context, if desired
+ ...
+ return engine->toScriptValue(bar);
+}
+
+class BarPrototype : public QObject, public QScriptable
+{
+// provide the scriptable interface of this type using slots and properties
+...
+};
+
+...
+
+// create and register the Bar prototype and constructor in the engine
+BarPrototype *barPrototypeObject = new BarPrototype(...);
+QScriptValue barProto = engine->newQObject(barPrototypeObject);
+engine->setDefaultPrototype(qMetaTypeId<Bar>, barProto);
+QScriptValue barCtor = engine->newFunction(constructBar, barProto);
+engine->globalObject().setProperty("Bar", barCtor);
+//! [10]
+
+
+//! [11]
+static QScriptValue getSetFoo(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue callee = context->callee();
+ if (context->argumentCount() == 1) // writing?
+ callee.setProperty("value", context->argument(0));
+ return callee.property("value");
+}
+
+....
+
+QScriptValue object = engine.newObject();
+object.setProperty("foo", engine.newFunction(getSetFoo),
+ QScriptValue::PropertyGetter | QScriptValue::PropertySetter);
+//! [11]
+
+
+//! [12]
+QScriptValue object = engine.newObject();
+object.setProperty("foo", engine.newFunction(getFoo), QScriptValue::PropertyGetter);
+object.setProperty("foo", engine.newFunction(setFoo), QScriptValue::PropertySetter);
+//! [12]
+
+
+//! [13]
+Q_SCRIPT_DECLARE_QMETAOBJECT(QLineEdit, QWidget*)
+
+...
+
+QScriptValue lineEditClass = engine.scriptValueFromQMetaObject<QLineEdit>();
+engine.globalObject().setProperty("QLineEdit", lineEditClass);
+//! [13]
+
+
+//! [14]
+if (hello && world)
+ print("hello world");
+//! [14]
+
+
+//! [15]
+if (hello &&
+//! [15]
+
+
+//! [16]
+0 = 0
+//! [16]
+
+
+//! [17]
+./test.js
+//! [17]
+
+
+//! [18]
+foo["bar"]
+//! [18]
+
+
+//! [19]
+QScriptEngine engine;
+QScriptContext *context = engine.pushContext();
+context->activationObject().setProperty("myArg", 123);
+engine.evaluate("var tmp = myArg + 42");
+...
+engine.popContext();
+//! [19]
+
+
+//! [20]
+struct MyStruct {
+ int x;
+ int y;
+};
+//! [20]
+
+
+//! [21]
+Q_DECLARE_METATYPE(MyStruct)
+//! [21]
+
+
+//! [22]
+QScriptValue toScriptValue(QScriptEngine *engine, const MyStruct &s)
+{
+ QScriptValue obj = engine->newObject();
+ obj.setProperty("x", s.x);
+ obj.setProperty("y", s.y);
+ return obj;
+}
+
+void fromScriptValue(const QScriptValue &obj, MyStruct &s)
+{
+ s.x = obj.property("x").toInt32();
+ s.y = obj.property("y").toInt32();
+}
+//! [22]
+
+
+//! [23]
+qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue);
+//! [23]
+
+
+//! [24]
+MyStruct s = qscriptvalue_cast<MyStruct>(context->argument(0));
+...
+MyStruct s2;
+s2.x = s.x + 10;
+s2.y = s.y + 20;
+QScriptValue v = engine->toScriptValue(s2);
+//! [24]
+
+
+//! [25]
+QScriptValue createMyStruct(QScriptContext *, QScriptEngine *engine)
+{
+ MyStruct s;
+ s.x = 123;
+ s.y = 456;
+ return engine->toScriptValue(s);
+}
+...
+QScriptValue ctor = engine.newFunction(createMyStruct);
+engine.globalObject().setProperty("MyStruct", ctor);
+//! [25]
+
+
+//! [26]
+Q_DECLARE_METATYPE(QVector<int>)
+
+...
+
+qScriptRegisterSequenceMetaType<QVector<int> >(engine);
+...
+QVector<int> v = qscriptvalue_cast<QVector<int> >(engine->evaluate("[5, 1, 3, 2]"));
+qSort(v.begin(), v.end());
+QScriptValue a = engine->toScriptValue(v);
+qDebug() << a.toString(); // outputs "[1, 2, 3, 5]"
+//! [26]
+
+//! [27]
+QScriptValue mySpecialQObjectConstructor(QScriptContext *context,
+ QScriptEngine *engine)
+{
+ QObject *parent = context->argument(0).toQObject();
+ QObject *object = new QObject(parent);
+ return engine->newQObject(object, QScriptEngine::ScriptOwnership);
+}
+
+...
+
+QScriptValue ctor = engine.newFunction(mySpecialQObjectConstructor);
+QScriptValue metaObject = engine.newQMetaObject(&QObject::staticMetaObject, ctor);
+engine.globalObject().setProperty("QObject", metaObject);
+
+QScriptValue result = engine.evaluate("new QObject()");
+//! [27]
diff --git a/doc/src/snippets/code/src_script_qscriptengineagent.cpp b/doc/src/snippets/code/src_script_qscriptengineagent.cpp
new file mode 100644
index 0000000..649d782
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptengineagent.cpp
@@ -0,0 +1,12 @@
+//! [0]
+var a = Math.random() + 2;
+//! [0]
+
+
+//! [1]
+function cube(a) {
+ return a * a * a;
+}
+
+var a = cube(3);
+//! [1]
diff --git a/doc/src/snippets/code/src_script_qscriptvalue.cpp b/doc/src/snippets/code/src_script_qscriptvalue.cpp
new file mode 100644
index 0000000..d050f2e
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptvalue.cpp
@@ -0,0 +1,40 @@
+//! [0]
+QScriptEngine myEngine;
+QScriptValue myObject = myEngine.newObject();
+QScriptValue myOtherObject = myEngine.newObject();
+myObject.setProperty("myChild", myOtherObject);
+myObject.setProperty("name", "John Doe");
+//! [0]
+
+
+//! [1]
+QScriptValue val(&myEngine, 123);
+myObject.setProperty("myReadOnlyProperty", val, QScriptValue::ReadOnly);
+//! [1]
+
+
+//! [2]
+QScriptEngine engine;
+engine.evaluate("function fullName() { return this.firstName + ' ' + this.lastName; }");
+engine.evaluate("somePerson = { firstName: 'John', lastName: 'Doe' }");
+
+QScriptValue global = engine.globalObject();
+QScriptValue fullName = global.property("fullName");
+QScriptValue who = global.property("somePerson");
+qDebug() << fullName.call(who).toString(); // "John Doe"
+
+engine.evaluate("function cube(x) { return x * x * x; }");
+QScriptValue cube = global.property("cube");
+QScriptValueList args;
+args << 3;
+qDebug() << cube.call(QScriptValue(), args).toNumber(); // 27
+//! [2]
+
+
+//! [3]
+QScriptValue myNativeFunction(QScriptContext *ctx, QScriptEngine *)
+{
+ QScriptValue otherFunction = ...;
+ return otherFunction.call(ctx->thisObject(), ctx->argumentsObject());
+}
+//! [3]
diff --git a/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp b/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
new file mode 100644
index 0000000..c9de602
--- /dev/null
+++ b/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
@@ -0,0 +1,32 @@
+//! [0]
+QScriptValue object;
+...
+QScriptValueIterator it(object);
+while (it.hasNext()) {
+ it.next();
+ qDebug() << it.name() << ": " << it.value().toString();
+}
+//! [0]
+
+
+//! [1]
+QScriptValue obj = ...; // the object to iterate over
+while (obj.isObject()) {
+ QScriptValueIterator it(obj);
+ while (it.hasNext()) {
+ it.next();
+ qDebug() << it.name();
+ }
+ obj = obj.prototype();
+}
+//! [1]
+
+
+//! [2]
+while (it.hasNext()) {
+ it.next();
+ if (it.flags() & QScriptValue::SkipInEnumeration)
+ continue;
+ qDebug() << "found enumerated property:" << it.name();
+}
+//! [2]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp
new file mode 100644
index 0000000..8194611
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqldatabase.cpp
@@ -0,0 +1,95 @@
+//! [0]
+// WRONG
+QSqlDatabase db = QSqlDatabase::database("sales");
+QSqlQuery query("SELECT NAME, DOB FROM EMPLOYEES", db);
+QSqlDatabase::removeDatabase("sales"); // will output a warning
+
+// "db" is now a dangling invalid database connection,
+// "query" contains an invalid result set
+//! [0]
+
+
+//! [1]
+{
+ QSqlDatabase db = QSqlDatabase::database("sales");
+ QSqlQuery query("SELECT NAME, DOB FROM EMPLOYEES", db);
+}
+// Both "db" and "query" are destroyed because they are out of scope
+QSqlDatabase::removeDatabase("sales"); // correct
+//! [1]
+
+
+//! [2]
+QSqlDatabase::registerSqlDriver("MYDRIVER",
+ new QSqlDriverCreator<MyDatabaseDriver>);
+QSqlDatabase db = QSqlDatabase::addDatabase("MYDRIVER");
+//! [2]
+
+
+//! [3]
+...
+db = QSqlDatabase::addDatabase("QODBC");
+db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=myaccessfile.mdb");
+if (db.open()) {
+ // success!
+}
+...
+//! [3]
+
+
+//! [4]
+...
+// MySQL connection
+db.setConnectOptions("CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1"); // use an SSL connection to the server
+if (!db.open()) {
+ db.setConnectOptions(); // clears the connect option string
+ ...
+}
+...
+// PostgreSQL connection
+db.setConnectOptions("requiressl=1"); // enable PostgreSQL SSL connections
+if (!db.open()) {
+ db.setConnectOptions(); // clear options
+ ...
+}
+...
+// ODBC connection
+db.setConnectOptions("SQL_ATTR_ACCESS_MODE=SQL_MODE_READ_ONLY;SQL_ATTR_TRACE=SQL_OPT_TRACE_ON"); // set ODBC options
+if (!db.open()) {
+ db.setConnectOptions(); // don't try to set this option
+ ...
+}
+//! [4]
+
+
+//! [5]
+#include "qtdir/src/sql/drivers/psql/qsql_psql.cpp"
+//! [5]
+
+
+//! [6]
+PGconn *con = PQconnectdb("host=server user=bart password=simpson dbname=springfield");
+QPSQLDriver *drv = new QPSQLDriver(con);
+QSqlDatabase db = QSqlDatabase::addDatabase(drv); // becomes the new default connection
+QSqlQuery query;
+query.exec("SELECT NAME, ID FROM STAFF");
+...
+//! [6]
+
+
+//! [7]
+unix:LIBS += -lpq
+win32:LIBS += libpqdll.lib
+//! [7]
+
+
+//! [8]
+QSqlDatabase db;
+qDebug() << db.isValid(); // Returns false
+
+db = QSqlDatabase::database("sales");
+qDebug() << db.isValid(); // Returns true if "sales" connection exists
+
+QSqlDatabase::removeDatabase("sales");
+qDebug() << db.isValid(); // Returns false
+//! [8]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
new file mode 100644
index 0000000..d5992c3
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
@@ -0,0 +1,24 @@
+//! [0]
+QSqlDatabase db = ...;
+QVariant v = db.driver()->handle();
+if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) {
+ // v.data() returns a pointer to the handle
+ sqlite3 *handle = *static_cast<sqlite3 **>(v.data());
+ if (handle != 0) { // check that it is not NULL
+ ...
+ }
+}
+//! [0]
+
+
+//! [1]
+if (v.typeName() == "PGconn*") {
+ PGconn *handle = *static_cast<PGconn **>(v.data());
+ if (handle != 0) ...
+}
+
+if (v.typeName() == "MYSQL*") {
+ MYSQL *handle = *static_cast<MYSQL **>(v.data());
+ if (handle != 0) ...
+}
+//! [1]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
new file mode 100644
index 0000000..e25948c
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
@@ -0,0 +1,6 @@
+//! [0]
+QSqlQueryModel model;
+model.setQuery("select * from myTable");
+if (model.lastError().isValid())
+ qDebug() << model.lastError();
+//! [0]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
new file mode 100644
index 0000000..a372c3e
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QStringList list = myIndex.toStringList();
+QStringList::Iterator it = list.begin();
+while(it != list.end()) {
+ myProcessing(*it);
+ ++it;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
new file mode 100644
index 0000000..d0544b8
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
@@ -0,0 +1,40 @@
+//! [0]
+SELECT forename, surname FROM people;
+//! [0]
+
+
+//! [1]
+QSqlQuery q("select * from employees");
+QSqlRecord rec = q.record();
+
+qDebug() << "Number of columns: " << rec.count();
+
+int nameCol = rec.indexOf("name"); // index of the field "name"
+while (q.next())
+ qDebug() << q.value(nameCol).toString(); // output all names
+//! [1]
+
+
+//! [2]
+QSqlQuery q;
+q.prepare("insert into myTable values (?, ?)");
+
+QVariantList ints;
+ints << 1 << 2 << 3 << 4;
+q.addBindValue(ints);
+
+QVariantList names;
+names << "Harald" << "Boris" << "Trond" << QVariant(QVariant::String);
+q.addBindValue(names);
+
+if (!q.execBatch())
+ qDebug() << q.lastError();
+//! [2]
+
+
+//! [3]
+1 Harald
+2 Boris
+3 Trond
+4 NULL
+//! [3]
diff --git a/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
new file mode 100644
index 0000000..7e6c913
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
@@ -0,0 +1,45 @@
+//! [0]
+QSqlQuery q;
+q.prepare("insert into test (i1, i2, s) values (?, ?, ?)");
+
+QVariantList col1;
+QVariantList col2;
+QVariantList col3;
+
+col1 << 1 << 3;
+col2 << 2 << 4;
+col3 << "hello" << "world";
+
+q.bindValue(0, col1);
+q.bindValue(1, col2);
+q.bindValue(2, col3);
+
+if (!q.execBatch())
+ qDebug() << q.lastError();
+//! [0]
+
+
+//! [1]
+QSqlQuery query = ...
+QVariant v = query.result()->handle();
+if (v.isValid() && qstrcmp(v.typeName(), "sqlite3_stmt*")) {
+ // v.data() returns a pointer to the handle
+ sqlite3_stmt *handle = *static_cast<sqlite3_stmt **>(v.data());
+ if (handle != 0) { // check that it is not NULL
+ ...
+ }
+}
+//! [1]
+
+
+//! [2]
+if (v.typeName() == "PGresult*") {
+ PGresult *handle = *static_cast<PGresult **>(v.data());
+ if (handle != 0) ...
+}
+
+if (v.typeName() == "MYSQL_STMT*") {
+ MYSQL_STMT *handle = *static_cast<MYSQL_STMT **>(v.data());
+ if (handle != 0) ...
+}
+//! [2]
diff --git a/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
new file mode 100644
index 0000000..e3bce75
--- /dev/null
+++ b/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
@@ -0,0 +1,12 @@
+//! [0]
+while (myModel->canFetchMore())
+ myModel->fetchMore();
+//! [0]
+
+
+//! [1]
+QSqlQueryModel model;
+model.setQuery("select * from MyTable");
+if (model.lastError().isValid())
+ qDebug() << model.lastError();
+//! [1]
diff --git a/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp
new file mode 100644
index 0000000..f0846e6
--- /dev/null
+++ b/doc/src/snippets/code/src_svg_qgraphicssvgitem.cpp
@@ -0,0 +1,11 @@
+//! [0]
+QSvgRenderer *renderer = new QSvgRenderer(QLatin1String("SvgCardDeck.svg"));
+QGraphicsSvgItem *black = new QGraphicsSvgItem();
+QGraphicsSvgItem *red = new QGraphicsSvgItem();
+
+black->setSharedRenderer(renderer);
+black->setElementId(QLatin1String("black_joker"));
+
+red->setSharedRenderer(renderer);
+red->setElementId(QLatin1String("red_joker"));
+//! [0]
diff --git a/doc/src/snippets/code/src_xml_dom_qdom.cpp b/doc/src/snippets/code/src_xml_dom_qdom.cpp
new file mode 100644
index 0000000..d07d6d2
--- /dev/null
+++ b/doc/src/snippets/code/src_xml_dom_qdom.cpp
@@ -0,0 +1,178 @@
+//! [0]
+QDomDocument doc;
+QDomImplementation impl;
+
+// This will create the element, but the resulting XML document will
+// be invalid, because '~' is not a valid character in a tag name.
+impl.setInvalidDataPolicy(QDomImplementation::AcceptInvalidData);
+QDomElement elt1 = doc.createElement("foo~bar");
+
+// This will create an element with the tag name "foobar".
+impl.setInvalidDataPolicy(QDomImplementation::DropInvalidData);
+QDomElement elt2 = doc.createElement("foo~bar");
+
+// This will create a null element.
+impl.setInvalidDataPolicy(QDomImplementation::ReturnNullNode);
+QDomElement elt3 = doc.createElement("foo~bar");
+//! [0]
+
+
+//! [1]
+QDomDocument d;
+d.setContent(someXML);
+QDomNode n = d.firstChild();
+while (!n.isNull()) {
+ if (n.isElement()) {
+ QDomElement e = n.toElement();
+ cout << "Element name: " << e.tagName() << endl;
+ break;
+ }
+ n = n.nextSibling();
+}
+//! [1]
+
+
+//! [2]
+QDomDocument document;
+QDomElement element1 = document.documentElement();
+QDomElement element2 = element1;
+//! [2]
+
+
+//! [3]
+QDomElement element3 = document.createElement("MyElement");
+QDomElement element4 = document.createElement("MyElement");
+//! [3]
+
+
+//! [4]
+<body>
+<h1>Heading</h1>
+<p>Hello <b>you</b></p>
+</body>
+//! [4]
+
+
+//! [5]
+<h1>Heading</h1>
+<p>The text...</p>
+<h2>Next heading</h2>
+//! [5]
+
+
+//! [6]
+<h1>Heading</h1>
+<p>The text...</p>
+<h2>Next heading</h2>
+//! [6]
+
+
+//! [7]
+<link href="http://qtsoftware.com" color="red" />
+//! [7]
+
+
+//! [8]
+QDomElement e = //...
+//...
+QDomAttr a = e.attributeNode("href");
+cout << a.value() << endl; // prints "http://qtsoftware.com"
+a.setValue("http://doc.trolltech.com"); // change the node's attribute
+QDomAttr a2 = e.attributeNode("href");
+cout << a2.value() << endl; // prints "http://doc.trolltech.com"
+//! [8]
+
+
+//! [9]
+QDomElement e = //...
+//...
+QString s = e.text()
+//! [9]
+
+
+//! [10]
+QString text;
+QDomElement element = doc.documentElement();
+for(QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling())
+{
+ QDomText t = n.toText();
+ if (!t.isNull())
+ text += t.data();
+}
+//! [10]
+
+
+//! [11]
+QDomDocument doc = // ...
+QDomElement root = doc.firstChildElement("database");
+QDomElement elt = root.firstChildElement("entry");
+for (; !elt.isNull(); elt = elt.nextSiblingElement("entry")) {
+ // ...
+}
+//! [11]
+
+
+//! [12]
+<img src="myimg.png">
+//! [12]
+
+
+//! [13]
+<h1>Hello <b>Qt</b> <![CDATA[<xml is cool>]]></h1>
+//! [13]
+
+
+//! [14]
+Hello Qt <xml is cool>
+//! [14]
+
+
+//! [15]
+<!-- this is a comment -->
+//! [15]
+
+
+//! [16]
+QDomDocument doc("mydocument");
+QFile file("mydocument.xml");
+if (!file.open(QIODevice::ReadOnly))
+ return;
+if (!doc.setContent(&file)) {
+ file.close();
+ return;
+}
+file.close();
+
+// print out the element names of all elements that are direct children
+// of the outermost element.
+QDomElement docElem = doc.documentElement();
+
+QDomNode n = docElem.firstChild();
+while(!n.isNull()) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if(!e.isNull()) {
+ cout << qPrintable(e.tagName()) << endl; // the node really is an element.
+ }
+ n = n.nextSibling();
+}
+
+// Here we append a new element to the end of the document
+QDomElement elem = doc.createElement("img");
+elem.setAttribute("src", "myimage.png");
+docElem.appendChild(elem);
+//! [16]
+
+
+//! [17]
+QDomDocument doc("MyML");
+QDomElement root = doc.createElement("MyML");
+doc.appendChild(root);
+
+QDomElement tag = doc.createElement("Greeting");
+root.appendChild(tag);
+
+QDomText t = doc.createTextNode("Hello World");
+tag.appendChild(t);
+
+QString xml = doc.toString();
+//! [17]
diff --git a/doc/src/snippets/code/src_xml_sax_qxml.cpp b/doc/src/snippets/code/src_xml_sax_qxml.cpp
new file mode 100644
index 0000000..478cf9d
--- /dev/null
+++ b/doc/src/snippets/code/src_xml_sax_qxml.cpp
@@ -0,0 +1,3 @@
+//! [0]
+xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp
new file mode 100644
index 0000000..990a849
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp
@@ -0,0 +1,3 @@
+//! [0]
+return baseURI.resolved(relative);
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp
new file mode 100644
index 0000000..f31ea3f
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp
@@ -0,0 +1,3 @@
+//! [0]
+OutputType inputToOutputItem(const InputType &inputType) const;
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp
new file mode 100644
index 0000000..351a30b
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp
@@ -0,0 +1,22 @@
+//! [0]
+myInstance = QXmlNodeModelIndex();
+//! [0]
+
+//! [1]
+QFile queryFile(argv[1]);
+QFile chemistryData(argv[2]);
+QString moleculeName = argv[3];
+
+QXmlQuery query;
+query.setQuery(&queryFile, QUrl::fromLocalFile(queryFile.fileName()));
+
+ChemistryNodeModel myNodeModel(query.namePool(), chemistryData);
+QXmlNodeModelIndex startNode = myNodeModel.nodeFor(moleculeName);
+query.bindVariable("queryRoot", startNode);
+
+QFile out;
+out.open(stdout, QIODevice::WriteOnly);
+
+QXmlSerializer serializer(query, &out);
+query.evaluateTo(&serializer);
+//! [1]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp
new file mode 100644
index 0000000..e286fa9
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp
@@ -0,0 +1,7 @@
+//! [0]
+QXmlQuery query;
+query.setQuery("doc('index.html')/html/body/p[1]");
+
+QXmlSerializer serializer(query, myOutputDevice);
+query.evaluateTo(&serializer);
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp
new file mode 100644
index 0000000..0906328
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp
@@ -0,0 +1,19 @@
+//! [0]
+QXmlNodeModelIndex MyTreeModel::nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &ni) const
+{
+ // Convert the QXmlNodeModelIndex to a value that is specific to what we represent.
+ const MyValue value = toMyValue(ni);
+
+ switch(axis)
+ {
+ case Parent:
+ return toNodeIndex(value.parent());
+ case FirstChild:
+ case PreviousSibling:
+ case NextSibling:
+ // and so on
+ ;
+ }
+ return QXmlNodeModelIndex();
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
new file mode 100644
index 0000000..d7e6ab1
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
@@ -0,0 +1,8 @@
+//! [0]
+QXmlQuery query;
+query.setQuery("doc('index.html')/html/body/p[1]");
+
+QXmlFormatter formatter(query, myOutputDevice);
+formatter.setIndentationDepth(2);
+query.evaluateTo(&formatter);
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp
new file mode 100644
index 0000000..2c891b5
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp
@@ -0,0 +1,8 @@
+// Fills the bits from begin to end with 1s and leaves the rest as 0.
+
+template<typename IntegralT>
+inline IntegralT bitmask(IntegralT begin, IntegralT end)
+{
+ IntegralT filled_bits = (1 << (end - begin + 1)) - 1;
+ return filled_bits << begin;
+}
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
new file mode 100644
index 0000000..76e1b34
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
@@ -0,0 +1,152 @@
+//! [0]
+ QXmlNamePool namePool(query.namePool());
+ query.bindVariable(QXmlName(namePool, localName), value);
+//! [0]
+
+
+{
+//! [1]
+ QByteArray myDocument;
+ QBuffer buffer(&myDocument); // This is a QIODevice.
+ buffer.open(QIODevice::ReadOnly);
+ QXmlQuery query;
+ query.bindVariable("myDocument", &buffer);
+ query.setQuery("doc($myDocument)");
+//! [1]
+}
+
+
+{
+ QIODevice *device = 0;
+//! [2]
+ QXmlNamePool namePool(query.namePool());
+ query.bindVariable(QXmlName(namePool, localName), device);
+//! [2]
+
+}
+
+{
+ QIODevice *myOutputDevice = 0;
+//! [3]
+ QFile xq("myquery.xq");
+
+ QXmlQuery query;
+ query.setQuery(&xq, QUrl::fromLocalFile(xq.fileName()));
+
+ QXmlSerializer serializer(query, myOutputDevice);
+ query.evaluateTo(&serializer);
+//! [3]
+}
+
+{
+ QIODevice *myOutputDevice = 0;
+//! [4]
+ QFile xq("myquery.xq");
+ QString fileName("the filename");
+ QString publisherName("the publisher");
+ qlonglong year = 1234;
+
+ QXmlQuery query;
+
+ query.bindVariable("file", QVariant(fileName));
+ query.bindVariable("publisher", QVariant(publisherName));
+ query.bindVariable("year", QVariant(year));
+
+ query.setQuery(&xq, QUrl::fromLocalFile(xq.fileName()));
+
+ QXmlSerializer serializer(query, myOutputDevice);
+ query.evaluateTo(&serializer);
+//! [4]
+}
+
+{
+//! [5]
+ QFile xq("myquery.xq");
+ QString fileName("the filename");
+ QString publisherName("the publisher");
+ qlonglong year = 1234;
+
+ QXmlQuery query;
+
+ query.bindVariable("file", QVariant(fileName));
+ query.bindVariable("publisher", QVariant(publisherName));
+ query.bindVariable("year", QVariant(year));
+
+ query.setQuery(&xq, QUrl::fromLocalFile(xq.fileName()));
+
+ QXmlResultItems result;
+ query.evaluateTo(&result);
+ QXmlItem item(result.next());
+ while (!item.isNull()) {
+ if (item.isAtomicValue()) {
+ QVariant v = item.toAtomicValue();
+ switch (v.type()) {
+ case QVariant::LongLong:
+ // xs:integer
+ break;
+ case QVariant::String:
+ // xs:string
+ break;
+ default:
+ // error
+ break;
+ }
+ }
+ else if (item.isNode()) {
+ QXmlNodeModelIndex i = item.toNodeModelIndex();
+ // process node
+ }
+ item = result.next();
+ }
+//! [5]
+}
+
+{
+//! [6]
+ QFile xq("myquery.xq");
+
+ QXmlQuery query;
+ query.setQuery(&xq, QUrl::fromLocalFile(xq.fileName()));
+
+ QXmlResultItems result;
+ query.evaluateTo(&result);
+ QXmlItem item(result.next());
+ while (!item.isNull()) {
+ if (item.isAtomicValue()) {
+ QVariant v = item.toAtomicValue();
+ switch (v.type()) {
+ case QVariant::LongLong:
+ // xs:integer
+ break;
+ case QVariant::String:
+ // xs:string
+ break;
+ default:
+ if (v.userType() == qMetaTypeId<QXmlName>()) {
+ QXmlName n = qVariantValue<QXmlName>(v);
+ // process QXmlName n...
+ }
+ else {
+ // error
+ }
+ break;
+ }
+ }
+ else if (item.isNode()) {
+ QXmlNodeModelIndex i = item.toNodeModelIndex();
+ // process node
+ }
+ item = result.next();
+ }
+//! [6]
+}
+
+{
+ QIODevice *out = 0;
+//! [7]
+ QXmlQuery query(QXmlQuery::XSLT20);
+ query.setFocus(QUrl("myInput.xml"));
+ query.setQuery(QUrl("myStylesheet.xsl"));
+ query.evaluateTo(out);
+//! [7]
+}
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
new file mode 100644
index 0000000..190d610
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
@@ -0,0 +1,16 @@
+//! [0]
+QXmlQuery query;
+query.setQuery("<e/>, 1, 'two'");
+QXmlResultItems result;
+
+if (query.isValid()) {
+ query.evaluateTo(&result);
+ QXmlItem item(result.next());
+ while (!item.isNull()) {
+ // use item
+ item = result.next();
+ }
+ if (result.hasError())
+ /* Runtime error! */;
+}
+//! [0]
diff --git a/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp b/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp
new file mode 100644
index 0000000..e286fa9
--- /dev/null
+++ b/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp
@@ -0,0 +1,7 @@
+//! [0]
+QXmlQuery query;
+query.setQuery("doc('index.html')/html/body/p[1]");
+
+QXmlSerializer serializer(query, myOutputDevice);
+query.evaluateTo(&serializer);
+//! [0]
diff --git a/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp b/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
new file mode 100644
index 0000000..f5097a9
--- /dev/null
+++ b/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
@@ -0,0 +1,25 @@
+//! [0]
+ QProcess *process = new QProcess(this);
+ QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
+ + QLatin1String("/assistant");
+
+ process->start(app, QStringList() << QLatin1String("-enableRemoteControl"));
+ if (!process->waitForStarted()) {
+ QMessageBox::critical(this, tr("Remote Control"),
+ tr("Could not start Qt Assistant from %1.").arg(app));
+ return;
+ }
+
+ // show index page
+ QTextStream str(process);
+ str << QLatin1String("SetSource qthelp://mycompany.com/doc/index.html")
+ << QLatin1Char('\0') << endl;
+ }
+//! [0]
+
+
+//! [1]
+ CONFIG += assistant
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp
new file mode 100644
index 0000000..cdfd076
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp
@@ -0,0 +1,35 @@
+//! [0]
+ QObject *ANewExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+ {
+ if (iid != Q_TYPEID(QDesignerContainerExtension))
+ return 0;
+
+ if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+ (object))
+ return new MyContainerExtension(widget, parent);
+
+ return 0;
+ }
+//! [0]
+
+
+//! [1]
+ QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+ const QString &iid, QObject *parent) const
+ {
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+ return new MyTaskMenuExtension(widget, parent);
+
+ } else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MyContainerExtension(widget, parent);
+
+ } else {
+ return 0;
+ }
+ }
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp
new file mode 100644
index 0000000..60bd0cc
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp
@@ -0,0 +1,15 @@
+//! [0]
+ QDesignerPropertySheetExtension *propertySheet;
+ QExtensionManager manager = formEditor->extensionManager();
+
+ propertySheet = qt_extension<QDesignerPropertySheetExtension*>(manager, widget);
+
+ if(propertySheet) {...}
+//! [0]
+
+
+//! [1]
+ Q_DECLARE_EXTENSION_INTERFACE(MyExtension, "com.mycompany.myproduct.myextension")
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp b/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp
new file mode 100644
index 0000000..47cee58
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp
@@ -0,0 +1,17 @@
+//! [0]
+ void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor)
+ {
+ if (initialized)
+ return;
+
+ QExtensionManager *manager = formEditor->extensionManager();
+ Q_ASSERT(manager != 0);
+
+ manager->registerExtensions(new MyExtensionFactory(manager),
+ Q_TYPEID(QDesignerTaskMenuExtension));
+
+ initialized = true;
+ }
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp
new file mode 100644
index 0000000..ef13069
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp
@@ -0,0 +1,11 @@
+//! [0]
+ QDesignerObjectInspectorInterface *objectInspector = 0;
+ objectInspector = formEditor->objectInspector();
+
+ QDesignerFormWindowManagerInterface *manager = 0;
+ manager = formEditor->formWindowManager();
+
+ objectInspector->setFormWindow(manager->formWindow(0));
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp
new file mode 100644
index 0000000..840697d
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp
@@ -0,0 +1,25 @@
+//! [0]
+ QDesignerFormWindowInterface *formWindow;
+ formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget);
+//! [0]
+
+
+//! [1]
+ QList<QDesignerFormWindowInterface *> forms;
+ QDesignerFormWindowInterface *formWindow;
+
+ QDesignerFormWindowManagerInterface *manager = formEditor->formWindowManager();
+
+ for (int i = 0; i < manager->formWindowCount(); i++) {
+ formWindow = manager->formWindow(i);
+ forms.append(formWindow);
+ }
+//! [1]
+
+
+//! [2]
+ if (formWindow->isManaged(myWidget))
+ formWindow->manageWidget(myWidget->childWidget);
+//! [2]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp
new file mode 100644
index 0000000..fbe4fb8
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp
@@ -0,0 +1,8 @@
+//! [0]
+ QDesignerFormWindowInterface *formWindow = 0;
+ formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget);
+
+ formWindow->cursor()->setProperty(myWidget, myProperty, newValue);
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp
new file mode 100644
index 0000000..b54f0a6
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp
@@ -0,0 +1,11 @@
+//! [0]
+ QDesignerFormWindowManagerInterface *manager = 0;
+ QDesignerFormWindowInterface *formWindow = 0;
+
+ manager = formEditor->formWindowManager();
+ formWindow = manager->formWindow(0);
+
+ manager->setActiveFormWindow(formWindow);
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp
new file mode 100644
index 0000000..ef13069
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp
@@ -0,0 +1,11 @@
+//! [0]
+ QDesignerObjectInspectorInterface *objectInspector = 0;
+ objectInspector = formEditor->objectInspector();
+
+ QDesignerFormWindowManagerInterface *manager = 0;
+ manager = formEditor->formWindowManager();
+
+ objectInspector->setFormWindow(manager->formWindow(0));
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp
new file mode 100644
index 0000000..bbc396f
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp
@@ -0,0 +1,23 @@
+//! [0]
+ QDesignerPropertyEditorInterface *propertyEditor = 0;
+ propertyEditor = formEditor->propertyEditor();
+
+ connect(propertyEditor, SIGNAL(propertyChanged(QString, QVariant)),
+ this, SLOT(checkProperty(QString, QVariant)));
+//! [0]
+
+
+//! [1]
+ void checkProperty(QString property, QVariant value) {
+ QDesignerPropertyEditorInterface *propertyEditor = 0;
+ propertyEditor = formEditor->propertyEditor();
+
+ QObject *object = propertyeditor->object();
+ MyCustomWidget *widget = qobject_cast<MyCustomWidget>(object);
+
+ if (widget && property == aProperty && value != expectedValue)
+ {...}
+ }
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp
new file mode 100644
index 0000000..b80c59e
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp
@@ -0,0 +1,30 @@
+//! [0]
+ QDesignerWidgetBoxInterface *widgetBox = 0:
+ widgetBox = formEditor->widgetBox();
+
+ widgetBox->load();
+//! [0]
+
+
+//! [1]
+ QString originalFile = widgetBox->fileName();
+
+ widgetBox->setFileName("myWidgetBox.xml");
+ widgetBox->save();
+//! [1]
+
+
+//! [2]
+ widgetBox->setFileName(originalFile);
+ widgetBox->load();
+//! [2]
+
+
+//! [3]
+ if (widgetBox->filename() != "myWidgetBox.xml") {
+ widgetBox->setFileName("myWidgetBox.xml");
+ widgetBox->load();
+ }
+//! [3]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp b/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp
new file mode 100644
index 0000000..b572fba
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp
@@ -0,0 +1,17 @@
+//! [0]
+ MyForm::MyForm(QWidget *parent)
+ : QWidget(parent)
+ {
+ QFormBuilder builder;
+ QFile file(":/forms/myWidget.ui");
+ file.open(QFile::ReadOnly);
+ QWidget *myWidget = builder.load(&file, this);
+ file.close();
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(myWidget);
+ setLayout(layout);
+ }
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp b/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp
new file mode 100644
index 0000000..a88dab5
--- /dev/null
+++ b/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp
@@ -0,0 +1,26 @@
+//! [0]
+ MyForm::MyForm(QWidget *parent)
+ : QWidget(parent)
+ {
+ QFormBuilder builder;
+ QFile file(":/forms/myWidget.ui");
+ file.open(QFile::ReadOnly);
+ QWidget *myWidget = builder.load(&file, this);
+ file.close();
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(myWidget);
+ setLayout(layout);
+ }
+//! [0]
+
+
+//! [1]
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/forms">
+ <file>mywidget.ui</file>
+ </qresource>
+ </RCC>
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp b/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp
new file mode 100644
index 0000000..da28cd5
--- /dev/null
+++ b/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp
@@ -0,0 +1,5 @@
+//! [0]
+ \include main.cpp
+//! [0]
+
+
diff --git a/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp b/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp
new file mode 100644
index 0000000..72e86ba
--- /dev/null
+++ b/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp
@@ -0,0 +1,44 @@
+//! [0]
+ bool ok;
+ QGradient gradient = QtGradientDialog::getGradient(&ok, QRadialGradient(), this);
+ if (ok) {
+ // the user clicked OK and gradient is set to the gradient the user selected
+ } else {
+ // the user canceled the dialog; gradient is set to the initial
+ // value, in this case radial gradient
+ }
+//! [0]
+
+
+//! [1]
+ bool detailsVisible;
+ QColor::Spec spec;
+ QGradient gradient;
+
+ QtGradientDialog dlg(this);
+ dlg.setDetailsVisible(detailsVisible);
+ dlg.setSpec(spec);
+ dlg.setGradient(gradient);
+ if (dlg.exec() != QDialog::Accepted)
+ return;
+
+ gradient = dlg.gradient();
+ // detailsVisible and spec properties can be changed interactively by the user too,
+ // we store the values of these properties for the next time QtGradientDialog is executed.
+ detailsVisible = dlg.detailsVisible();
+ spec = dlg.spec();
+//! [1]
+
+
+//! [2]
+ QtGradientDialog dlg;
+ dlg.setBackgroundCheckered(true);
+//! [2]
+
+
+//! [3]
+ QtGradientDialog dlg;
+ dlg.setBackgroundCheckered(false);
+//! [3]
+
+
diff --git a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
new file mode 100644
index 0000000..62f4319
--- /dev/null
+++ b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
@@ -0,0 +1,47 @@
+//! [0]
+ QtSpinBoxFactory *factory;
+ QSet<QtIntPropertyManager *> managers = factory->propertyManagers();
+//! [0]
+
+
+//! [1]
+ QtBrowserItem *item;
+ QList<QtBrowserItem *> childrenItems = item->children();
+
+ QList<QtProperty *> childrenProperties = item->property()->subProperties();
+//! [1]
+
+
+//! [2]
+ QtProperty *property1, *property2, *property3;
+
+ property2->addSubProperty(property1);
+ property3->addSubProperty(property2);
+
+ QtAbstractPropertyBrowser *editor;
+
+ editor->addProperty(property1);
+ editor->addProperty(property2);
+ editor->addProperty(property3);
+//! [2]
+
+
+//! [3]
+ QtIntPropertyManager *intManager;
+ QtDoublePropertyManager *doubleManager;
+
+ QtProperty *myInteger = intManager->addProperty();
+ QtProperty *myDouble = doubleManager->addProperty();
+
+ QtSpinBoxFactory *spinBoxFactory;
+ QtDoubleSpinBoxFactory *doubleSpinBoxFactory;
+
+ QtAbstractPropertyBrowser *editor;
+ editor->setFactoryForManager(intManager, spinBoxFactory);
+ editor->setFactoryForManager(doubleManager, doubleSpinBoxFactory);
+
+ editor->addProperty(myInteger);
+ editor->addProperty(myDouble);
+//! [3]
+
+
diff --git a/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp
new file mode 100644
index 0000000..fbc9682
--- /dev/null
+++ b/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp
@@ -0,0 +1,16 @@
+//! [0]
+ QtVariantPropertyManager *variantPropertyManager;
+ QtProperty *property;
+
+ variantPropertyManager->setValue(property, 10);
+//! [0]
+
+
+//! [1]
+ QtVariantPropertyManager *variantPropertyManager;
+ QtVariantProperty *property;
+
+ property->setValue(10);
+//! [1]
+
+
diff --git a/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp b/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp
new file mode 100644
index 0000000..9162b63
--- /dev/null
+++ b/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp
@@ -0,0 +1,12 @@
+//! [0]
+ QtToolBarManager *toolBarManager;
+
+ void MyMainWindow::customize()
+ {
+ QtToolBarDialog dialog(this);
+ dialog.setToolBarManager(toolBarManager);
+ dialog.exec();
+ }
+//! [0]
+
+
diff --git a/doc/src/snippets/complexpingpong-example.qdoc b/doc/src/snippets/complexpingpong-example.qdoc
new file mode 100644
index 0000000..257f702
--- /dev/null
+++ b/doc/src/snippets/complexpingpong-example.qdoc
@@ -0,0 +1,4 @@
+Ask your question: When is the next Qt release?
+Reply was: Sorry, I don't know the answer
+Ask your question: What is the answer to life, the universe and everything?
+Reply was: 42
diff --git a/doc/src/snippets/console/dbus_pingpong.txt b/doc/src/snippets/console/dbus_pingpong.txt
new file mode 100644
index 0000000..3c700db
--- /dev/null
+++ b/doc/src/snippets/console/dbus_pingpong.txt
@@ -0,0 +1,3 @@
+[qtuser@workstation:~/dev/qt-4.4/examples/dbus/pingpong]$ ./pong &
+[qtuser@workstation:~/dev/qt-4.4/examples/dbus/pingpong]$ ./ping Hello
+Reply was: ping("Hello") got called
diff --git a/doc/src/snippets/coordsys/coordsys.cpp b/doc/src/snippets/coordsys/coordsys.cpp
new file mode 100644
index 0000000..2fb0744
--- /dev/null
+++ b/doc/src/snippets/coordsys/coordsys.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class MyWidget : public QWidget
+{
+public:
+ MyWidget();
+
+protected:
+ void paintEvent(QPaintEvent *);
+};
+
+MyWidget::MyWidget()
+{
+ QPalette palette(MyWidget::palette());
+ palette.setColor(backgroundRole(), Qt::white);
+ setPalette(palette);
+}
+
+void MyWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.setPen(Qt::darkGreen);
+ painter.drawRect(1, 2, 6, 4);
+
+ //painter.setPen(Qt::darkGray);
+ //painter.drawLine(2, 8, 6, 2);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MyWidget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/coordsys/coordsys.pro b/doc/src/snippets/coordsys/coordsys.pro
new file mode 100644
index 0000000..b6aac7c
--- /dev/null
+++ b/doc/src/snippets/coordsys/coordsys.pro
@@ -0,0 +1 @@
+SOURCES += coordsys.cpp
diff --git a/doc/src/snippets/customstyle/customstyle.cpp b/doc/src/snippets/customstyle/customstyle.cpp
new file mode 100644
index 0000000..0e3d00e
--- /dev/null
+++ b/doc/src/snippets/customstyle/customstyle.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "customstyle.h"
+
+CustomStyle::CustomStyle()
+{
+//! [0]
+ QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget);
+ if (spinBox) {
+//! [0] //! [1]
+ }
+//! [1]
+}
+
+//! [2]
+void CustomStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const
+{
+ if (element == PE_IndicatorSpinUp || element == PE_IndicatorSpinDown) {
+ QPolygon points(3);
+ int x = option->rect.x();
+ int y = option->rect.y();
+ int w = option->rect.width() / 2;
+ int h = option->rect.height() / 2;
+ x += (option->rect.width() - w) / 2;
+ y += (option->rect.height() - h) / 2;
+
+ if (element == PE_IndicatorSpinUp) {
+ points[0] = QPoint(x, y + h);
+ points[1] = QPoint(x + w, y + h);
+ points[2] = QPoint(x + w / 2, y);
+ } else { // PE_SpinBoxDown
+ points[0] = QPoint(x, y);
+ points[1] = QPoint(x + w, y);
+ points[2] = QPoint(x + w / 2, y + h);
+ }
+
+ if (option->state & State_Enabled) {
+ painter->setPen(option->palette.mid().color());
+ painter->setBrush(option->palette.buttonText());
+ } else {
+ painter->setPen(option->palette.buttonText().color());
+ painter->setBrush(option->palette.mid());
+ }
+ painter->drawPolygon(points);
+ } else {
+ QWindowsStyle::drawPrimitive(element, option, painter, widget);
+//! [2] //! [3]
+ }
+//! [3] //! [4]
+}
+//! [4]
diff --git a/doc/src/snippets/customstyle/customstyle.h b/doc/src/snippets/customstyle/customstyle.h
new file mode 100644
index 0000000..238eb6c
--- /dev/null
+++ b/doc/src/snippets/customstyle/customstyle.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CUSTOMSTYLE_H
+#define CUSTOMSTYLE_H
+
+#include <QWindowsStyle>
+
+//! [0]
+class CustomStyle : public QWindowsStyle
+{
+ Q_OBJECT
+
+public:
+ CustomStyle()
+ ~CustomStyle() {}
+
+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const;
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/customstyle/customstyle.pro b/doc/src/snippets/customstyle/customstyle.pro
new file mode 100644
index 0000000..af0ee4e
--- /dev/null
+++ b/doc/src/snippets/customstyle/customstyle.pro
@@ -0,0 +1,2 @@
+HEADERS += customstyle.h
+SOURCES += customstyle.cpp main.cpp
diff --git a/doc/src/snippets/customstyle/main.cpp b/doc/src/snippets/customstyle/main.cpp
new file mode 100644
index 0000000..a6efacd
--- /dev/null
+++ b/doc/src/snippets/customstyle/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [using a custom style]
+#include <QtGui>
+
+#include "customstyle.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication::setStyle(new CustomStyle);
+ QApplication app(argc, argv);
+ QSpinBox spinBox;
+ spinBox.show();
+ return app.exec();
+}
+//! [using a custom style]
diff --git a/doc/src/snippets/customviewstyle.cpp b/doc/src/snippets/customviewstyle.cpp
new file mode 100644
index 0000000..6cfbac7
--- /dev/null
+++ b/doc/src/snippets/customviewstyle.cpp
@@ -0,0 +1,29 @@
+#include <QtGui>
+
+#include "customviewstyle.h"
+
+
+
+void CustomViewStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
+{
+
+//![0]
+ switch (element) {
+ case (PE_PanelItemViewItem): {
+ painter->save();
+
+ QPoint topLeft = option->rect.topLeft();
+ QPoint bottomRight = option->rect.topRight();
+ QLinearGradient backgroundGradient(topLeft, bottomRight);
+ backgroundGradient.setColorAt(0.0, QColor(Qt::yellow).lighter(190));
+ backgroundGradient.setColorAt(1.0, Qt::white);
+ painter->fillRect(option->rect, QBrush(backgroundGradient));
+
+ painter->restore();
+ break;
+ }
+ default:
+ QWindowsStyle::drawPrimitive(element, option, painter, widget);
+ }
+//![0]
+}
diff --git a/doc/src/snippets/dbus-pingpong-example.qdoc b/doc/src/snippets/dbus-pingpong-example.qdoc
new file mode 100644
index 0000000..13a34a8
--- /dev/null
+++ b/doc/src/snippets/dbus-pingpong-example.qdoc
@@ -0,0 +1,3 @@
+$ ./pong &
+$ ./ping Hello
+Reply was: ping("Hello") got called
diff --git a/doc/src/snippets/designer/autoconnection/autoconnection.pro b/doc/src/snippets/designer/autoconnection/autoconnection.pro
new file mode 100644
index 0000000..fba94de
--- /dev/null
+++ b/doc/src/snippets/designer/autoconnection/autoconnection.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+FORMS = imagedialog.ui
+HEADERS = imagedialog.h
+SOURCES = imagedialog.cpp \
+ main.cpp
diff --git a/doc/src/snippets/designer/autoconnection/imagedialog.cpp b/doc/src/snippets/designer/autoconnection/imagedialog.cpp
new file mode 100644
index 0000000..a08650b
--- /dev/null
+++ b/doc/src/snippets/designer/autoconnection/imagedialog.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagedialog.h"
+
+ImageDialog::ImageDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ okButton->setAutoDefault(false);
+ cancelButton->setAutoDefault(false);
+
+ colorDepthCombo->addItem(tr("2 colors (1 bit per pixel)"));
+ colorDepthCombo->addItem(tr("4 colors (2 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 colors (4 bits per pixel)"));
+ colorDepthCombo->addItem(tr("256 colors (8 bits per pixel)"));
+ colorDepthCombo->addItem(tr("65536 colors (16 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 million colors (24 bits per pixel)"));
+
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
+
+void ImageDialog::on_okButton_clicked()
+{
+ if (nameLineEdit->text().isEmpty())
+ (void) QMessageBox::information(this, tr("No Image Name"),
+ tr("Please supply a name for the image."), QMessageBox::Cancel);
+ else
+ accept();
+}
diff --git a/doc/src/snippets/designer/autoconnection/imagedialog.h b/doc/src/snippets/designer/autoconnection/imagedialog.h
new file mode 100644
index 0000000..e99b7f0
--- /dev/null
+++ b/doc/src/snippets/designer/autoconnection/imagedialog.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEDIALOG_H
+#define IMAGEDIALOG_H
+
+#include "ui_imagedialog.h"
+
+//! [0]
+class ImageDialog : public QDialog, private Ui::ImageDialog
+{
+ Q_OBJECT
+
+public:
+ ImageDialog(QWidget *parent = 0);
+
+private slots:
+ void on_okButton_clicked();
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/designer/autoconnection/imagedialog.ui b/doc/src/snippets/designer/autoconnection/imagedialog.ui
new file mode 100644
index 0000000..1c5e546
--- /dev/null
+++ b/doc/src/snippets/designer/autoconnection/imagedialog.ui
@@ -0,0 +1,389 @@
+<ui version="4.0" >
+ <comment></comment>
+ <class>ImageDialog</class>
+ <widget class="QDialog" >
+ <property name="objectName" >
+ <string notr="true" >ImageDialog</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Create Image</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="widthLabel" >
+ <property name="objectName" >
+ <string notr="true" >widthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>27</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Width:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="heightLabel" >
+ <property name="objectName" >
+ <string notr="true" >heightLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>55</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Height:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="colorDepthCombo" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthCombo</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="nameLineEdit" >
+ <property name="objectName" >
+ <string notr="true" >nameLineEdit</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Untitled image</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Normal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="objectName" >
+ <string notr="true" >spinBox</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>1</y>
+ <width>227</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="spinBox_2" >
+ <property name="objectName" >
+ <string notr="true" >spinBox_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>27</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="objectName" >
+ <string notr="true" >nameLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>67</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="colorDepthLabel" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>83</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Color depth:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>121</y>
+ <width>302</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>128</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="objectName" >
+ <string notr="true" >okButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>135</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="objectName" >
+ <string notr="true" >cancelButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>221</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>nameLineEdit</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>spinBox_2</tabstop>
+ <tabstop>colorDepthCombo</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <connections>
+ <connection>
+ <sender>nameLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>okButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/doc/src/snippets/designer/autoconnection/main.cpp b/doc/src/snippets/designer/autoconnection/main.cpp
new file mode 100644
index 0000000..f5c762c
--- /dev/null
+++ b/doc/src/snippets/designer/autoconnection/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imagedialog.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ImageDialog *dialog = new ImageDialog;
+ dialog->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/designer/designer.pro b/doc/src/snippets/designer/designer.pro
new file mode 100644
index 0000000..1445ca5
--- /dev/null
+++ b/doc/src/snippets/designer/designer.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+SUBDIRS = autoconnection \
+ imagedialog \
+ multipleinheritance \
+ noautoconnection \
+ singleinheritance
diff --git a/doc/src/snippets/designer/imagedialog/imagedialog.pro b/doc/src/snippets/designer/imagedialog/imagedialog.pro
new file mode 100644
index 0000000..164a7b2
--- /dev/null
+++ b/doc/src/snippets/designer/imagedialog/imagedialog.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+FORMS = imagedialog.ui
+SOURCES = main.cpp
diff --git a/doc/src/snippets/designer/imagedialog/imagedialog.ui b/doc/src/snippets/designer/imagedialog/imagedialog.ui
new file mode 100644
index 0000000..1c5e546
--- /dev/null
+++ b/doc/src/snippets/designer/imagedialog/imagedialog.ui
@@ -0,0 +1,389 @@
+<ui version="4.0" >
+ <comment></comment>
+ <class>ImageDialog</class>
+ <widget class="QDialog" >
+ <property name="objectName" >
+ <string notr="true" >ImageDialog</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Create Image</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="widthLabel" >
+ <property name="objectName" >
+ <string notr="true" >widthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>27</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Width:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="heightLabel" >
+ <property name="objectName" >
+ <string notr="true" >heightLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>55</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Height:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="colorDepthCombo" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthCombo</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="nameLineEdit" >
+ <property name="objectName" >
+ <string notr="true" >nameLineEdit</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Untitled image</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Normal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="objectName" >
+ <string notr="true" >spinBox</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>1</y>
+ <width>227</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="spinBox_2" >
+ <property name="objectName" >
+ <string notr="true" >spinBox_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>27</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="objectName" >
+ <string notr="true" >nameLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>67</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="colorDepthLabel" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>83</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Color depth:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>121</y>
+ <width>302</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>128</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="objectName" >
+ <string notr="true" >okButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>135</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="objectName" >
+ <string notr="true" >cancelButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>221</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>nameLineEdit</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>spinBox_2</tabstop>
+ <tabstop>colorDepthCombo</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <connections>
+ <connection>
+ <sender>nameLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>okButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/doc/src/snippets/designer/imagedialog/main.cpp b/doc/src/snippets/designer/imagedialog/main.cpp
new file mode 100644
index 0000000..3613dde
--- /dev/null
+++ b/doc/src/snippets/designer/imagedialog/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "ui_imagedialog.h"
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QDialog *window = new QDialog;
+ Ui::ImageDialog ui;
+ ui.setupUi(window);
+
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/designer/multipleinheritance/imagedialog.cpp b/doc/src/snippets/designer/multipleinheritance/imagedialog.cpp
new file mode 100644
index 0000000..6386408
--- /dev/null
+++ b/doc/src/snippets/designer/multipleinheritance/imagedialog.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagedialog.h"
+
+ImageDialog::ImageDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+
+ colorDepthCombo->addItem(tr("2 colors (1 bit per pixel)"));
+ colorDepthCombo->addItem(tr("4 colors (2 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 colors (4 bits per pixel)"));
+ colorDepthCombo->addItem(tr("256 colors (8 bits per pixel)"));
+ colorDepthCombo->addItem(tr("65536 colors (16 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 million colors (24 bits per pixel)"));
+
+ connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
diff --git a/doc/src/snippets/designer/multipleinheritance/imagedialog.h b/doc/src/snippets/designer/multipleinheritance/imagedialog.h
new file mode 100644
index 0000000..81161e7
--- /dev/null
+++ b/doc/src/snippets/designer/multipleinheritance/imagedialog.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEDIALOG_H
+#define IMAGEDIALOG_H
+
+#include "ui_imagedialog.h"
+
+class ImageDialog : public QDialog, private Ui::ImageDialog
+{
+ Q_OBJECT
+
+public:
+ ImageDialog(QWidget *parent = 0);
+};
+
+#endif
diff --git a/doc/src/snippets/designer/multipleinheritance/imagedialog.ui b/doc/src/snippets/designer/multipleinheritance/imagedialog.ui
new file mode 100644
index 0000000..1c5e546
--- /dev/null
+++ b/doc/src/snippets/designer/multipleinheritance/imagedialog.ui
@@ -0,0 +1,389 @@
+<ui version="4.0" >
+ <comment></comment>
+ <class>ImageDialog</class>
+ <widget class="QDialog" >
+ <property name="objectName" >
+ <string notr="true" >ImageDialog</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Create Image</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="widthLabel" >
+ <property name="objectName" >
+ <string notr="true" >widthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>27</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Width:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="heightLabel" >
+ <property name="objectName" >
+ <string notr="true" >heightLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>55</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Height:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="colorDepthCombo" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthCombo</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="nameLineEdit" >
+ <property name="objectName" >
+ <string notr="true" >nameLineEdit</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Untitled image</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Normal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="objectName" >
+ <string notr="true" >spinBox</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>1</y>
+ <width>227</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="spinBox_2" >
+ <property name="objectName" >
+ <string notr="true" >spinBox_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>27</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="objectName" >
+ <string notr="true" >nameLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>67</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="colorDepthLabel" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>83</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Color depth:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>121</y>
+ <width>302</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>128</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="objectName" >
+ <string notr="true" >okButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>135</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="objectName" >
+ <string notr="true" >cancelButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>221</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>nameLineEdit</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>spinBox_2</tabstop>
+ <tabstop>colorDepthCombo</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <connections>
+ <connection>
+ <sender>nameLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>okButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/doc/src/snippets/designer/multipleinheritance/main.cpp b/doc/src/snippets/designer/multipleinheritance/main.cpp
new file mode 100644
index 0000000..f5c762c
--- /dev/null
+++ b/doc/src/snippets/designer/multipleinheritance/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imagedialog.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ImageDialog *dialog = new ImageDialog;
+ dialog->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/designer/multipleinheritance/multipleinheritance.pro b/doc/src/snippets/designer/multipleinheritance/multipleinheritance.pro
new file mode 100644
index 0000000..fba94de
--- /dev/null
+++ b/doc/src/snippets/designer/multipleinheritance/multipleinheritance.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+FORMS = imagedialog.ui
+HEADERS = imagedialog.h
+SOURCES = imagedialog.cpp \
+ main.cpp
diff --git a/doc/src/snippets/designer/noautoconnection/imagedialog.cpp b/doc/src/snippets/designer/noautoconnection/imagedialog.cpp
new file mode 100644
index 0000000..1529377
--- /dev/null
+++ b/doc/src/snippets/designer/noautoconnection/imagedialog.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagedialog.h"
+
+//! [0]
+ImageDialog::ImageDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ okButton->setAutoDefault(false);
+ cancelButton->setAutoDefault(false);
+//! [0]
+
+ colorDepthCombo->addItem(tr("2 colors (1 bit per pixel)"));
+ colorDepthCombo->addItem(tr("4 colors (2 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 colors (4 bits per pixel)"));
+ colorDepthCombo->addItem(tr("256 colors (8 bits per pixel)"));
+ colorDepthCombo->addItem(tr("65536 colors (16 bits per pixel)"));
+ colorDepthCombo->addItem(tr("16 million colors (24 bits per pixel)"));
+
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+//! [1]
+ connect(okButton, SIGNAL(clicked()), this, SLOT(checkValues()));
+}
+//! [1]
+
+//! [2]
+void ImageDialog::checkValues()
+{
+ if (nameLineEdit->text().isEmpty())
+ (void) QMessageBox::information(this, tr("No Image Name"),
+ tr("Please supply a name for the image."), QMessageBox::Cancel);
+ else
+ accept();
+}
+//! [2]
diff --git a/doc/src/snippets/designer/noautoconnection/imagedialog.h b/doc/src/snippets/designer/noautoconnection/imagedialog.h
new file mode 100644
index 0000000..c67b01e
--- /dev/null
+++ b/doc/src/snippets/designer/noautoconnection/imagedialog.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEDIALOG_H
+#define IMAGEDIALOG_H
+
+#include "ui_imagedialog.h"
+
+//! [0]
+class ImageDialog : public QDialog, private Ui::ImageDialog
+{
+ Q_OBJECT
+
+public:
+ ImageDialog(QWidget *parent = 0);
+
+private slots:
+ void checkValues();
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/designer/noautoconnection/imagedialog.ui b/doc/src/snippets/designer/noautoconnection/imagedialog.ui
new file mode 100644
index 0000000..1c5e546
--- /dev/null
+++ b/doc/src/snippets/designer/noautoconnection/imagedialog.ui
@@ -0,0 +1,389 @@
+<ui version="4.0" >
+ <comment></comment>
+ <class>ImageDialog</class>
+ <widget class="QDialog" >
+ <property name="objectName" >
+ <string notr="true" >ImageDialog</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Create Image</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="widthLabel" >
+ <property name="objectName" >
+ <string notr="true" >widthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>27</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Width:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="heightLabel" >
+ <property name="objectName" >
+ <string notr="true" >heightLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>55</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Height:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="colorDepthCombo" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthCombo</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="nameLineEdit" >
+ <property name="objectName" >
+ <string notr="true" >nameLineEdit</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Untitled image</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Normal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="objectName" >
+ <string notr="true" >spinBox</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>1</y>
+ <width>227</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="spinBox_2" >
+ <property name="objectName" >
+ <string notr="true" >spinBox_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>27</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="objectName" >
+ <string notr="true" >nameLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>67</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="colorDepthLabel" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>83</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Color depth:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>121</y>
+ <width>302</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>128</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="objectName" >
+ <string notr="true" >okButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>135</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="objectName" >
+ <string notr="true" >cancelButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>221</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>nameLineEdit</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>spinBox_2</tabstop>
+ <tabstop>colorDepthCombo</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <connections>
+ <connection>
+ <sender>nameLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>okButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/doc/src/snippets/designer/noautoconnection/main.cpp b/doc/src/snippets/designer/noautoconnection/main.cpp
new file mode 100644
index 0000000..f5c762c
--- /dev/null
+++ b/doc/src/snippets/designer/noautoconnection/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imagedialog.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ImageDialog *dialog = new ImageDialog;
+ dialog->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/designer/noautoconnection/noautoconnection.pro b/doc/src/snippets/designer/noautoconnection/noautoconnection.pro
new file mode 100644
index 0000000..fba94de
--- /dev/null
+++ b/doc/src/snippets/designer/noautoconnection/noautoconnection.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+FORMS = imagedialog.ui
+HEADERS = imagedialog.h
+SOURCES = imagedialog.cpp \
+ main.cpp
diff --git a/doc/src/snippets/designer/singleinheritance/imagedialog.cpp b/doc/src/snippets/designer/singleinheritance/imagedialog.cpp
new file mode 100644
index 0000000..2614858
--- /dev/null
+++ b/doc/src/snippets/designer/singleinheritance/imagedialog.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagedialog.h"
+
+ImageDialog::ImageDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ ui.setupUi(this);
+
+ ui.colorDepthCombo->addItem(tr("2 colors (1 bit per pixel)"));
+ ui.colorDepthCombo->addItem(tr("4 colors (2 bits per pixel)"));
+ ui.colorDepthCombo->addItem(tr("16 colors (4 bits per pixel)"));
+ ui.colorDepthCombo->addItem(tr("256 colors (8 bits per pixel)"));
+ ui.colorDepthCombo->addItem(tr("65536 colors (16 bits per pixel)"));
+ ui.colorDepthCombo->addItem(tr("16 million colors (24 bits per pixel)"));
+
+ connect(ui.okButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
+}
diff --git a/doc/src/snippets/designer/singleinheritance/imagedialog.h b/doc/src/snippets/designer/singleinheritance/imagedialog.h
new file mode 100644
index 0000000..08e0c61
--- /dev/null
+++ b/doc/src/snippets/designer/singleinheritance/imagedialog.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEDIALOG_H
+#define IMAGEDIALOG_H
+
+#include "ui_imagedialog.h"
+
+class ImageDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ ImageDialog(QWidget *parent = 0);
+
+private:
+ Ui::ImageDialog ui;
+};
+
+#endif
diff --git a/doc/src/snippets/designer/singleinheritance/imagedialog.ui b/doc/src/snippets/designer/singleinheritance/imagedialog.ui
new file mode 100644
index 0000000..1c5e546
--- /dev/null
+++ b/doc/src/snippets/designer/singleinheritance/imagedialog.ui
@@ -0,0 +1,389 @@
+<ui version="4.0" >
+ <comment></comment>
+ <class>ImageDialog</class>
+ <widget class="QDialog" >
+ <property name="objectName" >
+ <string notr="true" >ImageDialog</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Create Image</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="widthLabel" >
+ <property name="objectName" >
+ <string notr="true" >widthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>27</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Width:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="heightLabel" >
+ <property name="objectName" >
+ <string notr="true" >heightLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>55</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Height:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="colorDepthCombo" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthCombo</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="nameLineEdit" >
+ <property name="objectName" >
+ <string notr="true" >nameLineEdit</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>83</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Untitled image</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Normal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="objectName" >
+ <string notr="true" >spinBox</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>1</y>
+ <width>227</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QSpinBox" name="spinBox_2" >
+ <property name="objectName" >
+ <string notr="true" >spinBox_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>74</x>
+ <y>27</y>
+ <width>227</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="buttonSymbols" >
+ <enum>QAbstractSpinBox::UpDownArrows</enum>
+ </property>
+ <property name="value" >
+ <number>32</number>
+ </property>
+ <property name="maximum" >
+ <number>1024</number>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="objectName" >
+ <string notr="true" >nameLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>67</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Name:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="colorDepthLabel" >
+ <property name="objectName" >
+ <string notr="true" >colorDepthLabel</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>83</y>
+ <width>67</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text" >
+ <string>Color depth:</string>
+ </property>
+ <property name="textFormat" >
+ <enum>Qt::AutoText</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>9</x>
+ <y>121</y>
+ <width>302</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>128</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="objectName" >
+ <string notr="true" >okButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>135</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="objectName" >
+ <string notr="true" >cancelButton</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>221</x>
+ <y>1</y>
+ <width>80</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>nameLineEdit</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>spinBox_2</tabstop>
+ <tabstop>colorDepthCombo</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <connections>
+ <connection>
+ <sender>nameLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>okButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>-1</x>
+ <y>7</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/doc/src/snippets/designer/singleinheritance/main.cpp b/doc/src/snippets/designer/singleinheritance/main.cpp
new file mode 100644
index 0000000..f5c762c
--- /dev/null
+++ b/doc/src/snippets/designer/singleinheritance/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imagedialog.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ImageDialog *dialog = new ImageDialog;
+ dialog->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/designer/singleinheritance/singleinheritance.pro b/doc/src/snippets/designer/singleinheritance/singleinheritance.pro
new file mode 100644
index 0000000..fba94de
--- /dev/null
+++ b/doc/src/snippets/designer/singleinheritance/singleinheritance.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+FORMS = imagedialog.ui
+HEADERS = imagedialog.h
+SOURCES = imagedialog.cpp \
+ main.cpp
diff --git a/doc/src/snippets/dialogs/dialogs.cpp b/doc/src/snippets/dialogs/dialogs.cpp
new file mode 100644
index 0000000..7474e30
--- /dev/null
+++ b/doc/src/snippets/dialogs/dialogs.cpp
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+typedef QDialog WordCountDialog;
+typedef QDialog FindDialog;
+
+#define this 0
+#define setWordCount(x) isVisible()
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+class EditorWindow : public QMainWindow
+{
+public:
+ void find();
+ void countWords();
+
+private:
+ FindDialog *findDialog;
+};
+
+//! [0]
+void EditorWindow::find()
+{
+ if (!findDialog) {
+ findDialog = new FindDialog(this);
+ connect(findDialog, SIGNAL(findNext()), this, SLOT(findNext()));
+ }
+
+ findDialog->show();
+ findDialog->raise();
+ findDialog->activateWindow();
+}
+//! [0]
+
+//! [1]
+void EditorWindow::countWords()
+{
+ WordCountDialog dialog(this);
+ dialog.setWordCount(document().wordCount());
+ dialog.exec();
+}
+//! [1]
+
+inline bool boo()
+{
+ QMessageBox::information(this, "Application name",
+ "Unable to find the user preferences file.\n"
+ "The factory default will be used instead.");
+
+ QString filename;
+ if (QFile::exists(filename) &&
+ QMessageBox::question(
+ this,
+ tr("Overwrite File? -- Application Name"),
+ tr("A file called %1 already exists."
+ "Do you want to overwrite it?")
+ .arg(filename),
+ tr("&Yes"), tr("&No"),
+ QString(), 0, 1))
+ return false;
+
+ switch(QMessageBox::warning(this, "Application name",
+ "Could not connect to the <mumble> server.\n"
+ "This program can't function correctly "
+ "without the server.\n\n",
+ "Retry",
+ "Quit", 0, 0, 1)) {
+ case 0: // The user clicked the Retry again button or pressed Enter
+ // try again
+ break;
+ case 1: // The user clicked the Quit or pressed Escape
+ // exit
+ break;
+ }
+
+ switch(QMessageBox::information(this, "Application name here",
+ "The document contains unsaved changes\n"
+ "Do you want to save the changes before exiting?",
+ "&Save", "&Discard", "Cancel",
+ 0, // Enter == button 0
+ 2)) { // Escape == button 2
+ case 0: // Save clicked or Alt+S pressed or Enter pressed.
+ // save
+ break;
+ case 1: // Discard clicked or Alt+D pressed
+ // don't save but exit
+ break;
+ case 2: // Cancel clicked or Escape pressed
+ // don't exit
+ break;
+ }
+
+ switch(QMessageBox::warning(this, "Application name here",
+ "Could not save the user preferences,\n"
+ "because the disk is full. You can delete\n"
+ "some files and press Retry, or you can\n"
+ "abort the Save Preferences operation.",
+ QMessageBox::Retry | QMessageBox::Default,
+ QMessageBox::Abort | QMessageBox::Escape)) {
+ case QMessageBox::Retry: // Retry clicked or Enter pressed
+ // try again
+ break;
+ case QMessageBox::Abort: // Abort clicked or Escape pressed
+ // abort
+ break;
+ }
+
+ QString errorDetails;
+ QMessageBox::critical(0, "Application name here",
+ QString("An internal error occurred. Please ") +
+ "call technical support at 1234-56789 and report\n"+
+ "these numbers:\n\n" + errorDetails +
+ "\n\nApplication will now exit.");
+
+ QMessageBox::about(this, "About <Application>",
+ "<Application> is a <one-paragraph blurb>\n\n"
+ "Copyright 1991-2003 Such-and-such. "
+ "<License words here.>\n\n"
+ "For technical support, call 1234-56789 or see\n"
+ "http://www.such-and-such.com/Application/\n");
+
+ {
+ // saving the file
+ QMessageBox mb("Application name here",
+ "Saving the file will overwrite the original file on the disk.\n"
+ "Do you really want to save?",
+ QMessageBox::Information,
+ QMessageBox::Yes | QMessageBox::Default,
+ QMessageBox::No,
+ QMessageBox::Cancel | QMessageBox::Escape);
+ mb.setButtonText(QMessageBox::Yes, "Save");
+ mb.setButtonText(QMessageBox::No, "Discard");
+ switch(mb.exec()) {
+ case QMessageBox::Yes:
+ // save and exit
+ break;
+ case QMessageBox::No:
+ // exit without saving
+ break;
+ case QMessageBox::Cancel:
+ // don't save and don't exit
+ break;
+ }
+ }
+
+ {
+ // hardware failure
+//! [2]
+ QMessageBox mb("Application Name",
+ "Hardware failure.\n\nDisk error detected\nDo you want to stop?",
+ QMessageBox::Question,
+ QMessageBox::Yes | QMessageBox::Default,
+ QMessageBox::No | QMessageBox::Escape,
+ QMessageBox::NoButton);
+ if (mb.exec() == QMessageBox::No) {
+ // try again
+//! [2]
+ }
+ }
+}
+
+inline void moo()
+{
+ int numFiles;
+//! [3]
+ QProgressDialog progress("Copying files...", "Abort Copy", 0, numFiles, this);
+ progress.setWindowModality(Qt::WindowModal);
+
+ for (int i = 0; i < numFiles; i++) {
+ progress.setValue(i);
+
+ if (progress.wasCanceled())
+ break;
+ //... copy one file
+ }
+ progress.setValue(numFiles);
+//! [3]
+}
+
+class Operation : public QObject
+{
+public:
+ Operation(QObject *parent);
+ void perform();
+ void cancel();
+
+private:
+ int steps;
+ QProgressDialog *pd;
+ QTimer *t;
+};
+
+//! [4]
+// Operation constructor
+Operation::Operation(QObject *parent)
+ : QObject(parent), steps(0)
+{
+ pd = new QProgressDialog("Operation in progress.", "Cancel", 0, 100);
+ connect(pd, SIGNAL(canceled()), this, SLOT(cancel()));
+ t = new QTimer(this);
+ connect(t, SIGNAL(timeout()), this, SLOT(perform()));
+ t->start(0);
+}
+//! [4] //! [5]
+
+void Operation::perform()
+{
+ pd->setValue(steps);
+ //... perform one percent of the operation
+ steps++;
+ if (steps > pd->maximum())
+ t->stop();
+}
+//! [5] //! [6]
+
+void Operation::cancel()
+{
+ t->stop();
+ //... cleanup
+}
+//! [6]
+
+int main()
+{
+}
diff --git a/doc/src/snippets/dialogs/dialogs.pro b/doc/src/snippets/dialogs/dialogs.pro
new file mode 100644
index 0000000..fd5d363
--- /dev/null
+++ b/doc/src/snippets/dialogs/dialogs.pro
@@ -0,0 +1 @@
+SOURCES += dialogs.cpp
diff --git a/doc/src/snippets/dockwidgets/Resources/modules.html b/doc/src/snippets/dockwidgets/Resources/modules.html
new file mode 100644
index 0000000..9c67393
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/modules.html
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: Qt Classes by Module</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="next" href="qtcore.html" />
+ <link rel="start" href="index.html" />
+</head>
+<body>
+<h1 align="center">Qt Classes by Module</h1>
+<table align="center" cellpadding="2" cellspacing="1" border="0">
+<tr valign="top" bgcolor="#f0f0f0"><td>QtCore</td><td>Core classes used by other modules.</td></tr>
+<tr valign="top" bgcolor="#e0e0e0"><td>QtGui</td><td>Graphical User Interface components</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td>QtNetwork</td><td>Classes for network programming.</td></tr>
+<tr valign="top" bgcolor="#e0e0e0"><td>QtOpenGL</td><td>OpenGL support classes.</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td>QtSql</td><td>Classes for database integration using SQL.</td></tr>
+<tr valign="top" bgcolor="#e0e0e0"><td>QtXml</td><td>Classes for handling XML.</td></tr>
+</table>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtcore.html b/doc/src/snippets/dockwidgets/Resources/qtcore.html
new file mode 100644
index 0000000..947ad40
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtcore.html
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtCore Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="modules.html" />
+ <link rel="contents" href="modules.html" />
+ <link rel="next" href="qtgui.html" />
+</head>
+<body>
+<h1 align="center">QtCore Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractEventDispatcher</b></td><td>Manages Qt's event queue, excluding GUI-related events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractItemModel</b></td><td>The abstract interface for item model classes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractListModel</b></td><td>Abstract model that can be subclassed to create one-dimensional list models</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractTableModel</b></td><td>Abstract model that can be subclassed to create table models</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBasicTimer</b></td><td>Timer events for </td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBitArray</b></td><td>Array of bits</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBuffer</b></td><td>QIODevice interface for a QByteArray</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QByteArray</b></td><td>Array of bytes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QByteArrayMatcher</b></td><td>Holds a sequence of bytes that can be quickly matched in a byte array</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCache</b></td><td>Template class that provides a cache</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QChar</b></td><td>16-bit Unicode character</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QChildEvent</b></td><td>Event parameters for child object events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCoreApplication</b></td><td>Event loop for Qt applications</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCustomEvent</b></td><td>Support for custom events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDataStream</b></td><td>Serialization of binary data to a QIODevice</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDate</b></td><td>Date functions</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDateTime</b></td><td>Date and time functions</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDir</b></td><td>Access to directory structures and their contents</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QEvent</b></td><td>The base class of all event classes. Event objects contain event parameters</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFile</b></td><td>Interface for reading from and writing to files</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileEngine</b></td><td>Abstraction for accessing the filesystem</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileEngineHandler</b></td><td>Allows custom QFileEngines to be plugged into Qt</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileInfo</b></td><td>System-independent file information</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHash</b></td><td>Template class that provides a hash-table-based dictionary</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIODevice</b></td><td>The base interface class of all I/O devices in Qt</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLatin1Char</b></td><td>8-bit ASCII/Latin-1 character</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLatin1String</b></td><td>Thin wrapper around an ASCII/Latin-1 encoded string literal</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLibrary</b></td><td>Loads shared libraries at runtime</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLibraryInfo</b></td><td>Information about the Qt library</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLine</b></td><td>Two-dimensional vector that uses integer point coordinates for accuracy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLineF</b></td><td>Two-dimensional vector that uses floating point coordinates for accuracy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLinkedList</b></td><td>Template class that provides linked lists</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QList</b></td><td>Template class that provides lists</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLocale</b></td><td>Converts between numbers and their string representations in various languages</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMap</b></td><td>Template class that provides a skip-list-based dictionary</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaClassInfo</b></td><td>Additional information about a class</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaEnum</b></td><td>Meta data about an enumerator</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaMember</b></td><td>Meta data about a member function</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaObject</b></td><td>Meta information about Qt objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaProperty</b></td><td>Meta data about a property</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMetaType</b></td><td>Manages named types in the meta object system</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMimeData</b></td><td>Container for data that records information about its MIME type</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QModelIndex</b></td><td>Used to locate data in a data model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMultiHash</b></td><td>Convenience QHash subclass that provides multi-valued hashes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMultiMap</b></td><td>Convenience QMap subclass that provides multi-valued maps</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMutex</b></td><td>Access serialization between threads</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMutexLocker</b></td><td>Convenience class that simplifies locking and unlocking mutexes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QObject</b></td><td>The base class of all Qt objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QObjectCleanupHandler</b></td><td>Watches the lifetime of multiple QObjects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPair</b></td><td>Template class that stores a pair of items</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPersistentModelIndex</b></td><td>Used to locate data in a data model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPluginLoader</b></td><td>Loads a plugin at runtime</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPoint</b></td><td>Defines a point in the plane</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPointF</b></td><td>Point object that uses floating point coordinates for accuracy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPointer</b></td><td>Template class that provides guarded pointers to QObjects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QProcess</b></td><td>Used to start external programs and to communicate with them</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QQueue</b></td><td>Generic container that provides a queue</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QReadLocker</b></td><td>Convenience class that simplifies locking and unlocking read-write locks for read access</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QReadWriteLock</b></td><td>Read-write locking</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRect</b></td><td>Defines a rectangle in the plane</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRectF</b></td><td>Defines a rectangle in the plane using floating point coordinates for accuracy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRegExp</b></td><td>Pattern matching using regular expressions</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QResource</b></td><td>Access to application resource data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSemaphore</b></td><td>General counting semaphore</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSet</b></td><td>Template class that provides a hash-table-based set</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSettings</b></td><td>Persistent platform-independent application settings</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSharedData</b></td><td>Base class for shared data objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSharedDataPointer</b></td><td>Pointer to a shared data object</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSignal</b></td><td>Can be used to send signals for classes that do not inherit QObject</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSignalMapper</b></td><td>Bundles signals from identifiable senders</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSize</b></td><td>Defines the size of a two-dimensional object</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSizeF</b></td><td>Defines the size of a two-dimensional object using floating point values for accuracy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSocketNotifier</b></td><td>Support for monitoring activity on a file descriptor</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStack</b></td><td>Template class that provides a stack</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QString</b></td><td>Unicode character string</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStringList</b></td><td>List of strings</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTemporaryFile</b></td><td>I/O device that operates on temporary files</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextCodec</b></td><td>Conversions between text encodings</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextCodecPlugin</b></td><td>Abstract base for custom QTextCodec plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextDecoder</b></td><td>State-based decoder</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextEncoder</b></td><td>State-based encoder</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextIStream</b></td><td>Convenience class for input streams</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextOStream</b></td><td>Convenience class for output streams</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextStream</b></td><td>Convenient interface for reading and writing text</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QThread</b></td><td>Platform-independent threads</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QThreadStorage</b></td><td>Per-thread data storage</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTime</b></td><td>Clock time functions</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTimer</b></td><td>Repetitive and single-shot timers</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTimerEvent</b></td><td>Parameters that describe a timer event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTranslator</b></td><td>Internationalization support for text output</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTranslatorMessage</b></td><td>Translator message and its properties</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTsciiCodec</b></td><td>Conversion to and from the Tamil TSCII encoding</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QUrl</b></td><td>Convenient interface for working with URLs</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QUuid</b></td><td>Defines a Universally Unique Identifier (UUID)</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QVarLengthArray</b></td><td>Low-level variable-length array</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QVariant</b></td><td>Acts like a union for the most common Qt data types</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QVector</b></td><td>Template class that provides a dynamic array</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWaitCondition</b></td><td>Condition variable for synchronizing threads</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWriteLocker</b></td><td>Convenience class that simplifies locking and unlocking read-write locks for write access</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtgui.html b/doc/src/snippets/dockwidgets/Resources/qtgui.html
new file mode 100644
index 0000000..9182b4c
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtgui.html
@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtGui Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="qtcore.html" />
+ <link rel="contents" href="modules.html" />
+ <link rel="next" href="qtnetwork.html" />
+</head>
+<body>
+<h1 align="center">QtGui Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractButton</b></td><td>The abstract base class of button widgets, providing functionality common to buttons</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractItemDelegate</b></td><td>Used to display and edit data items from a model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractItemView</b></td><td>The basic functionality for item view classes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractScrollArea</b></td><td>Scrolling area with on-demand scroll bars</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractSlider</b></td><td>Integer value within a range</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractSpinBox</b></td><td>Spinwidget and a line edit to display values</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractTextDocumentLayout</b></td><td>Abstract base class used to implement custom layouts for QTextDocuments</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAccessible</b></td><td>Enums and static functions relating to accessibility</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAccessibleInterface</b></td><td>Defines an interface that exposes information about accessible objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAccessibleObject</b></td><td>Implements parts of the QAccessibleInterface for QObjects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAccessiblePlugin</b></td><td>Abstract base for accessibility plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAccessibleWidget</b></td><td>Implements the QAccessibleInterface for QWidgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAction</b></td><td>Abstract user interface action that can be inserted into widgets with QWidget::addAction()</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QActionGroup</b></td><td>Groups actions together</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QApplication</b></td><td>Manages the GUI application's control flow and main settings</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBitmap</b></td><td>Monochrome (1-bit depth) pixmaps</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBoxLayout</b></td><td>Lines up child widgets horizontally or vertically</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QBrush</b></td><td>Defines the fill pattern of shapes drawn by a QPainter</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QButtonGroup</b></td><td>Container to organize groups of button widgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCDEStyle</b></td><td>CDE look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCheckBox</b></td><td>Checkbox with a text label</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QClipboard</b></td><td>Access to the window system clipboard</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCloseEvent</b></td><td>Parameters that describe a close event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QColor</b></td><td>Colors based on RGB or HSV values</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QColorDialog</b></td><td>Dialog widget for specifying colors</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QColorGroup</b></td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QComboBox</b></td><td>Combined button and popup list</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCommonStyle</b></td><td>Encapsulates the common Look and Feel of a GUI</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QConicalGradient</b></td><td>Used in combination with QBrush to specify a conical gradient brush</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QContextMenuEvent</b></td><td>Parameters that describe a context menu event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCopChannel</b></td><td>Communication capabilities between several clients</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QCursor</b></td><td>Mouse cursor with an arbitrary shape</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDateTimeEdit</b></td><td>Widget for editing dates and times</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDecoration</b></td><td>Allows the appearance of the Qtopia Core Window Manager to be customized</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDecorationFactory</b></td><td>Creates QDecoration objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDecorationPlugin</b></td><td>Abstract base for custom QDecoration plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDesktopWidget</b></td><td>Access to screen information on multi-head systems</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDial</b></td><td>Rounded range control (like a speedometer or potentiometer)</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDialog</b></td><td>The base class of dialog windows</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDirModel</b></td><td>Data model for the local filesystem</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDirectPainter</b></td><td>Direct access to the video hardware</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDockWidget</b></td><td>Widget that can be docked inside a QMainWindow or floated as a top-level window on the desktop</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDoubleSpinBox</b></td><td>Spin box widget that takes doubles</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDoubleValidator</b></td><td>Range checking of floating-point numbers</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDrag</b></td><td>Support for MIME-based drag and drop data transfer</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDragEnterEvent</b></td><td>Event which is sent to a widget when a drag and drop action enters it</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDragLeaveEvent</b></td><td>Event that is sent to a widget when a drag and drop action leaves it</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDragMoveEvent</b></td><td>Event which is sent while a drag and drop action is in progress</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDropEvent</b></td><td>Event which is sent when a drag and drop action is completed</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QErrorMessage</b></td><td>Error message display dialog</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileDialog</b></td><td>Dialog that allow users to select files or directories</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileIconProvider</b></td><td>File icon for the QDirModel class</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFileOpenEvent</b></td><td>Event that will be sent when there is a request to open a file</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFocusEvent</b></td><td>Event parameters for widget focus events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFocusFrame</b></td><td>Focus frame which can be outside of a widget's normal paintable area</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFont</b></td><td>Font used for drawing text</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFontDatabase</b></td><td>Information about the fonts available in the underlying window system</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFontDialog</b></td><td>Dialog widget for selecting a font</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFontInfo</b></td><td>General information about fonts</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFontMetrics</b></td><td>Font metrics information</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFontMetricsF</b></td><td>Font metrics information</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFrame</b></td><td>The base class of widgets that can have a frame</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGfxDriverFactory</b></td><td>Creates QScreen objects for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGfxDriverPlugin</b></td><td>Abstract base for Qtopia Core graphics driver plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGradient</b></td><td>Used in combination with QBrush to specify gradient fills</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGridLayout</b></td><td>Lays out widgets in a grid</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGridWidget</b></td><td>Simple geometry management of its children</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGroupBox</b></td><td>Group box frame with a title</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHBoxLayout</b></td><td>Lines up widgets horizontally</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHBoxWidget</b></td><td>Horizontal geometry management for its child widgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHeaderView</b></td><td>Header row or header column for item views</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHideEvent</b></td><td>Event which is sent after a widget is hidden</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHoverEvent</b></td><td>Parameters that describe a mouse event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIcon</b></td><td>Scalable icons in different modes and states</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIconDragEvent</b></td><td>Indicates that a main icon drag has begun</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIconEngine</b></td><td>Abstract base class for QIcon renderers</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIconEnginePlugin</b></td><td>Abstract base for custom QIconEngine plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImage</b></td><td>Hardware-independent pixmap that allows direct access to the pixel data, and can be used as a paint device</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImageIOHandler</b></td><td>Defines the common image I/O interface for all image formats in Qt</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImageIOHandlerFactoryInterface</b></td><td>The factory interface for QImageIOPlugin</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImageIOPlugin</b></td><td>Defines an interface for writing an image format plugin</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImageReader</b></td><td>Format independent interface for reading images from files or other devices</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QImageWriter</b></td><td>Format independent interface for writing images to files or other devices</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QInputContext</b></td><td>Abstracts the input method dependent data and composing state</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QInputContextPlugin</b></td><td>Abstract base for custom QInputContext plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QInputDialog</b></td><td>Simple convenience dialog to get a single value from the user</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QInputEvent</b></td><td>The base class for events that describe user input</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QInputMethodEvent</b></td><td>Parameters for input method events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QIntValidator</b></td><td>Validator that ensures a string contains a valid integer within a specified range</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QItemDelegate</b></td><td>Display and editing facilities for data items from a model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QItemSelection</b></td><td>Manages information about selected items in a model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QItemSelectionModel</b></td><td>Keeps track of a view's selected items</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QItemSelectionRange</b></td><td>Manages information about a range of selected items in a model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QKbdDriverFactory</b></td><td>Creates QWSKeyboardHandler objects for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QKbdDriverPlugin</b></td><td>Abstract base for Qtopia Core keyboard driver plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QKeyEvent</b></td><td>Describes a key event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QKeySequence</b></td><td>Encapsulates a key sequence as used by shortcuts</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLCDNumber</b></td><td>Displays a number with LCD-like digits</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLabel</b></td><td>Text or image display</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLayout</b></td><td>The base class of geometry managers</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLayoutItem</b></td><td>Abstract item that a QLayout manipulates</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLineEdit</b></td><td>One-line text editor</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QLinearGradient</b></td><td>Used in combination with QBrush to specify a linear gradient brush</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QListView</b></td><td>Default model/view implementation of a list, and of an icon view</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QListWidget</b></td><td>Item-based list widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QListWidgetItem</b></td><td>Item for use with the QListWidget item view class</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMacMime</b></td><td>Maps open-standard MIME to Mac flavors</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMacStyle</b></td><td>Implements an Appearance Manager style</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMainWindow</b></td><td>Main application window</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMatrix</b></td><td>2D transformations of a coordinate system</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMenu</b></td><td>Menu widget for use in menu bars, context menus, and other popup menus</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMenuBar</b></td><td>Horizontal menu bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMenuItem</b></td><td>Represents an item in a menu</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMessageBox</b></td><td>Modal dialog with a short message, an icon, and some buttons</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMotifPlusStyle</b></td><td>More sophisticated Motif-ish look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMotifStyle</b></td><td>Motif look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMouseDriverFactory</b></td><td>Creates QWSMouseHandler objects for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMouseDriverPlugin</b></td><td>Abstract base for Qtopia Core mouse driver plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMouseEvent</b></td><td>Parameters that describe a mouse event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMoveEvent</b></td><td>Event parameters for move events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QMovie</b></td><td>Convenience class for playing movies with QImageReader</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPaintDevice</b></td><td>The base class of objects that can be painted</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPaintEngine</b></td><td>Abstract definition of how QPainter draws to a given device on a given platform</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPaintEvent</b></td><td>Event parameters for paint events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPainter</b></td><td>Does low-level painting e.g. on widgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPainterPath</b></td><td>Container for painting operations, enabling graphical shapes to be constructed and reused</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPalette</b></td><td>Color groups for each widget state</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPen</b></td><td>Defines how a QPainter should draw lines and outlines of shapes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPicture</b></td><td>Paint device that records and replays QPainter commands</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPictureFormatPlugin</b></td><td>Abstract base for custom picture format plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPictureIO</b></td><td>Parameters for loading and saving pictures</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPixmap</b></td><td>Off-screen, pixel-based paint device</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPixmapCache</b></td><td>Application-wide cache for pixmaps</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPlatinumStyle</b></td><td>Mac/Platinum look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPolygon</b></td><td>Vector of points</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPolygonF</b></td><td>Vector of points</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPrintEngine</b></td><td>Defines an interface for how QPrinter interacts with a given printing subsystem</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPrinter</b></td><td>Paint device that paints on a printer</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QProgressBar</b></td><td>Horizontal progress bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QProgressDialog</b></td><td>Feedback on the progress of a slow operation</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QProxyModel</b></td><td>Support for filtering and sorting data that is passed between another model and a view</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QPushButton</b></td><td>Command button</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRadialGradient</b></td><td>Used in combination with QBrush to specify a radial gradient brush</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRadioButton</b></td><td>Radio button with a text label</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRegExpValidator</b></td><td>Used to check a string against a regular expression</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRegion</b></td><td>Clip region for a painter</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QResizeEvent</b></td><td>Event parameters for resize events</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QRubberBand</b></td><td>Rectangle or line that can indicate a selection or a boundary</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSGIStyle</b></td><td>SGI/Irix look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QScreen</b></td><td>And its descendants manage the framebuffer and palette</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QScrollArea</b></td><td>Scrolling view onto another widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QScrollBar</b></td><td>Vertical or horizontal scroll bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSessionManager</b></td><td>Access to the session manager</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QShortcut</b></td><td>Used to create keyboard shortcuts</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QShowEvent</b></td><td>Event that is sent when a widget is shown</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSizeGrip</b></td><td>Corner-grip for resizing a top-level window</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSizePolicy</b></td><td>Layout attribute describing horizontal and vertical resizing policy</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSlider</b></td><td>Vertical or horizontal slider</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSound</b></td><td>Access to the platform audio facilities</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSpacerItem</b></td><td>Blank space in a layout</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSpinBox</b></td><td>Spin box widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSplashScreen</b></td><td>Splash screen that can be shown during application startup</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSplitter</b></td><td>Implements a splitter widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSplitterHandle</b></td><td>Handle functionality of the splitter</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStackedLayout</b></td><td>Stack of widgets where only one widget is visible at a time</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStackedWidget</b></td><td>Stack of widgets where only one widget is visible at a time</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStandardItemModel</b></td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStatusBar</b></td><td>Horizontal bar suitable for presenting status information</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyle</b></td><td>Abstract base class that encapsulates the look and feel of a GUI</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleFactory</b></td><td>Creates QStyle objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleHintReturn</b></td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOption</b></td><td>Stores the parameters used by QStyle functions</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionButton</b></td><td>Used to describe the parameters for drawing buttons</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionComboBox</b></td><td>Used to describe the parameter for drawing a combobox</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionComplex</b></td><td>Used to hold parameters that are common to all complex controls</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionDockWidget</b></td><td>Used to describe the parameters for drawing a dock window</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionFocusRect</b></td><td>Used to describe the parameters for drawing a focus rectangle with QStyle</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionFrame</b></td><td>Used to describe the parameters for drawing a frame</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionHeader</b></td><td>Used to describe the parameters for drawing a header</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionMenuItem</b></td><td>Used to describe the parameter necessary for drawing a menu item</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionProgressBar</b></td><td>Used to describe the parameters necessary for drawing a progress bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionQ3DockWindow</b></td><td>Used to describe the parameters for drawing various parts of a </td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionQ3ListView</b></td><td>Used to describe the parameters for drawing a Q3ListView</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionQ3ListViewItem</b></td><td>Used to describe an item drawn in a Q3ListView</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionSlider</b></td><td>Used to describe the parameters needed for drawing a slider</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionSpinBox</b></td><td>Used to describe the parameters necessary for drawing a spin box</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionTab</b></td><td>Used to describe the parameters for drawing a tab bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionTitleBar</b></td><td>Used to describe the parameters for drawing a title bar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionToolBox</b></td><td>Used to describe the parameters needed for drawing a tool box</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionToolButton</b></td><td>Used to describe the parameters for drawing a tool button</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStyleOptionViewItem</b></td><td>Used to describe the parameters used to draw an item in a view widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStylePainter</b></td><td>Convenience class for drawing QStyle elements inside a widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QStylePlugin</b></td><td>Abstract base for custom QStyle plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTabBar</b></td><td>Tab bar, e.g. for use in tabbed dialogs</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTabWidget</b></td><td>Stack of tabbed widgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTableView</b></td><td>Default model/view implementation of a table view</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTableWidget</b></td><td>Item-based table view with a default model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTableWidgetItem</b></td><td>Item for use with the QTableWidget class</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTableWidgetSelectionRange</b></td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTabletEvent</b></td><td>Parameters that describe a Tablet event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextBlock</b></td><td>Container for text fragments in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextBlockFormat</b></td><td>Formatting information for blocks of text in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextBlockGroup</b></td><td>Container for text blocks within a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextBrowser</b></td><td>Rich text browser with hypertext navigation</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextCharFormat</b></td><td>Formatting information for characters in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextCursor</b></td><td>Offers an API to access and modify QTextDocuments</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextDocument</b></td><td>Holds formatted text that can be viewed and edited using a QTextEdit</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextDocumentFragment</b></td><td>Represents a piece of formatted text from a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextEdit</b></td><td>Widget that is used to edit and display both plain and rich text</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextFormat</b></td><td>Formatting information for a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextFragment</b></td><td>Holds a piece of text in a QTextDocument with a single QTextCharFormat</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextFrame</b></td><td>Represents a frame in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextFrameFormat</b></td><td>Formatting information for frames in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextImageFormat</b></td><td>Formatting information for images in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextInlineObject</b></td><td>Represents an inline object in a QTextLayout</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextLayout</b></td><td>Used to lay out and paint a single paragraph of text</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextLength</b></td><td>Encapsulates the different types of length used in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextLine</b></td><td>Represents a line of text inside a QTextLayout</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextList</b></td><td>Decorated list of items in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextListFormat</b></td><td>Formatting information for lists in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextObject</b></td><td>Base class for different kinds of objects that can group parts of a QTextDocument together</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextOption</b></td><td>Description of general rich text properties</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextTable</b></td><td>Represents a table in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextTableCell</b></td><td>Represents the properties of a cell in a QTextTable</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTextTableFormat</b></td><td>Formatting information for tables in a QTextDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QToolBar</b></td><td>Movable panel that contains a set of controls</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QToolBarChangeEvent</b></td><td>Event that is sent whenever a the toolbar button is clicked on Mac OS X</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QToolBox</b></td><td>Column of tabbed widget items</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QToolButton</b></td><td>Quick-access button to commands or options, usually used inside a QToolBar</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QToolTip</b></td><td>Tool tips (balloon help) for any widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTreeView</b></td><td>Default model/view implementation of a tree view</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTreeWidget</b></td><td>Tree view that uses a predefined tree model</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTreeWidgetItem</b></td><td>Item for use with the QTreeWidget convenience class</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QVBoxLayout</b></td><td>Lines up widgets vertically</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QVBoxWidget</b></td><td>Vertical geometry management of its child widgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QValidator</b></td><td>Validation of input text</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWSInputMethod</b></td><td>International input methods for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWSKeyboardHandler</b></td><td>Implements the keyboard driver for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWSMouseHandler</b></td><td>Mouse driver for Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWSServer</b></td><td>Server-specific functionality in Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWSWindow</b></td><td>Server-specific functionality in Qtopia Core</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWhatsThis</b></td><td>Simple description of any widget, i.e. answering the question &quot;What's this?&quot;</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWhatsThisAction</b></td><td>Ready-made action to invoke &quot;What's This&quot; context help</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWheelEvent</b></td><td>Parameters that describe a wheel event</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWidget</b></td><td>The base class of all user interface objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWidgetContainerPlugin</b></td><td>Abstract base for complex custom container QWidget plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWidgetItem</b></td><td>Layout item that represents a widget</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWidgetPlugin</b></td><td>Abstract base for custom QWidget plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWindowsMime</b></td><td>Maps open-standard MIME to Window Clipboard formats</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWindowsStyle</b></td><td>Microsoft Windows-like look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWindowsXPStyle</b></td><td>Microsoft WindowsXP-like look and feel</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QWorkspace</b></td><td>Workspace window that be used in an MDI application</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QX11Info</b></td><td>Information about the X display configuration</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtnetwork.html b/doc/src/snippets/dockwidgets/Resources/qtnetwork.html
new file mode 100644
index 0000000..01e1fa4
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtnetwork.html
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtNetwork Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="qtgui.html" />
+ <link rel="contents" href="modules.html" />
+ <link rel="next" href="qtopengl.html" />
+</head>
+<body>
+<h1 align="center">QtNetwork Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QAbstractSocket</b></td><td>The base functionality common to all socket types</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QFtp</b></td><td>Implementation of the FTP protocol</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHostAddress</b></td><td>IP address</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHostInfo</b></td><td>Static functions for host name lookups</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHttp</b></td><td>Implementation of the HTTP protocol</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHttpHeader</b></td><td>Header information for HTTP</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHttpRequestHeader</b></td><td>Request header information for HTTP</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QHttpResponseHeader</b></td><td>Response header information for HTTP</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTcpServer</b></td><td>TCP-based server</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QTcpSocket</b></td><td>TCP socket</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QUdpSocket</b></td><td>UDP socket</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QUrlInfo</b></td><td>Stores information about URLs</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtopengl.html b/doc/src/snippets/dockwidgets/Resources/qtopengl.html
new file mode 100644
index 0000000..c42c4ae
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtopengl.html
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtOpenGL Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="qtnetwork.html" />
+ <link rel="contents" href="modules.html" />
+ <link rel="next" href="qtsql.html" />
+</head>
+<body>
+<h1 align="center">QtOpenGL Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGLColormap</b></td><td>Used for installing custom colormaps into QGLWidgets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGLContext</b></td><td>Encapsulates an OpenGL rendering context</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGLFormat</b></td><td>The display format of an OpenGL rendering context</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QGLWidget</b></td><td>Widget for rendering OpenGL graphics</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtsql.html b/doc/src/snippets/dockwidgets/Resources/qtsql.html
new file mode 100644
index 0000000..db44d6d
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtsql.html
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtSql Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="qtopengl.html" />
+ <link rel="contents" href="modules.html" />
+ <link rel="next" href="qtxml.html" />
+</head>
+<body>
+<h1 align="center">QtSql Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlDatabase</b></td><td>Represents a connection to a database</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlDriver</b></td><td>Abstract base class for accessing specific SQL databases</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlDriverCreator</b></td><td>Template class that provides a SQL driver factory for a specific driver type</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlDriverCreatorBase</b></td><td>The base class for SQL driver factories</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlDriverPlugin</b></td><td>Abstract base for custom QSqlDriver plugins</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlError</b></td><td>SQL database error information</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlField</b></td><td>Manipulates the fields in SQL database tables and views</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlIndex</b></td><td>Functions to manipulate and describe database indexes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlQuery</b></td><td>Means of executing and manipulating SQL statements</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlQueryModel</b></td><td>Read-only data model for SQL result sets</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlRecord</b></td><td>Encapsulates a database record</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlRelation</b></td><td>Stores information about an SQL foreign key</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlRelationalDelegate</b></td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlRelationalTableModel</b></td><td>Editable data model for a single database table, with foreign key support</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlResult</b></td><td>Abstract interface for accessing data from specific SQL databases</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QSqlTableModel</b></td><td>Editable data model for a single database table</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/qtxml.html b/doc/src/snippets/dockwidgets/Resources/qtxml.html
new file mode 100644
index 0000000..d10d542
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/qtxml.html
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- /home/dboddie/dev/qt-4.0/doc/src/classes.qdoc -->
+<head>
+ <title>Qt 4.0: QtXml Classes</title>
+ <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+td.postheader { font-family: sans-serif }
+tr.address { font-family: sans-serif }
+body { background: #ffffff; color: black; }</style>
+ <link rel="prev" href="qtsql.html" />
+ <link rel="contents" href="modules.html" />
+</head>
+<body>
+<h1 align="center">QtXml Classes</h1>
+<p><table width="100%">
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomAttr</b></td><td>Represents one attribute of a QDomElement</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomCDATASection</b></td><td>Represents an XML CDATA section</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomCharacterData</b></td><td>Represents a generic string in the DOM</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomComment</b></td><td>Represents an XML comment</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomDocument</b></td><td>Represents an XML document</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomDocumentFragment</b></td><td>Tree of QDomNodes which is not usually a complete QDomDocument</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomDocumentType</b></td><td>The representation of the DTD in the document tree</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomElement</b></td><td>Represents one element in the DOM tree</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomEntity</b></td><td>Represents an XML entity</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomEntityReference</b></td><td>Represents an XML entity reference</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomImplementation</b></td><td>Information about the features of the DOM implementation</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomNamedNodeMap</b></td><td>Collection of nodes that can be accessed by name</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomNode</b></td><td>The base class for all the nodes in a DOM tree</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomNodeList</b></td><td>List of QDomNode objects</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomNotation</b></td><td>Represents an XML notation</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomProcessingInstruction</b></td><td>Represents an XML processing instruction</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QDomText</b></td><td>Represents text data in the parsed XML document</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlAttributes</b></td><td>XML attributes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlContentHandler</b></td><td>Interface to report the logical content of XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlDTDHandler</b></td><td>Interface to report DTD content of XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlDeclHandler</b></td><td>Interface to report declaration content of XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlDefaultHandler</b></td><td>Default implementation of all the XML handler classes</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlEntityResolver</b></td><td>Interface to resolve external entities contained in XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlErrorHandler</b></td><td>Interface to report errors in XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlInputSource</b></td><td>The input data for the QXmlReader subclasses</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlLexicalHandler</b></td><td>Interface to report the lexical content of XML data</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlLocator</b></td><td>The XML handler classes with information about the parsing position within a file</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlNamespaceSupport</b></td><td>Helper class for XML readers which want to include namespace support</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlParseException</b></td><td>Used to report errors with the QXmlErrorHandler interface</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlReader</b></td><td>Interface for XML readers (i.e. parsers)</td></tr>
+<tr valign="top" bgcolor="#f0f0f0"><td><b>QXmlSimpleReader</b></td><td>Implementation of a simple XML parser</td></tr>
+</table></p>
+</body>
+</html>
diff --git a/doc/src/snippets/dockwidgets/Resources/titles.txt b/doc/src/snippets/dockwidgets/Resources/titles.txt
new file mode 100644
index 0000000..016825d
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/Resources/titles.txt
@@ -0,0 +1,7 @@
+Qt Classes by Module :/Resources/modules.html
+QtCore :/Resources/qtcore.html
+QtGui :/Resources/qtgui.html
+QtNetwork :/Resources/qtnetwork.html
+QtOpenGL :/Resources/qtopengl.html
+QtSql :/Resources/qtsql.html
+QtXml :/Resources/qtxml.html
diff --git a/doc/src/snippets/dockwidgets/dockwidgets.pro b/doc/src/snippets/dockwidgets/dockwidgets.pro
new file mode 100644
index 0000000..11d80f3
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/dockwidgets.pro
@@ -0,0 +1,4 @@
+HEADERS = mainwindow.h
+RESOURCES = dockwidgets.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/dockwidgets/dockwidgets.qrc b/doc/src/snippets/dockwidgets/dockwidgets.qrc
new file mode 100644
index 0000000..8c462a5
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/dockwidgets.qrc
@@ -0,0 +1,12 @@
+<RCC>
+ <qresource>
+ <file>Resources/titles.txt</file>
+ <file>Resources/modules.html</file>
+ <file>Resources/qtcore.html</file>
+ <file>Resources/qtgui.html</file>
+ <file>Resources/qtnetwork.html</file>
+ <file>Resources/qtopengl.html</file>
+ <file>Resources/qtsql.html</file>
+ <file>Resources/qtxml.html</file>
+ </qresource>
+</RCC>
diff --git a/doc/src/snippets/dockwidgets/main.cpp b/doc/src/snippets/dockwidgets/main.cpp
new file mode 100644
index 0000000..7dfd2f4
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QMainWindow *window = new MainWindow;
+ window->show();
+ window->resize(640, 480);
+ return app.exec();
+}
diff --git a/doc/src/snippets/dockwidgets/mainwindow.cpp b/doc/src/snippets/dockwidgets/mainwindow.cpp
new file mode 100644
index 0000000..ec80303
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/mainwindow.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Dock Widgets");
+
+ setupDockWindow();
+ setupContents();
+ setupMenus();
+
+ textBrowser = new QTextBrowser(this);
+
+ connect(headingList, SIGNAL(itemClicked(QListWidgetItem *)),
+ this, SLOT(updateText(QListWidgetItem *)));
+
+ updateText(headingList->item(0));
+ headingList->setCurrentRow(0);
+ setCentralWidget(textBrowser);
+}
+
+void MainWindow::setupContents()
+{
+ QFile titlesFile(":/Resources/titles.txt");
+ titlesFile.open(QFile::ReadOnly);
+ int chapter = 0;
+
+ do {
+ QString line = titlesFile.readLine().trimmed();
+ QStringList parts = line.split("\t", QString::SkipEmptyParts);
+ if (parts.size() != 2)
+ break;
+
+ QString chapterTitle = parts[0];
+ QString fileName = parts[1];
+
+ QFile chapterFile(fileName);
+
+ chapterFile.open(QFile::ReadOnly);
+ QListWidgetItem *item = new QListWidgetItem(chapterTitle, headingList);
+ item->setData(Qt::DisplayRole, chapterTitle);
+ item->setData(Qt::UserRole, chapterFile.readAll());
+ item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+ chapterFile.close();
+
+ chapter++;
+ } while (titlesFile.isOpen());
+
+ titlesFile.close();
+}
+
+void MainWindow::setupDockWindow()
+{
+//! [0]
+ contentsWindow = new QDockWidget(tr("Table of Contents"), this);
+ contentsWindow->setAllowedAreas(Qt::LeftDockWidgetArea
+ | Qt::RightDockWidgetArea);
+ addDockWidget(Qt::LeftDockWidgetArea, contentsWindow);
+
+ headingList = new QListWidget(contentsWindow);
+ contentsWindow->setWidget(headingList);
+//! [0]
+}
+
+void MainWindow::setupMenus()
+{
+ QAction *exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
+
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAct);
+}
+
+void MainWindow::updateText(QListWidgetItem *item)
+{
+ QString text = item->data(Qt::UserRole).toString();
+ textBrowser->setHtml(text);
+}
diff --git a/doc/src/snippets/dockwidgets/mainwindow.h b/doc/src/snippets/dockwidgets/mainwindow.h
new file mode 100644
index 0000000..fffadd4
--- /dev/null
+++ b/doc/src/snippets/dockwidgets/mainwindow.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class QDockWidget;
+class QListWidget;
+class QListWidgetItem;
+class QTextBrowser;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void updateText(QListWidgetItem *item);
+
+private:
+ void setupContents();
+ void setupDockWindow();
+ void setupMenus();
+
+ QDockWidget *contentsWindow;
+ QListWidget *headingList;
+ QTextBrowser *textBrowser;
+};
+
+#endif
diff --git a/doc/src/snippets/draganddrop/draganddrop.pro b/doc/src/snippets/draganddrop/draganddrop.pro
new file mode 100644
index 0000000..67bc32b
--- /dev/null
+++ b/doc/src/snippets/draganddrop/draganddrop.pro
@@ -0,0 +1,5 @@
+HEADERS = dragwidget.h \
+ mainwindow.h
+SOURCES = dragwidget.cpp \
+ main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/draganddrop/dragwidget.cpp b/doc/src/snippets/draganddrop/dragwidget.cpp
new file mode 100644
index 0000000..2fe3e53
--- /dev/null
+++ b/doc/src/snippets/draganddrop/dragwidget.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dragwidget.h"
+
+DragWidget::DragWidget(QWidget *parent)
+ : QFrame(parent)
+{
+ setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ dragDropLabel = new QLabel("", this);
+ dragDropLabel->setAlignment(Qt::AlignHCenter);
+
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ layout->addStretch(0);
+ layout->addWidget(dragDropLabel);
+ layout->addStretch(0);
+
+ setAcceptDrops(true);
+}
+
+// Accept all actions, but deal with them separately later.
+//! [0]
+void DragWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ event->acceptProposedAction();
+}
+//! [0]
+
+//! [1]
+void DragWidget::dropEvent(QDropEvent *event)
+{
+ if (event->source() == this && event->possibleActions() & Qt::MoveAction)
+ return;
+//! [1]
+
+//! [2]
+ if (event->proposedAction() == Qt::MoveAction) {
+ event->acceptProposedAction();
+ // Process the data from the event.
+//! [2]
+ emit dragResult(tr("The data was moved here."));
+//! [3]
+ } else if (event->proposedAction() == Qt::CopyAction) {
+ event->acceptProposedAction();
+ // Process the data from the event.
+//! [3]
+ emit dragResult(tr("The data was copied here."));
+//! [4]
+ } else {
+ // Ignore the drop.
+ return;
+ }
+//! [4]
+ // End of quote
+
+ emit mimeTypes(event->mimeData()->formats());
+ setData(event->mimeData()->formats()[0],
+ event->mimeData()->data(event->mimeData()->formats()[0]));
+//! [5]
+}
+//! [5]
+
+//! [6]
+void DragWidget::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ dragStartPosition = event->pos();
+}
+//! [6]
+
+//! [7]
+void DragWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if (!(event->buttons() & Qt::LeftButton))
+ return;
+ if ((event->pos() - dragStartPosition).manhattanLength()
+ < QApplication::startDragDistance())
+ return;
+
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+
+ mimeData->setData(mimeType, data);
+ drag->setMimeData(mimeData);
+
+ Qt::DropAction dropAction = drag->exec(Qt::CopyAction | Qt::MoveAction);
+//! [7]
+
+ switch (dropAction) {
+ case Qt::CopyAction:
+ emit dragResult(tr("The text was copied."));
+ break;
+ case Qt::MoveAction:
+ emit dragResult(tr("The text was moved."));
+ break;
+ default:
+ emit dragResult(tr("Unknown action."));
+ break;
+ }
+//! [8]
+}
+//! [8]
+
+void DragWidget::setData(const QString &mimetype, const QByteArray &newData)
+{
+ mimeType = mimetype;
+ data = QByteArray(newData);
+
+ dragDropLabel->setText(tr("%1 bytes").arg(data.size()));
+
+ QStringList formats;
+ formats << mimetype;
+ emit mimeTypes(formats);
+}
diff --git a/doc/src/snippets/draganddrop/dragwidget.h b/doc/src/snippets/draganddrop/dragwidget.h
new file mode 100644
index 0000000..07fd091
--- /dev/null
+++ b/doc/src/snippets/draganddrop/dragwidget.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGWIDGET_H
+#define DRAGWIDGET_H
+
+#include <QByteArray>
+#include <QFrame>
+#include <QString>
+#include <QStringList>
+
+class QComboBox;
+class QFrame;
+class QLabel;
+class QTextBrowser;
+
+class DragWidget : public QFrame
+{
+ Q_OBJECT
+
+public:
+ DragWidget(QWidget *parent);
+ void setData(const QString &mimetype, const QByteArray &newData);
+
+signals:
+ void dragResult(const QString &actionText);
+ void mimeTypes(const QStringList &types);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+
+private:
+ QByteArray data;
+ QLabel *dragDropLabel;
+ QPoint dragStartPosition;
+ QString mimeType;
+};
+
+#endif
diff --git a/doc/src/snippets/draganddrop/main.cpp b/doc/src/snippets/draganddrop/main.cpp
new file mode 100644
index 0000000..73a8bc6
--- /dev/null
+++ b/doc/src/snippets/draganddrop/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window1 = new MainWindow;
+ MainWindow *window2 = new MainWindow;
+ window1->show();
+ window2->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/draganddrop/mainwindow.cpp b/doc/src/snippets/draganddrop/mainwindow.cpp
new file mode 100644
index 0000000..943b075
--- /dev/null
+++ b/doc/src/snippets/draganddrop/mainwindow.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dragwidget.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ QFrame *centralWidget = new QFrame(this);
+
+ QLabel *mimeTypeLabel = new QLabel(tr("MIME types:"), centralWidget);
+ mimeTypeCombo = new QComboBox(centralWidget);
+
+ QLabel *dataLabel = new QLabel(tr("Amount of data (bytes):"), centralWidget);
+ dragWidget = new DragWidget(centralWidget);
+
+ connect(dragWidget, SIGNAL(mimeTypes(const QStringList &)),
+ this, SLOT(setMimeTypes(const QStringList &)));
+ connect(dragWidget, SIGNAL(dragResult(const QString &)),
+ this, SLOT(setDragResult(const QString &)));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget);
+ mainLayout->addWidget(mimeTypeLabel);
+ mainLayout->addWidget(mimeTypeCombo);
+ mainLayout->addSpacing(32);
+ mainLayout->addWidget(dataLabel);
+ mainLayout->addWidget(dragWidget);
+
+ statusBar();
+ dragWidget->setData(QString("text/plain"), QByteArray("Hello world"));
+ setCentralWidget(centralWidget);
+ setWindowTitle(tr("Drag and Drop"));
+}
+
+void MainWindow::setDragResult(const QString &actionText)
+{
+ statusBar()->showMessage(actionText);
+}
+
+void MainWindow::setMimeTypes(const QStringList &types)
+{
+ mimeTypeCombo->clear();
+ mimeTypeCombo->addItems(types);
+}
diff --git a/doc/src/snippets/draganddrop/mainwindow.h b/doc/src/snippets/draganddrop/mainwindow.h
new file mode 100644
index 0000000..789b54a
--- /dev/null
+++ b/doc/src/snippets/draganddrop/mainwindow.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QPixmap>
+#include <QPoint>
+
+class QComboBox;
+class QLabel;
+class QLineEdit;
+class QMouseEvent;
+class QTextEdit;
+class DragWidget;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void setDragResult(const QString &actionText);
+ void setMimeTypes(const QStringList &types);
+
+private:
+ QComboBox *mimeTypeCombo;
+ DragWidget *dragWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/dragging/dragging.pro b/doc/src/snippets/dragging/dragging.pro
new file mode 100644
index 0000000..bedfc76
--- /dev/null
+++ b/doc/src/snippets/dragging/dragging.pro
@@ -0,0 +1,4 @@
+HEADERS = mainwindow.h
+RESOURCES = images.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/dragging/images.qrc b/doc/src/snippets/dragging/images.qrc
new file mode 100644
index 0000000..30b8a29
--- /dev/null
+++ b/doc/src/snippets/dragging/images.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/file.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/dragging/images/file.png b/doc/src/snippets/dragging/images/file.png
new file mode 100644
index 0000000..9520080
--- /dev/null
+++ b/doc/src/snippets/dragging/images/file.png
Binary files differ
diff --git a/doc/src/snippets/dragging/main.cpp b/doc/src/snippets/dragging/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/dragging/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/dragging/mainwindow.cpp b/doc/src/snippets/dragging/mainwindow.cpp
new file mode 100644
index 0000000..8c79895
--- /dev/null
+++ b/doc/src/snippets/dragging/mainwindow.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ QFrame *centralFrame = new QFrame(this);
+
+ QLabel *nameLabel = new QLabel(tr("Comment:"), centralFrame);
+ commentEdit = new QTextEdit(centralFrame);
+ QLabel *dragLabel = new QLabel(tr("<p>Drag the icon to a filer "
+ "window or the desktop background:</p>"),
+ centralFrame);
+ iconLabel = new QLabel(centralFrame);
+ iconPixmap.load(":/images/file.png");
+ iconLabel->setPixmap(iconPixmap);
+
+ QGridLayout *grid = new QGridLayout(centralFrame);
+ grid->addWidget(nameLabel, 0, 0);
+ grid->addWidget(commentEdit, 1, 0, 1, 2);
+ grid->addWidget(dragLabel, 2, 0);
+ grid->addWidget(iconLabel, 2, 1);
+
+ statusBar();
+ setCentralWidget(centralFrame);
+ setWindowTitle(tr("Dragging"));
+}
+
+//! [0]
+void MainWindow::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton
+ && iconLabel->geometry().contains(event->pos())) {
+
+//! [1]
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+
+ mimeData->setText(commentEdit->toPlainText());
+ drag->setMimeData(mimeData);
+//! [1]
+ drag->setPixmap(iconPixmap);
+
+ Qt::DropAction dropAction = drag->exec();
+//! [0]
+
+ QString actionText;
+ switch (dropAction) {
+ case Qt::CopyAction:
+ actionText = tr("The text was copied.");
+ break;
+ case Qt::MoveAction:
+ actionText = tr("The text was moved.");
+ break;
+ case Qt::LinkAction:
+ actionText = tr("The text was linked.");
+ break;
+ case Qt::IgnoreAction:
+ actionText = tr("The drag was ignored.");
+ break;
+ default:
+ actionText = tr("Unknown action.");
+ break;
+ }
+ statusBar()->showMessage(actionText);
+//! [2]
+ }
+}
+//! [2]
diff --git a/doc/src/snippets/dragging/mainwindow.h b/doc/src/snippets/dragging/mainwindow.h
new file mode 100644
index 0000000..6c90e60
--- /dev/null
+++ b/doc/src/snippets/dragging/mainwindow.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QPixmap>
+#include <QPoint>
+
+class QLabel;
+class QLineEdit;
+class QMouseEvent;
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+
+private:
+ QLabel *iconLabel;
+ QLineEdit *nameEdit;
+ QPixmap iconPixmap;
+ QPoint dragStartPosition;
+ QTextEdit *commentEdit;
+};
+
+#endif
diff --git a/doc/src/snippets/dropactions/dropactions.pro b/doc/src/snippets/dropactions/dropactions.pro
new file mode 100644
index 0000000..6283406
--- /dev/null
+++ b/doc/src/snippets/dropactions/dropactions.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/dropactions/main.cpp b/doc/src/snippets/dropactions/main.cpp
new file mode 100644
index 0000000..e10789c
--- /dev/null
+++ b/doc/src/snippets/dropactions/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window *window = new Window;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/dropactions/window.cpp b/doc/src/snippets/dropactions/window.cpp
new file mode 100644
index 0000000..c790f9b
--- /dev/null
+++ b/doc/src/snippets/dropactions/window.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *textLabel = new QLabel(tr("Data:"), this);
+ textBrowser = new QTextBrowser(this);
+
+ QLabel *mimeTypeLabel = new QLabel(tr("MIME types:"), this);
+ mimeTypeCombo = new QComboBox(this);
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(textLabel);
+ layout->addWidget(textBrowser);
+ layout->addWidget(mimeTypeLabel);
+ layout->addWidget(mimeTypeCombo);
+/*
+ ...
+ setAcceptDrops(true);
+*/
+ setAcceptDrops(true);
+ setWindowTitle(tr("Drop Actions"));
+}
+
+void Window::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("text/plain"))
+ event->acceptProposedAction();
+}
+
+void Window::dropEvent(QDropEvent *event)
+{
+ QMenu actionMenu(this);
+ QAction *copyAction = 0;
+ QAction *moveAction = 0;
+ QAction *linkAction = 0;
+ QAction *ignoreAction = 0;
+ if (event->possibleActions() & Qt::CopyAction)
+ copyAction = actionMenu.addAction(tr("Copy"));
+ if (event->possibleActions() & Qt::MoveAction)
+ moveAction = actionMenu.addAction(tr("Move"));
+ if (event->possibleActions() & Qt::LinkAction)
+ linkAction = actionMenu.addAction(tr("Link"));
+ if (event->possibleActions() & Qt::IgnoreAction)
+ ignoreAction = actionMenu.addAction(tr("Ignore"));
+
+ QAction *result = actionMenu.exec(QCursor::pos());
+
+ if (copyAction && result == copyAction)
+ event->setDropAction(Qt::CopyAction);
+ else if (moveAction && result == moveAction)
+ event->setDropAction(Qt::MoveAction);
+ else if (linkAction && result == linkAction)
+ event->setDropAction(Qt::LinkAction);
+ else {
+ event->setDropAction(Qt::IgnoreAction);
+ return;
+ }
+
+ textBrowser->setPlainText(event->mimeData()->text());
+ mimeTypeCombo->clear();
+ mimeTypeCombo->addItems(event->mimeData()->formats());
+}
diff --git a/doc/src/snippets/dropactions/window.h b/doc/src/snippets/dropactions/window.h
new file mode 100644
index 0000000..4bbec40
--- /dev/null
+++ b/doc/src/snippets/dropactions/window.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QString>
+#include <QStringList>
+#include <QWidget>
+
+class QComboBox;
+class QFrame;
+class QTextBrowser;
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private:
+ QComboBox *mimeTypeCombo;
+ QFrame *dropFrame;
+ QTextBrowser *textBrowser;
+ QString oldText;
+ QStringList oldMimeTypes;
+};
+
+#endif
diff --git a/doc/src/snippets/droparea.cpp b/doc/src/snippets/droparea.cpp
new file mode 100644
index 0000000..4888435
--- /dev/null
+++ b/doc/src/snippets/droparea.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "droparea.h"
+
+DropArea::DropArea(QWidget *parent)
+ : QLabel(parent)
+{
+ setMinimumSize(200, 200);
+ setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ setAlignment(Qt::AlignCenter);
+ setAcceptDrops(true);
+ setAutoFillBackground(true);
+ clear();
+}
+
+void DropArea::dragEnterEvent(QDragEnterEvent *event)
+{
+ setText(tr("<drop content>"));
+ setBackgroundRole(QPalette::Highlight);
+
+ event->acceptProposedAction();
+ emit changed(event->mimeData());
+}
+
+void DropArea::dragMoveEvent(QDragMoveEvent *event)
+{
+ event->acceptProposedAction();
+}
+
+void DropArea::dropEvent(QDropEvent *event)
+{
+ const QMimeData *mimeData = event->mimeData();
+
+ if (mimeData->hasImage()) {
+ setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));
+ } else if (mimeData->hasHtml()) {
+ setText(mimeData->html());
+ setTextFormat(Qt::RichText);
+ } else if (mimeData->hasText()) {
+ setText(mimeData->text());
+ setTextFormat(Qt::PlainText);
+ } else {
+ setText(tr("Cannot display data"));
+ }
+
+ setBackgroundRole(QPalette::Dark);
+ event->acceptProposedAction();
+}
+
+//![0]
+void DropArea::paste()
+{
+ const QClipboard *clipboard = QApplication::clipboard();
+ const QMimeData *mimeData = clipboard->mimeData();
+
+ if (mimeData->hasImage()) {
+ setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));
+ } else if (mimeData->hasHtml()) {
+ setText(mimeData->html());
+ setTextFormat(Qt::RichText);
+ } else if (mimeData->hasText()) {
+ setText(mimeData->text());
+ setTextFormat(Qt::PlainText);
+ } else {
+ setText(tr("Cannot display data"));
+ }
+//![0]
+
+ emit changed(mimeData);
+ setBackgroundRole(QPalette::Dark);
+ //event->acceptProposedAction();
+}
+
+void DropArea::dragLeaveEvent(QDragLeaveEvent *event)
+{
+ clear();
+ event->accept();
+}
+
+void DropArea::clear()
+{
+ setText(tr("<drop content>"));
+ setBackgroundRole(QPalette::Dark);
+
+ emit changed();
+}
+
+QPixmap DropArea::extractPixmap(const QByteArray &data, const QString &format)
+{
+ QList<QByteArray> imageFormats = QImageReader::supportedImageFormats();
+ QPixmap pixmap;
+
+ foreach (QByteArray imageFormat, imageFormats) {
+ if (format.mid(6) == QString(imageFormat)) {
+ pixmap.loadFromData(data, imageFormat);
+ break;
+ }
+ }
+ return pixmap;
+}
diff --git a/doc/src/snippets/dropevents/dropevents.pro b/doc/src/snippets/dropevents/dropevents.pro
new file mode 100644
index 0000000..6283406
--- /dev/null
+++ b/doc/src/snippets/dropevents/dropevents.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/dropevents/main.cpp b/doc/src/snippets/dropevents/main.cpp
new file mode 100644
index 0000000..d71a9af
--- /dev/null
+++ b/doc/src/snippets/dropevents/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Window *window = new Window;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/dropevents/window.cpp b/doc/src/snippets/dropevents/window.cpp
new file mode 100644
index 0000000..6db6da9
--- /dev/null
+++ b/doc/src/snippets/dropevents/window.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ QLabel *textLabel = new QLabel(tr("Data:"), this);
+ textBrowser = new QTextBrowser(this);
+
+ QLabel *mimeTypeLabel = new QLabel(tr("MIME types:"), this);
+ mimeTypeCombo = new QComboBox(this);
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(textLabel);
+ layout->addWidget(textBrowser);
+ layout->addWidget(mimeTypeLabel);
+ layout->addWidget(mimeTypeCombo);
+
+//! [1]
+ setAcceptDrops(true);
+//! [1]
+ setWindowTitle(tr("Drop Events"));
+//! [2]
+}
+//! [2]
+
+//! [3]
+void Window::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("text/plain"))
+ event->acceptProposedAction();
+}
+//! [3]
+
+//! [4]
+void Window::dropEvent(QDropEvent *event)
+{
+ textBrowser->setPlainText(event->mimeData()->text());
+ mimeTypeCombo->clear();
+ mimeTypeCombo->addItems(event->mimeData()->formats());
+
+ event->acceptProposedAction();
+}
+//! [4]
diff --git a/doc/src/snippets/dropevents/window.h b/doc/src/snippets/dropevents/window.h
new file mode 100644
index 0000000..4bbec40
--- /dev/null
+++ b/doc/src/snippets/dropevents/window.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QString>
+#include <QStringList>
+#include <QWidget>
+
+class QComboBox;
+class QFrame;
+class QTextBrowser;
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private:
+ QComboBox *mimeTypeCombo;
+ QFrame *dropFrame;
+ QTextBrowser *textBrowser;
+ QString oldText;
+ QStringList oldMimeTypes;
+};
+
+#endif
diff --git a/doc/src/snippets/droprectangle/droprectangle.pro b/doc/src/snippets/droprectangle/droprectangle.pro
new file mode 100644
index 0000000..6283406
--- /dev/null
+++ b/doc/src/snippets/droprectangle/droprectangle.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/droprectangle/main.cpp b/doc/src/snippets/droprectangle/main.cpp
new file mode 100644
index 0000000..e10789c
--- /dev/null
+++ b/doc/src/snippets/droprectangle/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window *window = new Window;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/droprectangle/window.cpp b/doc/src/snippets/droprectangle/window.cpp
new file mode 100644
index 0000000..22859e8
--- /dev/null
+++ b/doc/src/snippets/droprectangle/window.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *textLabel = new QLabel(tr("Data:"), this);
+ textBrowser = new QTextBrowser(this);
+
+ QLabel *mimeTypeLabel = new QLabel(tr("MIME types:"), this);
+ mimeTypeCombo = new QComboBox(this);
+
+ dropFrame = new QFrame(this);
+ dropFrame->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ QLabel *dropLabel = new QLabel(tr("Drop items here"), dropFrame);
+ dropLabel->setAlignment(Qt::AlignHCenter);
+
+ QVBoxLayout *dropFrameLayout = new QVBoxLayout(dropFrame);
+ dropFrameLayout->addWidget(dropLabel);
+
+ QHBoxLayout *dropLayout = new QHBoxLayout;
+ dropLayout->addStretch(0);
+ dropLayout->addWidget(dropFrame);
+ dropLayout->addStretch(0);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ mainLayout->addWidget(textLabel);
+ mainLayout->addWidget(textBrowser);
+ mainLayout->addWidget(mimeTypeLabel);
+ mainLayout->addWidget(mimeTypeCombo);
+ mainLayout->addSpacing(32);
+ mainLayout->addLayout(dropLayout);
+
+ setAcceptDrops(true);
+ setWindowTitle(tr("Drop Rectangle"));
+}
+
+//! [0]
+void Window::dragMoveEvent(QDragMoveEvent *event)
+{
+ if (event->mimeData()->hasFormat("text/plain")
+ && event->answerRect().intersects(dropFrame->geometry()))
+
+ event->acceptProposedAction();
+}
+//! [0]
+
+void Window::dropEvent(QDropEvent *event)
+{
+ textBrowser->setPlainText(event->mimeData()->text());
+ mimeTypeCombo->clear();
+ mimeTypeCombo->addItems(event->mimeData()->formats());
+
+ event->acceptProposedAction();
+}
diff --git a/doc/src/snippets/droprectangle/window.h b/doc/src/snippets/droprectangle/window.h
new file mode 100644
index 0000000..8406a88
--- /dev/null
+++ b/doc/src/snippets/droprectangle/window.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QString>
+#include <QStringList>
+#include <QWidget>
+
+class QComboBox;
+class QFrame;
+class QTextBrowser;
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+protected:
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private:
+ QComboBox *mimeTypeCombo;
+ QFrame *dropFrame;
+ QTextBrowser *textBrowser;
+ QString oldText;
+ QStringList oldMimeTypes;
+};
+
+#endif
diff --git a/doc/src/snippets/eventfilters/eventfilters.pro b/doc/src/snippets/eventfilters/eventfilters.pro
new file mode 100644
index 0000000..b569a33
--- /dev/null
+++ b/doc/src/snippets/eventfilters/eventfilters.pro
@@ -0,0 +1,3 @@
+HEADERS = filterobject.h
+SOURCES = filterobject.cpp \
+ main.cpp
diff --git a/doc/src/snippets/eventfilters/filterobject.cpp b/doc/src/snippets/eventfilters/filterobject.cpp
new file mode 100644
index 0000000..64930da
--- /dev/null
+++ b/doc/src/snippets/eventfilters/filterobject.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "filterobject.h"
+
+FilterObject::FilterObject(QObject *parent)
+ : QObject(parent), target(0)
+{
+}
+
+//! [0]
+bool FilterObject::eventFilter(QObject *object, QEvent *event)
+{
+ if (object == target && event->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+ if (keyEvent->key() == Qt::Key_Tab) {
+ // Special tab handling
+ return true;
+ } else
+ return false;
+ }
+ return false;
+}
+//! [0]
+
+void FilterObject::setFilteredObject(QObject *object)
+{
+ if (target)
+ target->removeEventFilter(this);
+
+ target = object;
+
+ if (target)
+ target->installEventFilter(this);
+}
diff --git a/doc/src/snippets/eventfilters/filterobject.h b/doc/src/snippets/eventfilters/filterobject.h
new file mode 100644
index 0000000..5998784
--- /dev/null
+++ b/doc/src/snippets/eventfilters/filterobject.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILTEROBJECT_H
+#define FILTEROBJECT_H
+
+#include <QObject>
+
+class FilterObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ FilterObject(QObject *parent = 0);
+ bool eventFilter(QObject *object, QEvent *event);
+ void setFilteredObject(QObject *object);
+
+private:
+ QObject *target;
+};
+
+#endif
diff --git a/doc/src/snippets/eventfilters/main.cpp b/doc/src/snippets/eventfilters/main.cpp
new file mode 100644
index 0000000..dafddc7
--- /dev/null
+++ b/doc/src/snippets/eventfilters/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTextEdit>
+
+#include "filterobject.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit editor;
+ FilterObject filter;
+ filter.setFilteredObject(&editor);
+ editor.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/events/events.cpp b/doc/src/snippets/events/events.cpp
new file mode 100644
index 0000000..e6045e6
--- /dev/null
+++ b/doc/src/snippets/events/events.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCheckBox>
+#include <QMouseEvent>
+
+class MyCheckBox : public QCheckBox
+{
+public:
+ void mousePressEvent(QMouseEvent *event);
+};
+
+//! [0]
+void MyCheckBox::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ // handle left mouse button here
+ } else {
+ // pass on other buttons to base class
+ QCheckBox::mousePressEvent(event);
+ }
+}
+//! [0]
+
+class MyWidget : public QWidget
+{
+public:
+ bool event(QEvent *event);
+};
+
+static const int MyCustomEventType = 1099;
+
+class MyCustomEvent : public QEvent
+{
+public:
+ MyCustomEvent() : QEvent((QEvent::Type)MyCustomEventType) {}
+};
+
+//! [1]
+bool MyWidget::event(QEvent *event)
+{
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+ if (ke->key() == Qt::Key_Tab) {
+ // special tab handling here
+ return true;
+ }
+ } else if (event->type() == MyCustomEventType) {
+ MyCustomEvent *myEvent = static_cast<MyCustomEvent *>(event);
+ // custom event handling here
+ return true;
+ }
+
+ return QWidget::event(event);
+}
+//! [1]
+
+int main()
+{
+}
diff --git a/doc/src/snippets/events/events.pro b/doc/src/snippets/events/events.pro
new file mode 100644
index 0000000..9c40874
--- /dev/null
+++ b/doc/src/snippets/events/events.pro
@@ -0,0 +1 @@
+SOURCES += events.cpp
diff --git a/doc/src/snippets/explicitlysharedemployee/employee.cpp b/doc/src/snippets/explicitlysharedemployee/employee.cpp
new file mode 100644
index 0000000..e2476f9
--- /dev/null
+++ b/doc/src/snippets/explicitlysharedemployee/employee.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "employee.h"
+
+//! [0]
+EmployeeData::EmployeeData()
+{
+ id = -1;
+ name = 0;
+}
+//! [0]
+
+//! [1]
+EmployeeData::EmployeeData(const EmployeeData &other)
+//! [1] //! [2]
+ : QSharedData(other)
+{
+ id = other.id;
+ if (other.name) {
+ name = new QString(*other.name);
+ } else {
+ name = 0;
+ }
+}
+//! [2]
+
+//! [3]
+EmployeeData::~EmployeeData()
+//! [3] //! [4]
+{
+ delete name;
+}
+//! [4]
+
+//! [5]
+Employee::Employee()
+//! [5] //! [6]
+{
+ d = new EmployeeData;
+}
+//! [6]
+
+//! [7]
+Employee::Employee(int id, const QString &name)
+//! [7] //! [8]
+{
+ d = new EmployeeData;
+ setId(id);
+ setName(name);
+}
+//! [8]
+
+//! [9]
+void Employee::setName(const QString &name)
+//! [9] //! [10]
+{
+ if (!d->name)
+ d->name = new QString;
+ *d->name = name;
+}
+//! [10]
+
+//! [11]
+QString Employee::name() const
+//! [11] //! [12]
+{
+ if (!d->name)
+ return QString();
+ return *d->name;
+}
+//! [12]
diff --git a/doc/src/snippets/explicitlysharedemployee/employee.h b/doc/src/snippets/explicitlysharedemployee/employee.h
new file mode 100644
index 0000000..02ef134
--- /dev/null
+++ b/doc/src/snippets/explicitlysharedemployee/employee.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EMPLOYEE_H
+#define EMPLOYEE_H
+
+#include <QSharedData>
+#include <QString>
+
+class EmployeeData : public QSharedData
+{
+public:
+ EmployeeData();
+ EmployeeData(const EmployeeData &other);
+ ~EmployeeData();
+
+ int id;
+ QString *name;
+};
+
+class Employee
+{
+public:
+ Employee();
+ Employee(int id, const QString &name);
+
+ void setId(int id) { d->id = id; }
+ void setName(const QString &name);
+
+ int id() const { return d->id; }
+ QString name() const;
+
+private:
+ QExplicitlySharedDataPointer<EmployeeData> d;
+};
+
+#endif
diff --git a/doc/src/snippets/explicitlysharedemployee/explicitlysharedemployee.pro b/doc/src/snippets/explicitlysharedemployee/explicitlysharedemployee.pro
new file mode 100644
index 0000000..536a77d
--- /dev/null
+++ b/doc/src/snippets/explicitlysharedemployee/explicitlysharedemployee.pro
@@ -0,0 +1,3 @@
+HEADERS = employee.h
+SOURCES = employee.cpp \
+ main.cpp
diff --git a/doc/src/snippets/explicitlysharedemployee/main.cpp b/doc/src/snippets/explicitlysharedemployee/main.cpp
new file mode 100644
index 0000000..c3222bb
--- /dev/null
+++ b/doc/src/snippets/explicitlysharedemployee/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "employee.h"
+
+int main()
+{
+ {
+ Employee e1(10, "Albrecht Durer");
+ Employee e2 = e1;
+ e1.setName("Hans Holbein");
+ }
+}
diff --git a/doc/src/snippets/file/file.cpp b/doc/src/snippets/file/file.cpp
new file mode 100644
index 0000000..c4f59a2
--- /dev/null
+++ b/doc/src/snippets/file/file.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QFile>
+#include <QTextStream>
+
+static void process_line(const QByteArray &)
+{
+}
+
+static void process_line(const QString &)
+{
+}
+
+static void noStream_snippet()
+{
+//! [0]
+ QFile file("in.txt");
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+ return;
+
+ while (!file.atEnd()) {
+ QByteArray line = file.readLine();
+ process_line(line);
+ }
+//! [0]
+}
+
+static void readTextStream_snippet()
+{
+//! [1]
+ QFile file("in.txt");
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+ return;
+
+ QTextStream in(&file);
+ while (!in.atEnd()) {
+ QString line = in.readLine();
+ process_line(line);
+ }
+//! [1]
+}
+
+static void writeTextStream_snippet()
+{
+//! [2]
+ QFile file("out.txt");
+ if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
+ return;
+
+ QTextStream out(&file);
+ out << "The magic number is: " << 49 << "\n";
+//! [2]
+}
+
+static void writeTextStream_snippet()
+{
+ QFile file("out.dat");
+ if (!file.open(QIODevice::WriteOnly))
+ return;
+
+ QDataStream out(&file);
+ out << "The magic number is: " << 49 << "\n";
+}
+
+static void readRegularEmptyFile_snippet()
+{
+//! [3]
+ QFile file("/proc/modules");
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+ return;
+
+ QTextStream in(&file);
+ QString line = in.readLine();
+ while (!line.isNull()) {
+ process_line(line);
+ line = in.readLine();
+ }
+//! [3]
+}
+
+int main()
+{
+ lineByLine_snippet();
+ writeStream_snippet();
+}
diff --git a/doc/src/snippets/file/file.pro b/doc/src/snippets/file/file.pro
new file mode 100644
index 0000000..bda6a94
--- /dev/null
+++ b/doc/src/snippets/file/file.pro
@@ -0,0 +1,14 @@
+######################################################################
+# Automatically generated by qmake (1.08a) Tue Jan 4 17:11:37 2005
+######################################################################
+
+TEMPLATE = app
+CONFIG -= moc
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += file.cpp
+CONFIG += qt warn_on debug create_prl link_prl
+OBJECTS_DIR=.obj/debug-shared
+MOC_DIR=.moc/debug-shared
diff --git a/doc/src/snippets/filedialogurls.cpp b/doc/src/snippets/filedialogurls.cpp
new file mode 100644
index 0000000..4b59590
--- /dev/null
+++ b/doc/src/snippets/filedialogurls.cpp
@@ -0,0 +1,22 @@
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![0]
+ QList<QUrl> urls;
+ urls << QUrl::fromLocalFile("/home/gvatteka/dev/qt-45")
+ << QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
+
+ QFileDialog dialog;
+ dialog.setSidebarUrls(urls);
+ dialog.setFileMode(QFileDialog::AnyFile);
+ if(dialog.exec()) {
+ // ...
+ }
+//![0]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/fileinfo/fileinfo.pro b/doc/src/snippets/fileinfo/fileinfo.pro
new file mode 100644
index 0000000..2705d1f
--- /dev/null
+++ b/doc/src/snippets/fileinfo/fileinfo.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Apr 3 11:48:36 2008
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/fileinfo/main.cpp b/doc/src/snippets/fileinfo/main.cpp
new file mode 100644
index 0000000..f3bd741
--- /dev/null
+++ b/doc/src/snippets/fileinfo/main.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPushButton>
+#include <QFileInfo>
+#include <QDir>
+#include <QGroupBox>
+#include <QVBoxLayout>
+#include <QDebug>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QFileInfo fileInfo1("~/examples/191697/.");
+ QFileInfo fileInfo2("~/examples/191697/..");
+ QFileInfo fileInfo3("~/examples/191697/main.cpp");
+//! [0]
+//! [1]
+ QFileInfo fileInfo4(".");
+ QFileInfo fileInfo5("..");
+ QFileInfo fileInfo6("main.cpp");
+//! [1]
+
+ qDebug() << fileInfo1.fileName();
+ qDebug() << fileInfo2.fileName();
+ qDebug() << fileInfo3.fileName();
+ qDebug() << fileInfo4.fileName();
+ qDebug() << fileInfo5.fileName();
+ qDebug() << fileInfo6.fileName();
+
+ QPushButton* button1 = new QPushButton(fileInfo1.dir().path());
+ QPushButton* button2 = new QPushButton(fileInfo2.dir().path());
+ QPushButton* button3 = new QPushButton(fileInfo3.dir().path());
+ QPushButton* button4 = new QPushButton(fileInfo4.dir().path());
+ QPushButton* button5 = new QPushButton(fileInfo5.dir().path());
+ QPushButton* button6 = new QPushButton(fileInfo6.dir().path());
+
+ QVBoxLayout* vbox = new QVBoxLayout;
+ vbox->addWidget(button1);
+ vbox->addWidget(button2);
+ vbox->addWidget(button3);
+ vbox->addWidget(button4);
+ vbox->addWidget(button5);
+ vbox->addWidget(button6);
+ vbox->addStretch(1);
+
+ QGroupBox *groupBox = new QGroupBox("QFileInfo::dir() test");
+ groupBox->setLayout(vbox);
+ groupBox->show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/graphicssceneadditemsnippet.cpp b/doc/src/snippets/graphicssceneadditemsnippet.cpp
new file mode 100644
index 0000000..e5ef224
--- /dev/null
+++ b/doc/src/snippets/graphicssceneadditemsnippet.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class CustomScene : public QGraphicsScene
+{
+public:
+ CustomScene()
+ { addItem(new QGraphicsEllipseItem(QRect(10, 10, 30, 30))); }
+
+ void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[],
+ const QStyleOptionGraphicsItem options[],
+ QWidget *widget = 0);
+};
+
+//! [0]
+void CustomScene::drawItems(QPainter *painter, int numItems,
+ QGraphicsItem *items[],
+ const QStyleOptionGraphicsItem options[],
+ QWidget *widget)
+{
+ for (int i = 0; i < numItems; ++i) {
+ // Draw the item
+ painter->save();
+ painter->setMatrix(items[i]->sceneMatrix(), true);
+ items[i]->paint(painter, &options[i], widget);
+ painter->restore();
+ }
+}
+//! [0]
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ CustomScene scene;
+ QGraphicsView view(&scene);
+
+ view.show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/i18n-non-qt-class/i18n-non-qt-class.pro b/doc/src/snippets/i18n-non-qt-class/i18n-non-qt-class.pro
new file mode 100644
index 0000000..9abd1e8
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/i18n-non-qt-class.pro
@@ -0,0 +1,7 @@
+HEADERS = myclass.h
+RESOURCES = resources.qrc
+SOURCES = main.cpp \
+ myclass.cpp
+TRANSLATIONS = translations/i18n-non-qt-class_en.ts \
+ translations/i18n-non-qt-class_fr.ts
+QT -= gui
diff --git a/doc/src/snippets/i18n-non-qt-class/main.cpp b/doc/src/snippets/i18n-non-qt-class/main.cpp
new file mode 100644
index 0000000..3f402e1
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include "myclass.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+
+ QTranslator translator;
+ translator.load(":/translations/i18n-non-qt-class_" + QLocale::system().name());
+ app.installTranslator(&translator);
+
+ MyClass instance;
+ return 0;
+}
diff --git a/doc/src/snippets/i18n-non-qt-class/myclass.cpp b/doc/src/snippets/i18n-non-qt-class/myclass.cpp
new file mode 100644
index 0000000..2bbe55f
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/myclass.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <iostream>
+#include "myclass.h"
+
+MyClass::MyClass()
+{
+ std::cout << tr("Hello Qt!\n").toLocal8Bit().constData();
+}
diff --git a/doc/src/snippets/i18n-non-qt-class/myclass.h b/doc/src/snippets/i18n-non-qt-class/myclass.h
new file mode 100644
index 0000000..41d580e
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/myclass.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYCLASS_H
+#define MYCLASS_H
+
+#include <QCoreApplication>
+
+//! [0]
+class MyClass
+{
+ Q_DECLARE_TR_FUNCTIONS(MyClass)
+
+public:
+ MyClass();
+//! [0]
+ /* ... */
+//! [1]
+};
+//! [1]
+
+#endif
diff --git a/doc/src/snippets/i18n-non-qt-class/myclass.ts b/doc/src/snippets/i18n-non-qt-class/myclass.ts
new file mode 100644
index 0000000..9bd90f2
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/myclass.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+ <name>MyClass</name>
+ <message>
+ <location filename="myclass.cpp" line="6"/>
+ <source>Hello Qt!
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/doc/src/snippets/i18n-non-qt-class/resources.qrc b/doc/src/snippets/i18n-non-qt-class/resources.qrc
new file mode 100644
index 0000000..903ac85
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/resources.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>translations/i18n-non-qt-class_en.qm</file>
+ <file>translations/i18n-non-qt-class_fr.qm</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts b/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts
new file mode 100644
index 0000000..54f1886
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+ <name>MyClass</name>
+ <message>
+ <location filename="../myclass.cpp" line="6"/>
+ <source>Hello Qt!
+</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts b/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts
new file mode 100644
index 0000000..3f3cebc
--- /dev/null
+++ b/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="fr">
+<context>
+ <name>MyClass</name>
+ <message>
+ <location filename="../myclass.cpp" line="6"/>
+ <source>Hello Qt!
+</source>
+ <translation>Bonjour Qt!
+</translation>
+ </message>
+</context>
+</TS>
diff --git a/doc/src/snippets/image/image.cpp b/doc/src/snippets/image/image.cpp
new file mode 100644
index 0000000..75d84f6
--- /dev/null
+++ b/doc/src/snippets/image/image.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main()
+{
+ int x, y;
+ {
+ // BIT ACCESS
+ QImage image;
+ // sets bit at (x, y) to 1
+ if (image.format() == QImage::Format_MonoLSB)
+ image.scanLine(y)[x >> 3] |= 1 << (x & 7);
+ else
+ image.scanLine(y)[x >> 3] |= 1 << (7 - (x & 7));
+ }
+
+ {
+ // 8-BIT ACCESS
+ QImage image;
+ // set entry 19 in the color table to yellow
+ image.setColor(19, qRgb(255, 255, 0));
+
+ // set 8 bit pixel at (x,y) to value yellow (in color table)
+ image.scanLine(y)[x] = 19;
+ }
+
+ {
+ // 32-BIT
+ QImage image;
+ // sets 32 bit pixel at (x,y) to yellow.
+ uint *ptr = reinterpret_cast<uint *>(image.scanLine(y)) + x;
+ *ptr = qRgb(255, 255, 0);
+ }
+
+ {
+ // SAVE
+//! [0]
+ QImage image;
+ QByteArray ba;
+ QBuffer buffer(&ba);
+ buffer.open(QIODevice::WriteOnly);
+ image.save(&buffer, "PNG"); // writes image into ba in PNG format
+//! [0]
+ }
+
+ {
+ // PIX SAVE
+//! [1]
+ QPixmap pixmap;
+ QByteArray bytes;
+ QBuffer buffer(&bytes);
+ buffer.open(QIODevice::WriteOnly);
+ pixmap.save(&buffer, "PNG"); // writes pixmap into bytes in PNG format
+//! [1]
+ }
+
+ {
+ // MASK
+//! [2]
+ QPixmap alpha("image-with-alpha.png");
+ QPixmap alphacopy = alpha;
+ alphacopy.setMask(alphacopy.mask());
+//! [2]
+ }
+}
diff --git a/doc/src/snippets/image/image.pro b/doc/src/snippets/image/image.pro
new file mode 100644
index 0000000..0df436a
--- /dev/null
+++ b/doc/src/snippets/image/image.pro
@@ -0,0 +1 @@
+SOURCES += image.cpp
diff --git a/doc/src/snippets/image/supportedformat.cpp b/doc/src/snippets/image/supportedformat.cpp
new file mode 100644
index 0000000..2335a94
--- /dev/null
+++ b/doc/src/snippets/image/supportedformat.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argv, char **args)
+{
+//! [0]
+ QImageWriter writer;
+ writer.setFormat("png");
+ if (writer.supportsOption(QImageIOHandler::Description))
+ qDebug() << "Png supports embedded text";
+//! [0]
+ return 0;
+}
diff --git a/doc/src/snippets/inherited-slot/button.cpp b/doc/src/snippets/inherited-slot/button.cpp
new file mode 100644
index 0000000..bbb3e70
--- /dev/null
+++ b/doc/src/snippets/inherited-slot/button.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include "button.h"
+
+Button::Button(QWidget *parent)
+ : QPushButton(parent)
+{
+}
+
+void Button::animateClick()
+{
+ qDebug() << "Extra code goes here...";
+ QPushButton::animateClick();
+}
diff --git a/doc/src/snippets/inherited-slot/button.h b/doc/src/snippets/inherited-slot/button.h
new file mode 100644
index 0000000..7f43ede
--- /dev/null
+++ b/doc/src/snippets/inherited-slot/button.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QPushButton>
+
+//! [Button class with reimplemented slot]
+class Button : public QPushButton
+{
+ Q_OBJECT
+
+public:
+ Button(QWidget *parent = 0);
+
+public slots:
+ void animateClick();
+};
+//! [Button class with reimplemented slot]
+
+#endif
diff --git a/doc/src/snippets/inherited-slot/inherited-slot.pro b/doc/src/snippets/inherited-slot/inherited-slot.pro
new file mode 100644
index 0000000..702e9cc
--- /dev/null
+++ b/doc/src/snippets/inherited-slot/inherited-slot.pro
@@ -0,0 +1,3 @@
+HEADERS = button.h
+SOURCES = main.cpp \
+ button.cpp
diff --git a/doc/src/snippets/inherited-slot/main.cpp b/doc/src/snippets/inherited-slot/main.cpp
new file mode 100644
index 0000000..999328b
--- /dev/null
+++ b/doc/src/snippets/inherited-slot/main.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QMetaMethod>
+#include <QWidget>
+#include "button.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget window;
+ QHBoxLayout *layout = new QHBoxLayout(&window);
+ QLineEdit *lineEdit = new QLineEdit;
+ Button *button = new Button;
+
+ QObject::connect(lineEdit, SIGNAL(returnPressed()), button, SLOT(animateClick()));
+
+ layout->addWidget(lineEdit);
+ layout->addWidget(button);
+ window.show();
+
+ for (int i = 0; i < button->metaObject()->methodCount(); ++i)
+ qDebug() << i << button->metaObject()->method(i).signature();
+ return app.exec();
+}
diff --git a/doc/src/snippets/itemselection/itemselection.pro b/doc/src/snippets/itemselection/itemselection.pro
new file mode 100644
index 0000000..b1126bfe
--- /dev/null
+++ b/doc/src/snippets/itemselection/itemselection.pro
@@ -0,0 +1,3 @@
+HEADERS = model.h
+SOURCES = main.cpp \
+ model.cpp
diff --git a/doc/src/snippets/itemselection/main.cpp b/doc/src/snippets/itemselection/main.cpp
new file mode 100644
index 0000000..a337008
--- /dev/null
+++ b/doc/src/snippets/itemselection/main.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QTableView>
+
+#include "model.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ TableModel *model = new TableModel(8, 4, &app);
+
+ QTableView *table = new QTableView(0);
+ table->setModel(model);
+
+ QItemSelectionModel *selectionModel = table->selectionModel();
+//! [0] //! [1]
+ QModelIndex topLeft;
+ QModelIndex bottomRight;
+
+ topLeft = model->index(0, 0, QModelIndex());
+ bottomRight = model->index(5, 2, QModelIndex());
+//! [1]
+
+//! [2]
+ QItemSelection selection(topLeft, bottomRight);
+ selectionModel->select(selection, QItemSelectionModel::Select);
+//! [2]
+
+//! [3]
+ QItemSelection toggleSelection;
+
+ topLeft = model->index(2, 1, QModelIndex());
+ bottomRight = model->index(7, 3, QModelIndex());
+ toggleSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(toggleSelection, QItemSelectionModel::Toggle);
+//! [3]
+
+//! [4]
+ QItemSelection columnSelection;
+
+ topLeft = model->index(0, 1, QModelIndex());
+ bottomRight = model->index(0, 2, QModelIndex());
+
+ columnSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(columnSelection,
+ QItemSelectionModel::Select | QItemSelectionModel::Columns);
+
+ QItemSelection rowSelection;
+
+ topLeft = model->index(0, 0, QModelIndex());
+ bottomRight = model->index(1, 0, QModelIndex());
+
+ rowSelection.select(topLeft, bottomRight);
+
+ selectionModel->select(rowSelection,
+ QItemSelectionModel::Select | QItemSelectionModel::Rows);
+//! [4]
+
+ table->setWindowTitle("Selected items in a table model");
+ table->show();
+ table->resize(460, 280);
+ return app.exec();
+}
diff --git a/doc/src/snippets/itemselection/model.cpp b/doc/src/snippets/itemselection/model.cpp
new file mode 100644
index 0000000..d4ca02b
--- /dev/null
+++ b/doc/src/snippets/itemselection/model.cpp
@@ -0,0 +1,239 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/doc/src/snippets/itemselection/model.h b/doc/src/snippets/itemselection/model.h
new file mode 100644
index 0000000..207f83a
--- /dev/null
+++ b/doc/src/snippets/itemselection/model.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/doc/src/snippets/javastyle.cpp b/doc/src/snippets/javastyle.cpp
new file mode 100644
index 0000000..ab40aaa
--- /dev/null
+++ b/doc/src/snippets/javastyle.cpp
@@ -0,0 +1,2746 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "javastyle.h"
+#include <math.h>
+
+static const int windowsItemFrame = 2;
+static const int windowsSepHeight = 2;
+static const int windowsItemHMargin = 3;
+static const int windowsItemVMargin = 2;
+static const int windowsArrowHMargin = 6;
+static const int windowsTabSpacing = 12;
+static const int windowsCheckMarkHMargin = 2;
+static const int windowsRightBorder = 15;
+static const int windowsCheckMarkWidth = 12;
+
+JavaStyle::JavaStyle()
+{
+ qApp->setPalette(standardPalette());
+}
+
+
+inline QPoint JavaStyle::adjustScrollPoint(const QPoint &point,
+ Qt::Orientation orientation,
+ bool add) const
+{
+ int adder = add ? -1 : 1;
+ QPoint retPoint;
+
+ if (orientation == Qt::Horizontal) {
+ retPoint = QPoint(point.y() * adder, point.x());
+ } else {
+ retPoint = QPoint(point.x(), point.y() * adder);
+ }
+
+ return retPoint;
+}
+
+QPalette JavaStyle::standardPalette() const
+{
+ QPalette palette = QWindowsStyle::standardPalette();
+
+ palette.setBrush(QPalette::Active, QPalette::Button,
+ QColor(184, 207, 229));
+ palette.setBrush(QPalette::Active, QPalette::WindowText,
+ Qt::black);
+ palette.setBrush(QPalette::Active, QPalette::Background,
+ QColor(238, 238, 238));
+ palette.setBrush(QPalette::Active, QPalette::Window,
+ QColor(238 ,238, 238));
+ palette.setBrush(QPalette::Active, QPalette::Base, Qt::white);
+ palette.setBrush(QPalette::Active, QPalette::AlternateBase, QColor(238, 238, 238));
+ palette.setBrush(QPalette::Active, QPalette::Text, Qt::black);
+ palette.setBrush(QPalette::Active, QPalette::BrightText, Qt::white);
+
+ palette.setBrush(QPalette::Active, QPalette::Light, QColor(163, 184, 204)); // focusFrameColor
+ palette.setBrush(QPalette::Active, QPalette::Midlight, QColor(99, 130, 191)); // tabBarBorderColor
+ palette.setBrush(QPalette::Active, QPalette::Dark, QColor(106, 104, 100));
+ palette.setBrush(QPalette::Active, QPalette::Mid, QColor(122, 138, 153)); //defaultFrameColor
+ palette.setBrush(QPalette::Active, QPalette::Shadow, QColor(122, 138, 153)); // defaultFrame
+
+ palette.setBrush(QPalette::Active, QPalette::Highlight, QColor(184, 207, 229));
+ palette.setBrush(QPalette::Active, QPalette::HighlightedText, Qt::black);
+
+ palette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(184, 207, 229));
+ palette.setBrush(QPalette::Inactive, QPalette::HighlightedText, Qt::black);
+
+ palette.setBrush(QPalette::Disabled, QPalette::Button,
+ QColor(238, 238, 238));
+ palette.setBrush(QPalette::Disabled, QPalette::WindowText,
+ QColor(153, 153, 153));
+ palette.setBrush(QPalette::Disabled, QPalette::Background, QColor(238, 238, 238));
+
+ palette.setBrush(QPalette::Inactive, QPalette::Button,
+ QColor(184, 207, 229));
+ palette.setBrush(QPalette::Inactive, QPalette::Background,
+ QColor(238, 238, 238));
+ palette.setBrush(QPalette::Inactive, QPalette::Window,
+ QColor(238 ,238, 238));
+ palette.setBrush(QPalette::Inactive, QPalette::Light, QColor(163, 184, 204)); // focusFrameColor
+ palette.setBrush(QPalette::Inactive, QPalette::Midlight, QColor(99, 130, 191)); // tabBarBorderColor
+ palette.setBrush(QPalette::Inactive, QPalette::Dark,QColor(106, 104, 100));
+ palette.setBrush(QPalette::Inactive, QPalette::Mid, QColor(122, 138, 153)); //defaultFrame
+ palette.setBrush(QPalette::Inactive, QPalette::Shadow, QColor(122, 138, 153)); // defaultFrame
+
+ return palette;
+}
+
+inline void JavaStyle::drawScrollBarArrow(const QRect &rect, QPainter *painter,
+ const QStyleOptionSlider *option,
+ bool add) const
+{
+
+ painter->save();
+
+ Qt::Orientation orient = option->orientation;
+ QPoint offset;
+
+ if (add) {
+ if (orient == Qt::Vertical) {
+ offset = rect.bottomLeft();
+ } else {
+ offset = rect.topRight();
+ }
+ } else {
+ offset = rect.topLeft();
+ }
+
+ QPainterPath arrow;
+ arrow.moveTo(offset + adjustScrollPoint(QPoint(4, 8), orient, add));
+ arrow.lineTo(offset + adjustScrollPoint(QPoint(7, 5), orient, add));
+ arrow.lineTo(offset + adjustScrollPoint(QPoint(8, 5), orient, add));
+ arrow.lineTo(offset + adjustScrollPoint(QPoint(11, 8), orient, add));
+ arrow.lineTo(offset + adjustScrollPoint(QPoint(4, 8), orient, add));
+
+ QColor fillColor;
+ if (option->state & State_Sunken)
+ fillColor = QColor(option->palette.color(QPalette::Button));
+ else
+ fillColor = option->palette.color(QPalette::Background);
+
+ painter->fillRect(rect, fillColor);
+
+ painter->setPen(option->palette.color(QPalette::Base));
+ int adjust = option->state & State_Sunken ? 0 : 1;
+ painter->drawRect(rect.adjusted(adjust, adjust, -1, -1));
+ painter->setPen(option->palette.color(QPalette::Mid));
+ painter->drawRect(rect.adjusted(0, 0, -1, -1));
+
+ painter->setPen(option->palette.color(QPalette::WindowText));
+ painter->setBrush(option->palette.color(QPalette::WindowText));
+ painter->drawPath(arrow);
+
+ painter->restore();
+}
+
+inline QPoint JavaStyle::adjustScrollHandlePoint(Qt::Orientation orig,
+ const QPoint &point) const
+{
+ QPoint retPoint;
+
+ if (orig == Qt::Vertical)
+ retPoint = point;
+ else
+ retPoint = QPoint(point.y(), point.x());
+
+ return retPoint;
+}
+
+void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const
+{
+
+ painter->save();
+
+ switch (control) {
+ case CE_ToolBoxTabShape: {
+ const QStyleOptionToolBox *box =
+ qstyleoption_cast<const QStyleOptionToolBox *>(option);
+
+ painter->save();
+
+ if (box->direction == Qt::RightToLeft) {
+ painter->rotate(1);
+ painter->translate(box->rect.width(), -box->rect.height());
+ }
+
+ int textWidth = box->fontMetrics.width(box->text) + 20;
+
+ QPolygon innerLine;
+ innerLine << (box->rect.topLeft() + QPoint(0, 1)) <<
+ (box->rect.topLeft() + QPoint(textWidth, 1)) <<
+ (box->rect.bottomLeft() + QPoint(textWidth + 15, -3)) <<
+ (box->rect.bottomRight() + QPoint(0, -3)) <<
+ box->rect.bottomRight() <<
+ box->rect.bottomLeft() <<
+ box->rect.topLeft();
+
+ painter->setPen(box->palette.color(QPalette::Base));
+ painter->setBrush(QColor(200, 221, 242));
+ painter->drawPolygon(innerLine);
+
+ QPolygon outerLine;
+ outerLine << (box->rect.bottomRight() + QPoint(0, -3)) <<
+ box->rect.bottomRight() <<
+ box->rect.bottomLeft() <<
+ box->rect.topLeft() <<
+ (box->rect.topLeft() + QPoint(textWidth, 0)) <<
+ (box->rect.bottomLeft() + QPoint(textWidth + 15, -4)) <<
+ (box->rect.bottomRight() + QPoint(0, -4));
+
+ painter->setPen(box->palette.color(QPalette::Midlight));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawPolyline(outerLine);
+
+ painter->restore();
+ break;
+ }
+ case CE_DockWidgetTitle: {
+ const QStyleOptionDockWidgetV2 *docker =
+ new QStyleOptionDockWidgetV2(
+ *qstyleoption_cast<const QStyleOptionDockWidget *>(option));
+
+ QRect rect = docker->rect;
+ QRect titleRect = rect;
+ if (docker->verticalTitleBar) {
+ QRect r = rect;
+ QSize s = r.size();
+ s.transpose();
+ r.setSize(s);
+
+ titleRect = QRect(r.left() + rect.bottom()
+ - titleRect.bottom(),
+ r.top() + titleRect.left() - rect.left(),
+ titleRect.height(), titleRect.width());
+
+ painter->translate(r.left(), r.top() + r.width());
+ painter->rotate(-90);
+ painter->translate(-r.left(), -r.top());
+
+ rect = r;
+ }
+
+ QLinearGradient gradient(rect.topLeft(),
+ rect.bottomLeft());
+ gradient.setColorAt(1.0, QColor(191, 212, 231));
+ gradient.setColorAt(0.3, Qt::white);
+ gradient.setColorAt(0.0, QColor(221, 232, 243));
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(gradient);
+ painter->drawRect(rect.adjusted(0, 0, -1, -1));
+
+ if (!docker->title.isEmpty()) {
+ QRect textRect = docker->fontMetrics.boundingRect(docker->title);
+ textRect.moveCenter(rect.center());
+
+ QFont font = painter->font();
+ font.setPointSize(font.pointSize() - 1);
+ painter->setFont(font);
+ painter->setPen(docker->palette.text().color());
+ painter->drawText(textRect, docker->title,
+ QTextOption(Qt::AlignHCenter |
+ Qt::AlignVCenter));
+ }
+ break;
+ }
+ case CE_RubberBand: {
+ painter->setPen(option->palette.color(QPalette::Active,
+ QPalette::WindowText));
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ break;
+ }
+ case CE_SizeGrip: {
+ break;
+ }
+ case CE_HeaderSection: {
+ const QStyleOptionHeader *header =
+ qstyleoption_cast<const QStyleOptionHeader *>(option);
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(option->palette.color(QPalette::Active,
+ QPalette::Background));
+ painter->drawRect(option->rect);
+
+ painter->setPen(header->palette.color(QPalette::Mid));
+ if (header->orientation == Qt::Horizontal) {
+ if (header->position == QStyleOptionHeader::Beginning ||
+ header->position == QStyleOptionHeader::OnlyOneSection) {
+ painter->drawRect(header->rect.adjusted(0, 0, -1, -1));
+ painter->setPen(header->palette.color(QPalette::Base));
+ painter->drawLine(header->rect.bottomLeft() + QPoint(1, -1),
+ header->rect.topLeft() + QPoint(1, 1));
+ painter->drawLine(header->rect.topLeft() + QPoint(1, 1),
+ header->rect.topRight() + QPoint(-1, 1));
+ } else {
+ painter->drawLine(header->rect.bottomRight(),
+ header->rect.topRight());
+ painter->drawLine(header->rect.topLeft(),
+ header->rect.topRight());
+ painter->drawLine(header->rect.bottomLeft(),
+ header->rect.bottomRight());
+ painter->setPen(option->palette.color(QPalette::Base));
+ painter->drawLine(header->rect.bottomLeft() + QPoint(0, -1),
+ header->rect.topLeft() + QPoint(0, 1));
+ painter->drawLine(header->rect.topLeft() + QPoint(1, 1),
+ header->rect.topRight() + QPoint(-1, 1));
+ }
+ } else { // Vertical
+ if (header->position == QStyleOptionHeader::Beginning ||
+ header->position == QStyleOptionHeader::OnlyOneSection) {
+ painter->drawRect(header->rect.adjusted(0, 0, -1, -1));
+ painter->setPen(header->palette.color(QPalette::Base));
+ painter->drawLine(header->rect.bottomLeft() + QPoint(1, -1),
+ header->rect.topLeft() + QPoint(1, 1));
+ painter->drawLine(header->rect.topLeft() + QPoint(1, 1),
+ header->rect.topRight() + QPoint(-1, 1));
+ } else {
+ painter->drawLine(header->rect.bottomLeft(),
+ header->rect.bottomRight());
+ painter->drawLine(header->rect.topLeft(),
+ header->rect.bottomLeft());
+ painter->drawLine(header->rect.topRight(),
+ header->rect.bottomRight());
+ painter->setPen(header->palette.color(QPalette::Base));
+ painter->drawLine(header->rect.topLeft(),
+ header->rect.topRight() + QPoint(-1, 0));
+ painter->drawLine(header->rect.bottomLeft() + QPoint(1, -1),
+ header->rect.topLeft() + QPoint(1, 0));
+ }
+ }
+ break;
+ }
+ case CE_ToolBar: {
+ QRect rect = option->rect;
+
+ QLinearGradient gradient(rect.topLeft(), rect.bottomLeft());
+ gradient.setColorAt(1.0, QColor(221, 221, 221));
+ gradient.setColorAt(0.0, QColor(241, 241, 241));
+
+ if (option->state & State_Horizontal) {
+ painter->setPen(QColor(204, 204, 204));
+ painter->setBrush(gradient);
+ } else {
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(option->palette.color(QPalette::Background));
+ }
+ painter->drawRect(rect.adjusted(0, 0, -1, -1));
+ break;
+ }
+ case CE_ProgressBar: {
+ const QStyleOptionProgressBar *bar1 =
+ qstyleoption_cast<const QStyleOptionProgressBar *>(option);
+
+ QStyleOptionProgressBarV2 *bar = new QStyleOptionProgressBarV2(*bar1);
+
+ QRect rect = bar->rect;
+ if (bar->orientation == Qt::Vertical) {
+ rect = QRect(rect.left(), rect.top(), rect.height(), rect.width());
+ QMatrix m;
+ m.translate(rect.height()-1, 0);
+ m.rotate(90.0);
+ painter->setMatrix(m);
+ }
+
+ painter->setPen(bar->palette.color(QPalette::Mid));
+ painter->drawRect(rect.adjusted(0, 0, -1, -1));
+
+ QRect grooveRect = subElementRect(SE_ProgressBarGroove, bar,
+ widget);
+ if (bar->orientation == Qt::Vertical) {
+ grooveRect = QRect(grooveRect.left(), grooveRect.top(),
+ grooveRect.height(), grooveRect.width());
+ }
+
+ QStyleOptionProgressBar grooveBar = *bar;
+ grooveBar.rect = grooveRect;
+
+ drawControl(CE_ProgressBarGroove, &grooveBar, painter, widget);
+
+ QRect progressRect = subElementRect(SE_ProgressBarContents, bar,
+ widget);
+ if (bar->orientation == Qt::Vertical) {
+ progressRect = QRect(progressRect.left(), progressRect.top(),
+ progressRect.height(), progressRect.width());
+ progressRect.adjust(0, 0, 0, -1);
+ }
+ QStyleOptionProgressBar progressOpt = *bar;
+ progressOpt.rect = progressRect;
+ drawControl(CE_ProgressBarContents, &progressOpt, painter, widget);
+
+ QRect labelRect = subElementRect(SE_ProgressBarLabel, bar, widget);
+ if (bar->orientation == Qt::Vertical) {
+ labelRect = QRect(labelRect.left(), labelRect.top(),
+ labelRect.height(), labelRect.width());
+ }
+ QStyleOptionProgressBar subBar = *bar;
+ subBar.rect = labelRect;
+ if (bar->textVisible)
+ drawControl(CE_ProgressBarLabel, &subBar, painter, widget);
+
+ delete bar;
+ break;
+ }
+ case CE_ProgressBarGroove: {
+ painter->setBrush(option->palette.color(QPalette::Background));
+ painter->setPen(Qt::NoPen);
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+
+ painter->setPen(option->palette.color(QPalette::Button));
+ painter->drawLine(option->rect.topLeft() + QPoint(0, 0),
+ option->rect.topRight() + QPoint(0, 0));
+ break;
+ }
+ case CE_ProgressBarContents: {
+ const QStyleOptionProgressBar *bar =
+ qstyleoption_cast<const QStyleOptionProgressBar *>(option);
+ int progress = int((double(bar->progress) /
+ double(bar->maximum - bar->minimum)) *
+ bar->rect.width());
+
+ painter->setBrush(bar->palette.color(QPalette::Light));
+ painter->setPen(Qt::NoPen);
+ QRect progressRect = QRect(bar->rect.topLeft(), QPoint(progress,
+ bar->rect.bottom()));
+ painter->drawRect(progressRect);
+
+ painter->setPen(bar->palette.color(QPalette::Midlight));
+ painter->setBrush(Qt::NoBrush);
+
+ painter->drawLine(bar->rect.bottomLeft(), bar->rect.topLeft());
+ painter->drawLine(bar->rect.topLeft(), QPoint(progress,
+ bar->rect.top()));
+ break;
+ }
+ case CE_ProgressBarLabel: {
+ painter->save();
+ const QStyleOptionProgressBar *bar =
+ qstyleoption_cast<const QStyleOptionProgressBar *>(option);
+
+ QRect rect = bar->rect;
+ QRect leftRect;
+
+ int progressIndicatorPos = int((double(bar->progress) /
+ double(bar->maximum - bar->minimum)) *
+ bar->rect.width());
+
+ QFont font;
+ font.setBold(true);
+ painter->setFont(font);
+ painter->setPen(bar->palette.color(QPalette::Midlight));
+
+ if (progressIndicatorPos >= 0 &&
+ progressIndicatorPos <= rect.width()) {
+ leftRect = QRect(bar->rect.topLeft(),
+ QPoint(progressIndicatorPos,
+ bar->rect.bottom()));
+ } else if (progressIndicatorPos > rect.width()) {
+ painter->setPen(bar->palette.color(QPalette::Base));
+ } else {
+ painter->setPen(bar->palette.color(QPalette::Midlight));
+ }
+
+ QRect textRect = QFontMetrics(font).boundingRect(bar->text);
+ textRect.moveCenter(option->rect.center());
+ painter->drawText(textRect, bar->text,
+ QTextOption(Qt::AlignCenter));
+ if (!leftRect.isNull()) {
+ painter->setPen(bar->palette.color(QPalette::Base));
+ painter->setClipRect(leftRect, Qt::IntersectClip);
+ painter->drawText(textRect, bar->text,
+ QTextOption(Qt::AlignCenter));
+ }
+
+ painter->restore();
+ break;
+ }
+ case CE_MenuBarEmptyArea: {
+ QRect emptyArea = option->rect.adjusted(0, 0, -1, -1);
+ QLinearGradient gradient(emptyArea.topLeft(), emptyArea.bottomLeft()
+ - QPoint(0, 1));
+ gradient.setColorAt(0.0, option->palette.color(QPalette::Base));
+ gradient.setColorAt(1.0, QColor(223, 223, 223));
+
+ painter->setPen(QColor(238, 238, 238));
+ painter->setBrush(gradient);
+ painter->drawRect(emptyArea.adjusted(0, 0, 0, -1));
+ break;
+ }
+ case CE_MenuBarItem: {
+ if (!(option->state & State_Sunken)) {
+ QLinearGradient gradient(option->rect.topLeft(),
+ option->rect.bottomLeft());
+ gradient.setColorAt(0.0, Qt::white);
+ gradient.setColorAt(1.0, QColor(223, 223, 223));
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(gradient);
+ } else {
+ painter->setBrush(option->palette.color(QPalette::Light));
+ }
+
+ painter->drawRect(option->rect);
+ if (option->state & State_Sunken) {
+ painter->setPen(option->palette.color(QPalette::Mid));
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ painter->setPen(option->palette.color(QPalette::Base));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawLine(option->rect.bottomRight() + QPoint(0, -1),
+ option->rect.topRight() + QPoint(0, -1));
+ }
+ QCommonStyle::drawControl(control, option, painter, widget);
+ break;
+ }
+ case CE_MenuItem: {
+ const QStyleOptionMenuItem *menuItem =
+ qstyleoption_cast<const QStyleOptionMenuItem *>(option);
+
+ bool selected = menuItem->state & State_Selected;
+ bool checkable = menuItem->checkType !=
+ QStyleOptionMenuItem::NotCheckable;
+ bool checked = menuItem->checked;
+
+ if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
+ QPoint center = menuItem->rect.center();
+
+ painter->setPen(menuItem->palette.color(QPalette::Midlight));
+ painter->drawLine(QPoint(menuItem->rect.left() - 2, center.y()),
+ QPoint(menuItem->rect.right(), center.y()));
+ painter->setPen(menuItem->palette.color(QPalette::Base));
+ painter->drawLine(QPoint(menuItem->rect.left() - 2,
+ center.y() + 1),
+ QPoint(menuItem->rect.right(),
+ center.y() + 1));
+
+ break;
+ }
+
+ if (selected) {
+ painter->setBrush(menuItem->palette.color(QPalette::Light));
+ painter->setPen(Qt::NoPen);
+ painter->drawRect(menuItem->rect);
+ painter->setPen(menuItem->palette.color(QPalette::Midlight));
+ painter->drawLine(menuItem->rect.topLeft(),
+ menuItem->rect.topRight());
+ painter->setPen(menuItem->palette.color(QPalette::Base));
+ painter->drawLine(menuItem->rect.bottomLeft(),
+ menuItem->rect.bottomRight());
+ }
+
+ if (checkable) {
+ QRect checkRect(option->rect.left() + 5,
+ option->rect.center().y() - 5, 10, 10);
+ if (menuItem->checkType & QStyleOptionMenuItem::Exclusive) {
+ QStyleOptionButton button;
+ button.rect = checkRect;
+ button.state = menuItem->state;
+ if (button.state & State_Sunken)
+ button.state ^= State_Sunken;
+ if (checked)
+ button.state |= State_On;
+ button.palette = menuItem->palette;
+ drawPrimitive(PE_IndicatorRadioButton, &button, painter,
+ widget);
+ } else {
+ QBrush buttonBrush = gradientBrush(option->rect);
+ painter->setBrush(buttonBrush);
+ painter->setPen(option->palette.color(QPalette::Mid));
+
+ painter->drawRect(checkRect);
+
+ if (checked) {
+ QImage image(":/images/checkboxchecked.png");
+ painter->drawImage(QPoint(option->rect.left() + 5,
+ option->rect.center().y() - 8), image);
+ }
+ }
+ }
+
+ bool dis = !(menuItem->state & State_Enabled);
+ bool act = menuItem->state & State_Selected;
+ const QStyleOption *opt = option;
+ const QStyleOptionMenuItem *menuitem = menuItem;
+ int checkcol = qMax(menuitem->maxIconWidth, 20);
+ if (menuItem->icon.isNull())
+ checkcol = 0;
+
+ QPainter *p = painter;
+ QRect vCheckRect = visualRect(opt->direction, menuitem->rect,
+ QRect(menuitem->rect.x(),
+ menuitem->rect.y(),
+ checkcol, menuitem->rect.height()));
+ if (!menuItem->icon.isNull()) {
+ QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal;
+ if (act && !dis)
+ mode = QIcon::Active;
+ QPixmap pixmap;
+ if (checked)
+ pixmap = menuItem->icon.pixmap(
+ pixelMetric(PM_SmallIconSize), mode, QIcon::On);
+ else
+ pixmap = menuItem->icon.pixmap(
+ pixelMetric(PM_SmallIconSize), mode);
+ int pixw = pixmap.width();
+ int pixh = pixmap.height();
+
+ int adjustedIcon = checkable ? 15 : 0;
+ QRect pmr(0, 0, pixw, pixh);
+ pmr.moveCenter(vCheckRect.center());
+ painter->setPen(menuItem->palette.text().color());
+ if (checkable && checked)
+ painter->drawPixmap(QPoint(pmr.left() +
+ adjustedIcon, pmr.top() + 1), pixmap);
+ else
+ painter->drawPixmap(pmr.topLeft() +
+ QPoint(adjustedIcon, 0), pixmap);
+ }
+
+ if (selected) {
+ painter->setPen(menuItem->palette.highlightedText().color());
+ } else {
+ painter->setPen(menuItem->palette.text().color());
+ }
+ int x, y, w, h;
+ menuitem->rect.getRect(&x, &y, &w, &h);
+ int tab = menuitem->tabWidth;
+ QColor discol;
+ if (dis) {
+ discol = menuitem->palette.text().color();
+ p->setPen(discol);
+ }
+ int xm = windowsItemFrame + checkcol + windowsItemHMargin;
+ int xpos = menuitem->rect.x() + xm;
+ QRect textRect;
+ if (!menuItem->icon.isNull())
+ textRect.setRect(xpos, y + windowsItemVMargin, w - xm -
+ windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin);
+ else
+ textRect.setRect(menuItem->rect.left() + 9,
+ y + windowsItemVMargin,
+ w - xm - windowsRightBorder - tab,
+ h - 2 * windowsItemVMargin);
+
+ if (checkable)
+ textRect.adjust(10, 0, 10, 0);
+
+ QRect vTextRect = visualRect(opt->direction, menuitem->rect,
+ textRect);
+ QString s = menuitem->text;
+ if (!s.isEmpty()) {
+ int t = s.indexOf(QLatin1Char('\t'));
+ int text_flags = Qt::AlignVCenter | Qt::TextShowMnemonic |
+ Qt::TextDontClip | Qt::TextSingleLine;
+ if (!styleHint(SH_UnderlineShortcut, menuitem, widget))
+ text_flags |= Qt::TextHideMnemonic;
+ text_flags |= Qt::AlignLeft;
+ if (t >= 0) {
+ QRect vShortcutRect = visualRect(opt->direction,
+ menuitem->rect,
+ QRect(textRect.topRight(),
+ QPoint(menuitem->rect.right(), textRect.bottom())));
+ if (dis && !act) {
+ p->setPen(menuitem->palette.light().color());
+ p->drawText(vShortcutRect.adjusted(1, 1, 1, 1),
+ text_flags,
+ s.mid(t + 1));
+ p->setPen(discol);
+ }
+ p->drawText(vShortcutRect, text_flags, s.mid(t + 1));
+ s = s.left(t);
+ }
+ QFont font = menuitem->font;
+ if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem)
+ font.setBold(true);
+ p->setFont(font);
+ if (dis && !act) {
+ p->setPen(menuitem->palette.light().color());
+ p->drawText(vTextRect.adjusted(1,1,1,1), text_flags,
+ s.left(t));
+ p->setPen(discol);
+ }
+ p->drawText(vTextRect, text_flags, s.left(t));
+ }
+
+ if (menuItem->menuItemType & QStyleOptionMenuItem::SubMenu) {
+ QPoint center = menuItem->rect.center();
+ QPoint drawStart(menuItem->rect.right() - 6, center.y() + 4);
+
+ QPainterPath arrow;
+ arrow.moveTo(drawStart);
+ arrow.lineTo(drawStart + QPoint(0, -8));
+ arrow.lineTo(drawStart + QPoint(4, -5));
+ arrow.lineTo(drawStart + QPoint(4, -4));
+ arrow.lineTo(drawStart + QPoint(0, 0));
+
+ painter->save();
+ painter->setBrush(menuItem->palette.color(QPalette::Text));
+ painter->setPen(Qt::NoPen);
+ painter->drawPath(arrow);
+ painter->restore();
+ }
+
+ break;
+ }
+ case CE_MenuVMargin: {
+ break;
+ }
+ case CE_MenuHMargin: {
+ break;
+ }
+ case CE_Splitter: {
+ drawSplitter(option, painter, option->state & State_Horizontal);
+ break;
+ }
+ case CE_ScrollBarAddPage: {
+ case CE_ScrollBarSubPage:
+ const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ QRect myRect;
+ if (scrollBar->orientation == Qt::Horizontal) {
+ myRect = QRect(option->rect.topLeft(),
+ option->rect.bottomRight()).adjusted(0, 0, 1, -1);
+ } else {
+ myRect = option->rect;
+ }
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(option->palette.color(QPalette::Background));
+ painter->drawRect(myRect);
+
+ painter->setBrush(Qt::NoBrush);
+ painter->setPen(scrollBar->palette.color(QPalette::Mid));
+ painter->drawRect(myRect.adjusted(0, 0, -1, 0));
+ painter->setPen(scrollBar->palette.color(QPalette::Button));
+ painter->drawLine(myRect.bottomLeft() + QPoint(1, 0),
+ myRect.topLeft() + QPoint(1, 1));
+ painter->drawLine(myRect.topLeft() + QPoint(1, 1),
+ myRect.topRight() + QPoint(-1, 1));
+ break;
+ }
+ case CE_ScrollBarSubLine: {
+ const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ int scrollBarExtent = pixelMetric(PM_ScrollBarExtent);
+ QRect scrollBarSubLine = option->rect;
+
+ QRect button1;
+ QRect button2;
+
+ if (scrollBar->orientation == Qt::Horizontal) {
+ button1.setRect(scrollBarSubLine.left(), scrollBarSubLine.top(),
+ 16, scrollBarExtent);
+ button2.setRect(scrollBarSubLine.right() - 15,
+ scrollBarSubLine.top(), 16, scrollBarExtent);
+ } else {
+ button1.setRect(scrollBarSubLine.left(), scrollBarSubLine.top(),
+ scrollBarExtent, 16);
+ button2.setRect(scrollBarSubLine.left(),
+ scrollBarSubLine.bottom() - 15, scrollBarExtent, 16);
+ }
+
+ painter->fillRect(button2, Qt::blue);
+
+ drawScrollBarArrow(button1, painter, scrollBar);
+ drawScrollBarArrow(button2, painter, scrollBar);
+ break;
+ }
+ case CE_ScrollBarAddLine: {
+ const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ QRect button(option->rect.left(), option->rect.top(), 16, 16);
+ drawScrollBarArrow(button, painter, scrollBar, true);
+ break;
+ }
+ case CE_ScrollBarSlider: {
+ const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+
+ painter->setPen(scrollBar->palette.color(QPalette::Midlight));
+ painter->drawRect(scrollBar->rect.adjusted(-1, 0, -3, -1));
+
+ QPoint g1, g2;
+ if (scrollBar->orientation == Qt::Horizontal) {
+ g1 = option->rect.topLeft();
+ g2 = option->rect.bottomLeft();
+ } else {
+ g1 = option->rect.topLeft();
+ g2 = option->rect.topRight();
+ }
+
+ if (scrollBar->state & State_Enabled) {
+ QLinearGradient gradient(g1, g2);
+ gradient.setColorAt(1.0, QColor(188, 210, 230));
+ gradient.setColorAt(0.3, Qt::white);
+ gradient.setColorAt(0.0, QColor(223, 233, 243));
+ painter->setBrush(gradient);
+ } else {
+ painter->setPen(scrollBar->palette.buttonText().color());
+ painter->setBrush(scrollBar->palette.button());
+ }
+ painter->drawRect(scrollBar->rect.adjusted(0, 0, -1, -1));
+
+ int sliderLength = option->rect.height();
+ int drawPos = scrollBar->orientation == Qt::Vertical ?
+ (sliderLength / 2) + 1 : 1 - ((option->rect.width() / 2));
+
+ QPoint origin;
+ if (scrollBar->orientation == Qt::Vertical)
+ origin = option->rect.bottomLeft();
+ else
+ origin = option->rect.topLeft();
+
+ painter->setPen(scrollBar->palette.color(QPalette::Base));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(4, -drawPos)),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(13, -drawPos)));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(4, 2 - drawPos)),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(13, 2 - drawPos)));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(4, 4 - drawPos)),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(13, 4 - drawPos)));
+
+ painter->setPen(option->palette.color(QPalette::Midlight));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(3, -(drawPos + 1))),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(12, -(drawPos + 1))));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(3, 1 - drawPos)),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(12, 1 - drawPos)));
+ painter->drawLine(origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(3, 3 - drawPos)),
+ origin + adjustScrollHandlePoint(
+ scrollBar->orientation,
+ QPoint(12, 3 - drawPos)));
+
+ break;
+ }
+ case CE_TabBarTabLabel: {
+ QStyleOptionTab copy =
+ *qstyleoption_cast<const QStyleOptionTab *>(option);
+ if (copy.state & State_HasFocus)
+ copy.state ^= State_HasFocus;
+ painter->setBrush(Qt::NoBrush);
+ QWindowsStyle::drawControl(CE_TabBarTabLabel, &copy, painter,
+ widget);
+ break;
+ }
+ case CE_TabBarTabShape: {
+ const QStyleOptionTab *tab =
+ qstyleoption_cast<const QStyleOptionTab *>(option);
+ QRect myRect = option->rect;
+ QPoint bottomLeft, bottomRight, topLeft, topRight;
+
+ if ((tab->position == QStyleOptionTab::Beginning) ||
+ (tab->position == QStyleOptionTab::OnlyOneTab)) {
+ if (tab->shape == QTabBar::RoundedSouth ||
+ tab->shape == QTabBar::RoundedNorth) {
+ myRect = myRect.adjusted(2, 0, 0, 0);
+ } else {
+ myRect = myRect.adjusted(0, 2, 0, 0);
+ }
+ }
+
+ switch (tab->shape) {
+ case QTabBar::RoundedNorth:
+ topLeft = myRect.topLeft();
+ topRight = myRect.topRight();
+ bottomLeft = myRect.bottomLeft();
+ bottomRight = myRect.bottomRight();
+ break;
+ case QTabBar::RoundedSouth:
+ topLeft = myRect.bottomLeft();
+ topRight = myRect.bottomRight();
+ bottomLeft = myRect.topLeft();
+ bottomRight = myRect.topRight();
+ break;
+ case QTabBar::RoundedWest:
+ topLeft = myRect.topLeft();
+ topRight = myRect.bottomLeft();
+ bottomLeft = myRect.topRight();
+ bottomRight = myRect.bottomRight();
+ break;
+ case QTabBar::RoundedEast:
+ topLeft = myRect.topRight();
+ topRight = myRect.bottomRight();
+ bottomLeft = myRect.topLeft();
+ bottomRight = myRect.bottomLeft();
+ break;
+ default:
+ ;
+ }
+
+ QPainterPath outerPath;
+ outerPath.moveTo(bottomLeft + adjustTabPoint(QPoint(0, -2),
+ tab->shape));
+ outerPath.lineTo(bottomLeft + adjustTabPoint(QPoint(0, -14),
+ tab->shape));
+ outerPath.lineTo(topLeft + adjustTabPoint(QPoint(6 , 0),
+ tab->shape));
+ outerPath.lineTo(topRight + adjustTabPoint(QPoint(0, 0),
+ tab->shape));
+ outerPath.lineTo(bottomRight + adjustTabPoint(QPoint(0, -2),
+ tab->shape));
+
+ if (tab->state & State_Selected ||
+ tab->position == QStyleOptionTab::OnlyOneTab) {
+ QPainterPath innerPath;
+ innerPath.moveTo(topLeft + adjustTabPoint(QPoint(6, 2),
+ tab->shape));
+ innerPath.lineTo(topRight + adjustTabPoint(QPoint(-1, 2),
+ tab->shape));
+ innerPath.lineTo(bottomRight + adjustTabPoint(QPoint(-1 , -2),
+ tab->shape));
+ innerPath.lineTo(bottomLeft + adjustTabPoint(QPoint(2 , -2),
+ tab->shape));
+ innerPath.lineTo(bottomLeft + adjustTabPoint(QPoint(2 , -14),
+ tab->shape));
+ innerPath.lineTo(topLeft + adjustTabPoint(QPoint(6, 2),
+ tab->shape));
+
+ QPainterPath whitePath;
+ whitePath.moveTo(bottomLeft + adjustTabPoint(QPoint(1, -2),
+ tab->shape));
+ whitePath.lineTo(bottomLeft + adjustTabPoint(QPoint(1, -14),
+ tab->shape));
+ whitePath.lineTo(topLeft + adjustTabPoint(QPoint(6, 1),
+ tab->shape));
+ whitePath.lineTo(topRight + adjustTabPoint(QPoint(-1, 1),
+ tab->shape));
+
+ painter->setPen(tab->palette.color(QPalette::Midlight));
+ painter->setBrush(QColor(200, 221, 242));
+ painter->drawPath(outerPath);
+ painter->setPen(QColor(200, 221, 242));
+ painter->drawRect(QRect(bottomLeft + adjustTabPoint(
+ QPoint(2, -3), tab->shape),
+ bottomRight + adjustTabPoint(
+ QPoint(-2, 0), tab->shape)));
+ painter->setPen(tab->palette.color(QPalette::Base));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawPath(whitePath);
+
+ if (option->state & State_HasFocus) {
+ painter->setPen(option->palette.color(QPalette::Mid));
+ painter->drawPath(innerPath);
+ }
+ } else {
+ painter->setPen(tab->palette.color(QPalette::Mid));
+ painter->drawPath(outerPath);
+ }
+ break;
+ }
+ case CE_PushButtonLabel:
+ painter->save();
+
+ if (const QStyleOptionButton *button =
+ qstyleoption_cast<const QStyleOptionButton *>(option)) {
+ QRect ir = button->rect;
+ uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic;
+ if (!styleHint(SH_UnderlineShortcut, button, widget))
+ tf |= Qt::TextHideMnemonic;
+
+ if (!button->icon.isNull()) {
+ QPoint point;
+
+ QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal
+ : QIcon::Disabled;
+ if (mode == QIcon::Normal && button->state & State_HasFocus)
+ mode = QIcon::Active;
+ QIcon::State state = QIcon::Off;
+ if (button->state & State_On)
+ state = QIcon::On;
+
+ QPixmap pixmap = button->icon.pixmap(button->iconSize, mode,
+ state);
+ int w = pixmap.width();
+ int h = pixmap.height();
+
+ if (!button->text.isEmpty())
+ w += button->fontMetrics.width(button->text) + 2;
+
+ point = QPoint(ir.x() + ir.width() / 2 - w / 2,
+ ir.y() + ir.height() / 2 - h / 2);
+
+ if (button->direction == Qt::RightToLeft)
+ point.rx() += pixmap.width();
+
+ painter->drawPixmap(visualPos(button->direction, button->rect,
+ point), pixmap);
+
+ if (button->direction == Qt::RightToLeft)
+ ir.translate(-point.x() - 2, 0);
+ else
+ ir.translate(point.x() + pixmap.width(), 0);
+
+ if (!button->text.isEmpty())
+ tf |= Qt::AlignLeft;
+
+ } else {
+ tf |= Qt::AlignHCenter;
+ }
+
+ if (button->fontMetrics.height() > 14)
+ ir.translate(0, 1);
+
+ drawItemText(painter, ir, tf, button->palette, (button->state &
+ State_Enabled),
+ button->text, QPalette::ButtonText);
+ }
+
+ painter->restore();
+ break;
+
+ default:
+ QWindowsStyle::drawControl(control, option, painter, widget);
+ }
+ painter->restore();
+}
+
+inline QPoint JavaStyle::adjustTabPoint(const QPoint &point,
+ QTabBar::Shape shape) const
+{
+ QPoint rPoint;
+
+ switch (shape) {
+ case QTabBar::RoundedWest:
+ rPoint = QPoint(point.y(), point.x());
+ break;
+ case QTabBar::RoundedSouth:
+ rPoint = QPoint(point.x(), point.y() * -1);
+ break;
+ case QTabBar::RoundedEast:
+ rPoint = QPoint(point.y() * -1, point.x());
+ break;
+ default:
+ rPoint = point;
+ }
+ return rPoint;
+}
+
+QRect JavaStyle::subControlRect(ComplexControl control,
+ const QStyleOptionComplex *option,
+ SubControl subControl,
+ const QWidget *widget) const
+{
+ QRect rect = QWindowsStyle::subControlRect(control, option, subControl,
+ widget);
+
+ switch (control) {
+ case CC_TitleBar: {
+ const QStyleOptionTitleBar *bar =
+ qstyleoption_cast<const QStyleOptionTitleBar *>(option);
+
+ switch (subControl) {
+ case SC_TitleBarMinButton: {
+ rect = QRect(bar->rect.topRight() + QPoint(-68, 2),
+ QSize(15, 15));
+ break;
+ }
+ case SC_TitleBarMaxButton: {
+ rect = QRect(bar->rect.topRight() + QPoint(-43, 3),
+ QSize(15, 15));
+ break;
+ }
+ case SC_TitleBarCloseButton: {
+ rect = QRect(bar->rect.topRight() + QPoint(-18, 3),
+ QSize(15, 15));
+ break;
+ }
+ case SC_TitleBarLabel: {
+ QRect labelRect = bar->fontMetrics.boundingRect(bar->text);
+ rect = labelRect;
+ rect.translate(bar->rect.left() + 30, 0);
+ rect.moveTop(bar->rect.top());
+ rect.adjust(0, 2, 2, 2);
+ break;
+ }
+ case SC_TitleBarSysMenu: {
+ rect = QRect(bar->rect.topLeft() + QPoint(6, 3),
+ QSize(16, 16));
+ break;
+ }
+ default:
+ ;
+ }
+ break;
+ }
+ case CC_GroupBox: {
+ const QStyleOptionGroupBox *box =
+ qstyleoption_cast<const QStyleOptionGroupBox *>(option);
+ bool hasCheckbox = box->subControls & SC_GroupBoxCheckBox;
+ int checkAdjust = 13;
+
+ QRect textRect = box->fontMetrics.boundingRect(box->text);
+
+ switch (subControl) {
+ case SC_GroupBoxFrame: {
+ rect = box->rect;
+ break;
+ }
+ case SC_GroupBoxCheckBox: {
+ if (hasCheckbox) {
+ rect = QRect(box->rect.topLeft() + QPoint(7, 4 +
+ (textRect.height() / 2 - checkAdjust / 2)),
+ QSize(checkAdjust, checkAdjust));
+ }
+ else {
+ rect = QRect();
+ }
+ break;
+ }
+ case SC_GroupBoxLabel: {
+ rect = QRect(box->rect.topLeft() + QPoint(7 + (hasCheckbox ?
+ checkAdjust + 2 : 0), 4), textRect.size());
+ break;
+ }
+ case SC_GroupBoxContents: {
+ rect = box->rect.adjusted(10, 10 + textRect.height(), -10,
+ -10);
+ break;
+ }
+ default:
+ ;
+ }
+ break;
+ }
+ case CC_SpinBox: {
+ const QStyleOptionSpinBox *spinBox =
+ qstyleoption_cast<const QStyleOptionSpinBox *>(option);
+ int spinnerWidth = 16;
+ QRect myRect = spinBox->rect;
+ QPoint center = myRect.center();
+ int frameWidth = pixelMetric(PM_SpinBoxFrameWidth, spinBox, widget);
+
+ switch (subControl) {
+ case SC_SpinBoxUp: {
+ rect = QRect(myRect.topRight() + QPoint(-16, 0),
+ QSize(16, center.y() - myRect.topRight().y()));
+ break;
+ }
+ case SC_SpinBoxDown: {
+ rect = QRect(QPoint(myRect.bottomRight().x() - 16,
+ center.y() + 1),
+ QSize(16, myRect.bottomRight().y() -
+ center.y() - 1));
+ break;
+ }
+ case SC_SpinBoxFrame: {
+ rect = QRect(myRect.topLeft(), myRect.bottomRight() +
+ QPoint(-16, 0));
+ break;
+ }
+ case SC_SpinBoxEditField: {
+ rect = QRect(myRect.topLeft() + QPoint(2, 2),
+ myRect.bottomRight() + QPoint(-15 - frameWidth, -2));
+ break;
+ }
+ default:
+ ;
+ }
+ break;
+ }
+ case CC_ToolButton: {
+ const QStyleOptionToolButton *button =
+ qstyleoption_cast<const QStyleOptionToolButton *>(option);
+
+ switch (subControl) {
+ case SC_ToolButton: {
+ rect = option->rect.adjusted(1, 1, -1, -1);
+ break;
+ }
+ case SC_ToolButtonMenu: {
+ rect = QRect(option->rect.bottomRight() +
+ QPoint(-11, -11), QSize(10, 10));
+ break;
+ }
+ }
+ break;
+ }
+ case CC_ComboBox: {
+ const QStyleOptionComboBox *combo =
+ qstyleoption_cast<const QStyleOptionComboBox *>(option);
+
+ bool reverse = combo->direction == Qt::RightToLeft;
+
+ switch (subControl) {
+ case SC_ComboBoxFrame:
+ rect = combo->rect;
+ break;
+ case SC_ComboBoxArrow:
+ if (reverse) {
+ rect = QRect(combo->rect.topLeft(),
+ combo->rect.bottomLeft() + QPoint(17, 0));
+ } else {
+ rect = QRect(combo->rect.topRight() + QPoint(-17, 0),
+ combo->rect.bottomRight());
+ }
+ break;
+ case SC_ComboBoxEditField:
+ if (reverse) {
+ rect = QRect(combo->rect.topLeft() + QPoint(19, 2),
+ combo->rect.bottomRight() + QPoint(-2, 2));
+ } else {
+ rect = QRect(combo->rect.topLeft() + QPoint(2, 2),
+ combo->rect.bottomRight() + QPoint(-19, -2));
+ }
+ break;
+ case SC_ComboBoxListBoxPopup:
+ rect = combo->rect;
+ break;
+ }
+ break;
+ }
+ case CC_ScrollBar: {
+ const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ int scrollBarExtent = pixelMetric(PM_ScrollBarExtent, scrollBar,
+ widget);
+ int sliderMaxLength = ((scrollBar->orientation == Qt::Horizontal) ?
+ scrollBar->rect.width() :
+ scrollBar->rect.height()) - (16 * 3);
+ int sliderMinLength = pixelMetric(PM_ScrollBarSliderMin, scrollBar,
+ widget);
+ int sliderLength;
+
+ if (scrollBar->maximum != scrollBar->minimum) {
+ uint valueRange = scrollBar->maximum - scrollBar->minimum;
+ sliderLength = (scrollBar->pageStep * sliderMaxLength) /
+ (valueRange + scrollBar->pageStep);
+
+ if (sliderLength < sliderMinLength || valueRange > INT_MAX / 2)
+ sliderLength = sliderMinLength;
+ if (sliderLength > sliderMaxLength)
+ sliderLength = sliderMaxLength;
+ } else {
+ sliderLength = sliderMaxLength;
+ }
+ int sliderStart = 16 + sliderPositionFromValue(scrollBar->minimum,
+ scrollBar->maximum,
+ scrollBar->sliderPosition,
+ sliderMaxLength - sliderLength,
+ scrollBar->upsideDown);
+ QRect scrollBarRect = scrollBar->rect;
+
+ switch (subControl) {
+ case SC_ScrollBarSubLine:
+ if (scrollBar->orientation == Qt::Horizontal) {
+ rect.setRect(scrollBarRect.left(), scrollBarRect.top(),
+ scrollBarRect.width() - 16, scrollBarExtent);
+ } else {
+ rect.setRect(scrollBarRect.left(), scrollBarRect.top(),
+ scrollBarExtent, scrollBarRect.height() - 16);
+ }
+ break;
+ case SC_ScrollBarAddLine:
+ if (scrollBar->orientation == Qt::Horizontal) {
+ rect.setRect(scrollBarRect.right() - 15,
+ scrollBarRect.top(), 16, scrollBarExtent);
+ } else {
+ rect.setRect(scrollBarRect.left(), scrollBarRect.bottom()
+ - 15, scrollBarExtent, 16);
+ }
+ break;
+ case SC_ScrollBarSubPage:
+ if (scrollBar->orientation == Qt::Horizontal) {
+ rect.setRect(scrollBarRect.left() + 16, scrollBarRect.top(),
+ sliderStart - (scrollBarRect.left() + 16),
+ scrollBarExtent);
+ } else {
+ rect.setRect(scrollBarRect.left(), scrollBarRect.top() + 16,
+ scrollBarExtent,
+ sliderStart - (scrollBarRect.left() + 16));
+ }
+ break;
+ case SC_ScrollBarAddPage:
+ if (scrollBar->orientation == Qt::Horizontal)
+ rect.setRect(sliderStart + sliderLength, 0,
+ sliderMaxLength - sliderStart -
+ sliderLength + 16, scrollBarExtent);
+ else
+ rect.setRect(0, sliderStart + sliderLength,
+ scrollBarExtent, sliderMaxLength -
+ sliderStart - sliderLength + 16);
+ break;
+ case SC_ScrollBarGroove:
+ if (scrollBar->orientation == Qt::Horizontal) {
+ rect = scrollBarRect.adjusted(16, 0, -32, 0);
+ } else {
+ rect = scrollBarRect.adjusted(0, 16, 0, -32);
+ }
+ break;
+ case SC_ScrollBarSlider:
+ if (scrollBar->orientation == Qt::Horizontal) {
+ rect.setRect(sliderStart, 0, sliderLength,
+ scrollBarExtent);
+ } else {
+ rect.setRect(0, sliderStart, scrollBarExtent,
+ sliderLength);
+ }
+ break;
+ default:
+ return QWindowsStyle::subControlRect(control, option,
+ subControl, widget);
+ }
+ break;
+ }
+ case CC_Slider: {
+ const QStyleOptionSlider *slider =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ rect = slider->rect;
+ int tickSize = pixelMetric(PM_SliderTickmarkOffset, option, widget);
+ int handleSize = pixelMetric(PM_SliderControlThickness, option,
+ widget);
+
+ int dist = slider->orientation == Qt::Vertical ? slider->rect.height() :
+ slider->rect.width();
+ int pos = QStyle::sliderPositionFromValue(slider->minimum,
+ slider->maximum, slider->sliderValue, dist - handleSize);
+
+ switch (subControl) {
+ case SC_SliderGroove: {
+ QPoint center = rect.center();
+
+ if (slider->orientation == Qt::Horizontal) {
+ rect.setHeight(handleSize);
+ if (slider->tickPosition == QSlider::TicksBelow) {
+ center.ry() -= tickSize;
+ }
+ } else {
+ rect.adjust(0, 0, 0, 0);
+ rect.setWidth(handleSize);
+ if (slider->tickPosition == QSlider::TicksBelow) {
+ center.rx() -= tickSize;
+ }
+ }
+ rect.moveCenter(center);
+ break;
+ }
+ case SC_SliderHandle: {
+ QPoint center = rect.center();
+
+ if (slider->orientation == Qt::Horizontal) {
+ rect.setHeight(handleSize);
+ if (slider->tickPosition == QSlider::TicksBelow) {
+ center.ry() -= tickSize;
+ }
+
+ rect.moveCenter(center);
+
+ if (slider->upsideDown)
+ rect.setLeft(slider->rect.right() -
+ pos - (handleSize - 1));
+ else
+ rect.setLeft(pos);
+
+ rect.setWidth(handleSize - 1);
+ } else {
+ rect.setWidth(handleSize);
+ if (slider->tickPosition == QSlider::TicksBelow) {
+ center.rx() -= tickSize;
+ }
+
+ rect.moveCenter(center);
+
+ if (slider->upsideDown)
+ rect.setTop(slider->rect.bottom() -
+ ((pos + handleSize) - 2));
+ else
+ rect.setTop(slider->rect.top() + pos);
+
+ rect.setHeight(handleSize);
+ }
+ break;
+ }
+ case SC_SliderTickmarks: {
+ QPoint center = slider->rect.center();
+
+ if (slider->tickPosition & QSlider::TicksBelow) {
+ if (slider->orientation == Qt::Horizontal) {
+ rect.setHeight(tickSize);
+ center.ry() += tickSize / 2;
+ rect.adjust(6, 0, -10, 0);
+ } else {
+ rect.setWidth(tickSize);
+ center.rx() += tickSize / 2;
+ rect.adjust(0, 6, 0, -10);
+ }
+ } else {
+ rect = QRect();
+ }
+ rect.moveCenter(center);
+ break;
+ }
+ default:
+ ;
+ }
+ break;
+ }
+ default:
+ return QWindowsStyle::subControlRect(control, option, subControl,
+ widget);
+ }
+ return rect;
+}
+
+static const char * const sliderHandleImage[] = {
+ "15 16 7 1",
+ " c None",
+ "+ c #FFFFFF",
+ "@ c #FFFFFF",
+ "$ c #FFFFFF",
+ "( c #E5EDF5",
+ ") c #F2F6FA",
+ "[ c #FFFFFF",
+ " +++++++++++++ ",
+ "+@@@@@@@@@@@@@+",
+ "+@(((((((((((@+",
+ "+@(((((((((((@+",
+ "+@)))))))))))@+",
+ "+@[[[[[[[[[[[@+",
+ "+@[[[[[[[[[[[@+",
+ "+@)))))))))))@+",
+ "+@)))))))))))@+",
+ " +@)))))))))@+ ",
+ " +@(((((((@+ ",
+ " +@(((((@+ ",
+ " +@(((@+ ",
+ " +@(@+ ",
+ " +@+ ",
+ " + "};
+
+
+void JavaStyle::drawComplexControl(ComplexControl control,
+ const QStyleOptionComplex *option,
+ QPainter *painter,
+ const QWidget *widget) const
+{
+ painter->save();
+
+ switch (control) {
+ case CC_TitleBar: {
+ const QStyleOptionTitleBar *bar =
+ qstyleoption_cast<const QStyleOptionTitleBar *>(option);
+
+ bool sunken = bar->state & State_Sunken;
+
+ QLinearGradient gradient(bar->rect.bottomLeft(),
+ bar->rect.topLeft());
+ gradient.setColorAt(0.0, QColor(191, 212, 231));
+ gradient.setColorAt(0.7, Qt::white);
+ gradient.setColorAt(1.0, QColor(221, 232, 243));
+
+ painter->setPen(Qt::NoPen);
+ if (bar->titleBarState & State_Active) {
+ painter->setBrush(gradient);
+ }
+ else
+ painter->setBrush(bar->palette.color(QPalette::Active,
+ QPalette::Background));
+
+ painter->drawRect(bar->rect.adjusted(0, 0, -1, -1));
+
+ painter->setBrush(QColor(233, 233, 233));
+ painter->drawRect(QRect(bar->rect.bottomLeft() + QPoint(0, 1),
+ bar->rect.bottomRight() + QPoint(0, 2)));
+
+ QRect minButtonRect = subControlRect(control, bar,
+ SC_TitleBarMinButton);
+ QRect maxButtonRect = subControlRect(control, bar,
+ SC_TitleBarMaxButton);
+ QRect closeButtonRect = subControlRect(control, bar,
+ SC_TitleBarCloseButton);
+ QRect systemButtonRect = subControlRect(control, bar,
+ SC_TitleBarSysMenu);
+ QRect labelRect = subControlRect(control, bar, SC_TitleBarLabel);
+ QRect gripRect = QRect(QPoint(labelRect.right() + 5, bar->rect.top() + 5),
+ QPoint(minButtonRect.left() - 5,
+ bar->rect.bottom() - 4));
+
+ QColor textColor = option->palette.color(QPalette::Text);
+ painter->setPen(textColor);
+ painter->setBrush(Qt::NoBrush);
+
+ drawItemText(painter, labelRect, Qt::TextShowMnemonic |
+ Qt::AlignHCenter | Qt::AlignCenter,
+ bar->palette, bar->state & State_Enabled, bar->text,
+ textColor.isValid() ? QPalette::NoRole :
+ QPalette::WindowText);
+
+ for (int i = 0; i < gripRect.width(); ++i) {
+ painter->setPen(i % 2 ? bar->palette.color(QPalette::Midlight)
+ : Qt::white);
+
+ for (int j = 0; j < 4; ++j) {
+ painter->drawPoint(i + gripRect.left(),
+ gripRect.top() - 2 + i % 4 + 4 * j);
+ }
+ }
+
+ QPixmap maximizePixmap(":/images/internalmaximize.png");
+ QPixmap minimizePixmap(":/images/internalminimize.png");
+ QPixmap closePixmap(":/images/internalclose.png");
+ QPixmap internalPixmap(":/images/internalsystem.png");
+ QPixmap internalCloseDownPixmap(":/images/internalclosedown.png");
+ QPixmap minimizeDownPixmap(":/images/internalminimizedown.png");
+ QPixmap maximizeDownPixmap(":/images/internalmaximizedown.png");
+
+ if (bar->activeSubControls & SC_TitleBarCloseButton &&
+ bar->state & State_Sunken)
+ painter->drawPixmap(closeButtonRect.topLeft(),
+ internalCloseDownPixmap);
+ else
+ painter->drawPixmap(closeButtonRect.topLeft(), closePixmap);
+
+ if (bar->activeSubControls & SC_TitleBarMinButton &&
+ bar->state & State_Sunken)
+ painter->drawPixmap(minButtonRect.topLeft(),
+ minimizeDownPixmap);
+ else
+ painter->drawPixmap(minButtonRect.topLeft(), minimizePixmap);
+
+ if (bar->activeSubControls & SC_TitleBarMaxButton &&
+ bar->state & State_Sunken)
+ painter->drawPixmap(maxButtonRect.topLeft(),
+ maximizeDownPixmap);
+ else
+ painter->drawPixmap(maxButtonRect.topLeft(), maximizePixmap);
+
+ painter->drawPixmap(systemButtonRect.topLeft(), internalPixmap);
+
+ break;
+ }
+ case CC_GroupBox: {
+ const QStyleOptionGroupBox *box =
+ qstyleoption_cast<const QStyleOptionGroupBox *>(option);
+
+ QRect frameRect = subControlRect(control, box, SC_GroupBoxFrame);
+ QRect labelRect = subControlRect(control, box, SC_GroupBoxLabel);
+ QRect contentsRect = subControlRect(control, box,
+ SC_GroupBoxContents);
+ QRect checkerRect = subControlRect(control, box,
+ SC_GroupBoxCheckBox);
+
+ int y = labelRect.center().y();
+
+ painter->setPen(box->palette.color(QPalette::Button));
+ painter->drawRect(frameRect.adjusted(2, y - frameRect.top(), -2,
+ -2));
+
+ painter->setPen(box->palette.color(QPalette::Background));
+
+ if (box->subControls & SC_GroupBoxCheckBox) {
+ painter->drawLine(checkerRect.left() - 1, y,
+ checkerRect.right() + 2, y);
+ QStyleOptionButton checker;
+ checker.QStyleOption::operator=(*box);
+ checker.rect = checkerRect;
+ drawPrimitive(PE_IndicatorCheckBox, &checker, painter, widget);
+ }
+
+ if (box->subControls & SC_GroupBoxLabel && !box->text.isEmpty()) {
+ painter->drawLine(labelRect.left() - 1, y,
+ labelRect.right() +1, y);
+
+ QColor textColor = box->textColor;
+ if (textColor.isValid())
+ painter->setPen(textColor);
+
+ drawItemText(painter, labelRect, Qt::TextShowMnemonic |
+ Qt::AlignHCenter | int(box->textAlignment),
+ box->palette, box->state & State_Enabled,
+ box->text, textColor.isValid() ? QPalette::NoRole :
+ QPalette::WindowText);
+ }
+ break;
+ }
+ case CC_SpinBox: {
+ const QStyleOptionSpinBox *spinner =
+ qstyleoption_cast<const QStyleOptionSpinBox *>(option);
+
+ QRect frameRect = subControlRect(control, spinner, SC_SpinBoxFrame);
+ QRect upRect = subControlRect(control, spinner, SC_SpinBoxUp);
+ QRect downRect = subControlRect(control, spinner, SC_SpinBoxDown);
+
+ painter->setPen(Qt::white);
+ painter->drawRect(frameRect.adjusted(1, 1, -1, -1));
+ painter->drawPoint(frameRect.bottomLeft());
+
+ painter->setPen(spinner->palette.color(QPalette::Mid));
+ painter->drawRect(frameRect.adjusted(0, 0, -1, -2));
+
+ bool isEnabled = (spinner->state & State_Enabled);
+ bool hover = isEnabled && (spinner->state & State_MouseOver);
+ bool sunken = (spinner->state & State_Sunken);
+ bool upIsActive = (spinner->activeSubControls == SC_SpinBoxUp);
+ bool downIsActive = (spinner->activeSubControls == SC_SpinBoxDown);
+ bool stepUpEnabled = spinner->stepEnabled &
+ QAbstractSpinBox::StepUpEnabled;
+ bool stepDownEnabled = spinner->stepEnabled &
+ QAbstractSpinBox::StepDownEnabled;
+
+ painter->setBrush(spinner->palette.color(QPalette::Background));
+
+ painter->drawRect(upRect);
+ if (upIsActive && stepUpEnabled) {
+ if (sunken) {
+ drawSunkenButtonShadow(painter, upRect,
+ spinner->palette.color(QPalette::Mid));
+ } else if (hover) {
+ drawButtonHoverFrame(painter, upRect,
+ spinner->palette.color(QPalette::Mid),
+ spinner->palette.color(QPalette::Button));
+ }
+ }
+
+ QStyleOptionSpinBox upSpin = *spinner;
+ upSpin.rect = upRect;
+ drawPrimitive(PE_IndicatorSpinUp, &upSpin, painter, widget);
+
+ painter->drawRect(downRect);
+ if (downIsActive && stepDownEnabled) {
+ if (sunken) {
+ drawSunkenButtonShadow(painter, downRect,
+ spinner->palette.color(QPalette::Mid));
+ } else if (hover) {
+ drawButtonHoverFrame(painter, downRect,
+ spinner->palette.color(QPalette::Mid),
+ spinner->palette.color(QPalette::Button));
+ }
+ }
+
+ QStyleOptionSpinBox downSpin = *spinner;
+ downSpin.rect = downRect;
+ drawPrimitive(PE_IndicatorSpinDown, &downSpin, painter, widget);
+
+ break;
+ }
+ case CC_ToolButton: {
+ const QStyleOptionToolButton *button =
+ qstyleoption_cast<const QStyleOptionToolButton *>(option);
+
+ painter->setPen(Qt::white);
+ painter->drawRect(button->rect.adjusted(1, 1, -1, -1));
+
+ QStyleOptionToolButton panelOption = *button;
+ QRect panelRect;
+ if (!(button->state & State_MouseOver) &&
+ !(button->state & State_On)) {
+ painter->setPen(QColor(153, 153, 153));
+ painter->drawRect(button->rect.adjusted(0, 0, -2, -2));
+
+ panelRect = subControlRect(control, option, SC_ToolButton);
+ panelOption.rect = panelRect;
+ } else {
+ panelOption.rect.adjust(0, 0, -1, -1);
+ }
+
+ QRect menuRect = subControlRect(control, option, SC_ToolButtonMenu);
+
+ drawPrimitive(PE_PanelButtonTool, &panelOption, painter, widget);
+
+ QStyleOptionToolButton menuOption = *button;
+ menuOption.rect = menuRect;
+
+ QStyleOptionToolButton label = *button;
+ int fw = 5;
+
+ drawControl(CE_ToolButtonLabel, &label, painter, widget);
+ if (button->subControls & SC_ToolButtonMenu) {
+ painter->setPen(button->palette.color(QPalette::WindowText));
+ drawPrimitive(PE_IndicatorArrowDown, &menuOption, painter, widget);
+ }
+
+ if (button->state & State_HasFocus) {
+ QStyleOptionToolButton focusOption = *button;
+ focusOption.rect = label.rect.adjusted(-1, -1, 1, 1);
+
+ drawPrimitive(PE_FrameFocusRect, &focusOption, painter, widget);
+ }
+
+ break;
+ }
+ case CC_ComboBox: {
+ const QStyleOptionComboBox *combo =
+ qstyleoption_cast<const QStyleOptionComboBox *>(option);
+
+ QRect frameRect = subControlRect(control, option, SC_ComboBoxFrame,
+ widget);
+ painter->setPen(combo->palette.color(QPalette::Mid));
+
+ if (option->state & State_HasFocus)
+ painter->setBrush(option->palette.color(QPalette::Light));
+ else
+ painter->setBrush(combo->palette.color(QPalette::Background));
+
+ painter->drawRect(frameRect.adjusted(0, 0, -1, -1));
+
+ QRect arrowRect = subControlRect(control, option, SC_ComboBoxArrow,
+ widget);
+ painter->setPen(combo->palette.color(QPalette::Button));
+ painter->setBrush(Qt::NoBrush);
+
+ if (combo->direction == Qt::LeftToRight) {
+ painter->drawRect(QRect(frameRect.topLeft() + QPoint(1, 1),
+ arrowRect.bottomLeft() + QPoint(-2, -2)));
+ } else {
+ painter->drawRect(QRect(arrowRect.topLeft() + QPoint(1, 1),
+ frameRect.bottomRight() + QPoint(-2, -2)));
+ }
+
+ QStyleOptionButton button;
+ button.rect = arrowRect;
+ button.state = combo->state;
+ button.palette = combo->palette;
+
+ if (button.state & State_On)
+ button.state ^= State_On;
+
+ painter->save();
+ drawButtonBackground(&button, painter, false);
+ painter->restore();
+
+ QPoint center = arrowRect.center();
+ QPoint offset = QPoint(arrowRect.bottomLeft().x() + 1,
+ center.y() + 7);
+ QPainterPath arrow;
+ arrow.moveTo(offset + QPoint(4, -8));
+ arrow.lineTo(offset + QPoint(7, -5));
+ arrow.lineTo(offset + QPoint(8, -5));
+ arrow.lineTo(offset + QPoint(11, -8));
+ arrow.lineTo(offset + QPoint(4, -8));
+
+ painter->setBrush(combo->palette.color(QPalette::WindowText));
+ painter->setPen(combo->palette.color(QPalette::WindowText));
+
+ painter->drawPath(arrow);
+
+ QRect fieldRect = subControlRect(control, option,
+ SC_ComboBoxEditField, widget);
+
+ break;
+ }
+ case CC_Slider: {
+ const QStyleOptionSlider *slider =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+
+ bool horizontal = slider->orientation == Qt::Horizontal;
+
+ QRect groove = subControlRect(control, option, SC_SliderGroove,
+ widget);
+ QRect ticks = subControlRect(control, option, SC_SliderTickmarks,
+ widget);
+ QRect handle = subControlRect(control, option, SC_SliderHandle,
+ widget);
+
+ QRect afterHandle = QRect(handle.topLeft() + xySwitch(QPoint(4, 6), horizontal),
+ groove.bottomRight() + xySwitch(QPoint(-4, -6), horizontal));
+ QRect beforeHandle = QRect(groove.topLeft() + xySwitch(QPoint(4, 6), horizontal),
+ handle.bottomRight() + xySwitch(QPoint(-4, -6), horizontal));
+
+ if (slider->upsideDown || !horizontal) {
+ QRect remember;
+ remember = afterHandle;
+ afterHandle = beforeHandle;
+ beforeHandle = remember;
+ }
+
+ painter->setPen(slider->palette.color(QPalette::Mid));
+ painter->setBrush(option->palette.color(QPalette::Background));
+ painter->drawRect(afterHandle);
+ painter->setPen(slider->palette.color(QPalette::Light));
+ painter->drawLine(afterHandle.topLeft() + xySwitch(QPoint(0, 1), horizontal),
+ afterHandle.topRight() + xySwitch(QPoint(0, 1), horizontal));
+ painter->setPen(option->palette.color(QPalette::Midlight));
+
+ if (horizontal) {
+ painter->setBrush(gradientBrush(QRect(QPoint(groove.x(),
+ handle.y() + 1),
+ QSize(groove.width(),
+ handle.height() + 1))));
+ } else {
+ QRect rect = QRect(QPoint(groove.x(),
+ handle.x() - 1),
+ QSize(groove.height(),
+ handle.width() + 1));
+ QLinearGradient gradient(groove.bottomLeft(),
+ groove.bottomRight());
+ gradient.setColorAt(1.0, QColor(188, 210, 230));
+ gradient.setColorAt(0.3, Qt::white);
+ gradient.setColorAt(0.0, QColor(223, 233, 243));
+
+ painter->setBrush(gradient);
+ }
+
+ painter->drawRect(beforeHandle);
+
+ QPainterPath handlePath;
+ QPainterPath innerPath;
+ QPoint topLeft, topRight, bottomLeft;
+ if (horizontal) {
+ topLeft = handle.topLeft();
+ topRight = handle.topRight();
+ bottomLeft = handle.bottomLeft();
+ } else {
+ topLeft = handle.bottomLeft();
+ topRight = handle.topLeft();
+ bottomLeft = handle.topRight();
+ }
+
+ if (horizontal) {
+ QImage image(sliderHandleImage);
+
+ image.setColor(1,
+ option->palette.color(QPalette::Midlight).rgb());
+ image.setColor(2,
+ option->palette.color(QPalette::Button).rgb());
+
+ if (!(slider->state & State_Enabled)) {
+ image.setColor(4, slider->palette.color(QPalette::Background).rgb());
+ image.setColor(5, slider->palette.color(QPalette::Background).rgb());
+ image.setColor(6, slider->palette.color(QPalette::Background).rgb());
+ }
+
+ painter->drawImage(handle.topLeft(), image);
+ } else {
+ QImage image(":/images/verticalsliderhandle.png");
+ painter->drawImage(handle.topLeft(), image);
+ }
+
+ if (slider->tickPosition & QSlider::TicksBelow) {
+ painter->setPen(slider->palette.color(QPalette::Light));
+ int tickInterval = slider->tickInterval ? slider->tickInterval :
+ slider->pageStep;
+
+ for (int i = 0; i <= slider->maximum; i += tickInterval) {
+ if (horizontal) {
+ int pos = int(((i / double(slider->maximum)) *
+ ticks.width()) - 1);
+ painter->drawLine(QPoint(ticks.left() + pos,
+ ticks.top() + 2), QPoint(ticks.left() + pos, ticks.top() + 8));
+ } else {
+ int pos = int(((i / double(slider->maximum)) *
+ ticks.height()) - 1);
+ painter->drawLine(QPoint(ticks.left() + 2, ticks.bottom() - pos),
+ QPoint(ticks.right() - 2, ticks.bottom() - pos));
+ }
+ }
+ if (horizontal) {
+ painter->drawLine(QPoint(ticks.right(), ticks.top() + 2),
+ QPoint(ticks.right(), ticks.top() + 8));
+ } else {
+ painter->drawLine(QPoint(ticks.left() + 2, ticks.top()),
+ QPoint(ticks.right() - 2, ticks.top()));
+ }
+ }
+ break;
+ }
+ default:
+ QWindowsStyle::drawComplexControl(control, option, painter, widget);
+ }
+ painter->restore();
+}
+
+inline void JavaStyle::drawSunkenButtonShadow(QPainter *painter,
+ QRect rect,
+ const QColor &frameColor,
+ bool reverse) const
+{
+ painter->save();
+
+ painter->setPen(frameColor);
+
+ if (!reverse) {
+ painter->drawLine(QLine(QPoint(rect.x() + 1, rect.y() + 1),
+ QPoint(rect.x() + rect.width() - 1, rect.y() + 1)));
+ painter->drawLine(QLine(QPoint(rect.x() + 1, rect.y()),
+ QPoint(rect.x() + 1, rect.y() + rect.height())));
+ } else {
+ painter->drawLine(QLine(QPoint(rect.right(), rect.bottom()),
+ QPoint(rect.right(), rect.top())));
+ painter->drawLine(QLine(QPoint(rect.left(), rect.top() + 1),
+ QPoint(rect.right(), rect.top() + 1)));
+ }
+ painter->restore();
+}
+
+inline void JavaStyle::drawButtonHoverFrame(QPainter *painter, QRect rect,
+ const QColor &frameColor,
+ const QColor &activeFrame) const
+{
+ painter->save();
+
+ painter->setPen(activeFrame);
+ painter->drawRect(rect);
+ rect.adjust(1, 1, -1, -1);
+ painter->setPen(frameColor);
+ painter->drawRect(rect);
+ rect.adjust(1, 1, -1, -1);
+ painter->setPen(activeFrame);
+ painter->drawRect(rect);
+
+ painter->restore();
+}
+
+QStyle::SubControl JavaStyle::hitTestComplexControl(ComplexControl control,
+ const QStyleOptionComplex *option,
+ const QPoint &pos,
+ const QWidget *widget) const
+{
+ SubControl ret = SC_None;
+
+ switch (control) {
+ case CC_TitleBar: {
+ const QStyleOptionTitleBar *bar =
+ qstyleoption_cast<const QStyleOptionTitleBar *>(option);
+
+ QRect maximize = subControlRect(control, bar, SC_TitleBarMaxButton);
+ if (maximize.contains(pos)) {
+ ret = SC_TitleBarMaxButton;
+ break;
+ }
+ QRect minimize = subControlRect(control, bar, SC_TitleBarMinButton);
+ if (minimize.contains(pos)) {
+ ret = SC_TitleBarMinButton;
+ break;
+ }
+ QRect close = subControlRect(control, bar, SC_TitleBarCloseButton);
+ if (close.contains(pos)) {
+ ret = SC_TitleBarCloseButton;
+ break;
+ }
+ QRect system = subControlRect(control, bar, SC_TitleBarSysMenu);
+ if (system.contains(pos)) {
+ ret = SC_TitleBarSysMenu;
+ break;
+ }
+ ret = SC_TitleBarLabel;
+ break;
+ }
+ case CC_ScrollBar:
+ if (const QStyleOptionSlider *scrollBar =
+ qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+ QRect slider = subControlRect(control, scrollBar,
+ SC_ScrollBarSlider, widget);
+ if (slider.contains(pos)) {
+ ret = SC_ScrollBarSlider;
+ break;
+ }
+
+ QRect scrollBarAddLine = subControlRect(control, scrollBar,
+ SC_ScrollBarAddLine, widget);
+ if (scrollBarAddLine.contains(pos)) {
+ ret = SC_ScrollBarAddLine;
+ break;
+ }
+
+ QRect scrollBarSubPage = subControlRect(control, scrollBar,
+ SC_ScrollBarSubPage, widget);
+ if (scrollBarSubPage.contains(pos)) {
+ ret = SC_ScrollBarSubPage;
+ break;
+ }
+
+ QRect scrollBarAddPage = subControlRect(control, scrollBar,
+ SC_ScrollBarAddPage, widget);
+ if (scrollBarAddPage.contains(pos)) {
+ ret = SC_ScrollBarAddPage;
+ break;
+ }
+
+ QRect scrollBarSubLine = subControlRect(control, scrollBar,
+ SC_ScrollBarSubLine, widget);
+ if (scrollBarSubLine.contains(pos)) {
+ ret = SC_ScrollBarSubLine;
+ break;
+ }
+ }
+ break;
+
+ default:
+ ret = QWindowsStyle::hitTestComplexControl(control, option, pos,
+ widget);
+ }
+ return ret;
+}
+
+void JavaStyle::polish(QWidget *widget)
+{
+ if (qobject_cast<QCheckBox *>(widget) ||
+ qobject_cast<QRadioButton *>(widget) ||
+ qobject_cast<QPushButton *>(widget) ||
+ qobject_cast<QToolButton *>(widget) ||
+ qobject_cast<QSpinBox *>(widget) ||
+ qobject_cast<QGroupBox *>(widget))
+ widget->setAttribute(Qt::WA_Hover, true);
+}
+
+void JavaStyle::unpolish(QWidget *widget)
+{
+ if (qobject_cast<QPushButton *>(widget) ||
+ qobject_cast<QCheckBox *>(widget) ||
+ qobject_cast<QRadioButton *>(widget) ||
+ qobject_cast<QToolButton *>(widget) ||
+ qobject_cast<QSpinBox *>(widget) ||
+ qobject_cast<QGroupBox *>(widget))
+ widget->setAttribute(Qt::WA_Hover, false);
+}
+
+void JavaStyle::drawSplitter(const QStyleOption *option, QPainter *painter,
+ bool horizontal) const
+{
+ QRect rect = option->rect;
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(option->palette.color(QPalette::Background));
+
+ painter->drawRect(rect);
+
+ QColor colors[] = { Qt::white, option->palette.color(QPalette::Mid) };
+ int iterations = horizontal ? rect.height() - 1 : rect.width() - 1;
+ for (int i = 0; i < iterations; ++i) {
+ painter->setPen(colors[i % 2]);
+ painter->drawPoint(xySwitch(QPoint(rect.x() + 0 + (i % 4),
+ rect.y() + i), horizontal));
+ }
+}
+
+inline QPoint JavaStyle::xySwitch(const QPoint &point, bool horizontal) const
+{
+ QPoint retPoint = point;
+
+ if (!horizontal) {
+ retPoint = QPoint(point.y(), point.x());
+ }
+
+ return retPoint;
+}
+
+void JavaStyle::drawPrimitive(PrimitiveElement element,
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget) const
+{
+ painter->save();
+
+ switch (element) {
+ case PE_PanelButtonBevel:
+ case PE_FrameButtonBevel: {
+ painter->save();
+ painter->setBrush(option->palette.background());
+ painter->setPen(Qt::NoPen);
+ painter->drawRect(option->rect);
+ painter->restore();
+ break;
+ }
+ case PE_IndicatorBranch: {
+ painter->save();
+ QColor lineColor(204, 204, 255);
+ QPixmap openPixmap(":/images/jtreeopen.png");
+ QPixmap closedPixmap(":/images/jtreeclosed.png");
+ QRect pixmapRect(QPoint(0, 0), QSize(12, 12));
+ pixmapRect.moveCenter(option->rect.center());
+ pixmapRect.translate(2, 0);
+ QPoint center = option->rect.center();
+
+ painter->setPen(lineColor);
+ painter->setBrush(Qt::NoBrush);
+
+ if (option->state & State_Item) {
+ painter->drawLine(center,
+ QPoint(option->rect.right(), center.y()));
+
+ painter->drawLine(center, QPoint(center.x(),
+ option->rect.top()));
+
+ if (option->state & State_Sibling) {
+ painter->drawLine(center, QPoint(center.x(),
+ option->rect.bottom()));
+ }
+
+ if (option->state & State_Children)
+ if (option->state & State_Open)
+ painter->drawPixmap(pixmapRect.topLeft(), closedPixmap);
+ else
+ painter->drawPixmap(pixmapRect.topLeft(), openPixmap);
+ } else if (option->state & State_Sibling) {
+ painter->drawLine(center.x(), option->rect.top(), center.x(),
+ option->rect.bottom());
+ }
+
+ painter->restore();
+ break;
+ }
+ case PE_IndicatorViewItemCheck: {
+ break;
+ }
+ case PE_FrameWindow: {
+ painter->save();
+ bool active = option->state & State_Active;
+
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(active ? option->palette.color(QPalette::Midlight)
+ : option->palette.color(QPalette::Mid));
+
+ painter->drawRect(QRect(option->rect.topLeft(), option->rect.bottomLeft() + QPoint(5, 0)));
+ painter->drawRect(QRect(option->rect.bottomLeft(), option->rect.bottomRight() + QPoint(0, -5)));
+ painter->drawRect(QRect(option->rect.bottomRight() + QPoint(-5, 0), option->rect.topRight()));
+ painter->drawRect(QRect(option->rect.topLeft(), option->rect.topRight() + QPoint(0, 4)));
+
+ painter->setBrush(Qt::NoBrush);
+ painter->setPen(option->palette.color(QPalette::Active, QPalette::WindowText));
+ painter->drawLine(option->rect.topLeft() + QPoint(2, 14),
+ option->rect.bottomLeft() + QPoint(2, -14));
+
+ painter->drawLine(option->rect.topRight() + QPoint(-2, 14),
+ option->rect.bottomRight() + QPoint(-2, -14));
+
+ painter->drawLine(option->rect.topLeft() + QPoint(14, 2),
+ option->rect.topRight() + QPoint(-14, 2));
+
+ painter->drawLine(option->rect.bottomLeft() + QPoint(14, -2),
+ option->rect.bottomRight() + QPoint(-14, -2));
+
+ painter->setPen(active ? option->palette.color(QPalette::Light) :
+ option->palette.color(QPalette::Button));
+ painter->drawLine(option->rect.topLeft() + QPoint(3, 15),
+ option->rect.bottomLeft() + QPoint(3, -13));
+
+ painter->drawLine(option->rect.topRight() + QPoint(-1, 15),
+ option->rect.bottomRight() + QPoint(-1, -13));
+
+ painter->drawLine(option->rect.topLeft() + QPoint(15, 3),
+ option->rect.topRight() + QPoint(-13, 3));
+
+ painter->drawLine(option->rect.bottomLeft() + QPoint(15, -1),
+ option->rect.bottomRight() + QPoint(-13, -1));
+
+ painter->restore();
+ break;
+ }
+ case PE_IndicatorSpinUp: {
+ const QStyleOptionSpinBox *spinner =
+ qstyleoption_cast<const QStyleOptionSpinBox *>(option);
+ int add = spinner->state & State_Sunken &&
+ spinner->activeSubControls & SC_SpinBoxUp ? 1 : 0;
+
+ QPoint center = option->rect.center();
+ painter->drawLine(center.x() + add, center.y() + 1 + add,
+ center.x() + 2 + add, center.y() + 1 + add);
+ painter->drawPoint(center.x() + 1 + add, center.y() + add);
+ break;
+ }
+ case PE_IndicatorSpinDown: {
+ const QStyleOptionSpinBox *spinner =
+ qstyleoption_cast<const QStyleOptionSpinBox *>(option);
+
+ int add = spinner->state & State_Sunken &&
+ spinner->activeSubControls & SC_SpinBoxDown ? 1 : 0;
+ QPoint center = option->rect.center();
+ painter->drawLine(center.x() + add, center.y() + add,
+ center.x() + 2 + add, center.y() + add);
+ painter->drawPoint(center.x() + 1 + add, center.y() + 1 + add);
+ break;
+ }
+ case PE_FrameDockWidget: {
+ drawPrimitive(PE_FrameWindow, option, painter, widget);
+ break;
+ }
+ case PE_IndicatorToolBarHandle: {
+ QPoint offset;
+ bool horizontal = option->state & State_Horizontal;
+
+ if (horizontal)
+ offset = option->rect.topLeft();
+ else
+ offset = option->rect.topLeft();
+
+ int iterations = horizontal ? option->rect.height() :
+ option->rect.width();
+
+ for (int i = 0; i < iterations; ++i) {
+ painter->setPen(i % 2 ? Qt::white :
+ option->palette.color(QPalette::Mid));
+ int add = i % 4;
+ painter->drawPoint(offset + xySwitch(QPoint(add, i),
+ horizontal));
+ painter->drawPoint(offset + xySwitch(QPoint(add + 4, i),
+ horizontal));
+ if (add + 8 < 10)
+ painter->drawPoint(offset + xySwitch(QPoint(add + 8, i),
+ horizontal));
+ }
+
+ break;
+ }
+ case PE_IndicatorToolBarSeparator: {
+ break;
+ }
+ case PE_PanelButtonTool: {
+ const QStyleOptionToolButton *button =
+ qstyleoption_cast<const QStyleOptionToolButton *>(option);
+
+ if (!button) {
+ painter->setPen(Qt::red);
+ if (!(option->state & State_Enabled))
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ drawButtonBackground(option, painter, false);
+ break;
+ }
+
+ if (button->state & State_MouseOver || button->state & State_On) {
+ QStyleOptionButton bevel;
+ bevel.state = button->state;
+ bevel.rect = button->rect;
+ bevel.palette = button->palette;
+
+ drawButtonBackground(&bevel, painter, false);
+ } else {
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(button->palette.color(QPalette::Background));
+
+ painter->drawRect(button->rect.adjusted(0, 0, -1, -1));
+ }
+ break;
+ }
+ case PE_FrameMenu: {
+ painter->setPen(option->palette.color(QPalette::Midlight));
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ break;
+ }
+ case PE_PanelButtonCommand: {
+ const QStyleOptionButton *btn =
+ qstyleoption_cast<const QStyleOptionButton *>(option);
+ bool hover = (btn->state & State_Enabled) &&
+ (btn->state & State_MouseOver);
+ bool sunken = btn->state & State_Sunken;
+ bool isDefault = btn->features & QStyleOptionButton::DefaultButton;
+ bool on = option->state & State_On;
+
+ drawButtonBackground(option, painter, false);
+
+ QRect rect = option->rect.adjusted(0, 0, -1, -1);
+ if (hover && !sunken && !isDefault && !on) {
+ drawButtonHoverFrame(painter, rect,
+ btn->palette.color(QPalette::Mid),
+ btn->palette.color(QPalette::Button));
+ } else if (isDefault) {
+ drawPrimitive(PE_FrameDefaultButton, option, painter, widget);
+ }
+ break;
+ }
+ case PE_FrameDefaultButton: {
+ painter->setPen(option->palette.color(QPalette::Mid));
+ QRect rect = option->rect.adjusted(0, 0, -1, -1);
+ painter->drawRect(rect);
+ painter->drawRect(rect.adjusted(1, 1, -1, -1));
+ break;
+ }
+//! [0]
+ case PE_IndicatorCheckBox: {
+ painter->save();
+ drawButtonBackground(option, painter, true);
+
+ if (option->state & State_Enabled &&
+ option->state & State_MouseOver &&
+ !(option->state & State_Sunken)) {
+ painter->setPen(option->palette.color(QPalette::Button));
+ QRect rect = option->rect.adjusted(1, 1, -2, -2);
+ painter->drawRect(rect);
+ rect = rect.adjusted(1, 1, -1, -1);
+ painter->drawRect(rect);
+ }
+
+ if (option->state & State_On) {
+ QImage image(":/images/checkboxchecked.png");
+ painter->drawImage(option->rect.topLeft(), image);
+ }
+ painter->restore();
+ break;
+//! [0]
+ }
+ case PE_IndicatorRadioButton: {
+ painter->save();
+ QBrush radioBrush = option->palette.button();
+
+ if (!(option->state & State_Sunken) &&
+ option->state & State_Enabled)
+ radioBrush = gradientBrush(option->rect);
+
+ painter->setBrush(radioBrush);
+ if (option->state & State_Enabled)
+ painter->setPen(option->palette.color(QPalette::Mid));
+ else
+ painter->setPen(option->palette.color(QPalette::Disabled,
+ QPalette::WindowText));
+ painter->drawEllipse(option->rect.adjusted(0, 0, -1, -1));
+
+ if (option->state & State_MouseOver &&
+ option->state & State_Enabled &&
+ !(option->state & State_Sunken)) {
+ gradientBrush(option->rect);
+ painter->setPen(option->palette.color(QPalette::Button));
+ painter->setBrush(Qt::NoBrush);
+ QRect rect = option->rect.adjusted(1, 1, -2, -2);
+ painter->drawEllipse(rect);
+ rect = rect.adjusted(1, 1, -1, -1);
+ painter->drawEllipse(rect);
+ }
+
+ if (option->state & State_On) {
+ painter->setBrush(option->palette.color(QPalette::Text));
+ painter->setPen(Qt::NoPen);
+ painter->drawEllipse(option->rect.adjusted(3, 3, -3, -3));
+ }
+ if (option->state & State_Sunken &&
+ option->state & State_Enabled) {
+ painter->setPen(option->palette.color(QPalette::Mid));
+ painter->drawArc(option->rect.adjusted(1, 1, -2, -2), 80 * 16,
+ 100 * 16);
+ }
+ painter->restore();
+ break;
+ }
+ case PE_FrameTabWidget: {
+ painter->setPen(option->palette.color(QPalette::Midlight));
+ painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ painter->setPen(Qt::white);
+ painter->drawRect(option->rect.adjusted(1, 1, -2, -2));
+ break;
+ }
+ case PE_Frame:
+ case PE_FrameLineEdit: {
+ const QStyleOptionFrame *frame =
+ qstyleoption_cast<const QStyleOptionFrame *>(option);
+ const QStyleOptionFrameV2 frameV2(*frame);
+
+ painter->setPen(frame->palette.color(QPalette::Mid));
+ painter->drawRect(frameV2.rect.adjusted(0, 0, -2, -2));
+ painter->setPen(Qt::white);
+ painter->drawRect(frameV2.rect.adjusted(1, 1, -1, -1));
+ painter->setPen(frameV2.palette.color(QPalette::Active,
+ QPalette::Background));
+ painter->drawLine(frameV2.rect.bottomLeft(),
+ frameV2.rect.bottomLeft() + QPoint(1, -1));
+ painter->drawLine(frameV2.rect.topRight(),
+ frameV2.rect.topRight() + QPoint(-1, 1));
+ break;
+ }
+ case PE_FrameFocusRect: {
+ painter->setPen(option->palette.color(QPalette::Light));
+ painter->setBrush(Qt::NoBrush);
+ QRect rect = option->rect;
+ rect = rect.adjusted(0,0, -1, -1);
+ painter->drawRect(rect);
+ break;
+ }
+ default:
+ QWindowsStyle::drawPrimitive(element, option, painter, widget);
+ }
+ painter->restore();
+}
+
+//! [1]
+void JavaStyle::drawButtonBackground(const QStyleOption *option,
+ QPainter *painter, bool isCheckbox) const
+{
+ QBrush buttonBrush = option->palette.button();
+ bool sunken = option->state & State_Sunken;
+ bool disabled = !(option->state & State_Enabled);
+ bool on = option->state & State_On;
+
+ if (!sunken && !disabled && (!on || isCheckbox))
+ buttonBrush = gradientBrush(option->rect);
+
+ painter->fillRect(option->rect, buttonBrush);
+
+ QRect rect = option->rect.adjusted(0, 0, -1, -1);
+
+ if (disabled)
+ painter->setPen(option->palette.color(QPalette::Disabled,
+ QPalette::WindowText));
+ else
+ painter->setPen(option->palette.color(QPalette::Mid));
+
+ painter->drawRect(rect);
+
+ if (sunken && !disabled) {
+ drawSunkenButtonShadow(painter, rect,
+ option->palette.color(QPalette::Mid),
+ option->direction == Qt::RightToLeft);
+ }
+}
+//! [1]
+
+QBrush JavaStyle::gradientBrush(const QRect &rect) const
+{
+ QLinearGradient gradient(rect.topLeft(), rect.bottomLeft());
+ gradient.setColorAt(1.0, QColor(188, 210, 230));
+ gradient.setColorAt(0.3, Qt::white);
+ gradient.setColorAt(0.0, QColor(223, 233, 243));
+
+ return QBrush(gradient);
+}
+
+QRect JavaStyle::subElementRect(SubElement element,
+ const QStyleOption *option,
+ const QWidget *widget) const
+{
+ QRect rect;
+
+ switch (element) {
+ case SE_ToolBoxTabContents: {
+ const QStyleOptionToolBox *box =
+ qstyleoption_cast<const QStyleOptionToolBox *>(option);
+
+ rect.moveTopLeft(box->rect.topLeft() + QPoint(0, 2));
+ rect.setHeight(box->rect.height() - 4);
+ rect.setWidth(box->fontMetrics.width(box->text) + 15);
+ break;
+ }
+ case SE_ProgressBarLabel:
+ case SE_ProgressBarGroove:
+ case SE_ProgressBarContents: {
+ rect = option->rect.adjusted(1, 1, -1, -1);
+ break;
+ }
+ case SE_PushButtonFocusRect: {
+ const QStyleOptionButton *btn =
+ qstyleoption_cast<const QStyleOptionButton *>(option);
+
+ rect = btn->fontMetrics.boundingRect(btn->text);
+ rect = QRect(0, 0, btn->fontMetrics.width(btn->text),
+ rect.height());
+
+ if (!btn->icon.isNull()) {
+ rect.adjust(0, 0, btn->iconSize.width(), btn->iconSize.height()
+ > rect.height() ? btn->iconSize.height() - rect.height() : 0);
+ rect.translate(-btn->iconSize.width(), 0);
+ rect.adjust(-1, -1, 1, 1);
+ }
+ rect = QRect(int(ceil((btn->rect.width() - rect.width()) / 2.0)),
+ int(ceil((btn->rect.height() - rect.height()) / 2.0)),
+ rect.width() - 1, rect.height());
+ rect.adjust(-1, 0, 1, 0);
+
+ break;
+ }
+ default:
+ rect = QWindowsStyle::subElementRect(element, option, widget);
+ }
+ return rect;
+}
+
+int JavaStyle::pixelMetric(PixelMetric metric,
+ const QStyleOption* /* option */,
+ const QWidget* /*widget*/) const
+{
+ int value = 0;
+
+ switch (metric) {
+ case PM_ButtonShiftHorizontal:
+ case PM_ButtonShiftVertical:
+ case PM_TabBarTabShiftHorizontal:
+ case PM_ButtonDefaultIndicator:
+ case PM_TabBarTabShiftVertical:
+ value = 0;
+ break;
+ case PM_TabBarBaseOverlap:
+ case PM_DefaultFrameWidth:
+ value = 2;
+ break;
+ case PM_TabBarTabVSpace:
+ value = 4;
+ break;
+ case PM_ScrollBarExtent:
+ value = 16;
+ break;
+ case PM_ScrollBarSliderMin:
+ value = 26;
+ break;
+ case PM_SplitterWidth:
+ value = 8;
+ break;
+ case PM_SliderThickness:
+ value = 16;
+ break;
+ case PM_SliderControlThickness:
+ value = 16;
+ break;
+ case PM_SliderTickmarkOffset:
+ value = 10;
+ break;
+ case PM_SliderSpaceAvailable:
+ break;
+ case PM_MenuPanelWidth:
+ value = 1;
+ break;
+ case PM_MenuVMargin:
+ value = 2;
+ break;
+ case PM_MenuBarPanelWidth:
+ value = 1;
+ break;
+ case PM_MenuBarItemSpacing:
+ value = 0;
+ break;
+ case PM_MenuBarHMargin:
+ value = 3;
+ break;
+ case PM_MenuBarVMargin:
+ value = 0;
+ break;
+ case PM_ComboBoxFrameWidth:
+ value = 1;
+ break;
+ case PM_MenuButtonIndicator:
+ value = 15;
+ break;
+ case PM_ToolBarItemMargin:
+ value = 3;
+ break;
+ case PM_ToolBarHandleExtent:
+ value = 13;
+ break;
+ case PM_SpinBoxFrameWidth:
+ value = 2;
+ break;
+ case PM_TitleBarHeight: {
+ value = 21;
+ break;
+ case PM_MDIFrameWidth:
+ value = 6;
+ break;
+ }
+ case PM_DockWidgetFrameWidth: {
+ value = 5;
+ break;
+ }
+ default:
+ value = QWindowsStyle::pixelMetric(metric);
+ }
+ return value;
+}
+
+
+int JavaStyle::styleHint(StyleHint hint, const QStyleOption *option,
+ const QWidget *widget,
+ QStyleHintReturn *returnData) const
+{
+ int ret;
+
+ switch (hint) {
+ case SH_Table_GridLineColor: {
+ ret = static_cast<int>(option->palette.color(QPalette::Mid).rgb());
+ break;
+ }
+ case QStyle::SH_Menu_Scrollable:
+ ret = 1;
+ break;
+ default:
+ ret = QWindowsStyle::styleHint(hint, option, widget, returnData);
+ }
+ return ret;
+}
+
+QPixmap JavaStyle::standardPixmap(StandardPixmap standardPixmap,
+ const QStyleOption *option,
+ const QWidget *widget) const
+{
+ QPixmap pixmap = QWindowsStyle::standardPixmap(standardPixmap, option,
+ widget);
+
+ QPixmap maximizePixmap(":/images/internalmaximize.png");
+ QPixmap minimizePixmap(":/images/internalminimize.png");
+ QPixmap closePixmap(":/images/internalclose.png");
+ QPixmap internalPixmap(":/images/internalsystem.png");
+ QPixmap internalCloseDownPixmap(":/images/internalclosedown.png");
+ QPixmap minimizeDownPixmap(":/images/internalminimizedown.png");
+ QPixmap maximizeDownPixmap(":/images/internalmaximizedown.png");
+ QPixmap dirOpenPixmap(":/images/open24.png");
+ QPixmap filePixmap(":/images/file.png");
+
+ switch (standardPixmap) {
+ case SP_DirLinkIcon:
+ case SP_DirClosedIcon:
+ case SP_DirIcon:
+ case SP_DirOpenIcon: {
+ pixmap = closePixmap;
+ break;
+ }
+ case SP_FileIcon: {
+ pixmap = filePixmap;
+ break;
+ }
+ case SP_FileDialogBack: {
+ pixmap = QPixmap(":/images/fileback.png");
+ break;
+ }
+ case SP_FileDialogToParent: {
+ pixmap = QPixmap(":/images/fileparent.png");
+ break;
+ }
+ case SP_FileDialogNewFolder: {
+ pixmap = QPixmap(":/images/open24.png");
+ break;
+ }
+ case SP_FileDialogListView: {
+ pixmap = QPixmap(":/images/filelist.png");
+ break;
+ }
+ case SP_FileDialogDetailedView: {
+ pixmap = QPixmap(":/images/filedetail.png");
+ break;
+ }
+ case SP_MessageBoxInformation: {
+ pixmap = QPixmap(":/images/information.png");
+ break;
+ }
+ case SP_MessageBoxWarning: {
+ pixmap = QPixmap(":/images/warning.png");
+ }
+ case SP_MessageBoxCritical: {
+ pixmap = QPixmap(":/images/critical.png");
+ break;
+ }
+ case SP_MessageBoxQuestion: {
+ pixmap = QPixmap(":/images/question.png");
+ break;
+ }
+ case SP_TitleBarNormalButton:
+ pixmap = maximizePixmap;
+ break;
+ case SP_TitleBarCloseButton:
+ pixmap = closePixmap;
+ break;
+ default:
+ ;
+ }
+
+ return pixmap;
+}
+
+QSize JavaStyle::sizeFromContents(ContentsType type,
+ const QStyleOption *option,
+ const QSize &contentsSize,
+ const QWidget *widget) const
+{
+ switch (type) {
+ case CT_ComboBox: {
+ return QSize(contentsSize.width() + 27, contentsSize.height());
+ }
+ case CT_Slider: {
+ const QStyleOptionSlider *slider =
+ qstyleoption_cast<const QStyleOptionSlider *>(option);
+ if (slider->tickPosition == QSlider::TicksBelow) {
+ return QSize(contentsSize.width(), contentsSize.height() + 15);
+ } else {
+ return contentsSize;
+ }
+ }
+ case CT_MenuBarItem: {
+ const QStyleOptionMenuItem *menuItem =
+ qstyleoption_cast<const QStyleOptionMenuItem *>(option);
+ QFontMetrics metrics(menuItem->font);
+ QRect boundingRect = metrics.boundingRect(menuItem->text);
+ int width = boundingRect.width() + 14;
+ int height = boundingRect.height() + 3;
+ if (height < 20)
+ height = 20;
+
+ return QSize(width, height);
+ }
+ case CT_MenuItem: {
+ const QStyleOptionMenuItem *menuItem =
+ qstyleoption_cast<const QStyleOptionMenuItem *>(option);
+ QSize defaultSize = QWindowsStyle::sizeFromContents(type, option,
+ contentsSize, widget);
+
+ if (menuItem->menuItemType == QStyleOptionMenuItem::Separator)
+ return defaultSize;
+
+ int width = 30;
+ int height = 0;
+
+ if (!menuItem->icon.isNull()) {
+ width += 20;
+ height += 20;
+ }
+ if (!menuItem->text.isEmpty()) {
+ QFontMetrics metrics(menuItem->font);
+ QString text = menuItem->text;
+ text.remove(QLatin1Char('\t'));
+ QRect textRect = metrics.boundingRect(text);
+ width += textRect.width();
+ if (height < textRect.height())
+ height += textRect.height();
+ }
+ if (menuItem->checkType != QStyleOptionMenuItem::NotCheckable) {
+ width += 10;
+ if (height < 10)
+ height = 10;
+ }
+ return QSize(width, height);
+ }
+ default:
+ return QWindowsStyle::sizeFromContents(type, option, contentsSize,
+ widget);
+ }
+}
diff --git a/doc/src/snippets/layouts/layouts.cpp b/doc/src/snippets/layouts/layouts.cpp
new file mode 100644
index 0000000..551bfc7
--- /dev/null
+++ b/doc/src/snippets/layouts/layouts.cpp
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ {
+//! [0]
+ QWidget *window = new QWidget;
+//! [0] //! [1]
+ QPushButton *button1 = new QPushButton("One");
+//! [1] //! [2]
+ QPushButton *button2 = new QPushButton("Two");
+ QPushButton *button3 = new QPushButton("Three");
+ QPushButton *button4 = new QPushButton("Four");
+ QPushButton *button5 = new QPushButton("Five");
+//! [2]
+
+//! [3]
+ QHBoxLayout *layout = new QHBoxLayout;
+//! [3] //! [4]
+ layout->addWidget(button1);
+ layout->addWidget(button2);
+ layout->addWidget(button3);
+ layout->addWidget(button4);
+ layout->addWidget(button5);
+
+ window->setLayout(layout);
+//! [4] //! [5]
+ window->show();
+//! [5]
+ }
+
+ {
+//! [6]
+ QWidget *window = new QWidget;
+//! [6] //! [7]
+ QPushButton *button1 = new QPushButton("One");
+//! [7] //! [8]
+ QPushButton *button2 = new QPushButton("Two");
+ QPushButton *button3 = new QPushButton("Three");
+ QPushButton *button4 = new QPushButton("Four");
+ QPushButton *button5 = new QPushButton("Five");
+//! [8]
+
+//! [9]
+ QVBoxLayout *layout = new QVBoxLayout;
+//! [9] //! [10]
+ layout->addWidget(button1);
+ layout->addWidget(button2);
+ layout->addWidget(button3);
+ layout->addWidget(button4);
+ layout->addWidget(button5);
+
+ window->setLayout(layout);
+//! [10] //! [11]
+ window->show();
+//! [11]
+ }
+
+ {
+//! [12]
+ QWidget *window = new QWidget;
+//! [12] //! [13]
+ QPushButton *button1 = new QPushButton("One");
+//! [13] //! [14]
+ QPushButton *button2 = new QPushButton("Two");
+ QPushButton *button3 = new QPushButton("Three");
+ QPushButton *button4 = new QPushButton("Four");
+ QPushButton *button5 = new QPushButton("Five");
+//! [14]
+
+//! [15]
+ QGridLayout *layout = new QGridLayout;
+//! [15] //! [16]
+ layout->addWidget(button1, 0, 0);
+ layout->addWidget(button2, 0, 1);
+ layout->addWidget(button3, 1, 0, 1, 2);
+ layout->addWidget(button4, 2, 0);
+ layout->addWidget(button5, 2, 1);
+
+ window->setLayout(layout);
+//! [16] //! [17]
+ window->show();
+//! [17]
+ }
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/layouts/layouts.pro b/doc/src/snippets/layouts/layouts.pro
new file mode 100644
index 0000000..79dd54c
--- /dev/null
+++ b/doc/src/snippets/layouts/layouts.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed May 4 15:30:40 2005
+######################################################################
+
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+SOURCES += layouts.cpp
+CONFIG += qt warn_on debug create_prl link_prl
+OBJECTS_DIR=.obj/debug-shared
+MOC_DIR=.moc/debug-shared
diff --git a/doc/src/snippets/mainwindowsnippet.cpp b/doc/src/snippets/mainwindowsnippet.cpp
new file mode 100644
index 0000000..ab0401d
--- /dev/null
+++ b/doc/src/snippets/mainwindowsnippet.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ createMenus();
+ createToolBars();
+ createDockWidgets();
+ //setMenuWidget(new QPushButton("Hello"));
+}
+
+void MainWindow::createMenus()
+{
+ //setMenuWidget(new QPushButton("Hello"));
+ QMenu *menu = new QMenu("File");
+ menu->addAction("Save &As");
+
+ QMenuBar *bar = new QMenuBar;
+ bar->addMenu(menu);
+
+ setMenuWidget(new QWidget());
+}
+
+void MainWindow::createToolBars()
+{
+ setToolButtonStyle(Qt::ToolButtonTextOnly);
+ QToolBar *t1 = new QToolBar;
+ t1->addAction(new QAction("t1", this));
+
+ QToolBar *t2 = new QToolBar;
+ t2->addAction(new QAction("t2", this));
+
+ addToolBar(Qt::LeftToolBarArea, t1);
+ addToolBar(Qt::LeftToolBarArea, t2);
+}
+
+void MainWindow::createDockWidgets()
+{
+ QWidget *dockWidgetContents = new QWidget;
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(new QPushButton("My Button."));
+ dockWidgetContents->setLayout(layout);
+
+//! [0]
+ QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
+ dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea |
+ Qt::RightDockWidgetArea);
+ dockWidget->setWidget(dockWidgetContents);
+ addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
+//! [0]
+}
diff --git a/doc/src/snippets/matrix/matrix.cpp b/doc/src/snippets/matrix/matrix.cpp
new file mode 100644
index 0000000..1ebbcf2
--- /dev/null
+++ b/doc/src/snippets/matrix/matrix.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <cmath>
+
+class SimpleTransformation : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [0]
+void SimpleTransformation::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ painter.rotate(45);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QMatrix");
+}
+//! [0]
+
+class CombinedTransformation : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [1]
+void CombinedTransformation::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ QMatrix matrix;
+ matrix.translate(50, 50);
+ matrix.rotate(45);
+ matrix.scale(0.5, 1.0);
+ painter.setMatrix(matrix);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QMatrix");
+}
+//! [1]
+
+class BasicOperations : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [2]
+void BasicOperations::paintEvent(QPaintEvent *)
+{
+ double pi = 3.14;
+
+ double a = pi/180 * 45.0;
+ double sina = sin(a);
+ double cosa = cos(a);
+
+ QMatrix translationMatrix(1, 0, 0, 1, 50.0, 50.0);
+ QMatrix rotationMatrix(cosa, sina, -sina, cosa, 0, 0);
+ QMatrix scalingMatrix(0.5, 0, 0, 1.0, 0, 0);
+
+ QMatrix matrix;
+ matrix = scalingMatrix * rotationMatrix * translationMatrix;
+
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ painter.setMatrix(matrix);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QMatrix");
+}
+//! [2]
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QWidget widget;
+
+ SimpleTransformation *simpleWidget = new SimpleTransformation;
+ CombinedTransformation *combinedWidget = new CombinedTransformation;
+ BasicOperations *basicWidget = new BasicOperations;
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(simpleWidget);
+ layout->addWidget(combinedWidget);
+ layout->addWidget(basicWidget);
+ widget.setLayout(layout);
+
+ widget.show();
+ widget.resize(130, 350);
+ return app.exec();
+}
diff --git a/doc/src/snippets/matrix/matrix.pro b/doc/src/snippets/matrix/matrix.pro
new file mode 100644
index 0000000..91c307d
--- /dev/null
+++ b/doc/src/snippets/matrix/matrix.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Fri Jan 6 16:44:56 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += matrix.cpp
diff --git a/doc/src/snippets/mdiareasnippets.cpp b/doc/src/snippets/mdiareasnippets.cpp
new file mode 100644
index 0000000..3eaa750
--- /dev/null
+++ b/doc/src/snippets/mdiareasnippets.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+void mainWindowExample()
+{
+ QMdiArea *mdiArea = new QMdiArea;
+//! [0]
+ QMainWindow *mainWindow = new QMainWindow;
+ mainWindow->setCentralWidget(mdiArea);
+//! [0]
+
+ mdiArea->addSubWindow(new QPushButton("Push Me Now!"));
+
+ mainWindow->show();
+}
+
+void addingSubWindowsExample()
+{
+ QWidget *internalWidget1 = new QWidget;
+ QWidget *internalWidget2 = new QWidget;
+
+//! [1]
+ QMdiArea mdiArea;
+ QMdiSubWindow *subWindow1 = new QMdiSubWindow;
+ subWindow1->setWidget(internalWidget1);
+ subWindow1->setAttribute(Qt::WA_DeleteOnClose);
+ mdiArea.addSubWindow(subWindow1);
+
+ QMdiSubWindow *subWindow2 =
+ mdiArea.addSubWindow(internalWidget2);
+
+//! [1]
+ subWindow1->show();
+ subWindow2->show();
+
+ mdiArea.show();
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ mainWindowExample();
+ //addingSubWindowsExample();
+
+ QAction *act = new QAction(qApp);
+ act->setShortcut(Qt::ALT + Qt::Key_S);
+ act->setShortcutContext( Qt::ApplicationShortcut );
+ QObject::connect(act, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+ QWidget widget5;
+ widget5.show();
+ widget5.addAction(act);
+
+ return app.exec();
+}
+
+
diff --git a/doc/src/snippets/medianodesnippet.cpp b/doc/src/snippets/medianodesnippet.cpp
new file mode 100644
index 0000000..8b74111
--- /dev/null
+++ b/doc/src/snippets/medianodesnippet.cpp
@@ -0,0 +1,29 @@
+#include <QtGui>
+
+#include <phonon/mediaobject.h>
+#include <phonon/audiooutput.h>
+#include <phonon/videowidget.h>
+#include <phonon/medianode.h>
+#include <phonon/path.h>
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![0]
+ Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
+ Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
+ Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget;
+
+ Phonon::createPath(mediaObject, audioOutput);
+ Phonon::createPath(mediaObject, videoWidget);
+
+ QList<Phonon::Path> inputPaths =
+ audioOutput->inputPaths(); // inputPaths = [ mediaObject ]
+ QList<Phonon::Path> outputPaths =
+ mediaObject->outputPaths(); // outputPaths = [ audioOutput, videoWidget ]
+//![0]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/moc/main.cpp b/doc/src/snippets/moc/main.cpp
new file mode 100644
index 0000000..17188fc
--- /dev/null
+++ b/doc/src/snippets/moc/main.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "myclass1.h"
+
+MyClass::MyClass(QObject *) {}
+MyClass::~MyClass() {}
+void MyClass::mySlot() {}
+#undef MyClass
+
+#include "myclass2.h"
+
+MyClass::MyClass(QObject *) {}
+MyClass::~MyClass() {}
+void MyClass::setPriority(Priority) {}
+MyClass::Priority MyClass::priority() const { return High; }
+#undef MyClass
+
+#include "myclass3.h"
+
+MyClass::MyClass(QObject *) {}
+MyClass::~MyClass() {}
+#undef MyClass
+
+int main()
+{
+ return 0;
+}
diff --git a/doc/src/snippets/moc/moc.pro b/doc/src/snippets/moc/moc.pro
new file mode 100644
index 0000000..f199abe
--- /dev/null
+++ b/doc/src/snippets/moc/moc.pro
@@ -0,0 +1,2 @@
+HEADERS += myclass1.h myclass2.h myclass3.h
+SOURCES += main.cpp
diff --git a/doc/src/snippets/moc/myclass1.h b/doc/src/snippets/moc/myclass1.h
new file mode 100644
index 0000000..c918b04
--- /dev/null
+++ b/doc/src/snippets/moc/myclass1.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYCLASS1_H
+#define MYCLASS1_H
+
+#include <QObject>
+
+#define MyClass MyClass1
+
+//! [0]
+class MyClass : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyClass(QObject *parent = 0);
+ ~MyClass();
+
+signals:
+ void mySignal();
+
+public slots:
+ void mySlot();
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/moc/myclass2.h b/doc/src/snippets/moc/myclass2.h
new file mode 100644
index 0000000..1dd3bf9
--- /dev/null
+++ b/doc/src/snippets/moc/myclass2.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYCLASS2_H
+#define MYCLASS2_H
+
+#include <QObject>
+
+#define MyClass MyClass2
+
+//! [0]
+class MyClass : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority)
+ Q_ENUMS(Priority)
+
+public:
+ enum Priority { High, Low, VeryHigh, VeryLow };
+
+ MyClass(QObject *parent = 0);
+ ~MyClass();
+
+ void setPriority(Priority priority);
+ Priority priority() const;
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/moc/myclass3.h b/doc/src/snippets/moc/myclass3.h
new file mode 100644
index 0000000..4ba281c
--- /dev/null
+++ b/doc/src/snippets/moc/myclass3.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYCLASS3_H
+#define MYCLASS3_H
+
+#include <QObject>
+
+//! [0]
+class MyClass : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("Author", "Oscar Peterson")
+ Q_CLASSINFO("Status", "Active")
+
+public:
+ MyClass(QObject *parent = 0);
+ ~MyClass();
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/modelview-subclasses/main.cpp b/doc/src/snippets/modelview-subclasses/main.cpp
new file mode 100644
index 0000000..60ba842
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ An example of a main window application that used a subclassed model
+ and view to display data from sound files.
+*/
+
+#include <QApplication>
+
+#include "model.h"
+#include "view.h"
+#include "window.h"
+
+/*!
+ The main function for the linear model example. This creates and
+ populates a model with long integers then displays the contents of the
+ model using a QListView widget.
+*/
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ MainWindow *window = new MainWindow;
+
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/modelview-subclasses/model.cpp b/doc/src/snippets/modelview-subclasses/model.cpp
new file mode 100644
index 0000000..16518c7
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/model.cpp
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QVector as its data source.
+*/
+
+#include "model.h"
+
+/*!
+ Returns the number of items in the string list as the number of rows
+ in the model.
+*/
+
+int LinearModel::rowCount(const QModelIndex &parent) const
+{
+ Q_USING(parent);
+
+ return values.count();
+}
+
+/*
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ If a header is requested then we just return the column or row number,
+ depending on the orientation of the header.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+/*!
+ Returns a model index for other component to use when referencing the
+ item specified by the given row, column, and type. The parent index
+ is ignored.
+*/
+
+QModelIndex LinearModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (parent == QModelIndex() && row >= 0 && row < rowCount()
+ && column == 0)
+ return createIndex(row, column, 0);
+ else
+ return QModelIndex();
+}
+
+QVariant LinearModel::data(const QModelIndex &index, int role) const
+{
+ Q_UNUSED(role);
+
+ if (!index.isValid())
+ return QVariant();
+
+ return values.at(index.row());
+}
+
+/*!
+ Returns Qt::ItemIsEditable so that all items in the vector can be edited.
+*/
+
+Qt::ItemFlags LinearModel::flags(const QModelIndex &index) const
+{
+ // all items in the model are editable
+ return QAbstractListModel::flags(index) | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the string list, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The index corresponds to an item to be shown in a view.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool LinearModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+ values.replace(index.row(), value.toInt());
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool LinearModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ beginInsertRows(parent, position, position + rows - 1);
+
+ values.insert(position, rows, 0);
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool LinearModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(QModelIndex(), position, position+rows-1);
+
+ values.remove(position, rows);
+
+ endRemoveRows();
+ return true;
+}
diff --git a/doc/src/snippets/modelview-subclasses/model.h b/doc/src/snippets/modelview-subclasses/model.h
new file mode 100644
index 0000000..7965f49
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/model.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractListModel>
+#include <QObject>
+#include <qvector.h>
+
+class LinearModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ LinearModel(QObject *parent = 0)
+ : QAbstractListModel(parent) {}
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
+
+private:
+ QVector<int> values;
+};
+
+#endif
diff --git a/doc/src/snippets/modelview-subclasses/view.cpp b/doc/src/snippets/modelview-subclasses/view.cpp
new file mode 100644
index 0000000..7d683ea
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/view.cpp
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ view.cpp
+
+ Provides a view to represent a one-dimensional sequence of integers
+ obtained from a list model as a series of rows.
+*/
+
+#include <QAbstractItemModel>
+#include <QBrush>
+#include <QItemSelection>
+#include <QPainter>
+#include <QPaintEvent>
+#include <QPen>
+#include <QPoint>
+#include <QResizeEvent>
+#include <QScrollBar>
+#include <QSizePolicy>
+
+#include "view.h"
+
+LinearView::LinearView(QWidget *parent)
+ : QAbstractItemView(parent)
+{
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+}
+
+/*!
+ Returns the position of the item in viewport coordinates.
+*/
+
+QRect LinearView::itemViewportRect(const QModelIndex &index) const
+{
+ QRect rect = itemRect(index);
+ QRect result(rect.left() - horizontalScrollBar()->value(),
+ rect.top() - verticalScrollBar()->value(),
+ rect.width(), viewport()->height());
+
+ return result;
+}
+
+/*!
+ Returns the rectangle of the item at position \a index in the
+ model. The rectangle is in contents coordinates.
+*/
+
+QRect LinearView::itemRect(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QRect();
+ else
+ return QRect(index.row(), 0, 1, 1);
+}
+
+
+void LinearView::ensureVisible(const QModelIndex &index)
+{
+ QRect area = viewport()->rect();
+ QRect rect = itemViewportRect(index);
+
+ if (rect.left() < area.left())
+ horizontalScrollBar()->setValue(
+ horizontalScrollBar()->value() - rect.left());
+ else if (rect.right() > area.right())
+ horizontalScrollBar()->setValue(
+ horizontalScrollBar()->value() + rect.left() - area.width());
+}
+
+/*!
+ Returns the item that covers the coordinate given in the view.
+*/
+
+QModelIndex LinearView::itemAt(int x, int /* y */) const
+{
+ int row = x + horizontalScrollBar()->value();
+
+ return model()->index(row, 0, QModelIndex());
+}
+
+//void LinearView::dataChanged(const QModelIndex &/* topLeft */,
+// const QModelIndex &/* bottomRight */)
+//{
+// updateGeometries();
+// if (isVisible())
+// repaint();
+//}
+
+void LinearView::rowsInserted(const QModelIndex &/* parent */, int /* start */,
+ int /* end */)
+{
+ updateGeometries();
+ if (isVisible())
+ repaint();
+}
+
+void LinearView::rowsRemoved(const QModelIndex &/* parent */, int /* start */,
+ int /* end */)
+{
+ updateGeometries();
+ if (isVisible())
+ repaint();
+}
+/*
+void LinearView::verticalScrollbarAction(int action)
+{
+}
+
+void LinearView::horizontalScrollbarAction(int action)
+{
+}
+*/
+
+/*!
+ Select the items in the model that lie within the rectangle specified by
+ \a rect, using the selection \a command.
+*/
+
+void LinearView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)
+{
+ QModelIndex leftIndex = itemAt(rect.left(), 0);
+ QModelIndex rightIndex = itemAt(rect.right(), 0);
+
+ QItemSelection selection(leftIndex, rightIndex);
+
+ selectionModel()->select(selection, command);
+}
+
+QModelIndex LinearView::moveCursor(QAbstractItemView::CursorAction cursorAction,
+ Qt::KeyboardModifiers)
+{
+ QModelIndex current = currentIndex();
+
+ switch (cursorAction) {
+ case MoveLeft:{
+ if (current.row() > 0)
+ return model()->index(current.row() - 1, 0, QModelIndex());
+ else
+ return model()->index(0, 0, QModelIndex());
+ break;}
+ case MoveRight:{
+ if (current.row() < rows(current) - 1)
+ return model()->index(current.row() + 1, 0, QModelIndex());
+ else
+ return model()->index(rows(current) - 1, 0,QModelIndex());
+ break;}
+ case MoveUp:
+ return current;
+ case MoveDown:
+ return current;
+ case MovePageUp:
+ return current;
+ case MovePageDown:
+ return current;
+ case MoveHome:
+ return model()->index(0, 0, QModelIndex());
+ case MoveEnd:
+ return model()->index(rows(current) - 1, 0, QModelIndex());
+ default:
+ return current;
+ }
+}
+
+int LinearView::horizontalOffset() const
+{
+ return horizontalScrollBar()->value();
+}
+
+int LinearView::verticalOffset() const
+{
+ return verticalScrollBar()->value();
+}
+
+/*!
+ Returns a rectangle corresponding to the selection in viewport cooridinates.
+*/
+
+QRect LinearView::selectionViewportRect(const QItemSelection &selection) const
+{
+ int ranges = selection.count();
+
+ if (ranges == 0)
+ return QRect();
+
+ // Note that we use the top and bottom functions of the selection range
+ // since the data is stored in rows.
+
+ int firstRow = selection.at(0).top();
+ int lastRow = selection.at(0).top();
+
+ for (int i = 0; i < ranges; ++i) {
+ firstRow = qMin(firstRow, selection.at(i).top());
+ lastRow = qMax(lastRow, selection.at(i).bottom());
+ }
+
+ QModelIndex firstItem = model()->index(qMin(firstRow, lastRow), 0,
+ QModelIndex());
+ QModelIndex lastItem = model()->index(qMax(firstRow, lastRow), 0,
+ QModelIndex());
+
+ QRect firstRect = itemViewportRect(firstItem);
+ QRect lastRect = itemViewportRect(lastItem);
+
+ return QRect(firstRect.left(), firstRect.top(),
+ lastRect.right() - firstRect.left(), firstRect.height());
+}
+
+void LinearView::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(viewport());
+
+ QRect updateRect = event->rect();
+ QBrush background(Qt::black);
+ QPen foreground(Qt::white);
+
+ painter.fillRect(updateRect, background);
+ painter.setPen(foreground);
+
+ QModelIndex firstItem = itemAt(updateRect.left(), updateRect.top());
+ if (!firstItem.isValid())
+ firstItem = model()->index(0, 0, QModelIndex());
+
+ QModelIndex lastItem = itemAt(updateRect.right(), updateRect.bottom());
+ if (!lastItem.isValid())
+ lastItem = model()->index(rows() - 1, 0, QModelIndex());
+
+ int x = updateRect.left();
+ //int top = updateRect.top();
+ //int bottom = updateRect.bottom();
+
+ int row = firstItem.row();
+ QModelIndex index = model()->index(row, 0, QModelIndex());
+ int value = model()->data(index, Qt::DisplayRole).toInt();
+ int midPoint = viewport()->height()/2;
+ int y2 = midPoint - int(value * midPoint/255.0);
+
+ while (row <= lastItem.row()) {
+
+ QModelIndex index = model()->index(row, 0, QModelIndex());
+ int value = model()->data(index, Qt::DisplayRole).toInt();
+
+ int y1 = y2;
+ y2 = midPoint - int(value * midPoint/255.0);
+
+ painter.drawLine(x-1, y1, x, y2);
+ ++row; ++x;
+ }
+}
+
+void LinearView::resizeEvent(QResizeEvent * /* event */)
+{
+ updateGeometries();
+}
+
+void LinearView::updateGeometries()
+{
+ if (viewport()->width() < rows()) {
+ horizontalScrollBar()->setPageStep(viewport()->width());
+ horizontalScrollBar()->setRange(0, rows() - viewport()->width() - 1);
+ }
+}
+
+QSize LinearView::sizeHint() const
+{
+ return QSize(rows(), 200);
+}
+
+int LinearView::rows(const QModelIndex &index) const
+{
+ return model()->rowCount(model()->parent(index));
+}
+
+bool LinearView::isIndexHidden(const QModelIndex &index) const
+{
+ return false;
+}
diff --git a/doc/src/snippets/modelview-subclasses/view.h b/doc/src/snippets/modelview-subclasses/view.h
new file mode 100644
index 0000000..d6d64bb
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/view.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VIEW_H
+#define VIEW_H
+
+#include <QAbstractItemView>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QModelIndex>
+#include <QRect>
+#include <QSize>
+#include <QWidget>
+
+class LinearView : public QAbstractItemView
+{
+ Q_OBJECT
+public:
+ LinearView(QWidget *parent = 0);
+
+ QRect itemViewportRect(const QModelIndex &index) const;
+ void ensureVisible(const QModelIndex &index);
+ QModelIndex itemAt(int x, int y) const;
+
+protected slots:
+ /*void dataChanged(const QModelIndex &topLeft, const QModelIndex
+ &bottomRight);*/
+ void rowsInserted(const QModelIndex &parent, int start, int end);
+ void rowsRemoved(const QModelIndex &parent, int start, int end);
+ /*void selectionChanged(const QItemSelection &deselected, const QItemSelection &selected);
+ void verticalScrollbarAction(int action);
+ void horizontalScrollbarAction(int action);*/
+
+protected:
+ void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command);
+ QRect selectionViewportRect(const QItemSelection &selection) const;
+ QRect itemRect(const QModelIndex &item) const;
+ bool isIndexHidden(const QModelIndex &index) const;
+ int horizontalOffset() const;
+ int verticalOffset() const;
+ QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction,
+ Qt::KeyboardModifiers modifiers);
+
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ QSize sizeHint() const;
+
+private:
+ int rows(const QModelIndex &index = QModelIndex()) const;
+ void updateGeometries();
+};
+
+#endif
diff --git a/doc/src/snippets/modelview-subclasses/window.cpp b/doc/src/snippets/modelview-subclasses/window.cpp
new file mode 100644
index 0000000..d87857d
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/window.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAction>
+#include <QDataStream>
+#include <QMenu>
+#include <QMenuBar>
+#include <QFile>
+#include <QFileDialog>
+#include <QListView>
+
+#include "window.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Model/View example");
+
+ setupModelView();
+
+ QAction *openAction = new QAction(tr("&Open"), this);
+ QAction *quitAction = new QAction(tr("E&xit"), this);
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAction);
+ fileMenu->addAction(quitAction);
+ menuBar()->addMenu(fileMenu);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(selectOpenFile()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setCentralWidget(view);
+}
+
+void MainWindow::setupModelView()
+{
+ model = new LinearModel(this);
+ view = new LinearView(this);
+ view->setModel(model);
+}
+
+void MainWindow::selectOpenFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Select a file to open"), "", tr("Sound files (*.wav)"));
+
+ if (!fileName.isEmpty())
+ openFile(fileName);
+}
+
+void MainWindow::openFile(const QString &fileName)
+{
+ QFile file(fileName);
+ int length = file.size();
+
+ if (file.open(QFile::ReadOnly)) {
+ model->removeRows(0, model->rowCount());
+
+ int rows = (length - 0x2c)/2;
+ model->insertRows(0, rows);
+
+ // Perform some dodgy tricks to extract the data from the file.
+ QDataStream stream(&file);
+ stream.setByteOrder(QDataStream::LittleEndian);
+
+ Q_INT16 left;
+ Q_INT16 right;
+
+ for (int row = 0; row < rows; ++row) {
+ QModelIndex index = model->index(row);
+
+ stream >> left >> right;
+ model->setData(index, int(left / 256));
+ }
+ }
+}
diff --git a/doc/src/snippets/modelview-subclasses/window.h b/doc/src/snippets/modelview-subclasses/window.h
new file mode 100644
index 0000000..b4cead0
--- /dev/null
+++ b/doc/src/snippets/modelview-subclasses/window.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+#include <QString>
+#include <QWidget>
+
+#include "model.h"
+#include "view.h"
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow::MainWindow(QWidget *parent = 0);
+
+public slots:
+ void selectOpenFile();
+
+private:
+ void setupModelView();
+ void openFile(const QString &fileName);
+
+ LinearModel *model;
+ LinearView *view;
+};
+
+#endif
diff --git a/doc/src/snippets/myscrollarea.cpp b/doc/src/snippets/myscrollarea.cpp
new file mode 100644
index 0000000..6cb1233
--- /dev/null
+++ b/doc/src/snippets/myscrollarea.cpp
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class MyScrollArea : public QAbstractScrollArea
+{
+public:
+ MyScrollArea(QWidget *w);
+ void setWidget(QWidget *w);
+
+protected:
+ void scrollContentsBy(int dx, int dy);
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ void updateWidgetPosition();
+ void updateArea();
+
+ QWidget *widget;
+};
+
+MyScrollArea::MyScrollArea(QWidget *widget)
+ : QAbstractScrollArea()
+{
+ setWidget(widget);
+}
+
+void MyScrollArea::setWidget(QWidget *w)
+{
+ widget = w;
+ widget->setParent(viewport());
+ if (!widget->testAttribute(Qt::WA_Resized))
+ widget->resize(widget->sizeHint());
+
+ verticalScrollBar()->setValue(0);
+ verticalScrollBar()->setValue(0);
+
+ updateArea();
+}
+
+void MyScrollArea::updateWidgetPosition()
+{
+//! [0]
+ int hvalue = horizontalScrollBar()->value();
+ int vvalue = verticalScrollBar()->value();
+ QPoint topLeft = viewport()->rect().topLeft();
+
+ widget->move(topLeft.x() - hvalue, topLeft.y() - vvalue);
+//! [0]
+}
+
+void MyScrollArea::scrollContentsBy(int /*dx*/, int /*dy*/)
+{
+ updateWidgetPosition();
+}
+
+void MyScrollArea::updateArea()
+{
+//! [1]
+ QSize areaSize = viewport()->size();
+ QSize widgetSize = widget->size();
+
+ verticalScrollBar()->setPageStep(widgetSize.height());
+ horizontalScrollBar()->setPageStep(widgetSize.width());
+ verticalScrollBar()->setRange(0, widgetSize.height() - areaSize.height());
+ horizontalScrollBar()->setRange(0, widgetSize.width() - areaSize.width());
+ updateWidgetPosition();
+//! [1]
+}
+
+void MyScrollArea::resizeEvent(QResizeEvent *event)
+{
+ updateArea();
+}
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QPixmap pixmap("mypixmap.png");
+ QLabel label;
+ label.setPixmap(pixmap);
+ MyScrollArea area(&label);
+ area.resize(300, 300);
+ area.show();
+
+ area.setWidget(&label);
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/network/tcpwait.cpp b/doc/src/snippets/network/tcpwait.cpp
new file mode 100644
index 0000000..fa18d23
--- /dev/null
+++ b/doc/src/snippets/network/tcpwait.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QTcpSocket>
+
+#include "server.h"
+
+int main(int argv, char **args)
+{
+ QCoreApplication app(argv, args);
+
+ QTcpSocket socket;
+ socket.connectToHost("localhost", 1025);
+
+//! [0]
+ int numRead = 0, numReadTotal = 0;
+ char buffer[50];
+
+ forever {
+ numRead = socket.read(buffer, 50);
+
+ // do whatever with array
+
+ numReadTotal += numRead;
+ if (numRead == 0 && !socket.waitForReadyRead())
+ break;
+ }
+//! [0]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/ntfsp.cpp b/doc/src/snippets/ntfsp.cpp
new file mode 100644
index 0000000..ad5dc48
--- /dev/null
+++ b/doc/src/snippets/ntfsp.cpp
@@ -0,0 +1,11 @@
+
+
+//! [0]
+extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
+//! [0]
+
+//! [1]
+qt_ntfs_permission_lookup++; // turn checking on
+qt_ntfs_permission_lookup--; // turn it off again
+//! [1]
+
diff --git a/doc/src/snippets/painterpath/painterpath.cpp b/doc/src/snippets/painterpath/painterpath.cpp
new file mode 100644
index 0000000..ad4f623
--- /dev/null
+++ b/doc/src/snippets/painterpath/painterpath.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QImage image(100, 100, QImage::Format_RGB32);
+
+ QPainterPath path;
+ path.addRect(20, 20, 60, 60);
+
+ path.moveTo(0, 0);
+ path.cubicTo(99, 0, 50, 50, 99, 99);
+ path.cubicTo(0, 99, 50, 50, 0, 0);
+
+ QPainter painter(&image);
+ painter.fillRect(0, 0, 100, 100, Qt::white);
+
+ painter.save();
+ painter.translate(0.5, 0.5);
+ painter.setPen(QPen(QColor(79, 106, 25), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
+ painter.setBrush(QColor(122, 163, 39));
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ painter.drawPath(path);
+
+ painter.restore();
+ painter.end();
+
+ QLabel lab;
+ lab.setPixmap(QPixmap::fromImage(image));
+ lab.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/painterpath/painterpath.pro b/doc/src/snippets/painterpath/painterpath.pro
new file mode 100644
index 0000000..0a6ad46
--- /dev/null
+++ b/doc/src/snippets/painterpath/painterpath.pro
@@ -0,0 +1 @@
+SOURCES += painterpath.cpp
diff --git a/doc/src/snippets/patternist/anyHTMLElement.xq b/doc/src/snippets/patternist/anyHTMLElement.xq
new file mode 100644
index 0000000..9f5ee12
--- /dev/null
+++ b/doc/src/snippets/patternist/anyHTMLElement.xq
@@ -0,0 +1 @@
+doc('data.xml')/*:body
diff --git a/doc/src/snippets/patternist/anyXLinkAttribute.xq b/doc/src/snippets/patternist/anyXLinkAttribute.xq
new file mode 100644
index 0000000..059bcc0
--- /dev/null
+++ b/doc/src/snippets/patternist/anyXLinkAttribute.xq
@@ -0,0 +1,2 @@
+declare namespace xlink = "http://www.w3.org/1999/xlink";
+doc('image.svg')//@xlink:*
diff --git a/doc/src/snippets/patternist/bracesIncluded.xq b/doc/src/snippets/patternist/bracesIncluded.xq
new file mode 100644
index 0000000..3961c28
--- /dev/null
+++ b/doc/src/snippets/patternist/bracesIncluded.xq
@@ -0,0 +1 @@
+<e>{sum((1, 2, 3))}</e>
diff --git a/doc/src/snippets/patternist/bracesIncludedResult.xml b/doc/src/snippets/patternist/bracesIncludedResult.xml
new file mode 100644
index 0000000..0004c71
--- /dev/null
+++ b/doc/src/snippets/patternist/bracesIncludedResult.xml
@@ -0,0 +1 @@
+<e>6</e>
diff --git a/doc/src/snippets/patternist/bracesOmitted.xq b/doc/src/snippets/patternist/bracesOmitted.xq
new file mode 100644
index 0000000..ffbadd0
--- /dev/null
+++ b/doc/src/snippets/patternist/bracesOmitted.xq
@@ -0,0 +1 @@
+<e>sum({(1, 2, 3)})</e>
diff --git a/doc/src/snippets/patternist/bracesOmittedResult.xml b/doc/src/snippets/patternist/bracesOmittedResult.xml
new file mode 100644
index 0000000..744fb8f
--- /dev/null
+++ b/doc/src/snippets/patternist/bracesOmittedResult.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<e>sum(1 2 3)</e> \ No newline at end of file
diff --git a/doc/src/snippets/patternist/computedTreeFragment.xq b/doc/src/snippets/patternist/computedTreeFragment.xq
new file mode 100644
index 0000000..c5b93ad
--- /dev/null
+++ b/doc/src/snippets/patternist/computedTreeFragment.xq
@@ -0,0 +1,14 @@
+declare default element namespace "http://example.com/Namespace";
+declare variable $documentElementName := "doc";
+
+element {$documentElementName}
+{
+ attribute xml:base {"http://example.com/"},
+ element anotherElement
+ {
+ comment {" a comment "},
+ processing-instruction target {"data"},
+ element anotherElement {()},
+ text {"some text"}
+ }
+}
diff --git a/doc/src/snippets/patternist/copyAttribute.xq b/doc/src/snippets/patternist/copyAttribute.xq
new file mode 100644
index 0000000..40e4494
--- /dev/null
+++ b/doc/src/snippets/patternist/copyAttribute.xq
@@ -0,0 +1,9 @@
+<html>
+ <body>
+ <p>
+ {
+ doc('feed.rss')/rss/@version
+ }
+ </p>
+ </body>
+</html>
diff --git a/doc/src/snippets/patternist/copyID.xq b/doc/src/snippets/patternist/copyID.xq
new file mode 100644
index 0000000..2409caf
--- /dev/null
+++ b/doc/src/snippets/patternist/copyID.xq
@@ -0,0 +1,3 @@
+(: Copy the value of xml:id attribute from other.html. This is a comment by the way! :)
+<html xmlns="http://www.w3.org/1999/xhtml/"
+ xml:id="{doc("other.html")/html/@xml:id}"/>
diff --git a/doc/src/snippets/patternist/directTreeFragment.xq b/doc/src/snippets/patternist/directTreeFragment.xq
new file mode 100644
index 0000000..96bc963
--- /dev/null
+++ b/doc/src/snippets/patternist/directTreeFragment.xq
@@ -0,0 +1,7 @@
+<doc xmlns="http://example.com/Namespace" xml:base="http://example.com/">
+
+ <!-- a comment -->
+ <?target data?>
+ <anotherElement/>
+ some text
+</doc>
diff --git a/doc/src/snippets/patternist/doc.txt b/doc/src/snippets/patternist/doc.txt
new file mode 100644
index 0000000..d30b057
--- /dev/null
+++ b/doc/src/snippets/patternist/doc.txt
@@ -0,0 +1,35 @@
+<doc>
+ <p>
+ <span>1</span>
+ <span>2</span>
+ </p>
+ <p>
+ <span>3</span>
+ <span>4</span>
+ </p>
+ <p>
+ <span>5</span>
+ <span>6</span>
+ </p>
+ <p>
+ <span>7</span>
+ <span>8</span>
+ </p>
+ <p>
+ <span>9</span>
+ <span>a</span>
+ </p>
+ <p>
+ <span>b</span>
+ <span>c</span>
+ </p>
+ <p>
+ <span>d</span>
+ <span>e</span>
+ </p>
+ <p>
+ <span>f</span>
+ <span>0</span>
+ </p>
+</doc>
+
diff --git a/doc/src/snippets/patternist/docPlainHTML.xq b/doc/src/snippets/patternist/docPlainHTML.xq
new file mode 100644
index 0000000..622bec8
--- /dev/null
+++ b/doc/src/snippets/patternist/docPlainHTML.xq
@@ -0,0 +1 @@
+doc("myPlainHTML.html")/body
diff --git a/doc/src/snippets/patternist/docPlainHTML2.xq b/doc/src/snippets/patternist/docPlainHTML2.xq
new file mode 100644
index 0000000..5e7fbae
--- /dev/null
+++ b/doc/src/snippets/patternist/docPlainHTML2.xq
@@ -0,0 +1 @@
+doc("myPlainHTML.html")/html/body
diff --git a/doc/src/snippets/patternist/embedDataInXHTML.xq b/doc/src/snippets/patternist/embedDataInXHTML.xq
new file mode 100644
index 0000000..b513922
--- /dev/null
+++ b/doc/src/snippets/patternist/embedDataInXHTML.xq
@@ -0,0 +1,10 @@
+declare default element namespace "http://www.w3.org/1999/xhtml";
+<html>
+ <body>
+ {
+ for $i in doc("testResult.xml")/tests/test[@status = "failure"]
+ order by $i/@name
+ return <p>{$i/@name}</p>
+ }
+ </body>
+</html>
diff --git a/doc/src/snippets/patternist/embedDataInXHTML2.xq b/doc/src/snippets/patternist/embedDataInXHTML2.xq
new file mode 100644
index 0000000..754ddba
--- /dev/null
+++ b/doc/src/snippets/patternist/embedDataInXHTML2.xq
@@ -0,0 +1,10 @@
+declare namespace x = "http://www.w3.org/1998/xhtml";
+<x:html>
+ <x:body>
+ {
+ for $i in doc("testResult.xml")/tests/test[@status = "failure"]
+ order by $i/@name
+ return <x:p>{$i/@name}</x:p>
+ }
+ </x:body>
+</x:html>
diff --git a/doc/src/snippets/patternist/emptyParagraphs.xq b/doc/src/snippets/patternist/emptyParagraphs.xq
new file mode 100644
index 0000000..6024d28
--- /dev/null
+++ b/doc/src/snippets/patternist/emptyParagraphs.xq
@@ -0,0 +1 @@
+doc('index.html')//p[string-length(.) = 0]
diff --git a/doc/src/snippets/patternist/escapeCurlyBraces.xq b/doc/src/snippets/patternist/escapeCurlyBraces.xq
new file mode 100644
index 0000000..669e7c1
--- /dev/null
+++ b/doc/src/snippets/patternist/escapeCurlyBraces.xq
@@ -0,0 +1,4 @@
+<doc>
+ This is one left followed by one right curly brace: {{ }}
+ Here they are again, but with character references: &#x7B; &#x7D;
+</doc>
diff --git a/doc/src/snippets/patternist/escapeStringLiterals.xml b/doc/src/snippets/patternist/escapeStringLiterals.xml
new file mode 100644
index 0000000..425ccb0
--- /dev/null
+++ b/doc/src/snippets/patternist/escapeStringLiterals.xml
@@ -0,0 +1,2 @@
+<p>"I hate quotations" -- Ralph Waldo Emerson"
+ '"I hate quotations"" -- Ralph Waldo Emerson"', appeared above</p> \ No newline at end of file
diff --git a/doc/src/snippets/patternist/escapeStringLiterals.xq b/doc/src/snippets/patternist/escapeStringLiterals.xq
new file mode 100644
index 0000000..4a6054b
--- /dev/null
+++ b/doc/src/snippets/patternist/escapeStringLiterals.xq
@@ -0,0 +1,7 @@
+<p>
+{
+ """I hate quotations"" -- Ralph Waldo Emerson""",
+ "&#xA;",
+ '''"I hate quotations"" -- Ralph Waldo Emerson"'', appeared above'
+}
+</p>
diff --git a/doc/src/snippets/patternist/expressionInsideAttribute.xq b/doc/src/snippets/patternist/expressionInsideAttribute.xq
new file mode 100644
index 0000000..97f46b1
--- /dev/null
+++ b/doc/src/snippets/patternist/expressionInsideAttribute.xq
@@ -0,0 +1,2 @@
+declare variable $additionalClass := "example";
+<p class="important {$additionalClass} obsolete"/>
diff --git a/doc/src/snippets/patternist/filterOnPath.xq b/doc/src/snippets/patternist/filterOnPath.xq
new file mode 100644
index 0000000..d23dfe8
--- /dev/null
+++ b/doc/src/snippets/patternist/filterOnPath.xq
@@ -0,0 +1,2 @@
+let $doc := doc('doc.txt')
+return ($doc/doc/p/span)[1]
diff --git a/doc/src/snippets/patternist/filterOnStep.xq b/doc/src/snippets/patternist/filterOnStep.xq
new file mode 100644
index 0000000..46b77fa
--- /dev/null
+++ b/doc/src/snippets/patternist/filterOnStep.xq
@@ -0,0 +1,2 @@
+let $doc := doc('doc.txt')
+return $doc/doc/p/span[1] \ No newline at end of file
diff --git a/doc/src/snippets/patternist/firstParagraph.xq b/doc/src/snippets/patternist/firstParagraph.xq
new file mode 100644
index 0000000..db5e2c7
--- /dev/null
+++ b/doc/src/snippets/patternist/firstParagraph.xq
@@ -0,0 +1 @@
+doc("index.html")/html/body/p[@xml:id = "thatSpecialOne"]
diff --git a/doc/src/snippets/patternist/fnStringOnAttribute.xq b/doc/src/snippets/patternist/fnStringOnAttribute.xq
new file mode 100644
index 0000000..b26e9f2
--- /dev/null
+++ b/doc/src/snippets/patternist/fnStringOnAttribute.xq
@@ -0,0 +1,9 @@
+<html>
+ <body>
+ <p>
+ {
+ string(doc('feed.rss')/rss/@version)
+ }
+ </p>
+ </body>
+</html>
diff --git a/doc/src/snippets/patternist/forClause.xq b/doc/src/snippets/patternist/forClause.xq
new file mode 100644
index 0000000..a412dca
--- /dev/null
+++ b/doc/src/snippets/patternist/forClause.xq
@@ -0,0 +1,3 @@
+for $i in(reverse(1 to 10)),
+ $d in xs:integer(doc("numbers.xml")/numbers/number)
+return ($i + $d)
diff --git a/doc/src/snippets/patternist/forClause2.xq b/doc/src/snippets/patternist/forClause2.xq
new file mode 100644
index 0000000..4fa505d
--- /dev/null
+++ b/doc/src/snippets/patternist/forClause2.xq
@@ -0,0 +1,3 @@
+for $i in(reverse(1 to 10)),
+ $d in xs:integer(doc("numbers.xml")/numbers/number)
+return $i + $d
diff --git a/doc/src/snippets/patternist/forClauseOnFeed.xq b/doc/src/snippets/patternist/forClauseOnFeed.xq
new file mode 100644
index 0000000..9ec3339
--- /dev/null
+++ b/doc/src/snippets/patternist/forClauseOnFeed.xq
@@ -0,0 +1,6 @@
+for $item in doc('feed.rss')//item
+return <p>
+ {
+ $item/description/node()
+ }
+ </p>
diff --git a/doc/src/snippets/patternist/indented.xml b/doc/src/snippets/patternist/indented.xml
new file mode 100644
index 0000000..a312c63
--- /dev/null
+++ b/doc/src/snippets/patternist/indented.xml
@@ -0,0 +1,5 @@
+<a>
+ <b/>
+ <c/>
+ <p>Some Text</p>
+</a>
diff --git a/doc/src/snippets/patternist/introAcneRemover.xq b/doc/src/snippets/patternist/introAcneRemover.xq
new file mode 100644
index 0000000..4e6ee80
--- /dev/null
+++ b/doc/src/snippets/patternist/introAcneRemover.xq
@@ -0,0 +1,8 @@
+<result>
+ <para>The following skin care products have shipped, ordered by shipping date(oldest first):</para>
+ {
+ for $i in doc("myOrders.xml")/orders/order[@product = "Acme Skin Care"]
+ order by xs:date($i/@shippingDate) descending
+ return $i
+ }
+</result>
diff --git a/doc/src/snippets/patternist/introExample2.xq b/doc/src/snippets/patternist/introExample2.xq
new file mode 100644
index 0000000..411cc17
--- /dev/null
+++ b/doc/src/snippets/patternist/introExample2.xq
@@ -0,0 +1,5 @@
+<bibliography>
+{
+ doc($file)/bib/book[publisher = $publisher and @year > $year]/<book year="{@year}">{title}</book>
+}
+</bibliography>
diff --git a/doc/src/snippets/patternist/introFileHierarchy.xml b/doc/src/snippets/patternist/introFileHierarchy.xml
new file mode 100644
index 0000000..cfa6151
--- /dev/null
+++ b/doc/src/snippets/patternist/introFileHierarchy.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<directory name="home">
+
+ <file name="myNote.txt" mimetype="text/plain" size="8" extension="txt" uri="file:///home/frans/myNote.txt">
+ <content asBase64Binary="TXkgTm90ZSE=" asStringFromUTF-8="My Note!"/>
+ </file>
+
+ <directory name="src">
+ ...
+ </directory>
+
+ ...
+
+</directory>
diff --git a/doc/src/snippets/patternist/introNavigateFS.xq b/doc/src/snippets/patternist/introNavigateFS.xq
new file mode 100644
index 0000000..1f5a3a7
--- /dev/null
+++ b/doc/src/snippets/patternist/introNavigateFS.xq
@@ -0,0 +1,12 @@
+declare variable $myRoot := <e/>; (: This line is a dummy and shouldn't appear in the documentation. :)
+<html>
+ <body>
+ {
+ $myRoot//file[@mimetype = 'text/xml' or @mimetype = 'application/xml']
+ /
+ (if(doc-available(@uri))
+ then ()
+ else <p>Failed to parse file {@uri}.</p>)
+ }
+ </body>
+</html>
diff --git a/doc/src/snippets/patternist/introductionExample.xq b/doc/src/snippets/patternist/introductionExample.xq
new file mode 100644
index 0000000..1a309dd
--- /dev/null
+++ b/doc/src/snippets/patternist/introductionExample.xq
@@ -0,0 +1,3 @@
+<bibliography>
+{doc("library.xml")/bib/book[publisher="Addison-Wesley" and @year>1991]/<book year="{@year}">{title}</book>}
+</bibliography>
diff --git a/doc/src/snippets/patternist/invalidLetOrderBy.xq b/doc/src/snippets/patternist/invalidLetOrderBy.xq
new file mode 100644
index 0000000..d65f240
--- /dev/null
+++ b/doc/src/snippets/patternist/invalidLetOrderBy.xq
@@ -0,0 +1,3 @@
+let $i := (2, 3, 1)
+order by $i[1]
+return $i
diff --git a/doc/src/snippets/patternist/items.xq b/doc/src/snippets/patternist/items.xq
new file mode 100644
index 0000000..0b46ec1
--- /dev/null
+++ b/doc/src/snippets/patternist/items.xq
@@ -0,0 +1,5 @@
+<aNode/>,
+xs:base64Binary("FFFF"),
+current-date(),
+3e3, (: A floating point value :)
+attribute {"name"} {()}
diff --git a/doc/src/snippets/patternist/letOrderBy.xq b/doc/src/snippets/patternist/letOrderBy.xq
new file mode 100644
index 0000000..f4106d2
--- /dev/null
+++ b/doc/src/snippets/patternist/letOrderBy.xq
@@ -0,0 +1,4 @@
+for $a in (8, -4, 2)
+let $b := ($a * -1, $a)
+order by $a
+return $b
diff --git a/doc/src/snippets/patternist/literalsAndOperators.xq b/doc/src/snippets/patternist/literalsAndOperators.xq
new file mode 100644
index 0000000..ec4af33
--- /dev/null
+++ b/doc/src/snippets/patternist/literalsAndOperators.xq
@@ -0,0 +1,2 @@
+declare variable $date := fn:current-date(); (: This line should not be part of the example. It exists in order to make the query valid. :)
+fn:current-date() - $date > xs:dayTimeDuration("P365D")
diff --git a/doc/src/snippets/patternist/mobeyDick.xml b/doc/src/snippets/patternist/mobeyDick.xml
new file mode 100644
index 0000000..32d0b6c
--- /dev/null
+++ b/doc/src/snippets/patternist/mobeyDick.xml
@@ -0,0 +1,4 @@
+<book xmlns:dc='http://purl.org/dc/elements/1.1'
+ xmlns='http://example.com/MyDefault'>
+ <dc:title>Mobey Dick</dc:title> ...
+</book>
diff --git a/doc/src/snippets/patternist/nextLastParagraph.xq b/doc/src/snippets/patternist/nextLastParagraph.xq
new file mode 100644
index 0000000..9424f79
--- /dev/null
+++ b/doc/src/snippets/patternist/nextLastParagraph.xq
@@ -0,0 +1 @@
+doc('index.html')//p[last() - 1]
diff --git a/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq b/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq
new file mode 100644
index 0000000..ce36e84
--- /dev/null
+++ b/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq
@@ -0,0 +1,4 @@
+let $docURI := 'maybeNotWellformed.xml'
+return if(doc-available($docURI))
+ then doc($docURI)//p/<para>{./node()}</para>
+ else <para>Failed to load {$docURI}</para>
diff --git a/doc/src/snippets/patternist/nodeConstructorsInPaths.xq b/doc/src/snippets/patternist/nodeConstructorsInPaths.xq
new file mode 100644
index 0000000..beb294f
--- /dev/null
+++ b/doc/src/snippets/patternist/nodeConstructorsInPaths.xq
@@ -0,0 +1 @@
+doc('feed.rss')//item/<p>{description/node()}</p>
diff --git a/doc/src/snippets/patternist/nodeTestChildElement.xq b/doc/src/snippets/patternist/nodeTestChildElement.xq
new file mode 100644
index 0000000..7aa7b34
--- /dev/null
+++ b/doc/src/snippets/patternist/nodeTestChildElement.xq
@@ -0,0 +1 @@
+doc('index.html')/descendant-or-self::element(p)/child::element(span)
diff --git a/doc/src/snippets/patternist/notIndented.xml b/doc/src/snippets/patternist/notIndented.xml
new file mode 100644
index 0000000..b3321f2
--- /dev/null
+++ b/doc/src/snippets/patternist/notIndented.xml
@@ -0,0 +1 @@
+<a><b/><c/><p>Some Text</p></a>
diff --git a/doc/src/snippets/patternist/oneElementConstructor.xq b/doc/src/snippets/patternist/oneElementConstructor.xq
new file mode 100644
index 0000000..b7eb615
--- /dev/null
+++ b/doc/src/snippets/patternist/oneElementConstructor.xq
@@ -0,0 +1 @@
+<myElement/>
diff --git a/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq b/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq
new file mode 100644
index 0000000..16438d1
--- /dev/null
+++ b/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq
@@ -0,0 +1 @@
+doc('index.html')//p[position() > 5]
diff --git a/doc/src/snippets/patternist/paragraphsWithTables.xq b/doc/src/snippets/patternist/paragraphsWithTables.xq
new file mode 100644
index 0000000..dbb9fcf
--- /dev/null
+++ b/doc/src/snippets/patternist/paragraphsWithTables.xq
@@ -0,0 +1 @@
+doc('index.html')/html/body/p[table]
diff --git a/doc/src/snippets/patternist/pathAB.xq b/doc/src/snippets/patternist/pathAB.xq
new file mode 100644
index 0000000..26fd1e5
--- /dev/null
+++ b/doc/src/snippets/patternist/pathAB.xq
@@ -0,0 +1 @@
+doc('index.html')//p/span
diff --git a/doc/src/snippets/patternist/pathsAllParagraphs.xq b/doc/src/snippets/patternist/pathsAllParagraphs.xq
new file mode 100644
index 0000000..ba47900
--- /dev/null
+++ b/doc/src/snippets/patternist/pathsAllParagraphs.xq
@@ -0,0 +1 @@
+doc('index.html')//p
diff --git a/doc/src/snippets/patternist/simpleHTML.xq b/doc/src/snippets/patternist/simpleHTML.xq
new file mode 100644
index 0000000..93ac31e
--- /dev/null
+++ b/doc/src/snippets/patternist/simpleHTML.xq
@@ -0,0 +1 @@
+doc("index.html")/html/body/p[@class="example"]
diff --git a/doc/src/snippets/patternist/simpleXHTML.xq b/doc/src/snippets/patternist/simpleXHTML.xq
new file mode 100644
index 0000000..fda5371
--- /dev/null
+++ b/doc/src/snippets/patternist/simpleXHTML.xq
@@ -0,0 +1,2 @@
+declare namespace x = "http://www.w3.org/1999/xhtml/";
+doc("index.html")/x:html/x:body/x:p[@class="example"]
diff --git a/doc/src/snippets/patternist/svgDocumentElement.xml b/doc/src/snippets/patternist/svgDocumentElement.xml
new file mode 100644
index 0000000..0c7be4e
--- /dev/null
+++ b/doc/src/snippets/patternist/svgDocumentElement.xml
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"/>
diff --git a/doc/src/snippets/patternist/tablesInParagraphs.xq b/doc/src/snippets/patternist/tablesInParagraphs.xq
new file mode 100644
index 0000000..fc92cf0
--- /dev/null
+++ b/doc/src/snippets/patternist/tablesInParagraphs.xq
@@ -0,0 +1 @@
+doc('index.html')/html/body/p/table
diff --git a/doc/src/snippets/patternist/twoSVGElements.xq b/doc/src/snippets/patternist/twoSVGElements.xq
new file mode 100644
index 0000000..ab4fe35
--- /dev/null
+++ b/doc/src/snippets/patternist/twoSVGElements.xq
@@ -0,0 +1,5 @@
+declare namespace s = "http://www.w3.org/2000/svg";
+declare default element namespace "http://www.w3.org/2000/svg";
+let $doc := doc('image.svg')
+return ($doc/svg,
+ $doc/s:svg)
diff --git a/doc/src/snippets/patternist/xmlStylesheet.xq b/doc/src/snippets/patternist/xmlStylesheet.xq
new file mode 100644
index 0000000..9e02208
--- /dev/null
+++ b/doc/src/snippets/patternist/xmlStylesheet.xq
@@ -0,0 +1 @@
+<?xml-stylesheet type="test/xsl" href="formatter.xsl"?>
diff --git a/doc/src/snippets/patternist/xsBooleanTrue.xq b/doc/src/snippets/patternist/xsBooleanTrue.xq
new file mode 100644
index 0000000..897a99e
--- /dev/null
+++ b/doc/src/snippets/patternist/xsBooleanTrue.xq
@@ -0,0 +1 @@
+xs:boolean("true")
diff --git a/doc/src/snippets/patternist/xsvgDocumentElement.xml b/doc/src/snippets/patternist/xsvgDocumentElement.xml
new file mode 100644
index 0000000..fb6a236
--- /dev/null
+++ b/doc/src/snippets/patternist/xsvgDocumentElement.xml
@@ -0,0 +1 @@
+<x:svg xmlns:x="http://www.w3.org/2000/svg"/>
diff --git a/doc/src/snippets/persistentindexes/main.cpp b/doc/src/snippets/persistentindexes/main.cpp
new file mode 100644
index 0000000..eeca8ac
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/persistentindexes/mainwindow.cpp b/doc/src/snippets/persistentindexes/mainwindow.cpp
new file mode 100644
index 0000000..594881a
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/mainwindow.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "model.h"
+
+/*!
+ The main window constructor creates and populates a model with values
+ from a string list then displays the contents of the model using a
+ QListView widget.
+*/
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ insertAction = itemsMenu->addAction(tr("&Insert Item"));
+ removeAction = itemsMenu->addAction(tr("&Remove Item"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+ QStringList numbers;
+ numbers << tr("One") << tr("Two") << tr("Three") << tr("Four") << tr("Five")
+ << tr("Six") << tr("Seven") << tr("Eight") << tr("Nine") << tr("Ten");
+
+ model = new StringListModel(numbers);
+ QListView *view = new QListView(this);
+ view->setModel(model);
+
+ selectionModel = view->selectionModel();
+
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(insertAction, SIGNAL(triggered()), this, SLOT(insertItem()));
+ connect(removeAction, SIGNAL(triggered()), this, SLOT(removeItem()));
+ connect(selectionModel,
+ SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(updateMenus(const QModelIndex &)));
+
+ setCentralWidget(view);
+ setWindowTitle("View onto a string list model");
+}
+
+void MainWindow::insertItem()
+{
+ if (!selectionModel->currentIndex().isValid())
+ return;
+
+ QString itemText = QInputDialog::getText(this, tr("Insert Item"),
+ tr("Input text for the new item:"));
+
+ if (itemText.isNull())
+ return;
+
+ int row = selectionModel->currentIndex().row();
+
+ if (model->insertRows(row, 1))
+ model->setData(model->index(row, 0), itemText, Qt::EditRole);
+}
+
+void MainWindow::removeItem()
+{
+ if (!selectionModel->currentIndex().isValid())
+ return;
+
+ int row = selectionModel->currentIndex().row();
+
+ model->removeRows(row, 1);
+}
+
+void MainWindow::updateMenus(const QModelIndex &currentIndex)
+{
+ insertAction->setEnabled(currentIndex.isValid());
+ removeAction->setEnabled(currentIndex.isValid());
+}
diff --git a/doc/src/snippets/persistentindexes/mainwindow.h b/doc/src/snippets/persistentindexes/mainwindow.h
new file mode 100644
index 0000000..e0672d5
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/mainwindow.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+class QAbstractItemModel;
+class QAction;
+class QItemSelectionModel;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void insertItem();
+ void removeItem();
+ void updateMenus(const QModelIndex &currentIndex);
+
+private:
+ QAbstractItemModel *model;
+ QAction *insertAction;
+ QAction *removeAction;
+ QItemSelectionModel *selectionModel;
+};
+
+#endif
diff --git a/doc/src/snippets/persistentindexes/model.cpp b/doc/src/snippets/persistentindexes/model.cpp
new file mode 100644
index 0000000..7158f34
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/model.cpp
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include <qdebug.h>
+
+#include "model.h"
+
+/*!
+ Returns the number of items in the string list as the number of rows
+ in the model.
+*/
+
+int StringListModel::rowCount(const QModelIndex &parent) const
+{
+ return stringList.count();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ If a header is requested then we just return the column or row number,
+ depending on the orientation of the header.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() < 0 || index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant StringListModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags StringListModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the string list, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The index corresponds to an item to be shown in a view.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool StringListModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (index.isValid() && role == Qt::EditRole) {
+
+ stringList.replace(index.row(), value.toString());
+ emit dataChanged(index, index);
+ return true;
+ }
+ return false;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool StringListModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.insert(position, "");
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool StringListModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
diff --git a/doc/src/snippets/persistentindexes/model.h b/doc/src/snippets/persistentindexes/model.h
new file mode 100644
index 0000000..c787c36
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/model.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractListModel>
+#include <QObject>
+#include <QStringList>
+
+class StringListModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ StringListModel(const QStringList &strings, QObject *parent = 0)
+ : QAbstractListModel(parent), stringList(strings) {}
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
+
+private:
+ QStringList stringList;
+};
+
+#endif
diff --git a/doc/src/snippets/persistentindexes/persistentindexes.pro b/doc/src/snippets/persistentindexes/persistentindexes.pro
new file mode 100644
index 0000000..aaf41bd
--- /dev/null
+++ b/doc/src/snippets/persistentindexes/persistentindexes.pro
@@ -0,0 +1,5 @@
+HEADERS = mainwindow.h \
+ model.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ model.cpp
diff --git a/doc/src/snippets/phonon.cpp b/doc/src/snippets/phonon.cpp
new file mode 100644
index 0000000..e50eabd
--- /dev/null
+++ b/doc/src/snippets/phonon.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+Window::Window()
+{
+ {
+//![0]
+ Phonon::MediaObject *music =
+ Phonon::createPlayer(Phonon::MusicCategory,
+ Phonon::MediaSource("/path/mysong.wav"));
+ music->play();
+//![0]
+ }
+
+ {
+ QWidget *parentWidget = new QWidget;
+ QUrl url("Myfancymusic");
+//![1]
+ Phonon::VideoPlayer *player =
+ new Phonon::VideoPlayer(Phonon::VideoCategory, parentWidget);
+ player->play(url);
+//![1]
+ }
+
+ {
+//![2]
+ Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
+ mediaObject->setCurrentSource(Phonon::MediaSource("/mymusic/barbiegirl.wav"));
+ Phonon::AudioOutput *audioOutput =
+ new Phonon::AudioOutput(Phonon::MusicCategory, this);
+ Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
+//![2]
+
+//![3]
+ Phonon::Effect *effect =
+ new Phonon::Effect(
+ Phonon::BackendCapabilities::availableAudioEffects()[0], this);
+ path.insertEffect(effect);
+//![3]
+ }
+
+ {
+//![4]
+ Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
+
+ Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
+ Phonon::createPath(mediaObject, videoWidget);
+
+ Phonon::AudioOutput *audioOutput =
+ new Phonon::AudioOutput(Phonon::VideoCategory, this);
+ Phonon::createPath(mediaObject, audioOutput);
+//![4]
+//![5]
+ mediaObject->play();
+//![5]
+ }
+}
diff --git a/doc/src/snippets/phonon/samplebackend/main.cpp b/doc/src/snippets/phonon/samplebackend/main.cpp
new file mode 100644
index 0000000..724ef5c
--- /dev/null
+++ b/doc/src/snippets/phonon/samplebackend/main.cpp
@@ -0,0 +1,115 @@
+//! [snippet]
+QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
+{
+ switch (c) {
+ case MediaObjectClass:
+ return new MediaObject(parent);
+ case VolumeFaderEffectClass:
+ return new VolumeFaderEffect(parent);
+ case AudioOutputClass:
+ return new AudioOutput(parent);
+ case AudioDataOutputClass:
+ return new AudioDataOutput(parent);
+ case VisualizationClass:
+ return new Visualization(parent);
+ case VideoDataOutputClass:
+ return new VideoDataOutput(parent);
+ case EffectClass:
+ return new Effect(args[0].toInt(), parent);
+ case VideoWidgetClass:
+ return new VideoWidget(qobject_cast<QWidget *>(parent));
+ }
+ return 0;
+}
+
+QSet<int> Backend::objectDescriptionIndexes(ObjectDescriptionType type) const
+{
+ QSet<int> set;
+ switch(type)
+ {
+ case Phonon::AudioOutputDeviceType:
+ // use AudioDeviceEnumerator to list ALSA and OSS devices
+ set << 10000 << 10001;
+ break;
+ case Phonon::AudioCaptureDeviceType:
+ set << 20000 << 20001;
+ break;
+ case Phonon::VideoOutputDeviceType:
+ break;
+ case Phonon::VideoCaptureDeviceType:
+ set << 30000 << 30001;
+ break;
+ case Phonon::VisualizationType:
+ case Phonon::AudioCodecType:
+ case Phonon::VideoCodecType:
+ case Phonon::ContainerFormatType:
+ break;
+ case Phonon::EffectType:
+ set << 0x7F000001;
+ break;
+ }
+ return set;
+}
+
+QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(ObjectDescriptionType type, int index) const
+{
+ QHash<QByteArray, QVariant> ret;
+ switch (type) {
+ case Phonon::AudioOutputDeviceType:
+ switch (index) {
+ case 10000:
+ ret.insert("name", QLatin1String("internal Soundcard"));
+ break;
+ case 10001:
+ ret.insert("name", QLatin1String("USB Headset"));
+ ret.insert("icon", KIcon("usb-headset"));
+ ret.insert("available", false);
+ break;
+ }
+ break;
+ case Phonon::AudioCaptureDeviceType:
+ switch (index) {
+ case 20000:
+ ret.insert("name", QLatin1String("Soundcard"));
+ ret.insert("description", QLatin1String("first description"));
+ break;
+ case 20001:
+ ret.insert("name", QLatin1String("DV"));
+ ret.insert("description", QLatin1String("second description"));
+ break;
+ }
+ break;
+ case Phonon::VideoOutputDeviceType:
+ break;
+ case Phonon::VideoCaptureDeviceType:
+ switch (index) {
+ case 30000:
+ ret.insert("name", QLatin1String("USB Webcam"));
+ ret.insert("description", QLatin1String("first description"));
+ break;
+ case 30001:
+ ret.insert("name", QLatin1String("DV"));
+ ret.insert("description", QLatin1String("second description"));
+ break;
+ }
+ break;
+ case Phonon::VisualizationType:
+ break;
+ case Phonon::AudioCodecType:
+ break;
+ case Phonon::VideoCodecType:
+ break;
+ case Phonon::ContainerFormatType:
+ break;
+ case Phonon::EffectType:
+ switch (index) {
+ case 0x7F000001:
+ ret.insert("name", QLatin1String("Delay"));
+ ret.insert("description", QLatin1String("Simple delay effect with time, feedback and level controls."));
+ break;
+ }
+ break;
+ }
+ return ret;
+}
+//! [snippet]
diff --git a/doc/src/snippets/phononeffectparameter.cpp b/doc/src/snippets/phononeffectparameter.cpp
new file mode 100644
index 0000000..e0351f5
--- /dev/null
+++ b/doc/src/snippets/phononeffectparameter.cpp
@@ -0,0 +1,35 @@
+#include <QtGui>
+
+#include <phonon/backendcapabilities.h>
+#include <phonon/phononnamespace.h>
+#include <phonon/effect.h>
+#include <phonon/effectparameter.h>
+#include <phonon/effectwidget.h>
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ app.setApplicationName("effectsnippets");
+
+ QList<Phonon::EffectDescription> effects =
+ Phonon::BackendCapabilities::availableAudioEffects();
+
+ Phonon::Effect *effect = new Phonon::Effect(effects.at(3));
+
+//![0]
+ QList<Phonon::EffectParameter> parameters = effect->parameters();
+
+ foreach(Phonon::EffectParameter parameter, parameters) {
+ // Do something with parameter
+ }
+//![0]
+
+//![1]
+ Phonon::EffectWidget *effectWidget = new Phonon::EffectWidget(effect);
+//![1]
+
+ effectWidget->show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/phononobjectdescription.cpp b/doc/src/snippets/phononobjectdescription.cpp
new file mode 100644
index 0000000..b9d1f29
--- /dev/null
+++ b/doc/src/snippets/phononobjectdescription.cpp
@@ -0,0 +1,40 @@
+#include <QtGui>
+
+#include <phonon/phononnamespace.h>
+#include <phonon/audiooutput.h>
+#include <phonon/seekslider.h>
+#include <phonon/mediaobject.h>
+#include <phonon/volumeslider.h>
+#include <phonon/backendcapabilities.h>
+#include <phonon/effect.h>
+#include <phonon/effectparameter.h>
+#include <phonon/objectdescriptionmodel.h>
+#include <QList>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![0]
+ QList<Phonon::EffectDescription> effectDescriptions =
+ Phonon::BackendCapabilities::availableAudioEffects();
+
+//![1]
+ QList<Phonon::AudioOutputDevice> audioOutputDevices =
+ Phonon::BackendCapabilities::availableAudioOutputDevices();
+
+//![1]
+ foreach (Phonon::EffectDescription effectDescription, effectDescriptions) {
+ Phonon::Effect *effect = new Phonon::Effect(effectDescription);
+
+ // ... Do something with the effect, like insert it into a media graph
+ }
+
+ Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput;
+
+ audioOutput->setOutputDevice(audioOutputDevices[0]);
+//![0]
+
+ return app.exec();
+
+}
diff --git a/doc/src/snippets/picture/picture.cpp b/doc/src/snippets/picture/picture.cpp
new file mode 100644
index 0000000..07cedbf
--- /dev/null
+++ b/doc/src/snippets/picture/picture.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+void myProcessing(const QString &)
+{
+}
+
+int main()
+{
+ QWidget myWidget;
+ {
+ // RECORD
+//! [0]
+ QPicture picture;
+ QPainter painter;
+ painter.begin(&picture); // paint in picture
+ painter.drawEllipse(10,20, 80,70); // draw an ellipse
+ painter.end(); // painting done
+ picture.save("drawing.pic"); // save picture
+//! [0]
+ }
+
+ {
+ // REPLAY
+//! [1]
+ QPicture picture;
+ picture.load("drawing.pic"); // load picture
+ QPainter painter;
+ painter.begin(&myWidget); // paint in myWidget
+ painter.drawPicture(0, 0, picture); // draw the picture at (0,0)
+ painter.end(); // painting done
+//! [1]
+ }
+
+ QPicture myPicture;
+ {
+ // FORMATS
+//! [2]
+ QStringList list = QPicture::inputFormatList();
+ foreach (QString string, list)
+ myProcessing(string);
+//! [2]
+ }
+
+ {
+ // OUTPUT
+//! [3]
+ QStringList list = QPicture::outputFormatList();
+ foreach (QString string, list)
+ myProcessing(string);
+//! [3]
+ }
+
+ {
+ // PIC READ
+//! [4]
+ QPictureIO iio;
+ QPixmap pixmap;
+ iio.setFileName("vegeburger.pic");
+ if (iio.read()) { // OK
+ QPicture picture = iio.picture();
+ QPainter painter(&pixmap);
+ painter.drawPicture(0, 0, picture);
+ }
+//! [4]
+ }
+
+ {
+ QPixmap pixmap;
+ // PIC WRITE
+//! [5]
+ QPictureIO iio;
+ QPicture picture;
+ QPainter painter(&picture);
+ painter.drawPixmap(0, 0, pixmap);
+ iio.setPicture(picture);
+ iio.setFileName("vegeburger.pic");
+ iio.setFormat("PIC");
+ if (iio.write())
+ return true; // returned true if written successfully
+//! [5]
+ }
+
+}
+
+// SVG READ
+//! [6]
+void readSVG(QPictureIO *picture)
+{
+ // read the picture using the picture->ioDevice()
+}
+//! [6]
+
+// SVG WRITE
+//! [7]
+void writeSVG(QPictureIO *picture)
+{
+ // write the picture using the picture->ioDevice()
+}
+//! [7]
+
+// USE SVG
+void foo() {
+
+//! [8]
+ // add the SVG picture handler
+ // ...
+//! [8]
+ QPictureIO::defineIOHandler("SVG", 0, 0, readSVG, writeSVG);
+ // ...
+
+}
diff --git a/doc/src/snippets/picture/picture.pro b/doc/src/snippets/picture/picture.pro
new file mode 100644
index 0000000..b46019f
--- /dev/null
+++ b/doc/src/snippets/picture/picture.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Sun Jun 26 15:25:59 2005
+######################################################################
+
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+SOURCES += picture.cpp
+OBJECTS_DIR=.obj/debug-shared
+MOC_DIR=.moc/debug-shared
+CONFIG += qt warn_on debug create_prl link_prl
diff --git a/doc/src/snippets/plaintextlayout/main.cpp b/doc/src/snippets/plaintextlayout/main.cpp
new file mode 100644
index 0000000..41713dd
--- /dev/null
+++ b/doc/src/snippets/plaintextlayout/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window *window = new Window;
+ window->resize(337, 343);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/plaintextlayout/plaintextlayout.pro b/doc/src/snippets/plaintextlayout/plaintextlayout.pro
new file mode 100644
index 0000000..6283406
--- /dev/null
+++ b/doc/src/snippets/plaintextlayout/plaintextlayout.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/plaintextlayout/window.cpp b/doc/src/snippets/plaintextlayout/window.cpp
new file mode 100644
index 0000000..0e91dc1
--- /dev/null
+++ b/doc/src/snippets/plaintextlayout/window.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <math.h>
+
+#include "window.h"
+
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ text = QString("Support for text rendering and layout in Qt 4 has been "
+ "redesigned around a system that allows textual content to "
+ "be represented in a more flexible way than was possible "
+ "with Qt 3. Qt 4 also provides a more convenient "
+ "programming interface for editing documents. These "
+ "improvements are made available through a reimplementation "
+ "of the existing text rendering engine, and the "
+ "introduction of several new classes. "
+ "See the relevant module overview for a detailed discussion "
+ "of this framework. The following sections provide a brief "
+ "overview of the main concepts behind Scribe.");
+
+ setWindowTitle(tr("Plain Text Layout"));
+}
+
+void Window::paintEvent(QPaintEvent *event)
+{
+//! [0]
+ QTextLayout textLayout(text, font);
+ qreal margin = 10;
+ qreal radius = qMin(width()/2.0, height()/2.0) - margin;
+ QFontMetrics fm(font);
+
+ qreal lineHeight = fm.height();
+ qreal y = 0;
+
+ textLayout.beginLayout();
+
+ while (1) {
+ // create a new line
+ QTextLine line = textLayout.createLine();
+ if (!line.isValid())
+ break;
+
+ qreal x1 = qMax(0.0, pow(pow(radius,2)-pow(radius-y,2), 0.5));
+ qreal x2 = qMax(0.0, pow(pow(radius,2)-pow(radius-(y+lineHeight),2), 0.5));
+ qreal x = qMax(x1, x2) + margin;
+ qreal lineWidth = (width() - margin) - x;
+
+ line.setLineWidth(lineWidth);
+ line.setPosition(QPointF(x, margin+y));
+ y += line.height();
+ }
+
+ textLayout.endLayout();
+
+ QPainter painter;
+ painter.begin(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillRect(rect(), Qt::white);
+ painter.setBrush(QBrush(Qt::black));
+ painter.setPen(QPen(Qt::black));
+ textLayout.draw(&painter, QPoint(0,0));
+
+ painter.setBrush(QBrush(QColor("#a6ce39")));
+ painter.setPen(QPen(Qt::black));
+ painter.drawEllipse(QRectF(-radius, margin, 2*radius, 2*radius));
+ painter.end();
+//! [0]
+}
diff --git a/doc/src/snippets/plaintextlayout/window.h b/doc/src/snippets/plaintextlayout/window.h
new file mode 100644
index 0000000..291250e
--- /dev/null
+++ b/doc/src/snippets/plaintextlayout/window.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QFont font;
+ QString text;
+};
+
+#endif
diff --git a/doc/src/snippets/pointer/pointer.cpp b/doc/src/snippets/pointer/pointer.cpp
new file mode 100644
index 0000000..1be5ef0
--- /dev/null
+++ b/doc/src/snippets/pointer/pointer.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QLabel>
+#include <QPointer>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QPointer<QLabel> label = new QLabel;
+ label->setText("&Status:");
+//! [0]
+
+//! [1]
+ if (label)
+//! [1] //! [2]
+ label->show();
+//! [2]
+ return 0;
+}
diff --git a/doc/src/snippets/polygon/polygon.cpp b/doc/src/snippets/polygon/polygon.cpp
new file mode 100644
index 0000000..b95ac37
--- /dev/null
+++ b/doc/src/snippets/polygon/polygon.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main()
+{
+ {
+ // STREAM
+//! [0]
+ QPolygon polygon;
+ polygon << QPoint(10, 20) << QPoint(20, 30);
+//! [0]
+ }
+
+ {
+ // STREAMF
+//! [1]
+ QPolygonF polygon;
+ polygon << QPointF(10.4, 20.5) << QPointF(20.2, 30.2);
+//! [1]
+ }
+
+ {
+ // SETPOINTS
+//! [2]
+ static const int points[] = { 10, 20, 30, 40 };
+ QPolygon polygon;
+ polygon.setPoints(2, points);
+//! [2]
+ }
+
+ {
+ // SETPOINTS2
+//! [3]
+ QPolygon polygon;
+ polygon.setPoints(2, 10, 20, 30, 40);
+//! [3]
+ }
+
+ {
+ // PUTPOINTS
+//! [4]
+ QPolygon polygon(1);
+ polygon[0] = QPoint(4, 5);
+ polygon.putPoints(1, 2, 6,7, 8,9);
+//! [4]
+ }
+
+ {
+ // PUTPOINTS2
+//! [5]
+ QPolygon polygon(3);
+ polygon.putPoints(0, 3, 4,5, 0,0, 8,9);
+ polygon.putPoints(1, 1, 6,7);
+//! [5]
+ }
+
+ {
+ // PUTPOINTS3
+//! [6]
+ QPolygon polygon1;
+ polygon1.putPoints(0, 3, 1,2, 0,0, 5,6);
+ // polygon1 is now the three-point polygon(1,2, 0,0, 5,6);
+
+ QPolygon polygon2;
+ polygon2.putPoints(0, 3, 4,4, 5,5, 6,6);
+ // polygon2 is now (4,4, 5,5, 6,6);
+
+ polygon1.putPoints(2, 3, polygon2);
+ // polygon1 is now the five-point polygon(1,2, 0,0, 4,4, 5,5, 6,6);
+//! [6]
+ }
+ return 0;
+}
diff --git a/doc/src/snippets/polygon/polygon.pro b/doc/src/snippets/polygon/polygon.pro
new file mode 100644
index 0000000..39841a5
--- /dev/null
+++ b/doc/src/snippets/polygon/polygon.pro
@@ -0,0 +1 @@
+SOURCES += polygon.cpp
diff --git a/doc/src/snippets/porting4-dropevents/main.cpp b/doc/src/snippets/porting4-dropevents/main.cpp
new file mode 100644
index 0000000..a54e0b7
--- /dev/null
+++ b/doc/src/snippets/porting4-dropevents/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ MyWidget window;
+ window.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/porting4-dropevents/porting4-dropevents.pro b/doc/src/snippets/porting4-dropevents/porting4-dropevents.pro
new file mode 100644
index 0000000..6283406
--- /dev/null
+++ b/doc/src/snippets/porting4-dropevents/porting4-dropevents.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/porting4-dropevents/window.cpp b/doc/src/snippets/porting4-dropevents/window.cpp
new file mode 100644
index 0000000..853687a
--- /dev/null
+++ b/doc/src/snippets/porting4-dropevents/window.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+MyWidget::MyWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *textLabel = new QLabel(tr("Data:"), this);
+ dataLabel = new QLabel(this);
+ dataLabel->setFixedSize(200, 200);
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(textLabel);
+ layout->addWidget(dataLabel);
+
+ setAcceptDrops(true);
+ setWindowTitle(tr("Drop Events"));
+}
+
+//! [0]
+void MyWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasText() || event->mimeData()->hasImage())
+ event->acceptProposedAction();
+}
+//! [0]
+
+//! [1]
+void MyWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasText())
+ dataLabel->setText(event->mimeData()->text());
+ else if (event->mimeData()->hasImage()) {
+ QVariant imageData = event->mimeData()->imageData();
+ dataLabel->setPixmap(qvariant_cast<QPixmap>(imageData));
+ }
+ event->acceptProposedAction();
+}
+//! [1]
+
+//! [2]
+void MyWidget::mousePressEvent(QMouseEvent *event)
+{
+//! [2]
+ QString text = dataLabel->text();
+ QPixmap iconPixmap(32, 32);
+ iconPixmap.fill(qRgba(255, 0, 0, 127));
+ QImage image(100, 100, QImage::Format_RGB32);
+ image.fill(qRgb(0, 0, 255));
+
+//! [3]
+ if (event->button() == Qt::LeftButton) {
+
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+
+ mimeData->setText(text);
+ mimeData->setImageData(image);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(iconPixmap);
+
+ Qt::DropAction dropAction = drag->exec();
+//! [3]
+ // ...
+//! [4]
+ event->accept();
+ }
+//! [4]
+ else if (event->button() == Qt::MidButton) {
+
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+
+ mimeData->setImageData(image);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(iconPixmap);
+
+ Qt::DropAction dropAction = drag->exec();
+ // ...
+ event->accept();
+ }
+//! [5]
+}
+//! [5]
diff --git a/doc/src/snippets/porting4-dropevents/window.h b/doc/src/snippets/porting4-dropevents/window.h
new file mode 100644
index 0000000..4aebb8c
--- /dev/null
+++ b/doc/src/snippets/porting4-dropevents/window.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QString>
+#include <QStringList>
+#include <QWidget>
+
+class QComboBox;
+class QFrame;
+class QLabel;
+
+class MyWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MyWidget(QWidget *parent = 0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+
+private:
+ QComboBox *mimeTypeCombo;
+ QFrame *dropFrame;
+ QLabel *dataLabel;
+ QString oldText;
+ QStringList oldMimeTypes;
+};
+
+#endif
diff --git a/doc/src/snippets/printing-qprinter/errors.cpp b/doc/src/snippets/printing-qprinter/errors.cpp
new file mode 100644
index 0000000..55f78e8
--- /dev/null
+++ b/doc/src/snippets/printing-qprinter/errors.cpp
@@ -0,0 +1,25 @@
+#include <QtGui>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QPrinter printer;
+ printer.setOutputFormat(QPrinter::PdfFormat);
+ printer.setOutputFileName("/foobar/nonwritable.pdf");
+ QPainter painter;
+ if (! painter.begin(&printer)) { // failed to open file
+ qWarning("failed to open file, is it writable?");
+ return 1;
+ }
+ painter.drawText(10, 10, "Test");
+ if (! printer.newPage()) {
+ qWarning("failed in flushing page to disk, disk full?");
+ return 1;
+ }
+ painter.drawText(10, 10, "Test 2");
+ painter.end();
+//! [0]
+ return 0;
+}
diff --git a/doc/src/snippets/printing-qprinter/main.cpp b/doc/src/snippets/printing-qprinter/main.cpp
new file mode 100644
index 0000000..2289ae4
--- /dev/null
+++ b/doc/src/snippets/printing-qprinter/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "object.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Object object;
+ QTimer timer;
+ timer.setSingleShot(true);
+ timer.connect(&timer, SIGNAL(timeout()), &object, SLOT(print()));
+ timer.start(0);
+ return app.exec();
+}
diff --git a/doc/src/snippets/printing-qprinter/object.cpp b/doc/src/snippets/printing-qprinter/object.cpp
new file mode 100644
index 0000000..e6bab28
--- /dev/null
+++ b/doc/src/snippets/printing-qprinter/object.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "object.h"
+
+Object::Object(QObject *parent)
+ : QObject(parent)
+{
+}
+
+void Object::print()
+{
+ int numberOfPages = 10;
+ int lastPage = numberOfPages - 1;
+
+//! [0]
+ QPrinter printer(QPrinter::HighResolution);
+ printer.setOutputFileName("print.ps");
+ QPainter painter;
+ painter.begin(&printer);
+
+ for (int page = 0; page < numberOfPages; ++page) {
+
+ // Use the painter to draw on the page.
+
+ if (page != lastPage)
+ printer.newPage();
+ }
+
+ painter.end();
+//! [0]
+ qApp->quit();
+}
diff --git a/doc/src/snippets/printing-qprinter/object.h b/doc/src/snippets/printing-qprinter/object.h
new file mode 100644
index 0000000..3f5021e
--- /dev/null
+++ b/doc/src/snippets/printing-qprinter/object.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+
+class Object : public QObject
+{
+ Q_OBJECT
+
+public:
+ Object(QObject *parent = 0);
+
+public slots:
+ void print();
+};
diff --git a/doc/src/snippets/printing-qprinter/printing-qprinter.pro b/doc/src/snippets/printing-qprinter/printing-qprinter.pro
new file mode 100644
index 0000000..c50fc19
--- /dev/null
+++ b/doc/src/snippets/printing-qprinter/printing-qprinter.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ object.cpp
+HEADERS = object.h
diff --git a/doc/src/snippets/process/process.cpp b/doc/src/snippets/process/process.cpp
new file mode 100644
index 0000000..2d6ce10
--- /dev/null
+++ b/doc/src/snippets/process/process.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QProcess>
+
+bool zip()
+{
+//! [0]
+ QProcess gzip;
+ gzip.start("gzip", QStringList() << "-c");
+ if (!gzip.waitForStarted())
+ return false;
+
+ gzip.write("Qt rocks!");
+ gzip.closeWriteChannel();
+
+ if (!gzip.waitForFinished())
+ return false;
+
+ QByteArray result = gzip.readAll();
+//! [0]
+
+ gzip.start("gzip", QStringList() << "-d" << "-c");
+ gzip.write(result);
+ gzip.closeWriteChannel();
+
+ if (!gzip.waitForFinished())
+ return false;
+
+ qDebug("Result: %s", gzip.readAll().data());
+ return true;
+}
+
+
+int main()
+{
+ zip();
+ return 0;
+}
diff --git a/doc/src/snippets/process/process.pro b/doc/src/snippets/process/process.pro
new file mode 100644
index 0000000..f96847d
--- /dev/null
+++ b/doc/src/snippets/process/process.pro
@@ -0,0 +1 @@
+SOURCES += process.cpp
diff --git a/doc/src/snippets/qabstractsliderisnippet.cpp b/doc/src/snippets/qabstractsliderisnippet.cpp
new file mode 100644
index 0000000..b545c1d
--- /dev/null
+++ b/doc/src/snippets/qabstractsliderisnippet.cpp
@@ -0,0 +1,510 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+QAbstractSliderPrivate::QAbstractSliderPrivate()
+ : minimum(0), maximum(99), singleStep(1), pageStep(10),
+ value(0), position(0), pressValue(-1), tracking(true), blocktracking(false), pressed(false),
+ invertedAppearance(false), invertedControls(false),
+ orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction)
+{
+}
+
+QAbstractSliderPrivate::~QAbstractSliderPrivate()
+{
+}
+
+oid QAbstractSlider::setRange(int min, int max)
+{
+ Q_D(QAbstractSlider);
+ int oldMin = d->minimum;
+ int oldMax = d->maximum;
+ d->minimum = min;
+ d->maximum = qMax(min, max);
+ if (oldMin != d->minimum || oldMax != d->maximum) {
+ sliderChange(SliderRangeChange);
+ emit rangeChanged(d->minimum, d->maximum);
+ setValue(d->value); // re-bound
+ }
+}
+
+
+void QAbstractSliderPrivate::setSteps(int single, int page)
+{
+ Q_Q(QAbstractSlider);
+ singleStep = qAbs(single);
+ pageStep = qAbs(page);
+ q->sliderChange(QAbstractSlider::SliderStepsChange);
+}
+
+AbstractSlider::QAbstractSlider(QWidget *parent)
+ :QWidget(*new QAbstractSliderPrivate, parent, 0)
+{
+}
+
+QAbstractSlider::QAbstractSlider(QAbstractSliderPrivate &dd, QWidget *parent)
+ :QWidget(dd, parent, 0)
+{
+}
+
+QAbstractSlider::~QAbstractSlider()
+{
+}
+
+void QAbstractSlider::setOrientation(Qt::Orientation orientation)
+{
+ Q_D(QAbstractSlider);
+ if (d->orientation == orientation)
+ return;
+
+ d->orientation = orientation;
+ if (!testAttribute(Qt::WA_WState_OwnSizePolicy)) {
+ QSizePolicy sp = sizePolicy();
+ sp.transpose();
+ setSizePolicy(sp);
+ setAttribute(Qt::WA_WState_OwnSizePolicy, false);
+ }
+ update();
+ updateGeometry();
+}
+
+Qt::Orientation QAbstractSlider::orientation() const
+{
+ Q_D(const QAbstractSlider);
+ return d->orientation;
+}
+
+
+void QAbstractSlider::setMinimum(int min)
+{
+ Q_D(QAbstractSlider);
+ setRange(min, qMax(d->maximum, min));
+}
+
+int QAbstractSlider::minimum() const
+{
+ Q_D(const QAbstractSlider);
+ return d->minimum;
+}
+
+
+void QAbstractSlider::setMaximum(int max)
+{
+ Q_D(QAbstractSlider);
+ setRange(qMin(d->minimum, max), max);
+}
+
+int QAbstractSlider::maximum() const
+{
+ Q_D(const QAbstractSlider);
+ return d->maximum;
+}
+
+
+
+void QAbstractSlider::setSingleStep(int step)
+{
+ Q_D(QAbstractSlider);
+ d->setSteps(step, d->pageStep);
+}
+
+int QAbstractSlider::singleStep() const
+{
+ Q_D(const QAbstractSlider);
+ return d->singleStep;
+}
+
+
+void QAbstractSlider::setPageStep(int step)
+{
+ Q_D(QAbstractSlider);
+ d->setSteps(d->singleStep, step);
+}
+
+int QAbstractSlider::pageStep() const
+{
+ Q_D(const QAbstractSlider);
+ return d->pageStep;
+}
+
+oid QAbstractSlider::setTracking(bool enable)
+{
+ Q_D(QAbstractSlider);
+ d->tracking = enable;
+}
+
+bool QAbstractSlider::hasTracking() const
+{
+ Q_D(const QAbstractSlider);
+ return d->tracking;
+}
+
+
+
+void QAbstractSlider::setSliderDown(bool down)
+{
+ Q_D(QAbstractSlider);
+ bool doEmit = d->pressed != down;
+
+ d->pressed = down;
+
+ if (doEmit) {
+ if (down)
+ emit sliderPressed();
+ else
+ emit sliderReleased();
+ }
+
+ if (!down && d->position != d->value)
+ triggerAction(SliderMove);
+}
+
+bool QAbstractSlider::isSliderDown() const
+{
+ Q_D(const QAbstractSlider);
+ return d->pressed;
+}
+
+
+void QAbstractSlider::setSliderPosition(int position)
+{
+ Q_D(QAbstractSlider);
+ position = d->bound(position);
+ if (position == d->position)
+ return;
+ d->position = position;
+ if (!d->tracking)
+ update();
+ if (d->pressed)
+ emit sliderMoved(position);
+ if (d->tracking && !d->blocktracking)
+ triggerAction(SliderMove);
+}
+
+int QAbstractSlider::sliderPosition() const
+{
+ Q_D(const QAbstractSlider);
+ return d->position;
+}
+
+
+
+int QAbstractSlider::value() const
+{
+ Q_D(const QAbstractSlider);
+ return d->value;
+}
+
+//! [0]
+void QAbstractSlider::setValue(int value)
+//! [0]
+{
+ Q_D(QAbstractSlider);
+ value = d->bound(value);
+ if (d->value == value && d->position == value)
+ return;
+ d->value = value;
+ if (d->position != value) {
+ d->position = value;
+ if (d->pressed)
+ emit sliderMoved((d->position = value));
+ }
+#ifndef QT_NO_ACCESSIBILITY
+//! [1]
+ QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+//! [1]
+#endif
+ sliderChange(SliderValueChange);
+ emit valueChanged(value);
+//! [2]
+}
+//! [2]
+
+bool QAbstractSlider::invertedAppearance() const
+{
+ Q_D(const QAbstractSlider);
+ return d->invertedAppearance;
+}
+
+void QAbstractSlider::setInvertedAppearance(bool invert)
+{
+ Q_D(QAbstractSlider);
+ d->invertedAppearance = invert;
+ update();
+}
+
+
+
+bool QAbstractSlider::invertedControls() const
+{
+ Q_D(const QAbstractSlider);
+ return d->invertedControls;
+}
+
+void QAbstractSlider::setInvertedControls(bool invert)
+{
+ Q_D(QAbstractSlider);
+ d->invertedControls = invert;
+}
+
+void QAbstractSlider::triggerAction(SliderAction action)
+{
+ Q_D(QAbstractSlider);
+ d->blocktracking = true;
+ switch (action) {
+ case SliderSingleStepAdd:
+ setSliderPosition(d->value + d->singleStep);
+ break;
+ case SliderSingleStepSub:
+ setSliderPosition(d->value - d->singleStep);
+ break;
+ case SliderPageStepAdd:
+ setSliderPosition(d->value + d->pageStep);
+ break;
+ case SliderPageStepSub:
+ setSliderPosition(d->value - d->pageStep);
+ break;
+ case SliderToMinimum:
+ setSliderPosition(d->minimum);
+ break;
+ case SliderToMaximum:
+ setSliderPosition(d->maximum);
+ break;
+ case SliderMove:
+ case SliderNoAction:
+ break;
+ };
+ emit actionTriggered(action);
+ d->blocktracking = false;
+ setValue(d->position);
+}
+
+void QAbstractSlider::setRepeatAction(SliderAction action, int thresholdTime, int repeatTime)
+{
+ Q_D(QAbstractSlider);
+ if ((d->repeatAction = action) == SliderNoAction) {
+ d->repeatActionTimer.stop();
+ } else {
+ d->repeatActionTime = repeatTime;
+ d->repeatActionTimer.start(thresholdTime, this);
+ }
+}
+
+QAbstractSlider::SliderAction QAbstractSlider::repeatAction() const
+{
+ Q_D(const QAbstractSlider);
+ return d->repeatAction;
+}
+
+void QAbstractSlider::timerEvent(QTimerEvent *e)
+{
+ Q_D(QAbstractSlider);
+ if (e->timerId() == d->repeatActionTimer.timerId()) {
+ if (d->repeatActionTime) { // was threshold time, use repeat time next time
+ d->repeatActionTimer.start(d->repeatActionTime, this);
+ d->repeatActionTime = 0;
+ }
+ if (d->repeatAction == SliderPageStepAdd)
+ d->setAdjustedSliderPosition(d->value + d->pageStep);
+ else if (d->repeatAction == SliderPageStepSub)
+ d->setAdjustedSliderPosition(d->value - d->pageStep);
+ else
+ triggerAction(d->repeatAction);
+ }
+}
+
+oid QAbstractSlider::sliderChange(SliderChange)
+{
+ update();
+}
+
+
+#ifndef QT_NO_WHEELEVENT
+void QAbstractSlider::wheelEvent(QWheelEvent * e)
+{
+ Q_D(QAbstractSlider);
+ e->ignore();
+ if (e->orientation() != d->orientation && !rect().contains(e->pos()))
+ return;
+
+ static qreal offset = 0;
+ static QAbstractSlider *offset_owner = 0;
+ if (offset_owner != this){
+ offset_owner = this;
+ offset = 0;
+ }
+
+ int step = qMin(QApplication::wheelScrollLines() * d->singleStep, d->pageStep);
+ if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::ShiftModifier))
+ step = d->pageStep;
+ offset += e->delta() * step / 120;
+ if (d->invertedControls)
+ offset = -offset;
+
+ if (qAbs(offset) < 1)
+ return;
+
+ int prevValue = d->value;
+ d->position = d->value + int(offset); // value will be updated by triggerAction()
+ triggerAction(SliderMove);
+ if (prevValue == d->value) {
+ offset = 0;
+ } else {
+ offset -= int(offset);
+ e->accept();
+ }
+}
+#endif
+void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
+{
+ Q_D(QAbstractSlider);
+ SliderAction action = SliderNoAction;
+ switch (ev->key()) {
+#ifdef QT_KEYPAD_NAVIGATION
+ case Qt::Key_Select:
+ if (QApplication::keypadNavigationEnabled())
+ setEditFocus(!hasEditFocus());
+ else
+ ev->ignore();
+ break;
+ case Qt::Key_Back:
+ if (QApplication::keypadNavigationEnabled() && hasEditFocus()) {
+ setValue(d->origValue);
+ setEditFocus(false);
+ } else
+ ev->ignore();
+ break;
+#endif
+
+ // It seems we need to use invertedAppearance for Left and right, otherwise, things look weird.
+ case Qt::Key_Left:
+#ifdef QT_KEYPAD_NAVIGATION
+ if (QApplication::keypadNavigationEnabled() && !hasEditFocus()) {
+ ev->ignore();
+ return;
+ }
+ if (QApplication::keypadNavigationEnabled() && d->orientation == Qt::Vertical)
+ action = d->invertedControls ? SliderSingleStepSub : SliderSingleStepAdd;
+ else
+#endif
+ action = !d->invertedAppearance ? SliderSingleStepSub : SliderSingleStepAdd;
+ break;
+ case Qt::Key_Right:
+#ifdef QT_KEYPAD_NAVIGATION
+ if (QApplication::keypadNavigationEnabled() && !hasEditFocus()) {
+ ev->ignore();
+ return;
+ }
+ if (QApplication::keypadNavigationEnabled() && d->orientation == Qt::Vertical)
+ action = d->invertedControls ? SliderSingleStepAdd : SliderSingleStepSub;
+ else
+#endif
+ action = !d->invertedAppearance ? SliderSingleStepAdd : SliderSingleStepSub;
+ break;
+ case Qt::Key_Up:
+#ifdef QT_KEYPAD_NAVIGATION
+ if (QApplication::keypadNavigationEnabled()) {
+ ev->ignore();
+ break;
+ }
+#endif
+ action = d->invertedControls ? SliderSingleStepSub : SliderSingleStepAdd;
+ break;
+ case Qt::Key_Down:
+#ifdef QT_KEYPAD_NAVIGATION
+ if (QApplication::keypadNavigationEnabled()) {
+ ev->ignore();
+ break;
+ }
+#endif
+ action = d->invertedControls ? SliderSingleStepAdd : SliderSingleStepSub;
+ break;
+ case Qt::Key_PageUp:
+ action = d->invertedControls ? SliderPageStepSub : SliderPageStepAdd;
+ break;
+ case Qt::Key_PageDown:
+ action = d->invertedControls ? SliderPageStepAdd : SliderPageStepSub;
+ break;
+ case Qt::Key_Home:
+ action = SliderToMinimum;
+ break;
+ case Qt::Key_End:
+ action = SliderToMaximum;
+ break;
+ default:
+ ev->ignore();
+ break;
+ }
+ if (action)
+ triggerAction(action);
+}
+
+void QAbstractSlider::changeEvent(QEvent *ev)
+{
+ Q_D(QAbstractSlider);
+ switch (ev->type()) {
+ case QEvent::EnabledChange:
+ if (!isEnabled()) {
+ d->repeatActionTimer.stop();
+ setSliderDown(false);
+ }
+ // fall through...
+ default:
+ QWidget::changeEvent(ev);
+ }
+}
+
+bool QAbstractSlider::event(QEvent *e)
+{
+#ifdef QT_KEYPAD_NAVIGATION
+ Q_D(QAbstractSlider);
+ switch (e->type()) {
+ case QEvent::FocusIn:
+ d->origValue = d->value;
+ break;
+ default:
+ break;
+ }
+#endif
+
+ return QWidget::event(e);
+}
+
+
diff --git a/doc/src/snippets/qcalendarwidget/main.cpp b/doc/src/snippets/qcalendarwidget/main.cpp
new file mode 100644
index 0000000..b1dfaa5
--- /dev/null
+++ b/doc/src/snippets/qcalendarwidget/main.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QCalendarWidget>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QCalendarWidget calendar;
+ calendar.setSelectedDate(calendar.selectedDate().addDays(3));
+ calendar.setGridVisible(true);
+ calendar.show();
+
+ QCalendarWidget calendarMin;
+ calendarMin.setMinimumDate(calendarMin.selectedDate().addDays(-7));
+ calendarMin.setGridVisible(true);
+ calendarMin.show();
+
+ QCalendarWidget calendarMax;
+ calendarMax.setMaximumDate(calendarMax.selectedDate().addDays(7));
+ calendarMax.setGridVisible(true);
+ calendarMax.show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/qcalendarwidget/qcalendarwidget.pro b/doc/src/snippets/qcalendarwidget/qcalendarwidget.pro
new file mode 100644
index 0000000..88c5e24
--- /dev/null
+++ b/doc/src/snippets/qcalendarwidget/qcalendarwidget.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qcolumnview/main.cpp b/doc/src/snippets/qcolumnview/main.cpp
new file mode 100644
index 0000000..e882b4f
--- /dev/null
+++ b/doc/src/snippets/qcolumnview/main.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QStandardItemModel model;
+
+ QStandardItem *name = new QStandardItem("Name");
+ QStandardItem *firstName = new QStandardItem("First Name");
+ QStandardItem *lastName = new QStandardItem("Last Name");
+
+ name->appendRow(firstName);
+ name->appendRow(lastName);
+ model.appendRow(name);
+
+ QStandardItem *john = new QStandardItem("John");
+ QStandardItem *smith = new QStandardItem("Smith");
+
+ firstName->appendRow(john);
+ lastName->appendRow(smith);
+
+ QStandardItem *address = new QStandardItem("Address");
+ QStandardItem *street = new QStandardItem("Street");
+ QStandardItem *city = new QStandardItem("City");
+ QStandardItem *state = new QStandardItem("State");
+ QStandardItem *country = new QStandardItem("Country");
+
+ address->appendRow(street);
+ address->appendRow(city);
+ address->appendRow(state);
+ address->appendRow(country);
+ model.appendRow(address);
+
+ QColumnView columnView;
+ columnView.setModel(&model);
+ columnView.show();
+
+ return app.exec();
+} \ No newline at end of file
diff --git a/doc/src/snippets/qcolumnview/qcolumnview.pro b/doc/src/snippets/qcolumnview/qcolumnview.pro
new file mode 100644
index 0000000..5254077
--- /dev/null
+++ b/doc/src/snippets/qcolumnview/qcolumnview.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp \ No newline at end of file
diff --git a/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp b/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
new file mode 100644
index 0000000..7a27ce0
--- /dev/null
+++ b/doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtDBus>
+
+static QVariant callMyDBusFunction() { return QVariant(); }
+
+int main()
+{
+ QDBusMessage myDBusMessage;
+
+//! [0]
+ QList<QVariant> arguments;
+ arguments << QVariant(42) << QVariant::fromValue(QDBusVariant(43)) << QVariant("hello");
+ myDBusMessage.setArguments(arguments);
+//! [0]
+
+//! [1]
+ // call a D-Bus function that returns a D-Bus variant
+ QVariant v = callMyDBusFunction();
+ // retrieve the D-Bus variant
+ QDBusVariant dbusVariant = qvariant_cast<QDBusVariant>(v);
+ // retrieve the actual value stored in the D-Bus variant
+ QVariant result = dbusVariant.variant();
+//! [1]
+
+ return 0;
+}
diff --git a/doc/src/snippets/qdbusextratypes/qdbusextratypes.pro b/doc/src/snippets/qdbusextratypes/qdbusextratypes.pro
new file mode 100644
index 0000000..e31e8d9
--- /dev/null
+++ b/doc/src/snippets/qdbusextratypes/qdbusextratypes.pro
@@ -0,0 +1,2 @@
+SOURCES += qdbusextratypes.cpp
+QT = core dbus
diff --git a/doc/src/snippets/qdebug/qdebug.pro b/doc/src/snippets/qdebug/qdebug.pro
new file mode 100644
index 0000000..e62a71c
--- /dev/null
+++ b/doc/src/snippets/qdebug/qdebug.pro
@@ -0,0 +1 @@
+SOURCES = qdebugsnippet.cpp
diff --git a/doc/src/snippets/qdebug/qdebugsnippet.cpp b/doc/src/snippets/qdebug/qdebugsnippet.cpp
new file mode 100644
index 0000000..b713f21
--- /dev/null
+++ b/doc/src/snippets/qdebug/qdebugsnippet.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDebug>
+
+class Coordinate : public QObject
+{
+public:
+ int myX, myY;
+
+ int x() const { return myX; };
+ int y() const { return myY; };
+};
+
+//! [0]
+QDebug operator<<(QDebug dbg, const Coordinate &c)
+{
+ dbg.nospace() << "(" << c.x() << ", " << c.y() << ")";
+
+ return dbg.space();
+}
+//! [0]
+
+int main(int argv, char **args)
+{
+ Coordinate coordinate;
+ coordinate.myX = 10;
+ coordinate.myY = 44;
+
+//! [1]
+ qDebug() << "Date:" << QDate::currentDate();
+ qDebug() << "Types:" << QString("String") << QChar('x') << QRect(0, 10, 50, 40);
+ qDebug() << "Custom coordinate type:" << coordinate;
+//! [1]
+}
diff --git a/doc/src/snippets/qdir-filepaths/main.cpp b/doc/src/snippets/qdir-filepaths/main.cpp
new file mode 100644
index 0000000..b8a348c
--- /dev/null
+++ b/doc/src/snippets/qdir-filepaths/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDir>
+#include <iostream>
+
+int main(int argc, char *argv[])
+{
+ QDir directory("Documents/Letters");
+ QString path = directory.filePath("contents.txt");
+ QString absolutePath = directory.absoluteFilePath("contents.txt");
+
+ std::cout << qPrintable(directory.dirName()) << std::endl;
+ std::cout << qPrintable(path) << std::endl;
+ std::cout << qPrintable(absolutePath) << std::endl;
+ return 0;
+}
diff --git a/doc/src/snippets/qdir-filepaths/qdir-filepaths.pro b/doc/src/snippets/qdir-filepaths/qdir-filepaths.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qdir-filepaths/qdir-filepaths.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qdir-listfiles/main.cpp b/doc/src/snippets/qdir-listfiles/main.cpp
new file mode 100644
index 0000000..003ca28
--- /dev/null
+++ b/doc/src/snippets/qdir-listfiles/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QDir>
+#include <iostream>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QDir dir;
+ dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
+ dir.setSorting(QDir::Size | QDir::Reversed);
+
+ QFileInfoList list = dir.entryInfoList();
+ std::cout << " Bytes Filename" << std::endl;
+ for (int i = 0; i < list.size(); ++i) {
+ QFileInfo fileInfo = list.at(i);
+ std::cout << qPrintable(QString("%1 %2").arg(fileInfo.size(), 10)
+ .arg(fileInfo.fileName()));
+ std::cout << std::endl;
+ }
+ return 0;
+}
+//! [0]
diff --git a/doc/src/snippets/qdir-listfiles/qdir-listfiles.pro b/doc/src/snippets/qdir-listfiles/qdir-listfiles.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qdir-listfiles/qdir-listfiles.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qdir-namefilters/main.cpp b/doc/src/snippets/qdir-namefilters/main.cpp
new file mode 100644
index 0000000..acaf8a5
--- /dev/null
+++ b/doc/src/snippets/qdir-namefilters/main.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDir>
+#include <iostream>
+
+int main(int argc, char *argv[])
+{
+ QDir dir;
+ dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
+ dir.setSorting(QDir::Size | QDir::Reversed);
+
+//! [0]
+ QStringList filters;
+ filters << "*.cpp" << "*.cxx" << "*.cc";
+ dir.setNameFilters(filters);
+//! [0]
+
+ QFileInfoList list = dir.entryInfoList();
+ std::cout << " Bytes Filename" << std::endl;
+ for (int i = 0; i < list.size(); ++i) {
+ QFileInfo fileInfo = list.at(i);
+ std::cout << qPrintable(QString("%1 %2").arg(fileInfo.size(), 10)
+ .arg(fileInfo.fileName()));
+ std::cout << std::endl;
+ }
+ return 0;
+}
diff --git a/doc/src/snippets/qdir-namefilters/qdir-namefilters.pro b/doc/src/snippets/qdir-namefilters/qdir-namefilters.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qdir-namefilters/qdir-namefilters.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qfontdatabase/main.cpp b/doc/src/snippets/qfontdatabase/main.cpp
new file mode 100644
index 0000000..4c2cace
--- /dev/null
+++ b/doc/src/snippets/qfontdatabase/main.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QFontDatabase database;
+ QTreeWidget fontTree;
+ fontTree.setColumnCount(2);
+ fontTree.setHeaderLabels(QStringList() << "Font" << "Smooth Sizes");
+
+ foreach (QString family, database.families()) {
+ QTreeWidgetItem *familyItem = new QTreeWidgetItem(&fontTree);
+ familyItem->setText(0, family);
+
+ foreach (QString style, database.styles(family)) {
+ QTreeWidgetItem *styleItem = new QTreeWidgetItem(familyItem);
+ styleItem->setText(0, style);
+
+ QString sizes;
+ foreach (int points, database.smoothSizes(family, style))
+ sizes += QString::number(points) + " ";
+
+ styleItem->setText(1, sizes.trimmed());
+ }
+//! [0] //! [1]
+ }
+//! [1]
+
+ fontTree.resizeColumnToContents(0);
+ fontTree.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qfontdatabase/qfontdatabase.pro b/doc/src/snippets/qfontdatabase/qfontdatabase.pro
new file mode 100644
index 0000000..ce12e3b
--- /dev/null
+++ b/doc/src/snippets/qfontdatabase/qfontdatabase.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qgl-namespace/main.cpp b/doc/src/snippets/qgl-namespace/main.cpp
new file mode 100644
index 0000000..45392f7
--- /dev/null
+++ b/doc/src/snippets/qgl-namespace/main.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QGL>
+
+int main(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/doc/src/snippets/qgl-namespace/qgl-namespace.pro b/doc/src/snippets/qgl-namespace/qgl-namespace.pro
new file mode 100644
index 0000000..9be6edc
--- /dev/null
+++ b/doc/src/snippets/qgl-namespace/qgl-namespace.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+QT += opengl
diff --git a/doc/src/snippets/qlabel/main.cpp b/doc/src/snippets/qlabel/main.cpp
new file mode 100644
index 0000000..9d53af9
--- /dev/null
+++ b/doc/src/snippets/qlabel/main.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class Updater : public QObject
+{
+ Q_OBJECT
+
+public:
+ Updater(QWidget *widget);
+
+public slots:
+ void adjustSize();
+
+private:
+ QWidget *widget;
+};
+
+Updater::Updater(QWidget *widget)
+ : widget(widget)
+{
+}
+
+void Updater::adjustSize()
+{
+ widget->adjustSize();
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QLabel *label = new QLabel("My label");
+ QLineEdit *editor = new QLineEdit("New text");
+ QWidget window;
+ //Updater updater(&label);
+ QObject::connect(editor, SIGNAL(textChanged(const QString &)),
+ label, SLOT(setText(const QString &)));
+ //QObject::connect(editor, SIGNAL(textChanged(const QString &)),
+ // &updater, SLOT(adjustSize()));
+ //editor.show();
+ //label.show();
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ layout->addWidget(editor);
+ window.setLayout(layout);
+ window.show();
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/doc/src/snippets/qlabel/qlabel.pro b/doc/src/snippets/qlabel/qlabel.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qlabel/qlabel.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qlineargradient/main.cpp b/doc/src/snippets/qlineargradient/main.cpp
new file mode 100644
index 0000000..69384c4
--- /dev/null
+++ b/doc/src/snippets/qlineargradient/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "paintwidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ PaintWidget window;
+ window.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qlineargradient/paintwidget.cpp b/doc/src/snippets/qlineargradient/paintwidget.cpp
new file mode 100644
index 0000000..79d77c6
--- /dev/null
+++ b/doc/src/snippets/qlineargradient/paintwidget.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "paintwidget.h"
+
+PaintWidget::PaintWidget(QWidget *parent)
+ : QWidget(parent)
+{
+}
+
+void PaintWidget::paintEvent(QPaintEvent *event)
+{
+ QLinearGradient gradient1(rect().topLeft(), rect().bottomRight());
+ gradient1.setColorAt(0, QColor("#ffffcc"));
+ gradient1.setColorAt(1, QColor("#ccccff"));
+
+ QRectF ellipseRect(width()*0.25, height()*0.25, width()*0.5, height()*0.5);
+ QLinearGradient gradient2(ellipseRect.topLeft(), ellipseRect.bottomRight());
+ gradient2.setColorAt(0, QColor("#ccccff"));
+ gradient2.setColorAt(1, QColor("#ffffcc"));
+
+ QPainter painter;
+ painter.begin(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillRect(rect(), QBrush(gradient1));
+ painter.setBrush(QBrush(gradient2));
+ painter.drawEllipse(ellipseRect);
+ painter.end();
+}
diff --git a/doc/src/snippets/qlineargradient/paintwidget.h b/doc/src/snippets/qlineargradient/paintwidget.h
new file mode 100644
index 0000000..642f1c3
--- /dev/null
+++ b/doc/src/snippets/qlineargradient/paintwidget.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PAINTWIDGET_H
+#define PAINTWIDGET_H
+
+#include <QWidget>
+
+class QPaintEvent;
+
+class PaintWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PaintWidget(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+};
+
+#endif
diff --git a/doc/src/snippets/qlineargradient/qlineargradient.pro b/doc/src/snippets/qlineargradient/qlineargradient.pro
new file mode 100644
index 0000000..48c7d9e
--- /dev/null
+++ b/doc/src/snippets/qlineargradient/qlineargradient.pro
@@ -0,0 +1,3 @@
+HEADERS = paintwidget.h
+SOURCES = main.cpp \
+ paintwidget.cpp
diff --git a/doc/src/snippets/qlistview-dnd/main.cpp b/doc/src/snippets/qlistview-dnd/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qlistview-dnd/mainwindow.cpp b/doc/src/snippets/qlistview-dnd/mainwindow.cpp
new file mode 100644
index 0000000..99f9069
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/mainwindow.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "model.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+
+// For convenient quoting:
+//! [0]
+QListView *listView = new QListView(this);
+listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
+listView->setDragEnabled(true);
+listView->setAcceptDrops(true);
+listView->setDropIndicatorShown(true);
+//! [0]
+
+ this->listView = listView;
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setupListItems();
+
+ setCentralWidget(listView);
+ setWindowTitle(tr("List View"));
+}
+
+void MainWindow::setupListItems()
+{
+ QStringList items;
+ items << tr("Oak") << tr("Fir") << tr("Pine") << tr("Birch") << tr("Hazel")
+ << tr("Redwood") << tr("Sycamore") << tr("Chestnut")
+ << tr("Mahogany");
+
+ DragDropListModel *model = new DragDropListModel(items, this);
+ listView->setModel(model);
+}
diff --git a/doc/src/snippets/qlistview-dnd/mainwindow.h b/doc/src/snippets/qlistview-dnd/mainwindow.h
new file mode 100644
index 0000000..44477f6
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/mainwindow.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QListView;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void setupListItems();
+
+ QListView *listView;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistview-dnd/model.cpp b/doc/src/snippets/qlistview-dnd/model.cpp
new file mode 100644
index 0000000..b8182b7
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/model.cpp
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+DragDropListModel::DragDropListModel(const QStringList &strings,
+ QObject *parent)
+ : QStringListModel(strings, parent)
+{
+}
+
+//! [0]
+bool DragDropListModel::dropMimeData(const QMimeData *data,
+ Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (!data->hasFormat("application/vnd.text.list"))
+ return false;
+
+ if (column > 0)
+//! [0] //! [1]
+ return false;
+//! [1]
+
+//! [2]
+ int beginRow;
+
+ if (row != -1)
+ beginRow = row;
+//! [2] //! [3]
+ else if (parent.isValid())
+ beginRow = parent.row();
+//! [3] //! [4]
+ else
+ beginRow = rowCount(QModelIndex());
+//! [4]
+
+//! [5]
+ QByteArray encodedData = data->data("application/vnd.text.list");
+ QDataStream stream(&encodedData, QIODevice::ReadOnly);
+ QStringList newItems;
+ int rows = 0;
+
+ while (!stream.atEnd()) {
+ QString text;
+ stream >> text;
+ newItems << text;
+ ++rows;
+ }
+//! [5]
+
+//! [6]
+ insertRows(beginRow, rows, QModelIndex());
+ foreach (QString text, newItems) {
+ QModelIndex idx = index(beginRow, 0, QModelIndex());
+ setData(idx, text);
+ beginRow++;
+ }
+
+ return true;
+}
+//! [6]
+
+//! [7]
+Qt::ItemFlags DragDropListModel::flags(const QModelIndex &index) const
+{
+ Qt::ItemFlags defaultFlags = QStringListModel::flags(index);
+
+ if (index.isValid())
+ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+ else
+ return Qt::ItemIsDropEnabled | defaultFlags;
+}
+//! [7]
+
+//! [8]
+QMimeData *DragDropListModel::mimeData(const QModelIndexList &indexes) const
+{
+ QMimeData *mimeData = new QMimeData();
+ QByteArray encodedData;
+
+ QDataStream stream(&encodedData, QIODevice::WriteOnly);
+
+ foreach (QModelIndex index, indexes) {
+ if (index.isValid()) {
+ QString text = data(index, Qt::DisplayRole).toString();
+ stream << text;
+ }
+ }
+
+ mimeData->setData("application/vnd.text.list", encodedData);
+ return mimeData;
+}
+//! [8]
+
+//! [9]
+QStringList DragDropListModel::mimeTypes() const
+{
+ QStringList types;
+ types << "application/vnd.text.list";
+ return types;
+}
+//! [9]
+
+//! [10]
+Qt::DropActions DragDropListModel::supportedDropActions() const
+{
+ return Qt::CopyAction | Qt::MoveAction;
+}
+//! [10]
diff --git a/doc/src/snippets/qlistview-dnd/model.h b/doc/src/snippets/qlistview-dnd/model.h
new file mode 100644
index 0000000..60c8408
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/model.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QObject>
+#include <QStringListModel>
+
+class DragDropListModel : public QStringListModel
+{
+ Q_OBJECT
+
+public:
+ DragDropListModel(const QStringList &strings, QObject *parent = 0);
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const;
+ Qt::DropActions supportedDropActions() const;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistview-dnd/qlistview-dnd.pro b/doc/src/snippets/qlistview-dnd/qlistview-dnd.pro
new file mode 100644
index 0000000..71fa273
--- /dev/null
+++ b/doc/src/snippets/qlistview-dnd/qlistview-dnd.pro
@@ -0,0 +1,5 @@
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ model.cpp
+HEADERS = mainwindow.h \
+ model.h
diff --git a/doc/src/snippets/qlistview-using/main.cpp b/doc/src/snippets/qlistview-using/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qlistview-using/mainwindow.cpp b/doc/src/snippets/qlistview-using/mainwindow.cpp
new file mode 100644
index 0000000..0573d43
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/mainwindow.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "model.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ insertAction = itemsMenu->addAction(tr("&Insert Item"));
+ removeAction = itemsMenu->addAction(tr("&Remove Item"));
+ QAction *ascendingAction = itemsMenu->addAction(tr("Sort in &Ascending Order"));
+ QAction *descendingAction = itemsMenu->addAction(tr("Sort in &Descending Order"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+ QStringList strings;
+ strings << tr("Oak") << tr("Fir") << tr("Pine") << tr("Birch")
+ << tr("Hazel") << tr("Redwood") << tr("Sycamore") << tr("Chestnut");
+ model = new StringListModel(strings, this);
+/* For convenient quoting:
+ QListView *listView = new QListView(this);
+*/
+ listView = new QListView(this);
+ listView->setModel(model);
+ listView->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(ascendingAction, SIGNAL(triggered()), this, SLOT(sortAscending()));
+ connect(descendingAction, SIGNAL(triggered()), this, SLOT(sortDescending()));
+ connect(insertAction, SIGNAL(triggered()), this, SLOT(insertItem()));
+ connect(removeAction, SIGNAL(triggered()), this, SLOT(removeItem()));
+ connect(listView->selectionModel(),
+ SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(updateMenus(const QModelIndex &)));
+
+ updateMenus(listView->selectionModel()->currentIndex());
+
+ setCentralWidget(listView);
+ setWindowTitle(tr("List View"));
+}
+
+void MainWindow::sortAscending()
+{
+ model->sort(0, Qt::AscendingOrder);
+}
+
+void MainWindow::sortDescending()
+{
+ model->sort(0, Qt::DescendingOrder);
+}
+
+void MainWindow::insertItem()
+{
+ QModelIndex currentIndex = listView->currentIndex();
+ if (!currentIndex.isValid())
+ return;
+
+ QString itemText = QInputDialog::getText(this, tr("Insert Item"),
+ tr("Input text for the new item:"));
+
+ if (itemText.isNull())
+ return;
+
+ if (model->insertRow(currentIndex.row(), QModelIndex())) {
+ QModelIndex newIndex = model->index(currentIndex.row(), 0, QModelIndex());
+ model->setData(newIndex, itemText, Qt::EditRole);
+
+ QString toolTipText = tr("Tooltip:") + itemText;
+ QString statusTipText = tr("Status tip:") + itemText;
+ QString whatsThisText = tr("What's This?:") + itemText;
+ model->setData(newIndex, toolTipText, Qt::ToolTipRole);
+ model->setData(newIndex, toolTipText, Qt::StatusTipRole);
+ model->setData(newIndex, whatsThisText, Qt::WhatsThisRole);
+ }
+}
+
+void MainWindow::removeItem()
+{
+ QModelIndex currentIndex = listView->currentIndex();
+ if (!currentIndex.isValid())
+ return;
+
+ model->removeRow(currentIndex.row(), QModelIndex());
+}
+
+void MainWindow::updateMenus(const QModelIndex &current)
+{
+ insertAction->setEnabled(current.isValid());
+ removeAction->setEnabled(current.isValid());
+}
diff --git a/doc/src/snippets/qlistview-using/mainwindow.h b/doc/src/snippets/qlistview-using/mainwindow.h
new file mode 100644
index 0000000..a0c2f17
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/mainwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+class QAction;
+class QListView;
+class StringListModel;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertItem();
+ void removeItem();
+ void sortAscending();
+ void sortDescending();
+ void updateMenus(const QModelIndex &current);
+
+private:
+ QAction *insertAction;
+ QAction *removeAction;
+ QListView *listView;
+ StringListModel *model;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistview-using/model.cpp b/doc/src/snippets/qlistview-using/model.cpp
new file mode 100644
index 0000000..e54ed56
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/model.cpp
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include "model.h"
+
+/*!
+ Returns the number of items in the string list as the number of rows
+ in the model.
+*/
+
+int StringListModel::rowCount(const QModelIndex &parent) const
+{
+ return stringList.count();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant StringListModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags StringListModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the string list, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The index corresponds to an item to be shown in a view.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool StringListModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (index.isValid() && role == Qt::EditRole) {
+
+ stringList.replace(index.row(), value.toString());
+ emit dataChanged(index, index);
+ return true;
+ }
+ return false;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool StringListModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ beginInsertRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.insert(position, "");
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool StringListModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
diff --git a/doc/src/snippets/qlistview-using/model.h b/doc/src/snippets/qlistview-using/model.h
new file mode 100644
index 0000000..a0bde47
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/model.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractListModel>
+#include <QObject>
+#include <QStringList>
+
+class StringListModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ StringListModel(const QStringList &strings, QObject *parent = 0)
+ : QAbstractListModel(parent), stringList(strings) {}
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
+
+private:
+ QStringList stringList;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistview-using/qlistview-using.pro b/doc/src/snippets/qlistview-using/qlistview-using.pro
new file mode 100644
index 0000000..71fa273
--- /dev/null
+++ b/doc/src/snippets/qlistview-using/qlistview-using.pro
@@ -0,0 +1,5 @@
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ model.cpp
+HEADERS = mainwindow.h \
+ model.h
diff --git a/doc/src/snippets/qlistwidget-dnd/main.cpp b/doc/src/snippets/qlistwidget-dnd/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-dnd/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qlistwidget-dnd/mainwindow.cpp b/doc/src/snippets/qlistwidget-dnd/mainwindow.cpp
new file mode 100644
index 0000000..30a42f9
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-dnd/mainwindow.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+
+// For convenient quoting:
+//! [0]
+QListWidget *listWidget = new QListWidget(this);
+listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+listWidget->setDragEnabled(true);
+listWidget->viewport()->setAcceptDrops(true);
+listWidget->setDropIndicatorShown(true);
+//! [0] //! [1]
+listWidget->setDragDropMode(QAbstractItemView::InternalMove);
+//! [1]
+
+ this->listWidget = listWidget;
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setupListItems();
+
+ setCentralWidget(listWidget);
+ setWindowTitle(tr("List Widget"));
+}
+
+void MainWindow::setupListItems()
+{
+ QListWidgetItem *item;
+ item = new QListWidgetItem(tr("Oak"), listWidget);
+ item = new QListWidgetItem(tr("Fir"), listWidget);
+ item = new QListWidgetItem(tr("Pine"), listWidget);
+ item = new QListWidgetItem(tr("Birch"), listWidget);
+ item = new QListWidgetItem(tr("Hazel"), listWidget);
+ item = new QListWidgetItem(tr("Redwood"), listWidget);
+ item = new QListWidgetItem(tr("Sycamore"), listWidget);
+ item = new QListWidgetItem(tr("Chestnut"), listWidget);
+ item = new QListWidgetItem(tr("Mahogany"), listWidget);
+}
diff --git a/doc/src/snippets/qlistwidget-dnd/mainwindow.h b/doc/src/snippets/qlistwidget-dnd/mainwindow.h
new file mode 100644
index 0000000..5f763e2
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-dnd/mainwindow.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QListWidget;
+class QListWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void setupListItems();
+
+ QListWidget *listWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistwidget-dnd/qlistwidget-dnd.pro b/doc/src/snippets/qlistwidget-dnd/qlistwidget-dnd.pro
new file mode 100644
index 0000000..12a900a
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-dnd/qlistwidget-dnd.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qlistwidget-using/main.cpp b/doc/src/snippets/qlistwidget-using/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-using/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qlistwidget-using/mainwindow.cpp b/doc/src/snippets/qlistwidget-using/mainwindow.cpp
new file mode 100644
index 0000000..bf5fe0b
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-using/mainwindow.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ insertAction = itemsMenu->addAction(tr("&Insert Item"));
+ removeAction = itemsMenu->addAction(tr("&Remove Item"));
+ QAction *ascendingAction = itemsMenu->addAction(tr("Sort in &Ascending Order"));
+ QAction *descendingAction = itemsMenu->addAction(tr("Sort in &Descending Order"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+/* For convenient quoting:
+//! [0]
+ QListWidget *listWidget = new QListWidget(this);
+//! [0]
+*/
+ listWidget = new QListWidget(this);
+ listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(ascendingAction, SIGNAL(triggered()), this, SLOT(sortAscending()));
+ connect(descendingAction, SIGNAL(triggered()), this, SLOT(sortDescending()));
+ connect(insertAction, SIGNAL(triggered()), this, SLOT(insertItem()));
+ connect(removeAction, SIGNAL(triggered()), this, SLOT(removeItem()));
+ connect(listWidget,
+ SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+ this, SLOT(updateMenus(QListWidgetItem *)));
+
+ setupListItems();
+ updateMenus(listWidget->currentItem());
+
+ setCentralWidget(listWidget);
+ setWindowTitle(tr("List Widget"));
+}
+
+void MainWindow::setupListItems()
+{
+//! [1]
+ new QListWidgetItem(tr("Oak"), listWidget);
+ new QListWidgetItem(tr("Fir"), listWidget);
+ new QListWidgetItem(tr("Pine"), listWidget);
+//! [1]
+ new QListWidgetItem(tr("Birch"), listWidget);
+//! [2]
+ new QListWidgetItem(tr("Hazel"), listWidget);
+//! [2]
+ new QListWidgetItem(tr("Redwood"), listWidget);
+//! [3]
+ new QListWidgetItem(tr("Sycamore"), listWidget);
+ new QListWidgetItem(tr("Chestnut"), listWidget);
+ new QListWidgetItem(tr("Mahogany"), listWidget);
+//! [3]
+}
+
+void MainWindow::sortAscending()
+{
+//! [4]
+ listWidget->sortItems(Qt::AscendingOrder);
+//! [4]
+}
+
+void MainWindow::sortDescending()
+{
+//! [5]
+ listWidget->sortItems(Qt::DescendingOrder);
+//! [5]
+}
+
+void MainWindow::insertItem()
+{
+ if (!listWidget->currentItem())
+ return;
+
+ QString itemText = QInputDialog::getText(this, tr("Insert Item"),
+ tr("Input text for the new item:"));
+
+ if (itemText.isNull())
+ return;
+
+//! [6]
+ QListWidgetItem *newItem = new QListWidgetItem;
+ newItem->setText(itemText);
+//! [6]
+ int row = listWidget->row(listWidget->currentItem());
+//! [7]
+ listWidget->insertItem(row, newItem);
+//! [7]
+
+ QString toolTipText = tr("Tooltip:") + itemText;
+ QString statusTipText = tr("Status tip:") + itemText;
+ QString whatsThisText = tr("What's This?:") + itemText;
+//! [8]
+ newItem->setToolTip(toolTipText);
+ newItem->setStatusTip(toolTipText);
+ newItem->setWhatsThis(whatsThisText);
+//! [8]
+}
+
+void MainWindow::removeItem()
+{
+ listWidget->takeItem(listWidget->row(listWidget->currentItem()));
+}
+
+void MainWindow::updateMenus(QListWidgetItem *current)
+{
+ insertAction->setEnabled(current != 0);
+ removeAction->setEnabled(current != 0);
+}
diff --git a/doc/src/snippets/qlistwidget-using/mainwindow.h b/doc/src/snippets/qlistwidget-using/mainwindow.h
new file mode 100644
index 0000000..64c4765
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-using/mainwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QListWidget;
+class QListWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertItem();
+ void removeItem();
+ void sortAscending();
+ void sortDescending();
+ void updateMenus(QListWidgetItem *current);
+
+private:
+ void setupListItems();
+
+ QAction *insertAction;
+ QAction *removeAction;
+ QListWidget *listWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qlistwidget-using/qlistwidget-using.pro b/doc/src/snippets/qlistwidget-using/qlistwidget-using.pro
new file mode 100644
index 0000000..12a900a
--- /dev/null
+++ b/doc/src/snippets/qlistwidget-using/qlistwidget-using.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qmacnativewidget/main.mm b/doc/src/snippets/qmacnativewidget/main.mm
new file mode 100644
index 0000000..66c6fbf
--- /dev/null
+++ b/doc/src/snippets/qmacnativewidget/main.mm
@@ -0,0 +1,94 @@
+#include <QtGui/QtGui>
+#include <QtGui/qmacnativewidget_mac.h>
+#ifdef QT_MAC_USE_COCOA
+#import <Cocoa/Cocoa.h>
+#else
+#include <Carbon/Carbon.h>
+#endif
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+#ifdef QT_MAC_USE_COCOA
+//![0]
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(200, app.desktop()->height() - 200, 239, 200)
+ styleMask:NSTitledWindowMask | NSClosableWindowMask
+ | NSMiniaturizableWindowMask | NSResizableWindowMask
+ backing:NSBackingStoreBuffered defer:NO];
+
+ QMacNativeWidget *nativeWidget = new QMacNativeWidget();
+ nativeWidget->move(0, 0);
+ nativeWidget->setPalette(QPalette(Qt::red));
+ nativeWidget->setAutoFillBackground(true);
+ QVBoxLayout *layout = new QVBoxLayout();
+ QPushButton *pushButton = new QPushButton("An Embedded Qt Button!", nativeWidget);
+ pushButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // Don't use the layout rect calculated from QMacStyle.
+ layout->addWidget(pushButton);
+ nativeWidget->setLayout(layout);
+
+ // Adjust Cocoa layouts
+ NSView *nativeWidgetView = reinterpret_cast<NSView *>(nativeWidget->winId());
+ NSView *contentView = [window contentView];
+ [contentView setAutoresizesSubviews:YES];
+ [nativeWidgetView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+ [nativeWidgetView setAutoresizesSubviews:YES];
+ NSView *pushButtonView = reinterpret_cast<NSView *>(pushButton->winId());
+ [pushButtonView setAutoresizingMask:NSViewWidthSizable];
+
+ // Add the nativeWidget to the window.
+ [contentView addSubview:nativeWidgetView positioned:NSWindowAbove relativeTo:nil];
+ nativeWidget->show();
+ pushButton->show();
+
+ // Show the window.
+ [window makeKeyAndOrderFront:window];
+ [pool release];
+//![0]
+#else
+//![1]
+ Rect contentRect;
+ SetRect(&contentRect, 200, 200, 400, 400);
+ HIWindowRef windowRef;
+ CreateNewWindow(kDocumentWindowClass, kWindowStandardDocumentAttributes | kWindowCompositingAttribute | kWindowStandardHandlerAttribute | kWindowLiveResizeAttribute, &contentRect, &windowRef);
+ HIViewRef contentView = 0;
+ GetRootControl(windowRef, &contentView);
+
+ QMacNativeWidget *nativeWidget = new QMacNativeWidget();
+ nativeWidget->move(0, 0);
+ nativeWidget->setPalette(QPalette(Qt::red));
+ nativeWidget->setAutoFillBackground(true);
+ QVBoxLayout *layout = new QVBoxLayout();
+ QPushButton *pushButton = new QPushButton("An Embedded Qt Button!", nativeWidget);
+ pushButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // Don't use the layout rect calculated from QMacStyle.
+ layout->addWidget(pushButton);
+ nativeWidget->setLayout(layout);
+ HIViewRef nativeWidgetView = reinterpret_cast<HIViewRef>(nativeWidget->winId());
+ // Add the nativeWidget to the window.
+ HIViewAddSubview(contentView, nativeWidgetView);
+
+ // Adjust Carbon layouts
+ HILayoutInfo layoutInfo;
+ layoutInfo.version = kHILayoutInfoVersionZero;
+ HIViewGetLayoutInfo(nativeWidgetView, &layoutInfo);
+
+ layoutInfo.binding.top.toView = contentView;
+ layoutInfo.binding.top.kind = kHILayoutBindTop;
+ layoutInfo.binding.left.toView = contentView;
+ layoutInfo.binding.left.kind = kHILayoutBindLeft;
+ layoutInfo.binding.right.toView = contentView;
+ layoutInfo.binding.right.kind = kHILayoutBindRight;
+ layoutInfo.binding.bottom.toView = contentView;
+ layoutInfo.binding.bottom.kind = kHILayoutBindBottom;
+
+ HIViewSetLayoutInfo(nativeWidgetView, &layoutInfo);
+ HIViewApplyLayout(nativeWidgetView);
+
+ pushButton->show();
+ nativeWidget->show();
+ // Show the window.
+ ShowWindow(windowRef);
+//![1]
+#endif
+ return app.exec(); // gives us the same behavior in both
+}
diff --git a/doc/src/snippets/qmacnativewidget/qmacnativewidget.pro b/doc/src/snippets/qmacnativewidget/qmacnativewidget.pro
new file mode 100644
index 0000000..15176e1
--- /dev/null
+++ b/doc/src/snippets/qmacnativewidget/qmacnativewidget.pro
@@ -0,0 +1,8 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Sep 4 15:50:09 2008
+######################################################################
+
+CONFIG+=x86_64
+
+OBJECTIVE_SOURCES += main.mm
+LIBS += -framework Cocoa -framework Carbon
diff --git a/doc/src/snippets/qmake/comments.pro b/doc/src/snippets/qmake/comments.pro
new file mode 100644
index 0000000..189d271
--- /dev/null
+++ b/doc/src/snippets/qmake/comments.pro
@@ -0,0 +1,10 @@
+#! [0]
+# Comments usually start at the beginning of a line, but they
+# can also follow other content on the same line.
+#! [0]
+
+#! [1]
+# To include a literal hash character, use the $$LITERAL_HASH variable:
+urlPieces = http://doc.trolltech.com/4.0/qtextdocument.html pageCount
+message($$join(urlPieces, $$LITERAL_HASH))
+#! [1]
diff --git a/doc/src/snippets/qmake/configscopes.pro b/doc/src/snippets/qmake/configscopes.pro
new file mode 100644
index 0000000..6ab7f7c
--- /dev/null
+++ b/doc/src/snippets/qmake/configscopes.pro
@@ -0,0 +1,23 @@
+SOURCES = main.cpp
+#! [0]
+CONFIG += opengl
+#! [0]
+
+#! [1]
+opengl {
+ TARGET = application-gl
+} else {
+#! [1] #! [2]
+ TARGET = application
+#! [2] #! [3]
+}
+#! [3]
+
+#! [4]
+CONFIG(opengl) {
+ message(Building with OpenGL support.)
+} else {
+#! [4] #! [5]
+ message(OpenGL support is not available.)
+}
+#! [5]
diff --git a/doc/src/snippets/qmake/debug_and_release.pro b/doc/src/snippets/qmake/debug_and_release.pro
new file mode 100644
index 0000000..92e8dbf
--- /dev/null
+++ b/doc/src/snippets/qmake/debug_and_release.pro
@@ -0,0 +1,14 @@
+#! [0]
+CONFIG += debug_and_release
+
+CONFIG(debug, debug|release) {
+ TARGET = debug_binary
+} else {
+#! [0] #! [1]
+ TARGET = release_binary
+}
+#! [1]
+
+#! [2]
+CONFIG += build_all
+#! [2]
diff --git a/doc/src/snippets/qmake/delegate.h b/doc/src/snippets/qmake/delegate.h
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/delegate.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/dereferencing.pro b/doc/src/snippets/qmake/dereferencing.pro
new file mode 100644
index 0000000..ff0c979
--- /dev/null
+++ b/doc/src/snippets/qmake/dereferencing.pro
@@ -0,0 +1,5 @@
+#! [0]
+TEMP_SOURCES = $$SOURCES
+#! [0]
+# Do something with the SOURCES variable then restore its old value.
+SOURCES = $$TEMP_SOURCES
diff --git a/doc/src/snippets/qmake/destdir.pro b/doc/src/snippets/qmake/destdir.pro
new file mode 100644
index 0000000..b2f9439
--- /dev/null
+++ b/doc/src/snippets/qmake/destdir.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+DESTDIR = output
diff --git a/doc/src/snippets/qmake/dirname.pro b/doc/src/snippets/qmake/dirname.pro
new file mode 100644
index 0000000..59e1f20
--- /dev/null
+++ b/doc/src/snippets/qmake/dirname.pro
@@ -0,0 +1,6 @@
+#! [0]
+FILE = /etc/X11R6/XF86Config
+DIRNAME = $$dirname(FILE) #/etc/X11R6
+#! [0]
+message($$FILE)
+message($$DIRNAME)
diff --git a/doc/src/snippets/qmake/environment.pro b/doc/src/snippets/qmake/environment.pro
new file mode 100644
index 0000000..808bdeb
--- /dev/null
+++ b/doc/src/snippets/qmake/environment.pro
@@ -0,0 +1,9 @@
+#! [0] #! [1]
+DESTDIR = $$(PWD)
+message(The project will be installed in $$DESTDIR)
+#! [0]
+
+DESTDIR = $(PWD)
+message(The project will be installed in the value of PWD)
+message(when the Makefile is processed.)
+#! [1]
diff --git a/doc/src/snippets/qmake/functions.pro b/doc/src/snippets/qmake/functions.pro
new file mode 100644
index 0000000..2766120
--- /dev/null
+++ b/doc/src/snippets/qmake/functions.pro
@@ -0,0 +1,34 @@
+#! [0]
+EXTRAS = handlers tests docs
+for(dir, EXTRAS) {
+ exists($$dir) {
+ SUBDIRS += $$dir
+ }
+}
+#! [0]
+
+SOURCES = paintwidget_mac.cpp paintwidget_unix.cpp paintwidget_win.cpp
+macx {
+ SOURCES = $$find(SOURCES, "_mac")
+}
+
+#! [1]
+HEADERS = model.h
+HEADERS += $$OTHER_HEADERS
+HEADERS = $$unique(HEADERS)
+#! [1]
+
+CONFIG += debug
+#! [2]
+options = $$find(CONFIG, "debug") $$find(CONFIG, "release")
+#! [3]
+count(options, 2) {
+ message(Both release and debug specified.)
+}
+#! [2] #! [3]
+
+#! [4]
+eval(TARGET = myapp) {
+ message($$TARGET)
+}
+#! [4]
diff --git a/doc/src/snippets/qmake/include.pro b/doc/src/snippets/qmake/include.pro
new file mode 100644
index 0000000..37e7156
--- /dev/null
+++ b/doc/src/snippets/qmake/include.pro
@@ -0,0 +1,3 @@
+#! [0]
+include(other.pro)
+#! [0]
diff --git a/doc/src/snippets/qmake/main.cpp b/doc/src/snippets/qmake/main.cpp
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/main.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/model.cpp b/doc/src/snippets/qmake/model.cpp
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/model.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/model.h b/doc/src/snippets/qmake/model.h
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/model.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/other.pro b/doc/src/snippets/qmake/other.pro
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/src/snippets/qmake/other.pro
diff --git a/doc/src/snippets/qmake/paintwidget_mac.cpp b/doc/src/snippets/qmake/paintwidget_mac.cpp
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/paintwidget_mac.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/paintwidget_unix.cpp b/doc/src/snippets/qmake/paintwidget_unix.cpp
new file mode 100644
index 0000000..ada3e52
--- /dev/null
+++ b/doc/src/snippets/qmake/paintwidget_unix.cpp
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+int main(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/doc/src/snippets/qmake/paintwidget_win.cpp b/doc/src/snippets/qmake/paintwidget_win.cpp
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/paintwidget_win.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmake/project_location.pro b/doc/src/snippets/qmake/project_location.pro
new file mode 100644
index 0000000..09d9b3d
--- /dev/null
+++ b/doc/src/snippets/qmake/project_location.pro
@@ -0,0 +1,6 @@
+#! [project file]
+message($$_PRO_FILE_)
+#! [project file]
+#! [project file directory]
+message($$_PRO_FILE_PWD_)
+#! [project file directory]
diff --git a/doc/src/snippets/qmake/qtconfiguration.pro b/doc/src/snippets/qmake/qtconfiguration.pro
new file mode 100644
index 0000000..0c854d9
--- /dev/null
+++ b/doc/src/snippets/qmake/qtconfiguration.pro
@@ -0,0 +1,19 @@
+# Show information about the Qt installation.
+#! [0]
+message(Qt version: $$[QT_VERSION])
+message(Qt is installed in $$[QT_INSTALL_PREFIX])
+message(Qt resources can be found in the following locations:)
+message(Documentation: $$[QT_INSTALL_DOCS])
+message(Header files: $$[QT_INSTALL_HEADERS])
+message(Libraries: $$[QT_INSTALL_LIBS])
+message(Binary files (executables): $$[QT_INSTALL_BINS])
+message(Plugins: $$[QT_INSTALL_PLUGINS])
+message(Data files: $$[QT_INSTALL_DATA])
+message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
+message(Settings: $$[QT_INSTALL_SETTINGS])
+message(Examples: $$[QT_INSTALL_EXAMPLES])
+message(Demonstrations: $$[QT_INSTALL_DEMOS])
+#! [0]
+
+# Show configuration information.
+message(CONFIG = $$CONFIG)
diff --git a/doc/src/snippets/qmake/quoting.pro b/doc/src/snippets/qmake/quoting.pro
new file mode 100644
index 0000000..62efb20
--- /dev/null
+++ b/doc/src/snippets/qmake/quoting.pro
@@ -0,0 +1,8 @@
+#! [0]
+DEST = "Program Files"
+#! [0]
+count(DEST, 1) {
+ message(Only one item found in DEST.)
+} else {
+ message(More than one item found in DEST.)
+}
diff --git a/doc/src/snippets/qmake/replace.pro b/doc/src/snippets/qmake/replace.pro
new file mode 100644
index 0000000..504e01a
--- /dev/null
+++ b/doc/src/snippets/qmake/replace.pro
@@ -0,0 +1,4 @@
+#! [0]
+MESSAGE = This is a tent.
+message($$replace(MESSAGE, tent, test))
+#! [0]
diff --git a/doc/src/snippets/qmake/replacefunction.pro b/doc/src/snippets/qmake/replacefunction.pro
new file mode 100644
index 0000000..98013ba
--- /dev/null
+++ b/doc/src/snippets/qmake/replacefunction.pro
@@ -0,0 +1,46 @@
+#! [0]
+defineReplace(headersAndSources) {
+ variable = $$1
+ names = $$eval($$variable)
+ headers =
+ sources =
+
+ for(name, names) {
+ header = $${name}.h
+ exists($$header) {
+ headers += $$header
+ }
+ source = $${name}.cpp
+ exists($$source) {
+ sources += $$source
+ }
+ }
+ return($$headers $$sources)
+}
+#! [0]
+
+defineReplace(matchingFiles) {
+ names = $$ARGS
+ files =
+
+ for(name, names) {
+ header = $${name}.h
+ source = $${name}.cpp
+ exists($$header):exists($$source) {
+ files += $$header
+ files += $$source
+ }
+ }
+ return($$files)
+}
+
+names = delegate model view main
+message(Finding all headers and sources from the following list of names:)
+message($$names)
+allFiles = $$headersAndSources(names)
+message(Found: $$allFiles)
+
+message(Finding only matching headers and sources from the following list of names:)
+message($$names)
+matching = $$matchingFiles($$names)
+message(Found: $$matching)
diff --git a/doc/src/snippets/qmake/scopes.pro b/doc/src/snippets/qmake/scopes.pro
new file mode 100644
index 0000000..4e59afb
--- /dev/null
+++ b/doc/src/snippets/qmake/scopes.pro
@@ -0,0 +1,42 @@
+#! [syntax]
+<condition> {
+ <command or definition>
+ ...
+}
+#! [syntax]
+
+#! [0]
+win32 {
+ SOURCES += paintwidget_win.cpp
+}
+#! [0]
+
+#! [1]
+!win32 {
+ SOURCES -= paintwidget_win.cpp
+}
+#! [1]
+
+unix {
+ SOURCES += paintwidget_unix.cpp
+}
+
+#! [2]
+macx {
+ debug {
+ HEADERS += debugging.h
+ }
+}
+#! [2]
+
+#! [3]
+macx:debug {
+ HEADERS += debugging.h
+}
+#! [3]
+
+#! [4]
+win32|macx {
+ HEADERS += debugging.h
+}
+#! [4]
diff --git a/doc/src/snippets/qmake/shared_or_static.pro b/doc/src/snippets/qmake/shared_or_static.pro
new file mode 100644
index 0000000..31c25ea
--- /dev/null
+++ b/doc/src/snippets/qmake/shared_or_static.pro
@@ -0,0 +1,8 @@
+TEMPLIBS = $$[QT_INSTALL_LIBS] libQtGui.prl
+include($$join(TEMPLIBS, "/"))
+
+contains(QMAKE_PRL_CONFIG, shared) {
+ message(Shared Qt)
+} else {
+ message(Static Qt)
+}
diff --git a/doc/src/snippets/qmake/specifications.pro b/doc/src/snippets/qmake/specifications.pro
new file mode 100644
index 0000000..f9a0d0a
--- /dev/null
+++ b/doc/src/snippets/qmake/specifications.pro
@@ -0,0 +1,7 @@
+#! [0]
+message($$QMAKESPEC)
+
+linux-g++ {
+ message(Linux)
+}
+#! [0]
diff --git a/doc/src/snippets/qmake/testfunction.pro b/doc/src/snippets/qmake/testfunction.pro
new file mode 100644
index 0000000..785ffed
--- /dev/null
+++ b/doc/src/snippets/qmake/testfunction.pro
@@ -0,0 +1,20 @@
+#! [0]
+defineTest(allFiles) {
+ files = $$ARGS
+
+ for(file, files) {
+ !exists($$file) {
+ return(false)
+ }
+ }
+ return(true)
+}
+#! [0]
+
+files = delegate.h model.h view.h
+
+allFiles($$files) {
+ message(All files are present: $$files)
+} else {
+ message(Not all files are present: $$files)
+}
diff --git a/doc/src/snippets/qmake/variables.pro b/doc/src/snippets/qmake/variables.pro
new file mode 100644
index 0000000..bba5d9f
--- /dev/null
+++ b/doc/src/snippets/qmake/variables.pro
@@ -0,0 +1,7 @@
+#! [0]
+HEADERS = mainwindow.h paintwidget.h
+#! [0] #! [1]
+SOURCES = main.cpp mainwindow.cpp \
+ paintwidget.cpp
+CONFIG += qt
+#! [1]
diff --git a/doc/src/snippets/qmake/view.h b/doc/src/snippets/qmake/view.h
new file mode 100644
index 0000000..d9f14fe
--- /dev/null
+++ b/doc/src/snippets/qmake/view.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
diff --git a/doc/src/snippets/qmetaobject-invokable/main.cpp b/doc/src/snippets/qmetaobject-invokable/main.cpp
new file mode 100644
index 0000000..dfd7e4d
--- /dev/null
+++ b/doc/src/snippets/qmetaobject-invokable/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QDebug>
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ qDebug() << window.metaObject()->methodCount();
+ window.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qmetaobject-invokable/qmetaobject-invokable.pro b/doc/src/snippets/qmetaobject-invokable/qmetaobject-invokable.pro
new file mode 100644
index 0000000..4df1921
--- /dev/null
+++ b/doc/src/snippets/qmetaobject-invokable/qmetaobject-invokable.pro
@@ -0,0 +1,3 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
diff --git a/doc/src/snippets/qmetaobject-invokable/window.cpp b/doc/src/snippets/qmetaobject-invokable/window.cpp
new file mode 100644
index 0000000..c676708
--- /dev/null
+++ b/doc/src/snippets/qmetaobject-invokable/window.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+
+Window::Window()
+{
+}
+
+void Window::normalMethod()
+{
+ // Cannot be called by the meta-object system.
+ show();
+}
+
+void Window::invokableMethod()
+{
+ // Can be called by the meta-object system.
+ show();
+}
diff --git a/doc/src/snippets/qmetaobject-invokable/window.h b/doc/src/snippets/qmetaobject-invokable/window.h
new file mode 100644
index 0000000..2fd833a
--- /dev/null
+++ b/doc/src/snippets/qmetaobject-invokable/window.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+//! [Window class with invokable method]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+ void normalMethod();
+ Q_INVOKABLE void invokableMethod();
+};
+//! [Window class with invokable method]
+
+#endif
diff --git a/doc/src/snippets/qprocess-environment/main.cpp b/doc/src/snippets/qprocess-environment/main.cpp
new file mode 100644
index 0000000..148518b
--- /dev/null
+++ b/doc/src/snippets/qprocess-environment/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+
+void startProcess()
+{
+ {
+//! [0]
+QProcess process;
+QStringList env = QProcess::systemEnvironment();
+env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable
+env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;C:\\Bin");
+process.setEnvironment(env);
+process.start("myapp");
+//! [0]
+ }
+
+ {
+//! [1]
+QProcess process;
+QHash<QString, QString> env = QProcess::systemEnvironmentHash();
+env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable
+env["PATH"] += ";C:\\Bin";
+process.setEnvironment(env);
+process.start("myapp");
+//! [0]
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ startProcess();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qprocess-environment/qprocess-environment.pro b/doc/src/snippets/qprocess-environment/qprocess-environment.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qprocess-environment/qprocess-environment.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp b/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp
new file mode 100644
index 0000000..4d4eda7
--- /dev/null
+++ b/doc/src/snippets/qprocess/qprocess-simpleexecution.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [0]
+ QObject *parent;
+//! [0]
+ parent = &app;
+
+//! [1]
+ QString program = "./path/to/Qt/examples/widgets/analogclock";
+//! [1]
+ program = "./../../../../examples/widgets/analogclock/analogclock";
+
+//! [2]
+ QStringList arguments;
+ arguments << "-style" << "motif";
+
+ QProcess *myProcess = new QProcess(parent);
+ myProcess->start(program, arguments);
+//! [2]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/qprocess/qprocess.pro b/doc/src/snippets/qprocess/qprocess.pro
new file mode 100644
index 0000000..4dbc429
--- /dev/null
+++ b/doc/src/snippets/qprocess/qprocess.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Mon Mar 20 17:17:02 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += qprocess-simpleexecution.cpp
diff --git a/doc/src/snippets/qsignalmapper/buttonwidget.cpp b/doc/src/snippets/qsignalmapper/buttonwidget.cpp
new file mode 100644
index 0000000..ae92b3a
--- /dev/null
+++ b/doc/src/snippets/qsignalmapper/buttonwidget.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "buttonwidget.h"
+
+//! [0]
+ButtonWidget::ButtonWidget(QStringList texts, QWidget *parent)
+ : QWidget(parent)
+{
+ signalMapper = new QSignalMapper(this);
+
+ QGridLayout *gridLayout = new QGridLayout;
+ for (int i = 0; i < texts.size(); ++i) {
+ QPushButton *button = new QPushButton(texts[i]);
+ connect(button, SIGNAL(clicked()), signalMapper, SLOT(map()));
+//! [0] //! [1]
+ signalMapper->setMapping(button, texts[i]);
+ gridLayout->addWidget(button, i / 3, i % 3);
+ }
+
+ connect(signalMapper, SIGNAL(mapped(const QString &)),
+//! [1] //! [2]
+ this, SIGNAL(clicked(const QString &)));
+
+ setLayout(gridLayout);
+}
+//! [2]
diff --git a/doc/src/snippets/qsignalmapper/buttonwidget.h b/doc/src/snippets/qsignalmapper/buttonwidget.h
new file mode 100644
index 0000000..652f414
--- /dev/null
+++ b/doc/src/snippets/qsignalmapper/buttonwidget.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BUTTONWIDGET_H
+#define BUTTONWIDGET_H
+
+#include <qwidget.h>
+
+class QSignalMapper;
+class QString;
+class QStringList;
+
+//! [0]
+class ButtonWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ButtonWidget(QStringList texts, QWidget *parent = 0);
+
+signals:
+ void clicked(const QString &text);
+
+private:
+ QSignalMapper *signalMapper;
+//! [0] //! [1]
+};
+//! [1]
+
+#endif
diff --git a/doc/src/snippets/qsignalmapper/main.cpp b/doc/src/snippets/qsignalmapper/main.cpp
new file mode 100644
index 0000000..39fdbd2
--- /dev/null
+++ b/doc/src/snippets/qsignalmapper/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "buttonwidget.h"
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QStringList texts;
+ texts << "January" << "February" << "March" << "April"
+ << "May" << "June" << "July" << "August"
+ << "September" << "October" << "November"
+ << "December";
+ MainWindow *mw = new MainWindow;
+ ButtonWidget *buttons = new ButtonWidget(texts, mw);
+ mw->setCentralWidget(buttons);
+ mw->show();
+ QObject::connect(buttons, SIGNAL(clicked(const QString &)),
+ mw, SLOT(buttonPressed(const QString &)));
+ return app.exec();
+}
diff --git a/doc/src/snippets/qsignalmapper/mainwindow.h b/doc/src/snippets/qsignalmapper/mainwindow.h
new file mode 100644
index 0000000..b8f5376
--- /dev/null
+++ b/doc/src/snippets/qsignalmapper/mainwindow.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QMainWindow>
+#include <QStatusBar>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow()
+ {
+ statusBar()->showMessage(tr("Ready"));
+ }
+
+public slots:
+ void buttonPressed(const QString &text)
+ {
+ statusBar()->showMessage(tr("Chose %1").arg(text));
+ }
+};
diff --git a/doc/src/snippets/qsignalmapper/qsignalmapper.pro b/doc/src/snippets/qsignalmapper/qsignalmapper.pro
new file mode 100644
index 0000000..7c31402
--- /dev/null
+++ b/doc/src/snippets/qsignalmapper/qsignalmapper.pro
@@ -0,0 +1,10 @@
+######################################################################
+# Automatically generated by qmake (1.08a) Wed Mar 10 15:35:05 2004
+######################################################################
+
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+HEADERS += buttonwidget.h mainwindow.h
+SOURCES += buttonwidget.cpp main.cpp
diff --git a/doc/src/snippets/qsortfilterproxymodel-details/main.cpp b/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
new file mode 100644
index 0000000..6952499
--- /dev/null
+++ b/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+#include <QSortFilterProxyModel>
+
+class MyItemModel : public QStandardItemModel
+{
+public:
+ MyItemModel(QWidget *parent = 0);
+};
+
+MyItemModel::MyItemModel(QWidget *parent)
+ : QStandardItemModel(parent)
+{};
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0] //! [1]
+ QTreeView *treeView = new QTreeView;
+//! [0]
+ MyItemModel *model = new MyItemModel(this);
+
+ treeView->setModel(model);
+//! [1]
+
+//! [2]
+ MyItemModel *sourceModel = new MyItemModel(this);
+ QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
+
+ proxyModel->setSourceModel(sourceModel);
+ treeView->setModel(proxyModel);
+//! [2]
+
+//! [3]
+ treeView->setSortingEnabled(true);
+//! [3]
+
+//! [4]
+ proxyModel->sort(2, Qt::AscendingOrder);
+//! [4] //! [5]
+ proxyModel->setFilterRegExp(QRegExp(".png", Qt::CaseInsensitive,
+ QRegExp::FixedString));
+ proxyModel->setFilterKeyColumn(1);
+//! [5]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qsortfilterproxymodel-details/qsortfilterproxymodel-details.pro b/doc/src/snippets/qsortfilterproxymodel-details/qsortfilterproxymodel-details.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qsortfilterproxymodel-details/qsortfilterproxymodel-details.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qsortfilterproxymodel/main.cpp b/doc/src/snippets/qsortfilterproxymodel/main.cpp
new file mode 100644
index 0000000..a587bcb
--- /dev/null
+++ b/doc/src/snippets/qsortfilterproxymodel/main.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QObject *parent = &app;
+
+ QStringList numbers;
+ numbers << "One" << "Two" << "Three" << "Four" << "Five";
+
+ QAbstractItemModel *stringListModel = new QStringListModel(numbers, parent);
+
+//! [0]
+ QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(parent);
+ filterModel->setSourceModel(stringListModel);
+//! [0]
+
+ QWidget *window = new QWidget;
+
+//! [1]
+ QListView *filteredView = new QListView;
+ filteredView->setModel(filterModel);
+//! [1]
+ filteredView->setWindowTitle("Filtered view onto a string list model");
+
+ QLineEdit *patternEditor = new QLineEdit;
+ QObject::
+ connect(patternEditor, SIGNAL(textChanged(const QString &)),
+ filterModel, SLOT(setFilterRegExp(const QString &)));
+
+ QVBoxLayout *layout = new QVBoxLayout(window);
+ layout->addWidget(filteredView);
+ layout->addWidget(patternEditor);
+
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro b/doc/src/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/qsortfilterproxymodel/qsortfilterproxymodel.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qsplashscreen/main.cpp b/doc/src/snippets/qsplashscreen/main.cpp
new file mode 100644
index 0000000..6a66349
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <stdlib.h>
+
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QPixmap pixmap(":/splash.png");
+ QSplashScreen splash(pixmap);
+ splash.show();
+ app.processEvents();
+//! [0]
+
+ sleep(5);
+//! [1]
+ QMainWindow window;
+ window.show();
+ splash.finish(&window);
+ return app.exec();
+}
+//! [1]
diff --git a/doc/src/snippets/qsplashscreen/mainwindow.cpp b/doc/src/snippets/qsplashscreen/mainwindow.cpp
new file mode 100644
index 0000000..a26ab62
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/mainwindow.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QLabel *label = new QLabel(tr("This is the main window."));
+ label->setAlignment(Qt::AlignCenter);
+ setCentralWidget(label);
+}
diff --git a/doc/src/snippets/qsplashscreen/mainwindow.h b/doc/src/snippets/qsplashscreen/mainwindow.h
new file mode 100644
index 0000000..e77322e
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/mainwindow.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+};
+
+#endif
diff --git a/doc/src/snippets/qsplashscreen/qsplashscreen.pro b/doc/src/snippets/qsplashscreen/qsplashscreen.pro
new file mode 100644
index 0000000..c798079
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/qsplashscreen.pro
@@ -0,0 +1,4 @@
+HEADERS = mainwindow.h
+RESOURCES = qsplashscreen.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/qsplashscreen/qsplashscreen.qrc b/doc/src/snippets/qsplashscreen/qsplashscreen.qrc
new file mode 100644
index 0000000..330ec78
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/qsplashscreen.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>splash.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/qsplashscreen/splash.png b/doc/src/snippets/qsplashscreen/splash.png
new file mode 100644
index 0000000..d82f6d2
--- /dev/null
+++ b/doc/src/snippets/qsplashscreen/splash.png
Binary files differ
diff --git a/doc/src/snippets/qsql-namespace/main.cpp b/doc/src/snippets/qsql-namespace/main.cpp
new file mode 100644
index 0000000..9ed2b4d
--- /dev/null
+++ b/doc/src/snippets/qsql-namespace/main.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QSql>
+
+int main(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/doc/src/snippets/qsql-namespace/qsql-namespace.pro b/doc/src/snippets/qsql-namespace/qsql-namespace.pro
new file mode 100644
index 0000000..e8183d3
--- /dev/null
+++ b/doc/src/snippets/qsql-namespace/qsql-namespace.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+QT += sql
diff --git a/doc/src/snippets/qstack/main.cpp b/doc/src/snippets/qstack/main.cpp
new file mode 100644
index 0000000..6fa0a41
--- /dev/null
+++ b/doc/src/snippets/qstack/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <iostream>
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+//! [0]
+ QStack<int> stack;
+ stack.push(1);
+ stack.push(2);
+ stack.push(3);
+ while (!stack.isEmpty())
+ cout << stack.pop() << endl;
+//! [0]
+}
diff --git a/doc/src/snippets/qstack/qstack.pro b/doc/src/snippets/qstack/qstack.pro
new file mode 100644
index 0000000..721ae4b
--- /dev/null
+++ b/doc/src/snippets/qstack/qstack.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed Apr 5 15:41:54 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstackedlayout/main.cpp b/doc/src/snippets/qstackedlayout/main.cpp
new file mode 100644
index 0000000..94ff644
--- /dev/null
+++ b/doc/src/snippets/qstackedlayout/main.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ QWidget *firstPageWidget = new QWidget;
+ QWidget *secondPageWidget = new QWidget;
+ QWidget *thirdPageWidget = new QWidget;
+
+ QStackedLayout *stackedLayout = new QStackedLayout;
+ stackedLayout->addWidget(firstPageWidget);
+ stackedLayout->addWidget(secondPageWidget);
+ stackedLayout->addWidget(thirdPageWidget);
+
+//! [0] //! [1]
+ QComboBox *pageComboBox = new QComboBox;
+ pageComboBox->addItem(tr("Page 1"));
+ pageComboBox->addItem(tr("Page 2"));
+ pageComboBox->addItem(tr("Page 3"));
+ connect(pageComboBox, SIGNAL(activated(int)),
+ stackedLayout, SLOT(setCurrentIndex(int)));
+//! [1]
+
+//! [2]
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+//! [2]
+ mainLayout->addWidget(pageComboBox);
+//! [3]
+ mainLayout->addLayout(stackedLayout);
+ setLayout(mainLayout);
+//! [3]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/qstackedlayout/qstackedlayout.pro b/doc/src/snippets/qstackedlayout/qstackedlayout.pro
new file mode 100644
index 0000000..89c757c
--- /dev/null
+++ b/doc/src/snippets/qstackedlayout/qstackedlayout.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Thu Apr 6 10:47:18 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstackedwidget/main.cpp b/doc/src/snippets/qstackedwidget/main.cpp
new file mode 100644
index 0000000..301c06d
--- /dev/null
+++ b/doc/src/snippets/qstackedwidget/main.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ QWidget *firstPageWidget = new QWidget;
+ QWidget *secondPageWidget = new QWidget;
+ QWidget *thirdPageWidget = new QWidget;
+
+ QStackedWidget *stackedWidget = new QStackedWidget;
+ stackedWidget->addWidget(firstPageWidget);
+ stackedWidget->addWidget(secondPageWidget);
+ stackedWidget->addWidget(thirdPageWidget);
+
+//! [0] //! [1]
+ QComboBox *pageComboBox = new QComboBox;
+ pageComboBox->addItem(tr("Page 1"));
+ pageComboBox->addItem(tr("Page 2"));
+ pageComboBox->addItem(tr("Page 3"));
+ connect(pageComboBox, SIGNAL(activated(int)),
+ stackedWidget, SLOT(setCurrentIndex(int)));
+
+//! [1] //! [2]
+ QVBoxLayout *layout = new QVBoxLayout;
+//! [2]
+ layout->addWidget(pageComboBox);
+//! [3]
+ layout->addWidget(stackedWidget);
+ setLayout(layout);
+//! [3]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstackedwidget/qstackedwidget.pro b/doc/src/snippets/qstackedwidget/qstackedwidget.pro
new file mode 100644
index 0000000..227dd36
--- /dev/null
+++ b/doc/src/snippets/qstackedwidget/qstackedwidget.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Thu Apr 6 10:33:16 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstandarditemmodel/main.cpp b/doc/src/snippets/qstandarditemmodel/main.cpp
new file mode 100644
index 0000000..1d9696e
--- /dev/null
+++ b/doc/src/snippets/qstandarditemmodel/main.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parentWidget = 0);
+};
+
+Widget::Widget(QWidget *parentWidget)
+ : QWidget(parentWidget)
+{
+ QStandardItemModel *model = new QStandardItemModel();
+ QModelIndex parent;
+ for (int i = 0; i < 4; ++i) {
+ parent = model->index(0, 0, parent);
+ model->insertRows(0, 1, parent);
+ model->insertColumns(0, 1, parent);
+ QModelIndex index = model->index(0, 0, parent);
+ model->setData(index, i);
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/qstandarditemmodel/qstandarditemmodel.pro b/doc/src/snippets/qstandarditemmodel/qstandarditemmodel.pro
new file mode 100644
index 0000000..421ee59
--- /dev/null
+++ b/doc/src/snippets/qstandarditemmodel/qstandarditemmodel.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Mon Apr 10 11:16:20 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstatustipevent/main.cpp b/doc/src/snippets/qstatustipevent/main.cpp
new file mode 100644
index 0000000..e1d971b
--- /dev/null
+++ b/doc/src/snippets/qstatustipevent/main.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+
+class MainWindow : public QMainWindow
+{
+public:
+ MainWindow(QWidget *parent = 0);
+};
+
+//! [0] //! [1]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+//! [0]
+ QWidget *myWidget = new QWidget;
+ myWidget->setStatusTip(tr("This is my widget."));
+
+ setCentralWidget(myWidget);
+//! [1]
+
+//! [2]
+ QMenu *fileMenu = menuBar()->addMenu(tr("File"));
+
+ QAction *newAct = new QAction(tr("&New"), this);
+ newAct->setStatusTip(tr("Create a new file."));
+ fileMenu->addAction(newAct);
+//! [2]
+
+ statusBar()->showMessage(tr("Ready"));
+ setWindowTitle(tr("QStatusTipEvent"));
+//! [3]
+}
+//! [3]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/qstatustipevent/qstatustipevent.pro b/doc/src/snippets/qstatustipevent/qstatustipevent.pro
new file mode 100644
index 0000000..f4fe6ba
--- /dev/null
+++ b/doc/src/snippets/qstatustipevent/qstatustipevent.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Tue Apr 11 12:09:28 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp
new file mode 100644
index 0000000..150044b
--- /dev/null
+++ b/doc/src/snippets/qstring/main.cpp
@@ -0,0 +1,942 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+#include <stdio.h>
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+
+ void constCharPointer();
+ void constCharArray();
+ void characterReference();
+ void atFunction();
+ void stringLiteral();
+ void modify();
+ void index();
+ QString boolToString(bool b);
+ void nullVsEmpty();
+
+ void appendFunction();
+ void argFunction();
+ void chopFunction();
+ void compareFunction();
+ void compareSensitiveFunction();
+ void containsFunction();
+ void countFunction();
+ void dataFunction();
+ void endsWithFunction();
+ void fillFunction();
+ void fromRawDataFunction();
+
+ void indexOfFunction();
+ void firstIndexOfFunction();
+ void insertFunction();
+ void isNullFunction();
+ void isEmptyFunction();
+ void lastIndexOfFunction();
+ void leftFunction();
+ void leftJustifiedFunction();
+ void leftRefFunction();
+ void midFunction();
+ void midRefFunction();
+ void numberFunction();
+
+ void prependFunction();
+ void removeFunction();
+ void replaceFunction();
+ void reserveFunction();
+ void resizeFunction();
+ void rightFunction();
+ void rightJustifiedFunction();
+ void rightRefFunction();
+ void sectionFunction();
+ void setNumFunction();
+ void simplifiedFunction();
+
+ void sizeFunction();
+ void splitFunction();
+ void splitCaseSensitiveFunction();
+ void sprintfFunction();
+ void startsWithFunction();
+ void toDoubleFunction();
+ void toFloatFunction();
+ void toIntFunction();
+ void toLongFunction();
+ void toLongLongFunction();
+
+ void toLowerFunction();
+ void toShortFunction();
+ void toUIntFunction();
+ void toULongFunction();
+ void toULongLongFunction();
+ void toUShortFunction();
+ void toUpperFunction();
+ void trimmedFunction();
+ void truncateFunction();
+
+ void plusEqualOperator();
+ void arrayOperator();
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+}
+
+void Widget::constCharPointer()
+{
+//! [0]
+ QString str = "Hello";
+//! [0]
+}
+
+void Widget::constCharArray()
+{
+//! [1]
+ static const QChar data[4] = { 0x0055, 0x006e, 0x10e3, 0x03a3 };
+ QString str(data, 4);
+//! [1]
+}
+
+void Widget::characterReference()
+{
+//! [2]
+ QString str;
+ str.resize(4);
+
+ str[0] = QChar('U');
+ str[1] = QChar('n');
+ str[2] = QChar(0x10e3);
+ str[3] = QChar(0x03a3);
+//! [2]
+}
+
+void Widget::atFunction()
+{
+//! [3]
+ QString str;
+
+ for (int i = 0; i < str.size(); ++i) {
+ if (str.at(i) >= QChar('a') && str.at(i) <= QChar('f'))
+ qDebug() << "Found character in range [a-f]";
+ }
+//! [3]
+}
+
+void Widget::stringLiteral()
+{
+//! [4]
+ QString str;
+
+ if (str == "auto" || str == "extern"
+ || str == "static" || str == "register") {
+ // ...
+ }
+//! [4]
+}
+
+void Widget::modify()
+{
+//! [5]
+ QString str = "and";
+ str.prepend("rock "); // str == "rock and"
+ str.append(" roll"); // str == "rock and roll"
+ str.replace(5, 3, "&"); // str == "rock & roll"
+//! [5]
+}
+
+void Widget::index()
+{
+//! [6]
+ QString str = "We must be <b>bold</b>, very <b>bold</b>";
+ int j = 0;
+
+ while ((j = str.indexOf("<b>", j)) != -1) {
+ qDebug() << "Found <b> tag at index position" << j;
+ ++j;
+ }
+//! [6]
+}
+
+//! [7]
+ QString Widget::boolToString(bool b)
+ {
+ QString result;
+ if (b)
+ result = "True";
+ else
+ result = "False";
+ return result;
+ }
+//! [7]
+
+
+void Widget::nullVsEmpty()
+{
+//! [8]
+ QString().isNull(); // returns true
+ QString().isEmpty(); // returns true
+
+ QString("").isNull(); // returns false
+ QString("").isEmpty(); // returns true
+
+ QString("abc").isNull(); // returns false
+ QString("abc").isEmpty(); // returns false
+//! [8]
+}
+
+void Widget::appendFunction()
+{
+//! [9]
+ QString x = "free";
+ QString y = "dom";
+
+ x.append(y);
+ // x == "freedom"
+//! [9]
+
+//! [10]
+ x.insert(x.size(), y);
+//! [10]
+}
+
+void Widget::argFunction()
+{
+//! [11]
+ QString i; // current file's number
+ QString total; // number of files to process
+ QString fileName; // current file's name
+
+ QString status = QString("Processing file %1 of %2: %3")
+ .arg(i).arg(total).arg(fileName);
+//! [11]
+
+//! [12] //! [13]
+ QString str;
+//! [12]
+ str = "%1 %2";
+
+ str.arg("%1f", "Hello"); // returns "%1f Hello"
+ str.arg("%1f").arg("Hello"); // returns "Hellof %2"
+//! [13]
+
+//! [14]
+ str = QString("Decimal 63 is %1 in hexadecimal")
+ .arg(63, 0, 16);
+ // str == "Decimal 63 is 3f in hexadecimal"
+
+ QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
+ str = QString("%1 %L2 %L3")
+ .arg(12345)
+ .arg(12345)
+ .arg(12345, 0, 16);
+ // str == "12345 12,345 3039"
+//! [14]
+}
+
+void Widget::chopFunction()
+{
+//! [15]
+ QString str("LOGOUT\r\n");
+ str.chop(2);
+ // str == "LOGOUT"
+//! [15]
+}
+
+void Widget::compareFunction()
+{
+ int x = QString::compare("auto", "auto"); // x == 0
+ int y = QString::compare("auto", "car"); // y < 0
+ int z = QString::compare("car", "auto"); // z > 0
+}
+
+void Widget::compareSensitiveFunction()
+{
+//! [16]
+ int x = QString::compare("aUtO", "AuTo", Qt::CaseInsensitive); // x == 0
+ int y = QString::compare("auto", "Car", Qt::CaseSensitive); // y > 0
+ int z = QString::compare("auto", "Car", Qt::CaseInsensitive); // z < 0
+//! [16]
+}
+
+void Widget::containsFunction()
+{
+//! [17]
+ QString str = "Peter Pan";
+ str.contains("peter", Qt::CaseInsensitive); // returns true
+//! [17]
+}
+
+void Widget::countFunction()
+{
+//! [18]
+ QString str = "banana and panama";
+ str.count(QRegExp("a[nm]a")); // returns 4
+//! [18]
+}
+
+void Widget::dataFunction()
+{
+//! [19]
+ QString str = "Hello world";
+ QChar *data = str.data();
+ while (!data->isNull()) {
+ qDebug() << data->unicode();
+ ++data;
+ }
+//! [19]
+}
+
+void Widget::endsWithFunction()
+{
+//! [20]
+ QString str = "Bananas";
+ str.endsWith("anas"); // returns true
+ str.endsWith("pple"); // returns false
+//! [20]
+}
+
+void Widget::fillFunction()
+{
+//! [21]
+ QString str = "Berlin";
+ str.fill('z');
+ // str == "zzzzzz"
+
+ str.fill('A', 2);
+ // str == "AA"
+//! [21]
+}
+
+void Widget::fromRawDataFunction()
+{
+//! [22]
+ QRegExp pattern;
+ static const QChar unicode[] = {
+ 0x005A, 0x007F, 0x00A4, 0x0060,
+ 0x1009, 0x0020, 0x0020};
+ int size = sizeof(unicode) / sizeof(QChar);
+
+ QString str = QString::fromRawData(unicode, size);
+ if (str.contains(QRegExp(pattern))) {
+ // ...
+//! [22] //! [23]
+ }
+//! [23]
+}
+
+void Widget::indexOfFunction()
+{
+//! [24]
+ QString x = "sticky question";
+ QString y = "sti";
+ x.indexOf(y); // returns 0
+ x.indexOf(y, 1); // returns 10
+ x.indexOf(y, 10); // returns 10
+ x.indexOf(y, 11); // returns -1
+//! [24]
+}
+
+void Widget::firstIndexOfFunction()
+{
+//! [25]
+ QString str = "the minimum";
+ str.indexOf(QRegExp("m[aeiou]"), 0); // returns 4
+//! [25]
+}
+
+void Widget::insertFunction()
+{
+//! [26]
+ QString str = "Meal";
+ str.insert(1, QString("ontr"));
+ // str == "Montreal"
+//! [26]
+}
+
+void Widget::isEmptyFunction()
+{
+//! [27]
+ QString().isEmpty(); // returns true
+ QString("").isEmpty(); // returns true
+ QString("x").isEmpty(); // returns false
+ QString("abc").isEmpty(); // returns false
+//! [27]
+}
+
+void Widget::isNullFunction()
+{
+//! [28]
+ QString().isNull(); // returns true
+ QString("").isNull(); // returns false
+ QString("abc").isNull(); // returns false
+//! [28]
+}
+
+void Widget::lastIndexOfFunction()
+{
+//! [29]
+ QString x = "crazy azimuths";
+ QString y = "az";
+ x.lastIndexOf(y); // returns 6
+ x.lastIndexOf(y, 6); // returns 6
+ x.lastIndexOf(y, 5); // returns 2
+ x.lastIndexOf(y, 1); // returns -1
+//! [29]
+
+//! [30]
+ QString str = "the minimum";
+ str.lastIndexOf(QRegExp("m[aeiou]")); // returns 8
+//! [30]
+}
+
+void Widget::leftFunction()
+{
+//! [31]
+ QString x = "Pineapple";
+ QString y = x.left(4); // y == "Pine"
+//! [31]
+}
+
+void Widget::leftJustifiedFunction()
+{
+//! [32]
+ QString s = "apple";
+ QString t = s.leftJustified(8, '.'); // t == "apple..."
+//! [32]
+
+//! [33]
+ QString str = "Pineapple";
+ str = str.leftJustified(5, '.', true); // str == "Pinea"
+//! [33]
+}
+
+void Widget::midFunction()
+{
+//! [34]
+ QString x = "Nine pineapples";
+ QString y = x.mid(5, 4); // y == "pine"
+ QString z = x.mid(5); // z == "pineapples"
+//! [34]
+}
+
+void Widget::numberFunction()
+{
+//! [35]
+ long a = 63;
+ QString s = QString::number(a, 16); // s == "3f"
+ QString t = QString::number(a, 16).toUpper(); // t == "3F"
+//! [35]
+}
+
+void Widget::prependFunction()
+{
+//! [36]
+ QString x = "ship";
+ QString y = "air";
+ x.prepend(y);
+ // x == "airship"
+//! [36]
+}
+
+void Widget::removeFunction()
+{
+//! [37]
+ QString s = "Montreal";
+ s.remove(1, 4);
+ // s == "Meal"
+//! [37]
+
+//! [38]
+ QString t = "Ali Baba";
+ t.remove(QChar('a'), Qt::CaseInsensitive);
+ // t == "li Bb"
+//! [38]
+
+//! [39]
+ QString r = "Telephone";
+ r.remove(QRegExp("[aeiou]."));
+ // r == "The"
+//! [39]
+}
+
+void Widget::replaceFunction()
+{
+//! [40]
+ QString x = "Say yes!";
+ QString y = "no";
+ x.replace(4, 3, y);
+ // x == "Say no!"
+//! [40]
+
+//! [41]
+ QString str = "colour behaviour flavour neighbour";
+ str.replace(QString("ou"), QString("o"));
+ // str == "color behavior flavor neighbor"
+//! [41]
+
+//! [42]
+ QString s = "Banana";
+ s.replace(QRegExp("a[mn]"), "ox");
+ // s == "Boxoxa"
+//! [42]
+
+//! [43]
+ QString t = "A <i>bon mot</i>.";
+ t.replace(QRegExp("<i>([^<]*)</i>"), "\\emph{\\1}");
+ // t == "A \\emph{bon mot}."
+//! [43]
+
+//! [86]
+ QString equis = "xxxxxx";
+ equis.replace("xx", "x");
+ // equis == "xxx"
+//! [86]
+}
+
+void Widget::reserveFunction()
+{
+//! [44]
+ QString result;
+ int maxSize;
+ bool condition;
+ QChar nextChar;
+
+ result.reserve(maxSize);
+
+ while (condition)
+ result.append(nextChar);
+
+ result.squeeze();
+//! [44]
+}
+
+void Widget::resizeFunction()
+{
+//! [45]
+ QString s = "Hello world";
+ s.resize(5);
+ // s == "Hello"
+
+ s.resize(8);
+ // s == "Hello???" (where ? stands for any character)
+//! [45]
+
+//! [46]
+ QString t = "Hello";
+ t += QString(10, 'X');
+ // t == "HelloXXXXXXXXXX"
+//! [46]
+
+//! [47]
+ QString r = "Hello";
+ r = r.leftJustified(10, ' ');
+ // r == "Hello "
+//! [47]
+}
+
+void Widget::rightFunction()
+{
+//! [48]
+ QString x = "Pineapple";
+ QString y = x.right(5); // y == "apple"
+//! [48]
+}
+
+void Widget::rightJustifiedFunction()
+{
+//! [49]
+ QString s = "apple";
+ QString t = s.rightJustified(8, '.'); // t == "...apple"
+//! [49]
+
+//! [50]
+ QString str = "Pineapple";
+ str = str.rightJustified(5, '.', true); // str == "Pinea"
+//! [50]
+}
+
+void Widget::sectionFunction()
+{
+//! [51] //! [52]
+ QString str;
+//! [51]
+ QString csv = "forename,middlename,surname,phone";
+ QString path = "/usr/local/bin/myapp"; // First field is empty
+ QString::SectionFlag flag = QString::SectionSkipEmpty;
+
+
+ str = csv.section(',', 2, 2); // str == "surname"
+ str = path.section('/', 3, 4); // str == "bin/myapp"
+ str = path.section('/', 3, 3, flag); // str == "myapp"
+//! [52]
+
+//! [53]
+ str = csv.section(',', -3, -2); // str == "middlename,surname"
+ str = path.section('/', -1); // str == "myapp"
+//! [53]
+
+//! [54]
+ QString data = "forename**middlename**surname**phone";
+
+ str = data.section("**", 2, 2); // str == "surname"
+ str = data.section("**", -3, -2); // str == "middlename**surname"
+//! [54]
+
+//! [55]
+ QString line = "forename\tmiddlename surname \t \t phone";
+ QRegExp sep("\\s+");
+ str = line.section(sep, 2, 2); // s == "surname"
+ str = line.section(sep, -3, -2); // s == "middlename surname"
+//! [55]
+}
+
+void Widget::setNumFunction()
+{
+//! [56]
+ QString str;
+ str.setNum(1234); // str == "1234"
+//! [56]
+}
+
+void Widget::simplifiedFunction()
+{
+//! [57]
+ QString str = " lots\t of\nwhitespace\r\n ";
+ str = str.simplified();
+ // str == "lots of whitespace";
+//! [57]
+}
+
+void Widget::sizeFunction()
+{
+//! [58]
+ QString str = "World";
+ int n = str.size(); // n == 5
+ str.data()[0]; // returns 'W'
+ str.data()[4]; // returns 'd'
+ str.data()[5]; // returns '\0'
+//! [58]
+}
+
+void Widget::splitFunction()
+{
+//! [59]
+ QString str;
+ QStringList list;
+
+ str = "Some text\n\twith strange whitespace.";
+ list = str.split(QRegExp("\\s+"));
+ // list: [ "Some", "text", "with", "strange", "whitespace." ]
+//! [59]
+
+//! [60]
+ str = "This time, a normal English sentence.";
+ list = str.split(QRegExp("\\W+"), QString::SkipEmptyParts);
+ // list: [ "This", "time", "a", "normal", "English", "sentence" ]
+//! [60]
+
+//! [61]
+ str = "Now: this sentence fragment.";
+ list = str.split(QRegExp("\\b"));
+ // list: [ "", "Now", ": ", "this", " ", "sentence", " ", "fragment", "." ]
+//! [61]
+}
+
+void Widget::splitCaseSensitiveFunction()
+{
+//! [62]
+ QString str = "a,,b,c";
+
+ QStringList list1 = str.split(",");
+ // list1: [ "a", "", "b", "c" ]
+
+ QStringList list2 = str.split(",", QString::SkipEmptyParts);
+ // list2: [ "a", "b", "c" ]
+//! [62]
+}
+
+void Widget::sprintfFunction()
+{
+//! [63]
+ size_t BufSize;
+ char buf[BufSize];
+
+ ::snprintf(buf, BufSize, "%lld", 123456789LL);
+ QString str = QString::fromAscii(buf);
+//! [63]
+
+//! [64]
+ QString result;
+ QTextStream(&result) << "pi = " << 3.14;
+ // result == "pi = 3.14"
+//! [64]
+}
+
+void Widget::startsWithFunction()
+{
+//! [65]
+ QString str = "Bananas";
+ str.startsWith("Ban"); // returns true
+ str.startsWith("Car"); // returns false
+//! [65]
+}
+
+void Widget::toDoubleFunction()
+{
+//! [66]
+ QString str = "1234.56";
+ double val = str.toDouble(); // val == 1234.56
+//! [66]
+
+//! [67]
+ bool ok;
+ double d;
+
+ d = QString( "1234.56e-02" ).toDouble(&ok); // ok == true, d == 12.3456
+//! [67]
+
+//! [68] //! [69]
+ QLocale::setDefault(QLocale::C);
+ d = QString( "1234,56" ).toDouble(&ok); // ok == false
+//! [68]
+ d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+
+//! [69] //! [70]
+ QLocale::setDefault(QLocale::German);
+ d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
+ d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
+
+//! [70]
+ QLocale::setDefault(QLocale::C);
+ d = QString( "1,234,567.89" ).toDouble(&ok); // ok == false
+}
+
+void Widget::toFloatFunction()
+{
+//! [71]
+ QString str1 = "1234.56";
+ str1.toFloat(); // returns 1234.56
+
+ bool ok;
+ QString str2 = "R2D2";
+ str2.toFloat(&ok); // returns 0.0, sets ok to false
+//! [71]
+}
+
+void Widget::toIntFunction()
+{
+//! [72]
+ QString str = "FF";
+ bool ok;
+ int hex = str.toInt(&ok, 16); // hex == 255, ok == true
+ int dec = str.toInt(&ok, 10); // dec == 0, ok == false
+//! [72]
+}
+
+void Widget::toLongFunction()
+{
+//! [73]
+ QString str = "FF";
+ bool ok;
+
+ long hex = str.toLong(&ok, 16); // hex == 255, ok == true
+ long dec = str.toLong(&ok, 10); // dec == 0, ok == false
+//! [73]
+}
+
+void Widget::toLongLongFunction()
+{
+//! [74]
+ QString str = "FF";
+ bool ok;
+
+ qint64 hex = str.toLongLong(&ok, 16); // hex == 255, ok == true
+ qint64 dec = str.toLongLong(&ok, 10); // dec == 0, ok == false
+//! [74]
+}
+
+void Widget::toLowerFunction()
+{
+//! [75]
+ QString str = "TROlltECH";
+ str = str.toLower(); // str == "trolltech"
+//! [75]
+}
+
+void Widget::toShortFunction()
+{
+//! [76]
+ QString str = "FF";
+ bool ok;
+
+ short hex = str.toShort(&ok, 16); // hex == 255, ok == true
+ short dec = str.toShort(&ok, 10); // dec == 0, ok == false
+//! [76]
+}
+
+void Widget::toUIntFunction()
+{
+//! [77]
+ QString str = "FF";
+ bool ok;
+
+ uint hex = str.toUInt(&ok, 16); // hex == 255, ok == true
+ uint dec = str.toUInt(&ok, 10); // dec == 0, ok == false
+//! [77]
+}
+
+void Widget::toULongFunction()
+{
+//! [78]
+ QString str = "FF";
+ bool ok;
+
+ ulong hex = str.toULong(&ok, 16); // hex == 255, ok == true
+ ulong dec = str.toULong(&ok, 10); // dec == 0, ok == false
+//! [78]
+}
+
+void Widget::toULongLongFunction()
+{
+//! [79]
+ QString str = "FF";
+ bool ok;
+
+ quint64 hex = str.toULongLong(&ok, 16); // hex == 255, ok == true
+ quint64 dec = str.toULongLong(&ok, 10); // dec == 0, ok == false
+//! [79]
+}
+
+void Widget::toUShortFunction()
+{
+//! [80]
+ QString str = "FF";
+ bool ok;
+
+ ushort hex = str.toUShort(&ok, 16); // hex == 255, ok == true
+ ushort dec = str.toUShort(&ok, 10); // dec == 0, ok == false
+//! [80]
+}
+
+void Widget::toUpperFunction()
+{
+//! [81]
+ QString str = "TeXt";
+ str = str.toUpper(); // str == "TEXT"
+//! [81]
+}
+
+void Widget::trimmedFunction()
+{
+//! [82]
+ QString str = " lots\t of\nwhitespace\r\n ";
+ str = str.trimmed();
+ // str == "lots\t of\nwhitespace"
+//! [82]
+}
+
+void Widget::truncateFunction()
+{
+//! [83]
+ QString str = "Vladivostok";
+ str.truncate(4);
+ // str == "Vlad"
+//! [83]
+}
+
+void Widget::plusEqualOperator()
+{
+//! [84]
+ QString x = "free";
+ QString y = "dom";
+ x += y;
+ // x == "freedom"
+//! [84]
+}
+
+void Widget::arrayOperator()
+{
+//! [85]
+ QString str;
+
+ if (str[0] == QChar('?'))
+ str[0] = QChar('_');
+//! [85]
+}
+
+void Widget::midRefFunction()
+{
+//! [midRef]
+ QString x = "Nine pineapples";
+ QStringRef y = x.midRef(5, 4); // y == "pine"
+ QStringRef z = x.midRef(5); // z == "pineapples"
+//! [midRef]
+}
+
+void Widget::leftRefFunction()
+{
+//! [leftRef]
+ QString x = "Pineapple";
+ QStringRef y = x.leftRef(4); // y == "Pine"
+//! [leftRef]
+}
+
+void Widget::rightRefFunction()
+{
+//! [rightRef]
+ QString x = "Pineapple";
+ QStringRef y = x.rightRef(5); // y == "apple"
+//! [rightRef]
+}
+
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstring/qstring.pro b/doc/src/snippets/qstring/qstring.pro
new file mode 100644
index 0000000..71039d1
--- /dev/null
+++ b/doc/src/snippets/qstring/qstring.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed Apr 12 11:28:45 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstringlist/main.cpp b/doc/src/snippets/qstringlist/main.cpp
new file mode 100644
index 0000000..b0def5b
--- /dev/null
+++ b/doc/src/snippets/qstringlist/main.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <iostream>
+using namespace std;
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ QStringList fonts;
+ fonts << "Arial" << "Helvetica" << "Times" << "Courier";
+//! [0]
+
+//! [1]
+ for (int i = 0; i < fonts.size(); ++i)
+ cout << fonts.at(i).toLocal8Bit().constData() << endl;
+//! [1]
+
+//! [2]
+ QStringListIterator javaStyleIterator(fonts);
+ while (javaStyleIterator.hasNext())
+ cout << javaStyleIterator.next().toLocal8Bit().constData() << endl;
+//! [2]
+
+//! [3]
+ QStringList::const_iterator constIterator;
+ for (constIterator = fonts.constBegin(); constIterator != fonts.constEnd();
+ ++constIterator)
+ cout << (*constIterator).toLocal8Bit().constData() << endl;
+//! [3]
+
+//! [4]
+ QString str = fonts.join(",");
+ // str == "Arial,Helvetica,Times,Courier"
+//! [4]
+
+//! [5] //! [6]
+ QStringList list;
+//! [5]
+ list = str.split(",");
+ // list: ["Arial", "Helvetica", "Times", "Courier"]
+//! [6]
+
+//! [7]
+ QStringList monospacedFonts = fonts.filter(QRegExp("Courier|Fixed"));
+//! [7]
+
+//! [8]
+ QStringList files;
+ files << "$QTDIR/src/moc/moc.y"
+ << "$QTDIR/src/moc/moc.l"
+ << "$QTDIR/include/qconfig.h";
+
+ files.replaceInStrings("$QTDIR", "/usr/lib/qt");
+ // files: [ "/usr/lib/qt/src/moc/moc.y", ...]
+//! [8]
+
+ QString str1, str2, str3;
+//! [9]
+ QStringList longerList = (QStringList() << str1 << str2 << str3);
+//! [9]
+
+ list.clear();
+//! [10]
+ list << "Bill Murray" << "John Doe" << "Bill Clinton";
+
+//! [11]
+ QStringList result;
+//! [11]
+ result = list.filter("Bill");
+ // result: ["Bill Murray", "Bill Clinton"]
+//! [10]
+
+ result.clear();
+//! [12]
+ foreach (QString str, list) {
+ if (str.contains("Bill"))
+ result += str;
+ }
+//! [12]
+
+ list.clear();
+//! [13]
+ list << "alpha" << "beta" << "gamma" << "epsilon";
+ list.replaceInStrings("a", "o");
+ // list == ["olpho", "beto", "gommo", "epsilon"]
+//! [13]
+
+ list.clear();
+//! [14]
+ list << "alpha" << "beta" << "gamma" << "epsilon";
+ list.replaceInStrings(QRegExp("^a"), "o");
+ // list == ["olpha", "beta", "gamma", "epsilon"]
+//! [14]
+
+ list.clear();
+//! [15]
+ list << "Bill Clinton" << "Murray, Bill";
+ list.replaceInStrings(QRegExp("^(.*), (.*)$"), "\\2 \\1");
+ // list == ["Bill Clinton", "Bill Murray"]
+//! [15]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstringlist/qstringlist.pro b/doc/src/snippets/qstringlist/qstringlist.pro
new file mode 100644
index 0000000..adb2f9e
--- /dev/null
+++ b/doc/src/snippets/qstringlist/qstringlist.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed May 3 11:08:01 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstringlistmodel/main.cpp b/doc/src/snippets/qstringlistmodel/main.cpp
new file mode 100644
index 0000000..020dd8c1
--- /dev/null
+++ b/doc/src/snippets/qstringlistmodel/main.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class Widget : public QWidget
+{
+public:
+ Widget(QWidget *parent = 0);
+};
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ QStringListModel *model = new QStringListModel();
+ QStringList list;
+ list << "a" << "b" << "c";
+ model->setStringList(list);
+//! [0]
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Widget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstringlistmodel/qstringlistmodel.pro b/doc/src/snippets/qstringlistmodel/qstringlistmodel.pro
new file mode 100644
index 0000000..aaa359c
--- /dev/null
+++ b/doc/src/snippets/qstringlistmodel/qstringlistmodel.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Wed May 3 15:25:22 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstyleoption/main.cpp b/doc/src/snippets/qstyleoption/main.cpp
new file mode 100644
index 0000000..f7b21a1
--- /dev/null
+++ b/doc/src/snippets/qstyleoption/main.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+
+class MyPushButton : public QPushButton
+{
+public:
+ MyPushButton(QWidget *parent = 0);
+
+ void paintEvent(QPaintEvent *);
+};
+
+MyPushButton::MyPushButton(QWidget *parent)
+ : QPushButton(parent)
+{
+}
+
+//! [0]
+void MyPushButton::paintEvent(QPaintEvent *)
+{
+ QStyleOptionButton option;
+ option.initFrom(this);
+ option.state = isDown() ? QStyle::State_Sunken : QStyle::State_Raised;
+ if (isDefault())
+ option.features |= QStyleOptionButton::DefaultButton;
+ option.text = text();
+ option.icon = icon();
+
+ QPainter painter(this);
+ style()->drawControl(QStyle::CE_PushButton, &option, &painter, this);
+}
+//! [0]
+
+
+
+class MyStyle : public QStyle
+{
+public:
+ MyStyle();
+
+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget);
+};
+
+MyStyle::MyStyle()
+{
+//! [1]
+ QStyleOptionFrame *option;
+
+ if (const QStyleOptionFrame *frameOption =
+ qstyleoption_cast<const QStyleOptionFrame *>(option)) {
+ QStyleOptionFrameV2 frameOptionV2(*frameOption);
+
+ // draw the frame using frameOptionV2
+ }
+//! [1]
+
+//! [2]
+ if (const QStyleOptionProgressBar *progressBarOption =
+ qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
+ QStyleOptionProgressBarV2 progressBarV2(*progressBarOption);
+
+ // draw the progress bar using progressBarV2
+ }
+//! [2]
+
+//! [3]
+ if (const QStyleOptionTab *tabOption =
+ qstyleoption_cast<const QStyleOptionTab *>(option)) {
+ QStyleOptionTabV2 tabV2(*tabOption);
+
+ // draw the tab using tabV2
+ }
+//! [3]
+}
+
+//! [4]
+void MyStyle::drawPrimitive(PrimitiveElement element,
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget)
+{
+ if (element == PE_FrameFocusRect) {
+ const QStyleOptionFocusRect *focusRectOption =
+ qstyleoption_cast<const QStyleOptionFocusRect *>(option);
+ if (focusRectOption) {
+ // ...
+ }
+ }
+ // ...
+}
+//! [4]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MyPushButton button;
+ button.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstyleoption/qstyleoption.pro b/doc/src/snippets/qstyleoption/qstyleoption.pro
new file mode 100644
index 0000000..2f17f03
--- /dev/null
+++ b/doc/src/snippets/qstyleoption/qstyleoption.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Thu Apr 20 16:22:46 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qstyleplugin/main.cpp b/doc/src/snippets/qstyleplugin/main.cpp
new file mode 100644
index 0000000..04584b4
--- /dev/null
+++ b/doc/src/snippets/qstyleplugin/main.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QtGui>
+
+class MyStylePlugin : public QStylePlugin
+{
+public:
+ MyStylePlugin(QObject *parent = 0);
+
+ QStyle *create(const QString &key);
+ QStringList keys() const;
+};
+
+class RocketStyle : public QCommonStyle
+{
+public:
+ RocketStyle() {};
+
+};
+
+class StarBusterStyle : public QCommonStyle
+{
+public:
+ StarBusterStyle() {};
+};
+
+MyStylePlugin::MyStylePlugin(QObject *parent)
+ : QStylePlugin(parent)
+{
+}
+
+//! [0]
+QStringList MyStylePlugin::keys() const
+{
+ return QStringList() << "Rocket" << "StarBuster";
+}
+//! [0]
+
+//! [1]
+QStyle *MyStylePlugin::create(const QString &key)
+{
+ QString lcKey = key;
+ if (lcKey == "rocket") {
+ return new RocketStyle;
+ } else if (lcKey == "starbuster") {
+ return new StarBusterStyle;
+ }
+ return 0;
+//! [1] //! [2]
+}
+//! [2]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MyStylePlugin plugin;
+ return app.exec();
+}
diff --git a/doc/src/snippets/qstyleplugin/qstyleplugin.pro b/doc/src/snippets/qstyleplugin/qstyleplugin.pro
new file mode 100644
index 0000000..d17c20f
--- /dev/null
+++ b/doc/src/snippets/qstyleplugin/qstyleplugin.pro
@@ -0,0 +1,11 @@
+######################################################################
+# Automatically generated by qmake (2.00a) Tue May 2 15:31:16 2006
+######################################################################
+
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
diff --git a/doc/src/snippets/qsvgwidget/main.cpp b/doc/src/snippets/qsvgwidget/main.cpp
new file mode 100644
index 0000000..b0ab95e
--- /dev/null
+++ b/doc/src/snippets/qsvgwidget/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSvg>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [0]
+ QSvgWidget window(":/files/spheres.svg");
+ window.show();
+//! [0]
+ QSvgRenderer *renderer = window.renderer();
+ QImage image(150, 150, QImage::Format_RGB32);
+ QPainter painter;
+ painter.begin(&image);
+ renderer->render(&painter);
+ painter.end();
+ image.save("spheres.png", "PNG", 9);
+ return app.exec();
+}
diff --git a/doc/src/snippets/qsvgwidget/qsvgwidget.pro b/doc/src/snippets/qsvgwidget/qsvgwidget.pro
new file mode 100644
index 0000000..d7e3698
--- /dev/null
+++ b/doc/src/snippets/qsvgwidget/qsvgwidget.pro
@@ -0,0 +1,3 @@
+QT += svg
+RESOURCES = qsvgwidget.qrc
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qsvgwidget/qsvgwidget.qrc b/doc/src/snippets/qsvgwidget/qsvgwidget.qrc
new file mode 100644
index 0000000..13d8b36
--- /dev/null
+++ b/doc/src/snippets/qsvgwidget/qsvgwidget.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/files" >
+ <file>spheres.svg</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/qsvgwidget/spheres.svg b/doc/src/snippets/qsvgwidget/spheres.svg
new file mode 100644
index 0000000..9e38193
--- /dev/null
+++ b/doc/src/snippets/qsvgwidget/spheres.svg
@@ -0,0 +1,79 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="8cm" height="8cm" viewBox="0 0 400 400"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Gradient filled spheres with different colors.</desc>
+ <defs>
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadow" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadow)" cx="0" cy="0" r="100" />
+ </defs>
+ <g fill="#ffee99" stroke="none" >
+ <rect x="0" y="0" width="400" height="400" />
+ </g>
+ <g fill="white" stroke="none" >
+ <rect x="0" y="175" width="400" height="225" />
+ </g>
+ <g transform="translate(200,290) scale(2.0,1.0) rotate(45)" >
+ <rect fill="#a6ce39" x="-69" y="-69" width="138" height="138" />
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ </g>
+ <g transform="translate(200,175)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,240)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,275)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,325)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+</svg>
diff --git a/doc/src/snippets/qsvgwidget/sunflower.svg b/doc/src/snippets/qsvgwidget/sunflower.svg
new file mode 100644
index 0000000..b60dd11
--- /dev/null
+++ b/doc/src/snippets/qsvgwidget/sunflower.svg
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+<svg width="289.619" height="450.482"
+ xmlns="http://www.w3.org/2000/svg" baseProfile="tiny" version="1.1">
+ <defs>
+ <marker id="ArrowEnd" viewBox="0 0 10 10" refX="0" refY="5"
+ markerUnits="strokeWidth"
+ markerWidth="4"
+ markerHeight="3"
+ orient="auto">
+ <path d="M 0 0 L 10 5 L 0 10 z" />
+ </marker>
+ <marker id="ArrowStart" viewBox="0 0 10 10" refX="10" refY="5"
+ markerUnits="strokeWidth"
+ markerWidth="4"
+ markerHeight="3"
+ orient="auto">
+ <path d="M 10 0 L 0 5 L 10 10 z" />
+ </marker> </defs>
+<g>
+<defs><linearGradient id="1" x1="155.352" y1="450.482" x2="155.352" y2="140" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#9ded37"/>
+<stop offset="1" style="stop-color:#f8ff76"/>
+</linearGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#1)" d="M 132.72 145.241C 211.668 237.549 150.166 295.646 148.222 342.665C 146.89 374.889 171.099 410.104 185.352 445.241C 185.352 445.241 185.352 445.241 132.72 352.933C 106.405 306.779 159.036 306.779 159.036 237.549C 159.036 191.395 132.72 145.241 132.72 145.241z"/>
+<defs><radialGradient id="2" cx="145.352" cy="45.2408" r="47.7391" fx="145.352" fy="45.2408" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#2)" d="M 155.352 45.2408C 155.352 67.3199 150.872 85.2408 145.352 85.2408C 139.832 85.2408 135.352 67.3199 135.352 45.2408C 135.352 23.1618 139.832 5.24084 145.352 5.24084C 150.872 5.24084 155.352 23.1618 155.352 45.2408z"/>
+<defs><radialGradient id="3" cx="170.135" cy="48.3609" r="48.0339" fx="170.135" fy="48.3609" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#3)" d="M 179.823 50.8388C 174.351 72.2289 165.569 88.4808 160.221 87.1129C 154.874 85.7448 154.975 67.2728 160.447 45.8828C 165.919 24.4928 174.701 8.24084 180.048 9.60886C 185.396 10.9768 185.295 29.4489 179.823 50.8388z"/>
+<g>
+<defs><radialGradient id="4" cx="192.599" cy="57.0958" r="48.4248" fx="192.599" fy="57.0958" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#4)" d="M 201.476 61.6998C 191.31 81.2998 179.081 95.1448 174.181 92.6039C 169.282 90.0618 173.556 72.0909 183.722 52.4919C 193.888 32.8918 206.116 19.0468 211.016 21.5878C 215.916 24.1299 211.642 42.1008 201.476 61.6998z"/>
+<defs><radialGradient id="5" cx="213.162" cy="71.2758" r="48.6431" fx="213.162" fy="71.2758" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#5)" d="M 220.621 77.9368C 205.915 94.4048 190.636 104.788 186.519 101.112C 182.402 97.4348 190.997 81.0838 205.703 64.6148C 220.409 48.1469 235.688 37.7639 239.805 41.4398C 243.922 45.1169 235.327 61.4678 220.621 77.9368z"/>
+</g>
+<defs><radialGradient id="6" cx="229.082" cy="90.7439" r="48.5357" fx="229.082" fy="90.7439" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#6)" d="M 234.466 99.1708C 215.86 111.058 198.346 116.932 195.374 112.28C 192.403 107.629 205.092 94.2048 223.698 82.3168C 242.303 70.4298 259.817 64.5558 262.789 69.2079C 265.761 73.8589 253.071 87.2838 234.466 99.1708z"/>
+<defs><radialGradient id="7" cx="239.796" cy="113.308" r="48.1584" fx="239.796" fy="113.308" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#7)" d="M 242.923 122.806C 221.952 129.712 203.529 131.061 201.803 125.819C 200.076 120.576 215.697 110.715 236.668 103.81C 257.639 96.9038 276.063 95.5548 277.789 100.797C 279.515 106.04 263.895 115.901 242.923 122.806z"/>
+<g>
+<defs><radialGradient id="8" cx="244.53" cy="136.94" r="47.7879" fx="244.53" fy="136.94" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#8)" d="M 245.429 146.899C 223.44 148.885 205.188 146.035 204.692 140.538C 204.195 135.04 221.641 128.966 243.63 126.981C 265.62 124.995 283.871 127.845 284.368 133.342C 284.864 138.84 267.418 144.914 245.429 146.899z"/>
+<defs><radialGradient id="9" cx="243.651" cy="161.904" r="47.8795" fx="243.651" fy="161.904" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#9)" d="M 242.055 171.776C 220.259 168.25 203.284 160.965 204.165 155.516C 205.047 150.067 223.453 148.506 245.249 152.032C 267.044 155.558 284.02 162.843 283.138 168.292C 282.257 173.741 263.85 175.302 242.055 171.776z"/>
+</g>
+<g>
+<g>
+<g>
+<defs><radialGradient id="10" cx="236.069" cy="186.194" r="48.3388" fx="236.069" fy="186.194" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#10)" d="M 231.976 195.318C 211.831 186.281 197.314 174.858 199.573 169.822C 201.832 164.785 220.017 168.033 240.162 177.07C 260.306 186.107 274.824 197.53 272.565 202.566C 270.305 207.603 252.12 204.355 231.976 195.318z"/>
+<defs><radialGradient id="11" cx="223.077" cy="207.529" r="48.6188" fx="223.077" fy="207.529" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#11)" d="M 216.851 215.354C 199.575 201.606 188.341 186.942 191.778 182.623C 195.215 178.303 212.028 185.956 229.304 199.704C 246.581 213.452 257.814 228.116 254.377 232.435C 250.94 236.755 234.128 229.102 216.851 215.354z"/>
+</g>
+<g>
+<defs><radialGradient id="12" cx="205.914" cy="224.449" r="48.6182" fx="205.914" fy="224.449" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#12)" d="M 198.079 230.664C 184.358 213.366 176.731 196.542 181.055 193.111C 185.379 189.681 200.027 200.937 213.748 218.234C 227.469 235.532 235.097 252.356 230.772 255.787C 226.448 259.217 211.801 247.961 198.079 230.664z"/>
+<defs><radialGradient id="13" cx="184.559" cy="237.407" r="48.3362" fx="184.559" fy="237.407" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#13)" d="M 175.429 241.486C 166.422 221.328 163.203 203.138 168.242 200.886C 173.282 198.635 184.683 213.169 193.689 233.328C 202.695 253.486 205.915 271.676 200.875 273.928C 195.836 276.179 184.435 261.645 175.429 241.486z"/>
+</g>
+</g>
+<g>
+<g>
+<defs><radialGradient id="14" cx="160.281" cy="243.964" r="47.8592" fx="160.281" fy="243.964" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#14)" d="M 150.388 245.427C 147.158 223.586 148.968 205.202 154.428 204.395C 159.888 203.587 166.943 220.66 170.173 242.501C 173.404 264.342 171.594 282.726 166.134 283.534C 160.673 284.341 153.619 267.268 150.388 245.427z"/>
+<defs><radialGradient id="15" cx="135.307" cy="244.504" r="47.8021" fx="135.307" fy="244.504" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#15)" d="M 125.361 243.47C 127.645 221.509 133.954 204.148 139.444 204.719C 144.934 205.289 147.537 223.578 145.254 245.538C 142.971 267.499 136.661 284.86 131.171 284.289C 125.681 283.719 123.078 265.43 125.361 243.47z"/>
+</g>
+<g>
+<defs><radialGradient id="16" cx="111.808" cy="239.15" r="48.183" fx="111.808" fy="239.15" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#16)" d="M 102.353 235.894C 109.541 215.018 119.613 199.532 124.831 201.33C 130.05 203.127 128.452 221.53 121.263 242.406C 114.074 263.282 104.003 278.768 98.784 276.97C 93.5651 275.173 95.1639 256.77 102.353 235.894z"/>
+<defs><radialGradient id="17" cx="89.3906" cy="228.131" r="48.5494" fx="89.3906" fy="228.131" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#17)" d="M 81.0375 222.633C 93.1756 204.19 106.771 191.684 111.381 194.718C 115.992 197.753 109.882 215.186 97.7439 233.629C 85.6057 252.072 72.0108 264.578 67.4001 261.544C 62.7894 258.509 68.8993 241.076 81.0375 222.633z"/>
+</g>
+</g>
+</g>
+<g>
+<g>
+<g>
+<defs><radialGradient id="18" cx="53.7557" cy="185.38" r="48.3405" fx="53.7557" fy="185.38" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#18)" d="M 49.653 176.26C 69.7881 167.202 87.9697 163.935 90.2343 168.969C 92.4989 174.003 77.9935 185.441 57.8584 194.5C 37.7233 203.558 19.5417 206.825 17.2771 201.791C 15.0125 196.757 29.5179 185.319 49.653 176.26z"/>
+<defs><radialGradient id="19" cx="46.4327" cy="161.498" r="47.8981" fx="46.4327" fy="161.498" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#19)" d="M 44.7181 151.646C 66.47 147.861 84.894 149.202 85.8404 154.64C 86.7868 160.078 69.8991 167.564 48.1473 171.35C 26.3954 175.135 7.97139 173.794 7.02501 168.356C 6.07862 162.918 22.9663 155.432 44.7181 151.646z"/>
+</g>
+<g>
+<defs><radialGradient id="20" cx="45.1827" cy="137.429" r="47.7585" fx="45.1827" fy="137.429" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#20)" d="M 45.7397 127.445C 67.7843 128.674 85.4281 134.146 85.1206 139.657C 84.8131 145.168 66.6702 148.643 44.6257 147.413C 22.5811 146.184 4.93733 140.712 5.2448 135.201C 5.55227 129.69 23.6952 126.215 45.7397 127.445z"/>
+<defs><radialGradient id="21" cx="49.6787" cy="112.858" r="48.1368" fx="49.6787" fy="112.858" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#21)" d="M 52.6929 103.323C 73.7448 109.978 89.4821 119.652 87.8184 124.915C 86.1547 130.178 67.7165 129.048 46.6645 122.393C 25.6126 115.738 9.87529 106.064 11.539 100.801C 13.2027 95.5378 31.6409 96.6678 52.6929 103.323z"/>
+</g>
+</g>
+<g>
+<g>
+<defs><radialGradient id="22" cx="60.9007" cy="90.3528" r="48.5468" fx="60.9007" fy="90.3528" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#22)" d="M 66.3768 81.9858C 84.8509 94.0758 97.3927 107.639 94.3701 112.257C 91.3475 116.876 73.8987 110.811 55.4246 98.7198C 36.9505 86.6299 24.4087 73.0668 27.4313 68.4489C 30.4539 63.8298 47.9027 69.8948 66.3768 81.9858z"/>
+<defs><radialGradient id="23" cx="77.0826" cy="71.3239" r="48.6458" fx="77.0826" fy="71.3239" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#23)" d="M 84.4616 64.5748C 99.363 80.8669 108.152 97.1148 104.079 100.84C 100.006 104.565 84.6051 94.3648 69.7038 78.0728C 54.8024 61.7809 46.013 45.5338 50.086 41.8078C 54.1589 38.0829 69.5603 48.2828 84.4616 64.5748z"/>
+</g>
+<g>
+<defs><radialGradient id="24" cx="96.6928" cy="57.3108" r="48.4711" fx="96.6928" fy="57.3108" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#24)" d="M 105.406 52.4048C 116.239 71.6429 121.128 89.4579 116.318 92.1658C 111.508 94.8738 98.8115 81.4558 87.979 62.2168C 77.1465 42.9778 72.2579 25.1638 77.0676 22.4558C 81.8773 19.7478 94.5739 33.1658 105.406 52.4048z"/>
+<defs><radialGradient id="25" cx="119.819" cy="47.8708" r="48.0557" fx="119.819" fy="47.8708" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#25)" d="M 129.477 45.2769C 135.203 66.6008 135.524 85.0708 130.193 86.5018C 124.863 87.9338 115.888 71.7878 110.161 50.4648C 104.434 29.1408 104.113 10.6718 109.444 9.23984C 114.775 7.80783 123.75 23.9538 129.477 45.2769z"/>
+</g>
+</g>
+</g>
+<defs><radialGradient id="26" cx="69.0797" cy="209.914" r="48.6339" fx="69.0797" fy="209.914" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#ffa048"/>
+<stop offset="1" style="stop-color:#ff472e"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#26)" d="M 62.6124 202.287C 79.4523 188.008 96.0187 179.835 99.5885 184.045C 103.158 188.255 92.3869 203.262 75.547 217.541C 58.707 231.82 42.1406 239.993 38.5709 235.783C 35.0011 231.573 45.7725 216.566 62.6124 202.287z"/>
+<defs><radialGradient id="27" cx="145.352" cy="145.241" r="92.2646" fx="145.352" fy="145.241" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#fff82e"/>
+<stop offset="1" style="stop-color:#ffffff"/>
+</radialGradient>
+</defs><path style="stroke:#000000; stroke-width:1; fill:url(#27)" d="M 85.3517 145.241C 85.3517 178.359 112.234 205.241 145.352 205.241C 178.47 205.241 205.352 178.359 205.352 145.241C 205.352 112.123 178.47 85.2408 145.352 85.2408C 112.234 85.2408 85.3517 112.123 85.3517 145.241z"/>
+</g>
+</svg>
diff --git a/doc/src/snippets/qt-namespace/main.cpp b/doc/src/snippets/qt-namespace/main.cpp
new file mode 100644
index 0000000..5b3d422
--- /dev/null
+++ b/doc/src/snippets/qt-namespace/main.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <Qt>
+
+int main(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/doc/src/snippets/qt-namespace/qt-namespace.pro b/doc/src/snippets/qt-namespace/qt-namespace.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qt-namespace/qt-namespace.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qtablewidget-dnd/Images/cubed.png b/doc/src/snippets/qtablewidget-dnd/Images/cubed.png
new file mode 100644
index 0000000..2cd9048
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/Images/cubed.png
Binary files differ
diff --git a/doc/src/snippets/qtablewidget-dnd/Images/squared.png b/doc/src/snippets/qtablewidget-dnd/Images/squared.png
new file mode 100644
index 0000000..bfdf993
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/Images/squared.png
Binary files differ
diff --git a/doc/src/snippets/qtablewidget-dnd/images.qrc b/doc/src/snippets/qtablewidget-dnd/images.qrc
new file mode 100644
index 0000000..1d49b52
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/images.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>Images/squared.png</file>
+ <file>Images/cubed.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/qtablewidget-dnd/main.cpp b/doc/src/snippets/qtablewidget-dnd/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtablewidget-dnd/mainwindow.cpp b/doc/src/snippets/qtablewidget-dnd/mainwindow.cpp
new file mode 100644
index 0000000..3b8f359
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/mainwindow.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "math.h"
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ QAction *sumItemsAction = itemsMenu->addAction(tr("&Sum Items"));
+ QAction *averageItemsAction = itemsMenu->addAction(tr("&Average Items"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+ tableWidget = new QTableWidget(12, 3, this);
+ tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ tableWidget->setDragEnabled(true);
+ tableWidget->setAcceptDrops(true);
+ tableWidget->setDropIndicatorShown(true);
+
+ QTableWidgetItem *valuesHeaderItem = new QTableWidgetItem(tr("Values"));
+ tableWidget->setHorizontalHeaderItem(0, valuesHeaderItem);
+ valuesHeaderItem->setTextAlignment(Qt::AlignVCenter);
+ QTableWidgetItem *squaresHeaderItem = new QTableWidgetItem(tr("Squares"));
+ squaresHeaderItem->setIcon(QIcon(QPixmap(":/Images/squared.png")));
+ squaresHeaderItem->setTextAlignment(Qt::AlignVCenter);
+ QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(tr("Cubes"));
+ cubesHeaderItem->setIcon(QIcon(QPixmap(":/Images/cubed.png")));
+ cubesHeaderItem->setTextAlignment(Qt::AlignVCenter);
+ tableWidget->setHorizontalHeaderItem(1, squaresHeaderItem);
+ tableWidget->setHorizontalHeaderItem(2, cubesHeaderItem);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(sumItemsAction, SIGNAL(triggered()), this, SLOT(sumItems()));
+ connect(averageItemsAction, SIGNAL(triggered()), this, SLOT(averageItems()));
+
+ setupTableItems();
+
+ setCentralWidget(tableWidget);
+ setWindowTitle(tr("Table Widget"));
+}
+
+void MainWindow::setupTableItems()
+{
+ for (int row = 0; row < tableWidget->rowCount()-1; ++row) {
+ for (int column = 0; column < tableWidget->columnCount(); ++column) {
+ QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(
+ pow((float)row, (float)column+1)));
+ tableWidget->setItem(row, column, newItem);
+ }
+ }
+ for (int column = 0; column < tableWidget->columnCount(); ++column) {
+ QTableWidgetItem *newItem = new QTableWidgetItem;
+ newItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
+ tableWidget->setItem(tableWidget->rowCount()-1, column, newItem);
+ }
+}
+
+void MainWindow::averageItems()
+{
+ QList<QTableWidgetItem *> selected = tableWidget->selectedItems();
+ QTableWidgetItem *item;
+ int number = 0;
+ double total = 0;
+
+ foreach (item, selected) {
+ bool ok;
+ double value = item->text().toDouble(&ok);
+
+ if (ok && !item->text().isEmpty()) {
+ total += value;
+ number++;
+ }
+ }
+ if (number > 0)
+ tableWidget->currentItem()->setText(QString::number(total/number));
+}
+
+void MainWindow::sumItems()
+{
+ QList<QTableWidgetItem *> selected = tableWidget->selectedItems();
+ QTableWidgetItem *item;
+ int number = 0;
+ double total = 0;
+
+ foreach (item, selected) {
+ bool ok;
+ double value = item->text().toDouble(&ok);
+
+ if (ok && !item->text().isEmpty()) {
+ total += value;
+ number++;
+ }
+ }
+ if (number > 0)
+ tableWidget->currentItem()->setText(QString::number(total));
+}
diff --git a/doc/src/snippets/qtablewidget-dnd/mainwindow.h b/doc/src/snippets/qtablewidget-dnd/mainwindow.h
new file mode 100644
index 0000000..5c955a7
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/mainwindow.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTableWidget;
+class QTableWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void averageItems();
+ void sumItems();
+
+private:
+ void setupTableItems();
+
+ QAction *removeAction;
+ QTableWidget *tableWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qtablewidget-dnd/qtablewidget-dnd.pro b/doc/src/snippets/qtablewidget-dnd/qtablewidget-dnd.pro
new file mode 100644
index 0000000..ffe134c
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-dnd/qtablewidget-dnd.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
+RESOURCES += images.qrc
diff --git a/doc/src/snippets/qtablewidget-resizing/main.cpp b/doc/src/snippets/qtablewidget-resizing/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-resizing/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp b/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
new file mode 100644
index 0000000..7920998
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-resizing/mainwindow.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *tableMenu = new QMenu(tr("&Table"));
+
+ QAction *tableWidthAction = tableMenu->addAction(tr("Change Table &Width"));
+ QAction *tableHeightAction = tableMenu->addAction(tr("Change Table &Height"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(tableMenu);
+
+//! [0]
+ tableWidget = new QTableWidget(this);
+//! [0]
+ tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(tableWidthAction, SIGNAL(triggered()), this, SLOT(changeWidth()));
+ connect(tableHeightAction, SIGNAL(triggered()), this, SLOT(changeHeight()));
+
+ setupTableItems();
+
+ setCentralWidget(tableWidget);
+ setWindowTitle(tr("Table Widget Resizing"));
+}
+
+void MainWindow::setupTableItems()
+{
+//! [1]
+ tableWidget->setRowCount(10);
+ tableWidget->setColumnCount(5);
+//! [1]
+
+ for (int row = 0; row < tableWidget->rowCount(); ++row) {
+ for (int column = 0; column < tableWidget->columnCount(); ++column) {
+//! [2]
+ QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(
+ (row+1)*(column+1)));
+ tableWidget->setItem(row, column, newItem);
+//! [2]
+ }
+ }
+}
+
+void MainWindow::changeWidth()
+{
+ bool ok;
+
+ int newWidth = QInputDialog::getInteger(this, tr("Change table width"),
+ tr("Input the number of columns required (1-20):"),
+ tableWidget->columnCount(), 1, 20, 1, &ok);
+
+ if (ok)
+ tableWidget->setColumnCount(newWidth);
+}
+
+void MainWindow::changeHeight()
+{
+ bool ok;
+
+ int newHeight = QInputDialog::getInteger(this, tr("Change table height"),
+ tr("Input the number of rows required (1-20):"),
+ tableWidget->rowCount(), 1, 20, 1, &ok);
+
+ if (ok)
+ tableWidget->setRowCount(newHeight);
+}
diff --git a/doc/src/snippets/qtablewidget-resizing/mainwindow.h b/doc/src/snippets/qtablewidget-resizing/mainwindow.h
new file mode 100644
index 0000000..5472372
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-resizing/mainwindow.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTableWidget;
+class QTableWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void changeHeight();
+ void changeWidth();
+
+private:
+ void setupTableItems();
+
+ QTableWidget *tableWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qtablewidget-resizing/qtablewidget-resizing.pro b/doc/src/snippets/qtablewidget-resizing/qtablewidget-resizing.pro
new file mode 100644
index 0000000..12a900a
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-resizing/qtablewidget-resizing.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qtablewidget-using/Images/cubed.png b/doc/src/snippets/qtablewidget-using/Images/cubed.png
new file mode 100644
index 0000000..2cd9048
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/Images/cubed.png
Binary files differ
diff --git a/doc/src/snippets/qtablewidget-using/Images/squared.png b/doc/src/snippets/qtablewidget-using/Images/squared.png
new file mode 100644
index 0000000..bfdf993
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/Images/squared.png
Binary files differ
diff --git a/doc/src/snippets/qtablewidget-using/images.qrc b/doc/src/snippets/qtablewidget-using/images.qrc
new file mode 100644
index 0000000..1d49b52
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/images.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>Images/squared.png</file>
+ <file>Images/cubed.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/qtablewidget-using/main.cpp b/doc/src/snippets/qtablewidget-using/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtablewidget-using/mainwindow.cpp b/doc/src/snippets/qtablewidget-using/mainwindow.cpp
new file mode 100644
index 0000000..b16ef70
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/mainwindow.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "math.h"
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ QAction *sumItemsAction = itemsMenu->addAction(tr("&Sum Items"));
+ QAction *averageItemsAction = itemsMenu->addAction(tr("&Average Items"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+//! [0]
+ tableWidget = new QTableWidget(12, 3, this);
+//! [0]
+ tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
+
+//! [1]
+ QTableWidgetItem *valuesHeaderItem = new QTableWidgetItem(tr("Values"));
+ tableWidget->setHorizontalHeaderItem(0, valuesHeaderItem);
+//! [1]
+ valuesHeaderItem->setTextAlignment(Qt::AlignVCenter);
+ QTableWidgetItem *squaresHeaderItem = new QTableWidgetItem(tr("Squares"));
+ squaresHeaderItem->setIcon(QIcon(QPixmap(":/Images/squared.png")));
+ squaresHeaderItem->setTextAlignment(Qt::AlignVCenter);
+//! [2]
+ QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(tr("Cubes"));
+ cubesHeaderItem->setIcon(QIcon(QPixmap(":/Images/cubed.png")));
+ cubesHeaderItem->setTextAlignment(Qt::AlignVCenter);
+//! [2]
+ tableWidget->setHorizontalHeaderItem(1, squaresHeaderItem);
+ tableWidget->setHorizontalHeaderItem(2, cubesHeaderItem);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(sumItemsAction, SIGNAL(triggered()), this, SLOT(sumItems()));
+ connect(averageItemsAction, SIGNAL(triggered()), this, SLOT(averageItems()));
+
+ setupTableItems();
+
+ setCentralWidget(tableWidget);
+ setWindowTitle(tr("Table Widget"));
+}
+
+void MainWindow::setupTableItems()
+{
+ for (int row = 0; row < tableWidget->rowCount()-1; ++row) {
+ for (int column = 0; column < tableWidget->columnCount(); ++column) {
+//! [3]
+ QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(
+ pow(row, column+1)));
+ tableWidget->setItem(row, column, newItem);
+//! [3]
+ }
+ }
+ for (int column = 0; column < tableWidget->columnCount(); ++column) {
+ QTableWidgetItem *newItem = new QTableWidgetItem;
+ newItem->setFlags(Qt::ItemIsEnabled);
+ tableWidget->setItem(tableWidget->rowCount()-1, column, newItem);
+ }
+}
+
+void MainWindow::averageItems()
+{
+ QList<QTableWidgetItem *> selected = tableWidget->selectedItems();
+ QTableWidgetItem *item;
+ int number = 0;
+ double total = 0;
+
+ foreach (item, selected) {
+ bool ok;
+ double value = item->text().toDouble(&ok);
+
+ if (ok && !item->text().isEmpty()) {
+ total += value;
+ number++;
+ }
+ }
+ if (number > 0)
+ tableWidget->currentItem()->setText(QString::number(total/number));
+}
+
+void MainWindow::sumItems()
+{
+//! [4]
+ QList<QTableWidgetItem *> selected = tableWidget->selectedItems();
+ QTableWidgetItem *item;
+ int number = 0;
+ double total = 0;
+
+ foreach (item, selected) {
+ bool ok;
+ double value = item->text().toDouble(&ok);
+
+ if (ok && !item->text().isEmpty()) {
+ total += value;
+ number++;
+ }
+ }
+//! [4]
+ if (number > 0)
+ tableWidget->currentItem()->setText(QString::number(total));
+}
diff --git a/doc/src/snippets/qtablewidget-using/mainwindow.h b/doc/src/snippets/qtablewidget-using/mainwindow.h
new file mode 100644
index 0000000..fb18e33
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/mainwindow.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTableWidget;
+class QTableWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void averageItems();
+ void sumItems();
+
+private:
+ void setupTableItems();
+
+ QAction *removeAction;
+//! [0]
+ QTableWidget *tableWidget;
+//! [0]
+};
+
+#endif
diff --git a/doc/src/snippets/qtablewidget-using/qtablewidget-using.pro b/doc/src/snippets/qtablewidget-using/qtablewidget-using.pro
new file mode 100644
index 0000000..ffe134c
--- /dev/null
+++ b/doc/src/snippets/qtablewidget-using/qtablewidget-using.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
+RESOURCES += images.qrc
diff --git a/doc/src/snippets/qtcast/qtcast.cpp b/doc/src/snippets/qtcast/qtcast.cpp
new file mode 100644
index 0000000..2294bb7
--- /dev/null
+++ b/doc/src/snippets/qtcast/qtcast.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QLabel>
+#include <QPushButton>
+
+#include "qtcast.h"
+
+MyWidget::MyWidget()
+{
+//! [0]
+ QObject *obj = new MyWidget;
+//! [0]
+
+//! [1]
+ QWidget *widget = qobject_cast<QWidget *>(obj);
+//! [1]
+
+//! [2]
+ MyWidget *myWidget = qobject_cast<MyWidget *>(obj);
+//! [2]
+
+//! [3]
+ QLabel *label = qobject_cast<QLabel *>(obj);
+//! [3] //! [4]
+ // label is 0
+//! [4]
+
+//! [5]
+ if (QLabel *label = qobject_cast<QLabel *>(obj)) {
+//! [5] //! [6]
+ label->setText(tr("Ping"));
+ } else if (QPushButton *button = qobject_cast<QPushButton *>(obj)) {
+ button->setText(tr("Pong!"));
+ }
+//! [6]
+}
+
+int main()
+{
+ return 0;
+}
diff --git a/doc/src/snippets/qtcast/qtcast.h b/doc/src/snippets/qtcast/qtcast.h
new file mode 100644
index 0000000..ee43b14
--- /dev/null
+++ b/doc/src/snippets/qtcast/qtcast.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTCAST_H
+#define QTCAST_H
+
+#include <QWidget>
+
+class MyWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MyWidget();
+};
+
+#endif
diff --git a/doc/src/snippets/qtcast/qtcast.pro b/doc/src/snippets/qtcast/qtcast.pro
new file mode 100644
index 0000000..6476162
--- /dev/null
+++ b/doc/src/snippets/qtcast/qtcast.pro
@@ -0,0 +1,2 @@
+HEADERS = qtcast.h
+SOURCES = qtcast.cpp
diff --git a/doc/src/snippets/qtest-namespace/main.cpp b/doc/src/snippets/qtest-namespace/main.cpp
new file mode 100644
index 0000000..51d6560
--- /dev/null
+++ b/doc/src/snippets/qtest-namespace/main.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QTest>
+
+int main(int argc, char *argv[])
+{
+ QTest::qSleep(10);
+ return 0;
+}
diff --git a/doc/src/snippets/qtest-namespace/qtest-namespace.pro b/doc/src/snippets/qtest-namespace/qtest-namespace.pro
new file mode 100644
index 0000000..0dfaf99
--- /dev/null
+++ b/doc/src/snippets/qtest-namespace/qtest-namespace.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+CONFIG += qtestlib
diff --git a/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp b/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp
new file mode 100644
index 0000000..a02f373
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/dragdropmodel.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dragdropmodel.h"
+
+DragDropModel::DragDropModel(const QStringList &strings, QObject *parent)
+ : TreeModel(strings, parent)
+{
+}
+
+bool DragDropModel::dropMimeData(const QMimeData *data,
+ Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (!data->hasFormat("text/plain"))
+ return false;
+
+ int beginRow;
+
+ if (row != -1)
+ beginRow = row;
+ else if (parent.isValid())
+ beginRow = 0;
+ else
+ beginRow = rowCount(QModelIndex());
+
+ QByteArray encodedData = data->data("text/plain");
+ QDataStream stream(&encodedData, QIODevice::ReadOnly);
+ QHash<qint64, QMap<int,QHash<int,QString> > > newItems;
+
+ while (!stream.atEnd()) {
+ qint64 id;
+ int row;
+ int column;
+ QString text;
+ stream >> id >> row >> column >> text;
+ newItems[id][row][column] = text;
+ }
+ int rows = newItems.count();
+
+ insertRows(beginRow, rows, parent);
+ QMap<int,QHash<int,QString> > childItems;
+ foreach (childItems, newItems.values()) {
+ QHash<int,QString> rowItems;
+ foreach (rowItems, childItems.values()) {
+ foreach (int column, rowItems.keys()) {
+ QModelIndex idx = index(beginRow, column, parent);
+ setData(idx, rowItems[column]);
+ }
+ ++beginRow;
+ }
+ }
+
+ return true;
+}
+
+Qt::ItemFlags DragDropModel::flags(const QModelIndex &index) const
+{
+ Qt::ItemFlags defaultFlags = TreeModel::flags(index);
+
+ if (index.isValid())
+ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
+ else
+ return Qt::ItemIsDropEnabled | defaultFlags;
+}
+
+QMimeData *DragDropModel::mimeData(const QModelIndexList &indexes) const
+{
+ QMimeData *mimeData = new QMimeData();
+ QByteArray encodedData;
+
+ QDataStream stream(&encodedData, QIODevice::WriteOnly);
+
+ foreach (QModelIndex index, indexes) {
+ if (index.isValid()) {
+ QString text = data(index, Qt::DisplayRole).toString();
+ stream << index.internalId() << index.row() << index.column() << text;
+ }
+ }
+
+ mimeData->setData("text/plain", encodedData);
+ return mimeData;
+}
+
+QStringList DragDropModel::mimeTypes() const
+{
+ QStringList types;
+ types << "text/plain";
+ return types;
+}
+
+Qt::DropActions DragDropModel::supportedDropActions() const
+{
+ return Qt::CopyAction | Qt::MoveAction;
+}
diff --git a/doc/src/snippets/qtreeview-dnd/dragdropmodel.h b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
new file mode 100644
index 0000000..b8cef91
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of an example program for Qt.
+** EDITIONS: NOLIMITS
+**
+****************************************************************************/
+
+#ifndef DRAGDROPMODEL_H
+#define DRAGDROPMODEL_H
+
+#include "treemodel.h"
+
+class DragDropModel : public TreeModel
+{
+ Q_OBJECT
+
+public:
+ DragDropModel(const QStringList &strings, QObject *parent = 0);
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const;
+ Qt::DropActions supportedDropActions() const;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreeview-dnd/main.cpp b/doc/src/snippets/qtreeview-dnd/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtreeview-dnd/mainwindow.cpp b/doc/src/snippets/qtreeview-dnd/mainwindow.cpp
new file mode 100644
index 0000000..f98333f
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/mainwindow.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "dragdropmodel.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+
+// For convenient quoting:
+ QTreeView *treeView = new QTreeView(this);
+ treeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ treeView->setDragEnabled(true);
+ treeView->setAcceptDrops(true);
+ treeView->setDropIndicatorShown(true);
+
+ this->treeView = treeView;
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setupItems();
+
+ setCentralWidget(treeView);
+ setWindowTitle(tr("Tree View"));
+}
+
+void MainWindow::setupItems()
+{
+ QStringList items;
+ items << tr("Widgets\tUser interface objects used to create GUI applications.")
+ << tr(" QWidget\tThe basic building block for all other widgets.")
+ << tr(" QDialog\tThe base class for dialog windows.")
+ << tr("Tools\tUtilities and applications for Qt developers.")
+ << tr(" Qt Designer\tA GUI form designer for Qt applications.")
+ << tr(" Qt Assistant\tA documentation browser for Qt documentation.");
+
+ DragDropModel *model = new DragDropModel(items, this);
+ QModelIndex index = model->index(0, 0, QModelIndex());
+ model->insertRows(2, 3, index);
+ index = model->index(0, 0, QModelIndex());
+ index = model->index(2, 0, index);
+ model->setData(index, QVariant("QFrame"));
+ model->removeRows(3, 2, index.parent());
+ treeView->setModel(model);
+}
diff --git a/doc/src/snippets/qtreeview-dnd/mainwindow.h b/doc/src/snippets/qtreeview-dnd/mainwindow.h
new file mode 100644
index 0000000..ca0d947
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/mainwindow.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTreeView;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void setupItems();
+
+ QTreeView *treeView;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreeview-dnd/qtreeview-dnd.pro b/doc/src/snippets/qtreeview-dnd/qtreeview-dnd.pro
new file mode 100644
index 0000000..5dfabfc
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/qtreeview-dnd.pro
@@ -0,0 +1,9 @@
+SOURCES = dragdropmodel.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ treeitem.cpp \
+ treemodel.cpp
+HEADERS = dragdropmodel.h \
+ mainwindow.h \
+ treeitem.h \
+ treemodel.h
diff --git a/doc/src/snippets/qtreeview-dnd/treeitem.cpp b/doc/src/snippets/qtreeview-dnd/treeitem.cpp
new file mode 100644
index 0000000..99ce09a
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/treeitem.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ treeitem.cpp
+
+ A container for items of data supplied by the simple tree model.
+*/
+
+#include <QStringList>
+
+#include "treeitem.h"
+
+TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
+{
+ parentItem = parent;
+ itemData = data;
+}
+
+TreeItem::~TreeItem()
+{
+ qDeleteAll(childItems);
+}
+
+void TreeItem::appendChild(TreeItem *item)
+{
+ childItems.append(item);
+}
+
+TreeItem *TreeItem::child(int row)
+{
+ return childItems.value(row);
+}
+
+int TreeItem::childCount() const
+{
+ return childItems.count();
+}
+
+int TreeItem::columnCount() const
+{
+ return itemData.count();
+}
+
+QVariant TreeItem::data(int column) const
+{
+ return itemData.value(column);
+}
+
+bool TreeItem::insertChild(int row, TreeItem *item)
+{
+ if (row < 0 || row > childItems.count())
+ return false;
+
+ childItems.insert(row, item);
+ return true;
+}
+
+TreeItem *TreeItem::parent()
+{
+ return parentItem;
+}
+
+bool TreeItem::removeChild(int row)
+{
+ if (row < 0 || row >= childItems.count())
+ return false;
+
+ delete childItems.takeAt(row);
+ return true;
+}
+
+int TreeItem::row() const
+{
+ if (parentItem)
+ return parentItem->childItems.indexOf(const_cast<TreeItem*>(this));
+
+ return 0;
+}
+
+bool TreeItem::setData(int column, const QVariant &data)
+{
+ if (column < 0 || column >= itemData.count())
+ return false;
+
+ itemData.replace(column, data);
+ return true;
+}
diff --git a/doc/src/snippets/qtreeview-dnd/treeitem.h b/doc/src/snippets/qtreeview-dnd/treeitem.h
new file mode 100644
index 0000000..84116ba
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/treeitem.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEITEM_H
+#define TREEITEM_H
+
+#include <QList>
+#include <QVariant>
+
+class TreeItem
+{
+public:
+ TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
+ ~TreeItem();
+
+ void appendChild(TreeItem *child);
+
+ TreeItem *child(int row);
+ int childCount() const;
+ int columnCount() const;
+ QVariant data(int column) const;
+ bool insertChild(int row, TreeItem *item);
+ TreeItem *parent();
+ bool removeChild(int row);
+ int row() const;
+ bool setData(int column, const QVariant &data);
+
+private:
+ QList<TreeItem*> childItems;
+ QList<QVariant> itemData;
+ TreeItem *parentItem;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreeview-dnd/treemodel.cpp b/doc/src/snippets/qtreeview-dnd/treemodel.cpp
new file mode 100644
index 0000000..0fd0682
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/treemodel.cpp
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ treemodel.cpp
+
+ Provides a simple tree model to show how to create and use hierarchical
+ models.
+*/
+
+#include <QtGui>
+
+#include "treeitem.h"
+#include "treemodel.h"
+
+TreeModel::TreeModel(const QStringList &strings, QObject *parent)
+ : QAbstractItemModel(parent)
+{
+ QList<QVariant> rootData;
+ rootData << "Title" << "Summary";
+ rootItem = new TreeItem(rootData);
+ setupModelData(strings, rootItem);
+}
+
+TreeModel::~TreeModel()
+{
+ delete rootItem;
+}
+
+int TreeModel::columnCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return static_cast<TreeItem*>(parent.internalPointer())->columnCount();
+ else
+ return rootItem->columnCount();
+}
+
+QVariant TreeModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
+
+ return item->data(index.column());
+}
+
+Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+
+QVariant TreeModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+ return rootItem->data(section);
+
+ return QVariant();
+}
+
+QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent)
+ const
+{
+ TreeItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ TreeItem *childItem = parentItem->child(row);
+ if (childItem)
+ return createIndex(row, column, childItem);
+ else
+ return QModelIndex();
+}
+
+bool TreeModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ TreeItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ if (position < 0 || position > parentItem->childCount())
+ return false;
+
+ QList<QVariant> blankList;
+ for (int column = 0; column < columnCount(); ++column)
+ blankList << QVariant("");
+
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ TreeItem *newItem = new TreeItem(blankList, parentItem);
+ if (!parentItem->insertChild(position, newItem))
+ break;
+ }
+
+ endInsertRows();
+ return true;
+}
+
+QModelIndex TreeModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ TreeItem *childItem = static_cast<TreeItem*>(index.internalPointer());
+ TreeItem *parentItem = childItem->parent();
+
+ if (parentItem == rootItem)
+ return QModelIndex();
+
+ return createIndex(parentItem->row(), 0, parentItem);
+}
+
+bool TreeModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ TreeItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ if (position < 0 || position > parentItem->childCount())
+ return false;
+
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ if (!parentItem->removeChild(position))
+ break;
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+int TreeModel::rowCount(const QModelIndex &parent) const
+{
+ TreeItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ return parentItem->childCount();
+}
+
+bool TreeModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
+
+ if (item->setData(index.column(), value))
+ emit dataChanged(index, index);
+ else
+ return false;
+
+ return true;
+}
+
+void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
+{
+ QList<TreeItem*> parents;
+ QList<int> indentations;
+ parents << parent;
+ indentations << 0;
+
+ int number = 0;
+
+ while (number < lines.count()) {
+ int position = 0;
+ while (position < lines[number].length()) {
+ if (lines[number].mid(position, 1) != " ")
+ break;
+ position++;
+ }
+
+ QString lineData = lines[number].mid(position).trimmed();
+
+ if (!lineData.isEmpty()) {
+ // Read the column data from the rest of the line.
+ QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
+ QList<QVariant> columnData;
+ for (int column = 0; column < columnStrings.count(); ++column)
+ columnData << columnStrings[column];
+
+ if (position > indentations.last()) {
+ // The last child of the current parent is now the new parent
+ // unless the current parent has no children.
+
+ if (parents.last()->childCount() > 0) {
+ parents << parents.last()->child(parents.last()->childCount()-1);
+ indentations << position;
+ }
+ } else {
+ while (position < indentations.last() && parents.count() > 0) {
+ parents.pop_back();
+ indentations.pop_back();
+ }
+ }
+
+ // Append a new item to the current parent's list of children.
+ parents.last()->appendChild(new TreeItem(columnData, parents.last()));
+ }
+
+ number++;
+ }
+}
diff --git a/doc/src/snippets/qtreeview-dnd/treemodel.h b/doc/src/snippets/qtreeview-dnd/treemodel.h
new file mode 100644
index 0000000..e0a45b3
--- /dev/null
+++ b/doc/src/snippets/qtreeview-dnd/treemodel.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEMODEL_H
+#define TREEMODEL_H
+
+#include <QAbstractItemModel>
+#include <QModelIndex>
+#include <QVariant>
+
+class TreeItem;
+
+class TreeModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ TreeModel(const QStringList &strings, QObject *parent = 0);
+ ~TreeModel();
+
+ QVariant data(const QModelIndex &index, int role) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+ QModelIndex index(int row, int column,
+ const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+private:
+ void setupModelData(const QStringList &lines, TreeItem *parent);
+
+ TreeItem *rootItem;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreewidget-using/main.cpp b/doc/src/snippets/qtreewidget-using/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtreewidget-using/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtreewidget-using/mainwindow.cpp b/doc/src/snippets/qtreewidget-using/mainwindow.cpp
new file mode 100644
index 0000000..68ab54b
--- /dev/null
+++ b/doc/src/snippets/qtreewidget-using/mainwindow.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ insertAction = itemsMenu->addAction(tr("&Insert Item"));
+ removeAction = itemsMenu->addAction(tr("&Remove Item"));
+ removeAction->setEnabled(false);
+ itemsMenu->addSeparator();
+ ascendingAction = itemsMenu->addAction(tr("Sort in &Ascending Order"));
+ descendingAction = itemsMenu->addAction(tr("Sort in &Descending Order"));
+ autoSortAction = itemsMenu->addAction(tr("&Automatically Sort Items"));
+ autoSortAction->setCheckable(true);
+ itemsMenu->addSeparator();
+ QAction *findItemsAction = itemsMenu->addAction(tr("&Find Items"));
+ findItemsAction->setShortcut(tr("Ctrl+F"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+/* For convenient quoting:
+//! [0]
+ QTreeWidget *treeWidget = new QTreeWidget(this);
+//! [0]
+*/
+ treeWidget = new QTreeWidget(this);
+//! [1]
+ treeWidget->setColumnCount(2);
+//! [1] //! [2]
+ QStringList headers;
+ headers << tr("Subject") << tr("Default");
+ treeWidget->setHeaderLabels(headers);
+//! [2]
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(ascendingAction, SIGNAL(triggered()), this, SLOT(sortAscending()));
+ connect(autoSortAction, SIGNAL(triggered()), this, SLOT(updateSortItems()));
+ connect(descendingAction, SIGNAL(triggered()), this, SLOT(sortDescending()));
+ connect(findItemsAction, SIGNAL(triggered()), this, SLOT(findItems()));
+ connect(insertAction, SIGNAL(triggered()), this, SLOT(insertItem()));
+ connect(removeAction, SIGNAL(triggered()), this, SLOT(removeItem()));
+ connect(treeWidget,
+ SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+ this, SLOT(updateMenus(QTreeWidgetItem *)));
+
+ setupTreeItems();
+ updateMenus(treeWidget->currentItem());
+
+ setCentralWidget(treeWidget);
+ setWindowTitle(tr("Tree Widget"));
+}
+
+void MainWindow::setupTreeItems()
+{
+//! [3]
+ QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
+ cities->setText(0, tr("Cities"));
+ QTreeWidgetItem *osloItem = new QTreeWidgetItem(cities);
+ osloItem->setText(0, tr("Oslo"));
+ osloItem->setText(1, tr("Yes"));
+//! [3]
+
+ (new QTreeWidgetItem(cities))->setText(0, tr("Stockholm"));
+ (new QTreeWidgetItem(cities))->setText(0, tr("Helsinki"));
+ (new QTreeWidgetItem(cities))->setText(0, tr("Copenhagen"));
+
+//! [4] //! [5]
+ QTreeWidgetItem *planets = new QTreeWidgetItem(treeWidget, cities);
+//! [4]
+ planets->setText(0, tr("Planets"));
+//! [5]
+ (new QTreeWidgetItem(planets))->setText(0, tr("Mercury"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Venus"));
+
+ QTreeWidgetItem *earthItem = new QTreeWidgetItem(planets);
+ earthItem->setText(0, tr("Earth"));
+ earthItem->setText(1, tr("Yes"));
+
+ (new QTreeWidgetItem(planets))->setText(0, tr("Mars"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Jupiter"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Saturn"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Uranus"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Neptune"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Pluto"));
+}
+
+void MainWindow::findItems()
+{
+ QString itemText = QInputDialog::getText(this, tr("Find Items"),
+ tr("Text to find (including wildcards):"));
+
+ if (itemText.isEmpty())
+ return;
+
+//! [6]
+ QTreeWidgetItem *item;
+//! [6]
+ foreach (item, treeWidget->selectedItems())
+ treeWidget->setItemSelected(item, false);
+
+//! [7]
+ QList<QTreeWidgetItem *> found = treeWidget->findItems(
+ itemText, Qt::MatchWildcard);
+
+ foreach (item, found) {
+ treeWidget->setItemSelected(item, true);
+ // Show the item->text(0) for each item.
+ }
+//! [7]
+}
+
+void MainWindow::insertItem()
+{
+ QTreeWidgetItem *currentItem = treeWidget->currentItem();
+
+ if (!currentItem)
+ return;
+
+ QString itemText = QInputDialog::getText(this, tr("Insert Item"),
+ tr("Input text for the new item:"));
+
+ if (itemText.isEmpty())
+ return;
+
+//! [8]
+ QTreeWidgetItem *parent = currentItem->parent();
+ QTreeWidgetItem *newItem;
+ if (parent)
+ newItem = new QTreeWidgetItem(parent, treeWidget->currentItem());
+ else
+//! [8] //! [9]
+ newItem = new QTreeWidgetItem(treeWidget, treeWidget->currentItem());
+//! [9]
+
+ newItem->setText(0, itemText);
+}
+
+void MainWindow::removeItem()
+{
+ QTreeWidgetItem *currentItem = treeWidget->currentItem();
+
+ if (!currentItem)
+ return;
+
+//! [10]
+ QTreeWidgetItem *parent = currentItem->parent();
+ int index;
+
+ if (parent) {
+ index = parent->indexOfChild(treeWidget->currentItem());
+ delete parent->takeChild(index);
+ } else {
+ index = treeWidget->indexOfTopLevelItem(treeWidget->currentItem());
+ delete treeWidget->takeTopLevelItem(index);
+//! [10] //! [11]
+ }
+//! [11]
+}
+
+void MainWindow::sortAscending()
+{
+ treeWidget->sortItems(0, Qt::AscendingOrder);
+}
+
+void MainWindow::sortDescending()
+{
+ treeWidget->sortItems(0, Qt::DescendingOrder);
+}
+
+void MainWindow::updateMenus(QTreeWidgetItem *current)
+{
+ insertAction->setEnabled(current != 0);
+ removeAction->setEnabled(current != 0);
+}
+
+void MainWindow::updateSortItems()
+{
+ ascendingAction->setEnabled(!autoSortAction->isChecked());
+ descendingAction->setEnabled(!autoSortAction->isChecked());
+
+ treeWidget->setSortingEnabled(autoSortAction->isChecked());
+}
diff --git a/doc/src/snippets/qtreewidget-using/mainwindow.h b/doc/src/snippets/qtreewidget-using/mainwindow.h
new file mode 100644
index 0000000..4ffb9f3
--- /dev/null
+++ b/doc/src/snippets/qtreewidget-using/mainwindow.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void findItems();
+ void insertItem();
+ void removeItem();
+ void sortAscending();
+ void sortDescending();
+ void updateMenus(QTreeWidgetItem *current);
+ void updateSortItems();
+
+private:
+ void setupTreeItems();
+
+ QAction *ascendingAction;
+ QAction *autoSortAction;
+ QAction *descendingAction;
+ QAction *insertAction;
+ QAction *removeAction;
+ QTreeWidget *treeWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreewidget-using/qtreewidget-using.pro b/doc/src/snippets/qtreewidget-using/qtreewidget-using.pro
new file mode 100644
index 0000000..12a900a
--- /dev/null
+++ b/doc/src/snippets/qtreewidget-using/qtreewidget-using.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/main.cpp b/doc/src/snippets/qtreewidgetitemiterator-using/main.cpp
new file mode 100644
index 0000000..19c7c20
--- /dev/null
+++ b/doc/src/snippets/qtreewidgetitemiterator-using/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
new file mode 100644
index 0000000..d3f3c39
--- /dev/null
+++ b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *itemsMenu = new QMenu(tr("&Items"));
+
+ insertAction = itemsMenu->addAction(tr("&Insert Item"));
+ removeAction = itemsMenu->addAction(tr("&Remove Item"));
+ removeAction->setEnabled(false);
+ itemsMenu->addSeparator();
+ ascendingAction = itemsMenu->addAction(tr("Sort in &Ascending Order"));
+ descendingAction = itemsMenu->addAction(tr("Sort in &Descending Order"));
+ autoSortAction = itemsMenu->addAction(tr("&Automatically Sort Items"));
+ autoSortAction->setCheckable(true);
+ itemsMenu->addSeparator();
+ QAction *findItemsAction = itemsMenu->addAction(tr("&Find Items"));
+ findItemsAction->setShortcut(tr("Ctrl+F"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(itemsMenu);
+
+/* For convenient quoting:
+ QTreeWidget *treeWidget = new QTreeWidget(this);
+*/
+ treeWidget = new QTreeWidget(this);
+ treeWidget->setColumnCount(2);
+ QStringList headers;
+ headers << tr("Subject") << tr("Default");
+ treeWidget->setHeaderLabels(headers);
+
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(ascendingAction, SIGNAL(triggered()), this, SLOT(sortAscending()));
+ connect(autoSortAction, SIGNAL(triggered()), this, SLOT(updateSortItems()));
+ connect(descendingAction, SIGNAL(triggered()), this, SLOT(sortDescending()));
+ connect(findItemsAction, SIGNAL(triggered()), this, SLOT(findItems()));
+ connect(insertAction, SIGNAL(triggered()), this, SLOT(insertItem()));
+ connect(removeAction, SIGNAL(triggered()), this, SLOT(removeItem()));
+ connect(treeWidget,
+ SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+ this, SLOT(updateMenus(QTreeWidgetItem *)));
+
+ setupTreeItems();
+ updateMenus(treeWidget->currentItem());
+
+ setCentralWidget(treeWidget);
+ setWindowTitle(tr("Tree Widget"));
+}
+
+void MainWindow::setupTreeItems()
+{
+ QTreeWidgetItem *planets = new QTreeWidgetItem(treeWidget);
+ planets->setText(0, tr("Planets"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Mercury"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Venus"));
+
+ QTreeWidgetItem *earthItem = new QTreeWidgetItem(planets);
+ earthItem->setText(0, tr("Earth"));
+ earthItem->setText(1, tr("Yes"));
+
+ (new QTreeWidgetItem(planets))->setText(0, tr("Mars"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Jupiter"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Saturn"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Uranus"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Neptune"));
+ (new QTreeWidgetItem(planets))->setText(0, tr("Pluto"));
+}
+
+void MainWindow::findItems()
+{
+ QString itemText = QInputDialog::getText(this, tr("Find Items"),
+ tr("Text to find:"));
+
+ if (itemText.isEmpty())
+ return;
+
+//! [0]
+ QTreeWidgetItemIterator it(treeWidget);
+ while (*it) {
+ if ((*it)->text(0) == itemText)
+ (*it)->setSelected(true);
+ ++it;
+ }
+//! [0]
+}
+
+void MainWindow::insertItem()
+{
+ QTreeWidgetItem *currentItem = treeWidget->currentItem();
+
+ if (!currentItem)
+ return;
+
+ QString itemText = QInputDialog::getText(this, tr("Insert Item"),
+ tr("Input text for the new item:"));
+
+ if (itemText.isEmpty())
+ return;
+
+ QTreeWidgetItem *parent = currentItem->parent();
+ QTreeWidgetItem *newItem;
+ if (parent)
+ newItem = new QTreeWidgetItem(parent, treeWidget->currentItem());
+ else
+ newItem = new QTreeWidgetItem(treeWidget, treeWidget->currentItem());
+
+ newItem->setText(0, itemText);
+}
+
+void MainWindow::removeItem()
+{
+ QTreeWidgetItem *currentItem = treeWidget->currentItem();
+
+ if (!currentItem)
+ return;
+
+ QTreeWidgetItem *parent = currentItem->parent();
+ int index;
+
+ if (parent) {
+ index = parent->indexOfChild(treeWidget->currentItem());
+ delete parent->takeChild(index);
+ } else {
+ index = treeWidget->indexOfTopLevelItem(treeWidget->currentItem());
+ delete treeWidget->takeTopLevelItem(index);
+ }
+}
+
+void MainWindow::sortAscending()
+{
+ treeWidget->sortItems(0, Qt::AscendingOrder);
+}
+
+void MainWindow::sortDescending()
+{
+ treeWidget->sortItems(0, Qt::DescendingOrder);
+}
+
+void MainWindow::updateMenus(QTreeWidgetItem *current)
+{
+ insertAction->setEnabled(current != 0);
+ removeAction->setEnabled(current != 0);
+}
+
+void MainWindow::updateSortItems()
+{
+ ascendingAction->setEnabled(!autoSortAction->isChecked());
+ descendingAction->setEnabled(!autoSortAction->isChecked());
+
+ treeWidget->setSortingEnabled(autoSortAction->isChecked());
+}
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h
new file mode 100644
index 0000000..4ffb9f3
--- /dev/null
+++ b/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QAction;
+class QTreeWidget;
+class QTreeWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void findItems();
+ void insertItem();
+ void removeItem();
+ void sortAscending();
+ void sortDescending();
+ void updateMenus(QTreeWidgetItem *current);
+ void updateSortItems();
+
+private:
+ void setupTreeItems();
+
+ QAction *ascendingAction;
+ QAction *autoSortAction;
+ QAction *descendingAction;
+ QAction *insertAction;
+ QAction *removeAction;
+ QTreeWidget *treeWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/qtreewidgetitemiterator-using/qtreewidgetitemiterator-using.pro b/doc/src/snippets/qtreewidgetitemiterator-using/qtreewidgetitemiterator-using.pro
new file mode 100644
index 0000000..12a900a
--- /dev/null
+++ b/doc/src/snippets/qtreewidgetitemiterator-using/qtreewidgetitemiterator-using.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp \
+ mainwindow.cpp
+HEADERS = mainwindow.h
diff --git a/doc/src/snippets/qtscript/evaluation/evaluation.pro b/doc/src/snippets/qtscript/evaluation/evaluation.pro
new file mode 100644
index 0000000..a495c02
--- /dev/null
+++ b/doc/src/snippets/qtscript/evaluation/evaluation.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+QT += script
diff --git a/doc/src/snippets/qtscript/evaluation/main.cpp b/doc/src/snippets/qtscript/evaluation/main.cpp
new file mode 100644
index 0000000..a80ef7e
--- /dev/null
+++ b/doc/src/snippets/qtscript/evaluation/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtScript>
+
+int main(int argc, char *argv[])
+{
+//! [0]
+ QScriptEngine engine;
+ qDebug() << "the magic number is:" << engine.evaluate("1 + 2").toNumber();
+//! [0]
+ return 0;
+}
diff --git a/doc/src/snippets/qtscript/registeringobjects/main.cpp b/doc/src/snippets/qtscript/registeringobjects/main.cpp
new file mode 100644
index 0000000..88f37b6
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringobjects/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+#include <QtScript>
+#include "myobject.h"
+
+int main(int argc, char *argv[])
+{
+//! [0]
+ QScriptEngine engine;
+ QObject *someObject = new MyObject;
+ QScriptValue objectValue = engine.newQObject(someObject);
+ engine.globalObject().setProperty("myObject", objectValue);
+//! [0]
+ qDebug() << "myObject's calculate() function returns"
+ << engine.evaluate("myObject.calculate(10)").toNumber();
+ return 0;
+}
diff --git a/doc/src/snippets/qtscript/registeringobjects/myobject.cpp b/doc/src/snippets/qtscript/registeringobjects/myobject.cpp
new file mode 100644
index 0000000..ac3ed68
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringobjects/myobject.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "myobject.h"
+
+MyObject::MyObject()
+{
+}
+
+int MyObject::calculate(int value) const
+{
+ int total = 0;
+ for (int i = 0; i <= value; ++i)
+ total += i;
+ return total;
+}
diff --git a/doc/src/snippets/qtscript/registeringobjects/myobject.h b/doc/src/snippets/qtscript/registeringobjects/myobject.h
new file mode 100644
index 0000000..82706c3
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringobjects/myobject.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYOBJECT_H
+#define MYOBJECT_H
+
+#include <QObject>
+
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyObject();
+
+public slots:
+ int calculate(int value) const;
+};
+
+#endif
diff --git a/doc/src/snippets/qtscript/registeringobjects/registeringobjects.pro b/doc/src/snippets/qtscript/registeringobjects/registeringobjects.pro
new file mode 100644
index 0000000..0a755e2
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringobjects/registeringobjects.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp \
+ myobject.cpp
+HEADERS = myobject.h
+QT += script
diff --git a/doc/src/snippets/qtscript/registeringvalues/main.cpp b/doc/src/snippets/qtscript/registeringvalues/main.cpp
new file mode 100644
index 0000000..d9c9c74
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringvalues/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtScript>
+
+int main(int argc, char *argv[])
+{
+ QScriptEngine engine;
+//! [0]
+ engine.globalObject().setProperty("foo", 123);
+ qDebug() << "foo times two is:" << engine.evaluate("foo * 2").toNumber();
+//! [0]
+ return 0;
+}
+
diff --git a/doc/src/snippets/qtscript/registeringvalues/registeringvalues.pro b/doc/src/snippets/qtscript/registeringvalues/registeringvalues.pro
new file mode 100644
index 0000000..a495c02
--- /dev/null
+++ b/doc/src/snippets/qtscript/registeringvalues/registeringvalues.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+QT += script
diff --git a/doc/src/snippets/qtscript/scriptedslot/main.cpp b/doc/src/snippets/qtscript/scriptedslot/main.cpp
new file mode 100644
index 0000000..a84a802
--- /dev/null
+++ b/doc/src/snippets/qtscript/scriptedslot/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTextEdit>
+#include <QTimer>
+#include <QtScript>
+#include "myobject.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QScriptEngine engine;
+ QFile scriptFile(":/object.js");
+ scriptFile.open(QFile::ReadOnly);
+ engine.evaluate(scriptFile.readAll());
+ scriptFile.close();
+
+ QTextEdit editor;
+ QTimer timer;
+ QScriptValue constructor = engine.evaluate("Object");
+ QScriptValueList arguments;
+ arguments << engine.newQObject(&timer);
+ arguments << engine.newQObject(&editor);
+ QScriptValue object = constructor.construct(arguments);
+ if (engine.hasUncaughtException()) {
+ qDebug() << engine.uncaughtException().toString();
+ }
+
+ editor.show();
+ timer.start(1000);
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/qtscript/scriptedslot/object.js b/doc/src/snippets/qtscript/scriptedslot/object.js
new file mode 100644
index 0000000..44ad0e6
--- /dev/null
+++ b/doc/src/snippets/qtscript/scriptedslot/object.js
@@ -0,0 +1,18 @@
+function Object(timer, editor)
+{
+ this.editor = editor;
+ this.counter = 0;
+ timer.timeout.connect(notify);
+ timer.timeout.connect(this, this.addLine);
+}
+
+Object.prototype.addLine = function()
+{
+ this.editor.append(this.counter);
+ this.counter += 1;
+}
+
+function notify()
+{
+ print("timeout() received");
+}
diff --git a/doc/src/snippets/qtscript/scriptedslot/scriptedslot.pro b/doc/src/snippets/qtscript/scriptedslot/scriptedslot.pro
new file mode 100644
index 0000000..a10f06e
--- /dev/null
+++ b/doc/src/snippets/qtscript/scriptedslot/scriptedslot.pro
@@ -0,0 +1,3 @@
+RESOURCES = scriptedslot.qrc
+SOURCES = main.cpp
+QT += script
diff --git a/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc b/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc
new file mode 100644
index 0000000..fc7ff67
--- /dev/null
+++ b/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>object.js</file>
+ </qresource>
+</RCC>
diff --git a/doc/src/snippets/quiloader/main.cpp b/doc/src/snippets/quiloader/main.cpp
new file mode 100644
index 0000000..fadf1d4
--- /dev/null
+++ b/doc/src/snippets/quiloader/main.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtUiTools>
+
+#include "mywidget.h"
+
+//! [0]
+QWidget *loadCustomWidget(QWidget *parent)
+{
+ QUiLoader loader;
+ QWidget *myWidget;
+
+ QStringList availableWidgets = loader.availableWidgets();
+
+ if (availableWidgets.contains("AnalogClock"))
+ myWidget = loader.createWidget("AnalogClock", parent);
+
+ return myWidget;
+}
+//! [0]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MyWidget widget;
+ widget.show();
+
+ QWidget *customWidget = loadCustomWidget(0);
+ customWidget->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/quiloader/myform.ui b/doc/src/snippets/quiloader/myform.ui
new file mode 100644
index 0000000..00702e8
--- /dev/null
+++ b/doc/src/snippets/quiloader/myform.ui
@@ -0,0 +1,130 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>258</width>
+ <height>224</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Export Document</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Export Options</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="0" >
+ <widget class="QRadioButton" name="radioButton_2" >
+ <property name="text" >
+ <string>&amp;DocBook</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QRadioButton" name="radioButton" >
+ <property name="text" >
+ <string>&amp;LaTeX</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QCheckBox" name="checkBox_2" >
+ <property name="text" >
+ <string>Include p&amp;ictures</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QCheckBox" name="checkBox" >
+ <property name="text" >
+ <string>&amp;Compress</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QRadioButton" name="radioButton_2_2" >
+ <property name="text" >
+ <string>&amp;HTML</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QRadioButton" name="radioButton_3" >
+ <property name="text" >
+ <string>&amp;PostScript</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QRadioButton" name="radioButton_4" >
+ <property name="text" >
+ <string>PD&amp;F</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QCheckBox" name="checkBox_3" >
+ <property name="text" >
+ <string>Include &amp;metadata</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QCheckBox" name="checkBox_4" >
+ <property name="text" >
+ <string>Create inde&amp;x</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/snippets/quiloader/mywidget.cpp b/doc/src/snippets/quiloader/mywidget.cpp
new file mode 100644
index 0000000..f01d26f
--- /dev/null
+++ b/doc/src/snippets/quiloader/mywidget.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtUiTools>
+
+#include "mywidget.h"
+
+//! [0]
+MyWidget::MyWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QUiLoader loader;
+ QFile file(":/forms/myform.ui");
+ file.open(QFile::ReadOnly);
+ QWidget *myWidget = loader.load(&file, this);
+ file.close();
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(myWidget);
+ setLayout(layout);
+}
+//! [0]
diff --git a/doc/src/snippets/quiloader/mywidget.h b/doc/src/snippets/quiloader/mywidget.h
new file mode 100644
index 0000000..dd998bd
--- /dev/null
+++ b/doc/src/snippets/quiloader/mywidget.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYWIDGET_H
+#define MYWIDGET_H
+
+#include <QWidget>
+
+class MyWidget : public QWidget
+{
+public:
+ MyWidget(QWidget *parent = 0);
+};
+
+#endif
diff --git a/doc/src/snippets/quiloader/mywidget.qrc b/doc/src/snippets/quiloader/mywidget.qrc
new file mode 100644
index 0000000..47684d6
--- /dev/null
+++ b/doc/src/snippets/quiloader/mywidget.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/forms">
+<file>myform.ui</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/quiloader/quiloader.pro b/doc/src/snippets/quiloader/quiloader.pro
new file mode 100644
index 0000000..c82d0e5
--- /dev/null
+++ b/doc/src/snippets/quiloader/quiloader.pro
@@ -0,0 +1,4 @@
+HEADERS = mywidget.h
+SOURCES = main.cpp mywidget.cpp
+RESOURCES = mywidget.qrc
+CONFIG += uitools
diff --git a/doc/src/snippets/qx11embedcontainer/main.cpp b/doc/src/snippets/qx11embedcontainer/main.cpp
new file mode 100644
index 0000000..3fbab39
--- /dev/null
+++ b/doc/src/snippets/qx11embedcontainer/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QX11EmbedContainer>
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ if (app.arguments().count() != 2) {
+ qFatal("Error - expected executable path as argument");
+ return 1;
+ }
+
+ QX11EmbedContainer container;
+ container.show();
+
+ QProcess process(&container);
+ QString executable(app.arguments()[1]);
+ QStringList arguments;
+ arguments << QString::number(container.winId());
+ process.start(executable, arguments);
+
+ int status = app.exec();
+ process.close();
+ return status;
+}
+//! [0]
diff --git a/doc/src/snippets/qx11embedcontainer/qx11embedcontainer.pro b/doc/src/snippets/qx11embedcontainer/qx11embedcontainer.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/qx11embedcontainer/qx11embedcontainer.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/qx11embedwidget/embedwidget.cpp b/doc/src/snippets/qx11embedwidget/embedwidget.cpp
new file mode 100644
index 0000000..e3ea1c9
--- /dev/null
+++ b/doc/src/snippets/qx11embedwidget/embedwidget.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "embedwidget.h"
+
+EmbedWidget::EmbedWidget(QWidget *parent)
+ : QX11EmbedWidget(parent)
+{
+ gradient = QRadialGradient(100, 100, 90, 60, 60);
+ gradient.setColorAt(0.0, Qt::white);
+ gradient.setColorAt(0.9, QColor(192, 192, 255));
+ gradient.setColorAt(1.0, QColor(0, 32, 64));
+}
+
+QSize EmbedWidget::sizeHint() const
+{
+ return QSize(200, 200);
+}
+
+void EmbedWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter;
+ painter.begin(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillRect(event->rect(), QBrush(gradient));
+ painter.end();
+}
diff --git a/doc/src/snippets/qx11embedwidget/embedwidget.h b/doc/src/snippets/qx11embedwidget/embedwidget.h
new file mode 100644
index 0000000..0391a9d
--- /dev/null
+++ b/doc/src/snippets/qx11embedwidget/embedwidget.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EMBEDWIDGET_H
+#define EMBEDWIDGET_H
+
+#include <QRadialGradient>
+#include <QSize>
+#include <QX11EmbedWidget>
+
+class QPaintEvent;
+
+class EmbedWidget : public QX11EmbedWidget
+{
+ Q_OBJECT
+
+public:
+ EmbedWidget(QWidget *parent = 0);
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QRadialGradient gradient;
+};
+
+#endif
diff --git a/doc/src/snippets/qx11embedwidget/main.cpp b/doc/src/snippets/qx11embedwidget/main.cpp
new file mode 100644
index 0000000..9801ae6
--- /dev/null
+++ b/doc/src/snippets/qx11embedwidget/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "embedwidget.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ if (app.arguments().count() != 2) {
+ qFatal("Error - expected window id as argument");
+ return 1;
+ }
+
+ QString windowId(app.arguments()[1]);
+ EmbedWidget window;
+ window.embedInto(windowId.toULong());
+ window.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/doc/src/snippets/qx11embedwidget/qx11embedwidget.pro b/doc/src/snippets/qx11embedwidget/qx11embedwidget.pro
new file mode 100644
index 0000000..b72e0ad
--- /dev/null
+++ b/doc/src/snippets/qx11embedwidget/qx11embedwidget.pro
@@ -0,0 +1,3 @@
+HEADERS = embedwidget.h
+SOURCES = embedwidget.cpp \
+ main.cpp
diff --git a/doc/src/snippets/qxmlquery/bindingExample.cpp b/doc/src/snippets/qxmlquery/bindingExample.cpp
new file mode 100644
index 0000000..8ed9974
--- /dev/null
+++ b/doc/src/snippets/qxmlquery/bindingExample.cpp
@@ -0,0 +1,9 @@
+//! [0]
+ QBuffer device;
+ device.setData(myQString.toUtf8());
+ device.open(QIODevice::ReadOnly);
+
+ QXmlQuery query;
+ query.setQuery("doc($inputDocument)/query[theDocument]");
+ query.bindVariable("inputDocument", &device);
+//! [0]
diff --git a/doc/src/snippets/qxmlstreamwriter/main.cpp b/doc/src/snippets/qxmlstreamwriter/main.cpp
new file mode 100644
index 0000000..a0e7010
--- /dev/null
+++ b/doc/src/snippets/qxmlstreamwriter/main.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QFile>
+#include <QXmlStreamWriter>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QFile output;
+ output.open(stdout, QIODevice::WriteOnly);
+//! [write output]
+//! [start stream]
+ QXmlStreamWriter stream(&output);
+ stream.setAutoFormatting(true);
+ stream.writeStartDocument();
+//! [start stream]
+ stream.writeDTD("<!DOCTYPE xbel>");
+ stream.writeStartElement("xbel");
+ stream.writeAttribute("version", "1.0");
+ stream.writeStartElement("folder");
+ stream.writeAttribute("folded", "no");
+//! [write element]
+ stream.writeStartElement("bookmark");
+ stream.writeAttribute("href", "http://www.qtsoftware.com/");
+ stream.writeTextElement("title", "Qt Software");
+ stream.writeEndElement(); // bookmark
+//! [write element]
+ stream.writeEndElement(); // folder
+ stream.writeEndElement(); // xbel
+//! [finish stream]
+ stream.writeEndDocument();
+//! [finish stream]
+//! [write output]
+ output.close();
+ return 0;
+}
diff --git a/doc/src/snippets/qxmlstreamwriter/qxmlstreamwriter.pro b/doc/src/snippets/qxmlstreamwriter/qxmlstreamwriter.pro
new file mode 100644
index 0000000..8f74a5d
--- /dev/null
+++ b/doc/src/snippets/qxmlstreamwriter/qxmlstreamwriter.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+QT += xml
diff --git a/doc/src/snippets/reading-selections/main.cpp b/doc/src/snippets/reading-selections/main.cpp
new file mode 100644
index 0000000..d8d5943
--- /dev/null
+++ b/doc/src/snippets/reading-selections/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QMainWindow *window = new MainWindow;
+ window->show();
+ window->resize(640, 480);
+ return app.exec();
+}
diff --git a/doc/src/snippets/reading-selections/model.cpp b/doc/src/snippets/reading-selections/model.cpp
new file mode 100644
index 0000000..7ac48c5
--- /dev/null
+++ b/doc/src/snippets/reading-selections/model.cpp
@@ -0,0 +1,239 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns,
+ const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/doc/src/snippets/reading-selections/model.h b/doc/src/snippets/reading-selections/model.h
new file mode 100644
index 0000000..207f83a
--- /dev/null
+++ b/doc/src/snippets/reading-selections/model.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/doc/src/snippets/reading-selections/reading-selections.pro b/doc/src/snippets/reading-selections/reading-selections.pro
new file mode 100644
index 0000000..91ebd3e
--- /dev/null
+++ b/doc/src/snippets/reading-selections/reading-selections.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h window.h
+SOURCES += main.cpp model.cpp window.cpp
diff --git a/doc/src/snippets/reading-selections/window.cpp b/doc/src/snippets/reading-selections/window.cpp
new file mode 100644
index 0000000..acf5096
--- /dev/null
+++ b/doc/src/snippets/reading-selections/window.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ window.cpp
+
+ A minimal subclass of QTableView with slots to allow the selection model
+ to be monitored.
+*/
+
+#include <QAbstractItemModel>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QMenu>
+#include <QMenuBar>
+#include <QStatusBar>
+
+#include "model.h"
+#include "window.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Selected Items in a Table Model");
+
+ model = new TableModel(8, 4, this);
+
+ table = new QTableView(this);
+ table->setModel(model);
+
+ QMenu *actionMenu = new QMenu(tr("&Actions"), this);
+ QAction *fillAction = actionMenu->addAction(tr("&Fill Selection"));
+ QAction *clearAction = actionMenu->addAction(tr("&Clear Selection"));
+ QAction *selectAllAction = actionMenu->addAction(tr("&Select All"));
+ menuBar()->addMenu(actionMenu);
+
+ connect(fillAction, SIGNAL(triggered()), this, SLOT(fillSelection()));
+ connect(clearAction, SIGNAL(triggered()), this, SLOT(clearSelection()));
+ connect(selectAllAction, SIGNAL(triggered()), this, SLOT(selectAll()));
+
+ selectionModel = table->selectionModel();
+
+ statusBar();
+ setCentralWidget(table);
+}
+
+void MainWindow::fillSelection()
+{
+//! [0]
+ QModelIndexList indexes = selectionModel->selectedIndexes();
+ QModelIndex index;
+
+ foreach(index, indexes) {
+ QString text = QString("(%1,%2)").arg(index.row()).arg(index.column());
+ model->setData(index, text);
+ }
+//! [0]
+}
+
+void MainWindow::clearSelection()
+{
+ QModelIndexList indexes = selectionModel->selectedIndexes();
+ QModelIndex index;
+
+ foreach(index, indexes)
+ model->setData(index, "");
+}
+
+void MainWindow::selectAll()
+{
+//! [1]
+ QModelIndex parent = QModelIndex();
+//! [1] //! [2]
+ QModelIndex topLeft = model->index(0, 0, parent);
+ QModelIndex bottomRight = model->index(model->rowCount(parent)-1,
+ model->columnCount(parent)-1, parent);
+//! [2]
+
+//! [3]
+ QItemSelection selection(topLeft, bottomRight);
+ selectionModel->select(selection, QItemSelectionModel::Select);
+//! [3]
+}
diff --git a/doc/src/snippets/reading-selections/window.h b/doc/src/snippets/reading-selections/window.h
new file mode 100644
index 0000000..02b2e5d
--- /dev/null
+++ b/doc/src/snippets/reading-selections/window.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QItemSelection>
+#include <QMainWindow>
+#include <QAbstractItemModel>
+#include <QWidget>
+#include <QTableView>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void fillSelection();
+ void clearSelection();
+ void selectAll();
+
+private:
+ QAbstractItemModel *model;
+ QItemSelectionModel *selectionModel;
+ QTableView *table;
+};
+
+#endif
diff --git a/doc/src/snippets/scribe-overview/main.cpp b/doc/src/snippets/scribe-overview/main.cpp
new file mode 100644
index 0000000..b38b1d3
--- /dev/null
+++ b/doc/src/snippets/scribe-overview/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+void mergeFormat(QTextEdit *edit)
+{
+//! [0]
+ QTextDocument *document = edit->document();
+ QTextCursor cursor(document);
+
+ cursor.movePosition(QTextCursor::Start);
+ cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
+
+ QTextCharFormat format;
+ format.setFontWeight(QFont::Bold);
+
+ cursor.mergeCharFormat(format);
+//! [0]
+}
+
+int main(int argc, char *argv[])
+{
+ QWidget *parent = 0;
+ QString aStringContainingHTMLtext("<h1>Scribe Overview</h1>");
+
+ QApplication app(argc, argv);
+
+//! [1]
+ QTextEdit *editor = new QTextEdit(parent);
+ editor->setHtml(aStringContainingHTMLtext);
+ editor->show();
+//! [1]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/scribe-overview/scribe-overview.pro b/doc/src/snippets/scribe-overview/scribe-overview.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/scribe-overview/scribe-overview.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/scriptdebugger.cpp b/doc/src/snippets/scriptdebugger.cpp
new file mode 100644
index 0000000..a1889d5
--- /dev/null
+++ b/doc/src/snippets/scriptdebugger.cpp
@@ -0,0 +1,64 @@
+
+#include <QtGui>
+#include <QtScript>
+#include <QtScriptTools>
+
+// Perhaps shpw entire example for getting debugger up with script
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QString fileName("helloscript.qs");
+ QFile scriptFile(fileName);
+ scriptFile.open(QIODevice::ReadOnly);
+ QTextStream stream(&scriptFile);
+ QString contents = stream.readAll();
+ scriptFile.close();
+
+ QScriptEngine *engine = new QScriptEngine();
+
+ QScriptEngineDebugger *debugger = new QScriptEngineDebugger();
+ debugger->attachTo(engine);
+
+ // Set up configuration with only stack and code
+ QWidget *widget = new QWidget;
+//![0]
+ QWidget *codeWindow = debugger->widget(QScriptEngineDebugger::CodeWidget);
+ QWidget *stackWidget = debugger->widget(QScriptEngineDebugger::StackWidget);
+
+ QLayout *layout = new QHBoxLayout;
+ layout->addWidget(codeWindow);
+ layout->addWidget(stackWidget);
+//![0]
+
+//![1]
+ QAction *continueAction = debugger->action(QScriptEngineDebugger::ContinueAction);
+ QAction *stepOverAction = debugger->action(QScriptEngineDebugger::StepOverAction);
+ QAction *stepIntoAction = debugger->action(QScriptEngineDebugger::StepIntoAction);
+
+ QToolBar *toolBar = new QToolBar;
+ toolBar->addAction(continueAction);
+//![1]
+ toolBar->addAction(stepOverAction);
+ toolBar->addAction(stepIntoAction);
+
+ layout->addWidget(toolBar);
+ continueAction->setIcon(QIcon("copy.png"));
+
+ debugger->setAutoShowStandardWindow(false);
+
+ widget->setLayout(layout);
+ widget->show();
+
+ QPushButton button;
+ QScriptValue scriptButton = engine->newQObject(&button);
+ engine->globalObject().setProperty("button", scriptButton);
+
+//![2]
+ debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
+ engine->evaluate(contents, fileName);
+//![2]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/seekslider.cpp b/doc/src/snippets/seekslider.cpp
new file mode 100644
index 0000000..d5dfd14
--- /dev/null
+++ b/doc/src/snippets/seekslider.cpp
@@ -0,0 +1,26 @@
+#include <QtGui>
+
+#include <phonon/audiooutput.h>
+#include <phonon/seekslider.h>
+#include <phonon/mediaobject.h>
+#include <phonon/audiooutput.h>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+//![0]
+ Phonon::MediaObject *moo = new Phonon::MediaObject;;
+ Phonon::AudioOutput *device = new Phonon::AudioOutput;
+ Phonon::createPath(moo, device);
+ moo->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
+
+ Phonon::SeekSlider *slider = new Phonon::SeekSlider;
+ slider->setMediaObject(moo);
+
+ slider->show();
+ moo->play();
+//![0]
+
+ app.exec();
+}
diff --git a/doc/src/snippets/separations/finalwidget.cpp b/doc/src/snippets/separations/finalwidget.cpp
new file mode 100644
index 0000000..c6b103a
--- /dev/null
+++ b/doc/src/snippets/separations/finalwidget.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+finalwidget.cpp
+
+A widget to display an image and a label containing a description.
+*/
+
+#include <QtGui>
+#include "finalwidget.h"
+
+FinalWidget::FinalWidget(QWidget *parent, const QString &name,
+ const QSize &labelSize)
+ : QFrame(parent)
+{
+ hasImage = false;
+ imageLabel = new QLabel;
+ imageLabel->setFrameShadow(QFrame::Sunken);
+ imageLabel->setFrameShape(QFrame::StyledPanel);
+ imageLabel->setMinimumSize(labelSize);
+ nameLabel = new QLabel(name);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(imageLabel, 1);
+ layout->addWidget(nameLabel, 0);
+ setLayout(layout);
+}
+
+/*!
+ If the mouse moves far enough when the left mouse button is held down,
+ start a drag and drop operation.
+*/
+
+void FinalWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if (!(event->buttons() & Qt::LeftButton))
+ return;
+ if ((event->pos() - dragStartPosition).manhattanLength()
+ < QApplication::startDragDistance())
+ return;
+ if (!hasImage)
+ return;
+
+ QDrag *drag = new QDrag(this);
+ QMimeData *mimeData = new QMimeData;
+
+//! [0]
+ QByteArray output;
+ QBuffer outputBuffer(&output);
+ outputBuffer.open(QIODevice::WriteOnly);
+ imageLabel->pixmap()->toImage().save(&outputBuffer, "PNG");
+ mimeData->setData("image/png", output);
+//! [0]
+/*
+//! [1]
+ mimeData->setImageData(QVariant(*imageLabel->pixmap()));
+//! [1]
+*/
+ drag->setMimeData(mimeData);
+ drag->setPixmap(imageLabel->pixmap()->scaled(64, 64, Qt::KeepAspectRatio));
+//! [2]
+ drag->setHotSpot(QPoint(drag->pixmap().width()/2,
+ drag->pixmap().height()));
+//! [2]
+
+ drag->start();
+}
+
+/*!
+ Check for left mouse button presses in order to enable drag and drop.
+*/
+
+void FinalWidget::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ dragStartPosition = event->pos();
+}
+
+const QPixmap* FinalWidget::pixmap() const
+{
+ return imageLabel->pixmap();
+}
+
+void FinalWidget::setPixmap(const QPixmap &pixmap)
+{
+ imageLabel->setPixmap(pixmap);
+ hasImage = true;
+}
diff --git a/doc/src/snippets/separations/finalwidget.h b/doc/src/snippets/separations/finalwidget.h
new file mode 100644
index 0000000..df45fcc
--- /dev/null
+++ b/doc/src/snippets/separations/finalwidget.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINALWIDGET_H
+#define FINALWIDGET_H
+
+#include <QFrame>
+#include <QImage>
+#include <QPoint>
+#include <QSize>
+
+class QGridLayout;
+class QLabel;
+class QMouseEvent;
+class QWidget;
+
+class FinalWidget : public QFrame
+{
+ Q_OBJECT
+
+public:
+ FinalWidget(QWidget *parent, const QString &name, const QSize &labelSize);
+ void setPixmap(const QPixmap &pixmap);
+ const QPixmap *pixmap() const;
+
+protected:
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+
+private:
+ void createImage();
+
+ bool hasImage;
+ QImage originalImage;
+ QLabel *imageLabel;
+ QLabel *nameLabel;
+ QPoint dragStartPosition;
+};
+
+#endif
diff --git a/doc/src/snippets/separations/main.cpp b/doc/src/snippets/separations/main.cpp
new file mode 100644
index 0000000..0a859c2
--- /dev/null
+++ b/doc/src/snippets/separations/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "viewer.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Viewer viewer;
+ viewer.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/separations/screenwidget.cpp b/doc/src/snippets/separations/screenwidget.cpp
new file mode 100644
index 0000000..daa276b
--- /dev/null
+++ b/doc/src/snippets/separations/screenwidget.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+screenwidget.cpp
+
+A widget to display colour components from an image using independently
+selected colors. Controls are provided to allow the image to be inverted, and
+the color to be selection via a standard dialog. The image is displayed in a
+label widget.
+*/
+
+#include <QApplication>
+#include <QColorDialog>
+#include <QGridLayout>
+#include <QImage>
+#include <QLabel>
+#include <QMenu>
+#include <QMimeData>
+#include <QMouseEvent>
+#include <QPixmap>
+#include <QPushButton>
+#include <QWidget>
+
+#include "screenwidget.h"
+
+/*!
+Initializes the paint color, the mask color (cyan, magenta,
+or yellow), connects the color selector and invert checkbox to functions,
+and creates a two-by-two grid layout.
+*/
+
+ScreenWidget::ScreenWidget(QWidget *parent, QColor initialColor,
+ const QString &name, Separation mask,
+ const QSize &labelSize)
+ : QFrame(parent)
+{
+ paintColor = initialColor;
+ maskColor = mask;
+ inverted = false;
+
+ imageLabel = new QLabel;
+ imageLabel->setFrameShadow(QFrame::Sunken);
+ imageLabel->setFrameShape(QFrame::StyledPanel);
+ imageLabel->setMinimumSize(labelSize);
+
+ nameLabel = new QLabel(name);
+ colorButton = new QPushButton(tr("Modify..."));
+ colorButton->setBackgroundRole(QPalette::Button);
+ colorButton->setMinimumSize(32, 32);
+
+ QPalette palette(colorButton->palette());
+ palette.setColor(QPalette::Button, initialColor);
+ colorButton->setPalette(palette);
+
+ invertButton = new QPushButton(tr("Invert"));
+ //invertButton->setToggleButton(true);
+ //invertButton->setOn(inverted);
+ invertButton->setEnabled(false);
+
+ connect(colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
+ connect(invertButton, SIGNAL(clicked()), this, SLOT(invertImage()));
+
+ QGridLayout *gridLayout = new QGridLayout;
+ gridLayout->addWidget(imageLabel, 0, 0, 1, 2);
+ gridLayout->addWidget(nameLabel, 1, 0);
+ gridLayout->addWidget(colorButton, 1, 1);
+ gridLayout->addWidget(invertButton, 2, 1, 1, 1);
+ setLayout(gridLayout);
+}
+
+/*!
+ Creates a new image by separating out the cyan, magenta, or yellow
+ component, depending on the mask color specified in the constructor.
+
+ The amount of the component found in each pixel of the image is used
+ to determine how much of a user-selected ink is used for each pixel
+ in the new image for the label widget.
+*/
+
+void ScreenWidget::createImage()
+{
+ newImage = originalImage.copy();
+
+ // Create CMY components for the ink being used.
+ float cyanInk = (255 - paintColor.red())/255.0;
+ float magentaInk = (255 - paintColor.green())/255.0;
+ float yellowInk = (255 - paintColor.blue())/255.0;
+
+ int (*convert)(QRgb);
+
+ switch (maskColor) {
+ case Cyan:
+ convert = qRed;
+ break;
+ case Magenta:
+ convert = qGreen;
+ break;
+ case Yellow:
+ convert = qBlue;
+ break;
+ }
+
+ for (int y = 0; y < newImage.height(); ++y) {
+ for (int x = 0; x < newImage.width(); ++x) {
+ QRgb p(originalImage.pixel(x, y));
+
+ // Separate the source pixel into its cyan component.
+ int amount;
+
+ if (inverted)
+ amount = convert(p);
+ else
+ amount = 255 - convert(p);
+
+ QColor newColor(
+ 255 - qMin(int(amount * cyanInk), 255),
+ 255 - qMin(int(amount * magentaInk), 255),
+ 255 - qMin(int(amount * yellowInk), 255));
+
+ newImage.setPixel(x, y, newColor.rgb());
+ }
+ }
+
+ imageLabel->setPixmap(QPixmap::fromImage(newImage));
+}
+
+/*!
+ Returns a pointer to the modified image.
+*/
+
+QImage* ScreenWidget::image()
+{
+ return &newImage;
+}
+
+/*!
+ Sets whether the amount of ink applied to the canvas is to be inverted
+ (subtracted from the maximum value) before the ink is applied.
+*/
+
+void ScreenWidget::invertImage()
+{
+ //inverted = invertButton->isOn();
+ inverted = !inverted;
+ createImage();
+ emit imageChanged();
+}
+
+/*!
+ Separate the current image into cyan, magenta, and yellow components.
+ Create a representation of how each component might appear when applied
+ to a blank white piece of paper.
+*/
+
+void ScreenWidget::setColor()
+{
+ QColor newColor = QColorDialog::getColor(paintColor);
+
+ if (newColor.isValid()) {
+ paintColor = newColor;
+ QPalette palette(colorButton->palette());
+ palette.setColor(QPalette::Button, paintColor);
+ colorButton->setPalette(palette);
+ createImage();
+ emit imageChanged();
+ }
+}
+
+/*!
+ Records the original image selected by the user, creates a color
+ separation, and enables the invert image checkbox.
+*/
+
+void ScreenWidget::setImage(QImage &image)
+{
+ originalImage = image;
+ createImage();
+ invertButton->setEnabled(true);
+}
diff --git a/doc/src/snippets/separations/screenwidget.h b/doc/src/snippets/separations/screenwidget.h
new file mode 100644
index 0000000..3371028
--- /dev/null
+++ b/doc/src/snippets/separations/screenwidget.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCREENWIDGET_H
+#define SCREENWIDGET_H
+
+#include <QColor>
+#include <QFrame>
+#include <QImage>
+#include <QSize>
+
+class QGridLayout;
+class QLabel;
+class QPushButton;
+class QWidget;
+
+class ScreenWidget : public QFrame
+{
+ Q_OBJECT
+public:
+ enum Separation { Cyan, Magenta, Yellow };
+
+ ScreenWidget(QWidget *parent, QColor initialColor, const QString &name,
+ Separation mask, const QSize &labelSize);
+ void setImage(QImage &image);
+ QImage* image();
+
+signals:
+ void imageChanged();
+
+public slots:
+ void setColor();
+ void invertImage();
+
+private:
+ void createImage();
+
+ bool inverted;
+ QColor paintColor;
+ QImage newImage;
+ QImage originalImage;
+ QLabel *imageLabel;
+ QLabel *nameLabel;
+ QPushButton *colorButton;
+ QPushButton *invertButton;
+ Separation maskColor;
+};
+
+#endif
diff --git a/doc/src/snippets/separations/separations.pro b/doc/src/snippets/separations/separations.pro
new file mode 100644
index 0000000..48af2c8
--- /dev/null
+++ b/doc/src/snippets/separations/separations.pro
@@ -0,0 +1,7 @@
+HEADERS = finalwidget.h \
+ screenwidget.h \
+ viewer.h
+SOURCES = finalwidget.cpp \
+ main.cpp \
+ screenwidget.cpp \
+ viewer.cpp
diff --git a/doc/src/snippets/separations/separations.qdoc b/doc/src/snippets/separations/separations.qdoc
new file mode 100644
index 0000000..5091352
--- /dev/null
+++ b/doc/src/snippets/separations/separations.qdoc
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ \example painting/separations
+ \title Color Separations Example
+
+ This example enables simple color manipulation of images and demonstrates a
+ number of image-related features of Qt, from per-pixel image manipulation to
+ drag and drop handling of images.
+
+ \image separations-example.png
+
+ The application allows the user to load an image, shown in the top-left
+ part of the main window, and to adjust its color balance by replacing its
+ initial cyan, magenta, and yellow components with different colors.
+*/
diff --git a/doc/src/snippets/separations/viewer.cpp b/doc/src/snippets/separations/viewer.cpp
new file mode 100644
index 0000000..f33be69
--- /dev/null
+++ b/doc/src/snippets/separations/viewer.cpp
@@ -0,0 +1,329 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+viewer.cpp
+
+Provides a main window for displaying a user-specified original image
+with three color separations in a grid layout.
+
+A main menu provides entries for selecting files, and adjusting the
+brightness of the separations.
+*/
+
+#include <QtGui>
+
+#include "finalwidget.h"
+#include "screenwidget.h"
+#include "viewer.h"
+
+/*
+ Constructor: initializes a default value for the brightness, creates
+ the main menu entries, and constructs a central widget that contains
+ enough space for images to be displayed.
+*/
+
+Viewer::Viewer()
+{
+ setWindowTitle(tr("QImage Color Separations"));
+
+ brightness = 255;
+
+ createMenus();
+ setCentralWidget(createCentralWidget());
+}
+
+/*
+ Creates a main menu with two entries: a File menu, to allow the image
+ to be selected, and a Brightness menu to allow the brightness of the
+ separations to be changed.
+
+ Initially, the Brightness menu items are disabled, but the first entry in
+ the menu is checked to reflect the default brightness.
+*/
+
+void Viewer::createMenus()
+{
+ fileMenu = new QMenu(tr("&File"), this);
+ brightnessMenu = new QMenu(tr("&Brightness"), this);
+
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence("Ctrl+O"));
+ saveAction = fileMenu->addAction(tr("&Save..."));
+ saveAction->setShortcut(QKeySequence("Ctrl+S"));
+ saveAction->setEnabled(false);
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(QKeySequence("Ctrl+Q"));
+
+ QAction *noBrightness = brightnessMenu->addAction(tr("&0%"));
+ noBrightness->setCheckable(true);
+ QAction *quarterBrightness = brightnessMenu->addAction(tr("&25%"));
+ quarterBrightness->setCheckable(true);
+ QAction *halfBrightness = brightnessMenu->addAction(tr("&50%"));
+ halfBrightness->setCheckable(true);
+ QAction *threeQuartersBrightness = brightnessMenu->addAction(tr("&75%"));
+ threeQuartersBrightness->setCheckable(true);
+ QAction *fullBrightness = brightnessMenu->addAction(tr("&100%"));
+ fullBrightness->setCheckable(true);
+
+ menuMap[noBrightness] = None;
+ menuMap[quarterBrightness] = Quarter;
+ menuMap[halfBrightness] = Half;
+ menuMap[threeQuartersBrightness] = ThreeQuarters;
+ menuMap[fullBrightness] = Full;
+
+ currentBrightness = fullBrightness;
+ currentBrightness->setChecked(true);
+ brightnessMenu->setEnabled(false);
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(brightnessMenu);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(chooseFile()));
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveImage()));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(brightnessMenu, SIGNAL(triggered(QAction *)), this,
+ SLOT(setBrightness(QAction *)));
+}
+
+/*
+ Constructs a central widget for the window consisting of a two-by-two
+ grid of labels, each of which will contain an image. We restrict the
+ size of the labels to 256 pixels, and ensure that the window cannot
+ be resized.
+*/
+
+QFrame* Viewer::createCentralWidget()
+{
+ QFrame* frame = new QFrame(this);
+ grid = new QGridLayout(frame);
+ grid->setSpacing(8);
+ grid->setMargin(4);
+
+ layout()->setSizeConstraint(QLayout::SetFixedSize);
+
+ QSize labelSize(256, 256);
+
+ finalWidget = new FinalWidget(frame, tr("Final image"), labelSize);
+
+ cyanWidget = new ScreenWidget(frame, Qt::cyan, tr("Cyan"),
+ ScreenWidget::Cyan, labelSize);
+ magentaWidget = new ScreenWidget(frame, Qt::magenta, tr("Magenta"),
+ ScreenWidget::Magenta, labelSize);
+ yellowWidget = new ScreenWidget(frame, Qt::yellow, tr("Yellow"),
+ ScreenWidget::Yellow, labelSize);
+
+ connect(cyanWidget, SIGNAL(imageChanged()), this, SLOT(createImage()));
+ connect(magentaWidget, SIGNAL(imageChanged()), this, SLOT(createImage()));
+ connect(yellowWidget, SIGNAL(imageChanged()), this, SLOT(createImage()));
+
+ grid->addWidget(finalWidget, 0, 0, Qt::AlignTop | Qt::AlignHCenter);
+ grid->addWidget(cyanWidget, 0, 1, Qt::AlignTop | Qt::AlignHCenter);
+ grid->addWidget(magentaWidget, 1, 0, Qt::AlignTop | Qt::AlignHCenter);
+ grid->addWidget(yellowWidget, 1, 1, Qt::AlignTop | Qt::AlignHCenter);
+
+ return frame;
+}
+
+/*
+ Provides a dialog window to allow the user to specify an image file.
+ If a file is selected, the appropriate function is called to process
+ and display it.
+*/
+
+void Viewer::chooseFile()
+{
+ QString imageFile = QFileDialog::getOpenFileName(this,
+ tr("Choose an image file to open"), path, tr("Images (*.*)"));
+
+ if (!imageFile.isEmpty()) {
+ openImageFile(imageFile);
+ path = imageFile;
+ }
+}
+
+/*
+ Changes the value of the brightness according to the entry selected in the
+ Brightness menu. The selected entry is checked, and the previously selected
+ entry is unchecked.
+
+ The color separations are updated to use the new value for the brightness.
+*/
+
+void Viewer::setBrightness(QAction *action)
+{
+ if (!menuMap.contains(action) || scaledImage.isNull())
+ return;
+
+ Brightness amount = menuMap[action];
+
+ switch (amount) {
+ case None:
+ brightness = 0; break;
+ case Quarter:
+ brightness = 64; break;
+ case Half:
+ brightness = 128; break;
+ case ThreeQuarters:
+ brightness = 191; break;
+ case Full:
+ brightness = 255; break;
+ default: return;
+ }
+
+ currentBrightness->setChecked(false);
+ currentBrightness = action;
+ currentBrightness->setChecked(true);
+
+ createImage();
+}
+
+/*
+ Load the image from the file given, and create four pixmaps based
+ on the original image.
+
+ The window caption is set, and the Brightness menu enabled if the image file
+ can be loaded.
+*/
+
+void Viewer::openImageFile(QString &imageFile)
+{
+ QImage originalImage;
+
+ if (originalImage.load(imageFile)) {
+ setWindowTitle(imageFile);
+ //menuBar()->setItemEnabled(brightnessMenuId, true);
+ saveAction->setEnabled(true);
+ brightnessMenu->setEnabled(true);
+
+ /* Note: the ScaleMin value may be different for Qt 4. */
+ scaledImage = originalImage.scaled(256, 256, Qt::KeepAspectRatio);
+
+ cyanWidget->setImage(scaledImage);
+ magentaWidget->setImage(scaledImage);
+ yellowWidget->setImage(scaledImage);
+ createImage();
+ }
+ else
+ (void) QMessageBox::warning(this, tr("Cannot open file"),
+ tr("The selected file could not be opened."),
+ QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton);
+}
+
+/*
+ Creates an image by combining the contents of the three screens
+ to present a page preview.
+
+ The image associated with each screen is separated into cyan,
+ magenta, and yellow components. We add up the values for each
+ component from the three screen images, and subtract the totals
+ from the maximum value for each corresponding primary color.
+*/
+
+void Viewer::createImage()
+{
+ QImage newImage = scaledImage.copy();
+
+ QImage *image1 = cyanWidget->image();
+ QImage *image2 = magentaWidget->image();
+ QImage *image3 = yellowWidget->image();
+ int darkness = 255 - brightness;
+
+ for (int y = 0; y < newImage.height(); ++y) {
+ for (int x = 0; x < newImage.width(); ++x) {
+
+ // Create three screens, using the quantities of the source
+ // CMY components to determine how much of each of the
+ // inks are to be put on each screen.
+ QRgb p1(image1->pixel(x, y));
+ float cyan1 = 255 - qRed(p1);
+ float magenta1 = 255 - qGreen(p1);
+ float yellow1 = 255 - qBlue(p1);
+
+ QRgb p2(image2->pixel(x, y));
+ float cyan2 = 255 - qRed(p2);
+ float magenta2 = 255 - qGreen(p2);
+ float yellow2 = 255 - qBlue(p2);
+
+ QRgb p3(image3->pixel(x, y));
+ float cyan3 = 255 - qRed(p3);
+ float magenta3 = 255 - qGreen(p3);
+ float yellow3 = 255 - qBlue(p3);
+
+ QColor newColor(
+ qMax(255 - int(cyan1+cyan2+cyan3) - darkness, 0),
+ qMax(255 - int(magenta1+magenta2+magenta3) - darkness, 0),
+ qMax(255 - int(yellow1+yellow2+yellow3) - darkness, 0));
+
+ newImage.setPixel(x, y, newColor.rgb());
+ }
+ }
+
+ finalWidget->setPixmap(QPixmap::fromImage(newImage));
+}
+
+/*
+ Provides a dialog window to allow the user to save the image file.
+*/
+
+void Viewer::saveImage()
+{
+ QString imageFile = QFileDialog::getSaveFileName(this,
+ tr("Choose a filename to save the image"), "", tr("Images (*.png)"));
+
+ QFileInfo info(imageFile);
+
+ if (!info.baseName().isEmpty()) {
+ QString newImageFile = QFileInfo(info.absoluteDir(),
+ info.baseName() + ".png").absoluteFilePath();
+
+ if (!finalWidget->pixmap()->save(newImageFile, "PNG"))
+ (void) QMessageBox::warning(this, tr("Cannot save file"),
+ tr("The file could not be saved."),
+ QMessageBox::Cancel, QMessageBox::NoButton,
+ QMessageBox::NoButton);
+ }
+ else
+ (void) QMessageBox::warning(this, tr("Cannot save file"),
+ tr("Please enter a valid filename."),
+ QMessageBox::Cancel, QMessageBox::NoButton,
+ QMessageBox::NoButton);
+}
diff --git a/doc/src/snippets/separations/viewer.h b/doc/src/snippets/separations/viewer.h
new file mode 100644
index 0000000..148f081
--- /dev/null
+++ b/doc/src/snippets/separations/viewer.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <QImage>
+#include <QMainWindow>
+#include <QMap>
+
+class QAction;
+class QFrame;
+class QGridLayout;
+class QLabel;
+class QMenu;
+class FinalWidget;
+class ScreenWidget;
+
+class Viewer : public QMainWindow
+{
+ Q_OBJECT
+public:
+ enum Brightness { None, Quarter, Half, ThreeQuarters, Full };
+ Viewer();
+
+public slots:
+ void chooseFile();
+ void setBrightness(QAction *action);
+ void createImage();
+ void saveImage();
+
+private:
+ void createMenus();
+ QFrame *createCentralWidget();
+ void openImageFile(QString &filePath);
+
+ FinalWidget *finalWidget;
+ int brightness;
+ QAction *currentBrightness;
+ QAction *saveAction;
+ QGridLayout *grid;
+ QImage scaledImage;
+ QMap <QAction*,Brightness> menuMap;
+ QMenu *brightnessMenu;
+ QMenu *fileMenu;
+ QString path;
+ ScreenWidget *cyanWidget;
+ ScreenWidget *magentaWidget;
+ ScreenWidget *yellowWidget;
+};
+
+#endif
diff --git a/doc/src/snippets/settings/settings.cpp b/doc/src/snippets/settings/settings.cpp
new file mode 100644
index 0000000..b1b8a03
--- /dev/null
+++ b/doc/src/snippets/settings/settings.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QWidget *win;
+QWidget *panel;
+
+void snippet_ctor1()
+{
+//! [0]
+ QSettings settings("MySoft", "Star Runner");
+//! [0]
+}
+
+void snippet_ctor2()
+{
+//! [1]
+ QCoreApplication::setOrganizationName("MySoft");
+//! [1] //! [2]
+ QCoreApplication::setOrganizationDomain("mysoft.com");
+//! [2] //! [3]
+ QCoreApplication::setApplicationName("Star Runner");
+//! [3]
+
+//! [4]
+ QSettings settings;
+//! [4]
+
+//! [5]
+ settings.setValue("editor/wrapMargin", 68);
+//! [5] //! [6]
+ int margin = settings.value("editor/wrapMargin").toInt();
+//! [6]
+ {
+//! [7]
+ int margin = settings.value("editor/wrapMargin", 80).toInt();
+//! [7]
+ }
+
+//! [8]
+ settings.setValue("mainwindow/size", win->size());
+//! [8] //! [9]
+ settings.setValue("mainwindow/fullScreen", win->isFullScreen());
+//! [9] //! [10]
+ settings.setValue("outputpanel/visible", panel->isVisible());
+//! [10]
+
+//! [11]
+ settings.beginGroup("mainwindow");
+ settings.setValue("size", win->size());
+ settings.setValue("fullScreen", win->isFullScreen());
+ settings.endGroup();
+//! [11]
+
+//! [12]
+ settings.beginGroup("outputpanel");
+ settings.setValue("visible", panel->isVisible());
+ settings.endGroup();
+//! [12]
+}
+
+void snippet_locations()
+{
+//! [13]
+ QSettings obj1("MySoft", "Star Runner");
+//! [13] //! [14]
+ QSettings obj2("MySoft");
+ QSettings obj3(QSettings::SystemScope, "MySoft", "Star Runner");
+ QSettings obj4(QSettings::SystemScope, "MySoft");
+//! [14]
+
+ {
+//! [15]
+ QSettings settings(QSettings::IniFormat, QSettings::UserScope,
+ "MySoft", "Star Runner");
+//! [15]
+ }
+
+ {
+ QSettings settings("starrunner.ini", QSettings::IniFormat);
+ }
+
+ {
+ QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft",
+ QSettings::NativeFormat);
+ }
+}
+
+class MainWindow : public QMainWindow
+{
+public:
+ MainWindow();
+
+ void writeSettings();
+ void readSettings();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+};
+
+//! [16]
+void MainWindow::writeSettings()
+{
+ QSettings settings("Moose Soft", "Clipper");
+
+ settings.beginGroup("MainWindow");
+ settings.setValue("size", size());
+ settings.setValue("pos", pos());
+ settings.endGroup();
+}
+//! [16]
+
+//! [17]
+void MainWindow::readSettings()
+{
+ QSettings settings("Moose Soft", "Clipper");
+
+ settings.beginGroup("MainWindow");
+ resize(settings.value("size", QSize(400, 400)).toSize());
+ move(settings.value("pos", QPoint(200, 200)).toPoint());
+ settings.endGroup();
+}
+//! [17]
+
+//! [18]
+MainWindow::MainWindow()
+{
+//! [18] //! [19]
+ readSettings();
+//! [19] //! [20]
+}
+//! [20]
+
+bool userReallyWantsToQuit() { return true; }
+
+//! [21]
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ if (userReallyWantsToQuit()) {
+ writeSettings();
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+//! [21]
diff --git a/doc/src/snippets/shareddirmodel/main.cpp b/doc/src/snippets/shareddirmodel/main.cpp
new file mode 100644
index 0000000..6390521
--- /dev/null
+++ b/doc/src/snippets/shareddirmodel/main.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example of how to view a model in several views, and share a
+ selection model.
+*/
+
+#include <QtGui>
+
+//! [0] //! [1]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QSplitter *splitter = new QSplitter;
+
+//! [2] //! [3]
+ QDirModel *model = new QDirModel;
+//! [0] //! [2] //! [4] //! [5]
+ QTreeView *tree = new QTreeView(splitter);
+//! [3] //! [6]
+ tree->setModel(model);
+//! [4] //! [6] //! [7]
+ tree->setRootIndex(model->index(QDir::currentPath()));
+//! [7]
+
+ QListView *list = new QListView(splitter);
+ list->setModel(model);
+ list->setRootIndex(model->index(QDir::currentPath()));
+
+//! [5]
+ QItemSelectionModel *selection = new QItemSelectionModel(model);
+ tree->setSelectionModel(selection);
+ list->setSelectionModel(selection);
+
+//! [8]
+ splitter->setWindowTitle("Two views onto the same directory model");
+ splitter->show();
+ return app.exec();
+}
+//! [1] //! [8]
diff --git a/doc/src/snippets/shareddirmodel/shareddirmodel.pro b/doc/src/snippets/shareddirmodel/shareddirmodel.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/doc/src/snippets/shareddirmodel/shareddirmodel.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/doc/src/snippets/sharedemployee/employee.cpp b/doc/src/snippets/sharedemployee/employee.cpp
new file mode 100644
index 0000000..41ba922
--- /dev/null
+++ b/doc/src/snippets/sharedemployee/employee.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "employee.h"
diff --git a/doc/src/snippets/sharedemployee/employee.h b/doc/src/snippets/sharedemployee/employee.h
new file mode 100644
index 0000000..22fae8b
--- /dev/null
+++ b/doc/src/snippets/sharedemployee/employee.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EMPLOYEE_H
+#define EMPLOYEE_H
+
+//! [0]
+#include <QSharedData>
+#include <QString>
+
+class EmployeeData : public QSharedData
+{
+ public:
+ EmployeeData() : id(-1) { name.clear(); }
+ EmployeeData(const EmployeeData &other)
+ : QSharedData(other), id(other.id), name(other.name) { }
+ ~EmployeeData() { }
+
+ int id;
+ QString name;
+};
+
+class Employee
+{
+ public:
+//! [1]
+ Employee() { d = new EmployeeData; }
+//! [1] //! [2]
+ Employee(int id, QString name) {
+ d = new EmployeeData;
+ setId(id);
+ setName(name);
+ }
+//! [2] //! [7]
+ Employee(const Employee &other)
+ : d (other.d)
+ {
+ }
+//! [7]
+//! [3]
+ void setId(int id) { d->id = id; }
+//! [3] //! [4]
+ void setName(QString name) { d->name = name; }
+//! [4]
+
+//! [5]
+ int id() const { return d->id; }
+//! [5] //! [6]
+ QString name() const { return d->name; }
+//! [6]
+
+ private:
+ QSharedDataPointer<EmployeeData> d;
+};
+//! [0]
+
+#endif
diff --git a/doc/src/snippets/sharedemployee/main.cpp b/doc/src/snippets/sharedemployee/main.cpp
new file mode 100644
index 0000000..9e12116
--- /dev/null
+++ b/doc/src/snippets/sharedemployee/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "employee.h"
+
+int main()
+{
+ Employee e1(1001, "Albrecht Durer");
+ Employee e2 = e1;
+ e1.setName("Hans Holbein");
+}
+//! [0]
diff --git a/doc/src/snippets/sharedemployee/sharedemployee.pro b/doc/src/snippets/sharedemployee/sharedemployee.pro
new file mode 100644
index 0000000..536a77d
--- /dev/null
+++ b/doc/src/snippets/sharedemployee/sharedemployee.pro
@@ -0,0 +1,3 @@
+HEADERS = employee.h
+SOURCES = employee.cpp \
+ main.cpp
diff --git a/doc/src/snippets/sharedtablemodel/main.cpp b/doc/src/snippets/sharedtablemodel/main.cpp
new file mode 100644
index 0000000..d333575
--- /dev/null
+++ b/doc/src/snippets/sharedtablemodel/main.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how a single model can be shared between
+ multiple views.
+*/
+
+#include <QApplication>
+#include <QHeaderView>
+#include <QItemSelectionModel>
+#include <QTableView>
+
+#include "model.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ TableModel *model = new TableModel(4, 2, &app);
+
+//! [0]
+ QTableView *firstTableView = new QTableView;
+ QTableView *secondTableView = new QTableView;
+//! [0]
+
+//! [1]
+ firstTableView->setModel(model);
+ secondTableView->setModel(model);
+//! [1]
+
+ firstTableView->horizontalHeader()->setModel(model);
+
+ for (int row = 0; row < 4; ++row) {
+ for (int column = 0; column < 2; ++column) {
+ QModelIndex index = model->index(row, column, QModelIndex());
+ model->setData(index, QVariant(QString("(%1, %2)").arg(row).arg(column)));
+ }
+ }
+
+//! [2]
+ secondTableView->setSelectionModel(firstTableView->selectionModel());
+//! [2]
+
+ firstTableView->setWindowTitle("First table view");
+ secondTableView->setWindowTitle("Second table view");
+ firstTableView->show();
+ secondTableView->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/sharedtablemodel/model.cpp b/doc/src/snippets/sharedtablemodel/model.cpp
new file mode 100644
index 0000000..ad7d2ed
--- /dev/null
+++ b/doc/src/snippets/sharedtablemodel/model.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/doc/src/snippets/sharedtablemodel/model.h b/doc/src/snippets/sharedtablemodel/model.h
new file mode 100644
index 0000000..207f83a
--- /dev/null
+++ b/doc/src/snippets/sharedtablemodel/model.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/doc/src/snippets/sharedtablemodel/sharedtablemodel.pro b/doc/src/snippets/sharedtablemodel/sharedtablemodel.pro
new file mode 100644
index 0000000..10671e6
--- /dev/null
+++ b/doc/src/snippets/sharedtablemodel/sharedtablemodel.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h
+SOURCES += main.cpp model.cpp
diff --git a/doc/src/snippets/signalmapper/accountsfile.txt b/doc/src/snippets/signalmapper/accountsfile.txt
new file mode 100644
index 0000000..2ec5ffb
--- /dev/null
+++ b/doc/src/snippets/signalmapper/accountsfile.txt
@@ -0,0 +1 @@
+1 + 1 = 2
diff --git a/doc/src/snippets/signalmapper/filereader.cpp b/doc/src/snippets/signalmapper/filereader.cpp
new file mode 100644
index 0000000..8732dab
--- /dev/null
+++ b/doc/src/snippets/signalmapper/filereader.cpp
@@ -0,0 +1,59 @@
+#include <QtGui>
+#include "filereader.h"
+
+
+FileReader::FileReader(QWidget *parent)
+ : QWidget(parent)
+{
+ textEdit = new QTextEdit;
+
+ taxFileButton = new QPushButton("Tax File");
+ accountFileButton = new QPushButton("Accounts File");
+ reportFileButton = new QPushButton("Report File");
+
+//! [0]
+ signalMapper = new QSignalMapper(this);
+ signalMapper->setMapping(taxFileButton, QString("taxfile.txt"));
+ signalMapper->setMapping(accountFileButton, QString("accountsfile.txt"));
+ signalMapper->setMapping(reportFileButton, QString("reportfile.txt"));
+
+ connect(taxFileButton, SIGNAL(clicked()),
+ signalMapper, SLOT (map()));
+ connect(accountFileButton, SIGNAL(clicked()),
+ signalMapper, SLOT (map()));
+ connect(reportFileButton, SIGNAL(clicked()),
+ signalMapper, SLOT (map()));
+//! [0]
+
+//! [1]
+ connect(signalMapper, SIGNAL(mapped(const QString &)),
+ this, SLOT(readFile(const QString &)));
+//! [1]
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addWidget(taxFileButton);
+ buttonLayout->addWidget(accountFileButton);
+ buttonLayout->addWidget(reportFileButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(textEdit);
+ mainLayout->addLayout(buttonLayout);
+
+ setLayout(mainLayout);
+}
+
+void FileReader::readFile(const QString &filename)
+{
+ QFile file(filename);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+
+ QTextStream in(&file);
+ textEdit->setPlainText(in.readAll());
+}
+
diff --git a/doc/src/snippets/signalmapper/filereader.h b/doc/src/snippets/signalmapper/filereader.h
new file mode 100644
index 0000000..a3be088
--- /dev/null
+++ b/doc/src/snippets/signalmapper/filereader.h
@@ -0,0 +1,28 @@
+#ifndef FILEREADER_H
+#define FILEREADER_H
+
+#include <QTextEdit>
+#include <QPushButton>
+#include <QSignalMapper>
+
+class FileReader : public QWidget
+{
+ Q_OBJECT
+
+public:
+ FileReader(QWidget *parent=0);
+ void readFromFile(QString filename);
+
+public slots:
+ void readFile(const QString &);
+
+private:
+ QTextEdit *textEdit;
+ QPushButton *taxFileButton;
+ QPushButton *accountFileButton;
+ QPushButton *reportFileButton;
+ QSignalMapper *signalMapper;
+};
+
+#endif
+
diff --git a/doc/src/snippets/signalmapper/main.cpp b/doc/src/snippets/signalmapper/main.cpp
new file mode 100644
index 0000000..ebc601b
--- /dev/null
+++ b/doc/src/snippets/signalmapper/main.cpp
@@ -0,0 +1,13 @@
+#include <QtGui>
+#include "filereader.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ FileReader *reader = new FileReader;
+ reader->show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/signalmapper/reportfile.txt b/doc/src/snippets/signalmapper/reportfile.txt
new file mode 100644
index 0000000..30123cc
--- /dev/null
+++ b/doc/src/snippets/signalmapper/reportfile.txt
@@ -0,0 +1,2 @@
+Tax this year = 50%
+Total profit = 2
diff --git a/doc/src/snippets/signalmapper/signalmapper.pro b/doc/src/snippets/signalmapper/signalmapper.pro
new file mode 100644
index 0000000..9a9d669
--- /dev/null
+++ b/doc/src/snippets/signalmapper/signalmapper.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Jul 2 14:50:56 2008
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += filereader.h
+SOURCES += filereader.cpp main.cpp
diff --git a/doc/src/snippets/signalmapper/taxfile.txt b/doc/src/snippets/signalmapper/taxfile.txt
new file mode 100644
index 0000000..a682e0a
--- /dev/null
+++ b/doc/src/snippets/signalmapper/taxfile.txt
@@ -0,0 +1 @@
+Tax this year = 50%
diff --git a/doc/src/snippets/signalsandslots/lcdnumber.cpp b/doc/src/snippets/signalsandslots/lcdnumber.cpp
new file mode 100644
index 0000000..2374992
--- /dev/null
+++ b/doc/src/snippets/signalsandslots/lcdnumber.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "lcdnumber.h"
+
+LcdNumber::LcdNumber(QWidget *parent)
+{
+}
+
+void LcdNumber::display(int)
+{
+}
+
+void LcdNumber::display(double)
+{
+}
+
+void LcdNumber::display(const QString &)
+{
+}
+
+void LcdNumber::setHexMode()
+{
+}
+
+void LcdNumber::setDecMode()
+{
+}
+
+void LcdNumber::setOctMode()
+{
+}
+
+void LcdNumber::setBinMode()
+{
+}
+
+void LcdNumber::setSmallDecimalPoint(bool)
+{
+}
diff --git a/doc/src/snippets/signalsandslots/lcdnumber.h b/doc/src/snippets/signalsandslots/lcdnumber.h
new file mode 100644
index 0000000..b1d5f50
--- /dev/null
+++ b/doc/src/snippets/signalsandslots/lcdnumber.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#ifndef LCDNUMBER_H
+//! [0] //! [1]
+#define LCDNUMBER_H
+//! [1]
+
+//! [2]
+#include <QFrame>
+//! [2]
+
+//! [3]
+class LcdNumber : public QFrame
+//! [3] //! [4]
+{
+//! [4] //! [5]
+ Q_OBJECT
+//! [5]
+
+//! [6]
+public:
+//! [6] //! [7]
+ LcdNumber(QWidget *parent = 0);
+//! [7]
+
+//! [8]
+signals:
+//! [8] //! [9]
+ void overflow();
+//! [9]
+
+//! [10]
+public slots:
+//! [10] //! [11]
+ void display(int num);
+ void display(double num);
+ void display(const QString &str);
+ void setHexMode();
+ void setDecMode();
+ void setOctMode();
+ void setBinMode();
+ void setSmallDecimalPoint(bool point);
+//! [11] //! [12]
+};
+//! [12]
+
+//! [13]
+#endif
+//! [13]
diff --git a/doc/src/snippets/signalsandslots/signalsandslots.cpp b/doc/src/snippets/signalsandslots/signalsandslots.cpp
new file mode 100644
index 0000000..a8f3a01
--- /dev/null
+++ b/doc/src/snippets/signalsandslots/signalsandslots.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAbstractButton>
+
+#include "signalsandslots.h"
+
+//! [0]
+void Counter::setValue(int value)
+{
+ if (value != m_value) {
+ m_value = value;
+ emit valueChanged(value);
+ }
+}
+//! [0]
+
+int main()
+{
+//! [1]
+ Counter a, b;
+//! [1] //! [2]
+ QObject::connect(&a, SIGNAL(valueChanged(int)),
+ &b, SLOT(setValue(int)));
+//! [2]
+
+//! [3]
+ a.setValue(12); // a.value() == 12, b.value() == 12
+//! [3] //! [4]
+ b.setValue(48); // a.value() == 12, b.value() == 48
+//! [4]
+
+
+ QWidget *widget = reinterpret_cast<QWidget *>(new QObject(0));
+//! [5]
+ if (widget->inherits("QAbstractButton")) {
+ QAbstractButton *button = static_cast<QAbstractButton *>(widget);
+ button->toggle();
+//! [5] //! [6]
+ }
+//! [6]
+
+//! [7]
+ if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget))
+ button->toggle();
+//! [7]
+}
diff --git a/doc/src/snippets/signalsandslots/signalsandslots.h b/doc/src/snippets/signalsandslots/signalsandslots.h
new file mode 100644
index 0000000..25d8984
--- /dev/null
+++ b/doc/src/snippets/signalsandslots/signalsandslots.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SIGNALSANDSLOTS_H
+#define SIGNALSANDSLOTS_H
+
+#define Counter PlainCounter
+
+//! [0]
+class Counter
+{
+public:
+ Counter() { m_value = 0; }
+
+ int value() const { return m_value; }
+ void setValue(int value);
+
+private:
+ int m_value;
+};
+//! [0]
+
+#undef Counter
+#define Counter ObjectCounter
+
+//! [1]
+#include <QObject>
+//! [1]
+
+//! [2]
+class Counter : public QObject
+//! [2] //! [3]
+{
+ Q_OBJECT
+
+public:
+ Counter() { m_value = 0; }
+
+ int value() const { return m_value; }
+
+public slots:
+ void setValue(int value);
+
+signals:
+ void valueChanged(int newValue);
+
+private:
+ int m_value;
+};
+//! [3]
+
+#endif
diff --git a/doc/src/snippets/simplemodel-use/main.cpp b/doc/src/snippets/simplemodel-use/main.cpp
new file mode 100644
index 0000000..acb680d
--- /dev/null
+++ b/doc/src/snippets/simplemodel-use/main.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example of how to access items from an existing model.
+*/
+
+#include <QtGui>
+
+/*!
+ Create a default directory model and, using the index-based interface to
+ the model and some QLabel widgets, populate the window's layout with the
+ names of objects in the directory.
+
+ Note that we only want to read the filenames in the highest level of the
+ directory, so we supply a default (invalid) QModelIndex to the model in
+ order to indicate that we want top-level items.
+*/
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QWidget *window = new QWidget;
+ QVBoxLayout *layout = new QVBoxLayout(window);
+ QLabel *title = new QLabel("Some items from the directory model", window);
+ title->setBackgroundRole(QPalette::Base);
+ title->setMargin(8);
+ layout->addWidget(title);
+
+//! [0]
+ QDirModel *model = new QDirModel;
+ QModelIndex parentIndex = model->index(QDir::currentPath());
+ int numRows = model->rowCount(parentIndex);
+//! [0]
+
+//! [1]
+ for (int row = 0; row < numRows; ++row) {
+ QModelIndex index = model->index(row, 0, parentIndex);
+//! [1]
+
+//! [2]
+ QString text = model->data(index, Qt::DisplayRole).toString();
+ // Display the text in a widget.
+//! [2]
+
+ QLabel *label = new QLabel(text, window);
+ layout->addWidget(label);
+//! [3]
+ }
+//! [3]
+
+ window->setWindowTitle("A simple model example");
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/simplemodel-use/simplemodel-use.pro b/doc/src/snippets/simplemodel-use/simplemodel-use.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/doc/src/snippets/simplemodel-use/simplemodel-use.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/doc/src/snippets/snippets.pro b/doc/src/snippets/snippets.pro
new file mode 100644
index 0000000..50e33b3
--- /dev/null
+++ b/doc/src/snippets/snippets.pro
@@ -0,0 +1,109 @@
+### A qmake file for the snippets. *** This is not for distribution. ***
+#
+# Snippets that don't work are commented out and marked with "broken";
+# other commented out snippets were probably not designed to be built.
+
+TEMPLATE = subdirs
+SUBDIRS = brush \
+ buffer \
+# clipboard \ # broken
+ coordsys \
+# customstyle \
+ designer \
+ dialogs \
+ dockwidgets \
+ draganddrop \
+ dragging \
+ dropactions \
+ dropevents \
+ droprectangle \
+ events \
+# file \
+ image \
+ inherited-slot \
+ itemselection \
+ layouts \
+ matrix \
+ moc \
+# modelview-subclasses \ # broken
+ painterpath \
+ persistentindexes \
+ picture \
+ plaintextlayout \
+# pointer \
+ polygon \
+ process \
+ qdbusextratypes \
+ qcalendarwidget \
+ qdir-filepaths \
+ qdir-listfiles \
+ qdir-namefilters \
+ qfontdatabase \
+ qlabel \
+ qlineargradient \
+ qlistview-dnd \
+ qlistview-using \
+ qlistwidget-dnd \
+ qlistwidget-using \
+# qmake \ # not designed to be built
+ qmetaobject-invokable \
+ qprocess \
+ qprocess-environment \
+# qsignalmapper \
+ qsortfilterproxymodel-details \
+ qsplashscreen \
+ qstack \
+ qstackedlayout \
+ qstackedwidget \
+ qstandarditemmodel \
+ qstatustipevent \
+ qstring \
+ qstringlist \
+ qstringlistmodel \
+ qstyleoption \
+ qstyleplugin \
+ qsvgwidget \
+ qtablewidget-dnd \
+ qtablewidget-resizing \
+ qtablewidget-using \
+ qtcast \
+ qtreeview-dnd \
+ qtreewidgetitemiterator-using \
+ qtreewidget-using \
+ quiloader \
+ qx11embedcontainer \
+ qx11embedwidget \
+ reading-selections \
+ scribe-overview \
+ separations \
+# settings \ # not designed to be built
+ shareddirmodel \
+ sharedemployee \
+ sharedtablemodel \
+# signalsandslots \
+ simplemodel-use \
+# splitter \
+ sqldatabase \
+ stringlistmodel \
+# styles \
+ textblock-formats \
+ textblock-fragments \
+ textdocument-blocks \
+ textdocument-charformats \
+ textdocument-cursors \
+ textdocument-find \
+ textdocument-frames \
+ textdocument-imageformat \
+ textdocument-images \
+ textdocument-listitems \
+ textdocument-lists \
+ textdocument-printing \
+# textdocument-resources \
+ textdocument-selections \
+ textdocument-tables \
+# threads \
+ timers \
+ updating-selections \
+# whatsthis \
+ widget-mask \
+ xml
diff --git a/doc/src/snippets/splitter/splitter.cpp b/doc/src/snippets/splitter/splitter.cpp
new file mode 100644
index 0000000..8584b62
--- /dev/null
+++ b/doc/src/snippets/splitter/splitter.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+void processSize(int)
+{
+}
+
+int main()
+{
+ QWidget *parent = 0;
+
+//! [0]
+ QSplitter *splitter = new QSplitter(parent);
+ QListView *listview = new QListView;
+ QTreeView *treeview = new QTreeView;
+ QTextEdit *textedit = new QTextEdit;
+ splitter->addWidget(listview);
+ splitter->addWidget(treeview);
+ splitter->addWidget(textedit);
+//! [0]
+
+ {
+ // SAVE STATE
+//! [1]
+ QSettings settings;
+ settings.setValue("splitterSizes", splitter->saveState());
+//! [1]
+ }
+
+ {
+ // RESTORE STATE
+//! [2]
+ QSettings settings;
+ splitter->restoreState(settings.value("splitterSizes").toByteArray());
+//! [2]
+ }
+
+//! [3]
+ QListIterator<int> it(splitter->sizes());
+ while (it.hasNext())
+ processSize(it.next());
+//! [3]
+
+ return 0;
+}
diff --git a/doc/src/snippets/splitter/splitter.pro b/doc/src/snippets/splitter/splitter.pro
new file mode 100644
index 0000000..2414a91
--- /dev/null
+++ b/doc/src/snippets/splitter/splitter.pro
@@ -0,0 +1 @@
+SOURCES += splitter.cpp
diff --git a/doc/src/snippets/splitterhandle/main.cpp b/doc/src/snippets/splitterhandle/main.cpp
new file mode 100644
index 0000000..3f4e7ec
--- /dev/null
+++ b/doc/src/snippets/splitterhandle/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QLabel>
+
+#include "splitter.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Splitter splitter(Qt::Horizontal);
+ splitter.addWidget(new QLabel("Hello"));
+ splitter.addWidget(new QLabel("World"));
+ Splitter verticalSplitter(Qt::Vertical, &splitter);
+ verticalSplitter.addWidget(new QLabel("A"));
+ verticalSplitter.addWidget(new QLabel("B"));
+ splitter.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/splitterhandle/splitter.cpp b/doc/src/snippets/splitterhandle/splitter.cpp
new file mode 100644
index 0000000..192dc79
--- /dev/null
+++ b/doc/src/snippets/splitterhandle/splitter.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "splitter.h"
+
+SplitterHandle::SplitterHandle(Qt::Orientation orientation, QSplitter *parent)
+ : QSplitterHandle(orientation, parent)
+{
+ gradient.setColorAt(0.0, Qt::darkGreen);
+ gradient.setColorAt(0.25, Qt::white);
+ gradient.setColorAt(1.0, Qt::darkGreen);
+}
+
+//! [0]
+void SplitterHandle::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(this);
+ if (orientation() == Qt::Horizontal) {
+ gradient.setStart(rect().left(), rect().height()/2);
+ gradient.setFinalStop(rect().right(), rect().height()/2);
+ } else {
+ gradient.setStart(rect().width()/2, rect().top());
+ gradient.setFinalStop(rect().width()/2, rect().bottom());
+ }
+ painter.fillRect(event->rect(), QBrush(gradient));
+}
+//! [0]
+
+Splitter::Splitter(Qt::Orientation orientation, QWidget *parent)
+ : QSplitter(orientation, parent)
+{
+}
+
+//! [1]
+QSplitterHandle *Splitter::createHandle()
+{
+ return new SplitterHandle(orientation(), this);
+}
+//! [1]
diff --git a/doc/src/snippets/splitterhandle/splitter.h b/doc/src/snippets/splitterhandle/splitter.h
new file mode 100644
index 0000000..f9cb1a4
--- /dev/null
+++ b/doc/src/snippets/splitterhandle/splitter.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SPLITTER_H
+#define SPLITTER_H
+
+#include <QLinearGradient>
+#include <QSplitter>
+#include <QSplitterHandle>
+
+class QPaintEvent;
+
+//! [0]
+class Splitter : public QSplitter
+{
+public:
+ Splitter(Qt::Orientation orientation, QWidget *parent = 0);
+
+protected:
+ QSplitterHandle *createHandle();
+};
+//! [0]
+
+class SplitterHandle : public QSplitterHandle
+{
+public:
+ SplitterHandle(Qt::Orientation orientation, QSplitter *parent);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QLinearGradient gradient;
+};
+
+#endif
diff --git a/doc/src/snippets/splitterhandle/splitterhandle.pro b/doc/src/snippets/splitterhandle/splitterhandle.pro
new file mode 100644
index 0000000..0c2a999
--- /dev/null
+++ b/doc/src/snippets/splitterhandle/splitterhandle.pro
@@ -0,0 +1,3 @@
+HEADERS = splitter.h
+SOURCES = main.cpp \
+ splitter.cpp
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp
new file mode 100644
index 0000000..ae176ac
--- /dev/null
+++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp
@@ -0,0 +1,560 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSql>
+
+#include <iostream>
+
+using namespace std;
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+void QSqlDatabase_snippets()
+{
+ {
+//! [0]
+ QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL");
+ db.setHostName("acidalia");
+ db.setDatabaseName("customdb");
+ db.setUserName("mojito");
+ db.setPassword("J0a1m8");
+ bool ok = db.open();
+//! [0]
+ Q_UNUSED(ok);
+ }
+
+ {
+//! [1]
+ QSqlDatabase db = QSqlDatabase::database();
+//! [1]
+ }
+}
+
+void QSqlField_snippets()
+{
+#if 0
+ {
+//! [2]
+ QSqlField field("age", QVariant::Int);
+ field.setValue(QPixmap()); // WRONG
+//! [2]
+ }
+#endif
+
+ {
+//! [3]
+ QSqlField field("age", QVariant::Int);
+ field.setValue(QString("123")); // casts QString to int
+//! [3]
+ }
+
+ {
+//! [4]
+ QSqlQuery query;
+//! [4] //! [5]
+ QSqlRecord record = query.record();
+//! [5] //! [6]
+ QSqlField field = record.field("country");
+//! [6]
+ }
+}
+
+void doSomething(const QString &)
+{
+}
+
+void QSqlQuery_snippets()
+{
+ {
+ // typical loop
+//! [7]
+ QSqlQuery query("SELECT country FROM artist");
+ while (query.next()) {
+ QString country = query.value(0).toString();
+ doSomething(country);
+ }
+//! [7]
+ }
+
+ {
+ // field index lookup
+//! [8]
+ QSqlQuery query("SELECT * FROM artist");
+ int fieldNo = query.record().indexOf("country");
+ while (query.next()) {
+ QString country = query.value(fieldNo).toString();
+ doSomething(country);
+ }
+//! [8]
+ }
+
+ {
+ // named with named
+//! [9]
+ QSqlQuery query;
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (:id, :forename, :surname)");
+ query.bindValue(":id", 1001);
+ query.bindValue(":forename", "Bart");
+ query.bindValue(":surname", "Simpson");
+ query.exec();
+//! [9]
+ }
+
+ {
+ // positional with named
+//! [10]
+ QSqlQuery query;
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (:id, :forename, :surname)");
+ query.bindValue(0, 1001);
+ query.bindValue(1, "Bart");
+ query.bindValue(2, "Simpson");
+ query.exec();
+//! [10]
+ }
+
+ {
+ // positional 1
+//! [11]
+ QSqlQuery query;
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (?, ?, ?)");
+ query.bindValue(0, 1001);
+ query.bindValue(1, "Bart");
+ query.bindValue(2, "Simpson");
+ query.exec();
+//! [11]
+ }
+
+ {
+ // positional 2
+//! [12]
+ QSqlQuery query;
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (?, ?, ?)");
+ query.addBindValue(1001);
+ query.addBindValue("Bart");
+ query.addBindValue("Simpson");
+ query.exec();
+//! [12]
+ }
+
+ {
+ // stored
+//! [13]
+ QSqlQuery query;
+ query.prepare("CALL AsciiToInt(?, ?)");
+ query.bindValue(0, "A");
+ query.bindValue(1, 0, QSql::Out);
+ query.exec();
+ int i = query.boundValue(1).toInt(); // i is 65
+//! [13]
+ Q_UNUSED(i);
+ }
+
+ QSqlQuery query;
+
+ {
+ // examine with named binding
+//! [14]
+ QMapIterator<QString, QVariant> i(query.boundValues());
+ while (i.hasNext()) {
+ i.next();
+ cout << i.key().toAscii().data() << ": "
+ << i.value().toString().toAscii().data() << endl;
+ }
+//! [14]
+ }
+
+ {
+ // examine with positional binding
+//! [15]
+ QList<QVariant> list = query.boundValues().values();
+ for (int i = 0; i < list.size(); ++i)
+ cout << i << ": " << list.at(i).toString().toAscii().data() << endl;
+//! [15]
+ }
+}
+
+void QSqlQueryModel_snippets()
+{
+ {
+//! [16]
+ QSqlQueryModel *model = new QSqlQueryModel;
+ model->setQuery("SELECT name, salary FROM employee");
+ model->setHeaderData(0, Qt::Horizontal, tr("Name"));
+ model->setHeaderData(1, Qt::Horizontal, tr("Salary"));
+
+//! [17]
+ QTableView *view = new QTableView;
+//! [17] //! [18]
+ view->setModel(model);
+//! [18] //! [19]
+ view->show();
+//! [16] //! [19] //! [20]
+ view->setEditTriggers(QAbstractItemView::NoEditTriggers);
+//! [20]
+ }
+
+//! [21]
+ QSqlQueryModel model;
+ model.setQuery("SELECT * FROM employee");
+ int salary = model.record(4).value("salary").toInt();
+//! [21]
+ Q_UNUSED(salary);
+
+ {
+//! [22]
+ int salary = model.data(model.index(4, 2)).toInt();
+//! [22]
+ Q_UNUSED(salary);
+ }
+
+ for (int row = 0; row < model.rowCount(); ++row) {
+ for (int col = 0; col < model.columnCount(); ++col) {
+ qDebug() << model.data(model.index(row, col));
+ }
+ }
+}
+
+class MyModel : public QSqlQueryModel
+{
+public:
+ QVariant data(const QModelIndex &item, int role) const;
+
+ int m_specialColumnNo;
+};
+
+//! [23]
+QVariant MyModel::data(const QModelIndex &item, int role) const
+{
+ if (item.column() == m_specialColumnNo) {
+ // handle column separately
+ }
+ return QSqlQueryModel::data(item, role);
+}
+//! [23]
+
+void QSqlTableModel_snippets()
+{
+//! [24]
+ QSqlTableModel *model = new QSqlTableModel;
+ model->setTable("employee");
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+ model->select();
+ model->removeColumn(0); // don't show the ID
+ model->setHeaderData(0, Qt::Horizontal, tr("Name"));
+ model->setHeaderData(1, Qt::Horizontal, tr("Salary"));
+
+ QTableView *view = new QTableView;
+ view->setModel(model);
+ view->show();
+//! [24]
+
+ {
+//! [25]
+ QSqlTableModel model;
+ model.setTable("employee");
+ QString name = model.record(4).value("name").toString();
+//! [25]
+ }
+}
+
+void sql_intro_snippets()
+{
+ {
+//! [26]
+ QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
+ db.setHostName("bigblue");
+ db.setDatabaseName("flightdb");
+ db.setUserName("acarlson");
+ db.setPassword("1uTbSbAs");
+ bool ok = db.open();
+//! [26]
+ Q_UNUSED(ok);
+ }
+
+ {
+//! [27]
+ QSqlDatabase firstDB = QSqlDatabase::addDatabase("QMYSQL", "first");
+ QSqlDatabase secondDB = QSqlDatabase::addDatabase("QMYSQL", "second");
+//! [27]
+ }
+
+ {
+//! [28]
+ QSqlDatabase defaultDB = QSqlDatabase::database();
+//! [28] //! [29]
+ QSqlDatabase firstDB = QSqlDatabase::database("first");
+//! [29] //! [30]
+ QSqlDatabase secondDB = QSqlDatabase::database("second");
+//! [30]
+ }
+
+ {
+ // SELECT1
+//! [31]
+ QSqlQuery query;
+ query.exec("SELECT name, salary FROM employee WHERE salary > 50000");
+//! [31]
+
+//! [32]
+ while (query.next()) {
+ QString name = query.value(0).toString();
+ int salary = query.value(1).toInt();
+ qDebug() << name << salary;
+ }
+//! [32]
+ }
+
+ {
+ // FEATURE
+//! [33]
+ QSqlQuery query;
+ int numRows;
+ query.exec("SELECT name, salary FROM employee WHERE salary > 50000");
+
+ QSqlDatabase defaultDB = QSqlDatabase::database();
+ if (defaultDB.driver()->hasFeature(QSqlDriver::QuerySize)) {
+ numRows = query.size();
+ } else {
+ // this can be very slow
+ query.last();
+ numRows = query.at() + 1;
+ }
+//! [33]
+ }
+
+ {
+ // INSERT1
+//! [34]
+ QSqlQuery query;
+ query.exec("INSERT INTO employee (id, name, salary) "
+ "VALUES (1001, 'Thad Beaumont', 65000)");
+//! [34]
+ }
+
+ {
+ // NAMED BINDING
+//! [35]
+ QSqlQuery query;
+ query.prepare("INSERT INTO employee (id, name, salary) "
+ "VALUES (:id, :name, :salary)");
+ query.bindValue(":id", 1001);
+ query.bindValue(":name", "Thad Beaumont");
+ query.bindValue(":salary", 65000);
+ query.exec();
+//! [35]
+ }
+
+ {
+ // POSITIONAL BINDING
+//! [36]
+ QSqlQuery query;
+ query.prepare("INSERT INTO employee (id, name, salary) "
+ "VALUES (?, ?, ?)");
+ query.addBindValue(1001);
+ query.addBindValue("Thad Beaumont");
+ query.addBindValue(65000);
+ query.exec();
+//! [36]
+ }
+
+ {
+ // UPDATE1
+//! [37]
+ QSqlQuery query;
+ query.exec("UPDATE employee SET salary = 70000 WHERE id = 1003");
+//! [37]
+ }
+
+ {
+ // DELETE1
+//! [38]
+ QSqlQuery query;
+ query.exec("DELETE FROM employee WHERE id = 1007");
+//! [38]
+ }
+
+ {
+ // TRANSACTION
+//! [39]
+ QSqlDatabase::database().transaction();
+ QSqlQuery query;
+ query.exec("SELECT id FROM employee WHERE name = 'Torild Halvorsen'");
+ if (query.next()) {
+ int employeeId = query.value(0).toInt();
+ query.exec("INSERT INTO project (id, name, ownerid) "
+ "VALUES (201, 'Manhattan Project', "
+ + QString::number(employeeId) + ')');
+ }
+ QSqlDatabase::database().commit();
+//! [39]
+ }
+
+ {
+ // SQLQUERYMODEL1
+//! [40]
+ QSqlQueryModel model;
+ model.setQuery("SELECT * FROM employee");
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ int id = model.record(i).value("id").toInt();
+ QString name = model.record(i).value("name").toString();
+ qDebug() << id << name;
+ }
+//! [40]
+ }
+
+ {
+ // SQLTABLEMODEL1
+//! [41]
+ QSqlTableModel model;
+ model.setTable("employee");
+ model.setFilter("salary > 50000");
+ model.setSort(2, Qt::DescendingOrder);
+ model.select();
+
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QString name = model.record(i).value("name").toString();
+ int salary = model.record(i).value("salary").toInt();
+ qDebug() << name << salary;
+ }
+//! [41]
+ }
+
+ {
+ // SQLTABLEMODEL2
+ QSqlTableModel model;
+ model.setTable("employee");
+
+//! [42]
+ for (int i = 0; i < model.rowCount(); ++i) {
+ QSqlRecord record = model.record(i);
+ double salary = record.value("salary").toInt();
+ salary *= 1.1;
+ record.setValue("salary", salary);
+ model.setRecord(i, record);
+ }
+ model.submitAll();
+//! [42]
+
+ // SQLTABLEMODEL3
+ int row = 1;
+ int column = 2;
+//! [43]
+ model.setData(model.index(row, column), 75000);
+ model.submitAll();
+//! [43]
+
+ // SQLTABLEMODEL4
+//! [44]
+ model.insertRows(row, 1);
+ model.setData(model.index(row, 0), 1013);
+ model.setData(model.index(row, 1), "Peter Gordon");
+ model.setData(model.index(row, 2), 68500);
+ model.submitAll();
+//! [44]
+
+//! [45]
+ model.removeRows(row, 5);
+//! [45] //! [46]
+ model.submitAll();
+//! [46]
+ }
+}
+
+//! [47]
+class XyzResult : public QSqlResult
+{
+public:
+ XyzResult(const QSqlDriver *driver)
+ : QSqlResult(driver) {}
+ ~XyzResult() {}
+
+protected:
+ QVariant data(int /* index */) { return QVariant(); }
+ bool isNull(int /* index */) { return false; }
+ bool reset(const QString & /* query */) { return false; }
+ bool fetch(int /* index */) { return false; }
+ bool fetchFirst() { return false; }
+ bool fetchLast() { return false; }
+ int size() { return 0; }
+ int numRowsAffected() { return 0; }
+ QSqlRecord record() { return QSqlRecord(); }
+};
+//! [47]
+
+//! [48]
+class XyzDriver : public QSqlDriver
+{
+public:
+ XyzDriver() {}
+ ~XyzDriver() {}
+
+ bool hasFeature(DriverFeature /* feature */) const { return false; }
+ bool open(const QString & /* db */, const QString & /* user */,
+ const QString & /* password */, const QString & /* host */,
+ int /* port */, const QString & /* options */)
+ { return false; }
+ void close() {}
+ QSqlResult *createResult() const { return new XyzResult(this); }
+};
+//! [48]
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QSqlDatabase_snippets();
+ QSqlField_snippets();
+ QSqlQuery_snippets();
+ QSqlQueryModel_snippets();
+ QSqlTableModel_snippets();
+
+ XyzDriver driver;
+ XyzResult result(&driver);
+}
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.pro b/doc/src/snippets/sqldatabase/sqldatabase.pro
new file mode 100644
index 0000000..4399695
--- /dev/null
+++ b/doc/src/snippets/sqldatabase/sqldatabase.pro
@@ -0,0 +1,2 @@
+SOURCES += sqldatabase.cpp
+QT += sql
diff --git a/doc/src/snippets/streaming/main.cpp b/doc/src/snippets/streaming/main.cpp
new file mode 100644
index 0000000..7ea53de
--- /dev/null
+++ b/doc/src/snippets/streaming/main.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QByteArray>
+#include <QDataStream>
+
+//! [0]
+struct Movie
+{
+ int id;
+ QString title;
+ QDate releaseDate;
+};
+//! [0]
+
+//! [1]
+QDataStream &operator<<(QDataStream &out, const Movie &movie)
+{
+ out << (quint32)movie.id << movie.title
+ << movie.releaseDate;
+ return out;
+}
+//! [1]
+
+//! [2]
+QDataStream &operator>>(QDataStream &in, Movie &movie)
+{
+ quint32 id;
+ QDate date;
+
+ in >> id >> movie.title >> date;
+ movie.id = (int)id;
+ movie.releaseDate = date;
+ return in;
+}
+//! [2]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Movie m;
+ m.id = 0001;
+ m.title = "Happy Meal";
+ m.releaseDate = QDate(1995, 5, 17);
+
+ QByteArray byteArray;
+ QDataStream stream(&byteArray, QIODevice::WriteOnly);
+ stream << m;
+
+ // display
+ qDebug() << m.id << m.releaseDate << m.title;
+
+ Movie m2;
+
+ int id2;
+ QString title2;
+ QDate date2;
+
+ QDataStream stream2(byteArray);
+ stream2 >> id2 >> title2 >> date2;
+
+ m2.id = id2;
+ m2.title = title2;
+ m2.releaseDate = date2;
+
+ qDebug() << id2 << " " << date2 << " " << title2;
+
+ return 0;
+}
diff --git a/doc/src/snippets/streaming/streaming.pro b/doc/src/snippets/streaming/streaming.pro
new file mode 100644
index 0000000..8c5eb91
--- /dev/null
+++ b/doc/src/snippets/streaming/streaming.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+CONFIG += CONSOLE \ No newline at end of file
diff --git a/doc/src/snippets/stringlistmodel/main.cpp b/doc/src/snippets/stringlistmodel/main.cpp
new file mode 100644
index 0000000..383acc6
--- /dev/null
+++ b/doc/src/snippets/stringlistmodel/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ The main function for the string list model example. This creates and
+ populates a model with values from a string list then displays the
+ contents of the model using a QListView widget.
+*/
+
+#include <QAbstractItemModel>
+#include <QApplication>
+#include <QListView>
+
+#include "model.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+// Unindented for quoting purposes:
+//! [1]
+QStringList numbers;
+numbers << "One" << "Two" << "Three" << "Four" << "Five";
+
+QAbstractItemModel *model = new StringListModel(numbers);
+//! [0] //! [1] //! [2] //! [3]
+QListView *view = new QListView;
+//! [2]
+view->setWindowTitle("View onto a string list model");
+//! [4]
+view->setModel(model);
+//! [3] //! [4]
+
+ model->insertRows(5, 7, QModelIndex());
+
+ for (int row = 5; row < 12; ++row) {
+ QModelIndex index = model->index(row, 0, QModelIndex());
+ model->setData(index, QString::number(row+1));
+ }
+
+//! [5]
+ view->show();
+ return app.exec();
+}
+//! [5]
diff --git a/doc/src/snippets/stringlistmodel/model.cpp b/doc/src/snippets/stringlistmodel/model.cpp
new file mode 100644
index 0000000..8f681cc
--- /dev/null
+++ b/doc/src/snippets/stringlistmodel/model.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ A simple model that uses a QStringList as its data source.
+*/
+
+#include "model.h"
+
+/*!
+ Returns the number of items in the string list as the number of rows
+ in the model.
+*/
+
+//! [0]
+int StringListModel::rowCount(const QModelIndex &parent) const
+{
+ return stringList.count();
+}
+//! [0]
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned.
+*/
+
+//! [1]
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+//! [1]
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+//! [2]
+QVariant StringListModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+//! [2]
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+//! [3]
+Qt::ItemFlags StringListModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
+}
+//! [3]
+
+/*!
+ Changes an item in the string list, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The index corresponds to an item to be shown in a view.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+//! [4]
+bool StringListModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (index.isValid() && role == Qt::EditRole) {
+
+ stringList.replace(index.row(), value.toString());
+ emit dataChanged(index, index);
+ return true;
+ }
+//! [4] //! [5]
+ return false;
+}
+//! [5]
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+//! [6]
+bool StringListModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ beginInsertRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.insert(position, "");
+ }
+
+ endInsertRows();
+ return true;
+//! [6] //! [7]
+}
+//! [7]
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+//! [8]
+bool StringListModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(QModelIndex(), position, position+rows-1);
+
+ for (int row = 0; row < rows; ++row) {
+ stringList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+//! [8] //! [9]
+}
+//! [9]
diff --git a/doc/src/snippets/stringlistmodel/model.h b/doc/src/snippets/stringlistmodel/model.h
new file mode 100644
index 0000000..8e8f9c6
--- /dev/null
+++ b/doc/src/snippets/stringlistmodel/model.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractListModel>
+#include <QObject>
+#include <QStringList>
+
+//! [0]
+class StringListModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ StringListModel(const QStringList &strings, QObject *parent = 0)
+ : QAbstractListModel(parent), stringList(strings) {}
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+//! [0] //! [1]
+ int role = Qt::DisplayRole) const;
+//! [1]
+
+//! [2]
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+//! [2] //! [3]
+ int role = Qt::EditRole);
+//! [3]
+
+//! [4]
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
+//! [4]
+
+//! [5]
+private:
+ QStringList stringList;
+};
+//! [5]
+
+#endif
diff --git a/doc/src/snippets/stringlistmodel/stringlistmodel.pro b/doc/src/snippets/stringlistmodel/stringlistmodel.pro
new file mode 100644
index 0000000..b1126bfe
--- /dev/null
+++ b/doc/src/snippets/stringlistmodel/stringlistmodel.pro
@@ -0,0 +1,3 @@
+HEADERS = model.h
+SOURCES = main.cpp \
+ model.cpp
diff --git a/doc/src/snippets/styles/styles.cpp b/doc/src/snippets/styles/styles.cpp
new file mode 100644
index 0000000..f411c0c
--- /dev/null
+++ b/doc/src/snippets/styles/styles.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QStyleOption>
+#include <QStylePainter>
+#include <QWidget>
+
+class MyWidget : public QWidget
+{
+protected:
+ void paintEvent(QPaintEvent *event);
+ void paintEvent2(QPaintEvent *event);
+
+};
+
+//! [0] //! [1]
+void MyWidget::paintEvent(QPaintEvent * /* event */)
+//! [0]
+{
+//! [2]
+ QPainter painter(this);
+//! [2]
+
+ QStyleOptionFocusRect option;
+ option.initFrom(this);
+ option.backgroundColor = palette().color(QPalette::Background);
+
+//! [3]
+ style()->drawPrimitive(QStyle::PE_FrameFocusRect, &option, &painter, this);
+//! [3]
+}
+//! [1]
+
+void MyWidget::paintEvent2(QPaintEvent * /* event */)
+//! [4]
+{
+//! [4] //! [5] //! [6]
+ QStylePainter painter(this);
+//! [5]
+
+ QStyleOptionFocusRect option;
+ option.initFrom(this);
+ option.backgroundColor = palette().color(QPalette::Background);
+
+//! [7]
+ painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
+//! [7]
+}
+//! [6]
+
+int main()
+{
+ return 0;
+}
diff --git a/doc/src/snippets/stylesheet/common-mistakes.cpp b/doc/src/snippets/stylesheet/common-mistakes.cpp
new file mode 100644
index 0000000..1c7e3a8
--- /dev/null
+++ b/doc/src/snippets/stylesheet/common-mistakes.cpp
@@ -0,0 +1,12 @@
+//! [1]
+ QPushButton {
+ color: grey;
+ border-image: url(/home/kamlie/code/button.png) 3 10 3 10;
+ border-top: 3px transparent;
+ border-bottom: 3px transparent;
+ border-right: 10px transparent;
+ border-left: 10px transparent;
+ }
+//! [1]
+
+
diff --git a/doc/src/snippets/textblock-formats/main.cpp b/doc/src/snippets/textblock-formats/main.cpp
new file mode 100644
index 0000000..6d84a40
--- /dev/null
+++ b/doc/src/snippets/textblock-formats/main.cpp
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QTextEdit *editor = new QTextEdit();
+ QTextCursor cursor(editor->textCursor());
+//! [0]
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextBlockFormat blockFormat = cursor.blockFormat();
+ blockFormat.setTopMargin(4);
+ blockFormat.setLeftMargin(4);
+ blockFormat.setRightMargin(4);
+ blockFormat.setBottomMargin(4);
+
+ cursor.setBlockFormat(blockFormat);
+ cursor.insertText(tr("This contains plain text inside a "
+ "text block with margins to keep it separate "
+ "from other parts of the document."));
+
+ cursor.insertBlock();
+
+//! [1]
+ QTextBlockFormat backgroundFormat = blockFormat;
+ backgroundFormat.setBackground(QColor("lightGray"));
+
+ cursor.setBlockFormat(backgroundFormat);
+//! [1]
+ cursor.insertText(tr("The background color of a text block can be "
+ "changed to highlight text."));
+
+ cursor.insertBlock();
+
+ QTextBlockFormat rightAlignedFormat = blockFormat;
+ rightAlignedFormat.setAlignment(Qt::AlignRight);
+
+ cursor.setBlockFormat(rightAlignedFormat);
+ cursor.insertText(tr("The alignment of the text within a block is "
+ "controlled by the alignment properties of "
+ "the block itself. This text block is "
+ "right-aligned."));
+
+ cursor.insertBlock();
+
+ QTextBlockFormat paragraphFormat = blockFormat;
+ paragraphFormat.setAlignment(Qt::AlignJustify);
+ paragraphFormat.setTextIndent(32);
+
+ cursor.setBlockFormat(paragraphFormat);
+ cursor.insertText(tr("Text can be formatted so that the first "
+ "line in a paragraph has its own margin. "
+ "This makes the text more readable."));
+
+ cursor.insertBlock();
+
+ QTextBlockFormat reverseFormat = blockFormat;
+ reverseFormat.setAlignment(Qt::AlignJustify);
+ reverseFormat.setTextIndent(32);
+
+ cursor.setBlockFormat(reverseFormat);
+ cursor.insertText(tr("The direction of the text can be reversed. "
+ "This is useful for right-to-left "
+ "languages."));
+
+ editor->setWindowTitle(tr("Text Block Formats"));
+ editor->resize(480, 480);
+ editor->show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/textblock-formats/textblock-formats.pro b/doc/src/snippets/textblock-formats/textblock-formats.pro
new file mode 100644
index 0000000..d664835
--- /dev/null
+++ b/doc/src/snippets/textblock-formats/textblock-formats.pro
@@ -0,0 +1,2 @@
+QT += xml
+SOURCES = main.cpp
diff --git a/doc/src/snippets/textblock-fragments/main.cpp b/doc/src/snippets/textblock-fragments/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textblock-fragments/mainwindow.cpp b/doc/src/snippets/textblock-fragments/mainwindow.cpp
new file mode 100644
index 0000000..ab1d9b4
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/mainwindow.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xmlwriter.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *saveAction = fileMenu->addAction(tr("&Save..."));
+ saveAction->setShortcut(tr("Ctrl+S"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *insertMenu = new QMenu(tr("&Insert"));
+
+ QAction *calendarAction = insertMenu->addAction(tr("&Calendar"));
+ calendarAction->setShortcut(tr("Ctrl+I"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(insertMenu);
+
+ editor = new QTextEdit(this);
+
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(calendarAction, SIGNAL(triggered()), this, SLOT(insertCalendar()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Writer"));
+}
+
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save document as:"), "", tr("XML (*.xml)"));
+
+ if (!fileName.isEmpty()) {
+ if (writeXml(fileName))
+ setWindowTitle(fileName);
+ else
+ QMessageBox::warning(this, tr("Warning"),
+ tr("Failed to save the document."), QMessageBox::Cancel,
+ QMessageBox::NoButton);
+ }
+}
+
+void MainWindow::insertCalendar()
+{
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextCharFormat format(cursor.charFormat());
+ format.setFontFamily("Courier");
+
+ QTextCharFormat boldFormat = format;
+ boldFormat.setFontWeight(QFont::Bold);
+
+ cursor.insertBlock();
+ cursor.insertText(" ", boldFormat);
+
+ QDate date = QDate::currentDate();
+ int year = date.year(), month = date.month();
+
+ for (int weekDay = 1; weekDay <= 7; ++weekDay) {
+ cursor.insertText(QString("%1 ").arg(QDate::shortDayName(weekDay), 3),
+ boldFormat);
+ }
+
+ cursor.insertBlock();
+ cursor.insertText(" ", format);
+
+ for (int column = 1; column < QDate(year, month, 1).dayOfWeek(); ++column) {
+ cursor.insertText(" ", format);
+ }
+
+ for (int day = 1; day <= date.daysInMonth(); ++day) {
+ int weekDay = QDate(year, month, day).dayOfWeek();
+
+ if (QDate(year, month, day) == date)
+ cursor.insertText(QString("%1 ").arg(day, 3), boldFormat);
+ else
+ cursor.insertText(QString("%1 ").arg(day, 3), format);
+
+ if (weekDay == 7) {
+ cursor.insertBlock();
+ cursor.insertText(" ", format);
+ }
+ }
+}
+
+bool MainWindow::writeXml(const QString &fileName)
+{
+ XmlWriter documentWriter(editor->document());
+
+ QDomDocument *domDocument = documentWriter.toXml();
+ QFile file(fileName);
+
+ if (file.open(QFile::WriteOnly)) {
+ QTextStream textStream(&file);
+
+ textStream << domDocument->toByteArray(1);
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/doc/src/snippets/textblock-fragments/mainwindow.h b/doc/src/snippets/textblock-fragments/mainwindow.h
new file mode 100644
index 0000000..e2f4961
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/mainwindow.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertCalendar();
+ void saveFile();
+
+private:
+ bool writeXml(const QString &fileName);
+
+ QTextEdit *editor;
+};
+
+#endif
diff --git a/doc/src/snippets/textblock-fragments/textblock-fragments.pro b/doc/src/snippets/textblock-fragments/textblock-fragments.pro
new file mode 100644
index 0000000..83ed78e
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/textblock-fragments.pro
@@ -0,0 +1,6 @@
+QT += xml
+HEADERS = mainwindow.h \
+ xmlwriter.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xmlwriter.cpp
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.cpp b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
new file mode 100644
index 0000000..c96a36b
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xmlwriter.h"
+
+QDomDocument *XmlWriter::toXml()
+{
+ QDomImplementation implementation;
+ QDomDocumentType docType = implementation.createDocumentType(
+ "scribe-document", "scribe", "qtsoftware.com/scribe");
+
+ document = new QDomDocument(docType);
+
+ // ### This processing instruction is required to ensure that any kind
+ // of encoding is given when the document is written.
+ QDomProcessingInstruction process = document->createProcessingInstruction(
+ "xml", "version=\"1.0\" encoding=\"utf-8\"");
+ document->appendChild(process);
+
+ QDomElement documentElement = document->createElement("document");
+ document->appendChild(documentElement);
+
+//! [0]
+ QTextBlock currentBlock = textDocument->begin();
+
+ while (currentBlock.isValid()) {
+//! [0]
+ QDomElement blockElement = document->createElement("block");
+ document->appendChild(blockElement);
+
+ readFragment(currentBlock, blockElement, document);
+
+//! [1]
+ processBlock(currentBlock);
+//! [1]
+
+//! [2]
+ currentBlock = currentBlock.next();
+ }
+//! [2]
+
+ return document;
+}
+
+void XmlWriter::readFragment(const QTextBlock &currentBlock,
+ QDomElement blockElement,
+ QDomDocument *document)
+{
+//! [3] //! [4]
+ QTextBlock::iterator it;
+ for (it = currentBlock.begin(); !(it.atEnd()); ++it) {
+ QTextFragment currentFragment = it.fragment();
+ if (currentFragment.isValid())
+//! [3] //! [5]
+ processFragment(currentFragment);
+//! [4] //! [5]
+
+ if (currentFragment.isValid()) {
+ QDomElement fragmentElement = document->createElement("fragment");
+ blockElement.appendChild(fragmentElement);
+
+ fragmentElement.setAttribute("length", currentFragment.length());
+ QDomText fragmentText = document->createTextNode(currentFragment.text());
+
+ fragmentElement.appendChild(fragmentText);
+//! [6]
+ }
+//! [7]
+ }
+//! [6] //! [7]
+}
+
+void XmlWriter::processBlock(const QTextBlock &currentBlock)
+{
+}
+
+void XmlWriter::processFragment(const QTextFragment &currentFragment)
+{
+}
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.h b/doc/src/snippets/textblock-fragments/xmlwriter.h
new file mode 100644
index 0000000..d7a057c
--- /dev/null
+++ b/doc/src/snippets/textblock-fragments/xmlwriter.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XMLWRITER_H
+#define XMLWRITER_H
+
+#include <QDomDocument>
+
+class QTextDocument;
+
+class XmlWriter
+{
+public:
+ XmlWriter(QTextDocument *document) : textDocument(document) {}
+ QDomDocument *toXml();
+
+private:
+ void readFragment(const QTextBlock &currentBlock, QDomElement blockElement,
+ QDomDocument *document);
+ void processBlock(const QTextBlock &currentBlock);
+ void processFragment(const QTextFragment &currentFragment);
+
+ QDomDocument *document;
+ QTextDocument *textDocument;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-blocks/main.cpp b/doc/src/snippets/textdocument-blocks/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-blocks/mainwindow.cpp b/doc/src/snippets/textdocument-blocks/mainwindow.cpp
new file mode 100644
index 0000000..14ddb8b
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/mainwindow.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xmlwriter.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *saveAction = fileMenu->addAction(tr("&Save..."));
+ saveAction->setShortcut(tr("Ctrl+S"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *insertMenu = new QMenu(tr("&Insert"));
+
+ QAction *calendarAction = insertMenu->addAction(tr("&Calendar"));
+ calendarAction->setShortcut(tr("Ctrl+I"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(insertMenu);
+
+//! [0]
+ editor = new QTextEdit(this);
+//! [0]
+
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(calendarAction, SIGNAL(triggered()), this, SLOT(insertCalendar()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Writer"));
+}
+
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save document as:"), "", tr("XML (*.xml)"));
+
+ if (!fileName.isEmpty()) {
+ if (writeXml(fileName))
+ setWindowTitle(fileName);
+ else
+ QMessageBox::warning(this, tr("Warning"),
+ tr("Failed to save the document."), QMessageBox::Cancel,
+ QMessageBox::NoButton);
+ }
+}
+
+void MainWindow::insertCalendar()
+{
+//! [1]
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextCharFormat format(cursor.charFormat());
+ format.setFontFamily("Courier");
+
+ QTextCharFormat boldFormat = format;
+ boldFormat.setFontWeight(QFont::Bold);
+
+ cursor.insertBlock();
+ cursor.insertText(" ", boldFormat);
+
+ QDate date = QDate::currentDate();
+ int year = date.year(), month = date.month();
+
+ for (int weekDay = 1; weekDay <= 7; ++weekDay) {
+ cursor.insertText(QString("%1 ").arg(QDate::shortDayName(weekDay), 3),
+ boldFormat);
+ }
+
+ cursor.insertBlock();
+ cursor.insertText(" ", format);
+
+ for (int column = 1; column < QDate(year, month, 1).dayOfWeek(); ++column) {
+ cursor.insertText(" ", format);
+ }
+
+ for (int day = 1; day <= date.daysInMonth(); ++day) {
+//! [1] //! [2]
+ int weekDay = QDate(year, month, day).dayOfWeek();
+
+ if (QDate(year, month, day) == date)
+ cursor.insertText(QString("%1 ").arg(day, 3), boldFormat);
+ else
+ cursor.insertText(QString("%1 ").arg(day, 3), format);
+
+ if (weekDay == 7) {
+ cursor.insertBlock();
+ cursor.insertText(" ", format);
+ }
+//! [2] //! [3]
+ }
+//! [3]
+}
+
+bool MainWindow::writeXml(const QString &fileName)
+{
+ XmlWriter documentWriter(editor->document());
+
+ QDomDocument *domDocument = documentWriter.toXml();
+ QFile file(fileName);
+
+ if (file.open(QFile::WriteOnly)) {
+ QTextStream textStream(&file);
+ textStream.setCodec(QTextCodec::codecForName("UTF-8"));
+
+ textStream << domDocument->toString(1).toUtf8();
+ file.close();
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/doc/src/snippets/textdocument-blocks/mainwindow.h b/doc/src/snippets/textdocument-blocks/mainwindow.h
new file mode 100644
index 0000000..e2f4961
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/mainwindow.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertCalendar();
+ void saveFile();
+
+private:
+ bool writeXml(const QString &fileName);
+
+ QTextEdit *editor;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-blocks/textdocument-blocks.pro b/doc/src/snippets/textdocument-blocks/textdocument-blocks.pro
new file mode 100644
index 0000000..83ed78e
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/textdocument-blocks.pro
@@ -0,0 +1,6 @@
+QT += xml
+HEADERS = mainwindow.h \
+ xmlwriter.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xmlwriter.cpp
diff --git a/doc/src/snippets/textdocument-blocks/xmlwriter.cpp b/doc/src/snippets/textdocument-blocks/xmlwriter.cpp
new file mode 100644
index 0000000..bfb16a0
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/xmlwriter.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xmlwriter.h"
+
+QDomDocument *XmlWriter::toXml()
+{
+ QDomImplementation implementation;
+ QDomDocumentType docType = implementation.createDocumentType(
+ "scribe-document", "scribe", "qtsoftware.com/scribe");
+
+ document = new QDomDocument(docType);
+
+ // ### This processing instruction is required to ensure that any kind
+ // of encoding is given when the document is written.
+ QDomProcessingInstruction process = document->createProcessingInstruction(
+ "xml", "version=\"1.0\" encoding=\"utf-8\"");
+ document->appendChild(process);
+
+ QDomElement documentElement = document->createElement("document");
+ document->appendChild(documentElement);
+
+ QTextBlock firstBlock = textDocument->begin();
+ createItems(documentElement, firstBlock);
+
+ return document;
+}
+
+void XmlWriter::createItems(QDomElement &parent, const QTextBlock &block)
+{
+ QTextBlock currentBlock = block;
+
+ while (currentBlock.isValid()) {
+ QDomElement blockElement = document->createElement("block");
+ blockElement.setAttribute("length", currentBlock.length());
+ parent.appendChild(blockElement);
+
+ if (!(currentBlock.text().isNull())) {
+ QDomText textNode = document->createTextNode(currentBlock.text());
+ blockElement.appendChild(textNode);
+ }
+
+ currentBlock = currentBlock.next();
+ }
+}
diff --git a/doc/src/snippets/textdocument-blocks/xmlwriter.h b/doc/src/snippets/textdocument-blocks/xmlwriter.h
new file mode 100644
index 0000000..2bd59c8
--- /dev/null
+++ b/doc/src/snippets/textdocument-blocks/xmlwriter.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XMLWRITER_H
+#define XMLWRITER_H
+
+#include <QDomDocument>
+
+class QTextDocument;
+
+class XmlWriter
+{
+public:
+ XmlWriter(QTextDocument *document) : textDocument(document) {}
+ QDomDocument *toXml();
+
+private:
+ void createItems(QDomElement &parent, const QTextBlock &block);
+
+ QDomDocument *document;
+ QTextDocument *textDocument;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-charformats/main.cpp b/doc/src/snippets/textdocument-charformats/main.cpp
new file mode 100644
index 0000000..2abe346
--- /dev/null
+++ b/doc/src/snippets/textdocument-charformats/main.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit();
+
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextCharFormat plainFormat(cursor.charFormat());
+
+ QTextCharFormat headingFormat = plainFormat;
+ headingFormat.setFontWeight(QFont::Bold);
+ headingFormat.setFontPointSize(16);
+
+ QTextCharFormat emphasisFormat = plainFormat;
+ emphasisFormat.setFontItalic(true);
+
+ QTextCharFormat qtFormat = plainFormat;
+ qtFormat.setForeground(QColor("#990000"));
+
+ QTextCharFormat underlineFormat = plainFormat;
+ underlineFormat.setFontUnderline(true);
+
+//! [0]
+ cursor.insertText(tr("Character formats"),
+ headingFormat);
+
+ cursor.insertBlock();
+
+ cursor.insertText(tr("Text can be displayed in a variety of "
+ "different character formats. "), plainFormat);
+ cursor.insertText(tr("We can emphasize text by "));
+ cursor.insertText(tr("making it italic"), emphasisFormat);
+//! [0]
+ cursor.insertText(tr(", give it a "), plainFormat);
+ cursor.insertText(tr("different color "), qtFormat);
+ cursor.insertText(tr("to the default text color, "), plainFormat);
+ cursor.insertText(tr("underline it"), underlineFormat);
+ cursor.insertText(tr(", and use many other effects."), plainFormat);
+
+ editor->setWindowTitle(tr("Text Document Character Formats"));
+ editor->resize(320, 480);
+ editor->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-charformats/textdocument-charformats.pro b/doc/src/snippets/textdocument-charformats/textdocument-charformats.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/textdocument-charformats/textdocument-charformats.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/textdocument-css/main.cpp b/doc/src/snippets/textdocument-css/main.cpp
new file mode 100644
index 0000000..b055cb8
--- /dev/null
+++ b/doc/src/snippets/textdocument-css/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+//! [0]
+ QTextBrowser browser;
+ QColor linkColor(Qt::red);
+ QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(linkColor.name());
+ browser.document()->setDefaultStyleSheet(sheet);
+//! [0]
+ browser.setSource(QUrl("../../../html/index.html"));
+ browser.resize(800, 600);
+ browser.show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/textdocument-css/textdocument-css.pro b/doc/src/snippets/textdocument-css/textdocument-css.pro
new file mode 100644
index 0000000..28dcadc
--- /dev/null
+++ b/doc/src/snippets/textdocument-css/textdocument-css.pro
@@ -0,0 +1 @@
+SOURCES += main.cpp
diff --git a/doc/src/snippets/textdocument-cursors/main.cpp b/doc/src/snippets/textdocument-cursors/main.cpp
new file mode 100644
index 0000000..e1981dc
--- /dev/null
+++ b/doc/src/snippets/textdocument-cursors/main.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit;
+
+//! [0]
+ QTextDocument *document = editor->document();
+ QTextCursor redCursor(document);
+//! [0] //! [1]
+ QTextCursor blueCursor(document);
+//! [1]
+
+ QTextCharFormat redFormat(redCursor.charFormat());
+ redFormat.setForeground(Qt::red);
+ QTextCharFormat blueFormat(blueCursor.charFormat());
+ blueFormat.setForeground(Qt::blue);
+
+ redCursor.setCharFormat(redFormat);
+ blueCursor.setCharFormat(blueFormat);
+
+ for (int i = 0; i < 20; ++i) {
+ if (i % 2 == 0)
+ redCursor.insertText(tr("%1 ").arg(i), redFormat);
+ if (i % 5 == 0)
+ blueCursor.insertText(tr("%1 ").arg(i), blueFormat);
+ }
+
+ editor->setWindowTitle(tr("Text Document Cursors"));
+ editor->resize(320, 480);
+ editor->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-cursors/textdocument-cursors.pro b/doc/src/snippets/textdocument-cursors/textdocument-cursors.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/textdocument-cursors/textdocument-cursors.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/textdocument-find/main.cpp b/doc/src/snippets/textdocument-find/main.cpp
new file mode 100644
index 0000000..0e76052
--- /dev/null
+++ b/doc/src/snippets/textdocument-find/main.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit();
+
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextCharFormat plainFormat(cursor.charFormat());
+ QTextCharFormat colorFormat = plainFormat;
+ colorFormat.setForeground(Qt::red);
+
+ cursor.insertText(tr("Text can be displayed in a variety of "
+ "different character "
+ "formats. "), plainFormat);
+ cursor.insertText(tr("We can emphasize text by making it "));
+ cursor.insertText(tr("italic, give it a different color "));
+ cursor.insertText(tr("to the default text color, underline it, "));
+ cursor.insertText(tr("and use many other effects."));
+
+ QString searchString = tr("text");
+
+ QTextDocument *document = editor->document();
+//! [0]
+ QTextCursor newCursor(document);
+
+ while (!newCursor.isNull() && !newCursor.atEnd()) {
+ newCursor = document->find(searchString, newCursor);
+
+ if (!newCursor.isNull()) {
+ newCursor.movePosition(QTextCursor::WordRight,
+ QTextCursor::KeepAnchor);
+
+ newCursor.mergeCharFormat(colorFormat);
+ }
+//! [0] //! [1]
+ }
+//! [1]
+
+ editor->setWindowTitle(tr("Text Document Find"));
+ editor->resize(320, 480);
+ editor->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-find/textdocument-find.pro b/doc/src/snippets/textdocument-find/textdocument-find.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/textdocument-find/textdocument-find.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/textdocument-frames/main.cpp b/doc/src/snippets/textdocument-frames/main.cpp
new file mode 100644
index 0000000..17475ab
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(480, 480);
+ window->show();
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/textdocument-frames/mainwindow.cpp b/doc/src/snippets/textdocument-frames/mainwindow.cpp
new file mode 100644
index 0000000..c81f237
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/mainwindow.cpp
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xmlwriter.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *saveAction = fileMenu->addAction(tr("&Save..."));
+ saveAction->setShortcut(tr("Ctrl+S"));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ menuBar()->addMenu(fileMenu);
+ editor = new QTextEdit();
+
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextFrame *mainFrame = cursor.currentFrame();
+
+ QTextCharFormat plainCharFormat;
+ QTextCharFormat boldCharFormat;
+ boldCharFormat.setFontWeight(QFont::Bold);
+/* main frame
+//! [0]
+ QTextFrame *mainFrame = cursor.currentFrame();
+ cursor.insertText(...);
+//! [0]
+*/
+ cursor.insertText("Text documents are represented by the "
+ "QTextDocument class, rather than by QString objects. "
+ "Each QTextDocument object contains information about "
+ "the document's internal representation, its structure, "
+ "and keeps track of modifications to provide undo/redo "
+ "facilities. This approach allows features such as the "
+ "layout management to be delegated to specialized "
+ "classes, but also provides a focus for the framework.",
+ plainCharFormat);
+
+//! [1]
+ QTextFrameFormat frameFormat;
+ frameFormat.setMargin(32);
+ frameFormat.setPadding(8);
+ frameFormat.setBorder(4);
+//! [1]
+ cursor.insertFrame(frameFormat);
+
+/* insert frame
+//! [2]
+ cursor.insertFrame(frameFormat);
+ cursor.insertText(...);
+//! [2]
+*/
+ cursor.insertText("Documents are either converted from external sources "
+ "or created from scratch using Qt. The creation process "
+ "can done by an editor widget, such as QTextEdit, or by "
+ "explicit calls to the Scribe API.", boldCharFormat);
+
+ cursor = mainFrame->lastCursorPosition();
+/* last cursor
+//! [3]
+ cursor = mainFrame->lastCursorPosition();
+ cursor.insertText(...);
+//! [3]
+*/
+ cursor.insertText("There are two complementary ways to visualize the "
+ "contents of a document: as a linear buffer that is "
+ "used by editors to modify the contents, and as an "
+ "object hierarchy containing structural information "
+ "that is useful to layout engines. In the hierarchical "
+ "model, the objects generally correspond to visual "
+ "elements such as frames, tables, and lists. At a lower "
+ "level, these elements describe properties such as the "
+ "style of text used and its alignment. The linear "
+ "representation of the document is used for editing and "
+ "manipulation of the document's contents.",
+ plainCharFormat);
+
+
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Frames"));
+}
+
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save document as:"), "", tr("XML (*.xml)"));
+
+ if (!fileName.isEmpty()) {
+ if (writeXml(fileName))
+ setWindowTitle(fileName);
+ else
+ QMessageBox::warning(this, tr("Warning"),
+ tr("Failed to save the document."), QMessageBox::Cancel,
+ QMessageBox::NoButton);
+ }
+}
+bool MainWindow::writeXml(const QString &fileName)
+{
+ XmlWriter documentWriter(editor->document());
+
+ QDomDocument *domDocument = documentWriter.toXml();
+ QFile file(fileName);
+
+ if (file.open(QFile::WriteOnly)) {
+ QTextStream textStream(&file);
+ textStream.setCodec(QTextCodec::codecForName("UTF-8"));
+
+ textStream << domDocument->toString(1).toUtf8();
+ file.close();
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/doc/src/snippets/textdocument-frames/mainwindow.h b/doc/src/snippets/textdocument-frames/mainwindow.h
new file mode 100644
index 0000000..b987530
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/mainwindow.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void saveFile();
+
+private:
+ bool writeXml(const QString &fileName);
+
+ QTextEdit *editor;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-frames/textdocument-frames.pro b/doc/src/snippets/textdocument-frames/textdocument-frames.pro
new file mode 100644
index 0000000..91ae50f
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/textdocument-frames.pro
@@ -0,0 +1,6 @@
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xmlwriter.cpp
+HEADERS = mainwindow.h \
+ xmlwriter.h
+QT += xml
diff --git a/doc/src/snippets/textdocument-frames/xmlwriter.cpp b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
new file mode 100644
index 0000000..37f81cf
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xmlwriter.h"
+
+QDomDocument *XmlWriter::toXml()
+{
+ QDomImplementation implementation;
+ QDomDocumentType docType = implementation.createDocumentType(
+ "scribe-document", "scribe", "qtsoftware.com/scribe");
+
+ document = new QDomDocument(docType);
+
+ // ### This processing instruction is required to ensure that any kind
+ // of encoding is given when the document is written.
+ QDomProcessingInstruction process = document->createProcessingInstruction(
+ "xml", "version=\"1.0\" encoding=\"utf-8\"");
+ document->appendChild(process);
+
+ QDomElement documentElement = document->createElement("document");
+ document->appendChild(documentElement);
+
+//! [0]
+ QTextFrame *root = textDocument->rootFrame();
+//! [0]
+
+ if (root)
+ processFrame(documentElement, root);
+
+ return document;
+}
+
+void XmlWriter::processBlock(QDomElement &parent, const QTextBlock &block)
+{
+ QDomElement blockElement = document->createElement("block");
+ blockElement.setAttribute("position", block.position());
+ blockElement.setAttribute("length", block.length());
+ parent.appendChild(blockElement);
+
+ QTextBlock::iterator it;
+ for (it = block.begin(); !(it.atEnd()); ++it) {
+ QTextFragment fragment = it.fragment();
+
+ if (fragment.isValid()) {
+ QDomElement fragmentElement = document->createElement("fragment");
+ blockElement.appendChild(fragmentElement);
+
+ fragmentElement.setAttribute("length", fragment.length());
+ QDomText fragmentText = document->createTextNode(fragment.text());
+
+ fragmentElement.appendChild(fragmentText);
+ }
+ }
+}
+
+void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
+{
+ QDomElement frameElement = document->createElement("frame");
+ frameElement.setAttribute("begin", frame->firstPosition());
+ frameElement.setAttribute("end", frame->lastPosition());
+ parent.appendChild(frameElement);
+
+//! [1]
+ QTextFrame::iterator it;
+ for (it = frame->begin(); !(it.atEnd()); ++it) {
+
+ QTextFrame *childFrame = it.currentFrame();
+ QTextBlock childBlock = it.currentBlock();
+
+ if (childFrame)
+//! [1] //! [2]
+ processFrame(frameElement, childFrame);
+ else if (childBlock.isValid())
+ processBlock(frameElement, childBlock);
+ }
+//! [2]
+}
diff --git a/doc/src/snippets/textdocument-frames/xmlwriter.h b/doc/src/snippets/textdocument-frames/xmlwriter.h
new file mode 100644
index 0000000..23c6e7d
--- /dev/null
+++ b/doc/src/snippets/textdocument-frames/xmlwriter.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XMLWRITER_H
+#define XMLWRITER_H
+
+#include <QDomDocument>
+
+class QTextDocument;
+
+class XmlWriter
+{
+public:
+ XmlWriter(QTextDocument *document) : textDocument(document) {}
+ QDomDocument *toXml();
+
+private:
+ void processBlock(QDomElement &parent, const QTextBlock &block);
+ void processFrame(QDomElement &parent, QTextFrame *frame);
+
+ QDomDocument *document;
+//! [0]
+ QTextDocument *textDocument;
+//! [0]
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-imagedrop/main.cpp b/doc/src/snippets/textdocument-imagedrop/main.cpp
new file mode 100644
index 0000000..ba6a35c
--- /dev/null
+++ b/doc/src/snippets/textdocument-imagedrop/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "textedit.h"
+
+int main(int argc, char * argv[])
+{
+ QApplication app(argc, argv);
+
+ TextEdit *textEdit = new TextEdit;
+ textEdit->show();
+
+ return app.exec();
+} \ No newline at end of file
diff --git a/doc/src/snippets/textdocument-imagedrop/textdocument-imagedrop.pro b/doc/src/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
new file mode 100644
index 0000000..96d3038
--- /dev/null
+++ b/doc/src/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
@@ -0,0 +1,2 @@
+SOURCES = textedit.cpp main.cpp
+HEADERS = textedit.h \ No newline at end of file
diff --git a/doc/src/snippets/textdocument-imagedrop/textedit.cpp b/doc/src/snippets/textdocument-imagedrop/textedit.cpp
new file mode 100644
index 0000000..c6254f7
--- /dev/null
+++ b/doc/src/snippets/textdocument-imagedrop/textedit.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textedit.h"
+#include <QtGui>
+
+TextEdit::TextEdit(QWidget *parent)
+ : QTextEdit(parent)
+{
+}
+
+//! [0]
+bool TextEdit::canInsertFromMimeData( const QMimeData *source ) const
+{
+ if (source->hasImage())
+ return true;
+ else
+ return QTextEdit::canInsertFromMimeData(source);
+}
+//! [0]
+
+//! [1]
+void TextEdit::insertFromMimeData( const QMimeData *source )
+{
+ if (source->hasImage())
+ {
+ QImage image = qvariant_cast<QImage>(source->imageData());
+ QTextCursor cursor = this->textCursor();
+ QTextDocument *document = this->document();
+ document->addResource(QTextDocument::ImageResource, QUrl("image"), image);
+ cursor.insertImage("image");
+ }
+}
+//! [1]
diff --git a/doc/src/snippets/textdocument-imagedrop/textedit.h b/doc/src/snippets/textdocument-imagedrop/textedit.h
new file mode 100644
index 0000000..b50a27e
--- /dev/null
+++ b/doc/src/snippets/textdocument-imagedrop/textedit.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTEDIT_H
+#define TEXTEDIT_H
+
+#include <QTextEdit>
+
+class TextEdit : public QTextEdit
+{
+ Q_OBJECT
+
+public:
+ TextEdit(QWidget *parent=0);
+ bool canInsertFromMimeData( const QMimeData *source ) const;
+ void insertFromMimeData( const QMimeData *source );
+};
+
+#endif \ No newline at end of file
diff --git a/doc/src/snippets/textdocument-imageformat/images.qrc b/doc/src/snippets/textdocument-imageformat/images.qrc
new file mode 100644
index 0000000..6473daf
--- /dev/null
+++ b/doc/src/snippets/textdocument-imageformat/images.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/advert.png</file>
+ <file>images/newimage.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/textdocument-imageformat/images/advert.png b/doc/src/snippets/textdocument-imageformat/images/advert.png
new file mode 100644
index 0000000..40e10d5
--- /dev/null
+++ b/doc/src/snippets/textdocument-imageformat/images/advert.png
Binary files differ
diff --git a/doc/src/snippets/textdocument-imageformat/images/newimage.png b/doc/src/snippets/textdocument-imageformat/images/newimage.png
new file mode 100644
index 0000000..0eec048
--- /dev/null
+++ b/doc/src/snippets/textdocument-imageformat/images/newimage.png
Binary files differ
diff --git a/doc/src/snippets/textdocument-imageformat/main.cpp b/doc/src/snippets/textdocument-imageformat/main.cpp
new file mode 100644
index 0000000..9933aed
--- /dev/null
+++ b/doc/src/snippets/textdocument-imageformat/main.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit;
+
+ QTextDocument *document = new QTextDocument(editor);
+ QTextCursor cursor(document);
+
+ QTextImageFormat imageFormat;
+ imageFormat.setName(":/images/advert.png");
+ cursor.insertImage(imageFormat);
+
+ QTextBlock block = cursor.block();
+ QTextFragment fragment;
+ QTextBlock::iterator it;
+
+ for (it = block.begin(); !(it.atEnd()); ++it) {
+ fragment = it.fragment();
+
+ if (fragment.contains(cursor.position()))
+ break;
+ }
+
+//! [0]
+ if (fragment.isValid()) {
+ QTextImageFormat newImageFormat = fragment.charFormat().toImageFormat();
+
+ if (newImageFormat.isValid()) {
+ newImageFormat.setName(":/images/newimage.png");
+ QTextCursor helper = cursor;
+
+ helper.setPosition(fragment.position());
+ helper.setPosition(fragment.position() + fragment.length(),
+ QTextCursor::KeepAnchor);
+ helper.setCharFormat(newImageFormat);
+//! [0] //! [1]
+ }
+//! [1] //! [2]
+ }
+//! [2]
+
+ cursor.insertBlock();
+ cursor.insertText("Code less. Create more.");
+
+ editor->setDocument(document);
+ editor->setWindowTitle(tr("Text Document Image Format"));
+ editor->resize(320, 480);
+ editor->show();
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-imageformat/textdocument-imageformat.pro b/doc/src/snippets/textdocument-imageformat/textdocument-imageformat.pro
new file mode 100644
index 0000000..1c64370
--- /dev/null
+++ b/doc/src/snippets/textdocument-imageformat/textdocument-imageformat.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+RESOURCES += images.qrc
diff --git a/doc/src/snippets/textdocument-images/images.qrc b/doc/src/snippets/textdocument-images/images.qrc
new file mode 100644
index 0000000..09e305e
--- /dev/null
+++ b/doc/src/snippets/textdocument-images/images.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/advert.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/textdocument-images/images/advert.png b/doc/src/snippets/textdocument-images/images/advert.png
new file mode 100644
index 0000000..40e10d5
--- /dev/null
+++ b/doc/src/snippets/textdocument-images/images/advert.png
Binary files differ
diff --git a/doc/src/snippets/textdocument-images/main.cpp b/doc/src/snippets/textdocument-images/main.cpp
new file mode 100644
index 0000000..8c0f646
--- /dev/null
+++ b/doc/src/snippets/textdocument-images/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit;
+
+//! [0]
+ QTextDocument *document = new QTextDocument(editor);
+ QTextCursor cursor(document);
+//! [0]
+
+//! [1]
+ QTextImageFormat imageFormat;
+ imageFormat.setName(":/images/advert.png");
+ cursor.insertImage(imageFormat);
+//! [1]
+
+ cursor.insertBlock();
+ cursor.insertText("Code less. Create more.");
+
+ editor->setDocument(document);
+ editor->setWindowTitle(tr("Text Document Images"));
+ editor->resize(320, 480);
+ editor->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-images/textdocument-images.pro b/doc/src/snippets/textdocument-images/textdocument-images.pro
new file mode 100644
index 0000000..1c64370
--- /dev/null
+++ b/doc/src/snippets/textdocument-images/textdocument-images.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+RESOURCES += images.qrc
diff --git a/doc/src/snippets/textdocument-listitems/main.cpp b/doc/src/snippets/textdocument-listitems/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitems/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-listitems/mainwindow.cpp b/doc/src/snippets/textdocument-listitems/mainwindow.cpp
new file mode 100644
index 0000000..85ce524
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitems/mainwindow.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
+ QKeySequence(tr("Ctrl+Q", "File|Exit")));
+
+ QMenu *actionsMenu = new QMenu(tr("&Actions"));
+ actionsMenu->addAction(tr("&Highlight List Items"),
+ this, SLOT(highlightListItems()));
+ actionsMenu->addAction(tr("&Show Current List"), this, SLOT(showList()));
+
+ QMenu *insertMenu = new QMenu(tr("&Insert"));
+
+ insertMenu->addAction(tr("&List"), this, SLOT(insertList()),
+ QKeySequence(tr("Ctrl+L", "Insert|List")));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(insertMenu);
+ menuBar()->addMenu(actionsMenu);
+
+ editor = new QTextEdit(this);
+ document = new QTextDocument(this);
+ editor->setDocument(document);
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document List Items"));
+}
+
+void MainWindow::highlightListItems()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextList *list = cursor.currentList();
+
+ if (!list)
+ return;
+
+ cursor.beginEditBlock();
+//! [0]
+ for (int index = 0; index < list->count(); ++index) {
+ QTextBlock listItem = list->item(index);
+//! [0]
+ QTextBlockFormat newBlockFormat = listItem.blockFormat();
+ newBlockFormat.setBackground(Qt::lightGray);
+ QTextCursor itemCursor = cursor;
+ itemCursor.setPosition(listItem.position());
+ //itemCursor.movePosition(QTextCursor::StartOfBlock);
+ itemCursor.movePosition(QTextCursor::EndOfBlock,
+ QTextCursor::KeepAnchor);
+ itemCursor.setBlockFormat(newBlockFormat);
+ /*
+//! [1]
+ processListItem(listItem);
+//! [1]
+ */
+//! [2]
+ }
+//! [2]
+ cursor.endEditBlock();
+}
+
+void MainWindow::showList()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextFrame *frame = cursor.currentFrame();
+
+ if (!frame)
+ return;
+
+ QTreeWidget *treeWidget = new QTreeWidget;
+ treeWidget->setColumnCount(1);
+ QStringList headerLabels;
+ headerLabels << tr("Lists");
+ treeWidget->setHeaderLabels(headerLabels);
+
+ QTreeWidgetItem *parentItem = 0;
+ QTreeWidgetItem *item;
+ QTreeWidgetItem *lastItem = 0;
+ parentItems.clear();
+ previousItems.clear();
+
+//! [3]
+ QTextFrame::iterator it;
+ for (it = frame->begin(); !(it.atEnd()); ++it) {
+
+ QTextBlock block = it.currentBlock();
+
+ if (block.isValid()) {
+
+ QTextList *list = block.textList();
+
+ if (list) {
+ int index = list->itemNumber(block);
+//! [3]
+ if (index == 0) {
+ parentItems.append(parentItem);
+ previousItems.append(lastItem);
+ listStructures.append(list);
+ parentItem = lastItem;
+ lastItem = 0;
+
+ if (parentItem != 0)
+ item = new QTreeWidgetItem(parentItem, lastItem);
+ else
+ item = new QTreeWidgetItem(treeWidget, lastItem);
+
+ } else {
+
+ while (parentItem != 0 && listStructures.last() != list) {
+ listStructures.pop_back();
+ parentItem = parentItems.takeLast();
+ lastItem = previousItems.takeLast();
+ }
+ if (parentItem != 0)
+ item = new QTreeWidgetItem(parentItem, lastItem);
+ else
+ item = new QTreeWidgetItem(treeWidget, lastItem);
+ }
+ item->setText(0, block.text());
+ lastItem = item;
+ /*
+//! [4]
+ processListItem(list, index);
+//! [4]
+ */
+//! [5]
+ }
+//! [5] //! [6]
+ }
+//! [6] //! [7]
+ }
+//! [7]
+
+ treeWidget->setWindowTitle(tr("List Contents"));
+ treeWidget->show();
+}
+
+void MainWindow::insertList()
+{
+ QTextCursor cursor = editor->textCursor();
+ cursor.beginEditBlock();
+
+ QTextList *list = cursor.currentList();
+ QTextListFormat listFormat;
+ if (list)
+ listFormat = list->format();
+
+ listFormat.setStyle(QTextListFormat::ListDisc);
+ listFormat.setIndent(listFormat.indent() + 1);
+ cursor.insertList(listFormat);
+
+ cursor.endEditBlock();
+}
diff --git a/doc/src/snippets/textdocument-listitems/mainwindow.h b/doc/src/snippets/textdocument-listitems/mainwindow.h
new file mode 100644
index 0000000..223f72c
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitems/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+#include <QString>
+
+class QAction;
+class QTextDocument;
+class QTextEdit;
+class QTextList;
+class QTreeWidgetItem;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertList();
+ void highlightListItems();
+ void showList();
+
+private:
+ QString currentFile;
+ QTextEdit *editor;
+ QTextDocument *document;
+ QList<QTextList*> listStructures;
+ QList<QTreeWidgetItem*> previousItems;
+ QList<QTreeWidgetItem*> parentItems;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-listitems/textdocument-listitems.pro b/doc/src/snippets/textdocument-listitems/textdocument-listitems.pro
new file mode 100644
index 0000000..5da8d6e
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitems/textdocument-listitems.pro
@@ -0,0 +1,3 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-lists/main.cpp b/doc/src/snippets/textdocument-lists/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textdocument-lists/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-lists/mainwindow.cpp b/doc/src/snippets/textdocument-lists/mainwindow.cpp
new file mode 100644
index 0000000..f6ddb8e
--- /dev/null
+++ b/doc/src/snippets/textdocument-lists/mainwindow.cpp
@@ -0,0 +1,193 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
+ QKeySequence(tr("Ctrl+Q", "File|Exit")));
+
+ QMenu *editMenu = new QMenu(tr("&Edit"));
+
+ cutAction = editMenu->addAction(tr("Cu&t"), this, SLOT(cutSelection()),
+ QKeySequence(tr("Ctrl+X", "Edit|Cut")));
+ copyAction = editMenu->addAction(tr("&Copy"), this, SLOT(copySelection()),
+ QKeySequence(tr("Ctrl+C", "Edit|Copy")));
+ pasteAction = editMenu->addAction(tr("&Paste"), this,
+ SLOT(pasteSelection()), QKeySequence(tr("Ctrl+V", "Edit|Paste")));
+
+ QMenu *selectMenu = new QMenu(tr("&Select"));
+ selectMenu->addAction(tr("&Word"), this, SLOT(selectWord()));
+ selectMenu->addAction(tr("&Line"), this, SLOT(selectLine()));
+ selectMenu->addAction(tr("&Block"), this, SLOT(selectBlock()));
+ selectMenu->addAction(tr("&Frame"), this, SLOT(selectFrame()));
+
+ QMenu *insertMenu = new QMenu(tr("&Insert"));
+
+ insertMenu->addAction(tr("&List"), this, SLOT(insertList()),
+ QKeySequence(tr("Ctrl+L", "Insert|List")));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(editMenu);
+ menuBar()->addMenu(selectMenu);
+ menuBar()->addMenu(insertMenu);
+
+ editor = new QTextEdit(this);
+ document = new QTextDocument(this);
+ editor->setDocument(document);
+
+ connect(editor, SIGNAL(selectionChanged()), this, SLOT(updateMenus()));
+
+ updateMenus();
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Writer"));
+}
+
+void MainWindow::cutSelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ if (cursor.hasSelection()) {
+ selection = cursor.selection();
+ cursor.removeSelectedText();
+ }
+}
+
+void MainWindow::copySelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ if (cursor.hasSelection()) {
+ selection = cursor.selection();
+ cursor.clearSelection();
+ }
+}
+
+void MainWindow::pasteSelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ cursor.insertFragment(selection);
+}
+
+void MainWindow::selectWord()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::StartOfWord);
+ cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectLine()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::StartOfLine);
+ cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectBlock()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::StartOfBlock);
+ cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectFrame()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextFrame *frame = cursor.currentFrame();
+
+ cursor.beginEditBlock();
+ cursor.setPosition(frame->firstPosition());
+ cursor.setPosition(frame->lastPosition(), QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::insertList()
+{
+ QTextCursor cursor = editor->textCursor();
+ cursor.beginEditBlock();
+
+ QTextList *list = cursor.currentList();
+//! [0]
+ QTextListFormat listFormat;
+ if (list) {
+ listFormat = list->format();
+ listFormat.setIndent(listFormat.indent() + 1);
+ }
+
+ listFormat.setStyle(QTextListFormat::ListDisc);
+ cursor.insertList(listFormat);
+//! [0]
+
+ cursor.endEditBlock();
+}
+
+void MainWindow::updateMenus()
+{
+ QTextCursor cursor = editor->textCursor();
+ cutAction->setEnabled(cursor.hasSelection());
+ copyAction->setEnabled(cursor.hasSelection());
+
+ pasteAction->setEnabled(!selection.isEmpty());
+}
diff --git a/doc/src/snippets/textdocument-lists/mainwindow.h b/doc/src/snippets/textdocument-lists/mainwindow.h
new file mode 100644
index 0000000..e1907aa
--- /dev/null
+++ b/doc/src/snippets/textdocument-lists/mainwindow.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+#include <QTextDocumentFragment>
+
+class QAction;
+class QTextDocument;
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void cutSelection();
+ void copySelection();
+ void insertList();
+ void pasteSelection();
+ void selectWord();
+ void selectLine();
+ void selectBlock();
+ void selectFrame();
+ void updateMenus();
+
+private:
+ QAction *cutAction;
+ QAction *copyAction;
+ QAction *pasteAction;
+ QString currentFile;
+ QTextEdit *editor;
+ QTextDocument *document;
+ QTextDocumentFragment selection;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-lists/textdocument-lists.pro b/doc/src/snippets/textdocument-lists/textdocument-lists.pro
new file mode 100644
index 0000000..5da8d6e
--- /dev/null
+++ b/doc/src/snippets/textdocument-lists/textdocument-lists.pro
@@ -0,0 +1,3 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-printing/main.cpp b/doc/src/snippets/textdocument-printing/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textdocument-printing/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-printing/mainwindow.cpp b/doc/src/snippets/textdocument-printing/mainwindow.cpp
new file mode 100644
index 0000000..9cbf7fb
--- /dev/null
+++ b/doc/src/snippets/textdocument-printing/mainwindow.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
+ QKeySequence(tr("Ctrl+O", "File|Open")));
+
+ printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile()));
+ printAction->setEnabled(false);
+
+ pdfPrintAction = fileMenu->addAction(tr("Print as P&DF..."), this, SLOT(printPdf()));
+ pdfPrintAction->setEnabled(false);
+
+ fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
+ QKeySequence(tr("Ctrl+Q", "File|Exit")));
+
+ menuBar()->addMenu(fileMenu);
+
+ editor = new QTextEdit(this);
+ document = new QTextDocument(this);
+ editor->setDocument(document);
+
+ connect(editor, SIGNAL(selectionChanged()), this, SLOT(updateMenus()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Writer"));
+}
+
+void MainWindow::openFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open file"), currentFile, "HTML files (*.html);;Text files (*.txt)");
+
+ if (!fileName.isEmpty()) {
+ QFileInfo info(fileName);
+ if (info.completeSuffix() == "html") {
+ QFile file(fileName);
+
+ if (file.open(QIODevice::ReadOnly)) {
+ editor->setHtml(file.readAll());
+ file.close();
+ currentFile = fileName;
+ }
+ } else if (info.completeSuffix() == "txt") {
+ QFile file(fileName);
+
+ if (file.open(QIODevice::ReadOnly)) {
+ editor->setPlainText(file.readAll());
+ file.close();
+ currentFile = fileName;
+ }
+ }
+ printAction->setEnabled(true);
+ pdfPrintAction->setEnabled(true);
+ }
+}
+
+void MainWindow::printFile()
+{
+//! [0]
+ QTextDocument *document = editor->document();
+ QPrinter printer;
+
+ QPrintDialog *dlg = new QPrintDialog(&printer, this);
+ if (dlg->exec() != QDialog::Accepted)
+ return;
+
+ document->print(&printer);
+//! [0]
+}
+
+void MainWindow::printPdf()
+{
+ QPrinter printer(QPrinter::HighResolution);
+ printer.setOutputFormat(QPrinter::PdfFormat);
+
+ QPrintDialog *printDialog = new QPrintDialog(&printer, this);
+ if (printDialog->exec() == QDialog::Accepted)
+ editor->document()->print(&printer);
+}
diff --git a/doc/src/snippets/textdocument-printing/mainwindow.h b/doc/src/snippets/textdocument-printing/mainwindow.h
new file mode 100644
index 0000000..5d69a81
--- /dev/null
+++ b/doc/src/snippets/textdocument-printing/mainwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QHash>
+#include <QMainWindow>
+#include <QTextDocumentFragment>
+
+class QAction;
+class QTextDocument;
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void openFile();
+ void printFile();
+ void printPdf();
+
+private:
+ QAction *printAction;
+ QAction *pdfPrintAction;
+ QString currentFile;
+ QTextEdit *editor;
+ QTextDocument *document;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-printing/textdocument-printing.pro b/doc/src/snippets/textdocument-printing/textdocument-printing.pro
new file mode 100644
index 0000000..5da8d6e
--- /dev/null
+++ b/doc/src/snippets/textdocument-printing/textdocument-printing.pro
@@ -0,0 +1,3 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-resources/main.cpp b/doc/src/snippets/textdocument-resources/main.cpp
new file mode 100644
index 0000000..dac1a8f
--- /dev/null
+++ b/doc/src/snippets/textdocument-resources/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+QString tr(const char *text)
+{
+ return QApplication::translate(text, text);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTextEdit *editor = new QTextEdit;
+
+ QTextDocument *document = new QTextDocument(editor);
+ QTextCursor cursor(document);
+
+ QImage image(64, 64, QImage::Format_RGB32);
+ image.fill(qRgb(255, 160, 128));
+
+//! [Adding a resource]
+ document->addResource(QTextDocument::ImageResource,
+ QUrl("mydata://image.png"), QVariant(image));
+//! [Adding a resource]
+
+//! [Inserting an image with a cursor]
+ QTextImageFormat imageFormat;
+ imageFormat.setName("mydata://image.png");
+ cursor.insertImage(imageFormat);
+//! [Inserting an image with a cursor]
+
+ cursor.insertBlock();
+ cursor.insertText("Code less. Create more.");
+
+ editor->setDocument(document);
+ editor->setWindowTitle(tr("Text Document Images"));
+ editor->resize(320, 480);
+ editor->show();
+
+//! [Inserting an image using HTML]
+ editor->append("<img src=\"mydata://image.png\" />");
+//! [Inserting an image using HTML]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-resources/textdocument-resources.pro b/doc/src/snippets/textdocument-resources/textdocument-resources.pro
new file mode 100644
index 0000000..16181f2
--- /dev/null
+++ b/doc/src/snippets/textdocument-resources/textdocument-resources.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/textdocument-selections/main.cpp b/doc/src/snippets/textdocument-selections/main.cpp
new file mode 100644
index 0000000..96dc33e
--- /dev/null
+++ b/doc/src/snippets/textdocument-selections/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-selections/mainwindow.cpp b/doc/src/snippets/textdocument-selections/mainwindow.cpp
new file mode 100644
index 0000000..47f626b
--- /dev/null
+++ b/doc/src/snippets/textdocument-selections/mainwindow.cpp
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
+ QKeySequence(tr("Ctrl+O", "File|Open")));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"), this, SLOT(close()));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *editMenu = new QMenu(tr("&Edit"));
+
+ cutAction = editMenu->addAction(tr("Cu&t"), this, SLOT(cutSelection()));
+ cutAction->setShortcut(tr("Ctrl+X"));
+ cutAction->setEnabled(false);
+
+ copyAction = editMenu->addAction(tr("&Copy"), this, SLOT(copySelection()));
+ copyAction->setShortcut(tr("Ctrl+C"));
+ copyAction->setEnabled(false);
+
+ pasteAction = editMenu->addAction(tr("&Paste"), this, SLOT(pasteSelection()));
+ pasteAction->setShortcut(tr("Ctrl+V"));
+ pasteAction->setEnabled(false);
+
+ QMenu *selectMenu = new QMenu(tr("&Select"));
+ selectMenu->addAction(tr("&Word"), this, SLOT(selectWord()));
+ selectMenu->addAction(tr("&Line"), this, SLOT(selectLine()));
+ selectMenu->addAction(tr("&Block"), this, SLOT(selectBlock()));
+ selectMenu->addAction(tr("&Frame"), this, SLOT(selectFrame()));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(editMenu);
+ menuBar()->addMenu(selectMenu);
+
+ editor = new QTextEdit(this);
+ document = new QTextDocument(this);
+ editor->setDocument(document);
+
+ connect(editor, SIGNAL(selectionChanged()), this, SLOT(updateMenus()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Writer"));
+}
+
+void MainWindow::openFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open file"), currentFile, "HTML files (*.html);;Text files (*.txt)");
+
+ if (!fileName.isEmpty()) {
+ QFileInfo info(fileName);
+ if (info.completeSuffix() == "html") {
+ QFile file(fileName);
+
+ if (file.open(QFile::ReadOnly)) {
+ editor->setHtml(QString(file.readAll()));
+ file.close();
+ currentFile = fileName;
+ }
+ } else if (info.completeSuffix() == "txt") {
+ QFile file(fileName);
+
+ if (file.open(QFile::ReadOnly)) {
+ editor->setPlainText(file.readAll());
+ file.close();
+ currentFile = fileName;
+ }
+ }
+ }
+}
+
+void MainWindow::cutSelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ if (cursor.hasSelection()) {
+ selection = cursor.selection();
+ cursor.removeSelectedText();
+ }
+}
+
+void MainWindow::copySelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ if (cursor.hasSelection()) {
+ selection = cursor.selection();
+ cursor.clearSelection();
+ }
+}
+
+void MainWindow::pasteSelection()
+{
+ QTextCursor cursor = editor->textCursor();
+ cursor.insertFragment(selection);
+}
+
+void MainWindow::selectWord()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+//! [0]
+ cursor.beginEditBlock();
+//! [1]
+ cursor.movePosition(QTextCursor::StartOfWord);
+ cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
+//! [1]
+ cursor.endEditBlock();
+//! [0]
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectLine()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::StartOfLine);
+ cursor.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectBlock()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextBlock block = cursor.block();
+
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::StartOfBlock);
+ cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::selectFrame()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextFrame *frame = cursor.currentFrame();
+
+ cursor.beginEditBlock();
+ cursor.setPosition(frame->firstPosition());
+ cursor.setPosition(frame->lastPosition(), QTextCursor::KeepAnchor);
+ cursor.endEditBlock();
+
+ editor->setTextCursor(cursor);
+}
+
+void MainWindow::updateMenus()
+{
+ QTextCursor cursor = editor->textCursor();
+ cutAction->setEnabled(cursor.hasSelection());
+ copyAction->setEnabled(cursor.hasSelection());
+
+ pasteAction->setEnabled(!selection.isEmpty());
+}
diff --git a/doc/src/snippets/textdocument-selections/mainwindow.h b/doc/src/snippets/textdocument-selections/mainwindow.h
new file mode 100644
index 0000000..effe935
--- /dev/null
+++ b/doc/src/snippets/textdocument-selections/mainwindow.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+#include <QTextDocumentFragment>
+
+class QAction;
+class QTextDocument;
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void cutSelection();
+ void copySelection();
+ void openFile();
+ void pasteSelection();
+ void selectWord();
+ void selectLine();
+ void selectBlock();
+ void selectFrame();
+ void updateMenus();
+
+private:
+ QAction *cutAction;
+ QAction *copyAction;
+ QAction *pasteAction;
+ QString currentFile;
+ QTextEdit *editor;
+ QTextDocument *document;
+ QTextDocumentFragment selection;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-selections/textdocument-selections.pro b/doc/src/snippets/textdocument-selections/textdocument-selections.pro
new file mode 100644
index 0000000..253c452
--- /dev/null
+++ b/doc/src/snippets/textdocument-selections/textdocument-selections.pro
@@ -0,0 +1,4 @@
+QT += xml
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
diff --git a/doc/src/snippets/textdocument-tables/main.cpp b/doc/src/snippets/textdocument-tables/main.cpp
new file mode 100644
index 0000000..1854ad5
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(480, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-tables/mainwindow.cpp b/doc/src/snippets/textdocument-tables/mainwindow.cpp
new file mode 100644
index 0000000..10d1abb
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/mainwindow.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xmlwriter.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ QAction *saveAction = fileMenu->addAction(tr("&Save..."));
+ saveAction->setShortcut(tr("Ctrl+S"));
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *showMenu = new QMenu(tr("&Show"));
+
+ QAction *showTableAction = showMenu->addAction(tr("&Table"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(showMenu);
+
+ editor = new QTextEdit();
+
+//! [0] //! [1]
+ QTextCursor cursor(editor->textCursor());
+//! [0]
+ cursor.movePosition(QTextCursor::Start);
+//! [1]
+
+ int rows = 11;
+ int columns = 4;
+
+//! [2]
+ QTextTableFormat tableFormat;
+ tableFormat.setBackground(QColor("#e0e0e0"));
+ QVector<QTextLength> constraints;
+ constraints << QTextLength(QTextLength::PercentageLength, 16);
+ constraints << QTextLength(QTextLength::PercentageLength, 28);
+ constraints << QTextLength(QTextLength::PercentageLength, 28);
+ constraints << QTextLength(QTextLength::PercentageLength, 28);
+ tableFormat.setColumnWidthConstraints(constraints);
+//! [3]
+ QTextTable *table = cursor.insertTable(rows, columns, tableFormat);
+//! [2] //! [3]
+
+ int column;
+ int row;
+ QTextTableCell cell;
+ QTextCursor cellCursor;
+
+ QTextCharFormat charFormat;
+ charFormat.setForeground(Qt::black);
+
+//! [4]
+ cell = table->cellAt(0, 0);
+ cellCursor = cell.firstCursorPosition();
+ cellCursor.insertText(tr("Week"), charFormat);
+//! [4]
+
+//! [5]
+ for (column = 1; column < columns; ++column) {
+ cell = table->cellAt(0, column);
+ cellCursor = cell.firstCursorPosition();
+ cellCursor.insertText(tr("Team %1").arg(column), charFormat);
+ }
+
+ for (row = 1; row < rows; ++row) {
+ cell = table->cellAt(row, 0);
+ cellCursor = cell.firstCursorPosition();
+ cellCursor.insertText(tr("%1").arg(row), charFormat);
+
+ for (column = 1; column < columns; ++column) {
+ if ((row-1) % 3 == column-1) {
+//! [5] //! [6]
+ cell = table->cellAt(row, column);
+ QTextCursor cellCursor = cell.firstCursorPosition();
+ cellCursor.insertText(tr("On duty"), charFormat);
+ }
+//! [6] //! [7]
+ }
+//! [7] //! [8]
+ }
+//! [8]
+
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(showTableAction, SIGNAL(triggered()), this, SLOT(showTable()));
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document Tables"));
+}
+
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save document as:"), "", tr("XML (*.xml)"));
+
+ if (!fileName.isEmpty()) {
+ if (writeXml(fileName))
+ setWindowTitle(fileName);
+ else
+ QMessageBox::warning(this, tr("Warning"),
+ tr("Failed to save the document."), QMessageBox::Cancel,
+ QMessageBox::NoButton);
+ }
+}
+
+void MainWindow::showTable()
+{
+ QTextCursor cursor = editor->textCursor();
+ QTextTable *table = cursor.currentTable();
+
+ if (!table)
+ return;
+
+ QTableWidget *tableWidget = new QTableWidget(table->rows(), table->columns());
+
+//! [9]
+ for (int row = 0; row < table->rows(); ++row) {
+ for (int column = 0; column < table->columns(); ++column) {
+ QTextTableCell tableCell = table->cellAt(row, column);
+//! [9]
+ QTextFrame::iterator it;
+ QString text;
+ for (it = tableCell.begin(); !(it.atEnd()); ++it) {
+ QTextBlock childBlock = it.currentBlock();
+ if (childBlock.isValid())
+ text += childBlock.text();
+ }
+ QTableWidgetItem *newItem = new QTableWidgetItem(text);
+ tableWidget->setItem(row, column, newItem);
+ /*
+//! [10]
+ processTableCell(tableCell);
+//! [10]
+ */
+//! [11]
+ }
+//! [11] //! [12]
+ }
+//! [12]
+
+ tableWidget->setWindowTitle(tr("Table Contents"));
+ tableWidget->show();
+}
+
+bool MainWindow::writeXml(const QString &fileName)
+{
+ XmlWriter documentWriter(editor->document());
+
+ QDomDocument *domDocument = documentWriter.toXml();
+ QFile file(fileName);
+
+ if (file.open(QFile::WriteOnly)) {
+ QTextStream textStream(&file);
+ textStream.setCodec(QTextCodec::codecForName("UTF-8"));
+
+ textStream << domDocument->toString(1).toUtf8();
+ file.close();
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/doc/src/snippets/textdocument-tables/mainwindow.h b/doc/src/snippets/textdocument-tables/mainwindow.h
new file mode 100644
index 0000000..fbb3442
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/mainwindow.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void saveFile();
+ void showTable();
+
+private:
+ bool writeXml(const QString &fileName);
+
+ QTextEdit *editor;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-tables/textdocument-tables.pro b/doc/src/snippets/textdocument-tables/textdocument-tables.pro
new file mode 100644
index 0000000..91ae50f
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/textdocument-tables.pro
@@ -0,0 +1,6 @@
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xmlwriter.cpp
+HEADERS = mainwindow.h \
+ xmlwriter.h
+QT += xml
diff --git a/doc/src/snippets/textdocument-tables/xmlwriter.cpp b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
new file mode 100644
index 0000000..c753c06
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xmlwriter.h"
+
+QDomDocument *XmlWriter::toXml()
+{
+ QDomImplementation implementation;
+ QDomDocumentType docType = implementation.createDocumentType(
+ "scribe-document", "scribe", "qtsoftware.com/scribe");
+
+ document = new QDomDocument(docType);
+
+ // ### This processing instruction is required to ensure that any kind
+ // of encoding is given when the document is written.
+ QDomProcessingInstruction process = document->createProcessingInstruction(
+ "xml", "version=\"1.0\" encoding=\"utf-8\"");
+ document->appendChild(process);
+
+ QDomElement documentElement = document->createElement("document");
+ document->appendChild(documentElement);
+
+ QTextFrame *root = textDocument->rootFrame();
+
+ if (root)
+ processFrame(documentElement, root);
+
+ return document;
+}
+
+void XmlWriter::processBlock(QDomElement &parent, const QTextBlock &block)
+{
+ QDomElement blockElement = document->createElement("block");
+ blockElement.setAttribute("position", block.position());
+ blockElement.setAttribute("length", block.length());
+ parent.appendChild(blockElement);
+
+ QTextBlock::iterator it;
+ for (it = block.begin(); !(it.atEnd()); ++it) {
+ QTextFragment fragment = it.fragment();
+
+ if (fragment.isValid()) {
+ QDomElement fragmentElement = document->createElement("fragment");
+ blockElement.appendChild(fragmentElement);
+
+ fragmentElement.setAttribute("length", fragment.length());
+ QDomText fragmentText = document->createTextNode(fragment.text());
+
+ fragmentElement.appendChild(fragmentText);
+ }
+ }
+}
+
+void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
+{
+ QDomElement frameElement = document->createElement("frame");
+ frameElement.setAttribute("begin", frame->firstPosition());
+ frameElement.setAttribute("end", frame->lastPosition());
+ parent.appendChild(frameElement);
+
+//! [0]
+ QTextFrame::iterator it;
+ for (it = frame->begin(); !(it.atEnd()); ++it) {
+
+ QTextFrame *childFrame = it.currentFrame();
+ QTextBlock childBlock = it.currentBlock();
+
+ if (childFrame) {
+ QTextTable *childTable = qobject_cast<QTextTable*>(childFrame);
+
+ if (childTable)
+ processTable(frameElement, childTable);
+ else
+ processFrame(frameElement, childFrame);
+
+ } else if (childBlock.isValid())
+//! [0] //! [1]
+ processBlock(frameElement, childBlock);
+ }
+//! [1]
+}
+
+void XmlWriter::processTable(QDomElement &parent, QTextTable *table)
+{
+ QDomElement element = document->createElement("table");
+
+ for (int row = 0; row < table->rows(); ++row) {
+ for (int column = 0; column < table->columns(); ++column) {
+ QTextTableCell cell = table->cellAt(row, column);
+ processTableCell(element, cell);
+ }
+ }
+ parent.appendChild(element);
+}
+
+void XmlWriter::processTableCell(QDomElement &parent, const QTextTableCell &cell)
+{
+ QDomElement element = document->createElement("cell");
+ element.setAttribute("row", cell.row());
+ element.setAttribute("column", cell.column());
+
+ QTextFrame::iterator it;
+ for (it = cell.begin(); !(it.atEnd()); ++it) {
+
+ QTextFrame *childFrame = it.currentFrame();
+ QTextBlock childBlock = it.currentBlock();
+
+ if (childFrame)
+ processFrame(element, childFrame);
+ else if (childBlock.isValid())
+ processBlock(element, childBlock);
+ }
+ parent.appendChild(element);
+}
diff --git a/doc/src/snippets/textdocument-tables/xmlwriter.h b/doc/src/snippets/textdocument-tables/xmlwriter.h
new file mode 100644
index 0000000..3a6f1a9
--- /dev/null
+++ b/doc/src/snippets/textdocument-tables/xmlwriter.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XMLWRITER_H
+#define XMLWRITER_H
+
+#include <QDomDocument>
+
+class QTextDocument;
+
+class XmlWriter
+{
+public:
+ XmlWriter(QTextDocument *document) : textDocument(document) {}
+ QDomDocument *toXml();
+
+private:
+ void processBlock(QDomElement &parent, const QTextBlock &block);
+ void processFrame(QDomElement &parent, QTextFrame *frame);
+ void processTable(QDomElement &parent, QTextTable *table);
+ void processTableCell(QDomElement &parent, const QTextTableCell &cell);
+
+ QDomDocument *document;
+ QTextDocument *textDocument;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-texttable/main.cpp b/doc/src/snippets/textdocument-texttable/main.cpp
new file mode 100644
index 0000000..0917dfc
--- /dev/null
+++ b/doc/src/snippets/textdocument-texttable/main.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char * argv[])
+{
+ int rows = 6;
+ int columns = 2;
+
+ QApplication app(argc, argv);
+ QTextEdit *textEdit = new QTextEdit;
+ QTextCursor cursor(textEdit->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+
+ QTextTableFormat tableFormat;
+ tableFormat.setAlignment(Qt::AlignHCenter);
+ tableFormat.setCellPadding(2);
+ tableFormat.setCellSpacing(2);
+ QTextTable *table = cursor.insertTable(rows, columns);
+ table->setFormat(tableFormat);
+
+ QTextCharFormat boldFormat;
+ boldFormat.setFontWeight(QFont::Bold);
+
+ QTextBlockFormat centerFormat;
+ centerFormat.setAlignment(Qt::AlignHCenter);
+ cursor.mergeBlockFormat(centerFormat);
+
+ cursor = table->cellAt(0, 0).firstCursorPosition();
+ cursor.insertText(("Details"), boldFormat);
+
+ cursor = table->cellAt(1, 0).firstCursorPosition();
+ cursor.insertText("Alan");
+
+ cursor = table->cellAt(1, 1).firstCursorPosition();
+ cursor.insertText("5, Pickety Street");
+
+//! [0]
+ table->mergeCells(0, 0, 1, 2);
+//! [0] //! [1]
+ table->splitCell(0, 0, 1, 1);
+//! [1]
+
+ textEdit->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocumentendsnippet.cpp b/doc/src/snippets/textdocumentendsnippet.cpp
new file mode 100644
index 0000000..4123f78
--- /dev/null
+++ b/doc/src/snippets/textdocumentendsnippet.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <iostream.h>
+
+int main(int argv, char **args)
+{
+ QString contentString("One\nTwp\nThree");
+
+ QTextDocument *doc = new QTextDocument(contentString);
+
+//! [0]
+ for (QTextBlock it = doc->begin(); it != doc->end(); it = it.next())
+ cout << it.text().toStdString() << endl;
+//! [0]
+
+ return 0;
+}
diff --git a/doc/src/snippets/threads/threads.cpp b/doc/src/snippets/threads/threads.cpp
new file mode 100644
index 0000000..76a19db
--- /dev/null
+++ b/doc/src/snippets/threads/threads.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCache>
+#include <QMutex>
+#include <QThreadStorage>
+
+#include "threads.h"
+
+//! [0]
+void MyThread::run()
+//! [0] //! [1]
+{
+//! [1] //! [2]
+}
+//! [2]
+
+#define Counter ReentrantCounter
+
+//! [3]
+class Counter
+//! [3] //! [4]
+{
+public:
+ Counter() { n = 0; }
+
+ void increment() { ++n; }
+ void decrement() { --n; }
+ int value() const { return n; }
+
+private:
+ int n;
+};
+//! [4]
+
+#undef Counter
+#define Counter ThreadSafeCounter
+
+//! [5]
+class Counter
+//! [5] //! [6]
+{
+public:
+ Counter() { n = 0; }
+
+ void increment() { QMutexLocker locker(&mutex); ++n; }
+ void decrement() { QMutexLocker locker(&mutex); --n; }
+ int value() const { QMutexLocker locker(&mutex); return n; }
+
+private:
+ mutable QMutex mutex;
+ int n;
+};
+//! [6]
+
+typedef int SomeClass;
+
+//! [7]
+QThreadStorage<QCache<QString, SomeClass> *> caches;
+
+void cacheObject(const QString &key, SomeClass *object)
+//! [7] //! [8]
+{
+ if (!caches.hasLocalData())
+ caches.setLocalData(new QCache<QString, SomeClass>);
+
+ caches.localData()->insert(key, object);
+}
+
+void removeFromCache(const QString &key)
+//! [8] //! [9]
+{
+ if (!caches.hasLocalData())
+ return;
+
+ caches.localData()->remove(key);
+}
+//! [9]
+
+int main()
+{
+ return 0;
+}
diff --git a/doc/src/snippets/threads/threads.h b/doc/src/snippets/threads/threads.h
new file mode 100644
index 0000000..45a59cd
--- /dev/null
+++ b/doc/src/snippets/threads/threads.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QThread>
+
+//! [0]
+class MyThread : public QThread
+{
+ Q_OBJECT
+
+protected:
+ void run();
+};
+//! [0]
diff --git a/doc/src/snippets/timeline/main.cpp b/doc/src/snippets/timeline/main.cpp
new file mode 100644
index 0000000..b2767ba
--- /dev/null
+++ b/doc/src/snippets/timeline/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <math.h>
+
+int main(int argv, char *args[])
+{
+ QApplication app(argv, args);
+
+//! [0]
+ QGraphicsItem *ball = new QGraphicsEllipseItem(0, 0, 20, 20);
+
+ QTimeLine *timer = new QTimeLine(5000);
+ timer->setFrameRange(0, 100);
+
+ QGraphicsItemAnimation *animation = new QGraphicsItemAnimation;
+ animation->setItem(ball);
+ animation->setTimeLine(timer);
+
+ for (int i = 0; i < 200; ++i)
+ animation->setPosAt(i / 200.0, QPointF(i, i));
+
+ QGraphicsScene *scene = new QGraphicsScene();
+ scene->setSceneRect(0, 0, 250, 250);
+ scene->addItem(ball);
+
+ QGraphicsView *view = new QGraphicsView(scene);
+ view->show();
+
+ timer->start();
+//! [0]
+
+ return app.exec();
+}
diff --git a/doc/src/snippets/timeline/timeline.pro b/doc/src/snippets/timeline/timeline.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/timeline/timeline.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/timers/timers.cpp b/doc/src/snippets/timers/timers.cpp
new file mode 100644
index 0000000..9f901f0
--- /dev/null
+++ b/doc/src/snippets/timers/timers.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QTimer>
+
+class Foo : public QObject
+{
+public:
+ Foo();
+};
+
+Foo::Foo()
+{
+//! [0]
+ QTimer *timer = new QTimer(this);
+//! [0] //! [1]
+ connect(timer, SIGNAL(timeout()), this, SLOT(updateCaption()));
+//! [1] //! [2]
+ timer->start(1000);
+//! [2]
+
+//! [3]
+ QTimer::singleShot(200, this, SLOT(updateCaption()));
+//! [3]
+
+ {
+ // ZERO-CASE
+//! [4]
+ QTimer *timer = new QTimer(this);
+//! [4] //! [5]
+ connect(timer, SIGNAL(timeout()), this, SLOT(processOneThing()));
+//! [5] //! [6]
+ timer->start();
+//! [6]
+ }
+}
+
+int main()
+{
+
+}
diff --git a/doc/src/snippets/timers/timers.pro b/doc/src/snippets/timers/timers.pro
new file mode 100644
index 0000000..8cb4eec
--- /dev/null
+++ b/doc/src/snippets/timers/timers.pro
@@ -0,0 +1 @@
+SOURCES += timers.cpp
diff --git a/doc/src/snippets/transform/main.cpp b/doc/src/snippets/transform/main.cpp
new file mode 100644
index 0000000..a4712a4
--- /dev/null
+++ b/doc/src/snippets/transform/main.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <cmath>
+
+class SimpleTransformation : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [0]
+void SimpleTransformation::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ painter.rotate(45);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QTransform");
+}
+//! [0]
+
+class CombinedTransformation : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [1]
+void CombinedTransformation::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ QTransform transform;
+ transform.translate(50, 50);
+ transform.rotate(45);
+ transform.scale(0.5, 1.0);
+ painter.setTransform(transform);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QTransform");
+}
+//! [1]
+
+class BasicOperations : public QWidget
+{
+ void paintEvent(QPaintEvent *);
+};
+
+//! [2]
+void BasicOperations::paintEvent(QPaintEvent *)
+{
+ double pi = 3.14;
+
+ double a = pi/180 * 45.0;
+ double sina = sin(a);
+ double cosa = cos(a);
+
+ QTransform translationTransform(1, 0, 0, 1, 50.0, 50.0);
+ QTransform rotationTransform(cosa, sina, -sina, cosa, 0, 0);
+ QTransform scalingTransform(0.5, 0, 0, 1.0, 0, 0);
+
+ QTransform transform;
+ transform = scalingTransform * rotationTransform * translationTransform;
+
+ QPainter painter(this);
+ painter.setPen(QPen(Qt::blue, 1, Qt::DashLine));
+ painter.drawRect(0, 0, 100, 100);
+
+ painter.setTransform(transform);
+
+ painter.setFont(QFont("Helvetica", 24));
+ painter.setPen(QPen(Qt::black, 1));
+ painter.drawText(20, 10, "QTransform");
+}
+//! [2]
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QWidget widget;
+
+ SimpleTransformation *simpleWidget = new SimpleTransformation;
+ CombinedTransformation *combinedWidget = new CombinedTransformation;
+ BasicOperations *basicWidget = new BasicOperations;
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(simpleWidget);
+ layout->addWidget(combinedWidget);
+ layout->addWidget(basicWidget);
+ widget.setLayout(layout);
+
+ widget.show();
+ widget.resize(130, 350);
+ return app.exec();
+}
diff --git a/doc/src/snippets/transform/transform.pro b/doc/src/snippets/transform/transform.pro
new file mode 100644
index 0000000..5254077
--- /dev/null
+++ b/doc/src/snippets/transform/transform.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp \ No newline at end of file
diff --git a/doc/src/snippets/uitools/calculatorform/calculatorform.pro b/doc/src/snippets/uitools/calculatorform/calculatorform.pro
new file mode 100644
index 0000000..1a18378
--- /dev/null
+++ b/doc/src/snippets/uitools/calculatorform/calculatorform.pro
@@ -0,0 +1,5 @@
+#! [0]
+TEMPLATE = app
+FORMS = calculatorform.ui
+SOURCES = main.cpp
+#! [0]
diff --git a/doc/src/snippets/uitools/calculatorform/calculatorform.ui b/doc/src/snippets/uitools/calculatorform/calculatorform.ui
new file mode 100644
index 0000000..dda0e62
--- /dev/null
+++ b/doc/src/snippets/uitools/calculatorform/calculatorform.ui
@@ -0,0 +1,303 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>276</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Builder</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>54</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>120</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>37</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>37</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>85</x>
+ <y>69</y>
+ <width>20</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>188</x>
+ <y>26</y>
+ <width>79</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/doc/src/snippets/uitools/calculatorform/main.cpp b/doc/src/snippets/uitools/calculatorform/main.cpp
new file mode 100644
index 0000000..e9af926
--- /dev/null
+++ b/doc/src/snippets/uitools/calculatorform/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "ui_calculatorform.h"
+//! [0]
+#include <QApplication>
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget *widget = new QWidget;
+ Ui::CalculatorForm ui;
+ ui.setupUi(widget);
+
+ widget->show();
+ return app.exec();
+}
+//! [1]
diff --git a/doc/src/snippets/updating-selections/main.cpp b/doc/src/snippets/updating-selections/main.cpp
new file mode 100644
index 0000000..d8d5943
--- /dev/null
+++ b/doc/src/snippets/updating-selections/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how selections can be used directly on a model.
+ It shows the result of some selections made using a table view.
+*/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QMainWindow *window = new MainWindow;
+ window->show();
+ window->resize(640, 480);
+ return app.exec();
+}
diff --git a/doc/src/snippets/updating-selections/model.cpp b/doc/src/snippets/updating-selections/model.cpp
new file mode 100644
index 0000000..ad7d2ed
--- /dev/null
+++ b/doc/src/snippets/updating-selections/model.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ model.cpp
+
+ Provides a table model for use in various examples.
+*/
+
+#include <QtGui>
+
+#include "model.h"
+
+/*!
+ Constructs a table model with at least one row and one column.
+*/
+
+TableModel::TableModel(int rows, int columns, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ QStringList newList;
+
+ for (int column = 0; column < qMax(1, columns); ++column) {
+ newList.append("");
+ }
+
+ for (int row = 0; row < qMax(1, rows); ++row) {
+ rowList.append(newList);
+ }
+}
+
+
+/*!
+ Returns the number of items in the row list as the number of rows
+ in the model.
+*/
+
+int TableModel::rowCount(const QModelIndex &/*parent*/) const
+{
+ return rowList.size();
+}
+
+/*!
+ Returns the number of items in the first list item as the number of
+ columns in the model. All rows should have the same number of columns.
+*/
+
+int TableModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return rowList[0].size();
+}
+
+/*!
+ Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned for the display role; otherwise an invalid variant
+ is returned.
+*/
+
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return rowList[index.row()][index.column()];
+ else
+ return QVariant();
+}
+
+/*!
+ Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant.
+*/
+
+QVariant TableModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
+
+/*!
+ Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable.
+*/
+
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
+}
+
+/*!
+ Changes an item in the model, but only if the following conditions
+ are met:
+
+ * The index supplied is valid.
+ * The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed.
+*/
+
+bool TableModel::setData(const QModelIndex &index,
+ const QVariant &value, int role)
+{
+ if (!index.isValid() || role != Qt::EditRole)
+ return false;
+
+ rowList[index.row()][index.column()] = value.toString();
+ emit dataChanged(index, index);
+ return true;
+}
+
+/*!
+ Inserts a number of rows into the model at the specified position.
+*/
+
+bool TableModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ int columns = columnCount();
+ beginInsertRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ QStringList items;
+ for (int column = 0; column < columns; ++column)
+ items.append("");
+ rowList.insert(position, items);
+ }
+
+ endInsertRows();
+ return true;
+}
+
+/*!
+ Inserts a number of columns into the model at the specified position.
+ Each entry in the list is extended in turn with the required number of
+ empty strings.
+*/
+
+bool TableModel::insertColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginInsertColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = position; column < columns; ++column) {
+ rowList[row].insert(position, "");
+ }
+ }
+
+ endInsertColumns();
+ return true;
+}
+
+/*!
+ Removes a number of rows from the model at the specified position.
+*/
+
+bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ beginRemoveRows(parent, position, position + rows - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ rowList.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+/*!
+ Removes a number of columns from the model at the specified position.
+ Each row is shortened by the number of columns specified.
+*/
+
+bool TableModel::removeColumns(int position, int columns, const QModelIndex &parent)
+{
+ int rows = rowCount();
+ beginRemoveColumns(parent, position, position + columns - 1);
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ rowList[row].removeAt(position);
+ }
+ }
+
+ endRemoveColumns();
+ return true;
+}
diff --git a/doc/src/snippets/updating-selections/model.h b/doc/src/snippets/updating-selections/model.h
new file mode 100644
index 0000000..207f83a
--- /dev/null
+++ b/doc/src/snippets/updating-selections/model.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include <QAbstractTableModel>
+#include <QStringList>
+#include <QVariant>
+
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(int rows = 1, int columns = 1, QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+
+ bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());
+
+private:
+ QList<QStringList> rowList;
+};
+
+#endif
diff --git a/doc/src/snippets/updating-selections/updating-selections.pro b/doc/src/snippets/updating-selections/updating-selections.pro
new file mode 100644
index 0000000..91ebd3e
--- /dev/null
+++ b/doc/src/snippets/updating-selections/updating-selections.pro
@@ -0,0 +1,2 @@
+HEADERS += model.h window.h
+SOURCES += main.cpp model.cpp window.cpp
diff --git a/doc/src/snippets/updating-selections/window.cpp b/doc/src/snippets/updating-selections/window.cpp
new file mode 100644
index 0000000..3ca4911
--- /dev/null
+++ b/doc/src/snippets/updating-selections/window.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ window.cpp
+
+ A minimal subclass of QTableView with slots to allow the selection model
+ to be monitored.
+*/
+
+#include <QAbstractItemModel>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QStatusBar>
+
+#include "model.h"
+#include "window.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle("Selected items in a table model");
+
+ model = new TableModel(8, 4, this);
+
+ table = new QTableView(this);
+ table->setModel(model);
+
+ selectionModel = table->selectionModel();
+ connect(selectionModel,
+ SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+ this, SLOT(updateSelection(const QItemSelection &, const QItemSelection &)));
+ connect(selectionModel,
+ SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
+
+ statusBar();
+ setCentralWidget(table);
+}
+
+//! [0]
+void MainWindow::updateSelection(const QItemSelection &selected,
+ const QItemSelection &deselected)
+{
+ QModelIndex index;
+ QModelIndexList items = selected.indexes();
+
+ foreach (index, items) {
+ QString text = QString("(%1,%2)").arg(index.row()).arg(index.column());
+ model->setData(index, text);
+//! [0] //! [1]
+ }
+//! [1]
+
+//! [2]
+ items = deselected.indexes();
+
+ foreach (index, items)
+ model->setData(index, "");
+}
+//! [2]
+
+//! [3]
+void MainWindow::changeCurrent(const QModelIndex &current,
+ const QModelIndex &previous)
+{
+ statusBar()->showMessage(
+ tr("Moved from (%1,%2) to (%3,%4)")
+ .arg(previous.row()).arg(previous.column())
+ .arg(current.row()).arg(current.column()));
+}
+//! [3]
diff --git a/doc/src/snippets/updating-selections/window.h b/doc/src/snippets/updating-selections/window.h
new file mode 100644
index 0000000..f3556f7
--- /dev/null
+++ b/doc/src/snippets/updating-selections/window.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QItemSelection>
+#include <QMainWindow>
+#include <QModelIndex>
+#include <QWidget>
+#include <QTableView>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void updateSelection(const QItemSelection &selected,
+ const QItemSelection &deselected);
+ void changeCurrent(const QModelIndex &current, const QModelIndex &previous);
+
+private:
+ QAbstractItemModel *model;
+ QItemSelectionModel *selectionModel;
+ QTableView *table;
+};
+
+#endif
diff --git a/doc/src/snippets/videomedia.cpp b/doc/src/snippets/videomedia.cpp
new file mode 100644
index 0000000..323aca9
--- /dev/null
+++ b/doc/src/snippets/videomedia.cpp
@@ -0,0 +1,19 @@
+
+
+#include <QtGui>
+#include <phonon>
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Phonon::VideoPlayer *player = new Phonon::VideoPlayer(Phonon::VideoCategory, 0);
+
+//![0]
+ player->mediaObject()->isSeekable();
+//![0]
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/volumeslider.cpp b/doc/src/snippets/volumeslider.cpp
new file mode 100644
index 0000000..960ca59
--- /dev/null
+++ b/doc/src/snippets/volumeslider.cpp
@@ -0,0 +1,29 @@
+#include <QtGui>
+
+#include <phonon/audiooutput.h>
+#include <phonon/mediaobject.h>
+#include <phonon/volumeslider.h>
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ app.setApplicationName("Volume slider tester");
+
+ Phonon::MediaObject *mediaObject = new Phonon::MediaObject;
+ mediaObject->setCurrentSource(QString("/home/gvatteka/Music/Lumme-Badloop.ogg"));
+
+//! [0]
+ Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory);
+ Phonon::createPath(mediaObject, audioOutput);
+
+ Phonon::VolumeSlider *volumeSlider = new Phonon::VolumeSlider;
+ volumeSlider->setAudioOutput(audioOutput);
+//! [0]
+
+ mediaObject->play();
+
+ volumeSlider->show();
+
+ return app.exec();
+}
+
diff --git a/doc/src/snippets/webkit/simple/main.cpp b/doc/src/snippets/webkit/simple/main.cpp
new file mode 100644
index 0000000..a6a4fc2
--- /dev/null
+++ b/doc/src/snippets/webkit/simple/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QUrl>
+#include <QWebView>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget *parent = 0;
+//! [Using QWebView]
+ QWebView *view = new QWebView(parent);
+ view->load(QUrl("http://qtsoftware.com/"));
+ view->show();
+//! [Using QWebView]
+ return app.exec();
+}
diff --git a/doc/src/snippets/webkit/simple/simple.pro b/doc/src/snippets/webkit/simple/simple.pro
new file mode 100644
index 0000000..61cd3bf
--- /dev/null
+++ b/doc/src/snippets/webkit/simple/simple.pro
@@ -0,0 +1,2 @@
+QT += webkit
+SOURCES = main.cpp
diff --git a/doc/src/snippets/webkit/webpage/main.cpp b/doc/src/snippets/webkit/webpage/main.cpp
new file mode 100644
index 0000000..b433ac2
--- /dev/null
+++ b/doc/src/snippets/webkit/webpage/main.cpp
@@ -0,0 +1,62 @@
+#include <QtGui>
+#include <QWebPage>
+#include <QWebFrame>
+
+//! [0]
+class Thumbnailer : public QObject
+{
+ Q_OBJECT
+
+public:
+ Thumbnailer(const QUrl &url);
+
+signals:
+ void finished();
+
+private slots:
+ void render();
+
+private:
+ QWebPage page;
+
+};
+//! [0]
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Thumbnailer thumbnail(QUrl("http://qtsoftware.com"));
+
+ QObject::connect(&thumbnail, SIGNAL(finished()),
+ &app, SLOT(quit()));
+
+ return app.exec();
+}
+
+//! [1]
+Thumbnailer::Thumbnailer(const QUrl &url)
+{
+ page.mainFrame()->load(url);
+ connect(&page, SIGNAL(loadFinished(bool)),
+ this, SLOT(render()));
+}
+//! [1]
+
+//! [2]
+void Thumbnailer::render()
+{
+ page.setViewportSize(page.mainFrame()->contentsSize());
+ QImage image(page.viewportSize(), QImage::Format_ARGB32);
+ QPainter painter(&image);
+
+ page.mainFrame()->render(&painter);
+ painter.end();
+
+ QImage thumbnail = image.scaled(400, 400);
+ thumbnail.save("thumbnail.png");
+
+ emit finished();
+}
+//! [2]
+#include "main.moc"
diff --git a/doc/src/snippets/webkit/webpage/webpage.pro b/doc/src/snippets/webkit/webpage/webpage.pro
new file mode 100644
index 0000000..fcad03b
--- /dev/null
+++ b/doc/src/snippets/webkit/webpage/webpage.pro
@@ -0,0 +1,3 @@
+CONFIG += console
+QT += webkit
+SOURCES = main.cpp \ No newline at end of file
diff --git a/doc/src/snippets/whatsthis/whatsthis.cpp b/doc/src/snippets/whatsthis/whatsthis.cpp
new file mode 100644
index 0000000..ce7edc4
--- /dev/null
+++ b/doc/src/snippets/whatsthis/whatsthis.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+class MainWindow : public QMainWindow
+{
+public:
+ MainWindow();
+
+ QAction *newAct;
+};
+
+MainWindow()
+{
+//! [0]
+ newAct = new QAction(tr("&New"), this);
+ newAct->setShortcut(tr("Ctrl+N"));
+ newAct->setStatusTip(tr("Create a new file"));
+ newAct->setWhatsThis(tr("Click this option to create a new file."));
+//! [0]
+}
+
+int main()
+{
+ return 0;
+}
diff --git a/doc/src/snippets/whatsthis/whatsthis.pro b/doc/src/snippets/whatsthis/whatsthis.pro
new file mode 100644
index 0000000..1310a4f
--- /dev/null
+++ b/doc/src/snippets/whatsthis/whatsthis.pro
@@ -0,0 +1 @@
+SOURCES += whatsthis.cpp
diff --git a/doc/src/snippets/widget-mask/main.cpp b/doc/src/snippets/widget-mask/main.cpp
new file mode 100644
index 0000000..accbb71
--- /dev/null
+++ b/doc/src/snippets/widget-mask/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [0]
+ QLabel topLevelLabel;
+ QPixmap pixmap(":/images/tux.png");
+ topLevelLabel.setPixmap(pixmap);
+ topLevelLabel.setMask(pixmap.mask());
+//! [0]
+ topLevelLabel.show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/widget-mask/mask.qrc b/doc/src/snippets/widget-mask/mask.qrc
new file mode 100644
index 0000000..92f2272
--- /dev/null
+++ b/doc/src/snippets/widget-mask/mask.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/images" >
+ <file>tux.png</file>
+</qresource>
+</RCC>
diff --git a/doc/src/snippets/widget-mask/tux.png b/doc/src/snippets/widget-mask/tux.png
new file mode 100644
index 0000000..a95527f
--- /dev/null
+++ b/doc/src/snippets/widget-mask/tux.png
Binary files differ
diff --git a/doc/src/snippets/widget-mask/widget-mask.pro b/doc/src/snippets/widget-mask/widget-mask.pro
new file mode 100644
index 0000000..f0807a5
--- /dev/null
+++ b/doc/src/snippets/widget-mask/widget-mask.pro
@@ -0,0 +1,3 @@
+SOURCES = main.cpp
+RESOURCES = mask.qrc
+CONFIG += qt
diff --git a/doc/src/snippets/widgetdelegate.cpp b/doc/src/snippets/widgetdelegate.cpp
new file mode 100644
index 0000000..83237fe
--- /dev/null
+++ b/doc/src/snippets/widgetdelegate.cpp
@@ -0,0 +1,27 @@
+
+#include <QtGui>
+
+#include "widgetdelegate.h"
+
+//![0]
+void WidgetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (index.column() == 1) {
+ int progress = index.data().toInt();
+
+ QStyleOptionProgressBar progressBarOption;
+ progressBarOption.rect = option.rect;
+ progressBarOption.minimum = 0;
+ progressBarOption.maximum = 100;
+ progressBarOption.progress = progress;
+ progressBarOption.text = QString::number(progress) + "%";
+ progressBarOption.textVisible = true;
+
+ QApplication::style()->drawControl(QStyle::CE_ProgressBar,
+ &progressBarOption, painter);
+ } else
+ QStyledItemDelegate::paint(painter, option, index);
+
+//![0]
+}
diff --git a/doc/src/snippets/widgets-tutorial/childwidget/childwidget.pro b/doc/src/snippets/widgets-tutorial/childwidget/childwidget.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/childwidget/childwidget.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/widgets-tutorial/childwidget/main.cpp b/doc/src/snippets/widgets-tutorial/childwidget/main.cpp
new file mode 100644
index 0000000..8a97810
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/childwidget/main.cpp
@@ -0,0 +1,17 @@
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget *window = new QWidget();
+ window->resize(320, 240);
+ window->setWindowTitle(tr("Child widget"));
+ window->show();
+
+//! [create, position and show]
+ QPushButton *button = new QPushButton(tr("Press me"), window);
+ button->move(100, 100);
+ button->show();
+//! [create, position and show]
+ return app.exec();
+}
diff --git a/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp
new file mode 100644
index 0000000..f541464
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/nestedlayouts/main.cpp
@@ -0,0 +1,48 @@
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget *window = new QWidget();
+//! [create, lay out widgets and show]
+ QLabel *queryLabel = new QLabel(tr("Query:"));
+ QLineEdit *queryEdit = new QLineEdit();
+ QTableView *resultView = new QTableView();
+
+ QHBoxLayout *queryLayout = new QHBoxLayout();
+ queryLayout->addWidget(queryLabel);
+ queryLayout->addWidget(queryEdit);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout();
+ mainLayout->addLayout(queryLayout);
+ mainLayout->addWidget(resultView);
+ window->setLayout(mainLayout);
+//! [create, lay out widgets and show]
+
+ QStandardItemModel model;
+ model.setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Office"));
+ QList<QStringList> rows = QList<QStringList>()
+ << (QStringList() << "Verne Nilsen" << "123")
+ << (QStringList() << "Carlos Tang" << "77")
+ << (QStringList() << "Bronwyn Hawcroft" << "119")
+ << (QStringList() << "Alessandro Hanssen" << "32")
+ << (QStringList() << "Andrew John Bakken" << "54")
+ << (QStringList() << "Vanessa Weatherley" << "85")
+ << (QStringList() << "Rebecca Dickens" << "17")
+ << (QStringList() << "David Bradley" << "42")
+ << (QStringList() << "Knut Walters" << "25")
+ << (QStringList() << "Andrea Jones" << "34");
+ foreach (QStringList row, rows) {
+ QList<QStandardItem *> items;
+ foreach (QString text, row)
+ items.append(new QStandardItem(text));
+ model.appendRow(items);
+ }
+
+ resultView->setModel(&model);
+ resultView->verticalHeader()->hide();
+ resultView->horizontalHeader()->setStretchLastSection(true);
+ window->setWindowTitle(tr("Nested layouts"));
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/widgets-tutorial/nestedlayouts/nestedlayouts.pro b/doc/src/snippets/widgets-tutorial/nestedlayouts/nestedlayouts.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/nestedlayouts/nestedlayouts.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/widgets-tutorial/toplevel/main.cpp b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp
new file mode 100644
index 0000000..cffdff8
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp
@@ -0,0 +1,13 @@
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [create, resize and show]
+ QWidget *window = new QWidget();
+ window->resize(320, 240);
+ window->show();
+//! [create, resize and show]
+ window->setWindowTitle(tr("Top-level widget"));
+ return app.exec();
+}
diff --git a/doc/src/snippets/widgets-tutorial/toplevel/toplevel.pro b/doc/src/snippets/widgets-tutorial/toplevel/toplevel.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/toplevel/toplevel.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp b/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp
new file mode 100644
index 0000000..0c6e814
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp
@@ -0,0 +1,19 @@
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget *window = new QWidget();
+//! [create, lay out widgets and show]
+ QLabel *label = new QLabel(tr("Name:"));
+ QLineEdit *lineEdit = new QLineEdit();
+
+ QHBoxLayout *layout = new QHBoxLayout();
+ layout->addWidget(label);
+ layout->addWidget(lineEdit);
+ window->setLayout(layout);
+//! [create, lay out widgets and show]
+ window->setWindowTitle(tr("Window layout"));
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/widgets-tutorial/windowlayout/windowlayout.pro b/doc/src/snippets/widgets-tutorial/windowlayout/windowlayout.pro
new file mode 100644
index 0000000..bba41b9
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/windowlayout/windowlayout.pro
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/doc/src/snippets/xml/prettyprint/main.cpp b/doc/src/snippets/xml/prettyprint/main.cpp
new file mode 100644
index 0000000..fa13ff6
--- /dev/null
+++ b/doc/src/snippets/xml/prettyprint/main.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QFile>
+#include <QHash>
+#include <QPair>
+#include <QStringList>
+#include <QTextStream>
+#include <QXmlStreamReader>
+
+/*
+ This class exists for the sole purpose of creating a translation context.
+ */
+class PrettyPrint
+{
+ Q_DECLARE_TR_FUNCTIONS(PrettyPrint)
+};
+
+int main(int argc, char *argv[])
+{
+ enum ExitCode
+ {
+ Success,
+ ParseFailure,
+ ArgumentError,
+ WriteError,
+ FileFailure
+ };
+
+ QCoreApplication app(argc, argv);
+
+ QTextStream errorStream(stderr);
+
+ if (argc != 2)
+ {
+ errorStream << PrettyPrint::tr(
+ "Usage: prettyprint <path to XML file>\n");
+ return ArgumentError;
+ }
+
+ QString inputFilePath(QCoreApplication::arguments().at(1));
+ QFile inputFile(inputFilePath);
+
+ if (!QFile::exists(inputFilePath))
+ {
+ errorStream << PrettyPrint::tr(
+ "File %1 does not exist.\n").arg(inputFilePath);
+ return FileFailure;
+
+ } else if (!inputFile.open(QIODevice::ReadOnly)) {
+ errorStream << PrettyPrint::tr(
+ "Failed to open file %1.\n").arg(inputFilePath);
+ return FileFailure;
+ }
+
+ QFile outputFile;
+ if (!outputFile.open(stdout, QIODevice::WriteOnly))
+ {
+ QTextStream(stderr) << PrettyPrint::tr("Failed to open stdout.");
+ return WriteError;
+ }
+
+ QXmlStreamReader reader(&inputFile);
+ int indentation = 0;
+ QHash<int,QPair<int, int> > indentationStack;
+
+ while (!reader.atEnd())
+ {
+ reader.readNext();
+ if (reader.isStartElement()) {
+ indentationStack[indentation] = QPair<int,int>(
+ reader.lineNumber(), reader.columnNumber());
+ indentation += 1;
+ } else if (reader.isEndElement()) {
+ indentationStack.remove(indentation);
+ indentation -= 1;
+ }
+
+ if (reader.error())
+ {
+ errorStream << PrettyPrint::tr(
+ "Error: %1 in file %2 at line %3, column %4.\n").arg(
+ reader.errorString(), inputFilePath,
+ QString::number(reader.lineNumber()),
+ QString::number(reader.columnNumber()));
+ if (indentationStack.contains(indentation-1)) {
+ int line = indentationStack[indentation-1].first;
+ int column = indentationStack[indentation-1].second;
+ errorStream << PrettyPrint::tr(
+ "Opened at line %1, column %2.\n").arg(
+ QString::number(line),
+ QString::number(column));
+ }
+ return ParseFailure;
+
+ } else if (reader.isStartElement() && !reader.name().isEmpty()) {
+ outputFile.write(QByteArray().fill(' ', indentation));
+ outputFile.write(reader.name().toString().toLocal8Bit());
+ outputFile.write(QString(" line %1, column %2\n").arg(
+ reader.lineNumber()).arg(reader.columnNumber()).toLocal8Bit());
+ }
+ }
+
+ return Success;
+}
diff --git a/doc/src/snippets/xml/prettyprint/prettyprint.pro b/doc/src/snippets/xml/prettyprint/prettyprint.pro
new file mode 100644
index 0000000..61945e0
--- /dev/null
+++ b/doc/src/snippets/xml/prettyprint/prettyprint.pro
@@ -0,0 +1,4 @@
+CONFIG += console
+QT -= gui
+QT += xml
+SOURCES += main.cpp
diff --git a/doc/src/snippets/xml/rsslisting/handler.cpp b/doc/src/snippets/xml/rsslisting/handler.cpp
new file mode 100644
index 0000000..1088871
--- /dev/null
+++ b/doc/src/snippets/xml/rsslisting/handler.cpp
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+handler.cpp
+
+Provides a handler for processing XML elements found by the reader.
+
+The handler looks for <title> and <link> elements within <item> elements,
+and records the text found within them. Link information stored within
+rdf:about attributes of <item> elements is also recorded when it is
+available.
+
+For each item found, a signal is emitted which specifies its title and
+link information. This may be used by user interfaces for the purpose of
+displaying items as they are read.
+*/
+
+#include <QtGui>
+
+#include "handler.h"
+
+/*
+ Reset the state of the handler to ensure that new documents are
+ read correctly.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::startDocument()
+{
+ inItem = false;
+ inTitle = false;
+ inLink = false;
+
+ return true;
+}
+
+/*
+ Process each starting element in the XML document.
+
+ Nested item, title, or link elements are not allowed, so we return false
+ if we encounter any of these. We also prohibit multiple definitions of
+ title strings.
+
+ Link destinations are read by this function if they are specified as
+ attributes in item elements.
+
+ For all cases not explicitly checked for, we return true to indicate that
+ the element is acceptable, and that parsing should continue. By doing
+ this, we can ignore elements in which we are not interested.
+*/
+
+bool Handler::startElement(const QString &, const QString &,
+ const QString & qName, const QXmlAttributes &attr)
+{
+ if (qName == "item") {
+
+ if (inItem)
+ return false;
+ else {
+ inItem = true;
+ linkString = attr.value("rdf:about");
+ }
+ }
+ else if (qName == "title") {
+
+ if (inTitle)
+ return false;
+ else if (!titleString.isEmpty())
+ return false;
+ else if (inItem)
+ inTitle = true;
+ }
+ else if (qName == "link") {
+
+ if (inLink)
+ return false;
+ else if (inItem)
+ inLink = true;
+ }
+
+ return true;
+}
+
+/*
+ Process each ending element in the XML document.
+
+ For recognized elements, we reset flags to ensure that we can read new
+ instances of these elements. If we have read an item element, emit a
+ signal to indicate that a new item is available for display.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::endElement(const QString &, const QString &,
+ const QString & qName)
+{
+ if (qName == "title" && inTitle)
+ inTitle = false;
+ else if (qName == "link" && inLink)
+ inLink = false;
+ else if (qName == "item") {
+ if (!titleString.isEmpty() && !linkString.isEmpty())
+ emit newItem(titleString, linkString);
+ inItem = false;
+ titleString = "";
+ linkString = "";
+ }
+
+ return true;
+}
+
+/*
+ Collect characters when reading the contents of title or link elements
+ when they occur within an item element.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::characters (const QString &chars)
+{
+ if (inTitle)
+ titleString += chars;
+ else if (inLink)
+ linkString += chars;
+
+ return true;
+}
+
+/*
+ Report a fatal parsing error, and return false to indicate to the reader
+ that parsing should stop.
+*/
+
+//! [0]
+bool Handler::fatalError (const QXmlParseException & exception)
+{
+ qWarning() << "Fatal error on line" << exception.lineNumber()
+ << ", column" << exception.columnNumber() << ":"
+ << exception.message();
+
+ return false;
+}
+//! [0]
diff --git a/doc/src/snippets/xml/rsslisting/handler.h b/doc/src/snippets/xml/rsslisting/handler.h
new file mode 100644
index 0000000..dfe8e62
--- /dev/null
+++ b/doc/src/snippets/xml/rsslisting/handler.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HANDLER_H
+#define HANDLER_H
+
+#include <QObject>
+#include <QString>
+#include <QXmlDefaultHandler>
+
+/* Note that QObject must precede QXmlDefaultHandler in the following list. */
+
+class Handler : public QObject, public QXmlDefaultHandler
+{
+ Q_OBJECT
+public:
+ bool startDocument();
+ bool startElement(const QString &, const QString &, const QString &qName,
+ const QXmlAttributes &attr);
+ bool endElement(const QString &, const QString &, const QString &qName);
+ bool characters(const QString &chars);
+
+ bool fatalError(const QXmlParseException &exception);
+
+signals:
+ void newItem(QString &title, QString &link);
+
+private:
+ QString titleString;
+ QString linkString;
+ bool inItem;
+ bool inTitle;
+ bool inLink;
+};
+
+#endif
+
diff --git a/doc/src/snippets/xml/rsslisting/main.cpp b/doc/src/snippets/xml/rsslisting/main.cpp
new file mode 100644
index 0000000..aec9d4d
--- /dev/null
+++ b/doc/src/snippets/xml/rsslisting/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+main.cpp
+
+Provides the main function for the RSS news reader example.
+*/
+
+#include <QtGui>
+
+#include "rsslisting.h"
+
+/*!
+ Create an application and a main widget. Open the main widget for
+ user input, and exit with an appropriate return value when it is
+ closed.
+*/
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ RSSListing *rsslisting = new RSSListing;
+ rsslisting->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/xml/rsslisting/rsslisting.cpp b/doc/src/snippets/xml/rsslisting/rsslisting.cpp
new file mode 100644
index 0000000..f5c65e5
--- /dev/null
+++ b/doc/src/snippets/xml/rsslisting/rsslisting.cpp
@@ -0,0 +1,252 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+rsslisting.cpp
+
+Provides a widget for displaying news items from RDF news sources.
+RDF is an XML-based format for storing items of information (see
+http://www.w3.org/RDF/ for details).
+
+The widget itself provides a simple user interface for specifying
+the URL of a news source, and controlling the downloading of news.
+
+The widget downloads and parses the XML asynchronously, feeding the
+data to an XML reader in pieces. This allows the user to interrupt
+its operation, and also allows very large data sources to be read.
+*/
+
+
+#include <QtCore>
+#include <QtGui>
+#include <QtNetwork>
+#include <QtXml>
+
+#include "rsslisting.h"
+
+
+/*
+ Constructs an RSSListing widget with a simple user interface, and sets
+ up the XML reader to use a custom handler class.
+
+ The user interface consists of a line edit, two push buttons, and a
+ list view widget. The line edit is used for entering the URLs of news
+ sources; the push buttons start and abort the process of reading the
+ news.
+*/
+
+RSSListing::RSSListing(QWidget *parent)
+ : QWidget(parent)
+{
+ lineEdit = new QLineEdit(this);
+
+ fetchButton = new QPushButton(tr("Fetch"), this);
+ abortButton = new QPushButton(tr("Abort"), this);
+ abortButton->setEnabled(false);
+
+ treeWidget = new QTreeWidget(this);
+ QStringList headerLabels;
+ headerLabels << tr("Title") << tr("Link");
+ treeWidget->setHeaderLabels(headerLabels);
+
+ handler = 0;
+
+ connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)),
+ this, SLOT(readData(const QHttpResponseHeader &)));
+
+ connect(&http, SIGNAL(requestFinished(int, bool)),
+ this, SLOT(finished(int, bool)));
+
+ connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch()));
+ connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch()));
+ connect(abortButton, SIGNAL(clicked()), &http, SLOT(abort()));
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+
+ QHBoxLayout *hboxLayout = new QHBoxLayout;
+
+ hboxLayout->addWidget(lineEdit);
+ hboxLayout->addWidget(fetchButton);
+ hboxLayout->addWidget(abortButton);
+
+ layout->addLayout(hboxLayout);
+ layout->addWidget(treeWidget);
+
+ setWindowTitle(tr("RSS listing example"));
+}
+
+/*
+ Starts fetching data from a news source specified in the line
+ edit widget.
+
+ The line edit is made read only to prevent the user from modifying its
+ contents during the fetch; this is only for cosmetic purposes.
+ The fetch button is disabled, and the abort button is enabled to allow
+ the user to interrupt processing. The list view is cleared, and we
+ define the last list view item to be 0, meaning that there are no
+ existing items in the list.
+
+ We reset the flag used to determine whether parsing should begin again
+ or continue. A new handler is created, if required, and made available
+ to the reader.
+
+ The HTTP handler is supplied with the raw contents of the line edit and
+ a fetch is initiated. We keep the ID value returned by the HTTP handler
+ for future reference.
+*/
+
+void RSSListing::fetch()
+{
+ lineEdit->setReadOnly(true);
+ fetchButton->setEnabled(false);
+ abortButton->setEnabled(true);
+ treeWidget->clear();
+
+ lastItemCreated = 0;
+
+ newInformation = true;
+
+ if (handler != 0)
+ delete handler;
+ handler = new Handler;
+
+//! [0]
+ xmlReader.setContentHandler(handler);
+ xmlReader.setErrorHandler(handler);
+//! [0]
+
+ connect(handler, SIGNAL(newItem(QString &, QString &)),
+ this, SLOT(addItem(QString &, QString &)));
+
+ QUrl url(lineEdit->text());
+
+ http.setHost(url.host());
+ connectionId = http.get(url.path());
+}
+
+/*
+ Reads data received from the RDF source.
+
+ We read all the available data, and pass it to the XML
+ input source. The first time we receive new information,
+ the reader is set up for a new incremental parse;
+ we continue parsing using a different function on
+ subsequent calls involving the same data source.
+
+ If parsing fails for any reason, we abort the fetch.
+*/
+
+//! [1]
+void RSSListing::readData(const QHttpResponseHeader &resp)
+{
+ bool ok;
+
+ if (resp.statusCode() != 200)
+ http.abort();
+ else {
+ xmlInput.setData(http.readAll());
+
+ if (newInformation) {
+ ok = xmlReader.parse(&xmlInput, true);
+ newInformation = false;
+ }
+ else
+ ok = xmlReader.parseContinue();
+
+ if (!ok)
+ http.abort();
+ }
+}
+//! [1]
+
+/*
+ Finishes processing an HTTP request.
+
+ The default behavior is to keep the text edit read only.
+
+ If an error has occurred, the user interface is made available
+ to the user for further input, allowing a new fetch to be
+ started.
+
+ If the HTTP get request has finished, we perform a final
+ parsing operation on the data returned to ensure that it was
+ well-formed. Whether this is successful or not, we make the
+ user interface available to the user for further input.
+*/
+
+void RSSListing::finished(int id, bool error)
+{
+ if (error) {
+ qWarning("Received error during HTTP fetch.");
+ lineEdit->setReadOnly(false);
+ abortButton->setEnabled(false);
+ fetchButton->setEnabled(true);
+ }
+ else if (id == connectionId) {
+
+ bool ok = xmlReader.parseContinue();
+ if (!ok)
+ qWarning("Parse error at the end of input.");
+
+ lineEdit->setReadOnly(false);
+ abortButton->setEnabled(false);
+ fetchButton->setEnabled(true);
+ }
+}
+
+/*
+ Adds an item to the list view as it is reported by the handler.
+
+ We keep a record of the last item created to ensure that the
+ items are created in sequence.
+*/
+
+void RSSListing::addItem(QString &title, QString &link)
+{
+ QTreeWidgetItem *item;
+
+ item = new QTreeWidgetItem(treeWidget, lastItemCreated);
+ item->setText(0, title);
+ item->setText(1, link);
+
+ lastItemCreated = item;
+}
+
diff --git a/doc/src/snippets/xml/rsslisting/rsslisting.h b/doc/src/snippets/xml/rsslisting/rsslisting.h
new file mode 100644
index 0000000..203d5f3
--- /dev/null
+++ b/doc/src/snippets/xml/rsslisting/rsslisting.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RSSLISTING_H
+#define RSSLISTING_H
+
+#include <QHttp>
+#include <QWidget>
+#include <QXmlInputSource>
+#include <QXmlSimpleReader>
+
+#include "handler.h"
+
+class QLineEdit;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QPushButton;
+
+class RSSListing : public QWidget
+{
+ Q_OBJECT
+public:
+ RSSListing(QWidget *widget = 0);
+
+public slots:
+ void addItem(QString &title, QString &link);
+ void fetch();
+ void finished(int id, bool error);
+ void readData(const QHttpResponseHeader &);
+
+private:
+ Handler *handler;
+ QXmlInputSource xmlInput;
+ QXmlSimpleReader xmlReader;
+
+ bool newInformation;
+
+ QHttp http;
+ int connectionId;
+
+ QLineEdit *lineEdit;
+ QTreeWidget *treeWidget;
+ QTreeWidgetItem *lastItemCreated;
+ QPushButton *abortButton;
+ QPushButton *fetchButton;
+};
+
+#endif
+
diff --git a/doc/src/snippets/xml/simpleparse/handler.cpp b/doc/src/snippets/xml/simpleparse/handler.cpp
new file mode 100644
index 0000000..440f6be
--- /dev/null
+++ b/doc/src/snippets/xml/simpleparse/handler.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+handler.cpp
+
+Provides a handler for processing XML elements found by the reader.
+
+The handler stores the names of elements it finds and their indentation
+levels. The indentation level is initially set to zero.
+When a starting element is found, the indentation level is increased;
+when an ending element is found, the indentation level is decreased.
+*/
+
+#include <QDebug>
+#include "handler.h"
+
+/*!
+ Reset the state of the handler to ensure that new documents are
+ read correctly.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::startDocument()
+{
+ elementName.clear();
+ elementIndentation.clear();
+ indentationLevel = 0;
+
+ return true;
+}
+
+/*!
+ Process each starting element in the XML document.
+
+ Append the element name to the list of elements found; add its
+ corresponding indentation level to the list of indentation levels.
+
+ Increase the level of indentation by one column.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::startElement(const QString &, const QString &,
+ const QString & qName, const QXmlAttributes &)
+{
+ elementName.append(qName);
+ elementIndentation.append(indentationLevel);
+ indentationLevel += 1;
+
+ return true;
+}
+
+/*!
+ Process each ending element in the XML document.
+
+ Decrease the level of indentation by one column.
+
+ We return true to indicate that parsing should continue.
+*/
+
+bool Handler::endElement(const QString &, const QString &,
+ const QString &)
+{
+ indentationLevel -= 1;
+
+ return true;
+}
+
+/*!
+ Report a fatal parsing error, and return false to indicate to the reader
+ that parsing should stop.
+*/
+
+bool Handler::fatalError (const QXmlParseException & exception)
+{
+ qWarning() << QString("Fatal error on line %1, column %2: %3").arg(
+ exception.lineNumber()).arg(exception.columnNumber()).arg(
+ exception.message());
+
+ return false;
+}
+
+/*!
+ Return the list of element names found.
+*/
+
+QStringList& Handler::names ()
+{
+ return elementName;
+}
+
+/*!
+ Return the list of indentations used for each element found.
+*/
+
+QList<int>& Handler::indentations ()
+{
+ return elementIndentation;
+}
diff --git a/doc/src/snippets/xml/simpleparse/handler.h b/doc/src/snippets/xml/simpleparse/handler.h
new file mode 100644
index 0000000..c69c919
--- /dev/null
+++ b/doc/src/snippets/xml/simpleparse/handler.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HANDLER_H
+#define HANDLER_H
+
+#include <qstring.h>
+#include <qxml.h>
+
+class Handler : public QXmlDefaultHandler
+{
+public:
+ bool startDocument();
+ bool startElement(const QString &, const QString &, const QString &qName,
+ const QXmlAttributes &);
+ bool endElement(const QString &, const QString &, const QString &);
+
+ bool fatalError(const QXmlParseException &exception);
+
+ QStringList& names();
+ QList<int>& indentations();
+
+private:
+ int indentationLevel;
+ QStringList elementName;
+ QList<int> elementIndentation;
+};
+
+#endif
+
diff --git a/doc/src/snippets/xml/simpleparse/main.cpp b/doc/src/snippets/xml/simpleparse/main.cpp
new file mode 100644
index 0000000..e3a7b32
--- /dev/null
+++ b/doc/src/snippets/xml/simpleparse/main.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qfile.h>
+#include <qxml.h>
+#include "handler.h"
+
+#include <iostream>
+
+int main(int argc, char **argv)
+{
+ if (argc != 2) {
+ std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
+ return 1;
+ }
+
+ QFile *file = new QFile(argv[1]);
+
+//! [0]
+ QXmlSimpleReader xmlReader;
+ QXmlInputSource *source = new QXmlInputSource(file);
+//! [0]
+
+//! [1]
+ Handler *handler = new Handler;
+ xmlReader.setContentHandler(handler);
+ xmlReader.setErrorHandler(handler);
+//! [1]
+
+//! [2]
+ bool ok = xmlReader.parse(source);
+
+ if (!ok)
+ std::cout << "Parsing failed." << std::endl;
+//! [2]
+ else {
+ QStringList names = handler->names();
+ QList<int> indentations = handler->indentations();
+
+ int items = names.count();
+
+ for (int i = 0; i < items; ++i) {
+ for (int j = 0; j < indentations[i]; ++j)
+ std::cout << " ";
+ std::cout << names[i].toLocal8Bit().constData() << std::endl;
+ }
+ }
+
+ return 0;
+}
diff --git a/doc/src/snippets/xml/simpleparse/simpleparse.pro b/doc/src/snippets/xml/simpleparse/simpleparse.pro
new file mode 100644
index 0000000..fbea770
--- /dev/null
+++ b/doc/src/snippets/xml/simpleparse/simpleparse.pro
@@ -0,0 +1,4 @@
+HEADERS = handler.h
+SOURCES = handler.cpp \
+ main.cpp
+QT += xml
diff --git a/doc/src/snippets/xml/xml.pro b/doc/src/snippets/xml/xml.pro
new file mode 100644
index 0000000..a321bad
--- /dev/null
+++ b/doc/src/snippets/xml/xml.pro
@@ -0,0 +1,8 @@
+### A qmake file for the snippets. *** This is not for distribution. ***
+#
+# The snippets that don't work are commented out.
+
+TEMPLATE = subdirs
+SUBDIRS = prettyprint
+# rsslisting
+# simpleparse
diff --git a/doc/src/sql-driver.qdoc b/doc/src/sql-driver.qdoc
new file mode 100644
index 0000000..8a33760
--- /dev/null
+++ b/doc/src/sql-driver.qdoc
@@ -0,0 +1,762 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page sql-driver.html
+ \title SQL Database Drivers
+ \ingroup architecture
+ \brief How to configure and install QtSql drivers for supported databases.
+
+ The QtSql module uses driver \l{How to Create Qt
+ Plugins}{plugins} to communicate with the different database
+ APIs. Since Qt's SQL Module API is database-independent, all
+ database-specific code is contained within these drivers. Several
+ drivers are supplied with Qt and other drivers can be added. The
+ driver source code is supplied and can be used as a model for
+ \l{#development}{writing your own drivers}.
+
+ \tableofcontents
+
+ \section1 Supported Databases
+
+ The table below lists the drivers included with Qt. Due to
+ license incompatibilities with the GPL, not all of the plugins
+ are provided with Open Source Versions of Qt.
+
+ \table
+ \header \o Driver name \o DBMS
+ \row \o \link #QDB2 QDB2\endlink \o IBM DB2 (version 7.1 and above)
+ \row \o \link #QIBASE QIBASE\endlink \o Borland InterBase
+ \row \o \link #QMYSQL QMYSQL\endlink \o MySQL
+ \row \o \link #QOCI QOCI\endlink \o Oracle Call Interface Driver
+ \row \o \link #QODBC QODBC\endlink
+ \o Open Database Connectivity (ODBC) - Microsoft SQL Server and other
+ ODBC-compliant databases
+ \row \o \link #QPSQL QPSQL\endlink \o PostgreSQL (versions 7.3 and above)
+ \row \o \link #QSQLITE2 QSQLITE2\endlink \o SQLite version 2
+ \row \o \link #QSQLITE QSQLITE\endlink \o SQLite version 3
+ \row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server
+ \endtable
+
+ \bold{Note:} To build a driver plugin you need to have the appropriate
+ client library for your Database Management System (DBMS). This provides
+ access to the API exposed by the DBMS, and is typically shipped with it.
+ Most installation programs also allow you to install "development
+ libraries", and these are what you need. These libraries are responsible
+ for the low-level communication with the DBMS.
+
+ \target building
+ \section1 Building the Drivers Using Configure
+
+ On Unix and Mac OS X, the Qt \c configure script tries to
+ automatically detect the available client libraries on your
+ machine. Run \c{configure -help} to see what drivers can be
+ built. You should get an output similar to this:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 0
+
+ The \c configure script cannot detect the neccessary libraries
+ and include files if they are not in the standard paths, so it
+ may be necessary to specify these paths using the \c -I and \c -L
+ command-line options. For example, if your MySQL include files
+ are installed in \c /usr/local/mysql (or in \c{C:\mysql\include}
+ on Windows), then pass the following parameter to configure: \c
+ -I/usr/local/mysql (or \c{-I C:\mysql\include} for Windows).
+
+ On Windows the \c -I parameter doesn't accept spaces in
+ filenames, so use the 8.3 name instead; for example, use
+ \c{C:\progra~1\mysql} instead of \c{C:\Program Files\mysql}.
+
+ Use the \c{-qt-sql-<driver>} parameter to build the database driver
+ statically into your Qt library or \c{-plugin-sql-<driver>} to build
+ the driver as a plugin. Look at the sections that follow for
+ additional information about required libraries.
+
+ \target buildingmanually
+ \section1 Building the Plugins Manually
+
+ \target QMYSQL
+ \section2 QMYSQL for MySQL 4 and higher
+
+ \section3 QMYSQL Stored Procedure Support
+
+ MySQL 5 introduces stored procedure support at the SQL level, but no
+ API to control IN, OUT and INOUT parameters. Therefore, parameters
+ have to be set and read using SQL commands instead of QSqlQuery::bindValue().
+
+ Example stored procedure:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 1
+
+ Source code to access the OUT values:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 2
+
+ \bold{Note:} \c{@outval1} and \c{@outval2} are variables local to the current
+ connection and will not be affected by queries sent from another host
+ or connection.
+
+ \section3 Embedded MySQL Server
+
+ The MySQL embedded server is a drop-in replacement for the normal
+ client library. With the embedded MySQL server, a MySQL server is
+ not required to use MySQL functionality.
+
+ To use the embedded MySQL server, simply link the Qt plugin to \c
+ libmysqld instead of libmysqlclient. This can be done by replacing
+ \c -lmysqlclient_r by \c -lmysqld in the \c qmake command in the
+ section below.
+
+ Please refer to the MySQL documentation, chapter "libmysqld, the Embedded
+ MySQL Server Library" for more information about the MySQL embedded server.
+
+ \section3 How to Build the QMYSQL Plugin on Unix and Mac OS X
+
+ You need the MySQL header files and as well as the shared library
+ \c{libmysqlclient.so}. Depending on your Linux distribution you may
+ need to install a package which is usually called "mysql-devel".
+
+ Tell \l qmake where to find the MySQL header files and shared
+ libraries (here it is assumed that MySQL is installed in
+ \c{/usr/local}) and run \c{make}:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 3
+
+ After installing Qt, as described in the \l{Installing Qt on X11
+ Platforms} document, you also need to install the plugin in the
+ standard location:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 4
+
+ \section3 How to Build the QMYSQL Plugin on Windows
+
+ You need to get the MySQL installation files. Run \c SETUP.EXE and
+ choose "Custom Install". Install the "Libs & Include Files" Module.
+ Build the plugin as follows (here it is assumed that MySQL is
+ installed in \c{C:\MySQL}):
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 5
+
+ If you are not using a Microsoft compiler, replace \c nmake with \c
+ make in the line above.
+
+ \note This database plugin is not supported for Windows CE.
+
+ \note Including \c{"-o Makefile"} as an argument to \l qmake to
+ tell it where to build the makefile can cause the plugin to be
+ built in release mode only. If you are expecting a debug version
+ to be built as well, don't use the \c{"-o Makefile"} option.
+
+ \target QOCI
+ \section2 QOCI for the Oracle Call Interface (OCI)
+
+ \section3 General Information about the OCI plugin
+
+ The Qt OCI plugin supports Oracle 9i, 10g and higher. After
+ connecting to the Oracle server, the plugin will auto-detect the
+ database version and enable features accordingly.
+
+ It's possible to connect to a Oracle database without a tnsnames.ora file.
+ This requires that the database SID is passed to the driver as the database
+ name and that a hostname is given.
+
+ \section3 OCI User Authentication
+
+ The Qt OCI plugin supports authentication using
+ external credentials (OCI_CRED_EXT). Usually, this means that the database
+ server will use the user authentication provided by the operating system
+ instead of its own authentication mechanism.
+
+ Leave the username and password empty when opening a connection with
+ QSqlDatabase to use the external credentials authentication.
+
+ \section3 OCI BLOB/LOB Support
+
+ Binary Large Objects (BLOBs) can be read and written, but be aware
+ that this process may require a lot of memory. You should use a forward
+ only query to select LOB fields (see QSqlQuery::setForwardOnly()).
+
+ Inserting BLOBs should be done using either a prepared query where the
+ BLOBs are bound to placeholders or QSqlTableModel, which uses a prepared
+ query to do this internally.
+
+ \section3 How to Build the OCI Plugin on Unix and Mac OS X
+
+ For Oracle 10g, all you need is the "Instant Client Package - Basic" and
+ "Instant Client Package - SDK". For Oracle prior to 10g, you require
+ the standard Oracle client and the SDK packages.
+
+ Oracle library files required to build the driver:
+
+ \list
+ \i \c libclntsh.so (all versions)
+ \i \c libwtc9.so (only Oracle 9)
+ \endlist
+
+ Tell \c qmake where to find the Oracle header files and shared
+ libraries and run make:
+
+ For Oracle version 9:
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 6
+
+ For Oracle version 10, we assume that you installed the RPM packages of the
+ Instant Client Package SDK (you need to adjust the version number accordingly):
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 7
+
+ \bold{Note:} If you are using the Oracle Instant Client package,
+ you will need to set LD_LIBRARY_PATH when building the OCI SQL plugin
+ and when running an applicaiton that uses the OCI SQL plugin. You can
+ avoid this requirement by setting and RPATH and listing all of the
+ libraries to link to. Here is an example:
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 32
+
+ If you wish to build the OCI plugin manually with this method the procedure looks like this:
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 33
+
+ \section3 How to Build the OCI Plugin on Windows
+
+ Choosing the option "Programmer" in the Oracle Client Installer from
+ the Oracle Client Installation CD is sufficient to build the plugin.
+
+ Build the plugin as follows (here it is assumed that Oracle Client is
+ installed in \c{C:\oracle}):
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 8
+
+ If you are not using a Microsoft compiler, replace \c nmake with \c
+ make in the line above.
+
+ When you run your application you will also need to add the \c oci.dll
+ path to your \c PATH environment variable:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 9
+
+ \bold{Note:} This database plugin is not supported for Windows CE.
+
+ \target QODBC
+ \section2 QODBC for Open Database Connectivity (ODBC)
+
+ \section3 General Information about the ODBC plugin
+
+ ODBC is a general interface that allows you to connect to multiple
+ DBMSs using a common interface. The QODBC driver allows you to connect
+ to an ODBC driver manager and access the available data sources. Note
+ that you also need to install and configure ODBC drivers for the ODBC
+ driver manager that is installed on your system. The QODBC plugin
+ then allows you to use these data sources in your Qt applications.
+
+ \bold{Note:} You should use native drivers in preference to the ODBC
+ driver where they are available. ODBC support can be used as a fallback
+ for compliant databases if no native drivers are available.
+
+ On Windows an ODBC driver manager should be installed by default.
+ For Unix systems there are some implementations which must be
+ installed first. Note that every client that uses your application is
+ required to have an ODBC driver manager installed, otherwise the
+ QODBC plugin will not work.
+
+ Be aware that when connecting to an ODBC datasource you must pass in
+ the name of the ODBC datasource to the QSqlDatabase::setDatabaseName()
+ function rather than the actual database name.
+
+ The QODBC Plugin needs an ODBC compliant driver manager version 2.0 or
+ later to work. Some ODBC drivers claim to be version 2.0 compliant,
+ but do not offer all the necessary functionality. The QODBC plugin
+ therefore checks whether the data source can be used after a
+ connection has been established and refuses to work if the check
+ fails. If you don't like this behavior, you can remove the \c{#define
+ ODBC_CHECK_DRIVER} line from the file \c{qsql_odbc.cpp}. Do this at
+ your own risk!
+
+ By default, Qt instructs the ODBC driver to behave as an ODBC 2.x
+ driver. However, for some \e{driver-manager/ODBC 3.x-driver}
+ combinations (e.g., \e{unixODBC/MaxDB ODBC}), telling the ODBC
+ driver to behave as a 2.x driver can cause the driver plugin to
+ have unexpected behavior. To avoid this problem, instruct the ODBC
+ driver to behave as a 3.x driver by
+ \l{QSqlDatabase::setConnectOptions()} {setting the connect option}
+ \c{"SQL_ATTR_ODBC_VERSION=SQL_OV_ODBC3"} before you
+ \l{QSqlDatabase::open()} {open your database connection}. Note
+ that this will affect multiple aspects of ODBC driver behavior,
+ e.g., the SQLSTATEs. Before setting this connect option, consult
+ your ODBC documentation about behavior differences you can expect.
+
+ If you experience very slow access of the ODBC datasource, make sure
+ that ODBC call tracing is turned off in the ODBC datasource manager.
+
+ Some drivers don't support scrollable cursors. In that case case only
+ queries in forwardOnly mode can be used successfully.
+
+ \section3 ODBC Stored Procedure Support
+
+ With Microsoft SQL Server the result set returned by a stored
+ procedure that uses the return statement, or returns multiple result
+ sets, will be accessible only if you set the query's forward only
+ mode to \e forward using \l QSqlQuery::setForwardOnly().
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 10
+
+ \bold{Note:} The value returned by the stored procedure's return statement
+ is discarded.
+
+ \section3 ODBC Unicode Support
+
+ The QODBC Plugin will use the Unicode API if UNICODE is defined. On
+ Windows NT based systems, this is the default. Note that the ODBC
+ driver and the DBMS must also support Unicode.
+
+ Some driver managers and drivers don't support UNICODE. To use the
+ QODBC plugin with such drivers it has to be compiled with the
+ Q_ODBC_VERSION_2 defined.
+
+ For the Oracle 9 ODBC driver (Windows), it is neccessary to check
+ "SQL_WCHAR support" in the ODBC driver manager otherwise Oracle
+ will convert all Unicode strings to local 8-bit.
+
+ \section3 How to Build the ODBC Plugin on Unix and Mac OS X
+
+ It is recommended that you use unixODBC. You can find the latest
+ version and ODBC drivers at \l http://www.unixodbc.org.
+ You need the unixODBC header files and shared libraries.
+
+ Tell \c qmake where to find the unixODBC header files and shared
+ libraries (here it is assumed that unixODBC is installed in
+ \c{/usr/local/unixODBC}) and run \c{make}:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 11
+
+ \section3 How to Build the ODBC Plugin on Windows
+
+ The ODBC header and include files should already be installed in the
+ right directories. You just have to build the plugin as follows:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 12
+
+ If you are not using a Microsoft compiler, replace \c nmake with \c
+ make in the line above.
+
+ \bold{Note:} This database plugin is not officially supported for Windows CE.
+
+ \target QPSQL
+ \section2 QPSQL for PostgreSQL (Version 7.3 and Above)
+
+ \section3 General Information about the QPSQL driver
+
+ The QPSQL driver supports version 7.3 and higher of the PostgreSQL server.
+ We recommend that you use a client library from version 7.3.15, 7.4.13,
+ 8.0.8, 8.1.4 or more recent as these versions contain security fixes, and
+ as the QPSQL driver might not build with older versions of the client
+ library depending on your platform.
+
+ For more information about PostgreSQL visit \l http://www.postgresql.org.
+
+ \section3 QPSQL Unicode Support
+
+ The QPSQL driver automatically detects whether the PostgreSQL
+ database you are connecting to supports Unicode or not. Unicode is
+ automatically used if the server supports it. Note that the driver
+ only supports the UTF-8 encoding. If your database uses any other
+ encoding, the server must be compiled with Unicode conversion
+ support.
+
+ Unicode support was introduced in PostgreSQL version 7.1 and it will
+ only work if both the server and the client library have been compiled
+ with multibyte support. More information about how to set up a
+ multibyte enabled PostgreSQL server can be found in the PostgreSQL
+ Administrator Guide, Chapter 5.
+
+ \section3 QPSQL BLOB Support
+
+ Binary Large Objects are supported through the \c BYTEA field type in
+ PostgreSQL server versions >= 7.1.
+
+ \section3 How to Build the QPSQL Plugin on Unix and Mac OS X
+
+ You need the PostgreSQL client library and headers installed.
+
+ To make \c qmake find the PostgreSQL header files and shared
+ libraries, run \c qmake the following way (assuming that the
+ PostgreSQL client is installed in \c{/usr}):
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 13
+
+ After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ you also need to install the plugin in the standard location:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 14
+
+ \section3 How to Build the QPSQL Plugin on Windows
+
+ Install the appropriate PostgreSQL developer libraries for your
+ compiler. Assuming that PostgreSQL was installed in \c{C:\psql},
+ build the plugin as follows:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 15
+
+ Users of MinGW may wish to consult the following online document:
+ \l{Compiling PostgreSQL On Native Win32 FAQ}.
+
+ \bold{Note:} This database plugin is not supported for Windows CE.
+
+ \target QTDS
+ \section2 QTDS for Sybase Adaptive Server
+ \section3 General Information about QTDS
+
+ It is not possible to set the port with QSqlDatabase::setPort() due to limitations in the
+ Sybase client library. Refer to the Sybase documentation for information on how to set up
+ a Sybase client configuration file to enable connections to databases on non-default ports.
+
+ \section3 How to Build the QDTS Plugin on Unix and Mac OS X
+
+ Under Unix, two libraries are available which support the TDS protocol:
+
+ \list
+ \i FreeTDS, a free implementation of the TDS protocol
+ (\l{http://www.freetds.org}). Note that FreeTDS is not yet stable,
+ so some functionality may not work as expected.
+
+ \i Sybase Open Client, available from \l{http://www.sybase.com}.
+ Note for Linux users: Get the Open Client RPM from
+ \l{http://linux.sybase.com}.
+ \endlist
+
+ Regardless of which library you use, the shared object file
+ \c{libsybdb.so} is needed. Set the \c SYBASE environment variable to
+ point to the directory where you installed the client library and
+ execute \c{qmake}:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 16
+
+ \section3 How to Build the QDTS Plugin on Windows
+
+ You can either use the DB-Library supplied by Microsoft or the Sybase
+ Open Client (\l{http://www.sybase.com}). You must include \c
+ NTWDBLIB.LIB to build the plugin:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 17
+
+ By default the Microsoft library is used on Windows, if you want to
+ force the use of the Sybase Open Client, you must define \c
+ Q_USE_SYBASE in \c{%QTDIR%\src\sql\drivers\tds\qsql_tds.cpp}. If you
+ are not using a Microsoft compiler, replace \c nmake with \c make in
+ the line above.
+
+ \bold{Note:} This database plugin is not supported for Windows CE.
+
+ \target QDB2
+ \section2 QDB2 for IBM DB2 (Version 7.1 and Above)
+
+ \section3 General Information about QDB2
+
+ The Qt DB2 plugin makes it possible to access IBM DB2 databases. It
+ has been tested with IBM DB2 v7.1 and 7.2. You must install the IBM
+ DB2 development client library, which contains the header and library
+ files necessary for compiling the QDB2 plugin.
+
+ The QDB2 driver supports prepared queries, reading/writing of Unicode
+ strings and reading/writing of BLOBs.
+
+ We suggest using a forward-only query when calling stored procedures
+ in DB2 (see QSqlQuery::setForwardOnly()).
+
+ \section3 How to Build the QDB2 Plugin on Unix and Mac OS X
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 18
+
+ After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ you also need to install the plugin in the standard location:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 19
+
+ \section3 How to Build the QDB2 Plugin on Windows
+
+ The DB2 header and include files should already be installed in the
+ right directories. You just have to build the plugin as follows:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 20
+
+ If you are not using a Microsoft compiler, replace \c nmake
+ with \c make in the line above.
+
+ \bold{Note:} This database plugin is not supported for Windows CE.
+
+ \target QSQLITE2
+ \section2 QSQLITE2 for SQLite Version 2
+
+ The Qt SQLite 2 plugin is offered for compatibility. Whenever
+ possible, use the \l{#QSQLITE}{version 3 plugin} instead. The
+ build instructions for version 3 apply to version 2 as well.
+
+ \target QSQLITE
+ \section2 QSQLITE for SQLite (Version 3 and Above)
+
+ \section3 General Information about QSQLITE
+
+ The Qt SQLite plugin makes it possible to access SQLite
+ databases. SQLite is an in-process database, which means that it
+ is not necessary to have a database server. SQLite operates on a
+ single file, which must be set as the database name when opening
+ a connection. If the file does not exist, SQLite will try to
+ create it. SQLite also supports in-memory databases, simply pass
+ ":memory:" as the database name.
+
+ SQLite has some restrictions regarding multiple users and
+ multiple transactions. If you try to read/write on a resource from different
+ transactions, your application might freeze until one transaction commits
+ or rolls back. The Qt SQLite driver will retry to write to a locked resource
+ until it runs into a timeout (see \c{QSQLITE_BUSY_TIMEOUT}
+ at QSqlDatabase::setConnectOptions()).
+
+ In SQLite any column, with the exception of an INTEGER PRIMARY KEY column,
+ may be used to store any type of value. For instance, a column declared as
+ INTEGER may contain an integer value in one row and a text value in the
+ next. This is due to SQLite associating the type of a value with the value
+ itself rather than with the column it is stored in. A consequence of this
+ is that the type returned by QSqlField::type() only indicates the field's
+ recommended type. No assumption of the actual type should be made from
+ this and the type of the individual values should be checked.
+
+ The driver is locked for updates while a select is executed. This
+ may cause problems when using QSqlTableModel because Qt's item views
+ fetch data as needed (with QSqlQuery::fetchMore() in the case of
+ QSqlTableModel).
+
+ You can find information about SQLite on \l{http://www.sqlite.org}.
+
+ \section3 How to Build the QSQLITE Plugin
+
+ SQLite version 3 is included as a third-party library within Qt.
+ It can be built by passing the following parameters to the
+ configure script: \c{-plugin-sql-sqlite} (build as a plugin) or
+ \c{-qt-sql-sqlite} (linked directly into the Qt library).
+
+ If you don't want to use the SQLite library included with Qt, you
+ can build it manually (replace \c $SQLITE by the directory where
+ SQLite resides):
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 21
+
+ After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document,
+ you also need to install the plugin in the standard location:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 22
+
+ On Windows:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 23
+
+ \section3 QSQLITE File Format Compatibility
+
+ SQLite minor releases sometimes break file format forward compatibility.
+ For example, SQLite 3.3 can read database files created with SQLite 3.2,
+ but databases created with SQLite 3.3 cannot be read by SQLite 3.2.
+ Please refer to the SQLite documentation and change logs for information about
+ file format compatibility between versions.
+
+ Qt minor releases usually follow the SQLite minor releases, while Qt patch releases
+ follow SQLite patch releases. Patch releases are therefore both backward and forward
+ compatible.
+
+ To force SQLite to use a specific file format, it is neccessary to build and
+ ship your own database plugin with your own SQLite library as illustrated above.
+ Some versions of SQLite can be forced to write a specific file format by setting
+ the \c{SQLITE_DEFAULT_FILE_FORMAT} define when building SQLite.
+
+ \target QIBASE
+ \section2 QIBASE for Borland InterBase
+
+ \section3 General Information about QIBASE
+
+ The Qt InterBase plugin makes it possible to access the InterBase and
+ Firebird databases. InterBase can either be used as a client/server or
+ without a server in which case it operates on local files. The
+ database file must exist before a connection can be established.
+
+ Note that InterBase requires you to specify the full path to the
+ database file, no matter whether it is stored locally or on another
+ server.
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 24
+
+ You need the InterBase/Firebird development headers and libraries
+ to build this plugin.
+
+ Due to license incompatibilities with the GPL, users of the Qt Open Source
+ Edition are not allowed to link this plugin to the commercial editions of
+ InterBase. Please use Firebird or the free edition of InterBase.
+
+ \section3 QIBASE Unicode Support and Text Encoding
+
+ By default the driver connects to the database using UNICODE_FSS. This can
+ be overridden by setting the ISC_DPB_LC_CTYPE parameter with
+ QSqlDatabase::setConnectOptions() before opening the connection.
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 25
+
+ If Qt doesn't support the given text encoding the driver will issue a
+ warning message and connect to the database using UNICODE_FSS.
+
+ Note that if the text encoding set when connecting to the database is
+ not the same as in the database, problems with transliteration might arise.
+
+ \section3 QIBASE Stored procedures
+
+ InterBase/Firebird return OUT values as result set, so when calling stored
+ procedure, only IN values need to be bound via QSqlQuery::bindValue(). The
+ RETURN/OUT values can be retrieved via QSqlQuery::value(). Example:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 26
+
+ \section3 How to Build the QIBASE Plugin on Unix and Mac OS X
+
+ The following assumes InterBase or Firebird is installed in
+ \c{/opt/interbase}:
+
+ If you are using InterBase:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 27
+
+ If you are using Firebird, the Firebird library has to be set explicitly:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 28
+
+ \section3 How to Build the QIBASE Plugin on Windows
+
+ The following assumes InterBase or Firebird is installed in
+ \c{C:\interbase}:
+
+ If you are using InterBase:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 29
+
+ If you are using Firebird, the Firebird library has to be set explicitely:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 30
+
+ If you are not using a Microsoft compiler, replace \c nmake
+ with \c make in the line above.
+
+ Note that \c{C:\interbase\bin} must be in the \c PATH.
+
+ \bold{Note:} This database plugin is not supported for Windows CE.
+
+ \target troubleshooting
+ \section1 Troubleshooting
+
+ You should always use client libraries that have been compiled with
+ the same compiler as you are using for your project. If you cannot get
+ a source distibution to compile the client libraries yourself, you
+ must make sure that the pre-compiled library is compatible with
+ your compiler, otherwise you will get a lot of "undefined symbols"
+ errors. Some compilers have tools to convert libraries, e.g. Borland
+ ships the tool \c{COFF2OMF.EXE} to convert libraries that have been
+ generated with Microsoft Visual C++.
+
+ If the compilation of a plugin succeeds but it cannot be loaded,
+ make sure that the following requirements are met:
+
+ \list
+ \i Ensure that you are using a shared Qt library; you cannot use the
+ plugins with a static build.
+ \i Ensure that the plugin is in the correct directory. You can use
+ QApplication::libraryPaths() to determine where Qt looks for plugins.
+ \i Ensure that the client libraries of the DBMS are available on the
+ system. On Unix, run the command \c{ldd} and pass the name of the
+ plugin as parameter, for example \c{ldd libqsqlmysql.so}. You will
+ get a warning if any of the client libraries couldn't be found.
+ On Windows, you can use Visual Studio's dependency walker.
+ \i Compile Qt with \c{QT_DEBUG_COMPONENT} defined to get very verbose
+ debug output when loading plugins.
+ \endlist
+
+ If you experience plugin load problems and see output like this:
+
+ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 31
+
+ The problem is usually that the plugin had the wrong \l{How to
+ Create Qt Plugins#The Build Key}{build key}. This might require
+ removing an entry from the \l{How to Create Qt Plugins#The Plugin
+ Cache} {plugin cache}. Here is some more \l{How to Create Qt
+ Plugins#Debugging Plugins} {plugin debugging info}.
+
+ \target development
+ \section1 How to Write Your Own Database Driver
+
+ QSqlDatabase is responsible for loading and managing database driver
+ plugins. When a database is added (see QSqlDatabase::addDatabase()),
+ the appropriate driver plugin is loaded (using QSqlDriverPlugin).
+ QSqlDatabase relies on the driver plugin to provide interfaces for
+ QSqlDriver and QSqlResult.
+
+ QSqlDriver is an abstract base class which defines the functionality
+ of a SQL database driver. This includes functions such as
+ QSqlDriver::open() and QSqlDriver::close(). QSqlDriver is responsible
+ for connecting to a database, establish the proper environment, etc.
+ In addition, QSqlDriver can create QSqlQuery objects appropriate for
+ the particular database API. QSqlDatabase forwards many of its
+ function calls directly to QSqlDriver which provides the concrete
+ implementation.
+
+ QSqlResult is an abstract base class which defines the functionality
+ of a SQL database query. This includes statements such as \c{SELECT},
+ \c{UPDATE}, and \c{ALTER} \c{TABLE}. QSqlResult contains functions
+ such as QSqlResult::next() and QSqlResult::value(). QSqlResult is
+ responsible for sending queries to the database, returning result
+ data, etc. QSqlQuery forwards many of its function calls directly to
+ QSqlResult which provides the concrete implementation.
+
+ QSqlDriver and QSqlResult are closely connected. When implementing a
+ Qt SQL driver, both of these classes must to be subclassed and the
+ abstract virtual methods in each class must be implemented.
+
+ To implement a Qt SQL driver as a plugin (so that it is
+ recognized and loaded by the Qt library at runtime), the driver
+ must use the Q_EXPORT_PLUGIN2() macro. Read \l{How to Create Qt
+ Plugins} for more information on this. You can also check out how
+ this is done in the SQL plugins that are provided with Qt in
+ \c{QTDIR/src/plugins/sqldrivers} and \c{QTDIR/src/sql/drivers}.
+
+ The following code can be used as a skeleton for a SQL driver:
+
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 47
+ \codeline
+ \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 48
+*/
diff --git a/doc/src/styles.qdoc b/doc/src/styles.qdoc
new file mode 100644
index 0000000..9e72416
--- /dev/null
+++ b/doc/src/styles.qdoc
@@ -0,0 +1,2059 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page style-reference.html
+
+ \title Implementing Styles and Style Aware Widgets
+ \ingroup architecture
+ \brief An overview of styles and the styling of widgets.
+
+ \tableofcontents
+
+ \section1 Introduction
+
+ Styles (classes that inherit QStyle) draw on behalf of widgets
+ and encapsulate the look and feel of a GUI. Several styles are
+ built into Qt (e.g., windows style and motif style). Other styles are
+ only available on specific platforms (such as the windows XP style).
+ Custom styles are made available as plugins or by creating an
+ instance of the style class in an application and setting it with
+ QApplication::setStyle().
+
+ To implement a new style, you inherit one of Qt's existing styles
+ - the one most resembling the style you want to create - and
+ reimplement a few virtual functions. This process is somewhat
+ involved, and we therefore provide this overview. We give a
+ step-by-step walkthrough of how to style individual Qt widgets.
+ We will examine the QStyle virtual functions, member variables,
+ and enumerations.
+
+ The part of this document that does not concern the styling of
+ individual widgets is meant to be read sequentially because later
+ sections tend to depend on earlier ones. The description of the
+ widgets can be used for reference while implementing a style.
+ However, you may need to consult the Qt source code in some cases.
+ The sequence in the styling process should become clear after
+ reading this document, which will aid you in locating relevant code.
+
+ To develop style aware widgets (i.e., widgets that conform to
+ the style in which they are drawn), you need to draw them using the
+ current style. This document shows how widgets draw themselves
+ and which possibilities the style gives them.
+
+ \section1 The QStyle implementation
+
+ The API of QStyle contains functions that draw the widgets, static
+ helper functions to do common and difficult tasks (e.g.,
+ calculating the position of slider handles) and functions to do
+ the various calculations necessary while drawing (e.g., for the
+ widgets to calculate their size hints). The style also help some
+ widgets with the layout of their contents. In addition, it creates
+ a QPalette that contains \l{QBrush}es to draw with.
+
+ QStyle draws graphical elements; an element is a widget or a
+ widget part like a push button bevel, a window frame, or a scroll
+ bar. When a widget asks a style to draw an element, it provides the
+ style with a style option, which is a class that contains the
+ information necessary for drawing.
+
+ We will in the course of this section look at the style elements,
+ the style options, and the functions of QStyle. Finally, we describe
+ how the palette is used.
+
+ Items in item views is drawn by \l{Delegate Classes}{delegates} in
+ Qt. The item view headers are still drawn by the style. Qt's
+ default delegate, QStyledItemDelegate, draws its items partially
+ through the current style; it draws the check box indicators and
+ calculate bounding rectangles for the elements of which the item
+ consists. In this document, we only describe how to implement a
+ QStyle subclass. If you wish to add support for other datatypes
+ than those supported by the QStyledItemDelegate, you need to
+ implement a custom delegate. Note that delegates must be set
+ programmatically for each individual widget (i.e., default
+ delegates cannot be provided as plugins).
+
+ \section2 The Style Elements
+
+ A style element is a graphical part of a GUI. A widget consists
+ of a hierarchy (or tree) of style elements. For instance, when a
+ style receives a request to draw a push button (from QPushButton,
+ for example), it draws a label (text and icon), a button bevel,
+ and a focus frame. The button bevel, in turn, consists of a frame
+ around the bevel and two other elements, which we will look at
+ later. Below is a conceptual illustration of the push button
+ element tree. We will see the actual tree for QPushButton when we
+ go through the individual widgets.
+
+ \image javastyle/conceptualpushbuttontree.png
+
+ Widgets are not necessarily drawn by asking the style to draw
+ only one element. Widgets can make several calls to the style to
+ draw different elements. An example is QTabWidget, which draws its
+ tabs and frame individually.
+
+ There are three element types: primitive elements, control
+ elements, and complex control elements. The elements are defined
+ by the \l{QStyle::}{ComplexControl}, \l{QStyle::}{ControlElement},
+ and \l{QStyle::}{PrimitiveElement} enums. The values of
+ each element enum has a prefix to identify their type: \c{CC_} for
+ complex elements, \c{CE_} for control elements, and \c{PE_} for
+ primitive elements. We will in the following three sections see what
+ defines the different elements and see examples of widgets that use
+ them.
+
+ The QStyle class description contains a list of these elements and
+ their roles in styling widgets. We will see how they are used when
+ we style individual widgets.
+
+ \section3 Primitive Elements
+
+ Primitive elements are GUI elements that are common and often used
+ by several widgets. Examples of these are frames, button bevels,
+ and arrows for spin boxes, scroll bars, and combo boxes.
+ Primitive elements cannot exist on their own: they are always part
+ of a larger construct. They take no part in the interaction with
+ the user, but are passive decorations in the GUI.
+
+ \section3 Control Elements
+
+ A control element performs an action or displays information
+ to the user. Examples of control elements are push buttons, check
+ boxes, and header sections in tables and tree views. Control
+ elements are not necessarily complete widgets such as push
+ buttons, but can also be widget parts such as tab bar tabs and
+ scroll bar sliders. They differ from primitive elements in that
+ they are not passive, but fill a function in the interaction with
+ the user. Controls that consist of several elements often use the
+ style to calculate the bounding rectangles of the elements. The
+ available sub elements are defined by the \l{QStyle::}{SubElement}
+ enum. This enum is only used for calculating bounding rectangles,
+ and sub elements are as such not graphical elements to be drawn
+ like primitive, control, and complex elements.
+
+ \section3 Complex Control Elements
+
+ Complex control elements contain sub controls. Complex controls
+ behave differently depending on where the user handles them with
+ the mouse and which keyboard keys are pressed. This is dependent
+ on which sub control (if any) that the mouse is over or received a
+ mouse press. Examples of complex controls are scroll bars and
+ combo boxes. With a scroll bar, you can use the mouse to move the
+ slider and press the line up and line down buttons. The available
+ sub controls are defined by the \l{QStyle}{SubControl} enum.
+
+ In addition to drawing, the style needs to provide the widgets
+ with information on which sub control (if any) a mouse press was
+ made on. For instance, a QScrollBar needs to know if the user
+ pressed the slider, the slider groove, or one of the buttons.
+
+ Note that sub controls are not the same as the control elements
+ described in the previous section. You cannot use the style to
+ draw a sub control; the style will only calculate the bounding
+ rectangle in which the sub control should be drawn. It is common,
+ though, that complex elements use control and primitive elements
+ to draw their sub controls, which is an approach that is
+ frequently used by the built-in styles in Qt and also the Java
+ style. For instance, the Java style uses PE_IndicatorCheckBox to
+ draw the check box in group boxes (which is a sub control of
+ CC_GroupBox). Some sub controls have an equivalent control element,
+ e.g., the scroll bar slider (SC_SCrollBarSlider and
+ CE_ScrollBarSlider).
+
+ \section3 Other QStyle Tasks
+
+ The style elements and widgets, as mentioned, use the style to
+ calculate bounding rectangles of sub elements and sub controls,
+ and pixel metrics, which is a style dependent size in screen
+ pixels, for measures when drawing. The available rectangles and
+ pixel metrics are represented by three enums in QStyle:
+ \l{QStyle::}{SubElement}, \l{QStyle::}{SubControl}, and
+ \l{QStyle::}{PixelMetric}. Values of the enums can easily by
+ identified as they start with SE_, SC_ and PM_.
+
+ The style also contain a set of style hints, which is
+ represented as values in the \l{QStyle::}{StyleHint} enum. All
+ widgets do not have the same functionality and look in the
+ different styles. For instance, when the menu items in a menu do not
+ fit in a single column on the screen, some styles support
+ scrolling while others draw more than one column to fit all items.
+
+ A style usually has a set of standard images (such as a warning, a
+ question, and an error image) for message boxes, file dialogs,
+ etc. QStyle provides the \l{QStyle::}{StandardPixmap} enum. Its
+ values represent the standard images. Qt's widgets use these, so
+ when you implement a custom style you should supply the images
+ used by the style that is being implemented.
+
+ The style calculates the spacing between widgets in layouts. There
+ are two ways the style can handle these calculations. You can set
+ the PM_LayoutHorizontalSpacing and PM_LayoutVerticalSpacing, which
+ is the way the java style does it (through QCommonStyle).
+ Alternatively, you can implement QStyle::layoutSpacing() and
+ QStyle::layoutSpacingImplementation() if you need more control over
+ this part of the layout. In these functions you can calculate the
+ spacing based on control types (QSizePolicy::ControlType) for
+ different size policies (QSizePolicy::Policy) and also the style
+ option for the widget in question.
+
+ \section2 Style Options
+
+ A style option (a class that inherit QStyleOption) stores
+ parameters used by QStyle functions. The sub-classes of
+ QStyleOption contain all information necessary to style the
+ individual widgets. The style options keep public variables for
+ performance reasons. Style options are filled out by the widgets.
+
+ The widgets can be in a number of different states, which are
+ defined by the \l{QStyle::}{State} enum. Some of the state flags have
+ different meanings depending on the widget, but others are common
+ for all widgets like State_Disabled. It is QStyleOption that sets
+ the common states with QStyleOption::init(); the rest of the
+ states are set by the individual widgets.
+
+ Most notably, the style options contain the palette and bounding
+ rectangles of the widgets to be drawn. Most widgets have
+ specialized style options. QPushButton and QCheckBox, for
+ instance, use QStyleOptionButton as style option, which contain
+ the text, icon, and the size of their icon. The exact contents of
+ all options are described when we go through individual widgets.
+
+ \section2 QStyle Functions
+
+ The QStyle class defines three functions for drawing the primitive,
+ control, and complex elements:
+ \l{QStyle::}{drawPrimitive()},
+ \l{QStyle::}{drawControl()}, and
+ \l{QStyle::}{drawComplexControl()}. The functions takes the
+ following parameters:
+
+ \list
+ \o the enum value of the element to draw
+ \o a QStyleOption which contains the information needed to
+ draw the element.
+ \o a QPainter with which to draw the element.
+ \o a pointer to a QWidget, typically the widget
+ that the element is painted on.
+ \endlist
+
+ Not all widgets send a pointer to themselves. If the style
+ option sent to the function does not contain the information you
+ need, you should check the widget implementation to see if it
+ sends a pointer to itself.
+
+ The QStyle class also provides helper functions that are used
+ when drawing the elements. The \l{QStyle::}{drawItemText()}
+ function draws text within a specified rectangle and taking a
+ QPalette as a parameter. The \l{QStyle::}{drawItemPixmap()}
+ function helps to align a pixmap within a specified bounding
+ rectangle.
+
+ Other QStyle functions do various calculations for the
+ functions that draw. The widgets also use these functions for
+ calculating size hints and also for bounding rectangle
+ calculations if they draw several style elements themselves.
+ As with the functions that draw elements the helper functions
+ typically takes the same arguments.
+
+ \list
+ \o The \l{QStyle::}{subElementRect()} function takes a
+ \l{QStyle::}{SubElement} enum value, and calculates a bounding
+ rectangle for a sub element. The style uses this function to
+ know where to draw the different parts of an element. This is
+ mainly done for reuse. If you create a new style, you can use
+ the same location of sub elements as the super class.
+
+ \o The \l{QStyle::}{subControlRect()} function is used to
+ calculate bounding rectangles for sub controls in complex
+ controls. When you implement a new style, you reimplement \c
+ subControlRect() and calculate the rectangles that are different
+ from the super class.
+
+ \o The \l{QStyle::}{pixelMetric()} function returns a pixel
+ metric, which is a style dependent size given in screen
+ pixels. It takes a value of the \l{QStyle::}{PixelMetric} enum
+ and returns the correct measure. Note that pixel metrics do
+ not necessarily have to be static measures, but can be
+ calculated with, for example, the style option.
+
+ \o The \l{QStyle::}{hitTestComplexControl()} function returns the
+ sub control that the mouse pointer is over in a complex control.
+ Usually, this is simply a matter of using
+ \l{QStyle::}{subControlRect()} to get the bounding rectangles of
+ the sub controls, and see which rectangle contains the position of
+ the cursor.
+ \endlist
+
+ QStyle also have the functions \l{QStyle::}{polish()} and
+ \l{QStyle::}{unpolish()}. All widgets are sent to the \c polish()
+ function before being shown and to \c unpolish() when they
+ are hidden. You can use these functions to set attributes on the
+ widgets or do other work that is required by your style. For
+ instance, if you need to know when the mouse is hovering over the
+ widget, you need to set the \l{Qt::}{WA_Hover} widget attribute.
+ The State_MouseOver state flag will then be set in the widget's
+ style options.
+
+ QStyle has a few static helper functions that do some common and
+ difficult tasks. They can calculate the position of a slider
+ handle from the value of the slider and transform rectangles
+ and draw text considering reverse layouts; see the QStyle
+ class documentation for more details.
+
+ The usual approach when one reimplements QStyle virtual
+ functions is to do work on elements that are different from the
+ super class; for all other elements, you can simply use the super
+ class implementation.
+
+ \section2 The Palette
+
+ Each style provides a color - that is, QBrush - palette that
+ should be used for drawing the widgets. There is one set of colors
+ for the different widget states (QPalette::ColorGroup): active
+ (widgets in the window that has keyboard focus), inactive (widgets
+ used for other windows), and disabled (widgets that are set
+ disabled). The states can be found by querying the State_Active
+ and State_Enabled state flags. Each set contains color certain
+ roles given by the QPalette::ColorRole enum. The roles describe in
+ which situations the colors should be used (e.g., for painting
+ widget backgrounds, text, or buttons).
+
+ How the color roles are used is up to the style. For instance, if
+ the style uses gradients, one can use a palette color and make it
+ darker or lighter with QColor::darker() and QColor::lighter() to
+ create the gradient. In general, if you need a brush that is not
+ provided by the palette, you should try to derive it from one.
+
+ QPalette, which provides the palette, stores colors for
+ different widget states and color roles. The palette for a style
+ is returned by \l{QStyle::}{standardPalette()}. The standard
+ palette is not installed automatically when a new style is set
+ on the application (QApplication::setStyle()) or widget
+ (QWidget::setStyle()), so you must set the palette yourself
+ with (QApplication::setPalette()) or (QWidget::setPalette()).
+
+ It is not recommended to hard code colors as applications and
+ individual widgets can set their own palette and also use the
+ styles palette for drawing. Note that none of Qt's widgets set
+ their own palette. The java style does hard code some colors, but
+ its author looks past this in silence. Of course, it is not
+ intended that the style should look good with any palette.
+
+ \section2 Implementation Issues
+
+ When you implement styles, there are several issues to
+ consider. We will give some hints and advice on implementation
+ here.
+
+ When implementing styles, it is necessary to look through the
+ code of the widgets and code of the base class and its ancestors.
+ This is because the widgets use the style differently, because the
+ implementation in the different styles virtual functions can
+ affect the state of the drawing (e.g., by altering the QPainter
+ state without restoring it and drawing some elements without using
+ the appropriate pixel metrics and sub elements).
+
+ It is recommended that the styles do not alter the proposed size
+ of widgets with the QStyle::sizeFromContents() function but let
+ the QCommonStyle implementation handle it. If changes need to be
+ made, you should try to keep them small; application development
+ may be difficult if the layout of widgets looks considerably
+ different in the various styles.
+
+ We recommend using the QPainter directly for drawing, i.e., not
+ use pixmaps or images. This makes it easier for the style conform
+ to the palette (although you can set your own color table on a
+ QImage with \l{QImage::}{setColorTable()}).
+
+ It is, naturally, possible to draw elements without using the
+ style to draw the sub elements as intended by Qt. This is
+ discouraged as custom widgets may depend on these sub elements to
+ be implemented correctly. The widget walkthrough shows how Qt
+ uses the sub elements.
+
+ \section1 Java Style
+
+ We have implemented a style that resembles the Java default look
+ and feel (previously known as Metal). We have done this as it is
+ relatively simple to implement and we wanted to build a style for
+ this overview document. To keep it simple and not to extensive, we
+ have simplified the style somewhat, but Qt is perfectly able to
+ make an exact copy of the style. However, there are no concrete
+ plans to implement the style as a part of Qt.
+
+ In this section we will have a look at some implementation
+ issues. Finally, we will see a complete example on the styling of
+ a Java widget. We will continue to use the java style
+ throughout the document for examples and widget images. The
+ implementation itself is somewhat involved, and it is not
+ intended that you should read through it.
+
+ \section2 Design and Implementation
+
+ The first step in designing the style was to select the base
+ class. We chose to subclass QWindowsStyle. This class implements
+ most of the functionality we need other than performing the actual
+ drawing. Also, windows and java share layout of sub controls for
+ several of the complex controls (which reduces the amount of code
+ required considerably).
+
+ The style is implemented in one class. We have done this
+ because we find it convenient to keep all code in one file. Also,
+ it is an advantage with regards to optimization as we instantiate
+ less objects. We also keep the number of functions at a minimum by
+ using switches to identify which element to draw in the functions.
+ This results in large functions, but since we divide the code for
+ each element in the switches, the code should still be easy to
+ read.
+
+ \section2 Limitations and Differences from Java
+
+ We have not fully implemented every element in the Java style.
+ This way, we have reduced the amount and complexity of the code.
+ In general, the style was intended as a practical example for
+ this style overview document, and not to be a part of Qt
+ itself.
+
+ Not all widgets have every state implemented. This goes for
+ states that are common, e.g., State_Disabled. Each state is,
+ however, implemented for at least one widget.
+
+ We have only implemented ticks below the slider. Flat push
+ buttons are also left out. We do not handle the case where the
+ title bars and dock window titles grows to small for their
+ contents, but simply draw sub controls over each other.
+
+ We have not tried to emulate the Java fonts. Java and Qt use very
+ different font engines, so we don't consider it worth the effort
+ as we only use the style as an example for this overview.
+
+ We have hardcoded the colors (we don't use the QPalette) for
+ the linear gradients, which are used, for example, for button
+ bevels, tool bars, and check boxes. This is because the Java
+ palette cannot produce these colors. Java does not change these
+ colors based on widget color group or role anyway (they are not
+ dependent on the palette), so it does not present a problem in any
+ case.
+
+ It is Qt's widgets that are styled. Some widgets do not exist
+ at all in Java, e.g., QToolBox. Others contain elements that the
+ Java widgets don't. The tree widget is an example of the latter in
+ which Java's JTree does not have a header.
+
+ The style does not handle reverse layouts. We assume that the
+ layout direction is left to right. QWindowsStyle handles reverse
+ widgets; if we implemented reverse layouts, widgets that we change
+ the position of sub elements, or handle text alignment in labels
+ our selves would need to be updated.
+
+ \section2 Styling Java Check Boxes
+
+ As an example, we will examine the styling of check boxes in the
+ java style. We describe the complete process and print all code in
+ both the java style and Qt classes involved. In the rest of this
+ document, we will not examine the source code of the individual
+ widgets. Hopefully, this will give you an idea on how to search
+ through the code if you need to check specific implementation
+ details; most widgets follow the same structure as the check
+ boxes. We have edited the QCommonStyle code somewhat to remove
+ code that is not directly relevant for check box styling.
+
+ We start with a look at how QCheckBox builds it style option,
+ which is QStyleOptionButton for checkboxes:
+
+ \snippet doc/src/snippets/code/doc_src_styles.qdoc 0
+
+ First we let QStyleOption set up the option with the information
+ that is common for all widgets with \c init(). We will look at
+ this shortly.
+
+ The down boolean is true when the user press the box down; this is
+ true whether the box is checked or not of the checkbox. The
+ State_NoChange state is set when we have a tristate checkbox and
+ it is partially checked. It has State_On if the box is checked and
+ State_Off if it is unchecked. State_MouseOver is set if the mouse
+ hovers over the checkbox and the widget has attribute Qt::WA_Hover
+ set - you set this in QStyle::polish(). In addition, the style
+ option also contains the text, icon, and icon size of the button.
+
+ \l{QStyleOption::}{init()} sets up the style option with the
+ attributes that are common for all widgets. We print its
+ implementation here:
+
+ \snippet doc/src/snippets/code/doc_src_styles.qdoc 1
+
+ The State_Enabled is set when the widget is enabled. When the
+ widget has focus the State_HasFocus flag is set. Equally, the
+ State_Active flag is set when the widget is a child of the active
+ window. The State_MouseOver will only be set if the widget has
+ the WA_HoverEnabled windows flag set. Notice that keypad
+ navigation must be enabled in Qt for the State_HasEditFocus to
+ be included; it is not included by default.
+
+ In addition to setting state flags the QStyleOption contains
+ other information about the widget: \c direction is the layout
+ direction of the layout, \c rect is the bounding rectangle of the
+ widget (the area in which to draw), \c palette is the QPalette
+ that should be used for drawing the widget, and \c fontMetrics is
+ the metrics of the font that is used by the widget.
+
+ We give an image of a checkbox and the style option to match
+ it.
+
+ \image javastyle/checkboxexample.png A java style checkbox
+
+ The above checkbox will have the following state flags in its
+ style option:
+
+ \table 90%
+ \header
+ \o State flag
+ \o Set
+ \row
+ \o State_Sunken
+ \o Yes
+ \row
+ \o State_NoChange
+ \o No
+ \row
+ \o State_On
+ \o Yes
+ \row
+ \o State_Off
+ \o No
+ \row
+ \o State_MouseOver
+ \o Yes
+ \row
+ \o State_Enabled
+ \o Yes
+ \row
+ \o State_HasFocus
+ \o Yes
+ \row
+ \o State_KeyboardFocusChange
+ \o No
+ \row
+ \o State_Active
+ \o Yes
+ \endtable
+
+ The QCheckBox paints itself in QWidget::paintEvent() with
+ style option \c opt and QStylePainter \c p. The QStylePainter
+ class is a convenience class to draw style elements. Most
+ notably, it wraps the methods in QStyle used for painting. The
+ QCheckBox draws itself as follows:
+
+ \snippet doc/src/snippets/code/doc_src_styles.qdoc 2
+
+ QCommonStyle handles the CE_CheckBox element. The QCheckBox
+ has two sub elements: SE_CheckBoxIndicator (the checked indicator)
+ and SE_CheckBoxContents (the contents, which is used for the
+ checkbox label). QCommonStyle also implements these sub element
+ bounding rectangles. We have a look at the QCommonStyle code:
+
+ \snippet doc/src/snippets/code/doc_src_styles.qdoc 3
+
+ As can be seen from the code extract, the common style gets
+ the bounding rectangles of the two sub elements of
+ CE_CheckBox, and then draws them. If the checkbox has focus,
+ the focus frame is also drawn.
+
+ The java style draws CE_CheckBoxIndicator, while QCommonStyle
+ handles CE_CheckboxLabel. We will examine each implementation and
+ start with CE_CheckBoxLabel:
+
+ \snippet doc/src/snippets/code/doc_src_styles.qdoc 4
+
+ \l{QStyle::}{visualAlignment()} adjusts the alignment of text
+ according to the layout direction. We then draw an icon if it
+ exists, and adjust the space left for the text.
+ \l{QStyle::}{drawItemText()} draws the text taking alignment,
+ layout direction, and the mnemonic into account. It also uses the
+ palette to draw the text in the right color.
+
+ The drawing of labels often get somewhat involved. Luckily, it
+ can usually be handled by the base class. The java style
+ implements its own push button label since Java-contrary to
+ windows-center button contents also when the button has an icon.
+ You can examine that implementation if you need an example of
+ reimplementing label drawing.
+
+ We take a look at the java implementation
+ of CE_CheckBoxIndicator in \c drawControl():
+
+ \snippet doc/src/snippets/javastyle.cpp 0
+
+ We first save the state of the painter. This is not always
+ necessary but in this case the QWindowsStyle needs the painter in
+ the same state as it was when PE_IndicatorCheckBox was called (We
+ could also set the state with function calls, of course). We then
+ use \c drawButtonBackground() to draw the background of the check
+ box indicator. This is a helper function that draws the background
+ and also the frame of push buttons and check boxes. We take a look
+ at that function below. We then check if the mouse is hovering
+ over the checkbox. If it is, we draw the frame java checkboxes
+ have when the box is not pressed down and the mouse is over it.
+ You may note that java does not handle tristate boxes, so we have
+ not implemented it.
+
+ Here we use a png image for our indicator. We could also check
+ here if the widget is disabled. We would then have to use
+ another image with the indicator in the disabled color.
+
+ \snippet doc/src/snippets/javastyle.cpp 1
+
+ We have seen how check boxes are styled in the java style from the
+ widget gets a paint request to the style is finished painting. To
+ learn in detail how each widget is painted, you need to go through
+ the code step-by-step as we have done here. However, it is
+ usually enough to know which style elements the widgets draw. The
+ widget builds a style option and calls on the style one or more
+ times to draw the style elements of which it consists. Usually,
+ it is also sufficient to know the states a widget can be in and the
+ other contents of the style option, i.e., what we list in the next
+ section.
+
+ \section1 Widget Walkthrough
+
+ In this section, we will examine how most of Qt's widgets are
+ styled. Hopefully, this will save you some time and effort while
+ developing your own styles and widgets. You will not find
+ information here that is not attainable elsewhere (i.e., by
+ examining the source code or the class descriptions for the style
+ related classes).
+
+ We mostly use java style widgets as examples. The java style does not
+ draw every element in the element trees. This is because they are
+ not visible for that widget in the java style. We still make sure
+ that all elements are implemented in a way that conforms with the
+ java style as custom widgets might need them (this does not
+ exclude leaving implementations to QWindowsStyle though).
+
+ The following is given for each widget:
+
+ \list
+ \o A table with the members (variables, etc.) of its style option.
+ \o A table over the state flags (QStyle::StateFlag) that
+ can be set on the widget and when the states are set.
+ \o Its element tree (see section \l{The Style Elements}).
+ \o An image of the widget in which the elements are outlined.
+ \omit This is not written yet - probably never will be
+ either
+ \o List of style hints that should be checked for the
+ widget.
+ \o List of standard pixmaps that could be used by the
+ elements.
+ \endomit
+ \endlist
+
+ The element tree contains the primitive, control, and complex
+ style elements. By doing a top-down traversal of the element tree,
+ you get the sequence in which the elements should be drawn. In the
+ nodes, we have written the sub element rectangles, sub control
+ elements, and pixel metrics that should be considered when drawing
+ the element of the node.
+
+ Our approach on styling center on the drawing of the widgets. The
+ calculations of sub elements rectangles, sub controls, and pixel
+ metrics used \bold during drawing is only listed as contents in
+ the element trees. Note that there are rectangles and pixel
+ metrics that are only used by widgets. This leaves these
+ calculations untreated in the walkthrough. For instance, the
+ \l{QStyle::}{subControlRect()} and
+ \l{QStyle::}{sizeFromContents()} functions often call
+ \l{QStyle::}{subElementRect()} to calculate their bounding
+ rectangles. We could draw trees for this as well. However, how
+ these calculations are done is completely up to the individual
+ styles, and they do not have to follow a specific structure (Qt
+ does not impose a specific structure). You should still make sure
+ that you use the appropriate pixel metrics, though. To limit the
+ size of the document, we have therefore chosen not to include
+ trees or describe the calculations made by the Java (or any other)
+ style.
+
+ You may be confused about how the different pixel metrics, sub
+ element rectangles, and sub control rectangles should be used when
+ examining the trees. If you are in doubt after reading the QStyle
+ enum descriptions, we suggest that you examine the QCommonStyle
+ and QWindowsStyle implementations.
+
+ Some of the bounding rectangles that we outline in the widget
+ images are equal. Reasons for this are that some elements draw
+ backgrounds while others draw frames and labels. If in doubt,
+ check the description of each element in QStyle. Also, some
+ elements are there to layout, i.e., decide where to draw, other
+ elements.
+
+ \section2 Common Widget Properties
+
+ Some states and variables are common for all widgets. These are
+ set with QStyleOption::init(). Not all elements use this function;
+ it is the widgets that create the style options, and for some
+ elements the information from \l{QStyleOption::}{init()} is not
+ necessary.
+
+ A table with the common states follows:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_Enabled
+ \o Set if the widget is not disabled (see
+ QWidget::setEnabled())
+ \row
+ \o State_Focus
+ \o Set if the widget has focus (see
+ QWidget::hasFocus())
+ \row
+ \o State_KeyobordFocusChange
+ \o Set when the user changes focus with the keyboard
+ (see Qt::WA_KeyboardFocusChange)
+ \row
+ \o State_MouseOver
+ \o Set if the mouse cursor is over the widget
+ \row
+ \o State_Active
+ \o Set if the widget is a child of the active window.
+ \row
+ \o State_HasEditFocus
+ \o Set if the widget has the edit focus
+ \endtable
+
+ The other common members for widgets are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o rect
+ \o The bounding rectangle of the element to draw. This
+ is set to the widget bounding rectangle
+ (QWidget::rect()).
+ \row
+ \o direction
+ \o The layout direction; a value of the
+ Qt::LayoutDirection enum.
+ \row
+ \o palette
+ \o The QPalette to use when drawing the element. This
+ is set to the widgets palette (QWidget::palette()).
+ \row
+ \o fontMetrics
+ \o The QFontMetrics to use when drawing text on the
+ widget.
+ \endtable
+
+ The complex style options (classes that inherit
+ QStyleOptionComplex) used for complex style elements share two
+ variables: \l{QStyleOptionComplex::}{subControls} and
+ \l{QStyleOptionComplex::}{activeSubControls}. Both variables are
+ an OR'ed combination of QStyle::SubControl enum values. They
+ indicate which sub controls the complex control consists of and
+ which of these controls are currently active.
+
+ As mentioned, the style calculates the size of the widgets
+ contents, which the widgets calculate their size hints from. In
+ addition, complex controls also use the style to test which
+ sub-controls the mouse is over.
+
+ \section2 Widget Reference
+
+ Without further delay, we present the widget walkthrough; each
+ widget has its own sub-section.
+
+ \section3 Push Buttons
+
+ The style structure for push buttons is shown below. By doing a
+ top-down traversal of the tree, you get the sequence in which the
+ elements should be drawn.
+
+ \image javastyle/pushbutton.png The style structure for push buttons
+
+ The layout of the buttons, with regard element bounds, varies from
+ style to style. This makes it difficult to show conceptual images
+ of this. Also, elements may - even be intended to - have the same
+ bounds; the PE_PushButtonBevel, for instance, is used in
+ QCommonStyle to draw the elements that contains it:
+ PE_FrameDefaultButton, PE_FrameButtonBevel, and
+ PE_PanelButtonCommand, all of which have the same bounds in common
+ and windows style. PE_PushButtonBevel is also responsible for
+ drawing the menu indicator (QCommonStyle draws
+ PE_IndicatorArrowDown).
+
+ An image of a push button in the java style that show the bounding
+ rectangles of the elements is given below. Colors are used to
+ separate the bounding rectangles in the image; they do not fill
+ any other purpose. This is also true for similar images for the
+ other widgets.
+
+ \image javastyle/button.png
+
+ The java style, as well as all other styles implemented in Qt,
+ does not use PE_FrameButtonBevel. It is usual that a button
+ with a PE_DefaultFrame adjusts the PE_PanelButtonCommand's
+ rectangle by PM_ButtonDefaultIndicator. The CE_PushButtonLabel
+ is found by adjusting the rect by PM_DefaultFrameWidth.
+
+ We will now examine the style option for push
+ buttons - QStyleOptionButton. A table for the states that
+ QPushButton can set on the style option follows:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_Sunken
+ \o Button is down or menu is pressed shown
+ \row
+ \o State_On
+ \o Button is checked
+ \row
+ \o State_Raised
+ \o Button is not flat and not pressed down
+ \endtable
+
+ Other members of QStyleOptionButton is:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o features
+ \o Flags of the QStyleOptionButton::ButtonFeatures enum,
+ which describes various button properties (see enum)
+ \row
+ \o icon
+ \o The buttons QIcon (if any)
+ \row
+ \o iconSize
+ \o The QSize of the icon
+ \row
+ \o text
+ \o a QString with the buttons text
+ \endtable
+
+ \section3 Check and Radio Buttons
+
+ The structures for radio and check buttons are identical.
+ We show the structure using QCheckBox element and pixel
+ metric names:
+
+ \image javastyle/checkbox.png
+
+ QStyleOptionButton is used as the style option for both check
+ and radio buttons. We first give a table of the states that
+ can be set in the option:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_sunken
+ \o The box is pressed down
+ \row
+ \o State_NoChange
+ \o The box is partially checked (for tristate
+ checkboxes.)
+ \row
+ \o State_On
+ \o The box is checked
+ \row
+ \o State_Off
+ \o The box is unchecked
+ \endtable
+
+ See \l{Push Buttons} for a table over other members in the
+ QStyleOptionButtonClass.
+
+ \section3 Tabs
+
+ In Qt, QTabBar uses the style to draw its tabs. Tabs exist either
+ in a QTabWidget, which contains a QTabBar, or as a separate bar.
+ If the bar is not part of a tab widget, it draws its own base.
+
+ QTabBar lays out the tabs, so the style does not have control over
+ tab placement. However, while laying out its tabs, the bar asks
+ the style for PM_TabBarTabHSpace and PM_TabBarTabVSpace, which is
+ extra width and height over the minimum size of the tab bar tab
+ label (icon and text). The style can also further influence the
+ tab size before it is laid out, as the tab bar asks for
+ CT_TabBarTab. The bounding rectangle of the bar is decided by the
+ tab widget when it is part of the widget (still considering
+ CT_TabBarTab).
+
+ The tab bar is responsible for drawing the buttons that appear on
+ the tab bar when all tabs do not fit. Their placement is not
+ controlled by the style, but the buttons are \l{QToolButton}s
+ and are therefore drawn by the style.
+
+ Here is the style structure for QTabWidget and QTabBar:
+
+ \image javastyle/tab.png
+
+ The dotted lines indicate that the QTabWidget contains a tab bar,
+ but does not draw it itself, that QTabBar only draws its base line
+ when not part of a tab widget, and that the tab bar keeps two tool
+ buttons that scroll the bar when all tabs do not fit; see \l{Tool
+ Buttons} for their element tree. Also note that since the buttons
+ are children of the tab bar, they are drawn after the bar. The
+ tabs bounding rectangles overlap the base by PM_TabBarBaseOverlap.
+
+ Here is a tab widget in the java style:
+
+ \image javastyle/tabwidget.png
+
+ In the java style (and also windows), the tab bar shape and label
+ have the same bounding rectangle as CE_TabBarTab. Notice that the
+ tabs overlap with the tab widget frame. The base of the tab bar
+ (if drawn) is the area where the tabs and frame overlap.
+
+ The style option for tabs (QStyleOptionTab) contains the necessary
+ information for drawing tabs. The option contains the position of
+ the tab in the tab bar, the position of the selected tab, the
+ shape of the tab, the text, and icon. After Qt 4.1 the option
+ should be cast to a QStyleOptionTabV2, which also contains the
+ icons size.
+
+ As the java style tabs don't overlap, we also present an image of
+ a tab widget in the windows style. Note that if you want the tabs
+ to overlap horizontally, you do that when drawing the tabs in
+ CE_TabBarTabShape; the tabs bounding rectangles will not be
+ altered by the tab bar. The tabs are drawn from left to right in a
+ north tab bar shape, top to bottom in an east tab bar shape, etc.
+ The selected tab is drawn last, so that it is easy to draw it over
+ the other tabs (if it is to be bigger).
+
+ \image javastyle/windowstabimage.png
+
+ A table of the states a tab bar can set on its tabs follows:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_Sunken
+ \o The tab is pressed on with the mouse.
+ \row
+ \o State_Selected
+ \o If it is the current tab.
+ \row
+ \o State_HasFocus
+ \o The tab bar has focus and the tab is selected
+ \endtable
+
+ Note that individual tabs may be disabled even if the tab bar
+ is not. The tab will be active if the tab bar is active.
+
+ Here follows a table of QStyleOptionTabV2's members:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o cornerWidgets
+ \o Is flags of the CornerWidget enum, which indicate
+ if and which corner widgets the tab bar has.
+ \row
+ \o icon
+ \o The QIcon of the tab
+ \row
+ \o iconSize
+ \o The QSize of the icon
+ \row
+ \o position
+ \o A TabPosition enum value that indicates the tabs
+ position on the bar relative to the other tabs.
+ \row
+ \o row
+ \o holds which row the tab is in
+ \row
+ \o selectedPosition
+ \o A value of the SelectedPosition enum that indicates
+ whether the selected tab is adjacent to or is the
+ tab.
+ \row
+ \o shape
+ \o A value of the QTabBar::Shape enum indication
+ whether the tab has rounded or triangular corners
+ and the orientation of the tab.
+ \row
+ \o text
+ \o The tab text
+ \endtable
+
+ The frame for tab widgets use QStyleOptionTabWidgetFrame as
+ style option. We list its members here. It does not have
+ states set besides the common flags.
+
+ \table 90%
+ \header
+ \o Member
+ \o content
+ \row
+ \o leftCornerWidgetSize
+ \o The QSize of the left corner widget (if any).
+ \row
+ \o rightCornerWidgetSize
+ \o The QSize of the right corner widget (if any).
+ \row
+ \o lineWidth
+ \o holds the line with for drawing the panel.
+ \row
+ \o midLineWith
+ \o this value is currently always 0.
+ \row
+ \o shape
+ \o The shape of the tabs on the tab bar.
+ \row
+ \o tabBarSize
+ \o The QSize of the tab bar.
+ \endtable
+
+ \section3 Scroll Bars
+
+ Here is the style structure for scrollBars:
+
+ \image javastyle/scrollbar.png
+
+ QScrollBar simply creates its style option and then draws
+ CC_ScrollBar. Some styles draw the background of add page and sub
+ page with PE_PanelButtonBevel and also use indicator arrows to
+ draw the arrows in the nest and previous line indicators; we have
+ not included these in the tree as their use is up to the
+ individual style. The style's PM_MaximumDragDistance is the
+ maximum distance in pixels the mouse can move from the bounds
+ of the scroll bar and still move the handle.
+
+ Here is an image of a scrollbar in the java style:
+
+ \image javastyle/scrollbarimage.png
+
+ You may notice that the scrollbar is slightly different from
+ Java's as it has two line up indicators. We have done this to show
+ how that you can have two separate bounding rectangles for a
+ single sub control. The scroll bar is an example of a widget that
+ is entirely implemented by the java style - neither QWindowsStyle
+ nor QCommonStyle are involved in the drawing.
+
+ We have a look at the different states a scroll bar can set on
+ the style option:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_Horizontal
+ \o The scroll bar is horizontal
+ \endtable
+
+ The style option of QScrollBar is QStyleOptionSlider. Its
+ members are listed in the following table. The option is used
+ by all \l{QAbstractSlider}s; we only describe the members
+ relevant for scroll bars here.
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o maximum
+ \o the maximum value of the scroll bar
+ \row
+ \o minimum
+ \o the minimum value of the scroll bar
+ \row
+ \o notchTarget
+ \o the number of pixels between notches
+ \row
+ \o orientation
+ \o a value of the Qt::Orientation enum that specifies
+ whether the scroll bar is vertical or horizontal
+ \row
+ \o pageStep
+ \o the number to increase or decrease the sliders
+ value (relative to the size of the slider and its value
+ range) on page steps.
+ \row
+ \o singleStep
+ \o the number to increase or decrease the sliders
+ value on single (or line) steps
+ \row
+ \o sliderValue
+ \o The value of the slider
+ \row
+ \o sliderPosition
+ \o the position of the slider handle. This is the same
+ as \c sliderValue if the scroll bar is
+ QAbstractSlider::tracking. If not, the scroll
+ bar does not update its value before the mouse
+ releases the handle.
+ \row
+ \o upsideDown
+ \o holds the direction in which the scroll bar
+ increases its value. This is used instead of
+ QStyleOption::direction for all abstract sliders.
+ \endtable
+
+ \section3 Sliders
+
+ When calculating the sliders size hint, PM_SliderTickness and
+ PM_SliderLength is queried from the style. As with scroll bars,
+ the QSlider only lets the user move the handle if the mouse is
+ within PM_MaximumDragDistance from the slider bounds. When it
+ draws itself it creates the style option and calls \c
+ drawComplexControl() with CC_Slider:
+
+ \image javastyle/slider.png
+
+ We also show a picture of a slider in the java style. We show
+ the bounding rectangles of the sub elements as all drawing is done
+ in CC_Slider.
+
+ \image javastyle/sliderimage.png
+
+ QSlider uses QStyleOptionSlider as all \l{QAbstractSlider}s do. We
+ present a table with the members that affect QSlider:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o maximum
+ \o the maximum value of the slider
+ \row
+ \o minimum
+ \o the minimum value of the slider
+ \row
+ \o notchTarget
+ \o this is the number of pixels between each notch
+ \row
+ \o orientation
+ \o a Qt::Orientation enum value that gives whether the
+ slider is vertical or horizontal.
+ \row
+ \o pageStep
+ \o a number in slider value to increase or decrease
+ for page steps
+ \row
+ \o singleStep
+ \o the number to increase or decrease the sliders
+ value on single (or line) steps.
+ \row
+ \o sliderValue
+ \o the value of the slider.
+ \row
+ \o sliderPosition
+ \o the position of the slider given as a slider value.
+ This will be equal to the \c sliderValue if the
+ slider is \l{QAbstractSlider::}{tracking}; if
+ not, the sliders value will not change until the handle is
+ released with the mouse.
+ \row
+ \o upsideDown
+ \o this member is used instead of QStyleOption::direction
+ for all abstract sliders.
+ \endtable
+
+ You should note that the slider does not use direction for
+ reverse layouts; it uses \c upsideDown.
+
+ \section3 Spin Boxes
+
+ When QSpinBox paints itself it creates a QStyleOptionSpinBox and
+ asks the style to draw CC_SpinBox. The edit field is a line
+ edit that is a child of the spin box. The dimensions of the
+ field is calculated by the style with SC_SpinBoxEditField.
+
+ Here follows the style tree for spin boxes. It is not
+ required that a style uses the button panel primitive to paint
+ the indicator backgrounds. You can see an image below the tree
+ showing the sub elements in QSpinBox in the java style.
+
+ \image javastyle/spinbox.png
+
+ \image javastyle/spinboximage.png
+
+ The QStyleOptionSpinBox, which is the style option for spin
+ boxes. It can set the following states on the spin box.:
+
+ \table 90%
+ \header
+ \o State
+ \o State Set When
+ \row
+ \o State_Sunken
+ \o Is set if one of the sub controls CC_SpinUp or
+ CC_SpinDown is pressed on with the mouse.
+ \endtable
+
+ The rest of the members in the spin boxes style options are:
+
+ \table 90%
+ \header
+ \o Property
+ \o Function
+ \row
+ \o frame
+ \o boolean that is true if the spin box is to draw a
+ frame.
+ \row
+ \o buttonSymbols
+ \o Value of the ButtonSymbols enum that decides the
+ symbol on the up/down buttons.
+ \row
+ \o stepEnabled
+ \o A value of the StepEnabled indication which of the
+ spin box buttons are pressed down.
+ \endtable
+
+ \section3 Title Bar
+
+ The title bar complex control, CC_TitleBar, is used to draw
+ the title bars of internal windows in QMdiArea. It typically
+ consists of a window title and close, minimize, system menu, and
+ maximize buttons. Some styles also provide buttons for shading
+ the window, and a button for context sensitive help.
+
+ The bar is drawn in CC_TitleBar without using any sub elements.
+ How the individual styles draw their buttons is individual, but
+ there are standard pixmaps for the buttons that the style should
+ provide.
+
+ \image javastyle/titlebar.png
+
+ In an image over a title bar in the java style, we show the
+ bounding rectangles of the sub elements supported by the java style
+ (all of which are drawn with standard pixmaps). It is usual to
+ draw the button backgrounds using PE_PanelButtonTool, but it's no
+ rule.
+
+ \image javastyle/titlebarimage.png
+
+ The style option for title bars is QStyleOptionTitleBar. It's
+ members are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o icon
+ \o The title bars icon
+ \row
+ \o text
+ \o the text for the title bar's label
+ \row
+ \o windowFlags
+ \o flags of the Qt::WindowFlag enum. The window flags
+ used by QMdiArea for window management.
+ \row
+ \o titleBarState
+ \o this is the QWidget::windowState() of the window
+ that contains the title bar.
+ \endtable
+
+ \section3 Combo Box
+
+ A QComboBox uses the style to draw the button and label of
+ non-editable boxes with CC_ComboBox and CE_ComboBoxLabel.
+
+ The list that pops up when the user clicks on the combo box is
+ drawn by a \l{Delegate Classes}{delegate}, which we do not cover
+ in this overview. You can, however, use the style to control the
+ list's size and position with the sub element
+ SC_ComboBoxListBoxPopup. The style also decides where the edit
+ field for editable boxes should be with SC_ComboBoxEditField; the
+ field itself is a QLineEdit that is a child of the combo box.
+
+ \image javastyle/combobox.png
+
+ We show an image over a java style combo box in which we have
+ outlined its sub elements and sub element rectangles:
+
+ \image javastyle/comboboximage.png
+
+ Java combo boxes do not use the focus rect; it changes its
+ background color when it has focus. The SC_ComboBoxEdit field is
+ used both by QComboBox to calculate the size of the edit field and
+ the style for calculating the size of the combo box label.
+
+ The style option for combo boxes is QStyleOptionComboBox. It
+ can set the following states:
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_Selected
+ \o The box is not editable and has focus
+ \row
+ \o State_Sunken
+ \o SC_ComboBoxArrow is active
+ \row
+ \o State_on
+ \o The container (list) of the box is visible
+ \endtable
+
+ The style options other members are:
+
+ \table
+ \header
+ \o Member
+ \o Content
+ \row
+ \o currentIcon
+ \o the icon of the current (selected) item of the
+ combo box.
+ \row
+ \o currentText
+ \o the text of the current item in the box.
+ \row
+ \o editable
+ \o holds whether the combo box is editable or not
+ \row
+ \o frame
+ \o holds whether the combo box has a frame or not
+ \row
+ \o iconSize
+ \o the size of the current items icon.
+ \row
+ \o popupRect
+ \o the bounding rectangle of the combo box's popup
+ list.
+ \endtable
+
+ \section3 Group Boxes
+
+ When calculating the size hint, QGroupBox fetches three pixel
+ metrics from the style: PM_IndicatorWidth,
+ PM_CheckBoxLabelSpacing, and PM_IndicatorHeight. QGroupBox has
+ the following style element tree:
+
+ \image javastyle/groupbox.png
+
+ Qt does not impose restrictions on how the check box is drawn; the
+ java style draws it with CE_IndicatorCheckBox. See \l{Check and
+ Radio Buttons} for the complete tree.
+
+ We also give an image of the widget with the sub controls and
+ sub control rectangles drawn:
+
+ \image javastyle/groupboximage.png
+
+ The style option for group boxes are QStyleOptionGroupBox. The
+ following states can be set on it:
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_On
+ \o The check box is checked
+ \row
+ \o State_Sunken
+ \o The checkbox is pressed down
+ \row
+ \o State_Off
+ \o The check box is unchecked (or there is no check box)
+ \endtable
+
+ The remaining members of QStyleOptionGroupBox are:
+
+ \table
+ \header
+ \o Member
+ \o Content
+ \row
+ \o features
+ \o flags of the QStyleOptionFrameV2::FrameFeatures
+ enum describing the frame of the group box.
+ \row
+ \o lineWidth
+ \o the line width with which to draw the panel. This
+ is always 1.
+ \row
+ \o text
+ \o the text of the group box.
+ \row
+ \o textAlignment
+ \o the alignment of the group box title
+ \row
+ \o textColor
+ \o the QColor of the text
+ \endtable
+
+ \section3 Splitters
+
+ As the structure of splitters are simple and do not contain any
+ sub elements, we do not include image of splitters. CE_Splitter
+ does not use any other elements or metrics.
+
+ For its style option, Splitters uses the base class QStyleOption.
+ It can set the following state flags on it:
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_Horizontal
+ \o Set if it is a horizontal splitter
+ \endtable
+
+ QSplitter does not use \l{QStyleOption::}{init()} to set up its
+ option; it sets the State_MouseOver and State_Disabled flags
+ itself.
+
+ \section3 Progress Bar
+
+ The CE_ProgressBar element is used by QProgressBar, and it is the
+ only element used by this widget. We start with looking at the
+ style structure:
+
+ \image javastyle/progressbar.png
+
+ Here is a progress bar in the windows style (the java style
+ bounding rectangles are equal):
+
+ \image javastyle/progressbarimage.png
+
+ The style option for QProgressBar is QStyleOptionProgressBarV2.
+ The bar does not set any state flags, but the other members of the
+ option are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o minimum
+ \o The minimum value of the bar
+ \row
+ \o maximum
+ \o The maximum value of the bar
+ \row
+ \o progress
+ \o The current value of the bar
+ \row
+ \o textAlignment
+ \o How the text is aligned in the label
+ \row
+ \o textVisible
+ \o Whether the label is drawn
+ \row
+ \o text
+ \o The label text
+ \row
+ \o orientation
+ \o Progress bars can be vertical or horizontal
+ \row
+ \o invertedAppearance
+ \o The progress is inverted (i.e., right to left in a
+ horizontal bar)
+ \row
+ \o bottomToTop
+ \o Boolean that if true, turns the label of vertical
+ progress bars 90 degrees.
+ \endtable
+
+ \section3 Tool Buttons
+
+ Tool buttons exist either independently or as part of tool bars.
+ They are drawn equally either way. The QToolButton draws only one
+ style element: CC_ToolButton.
+
+ As you must be used to by now (at least if you have read this
+ document sequentially), we have a tree of the widget's style
+ structure:
+
+ \image javastyle/toolbutton.png
+
+ Note that PE_FrameButtonTool and PE_IndicatorArrowDown are
+ included in the tree as the java style draws them, but they can
+ safely be omitted if you prefer it. The structure may also be
+ different. QWindowsStyle, for instance, draws both
+ PE_IndicatorButtonDropDown and PE_IndicatorArrowDown in
+ CE_ToolButton.
+
+ We also have an image of a tool button where we have outlined
+ the sub element bounding rectangles and sub controls.
+
+ \image javastyle/toolbuttonimage.png
+
+ Here is the states table for tool buttons:
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_AutoRise
+ \o the tool button has the autoRise property set
+ \row
+ \o State_raised
+ \o the button is not sunken (i.e., by being checked or
+ pressed on with the mouse).
+ \row
+ \o State_Sunken
+ \o the button is down
+ \row
+ \o State_On
+ \o the button is checkable and checked.
+ \endtable
+
+ QStyleOptionToolButton also contains the following members:
+
+ \table
+ \header
+ \o Member
+ \o Content
+ \row
+ \o arrowType
+ \o a Qt::ArrowType enum value, which contains the
+ direction of the buttons arrow (if an arrow is to
+ be used in place of an icon)
+ \row
+ \o features
+ \o flags of the QStyleOptionToolButton::ButtonFeature
+ enum describing if the button has an arrow, a menu,
+ and/or has a popup-delay.
+ \row
+ \o font
+ \o the QFont of the buttons label
+ \row
+ \o icon
+ \o the QIcon of the tool button
+ \row
+ \o iconSize
+ \o the icon size of the button's icon
+ \row
+ \o pos
+ \o the position of the button, as given by
+ QWidget::pos()
+ \row
+ \o text
+ \o the text of the button
+ \row
+ \o toolButtonStyle
+ \o a Qt::ToolButtonStyle enum value which decides
+ whether the button shows the icon, the text, or both.
+ \endtable
+
+ \section3 Toolbars
+
+ Toolbars are part of the \l{QMainWindow}{main window framework}
+ and cooperates with the QMainWindow to which it belongs while it
+ builds its style option. A main window has 4 areas that toolbars
+ can be placed in. They are positioned next to the four sides of
+ the window (i.e., north, south, west, and east). Within each area
+ there can be more than one line of toolbars; a line consists of
+ toolbars with equal orientation (vertical or horizontal) placed
+ next to each other.
+
+ \l{QToolbar}{QToolbar}s in Qt consists of three elements
+ CE_ToolBar, PE_IndicatorToolBarHandle, and
+ PE_IndicatorToolBarSeparator. It is QMainWindowLayout that
+ calculates the bounding rectangles (i.e., position and size of the
+ toolbars and their contents. The main window also uses the \c
+ sizeHint() of the items in the toolbars when calculating the size
+ of the bars.
+
+ Here is the element tree for QToolBar:
+
+ \image javastyle/toolbar.png
+
+ The dotted lines indicate that the QToolBar keeps an instance of
+ QToolBarLayout and that QToolBarSeparators are kept by
+ QToolBarLayout. When the toolbar is floating (i.e., has its own
+ window) the PE_FrameMenu element is drawn, else QToolbar draws
+ CE_ToolBar.
+
+ Here is an image of a toolbar in the java style:
+
+ \image javastyle/toolbarimage.png
+
+ QToolBarSaparator uses QStyleOption for their style option. It
+ sets the State_horizontal flag if the toolbar they live in is
+ horizontal. Other than that, they use \l{QStyleOption::}{init()}.
+
+ The style option for QToolBar is QStyleOptionToolBar. The only
+ state flag set (besides the common flags) is State_Horizontal
+ if the bar is horizontal (i.e., in the north or south toolbar area).
+ The member variables of the style option are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o features
+ \o Holds whether the bar is movable in a value of the
+ ToolBarFeature, which is either Movable or None.
+ \row
+ \o lineWidth
+ \o The width of the tool bar frame.
+ \row
+ \o midLineWidth
+ \o This variable is currently not used and is always
+ 0.
+ \row
+ \o positionOfLine
+ \o The position of the toolbar line within the toolbar
+ area to which it belongs.
+ \row
+ \o positionWithinLine
+ \o The position of the toolbar within the toolbar line.
+ \row
+ \o toolBarArea
+ \o The toolbar area in which the toolbar lives.
+ \endtable
+
+ \section3 Menus
+
+ Menus in Qt are implemented in QMenu. The QMenu keeps a list of
+ action, which it draws as menu items. When QMenu receives paint
+ events ,it calculates the size of each menu item and draws them
+ individually with CE_MenuItem. (Menu items do not have a separate
+ element for their label (contents), so all drawing is done in
+ CE_MenuItem. The menu also draws the frame of the menu with
+ PE_FrameMenu. It also draws CE_MenuScroller if the style supports
+ scrolling. CE_MenuTearOff is drawn if the menu is to large for its
+ bounding rectangle.
+
+ In the style structure tree, we also include QMenu as it also does
+ styling related work. The bounding rectangles of menu items are
+ calculated for the menus size hint and when the menu is displayed
+ or resized.
+
+ \image javastyle/menu.png
+
+ The CE_MenuScroller and CE_MenuTearOff elements are handled by
+ QCommonStyle and are not shown unless the menu is to large to fit
+ on the screen. PE_FrameMenu is only drawn for pop-up menus.
+
+ QMenu calculates rectangles based on its actions and calls
+ CE_MenuItem and CE_MenuScroller if the style supports that.
+
+ It is also usual to use PE_IndicatorCheckBox (instead of using
+ PE_IndicatorMenuCheckMark) and PE_IndicatorRadioButton for drawing
+ checkable menu items; we have not included them in the style tree
+ as this is optional and varies from style to style.
+
+ \image javastyle/menuimage.png
+
+ The style option for menu items is QStyleOptionMenuItem. The
+ following tables describe its state flags and other members.
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_Selected
+ \o The mouse is over the action and the action is not
+ a separator.
+ \row
+ \o State_Sunken
+ \o The mouse is pressed down on the menu item.
+ \row
+ \o State_DownArrow
+ \o Set if the menu item is a menu scroller and it scrolls
+ the menu downwards.
+ \endtable
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o checkType
+ \o A value of the \l{QStyleOptionMenuItem::}{CheckType} enum,
+ which is either NotCheckable, Exclusive, or
+ NonExclusive.
+ \row
+ \o checked
+ \o Boolean that is true if the menu item is checked.
+ \row
+ \o font
+ \o The QFont to use for the menu item's text.
+ \row
+ \o icon
+ \o the QIcon of the menu item.
+ \row
+ \o maxIconWidth
+ \o The maximum width allowed for the icon
+ \row
+ \o menuHasChecableItem
+ \o Boolean which is true if at least one item in the
+ menu is checkable.
+ \row
+ \o menuItemType
+ \o The type of the menu item. This a value of the
+ \l{QStyleOptionMenuItem::}{MenuItemType}.
+ \row
+ \o menuRect
+ \o The bounding rectangle for the QMenu that the menu
+ item lives in.
+ \row
+ \o tabWidth
+ \o This is the distance between the text of the menu
+ item and the shortcut.
+ \row
+ \o text
+ \o The text of the menu item.
+ \endtable
+
+ The setup of the style option for CE_MenuTearOff and
+ CE_MenuScroller also uses QStyleOptionMenuItem; they only set the
+ \c menuRect variable in addition to the common settings with
+ QStyleOption's \l{QStyleOption::}{init()}.
+
+ \section3 Menu Bar
+
+ QMenuBar uses the style to draw each menu bar item and the empty
+ area of the menu bar. The pull-down menus themselves are
+ \l{QMenu}s (see \l{Menus}). The style element tree for the menu
+ bar follows:
+
+ \image javastyle/menubar.png
+
+ The panel and empty area is drawn after the menu items. The
+ QPainter that the QMenuBar sends to the style has the bounding
+ rectangles of the items clipped out (i.e., clip region), so you
+ don't need to worry about drawing over the items. The pixel
+ metrics in QMenuBar is used when the bounding rectangles of the
+ menu bar items are calculated.
+
+ \image javastyle/menubarimage.png
+
+ QStyleOptionMenuItem is used for menu bar items. The members that
+ are used by QMenuBar is described in the following table:
+
+ \table
+ \header
+ \o Member
+ \o Content
+ \row
+ \o menuRect
+ \o the bounding rectangle of the entire menu bar to
+ which the item belongs.
+ \row
+ \o text
+ \o the text of the item
+ \row
+ \o icon
+ \o the icon of the menu item (it is not common that
+ styles draw this icon)
+ \endtable
+
+ QStyleOptionMenuItem is also used for drawing CE_EmptyMenuBarArea.
+
+ QStyleOptionFrame is used for drawing the panel frame The
+ \l{QStyleOptionFrame::}{lineWidth} is set to PM_MenuBarPanelWidth.
+ The \l{QStyleOptionFrame::}{midLineWidth} is currently always set
+ to 0.
+
+ \section3 Item View Headers
+
+ It is the style that draws the headers of Qt's item views. The
+ item views keeps the dimensions on individual sections. Also
+ note that the delegates may use the style to paint decorations
+ and frames around items. QItemDelegate, for instance, draws
+ PE_FrameFocusRect and PE_IndicatorViewItemCheck.
+
+ \image javastyle/header.png
+
+ Here is a QTableWidget showing the bounding rects of a Java
+ header:
+
+ \image javastyle/headerimage.png
+
+ The QHeaderView uses CT_HeaderSection, PM_HeaderMargin and
+ PM_HeaderGripMargin for size and hit test calculations. The
+ PM_HeaderMarkSize is currently not used by Qt. QTableView draws
+ the button in the top-left corner (i.e., the area where the
+ vertical and horizontal headers intersect) as a CE_Header.
+
+ The style option for header views is QStyleOptionHeader. The view
+ paints one header section at a time, so the data is for the
+ section being drawn. Its contents are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o icon
+ \o the icon of the header (for section that is being
+ drawn).
+ \row
+ \o iconAlignment
+ \o the alignment (Qt::Alignment) of the icon in the header.
+ \row
+ \o orientation
+ \o a Qt::Orientation value deciding whether the header
+ is the horizontal header above the view or the
+ vertical header on the left.
+ \row
+ \o position
+ \o a QStyleOptionHeader::SectionPosition value
+ giving the header section's position relative to
+ the other sections.
+ \row
+ \o section
+ \o holds the section that is being drawn.
+ \row
+ \o selectedPosition
+ \o a QStyleOptionHeader::SelectedPosition value giving
+ the selected section's position relative to the
+ section that is being painted.
+ \row
+ \o sortIndicator
+ \o a QStyleOptionHeader::SortIndicator value that
+ describes the direction in which the section's sort
+ indicator should be drawn.
+ \row
+ \o text
+ \o the text of the currently drawn section.
+ \row
+ \o textAlignment
+ \o the Qt::Alignment of the text within the
+ headersection.
+ \endtable
+
+ \section3 Tree Branch Indicators
+
+ The branch indicators in a tree view is drawn by the style with
+ PE_IndicatorBranch. We think of indicators here as the indicators
+ that describe the relationship of the nodes in the tree. The
+ generic QStyleOption is sent to the style for drawing this
+ elements. The various branch types are described by states. Since
+ there are no specific style option, we simply present the states
+ table:
+
+ \table 90%
+ \header
+ \o State
+ \o Set When
+ \row
+ \o State_Sibling
+ \o the node in the tree has a sibling (i.e., there is
+ another node in the same column).
+ \row
+ \o State_Item
+ \o this branch indicator has an item.
+ \row
+ \o State_Children
+ \o the branch has children (i.e., a new sub-tree can
+ be opened at the branch).
+ \row
+ \o State_Open
+ \o the branch indicator has an opened sub-tree.
+ \endtable
+
+ The tree view (and tree widget) use the style to draw the branches
+ (or nodes if you will) of the tree.
+
+ QStyleOption is used as the style for PE_IndicatorBranch has state
+ flags set depending on what type of branch it is.
+
+ Since there is no tree structure for branch indicators, we only
+ present an image of a tree in the java style. Each state is marked
+ in the image with a rectangle in a specific color (i.e., these
+ rectangles are not bounding rectangles). All combinations of
+ states you must be aware of are represented in the image.
+
+ \image javastyle/branchindicatorimage.png
+
+ \section3 Tool Boxes
+
+ PM_SmallIconSize for sizeHints.
+
+ QToolBox is a container that keeps a collection of widgets. It has
+ one tab for each widget and display one of them at a time. The
+ tool box lays the components it displays (the tool box buttons
+ and selected widget) in a QVBoxLayout. The style tree for tool
+ boxes looks like this:
+
+ \image javastyle/toolbox.png
+
+ We show an image of a tool box in the Plastique style:
+
+ \image javastyle/toolboximage.png
+
+ All elements have the same bounding rectangles in the
+ Plastique as well as the other Qt built-in styles.
+
+ The style option for tool boxes is QStyleOptionToolBox. It
+ contains the text and icon of the tool box contents. The only
+ state set by QToolBox is State_Sunken, which is set when the user
+ presses a tab down with the mouse. The rest of the
+ QStyleOptionToolBox members are:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o icon
+ \o the icon on the toolbox tab
+ \row
+ \o text
+ \o the text on the toolbox tab
+ \endtable
+
+ \section3 Size Grip
+
+ The size grip calculates its size hint with CT_SizeGrip. The pixel
+ metric PM_SizeGripSize is currently unused by Qt. The element tree
+ for and an image in the Plastique style of QSizeGrip follows:
+
+ \image javastyle/sizegrip.png
+
+ \image javastyle/sizegripimage.png
+
+ We show the size grip in a \l{QMainWindow}'s bottom right
+ corner.
+
+ The size grip style option, QStyleOptionSizeGrip, have one
+ member except the common members from QStyleOption:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o corner
+ \o a Qt::Corner value that describe which corner in a
+ window (or equivalent) the grip is located.
+ \endtable
+
+ \section3 Rubber Band
+
+ The \l{QRubberBand}'s style tree consists of two nodes.
+
+ \image javastyle/rubberband.png
+
+ We present an image of a Java style window being moved in a
+ QMdiArea with a rubber band:
+
+ \image javastyle/rubberbandimage.png
+
+ The style option for rubber bands is QStyleOptionRubberBand.
+ Its members are:
+
+ \table
+ \header
+ \o Member
+ \o Content
+ \row
+ \o opaque
+ \o boolean that is true if the rubber band must be
+ drawn in an opaque style (i.e., color)
+ \row
+ \o shape
+ \o a QRubberBand::Shape enum value that holds the
+ shape of the band (which is either a rectangle or a
+ line)
+ \endtable
+
+ \section3 Dock Widgets
+
+ When the dock widget lays out its contents it asks the style for
+ these pixel metrics: PM_DockWidgetSeparatorExtent,
+ PM_DockWidgetTitleBarButtonMargin, PM_DockWidgetFrameWidth, and
+ PM_DockWidgetTitleMargin. It also calculates the bounding
+ rectangles of the float and close buttons with
+ SE_DockWidgetCloseButton and SE_DockWidgetFloatButton.
+
+ \image javastyle/dockwidget.png
+
+ The dotted lines indicate that the sender keeps instances of the
+ recipient of the arrow (i.e., it is not a style element to draw).
+ The dock widget only draws PE_frameDockWidget when it is detached
+ from its main window (i.e., it is a top level window). If it is
+ docked it draws the indicator dock widget resize handle. We show a
+ dock widget in both docked and floating state in the plastique
+ style:
+
+ \image javastyle/dockwidgetimage.png
+
+ The style option is QStyleOptionDockWidget:
+
+ \table 90%
+ \header
+ \o Member
+ \o Content
+ \row
+ \o closeable
+ \o boolean that holds whether the dock window can be
+ closed
+ \row
+ \o floatable
+ \o boolean that holds whether the dock window can
+ float (i.e., detach from the main window in which
+ it lives)
+ \row
+ \o movable
+ \o boolean that holds whether the window is movable
+ (i.e., can move to other dock widget areas)
+ \row
+ \o title
+ \o the title text of the dock window
+ \endtable
+
+ For the buttons, QStyleOptionButton is used (see \l{Tool Buttons}
+ for content description). The dock widget resize handle has a
+ plain QStyleOption.
+*/
diff --git a/doc/src/stylesheet.qdoc b/doc/src/stylesheet.qdoc
new file mode 100644
index 0000000..c0d13da
--- /dev/null
+++ b/doc/src/stylesheet.qdoc
@@ -0,0 +1,3964 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page stylesheet.html
+ \startpage index.html QtReference Documentation
+ \nextpage The Style Sheet Syntax
+ \title Qt Style Sheets
+ \ingroup architecture
+ \brief How to use style sheets to customize the appearance of widgets.
+
+ \keyword style sheet
+ \keyword stylesheet
+
+ Qt Style Sheets are a powerful mechanism that allows you to
+ customize the appearance of widgets, in addition to what is
+ already possible by subclassing QStyle. The concepts,
+ terminology, and syntax of Qt Style Sheets are heavily inspired
+ by HTML \l{http://www.w3.org/Style/CSS/}{Cascading Style Sheets
+ (CSS)} but adapted to the world of widgets.
+
+ Topics:
+
+ \list
+ \i \l{Overview}
+ \i \l{The Style Sheet Syntax}
+ \tableofcontents{1 The Style Sheet Syntax}
+ \i \l{Qt Designer Integration}
+ \tableofcontents{1 Qt Designer Integration}
+ \i \l{Customizing Qt Widgets Using Style Sheets}
+ \tableofcontents{1 Customizing Qt Widgets Using Style Sheets}
+ \i \l{Qt Style Sheets Reference}
+ \tableofcontents{1 Qt Style Sheets Reference}
+ \i \l{Qt Style Sheets Examples}
+ \tableofcontents{1 Qt Style Sheets Examples}
+ \endlist
+
+ \target overview
+ \section1 Overview
+
+ Styles sheets are textual specifications that can be set on the
+ whole application using QApplication::setStyleSheet() or on a
+ specific widget (and its children) using
+ QWidget::setStyleSheet(). If several style sheets are set at
+ different levels, Qt derives the effective style sheet from all
+ of those that are set. This is called cascading.
+
+ For example, the following style sheet specifies that all
+ \l{QLineEdit}s should use yellow as their background color, and
+ all \l{QCheckBox}es should use red as the text color:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 0
+
+ For this kind of customization, style sheets are much more
+ powerful than QPalette. For example, it might be tempting to set
+ the QPalette::Button role to red for a QPushButton to obtain a
+ red push button. However, this wasn't guaranteed to work for all
+ styles, because style authors are restricted by the different
+ platforms' guidelines and (on Windows XP and Mac OS X) by the
+ native theme engine.
+
+ Style sheets let you perform all kinds of customizations that are
+ difficult or impossible to perform using QPalette alone. If you
+ want yellow backgrounds for mandatory fields, red text for
+ potentially destructive push buttons, or fancy check boxes, style
+ sheets are the answer.
+
+ Style sheets are applied on top of the current \l{QStyle}{widget
+ style}, meaning that your applications will look as native as
+ possible, but any style sheet constraints will be taken into
+ consideration. Unlike palette fiddling, style sheets offer
+ guarantees: If you set the background color of a QPushButton to be
+ red, you can be assured that the button will have a red background
+ in all styles, on all platforms. In addition, \l{Qt Designer}
+ provides style sheet integration, making it easy to view the effects
+ of a style sheet in different \l{QStyle}{widget styles}.
+
+ In addition, style sheets can be used to provide a distinctive
+ look and feel for your application, without having to subclass
+ QStyle. For example, you can specify arbitrary images for radio
+ buttons and check boxes to make them stand out. Using this
+ technique, you can also achieve minor customizations that would
+ normally require subclassing several style classes, such as
+ specifying a \l{QStyle::styleHint()}{style hint}. The
+ \l{widgets/stylesheet}{Style Sheet} example depicted below defines
+ two distinctive style sheets that you can try out and modify at
+ will.
+
+ \table
+ \row \o \inlineimage stylesheet-coffee-xp.png
+ \o \inlineimage stylesheet-pagefold.png
+ \row \o Coffee theme running on Windows XP
+ \o Pagefold theme running on Windows XP
+ \endtable
+
+ \table
+ \row \o \inlineimage stylesheet-coffee-cleanlooks.png
+ \o \inlineimage stylesheet-pagefold-mac.png
+ \row \o Coffee theme running on Ubuntu Linux
+ \o Pagefold theme running on Mac OS X
+ \endtable
+
+ When a style sheet is active, the QStyle returned by QWidget::style()
+ is a wrapper "style sheet" style, \e not the platform-specific style. The
+ wrapper style ensures that any active style sheet is respected and
+ otherwise forwards the drawing operations to the underlying,
+ platform-specific style (e.g., QWindowsXPStyle on Windows XP).
+
+ Since Qt 4.5, Qt style sheets fully supports Mac OS X.
+
+ \warning Qt style sheets are currently not supported for custom QStyle
+ subclasses. We plan to address this in some future release.
+*/
+
+ /*!
+ \page stylesheet-syntax.html
+ \contentspage {Qt Style Sheet}{Contents}
+ \previouspage Qt Style Sheet
+ \nextpage Qt Designer Integration
+ \title The Style Sheet Syntax
+
+ Qt Style Sheet terminology and syntactic rules are almost
+ identical to those of HTML CSS. If you already know CSS, you can
+ probably skim quickly through this section.
+
+ \section1 Style Rules
+
+ Style sheets consist of a sequence of style rules. A \e{style
+ rule} is made up of a selector and a declaration. The
+ \e{selector} specifies which widgets are affected by the rule;
+ the \e{declaration} specifies which properties should be set on
+ the widget. For example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 1
+
+ In the above style rule, \c QPushButton is the selector and \c{{
+ color: red }} is the declaration. The rule specifies that
+ QPushButton and its subclasses (e.g., \c MyPushButton) should use
+ red as their foreground color.
+
+ Qt Style Sheet is generally case insensitive (i.e., \c color,
+ \c Color, \c COLOR, and \c cOloR refer to the same property).
+ The only exceptions are class names,
+ \l{QObject::setObjectName()}{object names}, and Qt property
+ names, which are case sensitive.
+
+ Several selectors can be specified for the same declaration,
+ using commas (\c{,}) to separate the selectors. For example,
+ the rule
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 2
+
+ is equivalent to this sequence of three rules:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 3
+
+ The declaration part of a style rule is a list of
+ \tt{\e{property}: \e{value}} pairs, enclosed in braces (\c{{}})
+ and separated with semicolons. For example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 4
+
+ See the \l{List of Properties} section below for the list of
+ properties provided by Qt widgets.
+
+ \section1 Selector Types
+
+ All the examples so far used the simplest type of selector, the
+ Type Selector. Qt Style Sheets support all the
+ \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{selectors
+ defined in CSS2}. The table below summarizes the most useful
+ types of selectors.
+
+ \table 100%
+ \header
+ \o Selector
+ \o Example
+ \o Explanation
+
+ \row
+ \o Universal Selector
+ \o \c *
+ \o Matches all widgets.
+
+ \row
+ \o Type Selector
+ \o \c QPushButton
+ \o Matches instances of QPushButton and of its subclasses.
+
+ \row
+ \o Property Selector
+ \o \c{QPushButton[flat="false"]}
+ \o Matches instances of QPushButton that are not
+ \l{QPushButton::}{flat}. You may use this selector to test
+ for any Qt property specified using Q_PROPERTY(). In
+ addition, the special \c class property is supported, for
+ the name of the class.
+
+ This selector may also be used to test dynamic properties.
+ For more information on customization using dynamic properties,
+ refer to \l{Customizing Using Dynamic Properties}.
+
+ Instead of \c =, you can also use \c ~= to test whether a
+ Qt property of type QStringList contains a given QString.
+
+ \warning If the value of the Qt property changes after the
+ style sheet has been set, it might be necessary to force a
+ style sheet recomputation. One way to achieve this is to
+ unset the style sheet and set it again.
+
+ \row
+ \o Class Selector
+ \o \c .QPushButton
+ \o Matches instances of QPushButton, but not of its subclasses.
+
+ This is equivalent to \c{*[class~="QPushButton"]}.
+
+ \row
+ \o ID \target ID Selector
+ Selector
+ \o \c{QPushButton#okButton}
+ \o Matches all QPushButton instances whose
+ \l{QObject::objectName}{object name} is \c okButton.
+
+ \row
+ \o Descendant Selector
+ \o \c{QDialog QPushButton}
+ \o Matches all instances of QPushButton that are descendants
+ (children, grandchildren, etc.) of a QDialog.
+
+ \row
+ \o Child Selector
+ \o \c{QDialog > QPushButton}
+ \o Matches all instances of QPushButton that are direct
+ children of a QDialog.
+ \endtable
+
+ \section1 Sub-Controls
+
+ For styling complex widgets, it is necessary to access subcontrols of the
+ widget, such as the drop-down button of a QComboBox or the up and down
+ arrows of a QSpinBox. Selectors may contain \e{subcontrols} that make it
+ possible to restrict the application of a rule to specific widget
+ subcontrols. For example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 5
+
+ The above rule styles the drop-down button of all \l{QComboBox}es.
+ Although the double-colon (\c{::}) syntax is reminiscent of CSS3
+ Pseudo-Elements, Qt Sub-Controls differ conceptually from these and have
+ different cascading semantics.
+
+ Sub-controls are always positioned with respect to another element - a
+ reference element. This reference element could be the widget or another
+ Sub-control. For example, the \l{Qt Style Sheets Reference#drop-down-sub}
+ {::drop-down} of a QComboBox is placed, by default, in the top right corner
+ of the Padding rectangle of the QComboBox. The
+ \l{Qt Style Sheets Reference#drop-down-sub}{::drop-down} is placed,
+ by default, in the Center of the Contents rectangle of the
+ \l{Qt Style Sheets Reference#drop-down-sub}{::drop-down} Sub-control. See
+ the \l{List of Stylable Widgets} below for the Sub-controls to use to
+ style a widget and their default positions.
+
+ The origin rectangle to be used can be changed using the
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}
+ property. For example, if we want to place the drop-down in the margin
+ rectangle of the QComboBox instead of the default Padding rectangle, we
+ can specify:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 6
+
+ The alignment of the drop-down within the Margin rectangle is changed
+ using \l{Qt Style Sheets Reference#subcontrol-position-prop}
+ {subcontrol-position} property.
+
+ The \l{Qt Style Sheets Reference#width-prop}{width} and
+ \l{Qt Style Sheets Reference#height-prop}{height} properties can be used
+ to control the size of the Sub-control. Note that setting a
+ \l{Qt Style Sheets Reference#image-prop}{image} implicitly sets the size
+ of a Sub-control.
+
+ The relative positioning scheme
+ (\l{Qt Style Sheets Reference#position-prop}{position} : relative),
+ allows the position of the Sub-Control to be offset from its initial
+ position. For example, when the QComboBox's drop-down button is
+ pressed, we might like the arrow inside to be offset to give a
+ "pressed" effect. To achieve this, we can specify:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 7
+
+ The absolute positioning scheme
+ (\l{Qt Style Sheets Reference#position-prop}{position} : absolute),
+ allows the position and size of the Sub-control to be changed with
+ respect to the reference element.
+
+ Once positioned, they are treated the same as widgets and can be styled
+ using the the \l{box model}.
+
+ See the \l{List of Sub-Controls} below for a list of supported
+ sub-controls, and \l{Customizing the QPushButton's Menu Indicator
+ Sub-Control} for a realistic example.
+
+ \note With complex widgets such as QComboBox and QScrollBar, if one
+ property or sub-control is customized, \bold{all} the other properties or
+ sub-controls must be customized as well.
+
+ \section1 Pseudo-States
+
+ Selectors may contain \e{pseudo-states} that denote that restrict
+ the application of the rule based on the widget's state.
+ Pseudo-states appear at the end of the selector, with a colon
+ (\c{:}) in between. For example, the following rule applies when
+ the mouse hovers over a QPushButton:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 8
+
+ Pseudo-states can be negated using the exclamation operator. For
+ example, the following rule applies when the mouse does not hover
+ over a QRadioButton:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 9
+
+ Pseudo-states can be chained, in which case a logical AND is
+ implied. For example, the following rule applies to when the
+ mouse hovers over a checked QCheckBox:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 10
+
+ Negated Pseudo-states may appear in Pseudo-state chains. For example,
+ the following rule applies when the mouse hovers over a QPushButton
+ that is not pressed:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 11
+
+ If needed, logical OR can be expressed using the comma operator:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 12
+
+ Pseudo-states can appear in combination with subcontrols. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 13
+
+ See the \l{List of Pseudo-States} section below for the list of
+ pseudo-states provided by Qt widgets.
+
+ \section1 Conflict Resolution
+
+ Conflicts arise when several style rules specify the same
+ properties with different values. Consider the following style
+ sheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 14
+
+ Both rules match QPushButton instances called \c okButton and
+ there is a conflict for the \c color property. To resolve this
+ conflict, we must take into account the \e specificity of the
+ selectors. In the above example, \c{QPushButton#okButton} is
+ considered more specific than \c QPushButton, because it
+ (usually) refers to a single object, not to all instances of a
+ class.
+
+ Similarly, selectors with pseudo-states are more specific that
+ ones that do not specify pseudo-states. Thus, the following style
+ sheet specifies that a \l{QPushButton} should have white text
+ when the mouse is hovering over it, otherwise red text:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 15
+
+ Here's a tricky one:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 16
+
+ Here, both selectors have the same specificity, so if the mouse
+ hovers over the button while it is enabled, the second rule takes
+ precedence. If we want the text to be white in that case, we can
+ reorder the rules like this:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 17
+
+ Alternatively, we can make the first rule more specific:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 18
+
+ A similar issue arises in conjunction with Type Selectors.
+ Consider the following example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 19
+
+ Both rules apply to QPushButton instances (since QPushButton
+ inherits QAbstractButton) and there is a conflict for the
+ \l{Qt Style Sheets Reference#color-prop}{color} property. Because QPushButton
+ inherits QAbstractButton, it might be tempting to assume that
+ \c QPushButton is more specific than \c QAbstractButton. However,
+ for style sheet computations, all Type Selectors have the same
+ specificity, and the rule that appears last takes precedence. In
+ other words, \l{Qt Style Sheets Reference#color-prop}{color} is set to \c gray
+ for all \l{QAbstractButton}s, including \l{QPushButton}s. If we really
+ want \l{QPushButton}s to have red text, we can always reorder the
+ rules.
+
+ For determining the specificity of a rule, Qt Style Sheets follow
+ the
+ \l{http://www.w3.org/TR/REC-CSS2/cascade.html#specificity}{CSS2
+ Specification}:
+
+ \quotation
+ \e{A selector's specificity is calculated as follows:}
+
+ \list
+ \o \e{count the number of ID attributes in the selector (= a)}
+ \o \e{count the number of other attributes and pseudo-classes in the selector (= b)}
+ \o \e{count the number of element names in the selector (= c)}
+ \o \e{ignore pseudo-elements [i.e., \l{subcontrols}].}
+ \endlist
+
+ \e{Concatenating the three numbers a-b-c (in a number system with a
+ large base) gives the specificity.}
+
+ \e{Some examples:}
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 20
+ \endquotation
+
+ \section1 Cascading
+
+ Style sheets can be set on the QApplication, on parent widgets,
+ and on child widgets. An arbitrary widget's effective style sheet
+ is obtained by merging the style sheets set on the widget's
+ ancestors (parent, grandparent, etc.), as well as any style sheet
+ set on the QApplication.
+
+ When conflicts arise, the widget's own style sheet is always
+ preferred to any inherited style sheet, irrespective of the
+ specificity of the conflicting rules. Likewise, the parent
+ widget's style sheet is preferred to the grandparent's, etc.
+
+ One consequence of this is that setting a style rule on a widget
+ automatically gives it precedence over other rules specified in
+ the ancestor widgets' style sheets or the QApplication style
+ sheet. Consider the following example. First, we set a style
+ sheet on the QApplication:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 21
+
+ Then we set a style sheet on a QPushButton object:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 22
+
+ The style sheet on the QPushButton forces the QPushButton (and
+ any child widget) to have blue text, in spite of the more
+ specific rule set provided by the application-wide style sheet.
+
+ The result would have been the same if we had written
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 23
+
+ except that if the QPushButton had children (which is unlikely),
+ the style sheet would have no impact on them.
+
+ Style sheet cascading is a complex topic. Refer to the
+ \l{http://www.w3.org/TR/CSS2/cascade.html#cascade}{CSS2
+ Specification} for the gory details. Be aware that Qt currently
+ doesn't implement \c{!important}.
+
+ \section1 Inheritance
+
+ In classic CSS, when font and color of an item is not explicitly set,
+ it gets automatically inherited from the parent. When using Qt Style Sheets,
+ a widget does \bold{not} automatically inherit its font and color setting
+ from its parent widget.
+
+ For example, consider a QPushButton inside a QGroupBox:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 24
+
+ The QPushButton does not have an explicit color set. Hence, instead
+ of inheriting color of its parent QGroupBox, it has the system color.
+ If we want to set the color on a QGroupBox and its children,
+ we can write:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 25
+
+ In contrast, setting a font and propagate using QWidget::setFont() and
+ QWidget::setPalette() propagates to child widgets.
+
+ \section1 Widgets inside C++ namespaces
+
+ The Type Selector can be used to style widgets of a particular type. For
+ example,
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 26
+
+ Qt Style Sheet uses QObject::className() of the widget to determine
+ when to apply the Type Selector. When custom widgets are inside namespaces,
+ the QObject::className() returns <namespace>::<classname>. This conflicts
+ with the syntax for \l{Sub-Controls}. To overcome this problem,
+ when using the Type Selector for widgets inside namespaces, we must
+ replace the "::" with "--". For example,
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 27
+
+ \section1 Setting QObject properties
+
+ From 4.3 and above, any designable Q_PROPERTY
+ can be set using the qproperty-<property name> syntax.
+
+ For example,
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 28
+
+ If the property references an enum declared with Q_ENUMS, you should
+ reference its constants by name, i.e., not their numeric value.
+
+ */
+
+ /*!
+ \page stylesheet-designer.html
+ \contentspage {Qt Style Sheet}{Contents}
+ \previouspage The Style Sheet Syntax
+ \nextpage Customizing Qt Widgets Using Style Sheets
+ \title Qt Designer Integration
+
+ \l{Qt Designer}{Qt Designer} is an excellent tool
+ to preview style sheets. You can right-click on any widget in Designer
+ and select \gui{Change styleSheet...} to set the style sheet.
+
+ \image designer-stylesheet-options.png
+
+ In Qt 4.2 and later, \l{Qt Designer}{Qt Designer} also includes a
+ style sheet syntax highlighter and validator. The validator indicates
+ if the syntax is valid or invalid, at the bottom left of the \gui{Edit
+ Style Sheet} dialog.
+
+ \image designer-validator-highlighter.png
+
+ When you click \gui{OK} or \gui{Apply}, \QD will automatically display
+ the widget with its new stylesheet.
+
+ \image designer-stylesheet-usage.png
+ */
+
+ /*!
+ \page stylesheet-customizing.html
+ \contentspage {Qt Style Sheet}{Contents}
+ \previouspage Qt Designer Integration
+ \nextpage Qt Style Sheets Reference
+ \title Customizing Qt Widgets Using Style Sheets
+
+ When using style sheets, every widget is treated as a box with four
+ concentric rectangles: the margin rectangle, the border rectangle, the
+ padding rectangle, and the content rectangle. The box model describes
+ this in further detail.
+
+ \target box model
+ \section1 The Box Model
+
+ The four concentric rectangles appear conceptually as below:
+
+ \image stylesheet-boxmodel.png
+
+ \list
+ \o The margin falls outside the border.
+ \o The border is drawn between the margin and the padding.
+ \o The padding falls inside the border, between the border and
+ the actual contents.
+ \o The content is what is left from the original widget or
+ subcontrol once we have removed the margin, the border, and
+ the padding.
+ \endlist
+
+ The \l{Qt Style Sheets Reference#margin-prop}{margin},
+ \l{Qt Style Sheets Reference#border-width-prop}
+ {border-width}, and
+ \l{Qt Style Sheets Reference#padding-prop}{padding}
+ properties all default to zero. In that case, all four rectangles
+ (\c margin, \c border, \c padding, and \c content) coincide exactly.
+
+ You can specify a background for the widget using the
+ \l{Qt Style Sheets Reference#background-image-prop}{background-image}
+ property. By default, the background-image is drawn only for the area
+ inside the border. This can be changed using the
+ \l{Qt Style Sheets Reference#background-clip-prop}{background-clip}
+ property. You can use
+ \l{Qt Style Sheets Reference#background-repeat-prop}{background-repeat}
+ and
+ \l{Qt Style Sheets Reference#background-origin-prop}{background-origin}
+ to control the repetition and origin of the background image.
+
+ A background-image does not scale with the size of the widget. To provide
+ a "skin" or background that scales along with the widget size, one must
+ use
+ \l{Qt Style Sheets Reference#border-image-prop}{border-image}. Since the
+ border-image property provides an alternate background, it is not required
+ to specify a background-image when border-image is specified. In the case,
+ when both of them are specified, the border-image draws over the
+ background-image.
+
+ In addition, the \l{Qt Style Sheets Reference#image-prop}{image} property
+ may be used to draw an image over the border-image. The image specified does
+ not tile or stretch and when its size does not match the size of the widget,
+ its alignment is specified using the
+ \l{Qt Style Sheets Reference#image-position-prop}{image-position}
+ property. Unlike background-image and border-image, one may specify a
+ SVG in the image property, in which case the image is scaled automatically
+ according to the widget size.
+
+ The steps to render a rule are as follows:
+ \list
+ \o Set clip for entire rendering operation (border-radius)
+ \o Draw the background (background-image)
+ \o Draw the border (border-image, border)
+ \o Draw overlay image (image)
+ \endlist
+
+ \target sub controls
+ \section1 Sub-controls
+
+ A widget is considered as a heirarchy (tree) of subcontrols drawn on top
+ of each other. For example, the QComboBox draws the drop-down sub-control
+ followed by the down-arrow sub-control. A QComboBox is thus rendered as
+ follows:
+ \list
+ \o Render the QComboBox { } rule
+ \o Render the QComboBox::drop-down { } rule
+ \o Render the QComboBox::down-arrow { } rule
+ \endlist
+
+ Sub-controls share a parent-child relationship. In the case of QComboBox,
+ the parent of down-arrow is the drop-down and the parent of drop-down is
+ the widget itself. Sub-controls are positioned within their parent using
+ the \l{Qt Style Sheets Reference#subcontrol-position-prop}
+ {subcontrol-position} and
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}
+ properties.
+
+ Once positioned, sub-controls can be styled using the the \l{box model}.
+
+ \note With complex widgets such as QComboBox and QScrollBar, if one
+ property or sub-control is customized, \bold{all} the other properties or
+ sub-controls must be customized as well.
+
+ */
+
+ /*!
+ \page stylesheet-reference.html
+ \contentspage {Qt Style Sheet}{Contents}
+ \previouspage Customizing Qt Widgets Using Style Sheets
+ \nextpage Qt Style Sheets Examples
+ \title Qt Style Sheets Reference
+
+ Qt Style Sheets support various properties, pseudo-states, and
+ subcontrols that make it possible to customize the look of
+ widgets.
+
+ \tableofcontents
+
+ \section1 List of Stylable Widgets
+
+ The following table lists the Qt widgets that can be customized
+ using style sheets:
+
+ \table 100%
+ \header
+ \o Widget
+ \o How to Style
+
+ \row
+ \o QAbstractScrollArea \target qabstractscrollarea-widget
+ \o Supports the \l{box model}.
+
+ All derivatives of QAbstractScrollArea, including QTextEdit,
+ and QAbstractItemView (all item view classes), support
+ scrollable backgrounds using
+ \l{Qt Style Sheets Reference#background-attachment-prop}
+ {background-attachment}. Setting the background-attachment to
+ \c{fixed} provides a background-image that does not scroll with the
+ viewport. Setting the background-attachment to \c{scroll}, scrolls
+ the background-image when the scroll bars move.
+
+ See \l{Qt Style Sheets Examples#Customizing QAbstractScrollArea}
+ {Customizing QAbstractScrollArea} for an example.
+
+ \row
+ \o QCheckBox \target qcheckbox-widget
+ \o Supports the \l{box model}. The check indicator can be
+ styled using the \l{#indicator-sub}{::indicator}
+ subcontrol. By default, the indicator is placed in the Top
+ Left corner of the Contents rectangle of the widget.
+
+ The \l{#spacing-prop}{spacing} property
+ specifies the spacing between the check indicator and
+ the text.
+
+ See \l{Qt Style Sheets Examples#Customizing QCheckBox}
+ {Customizing QCheckBox} for an example.
+
+ \row
+ \o QColumnView \target qcolumnview-widget
+ \o The grip can be styled be using the \l{image-prop}{image} property.
+ The arrow indicators can by styled using the
+ \l{left-arrow-sub}{::left-arrow} subcontrol and the
+ \l{right-arrow-sub}{::right-arrow} subcontrol.
+
+ \row
+ \o QComboBox \target qcombobox-widget
+ \o The frame around the combobox can be styled using the
+ \l{box model}. The drop-down button can be styled using
+ the \l{#drop-down-sub}{::drop-down} subcontrol. By default, the
+ drop-down button is placed in the top right corner of the padding
+ rectangle of the widget. The arrow mark inside the drop-down button
+ can be styled using the \l{#down-arrow-sub}{::down-arrow}
+ subcontrol. By default, the arrow is placed in the center of the
+ contents rectangle of the drop-down subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QComboBox}{Customizing QComboBox}
+ for an example.
+
+ \row
+ \o QDateEdit \target qdateedit-widget
+ \o See \l{#qspinbox-widget}{QSpinBox}.
+
+ \row
+ \o QDateTimeEdit \target qdatetimeedit-widget
+ \o See \l{#qspinbox-widget}{QSpinBox}.
+
+ \row
+ \o QDialog \target qdialog-widget
+ \o Supports only the \l{Qt Style Sheets Reference#background-prop}{background},
+ \l{#background-clip-prop}{background-clip} and
+ \l{#background-origin-prop}{background-origin} properties.
+
+ \warning Make sure you define the Q_OBJECT macro for your custom
+ widget.
+
+ \row
+ \o QDialogButtonBox \target qdialogbuttonbox-widget
+ \o The layout of buttons can be altered using the
+ \l{#button-layout-prop}{button-layout} property.
+
+ \row
+ \o QDockWidget \target qdockwidget-widget
+ \o Supports styling of the title bar and the title bar buttons when docked.
+
+ The dock widget border can be styled using the \l{#border-prop}{border}
+ property. The \l{#title-sub}{::title} subcontrol can be used to customize
+ the title bar. The close and float buttons are positioned with respect
+ to the \l{title-sub}{::title} subcontrol using the
+ \l{#close-button-sub}{::close-button} and
+ \l{#float-button-sub}{::float-button} respectively.
+
+ When the title bar is vertical, the \l{#vertical-ps}{:vertical} pseudo
+ class is set. In addition, depending on QDockWidget::DockWidgetFeature,
+ the \l{#closable-ps}{:closable}, \l{#floatable-ps}{:floatable} and
+ \l{#movable-ps}{:movable} pseudo states are set.
+
+ \note Use QMainWindow::separator to style the resize handle.
+
+ \warning The style sheet has no effect when the QDockWidget is undocked
+ as Qt uses native top level windows when undocked.
+
+ See \l{Qt Style Sheets Examples#Customizing QDockWidget}
+ {Customizing QDockWidget} for an example.
+
+ \row
+ \o QDoubleSpinBox \target qdoublespinbox-widget
+ \o See \l{#qspinbox-widget}{QSpinBox}.
+
+ \row
+ \o QFrame \target qframe-widget
+ \o Supports the \l{box model}.
+
+ Since 4.3, setting a stylesheet on a QLabel automatically
+ sets the QFrame::frameStyle property to QFrame::StyledPanel.
+
+ See \l{Qt Style Sheets Examples#Customizing QFrame}{Customizing QFrame}
+ for an example.
+
+ \row
+ \o QGroupBox \target qgroupbox-widget
+ \o Supports the \l{box model}. The title can be styled using the
+ \l{#title-sub}{::title} subcontrol. By default, the title is placed
+ depending on QGroupBox::textAlignment.
+
+ In the case of a checkable QGroupBox, the title includes the
+ check indicator. The indicator is styled using the
+ the \l{#indicator-sub}{::indicator} subcontrol. The
+ \l{#spacing-prop}{spacing} property can be used to control
+ the spacing between the text and indicator.
+
+ See \l{Qt Style Sheets Examples#Customizing QGroupBox}{Customizing QGroupBox}
+ for an example.
+
+ \row
+ \o QHeaderView \target qheaderview-widget
+ \o Supports the \l{box model}. The sections of the header view are
+ styled using the \l{#section-sub}{::section} sub control. The
+ \c{section} Sub-control supports the \l{#middle-ps}{:middle},
+ \l{#first-ps}{:first}, \l{#last-ps}{:last},
+ \l{#only-one-ps}{:only-one}, \l{#next-selected-ps}{:next-selected},
+ \l{#previous-selected-ps}{:previous-selected},
+ \l{#selected-ps}{:selected} pseudo states.
+
+ Sort indicator in can be styled using the
+ \l{#up-arrow-sub}{::up-arrow} and the
+ \l{#down-arrow-sub}{::down-arrow} Sub-control.
+
+ See \l{Qt Style Sheets Examples#Customizing QHeaderView}{Customizing QHeaderView}
+ for an example.
+
+ \row
+ \o QLabel \target qlabel-widget
+ \o Supports the \l{box model}. Does not support the
+ \l{#hover-ps}{:hover} pseudo-state.
+
+ Since 4.3, setting a stylesheet on a QLabel automatically
+ sets the QFrame::frameStyle property to QFrame::StyledPanel.
+
+ See \l{Qt Style Sheets Examples#Customizing QFrame}{Customizing QFrame} for an
+ example (a QLabel derives from QFrame).
+
+ \row
+ \o QLineEdit \target qlineedit-widget
+ \o Support the \l{box model}.
+
+ The color and background of the selected item is styled using
+ \l{#selection-color-prop}{selection-color} and
+ \l{#selection-background-color-prop}{selection-background-color}
+ respectively.
+
+ The password character can be styled using the
+ \l{#lineedit-password-character-prop}{lineedit-password-character}
+ property.
+
+ See \l{Qt Style Sheets Examples#Customizing QLineEdit}{Customizing QLineEdit}
+ for an example.
+
+ \row
+ \o QListView \target qlistview-widget
+ \o Supports the \l{box model}. When
+ \l{QAbstractItemView::alternatingRowColors}{alternating row colors}
+ is enabled, the alternating colors can be styled using the
+ \l{#alternate-background-color-prop}{alternate-background-color}
+ property.
+
+ The color and background of the selected item is styled using
+ \l{#selection-color-prop}{selection-color} and
+ \l{#selection-background-color-prop}{selection-background-color}
+ respectively.
+
+ The selection behavior is controlled by the
+ \l{#show-decoration-selected-prop}{show-decoration-selected} property.
+
+ Use the \l{#item-sub}{::item} subcontrol for more fine grained
+ control over the items in the QListView.
+
+ See \l{qabstractscrollarea-widget}{QAbsractScrollArea} to
+ style scrollable backgrounds.
+
+ See \l{Qt Style Sheets Examples#Customizing QListView}
+ {Customzing QListView} for an example.
+
+ \row
+ \o QListWidget \target qlistwidget-widget
+ \o See \l{#qlistview-widget}{QListView}.
+
+ \row
+ \o QMainWindow \target qmainwindow-widget
+ \o Supports styling of the separator
+
+ The separator in a QMainWindow when using QDockWidget is styled
+ using the \l{#separator-sub}{::separator} subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QMainWindow}{Customizing QMainWindow}
+ for an example.
+
+ \row
+ \o QMenu \target qmenu-widget
+ \o Supports the \l{box model}.
+
+ Individual items are styled using the \l{#item-sub}{::item}
+ subcontrol. In addition to the usually supported pseudo states,
+ \c{item} subcontrol supports the
+ \l{#selected-ps}{:selected}, \l{#default-ps}{:default},
+ \l{#exclusive-ps}{:exclusive} and the
+ \l{#non-exclusive-ps}{non-exclusive} pseudo states.
+
+ The indicator of checkable menu items is styled using the
+ \l{#indicator-sub}{::indicator} subcontrol.
+
+ The separator is styled using the \l{#separator-sub}{::separator}
+ subcontrol.
+
+ For items with a sub menu, the arrow marks are styled using the
+ \l{::right-arrow-sub}{right-arrow} and
+ \l{::left-arrow-sub}{left-arrow}.
+
+ The scroller is styled using the \l{#scroller-sub}{::scroller}.
+
+ The tear-off is styled using the \l{#tear-off-sub}{::tear-off}.
+
+ See \l{Qt Style Sheets Examples#Customizing QMenu}{Customizing QMenu}
+ for an example.
+
+ \row
+ \o QMenuBar \target qmenubar-widget
+ \o Supports the \l{box model}. The \l{#spacing-prop}{spacing}
+ property specifies the spacing between menu items.
+ Individual items are styled using the \l{#item-sub}{::item}
+ subcontrol.
+
+ \warning When running on Qt/Mac, the menu bar is usually embedded into the
+ system-wide menu bar. In this case, the style sheet will have no effect.
+
+ See \l{Qt Style Sheets Examples#Customizing QMenuBar}{Customizing QMenuBar}
+ for an example.
+
+ \row
+ \o QMessageBox \target qmessagebox-widget
+ \o The \l{#messagebox-text-interaction-flags-prop}
+ {messagebox-text-interaction-flags} property can be used to alter
+ the interaction with text in the message box.
+
+ \row
+ \o QProgressBar \target qprogressbar-widget
+ \o Supports the \l{box model}. The chunks of the progress bar
+ can be styled using the \l{#chunk-sub}{::chunk} subcontrol.
+ The chunk is displayed on the Contents rectangle of the widget.
+
+ If the progress bar displays text, use the \l{text-align-prop}{text-align}
+ property to position the text.
+
+ Indeterminate progress bars have the
+ \l{#indeterminate-ps}{:indeterminate} pseudo state set.
+
+ See \l{Qt Style Sheets Examples#Customizing QProgressBar}{Customizing QProgressBar}
+ for an example.
+
+ \row
+ \o QPushButton \target qpushbutton-widget
+ \o Supports the \l{box model}. Supports the \l{#default-ps}{:default},
+ \l{#flat-ps}{:flat}, \l{#checked-ps}{:checked} pseudo states.
+
+ For QPushButton with a menu, the menu indicator is styled
+ using the \l{#menu-indicator-sub}{::menu-indicator}
+ subcontrol. Appearance of checkable push buttons can be
+ customized using the \l{#open-ps}{:open} and
+ \l{#closed-ps}{:closed} pseudo-states.
+
+ \warning If you only set a background-color on a QPushButton, the background
+ may not appear unless you set the border property to some value. This is
+ because, by default, the QPushButton draws a native border which completely
+ overlaps the background-color. For example,
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 30
+
+ See \l{Qt Style Sheets Examples#Customizing QPushButton}{Customizing QPushButton}
+ for an example.
+
+ \row
+ \o QRadioButton \target qradiobutton-widget
+ \o Supports the \l{box model}. The check indicator can be
+ styled using the \l{#indicator-sub}{::indicator}
+ subcontrol. By default, the indicator is placed in the Top
+ Left corner of the Contents rectangle of the widget.
+
+ The \l{#spacing-prop}{spacing} property
+ specifies the spacing between the check indicator and
+ the text.
+
+ See \l{Qt Style Sheets Examples#Customizing QRadioButton}
+ {Customizing QRadioButton} for an example.
+
+ \row
+ \o QScrollBar \target qscrollbar-widget
+ \o Supports the \l{box model}. The Contents rectangle of the widget
+ is considered to be the groove over which the slider moves. The extent
+ of the QScrollBar (i.e the width or the height depending on the orientation)
+ is set using the \l{#width-prop}{width} or \l{#height-prop}{height} property
+ respectively. To determine the orientation, use the
+ \l{#horizontal-ps}{:horizontal} and the \l{vertical-ps}{:vertical}
+ pseudo states.
+
+ The slider can be styled using the \l{#handle-sub}{::handle} subcontrol.
+ Setting the \l{#min-width-prop}{min-width} or \l{#min-height-prop}{min-height}
+ provides size contraints for the slider depending on the orientation.
+
+ The \l{add-line-sub}{::add-line} subcontrol can be used to style the
+ button to add a line. By default, the add-line subcontrol is placed in
+ top right corner of the Border rectangle of the widget. Depending on the
+ orientation the \l{#right-arrow-sub}{::right-arrow} or
+ \l{#down-arrow-sub}{::down-arrow}. By default, the arrows are placed in
+ the center of the Contents rectangle of the add-line subcontrol.
+
+ The \l{sub-line-sub}{::sub-line} subcontrol can be used to style the
+ button to subtract a line. By default, the sub-line subcontrol is placed in
+ bottom right corner of the Border rectangle of the widget. Depending on the
+ orientation the \l{#left-arrow-sub}{::left-arrow} or
+ \l{#up-arrow-sub}{::up-arrow}. By default, the arrows are placed in
+ the center of the Contents rectangle of the sub-line subcontrol.
+
+ The \l{sub-page-sub}{::sub-page} subcontrol can be used to style the
+ region of the slider that subtracts a page. The \l{add-page-sub}{::add-page}
+ subcontrol can be used to style the region of the slider that adds a page.
+
+ See \l{Qt Style Sheets Examples#Customizing QScrollBar}{Customizing QScrollBar}
+ for an example.
+
+ \row
+ \o QSizeGrip \target qsizegrip-widget
+ \o Supports the \l{#width-prop}{width},
+ \l{#height-prop}{height}, and \l{#image-prop}{image}
+ properties.
+
+ See \l{Qt Style Sheets Examples#Customizing QSizeGrip}{Customizing QSizeGrip}
+ for an example.
+
+ \row
+ \o QSlider \target qslider-widget
+ \o Supports the \l{box model}. For horizontal slides, the
+ \l{min-width-prop}{min-width} and \l{height-prop}{height}
+ properties must be provided. For vertical sliders, the
+ \l{min-height-prop}{min-height} and \l{width-prop}{width}
+ properties must be provided.
+
+ The groove of the slider is styled
+ using the \l{#groove-sub}{::groove}. The groove is
+ positioned by default in the Contents rectangle of the widget.
+ The thumb of the slider is styled using \l{#handle-sub}{::handle}
+ subcontrol. The subcontrol moves in the Contents rectangle of
+ the groove subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QSlider}{Customizing QSlider}
+ for an example.
+
+ \row
+ \o QSpinBox \target qspinbox-widget
+ \o The frame of the spin box can be styled using the \l{box
+ model}.
+
+ The up button and arrow can be styled using the
+ \l{#up-button-sub}{::up-button} and
+ \l{#up-arrow-sub}{::up-arrow} subcontrols. By default,
+ the up-button is placed in the top right corner in the
+ Padding rectangle of the widget. Without an explicit size,
+ it occupies half the height of its reference rectangle.
+ The up-arrow is placed in the center of the Contents
+ rectangle of the up-button.
+
+ The down button and arrow can be styled using the
+ \l{#down-button-sub}{::down-button} and
+ \l{#down-arrow-sub}{::down-arrow} subcontrols. By default,
+ the down-button is placed in the bottom right corner in the
+ Padding rectangle of the widget. Without an explicit size,
+ it occupies half the height of its reference rectangle.
+ The bottom-arrow is placed in the center of the Contents
+ rectangle of the bottom-button.
+
+ See \l{Qt Style Sheets Examples#Customizing QSpinBox}{Customizing QSpinBox}
+ for an example.
+
+ \row
+ \o QSplitter \target qsplitter-widget
+ \o Supports the \l{box model}. The handle of the splitter
+ is styled using the \l{#handle-sub}{::handle} subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QSplitter}{Customizing QSplitter}
+ for an example.
+
+ \row
+ \o QStatusBar \target qstatusbar-widget
+ \o Supports only the \l{Qt Style Sheets Reference#background-prop}
+ {background} property.
+ The frame for individual items can be style using the
+ \l{#item-sub}{::item} subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QStatusBar}{Customizing QStatusBar}
+ for an example.
+
+ \row
+ \o QTabBar \target qtabbar-widget
+ \o Individual tabs may be styled using the \l{#tab-sub}{::tab}
+ subcontrol. The tabs support the
+ \l{#only-one-ps}{:only-one}, \l{#first-ps}{:first},
+ \l{#last-ps}{:last}, \l{#middle-ps}{:middle},
+ \l{#previous-selected-ps}{:previous--selected},
+ \l{#next-selected-ps}{:next-selected},
+ \l{#selected-ps}{:selected} pseudo states.
+
+ The \l{#top-ps}{:top}, \l{#left-ps}{:left}, \l{#right-ps}{:right},
+ \l{#bottom-ps}{:bottom} pseudo states depending on the orientation
+ of the tabs.
+
+ Overlapping tabs for the selected state are created by using
+ negative margins or using the \c{absolute} position scheme.
+
+ The tear indicator of the QTabBar is styled using the
+ \l{#tear-sub}{::tear} subcontrol.
+
+ QTabBar used two QToolButtons for its scrollers that can be styled
+ using the \c{QTabBar QToolButton} selector. To specify the width
+ of the scroll button use the \l{#scroller-sub}{::scroller}
+ subcontrol.
+
+ The alignment of the tabs within the QTabBar is styled
+ using the \l{#Alignment}{alignment} property. \warning
+
+ To change the position of the QTabBar within a QTabWidget, use the
+ \l{#tab-bar-sub}{tab-bar} subcontrol (and set subcontrol-position).
+
+ See \l{Qt Style Sheets Examples#Customizing QTabWidget and QTabBar}{Customizing QTabBar}
+ for an example.
+
+ \row
+ \o QTabWidget \target qtabwidget-widget
+ \o The frame of the tab widget is styled using the
+ \l{#pane-sub}{::pane} subcontrol. The left and right
+ corners are styled using the \l{#left-corner-sub}{::left-corner}
+ and \l{#right-corner-sub}{::right-corner} respectively.
+ The position of the the tab bar is controlled using the
+ \l{#tab-bar-sub}{::tab-bar} subcontrol.
+
+ By default, the subcontrols have positions of a QTabWidget in
+ the QWindowsStyle. To place the QTabBar in the center, set the
+ subcontrol-position of the tab-bar subcontrol.
+
+ The \l{#top-ps}{:top}, \l{#left-ps}{:left}, \l{#right-ps}{:right},
+ \l{#bottom-ps}{:bottom} pseudo states depending on the orientation
+ of the tabs.
+
+ See \l{Qt Style Sheets Examples#Customizing QTabWidget and QTabBar}
+ {Customizing QTabWidget} for an example.
+
+ \row
+ \o QTableView \target qtableview-widget
+ \o Supports the \l{box model}. When
+ \l{QAbstractItemView::alternatingRowColors}{alternating row colors}
+ is enabled, the alternating colors can be styled using the
+ \l{#alternate-background-color-prop}{alternate-background-color}
+ property.
+
+ The color and background of the selected item is styled using
+ \l{#selection-color-prop}{selection-color} and
+ \l{#selection-background-color-prop}{selection-background-color}
+ respectively.
+
+ The corner widget in a QTableView is implemented as a QAbstractButton
+ and can be styled using the "QTableView QTableCornerButton::section"
+ selector.
+
+ \warning If you only set a background-color on a QTableCornerButton,
+ the background may not appear unless you set the border property to
+ some value. This is because, by default, the QTableCornerButton draws a
+ native border which completely overlaps the background-color.
+
+ The color of the grid can be specified using the
+ \l{#gridline-color-prop}{gridline-color} property.
+
+ See \l{qabstractscrollarea-widget}{QAbsractScrollArea} to
+ style scrollable backgrounds.
+
+ See \l{Qt Style Sheets Examples#Customizing QTableView}
+ {Customzing QTableView} for an example.
+
+ \row
+ \o QTableWidget \target qtablewidget-widget
+ \o See \l{#qtableview-widget}{QTableView}.
+
+ \row
+ \o QTextEdit \target qtextedit-widget
+ \o Supports the \l{box model}.
+
+ The color and background of selected text is styled using
+ \l{#selection-color-prop}{selection-color} and
+ \l{#selection-background-color-prop}{selection-background-color}
+ respectively.
+
+ See \l{qabstractscrollarea-widget}{QAbsractScrollArea} to
+ style scrollable backgrounds.
+
+ \row
+ \o QTimeEdit \target qtimeedit-widget
+ \o See \l{#qspinbox-widget}{QSpinBox}.
+
+ \row
+ \o QToolBar \target qtoolbar-widget
+ \o Supports the \l{box model}.
+
+ The \l{#top-ps}{:top}, \l{#left-ps}{:left}, \l{#right-ps}{:right},
+ \l{#bottom-ps}{:bottom} pseudo states depending on the area in
+ which the tool bar is grouped.
+
+ The \l{#first-ps}{:first}, \l{#last-ps}{:last}, \l{#middle-ps}{:middle},
+ \l{#only-one-ps}{:only-one} pseudo states indicator the position
+ of the tool bar within a line group (See
+ QStyleOptionToolBar::positionWithinLine).
+
+ The separator of a QToolBar is styled using the
+ \l{#separator-sub}{::separator} subcontrol.
+
+ The handle (to move the toolbar) is styled using the
+ \l{#handle-sub}{::handle} subcontrol.
+
+ See \l{Qt Style Sheets Examples#Customizing QToolBar}{Customizing QToolBar}
+ for an example.
+
+ \row
+ \o QToolButton \target qtoolbutton-widget
+ \o Supports the \l{box model}.
+
+ If the QToolButton has a menu, is
+ \l{#menu-indicator-sub}{::menu-indicator} subcontrol can be used to
+ style the indicator. By default, the menu-indicator is positioned
+ at the bottom right of the Padding rectangle of the widget.
+
+ If the QToolButton is in QToolButton::MenuButtonPopup mode,
+ the \l{#menu-button-sub}{::menu-button} subcontrol is used to draw the
+ menu button. \l{#menu-arrow-sub}{::menu-arrow} subcontrol is used to
+ draw the menu arrow inside the menu-button. By default, it is
+ positioned in the center of the Contents rectangle of the the
+ menu-button subcontrol.
+
+ When the QToolButton displays arrows, the \l{#up-arrow-sub}{::up-arrow},
+ \l{#down-arrow-sub}{::down-arrow}, \l{#left-arrow-sub}{::left-arrow}
+ and \l{#right-arrow-sub}{::right-arrow} subcontrols are used.
+
+ \warning If you only set a background-color on a QToolButton, the background
+ will not appear unless you set the border property to some value. This is
+ because, by default, the QToolButton draws a native border which completely
+ overlaps the background-color. For example,
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 31
+
+ See \l{Qt Style Sheets Examples#Customizing QToolButton}{Customizing QToolButton}
+ for an example.
+
+ \row
+ \o QToolBox \target qtoolbox-widget
+ \o Supports the \l{box model}.
+
+ The individual tabs can by styled using the
+ \l{#tab-sub}{::tab} subcontrol. The tabs support the
+ \l{#only-one-ps}{:only-one}, \l{#first-ps}{:first},
+ \l{#last-ps}{:last}, \l{#middle-ps}{:middle},
+ \l{#previous-selected-ps}{:previous-selected},
+ \l{#next-selected-ps}{:next-selected},
+ \l{#selected-ps}{:selected} pseudo states.
+
+ \row
+ \o QToolTip \target qtooltip-widget
+ \o Supports the \l{box model}. The \l{#opacity-prop}{opacity}
+ property controls the opacity of the tooltip.
+
+ See \l{Qt Style Sheets Examples#Customizing QFrame}{Customizing QFrame}
+ for an example (a QToolTip is a QFrame).
+
+ \row
+ \o QTreeView \target qtreeview-widget
+ \o Supports the \l{box model}. When
+ \l{QAbstractItemView::alternatingRowColors}{alternating row colors}
+ is enabled, the alternating colors can be styled using the
+ \l{#alternate-background-color-prop}{alternate-background-color}
+ property.
+
+ The color and background of the selected item is styled using
+ \l{#selection-color-prop}{selection-color} and
+ \l{#selection-background-color-prop}{selection-background-color}
+ respectively.
+
+ The selection behavior is controlled by the
+ \l{#show-decoration-selected-prop}{show-decoration-selected} property.
+
+ The branches of the tree view can be styled using the
+ \l{#branch-sub}{::branch} subcontrol. The
+ ::branch Sub-control supports the \l{open-ps}{:open},
+ \l{closed-ps}{:closed}, \l{has-siblings-ps}{:has-sibling} and
+ \l{has-children-ps}{:has-children} pseudo states.
+
+ Use the \l{#item-sub}{::item} subcontrol for more fine grained
+ control over the items in the QTreeView.
+
+ See \l{qabstractscrollarea-widget}{QAbsractScrollArea} to
+ style scrollable backgrounds.
+
+ See \l{Qt Style Sheets Examples#Customizing QTreeView}{Customizing QTreeView}
+ for an example to style the branches.
+
+ \row
+ \o QTreeWidget \target qtreewidget-widget
+ \o See \l{#qtreeview-widget}{QTreeView}.
+
+ \row
+ \o QWidget \target qwidget-widget
+ \o Supports only the \l{Qt Style Sheets Reference#background-prop}{background},
+ \l{#background-clip-prop}{background-clip} and
+ \l{#background-origin-prop}{background-origin} properties.
+
+ If you subclass from QWidget, you need to provide a paintEvent for your
+ custom QWidget as below:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 32
+
+ The above code is a no-operation if there is no stylesheet set.
+
+ \warning Make sure you define the Q_OBJECT macro for your custom
+ widget.
+
+ \endtable
+
+ \section1 List of Properties
+
+ The table below lists all the properties supported by Qt Style
+ Sheets. Which values can be given to an property depend on the
+ \l{List of Property Types}{property's type}. Unless otherwise
+ specified, properties below apply to all widgets. Properties
+ marked with an asterisk * are specific to Qt and have no equivalent
+ in CSS2 or CSS3.
+
+ \table 100%
+ \header
+ \o Property
+ \o Type
+ \o Description
+
+ \row
+ \o \bold{\c alternate-background-color} \target alternate-background-color-prop
+ \o \l{#Brush}{Brush} \BR
+ \o The \l{QAbstractItemView::alternatingRowColors}
+ {alternate background color} used in QAbstractItemView subclasses.
+
+ If this property is not set, the default value is
+ whatever is set for the palette's
+ \l{QPalette::}{AlternateBase} role.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 33
+
+ See also \l{Qt Style Sheets Reference#background-prop}{background} and
+ \l{#selection-background-color-prop}{selection-background-color}.
+
+ \row
+ \o \bold{\c background} \target background-prop
+ \o \l{#Background}{Background}
+ \o Shorthand notation for setting the background. Equivalent
+ to specifying \c background-color, \c background-image, \c
+ background-repeat, and/or \c background-position.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel, QLineEdit,
+ QMenu, QMenuBar, QPushButton, QRadioButton, QSplitter,
+ QTextEdit, QToolTip, and plain \l{QWidget}s.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 34
+
+
+ Often, it is required to set a fill pattern similar to the styles
+ in Qt::BrushStyle. You can use the background-color property for
+ Qt::SolidPattern, Qt::RadialGradientPattern, Qt::LinearGradientPattern
+ and Qt::ConicalGradientPattern. The other patterns are easily achieved
+ by creating a background image that contains the pattern.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 35
+
+ See also \l{#background-origin-prop}{background-origin},
+ \l{#selection-background-color-prop}{selection-background-color},
+ \l{#background-clip-prop}{background-clip},
+ \l{#background-attachment-prop}{background-attachment}
+ and \l{#alternate-background-color-prop}{alternate-background-color}.
+
+ \row
+ \o \c background-color \target background-color-prop
+ \o \l{#Brush}{Brush} \BR
+ \o The background color used for the widget.
+
+ Examples:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 36
+
+ \row
+ \o \c background-image \target background-image-prop
+ \o \l{#Url}{Url}
+ \o The background image used for the widget. Semi-transparent
+ parts of the image let the \c background-color shine
+ through.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 37
+
+ \row
+ \o \c background-repeat \target background-repeat-prop
+ \o \l{#Repeat}{Repeat}
+ \o Whether and how the background image is repeated to fill
+ the \c background-origin rectangle.
+
+ If this property is not specified, the background image
+ is repeated in both directions (\c repeat).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 38
+
+ \row
+ \o \c background-position
+ \o \l{#Alignment}{Alignment}
+ \o The alignment of the background image within the \c
+ background-origin rectangle.
+
+ If this property is not specified, the alignment is \c
+ top \c left.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 39
+
+ \row
+ \o \bold{\c background-attachment} \target background-attachment-prop
+ \o \l{#Attachment}{Attachment}
+ \o Determines whether the background-image in a QAbstractScrollArea
+ is scrolled or fixed with respect to the viewport.
+ By default, the background-image scrolls with the viewport.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 40
+
+ See also \l{Qt Style Sheets Reference#background-prop}{background}
+
+ \row
+ \o \bold{\c background-clip} \target background-clip-prop
+ \o \l{#Origin}{Origin}
+ \o The widget's rectangle, in which the \c background is drawn.
+
+ This property specifies the rectangle to which the \c background-color
+ and \c background-image are clipped.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel,
+ QPushButton, QRadioButton, QSplitter, QTextEdit, QToolTip,
+ and plain \l{QWidget}s.
+
+ If this property is not specified, the default is \c
+ border.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 41
+
+ See also \l{Qt Style Sheets Reference#background-prop}{background},
+ \l{#background-origin-prop}{background-origin} and \l{The Box Model}.
+
+ \row
+ \o \bold{\c background-origin} \target background-origin-prop
+ \o \l{#Origin}{Origin}
+ \o The widget's background rectangle, to use in conjunction
+ with \c background-position and \c background-image.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel,
+ QPushButton, QRadioButton, QSplitter, QTextEdit, QToolTip,
+ and plain \l{QWidget}s.
+
+ If this property is not specified, the default is \c
+ padding.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 42
+
+ See also \l{Qt Style Sheets Reference#background-prop}{background} and
+ \l{The Box Model}.
+
+ \row
+ \o \bold{\c border} \target border-prop
+ \o \l{#Border}{Border}
+ \o Shorthand notation for setting the widget's border. Equivalent
+ to specifying \c border-color, \c border-style, and/or
+ \c border-width.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel, QLineEdit,
+ QMenu, QMenuBar, QPushButton, QRadioButton, QSplitter,
+ QTextEdit, QToolTip, and plain \l{QWidget}s.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 43
+
+ \row
+ \o \c border-top
+ \o \l{#Border}{Border}
+ \o Shorthand notation for setting the widget's top border.
+ Equivalent to specifying \c border-top-color, \c
+ border-top-style, and/or \c border-top-width.
+
+ \row
+ \o \c border-right
+ \o \l{#Border}{Border}
+ \o Shorthand notation for setting the widget's right border.
+ Equivalent to specifying \c border-right-color, \c
+ border-right-style, and/or \c border-right-width.
+
+ \row
+ \o \c border-bottom
+ \o \l{#Border}{Border}
+ \o Shorthand notation for setting the widget's bottom border.
+ Equivalent to specifying \c border-bottom-color, \c
+ border-bottom-style, and/or \c border-bottom-width.
+
+ \row
+ \o \c border-left
+ \o \l{#Border}{Border}
+ \o Shorthand notation for setting the widget's left border.
+ Equivalent to specifying \c border-left-color, \c
+ border-left-style, and/or \c border-left-width.
+
+ \row
+ \o \bold{\c border-color} \target border-attrs
+ \target border-color-prop
+ \o \l{#Box Colors}{Box Colors}
+ \o The color of all the border's edges. Equivalent to
+ specifying \c border-top-color, \c border-right-color, \c
+ border-bottom-color, and \c border-left-color.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel, QLineEdit,
+ QMenu, QMenuBar, QPushButton, QRadioButton, QSplitter,
+ QTextEdit, QToolTip, and plain \l{QWidget}s.
+
+ If this property is not specified, it defaults to
+ \l{#color-prop}{color} (i.e., the widget's foreground
+ color).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 44
+
+ See also \l{Qt Style Sheets Reference#border-style-prop}{border-style},
+ \l{Qt Style Sheets Reference#border-width-prop}{border-width},
+ \l{#border-image-prop}{border-image}, and \l{The Box Model}.
+
+ \row
+ \o \c border-top-color
+ \o \l{#Brush}{Brush} \BR
+ \o The color of the border's top edge.
+
+ \row
+ \o \c border-right-color
+ \o \l{#Brush}{Brush} \BR
+ \o The color of the border's right edge.
+
+ \row
+ \o \c border-bottom-color
+ \o \l{#Brush}{Brush} \BR
+ \o The color of the border's bottom edge.
+
+ \row
+ \o \c border-left-color
+ \o \l{#Brush}{Brush} \BR
+ \o The color of the border's left edge.
+
+ \row
+ \o \bold{\c border-image} \target border-image-prop
+ \o \l{#Border Image}{Border Image}
+ \o The image used to fill the border. The image is cut into
+ nine parts and stretched appropriately if necessary. See
+ \l{#Border Image}{Border Image} for details.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QDialog, QFrame, QGroupBox, QLabel, QLineEdit,
+ QMenu, QMenuBar, QPushButton, QRadioButton, QSplitter,
+ QTextEdit and QToolTip.
+
+ See also \l{#border-color-prop}{border-color},
+ \l{Qt Style Sheets Reference#border-style-prop}{border-style},
+ \l{Qt Style Sheets Reference#border-width-prop}{border-width}, and
+ \l{The Box Model}.
+
+ \row
+ \o \bold{\c border-radius} \target border-radius-prop
+ \o \l{#Radius}{Radius}
+ \o The radius of the border's corners. Equivalent to
+ specifying \c border-top-left-radius, \c
+ border-top-right-radius, \c border-bottom-right-radius,
+ and \c border-bottom-left-radius.
+
+ The border-radius clips the element's
+ \l{Qt Style Sheets Reference#background-prop}{background}.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit,
+ and QToolTip.
+
+ If this property is not specified, it defaults to 0.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 45
+
+ See also \l{Qt Style Sheets Reference#border-width-prop}{border-width} and
+ \l{The Box Model}.
+
+ \row
+ \o \c border-top-left-radius
+ \o \l{#Radius}{Radius}
+ \o The radius of the border's top-left corner.
+
+ \row
+ \o \c border-top-right-radius
+ \o \l{#Radius}{Radius}
+ \o The radius of the border's top-right corner.
+
+ \row
+ \o \c border-bottom-right-radius
+ \o \l{#Radius}{Radius}
+ \o The radius of the border's bottom-right corner. Setting
+ this property to a positive value results in a rounded
+ corner.
+
+ \row
+ \o \c border-bottom-left-radius
+ \o \l{#Radius}{Radius}
+ \o The radius of the border's bottom-left corner. Setting this
+ property to a positive value results in a rounded corner.
+
+ \row
+ \o \bold{\c border-style} \target border-style-prop
+ \o \l {Border Style}
+ \o The style of all the border's edges.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit,
+ and QToolTip.
+
+ If this property is not specified, it defaults to \c none.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 46
+
+ See also \l{#border-color-prop}{border-color},
+ \l{Qt Style Sheets Reference#border-style-prop}{border-style},
+ \l{#border-image-prop}{border-image}, and \l{The Box Model}.
+
+ \row
+ \o \c border-top-style
+ \o \l{#Border Style}{Border Style}
+ \o The style of the border's top edge.
+
+ \row
+ \o \c border-right-style
+ \o \l{#Border Style}{Border Style}
+ \o The style of the border's right edge/
+
+ \row
+ \o \c border-bottom-style
+ \o \l{#Border Style}{Border Style}
+ \o The style of the border's bottom edge.
+
+ \row
+ \o \c border-left-style
+ \o \l{#Border Style}{Border Style}
+ \o The style of the border's left edge.
+
+ \row
+ \o \bold{\c border-width} \target border-width-prop
+ \o \l{#Box Lengths}{Box Lengths}
+ \o The width of the border. Equivalent to setting \c
+ border-top-width, \c border-right-width, \c
+ border-bottom-width, and \c border-left-width.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit,
+ and QToolTip.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 47
+
+ See also \l{#border-color-prop}{border-color},
+ \l{#border-radius-prop}{border-radius},
+ \l{Qt Style Sheets Reference#border-style-prop}{border-style},
+ \l{#border-image-prop}{border-image}, and
+ \l{The Box Model}.
+
+ \row
+ \o \c border-top-width
+ \o \l{#Length}{Length}
+ \o The width of the border's top edge.
+
+ \row
+ \o \c border-right-width
+ \o \l{#Length}{Length}
+ \o The width of the border's right edge.
+
+ \row
+ \o \c border-bottom-width
+ \o \l{#Length}{Length}
+ \o The width of the border's bottom edge.
+
+ \row
+ \o \c border-left-width
+ \o \l{#Length}{Length}
+ \o The width of the border's left edge.
+
+ \row
+ \o \bold{\c bottom} \target bottom-prop
+ \o \l{#Length}{Length}
+ \o If \l{#position-prop}{position} is \c relative (the
+ default), moves a \l{subcontrol} by a certain offset up;
+ specifying \tt{bottom: \e{y}} is then equivalent to
+ specifying \tt{\l{Qt Style Sheets Reference#top-prop}{top}: -\e{y}}.
+
+ If \l{#position-prop}{position} is \c absolute, the \c
+ bottom property specifies the subcontrol's bottom edge
+ in relation to the parent's bottom edge (see also
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}
+ {subcontrol-origin}).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 48
+
+ See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{#right-prop}{right}, and
+ \l{Qt Style Sheets Reference#top-prop}{top}.
+
+ \row
+ \o \bold{\c button-layout} \target button-layout-prop
+ \o \l{#Number}{Number}
+ \o The layout of buttons in a QDialogButtonBox or
+ a QMessageBox. The possible values are 0
+ (\l{QDialogButtonBox::}{WinLayout}), 1
+ (\l{QDialogButtonBox::}{MacLayout}), 2
+ (\l{QDialogButtonBox::}{KdeLayout}), and 3
+ (\l{QDialogButtonBox::}{GnomeLayout}).
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_DialogButtonLayout} style hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 49
+
+ \row
+ \o \bold{\c color} \target color-prop
+ \o \l{#Brush}{Brush} \BR
+ \o The color used to render text.
+
+ This property is supported by all widgets that respect
+ the \l QWidget::palette.
+
+ If this property is not set, the default is whatever is
+ set for in the widget's palette for the
+ QWidget::foregroundRole (typically black).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 50
+
+ See also \l{Qt Style Sheets Reference#background-prop}{background} and
+ \l{#selection-color-prop}{selection-color}.
+
+ \row
+ \o \bold{\c dialogbuttonbox-buttons-have-icons}
+ \o \l{#Boolean}{Boolean}
+ \o Whether the buttons in a QDialogButtonBox show icons
+
+ If this property is set to 1, the buttons of a QDialogButtonBox
+ show icons; if it is set to 0, the icons are not shown.
+
+ See the \l{Qt Style Sheets Reference#list of icons}{List of Icons}
+ section for information on how to set icons.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 51
+
+ \note Styles defining this property must be applied before the
+ QDialogButtonBox is created; this means that you must apply the
+ style to the parent widget or to the application itself.
+
+ \omit
+ \row
+ \o \bold{\c etch-disabled-text}*
+ \o \l{#Boolean}{Boolean}
+ \o Whether disabled text is drawn etched.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_EtchDisabledText} style hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 52
+ \endomit
+
+ \row
+ \o \bold{\c font} \target font-prop
+ \o \l{#Font}{Font}
+ \o Shorthand notation for setting the text's font. Equivalent
+ to specifying \c font-family, \c font-size, \c font-style,
+ and/or \c font-weight.
+
+ This property is supported by all widgets that respect
+ the \l QWidget::font.
+
+ If this property is not set, the default is the
+ QWidget::font.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 53
+
+ \row
+ \o \c font-family
+ \o String
+ \o The font family.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 54
+
+ \note If you specify more than one parameter in \c font-family,
+ e.g., \c{font-family: Verdana, Arial}, Qt will only use the first
+ font. If it cannot be found, Qt uses the system fallbacks instead.
+
+ \row
+ \o \c font-size
+ \o \l{#Font Size}{Font Size}
+ \o The font size. In this version of Qt, only pt and px metrics are
+ supported.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 55
+
+ \row
+ \o \c font-style
+ \o \l {Font Style}
+ \o The font style.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 56
+
+ \row
+ \o \c font-weight
+ \o \l{#Font Weight}{Font Weight}
+ \o The weight of the font.
+
+ \row
+ \o \bold{\c gridline-color}* \target gridline-color-prop
+ \o \l{#Color}{Color} \BR
+ \o The color of the grid line in a QTableView.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_Table_GridLineColor} style hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 57
+
+ \row
+ \o \bold{\c height} \target height-prop
+ \o \l{#Length}{Length}
+ \o The height of a \l{subcontrol} (or in some case, a widget).
+
+ If this property is not specified, it defaults to a value
+ that depends on the subcontrol/widget and on the current style.
+
+ \warning Unless otherwise specified, this property has no effect
+ when set on widgets. If you want a widget with a fixed height, set
+ the \l{#min-width-prop}{min-height} and
+ \l{#max-width-prop}{max-height} to the same value.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 58
+
+ See also \l{#width-prop}{width}.
+
+ \row
+ \o \bold{\c icon-size} \target icon-size-prop
+ \o \l{#Length}{Length}
+ \o The width and height of the icon in a widget.
+
+ The icon size of the following widgets can be set using this
+ property.
+ \list
+ \i QCheckBox
+ \i QListView
+ \i QPushButton
+ \i QRadioButton
+ \i QTabBar
+ \i QToolBar
+ \i QToolBox
+ \i QTreeView
+ \endlist
+
+ \row
+ \o \bold{\c image}* \target image-prop
+ \o \l{#Url}{Url}+
+ \o The image that is drawn in the contents rectangle of a
+ \l{subcontrol}.
+
+ The image property accepts a list of \l{#Url}{Url}s or
+ an \c{svg}. The actual image that is drawn is determined
+ using the same algorithm as QIcon (i.e) the image is never scaled
+ up but always scaled down if necessary. If a \c{svg} is specified,
+ the image is scaled to the size of the contents rectangle.
+
+ Setting the image property on sub controls implicitly sets the
+ width and height of the sub-control (unless the image in a SVG).
+
+ In Qt 4.3 and later, the alignment of the
+ image within the rectangle can be specified using
+ \l{image-position-prop}{image-position}.
+
+ \warning The QIcon SVG plugin is needed to render SVG images.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 59
+
+ \row
+ \o \bold{\c image-position} \target image-position-prop
+ \o \l{#Alignment}{alignment}
+ \o In Qt 4.3 and later, the alignment of the image image's position can be specified
+ using relative or absolute position.
+
+ \row
+ \o \bold{\c left} \target left-prop
+ \o \l{#Length}{Length}
+ \o If \l{#position-prop}{position} is \c relative (the
+ default), moves a \l{subcontrol} by a certain offset to
+ the right.
+
+ If \l{#position-prop}{position} is \c absolute, the \c
+ left property specifies the subcontrol's left edge in
+ relation to the parent's left edge (see also
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}).
+
+ If this property is not specified, it defaults to \c 0.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 60
+
+ See also \l{#right-prop}{right}, \l{Qt Style Sheets Reference#top-prop}{top}, and
+ \l{#bottom-prop}{bottom}.
+
+ \row
+ \o \bold{\c lineedit-password- \BR \c character}* \target lineedit-password-character-prop
+ \o \l{#Number}{Number}
+ \o The QLineEdit password character as a Unicode number.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_LineEdit_PasswordCharacter} style hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 61
+
+ \row
+ \o \bold{\c margin} \target margin-prop
+ \o \l {Box Lengths}
+ \o The widget's margins. Equivalent to specifying \c
+ margin-top, \c margin-right, \c margin-bottom, and \c
+ margin-left.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit,
+ and QToolTip.
+
+ If this property is not specified, it defaults to \c 0.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 62
+
+ See also \l{Qt Style Sheets Reference#padding-prop}{padding},
+ \l{#spacing-prop}{spacing}, and \l{The Box Model}.
+
+ \row
+ \o \c margin-top
+ \o \l{#Length}{Length}
+ \o The widget's top margin.
+
+ \row
+ \o \c margin-right
+ \o \l{#Length}{Length}
+ \o The widget's right margin.
+
+ \row
+ \o \c margin-bottom
+ \o \l{#Length}{Length}
+ \o The widget's bottom margin.
+
+ \row
+ \o \c margin-left
+ \o \l{#Length}{Length}
+ \o The widget's left margin.
+
+ \row
+ \o \bold{\c max-height} \target max-height-prop
+ \o \l{#Length}{Length}
+ \o The widget's or a subcontrol's maximum height.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSizeGrip, QSpinBox,
+ QSplitter, QStatusBar, QTextEdit, and QToolTip.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 63
+
+ See also \l{#max-width-prop}{max-width}.
+
+ \row
+ \o \bold{\c max-width} \target max-width-prop
+ \o \l{#Length}{Length}
+ \o The widget's or a subcontrol's maximum width.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSizeGrip, QSpinBox,
+ QSplitter, QStatusBar, QTextEdit, and QToolTip.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 64
+
+ See also \l{#max-height-prop}{max-height}.
+
+
+ \row
+ \o \bold{\c messagebox-text- \target messagebox-text-interaction-flags-prop
+ \BR \c interaction-flags}*
+ \o \l{#Number}{Number}
+ \o The interaction behavior for text in a message box.
+ Possible values are based on Qt::TextInteractionFlags.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_MessageBox_TextInteractionFlags} style
+ hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 65
+
+ \row
+ \o \bold{\c min-height} \target min-height-prop
+ \o \l{#Length}{Length}
+ \o The widget's or a subcontrol's minimum height.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSizeGrip, QSpinBox,
+ QSplitter, QStatusBar, QTextEdit, and QToolTip.
+
+ If this property is not specified, the minimum height is
+ derived based on the widget's contents and the style.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 66
+
+ See also \l{#min-width-prop}{min-width}.
+
+ \row
+ \o \bold{\c min-width} \target min-width-prop
+ \o \l{#Length}{Length}
+ \o The widget's or a subcontrol's minimum width.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSizeGrip, QSpinBox,
+ QSplitter, QStatusBar, QTextEdit, and QToolTip.
+
+ If this property is not specified, the minimum width is
+ derived based on the widget's contents and the style.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 67
+
+ See also \l{#min-height-prop}{min-height}.
+
+ \row
+ \o \bold{\c opacity}* \target opacity-prop
+ \o \l{#Number}{Number}
+ \o The opacity for a widget. Possible values are from 0
+ (transparent) to 255 (opaque). For the moment, this is
+ only supported for \l{QToolTip}{tooltips}.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_ToolTipLabel_Opacity} style hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 68
+
+ \row
+ \o \bold{\c padding} \target padding-prop
+ \o \l{#Box Lengths}{Box Lengths}
+ \o The widget's padding. Equivalent to specifying \c
+ padding-top, \c padding-right, \c padding-bottom, and \c
+ padding-left.
+
+ This property is supported by QAbstractItemView
+ subclasses, QAbstractSpinBox subclasses, QCheckBox,
+ QComboBox, QFrame, QGroupBox, QLabel, QLineEdit, QMenu,
+ QMenuBar, QPushButton, QRadioButton, QSplitter, QTextEdit,
+ and QToolTip.
+
+ If this property is not specified, it defaults to \c 0.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 69
+
+ See also \l{#margin-prop}{margin},
+ \l{#spacing-prop}{spacing}, and \l{The Box Model}.
+
+ \row
+ \o \c padding-top
+ \o \l{#Length}{Length}
+ \o The widget's top padding.
+
+ \row
+ \o \c padding-right
+ \o \l{#Length}{Length}
+ \o The widget's right padding.
+
+ \row
+ \o \c padding-bottom
+ \o \l{#Length}{Length}
+ \o The widget's bottom padding.
+
+ \row
+ \o \c padding-left
+ \o \l{#Length}{Length}
+ \o The widget's left padding.
+
+ \row
+ \o \bold{\c paint-alternating-row-colors-for-empty-area}
+ \target paint-alternating-row-colors-for-empty-area-prop
+ \o \c bool
+ \o Whether the QTreeView paints alternating row colors for the empty
+ area (i.e the area where there are no items)
+
+ \row
+ \o \bold{\c position} \target position-prop
+ \o \c relative \BR
+ | \c absolute
+ \o Whether offsets specified using \l{Qt Style Sheets Reference#left-prop}{left},
+ \l{#right-prop}{right}, \l{Qt Style Sheets Reference#top-prop}{top}, and
+ \l{#bottom-prop}{bottom} are relative or absolute
+ coordinates.
+
+ If this property is not specified, it defaults to \c
+ relative.
+
+ \row
+ \o \bold{\c right} \target right-prop
+ \o \l{#Length}{Length}
+ \o If \l{#position-prop}{position} is \c relative (the
+ default), moves a \l{subcontrol} by a certain offset to
+ the left; specifying \tt{right: \e{x}} is then equivalent
+ to specifying \tt{\l{Qt Style Sheets Reference#left-prop}{left}: -\e{x}}.
+
+ If \l{#position-prop}{position} is \c absolute, the \c
+ right property specifies the subcontrol's right edge in
+ relation to the parent's right edge (see also
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 70
+
+ See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{Qt Style Sheets Reference#top-prop}{top}, and
+ \l{#bottom-prop}{bottom}.
+
+ \row
+ \o \bold{\c selection-background-color}* \target selection-background-color-prop
+ \o \l{#Brush}{Brush} \BR
+ \o The background of selected text or items.
+
+ This property is supported by all widgets that respect
+ the \l QWidget::palette and that show selection text.
+
+ If this property is not set, the default value is
+ whatever is set for the palette's
+ \l{QPalette::}{Highlight} role.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 71
+
+ See also \l{#selection-color-prop}{selection-color} and
+ \l{Qt Style Sheets Reference#background-prop}{background}.
+
+ \row
+ \o \bold{\c selection-color}* \target selection-color-prop
+ \o \l{#Brush}{Brush} \BR
+ \o The foreground of selected text or items.
+
+ This property is supported by all widgets that respect
+ the \l QWidget::palette and that show selection text.
+
+ If this property is not set, the default value is
+ whatever is set for the palette's
+ \l{QPalette::}{HighlightedText} role.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 72
+
+ See also
+ \l{#selection-background-color-prop}{selection-background-color}
+ and \l{#color-prop}{color}.
+
+ \row
+ \o \bold{\c show-decoration- \target show-decoration-selected-prop
+ \BR \c selected}*
+ \o \l{#Boolean}{Boolean}
+ \o Controls whether selections in a QListView cover the
+ entire row or just the extent of the text.
+
+ If this property is not specified, it defaults to the
+ value specified by the current style for the
+ \l{QStyle::}{SH_ItemView_ShowDecorationSelected} style
+ hint.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 73
+
+ \row
+ \o \bold{\c spacing}* \target spacing-prop
+ \o \l{#Length}{Length}
+ \o Internal spacing in the widget.
+
+ This property is supported by QCheckBox, checkable
+ \l{QGroupBox}es, QMenuBar, and QRadioButton.
+
+ If this property is not specified, the default value
+ depends on the widget and on the current style.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 74
+
+ See also \l{Qt Style Sheets Reference#padding-prop}{padding} and
+ \l{#margin-prop}{margin}.
+
+ \row
+ \o \bold{\c subcontrol-origin}* \target subcontrol-origin-prop
+ \o \l{#Origin}{Origin}
+ \o The origin rectangle of the \l subcontrol within the
+ parent element.
+
+ If this property is not specified, the default is \c
+ padding.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 75
+
+ See also
+ \l{Qt Style Sheets Reference#subcontrol-position-prop}{subcontrol-position}.
+
+ \row
+ \o \bold{\c subcontrol-position}* \target subcontrol-position-prop
+ \o \l{#Alignment}{Alignment}
+ \o The alignment of the \l subcontrol within the origin
+ rectangle specified by \l{Qt Style Sheets Reference#subcontrol-origin-prop}
+ {subcontrol-origin}.
+
+ If this property is not specified, it defaults to a value
+ that depends on the subcontrol.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 76
+
+ See also
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}.
+
+ \row
+ \o \bold{\c text-align} \target text-align-prop
+ \o \l{#Alignment}{Alignment}
+ \o The alignment of text and icon within the contents of the widget.
+
+ If this value is not specified, it defaults to the value
+ that depends on the native style.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 77
+
+ This property is currently supported only by QPushButton
+ and QProgressBar.
+
+ \row
+ \o \bold{\c text-decoration}
+ \o \c none \BR
+ \c underline \BR
+ \c overline \BR
+ \c line-through
+ \o Additional text effects
+
+ \row
+ \o \bold{\c top} \target top-prop
+ \o \l{#Length}{Length}
+ \o If \l{#position-prop}{position} is \c relative (the
+ default), moves a \l{subcontrol} by a certain offset
+ down.
+
+ If \l{#position-prop}{position} is \c absolute, the \c top
+ property specifies the subcontrol's top edge in relation
+ to the parent's top edge (see also
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}).
+
+ If this property is not specified, it defaults to \c 0.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 78
+
+ See also \l{Qt Style Sheets Reference#left-prop}{left}, \l{#right-prop}{right}, and
+ \l{#bottom-prop}{bottom}.
+
+ \row
+ \o \bold{\c width} \target width-prop
+ \o \l{#Length}{Length}
+ \o The width of a \l{subcontrol} (or a widget in some cases).
+
+ If this property is not specified, it defaults to a value
+ that depends on the subcontrol/widget and on the current style.
+
+ \warning Unless otherwise specified, this property has no effect
+ when set on widgets. If you want a widget with a fixed width, set
+ the \l{#min-width-prop}{min-width} and
+ \l{#max-width-prop}{max-width} to the same value.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 79
+
+ See also \l{#height-prop}{height}.
+
+ \endtable
+
+ \target list of icons
+ \section1 List of Icons
+
+ Icons used in Qt can be customized using the following properties. Each of
+ the properties listed in this section have the type \l{#Icon}{Icon}.
+
+ Note that for icons to appear in buttons in a QDialogButtonBox, you need to
+ set the dialogbuttonbox-buttons-have-icons property to true. Also, to
+ customize the size of the icons, use the icon-size property.
+
+ \table 100%
+ \header
+ \o Name
+ \o QStyle::StandardPixmap
+
+ \row
+ \o backward-icon
+ \o QStyle::SP_ArrowBack
+
+ \row
+ \o cd-icon
+ \o QStyle::SP_DriveCDIcon
+
+ \row
+ \o computer-icon
+ \o QStyle::SP_ComputerIcon
+
+ \row
+ \o desktop-icon
+ \o QStyle::SP_DesktopIcon
+
+ \row
+ \o dialog-apply-icon
+ \o QStyle::SP_DialogApplyButton
+
+ \row
+ \o dialog-cancel-icon
+ \o QStyle::SP_DialogCancelButton
+
+ \row
+ \o dialog-close-icon
+ \o QStyle::SP_DialogCloseButton
+
+ \row
+ \o dialog-discard-icon
+ \o QStyle::SP_DialogDiscardButton
+
+ \row
+ \o dialog-help-icon
+ \o QStyle::SP_DialogHelpButton
+
+ \row
+ \o dialog-no-icon
+ \o QStyle::SP_DialogNoButton
+
+ \row
+ \o dialog-ok-icon
+ \o QStyle::SP_DialogOkButton
+
+ \row
+ \o dialog-open-icon
+ \o QStyle::SP_DialogOpenButton
+
+ \row
+ \o dialog-reset-icon
+ \o QStyle::SP_DialogResetButton
+
+ \row
+ \o dialog-save-icon
+ \o QStyle::SP_DialogSaveButton
+
+ \row
+ \o dialog-yes-icon
+ \o QStyle::SP_DialogYesButton
+
+ \row
+ \o directory-closed-icon
+ \o QStyle::SP_DirClosedIcon
+
+ \row
+ \o directory-icon
+ \o QStyle::SP_DirIcon
+
+ \row
+ \o directory-link-icon
+ \o QStyle::SP_DirLinkIcon
+
+ \row
+ \o directory-open-icon
+ \o QStyle::SP_DirOpenIcon
+
+ \row
+ \o dockwidget-close-icon
+ \o QStyle::SP_DockWidgetCloseButton
+
+ \row
+ \o downarrow-icon
+ \o QStyle::SP_ArrowDown
+
+ \row
+ \o dvd-icon
+ \o QStyle::SP_DriveDVDIcon
+
+ \row
+ \o file-icon
+ \o QStyle::SP_FileIcon
+
+ \row
+ \o file-link-icon
+ \o QStyle::SP_FileLinkIcon
+
+ \omit
+ \row
+ \o filedialog-backward-icon
+ \o QStyle::SP_FileDialogBack
+ \endomit
+
+ \row
+ \o filedialog-contentsview-icon
+ \o QStyle::SP_FileDialogContentsView
+
+ \row
+ \o filedialog-detailedview-icon
+ \o QStyle::SP_FileDialogDetailedView
+
+ \row
+ \o filedialog-end-icon
+ \o QStyle::SP_FileDialogEnd
+
+ \row
+ \o filedialog-infoview-icon
+ \o QStyle::SP_FileDialogInfoView
+
+ \row
+ \o filedialog-listview-icon
+ \o QStyle::SP_FileDialogListView
+
+ \row
+ \o filedialog-new-directory-icon
+ \o QStyle::SP_FileDialogNewFolder
+
+ \row
+ \o filedialog-parent-directory-icon
+ \o QStyle::SP_FileDialogToParent
+
+ \row
+ \o filedialog-start-icon
+ \o QStyle::SP_FileDialogStart
+
+ \row
+ \o floppy-icon
+ \o QStyle::SP_DriveFDIcon
+
+ \row
+ \o forward-icon
+ \o QStyle::SP_ArrowForward
+
+ \row
+ \o harddisk-icon
+ \o QStyle::SP_DriveHDIcon
+
+ \row
+ \o home-icon
+ \o QStyle::SP_DirHomeIcon
+
+ \row
+ \o leftarrow-icon
+ \o QStyle::SP_ArrowLeft
+
+ \row
+ \o messagebox-critical-icon
+ \o QStyle::SP_MessageBoxCritical
+
+ \row
+ \o messagebox-information-icon
+ \o QStyle::SP_MessageBoxInformation
+
+ \row
+ \o messagebox-question-icon
+ \o QStyle::SP_MessageBoxQuestion
+
+ \row
+ \o messagebox-warning-icon
+ \o QStyle::SP_MessageBoxWarning
+
+ \row
+ \o network-icon
+ \o QStyle::SP_DriveNetIcon
+
+ \row
+ \o rightarrow-icon
+ \o QStyle::SP_ArrowRight
+
+ \row
+ \o titlebar-contexthelp-icon
+ \o QStyle::SP_TitleBarContextHelpButton
+
+ \row
+ \o titlebar-maximize-icon
+ \o QStyle::SP_TitleBarMaxButton
+
+ \row
+ \o titlebar-menu-icon
+ \o QStyle::SP_TitleBarMenuButton
+
+ \row
+ \o titlebar-minimize-icon
+ \o QStyle::SP_TitleBarMinButton
+
+ \row
+ \o titlebar-normal-icon
+ \o QStyle::SP_TitleBarNormalButton
+
+ \row
+ \o titlebar-shade-icon
+ \o QStyle::SP_TitleBarShadeButton
+
+ \row
+ \o titlebar-unshade-icon
+ \o QStyle::SP_TitleBarUnshadeButton
+
+ \row
+ \o trash-icon
+ \o QStyle::SP_TrashIcon
+
+ \row
+ \o uparrow-icon
+ \o QStyle::SP_ArrowUp
+
+ \endtable
+
+ \section1 List of Property Types
+
+ The following table summarizes the syntax and meaning of the
+ different property types.
+
+ \table 100%
+ \header
+ \o Type
+ \o Syntax
+ \o Description
+
+ \row
+ \o \bold Alignment \target Alignment
+ \o \{ \c top \BR
+ | \c bottom \BR
+ | \c left \BR
+ | \c right \BR
+ | \c center \}*
+ \o Horizontal and/or vertical alignment.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 80
+
+ \row
+ \o \bold Attachment \target Attachment
+ \o \{ \c scroll \BR
+ | \c fixed \}*
+ \o Scroll or fixed attachment.
+
+ \row
+ \o \bold Background \target Background
+ \o \{ \l{#Brush}{Brush} \BR
+ | \l{#Url}{Url} \BR
+ | \l{#Repeat}{Repeat} \BR
+ | \l{#Alignment}{Alignment} \}*
+ \o A sequence of \l{#Brush}{Brush}, \l{#Url}{Url},
+ \l{#Repeat}{Repeat}, and \l{#Alignment}{Alignment}.
+
+ \row
+ \o \bold Boolean \target Boolean
+ \o 0 | 1
+ \o True (\c 1) or false (\c 0).
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 81
+
+ \row
+ \o \bold Border \target Border
+ \o \{ \l{#Border Style}{Border Style} \BR
+ | \l{#Length}{Length} \BR
+ | \l{#Brush}{Brush} \}*
+ \o Shorthand border property.
+
+ \row
+ \o \bold{Border \target Border Image
+ Image}
+ \o \c none \BR
+ | \l{Url} \l{Number}\{4\} \BR (\c stretch | \c repeat){0,2}
+ \o A border image is an image that is composed of nine parts
+ (top left, top center, top right, center left, center,
+ center right, bottom left, bottom center, and bottom
+ right). When a border of a certain size is required, the
+ corner parts are used as is, and the top, right, bottom,
+ and left parts are stretched or repeated to produce a
+ border with the desired size.
+
+ See the
+ \l{http://www.w3.org/TR/css3-background/#the-border-image}
+ {CSS3 Draft Specification} for details.
+
+ \row
+ \o \bold{Border \target Border Style
+ Style}
+ \o \c dashed \BR
+ | \c dot-dash \BR
+ | \c dot-dot-dash \BR
+ | \c dotted \BR
+ | \c double \BR
+ | \c groove \BR
+ | \c inset \BR
+ | \c outset \BR
+ | \c ridge \BR
+ | \c solid \BR
+ | \c none
+ \o Specifies the pattern used to draw a border.
+ See the \l{http://www.w3.org/TR/css3-background/#border-style}
+ {CSS3 Draft Specification} for details.
+
+ \row
+ \o \bold{Box \target Box Colors
+ Colors}
+ \o \l{#Brush}{Brush}\{1,4\}
+ \o One to four occurrences of \l{#Brush}{Brush}, specifying the top,
+ right, bottom, and left edges of a box, respectively. If
+ the left color is not specified, it is taken to be the
+ same as the right color. If the bottom color is not
+ specified, it is taken to be the same as the top color. If
+ the right color is not specified, it is taken to be the
+ same as the top color.
+
+ Example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 82
+
+ \row
+ \o \bold{Box \target Box Lengths
+ Lengths}
+ \o \l{#Length}{Length}\{1,4\}
+ \o One to four occurrences of \l{#Length}{Length}, specifying the
+ top, right, bottom, and left edges of a box,
+ respectively. If the left length is not specified, it is
+ taken to be the same as the right length. If the bottom
+ length is not specified, is it taken to be the same as the
+ top length. If the right length is not specified, it is
+ taken to be the same as the top length.
+
+ Examples:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 83
+
+ \row
+ \o \bold Brush \target Brush
+ \o \l{#Color}{Color} \BR
+ | \l{Gradient} \BR
+ | \l{PaletteRole}
+ \o Specifies a Color or a Gradient or an entry in the Palette.
+
+ \row
+ \o \bold Color \target Color
+ \o \tt{rgb(\e{r}, \e{g}, \e{b})} \BR
+ | \tt{rgba(\e{r}, \e{g}, \e{b}, \e{a})} \BR
+ | \tt{hsv(\e{h}, \e{s}, \e{v})} \BR
+ | \tt{hsva(\e{h}, \e{s}, \e{v}, \e{a})} \BR
+ | \tt{#\e{rrggbb}} \BR
+ | \l{QColor::setNamedColor()}{Color Name} \BR
+ \o Specifies a color as RGB (red, green, blue) or RGBA
+ (red, green, blue, alpha) or HSV (hue, saturation, value) or HSVA
+ (hue, saturation, value, alpha) or a named color. The \c rgb() or \c rgba()
+ syntax can be used with integer values between 0 and 255, or with
+ percentages. The value of s, v, and a in \c hsv() or \c hsva() must all
+ be in the range 0-255; the value of h must be in the range 0-359.
+
+ Examples:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 84
+
+ \note The RGB colors allowed are the same as those allowed with
+ CSS 2.1, as listed
+ \l{http://www.w3.org/TR/CSS21/syndata.html#color-units}{here}.
+
+ \row
+ \o \bold Font \target Font
+ \o (\l{#Font Style}{Font Style} | \l{#Font Weight}{Font Weight}){0,2} \l{#Font Size}{Font Size} String
+ \o Shorthand font property.
+
+ \row
+ \o \bold{Font \target Font Size
+ Size}
+ \o \l{Length}
+ \o The size of a font.
+
+ \row
+ \o \bold{Font \target Font Style
+ Style}
+ \o \c normal \BR
+ | \c italic \BR
+ | \c oblique
+ \o The style of a font.
+
+ \row
+ \o \bold{Font \target Font Weight
+ Weight}
+ \o \c normal \BR
+ | \c bold \BR
+ | \c 100 \BR
+ | \c 200 \BR
+ ... \BR
+ | \c 900
+ \o The weight of a font.
+
+ \row
+ \o \bold Gradient \target Gradient
+ \o \c qlineargradient \BR
+ | \c qradialgradient \BR
+ | \c qconicalgradient
+ \o Specifies gradient fills. There are three types of gradient fills:
+
+ \list
+ \o \e{Linear} gradients interpolate colors between start and
+ end points.
+ \o \e{Radial} gradients interpolate colors between a focal
+ point and end points on a circle surrounding it.
+ \o \e{Conical} gradients interpolate colors around a center
+ point.
+ \endlist
+
+ Gradients are specified in Object Bounding Mode. Imagine the box
+ in which the gradient is rendered, to have its top left corner at (0, 0)
+ and its bottom right corner at (1, 1). Gradient parameters are
+ then specified as percentages from 0 to 1. These values are
+ extrapolated to actual box coordinates at runtime. It is possible
+ specify values that lie outside the bounding box (-0.6 or 1.8, for
+ instance).
+
+ \warning The stops have to appear sorted in ascending order.
+
+ Examples:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 85
+
+ \row
+ \o \bold Icon \target Icon
+ \o (\l{#Url}{Url} (\c disabled | \c active | \c normal | \c selected)?
+ (\c on | \c off)? )*
+ \o A list of url, QIcon::Mode and QIcon::State.
+
+ Example:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 86
+
+ \row
+ \o \bold Length \target Length
+ \o \l{#Number}{Number} (\c px | \c pt | \c em | \c ex)?
+ \o A number followed by a measurement unit. The CSS standard recommends
+ that user agents must
+ \l{http://www.w3.org/TR/CSS21/syndata.html#illegalvalues}{ignore}
+ a declaration with an illegal value. In Qt, it is mandatory to
+ specify measurement units. For compatibility with earlier versions
+ of Qt, numbers without measurement units are treated as pixels
+ in most contexts. The supported units are:
+
+ \list
+ \o \c px: pixels
+ \o \c pt: the size of one point (i.e., 1/72 of an inch)
+ \o \c em: the em width of the font (i.e., the width of 'M')
+ \o \c ex: the ex width of the font (i.e., the height of 'x')
+ \endlist
+
+ \row
+ \o \bold Number \target Number
+ \o A decimal integer or a real number
+ \o Examples: \c 0, \c 18, \c +127, \c -255, \c 12.34, \c -.5,
+ \c 0009.
+
+ \row
+ \o \bold Origin \target Origin
+ \o \c margin \BR
+ | \c border \BR
+ | \c padding \BR
+ | \c content
+ \o Indicates which of four rectangles to use.
+
+ \list
+ \o \c margin: The margin rectangle. The margin falls outside the border.
+ \o \c border: The border rectangle. This is where any border is drawn.
+ \o \c padding: The padding rectangle. Unlike the margins,
+ padding is located inside the border.
+ \o \c content: The content rectangle. This specifies where
+ the actual contents go, excluding any
+ padding, border, or margin.
+ \endlist
+
+ See also \l{The Box Model}.
+
+ \row
+ \o \bold PaletteRole \target PaletteRole
+ \o \c alternate-base \BR
+ | \c base \BR
+ | \c bright-text \BR
+ | \c button \BR
+ | \c button-text \BR
+ | \c dark \BR
+ | \c highlight \BR
+ | \c highlighted-text \BR
+ | \c light \BR
+ | \c link \BR
+ | \c link-visited \BR
+ | \c mid \BR
+ | \c midlight \BR
+ | \c shadow \BR
+ | \c text \BR
+ | \c window \BR
+ | \c window-text \BR
+ \o These values correspond the \l{QPalette::ColorRole}{Color roles}
+ in the widget's QPalette.
+
+ For example,
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 87
+
+ \row
+ \o \bold Radius \target Radius
+ \o \l{#Length}{Length}\{1, 2\}
+ \o One or two occurrences of \l{#Length}{Length}. If only one length is
+ specified, it is used as the radius of the quarter circle
+ defining the corner. If two lengths are specified, the
+ first length is the horizontal radius of a quarter
+ ellipse, whereas the second length is the vertical radius.
+
+ \row
+ \o \bold Repeat \target Repeat
+ \o \c repeat-x \BR
+ | \c repeat-y \BR
+ | \c repeat \BR
+ | \c no-repeat
+ \o A value indicating the nature of repetition.
+
+ \list
+ \o \c repeat-x: Repeat horizontally.
+ \o \c repeat-y: Repeat vertically.
+ \o \c repeat: Repeat horizontally and vertically.
+ \o \c no-repeat: Don't repeat.
+ \endlist
+
+ \row
+ \o \bold Url \target Url
+ \o \tt{url(\e{filename})}
+ \o \tt{\e{filename}} is the name of a file on the local disk
+ or stored using \l{the Qt Resource System}. Setting an
+ image implicitly sets the width and height of the element.
+
+ \endtable
+
+ \section1 List of Pseudo-States
+
+ The following pseudo-states are supported:
+
+ \table 100%
+ \header
+ \o Pseudo-State
+ \o Description
+
+ \row \o \c :active \target active
+ \o This state is set when the widget resides in an active window.
+
+ \row
+ \o \c :adjoins-item \target adjoins-item-ps
+ \o This state is set when the \l{#branch-sub}{::branch} of a QTreeView
+ is adjacent to an item.
+
+ \row
+ \o \c :alternate \target alternate-ps
+ \o This state is set for every alternate row whe painting the row of
+ a QAbstractItemView when QAbstractItemView::alternatingRowColors()
+ is set to true.
+
+ \row
+ \o \c :bottom \target bottom-ps
+ \o The item is positioned at the bottom. For example, a QTabBar
+ that has its tabs positioned at the bottom.
+
+ \row
+ \o \c :checked \target checked-ps
+ \o The item is checked. For example, the
+ \l{QAbstractButton::checked}{checked} state of QAbstractButton.
+
+ \row
+ \o \c :closable \target closable-ps
+ \o The items can be closed. For example, the QDockWidget has the
+ QDockWidget::DockWidgetClosable feature turned on.
+
+ \row
+ \o \c :closed \target closed-ps
+ \o The item is in the closed state. For example, an non-expanded
+ item in a QTreeView
+
+ \row
+ \o \c :default \target default-ps
+ \o The item is the default. For example, a
+ \l{QPushButton::default}{default} QPushButton or a default action
+ in a QMenu.
+
+ \row
+ \o \c :disabled \target disabled-ps
+ \o The item is \l{QWidget::enabled}{disabled}.
+
+ \row
+ \o \c :editable \target editable-ps
+ \o The QComboBox is editable.
+
+ \row
+ \o \c :edit-focus \target edit-focus-ps
+ \o The item has edit focus (See QStyle::State_HasEditFocus). This state
+ is available only for Qt Extended applications.
+
+ \row
+ \o \c :enabled \target enabled-ps
+ \o The item is \l{QWidget::enabled}{enabled}.
+
+ \row
+ \o \c :exclusive \target exclusive-ps
+ \o The item is part of an exclusive item group. For example, a menu
+ item in a exclusive QActionGroup.
+
+ \row
+ \o \c :first \target first-ps
+ \o The item is the first (in a list). For example, the first
+ tab in a QTabBar.
+
+ \row
+ \o \c :flat \target flat-ps
+ \o The item is flat. For example, a
+ \l{QPushButton::flat}{flat} QPushButton.
+
+ \row
+ \o \c :floatable \target floatable-ps
+ \o The items can be floated. For example, the QDockWidget has the
+ QDockWidget::DockWidgetFloatable feature turned on.
+
+ \row
+ \o \c :focus \target focus-ps
+ \o The item has \l{QWidget::hasFocus()}{input focus}.
+
+ \row
+ \o \c :has-children \target has-children-ps
+ \o The item has children. For example, an item in a
+ QTreeView that has child items.
+
+ \row
+ \o \c :has-siblings \target has-siblings-ps
+ \o The item has siblings. For example, an item in a
+ QTreeView that siblings.
+
+ \row
+ \o \c :horizontal \target horizontal-ps
+ \o The item has horizontal orientation
+
+ \row
+ \o \c :hover \target hover-ps
+ \o The mouse is hovering over the item.
+
+ \row
+ \o \c :indeterminate \target indeterminate-ps
+ \o The item has indeterminate state. For example, a QCheckBox
+ or QRadioButton is \l{Qt::PartiallyChecked}{partially checked}.
+
+ \row
+ \o \c :last \target last-ps
+ \o The item is the last (in a list). For example, the last
+ tab in a QTabBar.
+
+ \row
+ \o \c :left \target left-ps
+ \o The item is positioned at the left. For example, a QTabBar
+ that has its tabs positioned at the left.
+
+ \row
+ \o \c :maximized \target maximized-ps
+ \o The item is maximized. For example, a maximized QMdiSubWindow.
+
+ \row
+ \o \c :middle \target middle-ps
+ \o The item is in the middle (in a list). For example, a tab
+ that is not in the beginning or the end in a QTabBar.
+
+ \row
+ \o \c :minimized \target minimized-ps
+ \o The item is minimized. For example, a minimized QMdiSubWindow.
+
+ \row
+ \o \c :movable \target movable-ps
+ \o The item can be moved around. For example, the QDockWidget has the
+ QDockWidget::DockWidgetMovable feature turned on.
+
+ \row
+ \o \c :no-frame \target no-frame-ps
+ \o The item has no frame. For example, a frameless QSpinBox
+ or QLineEdit.
+
+ \row
+ \o \c :non-exclusive \target non-exclusive-ps
+ \o The item is part of a non-exclusive item group. For example, a menu
+ item in a non-exclusive QActionGroup.
+
+ \row
+ \o \c :off \target off-ps
+ \o For items that can be toggled, this applies to items
+ in the "off" state.
+
+ \row
+ \o \c :on \target on-ps
+ \o For items that can be toggled, this applies to widgets
+ in the "on" state.
+
+ \row
+ \o \c :only-one \target only-one-ps
+ \o The item is the only one (in a list). For example, a lone tab
+ in a QTabBar.
+
+ \row
+ \o \c :open \target open-ps
+ \o The item is in the open state. For example, an expanded
+ item in a QTreeView, or a QComboBox or QPushButton with
+ an open menu.
+
+ \row
+ \o \c :next-selected \target next-selected-ps
+ \o The next item (in a list) is selected. For example, the
+ selected tab of a QTabBar is next to this item.
+
+ \row
+ \o \c :pressed \target pressed-ps
+ \o The item is being pressed using the mouse.
+
+ \row
+ \o \c :previous-selected \target previous-selected-ps
+ \o The previous item (in a list) is selected. For example, a
+ tab in a QTabBar that is next to the selected tab.
+
+ \row
+ \o \c :read-only \target read-only-ps
+ \o The item is marked read only or non-editable. For example,
+ a read only QLineEdit or a non-editable QComboBox.
+
+ \row
+ \o \c :right \target right-ps
+ \o The item is positioned at the right. For example, a QTabBar
+ that has its tabs positioned at the right.
+
+ \row
+ \o \c :selected \target selected-ps
+ \o The item is selected. For example, the selected tab in
+ a QTabBar or the selected item in a QMenu.
+
+ \row
+ \o \c :top \target top-ps
+ \o The item is positioned at the top. For example, a QTabBar
+ that has its tabs positioned at the top.
+
+ \row
+ \o \c :unchecked \target unchecked-ps
+ \o The item is
+ \l{QAbstractButton::checked}{unchecked}.
+
+ \row
+ \o \c :vertical \target vertical-ps
+ \o The item has vertical orientation.
+
+ \row
+ \o \c :window \target window-ps
+ \o The widget is a window (i.e top level widget)
+
+ \endtable
+
+ \target subcontrols
+ \section1 List of Sub-Controls
+
+ The following subcontrols are available:
+
+ \table 100%
+ \header
+ \o Sub-Control
+ \o Description
+
+ \row
+ \o \c ::add-line \target add-line-sub
+ \o The button to add a line of a QScrollBar.
+
+ \row
+ \o \c ::add-page \target add-page-sub
+ \o The region between the handle (slider) and the \l{#add-line-sub}{add-line}
+ of a QScrollBar.
+
+ \row
+ \o \c ::branch \target branch-sub
+ \o The branch indicator of a QTreeView.
+
+ \row
+ \o \c ::chunk \target chunk-sub
+ \o The progress chunk of a QProgressBar.
+
+ \row
+ \o \c ::close-button \target close-button-sub
+ \o The close button of a QDockWidget.
+
+ \row
+ \o \c ::corner \target corner-sub
+ \o The corner between two scrollbars in a QAbstractScrollArea
+
+ \row
+ \o \c ::down-arrow \target down-arrow-sub
+ \o The down arrow of a QComboBox, QHeaderView (sort indicator),
+ QScrollBar or QSpinBox.
+
+ \row
+ \o \c ::down-button \target down-button-sub
+ \o The down button of a QScrollBar or a QSpinBox.
+
+ \row
+ \o \c ::drop-down \target drop-down-sub
+ \o The drop-down button of a QComboBox.
+
+ \row
+ \o \c ::float-button \target float-button-sub
+ \o The float button of a QDockWidget
+
+ \row
+ \o \c ::groove \target groove-sub
+ \o The groove of a QSlider.
+
+ \row
+ \o \c ::indicator \target indicator-sub
+ \o The indicator of a QAbstractItemView, a QCheckBox, a QRadioButton,
+ a checkable QMenu item or a checkable QGroupBox.
+
+ \row
+ \o \c ::handle \target handle-sub
+ \o The handle (slider) of a QScrollBar, a QSplitter, or a QSlider.
+
+ \row
+ \o \c ::icon \target icon-sub
+ \o The icon of a QAbstractItemView or a QMenu.
+
+ \row
+ \o \c ::item \target item-sub
+ \o An item of a QAbstractItemView, a QMenuBar, a QMenu, or
+ a QStatusBar.
+
+ \row
+ \o \c ::left-arrow \target left-arrow-sub
+ \o The left arrow of a QScrollBar.
+
+ \row
+ \o \c ::left-corner \target left-corner-sub
+ \o The left corner of a QTabWidget. For example, this control can be
+ used to control position the left corner widget in a QTabWidget.
+
+ \row
+ \o \c ::menu-arrow \target menu-arrow-sub
+ \o The arrow of a QToolButton with a menu.
+
+ \row
+ \o \c ::menu-button \target menu-button-sub
+ \o The menu button of a QToolButton.
+
+ \row
+ \o \c ::menu-indicator \target menu-indicator-sub
+ \o The menu indicator of a QPushButton.
+
+ \row
+ \o \c ::right-arrow \target right-arrow-sub
+ \o The right arrow of a QMenu or a QScrollBar.
+
+ \row
+ \o \c ::pane \target pane-sub
+ \o The pane (frame) of a QTabWidget.
+
+ \row
+ \o \c ::right-corner \target right-corner-sub
+ \o The right corner of a QTabWidget. For example, this control can be
+ used to control the position the right corner widget in a QTabWidget.
+
+ \row
+ \o \c ::scroller \target scroller-sub
+ \o The scroller of a QMenu or QTabBar.
+
+ \row
+ \o \c ::section \target section-sub
+ \o The section of a QHeaderView.
+
+ \row
+ \o \c ::separator \target separator-sub
+ \o The separator of a QMenu or in a QMainWindow.
+
+ \row
+ \o \c ::sub-line \target sub-line-sub
+ \o The button to subtract a line of a QScrollBar.
+
+ \row
+ \o \c ::sub-page \target sub-page-sub
+ \o The region between the handle (slider) and the \l{#sub-line-sub}{sub-line}
+ of a QScrollBar.
+
+ \row
+ \o \c ::tab \target tab-sub
+ \o The tab of a QTabBar or QToolBox.
+
+ \row
+ \o \c ::tab-bar \target tab-bar-sub
+ \o The tab bar of a QTabWidget. This subcontrol exists only to
+ control the position of the QTabBar inside the QTabWidget. To
+ style the tabs using the \l{#tab-sub}{::tab} subcontrol.
+
+ \row
+ \o \c ::tear \target tear-sub
+ \o The tear indicator of a QTabBar.
+
+ \row
+ \o \c ::tear-off \target tear-off-sub
+ \o The tear-off indicator of a QMenu.
+
+ \row
+ \o \c ::text \target text-ps
+ \o The text of a QAbstractItemView.
+
+ \row
+ \o \c ::title \target title-sub
+ \o The title of a QGroupBox or a QDockWidget.
+
+ \row
+ \o \c ::up-arrow \target up-arrow-sub
+ \o The up arrow of a QHeaderView (sort indicator), QScrollBar
+ or a QSpinBox.
+
+ \row
+ \o \c ::up-button \target up-button-sub
+ \o The up button of a QSpinBox.
+
+ \endtable
+
+ See \l{Customizing the QPushButton's Menu Indicator Sub-Control}
+ for an example of how to customize a subcontrol.
+ */
+
+ /*!
+ \page stylesheet-examples.html
+ \contentspage {Qt Style Sheet}{Contents}
+ \previouspage Qt Style Sheets Reference
+ \title Qt Style Sheets Examples
+
+ \tableofcontents
+ \section1 Style Sheet Usage
+
+ We will now see a few examples to get started with using Qt Style Sheets.
+
+ \section2 Customizing the Foreground and Background Colors
+
+ Let's start by setting yellow as the background color of all
+ \l{QLineEdit}s in an application. This could be achieved like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 88
+
+ If we want the property to apply only to the \l{QLineEdit}s that are
+ children (or grandchildren or grand-grandchildren) of a specific dialog,
+ we would rather do this:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 89
+
+ If we want the property to apply only to one specific QLineEdit,
+ we can give it a name using QObject::setObjectName() and use an
+ ID Selector to refer to it:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 90
+
+ Alternatively, we can set the
+ \l{Qt Style Sheets Reference#background-prop}{background-color} property directly on the
+ QLineEdit, omitting the selector:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 91
+
+ To ensure a good contrast, we should also specify a suitable
+ color for the text:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 92
+
+ It might be a good idea to change the colors used for selected
+ text as well:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 93
+
+
+ \section2 Customizing Using Dynamic Properties
+
+ There are many situations where we need to present a form that
+ has mandatory fields. To indicate to the user that the field is
+ mandatory, one effective (albeit esthetically dubious) solution
+ is to use yellow as the background color for those fields. It
+ turns out this is very easy to implement using Qt Style Sheets.
+ First, we would use the following application-wide style sheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 94
+
+ This means that every widget whose \c mandatoryField Qt property
+ is set to true would have a yellow background.
+
+ Then, for each mandatory field widget, we would simply create a
+ \c mandatoryField property on the fly and set it to true. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 95
+
+ \section2 Customizing a QPushButton Using the Box Model
+
+ This time, we will show how to create a red QPushButton. This
+ QPushButton would presumably be connected to a very destructive
+ piece of code.
+
+ First, we are tempted to use this style sheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 96
+
+ However, the result is a boring, flat button with no borders:
+
+ \image stylesheet-redbutton1.png A flat red button
+
+ What happened is this:
+
+ \list
+ \o We have made a request that cannot be satisfied using the
+ native styles alone (e.g., the Windows XP theme engine doesn't
+ let us specify the background color of a button).
+ \o Therefore, the button is rendered using style sheets.
+ \o We haven't specified any values for
+ \l{Qt Style Sheets Reference#border-width-prop}{border-width} and
+ \l{Qt Style Sheets Reference#border-style-prop}{border-style}, so by default we obtain
+ a 0-pixel wide border of style \c none.
+ \endlist
+
+ Let's improve the situation by specifying a border:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 97
+
+ \image stylesheet-redbutton2.png A red button with a beige border
+
+ Things look already a lot better. But the button looks a bit
+ cramped. Let's specify some spacing between the border and the
+ text using the \l{Qt Style Sheets Reference#padding-prop}{padding}. Additionally, we will
+ enforce a minimum width, round the corners, and specify a larger
+ font to make the button look nicer:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 98
+
+ \image stylesheet-redbutton3.png A red button with a round beige border and big, bold text
+
+ The only issue remaining is that the button doesn't react when we
+ press it. We can fix this by specifying a slightly different
+ background color and use a different border style.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 99
+
+ \section2 Customizing the QPushButton's Menu Indicator Sub-Control
+
+ Subcontrols give access to the sub-elements of a widget. For
+ example, a QPushButton associated with a menu (using
+ QPushButton::setMenu()) has a menu indicator. Let's customize
+ the menu indicator for the red push button:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 100
+
+ By default, the menu indicator is located at the bottom-right
+ corner of the padding rectangle. We can change this by specifying
+ \l{Qt Style Sheets Reference#subcontrol-position-prop}{subcontrol-position} and
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin} to anchor the
+ indicator differently. We can also use \l{Qt Style Sheets Reference#top-prop}{top} and
+ \l{Qt Style Sheets Reference#left-prop}{left} to move the indicator by a few pixels. For
+ example:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 101
+
+ This positions the \c myindicator.png to the center right of the
+ QPushButton's \l{Qt Style Sheets Reference#padding-prop}{padding} rectangle (see
+ \l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin} for more
+ information).
+
+ \section2 Complex Selector Example
+
+ Since red seems to be our favorite color, let's make the text in
+ QLineEdit red by setting the following application-wide
+ stylesheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 102
+
+ However, we would like to give a visual indication that a
+ QLineEdit is read-only by making it appear gray:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 103
+
+ At some point, our design team comes with the requirement that
+ all \l{QLineEdit}s in the registration form (with the
+ \l{QObject::objectName}{object name} \c registrationDialog) to be
+ brown:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 104
+
+ A few UI design meetings later, we decide that all our
+ \l{QDialog}s should have brown colored \l{QLineEdit}s:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 105
+
+ Quiz: What happens if we have a read-only QLineEdit in a QDialog?
+ [Hint: The \l{The Style Sheet Syntax#Conflict Resolution}{Conflict Resolution} section above explains
+ what happens in cases like this.]
+
+ \section1 Customizing specific widgets
+
+ This section provides examples to customize specific widgets using Style Sheets.
+
+ \section2 Customizing QAbstractScrollArea
+
+ The background of any QAbstractScrollArea (Item views, QTextEdit
+ and QTextBrowser) can be set using the background properties. For example,
+ to set a background-image that scrolls with the scroll bar:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 106
+
+ If the background-image is to be fixed with the viewport:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 107
+
+ \section2 Customizing QCheckBox
+
+ Styling of a QCheckBox is almost indentical to styling a QRadioButton. The
+ main difference is that a tristate QCheckBox has an indeterminate state.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 108
+
+ \section2 Customizing QComboBox
+
+ We will look at an example where the drop down button of a QComboBox
+ appears "merged" with the combo box frame.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 109
+
+ The pop-up of the QComboBox is a QAbstractItemView and is styled using
+ the descendant selector:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 110
+
+ \section2 Customizing QDockWidget
+
+ The title bar and the buttons of a QDockWidget can be customized as
+ follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 111
+
+ If one desires to move the dock widget buttons to the left, the following
+ style sheet can be used:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 112
+
+ \note To customize the separator (resize handle) of a QDockWidget,
+ use QMainWindow::separator.
+
+ \section2 Customizing QFrame
+
+ A QFrame is styled using the \l{The Box Model}.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 113
+
+ \section2 Customizing QGroupBox
+
+ Let us look at an example that moves the QGroupBox's title to
+ the center.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 114
+
+ For a checkable QGroupBox, use the \{#indicator-sub}{::indicator} subcontrol
+ and style it exactly like a QCheckBox (i.e)
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 115
+
+ \section2 Customizing QHeaderView
+
+ QHeaderView is customized as follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 116
+
+ \section2 Customizing QLineEdit
+
+ The frame of a QLineEdit is styled using the \l{The Box Model}. To
+ create a line edit with rounded corners, we can set:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 117
+
+ The password character of line edits that have QLineEdit::Password
+ echo mode can be set using:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 118
+
+ The background of a read only QLineEdit can be modified as below:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 119
+
+ \section2 Customizing QListView
+
+ The background color of alternating rows can be customized using the following
+ style sheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 120
+
+ To provide a special background when you hover over items, we can use the
+ \l{item-sub}{::item} subcontrol. For example,
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 121
+
+ \section2 Customizing QMainWindow
+
+ The separator of a QMainWindow can be styled as follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 122
+
+ \section2 Customizing QMenu
+
+ Individual items of a QMenu are styled using the 'item' subcontrol as
+ follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 123
+
+ For a more advanced customization, use a style sheet as follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 124
+
+ \section2 Customizing QMenuBar
+
+ QMenuBar is styled as follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 125
+
+ \section2 Customizing QProgressBar
+
+ The QProgressBar's \l{stylesheet-reference.html#border-prop}{border},
+ \l{stylesheet-reference.html#chunk-sub}{chunk}, and
+ \l{stylesheet-reference.html#text-align-prop}{text-align} can be customized using
+ style sheets. However, if one property or sub-control is customized,
+ all the other properties or sub-controls must be customized as well.
+
+ \image progressBar-stylesheet.png
+
+ For example, we change the \l{stylesheet-reference.html#border-prop}
+ {border} to grey and the \l{stylesheet-reference.html#chunk-sub}{chunk}
+ to cerulean.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 126
+
+ This leaves the \l{stylesheet-reference.html#text-align-prop}
+ {text-align}, which we customize by positioning the text in the center of
+ the progress bar.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 127
+
+ A \l{stylesheet-reference.html#margin-prop}{margin} can be included to
+ obtain more visible chunks.
+
+ \image progressBar2-stylesheet.png
+
+ In the screenshot above, we use a
+ \l{stylesheet-reference.html#margin-prop}{margin} of 0.5 pixels.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 128
+
+ \section2 Customizing QPushButton
+
+ A QPushButton is styled as follows:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 129
+
+ For a QPushButton with a menu, use the
+ \l{Qt Style Sheets Reference#menu-indicator-sub}{::menu-indicator}
+ subcontrol.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 130
+
+ Checkable QPushButton have the \l{Qt Style Sheets Reference#checked-ps}
+ {:checked} pseudo state set.
+
+ \section2 Customizing QRadioButton
+
+ The indicator of a QRadioButton can be changed using:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 131
+
+ \section2 Customizing QScrollBar
+
+ The QScrollBar can be styled using its subcontrols like
+ \l{stylesheet-reference.html#handle-sub}{handle},
+ \l{stylesheet-reference.html#add-line-sub}{add-line},
+ \l{stylesheet-reference.html#sub-line-sub}{sub-line}, and so on. Note that
+ if one property or sub-control is customized, all the other properties or
+ sub-controls must be customized as well.
+
+ \image stylesheet-scrollbar1.png
+
+ The scroll bar above has been styled in aquamarine with a solid grey
+ border.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 132
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 133
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 134
+
+ The \l{stylesheet-reference.html#left-arrow-sub}{left-arrow} and
+ \l{stylesheet-reference.html#right-arrow-sub}{right-arrow} have a solid grey
+ border with a white background. As an alternative, you could also embed the
+ image of an arrow.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 135
+
+ If you want the scroll buttons of the scroll bar to be placed together
+ (instead of the edges) like on Mac OS X, you can use the following
+ stylesheet:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 136
+
+ The scroll bar using the above stylesheet looks like this:
+ \image stylesheet-scrollbar2.png
+
+
+ To customize a vertical scroll bar use a style sheet similar to the following:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 137
+
+ \section2 Customizing QSizeGrip
+
+ QSizeGrip is usually styled by just setting an image.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 138
+
+ \section2 Customizing QSlider
+
+ You can style horizontal slider as below:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 139
+
+ If you want to change the color of the slider parts before and after the handle, you can use the add-page
+ and sub-page subcontrols. For example, for a vertical slider:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 140
+
+ \section2 Customizing QSpinBox
+
+ QSpinBox can be completely customized as below (the style sheet has commentary inline):
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 141
+
+
+ \section2 Customizing QSplitter
+
+ A QSplitter derives from a QFrame and hence can be styled like a QFrame.
+ The grip or the handle is customized using the
+ \l{Qt Style Sheets Reference#handle-sub}{::handle} subcontrol.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 142
+
+ \section2 Customizing QStatusBar
+
+ We can provide a background for the status bar and a border for items
+ inside the status bar as follows:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 143
+
+ Note that widgets that have been added to the QStatusBar can be styled
+ using the descendant declaration (i.e)
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 144
+
+ \section2 Customizing QTabWidget and QTabBar
+
+ \image tabWidget-stylesheet1.png
+
+ For the screenshot above, we need a stylesheet as follows:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 145
+
+ Often we require the tabs to overlap to look like below:
+ \image tabWidget-stylesheet2.png
+
+ For a tab widget that looks like above, we make use of
+ \l{http://www.communitymx.com/content/article.cfm?cid=B0029}
+ {negative margins}. The resulting stylesheet looks like this:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 146
+
+ To move the tab bar to the center (as below), we require the following stylesheet:
+ \image tabWidget-stylesheet3.png
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 147
+
+ The tear indicator and the scroll buttons can be further customized as follows:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 148
+
+ \section2 Customizing QTableView
+
+ Suppose we'd like our selected item in QTableView to have bubblegum pink
+ fade to white as its background.
+
+ \image tableWidget-stylesheet.png
+
+ This is possible with the
+ \l{stylesheet-reference.html#selection-background-color-prop}
+ {selection-background-color} property and the syntax required is:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 149
+
+ The corner widget can be customized using the following style sheet
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 150
+
+ \section2 Customizing QToolBar
+
+ The background and the handle of a QToolBar is customized as below:
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 151
+
+ \section2 Customizing QToolBox
+
+ The tabs of the QToolBox are customized using the 'tab' subcontrol.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 152
+
+ \section2 Customizing QToolButton
+
+ There are three types of QToolButtons.
+ \list
+ \i The QToolButton has no menu. In this case, the QToolButton is styled
+ exactly like QPushButton. See
+ \l{#Customizing QPushButton}{Customizing QPushButton} for an
+ example.
+
+ \i The QToolButton has a menu and has the QToolButton::popupMode set to
+ QToolButton::DelayedPopup or QToolButton::InstantPopup. In this case,
+ the QToolButton is styled exactly like a QPushButton with a menu.
+ See \l{#Customizing QPushButton}{Customizing QPushButton} for an
+ example of the usage of the menu-indicator pseudo state.
+
+ \i The QToolButton has its QToolButton::popupMode set to
+ QToolButton::MenuButtonPopup. In this case, we style it as follows:
+ \endlist
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 153
+
+
+ \section2 Customizing QToolTip
+
+ QToolTip is customized exactly like a QLabel. In addition, for platforms
+ that support it, the opacity property may be set to adjust the opacity.
+
+ For example,
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 154
+
+ \section2 Customizing QTreeView
+
+ The background color of alternating rows can be customized using the following
+ style sheet:
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 155
+
+ To provide a special background when you hover over items, we can use the
+ \l{item-sub}{::item} subcontrol. For example,
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 156
+
+ The branches of a QTreeView are styled using the
+ \l{Qt Style Sheets Reference#branch-sub}{::branch} subcontrol. The
+ following stylesheet color codes the various states when drawing
+ a branch.
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 157
+
+ Colorful, though it is, a more useful example can be made using the
+ following images:
+
+ \table
+ \row
+ \o \inlineimage stylesheet-vline.png
+ \o \inlineimage stylesheet-branch-more.png
+ \o \inlineimage stylesheet-branch-end.png
+ \o \inlineimage stylesheet-branch-closed.png
+ \o \inlineimage stylesheet-branch-open.png
+ \row
+ \o vline.png
+ \o branch-more.png
+ \o branch-end.png
+ \o branch-closed.png
+ \o branch-open.png
+ \endtable
+
+ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 158
+
+ The resulting tree view looks like this:
+
+ \image stylesheet-treeview.png
+
+ \sa {Style Sheet Example}, {Supported HTML Subset}, QStyle
+
+
+ \section1 Common mistakes
+
+ This section lists some common mistakes when using stylesheets.
+
+ \section2 QPushButton and images
+
+ When styling a QPushButton, it is often desirable to use an image as the
+ button graphic. It is common to try the
+ \l{Qt Style Sheets Reference#background-image-prop}{background-image}
+ property,
+ but this has a number of drawbacks: For instance, the background will
+ often appear hidden behind the button decoration, because it is not
+ considered a background. In addition, if the button is resized, the
+ entire background will be stretched or tiled, which does not
+ always look good.
+
+ It is better to use the
+ \l{Qt Style Sheets Reference#border-image-prop}{border-image}
+ property, as it will always display the image,
+ regardless of the background (you can combine it with a background if it
+ has alpha values in it), and it has special settings to deal with button
+ resizing.
+
+ Consider the following snippet:
+
+ \snippet doc/src/snippets/stylesheet/common-mistakes.cpp 1
+
+ This will produce a button looking like this:
+
+ \image stylesheet-border-image-normal.png
+
+ The numbers after the url gives the top, right, bottom and left number of
+ pixels, respectively. These numbers correspond to the border and should not
+ stretch when the size changes.
+ Whenever you resize the button, the middle part of the image will stretch
+ in both directions, while the pixels specified in the stylesheet
+ will not. This makes the borders of the button look more natural, like
+ this:
+
+ \table
+ \row
+ \o \inlineimage stylesheet-border-image-stretched.png
+ \row
+ \o With borders
+ \endtable
+
+ \table
+ \row
+ \o \inlineimage stylesheet-border-image-wrong.png
+ \row
+ \o Without borders
+ \endtable
+
+ */
diff --git a/doc/src/tech-preview/images/mainwindow-docks-example.png b/doc/src/tech-preview/images/mainwindow-docks-example.png
new file mode 100644
index 0000000..a5641fd
--- /dev/null
+++ b/doc/src/tech-preview/images/mainwindow-docks-example.png
Binary files differ
diff --git a/doc/src/tech-preview/images/mainwindow-docks.png b/doc/src/tech-preview/images/mainwindow-docks.png
new file mode 100644
index 0000000..96dafc3
--- /dev/null
+++ b/doc/src/tech-preview/images/mainwindow-docks.png
Binary files differ
diff --git a/doc/src/tech-preview/images/plaintext-layout.png b/doc/src/tech-preview/images/plaintext-layout.png
new file mode 100644
index 0000000..9a0f9c1
--- /dev/null
+++ b/doc/src/tech-preview/images/plaintext-layout.png
Binary files differ
diff --git a/doc/src/tech-preview/known-issues.html b/doc/src/tech-preview/known-issues.html
new file mode 100644
index 0000000..05df69e
--- /dev/null
+++ b/doc/src/tech-preview/known-issues.html
@@ -0,0 +1,110 @@
+<html>
+<head>
+<title>Known issues</title>
+<link rel="stylesheet" href="http://qtsoftware.com/trollstyle.css">
+<style type="text/css">
+ H2 { position: relative; top: 10px; }
+ H4 { margin-left: 15px; }
+ .issue { margin-left: 15px; }
+ .workaround { margin-left: 30px; margin-right: 30px; padding: 2px; border-style: solid; border-color: #AACA00; border-width: 1px; }
+</style>
+</head>
+<body bgcolor="#ffffff">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr bgcolor="#E5E5E5">
+ <td><img src="http://doc.trolltech.com/doctitle.png" width="443" height="32" border="0"></td>
+ <td align="right" valign="middle"></td></tr></table>
+<h1>Known Issues: Qt 4.0.0 Technology Preview 1</h1>
+<p>
+ This is the list of known and reported issues for the the Qt 4.0.0
+ Technology Preview 1. This list is updated daily.
+</p>
+<br><br>
+<table width="100%">
+ <tr><td align="left"><b><a href="#buildissues">Build Issues</a></b></td></tr>
+ <tr><td align="left"><b><a href="#general">General</a></b></td></tr>
+ <tr><td align="left"><b><a href="#demos">Demos</a></b></td></tr>
+ <tr><td align="left"><b><a href="#window">Windows specific</a></b></td></tr>
+ <tr><td align="left"><b><a href="#x11">X11 specific</a></b></td></tr>
+ <tr><td align="left"><b><a href="#mac">Mac specific</a></b></td></tr>
+</table>
+<br><br>
+<!-- Build section ------------------------------------------------- -->
+<a name="buildissues"></a>
+<h2>Build Issues</h2>
+ <h4>Static libraries on Mac OS X</h4>
+ <p class="issue">Building a static build on mac will fail the first time.</p>
+ <p class="workaround">Run qmake a second time.</p>
+
+ <h4>QTDIR</h4>
+ <p class="issue">Some applications(e.g. uic3) need QTDIR set and QTDIR/bin in the path to work.</p>
+ <p class="workaround">Set QTDIR and PATH as described in INSTALL.</p>
+
+ <h4>ODBC driver on Windows</h4>
+ <p class="issue">Problems compiling the ODBC driver.</p>
+ <p class="workaround">Change the include from qapplication.h to qcoreapplication.h</p>
+
+ <h4>QtGui does not link because of accessibility errors</h4>
+ <p class="issue">undefined reference to QAccessible::setRootObject(QObject*)</p>
+ <p class="workaround">Rerun configure and rebuild, if that does not help, add the contents of $QTDIR/.qt.config to $QTDIR/.qmake.cache</p>
+
+
+<!-- General section ---------------------------------------------- -->
+<a name="general"></a>
+<h2>General</h2>
+
+ <h4>No connection to Oracle</h4>
+ <p class="issue">I cannot connect to my Oracle server</p>
+ <p class="workaround">Use the Oracle &gt;= 9 client libraries, currently there is no workaround for OCI 8</p>
+
+ <h4>QSqlModel</h4>
+ <p class="issue">Only the first 16 rows from a database result are displayed</p>
+ <p class="workaround">You are using a database driver which does not report back the size of a result set and incremental fetching is not yet implemented in the itemviews. You can either use another database like MySQL or increase the QSQL_PREFETCH in qsqlmodel.cpp</p>
+
+
+<!-- Demos section ------------------------------------------------- -->
+<a name="demos"></a>
+<h2>Demos</h2>
+
+ <h4>-</h4>
+
+
+<!-- Windows platform section -------------------------------------- -->
+<a name="window"></a>
+<h2>Windows specific</h2>
+
+ <h4>Qt Assistant</h4>
+ <p class="issue">Problems with zooming and laying out text. Sometimes the text overlaps.</p>
+
+ <h4>GDI handle leak</h4>
+ <p class="issue">Setting fonts through QPainter::setFont() leaks GDI
+ handles on windows. This is for instance visible in the OpenGL
+ part of the Arthur demo. The issue will be fixed before the next
+ preview.</p>
+
+<!-- X11 platform section ------------------------------------------ -->
+<a name="x11"></a>
+<h2>X11 specific</h2>
+
+ <h4>-</h4>
+
+
+<!-- Mac platform section ------------------------------------------ -->
+<a name="mac"></a>
+<h2>Mac specific</h2>
+
+ <h4>QComboBox</h4>
+ <p class="issue">Does not have the native Mac look and feel yet. It is rendered in a Windows-like style.</p>
+
+ <h4>Clicking on widgets</h4>
+ <p class="issue"><i>Jaguar 10.2 only:</i> Clicking on widgets that has a focusrect may fail.</p>
+ <p class="workaround">Use 10.3 for now.</p>
+
+
+<!-- [Page footer] ------------------------------------------------- -->
+<table width="100%">
+ <tr><td><hr size="1" noshade></td></tr>
+ <tr><td align="center" valign="bottom"><a href="http://qtsoftware.com">qtsoftware.com</a></td></tr>
+</table>
+</body>
+</html>
diff --git a/doc/src/templates.qdoc b/doc/src/templates.qdoc
new file mode 100644
index 0000000..ab602a7
--- /dev/null
+++ b/doc/src/templates.qdoc
@@ -0,0 +1,230 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page templates.html
+ \title Why Doesn't Qt Use Templates for Signals and Slots?
+ \ingroup architecture
+ \brief The reasoning behind Qt's implementation of signals and slots.
+
+ Templates are a builtin mechanism in C++ that allows the compiler to
+ generate code on the fly, depending on the type of the arguments
+ passed. As such, templates are highly interesting to framework
+ creators, and we do use advanced templates in many places
+ in Qt. However, there are limitations: There are things that you can
+ easily express with templates, and there are things that are
+ impossible to express with templates. A generic vector container class
+ is easily expressible, even with partial specialisation for pointer
+ types, while a function that sets up a graphical user interface based
+ on a XML description given as a string is not expressible as
+ template. And then there is gray area in between. Things that you can
+ hack with templates at the cost of code size, readability,
+ portability, usability, extensability, robustness and ultimately
+ design beauty. Both templates and the C preprocessor can be stretched
+ to do incredibility smart and mind boggling things. But just because
+ those things can be done, does not necessarily mean doing them is the
+ right design choice.
+
+ There is an important practical challenge we have to mention: due to
+ the inadequacies of various compilers it is still not possible to
+ fully exploit the template mechanism in cross-platform
+ applications. Code unfortunately is not meant to be published in
+ books, but compiled with real-world compilers on real-world operating
+ system. Even today, many widely used C++ compilers have problems with
+ advanced templates. For example, you cannot safely rely on partial
+ template specialisation, which is essential for some non-trivial
+ problem domains. Some compilers also have limitations with regards to
+ template member functions, which make it hard to combine generic
+ programming with object orientated programming. However, we do not
+ perceive these problems as a serious limitation in our work. Even if
+ all our users had access to a fully standards compliant modern C++
+ compiler with excellent template support, we would not abandon the
+ string-based approach used by our meta object compiler for a template
+ based signals and slots system. Here are five reasons why:
+
+ \section1 Syntax matters
+
+ Syntax isn't just sugar: the syntax we use to express our algorithms can
+ significantly affect the readability and maintainability of our code.
+ The syntax used for Qt's signals and slots has proved very successful in
+ practice. The syntax is intuitive, simple to use and easy to read.
+ People learning Qt find the syntax helps them understand and utilize the
+ signals and slots concept -- despite its highly abstract and generic
+ nature. Furthermore, declaring signals in class definitions ensures that
+ the signals are protected in the sense of protected C++ member
+ functions. This helps programmers get their design right from the very
+ beginning, without even having to think about design patterns.
+
+ \section1 Code Generators are Good
+
+ Qt's \c{moc} (Meta Object Compiler) provides a clean way to go
+ beyond the compiled language's facilities. It does so by generating
+ additional C++ code which can be compiled by any standard C++ compiler.
+ The \c{moc} reads C++ source files. If it finds one or more class
+ declarations that contain the Q_OBJECT macro, it produces another C++
+ source file which contains the meta object code for those classes. The
+ C++ source file generated by the \c{moc} must be compiled and
+ linked with the implementation of the class (or it can be
+ \c{#included} into the class's source file). Typically \c{moc}
+ is not called manually, but automatically by the build system, so it
+ requires no additional effort by the programmer.
+
+ The \c{moc} is not the only code generator Qt is using. Another
+ prominent example is the \c{uic} (User Interface Compiler). It
+ takes a user interface description in XML and creates C++ code that
+ sets up the form. Outside Qt, code generators are common as well. Take
+ for example \c{rpc} and \c{idl}, that enable programs or
+ objects to communicate over process or machine boundaries. Or the vast
+ variety of scanner and parser generators, with \c{lex} and
+ \c{yacc} being the most well-known ones. They take a grammar
+ specification as input and generate code that implements a state
+ machine. The alternatives to code generators are hacked compilers,
+ proprietary languages or graphical programming tools with one-way
+ dialogs or wizards that generate obscure code during design time
+ rather than compile time. Rather than locking our customers into a
+ proprietary C++ compiler or into a particular Integrated Development
+ Environment, we enable them to use whatever tools they prefer. Instead
+ of forcing programmers to add generated code into source repositories,
+ we encourage them to add our tools to their build system: cleaner,
+ safer and more in the spirit of UNIX.
+
+
+ \section1 GUIs are Dynamic
+
+ C++ is a standarized, powerful and elaborate general-purpose language.
+ It's the only language that is exploited on such a wide range of
+ software projects, spanning every kind of application from entire
+ operating systems, database servers and high end graphics
+ applications to common desktop applications. One of the keys to C++'s
+ success is its scalable language design that focuses on maximum
+ performance and minimal memory consumption whilst still maintaining
+ ANSI C compatibility.
+
+ For all these advantages, there are some downsides. For C++, the static
+ object model is a clear disadvantage over the dynamic messaging approach
+ of Objective C when it comes to component-based graphical user interface
+ programming. What's good for a high end database server or an operating
+ system isn't necessarily the right design choice for a GUI frontend.
+ With \c{moc}, we have turned this disadvantage into an advantage,
+ and added the flexibility required to meet the challenge of safe and
+ efficient graphical user interface programming.
+
+ Our approach goes far beyond anything you can do with templates. For
+ example, we can have object properties. And we can have overloaded
+ signals and slots, which feels natural when programming in a language
+ where overloads are a key concept. Our signals add zero bytes to the
+ size of a class instance, which means we can add new signals without
+ breaking binary compatibility. Because we do not rely on excessive
+ inlining as done with templates, we can keep the code size smaller.
+ Adding new connections just expands to a simple function call rather
+ than a complex template function.
+
+ Another benefit is that we can explore an object's signals and slots at
+ runtime. We can establish connections using type-safe call-by-name,
+ without having to know the exact types of the objects we are connecting.
+ This is impossible with a template based solution. This kind of runtime
+ introspection opens up new possibilities, for example GUIs that are
+ generated and connected from Qt Designer's XML \c{ui} files.
+
+ \section1 Calling Performance is Not Everything
+
+ Qt's signals and slots implementation is not as fast as a
+ template-based solution. While emitting a signal is approximately the
+ cost of four ordinary function calls with common template
+ implementations, Qt requires effort comparable to about ten function
+ calls. This is not surprising since the Qt mechanism includes a
+ generic marshaller, introspection, queued calls between different
+ threads, and ultimately scriptability. It does not rely on excessive
+ inlining and code expansion and it provides unmatched runtime
+ safety. Qt's iterators are safe while those of faster template-based
+ systems are not. Even during the process of emitting a signal to
+ several receivers, those receivers can be deleted safely without your
+ program crashing. Without this safety, your application would
+ eventually crash with a difficult to debug free'd memory read or write
+ error.
+
+ Nonetheless, couldn't a template-based solution improve the performance
+ of an application using signals and slots? While it is true that Qt adds
+ a small overhead to the cost of calling a slot through a signal, the
+ cost of the call is only a small proportion of the entire cost of a
+ slot. Benchmarking against Qt's signals and slots system is typically
+ done with empty slots. As soon as you do anything useful in your slots,
+ for example a few simple string operations, the calling overhead becomes
+ negligible. Qt's system is so optimized that anything that requires
+ operator new or delete (for example, string operations or
+ inserting/removing something from a template container) is significantly
+ more expensive than emitting a signal.
+
+ Aside: If you have a signals and slots connection in a tight inner loop
+ of a performance critical task and you identify this connection as the
+ bottleneck, think about using the standard listener-interface pattern
+ rather than signals and slots. In cases where this occurs, you probably
+ only require a 1:1 connection anyway. For example, if you have an object
+ that downloads data from the network, it's a perfectly sensible design
+ to use a signal to indicate that the requested data arrived. But if you
+ need to send out every single byte one by one to a consumer, use a
+ listener interface rather than signals and slots.
+
+ \section1 No Limits
+
+ Because we had the \c{moc} for signals and slots, we could add
+ other useful things to it that could not be done with templates.
+ Among these are scoped translations via a generated \c{tr()}
+ function, and an advanced property system with introspection and
+ extended runtime type information. The property system alone is a
+ great advantage: a powerful and generic user interface design tool
+ like Qt Designer would be a lot harder to write - if not impossible -
+ without a powerful and introspective property system. But it does not
+ end here. We also provide a dynamic qobject_cast<T>() mechanism
+ that does not rely on the system's RTTI and thus does not share its
+ limitations. We use it to safely query interfaces from dynamically
+ loaded components. Another application domain are dynamic meta
+ objects. We can e.g. take ActiveX components and at runtime create a
+ meta object around it. Or we can export Qt components as ActiveX
+ components by exporting its meta object. You cannot do either of these
+ things with templates.
+
+ C++ with the \c{moc} essentially gives us the flexibility of
+ Objective-C or of a Java Runtime Environment, while maintaining C++'s
+ unique performance and scalability advantages. It is what makes Qt the
+ flexible and comfortable tool we have today.
+
+*/
diff --git a/doc/src/threads.qdoc b/doc/src/threads.qdoc
new file mode 100644
index 0000000..54bcf2d
--- /dev/null
+++ b/doc/src/threads.qdoc
@@ -0,0 +1,609 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page threads.html
+ \title Thread Support in Qt
+ \ingroup architecture
+ \brief A detailed discussion of thread handling in Qt.
+
+ Qt provides thread support in the form of platform-independent
+ threading classes, a thread-safe way of posting events, and
+ signal-slot connections across threads. This makes it easy to
+ develop portable multithreaded Qt applications and take advantage
+ of multiprocessor machines. Multithreaded programming is also a
+ useful paradigm for performing time-consuming operations without
+ freezing the user interface of an application.
+
+ Earlier versions of Qt offered an option to build the library
+ without thread support. Since Qt 4.0, threads are always enabled.
+
+ This document is intended for an audience that has knowledge of,
+ and experience with, multithreaded applications. If you are new
+ to threading see our \l{#reading}{Recommended Reading} list.
+
+ Topics:
+
+ \tableofcontents
+
+ \section1 The Threading Classes
+
+ Qt includes the following thread classes:
+
+ \list
+ \o QThread provides the means to start a new thread.
+ \o QThreadStorage provides per-thread data storage.
+ \o QThreadPool manages a pool of threads that run QRunnable objects.
+ \o QRunnable is an abstract class representing a runnable object.
+ \o QMutex provides a mutual exclusion lock, or mutex.
+ \o QMutexLocker is a convenience class that automatically locks
+ and unlocks a QMutex.
+ \o QReadWriteLock provides a lock that allows simultaneous read access.
+ \o QReadLocker and QWriteLocker are convenience classes that automatically
+ lock and unlock a QReadWriteLock.
+ \o QSemaphore provides an integer semaphore (a generalization of a mutex).
+ \o QWaitCondition provides a way for threads to go to sleep until
+ woken up by another thread.
+ \o QAtomicInt provides atomic operations on integers.
+ \o QAtomicPointer provides atomic operations on pointers.
+ \endlist
+
+ \note Qt's threading classes are implemented with native threading APIs;
+ e.g., Win32 and pthreads. Therefore, they can be used with threads of the
+ same native API.
+
+ \section2 Creating a Thread
+
+ To create a thread, subclass QThread and reimplement its
+ \l{QThread::run()}{run()} function. For example:
+
+ \snippet doc/src/snippets/threads/threads.h 0
+ \codeline
+ \snippet doc/src/snippets/threads/threads.cpp 0
+ \snippet doc/src/snippets/threads/threads.cpp 1
+ \dots
+ \snippet doc/src/snippets/threads/threads.cpp 2
+
+ Then, create an instance of the thread object and call
+ QThread::start(). The code that appears in the
+ \l{QThread::run()}{run()} reimplementation will then be executed
+ in a separate thread. Creating threads is explained in more
+ detail in the QThread documentation.
+
+ Note that QCoreApplication::exec() must always be called from the
+ main thread (the thread that executes \c{main()}), not from a
+ QThread. In GUI applications, the main thread is also called the
+ GUI thread because it's the only thread that is allowed to
+ perform GUI-related operations.
+
+ In addition, you must create the QApplication (or
+ QCoreApplication) object before you can create a QThread.
+
+ \section2 Synchronizing Threads
+
+ The QMutex, QReadWriteLock, QSemaphore, and QWaitCondition
+ classes provide means to synchronize threads. While the main idea
+ with threads is that they should be as concurrent as possible,
+ there are points where threads must stop and wait for other
+ threads. For example, if two threads try to access the same
+ global variable simultaneously, the results are usually
+ undefined.
+
+ QMutex provides a mutually exclusive lock, or mutex. At most one
+ thread can hold the mutex at any time. If a thread tries to
+ acquire the mutex while the mutex is already locked, the thread will
+ be put to sleep until the thread that currently holds the mutex
+ unlocks it. Mutexes are often used to protect accesses to shared
+ data (i.e., data that can be accessed from multiple threads
+ simultaneously). In the \l{Reentrancy and Thread-Safety} section
+ below, we will use it to make a class thread-safe.
+
+ QReadWriteLock is similar to QMutex, except that it distinguishes
+ between "read" and "write" access to shared data and allows
+ multiple readers to access the data simultaneously. Using
+ QReadWriteLock instead of QMutex when it is possible can make
+ multithreaded programs more concurrent.
+
+ QSemaphore is a generalization of QMutex that protects a certain
+ number of identical resources. In contrast, a mutex protects
+ exactly one resource. The \l{threads/semaphores}{Semaphores}
+ example shows a typical application of semaphores: synchronizing
+ access to a circular buffer between a producer and a consumer.
+
+ QWaitCondition allows a thread to wake up other threads when some
+ condition has been met. One or many threads can block waiting for
+ a QWaitCondition to set a condition with
+ \l{QWaitCondition::wakeOne()}{wakeOne()} or
+ \l{QWaitCondition::wakeAll()}{wakeAll()}. Use
+ \l{QWaitCondition::wakeOne()}{wakeOne()} to wake one randomly
+ selected event or \l{QWaitCondition::wakeAll()}{wakeAll()} to
+ wake them all. The \l{threads/waitconditions}{Wait Conditions}
+ example shows how to solve the producer-consumer problem using
+ QWaitCondition instead of QSemaphore.
+
+ Note that Qt's synchronization classes rely on the use of properly
+ aligned pointers. For instance, you cannot use packed classes with
+ MSVC.
+
+ \target qtconcurrent intro
+ \section1 QtConcurrent
+
+ The QtConcurrent namespace provides high-level APIs that make it
+ possible to write multi-threaded programs without using low-level
+ threading primitives such as mutexes, read-write locks, wait
+ conditions, or semaphores. Programs written with QtConcurrent
+ automatically adjust the number of threads used according to the
+ number of processor cores available. This means that applications
+ written today will continue to scale when deployed on multi-core
+ systems in the future.
+
+ QtConcurrent includes functional programming style APIs for
+ parallel list processing, including a MapReduce and FilterReduce
+ implementation for shared-memory (non-distributed) systems, and
+ classes for managing asynchronous computations in GUI
+ applications:
+
+ \list
+
+ \o QtConcurrent::map() applies a function to every item in a container,
+ modifying the items in-place.
+
+ \o QtConcurrent::mapped() is like map(), except that it returns a new
+ container with the modifications.
+
+ \o QtConcurrent::mappedReduced() is like mapped(), except that the
+ modified results are reduced or folded into a single result.
+
+ \o QtConcurrent::filter() removes all items from a container based on the
+ result of a filter function.
+
+ \o QtConcurrent::filtered() is like filter(), except that it returns a new
+ container with the filtered results.
+
+ \o QtConcurrent::filteredReduced() is like filtered(), except that the
+ filtered results are reduced or folded into a single result.
+
+ \o QtConcurrent::run() runs a function in another thread.
+
+ \o QFuture represents the result of an asynchronous computation.
+
+ \o QFutureIterator allows iterating through results available via QFuture.
+
+ \o QFutureWatcher allows monitoring a QFuture using signals-and-slots.
+
+ \o QFutureSynchronizer is a convenience class that automatically
+ synchronizes several QFutures.
+
+ \endlist
+
+ Qt Concurrent supports several STL-compatible container and iterator types,
+ but works best with Qt containers that have random-access iterators, such as
+ QList or QVector. The map and filter functions accept both containers and begin/end iterators.
+
+ STL Iterator support overview:
+
+ \table
+ \header
+ \o Iterator Type
+ \o Example classes
+ \o Support status
+ \row
+ \o Input Iterator
+ \o
+ \o Not Supported
+ \row
+ \o Output Iterator
+ \o
+ \o Not Supported
+ \row
+ \o Forward Iterator
+ \o std::slist
+ \o Supported
+ \row
+ \o Bidirectional Iterator
+ \o QLinkedList, std::list
+ \o Supported
+ \row
+ \o Random Access Iterator
+ \o QList, QVector, std::vector
+ \o Supported and Recommended
+ \endtable
+
+ Random access iterators can be faster in cases where Qt Concurrent is iterating
+ over a large number of lightweight items, since they allow skipping to any point
+ in the container. In addition, using random access iterators allows Qt Concurrent
+ to provide progress information trough QFuture::progressValue() and QFutureWatcher::
+ progressValueChanged().
+
+ The non in-place modifying functions such as mapped() and filtered() makes a
+ copy of the container when called. If you are using STL containers this copy operation
+ might take some time, in this case we recommend specifying the begin and end iterators
+ for the container instead.
+
+ \keyword reentrant
+ \keyword thread-safe
+ \section1 Reentrancy and Thread-Safety
+
+ Throughout the Qt documentation, the terms \e reentrant and \e
+ thread-safe are used to specify how a function can be used in
+ multithreaded applications:
+
+ \list
+ \o A \e reentrant function can be called simultaneously by
+ multiple threads provided that each invocation of the function
+ references unique data.
+ \o A \e thread-safe function can be called simultaneously by
+ multiple threads when each invocation references shared data.
+ All access to the shared data is serialized.
+ \endlist
+
+ By extension, a class is said to be reentrant if each and every
+ one of its functions can be called simultaneously by multiple
+ threads on different instances of the class. Similarly, the class
+ is said to be thread-safe if the functions can be called by
+ different threads on the same instance.
+
+ Classes in the documentation will be documented as thread-safe only
+ if they are intended to be used by multiple threads.
+
+ Note that the terminology in this domain isn't entirely
+ standardized. POSIX uses a somewhat different definition of
+ reentrancy and thread-safety for its C APIs. When dealing with an
+ object-oriented C++ class library such as Qt, the definitions
+ must be adapted.
+
+ Most C++ classes are inherently reentrant, since they typically
+ only reference member data. Any thread can call such a member
+ function on an instance of the class, as long as no other thread
+ is calling a member function on the same instance. For example,
+ the \c Counter class below is reentrant:
+
+ \snippet doc/src/snippets/threads/threads.cpp 3
+ \snippet doc/src/snippets/threads/threads.cpp 4
+
+ The class isn't thread-safe, because if multiple threads try to
+ modify the data member \c n, the result is undefined. This is
+ because C++'s \c ++ and \c -- operators aren't necessarily
+ atomic. Indeed, they usually expand to three machine
+ instructions:
+
+ \list 1
+ \o Load the variable's value in a register.
+ \o Increment or decrement the register's value.
+ \o Store the register's value back into main memory.
+ \endlist
+
+ If thread A and thread B load the variable's old value
+ simultaneously, increment their register, and store it back, they
+ end up overwriting each other, and the variable is incremented
+ only once!
+
+ Clearly, the access must be serialized: Thread A must perform
+ steps 1, 2, 3 without interruption (atomically) before thread B
+ can perform the same steps; or vice versa. An easy way to make
+ the class thread-safe is to protect all access to the data
+ members with a QMutex:
+
+ \snippet doc/src/snippets/threads/threads.cpp 5
+ \snippet doc/src/snippets/threads/threads.cpp 6
+
+ The QMutexLocker class automatically locks the mutex in its
+ constructor and unlocks it when the destructor is invoked, at the
+ end of the function. Locking the mutex ensures that access from
+ different threads will be serialized. The \c mutex data member is
+ declared with the \c mutable qualifier because we need to lock
+ and unlock the mutex in \c value(), which is a const function.
+
+ Most Qt classes are reentrant and not thread-safe, to avoid the
+ overhead of repeatedly locking and unlocking a QMutex. For
+ example, QString is reentrant, meaning that you can use it in
+ different threads, but you can't access the same QString object
+ from different threads simultaneously (unless you protect it with
+ a mutex yourself). A few classes and functions are thread-safe;
+ these are mainly thread-related classes such as QMutex, or
+ fundamental functions such as QCoreApplication::postEvent().
+
+ \section1 Threads and QObjects
+
+ QThread inherits QObject. It emits signals to indicate that the
+ thread started or finished executing, and provides a few slots as
+ well.
+
+ More interesting is that \l{QObject}s can be used in multiple
+ threads, emit signals that invoke slots in other threads, and
+ post events to objects that "live" in other threads. This is
+ possible because each thread is allowed to have its own event
+ loop.
+
+ \section2 QObject Reentrancy
+
+ QObject is reentrant. Most of its non-GUI subclasses, such as
+ QTimer, QTcpSocket, QUdpSocket, QHttp, QFtp, and QProcess, are
+ also reentrant, making it possible to use these classes from
+ multiple threads simultaneously. Note that these classes are
+ designed to be created and used from within a single thread;
+ creating an object in one thread and calling its functions from
+ another thread is not guaranteed to work. There are three
+ constraints to be aware of:
+
+ \list
+ \o \e{The child of a QObject must always be created in the thread
+ where the parent was created.} This implies, among other
+ things, that you should never pass the QThread object (\c
+ this) as the parent of an object created in the thread (since
+ the QThread object itself was created in another thread).
+
+ \o \e{Event driven objects may only be used in a single thread.}
+ Specifically, this applies to the \l{timers.html}{timer
+ mechanism} and the \l{QtNetwork}{network module}. For example,
+ you cannot start a timer or connect a socket in a thread that
+ is not the \l{QObject::thread()}{object's thread}.
+
+ \o \e{You must ensure that all objects created in a thread are
+ deleted before you delete the QThread.} This can be done
+ easily by creating the objects on the stack in your
+ \l{QThread::run()}{run()} implementation.
+ \endlist
+
+ Although QObject is reentrant, the GUI classes, notably QWidget
+ and all its subclasses, are not reentrant. They can only be used
+ from the main thread. As noted earlier, QCoreApplication::exec()
+ must also be called from that thread.
+
+ In practice, the impossibility of using GUI classes in other
+ threads than the main thread can easily be worked around by
+ putting time-consuming operations in a separate worker thread and
+ displaying the results on screen in the main thread when the
+ worker thread is finished. This is the approach used for
+ implementing the \l{threads/mandelbrot}{Mandelbrot} and
+ the \l{network/blockingfortuneclient}{Blocking Fortune Client}
+ example.
+
+ \section2 Per-Thread Event Loop
+
+ Each thread can have its own event loop. The initial thread
+ starts its event loops using QCoreApplication::exec(); other
+ threads can start an event loop using QThread::exec(). Like
+ QCoreApplication, QThread provides an
+ \l{QThread::exit()}{exit(int)} function and a
+ \l{QThread::quit()}{quit()} slot.
+
+ An event loop in a thread makes it possible for the thread to use
+ certain non-GUI Qt classes that require the presence of an event
+ loop (such as QTimer, QTcpSocket, and QProcess). It also makes it
+ possible to connect signals from any threads to slots of a
+ specific thread. This is explained in more detail in the
+ \l{Signals and Slots Across Threads} section below.
+
+ \image threadsandobjects.png Threads, objects, and event loops
+
+ A QObject instance is said to \e live in the thread in which it
+ is created. Events to that object are dispatched by that thread's
+ event loop. The thread in which a QObject lives is available using
+ QObject::thread().
+
+ Note that for QObjects that are created before QApplication,
+ QObject::thread() returns zero. This means that the main thread
+ will only handle posted events for these objects; other event
+ processing is not done at all for objects with no thread. Use the
+ QObject::moveToThread() function to change the thread affinity for
+ an object and its children (the object cannot be moved if it has a
+ parent).
+
+ Calling \c delete on a QObject from another thread than the
+ thread where it is created (or accessing the object in other
+ ways) is unsafe unless you can guarantee that the object isn't
+ processing events at the same moment. Use QObject::deleteLater()
+ instead; it will post a
+ \l{QEvent::DeferredDelete}{DeferredDelete} event, which the
+ event loop of the object's thread will eventually pick up.
+
+ If no event loop is running, events won't be delivered to the
+ object. For example, if you create a QTimer object in a thread
+ but never call \l{QThread::exec()}{exec()}, the QTimer will never emit its
+ \l{QTimer::timeout()}{timeout()} signal. Calling
+ \l{QObject::deleteLater()}{deleteLater()} won't work either. (These
+ restrictions apply to the main thread as well.)
+
+ You can manually post events to any object in any thread at any
+ time using the thread-safe function
+ QCoreApplication::postEvent(). The events will automatically be
+ dispatched by the event loop of the thread where the object was
+ created.
+
+ Event filters are supported in all threads, with the restriction
+ that the monitoring object must live in the same thread as the
+ monitored object. Similarly, QCoreApplication::sendEvent()
+ (unlike \l{QCoreApplication::postEvent()}{postEvent()}) can only
+ be used to dispatch events to objects living in the thread from
+ which the function is called.
+
+ \section2 Accessing QObject Subclasses from Other Threads
+
+ QObject and all of its subclasses are not thread-safe. This
+ includes the entire event delivery system. It is important to keep
+ in mind that the event loop may be delivering events to your
+ QObject subclass while you are accessing the object from another
+ thread.
+
+ If you are calling a function on an QObject subclass that doesn't
+ live in the current thread and the object might receive events,
+ you must protect all access to your QObject subclass's internal
+ data with a mutex; otherwise, you may experience crashes or other
+ undesired behavior.
+
+ Like other objects, QThread objects live in the thread where the
+ object was created -- \e not in the thread that is created when
+ QThread::run() is called. It is generally unsafe to provide slots
+ in your QThread subclass, unless you protect the member variables
+ with a mutex.
+
+ On the other hand, you can safely emit signals from your
+ QThread::run() implementation, because signal emission is
+ thread-safe.
+
+ \section2 Signals and Slots Across Threads
+
+ Qt supports three types of signal-slot connections:
+
+ \list
+ \o With \l{Qt::DirectConnection}{direct connections}, the
+ slot gets called immediately when the signal is emitted. The
+ slot is executed in the thread that emitted the signal (which
+ is not necessarily the thread where the receiver object
+ lives).
+
+ \o With \l{Qt::QueuedConnection}{queued connections}, the
+ slot is invoked when control returns to the event loop of the
+ thread to which the object belongs. The slot is executed in
+ the thread where the receiver object lives.
+
+ \o With \l{Qt::AutoConnection}{auto connections} (the default),
+ the behavior is the same as with direct connections if
+ the signal is emitted in the thread where the receiver lives;
+ otherwise, the behavior is that of a queued connection.
+ \endlist
+
+ The connection type can be specified by passing an additional
+ argument to \l{QObject::connect()}{connect()}. Be aware that
+ using direct connections when the sender and receiver live in
+ different threads is unsafe if an event loop is running in the
+ receiver's thread, for the same reason that calling any function
+ on an object living in another thread is unsafe.
+
+ QObject::connect() itself is thread-safe.
+
+ The \l{threads/mandelbrot}{Mandelbrot} example uses a queued
+ connection to communicate between a worker thread and the main
+ thread. To avoid freezing the main thread's event loop (and, as a
+ consequence, the application's user interface), all the
+ Mandelbrot fractal computation is done in a separate worker
+ thread. The thread emits a signal when it is done rendering the
+ fractal.
+
+ Similarly, the \l{network/blockingfortuneclient}{Blocking Fortune
+ Client} example uses a separate thread for communicating with
+ a TCP server asynchronously.
+
+ \section1 Threads and Implicit Sharing
+
+ Qt uses an optimization called \l{implicit sharing} for many of
+ its value class, notably QImage and QString. Beginning with Qt 4,
+ implicit shared classes can safely be copied across threads, like
+ any other value classes. They are fully
+ \l{#reentrant}{reentrant}. The implicit sharing is really
+ \e implicit.
+
+ In many people's minds, implicit sharing and multithreading are
+ incompatible concepts, because of the way the reference counting
+ is typically done. Qt, however, uses atomic reference counting to
+ ensure the integrity of the shared data, avoiding potential
+ corruption of the reference counter.
+
+ Note that atomic reference counting does not guarantee
+ \l{#thread-safe}{thread-safety}. Proper locking should be used
+ when sharing an instance of an implicitly shared class between
+ threads. This is the same requirement placed on all
+ \l{#reentrant}{reentrant} classes, shared or not. Atomic reference
+ counting does, however, guarantee that a thread working on its
+ own, local instance of an implicitly shared class is safe. We
+ recommend using \l{Signals and Slots Across Threads}{signals and
+ slots} to pass data between threads, as this can be done without
+ the need for any explicit locking.
+
+ To sum it up, implicitly shared classes in Qt 4 are really \e
+ implicitly shared. Even in multithreaded applications, you can
+ safely use them as if they were plain, non-shared, reentrant
+ value-based classes.
+
+ \section1 Threads and the SQL Module
+
+ A connection can only be used from within the thread that created it.
+ Moving connections between threads or creating queries from a different
+ thread is not supported.
+
+ In addition, the third party libraries used by the QSqlDrivers can impose
+ further restrictions on using the SQL Module in a multithreaded program.
+ Consult the manual of your database client for more information
+
+ \section1 Painting in Threads
+
+ QPainter can be used to paint onto QImage, QPrinter, and QPicture
+ paint devices. Painting onto QPixmaps and QWidgets is \e not
+ supported. On Mac OS X the automatic progress dialog will not be
+ displayed if you are printing from outside the GUI thread.
+
+ Any number of threads can paint at any given time, however only
+ one thread at a time can paint on a given paint device. In other
+ words, two threads can paint at the same time if each paints onto
+ separate QImages, but the two threads cannot paint onto the same
+ QImage at the same time.
+
+ Note that on X11 systems without FontConfig support, Qt cannot
+ render text outside of the GUI thread. You can use the
+ QFontDatabase::supportsThreadedFontRendering() function to detect
+ whether or not font rendering can be used outside the GUI thread.
+
+ \section1 Threads and Rich Text Processing
+
+ The QTextDocument, QTextCursor, and \link richtext.html all
+ related classes\endlink are reentrant.
+
+ Note that a QTextDocument instance created in the GUI thread may
+ contain QPixmap image resources. Use QTextDocument::clone() to
+ create a copy of the document, and pass the copy to another thread for
+ further processing (such as printing).
+
+ \section1 Threads and the SVG module
+
+ The QSvgGenerator and QSvgRenderer classes in the QtSvg module
+ are reentrant.
+
+ \target reading
+ \section1 Recommended Reading
+
+ \list
+ \o \l{Threads Primer: A Guide to Multithreaded Programming}
+ \o \l{Thread Time: The Multithreaded Programming Guide}
+ \o \l{Pthreads Programming: A POSIX Standard for Better Multiprocessing}
+ \o \l{Win32 Multithreaded Programming}
+ \endlist
+*/
diff --git a/doc/src/timers.qdoc b/doc/src/timers.qdoc
new file mode 100644
index 0000000..4f54343
--- /dev/null
+++ b/doc/src/timers.qdoc
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page timers.html
+ \title Timers
+ \ingroup architecture
+ \brief How to use timers in your application.
+
+ QObject, the base class of all Qt objects, provides the basic
+ timer support in Qt. With QObject::startTimer(), you start a
+ timer with an interval in milliseconds as argument. The function
+ returns a unique integer timer ID. The timer will now fire at
+ regular intervals until you explicitly call QObject::killTimer()
+ with the timer ID.
+
+ For this mechanism to work, the application must run in an event
+ loop. You start an event loop with QApplication::exec(). When a
+ timer fires, the application sends a QTimerEvent, and the flow of
+ control leaves the event loop until the timer event is processed.
+ This implies that a timer cannot fire while your application is
+ busy doing something else. In other words: the accuracy of timers
+ depends on the granularity of your application.
+
+ In multithreaded applications, you can use the timer mechanism in
+ any thread that has an event loop. To start an event loop from a
+ non-GUI thread, use QThread::exec(). Qt uses the the object's
+ \l{QObject::thread()}{thread affinity} to determine which thread
+ will deliver the QTimerEvent. Because of this, you must start and
+ stop all timers in the object's thread; it is not possible to
+ start timers for objects in another thread.
+
+ The upper limit for the interval value is determined by the number
+ of milliseconds that can be specified in a signed integer
+ (in practice, this is a period of just over 24 days). The accuracy
+ depends on the underlying operating system. Windows 98 has 55
+ millisecond accuracy; other systems that we have tested can handle
+ 1 millisecond intervals.
+
+ The main API for the timer functionality is QTimer. That class
+ provides regular timers that emit a signal when the timer fires, and
+ inherits QObject so that it fits well into the ownership structure
+ of most GUI programs. The normal way of using it is like this:
+
+ \snippet doc/src/snippets/timers/timers.cpp 0
+ \snippet doc/src/snippets/timers/timers.cpp 1
+ \snippet doc/src/snippets/timers/timers.cpp 2
+
+ The QTimer object is made into a child of this widget so that,
+ when this widget is deleted, the timer is deleted too.
+ Next, its \l{QTimer::}{timeout()} signal is connected to the slot
+ that will do the work, it is started with a value of 1000
+ milliseconds, indicating that it will time out every second.
+
+ QTimer also provides a static function for single-shot timers.
+ For example:
+
+ \snippet doc/src/snippets/timers/timers.cpp 3
+
+ 200 milliseconds (0.2 seconds) after this line of code is
+ executed, the \c updateCaption() slot will be called.
+
+ For QTimer to work, you must have an event loop in your
+ application; that is, you must call QCoreApplication::exec()
+ somewhere. Timer events will be delivered only while the event
+ loop is running.
+
+ In multithreaded applications, you can use QTimer in any thread
+ that has an event loop. To start an event loop from a non-GUI
+ thread, use QThread::exec(). Qt uses the the timer's
+ \l{QObject::thread()}{thread affinity} to determine which thread
+ will emit the \l{QTimer::}{timeout()} signal. Because of this, you
+ must start and stop the timer in its thread; it is not possible to
+ start a timer from another thread.
+
+ The \l{widgets/analogclock}{Analog Clock} example shows how to use
+ QTimer to redraw a widget at regular intervals. From \c{AnalogClock}'s
+ implementation:
+
+ \snippet examples/widgets/analogclock/analogclock.cpp 0
+ \snippet examples/widgets/analogclock/analogclock.cpp 2
+ \snippet examples/widgets/analogclock/analogclock.cpp 3
+ \snippet examples/widgets/analogclock/analogclock.cpp 4
+ \snippet examples/widgets/analogclock/analogclock.cpp 5
+ \snippet examples/widgets/analogclock/analogclock.cpp 6
+ \dots
+ \snippet examples/widgets/analogclock/analogclock.cpp 7
+
+ Every second, QTimer will call the QWidget::update() slot to
+ refresh the clock's display.
+
+ If you already have a QObject subclass and want an easy
+ optimization, you can use QBasicTimer instead of QTimer. With
+ QBasicTimer, you must reimplement
+ \l{QObject::timerEvent()}{timerEvent()} in your QObject subclass
+ and handle the timeout there. The \l{widgets/wiggly}{Wiggly}
+ example shows how to use QBasicTimer.
+*/
diff --git a/doc/src/tools-list.qdoc b/doc/src/tools-list.qdoc
new file mode 100644
index 0000000..7af9936
--- /dev/null
+++ b/doc/src/tools-list.qdoc
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group qttools
+ \title Qt's Tools
+ \ingroup buildsystem
+
+ Qt is supplied with several command line and graphical tools to
+ ease and speed the development process. Each tool is listed here
+ with a link to its documentation.
+
+ \table
+ \header \o Tool \o Description
+ \row \o \l{Qt Designer Manual}{Qt Designer}
+ \o Create forms visually.
+ \row \o \l{Qt Assistant Manual}{Qt Assistant}
+ \o Quickly find the help you need.
+ \row \o \l{Qt Linguist Manual}{Qt Linguist, lupdate, lrelease, lconvert}
+ \o Translate applications to reach international markets.
+ \row \o \l{qmake Manual}{qmake}
+ \o Create makefiles from simple platform-independent project files (\c .pro files).
+ \omit
+ \row \o \l{emb-qvfb.html}{qvfb}
+ \o Run and test embedded applications on the desktop.
+ \row \o \l{emb-makeqpf.html}{makeqpf}
+ \o Create pre-rendered fonts for embedded devices.
+ \endomit
+ \row \o \l{moc}{Meta-Object Compiler (moc)}
+ \o Generate meta-object information for QObject subclasses.
+ \row \o \l{User Interface Compiler (uic)}
+ \o Generate C++ code from user interface files.
+ \row \o \l{Resource Compiler (rcc)}
+ \o Embed resources into Qt applications during the build process.
+ \row \o \l{Configuring Qt}{Configuring Qt (qtconfig)}
+ \o X11-based Qt configuration tool with online help.
+ \row \o \l{Fine-Tuning Features in Qt}{Configuring Qt Embedded (qconfig)}
+ \o Qt Embedded (Linux and Windows CE) configuration tool.
+ \row \o \l{Examples and Demos Launcher}
+ \o A launcher for Qt's Examples and Demonstration programs.
+ \row \o \l{qt3to4 - The Qt 3 to 4 Porting Tool}
+ \o A tool to assist in porting applications from Qt 3 to Qt 4.
+ \row \o \l{QtDBus XML compiler (qdbusxml2cpp)}
+ \o A tool to convert D-Bus interface descriptions to C++ source code.
+ \row \o \l{D-Bus Viewer}
+ \o A tool to introspect D-Bus objects and messages.
+ \endtable
+
+*/
diff --git a/doc/src/topics.qdoc b/doc/src/topics.qdoc
new file mode 100644
index 0000000..301f0d4
--- /dev/null
+++ b/doc/src/topics.qdoc
@@ -0,0 +1,304 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\group topics
+\title Topics
+
+This page provides a collection of documents grouped by topic.
+
+The \l{Grouped Classes} page contains a similar list of groups for
+Qt's class documentation.
+
+\generatelist{related}
+*/
+
+/*!
+\group architecture
+\title Architecture
+\ingroup topics
+\brief Documents about Qt's architecture and design.
+
+These documents describe aspects of Qt's architecture and design,
+including overviews of core Qt features and technologies.
+
+\generatelist{related}
+*/
+
+/*!
+\group buildsystem
+\title Build System
+\ingroup topics
+\brief Tools to help automate building and installation of Qt applications.
+
+Qt is provided with a set of build tools to help developers automate
+the process of building and installing Qt applications.
+
+\table 100%
+\header \o Development \o Cross-Platform Issues \o Specific Tools
+\row
+\o
+ \list
+ \o \l {Debugging Techniques}
+ \o \l {Qt's Tools}
+ \o \l {The Qt Resource System}
+ \o \l {Using Precompiled Headers}
+\endlist
+\o
+\list
+ \o \l {Cross Compiling Qt for Embedded Linux Applications}
+ \o \l {Deploying Qt Applications}
+ \o \l {Installation}{Installing Qt}
+ \o \l {Window System Specific Notes}
+\endlist
+\o
+\list
+ \o \l lupdate and \l lrelease
+ \o \l {moc}{Meta-Object Compiler (moc)}
+ \o \l {User Interface Compiler (uic)}
+ \o \l {Resource Compiler (rcc)}
+\endlist
+\endtable
+
+
+*/
+
+/*!
+\group classlists
+\title Class and Function Indexes
+\ingroup topics
+\brief Collections of classes and functions grouped together into lists.
+
+The following documents contain collections of classes, grouped by
+subject area or related to particular functionality, or comprehensive
+lists of classes and functions.
+
+\generatelist{related}
+*/
+
+/*!
+\group codecs
+\title Codecs
+\ingroup topics
+\brief Codec support in Qt.
+
+These codecs provide facilities for conversion between Unicode and
+specific text encodings.
+
+\generatelist{related}
+*/
+
+/*!
+\group gui-programming
+\title GUI Programming
+\ingroup topics
+\brief Resources for developers of GUI applications.
+
+The following list contains links to guides and other resources for
+developers of graphical user interface (GUI) applications.
+
+\generatelist{related}
+*/
+
+/*!
+\group howto
+\title How To Guides and Learning Resources
+\ingroup topics
+\brief Guides providing help on aspects of using Qt.
+
+These guides provide specific help about specific Qt-related topics.
+
+\generatelist{related}
+*/
+
+/*!
+\group licensing
+\title Licensing Information
+\ingroup topics
+\brief Information about licenses and licensing issues.
+
+These documents include information about Qt's licenses and the licenses
+of third party components used in Qt.
+
+\generatelist{related}
+*/
+
+/*!
+\group platform-notes
+\title Platform-Specific Notes
+\ingroup topics
+\brief Documents describing platform-specific features of Qt.
+
+These documents describe platform-specific features provided by Qt, and
+discuss issues related to particular platforms and environments.
+
+\generatelist{related}
+*/
+
+/*!
+\group porting
+\title Porting Guides
+\ingroup topics
+\brief Guides related to porting Qt applications and libraries.
+
+A number of guides and documents are available that cover porting issues,
+from detailed coverage of API differences between Qt 3 and Qt 4 to
+platform and tool-specific documentation.
+
+\generatelist{related}
+*/
+
+/*!
+\group text-processing
+\title Text Processing
+\ingroup topics
+\brief Text processing guides and classes.
+
+Qt provides an extensive collection of classes for text handling.
+The following guides and references describe basic text handling, support
+for internationalization and character encodings, and Qt's rich text
+system.
+
+\generatelist{related}
+*/
+
+/*!
+ \group tutorials
+ \title Tutorials
+ \ingroup topics
+ \brief Tutorials, guides and overviews to help you learn Qt.
+
+ A collection of tutorials and "walkthrough" guides are provided with Qt to
+ help new users get started with Qt development. These documents cover a
+ range of topics, from basic use of widgets to step-by-step tutorials that
+ show how an application is put together.
+
+ \section1 \l{Widgets Tutorial}
+
+ \inlineimage widget-examples.png
+
+ A beginner's guide to getting started with widgets and layouts to create
+ GUI applications.
+
+ \section1 \l{Address Book Tutorial}
+
+ \inlineimage addressbook-tutorial.png
+
+ A seven part guide to creating a fully-functioning address book
+ application. This tutorial is also available with
+ \l{Tutoriel "Carnet d'adresses"}{French explanation}.
+
+*/
+
+/*!
+\group activeqt-tools
+\title Tools for ActiveQt
+\ingroup topics
+\brief Tools to help integrate Qt applications with ActiveX components.
+
+These tools provide support for integrating Qt with ActiveX components.
+
+\generatelist{related}
+
+\sa {ActiveQt Framework}
+*/
+
+/*!
+\group scripting
+\title Scripting with ECMAScript
+\ingroup topics
+\brief Guides and references covering application scripting with ECMAScript.
+
+Qt 4.3 and later provides support for application scripting with ECMAScript.
+The following guides and references cover aspects of programming with
+ECMAScript and Qt.
+
+\generatelist{related}
+*/
+
+/*!
+\group threading
+\title Threading and Concurrent Programming
+\ingroup topics
+\brief Guides and references covering threading and concurrent programming.
+
+Qt provides a number of classes to handle the primitives used for multithreaded
+programming. From Qt 4.4, the QtConcurrent namespace also provides a set of higher
+level classes for concurrent programming.
+
+\generatelist{related}
+*/
+
+/*!
+\group qtce
+\title Qt for Windows CE
+\ingroup topics
+\ingroup qt-embedded
+\brief Documents related to Qt on Windows CE
+
+Qt for Windows CE is a C++ framework for GUI and application development
+for embedded devices running Windows CE. It runs on a variety of processors,
+including ARM, Intel x86, MIPS and SH-4.
+
+\table 100%
+\header \o Getting Started \o Reference \o Performance and Optimization
+\row
+\o
+ \list
+ \o \l {Qt for Windows CE Requirements}
+ \o \l {Installing Qt on Windows CE}
+ \o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt}
+ \o \l {Qt Examples#Qt for Embedded Linux}{Examples}
+\endlist
+\o
+\list
+ \o \l {Qt for Embedded Linux Classes}{Classes}
+ \o \l {Windows CE - Using shadow builds}{Using shadow builds}
+ \o \l {Windows CE - Working with Custom SDKs}{Working with Custom SDKs}
+\endlist
+\o
+\list
+ \o \l {Windows CE OpenGL ES}{OpenGL ES}
+ \o \l {Qt Performance Tuning}
+ \o \l {Fine-Tuning Features in Qt}
+\endlist
+\endtable
+*/
diff --git a/doc/src/trademarks.qdoc b/doc/src/trademarks.qdoc
new file mode 100644
index 0000000..647c6a6
--- /dev/null
+++ b/doc/src/trademarks.qdoc
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page trademarks.html
+
+ \title Trademarks
+ \ingroup licensing
+ \brief Information about trademarks owned by Nokia and other organisations.
+
+ Nokia, the Nokia logo, Qt, and the Qt logo are trademarks of Nokia
+  Corporation and/or its subsidiaries in Finland and other countries.
+
+ \list
+ \o Intel, Intel Inside (logos), MMX and Pentium are \reg trademarks of
+ Intel Corporation in the United States, other countries, or both.
+ \o Java and all Java-based trademarks are trademarks of Sun Microsystems,
+ Inc. in the United States, other countries, or both.
+ \o Linux is a \reg trademark of Linus Torvalds in the United States, other
+ countries or both.
+ \o Mac, Mac OS and Macintosh are \reg trademarks of Apple Computer, Inc.,
+ registered in the U.S. and other countries.
+ \o Microsoft, Windows, Windows NT, XP, Visual Studio and the Windows logo
+ are \reg trademarks of Microsoft Corporation in the United States, other
+ countries, or both.
+ \o Motif is a registered trademark of The Open Group in the United States,
+ other countries, or both.
+ \o OpenGL is a \reg trademark of Silicon Graphics, Inc. in the United States
+ and other countries.
+ \o UNIX is a registered trademark of The Open Group in the United States
+ and other countries.
+ \o All other company, product, or service names may be trademarks or
+ service marks of others and are the property of their respective owners.
+ The use of the word partner does not imply a partnership relationship
+ between Nokia and any other company.
+ \endlist
+*/
diff --git a/doc/src/trolltech-webpages.qdoc b/doc/src/trolltech-webpages.qdoc
new file mode 100644
index 0000000..3897fcf
--- /dev/null
+++ b/doc/src/trolltech-webpages.qdoc
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt
+ \title Qt website
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/bugreport-form
+ \title Bug Report Form
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/add-on-products/
+ \title Third-Party Tools
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products
+ \title Qt Solutions
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/documentation/books
+ \title Books about Qt Programming
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/qt3/book
+ \title GUI Programming with Qt 3
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/
+ \title Qt Homepage
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt
+ \title About Qt
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/indepth/vs-integration
+ \title Visual Studio Integration
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Widgets/qtcalendarwidget/
+ \title Calendar Widget
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Widgets/qtwizard/
+ \title QtWizard
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Utilities/qtcorba/
+ \title CORBA Framework
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Widgets/qtwindowlistmenu/
+ \title Window Menu
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/customers/casestories
+ \title Customer Success Stories
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer
+ \title Developer Zone
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/downloads
+ \title Downloads
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/faqs/
+ \title FAQs
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/faqs/licensing
+ \title License FAQ
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/downloads/freesoftware
+ \title Free Software and Contributions
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/licenses/licensing/
+ \title Qt Licensing Overview
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/licenses/pricing/
+ \title Qt License Pricing
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/orderform
+ \title How to Order
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/support-services/support/platform-support-policy
+ \title Platform Support Policy
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/
+ \title Product Overview
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/
+ \title Qt 4 Platforms Overview
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/
+ \title Qt 4 Supported Platforms
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qtopia/
+ \title Qt Extended
+*/
+
+/*!
+ \externalpage http://doc.trolltech.com/qq/
+ \title Qt Quarterly
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/task-tracker
+ \title Task Tracker
+*/
+
+/*!
+ \externalpage http://lists.trolltech.com
+ \title Qt Mailing Lists
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/qt/learnmore/whitepapers
+ \title Whitepapers
+*/
+
+/*!
+ \externalpage http://doc.trolltech.com/qtcanvas
+ \title QtCanvas
+*/
+
+/*!
+ \externalpage http://labs.trolltech.com/page/Projects/Itemview/Modeltest
+ \title ModelTest
+*/
+
+/*!
+ \externalpage http://labs.trolltech.com/page/Projects/Accessibility/QDBusBridge
+ \title D-Bus Accessibility Bridge
+*/
+
+/*!
+ \externalpage http://labs.trolltech.com/blogs/2008/12/05/qtestlib-now-with-nice-graphs-pointing-upwards/
+ \title qtestlib-tools Announcement
+*/
+
+/*!
+ \externalpage http://labs.trolltech.com/gitweb?p=qtestlib-tools;a=summary
+ \title qtestlib-tools
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/downloads/qt/qsa
+ \title Qt Script for Applications (QSA)
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Utilities/qtsharedmemory/
+ \title QtSharedMemory
+*/
+
+/*!
+ \externalpage http://doc.trolltech.com/qq/qq21-portingcanvas.html
+ \title Porting to Qt 4.2's Graphics View
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/products/add-on-products/catalog/4/Windows/qtwinforms/
+ \title QtWinForms Solution
+*/
+
+/*!
+ \externalpage http://www.qtsoftware.com/developer/faqs/qt/installation
+ \title Installation FAQ
+*/
diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc
new file mode 100644
index 0000000..2847f1b
--- /dev/null
+++ b/doc/src/tutorials/addressbook-fr.qdoc
@@ -0,0 +1,1064 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials-addressbook-fr.html
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage {tutorials/addressbook-fr/part1}{Chapitre 1}
+
+ \title Tutoriel "Carnet d'adresses"
+ \ingroup howto
+ \ingroup tutorials
+ \brief Une introduction à la programation d'interface graphique montrant comment construire une application simple avec Qt.
+
+ Ce tutoriel est une introduction à la programmation de GUI (interface utilisateur)
+ à l'aide des outils fournis par la plateforme multiplate-forme Qt.
+
+ \image addressbook-tutorial-screenshot.png
+
+ Ce tutoriel va nous amener à découvrir quelques technologies fondamentales fournies
+ par Qt, tel que:
+
+ \list
+ \o Les Widgets et leur mise en page à l'aide des layouts
+ \o Les signaux et slots
+ \o Les structures de données de collections
+ \o Les entrées/sorties
+ \endlist
+
+ Si c'est votre premier contact avec Qt, lisez \l{How to Learn Qt}{Comment apprendre Qt}
+ si ce n'est déjà fait.
+
+ Le code source du tutoriel est distribué avec Qt dans le dossier \c examples/tutorials/addressbook
+
+ Les chapitres du tutoriel:
+
+ \list 1
+ \o \l{tutorials/addressbook-fr/part1}{Conception de l'interface utilisateur}
+ \o \l{tutorials/addressbook-fr/part2}{Ajouter des adresses}
+ \o \l{tutorials/addressbook-fr/part3}{Navigation entre les éléments}
+ \o \l{tutorials/addressbook-fr/part4}{éditer et supprimer des adresses}
+ \o \l{tutorials/addressbook-fr/part5}{Ajout d'une fonction de recherche}
+ \o \l{tutorials/addressbook-fr/part6}{Sauvegarde et chargement}
+ \o \l{tutorials/addressbook-fr/part7}{Fonctionnalités avancées}
+ \endlist
+
+ La petite application que nous développerons ici ne possède pas tous les éléments
+ des interfaces dernier cri, elle va nous permettre d'utiliser les techniques de base
+ utilisées dans les applications plus complexes.
+
+ Lorsque vous aurez terminé ce tutoriel, nous vous recommandons de poursuivre avec l'exemple
+ "\l{mainwindows/application}{Application}", qui présente une interface simple utilisant
+ les menus et barres d'outils, la barre d'état, etc.
+
+*/
+
+/*!
+ \page tutorials-addressbook-fr-part1.html
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part2}{Chapitre 2}
+ \example tutorials/addressbook-fr/part1
+ \title Carnet d'adresses 1 - Conception de l'interface utilisateur
+
+ La première partie de ce tutoriel traite de la conception d'une interface graphique
+ (GUI) basique, que l'on utilisera pour l'application Carnet d'adresses.
+
+ La première étape dans la création d'applications graphiques est la conception de
+ l'interface utilisateur. Dans ce chapitre, nous verrons comment créer les labels
+ et champs de saisie nécessaires à l'implementation d'un carnet d'adresses de base.
+ Le résultat attendu est illustré par la capture d'écran ci-dessous.
+
+ \image addressbook-tutorial-part1-screenshot.png
+
+ Nous allons avoir besoin de deux objets QLabel, \c nameLabel et \c addressLabel,
+ ainsi que deux champs de saisie: un objet QLineEdit, \c nameLine, et un objet
+ QTextEdit, \c addressText, afin de permettre à l'utilisateur d'entrer le nom d'un
+ contact et son adresse. Les widgets utilisés ainsi que leur placement sont visibles ci-dessous.
+
+ \image addressbook-tutorial-part1-labeled-screenshot.png
+
+ Trois fichiers sont nécessaires à l'implémentation de ce carnet d'adresses:
+
+ \list
+ \o \c{addressbook.h} - le fichier de définition (header) pour la classe \c AddressBook,
+ \o \c{addressbook.cpp} - le fichier source, qui comprend l'implémentation de la classe
+ \c AddressBook
+ \o \c{main.cpp} - le fichier qui contient la méthode \c main() , et
+ une instance de la classe \c AddressBook.
+ \endlist
+
+ \section1 Programmation en Qt - héritage
+
+
+ Lorsque l'on écrit des programmes avec Qt, on a généralement recours à
+ l'héritage depuis des objets Qt, afin d'y ajouter des fonctionnalités.
+ C'est l'un des concepts fondamentaux de la création de widgets personnalisés
+ ou de collections de widgets. Utiliser l'héritage afin de compléter
+ ou modifier le comportement d'un widget présente les avantages suivants:
+
+ \list
+ \o La possibilité d'implémenter des méthodes virtuelles et des méthodes
+ virtuelles pures pour obtenir exactement ce que l'on souhaite, avec la possibilité
+ d'utiliser l'implémentation de la classe mère si besoin est.
+ \o Cela permet l'encapsulation partielle de l'interface utilisateur dans une classe,
+ afin que les autres parties de l'application n'aient pas à se soucier de chacun des
+ widgets qui forment l'interface utilisateur.
+ \o La classe fille peut être utilisée pour créer de nombreux widgets personnalisés
+ dans une même application ou bibliothèque, et le code de la classe fille peut être
+ réutilisé dans d'autres projets
+ \endlist
+
+ Comme Qt ne fournit pas de widget standard pour un carnet d'adresses, nous
+ partirons d'une classe de widget Qt standard et y ajouterons des fonctionnalités.
+ La classe \c AddressBook crée dans ce tutoriel peut être réutilisée si on a besoin d'un
+ widget carnet d'adresses basique.
+
+
+ \section1 La classe AddressBook
+
+ Le fichier \l{tutorials/addressbook-fr/part1/addressbook.h}{\c addressbook.h} permet de
+ définir la classe \c AddressBook.
+
+ On commence par définir \c AddressBook comme une classe fille de QWidget et déclarer
+ un constructeur. On utilise également la macro Q_OBJECT pour indiquer que la classe
+ exploite les fonctionnalités de signaux et slots offertes par Qt ainsi que
+ l'internationalisation, bien que nous ne les utilisions pas à ce stade.
+
+ \snippet tutorials/addressbook-fr/part1/addressbook.h class definition
+
+ La classe contient les déclarations de \c nameLine et \c addressText,
+ les instances privées de QLineEdit et QTextEdit mentionnées précédemment.
+ Vous verrez, dans les chapitres à venir que les informations contenues
+ dans \c nameLine et \c addressText sont nécessaires à de nombreuses méthodes
+ du carnet d'adresses.
+
+ Il n'est pas nécessaire de déclarer les objets QLabel que nous allons utiliser
+ puisque nous n'aurons pas besoin d'y faire référence après leur création.
+ La façon dont Qt gère la parenté des objets est traitée dans la section suivante.
+
+ La macro Q_OBJECT implémente des fonctionnalités parmi les plus avancées de Qt.
+ Pour le moment, il est bon de voir la macro Q_OBJECT comme un raccourci nous
+ permettant d'utiliser les méthodes \l{QObject::}{tr()} et \l{QObject::}{connect()}.
+
+ Nous en avons maintenant terminé avec le fichier \c addressbook.h et allons
+ passer à l'implémentation du fichier \c addressbook.cpp.
+
+ \section1 Implémentation de la classe AddressBook
+
+ Le constructeur de la classe \c{AddressBook} prend en paramètre un QWidget, \e parent.
+ Par convention, on passe ce paramètre au constructeur de la classe mère.
+ Ce concept de parenté, où un parent peut avoir un ou plusieurs enfants, est utile
+ pour regrouper les Widgets avec Qt. Par exemple, si vous détruisez le parent,
+ tous ses enfants seront détruits égalament.
+
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
+
+ à l'intérieur de ce constructeur, on déclare et instancie deux objets locaux
+ QLabel, \c nameLabel et \c addressLabel, de même on instancie \c nameLine et
+ \c addressText. La méthode \l{QObject::tr()}{tr()} renvoie une version traduite
+ de la chaîne de caractères, si elle existe; dans le cas contraire, elle renvoie
+ la chaîne elle même. On peut voir cette méthode comme un marqueur \tt{<insérer
+ la traduction ici>}, permettant de repérer les objets QString à considérer
+ pour traduire une application. Vous remarquerez, dans les chapitres à venir
+ comme dans les \l{Qt Examples}{exemples Qt}, qu'elle est utilisée chaque fois
+ que l'on utilise une chaîne susceptible d'être traduite.
+
+ Lorsque l'on programme avec Qt, il est utile de savoir comment fonctionnent les
+ agencements ou layouts. Qt fournit trois classes principales de layouts pour
+ contrôler le placement des widgets: QHBoxLayout, QVBoxLayout et QGridLayout.
+
+ \image addressbook-tutorial-part1-labeled-layout.png
+
+ On utilise un QGridLayout pour positionner nos labels et champs de saisie de manière
+ structurée. QGridLayout divise l'espace disponible en une grille, et place les
+ widgets dans les cellules que l'on spécifie par les numéros de ligne et de colonne.
+ Le diagramme ci-dessus présente les cellules et la position des widgets, et cette
+ organisation est obtenue à l'aide du code suivant:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp layout
+
+ On remarque que le label \c AddressLabel est positionné en utilisant Qt::AlignTop
+ comme argument optionnel. Ceci est destiné à assurer qu'il ne sera pas centré
+ verticalement dans la cellule (1,0). Pour un aperçu rapide des layouts de Qt,
+ consultez la section \l{Layout Classes}.
+
+ Afin d'installer l'objet layout dans un widget, il faut appeler la méthode
+ \l{QWidget::setLayout()}{setLayout()} du widget en question:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp setting the layout
+
+ Enfin, on initialise le titre du widget à "Simple Address Book"
+
+ \section1 Exécution de l'application
+
+ Un fichier séparé, \c main.cpp, est utilisé pour la méthode \c main(). Dans cette
+ fonction, on crée une instance de QApplication, \c app. QApplication se charge de
+ des ressources communes à l'ensemble de l'application, tel que les polices de
+ caractères et le curseur par défaut, ainsi que de l'exécution de la boucle d'évènements.
+ De ce fait, il y a toujours un objet QApplication dans toute application graphique en Qt.
+
+ \snippet tutorials/addressbook/part1/main.cpp main function
+
+ On construit un nouveau widget \c AddressBook sur le tas en utilisant le mot-clé
+ \c new et en invoquant sa méthode \l{QWidget::show()}{show()} pour l'afficher.
+ Cependant, le widget ne sera pas visible tant que la boucle d'évènements
+ n'aura pas été lancée. On démarre la boucle d'évènements en appelant la
+ méthode \l{QApplication::}{exec()} de l'application; le résultat renvoyé
+ par cette méthode est lui même utilisé comme valeur de retour pour la méthode
+ \c main().
+*/
+
+/*!
+ \page tutorials-addressbook-fr-part2.html
+ \previouspage {tutorials/addressbook-fr/part1}{Chapitre 1}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part3}{Chapitre 3}
+ \example tutorials/addressbook-fr/part2
+ \title Carnet d'adresses 2 - Ajouter des adresses
+
+ La prochaine étape pour créer notre carnet d'adresses est d'ajouter un soupçon
+ d'interactivité.
+
+ \image addressbook-tutorial-part2-add-contact.png
+
+ Nous allons fournir un bouton que l'utilisateur peut
+ cliquer pour ajouter un nouveau contact. Une structure de données est aussi
+ nécessaire afin de pouvoir stocker les contacts en mémoire.
+
+ \section1 Définition de la classe AddressBook
+
+ Maintenant que nous avons mis en place les labels et les champs de saisie,
+ nous ajoutons les boutons pour compléter le processus d'ajout d'un contact.
+ Cela veut dire que notre fichier \c addressbook.h a maintenant trois
+ objets QPushButton et trois slots publics correspondant.
+
+ \snippet tutorials/addressbook/part2/addressbook.h slots
+
+ Un slot est une méthode qui répond à un signal. Nous allons
+ voir ce concept en détail lorsque nous implémenterons la classe \c{AddressBook}.
+ Pour une explication détaillée du concept de signal et slot, vous pouvez
+ vous référer au document \l{Signals and Slots}.
+
+ Les trois objets QPushButton \c addButton, \c submitButton et \c cancelButton
+ sont maintenant inclus dans la déclaration des variables privées, avec
+ \c nameLine et \c addressText du chapitre précédent.
+
+ \snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
+
+ Nous avons besoin d'un conteneur pour stocker les contacts du carnet
+ d'adresses, de façon à pouvoir les énumérer et les afficher.
+ Un objet QMap, \c contacts, est utilisé pour ça, car il permet de stocker
+ des paires clé-valeur: le nom du contact est la \e{clé} et l'adresse du contact
+ est la \e{valeur}.
+
+ \snippet tutorials/addressbook/part2/addressbook.h remaining private variables
+
+ Nous déclarons aussi deux objects QString privés: \c oldName et \c oldAddress.
+ Ces objets sont nécessaires pour conserver le nom et l'adresse du dernier contact
+ affiché avant que l'utilisateur ne clique sur le bouton "Add". Grâce à ces variables
+ si l'utilisateur clique sur "Cancel", il est possible de revenir
+ à l'affichage du dernier contact.
+
+ \section1 Implémentation de la classe AddressBook
+
+ Dans le constructeur de \c AddressBook, \c nameLine et
+ \c addressText sont mis en mode lecture seule, de façon à autoriser l'affichage
+ mais pas la modification du contact courant.
+
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 1
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 2
+
+ Ensuite, nous instancions les boutons \c addButton, \c submitButton, et
+ \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration
+
+ Le bouton \c addButton est affiché en invoquant la méthode \l{QPushButton::show()}
+ {show()}, tandis que \c submitButton et \c cancelButton sont cachés en invoquant
+ \l{QPushButton::hide()}{hide()}. Ces deux boutons ne seront affichés que lorsque
+ l'utilisateur cliquera sur "Add", et ceci est géré par la méthode \c addContact()
+ décrite plus loin.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
+
+ Nous connectons le signal \l{QPushButton::clicked()}{clicked()} de chaque bouton
+ au slot qui gèrera l'action.
+ L'image ci-dessous illustre ceci:
+
+ \image addressbook-tutorial-part2-signals-and-slots.png
+
+ Ensuite, nous arrangeons proprement les boutons sur la droite du widget
+ AddressBook, et nous utilisons un QVBoxLayout pour les aligner verticalement.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp vertical layout
+
+ La methode \l{QBoxLayout::addStretch()}{addStretch()} est utilisée pour
+ assurer que les boutons ne sont pas répartis uniformément, mais regroupés
+ dans la partie supperieure du widget. La figure ci-dessous montre la différence
+ si \l{QBoxLayout::addStretch()}{addStretch()} est utilisé ou pas.
+
+ \image addressbook-tutorial-part2-stretch-effects.png
+
+ Ensuite nous ajoutons \c buttonLayout1 à \c mainLayout, en utilisant
+ \l{QGridLayout::addLayout()}{addLayout()}. Ceci nous permet d'imbriquer les
+ mises en page puisque \c buttonLayout1 est maintenant un enfant de \c mainLayout.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp grid layout
+
+ Les coordonnées du layout global ressemblent maintenant à ça:
+
+ \image addressbook-tutorial-part2-labeled-layout.png
+
+ Dans la méthode \c addContact(), nous stockons les détails du dernier
+ contact affiché dans \c oldName et \c oldAddress. Ensuite, nous
+ vidons ces champs de saisie et nous désactivons le mode
+ lecture seule. Le focus est placé sur \c nameLine et on affiche
+ \c submitButton et \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp addContact
+
+ La méthode \c submitContact() peut être divisée en trois parties:
+
+ \list 1
+ \o Nous extrayons les détails du contact depuis \c nameLine et \c addressText
+ et les stockons dans des objets QString. Nous les validons pour s'assurer
+ que l'utilisateur n'a pas cliqué sur "Add" avec des champs de saisie
+ vides; sinon un message est affiché avec QMessageBox pour rappeller à
+ l'utilisateur que les deux champs doivent être complétés.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
+
+ \o Ensuite, nous vérifions si le contact existe déjà. Si aucun contacts
+ existant n'entre en conflit avec le nouveau, nous l'ajoutons à
+ \c contacts et nous affichons un QMessageBox pour informer l'utilisateur
+ que le contact a été ajouté.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2
+
+ Si le contact existe déjà, nous affichons un QMessageBox pour informer
+ l'utilisateur du problème.
+ Notre objet \c contacts est basé sur des paires clé-valeur formés par
+ le nom et l'adresse, nous voulons nous assurer que la \e clé est unique.
+
+ \o Une fois que les deux vérifications précédentes ont été traitées,
+ nous restaurons les boutons à leur état normal à l'aide du code
+ suivant:
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3
+
+ \endlist
+
+ La capture d'écran ci-dessous montre l'affichage fournit par un objet
+ QMessageBox, utilisé ici pour afficher un message d'information
+ à l'utilisateur:
+
+ \image addressbook-tutorial-part2-add-successful.png
+
+ La méthode \c cancel() restaure les détails du dernier contact, active
+ \c addButton, et cache \c submitButton et \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp cancel
+
+ L'idée générale pour augmenter la flexibilité lors de l'ajout d'un
+ contact est de donner la possiblité de cliquer sur "Add"
+ ou "Cancel" à n'importe quel moment.
+ L'organigramme ci-dessous reprend l'ensemble des interactions dévelopées
+ jusqu'ici:
+
+ \image addressbook-tutorial-part2-add-flowchart.png
+*/
+
+/*!
+ \page tutorials-addressbook-fr-part3.html
+ \previouspage {tutorials/addressbook-fr/part2}{Chapitre 2}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part4}{Chapitre 4}
+ \example tutorials/addressbook-fr/part3
+ \title Carnet d'adresses 3 - Navigation entre les éléments
+
+ L'application "Carnet d'adresses" est maintenant à moitié terminée. Il
+ nous faut maintenant ajouter quelques fonctions pour naviguer entre
+ les contacts. Avant de commencer, il faut se décider sur le type de structure de
+ données le plus approprié pour stocker les contacts.
+
+ Dans le chapitre 2, nous avons utilisé un QMap utilisant des paires clé-valeur,
+ avec le nom du contact comme \e clé, et l'adresse du contact comme \e valeur.
+ Cela fonctionnait bien jusqu'ici, mais pour ajouter la navigation entre les
+ entrées, quelques améliorations sont nécessaires.
+
+ Nous améliorerons le QMap en le faisant ressembler à une structure de données
+ similaire à une liste liée, où tous les éléments sont connectés, y compris
+ le premier et le dernier élément. La figure ci-dessous illustre cette structure
+ de donnée.
+
+ \image addressbook-tutorial-part3-linkedlist.png
+
+ \section1 Définition de la classe AddressBook
+
+ Pour ajouter les fonctions de navigation au carnet d'adresses, nous avons
+ besoin de deux slots supplémentaires dans notre classe \c AddressBook:
+ \c next() et \c previous(). Ceux-ci sont ajoutés au fichier addressbook.h:
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation functions
+
+ Nous avons aussi besoin de deux nouveaux objets QPushButton, nous ajoutons
+ donc les variables privées \c nextButton et \c previousButton.
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons
+
+ \section1 Implémentation de la classe AddressBook
+
+ A l'intérieur du constructeur de \c AddressBook, dans \c addressbook.cpp, nous
+ instancions \c nextButton et \c previousButton et nous les désactivons
+ par défaut. Nous faisons ceci car la navigation ne doit être activée
+ que lorsqu'il y a plus d'un contact dans le carnet d'adresses.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons
+
+ Nous connectons alors ces boutons à leur slots respectifs:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
+
+ L'image ci-dessous montre l'interface utilisateur que nous allons créer.
+ Remarquez que cela ressemble de plus en plus à l'interface du programme
+ complet.
+
+ \image addressbook-tutorial-part3-screenshot.png
+
+ Nous suivons les conventions pour les fonctions \c next() et \c previous()
+ en plaçant \c nextButton à droite et \c previousButton à gauche. Pour
+ faire cette mise en page intuitive, nous utilisons un QHBoxLayout pour
+ placer les widgets côte à côte:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation layout
+
+ L'objet QHBoxLayout, \c buttonLayout2, est ensuite ajouté à \c mainLayout.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout
+
+ La figure ci-dessous montre les systèmes de coordonnées pour les widgets du
+ \c mainLayout.
+ \image addressbook-tutorial-part3-labeled-layout.png
+
+ Dans notre méthode \c addContact(), nous avons desactivé ces boutons
+ pour être sûr que l'utilisateur n'utilise pas la navigation lors de
+ l'ajout d'un contact.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation
+
+ Dans notre méthode \c submitContact(), nous activons les boutons de
+ navigation, \c nextButton et \c previousButton, en fonction de la
+ taille de \c contacts. Commen mentionné plus tôt, la navigation n'est
+ activée que si il y a plus d'un contact dans le carnet d'adresses.
+ Les lignes suivantes montrent comment faire cela:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation
+
+ Nous incluons aussi ces lignes de code dans le bouton \c cancel().
+
+ Souvenez vous que nous voulons émuler une liste-liée ciruculaire à
+ l'aide de l'objet QMap, \c contacts. Pour faire cela, nous obtenons un itérateur
+ sur \c contact dans la méthode \c next(), et ensuite:
+
+ \list
+ \o Si l'itérateur n'est pas à la fin de \c contacts, nous l'incrémentons
+ \o Si l'itérateur est à la fin de \c contacts, nous changeons sa position
+ jusqu'au début de \c contacts. Cela donne l'illusion que notre QMap
+ fonctionne comme une liste circulaire.
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp next() function
+
+ Une fois que nous avons itéré jusqu'à l'objet recherché dans \c contacts,
+ nous affichons son contenu sur \c nameLine et \c addressText.
+
+ De la même façon, pour la méthode \c previous(), nous obtenons un
+ itérateur sur \c contacts et ensuite:
+
+ \list
+ \o Si l'itérateur est à la fin de \c contacts, on réinitialise
+ l'affichage et on retourne.
+ \o Si l'itérateur est au début de \c contacts, on change sa
+ position jusqu'à la fin
+ \o Ensuite, on décrémente l'itérateur
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp previous() function
+
+ à nouveau, nous affichons le contenu de l'objet courant dans \c contacts.
+
+*/
+
+/*!
+
+ \page tutorials-addressbook-fr-part4.html
+ \previouspage {tutorials/addressbook-fr/part3}{Chapitre 3}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part5}{Chapitre 5}
+ \example tutorials/addressbook-fr/part4
+ \title Carnet d'Adresses 4 - éditer et supprimer des adresses
+
+
+ Dans ce chapitre, nous verrons comment modifier les données des contacts
+ contenus dans l'application carnet d'adresses.
+
+
+ \image addressbook-tutorial-screenshot.png
+
+ Nous avons maintenant un carnet d'adresses qui ne se contente pas de
+ lister des contacts de façon ordonnée, mais permet également la
+ navigation. Il serait pratique d'inclure des fonctions telles qu'éditer et
+ supprimer, afin que les détails associés à un contact puissent être
+ modifiés lorsque c'est nécessaire. Cependant, cela requiert une légère
+ modification, sous la forme d'énumérations. Au chapitre précédent, nous avions deux
+ modes: \c {AddingMode} et \c {NavigationMode}, mais ils n'étaient pas
+ définis en tant qu'énumérations. Au lieu de ça, on activait et désactivait les
+ boutons correspondants manuellement, au prix de multiples redondances dans
+ le code.
+
+ Dans ce chapitre, on définit l'énumération \c Mode avec trois valeurs possibles.
+
+ \list
+ \o \c{NavigationMode},
+ \o \c{AddingMode}, et
+ \o \c{EditingMode}.
+ \endlist
+
+ \section1 Définition de la classe AddressBook
+
+ Le fichier \c addressbook.h est mis a jour pour contenir l'énumération \c Mode :
+
+ \snippet tutorials/addressbook/part4/addressbook.h Mode enum
+
+ On ajoute également deux nouveaux slots, \c editContact() et
+ \c removeContact(), à notre liste de slots publics.
+
+ \snippet tutorials/addressbook/part4/addressbook.h edit and remove slots
+
+ Afin de basculer d'un mode à l'autre, on introduit la méthode
+ \c updateInterface() pour contrôller l'activation et la désactivation de
+ tous les objets QPushButton. On ajoute également deux nouveaux boutons,
+ \c editButton et \c removeButton, pour les fonctions d'édition
+ et de suppression mentionnées plus haut.
+
+ \snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h buttons declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h mode declaration
+
+ Enfin, on déclare \c currentMode pour garder une trace du mode
+ actuellement utilisé.
+
+ \section1 Implémentation de la classe AddressBook
+
+ Il nous faut maintenant implémenter les fonctionnalités de changement de
+ mode de l'application carnet d'adresses. Les boutons \c editButton et
+ \c removeButton sont instanciés et désactivés par défaut, puisque le
+ carnet d'adresses démarre sans aucun contact en mémoire.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
+
+ Ces boutons sont ensuite connectés à leurs slots respectifs,
+ \c editContact() et \c removeContact(), avant d'être ajoutés à
+ \c buttonLayout1.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout
+
+ La methode \c editContact() place les anciens détails du contact dans
+ \c oldName et \c oldAddress, avant de basculer vers le mode
+ \c EditingMode. Dans ce mode, les boutons \c submitButton et
+ \c cancelButton sont tous deux activés, l'utilisateur peut par conséquent
+ modifier les détails du contact et cliquer sur l'un de ces deux boutons
+ par la suite.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp editContact() function
+
+ La méthode \c submitContact() a été divisée en deux avec un bloc
+ \c{if-else}. On teste \c currentMode pour voir si le mode courant est
+ \c AddingMode. Si c'est le cas, on procède à l'ajout.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1
+
+ Sinon, on s'assure que \c currentMode est en \c EditingMode. Si c'est le
+ cas, on compare \c oldName et \c name. Si le nom a changé, on supprime
+ l'ancien contact de \c contacts et on insère le contact mis a jour.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2
+
+ Si seule l'adresse a changé (i.e. \c oldAddress n'est pas identique à
+ \c address), on met à jour l'adresse du contact. Enfin on règle
+ \c currentMode à \c NavigationMode. C'est une étape importante puisque
+ c'est cela qui réactive tous les boutons désactivés.
+
+ Afin de retirer un contact du carnet d'adresses, on implémente la méthode
+ \c removeContact(). Cette méthode vérifie que le contact est présent dans
+ \c contacts.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function
+
+ Si c'est le cas, on affiche une boîte de dialogue QMessageBox, demandant
+ confirmation de la suppression à l'utilisateur. Une fois la confirmation
+ effectuée, on appelle \c previous(), afin de s'assurer que l'interface
+ utilisateur affiche une autre entrée, et on supprime le contact en
+ utilisant le méthode \l{QMap::remove()}{remove()} de \l{QMap}. Dans un
+ souci pratique, on informe l'utilisateur de la suppression par le biais
+ d'une autre QMessageBox. Les deux boîtes de dialogue utilisées dans cette
+ méthode sont représentées ci-dessous.
+
+ \image addressbook-tutorial-part4-remove.png
+
+ \section2 Mise à jour de l'Interface utilisateur
+
+ On a évoqué plus haut la méthode \c updateInterface() comme moyen
+ d'activer et de désactiver les différents boutons de l'interface en
+ fonction du mode. Cette méthode met à jour le mode courant selon
+ l'argument \c mode qui lui est passé, en l'assignant à \c currentMode,
+ avant de tester sa valeur.
+
+ Chacun des boutons est ensuite activé ou désactivé, en fonction du mode.
+ Le code source pour les cas \c AddingMode et \c EditingMode est visible
+ ci-dessous:
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
+
+ Dans le cas de \c NavigationMode, en revanche, des tests conditionnels
+ sont passés en paramètre de QPushButton::setEnabled(). Ceci permet de
+ s'assurer que les boutons \c editButton et \c removeButton ne sont activés
+ que s'il existe au moins un contact dans le carnet d'adresses;
+ \c nextButton et \c previousButton ne sont activés que lorsqu'il existe
+ plus d'un contact dans le carnet d'adresses.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
+
+ En effectuant les opérations de réglage du mode et de mise à jour de
+ l'interface utilisateur au sein de la même méthode, on est à l'abri de
+ l'éventualité où l'interface utilisateur se "désynchronise" de l'état
+ interne de l'application.
+
+*/
+
+/*!
+ \page tutorials-addressbook-fr-part5.html
+ \previouspage {tutorials/addressbook-fr/part4}{Chapitre 4}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part6}{Chapitre 6}
+ \example tutorials/addressbook-fr/part5
+ \title Carnet d'adresse 5 - Ajout d'une fonction de recherche
+
+ Dans ce chapitre, nous allons voir les possibilités pour rechercher
+ des contacts dans le carnet d'adresse.
+
+ \image addressbook-tutorial-part5-screenshot.png
+
+ Plus nous ajoutons des contacts dans l'application, plus
+ il devient difficile de naviguer avec les boutons \e Next et \e Previous.
+ Dans ce cas, une fonction de recherche serait plus efficace pour rechercher
+ les contacts.
+ La capture d'écran ci-dessus montre le bouton de recherche \e Find et sa position
+ dans le paneau de bouton.
+
+ Lorsque l'utilisateur clique sur le bouton \e Find, il est courant d'afficher
+ une boîte de dialogue qui demande à l'utilisateur d'entrer un nom de contact.
+ Qt fournit la classe QDialog, que nous sous-classons dans ce chapitre pour
+ implémenter la class \c FindDialog.
+
+ \section1 Définition de la classe FindDialog
+
+ \image addressbook-tutorial-part5-finddialog.png
+
+ Pour sous-classer QDialog, nous commençons par inclure le header de
+ QDialog dans le fichier \c finddialog.h. De plus, nous déclarons les
+ classes QLineEdit et QPushButton car nous utilisons ces widgets dans
+ notre classe dialogue.
+
+ Tout comme dans la classe \c AddressBook, la classe \c FindDialog utilise
+ la macro Q_OBJECT et son constructeur est défini de façon à accepter
+ un QWidget parent, même si cette boîte de dialogue sera affichée dans une
+ fenêtre séparée.
+
+ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header
+
+ Nous définissons la méthode publique \c getFindText() pour être utilisée
+ par les classes qui instancient \c FindDialog, ce qui leur permet d'obtenir
+ le texte entré par l'utilisateur. Un slot public, \c findClicked(), est
+ défini pour prendre en charge le texte lorsque l'utilisateur clique sur
+ le bouton \gui Find.
+
+ Finalement, nous définissons les variables privées \c findButton,
+ \c lineEdit et \c findText, qui correspondent respectivement au bouton
+ \gui Find, au champ de texte dans lequel l'utilisateur tape le texte
+ à rechercher, et à une variable interne stockant le texte pour une
+ utilisation ultérieure.
+
+ \section1 Implémentation de la classe FindDialog
+
+ Dans le constructeur de \c FindDialog, nous instancions les objets des
+ variables privées \c lineEdit, \c findButton et \c findText. Nous utilisons ensuite
+ un QHBoxLayout pour positionner les widgets.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp constructor
+
+ Nous mettons en place la mise en page et le titre de la fenêtre, et
+ nous connectons les signaux aux slots. Remarquez que le signal
+ \l{QPushButton::clicked()}{clicked()} de \c{findButton} est connecté
+ à \c findClicked() et \l{QDialog::accept()}{accept()}. Le slot
+ \l{QDialog::accept()}{accept()} fourni par le QDialog ferme
+ la boîte de dialogue et lui donne le code de retour \l{QDialog::}{Accepted}.
+ Nous utilisons cette fonction pour aider la méthode \c findContact() de la classe
+ \c{AddressBook} à savoir si l'objet \c FindDialog a été fermé. Ceci sera
+ expliqué plus loin lorsque nous verrons la méthode \c findContact().
+
+ \image addressbook-tutorial-part5-signals-and-slots.png
+
+ Dans \c findClicked(), nous validons le champ de texte pour nous
+ assurer que l'utilisateur n'a pas cliqué sur le bouton \gui Find sans
+ avoir entré un nom de contact. Ensuite, nous stockons le texte du champ
+ d'entrée \c lineEdit dans \c findText. Et finalement nous vidons le
+ contenu de \c lineEdit et cachons la boîte de dialogue.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function
+
+ La variable \c findText a un accesseur publique associé: \c getFindText().
+ Étant donné que nous ne modifions \c findText directement que dans le
+ constructeur et la méthode \c findClicked(), nous ne créons pas
+ de manipulateurs associé à \c getFindText().
+ Puisque \c getFindText() est publique, les classes instanciant et
+ utilisant \c FindDialog peuvent toujours accéder à la chaîne de
+ caractères que l'utilisateur a entré et accepté.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function
+
+ \section1 Définition de la classe AddressBook
+
+ Pour utiliser \c FindDialog depuis la classe \c AddressBook, nous
+ incluons \c finddialog.h dans le fichier \c addressbook.h.
+
+ \snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
+
+ Jusqu'ici, toutes les fonctionnalités du carnet d'adresses ont un
+ QPushButton et un slot correspondant. De la même façon, pour la
+ fonctionnalité \gui Find, nous avons \c findButton et \c findContact().
+
+ Le \c findButton est déclaré comme une variable privée et la
+ méthode \c findContact() est déclarée comme un slot public.
+
+ \snippet tutorials/addressbook/part5/addressbook.h findContact() declaration
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.h findButton declaration
+
+ Finalement, nous déclarons la variable privée \c dialog que nous allons
+ utiliser pour accéder à une instance de \c FindDialog.
+
+ \snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration
+
+ Une fois que nous avons instancié la boîte de dialogue, nous voulons l'utiliser
+ plus qu'une fois. Utiliser une variable privée nous permet d'y référer
+ à plus d'un endroit dans la classe.
+
+ \section1 Implémentation de la classe AddressBook
+
+ Dans le constructeur de \c AddressBook, nous instancions nos objets privés,
+ \c findbutton et \c findDialog:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog
+
+ Ensuite, nous connectons le signal \l{QPushButton::clicked()}{clicked()} de
+ \c{findButton} à \c findContact().
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find
+
+ Maintenant, tout ce qui manque est le code de notre méthode \c findContact():
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp findContact() function
+
+ Nous commençons par afficher l'instance de \c FindDialog, \c dialog.
+ L'utilisateur peut alors entrer le nom du contact à rechercher. Lorsque
+ l'utilisateur clique sur le bouton \c findButton, la boîte de dialogue est
+ masquée et le code de retour devient QDialog::Accepted. Ce code de retour
+ vient remplir la condition du premier if.
+
+ Ensuite, nous extrayons le texte que nous utiliserons pour la recherche,
+ il s'agit ici de \c contactName obtenu à l'aide de la méthode \c getFindText()
+ de \c FindDialog. Si le contact existe dans le carnet d'adresse, nous
+ l'affichons directement. Sinon, nous affichons le QMessageBox suivant pour
+ indiquer que la recherche à échouée.
+
+ \image addressbook-tutorial-part5-notfound.png
+*/
+
+/*!
+ \page tutorials-addressbook-part6.html
+ \previouspage {tutorials/addressbook-fr/part5}{Chapitre 5}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \nextpage {tutorials/addressbook-fr/part7}{Chapitre 7}
+ \example tutorials/addressbook-fr/part6
+ \title Carnet d'Adresses 6 - Sauvegarde et chargement
+
+ Ce chapitre couvre les fonctionnalités de gestion des fichiers de Qt que
+ l'on utilise pour écrire les procédures de sauvegarde et chargement pour
+ l'application carnet d'adresses.
+
+ \image addressbook-tutorial-part6-screenshot.png
+
+ Bien que la navigation et la recherche de contacts soient des
+ fonctionnalités importantes, notre carnet d'adresses ne sera pleinement
+ utilisable qu'une fois que l'on pourra sauvegarder les contacts existants
+ et les charger à nouveau par la suite.
+ Qt fournit de nombreuses classes pour gérer les \l{Input/Output and
+ Networking}{entrées et sorties}, mais nous avons choisi de nous contenter d'une
+ combinaison de deux classes simples à utiliser ensemble: QFile et QDataStream.
+
+ Un objet QFile représente un fichier sur le disque qui peut être lu, et
+ dans lequel on peut écrire. QFile est une classe fille de la classe plus
+ générique QIODevice, qui peut représenter différents types de
+ périphériques.
+
+ Un objet QDataStream est utilisé pour sérialiser des données binaires
+ dans le but de les passer à un QIODevice pour les récupérer dans le
+ futur. Pour lire ou écrire dans un QIODevice, il suffit d'ouvrir le
+ flux, avec le périphérique approprié en paramètre, et d'y lire ou
+ écrire.
+
+ \section1 Définition de la classe AddressBook
+
+ On déclare deux slots publics, \c saveToFile() et \c loadFromFile(),
+ ainsi que deux objets QPushButton, \c loadButton et \c saveButton.
+
+ \snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration
+
+ \section1 Implémentation de la classe AddressBook
+
+ Dans notre constructeur, on instancie \c loadButton et \c saveButton.
+ Idéalement, l'interface serait plus conviviale avec des boutons
+ affichant "Load contacts from a file" et "Save contacts to a file". Mais
+ compte tenu de la dimension des autres boutons, on initialise les labels
+ des boutons à \gui{Load...} et \gui{Save...}. Heureusement, Qt offre une
+ façon simple d'ajouter des info-bulles avec
+ \l{QWidget::setToolTip()}{setToolTip()}, et nous l'exploitons de la façon
+ suivante pour nos boutons:
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
+
+ Bien qu'on ne cite pas le code correspondant ici, nous ajoutons ces deux boutons au
+ layout de droite, \c button1Layout, comme pour les fonctionnalités précédentes, et
+ nous connectons leurs signaux
+ \l{QPushButton::clicked()}{clicked()} à leurs slots respectifs.
+
+ Pour la sauvegarde, on commence par récupérer le nom de fichier
+ \c fileName, en utilisant QFileDialog::getSaveFileName(). C'est une
+ méthode pratique fournie par QFileDialog, qui ouvre une boîte de
+ dialogue modale et permet à l'utilisateur d'entrer un nom de fichier ou
+ de choisir un fichier \c{.abk} existant. Les fichiers \c{.abk}
+ correspondent à l'extension choisie pour la sauvegarde des contacts de
+ notre carnet d'adresses.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1
+
+ La boîte de dialogue affichée est visible sur la capture d'écran ci-
+ dessous.
+
+ \image addressbook-tutorial-part6-save.png
+
+ Si \c fileName n'est pas vide, on crée un objet QFile, \c file, à partir
+ de \c fileName. QFile fonctionne avec QDataStream puisqu'il dérive de
+ QIODevice.
+
+ Ensuite, on essaie d'ouvrir le fichier en écriture, ce qui correspond au
+ mode \l{QIODevice::}{WriteOnly}. Si cela échoue, on en informe
+ l'utilisateur avec une QMessageBox.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
+
+ Dans le cas contraire, on instancie un objet QDataStream, \c out, afin
+ d'écrire dans le fichier ouvert. QDataStream nécessite que la même
+ version de flux soit utilisée pour la lecture et l'écriture. On s'assure
+ que c'est le cas en spécifiant explicitement d'utiliser la
+ \l{QDataStream::Qt_4_5}{version introduite avec Qt 4.5} avant de
+ sérialiser les données vers le fichier \c file.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3
+
+ Pour le chargement, on récupère également \c fileName en utilisant
+ QFileDialog::getOpenFileName(). Cette méthode est l'homologue de
+ QFileDialog::getSaveFileName() et affiche également une boîte de
+ dialogue modale permettant à l'utilisateur d'entrer un nom de fichier ou
+ de selectionner un fichier \c{.abk} existant, afin de le charger dans le
+ carnet d'adresses.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1
+
+ Sous Windows, par exemple, cette méthode affiche une boîte de dialogue
+ native pour la sélection de fichier, comme illustré sur la capture
+ d'écran suivante:
+
+ \image addressbook-tutorial-part6-load.png
+
+ Si \c fileName n'est pas vide, on utilise une fois de plus un objet
+ QFile, \c file, et on tente de l'ouvrir en lecture, avec le mode
+ \l{QIODevice::}{ReadOnly}. De même que précédemment dans notre
+ implémentation de \c saveToFile(), si cette tentative s'avère
+ infructueuse, on en informe l'utilisateur par le biais d'une
+ QMessageBox.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2
+
+ Dans le cas contraire, on instancie un objet QDataStream, \c in, en
+ spécifiant la version à utiliser comme précédemment, et on lit les
+ informations sérialisées vers la structure de données \c contacts. Notez
+ qu'on purge \c contacts avant d'y mettre les informations lues afin de
+ simplifier le processus de lecture de fichier. Une façon plus avancée de
+ procéder serait de lire les contacts dans un objet QMap temporaire, et
+ de copier uniquement les contacts n'existant pas encore dans
+ \c contacts.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3
+
+ Pour afficher les contacts lus depuis le fichier, on doit d'abord
+ valider les données obtenues afin de s'assurer que le fichier lu
+ contient effectivement des entrées de carnet d'adresses. Si c'est le
+ cas, on affiche le premier contact; sinon on informe l'utilisateur du
+ problème par une QMessageBox. Enfin, on met à jour l'interface afin
+ d'activer et de désactiver les boutons de façon appropriée.
+*/
+
+/*!
+ \page tutorials-addressbook-fr-part7.html
+ \previouspage {tutorials/addressbook-fr/part6}{Chapitre 6}
+ \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+ \example tutorials/addressbook-fr/part7
+ \title Carnet d'adresse 7 - Fonctionnalités avancées
+
+ Ce chapitre couvre quelques fonctionnalités additionnelles qui
+ feront de notre carnet d'adresses une application plus pratique
+ pour une utilisation quotidienne.
+
+ \image addressbook-tutorial-part7-screenshot.png
+
+ Bien que notre application carnet d'adresses soit utile en tant que telle,
+ il serait pratique de pouvoir échanger les contacts avec d'autres applications.
+ Le format vCard est un un format de fichier populaire pour échanger
+ ce type de données.
+ Dans ce chapitre, nous étendrons notre carnet d'adresses pour permettre
+ d'exporter des contacts dans des fichiers vCard \c{.vcf}.
+
+ \section1 Définition de la classe AddressBook
+
+ Nous ajoutons un objet QPushButton, \c exportButton, et un slot
+ public correspondant, \c exportAsVCard(), à notre classe \c AddressBook
+ dans le fichier \c addressbook.h.
+
+ \snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration
+ \dots
+ \snippet tutorials/addressbook/part7/addressbook.h exportButton declaration
+
+ \section1 Implémentation de la classe AddressBook
+
+ Dans le constructeur de \c AddressBook, nous connectons le signal
+ \l{QPushButton::clicked()}{clicked()} de \c{exportButton} au slot
+ \c exportAsVCard().
+ Nous ajoutons aussi ce bouton à \c buttonLayout1, le layout responsable
+ du groupe de boutons sur la droite.
+
+ Dans la méthode \c exportAsVCard(), nous commençons par extraire le
+ nom du contact dans \n name. Nous déclarons \c firstname, \c lastName et
+ \c nameList.
+ Ensuite, nous cherchons la position du premier espace blanc de \c name.
+ Si il y a un espace, nous séparons le nom du contact en \c firstName et
+ \c lastName. Finalement, nous remplaçons l'espace par un underscore ("_").
+ Si il n'y a pas d'espace, nous supposons que le contact ne comprend que
+ le prénom.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part1
+
+ Comme pour la méthode \c saveToFile(), nous ouvrons une boîte de dialogue
+ pour donner la possibilité à l'utilisateur de choisir un emplacement pour
+ le fichier. Avec le nom de fichier choisi, nous créons une instance de QFile
+ pour y écrire.
+
+ Nous essayons d'ouvrir le fichier en mode \l{QIODevice::}{WriteOnly}. Si
+ cela échoue, nous affichons un QMessageBox pour informer l'utilisateur
+ à propos de l'origine du problème et nous quittons la méthode. Sinon, nous passons le
+ fichier comme paramètre pour créer un objet QTextStream, \c out. De la même façon que
+ QDataStream, la classe QTextStream fournit les fonctionnalités pour
+ lire et écrire des fichiers de texte. Grâce à celà, le fichier \c{.vcf}
+ généré pourra être ouvert et édité à l'aide d'un simple éditeur de texte.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part2
+
+ Nous écrivons ensuite un fichier vCard avec la balise \c{BEGIN:VCARD},
+ suivit par \c{VERSION:2.1}.
+ Le nom d'un contact est écrit à l'aide de la balise \c{N:}. Pour la balise
+ \c{FN:}, qui remplit le titre du contact, nous devons vérifier si le contact
+ à un nom de famille défini ou non. Si oui, nous utilions les détails de
+ \c nameList pour remplir le champ, dans le cas contraire on écrit uniquement le contenu
+ de \c firstName.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part3
+
+ Nous continuons en écrivant l'adresse du contact. Les points-virgules
+ dans l'adresse sont échappés à l'aide de "\\", les retours de ligne sont
+ remplacés par des points-virgules, et les vigules sont remplacées par des espaces.
+ Finalement nous écrivons les balises \c{ADR;HOME:;} suivies par l'adresse
+ et la balise \c{END:VCARD}.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part4
+
+ À la fin de la méthode, un QMessageBox est affiché pour informer l'utilisateur
+ que la vCard a été exportée avec succès.
+
+ \e{vCard est une marque déposée de \l{http://www.imc.org}
+ {Internet Mail Consortium}}.
+*/
diff --git a/doc/src/tutorials/addressbook-sdk.qdoc b/doc/src/tutorials/addressbook-sdk.qdoc
new file mode 100644
index 0000000..b6b257d
--- /dev/null
+++ b/doc/src/tutorials/addressbook-sdk.qdoc
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials-addressbook-sdk.html
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage \l{Designing the User Interface}{Chapter 1}
+
+ \title Address Book Tutorial
+ \ingroup howto
+ \ingroup tutorials
+ \brief An introduction to GUI programming with Qt and Qt Creator,
+ describing in detail how to put together a simple yet fully-
+ functioning application.
+
+ This tutorial gives an introduction to GUI programming using the Qt SDK.
+
+ ### Screenshot
+
+ In the process, we will learn about some basic technologies provided by
+ Qt, such as:
+
+ \list
+ \o Widgets and layout managers
+ \o Container classes
+ \o Signals and slots
+ \o Input and output devices
+ \endlist
+
+ If you are completely new to Qt, please read \l{How to Learn Qt} if you
+ have not already done so.
+
+ The tutorial's source code is located in Qt's
+ \c{examples/tutorials/addressbook} directory.
+
+ Tutorial chapters:
+
+ \list 1
+ \o \l{Designing the User Interface}
+ \o \l{Adding Addresses}
+ \o \l{Navigating between Entries}
+ \o \l{Editing and Removing Addresses}
+ \o \l{Adding a Find Function}
+ \o \l{Loading and Saving}
+ \o \l{Additional Features}
+ \endlist
+
+ Although this little application does not look much like a fully-fledged
+ modern GUI application, it uses many of the basic techniques that are used
+ in more complex applications. After you have worked through it, we
+ recommend checking out the \l{mainwindows/application}{Application}
+ example, which presents a small GUI application, with menus, toolbars, a
+ status bar, and so on.
+*/
+
+
+/*!
+ \page tutorials-addressbook-sdk-part1.html
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage \l{Adding Addresses}{Chapter 2}
+ \title Address Book 1 - Designing the User Interface
+
+ The first part of this tutorial covers the design of the basic graphical
+ user interface (GUI) we use for the Address Book application.
+
+ The first step to creating a GUI program is to design the user interface.
+ In this chapter, our goal is to set up the labels and input fields needed
+ to implement a basic address book application. The figure below is a
+ screenshot of our expected output.
+
+ \image addressbook-tutorial-part1-screenshot.png
+
+ We begin by launching Qt Creator and use it to generate a new project. To
+ do this, select \gui New from the \gui File menu. In the
+ \gui{New File or Project} dialog. Follow the step by step guide on how to
+ create a \gui Project with Qt Creator, refer to the document
+ \l{Creating a Project in Qt Creator}{here}. Ensure that you select QWidget
+ as your subclass and name it \c AddressBook.
+
+ There are five files generated in this \gui{Project}:
+
+ \list
+ \o \c{addressbook.pro} - the project file,
+ \o \c{addressbook.h} - the definition file for the \c AddressBook
+ class,
+ \o \c{addressbook.cpp} - the implementation file for the
+ \c AddressBook class,
+ \o \c{main.cpp} - the file containing a \c main() function, with an
+ instance of \c AddressBook, and
+ \o \c{addressbook.ui} - the user interface file created with \QD.
+ \endlist
+
+ Now we have all the files we need, let's move on to designing the user
+ interface.
+
+ \section1 Placing the Widgets on the Form
+
+ In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file.
+ The \QD plugin will be launched, allowing you to design your program's user
+ interface.
+
+ We require two \l{QLabel}s to label the input fields as well as a
+ QLineEdit and a QTextEdit as the input fields. So, drag those widgets from
+ the \gui{Widget Box} to your form. In the \gui{Property Editor}, set their
+ \gui{objectName} property to \c nameLabel and \c addressLabel for the
+ \l{QLabel}s, \c nameLine for the QLineEdit and finally, \c addressText for
+ the QTextEdit.
+
+ Next, we have to position the widgets properly, according to the screenshot
+ earlier. We use a QGridLayout to position our labels and input fields in a
+ structured manner. QGridLayout divides the available space into a grid and
+ places widgets in the cells we specify with row and column numbers. The
+ diagram below shows the layout cells and the position of our widgets.
+
+ \image addressbook-tutorial-part1-labeled-screenshot.png
+
+
+ \section1 Qt Programming - Subclassing
+
+ When writing Qt programs, we usually subclass Qt objects to add
+ functionality. This is one of the essential concepts behind creating custom
+ widgets or collections of standard widgets. Subclassing to extend or change
+ the behavior of a widget has the following advantages:
+
+ \list
+ \o We can write implementations of virtual or pure virtual functions
+ to obtain exactly what we need, falling back on the base class's
+ implementation when necessary.
+ \o It allows us to encapsulate parts of the user interface within a
+ class, so that the other parts of the application do not need to
+ know about the individual widgets in the user interface.
+ \o The subclass can be used to create multiple custom widgets in the
+ same application or library, and the code for the subclass can be
+ reused in other projects.
+ \endlist
+
+
+
+
+*/
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
new file mode 100644
index 0000000..3b0d2bc
--- /dev/null
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -0,0 +1,1006 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page tutorials-addressbook.html
+
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage {tutorials/addressbook/part1}{Chapter 1}
+
+ \title Address Book Tutorial
+ \ingroup howto
+ \ingroup tutorials
+ \brief An introduction to GUI programming, showing how to put together a
+ simple yet fully-functioning application.
+
+ This tutorial gives an introduction to GUI programming using the Qt
+ cross-platform framework.
+
+ \image addressbook-tutorial-screenshot.png
+
+ \omit
+ It doesn't cover everything; the emphasis is on teaching the programming
+ philosophy of GUI programming, and Qt's features are introduced as needed.
+ Some commonly used features are never used in this tutorial.
+ \endomit
+
+ In the process, we will learn about some basic technologies provided by Qt,
+ such as
+
+ \list
+ \o Widgets and layout managers
+ \o Container classes
+ \o Signals and slots
+ \o Input and output devices
+ \endlist
+
+ If you are completely new to Qt, please read \l{How to Learn Qt} if you
+ have not already done so.
+
+ The tutorial's source code is located in Qt's \c examples/tutorials/addressbook
+ directory.
+
+ Tutorial chapters:
+
+ \list 1
+ \o \l{tutorials/addressbook/part1}{Designing the User Interface}
+ \o \l{tutorials/addressbook/part2}{Adding Addresses}
+ \o \l{tutorials/addressbook/part3}{Navigating between Entries}
+ \o \l{tutorials/addressbook/part4}{Editing and Removing Addresses}
+ \o \l{tutorials/addressbook/part5}{Adding a Find Function}
+ \o \l{tutorials/addressbook/part6}{Loading and Saving}
+ \o \l{tutorials/addressbook/part7}{Additional Features}
+ \endlist
+
+ Although this little application does not look much like a fully-fledged
+ modern GUI application, it uses many of the basic techniques that are used
+ in more complex applications. After you have worked through it, we
+ recommend checking out the \l{mainwindows/application}{Application}
+ example, which presents a small GUI application, with menus, toolbars, a
+ status bar, and so on.
+*/
+
+/*!
+ \page tutorials-addressbook-part1.html
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part2}{Chapter 2}
+ \example tutorials/addressbook/part1
+ \title Address Book 1 - Designing the User Interface
+
+ The first part of this tutorial covers the design of the basic graphical
+ user interface (GUI) we use for the Address Book application.
+
+ The first step to creating a GUI program is to design the user interface.
+ In this chapter, our goal is to set up the labels and input fields needed
+ to implement a basic address book application. The figure below is a
+ screenshot of our expected output.
+
+ \image addressbook-tutorial-part1-screenshot.png
+
+ We require two QLabel objects, \c nameLabel and \c addressLabel, as well
+ as two input fields, a QLineEdit object, \c nameLine, and a QTextEdit
+ object, \c addressText, to enable the user to enter a contact's name and
+ address. The widgets used and their positions are shown in the figure
+ below.
+
+ \image addressbook-tutorial-part1-labeled-screenshot.png
+
+ There are three files used to implement this address book:
+
+ \list
+ \o \c{addressbook.h} - the definition file for the \c AddressBook
+ class,
+ \o \c{addressbook.cpp} - the implementation file for the
+ \c AddressBook class, and
+ \o \c{main.cpp} - the file containing a \c main() function, with
+ an instance of \c AddressBook.
+ \endlist
+
+ \section1 Qt Programming - Subclassing
+
+ When writing Qt programs, we usually subclass Qt objects to add
+ functionality. This is one of the essential concepts behind creating
+ custom widgets or collections of standard widgets. Subclassing to
+ extend or change the behavior of a widget has the following advantages:
+
+ \list
+ \o We can write implementations of virtual or pure virtual functions to
+ obtain exactly what we need, falling back on the base class's implementation
+ when necessary.
+ \o It allows us to encapsulate parts of the user interface within a class,
+ so that the other parts of the application don't need to know about the
+ individual widgets in the user interface.
+ \o The subclass can be used to create multiple custom widgets in the same
+ application or library, and the code for the subclass can be reused in other
+ projects.
+ \endlist
+
+ Since Qt does not provide a specific address book widget, we subclass a
+ standard Qt widget class and add features to it. The \c AddressBook class
+ we create in this tutorial can be reused in situations where a basic address
+ book widget is needed.
+
+ \section1 Defining the AddressBook Class
+
+ The \l{tutorials/addressbook/part1/addressbook.h}{\c addressbook.h} file is
+ used to define the \c AddressBook class.
+
+ We start by defining \c AddressBook as a QWidget subclass and declaring
+ a constructor. We also use the Q_OBJECT macro to indicate that the class
+ uses internationalization and Qt's signals and slots features, even
+ if we do not use all of these features at this stage.
+
+ \snippet tutorials/addressbook/part1/addressbook.h class definition
+
+ The class holds declarations of \c nameLine and \c addressText, the
+ private instances of QLineEdit and QTextEdit mentioned earlier.
+ You will see, in the coming chapters, that data stored in \c nameLine and
+ \c addressText is needed for many of the address book's functions.
+
+ We do not need to include declarations of the QLabel objects we will use
+ because we will not need to reference them once they have been created.
+ The way Qt tracks the ownership of objects is explained in the next section.
+
+ The Q_OBJECT macro itself implements some of the more advanced features of Qt.
+ For now, it is useful to think of the Q_OBJECT macro as a shortcut which allows
+ us to use the \l{QObject::}{tr()} and \l{QObject::}{connect()} functions.
+
+ We have now completed the \c addressbook.h file and we move on to
+ implement the corresponding \c addressbook.cpp file.
+
+ \section1 Implementing the AddressBook Class
+
+ The constructor of \c AddressBook accepts a QWidget parameter, \a parent.
+ By convention, we pass this parameter to the base class's constructor.
+ This concept of ownership, where a parent can have one or more children,
+ is useful for grouping widgets in Qt. For example, if you delete a parent,
+ all of its children will be deleted as well.
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
+
+ Within this constructor, we declare and instantiate two local QLabel objects,
+ \c nameLabel and \c addressLabel, as well as instantiate \c nameLine and
+ \c addressText. The
+ \l{QObject::tr()}{tr()} function returns a translated version of the
+ string, if there is one available; otherwise, it returns the string itself.
+ Think of this function as an \c{<insert translation here>} marker to mark
+ QString objects for translation. You will notice, in the coming chapters as
+ well as in the \l{Qt Examples}, that we include it whenever we use a
+ translatable string.
+
+ When programming with Qt, it is useful to know how layouts work.
+ Qt provides three main layout classes: QHBoxLayout, QVBoxLayout
+ and QGridLayout to handle the positioning of widgets.
+
+ \image addressbook-tutorial-part1-labeled-layout.png
+
+ We use a QGridLayout to position our labels and input fields in a
+ structured manner. QGridLayout divides the available space into a grid and
+ places widgets in the cells we specify with row and column numbers. The
+ diagram above shows the layout cells and the position of our widgets, and
+ we specify this arrangement using the following code:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp layout
+
+ Notice that \c addressLabel is positioned using Qt::AlignTop as an
+ additional argument. This is to make sure it is not vertically centered in
+ cell (1,0). For a basic overview on Qt Layouts, refer to the \l{Layout Classes}
+ document.
+
+ In order to install the layout object onto the widget, we have to invoke
+ the widget's \l{QWidget::setLayout()}{setLayout()} function:
+
+ \snippet tutorials/addressbook/part1/addressbook.cpp setting the layout
+
+ Lastly, we set the widget's title to "Simple Address Book".
+
+ \section1 Running the Application
+
+ A separate file, \c main.cpp, is used for the \c main() function. Within
+ this function, we instantiate a QApplication object, \c app. QApplication
+ is responsible for various application-wide resources, such as the default
+ font and cursor, and for running an event loop. Hence, there is always one
+ QApplication object in every GUI application using Qt.
+
+ \snippet tutorials/addressbook/part1/main.cpp main function
+
+ We construct a new \c AddressBook widget on the heap using the \c new
+ keyword and invoke its \l{QWidget::show()}{show()} function to display it.
+ However, the widget will not be shown until the application's event loop
+ is started. We start the event loop by calling the application's
+ \l{QApplication::}{exec()} function; the result returned by this function
+ is used as the return value from the \c main() function.
+*/
+
+/*!
+ \page tutorials-addressbook-part2.html
+ \previouspage Address Book 1 - Designing the User Interface
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part3}{Chapter 3}
+ \example tutorials/addressbook/part2
+ \title Address Book 2 - Adding Addresses
+
+ The next step to creating our basic address book application is to allow
+ a little bit of user interaction.
+
+ \image addressbook-tutorial-part2-add-contact.png
+
+ We will provide a push button that the user can click to add a new contact.
+ Also, some form of data structure is needed to store these contacts in an
+ organized way.
+
+ \section1 Defining the AddressBook Class
+
+ Now that we have the labels and input fields set up, we add push buttons to
+ complete the process of adding a contact. This means that our
+ \c addressbook.h file now has three QPushButton objects declared and three
+ corresponding public slots.
+
+ \snippet tutorials/addressbook/part2/addressbook.h slots
+
+ A slot is a function that responds to a particular signal. We will discuss
+ this concept in further detail when implementing the \c AddressBook class.
+ However, for an overview of Qt's signals and slots concept, you can refer
+ to the \l{Signals and Slots} document.
+
+ Three QPushButton objects: \c addButton, \c submitButton and
+ \c cancelButton, are now included in our private variable declarations,
+ along with \c nameLine and \c addressText from the last chapter.
+
+ \snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
+
+ We need a container to store our address book contacts, so that we can
+ traverse and display them. A QMap object, \c contacts, is used for this
+ purpose as it holds a key-value pair: the contact's name as the \e key,
+ and the contact's address as the \e{value}.
+
+ \snippet tutorials/addressbook/part2/addressbook.h remaining private variables
+
+ We also declare two private QString objects, \c oldName and \c oldAddress.
+ These objects are needed to hold the name and address of the contact that
+ was last displayed, before the user clicked "Add". So, when the user clicks
+ "Cancel", we can revert to displaying the details of the last contact.
+
+ \section1 Implementing the AddressBook Class
+
+ Within the constructor of \c AddressBook, we set the \c nameLine and
+ \c addressText to read-only, so that we can only display but not edit
+ existing cotact details.
+
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 1
+ \dots
+ \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 2
+
+ Then, we instantiate our push buttons: \c addButton, \c submitButton, and
+ \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration
+
+ The \c addButton is displayed by invoking the \l{QPushButton::show()}
+ {show()} function, while the \c submitButton and \c cancelButton are
+ hidden by invoking \l{QPushButton::hide()}{hide()}. These two push
+ buttons will only be displayed when the user clicks "Add" and this is
+ handled by the \c addContact() function discussed below.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots
+
+ We connect the push buttons' \l{QPushButton::clicked()}{clicked()} signal
+ to their respective slots. The figure below illustrates this.
+
+ \image addressbook-tutorial-part2-signals-and-slots.png
+
+ Next, we arrange our push buttons neatly to the right of our address book
+ widget, using a QVBoxLayout to line them up vertically.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp vertical layout
+
+ The \l{QBoxLayout::addStretch()}{addStretch()} function is used to ensure
+ the push buttons are not evenly spaced, but arranged closer to the top of
+ the widget. The figure below shows the difference between using
+ \l{QBoxLayout::addStretch()}{addStretch()} and not using it.
+
+ \image addressbook-tutorial-part2-stretch-effects.png
+
+ We then add \c buttonLayout1 to \c mainLayout, using
+ \l{QGridLayout::addLayout()}{addLayout()}. This gives us nested layouts
+ as \c buttonLayout1 is now a child of \c mainLayout.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp grid layout
+
+ Our layout coordinates now look like this:
+
+ \image addressbook-tutorial-part2-labeled-layout.png
+
+ In the \c addContact() function, we store the last displayed contact
+ details in \c oldName and \c oldAddress. Then we clear these input
+ fields and turn off the read-only mode. The focus is set on \c nameLine
+ and we display \c submitButton and \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp addContact
+
+ The \c submitContact() function can be divided into three parts:
+
+ \list 1
+ \o We extract the contact's details from \c nameLine and \c addressText
+ and store them in QString objects. We also validate to make sure that the
+ user did not click "Submit" with empty input fields; otherwise, a
+ QMessageBox is displayed to remind the user for a name and address.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1
+
+ \o We then proceed to check if the contact already exists. If it does not
+ exist, we add the contact to \c contacts and we display a QMessageBox to
+ inform the user that the contact has been added.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2
+
+ If the contact already exists, again, we display a QMessageBox to inform
+ the user about this, to prevent the user from adding duplicate contacts.
+ Our \c contacts object is based on key-value pairs of name and addresses,
+ hence, we want to ensure that \e key is unique.
+
+ \o Once we have handled both cases mentioned above, we restore the push
+ buttons to their normal state with the following code:
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3
+
+ \endlist
+
+ The screenshot below shows the QMessageBox object we use to display
+ information messages to the user.
+
+ \image addressbook-tutorial-part2-add-successful.png
+
+ The \c cancel() function restores the last displayed contact details and
+ enables \c addButton, as well as hides \c submitButton and
+ \c cancelButton.
+
+ \snippet tutorials/addressbook/part2/addressbook.cpp cancel
+
+ The general idea to add a contact is to give the user the flexibility to
+ click "Submit" or "Cancel" at any time. The flowchart below further
+ explains this concept:
+
+ \image addressbook-tutorial-part2-add-flowchart.png
+*/
+
+/*!
+ \page tutorials-addressbook-part3.html
+ \previouspage Address Book 2 - Adding Addresses
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part4}{Chapter 4}
+ \example tutorials/addressbook/part3
+ \title Address Book 3 - Navigating between Entries
+
+ The address book application is now half complete. We need to add some
+ functions to navigate between contacts. But first, we have to decide
+ what sort of a data structure we would like to use to hold these contacts.
+
+ In Chapter 2, we used a QMap of key-value pairs with the contact's name
+ as the \e key, and the contact's address as the \e value. This works well
+ for our case. However, in order to navigate and display each entry, a
+ little bit of enhancement is needed.
+
+ We enhance the QMap by making it replicate a data structure similar to a
+ circularly-linked list, where all elements are connected, including the
+ first element and the last element. The figure below illustrates this data
+ structure.
+
+ \image addressbook-tutorial-part3-linkedlist.png
+
+ \section1 Defining the AddressBook Class
+
+ In order to add navigation functions to the address book application, we
+ need to add two more slots to our \c AddressBook class: \c next() and
+ \c previous(). These are added to our \c addressbook.h file:
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation functions
+
+ We also require another two QPushButton objects, so we declare \c nextButton
+ and \c previousButton as private variables:
+
+ \snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons
+
+ \section1 Implementing the AddressBook Class
+
+ In the \c AddressBook constructor in \c addressbook.cpp, we instantiate
+ \c nextButton and \c previousButton and disable them by default. This is
+ because navigation is only enabled when there is more than one contact
+ in the address book.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons
+
+ We then connect these push buttons to their respective slots:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
+
+ The image below is our expected graphical user interface. Notice that it
+ is getting closer to our expected final output.
+
+ \image addressbook-tutorial-part3-screenshot.png
+
+ We follow basic conventions for \c next() and \c previous() functions by
+ placing the \c nextButton on the right and the \c previousButton on the
+ left. In order to achieve this intuitive layout, we use QHBoxLayout to
+ place the widgets side-by-side:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp navigation layout
+
+ The QHBoxLayout object, \c buttonLayout2, is then added to \c mainLayout.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout
+
+ The figure below shows the coordinates of the widgets in \c mainLayout.
+ \image addressbook-tutorial-part3-labeled-layout.png
+
+ Within our \c addContact() function, we have to disable these buttons so
+ that the user does not attempt to navigate while adding a contact.
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation
+
+ Also, in our \c submitContact() function, we enable the navigation
+ buttons, \c nextButton and \c previousButton, depending on the size
+ of \c contacts. As mentioned earlier, navigation is only enabled when
+ there is more than one contact in the address book. The following lines
+ of code demonstrates how to do this:
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation
+
+ We also include these lines of code in the \c cancel() function.
+
+ Recall that we intend to emulate a circularly-linked list with our QMap
+ object, \c contacts. So, in the \c next() function, we obtain an iterator
+ for \c contacts and then:
+
+ \list
+ \o If the iterator is not at the end of \c contacts, we increment it
+ by one.
+ \o If the iterator is at the end of \c contacts, we move it to the
+ beginning of \c contacts. This gives us the illusion that our QMap is
+ working like a circularly-linked list.
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp next() function
+
+ Once we have iterated to the correct object in \c contacts, we display
+ its contents on \c nameLine and \c addressText.
+
+ Similarly, for the \c previous() function, we obtain an iterator for
+ \c contacts and then:
+
+ \list
+ \o If the iterator is at the end of \c contacts, we clear the
+ display and return.
+ \o If the iterator is the beginning of \c contacts, we move it to
+ the end.
+ \o We then decrement the iterator by one.
+ \endlist
+
+ \snippet tutorials/addressbook/part3/addressbook.cpp previous() function
+
+ Again, we display the contents of the current object in \c contacts.
+
+*/
+
+/*!
+ \page tutorials-addressbook-part4.html
+ \previouspage Address Book 3 - Navigating between Entries
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part5}{Chapter 5}
+ \example tutorials/addressbook/part4
+ \title Address Book 4 - Editing and Removing Addresses
+
+ In this chapter, we look at ways to modify the contents of contact stored
+ in the address book application.
+
+ \image addressbook-tutorial-screenshot.png
+
+ We now have an address book that not only holds contacts in an organized
+ manner, but also allows navigation. It would be convenient to include
+ edit and remove functions so that a contact's details can be changed
+ when needed. However, this requires a little improvement, in the form of
+ enums. In our previous chapters, we had two modes: \c{AddingMode} and
+ \c{NavigationMode} - but they weren't defined as enums. Instead, we
+ enabled and disabled the corresponding buttons manually, resulting in
+ multiple lines of repeated code.
+
+ In this chapter, we define the \c Mode enum with three different values:
+
+ \list
+ \o \c{NavigationMode},
+ \o \c{AddingMode}, and
+ \o \c{EditingMode}.
+ \endlist
+
+ \section1 Defining the AddressBook Class
+
+ The \c addressbook.h file is updated to contain the \c Mode enum:
+
+ \snippet tutorials/addressbook/part4/addressbook.h Mode enum
+
+ We also add two new slots, \c editContact() and \c removeContact(), to
+ our current list of public slots.
+
+ \snippet tutorials/addressbook/part4/addressbook.h edit and remove slots
+
+ In order to switch between modes, we introduce the \c updateInterface() function
+ to control the enabling and disabling of all QPushButton objects. We also
+ add two new push buttons, \c editButton and \c removeButton, for the edit
+ and remove functions mentioned earlier.
+
+ \snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h buttons declaration
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.h mode declaration
+
+ Lastly, we declare \c currentMode to keep track of the current mode of the
+ enum.
+
+ \section1 Implementing the AddressBook Class
+
+ We now have to implement the mode-changing features of the address book
+ application. The \c editButton and \c removeButton are instantiated and
+ disabled by default, as the address book starts up with zero contacts in
+ memory.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
+
+ These buttons are then connected to their respective slots, \c editContact()
+ and \c removeContact(), and we add them to \c buttonLayout1.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout
+
+ The \c editContact() function stores the contact's old details in
+ \c oldName and \c oldAddress, before switching the mode to \c EditingMode.
+ In this mode, the \c submitButton and \c cancelButton are both enabled,
+ hence, the user can change the contact's details and click either button.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp editContact() function
+
+ The \c submitContact() function has been divided in two with an \c{if-else}
+ statement. We check \c currentMode to see if it's in \c AddingMode. If it is,
+ we proceed with our adding process.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning
+ \dots
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1
+
+ Otherwise, we check to see if \c currentMode is in \c EditingMode. If it
+ is, we compare \c oldName with \c name. If the name has changed, we remove
+ the old contact from \c contacts and insert the newly updated contact.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2
+
+ If only the address has changed (i.e., \c oldAddress is not the same as \c address),
+ we update the contact's address. Lastly, we set \c currentMode to
+ \c NavigationMode. This is an important step as it re-enables all the
+ disabled push buttons.
+
+ To remove a contact from the address book, we implement the
+ \c removeContact() function. This function checks to see if the contact
+ exists in \c contacts.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function
+
+ If it does, we display a QMessageBox, to confirm the removal with the
+ user. Once the user has confirmed, we call \c previous() to ensure that the
+ user interface shows another contact, and we remove the contact using \l{QMap}'s
+ \l{QMap::remove()}{remove()} function. As a courtesy, we display a QMessageBox
+ to inform the user. Both the message boxes used in this function are shown below:
+
+ \image addressbook-tutorial-part4-remove.png
+
+ \section2 Updating the User Interface
+
+ We mentioned the \c updateInterface() function earlier as a means to
+ enable and disable the push buttons depending on the current mode.
+ The function updates the current mode according to the \c mode argument
+ passed to it, assigning it to \c currentMode before checking its value.
+
+ Each of the push buttons is then enabled or disabled, depending on the
+ current mode. The code for \c AddingMode and \c EditingMode is shown below:
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1
+
+ For \c NavigationMode, however, we include conditions within the
+ parameters of the QPushButton::setEnabled(). This is to ensure that
+ the \c editButton and \c removeButton push buttons are enabled when there
+ is at least one contact in the address book; \c nextButton and \c previousButton
+ are only enabled when there is more than one contact in the address book.
+
+ \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
+
+ By performing the task of setting the mode and updating the user interface in
+ the same function, we avoid the possibility of the user interface getting "out
+ of sync" with the internal state of the application.
+*/
+
+/*!
+ \page tutorials-addressbook-part5.html
+ \previouspage Address Book 4 - Editing and Removing Addresses
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part6}{Chapter 6}
+ \example tutorials/addressbook/part5
+ \title Address Book 5 - Adding a Find Function
+
+ In this chapter, we look at ways to locate contacts and addresses in
+ the address book application.
+
+ \image addressbook-tutorial-part5-screenshot.png
+
+ As we keep adding contacts to our address book application, it becomes
+ tedious to navigate them with the \e Next and \e Previous buttons. In this
+ case, a \e Find function would be more efficient in looking up contacts.
+ The screenshot above shows the \e Find button and its position on the panel
+ of buttons.
+
+ When the user clicks on the \e Find button, it is useful to display a
+ dialog that can prompt the user for a contact's name. Qt provides QDialog,
+ which we subclass in this chapter, to implement a \c FindDialog class.
+
+ \section1 Defining the FindDialog Class
+
+ \image addressbook-tutorial-part5-finddialog.png
+
+ In order to subclass QDialog, we first include the header for QDialog in
+ the \c finddialog.h file. Also, we use forward declaration to declare
+ QLineEdit and QPushButton since we will be using those widgets in our
+ dialog class.
+
+ As in our \c AddressBook class, the \c FindDialog class includes
+ the Q_OBJECT macro and its constructor is defined to accept a parent
+ QWidget, even though the dialog will be opened as a separate window.
+
+ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header
+
+ We define a public function, \c getFindText() for use by classes that
+ instantiate \c FindDialog, which allows them to obtain the text
+ entered by the user. A public slot, \c findClicked(), is defined to
+ handle the search string when the user clicks the \gui Find button.
+
+ Lastly, we define the private variables, \c findButton, \c lineEdit
+ and \c findText, corresponding to the \gui Find button, the line edit
+ into which the user types the search string, and an internal string
+ used to store the search string for later use.
+
+ \section1 Implementing the FindDialog Class
+
+ Within the constructor of \c FindDialog, we set up the private variables,
+ \c lineEdit, \c findButton and \c findText. We use a QHBoxLayout to
+ position the widgets.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp constructor
+
+ We set the layout and window title, as well as connect the signals
+ to their respective slots. Notice that \c{findButton}'s
+ \l{QPushButton::clicked()}{clicked()} signal is connected to to
+ \c findClicked() and \l{QDialog::accept()}{accept()}. The
+ \l{QDialog::accept()}{accept()} slot provided by QDialog hides
+ the dialog and sets the result code to \l{QDialog::}{Accepted}.
+ We use this function to help \c{AddressBook}'s \c findContact() function
+ know when the \c FindDialog object has been closed. This will be
+ further explained when discussing the \c findContact() function.
+
+ \image addressbook-tutorial-part5-signals-and-slots.png
+
+ In \c findClicked(), we validate \c lineEdit to ensure that the user
+ did not click the \gui Find button without entering a contact's name. Then, we set
+ \c findText to the search string, extracted from \c lineEdit. After that,
+ we clear the contents of \c lineEdit and hide the dialog.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function
+
+ The \c findText variable has a public getter function, \c getFindText(),
+ associated with it. Since we only ever set \c findText directly in both the
+ constructor and in the \c findClicked() function, we do not create a
+ setter function to accompany \c getFindText().
+ Because \c getFindText() is public, classes instantiating and using
+ \c FindDialog can always access the search string that the user has
+ entered and accepted.
+
+ \snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function
+
+ \section1 Defining the AddressBook Class
+
+ To ensure we can use \c FindDialog from within our \c AddressBook class, we
+ include \c finddialog.h in the \c addressbook.h file.
+
+ \snippet tutorials/addressbook/part5/addressbook.h include finddialog's header
+
+ So far, all our address book features have a QPushButton and a
+ corresponding slot. Similarly, for the \gui Find feature we have
+ \c findButton and \c findContact().
+
+ The \c findButton is declared as a private variable and the
+ \c findContact() function is declared as a public slot.
+
+ \snippet tutorials/addressbook/part5/addressbook.h findContact() declaration
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.h findButton declaration
+
+ Lastly, we declare the private variable, \c dialog, which we will use to
+ refer to an instance of \c FindDialog.
+
+ \snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration
+
+ Once we have instantiated a dialog, we will want to use it more than once;
+ using a private variable allows us to refer to it from more than one place
+ in the class.
+
+ \section1 Implementing the AddressBook Class
+
+ Within the \c AddressBook class's constructor, we instantiate our private
+ objects, \c findButton and \c findDialog:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton
+ \dots
+ \snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog
+
+ Next, we connect the \c{findButton}'s
+ \l{QPushButton::clicked()}{clicked()} signal to \c findContact().
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find
+
+ Now all that is left is the code for our \c findContact() function:
+
+ \snippet tutorials/addressbook/part5/addressbook.cpp findContact() function
+
+ We start out by displaying the \c FindDialog instance, \c dialog. This is
+ when the user enters a contact name to look up. Once the user clicks
+ the dialog's \c findButton, the dialog is hidden and the result code is
+ set to QDialog::Accepted. This ensures that
+ our \c if statement is always true.
+
+ We then proceed to extract the search string, which in this case is
+ \c contactName, using \c{FindDialog}'s \c getFindText() function. If the
+ contact exists in our address book, we display it immediately. Otherwise,
+ we display the QMessageBox shown below to indicate that their search
+ failed.
+
+ \image addressbook-tutorial-part5-notfound.png
+*/
+
+/*!
+ \page tutorials-addressbook-part6.html
+ \previouspage Address Book 5 - Adding a Find Function
+ \contentspage {Address Book Tutorial}{Contents}
+ \nextpage {tutorials/addressbook/part7}{Chapter 7}
+ \example tutorials/addressbook/part6
+ \title Address Book 6 - Loading and Saving
+
+ This chapter covers the file handling features of Qt that we use to write
+ loading and saving routines for the address book application.
+
+ \image addressbook-tutorial-part6-screenshot.png
+
+ Although browsing and searching for contacts are useful features, our address
+ book is not really fully ready for use until we can saving existing contacts
+ and load them again at a later time.
+ Qt provides a number of classes for \l{Input/Output and Networking}{input and output},
+ but we have chosen to use two which are simple to use in combination: QFile and
+ QDataStream.
+
+ A QFile object represents a file on disk that can be read from and written to.
+ QFile is a subclass of the more general QIODevice class which represents many
+ different kinds of devices.
+
+ A QDataStream object is used to serialize binary data so that it can be stored
+ in a QIODevice and retrieved again later. Reading from a QIODevice and writing
+ to it is as simple as opening the stream - with the respective device as a
+ parameter - and reading from or writing to it.
+
+ \section1 Defining the AddressBook Class
+
+ We declare two public slots, \c saveToFile() and \c loadFromFile(), as well
+ as two QPushButton objects, \c loadButton and \c saveButton.
+
+ \snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration
+
+ \section1 Implementing the AddressBook Class
+
+ In our constructor, we instantiate \c loadButton and \c saveButton.
+ Ideally, it would be more user-friendly to set the push buttons' labels
+ to "Load contacts from a file" and "Save contacts to a file". However, due
+ to the size of our other push buttons, we set the labels to \gui{Load...}
+ and \gui{Save...}. Fortunately, Qt provides a simple way to set tooltips with
+ \l{QWidget::setToolTip()}{setToolTip()} and we use it in the following way
+ for our push buttons:
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1
+ \dots
+ \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
+
+ Although it is not shown here, just like the other features we implemented,
+ we add the push buttons to the layout panel on the right, \c button1Layout,
+ and we connect the push buttons' \l{QPushButton::clicked()}{clicked()}
+ signals to their respective slots.
+
+ For the saving feature, we first obtain \c fileName using
+ QFileDialog::getSaveFileName(). This is a convenience function provided
+ by QFileDialog, which pops up a modal file dialog and allows the user to
+ enter a file name or select any existing \c{.abk} file. The \c{.abk} file
+ is our Address Book extension that we create when we save contacts.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1
+
+ The file dialog that pops up is displayed in the screenshot below:
+
+ \image addressbook-tutorial-part6-save.png
+
+ If \c fileName is not empty, we create a QFile object, \c file with
+ \c fileName. QFile works with QDataStream as QFile is a QIODevice.
+
+ Next, we attempt to open the file in \l{QIODevice::}{WriteOnly} mode.
+ If this is unsuccessful, we display a QMessageBox to inform the user.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
+
+ Otherwise, we instantiate a QDataStream object, \c out, to write the open
+ file. QDataStream requires that the same version of the stream is used
+ for reading and writing. We ensure that this is the case by setting the
+ version used to the \l{QDataStream::Qt_4_5}{version introduced with Qt 4.5}
+ before serializing the data to \c file.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3
+
+ For the loading feature, we also obtain \c fileName using
+ QFileDialog::getOpenFileName(). This function, the counterpart to
+ QFileDialog::getSaveFileName(), also pops up the modal file dialog and
+ allows the user to enter a file name or select any existing \c{.abk} file
+ to load it into the address book.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1
+
+ On Windows, for example, this function pops up a native file dialog, as
+ shown in the following screenshot.
+
+ \image addressbook-tutorial-part6-load.png
+
+ If \c fileName is not empty, again, we use a QFile object, \c file, and
+ attempt to open it in \l{QIODevice::}{ReadOnly} mode. In a similar way
+ to our implementation of \c saveToFile(), if this attempt is unsuccessful,
+ we display a QMessageBox to inform the user.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2
+
+ Otherwise, we instantiate a QDataStream object, \c in, set its version as
+ above and read the serialized data into the \c contacts data structure.
+ Note that we empty \c contacts before reading data into it to simplify the
+ file reading process. A more advanced method would be to read the contacts
+ into temporary QMap object, and copy only the contacts that do not already
+ exist in \c contacts.
+
+ \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3
+
+ To display the contacts that have been read from the file, we must first
+ validate the data obtained to ensure that the file we read from actually
+ contains address book contacts. If it does, we display the first contact;
+ otherwise, we display a QMessageBox to inform the user about the problem.
+ Lastly, we update the interface to enable and disable the push buttons
+ accordingly.
+*/
+
+/*!
+ \page tutorials-addressbook-part7.html
+ \previouspage Address Book 6 - Loading and Saving
+ \contentspage {Address Book Tutorial}{Contents}
+ \example tutorials/addressbook/part7
+ \title Address Book 7 - Additional Features
+
+ This chapter covers some additional features that make the address book
+ application more convenient for everyday use.
+
+ \image addressbook-tutorial-part7-screenshot.png
+
+ Although our address book application is useful in its own right, it would
+ be useful if we could exchange contact data with other applications.
+ The vCard format is a popular file format that can be used for this purpose.
+ In this chapter, we extend our address book client to allow contacts to
+ be exported to vCard \c{.vcf} files.
+
+ \section1 Defining the AddressBook Class
+
+ We add a QPushButton object, \c exportButton, and a corresponding public
+ slot, \c exportAsVCard() to our \c AddressBook class in the
+ \c addressbook.h file.
+
+ \snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration
+ \dots
+ \snippet tutorials/addressbook/part7/addressbook.h exportButton declaration
+
+ \section1 Implementing the AddressBook Class
+
+ Within the \c AddressBook constructor, we connect \c{exportButton}'s
+ \l{QPushButton::clicked()}{clicked()} signal to \c exportAsVCard().
+ We also add this button to our \c buttonLayout1, the layout responsible
+ for our panel of buttons on the right.
+
+ In our \c exportAsVCard() function, we start by extracting the contact's
+ name into \c name. We declare \c firstName, \c lastName and \c nameList.
+ Next, we look for the index of the first white space in \c name. If there
+ is a white space, we split the contact's name into \c firstName and
+ \c lastName. Then, we replace the space with an underscore ("_").
+ Alternately, if there is no white space, we assume that the contact only
+ has a first name.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part1
+
+ As with the \c saveToFile() function, we open a file dialog to let the user
+ choose a location for the file. Using the file name chosen, we create an
+ instance of QFile to write to.
+
+ We attempt to open the file in \l{QIODevice::}{WriteOnly} mode. If this
+ process fails, we display a QMessageBox to inform the user about the
+ problem and return. Otherwise, we pass the file as a parameter to a
+ QTextStream object, \c out. Like QDataStream, the QTextStream class
+ provides functionality to read and write plain text to files. As a result,
+ the \c{.vcf} file generated can be opened for editing in a text editor.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part2
+
+ We then write out a vCard file with the \c{BEGIN:VCARD} tag, followed by
+ the \c{VERSION:2.1} tag. The contact's name is written with the \c{N:}
+ tag. For the \c{FN:} tag, which fills in the "File as" property of a vCard,
+ we have to check whether the contact has a last name or not. If the contact
+ does, we use the details in \c nameList to fill it. Otherwise, we write
+ \c firstName only.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part3
+
+ We proceed to write the contact's address. The semicolons in the address
+ are escaped with "\\", the newlines are replaced with semicolons, and the
+ commas are replaced with spaces. Lastly, we write the \c{ADR;HOME:;}
+ tag, followed by \c address and then the \c{END:VCARD} tag.
+
+ \snippet tutorials/addressbook/part7/addressbook.cpp export function part4
+
+ In the end, a QMessageBox is displayed to inform the user that the vCard
+ has been successfully exported.
+
+ \e{vCard is a trademark of the \l{http://www.imc.org}
+ {Internet Mail Consortium}}.
+*/
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
new file mode 100644
index 0000000..ce977f3
--- /dev/null
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -0,0 +1,193 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page widgets-tutorial.html
+
+ \title Widgets Tutorial
+ \ingroup tutorials
+
+ \brief This tutorial covers basic usage of widgets and layouts, showing how they are used to build GUI applications.
+
+ \section1 Introduction
+
+ Widgets are the basic building blocks of graphical user interface (GUI)
+ applications made with Qt. Each GUI component, such as a button, label or
+ text editor, is a widget and can be placed within an existing user
+ interface or displayed as an independent window. Each type of component
+ is provided by a particular subclass of QWidget, which is itself a
+ subclass of QObject.
+
+ QWidget is not an abstract class; it can be used as a container for other
+ widgets, and can be subclassed with minimal effort to create custom
+ widgets. It is most often used to create windows in which other widgets
+ are placed.
+
+ As with \l{QObject}s, widgets can be created with parent objects to
+ indicate ownership, ensuring that objects are deleted when they are no
+ longer used. With widgets, these parent-child relationships have an
+ additional meaning: each child is displayed within the screen area
+ occupied by its parent. This means that, when a window is deleted, all
+ the widgets it contains are automatically deleted.
+
+ \section1 Creating a Window
+
+ If a widget is created without a parent, it is treated as a window, or
+ \e{top-level widget}, when it is shown. Since it has no parent object to
+ ensure that it is deleted when no longer needed, it is up to the
+ developer to keep track of the top-level widgets in an application.
+
+ In the following example, we use QWidget to create and show a window with
+ a default size:
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr><td>
+ \endraw
+ \snippet snippets/widgets-tutorial/toplevel/main.cpp create, resize and show
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-toplevel.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ We can add a child widget to this window by passing \c window as the
+ parent to its constructor. In this case, we add a button to the window
+ and place it in a specific location:
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr><td>
+ \endraw
+ \snippet snippets/widgets-tutorial/childwidget/main.cpp create, position and show
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-childwidget.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ The button is now a child of the window and will be deleted when the
+ window is destroyed. Note that hiding or closing the window does not
+ automatically destroy it.
+
+ \section1 Using Layouts
+
+ Usually, child widgets are arranged inside a window using layout objects
+ rather than by specifying positions and sizes explicitly. Here, we
+ construct a label and line edit widget that we would like to arrange
+ side-by-side.
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr><td>
+ \endraw
+ \snippet snippets/widgets-tutorial/windowlayout/main.cpp create, lay out widgets and show
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-windowlayout.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ The \c layout object we construct manages the positions and sizes of
+ widgets supplied to it with the \l{QHBoxLayout::}{addWidget()} function.
+ The layout itself is supplied to the window itself in the call to
+ \l{QWidget::}{setLayout()}. Layouts are only visible through the effects
+ they have on the widgets (and other layouts) they are responsible for
+ managing.
+
+ In the example above, the ownership of each widget is not immediately
+ clear. Since we construct the widgets and the layout without parent
+ objects, we would expect to see an empty window and two separate windows
+ containing a label and a line edit. However, when we tell the layout to
+ manage the label and line edit and set the layout on the window, both the
+ widgets and the layout itself are ''reparented'' to become children of
+ the window.
+
+ Just as widgets can contain other widgets, layouts can be used to provide
+ different levels of grouping for widgets. Here, we want to display a
+ label alongside a line edit at the top of a window, above a table view
+ showing the results of a query.
+
+ \raw HTML
+ <table align="left" width="100%">
+ <tr><td>
+ \endraw
+ \snippet snippets/widgets-tutorial/nestedlayouts/main.cpp create, lay out widgets and show
+ \raw HTML
+ </td><td align="right">
+ \endraw
+ \inlineimage widgets-tutorial-nestedlayouts.png
+ \raw HTML
+ </td></tr>
+ </table>
+ \endraw
+
+ As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout
+ and QFormLayout classes to help with more complex user interfaces.
+
+
+
+ \omit
+ In the simple example below, the widget is created on the stack and will
+ automatically be deleted when the \c{main()} function exits.
+
+ {{{#include <QtGui>
+
+ int main(int argc, char *argv[])
+ {
+ QApplication app(argc, argv);
+ QWidget window;
+ window.resize(480, 360);
+ window.show();
+ return app.exec();
+ }
+ }}}
+ \endomit
+*/
diff --git a/doc/src/uic.qdoc b/doc/src/uic.qdoc
new file mode 100644
index 0000000..b0a4630
--- /dev/null
+++ b/doc/src/uic.qdoc
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page uic.html
+ \title User Interface Compiler (uic)
+ \ingroup buildsystem
+ \ingroup qttools
+ \keyword uic
+
+ \omit KEEP THIS FILE SYNCHRONIZED WITH uic.1 \endomit
+
+ This page documents the \e{User Interface Compiler} for the Qt GUI
+ toolkit. The \c uic reads an XML format user interface definition
+ (\c .ui) file as generated by \l{designer-manual.html}{Qt
+ Designer} and creates a corresponding C++ header file.
+
+ Usage:
+ \snippet doc/src/snippets/code/doc_src_uic.qdoc 0
+
+ \section1 Options
+
+ The following table lists the command-line options recognized by
+ \c uic.
+
+ \table
+ \header \o Option \o Description
+ \row \o \c{-o <file>} \o Write output to \c <file> instead of to standard output.
+ \row \o \c{-tr <func>} \o Use \c <func> for translating strings instead of \c tr().
+ \row \o \c{-p} \o Don't generate guards against multiple inclusion (\c #ifndef FOO_H ...).
+ \row \o \c{-h} \o Display the usage and the list of options.
+ \row \o \c{-v} \o Display \c{uic}'s version number.
+ \endtable
+
+ \section1 Examples
+
+ If you use \c qmake, \c uic will be invoked automatically for
+ header files.
+
+ Here are useful makefile rules if you only use GNU make:
+
+ \snippet doc/src/snippets/code/doc_src_uic.qdoc 1
+
+ If you want to write portably, you can use individual rules of the
+ following form:
+
+ \snippet doc/src/snippets/code/doc_src_uic.qdoc 2
+
+ You must also remember to add \c{ui_foo.h} to your \c HEADERS
+ (substitute your favorite name).
+*/
diff --git a/doc/src/unicode.qdoc b/doc/src/unicode.qdoc
new file mode 100644
index 0000000..42ac5a4
--- /dev/null
+++ b/doc/src/unicode.qdoc
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page unicode.html
+ \title Unicode
+ \ingroup architecture
+ \ingroup text-processing
+ \brief Information about support for Unicode in Qt.
+
+ Unicode is a multi-byte character set, portable across all major
+ computing platforms and with decent coverage over most of the world.
+ It is also single-locale; it includes no code pages or other
+ complexities that make software harder to write and test. There is no
+ competing character set that's reasonably cross-platform. For these
+ reasons, Unicode 4.0 is used as the native character set for Qt.
+
+
+ \section1 Information about Unicode on the Web
+
+ The \l{http://www.unicode.org/}{Unicode Consortium} has a number
+ of documents available, including
+
+ \list
+
+ \i \l{http://www.unicode.org/unicode/standard/principles.html}{A
+ technical introduction to Unicode}
+ \i \l{http://www.unicode.org/unicode/standard/standard.html}{The
+ home page for the standard}
+
+ \endlist
+
+
+ \section1 The Standard
+
+ The current version of the standard is 4.0.0.
+
+ \list
+
+ \i \link http://www.amazon.com/exec/obidos/ASIN/0321185781/trolltech/t
+ The Unicode Standard, version 4.0.\endlink See also
+ \link http://www.unicode.org/unicode/standard/versions/
+ its home page.\endlink
+ \i \link http://www.amazon.com/exec/obidos/ASIN/0201616335/trolltech/t
+ The Unicode Standard, version 3.2.\endlink
+ \i \link http://www.amazon.com/exec/obidos/ASIN/0201473459/trolltech/t
+ The Unicode Standard, version 2.0.\endlink See also the
+ \link http://www.unicode.org/unicode/reports/tr8.html 2.1
+ update\endlink and
+ \link http://www.unicode.org/unicode/standard/versions/enumeratedversions.html#Unicode 2.1.9 the 2.1.9 data files\endlink at www.unicode.org.
+
+ \endlist
+
+ \section1 Unicode in Qt
+
+ In Qt, and in most applications that use Qt, most or all user-visible
+ strings are stored using Unicode. Qt provides:
+
+ \list
+
+ \i Translation to/from legacy encodings for file I/O: see
+ QTextCodec and QTextStream.
+ \i Translation from Input Methods and 8-bit keyboard input.
+ \i Translation to legacy character sets for on-screen display.
+ \i A string class, QString, that stores Unicode characters, with
+ support for migrating from C strings including fast (cached)
+ translation to and from US-ASCII, and all the usual string
+ operations.
+ \i Unicode-aware widgets where appropriate.
+ \i Unicode support detection on Windows, so that Qt provides Unicode
+ even on Windows platforms that do not support it natively.
+
+ \endlist
+
+ To fully benefit from Unicode, we recommend using QString for storing
+ all user-visible strings, and performing all text file I/O using
+ QTextStream. Use QKeyEvent::text() for keyboard input in any custom
+ widgets you write; it does not make much difference for slow typists
+ in Western Europe or North America, but for fast typists or people
+ using special input methods using text() is beneficial.
+
+ All the function arguments in Qt that may be user-visible strings,
+ QLabel::setText() and a many others, take \c{const QString &}s.
+ QString provides implicit casting from \c{const char *}
+ so that things like
+
+ \snippet doc/src/snippets/code/doc_src_unicode.qdoc 0
+
+ will work. There is also a function, QObject::tr(), that provides
+ translation support, like this:
+
+ \snippet doc/src/snippets/code/doc_src_unicode.qdoc 1
+
+ QObject::tr() maps from \c{const char *} to a Unicode string, and
+ uses installable QTranslator objects to do the mapping.
+
+ Qt provides a number of built-in QTextCodec classes, that is,
+ classes that know how to translate between Unicode and legacy
+ encodings to support programs that must talk to other programs or
+ read/write files in legacy file formats.
+
+ By default, conversion to/from \c{const char *} uses a
+ locale-dependent codec. However, applications can easily find codecs
+ for other locales, and set any open file or network connection to use
+ a special codec. It is also possible to install new codecs, for
+ encodings that the built-in ones do not support. (At the time of
+ writing, Vietnamese/VISCII is one such example.)
+
+ Since US-ASCII and ISO-8859-1 are so common, there are also especially
+ fast functions for mapping to and from them. For example, to open an
+ application's icon one might do this:
+
+ \snippet doc/src/snippets/code/doc_src_unicode.qdoc 2
+
+ or
+
+ \snippet doc/src/snippets/code/doc_src_unicode.qdoc 3
+
+ Regarding output, Qt will do a best-effort conversion from
+ Unicode to whatever encoding the system and fonts provide.
+ Depending on operating system, locale, font availability, and Qt's
+ support for the characters used, this conversion may be good or bad.
+ We will extend this in upcoming versions, with emphasis on the most
+ common locales first.
+
+ \sa {Internationalization with Qt}
+*/
diff --git a/doc/src/unix-signal-handlers.qdoc b/doc/src/unix-signal-handlers.qdoc
new file mode 100644
index 0000000..6efaa6f
--- /dev/null
+++ b/doc/src/unix-signal-handlers.qdoc
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page unix-signals.html
+ \title Calling Qt Functions From Unix Signal Handlers
+ \ingroup platform-notes
+ \brief You can't. But don't despair, there is a way...
+
+ You \e can't call Qt functions from Unix signal handlers. The
+ standard POSIX rule applies: You can only call async-signal-safe
+ functions from signal handlers. See \l
+ {http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_04.html#tag_02_04_01}
+ {Signal Actions} for the complete list of functions you can call
+ from Unix signal handlers.
+
+ But don't despair, there is a way to use Unix signal handlers with
+ Qt. The strategy is to have your Unix signal handler do something
+ that will eventually cause a Qt signal to be emitted, and then you
+ simply return from your Unix signal handler. Back in your Qt
+ program, that Qt signal gets emitted and then received by your Qt
+ slot function, where you can safely do whatever Qt stuff you
+ weren't allowed to do in the Unix signal handler.
+
+ One simple way to make this happen is to declare a socket pair in
+ your class for each Unix signal you want to handle. The socket
+ pairs are declared as static data members. You also create a
+ QSocketNotifier to monitor the \e read end of each socket pair,
+ declare your Unix signal handlers to be static class methods, and
+ declare a slot function corresponding to each of your Unix signal
+ handlers. In this example, we intend to handle both the SIGHUP and
+ SIGTERM signals. Note: You should read the socketpair(2) and the
+ sigaction(2) man pages before plowing through the following code
+ snippets.
+
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 0
+
+ In the MyDaemon constructor, use the socketpair(2) function to
+ initialize each file descriptor pair, and then create the
+ QSocketNotifier to monitor the \e read end of each pair. The
+ activated() signal of each QSocketNotifier is connected to the
+ appropriate slot function, which effectively converts the Unix
+ signal to the QSocketNotifier::activated() signal.
+
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 1
+
+ Somewhere else in your startup code, you install your Unix signal
+ handlers with sigaction(2).
+
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 2
+
+ In your Unix signal handlers, you write a byte to the \e write end
+ of a socket pair and return. This will cause the corresponding
+ QSocketNotifier to emit its activated() signal, which will in turn
+ cause the appropriate Qt slott function to run.
+
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 3
+
+ In the slot functions connected to the
+ QSocketNotifier::activated() signals, you \e read the byte. Now
+ you are safely back in Qt with your signal, and you can do all the
+ Qt stuff you weren'tr allowed to do in the Unix signal handler.
+
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 4
+*/
diff --git a/doc/src/wince-customization.qdoc b/doc/src/wince-customization.qdoc
new file mode 100644
index 0000000..b61c48d
--- /dev/null
+++ b/doc/src/wince-customization.qdoc
@@ -0,0 +1,264 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page windowsce-customization.html
+ \ingroup qtce
+ \title Windows CE - Working with Custom SDKs
+ \brief How to set up Qt for use with custom Windows CE SDKs.
+
+ When working with a custom SDK for Windows CE, Qt provides an easy way
+ to add support for it to your development environment. The following is
+ a tutorial that covers how to create a specification for Qt on Windows
+ CE platforms.
+
+ \tableofcontents
+
+ \section1 Creating a Custom Build Specification
+
+ Create a subdirectory in the \c mkspecs folder of the Qt directory.
+ New specifications for Qt for Windows CE following this naming convention:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 0
+
+ Using this convention makes it possible for \l{qmake} to identify that
+ you are building Qt for Windows CE, and will customize the compilation
+ process accordingly.
+
+ Create the files \c qmake.conf and \c qplatformdefs.h inside the new
+ specification directory. Take a look at the implementation of the other
+ Windows CE specifications included in the \c mkspecs directory to see
+ what is required to build Qt for Windows CE successfully.
+
+
+ \section1 Fine-Tuning Options
+
+ Compared to the desktop versions, Qt for Windows CE needs two additional
+ options:
+
+ \list
+ \o \bold{CE_SDK} specifies the name of the SDK.
+ \o \bold{CE_ARCH} specifies information about the target architecture.
+ \endlist
+
+ Following is an example configuration for the Windows Mobile 5 for
+ Pocket PC SDK:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 1
+
+ \note \l{qmake} uses this information to build a valid Visual Studio
+ project file. You need to ensure that they are identical to the
+ configuration of the custom SDK, otherwise you might not be able to compile
+ or debug your project with Visual Studio.
+
+ Additionally, most Windows CE SDKs use extra compiler options. These
+ can be specified by expanding the \c DEFINES value.
+
+ For example, with Windows Mobile 5 for Pocket PC, the \c DEFINES variable
+ is expanded in the following way:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 2
+
+ The mkspec may require additional configuration to be used inside of Visual
+ Studio, depending on the Windows CE SDK. The above example defines
+ \c _M_ARM. This definition is available internally in Visual Studio. Hence,
+ the compiler will warn you about redefinition during the build step. These
+ warnings can be disabled by adding a \c default_post.prf file containing
+ the following lines, within the subdirectory.
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 8
+
+
+ \section1 Cross-compilation Environment for a Custom SDK
+
+ Qt for Windows CE supports a convenience script, \c{setcepaths.bat}, that
+ prepares the environment in a command prompt for cross-compilation.
+ However, on custom SDKs, the \c checksdk tool is provided to identify the
+ environment, so Qt compiles successfully.
+
+ \c checksdk is generated during the \c configure step and allows for the
+ following options:
+
+ \list
+ \o \c list: Returns a list of available Windows CE SDKs. (This list
+ may contain one or more SDKs not supported on Qt for Windows CE,
+ e.g., Pocket PC 2003.)
+ \o \c sdk: The parameter to specify an SDK. Returns a setup of
+ environment variables that must be set to cross-compile Qt.
+ \o \c script: Stores your setup in a \c{.bat} file. This simplifies
+ the process of switching environments when you load a command
+ prompt in future.
+ \endlist
+
+
+ \section1 Compiling Qt for a Custom SDK
+
+ Windows CE is highly customizable, hence it is possible that some SDKs have
+ feature-stripped setups. Depending on the SDK's configuration, Qt may not
+ compile in its standard configuration, as Qt for Windows CE is designed to
+ be compatible with the Standard SDK setup.
+
+ However, it is possible to exclude features of Qt and create a version that
+ compiles for the desired SDK.
+
+ Further information on stripping features can be found in the
+ \l{Fine-Tuning Features in Qt}{QFeatures} documentation.
+
+
+ \section1 Making Qt Applications Start on a Custom Device
+
+ Sometimes, a Windows CE device has been created with a configuration
+ different from the corresponding SDK's configuration. In this case, symbols
+ that were available at linking stage will be missing from the run-time
+ libraries.
+
+ Unfortunately, the operating system will not provide an error message that
+ mentions which symbols are absent. Instead, a message box with the following
+ message will appear:
+
+ \c{app.exe is not a valid CE application!}
+
+ To identify the missing symbols, you need to create a temporary
+ application that attempts to dynamically load the Qt for Windows CE
+ libraries using \c LoadLibrary. The following code can be used for this:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 9
+
+ Once you have compiled and deployed the application as well as the Qt
+ libraries, start a remote debugger. The debugger will then print the
+ ordinal number of the unresolved symbol.
+
+ Search for parts of Qt that rely on these functions and disable them using
+ the \l{Fine-Tuning Features in Qt}{QFeatures} functionality.
+
+ In our experience, when Qt applications do not start on Windows CE, it is
+ usually the result of missing symbols for the following classes or
+ features:
+ \list
+ \o \l{Drag and Drop}
+ \o \l{QClipboard}
+ \o \l{QCursor}
+ \endlist
+
+ Please refer to the Microsoft documentation
+ \l{http://msdn.microsoft.com/en-us/library/e7tsx612.aspx}{here} for
+ information on what ordinals are and how you can create them. Information
+ on accessing the corresponding symbol name to a given ordinal value can
+ also be found in the Microsoft documentation.
+
+*/
+
+/*!
+ \page shadow builds-wince.html
+ \ingroup qtce
+ \title Windows CE - Using shadow builds
+ \brief How to create a shadow build for Qt for Windows CE.
+
+ \tableofcontents
+
+ While developing for Windows CE you might want to compile a
+ version of Qt for several different platforms and SDKs. In order
+ to create those different builds of Qt you do not have to copy the
+ whole Qt package or the Qt source. You are able to create multiple
+ Qt builds from a single source tree. Such builds are called shadow
+ builds.
+
+ Basically a shadow build is created by calling configure.exe from a
+ different directory.
+
+ To make sure that the shadow build compiles correctly it is important
+ that you following these guidelines:
+
+ \list
+ \o The original Qt source package must be left untouched - configure must
+ never have been run in the source tree directory.
+
+ \o The shadow build directory must be on the same level as the Qt source
+ package.\br
+ If the Qt package is in \c{C:\Qt\%VERSION%} the shadow build directory
+ could be \c{C:\Qt\shadowbuild}. A shadow build from a directory like
+ \c{C:\shadowbuild} will not compile.
+ \o Avoid using "release" and "debug" in the path to the shadow build
+ directory. (This is an internal limitation of the build system.)
+ \o The \c{\bin} directory of the shadow build directory must be added to the
+ \c PATH environment variable.
+ \o Perl has been installed on your system. (\l{ActivePerl} is a popular
+ distribution of Perl on Windows.)
+ \endlist
+
+ So lets assume you have installed Qt in \c{C:\Qt\%VERSION%} and you want
+ to create a shadow build in \c{C:\Qt\mobile5-shadow}:
+
+ \list
+ \o First add \c{C:\Qt\mobile5-shadow\bin} to the \c PATH variable.
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 3
+
+ \o Make sure the enviroment variables for your compiler are set.
+
+ Visual Studio includes \c{vcvars32.bat} for that purpose - or simply use
+ the "Visual Studio Command Prompt" from the Start menu.
+
+ \o Now navigate to your shadow build directory and run configure:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 4
+
+ \o To build Qt, you have to update your \c{PATH, INCLUDE} and \c LIB paths
+ to point to your target platforms.
+
+ For a default installation of the Windows Mobile 5.0 Pocket PC SDK, you
+ can do the following:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 5
+
+ We have provided a convenience script for this called \c{setcepaths}. Simply
+ type:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 6
+
+ \o Finally, to build the shadow build type:
+
+ \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 7
+
+ \o That's all. You have successfully created a shadow build of Qt in
+ \c{C:\Qt\mobile5-shadow}.
+ \endlist
+*/
diff --git a/doc/src/wince-introduction.qdoc b/doc/src/wince-introduction.qdoc
new file mode 100644
index 0000000..d94116b
--- /dev/null
+++ b/doc/src/wince-introduction.qdoc
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page wince-with-qt-introduction.html
+
+ \title Windows CE - Introduction to using Qt
+ \brief An introduction to Qt for Windows CE developers.
+ \ingroup howto
+ \ingroup qtce
+
+ \tableofcontents
+
+ \section1 Required tools
+
+ In order to use Qt for Windows CE you need to have Visual Studio
+ 2005 and at least one of the supported Windows CE/Mobile SDKs
+ installed.
+
+ We recommend the \e{Windows Mobile 5.0 SDK for Pocket PC} SDK available
+ \l{http://www.microsoft.com/downloads/details.aspx?FamilyID=83a52af2-f524-4ec5-9155-717cbe5d25ed&amp;DisplayLang=en}{here}.
+
+ \section1 Installing Qt
+
+ Follow the instructions found in \l{Installing Qt on Windows CE}.
+
+ \section1 Building your own applications
+
+ If you are new to Qt development, have a look at \l{How to Learn Qt}
+ and \l{Tutorials}. In general there is little or no difference in
+ developing Qt applications for Windows CE compared to any of the
+ other platforms supported by Qt.
+
+ Once you have a \c .pro file, there are two ways of building your
+ application. You can either do it on the command line or inside of
+ VS2005. To do it on the command line, simply write:
+
+ \snippet doc/src/snippets/code/doc_src_wince-introduction.qdoc 0
+
+ To build the project inside of VS2005, on the command line write:
+
+ \snippet doc/src/snippets/code/doc_src_wince-introduction.qdoc 1
+
+ then start VS2005 with the generated \c .vcproj or \c .sln file and
+ select \e{Build project}.
+
+ For more information on how to use qmake have a look at the \l
+ {qmake Tutorial}.
+
+ \section1 Running the application
+
+ In order to run the application, it needs to be deployed on the
+ Windows CE/Mobile device you want to test it for. This can either
+ be done manually or automated using VS2005.
+
+ To do it manually, simply copy the executable, the Qt \c{.dll}
+ files needed for the application to run, and the C-runtime library
+ into a folder on the device, and then click on the executable to
+ start the program. You can either use the \e Explorer found in
+ ActiveSync or the \e{Remote File Viewer} found in VS2005 to do
+ this.
+
+ VS2005 can do this step automatically for you as well. If you have
+ built the project inside VS2005, simply select \e Deploy and then
+ \e Debug to deploy and then run the application. You can change the
+ device type by changing the \e{Target Device} specified in the
+ VS2005 toolbar.
+
+ Further information on deploying Qt applications for Windows can
+ be found in the \l{Deploying an Application on Windows}
+ {deployment document}.
+*/
diff --git a/doc/src/wince-opengl.qdoc b/doc/src/wince-opengl.qdoc
new file mode 100644
index 0000000..b151aa9
--- /dev/null
+++ b/doc/src/wince-opengl.qdoc
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page windowsce-opengl.html
+ \title Windows CE OpenGL ES
+ \ingroup qtce
+ \brief Information about support for OpenGL ES with Qt for Windows CE.
+
+ \section1 Introduction
+
+ \l {http://www.opengl.org}{OpenGL} is an industry standard API for 2D/3D
+ graphics. It provides a powerful, low-level interface between software
+ and acceleration hardware, and it is operating system and window system
+ independent.
+
+ \l {http://www.khronos.org/opengles}{OpenGL ES} is a subset of the
+ \l {http://www.opengl.org}{OpenGL} standard. It is meant for use in
+ embedded systems. Hence, it has a smaller, more constrained API.
+
+ Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
+ Windows CE window manager.
+
+ To use OpenGL ES enabled widgets in a Qt for Windows CE application, you
+ only need to subclass QGLWidget and draw on instances of the subclass with
+ OpenGL ES functions.
+
+ OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
+ The floating point profile is called OpenGL ES CM (Common) and the
+ fixed-point profile is called OpenGL ES CL (Common Lite).
+
+ You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
+ profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
+ ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
+ headers and libararies from your SDK. The OpenGL ES lib should be called
+ either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib}
+ for the Common Lite profile.
+
+ To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
+ you can run \c{configure} like this:
+
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+
+ The distinction between the Common and Common Lite profiles is important,
+ because the Common Lite profile has less functionality and only supports a
+ fixed-point vertex format.
+
+ To start programming with Qt and OpenGL ES on Windows CE, you can start
+ with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
+ and QGLPainter with OpenGL ES. It also provides some hints on how to port
+ OpenGL code to OpenGL ES.
+
+ \section2 Using OpenGL to Accelerate Normal 2D Painting
+
+ Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
+ QPainter operations into OpenGL calls. This is especially convenient for
+ drawing text or QImage objects in an OpenGL ES context. For further
+ details, refer to the \l{Hello GL ES Example}.
+
+*/
diff --git a/doc/src/winsystem.qdoc b/doc/src/winsystem.qdoc
new file mode 100644
index 0000000..5d5f3a7
--- /dev/null
+++ b/doc/src/winsystem.qdoc
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page winsystem.html
+ \title Window System Specific Notes
+ \ingroup buildsystem
+ \ingroup deployment
+
+ Qt is a cross-platform GUI toolkit, so almost the entire API is the
+ same on all platforms and window systems. If you wish to use
+ platform-specific features, and still maintain a platform-independent
+ source tree, you should protect the platform-specific code using the
+ appropriate \c{#ifdef} directives (see below).
+
+ Qt provides a few low-level global functions for fine-tuning
+ applications on specific platforms. See \l{Special-Purpose Global
+ Functions Exported by Qt} for details.
+
+ \tableofcontents
+
+ For information about which platforms are supported by Qt, see the
+ \l{Platform Notes}. For information on distributing Qt applications, see
+ \l{Deploying Qt Applications}.
+
+ \target x11
+ \section1 Qt for X11
+
+ When compiling for this platform, the macro \c{Q_WS_X11} is defined.
+
+ \e{Not documented here. Please contact Qt's technical support team
+ if you have queries.}
+
+ See the \l{Qt for X11 Requirements} page for more information about the
+ libraries required to build Qt with as many features as possible.
+
+ \target win
+ \section1 Qt for Windows
+
+ When compiling for this platform, the macro \c{Q_WS_WIN} is defined.
+
+ \e{Not documented here. Please contact Qt's technical support team
+ if you have queries.}
+
+ \target macosx
+ \section1 Qt for Mac OS X
+
+ When compiling for this platform, the macro \c{Q_WS_MAC} is defined.
+
+ \list
+ \i \l{Qt for Mac OS X - Specific Issues}
+ \i \l{Qt is Mac OS X Native}
+ \endlist
+
+ \target qws
+ \section1 Qt for Embedded Linux
+
+ When compiling for this platform, the macro \c{Q_WS_QWS} is
+ defined (the window system is literally the Qt Window System). See
+ the \l{Qt for Embedded Linux} documentation for more information.
+*/
diff --git a/doc/src/xquery-introduction.qdoc b/doc/src/xquery-introduction.qdoc
new file mode 100644
index 0000000..37a45ac
--- /dev/null
+++ b/doc/src/xquery-introduction.qdoc
@@ -0,0 +1,1024 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page xquery-introduction.html
+ \title A Short Path to XQuery
+ \ingroup scripting
+
+ \startpage index.html QtReference Documentation
+ \target XQuery-introduction
+
+XQuery is a language for querying XML data or non-XML data that can be
+modeled as XML. XQuery is specified by the \l{http://www.w3.org}{W3C}.
+
+\tableofcontents
+
+\section1 Introduction
+
+Where Java and C++ are \e{statement-based} languages, the XQuery
+language is \e{expression-based}. The simplest XQuery expression is an
+XML element constructor:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 20
+
+This \c{<recipe/>} element is an XQuery expression that forms a
+complete XQuery. In fact, this XQuery doesn't actually query
+anything. It just creates an empty \c{<recipe/>} element in the
+output. But \l{Constructing Elements} {constructing new elements in an
+XQuery} is often necessary.
+
+An XQuery expression can also be enclosed in curly braces and embedded
+in another XQuery expression. This XQuery has a document expression
+embedded in a node expression:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 21
+
+It creates a new \c{<html>} element in the output and sets its \c{id}
+attribute to be the \c{id} attribute from an \c{<html>} element in the
+\c{other.html} file.
+
+\section1 Using Path Expressions To Match & Select Items
+
+In C++ and Java, we write nested \c{for} loops and recursive functions
+to traverse XML trees in search of elements of interest. In XQuery, we
+write these iterative and recursive algorithms with \e{path
+expressions}.
+
+A path expression looks somewhat like a typical \e{file pathname} for
+locating a file in a hierarchical file system. It is a sequence of one
+or more \e{steps} separated by slash '/' or double slash '//'.
+Although path expressions are used for traversing XML trees, not file
+systems, in QtXmlPatterms we can model a file system to look like an
+XML tree, so in QtXmlPatterns we can use XQuery to traverse a file
+system. See the \l {File System Example} {file system example}.
+
+Think of a path expression as an algorithm for traversing an XML tree
+to find and collect items of interest. This algorithm is evaluated by
+evaluating each step moving from left to right through the sequence. A
+step is evaluated with a set of input items (nodes and atomic values),
+sometimes called the \e focus. The step is evaluated for each item in
+the focus. These evaluations produce a new set of items, called the \e
+result, which then becomes the focus that is passed to the next step.
+Evaluation of the final step produces the final result, which is the
+result of the XQuery. The items in the result set are presented in
+\l{http://www.w3.org/TR/xquery/#id-document-order} {document order}
+and without duplicates.
+
+With QtXmlPatterns, a standard way to present the initial focus to a
+query is to call QXmlQuery::setFocus(). Another common way is to let
+the XQuery itself create the initial focus by using the first step of
+the path expression to call the XQuery \c{doc()} function. The
+\c{doc()} function loads an XML document and returns the \e {document
+node}. Note that the document node is \e{not} the same as the
+\e{document element}. The \e{document node} is a node constructed in
+memory, when the document is loaded. It represents the entire XML
+document, not the document element. The \e{document element} is the
+single, top-level XML element in the file. The \c{doc()} function
+returns the document node, which becomes the singleton node in the
+initial focus set. The document node will have one child node, and
+that child node will represent the document element. Consider the
+following XQuery:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 18
+
+The \c{doc()} function loads the file \l{cookbook.xml} and returns the
+document node. The document node then becomes the focus for the next
+step \c{//recipe}. Here the double slash means select all \c{<recipe>}
+elements found below the document node, regardless of where they
+appear in the document tree. The query selects all \c{<recipe>}
+elements in the cookbook. See \l{Running The Cookbook Examples} for
+instructions on how to run this query (and most of the ones that
+follow) from the command line.
+
+Conceptually, evaluation of the steps of a path expression is similar
+to iterating through the same number of nested \e{for} loops. Consider
+the following XQuery, which builds on the previous one:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 19
+
+This XQuery is a single path expression composed of three steps. The
+first step creates the initial focus by calling the \c{doc()}
+function. We can paraphrase what the query engine does at each step:
+
+\list 1
+ \o for each node in the initial focus (the document node)...
+ \o for each descendant node that is a \c{<recipe>} element...
+ \o collect the child nodes that are \c{<title>} elements.
+\endlist
+
+Again the double slash means select all the \c{<recipe>} elements in the
+document. The single slash before the \c{<title>} element means select
+only those \c{<title>} elements that are \e{child} elements of a
+\c{<recipe>} element (i.e. not grandchildren, etc). The XQuery evaluates
+to a final result set containing the \c{<title>} element of each
+\c{<recipe>} element in the cookbook.
+
+\section2 Axis Steps
+
+The most common kind of path step is called an \e{axis step}, which
+tells the query engine which way to navigate from the context node,
+and which test to perform when it encounters nodes along the way. An
+axis step has two parts, an \e{axis specifier}, and a \e{node test}.
+Conceptually, evaluation of an axis step proceeds as follows: For each
+node in the focus set, the query engine navigates out from the node
+along the specified axis and applies the node test to each node it
+encounters. The nodes selected by the node test are collected in the
+result set, which becomes the focus set for the next step.
+
+In the example XQuery above, the second and third steps are both axis
+steps. Both apply the \c{element(name)} node test to nodes encountered
+while traversing along some axis. But in this example, the two axis
+steps are written in a \l{Shorthand Form} {shorthand form}, where the
+axis specifier and the node test are not written explicitly but are
+implied. XQueries are normally written in this shorthand form, but
+they can also be written in the longhand form. If we rewrite the
+XQuery in the longhand form, it looks like this:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 22
+
+The two axis steps have been expanded. The first step (\c{//recipe})
+has been rewritten as \c{/descendant-or-self::element(recipe)}, where
+\c{descendant-or-self::} is the axis specifier and \c{element(recipe)}
+is the node test. The second step (\c{title}) has been rewritten as
+\c{/child::element(title)}, where \c{child::} is the axis specifier
+and \c{element(title)} is the node test. The output of the expanded
+XQuery will be exactly the same as the output of the shorthand form.
+
+To create an axis step, concatenate an axis specifier and a node
+test. The following sections list the axis specifiers and node tests
+that are available.
+
+\section2 Axis Specifiers
+
+An axis specifier defines the direction you want the query engine to
+take, when it navigates away from the context node. QtXmlPatterns
+supports the following axes.
+
+\table
+\header
+ \o Axis Specifier
+ \o refers to the axis containing...
+ \row
+ \o \c{self::}
+ \o the context node itself
+ \row
+ \o \c{attribute::}
+ \o all attribute nodes of the context node
+ \row
+ \o \c{child::}
+ \o all child nodes of the context node (not attributes)
+ \row
+ \o \c{descendant::}
+ \o all descendants of the context node (children, grandchildren, etc)
+ \row
+ \o \c{descendant-or-self::}
+ \o all nodes in \c{descendant} + \c{self}
+ \row
+ \o \c{parent::}
+ \o the parent node of the context node, or empty if there is no parent
+ \row
+ \o \c{ancestor::}
+ \o all ancestors of the context node (parent, grandparent, etc)
+ \row
+ \o \c{ancestor-or-self::}
+ \o all nodes in \c{ancestor} + \c{self}
+ \row
+ \o \c{following::}
+ \o all nodes in the tree containing the context node, \e not
+ including \c{descendant}, \e and that follow the context node
+ in the document
+ \row
+ \o \c{preceding::}
+ \o all nodes in the tree contianing the context node, \e not
+ including \c{ancestor}, \e and that precede the context node in
+ the document
+ \row
+ \o \c{following-sibling::}
+ \o all children of the context node's \c{parent} that follow the
+ context node in the document
+ \row
+ \o \c{preceding-sibling::}
+ \o all children of the context node's \c{parent} that precede the
+ context node in the document
+\endtable
+
+\section2 Node Tests
+
+A node test is a conditional expression that must be true for a node
+if the node is to be selected by the axis step. The conditional
+expression can test just the \e kind of node, or it can test the \e
+kind of node and the \e name of the node. The XQuery specification for
+\l{http://www.w3.org/TR/xquery/#node-tests} {node tests} also defines
+a third condition, the node's \e {Schema Type}, but schema type tests
+are not supported in QtXmlPatterns.
+
+QtXmlPatterns supports the following node tests. The tests that have a
+\c{name} parameter test the node's name in addition to its \e{kind}
+and are often called the \l{Name Tests}.
+
+\table
+\header
+ \o Node Test
+ \o matches all...
+ \row
+ \o \c{node()}
+ \o nodes of any kind
+ \row
+ \o \c{text()}
+ \o text nodes
+ \row
+ \o \c{comment()}
+ \o comment nodes
+ \row
+ \o \c{element()}
+ \o element nodes (same as star: *)
+ \row
+ \o \c{element(name)}
+ \o element nodes named \c{name}
+ \row
+ \o \c{attribute()}
+ \o attribute nodes
+ \row
+ \o \c{attribute(name)}
+ \o attribute nodes named \c{name}
+ \row
+ \o \c{processing-instruction()}
+ \o processing-instructions
+ \row
+ \o \c{processing-instruction(name)}
+ \o processing-instructions named \c{name}
+ \row
+ \o \c{document-node()}
+ \o document nodes (there is only one)
+ \row
+ \o \c{document-node(element(name))}
+ \o document node with document element \c{name}
+\endtable
+
+\target Shorthand Form
+\section2 Shorthand Form
+
+Writing axis steps using the longhand form with axis specifiers and
+node tests is semantically clear but syntactically verbose. The
+shorthand form is easy to learn and, once you learn it, just as easy
+to read. In the shorthand form, the axis specifier and node test are
+implied by the syntax. XQueries are normally written in the shorthand
+form. Here is a table of some frequently used shorthand forms:
+
+\table
+\header
+ \o Shorthand syntax
+ \o Short for...
+ \o matches all...
+ \row
+ \o \c{name}
+ \o \c{child::element(name)}
+ \o child nodes that are \c{name} elements
+
+ \row
+ \o \c{*}
+ \o \c{child::element()}
+ \o child nodes that are elements (\c{node()} matches
+ \e all child nodes)
+
+ \row
+ \o \c{..}
+ \o \c{parent::node()}
+ \o parent nodes (there is only one)
+
+ \row
+ \o \c{@*}
+ \o \c{attribute::attribute()}
+ \o attribute nodes
+
+ \row
+ \o \c{@name}
+ \o \c{attribute::attribute(name)}
+ \o \c{name} attributes
+
+ \row
+ \o \c{//}
+ \o \c{descendant-or-self::node()}
+ \o descendent nodes (when used instead of '/')
+
+\endtable
+
+The \l{http://www.w3.org/TR/xquery/}{XQuery language specification}
+has a more detailed section on the shorthand form, which it calls the
+\l{http://www.w3.org/TR/xquery/#abbrev} {abbreviated syntax}. More
+examples of path expressions written in the shorthand form are found
+there. There is also a section listing examples of path expressions
+written in the the \l{http://www.w3.org/TR/xquery/#unabbrev} {longhand
+form}.
+
+\target Name Tests
+\section2 Name Tests
+
+The name tests are the \l{Node Tests} that have the \c{name}
+parameter. A name test must match the node \e name in addition to the
+node \e kind. We have already seen name tests used:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 19
+
+In this path expression, both \c{recipe} and \c{title} are name tests
+written in the shorthand form. XQuery resolves these names
+(\l{http://www.w3.org/TR/xquery/#id-basics}{QNames}) to their expanded
+form using whatever
+\l{http://www.w3.org/TR/xquery/#dt-namespace-declaration} {namespace
+declarations} it knows about. Resolving a name to its expanded form
+means replacing its namespace prefix, if one is present (there aren't
+any present in the example), with a namespace URI. The expanded name
+then consists of the namespace URI and the local name.
+
+But the names in the example above don't have namespace prefixes,
+because we didn't include a namespace declaration in our
+\c{cookbook.xml} file. However, we will often use XQuery to query XML
+documents that use namespaces. Forgetting to declare the correct
+namespace(s) in an XQuery is a common cause of XQuery failures. Let's
+add a \e{default} namespace to \c{cookbook.xml} now. Change the
+\e{document element} in \c{cookbook.xml} from:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 23
+
+to...
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 24
+
+This is called a \e{default namespace} declaration because it doesn't
+include a namespace prefix. By including this default namespace
+declaration in the document element, we mean that all unprefixed
+\e{element} names in the document, including the document element
+itself (\c{cookbook}), are automatically in the default namespace
+\c{http://cookbook/namespace}. Note that unprefixed \e{attribute}
+names are not affected by the default namespace declaration. They are
+always considered to be in \e{no namespace}. Note also that the URL
+we choose as our namespace URI need not refer to an actual location,
+and doesn't refer to one in this case. But click on
+\l{http://www.w3.org/XML/1998/namespace}, for example, which is the
+namespace URI for elements and attributes prefixed with \c{xml:}.
+
+Now when we try to run the previous XQuery example, no output is
+produced! The path expression no longer matches anything in the
+cookbook file because our XQuery doesn't yet know about the namespace
+declaration we added to the cookbook document. There are two ways we
+can declare the namespace in the XQuery. We can give it a \e{namespace
+prefix} (e.g. \c{c} for cookbook) and prefix each name test with the
+namespace prefix:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 3
+
+Or we can declare the namespace to be the \e{default element
+namespace}, and then we can still run the original XQuery:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 4
+
+Both methods will work and produce the same output, all the
+\c{<title>} elements:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 5
+
+But note how the output is slightly different from the output we saw
+before we added the default namespace declaration to the cookbook file.
+QtXmlPatterns automatically includes the correct namespace attribute
+in each \c{<title>} element in the output. When QtXmlPatterns loads a
+document and expands a QName, it creates an instance of QXmlName,
+which retains the namespace prefix along with the namespace URI and
+the local name. See QXmlName for further details.
+
+One thing to keep in mind from this namespace discussion, whether you
+run XQueries in a Qt program using QtXmlPatterns, or you run them from
+the command line using xmlpatterns, is that if you don't get the
+output you expect, it might be because the data you are querying uses
+namespaces, but you didn't declare those namespaces in your XQuery.
+
+\section3 Wildcards in Name Tests
+
+The wildcard \c{'*'} can be used in a name test. To find all the
+attributes in the cookbook but select only the ones in the \c{xml}
+namespace, use the \c{xml:} namespace prefix but replace the
+\e{local name} (the attribute name) with the wildcard:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 7
+
+Oops! If you save this XQuery in \c{file.xq} and run it through
+\c{xmlpatterns}, it doesn't work. You get an error message instead,
+something like this: \e{Error SENR0001 in file:///...file.xq, at line
+1, column 1: Attribute xml:id can't be serialized because it appears
+at the top level.} The XQuery actually ran correctly. It selected a
+bunch of \c{xml:id} attributes and put them in the result set. But
+then \c{xmlpatterns} sent the result set to a \l{QXmlSerializer}
+{serializer}, which tried to output it as well-formed XML. Since the
+result set contains only attributes and attributes alone are not
+well-formed XML, the \l{QXmlSerializer} {serializer} reports a
+\l{http://www.w3.org/TR/2005/WD-xslt-xquery-serialization-20050915/#id-errors}
+{serialization error}.
+
+Fear not. XQuery can do more than just find and select elements and
+attributes. It can \l{Constructing Elements} {construct new ones on
+the fly} as well, which is what we need to do here if we want
+\c{xmlpatterns} to let us see the attributes we selected. The example
+above and the ones below are revisited in the \l{Constructing
+Elements} section. You can jump ahead to see the modified examples
+now, and then come back, or you can press on from here.
+
+To find all the \c{name} attributes in the cookbook and select them
+all regardless of their namespace, replace the namespace prefix with
+the wildcard and write \c{name} (the attribute name) as the local
+name:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 8
+
+To find and select all the attributes of the \e{document element} in
+the cookbook, replace the entire name test with the wildcard:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 9
+
+\section1 Using Predicates In Path Expressions
+
+Predicates can be used to further filter the nodes selected by a path
+expression. A predicate is an expression in square brackets ('[' and
+']') that either returns a boolean value or a number. A predicate can
+appear at the end of any path step in a path expression. The predicate
+is applied to each node in the focus set. If a node passes the
+filter, the node is included in the result set. The query below
+selects the recipe element that has the \c{<title>} element
+\c{"Hard-Boiled Eggs"}.
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 10
+
+The dot expression ('.') can be used in predicates and path
+expressions to refer to the current context node. The following query
+uses the dot expression to refer to the current \c{<method>} element.
+The query selects the empty \c{<method>} elements from the cookbook.
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 11
+
+Note that passing the dot expression to the
+\l{http://www.w3.org/TR/xpath-functions/#func-string-length}
+{string-length()} function is optional. When
+\l{http://www.w3.org/TR/xpath-functions/#func-string-length}
+{string-length()} is called with no parameter, the context node is
+assumed:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 12
+
+Actually, selecting an empty \c{<method>} element might not be very
+useful by itself. It doesn't tell you which recipe has the empty
+method:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 31
+
+\target Empty Method Not Robust
+What you probably want to see instead are the \c{<recipe>} elements that
+have empty \c{<method>} elements:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 32
+
+The predicate uses the
+\l{http://www.w3.org/TR/xpath-functions/#func-string-length}
+{string-length()} function to test the length of each \c{<method>}
+element in each \c{<recipe>} element found by the node test. If a
+\c{<method>} contains no text, the predicate evaluates to \c{true} and
+the \c{<recipe>} element is selected. If the method contains some
+text, the predicate evaluates to \c{false}, and the \c{<recipe>}
+element is discarded. The output is the entire recipe that has no
+instructions for preparation:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 33
+
+The astute reader will have noticed that this use of
+\c{string-length()} to find an empty element is unreliable. It works
+in this case, because the method element is written as \c{<method/>},
+guaranteeing that its string length will be 0. It will still work if
+the method element is written as \c{<method></method>}, but it will
+fail if there is any whitespace between the opening and ending
+\c{<method>} tags. A more robust way to find the recipes with empty
+methods is presented in the section on \l{Boolean Predicates}.
+
+There are many more functions and operators defined for XQuery and
+XPath. They are all \l{http://www.w3.org/TR/xpath-functions}
+{documented here}.
+
+\section2 Positional Predicates
+
+Predicates are often used to filter items based on their position in
+a sequence. For path expressions processing items loaded from XML
+documents, the normal sequence is
+\l{http://www.w3.org/TR/xquery/#id-document-order} {document order}.
+This query returns the second \c{<recipe>} element in the
+\c{cookbook.xml} file:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 13
+
+The other frequently used positional function is
+\l{http://www.w3.org/TR/xpath-functions/#func-last} {last()}, which
+returns the numeric position of the last item in the focus set. Stated
+another way, \l{http://www.w3.org/TR/xpath-functions/#func-last}
+{last()} returns the size of the focus set. This query returns the
+last recipe in the cookbook:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 16
+
+And this query returns the next to last \c{<recipe>}:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 17
+
+\section2 Boolean Predicates
+
+The other kind of predicate evaluates to \e true or \e false. A
+boolean predicate takes the value of its expression and determines its
+\e{effective boolean value} according to the following rules:
+
+\list
+ \o An expression that evaluates to a single node is \c{true}.
+
+ \o An expression that evaluates to a string is \c{false} if the
+ string is empty and \c{true} if the string is not empty.
+
+ \o An expression that evaluates to a boolean value (i.e. type
+ \c{xs:boolean}) is that value.
+
+ \o If the expression evaluates to anything else, it's an error
+ (e.g. type \c{xs:date}).
+
+\endlist
+
+We have already seen some boolean predicates in use. Earlier, we saw
+a \e{not so robust} way to find the \l{Empty Method Not Robust}
+{recipes that have no instructions}. \c{[string-length(method) = 0]}
+is a boolean predicate that would fail in the example if the empty
+method element was written with both opening and closing tags and
+there was whitespace between the tags. Here is a more robust way that
+uses a different boolean predicate.
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 34
+
+This one uses the
+\l{http://www.w3.org/TR/xpath-functions/#func-empty} {empty()} and
+function to test whether the method contains any steps. If the method
+contains no steps, then \c{empty(step)} will return \c{true}, and
+hence the predicate will evaluate to \c{true}.
+
+But even that version isn't foolproof. Suppose the method does contain
+steps, but all the steps themselves are empty. That's still a case of
+a recipe with no instructions that won't be detected. There is a
+better way:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 35
+
+This version uses the
+\l{http://www.w3.org/TR/xpath-functions/#func-not} {not} and
+\l{http://www.w3.org/TR/xpath-functions/#func-normalize-space}
+{normalize-space()} functions. \c{normalize-space(method))} returns
+the contents of the method element as a string, but with all the
+whitespace normalized, i.e., the string value of each \c{<step>}
+element will have its whitespace normalized, and then all the
+normalized step values will be concatenated. If that string is empty,
+then \c{not()} returns \c{true} and the predicate is \c{true}.
+
+We can also use the
+\l{http://www.w3.org/TR/xpath-functions/#func-position} {position()}
+function in a comparison to inspect positions with conditional logic. The
+\l{http://www.w3.org/TR/xpath-functions/#func-position} {position()}
+function returns the position index of the current context item in the
+sequence of items:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 14
+
+Note that the first position in the sequence is position 1, not 0. We
+can also select \e{all} the recipes after the first one:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 15
+
+\target Constructing Elements
+\section1 Constructing Elements
+
+In the section about \l{Wildcards in Name Tests} {using wildcards in
+name tests}, we saw three simple example XQueries, each of which
+selected a different list of XML attributes from the cookbook. We
+couldn't use \c{xmlpatterns} to run these queries, however, because
+\c{xmlpatterns} sends the XQuery results to a \l{QXmlSerializer}
+{serializer}, which expects to serialize the results as well-formed
+XML. Since a list of XML attributes by itself is not well-formed XML,
+the serializer reported an error for each XQuery.
+
+Since an attribute must appear in an element, for each attribute in
+the result set, we must create an XML element. We can do that using a
+\l{http://www.w3.org/TR/xquery/#id-for-let} {\e{for} clause} with a
+\l{http://www.w3.org/TR/xquery/#id-variables} {bound variable}, and a
+\l{http://www.w3.org/TR/xquery/#id-orderby-return} {\e{return}
+clause} with an element constructor:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 25
+
+The \e{for} clause produces a sequence of attribute nodes from the result
+of the path expression. Each attribute node in the sequence is bound
+to the variable \c{$i}. The \e{return} clause then constructs a \c{<p>}
+element around the attribute node. Here is the output:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 28
+
+The output contains one \c{<p>} element for each \c{xml:id} attribute
+in the cookbook. Note that XQuery puts each attribute in the right
+place in its \c{<p>} element, despite the fact that in the \e{return}
+clause, the \c{$i} variable is positioned as if it is meant to become
+\c{<p>} element content.
+
+The other two examples from the \l{Wildcards in Name Tests} {wildcard}
+section can be rewritten the same way. Here is the XQuery that selects
+all the \c{name} attributes, regardless of namespace:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 26
+
+And here is its output:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 29
+
+And here is the XQuery that selects all the attributes from the
+\e{document element}:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 27
+
+And here is its output:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 30
+
+\section2 Element Constructors are Expressions
+
+Because node constructors are expressions, they can be used in
+XQueries wherever expressions are allowed.
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 40
+
+If \c{cookbook.xml} is loaded without error, a \c{<resept>} element
+(Norweigian word for recipe) is constructed for each \c{<recipe>}
+element in the cookbook, and the child nodes of the \c{<recipe>} are
+copied into the \c{<resept>} element. But if the cookbook document
+doesn't exist or does not contain well-formed XML, a single
+\c{<resept>} element is constructed containing an error message.
+
+\section1 Constructing Atomic Values
+
+XQuery also has atomic values. An atomic value is a value in the value
+space of one of the built-in datatypes in the \l
+{http://www.w3.org/TR/xmlschema-2} {XML Schema language}. These
+\e{atomic types} have built-in operators for doing arithmetic,
+comparisons, and for converting values to other atomic types. See the
+\l {http://www.w3.org/TR/xmlschema-2/#built-in-datatypes} {Built-in
+Datatype Hierarchy} for the entire tree of built-in, primitive and
+derived atomic types. \note Click on a data type in the tree for its
+detailed specification.
+
+To construct an atomic value as element content, enclose an expression
+in curly braces and embed it in the element constructor:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 36
+
+Sending this XQuery through xmlpatterns produces:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 37
+
+To compute the value of an attribute, enclose the expression in
+curly braces and embed it in the attribute value:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 38
+
+Sending this XQuery through xmlpatterns produces:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 39
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 40
+
+If \c{cookbook.xml} is loaded without error, a \c{<resept>} element
+(Norweigian word for recipe) is constructed for each \c{<recipe>}
+element in the cookbook, and the child nodes of the \c{<recipe>} are
+copied into the \c{<resept>} element. But if the cookbook document
+doesn't exist or does not contain well-formed XML, a single
+\c{<resept>} element is constructed containing an error message.
+
+\section1 Running The Cookbook Examples
+
+Most of the XQuery examples in this document refer to the cookbook
+written in XML shown below. Save it as \c{cookbook.xml}. In the same
+directory, save one of the cookbook XQuery examples in a \c{.xq} file
+(e.g. \c{file.xq}). Run the XQuery using Qt's command line utility:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 6
+
+\section2 cookbook.xml
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 100
+
+\section1 Further Reading
+
+There is much more to the XQuery language than we have presented in
+this short introduction. We will be adding more here in later
+releases. In the meantime, playing with the \c{xmlpatterns} utility
+and making modifications to the XQuery examples provided here will be
+quite informative. An XQuery textbook will be a good investment.
+
+You can also ask questions on XQuery mail lists:
+
+\list
+\o
+\l{http://lists.trolltech.com/qt-interest/}{qt-interest}
+\o
+\l{http://www.x-query.com/mailman/listinfo/talk}{talk at x-query.com}.
+\endlist
+
+\l{http://www.functx.com/functx/}{FunctX} has a collection of XQuery
+functions that can be both useful and educational.
+
+This introduction contains many links to the specifications, which, of course,
+are the ultimate source of information about XQuery. They can be a bit
+difficult, though, so consider investing in a textbook:
+
+\list
+
+ \o \l{http://www.w3.org/TR/xquery/}{XQuery 1.0: An XML Query
+ Language} - the main source for syntax and semantics.
+
+ \o \l{http://www.w3.org/TR/xpath-functions/}{XQuery 1.0 and XPath
+ 2.0 Functions and Operators} - the builtin functions and operators.
+
+\endlist
+
+\section1 FAQ
+
+The answers to these frequently asked questions explain the causes of
+several common mistakes that most beginners make. Reading through the
+answers ahead of time might save you a lot of head scratching.
+
+\section2 Why didn't my path expression match anything?
+
+The most common cause of this bug is failure to declare one or more
+namespaces in your XQuery. Consider the following query for selecting
+all the examples in an XHTML document:
+
+\quotefile snippets/patternist/simpleHTML.xq
+
+It won't match anything because \c{index.html} is an XHTML file, and
+all XHTML files declare the default namespace
+\c{"http://www.w3.org/1999/xhtml"} in their top (\c{<html>}) element.
+But the query doesn't declare this namespace, so the path expression
+expands \c{html} to \c{{}html} and tries to match that expanded name.
+But the actual expanded name is
+\c{{http://www.w3.org/1999/xhtml}html}. One possible fix is to declare the
+correct default namespace in the XQuery:
+
+\quotefile snippets/patternist/simpleXHTML.xq
+
+Another common cause of this bug is to confuse the \e{document node}
+with the top element node. They are different. This query won't match
+anything:
+
+\quotefile snippets/patternist/docPlainHTML.xq
+
+The \c{doc()} function returns the \e{document node}, not the top
+element node (\c{<html>}). Don't forget to match the top element node
+in the path expression:
+
+\quotefile snippets/patternist/docPlainHTML2.xq
+
+\section2 What if my input namespace is different from my output namespace?
+
+Just remember to declare both namespaces in your XQuery and use them
+properly. Consider the following query, which is meant to generate
+XHTML output from XML input:
+
+\quotefile snippets/patternist/embedDataInXHTML.xq
+
+We want the \c{<html>}, \c{<body>}, and \c{<p>} nodes we create in the
+output to be in the standard XHTML namespace, so we declare the
+default namespace to be \c{http://www.w3.org/1999/xhtml}. That's
+correct for the output, but that same default namespace will also be
+applied to the node names in the path expression we're trying to match
+in the input (\c{/tests/test[@status = "failure"]}), which is wrong,
+because the namespace used in \c{testResult.xml} is perhaps in the
+empty namespace. So we must declare that namespace too, with a
+namespace prefix, and then use the prefix with the node names in
+the path expression. This one will probably work better:
+
+\quotefile snippets/patternist/embedDataInXHTML2.xq
+
+\section2 Why doesn't my return clause work?
+
+Recall that XQuery is an \e{expression-based} language, not
+\e{statement-based}. Because an XQuery is a lot of expressions,
+understanding XQuery expression precedence is very important.
+Consider the following query:
+
+\quotefile snippets/patternist/forClause2.xq
+
+It looks ok, but it isn't. It is supposed to be a FLWOR expression
+comprising a \e{for} clause and a \e{return} clause, but it isn't just
+that. It \e{has} a FLWOR expression, certainly (with the \e{for} and
+\e{return} clauses), but it \e{also} has an arithmetic expression
+(\e{+ $d}) dangling at the end because we didn't enclose the return
+expression in parentheses.
+
+Using parentheses to establish precedence is more important in XQuery
+than in other languages, because XQuery is \e{expression-based}. In
+In this case, without parantheses enclosing \c{$i + $d}, the return
+clause only returns \c{$i}. The \c{+$d} will have the result of the
+FLWOR expression as its left operand. And, since the scope of variable
+\c{$d} ends at the end of the \e{return} clause, a variable out of
+scope error will be reported. Correct these problems by using
+parentheses.
+
+\quotefile snippets/patternist/forClause.xq
+
+\section2 Why didn't my expression get evaluated?
+
+You probably misplaced some curly braces. When you want an expression
+evaluated inside an element constructor, enclose the expression in
+curly braces. Without the curly braces, the expression will be
+interpreted as text. Here is a \c{sum()} expression used in an \c{<e>}
+element. The table shows cases where the curly braces are missing,
+misplaced, and placed correctly:
+
+\table
+\header
+ \o element constructor with expression...
+ \o evaluates to...
+ \row
+ \o <e>sum((1, 2, 3))</e>
+ \o <e>sum((1, 2, 3))</e>
+ \row
+ \o <e>sum({(1, 2, 3)})</e>
+ \o <e>sum(1 2 3)</e>
+ \row
+ \o <e>{sum((1, 2, 3))}</e>
+ \o <e>6</e>
+\endtable
+
+\section2 My predicate is correct, so why doesn't it select the right stuff?
+
+Either you put your predicate in the wrong place in your path
+expression, or you forgot to add some parentheses. Consider this
+input file \c{doc.txt}:
+
+\quotefile snippets/patternist/doc.txt
+
+Suppose you want the first \c{<span>} element of every \c{<p>}
+element. Apply a position filter (\c{[1]}) to the \c{/span} path step:
+
+\quotefile snippets/patternist/filterOnStep.xq
+
+Applying the \c{[1]} filter to the \c{/span} step returns the first
+\c{<span>} element of each \c{<p>} element:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 41
+
+\note: You can write the same query this way:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 44
+
+Or you can reduce it right down to this:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 45
+
+On the other hand, suppose you really want only one \c{<span>}
+element, the first one in the document (i.e., you only want the first
+\c{<span>} element in the first \c{<p>} element). Then you have to do
+more filtering. There are two ways you can do it. You can apply the
+\c{[1]} filter in the same place as above but enclose the path
+expression in parentheses:
+
+\quotefile snippets/patternist/filterOnPath.xq
+
+Or you can apply a second position filter (\c{[1]} again) to the
+\c{/p} path step:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 43
+
+Either way the query will return only the first \c{<span>} element in
+the document:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 42
+
+\section2 Why doesn't my FLWOR behave as expected?
+
+The quick answer is you probably expected your XQuery FLWOR to behave
+just like a C++ \e{for} loop. But they aren't the same. Consider a
+simple example:
+
+\quotefile snippets/patternist/letOrderBy.xq
+
+This query evaluates to \e{4 -4 -2 2 -8 8}. The \e{for} clause does
+set up a \e{for} loop style iteration, which does evaluate the rest of
+the FLWOR multiple times, one time for each value returned by the
+\e{in} expression. That much is similar to the C++ \e{for} loop.
+
+But consider the \e{return} clause. In C++ if you hit a \e{return}
+statement, you break out of the \e{for} loop and return from the
+function with one value. Not so in XQuery. The \e{return} clause is
+the last clause of the FLWOR, and it means: \e{Append the return value
+to the result list and then begin the next iteration of the FLWOR}.
+When the \e{for} clause's \e{in} expression no longer returns a value,
+the entire result list is returned.
+
+Next, consider the \e{order by} clause. It doesn't do any sorting on
+each iteration of the FLWOR. It just evaluates its expression on each
+iteration (\c{$a} in this case) to get an ordering value to map to the
+result item from each iteration. These ordering values are kept in a
+parallel list. The result list is sorted at the end using the parallel
+list of ordering values.
+
+The last difference to note here is that the \e{let} clause does
+\e{not} set up an iteration through a sequence of values like the
+\e{for} clause does. The \e{let} clause isn't a sort of nested loop.
+It isn't a loop at all. It is just a variable binding. On each
+iteration, it binds the \e{entire} sequence of values on the right to
+the variable on the left. In the example above, it binds (4 -4) to
+\c{$b} on the first iteration, (-2 2) on the second iteration, and (-8
+8) on the third iteration. So the following query doesn't iterate
+through anything, and doesn't do any ordering:
+
+\quotefile snippets/patternist/invalidLetOrderBy.xq
+
+It binds the entire sequence (2, 3, 1) to \c{$i} one time only; the
+\e{order by} clause only has one thing to order and hence does
+nothing, and the query evaluates to 2 3 1, the sequence assigned to
+\c{$i}.
+
+\note We didn't include a \e{where} clause in the example. The
+\e{where} clause is for filtering results.
+
+\section2 Why are my elements created in the wrong order?
+
+The short answer is your elements are \e{not} created in the wrong
+order, because when appearing as operands to a path expression,
+there is no correct order. Consider the following query,
+which again uses the input file \c{doc.txt}:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 46
+
+The query finds all the \c{<p>} elements in the file. For each \c{<p>}
+element, it builds a \c{<p>} element in the output containing the
+concatenated contents of all the \c{<p>} element's child \c{<span>}
+elements. Running the query through \c{xmlpatterns} might produce the
+following output, which is not sorted in the expected order.
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 47
+
+You can use a \e{for} loop to ensure that the order of
+the result set corresponds to the order of the input sequence:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 48
+
+This version produces the same result set but in the expected order:
+
+\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 49
+
+\section2 Why can't I use \c{true} and \c{false} in my XQuery?
+
+You can, but not by just using the names \c{true} and \c{false}
+directly, because they are \l{Name Tests} {name tests} although they look
+like boolean constants. The simple way to create the boolean values is
+to use the builtin functions \c{true()} and \c{false()} wherever
+you want to use \c{true} and \c{false}. The other way is to invoke the
+boolean constructor:
+
+\quotefile snippets/patternist/xsBooleanTrue.xq
+
+*/
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..10e14ce
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,39 @@
+Qt is supplied with a number of example applications and demonstrations that
+have been written to provide developers with examples of the Qt API in use,
+highlight good programming practice, and showcase features found in each of
+Qt's core technologies.
+
+The example and demo launcher can be used to explore the different categories
+available. It provides an overview of each example, lets you view the
+documentation in Qt Assistant, and is able to launch examples and demos.
+
+Documentation for examples can be found in the Tutorials and Examples section
+of the Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/activeqt/README b/examples/activeqt/README
new file mode 100644
index 0000000..24be2de
--- /dev/null
+++ b/examples/activeqt/README
@@ -0,0 +1,39 @@
+Qt is supplied with a number of example applications and demonstrations that
+have been written to provide developers with examples of the Qt API in use,
+highlight good programming practice, and showcase features found in each of
+Qt's core technologies.
+
+The example and demo launcher can be used to explore the different categories
+available. It provides an overview of each example, lets you view the
+documentation in Qt Assistant, and is able to launch examples and demos.
+
+Documentation for examples can be found in the Tutorial and Examples section
+of the Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro
new file mode 100644
index 0000000..262e1a1
--- /dev/null
+++ b/examples/activeqt/activeqt.pro
@@ -0,0 +1,20 @@
+TEMPLATE = subdirs
+SUBDIRS += comapp \
+ hierarchy \
+ menus \
+ multiple \
+ simple \
+ webbrowser \
+ wrapper
+
+contains(QT_CONFIG, opengl):SUBDIRS += opengl
+
+# For now only the contain examples with mingw, for the others you need
+# an IDL compiler
+win32-g++|wince*:SUBDIRS = webbrowser
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS activeqt.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt
+INSTALLS += target sources
diff --git a/examples/activeqt/comapp/comapp.pro b/examples/activeqt/comapp/comapp.pro
new file mode 100644
index 0000000..84ce072
--- /dev/null
+++ b/examples/activeqt/comapp/comapp.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+CONFIG += qaxserver
+
+# Input
+SOURCES += main.cpp
+
+RC_FILE = comapp.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS comapp.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
+INSTALLS += target sources
diff --git a/examples/activeqt/comapp/comapp.rc b/examples/activeqt/comapp/comapp.rc
new file mode 100644
index 0000000..24e339a
--- /dev/null
+++ b/examples/activeqt/comapp/comapp.rc
@@ -0,0 +1 @@
+1 TYPELIB "comapp.rc"
diff --git a/examples/activeqt/comapp/main.cpp b/examples/activeqt/comapp/main.cpp
new file mode 100644
index 0000000..95caaa3
--- /dev/null
+++ b/examples/activeqt/comapp/main.cpp
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QAxFactory>
+#include <QTabWidget>
+#include <QTimer>
+
+class Application;
+class DocumentList;
+
+//! [0]
+class Document : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{2b5775cd-72c2-43da-bc3b-b0e8d1e1c4f7}")
+ Q_CLASSINFO("InterfaceID", "{2ce1761e-07a3-415c-bd11-0eab2c7283de}")
+
+ Q_PROPERTY(Application *application READ application)
+ Q_PROPERTY(QString title READ title WRITE setTitle)
+
+public:
+ Document(DocumentList *list);
+ ~Document();
+
+ Application *application() const;
+
+ QString title() const;
+ void setTitle(const QString &title);
+
+private:
+ QWidget *page;
+};
+//! [0]
+
+//! [1]
+class DocumentList : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{496b761d-924b-4554-a18a-8f3704d2a9a6}")
+ Q_CLASSINFO("InterfaceID", "{6c9e30e8-3ff6-4e6a-9edc-d219d074a148}")
+
+ Q_PROPERTY(Application* application READ application)
+ Q_PROPERTY(int count READ count)
+
+public:
+ DocumentList(Application *application);
+
+ int count() const;
+ Application *application() const;
+
+public slots:
+ Document *addDocument();
+ Document *item(int index) const;
+
+private:
+ QList<Document*> list;
+};
+//! [1]
+
+//! [2]
+class Application : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{b50a71db-c4a7-4551-8d14-49983566afee}")
+ Q_CLASSINFO("InterfaceID", "{4a427759-16ef-4ed8-be79-59ffe5789042}")
+ Q_CLASSINFO("RegisterObject", "yes")
+
+ Q_PROPERTY(DocumentList* documents READ documents)
+ Q_PROPERTY(QString id READ id)
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible)
+
+public:
+ Application(QObject *parent = 0);
+ DocumentList *documents() const;
+
+ QString id() const { return objectName(); }
+
+ void setVisible(bool on);
+ bool isVisible() const;
+
+ QTabWidget *window() const { return ui; }
+
+public slots:
+ void quit();
+
+private:
+ DocumentList *docs;
+
+ QTabWidget *ui;
+};
+//! [2]
+
+//! [3]
+Document::Document(DocumentList *list)
+: QObject(list)
+{
+ QTabWidget *tabs = list->application()->window();
+ page = new QWidget(tabs);
+ page->setWindowTitle("Unnamed");
+ tabs->addTab(page, page->windowTitle());
+
+ page->show();
+}
+
+Document::~Document()
+{
+ delete page;
+}
+
+Application *Document::application() const
+{
+ return qobject_cast<DocumentList*>(parent())->application();
+}
+
+QString Document::title() const
+{
+ return page->windowTitle();
+}
+
+void Document::setTitle(const QString &t)
+{
+ page->setWindowTitle(t);
+
+ QTabWidget *tabs = application()->window();
+ int index = tabs->indexOf(page);
+ tabs->setTabText(index, page->windowTitle());
+}
+
+//! [3] //! [4]
+DocumentList::DocumentList(Application *application)
+: QObject(application)
+{
+}
+
+Application *DocumentList::application() const
+{
+ return qobject_cast<Application*>(parent());
+}
+
+int DocumentList::count() const
+{
+ return list.count();
+}
+
+Document *DocumentList::item(int index) const
+{
+ if (index >= list.count())
+ return 0;
+
+ return list.at(index);
+}
+
+Document *DocumentList::addDocument()
+{
+ Document *document = new Document(this);
+ list.append(document);
+
+ return document;
+}
+
+
+//! [4] //! [5]
+Application::Application(QObject *parent)
+: QObject(parent), ui(0)
+{
+ ui = new QTabWidget;
+
+ setObjectName("From QAxFactory");
+ docs = new DocumentList(this);
+}
+
+DocumentList *Application::documents() const
+{
+ return docs;
+}
+
+void Application::setVisible(bool on)
+{
+ ui->setShown(on);
+}
+
+bool Application::isVisible() const
+{
+ return ui->isVisible();
+}
+
+void Application::quit()
+{
+ delete docs;
+ docs = 0;
+
+ delete ui;
+ ui = 0;
+ QTimer::singleShot(0, qApp, SLOT(quit()));
+}
+
+#include "main.moc"
+//! [5] //! [6]
+
+
+QAXFACTORY_BEGIN("{edd3e836-f537-4c6f-be7d-6014c155cc7a}", "{b7da3de8-83bb-4bbe-9ab7-99a05819e201}")
+ QAXCLASS(Application)
+ QAXTYPE(Document)
+ QAXTYPE(DocumentList)
+QAXFACTORY_END()
+
+//! [6] //! [7]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ app.setQuitOnLastWindowClosed(false);
+
+ // started by COM - don't do anything
+ if (QAxFactory::isServer())
+ return app.exec();
+
+ // started by user
+ Application appobject(0);
+ appobject.setObjectName("From Application");
+
+ QAxFactory::startServer();
+ QAxFactory::registerActiveObject(&appobject);
+
+ appobject.setVisible(true);
+
+ QObject::connect(qApp, SIGNAL(lastWindowClosed()), &appobject, SLOT(quit()));
+
+ return app.exec();
+}
+//! [7]
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.cs b/examples/activeqt/dotnet/walkthrough/Form1.cs
new file mode 100644
index 0000000..9fb572a
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+namespace csharp
+{
+ /// <summary>
+ /// Summary description for Form1.
+ /// </summary>
+ public class Form1 : System.Windows.Forms.Form
+ {
+ private AxwrapperaxLib.AxQPushButton resetButton;
+ private AxmultipleaxLib.AxQAxWidget2 circleWidget;
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.Container components = null;
+
+ public Form1()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
+
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+
+ #region Windows Form Designer generated code
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
+ this.resetButton = new AxwrapperaxLib.AxQPushButton();
+ this.circleWidget = new AxmultipleaxLib.AxQAxWidget2();
+ ((System.ComponentModel.ISupportInitialize)(this.resetButton)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.circleWidget)).BeginInit();
+ this.SuspendLayout();
+ //
+ // resetButton
+ //
+ this.resetButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
+ this.resetButton.Enabled = true;
+ this.resetButton.Location = new System.Drawing.Point(160, 296);
+ this.resetButton.Name = "resetButton";
+ this.resetButton.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("resetButton.OcxState")));
+ this.resetButton.Size = new System.Drawing.Size(168, 32);
+ this.resetButton.TabIndex = 1;
+ this.resetButton.clicked += new System.EventHandler(this.resetLineWidth);
+ //
+ // circleWidget
+ //
+ this.circleWidget.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right);
+ this.circleWidget.Enabled = true;
+ this.circleWidget.Location = new System.Drawing.Point(8, 8);
+ this.circleWidget.Name = "circleWidget";
+ this.circleWidget.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("circleWidget.OcxState")));
+ this.circleWidget.Size = new System.Drawing.Size(320, 264);
+ this.circleWidget.TabIndex = 2;
+ this.circleWidget.ClickEvent += new System.EventHandler(this.circleClicked);
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(336, 333);
+ this.Controls.AddRange(new System.Windows.Forms.Control[] {
+ this.circleWidget,
+ this.resetButton});
+ this.Name = "Form1";
+ this.Text = "Form1";
+ ((System.ComponentModel.ISupportInitialize)(this.resetButton)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.circleWidget)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+ #endregion
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+//! [0]
+ private void circleClicked(object sender, System.EventArgs e)
+ {
+ this.circleWidget.lineWidth++;
+ }
+//! [0]
+
+//! [1]
+ private void resetLineWidth(object sender, System.EventArgs e)
+ {
+ this.circleWidget.lineWidth = 1;
+ this.resetButton.setFocus();
+ }
+//! [1]
+ }
+}
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.resx b/examples/activeqt/dotnet/walkthrough/Form1.resx
new file mode 100644
index 0000000..6353f82
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.resx
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 1.3
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">1.3</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1">this is my long string</data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ [base64 mime encoded serialized .NET Framework object]
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ [base64 mime encoded string representing a byte array form of the .NET Framework object]
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>1.3</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="resetButton.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
+ MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFT
+ eXN0ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAGwMA
+ AAIBAAAAAQAAAAAAAAAAAAAAAAYDAAAAAAAFAAAACGVuYWJsZWQAAAAAEgEAAAACeAAAAAAQAAAAAAAA
+ AAJ5AAAAABAAAAAAAAAABndpZHRoAAAAABAAAACoAAAAB2hlaWdodAAAAAAQAAAAGgAAAA1taW5pbXVt
+ V2lkdGgAAAAAEAAAAAAAAAAObWluaW11bUhlaWdodAAAAAAQAAAAAAAAAA1tYXhpbXVtV2lkdGgAAAAA
+ EAAAf/8AAAAObWF4aW11bUhlaWdodAAAAAAQAAB//wAAAA9iYWNrZ3JvdW5kTW9kZQAAAAAQAAAABAAA
+ ABdwYWxldHRlRm9yZWdyb3VuZENvbG9yAAAAAAr/AAAAAAAAF3BhbGV0dGVCYWNrZ3JvdW5kQ29sb3IA
+ AAAACv/U0MgAAAARYmFja2dyb3VuZE9yaWdpbgAAAAAQAAAAAAAAAAVmb250AAAAAAUAAAAYAE0AUwAg
+ AFMAaABlAGwAbAAgAEQAbABnAFP//wUBADIAAAAACGNhcHRpb24AAAAAA/////8AAAAJaWNvblRleHQA
+ AAAAA/////8AAAAObW91c2VUcmFja2luZwAAAAASAAAAAAxmb2N1c1BvbGljeQAAAAAQAAAAAQAAAA91
+ cGRhdGVzRW5hYmxlZAAAAAASAQAAAAptYXhpbWl6ZWQAAAAAEgAAAAALZnVsbFNjcmVlbgAAAAASAAAA
+ AAxhY2NlcHREcm9wcwAAAAASAAAAABNpbnB1dE1ldGhvZEVuYWJsZWQAAAAAEgAAAAAFdGV4dAAAAAAD
+ AAAADAAmAFIAZQBzAGUAdAAAAAt0b2dnbGVUeXBlAAAAABAAAAAAAAAABWRvd24AAAAAEgAAAAAMdG9n
+ Z2xlU3RhdGUAAAAAEAAAAAAAAAALYXV0b1Jlc2l6ZQAAAAASAAAAAAthdXRvUmVwZWF0AAAAABIAAAAA
+ EGV4Y2x1c2l2ZVRvZ2dsZQAAAAASAAAAAAxhdXRvRGVmYXVsdAAAAAASAQAAAAttZW51QnV0dG9uAAAA
+ ABIAAAAABWZsYXQAAAAAEgAL
+</value>
+ </data>
+ <data name="circleWidget.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
+ MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFT
+ eXN0ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAALwAA
+ AAIBAAAAAQAAAAAAAAAAAAAAABoAAAAAAAAFAAAACmxpbmVXaWR0aAAAAAAQAAAAAAs=
+</value>
+ </data>
+ <data name="$this.Name">
+ <value>Form1</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.vb b/examples/activeqt/dotnet/walkthrough/Form1.vb
new file mode 100644
index 0000000..f5f241b
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.vb
@@ -0,0 +1,88 @@
+Public Class Form1
+ Inherits System.Windows.Forms.Form
+
+#Region " Windows Form Designer generated code "
+
+ Public Sub New()
+ MyBase.New()
+
+ 'This call is required by the Windows Form Designer.
+ InitializeComponent()
+
+ 'Add any initialization after the InitializeComponent() call
+
+ End Sub
+
+ 'Form overrides dispose to clean up the component list.
+ Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing Then
+ If Not (components Is Nothing) Then
+ components.Dispose()
+ End If
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+ Friend WithEvents circleWidget As AxmultipleaxLib.AxQAxWidget2
+ Friend WithEvents resetButton As AxwrapperaxLib.AxQPushButton
+ <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
+ Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
+ Me.circleWidget = New AxmultipleaxLib.AxQAxWidget2()
+ Me.resetButton = New AxwrapperaxLib.AxQPushButton()
+ CType(Me.circleWidget, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.resetButton, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'circleWidget
+ '
+ Me.circleWidget.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
+ Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right)
+ Me.circleWidget.Enabled = True
+ Me.circleWidget.Location = New System.Drawing.Point(8, 8)
+ Me.circleWidget.Name = "circleWidget"
+ Me.circleWidget.OcxState = CType(resources.GetObject("circleWidget.OcxState"), System.Windows.Forms.AxHost.State)
+ Me.circleWidget.Size = New System.Drawing.Size(280, 216)
+ Me.circleWidget.TabIndex = 0
+ '
+ 'resetButton
+ '
+ Me.resetButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
+ ' VB is case insensitive, but our C++ controls are not.
+ ' Me.resetButton.enabled = True
+ Me.resetButton.Location = New System.Drawing.Point(184, 240)
+ Me.resetButton.Name = "resetButton"
+ Me.resetButton.OcxState = CType(resources.GetObject("resetButton.OcxState"), System.Windows.Forms.AxHost.State)
+ Me.resetButton.Size = New System.Drawing.Size(104, 24)
+ Me.resetButton.TabIndex = 1
+ '
+ 'Form1
+ '
+ Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
+ Me.ClientSize = New System.Drawing.Size(292, 273)
+ Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.resetButton, Me.circleWidget})
+ Me.Name = "Form1"
+ Me.Text = "Form1"
+ CType(Me.circleWidget, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.resetButton, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+
+ End Sub
+
+#End Region
+
+ Private Sub circleWidget_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles circleWidget.ClickEvent
+ Me.circleWidget.lineWidth = Me.circleWidget.lineWidth + 1
+ End Sub
+
+ Private Sub resetButton_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles resetButton.clicked
+ Me.circleWidget.lineWidth = 1
+ Me.resetButton.setFocus()
+ End Sub
+End Class
diff --git a/examples/activeqt/dotnet/walkthrough/csharp.csproj b/examples/activeqt/dotnet/walkthrough/csharp.csproj
new file mode 100644
index 0000000..4c5502b
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/csharp.csproj
@@ -0,0 +1,143 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{F15600FD-7677-4C01-B98A-6776CE500617}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "csharp"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "WinExe"
+ RootNamespace = "csharp"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
+ />
+ <Reference
+ Name = "System.Drawing"
+ AssemblyName = "System.Drawing"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll"
+ />
+ <Reference
+ Name = "System.Windows.Forms"
+ AssemblyName = "System.Windows.Forms"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
+ />
+ <Reference
+ Name = "stdole"
+ Guid = "{00020430-0000-0000-C000-000000000046}"
+ VersionMajor = "2"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "primary"
+ />
+ <Reference
+ Name = "wrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxwrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ <Reference
+ Name = "multipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxmultipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Form1.cs"
+ SubType = "Form"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Form1.resx"
+ DependentUpon = "Form1.cs"
+ BuildAction = "EmbeddedResource"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/walkthrough/vb.vbproj b/examples/activeqt/dotnet/walkthrough/vb.vbproj
new file mode 100644
index 0000000..eb0a9d6
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/vb.vbproj
@@ -0,0 +1,147 @@
+<VisualStudioProject>
+ <VisualBasic
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{BFF242A6-967C-4F73-BEBE-DED2D9C395C6}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "vb"
+ AssemblyOriginatorKeyFile = ""
+ AssemblyOriginatorKeyMode = "None"
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "WinExe"
+ OptionCompare = "Binary"
+ OptionExplicit = "On"
+ OptionStrict = "Off"
+ RootNamespace = "vb"
+ StartupObject = "vb.Form1"
+ >
+ <Config
+ Name = "Debug"
+ BaseAddress = "285212672"
+ ConfigurationOverrideFile = ""
+ DefineConstants = ""
+ DefineDebug = "true"
+ DefineTrace = "true"
+ DebugSymbols = "true"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "1"
+ />
+ <Config
+ Name = "Release"
+ BaseAddress = "285212672"
+ ConfigurationOverrideFile = ""
+ DefineConstants = ""
+ DefineDebug = "false"
+ DefineTrace = "true"
+ DebugSymbols = "false"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "1"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ />
+ <Reference
+ Name = "System.Drawing"
+ AssemblyName = "System.Drawing"
+ />
+ <Reference
+ Name = "System.Windows.Forms"
+ AssemblyName = "System.Windows.Forms"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ />
+ <Reference
+ Name = "stdole"
+ Guid = "{00020430-0000-0000-C000-000000000046}"
+ VersionMajor = "2"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "primary"
+ />
+ <Reference
+ Name = "wrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "multipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxwrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ <Reference
+ Name = "AxmultipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ </References>
+ <Imports>
+ <Import Namespace = "Microsoft.VisualBasic" />
+ <Import Namespace = "System" />
+ <Import Namespace = "System.Collections" />
+ <Import Namespace = "System.Data" />
+ <Import Namespace = "System.Drawing" />
+ <Import Namespace = "System.Diagnostics" />
+ <Import Namespace = "System.Windows.Forms" />
+ </Imports>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Form1.vb"
+ SubType = "Form"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Form1.resx"
+ DependentUpon = "Form1.vb"
+ BuildAction = "EmbeddedResource"
+ />
+ </Include>
+ </Files>
+ </VisualBasic>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/wrapper/app.csproj b/examples/activeqt/dotnet/wrapper/app.csproj
new file mode 100644
index 0000000..dce4bf0
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/app.csproj
@@ -0,0 +1,93 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{334C8F04-E034-4082-9380-43906DDE71AB}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "wrapper"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ RootNamespace = "wrapper"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
+ />
+ <Reference
+ Name = "lib"
+ AssemblyName = "lib"
+ HintPath = "lib\lib.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "main.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/wrapper/lib/lib.vcproj b/examples/activeqt/dotnet/wrapper/lib/lib.vcproj
new file mode 100644
index 0000000..f49c35d
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/lib.vcproj
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="lib"
+ ProjectGUID="{2E94A303-45A2-47AC-B87A-7C3519E9D6D8}"
+ Keyword="ManagedCProj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2"
+ ManagedExtensions="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG"
+ IgnoreStandardIncludePath="FALSE"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="QtCored4.lib"
+ OutputFile="lib.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(QTDIR)/lib"
+ GenerateDebugInformation="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2"
+ ManagedExtensions="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG"
+ MinimalRebuild="FALSE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="QtCore4.lib"
+ OutputFile="$(OutDir)/lib.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(QTDIR)/lib"
+ GenerateDebugInformation="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+ <File
+ RelativePath="networker.cpp">
+ </File>
+ <File
+ RelativePath="tools.cpp">
+ </File>
+ <File
+ RelativePath="worker.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc">
+ <File
+ RelativePath="networker.h">
+ </File>
+ <File
+ RelativePath="tools.h">
+ </File>
+ <File
+ RelativePath="worker.h">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc.exe $(InputName).h -o moc_$(InputName).cpp"
+ Outputs="moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc.exe $(InputName).h -o moc_$(InputName).cpp"
+ Outputs="moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated MOC"
+ Filter="">
+ <File
+ RelativePath="moc_worker.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.cpp b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
new file mode 100644
index 0000000..54e862b
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "networker.h"
+#include "worker.h"
+#include "tools.h"
+
+netWorker::netWorker()
+{
+ workerObject = new Worker();
+}
+//! [0] //! [1]
+
+netWorker::~netWorker()
+{
+ delete workerObject;
+}
+//! [1] //! [2]
+
+String *netWorker::get_StatusString()
+{
+ return QStringToString(workerObject->statusString());
+}
+//! [2] //! [3]
+
+void netWorker::set_StatusString(String *string)
+{
+ workerObject->setStatusString(StringToQString(string));
+ __raise statusStringChanged(string);
+}
+//! [3]
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.h b/examples/activeqt/dotnet/wrapper/lib/networker.h
new file mode 100644
index 0000000..583c6c4
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// lib.h
+
+#pragma once
+
+#using <mscorlib.dll>
+using namespace System;
+
+//! [0]
+class Worker;
+
+// .NET class
+public __gc class netWorker
+{
+public:
+ netWorker();
+ ~netWorker();
+
+ __property String *get_StatusString();
+ __property void set_StatusString(String *string);
+
+ __event void statusStringChanged(String *args);
+
+private:
+ Worker *workerObject;
+};
+//! [0]
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.cpp b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
new file mode 100644
index 0000000..aa67aea
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QString>
+
+#using <mscorlib.dll>
+#include <vcclr.h>
+
+using namespace System;
+
+String *QStringToString(const QString &qstring)
+{
+ return new String((const wchar_t *)qstring.utf16());
+}
+//! [0] //! [1]
+
+QString StringToQString(String *string)
+{
+ const wchar_t __pin *chars = PtrToStringChars(string);
+ return QString::fromUtf16((const ushort *)chars);
+}
+//! [1]
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.h b/examples/activeqt/dotnet/wrapper/lib/tools.h
new file mode 100644
index 0000000..8569eca
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOOLS_H
+#define TOOLS_H
+
+#using <mscorlib.dll>
+
+QT_BEGIN_NAMESPACE
+class QString;
+QT_END_NAMESPACE
+
+System::String *QStringToString(const QString &qstring);
+QString StringToQString(System::String *string);
+
+#endif // TOOLS_H
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.cpp b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
new file mode 100644
index 0000000..695db57
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "worker.h"
+#include "tools.h"
+
+Worker::Worker()
+{
+ status = "Idle";
+}
+
+void Worker::setStatusString(const QString &string)
+{
+ status = string;
+ emit statusStringChanged(status);
+}
+
+QString Worker::statusString() const
+{
+ return status;
+}
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.h b/examples/activeqt/dotnet/wrapper/lib/worker.h
new file mode 100644
index 0000000..8bab9ed
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORKER_H
+#define WORKER_H
+
+#include <QObject>
+
+// native Qt/C++ class
+//! [0]
+class Worker : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString statusString READ statusString WRITE setStatusString)
+public:
+ Worker();
+
+ QString statusString() const;
+
+public slots:
+ void setStatusString(const QString &string);
+
+signals:
+ void statusStringChanged(const QString &string);
+
+private:
+ QString status;
+};
+//! [0]
+
+#endif // WORKER_H
diff --git a/examples/activeqt/dotnet/wrapper/main.cs b/examples/activeqt/dotnet/wrapper/main.cs
new file mode 100644
index 0000000..1d43029
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/main.cs
@@ -0,0 +1,40 @@
+//! [0]
+using System;
+
+namespace WrapperApp
+{
+ class App
+ {
+ void Run()
+ {
+ netWorker worker = new netWorker();
+
+ worker.statusStringChanged += new netWorker.__Delegate_statusStringChanged(onStatusStringChanged);
+
+ System.Console.Out.WriteLine(worker.StatusString);
+
+ System.Console.Out.WriteLine("Working cycle begins...");
+ worker.StatusString = "Working";
+ worker.StatusString = "Lunch Break";
+ worker.StatusString = "Working";
+ worker.StatusString = "Idle";
+ System.Console.Out.WriteLine("Working cycle ends...");
+ }
+
+ private void onStatusStringChanged(string str)
+ {
+ System.Console.Out.WriteLine(str);
+ }
+
+ [STAThread]
+//! [0] //! [1]
+ static void Main(string[] args)
+ {
+ App app = new App();
+ app.Run();
+ }
+//! [1] //! [2]
+ }
+//! [2] //! [3]
+}
+//! [3]
diff --git a/examples/activeqt/dotnet/wrapper/wrapper.sln b/examples/activeqt/dotnet/wrapper/wrapper.sln
new file mode 100644
index 0000000..e25e6bd
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/wrapper.sln
@@ -0,0 +1,28 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "app", "app.csproj", "{334C8F04-E034-4082-9380-43906DDE71AB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib", "lib\lib.vcproj", "{2E94A303-45A2-47AC-B87A-7C3519E9D6D8}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ {334C8F04-E034-4082-9380-43906DDE71AB}.0 = {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Debug.ActiveCfg = Debug|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Debug.Build.0 = Debug|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Release.ActiveCfg = Release|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Release.Build.0 = Release|.NET
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Debug.ActiveCfg = Debug|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Debug.Build.0 = Debug|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Release.ActiveCfg = Release|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/examples/activeqt/hierarchy/hierarchy.inf b/examples/activeqt/hierarchy/hierarchy.inf
new file mode 100644
index 0000000..cb7e90f
--- /dev/null
+++ b/examples/activeqt/hierarchy/hierarchy.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ hierarchyax.dll=hierarchyax.dll
+ [hierarchyax.dll]
+ file-win32-x86=thiscab
+ clsid={d574a747-8016-46db-a07c-b2b4854ee75c}
+ RegisterServer=yes
diff --git a/examples/activeqt/hierarchy/hierarchy.pro b/examples/activeqt/hierarchy/hierarchy.pro
new file mode 100644
index 0000000..abe5f1b
--- /dev/null
+++ b/examples/activeqt/hierarchy/hierarchy.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+TARGET = hierarchyax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = objects.cpp main.cpp
+HEADERS = objects.h
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hierarchy.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
+INSTALLS += target sources
diff --git a/examples/activeqt/hierarchy/main.cpp b/examples/activeqt/hierarchy/main.cpp
new file mode 100644
index 0000000..e817635
--- /dev/null
+++ b/examples/activeqt/hierarchy/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "objects.h"
+#include <QAxFactory>
+
+QAXFACTORY_BEGIN("{9e626211-be62-4d18-9483-9419358fbb03}", "{75c276de-1df5-451f-a004-e4fa1a587df1}")
+ QAXCLASS(QParentWidget)
+ QAXTYPE(QSubWidget)
+QAXFACTORY_END()
+//! [0]
diff --git a/examples/activeqt/hierarchy/objects.cpp b/examples/activeqt/hierarchy/objects.cpp
new file mode 100644
index 0000000..c3928b5
--- /dev/null
+++ b/examples/activeqt/hierarchy/objects.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "objects.h"
+#include <QLayout>
+#include <QPainter>
+
+/* Implementation of QParentWidget */
+//! [0]
+QParentWidget::QParentWidget(QWidget *parent)
+: QWidget(parent)
+{
+ vbox = new QVBoxLayout(this);
+}
+
+//! [0] //! [1]
+void QParentWidget::createSubWidget(const QString &name)
+{
+ QSubWidget *sw = new QSubWidget(this, name);
+ vbox->addWidget(sw);
+ sw->setLabel(name);
+ sw->show();
+}
+
+//! [1] //! [2]
+QSubWidget *QParentWidget::subWidget(const QString &name)
+{
+ return qFindChild<QSubWidget*>(this, name);
+}
+
+//! [2]
+QSize QParentWidget::sizeHint() const
+{
+ return QWidget::sizeHint().expandedTo(QSize(100, 100));
+}
+
+/* Implementation of QSubWidget */
+//! [3]
+QSubWidget::QSubWidget(QWidget *parent, const QString &name)
+: QWidget(parent)
+{
+ setObjectName(name);
+}
+
+void QSubWidget::setLabel(const QString &text)
+{
+ lbl = text;
+ setObjectName(text);
+ update();
+}
+
+QString QSubWidget::label() const
+{
+ return lbl;
+}
+
+QSize QSubWidget::sizeHint() const
+{
+ QFontMetrics fm(font());
+ return QSize(fm.width(lbl), fm.height());
+}
+
+void QSubWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(palette().text().color());
+ painter.drawText(rect(), Qt::AlignCenter, lbl);
+//! [3] //! [4]
+}
+//! [4]
diff --git a/examples/activeqt/hierarchy/objects.h b/examples/activeqt/hierarchy/objects.h
new file mode 100644
index 0000000..e719e6d
--- /dev/null
+++ b/examples/activeqt/hierarchy/objects.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef OBJECTS_H
+#define OBJECTS_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QVBoxLayout;
+QT_END_NAMESPACE
+class QSubWidget;
+
+//! [0]
+class QParentWidget : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{d574a747-8016-46db-a07c-b2b4854ee75c}");
+ Q_CLASSINFO("InterfaceID", "{4a30719d-d9c2-4659-9d16-67378209f822}");
+ Q_CLASSINFO("EventsID", "{4a30719d-d9c2-4659-9d16-67378209f823}");
+public:
+ QParentWidget(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+public slots:
+ void createSubWidget( const QString &name );
+
+ QSubWidget *subWidget( const QString &name );
+
+private:
+ QVBoxLayout *vbox;
+};
+//! [0]
+
+//! [1]
+class QSubWidget : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( QString label READ label WRITE setLabel )
+
+ Q_CLASSINFO("ClassID", "{850652f4-8f71-4f69-b745-bce241ccdc30}");
+ Q_CLASSINFO("InterfaceID", "{2d76cc2f-3488-417a-83d6-debff88b3c3f}");
+ Q_CLASSINFO("ToSuperClass", "QSubWidget");
+
+public:
+ QSubWidget(QWidget *parent = 0, const QString &name = QString());
+
+ void setLabel( const QString &text );
+ QString label() const;
+
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+private:
+ QString lbl;
+};
+//! [1]
+
+#endif // OBJECTS_H
diff --git a/examples/activeqt/menus/fileopen.xpm b/examples/activeqt/menus/fileopen.xpm
new file mode 100644
index 0000000..880417e
--- /dev/null
+++ b/examples/activeqt/menus/fileopen.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
diff --git a/examples/activeqt/menus/filesave.xpm b/examples/activeqt/menus/filesave.xpm
new file mode 100644
index 0000000..bd6870f
--- /dev/null
+++ b/examples/activeqt/menus/filesave.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *filesave[] = {
+" 14 14 4 1",
+". c #040404",
+"# c #808304",
+"a c #bfc2bf",
+"b c None",
+"..............",
+".#.aaaaaaaa.a.",
+".#.aaaaaaaa...",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".##........##.",
+".############.",
+".##.........#.",
+".##......aa.#.",
+".##......aa.#.",
+".##......aa.#.",
+"b............."
+};
diff --git a/examples/activeqt/menus/main.cpp b/examples/activeqt/menus/main.cpp
new file mode 100644
index 0000000..56f8a9f
--- /dev/null
+++ b/examples/activeqt/menus/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menus.h"
+#include <QApplication>
+#include <QAxFactory>
+
+QAXFACTORY_DEFAULT(QMenus,
+ "{4dc3f340-a6f7-44e4-a79b-3e9217695fbd}",
+ "{9ee49617-7d5c-441a-b833-4b068d40d751}",
+ "{13eca64b-ee2a-4f3c-aa04-5d9d975979a7}",
+ "{ce947ee3-0403-4fdc-895a-4fe779394b46}",
+ "{8de435ce-8d2a-46ac-b3b3-cb800d0847c7}");
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+
+ QWidget *window = 0;
+ if ( !QAxFactory::isServer() ) {
+ window = new QMenus();
+ window->show();
+ }
+
+ return a.exec();
+}
diff --git a/examples/activeqt/menus/menus.cpp b/examples/activeqt/menus/menus.cpp
new file mode 100644
index 0000000..27f064e
--- /dev/null
+++ b/examples/activeqt/menus/menus.cpp
@@ -0,0 +1,178 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menus.h"
+#include <QAction>
+#include <QAxFactory>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QTextEdit>
+#include <QPixmap>
+
+#include "fileopen.xpm"
+#include "filesave.xpm"
+
+QMenus::QMenus(QWidget *parent)
+ : QMainWindow(parent, 0) // QMainWindow's default flag is WType_TopLevel
+{
+ QAction *action;
+
+ QMenu *file = new QMenu(this);
+
+ action = new QAction(QPixmap((const char**)fileopen), "&Open", this);
+ action->setShortcut(tr("CTRL+O"));
+ connect(action, SIGNAL(triggered()), this, SLOT(fileOpen()));
+ file->addAction(action);
+
+ action = new QAction(QPixmap((const char**)filesave),"&Save", this);
+ action->setShortcut(tr("CTRL+S"));
+ connect(action, SIGNAL(triggered()), this, SLOT(fileSave()));
+ file->addAction(action);
+
+ QMenu *edit = new QMenu(this);
+
+ action = new QAction("&Normal", this);
+ action->setShortcut(tr("CTRL+N"));
+ action->setToolTip("Normal");
+ action->setStatusTip("Toggles Normal");
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editNormal()));
+ edit->addAction(action);
+
+ action = new QAction("&Bold", this);
+ action->setShortcut(tr("CTRL+B"));
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editBold()));
+ edit->addAction(action);
+
+ action = new QAction("&Underline", this);
+ action->setShortcut(tr("CTRL+U"));
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ edit->addAction(action);
+
+ QMenu *advanced = new QMenu(this);
+ action = new QAction("&Font...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedFont()));
+ advanced->addAction(action);
+
+ action = new QAction("&Style...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedStyle()));
+ advanced->addAction(action);
+
+ edit->addMenu(advanced)->setText("&Advanced");
+
+ edit->addSeparator();
+
+ action = new QAction("Una&vailable", this);
+ action->setShortcut(tr("CTRL+V"));
+ action->setCheckable(true);
+ action->setEnabled(false);
+ connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ edit->addAction(action);
+
+ QMenu *help = new QMenu(this);
+
+ action = new QAction("&About...", this);
+ action->setShortcut(tr("F1"));
+ connect(action, SIGNAL(triggered()), this, SLOT(helpAbout()));
+ help->addAction(action);
+
+ action = new QAction("&About Qt...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(helpAboutQt()));
+ help->addAction(action);
+
+ if (!QAxFactory::isServer())
+ menuBar()->addMenu(file)->setText("&File");
+ menuBar()->addMenu(edit)->setText("&Edit");
+ menuBar()->addMenu(help)->setText("&Help");
+
+ editor = new QTextEdit(this);
+ setCentralWidget(editor);
+
+ statusBar();
+}
+
+void QMenus::fileOpen()
+{
+ editor->append("File Open selected.");
+}
+
+void QMenus::fileSave()
+{
+ editor->append("File Save selected.");
+}
+
+void QMenus::editNormal()
+{
+ editor->append("Edit Normal selected.");
+}
+
+void QMenus::editBold()
+{
+ editor->append("Edit Bold selected.");
+}
+
+void QMenus::editUnderline()
+{
+ editor->append("Edit Underline selected.");
+}
+
+void QMenus::editAdvancedFont()
+{
+ editor->append("Edit Advanced Font selected.");
+}
+
+void QMenus::editAdvancedStyle()
+{
+ editor->append("Edit Advanced Style selected.");
+}
+
+void QMenus::helpAbout()
+{
+ QMessageBox::about(this, "About QMenus",
+ "This example implements an in-place ActiveX control with menus and status messages.");
+}
+
+void QMenus::helpAboutQt()
+{
+ QMessageBox::aboutQt(this);
+}
diff --git a/examples/activeqt/menus/menus.h b/examples/activeqt/menus/menus.h
new file mode 100644
index 0000000..c961cd5
--- /dev/null
+++ b/examples/activeqt/menus/menus.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MENUS_H
+#define MENUS_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTextEdit;
+QT_END_NAMESPACE
+
+class QMenus : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ QMenus(QWidget *parent = 0);
+
+public slots:
+ void fileOpen();
+ void fileSave();
+
+ void editNormal();
+ void editBold();
+ void editUnderline();
+
+ void editAdvancedFont();
+ void editAdvancedStyle();
+
+ void helpAbout();
+ void helpAboutQt();
+
+private:
+ QTextEdit *editor;
+};
+
+#endif // MENUS_H
diff --git a/examples/activeqt/menus/menus.inf b/examples/activeqt/menus/menus.inf
new file mode 100644
index 0000000..f97efe8
--- /dev/null
+++ b/examples/activeqt/menus/menus.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ menusax.exe=menusax.exe
+ [menusax.exe]
+ file-win32-x86=thiscab
+ clsid={4dc3f340-a6f7-44e4-a79b-3e9217695fbd}
+ RegisterServer=yes
diff --git a/examples/activeqt/menus/menus.pro b/examples/activeqt/menus/menus.pro
new file mode 100644
index 0000000..c962b6b
--- /dev/null
+++ b/examples/activeqt/menus/menus.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET = menusax
+
+CONFIG += qt warn_off qaxserver
+
+SOURCES = main.cpp menus.cpp
+HEADERS = menus.h
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
+INSTALLS += target sources
diff --git a/examples/activeqt/multiple/ax1.h b/examples/activeqt/multiple/ax1.h
new file mode 100644
index 0000000..a53e4f4
--- /dev/null
+++ b/examples/activeqt/multiple/ax1.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AX1_H
+#define AX1_H
+
+#include <QWidget>
+#include <QPainter>
+
+//! [0]
+class QAxWidget1 : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+ Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+ Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+
+ Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor)
+public:
+ QAxWidget1(QWidget *parent = 0)
+ : QWidget(parent), fill_color(Qt::red)
+ {
+ }
+
+ QColor fillColor() const
+ {
+ return fill_color;
+ }
+ void setFillColor(const QColor &fc)
+ {
+ fill_color = fc;
+ repaint();
+ }
+
+protected:
+ void paintEvent(QPaintEvent *e)
+ {
+ QPainter paint(this);
+ QRect r = rect();
+ r.adjust(10, 10, -10, -10);
+ paint.fillRect(r, fill_color);
+ }
+
+private:
+ QColor fill_color;
+};
+//! [0]
+
+#endif // AX1_H
diff --git a/examples/activeqt/multiple/ax2.h b/examples/activeqt/multiple/ax2.h
new file mode 100644
index 0000000..b6b50f3
--- /dev/null
+++ b/examples/activeqt/multiple/ax2.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AX2_H
+#define AX2_H
+
+#include <QWidget>
+#include <QPainter>
+
+//! [0]
+class QAxWidget2 : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{58139D56-6BE9-4b17-937D-1B1EDEDD5B71}")
+ Q_CLASSINFO("InterfaceID", "{B66280AB-08CC-4dcc-924F-58E6D7975B7D}")
+ Q_CLASSINFO("EventsID", "{D72BACBA-03C4-4480-B4BB-DE4FE3AA14A0}")
+ Q_CLASSINFO("ToSuperClass", "QAxWidget2")
+ Q_CLASSINFO("StockEvents", "yes")
+ Q_CLASSINFO("Insertable", "yes")
+
+ Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
+public:
+ QAxWidget2(QWidget *parent = 0)
+ : QWidget(parent), line_width( 1 )
+ {
+ }
+
+ int lineWidth() const
+ {
+ return line_width;
+ }
+ void setLineWidth( int lw )
+ {
+ line_width = lw;
+ repaint();
+ }
+
+protected:
+ void paintEvent( QPaintEvent *e )
+ {
+ QPainter paint( this );
+ QPen pen = paint.pen();
+ pen.setWidth( line_width );
+ paint.setPen( pen );
+
+ QRect r = rect();
+ r.adjust( 10, 10, -10, -10 );
+ paint.drawEllipse( r );
+ }
+
+private:
+ int line_width;
+};
+//! [0]
+
+#endif // AX2_H
diff --git a/examples/activeqt/multiple/main.cpp b/examples/activeqt/multiple/main.cpp
new file mode 100644
index 0000000..612292e
--- /dev/null
+++ b/examples/activeqt/multiple/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "ax1.h"
+#include "ax2.h"
+#include <QAxFactory>
+
+QT_USE_NAMESPACE
+
+QAXFACTORY_BEGIN("{98DE28B6-6CD3-4e08-B9FA-3D1DB43F1D2F}", "{05828915-AD1C-47ab-AB96-D6AD1E25F0E2}")
+ QAXCLASS(QAxWidget1)
+ QAXCLASS(QAxWidget2)
+QAXFACTORY_END()
+//! [0]
diff --git a/examples/activeqt/multiple/multiple.inf b/examples/activeqt/multiple/multiple.inf
new file mode 100644
index 0000000..7f6be76
--- /dev/null
+++ b/examples/activeqt/multiple/multiple.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ multipleax.dll=multipleax.dll
+ [multipleax.dll]
+ file-win32-x86=thiscab
+ clsid={1D9928BD-4453-4bdd-903D-E525ED17FDE5}
+ RegisterServer=yes
diff --git a/examples/activeqt/multiple/multiple.pro b/examples/activeqt/multiple/multiple.pro
new file mode 100644
index 0000000..7b86950
--- /dev/null
+++ b/examples/activeqt/multiple/multiple.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+TARGET = multipleax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = main.cpp
+HEADERS = ax1.h ax2.h
+RC_FILE = multipleax.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS multiple.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
+INSTALLS += target sources
diff --git a/examples/activeqt/multiple/multipleax.rc b/examples/activeqt/multiple/multipleax.rc
new file mode 100644
index 0000000..1809e0d
--- /dev/null
+++ b/examples/activeqt/multiple/multipleax.rc
@@ -0,0 +1,32 @@
+#include "winver.h"
+
+1 TYPELIB "multipleax.rc"
+1 ICON DISCARDABLE "..\\..\\..\\src\\activeqt\\control\\qaxserver.ico"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEOS 0x00040000L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
+ VALUE "FileDescription", "Multiple Example (ActiveQt)"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
+ VALUE "InternalName", "multipleax.dll"
+ VALUE "OriginalFilename", "multipleax.dll"
+ VALUE "ProductName", "Multiple Example (ActiveQt)"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/examples/activeqt/opengl/glbox.cpp b/examples/activeqt/opengl/glbox.cpp
new file mode 100644
index 0000000..4cb015b
--- /dev/null
+++ b/examples/activeqt/opengl/glbox.cpp
@@ -0,0 +1,250 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** This is a simple QGLWidget displaying an openGL wireframe box
+**
+** The OpenGL code is mostly borrowed from Brian Pauls "spin" example
+** in the Mesa distribution
+**
+****************************************************************************/
+
+#include "glbox.h"
+#include <QAxAggregated>
+#include <QUuid>
+//! [0]
+#include <objsafe.h>
+//! [0]
+
+#if defined(Q_CC_MSVC)
+#pragma warning(disable:4305) // init: truncation from const double to float
+#endif
+
+/*!
+ Create a GLBox widget
+*/
+
+GLBox::GLBox( QWidget* parent, const char* name )
+ : QGLWidget( parent )
+{
+ xRot = yRot = zRot = 0.0; // default object rotation
+ scale = 1.25; // default object scale
+ object = 0;
+}
+
+
+/*!
+ Release allocated resources
+*/
+
+GLBox::~GLBox()
+{
+ makeCurrent();
+ glDeleteLists( object, 1 );
+}
+
+
+/*!
+ Paint the box. The actual openGL commands for drawing the box are
+ performed here.
+*/
+
+void GLBox::paintGL()
+{
+ glClear( GL_COLOR_BUFFER_BIT );
+
+ glLoadIdentity();
+ glTranslatef( 0.0, 0.0, -10.0 );
+ glScalef( scale, scale, scale );
+
+ glRotatef( xRot, 1.0, 0.0, 0.0 );
+ glRotatef( yRot, 0.0, 1.0, 0.0 );
+ glRotatef( zRot, 0.0, 0.0, 1.0 );
+
+ glCallList( object );
+}
+
+
+/*!
+ Set up the OpenGL rendering state, and define display list
+*/
+
+void GLBox::initializeGL()
+{
+ qglClearColor(Qt::black); // Let OpenGL clear to black
+ object = makeObject(); // Generate an OpenGL display list
+ glShadeModel( GL_FLAT );
+}
+
+
+
+/*!
+ Set up the OpenGL view port, matrix mode, etc.
+*/
+
+void GLBox::resizeGL( int w, int h )
+{
+ glViewport( 0, 0, (GLint)w, (GLint)h );
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
+ glMatrixMode( GL_MODELVIEW );
+}
+
+
+/*!
+ Generate an OpenGL display list for the object to be shown, i.e. the box
+*/
+
+GLuint GLBox::makeObject()
+{
+ GLuint list;
+
+ list = glGenLists( 1 );
+
+ glNewList( list, GL_COMPILE );
+
+ qglColor(Qt::white); // Shorthand for glColor3f or glIndex
+
+ glLineWidth( 2.0 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex3f( 1.0, 0.5, -0.4 );
+ glVertex3f( 1.0, -0.5, -0.4 );
+ glVertex3f( -1.0, -0.5, -0.4 );
+ glVertex3f( -1.0, 0.5, -0.4 );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex3f( 1.0, 0.5, 0.4 );
+ glVertex3f( 1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, 0.5, 0.4 );
+ glEnd();
+
+ glBegin( GL_LINES );
+ glVertex3f( 1.0, 0.5, -0.4 ); glVertex3f( 1.0, 0.5, 0.4 );
+ glVertex3f( 1.0, -0.5, -0.4 ); glVertex3f( 1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, -0.5, -0.4 ); glVertex3f( -1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, 0.5, -0.4 ); glVertex3f( -1.0, 0.5, 0.4 );
+ glEnd();
+
+ glEndList();
+
+ return list;
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the X axis.
+*/
+
+void GLBox::setXRotation( int degrees )
+{
+ xRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the Y axis.
+*/
+
+void GLBox::setYRotation( int degrees )
+{
+ yRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the Z axis.
+*/
+
+void GLBox::setZRotation( int degrees )
+{
+ zRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+//! [1]
+class ObjectSafetyImpl : public QAxAggregated,
+ public IObjectSafety
+{
+public:
+//! [1] //! [2]
+ ObjectSafetyImpl() {}
+
+ long queryInterface( const QUuid &iid, void **iface )
+ {
+ *iface = 0;
+ if ( iid == IID_IObjectSafety )
+ *iface = (IObjectSafety*)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+ }
+
+//! [2] //! [3]
+ QAXAGG_IUNKNOWN;
+
+//! [3] //! [4]
+ HRESULT WINAPI GetInterfaceSafetyOptions( REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions )
+ {
+ *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ return S_OK;
+ }
+ HRESULT WINAPI SetInterfaceSafetyOptions( REFIID riid, DWORD pdwSupportedOptions, DWORD pdwEnabledOptions )
+ {
+ return S_OK;
+ }
+};
+//! [4] //! [5]
+
+QAxAggregated *GLBox::createAggregate()
+{
+ return new ObjectSafetyImpl();
+}
+//! [5]
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h
new file mode 100644
index 0000000..3ebf818
--- /dev/null
+++ b/examples/activeqt/opengl/glbox.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** This is a simple QGLWidget displaying an openGL wireframe box
+**
+****************************************************************************/
+
+#ifndef GLBOX_H
+#define GLBOX_H
+
+#include <QtOpenGL>
+//! [0]
+#include <QAxBindable>
+
+class GLBox : public QGLWidget,
+ public QAxBindable
+{
+ Q_OBJECT
+//! [0] //! [1]
+
+public:
+
+ GLBox( QWidget* parent, const char* name = 0 );
+ ~GLBox();
+
+ QAxAggregated *createAggregate();
+
+public slots:
+
+ void setXRotation( int degrees );
+//! [1]
+ void setYRotation( int degrees );
+ void setZRotation( int degrees );
+
+protected:
+
+ void initializeGL();
+ void paintGL();
+ void resizeGL( int w, int h );
+
+ virtual GLuint makeObject();
+
+private:
+
+ GLuint object;
+ GLfloat xRot, yRot, zRot, scale;
+
+};
+
+#endif // GLBOX_H
diff --git a/examples/activeqt/opengl/globjwin.cpp b/examples/activeqt/opengl/globjwin.cpp
new file mode 100644
index 0000000..3ac5d78
--- /dev/null
+++ b/examples/activeqt/opengl/globjwin.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "globjwin.h"
+#include "glbox.h"
+#include <QPushButton>
+#include <QSlider>
+#include <QLayout>
+#include <QFrame>
+#include <QMenuBar>
+#include <QMenu>
+#include <QApplication>
+
+
+GLObjectWindow::GLObjectWindow(QWidget* parent)
+ : QWidget(parent)
+{
+
+ // Create a menu
+ QMenu *file = new QMenu( this );
+ file->addAction( "Exit", qApp, SLOT(quit())/*, CTRL+Key_Q*/);
+
+ // Create a menu bar
+ QMenuBar *m = new QMenuBar( this );
+ m->addMenu(file)->setText("&File");
+
+ // Create a nice frame to put around the OpenGL widget
+ QFrame* f = new QFrame(this);
+ f->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ f->setLineWidth( 2 );
+
+ // Create our OpenGL widget
+ GLBox* c = new GLBox( f, "glbox");
+
+ // Create the three sliders; one for each rotation axis
+ QSlider* x = new QSlider(Qt::Vertical, this);
+ x->setMaximum(360);
+ x->setPageStep(60);
+ x->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( x, SIGNAL(valueChanged(int)),c,SLOT(setXRotation(int)) );
+
+ QSlider* y = new QSlider(Qt::Vertical, this);
+ y->setMaximum(360);
+ y->setPageStep(60);
+ y->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( y, SIGNAL(valueChanged(int)),c,SLOT(setYRotation(int)) );
+
+ QSlider* z = new QSlider(Qt::Vertical, this);
+ z->setMaximum(360);
+ z->setPageStep(60);
+ z->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( z, SIGNAL(valueChanged(int)),c,SLOT(setZRotation(int)) );
+
+ // Now that we have all the widgets, put them into a nice layout
+
+ // Top level layout, puts the sliders to the left of the frame/GL widget
+ QHBoxLayout* hlayout = new QHBoxLayout(this);
+
+ // Put the sliders on top of each other
+ QVBoxLayout* vlayout = new QVBoxLayout();
+ vlayout->addWidget( x );
+ vlayout->addWidget( y );
+ vlayout->addWidget( z );
+
+ // Put the GL widget inside the frame
+ QHBoxLayout* flayout = new QHBoxLayout(f);
+ flayout->setMargin(0);
+ flayout->addWidget( c, 1 );
+
+ hlayout->setMenuBar( m );
+ hlayout->addLayout( vlayout );
+ hlayout->addWidget( f, 1 );
+}
diff --git a/examples/activeqt/opengl/globjwin.h b/examples/activeqt/opengl/globjwin.h
new file mode 100644
index 0000000..d707aa6
--- /dev/null
+++ b/examples/activeqt/opengl/globjwin.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** The GLObjectWindow contains a GLBox and three sliders connected to
+** the GLBox's rotation slots.
+**
+****************************************************************************/
+
+#ifndef GLOBJWIN_H
+#define GLOBJWIN_H
+
+#include <qwidget.h>
+
+class GLObjectWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ GLObjectWindow(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/activeqt/opengl/main.cpp b/examples/activeqt/opengl/main.cpp
new file mode 100644
index 0000000..469bdfb
--- /dev/null
+++ b/examples/activeqt/opengl/main.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//
+// Qt OpenGL example: Box
+//
+// A small example showing how a GLWidget can be used just as any Qt widget
+//
+// File: main.cpp
+//
+// The main() function
+//
+
+#include "globjwin.h"
+#include "glbox.h"
+#include <QApplication>
+#include <QtOpenGL>
+//! [0]
+#include <QAxFactory>
+
+QAXFACTORY_DEFAULT( GLBox,
+ "{5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}",
+ "{33b051af-bb25-47cf-a390-5cfd2987d26a}",
+ "{8c996c29-eafa-46ac-a6f9-901951e765b5}",
+ "{2c3c183a-eeda-41a4-896e-3d9c12c3577d}",
+ "{83e16271-6480-45d5-aaf1-3f40b7661ae4}"
+ )
+
+//! [0] //! [1]
+/*
+ The main program is here.
+*/
+
+int main( int argc, char **argv )
+{
+ QApplication::setColorSpec( QApplication::CustomColor );
+ QApplication a(argc,argv);
+
+ if ( !QGLFormat::hasOpenGL() ) {
+ qWarning( "This system has no OpenGL support. Exiting." );
+ return -1;
+ }
+
+ if ( !QAxFactory::isServer() ) {
+ GLObjectWindow w;
+ w.resize( 400, 350 );
+ w.show();
+ return a.exec();
+//! [1] //! [2]
+ }
+ return a.exec();
+//! [2] //! [3]
+}
+//! [3]
diff --git a/examples/activeqt/opengl/opengl.inf b/examples/activeqt/opengl/opengl.inf
new file mode 100644
index 0000000..4a79e67
--- /dev/null
+++ b/examples/activeqt/opengl/opengl.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ openglax.exe=openglax.exe
+ [openglax.exe]
+ file-win32-x86=thiscab
+ clsid={5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}
+ RegisterServer=yes
diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro
new file mode 100644
index 0000000..8eb81be
--- /dev/null
+++ b/examples/activeqt/opengl/opengl.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = openglax
+
+CONFIG += qt warn_off qaxserver
+
+QT += opengl
+
+HEADERS = glbox.h \
+ globjwin.h
+SOURCES = glbox.cpp \
+ globjwin.cpp \
+ main.cpp
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
+INSTALLS += target sources
diff --git a/examples/activeqt/qutlook/addressview.cpp b/examples/activeqt/qutlook/addressview.cpp
new file mode 100644
index 0000000..281fe6a
--- /dev/null
+++ b/examples/activeqt/qutlook/addressview.cpp
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "addressview.h"
+#include "msoutl.h"
+#include <QtGui>
+
+class AddressBookModel : public QAbstractListModel
+{
+public:
+ AddressBookModel(AddressView *parent);
+ ~AddressBookModel();
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+ void changeItem(const QModelIndex &index, const QString &firstName, const QString &lastName, const QString &address, const QString &email);
+ void addItem(const QString &firstName, const QString &lastName, const QString &address, const QString &email);
+ void update();
+
+private:
+ Outlook::Application outlook;
+ Outlook::Items * contactItems;
+
+ mutable QHash<QModelIndex, QStringList> cache;
+};
+//! [0] //! [1]
+
+AddressBookModel::AddressBookModel(AddressView *parent)
+: QAbstractListModel(parent)
+{
+ if (!outlook.isNull()) {
+ Outlook::NameSpace session(outlook.Session());
+ session.Logon();
+ Outlook::MAPIFolder *folder = session.GetDefaultFolder(Outlook::olFolderContacts);
+ contactItems = new Outlook::Items(folder->Items());
+ connect(contactItems, SIGNAL(ItemAdd(IDispatch*)), parent, SLOT(updateOutlook()));
+ connect(contactItems, SIGNAL(ItemChange(IDispatch*)), parent, SLOT(updateOutlook()));
+ connect(contactItems, SIGNAL(ItemRemove()), parent, SLOT(updateOutlook()));
+
+ delete folder;
+ }
+}
+
+//! [1] //! [2]
+AddressBookModel::~AddressBookModel()
+{
+ delete contactItems;
+
+ if (!outlook.isNull())
+ Outlook::NameSpace(outlook.Session()).Logoff();
+}
+
+//! [2] //! [3]
+int AddressBookModel::rowCount(const QModelIndex &) const
+{
+ return contactItems ? contactItems->Count() : 0;
+}
+
+int AddressBookModel::columnCount(const QModelIndex &parent) const
+{
+ return 4;
+}
+
+//! [3] //! [4]
+QVariant AddressBookModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ switch (section) {
+ case 0:
+ return tr("First Name");
+ case 1:
+ return tr("Last Name");
+ case 2:
+ return tr("Address");
+ case 3:
+ return tr("Email");
+ default:
+ break;
+ }
+
+ return QVariant();
+}
+
+//! [4] //! [5]
+QVariant AddressBookModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid() || role != Qt::DisplayRole)
+ return QVariant();
+
+ QStringList data;
+ if (cache.contains(index)) {
+ data = cache.value(index);
+ } else {
+ Outlook::ContactItem contact(contactItems->Item(index.row() + 1));
+ data << contact.FirstName() << contact.LastName() << contact.HomeAddress() << contact.Email1Address();
+ cache.insert(index, data);
+ }
+
+ if (index.column() < data.count())
+ return data.at(index.column());
+
+ return QVariant();
+}
+
+//! [5] //! [6]
+void AddressBookModel::changeItem(const QModelIndex &index, const QString &firstName, const QString &lastName, const QString &address, const QString &email)
+{
+ Outlook::ContactItem item(contactItems->Item(index.row() + 1));
+
+ item.SetFirstName(firstName);
+ item.SetLastName(lastName);
+ item.SetHomeAddress(address);
+ item.SetEmail1Address(email);
+
+ item.Save();
+
+ cache.take(index);
+}
+
+//! [6] //! [7]
+void AddressBookModel::addItem(const QString &firstName, const QString &lastName, const QString &address, const QString &email)
+{
+ Outlook::ContactItem item(outlook.CreateItem(Outlook::olContactItem));
+ if (!item.isNull()) {
+ item.SetFirstName(firstName);
+ item.SetLastName(lastName);
+ item.SetHomeAddress(address);
+ item.SetEmail1Address(email);
+
+ item.Save();
+ }
+}
+
+//! [7] //! [8]
+void AddressBookModel::update()
+{
+ cache.clear();
+
+ emit reset();
+}
+
+
+//! [8] //! [9]
+AddressView::AddressView(QWidget *parent)
+: QWidget(parent)
+{
+ QGridLayout *mainGrid = new QGridLayout(this);
+
+ QLabel *liFirstName = new QLabel("First &Name", this);
+ liFirstName->resize(liFirstName->sizeHint());
+ mainGrid->addWidget(liFirstName, 0, 0);
+
+ QLabel *liLastName = new QLabel("&Last Name", this);
+ liLastName->resize(liLastName->sizeHint());
+ mainGrid->addWidget(liLastName, 0, 1);
+
+ QLabel *liAddress = new QLabel("Add&ress", this);
+ liAddress->resize(liAddress->sizeHint());
+ mainGrid->addWidget(liAddress, 0, 2);
+
+ QLabel *liEMail = new QLabel("&E-Mail", this);
+ liEMail->resize(liEMail->sizeHint());
+ mainGrid->addWidget(liEMail, 0, 3);
+
+ add = new QPushButton("A&dd", this);
+ add->resize(add->sizeHint());
+ mainGrid->addWidget(add, 0, 4);
+ connect(add, SIGNAL(clicked()), this, SLOT(addEntry()));
+
+ iFirstName = new QLineEdit(this);
+ iFirstName->resize(iFirstName->sizeHint());
+ mainGrid->addWidget(iFirstName, 1, 0);
+ liFirstName->setBuddy(iFirstName);
+
+ iLastName = new QLineEdit(this);
+ iLastName->resize(iLastName->sizeHint());
+ mainGrid->addWidget(iLastName, 1, 1);
+ liLastName->setBuddy(iLastName);
+
+ iAddress = new QLineEdit(this);
+ iAddress->resize(iAddress->sizeHint());
+ mainGrid->addWidget(iAddress, 1, 2);
+ liAddress->setBuddy(iAddress);
+
+ iEMail = new QLineEdit(this);
+ iEMail->resize(iEMail->sizeHint());
+ mainGrid->addWidget(iEMail, 1, 3);
+ liEMail->setBuddy(iEMail);
+
+ change = new QPushButton("&Change", this);
+ change->resize(change->sizeHint());
+ mainGrid->addWidget(change, 1, 4);
+ connect(change, SIGNAL(clicked()), this, SLOT(changeEntry()));
+
+ treeView = new QTreeView(this);
+ treeView->setSelectionMode(QTreeView::SingleSelection);
+ treeView->setRootIsDecorated(false);
+
+ model = new AddressBookModel(this);
+ treeView->setModel(model);
+
+ connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(itemSelected(QModelIndex)));
+
+ mainGrid->addWidget(treeView, 2, 0, 1, 5);
+}
+
+void AddressView::updateOutlook()
+{
+ model->update();
+}
+
+void AddressView::addEntry()
+{
+ if (!iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+ !iAddress->text().isEmpty() || !iEMail->text().isEmpty()) {
+ model->addItem(iFirstName->text(), iFirstName->text(), iAddress->text(), iEMail->text());
+ }
+
+ iFirstName->setText("");
+ iLastName->setText("");
+ iAddress->setText("");
+ iEMail->setText("");
+}
+
+void AddressView::changeEntry()
+{
+ QModelIndex current = treeView->currentIndex();
+
+ if (current.isValid())
+ model->changeItem(current, iFirstName->text(), iLastName->text(), iAddress->text(), iEMail->text());
+}
+
+//! [9] //! [10]
+void AddressView::itemSelected(const QModelIndex &index)
+{
+ if (!index.isValid())
+ return;
+
+ QAbstractItemModel *model = treeView->model();
+ iFirstName->setText(model->data(model->index(index.row(), 0)).toString());
+ iLastName->setText(model->data(model->index(index.row(), 1)).toString());
+ iAddress->setText(model->data(model->index(index.row(), 2)).toString());
+ iEMail->setText(model->data(model->index(index.row(), 3)).toString());
+}
+//! [10]
diff --git a/examples/activeqt/qutlook/addressview.h b/examples/activeqt/qutlook/addressview.h
new file mode 100644
index 0000000..5363cc1
--- /dev/null
+++ b/examples/activeqt/qutlook/addressview.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSVIEW_H
+#define ADDRESSVIEW_H
+
+#include <QWidget>
+
+class AddressBookModel;
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QModelIndex;
+class QPushButton;
+class QTreeView;
+QT_END_NAMESPACE
+
+//! [0]
+class AddressView : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressView(QWidget *parent = 0);
+
+protected slots:
+ void addEntry();
+ void changeEntry();
+ void itemSelected(const QModelIndex &index);
+
+ void updateOutlook();
+
+protected:
+ AddressBookModel *model;
+
+ QTreeView *treeView;
+ QPushButton *add, *change;
+ QLineEdit *iFirstName, *iLastName, *iAddress, *iEMail;
+};
+//! [0]
+
+#endif // ADDRESSVIEW_H
diff --git a/examples/activeqt/qutlook/fileopen.xpm b/examples/activeqt/qutlook/fileopen.xpm
new file mode 100644
index 0000000..880417e
--- /dev/null
+++ b/examples/activeqt/qutlook/fileopen.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
diff --git a/examples/activeqt/qutlook/fileprint.xpm b/examples/activeqt/qutlook/fileprint.xpm
new file mode 100644
index 0000000..6ada912
--- /dev/null
+++ b/examples/activeqt/qutlook/fileprint.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char *fileprint[] = {
+" 16 14 6 1",
+". c #000000",
+"# c #848284",
+"a c #c6c3c6",
+"b c #ffff00",
+"c c #ffffff",
+"d c None",
+"ddddd.........dd",
+"dddd.cccccccc.dd",
+"dddd.c.....c.ddd",
+"ddd.cccccccc.ddd",
+"ddd.c.....c....d",
+"dd.cccccccc.a.a.",
+"d..........a.a..",
+".aaaaaaaaaa.a.a.",
+".............aa.",
+".aaaaaa###aa.a.d",
+".aaaaaabbbaa...d",
+".............a.d",
+"d.aaaaaaaaa.a.dd",
+"dd...........ddd"
+};
diff --git a/examples/activeqt/qutlook/filesave.xpm b/examples/activeqt/qutlook/filesave.xpm
new file mode 100644
index 0000000..bd6870f
--- /dev/null
+++ b/examples/activeqt/qutlook/filesave.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *filesave[] = {
+" 14 14 4 1",
+". c #040404",
+"# c #808304",
+"a c #bfc2bf",
+"b c None",
+"..............",
+".#.aaaaaaaa.a.",
+".#.aaaaaaaa...",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".##........##.",
+".############.",
+".##.........#.",
+".##......aa.#.",
+".##......aa.#.",
+".##......aa.#.",
+"b............."
+};
diff --git a/examples/activeqt/qutlook/main.cpp b/examples/activeqt/qutlook/main.cpp
new file mode 100644
index 0000000..b015d8a
--- /dev/null
+++ b/examples/activeqt/qutlook/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "addressview.h"
+#include <QApplication>
+
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+
+ AddressView view;
+ view.setWindowTitle("Qt Example - Looking at Outlook");
+ view.show();
+
+ return a.exec();
+}
+//! [0]
diff --git a/examples/activeqt/qutlook/qutlook.pro b/examples/activeqt/qutlook/qutlook.pro
new file mode 100644
index 0000000..c1154e0
--- /dev/null
+++ b/examples/activeqt/qutlook/qutlook.pro
@@ -0,0 +1,23 @@
+#! [0] #! [1]
+TEMPLATE = app
+TARGET = qutlook
+CONFIG += qaxcontainer
+
+TYPELIBS = $$system(dumpcpp -getfile {00062FFF-0000-0000-C000-000000000046})
+#! [0]
+
+isEmpty(TYPELIBS) {
+ message("Microsoft Outlook type library not found!")
+ REQUIRES += Outlook
+} else {
+#! [1] #! [2]
+ HEADERS = addressview.h
+ SOURCES = addressview.cpp main.cpp
+}
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qutlook.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
+INSTALLS += target sources
diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp
new file mode 100644
index 0000000..7f939e4
--- /dev/null
+++ b/examples/activeqt/simple/main.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAxBindable>
+#include <QAxFactory>
+#include <QApplication>
+#include <QLayout>
+#include <QSlider>
+#include <QLCDNumber>
+#include <QLineEdit>
+#include <QMessageBox>
+
+//! [0]
+class QSimpleAX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+ Q_PROPERTY( QString text READ text WRITE setText )
+ Q_PROPERTY( int value READ value WRITE setValue )
+public:
+ QSimpleAX(QWidget *parent = 0)
+ : QWidget(parent)
+ {
+ QVBoxLayout *vbox = new QVBoxLayout( this );
+
+ slider = new QSlider( Qt::Horizontal, this );
+ LCD = new QLCDNumber( 3, this );
+ edit = new QLineEdit( this );
+
+ connect( slider, SIGNAL( valueChanged( int ) ), this, SLOT( setValue(int) ) );
+ connect( edit, SIGNAL(textChanged(const QString&)), this, SLOT(setText(const QString&)) );
+
+ vbox->addWidget( slider );
+ vbox->addWidget( LCD );
+ vbox->addWidget( edit );
+ }
+
+ QString text() const
+ {
+ return edit->text();
+ }
+ int value() const
+ {
+ return slider->value();
+ }
+
+signals:
+ void someSignal();
+ void valueChanged(int);
+ void textChanged(const QString&);
+
+public slots:
+ void setText( const QString &string )
+ {
+ if ( !requestPropertyChange( "text" ) )
+ return;
+
+ edit->blockSignals( true );
+ edit->setText( string );
+ edit->blockSignals( false );
+ emit someSignal();
+ emit textChanged( string );
+
+ propertyChanged( "text" );
+ }
+ void about()
+ {
+ QMessageBox::information( this, "About QSimpleAX", "This is a Qt widget, and this slot has been\n"
+ "called through ActiveX/OLE automation!" );
+ }
+ void setValue( int i )
+ {
+ if ( !requestPropertyChange( "value" ) )
+ return;
+ slider->blockSignals( true );
+ slider->setValue( i );
+ slider->blockSignals( false );
+ LCD->display( i );
+ emit valueChanged( i );
+
+ propertyChanged( "value" );
+ }
+
+private:
+ QSlider *slider;
+ QLCDNumber *LCD;
+ QLineEdit *edit;
+};
+
+//! [0]
+#include "main.moc"
+
+//! [1]
+QAXFACTORY_DEFAULT(QSimpleAX,
+ "{DF16845C-92CD-4AAB-A982-EB9840E74669}",
+ "{616F620B-91C5-4410-A74E-6B81C76FFFE0}",
+ "{E1816BBA-BF5D-4A31-9855-D6BA432055FF}",
+ "{EC08F8FC-2754-47AB-8EFE-56A54057F34E}",
+ "{A095BA0C-224F-4933-A458-2DD7F6B85D8F}")
+//! [1]
diff --git a/examples/activeqt/simple/simple.inf b/examples/activeqt/simple/simple.inf
new file mode 100644
index 0000000..3657e9f
--- /dev/null
+++ b/examples/activeqt/simple/simple.inf
@@ -0,0 +1,11 @@
+//! [0]
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ simpleax.exe=simpleax.exe
+ [simpleax.exe]
+ file-win32-x86=thiscab
+ clsid={DF16845C-92CD-4AAB-A982-EB9840E74669}
+ RegisterServer=yes
+//! [0]
diff --git a/examples/activeqt/simple/simple.pro b/examples/activeqt/simple/simple.pro
new file mode 100644
index 0000000..d0f2019
--- /dev/null
+++ b/examples/activeqt/simple/simple.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+TARGET = simpleax
+
+CONFIG += qt warn_off qaxserver
+
+SOURCES = main.cpp
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS simple.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
+INSTALLS += target sources
diff --git a/examples/activeqt/webbrowser/main.cpp b/examples/activeqt/webbrowser/main.cpp
new file mode 100644
index 0000000..fe93eab
--- /dev/null
+++ b/examples/activeqt/webbrowser/main.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMessageBox>
+#include <QProgressBar>
+#include <QStatusBar>
+#include <QMainWindow>
+#include <QAbstractEventDispatcher>
+
+#if defined(Q_OS_WINCE)
+#include "ui_wincemainwindow.h"
+#include <windows.h>
+#else
+#include "ui_mainwindow.h"
+#endif
+
+//! [0]
+class MainWindow : public QMainWindow, public Ui::MainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow();
+
+public slots:
+ void on_WebBrowser_TitleChange(const QString &title);
+ void on_WebBrowser_ProgressChange(int a, int b);
+ void on_WebBrowser_CommandStateChange(int cmd, bool on);
+ void on_WebBrowser_BeforeNavigate();
+ void on_WebBrowser_NavigateComplete(QString);
+
+ void on_actionGo_triggered();
+ void on_actionNewWindow_triggered();
+ void on_actionAbout_triggered();
+ void on_actionAboutQt_triggered();
+ void on_actionFileClose_triggered();
+
+private:
+ QProgressBar *pb;
+};
+//! [0] //! [1]
+
+MainWindow::MainWindow()
+{
+ setupUi(this);
+
+ connect(addressEdit, SIGNAL(returnPressed()), actionGo, SLOT(trigger()));
+ connect(actionBack, SIGNAL(triggered()), WebBrowser, SLOT(GoBack()));
+ connect(actionForward, SIGNAL(triggered()), WebBrowser, SLOT(GoForward()));
+ connect(actionStop, SIGNAL(triggered()), WebBrowser, SLOT(Stop()));
+ connect(actionRefresh, SIGNAL(triggered()), WebBrowser, SLOT(Refresh()));
+ connect(actionHome, SIGNAL(triggered()), WebBrowser, SLOT(GoHome()));
+ connect(actionSearch, SIGNAL(triggered()), WebBrowser, SLOT(GoSearch()));
+
+ pb = new QProgressBar(statusBar());
+ pb->setTextVisible(false);
+ pb->hide();
+ statusBar()->addPermanentWidget(pb);
+
+ WebBrowser->dynamicCall("GoHome()");
+}
+
+//! [1] //! [2]
+void MainWindow::on_WebBrowser_TitleChange(const QString &title)
+{
+ setWindowTitle("Qt WebBrowser - " + title);
+}
+
+void MainWindow::on_WebBrowser_ProgressChange(int a, int b)
+{
+ if (a <= 0 || b <= 0) {
+ pb->hide();
+ return;
+ }
+ pb->show();
+ pb->setRange(0, b);
+ pb->setValue(a);
+}
+
+void MainWindow::on_WebBrowser_CommandStateChange(int cmd, bool on)
+{
+ switch (cmd) {
+ case 1:
+ actionForward->setEnabled(on);
+ break;
+ case 2:
+ actionBack->setEnabled(on);
+ break;
+ }
+}
+
+void MainWindow::on_WebBrowser_BeforeNavigate()
+{
+ actionStop->setEnabled(true);
+}
+
+void MainWindow::on_WebBrowser_NavigateComplete(QString)
+{
+ actionStop->setEnabled(false);
+}
+
+//! [2] //! [3]
+void MainWindow::on_actionGo_triggered()
+{
+ WebBrowser->dynamicCall("Navigate(const QString&)", addressEdit->text());
+}
+
+void MainWindow::on_actionNewWindow_triggered()
+{
+ MainWindow *window = new MainWindow;
+ window->show();
+ if (addressEdit->text().isEmpty())
+ return;
+ window->addressEdit->setText(addressEdit->text());
+ window->actionStop->setEnabled(true);
+ window->on_actionGo_triggered();
+}
+
+void MainWindow::on_actionAbout_triggered()
+{
+ QMessageBox::about(this, tr("About WebBrowser"),
+ tr("This Example has been created using the ActiveQt integration into Qt Designer.\n"
+ "It demonstrates the use of QAxWidget to embed the Internet Explorer ActiveX\n"
+ "control into a Qt application."));
+}
+
+void MainWindow::on_actionAboutQt_triggered()
+{
+ QMessageBox::aboutQt(this, tr("About Qt"));
+}
+
+void MainWindow::on_actionFileClose_triggered()
+{
+ close();
+}
+
+#include "main.moc"
+
+//! [3] //! [4]
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+#if defined(Q_OS_WINCE)
+ w.showMaximized();
+#else
+ w.show();
+#endif
+ return a.exec();
+}
+//! [4]
diff --git a/examples/activeqt/webbrowser/mainwindow.ui b/examples/activeqt/webbrowser/mainwindow.ui
new file mode 100644
index 0000000..12a0a32
--- /dev/null
+++ b/examples/activeqt/webbrowser/mainwindow.ui
@@ -0,0 +1,306 @@
+<ui version="4.0" stdsetdef="1" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="objectName" >
+ <string notr="true" >MainWindow</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>812</width>
+ <height>605</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Qt WebBrowser</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="Frame3" >
+ <property name="objectName" >
+ <string notr="true" >Frame3</string>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="WebAxWidget" name="WebBrowser" >
+ <property name="objectName" >
+ <string notr="true" >WebBrowser</string>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="control" >
+ <string>{8856F961-340A-11D0-A96B-00C04FD705A2}</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QToolBar" name="tbNavigate" >
+ <property name="objectName" >
+ <string notr="true" >tbNavigate</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Navigation</string>
+ </property>
+ <addaction name="actionBack" />
+ <addaction name="actionForward" />
+ <addaction name="actionStop" />
+ <addaction name="actionRefresh" />
+ <addaction name="actionHome" />
+ <addaction name="separator" />
+ <addaction name="actionSearch" />
+ </widget>
+ <widget class="QToolBar" name="tbAddress" >
+ <property name="objectName" >
+ <string notr="true" >tbAddress</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Address</string>
+ </property>
+ <widget class="QLabel" name="lblAddress" >
+ <property name="objectName" >
+ <string notr="true" >lblAddress</string>
+ </property>
+ <property name="text" >
+ <string>Address</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="addressEdit" >
+ <property name="objectName" >
+ <string notr="true" >addressEdit</string>
+ </property>
+ </widget>
+ <addaction name="actionGo" />
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="objectName" >
+ <string notr="true" >menubar</string>
+ </property>
+ <widget class="QMenu" name="PopupMenu" >
+ <property name="objectName" >
+ <string notr="true" >PopupMenu</string>
+ </property>
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <widget class="QMenu" name="FileNewGroup_2" >
+ <property name="objectName" >
+ <string notr="true" >FileNewGroup_2</string>
+ </property>
+ <property name="title" >
+ <string>New</string>
+ </property>
+ <addaction name="actionNewWindow" />
+ </widget>
+ <addaction name="FileNewGroup" />
+ <addaction name="FileNewGroup_2" />
+ <addaction name="separator" />
+ <addaction name="actionFileClose" />
+ </widget>
+ <widget class="QMenu" name="unnamed" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ <addaction name="actionAboutQt" />
+ </widget>
+ <addaction name="PopupMenu" />
+ <addaction name="unnamed" />
+ </widget>
+ <action name="actionGo" >
+ <property name="objectName" >
+ <string>actionGo</string>
+ </property>
+ <property name="icon" >
+ <iconset>image0</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Go</string>
+ </property>
+ </action>
+ <action name="actionBack" >
+ <property name="objectName" >
+ <string>actionBack</string>
+ </property>
+ <property name="icon" >
+ <iconset>image1</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Back</string>
+ </property>
+ <property name="shortcut" >
+ <string>Backspace</string>
+ </property>
+ </action>
+ <action name="actionForward" >
+ <property name="objectName" >
+ <string>actionForward</string>
+ </property>
+ <property name="icon" >
+ <iconset>image2</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Forward</string>
+ </property>
+ </action>
+ <action name="actionStop" >
+ <property name="objectName" >
+ <string>actionStop</string>
+ </property>
+ <property name="icon" >
+ <iconset>image3</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Stop</string>
+ </property>
+ </action>
+ <action name="actionRefresh" >
+ <property name="objectName" >
+ <string>actionRefresh</string>
+ </property>
+ <property name="icon" >
+ <iconset>image4</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Refresh</string>
+ </property>
+ </action>
+ <action name="actionHome" >
+ <property name="objectName" >
+ <string>actionHome</string>
+ </property>
+ <property name="icon" >
+ <iconset>image5</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Home</string>
+ </property>
+ </action>
+ <action name="actionFileClose" >
+ <property name="objectName" >
+ <string>actionFileClose</string>
+ </property>
+ <property name="iconText" >
+ <string>Close</string>
+ </property>
+ <property name="text" >
+ <string>C&amp;lose</string>
+ </property>
+ </action>
+ <action name="actionSearch" >
+ <property name="objectName" >
+ <string>actionSearch</string>
+ </property>
+ <property name="icon" >
+ <iconset>image6</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Search</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="objectName" >
+ <string>actionAbout</string>
+ </property>
+ <property name="iconText" >
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="objectName" >
+ <string>actionAboutQt</string>
+ </property>
+ <property name="iconText" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <actiongroup name="FileNewGroup" >
+ <action name="actionNewWindow" >
+ <property name="objectName" >
+ <string>actionNewWindow</string>
+ </property>
+ <property name="iconText" >
+ <string>Window</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ <property name="objectName" >
+ <string>FileNewGroup</string>
+ </property>
+ </actiongroup>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>WebAxWidget</class>
+ <extends>QAxWidget</extends>
+ <header>webaxwidget.h</header>
+ </customwidget>
+ </customwidgets>
+ <connections>
+ <connection>
+ <sender>addressEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>actionGo</receiver>
+ <slot>trigger()</slot>
+ </connection>
+ </connections>
+ <layoutdefault spacing="6" margin="11" />
+ <images>
+ <image name="image0" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
+ </image>
+ <image name="image1" >
+ <data format="XPM.GZ" length="4494" >789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
+ </image>
+ <image name="image2" >
+ <data format="XPM.GZ" length="4494" >789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
+ </image>
+ <image name="image3" >
+ <data format="XPM.GZ" length="802" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
+ </image>
+ <image name="image4" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
+ </image>
+ <image name="image5" >
+ <data format="XPM.GZ" length="5598" >789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
+ </image>
+ <image name="image6" >
+ <data format="XPM.GZ" length="3742" >789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
+ </image>
+ </images>
+</ui>
diff --git a/examples/activeqt/webbrowser/webaxwidget.h b/examples/activeqt/webbrowser/webaxwidget.h
new file mode 100644
index 0000000..0e82311
--- /dev/null
+++ b/examples/activeqt/webbrowser/webaxwidget.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WEBAXWIDGET_H
+#define WEBAXWIDGET_H
+
+#include <ActiveQt/QAxWidget>
+#include "windows.h"
+
+class WebAxWidget : public QAxWidget
+{
+public:
+
+ WebAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0)
+ : QAxWidget(parent, f)
+ {
+ }
+protected:
+ virtual bool translateKeyEvent(int message, int keycode) const
+ {
+ if (message >= WM_KEYFIRST && message <= WM_KEYLAST)
+ return true;
+ else
+ return QAxWidget::translateKeyEvent(message, keycode);
+ }
+
+};
+
+#endif // WEBAXWIDGET_H
diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro
new file mode 100644
index 0000000..992d871
--- /dev/null
+++ b/examples/activeqt/webbrowser/webbrowser.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+
+CONFIG += qaxcontainer
+
+QTDIR_build:REQUIRES = shared
+
+HEADERS = webaxwidget.h
+SOURCES = main.cpp
+FORMS = mainwindow.ui
+wince*: FORMS = wincemainwindow.ui
+
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webbrowser.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
+INSTALLS += target sources
diff --git a/examples/activeqt/webbrowser/wincemainwindow.ui b/examples/activeqt/webbrowser/wincemainwindow.ui
new file mode 100644
index 0000000..98a9ddb
--- /dev/null
+++ b/examples/activeqt/webbrowser/wincemainwindow.ui
@@ -0,0 +1,299 @@
+<ui version="4.0" stdsetdef="1" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="objectName" >
+ <string notr="true" >MainWindow</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>812</width>
+ <height>605</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Qt WebBrowser</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="Frame3" >
+ <property name="objectName" >
+ <string notr="true" >Frame3</string>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QAxWidget" name="WebBrowser" >
+ <property name="objectName" >
+ <string notr="true" >WebBrowser</string>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="control" >
+ <string>{F5AFC7EF-1571-48B6-A69C-F1833F4C3A44}</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QToolBar" name="tbNavigate" >
+ <property name="objectName" >
+ <string notr="true" >tbNavigate</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Navigation</string>
+ </property>
+ <addaction name="actionBack" />
+ <addaction name="actionForward" />
+ <addaction name="actionStop" />
+ <addaction name="actionRefresh" />
+ <addaction name="actionHome" />
+ <addaction name="separator" />
+ <addaction name="actionSearch" />
+ </widget>
+ <widget class="QToolBar" name="tbAddress" >
+ <property name="objectName" >
+ <string notr="true" >tbAddress</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Address</string>
+ </property>
+ <widget class="QLabel" name="lblAddress" >
+ <property name="objectName" >
+ <string notr="true" >lblAddress</string>
+ </property>
+ <property name="text" >
+ <string>Address</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="addressEdit" >
+ <property name="objectName" >
+ <string notr="true" >addressEdit</string>
+ </property>
+ </widget>
+ <addaction name="actionGo" />
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="objectName" >
+ <string notr="true" >menubar</string>
+ </property>
+ <widget class="QMenu" name="PopupMenu" >
+ <property name="objectName" >
+ <string notr="true" >PopupMenu</string>
+ </property>
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <widget class="QMenu" name="FileNewGroup_2" >
+ <property name="objectName" >
+ <string notr="true" >FileNewGroup_2</string>
+ </property>
+ <property name="title" >
+ <string>New</string>
+ </property>
+ <addaction name="actionNewWindow" />
+ </widget>
+ <addaction name="FileNewGroup" />
+ <addaction name="FileNewGroup_2" />
+ <addaction name="separator" />
+ <addaction name="actionFileClose" />
+ </widget>
+ <widget class="QMenu" name="unnamed" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ <addaction name="actionAboutQt" />
+ </widget>
+ <addaction name="PopupMenu" />
+ <addaction name="unnamed" />
+ </widget>
+ <action name="actionGo" >
+ <property name="objectName" >
+ <string>actionGo</string>
+ </property>
+ <property name="icon" >
+ <iconset>image0</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Go</string>
+ </property>
+ </action>
+ <action name="actionBack" >
+ <property name="objectName" >
+ <string>actionBack</string>
+ </property>
+ <property name="icon" >
+ <iconset>image1</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Back</string>
+ </property>
+ <property name="shortcut" >
+ <string>Backspace</string>
+ </property>
+ </action>
+ <action name="actionForward" >
+ <property name="objectName" >
+ <string>actionForward</string>
+ </property>
+ <property name="icon" >
+ <iconset>image2</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Forward</string>
+ </property>
+ </action>
+ <action name="actionStop" >
+ <property name="objectName" >
+ <string>actionStop</string>
+ </property>
+ <property name="icon" >
+ <iconset>image3</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Stop</string>
+ </property>
+ </action>
+ <action name="actionRefresh" >
+ <property name="objectName" >
+ <string>actionRefresh</string>
+ </property>
+ <property name="icon" >
+ <iconset>image4</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Refresh</string>
+ </property>
+ </action>
+ <action name="actionHome" >
+ <property name="objectName" >
+ <string>actionHome</string>
+ </property>
+ <property name="icon" >
+ <iconset>image5</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Home</string>
+ </property>
+ </action>
+ <action name="actionFileClose" >
+ <property name="objectName" >
+ <string>actionFileClose</string>
+ </property>
+ <property name="iconText" >
+ <string>Close</string>
+ </property>
+ <property name="text" >
+ <string>C&amp;lose</string>
+ </property>
+ </action>
+ <action name="actionSearch" >
+ <property name="objectName" >
+ <string>actionSearch</string>
+ </property>
+ <property name="icon" >
+ <iconset>image6</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Search</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="objectName" >
+ <string>actionAbout</string>
+ </property>
+ <property name="iconText" >
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="objectName" >
+ <string>actionAboutQt</string>
+ </property>
+ <property name="iconText" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <actiongroup name="FileNewGroup" >
+ <action name="actionNewWindow" >
+ <property name="objectName" >
+ <string>actionNewWindow</string>
+ </property>
+ <property name="iconText" >
+ <string>Window</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ <property name="objectName" >
+ <string>FileNewGroup</string>
+ </property>
+ </actiongroup>
+ </widget>
+ <connections>
+ <connection>
+ <sender>addressEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>actionGo</receiver>
+ <slot>trigger()</slot>
+ </connection>
+ </connections>
+ <layoutdefault spacing="6" margin="11" />
+ <images>
+ <image name="image0" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
+ </image>
+ <image name="image1" >
+ <data format="XPM.GZ" length="4494" >789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
+ </image>
+ <image name="image2" >
+ <data format="XPM.GZ" length="4494" >789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
+ </image>
+ <image name="image3" >
+ <data format="XPM.GZ" length="802" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
+ </image>
+ <image name="image4" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
+ </image>
+ <image name="image5" >
+ <data format="XPM.GZ" length="5598" >789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
+ </image>
+ <image name="image6" >
+ <data format="XPM.GZ" length="3742" >789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
+ </image>
+ </images>
+</ui>
diff --git a/examples/activeqt/wrapper/main.cpp b/examples/activeqt/wrapper/main.cpp
new file mode 100644
index 0000000..a403084
--- /dev/null
+++ b/examples/activeqt/wrapper/main.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAxFactory>
+#include <QCheckBox>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QToolButton>
+#include <QPixmap>
+
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
+
+
+//! [0]
+class ActiveQtFactory : public QAxFactory
+{
+public:
+ ActiveQtFactory( const QUuid &lib, const QUuid &app )
+ : QAxFactory( lib, app )
+ {}
+ QStringList featureList() const
+ {
+ QStringList list;
+ list << "QCheckBox";
+ list << "QRadioButton";
+ list << "QPushButton";
+ list << "QToolButton";
+ return list;
+ }
+ QObject *createObject(const QString &key)
+ {
+ if ( key == "QCheckBox" )
+ return new QCheckBox(0);
+ if ( key == "QRadioButton" )
+ return new QRadioButton(0);
+ if ( key == "QPushButton" )
+ return new QPushButton(0 );
+ if ( key == "QToolButton" ) {
+ QToolButton *tb = new QToolButton(0);
+// tb->setIcon( QPixmap(fileopen) );
+ return tb;
+ }
+
+ return 0;
+ }
+ const QMetaObject *metaObject( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return &QCheckBox::staticMetaObject;
+ if ( key == "QRadioButton" )
+ return &QRadioButton::staticMetaObject;
+ if ( key == "QPushButton" )
+ return &QPushButton::staticMetaObject;
+ if ( key == "QToolButton" )
+ return &QToolButton::staticMetaObject;
+
+ return 0;
+ }
+ QUuid classID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{6E795DE9-872D-43CF-A831-496EF9D86C68}";
+ if ( key == "QRadioButton" )
+ return "{AFCF78C8-446C-409A-93B3-BA2959039189}";
+ if ( key == "QPushButton" )
+ return "{2B262458-A4B6-468B-B7D4-CF5FEE0A7092}";
+ if ( key == "QToolButton" )
+ return "{7c0ffe7a-60c3-4666-bde2-5cf2b54390a1}";
+
+ return QUuid();
+ }
+ QUuid interfaceID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{4FD39DD7-2DE0-43C1-A8C2-27C51A052810}";
+ if ( key == "QRadioButton" )
+ return "{7CC8AE30-206C-48A3-A009-B0A088026C2F}";
+ if ( key == "QPushButton" )
+ return "{06831CC9-59B6-436A-9578-6D53E5AD03D3}";
+ if ( key == "QToolButton" )
+ return "{6726080f-d63d-4950-a366-9bf33e5cdf84}";
+
+ return QUuid();
+ }
+ QUuid eventsID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{FDB6FFBE-56A3-4E90-8F4D-198488418B3A}";
+ if ( key == "QRadioButton" )
+ return "{73EE4860-684C-4A66-BF63-9B9EFFA0CBE5}";
+ if ( key == "QPushButton" )
+ return "{3CC3F17F-EA59-4B58-BBD3-842D467131DD}";
+ if ( key == "QToolButton" )
+ return "{f4d421fd-4ead-4fd9-8a25-440766939639}";
+
+ return QUuid();
+ }
+};
+//! [0] //! [1]
+
+QAXFACTORY_EXPORT( ActiveQtFactory, "{3B756301-0075-4E40-8BE8-5A81DE2426B7}", "{AB068077-4924-406a-BBAF-42D91C8727DD}" )
+//! [1]
diff --git a/examples/activeqt/wrapper/wrapper.inf b/examples/activeqt/wrapper/wrapper.inf
new file mode 100644
index 0000000..fc17a3d
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapper.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ wrapperax.dll=wrapperax.dll
+ [wrapperax.dll]
+ file-win32-x86=thiscab
+ clsid={23F5012A-7333-43D3-BCA8-836AABC61B4A}
+ RegisterServer=yes
diff --git a/examples/activeqt/wrapper/wrapper.pro b/examples/activeqt/wrapper/wrapper.pro
new file mode 100644
index 0000000..4eb6baf
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapper.pro
@@ -0,0 +1,15 @@
+TEMPLATE = lib
+TARGET = wrapperax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = main.cpp
+RC_FILE = wrapperax.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wrapper.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
+INSTALLS += target sources
diff --git a/examples/activeqt/wrapper/wrapperax.rc b/examples/activeqt/wrapper/wrapperax.rc
new file mode 100644
index 0000000..453688d
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapperax.rc
@@ -0,0 +1,32 @@
+#include "winver.h"
+
+1 TYPELIB "wrapperax.rc"
+1 ICON DISCARDABLE "..\\..\\..\\src\\activeqt\\control\\qaxserver.ico"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEOS 0x00040000L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
+ VALUE "FileDescription", "Wrapper Example (ActiveQt)"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
+ VALUE "InternalName", "wrapperax.dll"
+ VALUE "OriginalFilename", "wrapperax.dll"
+ VALUE "ProductName", "Wrapper Example (ActiveQt)"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/examples/assistant/README b/examples/assistant/README
new file mode 100644
index 0000000..85f5a43
--- /dev/null
+++ b/examples/assistant/README
@@ -0,0 +1,38 @@
+Support for interactive help is provided by the Qt Assistant application.
+Developers can take advantages of the facilities it offers to display
+specially-prepared documentation to users of their applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
new file mode 100644
index 0000000..1477178
--- /dev/null
+++ b/examples/assistant/assistant.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = simpletextviewer
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/assistant
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
+INSTALLS += target sources
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
new file mode 100644
index 0000000..eeab35f
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/about.txt
@@ -0,0 +1,9 @@
+The Simple Text Viewer enables the user to select and view existing
+files.
+
+HTML files is displayed using rich text, while other files are
+presented as plain text. The application provides a file dialog
+allowing the user to search for files using wildcard matching. The
+search is performed within in the specified directory, and the user is
+given an option to browse the existing file system to find the
+relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
new file mode 100644
index 0000000..987abf3
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/browse.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Browse</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Browse</h2></center></p>
+
+ <p>
+ The file dialog let you browse the current file system to
+ specify the directory in which the file you want to open
+ resides.
+ Note that only the specified directory will be searched, any
+ subdirectories will simply be ignored.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/browse.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/filedialog.html b/examples/assistant/simpletextviewer/documentation/filedialog.html
new file mode 100644
index 0000000..afa65ed
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/filedialog.html
@@ -0,0 +1,48 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>File Dialog</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>File Dialog</h2></center></p>
+
+ <p>
+ In the file dialog you can name a particular file name, or
+ search for files using wildcard matching, i.e. specify a
+ file name containing wildcards. In addition you must specify
+ the directory in which the file you search for resides.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/filedialog.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ By default the dialog will search for all files (*) in the
+ current directory (the directory the application is run from).
+ </p>
+
+ <p>
+ When editing the file name and directory parameters, an
+ overview of the matching files are displayed in the
+ dialog. The overview is updated whenever the parameters
+ change.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
diff --git a/examples/assistant/simpletextviewer/documentation/findfile.html b/examples/assistant/simpletextviewer/documentation/findfile.html
new file mode 100644
index 0000000..32e0147
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/findfile.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Find File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Find File</h2></center></p>
+
+ <p>
+ To open and view a file in the Simple Text Viewer, select the
+ 'Open...' option in the 'File' menu. The application will then
+ provide you with a file dialog that you can use to search for
+ any existing file.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/fadedfilemenu.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
new file mode 100644
index 0000000..86db6b1
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/browse.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
new file mode 100644
index 0000000..fde0e43
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
new file mode 100644
index 0000000..883a33a
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
new file mode 100644
index 0000000..3bd2b92
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/handbook.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
new file mode 100644
index 0000000..c28d5e9
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
new file mode 100644
index 0000000..1e5bba3
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/open.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
new file mode 100644
index 0000000..6e83a56
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
new file mode 100644
index 0000000..5a7b1d5
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/index.html
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ HTML files is displayed using rich text, while
+ other files are presented as plain text. The application
+ provides a file dialog allowing the user to search for files
+ using wildcard matching. The search is performed within in the
+ specified directory, and the user is given an option to browse
+ the existing file system to find the relevant directory.
+ </p>
+
+ <ul>
+ <li><a href="findfile.html">Find File</a></li>
+ <ul>
+ <li><a href="filedialog.html">File Dialog</a></li>
+ <li><a href="wildcardmatching.html">WildCard Matching</a></li>
+ <li><a href="browse.html">Browse</a></li>
+ </ul>
+ <li><a href="openfile.html">Open File</a></li>
+ </ul>
+ </body>
+</html>
+
+
+
diff --git a/examples/assistant/simpletextviewer/documentation/intro.html b/examples/assistant/simpletextviewer/documentation/intro.html
new file mode 100644
index 0000000..2e2aa40
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/intro.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ The application provides its own custom documentation that is
+ available through the <b>Help</b> menu in the main window's menubar
+ and through the <b>Help</b> button in the application's find file
+ dialog.
+ </p>
+
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/openfile.html b/examples/assistant/simpletextviewer/documentation/openfile.html
new file mode 100644
index 0000000..e172de9
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/openfile.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Open File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Open File</h2></center></p>
+
+ <p>
+ Once the file you want to view appears in the dialog's
+ display, you can open it in two different ways.
+ </p>
+
+ <p>
+ By pressing the 'Open' button the currently selected file will
+ be opened. By default, the first file in the list of matching
+ files is selected. Another way of opening a file is to simply
+ double click the displayed file name.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/open.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
diff --git a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
new file mode 100644
index 0000000..660df4f
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
@@ -0,0 +1,40 @@
+<!DOCTYPE DCF>
+
+<assistantconfig version="3.2.0">
+
+<profile>
+ <property name="name">simpletextviewer</property>
+ <property name="title">Simple Text Viewer</property>
+ <property name="applicationicon">images/handbook.png</property>
+ <property name="startpage">index.html</property>
+ <property name="aboutmenutext">About Simple Text Viewer</property>
+ <property name="abouturl">about.txt</property>
+ <property name="assistantdocs">.</property>
+</profile>
+
+<DCF ref="index.html" icon="images/handbook.png" title="Simple Text Viewer">
+ <section ref="./findfile.html" title="Find File">
+ <keyword ref="./index.html">Display</keyword>
+ <keyword ref="./index.html">Rich text</keyword>
+ <keyword ref="./index.html">Plain text</keyword>
+ <keyword ref="./findfile.html">Find</keyword>
+ <keyword ref="./findfile.html">File menu</keyword>
+ <keyword ref="./filedialog.html">File name</keyword>
+ <keyword ref="./filedialog.html">File dialog</keyword>
+ <keyword ref="./wildcardmatching.html">File globbing</keyword>
+ <keyword ref="./wildcardmatching.html">Wildcard matching</keyword>
+ <keyword ref="./wildcardmatching.html">Wildcard syntax</keyword>
+ <keyword ref="./browse.html">Browse</keyword>
+ <keyword ref="./browse.html">Directory</keyword>
+ <keyword ref="./openfile.html">Open</keyword>
+ <keyword ref="./openfile.html">Select</keyword>
+
+ <section ref="./filedialog.html" title="File Dialog" />
+ <section ref="./wildcardmatching.html" title="Wildcard Matching" />
+ <section ref="./browse.html" title="Browse" />
+ </section>
+ <section ref="./openfile.html" title="Open File" />
+</DCF>
+
+</assistantconfig>
+
diff --git a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
new file mode 100644
index 0000000..eb1839a
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
@@ -0,0 +1,57 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Wildcard Matching</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Wildcard Matching</h2></center></p>
+
+ <p>
+ Most command shells such as bash or cmd.exe support "file
+ globbing", the ability to identify a group of files by using
+ wildcards.
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/wildcard.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ Wildcard matching provides four features:
+ </p>
+
+ <ul>
+ <li>Any character represents itself apart from those
+ mentioned below. Thus 'c' matches the character 'c'.
+ </li>
+ <li>The '?' character matches any single character.</li>
+ <li>The '*' matches zero or more of any characters.</li>
+ <li>Sets of characters can be represented in square brackets.
+ Within the character class, like outside, backslash
+ has no special meaning.
+ </li>
+ </ul>
+
+ <p>
+ For example we could identify HTML files with
+ <code>*.html</code>. This will match zero or more characters
+ followed by a dot followed by 'h', 't', 'm' and 'l'.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
+
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
new file mode 100644
index 0000000..f73657e
--- /dev/null
+++ b/examples/assistant/simpletextviewer/findfiledialog.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "findfiledialog.h"
+
+//! [0]
+FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
+ QWidget *parent)
+ : QDialog(parent)
+{
+ currentAssistantClient = assistant;
+ currentEditor = editor;
+//! [0]
+
+ createButtons();
+ createComboBoxes();
+ createFilesTree();
+ createLabels();
+ createLayout();
+
+ directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
+ fileNameComboBox->addItem("*");
+ findFiles();
+
+ setWindowTitle(tr("Find File"));
+//! [1]
+}
+//! [1]
+
+void FindFileDialog::browse()
+{
+ QString currentDirectory = directoryComboBox->currentText();
+ QString newDirectory = QFileDialog::getExistingDirectory(this,
+ tr("Select Directory"), currentDirectory);
+ if (!newDirectory.isEmpty()) {
+ directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
+ directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
+ update();
+ }
+}
+
+//! [2]
+void FindFileDialog::help()
+{
+ currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
+ QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
+}
+//! [2]
+
+void FindFileDialog::openFile(QTreeWidgetItem *item)
+{
+ if (!item) {
+ item = foundFilesTree->currentItem();
+ if (!item)
+ return;
+ }
+
+ QString fileName = item->text(0);
+ QString path = directoryComboBox->currentText() + QDir::separator();
+
+ QFile file(path + fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ QString data(file.readAll());
+
+ if (fileName.endsWith(".html"))
+ currentEditor->setHtml(data);
+ else
+ currentEditor->setPlainText(data);
+ }
+ close();
+}
+
+void FindFileDialog::update()
+{
+ findFiles();
+ buttonBox->button(QDialogButtonBox::Open)->setEnabled(
+ foundFilesTree->topLevelItemCount() > 0);
+}
+
+void FindFileDialog::findFiles()
+{
+ QRegExp filePattern(fileNameComboBox->currentText() + "*");
+ filePattern.setPatternSyntax(QRegExp::Wildcard);
+
+ QDir directory(directoryComboBox->currentText());
+
+ QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
+ QStringList matchingFiles;
+
+ foreach (QString file, allFiles) {
+ if (filePattern.exactMatch(file))
+ matchingFiles << file;
+ }
+ showFiles(matchingFiles);
+}
+
+void FindFileDialog::showFiles(const QStringList &files)
+{
+ foundFilesTree->clear();
+
+ for (int i = 0; i < files.count(); ++i) {
+ QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
+ item->setText(0, files[i]);
+ }
+
+ if (files.count() > 0)
+ foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
+}
+
+void FindFileDialog::createButtons()
+{
+ browseButton = new QToolButton;
+ browseButton->setText(tr("..."));
+ connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Help);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
+}
+
+void FindFileDialog::createComboBoxes()
+{
+ directoryComboBox = new QComboBox;
+ fileNameComboBox = new QComboBox;
+
+ fileNameComboBox->setEditable(true);
+ fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ directoryComboBox->setMinimumContentsLength(30);
+ directoryComboBox->setSizeAdjustPolicy(
+ QComboBox::AdjustToMinimumContentsLength);
+ directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)),
+ this, SLOT(update()));
+ connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(update()));
+}
+
+void FindFileDialog::createFilesTree()
+{
+ foundFilesTree = new QTreeWidget;
+ foundFilesTree->setColumnCount(1);
+ foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
+ foundFilesTree->setRootIsDecorated(false);
+ foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
+ this, SLOT(openFile(QTreeWidgetItem *)));
+}
+
+void FindFileDialog::createLabels()
+{
+ directoryLabel = new QLabel(tr("Search in:"));
+ fileNameLabel = new QLabel(tr("File name (including wildcards):"));
+}
+
+void FindFileDialog::createLayout()
+{
+ QHBoxLayout *fileLayout = new QHBoxLayout;
+ fileLayout->addWidget(fileNameLabel);
+ fileLayout->addWidget(fileNameComboBox);
+
+ QHBoxLayout *directoryLayout = new QHBoxLayout;
+ directoryLayout->addWidget(directoryLabel);
+ directoryLayout->addWidget(directoryComboBox);
+ directoryLayout->addWidget(browseButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(fileLayout);
+ mainLayout->addLayout(directoryLayout);
+ mainLayout->addWidget(foundFilesTree);
+ mainLayout->addStretch();
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+}
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
new file mode 100644
index 0000000..0c89fda
--- /dev/null
+++ b/examples/assistant/simpletextviewer/findfiledialog.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDFILEDIALOG_H
+#define FINDFILEDIALOG_H
+
+#include <QAssistantClient>
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QLabel;
+class QTextEdit;
+class QToolButton;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+//! [0]
+class FindFileDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
+ QWidget *parent = 0);
+
+private slots:
+ void browse();
+ void help();
+ void openFile(QTreeWidgetItem *item = 0);
+ void update();
+
+private:
+ void findFiles();
+ void showFiles(const QStringList &files);
+
+ void createButtons();
+ void createComboBoxes();
+ void createFilesTree();
+ void createLabels();
+ void createLayout();
+
+ QAssistantClient *currentAssistantClient;
+ QTextEdit *currentEditor;
+ QTreeWidget *foundFilesTree;
+
+ QComboBox *directoryComboBox;
+ QComboBox *fileNameComboBox;
+
+ QLabel *directoryLabel;
+ QLabel *fileNameLabel;
+
+ QDialogButtonBox *buttonBox;
+
+ QToolButton *browseButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/assistant/simpletextviewer/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
new file mode 100644
index 0000000..cc2f3c0
--- /dev/null
+++ b/examples/assistant/simpletextviewer/mainwindow.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "findfiledialog.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ textViewer = new QTextEdit;
+ textViewer->setReadOnly(true);
+ QFile file("documentation/intro.html");
+ if (file.open(QIODevice::ReadOnly))
+ textViewer->setHtml(file.readAll());
+
+ setCentralWidget(textViewer);
+
+ createActions();
+ createMenus();
+
+ initializeAssistant();
+
+ setWindowTitle(tr("Simple Text Viewer"));
+ resize(750, 400);
+}
+//! [0]
+
+//! [1]
+void MainWindow::closeEvent(QCloseEvent *)
+{
+ if (assistantClient)
+ assistantClient->closeAssistant();
+}
+//! [1]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Simple Text Viewer"),
+ tr("This example demonstrates how to use\n" \
+ "Qt Assistant as help system for your\n" \
+ "own application."));
+}
+
+//! [2]
+void MainWindow::assistant()
+{
+ assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
+ QDir::separator() +
+ "assistant/simpletextviewer/documentation/index.html");
+}
+//! [2]
+
+//! [3]
+void MainWindow::open()
+{
+ FindFileDialog dialog(textViewer, assistantClient);
+ dialog.exec();
+}
+//! [3]
+
+void MainWindow::createActions()
+{
+ assistantAct = new QAction(tr("Help Contents"), this);
+ assistantAct->setShortcut(tr("F1"));
+ connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
+
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ clearAct = new QAction(tr("&Clear"), this);
+ clearAct->setShortcut(tr("Ctrl+C"));
+ connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(clearAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(assistantAct);
+ helpMenu->addSeparator();
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(helpMenu);
+}
+
+//! [4]
+void MainWindow::initializeAssistant()
+{
+ assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
+
+ QStringList arguments;
+ arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
+ assistantClient->setArguments(arguments);
+}
+//! [4]
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
new file mode 100644
index 0000000..b56d201
--- /dev/null
+++ b/examples/assistant/simpletextviewer/mainwindow.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QAssistantClient>
+#include <QMainWindow>
+#include <QTextEdit>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void about();
+//! [0]
+ void assistant();
+//! [0]
+ void open();
+
+protected:
+//! [1]
+ void closeEvent(QCloseEvent *event);
+//! [1]
+
+private:
+ void createActions();
+ void createMenus();
+//! [2]
+ void initializeAssistant();
+//! [2]
+
+//! [3]
+ QAssistantClient *assistantClient;
+//! [3]
+ QTextEdit *textViewer;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+
+ QAction *assistantAct;
+ QAction *clearAct;
+ QAction *openAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
new file mode 100644
index 0000000..4b66edb
--- /dev/null
+++ b/examples/assistant/simpletextviewer/simpletextviewer.pro
@@ -0,0 +1,16 @@
+CONFIG += assistant
+
+QT += network
+
+HEADERS = mainwindow.h \
+ findfiledialog.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ findfiledialog.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
+INSTALLS += target sources
+
diff --git a/examples/dbus/complexpingpong/complexping.cpp b/examples/dbus/complexpingpong/complexping.cpp
new file mode 100644
index 0000000..18fa66d
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QFile>
+#include <QtCore/QDebug>
+#include <QtCore/QProcess>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "complexping.h"
+
+void Ping::start(const QString &name, const QString &oldValue, const QString &newValue)
+{
+ Q_UNUSED(oldValue);
+
+ if (name != SERVICE_NAME || newValue.isEmpty())
+ return;
+
+ // open stdin for reading
+ qstdin.open(stdin, QIODevice::ReadOnly);
+
+ // find our remote
+ iface = new QDBusInterface(SERVICE_NAME, "/", "com.trolltech.QtDBus.ComplexPong.Pong",
+ QDBusConnection::sessionBus(), this);
+ if (!iface->isValid()) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ QCoreApplication::instance()->quit();
+ }
+
+ connect(iface, SIGNAL(aboutToQuit()), QCoreApplication::instance(), SLOT(quit()));
+
+ while (true) {
+ printf("Ask your question: ");
+
+ QString line = QString::fromLocal8Bit(qstdin.readLine()).trimmed();
+ if (line.isEmpty()) {
+ iface->call("quit");
+ return;
+ } else if (line == "value") {
+ QVariant reply = iface->property("value");
+ if (!reply.isNull())
+ printf("value = %s\n", qPrintable(reply.toString()));
+ } else if (line.startsWith("value=")) {
+ iface->setProperty("value", line.mid(6));
+ } else {
+ QDBusReply<QDBusVariant> reply = iface->call("query", line);
+ if (reply.isValid())
+ printf("Reply was: %s\n", qPrintable(reply.value().variant().toString()));
+ }
+
+ if (iface->lastError().isValid())
+ fprintf(stderr, "Call failed: %s\n", qPrintable(iface->lastError().message()));
+ }
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ Ping ping;
+ ping.connect(QDBusConnection::sessionBus().interface(),
+ SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+ SLOT(start(QString,QString,QString)));
+
+ QProcess pong;
+ pong.start("./complexpong");
+
+ app.exec();
+}
diff --git a/examples/dbus/complexpingpong/complexping.h b/examples/dbus/complexpingpong/complexping.h
new file mode 100644
index 0000000..4c2a473
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMPLEXPING_H
+#define COMPLEXPING_H
+
+#include <QtCore/QObject>
+#include <QtCore/QFile>
+#include <QtDBus/QDBusInterface>
+
+class Ping: public QObject
+{
+ Q_OBJECT
+public slots:
+ void start(const QString &, const QString &, const QString &);
+public:
+ QFile qstdin;
+ QDBusInterface *iface;
+};
+
+#endif
diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro
new file mode 100644
index 0000000..4b37b03
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += complexping.h ping-common.h
+SOURCES += complexping.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+INSTALLS += target sources
diff --git a/examples/dbus/complexpingpong/complexpingpong.pro b/examples/dbus/complexpingpong/complexpingpong.pro
new file mode 100644
index 0000000..cd618d5
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpingpong.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+win32:CONFIG += console
+SUBDIRS = complexping.pro complexpong.pro
diff --git a/examples/dbus/complexpingpong/complexpong.cpp b/examples/dbus/complexpingpong/complexpong.cpp
new file mode 100644
index 0000000..283e440
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTimer>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "complexpong.h"
+
+// the property
+QString Pong::value() const
+{
+ return m_value;
+}
+
+void Pong::setValue(const QString &newValue)
+{
+ m_value = newValue;
+}
+
+void Pong::quit()
+{
+ QTimer::singleShot(0, QCoreApplication::instance(), SLOT(quit()));
+}
+
+QDBusVariant Pong::query(const QString &query)
+{
+ QString q = query.toLower();
+ if (q == "hello")
+ return QDBusVariant("World");
+ if (q == "ping")
+ return QDBusVariant("Pong");
+ if (q.indexOf("the answer to life, the universe and everything") != -1)
+ return QDBusVariant(42);
+ if (q.indexOf("unladen swallow") != -1) {
+ if (q.indexOf("european") != -1)
+ return QDBusVariant(11.0);
+ return QDBusVariant(QByteArray("african or european?"));
+ }
+
+ return QDBusVariant("Sorry, I don't know the answer");
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QObject obj;
+ Pong *pong = new Pong(&obj);
+ pong->connect(&app, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ pong->setProperty("value", "initial value");
+ QDBusConnection::sessionBus().registerObject("/", &obj);
+
+ if (!QDBusConnection::sessionBus().registerService(SERVICE_NAME)) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ exit(1);
+ }
+
+ app.exec();
+ return 0;
+}
+
diff --git a/examples/dbus/complexpingpong/complexpong.h b/examples/dbus/complexpingpong/complexpong.h
new file mode 100644
index 0000000..5682e99
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMPLEXPONG_H
+#define COMPLEXPONG_H
+
+#include <QtCore/QObject>
+#include <QtDBus/QDBusAbstractAdaptor>
+#include <QtDBus/QDBusVariant>
+
+class Pong: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
+ Q_PROPERTY(QString value READ value WRITE setValue)
+public:
+ QString m_value;
+ QString value() const;
+ void setValue(const QString &newValue);
+
+ Pong(QObject *obj) : QDBusAbstractAdaptor(obj)
+ { }
+signals:
+ void aboutToQuit();
+public slots:
+ QDBusVariant query(const QString &query);
+ Q_NOREPLY void quit();
+};
+
+#endif
diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro
new file mode 100644
index 0000000..e62fb85
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += complexpong.h
+SOURCES += complexpong.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+INSTALLS += target sources
diff --git a/examples/dbus/complexpingpong/ping-common.h b/examples/dbus/complexpingpong/ping-common.h
new file mode 100644
index 0000000..06228a9
--- /dev/null
+++ b/examples/dbus/complexpingpong/ping-common.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
diff --git a/examples/dbus/dbus-chat/chat.cpp b/examples/dbus/dbus-chat/chat.cpp
new file mode 100644
index 0000000..1dbc764
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "chat.h"
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+
+#include "chat_adaptor.h"
+#include "chat_interface.h"
+
+ChatMainWindow::ChatMainWindow()
+ : m_nickname(QLatin1String("nickname"))
+{
+ setupUi(this);
+ sendButton->setEnabled(false);
+
+ connect(messageLineEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(textChangedSlot(QString)));
+ connect(sendButton, SIGNAL(clicked(bool)), this, SLOT(sendClickedSlot()));
+ connect(actionChangeNickname, SIGNAL(triggered(bool)), this, SLOT(changeNickname()));
+ connect(actionAboutQt, SIGNAL(triggered(bool)), this, SLOT(aboutQt()));
+ connect(qApp, SIGNAL(lastWindowClosed()), this, SLOT(exiting()));
+
+ // add our D-Bus interface and connect to D-Bus
+ new ChatAdaptor(this);
+ QDBusConnection::sessionBus().registerObject("/", this);
+
+ com::trolltech::chat *iface;
+ iface = new com::trolltech::chat(QString(), QString(), QDBusConnection::sessionBus(), this);
+ //connect(iface, SIGNAL(message(QString,QString)), this, SLOT(messageSlot(QString,QString)));
+ QDBusConnection::sessionBus().connect(QString(), QString(), "com.trolltech.chat", "message", this, SLOT(messageSlot(QString,QString)));
+ connect(iface, SIGNAL(action(QString,QString)), this, SLOT(actionSlot(QString,QString)));
+
+ NicknameDialog dialog;
+ dialog.cancelButton->setVisible(false);
+ dialog.exec();
+ m_nickname = dialog.nickname->text().trimmed();
+ emit action(m_nickname, QLatin1String("joins the chat"));
+}
+
+ChatMainWindow::~ChatMainWindow()
+{
+}
+
+void ChatMainWindow::rebuildHistory()
+{
+ QString history = m_messages.join( QLatin1String("\n" ) );
+ chatHistory->setPlainText(history);
+}
+
+void ChatMainWindow::messageSlot(const QString &nickname, const QString &text)
+{
+ QString msg( QLatin1String("<%1> %2") );
+ msg = msg.arg(nickname, text);
+ m_messages.append(msg);
+
+ if (m_messages.count() > 100)
+ m_messages.removeFirst();
+ rebuildHistory();
+}
+
+void ChatMainWindow::actionSlot(const QString &nickname, const QString &text)
+{
+ QString msg( QLatin1String("* %1 %2") );
+ msg = msg.arg(nickname, text);
+ m_messages.append(msg);
+
+ if (m_messages.count() > 100)
+ m_messages.removeFirst();
+ rebuildHistory();
+}
+
+void ChatMainWindow::textChangedSlot(const QString &newText)
+{
+ sendButton->setEnabled(!newText.isEmpty());
+}
+
+void ChatMainWindow::sendClickedSlot()
+{
+ //emit message(m_nickname, messageLineEdit->text());
+ QDBusMessage msg = QDBusMessage::createSignal("/", "com.trolltech.chat", "message");
+ msg << m_nickname << messageLineEdit->text();
+ QDBusConnection::sessionBus().send(msg);
+ messageLineEdit->setText(QString());
+}
+
+void ChatMainWindow::changeNickname()
+{
+ NicknameDialog dialog(this);
+ if (dialog.exec() == QDialog::Accepted) {
+ QString old = m_nickname;
+ m_nickname = dialog.nickname->text().trimmed();
+ emit action(old, QString("is now known as %1").arg(m_nickname));
+ }
+}
+
+void ChatMainWindow::aboutQt()
+{
+ QMessageBox::aboutQt(this);
+}
+
+void ChatMainWindow::exiting()
+{
+ emit action(m_nickname, QLatin1String("leaves the chat"));
+}
+
+NicknameDialog::NicknameDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ qWarning("Cannot connect to the D-Bus session bus.\n"
+ "Please check your system settings and try again.\n");
+ return 1;
+ }
+
+ ChatMainWindow chat;
+ chat.show();
+ return app.exec();
+}
diff --git a/examples/dbus/dbus-chat/chat.h b/examples/dbus/dbus-chat/chat.h
new file mode 100644
index 0000000..48b549e
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHAT_H
+#define CHAT_H
+
+#include <QtCore/QStringList>
+#include <QtDBus/QtDBus>
+#include "ui_chatmainwindow.h"
+#include "ui_chatsetnickname.h"
+
+class ChatMainWindow: public QMainWindow, Ui::ChatMainWindow
+{
+ Q_OBJECT
+ QString m_nickname;
+ QStringList m_messages;
+public:
+ ChatMainWindow();
+ ~ChatMainWindow();
+
+ void rebuildHistory();
+
+signals:
+ void message(const QString &nickname, const QString &text);
+ void action(const QString &nickname, const QString &text);
+
+private slots:
+ void messageSlot(const QString &nickname, const QString &text);
+ void actionSlot(const QString &nickname, const QString &text);
+ void textChangedSlot(const QString &newText);
+ void sendClickedSlot();
+ void changeNickname();
+ void aboutQt();
+ void exiting();
+};
+
+class NicknameDialog: public QDialog, public Ui::NicknameDialog
+{
+ Q_OBJECT
+public:
+ NicknameDialog(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp
new file mode 100644
index 0000000..4292a58
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_adaptor.cpp
@@ -0,0 +1,35 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#include "chat_adaptor.h"
+#include <QtCore/QMetaObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+/*
+ * Implementation of adaptor class ChatAdaptor
+ */
+
+ChatAdaptor::ChatAdaptor(QObject *parent)
+ : QDBusAbstractAdaptor(parent)
+{
+ // constructor
+ setAutoRelaySignals(true);
+}
+
+ChatAdaptor::~ChatAdaptor()
+{
+ // destructor
+}
+
diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h
new file mode 100644
index 0000000..9d8e7a6
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_adaptor.h
@@ -0,0 +1,57 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#ifndef CHAT_ADAPTOR_H_142741156243605
+#define CHAT_ADAPTOR_H_142741156243605
+
+#include <QtCore/QObject>
+#include <QtDBus/QtDBus>
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+template<class T> class QList;
+template<class Key, class Value> class QMap;
+class QString;
+class QStringList;
+class QVariant;
+QT_END_NAMESPACE
+
+/*
+ * Adaptor class for interface com.trolltech.chat
+ */
+class ChatAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.chat")
+ Q_CLASSINFO("D-Bus Introspection", ""
+" <interface name=\"com.trolltech.chat\" >\n"
+" <signal name=\"message\" >\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" </signal>\n"
+" <signal name=\"action\" >\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" </signal>\n"
+" </interface>\n"
+ "")
+public:
+ ChatAdaptor(QObject *parent);
+ virtual ~ChatAdaptor();
+
+public: // PROPERTIES
+public Q_SLOTS: // METHODS
+Q_SIGNALS: // SIGNALS
+ void action(const QString &nickname, const QString &text);
+ void message(const QString &nickname, const QString &text);
+};
+
+#endif
diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp
new file mode 100644
index 0000000..5e2d2a7
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_interface.cpp
@@ -0,0 +1,25 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "chat_interface.h"
+/*
+ * Implementation of interface class ComTrolltechChatInterface
+ */
+
+ComTrolltechChatInterface::ComTrolltechChatInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+ComTrolltechChatInterface::~ComTrolltechChatInterface()
+{
+}
+
diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h
new file mode 100644
index 0000000..75140cc
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_interface.h
@@ -0,0 +1,49 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef CHAT_INTERFACE_H_143021156243606
+#define CHAT_INTERFACE_H_143021156243606
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface com.trolltech.chat
+ */
+class ComTrolltechChatInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "com.trolltech.chat"; }
+
+public:
+ ComTrolltechChatInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~ComTrolltechChatInterface();
+
+public Q_SLOTS: // METHODS
+Q_SIGNALS: // SIGNALS
+ void action(const QString &nickname, const QString &text);
+ void message(const QString &nickname, const QString &text);
+};
+
+namespace com {
+ namespace trolltech {
+ typedef ::ComTrolltechChatInterface chat;
+ }
+}
+#endif
diff --git a/examples/dbus/dbus-chat/chatmainwindow.ui b/examples/dbus/dbus-chat/chatmainwindow.ui
new file mode 100644
index 0000000..0616dcb
--- /dev/null
+++ b/examples/dbus/dbus-chat/chatmainwindow.ui
@@ -0,0 +1,185 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>ChatMainWindow</class>
+ <widget class="QMainWindow" name="ChatMainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>QtDBus Chat</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextBrowser" name="chatHistory" >
+ <property name="acceptDrops" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Messages sent and received from other users</string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Message:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>messageLineEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="messageLineEdit" />
+ </item>
+ <item>
+ <widget class="QPushButton" name="sendButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Sends a message to other people</string>
+ </property>
+ <property name="whatsThis" >
+ <string/>
+ </property>
+ <property name="text" >
+ <string>Send</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuQuit" >
+ <property name="title" >
+ <string>Help</string>
+ </property>
+ <addaction name="actionAboutQt" />
+ </widget>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>File</string>
+ </property>
+ <addaction name="actionChangeNickname" />
+ <addaction name="separator" />
+ <addaction name="actionQuit" />
+ </widget>
+ <addaction name="menuFile" />
+ <addaction name="menuQuit" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="actionQuit" >
+ <property name="text" >
+ <string>Quit</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+Q</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="text" >
+ <string>About Qt...</string>
+ </property>
+ </action>
+ <action name="actionChangeNickname" >
+ <property name="text" >
+ <string>Change nickname...</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>chatHistory</tabstop>
+ <tabstop>messageLineEdit</tabstop>
+ <tabstop>sendButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>messageLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>sendButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>299</x>
+ <y>554</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>744</x>
+ <y>551</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>actionQuit</sender>
+ <signal>triggered(bool)</signal>
+ <receiver>ChatMainWindow</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>399</x>
+ <y>299</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/dbus/dbus-chat/chatsetnickname.ui b/examples/dbus/dbus-chat/chatsetnickname.ui
new file mode 100644
index 0000000..fb9894e
--- /dev/null
+++ b/examples/dbus/dbus-chat/chatsetnickname.ui
@@ -0,0 +1,149 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>NicknameDialog</class>
+ <widget class="QDialog" name="NicknameDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>396</width>
+ <height>105</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Set nickname</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>New nickname:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="nickname" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>131</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>NicknameDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>278</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>96</x>
+ <y>254</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>NicknameDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>369</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>179</x>
+ <y>282</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/dbus/dbus-chat/com.trolltech.chat.xml b/examples/dbus/dbus-chat/com.trolltech.chat.xml
new file mode 100644
index 0000000..618c8c4
--- /dev/null
+++ b/examples/dbus/dbus-chat/com.trolltech.chat.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="com.trolltech.chat">
+ <signal name="message">
+ <arg name="nickname" type="s" direction="out"/>
+ <arg name="text" type="s" direction="out"/>
+ </signal>
+ <signal name="action">
+ <arg name="nickname" type="s" direction="out"/>
+ <arg name="text" type="s" direction="out"/>
+ </signal>
+ </interface>
+</node>
+
diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro
new file mode 100644
index 0000000..a094048
--- /dev/null
+++ b/examples/dbus/dbus-chat/dbus-chat.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+HEADERS += chat.h chat_adaptor.h chat_interface.h
+SOURCES += chat.cpp chat_adaptor.cpp chat_interface.cpp
+FORMS += chatmainwindow.ui chatsetnickname.ui
+
+#DBUS_ADAPTORS += com.trolltech.chat.xml
+#DBUS_INTERFACES += com.trolltech.chat.xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat
+INSTALLS += target sources
diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro
new file mode 100644
index 0000000..36bdc1a
--- /dev/null
+++ b/examples/dbus/dbus.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = listnames \
+ pingpong \
+ complexpingpong \
+ dbus-chat \
+ remotecontrolledcar
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus
+sources.files = *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus
+INSTALLS += sources
diff --git a/examples/dbus/listnames/listnames.cpp b/examples/dbus/listnames/listnames.cpp
new file mode 100644
index 0000000..dca32e6
--- /dev/null
+++ b/examples/dbus/listnames/listnames.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+#include <QtCore/QStringList>
+#include <QtDBus/QtDBus>
+
+void method1()
+{
+ qDebug() << "Method 1:";
+
+ QDBusReply<QStringList> reply = QDBusConnection::sessionBus().interface()->registeredServiceNames();
+ if (!reply.isValid()) {
+ qDebug() << "Error:" << reply.error().message();
+ exit(1);
+ }
+ foreach (QString name, reply.value())
+ qDebug() << name;
+}
+
+void method2()
+{
+ qDebug() << "Method 2:";
+
+ QDBusConnection bus = QDBusConnection::sessionBus();
+ QDBusInterface dbus_iface("org.freedesktop.DBus", "/org/freedesktop/DBus",
+ "org.freedesktop.DBus", bus);
+ qDebug() << dbus_iface.call("ListNames").arguments().at(0);
+}
+
+void method3()
+{
+ qDebug() << "Method 3:";
+ qDebug() << QDBusConnection::sessionBus().interface()->registeredServiceNames().value();
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ method1();
+ method2();
+ method3();
+
+ return 0;
+}
diff --git a/examples/dbus/listnames/listnames.pro b/examples/dbus/listnames/listnames.pro
new file mode 100644
index 0000000..e2096a7
--- /dev/null
+++ b/examples/dbus/listnames/listnames.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+win32:CONFIG += console
+
+# Input
+SOURCES += listnames.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/listnames
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/listnames
+INSTALLS += target sources
+
diff --git a/examples/dbus/pingpong/ping-common.h b/examples/dbus/pingpong/ping-common.h
new file mode 100644
index 0000000..06228a9
--- /dev/null
+++ b/examples/dbus/pingpong/ping-common.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
diff --git a/examples/dbus/pingpong/ping.cpp b/examples/dbus/pingpong/ping.cpp
new file mode 100644
index 0000000..d773be4
--- /dev/null
+++ b/examples/dbus/pingpong/ping.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ QDBusInterface iface(SERVICE_NAME, "/", "", QDBusConnection::sessionBus());
+ if (iface.isValid()) {
+ QDBusReply<QString> reply = iface.call("ping", argc > 1 ? argv[1] : "");
+ if (reply.isValid()) {
+ printf("Reply was: %s\n", qPrintable(reply.value()));
+ return 0;
+ }
+
+ fprintf(stderr, "Call failed: %s\n", qPrintable(reply.error().message()));
+ return 1;
+ }
+
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ return 1;
+}
diff --git a/examples/dbus/pingpong/ping.pro b/examples/dbus/pingpong/ping.pro
new file mode 100644
index 0000000..5e5f07a
--- /dev/null
+++ b/examples/dbus/pingpong/ping.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = ping
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += ping-common.h
+SOURCES += ping.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+INSTALLS += target sources
diff --git a/examples/dbus/pingpong/pingpong.pro b/examples/dbus/pingpong/pingpong.pro
new file mode 100644
index 0000000..07fca74
--- /dev/null
+++ b/examples/dbus/pingpong/pingpong.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+win32:CONFIG += console
+SUBDIRS = ping.pro pong.pro
diff --git a/examples/dbus/pingpong/pong.cpp b/examples/dbus/pingpong/pong.cpp
new file mode 100644
index 0000000..fc7800c
--- /dev/null
+++ b/examples/dbus/pingpong/pong.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTimer>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "pong.h"
+
+QString Pong::ping(const QString &arg)
+{
+ QMetaObject::invokeMethod(QCoreApplication::instance(), "quit");
+ return QString("ping(\"%1\") got called").arg(arg);
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ if (!QDBusConnection::sessionBus().registerService(SERVICE_NAME)) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ exit(1);
+ }
+
+ Pong pong;
+ QDBusConnection::sessionBus().registerObject("/", &pong, QDBusConnection::ExportAllSlots);
+
+ app.exec();
+ return 0;
+}
diff --git a/examples/dbus/pingpong/pong.h b/examples/dbus/pingpong/pong.h
new file mode 100644
index 0000000..4bc45d8
--- /dev/null
+++ b/examples/dbus/pingpong/pong.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PONG_H
+#define PONG_H
+
+#include <QtCore/QObject>
+
+class Pong: public QObject
+{
+ Q_OBJECT
+public slots:
+ Q_SCRIPTABLE QString ping(const QString &arg);
+};
+
+#endif
diff --git a/examples/dbus/pingpong/pong.pro b/examples/dbus/pingpong/pong.pro
new file mode 100644
index 0000000..f377a71
--- /dev/null
+++ b/examples/dbus/pingpong/pong.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = pong
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += ping-common.h pong.h
+SOURCES += pong.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp
new file mode 100644
index 0000000..5f3bef9
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "car.h"
+#include <QtGui/QtGui>
+#include <math.h>
+
+static const double Pi = 3.14159265358979323846264338327950288419717;
+
+QRectF Car::boundingRect() const
+{
+ return QRectF(-35, -81, 70, 115);
+}
+
+Car::Car() : color(Qt::green), wheelsAngle(0), speed(0)
+{
+ startTimer(1000 / 33);
+ setFlag(QGraphicsItem::ItemIsMovable, true);
+ setFlag(QGraphicsItem::ItemIsFocusable, true);
+}
+
+void Car::accelerate()
+{
+ if (speed < 10)
+ ++speed;
+}
+
+void Car::decelerate()
+{
+ if (speed > -10)
+ --speed;
+}
+
+void Car::turnLeft()
+{
+ if (wheelsAngle > -30)
+ wheelsAngle -= 5;
+}
+
+void Car::turnRight()
+{
+ if (wheelsAngle < 30)
+ wheelsAngle += 5;
+}
+
+void Car::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->setBrush(Qt::gray);
+ painter->drawRect(-20, -58, 40, 2); // front axel
+ painter->drawRect(-20, 7, 40, 2); // rear axel
+
+ painter->setBrush(color);
+ painter->drawRect(-25, -79, 50, 10); // front wing
+
+ painter->drawEllipse(-25, -48, 50, 20); // side pods
+ painter->drawRect(-25, -38, 50, 35); // side pods
+ painter->drawRect(-5, 9, 10, 10); // back pod
+
+ painter->drawEllipse(-10, -81, 20, 100); // main body
+
+ painter->drawRect(-17, 19, 34, 15); // rear wing
+
+ painter->setBrush(Qt::black);
+ painter->drawPie(-5, -51, 10, 15, 0, 180 * 16);
+ painter->drawRect(-5, -44, 10, 10); // cocpit
+
+ painter->save();
+ painter->translate(-20, -58);
+ painter->rotate(wheelsAngle);
+ painter->drawRect(-10, -7, 10, 15); // front left
+ painter->restore();
+
+ painter->save();
+ painter->translate(20, -58);
+ painter->rotate(wheelsAngle);
+ painter->drawRect(0, -7, 10, 15); // front left
+ painter->restore();
+
+ painter->drawRect(-30, 0, 12, 17); // rear left
+ painter->drawRect(19, 0, 12, 17); // rear right
+}
+
+void Car::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+
+ const qreal axelDistance = 54;
+ qreal wheelsAngleRads = (wheelsAngle * Pi) / 180;
+ qreal turnDistance = ::cos(wheelsAngleRads) * axelDistance * 2;
+ qreal turnRateRads = wheelsAngleRads / turnDistance; // rough estimate
+ qreal turnRate = (turnRateRads * 180) / Pi;
+ qreal rotation = speed * turnRate;
+
+ rotate(rotation);
+ translate(0, -speed);
+ update();
+}
diff --git a/examples/dbus/remotecontrolledcar/car/car.h b/examples/dbus/remotecontrolledcar/car/car.h
new file mode 100644
index 0000000..609bc03
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CAR_H
+#define CAR_H
+
+#include <QGraphicsItem>
+#include <QObject>
+#include <QBrush>
+
+class Car : public QObject, public QGraphicsItem
+{
+ Q_OBJECT
+
+public:
+ Car();
+ QRectF boundingRect() const;
+
+public Q_SLOTS:
+ void accelerate();
+ void decelerate();
+ void turnLeft();
+ void turnRight();
+
+Q_SIGNALS:
+ void crashed();
+
+protected:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void timerEvent(QTimerEvent *event);
+
+private:
+ QBrush color;
+ qreal wheelsAngle; // used when applying rotation
+ qreal speed; // delta movement along the body axis
+};
+
+#endif // CAR_H
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
new file mode 100644
index 0000000..d4a97fa
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Mon Aug 28 19:50:14 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+# DBUS_ADAPTORS += car.xml
+HEADERS += car.h car_adaptor_p.h
+SOURCES += car.cpp main.cpp car_adaptor.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/car/car.xml b/examples/dbus/remotecontrolledcar/car/car.xml
new file mode 100644
index 0000000..641c698
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/trollech/examples/car">
+ <interface name="com.trolltech.Examples.CarInterface">
+ <method name="accelerate"/>
+ <method name="decelerate"/>
+ <method name="turnLeft"/>
+ <method name="turnRight"/>
+ <signal name="crashed"/>
+ </interface>
+</node> \ No newline at end of file
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
new file mode 100644
index 0000000..f0c9aa0
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
@@ -0,0 +1,59 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#include "car_adaptor_p.h"
+#include <QtCore/QMetaObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+/*
+ * Implementation of adaptor class CarAdaptor
+ */
+
+CarAdaptor::CarAdaptor(QObject *parent)
+ : QDBusAbstractAdaptor(parent)
+{
+ // constructor
+ setAutoRelaySignals(true);
+}
+
+CarAdaptor::~CarAdaptor()
+{
+ // destructor
+}
+
+void CarAdaptor::accelerate()
+{
+ // handle method call com.trolltech.Examples.CarInterface.accelerate
+ QMetaObject::invokeMethod(parent(), "accelerate");
+}
+
+void CarAdaptor::decelerate()
+{
+ // handle method call com.trolltech.Examples.CarInterface.decelerate
+ QMetaObject::invokeMethod(parent(), "decelerate");
+}
+
+void CarAdaptor::turnLeft()
+{
+ // handle method call com.trolltech.Examples.CarInterface.turnLeft
+ QMetaObject::invokeMethod(parent(), "turnLeft");
+}
+
+void CarAdaptor::turnRight()
+{
+ // handle method call com.trolltech.Examples.CarInterface.turnRight
+ QMetaObject::invokeMethod(parent(), "turnRight");
+}
+
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
new file mode 100644
index 0000000..39782f5
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
@@ -0,0 +1,57 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#ifndef CAR_ADAPTOR_P_H_1157030132
+#define CAR_ADAPTOR_P_H_1157030132
+
+#include <QtCore/QObject>
+#include <QtDBus/QtDBus>
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+template<class T> class QList;
+template<class Key, class Value> class QMap;
+class QString;
+class QStringList;
+class QVariant;
+QT_END_NAMESPACE
+
+/*
+ * Adaptor class for interface com.trolltech.Examples.CarInterface
+ */
+class CarAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
+ Q_CLASSINFO("D-Bus Introspection", ""
+" <interface name=\"com.trolltech.Examples.CarInterface\" >\n"
+" <method name=\"accelerate\" />\n"
+" <method name=\"decelerate\" />\n"
+" <method name=\"turnLeft\" />\n"
+" <method name=\"turnRight\" />\n"
+" <signal name=\"crashed\" />\n"
+" </interface>\n"
+ "")
+public:
+ CarAdaptor(QObject *parent);
+ virtual ~CarAdaptor();
+
+public: // PROPERTIES
+public Q_SLOTS: // METHODS
+ void accelerate();
+ void decelerate();
+ void turnLeft();
+ void turnRight();
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+#endif
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
new file mode 100644
index 0000000..13a191a
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "car.h"
+#include "car_adaptor_p.h"
+#include <QtGui/QApplication>
+#include <QtGui/QGraphicsView>
+#include <QtGui/QGraphicsScene>
+#include <QtDBus/QDBusConnection>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QGraphicsScene scene;
+ scene.setSceneRect(-500, -500, 1000, 1000);
+ scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+
+ Car *car = new Car();
+ scene.addItem(car);
+
+ QGraphicsView view(&scene);
+ view.setRenderHint(QPainter::Antialiasing);
+ view.setBackgroundBrush(Qt::darkGray);
+ view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Qt DBus Controlled Car"));
+ view.resize(400, 300);
+ view.show();
+
+ new CarAdaptor(car);
+ QDBusConnection connection = QDBusConnection::sessionBus();
+ connection.registerObject("/Car", car);
+ connection.registerService("com.trolltech.CarExample");
+
+ return app.exec();
+}
diff --git a/examples/dbus/remotecontrolledcar/controller/car.xml b/examples/dbus/remotecontrolledcar/controller/car.xml
new file mode 100644
index 0000000..641c698
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/trollech/examples/car">
+ <interface name="com.trolltech.Examples.CarInterface">
+ <method name="accelerate"/>
+ <method name="decelerate"/>
+ <method name="turnLeft"/>
+ <method name="turnRight"/>
+ <signal name="crashed"/>
+ </interface>
+</node> \ No newline at end of file
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
new file mode 100644
index 0000000..daa9467
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "car_interface_p.h"
+
+/*
+ * Implementation of interface class CarInterface
+ */
+
+CarInterface::CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+CarInterface::~CarInterface()
+{
+}
+
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
new file mode 100644
index 0000000..3373312
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
@@ -0,0 +1,74 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef CAR_INTERFACE_P_H_1156853585
+#define CAR_INTERFACE_P_H_1156853585
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface com.trolltech.Examples.CarInterface
+ */
+class CarInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "com.trolltech.Examples.CarInterface"; }
+
+public:
+ CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~CarInterface();
+
+public Q_SLOTS: // METHODS
+ inline QDBusReply<void> accelerate()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("accelerate"), argumentList);
+ }
+
+ inline QDBusReply<void> decelerate()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("decelerate"), argumentList);
+ }
+
+ inline QDBusReply<void> turnLeft()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("turnLeft"), argumentList);
+ }
+
+ inline QDBusReply<void> turnRight()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("turnRight"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+namespace com {
+ namespace trolltech {
+ namespace Examples {
+ typedef ::CarInterface CarInterface;
+ }
+ }
+}
+#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
new file mode 100644
index 0000000..7d27bd3
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "controller.h"
+#include "car_interface_p.h"
+
+Controller::Controller(QWidget *parent)
+ : QWidget(parent)
+{
+ ui.setupUi(this);
+ car = new CarInterface("com.trolltech.CarExample", "/Car",
+ QDBusConnection::sessionBus(), this);
+ startTimer(1000);
+}
+
+void Controller::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+ if (car->isValid())
+ ui.label->setText("connected");
+ else
+ ui.label->setText("disconnected");
+}
+
+void Controller::on_accelerate_clicked()
+{
+ car->accelerate();
+}
+
+void Controller::on_decelerate_clicked()
+{
+ car->decelerate();
+}
+
+void Controller::on_left_clicked()
+{
+ car->turnLeft();
+}
+
+void Controller::on_right_clicked()
+{
+ car->turnRight();
+}
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h
new file mode 100644
index 0000000..200ef3c
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTROLLER_H
+#define CONTROLLER_H
+
+#include "ui_controller.h"
+
+class CarInterface;
+
+class Controller : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Controller(QWidget *parent = 0);
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private slots:
+ void on_accelerate_clicked();
+ void on_decelerate_clicked();
+ void on_left_clicked();
+ void on_right_clicked();
+
+private:
+ Ui::Controller ui;
+ CarInterface *car;
+};
+
+#endif
+
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
new file mode 100644
index 0000000..3015127
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -0,0 +1,21 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Tue Aug 29 12:28:05 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+# DBUS_INTERFACES += car.xml
+FORMS += controller.ui
+HEADERS += car_interface_p.h controller.h
+SOURCES += main.cpp car_interface.cpp controller.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.ui b/examples/dbus/remotecontrolledcar/controller/controller.ui
new file mode 100644
index 0000000..379015b
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.ui
@@ -0,0 +1,64 @@
+<ui version="4.0" >
+ <class>Controller</class>
+ <widget class="QWidget" name="Controller" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>255</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Controller</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Controller</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QPushButton" name="decelerate" >
+ <property name="text" >
+ <string>Decelerate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QPushButton" name="accelerate" >
+ <property name="text" >
+ <string>Accelerate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="right" >
+ <property name="text" >
+ <string>Right</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="left" >
+ <property name="text" >
+ <string>Left</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/dbus/remotecontrolledcar/controller/main.cpp b/examples/dbus/remotecontrolledcar/controller/main.cpp
new file mode 100644
index 0000000..f28661e
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDBus>
+
+#include "controller.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Controller controller;
+ controller.show();
+ return app.exec();
+}
diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
new file mode 100644
index 0000000..73bfa37
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = car \
+ controller
+
+# install
+sources.files = *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar
+INSTALLS += sources
diff --git a/examples/designer/README b/examples/designer/README
new file mode 100644
index 0000000..fb9443c
--- /dev/null
+++ b/examples/designer/README
@@ -0,0 +1,37 @@
+Qt Designer is a capable graphical user interface designer that lets you
+create and configure forms without writing code. GUIs created with
+Qt Designer can be compiled into an application or created at run-time.
+
+
+Some of the examples in this directory can be run from the example launcher;
+others can only be used from within Qt Designer.
+
+Documentation for these examples can be found via the "Tutorial and Examples"
+link in the main Qt documentation.
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/designer/calculatorbuilder/calculatorbuilder.pro b/examples/designer/calculatorbuilder/calculatorbuilder.pro
new file mode 100644
index 0000000..1d69cc8
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorbuilder.pro
@@ -0,0 +1,14 @@
+#! [0]
+CONFIG += uitools
+
+HEADERS = calculatorform.h
+RESOURCES = calculatorbuilder.qrc
+SOURCES = calculatorform.cpp \
+ main.cpp
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorbuilder
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorbuilder
+INSTALLS += target sources
diff --git a/examples/designer/calculatorbuilder/calculatorbuilder.qrc b/examples/designer/calculatorbuilder/calculatorbuilder.qrc
new file mode 100644
index 0000000..19b3905
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorbuilder.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/forms">
+ <file>calculatorform.ui</file>
+</qresource>
+</RCC>
diff --git a/examples/designer/calculatorbuilder/calculatorform.cpp b/examples/designer/calculatorbuilder/calculatorform.cpp
new file mode 100644
index 0000000..92d75c5
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtUiTools>
+//! [0]
+#include <QtGui>
+
+#include "calculatorform.h"
+
+//! [1]
+CalculatorForm::CalculatorForm(QWidget *parent)
+ : QWidget(parent)
+{
+ QUiLoader loader;
+
+ QFile file(":/forms/calculatorform.ui");
+ file.open(QFile::ReadOnly);
+ QWidget *formWidget = loader.load(&file, this);
+ file.close();
+//! [1]
+
+//! [2]
+ ui_inputSpinBox1 = qFindChild<QSpinBox*>(this, "inputSpinBox1");
+ ui_inputSpinBox2 = qFindChild<QSpinBox*>(this, "inputSpinBox2");
+ ui_outputWidget = qFindChild<QLabel*>(this, "outputWidget");
+//! [2]
+
+//! [3]
+ QMetaObject::connectSlotsByName(this);
+//! [3]
+
+//! [4]
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(formWidget);
+ setLayout(layout);
+
+ setWindowTitle(tr("Calculator Builder"));
+}
+//! [4]
+
+//! [5]
+void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
+{
+ ui_outputWidget->setText(QString::number(value + ui_inputSpinBox2->value()));
+}
+//! [5] //! [6]
+
+//! [6] //! [7]
+void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
+{
+ ui_outputWidget->setText(QString::number(value + ui_inputSpinBox1->value()));
+}
+//! [7]
diff --git a/examples/designer/calculatorbuilder/calculatorform.h b/examples/designer/calculatorbuilder/calculatorform.h
new file mode 100644
index 0000000..8b322b7
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATORFORM_H
+#define CALCULATORFORM_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QSpinBox;
+QT_END_NAMESPACE
+
+//! [0]
+class CalculatorForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CalculatorForm(QWidget *parent = 0);
+
+private slots:
+ void on_inputSpinBox1_valueChanged(int value);
+ void on_inputSpinBox2_valueChanged(int value);
+
+private:
+ QSpinBox *ui_inputSpinBox1;
+ QSpinBox *ui_inputSpinBox2;
+ QLabel *ui_outputWidget;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/calculatorbuilder/calculatorform.ui b/examples/designer/calculatorbuilder/calculatorform.ui
new file mode 100644
index 0000000..dda0e62
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.ui
@@ -0,0 +1,303 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>276</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Builder</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>54</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>120</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>37</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>37</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>85</x>
+ <y>69</y>
+ <width>20</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>188</x>
+ <y>26</y>
+ <width>79</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/designer/calculatorbuilder/main.cpp b/examples/designer/calculatorbuilder/main.cpp
new file mode 100644
index 0000000..56358b8
--- /dev/null
+++ b/examples/designer/calculatorbuilder/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "calculatorform.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(calculatorbuilder);
+
+ QApplication app(argc, argv);
+ CalculatorForm calculator;
+ calculator.show();
+ return app.exec();
+}
diff --git a/examples/designer/calculatorform/calculatorform.cpp b/examples/designer/calculatorform/calculatorform.cpp
new file mode 100644
index 0000000..3de2852
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "calculatorform.h"
+
+//! [0]
+CalculatorForm::CalculatorForm(QWidget *parent)
+ : QWidget(parent)
+{
+ ui.setupUi(this);
+}
+//! [0]
+
+//! [1]
+void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
+{
+ ui.outputWidget->setText(QString::number(value + ui.inputSpinBox2->value()));
+}
+//! [1]
+
+//! [2]
+void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
+{
+ ui.outputWidget->setText(QString::number(value + ui.inputSpinBox1->value()));
+}
+//! [2]
diff --git a/examples/designer/calculatorform/calculatorform.h b/examples/designer/calculatorform/calculatorform.h
new file mode 100644
index 0000000..37f0a18
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATORFORM_H
+#define CALCULATORFORM_H
+
+//! [0]
+#include "ui_calculatorform.h"
+//! [0]
+
+//! [1]
+class CalculatorForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CalculatorForm(QWidget *parent = 0);
+
+private slots:
+ void on_inputSpinBox1_valueChanged(int value);
+ void on_inputSpinBox2_valueChanged(int value);
+
+private:
+ Ui::CalculatorForm ui;
+};
+//! [1]
+
+#endif
diff --git a/examples/designer/calculatorform/calculatorform.pro b/examples/designer/calculatorform/calculatorform.pro
new file mode 100644
index 0000000..73f4351
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.pro
@@ -0,0 +1,13 @@
+#! [0]
+HEADERS = calculatorform.h
+#! [0] #! [1]
+FORMS = calculatorform.ui
+#! [1]
+SOURCES = calculatorform.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorform
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorform
+INSTALLS += target sources
diff --git a/examples/designer/calculatorform/calculatorform.ui b/examples/designer/calculatorform/calculatorform.ui
new file mode 100644
index 0000000..3a95639
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.ui
@@ -0,0 +1,284 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Form</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="6" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>239</x>
+ <y>9</y>
+ <width>152</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="4" >
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>169</x>
+ <y>9</y>
+ <width>20</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>36</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>36</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="2" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>89</x>
+ <y>67</y>
+ <width>20</width>
+ <height>224</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="3" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>46</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>46</width>
+ <height>25</height>
+ </rect>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>63</x>
+ <y>9</y>
+ <width>20</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>46</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>46</width>
+ <height>25</height>
+ </rect>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/designer/calculatorform/main.cpp b/examples/designer/calculatorform/main.cpp
new file mode 100644
index 0000000..dcb7366
--- /dev/null
+++ b/examples/designer/calculatorform/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "calculatorform.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ CalculatorForm calculator;
+ calculator.show();
+ return app.exec();
+}
+
diff --git a/examples/designer/containerextension/containerextension.pro b/examples/designer/containerextension/containerextension.pro
new file mode 100644
index 0000000..6a2cb58
--- /dev/null
+++ b/examples/designer/containerextension/containerextension.pro
@@ -0,0 +1,26 @@
+#! [0]
+TEMPLATE = lib
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+CONFIG += designer plugin
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS += multipagewidget.h \
+ multipagewidgetplugin.h \
+ multipagewidgetcontainerextension.h \
+ multipagewidgetextensionfactory.h
+
+SOURCES += multipagewidget.cpp \
+ multipagewidgetplugin.cpp \
+ multipagewidgetcontainerextension.cpp \
+ multipagewidgetextensionfactory.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/containerextension
+INSTALLS += target sources
diff --git a/examples/designer/containerextension/multipagewidget.cpp b/examples/designer/containerextension/multipagewidget.cpp
new file mode 100644
index 0000000..5a3697b
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidget.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "multipagewidget.h"
+
+MultiPageWidget::MultiPageWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ comboBox = new QComboBox();
+ comboBox->setObjectName("__qt__passive_comboBox");
+ stackWidget = new QStackedWidget();
+
+ connect(comboBox, SIGNAL(activated(int)),
+ this, SLOT(setCurrentIndex(int)));
+
+ layout = new QVBoxLayout();
+ layout->addWidget(comboBox);
+ layout->addWidget(stackWidget);
+ setLayout(layout);
+}
+
+QSize MultiPageWidget::sizeHint() const
+{
+ return QSize(200, 150);
+}
+
+void MultiPageWidget::addPage(QWidget *page)
+{
+ insertPage(count(), page);
+}
+
+void MultiPageWidget::removePage(int index)
+{
+ QWidget *widget = stackWidget->widget(index);
+ stackWidget->removeWidget(widget);
+
+ comboBox->removeItem(index);
+}
+
+int MultiPageWidget::count() const
+{
+ return stackWidget->count();
+}
+
+int MultiPageWidget::currentIndex() const
+{
+ return stackWidget->currentIndex();
+}
+
+void MultiPageWidget::insertPage(int index, QWidget *page)
+{
+ page->setParent(stackWidget);
+
+ stackWidget->insertWidget(index, page);
+
+ QString title = page->windowTitle();
+ if (title.isEmpty()) {
+ title = tr("Page %1").arg(comboBox->count() + 1);
+ page->setWindowTitle(title);
+ }
+ comboBox->insertItem(index, title);
+}
+
+void MultiPageWidget::setCurrentIndex(int index)
+{
+ if (index != currentIndex()) {
+ stackWidget->setCurrentIndex(index);
+ comboBox->setCurrentIndex(index);
+ emit currentIndexChanged(index);
+ }
+}
+
+QWidget* MultiPageWidget::widget(int index)
+{
+ return stackWidget->widget(index);
+}
+
+QString MultiPageWidget::pageTitle() const
+{
+ if (const QWidget *currentWidget = stackWidget->currentWidget())
+ return currentWidget->windowTitle();
+ return QString();
+}
+
+void MultiPageWidget::setPageTitle(QString const &newTitle)
+{
+ comboBox->setItemText(currentIndex(), newTitle);
+ if (QWidget *currentWidget = stackWidget->currentWidget())
+ currentWidget->setWindowTitle(newTitle);
+ emit pageTitleChanged(newTitle);
+}
diff --git a/examples/designer/containerextension/multipagewidget.h b/examples/designer/containerextension/multipagewidget.h
new file mode 100644
index 0000000..77a09c5
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidget.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGET_H
+#define MULTIPAGEWIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QStackedWidget;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class MultiPageWidget : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex)
+ Q_PROPERTY(QString pageTitle READ pageTitle WRITE setPageTitle STORED false)
+
+public:
+ MultiPageWidget(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+ int count() const;
+ int currentIndex() const;
+ QWidget *widget(int index);
+ QString pageTitle() const;
+
+public slots:
+ void addPage(QWidget *page);
+ void insertPage(int index, QWidget *page);
+ void removePage(int index);
+ void setPageTitle(QString const &newTitle);
+ void setCurrentIndex(int index);
+
+signals:
+ void currentIndexChanged(int index);
+ void pageTitleChanged(const QString &title);
+
+private:
+ QStackedWidget *stackWidget;
+ QComboBox *comboBox;
+ QVBoxLayout *layout;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetcontainerextension.cpp b/examples/designer/containerextension/multipagewidgetcontainerextension.cpp
new file mode 100644
index 0000000..b61da3d
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetcontainerextension.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "multipagewidgetcontainerextension.h"
+#include "multipagewidget.h"
+
+//! [0]
+MultiPageWidgetContainerExtension::MultiPageWidgetContainerExtension(MultiPageWidget *widget,
+ QObject *parent)
+ :QObject(parent)
+{
+ myWidget = widget;
+}
+//! [0]
+
+//! [1]
+void MultiPageWidgetContainerExtension::addWidget(QWidget *widget)
+{
+ myWidget->addPage(widget);
+}
+//! [1]
+
+//! [2]
+int MultiPageWidgetContainerExtension::count() const
+{
+ return myWidget->count();
+}
+//! [2]
+
+//! [3]
+int MultiPageWidgetContainerExtension::currentIndex() const
+{
+ return myWidget->currentIndex();
+}
+//! [3]
+
+//! [4]
+void MultiPageWidgetContainerExtension::insertWidget(int index, QWidget *widget)
+{
+ myWidget->insertPage(index, widget);
+}
+//! [4]
+
+//! [5]
+void MultiPageWidgetContainerExtension::remove(int index)
+{
+ myWidget->removePage(index);
+}
+//! [5]
+
+//! [6]
+void MultiPageWidgetContainerExtension::setCurrentIndex(int index)
+{
+ myWidget->setCurrentIndex(index);
+}
+//! [6]
+
+//! [7]
+QWidget* MultiPageWidgetContainerExtension::widget(int index) const
+{
+ return myWidget->widget(index);
+}
+//! [7]
diff --git a/examples/designer/containerextension/multipagewidgetcontainerextension.h b/examples/designer/containerextension/multipagewidgetcontainerextension.h
new file mode 100644
index 0000000..661146e
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetcontainerextension.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGETCONTAINEREXTENSION_H
+#define MULTIPAGEWIDGETCONTAINEREXTENSION_H
+
+#include <QtDesigner/QDesignerContainerExtension>
+
+QT_BEGIN_NAMESPACE
+class QExtensionManager;
+QT_END_NAMESPACE
+class MultiPageWidget;
+
+//! [0]
+class MultiPageWidgetContainerExtension: public QObject,
+ public QDesignerContainerExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerContainerExtension)
+
+public:
+ MultiPageWidgetContainerExtension(MultiPageWidget *widget, QObject *parent);
+
+ void addWidget(QWidget *widget);
+ int count() const;
+ int currentIndex() const;
+ void insertWidget(int index, QWidget *widget);
+ void remove(int index);
+ void setCurrentIndex(int index);
+ QWidget *widget(int index) const;
+
+private:
+ MultiPageWidget *myWidget;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetextensionfactory.cpp b/examples/designer/containerextension/multipagewidgetextensionfactory.cpp
new file mode 100644
index 0000000..4a1e81b
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetextensionfactory.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "multipagewidgetextensionfactory.h"
+#include "multipagewidgetcontainerextension.h"
+#include "multipagewidget.h"
+
+//! [0]
+MultiPageWidgetExtensionFactory::MultiPageWidgetExtensionFactory(QExtensionManager *parent)
+ : QExtensionFactory(parent)
+{}
+//! [0]
+
+//! [1]
+QObject *MultiPageWidgetExtensionFactory::createExtension(QObject *object,
+ const QString &iid,
+ QObject *parent) const
+{
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MultiPageWidgetContainerExtension(widget, parent);
+ } else {
+ return 0;
+ }
+}
+//! [1]
diff --git a/examples/designer/containerextension/multipagewidgetextensionfactory.h b/examples/designer/containerextension/multipagewidgetextensionfactory.h
new file mode 100644
index 0000000..9a96b37
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetextensionfactory.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGETEXTENSIONFACTORY_H
+#define MULTIPAGEWIDGETEXTENSIONFACTORY_H
+
+#include <QtDesigner/QExtensionFactory>
+
+QT_BEGIN_NAMESPACE
+class QExtensionManager;
+QT_END_NAMESPACE
+
+//! [0]
+class MultiPageWidgetExtensionFactory: public QExtensionFactory
+{
+ Q_OBJECT
+
+public:
+ MultiPageWidgetExtensionFactory(QExtensionManager *parent = 0);
+
+protected:
+ QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetplugin.cpp b/examples/designer/containerextension/multipagewidgetplugin.cpp
new file mode 100644
index 0000000..c09ed3a
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetplugin.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner/QExtensionFactory>
+#include <QtDesigner/QExtensionManager>
+#include <QtDesigner/QDesignerFormEditorInterface>
+#include <QtDesigner/QDesignerFormWindowInterface>
+#include <QtDesigner/QDesignerContainerExtension>
+#include <QtDesigner/QDesignerPropertySheetExtension>
+
+#include <QIcon>
+#include <QtPlugin>
+
+#include "multipagewidget.h"
+#include "multipagewidgetplugin.h"
+#include "multipagewidgetextensionfactory.h"
+
+//! [0]
+MultiPageWidgetPlugin::MultiPageWidgetPlugin(QObject *parent)
+ :QObject(parent)
+{
+ initialized = false;
+}
+
+QString MultiPageWidgetPlugin::name() const
+{
+ return QLatin1String("MultiPageWidget");
+}
+
+QString MultiPageWidgetPlugin::group() const
+{
+ return QLatin1String("Display Widgets [Examples]");
+}
+
+QString MultiPageWidgetPlugin::toolTip() const
+{
+ return QString();
+}
+
+QString MultiPageWidgetPlugin::whatsThis() const
+{
+ return QString();
+}
+
+QString MultiPageWidgetPlugin::includeFile() const
+{
+ return QLatin1String("multipagewidget.h");
+}
+
+QIcon MultiPageWidgetPlugin::icon() const
+{
+ return QIcon();
+}
+
+//! [0] //! [1]
+bool MultiPageWidgetPlugin::isContainer() const
+{
+ return true;
+}
+
+//! [1] //! [2]
+QWidget *MultiPageWidgetPlugin::createWidget(QWidget *parent)
+{
+ MultiPageWidget *widget = new MultiPageWidget(parent);
+ connect(widget, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(currentIndexChanged(int)));
+ connect(widget, SIGNAL(pageTitleChanged(const QString &)),
+ this, SLOT(pageTitleChanged(const QString &)));
+ return widget;
+}
+
+//! [2] //! [3]
+bool MultiPageWidgetPlugin::isInitialized() const
+{
+ return initialized;
+}
+//! [3]
+
+//! [4]
+void MultiPageWidgetPlugin::initialize(QDesignerFormEditorInterface *formEditor)
+{
+ if (initialized)
+ return;
+//! [4]
+
+//! [5]
+ QExtensionManager *manager = formEditor->extensionManager();
+//! [5] //! [6]
+ QExtensionFactory *factory = new MultiPageWidgetExtensionFactory(manager);
+
+ Q_ASSERT(manager != 0);
+ manager->registerExtensions(factory, Q_TYPEID(QDesignerContainerExtension));
+
+ initialized = true;
+}
+//! [6]
+
+//! [7]
+QString MultiPageWidgetPlugin::domXml() const
+{
+ return QLatin1String("\
+<ui language=\"c++\">\
+ <widget class=\"MultiPageWidget\" name=\"multipagewidget\">\
+ <widget class=\"QWidget\" name=\"page\" />\
+ </widget>\
+ <customwidgets>\
+ <customwidget>\
+ <class>MultiPageWidget</class>\
+ <extends>QWidget</extends>\
+ <addpagemethod>addPage</addpagemethod>\
+ </customwidget>\
+ </customwidgets>\
+</ui>");
+}
+//! [7]
+
+//! [8]
+void MultiPageWidgetPlugin::currentIndexChanged(int index)
+{
+ Q_UNUSED(index);
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(sender());
+//! [8] //! [9]
+ if (widget) {
+ QDesignerFormWindowInterface *form = QDesignerFormWindowInterface::findFormWindow(widget);
+ if (form)
+ form->emitSelectionChanged();
+ }
+}
+//! [9]
+
+//! [10]
+void MultiPageWidgetPlugin::pageTitleChanged(const QString &title)
+{
+ Q_UNUSED(title);
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(sender());
+//! [10] //! [11]
+ if (widget) {
+ QWidget *page = widget->widget(widget->currentIndex());
+ QDesignerFormWindowInterface *form;
+ form = QDesignerFormWindowInterface::findFormWindow(widget);
+//! [11]
+ if (form) {
+//! [12]
+ QDesignerFormEditorInterface *editor = form->core();
+ QExtensionManager *manager = editor->extensionManager();
+//! [12] //! [13]
+ QDesignerPropertySheetExtension *sheet;
+ sheet = qt_extension<QDesignerPropertySheetExtension*>(manager, page);
+ const int propertyIndex = sheet->indexOf(QLatin1String("windowTitle"));
+ sheet->setChanged(propertyIndex, true);
+ }
+ }
+}
+
+//! [13]
+
+//! [14]
+Q_EXPORT_PLUGIN2(containerextension, MultiPageWidgetPlugin)
+//! [14]
diff --git a/examples/designer/containerextension/multipagewidgetplugin.h b/examples/designer/containerextension/multipagewidgetplugin.h
new file mode 100644
index 0000000..1431c8a
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetplugin.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#ifndef MULTIPAGEWIDGETPLUGIN_H
+#define MULTIPAGEWIDGETPLUGIN_H
+
+#include <QtDesigner/QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+class QIcon;
+class QWidget;
+QT_END_NAMESPACE
+
+class MultiPageWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+public:
+ MultiPageWidgetPlugin(QObject *parent = 0);
+
+ QString name() const;
+ QString group() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QString includeFile() const;
+ QIcon icon() const;
+ bool isContainer() const;
+ QWidget *createWidget(QWidget *parent);
+ bool isInitialized() const;
+ void initialize(QDesignerFormEditorInterface *formEditor);
+ QString domXml() const;
+
+private slots:
+ void currentIndexChanged(int index);
+ void pageTitleChanged(const QString &title);
+
+private:
+ bool initialized;
+};
+
+#endif
+//! [0]
diff --git a/examples/designer/customwidgetplugin/analogclock.cpp b/examples/designer/customwidgetplugin/analogclock.cpp
new file mode 100644
index 0000000..28155ba
--- /dev/null
+++ b/examples/designer/customwidgetplugin/analogclock.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "analogclock.h"
+
+AnalogClock::AnalogClock(QWidget *parent)
+ : QWidget(parent)
+{
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ setWindowTitle(tr("Analog Clock"));
+ resize(200, 200);
+}
+
+void AnalogClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+}
diff --git a/examples/designer/customwidgetplugin/analogclock.h b/examples/designer/customwidgetplugin/analogclock.h
new file mode 100644
index 0000000..4d843ad
--- /dev/null
+++ b/examples/designer/customwidgetplugin/analogclock.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANALOGCLOCK_H
+#define ANALOGCLOCK_H
+
+#include <QWidget>
+#include <QtDesigner/QDesignerExportWidget>
+
+class QDESIGNER_WIDGET_EXPORT AnalogClock : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AnalogClock(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+};
+
+#endif
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.cpp b/examples/designer/customwidgetplugin/customwidgetplugin.cpp
new file mode 100644
index 0000000..bcea3b8
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "analogclock.h"
+#include "customwidgetplugin.h"
+
+#include <QtPlugin>
+
+//! [0]
+AnalogClockPlugin::AnalogClockPlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+//! [0]
+
+//! [1]
+void AnalogClockPlugin::initialize(QDesignerFormEditorInterface * /* core */)
+{
+ if (initialized)
+ return;
+
+ initialized = true;
+}
+//! [1]
+
+//! [2]
+bool AnalogClockPlugin::isInitialized() const
+{
+ return initialized;
+}
+//! [2]
+
+//! [3]
+QWidget *AnalogClockPlugin::createWidget(QWidget *parent)
+{
+ return new AnalogClock(parent);
+}
+//! [3]
+
+//! [4]
+QString AnalogClockPlugin::name() const
+{
+ return "AnalogClock";
+}
+//! [4]
+
+//! [5]
+QString AnalogClockPlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+//! [5]
+
+//! [6]
+QIcon AnalogClockPlugin::icon() const
+{
+ return QIcon();
+}
+//! [6]
+
+//! [7]
+QString AnalogClockPlugin::toolTip() const
+{
+ return "";
+}
+//! [7]
+
+//! [8]
+QString AnalogClockPlugin::whatsThis() const
+{
+ return "";
+}
+//! [8]
+
+//! [9]
+bool AnalogClockPlugin::isContainer() const
+{
+ return false;
+}
+//! [9]
+
+//! [10]
+QString AnalogClockPlugin::domXml() const
+{
+ return "<ui language=\"c++\">\n"
+ " <widget class=\"AnalogClock\" name=\"analogClock\">\n"
+//! [11]
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>100</width>\n"
+ " <height>100</height>\n"
+ " </rect>\n"
+ " </property>\n"
+//! [11]
+ " <property name=\"toolTip\" >\n"
+ " <string>The current time</string>\n"
+ " </property>\n"
+ " <property name=\"whatsThis\" >\n"
+ " <string>The analog clock widget displays the current time.</string>\n"
+ " </property>\n"
+ " </widget>\n"
+ "</ui>\n";
+}
+//! [10]
+
+//! [12]
+QString AnalogClockPlugin::includeFile() const
+{
+ return "analogclock.h";
+}
+//! [12]
+
+//! [13]
+Q_EXPORT_PLUGIN2(customwidgetplugin, AnalogClockPlugin)
+//! [13]
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.h b/examples/designer/customwidgetplugin/customwidgetplugin.h
new file mode 100644
index 0000000..4438690
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CUSTOMWIDGETPLUGIN_H
+#define CUSTOMWIDGETPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+//! [0]
+class AnalogClockPlugin : public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ AnalogClockPlugin(QObject *parent = 0);
+
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
+
+private:
+ bool initialized;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.pro b/examples/designer/customwidgetplugin/customwidgetplugin.pro
new file mode 100644
index 0000000..4feee59
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.pro
@@ -0,0 +1,21 @@
+#! [0] #! [1]
+CONFIG += designer plugin
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [2]
+TEMPLATE = lib
+#! [1] #! [2]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [3]
+HEADERS = analogclock.h \
+ customwidgetplugin.h
+SOURCES = analogclock.cpp \
+ customwidgetplugin.cpp
+#! [3]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/customwidgetplugin
+INSTALLS += target sources
diff --git a/examples/designer/designer.pro b/examples/designer/designer.pro
new file mode 100644
index 0000000..0f30421
--- /dev/null
+++ b/examples/designer/designer.pro
@@ -0,0 +1,19 @@
+TEMPLATE = subdirs
+SUBDIRS = calculatorform
+
+!static:SUBDIRS += calculatorbuilder \
+ containerextension \
+ customwidgetplugin \
+ taskmenuextension \
+ worldtimeclockbuilder \
+ worldtimeclockplugin
+
+# the sun cc compiler has a problem with the include lines for the form.prf
+solaris-cc*:SUBDIRS -= calculatorbuilder \
+ worldtimeclockbuilder
+
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer
+INSTALLS += sources
diff --git a/examples/designer/taskmenuextension/taskmenuextension.pro b/examples/designer/taskmenuextension/taskmenuextension.pro
new file mode 100644
index 0000000..83dd878
--- /dev/null
+++ b/examples/designer/taskmenuextension/taskmenuextension.pro
@@ -0,0 +1,25 @@
+#! [0]
+TEMPLATE = lib
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+CONFIG += designer plugin
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS += tictactoe.h \
+ tictactoedialog.h \
+ tictactoeplugin.h \
+ tictactoetaskmenu.h
+SOURCES += tictactoe.cpp \
+ tictactoedialog.cpp \
+ tictactoeplugin.cpp \
+ tictactoetaskmenu.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/taskmenuextension
+INSTALLS += target sources
diff --git a/examples/designer/taskmenuextension/tictactoe.cpp b/examples/designer/taskmenuextension/tictactoe.cpp
new file mode 100644
index 0000000..ba766ccd
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoe.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tictactoe.h"
+
+TicTacToe::TicTacToe(QWidget *parent)
+ : QWidget(parent)
+{
+}
+
+QSize TicTacToe::minimumSizeHint() const
+{
+ return QSize(200, 200);
+}
+
+QSize TicTacToe::sizeHint() const
+{
+ return QSize(200, 200);
+}
+
+void TicTacToe::setState(const QString &newState)
+{
+ turnNumber = 0;
+ myState = "---------";
+ int position = 0;
+ while (position < 9 && position < newState.length()) {
+ QChar mark = newState.at(position);
+ if (mark == Cross || mark == Nought) {
+ ++turnNumber;
+ myState.replace(position, 1, mark);
+ }
+ position++;
+ }
+ update();
+}
+
+QString TicTacToe::state() const
+{
+ return myState;
+}
+
+void TicTacToe::clearBoard()
+{
+ myState = "---------";
+ turnNumber = 0;
+ update();
+}
+
+void TicTacToe::mousePressEvent(QMouseEvent *event)
+{
+ if (turnNumber == 9) {
+ clearBoard();
+ update();
+ } else {
+ for (int position = 0; position < 9; ++position) {
+ QRect cell = cellRect(position / 3, position % 3);
+ if (cell.contains(event->pos())) {
+ if (myState.at(position) == Empty) {
+ if (turnNumber % 2 == 0)
+ myState.replace(position, 1, Cross);
+ else
+ myState.replace(position, 1, Nought);
+ ++turnNumber;
+ update();
+ }
+ }
+ }
+ }
+}
+
+void TicTacToe::paintEvent(QPaintEvent * /* event */)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ painter.setPen(QPen(Qt::darkGreen, 1));
+ painter.drawLine(cellWidth(), 0, cellWidth(), height());
+ painter.drawLine(2 * cellWidth(), 0, 2 * cellWidth(), height());
+ painter.drawLine(0, cellHeight(), width(), cellHeight());
+ painter.drawLine(0, 2 * cellHeight(), width(), 2 * cellHeight());
+
+ painter.setPen(QPen(Qt::darkBlue, 2));
+
+ for (int position = 0; position < 9; ++position) {
+ QRect cell = cellRect(position / 3, position % 3);
+
+ if (myState.at(position) == Cross) {
+ painter.drawLine(cell.topLeft(), cell.bottomRight());
+ painter.drawLine(cell.topRight(), cell.bottomLeft());
+ } else if (myState.at(position) == Nought) {
+ painter.drawEllipse(cell);
+ }
+ }
+
+ painter.setPen(QPen(Qt::yellow, 3));
+
+ for (int position = 0; position < 9; position = position + 3) {
+ if (myState.at(position) != Empty
+ && myState.at(position + 1) == myState.at(position)
+ && myState.at(position + 2) == myState.at(position)) {
+ int y = cellRect((position / 3), 0).center().y();
+ painter.drawLine(0, y, width(), y);
+ turnNumber = 9;
+ }
+ }
+
+ for (int position = 0; position < 3; ++position) {
+ if (myState.at(position) != Empty
+ && myState.at(position + 3) == myState.at(position)
+ && myState.at(position + 6) == myState.at(position)) {
+ int x = cellRect(0, position).center().x();
+ painter.drawLine(x, 0, x, height());
+ turnNumber = 9;
+ }
+ }
+ if (myState.at(0) != Empty && myState.at(4) == myState.at(0)
+ && myState.at(8) == myState.at(0)) {
+ painter.drawLine(0, 0, width(), height());
+ turnNumber = 9;
+ }
+ if (myState.at(2) != Empty && myState.at(4) == myState.at(2)
+ && myState.at(6) == myState.at(2)) {
+ painter.drawLine(0, height(), width(), 0);
+ turnNumber = 9;
+ }
+}
+
+QRect TicTacToe::cellRect(int row, int column) const
+{
+ const int HMargin = width() / 30;
+ const int VMargin = height() / 30;
+ return QRect(column * cellWidth() + HMargin,
+ row * cellHeight() + VMargin,
+ cellWidth() - 2 * HMargin,
+ cellHeight() - 2 * VMargin);
+}
diff --git a/examples/designer/taskmenuextension/tictactoe.h b/examples/designer/taskmenuextension/tictactoe.h
new file mode 100644
index 0000000..ef3c533
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoe.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOE_H
+#define TICTACTOE_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QRect;
+class QSize;
+QT_END_NAMESPACE
+
+//! [0]
+class TicTacToe : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString state READ state WRITE setState)
+
+public:
+ TicTacToe(QWidget *parent = 0);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+ void setState(const QString &newState);
+ QString state() const;
+ void clearBoard();
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ enum { Empty = '-', Cross = 'X', Nought = 'O' };
+
+ QRect cellRect(int row, int col) const;
+ int cellWidth() const { return width() / 3; }
+ int cellHeight() const { return height() / 3; }
+
+ QString myState;
+ int turnNumber;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/taskmenuextension/tictactoedialog.cpp b/examples/designer/taskmenuextension/tictactoedialog.cpp
new file mode 100644
index 0000000..a9bd16a
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoedialog.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDesigner>
+
+#include "tictactoe.h"
+#include "tictactoedialog.h"
+
+//! [0]
+TicTacToeDialog::TicTacToeDialog(TicTacToe *tic, QWidget *parent)
+ : QDialog(parent)
+{
+ ticTacToe = tic;
+ editor = new TicTacToe;
+ editor->setState(ticTacToe->state());
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Reset);
+
+ connect(buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()),
+ this, SLOT(resetState()));
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveState()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(editor);
+ mainLayout->addWidget(buttonBox);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Edit State"));
+}
+//! [0]
+
+//! [1]
+QSize TicTacToeDialog::sizeHint() const
+{
+ return QSize(250, 250);
+}
+//! [1]
+
+//! [2]
+void TicTacToeDialog::resetState()
+{
+ editor->clearBoard();
+}
+//! [2]
+
+//! [3]
+void TicTacToeDialog::saveState()
+{
+//! [3] //! [4]
+ if (QDesignerFormWindowInterface *formWindow
+ = QDesignerFormWindowInterface::findFormWindow(ticTacToe)) {
+ formWindow->cursor()->setProperty("state", editor->state());
+ }
+//! [4] //! [5]
+ accept();
+}
+//! [5]
diff --git a/examples/designer/taskmenuextension/tictactoedialog.h b/examples/designer/taskmenuextension/tictactoedialog.h
new file mode 100644
index 0000000..55b25d2
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoedialog.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOEDIALOG_H
+#define TICTACTOEDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+QT_END_NAMESPACE
+class TicTacToe;
+
+//! [0]
+class TicTacToeDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+private slots:
+ void resetState();
+ void saveState();
+
+private:
+ TicTacToe *editor;
+ TicTacToe *ticTacToe;
+ QDialogButtonBox *buttonBox;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/taskmenuextension/tictactoeplugin.cpp b/examples/designer/taskmenuextension/tictactoeplugin.cpp
new file mode 100644
index 0000000..0a2d13b
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoeplugin.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner>
+#include <QtGui>
+#include <QtPlugin>
+
+#include "tictactoe.h"
+#include "tictactoeplugin.h"
+#include "tictactoetaskmenu.h"
+
+//! [0]
+TicTacToePlugin::TicTacToePlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+
+QString TicTacToePlugin::name() const
+{
+ return "TicTacToe";
+}
+
+QString TicTacToePlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+
+QString TicTacToePlugin::toolTip() const
+{
+ return "";
+}
+
+QString TicTacToePlugin::whatsThis() const
+{
+ return "";
+}
+
+QString TicTacToePlugin::includeFile() const
+{
+ return "tictactoe.h";
+}
+
+QIcon TicTacToePlugin::icon() const
+{
+ return QIcon();
+}
+
+bool TicTacToePlugin::isContainer() const
+{
+ return false;
+}
+
+QWidget *TicTacToePlugin::createWidget(QWidget *parent)
+{
+ TicTacToe *ticTacToe = new TicTacToe(parent);
+ ticTacToe->setState("-X-XO----");
+ return ticTacToe;
+}
+
+bool TicTacToePlugin::isInitialized() const
+{
+ return initialized;
+}
+
+//! [0] //! [1]
+void TicTacToePlugin::initialize(QDesignerFormEditorInterface *formEditor)
+{
+//! [1] //! [2]
+ if (initialized)
+ return;
+
+ QExtensionManager *manager = formEditor->extensionManager();
+ Q_ASSERT(manager != 0);
+//! [2]
+
+//! [3]
+ manager->registerExtensions(new TicTacToeTaskMenuFactory(manager),
+ Q_TYPEID(QDesignerTaskMenuExtension));
+
+ initialized = true;
+}
+
+QString TicTacToePlugin::domXml() const
+{
+ return QLatin1String("\
+<ui language=\"c++\">\
+ <widget class=\"TicTacToe\" name=\"ticTacToe\"/>\
+ <customwidgets>\
+ <customwidget>\
+ <class>TicTacToe</class>\
+ <propertyspecifications>\
+ <stringpropertyspecification name=\"state\" notr=\"true\" type=\"singleline\"/>\
+ </propertyspecifications>\
+ </customwidget>\
+ </customwidgets>\
+</ui>");
+}
+
+//! [3]
+
+//! [4]
+Q_EXPORT_PLUGIN2(taskmenuextension, TicTacToePlugin)
+//! [4]
diff --git a/examples/designer/taskmenuextension/tictactoeplugin.h b/examples/designer/taskmenuextension/tictactoeplugin.h
new file mode 100644
index 0000000..b51540e
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoeplugin.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#ifndef TICTACTOEPLUGIN_H
+#define TICTACTOEPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+class QIcon;
+class QWidget;
+QT_END_NAMESPACE
+
+class TicTacToePlugin : public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ TicTacToePlugin(QObject *parent = 0);
+
+ QString name() const;
+ QString group() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QString includeFile() const;
+ QIcon icon() const;
+ bool isContainer() const;
+ QWidget *createWidget(QWidget *parent);
+ bool isInitialized() const;
+ void initialize(QDesignerFormEditorInterface *formEditor);
+ QString domXml() const;
+
+private:
+ bool initialized;
+};
+
+#endif
+//! [0]
diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.cpp b/examples/designer/taskmenuextension/tictactoetaskmenu.cpp
new file mode 100644
index 0000000..af5401a
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoetaskmenu.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner>
+#include <QtGui>
+
+#include "tictactoe.h"
+#include "tictactoedialog.h"
+#include "tictactoetaskmenu.h"
+
+//! [0]
+TicTacToeTaskMenu::TicTacToeTaskMenu(TicTacToe *tic, QObject *parent)
+ : QObject(parent)
+{
+ ticTacToe = tic;
+
+ editStateAction = new QAction(tr("Edit State..."), this);
+ connect(editStateAction, SIGNAL(triggered()), this, SLOT(editState()));
+}
+//! [0]
+
+//! [1]
+void TicTacToeTaskMenu::editState()
+{
+ TicTacToeDialog dialog(ticTacToe);
+ dialog.exec();
+}
+//! [1]
+
+//! [2]
+QAction *TicTacToeTaskMenu::preferredEditAction() const
+{
+ return editStateAction;
+}
+//! [2]
+
+//! [3]
+QList<QAction *> TicTacToeTaskMenu::taskActions() const
+{
+ QList<QAction *> list;
+ list.append(editStateAction);
+ return list;
+}
+//! [3]
+
+//! [4]
+TicTacToeTaskMenuFactory::TicTacToeTaskMenuFactory(QExtensionManager *parent)
+ : QExtensionFactory(parent)
+{
+}
+//! [4]
+
+//! [5]
+QObject *TicTacToeTaskMenuFactory::createExtension(QObject *object,
+ const QString &iid,
+ QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
+ return 0;
+
+ if (TicTacToe *tic = qobject_cast<TicTacToe*>(object))
+ return new TicTacToeTaskMenu(tic, parent);
+
+ return 0;
+}
+//! [5]
diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.h b/examples/designer/taskmenuextension/tictactoetaskmenu.h
new file mode 100644
index 0000000..4bd3170
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoetaskmenu.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOETASKMENU_H
+#define TICTACTOETASKMENU_H
+
+#include <QDesignerTaskMenuExtension>
+#include <QExtensionFactory>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QExtensionManager;
+QT_END_NAMESPACE
+class TicTacToe;
+
+//! [0]
+class TicTacToeTaskMenu : public QObject, public QDesignerTaskMenuExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerTaskMenuExtension)
+
+public:
+ TicTacToeTaskMenu(TicTacToe *tic, QObject *parent);
+
+ QAction *preferredEditAction() const;
+ QList<QAction *> taskActions() const;
+
+private slots:
+ void editState();
+
+private:
+ QAction *editStateAction;
+ TicTacToe *ticTacToe;
+};
+//! [0]
+
+//! [1]
+class TicTacToeTaskMenuFactory : public QExtensionFactory
+{
+ Q_OBJECT
+
+public:
+ TicTacToeTaskMenuFactory(QExtensionManager *parent = 0);
+
+protected:
+ QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
+};
+//! [1]
+
+#endif
diff --git a/examples/designer/worldtimeclockbuilder/form.ui b/examples/designer/worldtimeclockbuilder/form.ui
new file mode 100644
index 0000000..e5be1d9
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/form.ui
@@ -0,0 +1,162 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>WorldTimeForm</class>
+ <widget class="QWidget" name="WorldTimeForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>World Time Clock</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="WorldTimeClock" name="worldTimeClock" />
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Current time:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTimeEdit" name="timeEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Set time zone:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="maximum" >
+ <number>12</number>
+ </property>
+ <property name="minimum" >
+ <number>-12</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>WorldTimeClock</class>
+ <extends></extends>
+ <header>worldtimeclock.h</header>
+ <container>0</container>
+ <pixmap></pixmap>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>spinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>worldTimeClock</receiver>
+ <slot>setTimeZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>339</x>
+ <y>166</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>230</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>worldTimeClock</sender>
+ <signal>updated(QTime)</signal>
+ <receiver>timeEdit</receiver>
+ <slot>setTime(QTime)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>141</x>
+ <y>59</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>291</x>
+ <y>133</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/designer/worldtimeclockbuilder/main.cpp b/examples/designer/worldtimeclockbuilder/main.cpp
new file mode 100644
index 0000000..35f7dc0
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/main.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtUiTools>
+//! [0]
+#include <QtGui>
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(worldtimeclockbuilder);
+
+ QApplication app(argc, argv);
+
+ QUiLoader loader;
+//! [1]
+
+//! [2]
+ QFile file(":/forms/form.ui");
+ file.open(QFile::ReadOnly);
+
+ QWidget *widget = loader.load(&file);
+
+ file.close();
+ widget->show();
+//! [2]
+
+//! [3]
+ return app.exec();
+}
+//! [3]
diff --git a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro
new file mode 100644
index 0000000..2690921
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro
@@ -0,0 +1,11 @@
+#! [0]
+CONFIG += uitools
+SOURCES = main.cpp
+RESOURCES = worldtimeclockbuilder.qrc
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockbuilder
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockbuilder
+INSTALLS += target sources
diff --git a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc
new file mode 100644
index 0000000..89d5ac3
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/forms">
+ <file>form.ui</file>
+</qresource>
+</RCC>
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.cpp b/examples/designer/worldtimeclockplugin/worldtimeclock.cpp
new file mode 100644
index 0000000..77eff54
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclock.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "worldtimeclock.h"
+
+WorldTimeClock::WorldTimeClock(QWidget *parent)
+ : QWidget(parent)
+{
+ timeZoneOffset = 0;
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ setWindowTitle(tr("World Time Clock"));
+ resize(200, 200);
+}
+
+void WorldTimeClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+ time = time.addSecs(timeZoneOffset);
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+
+ emit updated(time);
+}
+
+void WorldTimeClock::setTimeZone(int hourOffset)
+{
+ timeZoneOffset = qMin(qMax(-12, hourOffset), 12) * 3600;
+ update();
+}
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.h b/examples/designer/worldtimeclockplugin/worldtimeclock.h
new file mode 100644
index 0000000..7bfe8c5
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclock.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORLDTIMECLOCK_H
+#define WORLDTIMECLOCK_H
+
+#include <QTime>
+#include <QWidget>
+#include <QtDesigner/QDesignerExportWidget>
+
+//! [0] //! [1]
+class QDESIGNER_WIDGET_EXPORT WorldTimeClock : public QWidget
+{
+ Q_OBJECT
+//! [0]
+
+public:
+ WorldTimeClock(QWidget *parent = 0);
+
+public slots:
+ void setTimeZone(int hourOffset);
+
+signals:
+ void updated(QTime currentTime);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ int timeZoneOffset;
+//! [2]
+};
+//! [1] //! [2]
+
+#endif
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp
new file mode 100644
index 0000000..e73c45b
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "worldtimeclock.h"
+#include "worldtimeclockplugin.h"
+
+#include <QtPlugin>
+
+WorldTimeClockPlugin::WorldTimeClockPlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+
+void WorldTimeClockPlugin::initialize(QDesignerFormEditorInterface * /* core */)
+{
+ if (initialized)
+ return;
+
+ initialized = true;
+}
+
+bool WorldTimeClockPlugin::isInitialized() const
+{
+ return initialized;
+}
+
+QWidget *WorldTimeClockPlugin::createWidget(QWidget *parent)
+{
+ return new WorldTimeClock(parent);
+}
+
+QString WorldTimeClockPlugin::name() const
+{
+ return "WorldTimeClock";
+}
+
+QString WorldTimeClockPlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+
+QIcon WorldTimeClockPlugin::icon() const
+{
+ return QIcon();
+}
+
+QString WorldTimeClockPlugin::toolTip() const
+{
+ return "";
+}
+
+QString WorldTimeClockPlugin::whatsThis() const
+{
+ return "";
+}
+
+bool WorldTimeClockPlugin::isContainer() const
+{
+ return false;
+}
+
+QString WorldTimeClockPlugin::domXml() const
+{
+ return "<ui language=\"c++\">\n"
+ " <widget class=\"WorldTimeClock\" name=\"worldTimeClock\">\n"
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>100</width>\n"
+ " <height>100</height>\n"
+ " </rect>\n"
+ " </property>\n"
+ " </widget>\n"
+ "</ui>";
+}
+
+QString WorldTimeClockPlugin::includeFile() const
+{
+ return "worldtimeclock.h";
+}
+
+//! [0]
+Q_EXPORT_PLUGIN2(worldtimeclockplugin, WorldTimeClockPlugin)
+//! [0]
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h
new file mode 100644
index 0000000..87d797a
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORLDTIMECLOCKPLUGIN_H
+#define WORLDTIMECLOCKPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+//! [0]
+class WorldTimeClockPlugin : public QObject,
+ public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ WorldTimeClockPlugin(QObject *parent = 0);
+
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
+
+private:
+ bool initialized;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro
new file mode 100644
index 0000000..cd117dc
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro
@@ -0,0 +1,21 @@
+#! [0]
+CONFIG += designer plugin
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+TEMPLATE = lib
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS = worldtimeclock.h \
+ worldtimeclockplugin.h
+SOURCES = worldtimeclock.cpp \
+ worldtimeclockplugin.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockplugin
+INSTALLS += target sources
diff --git a/examples/desktop/README b/examples/desktop/README
new file mode 100644
index 0000000..efe569a
--- /dev/null
+++ b/examples/desktop/README
@@ -0,0 +1,41 @@
+Qt provides features to enable applications to integrate with the user's
+preferred desktop environment.
+
+Features such as system tray icons, access to the desktop widget, and
+support for desktop services can be used to improve the appearance of
+applications and take advantage of underlying desktop facilities.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro
new file mode 100644
index 0000000..b65f4f2
--- /dev/null
+++ b/examples/desktop/desktop.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = screenshot
+
+contains(QT_CONFIG, svg): SUBDIRS += systray
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/desktop
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS desktop.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/desktop
+INSTALLS += target sources
diff --git a/examples/desktop/screenshot/main.cpp b/examples/desktop/screenshot/main.cpp
new file mode 100644
index 0000000..59e8674
--- /dev/null
+++ b/examples/desktop/screenshot/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "screenshot.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Screenshot screenshot;
+ screenshot.show();
+ return app.exec();
+}
diff --git a/examples/desktop/screenshot/screenshot.cpp b/examples/desktop/screenshot/screenshot.cpp
new file mode 100644
index 0000000..7d9545e
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "screenshot.h"
+
+//! [0]
+Screenshot::Screenshot()
+{
+ screenshotLabel = new QLabel;
+ screenshotLabel->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Expanding);
+ screenshotLabel->setAlignment(Qt::AlignCenter);
+ screenshotLabel->setMinimumSize(240, 160);
+
+ createOptionsGroupBox();
+ createButtonsLayout();
+
+ mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(screenshotLabel);
+ mainLayout->addWidget(optionsGroupBox);
+ mainLayout->addLayout(buttonsLayout);
+ setLayout(mainLayout);
+
+ shootScreen();
+ delaySpinBox->setValue(5);
+
+ setWindowTitle(tr("Screenshot"));
+ resize(300, 200);
+}
+//! [0]
+
+//! [1]
+void Screenshot::resizeEvent(QResizeEvent * /* event */)
+{
+ QSize scaledSize = originalPixmap.size();
+ scaledSize.scale(screenshotLabel->size(), Qt::KeepAspectRatio);
+ if (!screenshotLabel->pixmap()
+ || scaledSize != screenshotLabel->pixmap()->size())
+ updateScreenshotLabel();
+}
+//! [1]
+
+//! [2]
+void Screenshot::newScreenshot()
+{
+ if (hideThisWindowCheckBox->isChecked())
+ hide();
+ newScreenshotButton->setDisabled(true);
+
+ QTimer::singleShot(delaySpinBox->value() * 1000, this, SLOT(shootScreen()));
+}
+//! [2]
+
+//! [3]
+void Screenshot::saveScreenshot()
+{
+ QString format = "png";
+ QString initialPath = QDir::currentPath() + tr("/untitled.") + format;
+
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ initialPath,
+ tr("%1 Files (*.%2);;All Files (*)")
+ .arg(format.toUpper())
+ .arg(format));
+ if (!fileName.isEmpty())
+ originalPixmap.save(fileName, format.toAscii());
+}
+//! [3]
+
+//! [4]
+void Screenshot::shootScreen()
+{
+ if (delaySpinBox->value() != 0)
+ qApp->beep();
+//! [4]
+ originalPixmap = QPixmap(); // clear image for low memory situations
+ // on embedded devices.
+//! [5]
+ originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
+ updateScreenshotLabel();
+
+ newScreenshotButton->setDisabled(false);
+ if (hideThisWindowCheckBox->isChecked())
+ show();
+}
+//! [5]
+
+//! [6]
+void Screenshot::updateCheckBox()
+{
+ if (delaySpinBox->value() == 0) {
+ hideThisWindowCheckBox->setDisabled(true);
+ hideThisWindowCheckBox->setChecked(false);
+ }
+ else
+ hideThisWindowCheckBox->setDisabled(false);
+}
+//! [6]
+
+//! [7]
+void Screenshot::createOptionsGroupBox()
+{
+ optionsGroupBox = new QGroupBox(tr("Options"));
+
+ delaySpinBox = new QSpinBox;
+ delaySpinBox->setSuffix(tr(" s"));
+ delaySpinBox->setMaximum(60);
+ connect(delaySpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateCheckBox()));
+
+ delaySpinBoxLabel = new QLabel(tr("Screenshot Delay:"));
+
+ hideThisWindowCheckBox = new QCheckBox(tr("Hide This Window"));
+
+ optionsGroupBoxLayout = new QGridLayout;
+ optionsGroupBoxLayout->addWidget(delaySpinBoxLabel, 0, 0);
+ optionsGroupBoxLayout->addWidget(delaySpinBox, 0, 1);
+ optionsGroupBoxLayout->addWidget(hideThisWindowCheckBox, 1, 0, 1, 2);
+ optionsGroupBox->setLayout(optionsGroupBoxLayout);
+}
+//! [7]
+
+//! [8]
+void Screenshot::createButtonsLayout()
+{
+ newScreenshotButton = createButton(tr("New Screenshot"),
+ this, SLOT(newScreenshot()));
+
+ saveScreenshotButton = createButton(tr("Save Screenshot"),
+ this, SLOT(saveScreenshot()));
+
+ quitScreenshotButton = createButton(tr("Quit"), this, SLOT(close()));
+
+ buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch();
+ buttonsLayout->addWidget(newScreenshotButton);
+ buttonsLayout->addWidget(saveScreenshotButton);
+ buttonsLayout->addWidget(quitScreenshotButton);
+}
+//! [8]
+
+//! [9]
+QPushButton *Screenshot::createButton(const QString &text, QWidget *receiver,
+ const char *member)
+{
+ QPushButton *button = new QPushButton(text);
+ button->connect(button, SIGNAL(clicked()), receiver, member);
+ return button;
+}
+//! [9]
+
+//! [10]
+void Screenshot::updateScreenshotLabel()
+{
+ screenshotLabel->setPixmap(originalPixmap.scaled(screenshotLabel->size(),
+ Qt::KeepAspectRatio,
+ Qt::SmoothTransformation));
+}
+//! [10]
diff --git a/examples/desktop/screenshot/screenshot.h b/examples/desktop/screenshot/screenshot.h
new file mode 100644
index 0000000..ecc7724
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCREENSHOT_H
+#define SCREENSHOT_H
+
+#include <QPixmap>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGridLayout;
+class QGroupBox;
+class QHBoxLayout;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class Screenshot : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Screenshot();
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private slots:
+ void newScreenshot();
+ void saveScreenshot();
+ void shootScreen();
+ void updateCheckBox();
+
+private:
+ void createOptionsGroupBox();
+ void createButtonsLayout();
+ QPushButton *createButton(const QString &text, QWidget *receiver,
+ const char *member);
+ void updateScreenshotLabel();
+
+ QPixmap originalPixmap;
+
+ QLabel *screenshotLabel;
+ QGroupBox *optionsGroupBox;
+ QSpinBox *delaySpinBox;
+ QLabel *delaySpinBoxLabel;
+ QCheckBox *hideThisWindowCheckBox;
+ QPushButton *newScreenshotButton;
+ QPushButton *saveScreenshotButton;
+ QPushButton *quitScreenshotButton;
+
+ QVBoxLayout *mainLayout;
+ QGridLayout *optionsGroupBoxLayout;
+ QHBoxLayout *buttonsLayout;
+};
+//! [0]
+
+#endif
diff --git a/examples/desktop/screenshot/screenshot.pro b/examples/desktop/screenshot/screenshot.pro
new file mode 100644
index 0000000..3ecbf8f
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.pro
@@ -0,0 +1,9 @@
+HEADERS = screenshot.h
+SOURCES = main.cpp \
+ screenshot.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/desktop/screenshot
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS screenshot.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/desktop/screenshot
+INSTALLS += target sources
diff --git a/examples/desktop/systray/images/bad.svg b/examples/desktop/systray/images/bad.svg
new file mode 100644
index 0000000..186dba9
--- /dev/null
+++ b/examples/desktop/systray/images/bad.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg viewBox="-10 -10 178 178" height="177.523" id="svg1" inkscape:version="0.40" sodipodi:docbase="/mnt/donnees/09-Mes_images/Travaux/Travaux vectoriel/pictogrammes/sécu SVG/produits chimiques" sodipodi:docname="XiIrritant.svg" sodipodi:version="0.32" width="155.932" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Irritant</dc:title>
+<dc:description>produit chimique</dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li></rdf:li>
+<rdf:li>symbol</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="svg1" inkscape:cx="62.372805" inkscape:cy="34.864537" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1121" inkscape:window-width="1590" inkscape:window-x="200" inkscape:window-y="0" inkscape:zoom="6.6399849" pagecolor="#ffffff"/>
+<defs id="defs2">
+<marker id="ArrowEnd" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="0" refY="5" viewBox="0 0 10 10">
+<path d="M 0 0 L 10 5 L 0 10 z" id="path4"/>
+</marker>
+<marker id="ArrowStart" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="10" refY="5" viewBox="0 0 10 10">
+<path d="M 10 0 L 0 5 L 10 10 z" id="path6"/>
+</marker>
+</defs>
+<g id="g7">
+<g id="g8">
+<path d="M 155.932 155.932L 155.932 0L 0 0L 0 155.932L 155.932 155.932z" id="path9" style="stroke:none; fill:#000000"/>
+<path d="M 150.83 150.83L 150.83 5.1011L 5.1011 5.1011L 5.1011 150.83L 150.83 150.83z" id="path10" style="stroke:none; fill:#ff9900"/>
+</g>
+<g id="g11">
+<path d="M 140.823 111.783L 44.3677 14.0771L 15.1084 44.1489L 111.564 141.854L 140.823 111.783z" id="path12" style="stroke:none; fill:#000000"/>
+<path d="M 111.783 15.1084L 14.0771 111.564L 44.1489 140.823L 141.855 44.3677L 111.783 15.1084z" id="path13" style="stroke:none; fill:#000000"/>
+</g>
+</g>
+</svg>
diff --git a/examples/desktop/systray/images/heart.svg b/examples/desktop/systray/images/heart.svg
new file mode 100644
index 0000000..ba5f050
--- /dev/null
+++ b/examples/desktop/systray/images/heart.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) --><svg viewBox="100 200 550 500" height="595.27559pt" id="svg1" inkscape:version="0.40+cvs" sodipodi:docbase="C:\Documents and Settings\Jon Phillips\My Documents\projects\clipart-project\submissions" sodipodi:docname="heart-left-highlight.svg" sodipodi:version="0.32" width="595.27559pt" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Heart Left-Highlight</dc:title>
+<dc:description>This is a normal valentines day heart.</dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li>holiday</rdf:li>
+<rdf:li>valentines</rdf:li>
+<rdf:li></rdf:li>
+<rdf:li>valentine</rdf:li>
+<rdf:li>hash(0x8a091c0)</rdf:li>
+<rdf:li>hash(0x8a0916c)</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+<rdf:li>hash(0x8a091f0)</rdf:li>
+<rdf:li>day</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<defs id="defs3"/>
+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="549.40674" inkscape:cy="596.00159" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="615" inkscape:window-width="866" inkscape:window-x="88" inkscape:window-y="116" inkscape:zoom="0.35000000" pagecolor="#ffffff" showguides="true"/>
+<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
+<path d="M 263.41570,235.14588 C 197.17570,235.14588 143.41575,288.90587 143.41575,355.14588 C 143.41575,489.90139 279.34890,525.23318 371.97820,658.45392 C 459.55244,526.05056 600.54070,485.59932 600.54070,355.14588 C 600.54070,288.90588 546.78080,235.14587 480.54070,235.14588 C 432.49280,235.14588 391.13910,263.51631 371.97820,304.33338 C 352.81740,263.51630 311.46370,235.14587 263.41570,235.14588 z " id="path7" sodipodi:nodetypes="ccccccc" style="fill:#e60000;fill-opacity:1.0000000;stroke:#000000;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+<path d="M 265.00000,253.59375 C 207.04033,253.59375 160.00000,300.63407 160.00000,358.59375 C 160.00000,476.50415 278.91857,507.43251 359.96875,624.00000 C 366.52868,614.08205 220.00000,478.47309 220.00000,378.59375 C 220.00000,320.63407 267.04033,273.59375 325.00000,273.59375 C 325.50453,273.59375 325.99718,273.64912 326.50000,273.65625 C 309.22436,261.07286 288.00557,253.59374 265.00000,253.59375 z " id="path220" sodipodi:nodetypes="ccccccc" style="fill:#e6e6e6;fill-opacity:0.64556962;stroke:none;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+</g>
+</svg>
diff --git a/examples/desktop/systray/images/trash.svg b/examples/desktop/systray/images/trash.svg
new file mode 100644
index 0000000..c44e4c7
--- /dev/null
+++ b/examples/desktop/systray/images/trash.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 10, SVG Export Plug-In . SVG Version: 3.0.0 Build 76) --><svg enable-background="new 0 0 347 348" height="348" i:pageBounds="0 792 612 0" i:rulerOrigin="0 0" i:viewOrigin="131 567" overflow="visible" space="preserve" viewBox="-20 -20 387 388" width="347" xmlns="http://www.w3.org/2000/svg" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xmlns:graph="http://ns.adobe.com/Graphs/1.0/" xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/" xmlns:x="http://ns.adobe.com/Extensibility/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Keep Tidy Inside</dc:title>
+<dc:description></dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li></rdf:li>
+<rdf:li>symbol</rdf:li>
+<rdf:li>bin</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+<rdf:li>clean</rdf:li>
+<rdf:li>rubish</rdf:li>
+<rdf:li>trash</rdf:li>
+<rdf:li>inside</rdf:li>
+<rdf:li>garbage</rdf:li>
+<rdf:li>sign</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<g i:dimmedPercent="50" i:knockout="Off" i:layer="yes" i:rgbTrio="#4F008000FFFF" id="Layer_1">
+<path d="M347,174c0,96.098-77.679,174-173.5,174C77.679,348,0,270.098,0,174 C0,77.902,77.679,0,173.5,0C269.321,0,347,77.902,347,174z" fill="#10A040" i:knockout="Off"/>
+<path d="M238,53c0,13.807-11.864,25-26.5,25S185,66.807,185,53s11.864-25,26.5-25 S238,39.193,238,53z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M66,175c1.055,6.355,19.333,126.417,19.333,126.417h68.333 c0,0,14.105-122.524,14.333-126.417c6.224-0.622,6.667-13-2-13c-12.164,0-89.205-0.059-98,0S61.167,174.487,66,175z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M78,141c17.292-5.325,24.179-23.532,27-31c14.513,6.596,40.333,12.265,59,8 c3.683,19.419-28.043,19.31-23,37C132.577,145.705,89.404,167.292,78,141z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M103,82l139-1c-0.6,3.421,33.633,57.497,29,67c-4.089,0.418-67,5-67,5 c6.109-9.379-13-43-13-43L103,82z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M270,156l-66-3c0,0-23.565,143.355-24,145s1.855,2.536,3,1s51-82,51-82 s19.754,80.701,20,82s3.721,1.209,4,0S270,156,270,156z" fill="#FFFFFF" i:knockout="Off"/>
+</g>
+</svg>
diff --git a/examples/desktop/systray/main.cpp b/examples/desktop/systray/main.cpp
new file mode 100644
index 0000000..d406d16
--- /dev/null
+++ b/examples/desktop/systray/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(systray);
+
+ QApplication app(argc, argv);
+
+ if (!QSystemTrayIcon::isSystemTrayAvailable()) {
+ QMessageBox::critical(0, QObject::tr("Systray"),
+ QObject::tr("I couldn't detect any system tray "
+ "on this system."));
+ return 1;
+ }
+ QApplication::setQuitOnLastWindowClosed(false);
+
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/desktop/systray/systray.pro b/examples/desktop/systray/systray.pro
new file mode 100644
index 0000000..c73a48e
--- /dev/null
+++ b/examples/desktop/systray/systray.pro
@@ -0,0 +1,22 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+RESOURCES = systray.qrc
+QT += xml svg
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/desktop/systray
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS systray.pro resources images
+sources.path = $$[QT_INSTALL_EXAMPLES]/desktop/systray
+INSTALLS += target sources
+
+wince* {
+ CONFIG(debug, release|debug) {
+ addPlugins.sources = $$QT_BUILD_TREE/plugins/imageformats/qsvgd4.dll
+ }
+ CONFIG(release, release|debug) {
+ addPlugins.sources = $$QT_BUILD_TREE/plugins/imageformats/qsvg4.dll
+ }
+ addPlugins.path = imageformats
+ DEPLOYMENT += addPlugins
+}
diff --git a/examples/desktop/systray/systray.qrc b/examples/desktop/systray/systray.qrc
new file mode 100644
index 0000000..b0d5e0c
--- /dev/null
+++ b/examples/desktop/systray/systray.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>images/bad.svg</file>
+ <file>images/heart.svg</file>
+ <file>images/trash.svg</file>
+</qresource>
+</RCC>
diff --git a/examples/desktop/systray/window.cpp b/examples/desktop/systray/window.cpp
new file mode 100644
index 0000000..052ecdd
--- /dev/null
+++ b/examples/desktop/systray/window.cpp
@@ -0,0 +1,259 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ createIconGroupBox();
+ createMessageGroupBox();
+
+ iconLabel->setMinimumWidth(durationLabel->sizeHint().width());
+
+ createActions();
+ createTrayIcon();
+
+ connect(showMessageButton, SIGNAL(clicked()), this, SLOT(showMessage()));
+ connect(showIconCheckBox, SIGNAL(toggled(bool)),
+ trayIcon, SLOT(setVisible(bool)));
+ connect(iconComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(setIcon(int)));
+ connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(messageClicked()));
+ connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
+ this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(iconGroupBox);
+ mainLayout->addWidget(messageGroupBox);
+ setLayout(mainLayout);
+
+ iconComboBox->setCurrentIndex(1);
+ trayIcon->show();
+
+ setWindowTitle(tr("Systray"));
+ resize(400, 300);
+}
+//! [0]
+
+//! [1]
+void Window::setVisible(bool visible)
+{
+ minimizeAction->setEnabled(visible);
+ maximizeAction->setEnabled(!isMaximized());
+ restoreAction->setEnabled(isMaximized() || !visible);
+ QDialog::setVisible(visible);
+}
+//! [1]
+
+//! [2]
+void Window::closeEvent(QCloseEvent *event)
+{
+ if (trayIcon->isVisible()) {
+ QMessageBox::information(this, tr("Systray"),
+ tr("The program will keep running in the "
+ "system tray. To terminate the program, "
+ "choose <b>Quit</b> in the context menu "
+ "of the system tray entry."));
+ hide();
+ event->ignore();
+ }
+}
+//! [2]
+
+//! [3]
+void Window::setIcon(int index)
+{
+ QIcon icon = iconComboBox->itemIcon(index);
+ trayIcon->setIcon(icon);
+ setWindowIcon(icon);
+
+ trayIcon->setToolTip(iconComboBox->itemText(index));
+}
+//! [3]
+
+//! [4]
+void Window::iconActivated(QSystemTrayIcon::ActivationReason reason)
+{
+ switch (reason) {
+ case QSystemTrayIcon::Trigger:
+ case QSystemTrayIcon::DoubleClick:
+ iconComboBox->setCurrentIndex((iconComboBox->currentIndex() + 1)
+ % iconComboBox->count());
+ break;
+ case QSystemTrayIcon::MiddleClick:
+ showMessage();
+ break;
+ default:
+ ;
+ }
+}
+//! [4]
+
+//! [5]
+void Window::showMessage()
+{
+ QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(
+ typeComboBox->itemData(typeComboBox->currentIndex()).toInt());
+ trayIcon->showMessage(titleEdit->text(), bodyEdit->toPlainText(), icon,
+ durationSpinBox->value() * 1000);
+}
+//! [5]
+
+//! [6]
+void Window::messageClicked()
+{
+ QMessageBox::information(0, tr("Systray"),
+ tr("Sorry, I already gave what help I could.\n"
+ "Maybe you should try asking a human?"));
+}
+//! [6]
+
+void Window::createIconGroupBox()
+{
+ iconGroupBox = new QGroupBox(tr("Tray Icon"));
+
+ iconLabel = new QLabel("Icon:");
+
+ iconComboBox = new QComboBox;
+ iconComboBox->addItem(QIcon(":/images/bad.svg"), tr("Bad"));
+ iconComboBox->addItem(QIcon(":/images/heart.svg"), tr("Heart"));
+ iconComboBox->addItem(QIcon(":/images/trash.svg"), tr("Trash"));
+
+ showIconCheckBox = new QCheckBox(tr("Show icon"));
+ showIconCheckBox->setChecked(true);
+
+ QHBoxLayout *iconLayout = new QHBoxLayout;
+ iconLayout->addWidget(iconLabel);
+ iconLayout->addWidget(iconComboBox);
+ iconLayout->addStretch();
+ iconLayout->addWidget(showIconCheckBox);
+ iconGroupBox->setLayout(iconLayout);
+}
+
+void Window::createMessageGroupBox()
+{
+ messageGroupBox = new QGroupBox(tr("Balloon Message"));
+
+ typeLabel = new QLabel(tr("Type:"));
+
+ typeComboBox = new QComboBox;
+ typeComboBox->addItem(tr("None"), QSystemTrayIcon::NoIcon);
+ typeComboBox->addItem(style()->standardIcon(
+ QStyle::SP_MessageBoxInformation), tr("Information"),
+ QSystemTrayIcon::Information);
+ typeComboBox->addItem(style()->standardIcon(
+ QStyle::SP_MessageBoxWarning), tr("Warning"),
+ QSystemTrayIcon::Warning);
+ typeComboBox->addItem(style()->standardIcon(
+ QStyle::SP_MessageBoxCritical), tr("Critical"),
+ QSystemTrayIcon::Critical);
+ typeComboBox->setCurrentIndex(1);
+
+ durationLabel = new QLabel(tr("Duration:"));
+
+ durationSpinBox = new QSpinBox;
+ durationSpinBox->setRange(5, 60);
+ durationSpinBox->setSuffix(" s");
+ durationSpinBox->setValue(15);
+
+ durationWarningLabel = new QLabel(tr("(some systems might ignore this "
+ "hint)"));
+ durationWarningLabel->setIndent(10);
+
+ titleLabel = new QLabel(tr("Title:"));
+
+ titleEdit = new QLineEdit(tr("Cannot connect to network"));
+
+ bodyLabel = new QLabel(tr("Body:"));
+
+ bodyEdit = new QTextEdit;
+ bodyEdit->setPlainText(tr("Don't believe me. Honestly, I don't have a "
+ "clue.\nClick this balloon for details."));
+
+ showMessageButton = new QPushButton(tr("Show Message"));
+ showMessageButton->setDefault(true);
+
+ QGridLayout *messageLayout = new QGridLayout;
+ messageLayout->addWidget(typeLabel, 0, 0);
+ messageLayout->addWidget(typeComboBox, 0, 1, 1, 2);
+ messageLayout->addWidget(durationLabel, 1, 0);
+ messageLayout->addWidget(durationSpinBox, 1, 1);
+ messageLayout->addWidget(durationWarningLabel, 1, 2, 1, 3);
+ messageLayout->addWidget(titleLabel, 2, 0);
+ messageLayout->addWidget(titleEdit, 2, 1, 1, 4);
+ messageLayout->addWidget(bodyLabel, 3, 0);
+ messageLayout->addWidget(bodyEdit, 3, 1, 2, 4);
+ messageLayout->addWidget(showMessageButton, 5, 4);
+ messageLayout->setColumnStretch(3, 1);
+ messageLayout->setRowStretch(4, 1);
+ messageGroupBox->setLayout(messageLayout);
+}
+
+void Window::createActions()
+{
+ minimizeAction = new QAction(tr("Mi&nimize"), this);
+ connect(minimizeAction, SIGNAL(triggered()), this, SLOT(hide()));
+
+ maximizeAction = new QAction(tr("Ma&ximize"), this);
+ connect(maximizeAction, SIGNAL(triggered()), this, SLOT(showMaximized()));
+
+ restoreAction = new QAction(tr("&Restore"), this);
+ connect(restoreAction, SIGNAL(triggered()), this, SLOT(showNormal()));
+
+ quitAction = new QAction(tr("&Quit"), this);
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+}
+
+void Window::createTrayIcon()
+{
+ trayIconMenu = new QMenu(this);
+ trayIconMenu->addAction(minimizeAction);
+ trayIconMenu->addAction(maximizeAction);
+ trayIconMenu->addAction(restoreAction);
+ trayIconMenu->addSeparator();
+ trayIconMenu->addAction(quitAction);
+
+ trayIcon = new QSystemTrayIcon(this);
+ trayIcon->setContextMenu(trayIconMenu);
+}
diff --git a/examples/desktop/systray/window.h b/examples/desktop/systray/window.h
new file mode 100644
index 0000000..d9bfd52
--- /dev/null
+++ b/examples/desktop/systray/window.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QSystemTrayIcon>
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QMenu;
+class QPushButton;
+class QSpinBox;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+ void setVisible(bool visible);
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void setIcon(int index);
+ void iconActivated(QSystemTrayIcon::ActivationReason reason);
+ void showMessage();
+ void messageClicked();
+
+private:
+ void createIconGroupBox();
+ void createMessageGroupBox();
+ void createActions();
+ void createTrayIcon();
+
+ QGroupBox *iconGroupBox;
+ QLabel *iconLabel;
+ QComboBox *iconComboBox;
+ QCheckBox *showIconCheckBox;
+
+ QGroupBox *messageGroupBox;
+ QLabel *typeLabel;
+ QLabel *durationLabel;
+ QLabel *durationWarningLabel;
+ QLabel *titleLabel;
+ QLabel *bodyLabel;
+ QComboBox *typeComboBox;
+ QSpinBox *durationSpinBox;
+ QLineEdit *titleEdit;
+ QTextEdit *bodyEdit;
+ QPushButton *showMessageButton;
+
+ QAction *minimizeAction;
+ QAction *maximizeAction;
+ QAction *restoreAction;
+ QAction *quitAction;
+
+ QSystemTrayIcon *trayIcon;
+ QMenu *trayIconMenu;
+};
+//! [0]
+
+#endif
diff --git a/examples/dialogs/README b/examples/dialogs/README
new file mode 100644
index 0000000..ab0f884
--- /dev/null
+++ b/examples/dialogs/README
@@ -0,0 +1,40 @@
+Qt includes standard dialogs for many common operations, such as file
+selection, printing, and color selection.
+
+Custom dialogs can also be created for specialized modal or modeless
+interactions with users.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/dialogs/classwizard/classwizard.cpp b/examples/dialogs/classwizard/classwizard.cpp
new file mode 100644
index 0000000..200d7ac
--- /dev/null
+++ b/examples/dialogs/classwizard/classwizard.cpp
@@ -0,0 +1,431 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "classwizard.h"
+
+//! [0] //! [1]
+ClassWizard::ClassWizard(QWidget *parent)
+ : QWizard(parent)
+{
+ addPage(new IntroPage);
+ addPage(new ClassInfoPage);
+ addPage(new CodeStylePage);
+ addPage(new OutputFilesPage);
+ addPage(new ConclusionPage);
+//! [0]
+
+ setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png"));
+ setPixmap(QWizard::BackgroundPixmap, QPixmap(":/images/background.png"));
+
+ setWindowTitle(tr("Class Wizard"));
+//! [2]
+}
+//! [1] //! [2]
+
+//! [3]
+void ClassWizard::accept()
+//! [3] //! [4]
+{
+ QByteArray className = field("className").toByteArray();
+ QByteArray baseClass = field("baseClass").toByteArray();
+ QByteArray macroName = field("macroName").toByteArray();
+ QByteArray baseInclude = field("baseInclude").toByteArray();
+
+ QString outputDir = field("outputDir").toString();
+ QString header = field("header").toString();
+ QString implementation = field("implementation").toString();
+//! [4]
+
+ QByteArray block;
+
+ if (field("comment").toBool()) {
+ block += "/*\n";
+ block += " " + header.toAscii() + "\n";
+ block += "*/\n";
+ block += "\n";
+ }
+ if (field("protect").toBool()) {
+ block += "#ifndef " + macroName + "\n";
+ block += "#define " + macroName + "\n";
+ block += "\n";
+ }
+ if (field("includeBase").toBool()) {
+ block += "#include " + baseInclude + "\n";
+ block += "\n";
+ }
+
+ block += "class " + className;
+ if (!baseClass.isEmpty())
+ block += " : public " + baseClass;
+ block += "\n";
+ block += "{\n";
+
+ /* qmake ignore Q_OBJECT */
+
+ if (field("qobjectMacro").toBool()) {
+ block += " Q_OBJECT\n";
+ block += "\n";
+ }
+ block += "public:\n";
+
+ if (field("qobjectCtor").toBool()) {
+ block += " " + className + "(QObject *parent = 0);\n";
+ } else if (field("qwidgetCtor").toBool()) {
+ block += " " + className + "(QWidget *parent = 0);\n";
+ } else if (field("defaultCtor").toBool()) {
+ block += " " + className + "();\n";
+ if (field("copyCtor").toBool()) {
+ block += " " + className + "(const " + className + " &other);\n";
+ block += "\n";
+ block += " " + className + " &operator=" + "(const " + className
+ + " &other);\n";
+ }
+ }
+ block += "};\n";
+
+ if (field("protect").toBool()) {
+ block += "\n";
+ block += "#endif\n";
+ }
+
+ QFile headerFile(outputDir + "/" + header);
+ if (!headerFile.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(0, QObject::tr("Simple Wizard"),
+ QObject::tr("Cannot write file %1:\n%2")
+ .arg(headerFile.fileName())
+ .arg(headerFile.errorString()));
+ return;
+ }
+ headerFile.write(block);
+
+ block.clear();
+
+ if (field("comment").toBool()) {
+ block += "/*\n";
+ block += " " + implementation.toAscii() + "\n";
+ block += "*/\n";
+ block += "\n";
+ }
+ block += "#include \"" + header.toAscii() + "\"\n";
+ block += "\n";
+
+ if (field("qobjectCtor").toBool()) {
+ block += className + "::" + className + "(QObject *parent)\n";
+ block += " : " + baseClass + "(parent)\n";
+ block += "{\n";
+ block += "}\n";
+ } else if (field("qwidgetCtor").toBool()) {
+ block += className + "::" + className + "(QWidget *parent)\n";
+ block += " : " + baseClass + "(parent)\n";
+ block += "{\n";
+ block += "}\n";
+ } else if (field("defaultCtor").toBool()) {
+ block += className + "::" + className + "()\n";
+ block += "{\n";
+ block += " // missing code\n";
+ block += "}\n";
+
+ if (field("copyCtor").toBool()) {
+ block += "\n";
+ block += className + "::" + className + "(const " + className
+ + " &other)\n";
+ block += "{\n";
+ block += " *this = other;\n";
+ block += "}\n";
+ block += "\n";
+ block += className + " &" + className + "::operator=(const "
+ + className + " &other)\n";
+ block += "{\n";
+ if (!baseClass.isEmpty())
+ block += " " + baseClass + "::operator=(other);\n";
+ block += " // missing code\n";
+ block += " return *this;\n";
+ block += "}\n";
+ }
+ }
+
+ QFile implementationFile(outputDir + "/" + implementation);
+ if (!implementationFile.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(0, QObject::tr("Simple Wizard"),
+ QObject::tr("Cannot write file %1:\n%2")
+ .arg(implementationFile.fileName())
+ .arg(implementationFile.errorString()));
+ return;
+ }
+ implementationFile.write(block);
+
+//! [5]
+ QDialog::accept();
+//! [5] //! [6]
+}
+//! [6]
+
+//! [7]
+IntroPage::IntroPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Introduction"));
+ setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark1.png"));
+
+ label = new QLabel(tr("This wizard will generate a skeleton C++ class "
+ "definition, including a few functions. You simply "
+ "need to specify the class name and set a few "
+ "options to produce a header file and an "
+ "implementation file for your new C++ class."));
+ label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ setLayout(layout);
+}
+//! [7]
+
+//! [8] //! [9]
+ClassInfoPage::ClassInfoPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+//! [8]
+ setTitle(tr("Class Information"));
+ setSubTitle(tr("Specify basic information about the class for which you "
+ "want to generate skeleton source code files."));
+ setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo1.png"));
+
+//! [10]
+ classNameLabel = new QLabel(tr("&Class name:"));
+ classNameLineEdit = new QLineEdit;
+ classNameLabel->setBuddy(classNameLineEdit);
+
+ baseClassLabel = new QLabel(tr("B&ase class:"));
+ baseClassLineEdit = new QLineEdit;
+ baseClassLabel->setBuddy(baseClassLineEdit);
+
+ qobjectMacroCheckBox = new QCheckBox(tr("Generate Q_OBJECT &macro"));
+
+//! [10]
+ groupBox = new QGroupBox(tr("C&onstructor"));
+//! [9]
+
+ qobjectCtorRadioButton = new QRadioButton(tr("&QObject-style constructor"));
+ qwidgetCtorRadioButton = new QRadioButton(tr("Q&Widget-style constructor"));
+ defaultCtorRadioButton = new QRadioButton(tr("&Default constructor"));
+ copyCtorCheckBox = new QCheckBox(tr("&Generate copy constructor and "
+ "operator="));
+
+ defaultCtorRadioButton->setChecked(true);
+
+ connect(defaultCtorRadioButton, SIGNAL(toggled(bool)),
+ copyCtorCheckBox, SLOT(setEnabled(bool)));
+
+//! [11] //! [12]
+ registerField("className*", classNameLineEdit);
+ registerField("baseClass", baseClassLineEdit);
+ registerField("qobjectMacro", qobjectMacroCheckBox);
+//! [11]
+ registerField("qobjectCtor", qobjectCtorRadioButton);
+ registerField("qwidgetCtor", qwidgetCtorRadioButton);
+ registerField("defaultCtor", defaultCtorRadioButton);
+ registerField("copyCtor", copyCtorCheckBox);
+
+ QVBoxLayout *groupBoxLayout = new QVBoxLayout;
+//! [12]
+ groupBoxLayout->addWidget(qobjectCtorRadioButton);
+ groupBoxLayout->addWidget(qwidgetCtorRadioButton);
+ groupBoxLayout->addWidget(defaultCtorRadioButton);
+ groupBoxLayout->addWidget(copyCtorCheckBox);
+ groupBox->setLayout(groupBoxLayout);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(classNameLabel, 0, 0);
+ layout->addWidget(classNameLineEdit, 0, 1);
+ layout->addWidget(baseClassLabel, 1, 0);
+ layout->addWidget(baseClassLineEdit, 1, 1);
+ layout->addWidget(qobjectMacroCheckBox, 2, 0, 1, 2);
+ layout->addWidget(groupBox, 3, 0, 1, 2);
+ setLayout(layout);
+//! [13]
+}
+//! [13]
+
+//! [14]
+CodeStylePage::CodeStylePage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Code Style Options"));
+ setSubTitle(tr("Choose the formatting of the generated code."));
+ setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo2.png"));
+
+ commentCheckBox = new QCheckBox(tr("&Start generated files with a "
+//! [14]
+ "comment"));
+ commentCheckBox->setChecked(true);
+
+ protectCheckBox = new QCheckBox(tr("&Protect header file against multiple "
+ "inclusions"));
+ protectCheckBox->setChecked(true);
+
+ macroNameLabel = new QLabel(tr("&Macro name:"));
+ macroNameLineEdit = new QLineEdit;
+ macroNameLabel->setBuddy(macroNameLineEdit);
+
+ includeBaseCheckBox = new QCheckBox(tr("&Include base class definition"));
+ baseIncludeLabel = new QLabel(tr("Base class include:"));
+ baseIncludeLineEdit = new QLineEdit;
+ baseIncludeLabel->setBuddy(baseIncludeLineEdit);
+
+ connect(protectCheckBox, SIGNAL(toggled(bool)),
+ macroNameLabel, SLOT(setEnabled(bool)));
+ connect(protectCheckBox, SIGNAL(toggled(bool)),
+ macroNameLineEdit, SLOT(setEnabled(bool)));
+ connect(includeBaseCheckBox, SIGNAL(toggled(bool)),
+ baseIncludeLabel, SLOT(setEnabled(bool)));
+ connect(includeBaseCheckBox, SIGNAL(toggled(bool)),
+ baseIncludeLineEdit, SLOT(setEnabled(bool)));
+
+ registerField("comment", commentCheckBox);
+ registerField("protect", protectCheckBox);
+ registerField("macroName", macroNameLineEdit);
+ registerField("includeBase", includeBaseCheckBox);
+ registerField("baseInclude", baseIncludeLineEdit);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->setColumnMinimumWidth(0, 20);
+ layout->addWidget(commentCheckBox, 0, 0, 1, 3);
+ layout->addWidget(protectCheckBox, 1, 0, 1, 3);
+ layout->addWidget(macroNameLabel, 2, 1);
+ layout->addWidget(macroNameLineEdit, 2, 2);
+ layout->addWidget(includeBaseCheckBox, 3, 0, 1, 3);
+ layout->addWidget(baseIncludeLabel, 4, 1);
+ layout->addWidget(baseIncludeLineEdit, 4, 2);
+//! [15]
+ setLayout(layout);
+}
+//! [15]
+
+//! [16]
+void CodeStylePage::initializePage()
+{
+ QString className = field("className").toString();
+ macroNameLineEdit->setText(className.toUpper() + "_H");
+
+ QString baseClass = field("baseClass").toString();
+
+ includeBaseCheckBox->setChecked(!baseClass.isEmpty());
+ includeBaseCheckBox->setEnabled(!baseClass.isEmpty());
+ baseIncludeLabel->setEnabled(!baseClass.isEmpty());
+ baseIncludeLineEdit->setEnabled(!baseClass.isEmpty());
+
+ if (baseClass.isEmpty()) {
+ baseIncludeLineEdit->clear();
+ } else if (QRegExp("Q[A-Z].*").exactMatch(baseClass)) {
+ baseIncludeLineEdit->setText("<" + baseClass + ">");
+ } else {
+ baseIncludeLineEdit->setText("\"" + baseClass.toLower() + ".h\"");
+ }
+}
+//! [16]
+
+OutputFilesPage::OutputFilesPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Output Files"));
+ setSubTitle(tr("Specify where you want the wizard to put the generated "
+ "skeleton code."));
+ setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo3.png"));
+
+ outputDirLabel = new QLabel(tr("&Output directory:"));
+ outputDirLineEdit = new QLineEdit;
+ outputDirLabel->setBuddy(outputDirLineEdit);
+
+ headerLabel = new QLabel(tr("&Header file name:"));
+ headerLineEdit = new QLineEdit;
+ headerLabel->setBuddy(headerLineEdit);
+
+ implementationLabel = new QLabel(tr("&Implementation file name:"));
+ implementationLineEdit = new QLineEdit;
+ implementationLabel->setBuddy(implementationLineEdit);
+
+ registerField("outputDir*", outputDirLineEdit);
+ registerField("header*", headerLineEdit);
+ registerField("implementation*", implementationLineEdit);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(outputDirLabel, 0, 0);
+ layout->addWidget(outputDirLineEdit, 0, 1);
+ layout->addWidget(headerLabel, 1, 0);
+ layout->addWidget(headerLineEdit, 1, 1);
+ layout->addWidget(implementationLabel, 2, 0);
+ layout->addWidget(implementationLineEdit, 2, 1);
+ setLayout(layout);
+}
+
+//! [17]
+void OutputFilesPage::initializePage()
+{
+ QString className = field("className").toString();
+ headerLineEdit->setText(className.toLower() + ".h");
+ implementationLineEdit->setText(className.toLower() + ".cpp");
+ outputDirLineEdit->setText(QDir::convertSeparators(QDir::tempPath()));
+}
+//! [17]
+
+ConclusionPage::ConclusionPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Conclusion"));
+ setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark2.png"));
+
+ label = new QLabel;
+ label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ setLayout(layout);
+}
+
+void ConclusionPage::initializePage()
+{
+ QString finishText = wizard()->buttonText(QWizard::FinishButton);
+ finishText.remove('&');
+ label->setText(tr("Click %1 to generate the class skeleton.")
+ .arg(finishText));
+}
diff --git a/examples/dialogs/classwizard/classwizard.h b/examples/dialogs/classwizard/classwizard.h
new file mode 100644
index 0000000..4808629
--- /dev/null
+++ b/examples/dialogs/classwizard/classwizard.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLASSWIZARD_H
+#define CLASSWIZARD_H
+
+#include <QWizard>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QRadioButton;
+QT_END_NAMESPACE
+
+//! [0]
+class ClassWizard : public QWizard
+{
+ Q_OBJECT
+
+public:
+ ClassWizard(QWidget *parent = 0);
+
+ void accept();
+};
+//! [0]
+
+//! [1]
+class IntroPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ IntroPage(QWidget *parent = 0);
+
+private:
+ QLabel *label;
+};
+//! [1]
+
+//! [2]
+class ClassInfoPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ ClassInfoPage(QWidget *parent = 0);
+
+private:
+ QLabel *classNameLabel;
+ QLabel *baseClassLabel;
+ QLineEdit *classNameLineEdit;
+ QLineEdit *baseClassLineEdit;
+ QCheckBox *qobjectMacroCheckBox;
+ QGroupBox *groupBox;
+ QRadioButton *qobjectCtorRadioButton;
+ QRadioButton *qwidgetCtorRadioButton;
+ QRadioButton *defaultCtorRadioButton;
+ QCheckBox *copyCtorCheckBox;
+};
+//! [2]
+
+//! [3]
+class CodeStylePage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ CodeStylePage(QWidget *parent = 0);
+
+protected:
+ void initializePage();
+
+private:
+ QCheckBox *commentCheckBox;
+ QCheckBox *protectCheckBox;
+ QCheckBox *includeBaseCheckBox;
+ QLabel *macroNameLabel;
+ QLabel *baseIncludeLabel;
+ QLineEdit *macroNameLineEdit;
+ QLineEdit *baseIncludeLineEdit;
+};
+//! [3]
+
+class OutputFilesPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ OutputFilesPage(QWidget *parent = 0);
+
+protected:
+ void initializePage();
+
+private:
+ QLabel *outputDirLabel;
+ QLabel *headerLabel;
+ QLabel *implementationLabel;
+ QLineEdit *outputDirLineEdit;
+ QLineEdit *headerLineEdit;
+ QLineEdit *implementationLineEdit;
+};
+
+class ConclusionPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ ConclusionPage(QWidget *parent = 0);
+
+protected:
+ void initializePage();
+
+private:
+ QLabel *label;
+};
+
+#endif
diff --git a/examples/dialogs/classwizard/classwizard.pro b/examples/dialogs/classwizard/classwizard.pro
new file mode 100644
index 0000000..15b6029
--- /dev/null
+++ b/examples/dialogs/classwizard/classwizard.pro
@@ -0,0 +1,10 @@
+HEADERS = classwizard.h
+SOURCES = classwizard.cpp \
+ main.cpp
+RESOURCES = classwizard.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/classwizard
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/classwizard
+INSTALLS += target sources
diff --git a/examples/dialogs/classwizard/classwizard.qrc b/examples/dialogs/classwizard/classwizard.qrc
new file mode 100644
index 0000000..41a5ddc
--- /dev/null
+++ b/examples/dialogs/classwizard/classwizard.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/background.png</file>
+ <file>images/banner.png</file>
+ <file>images/logo1.png</file>
+ <file>images/logo2.png</file>
+ <file>images/logo3.png</file>
+ <file>images/watermark1.png</file>
+ <file>images/watermark2.png</file>
+</qresource>
+</RCC>
diff --git a/examples/dialogs/classwizard/images/background.png b/examples/dialogs/classwizard/images/background.png
new file mode 100644
index 0000000..44c7bad
--- /dev/null
+++ b/examples/dialogs/classwizard/images/background.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/banner.png b/examples/dialogs/classwizard/images/banner.png
new file mode 100644
index 0000000..3169152
--- /dev/null
+++ b/examples/dialogs/classwizard/images/banner.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/logo1.png b/examples/dialogs/classwizard/images/logo1.png
new file mode 100644
index 0000000..f9b594a
--- /dev/null
+++ b/examples/dialogs/classwizard/images/logo1.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/logo2.png b/examples/dialogs/classwizard/images/logo2.png
new file mode 100644
index 0000000..5dcbd46
--- /dev/null
+++ b/examples/dialogs/classwizard/images/logo2.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/logo3.png b/examples/dialogs/classwizard/images/logo3.png
new file mode 100644
index 0000000..9fd3ea2
--- /dev/null
+++ b/examples/dialogs/classwizard/images/logo3.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/watermark1.png b/examples/dialogs/classwizard/images/watermark1.png
new file mode 100644
index 0000000..0091f5c
--- /dev/null
+++ b/examples/dialogs/classwizard/images/watermark1.png
Binary files differ
diff --git a/examples/dialogs/classwizard/images/watermark2.png b/examples/dialogs/classwizard/images/watermark2.png
new file mode 100644
index 0000000..3b88f2e
--- /dev/null
+++ b/examples/dialogs/classwizard/images/watermark2.png
Binary files differ
diff --git a/examples/dialogs/classwizard/main.cpp b/examples/dialogs/classwizard/main.cpp
new file mode 100644
index 0000000..8230695
--- /dev/null
+++ b/examples/dialogs/classwizard/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTranslator>
+#include <QLocale>
+#include <QLibraryInfo>
+
+#include "classwizard.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(classwizard);
+
+ QApplication app(argc, argv);
+
+ QString translatorFileName = QLatin1String("qt_");
+ translatorFileName += QLocale::system().name();
+ QTranslator *translator = new QTranslator(&app);
+ if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ app.installTranslator(translator);
+
+ ClassWizard wizard;
+ wizard.show();
+ return app.exec();
+}
diff --git a/examples/dialogs/configdialog/configdialog.cpp b/examples/dialogs/configdialog/configdialog.cpp
new file mode 100644
index 0000000..f442e10
--- /dev/null
+++ b/examples/dialogs/configdialog/configdialog.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "configdialog.h"
+#include "pages.h"
+
+ConfigDialog::ConfigDialog()
+{
+ contentsWidget = new QListWidget;
+ contentsWidget->setViewMode(QListView::IconMode);
+ contentsWidget->setIconSize(QSize(96, 84));
+ contentsWidget->setMovement(QListView::Static);
+ contentsWidget->setMaximumWidth(128);
+ contentsWidget->setSpacing(12);
+
+ pagesWidget = new QStackedWidget;
+ pagesWidget->addWidget(new ConfigurationPage);
+ pagesWidget->addWidget(new UpdatePage);
+ pagesWidget->addWidget(new QueryPage);
+
+ QPushButton *closeButton = new QPushButton(tr("Close"));
+
+ createIcons();
+ contentsWidget->setCurrentRow(0);
+
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QHBoxLayout *horizontalLayout = new QHBoxLayout;
+ horizontalLayout->addWidget(contentsWidget);
+ horizontalLayout->addWidget(pagesWidget, 1);
+
+ QHBoxLayout *buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch(1);
+ buttonsLayout->addWidget(closeButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(horizontalLayout);
+ mainLayout->addStretch(1);
+ mainLayout->addSpacing(12);
+ mainLayout->addLayout(buttonsLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Config Dialog"));
+}
+
+void ConfigDialog::createIcons()
+{
+ QListWidgetItem *configButton = new QListWidgetItem(contentsWidget);
+ configButton->setIcon(QIcon(":/images/config.png"));
+ configButton->setText(tr("Configuration"));
+ configButton->setTextAlignment(Qt::AlignHCenter);
+ configButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+
+ QListWidgetItem *updateButton = new QListWidgetItem(contentsWidget);
+ updateButton->setIcon(QIcon(":/images/update.png"));
+ updateButton->setText(tr("Update"));
+ updateButton->setTextAlignment(Qt::AlignHCenter);
+ updateButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+
+ QListWidgetItem *queryButton = new QListWidgetItem(contentsWidget);
+ queryButton->setIcon(QIcon(":/images/query.png"));
+ queryButton->setText(tr("Query"));
+ queryButton->setTextAlignment(Qt::AlignHCenter);
+ queryButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+
+ connect(contentsWidget,
+ SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
+ this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*)));
+}
+
+void ConfigDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous)
+{
+ if (!current)
+ current = previous;
+
+ pagesWidget->setCurrentIndex(contentsWidget->row(current));
+}
diff --git a/examples/dialogs/configdialog/configdialog.h b/examples/dialogs/configdialog/configdialog.h
new file mode 100644
index 0000000..b09771c
--- /dev/null
+++ b/examples/dialogs/configdialog/configdialog.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONFIGDIALOG_H
+#define CONFIGDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QListWidget;
+class QListWidgetItem;
+class QStackedWidget;
+QT_END_NAMESPACE
+
+class ConfigDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ ConfigDialog();
+
+public slots:
+ void changePage(QListWidgetItem *current, QListWidgetItem *previous);
+
+private:
+ void createIcons();
+
+ QListWidget *contentsWidget;
+ QStackedWidget *pagesWidget;
+};
+
+#endif
diff --git a/examples/dialogs/configdialog/configdialog.pro b/examples/dialogs/configdialog/configdialog.pro
new file mode 100644
index 0000000..344a394
--- /dev/null
+++ b/examples/dialogs/configdialog/configdialog.pro
@@ -0,0 +1,14 @@
+HEADERS = configdialog.h \
+ pages.h
+SOURCES = configdialog.cpp \
+ main.cpp \
+ pages.cpp
+RESOURCES += configdialog.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/configdialog
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/configdialog
+INSTALLS += target sources
+wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+
diff --git a/examples/dialogs/configdialog/configdialog.qrc b/examples/dialogs/configdialog/configdialog.qrc
new file mode 100644
index 0000000..31d0d49
--- /dev/null
+++ b/examples/dialogs/configdialog/configdialog.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/config.png</file>
+ <file>images/query.png</file>
+ <file>images/update.png</file>
+</qresource>
+</RCC>
diff --git a/examples/dialogs/configdialog/images/config.png b/examples/dialogs/configdialog/images/config.png
new file mode 100644
index 0000000..5c14d5f
--- /dev/null
+++ b/examples/dialogs/configdialog/images/config.png
Binary files differ
diff --git a/examples/dialogs/configdialog/images/query.png b/examples/dialogs/configdialog/images/query.png
new file mode 100644
index 0000000..ea9e291
--- /dev/null
+++ b/examples/dialogs/configdialog/images/query.png
Binary files differ
diff --git a/examples/dialogs/configdialog/images/update.png b/examples/dialogs/configdialog/images/update.png
new file mode 100644
index 0000000..3cb8ba6
--- /dev/null
+++ b/examples/dialogs/configdialog/images/update.png
Binary files differ
diff --git a/examples/dialogs/configdialog/main.cpp b/examples/dialogs/configdialog/main.cpp
new file mode 100644
index 0000000..afc5467
--- /dev/null
+++ b/examples/dialogs/configdialog/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "configdialog.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(configdialog);
+
+ QApplication app(argc, argv);
+ ConfigDialog dialog;
+ return dialog.exec();
+}
diff --git a/examples/dialogs/configdialog/pages.cpp b/examples/dialogs/configdialog/pages.cpp
new file mode 100644
index 0000000..27c322a
--- /dev/null
+++ b/examples/dialogs/configdialog/pages.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "pages.h"
+
+ConfigurationPage::ConfigurationPage(QWidget *parent)
+ : QWidget(parent)
+{
+ QGroupBox *configGroup = new QGroupBox(tr("Server configuration"));
+
+ QLabel *serverLabel = new QLabel(tr("Server:"));
+ QComboBox *serverCombo = new QComboBox;
+ serverCombo->addItem(tr("Qt Software (Australia)"));
+ serverCombo->addItem(tr("Qt Software (Germany)"));
+ serverCombo->addItem(tr("Qt Software (Norway)"));
+ serverCombo->addItem(tr("Qt Software (People's Republic of China)"));
+ serverCombo->addItem(tr("Qt Software (USA)"));
+
+ QHBoxLayout *serverLayout = new QHBoxLayout;
+ serverLayout->addWidget(serverLabel);
+ serverLayout->addWidget(serverCombo);
+
+ QVBoxLayout *configLayout = new QVBoxLayout;
+ configLayout->addLayout(serverLayout);
+ configGroup->setLayout(configLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(configGroup);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+}
+
+UpdatePage::UpdatePage(QWidget *parent)
+ : QWidget(parent)
+{
+ QGroupBox *updateGroup = new QGroupBox(tr("Package selection"));
+ QCheckBox *systemCheckBox = new QCheckBox(tr("Update system"));
+ QCheckBox *appsCheckBox = new QCheckBox(tr("Update applications"));
+ QCheckBox *docsCheckBox = new QCheckBox(tr("Update documentation"));
+
+ QGroupBox *packageGroup = new QGroupBox(tr("Existing packages"));
+
+ QListWidget *packageList = new QListWidget;
+ QListWidgetItem *qtItem = new QListWidgetItem(packageList);
+ qtItem->setText(tr("Qt"));
+ QListWidgetItem *qsaItem = new QListWidgetItem(packageList);
+ qsaItem->setText(tr("QSA"));
+ QListWidgetItem *teamBuilderItem = new QListWidgetItem(packageList);
+ teamBuilderItem->setText(tr("Teambuilder"));
+
+ QPushButton *startUpdateButton = new QPushButton(tr("Start update"));
+
+ QVBoxLayout *updateLayout = new QVBoxLayout;
+ updateLayout->addWidget(systemCheckBox);
+ updateLayout->addWidget(appsCheckBox);
+ updateLayout->addWidget(docsCheckBox);
+ updateGroup->setLayout(updateLayout);
+
+ QVBoxLayout *packageLayout = new QVBoxLayout;
+ packageLayout->addWidget(packageList);
+ packageGroup->setLayout(packageLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(updateGroup);
+ mainLayout->addWidget(packageGroup);
+ mainLayout->addSpacing(12);
+ mainLayout->addWidget(startUpdateButton);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+}
+
+QueryPage::QueryPage(QWidget *parent)
+ : QWidget(parent)
+{
+ QGroupBox *packagesGroup = new QGroupBox(tr("Look for packages"));
+
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ QLineEdit *nameEdit = new QLineEdit;
+
+ QLabel *dateLabel = new QLabel(tr("Released after:"));
+ QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate());
+
+ QCheckBox *releasesCheckBox = new QCheckBox(tr("Releases"));
+ QCheckBox *upgradesCheckBox = new QCheckBox(tr("Upgrades"));
+
+ QSpinBox *hitsSpinBox = new QSpinBox;
+ hitsSpinBox->setPrefix(tr("Return up to "));
+ hitsSpinBox->setSuffix(tr(" results"));
+ hitsSpinBox->setSpecialValueText(tr("Return only the first result"));
+ hitsSpinBox->setMinimum(1);
+ hitsSpinBox->setMaximum(100);
+ hitsSpinBox->setSingleStep(10);
+
+ QPushButton *startQueryButton = new QPushButton(tr("Start query"));
+
+ QGridLayout *packagesLayout = new QGridLayout;
+ packagesLayout->addWidget(nameLabel, 0, 0);
+ packagesLayout->addWidget(nameEdit, 0, 1);
+ packagesLayout->addWidget(dateLabel, 1, 0);
+ packagesLayout->addWidget(dateEdit, 1, 1);
+ packagesLayout->addWidget(releasesCheckBox, 2, 0);
+ packagesLayout->addWidget(upgradesCheckBox, 3, 0);
+ packagesLayout->addWidget(hitsSpinBox, 4, 0, 1, 2);
+ packagesGroup->setLayout(packagesLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(packagesGroup);
+ mainLayout->addSpacing(12);
+ mainLayout->addWidget(startQueryButton);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+}
diff --git a/examples/dialogs/configdialog/pages.h b/examples/dialogs/configdialog/pages.h
new file mode 100644
index 0000000..534798f
--- /dev/null
+++ b/examples/dialogs/configdialog/pages.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PAGES_H
+#define PAGES_H
+
+#include <QWidget>
+
+class ConfigurationPage : public QWidget
+{
+public:
+ ConfigurationPage(QWidget *parent = 0);
+};
+
+class QueryPage : public QWidget
+{
+public:
+ QueryPage(QWidget *parent = 0);
+};
+
+class UpdatePage : public QWidget
+{
+public:
+ UpdatePage(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/dialogs/dialogs.pro b/examples/dialogs/dialogs.pro
new file mode 100644
index 0000000..b9f029a
--- /dev/null
+++ b/examples/dialogs/dialogs.pro
@@ -0,0 +1,17 @@
+TEMPLATE = subdirs
+SUBDIRS = classwizard \
+ configdialog \
+ standarddialogs \
+ tabdialog \
+ trivialwizard
+
+!wince*: SUBDIRS += licensewizard \
+ extension \
+ findfiles
+
+wince*: SUBDIRS += sipdialog
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs
+INSTALLS += sources
diff --git a/examples/dialogs/extension/extension.pro b/examples/dialogs/extension/extension.pro
new file mode 100644
index 0000000..3e56cb9
--- /dev/null
+++ b/examples/dialogs/extension/extension.pro
@@ -0,0 +1,9 @@
+HEADERS = finddialog.h
+SOURCES = finddialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/extension
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/extension
+INSTALLS += target sources
diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp
new file mode 100644
index 0000000..80c2868
--- /dev/null
+++ b/examples/dialogs/extension/finddialog.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "finddialog.h"
+
+//! [0]
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ label = new QLabel(tr("Find &what:"));
+ lineEdit = new QLineEdit;
+ label->setBuddy(lineEdit);
+
+ caseCheckBox = new QCheckBox(tr("Match &case"));
+ fromStartCheckBox = new QCheckBox(tr("Search from &start"));
+ fromStartCheckBox->setChecked(true);
+
+//! [1]
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setDefault(true);
+
+ moreButton = new QPushButton(tr("&More"));
+ moreButton->setCheckable(true);
+//! [0]
+ moreButton->setAutoDefault(false);
+
+ buttonBox = new QDialogButtonBox(Qt::Vertical);
+ buttonBox->addButton(findButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole);
+//! [1]
+
+//! [2]
+ extension = new QWidget;
+
+ wholeWordsCheckBox = new QCheckBox(tr("&Whole words"));
+ backwardCheckBox = new QCheckBox(tr("Search &backward"));
+ searchSelectionCheckBox = new QCheckBox(tr("Search se&lection"));
+//! [2]
+
+//! [3]
+ connect(moreButton, SIGNAL(toggled(bool)), extension, SLOT(setVisible(bool)));
+
+ QVBoxLayout *extensionLayout = new QVBoxLayout;
+ extensionLayout->setMargin(0);
+ extensionLayout->addWidget(wholeWordsCheckBox);
+ extensionLayout->addWidget(backwardCheckBox);
+ extensionLayout->addWidget(searchSelectionCheckBox);
+ extension->setLayout(extensionLayout);
+//! [3]
+
+//! [4]
+ QHBoxLayout *topLeftLayout = new QHBoxLayout;
+ topLeftLayout->addWidget(label);
+ topLeftLayout->addWidget(lineEdit);
+
+ QVBoxLayout *leftLayout = new QVBoxLayout;
+ leftLayout->addLayout(topLeftLayout);
+ leftLayout->addWidget(caseCheckBox);
+ leftLayout->addWidget(fromStartCheckBox);
+ leftLayout->addStretch(1);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->setSizeConstraint(QLayout::SetFixedSize);
+ mainLayout->addLayout(leftLayout, 0, 0);
+ mainLayout->addWidget(buttonBox, 0, 1);
+ mainLayout->addWidget(extension, 1, 0, 1, 2);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Extension"));
+//! [4] //! [5]
+ extension->hide();
+}
+//! [5]
diff --git a/examples/dialogs/extension/finddialog.h b/examples/dialogs/extension/finddialog.h
new file mode 100644
index 0000000..4fc7ee5
--- /dev/null
+++ b/examples/dialogs/extension/finddialog.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QDialogButtonBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+//! [0]
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+
+private:
+ QLabel *label;
+ QLineEdit *lineEdit;
+ QCheckBox *caseCheckBox;
+ QCheckBox *fromStartCheckBox;
+ QCheckBox *wholeWordsCheckBox;
+ QCheckBox *searchSelectionCheckBox;
+ QCheckBox *backwardCheckBox;
+ QDialogButtonBox *buttonBox;
+ QPushButton *findButton;
+ QPushButton *moreButton;
+ QWidget *extension;
+};
+//! [0]
+
+#endif
diff --git a/examples/dialogs/extension/main.cpp b/examples/dialogs/extension/main.cpp
new file mode 100644
index 0000000..fa70a55
--- /dev/null
+++ b/examples/dialogs/extension/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "finddialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ FindDialog dialog;
+ return dialog.exec();
+}
diff --git a/examples/dialogs/findfiles/findfiles.pro b/examples/dialogs/findfiles/findfiles.pro
new file mode 100644
index 0000000..99be394
--- /dev/null
+++ b/examples/dialogs/findfiles/findfiles.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/findfiles
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/findfiles
+INSTALLS += target sources
diff --git a/examples/dialogs/findfiles/main.cpp b/examples/dialogs/findfiles/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/dialogs/findfiles/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp
new file mode 100644
index 0000000..7620a68
--- /dev/null
+++ b/examples/dialogs/findfiles/window.cpp
@@ -0,0 +1,250 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window(QWidget *parent)
+ : QDialog(parent)
+{
+ browseButton = createButton(tr("&Browse..."), SLOT(browse()));
+ findButton = createButton(tr("&Find"), SLOT(find()));
+
+ fileComboBox = createComboBox(tr("*"));
+ textComboBox = createComboBox();
+ directoryComboBox = createComboBox(QDir::currentPath());
+
+ fileLabel = new QLabel(tr("Named:"));
+ textLabel = new QLabel(tr("Containing text:"));
+ directoryLabel = new QLabel(tr("In directory:"));
+ filesFoundLabel = new QLabel;
+
+ createFilesTable();
+//! [0]
+
+//! [1]
+ QHBoxLayout *buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch();
+ buttonsLayout->addWidget(findButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(fileLabel, 0, 0);
+ mainLayout->addWidget(fileComboBox, 0, 1, 1, 2);
+ mainLayout->addWidget(textLabel, 1, 0);
+ mainLayout->addWidget(textComboBox, 1, 1, 1, 2);
+ mainLayout->addWidget(directoryLabel, 2, 0);
+ mainLayout->addWidget(directoryComboBox, 2, 1);
+ mainLayout->addWidget(browseButton, 2, 2);
+ mainLayout->addWidget(filesTable, 3, 0, 1, 3);
+ mainLayout->addWidget(filesFoundLabel, 4, 0);
+ mainLayout->addLayout(buttonsLayout, 5, 0, 1, 3);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Find Files"));
+ resize(700, 300);
+}
+//! [1]
+
+//! [2]
+void Window::browse()
+{
+ QString directory = QFileDialog::getExistingDirectory(this,
+ tr("Find Files"), QDir::currentPath());
+
+ if (!directory.isEmpty()) {
+ if (directoryComboBox->findText(directory) == -1)
+ directoryComboBox->addItem(directory);
+ directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory));
+ }
+}
+//! [2]
+
+static void updateComboBox(QComboBox *comboBox)
+{
+ if (comboBox->findText(comboBox->currentText()) == -1)
+ comboBox->addItem(comboBox->currentText());
+}
+
+//! [3]
+void Window::find()
+{
+ filesTable->setRowCount(0);
+
+ QString fileName = fileComboBox->currentText();
+ QString text = textComboBox->currentText();
+ QString path = directoryComboBox->currentText();
+//! [3]
+
+ updateComboBox(fileComboBox);
+ updateComboBox(textComboBox);
+ updateComboBox(directoryComboBox);
+
+//! [4]
+ currentDir = QDir(path);
+ QStringList files;
+ if (fileName.isEmpty())
+ fileName = "*";
+ files = currentDir.entryList(QStringList(fileName),
+ QDir::Files | QDir::NoSymLinks);
+
+ if (!text.isEmpty())
+ files = findFiles(files, text);
+ showFiles(files);
+}
+//! [4]
+
+//! [5]
+QStringList Window::findFiles(const QStringList &files, const QString &text)
+{
+ QProgressDialog progressDialog(this);
+ progressDialog.setCancelButtonText(tr("&Cancel"));
+ progressDialog.setRange(0, files.size());
+ progressDialog.setWindowTitle(tr("Find Files"));
+
+//! [5] //! [6]
+ QStringList foundFiles;
+
+ for (int i = 0; i < files.size(); ++i) {
+ progressDialog.setValue(i);
+ progressDialog.setLabelText(tr("Searching file number %1 of %2...")
+ .arg(i).arg(files.size()));
+ qApp->processEvents();
+//! [6]
+
+ if (progressDialog.wasCanceled())
+ break;
+
+//! [7]
+ QFile file(currentDir.absoluteFilePath(files[i]));
+
+ if (file.open(QIODevice::ReadOnly)) {
+ QString line;
+ QTextStream in(&file);
+ while (!in.atEnd()) {
+ if (progressDialog.wasCanceled())
+ break;
+ line = in.readLine();
+ if (line.contains(text)) {
+ foundFiles << files[i];
+ break;
+ }
+ }
+ }
+ }
+ return foundFiles;
+}
+//! [7]
+
+//! [8]
+void Window::showFiles(const QStringList &files)
+{
+ for (int i = 0; i < files.size(); ++i) {
+ QFile file(currentDir.absoluteFilePath(files[i]));
+ qint64 size = QFileInfo(file).size();
+
+ QTableWidgetItem *fileNameItem = new QTableWidgetItem(files[i]);
+ fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable);
+ QTableWidgetItem *sizeItem = new QTableWidgetItem(tr("%1 KB")
+ .arg(int((size + 1023) / 1024)));
+ sizeItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
+ sizeItem->setFlags(sizeItem->flags() ^ Qt::ItemIsEditable);
+
+ int row = filesTable->rowCount();
+ filesTable->insertRow(row);
+ filesTable->setItem(row, 0, fileNameItem);
+ filesTable->setItem(row, 1, sizeItem);
+ }
+ filesFoundLabel->setText(tr("%1 file(s) found").arg(files.size()) +
+ (" (Double click on a file to open it)"));
+}
+//! [8]
+
+//! [9]
+QPushButton *Window::createButton(const QString &text, const char *member)
+{
+ QPushButton *button = new QPushButton(text);
+ connect(button, SIGNAL(clicked()), this, member);
+ return button;
+}
+//! [9]
+
+//! [10]
+QComboBox *Window::createComboBox(const QString &text)
+{
+ QComboBox *comboBox = new QComboBox;
+ comboBox->setEditable(true);
+ comboBox->addItem(text);
+ comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ return comboBox;
+}
+//! [10]
+
+//! [11]
+void Window::createFilesTable()
+{
+ filesTable = new QTableWidget(0, 2);
+ filesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+
+ QStringList labels;
+ labels << tr("File Name") << tr("Size");
+ filesTable->setHorizontalHeaderLabels(labels);
+ filesTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+ filesTable->verticalHeader()->hide();
+ filesTable->setShowGrid(false);
+
+ connect(filesTable, SIGNAL(cellActivated(int, int)),
+ this, SLOT(openFileOfItem(int, int)));
+}
+//! [11]
+
+//! [12]
+
+void Window::openFileOfItem(int row, int /* column */)
+{
+ QTableWidgetItem *item = filesTable->item(row, 0);
+
+ QDesktopServices::openUrl(currentDir.absoluteFilePath(item->text()));
+}
+
+//! [12]
+
diff --git a/examples/dialogs/findfiles/window.h b/examples/dialogs/findfiles/window.h
new file mode 100644
index 0000000..8cd4813
--- /dev/null
+++ b/examples/dialogs/findfiles/window.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QDialog>
+#include <QDir>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QLabel;
+class QPushButton;
+class QTableWidget;
+class QTableWidgetItem;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+private slots:
+ void browse();
+ void find();
+ void openFileOfItem(int row, int column);
+
+private:
+ QStringList findFiles(const QStringList &files, const QString &text);
+ void showFiles(const QStringList &files);
+ QPushButton *createButton(const QString &text, const char *member);
+ QComboBox *createComboBox(const QString &text = QString());
+ void createFilesTable();
+
+ QComboBox *fileComboBox;
+ QComboBox *textComboBox;
+ QComboBox *directoryComboBox;
+ QLabel *fileLabel;
+ QLabel *textLabel;
+ QLabel *directoryLabel;
+ QLabel *filesFoundLabel;
+ QPushButton *browseButton;
+ QPushButton *findButton;
+ QTableWidget *filesTable;
+
+ QDir currentDir;
+};
+//! [0]
+
+#endif
diff --git a/examples/dialogs/licensewizard/images/logo.png b/examples/dialogs/licensewizard/images/logo.png
new file mode 100644
index 0000000..56f17a3
--- /dev/null
+++ b/examples/dialogs/licensewizard/images/logo.png
Binary files differ
diff --git a/examples/dialogs/licensewizard/images/watermark.png b/examples/dialogs/licensewizard/images/watermark.png
new file mode 100644
index 0000000..124a050
--- /dev/null
+++ b/examples/dialogs/licensewizard/images/watermark.png
Binary files differ
diff --git a/examples/dialogs/licensewizard/licensewizard.cpp b/examples/dialogs/licensewizard/licensewizard.cpp
new file mode 100644
index 0000000..30b4165
--- /dev/null
+++ b/examples/dialogs/licensewizard/licensewizard.cpp
@@ -0,0 +1,360 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "licensewizard.h"
+
+//! [0] //! [1] //! [2]
+LicenseWizard::LicenseWizard(QWidget *parent)
+ : QWizard(parent)
+{
+//! [0]
+ setPage(Page_Intro, new IntroPage);
+ setPage(Page_Evaluate, new EvaluatePage);
+ setPage(Page_Register, new RegisterPage);
+ setPage(Page_Details, new DetailsPage);
+ setPage(Page_Conclusion, new ConclusionPage);
+//! [1]
+
+ setStartId(Page_Intro);
+//! [2]
+
+//! [3]
+#ifndef Q_WS_MAC
+//! [3] //! [4]
+ setWizardStyle(ModernStyle);
+#endif
+//! [4] //! [5]
+ setOption(HaveHelpButton, true);
+//! [5] //! [6]
+ setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo.png"));
+
+//! [7]
+ connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
+//! [7]
+
+ setWindowTitle(tr("License Wizard"));
+//! [8]
+}
+//! [6] //! [8]
+
+//! [9] //! [10]
+void LicenseWizard::showHelp()
+//! [9] //! [11]
+{
+ static QString lastHelpMessage;
+
+ QString message;
+
+ switch (currentId()) {
+ case Page_Intro:
+ message = tr("The decision you make here will affect which page you "
+ "get to see next.");
+ break;
+//! [10] //! [11]
+ case Page_Evaluate:
+ message = tr("Make sure to provide a valid email address, such as "
+ "toni.buddenbrook@example.de.");
+ break;
+ case Page_Register:
+ message = tr("If you don't provide an upgrade key, you will be "
+ "asked to fill in your details.");
+ break;
+ case Page_Details:
+ message = tr("Make sure to provide a valid email address, such as "
+ "thomas.gradgrind@example.co.uk.");
+ break;
+ case Page_Conclusion:
+ message = tr("You must accept the terms and conditions of the "
+ "license to proceed.");
+ break;
+//! [12] //! [13]
+ default:
+ message = tr("This help is likely not to be of any help.");
+ }
+//! [12]
+
+ if (lastHelpMessage == message)
+ message = tr("Sorry, I already gave what help I could. "
+ "Maybe you should try asking a human?");
+
+//! [14]
+ QMessageBox::information(this, tr("License Wizard Help"), message);
+//! [14]
+
+ lastHelpMessage = message;
+//! [15]
+}
+//! [13] //! [15]
+
+//! [16]
+IntroPage::IntroPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Introduction"));
+ setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));
+
+ topLabel = new QLabel(tr("This wizard will help you register your copy of "
+ "<i>Super Product One</i>&trade; or start "
+ "evaluating the product."));
+ topLabel->setWordWrap(true);
+
+ registerRadioButton = new QRadioButton(tr("&Register your copy"));
+ evaluateRadioButton = new QRadioButton(tr("&Evaluate the product for 30 "
+ "days"));
+ registerRadioButton->setChecked(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(topLabel);
+ layout->addWidget(registerRadioButton);
+ layout->addWidget(evaluateRadioButton);
+ setLayout(layout);
+}
+//! [16] //! [17]
+
+//! [18]
+int IntroPage::nextId() const
+//! [17] //! [19]
+{
+ if (evaluateRadioButton->isChecked()) {
+ return LicenseWizard::Page_Evaluate;
+ } else {
+ return LicenseWizard::Page_Register;
+ }
+}
+//! [18] //! [19]
+
+//! [20]
+EvaluatePage::EvaluatePage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Evaluate <i>Super Product One</i>&trade;"));
+ setSubTitle(tr("Please fill both fields. Make sure to provide a valid "
+ "email address (e.g., john.smith@example.com)."));
+
+ nameLabel = new QLabel(tr("N&ame:"));
+ nameLineEdit = new QLineEdit;
+//! [20]
+ nameLabel->setBuddy(nameLineEdit);
+
+ emailLabel = new QLabel(tr("&Email address:"));
+ emailLineEdit = new QLineEdit;
+ emailLineEdit->setValidator(new QRegExpValidator(QRegExp(".*@.*"), this));
+ emailLabel->setBuddy(emailLineEdit);
+
+//! [21]
+ registerField("evaluate.name*", nameLineEdit);
+ registerField("evaluate.email*", emailLineEdit);
+//! [21]
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(nameLabel, 0, 0);
+ layout->addWidget(nameLineEdit, 0, 1);
+ layout->addWidget(emailLabel, 1, 0);
+ layout->addWidget(emailLineEdit, 1, 1);
+ setLayout(layout);
+//! [22]
+}
+//! [22]
+
+//! [23]
+int EvaluatePage::nextId() const
+{
+ return LicenseWizard::Page_Conclusion;
+}
+//! [23]
+
+RegisterPage::RegisterPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Register Your Copy of <i>Super Product One</i>&trade;"));
+ setSubTitle(tr("If you have an upgrade key, please fill in "
+ "the appropriate field."));
+
+ nameLabel = new QLabel(tr("N&ame:"));
+ nameLineEdit = new QLineEdit;
+ nameLabel->setBuddy(nameLineEdit);
+
+ upgradeKeyLabel = new QLabel(tr("&Upgrade key:"));
+ upgradeKeyLineEdit = new QLineEdit;
+ upgradeKeyLabel->setBuddy(upgradeKeyLineEdit);
+
+ registerField("register.name*", nameLineEdit);
+ registerField("register.upgradeKey", upgradeKeyLineEdit);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(nameLabel, 0, 0);
+ layout->addWidget(nameLineEdit, 0, 1);
+ layout->addWidget(upgradeKeyLabel, 1, 0);
+ layout->addWidget(upgradeKeyLineEdit, 1, 1);
+ setLayout(layout);
+}
+
+//! [24]
+int RegisterPage::nextId() const
+{
+ if (upgradeKeyLineEdit->text().isEmpty()) {
+ return LicenseWizard::Page_Details;
+ } else {
+ return LicenseWizard::Page_Conclusion;
+ }
+}
+//! [24]
+
+DetailsPage::DetailsPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Fill In Your Details"));
+ setSubTitle(tr("Please fill all three fields. Make sure to provide a valid "
+ "email address (e.g., tanaka.aya@example.co.jp)."));
+
+ companyLabel = new QLabel(tr("&Company name:"));
+ companyLineEdit = new QLineEdit;
+ companyLabel->setBuddy(companyLineEdit);
+
+ emailLabel = new QLabel(tr("&Email address:"));
+ emailLineEdit = new QLineEdit;
+ emailLineEdit->setValidator(new QRegExpValidator(QRegExp(".*@.*"), this));
+ emailLabel->setBuddy(emailLineEdit);
+
+ postalLabel = new QLabel(tr("&Postal address:"));
+ postalLineEdit = new QLineEdit;
+ postalLabel->setBuddy(postalLineEdit);
+
+ registerField("details.company*", companyLineEdit);
+ registerField("details.email*", emailLineEdit);
+ registerField("details.postal*", postalLineEdit);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(companyLabel, 0, 0);
+ layout->addWidget(companyLineEdit, 0, 1);
+ layout->addWidget(emailLabel, 1, 0);
+ layout->addWidget(emailLineEdit, 1, 1);
+ layout->addWidget(postalLabel, 2, 0);
+ layout->addWidget(postalLineEdit, 2, 1);
+ setLayout(layout);
+}
+
+//! [25]
+int DetailsPage::nextId() const
+{
+ return LicenseWizard::Page_Conclusion;
+}
+//! [25]
+
+ConclusionPage::ConclusionPage(QWidget *parent)
+ : QWizardPage(parent)
+{
+ setTitle(tr("Complete Your Registration"));
+ setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));
+
+ bottomLabel = new QLabel;
+ bottomLabel->setWordWrap(true);
+
+ agreeCheckBox = new QCheckBox(tr("I agree to the terms of the license"));
+
+ registerField("conclusion.agree*", agreeCheckBox);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(bottomLabel);
+ layout->addWidget(agreeCheckBox);
+ setLayout(layout);
+}
+
+//! [26]
+int ConclusionPage::nextId() const
+{
+ return -1;
+}
+//! [26]
+
+//! [27]
+void ConclusionPage::initializePage()
+{
+ QString licenseText;
+
+ if (wizard()->hasVisitedPage(LicenseWizard::Page_Evaluate)) {
+ licenseText = tr("<u>Evaluation License Agreement:</u> "
+ "You can use this software for 30 days and make one "
+ "backup, but you are not allowed to distribute it.");
+ } else if (wizard()->hasVisitedPage(LicenseWizard::Page_Details)) {
+ licenseText = tr("<u>First-Time License Agreement:</u> "
+ "You can use this software subject to the license "
+ "you will receive by email.");
+ } else {
+ licenseText = tr("<u>Upgrade License Agreement:</u> "
+ "This software is licensed under the terms of your "
+ "current license.");
+ }
+ bottomLabel->setText(licenseText);
+}
+//! [27]
+
+//! [28]
+void ConclusionPage::setVisible(bool visible)
+{
+ QWizardPage::setVisible(visible);
+
+ if (visible) {
+//! [29]
+ wizard()->setButtonText(QWizard::CustomButton1, tr("&Print"));
+ wizard()->setOption(QWizard::HaveCustomButton1, true);
+ connect(wizard(), SIGNAL(customButtonClicked(int)),
+ this, SLOT(printButtonClicked()));
+//! [29]
+ } else {
+ wizard()->setOption(QWizard::HaveCustomButton1, false);
+ disconnect(wizard(), SIGNAL(customButtonClicked(int)),
+ this, SLOT(printButtonClicked()));
+ }
+}
+//! [28]
+
+void ConclusionPage::printButtonClicked()
+{
+ QPrinter printer;
+ QPrintDialog dialog(&printer, this);
+ if (dialog.exec())
+ QMessageBox::warning(this, tr("Print License"),
+ tr("As an environmentally friendly measure, the "
+ "license text will not actually be printed."));
+}
diff --git a/examples/dialogs/licensewizard/licensewizard.h b/examples/dialogs/licensewizard/licensewizard.h
new file mode 100644
index 0000000..bcf22a2
--- /dev/null
+++ b/examples/dialogs/licensewizard/licensewizard.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LICENSEWIZARD_H
+#define LICENSEWIZARD_H
+
+#include <QWizard>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QLabel;
+class QLineEdit;
+class QRadioButton;
+QT_END_NAMESPACE
+
+//! [0] //! [1]
+class LicenseWizard : public QWizard
+{
+//! [0]
+ Q_OBJECT
+
+public:
+//! [2]
+ enum { Page_Intro, Page_Evaluate, Page_Register, Page_Details,
+ Page_Conclusion };
+//! [2]
+
+ LicenseWizard(QWidget *parent = 0);
+
+private slots:
+ void showHelp();
+//! [3]
+};
+//! [1] //! [3]
+
+//! [4]
+class IntroPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ IntroPage(QWidget *parent = 0);
+
+ int nextId() const;
+
+private:
+ QLabel *topLabel;
+ QRadioButton *registerRadioButton;
+ QRadioButton *evaluateRadioButton;
+};
+//! [4]
+
+//! [5]
+class EvaluatePage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ EvaluatePage(QWidget *parent = 0);
+
+ int nextId() const;
+
+private:
+ QLabel *nameLabel;
+ QLabel *emailLabel;
+ QLineEdit *nameLineEdit;
+ QLineEdit *emailLineEdit;
+};
+//! [5]
+
+class RegisterPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ RegisterPage(QWidget *parent = 0);
+
+ int nextId() const;
+
+private:
+ QLabel *nameLabel;
+ QLabel *upgradeKeyLabel;
+ QLineEdit *nameLineEdit;
+ QLineEdit *upgradeKeyLineEdit;
+};
+
+class DetailsPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ DetailsPage(QWidget *parent = 0);
+
+ int nextId() const;
+
+private:
+ QLabel *companyLabel;
+ QLabel *emailLabel;
+ QLabel *postalLabel;
+ QLineEdit *companyLineEdit;
+ QLineEdit *emailLineEdit;
+ QLineEdit *postalLineEdit;
+};
+
+//! [6]
+class ConclusionPage : public QWizardPage
+{
+ Q_OBJECT
+
+public:
+ ConclusionPage(QWidget *parent = 0);
+
+ void initializePage();
+ int nextId() const;
+ void setVisible(bool visible);
+
+private slots:
+ void printButtonClicked();
+
+private:
+ QLabel *bottomLabel;
+ QCheckBox *agreeCheckBox;
+};
+//! [6]
+
+#endif
diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro
new file mode 100644
index 0000000..fd5e37c
--- /dev/null
+++ b/examples/dialogs/licensewizard/licensewizard.pro
@@ -0,0 +1,10 @@
+HEADERS = licensewizard.h
+SOURCES = licensewizard.cpp \
+ main.cpp
+RESOURCES = licensewizard.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/licensewizard
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/licensewizard
+INSTALLS += target sources
diff --git a/examples/dialogs/licensewizard/licensewizard.qrc b/examples/dialogs/licensewizard/licensewizard.qrc
new file mode 100644
index 0000000..b069938
--- /dev/null
+++ b/examples/dialogs/licensewizard/licensewizard.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/logo.png</file>
+ <file>images/watermark.png</file>
+</qresource>
+</RCC>
diff --git a/examples/dialogs/licensewizard/main.cpp b/examples/dialogs/licensewizard/main.cpp
new file mode 100644
index 0000000..9d10032
--- /dev/null
+++ b/examples/dialogs/licensewizard/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTranslator>
+#include <QLocale>
+#include <QLibraryInfo>
+
+#include "licensewizard.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(licensewizard);
+
+ QApplication app(argc, argv);
+
+ QString translatorFileName = QLatin1String("qt_");
+ translatorFileName += QLocale::system().name();
+ QTranslator *translator = new QTranslator(&app);
+ if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ app.installTranslator(translator);
+
+ LicenseWizard wizard;
+ wizard.show();
+ return app.exec();
+}
diff --git a/examples/dialogs/sipdialog/dialog.cpp b/examples/dialogs/sipdialog/dialog.cpp
new file mode 100644
index 0000000..9f1b9ad
--- /dev/null
+++ b/examples/dialogs/sipdialog/dialog.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+
+//! [Dialog constructor part1]
+Dialog::Dialog()
+{
+ desktopGeometry = QApplication::desktop()->availableGeometry(0);
+
+ setWindowTitle(tr("SIP Dialog Example"));
+ QScrollArea *scrollArea = new QScrollArea(this);
+ QGroupBox *groupBox = new QGroupBox(scrollArea);
+ groupBox->setTitle(tr("SIP Dialog Example"));
+ QGridLayout *gridLayout = new QGridLayout(groupBox);
+ groupBox->setLayout(gridLayout);
+//! [Dialog constructor part1]
+
+//! [Dialog constructor part2]
+ QLineEdit* lineEdit = new QLineEdit(groupBox);
+ lineEdit->setText(tr("Open and close the SIP"));
+ lineEdit->setMinimumWidth(220);
+
+ QLabel* label = new QLabel(groupBox);
+ label->setText(tr("This dialog resizes if the SIP is opened"));
+ label->setMinimumWidth(220);
+
+ QPushButton* button = new QPushButton(groupBox);
+ button->setText(tr("Close Dialog"));
+ button->setMinimumWidth(220);
+//! [Dialog constructor part2]
+
+//! [Dialog constructor part3]
+ if (desktopGeometry.height() < 400)
+ gridLayout->setVerticalSpacing(80);
+ else
+ gridLayout->setVerticalSpacing(150);
+
+ gridLayout->addWidget(label);
+ gridLayout->addWidget(lineEdit);
+ gridLayout->addWidget(button);
+//! [Dialog constructor part3]
+
+//! [Dialog constructor part4]
+ scrollArea->setWidget(groupBox);
+ QHBoxLayout* layout = new QHBoxLayout();
+ layout->addWidget(scrollArea);
+ setLayout(layout);
+ scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+//! [Dialog constructor part4]
+
+//! [Dialog constructor part5]
+ connect(button, SIGNAL(pressed()),
+ qApp, SLOT(closeAllWindows()));
+ connect(QApplication::desktop(), SIGNAL(workAreaResized(int)),
+ this, SLOT(desktopResized(int)));
+}
+//! [Dialog constructor part5]
+
+//! [desktopResized() function]
+void Dialog::desktopResized(int screen)
+{
+ if (screen != 0)
+ return;
+ reactToSIP();
+}
+//! [desktopResized() function]
+
+//! [reactToSIP() function]
+void Dialog::reactToSIP()
+{
+ QRect availableGeometry = QApplication::desktop()->availableGeometry(0);
+
+ if (desktopGeometry.width() == availableGeometry.width()) {
+ if (desktopGeometry.height() > availableGeometry.height()) {
+ setWindowState(windowState() & ~Qt::WindowMaximized);
+ setGeometry(availableGeometry);
+ } else {
+ setWindowState(windowState() | Qt::WindowMaximized);
+ }
+ }
+ desktopGeometry = availableGeometry;
+}
+//! [reactToSIP() function]
diff --git a/examples/dialogs/sipdialog/dialog.h b/examples/dialogs/sipdialog/dialog.h
new file mode 100644
index 0000000..ffcc926
--- /dev/null
+++ b/examples/dialogs/sipdialog/dialog.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+
+//! [Dialog header]
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog();
+ void reactToSIP();
+
+private:
+ QRect desktopGeometry;
+
+public slots:
+ void desktopResized(int screen);
+};
+//! [Dialog header]
+
+#endif
diff --git a/examples/dialogs/sipdialog/main.cpp b/examples/dialogs/sipdialog/main.cpp
new file mode 100644
index 0000000..5fcbfd8
--- /dev/null
+++ b/examples/dialogs/sipdialog/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+
+//! [main() function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Dialog dialog;
+ dialog.exec();
+}
+//! [main() function]
diff --git a/examples/dialogs/sipdialog/sipdialog.pro b/examples/dialogs/sipdialog/sipdialog.pro
new file mode 100644
index 0000000..69667eb
--- /dev/null
+++ b/examples/dialogs/sipdialog/sipdialog.pro
@@ -0,0 +1,12 @@
+HEADERS = dialog.h
+SOURCES = main.cpp \
+ dialog.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/sipdialog
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/sipdialog
+INSTALLS += target sources
+wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+
+
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp
new file mode 100644
index 0000000..0fe1f7e
--- /dev/null
+++ b/examples/dialogs/standarddialogs/dialog.cpp
@@ -0,0 +1,390 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+
+#define MESSAGE \
+ Dialog::tr("<p>Message boxes have a caption, a text, " \
+ "and any number of buttons, each with standard or custom texts." \
+ "<p>Click a button to close the message box. Pressing the Esc button " \
+ "will activate the detected escape button (if any).")
+
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent)
+{
+ errorMessageDialog = new QErrorMessage(this);
+
+ int frameStyle = QFrame::Sunken | QFrame::Panel;
+
+ integerLabel = new QLabel;
+ integerLabel->setFrameStyle(frameStyle);
+ QPushButton *integerButton =
+ new QPushButton(tr("QInputDialog::get&Integer()"));
+
+ doubleLabel = new QLabel;
+ doubleLabel->setFrameStyle(frameStyle);
+ QPushButton *doubleButton =
+ new QPushButton(tr("QInputDialog::get&Double()"));
+
+ itemLabel = new QLabel;
+ itemLabel->setFrameStyle(frameStyle);
+ QPushButton *itemButton = new QPushButton(tr("QInputDialog::getIte&m()"));
+
+ textLabel = new QLabel;
+ textLabel->setFrameStyle(frameStyle);
+ QPushButton *textButton = new QPushButton(tr("QInputDialog::get&Text()"));
+
+ colorLabel = new QLabel;
+ colorLabel->setFrameStyle(frameStyle);
+ QPushButton *colorButton = new QPushButton(tr("QColorDialog::get&Color()"));
+
+ fontLabel = new QLabel;
+ fontLabel->setFrameStyle(frameStyle);
+ QPushButton *fontButton = new QPushButton(tr("QFontDialog::get&Font()"));
+
+ directoryLabel = new QLabel;
+ directoryLabel->setFrameStyle(frameStyle);
+ QPushButton *directoryButton =
+ new QPushButton(tr("QFileDialog::getE&xistingDirectory()"));
+
+ openFileNameLabel = new QLabel;
+ openFileNameLabel->setFrameStyle(frameStyle);
+ QPushButton *openFileNameButton =
+ new QPushButton(tr("QFileDialog::get&OpenFileName()"));
+
+ openFileNamesLabel = new QLabel;
+ openFileNamesLabel->setFrameStyle(frameStyle);
+ QPushButton *openFileNamesButton =
+ new QPushButton(tr("QFileDialog::&getOpenFileNames()"));
+
+ saveFileNameLabel = new QLabel;
+ saveFileNameLabel->setFrameStyle(frameStyle);
+ QPushButton *saveFileNameButton =
+ new QPushButton(tr("QFileDialog::get&SaveFileName()"));
+
+ criticalLabel = new QLabel;
+ criticalLabel->setFrameStyle(frameStyle);
+ QPushButton *criticalButton =
+ new QPushButton(tr("QMessageBox::critica&l()"));
+
+ informationLabel = new QLabel;
+ informationLabel->setFrameStyle(frameStyle);
+ QPushButton *informationButton =
+ new QPushButton(tr("QMessageBox::i&nformation()"));
+
+ questionLabel = new QLabel;
+ questionLabel->setFrameStyle(frameStyle);
+ QPushButton *questionButton =
+ new QPushButton(tr("QMessageBox::&question()"));
+
+ warningLabel = new QLabel;
+ warningLabel->setFrameStyle(frameStyle);
+ QPushButton *warningButton = new QPushButton(tr("QMessageBox::&warning()"));
+
+ errorLabel = new QLabel;
+ errorLabel->setFrameStyle(frameStyle);
+ QPushButton *errorButton =
+ new QPushButton(tr("QErrorMessage::show&M&essage()"));
+
+ connect(integerButton, SIGNAL(clicked()), this, SLOT(setInteger()));
+ connect(doubleButton, SIGNAL(clicked()), this, SLOT(setDouble()));
+ connect(itemButton, SIGNAL(clicked()), this, SLOT(setItem()));
+ connect(textButton, SIGNAL(clicked()), this, SLOT(setText()));
+ connect(colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
+ connect(fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
+ connect(directoryButton, SIGNAL(clicked()),
+ this, SLOT(setExistingDirectory()));
+ connect(openFileNameButton, SIGNAL(clicked()),
+ this, SLOT(setOpenFileName()));
+ connect(openFileNamesButton, SIGNAL(clicked()),
+ this, SLOT(setOpenFileNames()));
+ connect(saveFileNameButton, SIGNAL(clicked()),
+ this, SLOT(setSaveFileName()));
+ connect(criticalButton, SIGNAL(clicked()), this, SLOT(criticalMessage()));
+ connect(informationButton, SIGNAL(clicked()),
+ this, SLOT(informationMessage()));
+ connect(questionButton, SIGNAL(clicked()), this, SLOT(questionMessage()));
+ connect(warningButton, SIGNAL(clicked()), this, SLOT(warningMessage()));
+ connect(errorButton, SIGNAL(clicked()), this, SLOT(errorMessage()));
+
+ native = new QCheckBox(this);
+ native->setText("Use native file dialog.");
+ native->setChecked(true);
+#ifndef Q_WS_WIN
+#ifndef Q_OS_MAC
+ native->hide();
+#endif
+#endif
+ QGridLayout *layout = new QGridLayout;
+ layout->setColumnStretch(1, 1);
+ layout->setColumnMinimumWidth(1, 250);
+ layout->addWidget(integerButton, 0, 0);
+ layout->addWidget(integerLabel, 0, 1);
+ layout->addWidget(doubleButton, 1, 0);
+ layout->addWidget(doubleLabel, 1, 1);
+ layout->addWidget(itemButton, 2, 0);
+ layout->addWidget(itemLabel, 2, 1);
+ layout->addWidget(textButton, 3, 0);
+ layout->addWidget(textLabel, 3, 1);
+ layout->addWidget(colorButton, 4, 0);
+ layout->addWidget(colorLabel, 4, 1);
+ layout->addWidget(fontButton, 5, 0);
+ layout->addWidget(fontLabel, 5, 1);
+ layout->addWidget(directoryButton, 6, 0);
+ layout->addWidget(directoryLabel, 6, 1);
+ layout->addWidget(openFileNameButton, 7, 0);
+ layout->addWidget(openFileNameLabel, 7, 1);
+ layout->addWidget(openFileNamesButton, 8, 0);
+ layout->addWidget(openFileNamesLabel, 8, 1);
+ layout->addWidget(saveFileNameButton, 9, 0);
+ layout->addWidget(saveFileNameLabel, 9, 1);
+ layout->addWidget(criticalButton, 10, 0);
+ layout->addWidget(criticalLabel, 10, 1);
+ layout->addWidget(informationButton, 11, 0);
+ layout->addWidget(informationLabel, 11, 1);
+ layout->addWidget(questionButton, 12, 0);
+ layout->addWidget(questionLabel, 12, 1);
+ layout->addWidget(warningButton, 13, 0);
+ layout->addWidget(warningLabel, 13, 1);
+ layout->addWidget(errorButton, 14, 0);
+ layout->addWidget(errorLabel, 14, 1);
+ layout->addWidget(native, 15, 0);
+ setLayout(layout);
+
+ setWindowTitle(tr("Standard Dialogs"));
+}
+
+void Dialog::setInteger()
+{
+//! [0]
+ bool ok;
+ int i = QInputDialog::getInteger(this, tr("QInputDialog::getInteger()"),
+ tr("Percentage:"), 25, 0, 100, 1, &ok);
+ if (ok)
+ integerLabel->setText(tr("%1%").arg(i));
+//! [0]
+}
+
+void Dialog::setDouble()
+{
+//! [1]
+ bool ok;
+ double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"),
+ tr("Amount:"), 37.56, -10000, 10000, 2, &ok);
+ if (ok)
+ doubleLabel->setText(QString("$%1").arg(d));
+//! [1]
+}
+
+void Dialog::setItem()
+{
+//! [2]
+ QStringList items;
+ items << tr("Spring") << tr("Summer") << tr("Fall") << tr("Winter");
+
+ bool ok;
+ QString item = QInputDialog::getItem(this, tr("QInputDialog::getItem()"),
+ tr("Season:"), items, 0, false, &ok);
+ if (ok && !item.isEmpty())
+ itemLabel->setText(item);
+//! [2]
+}
+
+void Dialog::setText()
+{
+//! [3]
+ bool ok;
+ QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"),
+ tr("User name:"), QLineEdit::Normal,
+ QDir::home().dirName(), &ok);
+ if (ok && !text.isEmpty())
+ textLabel->setText(text);
+//! [3]
+}
+
+void Dialog::setColor()
+{
+ QColor color = QColorDialog::getColor(Qt::green, this);
+ if (color.isValid()) {
+ colorLabel->setText(color.name());
+ colorLabel->setPalette(QPalette(color));
+ colorLabel->setAutoFillBackground(true);
+ }
+}
+
+void Dialog::setFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, QFont(fontLabel->text()), this);
+ if (ok) {
+ fontLabel->setText(font.key());
+ fontLabel->setFont(font);
+ }
+}
+
+void Dialog::setExistingDirectory()
+{
+ QFileDialog::Options options = QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly;
+ if (!native->isChecked())
+ options |= QFileDialog::DontUseNativeDialog;
+ QString directory = QFileDialog::getExistingDirectory(this,
+ tr("QFileDialog::getExistingDirectory()"),
+ directoryLabel->text(),
+ options);
+ if (!directory.isEmpty())
+ directoryLabel->setText(directory);
+}
+
+void Dialog::setOpenFileName()
+{
+ QFileDialog::Options options;
+ if (!native->isChecked())
+ options |= QFileDialog::DontUseNativeDialog;
+ QString selectedFilter;
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("QFileDialog::getOpenFileName()"),
+ openFileNameLabel->text(),
+ tr("All Files (*);;Text Files (*.txt)"),
+ &selectedFilter,
+ options);
+ if (!fileName.isEmpty())
+ openFileNameLabel->setText(fileName);
+}
+
+void Dialog::setOpenFileNames()
+{
+ QFileDialog::Options options;
+ if (!native->isChecked())
+ options |= QFileDialog::DontUseNativeDialog;
+ QString selectedFilter;
+ QStringList files = QFileDialog::getOpenFileNames(
+ this, tr("QFileDialog::getOpenFileNames()"),
+ openFilesPath,
+ tr("All Files (*);;Text Files (*.txt)"),
+ &selectedFilter,
+ options);
+ if (files.count()) {
+ openFilesPath = files[0];
+ openFileNamesLabel->setText(QString("[%1]").arg(files.join(", ")));
+ }
+}
+
+void Dialog::setSaveFileName()
+{
+ QFileDialog::Options options;
+ if (!native->isChecked())
+ options |= QFileDialog::DontUseNativeDialog;
+ QString selectedFilter;
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("QFileDialog::getSaveFileName()"),
+ saveFileNameLabel->text(),
+ tr("All Files (*);;Text Files (*.txt)"),
+ &selectedFilter,
+ options);
+ if (!fileName.isEmpty())
+ saveFileNameLabel->setText(fileName);
+}
+
+void Dialog::criticalMessage()
+{
+ QMessageBox::StandardButton reply;
+ reply = QMessageBox::critical(this, tr("QMessageBox::critical()"),
+ MESSAGE,
+ QMessageBox::Abort | QMessageBox::Retry | QMessageBox::Ignore);
+ if (reply == QMessageBox::Abort)
+ criticalLabel->setText(tr("Abort"));
+ else if (reply == QMessageBox::Retry)
+ criticalLabel->setText(tr("Retry"));
+ else
+ criticalLabel->setText(tr("Ignore"));
+}
+
+void Dialog::informationMessage()
+{
+ QMessageBox::StandardButton reply;
+ reply = QMessageBox::information(this, tr("QMessageBox::information()"), MESSAGE);
+ if (reply == QMessageBox::Ok)
+ informationLabel->setText(tr("OK"));
+ else
+ informationLabel->setText(tr("Escape"));
+}
+
+void Dialog::questionMessage()
+{
+ QMessageBox::StandardButton reply;
+ reply = QMessageBox::question(this, tr("QMessageBox::question()"),
+ MESSAGE,
+ QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
+ if (reply == QMessageBox::Yes)
+ questionLabel->setText(tr("Yes"));
+ else if (reply == QMessageBox::No)
+ questionLabel->setText(tr("No"));
+ else
+ questionLabel->setText(tr("Cancel"));
+}
+
+void Dialog::warningMessage()
+{
+ QMessageBox msgBox(QMessageBox::Warning, tr("QMessageBox::warning()"),
+ MESSAGE, 0, this);
+ msgBox.addButton(tr("Save &Again"), QMessageBox::AcceptRole);
+ msgBox.addButton(tr("&Continue"), QMessageBox::RejectRole);
+ if (msgBox.exec() == QMessageBox::AcceptRole)
+ warningLabel->setText(tr("Save Again"));
+ else
+ warningLabel->setText(tr("Continue"));
+
+}
+
+void Dialog::errorMessage()
+{
+ errorMessageDialog->showMessage(
+ tr("This dialog shows and remembers error messages. "
+ "If the checkbox is checked (as it is by default), "
+ "the shown message will be shown again, "
+ "but if the user unchecks the box the message "
+ "will not appear again if QErrorMessage::showMessage() "
+ "is called with the same message."));
+ errorLabel->setText(tr("If the box is unchecked, the message "
+ "won't appear again."));
+}
diff --git a/examples/dialogs/standarddialogs/dialog.h b/examples/dialogs/standarddialogs/dialog.h
new file mode 100644
index 0000000..35f0b05
--- /dev/null
+++ b/examples/dialogs/standarddialogs/dialog.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QLabel;
+class QErrorMessage;
+QT_END_NAMESPACE
+
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QWidget *parent = 0);
+
+private slots:
+ void setInteger();
+ void setDouble();
+ void setItem();
+ void setText();
+ void setColor();
+ void setFont();
+ void setExistingDirectory();
+ void setOpenFileName();
+ void setOpenFileNames();
+ void setSaveFileName();
+ void criticalMessage();
+ void informationMessage();
+ void questionMessage();
+ void warningMessage();
+ void errorMessage();
+
+private:
+ QCheckBox *native;
+ QLabel *integerLabel;
+ QLabel *doubleLabel;
+ QLabel *itemLabel;
+ QLabel *textLabel;
+ QLabel *colorLabel;
+ QLabel *fontLabel;
+ QLabel *directoryLabel;
+ QLabel *openFileNameLabel;
+ QLabel *openFileNamesLabel;
+ QLabel *saveFileNameLabel;
+ QLabel *criticalLabel;
+ QLabel *informationLabel;
+ QLabel *questionLabel;
+ QLabel *warningLabel;
+ QLabel *errorLabel;
+ QErrorMessage *errorMessageDialog;
+
+ QString openFilesPath;
+};
+
+#endif
diff --git a/examples/dialogs/standarddialogs/main.cpp b/examples/dialogs/standarddialogs/main.cpp
new file mode 100644
index 0000000..3b7ed8b
--- /dev/null
+++ b/examples/dialogs/standarddialogs/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTranslator>
+#include <QLocale>
+#include <QLibraryInfo>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QString translatorFileName = QLatin1String("qt_");
+ translatorFileName += QLocale::system().name();
+ QTranslator *translator = new QTranslator(&app);
+ if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ app.installTranslator(translator);
+
+ Dialog dialog;
+ return dialog.exec();
+}
diff --git a/examples/dialogs/standarddialogs/standarddialogs.pro b/examples/dialogs/standarddialogs/standarddialogs.pro
new file mode 100644
index 0000000..6bfa6bf
--- /dev/null
+++ b/examples/dialogs/standarddialogs/standarddialogs.pro
@@ -0,0 +1,11 @@
+HEADERS = dialog.h
+SOURCES = dialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/standarddialogs
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/standarddialogs
+INSTALLS += target sources
+wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+
diff --git a/examples/dialogs/tabdialog/main.cpp b/examples/dialogs/tabdialog/main.cpp
new file mode 100644
index 0000000..04f3b33
--- /dev/null
+++ b/examples/dialogs/tabdialog/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "tabdialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QString fileName;
+
+ if (argc >= 2)
+ fileName = argv[1];
+ else
+ fileName = ".";
+
+ TabDialog tabdialog(fileName);
+ return tabdialog.exec();
+}
diff --git a/examples/dialogs/tabdialog/tabdialog.cpp b/examples/dialogs/tabdialog/tabdialog.cpp
new file mode 100644
index 0000000..189d085
--- /dev/null
+++ b/examples/dialogs/tabdialog/tabdialog.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tabdialog.h"
+
+//! [0]
+TabDialog::TabDialog(const QString &fileName, QWidget *parent)
+ : QDialog(parent)
+{
+ QFileInfo fileInfo(fileName);
+
+ tabWidget = new QTabWidget;
+ tabWidget->addTab(new GeneralTab(fileInfo), tr("General"));
+ tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions"));
+ tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications"));
+//! [0]
+
+//! [1] //! [2]
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+//! [1] //! [3]
+ | QDialogButtonBox::Cancel);
+
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+//! [2] //! [3]
+
+//! [4]
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+//! [4]
+
+//! [5]
+ setWindowTitle(tr("Tab Dialog"));
+}
+//! [5]
+
+//! [6]
+GeneralTab::GeneralTab(const QFileInfo &fileInfo, QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *fileNameLabel = new QLabel(tr("File Name:"));
+ QLineEdit *fileNameEdit = new QLineEdit(fileInfo.fileName());
+
+ QLabel *pathLabel = new QLabel(tr("Path:"));
+ QLabel *pathValueLabel = new QLabel(fileInfo.absoluteFilePath());
+ pathValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QLabel *sizeLabel = new QLabel(tr("Size:"));
+ qlonglong size = fileInfo.size()/1024;
+ QLabel *sizeValueLabel = new QLabel(tr("%1 K").arg(size));
+ sizeValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QLabel *lastReadLabel = new QLabel(tr("Last Read:"));
+ QLabel *lastReadValueLabel = new QLabel(fileInfo.lastRead().toString());
+ lastReadValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QLabel *lastModLabel = new QLabel(tr("Last Modified:"));
+ QLabel *lastModValueLabel = new QLabel(fileInfo.lastModified().toString());
+ lastModValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(fileNameLabel);
+ mainLayout->addWidget(fileNameEdit);
+ mainLayout->addWidget(pathLabel);
+ mainLayout->addWidget(pathValueLabel);
+ mainLayout->addWidget(sizeLabel);
+ mainLayout->addWidget(sizeValueLabel);
+ mainLayout->addWidget(lastReadLabel);
+ mainLayout->addWidget(lastReadValueLabel);
+ mainLayout->addWidget(lastModLabel);
+ mainLayout->addWidget(lastModValueLabel);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+}
+//! [6]
+
+//! [7]
+PermissionsTab::PermissionsTab(const QFileInfo &fileInfo, QWidget *parent)
+ : QWidget(parent)
+{
+ QGroupBox *permissionsGroup = new QGroupBox(tr("Permissions"));
+
+ QCheckBox *readable = new QCheckBox(tr("Readable"));
+ if (fileInfo.isReadable())
+ readable->setChecked(true);
+
+ QCheckBox *writable = new QCheckBox(tr("Writable"));
+ if ( fileInfo.isWritable() )
+ writable->setChecked(true);
+
+ QCheckBox *executable = new QCheckBox(tr("Executable"));
+ if ( fileInfo.isExecutable() )
+ executable->setChecked(true);
+
+ QGroupBox *ownerGroup = new QGroupBox(tr("Ownership"));
+
+ QLabel *ownerLabel = new QLabel(tr("Owner"));
+ QLabel *ownerValueLabel = new QLabel(fileInfo.owner());
+ ownerValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QLabel *groupLabel = new QLabel(tr("Group"));
+ QLabel *groupValueLabel = new QLabel(fileInfo.group());
+ groupValueLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+
+ QVBoxLayout *permissionsLayout = new QVBoxLayout;
+ permissionsLayout->addWidget(readable);
+ permissionsLayout->addWidget(writable);
+ permissionsLayout->addWidget(executable);
+ permissionsGroup->setLayout(permissionsLayout);
+
+ QVBoxLayout *ownerLayout = new QVBoxLayout;
+ ownerLayout->addWidget(ownerLabel);
+ ownerLayout->addWidget(ownerValueLabel);
+ ownerLayout->addWidget(groupLabel);
+ ownerLayout->addWidget(groupValueLabel);
+ ownerGroup->setLayout(ownerLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(permissionsGroup);
+ mainLayout->addWidget(ownerGroup);
+ mainLayout->addStretch(1);
+ setLayout(mainLayout);
+}
+//! [7]
+
+//! [8]
+ApplicationsTab::ApplicationsTab(const QFileInfo &fileInfo, QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *topLabel = new QLabel(tr("Open with:"));
+
+ QListWidget *applicationsListBox = new QListWidget;
+ QStringList applications;
+
+ for (int i = 1; i <= 30; ++i)
+ applications.append(tr("Application %1").arg(i));
+ applicationsListBox->insertItems(0, applications);
+
+ QCheckBox *alwaysCheckBox;
+
+ if (fileInfo.suffix().isEmpty())
+ alwaysCheckBox = new QCheckBox(tr("Always use this application to "
+ "open this type of file"));
+ else
+ alwaysCheckBox = new QCheckBox(tr("Always use this application to "
+ "open files with the extension '%1'").arg(fileInfo.suffix()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(topLabel);
+ layout->addWidget(applicationsListBox);
+ layout->addWidget(alwaysCheckBox);
+ setLayout(layout);
+}
+//! [8]
diff --git a/examples/dialogs/tabdialog/tabdialog.h b/examples/dialogs/tabdialog/tabdialog.h
new file mode 100644
index 0000000..b22997d
--- /dev/null
+++ b/examples/dialogs/tabdialog/tabdialog.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABDIALOG_H
+#define TABDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QFileInfo;
+class QTabWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class GeneralTab : public QWidget
+{
+ Q_OBJECT
+
+public:
+ GeneralTab(const QFileInfo &fileInfo, QWidget *parent = 0);
+};
+//! [0]
+
+
+//! [1]
+class PermissionsTab : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PermissionsTab(const QFileInfo &fileInfo, QWidget *parent = 0);
+};
+//! [1]
+
+
+//! [2]
+class ApplicationsTab : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ApplicationsTab(const QFileInfo &fileInfo, QWidget *parent = 0);
+};
+//! [2]
+
+
+//! [3]
+class TabDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ TabDialog(const QString &fileName, QWidget *parent = 0);
+
+private:
+ QTabWidget *tabWidget;
+ QDialogButtonBox *buttonBox;
+};
+//! [3]
+
+#endif
diff --git a/examples/dialogs/tabdialog/tabdialog.pro b/examples/dialogs/tabdialog/tabdialog.pro
new file mode 100644
index 0000000..3239a72
--- /dev/null
+++ b/examples/dialogs/tabdialog/tabdialog.pro
@@ -0,0 +1,10 @@
+HEADERS = tabdialog.h
+SOURCES = main.cpp \
+ tabdialog.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/tabdialog
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/tabdialog
+INSTALLS += target sources
+wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
diff --git a/examples/dialogs/trivialwizard/trivialwizard.cpp b/examples/dialogs/trivialwizard/trivialwizard.cpp
new file mode 100644
index 0000000..128bce7
--- /dev/null
+++ b/examples/dialogs/trivialwizard/trivialwizard.cpp
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QTranslator>
+#include <QLocale>
+#include <QLibraryInfo>
+
+//! [0] //! [1]
+QWizardPage *createIntroPage()
+{
+ QWizardPage *page = new QWizardPage;
+ page->setTitle("Introduction");
+
+ QLabel *label = new QLabel("This wizard will help you register your copy "
+ "of Super Product Two.");
+ label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ page->setLayout(layout);
+
+ return page;
+}
+//! [0]
+
+//! [2]
+QWizardPage *createRegistrationPage()
+//! [1] //! [3]
+{
+//! [3]
+ QWizardPage *page = new QWizardPage;
+ page->setTitle("Registration");
+ page->setSubTitle("Please fill both fields.");
+
+ QLabel *nameLabel = new QLabel("Name:");
+ QLineEdit *nameLineEdit = new QLineEdit;
+
+ QLabel *emailLabel = new QLabel("Email address:");
+ QLineEdit *emailLineEdit = new QLineEdit;
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(nameLabel, 0, 0);
+ layout->addWidget(nameLineEdit, 0, 1);
+ layout->addWidget(emailLabel, 1, 0);
+ layout->addWidget(emailLineEdit, 1, 1);
+ page->setLayout(layout);
+
+ return page;
+//! [4]
+}
+//! [2] //! [4]
+
+//! [5] //! [6]
+QWizardPage *createConclusionPage()
+//! [5] //! [7]
+{
+//! [7]
+ QWizardPage *page = new QWizardPage;
+ page->setTitle("Conclusion");
+
+ QLabel *label = new QLabel("You are now successfully registered. Have a "
+ "nice day!");
+ label->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(label);
+ page->setLayout(layout);
+
+ return page;
+//! [8]
+}
+//! [6] //! [8]
+
+//! [9] //! [10]
+int main(int argc, char *argv[])
+//! [9] //! [11]
+{
+ QApplication app(argc, argv);
+
+ QString translatorFileName = QLatin1String("qt_");
+ translatorFileName += QLocale::system().name();
+ QTranslator *translator = new QTranslator(&app);
+ if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ app.installTranslator(translator);
+
+
+ QWizard wizard;
+ wizard.addPage(createIntroPage());
+ wizard.addPage(createRegistrationPage());
+ wizard.addPage(createConclusionPage());
+
+ wizard.setWindowTitle("Trivial Wizard");
+ wizard.show();
+
+ return app.exec();
+}
+//! [10] //! [11]
diff --git a/examples/dialogs/trivialwizard/trivialwizard.pro b/examples/dialogs/trivialwizard/trivialwizard.pro
new file mode 100644
index 0000000..970e12f
--- /dev/null
+++ b/examples/dialogs/trivialwizard/trivialwizard.pro
@@ -0,0 +1,7 @@
+SOURCES = trivialwizard.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dialogs/trivialwizard
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dialogs/trivialwizard
+INSTALLS += target sources
diff --git a/examples/draganddrop/README b/examples/draganddrop/README
new file mode 100644
index 0000000..f4efd2e
--- /dev/null
+++ b/examples/draganddrop/README
@@ -0,0 +1,40 @@
+Qt supports native drag and drop on all platforms via an extensible
+MIME-based system that enables applications to send data to each other in the
+most appropriate formats.
+
+Drag and drop can also be implemented for internal use by applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/draganddrop/delayedencoding/delayedencoding.pro b/examples/draganddrop/delayedencoding/delayedencoding.pro
new file mode 100644
index 0000000..c7b95b6
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/delayedencoding.pro
@@ -0,0 +1,14 @@
+QT += svg
+
+HEADERS = mimedata.h \
+ sourcewidget.h
+RESOURCES = delayedencoding.qrc
+SOURCES = main.cpp \
+ mimedata.cpp \
+ sourcewidget.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/delayedencoding
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/delayedencoding
+INSTALLS += target sources
diff --git a/examples/draganddrop/delayedencoding/delayedencoding.qrc b/examples/draganddrop/delayedencoding/delayedencoding.qrc
new file mode 100644
index 0000000..374f211
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/delayedencoding.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="">
+ <file>images/drag.png</file>
+ <file>images/example.svg</file>
+</qresource>
+</RCC>
diff --git a/examples/draganddrop/delayedencoding/images/drag.png b/examples/draganddrop/delayedencoding/images/drag.png
new file mode 100644
index 0000000..dd795cf
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/images/drag.png
Binary files differ
diff --git a/examples/draganddrop/delayedencoding/images/example.svg b/examples/draganddrop/delayedencoding/images/example.svg
new file mode 100644
index 0000000..4707cf8
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/images/example.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" standalone="no"?>
+<!-- ***********************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+************************************************************************ -->
+<svg width="8cm" height="8cm" viewBox="0 0 400 400"
+ xmlns="http://www.w3.org/2000/svg" baseProfile="tiny" version="1.1">
+ <title>Sphere</title>
+ <desc>A gradient filled sphere.</desc>
+ <g>
+ <defs>
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="200" cy="200" r="100" fx="150" fy="150">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="black" />
+ </radialGradient>
+ </defs>
+ <rect fill="lightblue" x="0" y="0" width="400" height="400" />
+ <circle fill="url(#blueSphere)" stroke="black" stroke-width="2"
+ cx="200" cy="200" r="100"/>
+ </g>
+</svg>
diff --git a/examples/draganddrop/delayedencoding/main.cpp b/examples/draganddrop/delayedencoding/main.cpp
new file mode 100644
index 0000000..801e474
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "sourcewidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ SourceWidget window;
+ window.show();
+ return app.exec();
+}
+
diff --git a/examples/draganddrop/delayedencoding/mimedata.cpp b/examples/draganddrop/delayedencoding/mimedata.cpp
new file mode 100644
index 0000000..5c7c23c
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/mimedata.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mimedata.h"
+
+MimeData::MimeData()
+ : QMimeData()
+{
+}
+
+//![0]
+QStringList MimeData::formats() const
+{
+ return QMimeData::formats() << "image/png";
+}
+//![0]
+
+//![1]
+QVariant MimeData::retrieveData(const QString &mimeType, QVariant::Type type)
+ const
+{
+ emit dataRequested(mimeType);
+
+ return QMimeData::retrieveData(mimeType, type);
+}
+//![1]
+
diff --git a/examples/draganddrop/delayedencoding/mimedata.h b/examples/draganddrop/delayedencoding/mimedata.h
new file mode 100644
index 0000000..13e834d
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/mimedata.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MIMEDATA_H
+#define MIMEDATA_H
+
+#include <QMimeData>
+
+//![0]
+class MimeData : public QMimeData
+{
+ Q_OBJECT
+
+public:
+ MimeData();
+ QStringList formats() const;
+
+signals:
+ void dataRequested(const QString &mimeType) const;
+
+protected:
+ QVariant retrieveData(const QString &mimetype, QVariant::Type type) const;
+};
+//![0]
+
+#endif
diff --git a/examples/draganddrop/delayedencoding/sourcewidget.cpp b/examples/draganddrop/delayedencoding/sourcewidget.cpp
new file mode 100644
index 0000000..f5aed89
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/sourcewidget.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSvg>
+#include "mimedata.h"
+#include "sourcewidget.h"
+
+SourceWidget::SourceWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QFile imageFile(":/images/example.svg");
+ imageFile.open(QIODevice::ReadOnly);
+ imageData = imageFile.readAll();
+ imageFile.close();
+
+ QScrollArea *imageArea = new QScrollArea;
+ imageLabel = new QSvgWidget;
+ imageLabel->renderer()->load(imageData);
+ imageArea->setWidget(imageLabel);
+ //imageLabel->setMinimumSize(imageLabel->renderer()->viewBox().size());
+
+ QLabel *instructTopLabel = new QLabel(tr("This is an SVG drawing:"));
+ QLabel *instructBottomLabel = new QLabel(
+ tr("Drag the icon to copy the drawing as a PNG file:"));
+ QPushButton *dragIcon = new QPushButton(tr("Export"));
+ dragIcon->setIcon(QIcon(":/images/drag.png"));
+
+ connect(dragIcon, SIGNAL(pressed()), this, SLOT(startDrag()));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(instructTopLabel, 0, 0, 1, 2);
+ layout->addWidget(imageArea, 1, 0, 2, 2);
+ layout->addWidget(instructBottomLabel, 3, 0);
+ layout->addWidget(dragIcon, 3, 1);
+ setLayout(layout);
+ setWindowTitle(tr("Delayed Encoding"));
+}
+
+//![1]
+void SourceWidget::createData(const QString &mimeType)
+{
+ if (mimeType != "image/png")
+ return;
+
+ QImage image(imageLabel->size(), QImage::Format_RGB32);
+ QPainter painter;
+ painter.begin(&image);
+ imageLabel->renderer()->render(&painter);
+ painter.end();
+
+ QByteArray data;
+ QBuffer buffer(&data);
+ buffer.open(QIODevice::WriteOnly);
+ image.save(&buffer, "PNG");
+ buffer.close();
+
+ mimeData->setData("image/png", data);
+}
+//![1]
+
+//![0]
+void SourceWidget::startDrag()
+{
+ mimeData = new MimeData;
+
+ connect(mimeData, SIGNAL(dataRequested(const QString &)),
+ this, SLOT(createData(const QString &)), Qt::DirectConnection);
+
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(QPixmap(":/images/drag.png"));
+
+ drag->exec(Qt::CopyAction);
+}
+//![0]
+
diff --git a/examples/draganddrop/delayedencoding/sourcewidget.h b/examples/draganddrop/delayedencoding/sourcewidget.h
new file mode 100644
index 0000000..8d6a690
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/sourcewidget.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SOURCEWIDGET_H
+#define SOURCEWIDGET_H
+
+#include <QByteArray>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QSvgWidget;
+QT_END_NAMESPACE
+class MimeData;
+
+class SourceWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ SourceWidget(QWidget *parent = 0);
+//![0]
+public slots:
+ void createData(const QString &mimetype);
+ void startDrag();
+
+private:
+ QByteArray imageData;
+ QSvgWidget *imageLabel;
+ MimeData *mimeData;
+//![0]
+};
+
+#endif
diff --git a/examples/draganddrop/draganddrop.pro b/examples/draganddrop/draganddrop.pro
new file mode 100644
index 0000000..0cd881a
--- /dev/null
+++ b/examples/draganddrop/draganddrop.pro
@@ -0,0 +1,15 @@
+TEMPLATE = subdirs
+SUBDIRS = draggableicons \
+ draggabletext \
+ dropsite \
+ fridgemagnets \
+ puzzle
+
+contains(QT_CONFIG, svg): SUBDIRS += delayedencoding
+
+wince*: SUBDIRS -= dropsite
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop
+INSTALLS += sources
diff --git a/examples/draganddrop/draggableicons/draggableicons.pro b/examples/draganddrop/draggableicons/draggableicons.pro
new file mode 100644
index 0000000..74cfda9
--- /dev/null
+++ b/examples/draganddrop/draggableicons/draggableicons.pro
@@ -0,0 +1,10 @@
+HEADERS = dragwidget.h
+RESOURCES = draggableicons.qrc
+SOURCES = dragwidget.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggableicons
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggableicons
+INSTALLS += target sources
diff --git a/examples/draganddrop/draggableicons/draggableicons.qrc b/examples/draganddrop/draggableicons/draggableicons.qrc
new file mode 100644
index 0000000..63f84ac
--- /dev/null
+++ b/examples/draganddrop/draggableicons/draggableicons.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="">
+ <file>images/boat.png</file>
+ <file>images/car.png</file>
+ <file>images/house.png</file>
+</qresource>
+</RCC>
diff --git a/examples/draganddrop/draggableicons/dragwidget.cpp b/examples/draganddrop/draggableicons/dragwidget.cpp
new file mode 100644
index 0000000..021f816
--- /dev/null
+++ b/examples/draganddrop/draggableicons/dragwidget.cpp
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dragwidget.h"
+
+//! [0]
+DragWidget::DragWidget(QWidget *parent)
+ : QFrame(parent)
+{
+ setMinimumSize(200, 200);
+ setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ setAcceptDrops(true);
+
+ QLabel *boatIcon = new QLabel(this);
+ boatIcon->setPixmap(QPixmap(":/images/boat.png"));
+ boatIcon->move(20, 20);
+ boatIcon->show();
+ boatIcon->setAttribute(Qt::WA_DeleteOnClose);
+
+ QLabel *carIcon = new QLabel(this);
+ carIcon->setPixmap(QPixmap(":/images/car.png"));
+ carIcon->move(120, 20);
+ carIcon->show();
+ carIcon->setAttribute(Qt::WA_DeleteOnClose);
+
+ QLabel *houseIcon = new QLabel(this);
+ houseIcon->setPixmap(QPixmap(":/images/house.png"));
+ houseIcon->move(20, 120);
+ houseIcon->show();
+ houseIcon->setAttribute(Qt::WA_DeleteOnClose);
+}
+//! [0]
+
+void DragWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("application/x-dnditemdata")) {
+ if (event->source() == this) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else {
+ event->ignore();
+ }
+}
+
+void DragWidget::dragMoveEvent(QDragMoveEvent *event)
+{
+ if (event->mimeData()->hasFormat("application/x-dnditemdata")) {
+ if (event->source() == this) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else {
+ event->ignore();
+ }
+}
+
+void DragWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasFormat("application/x-dnditemdata")) {
+ QByteArray itemData = event->mimeData()->data("application/x-dnditemdata");
+ QDataStream dataStream(&itemData, QIODevice::ReadOnly);
+
+ QPixmap pixmap;
+ QPoint offset;
+ dataStream >> pixmap >> offset;
+
+ QLabel *newIcon = new QLabel(this);
+ newIcon->setPixmap(pixmap);
+ newIcon->move(event->pos() - offset);
+ newIcon->show();
+ newIcon->setAttribute(Qt::WA_DeleteOnClose);
+
+ if (event->source() == this) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else {
+ event->ignore();
+ }
+}
+
+//! [1]
+void DragWidget::mousePressEvent(QMouseEvent *event)
+{
+ QLabel *child = static_cast<QLabel*>(childAt(event->pos()));
+ if (!child)
+ return;
+
+ QPixmap pixmap = *child->pixmap();
+
+ QByteArray itemData;
+ QDataStream dataStream(&itemData, QIODevice::WriteOnly);
+ dataStream << pixmap << QPoint(event->pos() - child->pos());
+//! [1]
+
+//! [2]
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setData("application/x-dnditemdata", itemData);
+//! [2]
+
+//! [3]
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(pixmap);
+ drag->setHotSpot(event->pos() - child->pos());
+//! [3]
+
+ QPixmap tempPixmap = pixmap;
+ QPainter painter;
+ painter.begin(&tempPixmap);
+ painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127));
+ painter.end();
+
+ child->setPixmap(tempPixmap);
+
+ if (drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction) == Qt::MoveAction)
+ child->close();
+ else {
+ child->show();
+ child->setPixmap(pixmap);
+ }
+}
diff --git a/examples/draganddrop/draggableicons/dragwidget.h b/examples/draganddrop/draggableicons/dragwidget.h
new file mode 100644
index 0000000..201adf8
--- /dev/null
+++ b/examples/draganddrop/draggableicons/dragwidget.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGWIDGET_H
+#define DRAGWIDGET_H
+
+#include <QFrame>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDropEvent;
+QT_END_NAMESPACE
+
+//! [0]
+class DragWidget : public QFrame
+{
+public:
+ DragWidget(QWidget *parent=0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+};
+//! [0]
+
+#endif
diff --git a/examples/draganddrop/draggableicons/images/boat.png b/examples/draganddrop/draggableicons/images/boat.png
new file mode 100644
index 0000000..46c894f
--- /dev/null
+++ b/examples/draganddrop/draggableicons/images/boat.png
Binary files differ
diff --git a/examples/draganddrop/draggableicons/images/car.png b/examples/draganddrop/draggableicons/images/car.png
new file mode 100644
index 0000000..3cb35e5
--- /dev/null
+++ b/examples/draganddrop/draggableicons/images/car.png
Binary files differ
diff --git a/examples/draganddrop/draggableicons/images/house.png b/examples/draganddrop/draggableicons/images/house.png
new file mode 100644
index 0000000..ee9d5b1
--- /dev/null
+++ b/examples/draganddrop/draggableicons/images/house.png
Binary files differ
diff --git a/examples/draganddrop/draggableicons/main.cpp b/examples/draganddrop/draggableicons/main.cpp
new file mode 100644
index 0000000..cd94537
--- /dev/null
+++ b/examples/draganddrop/draggableicons/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QHBoxLayout>
+#include "dragwidget.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(draggableicons);
+
+ QApplication app(argc, argv);
+
+ QWidget mainWidget;
+ QHBoxLayout *horizontalLayout = new QHBoxLayout;
+ horizontalLayout->addWidget(new DragWidget);
+ horizontalLayout->addWidget(new DragWidget);
+
+ mainWidget.setLayout(horizontalLayout);
+ mainWidget.setWindowTitle(QObject::tr("Draggable Icons"));
+ mainWidget.show();
+
+ return app.exec();
+}
diff --git a/examples/draganddrop/draggabletext/draggabletext.pro b/examples/draganddrop/draggabletext/draggabletext.pro
new file mode 100644
index 0000000..07c7c24
--- /dev/null
+++ b/examples/draganddrop/draggabletext/draggabletext.pro
@@ -0,0 +1,12 @@
+HEADERS = draglabel.h \
+ dragwidget.h
+RESOURCES = draggabletext.qrc
+SOURCES = draglabel.cpp \
+ dragwidget.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggabletext
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.txt *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/draggabletext
+INSTALLS += target sources
diff --git a/examples/draganddrop/draggabletext/draggabletext.qrc b/examples/draganddrop/draggabletext/draggabletext.qrc
new file mode 100644
index 0000000..b72217d
--- /dev/null
+++ b/examples/draganddrop/draggabletext/draggabletext.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/dictionary">
+ <file>words.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/draganddrop/draggabletext/draglabel.cpp b/examples/draganddrop/draggabletext/draglabel.cpp
new file mode 100644
index 0000000..4dfa099
--- /dev/null
+++ b/examples/draganddrop/draggabletext/draglabel.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "draglabel.h"
+
+DragLabel::DragLabel(const QString &text, QWidget *parent)
+ : QLabel(text, parent)
+{
+ setAutoFillBackground(true);
+ setFrameShape(QFrame::Panel);
+ setFrameShadow(QFrame::Raised);
+}
diff --git a/examples/draganddrop/draggabletext/draglabel.h b/examples/draganddrop/draggabletext/draglabel.h
new file mode 100644
index 0000000..8ba2778
--- /dev/null
+++ b/examples/draganddrop/draggabletext/draglabel.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGLABEL_H
+#define DRAGLABEL_H
+
+#include <QLabel>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDragMoveEvent;
+class QFrame;
+QT_END_NAMESPACE
+
+class DragLabel : public QLabel
+{
+public:
+ DragLabel(const QString &text, QWidget *parent);
+};
+
+#endif
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
new file mode 100644
index 0000000..2af7b29
--- /dev/null
+++ b/examples/draganddrop/draggabletext/dragwidget.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "draglabel.h"
+#include "dragwidget.h"
+
+DragWidget::DragWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QFile dictionaryFile(":/dictionary/words.txt");
+ dictionaryFile.open(QIODevice::ReadOnly);
+ QTextStream inputStream(&dictionaryFile);
+
+ int x = 5;
+ int y = 5;
+
+ while (!inputStream.atEnd()) {
+ QString word;
+ inputStream >> word;
+ if (!word.isEmpty()) {
+ DragLabel *wordLabel = new DragLabel(word, this);
+ wordLabel->move(x, y);
+ wordLabel->show();
+ wordLabel->setAttribute(Qt::WA_DeleteOnClose);
+ x += wordLabel->width() + 2;
+ if (x >= 195) {
+ x = 5;
+ y += wordLabel->height() + 2;
+ }
+ }
+ }
+
+ QPalette newPalette = palette();
+ newPalette.setColor(QPalette::Window, Qt::white);
+ setPalette(newPalette);
+
+ setAcceptDrops(true);
+ setMinimumSize(400, qMax(200, y));
+ setWindowTitle(tr("Draggable Text"));
+}
+
+void DragWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasText()) {
+ if (children().contains(event->source())) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else {
+ event->ignore();
+ }
+}
+
+void DragWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasText()) {
+ const QMimeData *mime = event->mimeData();
+ QStringList pieces = mime->text().split(QRegExp("\\s+"),
+ QString::SkipEmptyParts);
+ QPoint position = event->pos();
+ QPoint hotSpot;
+
+ QList<QByteArray> hotSpotPos = mime->data("application/x-hotspot").split(' ');
+ if (hotSpotPos.size() == 2) {
+ hotSpot.setX(hotSpotPos.first().toInt());
+ hotSpot.setY(hotSpotPos.last().toInt());
+ }
+
+ foreach (QString piece, pieces) {
+ DragLabel *newLabel = new DragLabel(piece, this);
+ newLabel->move(position - hotSpot);
+ newLabel->show();
+ newLabel->setAttribute(Qt::WA_DeleteOnClose);
+
+ position += QPoint(newLabel->width(), 0);
+ }
+
+ if (event->source() == this) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else {
+ event->ignore();
+ }
+ foreach (QObject *child, children()) {
+ if (child->inherits("QWidget")) {
+ QWidget *widget = static_cast<QWidget *>(child);
+ if (!widget->isVisible())
+ widget->deleteLater();
+ }
+ }
+}
+
+void DragWidget::mousePressEvent(QMouseEvent *event)
+{
+ QLabel *child = static_cast<QLabel*>(childAt(event->pos()));
+ if (!child)
+ return;
+
+ QPoint hotSpot = event->pos() - child->pos();
+
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setText(child->text());
+ mimeData->setData("application/x-hotspot",
+ QByteArray::number(hotSpot.x())
+ + " " + QByteArray::number(hotSpot.y()));
+
+ QPixmap pixmap(child->size());
+ child->render(&pixmap);
+
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(pixmap);
+ drag->setHotSpot(hotSpot);
+
+ Qt::DropAction dropAction = drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
+
+ if (dropAction == Qt::MoveAction)
+ child->close();
+}
diff --git a/examples/draganddrop/draggabletext/dragwidget.h b/examples/draganddrop/draggabletext/dragwidget.h
new file mode 100644
index 0000000..b51f05b
--- /dev/null
+++ b/examples/draganddrop/draggabletext/dragwidget.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGWIDGET_H
+#define DRAGWIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDropEvent;
+QT_END_NAMESPACE
+
+class DragWidget : public QWidget
+{
+public:
+ DragWidget(QWidget *parent = 0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+};
+
+#endif
diff --git a/examples/draganddrop/draggabletext/main.cpp b/examples/draganddrop/draggabletext/main.cpp
new file mode 100644
index 0000000..e66c8b7
--- /dev/null
+++ b/examples/draganddrop/draggabletext/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "dragwidget.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(draggabletext);
+
+ QApplication app(argc, argv);
+ DragWidget window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/draganddrop/draggabletext/words.txt b/examples/draganddrop/draggabletext/words.txt
new file mode 100644
index 0000000..19b8b03
--- /dev/null
+++ b/examples/draganddrop/draggabletext/words.txt
@@ -0,0 +1,41 @@
+Qt
+Quarterly
+is
+a
+paper
+based
+newsletter
+exclusively
+available
+to
+Qt
+customers
+Every
+quarter
+we
+mail
+out
+an
+issue
+that
+we
+hope
+will
+bring
+added
+insight
+and
+pleasure
+to
+your
+Qt
+programming
+with
+high
+quality
+technical
+articles
+written
+by
+Qt
+experts
diff --git a/examples/draganddrop/dropsite/droparea.cpp b/examples/draganddrop/dropsite/droparea.cpp
new file mode 100644
index 0000000..495e2bf
--- /dev/null
+++ b/examples/draganddrop/dropsite/droparea.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "droparea.h"
+
+//! [DropArea constructor]
+DropArea::DropArea(QWidget *parent)
+ : QLabel(parent)
+{
+ setMinimumSize(200, 200);
+ setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ setAlignment(Qt::AlignCenter);
+ setAcceptDrops(true);
+ setAutoFillBackground(true);
+ clear();
+}
+//! [DropArea constructor]
+
+//! [dragEnterEvent() function]
+void DropArea::dragEnterEvent(QDragEnterEvent *event)
+{
+ setText(tr("<drop content>"));
+ setBackgroundRole(QPalette::Highlight);
+
+ event->acceptProposedAction();
+ emit changed(event->mimeData());
+}
+//! [dragEnterEvent() function]
+
+//! [dragMoveEvent() function]
+void DropArea::dragMoveEvent(QDragMoveEvent *event)
+{
+ event->acceptProposedAction();
+}
+//! [dragMoveEvent() function]
+
+//! [dropEvent() function part1]
+void DropArea::dropEvent(QDropEvent *event)
+{
+ const QMimeData *mimeData = event->mimeData();
+//! [dropEvent() function part1]
+
+//! [dropEvent() function part2]
+ if (mimeData->hasImage()) {
+ setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));
+ } else if (mimeData->hasHtml()) {
+ setText(mimeData->html());
+ setTextFormat(Qt::RichText);
+ } else if (mimeData->hasText()) {
+ setText(mimeData->text());
+ setTextFormat(Qt::PlainText);
+ } else if (mimeData->hasUrls()) {
+ QList<QUrl> urlList = mimeData->urls();
+ QString text;
+ for (int i = 0; i < urlList.size() && i < 32; ++i) {
+ QString url = urlList.at(i).path();
+ text += url + QString("\n");
+ }
+ setText(text);
+ } else {
+ setText(tr("Cannot display data"));
+ }
+//! [dropEvent() function part2]
+
+//! [dropEvent() function part3]
+ setBackgroundRole(QPalette::Dark);
+ event->acceptProposedAction();
+}
+//! [dropEvent() function part3]
+
+//! [dragLeaveEvent() function]
+void DropArea::dragLeaveEvent(QDragLeaveEvent *event)
+{
+ clear();
+ event->accept();
+}
+//! [dragLeaveEvent() function]
+
+//! [clear() function]
+void DropArea::clear()
+{
+ setText(tr("<drop content>"));
+ setBackgroundRole(QPalette::Dark);
+
+ emit changed();
+}
+//! [clear() function]
diff --git a/examples/draganddrop/dropsite/droparea.h b/examples/draganddrop/dropsite/droparea.h
new file mode 100644
index 0000000..8a40acc
--- /dev/null
+++ b/examples/draganddrop/dropsite/droparea.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DROPAREA_H
+#define DROPAREA_H
+
+#include <QLabel>
+
+QT_BEGIN_NAMESPACE
+class QMimeData;
+QT_END_NAMESPACE
+
+//! [DropArea header part1]
+class DropArea : public QLabel
+{
+ Q_OBJECT
+
+public:
+ DropArea(QWidget *parent = 0);
+
+public slots:
+ void clear();
+
+signals:
+ void changed(const QMimeData *mimeData = 0);
+//! [DropArea header part1]
+
+//! [DropArea header part2]
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dragLeaveEvent(QDragLeaveEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private:
+ QLabel *label;
+};
+//! [DropArea header part2]
+
+#endif
diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro
new file mode 100644
index 0000000..29dd0fd
--- /dev/null
+++ b/examples/draganddrop/dropsite/dropsite.pro
@@ -0,0 +1,12 @@
+HEADERS = droparea.h \
+ dropsitewindow.h
+SOURCES = droparea.cpp \
+ dropsitewindow.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/dropsite
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/dropsite
+INSTALLS += target sources
+
diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp
new file mode 100644
index 0000000..627baaa
--- /dev/null
+++ b/examples/draganddrop/dropsite/dropsitewindow.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "droparea.h"
+#include "dropsitewindow.h"
+
+//! [constructor part1]
+DropSiteWindow::DropSiteWindow()
+{
+ abstractLabel = new QLabel(tr("This example accepts drags from other "
+ "applications and displays the MIME types "
+ "provided by the drag object."));
+ abstractLabel->setWordWrap(true);
+ abstractLabel->adjustSize();
+//! [constructor part1]
+
+//! [constructor part2]
+ dropArea = new DropArea;
+ connect(dropArea, SIGNAL(changed(const QMimeData *)),
+ this, SLOT(updateFormatsTable(const QMimeData *)));
+//! [constructor part2]
+
+//! [constructor part3]
+ QStringList labels;
+ labels << tr("Format") << tr("Content");
+
+ formatsTable = new QTableWidget;
+ formatsTable->setColumnCount(2);
+ formatsTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ formatsTable->setHorizontalHeaderLabels(labels);
+ formatsTable->horizontalHeader()->setStretchLastSection(true);
+//! [constructor part3]
+
+//! [constructor part4]
+ clearButton = new QPushButton(tr("Clear"));
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(clearButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ connect(quitButton, SIGNAL(pressed()), this, SLOT(close()));
+ connect(clearButton, SIGNAL(pressed()), dropArea, SLOT(clear()));
+//! [constructor part4]
+
+//! [constructor part5]
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(abstractLabel);
+ mainLayout->addWidget(dropArea);
+ mainLayout->addWidget(formatsTable);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Drop Site"));
+ setMinimumSize(350, 500);
+}
+//! [constructor part5]
+
+//! [updateFormatsTable() part1]
+void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData)
+{
+ formatsTable->setRowCount(0);
+ if (!mimeData)
+ return;
+//! [updateFormatsTable() part1]
+
+//! [updateFormatsTable() part2]
+ foreach (QString format, mimeData->formats()) {
+ QTableWidgetItem *formatItem = new QTableWidgetItem(format);
+ formatItem->setFlags(Qt::ItemIsEnabled);
+ formatItem->setTextAlignment(Qt::AlignTop | Qt::AlignLeft);
+//! [updateFormatsTable() part2]
+
+//! [updateFormatsTable() part3]
+ QString text;
+ if (format == "text/plain") {
+ text = mimeData->text().simplified();
+ } else if (format == "text/html") {
+ text = mimeData->html().simplified();
+ } else if (format == "text/uri-list") {
+ QList<QUrl> urlList = mimeData->urls();
+ for (int i = 0; i < urlList.size() && i < 32; ++i)
+ text.append(urlList[i].toString() + " ");
+ } else {
+ QByteArray data = mimeData->data(format);
+ for (int i = 0; i < data.size() && i < 32; ++i) {
+ QString hex = QString("%1").arg(uchar(data[i]), 2, 16,
+ QChar('0'))
+ .toUpper();
+ text.append(hex + " ");
+ }
+ }
+//! [updateFormatsTable() part3]
+
+//! [updateFormatsTable() part4]
+ int row = formatsTable->rowCount();
+ formatsTable->insertRow(row);
+ formatsTable->setItem(row, 0, new QTableWidgetItem(format));
+ formatsTable->setItem(row, 1, new QTableWidgetItem(text));
+ }
+
+ formatsTable->resizeColumnToContents(0);
+}
+//! [updateFormatsTable() part4]
diff --git a/examples/draganddrop/dropsite/dropsitewindow.h b/examples/draganddrop/dropsite/dropsitewindow.h
new file mode 100644
index 0000000..bbdc687
--- /dev/null
+++ b/examples/draganddrop/dropsite/dropsitewindow.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DROPSITEWINDOW_H
+#define DROPSITEWINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QMimeData;
+class QPushButton;
+class QTableWidget;
+QT_END_NAMESPACE
+class DropArea;
+
+//! [DropSiteWindow header]
+class DropSiteWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ DropSiteWindow();
+
+public slots:
+ void updateFormatsTable(const QMimeData *mimeData);
+
+private:
+ DropArea *dropArea;
+ QLabel *abstractLabel;
+ QTableWidget *formatsTable;
+
+ QPushButton *clearButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+};
+//! [DropSiteWindow header]
+
+#endif
diff --git a/examples/draganddrop/dropsite/main.cpp b/examples/draganddrop/dropsite/main.cpp
new file mode 100644
index 0000000..62589ad
--- /dev/null
+++ b/examples/draganddrop/dropsite/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "dropsitewindow.h"
+
+//! [main() function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ DropSiteWindow window;
+ window.show();
+ return app.exec();
+}
+//! [main() function]
diff --git a/examples/draganddrop/fridgemagnets/draglabel.cpp b/examples/draganddrop/fridgemagnets/draglabel.cpp
new file mode 100644
index 0000000..1bec024
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/draglabel.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "draglabel.h"
+
+//! [0]
+DragLabel::DragLabel(const QString &text, QWidget *parent)
+ : QLabel(parent)
+{
+ QFontMetrics metric(font());
+ QSize size = metric.size(Qt::TextSingleLine, text);
+
+ QImage image(size.width() + 12, size.height() + 12,
+ QImage::Format_ARGB32_Premultiplied);
+ image.fill(qRgba(0, 0, 0, 0));
+
+ QFont font;
+ font.setStyleStrategy(QFont::ForceOutline);
+//! [0]
+
+//! [1]
+ QLinearGradient gradient(0, 0, 0, image.height()-1);
+ gradient.setColorAt(0.0, Qt::white);
+ gradient.setColorAt(0.2, QColor(200, 200, 255));
+ gradient.setColorAt(0.8, QColor(200, 200, 255));
+ gradient.setColorAt(1.0, QColor(127, 127, 200));
+
+ QPainter painter;
+ painter.begin(&image);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.setBrush(gradient);
+ painter.drawRoundedRect(QRectF(0.5, 0.5, image.width()-1, image.height()-1),
+ 25, 25, Qt::RelativeSize);
+
+ painter.setFont(font);
+ painter.setBrush(Qt::black);
+ painter.drawText(QRect(QPoint(6, 6), size), Qt::AlignCenter, text);
+ painter.end();
+//! [1]
+
+//! [2]
+ setPixmap(QPixmap::fromImage(image));
+ m_labelText = text;
+}
+//! [2]
+
+QString DragLabel::labelText() const
+{
+ return m_labelText;
+}
diff --git a/examples/draganddrop/fridgemagnets/draglabel.h b/examples/draganddrop/fridgemagnets/draglabel.h
new file mode 100644
index 0000000..5d2fd52
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/draglabel.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGLABEL_H
+#define DRAGLABEL_H
+
+#include <QLabel>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDragMoveEvent;
+class QFrame;
+QT_END_NAMESPACE
+
+//! [0]
+class DragLabel : public QLabel
+{
+public:
+ DragLabel(const QString &text, QWidget *parent);
+ QString labelText() const;
+
+private:
+ QString m_labelText;
+};
+//! [0]
+
+#endif
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp
new file mode 100644
index 0000000..43a9588
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "draglabel.h"
+#include "dragwidget.h"
+
+//! [0]
+DragWidget::DragWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ QFile dictionaryFile(":/dictionary/words.txt");
+ dictionaryFile.open(QFile::ReadOnly);
+ QTextStream inputStream(&dictionaryFile);
+//! [0]
+
+//! [1]
+ int x = 5;
+ int y = 5;
+
+ while (!inputStream.atEnd()) {
+ QString word;
+ inputStream >> word;
+ if (!word.isEmpty()) {
+ DragLabel *wordLabel = new DragLabel(word, this);
+ wordLabel->move(x, y);
+ wordLabel->show();
+ wordLabel->setAttribute(Qt::WA_DeleteOnClose);
+ x += wordLabel->width() + 2;
+ if (x >= 245) {
+ x = 5;
+ y += wordLabel->height() + 2;
+ }
+ }
+ }
+//! [1]
+
+//! [2]
+ QPalette newPalette = palette();
+ newPalette.setColor(QPalette::Window, Qt::white);
+ setPalette(newPalette);
+
+ setMinimumSize(400, qMax(200, y));
+ setWindowTitle(tr("Fridge Magnets"));
+//! [2] //! [3]
+ setAcceptDrops(true);
+}
+//! [3]
+
+//! [4]
+void DragWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+//! [4] //! [5]
+ if (event->mimeData()->hasFormat("application/x-fridgemagnet")) {
+ if (children().contains(event->source())) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+//! [5] //! [6]
+ }
+//! [6] //! [7]
+ } else if (event->mimeData()->hasText()) {
+ event->acceptProposedAction();
+ } else {
+ event->ignore();
+ }
+}
+//! [7]
+
+//! [8]
+void DragWidget::dragMoveEvent(QDragMoveEvent *event)
+{
+ if (event->mimeData()->hasFormat("application/x-fridgemagnet")) {
+ if (children().contains(event->source())) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+ } else if (event->mimeData()->hasText()) {
+ event->acceptProposedAction();
+ } else {
+ event->ignore();
+ }
+}
+//! [8]
+
+//! [9]
+void DragWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasFormat("application/x-fridgemagnet")) {
+ const QMimeData *mime = event->mimeData();
+//! [9] //! [10]
+ QByteArray itemData = mime->data("application/x-fridgemagnet");
+ QDataStream dataStream(&itemData, QIODevice::ReadOnly);
+
+ QString text;
+ QPoint offset;
+ dataStream >> text >> offset;
+//! [10]
+//! [11]
+ DragLabel *newLabel = new DragLabel(text, this);
+ newLabel->move(event->pos() - offset);
+ newLabel->show();
+ newLabel->setAttribute(Qt::WA_DeleteOnClose);
+
+ if (event->source() == this) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ event->acceptProposedAction();
+ }
+//! [11] //! [12]
+ } else if (event->mimeData()->hasText()) {
+ QStringList pieces = event->mimeData()->text().split(QRegExp("\\s+"),
+ QString::SkipEmptyParts);
+ QPoint position = event->pos();
+
+ foreach (QString piece, pieces) {
+ DragLabel *newLabel = new DragLabel(piece, this);
+ newLabel->move(position);
+ newLabel->show();
+ newLabel->setAttribute(Qt::WA_DeleteOnClose);
+
+ position += QPoint(newLabel->width(), 0);
+ }
+
+ event->acceptProposedAction();
+ } else {
+ event->ignore();
+ }
+}
+//! [12]
+
+//! [13]
+void DragWidget::mousePressEvent(QMouseEvent *event)
+{
+//! [13]
+//! [14]
+ DragLabel *child = static_cast<DragLabel*>(childAt(event->pos()));
+ if (!child)
+ return;
+
+ QPoint hotSpot = event->pos() - child->pos();
+
+ QByteArray itemData;
+ QDataStream dataStream(&itemData, QIODevice::WriteOnly);
+ dataStream << child->labelText() << QPoint(hotSpot);
+//! [14]
+
+//! [15]
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setData("application/x-fridgemagnet", itemData);
+ mimeData->setText(child->labelText());
+//! [15]
+
+//! [16]
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setPixmap(*child->pixmap());
+ drag->setHotSpot(hotSpot);
+
+ child->hide();
+//! [16]
+
+//! [17]
+ if (drag->exec(Qt::MoveAction | Qt::CopyAction, Qt::CopyAction) == Qt::MoveAction)
+ child->close();
+ else
+ child->show();
+}
+//! [17]
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.h b/examples/draganddrop/fridgemagnets/dragwidget.h
new file mode 100644
index 0000000..4722917
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/dragwidget.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DRAGWIDGET_H
+#define DRAGWIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDropEvent;
+QT_END_NAMESPACE
+
+//! [0]
+class DragWidget : public QWidget
+{
+public:
+ DragWidget(QWidget *parent = 0);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+};
+//! [0]
+
+#endif
diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
new file mode 100644
index 0000000..f1baaef
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
@@ -0,0 +1,12 @@
+HEADERS = draglabel.h \
+ dragwidget.h
+RESOURCES = fridgemagnets.qrc
+SOURCES = draglabel.cpp \
+ dragwidget.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/fridgemagnets
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.txt
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/fridgemagnets
+INSTALLS += target sources
diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.qrc b/examples/draganddrop/fridgemagnets/fridgemagnets.qrc
new file mode 100644
index 0000000..b72217d
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/fridgemagnets.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/dictionary">
+ <file>words.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp
new file mode 100644
index 0000000..c24cdb2
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "dragwidget.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(fridgemagnets);
+
+ QApplication app(argc, argv);
+ DragWidget window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/draganddrop/fridgemagnets/words.txt b/examples/draganddrop/fridgemagnets/words.txt
new file mode 100644
index 0000000..a7e1632
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/words.txt
@@ -0,0 +1,48 @@
+Colorless
+green
+ideas
+sleep
+furiously
+A
+colorless
+green
+idea
+is
+a
+new
+untried
+idea
+that
+is
+without
+vividness
+dull
+and
+unexciting
+To
+sleep
+furiously
+may
+seem
+a
+puzzling
+turn
+of
+phrase
+but
+the
+mind
+in
+sleep
+often
+indeed
+moves
+furiously
+with
+ideas
+and
+images
+flickering
+in
+and
+out
diff --git a/examples/draganddrop/puzzle/example.jpg b/examples/draganddrop/puzzle/example.jpg
new file mode 100644
index 0000000..e09fb70
--- /dev/null
+++ b/examples/draganddrop/puzzle/example.jpg
Binary files differ
diff --git a/examples/draganddrop/puzzle/main.cpp b/examples/draganddrop/puzzle/main.cpp
new file mode 100644
index 0000000..e0e5cc1
--- /dev/null
+++ b/examples/draganddrop/puzzle/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(puzzle);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.openImage(":/images/example.jpg");
+ window.show();
+ return app.exec();
+}
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
new file mode 100644
index 0000000..f998882
--- /dev/null
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <stdlib.h>
+
+#include "mainwindow.h"
+#include "pieceslist.h"
+#include "puzzlewidget.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupMenus();
+ setupWidgets();
+
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ setWindowTitle(tr("Puzzle"));
+}
+
+void MainWindow::openImage(const QString &path)
+{
+ QString fileName = path;
+
+ if (fileName.isNull())
+ fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Image"), "", "Image Files (*.png *.jpg *.bmp)");
+
+ if (!fileName.isEmpty()) {
+ QPixmap newImage;
+ if (!newImage.load(fileName)) {
+ QMessageBox::warning(this, tr("Open Image"),
+ tr("The image file could not be loaded."),
+ QMessageBox::Cancel);
+ return;
+ }
+ puzzleImage = newImage;
+ setupPuzzle();
+ }
+}
+
+void MainWindow::setCompleted()
+{
+ QMessageBox::information(this, tr("Puzzle Completed"),
+ tr("Congratulations! You have completed the puzzle!\n"
+ "Click OK to start again."),
+ QMessageBox::Ok);
+
+ setupPuzzle();
+}
+
+void MainWindow::setupPuzzle()
+{
+ int size = qMin(puzzleImage.width(), puzzleImage.height());
+ puzzleImage = puzzleImage.copy((puzzleImage.width() - size)/2,
+ (puzzleImage.height() - size)/2, size, size).scaled(400,
+ 400, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+
+ piecesList->clear();
+
+ for (int y = 0; y < 5; ++y) {
+ for (int x = 0; x < 5; ++x) {
+ QPixmap pieceImage = puzzleImage.copy(x*80, y*80, 80, 80);
+ piecesList->addPiece(pieceImage, QPoint(x, y));
+ }
+ }
+
+ qsrand(QCursor::pos().x() ^ QCursor::pos().y());
+
+ for (int i = 0; i < piecesList->count(); ++i) {
+ if (int(2.0*qrand()/(RAND_MAX+1.0)) == 1) {
+ QListWidgetItem *item = piecesList->takeItem(i);
+ piecesList->insertItem(0, item);
+ }
+ }
+
+ puzzleWidget->clear();
+}
+
+void MainWindow::setupMenus()
+{
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+
+ QAction *exitAction = fileMenu->addAction(tr("E&xit"));
+ exitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+
+ QMenu *gameMenu = menuBar()->addMenu(tr("&Game"));
+
+ QAction *restartAction = gameMenu->addAction(tr("&Restart"));
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openImage()));
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(restartAction, SIGNAL(triggered()), this, SLOT(setupPuzzle()));
+}
+
+void MainWindow::setupWidgets()
+{
+ QFrame *frame = new QFrame;
+ QHBoxLayout *frameLayout = new QHBoxLayout(frame);
+
+ piecesList = new PiecesList;
+ puzzleWidget = new PuzzleWidget;
+
+ connect(puzzleWidget, SIGNAL(puzzleCompleted()),
+ this, SLOT(setCompleted()), Qt::QueuedConnection);
+
+ frameLayout->addWidget(piecesList);
+ frameLayout->addWidget(puzzleWidget);
+ setCentralWidget(frame);
+}
diff --git a/examples/draganddrop/puzzle/mainwindow.h b/examples/draganddrop/puzzle/mainwindow.h
new file mode 100644
index 0000000..edfbb12
--- /dev/null
+++ b/examples/draganddrop/puzzle/mainwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QPixmap>
+#include <QMainWindow>
+
+class PiecesList;
+class PuzzleWidget;
+QT_BEGIN_NAMESPACE
+class QListWidgetItem;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void openImage(const QString &path = QString());
+ void setupPuzzle();
+
+private slots:
+ void setCompleted();
+
+private:
+ void setupMenus();
+ void setupWidgets();
+
+ QPixmap puzzleImage;
+ PiecesList *piecesList;
+ PuzzleWidget *puzzleWidget;
+};
+
+#endif
diff --git a/examples/draganddrop/puzzle/pieceslist.cpp b/examples/draganddrop/puzzle/pieceslist.cpp
new file mode 100644
index 0000000..77d06fb
--- /dev/null
+++ b/examples/draganddrop/puzzle/pieceslist.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "pieceslist.h"
+
+PiecesList::PiecesList(QWidget *parent)
+ : QListWidget(parent)
+{
+ setDragEnabled(true);
+ setViewMode(QListView::IconMode);
+ setIconSize(QSize(60, 60));
+ setSpacing(10);
+ setAcceptDrops(true);
+ setDropIndicatorShown(true);
+}
+
+void PiecesList::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece"))
+ event->accept();
+ else
+ event->ignore();
+}
+
+void PiecesList::dragMoveEvent(QDragMoveEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")) {
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else
+ event->ignore();
+}
+
+void PiecesList::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")) {
+ QByteArray pieceData = event->mimeData()->data("image/x-puzzle-piece");
+ QDataStream dataStream(&pieceData, QIODevice::ReadOnly);
+ QPixmap pixmap;
+ QPoint location;
+ dataStream >> pixmap >> location;
+
+ addPiece(pixmap, location);
+
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else
+ event->ignore();
+}
+
+void PiecesList::addPiece(QPixmap pixmap, QPoint location)
+{
+ QListWidgetItem *pieceItem = new QListWidgetItem(this);
+ pieceItem->setIcon(QIcon(pixmap));
+ pieceItem->setData(Qt::UserRole, QVariant(pixmap));
+ pieceItem->setData(Qt::UserRole+1, location);
+ pieceItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable
+ | Qt::ItemIsDragEnabled);
+}
+
+void PiecesList::startDrag(Qt::DropActions /*supportedActions*/)
+{
+ QListWidgetItem *item = currentItem();
+
+ QByteArray itemData;
+ QDataStream dataStream(&itemData, QIODevice::WriteOnly);
+ QPixmap pixmap = qVariantValue<QPixmap>(item->data(Qt::UserRole));
+ QPoint location = item->data(Qt::UserRole+1).toPoint();
+
+ dataStream << pixmap << location;
+
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setData("image/x-puzzle-piece", itemData);
+
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setHotSpot(QPoint(pixmap.width()/2, pixmap.height()/2));
+ drag->setPixmap(pixmap);
+
+ if (drag->exec(Qt::MoveAction) == Qt::MoveAction)
+ delete takeItem(row(item));
+}
diff --git a/examples/draganddrop/puzzle/pieceslist.h b/examples/draganddrop/puzzle/pieceslist.h
new file mode 100644
index 0000000..26685e3
--- /dev/null
+++ b/examples/draganddrop/puzzle/pieceslist.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PIECESLIST_H
+#define PIECESLIST_H
+
+#include <QListWidget>
+
+class PiecesList : public QListWidget
+{
+ Q_OBJECT
+
+public:
+ PiecesList(QWidget *parent = 0);
+ void addPiece(QPixmap pixmap, QPoint location);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+ void startDrag(Qt::DropActions supportedActions);
+};
+
+#endif
diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro
new file mode 100644
index 0000000..26d2350
--- /dev/null
+++ b/examples/draganddrop/puzzle/puzzle.pro
@@ -0,0 +1,20 @@
+HEADERS = mainwindow.h \
+ pieceslist.h \
+ puzzlewidget.h
+RESOURCES = puzzle.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ pieceslist.cpp \
+ puzzlewidget.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/puzzle
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg
+sources.path = $$[QT_INSTALL_EXAMPLES]/draganddrop/puzzle
+INSTALLS += target sources
+
+wince*: {
+ addFile.sources = example.jpg
+ addFile.path = .
+ DEPLOYMENT += addFile
+}
diff --git a/examples/draganddrop/puzzle/puzzle.qrc b/examples/draganddrop/puzzle/puzzle.qrc
new file mode 100644
index 0000000..4076cec
--- /dev/null
+++ b/examples/draganddrop/puzzle/puzzle.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/images">
+ <file>example.jpg</file>
+</qresource>
+</RCC>
diff --git a/examples/draganddrop/puzzle/puzzlewidget.cpp b/examples/draganddrop/puzzle/puzzlewidget.cpp
new file mode 100644
index 0000000..8548db5
--- /dev/null
+++ b/examples/draganddrop/puzzle/puzzlewidget.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "puzzlewidget.h"
+
+PuzzleWidget::PuzzleWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setAcceptDrops(true);
+ setMinimumSize(400, 400);
+ setMaximumSize(400, 400);
+}
+
+void PuzzleWidget::clear()
+{
+ pieceLocations.clear();
+ piecePixmaps.clear();
+ pieceRects.clear();
+ highlightedRect = QRect();
+ inPlace = 0;
+ update();
+}
+
+void PuzzleWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece"))
+ event->accept();
+ else
+ event->ignore();
+}
+
+void PuzzleWidget::dragLeaveEvent(QDragLeaveEvent *event)
+{
+ QRect updateRect = highlightedRect;
+ highlightedRect = QRect();
+ update(updateRect);
+ event->accept();
+}
+
+void PuzzleWidget::dragMoveEvent(QDragMoveEvent *event)
+{
+ QRect updateRect = highlightedRect.unite(targetSquare(event->pos()));
+
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")
+ && findPiece(targetSquare(event->pos())) == -1) {
+
+ highlightedRect = targetSquare(event->pos());
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ highlightedRect = QRect();
+ event->ignore();
+ }
+
+ update(updateRect);
+}
+
+void PuzzleWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")
+ && findPiece(targetSquare(event->pos())) == -1) {
+
+ QByteArray pieceData = event->mimeData()->data("image/x-puzzle-piece");
+ QDataStream dataStream(&pieceData, QIODevice::ReadOnly);
+ QRect square = targetSquare(event->pos());
+ QPixmap pixmap;
+ QPoint location;
+ dataStream >> pixmap >> location;
+
+ pieceLocations.append(location);
+ piecePixmaps.append(pixmap);
+ pieceRects.append(square);
+
+ highlightedRect = QRect();
+ update(square);
+
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+
+ if (location == QPoint(square.x()/80, square.y()/80)) {
+ inPlace++;
+ if (inPlace == 25)
+ emit puzzleCompleted();
+ }
+ } else {
+ highlightedRect = QRect();
+ event->ignore();
+ }
+}
+
+int PuzzleWidget::findPiece(const QRect &pieceRect) const
+{
+ for (int i = 0; i < pieceRects.size(); ++i) {
+ if (pieceRect == pieceRects[i]) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+void PuzzleWidget::mousePressEvent(QMouseEvent *event)
+{
+ QRect square = targetSquare(event->pos());
+ int found = findPiece(square);
+
+ if (found == -1)
+ return;
+
+ QPoint location = pieceLocations[found];
+ QPixmap pixmap = piecePixmaps[found];
+ pieceLocations.removeAt(found);
+ piecePixmaps.removeAt(found);
+ pieceRects.removeAt(found);
+
+ if (location == QPoint(square.x()/80, square.y()/80))
+ inPlace--;
+
+ update(square);
+
+ QByteArray itemData;
+ QDataStream dataStream(&itemData, QIODevice::WriteOnly);
+
+ dataStream << pixmap << location;
+
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setData("image/x-puzzle-piece", itemData);
+
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setHotSpot(event->pos() - square.topLeft());
+ drag->setPixmap(pixmap);
+
+ if (!(drag->exec(Qt::MoveAction) == Qt::MoveAction)) {
+ pieceLocations.insert(found, location);
+ piecePixmaps.insert(found, pixmap);
+ pieceRects.insert(found, square);
+ update(targetSquare(event->pos()));
+
+ if (location == QPoint(square.x()/80, square.y()/80))
+ inPlace++;
+ }
+}
+
+void PuzzleWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter;
+ painter.begin(this);
+ painter.fillRect(event->rect(), Qt::white);
+
+ if (highlightedRect.isValid()) {
+ painter.setBrush(QColor("#ffcccc"));
+ painter.setPen(Qt::NoPen);
+ painter.drawRect(highlightedRect.adjusted(0, 0, -1, -1));
+ }
+
+ for (int i = 0; i < pieceRects.size(); ++i) {
+ painter.drawPixmap(pieceRects[i], piecePixmaps[i]);
+ }
+ painter.end();
+}
+
+const QRect PuzzleWidget::targetSquare(const QPoint &position) const
+{
+ return QRect(position.x()/80 * 80, position.y()/80 * 80, 80, 80);
+}
diff --git a/examples/draganddrop/puzzle/puzzlewidget.h b/examples/draganddrop/puzzle/puzzlewidget.h
new file mode 100644
index 0000000..312e25f
--- /dev/null
+++ b/examples/draganddrop/puzzle/puzzlewidget.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PUZZLEWIDGET_H
+#define PUZZLEWIDGET_H
+
+#include <QList>
+#include <QPoint>
+#include <QPixmap>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDropEvent;
+class QMouseEvent;
+QT_END_NAMESPACE
+
+class PuzzleWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PuzzleWidget(QWidget *parent = 0);
+ void clear();
+
+signals:
+ void puzzleCompleted();
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragLeaveEvent(QDragLeaveEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ int findPiece(const QRect &pieceRect) const;
+ const QRect targetSquare(const QPoint &position) const;
+
+ QList<QPixmap> piecePixmaps;
+ QList<QRect> pieceRects;
+ QList<QPoint> pieceLocations;
+ QRect highlightedRect;
+ int inPlace;
+};
+
+#endif
diff --git a/examples/examples.pro b/examples/examples.pro
new file mode 100644
index 0000000..2c4fc81
--- /dev/null
+++ b/examples/examples.pro
@@ -0,0 +1,43 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ desktop \
+ dialogs \
+ draganddrop \
+ graphicsview \
+ ipc \
+ itemviews \
+ layouts \
+ linguist \
+ mainwindows \
+ network \
+ painting \
+ qtconcurrent \
+ richtext \
+ sql \
+ threads \
+ tools \
+ tutorials \
+ widgets \
+ uitools \
+ xml \
+ script
+
+contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon
+contains(QT_CONFIG, webkit): SUBDIRS += webkit
+embedded:SUBDIRS += qws
+!wince*: {
+ !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += assistant qtestlib help
+} else {
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
+}
+contains(QT_CONFIG, opengl): SUBDIRS += opengl
+contains(QT_CONFIG, dbus): SUBDIRS += dbus
+win32:!contains(QT_EDITION, OpenSource|Console):SUBDIRS += activeqt
+contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns
+contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]
+INSTALLS += sources
diff --git a/examples/graphicsview/README b/examples/graphicsview/README
new file mode 100644
index 0000000..6c38c18
--- /dev/null
+++ b/examples/graphicsview/README
@@ -0,0 +1,40 @@
+Qt is provided with a comprehensive canvas through the GraphicsView
+classes.
+
+These examples demonstrate the fundamental aspects of canvas programming
+with Qt.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
new file mode 100644
index 0000000..a166882
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
@@ -0,0 +1,12 @@
+HEADERS = layoutitem.h \
+ window.h
+SOURCES = layoutitem.cpp \
+ main.cpp \
+ window.cpp
+RESOURCES = basicgraphicslayouts.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/basicgraphicslayouts
+sources.files = $$SOURCES $$HEADERS $$RESOURCES basicgraphicslayouts.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/basicgraphicslayouts
+INSTALLS += target sources
diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc
new file mode 100644
index 0000000..fbe2efa
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource>
+ <file>images/block.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/graphicsview/basicgraphicslayouts/images/block.png b/examples/graphicsview/basicgraphicslayouts/images/block.png
new file mode 100644
index 0000000..4c72a3f
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/images/block.png
Binary files differ
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
new file mode 100644
index 0000000..8216b6e
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "layoutitem.h"
+
+//! [0]
+LayoutItem::LayoutItem(QGraphicsItem *parent/* = 0*/)
+ : QGraphicsWidget(parent)
+{
+ pix = new QPixmap(QLatin1String(":/images/block.png"));
+ // Do not allow a size smaller than the pixmap with two frames around it.
+ setMinimumSize(pix->size() + QSize(12, 12));
+}
+//! [0]
+
+LayoutItem::~LayoutItem()
+{
+ delete pix;
+}
+
+//! [1]
+void LayoutItem::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget /*= 0*/)
+{
+ Q_UNUSED(widget);
+ Q_UNUSED(option);
+
+ QRectF frame(QPointF(0,0), geometry().size());
+ qreal w = pix->width();
+ qreal h = pix->height();
+ QGradientStops stops;
+//! [1]
+
+//! [2]
+ // paint a background rect (with gradient)
+ QLinearGradient gradient(frame.topLeft(), frame.topLeft() + QPointF(200,200));
+ stops << QGradientStop(0.0, QColor(60, 60, 60));
+ stops << QGradientStop(frame.height()/2/frame.height(), QColor(102, 176, 54));
+
+ //stops << QGradientStop(((frame.height() + h)/2 )/frame.height(), QColor(157, 195, 55));
+ stops << QGradientStop(1.0, QColor(215, 215, 215));
+ gradient.setStops(stops);
+ painter->setBrush(QBrush(gradient));
+ painter->drawRoundedRect(frame, 10.0, 10.0);
+
+ // paint a rect around the pixmap (with gradient)
+ QPointF pixpos = frame.center() - (QPointF(w, h)/2);
+ QRectF innerFrame(pixpos, QSizeF(w, h));
+ innerFrame.adjust(-4, -4, +4, +4);
+ gradient.setStart(innerFrame.topLeft());
+ gradient.setFinalStop(innerFrame.bottomRight());
+ stops.clear();
+ stops << QGradientStop(0.0, QColor(215, 255, 200));
+ stops << QGradientStop(0.5, QColor(102, 176, 54));
+ stops << QGradientStop(1.0, QColor(0, 0, 0));
+ gradient.setStops(stops);
+ painter->setBrush(QBrush(gradient));
+ painter->drawRoundedRect(innerFrame, 10.0, 10.0);
+ painter->drawPixmap(pixpos, *pix);
+}
+//! [2]
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
new file mode 100644
index 0000000..cbda636
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LAYOUTITEM_H
+#define LAYOUTITEM_H
+#include <QtGui>
+
+//! [0]
+class LayoutItem : public QGraphicsWidget
+{
+ Q_OBJECT
+
+public:
+ LayoutItem(QGraphicsItem *parent = 0);
+ ~LayoutItem();
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget = 0);
+
+private:
+ QPixmap *pix;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/basicgraphicslayouts/main.cpp b/examples/graphicsview/basicgraphicslayouts/main.cpp
new file mode 100644
index 0000000..720f6ff
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QGraphicsScene scene;
+
+ Window *window = new Window;
+ scene.addItem(window);
+ QGraphicsView view(&scene);
+ view.resize(600, 600);
+ view.show();
+
+ return app.exec();
+}
diff --git a/examples/graphicsview/basicgraphicslayouts/window.cpp b/examples/graphicsview/basicgraphicslayouts/window.cpp
new file mode 100644
index 0000000..afa98eb
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/window.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+#include "layoutitem.h"
+
+Window::Window(QGraphicsWidget *parent) : QGraphicsWidget(parent, Qt::Window)
+{
+//! [0]
+ QGraphicsLinearLayout *windowLayout = new QGraphicsLinearLayout(Qt::Vertical);
+ QGraphicsLinearLayout *linear = new QGraphicsLinearLayout(windowLayout);
+ LayoutItem *item = new LayoutItem;
+ linear->addItem(item);
+ linear->setStretchFactor(item, 1);
+//! [0]
+
+//! [1]
+ item = new LayoutItem;
+ linear->addItem(item);
+ linear->setStretchFactor(item, 3);
+ windowLayout->addItem(linear);
+//! [1]
+
+//! [2]
+ QGraphicsGridLayout *grid = new QGraphicsGridLayout(windowLayout);
+ item = new LayoutItem;
+ grid->addItem(item, 0, 0, 4, 1);
+ item = new LayoutItem;
+ item->setMaximumHeight(item->minimumHeight());
+ grid->addItem(item, 0, 1, 2, 1, Qt::AlignVCenter);
+ item = new LayoutItem;
+ item->setMaximumHeight(item->minimumHeight());
+ grid->addItem(item, 2, 1, 2, 1, Qt::AlignVCenter);
+ item = new LayoutItem;
+ grid->addItem(item, 0, 2);
+ item = new LayoutItem;
+ grid->addItem(item, 1, 2);
+ item = new LayoutItem;
+ grid->addItem(item, 2, 2);
+ item = new LayoutItem;
+ grid->addItem(item, 3, 2);
+ windowLayout->addItem(grid);
+//! [2]
+
+//! [3]
+ setLayout(windowLayout);
+ setWindowTitle(tr("Basic Graphics Layouts Example"));
+//! [3]
+
+}
+
+
+
diff --git a/examples/graphicsview/basicgraphicslayouts/window.h b/examples/graphicsview/basicgraphicslayouts/window.h
new file mode 100644
index 0000000..0ecde8a
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/window.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QtGui/QGraphicsWidget>
+
+//! [0]
+class Window : public QGraphicsWidget {
+ Q_OBJECT
+
+public:
+ Window(QGraphicsWidget *parent = 0);
+
+};
+//! [0]
+
+#endif //WINDOW_H
+
diff --git a/examples/graphicsview/collidingmice/collidingmice.pro b/examples/graphicsview/collidingmice/collidingmice.pro
new file mode 100644
index 0000000..77543b5
--- /dev/null
+++ b/examples/graphicsview/collidingmice/collidingmice.pro
@@ -0,0 +1,14 @@
+HEADERS += \
+ mouse.h
+SOURCES += \
+ main.cpp \
+ mouse.cpp
+
+RESOURCES += \
+ mice.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/collidingmice
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS collidingmice.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/collidingmice
+INSTALLS += target sources
diff --git a/examples/graphicsview/collidingmice/images/cheese.jpg b/examples/graphicsview/collidingmice/images/cheese.jpg
new file mode 100644
index 0000000..dea5795
--- /dev/null
+++ b/examples/graphicsview/collidingmice/images/cheese.jpg
Binary files differ
diff --git a/examples/graphicsview/collidingmice/main.cpp b/examples/graphicsview/collidingmice/main.cpp
new file mode 100644
index 0000000..4a44481
--- /dev/null
+++ b/examples/graphicsview/collidingmice/main.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mouse.h"
+
+#include <QtGui>
+
+#include <math.h>
+
+static const int MouseCount = 7;
+
+//! [0]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+//! [0]
+
+//! [1]
+ QGraphicsScene scene;
+ scene.setSceneRect(-300, -300, 600, 600);
+//! [1] //! [2]
+ scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+//! [2]
+
+//! [3]
+ for (int i = 0; i < MouseCount; ++i) {
+ Mouse *mouse = new Mouse;
+ mouse->setPos(::sin((i * 6.28) / MouseCount) * 200,
+ ::cos((i * 6.28) / MouseCount) * 200);
+ scene.addItem(mouse);
+ }
+//! [3]
+
+//! [4]
+ QGraphicsView view(&scene);
+ view.setRenderHint(QPainter::Antialiasing);
+ view.setBackgroundBrush(QPixmap(":/images/cheese.jpg"));
+//! [4] //! [5]
+ view.setCacheMode(QGraphicsView::CacheBackground);
+ view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ view.setDragMode(QGraphicsView::ScrollHandDrag);
+//! [5] //! [6]
+ view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Colliding Mice"));
+ view.resize(400, 300);
+ view.show();
+
+ return app.exec();
+}
+//! [6]
diff --git a/examples/graphicsview/collidingmice/mice.qrc b/examples/graphicsview/collidingmice/mice.qrc
new file mode 100644
index 0000000..accdb4d
--- /dev/null
+++ b/examples/graphicsview/collidingmice/mice.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>images/cheese.jpg</file>
+ </qresource>
+</RCC>
diff --git a/examples/graphicsview/collidingmice/mouse.cpp b/examples/graphicsview/collidingmice/mouse.cpp
new file mode 100644
index 0000000..1d10574
--- /dev/null
+++ b/examples/graphicsview/collidingmice/mouse.cpp
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mouse.h"
+
+#include <QGraphicsScene>
+#include <QPainter>
+#include <QStyleOption>
+
+#include <math.h>
+
+static const double Pi = 3.14159265358979323846264338327950288419717;
+static double TwoPi = 2.0 * Pi;
+
+static qreal normalizeAngle(qreal angle)
+{
+ while (angle < 0)
+ angle += TwoPi;
+ while (angle > TwoPi)
+ angle -= TwoPi;
+ return angle;
+}
+
+//! [0]
+Mouse::Mouse()
+ : angle(0), speed(0), mouseEyeDirection(0),
+ color(qrand() % 256, qrand() % 256, qrand() % 256)
+{
+ rotate(qrand() % (360 * 16));
+ startTimer(1000 / 33);
+}
+//! [0]
+
+//! [1]
+QRectF Mouse::boundingRect() const
+{
+ qreal adjust = 0.5;
+ return QRectF(-18 - adjust, -22 - adjust,
+ 36 + adjust, 60 + adjust);
+}
+//! [1]
+
+//! [2]
+QPainterPath Mouse::shape() const
+{
+ QPainterPath path;
+ path.addRect(-10, -20, 20, 40);
+ return path;
+}
+//! [2]
+
+//! [3]
+void Mouse::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ // Body
+ painter->setBrush(color);
+ painter->drawEllipse(-10, -20, 20, 40);
+
+ // Eyes
+ painter->setBrush(Qt::white);
+ painter->drawEllipse(-10, -17, 8, 8);
+ painter->drawEllipse(2, -17, 8, 8);
+
+ // Nose
+ painter->setBrush(Qt::black);
+ painter->drawEllipse(QRectF(-2, -22, 4, 4));
+
+ // Pupils
+ painter->drawEllipse(QRectF(-8.0 + mouseEyeDirection, -17, 4, 4));
+ painter->drawEllipse(QRectF(4.0 + mouseEyeDirection, -17, 4, 4));
+
+ // Ears
+ painter->setBrush(scene()->collidingItems(this).isEmpty() ? Qt::darkYellow : Qt::red);
+ painter->drawEllipse(-17, -12, 16, 16);
+ painter->drawEllipse(1, -12, 16, 16);
+
+ // Tail
+ QPainterPath path(QPointF(0, 20));
+ path.cubicTo(-5, 22, -5, 22, 0, 25);
+ path.cubicTo(5, 27, 5, 32, 0, 30);
+ path.cubicTo(-5, 32, -5, 42, 0, 35);
+ painter->setBrush(Qt::NoBrush);
+ painter->drawPath(path);
+}
+//! [3]
+
+//! [4]
+void Mouse::timerEvent(QTimerEvent *)
+{
+//! [4]
+ // Don't move too far away
+//! [5]
+ QLineF lineToCenter(QPointF(0, 0), mapFromScene(0, 0));
+ if (lineToCenter.length() > 150) {
+ qreal angleToCenter = ::acos(lineToCenter.dx() / lineToCenter.length());
+ if (lineToCenter.dy() < 0)
+ angleToCenter = TwoPi - angleToCenter;
+ angleToCenter = normalizeAngle((Pi - angleToCenter) + Pi / 2);
+
+ if (angleToCenter < Pi && angleToCenter > Pi / 4) {
+ // Rotate left
+ angle += (angle < -Pi / 2) ? 0.25 : -0.25;
+ } else if (angleToCenter >= Pi && angleToCenter < (Pi + Pi / 2 + Pi / 4)) {
+ // Rotate right
+ angle += (angle < Pi / 2) ? 0.25 : -0.25;
+ }
+ } else if (::sin(angle) < 0) {
+ angle += 0.25;
+ } else if (::sin(angle) > 0) {
+ angle -= 0.25;
+//! [5] //! [6]
+ }
+//! [6]
+
+ // Try not to crash with any other mice
+//! [7]
+ QList<QGraphicsItem *> dangerMice = scene()->items(QPolygonF()
+ << mapToScene(0, 0)
+ << mapToScene(-30, -50)
+ << mapToScene(30, -50));
+ foreach (QGraphicsItem *item, dangerMice) {
+ if (item == this)
+ continue;
+
+ QLineF lineToMouse(QPointF(0, 0), mapFromItem(item, 0, 0));
+ qreal angleToMouse = ::acos(lineToMouse.dx() / lineToMouse.length());
+ if (lineToMouse.dy() < 0)
+ angleToMouse = TwoPi - angleToMouse;
+ angleToMouse = normalizeAngle((Pi - angleToMouse) + Pi / 2);
+
+ if (angleToMouse >= 0 && angleToMouse < Pi / 2) {
+ // Rotate right
+ angle += 0.5;
+ } else if (angleToMouse <= TwoPi && angleToMouse > (TwoPi - Pi / 2)) {
+ // Rotate left
+ angle -= 0.5;
+//! [7] //! [8]
+ }
+//! [8] //! [9]
+ }
+//! [9]
+
+ // Add some random movement
+//! [10]
+ if (dangerMice.size() > 1 && (qrand() % 10) == 0) {
+ if (qrand() % 1)
+ angle += (qrand() % 100) / 500.0;
+ else
+ angle -= (qrand() % 100) / 500.0;
+ }
+//! [10]
+
+//! [11]
+ speed += (-50 + qrand() % 100) / 100.0;
+
+ qreal dx = ::sin(angle) * 10;
+ mouseEyeDirection = (qAbs(dx / 5) < 1) ? 0 : dx / 5;
+
+ rotate(dx);
+ setPos(mapToParent(0, -(3 + sin(speed) * 3)));
+}
+//! [11]
diff --git a/examples/graphicsview/collidingmice/mouse.h b/examples/graphicsview/collidingmice/mouse.h
new file mode 100644
index 0000000..832ea53
--- /dev/null
+++ b/examples/graphicsview/collidingmice/mouse.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MOUSE_H
+#define MOUSE_H
+
+#include <QGraphicsItem>
+#include <QObject>
+
+//! [0]
+class Mouse : public QObject, public QGraphicsItem
+{
+ Q_OBJECT
+
+public:
+ Mouse();
+
+ QRectF boundingRect() const;
+ QPainterPath shape() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget);
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private:
+ qreal angle;
+ qreal speed;
+ qreal mouseEyeDirection;
+ QColor color;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/diagramscene/arrow.cpp b/examples/graphicsview/diagramscene/arrow.cpp
new file mode 100644
index 0000000..0bc2ca8
--- /dev/null
+++ b/examples/graphicsview/diagramscene/arrow.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "arrow.h"
+#include <math.h>
+
+const qreal Pi = 3.14;
+
+//! [0]
+Arrow::Arrow(DiagramItem *startItem, DiagramItem *endItem,
+ QGraphicsItem *parent, QGraphicsScene *scene)
+ : QGraphicsLineItem(parent, scene)
+{
+ myStartItem = startItem;
+ myEndItem = endItem;
+ setFlag(QGraphicsItem::ItemIsSelectable, true);
+ myColor = Qt::black;
+ setPen(QPen(myColor, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+}
+//! [0]
+
+//! [1]
+QRectF Arrow::boundingRect() const
+{
+ qreal extra = (pen().width() + 20) / 2.0;
+
+ return QRectF(line().p1(), QSizeF(line().p2().x() - line().p1().x(),
+ line().p2().y() - line().p1().y()))
+ .normalized()
+ .adjusted(-extra, -extra, extra, extra);
+}
+//! [1]
+
+//! [2]
+QPainterPath Arrow::shape() const
+{
+ QPainterPath path = QGraphicsLineItem::shape();
+ path.addPolygon(arrowHead);
+ return path;
+}
+//! [2]
+
+//! [3]
+void Arrow::updatePosition()
+{
+ QLineF line(mapFromItem(myStartItem, 0, 0), mapFromItem(myEndItem, 0, 0));
+ setLine(line);
+}
+//! [3]
+
+//! [4]
+void Arrow::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
+ QWidget *)
+{
+ if (myStartItem->collidesWithItem(myEndItem))
+ return;
+
+ QPen myPen = pen();
+ myPen.setColor(myColor);
+ qreal arrowSize = 20;
+ painter->setPen(myPen);
+ painter->setBrush(myColor);
+//! [4] //! [5]
+
+ QLineF centerLine(myStartItem->pos(), myEndItem->pos());
+ QPolygonF endPolygon = myEndItem->polygon();
+ QPointF p1 = endPolygon.first() + myEndItem->pos();
+ QPointF p2;
+ QPointF intersectPoint;
+ QLineF polyLine;
+ for (int i = 1; i < endPolygon.count(); ++i) {
+ p2 = endPolygon.at(i) + myEndItem->pos();
+ polyLine = QLineF(p1, p2);
+ QLineF::IntersectType intersectType =
+ polyLine.intersect(centerLine, &intersectPoint);
+ if (intersectType == QLineF::BoundedIntersection)
+ break;
+ p1 = p2;
+ }
+
+ setLine(QLineF(intersectPoint, myStartItem->pos()));
+//! [5] //! [6]
+
+ double angle = ::acos(line().dx() / line().length());
+ if (line().dy() >= 0)
+ angle = (Pi * 2) - angle;
+
+ QPointF arrowP1 = line().p1() + QPointF(sin(angle + Pi / 3) * arrowSize,
+ cos(angle + Pi / 3) * arrowSize);
+ QPointF arrowP2 = line().p1() + QPointF(sin(angle + Pi - Pi / 3) * arrowSize,
+ cos(angle + Pi - Pi / 3) * arrowSize);
+
+ arrowHead.clear();
+ arrowHead << line().p1() << arrowP1 << arrowP2;
+//! [6] //! [7]
+ painter->drawLine(line());
+ painter->drawPolygon(arrowHead);
+ if (isSelected()) {
+ painter->setPen(QPen(myColor, 1, Qt::DashLine));
+ QLineF myLine = line();
+ myLine.translate(0, 4.0);
+ painter->drawLine(myLine);
+ myLine.translate(0,-8.0);
+ painter->drawLine(myLine);
+ }
+}
+//! [7]
diff --git a/examples/graphicsview/diagramscene/arrow.h b/examples/graphicsview/diagramscene/arrow.h
new file mode 100644
index 0000000..f624eb1
--- /dev/null
+++ b/examples/graphicsview/diagramscene/arrow.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ARROW_H
+#define ARROW_H
+
+#include <QGraphicsLineItem>
+
+#include "diagramitem.h"
+
+QT_BEGIN_NAMESPACE
+class QGraphicsPolygonItem;
+class QGraphicsLineItem;
+class QGraphicsScene;
+class QRectF;
+class QGraphicsSceneMouseEvent;
+class QPainterPath;
+QT_END_NAMESPACE
+
+//! [0]
+class Arrow : public QGraphicsLineItem
+{
+public:
+ enum { Type = UserType + 4 };
+
+ Arrow(DiagramItem *startItem, DiagramItem *endItem,
+ QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
+
+ int type() const
+ { return Type; }
+ QRectF boundingRect() const;
+ QPainterPath shape() const;
+ void setColor(const QColor &color)
+ { myColor = color; }
+ DiagramItem *startItem() const
+ { return myStartItem; }
+ DiagramItem *endItem() const
+ { return myEndItem; }
+
+
+public slots:
+ void updatePosition();
+
+protected:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget = 0);
+
+private:
+ DiagramItem *myStartItem;
+ DiagramItem *myEndItem;
+ QColor myColor;
+ QPolygonF arrowHead;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/diagramscene/diagramitem.cpp b/examples/graphicsview/diagramscene/diagramitem.cpp
new file mode 100644
index 0000000..b31f6b5
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramitem.cpp
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "diagramitem.h"
+#include "arrow.h"
+
+//! [0]
+DiagramItem::DiagramItem(DiagramType diagramType, QMenu *contextMenu,
+ QGraphicsItem *parent, QGraphicsScene *scene)
+ : QGraphicsPolygonItem(parent, scene)
+{
+ myDiagramType = diagramType;
+ myContextMenu = contextMenu;
+
+ QPainterPath path;
+ switch (myDiagramType) {
+ case StartEnd:
+ path.moveTo(200, 50);
+ path.arcTo(150, 0, 50, 50, 0, 90);
+ path.arcTo(50, 0, 50, 50, 90, 90);
+ path.arcTo(50, 50, 50, 50, 180, 90);
+ path.arcTo(150, 50, 50, 50, 270, 90);
+ path.lineTo(200, 25);
+ myPolygon = path.toFillPolygon();
+ break;
+ case Conditional:
+ myPolygon << QPointF(-100, 0) << QPointF(0, 100)
+ << QPointF(100, 0) << QPointF(0, -100)
+ << QPointF(-100, 0);
+ break;
+ case Step:
+ myPolygon << QPointF(-100, -100) << QPointF(100, -100)
+ << QPointF(100, 100) << QPointF(-100, 100)
+ << QPointF(-100, -100);
+ break;
+ default:
+ myPolygon << QPointF(-120, -80) << QPointF(-70, 80)
+ << QPointF(120, 80) << QPointF(70, -80)
+ << QPointF(-120, -80);
+ break;
+ }
+ setPolygon(myPolygon);
+ setFlag(QGraphicsItem::ItemIsMovable, true);
+ setFlag(QGraphicsItem::ItemIsSelectable, true);
+}
+//! [0]
+
+//! [1]
+void DiagramItem::removeArrow(Arrow *arrow)
+{
+ int index = arrows.indexOf(arrow);
+
+ if (index != -1)
+ arrows.removeAt(index);
+}
+//! [1]
+
+//! [2]
+void DiagramItem::removeArrows()
+{
+ foreach (Arrow *arrow, arrows) {
+ arrow->startItem()->removeArrow(arrow);
+ arrow->endItem()->removeArrow(arrow);
+ scene()->removeItem(arrow);
+ delete arrow;
+ }
+}
+//! [2]
+
+//! [3]
+void DiagramItem::addArrow(Arrow *arrow)
+{
+ arrows.append(arrow);
+}
+//! [3]
+
+//! [4]
+QPixmap DiagramItem::image() const
+{
+ QPixmap pixmap(250, 250);
+ pixmap.fill(Qt::transparent);
+ QPainter painter(&pixmap);
+ painter.setPen(QPen(Qt::black, 8));
+ painter.translate(125, 125);
+ painter.drawPolyline(myPolygon);
+
+ return pixmap;
+}
+//! [4]
+
+//! [5]
+void DiagramItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
+{
+ scene()->clearSelection();
+ setSelected(true);
+ myContextMenu->exec(event->screenPos());
+}
+//! [5]
+
+//! [6]
+QVariant DiagramItem::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ if (change == QGraphicsItem::ItemPositionChange) {
+ foreach (Arrow *arrow, arrows) {
+ arrow->updatePosition();
+ }
+ }
+
+ return value;
+}
+//! [6]
diff --git a/examples/graphicsview/diagramscene/diagramitem.h b/examples/graphicsview/diagramscene/diagramitem.h
new file mode 100644
index 0000000..5409f20
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramitem.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIAGRAMITEM_H
+#define DIAGRAMITEM_H
+
+#include <QGraphicsPixmapItem>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+class QPixmap;
+class QGraphicsItem;
+class QGraphicsScene;
+class QTextEdit;
+class QGraphicsSceneMouseEvent;
+class QMenu;
+class QGraphicsSceneContextMenuEvent;
+class QPainter;
+class QStyleOptionGraphicsItem;
+class QWidget;
+class QPolygonF;
+QT_END_NAMESPACE
+
+class Arrow;
+
+//! [0]
+class DiagramItem : public QGraphicsPolygonItem
+{
+public:
+ enum { Type = UserType + 15 };
+ enum DiagramType { Step, Conditional, StartEnd, Io };
+
+ DiagramItem(DiagramType diagramType, QMenu *contextMenu,
+ QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
+
+ void removeArrow(Arrow *arrow);
+ void removeArrows();
+ DiagramType diagramType() const
+ { return myDiagramType; }
+ QPolygonF polygon() const
+ { return myPolygon; }
+ void addArrow(Arrow *arrow);
+ QPixmap image() const;
+ int type() const
+ { return Type;}
+
+protected:
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+private:
+ DiagramType myDiagramType;
+ QPolygonF myPolygon;
+ QMenu *myContextMenu;
+ QList<Arrow *> arrows;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/diagramscene/diagramscene.cpp b/examples/graphicsview/diagramscene/diagramscene.cpp
new file mode 100644
index 0000000..8065ec5
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramscene.cpp
@@ -0,0 +1,241 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "diagramscene.h"
+#include "arrow.h"
+
+//! [0]
+DiagramScene::DiagramScene(QMenu *itemMenu, QObject *parent)
+ : QGraphicsScene(parent)
+{
+ myItemMenu = itemMenu;
+ myMode = MoveItem;
+ myItemType = DiagramItem::Step;
+ line = 0;
+ textItem = 0;
+ myItemColor = Qt::white;
+ myTextColor = Qt::black;
+ myLineColor = Qt::black;
+}
+//! [0]
+
+//! [1]
+void DiagramScene::setLineColor(const QColor &color)
+{
+ myLineColor = color;
+ if (isItemChange(Arrow::Type)) {
+ Arrow *item =
+ qgraphicsitem_cast<Arrow *>(selectedItems().first());
+ item->setColor(myLineColor);
+ update();
+ }
+}
+//! [1]
+
+//! [2]
+void DiagramScene::setTextColor(const QColor &color)
+{
+ myTextColor = color;
+ if (isItemChange(DiagramTextItem::Type)) {
+ DiagramTextItem *item =
+ qgraphicsitem_cast<DiagramTextItem *>(selectedItems().first());
+ item->setDefaultTextColor(myTextColor);
+ }
+}
+//! [2]
+
+//! [3]
+void DiagramScene::setItemColor(const QColor &color)
+{
+ myItemColor = color;
+ if (isItemChange(DiagramItem::Type)) {
+ DiagramItem *item =
+ qgraphicsitem_cast<DiagramItem *>(selectedItems().first());
+ item->setBrush(myItemColor);
+ }
+}
+//! [3]
+
+//! [4]
+void DiagramScene::setFont(const QFont &font)
+{
+ myFont = font;
+
+ if (isItemChange(DiagramTextItem::Type)) {
+ QGraphicsTextItem *item =
+ qgraphicsitem_cast<DiagramTextItem *>(selectedItems().first());
+ //At this point the selection can change so the first selected item might not be a DiagramTextItem
+ if (item)
+ item->setFont(myFont);
+ }
+}
+//! [4]
+
+void DiagramScene::setMode(Mode mode)
+{
+ myMode = mode;
+}
+
+void DiagramScene::setItemType(DiagramItem::DiagramType type)
+{
+ myItemType = type;
+}
+
+//! [5]
+void DiagramScene::editorLostFocus(DiagramTextItem *item)
+{
+ QTextCursor cursor = item->textCursor();
+ cursor.clearSelection();
+ item->setTextCursor(cursor);
+
+ if (item->toPlainText().isEmpty()) {
+ removeItem(item);
+ item->deleteLater();
+ }
+}
+//! [5]
+
+//! [6]
+void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
+{
+ if (mouseEvent->button() != Qt::LeftButton)
+ return;
+
+ DiagramItem *item;
+ switch (myMode) {
+ case InsertItem:
+ item = new DiagramItem(myItemType, myItemMenu);
+ item->setBrush(myItemColor);
+ addItem(item);
+ item->setPos(mouseEvent->scenePos());
+ emit itemInserted(item);
+ break;
+//! [6] //! [7]
+ case InsertLine:
+ line = new QGraphicsLineItem(QLineF(mouseEvent->scenePos(),
+ mouseEvent->scenePos()));
+ line->setPen(QPen(myLineColor, 2));
+ addItem(line);
+ break;
+//! [7] //! [8]
+ case InsertText:
+ textItem = new DiagramTextItem();
+ textItem->setFont(myFont);
+ textItem->setTextInteractionFlags(Qt::TextEditorInteraction);
+ textItem->setZValue(1000.0);
+ connect(textItem, SIGNAL(lostFocus(DiagramTextItem *)),
+ this, SLOT(editorLostFocus(DiagramTextItem *)));
+ connect(textItem, SIGNAL(selectedChange(QGraphicsItem *)),
+ this, SIGNAL(itemSelected(QGraphicsItem *)));
+ addItem(textItem);
+ textItem->setDefaultTextColor(myTextColor);
+ textItem->setPos(mouseEvent->scenePos());
+ emit textInserted(textItem);
+//! [8] //! [9]
+ default:
+ ;
+ }
+ QGraphicsScene::mousePressEvent(mouseEvent);
+}
+//! [9]
+
+//! [10]
+void DiagramScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
+{
+ if (myMode == InsertLine && line != 0) {
+ QLineF newLine(line->line().p1(), mouseEvent->scenePos());
+ line->setLine(newLine);
+ } else if (myMode == MoveItem) {
+ QGraphicsScene::mouseMoveEvent(mouseEvent);
+ }
+}
+//! [10]
+
+//! [11]
+void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
+{
+ if (line != 0 && myMode == InsertLine) {
+ QList<QGraphicsItem *> startItems = items(line->line().p1());
+ if (startItems.count() && startItems.first() == line)
+ startItems.removeFirst();
+ QList<QGraphicsItem *> endItems = items(line->line().p2());
+ if (endItems.count() && endItems.first() == line)
+ endItems.removeFirst();
+
+ removeItem(line);
+ delete line;
+//! [11] //! [12]
+
+ if (startItems.count() > 0 && endItems.count() > 0 &&
+ startItems.first()->type() == DiagramItem::Type &&
+ endItems.first()->type() == DiagramItem::Type &&
+ startItems.first() != endItems.first()) {
+ DiagramItem *startItem =
+ qgraphicsitem_cast<DiagramItem *>(startItems.first());
+ DiagramItem *endItem =
+ qgraphicsitem_cast<DiagramItem *>(endItems.first());
+ Arrow *arrow = new Arrow(startItem, endItem);
+ arrow->setColor(myLineColor);
+ startItem->addArrow(arrow);
+ endItem->addArrow(arrow);
+ arrow->setZValue(-1000.0);
+ addItem(arrow);
+ arrow->updatePosition();
+ }
+ }
+//! [12] //! [13]
+ line = 0;
+ QGraphicsScene::mouseReleaseEvent(mouseEvent);
+}
+//! [13]
+
+//! [14]
+bool DiagramScene::isItemChange(int type)
+{
+ foreach (QGraphicsItem *item, selectedItems()) {
+ if (item->type() == type)
+ return true;
+ }
+ return false;
+}
+//! [14]
diff --git a/examples/graphicsview/diagramscene/diagramscene.h b/examples/graphicsview/diagramscene/diagramscene.h
new file mode 100644
index 0000000..e33ee4f
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramscene.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIAGRAMSCENE_H
+#define DIAGRAMSCENE_H
+
+#include <QGraphicsScene>
+#include "diagramitem.h"
+#include "diagramtextitem.h"
+
+QT_BEGIN_NAMESPACE
+class QGraphicsSceneMouseEvent;
+class QMenu;
+class QPointF;
+class QGraphicsLineItem;
+class QFont;
+class QGraphicsTextItem;
+class QColor;
+QT_END_NAMESPACE
+
+//! [0]
+class DiagramScene : public QGraphicsScene
+{
+ Q_OBJECT
+
+public:
+ enum Mode { InsertItem, InsertLine, InsertText, MoveItem };
+
+ DiagramScene(QMenu *itemMenu, QObject *parent = 0);
+ QFont font() const
+ { return myFont; }
+ QColor textColor() const
+ { return myTextColor; }
+ QColor itemColor() const
+ { return myItemColor; }
+ QColor lineColor() const
+ { return myLineColor; }
+ void setLineColor(const QColor &color);
+ void setTextColor(const QColor &color);
+ void setItemColor(const QColor &color);
+ void setFont(const QFont &font);
+
+public slots:
+ void setMode(Mode mode);
+ void setItemType(DiagramItem::DiagramType type);
+ void editorLostFocus(DiagramTextItem *item);
+
+signals:
+ void itemInserted(DiagramItem *item);
+ void textInserted(QGraphicsTextItem *item);
+ void itemSelected(QGraphicsItem *item);
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent);
+
+private:
+ bool isItemChange(int type);
+
+ DiagramItem::DiagramType myItemType;
+ QMenu *myItemMenu;
+ Mode myMode;
+ bool leftButtonDown;
+ QPointF startPoint;
+ QGraphicsLineItem *line;
+ QFont myFont;
+ DiagramTextItem *textItem;
+ QColor myTextColor;
+ QColor myItemColor;
+ QColor myLineColor;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/diagramscene/diagramscene.pro b/examples/graphicsview/diagramscene/diagramscene.pro
new file mode 100644
index 0000000..fe261bd
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramscene.pro
@@ -0,0 +1,20 @@
+HEADERS = mainwindow.h \
+ diagramitem.h \
+ diagramscene.h \
+ arrow.h \
+ diagramtextitem.h
+SOURCES = mainwindow.cpp \
+ diagramitem.cpp \
+ main.cpp \
+ arrow.cpp \
+ diagramtextitem.cpp \
+ diagramscene.cpp
+RESOURCES = diagramscene.qrc
+
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/diagramscene
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS diagramscene.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/diagramscene
+INSTALLS += target sources
+
diff --git a/examples/graphicsview/diagramscene/diagramscene.qrc b/examples/graphicsview/diagramscene/diagramscene.qrc
new file mode 100644
index 0000000..a111584
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramscene.qrc
@@ -0,0 +1,20 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/pointer.png</file>
+ <file>images/linepointer.png</file>
+ <file>images/textpointer.png</file>
+ <file>images/bold.png</file>
+ <file>images/italic.png</file>
+ <file>images/underline.png</file>
+ <file>images/floodfill.png</file>
+ <file>images/bringtofront.png</file>
+ <file>images/delete.png</file>
+ <file>images/sendtoback.png</file>
+ <file>images/linecolor.png</file>
+ <file>images/background1.png</file>
+ <file>images/background2.png</file>
+ <file>images/background3.png</file>
+ <file>images/background4.png</file>
+</qresource>
+</RCC>
+
diff --git a/examples/graphicsview/diagramscene/diagramtextitem.cpp b/examples/graphicsview/diagramscene/diagramtextitem.cpp
new file mode 100644
index 0000000..008b70f
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramtextitem.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "diagramtextitem.h"
+#include "diagramscene.h"
+
+//! [0]
+DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene)
+ : QGraphicsTextItem(parent, scene)
+{
+ setFlag(QGraphicsItem::ItemIsMovable);
+ setFlag(QGraphicsItem::ItemIsSelectable);
+}
+//! [0]
+
+//! [1]
+QVariant DiagramTextItem::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ if (change == QGraphicsItem::ItemSelectedHasChanged)
+ emit selectedChange(this);
+ return value;
+}
+//! [1]
+
+//! [2]
+void DiagramTextItem::focusOutEvent(QFocusEvent *event)
+{
+ setTextInteractionFlags(Qt::NoTextInteraction);
+ emit lostFocus(this);
+ QGraphicsTextItem::focusOutEvent(event);
+}
+//! [2]
+
+//! [5]
+void DiagramTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (textInteractionFlags() == Qt::NoTextInteraction)
+ setTextInteractionFlags(Qt::TextEditorInteraction);
+ QGraphicsTextItem::mouseDoubleClickEvent(event);
+}
+//! [5]
diff --git a/examples/graphicsview/diagramscene/diagramtextitem.h b/examples/graphicsview/diagramscene/diagramtextitem.h
new file mode 100644
index 0000000..6f0ddcb
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramtextitem.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIAGRAMTEXTITEM_H
+#define DIAGRAMTEXTITEM_H
+
+#include <QGraphicsTextItem>
+#include <QPen>
+
+QT_BEGIN_NAMESPACE
+class QFocusEvent;
+class QGraphicsItem;
+class QGraphicsScene;
+class QGraphicsSceneMouseEvent;
+QT_END_NAMESPACE
+
+//! [0]
+class DiagramTextItem : public QGraphicsTextItem
+{
+ Q_OBJECT
+
+public:
+ enum { Type = UserType + 3 };
+
+ DiagramTextItem(QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
+
+ int type() const
+ { return Type; }
+
+signals:
+ void lostFocus(DiagramTextItem *item);
+ void selectedChange(QGraphicsItem *item);
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+ void focusOutEvent(QFocusEvent *event);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/diagramscene/images/background1.png b/examples/graphicsview/diagramscene/images/background1.png
new file mode 100644
index 0000000..0f93c6b
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/background1.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/background2.png b/examples/graphicsview/diagramscene/images/background2.png
new file mode 100644
index 0000000..1e293db
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/background2.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/background3.png b/examples/graphicsview/diagramscene/images/background3.png
new file mode 100644
index 0000000..3db4f8e
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/background3.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/background4.png b/examples/graphicsview/diagramscene/images/background4.png
new file mode 100644
index 0000000..9c1f3bf
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/background4.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/bold.png b/examples/graphicsview/diagramscene/images/bold.png
new file mode 100644
index 0000000..986e65e
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/bold.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/bringtofront.png b/examples/graphicsview/diagramscene/images/bringtofront.png
new file mode 100644
index 0000000..bda2757
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/bringtofront.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/delete.png b/examples/graphicsview/diagramscene/images/delete.png
new file mode 100644
index 0000000..df2a147
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/delete.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/floodfill.png b/examples/graphicsview/diagramscene/images/floodfill.png
new file mode 100644
index 0000000..54c0dae
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/floodfill.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/italic.png b/examples/graphicsview/diagramscene/images/italic.png
new file mode 100644
index 0000000..9a438b5
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/italic.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/linecolor.png b/examples/graphicsview/diagramscene/images/linecolor.png
new file mode 100644
index 0000000..98a821f
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/linecolor.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/linepointer.png b/examples/graphicsview/diagramscene/images/linepointer.png
new file mode 100644
index 0000000..66933d4
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/linepointer.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/pointer.png b/examples/graphicsview/diagramscene/images/pointer.png
new file mode 100644
index 0000000..0b0b0aa
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/pointer.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/sendtoback.png b/examples/graphicsview/diagramscene/images/sendtoback.png
new file mode 100644
index 0000000..5aa3b0a
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/sendtoback.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/textpointer.png b/examples/graphicsview/diagramscene/images/textpointer.png
new file mode 100644
index 0000000..b25832c
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/textpointer.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/images/underline.png b/examples/graphicsview/diagramscene/images/underline.png
new file mode 100644
index 0000000..9b8209f
--- /dev/null
+++ b/examples/graphicsview/diagramscene/images/underline.png
Binary files differ
diff --git a/examples/graphicsview/diagramscene/main.cpp b/examples/graphicsview/diagramscene/main.cpp
new file mode 100644
index 0000000..4e03074
--- /dev/null
+++ b/examples/graphicsview/diagramscene/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argv, char *args[])
+{
+ Q_INIT_RESOURCE(diagramscene);
+
+ QApplication app(argv, args);
+ MainWindow mainWindow;
+ mainWindow.setGeometry(100, 100, 800, 500);
+ mainWindow.show();
+
+ return app.exec();
+}
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
new file mode 100644
index 0000000..b536a7a
--- /dev/null
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -0,0 +1,651 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QLabel>
+
+#include "mainwindow.h"
+#include "diagramitem.h"
+#include "diagramscene.h"
+#include "diagramtextitem.h"
+
+const int InsertTextButton = 10;
+
+//! [0]
+MainWindow::MainWindow()
+{
+ createActions();
+ createToolBox();
+ createMenus();
+
+ scene = new DiagramScene(itemMenu);
+ scene->setSceneRect(QRectF(0, 0, 5000, 5000));
+ connect(scene, SIGNAL(itemInserted(DiagramItem *)),
+ this, SLOT(itemInserted(DiagramItem *)));
+ connect(scene, SIGNAL(textInserted(QGraphicsTextItem *)),
+ this, SLOT(textInserted(QGraphicsTextItem *)));
+ connect(scene, SIGNAL(itemSelected(QGraphicsItem *)),
+ this, SLOT(itemSelected(QGraphicsItem *)));
+ createToolbars();
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(toolBox);
+ view = new QGraphicsView(scene);
+ layout->addWidget(view);
+
+ QWidget *widget = new QWidget;
+ widget->setLayout(layout);
+
+ setCentralWidget(widget);
+ setWindowTitle(tr("Diagramscene"));
+}
+//! [0]
+
+//! [1]
+void MainWindow::backgroundButtonGroupClicked(QAbstractButton *button)
+{
+ QList<QAbstractButton *> buttons = backgroundButtonGroup->buttons();
+ foreach (QAbstractButton *myButton, buttons) {
+ if (myButton != button)
+ button->setChecked(false);
+ }
+ QString text = button->text();
+ if (text == tr("Blue Grid"))
+ scene->setBackgroundBrush(QPixmap(":/images/background1.png"));
+ else if (text == tr("White Grid"))
+ scene->setBackgroundBrush(QPixmap(":/images/background2.png"));
+ else if (text == tr("Gray Grid"))
+ scene->setBackgroundBrush(QPixmap(":/images/background3.png"));
+ else
+ scene->setBackgroundBrush(QPixmap(":/images/background4.png"));
+
+ scene->update();
+ view->update();
+}
+//! [1]
+
+//! [2]
+void MainWindow::buttonGroupClicked(int id)
+{
+ QList<QAbstractButton *> buttons = buttonGroup->buttons();
+ foreach (QAbstractButton *button, buttons) {
+ if (buttonGroup->button(id) != button)
+ button->setChecked(false);
+ }
+ if (id == InsertTextButton) {
+ scene->setMode(DiagramScene::InsertText);
+ } else {
+ scene->setItemType(DiagramItem::DiagramType(id));
+ scene->setMode(DiagramScene::InsertItem);
+ }
+}
+//! [2]
+
+//! [3]
+void MainWindow::deleteItem()
+{
+ foreach (QGraphicsItem *item, scene->selectedItems()) {
+ if (item->type() == DiagramItem::Type) {
+ qgraphicsitem_cast<DiagramItem *>(item)->removeArrows();
+ }
+ scene->removeItem(item);
+ }
+}
+//! [3]
+
+//! [4]
+void MainWindow::pointerGroupClicked(int)
+{
+ scene->setMode(DiagramScene::Mode(pointerTypeGroup->checkedId()));
+}
+//! [4]
+
+//! [5]
+void MainWindow::bringToFront()
+{
+ if (scene->selectedItems().isEmpty())
+ return;
+
+ QGraphicsItem *selectedItem = scene->selectedItems().first();
+ QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
+
+ qreal zValue = 0;
+ foreach (QGraphicsItem *item, overlapItems) {
+ if (item->zValue() >= zValue &&
+ item->type() == DiagramItem::Type)
+ zValue = item->zValue() + 0.1;
+ }
+ selectedItem->setZValue(zValue);
+}
+//! [5]
+
+//! [6]
+void MainWindow::sendToBack()
+{
+ if (scene->selectedItems().isEmpty())
+ return;
+
+ QGraphicsItem *selectedItem = scene->selectedItems().first();
+ QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
+
+ qreal zValue = 0;
+ foreach (QGraphicsItem *item, overlapItems) {
+ if (item->zValue() <= zValue &&
+ item->type() == DiagramItem::Type)
+ zValue = item->zValue() - 0.1;
+ }
+ selectedItem->setZValue(zValue);
+}
+//! [6]
+
+//! [7]
+void MainWindow::itemInserted(DiagramItem *item)
+{
+ pointerTypeGroup->button(int(DiagramScene::MoveItem))->setChecked(true);
+ scene->setMode(DiagramScene::Mode(pointerTypeGroup->checkedId()));
+ buttonGroup->button(int(item->diagramType()))->setChecked(false);
+}
+//! [7]
+
+//! [8]
+void MainWindow::textInserted(QGraphicsTextItem *)
+{
+ buttonGroup->button(InsertTextButton)->setChecked(false);
+ scene->setMode(DiagramScene::Mode(pointerTypeGroup->checkedId()));
+}
+//! [8]
+
+//! [9]
+void MainWindow::currentFontChanged(const QFont &)
+{
+ handleFontChange();
+}
+//! [9]
+
+//! [10]
+void MainWindow::fontSizeChanged(const QString &)
+{
+ handleFontChange();
+}
+//! [10]
+
+//! [11]
+void MainWindow::sceneScaleChanged(const QString &scale)
+{
+ double newScale = scale.left(scale.indexOf(tr("%"))).toDouble() / 100.0;
+ QMatrix oldMatrix = view->matrix();
+ view->resetMatrix();
+ view->translate(oldMatrix.dx(), oldMatrix.dy());
+ view->scale(newScale, newScale);
+}
+//! [11]
+
+//! [12]
+void MainWindow::textColorChanged()
+{
+ textAction = qobject_cast<QAction *>(sender());
+ fontColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/textpointer.png",
+ qVariantValue<QColor>(textAction->data())));
+ textButtonTriggered();
+}
+//! [12]
+
+//! [13]
+void MainWindow::itemColorChanged()
+{
+ fillAction = qobject_cast<QAction *>(sender());
+ fillColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/floodfill.png",
+ qVariantValue<QColor>(fillAction->data())));
+ fillButtonTriggered();
+}
+//! [13]
+
+//! [14]
+void MainWindow::lineColorChanged()
+{
+ lineAction = qobject_cast<QAction *>(sender());
+ lineColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/linecolor.png",
+ qVariantValue<QColor>(lineAction->data())));
+ lineButtonTriggered();
+}
+//! [14]
+
+//! [15]
+void MainWindow::textButtonTriggered()
+{
+ scene->setTextColor(qVariantValue<QColor>(textAction->data()));
+}
+//! [15]
+
+//! [16]
+void MainWindow::fillButtonTriggered()
+{
+ scene->setItemColor(qVariantValue<QColor>(fillAction->data()));
+}
+//! [16]
+
+//! [17]
+void MainWindow::lineButtonTriggered()
+{
+ scene->setLineColor(qVariantValue<QColor>(lineAction->data()));
+}
+//! [17]
+
+//! [18]
+void MainWindow::handleFontChange()
+{
+ QFont font = fontCombo->currentFont();
+ font.setPointSize(fontSizeCombo->currentText().toInt());
+ font.setWeight(boldAction->isChecked() ? QFont::Bold : QFont::Normal);
+ font.setItalic(italicAction->isChecked());
+ font.setUnderline(underlineAction->isChecked());
+
+ scene->setFont(font);
+}
+//! [18]
+
+//! [19]
+void MainWindow::itemSelected(QGraphicsItem *item)
+{
+ DiagramTextItem *textItem =
+ qgraphicsitem_cast<DiagramTextItem *>(item);
+
+ QFont font = textItem->font();
+ QColor color = textItem->defaultTextColor();
+ fontCombo->setCurrentFont(font);
+ fontSizeCombo->setEditText(QString().setNum(font.pointSize()));
+ boldAction->setChecked(font.weight() == QFont::Bold);
+ italicAction->setChecked(font.italic());
+ underlineAction->setChecked(font.underline());
+}
+//! [19]
+
+//! [20]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Diagram Scene"),
+ tr("The <b>Diagram Scene</b> example shows "
+ "use of the graphics framework."));
+}
+//! [20]
+
+//! [21]
+void MainWindow::createToolBox()
+{
+ buttonGroup = new QButtonGroup;
+ buttonGroup->setExclusive(false);
+ connect(buttonGroup, SIGNAL(buttonClicked(int)),
+ this, SLOT(buttonGroupClicked(int)));
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(createCellWidget(tr("Conditional"),
+ DiagramItem::Conditional), 0, 0);
+ layout->addWidget(createCellWidget(tr("Process"),
+ DiagramItem::Step),0, 1);
+ layout->addWidget(createCellWidget(tr("Input/Output"),
+ DiagramItem::Io), 1, 0);
+//! [21]
+
+ QToolButton *textButton = new QToolButton;
+ textButton->setCheckable(true);
+ buttonGroup->addButton(textButton, InsertTextButton);
+ textButton->setIcon(QIcon(QPixmap(":/images/textpointer.png")
+ .scaled(30, 30)));
+ textButton->setIconSize(QSize(50, 50));
+ QGridLayout *textLayout = new QGridLayout;
+ textLayout->addWidget(textButton, 0, 0, Qt::AlignHCenter);
+ textLayout->addWidget(new QLabel(tr("Text")), 1, 0, Qt::AlignCenter);
+ QWidget *textWidget = new QWidget;
+ textWidget->setLayout(textLayout);
+ layout->addWidget(textWidget, 1, 1);
+
+ layout->setRowStretch(3, 10);
+ layout->setColumnStretch(2, 10);
+
+ QWidget *itemWidget = new QWidget;
+ itemWidget->setLayout(layout);
+
+ backgroundButtonGroup = new QButtonGroup;
+ connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)),
+ this, SLOT(backgroundButtonGroupClicked(QAbstractButton *)));
+
+ QGridLayout *backgroundLayout = new QGridLayout;
+ backgroundLayout->addWidget(createBackgroundCellWidget(tr("Blue Grid"),
+ ":/images/background1.png"), 0, 0);
+ backgroundLayout->addWidget(createBackgroundCellWidget(tr("White Grid"),
+ ":/images/background2.png"), 0, 1);
+ backgroundLayout->addWidget(createBackgroundCellWidget(tr("Gray Grid"),
+ ":/images/background3.png"), 1, 0);
+ backgroundLayout->addWidget(createBackgroundCellWidget(tr("No Grid"),
+ ":/images/background4.png"), 1, 1);
+
+ backgroundLayout->setRowStretch(2, 10);
+ backgroundLayout->setColumnStretch(2, 10);
+
+ QWidget *backgroundWidget = new QWidget;
+ backgroundWidget->setLayout(backgroundLayout);
+
+
+//! [22]
+ toolBox = new QToolBox;
+ toolBox->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Ignored));
+ toolBox->setMinimumWidth(itemWidget->sizeHint().width());
+ toolBox->addItem(itemWidget, tr("Basic Flowchart Shapes"));
+ toolBox->addItem(backgroundWidget, tr("Backgrounds"));
+}
+//! [22]
+
+//! [23]
+void MainWindow::createActions()
+{
+ toFrontAction = new QAction(QIcon(":/images/bringtofront.png"),
+ tr("Bring to &Front"), this);
+ toFrontAction->setShortcut(tr("Ctrl+F"));
+ toFrontAction->setStatusTip(tr("Bring item to front"));
+ connect(toFrontAction, SIGNAL(triggered()),
+ this, SLOT(bringToFront()));
+//! [23]
+
+ sendBackAction = new QAction(QIcon(":/images/sendtoback.png"),
+ tr("Send to &Back"), this);
+ sendBackAction->setShortcut(tr("Ctrl+B"));
+ sendBackAction->setStatusTip(tr("Send item to back"));
+ connect(sendBackAction, SIGNAL(triggered()),
+ this, SLOT(sendToBack()));
+
+ deleteAction = new QAction(QIcon(":/images/delete.png"),
+ tr("&Delete"), this);
+ deleteAction->setShortcut(tr("Delete"));
+ deleteAction->setStatusTip(tr("Delete item from diagram"));
+ connect(deleteAction, SIGNAL(triggered()),
+ this, SLOT(deleteItem()));
+
+ exitAction = new QAction(tr("E&xit"), this);
+ exitAction->setShortcut(tr("Ctrl+X"));
+ exitAction->setStatusTip(tr("Quit Scenediagram example"));
+ connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ boldAction = new QAction(tr("Bold"), this);
+ boldAction->setCheckable(true);
+ QPixmap pixmap(":/images/bold.png");
+ boldAction->setIcon(QIcon(pixmap));
+ boldAction->setShortcut(tr("Ctrl+B"));
+ connect(boldAction, SIGNAL(triggered()),
+ this, SLOT(handleFontChange()));
+
+ italicAction = new QAction(QIcon(":/images/italic.png"),
+ tr("Italic"), this);
+ italicAction->setCheckable(true);
+ italicAction->setShortcut(tr("Ctrl+I"));
+ connect(italicAction, SIGNAL(triggered()),
+ this, SLOT(handleFontChange()));
+
+ underlineAction = new QAction(QIcon(":/images/underline.png"),
+ tr("Underline"), this);
+ underlineAction->setCheckable(true);
+ underlineAction->setShortcut(tr("Ctrl+U"));
+ connect(underlineAction, SIGNAL(triggered()),
+ this, SLOT(handleFontChange()));
+
+ aboutAction = new QAction(tr("A&bout"), this);
+ aboutAction->setShortcut(tr("Ctrl+B"));
+ connect(aboutAction, SIGNAL(triggered()),
+ this, SLOT(about()));
+}
+
+//! [24]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAction);
+
+ itemMenu = menuBar()->addMenu(tr("&Item"));
+ itemMenu->addAction(deleteAction);
+ itemMenu->addSeparator();
+ itemMenu->addAction(toFrontAction);
+ itemMenu->addAction(sendBackAction);
+
+ aboutMenu = menuBar()->addMenu(tr("&Help"));
+ aboutMenu->addAction(aboutAction);
+}
+//! [24]
+
+//! [25]
+void MainWindow::createToolbars()
+{
+//! [25]
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(deleteAction);
+ editToolBar->addAction(toFrontAction);
+ editToolBar->addAction(sendBackAction);
+
+ fontCombo = new QFontComboBox();
+ fontSizeCombo = new QComboBox();
+ connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)),
+ this, SLOT(currentFontChanged(const QFont &)));
+
+ fontSizeCombo = new QComboBox;
+ fontSizeCombo->setEditable(true);
+ for (int i = 8; i < 30; i = i + 2)
+ fontSizeCombo->addItem(QString().setNum(i));
+ QIntValidator *validator = new QIntValidator(2, 64, this);
+ fontSizeCombo->setValidator(validator);
+ connect(fontSizeCombo, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(fontSizeChanged(const QString &)));
+
+ fontColorToolButton = new QToolButton;
+ fontColorToolButton->setPopupMode(QToolButton::MenuButtonPopup);
+ fontColorToolButton->setMenu(createColorMenu(SLOT(textColorChanged()),
+ Qt::black));
+ textAction = fontColorToolButton->menu()->defaultAction();
+ fontColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/textpointer.png", Qt::black));
+ fontColorToolButton->setAutoFillBackground(true);
+ connect(fontColorToolButton, SIGNAL(clicked()),
+ this, SLOT(textButtonTriggered()));
+
+//! [26]
+ fillColorToolButton = new QToolButton;
+ fillColorToolButton->setPopupMode(QToolButton::MenuButtonPopup);
+ fillColorToolButton->setMenu(createColorMenu(SLOT(itemColorChanged()),
+ Qt::white));
+ fillAction = fillColorToolButton->menu()->defaultAction();
+ fillColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/floodfill.png", Qt::white));
+ connect(fillColorToolButton, SIGNAL(clicked()),
+ this, SLOT(fillButtonTriggered()));
+//! [26]
+
+ lineColorToolButton = new QToolButton;
+ lineColorToolButton->setPopupMode(QToolButton::MenuButtonPopup);
+ lineColorToolButton->setMenu(createColorMenu(SLOT(lineColorChanged()),
+ Qt::black));
+ lineAction = lineColorToolButton->menu()->defaultAction();
+ lineColorToolButton->setIcon(createColorToolButtonIcon(
+ ":/images/linecolor.png", Qt::black));
+ connect(lineColorToolButton, SIGNAL(clicked()),
+ this, SLOT(lineButtonTriggered()));
+
+ textToolBar = addToolBar(tr("Font"));
+ textToolBar->addWidget(fontCombo);
+ textToolBar->addWidget(fontSizeCombo);
+ textToolBar->addAction(boldAction);
+ textToolBar->addAction(italicAction);
+ textToolBar->addAction(underlineAction);
+
+ colorToolBar = addToolBar(tr("Color"));
+ colorToolBar->addWidget(fontColorToolButton);
+ colorToolBar->addWidget(fillColorToolButton);
+ colorToolBar->addWidget(lineColorToolButton);
+
+ QToolButton *pointerButton = new QToolButton;
+ pointerButton->setCheckable(true);
+ pointerButton->setChecked(true);
+ pointerButton->setIcon(QIcon(":/images/pointer.png"));
+ QToolButton *linePointerButton = new QToolButton;
+ linePointerButton->setCheckable(true);
+ linePointerButton->setIcon(QIcon(":/images/linepointer.png"));
+
+ pointerTypeGroup = new QButtonGroup;
+ pointerTypeGroup->addButton(pointerButton, int(DiagramScene::MoveItem));
+ pointerTypeGroup->addButton(linePointerButton,
+ int(DiagramScene::InsertLine));
+ connect(pointerTypeGroup, SIGNAL(buttonClicked(int)),
+ this, SLOT(pointerGroupClicked(int)));
+
+ sceneScaleCombo = new QComboBox;
+ QStringList scales;
+ scales << tr("50%") << tr("75%") << tr("100%") << tr("125%") << tr("150%");
+ sceneScaleCombo->addItems(scales);
+ sceneScaleCombo->setCurrentIndex(2);
+ connect(sceneScaleCombo, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(sceneScaleChanged(const QString &)));
+
+ pointerToolbar = addToolBar(tr("Pointer type"));
+ pointerToolbar->addWidget(pointerButton);
+ pointerToolbar->addWidget(linePointerButton);
+ pointerToolbar->addWidget(sceneScaleCombo);
+//! [27]
+}
+//! [27]
+
+//! [28]
+QWidget *MainWindow::createBackgroundCellWidget(const QString &text,
+ const QString &image)
+{
+ QToolButton *button = new QToolButton;
+ button->setText(text);
+ button->setIcon(QIcon(image));
+ button->setIconSize(QSize(50, 50));
+ button->setCheckable(true);
+ backgroundButtonGroup->addButton(button);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(button, 0, 0, Qt::AlignHCenter);
+ layout->addWidget(new QLabel(text), 1, 0, Qt::AlignCenter);
+
+ QWidget *widget = new QWidget;
+ widget->setLayout(layout);
+
+ return widget;
+}
+//! [28]
+
+//! [29]
+QWidget *MainWindow::createCellWidget(const QString &text,
+ DiagramItem::DiagramType type)
+{
+
+ DiagramItem item(type, itemMenu);
+ QIcon icon(item.image());
+
+ QToolButton *button = new QToolButton;
+ button->setIcon(icon);
+ button->setIconSize(QSize(50, 50));
+ button->setCheckable(true);
+ buttonGroup->addButton(button, int(type));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(button, 0, 0, Qt::AlignHCenter);
+ layout->addWidget(new QLabel(text), 1, 0, Qt::AlignCenter);
+
+ QWidget *widget = new QWidget;
+ widget->setLayout(layout);
+
+ return widget;
+}
+//! [29]
+
+//! [30]
+QMenu *MainWindow::createColorMenu(const char *slot, QColor defaultColor)
+{
+ QList<QColor> colors;
+ colors << Qt::black << Qt::white << Qt::red << Qt::blue << Qt::yellow;
+ QStringList names;
+ names << tr("black") << tr("white") << tr("red") << tr("blue")
+ << tr("yellow");
+
+ QMenu *colorMenu = new QMenu;
+ for (int i = 0; i < colors.count(); ++i) {
+ QAction *action = new QAction(names.at(i), this);
+ action->setData(colors.at(i));
+ action->setIcon(createColorIcon(colors.at(i)));
+ connect(action, SIGNAL(triggered()),
+ this, slot);
+ colorMenu->addAction(action);
+ if (colors.at(i) == defaultColor) {
+ colorMenu->setDefaultAction(action);
+ }
+ }
+ return colorMenu;
+}
+//! [30]
+
+//! [31]
+QIcon MainWindow::createColorToolButtonIcon(const QString &imageFile,
+ QColor color)
+{
+ QPixmap pixmap(50, 80);
+ pixmap.fill(Qt::transparent);
+ QPainter painter(&pixmap);
+ QPixmap image(imageFile);
+ QRect target(0, 0, 50, 60);
+ QRect source(0, 0, 42, 42);
+ painter.fillRect(QRect(0, 60, 50, 80), color);
+ painter.drawPixmap(target, image, source);
+
+ return QIcon(pixmap);
+}
+//! [31]
+
+//! [32]
+QIcon MainWindow::createColorIcon(QColor color)
+{
+ QPixmap pixmap(20, 20);
+ QPainter painter(&pixmap);
+ painter.setPen(Qt::NoPen);
+ painter.fillRect(QRect(0, 0, 20, 20), color);
+
+ return QIcon(pixmap);
+}
+//! [32]
diff --git a/examples/graphicsview/diagramscene/mainwindow.h b/examples/graphicsview/diagramscene/mainwindow.h
new file mode 100644
index 0000000..e4dae4f
--- /dev/null
+++ b/examples/graphicsview/diagramscene/mainwindow.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+#include "diagramitem.h"
+
+class DiagramScene;
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QToolBox;
+class QSpinBox;
+class QComboBox;
+class QFontComboBox;
+class QButtonGroup;
+class QLineEdit;
+class QGraphicsTextItem;
+class QFont;
+class QToolButton;
+class QAbstractButton;
+class QGraphicsView;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void backgroundButtonGroupClicked(QAbstractButton *button);
+ void buttonGroupClicked(int id);
+ void deleteItem();
+ void pointerGroupClicked(int id);
+ void bringToFront();
+ void sendToBack();
+ void itemInserted(DiagramItem *item);
+ void textInserted(QGraphicsTextItem *item);
+ void currentFontChanged(const QFont &font);
+ void fontSizeChanged(const QString &size);
+ void sceneScaleChanged(const QString &scale);
+ void textColorChanged();
+ void itemColorChanged();
+ void lineColorChanged();
+ void textButtonTriggered();
+ void fillButtonTriggered();
+ void lineButtonTriggered();
+ void handleFontChange();
+ void itemSelected(QGraphicsItem *item);
+ void about();
+
+private:
+ void createToolBox();
+ void createActions();
+ void createMenus();
+ void createToolbars();
+ QWidget *createBackgroundCellWidget(const QString &text,
+ const QString &image);
+ QWidget *createCellWidget(const QString &text,
+ DiagramItem::DiagramType type);
+ QMenu *createColorMenu(const char *slot, QColor defaultColor);
+ QIcon createColorToolButtonIcon(const QString &image, QColor color);
+ QIcon createColorIcon(QColor color);
+
+ DiagramScene *scene;
+ QGraphicsView *view;
+
+ QAction *exitAction;
+ QAction *addAction;
+ QAction *deleteAction;
+
+ QAction *toFrontAction;
+ QAction *sendBackAction;
+ QAction *aboutAction;
+
+ QMenu *fileMenu;
+ QMenu *itemMenu;
+ QMenu *aboutMenu;
+
+ QToolBar *textToolBar;
+ QToolBar *editToolBar;
+ QToolBar *colorToolBar;
+ QToolBar *pointerToolbar;
+
+ QComboBox *sceneScaleCombo;
+ QComboBox *itemColorCombo;
+ QComboBox *textColorCombo;
+ QComboBox *fontSizeCombo;
+ QFontComboBox *fontCombo;
+
+ QToolBox *toolBox;
+ QButtonGroup *buttonGroup;
+ QButtonGroup *pointerTypeGroup;
+ QButtonGroup *backgroundButtonGroup;
+ QToolButton *fontColorToolButton;
+ QToolButton *fillColorToolButton;
+ QToolButton *lineColorToolButton;
+ QAction *boldAction;
+ QAction *underlineAction;
+ QAction *italicAction;
+ QAction *textAction;
+ QAction *fillAction;
+ QAction *lineAction;
+};
+//! [0]
+
+#endif
diff --git a/examples/graphicsview/dragdroprobot/coloritem.cpp b/examples/graphicsview/dragdroprobot/coloritem.cpp
new file mode 100644
index 0000000..2d6b145
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/coloritem.cpp
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "coloritem.h"
+
+ColorItem::ColorItem()
+ : color(qrand() % 256, qrand() % 256, qrand() % 256)
+{
+ setToolTip(QString("QColor(%1, %2, %3)\n%4")
+ .arg(color.red()).arg(color.green()).arg(color.blue())
+ .arg("Click and drag this color onto the robot!"));
+ setCursor(Qt::OpenHandCursor);
+}
+
+QRectF ColorItem::boundingRect() const
+{
+ return QRectF(-15.5, -15.5, 34, 34);
+}
+
+void ColorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(Qt::darkGray);
+ painter->drawEllipse(-12, -12, 30, 30);
+ painter->setPen(QPen(Qt::black, 1));
+ painter->setBrush(QBrush(color));
+ painter->drawEllipse(-15, -15, 30, 30);
+}
+
+void ColorItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (event->button() != Qt::LeftButton) {
+ event->ignore();
+ return;
+ }
+
+ setCursor(Qt::ClosedHandCursor);
+}
+
+void ColorItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (QLineF(event->screenPos(), event->buttonDownScreenPos(Qt::LeftButton))
+ .length() < QApplication::startDragDistance()) {
+ return;
+ }
+
+ QDrag *drag = new QDrag(event->widget());
+ QMimeData *mime = new QMimeData;
+ drag->setMimeData(mime);
+
+ static int n = 0;
+ if (n++ > 2 && (qrand() % 3) == 0) {
+ QImage image(":/images/head.png");
+ mime->setImageData(image);
+
+ drag->setPixmap(QPixmap::fromImage(image).scaled(30, 40));
+ drag->setHotSpot(QPoint(15, 30));
+ } else {
+ mime->setColorData(color);
+ mime->setText(QString("#%1%2%3")
+ .arg(color.red(), 2, 16, QLatin1Char('0'))
+ .arg(color.green(), 2, 16, QLatin1Char('0'))
+ .arg(color.blue(), 2, 16, QLatin1Char('0')));
+
+ QPixmap pixmap(34, 34);
+ pixmap.fill(Qt::white);
+
+ QPainter painter(&pixmap);
+ painter.translate(15, 15);
+ painter.setRenderHint(QPainter::Antialiasing);
+ paint(&painter, 0, 0);
+ painter.end();
+
+ pixmap.setMask(pixmap.createHeuristicMask());
+
+ drag->setPixmap(pixmap);
+ drag->setHotSpot(QPoint(15, 20));
+ }
+
+ drag->exec();
+ setCursor(Qt::OpenHandCursor);
+}
+
+void ColorItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+{
+ setCursor(Qt::OpenHandCursor);
+}
diff --git a/examples/graphicsview/dragdroprobot/coloritem.h b/examples/graphicsview/dragdroprobot/coloritem.h
new file mode 100644
index 0000000..67b2c70
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/coloritem.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLORITEM_H
+#define COLORITEM_H
+
+#include <QGraphicsItem>
+
+class ColorItem : public QGraphicsItem
+{
+public:
+ ColorItem();
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+private:
+ QColor color;
+};
+
+#endif
diff --git a/examples/graphicsview/dragdroprobot/dragdroprobot.pro b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
new file mode 100644
index 0000000..769e54a
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
@@ -0,0 +1,18 @@
+HEADERS += \
+ coloritem.h \
+ robot.h
+
+SOURCES += \
+ coloritem.cpp \
+ main.cpp \
+ robot.cpp
+
+RESOURCES += \
+ robot.qrc
+
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/dragdroprobot
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dragdroprobot.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/dragdroprobot
+INSTALLS += target sources
diff --git a/examples/graphicsview/dragdroprobot/images/head.png b/examples/graphicsview/dragdroprobot/images/head.png
new file mode 100644
index 0000000..1e520e0
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/images/head.png
Binary files differ
diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp
new file mode 100644
index 0000000..204305e
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/main.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "coloritem.h"
+#include "robot.h"
+
+#include <math.h>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ QGraphicsScene scene(-200, -200, 400, 400);
+
+ for (int i = 0; i < 10; ++i) {
+ ColorItem *item = new ColorItem;
+ item->setPos(::sin((i * 6.28) / 10.0) * 150,
+ ::cos((i * 6.28) / 10.0) * 150);
+
+ scene.addItem(item);
+ }
+
+ Robot *robot = new Robot;
+ robot->scale(1.2, 1.2);
+ robot->setPos(0, -20);
+ scene.addItem(robot);
+
+ QGraphicsView view(&scene);
+ view.setRenderHint(QPainter::Antialiasing);
+ view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ view.setBackgroundBrush(QColor(230, 200, 167));
+ view.setWindowTitle("Drag and Drop Robot");
+ view.show();
+
+ return app.exec();
+}
diff --git a/examples/graphicsview/dragdroprobot/robot.cpp b/examples/graphicsview/dragdroprobot/robot.cpp
new file mode 100644
index 0000000..c6d8c44
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/robot.cpp
@@ -0,0 +1,273 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "robot.h"
+
+RobotPart::RobotPart(QGraphicsItem *parent)
+ : QGraphicsItem(parent), color(Qt::lightGray), dragOver(false)
+{
+ setAcceptDrops(true);
+}
+
+void RobotPart::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
+{
+ if (event->mimeData()->hasColor()
+ || (qgraphicsitem_cast<RobotHead *>(this) && event->mimeData()->hasImage())) {
+ event->setAccepted(true);
+ dragOver = true;
+ update();
+ } else {
+ event->setAccepted(false);
+ }
+}
+
+void RobotPart::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
+{
+ Q_UNUSED(event);
+ dragOver = false;
+ update();
+}
+
+void RobotPart::dropEvent(QGraphicsSceneDragDropEvent *event)
+{
+ dragOver = false;
+ if (event->mimeData()->hasColor())
+ color = qVariantValue<QColor>(event->mimeData()->colorData());
+ else if (event->mimeData()->hasImage())
+ pixmap = qVariantValue<QPixmap>(event->mimeData()->imageData());
+ update();
+}
+
+RobotHead::RobotHead(QGraphicsItem *parent)
+ : RobotPart(parent)
+{
+}
+
+QRectF RobotHead::boundingRect() const
+{
+ return QRectF(-15, -50, 30, 50);
+}
+
+void RobotHead::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+ if (pixmap.isNull()) {
+ painter->setBrush(dragOver ? color.light(130) : color);
+ painter->drawRoundedRect(-10, -30, 20, 30, 25, 25, Qt::RelativeSize);
+ painter->setBrush(Qt::white);
+ painter->drawEllipse(-7, -3 - 20, 7, 7);
+ painter->drawEllipse(0, -3 - 20, 7, 7);
+ painter->setBrush(Qt::black);
+ painter->drawEllipse(-5, -1 - 20, 2, 2);
+ painter->drawEllipse(2, -1 - 20, 2, 2);
+ painter->setPen(QPen(Qt::black, 2));
+ painter->setBrush(Qt::NoBrush);
+ painter->drawArc(-6, -2 - 20, 12, 15, 190 * 16, 160 * 16);
+ } else {
+ painter->scale(.2272, .2824);
+ painter->drawPixmap(QPointF(-15 * 4.4, -50 * 3.54), pixmap);
+ }
+}
+
+int RobotHead::type() const
+{
+ return Type;
+}
+
+RobotTorso::RobotTorso(QGraphicsItem *parent)
+ : RobotPart(parent)
+{
+}
+
+QRectF RobotTorso::boundingRect() const
+{
+ return QRectF(-30, -20, 60, 60);
+}
+
+void RobotTorso::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->setBrush(dragOver ? color.light(130) : color);
+ painter->drawRoundedRect(-20, -20, 40, 60, 25, 25, Qt::RelativeSize);
+ painter->drawEllipse(-25, -20, 20, 20);
+ painter->drawEllipse(5, -20, 20, 20);
+ painter->drawEllipse(-20, 22, 20, 20);
+ painter->drawEllipse(0, 22, 20, 20);
+}
+
+RobotLimb::RobotLimb(QGraphicsItem *parent)
+ : RobotPart(parent)
+{
+}
+
+QRectF RobotLimb::boundingRect() const
+{
+ return QRectF(-5, -5, 40, 10);
+}
+
+void RobotLimb::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->setBrush(dragOver ? color.light(130) : color);
+ painter->drawRoundedRect(boundingRect(), 50, 50, Qt::RelativeSize);
+ painter->drawEllipse(-5, -5, 10, 10);
+}
+
+Robot::Robot()
+{
+ QGraphicsItem *torsoItem = new RobotTorso(this);
+ QGraphicsItem *headItem = new RobotHead(torsoItem);
+ QGraphicsItem *upperLeftArmItem = new RobotLimb(torsoItem);
+ QGraphicsItem *lowerLeftArmItem = new RobotLimb(upperLeftArmItem);
+ QGraphicsItem *upperRightArmItem = new RobotLimb(torsoItem);
+ QGraphicsItem *lowerRightArmItem = new RobotLimb(upperRightArmItem);
+ QGraphicsItem *upperRightLegItem = new RobotLimb(torsoItem);
+ QGraphicsItem *lowerRightLegItem = new RobotLimb(upperRightLegItem);
+ QGraphicsItem *upperLeftLegItem = new RobotLimb(torsoItem);
+ QGraphicsItem *lowerLeftLegItem = new RobotLimb(upperLeftLegItem);
+
+ headItem->setPos(0, -18);
+ upperLeftArmItem->setPos(-15, -10);
+ lowerLeftArmItem->setPos(30, 0);
+ upperRightArmItem->setPos(15, -10);
+ lowerRightArmItem->setPos(30, 0);
+ upperRightLegItem->setPos(10, 32);
+ lowerRightLegItem->setPos(30, 0);
+ upperLeftLegItem->setPos(-10, 32);
+ lowerLeftLegItem->setPos(30, 0);
+
+ timeLine = new QTimeLine;
+
+ QGraphicsItemAnimation *headAnimation = new QGraphicsItemAnimation;
+ headAnimation->setItem(headItem);
+ headAnimation->setTimeLine(timeLine);
+ headAnimation->setRotationAt(0, 20);
+ headAnimation->setRotationAt(1, -20);
+ headAnimation->setScaleAt(1, 1.1, 1.1);
+
+ QGraphicsItemAnimation *upperLeftArmAnimation = new QGraphicsItemAnimation;
+ upperLeftArmAnimation->setItem(upperLeftArmItem);
+ upperLeftArmAnimation->setTimeLine(timeLine);
+ upperLeftArmAnimation->setRotationAt(0, 190);
+ upperLeftArmAnimation->setRotationAt(1, 180);
+
+ QGraphicsItemAnimation *lowerLeftArmAnimation = new QGraphicsItemAnimation;
+ lowerLeftArmAnimation->setItem(lowerLeftArmItem);
+ lowerLeftArmAnimation->setTimeLine(timeLine);
+ lowerLeftArmAnimation->setRotationAt(0, 50);
+ lowerLeftArmAnimation->setRotationAt(1, 10);
+
+ QGraphicsItemAnimation *upperRightArmAnimation = new QGraphicsItemAnimation;
+ upperRightArmAnimation->setItem(upperRightArmItem);
+ upperRightArmAnimation->setTimeLine(timeLine);
+ upperRightArmAnimation->setRotationAt(0, 300);
+ upperRightArmAnimation->setRotationAt(1, 310);
+
+ QGraphicsItemAnimation *lowerRightArmAnimation = new QGraphicsItemAnimation;
+ lowerRightArmAnimation->setItem(lowerRightArmItem);
+ lowerRightArmAnimation->setTimeLine(timeLine);
+ lowerRightArmAnimation->setRotationAt(0, 0);
+ lowerRightArmAnimation->setRotationAt(1, -70);
+
+ QGraphicsItemAnimation *upperLeftLegAnimation = new QGraphicsItemAnimation;
+ upperLeftLegAnimation->setItem(upperLeftLegItem);
+ upperLeftLegAnimation->setTimeLine(timeLine);
+ upperLeftLegAnimation->setRotationAt(0, 150);
+ upperLeftLegAnimation->setRotationAt(1, 80);
+
+ QGraphicsItemAnimation *lowerLeftLegAnimation = new QGraphicsItemAnimation;
+ lowerLeftLegAnimation->setItem(lowerLeftLegItem);
+ lowerLeftLegAnimation->setTimeLine(timeLine);
+ lowerLeftLegAnimation->setRotationAt(0, 70);
+ lowerLeftLegAnimation->setRotationAt(1, 10);
+
+ QGraphicsItemAnimation *upperRightLegAnimation = new QGraphicsItemAnimation;
+ upperRightLegAnimation->setItem(upperRightLegItem);
+ upperRightLegAnimation->setTimeLine(timeLine);
+ upperRightLegAnimation->setRotationAt(0, 40);
+ upperRightLegAnimation->setRotationAt(1, 120);
+
+ QGraphicsItemAnimation *lowerRightLegAnimation = new QGraphicsItemAnimation;
+ lowerRightLegAnimation->setItem(lowerRightLegItem);
+ lowerRightLegAnimation->setTimeLine(timeLine);
+ lowerRightLegAnimation->setRotationAt(0, 10);
+ lowerRightLegAnimation->setRotationAt(1, 50);
+
+ QGraphicsItemAnimation *torsoAnimation = new QGraphicsItemAnimation;
+ torsoAnimation->setItem(torsoItem);
+ torsoAnimation->setTimeLine(timeLine);
+ torsoAnimation->setRotationAt(0, 5);
+ torsoAnimation->setRotationAt(1, -20);
+
+ timeLine->setUpdateInterval(1000 / 25);
+ timeLine->setCurveShape(QTimeLine::SineCurve);
+ timeLine->setLoopCount(0);
+ timeLine->setDuration(2000);
+ timeLine->start();
+}
+
+Robot::~Robot()
+{
+ delete timeLine;
+}
+
+QRectF Robot::boundingRect() const
+{
+ return QRectF();
+}
+
+void Robot::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(painter);
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+}
diff --git a/examples/graphicsview/dragdroprobot/robot.h b/examples/graphicsview/dragdroprobot/robot.h
new file mode 100644
index 0000000..c0b6d14
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/robot.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ROBOT_H
+#define ROBOT_H
+
+#include <QGraphicsItem>
+
+QT_BEGIN_NAMESPACE
+class QGraphicsSceneMouseEvent;
+class QTimeLine;
+QT_END_NAMESPACE
+
+class RobotPart : public QGraphicsItem
+{
+public:
+ RobotPart(QGraphicsItem *parent = 0);
+
+protected:
+ void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
+ void dropEvent(QGraphicsSceneDragDropEvent *event);
+
+ QPixmap pixmap;
+ QColor color;
+ bool dragOver;
+};
+
+class RobotHead : public RobotPart
+{
+public:
+ RobotHead(QGraphicsItem *parent = 0);
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+ enum { Type = UserType + 1 };
+ int type() const;
+};
+
+class RobotTorso : public RobotPart
+{
+public:
+ RobotTorso(QGraphicsItem *parent = 0);
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+};
+
+class RobotLimb : public RobotPart
+{
+public:
+ RobotLimb(QGraphicsItem *parent = 0);
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+};
+
+class Robot : public RobotPart
+{
+public:
+ Robot();
+ ~Robot();
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+
+private:
+ QTimeLine *timeLine;
+};
+
+#endif
diff --git a/examples/graphicsview/dragdroprobot/robot.qrc b/examples/graphicsview/dragdroprobot/robot.qrc
new file mode 100644
index 0000000..b0969d2
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/robot.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>images/head.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/graphicsview/elasticnodes/edge.cpp b/examples/graphicsview/elasticnodes/edge.cpp
new file mode 100644
index 0000000..4018c25
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/edge.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QPainter>
+
+#include "edge.h"
+#include "node.h"
+
+#include <math.h>
+
+static const double Pi = 3.14159265358979323846264338327950288419717;
+static double TwoPi = 2.0 * Pi;
+
+Edge::Edge(Node *sourceNode, Node *destNode)
+ : arrowSize(10)
+{
+ setAcceptedMouseButtons(0);
+ source = sourceNode;
+ dest = destNode;
+ source->addEdge(this);
+ dest->addEdge(this);
+ adjust();
+}
+
+Edge::~Edge()
+{
+}
+
+Node *Edge::sourceNode() const
+{
+ return source;
+}
+
+void Edge::setSourceNode(Node *node)
+{
+ source = node;
+ adjust();
+}
+
+Node *Edge::destNode() const
+{
+ return dest;
+}
+
+void Edge::setDestNode(Node *node)
+{
+ dest = node;
+ adjust();
+}
+
+void Edge::adjust()
+{
+ if (!source || !dest)
+ return;
+
+ QLineF line(mapFromItem(source, 0, 0), mapFromItem(dest, 0, 0));
+ qreal length = line.length();
+ QPointF edgeOffset((line.dx() * 10) / length, (line.dy() * 10) / length);
+
+ prepareGeometryChange();
+ sourcePoint = line.p1() + edgeOffset;
+ destPoint = line.p2() - edgeOffset;
+}
+
+QRectF Edge::boundingRect() const
+{
+ if (!source || !dest)
+ return QRectF();
+
+ qreal penWidth = 1;
+ qreal extra = (penWidth + arrowSize) / 2.0;
+
+ return QRectF(sourcePoint, QSizeF(destPoint.x() - sourcePoint.x(),
+ destPoint.y() - sourcePoint.y()))
+ .normalized()
+ .adjusted(-extra, -extra, extra, extra);
+}
+
+void Edge::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ if (!source || !dest)
+ return;
+
+ // Draw the line itself
+ QLineF line(sourcePoint, destPoint);
+ painter->setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+ painter->drawLine(line);
+
+ // Draw the arrows if there's enough room
+ double angle = ::acos(line.dx() / line.length());
+ if (line.dy() >= 0)
+ angle = TwoPi - angle;
+
+ QPointF sourceArrowP1 = sourcePoint + QPointF(sin(angle + Pi / 3) * arrowSize,
+ cos(angle + Pi / 3) * arrowSize);
+ QPointF sourceArrowP2 = sourcePoint + QPointF(sin(angle + Pi - Pi / 3) * arrowSize,
+ cos(angle + Pi - Pi / 3) * arrowSize);
+ QPointF destArrowP1 = destPoint + QPointF(sin(angle - Pi / 3) * arrowSize,
+ cos(angle - Pi / 3) * arrowSize);
+ QPointF destArrowP2 = destPoint + QPointF(sin(angle - Pi + Pi / 3) * arrowSize,
+ cos(angle - Pi + Pi / 3) * arrowSize);
+
+ painter->setBrush(Qt::black);
+ painter->drawPolygon(QPolygonF() << line.p1() << sourceArrowP1 << sourceArrowP2);
+ painter->drawPolygon(QPolygonF() << line.p2() << destArrowP1 << destArrowP2);
+}
diff --git a/examples/graphicsview/elasticnodes/edge.h b/examples/graphicsview/elasticnodes/edge.h
new file mode 100644
index 0000000..9078870
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/edge.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EDGE_H
+#define EDGE_H
+
+#include <QGraphicsItem>
+
+class Node;
+
+class Edge : public QGraphicsItem
+{
+public:
+ Edge(Node *sourceNode, Node *destNode);
+ ~Edge();
+
+ Node *sourceNode() const;
+ void setSourceNode(Node *node);
+
+ Node *destNode() const;
+ void setDestNode(Node *node);
+
+ void adjust();
+
+ enum { Type = UserType + 2 };
+ int type() const { return Type; }
+
+protected:
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+private:
+ Node *source, *dest;
+
+ QPointF sourcePoint;
+ QPointF destPoint;
+ qreal arrowSize;
+};
+
+#endif
diff --git a/examples/graphicsview/elasticnodes/elasticnodes.pro b/examples/graphicsview/elasticnodes/elasticnodes.pro
new file mode 100644
index 0000000..77ca706
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/elasticnodes.pro
@@ -0,0 +1,16 @@
+HEADERS += \
+ edge.h \
+ node.h \
+ graphwidget.h
+
+SOURCES += \
+ edge.cpp \
+ main.cpp \
+ node.cpp \
+ graphwidget.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/elasticnodes
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS elasticnodes.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/elasticnodes
+INSTALLS += target sources
diff --git a/examples/graphicsview/elasticnodes/graphwidget.cpp b/examples/graphicsview/elasticnodes/graphwidget.cpp
new file mode 100644
index 0000000..5c5029c
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/graphwidget.cpp
@@ -0,0 +1,224 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "graphwidget.h"
+#include "edge.h"
+#include "node.h"
+
+#include <QDebug>
+#include <QGraphicsScene>
+#include <QWheelEvent>
+
+#include <math.h>
+
+GraphWidget::GraphWidget()
+ : timerId(0)
+{
+ QGraphicsScene *scene = new QGraphicsScene(this);
+ scene->setItemIndexMethod(QGraphicsScene::NoIndex);
+ scene->setSceneRect(-200, -200, 400, 400);
+ setScene(scene);
+ setCacheMode(CacheBackground);
+ setViewportUpdateMode(BoundingRectViewportUpdate);
+ setRenderHint(QPainter::Antialiasing);
+ setTransformationAnchor(AnchorUnderMouse);
+ setResizeAnchor(AnchorViewCenter);
+
+ Node *node1 = new Node(this);
+ Node *node2 = new Node(this);
+ Node *node3 = new Node(this);
+ Node *node4 = new Node(this);
+ centerNode = new Node(this);
+ Node *node6 = new Node(this);
+ Node *node7 = new Node(this);
+ Node *node8 = new Node(this);
+ Node *node9 = new Node(this);
+ scene->addItem(node1);
+ scene->addItem(node2);
+ scene->addItem(node3);
+ scene->addItem(node4);
+ scene->addItem(centerNode);
+ scene->addItem(node6);
+ scene->addItem(node7);
+ scene->addItem(node8);
+ scene->addItem(node9);
+ scene->addItem(new Edge(node1, node2));
+ scene->addItem(new Edge(node2, node3));
+ scene->addItem(new Edge(node2, centerNode));
+ scene->addItem(new Edge(node3, node6));
+ scene->addItem(new Edge(node4, node1));
+ scene->addItem(new Edge(node4, centerNode));
+ scene->addItem(new Edge(centerNode, node6));
+ scene->addItem(new Edge(centerNode, node8));
+ scene->addItem(new Edge(node6, node9));
+ scene->addItem(new Edge(node7, node4));
+ scene->addItem(new Edge(node8, node7));
+ scene->addItem(new Edge(node9, node8));
+
+ node1->setPos(-50, -50);
+ node2->setPos(0, -50);
+ node3->setPos(50, -50);
+ node4->setPos(-50, 0);
+ centerNode->setPos(0, 0);
+ node6->setPos(50, 0);
+ node7->setPos(-50, 50);
+ node8->setPos(0, 50);
+ node9->setPos(50, 50);
+
+ scale(qreal(0.8), qreal(0.8));
+ setMinimumSize(400, 400);
+ setWindowTitle(tr("Elastic Nodes"));
+}
+
+void GraphWidget::itemMoved()
+{
+ if (!timerId)
+ timerId = startTimer(1000 / 25);
+}
+
+void GraphWidget::keyPressEvent(QKeyEvent *event)
+{
+ switch (event->key()) {
+ case Qt::Key_Up:
+ centerNode->moveBy(0, -20);
+ break;
+ case Qt::Key_Down:
+ centerNode->moveBy(0, 20);
+ break;
+ case Qt::Key_Left:
+ centerNode->moveBy(-20, 0);
+ break;
+ case Qt::Key_Right:
+ centerNode->moveBy(20, 0);
+ break;
+ case Qt::Key_Plus:
+ scaleView(qreal(1.2));
+ break;
+ case Qt::Key_Minus:
+ scaleView(1 / qreal(1.2));
+ break;
+ case Qt::Key_Space:
+ case Qt::Key_Enter:
+ foreach (QGraphicsItem *item, scene()->items()) {
+ if (qgraphicsitem_cast<Node *>(item))
+ item->setPos(-150 + qrand() % 300, -150 + qrand() % 300);
+ }
+ break;
+ default:
+ QGraphicsView::keyPressEvent(event);
+ }
+}
+
+void GraphWidget::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+
+ QList<Node *> nodes;
+ foreach (QGraphicsItem *item, scene()->items()) {
+ if (Node *node = qgraphicsitem_cast<Node *>(item))
+ nodes << node;
+ }
+
+ foreach (Node *node, nodes)
+ node->calculateForces();
+
+ bool itemsMoved = false;
+ foreach (Node *node, nodes) {
+ if (node->advance())
+ itemsMoved = true;
+ }
+
+ if (!itemsMoved) {
+ killTimer(timerId);
+ timerId = 0;
+ }
+}
+
+void GraphWidget::wheelEvent(QWheelEvent *event)
+{
+ scaleView(pow((double)2, -event->delta() / 240.0));
+}
+
+void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
+{
+ Q_UNUSED(rect);
+
+ // Shadow
+ QRectF sceneRect = this->sceneRect();
+ QRectF rightShadow(sceneRect.right(), sceneRect.top() + 5, 5, sceneRect.height());
+ QRectF bottomShadow(sceneRect.left() + 5, sceneRect.bottom(), sceneRect.width(), 5);
+ if (rightShadow.intersects(rect) || rightShadow.contains(rect))
+ painter->fillRect(rightShadow, Qt::darkGray);
+ if (bottomShadow.intersects(rect) || bottomShadow.contains(rect))
+ painter->fillRect(bottomShadow, Qt::darkGray);
+
+ // Fill
+ QLinearGradient gradient(sceneRect.topLeft(), sceneRect.bottomRight());
+ gradient.setColorAt(0, Qt::white);
+ gradient.setColorAt(1, Qt::lightGray);
+ painter->fillRect(rect.intersect(sceneRect), gradient);
+ painter->setBrush(Qt::NoBrush);
+ painter->drawRect(sceneRect);
+
+ // Text
+ QRectF textRect(sceneRect.left() + 4, sceneRect.top() + 4,
+ sceneRect.width() - 4, sceneRect.height() - 4);
+ QString message(tr("Click and drag the nodes around, and zoom with the mouse "
+ "wheel or the '+' and '-' keys"));
+
+ QFont font = painter->font();
+ font.setBold(true);
+ font.setPointSize(14);
+ painter->setFont(font);
+ painter->setPen(Qt::lightGray);
+ painter->drawText(textRect.translated(2, 2), message);
+ painter->setPen(Qt::black);
+ painter->drawText(textRect, message);
+}
+
+void GraphWidget::scaleView(qreal scaleFactor)
+{
+ qreal factor = matrix().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width();
+ if (factor < 0.07 || factor > 100)
+ return;
+
+ scale(scaleFactor, scaleFactor);
+}
diff --git a/examples/graphicsview/elasticnodes/graphwidget.h b/examples/graphicsview/elasticnodes/graphwidget.h
new file mode 100644
index 0000000..2c86c76
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/graphwidget.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRAPHWIDGET_H
+#define GRAPHWIDGET_H
+
+#include <QtGui/QGraphicsView>
+
+class Node;
+
+class GraphWidget : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ GraphWidget();
+
+ void itemMoved();
+
+protected:
+ void keyPressEvent(QKeyEvent *event);
+ void timerEvent(QTimerEvent *event);
+ void wheelEvent(QWheelEvent *event);
+ void drawBackground(QPainter *painter, const QRectF &rect);
+
+ void scaleView(qreal scaleFactor);
+
+private:
+ int timerId;
+ Node *centerNode;
+};
+
+#endif
diff --git a/examples/graphicsview/elasticnodes/main.cpp b/examples/graphicsview/elasticnodes/main.cpp
new file mode 100644
index 0000000..8043d58
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "graphwidget.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ GraphWidget widget;
+ widget.show();
+ return app.exec();
+}
diff --git a/examples/graphicsview/elasticnodes/node.cpp b/examples/graphicsview/elasticnodes/node.cpp
new file mode 100644
index 0000000..6942fa0
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/node.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QStyleOption>
+
+#include "edge.h"
+#include "node.h"
+#include "graphwidget.h"
+
+Node::Node(GraphWidget *graphWidget)
+ : graph(graphWidget)
+{
+ setFlag(ItemIsMovable);
+ setCacheMode(DeviceCoordinateCache);
+ setZValue(1);
+}
+
+void Node::addEdge(Edge *edge)
+{
+ edgeList << edge;
+ edge->adjust();
+}
+
+QList<Edge *> Node::edges() const
+{
+ return edgeList;
+}
+
+void Node::calculateForces()
+{
+ if (!scene() || scene()->mouseGrabberItem() == this) {
+ newPos = pos();
+ return;
+ }
+
+ // Sum up all forces pushing this item away
+ qreal xvel = 0;
+ qreal yvel = 0;
+ foreach (QGraphicsItem *item, scene()->items()) {
+ Node *node = qgraphicsitem_cast<Node *>(item);
+ if (!node)
+ continue;
+
+ QLineF line(mapFromItem(node, 0, 0), QPointF(0, 0));
+ qreal dx = line.dx();
+ qreal dy = line.dy();
+ double l = 2.0 * (dx * dx + dy * dy);
+ if (l > 0) {
+ xvel += (dx * 150.0) / l;
+ yvel += (dy * 150.0) / l;
+ }
+ }
+
+ // Now subtract all forces pulling items together
+ double weight = (edgeList.size() + 1) * 10;
+ foreach (Edge *edge, edgeList) {
+ QPointF pos;
+ if (edge->sourceNode() == this)
+ pos = mapFromItem(edge->destNode(), 0, 0);
+ else
+ pos = mapFromItem(edge->sourceNode(), 0, 0);
+ xvel += pos.x() / weight;
+ yvel += pos.y() / weight;
+ }
+
+ if (qAbs(xvel) < 0.1 && qAbs(yvel) < 0.1)
+ xvel = yvel = 0;
+
+ QRectF sceneRect = scene()->sceneRect();
+ newPos = pos() + QPointF(xvel, yvel);
+ newPos.setX(qMin(qMax(newPos.x(), sceneRect.left() + 10), sceneRect.right() - 10));
+ newPos.setY(qMin(qMax(newPos.y(), sceneRect.top() + 10), sceneRect.bottom() - 10));
+}
+
+bool Node::advance()
+{
+ if (newPos == pos())
+ return false;
+
+ setPos(newPos);
+ return true;
+}
+
+QRectF Node::boundingRect() const
+{
+ qreal adjust = 2;
+ return QRectF(-10 - adjust, -10 - adjust,
+ 23 + adjust, 23 + adjust);
+}
+
+QPainterPath Node::shape() const
+{
+ QPainterPath path;
+ path.addEllipse(-10, -10, 20, 20);
+ return path;
+}
+
+void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
+{
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(Qt::darkGray);
+ painter->drawEllipse(-7, -7, 20, 20);
+
+ QRadialGradient gradient(-3, -3, 10);
+ if (option->state & QStyle::State_Sunken) {
+ gradient.setCenter(3, 3);
+ gradient.setFocalPoint(3, 3);
+ gradient.setColorAt(1, QColor(Qt::yellow).light(120));
+ gradient.setColorAt(0, QColor(Qt::darkYellow).light(120));
+ } else {
+ gradient.setColorAt(0, Qt::yellow);
+ gradient.setColorAt(1, Qt::darkYellow);
+ }
+ painter->setBrush(gradient);
+ painter->setPen(QPen(Qt::black, 0));
+ painter->drawEllipse(-10, -10, 20, 20);
+}
+
+QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ switch (change) {
+ case ItemPositionHasChanged:
+ foreach (Edge *edge, edgeList)
+ edge->adjust();
+ graph->itemMoved();
+ break;
+ default:
+ break;
+ };
+
+ return QGraphicsItem::itemChange(change, value);
+}
+
+void Node::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ update();
+ QGraphicsItem::mousePressEvent(event);
+}
+
+void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ update();
+ QGraphicsItem::mouseReleaseEvent(event);
+}
diff --git a/examples/graphicsview/elasticnodes/node.h b/examples/graphicsview/elasticnodes/node.h
new file mode 100644
index 0000000..42309c4
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/node.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NODE_H
+#define NODE_H
+
+#include <QGraphicsItem>
+#include <QList>
+
+class Edge;
+class GraphWidget;
+QT_BEGIN_NAMESPACE
+class QGraphicsSceneMouseEvent;
+QT_END_NAMESPACE
+
+class Node : public QGraphicsItem
+{
+public:
+ Node(GraphWidget *graphWidget);
+
+ void addEdge(Edge *edge);
+ QList<Edge *> edges() const;
+
+ enum { Type = UserType + 1 };
+ int type() const { return Type; }
+
+ void calculateForces();
+ bool advance();
+
+ QRectF boundingRect() const;
+ QPainterPath shape() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+private:
+ QList<Edge *> edgeList;
+ QPointF newPos;
+ GraphWidget *graph;
+};
+
+#endif
diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro
new file mode 100644
index 0000000..66eb0b4
--- /dev/null
+++ b/examples/graphicsview/graphicsview.pro
@@ -0,0 +1,18 @@
+TEMPLATE = \
+ subdirs
+SUBDIRS = \
+ elasticnodes \
+ collidingmice \
+ diagramscene \
+ dragdroprobot \
+ padnavigator \
+ basicgraphicslayouts
+
+contains(QT_CONFIG, qt3support):SUBDIRS += portedcanvas portedasteroids
+contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= dragdroprobot
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS graphicsview.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview
+INSTALLS += target sources
diff --git a/examples/graphicsview/padnavigator/backside.ui b/examples/graphicsview/padnavigator/backside.ui
new file mode 100644
index 0000000..afa488c
--- /dev/null
+++ b/examples/graphicsview/padnavigator/backside.ui
@@ -0,0 +1,208 @@
+<ui version="4.0" >
+ <class>BackSide</class>
+ <widget class="QWidget" name="BackSide" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>378</width>
+ <height>385</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>BackSide</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Settings</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Title:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="hostName" >
+ <property name="text" >
+ <string>Pad Navigator Example</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Modified:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Extent</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QSlider" name="horizontalSlider" >
+ <property name="value" >
+ <number>42</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="value" >
+ <number>42</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QDateTimeEdit" name="dateTimeEdit" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Other input</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <item>
+ <widget class="QTreeWidget" name="treeWidget" >
+ <column>
+ <property name="text" >
+ <string>Widgets On Graphics View</string>
+ </property>
+ </column>
+ <item>
+ <property name="text" >
+ <string>QGraphicsProxyWidget</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsWidget</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QObject</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsItem</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsGridLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLinearLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>groupBox</tabstop>
+ <tabstop>hostName</tabstop>
+ <tabstop>dateTimeEdit</tabstop>
+ <tabstop>horizontalSlider</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>groupBox_2</tabstop>
+ <tabstop>treeWidget</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>horizontalSlider</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>spinBox</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>184</x>
+ <y>125</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>275</x>
+ <y>127</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>horizontalSlider</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>272</x>
+ <y>114</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>190</x>
+ <y>126</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/graphicsview/padnavigator/images/artsfftscope.png b/examples/graphicsview/padnavigator/images/artsfftscope.png
new file mode 100644
index 0000000..4db003f
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/artsfftscope.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/blue_angle_swirl.jpg b/examples/graphicsview/padnavigator/images/blue_angle_swirl.jpg
new file mode 100644
index 0000000..5bf0deb
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/blue_angle_swirl.jpg
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/kontact_contacts.png b/examples/graphicsview/padnavigator/images/kontact_contacts.png
new file mode 100644
index 0000000..6fb4cc8
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/kontact_contacts.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/kontact_journal.png b/examples/graphicsview/padnavigator/images/kontact_journal.png
new file mode 100644
index 0000000..b1fedb6
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/kontact_journal.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/kontact_mail.png b/examples/graphicsview/padnavigator/images/kontact_mail.png
new file mode 100644
index 0000000..672f8fa
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/kontact_mail.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/kontact_notes.png b/examples/graphicsview/padnavigator/images/kontact_notes.png
new file mode 100644
index 0000000..229bf73
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/kontact_notes.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/kopeteavailable.png b/examples/graphicsview/padnavigator/images/kopeteavailable.png
new file mode 100644
index 0000000..2eaf41a
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/kopeteavailable.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/metacontact_online.png b/examples/graphicsview/padnavigator/images/metacontact_online.png
new file mode 100644
index 0000000..6a398dd
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/metacontact_online.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/images/minitools.png b/examples/graphicsview/padnavigator/images/minitools.png
new file mode 100644
index 0000000..0248c9d
--- /dev/null
+++ b/examples/graphicsview/padnavigator/images/minitools.png
Binary files differ
diff --git a/examples/graphicsview/padnavigator/main.cpp b/examples/graphicsview/padnavigator/main.cpp
new file mode 100644
index 0000000..dc5ff0c
--- /dev/null
+++ b/examples/graphicsview/padnavigator/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#ifndef QT_NO_OPENGL
+# include <QtOpenGL>
+#endif
+
+#include "panel.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(padnavigator);
+
+ Panel panel(3, 3);
+ panel.setFocus();
+ panel.show();
+
+ return app.exec();
+}
diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro
new file mode 100644
index 0000000..0d094c6
--- /dev/null
+++ b/examples/graphicsview/padnavigator/padnavigator.pro
@@ -0,0 +1,24 @@
+HEADERS += \
+ panel.h \
+ roundrectitem.h \
+ splashitem.h
+
+SOURCES += \
+ panel.cpp \
+ roundrectitem.cpp \
+ splashitem.cpp \
+ main.cpp
+
+RESOURCES += \
+ padnavigator.qrc
+
+FORMS += \
+ backside.ui
+
+contains(QT_CONFIG, opengl):QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/padnavigator
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS padnavigator.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/padnavigator
+INSTALLS += target sources
diff --git a/examples/graphicsview/padnavigator/padnavigator.qrc b/examples/graphicsview/padnavigator/padnavigator.qrc
new file mode 100644
index 0000000..30ee8e1
--- /dev/null
+++ b/examples/graphicsview/padnavigator/padnavigator.qrc
@@ -0,0 +1,14 @@
+<RCC>
+ <qresource>
+ <file>images/blue_angle_swirl.jpg</file>
+ <file>images/artsfftscope.png</file>
+ <file>images/kontact_contacts.png</file>
+ <file>images/kontact_journal.png</file>
+ <file>images/kontact_mail.png</file>
+ <file>images/kontact_notes.png</file>
+ <file>images/kopeteavailable.png</file>
+ <file>images/metacontact_online.png</file>
+ <file>images/minitools.png</file>
+ <file>images/blue_angle_swirl.jpg</file>
+ </qresource>
+</RCC>
diff --git a/examples/graphicsview/padnavigator/panel.cpp b/examples/graphicsview/padnavigator/panel.cpp
new file mode 100644
index 0000000..28a3cb4
--- /dev/null
+++ b/examples/graphicsview/padnavigator/panel.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "panel.h"
+#include "roundrectitem.h"
+#include "splashitem.h"
+#include "ui_backside.h"
+
+#ifndef QT_NO_OPENGL
+#include <QtOpenGL/QtOpenGL>
+#else
+#endif
+#include <QtGui/QtGui>
+
+#include <math.h>
+
+Panel::Panel(int width, int height)
+ : selectedX(0),
+ selectedY(0),
+ width(width),
+ height(height),
+ flipped(false),
+ flipLeft(true)
+{
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setCacheMode(CacheBackground);
+ setViewportUpdateMode(FullViewportUpdate);
+ setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform
+ | QPainter::TextAntialiasing);
+ setBackgroundBrush(QPixmap(":/images/blue_angle_swirl.jpg"));
+#ifndef QT_NO_OPENGL
+ setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+#endif
+ setMinimumSize(50, 50);
+
+ selectionTimeLine = new QTimeLine(150, this);
+ flipTimeLine = new QTimeLine(500, this);
+
+ QRectF bounds((-width / 2.0) * 150, (-height / 2.0) * 150, width * 150, height * 150);
+
+ scene = new QGraphicsScene(bounds, this);
+ scene->setItemIndexMethod(QGraphicsScene::NoIndex);
+ setScene(scene);
+
+ baseItem = new RoundRectItem(bounds, QColor(226, 255, 92, 64));
+ scene->addItem(baseItem);
+
+ QWidget *embed = new QWidget;
+ ui = new Ui_BackSide;
+ ui->setupUi(embed);
+ ui->hostName->setFocus();
+
+ backItem = new RoundRectItem(bounds, embed->palette().window(), embed);
+ backItem->setTransform(QTransform().rotate(180, Qt::YAxis));
+ backItem->setParentItem(baseItem);
+
+ selectionItem = new RoundRectItem(QRectF(-60, -60, 120, 120), Qt::gray);
+ selectionItem->setParentItem(baseItem);
+ selectionItem->setZValue(-1);
+ selectionItem->setPos(posForLocation(0, 0));
+ startPos = selectionItem->pos();
+
+ grid = new QGraphicsItem **[height];
+
+ for (int y = 0; y < height; ++y) {
+ grid[y] = new QGraphicsItem *[width];
+
+ for (int x = 0; x < width; ++x) {
+ RoundRectItem *item = new RoundRectItem(QRectF(-54, -54, 108, 108),
+ QColor(214, 240, 110, 128));
+ item->setPos(posForLocation(x, y));
+
+ item->setParentItem(baseItem);
+ item->setFlag(QGraphicsItem::ItemIsFocusable);
+ grid[y][x] = item;
+
+ switch (qrand() % 9) {
+ case 0: item->setPixmap(QPixmap(":/images/kontact_contacts.png")); break;
+ case 1: item->setPixmap(QPixmap(":/images/kontact_journal.png")); break;
+ case 2: item->setPixmap(QPixmap(":/images/kontact_notes.png")); break;
+ case 3: item->setPixmap(QPixmap(":/images/kopeteavailable.png")); break;
+ case 4: item->setPixmap(QPixmap(":/images/metacontact_online.png")); break;
+ case 5: item->setPixmap(QPixmap(":/images/minitools.png")); break;
+ case 6: item->setPixmap(QPixmap(":/images/kontact_journal.png")); break;
+ case 7: item->setPixmap(QPixmap(":/images/kontact_contacts.png")); break;
+ case 8: item->setPixmap(QPixmap(":/images/kopeteavailable.png")); break;
+ default:
+ break;
+ }
+
+ connect(item, SIGNAL(activated()), this, SLOT(flip()));
+ }
+ }
+
+ grid[0][0]->setFocus();
+
+ connect(backItem, SIGNAL(activated()),
+ this, SLOT(flip()));
+ connect(selectionTimeLine, SIGNAL(valueChanged(qreal)),
+ this, SLOT(updateSelectionStep(qreal)));
+ connect(flipTimeLine, SIGNAL(valueChanged(qreal)),
+ this, SLOT(updateFlipStep(qreal)));
+
+ splash = new SplashItem;
+ splash->setZValue(5);
+ splash->setPos(-splash->rect().width() / 2, scene->sceneRect().top());
+ scene->addItem(splash);
+
+ splash->grabKeyboard();
+
+ updateSelectionStep(0);
+
+ setWindowTitle(tr("Pad Navigator Example"));
+}
+
+Panel::~Panel()
+{
+ for (int y = 0; y < height; ++y)
+ delete [] grid[y];
+ delete [] grid;
+}
+
+void Panel::keyPressEvent(QKeyEvent *event)
+{
+ if (splash->isVisible() || event->key() == Qt::Key_Return || flipped) {
+ QGraphicsView::keyPressEvent(event);
+ return;
+ }
+
+ selectedX = (selectedX + width + (event->key() == Qt::Key_Right) - (event->key() == Qt::Key_Left)) % width;
+ selectedY = (selectedY + height + (event->key() == Qt::Key_Down) - (event->key() == Qt::Key_Up)) % height;
+ grid[selectedY][selectedX]->setFocus();
+
+ selectionTimeLine->stop();
+ startPos = selectionItem->pos();
+ endPos = posForLocation(selectedX, selectedY);
+ selectionTimeLine->start();
+}
+
+void Panel::resizeEvent(QResizeEvent *event)
+{
+ QGraphicsView::resizeEvent(event);
+ fitInView(scene->sceneRect(), Qt::KeepAspectRatio);
+}
+
+void Panel::updateSelectionStep(qreal val)
+{
+ QPointF newPos(startPos.x() + (endPos - startPos).x() * val,
+ startPos.y() + (endPos - startPos).y() * val);
+ selectionItem->setPos(newPos);
+
+ QTransform transform;
+ yrot = newPos.x() / 6.0;
+ xrot = newPos.y() / 6.0;
+ transform.rotate(newPos.x() / 6.0, Qt::YAxis);
+ transform.rotate(newPos.y() / 6.0, Qt::XAxis);
+ baseItem->setTransform(transform);
+}
+
+void Panel::updateFlipStep(qreal val)
+{
+ qreal finalxrot = xrot - xrot * val;
+ qreal finalyrot;
+ if (flipLeft)
+ finalyrot = yrot - yrot * val - 180 * val;
+ else
+ finalyrot = yrot - yrot * val + 180 * val;
+ QTransform transform;
+ transform.rotate(finalyrot, Qt::YAxis);
+ transform.rotate(finalxrot, Qt::XAxis);
+ qreal scale = 1 - sin(3.14 * val) * 0.3;
+ transform.scale(scale, scale);
+ baseItem->setTransform(transform);
+ if (val == 0)
+ grid[selectedY][selectedX]->setFocus();
+}
+
+void Panel::flip()
+{
+ if (flipTimeLine->state() == QTimeLine::Running)
+ return;
+
+ if (flipTimeLine->currentValue() == 0) {
+ flipTimeLine->setDirection(QTimeLine::Forward);
+ flipTimeLine->start();
+ flipped = true;
+ flipLeft = selectionItem->pos().x() < 0;
+ } else {
+ flipTimeLine->setDirection(QTimeLine::Backward);
+ flipTimeLine->start();
+ flipped = false;
+ }
+}
+
+QPointF Panel::posForLocation(int x, int y) const
+{
+ return QPointF(x * 150, y * 150)
+ - QPointF((width - 1) * 75, (height - 1) * 75);
+}
diff --git a/examples/graphicsview/padnavigator/panel.h b/examples/graphicsview/padnavigator/panel.h
new file mode 100644
index 0000000..03876b7
--- /dev/null
+++ b/examples/graphicsview/padnavigator/panel.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qgraphicsview.h>
+
+QT_BEGIN_NAMESPACE
+class QTimeLine;
+class Ui_BackSide;
+QT_END_NAMESPACE;
+
+class RoundRectItem;
+
+class Panel : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ Panel(int width, int height);
+ ~Panel();
+
+protected:
+ void keyPressEvent(QKeyEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+private Q_SLOTS:
+ void updateSelectionStep(qreal val);
+ void updateFlipStep(qreal val);
+ void flip();
+
+private:
+ QPointF posForLocation(int x, int y) const;
+
+ QGraphicsScene *scene;
+ RoundRectItem *selectionItem;
+ RoundRectItem *baseItem;
+ RoundRectItem *backItem;
+ QGraphicsWidget *splash;
+ QTimeLine *selectionTimeLine;
+ QTimeLine *flipTimeLine;
+ int selectedX, selectedY;
+
+ QGraphicsItem ***grid;
+
+ QPointF startPos;
+ QPointF endPos;
+ qreal xrot, yrot;
+ qreal xrot2, yrot2;
+
+ int width;
+ int height;
+ bool flipped;
+ bool flipLeft;
+
+ Ui_BackSide *ui;
+};
diff --git a/examples/graphicsview/padnavigator/roundrectitem.cpp b/examples/graphicsview/padnavigator/roundrectitem.cpp
new file mode 100644
index 0000000..c5dc35d
--- /dev/null
+++ b/examples/graphicsview/padnavigator/roundrectitem.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "roundrectitem.h"
+
+#include <QtGui/QtGui>
+
+RoundRectItem::RoundRectItem(const QRectF &rect, const QBrush &brush, QWidget *embeddedWidget)
+ : QGraphicsRectItem(rect),
+ brush(brush),
+ timeLine(75),
+ lastVal(0),
+ opa(1),
+ proxyWidget(0)
+{
+ connect(&timeLine, SIGNAL(valueChanged(qreal)),
+ this, SLOT(updateValue(qreal)));
+
+ if (embeddedWidget) {
+ proxyWidget = new QGraphicsProxyWidget(this);
+ proxyWidget->setFocusPolicy(Qt::StrongFocus);
+ proxyWidget->setWidget(embeddedWidget);
+ proxyWidget->setGeometry(boundingRect().adjusted(25, 25, -25, -25));
+ }
+}
+
+void RoundRectItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ QTransform x = painter->worldTransform();
+
+ QLineF unit = x.map(QLineF(0, 0, 1, 1));
+ if (unit.p1().x() > unit.p2().x() || unit.p1().y() > unit.p2().y()) {
+ if (proxyWidget && proxyWidget->isVisible()) {
+ proxyWidget->hide();
+ proxyWidget->setGeometry(rect());
+ }
+ return;
+ }
+
+ if (proxyWidget && !proxyWidget->isVisible()) {
+ proxyWidget->show();
+ proxyWidget->setFocus();
+ }
+ if (proxyWidget && proxyWidget->pos() != QPoint())
+ proxyWidget->setGeometry(boundingRect().adjusted(25, 25, -25, -25));
+
+ painter->setOpacity(opacity());
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(QColor(0, 0, 0, 64));
+ painter->drawRoundRect(rect().translated(2, 2));
+
+ if (!proxyWidget) {
+ QLinearGradient gradient(rect().topLeft(), rect().bottomRight());
+ const QColor col = brush.color();
+ gradient.setColorAt(0, col);
+ gradient.setColorAt(1, col.dark(int(200 + lastVal * 50)));
+ painter->setBrush(gradient);
+ } else {
+ painter->setBrush(brush);
+ }
+
+ painter->setPen(QPen(Qt::black, 1));
+ painter->drawRoundRect(rect());
+ if (!pix.isNull()) {
+ painter->scale(1.95, 1.95);
+ painter->drawPixmap(-pix.width() / 2, -pix.height() / 2, pix);;
+ }
+}
+
+QRectF RoundRectItem::boundingRect() const
+{
+ qreal penW = 0.5;
+ qreal shadowW = 2.0;
+ return rect().adjusted(-penW, -penW, penW + shadowW, penW + shadowW);
+}
+
+void RoundRectItem::setPixmap(const QPixmap &pixmap)
+{
+ pix = pixmap;
+ if (scene() && isVisible())
+ update();
+}
+
+qreal RoundRectItem::opacity() const
+{
+ RoundRectItem *parent = parentItem() ? (RoundRectItem *)parentItem() : 0;
+ return opa + (parent ? parent->opacity() : 0);
+}
+
+void RoundRectItem::setOpacity(qreal opacity)
+{
+ opa = opacity;
+ update();
+}
+
+void RoundRectItem::keyPressEvent(QKeyEvent *event)
+{
+ if (event->isAutoRepeat() || event->key() != Qt::Key_Return
+ || (timeLine.state() == QTimeLine::Running && timeLine.direction() == QTimeLine::Forward)) {
+ QGraphicsRectItem::keyPressEvent(event);
+ return;
+ }
+
+ timeLine.stop();
+ timeLine.setDirection(QTimeLine::Forward);
+ timeLine.start();
+ emit activated();
+}
+
+void RoundRectItem::keyReleaseEvent(QKeyEvent *event)
+{
+ if (event->key() != Qt::Key_Return) {
+ QGraphicsRectItem::keyReleaseEvent(event);
+ return;
+ }
+ timeLine.stop();
+ timeLine.setDirection(QTimeLine::Backward);
+ timeLine.start();
+}
+
+void RoundRectItem::updateValue(qreal value)
+{
+ lastVal = value;
+ if (!proxyWidget)
+ setTransform(QTransform().scale(1 - value / 10.0, 1 - value / 10.0));
+}
diff --git a/examples/graphicsview/padnavigator/roundrectitem.h b/examples/graphicsview/padnavigator/roundrectitem.h
new file mode 100644
index 0000000..33e33d7
--- /dev/null
+++ b/examples/graphicsview/padnavigator/roundrectitem.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qobject.h>
+#include <QtCore/qtimeline.h>
+#include <QtGui/qgraphicsitem.h>
+#include <QtGui/qbrush.h>
+
+QT_BEGIN_NAMESPACE
+class QGraphicsProxyWidget;
+QT_END_NAMESPACE;
+
+class RoundRectItem : public QObject, public QGraphicsRectItem
+{
+ Q_OBJECT
+public:
+ RoundRectItem(const QRectF &rect, const QBrush &brush, QWidget *embeddedWidget = 0);
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
+ QRectF boundingRect() const;
+
+ void setPixmap(const QPixmap &pixmap);
+
+ qreal opacity() const;
+ void setOpacity(qreal opacity);
+
+Q_SIGNALS:
+ void activated();
+
+protected:
+ void keyPressEvent(QKeyEvent *event);
+ void keyReleaseEvent(QKeyEvent *event);
+
+private slots:
+ void updateValue(qreal value);
+
+private:
+ QBrush brush;
+ QPixmap pix;
+ QTimeLine timeLine;
+ qreal lastVal;
+ qreal opa;
+
+ QGraphicsProxyWidget *proxyWidget;
+};
diff --git a/examples/graphicsview/padnavigator/splashitem.cpp b/examples/graphicsview/padnavigator/splashitem.cpp
new file mode 100644
index 0000000..2a374bf
--- /dev/null
+++ b/examples/graphicsview/padnavigator/splashitem.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "splashitem.h"
+
+#include <QtGui/QtGui>
+
+SplashItem::SplashItem(QGraphicsItem *parent)
+ : QGraphicsWidget(parent)
+{
+ opacity = 1.0;
+
+
+ timeLine = new QTimeLine(350);
+ timeLine->setCurveShape(QTimeLine::EaseInCurve);
+ connect(timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(setValue(qreal)));
+
+ text = tr("Welcome to the Pad Navigator Example. You can use the"
+ " keyboard arrows to navigate the icons, and press enter"
+ " to activate an item. Please press any key to continue.");
+ resize(400, 175);
+}
+
+void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ painter->setOpacity(opacity);
+ painter->setPen(QPen(Qt::black, 2));
+ painter->setBrush(QColor(245, 245, 255, 220));
+ painter->setClipRect(rect());
+ painter->drawRoundRect(3, -100 + 3, 400 - 6, 250 - 6);
+
+ QRectF textRect = rect().adjusted(10, 10, -10, -10);
+ int flags = Qt::AlignTop | Qt::AlignLeft | Qt::TextWordWrap;
+
+ QFont font;
+ font.setPixelSize(18);
+ painter->setPen(Qt::black);
+ painter->setFont(font);
+ painter->drawText(textRect, flags, text);
+}
+
+void SplashItem::keyPressEvent(QKeyEvent * /* event */)
+{
+ if (timeLine->state() == QTimeLine::NotRunning)
+ timeLine->start();
+}
+
+void SplashItem::setValue(qreal value)
+{
+ opacity = 1 - value;
+ setPos(x(), scene()->sceneRect().top() - rect().height() * value);
+ if (value == 1)
+ hide();
+}
diff --git a/examples/graphicsview/padnavigator/splashitem.h b/examples/graphicsview/padnavigator/splashitem.h
new file mode 100644
index 0000000..982bbe2
--- /dev/null
+++ b/examples/graphicsview/padnavigator/splashitem.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qobject.h>
+#include <QtCore/qtimeline.h>
+#include <QtGui/qgraphicswidget.h>
+
+class SplashItem : public QGraphicsWidget
+{
+ Q_OBJECT
+public:
+ SplashItem(QGraphicsItem *parent = 0);
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+ void keyPressEvent(QKeyEvent *event);
+
+private Q_SLOTS:
+ void setValue(qreal value);
+
+private:
+ QTimeLine *timeLine;
+ QString text;
+ qreal opacity;
+};
diff --git a/examples/graphicsview/portedasteroids/animateditem.cpp b/examples/graphicsview/portedasteroids/animateditem.cpp
new file mode 100644
index 0000000..ac41fb5
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/animateditem.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "animateditem.h"
+
+#include <QtGui/qbitmap.h>
+#include <QtGui/qpainter.h>
+
+AnimatedPixmapItem::AnimatedPixmapItem(const QList<QPixmap> &animation,
+ QGraphicsScene *scene)
+ : QGraphicsItem(0, scene), currentFrame(0), vx(0), vy(0)
+{
+ for (int i = 0; i < animation.size(); ++i) {
+ QPixmap pixmap = animation.at(i);
+ Frame frame;
+ frame.pixmap = pixmap;
+ frame.shape = QPainterPath();
+ frame.boundingRect = pixmap.rect();
+ frames << frame;
+ }
+}
+
+void AnimatedPixmapItem::setFrame(int frame)
+{
+ if (!frames.isEmpty()) {
+ prepareGeometryChange();
+ currentFrame = frame % frames.size();
+ }
+}
+
+void AnimatedPixmapItem::advance(int phase)
+{
+ if (phase == 1)
+ moveBy(vx, vy);
+}
+
+QRectF AnimatedPixmapItem::boundingRect() const
+{
+ return frames.at(currentFrame).boundingRect;
+}
+
+QPainterPath AnimatedPixmapItem::shape() const
+{
+ const Frame &f = frames.at(currentFrame);
+ if (f.shape.isEmpty()) {
+ QPainterPath path;
+ path.addRegion(f.pixmap.createHeuristicMask());
+ const_cast<Frame &>(f).shape = path;
+ }
+ return f.shape;
+}
+
+void AnimatedPixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/,
+ QWidget * /*widget*/)
+{
+ painter->drawPixmap(0, 0, frames.at(currentFrame).pixmap);
+}
diff --git a/examples/graphicsview/portedasteroids/animateditem.h b/examples/graphicsview/portedasteroids/animateditem.h
new file mode 100644
index 0000000..54e8e56
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/animateditem.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANIMATEDPIXMAPITEM_H
+#define ANIMATEDPIXMAPITEM_H
+
+#include <QGraphicsItem>
+
+class AnimatedPixmapItem : public QGraphicsItem
+{
+public:
+ AnimatedPixmapItem(const QList<QPixmap> &animation, QGraphicsScene *scene = 0);
+
+ void setFrame(int frame);
+ inline int frame() const
+ { return currentFrame; }
+ inline int frameCount() const
+ { return frames.size(); }
+ inline QPixmap image(int frame) const
+ { return frames.isEmpty() ? QPixmap() : frames.at(frame % frames.size()).pixmap; }
+ inline void setVelocity(qreal xvel, qreal yvel)
+ { vx = xvel; vy = yvel; }
+ inline qreal xVelocity() const
+ { return vx; }
+ inline qreal yVelocity() const
+ { return vy; }
+
+ QRectF boundingRect() const;
+ QPainterPath shape() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+ void advance(int phase);
+
+private:
+ struct Frame {
+ QPixmap pixmap;
+ QPainterPath shape;
+ QRectF boundingRect;
+ };
+
+ int currentFrame;
+ QList<Frame> frames;
+ qreal vx, vy;
+};
+
+#endif
diff --git a/examples/graphicsview/portedasteroids/bg.png b/examples/graphicsview/portedasteroids/bg.png
new file mode 100644
index 0000000..1201172
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/bg.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/ledmeter.cpp b/examples/graphicsview/portedasteroids/ledmeter.cpp
new file mode 100644
index 0000000..37aee26
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/ledmeter.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#include <qpainter.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <Q3Frame>
+#include "ledmeter.h"
+
+KALedMeter::KALedMeter( QWidget *parent ) : Q3Frame( parent )
+{
+ mCRanges.setAutoDelete( TRUE );
+ mRange = 100;
+ mCount = 20;
+ mCurrentCount = 0;
+ mValue = 0;
+ setMinimumWidth( mCount * 2 + frameWidth() );
+}
+
+void KALedMeter::setRange( int r )
+{
+ mRange = r;
+ if ( mRange < 1 )
+ mRange = 1;
+ setValue( mValue );
+ update();
+}
+
+void KALedMeter::setCount( int c )
+{
+ mCount = c;
+ if ( mCount < 1 )
+ mCount = 1;
+ setMinimumWidth( mCount * 2 + frameWidth() );
+ calcColorRanges();
+ setValue( mValue );
+ update();
+}
+
+void KALedMeter::setValue( int v )
+{
+ mValue = v;
+ if ( mValue > mRange )
+ mValue = mRange;
+ else if ( mValue < 0 )
+ mValue = 0;
+ int c = ( mValue + mRange / mCount - 1 ) * mCount / mRange;
+ if ( c != mCurrentCount )
+ {
+ mCurrentCount = c;
+ update();
+ }
+}
+
+void KALedMeter::addColorRange( int pc, const QColor &c )
+{
+ ColorRange *cr = new ColorRange;
+ cr->mPc = pc;
+ cr->mColor = c;
+ mCRanges.append( cr );
+ calcColorRanges();
+}
+
+void KALedMeter::resizeEvent( QResizeEvent *e )
+{
+ Q3Frame::resizeEvent( e );
+ int w = ( width() - frameWidth() - 2 ) / mCount * mCount;
+ w += frameWidth() + 2;
+ setFrameRect( QRect( 0, 0, w, height() ) );
+}
+
+void KALedMeter::drawContents( QPainter *p )
+{
+ QRect b = contentsRect();
+
+ unsigned cidx = 0;
+ int ncol = mCount;
+ QColor col = colorGroup().foreground();
+
+ if ( !mCRanges.isEmpty() )
+ {
+ col = mCRanges.at( cidx )->mColor;
+ ncol = mCRanges.at( cidx )->mValue;
+ }
+ p->setBrush( col );
+ p->setPen( col );
+
+ int lw = b.width() / mCount;
+ int lx = b.left() + 1;
+ for ( int i = 0; i < mCurrentCount; i++, lx += lw )
+ {
+ if ( i > ncol )
+ {
+ if ( ++cidx < mCRanges.count() )
+ {
+ col = mCRanges.at( cidx )->mColor;
+ ncol = mCRanges.at( cidx )->mValue;
+ p->setBrush( col );
+ p->setPen( col );
+ }
+ }
+
+ p->drawRect( lx, b.top() + 1, lw - 1, b.height() - 2 );
+ }
+}
+
+void KALedMeter::calcColorRanges()
+{
+ int prev = 0;
+ ColorRange *cr;
+ for ( cr = mCRanges.first(); cr; cr = mCRanges.next() )
+ {
+ cr->mValue = prev + cr->mPc * mCount / 100;
+ prev = cr->mValue;
+ }
+}
+
diff --git a/examples/graphicsview/portedasteroids/ledmeter.h b/examples/graphicsview/portedasteroids/ledmeter.h
new file mode 100644
index 0000000..117b113
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/ledmeter.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#ifndef __LEDMETER_H__
+#define __LEDMETER_H__
+
+#include <q3frame.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+
+
+class KALedMeter : public Q3Frame
+{
+ Q_OBJECT
+public:
+ KALedMeter( QWidget *parent );
+
+ int range() const { return mRange; }
+ void setRange( int r );
+
+ int count() const { return mCount; }
+ void setCount( int c );
+
+ int value () const { return mValue; }
+
+ void addColorRange( int pc, const QColor &c );
+
+public slots:
+ void setValue( int v );
+
+protected:
+ virtual void resizeEvent( QResizeEvent * );
+ virtual void drawContents( QPainter * );
+ void calcColorRanges();
+
+protected:
+ struct ColorRange
+ {
+ int mPc;
+ int mValue;
+ QColor mColor;
+ };
+
+ int mRange;
+ int mCount;
+ int mCurrentCount;
+ int mValue;
+ Q3PtrList<ColorRange> mCRanges;
+};
+
+#endif
diff --git a/examples/graphicsview/portedasteroids/main.cpp b/examples/graphicsview/portedasteroids/main.cpp
new file mode 100644
index 0000000..69b5fd5
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "toplevel.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(portedasteroids);
+
+ QApplication app(argc, argv);
+
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ KAstTopLevel topLevel;
+ topLevel.setWindowTitle("Ported Asteroids Game");
+ topLevel.show();
+
+ app.setQuitOnLastWindowClosed(true);
+ return app.exec();
+}
diff --git a/examples/graphicsview/portedasteroids/portedasteroids.pro b/examples/graphicsview/portedasteroids/portedasteroids.pro
new file mode 100644
index 0000000..1452e91
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/portedasteroids.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+HEADERS += ledmeter.h sprites.h toplevel.h view.h
+SOURCES += ledmeter.cpp main.cpp toplevel.cpp view.cpp
+#The following line was inserted by qt3to4
+QT += qt3support
+
+HEADERS += animateditem.h
+SOURCES += animateditem.cpp
+
+RESOURCES += portedasteroids.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedasteroids
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS portedasteroids.pro bg.png sounds sprites
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedasteroids
+INSTALLS += target sources
diff --git a/examples/graphicsview/portedasteroids/portedasteroids.qrc b/examples/graphicsview/portedasteroids/portedasteroids.qrc
new file mode 100644
index 0000000..1780828
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/portedasteroids.qrc
@@ -0,0 +1,163 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/trolltech/examples/graphicsview/portedasteroids">
+<file>bg.png</file>
+<file>sprites/bits/bits0000.png</file>
+<file>sprites/bits/bits0001.png</file>
+<file>sprites/bits/bits0002.png</file>
+<file>sprites/bits/bits0003.png</file>
+<file>sprites/bits/bits0004.png</file>
+<file>sprites/bits/bits0005.png</file>
+<file>sprites/bits/bits0006.png</file>
+<file>sprites/bits/bits0007.png</file>
+<file>sprites/bits/bits0008.png</file>
+<file>sprites/bits/bits0009.png</file>
+<file>sprites/bits/bits0010.png</file>
+<file>sprites/bits/bits0011.png</file>
+<file>sprites/bits/bits0012.png</file>
+<file>sprites/bits/bits0013.png</file>
+<file>sprites/bits/bits0014.png</file>
+<file>sprites/bits/bits0015.png</file>
+<file>sprites/ship/ship0000.png</file>
+<file>sprites/ship/ship0001.png</file>
+<file>sprites/ship/ship0002.png</file>
+<file>sprites/ship/ship0003.png</file>
+<file>sprites/ship/ship0004.png</file>
+<file>sprites/ship/ship0005.png</file>
+<file>sprites/ship/ship0006.png</file>
+<file>sprites/ship/ship0007.png</file>
+<file>sprites/ship/ship0008.png</file>
+<file>sprites/ship/ship0009.png</file>
+<file>sprites/ship/ship0010.png</file>
+<file>sprites/ship/ship0011.png</file>
+<file>sprites/ship/ship0012.png</file>
+<file>sprites/ship/ship0013.png</file>
+<file>sprites/ship/ship0014.png</file>
+<file>sprites/ship/ship0015.png</file>
+<file>sprites/ship/ship0016.png</file>
+<file>sprites/ship/ship0017.png</file>
+<file>sprites/ship/ship0018.png</file>
+<file>sprites/ship/ship0019.png</file>
+<file>sprites/ship/ship0020.png</file>
+<file>sprites/ship/ship0021.png</file>
+<file>sprites/ship/ship0022.png</file>
+<file>sprites/ship/ship0023.png</file>
+<file>sprites/ship/ship0024.png</file>
+<file>sprites/ship/ship0025.png</file>
+<file>sprites/ship/ship0026.png</file>
+<file>sprites/ship/ship0027.png</file>
+<file>sprites/ship/ship0028.png</file>
+<file>sprites/ship/ship0029.png</file>
+<file>sprites/ship/ship0030.png</file>
+<file>sprites/ship/ship0031.png</file>
+<file>sprites/rock1/rock10016.png</file>
+<file>sprites/rock1/rock10017.png</file>
+<file>sprites/rock1/rock10018.png</file>
+<file>sprites/rock1/rock10019.png</file>
+<file>sprites/rock1/rock10020.png</file>
+<file>sprites/rock1/rock10021.png</file>
+<file>sprites/rock1/rock10022.png</file>
+<file>sprites/rock1/rock10023.png</file>
+<file>sprites/rock1/rock10024.png</file>
+<file>sprites/rock1/rock10025.png</file>
+<file>sprites/rock1/rock10026.png</file>
+<file>sprites/rock1/rock10027.png</file>
+<file>sprites/rock1/rock10028.png</file>
+<file>sprites/rock1/rock10029.png</file>
+<file>sprites/rock1/rock10030.png</file>
+<file>sprites/rock1/rock10031.png</file>
+<file>sprites/rock1/rock10000.png</file>
+<file>sprites/rock1/rock10001.png</file>
+<file>sprites/rock1/rock10002.png</file>
+<file>sprites/rock1/rock10003.png</file>
+<file>sprites/rock1/rock10004.png</file>
+<file>sprites/rock1/rock10005.png</file>
+<file>sprites/rock1/rock10006.png</file>
+<file>sprites/rock1/rock10007.png</file>
+<file>sprites/rock1/rock10008.png</file>
+<file>sprites/rock1/rock10009.png</file>
+<file>sprites/rock1/rock10010.png</file>
+<file>sprites/rock1/rock10011.png</file>
+<file>sprites/rock1/rock10012.png</file>
+<file>sprites/rock1/rock10013.png</file>
+<file>sprites/rock1/rock10014.png</file>
+<file>sprites/rock1/rock10015.png</file>
+<file>sprites/rock2/rock20000.png</file>
+<file>sprites/rock2/rock20001.png</file>
+<file>sprites/rock2/rock20002.png</file>
+<file>sprites/rock2/rock20003.png</file>
+<file>sprites/rock2/rock20004.png</file>
+<file>sprites/rock2/rock20005.png</file>
+<file>sprites/rock2/rock20006.png</file>
+<file>sprites/rock2/rock20007.png</file>
+<file>sprites/rock2/rock20008.png</file>
+<file>sprites/rock2/rock20009.png</file>
+<file>sprites/rock2/rock20010.png</file>
+<file>sprites/rock2/rock20011.png</file>
+<file>sprites/rock2/rock20012.png</file>
+<file>sprites/rock2/rock20013.png</file>
+<file>sprites/rock2/rock20014.png</file>
+<file>sprites/rock2/rock20015.png</file>
+<file>sprites/rock2/rock20016.png</file>
+<file>sprites/rock2/rock20017.png</file>
+<file>sprites/rock2/rock20018.png</file>
+<file>sprites/rock2/rock20019.png</file>
+<file>sprites/rock2/rock20020.png</file>
+<file>sprites/rock2/rock20021.png</file>
+<file>sprites/rock2/rock20022.png</file>
+<file>sprites/rock2/rock20023.png</file>
+<file>sprites/rock2/rock20024.png</file>
+<file>sprites/rock2/rock20025.png</file>
+<file>sprites/rock2/rock20026.png</file>
+<file>sprites/rock2/rock20027.png</file>
+<file>sprites/rock2/rock20028.png</file>
+<file>sprites/rock2/rock20029.png</file>
+<file>sprites/rock2/rock20030.png</file>
+<file>sprites/rock2/rock20031.png</file>
+<file>sprites/rock3/rock30000.png</file>
+<file>sprites/rock3/rock30001.png</file>
+<file>sprites/rock3/rock30002.png</file>
+<file>sprites/rock3/rock30003.png</file>
+<file>sprites/rock3/rock30004.png</file>
+<file>sprites/rock3/rock30005.png</file>
+<file>sprites/rock3/rock30006.png</file>
+<file>sprites/rock3/rock30007.png</file>
+<file>sprites/rock3/rock30008.png</file>
+<file>sprites/rock3/rock30009.png</file>
+<file>sprites/rock3/rock30010.png</file>
+<file>sprites/rock3/rock30011.png</file>
+<file>sprites/rock3/rock30012.png</file>
+<file>sprites/rock3/rock30013.png</file>
+<file>sprites/rock3/rock30014.png</file>
+<file>sprites/rock3/rock30015.png</file>
+<file>sprites/rock3/rock30016.png</file>
+<file>sprites/rock3/rock30017.png</file>
+<file>sprites/rock3/rock30018.png</file>
+<file>sprites/rock3/rock30019.png</file>
+<file>sprites/rock3/rock30020.png</file>
+<file>sprites/rock3/rock30021.png</file>
+<file>sprites/rock3/rock30022.png</file>
+<file>sprites/rock3/rock30023.png</file>
+<file>sprites/rock3/rock30024.png</file>
+<file>sprites/rock3/rock30025.png</file>
+<file>sprites/rock3/rock30026.png</file>
+<file>sprites/rock3/rock30027.png</file>
+<file>sprites/rock3/rock30028.png</file>
+<file>sprites/rock3/rock30029.png</file>
+<file>sprites/rock3/rock30030.png</file>
+<file>sprites/rock3/rock30031.png</file>
+<file>sprites/missile/missile.png</file>
+<file>sprites/exhaust/exhaust.png</file>
+<file>sprites/powerups/shield.png</file>
+<file>sprites/powerups/shoot.png</file>
+<file>sprites/powerups/teleport.png</file>
+<file>sprites/powerups/brake.png</file>
+<file>sprites/powerups/energy.png</file>
+<file>sprites/shield/shield0000.png</file>
+<file>sprites/shield/shield0001.png</file>
+<file>sprites/shield/shield0002.png</file>
+<file>sprites/shield/shield0003.png</file>
+<file>sprites/shield/shield0004.png</file>
+<file>sprites/shield/shield0005.png</file>
+<file>sprites/shield/shield0006.png</file>
+</qresource>
+</RCC>
diff --git a/examples/graphicsview/portedasteroids/sounds/Explosion.wav b/examples/graphicsview/portedasteroids/sounds/Explosion.wav
new file mode 100644
index 0000000..7b140b1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sounds/Explosion.wav
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites.h b/examples/graphicsview/portedasteroids/sprites.h
new file mode 100644
index 0000000..1483d68
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#ifndef __SPRITES_H__
+#define __SPRITES_H__
+
+#include "animateditem.h"
+
+#define ID_ROCK_LARGE 1024
+#define ID_ROCK_MEDIUM 1025
+#define ID_ROCK_SMALL 1026
+
+#define ID_MISSILE 1030
+
+#define ID_BIT 1040
+#define ID_EXHAUST 1041
+
+#define ID_ENERGY_POWERUP 1310
+#define ID_TELEPORT_POWERUP 1311
+#define ID_BRAKE_POWERUP 1312
+#define ID_SHIELD_POWERUP 1313
+#define ID_SHOOT_POWERUP 1314
+
+#define ID_SHIP 1350
+#define ID_SHIELD 1351
+
+#define MAX_SHIELD_AGE 350
+#define MAX_POWERUP_AGE 500
+#define MAX_MISSILE_AGE 40
+
+class KMissile : public AnimatedPixmapItem
+{
+public:
+ KMissile( const QList<QPixmap> &s, QGraphicsScene *c ) : AnimatedPixmapItem( s, c )
+ { myAge = 0; }
+
+ virtual int type() const { return ID_MISSILE; }
+
+ void growOlder() { myAge++; }
+ bool expired() { return myAge > MAX_MISSILE_AGE; }
+
+private:
+ int myAge;
+};
+
+class KBit : public AnimatedPixmapItem
+{
+public:
+ KBit( const QList<QPixmap> &s, QGraphicsScene *c ) : AnimatedPixmapItem( s, c )
+ { death = 7; }
+
+ virtual int type() const { return ID_BIT; }
+
+ void setDeath( int d ) { death = d; }
+ void growOlder() { death--; }
+ bool expired() { return death <= 0; }
+
+private:
+ int death;
+};
+
+class KExhaust : public AnimatedPixmapItem
+{
+public:
+ KExhaust( const QList<QPixmap> &s, QGraphicsScene *c ) : AnimatedPixmapItem( s, c )
+ { death = 1; }
+
+ virtual int type() const { return ID_EXHAUST; }
+
+ void setDeath( int d ) { death = d; }
+ void growOlder() { death--; }
+ bool expired() { return death <= 0; }
+
+private:
+ int death;
+};
+
+class KPowerup : public AnimatedPixmapItem
+{
+public:
+ KPowerup( const QList<QPixmap> &s, QGraphicsScene *c, int t ) : AnimatedPixmapItem( s, c ),
+ myAge( 0 ), _type(t) { }
+
+ virtual int type() const { return _type; }
+
+ void growOlder() { myAge++; }
+ bool expired() const { return myAge > MAX_POWERUP_AGE; }
+
+protected:
+ int myAge;
+ int _type;
+};
+
+class KRock : public AnimatedPixmapItem
+{
+public:
+ KRock (const QList<QPixmap> &s, QGraphicsScene *c, int t, int sk, int st) : AnimatedPixmapItem( s, c )
+ { _type = t; skip = cskip = sk; step = st; }
+
+ void nextFrame()
+ {
+ if (cskip-- <= 0) {
+ setFrame( (frame()+step+frameCount())%frameCount() );
+ cskip = QABS(skip);
+ }
+ }
+
+ virtual int type() const { return _type; }
+
+private:
+ int _type;
+ int skip;
+ int cskip;
+ int step;
+};
+
+class KShield : public AnimatedPixmapItem
+{
+public:
+ KShield( QList<QPixmap> &s, QGraphicsScene *c )
+ : AnimatedPixmapItem( s, c ) {}
+
+ virtual int type() const { return ID_SHIELD; }
+};
+
+#endif
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits.ini b/examples/graphicsview/portedasteroids/sprites/bits/bits.ini
new file mode 100644
index 0000000..cb2976f
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits.ini
@@ -0,0 +1,9 @@
+Cyclic_Animation=On
+Width=12
+Height=12
+Final_frame=16 ;; NR_ROTS
+Antialias=On
+Output_Alpha=On
+Output_to_File=On
+Output_File_Type=n
+Input_File_Name=bits.pov
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits.pov b/examples/graphicsview/portedasteroids/sprites/bits/bits.pov
new file mode 100644
index 0000000..9be7ccb
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits.pov
@@ -0,0 +1,31 @@
+
+#version 3.0
+global_settings { assumed_gamma 2.0 }
+
+#include "colors.inc"
+#include "textures.inc"
+#include "metals.inc"
+
+camera {
+ location <15, -15, -100>
+ look_at <0, 0, 0>
+}
+
+light_source { <50, 50, -50> colour White }
+light_source { <0, 0, -50> colour White }
+
+prism {
+ linear_sweep
+ linear_spline
+ 0,
+ 0.2,
+ 5,
+ <2, 0>, <0, 2>, <-1, 1>, <0, -3>, <2, 0>
+ texture { T_Silver_2A }
+
+ rotate <360*clock, 50, 30>
+ scale <20, 20, 20>
+}
+
+
+
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0000.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0000.png
new file mode 100644
index 0000000..5ec9d02
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0001.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0001.png
new file mode 100644
index 0000000..07b4012
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0002.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0002.png
new file mode 100644
index 0000000..8333792
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0003.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0003.png
new file mode 100644
index 0000000..9f1fc02
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0004.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0004.png
new file mode 100644
index 0000000..eb1cc09
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0005.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0005.png
new file mode 100644
index 0000000..149be63
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0006.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0006.png
new file mode 100644
index 0000000..4ac75c8
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0007.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0007.png
new file mode 100644
index 0000000..907241d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0007.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0008.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0008.png
new file mode 100644
index 0000000..1533268
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0008.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0009.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0009.png
new file mode 100644
index 0000000..05402ba
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0009.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0010.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0010.png
new file mode 100644
index 0000000..ca4f229
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0010.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0011.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0011.png
new file mode 100644
index 0000000..91913c0
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0011.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0012.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0012.png
new file mode 100644
index 0000000..e55d439
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0012.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0013.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0013.png
new file mode 100644
index 0000000..9c73436
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0013.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0014.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0014.png
new file mode 100644
index 0000000..f0463a2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0014.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/bits/bits0015.png b/examples/graphicsview/portedasteroids/sprites/bits/bits0015.png
new file mode 100644
index 0000000..bce35aa
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/bits/bits0015.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/exhaust/exhaust.png b/examples/graphicsview/portedasteroids/sprites/exhaust/exhaust.png
new file mode 100644
index 0000000..1d9bc33
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/exhaust/exhaust.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/missile/missile.png b/examples/graphicsview/portedasteroids/sprites/missile/missile.png
new file mode 100644
index 0000000..f1a83b2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/missile/missile.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/powerups/brake.png b/examples/graphicsview/portedasteroids/sprites/powerups/brake.png
new file mode 100644
index 0000000..5f65a11
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/powerups/brake.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/powerups/energy.png b/examples/graphicsview/portedasteroids/sprites/powerups/energy.png
new file mode 100644
index 0000000..4b40074
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/powerups/energy.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/powerups/shield.png b/examples/graphicsview/portedasteroids/sprites/powerups/shield.png
new file mode 100644
index 0000000..6ac6868
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/powerups/shield.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/powerups/shoot.png b/examples/graphicsview/portedasteroids/sprites/powerups/shoot.png
new file mode 100644
index 0000000..5e5bf08
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/powerups/shoot.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/powerups/teleport.png b/examples/graphicsview/portedasteroids/sprites/powerups/teleport.png
new file mode 100644
index 0000000..009c229
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/powerups/teleport.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock1.ini b/examples/graphicsview/portedasteroids/sprites/rock1/rock1.ini
new file mode 100644
index 0000000..e42fc76
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock1.ini
@@ -0,0 +1,9 @@
+Cyclic_Animation=On
+Width=48
+Height=48
+Final_frame=32 ;; NR_ROTS
+Antialias=On
+Output_Alpha=On
+Output_to_File=On
+Output_File_Type=n
+Input_File_Name=rock1.pov
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock1.pov b/examples/graphicsview/portedasteroids/sprites/rock1/rock1.pov
new file mode 100644
index 0000000..58298c0
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock1.pov
@@ -0,0 +1,26 @@
+#include "colors.inc"
+#include "shapes.inc"
+#include "textures.inc"
+// #include "stones.inc"
+
+camera {
+ location <2,2,-6>
+ up <0, 1, 0>
+// right <4/3, 0, 0>
+ look_at <0,0,0>
+}
+
+object { light_source { <10, 5, -5> color red 1.1 green 1.1 blue 1.0 } }
+
+#declare Rock =
+mesh {
+ #include "rock.inc" /* collection of triangle or smooth_triangle data */
+}
+
+object {
+ Rock
+ texture { pigment {White} }
+ scale 1.9
+ rotate <60, 45, 360*clock>
+}
+
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10000.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10000.png
new file mode 100644
index 0000000..5fe70ef
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10001.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10001.png
new file mode 100644
index 0000000..ea66dac
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10002.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10002.png
new file mode 100644
index 0000000..cb55ed0
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10003.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10003.png
new file mode 100644
index 0000000..f82934c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10004.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10004.png
new file mode 100644
index 0000000..04efc2b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10005.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10005.png
new file mode 100644
index 0000000..b9c0d03
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10006.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10006.png
new file mode 100644
index 0000000..7f91267
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10007.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10007.png
new file mode 100644
index 0000000..b28f219
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10007.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10008.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10008.png
new file mode 100644
index 0000000..0153d4a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10008.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10009.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10009.png
new file mode 100644
index 0000000..c04d827
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10009.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10010.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10010.png
new file mode 100644
index 0000000..c7d3c40
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10010.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10011.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10011.png
new file mode 100644
index 0000000..233dfce
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10011.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10012.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10012.png
new file mode 100644
index 0000000..ec7b5ba
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10012.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10013.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10013.png
new file mode 100644
index 0000000..22eac3a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10013.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10014.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10014.png
new file mode 100644
index 0000000..ad1503d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10014.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10015.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10015.png
new file mode 100644
index 0000000..cec22e2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10015.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10016.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10016.png
new file mode 100644
index 0000000..c7a96cb
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10016.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10017.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10017.png
new file mode 100644
index 0000000..c8310bd
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10017.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10018.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10018.png
new file mode 100644
index 0000000..b8d436b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10018.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10019.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10019.png
new file mode 100644
index 0000000..e5d0799
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10019.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10020.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10020.png
new file mode 100644
index 0000000..440f8d0
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10020.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10021.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10021.png
new file mode 100644
index 0000000..de3d54d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10021.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10022.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10022.png
new file mode 100644
index 0000000..698056d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10022.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10023.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10023.png
new file mode 100644
index 0000000..4e6ba04
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10023.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10024.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10024.png
new file mode 100644
index 0000000..3b42850
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10024.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10025.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10025.png
new file mode 100644
index 0000000..6813936
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10025.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10026.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10026.png
new file mode 100644
index 0000000..4a2b171
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10026.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10027.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10027.png
new file mode 100644
index 0000000..30448fb
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10027.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10028.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10028.png
new file mode 100644
index 0000000..43ca1a9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10028.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10029.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10029.png
new file mode 100644
index 0000000..9d7e888
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10029.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10030.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10030.png
new file mode 100644
index 0000000..39b2ad2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10030.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock1/rock10031.png b/examples/graphicsview/portedasteroids/sprites/rock1/rock10031.png
new file mode 100644
index 0000000..257ec7b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock1/rock10031.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock2.ini b/examples/graphicsview/portedasteroids/sprites/rock2/rock2.ini
new file mode 100644
index 0000000..d50e6fa
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock2.ini
@@ -0,0 +1,9 @@
+Cyclic_Animation=On
+Width=32
+Height=32
+Final_frame=32 ;; NR_ROTS
+Antialias=On
+Output_Alpha=On
+Output_to_File=On
+Output_File_Type=n
+Input_File_Name=rock2.pov
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock2.pov b/examples/graphicsview/portedasteroids/sprites/rock2/rock2.pov
new file mode 100644
index 0000000..2f37a20
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock2.pov
@@ -0,0 +1,26 @@
+#include "colors.inc"
+#include "shapes.inc"
+#include "textures.inc"
+// #include "stones.inc"
+
+camera {
+ location <2,2,-6>
+ up <0, 1, 0>
+// right <4/3, 0, 0>
+ look_at <0,0,0>
+}
+
+object { light_source { <10, 5, -5> color red 1.1 green 1.1 blue 1.0 } }
+
+#declare Rock =
+mesh {
+ #include "rock.inc" /* collection of triangle or smooth_triangle data */
+}
+
+object {
+ Rock
+ texture { pigment {White} }
+ scale 1.9
+ rotate <60, 30, 360*clock>
+}
+
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20000.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20000.png
new file mode 100644
index 0000000..5cb52bb
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20001.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20001.png
new file mode 100644
index 0000000..d765be1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20002.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20002.png
new file mode 100644
index 0000000..84e2380
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20003.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20003.png
new file mode 100644
index 0000000..39772b8
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20004.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20004.png
new file mode 100644
index 0000000..b983079
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20005.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20005.png
new file mode 100644
index 0000000..70bb4d8
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20006.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20006.png
new file mode 100644
index 0000000..cf5c2f4
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20007.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20007.png
new file mode 100644
index 0000000..479c21d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20007.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20008.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20008.png
new file mode 100644
index 0000000..871abca
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20008.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20009.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20009.png
new file mode 100644
index 0000000..bc31fbb
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20009.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20010.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20010.png
new file mode 100644
index 0000000..1da9953
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20010.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20011.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20011.png
new file mode 100644
index 0000000..d542c6e
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20011.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20012.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20012.png
new file mode 100644
index 0000000..d104ff9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20012.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20013.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20013.png
new file mode 100644
index 0000000..e12943d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20013.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20014.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20014.png
new file mode 100644
index 0000000..dc7529c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20014.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20015.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20015.png
new file mode 100644
index 0000000..0b49c2c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20015.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20016.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20016.png
new file mode 100644
index 0000000..adbad98
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20016.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20017.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20017.png
new file mode 100644
index 0000000..5a8aeef
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20017.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20018.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20018.png
new file mode 100644
index 0000000..11c6af4
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20018.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20019.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20019.png
new file mode 100644
index 0000000..026b72b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20019.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20020.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20020.png
new file mode 100644
index 0000000..8bc7e20
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20020.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20021.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20021.png
new file mode 100644
index 0000000..e0a7626
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20021.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20022.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20022.png
new file mode 100644
index 0000000..5796e12
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20022.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20023.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20023.png
new file mode 100644
index 0000000..d2cf0c6
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20023.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20024.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20024.png
new file mode 100644
index 0000000..071ce21
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20024.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20025.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20025.png
new file mode 100644
index 0000000..ae8101d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20025.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20026.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20026.png
new file mode 100644
index 0000000..f2681d4
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20026.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20027.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20027.png
new file mode 100644
index 0000000..e83fd41
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20027.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20028.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20028.png
new file mode 100644
index 0000000..5621b4d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20028.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20029.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20029.png
new file mode 100644
index 0000000..aec4a34
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20029.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20030.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20030.png
new file mode 100644
index 0000000..89a8f5f
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20030.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock2/rock20031.png b/examples/graphicsview/portedasteroids/sprites/rock2/rock20031.png
new file mode 100644
index 0000000..69f5375
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock2/rock20031.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock3.ini b/examples/graphicsview/portedasteroids/sprites/rock3/rock3.ini
new file mode 100644
index 0000000..26a3cf9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock3.ini
@@ -0,0 +1,9 @@
+Cyclic_Animation=On
+Width=20
+Height=20
+Final_frame=32 ;; NR_ROTS
+Antialias=On
+Output_Alpha=On
+Output_to_File=On
+Output_File_Type=n
+Input_File_Name=rock3.pov
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock3.pov b/examples/graphicsview/portedasteroids/sprites/rock3/rock3.pov
new file mode 100644
index 0000000..2f37a20
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock3.pov
@@ -0,0 +1,26 @@
+#include "colors.inc"
+#include "shapes.inc"
+#include "textures.inc"
+// #include "stones.inc"
+
+camera {
+ location <2,2,-6>
+ up <0, 1, 0>
+// right <4/3, 0, 0>
+ look_at <0,0,0>
+}
+
+object { light_source { <10, 5, -5> color red 1.1 green 1.1 blue 1.0 } }
+
+#declare Rock =
+mesh {
+ #include "rock.inc" /* collection of triangle or smooth_triangle data */
+}
+
+object {
+ Rock
+ texture { pigment {White} }
+ scale 1.9
+ rotate <60, 30, 360*clock>
+}
+
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30000.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30000.png
new file mode 100644
index 0000000..de1205a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30001.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30001.png
new file mode 100644
index 0000000..12ebc00
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30002.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30002.png
new file mode 100644
index 0000000..ebb899e
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30003.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30003.png
new file mode 100644
index 0000000..1ff7a06
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30004.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30004.png
new file mode 100644
index 0000000..5b505bf
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30005.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30005.png
new file mode 100644
index 0000000..f9680dc
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30006.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30006.png
new file mode 100644
index 0000000..e29746a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30007.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30007.png
new file mode 100644
index 0000000..f01baa6
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30007.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30008.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30008.png
new file mode 100644
index 0000000..cd10711
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30008.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30009.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30009.png
new file mode 100644
index 0000000..4f32955
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30009.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30010.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30010.png
new file mode 100644
index 0000000..bb61d54
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30010.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30011.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30011.png
new file mode 100644
index 0000000..8486e5a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30011.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30012.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30012.png
new file mode 100644
index 0000000..d9ae419
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30012.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30013.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30013.png
new file mode 100644
index 0000000..ce69400
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30013.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30014.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30014.png
new file mode 100644
index 0000000..981e92c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30014.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30015.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30015.png
new file mode 100644
index 0000000..b8fb00c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30015.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30016.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30016.png
new file mode 100644
index 0000000..72bc42f
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30016.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30017.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30017.png
new file mode 100644
index 0000000..c89f358
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30017.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30018.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30018.png
new file mode 100644
index 0000000..e1ba724
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30018.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30019.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30019.png
new file mode 100644
index 0000000..5f004a7
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30019.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30020.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30020.png
new file mode 100644
index 0000000..58009bf
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30020.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30021.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30021.png
new file mode 100644
index 0000000..8d9549c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30021.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30022.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30022.png
new file mode 100644
index 0000000..1e8a1c2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30022.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30023.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30023.png
new file mode 100644
index 0000000..9b960d6
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30023.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30024.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30024.png
new file mode 100644
index 0000000..6c15f2b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30024.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30025.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30025.png
new file mode 100644
index 0000000..12b05da
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30025.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30026.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30026.png
new file mode 100644
index 0000000..16190e9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30026.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30027.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30027.png
new file mode 100644
index 0000000..a862501
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30027.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30028.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30028.png
new file mode 100644
index 0000000..e3e0c18
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30028.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30029.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30029.png
new file mode 100644
index 0000000..ec70b84
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30029.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30030.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30030.png
new file mode 100644
index 0000000..da48df1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30030.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/rock3/rock30031.png b/examples/graphicsview/portedasteroids/sprites/rock3/rock30031.png
new file mode 100644
index 0000000..c1dc1b9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/rock3/rock30031.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0000.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0000.png
new file mode 100644
index 0000000..7233254
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0001.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0001.png
new file mode 100644
index 0000000..2b0bc9d
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0002.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0002.png
new file mode 100644
index 0000000..cdc0fe3
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0003.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0003.png
new file mode 100644
index 0000000..979ed5a
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0004.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0004.png
new file mode 100644
index 0000000..0bb93a2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0005.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0005.png
new file mode 100644
index 0000000..32210bd
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/shield/shield0006.png b/examples/graphicsview/portedasteroids/sprites/shield/shield0006.png
new file mode 100644
index 0000000..76c9920
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/shield/shield0006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship.ini b/examples/graphicsview/portedasteroids/sprites/ship/ship.ini
new file mode 100644
index 0000000..479cc20
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship.ini
@@ -0,0 +1,9 @@
+Cyclic_Animation=On
+Width=42
+Height=42
+Final_frame=32 ;; NR_ROTS
+Antialias=On
+Output_Alpha=On
+Output_to_File=On
+Output_File_Type=n
+Input_File_Name=ship.pov
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship.pov b/examples/graphicsview/portedasteroids/sprites/ship/ship.pov
new file mode 100644
index 0000000..8f185cd
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship.pov
@@ -0,0 +1,128 @@
+
+#version 3.0
+global_settings { assumed_gamma 2.0 }
+
+#include "colors.inc"
+#include "textures.inc"
+#include "metals.inc"
+
+camera {
+ orthographic
+ up <0, 130, 0>
+ right <130, 0, 0>
+ location <0, 0, -130>
+ look_at <0, 0, 0>
+}
+
+light_source { <50, 25, -25> colour White }
+light_source { <0, 0, -100> colour Gray80 }
+
+#declare ShipColor = color red 1.0 green 1.0 blue 0.9
+
+#declare BaseTexture =
+texture {
+ pigment { ShipColor }
+}
+
+#declare Grubby =
+texture {
+ pigment {
+ bozo
+ color_map {
+ [0.0 color rgbt <1, 1, 1, 1>]
+ [0.8 color rgbt <0.9, 0.9, 0.9, 0.5>]
+ [1.0 color rgbt <0.8, 0.8, 0.8, 0.5>]
+ }
+ turbulence 2.0
+ scale 3
+ }
+}
+
+#declare ShipTexture =
+texture { BaseTexture }
+texture { Grubby }
+
+union {
+ cone {
+ <12, 0, 0>, 0.5
+ <11, 0, 0>, 1.0
+ texture { ShipTexture }
+ }
+ cone {
+ <11, 0, 0>, 1.0
+ <8, 0, 0>, 2.0
+ texture { ShipTexture }
+ }
+ cone {
+ <8, 0, 0>, 2.0
+ <3.5, 0, 0>, 3.8
+ texture { ShipTexture }
+ }
+ difference {
+ cone {
+ <8, 0, -0.01>, 2.0
+ <3.5, 0, -0.01>, 3.8
+ pigment { color Gray20 }
+ }
+ box {
+ <9, -4.0, -3.7>,
+ <2, 4.0, 10>
+ rotate <0, -18, 0>
+ }
+ box {
+ <6.5, -4.0, -8>,
+ <10, 4.0, 8>
+ }
+ box {
+ <2, -4.0, -8>,
+ <4.5, 4.0, 8>
+ }
+ }
+ cone {
+ <3.5, 0, 0>, 3.8
+ <2, 0, 0>, 4.0
+ texture { ShipTexture }
+ }
+ cylinder {
+ <2, 0, 0>,
+ <-9, 0, 0>,
+ 4.0
+ texture { ShipTexture }
+ }
+ cone {
+ <-9, 0, 0>, 4.0
+ <-10, 0, 0>, 3.5
+ texture { ShipTexture }
+ }
+ prism {
+ linear_sweep
+ linear_spline
+ 0,
+ 0.5,
+ 4,
+ <7.5, 0>, <-7.5, 10>, <-7.5, -10>, <7.5, 0>
+ rotate <90, 0, 0>
+ texture { T_Silver_2A }
+ texture { ShipTexture }
+ }
+ prism {
+ linear_sweep
+ linear_spline
+ -0.5,
+ 0.5,
+ 4,
+ <4, 0>, <-7.5, 5>, <-7.5, -5>, <4, 0>
+ pigment { color White }
+ }
+ cone {
+ <-12, 0, 0>, 3.0
+ <-10, 0, 0>, 2.0
+ texture { T_Silver_2A }
+ pigment { color Gray60 }
+ }
+
+ rotate <0, 0,-360*clock>
+ scale <5, 5, 5>
+}
+
+
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0000.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0000.png
new file mode 100644
index 0000000..a8f1bb3
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0000.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0001.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0001.png
new file mode 100644
index 0000000..861f130
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0001.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0002.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0002.png
new file mode 100644
index 0000000..418ced1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0002.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0003.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0003.png
new file mode 100644
index 0000000..50a386b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0003.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0004.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0004.png
new file mode 100644
index 0000000..f2bc0bc
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0004.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0005.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0005.png
new file mode 100644
index 0000000..7280485
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0005.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0006.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0006.png
new file mode 100644
index 0000000..51d26e9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0006.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0007.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0007.png
new file mode 100644
index 0000000..682c042
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0007.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0008.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0008.png
new file mode 100644
index 0000000..003d7fa
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0008.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0009.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0009.png
new file mode 100644
index 0000000..538b879
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0009.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0010.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0010.png
new file mode 100644
index 0000000..17999cd
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0010.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0011.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0011.png
new file mode 100644
index 0000000..1a4bbe9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0011.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0012.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0012.png
new file mode 100644
index 0000000..2523d85
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0012.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0013.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0013.png
new file mode 100644
index 0000000..8bd5971
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0013.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0014.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0014.png
new file mode 100644
index 0000000..a164ab7
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0014.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0015.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0015.png
new file mode 100644
index 0000000..ca8e0b9
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0015.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0016.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0016.png
new file mode 100644
index 0000000..cfaf8c4
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0016.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0017.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0017.png
new file mode 100644
index 0000000..8049617
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0017.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0018.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0018.png
new file mode 100644
index 0000000..4a3421b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0018.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0019.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0019.png
new file mode 100644
index 0000000..786d375
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0019.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0020.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0020.png
new file mode 100644
index 0000000..bd4365c
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0020.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0021.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0021.png
new file mode 100644
index 0000000..eb358c1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0021.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0022.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0022.png
new file mode 100644
index 0000000..eb865e1
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0022.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0023.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0023.png
new file mode 100644
index 0000000..3738ce2
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0023.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0024.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0024.png
new file mode 100644
index 0000000..a7c1adc
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0024.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0025.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0025.png
new file mode 100644
index 0000000..2ca3aae
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0025.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0026.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0026.png
new file mode 100644
index 0000000..4661ca5
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0026.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0027.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0027.png
new file mode 100644
index 0000000..f5c9203
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0027.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0028.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0028.png
new file mode 100644
index 0000000..08353d4
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0028.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0029.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0029.png
new file mode 100644
index 0000000..8685d31
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0029.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0030.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0030.png
new file mode 100644
index 0000000..78dd469
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0030.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/sprites/ship/ship0031.png b/examples/graphicsview/portedasteroids/sprites/ship/ship0031.png
new file mode 100644
index 0000000..6cd0643
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/sprites/ship/ship0031.png
Binary files differ
diff --git a/examples/graphicsview/portedasteroids/toplevel.cpp b/examples/graphicsview/portedasteroids/toplevel.cpp
new file mode 100644
index 0000000..1aecc84
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/toplevel.cpp
@@ -0,0 +1,543 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+// --- toplevel.cpp ---
+#include <q3accel.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlcdnumber.h>
+#include <qpushbutton.h>
+
+#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QShowEvent>
+#include <Q3Frame>
+#include <QPixmap>
+#include <QHideEvent>
+#include <QKeyEvent>
+#include <Q3VBoxLayout>
+
+#include "toplevel.h"
+#include "ledmeter.h"
+
+
+#define SB_SCORE 1
+#define SB_LEVEL 2
+#define SB_SHIPS 3
+
+struct SLevel
+{
+ int nrocks;
+ double rockSpeed;
+};
+
+#define MAX_LEVELS 16
+
+SLevel levels[MAX_LEVELS] =
+{
+ { 1, 0.4 },
+ { 1, 0.6 },
+ { 2, 0.5 },
+ { 2, 0.7 },
+ { 2, 0.8 },
+ { 3, 0.6 },
+ { 3, 0.7 },
+ { 3, 0.8 },
+ { 4, 0.6 },
+ { 4, 0.7 },
+ { 4, 0.8 },
+ { 5, 0.7 },
+ { 5, 0.8 },
+ { 5, 0.9 },
+ { 5, 1.0 }
+};
+
+const char *soundEvents[] =
+{
+ "ShipDestroyed",
+ "RockDestroyed",
+ 0
+};
+
+const char *soundDefaults[] =
+{
+ "Explosion.wav",
+ "ploop.wav",
+ 0
+};
+
+
+KAstTopLevel::KAstTopLevel( QWidget *parent, const char *name )
+ : Q3MainWindow( parent, name, 0 )
+{
+ QWidget *border = new QWidget( this );
+ border->setBackgroundColor( Qt::black );
+ setCentralWidget( border );
+
+ Q3VBoxLayout *borderLayout = new Q3VBoxLayout( border );
+ borderLayout->addStretch( 1 );
+
+ QWidget *mainWin = new QWidget( border );
+ mainWin->setFixedSize(640, 480);
+ borderLayout->addWidget( mainWin, 0, Qt::AlignHCenter );
+
+ borderLayout->addStretch( 1 );
+
+ view = new KAsteroidsView( mainWin );
+ view->setFocusPolicy( Qt::StrongFocus );
+ connect( view, SIGNAL( shipKilled() ), SLOT( slotShipKilled() ) );
+ connect( view, SIGNAL( rockHit(int) ), SLOT( slotRockHit(int) ) );
+ connect( view, SIGNAL( rocksRemoved() ), SLOT( slotRocksRemoved() ) );
+ connect( view, SIGNAL( updateVitals() ), SLOT( slotUpdateVitals() ) );
+
+ Q3VBoxLayout *vb = new Q3VBoxLayout( mainWin );
+ Q3HBoxLayout *hb = new Q3HBoxLayout;
+ Q3HBoxLayout *hbd = new Q3HBoxLayout;
+ vb->addLayout( hb );
+
+ QFont labelFont( "helvetica", 24 );
+ QColorGroup grp( Qt::darkGreen, Qt::black, QColor( 128, 128, 128 ),
+ QColor( 64, 64, 64 ), Qt::black, Qt::darkGreen, Qt::black );
+ QPalette pal( grp, grp, grp );
+
+ mainWin->setPalette( pal );
+
+ hb->addSpacing( 10 );
+
+ QLabel *label;
+ label = new QLabel( tr("Score"), mainWin );
+ label->setFont( labelFont );
+ label->setPalette( pal );
+ label->setFixedWidth( label->sizeHint().width() );
+ hb->addWidget( label );
+
+ scoreLCD = new QLCDNumber( 6, mainWin );
+ scoreLCD->setFrameStyle( Q3Frame::NoFrame );
+ scoreLCD->setSegmentStyle( QLCDNumber::Flat );
+ scoreLCD->setFixedWidth( 150 );
+ scoreLCD->setPalette( pal );
+ hb->addWidget( scoreLCD );
+ hb->addStretch( 10 );
+
+ label = new QLabel( tr("Level"), mainWin );
+ label->setFont( labelFont );
+ label->setPalette( pal );
+ label->setFixedWidth( label->sizeHint().width() );
+ hb->addWidget( label );
+
+ levelLCD = new QLCDNumber( 2, mainWin );
+ levelLCD->setFrameStyle( Q3Frame::NoFrame );
+ levelLCD->setSegmentStyle( QLCDNumber::Flat );
+ levelLCD->setFixedWidth( 70 );
+ levelLCD->setPalette( pal );
+ hb->addWidget( levelLCD );
+ hb->addStretch( 10 );
+
+ label = new QLabel( tr("Ships"), mainWin );
+ label->setFont( labelFont );
+ label->setFixedWidth( label->sizeHint().width() );
+ label->setPalette( pal );
+ hb->addWidget( label );
+
+ shipsLCD = new QLCDNumber( 1, mainWin );
+ shipsLCD->setFrameStyle( Q3Frame::NoFrame );
+ shipsLCD->setSegmentStyle( QLCDNumber::Flat );
+ shipsLCD->setFixedWidth( 40 );
+ shipsLCD->setPalette( pal );
+ hb->addWidget( shipsLCD );
+
+ hb->addStrut( 30 );
+
+ vb->addWidget( view, 10 );
+
+// -- bottom layout:
+ vb->addLayout( hbd );
+
+ QFont smallFont( "helvetica", 14 );
+ hbd->addSpacing( 10 );
+
+ QString sprites_prefix = ":/trolltech/examples/graphicsview/portedasteroids/sprites/";
+/*
+ label = new QLabel( tr( "T" ), mainWin );
+ label->setFont( smallFont );
+ label->setFixedWidth( label->sizeHint().width() );
+ label->setPalette( pal );
+ hbd->addWidget( label );
+
+ teleportsLCD = new QLCDNumber( 1, mainWin );
+ teleportsLCD->setFrameStyle( QFrame::NoFrame );
+ teleportsLCD->setSegmentStyle( QLCDNumber::Flat );
+ teleportsLCD->setPalette( pal );
+ teleportsLCD->setFixedHeight( 20 );
+ hbd->addWidget( teleportsLCD );
+
+ hbd->addSpacing( 10 );
+*/
+ QPixmap pm( sprites_prefix + "powerups/brake.png" );
+ label = new QLabel( mainWin );
+ label->setPixmap( pm );
+ label->setFixedWidth( label->sizeHint().width() );
+ label->setPalette( pal );
+ hbd->addWidget( label );
+
+ brakesLCD = new QLCDNumber( 1, mainWin );
+ brakesLCD->setFrameStyle( Q3Frame::NoFrame );
+ brakesLCD->setSegmentStyle( QLCDNumber::Flat );
+ brakesLCD->setPalette( pal );
+ brakesLCD->setFixedHeight( 20 );
+ hbd->addWidget( brakesLCD );
+
+ hbd->addSpacing( 10 );
+
+ pm.load( sprites_prefix + "powerups/shield.png" );
+ label = new QLabel( mainWin );
+ label->setPixmap( pm );
+ label->setFixedWidth( label->sizeHint().width() );
+ label->setPalette( pal );
+ hbd->addWidget( label );
+
+ shieldLCD = new QLCDNumber( 1, mainWin );
+ shieldLCD->setFrameStyle( Q3Frame::NoFrame );
+ shieldLCD->setSegmentStyle( QLCDNumber::Flat );
+ shieldLCD->setPalette( pal );
+ shieldLCD->setFixedHeight( 20 );
+ hbd->addWidget( shieldLCD );
+
+ hbd->addSpacing( 10 );
+
+ pm.load( sprites_prefix + "powerups/shoot.png" );
+ label = new QLabel( mainWin );
+ label->setPixmap( pm );
+ label->setFixedWidth( label->sizeHint().width() );
+ label->setPalette( pal );
+ hbd->addWidget( label );
+
+ shootLCD = new QLCDNumber( 1, mainWin );
+ shootLCD->setFrameStyle( Q3Frame::NoFrame );
+ shootLCD->setSegmentStyle( QLCDNumber::Flat );
+ shootLCD->setPalette( pal );
+ shootLCD->setFixedHeight( 20 );
+ hbd->addWidget( shootLCD );
+
+ hbd->addStretch( 1 );
+
+ label = new QLabel( tr( "Fuel" ), mainWin );
+ label->setFont( smallFont );
+ label->setFixedWidth( label->sizeHint().width() + 10 );
+ label->setPalette( pal );
+ hbd->addWidget( label );
+
+ powerMeter = new KALedMeter( mainWin );
+ powerMeter->setFrameStyle( Q3Frame::Box | Q3Frame::Plain );
+ powerMeter->setRange( MAX_POWER_LEVEL );
+ powerMeter->addColorRange( 10, Qt::darkRed );
+ powerMeter->addColorRange( 20, QColor(160, 96, 0) );
+ powerMeter->addColorRange( 70, Qt::darkGreen );
+ powerMeter->setCount( 40 );
+ powerMeter->setPalette( pal );
+ powerMeter->setFixedSize( 200, 12 );
+ hbd->addWidget( powerMeter );
+
+ shipsRemain = 3;
+ showHiscores = FALSE;
+
+ actions.insert( Qt::Key_Up, Thrust );
+ actions.insert( Qt::Key_Left, RotateLeft );
+ actions.insert( Qt::Key_Right, RotateRight );
+ actions.insert( Qt::Key_Space, Shoot );
+ actions.insert( Qt::Key_Z, Teleport );
+ actions.insert( Qt::Key_X, Brake );
+ actions.insert( Qt::Key_S, Shield );
+ actions.insert( Qt::Key_P, Pause );
+ actions.insert( Qt::Key_L, Launch );
+ actions.insert( Qt::Key_N, NewGame );
+
+ view->showText( tr( "Press N to start playing" ), Qt::yellow );
+}
+
+KAstTopLevel::~KAstTopLevel()
+{
+}
+
+void KAstTopLevel::playSound( const char * )
+{
+}
+
+void KAstTopLevel::keyPressEvent( QKeyEvent *event )
+{
+ if ( event->isAutoRepeat() || !actions.contains( event->key() ) )
+ {
+ event->ignore();
+ return;
+ }
+
+ Action a = actions[ event->key() ];
+
+ switch ( a )
+ {
+ case RotateLeft:
+ view->rotateLeft( TRUE );
+ break;
+
+ case RotateRight:
+ view->rotateRight( TRUE );
+ break;
+
+ case Thrust:
+ view->thrust( TRUE );
+ break;
+
+ case Shoot:
+ view->shoot( TRUE );
+ break;
+
+ case Shield:
+ view->setShield( TRUE );
+ break;
+
+ case Teleport:
+ view->teleport( TRUE );
+ break;
+
+ case Brake:
+ view->brake( TRUE );
+ break;
+
+ default:
+ event->ignore();
+ return;
+ }
+ event->accept();
+}
+
+void KAstTopLevel::keyReleaseEvent( QKeyEvent *event )
+{
+ if ( event->isAutoRepeat() || !actions.contains( event->key() ) )
+ {
+ event->ignore();
+ return;
+ }
+
+ Action a = actions[ event->key() ];
+
+ switch ( a )
+ {
+ case RotateLeft:
+ view->rotateLeft( FALSE );
+ break;
+
+ case RotateRight:
+ view->rotateRight( FALSE );
+ break;
+
+ case Thrust:
+ view->thrust( FALSE );
+ break;
+
+ case Shoot:
+ view->shoot( FALSE );
+ break;
+
+ case Brake:
+ view->brake( FALSE );
+ break;
+
+ case Shield:
+ view->setShield( FALSE );
+ break;
+
+ case Teleport:
+ view->teleport( FALSE );
+ break;
+
+ case Launch:
+ if ( waitShip )
+ {
+ view->newShip();
+ waitShip = FALSE;
+ view->hideText();
+ }
+ else
+ {
+ event->ignore();
+ return;
+ }
+ break;
+
+ case NewGame:
+ slotNewGame();
+ break;
+/*
+ case Pause:
+ {
+ view->pause( TRUE );
+ QMessageBox::information( this,
+ tr("KAsteroids is paused"),
+ tr("Paused") );
+ view->pause( FALSE );
+ }
+ break;
+*/
+ default:
+ event->ignore();
+ return;
+ }
+
+ event->accept();
+}
+
+void KAstTopLevel::showEvent( QShowEvent *e )
+{
+ Q3MainWindow::showEvent( e );
+ view->pause( FALSE );
+ view->setFocus();
+}
+
+void KAstTopLevel::hideEvent( QHideEvent *e )
+{
+ Q3MainWindow::hideEvent( e );
+ view->pause( TRUE );
+}
+
+void KAstTopLevel::slotNewGame()
+{
+ score = 0;
+ shipsRemain = SB_SHIPS;
+ scoreLCD->display( 0 );
+ level = 0;
+ levelLCD->display( level+1 );
+ shipsLCD->display( shipsRemain-1 );
+ view->newGame();
+ view->setRockSpeed( levels[0].rockSpeed );
+ view->addRocks( levels[0].nrocks );
+// view->showText( tr( "Press L to launch." ), yellow );
+ view->newShip();
+ waitShip = FALSE;
+ view->hideText();
+ isPaused = FALSE;
+}
+
+void KAstTopLevel::slotShipKilled()
+{
+ shipsRemain--;
+ shipsLCD->display( shipsRemain-1 );
+
+ playSound( "ShipDestroyed" );
+
+ if ( shipsRemain )
+ {
+ waitShip = TRUE;
+ view->showText( tr( "Ship Destroyed. Press L to launch."), Qt::yellow );
+ }
+ else
+ {
+ view->showText( tr("Game Over!"), Qt::red );
+ view->endGame();
+ doStats();
+// highscore->addEntry( score, level, showHiscores );
+ }
+}
+
+void KAstTopLevel::slotRockHit( int size )
+{
+ switch ( size )
+ {
+ case 0:
+ score += 10;
+ break;
+
+ case 1:
+ score += 20;
+ break;
+
+ default:
+ score += 40;
+ }
+
+ playSound( "RockDestroyed" );
+
+ scoreLCD->display( score );
+}
+
+void KAstTopLevel::slotRocksRemoved()
+{
+ level++;
+
+ if ( level >= MAX_LEVELS )
+ level = MAX_LEVELS - 1;
+
+ view->setRockSpeed( levels[level-1].rockSpeed );
+ view->addRocks( levels[level-1].nrocks );
+
+ levelLCD->display( level+1 );
+}
+
+void KAstTopLevel::doStats()
+{
+ QString r( "0.00" );
+ if ( view->shots() )
+ r = QString::number( (double)view->hits() / view->shots() * 100.0,
+ 'g', 2 );
+
+/* multi-line text broken in Qt 3
+ QString s = tr( "Game Over\n\nShots fired:\t%1\n Hit:\t%2\n Missed:\t%3\nHit ratio:\t%4 %\n\nPress N for a new game" )
+ .arg(view->shots()).arg(view->hits())
+ .arg(view->shots() - view->hits())
+ .arg(r);
+*/
+
+ view->showText( "Game Over. Press N for a new game.", Qt::yellow, FALSE );
+}
+
+void KAstTopLevel::slotUpdateVitals()
+{
+ brakesLCD->display( view->brakeCount() );
+ shieldLCD->display( view->shieldCount() );
+ shootLCD->display( view->shootCount() );
+// teleportsLCD->display( view->teleportCount() );
+ powerMeter->setValue( view->power() );
+}
diff --git a/examples/graphicsview/portedasteroids/toplevel.h b/examples/graphicsview/portedasteroids/toplevel.h
new file mode 100644
index 0000000..67781da
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/toplevel.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#ifndef __KAST_TOPLEVEL_H__
+#define __KAST_TOPLEVEL_H__
+
+#include <q3mainwindow.h>
+#include <q3dict.h>
+#include <qmap.h>
+//Added by qt3to4:
+#include <QShowEvent>
+#include <QHideEvent>
+#include <QKeyEvent>
+
+#include "view.h"
+
+
+class KALedMeter;
+QT_BEGIN_NAMESPACE
+class QLCDNumber;
+QT_END_NAMESPACE
+
+class KAstTopLevel : public Q3MainWindow
+{
+ Q_OBJECT
+public:
+ KAstTopLevel( QWidget *parent=0, const char *name=0 );
+ virtual ~KAstTopLevel();
+
+private:
+ void playSound( const char *snd );
+ void readSoundMapping();
+ void doStats();
+
+protected:
+ virtual void showEvent( QShowEvent * );
+ virtual void hideEvent( QHideEvent * );
+ virtual void keyPressEvent( QKeyEvent *event );
+ virtual void keyReleaseEvent( QKeyEvent *event );
+
+private slots:
+ void slotNewGame();
+
+ void slotShipKilled();
+ void slotRockHit( int size );
+ void slotRocksRemoved();
+
+ void slotUpdateVitals();
+
+private:
+ KAsteroidsView *view;
+ QLCDNumber *scoreLCD;
+ QLCDNumber *levelLCD;
+ QLCDNumber *shipsLCD;
+
+ QLCDNumber *teleportsLCD;
+// QLCDNumber *bombsLCD;
+ QLCDNumber *brakesLCD;
+ QLCDNumber *shieldLCD;
+ QLCDNumber *shootLCD;
+ KALedMeter *powerMeter;
+
+ bool sound;
+ Q3Dict<QString> soundDict;
+
+ // waiting for user to press Enter to launch a ship
+ bool waitShip;
+ bool isPaused;
+
+ int shipsRemain;
+ int score;
+ int level;
+ bool showHiscores;
+
+ enum Action { Launch, Thrust, RotateLeft, RotateRight, Shoot, Teleport,
+ Brake, Shield, Pause, NewGame };
+
+ QMap<int,Action> actions;
+};
+
+#endif
+
diff --git a/examples/graphicsview/portedasteroids/view.cpp b/examples/graphicsview/portedasteroids/view.cpp
new file mode 100644
index 0000000..fc6956b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/view.cpp
@@ -0,0 +1,967 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include <qapplication.h>
+#include <qnamespace.h>
+#include <q3accel.h>
+#include <qmessagebox.h>
+#include <q3scrollview.h>
+#include <qdir.h>
+#include <QGraphicsItem>
+//Added by qt3to4:
+#include <QTimerEvent>
+#include <QPixmap>
+#include <QResizeEvent>
+#include <QShowEvent>
+
+#include "view.h"
+
+#define IMG_BACKGROUND ":/trolltech/examples/graphicsview/portedasteroids/bg.png"
+
+#define REFRESH_DELAY 33
+#define SHIP_SPEED 0.3
+#define MISSILE_SPEED 10.0
+#define SHIP_STEPS 64
+#define ROTATE_RATE 2
+#define SHIELD_ON_COST 1
+#define SHIELD_HIT_COST 30
+#define BRAKE_ON_COST 4
+
+#define MAX_ROCK_SPEED 2.5
+#define MAX_POWERUP_SPEED 1.5
+#define MAX_SHIP_SPEED 12
+#define MAX_BRAKES 5
+#define MAX_SHIELDS 5
+#define MAX_FIREPOWER 5
+
+#define TEXT_SPEED 4
+
+#define PI_X_2 6.283185307
+#ifndef M_PI
+#define M_PI 3.141592654
+#endif
+
+static struct
+{
+ int id;
+ const char *path;
+ int frames;
+}
+kas_animations [] =
+{
+ { ID_ROCK_LARGE, "rock1/rock1%1.png", 32 },
+ { ID_ROCK_MEDIUM, "rock2/rock2%1.png", 32 },
+ { ID_ROCK_SMALL, "rock3/rock3%1.png", 32 },
+ { ID_SHIP, "ship/ship%1.png", 32 },
+ { ID_MISSILE, "missile/missile.png", 1 },
+ { ID_BIT, "bits/bits%1.png", 16 },
+ { ID_EXHAUST, "exhaust/exhaust.png", 1 },
+ { ID_ENERGY_POWERUP, "powerups/energy.png", 1 },
+// { ID_TELEPORT_POWERUP, "powerups/teleport%1.png", 12 },
+ { ID_BRAKE_POWERUP, "powerups/brake.png", 1 },
+ { ID_SHIELD_POWERUP, "powerups/shield.png", 1 },
+ { ID_SHOOT_POWERUP, "powerups/shoot.png", 1 },
+ { ID_SHIELD, "shield/shield%1.png", 6 },
+ { 0, 0, 0 }
+};
+
+KAsteroidsView::KAsteroidsView( QWidget *parent, const char *name )
+ : QWidget( parent, name ),
+ field(0, 0, 640, 440),
+ view(&field,this)
+{
+ view.setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
+ view.setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
+ view.setCacheMode(QGraphicsView::CacheBackground);
+ view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ view.setOptimizationFlags(QGraphicsView::DontClipPainter
+ | QGraphicsView::DontSavePainterState
+ | QGraphicsView::DontAdjustForAntialiasing);
+ view.viewport()->setFocusProxy( this );
+ rocks.setAutoDelete( TRUE );
+ missiles.setAutoDelete( TRUE );
+ bits.setAutoDelete( TRUE );
+ powerups.setAutoDelete( TRUE );
+ exhaust.setAutoDelete( TRUE );
+
+ QPixmap pm( IMG_BACKGROUND );
+ field.setBackgroundBrush( pm );
+
+ textSprite = new QGraphicsTextItem( 0, &field );
+ QFont font( "helvetica", 18 );
+ textSprite->setFont( font );
+ textSprite->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+
+ shield = 0;
+ shieldOn = FALSE;
+ refreshRate = REFRESH_DELAY;
+
+ initialized = readSprites();
+
+ shieldTimer = new QTimer( this );
+ connect( shieldTimer, SIGNAL(timeout()), this, SLOT(hideShield()) );
+ mTimerId = -1;
+
+ shipPower = MAX_POWER_LEVEL;
+ vitalsChanged = TRUE;
+ can_destroy_powerups = FALSE;
+
+ mPaused = TRUE;
+
+ if ( !initialized ) {
+ textSprite->setHtml( tr("<font color=red>Error: Cannot read sprite images</font>") );
+ textSprite->setPos( (field.width()-textSprite->boundingRect().width()) / 2,
+ (field.height()-textSprite->boundingRect().height()) / 2 );
+ }
+}
+
+// - - -
+
+KAsteroidsView::~KAsteroidsView()
+{
+}
+
+// - - -
+
+void KAsteroidsView::reset()
+{
+ if ( !initialized )
+ return;
+ rocks.clear();
+ missiles.clear();
+ bits.clear();
+ powerups.clear();
+ exhaust.clear();
+
+ shotsFired = 0;
+ shotsHit = 0;
+
+ rockSpeed = 1.0;
+ powerupSpeed = 1.0;
+ mFrameNum = 0;
+ mPaused = FALSE;
+
+ ship->hide();
+ shield->hide();
+/*
+ if ( mTimerId >= 0 ) {
+ killTimer( mTimerId );
+ mTimerId = -1;
+ }
+*/
+}
+
+// - --
+
+void KAsteroidsView::newGame()
+{
+ if ( !initialized )
+ return;
+ if ( shieldOn )
+ {
+ shield->hide();
+ shieldOn = FALSE;
+ }
+ reset();
+ if ( mTimerId < 0 )
+ mTimerId = startTimer( REFRESH_DELAY );
+ emit updateVitals();
+}
+
+// - - -
+
+void KAsteroidsView::endGame()
+{
+}
+
+void KAsteroidsView::pause( bool p )
+{
+ if ( !initialized )
+ return;
+ if ( !mPaused && p ) {
+ if ( mTimerId >= 0 ) {
+ killTimer( mTimerId );
+ mTimerId = -1;
+ }
+ } else if ( mPaused && !p )
+ mTimerId = startTimer( REFRESH_DELAY );
+ mPaused = p;
+}
+
+// - - -
+
+void KAsteroidsView::newShip()
+{
+ if ( !initialized )
+ return;
+ ship->setPos( width()/2, height()/2 );
+ ship->setFrame( 0 );
+ shield->setPos( width()/2, height()/2 );
+ shield->setFrame( 0 );
+ ship->setVelocity( 0.0, 0.0 );
+ shipDx = 0;
+ shipDy = 0;
+ shipAngle = 0;
+ rotateL = FALSE;
+ rotateR = FALSE;
+ thrustShip = FALSE;
+ shootShip = FALSE;
+ brakeShip = FALSE;
+ teleportShip = FALSE;
+ shieldOn = TRUE;
+ shootDelay = 0;
+ shipPower = MAX_POWER_LEVEL;
+ rotateRate = ROTATE_RATE;
+ rotateSlow = 0;
+
+ mBrakeCount = 0;
+ mTeleportCount = 0;
+ mShootCount = 0;
+
+ ship->show();
+ shield->show();
+ mShieldCount = 1; // just in case the ship appears on a rock.
+ shieldTimer->start( 1000, TRUE );
+}
+
+void KAsteroidsView::setShield( bool s )
+{
+ if ( !initialized )
+ return;
+ if ( shieldTimer->isActive() && !s ) {
+ shieldTimer->stop();
+ hideShield();
+ } else {
+ shieldOn = s && mShieldCount;
+ }
+}
+
+void KAsteroidsView::brake( bool b )
+{
+ if ( !initialized )
+ return;
+ if ( mBrakeCount )
+ {
+ if ( brakeShip && !b )
+ {
+ rotateL = FALSE;
+ rotateR = FALSE;
+ thrustShip = FALSE;
+ rotateRate = ROTATE_RATE;
+ }
+
+ brakeShip = b;
+ }
+}
+
+// - - -
+
+bool KAsteroidsView::readSprites()
+{
+ QString sprites_prefix = ":/trolltech/examples/graphicsview/portedasteroids/sprites/";
+
+ int i = 0;
+ while ( kas_animations[i].id )
+ {
+ QList<QPixmap> anim;
+ QString wildcard = sprites_prefix + kas_animations[i].path;
+ wildcard.replace("%1", "*");
+ QFileInfo fi(wildcard);
+ foreach (QString entry, QDir(fi.path(), fi.fileName()).entryList())
+ anim << QPixmap(fi.path() + "/" + entry);
+ animation.insert( kas_animations[i].id, anim );
+ i++;
+ }
+
+ ship = new AnimatedPixmapItem( animation[ID_SHIP], &field );
+ ship->hide();
+
+ shield = new KShield( animation[ID_SHIELD], &field );
+ shield->hide();
+
+ return (!ship->image(0).isNull() && !shield->image(0).isNull());
+}
+
+// - - -
+
+void KAsteroidsView::addRocks( int num )
+{
+ if ( !initialized )
+ return;
+ for ( int i = 0; i < num; i++ )
+ {
+ KRock *rock = new KRock( animation[ID_ROCK_LARGE], &field,
+ ID_ROCK_LARGE, randInt(2), randInt(2) ? -1 : 1 );
+ double dx = (2.0 - randDouble()*4.0) * rockSpeed;
+ double dy = (2.0 - randDouble()*4.0) * rockSpeed;
+ rock->setVelocity( dx, dy );
+ rock->setFrame( randInt( rock->frameCount() ) );
+ if ( dx > 0 )
+ {
+ if ( dy > 0 )
+ rock->setPos( 5, 5 );
+ else
+ rock->setPos( 5, field.height() - 25 );
+ rock->setFrame( 0 );
+ }
+ else
+ {
+ if ( dy > 0 )
+ rock->setPos( field.width() - 25, 5 );
+ else
+ rock->setPos( field.width() - 25, field.height() - 25 );
+ rock->setFrame( 0 );
+ }
+ rock->show();
+ rocks.append( rock );
+ }
+}
+
+// - - -
+
+void KAsteroidsView::showText( const QString &text, const QColor &color, bool scroll )
+{
+ if ( !initialized )
+ return;
+ textSprite->setHtml( QString("<font color=#%1%2%3>%4</font>")
+ .arg(color.red(), 2, 16, QLatin1Char('0'))
+ .arg(color.green(), 2, 16, QLatin1Char('0'))
+ .arg(color.blue(), 2, 16, QLatin1Char('0'))
+ .arg(text) );
+ Q_UNUSED(color);
+ // ### Porting: no such thing textSprite->setColor( color );
+
+ if ( scroll ) {
+ textSprite->setPos( (field.width()-textSprite->boundingRect().width()) / 2,
+ -textSprite->boundingRect().height() );
+ textDy = TEXT_SPEED;
+ } else {
+ textSprite->setPos( (field.width()-textSprite->boundingRect().width()) / 2,
+ (field.height()-textSprite->boundingRect().height()) / 2 );
+ textDy = 0;
+ }
+ textSprite->show();
+}
+
+// - - -
+
+void KAsteroidsView::hideText()
+{
+ textDy = -TEXT_SPEED;
+}
+
+// - - -
+
+void KAsteroidsView::resizeEvent(QResizeEvent* event)
+{
+ QWidget::resizeEvent(event);
+ field.setSceneRect(0, 0, width()-4, height()-4);
+ view.resize(width(),height());
+}
+
+// - - -
+
+void KAsteroidsView::timerEvent( QTimerEvent * )
+{
+ field.advance();
+
+ AnimatedPixmapItem *rock;
+
+ // move rocks forward
+ for ( rock = rocks.first(); rock; rock = rocks.next() ) {
+ ((KRock *)rock)->nextFrame();
+ wrapSprite( rock );
+ }
+
+ wrapSprite( ship );
+
+ // check for missile collision with rocks.
+ processMissiles();
+
+ // these are generated when a ship explodes
+ for ( KBit *bit = bits.first(); bit; bit = bits.next() )
+ {
+ if ( bit->expired() )
+ {
+ bits.removeRef( bit );
+ }
+ else
+ {
+ bit->growOlder();
+ bit->setFrame( ( bit->frame()+1 ) % bit->frameCount() );
+ }
+ }
+
+ for ( KExhaust *e = exhaust.first(); e; e = exhaust.next() )
+ exhaust.removeRef( e );
+
+ // move / rotate ship.
+ // check for collision with a rock.
+ processShip();
+
+ // move powerups and check for collision with player and missiles
+ processPowerups();
+
+ if ( textSprite->isVisible() )
+ {
+ if ( textDy < 0 &&
+ textSprite->boundingRect().y() <= -textSprite->boundingRect().height() ) {
+ textSprite->hide();
+ } else {
+ textSprite->moveBy( 0, textDy );
+ }
+
+ if ( textSprite->sceneBoundingRect().y() > (field.height()-textSprite->boundingRect().height())/2 )
+ textDy = 0;
+ }
+
+ if ( vitalsChanged && !(mFrameNum % 10) ) {
+ emit updateVitals();
+ vitalsChanged = FALSE;
+ }
+
+ mFrameNum++;
+}
+
+void KAsteroidsView::wrapSprite( QGraphicsItem *s )
+{
+ int x = int(s->x() + s->boundingRect().width() / 2);
+ int y = int(s->y() + s->boundingRect().height() / 2);
+
+ if ( x > field.width() )
+ s->setPos( s->x() - field.width(), s->y() );
+ else if ( x < 0 )
+ s->setPos( field.width() + s->x(), s->y() );
+
+ if ( y > field.height() )
+ s->setPos( s->x(), s->y() - field.height() );
+ else if ( y < 0 )
+ s->setPos( s->x(), field.height() + s->y() );
+}
+
+// - - -
+
+void KAsteroidsView::rockHit( AnimatedPixmapItem *hit )
+{
+ KPowerup *nPup = 0;
+ int rnd = int(randDouble()*30.0) % 30;
+ switch( rnd )
+ {
+ case 4:
+ case 5:
+ nPup = new KPowerup( animation[ID_ENERGY_POWERUP], &field,
+ ID_ENERGY_POWERUP );
+ break;
+ case 10:
+// nPup = new KPowerup( animation[ID_TELEPORT_POWERUP], &field,
+// ID_TELEPORT_POWERUP );
+ break;
+ case 15:
+ nPup = new KPowerup( animation[ID_BRAKE_POWERUP], &field,
+ ID_BRAKE_POWERUP );
+ break;
+ case 20:
+ nPup = new KPowerup( animation[ID_SHIELD_POWERUP], &field,
+ ID_SHIELD_POWERUP );
+ break;
+ case 24:
+ case 25:
+ nPup = new KPowerup( animation[ID_SHOOT_POWERUP], &field,
+ ID_SHOOT_POWERUP );
+ break;
+ }
+ if ( nPup )
+ {
+ double r = 0.5 - randDouble();
+ nPup->setPos( hit->x(), hit->y() );
+ nPup->setFrame( 0 );
+ nPup->setVelocity( hit->xVelocity() + r, hit->yVelocity() + r );
+ powerups.append( nPup );
+ }
+
+ if ( hit->type() == ID_ROCK_LARGE || hit->type() == ID_ROCK_MEDIUM )
+ {
+ // break into smaller rocks
+ double addx[4] = { 1.0, 1.0, -1.0, -1.0 };
+ double addy[4] = { -1.0, 1.0, -1.0, 1.0 };
+
+ double dx = hit->xVelocity();
+ double dy = hit->yVelocity();
+
+ double maxRockSpeed = MAX_ROCK_SPEED * rockSpeed;
+ if ( dx > maxRockSpeed )
+ dx = maxRockSpeed;
+ else if ( dx < -maxRockSpeed )
+ dx = -maxRockSpeed;
+ if ( dy > maxRockSpeed )
+ dy = maxRockSpeed;
+ else if ( dy < -maxRockSpeed )
+ dy = -maxRockSpeed;
+
+ AnimatedPixmapItem *nrock;
+
+ for ( int i = 0; i < 4; i++ )
+ {
+ double r = rockSpeed/2 - randDouble()*rockSpeed;
+ if ( hit->type() == ID_ROCK_LARGE )
+ {
+ nrock = new KRock( animation[ID_ROCK_MEDIUM], &field,
+ ID_ROCK_MEDIUM, randInt(2), randInt(2) ? -1 : 1 );
+ emit rockHit( 0 );
+ }
+ else
+ {
+ nrock = new KRock( animation[ID_ROCK_SMALL], &field,
+ ID_ROCK_SMALL, randInt(2), randInt(2) ? -1 : 1 );
+ emit rockHit( 1 );
+ }
+
+ nrock->setPos( hit->x(), hit->y() );
+ nrock->setFrame( 0 );
+ nrock->setVelocity( dx+addx[i]*rockSpeed+r, dy+addy[i]*rockSpeed+r );
+ nrock->setFrame( randInt( nrock->frameCount() ) );
+ rocks.append( nrock );
+ }
+ }
+ else if ( hit->type() == ID_ROCK_SMALL )
+ emit rockHit( 2 );
+ rocks.removeRef( hit );
+ if ( rocks.count() == 0 )
+ emit rocksRemoved();
+}
+
+void KAsteroidsView::reducePower( int val )
+{
+ shipPower -= val;
+ if ( shipPower <= 0 )
+ {
+ shipPower = 0;
+ thrustShip = FALSE;
+ if ( shieldOn )
+ {
+ shieldOn = FALSE;
+ shield->hide();
+ }
+ }
+ vitalsChanged = TRUE;
+}
+
+void KAsteroidsView::addExhaust( double x, double y, double dx,
+ double dy, int count )
+{
+ for ( int i = 0; i < count; i++ )
+ {
+ KExhaust *e = new KExhaust( animation[ID_EXHAUST], &field );
+ e->setPos( x + 2 - randDouble()*4, y + 2 - randDouble()*4 );
+ e->setVelocity( dx, dy );
+ exhaust.append( e );
+ }
+}
+
+void KAsteroidsView::processMissiles()
+{
+ KMissile *missile;
+
+ // if a missile has hit a rock, remove missile and break rock into smaller
+ // rocks or remove completely.
+ Q3PtrListIterator<KMissile> it(missiles);
+
+ for ( ; it.current(); ++it )
+ {
+ missile = it.current();
+ missile->growOlder();
+
+ if ( missile->expired() )
+ {
+ missiles.removeRef( missile );
+ continue;
+ }
+
+ wrapSprite( missile );
+
+ QList<QGraphicsItem *> hits = missile->collidingItems(Qt::IntersectsItemBoundingRect);
+ QList<QGraphicsItem *>::Iterator hit;
+ for ( hit = hits.begin(); hit != hits.end(); ++hit )
+ {
+ if ( (*hit)->type() >= ID_ROCK_LARGE &&
+ (*hit)->type() <= ID_ROCK_SMALL && (*hit)->collidesWithItem(missile) )
+ {
+ shotsHit++;
+ rockHit( static_cast<AnimatedPixmapItem *>(*hit) );
+ missiles.removeRef( missile );
+ break;
+ }
+ }
+ }
+}
+
+// - - -
+
+void KAsteroidsView::processShip()
+{
+ if ( ship->isVisible() )
+ {
+ if ( shieldOn )
+ {
+ shield->show();
+ reducePower( SHIELD_ON_COST );
+ static int sf = 0;
+ sf++;
+
+ if ( sf % 2 )
+ shield->setFrame( (shield->frame()+1) % shield->frameCount() );
+ shield->setPos( ship->x() - 9, ship->y() - 9 );
+
+ QList<QGraphicsItem *> hits = shield->collidingItems(Qt::IntersectsItemBoundingRect);
+ QList<QGraphicsItem *>::Iterator it;
+ for ( it = hits.begin(); it != hits.end(); ++it )
+ {
+ if ( (*it)->type() >= ID_ROCK_LARGE &&
+ (*it)->type() <= ID_ROCK_SMALL && (*it)->collidesWithItem(shield) )
+ {
+ int factor;
+ switch ( (*it)->type() )
+ {
+ case ID_ROCK_LARGE:
+ factor = 3;
+ break;
+
+ case ID_ROCK_MEDIUM:
+ factor = 2;
+ break;
+
+ default:
+ factor = 1;
+ }
+
+ if ( factor > mShieldCount )
+ {
+ // shield not strong enough
+ shieldOn = FALSE;
+ break;
+ }
+ rockHit( static_cast<AnimatedPixmapItem *>(*it) );
+ // the more shields we have the less costly
+ reducePower( factor * (SHIELD_HIT_COST - mShieldCount*2) );
+ }
+ }
+ }
+
+ if ( !shieldOn )
+ {
+ shield->hide();
+ QList<QGraphicsItem *> hits = ship->collidingItems(Qt::IntersectsItemBoundingRect);
+ QList<QGraphicsItem *>::Iterator it;
+ for ( it = hits.begin(); it != hits.end(); ++it )
+ {
+ if ( (*it)->type() >= ID_ROCK_LARGE &&
+ (*it)->type() <= ID_ROCK_SMALL && (*it)->collidesWithItem(ship))
+ {
+ KBit *bit;
+ for ( int i = 0; i < 12; i++ )
+ {
+ bit = new KBit( animation[ID_BIT], &field );
+ bit->setPos( ship->x() + 5 - randDouble() * 10,
+ ship->y() + 5 - randDouble() * 10 );
+ bit->setFrame( randInt(bit->frameCount()) );
+ bit->setVelocity( 1-randDouble()*2,
+ 1-randDouble()*2 );
+ bit->setDeath( 60 + randInt(60) );
+ bits.append( bit );
+ }
+ ship->hide();
+ shield->hide();
+ emit shipKilled();
+ break;
+ }
+ }
+ }
+
+
+ if ( rotateSlow )
+ rotateSlow--;
+
+ if ( rotateL )
+ {
+ shipAngle -= rotateSlow ? 1 : rotateRate;
+ if ( shipAngle < 0 )
+ shipAngle += SHIP_STEPS;
+ }
+
+ if ( rotateR )
+ {
+ shipAngle += rotateSlow ? 1 : rotateRate;
+ if ( shipAngle >= SHIP_STEPS )
+ shipAngle -= SHIP_STEPS;
+ }
+
+ double angle = shipAngle * PI_X_2 / SHIP_STEPS;
+ double cosangle = cos( angle );
+ double sinangle = sin( angle );
+
+ if ( brakeShip )
+ {
+ thrustShip = FALSE;
+ rotateL = FALSE;
+ rotateR = FALSE;
+ rotateRate = ROTATE_RATE;
+ if ( fabs(shipDx) < 2.5 && fabs(shipDy) < 2.5 )
+ {
+ shipDx = 0.0;
+ shipDy = 0.0;
+ ship->setVelocity( shipDx, shipDy );
+ brakeShip = FALSE;
+ }
+ else
+ {
+ double motionAngle = atan2( -shipDy, -shipDx );
+ if ( angle > M_PI )
+ angle -= PI_X_2;
+ double angleDiff = angle - motionAngle;
+ if ( angleDiff > M_PI )
+ angleDiff = PI_X_2 - angleDiff;
+ else if ( angleDiff < -M_PI )
+ angleDiff = PI_X_2 + angleDiff;
+ double fdiff = fabs( angleDiff );
+ if ( fdiff > 0.08 )
+ {
+ if ( angleDiff > 0 )
+ rotateL = TRUE;
+ else if ( angleDiff < 0 )
+ rotateR = TRUE;
+ if ( fdiff > 0.6 )
+ rotateRate = mBrakeCount + 1;
+ else if ( fdiff > 0.4 )
+ rotateRate = 2;
+ else
+ rotateRate = 1;
+
+ if ( rotateRate > 5 )
+ rotateRate = 5;
+ }
+ else if ( fabs(shipDx) > 1 || fabs(shipDy) > 1 )
+ {
+ thrustShip = TRUE;
+ // we'll make braking a bit faster
+ shipDx += cosangle/6 * (mBrakeCount - 1);
+ shipDy += sinangle/6 * (mBrakeCount - 1);
+ reducePower( BRAKE_ON_COST );
+ addExhaust( ship->x() + 20 - cosangle*22,
+ ship->y() + 20 - sinangle*22,
+ shipDx-cosangle, shipDy-sinangle,
+ mBrakeCount+1 );
+ }
+ }
+ }
+
+ if ( thrustShip )
+ {
+ // The ship has a terminal velocity, but trying to go faster
+ // still uses fuel (can go faster diagonally - don't care).
+ double thrustx = cosangle/4;
+ double thrusty = sinangle/4;
+ if ( fabs(shipDx + thrustx) < MAX_SHIP_SPEED )
+ shipDx += thrustx;
+ if ( fabs(shipDy + thrusty) < MAX_SHIP_SPEED )
+ shipDy += thrusty;
+ ship->setVelocity( shipDx, shipDy );
+ reducePower( 1 );
+ addExhaust( ship->x() + 20 - cosangle*20,
+ ship->y() + 20 - sinangle*20,
+ shipDx-cosangle, shipDy-sinangle, 3 );
+ }
+
+ ship->setFrame( shipAngle >> 1 );
+
+ if ( shootShip )
+ {
+ if ( !shootDelay && (int)missiles.count() < mShootCount + 2 )
+ {
+ KMissile *missile = new KMissile( animation[ID_MISSILE], &field );
+ missile->setPos( 21+ship->x()+cosangle*21,
+ 21+ship->y()+sinangle*21 );
+ missile->setFrame( 0 );
+ missile->setVelocity( shipDx + cosangle*MISSILE_SPEED,
+ shipDy + sinangle*MISSILE_SPEED );
+ missiles.append( missile );
+ shotsFired++;
+ reducePower( 1 );
+
+ shootDelay = 5;
+ }
+
+ if ( shootDelay )
+ shootDelay--;
+ }
+
+ if ( teleportShip )
+ {
+ int ra = qrand() % 10;
+ if( ra == 0 )
+ ra += qrand() % 20;
+ int xra = ra * 60 + ( (qrand() % 20) * (qrand() % 20) );
+ int yra = ra * 50 - ( (qrand() % 20) * (qrand() % 20) );
+ ship->setPos( xra, yra );
+ }
+
+ vitalsChanged = TRUE;
+ }
+}
+
+// - - -
+
+void KAsteroidsView::processPowerups()
+{
+ if ( !powerups.isEmpty() )
+ {
+ // if player gets the powerup remove it from the screen, if option
+ // "Can destroy powerups" is enabled and a missile hits the powerup
+ // destroy it
+
+ KPowerup *pup;
+ Q3PtrListIterator<KPowerup> it( powerups );
+
+ for( ; it.current(); ++it )
+ {
+ pup = it.current();
+ pup->growOlder();
+
+ if( pup->expired() )
+ {
+ powerups.removeRef( pup );
+ continue;
+ }
+
+ wrapSprite( pup );
+
+ QList<QGraphicsItem *> hits = pup->collidingItems();
+ QList<QGraphicsItem *>::Iterator it;
+ for ( it = hits.begin(); it != hits.end(); ++it )
+ {
+ if ( (*it) == ship )
+ {
+ switch( pup->type() )
+ {
+ case ID_ENERGY_POWERUP:
+ shipPower += 150;
+ if ( shipPower > MAX_POWER_LEVEL )
+ shipPower = MAX_POWER_LEVEL;
+ break;
+ case ID_TELEPORT_POWERUP:
+ mTeleportCount++;
+ break;
+ case ID_BRAKE_POWERUP:
+ if ( mBrakeCount < MAX_BRAKES )
+ mBrakeCount++;
+ break;
+ case ID_SHIELD_POWERUP:
+ if ( mShieldCount < MAX_SHIELDS )
+ mShieldCount++;
+ break;
+ case ID_SHOOT_POWERUP:
+ if ( mShootCount < MAX_FIREPOWER )
+ mShootCount++;
+ break;
+ }
+
+ powerups.removeRef( pup );
+ vitalsChanged = TRUE;
+ }
+ else if ( (*it) == shield )
+ {
+ powerups.removeRef( pup );
+ }
+ else if ( (*it)->type() == ID_MISSILE )
+ {
+ if ( can_destroy_powerups )
+ {
+ powerups.removeRef( pup );
+ }
+ }
+ }
+ }
+ } // -- if( powerups.isEmpty() )
+}
+
+// - - -
+
+void KAsteroidsView::hideShield()
+{
+ shield->hide();
+ mShieldCount = 0;
+ shieldOn = FALSE;
+}
+
+double KAsteroidsView::randDouble()
+{
+ int v = qrand();
+ return (double)v / (double)RAND_MAX;
+}
+
+int KAsteroidsView::randInt( int range )
+{
+ return qrand() % range;
+}
+
+void KAsteroidsView::showEvent( QShowEvent *e )
+{
+#if defined( QT_LICENSE_PROFESSIONAL )
+ static bool wasThere = FALSE;
+
+ if ( !wasThere ) {
+ wasThere = TRUE;
+ QMessageBox::information( this, tr("QGraphicsView demo"),
+ tr("This game has been implemented using the QGraphicsView class.\n"
+ "The QGraphicsView class is not part of the Light Platform Edition. Please \n"
+ "contact Qt Software if you want to upgrade to the Full Platform Edition.") );
+ }
+#endif
+
+ QWidget::showEvent( e );
+}
diff --git a/examples/graphicsview/portedasteroids/view.h b/examples/graphicsview/portedasteroids/view.h
new file mode 100644
index 0000000..d055f29
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/view.h
@@ -0,0 +1,184 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ * KAsteroids - Copyright (c) Martin R. Jones 1997
+ *
+ * Part of the KDE project
+ */
+
+#ifndef __AST_VIEW_H__
+#define __AST_VIEW_H__
+
+#include <qwidget.h>
+#include <q3ptrlist.h>
+#include <q3intdict.h>
+#include <qtimer.h>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+//Added by qt3to4:
+#include <QTimerEvent>
+#include <QShowEvent>
+#include <QResizeEvent>
+#include "sprites.h"
+
+#define MAX_POWER_LEVEL 1000
+
+class KAsteroidsView : public QWidget
+{
+ Q_OBJECT
+public:
+ KAsteroidsView( QWidget *parent = 0, const char *name = 0 );
+ virtual ~KAsteroidsView();
+
+ int refreshRate;
+
+ void reset();
+ void setRockSpeed( double rs ) { rockSpeed = rs; }
+ void addRocks( int num );
+ void newGame();
+ void endGame();
+ void newShip();
+
+ void rotateLeft( bool r ) { rotateL = r; rotateSlow = 5; }
+ void rotateRight( bool r ) { rotateR = r; rotateSlow = 5; }
+ void thrust( bool t ) { thrustShip = t && shipPower > 0; }
+ void shoot( bool s ) { shootShip = s; shootDelay = 0; }
+ void setShield( bool s );
+ void teleport( bool te) { teleportShip = te && mTeleportCount; }
+ void brake( bool b );
+ void pause( bool p);
+
+ void showText( const QString &text, const QColor &color, bool scroll=TRUE );
+ void hideText();
+
+ int shots() const { return shotsFired; }
+ int hits() const { return shotsHit; }
+ int power() const { return shipPower; }
+
+ int teleportCount() const { return mTeleportCount; }
+ int brakeCount() const { return mBrakeCount; }
+ int shieldCount() const { return mShieldCount; }
+ int shootCount() const { return mShootCount; }
+
+signals:
+ void shipKilled();
+ void rockHit( int size );
+ void rocksRemoved();
+ void updateVitals();
+
+private slots:
+ void hideShield();
+
+protected:
+ bool readSprites();
+ void wrapSprite( QGraphicsItem * );
+ void rockHit( AnimatedPixmapItem * );
+ void reducePower( int val );
+ void addExhaust( double x, double y, double dx, double dy, int count );
+ void processMissiles();
+ void processShip();
+ void processPowerups();
+ void processShield();
+ double randDouble();
+ int randInt( int range );
+
+ virtual void resizeEvent( QResizeEvent *event );
+ virtual void timerEvent( QTimerEvent * );
+
+ void showEvent( QShowEvent * );
+
+private:
+ QGraphicsScene field;
+ QGraphicsView view;
+ QMap<int, QList<QPixmap> > animation;
+ Q3PtrList<AnimatedPixmapItem> rocks;
+ Q3PtrList<KMissile> missiles;
+ Q3PtrList<KBit> bits;
+ Q3PtrList<KExhaust> exhaust;
+ Q3PtrList<KPowerup> powerups;
+ KShield *shield;
+ AnimatedPixmapItem *ship;
+ QGraphicsTextItem *textSprite;
+
+ bool rotateL;
+ bool rotateR;
+ bool thrustShip;
+ bool shootShip;
+ bool teleportShip;
+ bool brakeShip;
+ bool pauseShip;
+ bool shieldOn;
+
+ bool vitalsChanged;
+
+ int shipAngle;
+ int rotateSlow;
+ int rotateRate;
+ int shipPower;
+
+ int shotsFired;
+ int shotsHit;
+ int shootDelay;
+
+ int mBrakeCount;
+ int mShieldCount;
+ int mTeleportCount;
+ int mShootCount;
+
+ double shipDx;
+ double shipDy;
+
+ int textDy;
+ int mFrameNum;
+ bool mPaused;
+ int mTimerId;
+
+ double rockSpeed;
+ double powerupSpeed;
+
+ bool can_destroy_powerups;
+
+ QTimer *shieldTimer;
+ bool initialized;
+};
+
+#endif
diff --git a/examples/graphicsview/portedcanvas/blendshadow.cpp b/examples/graphicsview/portedcanvas/blendshadow.cpp
new file mode 100644
index 0000000..42cd0e3
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/blendshadow.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qimage.h>
+#include <qcolor.h>
+
+static inline int blendComponent( int v, int av, int s, int as )
+{
+ return as*s + av*v -(av*as*s)/255;
+}
+
+static inline QRgb blendShade( QRgb v, QRgb s )
+{
+ //shadow image is already reduced and blurred
+ int as = qAlpha(s);
+ int av = qAlpha(v);
+ if ( as == 0 || av == 255 )
+ return v;
+
+ int a = as + av -(as*av)/255;
+
+ int r = blendComponent( qRed(v),av, qRed(s), as)/a;
+ int g = blendComponent( qGreen(v),av, qGreen(s), as)/a;
+ int b = blendComponent( qBlue(v),av, qBlue(s), as)/a;
+
+ return qRgba(r,g,b,a);
+}
+
+
+
+int main( int*, char**)
+{
+ QImage image( "out.png" );
+ image.convertDepth( 32 );
+ QImage shade( "outshade.png" );
+ shade.convertDepth( 32 );
+ int dx = 10;
+ int dy = 5;
+
+ int w = image.width();
+ int h = image.height();
+
+ QImage img( w+dx, h+dy, 32 );
+ img.setAlphaBuffer( TRUE );
+
+ for ( int y = 0; y < h+dy; y++ ) {
+ for ( int x = 0; x < w+dx; x++ ) {
+ QRgb sh = (x<dx||y<dy) ? 0 : shade.pixel( x-dx, y-dy );
+ QRgb pixel = (x<w&y<h) ? image.pixel( x, y ) : 0;
+ img.setPixel( x, y, blendShade( pixel, sh ) );
+ }
+ }
+ img.save("blend.png", "PNG" );
+}
+
+
diff --git a/examples/graphicsview/portedcanvas/butterfly.png b/examples/graphicsview/portedcanvas/butterfly.png
new file mode 100644
index 0000000..f3e050e
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/butterfly.png
Binary files differ
diff --git a/examples/graphicsview/portedcanvas/canvas.cpp b/examples/graphicsview/portedcanvas/canvas.cpp
new file mode 100644
index 0000000..c8718dc
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/canvas.cpp
@@ -0,0 +1,733 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qdatetime.h>
+#include <qmainwindow.h>
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qmenubar.h>
+#include <qapplication.h>
+#include <qpainter.h>
+#include <qprinter.h>
+#include <qlabel.h>
+#include <qimage.h>
+#include <q3progressdialog.h>
+#include <Q3PointArray>
+#include <Q3PtrList>
+#include <QPixmap>
+#include <Q3PopupMenu>
+#include <QMouseEvent>
+#include <Q3MemArray>
+#include "canvas.h"
+#include <QStyleOptionGraphicsItem>
+#include <qdebug.h>
+#include <stdlib.h>
+
+// We use a global variable to save memory - all the brushes and pens in
+// the mesh are shared.
+static QBrush *tb = 0;
+static QPen *tp = 0;
+
+class EdgeItem;
+class NodeItem;
+
+class EdgeItem: public QGraphicsLineItem
+{
+public:
+ EdgeItem( NodeItem*, NodeItem* );
+ void setFromPoint( int x, int y ) ;
+ void setToPoint( int x, int y );
+ static int count() { return c; }
+private:
+ static int c;
+};
+
+static const int imageRTTI = 984376;
+
+
+class ImageItem: public QGraphicsRectItem
+{
+public:
+ ImageItem( QImage img );
+ int rtti () const { return imageRTTI; }
+protected:
+ void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );
+private:
+ QImage image;
+ QPixmap pixmap;
+};
+
+
+ImageItem::ImageItem( QImage img )
+ : image(img)
+{
+ setRect(0, 0, image.width(), image.height());
+ setFlag(ItemIsMovable);
+#if !defined(Q_WS_QWS)
+ pixmap.convertFromImage(image, Qt::OrderedAlphaDither);
+#endif
+}
+
+void ImageItem::paint( QPainter *p, const QStyleOptionGraphicsItem *option, QWidget * )
+{
+// On Qt/Embedded, we can paint a QImage as fast as a QPixmap,
+// but on other platforms, we need to use a QPixmap.
+#if defined(Q_WS_QWS)
+ p->drawImage( option->exposedRect, image, option->exposedRect, Qt::OrderedAlphaDither );
+#else
+ p->drawPixmap( option->exposedRect, pixmap, option->exposedRect );
+#endif
+}
+
+class NodeItem: public QGraphicsEllipseItem
+{
+public:
+ NodeItem();
+ ~NodeItem() {}
+
+ void addInEdge( EdgeItem *edge ) { inList.append( edge ); }
+ void addOutEdge( EdgeItem *edge ) { outList.append( edge ); }
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+
+ // QPoint center() { return boundingRect().center(); }
+private:
+ Q3PtrList<EdgeItem> inList;
+ Q3PtrList<EdgeItem> outList;
+};
+
+
+int EdgeItem::c = 0;
+
+EdgeItem::EdgeItem( NodeItem *from, NodeItem *to )
+ : QGraphicsLineItem( )
+{
+ c++;
+ setPen( *tp );
+ from->addOutEdge( this );
+ to->addInEdge( this );
+ setLine( QLineF(int(from->x()), int(from->y()), int(to->x()), int(to->y()) ));
+ setZValue( 127 );
+ setBoundingRegionGranularity(0.05);
+}
+
+void EdgeItem::setFromPoint( int x, int y )
+{
+ setLine(QLineF( x,y, line().p2().x(), line().p2().y() ));
+}
+
+void EdgeItem::setToPoint( int x, int y )
+{
+ setLine(QLineF( line().p1().x(), line().p1().y(), x, y ));
+}
+
+QVariant NodeItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if (change == ItemPositionHasChanged) {
+ Q3PtrListIterator<EdgeItem> it1( inList );
+ EdgeItem *edge;
+ while (( edge = it1.current() )) {
+ ++it1;
+ edge->setToPoint( int(x()), int(y()) );
+ }
+ Q3PtrListIterator<EdgeItem> it2( outList );
+ while (( edge = it2.current() )) {
+ ++it2;
+ edge->setFromPoint( int(x()), int(y()) );
+ }
+ }
+
+ return QGraphicsEllipseItem::itemChange(change, value);
+}
+
+NodeItem::NodeItem( )
+ : QGraphicsEllipseItem( QRectF(-3, -3, 6, 6) )
+{
+ setPen( *tp );
+ setBrush( *tb );
+ setZValue( 128 );
+ setFlag(ItemIsMovable);
+}
+
+FigureEditor::FigureEditor(
+ QGraphicsScene& c, QWidget* parent,
+ const char* name, Qt::WindowFlags f) :
+ QGraphicsView(&c,parent)
+{
+ setObjectName(name);
+ setWindowFlags(f);
+ setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+}
+
+void FigureEditor::clear()
+{
+ scene()->clear();
+}
+
+BouncyLogo::BouncyLogo() :
+ xvel(0), yvel(0)
+{
+ setPixmap(QPixmap(":/trolltech/examples/graphicsview/portedcanvas/qt-trans.xpm"));
+}
+
+const int logo_rtti = 1234;
+
+int BouncyLogo::type() const
+{
+ return logo_rtti;
+}
+
+QPainterPath BouncyLogo::shape() const
+{
+ QPainterPath path;
+ path.addRect(boundingRect());
+ return path;
+}
+
+void BouncyLogo::initPos()
+{
+ initSpeed();
+ int trial=1000;
+ do {
+ setPos(qrand()%int(scene()->width()),qrand()%int(scene()->height()));
+ advance(0);
+ } while (trial-- && xvel==0.0 && yvel==0.0);
+}
+
+void BouncyLogo::initSpeed()
+{
+ const double speed = 4.0;
+ double d = (double)(qrand()%1024) / 1024.0;
+ xvel = d*speed*2-speed;
+ yvel = (1-d)*speed*2-speed;
+}
+
+void BouncyLogo::advance(int stage)
+{
+ switch ( stage ) {
+ case 0: {
+ double vx = xvel;
+ double vy = yvel;
+
+ if ( vx == 0.0 && vy == 0.0 ) {
+ // stopped last turn
+ initSpeed();
+ vx = xvel;
+ vy = yvel;
+ }
+
+ double nx = x() + vx;
+ double ny = y() + vy;
+
+ if ( nx < 0 || nx >= scene()->width() )
+ vx = -vx;
+ if ( ny < 0 || ny >= scene()->height() )
+ vy = -vy;
+
+ for (int bounce=0; bounce<4; bounce++) {
+ QList<QGraphicsItem *> l=scene()->collidingItems(this);
+ for (QList<QGraphicsItem *>::Iterator it=l.begin(); it!=l.end(); ++it) {
+ QGraphicsItem *hit = *it;
+ QPainterPath advancedShape = QMatrix().translate(xvel, yvel).map(shape());
+ if ( hit->type()==logo_rtti && hit->collidesWithPath(mapToItem(hit, advancedShape)) ) {
+ switch ( bounce ) {
+ case 0:
+ vx = -vx;
+ break;
+ case 1:
+ vy = -vy;
+ vx = -vx;
+ break;
+ case 2:
+ vx = -vx;
+ break;
+ case 3:
+ // Stop for this turn
+ vx = 0;
+ vy = 0;
+ break;
+ }
+ xvel = vx;
+ yvel = vy;
+ break;
+ }
+ }
+ }
+
+ if ( x()+vx < 0 || x()+vx >= scene()->width() )
+ vx = 0;
+ if ( y()+vy < 0 || y()+vy >= scene()->height() )
+ vy = 0;
+
+ xvel = vx;
+ yvel = vy;
+ } break;
+ case 1:
+ moveBy(xvel, yvel);
+ break;
+ }
+}
+
+static uint mainCount = 0;
+static QImage *butterflyimg;
+static QImage *logoimg;
+
+Main::Main(QGraphicsScene& c, QWidget* parent, const char* name, Qt::WindowFlags f) :
+ Q3MainWindow(parent,name,f),
+ canvas(c)
+{
+ editor = new FigureEditor(canvas,this);
+ QMenuBar* menu = menuBar();
+
+ Q3PopupMenu* file = new Q3PopupMenu( menu );
+ file->insertItem("&Fill canvas", this, SLOT(init()), Qt::CTRL+Qt::Key_F);
+ file->insertItem("&Erase canvas", this, SLOT(clear()), Qt::CTRL+Qt::Key_E);
+ file->insertItem("&New view", this, SLOT(newView()), Qt::CTRL+Qt::Key_N);
+ file->insertSeparator();
+ file->insertItem("&Print...", this, SLOT(print()), Qt::CTRL+Qt::Key_P);
+ file->insertSeparator();
+ file->insertItem("E&xit", qApp, SLOT(quit()), Qt::CTRL+Qt::Key_Q);
+ menu->insertItem("&File", file);
+
+ Q3PopupMenu* edit = new Q3PopupMenu( menu );
+ edit->insertItem("Add &Circle", this, SLOT(addCircle()), Qt::ALT+Qt::Key_C);
+ edit->insertItem("Add &Hexagon", this, SLOT(addHexagon()), Qt::ALT+Qt::Key_H);
+ edit->insertItem("Add &Polygon", this, SLOT(addPolygon()), Qt::ALT+Qt::Key_P);
+ edit->insertItem("Add Spl&ine", this, SLOT(addSpline()), Qt::ALT+Qt::Key_I);
+ edit->insertItem("Add &Text", this, SLOT(addText()), Qt::ALT+Qt::Key_T);
+ edit->insertItem("Add &Line", this, SLOT(addLine()), Qt::ALT+Qt::Key_L);
+ edit->insertItem("Add &Rectangle", this, SLOT(addRectangle()), Qt::ALT+Qt::Key_R);
+ edit->insertItem("Add &Sprite", this, SLOT(addSprite()), Qt::ALT+Qt::Key_S);
+ edit->insertItem("Create &Mesh", this, SLOT(addMesh()), Qt::ALT+Qt::Key_M );
+ edit->insertItem("Add &Alpha-blended image", this, SLOT(addButterfly()), Qt::ALT+Qt::Key_A);
+ menu->insertItem("&Edit", edit);
+
+ Q3PopupMenu* view = new Q3PopupMenu( menu );
+ view->insertItem("&Enlarge", this, SLOT(enlarge()), Qt::SHIFT+Qt::CTRL+Qt::Key_Plus);
+ view->insertItem("Shr&ink", this, SLOT(shrink()), Qt::SHIFT+Qt::CTRL+Qt::Key_Minus);
+ view->insertSeparator();
+ view->insertItem("&Rotate clockwise", this, SLOT(rotateClockwise()), Qt::CTRL+Qt::Key_PageDown);
+ view->insertItem("Rotate &counterclockwise", this, SLOT(rotateCounterClockwise()), Qt::CTRL+Qt::Key_PageUp);
+ view->insertItem("&Zoom in", this, SLOT(zoomIn()), Qt::CTRL+Qt::Key_Plus);
+ view->insertItem("Zoom &out", this, SLOT(zoomOut()), Qt::CTRL+Qt::Key_Minus);
+ view->insertItem("Translate left", this, SLOT(moveL()), Qt::CTRL+Qt::Key_Left);
+ view->insertItem("Translate right", this, SLOT(moveR()), Qt::CTRL+Qt::Key_Right);
+ view->insertItem("Translate up", this, SLOT(moveU()), Qt::CTRL+Qt::Key_Up);
+ view->insertItem("Translate down", this, SLOT(moveD()), Qt::CTRL+Qt::Key_Down);
+ view->insertItem("&Mirror", this, SLOT(mirror()), Qt::CTRL+Qt::Key_Home);
+ menu->insertItem("&View", view);
+
+ menu->insertSeparator();
+
+ Q3PopupMenu* help = new Q3PopupMenu( menu );
+ help->insertItem("&About", this, SLOT(help()), Qt::Key_F1);
+ help->setItemChecked(dbf_id, TRUE);
+ menu->insertItem("&Help",help);
+
+ statusBar();
+
+ setCentralWidget(editor);
+
+ printer = 0;
+
+ init();
+}
+
+void Main::init()
+{
+ clear();
+
+ static int r=24;
+ qsrand(++r);
+
+ mainCount++;
+ butterflyimg = 0;
+ logoimg = 0;
+
+ int i;
+ for ( i=0; i < int(canvas.width()) / 56; i++) {
+ addButterfly();
+ }
+ for ( i=0; i < int(canvas.width()) / 85; i++) {
+ addHexagon();
+ }
+ for ( i=0; i < int(canvas.width()) / 128; i++) {
+ addLogo();
+ }
+}
+
+Main::~Main()
+{
+ delete printer;
+ if ( !--mainCount ) {
+ delete[] butterflyimg;
+ butterflyimg = 0;
+ delete[] logoimg;
+ logoimg = 0;
+ }
+}
+
+void Main::newView()
+{
+ // Open a new view... have it delete when closed.
+ Main *m = new Main(canvas, 0, 0, Qt::WDestructiveClose);
+ m->show();
+}
+
+void Main::clear()
+{
+ editor->clear();
+}
+
+void Main::help()
+{
+ static QMessageBox* about = new QMessageBox( "Qt Canvas Example",
+ "<h3>The QCanvas classes example</h3>"
+ "<ul>"
+ "<li> Press ALT-S for some sprites."
+ "<li> Press ALT-C for some circles."
+ "<li> Press ALT-L for some lines."
+ "<li> Drag the objects around."
+ "<li> Read the code!"
+ "</ul>", QMessageBox::Information, 1, 0, 0, this, 0, FALSE );
+ about->setButtonText( 1, "Dismiss" );
+ about->show();
+}
+
+void Main::aboutQt()
+{
+ QMessageBox::aboutQt( this, "Qt Canvas Example" );
+}
+
+void Main::enlarge()
+{
+ canvas.setSceneRect(0, 0, canvas.width()*4/3, canvas.height()*4/3);
+}
+
+void Main::shrink()
+{
+ canvas.setSceneRect(0, 0, qMax(canvas.width()*3/4, qreal(1.0)), qMax(canvas.height()*3/4, qreal(1.0)));
+}
+
+void Main::rotateClockwise()
+{
+ editor->rotate( 22.5 );
+}
+
+void Main::rotateCounterClockwise()
+{
+ editor->rotate( -22.5 );
+}
+
+void Main::zoomIn()
+{
+ editor->scale( 2.0, 2.0 );
+}
+
+void Main::zoomOut()
+{
+ editor->scale( 0.5, 0.5 );
+}
+
+void Main::mirror()
+{
+ editor->scale( -1, 1 );
+}
+
+void Main::moveL()
+{
+ editor->translate( -16, 0 );
+}
+
+void Main::moveR()
+{
+ editor->translate( +16, 0 );
+}
+
+void Main::moveU()
+{
+ editor->translate( 0, -16 );
+}
+
+void Main::moveD()
+{
+ editor->translate( 0, +16 );
+}
+
+void Main::print()
+{
+ if ( !printer ) printer = new QPrinter;
+ if ( printer->setup(this) ) {
+ QPainter pp(printer);
+ canvas.render(&pp);
+ }
+}
+
+
+void Main::addSprite()
+{
+ BouncyLogo* i = new BouncyLogo;
+ canvas.addItem(i);
+ i->initPos();
+ i->setZValue(qrand()%256);
+}
+
+QString butterfly_fn;
+QString logo_fn;
+
+
+void Main::addButterfly()
+{
+ if ( butterfly_fn.isEmpty() )
+ return;
+ if ( !butterflyimg ) {
+ butterflyimg = new QImage[4];
+ butterflyimg[0].load( butterfly_fn );
+ butterflyimg[1] = butterflyimg[0].smoothScale( int(butterflyimg[0].width()*0.75),
+ int(butterflyimg[0].height()*0.75) );
+ butterflyimg[2] = butterflyimg[0].smoothScale( int(butterflyimg[0].width()*0.5),
+ int(butterflyimg[0].height()*0.5) );
+ butterflyimg[3] = butterflyimg[0].smoothScale( int(butterflyimg[0].width()*0.25),
+ int(butterflyimg[0].height()*0.25) );
+ }
+ QAbstractGraphicsShapeItem* i = new ImageItem(butterflyimg[qrand()%4]);
+ canvas.addItem(i);
+ i->setPos(qrand()%int(canvas.width()-butterflyimg->width()),
+ qrand()%int(canvas.height()-butterflyimg->height()));
+ i->setZValue(qrand()%256+250);
+}
+
+void Main::addLogo()
+{
+ if ( logo_fn.isEmpty() )
+ return;
+ if ( !logoimg ) {
+ logoimg = new QImage[4];
+ logoimg[0].load( logo_fn );
+ logoimg[1] = logoimg[0].smoothScale( int(logoimg[0].width()*0.75),
+ int(logoimg[0].height()*0.75) );
+ logoimg[2] = logoimg[0].smoothScale( int(logoimg[0].width()*0.5),
+ int(logoimg[0].height()*0.5) );
+ logoimg[3] = logoimg[0].smoothScale( int(logoimg[0].width()*0.25),
+ int(logoimg[0].height()*0.25) );
+ }
+ QAbstractGraphicsShapeItem* i = new ImageItem(logoimg[qrand()%4]);
+ canvas.addItem(i);
+ i->setPos(qrand()%int(canvas.width()-logoimg->width()),
+ qrand()%int(canvas.height()-logoimg->width()));
+ i->setZValue(qrand()%256+256);
+}
+
+
+
+void Main::addCircle()
+{
+ QAbstractGraphicsShapeItem* i = canvas.addEllipse(QRectF(0,0,50,50));
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ i->setPen(Qt::NoPen);
+ i->setBrush( QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8) );
+ i->setPos(qrand()%int(canvas.width()),qrand()%int(canvas.height()));
+ i->setZValue(qrand()%256);
+}
+
+void Main::addHexagon()
+{
+ const int size = int(canvas.width() / 25);
+ Q3PointArray pa(6);
+ pa[0] = QPoint(2*size,0);
+ pa[1] = QPoint(size,-size*173/100);
+ pa[2] = QPoint(-size,-size*173/100);
+ pa[3] = QPoint(-2*size,0);
+ pa[4] = QPoint(-size,size*173/100);
+ pa[5] = QPoint(size,size*173/100);
+ QGraphicsPolygonItem* i = canvas.addPolygon(pa);
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ i->setPen(Qt::NoPen);
+ i->setBrush( QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8) );
+ i->setPos(qrand()%int(canvas.width()),qrand()%int(canvas.height()));
+ i->setZValue(qrand()%256);
+}
+
+void Main::addPolygon()
+{
+ const int size = int(canvas.width()/2);
+ Q3PointArray pa(6);
+ pa[0] = QPoint(0,0);
+ pa[1] = QPoint(size,size/5);
+ pa[2] = QPoint(size*4/5,size);
+ pa[3] = QPoint(size/6,size*5/4);
+ pa[4] = QPoint(size*3/4,size*3/4);
+ pa[5] = QPoint(size*3/4,size/4);
+ QGraphicsPolygonItem* i = canvas.addPolygon(pa);
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ i->setPen(Qt::NoPen);
+ i->setBrush( QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8) );
+ i->setPos(qrand()%int(canvas.width()),qrand()%int(canvas.height()));
+ i->setZValue(qrand()%256);
+}
+
+void Main::addSpline()
+{
+ const int size = int(canvas.width()/6);
+
+ Q3PointArray pa(12);
+ pa[0] = QPoint(0,0);
+ pa[1] = QPoint(size/2,0);
+ pa[2] = QPoint(size,size/2);
+ pa[3] = QPoint(size,size);
+ pa[4] = QPoint(size,size*3/2);
+ pa[5] = QPoint(size/2,size*2);
+ pa[6] = QPoint(0,size*2);
+ pa[7] = QPoint(-size/2,size*2);
+ pa[8] = QPoint(size/4,size*3/2);
+ pa[9] = QPoint(0,size);
+ pa[10]= QPoint(-size/4,size/2);
+ pa[11]= QPoint(-size/2,0);
+
+ QPainterPath path;
+ path.moveTo(pa[0]);
+ for (int i = 1; i < pa.size(); i += 3)
+ path.cubicTo(pa[i], pa[(i + 1) % pa.size()], pa[(i + 2) % pa.size()]);
+
+ QGraphicsPathItem* item = canvas.addPath(path);
+ item->setFlag(QGraphicsItem::ItemIsMovable);
+ item->setPen(Qt::NoPen);
+ item->setBrush( QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8) );
+ item->setPos(qrand()%int(canvas.width()),qrand()%int(canvas.height()));
+ item->setZValue(qrand()%256);
+}
+
+void Main::addText()
+{
+ QGraphicsTextItem* i = canvas.addText("QCanvasText");
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ i->setPos(qrand()%int(canvas.width()),qrand()%int(canvas.height()));
+ i->setZValue(qrand()%256);
+}
+
+void Main::addLine()
+{
+ QGraphicsLineItem* i = canvas.addLine(QLineF( qrand()%int(canvas.width()), qrand()%int(canvas.height()),
+ qrand()%int(canvas.width()), qrand()%int(canvas.height()) ));
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ i->setPen( QPen(QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8), 6) );
+ i->setZValue(qrand()%256);
+}
+
+void Main::addMesh()
+{
+ int x0 = 0;
+ int y0 = 0;
+
+ if ( !tb ) tb = new QBrush( Qt::red );
+ if ( !tp ) tp = new QPen( Qt::black );
+
+ int nodecount = 0;
+
+ int w = int(canvas.width());
+ int h = int(canvas.height());
+
+ const int dist = 30;
+ int rows = h / dist;
+ int cols = w / dist;
+
+#ifndef QT_NO_PROGRESSDIALOG
+ Q3ProgressDialog progress( "Creating mesh...", "Abort", rows,
+ this, "progress", TRUE );
+#endif
+
+ canvas.update();
+
+ Q3MemArray<NodeItem*> lastRow(cols);
+ for ( int j = 0; j < rows; j++ ) {
+ int n = j%2 ? cols-1 : cols;
+ NodeItem *prev = 0;
+ for ( int i = 0; i < n; i++ ) {
+ NodeItem *el = new NodeItem;
+ canvas.addItem(el);
+ nodecount++;
+ int r = qrand();
+ int xrand = r %20;
+ int yrand = (r/20) %20;
+ el->setPos( xrand + x0 + i*dist + (j%2 ? dist/2 : 0 ),
+ yrand + y0 + j*dist );
+
+ if ( j > 0 ) {
+ if ( i < cols-1 )
+ canvas.addItem(new EdgeItem( lastRow[i], el));
+ if ( j%2 )
+ canvas.addItem(new EdgeItem( lastRow[i+1], el));
+ else if ( i > 0 )
+ canvas.addItem(new EdgeItem( lastRow[i-1], el));
+ }
+ if ( prev ) {
+ canvas.addItem(new EdgeItem( prev, el));
+ }
+ if ( i > 0 ) lastRow[i-1] = prev;
+ prev = el;
+ }
+ lastRow[n-1]=prev;
+#ifndef QT_NO_PROGRESSDIALOG
+ progress.setProgress( j );
+ if ( progress.wasCancelled() )
+ break;
+#endif
+ }
+#ifndef QT_NO_PROGRESSDIALOG
+ progress.setProgress( rows );
+#endif
+ // qDebug( "%d nodes, %d edges", nodecount, EdgeItem::count() );
+}
+
+void Main::addRectangle()
+{
+ QAbstractGraphicsShapeItem *i = canvas.addRect( QRectF(qrand()%int(canvas.width()),
+ qrand()%int(canvas.height()),
+ canvas.width()/5,
+ canvas.width()/5) );
+ i->setFlag(QGraphicsItem::ItemIsMovable);
+ int z = qrand()%256;
+ i->setBrush( QColor(z,z,z) );
+ i->setPen( QPen(QColor(qrand()%32*8,qrand()%32*8,qrand()%32*8), 6) );
+ i->setZValue(z);
+}
diff --git a/examples/graphicsview/portedcanvas/canvas.doc b/examples/graphicsview/portedcanvas/canvas.doc
new file mode 100644
index 0000000..f6d77ad
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/canvas.doc
@@ -0,0 +1,29 @@
+/*! \page canvas-example.html
+
+ \ingroup examples
+ \title Canvas Example
+
+ This example shows a QCanvas and some \l{QCanvasItem}s in action.
+ You can do a lot more with QCanvas than we show here, but the
+ example provides a taste of what can be done.
+
+ <hr>
+
+ Header file:
+
+ \include canvas/canvas.h
+
+ <hr>
+
+ Implementation:
+
+ \include canvas/canvas.cpp
+
+ <hr>
+
+ Main:
+
+ \include canvas/main.cpp
+*/
+
+
diff --git a/examples/graphicsview/portedcanvas/canvas.h b/examples/graphicsview/portedcanvas/canvas.h
new file mode 100644
index 0000000..769edbf
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/canvas.h
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EXAMPLE_H
+#define EXAMPLE_H
+
+#include <q3popupmenu.h>
+#include <q3mainwindow.h>
+#include <q3intdict.h>
+#include <QMouseEvent>
+#include <QGraphicsView>
+#include <QGraphicsScene>
+#include <QGraphicsItem>
+
+class BouncyLogo : public QGraphicsPixmapItem {
+ void initSpeed();
+public:
+ BouncyLogo();
+ void advance(int);
+ int type() const;
+
+ QPainterPath shape() const;
+
+ void initPos();
+private:
+ qreal xvel;
+ qreal yvel;
+};
+
+
+class FigureEditor : public QGraphicsView {
+ Q_OBJECT
+
+public:
+ FigureEditor(QGraphicsScene&, QWidget* parent=0, const char* name=0, Qt::WindowFlags f=0);
+ void clear();
+
+signals:
+ void status(const QString&);
+};
+
+class Main : public Q3MainWindow {
+ Q_OBJECT
+
+public:
+ Main(QGraphicsScene&, QWidget* parent=0, const char* name=0, Qt::WindowFlags f=0);
+ ~Main();
+
+public slots:
+ void help();
+
+private slots:
+ void aboutQt();
+ void newView();
+ void clear();
+ void init();
+
+ void addSprite();
+ void addCircle();
+ void addHexagon();
+ void addPolygon();
+ void addSpline();
+ void addText();
+ void addLine();
+ void addRectangle();
+ void addMesh();
+ void addLogo();
+ void addButterfly();
+
+ void enlarge();
+ void shrink();
+ void rotateClockwise();
+ void rotateCounterClockwise();
+ void zoomIn();
+ void zoomOut();
+ void mirror();
+ void moveL();
+ void moveR();
+ void moveU();
+ void moveD();
+
+ void print();
+
+private:
+ QGraphicsScene& canvas;
+ FigureEditor *editor;
+
+ Q3PopupMenu* options;
+ QPrinter* printer;
+ int dbf_id;
+};
+
+#endif
diff --git a/examples/graphicsview/portedcanvas/main.cpp b/examples/graphicsview/portedcanvas/main.cpp
new file mode 100644
index 0000000..b68c4cb
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/main.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qstatusbar.h>
+#include <qmessagebox.h>
+#include <qmenubar.h>
+#include <qapplication.h>
+#include <qdesktopwidget.h>
+#include <qimage.h>
+#include <qtimer.h>
+
+#include "canvas.h"
+
+#include <stdlib.h>
+
+extern QString butterfly_fn;
+extern QString logo_fn;
+
+int main(int argc, char** argv)
+{
+ Q_INIT_RESOURCE(portedcanvas);
+
+ QApplication app(argc,argv);
+
+ if ( argc > 1 )
+ butterfly_fn = argv[1];
+ else
+ butterfly_fn = ":/trolltech/examples/graphicsview/portedcanvas/butterfly.png";
+
+ if ( argc > 2 )
+ logo_fn = argv[2];
+ else
+ logo_fn = ":/trolltech/examples/graphicsview/portedcanvas/qtlogo.png";
+
+ QGraphicsScene canvas;
+ canvas.setSceneRect(0, 0, 800, 600);
+ Main m(canvas);
+ m.resize(m.sizeHint());
+ m.setCaption("Ported Canvas Example");
+ if ( QApplication::desktop()->width() > m.width() + 10
+ && QApplication::desktop()->height() > m.height() +30 )
+ m.show();
+ else
+ m.showMaximized();
+
+ QTimer timer;
+ QObject::connect(&timer, SIGNAL(timeout()), &canvas, SLOT(advance()));
+ timer.start(30);
+
+ QObject::connect( qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()) );
+
+ return app.exec();
+}
+
diff --git a/examples/graphicsview/portedcanvas/makeimg.cpp b/examples/graphicsview/portedcanvas/makeimg.cpp
new file mode 100644
index 0000000..93a8efe
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/makeimg.cpp
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qimage.h>
+#include <qcolor.h>
+
+static inline int blendComponent( int v, int av, int s, int as )
+{
+ //shadow gets a color inversely proportional to the
+ //alpha value
+ s = (s*(255-as))/255;
+ //then do standard blending
+ return as*s + av*v -(av*as*s)/255;
+}
+
+static inline QRgb blendShade( QRgb v, QRgb s )
+{
+ //pick a number: shadow is 1/3 of object
+ int as = qAlpha(s)/3;
+ int av = qAlpha(v);
+ if ( as == 0 || av == 255 )
+ return v;
+
+ int a = as + av -(as*av)/255;
+
+
+ int r = blendComponent( qRed(v),av, qRed(s), as)/a;
+ int g = blendComponent( qGreen(v),av, qGreen(s), as)/a;
+ int b = blendComponent( qBlue(v),av, qBlue(s), as)/a;
+
+ return qRgba(r,g,b,a);
+}
+
+int main( int*, char**)
+{
+ QImage *img;
+
+ img = new QImage( "in.png" );
+ int w,h;
+ int y;
+ img->setAlphaBuffer( TRUE );
+ *img = img->convertDepth( 32 );
+ w = img->width();
+ h = img->height();
+#if 0
+ for ( y = 0; y < h; y ++ ) {
+ uint *line = (uint*)img->scanLine( y );
+ for ( int x = 0; x < w; x++ ) {
+ uint pixel = line[x];
+ int r = qRed(pixel);
+ int g = qGreen(pixel);
+ int b = qBlue(pixel);
+ int min = QMIN( r, QMIN( g, b ) );
+ int max = QMAX( r, QMAX( g, b ) );
+ r -= min;
+ g -= min;
+ b -= min;
+ if ( max !=min ) {
+ r = (r*255)/(max-min);
+ g = (g*255)/(max-min);
+ b = (b*255)/(max-min);
+ }
+ int a = 255-min;
+ a -= (max-min)/3; //hack more transparency for colors.
+ line[x] = qRgba( r, g, b, a );
+ }
+ }
+#endif
+ *img = img->smoothScale( w/2, h/2 );
+
+ qDebug( "saving out.png");
+ img->save( "out.png", "PNG" );
+
+ w = img->width();
+ h = img->height();
+
+ QImage *img2 = new QImage( w, h, 32 );
+ img2->setAlphaBuffer( TRUE );
+ for ( y = 0; y < h; y++ ) {
+ for ( int x = 0; x < w; x++ ) {
+ QRgb shader = img->pixel( x, y );
+
+ int as = qAlpha(shader)/3;
+
+ int r = (qRed(shader)*(255-as))/255;
+ int g = (qGreen(shader)*(255-as))/255;
+ int b = (qBlue(shader)*(255-as))/255;
+
+ img2->setPixel( x, y, qRgba(r,g,b,as) );
+ }
+ }
+
+ img2->save( "outshade.png", "PNG" );
+
+}
diff --git a/examples/graphicsview/portedcanvas/portedcanvas.pro b/examples/graphicsview/portedcanvas/portedcanvas.pro
new file mode 100644
index 0000000..71e3d84
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/portedcanvas.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = portedcanvas
+
+CONFIG += qt warn_on
+
+HEADERS = canvas.h
+SOURCES = canvas.cpp main.cpp
+QT += qt3support
+
+RESOURCES += portedcanvas.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedcanvas
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS portedcanvas.pro *.png *.xpm *.doc
+sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/portedcanvas
+INSTALLS += target sources
diff --git a/examples/graphicsview/portedcanvas/portedcanvas.qrc b/examples/graphicsview/portedcanvas/portedcanvas.qrc
new file mode 100644
index 0000000..cf2e024
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/portedcanvas.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/trolltech/examples/graphicsview/portedcanvas">
+<file>qt-trans.xpm</file>
+<file>butterfly.png</file>
+<file>qtlogo.png</file>
+</qresource>
+</RCC>
diff --git a/examples/graphicsview/portedcanvas/qt-trans.xpm b/examples/graphicsview/portedcanvas/qt-trans.xpm
new file mode 100644
index 0000000..225f684
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/qt-trans.xpm
@@ -0,0 +1,54 @@
+/* XPM */
+static char *qtlogo_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"54 34 13 1",
+/* colors */
+" c #000000",
+". c #999999",
+"X c #333366",
+"o c #6666CC",
+"O c #333333",
+"@ c #666699",
+"# c #000066",
+"$ c #666666",
+"% c #3333CC",
+"& c #000033",
+"* c #9999CC",
+"= c #333399",
+"+ c None",
+/* pixels */
+"+++++++++++++++++++.$OOO$.++++++++++++++++++++++++++++",
+"+++++++++++++++++$ O.+++++++++++++++++++++++++",
+"+++++++++++++++.O $++++++++++++++++++++++++",
+"++++++++++++++. $.++.$ O+++++++++++++++++++++++",
+"+++++++++++++. O.+++++++$ O++++++++++++++++++++++",
+"+++++++++++++O ++++++++++$ $+++++++++++++++++++++",
+"++++++++++++$ .+++++++++++O .++++++++++++++++++++",
+"+++++++++++. O+++++++++++++ O++++++.+++++++++++++",
+"+++++++++++$ .+++++++++++++$ .+++.O +++++++++++++",
+"+++++++++++ +++++++++++++++ O+++. +++++++++++++",
+"++++++++++. &Xoooo*++++++++++$ +++. +++++++++++++",
+"++++++++++@=%%%%%%%%%%*+++++++. .++. +++++++++++++",
+"+++++++**oooooo**++*o%%%%o+++++ $++O +++++++++++++",
+"+++++*****$OOX@oooo*++*%%%%%*++O $+. OOO$++++++++*",
+"++..+.++....$O$+*ooooo*+*o%%%%%O O+$ $$O.++++++**+",
+"***+*+++++$$....+++*oooo**+*o%%# O++O ++++++***o*++",
+"*+++++++++O $.....++**oooo**+*X &o*O ++++*ooo*++++",
+"++++++++++$ O++.....++**oooo*X &%%& ..*o%%*++++++",
+"++++++++++$ ++++.....+++**ooO $*o& @oo*+++++++++",
+"++++++++++. .++++++.....+++*O Xo*O .++++++++++++",
+"+++++++++++ O+++++++++...... .++O +++++++++++++",
+"+++++++++++O +++.$$$.++++++. O+++O +++++++++++++",
+"+++++++++++. $$OO O.++++O .+++O +++++++++++++",
+"++++++++++++O .+++.O $++. O++++O +++++++++++++",
+"++++++++++++. O+++++O $+O +++++O +++++++++++++",
+"+++++++++++++. O+++++O O .+++++O .++++++++++++",
+"++++++++++++++$ .++++O .++++.+$ O+.$.++++++++",
+"+++++++++++++++. O$$O .+++++... +++++++++",
+"+++++++++++++++++$ O+++++$$+.O O$.+++++++++",
+"+++++++++++++++++++$OO O$.O O.++. .++++++++++++++++",
+"+++++++++++++++++++++++++++. OO .++++++++++++++++",
+"++++++++++++++++++++++++++++. O+++++++++++++++++",
+"+++++++++++++++++++++++++++++. .+++++++++++++++++",
+"++++++++++++++++++++++++++++++.O O.++++++++++++++++++"
+};
diff --git a/examples/graphicsview/portedcanvas/qtlogo.png b/examples/graphicsview/portedcanvas/qtlogo.png
new file mode 100644
index 0000000..5aac08a
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/qtlogo.png
Binary files differ
diff --git a/examples/help/README b/examples/help/README
new file mode 100644
index 0000000..85f5a43
--- /dev/null
+++ b/examples/help/README
@@ -0,0 +1,38 @@
+Support for interactive help is provided by the Qt Assistant application.
+Developers can take advantages of the facilities it offers to display
+specially-prepared documentation to users of their applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/help/contextsensitivehelp/contextsensitivehelp.pro b/examples/help/contextsensitivehelp/contextsensitivehelp.pro
new file mode 100644
index 0000000..5a8c0b1
--- /dev/null
+++ b/examples/help/contextsensitivehelp/contextsensitivehelp.pro
@@ -0,0 +1,18 @@
+TEMPLATE = app
+
+CONFIG += help
+
+SOURCES += main.cpp \
+ wateringconfigdialog.cpp \
+ helpbrowser.cpp
+
+HEADERS += wateringconfigdialog.h \
+ helpbrowser.h
+
+FORMS += wateringconfigdialog.ui
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/help/contextsensitivehelp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.doc doc
+sources.path = $$[QT_INSTALL_EXAMPLES]/help/contextsensitivehelp
+INSTALLS += target sources
diff --git a/examples/help/contextsensitivehelp/doc/amount.html b/examples/help/contextsensitivehelp/doc/amount.html
new file mode 100644
index 0000000..7a02a6f
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/amount.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Water amount</title>
+ </head>
+ <body>
+ Depending on the plant, temperature and rain fall the amount needs to be larger
+ or smaller. On a really hot day without rain, the suggested <a href="plants.html">amount</a>
+ can be increased by about 10%.
+ </body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/filter.html b/examples/help/contextsensitivehelp/doc/filter.html
new file mode 100644
index 0000000..6486112
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/filter.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Filter</title>
+</head>
+<body>
+Depending on the source of water, it needs to be filtered or not. Filtering
+is strongly recommened for the river and lake.
+
+
+</body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/plants.html b/examples/help/contextsensitivehelp/doc/plants.html
new file mode 100644
index 0000000..2d2bb67
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/plants.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Plants</title>
+ </head>
+ <body>
+ Different kind of plants need different amounts of water. Here's a short
+ overview over the most common grown plants and their avarage need of water:
+ <br>
+ <table border=1>
+ <tr>
+ <td>Kind</td>
+ <td>Amount</td>
+ </tr>
+ <tr>
+ <td>Squash</td>
+ <td>2000</td>
+ </tr>
+ <tr>
+ <td>Bean</td>
+ <td>1500</td>
+ </tr>
+ <tr>
+ <td>Carrot</td>
+ <td>1200</td>
+ </tr>
+ <tr>
+ <td>Strawberry</td>
+ <td>1300</td>
+ </tr>
+ <tr>
+ <td>Raspberry</td>
+ <td>1000</td>
+ </tr>
+ <tr>
+ <td>Blueberry</td>
+ <td>1100</td>
+ </tr>
+ </table>
+ <br><br>
+ <font color="#ff0000">Warning:</font> Watering them too much or too little will
+ cause irreversible damage!
+ </body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/rain.html b/examples/help/contextsensitivehelp/doc/rain.html
new file mode 100644
index 0000000..1ffe452
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/rain.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Rain</title>
+ </head>
+ <body>
+ Depending on the rain fall, the automated watering system should not be
+ switched on at all. Also, the <a href="./temperature.html">temperature</a> should be
+ considered.
+ </body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/source.html b/examples/help/contextsensitivehelp/doc/source.html
new file mode 100644
index 0000000..2140765
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/source.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Water Source</title>
+ </head>
+ <body>
+ The current pipe system connects to four different sources. Be aware that only
+ a limited amount of water can be taken from some sources.
+ <br>
+ <table border=1>
+ <tr>
+ <td>Source</td>
+ <td>Amount</td>
+ </tr>
+ <tr>
+ <td>Foundain</td>
+ <td>4000</td>
+ </tr>
+ <tr>
+ <td>River</td>
+ <td>6000</td>
+ </tr>
+ <tr>
+ <td>Lake</td>
+ <td>10000</td>
+ </tr>
+ <tr>
+ <td>Public Water System</td>
+ <td>unlimited</td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/temperature.html b/examples/help/contextsensitivehelp/doc/temperature.html
new file mode 100644
index 0000000..4145ed7
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/temperature.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>Temperature</title>
+ </head>
+ <body>
+ Depending on the temperature, the plants need more or less water. The higher
+ the temperature the higher the need for water. If the temperature does not
+ reach a certain level, maybe no automatic watering should be done at all.<br>
+ Before setting this parameter for good, you should also take the amount of <a href="./rain.html">
+ rain</a> into account.
+ </body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/time.html b/examples/help/contextsensitivehelp/doc/time.html
new file mode 100644
index 0000000..0cc81f4
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/time.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Starting time</title>
+</head>
+<body>
+Starting the watering too early may be ineffective since most water
+will evaporate.
+
+</body>
+</html>
diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qch b/examples/help/contextsensitivehelp/doc/wateringmachine.qch
new file mode 100644
index 0000000..e74f9b8
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qch
Binary files differ
diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhc b/examples/help/contextsensitivehelp/doc/wateringmachine.qhc
new file mode 100644
index 0000000..3227c3a2
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qhc
Binary files differ
diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp b/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp
new file mode 100644
index 0000000..eebf652
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<QHelpCollectionProject version="1.0">
+ <docFiles>
+ <generate>
+ <file>
+ <input>wateringmachine.qhp</input>
+ <output>wateringmachine.qch</output>
+ </file>
+ </generate>
+ <register>
+ <file>wateringmachine.qch</file>
+ </register>
+ </docFiles>
+</QHelpCollectionProject> \ No newline at end of file
diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhp b/examples/help/contextsensitivehelp/doc/wateringmachine.qhp
new file mode 100644
index 0000000..745d881
--- /dev/null
+++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qhp
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<QtHelpProject version="1.0">
+ <virtualFolder>wateringmachine</virtualFolder>
+ <namespace>wateringcompany.com.1_0_0.premium</namespace>
+ <filterSection>
+ <keywords>
+ <keyword name="plants" id="plants" ref="plants.html"/>
+ <keyword name="temperature" id="temperature" ref="temperature.html"/>
+ <keyword name="rain" id="rain" ref="rain.html"/>
+ <keyword name="time" id="time" ref="time.html"/>
+ <keyword name="amount" id="amount" ref="amount.html"/>
+ <keyword name="source" id="source" ref="source.html"/>
+ <keyword name="filtering" id="filtering" ref="filter.html"/>
+ </keywords>
+ <files>
+ <file>plants.html</file>
+ <file>temperature.html</file>
+ <file>rain.html</file>
+ <file>time.html</file>
+ <file>amount.html</file>
+ <file>source.html</file>
+ <file>filter.html</file>
+ </files>
+ </filterSection>
+</QtHelpProject>
diff --git a/examples/help/contextsensitivehelp/helpbrowser.cpp b/examples/help/contextsensitivehelp/helpbrowser.cpp
new file mode 100644
index 0000000..100b940
--- /dev/null
+++ b/examples/help/contextsensitivehelp/helpbrowser.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QLibraryInfo>
+#include <QtGui/QApplication>
+#include <QtHelp/QHelpEngineCore>
+
+#include "helpbrowser.h"
+
+HelpBrowser::HelpBrowser(QWidget *parent)
+ : QTextBrowser(parent)
+{
+ QString collectionFile = QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ + QLatin1String("/help/contextsensitivehelp/doc/wateringmachine.qhc");
+
+ m_helpEngine = new QHelpEngineCore(collectionFile, this);
+ if (!m_helpEngine->setupData()) {
+ delete m_helpEngine;
+ m_helpEngine = 0;
+ }
+}
+
+void HelpBrowser::showHelpForKeyword(const QString &id)
+{
+ if (m_helpEngine) {
+ QMap<QString, QUrl> links = m_helpEngine->linksForIdentifier(id);
+ if (links.count())
+ setSource(links.constBegin().value());
+ }
+}
+
+QVariant HelpBrowser::loadResource(int type, const QUrl &name)
+{
+ QByteArray ba;
+ if (type < 4 && m_helpEngine) {
+ QUrl url(name);
+ if (name.isRelative())
+ url = source().resolved(url);
+ ba = m_helpEngine->fileData(url);
+ }
+ return ba;
+}
+
diff --git a/examples/help/contextsensitivehelp/helpbrowser.h b/examples/help/contextsensitivehelp/helpbrowser.h
new file mode 100644
index 0000000..1335524
--- /dev/null
+++ b/examples/help/contextsensitivehelp/helpbrowser.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HELPBROWSER_H
+#define HELPBROWSER_H
+
+#include <QtGui/QTextBrowser>
+
+QT_BEGIN_NAMESPACE
+class QHelpEngineCore;
+QT_END_NAMESPACE;
+
+class HelpBrowser : public QTextBrowser
+{
+ Q_OBJECT
+
+public:
+ HelpBrowser(QWidget *parent);
+ void showHelpForKeyword(const QString &id);
+
+private:
+ QVariant loadResource(int type, const QUrl &name);
+
+ QHelpEngineCore *m_helpEngine;
+};
+
+#endif
diff --git a/examples/help/contextsensitivehelp/main.cpp b/examples/help/contextsensitivehelp/main.cpp
new file mode 100644
index 0000000..b05cf3e
--- /dev/null
+++ b/examples/help/contextsensitivehelp/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+
+#include "wateringconfigdialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ WateringConfigDialog dia;
+ return dia.exec();
+}
diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp
new file mode 100644
index 0000000..285123a
--- /dev/null
+++ b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "wateringconfigdialog.h"
+
+WateringConfigDialog::WateringConfigDialog()
+{
+ m_ui.setupUi(this);
+ m_widgetInfo.insert(m_ui.plantComboBox, tr("plants"));
+ m_widgetInfo.insert(m_ui.temperatureCheckBox, tr("temperature"));
+ m_widgetInfo.insert(m_ui.temperatureSpinBox, tr("temperature"));
+ m_widgetInfo.insert(m_ui.rainCheckBox, tr("rain"));
+ m_widgetInfo.insert(m_ui.rainSpinBox, tr("rain"));
+ m_widgetInfo.insert(m_ui.startTimeEdit, tr("starting time"));
+ m_widgetInfo.insert(m_ui.amountSpinBox, tr("water amount"));
+ m_widgetInfo.insert(m_ui.sourceComboBox, tr("water source"));
+ m_widgetInfo.insert(m_ui.filterCheckBox, tr("water filtering"));
+
+ connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ this, SLOT(focusChanged(QWidget*, QWidget*)));
+}
+
+void WateringConfigDialog::focusChanged(QWidget *, QWidget *now)
+{
+ if (m_widgetInfo.contains(now)) {
+ m_ui.helpLabel->setText(tr("Information about %1:").arg(m_widgetInfo.value(now)));
+ QStringList lst = m_widgetInfo.value(now).split(QLatin1Char(' '));
+ m_ui.helpBrowser->showHelpForKeyword(lst.last());
+ }
+}
+
diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.h b/examples/help/contextsensitivehelp/wateringconfigdialog.h
new file mode 100644
index 0000000..7fc3c51
--- /dev/null
+++ b/examples/help/contextsensitivehelp/wateringconfigdialog.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WATERINGCONFIGDIALOG_H
+#define WATERINGCONFIGDIALOG_H
+
+#include <QtGui/QDialog>
+#include "ui_wateringconfigdialog.h"
+
+class WateringConfigDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ WateringConfigDialog();
+
+private slots:
+ void focusChanged(QWidget *old, QWidget *now);
+
+private:
+ Ui::WateringConfigDialog m_ui;
+ QMap<QWidget*, QString> m_widgetInfo;
+};
+
+#endif
diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.ui b/examples/help/contextsensitivehelp/wateringconfigdialog.ui
new file mode 100644
index 0000000..a7f5349
--- /dev/null
+++ b/examples/help/contextsensitivehelp/wateringconfigdialog.ui
@@ -0,0 +1,446 @@
+<ui version="4.0" >
+ <class>WateringConfigDialog</class>
+ <widget class="QDialog" name="WateringConfigDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>334</width>
+ <height>550</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Watering Configuration</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Plant:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3" >
+ <widget class="QComboBox" name="plantComboBox" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Squash</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Bean</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Carrot</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Strawberry</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Raspberry</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Blueberry</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>67</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Water when:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="3" >
+ <widget class="QCheckBox" name="temperatureCheckBox" >
+ <property name="text" >
+ <string>Temperature is higher than:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="2" >
+ <widget class="QSpinBox" name="temperatureSpinBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="specialValueText" >
+ <string/>
+ </property>
+ <property name="suffix" >
+ <string>C</string>
+ </property>
+ <property name="minimum" >
+ <number>10</number>
+ </property>
+ <property name="maximum" >
+ <number>60</number>
+ </property>
+ <property name="value" >
+ <number>20</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="1" colspan="3" >
+ <widget class="QCheckBox" name="rainCheckBox" >
+ <property name="text" >
+ <string>Rain less than:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="6" column="2" >
+ <widget class="QSpinBox" name="rainSpinBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="specialValueText" >
+ <string/>
+ </property>
+ <property name="suffix" >
+ <string>mm</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="7" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="8" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Starting Time:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1" colspan="3" >
+ <widget class="QTimeEdit" name="startTimeEdit" />
+ </item>
+ <item row="9" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Amount:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="1" colspan="3" >
+ <widget class="QSpinBox" name="amountSpinBox" >
+ <property name="suffix" >
+ <string>l</string>
+ </property>
+ <property name="minimum" >
+ <number>100</number>
+ </property>
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ <property name="singleStep" >
+ <number>100</number>
+ </property>
+ <property name="value" >
+ <number>1000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Source:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="1" colspan="3" >
+ <widget class="QComboBox" name="sourceComboBox" >
+ <item>
+ <property name="text" >
+ <string>Foundain</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>River</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Lake</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Public Water System</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="11" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="11" column="1" colspan="2" >
+ <widget class="QCheckBox" name="filterCheckBox" >
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="12" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="4" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="HelpBrowser" name="helpBrowser" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="helpLabel" >
+ <property name="text" >
+ <string>&lt;a href="test">Show Details&lt;/a></string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="Line" name="line" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>HelpBrowser</class>
+ <extends>QTextBrowser</extends>
+ <header>helpbrowser.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>WateringConfigDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>227</x>
+ <y>372</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>WateringConfigDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>286</x>
+ <y>378</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>temperatureCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>temperatureSpinBox</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>132</x>
+ <y>101</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>132</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>rainCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>rainSpinBox</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>110</x>
+ <y>154</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>113</x>
+ <y>169</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/help/help.pro b/examples/help/help.pro
new file mode 100644
index 0000000..1ce6322
--- /dev/null
+++ b/examples/help/help.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+
+SUBDIRS += contextsensitivehelp \
+ remotecontrol \
+ simpletextviewer
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/help
+INSTALLS += sources
diff --git a/examples/help/remotecontrol/enter.png b/examples/help/remotecontrol/enter.png
new file mode 100644
index 0000000..f397f4b
--- /dev/null
+++ b/examples/help/remotecontrol/enter.png
Binary files differ
diff --git a/examples/help/remotecontrol/main.cpp b/examples/help/remotecontrol/main.cpp
new file mode 100644
index 0000000..746dec4
--- /dev/null
+++ b/examples/help/remotecontrol/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "remotecontrol.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(remotecontrol);
+
+ QApplication a(argc, argv);
+ RemoteControl w;
+ w.show();
+ a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+ return a.exec();
+}
diff --git a/examples/help/remotecontrol/remotecontrol.cpp b/examples/help/remotecontrol/remotecontrol.cpp
new file mode 100644
index 0000000..8701afb
--- /dev/null
+++ b/examples/help/remotecontrol/remotecontrol.cpp
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QDir>
+#include <QtCore/QProcess>
+#include <QtCore/QTextStream>
+#include <QtCore/QLibraryInfo>
+
+#include <QtGui/QMessageBox>
+
+#include "remotecontrol.h"
+
+RemoteControl::RemoteControl(QWidget *parent, Qt::WFlags flags)
+ : QMainWindow(parent, flags)
+{
+ ui.setupUi(this);
+ connect(ui.indexLineEdit, SIGNAL(returnPressed()),
+ this, SLOT(on_indexButton_clicked()));
+ connect(ui.identifierLineEdit, SIGNAL(returnPressed()),
+ this, SLOT(on_identifierButton_clicked()));
+ connect(ui.urlLineEdit, SIGNAL(returnPressed()),
+ this, SLOT(on_urlButton_clicked()));
+
+ QString rc;
+ QTextStream(&rc) << QLatin1String("qthelp://com.trolltech.qt.")
+ << (QT_VERSION >> 16) << ((QT_VERSION >> 8) & 0xFF)
+ << (QT_VERSION & 0xFF)
+ << QLatin1String("/qdoc/index.html");
+
+ ui.startUrlLineEdit->setText(rc);
+
+ process = new QProcess(this);
+ connect(process, SIGNAL(finished(int, QProcess::ExitStatus)),
+ this, SLOT(helpViewerClosed()));
+}
+
+RemoteControl::~RemoteControl()
+{
+ if (process->state() == QProcess::Running) {
+ process->terminate();
+ process->waitForFinished(3000);
+ }
+}
+
+void RemoteControl::on_actionQuit_triggered()
+{
+ close();
+}
+
+void RemoteControl::on_launchButton_clicked()
+{
+ if (process->state() == QProcess::Running)
+ return;
+
+ QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
+#if !defined(Q_OS_MAC)
+ app += QLatin1String("assistant");
+#else
+ app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
+#endif
+
+ ui.contentsCheckBox->setChecked(true);
+ ui.indexCheckBox->setChecked(true);
+ ui.bookmarksCheckBox->setChecked(true);
+
+ QStringList args;
+ args << QLatin1String("-enableRemoteControl");
+ process->start(app, args);
+ if (!process->waitForStarted()) {
+ QMessageBox::critical(this, tr("Remote Control"),
+ tr("Could not start Qt Assistant from %1.").arg(app));
+ return;
+ }
+
+ if (!ui.startUrlLineEdit->text().isEmpty())
+ sendCommand(QLatin1String("SetSource ")
+ + ui.startUrlLineEdit->text());
+
+ ui.launchButton->setEnabled(false);
+ ui.startUrlLineEdit->setEnabled(false);
+ ui.actionGroupBox->setEnabled(true);
+}
+
+void RemoteControl::sendCommand(const QString &cmd)
+{
+ if (process->state() != QProcess::Running)
+ return;
+ process->write(cmd.toLocal8Bit() + '\0');
+}
+
+void RemoteControl::on_indexButton_clicked()
+{
+ sendCommand(QLatin1String("ActivateKeyword ")
+ + ui.indexLineEdit->text());
+}
+
+void RemoteControl::on_identifierButton_clicked()
+{
+ sendCommand(QLatin1String("ActivateIdentifier ")
+ + ui.identifierLineEdit->text());
+}
+
+void RemoteControl::on_urlButton_clicked()
+{
+ sendCommand(QLatin1String("SetSource ")
+ + ui.urlLineEdit->text());
+}
+
+void RemoteControl::on_syncContentsButton_clicked()
+{
+ sendCommand(QLatin1String("SyncContents"));
+}
+
+void RemoteControl::on_contentsCheckBox_toggled(bool checked)
+{
+ sendCommand(checked ?
+ QLatin1String("Show Contents") : QLatin1String("Hide Contents"));
+}
+
+void RemoteControl::on_indexCheckBox_toggled(bool checked)
+{
+ sendCommand(checked ?
+ QLatin1String("Show Index") : QLatin1String("Hide Index"));
+}
+
+void RemoteControl::on_bookmarksCheckBox_toggled(bool checked)
+{
+ sendCommand(checked ?
+ QLatin1String("Show Bookmarks") : QLatin1String("Hide Bookmarks"));
+}
+
+void RemoteControl::helpViewerClosed()
+{
+ ui.launchButton->setEnabled(true);
+ ui.startUrlLineEdit->setEnabled(true);
+ ui.actionGroupBox->setEnabled(false);
+}
diff --git a/examples/help/remotecontrol/remotecontrol.h b/examples/help/remotecontrol/remotecontrol.h
new file mode 100644
index 0000000..cc1c1c8
--- /dev/null
+++ b/examples/help/remotecontrol/remotecontrol.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef REMOTECONTROL_H
+#define REMOTECONTROL_H
+
+#include <QtGui/QMainWindow>
+#include "ui_remotecontrol.h"
+
+QT_BEGIN_NAMESPACE
+class QProcess;
+QT_END_NAMESPACE;
+
+class RemoteControl : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ RemoteControl(QWidget *parent = 0, Qt::WFlags flags = 0);
+ ~RemoteControl();
+
+private:
+ Ui::RemoteControlClass ui;
+ QProcess *process;
+
+private slots:
+ void on_launchButton_clicked();
+ void on_actionQuit_triggered();
+ void on_indexButton_clicked();
+ void on_identifierButton_clicked();
+ void on_urlButton_clicked();
+ void on_syncContentsButton_clicked();
+ void on_contentsCheckBox_toggled(bool checked);
+ void on_indexCheckBox_toggled(bool checked);
+ void on_bookmarksCheckBox_toggled(bool checked);
+ void helpViewerClosed();
+
+ void sendCommand(const QString &cmd);
+};
+
+#endif // REMOTECONTROL_H
diff --git a/examples/help/remotecontrol/remotecontrol.pro b/examples/help/remotecontrol/remotecontrol.pro
new file mode 100644
index 0000000..05fc14c
--- /dev/null
+++ b/examples/help/remotecontrol/remotecontrol.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+
+HEADERS += remotecontrol.h
+SOURCES += main.cpp \
+ remotecontrol.cpp
+FORMS += remotecontrol.ui
+RESOURCES += remotecontrol.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/help/remotecontrol
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.doc doc
+sources.path = $$[QT_INSTALL_EXAMPLES]/help/remotecontrol
+INSTALLS += target sources
diff --git a/examples/help/remotecontrol/remotecontrol.qrc b/examples/help/remotecontrol/remotecontrol.qrc
new file mode 100644
index 0000000..9b4299d
--- /dev/null
+++ b/examples/help/remotecontrol/remotecontrol.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/remotecontrol" >
+ <file>enter.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/help/remotecontrol/remotecontrol.ui b/examples/help/remotecontrol/remotecontrol.ui
new file mode 100644
index 0000000..1cfc7f5
--- /dev/null
+++ b/examples/help/remotecontrol/remotecontrol.ui
@@ -0,0 +1,228 @@
+<ui version="4.0" >
+ <class>RemoteControlClass</class>
+ <widget class="QMainWindow" name="RemoteControlClass" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>344</width>
+ <height>364</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>RemoteControl</string>
+ </property>
+ <widget class="QWidget" name="centralWidget" >
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Start URL:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QLineEdit" name="startUrlLineEdit" />
+ </item>
+ <item row="1" column="1" >
+ <widget class="QPushButton" name="launchButton" >
+ <property name="text" >
+ <string>Launch Qt HelpViewer</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>101</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>113</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0" colspan="3" >
+ <widget class="QGroupBox" name="actionGroupBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="title" >
+ <string>Actions</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Search in Index:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="indexLineEdit" />
+ </item>
+ <item>
+ <widget class="QToolButton" name="indexButton" >
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset resource="remotecontrol.qrc" >:/remotecontrol/enter.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Identifier:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="identifierLineEdit" />
+ </item>
+ <item>
+ <widget class="QToolButton" name="identifierButton" >
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset resource="remotecontrol.qrc" >:/remotecontrol/enter.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Show URL:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="urlLineEdit" />
+ </item>
+ <item>
+ <widget class="QToolButton" name="urlButton" >
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset resource="remotecontrol.qrc" >:/remotecontrol/enter.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QPushButton" name="syncContentsButton" >
+ <property name="text" >
+ <string>Sync Contents</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>81</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0" colspan="3" >
+ <widget class="QCheckBox" name="contentsCheckBox" >
+ <property name="text" >
+ <string>Show Contents</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QCheckBox" name="indexCheckBox" >
+ <property name="text" >
+ <string>Show Index</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="3" >
+ <widget class="QCheckBox" name="bookmarksCheckBox" >
+ <property name="text" >
+ <string>Show Bookmarks</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menuBar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>344</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>File</string>
+ </property>
+ <addaction name="actionQuit" />
+ </widget>
+ <addaction name="menuFile" />
+ </widget>
+ <widget class="QStatusBar" name="statusBar" />
+ <action name="actionQuit" >
+ <property name="text" >
+ <string>Quit</string>
+ </property>
+ </action>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <resources>
+ <include location="remotecontrol.qrc" />
+ </resources>
+ <connections/>
+</ui>
diff --git a/examples/help/simpletextviewer/assistant.cpp b/examples/help/simpletextviewer/assistant.cpp
new file mode 100644
index 0000000..b6fb88a
--- /dev/null
+++ b/examples/help/simpletextviewer/assistant.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QByteArray>
+#include <QtCore/QDir>
+#include <QtCore/QLibraryInfo>
+#include <QtCore/QProcess>
+
+#include <QtGui/QMessageBox>
+
+#include "assistant.h"
+
+Assistant::Assistant()
+ : proc(0)
+{
+}
+
+//! [0]
+Assistant::~Assistant()
+{
+ if (proc && proc->state() == QProcess::Running) {
+ proc->terminate();
+ proc->waitForFinished(3000);
+ }
+ delete proc;
+}
+//! [0]
+
+//! [1]
+void Assistant::showDocumentation(const QString &page)
+{
+ if (!startAssistant())
+ return;
+
+ QByteArray ba("SetSource ");
+ ba.append("qthelp://com.trolltech.examples.simpletextviewer/doc/");
+
+ proc->write(ba + page.toLocal8Bit() + '\0');
+}
+//! [1]
+
+//! [2]
+bool Assistant::startAssistant()
+{
+ if (!proc)
+ proc = new QProcess();
+
+ if (proc->state() != QProcess::Running) {
+ QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
+#if !defined(Q_OS_MAC)
+ app += QLatin1String("assistant");
+#else
+ app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
+#endif
+
+ QStringList args;
+ args << QLatin1String("-collectionFile")
+ << QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ + QLatin1String("/help/simpletextviewer/documentation/simpletextviewer.qhc")
+ << QLatin1String("-enableRemoteControl");
+
+ proc->start(app, args);
+
+ if (!proc->waitForStarted()) {
+ QMessageBox::critical(0, QObject::tr("Simple Text Viewer"),
+ QObject::tr("Unable to launch Qt Assistant (%1)").arg(app));
+ return false;
+ }
+ }
+ return true;
+}
+//! [2]
diff --git a/examples/help/simpletextviewer/assistant.h b/examples/help/simpletextviewer/assistant.h
new file mode 100644
index 0000000..e58939c
--- /dev/null
+++ b/examples/help/simpletextviewer/assistant.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ASSISTANT_H
+#define ASSISTANT_H
+
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+class QProcess;
+QT_END_NAMESPACE
+
+class Assistant
+{
+public:
+ Assistant();
+ ~Assistant();
+ void showDocumentation(const QString &file);
+
+private:
+ bool startAssistant();
+ QProcess *proc;
+};
+
+#endif
diff --git a/examples/help/simpletextviewer/documentation/about.txt b/examples/help/simpletextviewer/documentation/about.txt
new file mode 100644
index 0000000..eeab35f
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/about.txt
@@ -0,0 +1,9 @@
+The Simple Text Viewer enables the user to select and view existing
+files.
+
+HTML files is displayed using rich text, while other files are
+presented as plain text. The application provides a file dialog
+allowing the user to search for files using wildcard matching. The
+search is performed within in the specified directory, and the user is
+given an option to browse the existing file system to find the
+relevant directory.
diff --git a/examples/help/simpletextviewer/documentation/browse.html b/examples/help/simpletextviewer/documentation/browse.html
new file mode 100644
index 0000000..987abf3
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/browse.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Browse</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Browse</h2></center></p>
+
+ <p>
+ The file dialog let you browse the current file system to
+ specify the directory in which the file you want to open
+ resides.
+ Note that only the specified directory will be searched, any
+ subdirectories will simply be ignored.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/browse.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/help/simpletextviewer/documentation/filedialog.html b/examples/help/simpletextviewer/documentation/filedialog.html
new file mode 100644
index 0000000..afa65ed
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/filedialog.html
@@ -0,0 +1,48 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>File Dialog</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>File Dialog</h2></center></p>
+
+ <p>
+ In the file dialog you can name a particular file name, or
+ search for files using wildcard matching, i.e. specify a
+ file name containing wildcards. In addition you must specify
+ the directory in which the file you search for resides.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/filedialog.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ By default the dialog will search for all files (*) in the
+ current directory (the directory the application is run from).
+ </p>
+
+ <p>
+ When editing the file name and directory parameters, an
+ overview of the matching files are displayed in the
+ dialog. The overview is updated whenever the parameters
+ change.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
diff --git a/examples/help/simpletextviewer/documentation/findfile.html b/examples/help/simpletextviewer/documentation/findfile.html
new file mode 100644
index 0000000..32e0147
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/findfile.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Find File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Find File</h2></center></p>
+
+ <p>
+ To open and view a file in the Simple Text Viewer, select the
+ 'Open...' option in the 'File' menu. The application will then
+ provide you with a file dialog that you can use to search for
+ any existing file.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/fadedfilemenu.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/help/simpletextviewer/documentation/images/browse.png b/examples/help/simpletextviewer/documentation/images/browse.png
new file mode 100644
index 0000000..86db6b1
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/browse.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/help/simpletextviewer/documentation/images/fadedfilemenu.png
new file mode 100644
index 0000000..fde0e43
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/fadedfilemenu.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/filedialog.png b/examples/help/simpletextviewer/documentation/images/filedialog.png
new file mode 100644
index 0000000..883a33a
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/filedialog.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/handbook.png b/examples/help/simpletextviewer/documentation/images/handbook.png
new file mode 100644
index 0000000..3bd2b92
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/handbook.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/icon.png b/examples/help/simpletextviewer/documentation/images/icon.png
new file mode 100644
index 0000000..6daec0a
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/icon.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/mainwindow.png b/examples/help/simpletextviewer/documentation/images/mainwindow.png
new file mode 100644
index 0000000..c28d5e9
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/mainwindow.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/open.png b/examples/help/simpletextviewer/documentation/images/open.png
new file mode 100644
index 0000000..1e5bba3
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/open.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/images/wildcard.png b/examples/help/simpletextviewer/documentation/images/wildcard.png
new file mode 100644
index 0000000..6e83a56
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/images/wildcard.png
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/index.html b/examples/help/simpletextviewer/documentation/index.html
new file mode 100644
index 0000000..5a7b1d5
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/index.html
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ HTML files is displayed using rich text, while
+ other files are presented as plain text. The application
+ provides a file dialog allowing the user to search for files
+ using wildcard matching. The search is performed within in the
+ specified directory, and the user is given an option to browse
+ the existing file system to find the relevant directory.
+ </p>
+
+ <ul>
+ <li><a href="findfile.html">Find File</a></li>
+ <ul>
+ <li><a href="filedialog.html">File Dialog</a></li>
+ <li><a href="wildcardmatching.html">WildCard Matching</a></li>
+ <li><a href="browse.html">Browse</a></li>
+ </ul>
+ <li><a href="openfile.html">Open File</a></li>
+ </ul>
+ </body>
+</html>
+
+
+
diff --git a/examples/help/simpletextviewer/documentation/intro.html b/examples/help/simpletextviewer/documentation/intro.html
new file mode 100644
index 0000000..2e2aa40
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/intro.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ The application provides its own custom documentation that is
+ available through the <b>Help</b> menu in the main window's menubar
+ and through the <b>Help</b> button in the application's find file
+ dialog.
+ </p>
+
+ </body>
+</html>
+
diff --git a/examples/help/simpletextviewer/documentation/openfile.html b/examples/help/simpletextviewer/documentation/openfile.html
new file mode 100644
index 0000000..e172de9
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/openfile.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Open File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Open File</h2></center></p>
+
+ <p>
+ Once the file you want to view appears in the dialog's
+ display, you can open it in two different ways.
+ </p>
+
+ <p>
+ By pressing the 'Open' button the currently selected file will
+ be opened. By default, the first file in the list of matching
+ files is selected. Another way of opening a file is to simply
+ double click the displayed file name.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/open.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
diff --git a/examples/help/simpletextviewer/documentation/simpletextviewer.qch b/examples/help/simpletextviewer/documentation/simpletextviewer.qch
new file mode 100644
index 0000000..c401328
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/simpletextviewer.qch
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/simpletextviewer.qhc b/examples/help/simpletextviewer/documentation/simpletextviewer.qhc
new file mode 100644
index 0000000..db380ca
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/simpletextviewer.qhc
Binary files differ
diff --git a/examples/help/simpletextviewer/documentation/simpletextviewer.qhcp b/examples/help/simpletextviewer/documentation/simpletextviewer.qhcp
new file mode 100644
index 0000000..e7c2321
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/simpletextviewer.qhcp
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<QHelpCollectionProject version="1.0">
+ <assistant>
+ <title>Simple Text Viewer</title>
+ <applicationIcon>images/handbook.png</applicationIcon>
+ <cacheDirectory>Trolltech/SimpleTextViewer</cacheDirectory>
+ <startPage>qthelp://com.trolltech.examples.simpletextviewer/doc/index.html</startPage>
+ <aboutMenuText>
+ <text>About Simple Text Viewer</text>
+ </aboutMenuText>
+ <aboutDialog>
+ <file>about.txt</file>
+ <icon>images/icon.png</icon>
+ </aboutDialog>
+ <enableDocumentationManager>false</enableDocumentationManager>
+ <enableAddressBar>false</enableAddressBar>
+ <enableFilterFunctionality>false</enableFilterFunctionality>
+ </assistant>
+ <docFiles>
+ <generate>
+ <file>
+ <input>simpletextviewer.qhp</input>
+ <output>simpletextviewer.qch</output>
+ </file>
+ </generate>
+ <register>
+ <file>simpletextviewer.qch</file>
+ </register>
+ </docFiles>
+ </QHelpCollectionProject>
diff --git a/examples/help/simpletextviewer/documentation/simpletextviewer.qhp b/examples/help/simpletextviewer/documentation/simpletextviewer.qhp
new file mode 100644
index 0000000..4cb83a5
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/simpletextviewer.qhp
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<QtHelpProject version="1.0">
+ <namespace>com.trolltech.examples.simpletextviewer</namespace>
+ <virtualFolder>doc</virtualFolder>
+ <filterSection>
+ <toc>
+ <section title="Simple Text Viewer" ref="index.html">
+ <section title="Find File" ref="./findfile.html">
+ <section title="File Dialog" ref="./filedialog.html"></section>
+ <section title="Wildcard Matching" ref="./wildcardmatching.html"></section>
+ <section title="Browse" ref="./browse.html"></section>
+ </section>
+ <section title="Open File" ref="./openfile.html"></section>
+ </section>
+ </toc>
+ <keywords>
+ <keyword name="Display" ref="./index.html"/>
+ <keyword name="Rich text" ref="./index.html"/>
+ <keyword name="Plain text" ref="./index.html"/>
+ <keyword name="Find" ref="./findfile.html"/>
+ <keyword name="File menu" ref="./findfile.html"/>
+ <keyword name="File name" ref="./filedialog.html"/>
+ <keyword name="File dialog" ref="./filedialog.html"/>
+ <keyword name="File globbing" ref="./wildcardmatching.html"/>
+ <keyword name="Wildcard matching" ref="./wildcardmatching.html"/>
+ <keyword name="Wildcard syntax" ref="./wildcardmatching.html"/>
+ <keyword name="Browse" ref="./browse.html"/>
+ <keyword name="Directory" ref="./browse.html"/>
+ <keyword name="Open" ref="./openfile.html"/>
+ <keyword name="Select" ref="./openfile.html"/>
+ </keywords>
+ <files>
+ <file>browse.html</file>
+ <file>filedialog.html</file>
+ <file>findfile.html</file>
+ <file>index.html</file>
+ <file>intro.html</file>
+ <file>openfile.html</file>
+ <file>wildcardmatching.html</file>
+ <file>images/browse.png</file>
+ <file>images/fadedfilemenu.png</file>
+ <file>images/filedialog.png</file>
+ <file>images/handbook.png</file>
+ <file>images/mainwindow.png</file>
+ <file>images/open.png</file>
+ <file>images/wildcard.png</file>
+ </files>
+ </filterSection>
+ </QtHelpProject>
diff --git a/examples/help/simpletextviewer/documentation/wildcardmatching.html b/examples/help/simpletextviewer/documentation/wildcardmatching.html
new file mode 100644
index 0000000..eb1839a
--- /dev/null
+++ b/examples/help/simpletextviewer/documentation/wildcardmatching.html
@@ -0,0 +1,57 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Wildcard Matching</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Wildcard Matching</h2></center></p>
+
+ <p>
+ Most command shells such as bash or cmd.exe support "file
+ globbing", the ability to identify a group of files by using
+ wildcards.
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/wildcard.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ Wildcard matching provides four features:
+ </p>
+
+ <ul>
+ <li>Any character represents itself apart from those
+ mentioned below. Thus 'c' matches the character 'c'.
+ </li>
+ <li>The '?' character matches any single character.</li>
+ <li>The '*' matches zero or more of any characters.</li>
+ <li>Sets of characters can be represented in square brackets.
+ Within the character class, like outside, backslash
+ has no special meaning.
+ </li>
+ </ul>
+
+ <p>
+ For example we could identify HTML files with
+ <code>*.html</code>. This will match zero or more characters
+ followed by a dot followed by 'h', 't', 'm' and 'l'.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
+
diff --git a/examples/help/simpletextviewer/findfiledialog.cpp b/examples/help/simpletextviewer/findfiledialog.cpp
new file mode 100644
index 0000000..51d78ce
--- /dev/null
+++ b/examples/help/simpletextviewer/findfiledialog.cpp
@@ -0,0 +1,222 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QDir>
+#include <QtGui/QLayout>
+#include <QtGui/QComboBox>
+#include <QtGui/QTreeWidget>
+#include <QtGui/QLayout>
+#include <QtGui/QFileDialog>
+#include <QtGui/QDialogButtonBox>
+#include <QtGui/QToolButton>
+#include <QtGui/QPushButton>
+#include <QtGui/QLabel>
+
+#include "findfiledialog.h"
+#include "assistant.h"
+#include "textedit.h"
+
+//! [0]
+FindFileDialog::FindFileDialog(TextEdit *editor, Assistant *assistant)
+ : QDialog(editor)
+{
+ currentAssistant = assistant;
+ currentEditor = editor;
+//! [0]
+
+ createButtons();
+ createComboBoxes();
+ createFilesTree();
+ createLabels();
+ createLayout();
+
+ directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
+ fileNameComboBox->addItem("*");
+ findFiles();
+
+ setWindowTitle(tr("Find File"));
+//! [1]
+}
+//! [1]
+
+void FindFileDialog::browse()
+{
+ QString currentDirectory = directoryComboBox->currentText();
+ QString newDirectory = QFileDialog::getExistingDirectory(this,
+ tr("Select Directory"), currentDirectory);
+ if (!newDirectory.isEmpty()) {
+ directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
+ directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
+ update();
+ }
+}
+
+//! [2]
+void FindFileDialog::help()
+{
+ currentAssistant->showDocumentation("filedialog.html");
+}
+//! [2]
+
+void FindFileDialog::openFile(QTreeWidgetItem *item)
+{
+ if (!item) {
+ item = foundFilesTree->currentItem();
+ if (!item)
+ return;
+ }
+
+ QString fileName = item->text(0);
+ QString path = directoryComboBox->currentText() + QDir::separator();
+
+ currentEditor->setContents(path + fileName);
+ close();
+}
+
+void FindFileDialog::update()
+{
+ findFiles();
+ buttonBox->button(QDialogButtonBox::Open)->setEnabled(
+ foundFilesTree->topLevelItemCount() > 0);
+}
+
+void FindFileDialog::findFiles()
+{
+ QRegExp filePattern(fileNameComboBox->currentText() + "*");
+ filePattern.setPatternSyntax(QRegExp::Wildcard);
+
+ QDir directory(directoryComboBox->currentText());
+
+ QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
+ QStringList matchingFiles;
+
+ foreach (QString file, allFiles) {
+ if (filePattern.exactMatch(file))
+ matchingFiles << file;
+ }
+ showFiles(matchingFiles);
+}
+
+void FindFileDialog::showFiles(const QStringList &files)
+{
+ foundFilesTree->clear();
+
+ for (int i = 0; i < files.count(); ++i) {
+ QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
+ item->setText(0, files[i]);
+ }
+
+ if (files.count() > 0)
+ foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
+}
+
+void FindFileDialog::createButtons()
+{
+ browseButton = new QToolButton;
+ browseButton->setText(tr("..."));
+ connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Help);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
+}
+
+void FindFileDialog::createComboBoxes()
+{
+ directoryComboBox = new QComboBox;
+ fileNameComboBox = new QComboBox;
+
+ fileNameComboBox->setEditable(true);
+ fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ directoryComboBox->setMinimumContentsLength(30);
+ directoryComboBox->setSizeAdjustPolicy(
+ QComboBox::AdjustToMinimumContentsLength);
+ directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)),
+ this, SLOT(update()));
+ connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(update()));
+}
+
+void FindFileDialog::createFilesTree()
+{
+ foundFilesTree = new QTreeWidget;
+ foundFilesTree->setColumnCount(1);
+ foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
+ foundFilesTree->setRootIsDecorated(false);
+ foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
+ this, SLOT(openFile(QTreeWidgetItem *)));
+}
+
+void FindFileDialog::createLabels()
+{
+ directoryLabel = new QLabel(tr("Search in:"));
+ fileNameLabel = new QLabel(tr("File name (including wildcards):"));
+}
+
+void FindFileDialog::createLayout()
+{
+ QHBoxLayout *fileLayout = new QHBoxLayout;
+ fileLayout->addWidget(fileNameLabel);
+ fileLayout->addWidget(fileNameComboBox);
+
+ QHBoxLayout *directoryLayout = new QHBoxLayout;
+ directoryLayout->addWidget(directoryLabel);
+ directoryLayout->addWidget(directoryComboBox);
+ directoryLayout->addWidget(browseButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(fileLayout);
+ mainLayout->addLayout(directoryLayout);
+ mainLayout->addWidget(foundFilesTree);
+ mainLayout->addStretch();
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+}
diff --git a/examples/help/simpletextviewer/findfiledialog.h b/examples/help/simpletextviewer/findfiledialog.h
new file mode 100644
index 0000000..97af229
--- /dev/null
+++ b/examples/help/simpletextviewer/findfiledialog.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDFILEDIALOG_H
+#define FINDFILEDIALOG_H
+
+#include <QtGui/QDialog>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QLabel;
+class QToolButton;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class Assistant;
+class TextEdit;
+
+//! [0]
+class FindFileDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindFileDialog(TextEdit *editor, Assistant *assistant);
+
+private slots:
+ void browse();
+ void help();
+ void openFile(QTreeWidgetItem *item = 0);
+ void update();
+
+private:
+ void findFiles();
+ void showFiles(const QStringList &files);
+
+ void createButtons();
+ void createComboBoxes();
+ void createFilesTree();
+ void createLabels();
+ void createLayout();
+
+ Assistant *currentAssistant;
+ TextEdit *currentEditor;
+ QTreeWidget *foundFilesTree;
+
+ QComboBox *directoryComboBox;
+ QComboBox *fileNameComboBox;
+
+ QLabel *directoryLabel;
+ QLabel *fileNameLabel;
+
+ QDialogButtonBox *buttonBox;
+
+ QToolButton *browseButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/help/simpletextviewer/main.cpp b/examples/help/simpletextviewer/main.cpp
new file mode 100644
index 0000000..ce4ee60
--- /dev/null
+++ b/examples/help/simpletextviewer/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/help/simpletextviewer/mainwindow.cpp b/examples/help/simpletextviewer/mainwindow.cpp
new file mode 100644
index 0000000..fc9af58
--- /dev/null
+++ b/examples/help/simpletextviewer/mainwindow.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QLibraryInfo>
+#include <QtGui/QApplication>
+#include <QtGui/QAction>
+#include <QtGui/QMenu>
+#include <QtGui/QMenuBar>
+#include <QtGui/QMessageBox>
+
+#include "mainwindow.h"
+#include "findfiledialog.h"
+#include "assistant.h"
+#include "textedit.h"
+
+// ![0]
+MainWindow::MainWindow()
+{
+ assistant = new Assistant;
+// ![0]
+ textViewer = new TextEdit;
+ textViewer->setContents(QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ + QLatin1String("/help/simpletextviewer/documentation/intro.html"));
+ setCentralWidget(textViewer);
+
+ createActions();
+ createMenus();
+
+ setWindowTitle(tr("Simple Text Viewer"));
+ resize(750, 400);
+// ![1]
+}
+//! [1]
+
+//! [2]
+void MainWindow::closeEvent(QCloseEvent *)
+{
+ delete assistant;
+}
+//! [2]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Simple Text Viewer"),
+ tr("This example demonstrates how to use\n"
+ "Qt Assistant as help system for your\n"
+ "own application."));
+}
+
+//! [3]
+void MainWindow::showDocumentation()
+{
+ assistant->showDocumentation("index.html");
+}
+//! [3]
+
+void MainWindow::open()
+{
+ FindFileDialog dialog(textViewer, assistant);
+ dialog.exec();
+}
+
+//! [4]
+void MainWindow::createActions()
+{
+ assistantAct = new QAction(tr("Help Contents"), this);
+ assistantAct->setShortcut(tr("F1"));
+ connect(assistantAct, SIGNAL(triggered()), this, SLOT(showDocumentation()));
+//! [4]
+
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ clearAct = new QAction(tr("&Clear"), this);
+ clearAct->setShortcut(tr("Ctrl+C"));
+ connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+//! [5]
+}
+//! [5]
+
+void MainWindow::createMenus()
+{
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(clearAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(assistantAct);
+ helpMenu->addSeparator();
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(helpMenu);
+}
diff --git a/examples/help/simpletextviewer/mainwindow.h b/examples/help/simpletextviewer/mainwindow.h
new file mode 100644
index 0000000..46d3b82
--- /dev/null
+++ b/examples/help/simpletextviewer/mainwindow.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+
+class Assistant;
+class TextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+ void showDocumentation(const QString &file);
+
+private slots:
+ void about();
+ void showDocumentation();
+ void open();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private:
+ void createActions();
+ void createMenus();
+
+ Assistant *assistant;
+ TextEdit *textViewer;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+
+ QAction *assistantAct;
+ QAction *clearAct;
+ QAction *openAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/help/simpletextviewer/simpletextviewer.pro b/examples/help/simpletextviewer/simpletextviewer.pro
new file mode 100644
index 0000000..e9e7ea2
--- /dev/null
+++ b/examples/help/simpletextviewer/simpletextviewer.pro
@@ -0,0 +1,16 @@
+HEADERS = mainwindow.h \
+ findfiledialog.h \
+ assistant.h \
+ textedit.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ findfiledialog.cpp \
+ assistant.cpp \
+ textedit.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/help/simpletextviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/help/simpletextviewer
+INSTALLS += target sources
+
diff --git a/examples/help/simpletextviewer/textedit.cpp b/examples/help/simpletextviewer/textedit.cpp
new file mode 100644
index 0000000..5c0fd1b
--- /dev/null
+++ b/examples/help/simpletextviewer/textedit.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QFile>
+
+#include "textedit.h"
+
+TextEdit::TextEdit(QWidget *parent)
+ : QTextEdit(parent)
+{
+ setReadOnly(true);
+}
+
+void TextEdit::setContents(const QString &fileName)
+{
+ QFileInfo fi(fileName);
+ srcUrl = QUrl::fromLocalFile(fi.absoluteFilePath());
+ QFile file(fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ QString data(file.readAll());
+ if (fileName.endsWith(".html"))
+ setHtml(data);
+ else
+ setPlainText(data);
+ }
+}
+
+QVariant TextEdit::loadResource(int type, const QUrl &name)
+{
+ if (type == QTextDocument::ImageResource) {
+ QFile file(srcUrl.resolved(name).toLocalFile());
+ if (file.open(QIODevice::ReadOnly))
+ return file.readAll();
+ }
+ return QTextEdit::loadResource(type, name);
+}
diff --git a/examples/help/simpletextviewer/textedit.h b/examples/help/simpletextviewer/textedit.h
new file mode 100644
index 0000000..58b6406
--- /dev/null
+++ b/examples/help/simpletextviewer/textedit.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTEDIT_H
+#define TEXTEDIT_H
+
+#include <QtCore/QUrl>
+#include <QtGui/QTextEdit>
+
+class TextEdit : public QTextEdit
+{
+ Q_OBJECT
+
+public:
+ TextEdit(QWidget *parent = 0);
+ void setContents(const QString &fileName);
+
+private:
+ QVariant loadResource(int type, const QUrl &name);
+ QUrl srcUrl;
+};
+
+#endif
diff --git a/examples/ipc/README b/examples/ipc/README
new file mode 100644
index 0000000..71e2f46
--- /dev/null
+++ b/examples/ipc/README
@@ -0,0 +1,35 @@
+These examples demonstrate IPC support in Qt.
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro
new file mode 100644
index 0000000..0698f89
--- /dev/null
+++ b/examples/ipc/ipc.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = sharedmemory
+!wince*: SUBDIRS += localfortuneserver localfortuneclient
+
+# install
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ipc.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/ipc
+INSTALLS += sources
diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp
new file mode 100644
index 0000000..2edbcc3
--- /dev/null
+++ b/examples/ipc/localfortuneclient/client.cpp
@@ -0,0 +1,153 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "client.h"
+
+Client::Client(QWidget *parent)
+ : QDialog(parent)
+{
+ hostLabel = new QLabel(tr("&Server name:"));
+ hostLineEdit = new QLineEdit("fortune");
+
+ hostLabel->setBuddy(hostLineEdit);
+
+ statusLabel = new QLabel(tr("This examples requires that you run the "
+ "Fortune Server example as well."));
+
+ getFortuneButton = new QPushButton(tr("Get Fortune"));
+ getFortuneButton->setDefault(true);
+
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ socket = new QLocalSocket(this);
+
+ connect(hostLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableGetFortuneButton()));
+ connect(getFortuneButton, SIGNAL(clicked()),
+ this, SLOT(requestNewFortune()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(socket, SIGNAL(readyRead()), this, SLOT(readFortune()));
+ connect(socket, SIGNAL(error(QLocalSocket::LocalSocketError)),
+ this, SLOT(displayError(QLocalSocket::LocalSocketError)));
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(hostLabel, 0, 0);
+ mainLayout->addWidget(hostLineEdit, 0, 1);
+ mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
+ mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Fortune Client"));
+ hostLineEdit->setFocus();
+}
+
+void Client::requestNewFortune()
+{
+ getFortuneButton->setEnabled(false);
+ blockSize = 0;
+ socket->abort();
+ socket->connectToServer(hostLineEdit->text());
+}
+
+void Client::readFortune()
+{
+ QDataStream in(socket);
+ in.setVersion(QDataStream::Qt_4_0);
+
+ if (blockSize == 0) {
+ if (socket->bytesAvailable() < (int)sizeof(quint16))
+ return;
+ in >> blockSize;
+ }
+
+ if (in.atEnd())
+ return;
+
+ QString nextFortune;
+ in >> nextFortune;
+
+ if (nextFortune == currentFortune) {
+ QTimer::singleShot(0, this, SLOT(requestNewFortune()));
+ return;
+ }
+
+ currentFortune = nextFortune;
+ statusLabel->setText(currentFortune);
+ getFortuneButton->setEnabled(true);
+}
+
+void Client::displayError(QLocalSocket::LocalSocketError socketError)
+{
+ switch (socketError) {
+ case QLocalSocket::ServerNotFoundError:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The host was not found. Please check the "
+ "host name and port settings."));
+ break;
+ case QLocalSocket::ConnectionRefusedError:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The connection was refused by the peer. "
+ "Make sure the fortune server is running, "
+ "and check that the host name and port "
+ "settings are correct."));
+ break;
+ case QLocalSocket::PeerClosedError:
+ break;
+ default:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The following error occurred: %1.")
+ .arg(socket->errorString()));
+ }
+
+ getFortuneButton->setEnabled(true);
+}
+
+void Client::enableGetFortuneButton()
+{
+ getFortuneButton->setEnabled(!hostLineEdit->text().isEmpty());
+}
diff --git a/examples/ipc/localfortuneclient/client.h b/examples/ipc/localfortuneclient/client.h
new file mode 100644
index 0000000..4dbdeb1
--- /dev/null
+++ b/examples/ipc/localfortuneclient/client.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include <QDialog>
+#include <qlocalsocket.h>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QLocalSocket;
+QT_END_NAMESPACE
+
+class Client : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Client(QWidget *parent = 0);
+
+private slots:
+ void requestNewFortune();
+ void readFortune();
+ void displayError(QLocalSocket::LocalSocketError socketError);
+ void enableGetFortuneButton();
+
+private:
+ QLabel *hostLabel;
+ QLineEdit *hostLineEdit;
+ QLabel *statusLabel;
+ QPushButton *getFortuneButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+
+ QLocalSocket *socket;
+ QString currentFortune;
+ quint16 blockSize;
+};
+
+#endif
diff --git a/examples/ipc/localfortuneclient/localfortuneclient.pro b/examples/ipc/localfortuneclient/localfortuneclient.pro
new file mode 100644
index 0000000..906cc8a
--- /dev/null
+++ b/examples/ipc/localfortuneclient/localfortuneclient.pro
@@ -0,0 +1,12 @@
+HEADERS = client.h
+SOURCES = client.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneclient
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS localfortuneclient.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneclient
+INSTALLS += target sources
+
+
diff --git a/examples/ipc/localfortuneclient/main.cpp b/examples/ipc/localfortuneclient/main.cpp
new file mode 100644
index 0000000..11dcbc6
--- /dev/null
+++ b/examples/ipc/localfortuneclient/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "client.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Client client;
+ client.show();
+ return client.exec();
+}
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.pro b/examples/ipc/localfortuneserver/localfortuneserver.pro
new file mode 100644
index 0000000..fca9a0a
--- /dev/null
+++ b/examples/ipc/localfortuneserver/localfortuneserver.pro
@@ -0,0 +1,12 @@
+HEADERS = server.h
+SOURCES = server.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneserver
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS localfortuneserver.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/localfortuneserver
+INSTALLS += target sources
+
+
diff --git a/examples/ipc/localfortuneserver/main.cpp b/examples/ipc/localfortuneserver/main.cpp
new file mode 100644
index 0000000..b505c44
--- /dev/null
+++ b/examples/ipc/localfortuneserver/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QtCore>
+
+#include <stdlib.h>
+
+#include "server.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Server server;
+ server.show();
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ return server.exec();
+}
diff --git a/examples/ipc/localfortuneserver/server.cpp b/examples/ipc/localfortuneserver/server.cpp
new file mode 100644
index 0000000..96a2663
--- /dev/null
+++ b/examples/ipc/localfortuneserver/server.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include <stdlib.h>
+
+#include "server.h"
+#include <qlocalserver.h>
+#include <qlocalsocket.h>
+
+Server::Server(QWidget *parent)
+ : QDialog(parent)
+{
+ statusLabel = new QLabel;
+ quitButton = new QPushButton(tr("Quit"));
+ quitButton->setAutoDefault(false);
+
+ server = new QLocalServer(this);
+ if (!server->listen("fortune")) {
+ QMessageBox::critical(this, tr("Fortune Server"),
+ tr("Unable to start the server: %1.")
+ .arg(server->errorString()));
+ close();
+ return;
+ }
+
+ statusLabel->setText(tr("The server is running.\n"
+ "Run the Fortune Client example now."));
+
+ fortunes << tr("You've been leading a dog's life. Stay off the furniture.")
+ << tr("You've got to think about tomorrow.")
+ << tr("You will be surprised by a loud noise.")
+ << tr("You will feel hungry again in another hour.")
+ << tr("You might have mail.")
+ << tr("You cannot kill time without injuring eternity.")
+ << tr("Computers are not intelligent. They only think they are.");
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(server, SIGNAL(newConnection()), this, SLOT(sendFortune()));
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addStretch(1);
+ buttonLayout->addWidget(quitButton);
+ buttonLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addLayout(buttonLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Fortune Server"));
+}
+
+void Server::sendFortune()
+{
+ QByteArray block;
+ QDataStream out(&block, QIODevice::WriteOnly);
+ out.setVersion(QDataStream::Qt_4_0);
+ out << (quint16)0;
+ out << fortunes.at(qrand() % fortunes.size());
+ out.device()->seek(0);
+ out << (quint16)(block.size() - sizeof(quint16));
+
+ QLocalSocket *clientConnection = server->nextPendingConnection();
+ connect(clientConnection, SIGNAL(disconnected()),
+ clientConnection, SLOT(deleteLater()));
+
+ clientConnection->write(block);
+ clientConnection->flush();
+ clientConnection->disconnectFromServer();
+}
diff --git a/examples/ipc/localfortuneserver/server.h b/examples/ipc/localfortuneserver/server.h
new file mode 100644
index 0000000..7198fd9
--- /dev/null
+++ b/examples/ipc/localfortuneserver/server.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QLocalServer;
+QT_END_NAMESPACE
+
+class Server : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Server(QWidget *parent = 0);
+
+private slots:
+ void sendFortune();
+
+private:
+ QLabel *statusLabel;
+ QPushButton *quitButton;
+ QLocalServer *server;
+ QStringList fortunes;
+};
+
+#endif
diff --git a/examples/ipc/sharedmemory/dialog.cpp b/examples/ipc/sharedmemory/dialog.cpp
new file mode 100644
index 0000000..245a4a1
--- /dev/null
+++ b/examples/ipc/sharedmemory/dialog.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dialog.h"
+#include <QFileDialog>
+#include <QBuffer>
+#include <QtCore/QDebug>
+
+/*!
+ \class Dialog
+
+ \brief This class is a simple example of how to use QSharedMemory.
+
+ It is a simple dialog that presents a few buttons. To compile the
+ example, run make in qt/examples/ipc. Then run the executable twice
+ to create two processes running the dialog. In one of the processes,
+ press the button to load an image into a shared memory segment, and
+ then select an image file to load. Once the first process has loaded
+ and displayed the image, in the second process, press the button to
+ read the same image from shared memory. The second process displays
+ the same image loaded from its new loaction in shared memory.
+*/
+
+/*!
+ The class contains a data member \l {QSharedMemory} {sharedMemory},
+ which is initialized with the key "QSharedMemoryExample" to force
+ all instances of Dialog to access the same shared memory segment.
+ The constructor also connects the clicked() signal from each of the
+ three dialog buttons to the slot function appropriate for handling
+ each button.
+*/
+//! [0]
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent), sharedMemory("QSharedMemoryExample")
+{
+ ui.setupUi(this);
+ connect(ui.loadFromFileButton, SIGNAL(clicked()), SLOT(loadFromFile()));
+ connect(ui.loadFromSharedMemoryButton,
+ SIGNAL(clicked()),
+ SLOT(loadFromMemory()));
+ setWindowTitle(tr("SharedMemory Example"));
+}
+//! [0]
+
+/*!
+ This slot function is called when the \tt {Load Image From File...}
+ button is pressed on the firs Dialog process. First, it tests
+ whether the process is already connected to a shared memory segment
+ and, if so, detaches from that segment. This ensures that we always
+ start the example from the beginning if we run it multiple times
+ with the same two Dialog processes. After detaching from an existing
+ shared memory segment, the user is prompted to select an image file.
+ The selected file is loaded into a QImage. The QImage is displayed
+ in the Dialog and streamed into a QBuffer with a QDataStream.
+
+ Next, it gets a new shared memory segment from the system big enough
+ to hold the image data in the QBuffer, and it locks the segment to
+ prevent the second Dialog process from accessing it. Then it copies
+ the image from the QBuffer into the shared memory segment. Finally,
+ it unlocks the shared memory segment so the second Dialog process
+ can access it.
+
+ After this function runs, the user is expected to press the \tt
+ {Load Image from Shared Memory} button on the second Dialog process.
+
+ \sa loadFromMemory()
+ */
+//! [1]
+void Dialog::loadFromFile()
+{
+ if (sharedMemory.isAttached())
+ detach();
+
+ ui.label->setText(tr("Select an image file"));
+ QString fileName = QFileDialog::getOpenFileName(0, QString(), QString(),
+ tr("Images (*.png *.xpm *.jpg)"));
+ QImage image;
+ if (!image.load(fileName)) {
+ ui.label->setText(tr("Selected file is not an image, please select another."));
+ return;
+ }
+ ui.label->setPixmap(QPixmap::fromImage(image));
+//! [1] //! [2]
+
+ // load into shared memory
+ QBuffer buffer;
+ buffer.open(QBuffer::ReadWrite);
+ QDataStream out(&buffer);
+ out << image;
+ int size = buffer.size();
+
+ if (!sharedMemory.create(size)) {
+ ui.label->setText(tr("Unable to create shared memory segment."));
+ return;
+ }
+ sharedMemory.lock();
+ char *to = (char*)sharedMemory.data();
+ const char *from = buffer.data().data();
+ memcpy(to, from, qMin(sharedMemory.size(), size));
+ sharedMemory.unlock();
+}
+//! [2]
+
+/*!
+ This slot function is called in the second Dialog process, when the
+ user presses the \tt {Load Image from Shared Memory} button. First,
+ it attaches the process to the shared memory segment created by the
+ first Dialog process. Then it locks the segment for exclusive
+ access, copies the image data from the segment into a QBuffer, and
+ streams the QBuffer into a QImage. Then it unlocks the shared memory
+ segment, detaches from it, and finally displays the QImage in the
+ Dialog.
+
+ \sa loadFromFile()
+ */
+//! [3]
+void Dialog::loadFromMemory()
+{
+ if (!sharedMemory.attach()) {
+ ui.label->setText(tr("Unable to attach to shared memory segment.\n" \
+ "Load an image first."));
+ return;
+ }
+
+ QBuffer buffer;
+ QDataStream in(&buffer);
+ QImage image;
+
+ sharedMemory.lock();
+ buffer.setData((char*)sharedMemory.constData(), sharedMemory.size());
+ buffer.open(QBuffer::ReadOnly);
+ in >> image;
+ sharedMemory.unlock();
+
+ sharedMemory.detach();
+ ui.label->setPixmap(QPixmap::fromImage(image));
+}
+//! [3]
+
+/*!
+ This private function is called by the destructor to detach the
+ process from its shared memory segment. When the last process
+ detaches from a shared memory segment, the system releases the
+ shared memory.
+ */
+void Dialog::detach()
+{
+ if (!sharedMemory.detach())
+ ui.label->setText(tr("Unable to detach from shared memory."));
+}
+
diff --git a/examples/ipc/sharedmemory/dialog.h b/examples/ipc/sharedmemory/dialog.h
new file mode 100644
index 0000000..a0c84b6
--- /dev/null
+++ b/examples/ipc/sharedmemory/dialog.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <qdialog.h>
+#include <qsharedmemory.h>
+#include "ui_dialog.h"
+
+//! [0]
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ Dialog(QWidget *parent = 0);
+
+ public slots:
+ void loadFromFile();
+ void loadFromMemory();
+
+ private:
+ void detach();
+
+ private:
+ Ui::Dialog ui;
+ QSharedMemory sharedMemory;
+};
+//! [0]
+
+#endif
+
diff --git a/examples/ipc/sharedmemory/dialog.ui b/examples/ipc/sharedmemory/dialog.ui
new file mode 100644
index 0000000..e99d6fb
--- /dev/null
+++ b/examples/ipc/sharedmemory/dialog.ui
@@ -0,0 +1,47 @@
+<ui version="4.0" >
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>451</width>
+ <height>322</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QPushButton" name="loadFromFileButton" >
+ <property name="text" >
+ <string>Load Image From File...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="loadFromSharedMemoryButton" >
+ <property name="text" >
+ <string>Display Image From Shared Memory</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/ipc/sharedmemory/image.png b/examples/ipc/sharedmemory/image.png
new file mode 100644
index 0000000..dd93453
--- /dev/null
+++ b/examples/ipc/sharedmemory/image.png
Binary files differ
diff --git a/examples/ipc/sharedmemory/main.cpp b/examples/ipc/sharedmemory/main.cpp
new file mode 100644
index 0000000..533efeb
--- /dev/null
+++ b/examples/ipc/sharedmemory/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "dialog.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+ Dialog dialog;
+ dialog.show();
+ return application.exec();
+}
+//! [0]
+
diff --git a/examples/ipc/sharedmemory/qt.png b/examples/ipc/sharedmemory/qt.png
new file mode 100644
index 0000000..60ef558
--- /dev/null
+++ b/examples/ipc/sharedmemory/qt.png
Binary files differ
diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro
new file mode 100644
index 0000000..4833090
--- /dev/null
+++ b/examples/ipc/sharedmemory/sharedmemory.pro
@@ -0,0 +1,13 @@
+SOURCES += main.cpp \
+ dialog.cpp
+
+HEADERS += dialog.h
+
+# Forms and resources
+FORMS += dialog.ui
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/ipc/sharedmemory
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/ipc/sharedmemory
+INSTALLS += target sources
diff --git a/examples/itemviews/README b/examples/itemviews/README
new file mode 100644
index 0000000..0ac70f4
--- /dev/null
+++ b/examples/itemviews/README
@@ -0,0 +1,39 @@
+Item views are widgets that typically display data sets. Qt 4's model/view
+framework lets you handle large data sets by separating the underlying data
+from the way it is represented to the user, and provides support for
+customized rendering through the use of delegates.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/itemviews/addressbook/adddialog.cpp b/examples/itemviews/addressbook/adddialog.cpp
new file mode 100644
index 0000000..3eaba49
--- /dev/null
+++ b/examples/itemviews/addressbook/adddialog.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "adddialog.h"
+
+//! [0]
+AddDialog::AddDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ nameLabel = new QLabel("Name");
+ addressLabel = new QLabel("Address");
+ okButton = new QPushButton("OK");
+ cancelButton = new QPushButton("Cancel");
+
+ nameText = new QLineEdit;
+ addressText = new QTextEdit;
+
+ QGridLayout *gLayout = new QGridLayout;
+ gLayout->setColumnStretch(1, 2);
+ gLayout->addWidget(nameLabel, 0, 0);
+ gLayout->addWidget(nameText, 0, 1);
+
+ gLayout->addWidget(addressLabel, 1, 0, Qt::AlignLeft|Qt::AlignTop);
+ gLayout->addWidget(addressText, 1, 1, Qt::AlignLeft);
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addWidget(okButton);
+ buttonLayout->addWidget(cancelButton);
+
+ gLayout->addLayout(buttonLayout, 2, 1, Qt::AlignRight);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(gLayout);
+ setLayout(mainLayout);
+
+ connect(okButton, SIGNAL(clicked()),
+ this, SLOT(accept()));
+
+ connect(cancelButton, SIGNAL(clicked()),
+ this, SLOT(reject()));
+
+ setWindowTitle(tr("Add a Contact"));
+}
+//! [0]
diff --git a/examples/itemviews/addressbook/adddialog.h b/examples/itemviews/addressbook/adddialog.h
new file mode 100644
index 0000000..a68f566
--- /dev/null
+++ b/examples/itemviews/addressbook/adddialog.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDDIALOG_H
+#define ADDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QTextEdit;
+class QLineEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class AddDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ AddDialog(QWidget *parent=0);
+ QLineEdit *nameText;
+ QTextEdit *addressText;
+
+private:
+ QLabel *nameLabel;
+ QLabel *addressLabel;
+ QPushButton *okButton;
+ QPushButton *cancelButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/addressbook/addressbook.pro b/examples/itemviews/addressbook/addressbook.pro
new file mode 100644
index 0000000..6f6a72d
--- /dev/null
+++ b/examples/itemviews/addressbook/addressbook.pro
@@ -0,0 +1,17 @@
+SOURCES = adddialog.cpp \
+ addresswidget.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ newaddresstab.cpp \
+ tablemodel.cpp
+HEADERS = adddialog.h \
+ addresswidget.h \
+ mainwindow.h \
+ newaddresstab.h \
+ tablemodel.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/addressbook
+sources.files = $$SOURCES $$HEADERS $$RESOURCES addressbook.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/addressbook
+INSTALLS += target sources
diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp
new file mode 100644
index 0000000..e8d0527
--- /dev/null
+++ b/examples/itemviews/addressbook/addresswidget.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addresswidget.h"
+#include "adddialog.h"
+
+//! [0]
+AddressWidget::AddressWidget(QWidget *parent)
+ : QTabWidget(parent)
+{
+ table = new TableModel(this);
+ newAddressTab = new NewAddressTab(this);
+ connect(newAddressTab, SIGNAL(sendDetails(QString, QString)),
+ this, SLOT(addEntry(QString, QString)));
+
+ addTab(newAddressTab, "Address Book");
+
+ setupTabs();
+}
+//! [0]
+
+//! [2]
+void AddressWidget::addEntry()
+{
+ AddDialog aDialog;
+
+ if (aDialog.exec()) {
+ QString name = aDialog.nameText->text();
+ QString address = aDialog.addressText->toPlainText();
+
+ addEntry(name, address);
+ }
+}
+//! [2]
+
+//! [3]
+void AddressWidget::addEntry(QString name, QString address)
+{
+ QList< QPair<QString, QString> >list = table->getList();
+ QPair<QString, QString> pair(name, address);
+
+ if (!list.contains(pair)) {
+ table->insertRows(0, 1, QModelIndex());
+
+ QModelIndex index = table->index(0, 0, QModelIndex());
+ table->setData(index, name, Qt::EditRole);
+ index = table->index(0, 1, QModelIndex());
+ table->setData(index, address, Qt::EditRole);
+ removeTab(indexOf(newAddressTab));
+ } else {
+ QMessageBox::information(this, tr("Duplicate Name"),
+ tr("The name \"%1\" already exists.").arg(name));
+ }
+}
+//! [3]
+
+//! [4a]
+void AddressWidget::editEntry()
+{
+ QTableView *temp = static_cast<QTableView*>(currentWidget());
+ QSortFilterProxyModel *proxy = static_cast<QSortFilterProxyModel*>(temp->model());
+ QItemSelectionModel *selectionModel = temp->selectionModel();
+
+ QModelIndexList indexes = selectionModel->selectedRows();
+ QModelIndex index, i;
+ QString name;
+ QString address;
+ int row;
+
+ foreach (index, indexes) {
+ row = proxy->mapToSource(index).row();
+ i = table->index(row, 0, QModelIndex());
+ QVariant varName = table->data(i, Qt::DisplayRole);
+ name = varName.toString();
+
+ i = table->index(row, 1, QModelIndex());
+ QVariant varAddr = table->data(i, Qt::DisplayRole);
+ address = varAddr.toString();
+ }
+//! [4a]
+
+//! [4b]
+ AddDialog aDialog;
+ aDialog.setWindowTitle(tr("Edit a Contact"));
+
+ aDialog.nameText->setReadOnly(true);
+ aDialog.nameText->setText(name);
+ aDialog.addressText->setText(address);
+
+ if (aDialog.exec()) {
+ QString newAddress = aDialog.addressText->toPlainText();
+ if (newAddress != address) {
+ i = table->index(row, 1, QModelIndex());
+ table->setData(i, newAddress, Qt::EditRole);
+ }
+ }
+}
+//! [4b]
+
+//! [5]
+void AddressWidget::removeEntry()
+{
+ QTableView *temp = static_cast<QTableView*>(currentWidget());
+ QSortFilterProxyModel *proxy = static_cast<QSortFilterProxyModel*>(temp->model());
+ QItemSelectionModel *selectionModel = temp->selectionModel();
+
+ QModelIndexList indexes = selectionModel->selectedRows();
+ QModelIndex index;
+
+ foreach (index, indexes) {
+ int row = proxy->mapToSource(index).row();
+ table->removeRows(row, 1, QModelIndex());
+ }
+
+ if (table->rowCount(QModelIndex()) == 0) {
+ insertTab(0, newAddressTab, "Address Book");
+ }
+}
+//! [5]
+
+//! [1]
+void AddressWidget::setupTabs()
+{
+ QStringList groups;
+ groups << "ABC" << "DEF" << "GHI" << "JKL" << "MNO" << "PQR" << "STU" << "VW" << "XYZ";
+
+ for (int i = 0; i < groups.size(); ++i) {
+ QString str = groups.at(i);
+
+ proxyModel = new QSortFilterProxyModel(this);
+ proxyModel->setSourceModel(table);
+ proxyModel->setDynamicSortFilter(true);
+
+ QTableView *tableView = new QTableView;
+ tableView->setModel(proxyModel);
+ tableView->setSortingEnabled(true);
+ tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ tableView->horizontalHeader()->setStretchLastSection(true);
+ tableView->verticalHeader()->hide();
+ tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ tableView->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ QString newStr = QString("^[%1].*").arg(str);
+
+ proxyModel->setFilterRegExp(QRegExp(newStr, Qt::CaseInsensitive));
+ proxyModel->setFilterKeyColumn(0);
+ proxyModel->sort(0, Qt::AscendingOrder);
+
+ connect(tableView->selectionModel(),
+ SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+ this, SIGNAL(selectionChanged(const QItemSelection &)));
+
+ addTab(tableView, str);
+ }
+}
+//! [1]
+
+//! [7]
+void AddressWidget::readFromFile(QString fileName)
+{
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QList< QPair<QString, QString> > pairs = table->getList();
+ QDataStream in(&file);
+ in >> pairs;
+
+ if (pairs.isEmpty()) {
+ QMessageBox::information(this, tr("No contacts in file"),
+ tr("The file you are attempting to open contains no contacts."));
+ } else {
+ for (int i=0; i<pairs.size(); ++i) {
+ QPair<QString, QString> p = pairs.at(i);
+ addEntry(p.first, p.second);
+ }
+ }
+}
+//! [7]
+
+//! [6]
+void AddressWidget::writeToFile(QString fileName)
+{
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"), file.errorString());
+ return;
+ }
+
+ QList< QPair<QString, QString> > pairs = table->getList();
+ QDataStream out(&file);
+ out << pairs;
+}
+//! [6]
diff --git a/examples/itemviews/addressbook/addresswidget.h b/examples/itemviews/addressbook/addresswidget.h
new file mode 100644
index 0000000..826e8b8
--- /dev/null
+++ b/examples/itemviews/addressbook/addresswidget.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSWIDGET_H
+#define ADDRESSWIDGET_H
+
+#include <QTabWidget>
+#include <QItemSelection>
+#include "tablemodel.h"
+#include "newaddresstab.h"
+
+QT_BEGIN_NAMESPACE
+class QSortFilterProxyModel;
+class QItemSelectionModel;
+QT_END_NAMESPACE
+
+//! [0]
+class AddressWidget : public QTabWidget
+{
+ Q_OBJECT
+
+public:
+ AddressWidget(QWidget *parent=0);
+ void readFromFile(QString fileName);
+ void writeToFile(QString fileName);
+
+public slots:
+ void addEntry();
+ void addEntry(QString name, QString address);
+ void editEntry();
+ void removeEntry();
+
+signals:
+ void selectionChanged (const QItemSelection &selected);
+
+private:
+ void setupTabs();
+
+ TableModel *table;
+ NewAddressTab *newAddressTab;
+ QSortFilterProxyModel *proxyModel;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/addressbook/main.cpp b/examples/itemviews/addressbook/main.cpp
new file mode 100644
index 0000000..da15c26
--- /dev/null
+++ b/examples/itemviews/addressbook/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mw;
+ mw.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/itemviews/addressbook/mainwindow.cpp b/examples/itemviews/addressbook/mainwindow.cpp
new file mode 100644
index 0000000..8923522
--- /dev/null
+++ b/examples/itemviews/addressbook/mainwindow.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ addressWidget = new AddressWidget;
+ setCentralWidget(addressWidget);
+ createMenus();
+ setWindowTitle(tr("Address Book"));
+}
+//! [0]
+
+//! [1a]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+
+ openAct = new QAction(tr("&Open..."), this);
+ fileMenu->addAction(openAct);
+ connect(openAct, SIGNAL(triggered()),
+ this, SLOT(openFile()));
+//! [1a]
+
+ saveAct = new QAction(tr("&Save As..."), this);
+ fileMenu->addAction(saveAct);
+ connect(saveAct, SIGNAL(triggered()),
+ this, SLOT(saveFile()));
+
+ fileMenu->addSeparator();
+
+ exitAct = new QAction(tr("E&xit"), this);
+ fileMenu->addAction(exitAct);
+ connect(exitAct, SIGNAL(triggered()),
+ this, SLOT(close()));
+
+ toolMenu = menuBar()->addMenu(tr("&Tools"));
+
+ addAct = new QAction(tr("&Add Entry..."), this);
+ toolMenu->addAction(addAct);
+ connect(addAct, SIGNAL(triggered()),
+ addressWidget, SLOT(addEntry()));
+
+//! [1b]
+ editAct = new QAction(tr("&Edit Entry..."), this);
+ editAct->setEnabled(false);
+ toolMenu->addAction(editAct);
+ connect(editAct, SIGNAL(triggered()),
+ addressWidget, SLOT(editEntry()));
+
+ toolMenu->addSeparator();
+
+ removeAct = new QAction(tr("&Remove Entry"), this);
+ removeAct->setEnabled(false);
+ toolMenu->addAction(removeAct);
+ connect(removeAct, SIGNAL(triggered()),
+ addressWidget, SLOT(removeEntry()));
+
+ connect(addressWidget, SIGNAL(selectionChanged(const QItemSelection &)),
+ this, SLOT(updateActions(const QItemSelection &)));
+}
+//! [1b]
+
+//! [2]
+void MainWindow::openFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty()) {
+ addressWidget->readFromFile(fileName);
+ }
+}
+//! [2]
+
+//! [3]
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this);
+ if (!fileName.isEmpty()) {
+ addressWidget->writeToFile(fileName);
+ }
+}
+//! [3]
+
+//! [4]
+void MainWindow::updateActions(const QItemSelection &selection)
+{
+ QModelIndexList indexes = selection.indexes();
+
+ if (!indexes.isEmpty()) {
+ removeAct->setEnabled(true);
+ editAct->setEnabled(true);
+ } else {
+ removeAct->setEnabled(false);
+ editAct->setEnabled(false);
+ }
+}
+//! [4]
diff --git a/examples/itemviews/addressbook/mainwindow.h b/examples/itemviews/addressbook/mainwindow.h
new file mode 100644
index 0000000..8c25e70
--- /dev/null
+++ b/examples/itemviews/addressbook/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui>
+#include "addresswidget.h"
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void updateActions(const QItemSelection &selection);
+ void openFile();
+ void saveFile();
+
+private:
+ void createMenus();
+
+ AddressWidget *addressWidget;
+ QMenu *fileMenu;
+ QMenu *toolMenu;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *exitAct;
+ QAction *addAct;
+ QAction *editAct;
+ QAction *removeAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/addressbook/newaddresstab.cpp b/examples/itemviews/addressbook/newaddresstab.cpp
new file mode 100644
index 0000000..bd0a314
--- /dev/null
+++ b/examples/itemviews/addressbook/newaddresstab.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "newaddresstab.h"
+#include "adddialog.h"
+
+//! [0]
+NewAddressTab::NewAddressTab(QWidget *parent)
+{
+ Q_UNUSED(parent);
+
+ descriptionLabel = new QLabel(tr("There are currently no contacts in your address book. "
+ "\nClick Add to add new contacts."));
+
+ addButton = new QPushButton(tr("Add"));
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addEntry()));
+
+ mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(descriptionLabel);
+ mainLayout->addWidget(addButton, 0, Qt::AlignCenter);
+
+ setLayout(mainLayout);
+}
+//! [0]
+
+//! [1]
+void NewAddressTab::addEntry()
+{
+ AddDialog aDialog;
+
+ if (aDialog.exec()) {
+ QString name = aDialog.nameText->text();
+ QString address = aDialog.addressText->toPlainText();
+
+ emit sendDetails(name, address);
+ }
+}
+//! [1]
diff --git a/examples/itemviews/addressbook/newaddresstab.h b/examples/itemviews/addressbook/newaddresstab.h
new file mode 100644
index 0000000..5ef6c37
--- /dev/null
+++ b/examples/itemviews/addressbook/newaddresstab.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NEWADDRESSTAB_H
+#define NEWADDRESSTAB_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class NewAddressTab : public QWidget
+{
+ Q_OBJECT
+
+public:
+ NewAddressTab(QWidget *parent=0);
+
+public slots:
+ void addEntry();
+
+signals:
+ void sendDetails(QString name, QString address);
+
+private:
+ QLabel *descriptionLabel;
+ QPushButton *addButton;
+ QVBoxLayout *mainLayout;
+
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/addressbook/tablemodel.cpp b/examples/itemviews/addressbook/tablemodel.cpp
new file mode 100644
index 0000000..5673451
--- /dev/null
+++ b/examples/itemviews/addressbook/tablemodel.cpp
@@ -0,0 +1,185 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tablemodel.h"
+
+//! [0]
+TableModel::TableModel(QObject *parent)
+ : QAbstractTableModel(parent)
+{
+}
+
+TableModel::TableModel(QList< QPair<QString, QString> > pairs, QObject *parent)
+ : QAbstractTableModel(parent)
+{
+ listOfPairs=pairs;
+}
+//! [0]
+
+//! [1]
+int TableModel::rowCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return listOfPairs.size();
+}
+
+int TableModel::columnCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return 2;
+}
+//! [1]
+
+//! [2]
+QVariant TableModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= listOfPairs.size() || index.row() < 0)
+ return QVariant();
+
+ if (role == Qt::DisplayRole) {
+ QPair<QString, QString> pair = listOfPairs.at(index.row());
+
+ if (index.column() == 0)
+ return pair.first;
+ else if (index.column() == 1)
+ return pair.second;
+ }
+ return QVariant();
+}
+//! [2]
+
+//! [3]
+QVariant TableModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal) {
+ switch (section) {
+ case 0:
+ return tr("Name");
+
+ case 1:
+ return tr("Address");
+
+ default:
+ return QVariant();
+ }
+ }
+ return QVariant();
+}
+//! [3]
+
+//! [4]
+bool TableModel::insertRows(int position, int rows, const QModelIndex &index)
+{
+ Q_UNUSED(index);
+ beginInsertRows(QModelIndex(), position, position+rows-1);
+
+ for (int row=0; row < rows; row++) {
+ QPair<QString, QString> pair(" ", " ");
+ listOfPairs.insert(position, pair);
+ }
+
+ endInsertRows();
+ return true;
+}
+//! [4]
+
+//! [5]
+bool TableModel::removeRows(int position, int rows, const QModelIndex &index)
+{
+ Q_UNUSED(index);
+ beginRemoveRows(QModelIndex(), position, position+rows-1);
+
+ for (int row=0; row < rows; ++row) {
+ listOfPairs.removeAt(position);
+ }
+
+ endRemoveRows();
+ return true;
+}
+//! [5]
+
+//! [6]
+bool TableModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+ if (index.isValid() && role == Qt::EditRole) {
+ int row = index.row();
+
+ QPair<QString, QString> p = listOfPairs.value(row);
+
+ if (index.column() == 0)
+ p.first = value.toString();
+ else if (index.column() == 1)
+ p.second = value.toString();
+ else
+ return false;
+
+ listOfPairs.replace(row, p);
+ emit(dataChanged(index, index));
+
+ return true;
+ }
+
+ return false;
+}
+//! [6]
+
+//! [7]
+Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return Qt::ItemIsEnabled;
+
+ return QAbstractTableModel::flags(index) | Qt::ItemIsEditable;
+}
+//! [7]
+
+//! [8]
+QList< QPair<QString, QString> > TableModel::getList()
+{
+ return listOfPairs;
+}
+//! [8]
diff --git a/examples/itemviews/addressbook/tablemodel.h b/examples/itemviews/addressbook/tablemodel.h
new file mode 100644
index 0000000..9433bec
--- /dev/null
+++ b/examples/itemviews/addressbook/tablemodel.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABLEMODEL_H
+#define TABLEMODEL_H
+
+#include <QAbstractTableModel>
+#include <QPair>
+#include <QList>
+
+//! [0]
+class TableModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ TableModel(QObject *parent=0);
+ TableModel(QList< QPair<QString, QString> > listofPairs, QObject *parent=0);
+
+ int rowCount(const QModelIndex &parent) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
+ bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex());
+ QList< QPair<QString, QString> > getList();
+
+private:
+ QList< QPair<QString, QString> > listOfPairs;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
new file mode 100644
index 0000000..7870b39
--- /dev/null
+++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
@@ -0,0 +1,10 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+CONFIG += qt
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/basicsortfiltermodel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/basicsortfiltermodel
+INSTALLS += target sources
diff --git a/examples/itemviews/basicsortfiltermodel/main.cpp b/examples/itemviews/basicsortfiltermodel/main.cpp
new file mode 100644
index 0000000..da499ed
--- /dev/null
+++ b/examples/itemviews/basicsortfiltermodel/main.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+void addMail(QAbstractItemModel *model, const QString &subject,
+ const QString &sender, const QDateTime &date)
+{
+ model->insertRow(0);
+ model->setData(model->index(0, 0), subject);
+ model->setData(model->index(0, 1), sender);
+ model->setData(model->index(0, 2), date);
+}
+
+QAbstractItemModel *createMailModel(QObject *parent)
+{
+ QStandardItemModel *model = new QStandardItemModel(0, 3, parent);
+
+ model->setHeaderData(0, Qt::Horizontal, QObject::tr("Subject"));
+ model->setHeaderData(1, Qt::Horizontal, QObject::tr("Sender"));
+ model->setHeaderData(2, Qt::Horizontal, QObject::tr("Date"));
+
+ addMail(model, "Happy New Year!", "Grace K. <grace@software-inc.com>",
+ QDateTime(QDate(2006, 12, 31), QTime(17, 03)));
+ addMail(model, "Radically new concept", "Grace K. <grace@software-inc.com>",
+ QDateTime(QDate(2006, 12, 22), QTime(9, 44)));
+ addMail(model, "Accounts", "pascale@nospam.com",
+ QDateTime(QDate(2006, 12, 31), QTime(12, 50)));
+ addMail(model, "Expenses", "Joe Bloggs <joe@bloggs.com>",
+ QDateTime(QDate(2006, 12, 25), QTime(11, 39)));
+ addMail(model, "Re: Expenses", "Andy <andy@nospam.com>",
+ QDateTime(QDate(2007, 01, 02), QTime(16, 05)));
+ addMail(model, "Re: Accounts", "Joe Bloggs <joe@bloggs.com>",
+ QDateTime(QDate(2007, 01, 03), QTime(14, 18)));
+ addMail(model, "Re: Accounts", "Andy <andy@nospam.com>",
+ QDateTime(QDate(2007, 01, 03), QTime(14, 26)));
+ addMail(model, "Sports", "Linda Smith <linda.smith@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(11, 33)));
+ addMail(model, "AW: Sports", "Rolf Newschweinstein <rolfn@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(12, 00)));
+ addMail(model, "RE: Sports", "Petra Schmidt <petras@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(12, 01)));
+
+ return model;
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.setSourceModel(createMailModel(&window));
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp
new file mode 100644
index 0000000..e60553e
--- /dev/null
+++ b/examples/itemviews/basicsortfiltermodel/window.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+Window::Window()
+{
+ proxyModel = new QSortFilterProxyModel;
+ proxyModel->setDynamicSortFilter(true);
+
+ sourceGroupBox = new QGroupBox(tr("Original Model"));
+ proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
+
+ sourceView = new QTreeView;
+ sourceView->setRootIsDecorated(false);
+ sourceView->setAlternatingRowColors(true);
+
+ proxyView = new QTreeView;
+ proxyView->setRootIsDecorated(false);
+ proxyView->setAlternatingRowColors(true);
+ proxyView->setModel(proxyModel);
+ proxyView->setSortingEnabled(true);
+
+ sortCaseSensitivityCheckBox = new QCheckBox(tr("Case sensitive sorting"));
+ filterCaseSensitivityCheckBox = new QCheckBox(tr("Case sensitive filter"));
+
+ filterPatternLineEdit = new QLineEdit;
+ filterPatternLabel = new QLabel(tr("&Filter pattern:"));
+ filterPatternLabel->setBuddy(filterPatternLineEdit);
+
+ filterSyntaxComboBox = new QComboBox;
+ filterSyntaxComboBox->addItem(tr("Regular expression"), QRegExp::RegExp);
+ filterSyntaxComboBox->addItem(tr("Wildcard"), QRegExp::Wildcard);
+ filterSyntaxComboBox->addItem(tr("Fixed string"), QRegExp::FixedString);
+ filterSyntaxLabel = new QLabel(tr("Filter &syntax:"));
+ filterSyntaxLabel->setBuddy(filterSyntaxComboBox);
+
+ filterColumnComboBox = new QComboBox;
+ filterColumnComboBox->addItem(tr("Subject"));
+ filterColumnComboBox->addItem(tr("Sender"));
+ filterColumnComboBox->addItem(tr("Date"));
+ filterColumnLabel = new QLabel(tr("Filter &column:"));
+ filterColumnLabel->setBuddy(filterColumnComboBox);
+
+ connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(filterRegExpChanged()));
+ connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(filterRegExpChanged()));
+ connect(filterColumnComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(filterColumnChanged()));
+ connect(filterCaseSensitivityCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(filterRegExpChanged()));
+ connect(sortCaseSensitivityCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(sortChanged()));
+
+ QHBoxLayout *sourceLayout = new QHBoxLayout;
+ sourceLayout->addWidget(sourceView);
+ sourceGroupBox->setLayout(sourceLayout);
+
+ QGridLayout *proxyLayout = new QGridLayout;
+ proxyLayout->addWidget(proxyView, 0, 0, 1, 3);
+ proxyLayout->addWidget(filterPatternLabel, 1, 0);
+ proxyLayout->addWidget(filterPatternLineEdit, 1, 1, 1, 2);
+ proxyLayout->addWidget(filterSyntaxLabel, 2, 0);
+ proxyLayout->addWidget(filterSyntaxComboBox, 2, 1, 1, 2);
+ proxyLayout->addWidget(filterColumnLabel, 3, 0);
+ proxyLayout->addWidget(filterColumnComboBox, 3, 1, 1, 2);
+ proxyLayout->addWidget(filterCaseSensitivityCheckBox, 4, 0, 1, 2);
+ proxyLayout->addWidget(sortCaseSensitivityCheckBox, 4, 2);
+ proxyGroupBox->setLayout(proxyLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(sourceGroupBox);
+ mainLayout->addWidget(proxyGroupBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Basic Sort/Filter Model"));
+ resize(500, 450);
+
+ proxyView->sortByColumn(1, Qt::AscendingOrder);
+ filterColumnComboBox->setCurrentIndex(1);
+
+ filterPatternLineEdit->setText("Andy|Grace");
+ filterCaseSensitivityCheckBox->setChecked(true);
+ sortCaseSensitivityCheckBox->setChecked(true);
+}
+
+void Window::setSourceModel(QAbstractItemModel *model)
+{
+ proxyModel->setSourceModel(model);
+ sourceView->setModel(model);
+}
+
+void Window::filterRegExpChanged()
+{
+ QRegExp::PatternSyntax syntax =
+ QRegExp::PatternSyntax(filterSyntaxComboBox->itemData(
+ filterSyntaxComboBox->currentIndex()).toInt());
+ Qt::CaseSensitivity caseSensitivity =
+ filterCaseSensitivityCheckBox->isChecked() ? Qt::CaseSensitive
+ : Qt::CaseInsensitive;
+
+ QRegExp regExp(filterPatternLineEdit->text(), caseSensitivity, syntax);
+ proxyModel->setFilterRegExp(regExp);
+}
+
+void Window::filterColumnChanged()
+{
+ proxyModel->setFilterKeyColumn(filterColumnComboBox->currentIndex());
+}
+
+void Window::sortChanged()
+{
+ proxyModel->setSortCaseSensitivity(
+ sortCaseSensitivityCheckBox->isChecked() ? Qt::CaseSensitive
+ : Qt::CaseInsensitive);
+}
diff --git a/examples/itemviews/basicsortfiltermodel/window.h b/examples/itemviews/basicsortfiltermodel/window.h
new file mode 100644
index 0000000..029a83a
--- /dev/null
+++ b/examples/itemviews/basicsortfiltermodel/window.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QSortFilterProxyModel;
+class QTreeView;
+QT_END_NAMESPACE
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+ void setSourceModel(QAbstractItemModel *model);
+
+private slots:
+ void filterRegExpChanged();
+ void filterColumnChanged();
+ void sortChanged();
+
+private:
+ QSortFilterProxyModel *proxyModel;
+
+ QGroupBox *sourceGroupBox;
+ QGroupBox *proxyGroupBox;
+ QTreeView *sourceView;
+ QTreeView *proxyView;
+ QCheckBox *filterCaseSensitivityCheckBox;
+ QCheckBox *sortCaseSensitivityCheckBox;
+ QLabel *filterPatternLabel;
+ QLabel *filterSyntaxLabel;
+ QLabel *filterColumnLabel;
+ QLineEdit *filterPatternLineEdit;
+ QComboBox *filterSyntaxComboBox;
+ QComboBox *filterColumnComboBox;
+};
+
+#endif
diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro
new file mode 100644
index 0000000..d202451
--- /dev/null
+++ b/examples/itemviews/chart/chart.pro
@@ -0,0 +1,13 @@
+HEADERS = mainwindow.h \
+ pieview.h
+RESOURCES = chart.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ pieview.cpp
+unix:!mac:LIBS+= -lm
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/chart
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.cht
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/chart
+INSTALLS += target sources
diff --git a/examples/itemviews/chart/chart.qrc b/examples/itemviews/chart/chart.qrc
new file mode 100644
index 0000000..7401d4d
--- /dev/null
+++ b/examples/itemviews/chart/chart.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/Charts" >
+ <file>qtdata.cht</file>
+</qresource>
+</RCC>
diff --git a/examples/itemviews/chart/main.cpp b/examples/itemviews/chart/main.cpp
new file mode 100644
index 0000000..dc3733c
--- /dev/null
+++ b/examples/itemviews/chart/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(chart);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/chart/mainwindow.cpp b/examples/itemviews/chart/mainwindow.cpp
new file mode 100644
index 0000000..208a465
--- /dev/null
+++ b/examples/itemviews/chart/mainwindow.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "pieview.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ QAction *saveAction = fileMenu->addAction(tr("&Save As..."));
+ saveAction->setShortcut(QKeySequence(tr("Ctrl+S")));
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+
+ setupModel();
+ setupViews();
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
+ connect(saveAction, SIGNAL(triggered()), this, SLOT(saveFile()));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ menuBar()->addMenu(fileMenu);
+ statusBar();
+
+ openFile(":/Charts/qtdata.cht");
+
+ setWindowTitle(tr("Chart"));
+ resize(870, 550);
+}
+
+void MainWindow::setupModel()
+{
+ model = new QStandardItemModel(8, 2, this);
+ model->setHeaderData(0, Qt::Horizontal, tr("Label"));
+ model->setHeaderData(1, Qt::Horizontal, tr("Quantity"));
+}
+
+void MainWindow::setupViews()
+{
+ QSplitter *splitter = new QSplitter;
+ QTableView *table = new QTableView;
+ pieChart = new PieView;
+ splitter->addWidget(table);
+ splitter->addWidget(pieChart);
+ splitter->setStretchFactor(0, 0);
+ splitter->setStretchFactor(1, 1);
+
+ table->setModel(model);
+ pieChart->setModel(model);
+
+ QItemSelectionModel *selectionModel = new QItemSelectionModel(model);
+ table->setSelectionModel(selectionModel);
+ pieChart->setSelectionModel(selectionModel);
+
+ QHeaderView *headerView = table->horizontalHeader();
+ headerView->setStretchLastSection(true);
+
+ setCentralWidget(splitter);
+}
+
+void MainWindow::openFile(const QString &path)
+{
+ QString fileName;
+ if (path.isNull())
+ fileName = QFileDialog::getOpenFileName(this, tr("Choose a data file"),
+ "", "*.cht");
+ else
+ fileName = path;
+
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+
+ if (file.open(QFile::ReadOnly | QFile::Text)) {
+ QTextStream stream(&file);
+ QString line;
+
+ model->removeRows(0, model->rowCount(QModelIndex()), QModelIndex());
+
+ int row = 0;
+ do {
+ line = stream.readLine();
+ if (!line.isEmpty()) {
+
+ model->insertRows(row, 1, QModelIndex());
+
+ QStringList pieces = line.split(",", QString::SkipEmptyParts);
+ model->setData(model->index(row, 0, QModelIndex()),
+ pieces.value(0));
+ model->setData(model->index(row, 1, QModelIndex()),
+ pieces.value(1));
+ model->setData(model->index(row, 0, QModelIndex()),
+ QColor(pieces.value(2)), Qt::DecorationRole);
+ row++;
+ }
+ } while (!line.isEmpty());
+
+ file.close();
+ statusBar()->showMessage(tr("Loaded %1").arg(fileName), 2000);
+ }
+ }
+}
+
+void MainWindow::saveFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save file as"), "", "*.cht");
+
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+ QTextStream stream(&file);
+
+ if (file.open(QFile::WriteOnly | QFile::Text)) {
+ for (int row = 0; row < model->rowCount(QModelIndex()); ++row) {
+
+ QStringList pieces;
+
+ pieces.append(model->data(model->index(row, 0, QModelIndex()),
+ Qt::DisplayRole).toString());
+ pieces.append(model->data(model->index(row, 1, QModelIndex()),
+ Qt::DisplayRole).toString());
+ pieces.append(model->data(model->index(row, 0, QModelIndex()),
+ Qt::DecorationRole).toString());
+
+ stream << pieces.join(",") << "\n";
+ }
+ }
+
+ file.close();
+ statusBar()->showMessage(tr("Saved %1").arg(fileName), 2000);
+ }
+}
diff --git a/examples/itemviews/chart/mainwindow.h b/examples/itemviews/chart/mainwindow.h
new file mode 100644
index 0000000..f3a9a10
--- /dev/null
+++ b/examples/itemviews/chart/mainwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QAbstractItemView;
+class QItemSelectionModel;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void openFile(const QString &path = QString());
+ void saveFile();
+
+private:
+ void setupModel();
+ void setupViews();
+
+ QAbstractItemModel *model;
+ QAbstractItemView *pieChart;
+ QItemSelectionModel *selectionModel;
+};
+
+#endif
diff --git a/examples/itemviews/chart/mydata.cht b/examples/itemviews/chart/mydata.cht
new file mode 100644
index 0000000..029fd81
--- /dev/null
+++ b/examples/itemviews/chart/mydata.cht
@@ -0,0 +1,8 @@
+London,4,red
+Stockholm,5,pink
+Paris,2,lightgreen
+Rome,11,green
+Lisbon,9,blue
+Madrid,8,lightblue
+Berlin,6,magenta
+Vienna,7,purple
diff --git a/examples/itemviews/chart/pieview.cpp b/examples/itemviews/chart/pieview.cpp
new file mode 100644
index 0000000..6b62f25
--- /dev/null
+++ b/examples/itemviews/chart/pieview.cpp
@@ -0,0 +1,562 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <math.h>
+#include <QtGui>
+
+#ifndef M_PI
+#define M_PI 3.1415927
+#endif
+
+#include "pieview.h"
+
+PieView::PieView(QWidget *parent)
+ : QAbstractItemView(parent)
+{
+ horizontalScrollBar()->setRange(0, 0);
+ verticalScrollBar()->setRange(0, 0);
+
+ margin = 8;
+ totalSize = 300;
+ pieSize = totalSize - 2*margin;
+ validItems = 0;
+ totalValue = 0.0;
+ rubberBand = 0;
+}
+
+void PieView::dataChanged(const QModelIndex &topLeft,
+ const QModelIndex &bottomRight)
+{
+ QAbstractItemView::dataChanged(topLeft, bottomRight);
+
+ validItems = 0;
+ totalValue = 0.0;
+
+ for (int row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+
+ if (value > 0.0) {
+ totalValue += value;
+ validItems++;
+ }
+ }
+ viewport()->update();
+}
+
+bool PieView::edit(const QModelIndex &index, EditTrigger trigger, QEvent *event)
+{
+ if (index.column() == 0)
+ return QAbstractItemView::edit(index, trigger, event);
+ else
+ return false;
+}
+
+/*
+ Returns the item that covers the coordinate given in the view.
+*/
+
+QModelIndex PieView::indexAt(const QPoint &point) const
+{
+ if (validItems == 0)
+ return QModelIndex();
+
+ // Transform the view coordinates into contents widget coordinates.
+ int wx = point.x() + horizontalScrollBar()->value();
+ int wy = point.y() + verticalScrollBar()->value();
+
+ if (wx < totalSize) {
+ double cx = wx - totalSize/2;
+ double cy = totalSize/2 - wy; // positive cy for items above the center
+
+ // Determine the distance from the center point of the pie chart.
+ double d = pow(pow(cx, 2) + pow(cy, 2), 0.5);
+
+ if (d == 0 || d > pieSize/2)
+ return QModelIndex();
+
+ // Determine the angle of the point.
+ double angle = (180 / M_PI) * acos(cx/d);
+ if (cy < 0)
+ angle = 360 - angle;
+
+ // Find the relevant slice of the pie.
+ double startAngle = 0.0;
+
+ for (int row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+
+ if (value > 0.0) {
+ double sliceAngle = 360*value/totalValue;
+
+ if (angle >= startAngle && angle < (startAngle + sliceAngle))
+ return model()->index(row, 1, rootIndex());
+
+ startAngle += sliceAngle;
+ }
+ }
+ } else {
+ double itemHeight = QFontMetrics(viewOptions().font).height();
+ int listItem = int((wy - margin) / itemHeight);
+ int validRow = 0;
+
+ for (int row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ if (model()->data(index).toDouble() > 0.0) {
+
+ if (listItem == validRow)
+ return model()->index(row, 0, rootIndex());
+
+ // Update the list index that corresponds to the next valid row.
+ validRow++;
+ }
+ }
+ }
+
+ return QModelIndex();
+}
+
+bool PieView::isIndexHidden(const QModelIndex & /*index*/) const
+{
+ return false;
+}
+
+/*
+ Returns the rectangle of the item at position \a index in the
+ model. The rectangle is in contents coordinates.
+*/
+
+QRect PieView::itemRect(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QRect();
+
+ // Check whether the index's row is in the list of rows represented
+ // by slices.
+ QModelIndex valueIndex;
+
+ if (index.column() != 1)
+ valueIndex = model()->index(index.row(), 1, rootIndex());
+ else
+ valueIndex = index;
+
+ if (model()->data(valueIndex).toDouble() > 0.0) {
+
+ int listItem = 0;
+ for (int row = index.row()-1; row >= 0; --row) {
+ if (model()->data(model()->index(row, 1, rootIndex())).toDouble() > 0.0)
+ listItem++;
+ }
+
+ double itemHeight;
+
+ switch (index.column()) {
+ case 0:
+ itemHeight = QFontMetrics(viewOptions().font).height();
+
+ return QRect(totalSize,
+ int(margin + listItem*itemHeight),
+ totalSize - margin, int(itemHeight));
+ case 1:
+ return viewport()->rect();
+ }
+
+ }
+ return QRect();
+}
+
+QRegion PieView::itemRegion(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QRegion();
+
+ if (index.column() != 1)
+ return itemRect(index);
+
+ if (model()->data(index).toDouble() <= 0.0)
+ return QRegion();
+
+ double startAngle = 0.0;
+ for (int row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex sliceIndex = model()->index(row, 1, rootIndex());
+ double value = model()->data(sliceIndex).toDouble();
+
+ if (value > 0.0) {
+ double angle = 360*value/totalValue;
+
+ if (sliceIndex == index) {
+ QPainterPath slicePath;
+ slicePath.moveTo(totalSize/2, totalSize/2);
+ slicePath.arcTo(margin, margin, margin+pieSize, margin+pieSize,
+ startAngle, angle);
+ slicePath.closeSubpath();
+
+ return QRegion(slicePath.toFillPolygon().toPolygon());
+ }
+
+ startAngle += angle;
+ }
+ }
+
+ return QRegion();
+}
+
+int PieView::horizontalOffset() const
+{
+ return horizontalScrollBar()->value();
+}
+
+void PieView::mousePressEvent(QMouseEvent *event)
+{
+ QAbstractItemView::mousePressEvent(event);
+ origin = event->pos();
+ if (!rubberBand)
+ rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
+ rubberBand->setGeometry(QRect(origin, QSize()));
+ rubberBand->show();
+}
+
+void PieView::mouseMoveEvent(QMouseEvent *event)
+{
+ if (rubberBand)
+ rubberBand->setGeometry(QRect(origin, event->pos()).normalized());
+ QAbstractItemView::mouseMoveEvent(event);
+}
+
+void PieView::mouseReleaseEvent(QMouseEvent *event)
+{
+ QAbstractItemView::mouseReleaseEvent(event);
+ if (rubberBand)
+ rubberBand->hide();
+ viewport()->update();
+}
+
+QModelIndex PieView::moveCursor(QAbstractItemView::CursorAction cursorAction,
+ Qt::KeyboardModifiers /*modifiers*/)
+{
+ QModelIndex current = currentIndex();
+
+ switch (cursorAction) {
+ case MoveLeft:
+ case MoveUp:
+ if (current.row() > 0)
+ current = model()->index(current.row() - 1, current.column(),
+ rootIndex());
+ else
+ current = model()->index(0, current.column(), rootIndex());
+ break;
+ case MoveRight:
+ case MoveDown:
+ if (current.row() < rows(current) - 1)
+ current = model()->index(current.row() + 1, current.column(),
+ rootIndex());
+ else
+ current = model()->index(rows(current) - 1, current.column(),
+ rootIndex());
+ break;
+ default:
+ break;
+ }
+
+ viewport()->update();
+ return current;
+}
+
+void PieView::paintEvent(QPaintEvent *event)
+{
+ QItemSelectionModel *selections = selectionModel();
+ QStyleOptionViewItem option = viewOptions();
+ QStyle::State state = option.state;
+
+ QBrush background = option.palette.base();
+ QPen foreground(option.palette.color(QPalette::WindowText));
+ QPen textPen(option.palette.color(QPalette::Text));
+ QPen highlightedPen(option.palette.color(QPalette::HighlightedText));
+
+ QPainter painter(viewport());
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ painter.fillRect(event->rect(), background);
+ painter.setPen(foreground);
+
+ // Viewport rectangles
+ QRect pieRect = QRect(margin, margin, pieSize, pieSize);
+ QPoint keyPoint = QPoint(totalSize - horizontalScrollBar()->value(),
+ margin - verticalScrollBar()->value());
+
+ if (validItems > 0) {
+
+ painter.save();
+ painter.translate(pieRect.x() - horizontalScrollBar()->value(),
+ pieRect.y() - verticalScrollBar()->value());
+ painter.drawEllipse(0, 0, pieSize, pieSize);
+ double startAngle = 0.0;
+ int row;
+
+ for (row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+
+ if (value > 0.0) {
+ double angle = 360*value/totalValue;
+
+ QModelIndex colorIndex = model()->index(row, 0, rootIndex());
+ QColor color = QColor(model()->data(colorIndex,
+ Qt::DecorationRole).toString());
+
+ if (currentIndex() == index)
+ painter.setBrush(QBrush(color, Qt::Dense4Pattern));
+ else if (selections->isSelected(index))
+ painter.setBrush(QBrush(color, Qt::Dense3Pattern));
+ else
+ painter.setBrush(QBrush(color));
+
+ painter.drawPie(0, 0, pieSize, pieSize, int(startAngle*16),
+ int(angle*16));
+
+ startAngle += angle;
+ }
+ }
+ painter.restore();
+
+ int keyNumber = 0;
+
+ for (row = 0; row < model()->rowCount(rootIndex()); ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+
+ if (value > 0.0) {
+ QModelIndex labelIndex = model()->index(row, 0, rootIndex());
+
+ QStyleOptionViewItem option = viewOptions();
+ option.rect = visualRect(labelIndex);
+ if (selections->isSelected(labelIndex))
+ option.state |= QStyle::State_Selected;
+ if (currentIndex() == labelIndex)
+ option.state |= QStyle::State_HasFocus;
+ itemDelegate()->paint(&painter, option, labelIndex);
+
+ keyNumber++;
+ }
+ }
+ }
+}
+
+void PieView::resizeEvent(QResizeEvent * /* event */)
+{
+ updateGeometries();
+}
+
+int PieView::rows(const QModelIndex &index) const
+{
+ return model()->rowCount(model()->parent(index));
+}
+
+void PieView::rowsInserted(const QModelIndex &parent, int start, int end)
+{
+ for (int row = start; row <= end; ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+
+ if (value > 0.0) {
+ totalValue += value;
+ validItems++;
+ }
+ }
+
+ QAbstractItemView::rowsInserted(parent, start, end);
+}
+
+void PieView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+{
+ for (int row = start; row <= end; ++row) {
+
+ QModelIndex index = model()->index(row, 1, rootIndex());
+ double value = model()->data(index).toDouble();
+ if (value > 0.0) {
+ totalValue -= value;
+ validItems--;
+ }
+ }
+
+ QAbstractItemView::rowsAboutToBeRemoved(parent, start, end);
+}
+
+void PieView::scrollContentsBy(int dx, int dy)
+{
+ viewport()->scroll(dx, dy);
+}
+
+void PieView::scrollTo(const QModelIndex &index, ScrollHint)
+{
+ QRect area = viewport()->rect();
+ QRect rect = visualRect(index);
+
+ if (rect.left() < area.left())
+ horizontalScrollBar()->setValue(
+ horizontalScrollBar()->value() + rect.left() - area.left());
+ else if (rect.right() > area.right())
+ horizontalScrollBar()->setValue(
+ horizontalScrollBar()->value() + qMin(
+ rect.right() - area.right(), rect.left() - area.left()));
+
+ if (rect.top() < area.top())
+ verticalScrollBar()->setValue(
+ verticalScrollBar()->value() + rect.top() - area.top());
+ else if (rect.bottom() > area.bottom())
+ verticalScrollBar()->setValue(
+ verticalScrollBar()->value() + qMin(
+ rect.bottom() - area.bottom(), rect.top() - area.top()));
+
+ update();
+}
+
+/*
+ Find the indices corresponding to the extent of the selection.
+*/
+
+void PieView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)
+{
+ // Use content widget coordinates because we will use the itemRegion()
+ // function to check for intersections.
+
+ QRect contentsRect = rect.translated(
+ horizontalScrollBar()->value(),
+ verticalScrollBar()->value()).normalized();
+
+ int rows = model()->rowCount(rootIndex());
+ int columns = model()->columnCount(rootIndex());
+ QModelIndexList indexes;
+
+ for (int row = 0; row < rows; ++row) {
+ for (int column = 0; column < columns; ++column) {
+ QModelIndex index = model()->index(row, column, rootIndex());
+ QRegion region = itemRegion(index);
+ if (!region.intersect(contentsRect).isEmpty())
+ indexes.append(index);
+ }
+ }
+
+ if (indexes.size() > 0) {
+ int firstRow = indexes[0].row();
+ int lastRow = indexes[0].row();
+ int firstColumn = indexes[0].column();
+ int lastColumn = indexes[0].column();
+
+ for (int i = 1; i < indexes.size(); ++i) {
+ firstRow = qMin(firstRow, indexes[i].row());
+ lastRow = qMax(lastRow, indexes[i].row());
+ firstColumn = qMin(firstColumn, indexes[i].column());
+ lastColumn = qMax(lastColumn, indexes[i].column());
+ }
+
+ QItemSelection selection(
+ model()->index(firstRow, firstColumn, rootIndex()),
+ model()->index(lastRow, lastColumn, rootIndex()));
+ selectionModel()->select(selection, command);
+ } else {
+ QModelIndex noIndex;
+ QItemSelection selection(noIndex, noIndex);
+ selectionModel()->select(selection, command);
+ }
+
+ update();
+}
+
+void PieView::updateGeometries()
+{
+ horizontalScrollBar()->setPageStep(viewport()->width());
+ horizontalScrollBar()->setRange(0, qMax(0, 2*totalSize - viewport()->width()));
+ verticalScrollBar()->setPageStep(viewport()->height());
+ verticalScrollBar()->setRange(0, qMax(0, totalSize - viewport()->height()));
+}
+
+int PieView::verticalOffset() const
+{
+ return verticalScrollBar()->value();
+}
+
+/*
+ Returns the position of the item in viewport coordinates.
+*/
+
+QRect PieView::visualRect(const QModelIndex &index) const
+{
+ QRect rect = itemRect(index);
+ if (rect.isValid())
+ return QRect(rect.left() - horizontalScrollBar()->value(),
+ rect.top() - verticalScrollBar()->value(),
+ rect.width(), rect.height());
+ else
+ return rect;
+}
+
+/*
+ Returns a region corresponding to the selection in viewport coordinates.
+*/
+
+QRegion PieView::visualRegionForSelection(const QItemSelection &selection) const
+{
+ int ranges = selection.count();
+
+ if (ranges == 0)
+ return QRect();
+
+ QRegion region;
+ for (int i = 0; i < ranges; ++i) {
+ QItemSelectionRange range = selection.at(i);
+ for (int row = range.top(); row <= range.bottom(); ++row) {
+ for (int col = range.left(); col <= range.right(); ++col) {
+ QModelIndex index = model()->index(row, col, rootIndex());
+ region += visualRect(index);
+ }
+ }
+ }
+ return region;
+}
diff --git a/examples/itemviews/chart/pieview.h b/examples/itemviews/chart/pieview.h
new file mode 100644
index 0000000..5bebefc
--- /dev/null
+++ b/examples/itemviews/chart/pieview.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PIEVIEW_H
+#define PIEVIEW_H
+
+#include <QAbstractItemView>
+#include <QFont>
+#include <QItemSelection>
+#include <QItemSelectionModel>
+#include <QModelIndex>
+#include <QRect>
+#include <QSize>
+#include <QPoint>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QRubberBand;
+QT_END_NAMESPACE
+
+//! [0]
+class PieView : public QAbstractItemView
+{
+ Q_OBJECT
+
+public:
+ PieView(QWidget *parent = 0);
+
+ QRect visualRect(const QModelIndex &index) const;
+ void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible);
+ QModelIndex indexAt(const QPoint &point) const;
+
+protected slots:
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void rowsInserted(const QModelIndex &parent, int start, int end);
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+
+protected:
+ bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event);
+ QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction,
+ Qt::KeyboardModifiers modifiers);
+
+ int horizontalOffset() const;
+ int verticalOffset() const;
+
+ bool isIndexHidden(const QModelIndex &index) const;
+
+ void setSelection(const QRect&, QItemSelectionModel::SelectionFlags command);
+
+ void mousePressEvent(QMouseEvent *event);
+
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void scrollContentsBy(int dx, int dy);
+
+ QRegion visualRegionForSelection(const QItemSelection &selection) const;
+
+private:
+ QRect itemRect(const QModelIndex &item) const;
+ QRegion itemRegion(const QModelIndex &index) const;
+ int rows(const QModelIndex &index = QModelIndex()) const;
+ void updateGeometries();
+
+ int margin;
+ int totalSize;
+ int pieSize;
+ int validItems;
+ double totalValue;
+ QPoint origin;
+ QRubberBand *rubberBand;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/chart/qtdata.cht b/examples/itemviews/chart/qtdata.cht
new file mode 100644
index 0000000..6386246
--- /dev/null
+++ b/examples/itemviews/chart/qtdata.cht
@@ -0,0 +1,14 @@
+Scientific Research,21,#99e600
+Engineering & Design,18,#99cc00
+Automotive,14,#99b300
+Aerospace,13,#9f991a
+Automation & Machine Tools,13,#a48033
+Medical & Bioinformatics,13,#a9664d
+Imaging & Special Effects,12,#ae4d66
+Defense,11,#b33380
+Test & Measurement Systems,9,#a64086
+Oil & Gas,9,#994d8d
+Entertainment & Broadcasting,7,#8d5a93
+Financial,6,#806699
+Consumer Electronics,4,#8073a6
+Other,38,#8080b3
diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
new file mode 100644
index 0000000..ebb3b8e
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
@@ -0,0 +1,11 @@
+HEADERS = colorlisteditor.h \
+ window.h
+SOURCES = colorlisteditor.cpp \
+ window.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/coloreditorfactory
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/coloreditorfactory
+INSTALLS += target sources
diff --git a/examples/itemviews/coloreditorfactory/colorlisteditor.cpp b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
new file mode 100644
index 0000000..88b953c
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/colorlisteditor.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "colorlisteditor.h"
+
+ColorListEditor::ColorListEditor(QWidget *widget) : QComboBox(widget)
+{
+ populateList();
+}
+
+//! [0]
+QColor ColorListEditor::color() const
+{
+ return qVariantValue<QColor>(itemData(currentIndex(), Qt::DecorationRole));
+}
+//! [0]
+
+//! [1]
+void ColorListEditor::setColor(QColor color)
+{
+ setCurrentIndex(findData(color, int(Qt::DecorationRole)));
+}
+//! [1]
+
+//! [2]
+void ColorListEditor::populateList()
+{
+ QStringList colorNames = QColor::colorNames();
+
+ for (int i = 0; i < colorNames.size(); ++i) {
+ QColor color(colorNames[i]);
+
+ insertItem(i, colorNames[i]);
+ setItemData(i, color, Qt::DecorationRole);
+ }
+}
+//! [2]
diff --git a/examples/itemviews/coloreditorfactory/colorlisteditor.h b/examples/itemviews/coloreditorfactory/colorlisteditor.h
new file mode 100644
index 0000000..810e268
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/colorlisteditor.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COLORLISTEDITOR_H
+#define COLORLISTEDITOR_H
+
+#include <QComboBox>
+
+QT_BEGIN_NAMESPACE
+class QColor;
+class QWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class ColorListEditor : public QComboBox
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor USER true)
+
+public:
+ ColorListEditor(QWidget *widget = 0);
+
+public:
+ QColor color() const;
+ void setColor(QColor c);
+
+private:
+ void populateList();
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/coloreditorfactory/main.cpp b/examples/itemviews/coloreditorfactory/main.cpp
new file mode 100644
index 0000000..a9740af
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Window window;
+ window.show();
+
+ return app.exec();
+}
diff --git a/examples/itemviews/coloreditorfactory/window.cpp b/examples/itemviews/coloreditorfactory/window.cpp
new file mode 100644
index 0000000..2ac64a3
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/window.cpp
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+#include "colorlisteditor.h"
+
+//! [0]
+Window::Window()
+{
+ QItemEditorFactory *factory = new QItemEditorFactory;
+
+ QItemEditorCreatorBase *colorListCreator =
+ new QStandardItemEditorCreator<ColorListEditor>();
+
+ factory->registerEditor(QVariant::Color, colorListCreator);
+
+ QItemEditorFactory::setDefaultFactory(factory);
+
+ createGUI();
+}
+//! [0]
+
+void Window::createGUI()
+{
+ QList<QPair<QString, QColor> > list;
+ list << QPair<QString, QColor>(tr("Alice"), QColor("aliceblue")) <<
+ QPair<QString, QColor>(tr("Neptun"), QColor("aquamarine")) <<
+ QPair<QString, QColor>(tr("Ferdinand"), QColor("springgreen"));
+
+ QTableWidget *table = new QTableWidget(3, 2);
+ table->setHorizontalHeaderLabels(QStringList() << tr("Name")
+ << tr("Hair Color"));
+ table->verticalHeader()->setVisible(false);
+ table->resize(150, 50);
+
+ for (int i = 0; i < 3; ++i) {
+ QPair<QString, QColor> pair = list.at(i);
+
+ QTableWidgetItem *nameItem = new QTableWidgetItem(pair.first);
+ QTableWidgetItem *colorItem = new QTableWidgetItem;
+ colorItem->setData(Qt::DisplayRole, pair.second);
+
+ table->setItem(i, 0, nameItem);
+ table->setItem(i, 1, colorItem);
+ }
+ table->resizeColumnToContents(0);
+ table->horizontalHeader()->setStretchLastSection(true);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(table, 0, 0);
+
+ setLayout(layout);
+
+ setWindowTitle(tr("Color Editor Factory"));
+}
diff --git a/examples/itemviews/coloreditorfactory/window.h b/examples/itemviews/coloreditorfactory/window.h
new file mode 100644
index 0000000..fc7b13a
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/window.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ void createGUI();
+};
+
+#endif
diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
new file mode 100644
index 0000000..7f5c8e8
--- /dev/null
+++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/combowidgetmapper
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/combowidgetmapper
+INSTALLS += target sources
diff --git a/examples/itemviews/combowidgetmapper/main.cpp b/examples/itemviews/combowidgetmapper/main.cpp
new file mode 100644
index 0000000..055ac21
--- /dev/null
+++ b/examples/itemviews/combowidgetmapper/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/combowidgetmapper/window.cpp b/examples/itemviews/combowidgetmapper/window.cpp
new file mode 100644
index 0000000..69a4c3c
--- /dev/null
+++ b/examples/itemviews/combowidgetmapper/window.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "window.h"
+
+//! [Set up widgets]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ setupModel();
+
+ nameLabel = new QLabel(tr("Na&me:"));
+ nameEdit = new QLineEdit();
+ addressLabel = new QLabel(tr("&Address:"));
+ addressEdit = new QTextEdit();
+ typeLabel = new QLabel(tr("&Type:"));
+ typeComboBox = new QComboBox();
+ nextButton = new QPushButton(tr("&Next"));
+ previousButton = new QPushButton(tr("&Previous"));
+
+ nameLabel->setBuddy(nameEdit);
+ addressLabel->setBuddy(addressEdit);
+ typeLabel->setBuddy(typeComboBox);
+
+ typeComboBox->setModel(typeModel);
+//! [Set up widgets]
+
+//! [Set up the mapper]
+ mapper = new QDataWidgetMapper(this);
+ mapper->setModel(model);
+ mapper->addMapping(nameEdit, 0);
+ mapper->addMapping(addressEdit, 1);
+ mapper->addMapping(typeComboBox, 2, "currentIndex");
+//! [Set up the mapper]
+
+//! [Set up connections and layouts]
+ connect(previousButton, SIGNAL(clicked()),
+ mapper, SLOT(toPrevious()));
+ connect(nextButton, SIGNAL(clicked()),
+ mapper, SLOT(toNext()));
+ connect(mapper, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(updateButtons(int)));
+
+ QGridLayout *layout = new QGridLayout();
+ layout->addWidget(nameLabel, 0, 0, 1, 1);
+ layout->addWidget(nameEdit, 0, 1, 1, 1);
+ layout->addWidget(previousButton, 0, 2, 1, 1);
+ layout->addWidget(addressLabel, 1, 0, 1, 1);
+ layout->addWidget(addressEdit, 1, 1, 2, 1);
+ layout->addWidget(nextButton, 1, 2, 1, 1);
+ layout->addWidget(typeLabel, 3, 0, 1, 1);
+ layout->addWidget(typeComboBox, 3, 1, 1, 1);
+ setLayout(layout);
+
+ setWindowTitle(tr("Delegate Widget Mapper"));
+ mapper->toFirst();
+}
+//! [Set up connections and layouts]
+
+//! [Set up the model]
+void Window::setupModel()
+{
+ QStringList items;
+ items << tr("Home") << tr("Work") << tr("Other");
+ typeModel = new QStringListModel(items, this);
+
+ model = new QStandardItemModel(5, 3, this);
+ QStringList names;
+ names << "Alice" << "Bob" << "Carol" << "Donald" << "Emma";
+ QStringList addresses;
+ addresses << "<qt>123 Main Street<br/>Market Town</qt>"
+ << "<qt>PO Box 32<br/>Mail Handling Service"
+ "<br/>Service City</qt>"
+ << "<qt>The Lighthouse<br/>Remote Island</qt>"
+ << "<qt>47338 Park Avenue<br/>Big City</qt>"
+ << "<qt>Research Station<br/>Base Camp<br/>Big Mountain</qt>";
+
+ QStringList types;
+ types << "0" << "1" << "2" << "0" << "2";
+
+ for (int row = 0; row < 5; ++row) {
+ QStandardItem *item = new QStandardItem(names[row]);
+ model->setItem(row, 0, item);
+ item = new QStandardItem(addresses[row]);
+ model->setItem(row, 1, item);
+ item = new QStandardItem(types[row]);
+ model->setItem(row, 2, item);
+ }
+}
+//! [Set up the model]
+
+//! [Slot for updating the buttons]
+void Window::updateButtons(int row)
+{
+ previousButton->setEnabled(row > 0);
+ nextButton->setEnabled(row < model->rowCount() - 1);
+}
+//! [Slot for updating the buttons]
diff --git a/examples/itemviews/combowidgetmapper/window.h b/examples/itemviews/combowidgetmapper/window.h
new file mode 100644
index 0000000..8c45117
--- /dev/null
+++ b/examples/itemviews/combowidgetmapper/window.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDataWidgetMapper;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QStandardItemModel;
+class QStringListModel;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [Window definition]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+private slots:
+ void updateButtons(int row);
+
+private:
+ void setupModel();
+
+ QLabel *nameLabel;
+ QLabel *addressLabel;
+ QLabel *typeLabel;
+ QLineEdit *nameEdit;
+ QTextEdit *addressEdit;
+ QComboBox *typeComboBox;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+
+ QStandardItemModel *model;
+ QStringListModel *typeModel;
+ QDataWidgetMapper *mapper;
+};
+//! [Window definition]
+
+#endif
diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
new file mode 100644
index 0000000..5a9b9f9
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
@@ -0,0 +1,12 @@
+HEADERS = mysortfilterproxymodel.h \
+ window.h
+SOURCES = main.cpp \
+ mysortfilterproxymodel.cpp \
+ window.cpp
+CONFIG += qt
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/customsortfiltermodel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/customsortfiltermodel
+INSTALLS += target sources
diff --git a/examples/itemviews/customsortfiltermodel/main.cpp b/examples/itemviews/customsortfiltermodel/main.cpp
new file mode 100644
index 0000000..043f28a
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/main.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+void addMail(QAbstractItemModel *model, const QString &subject,
+ const QString &sender, const QDateTime &date)
+{
+ model->insertRow(0);
+ model->setData(model->index(0, 0), subject);
+ model->setData(model->index(0, 1), sender);
+ model->setData(model->index(0, 2), date);
+}
+
+QAbstractItemModel *createMailModel(QObject *parent)
+{
+ QStandardItemModel *model = new QStandardItemModel(0, 3, parent);
+
+ model->setHeaderData(0, Qt::Horizontal, QObject::tr("Subject"));
+ model->setHeaderData(1, Qt::Horizontal, QObject::tr("Sender"));
+ model->setHeaderData(2, Qt::Horizontal, QObject::tr("Date"));
+
+ addMail(model, "Happy New Year!", "Grace K. <grace@software-inc.com>",
+ QDateTime(QDate(2006, 12, 31), QTime(17, 03)));
+ addMail(model, "Radically new concept", "Grace K. <grace@software-inc.com>",
+ QDateTime(QDate(2006, 12, 22), QTime(9, 44)));
+ addMail(model, "Accounts", "pascale@nospam.com",
+ QDateTime(QDate(2006, 12, 31), QTime(12, 50)));
+ addMail(model, "Expenses", "Joe Bloggs <joe@bloggs.com>",
+ QDateTime(QDate(2006, 12, 25), QTime(11, 39)));
+ addMail(model, "Re: Expenses", "Andy <andy@nospam.com>",
+ QDateTime(QDate(2007, 01, 02), QTime(16, 05)));
+ addMail(model, "Re: Accounts", "Joe Bloggs <joe@bloggs.com>",
+ QDateTime(QDate(2007, 01, 03), QTime(14, 18)));
+ addMail(model, "Re: Accounts", "Andy <andy@nospam.com>",
+ QDateTime(QDate(2007, 01, 03), QTime(14, 26)));
+ addMail(model, "Sports", "Linda Smith <linda.smith@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(11, 33)));
+ addMail(model, "AW: Sports", "Rolf Newschweinstein <rolfn@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(12, 00)));
+ addMail(model, "RE: Sports", "Petra Schmidt <petras@nospam.com>",
+ QDateTime(QDate(2007, 01, 05), QTime(12, 01)));
+
+ return model;
+}
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.setSourceModel(createMailModel(&window));
+ window.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
new file mode 100644
index 0000000..ead2eb7
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mysortfilterproxymodel.h"
+
+//! [0]
+MySortFilterProxyModel::MySortFilterProxyModel(QObject *parent)
+ : QSortFilterProxyModel(parent)
+{
+}
+//! [0]
+
+//! [1]
+void MySortFilterProxyModel::setFilterMinimumDate(const QDate &date)
+{
+ minDate = date;
+ invalidateFilter();
+}
+//! [1]
+
+//! [2]
+void MySortFilterProxyModel::setFilterMaximumDate(const QDate &date)
+{
+ maxDate = date;
+ invalidateFilter();
+}
+//! [2]
+
+//! [3]
+bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow,
+ const QModelIndex &sourceParent) const
+{
+ QModelIndex index0 = sourceModel()->index(sourceRow, 0, sourceParent);
+ QModelIndex index1 = sourceModel()->index(sourceRow, 1, sourceParent);
+ QModelIndex index2 = sourceModel()->index(sourceRow, 2, sourceParent);
+
+ return (sourceModel()->data(index0).toString().contains(filterRegExp())
+ || sourceModel()->data(index1).toString().contains(filterRegExp()))
+ && dateInRange(sourceModel()->data(index2).toDate());
+}
+//! [3]
+
+//! [4] //! [5]
+bool MySortFilterProxyModel::lessThan(const QModelIndex &left,
+ const QModelIndex &right) const
+{
+ QVariant leftData = sourceModel()->data(left);
+ QVariant rightData = sourceModel()->data(right);
+//! [4]
+
+//! [6]
+ if (leftData.type() == QVariant::DateTime) {
+ return leftData.toDateTime() < rightData.toDateTime();
+ } else {
+ QRegExp *emailPattern = new QRegExp("([\\w\\.]*@[\\w\\.]*)");
+
+ QString leftString = leftData.toString();
+ if(left.column() == 1 && emailPattern->indexIn(leftString) != -1)
+ leftString = emailPattern->cap(1);
+
+ QString rightString = rightData.toString();
+ if(right.column() == 1 && emailPattern->indexIn(rightString) != -1)
+ rightString = emailPattern->cap(1);
+
+ return QString::localeAwareCompare(leftString, rightString) < 0;
+ }
+}
+//! [5] //! [6]
+
+//! [7]
+bool MySortFilterProxyModel::dateInRange(const QDate &date) const
+{
+ return (!minDate.isValid() || date > minDate)
+ && (!maxDate.isValid() || date < maxDate);
+}
+//! [7]
diff --git a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
new file mode 100644
index 0000000..0e09bf1
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYSORTFILTERPROXYMODEL_H
+#define MYSORTFILTERPROXYMODEL_H
+
+#include <QDate>
+#include <QSortFilterProxyModel>
+
+//! [0]
+class MySortFilterProxyModel : public QSortFilterProxyModel
+{
+ Q_OBJECT
+
+public:
+ MySortFilterProxyModel(QObject *parent = 0);
+
+ QDate filterMinimumDate() const { return minDate; }
+ void setFilterMinimumDate(const QDate &date);
+
+ QDate filterMaximumDate() const { return maxDate; }
+ void setFilterMaximumDate(const QDate &date);
+
+protected:
+ bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+ bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
+
+private:
+ bool dateInRange(const QDate &date) const;
+
+ QDate minDate;
+ QDate maxDate;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp
new file mode 100644
index 0000000..54ba646
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/window.cpp
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mysortfilterproxymodel.h"
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ proxyModel = new MySortFilterProxyModel(this);
+ proxyModel->setDynamicSortFilter(true);
+//! [0]
+
+//! [1]
+ sourceView = new QTreeView;
+ sourceView->setRootIsDecorated(false);
+ sourceView->setAlternatingRowColors(true);
+//! [1]
+
+ QHBoxLayout *sourceLayout = new QHBoxLayout;
+//! [2]
+ sourceLayout->addWidget(sourceView);
+ sourceGroupBox = new QGroupBox(tr("Original Model"));
+ sourceGroupBox->setLayout(sourceLayout);
+//! [2]
+
+//! [3]
+ filterCaseSensitivityCheckBox = new QCheckBox(tr("Case sensitive filter"));
+ filterCaseSensitivityCheckBox->setChecked(true);
+
+ filterPatternLineEdit = new QLineEdit;
+ filterPatternLineEdit->setText("Grace|Sports");
+
+ filterPatternLabel = new QLabel(tr("&Filter pattern:"));
+ filterPatternLabel->setBuddy(filterPatternLineEdit);
+
+ filterSyntaxComboBox = new QComboBox;
+ filterSyntaxComboBox->addItem(tr("Regular expression"), QRegExp::RegExp);
+ filterSyntaxComboBox->addItem(tr("Wildcard"), QRegExp::Wildcard);
+ filterSyntaxComboBox->addItem(tr("Fixed string"), QRegExp::FixedString);
+
+ fromDateEdit = new QDateEdit;
+ fromDateEdit->setDate(QDate(1970, 01, 01));
+ fromLabel = new QLabel(tr("F&rom:"));
+ fromLabel->setBuddy(fromDateEdit);
+
+ toDateEdit = new QDateEdit;
+ toDateEdit->setDate(QDate(2099, 12, 31));
+ toLabel = new QLabel(tr("&To:"));
+ toLabel->setBuddy(toDateEdit);
+
+ connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(textFilterChanged()));
+ connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(textFilterChanged()));
+ connect(filterCaseSensitivityCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(textFilterChanged()));
+ connect(fromDateEdit, SIGNAL(dateChanged(const QDate &)),
+ this, SLOT(dateFilterChanged()));
+ connect(toDateEdit, SIGNAL(dateChanged(const QDate &)),
+//! [3] //! [4]
+ this, SLOT(dateFilterChanged()));
+//! [4]
+
+//! [5]
+ proxyView = new QTreeView;
+ proxyView->setRootIsDecorated(false);
+ proxyView->setAlternatingRowColors(true);
+ proxyView->setModel(proxyModel);
+ proxyView->setSortingEnabled(true);
+ proxyView->sortByColumn(1, Qt::AscendingOrder);
+
+ QGridLayout *proxyLayout = new QGridLayout;
+ proxyLayout->addWidget(proxyView, 0, 0, 1, 3);
+ proxyLayout->addWidget(filterPatternLabel, 1, 0);
+ proxyLayout->addWidget(filterPatternLineEdit, 1, 1);
+ proxyLayout->addWidget(filterSyntaxComboBox, 1, 2);
+ proxyLayout->addWidget(filterCaseSensitivityCheckBox, 2, 0, 1, 3);
+ proxyLayout->addWidget(fromLabel, 3, 0);
+ proxyLayout->addWidget(fromDateEdit, 3, 1, 1, 2);
+ proxyLayout->addWidget(toLabel, 4, 0);
+ proxyLayout->addWidget(toDateEdit, 4, 1, 1, 2);
+
+ proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
+ proxyGroupBox->setLayout(proxyLayout);
+//! [5]
+
+//! [6]
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(sourceGroupBox);
+ mainLayout->addWidget(proxyGroupBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Custom Sort/Filter Model"));
+ resize(500, 450);
+}
+//! [6]
+
+//! [7]
+void Window::setSourceModel(QAbstractItemModel *model)
+{
+ proxyModel->setSourceModel(model);
+ sourceView->setModel(model);
+}
+//! [7]
+
+//! [8]
+void Window::textFilterChanged()
+{
+ QRegExp::PatternSyntax syntax =
+ QRegExp::PatternSyntax(filterSyntaxComboBox->itemData(
+ filterSyntaxComboBox->currentIndex()).toInt());
+ Qt::CaseSensitivity caseSensitivity =
+ filterCaseSensitivityCheckBox->isChecked() ? Qt::CaseSensitive
+ : Qt::CaseInsensitive;
+
+ QRegExp regExp(filterPatternLineEdit->text(), caseSensitivity, syntax);
+ proxyModel->setFilterRegExp(regExp);
+}
+//! [8]
+
+//! [9]
+void Window::dateFilterChanged()
+{
+ proxyModel->setFilterMinimumDate(fromDateEdit->date());
+ proxyModel->setFilterMaximumDate(toDateEdit->date());
+}
+//! [9]
diff --git a/examples/itemviews/customsortfiltermodel/window.h b/examples/itemviews/customsortfiltermodel/window.h
new file mode 100644
index 0000000..ba97408
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/window.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QCheckBox;
+class QComboBox;
+class QDateEdit;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QTreeView;
+QT_END_NAMESPACE
+class MySortFilterProxyModel;
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+ void setSourceModel(QAbstractItemModel *model);
+
+private slots:
+ void textFilterChanged();
+ void dateFilterChanged();
+
+private:
+ MySortFilterProxyModel *proxyModel;
+
+ QGroupBox *sourceGroupBox;
+ QGroupBox *proxyGroupBox;
+ QTreeView *sourceView;
+ QTreeView *proxyView;
+ QCheckBox *filterCaseSensitivityCheckBox;
+ QLabel *filterPatternLabel;
+ QLabel *fromLabel;
+ QLabel *toLabel;
+ QLineEdit *filterPatternLineEdit;
+ QComboBox *filterSyntaxComboBox;
+ QDateEdit *fromDateEdit;
+ QDateEdit *toDateEdit;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/dirview/dirview.pro b/examples/itemviews/dirview/dirview.pro
new file mode 100644
index 0000000..5865d3c
--- /dev/null
+++ b/examples/itemviews/dirview/dirview.pro
@@ -0,0 +1,7 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/dirview
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/dirview
+INSTALLS += target sources
diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp
new file mode 100644
index 0000000..65d2ecc
--- /dev/null
+++ b/examples/itemviews/dirview/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QDirModel model;
+ QTreeView tree;
+ tree.setModel(&model);
+
+ // Demonstrating look and feel features
+ tree.setAnimated(false);
+ tree.setIndentation(20);
+ tree.setSortingEnabled(true);
+
+ tree.setWindowTitle(QObject::tr("Dir View"));
+ tree.resize(640, 480);
+ tree.show();
+
+ return app.exec();
+}
diff --git a/examples/itemviews/editabletreemodel/default.txt b/examples/itemviews/editabletreemodel/default.txt
new file mode 100644
index 0000000..2b2fb57
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/default.txt
@@ -0,0 +1,40 @@
+Getting Started How to familiarize yourself with Qt Designer
+ Launching Designer Running the Qt Designer application
+ The User Interface How to interact with Qt Designer
+
+Designing a Component Creating a GUI for your application
+ Creating a Dialog How to create a dialog
+ Composing the Dialog Putting widgets into the dialog example
+ Creating a Layout Arranging widgets on a form
+ Signal and Slot Connections Making widget communicate with each other
+
+Using a Component in Your Application Generating code from forms
+ The Direct Approach Using a form without any adjustments
+ The Single Inheritance Approach Subclassing a form's base class
+ The Multiple Inheritance Approach Subclassing the form itself
+ Automatic Connections Connecting widgets using a naming scheme
+ A Dialog Without Auto-Connect How to connect widgets without a naming scheme
+ A Dialog With Auto-Connect Using automatic connections
+
+Form Editing Mode How to edit a form in Qt Designer
+ Managing Forms Loading and saving forms
+ Editing a Form Basic editing techniques
+ The Property Editor Changing widget properties
+ The Object Inspector Examining the hierarchy of objects on a form
+ Layouts Objects that arrange widgets on a form
+ Applying and Breaking Layouts Managing widgets in layouts
+ Horizontal and Vertical Layouts Standard row and column layouts
+ The Grid Layout Arranging widgets in a matrix
+ Previewing Forms Checking that the design works
+
+Using Containers How to group widgets together
+ General Features Common container features
+ Frames QFrame
+ Group Boxes QGroupBox
+ Stacked Widgets QStackedWidget
+ Tab Widgets QTabWidget
+ Toolbox Widgets QToolBox
+
+Connection Editing Mode Connecting widgets together with signals and slots
+ Connecting Objects Making connections in Qt Designer
+ Editing Connections Changing existing connections
diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.pro b/examples/itemviews/editabletreemodel/editabletreemodel.pro
new file mode 100644
index 0000000..2b7b7de
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/editabletreemodel.pro
@@ -0,0 +1,16 @@
+FORMS = mainwindow.ui
+HEADERS = mainwindow.h \
+ treeitem.h \
+ treemodel.h
+RESOURCES = editabletreemodel.qrc
+SOURCES = mainwindow.cpp \
+ treeitem.cpp \
+ treemodel.cpp \
+ main.cpp
+CONFIG += qt
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/editabletreemodel
+sources.files = $$FORMS $$HEADERS $$RESOURCES $$SOURCES *.pro *.txt
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/editabletreemodel
+INSTALLS += target sources
diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.qrc b/examples/itemviews/editabletreemodel/editabletreemodel.qrc
new file mode 100644
index 0000000..2fb48f2
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/editabletreemodel.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>default.txt</file>
+ </qresource>
+</RCC>
diff --git a/examples/itemviews/editabletreemodel/main.cpp b/examples/itemviews/editabletreemodel/main.cpp
new file mode 100644
index 0000000..e476d2e
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(editabletreemodel);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/editabletreemodel/mainwindow.cpp b/examples/itemviews/editabletreemodel/mainwindow.cpp
new file mode 100644
index 0000000..f81b2fe
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/mainwindow.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "treemodel.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupUi(this);
+
+ QStringList headers;
+ headers << tr("Title") << tr("Description");
+
+ QFile file(":/default.txt");
+ file.open(QIODevice::ReadOnly);
+ TreeModel *model = new TreeModel(headers, file.readAll());
+ file.close();
+
+ view->setModel(model);
+ for (int column = 0; column < model->columnCount(); ++column)
+ view->resizeColumnToContents(column);
+
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ connect(view->selectionModel(),
+ SIGNAL(selectionChanged(const QItemSelection &,
+ const QItemSelection &)),
+ this, SLOT(updateActions()));
+
+ connect(actionsMenu, SIGNAL(aboutToShow()), this, SLOT(updateActions()));
+ connect(insertRowAction, SIGNAL(triggered()), this, SLOT(insertRow()));
+ connect(insertColumnAction, SIGNAL(triggered()), this, SLOT(insertColumn()));
+ connect(removeRowAction, SIGNAL(triggered()), this, SLOT(removeRow()));
+ connect(removeColumnAction, SIGNAL(triggered()), this, SLOT(removeColumn()));
+ connect(insertChildAction, SIGNAL(triggered()), this, SLOT(insertChild()));
+
+ updateActions();
+}
+
+void MainWindow::insertChild()
+{
+ QModelIndex index = view->selectionModel()->currentIndex();
+ QAbstractItemModel *model = view->model();
+
+ if (model->columnCount(index) == 0) {
+ if (!model->insertColumn(0, index))
+ return;
+ }
+
+ if (!model->insertRow(0, index))
+ return;
+
+ for (int column = 0; column < model->columnCount(index); ++column) {
+ QModelIndex child = model->index(0, column, index);
+ model->setData(child, QVariant("[No data]"), Qt::EditRole);
+ if (!model->headerData(column, Qt::Horizontal).isValid())
+ model->setHeaderData(column, Qt::Horizontal, QVariant("[No header]"),
+ Qt::EditRole);
+ }
+
+ view->selectionModel()->setCurrentIndex(model->index(0, 0, index),
+ QItemSelectionModel::ClearAndSelect);
+ updateActions();
+}
+
+bool MainWindow::insertColumn(const QModelIndex &parent)
+{
+ QAbstractItemModel *model = view->model();
+ int column = view->selectionModel()->currentIndex().column();
+
+ // Insert a column in the parent item.
+ bool changed = model->insertColumn(column + 1, parent);
+ if (changed)
+ model->setHeaderData(column + 1, Qt::Horizontal, QVariant("[No header]"),
+ Qt::EditRole);
+
+ updateActions();
+
+ return changed;
+}
+
+void MainWindow::insertRow()
+{
+ QModelIndex index = view->selectionModel()->currentIndex();
+ QAbstractItemModel *model = view->model();
+
+ if (!model->insertRow(index.row()+1, index.parent()))
+ return;
+
+ updateActions();
+
+ for (int column = 0; column < model->columnCount(index.parent()); ++column) {
+ QModelIndex child = model->index(index.row()+1, column, index.parent());
+ model->setData(child, QVariant("[No data]"), Qt::EditRole);
+ }
+}
+
+bool MainWindow::removeColumn(const QModelIndex &parent)
+{
+ QAbstractItemModel *model = view->model();
+ int column = view->selectionModel()->currentIndex().column();
+
+ // Insert columns in each child of the parent item.
+ bool changed = model->removeColumn(column, parent);
+
+ if (!parent.isValid() && changed)
+ updateActions();
+
+ return changed;
+}
+
+void MainWindow::removeRow()
+{
+ QModelIndex index = view->selectionModel()->currentIndex();
+ QAbstractItemModel *model = view->model();
+ if (model->removeRow(index.row(), index.parent()))
+ updateActions();
+}
+
+void MainWindow::updateActions()
+{
+ bool hasSelection = !view->selectionModel()->selection().isEmpty();
+ removeRowAction->setEnabled(hasSelection);
+ removeColumnAction->setEnabled(hasSelection);
+
+ bool hasCurrent = view->selectionModel()->currentIndex().isValid();
+ insertRowAction->setEnabled(hasCurrent);
+ insertColumnAction->setEnabled(hasCurrent);
+
+ if (hasCurrent) {
+ view->closePersistentEditor(view->selectionModel()->currentIndex());
+
+ int row = view->selectionModel()->currentIndex().row();
+ int column = view->selectionModel()->currentIndex().column();
+ if (view->selectionModel()->currentIndex().parent().isValid())
+ statusBar()->showMessage(tr("Position: (%1,%2)").arg(row).arg(column));
+ else
+ statusBar()->showMessage(tr("Position: (%1,%2) in top level").arg(row).arg(column));
+ }
+}
diff --git a/examples/itemviews/editabletreemodel/mainwindow.h b/examples/itemviews/editabletreemodel/mainwindow.h
new file mode 100644
index 0000000..6de08b6
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/mainwindow.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+#include "ui_mainwindow.h"
+
+class QAction;
+class QTreeView;
+class QWidget;
+
+class MainWindow : public QMainWindow, private Ui::MainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void updateActions();
+
+private slots:
+ void insertChild();
+ bool insertColumn(const QModelIndex &parent = QModelIndex());
+ void insertRow();
+ bool removeColumn(const QModelIndex &parent = QModelIndex());
+ void removeRow();
+};
+
+#endif
diff --git a/examples/itemviews/editabletreemodel/mainwindow.ui b/examples/itemviews/editabletreemodel/mainwindow.ui
new file mode 100644
index 0000000..2ad084a
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/mainwindow.ui
@@ -0,0 +1,128 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>573</width>
+ <height>468</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Editable Tree Model</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTreeView" name="view" >
+ <property name="alternatingRowColors" >
+ <bool>true</bool>
+ </property>
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectItems</enum>
+ </property>
+ <property name="horizontalScrollMode" >
+ <enum>QAbstractItemView::ScrollPerPixel</enum>
+ </property>
+ <property name="animated" >
+ <bool>false</bool>
+ </property>
+ <property name="allColumnsShowFocus" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>573</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="fileMenu" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="exitAction" />
+ </widget>
+ <widget class="QMenu" name="actionsMenu" >
+ <property name="title" >
+ <string>&amp;Actions</string>
+ </property>
+ <addaction name="insertRowAction" />
+ <addaction name="insertColumnAction" />
+ <addaction name="separator" />
+ <addaction name="removeRowAction" />
+ <addaction name="removeColumnAction" />
+ <addaction name="separator" />
+ <addaction name="insertChildAction" />
+ </widget>
+ <addaction name="fileMenu" />
+ <addaction name="actionsMenu" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="exitAction" >
+ <property name="text" >
+ <string>E&amp;xit</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+Q</string>
+ </property>
+ </action>
+ <action name="insertRowAction" >
+ <property name="text" >
+ <string>Insert Row</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+I, R</string>
+ </property>
+ </action>
+ <action name="removeRowAction" >
+ <property name="text" >
+ <string>Remove Row</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+R, R</string>
+ </property>
+ </action>
+ <action name="insertColumnAction" >
+ <property name="text" >
+ <string>Insert Column</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+I, C</string>
+ </property>
+ </action>
+ <action name="removeColumnAction" >
+ <property name="text" >
+ <string>Remove Column</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+R, C</string>
+ </property>
+ </action>
+ <action name="insertChildAction" >
+ <property name="text" >
+ <string>Insert Child</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ </widget>
+ <resources>
+ <include location="editabletreemodel.qrc" />
+ </resources>
+ <connections/>
+</ui>
diff --git a/examples/itemviews/editabletreemodel/treeitem.cpp b/examples/itemviews/editabletreemodel/treeitem.cpp
new file mode 100644
index 0000000..81a1bf3
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/treeitem.cpp
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ treeitem.cpp
+
+ A container for items of data supplied by the simple tree model.
+*/
+
+#include <QStringList>
+
+#include "treeitem.h"
+
+//! [0]
+TreeItem::TreeItem(const QVector<QVariant> &data, TreeItem *parent)
+{
+ parentItem = parent;
+ itemData = data;
+}
+//! [0]
+
+//! [1]
+TreeItem::~TreeItem()
+{
+ qDeleteAll(childItems);
+}
+//! [1]
+
+//! [2]
+TreeItem *TreeItem::child(int number)
+{
+ return childItems.value(number);
+}
+//! [2]
+
+//! [3]
+int TreeItem::childCount() const
+{
+ return childItems.count();
+}
+//! [3]
+
+//! [4]
+int TreeItem::childNumber() const
+{
+ if (parentItem)
+ return parentItem->childItems.indexOf(const_cast<TreeItem*>(this));
+
+ return 0;
+}
+//! [4]
+
+//! [5]
+int TreeItem::columnCount() const
+{
+ return itemData.count();
+}
+//! [5]
+
+//! [6]
+QVariant TreeItem::data(int column) const
+{
+ return itemData.value(column);
+}
+//! [6]
+
+//! [7]
+bool TreeItem::insertChildren(int position, int count, int columns)
+{
+ if (position < 0 || position > childItems.size())
+ return false;
+
+ for (int row = 0; row < count; ++row) {
+ QVector<QVariant> data(columns);
+ TreeItem *item = new TreeItem(data, this);
+ childItems.insert(position, item);
+ }
+
+ return true;
+}
+//! [7]
+
+//! [8]
+bool TreeItem::insertColumns(int position, int columns)
+{
+ if (position < 0 || position > itemData.size())
+ return false;
+
+ for (int column = 0; column < columns; ++column)
+ itemData.insert(position, QVariant());
+
+ foreach (TreeItem *child, childItems)
+ child->insertColumns(position, columns);
+
+ return true;
+}
+//! [8]
+
+//! [9]
+TreeItem *TreeItem::parent()
+{
+ return parentItem;
+}
+//! [9]
+
+//! [10]
+bool TreeItem::removeChildren(int position, int count)
+{
+ if (position < 0 || position + count > childItems.size())
+ return false;
+
+ for (int row = 0; row < count; ++row)
+ delete childItems.takeAt(position);
+
+ return true;
+}
+//! [10]
+
+bool TreeItem::removeColumns(int position, int columns)
+{
+ if (position < 0 || position + columns > itemData.size())
+ return false;
+
+ for (int column = 0; column < columns; ++column)
+ itemData.remove(position);
+
+ foreach (TreeItem *child, childItems)
+ child->removeColumns(position, columns);
+
+ return true;
+}
+
+//! [11]
+bool TreeItem::setData(int column, const QVariant &value)
+{
+ if (column < 0 || column >= itemData.size())
+ return false;
+
+ itemData[column] = value;
+ return true;
+}
+//! [11]
diff --git a/examples/itemviews/editabletreemodel/treeitem.h b/examples/itemviews/editabletreemodel/treeitem.h
new file mode 100644
index 0000000..9a36529
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/treeitem.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEITEM_H
+#define TREEITEM_H
+
+#include <QList>
+#include <QVariant>
+#include <QVector>
+
+//! [0]
+class TreeItem
+{
+public:
+ TreeItem(const QVector<QVariant> &data, TreeItem *parent = 0);
+ ~TreeItem();
+
+ TreeItem *child(int number);
+ int childCount() const;
+ int columnCount() const;
+ QVariant data(int column) const;
+ bool insertChildren(int position, int count, int columns);
+ bool insertColumns(int position, int columns);
+ TreeItem *parent();
+ bool removeChildren(int position, int count);
+ bool removeColumns(int position, int columns);
+ int childNumber() const;
+ bool setData(int column, const QVariant &value);
+
+private:
+ QList<TreeItem*> childItems;
+ QVector<QVariant> itemData;
+ TreeItem *parentItem;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/editabletreemodel/treemodel.cpp b/examples/itemviews/editabletreemodel/treemodel.cpp
new file mode 100644
index 0000000..f1dff03
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/treemodel.cpp
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "treeitem.h"
+#include "treemodel.h"
+
+//! [0]
+TreeModel::TreeModel(const QStringList &headers, const QString &data,
+ QObject *parent)
+ : QAbstractItemModel(parent)
+{
+ QVector<QVariant> rootData;
+ foreach (QString header, headers)
+ rootData << header;
+
+ rootItem = new TreeItem(rootData);
+ setupModelData(data.split(QString("\n")), rootItem);
+}
+//! [0]
+
+//! [1]
+TreeModel::~TreeModel()
+{
+ delete rootItem;
+}
+//! [1]
+
+//! [2]
+int TreeModel::columnCount(const QModelIndex & /* parent */) const
+{
+ return rootItem->columnCount();
+}
+//! [2]
+
+QVariant TreeModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role != Qt::DisplayRole && role != Qt::EditRole)
+ return QVariant();
+
+ TreeItem *item = getItem(index);
+
+ return item->data(index.column());
+}
+
+//! [3]
+Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return 0;
+
+ return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+//! [3]
+
+//! [4]
+TreeItem *TreeModel::getItem(const QModelIndex &index) const
+{
+ if (index.isValid()) {
+ TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
+ if (item) return item;
+ }
+ return rootItem;
+}
+//! [4]
+
+QVariant TreeModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+ return rootItem->data(section);
+
+ return QVariant();
+}
+
+//! [5]
+QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent) const
+{
+ if (parent.isValid() && parent.column() != 0)
+ return QModelIndex();
+//! [5]
+
+//! [6]
+ TreeItem *parentItem = getItem(parent);
+
+ TreeItem *childItem = parentItem->child(row);
+ if (childItem)
+ return createIndex(row, column, childItem);
+ else
+ return QModelIndex();
+}
+//! [6]
+
+bool TreeModel::insertColumns(int position, int columns, const QModelIndex &parent)
+{
+ bool success;
+
+ beginInsertColumns(parent, position, position + columns - 1);
+ success = rootItem->insertColumns(position, columns);
+ endInsertColumns();
+
+ return success;
+}
+
+bool TreeModel::insertRows(int position, int rows, const QModelIndex &parent)
+{
+ TreeItem *parentItem = getItem(parent);
+ bool success;
+
+ beginInsertRows(parent, position, position + rows - 1);
+ success = parentItem->insertChildren(position, rows, rootItem->columnCount());
+ endInsertRows();
+
+ return success;
+}
+
+//! [7]
+QModelIndex TreeModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ TreeItem *childItem = getItem(index);
+ TreeItem *parentItem = childItem->parent();
+
+ if (parentItem == rootItem)
+ return QModelIndex();
+
+ return createIndex(parentItem->childNumber(), 0, parentItem);
+}
+//! [7]
+
+bool TreeModel::removeColumns(int position, int columns, const QModelIndex &parent)
+{
+ bool success;
+
+ beginRemoveColumns(parent, position, position + columns - 1);
+ success = rootItem->removeColumns(position, columns);
+ endRemoveColumns();
+
+ if (rootItem->columnCount() == 0)
+ removeRows(0, rowCount());
+
+ return success;
+}
+
+bool TreeModel::removeRows(int position, int rows, const QModelIndex &parent)
+{
+ TreeItem *parentItem = getItem(parent);
+ bool success = true;
+
+ beginRemoveRows(parent, position, position + rows - 1);
+ success = parentItem->removeChildren(position, rows);
+ endRemoveRows();
+
+ return success;
+}
+
+//! [8]
+int TreeModel::rowCount(const QModelIndex &parent) const
+{
+ TreeItem *parentItem = getItem(parent);
+
+ return parentItem->childCount();
+}
+//! [8]
+
+bool TreeModel::setData(const QModelIndex &index, const QVariant &value,
+ int role)
+{
+ if (role != Qt::EditRole)
+ return false;
+
+ TreeItem *item = getItem(index);
+ bool result = item->setData(index.column(), value);
+
+ if (result)
+ emit dataChanged(index, index);
+
+ return result;
+}
+
+bool TreeModel::setHeaderData(int section, Qt::Orientation orientation,
+ const QVariant &value, int role)
+{
+ if (role != Qt::EditRole || orientation != Qt::Horizontal)
+ return false;
+
+ bool result = rootItem->setData(section, value);
+
+ if (result)
+ emit headerDataChanged(orientation, section, section);
+
+ return result;
+}
+
+void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
+{
+ QList<TreeItem*> parents;
+ QList<int> indentations;
+ parents << parent;
+ indentations << 0;
+
+ int number = 0;
+
+ while (number < lines.count()) {
+ int position = 0;
+ while (position < lines[number].length()) {
+ if (lines[number].mid(position, 1) != " ")
+ break;
+ position++;
+ }
+
+ QString lineData = lines[number].mid(position).trimmed();
+
+ if (!lineData.isEmpty()) {
+ // Read the column data from the rest of the line.
+ QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
+ QVector<QVariant> columnData;
+ for (int column = 0; column < columnStrings.count(); ++column)
+ columnData << columnStrings[column];
+
+ if (position > indentations.last()) {
+ // The last child of the current parent is now the new parent
+ // unless the current parent has no children.
+
+ if (parents.last()->childCount() > 0) {
+ parents << parents.last()->child(parents.last()->childCount()-1);
+ indentations << position;
+ }
+ } else {
+ while (position < indentations.last() && parents.count() > 0) {
+ parents.pop_back();
+ indentations.pop_back();
+ }
+ }
+
+ // Append a new item to the current parent's list of children.
+ TreeItem *parent = parents.last();
+ parent->insertChildren(parent->childCount(), 1, rootItem->columnCount());
+ for (int column = 0; column < columnData.size(); ++column)
+ parent->child(parent->childCount() - 1)->setData(column, columnData[column]);
+ }
+
+ number++;
+ }
+}
diff --git a/examples/itemviews/editabletreemodel/treemodel.h b/examples/itemviews/editabletreemodel/treemodel.h
new file mode 100644
index 0000000..36ae739
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/treemodel.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEMODEL_H
+#define TREEMODEL_H
+
+#include <QAbstractItemModel>
+#include <QModelIndex>
+#include <QVariant>
+
+class TreeItem;
+
+//! [0]
+class TreeModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ TreeModel(const QStringList &headers, const QString &data,
+ QObject *parent = 0);
+ ~TreeModel();
+//! [0] //! [1]
+
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+
+ QModelIndex index(int row, int column,
+ const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index) const;
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+//! [1]
+
+//! [2]
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value,
+ int role = Qt::EditRole);
+ bool setHeaderData(int section, Qt::Orientation orientation,
+ const QVariant &value, int role = Qt::EditRole);
+
+ bool insertColumns(int position, int columns,
+ const QModelIndex &parent = QModelIndex());
+ bool removeColumns(int position, int columns,
+ const QModelIndex &parent = QModelIndex());
+ bool insertRows(int position, int rows,
+ const QModelIndex &parent = QModelIndex());
+ bool removeRows(int position, int rows,
+ const QModelIndex &parent = QModelIndex());
+
+private:
+ void setupModelData(const QStringList &lines, TreeItem *parent);
+ TreeItem *getItem(const QModelIndex &index) const;
+
+ TreeItem *rootItem;
+};
+//! [2]
+
+#endif
diff --git a/examples/itemviews/fetchmore/fetchmore.pro b/examples/itemviews/fetchmore/fetchmore.pro
new file mode 100644
index 0000000..dcb84ed
--- /dev/null
+++ b/examples/itemviews/fetchmore/fetchmore.pro
@@ -0,0 +1,12 @@
+HEADERS = filelistmodel.h \
+ window.h
+SOURCES = filelistmodel.cpp \
+ main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/fetchmore
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/fetchmore
+INSTALLS += target sources
+
diff --git a/examples/itemviews/fetchmore/filelistmodel.cpp b/examples/itemviews/fetchmore/filelistmodel.cpp
new file mode 100644
index 0000000..fc51087
--- /dev/null
+++ b/examples/itemviews/fetchmore/filelistmodel.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "filelistmodel.h"
+#include <QApplication>
+#include <QPalette>
+#include <QBrush>
+#include <QDir>
+
+FileListModel::FileListModel(QObject *parent)
+ : QAbstractListModel(parent)
+{
+}
+
+//![4]
+int FileListModel::rowCount(const QModelIndex & /* parent */) const
+{
+ return fileCount;
+}
+
+QVariant FileListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() >= fileList.size() || index.row() < 0)
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return fileList.at(index.row());
+ else if (role == Qt::BackgroundRole) {
+ int batch = (index.row() / 100) % 2;
+ if (batch == 0)
+ return qApp->palette().base();
+ else
+ return qApp->palette().alternateBase();
+ }
+ return QVariant();
+}
+//![4]
+
+//![1]
+bool FileListModel::canFetchMore(const QModelIndex & /* index */) const
+{
+ if (fileCount < fileList.size())
+ return true;
+ else
+ return false;
+}
+//![1]
+
+//![2]
+void FileListModel::fetchMore(const QModelIndex & /* index */)
+{
+ int remainder = fileList.size() - fileCount;
+ int itemsToFetch = qMin(100, remainder);
+
+ beginInsertRows(QModelIndex(), fileCount, fileCount+itemsToFetch);
+
+ fileCount += itemsToFetch;
+
+ endInsertRows();
+
+ emit numberPopulated(itemsToFetch);
+}
+//![2]
+
+//![0]
+void FileListModel::setDirPath(const QString &path)
+{
+ QDir dir(path);
+
+ fileList = dir.entryList();
+ fileCount = 0;
+ reset();
+}
+//![0]
+
diff --git a/examples/itemviews/fetchmore/filelistmodel.h b/examples/itemviews/fetchmore/filelistmodel.h
new file mode 100644
index 0000000..921a9e2
--- /dev/null
+++ b/examples/itemviews/fetchmore/filelistmodel.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILELISTMODEL_H
+#define FILELISTMODEL_H
+
+#include <QAbstractListModel>
+#include <QList>
+#include <QStringList>
+
+//![0]
+class FileListModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ FileListModel(QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+
+signals:
+ void numberPopulated(int number);
+
+public slots:
+ void setDirPath(const QString &path);
+
+protected:
+ bool canFetchMore(const QModelIndex &parent) const;
+ void fetchMore(const QModelIndex &parent);
+
+private:
+ QStringList fileList;
+ int fileCount;
+};
+//![0]
+
+#endif
diff --git a/examples/itemviews/fetchmore/main.cpp b/examples/itemviews/fetchmore/main.cpp
new file mode 100644
index 0000000..58c9705
--- /dev/null
+++ b/examples/itemviews/fetchmore/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/fetchmore/window.cpp b/examples/itemviews/fetchmore/window.cpp
new file mode 100644
index 0000000..066f26b
--- /dev/null
+++ b/examples/itemviews/fetchmore/window.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "filelistmodel.h"
+#include "window.h"
+
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ FileListModel *model = new FileListModel(this);
+ model->setDirPath(QLibraryInfo::location(QLibraryInfo::PrefixPath));
+
+ QLabel *label = new QLabel(tr("&Directory:"));
+ QLineEdit *lineEdit = new QLineEdit;
+ label->setBuddy(lineEdit);
+
+ QListView *view = new QListView;
+ view->setModel(model);
+
+ logViewer = new QTextBrowser;
+ logViewer->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+
+ connect(lineEdit, SIGNAL(textChanged(const QString &)),
+ model, SLOT(setDirPath(const QString &)));
+ connect(lineEdit, SIGNAL(textChanged(const QString &)),
+ logViewer, SLOT(clear()));
+ connect(model, SIGNAL(numberPopulated(int)),
+ this, SLOT(updateLog(int)));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(label, 0, 0);
+ layout->addWidget(lineEdit, 0, 1);
+ layout->addWidget(view, 1, 0, 1, 2);
+ layout->addWidget(logViewer, 2, 0, 1, 2);
+
+ setLayout(layout);
+ setWindowTitle(tr("Fetch More Example"));
+}
+
+void Window::updateLog(int number)
+{
+ logViewer->append(tr("%1 items added.").arg(number));
+}
diff --git a/examples/itemviews/fetchmore/window.h b/examples/itemviews/fetchmore/window.h
new file mode 100644
index 0000000..1b8076f
--- /dev/null
+++ b/examples/itemviews/fetchmore/window.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QTextBrowser;
+QT_END_NAMESPACE
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+public slots:
+ void updateLog(int number);
+
+private:
+ QTextBrowser *logViewer;
+};
+
+#endif
diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro
new file mode 100644
index 0000000..6202bbc
--- /dev/null
+++ b/examples/itemviews/itemviews.pro
@@ -0,0 +1,22 @@
+TEMPLATE = subdirs
+SUBDIRS = addressbook \
+ basicsortfiltermodel \
+ chart \
+ coloreditorfactory \
+ combowidgetmapper \
+ customsortfiltermodel \
+ dirview \
+ editabletreemodel \
+ fetchmore \
+ pixelator \
+ puzzle \
+ simpledommodel \
+ simpletreemodel \
+ simplewidgetmapper \
+ spinboxdelegate \
+ stardelegate
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews
+INSTALLS += sources
diff --git a/examples/itemviews/pixelator/imagemodel.cpp b/examples/itemviews/pixelator/imagemodel.cpp
new file mode 100644
index 0000000..ea42b62
--- /dev/null
+++ b/examples/itemviews/pixelator/imagemodel.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagemodel.h"
+
+//! [0]
+ImageModel::ImageModel(QObject *parent)
+ : QAbstractTableModel(parent)
+{
+}
+//! [0]
+
+//! [1]
+void ImageModel::setImage(const QImage &image)
+{
+ modelImage = image;
+ reset();
+}
+//! [1]
+
+//! [2]
+int ImageModel::rowCount(const QModelIndex & /* parent */) const
+{
+ return modelImage.height();
+}
+
+int ImageModel::columnCount(const QModelIndex & /* parent */) const
+//! [2] //! [3]
+{
+ return modelImage.width();
+}
+//! [3]
+
+//! [4]
+QVariant ImageModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid() || role != Qt::DisplayRole)
+ return QVariant();
+ return qGray(modelImage.pixel(index.column(), index.row()));
+}
+//! [4]
+
+//! [5]
+QVariant ImageModel::headerData(int /* section */,
+ Qt::Orientation /* orientation */,
+ int role) const
+{
+ if (role == Qt::SizeHintRole)
+ return QSize(1, 1);
+ return QVariant();
+}
+//! [5]
diff --git a/examples/itemviews/pixelator/imagemodel.h b/examples/itemviews/pixelator/imagemodel.h
new file mode 100644
index 0000000..e92115a
--- /dev/null
+++ b/examples/itemviews/pixelator/imagemodel.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEMODEL_H
+#define IMAGEMODEL_H
+
+#include <QAbstractTableModel>
+#include <QImage>
+
+//! [0]
+class ImageModel : public QAbstractTableModel
+{
+ Q_OBJECT
+
+public:
+ ImageModel(QObject *parent = 0);
+
+ void setImage(const QImage &image);
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+private:
+ QImage modelImage;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/pixelator/images.qrc b/examples/itemviews/pixelator/images.qrc
new file mode 100644
index 0000000..c105e13
--- /dev/null
+++ b/examples/itemviews/pixelator/images.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/qt.png</file>
+</qresource>
+</RCC>
diff --git a/examples/itemviews/pixelator/images/qt.png b/examples/itemviews/pixelator/images/qt.png
new file mode 100644
index 0000000..a2c9c77
--- /dev/null
+++ b/examples/itemviews/pixelator/images/qt.png
Binary files differ
diff --git a/examples/itemviews/pixelator/main.cpp b/examples/itemviews/pixelator/main.cpp
new file mode 100644
index 0000000..7a30347
--- /dev/null
+++ b/examples/itemviews/pixelator/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(images);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ window.openImage(":/images/qt.png");
+ return app.exec();
+}
diff --git a/examples/itemviews/pixelator/mainwindow.cpp b/examples/itemviews/pixelator/mainwindow.cpp
new file mode 100644
index 0000000..a2b98cf
--- /dev/null
+++ b/examples/itemviews/pixelator/mainwindow.cpp
@@ -0,0 +1,245 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagemodel.h"
+#include "mainwindow.h"
+#include "pixeldelegate.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+//! [0]
+ currentPath = QDir::homePath();
+ model = new ImageModel(this);
+
+ QWidget *centralWidget = new QWidget;
+
+//! [1]
+ view = new QTableView;
+ view->setShowGrid(false);
+ view->horizontalHeader()->hide();
+ view->verticalHeader()->hide();
+ view->horizontalHeader()->setMinimumSectionSize(1);
+ view->verticalHeader()->setMinimumSectionSize(1);
+ view->setModel(model);
+//! [1]
+
+//! [2]
+ PixelDelegate *delegate = new PixelDelegate(this);
+ view->setItemDelegate(delegate);
+//! [2]
+
+//! [3]
+ QLabel *pixelSizeLabel = new QLabel(tr("Pixel size:"));
+ QSpinBox *pixelSizeSpinBox = new QSpinBox;
+ pixelSizeSpinBox->setMinimum(4);
+ pixelSizeSpinBox->setMaximum(32);
+ pixelSizeSpinBox->setValue(12);
+//! [3]
+
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+
+ printAction = fileMenu->addAction(tr("&Print..."));
+ printAction->setEnabled(false);
+ printAction->setShortcut(QKeySequence(tr("Ctrl+P")));
+
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+
+ QMenu *helpMenu = new QMenu(tr("&Help"), this);
+ QAction *aboutAction = helpMenu->addAction(tr("&About"));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addSeparator();
+ menuBar()->addMenu(helpMenu);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(chooseImage()));
+ connect(printAction, SIGNAL(triggered()), this, SLOT(printImage()));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(aboutAction, SIGNAL(triggered()), this, SLOT(showAboutBox()));
+//! [4]
+ connect(pixelSizeSpinBox, SIGNAL(valueChanged(int)),
+ delegate, SLOT(setPixelSize(int)));
+ connect(pixelSizeSpinBox, SIGNAL(valueChanged(int)),
+ this, SLOT(updateView()));
+//! [4]
+
+ QHBoxLayout *controlsLayout = new QHBoxLayout;
+ controlsLayout->addWidget(pixelSizeLabel);
+ controlsLayout->addWidget(pixelSizeSpinBox);
+ controlsLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(view);
+ mainLayout->addLayout(controlsLayout);
+ centralWidget->setLayout(mainLayout);
+
+ setCentralWidget(centralWidget);
+
+ setWindowTitle(tr("Pixelator"));
+ resize(640, 480);
+//! [5]
+}
+//! [5]
+
+void MainWindow::chooseImage()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Choose an image"), currentPath, "*");
+
+ if (!fileName.isEmpty())
+ openImage(fileName);
+}
+
+void MainWindow::openImage(const QString &fileName)
+{
+ QImage image;
+
+ if (image.load(fileName)) {
+ model->setImage(image);
+ if (!fileName.startsWith(":/")) {
+ currentPath = fileName;
+ setWindowTitle(tr("%1 - Pixelator").arg(currentPath));
+ }
+
+ printAction->setEnabled(true);
+ updateView();
+ }
+}
+
+void MainWindow::printImage()
+{
+#ifndef QT_NO_PRINTER
+ if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex())
+ > 90000) {
+ QMessageBox::StandardButton answer;
+ answer = QMessageBox::question(this, tr("Large Image Size"),
+ tr("The printed image may be very large. Are you sure that "
+ "you want to print it?"),
+ QMessageBox::Yes | QMessageBox::No);
+ if (answer == QMessageBox::No)
+ return;
+ }
+
+ QPrinter printer(QPrinter::HighResolution);
+
+ QPrintDialog *dlg = new QPrintDialog(&printer, this);
+ dlg->setWindowTitle(tr("Print Image"));
+
+ if (dlg->exec() != QDialog::Accepted)
+ return;
+
+ QPainter painter;
+ painter.begin(&printer);
+
+ int rows = model->rowCount(QModelIndex());
+ int columns = model->columnCount(QModelIndex());
+ int sourceWidth = (columns+1) * ItemSize;
+ int sourceHeight = (rows+1) * ItemSize;
+
+ painter.save();
+
+ double xscale = printer.pageRect().width()/double(sourceWidth);
+ double yscale = printer.pageRect().height()/double(sourceHeight);
+ double scale = qMin(xscale, yscale);
+
+ painter.translate(printer.paperRect().x() + printer.pageRect().width()/2,
+ printer.paperRect().y() + printer.pageRect().height()/2);
+ painter.scale(scale, scale);
+ painter.translate(-sourceWidth/2, -sourceHeight/2);
+
+ QStyleOptionViewItem option;
+ QModelIndex parent = QModelIndex();
+
+ QProgressDialog progress(tr("Printing..."), tr("Cancel"), 0, rows, this);
+ progress.setWindowModality(Qt::ApplicationModal);
+ float y = ItemSize/2;
+
+ for (int row = 0; row < rows; ++row) {
+ progress.setValue(row);
+ qApp->processEvents();
+ if (progress.wasCanceled())
+ break;
+
+ float x = ItemSize/2;
+
+ for (int column = 0; column < columns; ++column) {
+ option.rect = QRect(int(x), int(y), ItemSize, ItemSize);
+ view->itemDelegate()->paint(&painter, option,
+ model->index(row, column, parent));
+ x = x + ItemSize;
+ }
+ y = y + ItemSize;
+ }
+ progress.setValue(rows);
+
+ painter.restore();
+ painter.end();
+
+ if (progress.wasCanceled()) {
+ QMessageBox::information(this, tr("Printing canceled"),
+ tr("The printing process was canceled."), QMessageBox::Cancel);
+ }
+#else
+ QMessageBox::information(this, tr("Printing canceled"),
+ tr("Printing is not supported on this Qt build"), QMessageBox::Cancel);
+#endif
+}
+
+void MainWindow::showAboutBox()
+{
+ QMessageBox::about(this, tr("About the Pixelator example"),
+ tr("This example demonstrates how a standard view and a custom\n"
+ "delegate can be used to produce a specialized representation\n"
+ "of data in a simple custom model."));
+}
+
+//! [6]
+void MainWindow::updateView()
+{
+ view->resizeColumnsToContents();
+ view->resizeRowsToContents();
+}
+//! [6]
diff --git a/examples/itemviews/pixelator/mainwindow.h b/examples/itemviews/pixelator/mainwindow.h
new file mode 100644
index 0000000..df9510e
--- /dev/null
+++ b/examples/itemviews/pixelator/mainwindow.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class ImageModel;
+QT_BEGIN_NAMESPACE
+class QAction;
+class QTableView;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+ void openImage(const QString &fileName);
+
+public slots:
+ void chooseImage();
+ void printImage();
+ void showAboutBox();
+ void updateView();
+
+private:
+ ImageModel *model;
+ QAction *printAction;
+ QString currentPath;
+ QTableView *view;
+};
+
+#endif
diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro
new file mode 100644
index 0000000..dc05296
--- /dev/null
+++ b/examples/itemviews/pixelator/pixelator.pro
@@ -0,0 +1,14 @@
+HEADERS = imagemodel.h \
+ mainwindow.h \
+ pixeldelegate.h
+SOURCES = imagemodel.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ pixeldelegate.cpp
+RESOURCES += images.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/pixelator
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/pixelator
+INSTALLS += target sources
diff --git a/examples/itemviews/pixelator/pixeldelegate.cpp b/examples/itemviews/pixelator/pixeldelegate.cpp
new file mode 100644
index 0000000..496b365
--- /dev/null
+++ b/examples/itemviews/pixelator/pixeldelegate.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "pixeldelegate.h"
+
+//! [0]
+PixelDelegate::PixelDelegate(QObject *parent)
+ : QAbstractItemDelegate(parent)
+{
+ pixelSize = 12;
+}
+//! [0]
+
+//! [1]
+void PixelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+//! [2]
+ if (option.state & QStyle::State_Selected)
+ painter->fillRect(option.rect, option.palette.highlight());
+//! [1]
+
+//! [3]
+ int size = qMin(option.rect.width(), option.rect.height());
+//! [3] //! [4]
+ int brightness = index.model()->data(index, Qt::DisplayRole).toInt();
+ double radius = (size/2.0) - (brightness/255.0 * size/2.0);
+ if (radius == 0.0)
+ return;
+//! [4]
+
+//! [5]
+ painter->save();
+//! [5] //! [6]
+ painter->setRenderHint(QPainter::Antialiasing, true);
+//! [6] //! [7]
+ painter->setPen(Qt::NoPen);
+//! [7] //! [8]
+ if (option.state & QStyle::State_Selected)
+//! [8] //! [9]
+ painter->setBrush(option.palette.highlightedText());
+ else
+//! [2]
+ painter->setBrush(QBrush(Qt::black));
+//! [9]
+
+//! [10]
+ painter->drawEllipse(QRectF(option.rect.x() + option.rect.width()/2 - radius,
+ option.rect.y() + option.rect.height()/2 - radius,
+ 2*radius, 2*radius));
+ painter->restore();
+}
+//! [10]
+
+//! [11]
+QSize PixelDelegate::sizeHint(const QStyleOptionViewItem & /* option */,
+ const QModelIndex & /* index */) const
+{
+ return QSize(pixelSize, pixelSize);
+}
+//! [11]
+
+//! [12]
+void PixelDelegate::setPixelSize(int size)
+{
+ pixelSize = size;
+}
+//! [12]
diff --git a/examples/itemviews/pixelator/pixeldelegate.h b/examples/itemviews/pixelator/pixeldelegate.h
new file mode 100644
index 0000000..b38e470
--- /dev/null
+++ b/examples/itemviews/pixelator/pixeldelegate.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PIXELDELEGATE_H
+#define PIXELDELEGATE_H
+
+#include <QAbstractItemDelegate>
+#include <QFontMetrics>
+#include <QModelIndex>
+#include <QSize>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QObject;
+class QPainter;
+QT_END_NAMESPACE
+
+static const int ItemSize = 256;
+
+//! [0]
+class PixelDelegate : public QAbstractItemDelegate
+{
+ Q_OBJECT
+
+public:
+ PixelDelegate(QObject *parent = 0);
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+
+ QSize sizeHint(const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const;
+
+public slots:
+ void setPixelSize(int size);
+
+private:
+ int pixelSize;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/puzzle/example.jpg b/examples/itemviews/puzzle/example.jpg
new file mode 100644
index 0000000..e09fb70
--- /dev/null
+++ b/examples/itemviews/puzzle/example.jpg
Binary files differ
diff --git a/examples/itemviews/puzzle/main.cpp b/examples/itemviews/puzzle/main.cpp
new file mode 100644
index 0000000..e0e5cc1
--- /dev/null
+++ b/examples/itemviews/puzzle/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(puzzle);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.openImage(":/images/example.jpg");
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp
new file mode 100644
index 0000000..c6088f6
--- /dev/null
+++ b/examples/itemviews/puzzle/mainwindow.cpp
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <stdlib.h>
+
+#include "mainwindow.h"
+#include "piecesmodel.h"
+#include "puzzlewidget.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupMenus();
+ setupWidgets();
+ model = new PiecesModel(this);
+ piecesList->setModel(model);
+
+ setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ setWindowTitle(tr("Puzzle"));
+}
+
+void MainWindow::openImage(const QString &path)
+{
+ QString fileName = path;
+
+ if (fileName.isNull())
+ fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Image"), "", tr("Image Files (*.png *.jpg *.bmp)"));
+
+ if (!fileName.isEmpty()) {
+ QPixmap newImage;
+ if (!newImage.load(fileName)) {
+ QMessageBox::warning(this, tr("Open Image"),
+ tr("The image file could not be loaded."),
+ QMessageBox::Cancel);
+ return;
+ }
+ puzzleImage = newImage;
+ setupPuzzle();
+ }
+}
+
+void MainWindow::setCompleted()
+{
+ QMessageBox::information(this, tr("Puzzle Completed"),
+ tr("Congratulations! You have completed the puzzle!\n"
+ "Click OK to start again."),
+ QMessageBox::Ok);
+
+ setupPuzzle();
+}
+
+void MainWindow::setupPuzzle()
+{
+ int size = qMin(puzzleImage.width(), puzzleImage.height());
+ puzzleImage = puzzleImage.copy((puzzleImage.width() - size)/2,
+ (puzzleImage.height() - size)/2, size, size).scaled(400,
+ 400, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+
+ qsrand(QCursor::pos().x() ^ QCursor::pos().y());
+
+ model->addPieces(puzzleImage);
+ puzzleWidget->clear();
+}
+
+void MainWindow::setupMenus()
+{
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+
+ QAction *exitAction = fileMenu->addAction(tr("E&xit"));
+ exitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+
+ QMenu *gameMenu = menuBar()->addMenu(tr("&Game"));
+
+ QAction *restartAction = gameMenu->addAction(tr("&Restart"));
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openImage()));
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(restartAction, SIGNAL(triggered()), this, SLOT(setupPuzzle()));
+}
+
+void MainWindow::setupWidgets()
+{
+ QFrame *frame = new QFrame;
+ QHBoxLayout *frameLayout = new QHBoxLayout(frame);
+
+ piecesList = new QListView;
+ piecesList->setDragEnabled(true);
+ piecesList->setViewMode(QListView::IconMode);
+ piecesList->setIconSize(QSize(60, 60));
+ piecesList->setGridSize(QSize(80, 80));
+ piecesList->setSpacing(10);
+ piecesList->setMovement(QListView::Snap);
+ piecesList->setAcceptDrops(true);
+ piecesList->setDropIndicatorShown(true);
+
+ PiecesModel *model = new PiecesModel(this);
+ piecesList->setModel(model);
+
+ puzzleWidget = new PuzzleWidget;
+
+ connect(puzzleWidget, SIGNAL(puzzleCompleted()),
+ this, SLOT(setCompleted()), Qt::QueuedConnection);
+
+ frameLayout->addWidget(piecesList);
+ frameLayout->addWidget(puzzleWidget);
+ setCentralWidget(frame);
+}
diff --git a/examples/itemviews/puzzle/mainwindow.h b/examples/itemviews/puzzle/mainwindow.h
new file mode 100644
index 0000000..2fb97d4
--- /dev/null
+++ b/examples/itemviews/puzzle/mainwindow.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QPixmap>
+#include <QMainWindow>
+
+class PuzzleWidget;
+class PiecesModel;
+QT_BEGIN_NAMESPACE
+class QListView;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void openImage(const QString &path = QString());
+ void setupPuzzle();
+
+private slots:
+ void setCompleted();
+
+private:
+ void setupMenus();
+ void setupWidgets();
+
+ QPixmap puzzleImage;
+ QListView *piecesList;
+ PuzzleWidget *puzzleWidget;
+ PiecesModel *model;
+};
+
+#endif
diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp
new file mode 100644
index 0000000..f480837
--- /dev/null
+++ b/examples/itemviews/puzzle/piecesmodel.cpp
@@ -0,0 +1,204 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "piecesmodel.h"
+
+PiecesModel::PiecesModel(QObject *parent)
+ : QAbstractListModel(parent)
+{
+}
+
+QVariant PiecesModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role == Qt::DecorationRole)
+ return QIcon(pixmaps.value(index.row()).scaled(60, 60,
+ Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ else if (role == Qt::UserRole)
+ return pixmaps.value(index.row());
+ else if (role == Qt::UserRole + 1)
+ return locations.value(index.row());
+
+ return QVariant();
+}
+
+void PiecesModel::addPiece(const QPixmap &pixmap, const QPoint &location)
+{
+ int row;
+ if (int(2.0*qrand()/(RAND_MAX+1.0)) == 1)
+ row = 0;
+ else
+ row = pixmaps.size();
+
+ beginInsertRows(QModelIndex(), row, row);
+ pixmaps.insert(row, pixmap);
+ locations.insert(row, location);
+ endInsertRows();
+}
+
+Qt::ItemFlags PiecesModel::flags(const QModelIndex &index) const
+{
+ if (index.isValid())
+ return (Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled);
+
+ return Qt::ItemIsDropEnabled;
+}
+
+bool PiecesModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ if (parent.isValid())
+ return false;
+
+ if (row >= pixmaps.size() || row + count <= 0)
+ return false;
+
+ int beginRow = qMax(0, row);
+ int endRow = qMin(row + count - 1, pixmaps.size() - 1);
+
+ beginRemoveRows(parent, beginRow, endRow);
+
+ while (beginRow <= endRow) {
+ pixmaps.removeAt(beginRow);
+ locations.removeAt(beginRow);
+ ++beginRow;
+ }
+
+ endRemoveRows();
+ return true;
+}
+
+QStringList PiecesModel::mimeTypes() const
+{
+ QStringList types;
+ types << "image/x-puzzle-piece";
+ return types;
+}
+
+QMimeData *PiecesModel::mimeData(const QModelIndexList &indexes) const
+{
+ QMimeData *mimeData = new QMimeData();
+ QByteArray encodedData;
+
+ QDataStream stream(&encodedData, QIODevice::WriteOnly);
+
+ foreach (QModelIndex index, indexes) {
+ if (index.isValid()) {
+ QPixmap pixmap = qVariantValue<QPixmap>(data(index, Qt::UserRole));
+ QPoint location = data(index, Qt::UserRole+1).toPoint();
+ stream << pixmap << location;
+ }
+ }
+
+ mimeData->setData("image/x-puzzle-piece", encodedData);
+ return mimeData;
+}
+
+bool PiecesModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent)
+{
+ if (!data->hasFormat("image/x-puzzle-piece"))
+ return false;
+
+ if (action == Qt::IgnoreAction)
+ return true;
+
+ if (column > 0)
+ return false;
+
+ int endRow;
+
+ if (!parent.isValid()) {
+ if (row < 0)
+ endRow = pixmaps.size();
+ else
+ endRow = qMin(row, pixmaps.size());
+ } else
+ endRow = parent.row();
+
+ QByteArray encodedData = data->data("image/x-puzzle-piece");
+ QDataStream stream(&encodedData, QIODevice::ReadOnly);
+
+ while (!stream.atEnd()) {
+ QPixmap pixmap;
+ QPoint location;
+ stream >> pixmap >> location;
+
+ beginInsertRows(QModelIndex(), endRow, endRow);
+ pixmaps.insert(endRow, pixmap);
+ locations.insert(endRow, location);
+ endInsertRows();
+
+ ++endRow;
+ }
+
+ return true;
+}
+
+int PiecesModel::rowCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return 0;
+ else
+ return pixmaps.size();
+}
+
+Qt::DropActions PiecesModel::supportedDropActions() const
+{
+ return Qt::CopyAction | Qt::MoveAction;
+}
+
+void PiecesModel::addPieces(const QPixmap& pixmap)
+{
+ beginRemoveRows(QModelIndex(), 0, 24);
+ pixmaps.clear();
+ locations.clear();
+ endRemoveRows();
+ for (int y = 0; y < 5; ++y) {
+ for (int x = 0; x < 5; ++x) {
+ QPixmap pieceImage = pixmap.copy(x*80, y*80, 80, 80);
+ addPiece(pieceImage, QPoint(x, y));
+ }
+ }
+}
diff --git a/examples/itemviews/puzzle/piecesmodel.h b/examples/itemviews/puzzle/piecesmodel.h
new file mode 100644
index 0000000..777768a
--- /dev/null
+++ b/examples/itemviews/puzzle/piecesmodel.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PIECESLIST_H
+#define PIECESLIST_H
+
+#include <QAbstractListModel>
+#include <QList>
+#include <QPixmap>
+#include <QPoint>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+class QMimeData;
+QT_END_NAMESPACE
+
+class PiecesModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ PiecesModel(QObject *parent = 0);
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool removeRows(int row, int count, const QModelIndex &parent);
+
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const;
+ int rowCount(const QModelIndex &parent) const;
+ Qt::DropActions supportedDropActions() const;
+
+ void addPiece(const QPixmap &pixmap, const QPoint &location);
+ void addPieces(const QPixmap& pixmap);
+
+private:
+ QList<QPoint> locations;
+ QList<QPixmap> pixmaps;
+};
+
+#endif
diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro
new file mode 100644
index 0000000..deed112
--- /dev/null
+++ b/examples/itemviews/puzzle/puzzle.pro
@@ -0,0 +1,14 @@
+HEADERS = mainwindow.h \
+ piecesmodel.h \
+ puzzlewidget.h
+RESOURCES = puzzle.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ piecesmodel.cpp \
+ puzzlewidget.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/puzzle
+INSTALLS += target sources
diff --git a/examples/itemviews/puzzle/puzzle.qrc b/examples/itemviews/puzzle/puzzle.qrc
new file mode 100644
index 0000000..4076cec
--- /dev/null
+++ b/examples/itemviews/puzzle/puzzle.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/images">
+ <file>example.jpg</file>
+</qresource>
+</RCC>
diff --git a/examples/itemviews/puzzle/puzzlewidget.cpp b/examples/itemviews/puzzle/puzzlewidget.cpp
new file mode 100644
index 0000000..aa41ead
--- /dev/null
+++ b/examples/itemviews/puzzle/puzzlewidget.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "puzzlewidget.h"
+
+PuzzleWidget::PuzzleWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setAcceptDrops(true);
+ setMinimumSize(400, 400);
+ setMaximumSize(400, 400);
+}
+
+void PuzzleWidget::clear()
+{
+ pieceLocations.clear();
+ piecePixmaps.clear();
+ pieceRects.clear();
+ highlightedRect = QRect();
+ inPlace = 0;
+ update();
+}
+
+void PuzzleWidget::dragEnterEvent(QDragEnterEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece"))
+ event->accept();
+ else
+ event->ignore();
+}
+
+void PuzzleWidget::dragLeaveEvent(QDragLeaveEvent *event)
+{
+ QRect updateRect = highlightedRect;
+ highlightedRect = QRect();
+ update(updateRect);
+ event->accept();
+}
+
+void PuzzleWidget::dragMoveEvent(QDragMoveEvent *event)
+{
+ QRect updateRect = highlightedRect.unite(targetSquare(event->pos()));
+
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")
+ && findPiece(targetSquare(event->pos())) == -1) {
+
+ highlightedRect = targetSquare(event->pos());
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+ } else {
+ highlightedRect = QRect();
+ event->ignore();
+ }
+
+ update(updateRect);
+}
+
+void PuzzleWidget::dropEvent(QDropEvent *event)
+{
+ if (event->mimeData()->hasFormat("image/x-puzzle-piece")
+ && findPiece(targetSquare(event->pos())) == -1) {
+
+ QByteArray pieceData = event->mimeData()->data("image/x-puzzle-piece");
+ QDataStream stream(&pieceData, QIODevice::ReadOnly);
+ QRect square = targetSquare(event->pos());
+ QPixmap pixmap;
+ QPoint location;
+ stream >> pixmap >> location;
+
+ pieceLocations.append(location);
+ piecePixmaps.append(pixmap);
+ pieceRects.append(square);
+
+ highlightedRect = QRect();
+ update(square);
+
+ event->setDropAction(Qt::MoveAction);
+ event->accept();
+
+ if (location == QPoint(square.x()/80, square.y()/80)) {
+ inPlace++;
+ if (inPlace == 25)
+ emit puzzleCompleted();
+ }
+ } else {
+ highlightedRect = QRect();
+ event->ignore();
+ }
+}
+
+int PuzzleWidget::findPiece(const QRect &pieceRect) const
+{
+ for (int i = 0; i < pieceRects.size(); ++i) {
+ if (pieceRect == pieceRects[i]) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+void PuzzleWidget::mousePressEvent(QMouseEvent *event)
+{
+ QRect square = targetSquare(event->pos());
+ int found = findPiece(square);
+
+ if (found == -1)
+ return;
+
+ QPoint location = pieceLocations[found];
+ QPixmap pixmap = piecePixmaps[found];
+ pieceLocations.removeAt(found);
+ piecePixmaps.removeAt(found);
+ pieceRects.removeAt(found);
+
+ if (location == QPoint(square.x()/80, square.y()/80))
+ inPlace--;
+
+ update(square);
+
+ QByteArray itemData;
+ QDataStream dataStream(&itemData, QIODevice::WriteOnly);
+
+ dataStream << pixmap << location;
+
+ QMimeData *mimeData = new QMimeData;
+ mimeData->setData("image/x-puzzle-piece", itemData);
+
+ QDrag *drag = new QDrag(this);
+ drag->setMimeData(mimeData);
+ drag->setHotSpot(event->pos() - square.topLeft());
+ drag->setPixmap(pixmap);
+
+ if (drag->start(Qt::MoveAction) == 0) {
+ pieceLocations.insert(found, location);
+ piecePixmaps.insert(found, pixmap);
+ pieceRects.insert(found, square);
+ update(targetSquare(event->pos()));
+
+ if (location == QPoint(square.x()/80, square.y()/80))
+ inPlace++;
+ }
+}
+
+void PuzzleWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter;
+ painter.begin(this);
+ painter.fillRect(event->rect(), Qt::white);
+
+ if (highlightedRect.isValid()) {
+ painter.setBrush(QColor("#ffcccc"));
+ painter.setPen(Qt::NoPen);
+ painter.drawRect(highlightedRect.adjusted(0, 0, -1, -1));
+ }
+
+ for (int i = 0; i < pieceRects.size(); ++i) {
+ painter.drawPixmap(pieceRects[i], piecePixmaps[i]);
+ }
+ painter.end();
+}
+
+const QRect PuzzleWidget::targetSquare(const QPoint &position) const
+{
+ return QRect(position.x()/80 * 80, position.y()/80 * 80, 80, 80);
+}
diff --git a/examples/itemviews/puzzle/puzzlewidget.h b/examples/itemviews/puzzle/puzzlewidget.h
new file mode 100644
index 0000000..312e25f
--- /dev/null
+++ b/examples/itemviews/puzzle/puzzlewidget.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PUZZLEWIDGET_H
+#define PUZZLEWIDGET_H
+
+#include <QList>
+#include <QPoint>
+#include <QPixmap>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDragEnterEvent;
+class QDropEvent;
+class QMouseEvent;
+QT_END_NAMESPACE
+
+class PuzzleWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PuzzleWidget(QWidget *parent = 0);
+ void clear();
+
+signals:
+ void puzzleCompleted();
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragLeaveEvent(QDragLeaveEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ int findPiece(const QRect &pieceRect) const;
+ const QRect targetSquare(const QPoint &position) const;
+
+ QList<QPixmap> piecePixmaps;
+ QList<QRect> pieceRects;
+ QList<QPoint> pieceLocations;
+ QRect highlightedRect;
+ int inPlace;
+};
+
+#endif
diff --git a/examples/itemviews/simpledommodel/domitem.cpp b/examples/itemviews/simpledommodel/domitem.cpp
new file mode 100644
index 0000000..18f65ea
--- /dev/null
+++ b/examples/itemviews/simpledommodel/domitem.cpp
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtXml>
+
+#include "domitem.h"
+
+//! [0]
+DomItem::DomItem(QDomNode &node, int row, DomItem *parent)
+{
+ domNode = node;
+//! [0]
+ // Record the item's location within its parent.
+//! [1]
+ rowNumber = row;
+ parentItem = parent;
+}
+//! [1]
+
+//! [2]
+DomItem::~DomItem()
+{
+ QHash<int,DomItem*>::iterator it;
+ for (it = childItems.begin(); it != childItems.end(); ++it)
+ delete it.value();
+}
+//! [2]
+
+//! [3]
+QDomNode DomItem::node() const
+{
+ return domNode;
+}
+//! [3]
+
+//! [4]
+DomItem *DomItem::parent()
+{
+ return parentItem;
+}
+//! [4]
+
+//! [5]
+DomItem *DomItem::child(int i)
+{
+ if (childItems.contains(i))
+ return childItems[i];
+
+ if (i >= 0 && i < domNode.childNodes().count()) {
+ QDomNode childNode = domNode.childNodes().item(i);
+ DomItem *childItem = new DomItem(childNode, i, this);
+ childItems[i] = childItem;
+ return childItem;
+ }
+ return 0;
+}
+//! [5]
+
+//! [6]
+int DomItem::row()
+{
+ return rowNumber;
+}
+//! [6]
diff --git a/examples/itemviews/simpledommodel/domitem.h b/examples/itemviews/simpledommodel/domitem.h
new file mode 100644
index 0000000..61f2acc
--- /dev/null
+++ b/examples/itemviews/simpledommodel/domitem.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOMITEM_H
+#define DOMITEM_H
+
+#include <QDomNode>
+#include <QHash>
+
+//! [0]
+class DomItem
+{
+public:
+ DomItem(QDomNode &node, int row, DomItem *parent = 0);
+ ~DomItem();
+ DomItem *child(int i);
+ DomItem *parent();
+ QDomNode node() const;
+ int row();
+
+private:
+ QDomNode domNode;
+ QHash<int,DomItem*> childItems;
+ DomItem *parentItem;
+ int rowNumber;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/simpledommodel/dommodel.cpp b/examples/itemviews/simpledommodel/dommodel.cpp
new file mode 100644
index 0000000..495fd55
--- /dev/null
+++ b/examples/itemviews/simpledommodel/dommodel.cpp
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtXml>
+
+#include "domitem.h"
+#include "dommodel.h"
+
+//! [0]
+DomModel::DomModel(QDomDocument document, QObject *parent)
+ : QAbstractItemModel(parent), domDocument(document)
+{
+ rootItem = new DomItem(domDocument, 0);
+}
+//! [0]
+
+//! [1]
+DomModel::~DomModel()
+{
+ delete rootItem;
+}
+//! [1]
+
+//! [2]
+int DomModel::columnCount(const QModelIndex &/*parent*/) const
+{
+ return 3;
+}
+//! [2]
+
+//! [3]
+QVariant DomModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ DomItem *item = static_cast<DomItem*>(index.internalPointer());
+
+ QDomNode node = item->node();
+//! [3] //! [4]
+ QStringList attributes;
+ QDomNamedNodeMap attributeMap = node.attributes();
+
+ switch (index.column()) {
+ case 0:
+ return node.nodeName();
+ case 1:
+ for (int i = 0; i < attributeMap.count(); ++i) {
+ QDomNode attribute = attributeMap.item(i);
+ attributes << attribute.nodeName() + "=\""
+ +attribute.nodeValue() + "\"";
+ }
+ return attributes.join(" ");
+ case 2:
+ return node.nodeValue().split("\n").join(" ");
+ default:
+ return QVariant();
+ }
+}
+//! [4]
+
+//! [5]
+Qt::ItemFlags DomModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return 0;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+//! [5]
+
+//! [6]
+QVariant DomModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
+ switch (section) {
+ case 0:
+ return tr("Name");
+ case 1:
+ return tr("Attributes");
+ case 2:
+ return tr("Value");
+ default:
+ return QVariant();
+ }
+ }
+
+ return QVariant();
+}
+//! [6]
+
+//! [7]
+QModelIndex DomModel::index(int row, int column, const QModelIndex &parent)
+ const
+{
+ if (!hasIndex(row, column, parent))
+ return QModelIndex();
+
+ DomItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<DomItem*>(parent.internalPointer());
+//! [7]
+
+//! [8]
+ DomItem *childItem = parentItem->child(row);
+ if (childItem)
+ return createIndex(row, column, childItem);
+ else
+ return QModelIndex();
+}
+//! [8]
+
+//! [9]
+QModelIndex DomModel::parent(const QModelIndex &child) const
+{
+ if (!child.isValid())
+ return QModelIndex();
+
+ DomItem *childItem = static_cast<DomItem*>(child.internalPointer());
+ DomItem *parentItem = childItem->parent();
+
+ if (!parentItem || parentItem == rootItem)
+ return QModelIndex();
+
+ return createIndex(parentItem->row(), 0, parentItem);
+}
+//! [9]
+
+//! [10]
+int DomModel::rowCount(const QModelIndex &parent) const
+{
+ if (parent.column() > 0)
+ return 0;
+
+ DomItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<DomItem*>(parent.internalPointer());
+
+ return parentItem->node().childNodes().count();
+}
+//! [10]
diff --git a/examples/itemviews/simpledommodel/dommodel.h b/examples/itemviews/simpledommodel/dommodel.h
new file mode 100644
index 0000000..1178b2c
--- /dev/null
+++ b/examples/itemviews/simpledommodel/dommodel.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOMMODEL_H
+#define DOMMODEL_H
+
+#include <QAbstractItemModel>
+#include <QDomDocument>
+#include <QModelIndex>
+#include <QVariant>
+
+class DomItem;
+
+//! [0]
+class DomModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ DomModel(QDomDocument document, QObject *parent = 0);
+ ~DomModel();
+
+ QVariant data(const QModelIndex &index, int role) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+ QModelIndex index(int row, int column,
+ const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &child) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+private:
+ QDomDocument domDocument;
+ DomItem *rootItem;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/simpledommodel/main.cpp b/examples/itemviews/simpledommodel/main.cpp
new file mode 100644
index 0000000..d2ecfc9
--- /dev/null
+++ b/examples/itemviews/simpledommodel/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.resize(640, 480);
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/simpledommodel/mainwindow.cpp b/examples/itemviews/simpledommodel/mainwindow.cpp
new file mode 100644
index 0000000..ac96899
--- /dev/null
+++ b/examples/itemviews/simpledommodel/mainwindow.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDomDocument>
+#include <QFile>
+#include <QtGui>
+
+#include "dommodel.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow() : QMainWindow(), model(0)
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
+ QKeySequence(tr("Ctrl+O")));
+ fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
+ QKeySequence(tr("Ctrl+Q")));
+
+ model = new DomModel(QDomDocument(), this);
+ view = new QTreeView(this);
+ view->setModel(model);
+
+ setCentralWidget(view);
+ setWindowTitle(tr("Simple DOM Model"));
+}
+
+void MainWindow::openFile()
+{
+ QString filePath = QFileDialog::getOpenFileName(this, tr("Open File"),
+ xmlPath, tr("XML files (*.xml);;HTML files (*.html);;"
+ "SVG files (*.svg);;User Interface files (*.ui)"));
+
+ if (!filePath.isEmpty()) {
+ QFile file(filePath);
+ if (file.open(QIODevice::ReadOnly)) {
+ QDomDocument document;
+ if (document.setContent(&file)) {
+ DomModel *newModel = new DomModel(document, this);
+ view->setModel(newModel);
+ delete model;
+ model = newModel;
+ xmlPath = filePath;
+ }
+ file.close();
+ }
+ }
+}
diff --git a/examples/itemviews/simpledommodel/mainwindow.h b/examples/itemviews/simpledommodel/mainwindow.h
new file mode 100644
index 0000000..4bc967a
--- /dev/null
+++ b/examples/itemviews/simpledommodel/mainwindow.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QString>
+
+class DomModel;
+QT_BEGIN_NAMESPACE
+class QMenu;
+class QTreeView;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void openFile();
+
+private:
+ DomModel *model;
+ QMenu *fileMenu;
+ QString xmlPath;
+ QTreeView *view;
+};
+
+#endif
diff --git a/examples/itemviews/simpledommodel/simpledommodel.pro b/examples/itemviews/simpledommodel/simpledommodel.pro
new file mode 100644
index 0000000..bc9b1ca
--- /dev/null
+++ b/examples/itemviews/simpledommodel/simpledommodel.pro
@@ -0,0 +1,15 @@
+HEADERS = domitem.h \
+ dommodel.h \
+ mainwindow.h
+SOURCES = domitem.cpp \
+ dommodel.cpp \
+ main.cpp \
+ mainwindow.cpp
+CONFIG += qt
+QT += xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpledommodel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpledommodel
+INSTALLS += target sources
diff --git a/examples/itemviews/simpletreemodel/default.txt b/examples/itemviews/simpletreemodel/default.txt
new file mode 100644
index 0000000..2b2fb57
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/default.txt
@@ -0,0 +1,40 @@
+Getting Started How to familiarize yourself with Qt Designer
+ Launching Designer Running the Qt Designer application
+ The User Interface How to interact with Qt Designer
+
+Designing a Component Creating a GUI for your application
+ Creating a Dialog How to create a dialog
+ Composing the Dialog Putting widgets into the dialog example
+ Creating a Layout Arranging widgets on a form
+ Signal and Slot Connections Making widget communicate with each other
+
+Using a Component in Your Application Generating code from forms
+ The Direct Approach Using a form without any adjustments
+ The Single Inheritance Approach Subclassing a form's base class
+ The Multiple Inheritance Approach Subclassing the form itself
+ Automatic Connections Connecting widgets using a naming scheme
+ A Dialog Without Auto-Connect How to connect widgets without a naming scheme
+ A Dialog With Auto-Connect Using automatic connections
+
+Form Editing Mode How to edit a form in Qt Designer
+ Managing Forms Loading and saving forms
+ Editing a Form Basic editing techniques
+ The Property Editor Changing widget properties
+ The Object Inspector Examining the hierarchy of objects on a form
+ Layouts Objects that arrange widgets on a form
+ Applying and Breaking Layouts Managing widgets in layouts
+ Horizontal and Vertical Layouts Standard row and column layouts
+ The Grid Layout Arranging widgets in a matrix
+ Previewing Forms Checking that the design works
+
+Using Containers How to group widgets together
+ General Features Common container features
+ Frames QFrame
+ Group Boxes QGroupBox
+ Stacked Widgets QStackedWidget
+ Tab Widgets QTabWidget
+ Toolbox Widgets QToolBox
+
+Connection Editing Mode Connecting widgets together with signals and slots
+ Connecting Objects Making connections in Qt Designer
+ Editing Connections Changing existing connections
diff --git a/examples/itemviews/simpletreemodel/main.cpp b/examples/itemviews/simpletreemodel/main.cpp
new file mode 100644
index 0000000..89bdc77
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "treemodel.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(simpletreemodel);
+
+ QApplication app(argc, argv);
+
+ QFile file(":/default.txt");
+ file.open(QIODevice::ReadOnly);
+ TreeModel model(file.readAll());
+ file.close();
+
+ QTreeView view;
+ view.setModel(&model);
+ view.setWindowTitle(QObject::tr("Simple Tree Model"));
+ view.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.pro b/examples/itemviews/simpletreemodel/simpletreemodel.pro
new file mode 100644
index 0000000..9db74d4
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/simpletreemodel.pro
@@ -0,0 +1,13 @@
+HEADERS = treeitem.h \
+ treemodel.h
+RESOURCES = simpletreemodel.qrc
+SOURCES = treeitem.cpp \
+ treemodel.cpp \
+ main.cpp
+CONFIG += qt
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpletreemodel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.txt
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpletreemodel
+INSTALLS += target sources
diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.qrc b/examples/itemviews/simpletreemodel/simpletreemodel.qrc
new file mode 100644
index 0000000..a8ecc98
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/simpletreemodel.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>default.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/itemviews/simpletreemodel/treeitem.cpp b/examples/itemviews/simpletreemodel/treeitem.cpp
new file mode 100644
index 0000000..d2c1eed
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/treeitem.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ treeitem.cpp
+
+ A container for items of data supplied by the simple tree model.
+*/
+
+#include <QStringList>
+
+#include "treeitem.h"
+
+//! [0]
+TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
+{
+ parentItem = parent;
+ itemData = data;
+}
+//! [0]
+
+//! [1]
+TreeItem::~TreeItem()
+{
+ qDeleteAll(childItems);
+}
+//! [1]
+
+//! [2]
+void TreeItem::appendChild(TreeItem *item)
+{
+ childItems.append(item);
+}
+//! [2]
+
+//! [3]
+TreeItem *TreeItem::child(int row)
+{
+ return childItems.value(row);
+}
+//! [3]
+
+//! [4]
+int TreeItem::childCount() const
+{
+ return childItems.count();
+}
+//! [4]
+
+//! [5]
+int TreeItem::columnCount() const
+{
+ return itemData.count();
+}
+//! [5]
+
+//! [6]
+QVariant TreeItem::data(int column) const
+{
+ return itemData.value(column);
+}
+//! [6]
+
+//! [7]
+TreeItem *TreeItem::parent()
+{
+ return parentItem;
+}
+//! [7]
+
+//! [8]
+int TreeItem::row() const
+{
+ if (parentItem)
+ return parentItem->childItems.indexOf(const_cast<TreeItem*>(this));
+
+ return 0;
+}
+//! [8]
diff --git a/examples/itemviews/simpletreemodel/treeitem.h b/examples/itemviews/simpletreemodel/treeitem.h
new file mode 100644
index 0000000..7bfd63b
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/treeitem.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEITEM_H
+#define TREEITEM_H
+
+#include <QList>
+#include <QVariant>
+
+//! [0]
+class TreeItem
+{
+public:
+ TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
+ ~TreeItem();
+
+ void appendChild(TreeItem *child);
+
+ TreeItem *child(int row);
+ int childCount() const;
+ int columnCount() const;
+ QVariant data(int column) const;
+ int row() const;
+ TreeItem *parent();
+
+private:
+ QList<TreeItem*> childItems;
+ QList<QVariant> itemData;
+ TreeItem *parentItem;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/simpletreemodel/treemodel.cpp b/examples/itemviews/simpletreemodel/treemodel.cpp
new file mode 100644
index 0000000..ec7bd64
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/treemodel.cpp
@@ -0,0 +1,219 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ treemodel.cpp
+
+ Provides a simple tree model to show how to create and use hierarchical
+ models.
+*/
+
+#include <QtGui>
+
+#include "treeitem.h"
+#include "treemodel.h"
+
+//! [0]
+TreeModel::TreeModel(const QString &data, QObject *parent)
+ : QAbstractItemModel(parent)
+{
+ QList<QVariant> rootData;
+ rootData << "Title" << "Summary";
+ rootItem = new TreeItem(rootData);
+ setupModelData(data.split(QString("\n")), rootItem);
+}
+//! [0]
+
+//! [1]
+TreeModel::~TreeModel()
+{
+ delete rootItem;
+}
+//! [1]
+
+//! [2]
+int TreeModel::columnCount(const QModelIndex &parent) const
+{
+ if (parent.isValid())
+ return static_cast<TreeItem*>(parent.internalPointer())->columnCount();
+ else
+ return rootItem->columnCount();
+}
+//! [2]
+
+//! [3]
+QVariant TreeModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ TreeItem *item = static_cast<TreeItem*>(index.internalPointer());
+
+ return item->data(index.column());
+}
+//! [3]
+
+//! [4]
+Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return 0;
+
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+//! [4]
+
+//! [5]
+QVariant TreeModel::headerData(int section, Qt::Orientation orientation,
+ int role) const
+{
+ if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+ return rootItem->data(section);
+
+ return QVariant();
+}
+//! [5]
+
+//! [6]
+QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent)
+ const
+{
+ if (!hasIndex(row, column, parent))
+ return QModelIndex();
+
+ TreeItem *parentItem;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ TreeItem *childItem = parentItem->child(row);
+ if (childItem)
+ return createIndex(row, column, childItem);
+ else
+ return QModelIndex();
+}
+//! [6]
+
+//! [7]
+QModelIndex TreeModel::parent(const QModelIndex &index) const
+{
+ if (!index.isValid())
+ return QModelIndex();
+
+ TreeItem *childItem = static_cast<TreeItem*>(index.internalPointer());
+ TreeItem *parentItem = childItem->parent();
+
+ if (parentItem == rootItem)
+ return QModelIndex();
+
+ return createIndex(parentItem->row(), 0, parentItem);
+}
+//! [7]
+
+//! [8]
+int TreeModel::rowCount(const QModelIndex &parent) const
+{
+ TreeItem *parentItem;
+ if (parent.column() > 0)
+ return 0;
+
+ if (!parent.isValid())
+ parentItem = rootItem;
+ else
+ parentItem = static_cast<TreeItem*>(parent.internalPointer());
+
+ return parentItem->childCount();
+}
+//! [8]
+
+void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
+{
+ QList<TreeItem*> parents;
+ QList<int> indentations;
+ parents << parent;
+ indentations << 0;
+
+ int number = 0;
+
+ while (number < lines.count()) {
+ int position = 0;
+ while (position < lines[number].length()) {
+ if (lines[number].mid(position, 1) != " ")
+ break;
+ position++;
+ }
+
+ QString lineData = lines[number].mid(position).trimmed();
+
+ if (!lineData.isEmpty()) {
+ // Read the column data from the rest of the line.
+ QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
+ QList<QVariant> columnData;
+ for (int column = 0; column < columnStrings.count(); ++column)
+ columnData << columnStrings[column];
+
+ if (position > indentations.last()) {
+ // The last child of the current parent is now the new parent
+ // unless the current parent has no children.
+
+ if (parents.last()->childCount() > 0) {
+ parents << parents.last()->child(parents.last()->childCount()-1);
+ indentations << position;
+ }
+ } else {
+ while (position < indentations.last() && parents.count() > 0) {
+ parents.pop_back();
+ indentations.pop_back();
+ }
+ }
+
+ // Append a new item to the current parent's list of children.
+ parents.last()->appendChild(new TreeItem(columnData, parents.last()));
+ }
+
+ number++;
+ }
+}
diff --git a/examples/itemviews/simpletreemodel/treemodel.h b/examples/itemviews/simpletreemodel/treemodel.h
new file mode 100644
index 0000000..3b535f9
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/treemodel.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEMODEL_H
+#define TREEMODEL_H
+
+#include <QAbstractItemModel>
+#include <QModelIndex>
+#include <QVariant>
+
+class TreeItem;
+
+//! [0]
+class TreeModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ TreeModel(const QString &data, QObject *parent = 0);
+ ~TreeModel();
+
+ QVariant data(const QModelIndex &index, int role) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+ QModelIndex index(int row, int column,
+ const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex parent(const QModelIndex &index) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
+
+private:
+ void setupModelData(const QStringList &lines, TreeItem *parent);
+
+ TreeItem *rootItem;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/simplewidgetmapper/main.cpp b/examples/itemviews/simplewidgetmapper/main.cpp
new file mode 100644
index 0000000..055ac21
--- /dev/null
+++ b/examples/itemviews/simplewidgetmapper/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
new file mode 100644
index 0000000..b2940d7
--- /dev/null
+++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simplewidgetmapper
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simplewidgetmapper
+INSTALLS += target sources
diff --git a/examples/itemviews/simplewidgetmapper/window.cpp b/examples/itemviews/simplewidgetmapper/window.cpp
new file mode 100644
index 0000000..406a3d7
--- /dev/null
+++ b/examples/itemviews/simplewidgetmapper/window.cpp
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [Set up widgets]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ setupModel();
+
+ nameLabel = new QLabel(tr("Na&me:"));
+ nameEdit = new QLineEdit();
+ addressLabel = new QLabel(tr("&Address:"));
+ addressEdit = new QTextEdit();
+ ageLabel = new QLabel(tr("A&ge (in years):"));
+ ageSpinBox = new QSpinBox();
+ nextButton = new QPushButton(tr("&Next"));
+ previousButton = new QPushButton(tr("&Previous"));
+
+ nameLabel->setBuddy(nameEdit);
+ addressLabel->setBuddy(addressEdit);
+ ageLabel->setBuddy(ageSpinBox);
+//! [Set up widgets]
+
+//! [Set up the mapper]
+ mapper = new QDataWidgetMapper(this);
+ mapper->setModel(model);
+ mapper->addMapping(nameEdit, 0);
+ mapper->addMapping(addressEdit, 1);
+ mapper->addMapping(ageSpinBox, 2);
+
+ connect(previousButton, SIGNAL(clicked()),
+ mapper, SLOT(toPrevious()));
+ connect(nextButton, SIGNAL(clicked()),
+ mapper, SLOT(toNext()));
+ connect(mapper, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(updateButtons(int)));
+//! [Set up the mapper]
+
+//! [Set up the layout]
+ QGridLayout *layout = new QGridLayout();
+ layout->addWidget(nameLabel, 0, 0, 1, 1);
+ layout->addWidget(nameEdit, 0, 1, 1, 1);
+ layout->addWidget(previousButton, 0, 2, 1, 1);
+ layout->addWidget(addressLabel, 1, 0, 1, 1);
+ layout->addWidget(addressEdit, 1, 1, 2, 1);
+ layout->addWidget(nextButton, 1, 2, 1, 1);
+ layout->addWidget(ageLabel, 3, 0, 1, 1);
+ layout->addWidget(ageSpinBox, 3, 1, 1, 1);
+ setLayout(layout);
+
+ setWindowTitle(tr("Simple Widget Mapper"));
+ mapper->toFirst();
+}
+//! [Set up the layout]
+
+//! [Set up the model]
+void Window::setupModel()
+{
+ model = new QStandardItemModel(5, 3, this);
+
+ QStringList names;
+ names << "Alice" << "Bob" << "Carol" << "Donald" << "Emma";
+
+ QStringList addresses;
+ addresses << "<qt>123 Main Street<br/>Market Town</qt>"
+ << "<qt>PO Box 32<br/>Mail Handling Service"
+ "<br/>Service City</qt>"
+ << "<qt>The Lighthouse<br/>Remote Island</qt>"
+ << "<qt>47338 Park Avenue<br/>Big City</qt>"
+ << "<qt>Research Station<br/>Base Camp<br/>Big Mountain</qt>";
+
+ QStringList ages;
+ ages << "20" << "31" << "32" << "19" << "26";
+
+ for (int row = 0; row < 5; ++row) {
+ QStandardItem *item = new QStandardItem(names[row]);
+ model->setItem(row, 0, item);
+ item = new QStandardItem(addresses[row]);
+ model->setItem(row, 1, item);
+ item = new QStandardItem(ages[row]);
+ model->setItem(row, 2, item);
+ }
+}
+//! [Set up the model]
+
+//! [Slot for updating the buttons]
+void Window::updateButtons(int row)
+{
+ previousButton->setEnabled(row > 0);
+ nextButton->setEnabled(row < model->rowCount() - 1);
+}
+//! [Slot for updating the buttons]
diff --git a/examples/itemviews/simplewidgetmapper/window.h b/examples/itemviews/simplewidgetmapper/window.h
new file mode 100644
index 0000000..726d4d6
--- /dev/null
+++ b/examples/itemviews/simplewidgetmapper/window.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDataWidgetMapper;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QSpinBox;
+class QStandardItemModel;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [Window definition]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+private slots:
+ void updateButtons(int row);
+
+private:
+ void setupModel();
+
+ QLabel *nameLabel;
+ QLabel *addressLabel;
+ QLabel *ageLabel;
+ QLineEdit *nameEdit;
+ QTextEdit *addressEdit;
+ QSpinBox *ageSpinBox;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+
+ QStandardItemModel *model;
+ QDataWidgetMapper *mapper;
+};
+//! [Window definition]
+
+#endif
diff --git a/examples/itemviews/spinboxdelegate/delegate.cpp b/examples/itemviews/spinboxdelegate/delegate.cpp
new file mode 100644
index 0000000..03a1a23
--- /dev/null
+++ b/examples/itemviews/spinboxdelegate/delegate.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ delegate.cpp
+
+ A delegate that allows the user to change integer values from the model
+ using a spin box widget.
+*/
+
+#include <QtGui>
+
+#include "delegate.h"
+
+
+//! [0]
+SpinBoxDelegate::SpinBoxDelegate(QObject *parent)
+ : QItemDelegate(parent)
+{
+}
+//! [0]
+
+//! [1]
+QWidget *SpinBoxDelegate::createEditor(QWidget *parent,
+ const QStyleOptionViewItem &/* option */,
+ const QModelIndex &/* index */) const
+{
+ QSpinBox *editor = new QSpinBox(parent);
+ editor->setMinimum(0);
+ editor->setMaximum(100);
+
+ return editor;
+}
+//! [1]
+
+//! [2]
+void SpinBoxDelegate::setEditorData(QWidget *editor,
+ const QModelIndex &index) const
+{
+ int value = index.model()->data(index, Qt::EditRole).toInt();
+
+ QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
+ spinBox->setValue(value);
+}
+//! [2]
+
+//! [3]
+void SpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const
+{
+ QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
+ spinBox->interpretText();
+ int value = spinBox->value();
+
+ model->setData(index, value, Qt::EditRole);
+}
+//! [3]
+
+//! [4]
+void SpinBoxDelegate::updateEditorGeometry(QWidget *editor,
+ const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
+{
+ editor->setGeometry(option.rect);
+}
+//! [4]
diff --git a/examples/itemviews/spinboxdelegate/delegate.h b/examples/itemviews/spinboxdelegate/delegate.h
new file mode 100644
index 0000000..a81cfd1
--- /dev/null
+++ b/examples/itemviews/spinboxdelegate/delegate.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DELEGATE_H
+#define DELEGATE_H
+
+#include <QItemDelegate>
+#include <QModelIndex>
+#include <QObject>
+#include <QSize>
+#include <QSpinBox>
+
+//! [0]
+class SpinBoxDelegate : public QItemDelegate
+{
+ Q_OBJECT
+
+public:
+ SpinBoxDelegate(QObject *parent = 0);
+
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+
+ void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const;
+
+ void updateEditorGeometry(QWidget *editor,
+ const QStyleOptionViewItem &option, const QModelIndex &index) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/spinboxdelegate/main.cpp b/examples/itemviews/spinboxdelegate/main.cpp
new file mode 100644
index 0000000..4b9d6a4
--- /dev/null
+++ b/examples/itemviews/spinboxdelegate/main.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ main.cpp
+
+ A simple example that shows how a view can use a custom delegate to edit
+ data obtained from a model.
+*/
+
+#include <QApplication>
+#include <QHeaderView>
+#include <QItemSelectionModel>
+#include <QStandardItemModel>
+#include <QTableView>
+
+#include "delegate.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QStandardItemModel model(4, 2);
+ QTableView tableView;
+ tableView.setModel(&model);
+
+ SpinBoxDelegate delegate;
+ tableView.setItemDelegate(&delegate);
+//! [0]
+
+ tableView.horizontalHeader()->setStretchLastSection(true);
+
+//! [1]
+ for (int row = 0; row < 4; ++row) {
+ for (int column = 0; column < 2; ++column) {
+ QModelIndex index = model.index(row, column, QModelIndex());
+ model.setData(index, QVariant((row+1) * (column+1)));
+ }
+//! [1] //! [2]
+ }
+//! [2]
+
+//! [3]
+ tableView.setWindowTitle(QObject::tr("Spin Box Delegate"));
+ tableView.show();
+ return app.exec();
+}
+//! [3]
diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
new file mode 100644
index 0000000..a202748
--- /dev/null
+++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
@@ -0,0 +1,9 @@
+HEADERS = delegate.h
+SOURCES = delegate.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/spinboxdelegate
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/spinboxdelegate
+INSTALLS += target sources
diff --git a/examples/itemviews/stardelegate/main.cpp b/examples/itemviews/stardelegate/main.cpp
new file mode 100644
index 0000000..5b27ee1
--- /dev/null
+++ b/examples/itemviews/stardelegate/main.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stardelegate.h"
+#include "stareditor.h"
+#include "starrating.h"
+
+//! [0]
+void populateTableWidget(QTableWidget *tableWidget)
+{
+ static const struct {
+ const char *title;
+ const char *genre;
+ const char *artist;
+ int rating;
+ } staticData[] = {
+//! [0] //! [1]
+ { "Mass in B-Minor", "Baroque", "J.S. Bach", 5 },
+//! [1]
+ { "Three More Foxes", "Jazz", "Maynard Ferguson", 4 },
+ { "Sex Bomb", "Pop", "Tom Jones", 3 },
+ { "Barbie Girl", "Pop", "Aqua", 5 },
+//! [2]
+ { 0, 0, 0, 0 }
+//! [2] //! [3]
+ };
+//! [3] //! [4]
+
+ for (int row = 0; staticData[row].title != 0; ++row) {
+ QTableWidgetItem *item0 = new QTableWidgetItem(staticData[row].title);
+ QTableWidgetItem *item1 = new QTableWidgetItem(staticData[row].genre);
+ QTableWidgetItem *item2 = new QTableWidgetItem(staticData[row].artist);
+ QTableWidgetItem *item3 = new QTableWidgetItem;
+ item3->setData(0,
+ qVariantFromValue(StarRating(staticData[row].rating)));
+
+ tableWidget->setItem(row, 0, item0);
+ tableWidget->setItem(row, 1, item1);
+ tableWidget->setItem(row, 2, item2);
+ tableWidget->setItem(row, 3, item3);
+ }
+}
+//! [4]
+
+//! [5]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QTableWidget tableWidget(4, 4);
+ tableWidget.setItemDelegate(new StarDelegate);
+ tableWidget.setEditTriggers(QAbstractItemView::DoubleClicked
+ | QAbstractItemView::SelectedClicked);
+ tableWidget.setSelectionBehavior(QAbstractItemView::SelectRows);
+
+ QStringList headerLabels;
+ headerLabels << "Title" << "Genre" << "Artist" << "Rating";
+ tableWidget.setHorizontalHeaderLabels(headerLabels);
+
+ populateTableWidget(&tableWidget);
+
+ tableWidget.resizeColumnsToContents();
+ tableWidget.resize(500, 300);
+ tableWidget.show();
+
+ return app.exec();
+}
+//! [5]
diff --git a/examples/itemviews/stardelegate/stardelegate.cpp b/examples/itemviews/stardelegate/stardelegate.cpp
new file mode 100644
index 0000000..1e12971
--- /dev/null
+++ b/examples/itemviews/stardelegate/stardelegate.cpp
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stardelegate.h"
+#include "stareditor.h"
+#include "starrating.h"
+
+//! [0]
+void StarDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (qVariantCanConvert<StarRating>(index.data())) {
+ StarRating starRating = qVariantValue<StarRating>(index.data());
+
+ if (option.state & QStyle::State_Selected)
+ painter->fillRect(option.rect, option.palette.highlight());
+
+ starRating.paint(painter, option.rect, option.palette,
+ StarRating::ReadOnly);
+ } else {
+ QStyledItemDelegate::paint(painter, option, index);
+ }
+//! [0]
+}
+
+//! [1]
+QSize StarDelegate::sizeHint(const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (qVariantCanConvert<StarRating>(index.data())) {
+ StarRating starRating = qVariantValue<StarRating>(index.data());
+ return starRating.sizeHint();
+ } else {
+ return QStyledItemDelegate::sizeHint(option, index);
+ }
+}
+//! [1]
+
+//! [2]
+QWidget *StarDelegate::createEditor(QWidget *parent,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+
+{
+ if (qVariantCanConvert<StarRating>(index.data())) {
+ StarEditor *editor = new StarEditor(parent);
+ connect(editor, SIGNAL(editingFinished()),
+ this, SLOT(commitAndCloseEditor()));
+ return editor;
+ } else {
+ return QStyledItemDelegate::createEditor(parent, option, index);
+ }
+}
+//! [2]
+
+//! [3]
+void StarDelegate::setEditorData(QWidget *editor,
+ const QModelIndex &index) const
+{
+ if (qVariantCanConvert<StarRating>(index.data())) {
+ StarRating starRating = qVariantValue<StarRating>(index.data());
+ StarEditor *starEditor = qobject_cast<StarEditor *>(editor);
+ starEditor->setStarRating(starRating);
+ } else {
+ QStyledItemDelegate::setEditorData(editor, index);
+ }
+}
+//! [3]
+
+//! [4]
+void StarDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const
+{
+ if (qVariantCanConvert<StarRating>(index.data())) {
+ StarEditor *starEditor = qobject_cast<StarEditor *>(editor);
+ model->setData(index, qVariantFromValue(starEditor->starRating()));
+ } else {
+ QStyledItemDelegate::setModelData(editor, model, index);
+ }
+}
+//! [4]
+
+//! [5]
+void StarDelegate::commitAndCloseEditor()
+{
+ StarEditor *editor = qobject_cast<StarEditor *>(sender());
+ emit commitData(editor);
+ emit closeEditor(editor);
+}
+//! [5]
diff --git a/examples/itemviews/stardelegate/stardelegate.h b/examples/itemviews/stardelegate/stardelegate.h
new file mode 100644
index 0000000..84814ed
--- /dev/null
+++ b/examples/itemviews/stardelegate/stardelegate.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STARDELEGATE_H
+#define STARDELEGATE_H
+
+#include <QStyledItemDelegate>
+
+//! [0]
+class StarDelegate : public QStyledItemDelegate
+{
+ Q_OBJECT
+
+public:
+ StarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ QSize sizeHint(const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const;
+
+private slots:
+ void commitAndCloseEditor();
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/stardelegate/stardelegate.pro b/examples/itemviews/stardelegate/stardelegate.pro
new file mode 100644
index 0000000..4e1ef45
--- /dev/null
+++ b/examples/itemviews/stardelegate/stardelegate.pro
@@ -0,0 +1,14 @@
+HEADERS = stardelegate.h \
+ stareditor.h \
+ starrating.h
+SOURCES = main.cpp \
+ stardelegate.cpp \
+ stareditor.cpp \
+ starrating.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/stardelegate
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/stardelegate
+INSTALLS += target sources
+
diff --git a/examples/itemviews/stardelegate/stareditor.cpp b/examples/itemviews/stardelegate/stareditor.cpp
new file mode 100644
index 0000000..633229f
--- /dev/null
+++ b/examples/itemviews/stardelegate/stareditor.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stareditor.h"
+#include "starrating.h"
+
+//! [0]
+StarEditor::StarEditor(QWidget *parent)
+ : QWidget(parent)
+{
+ setMouseTracking(true);
+ setAutoFillBackground(true);
+}
+//! [0]
+
+QSize StarEditor::sizeHint() const
+{
+ return myStarRating.sizeHint();
+}
+
+//! [1]
+void StarEditor::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ myStarRating.paint(&painter, rect(), this->palette(),
+ StarRating::Editable);
+}
+//! [1]
+
+//! [2]
+void StarEditor::mouseMoveEvent(QMouseEvent *event)
+{
+ int star = starAtPosition(event->x());
+
+ if (star != myStarRating.starCount() && star != -1) {
+ myStarRating.setStarCount(star);
+ update();
+ }
+}
+//! [2]
+
+//! [3]
+void StarEditor::mouseReleaseEvent(QMouseEvent * /* event */)
+{
+ emit editingFinished();
+}
+//! [3]
+
+//! [4]
+int StarEditor::starAtPosition(int x)
+{
+ int star = (x / (myStarRating.sizeHint().width()
+ / myStarRating.maxStarCount())) + 1;
+ if (star <= 0 || star > myStarRating.maxStarCount())
+ return -1;
+
+ return star;
+}
+//! [4]
diff --git a/examples/itemviews/stardelegate/stareditor.h b/examples/itemviews/stardelegate/stareditor.h
new file mode 100644
index 0000000..7365ca1
--- /dev/null
+++ b/examples/itemviews/stardelegate/stareditor.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STAREDITOR_H
+#define STAREDITOR_H
+
+#include <QWidget>
+
+#include "starrating.h"
+
+//! [0]
+class StarEditor : public QWidget
+{
+ Q_OBJECT
+
+public:
+ StarEditor(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+ void setStarRating(const StarRating &starRating) {
+ myStarRating = starRating;
+ }
+ StarRating starRating() { return myStarRating; }
+
+signals:
+ void editingFinished();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private:
+ int starAtPosition(int x);
+
+ StarRating myStarRating;
+};
+//! [0]
+
+#endif
diff --git a/examples/itemviews/stardelegate/starrating.cpp b/examples/itemviews/stardelegate/starrating.cpp
new file mode 100644
index 0000000..e40f22d
--- /dev/null
+++ b/examples/itemviews/stardelegate/starrating.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <math.h>
+
+#include "starrating.h"
+
+const int PaintingScaleFactor = 20;
+
+//! [0]
+StarRating::StarRating(int starCount, int maxStarCount)
+{
+ myStarCount = starCount;
+ myMaxStarCount = maxStarCount;
+
+ starPolygon << QPointF(1.0, 0.5);
+ for (int i = 1; i < 5; ++i)
+ starPolygon << QPointF(0.5 + 0.5 * cos(0.8 * i * 3.14),
+ 0.5 + 0.5 * sin(0.8 * i * 3.14));
+
+ diamondPolygon << QPointF(0.4, 0.5) << QPointF(0.5, 0.4)
+ << QPointF(0.6, 0.5) << QPointF(0.5, 0.6)
+ << QPointF(0.4, 0.5);
+}
+//! [0]
+
+//! [1]
+QSize StarRating::sizeHint() const
+{
+ return PaintingScaleFactor * QSize(myMaxStarCount, 1);
+}
+//! [1]
+
+//! [2]
+void StarRating::paint(QPainter *painter, const QRect &rect,
+ const QPalette &palette, EditMode mode) const
+{
+ painter->save();
+
+ painter->setRenderHint(QPainter::Antialiasing, true);
+ painter->setPen(Qt::NoPen);
+
+ if (mode == Editable) {
+ painter->setBrush(palette.highlight());
+ } else {
+ painter->setBrush(palette.foreground());
+ }
+
+ int yOffset = (rect.height() - PaintingScaleFactor) / 2;
+ painter->translate(rect.x(), rect.y() + yOffset);
+ painter->scale(PaintingScaleFactor, PaintingScaleFactor);
+
+ for (int i = 0; i < myMaxStarCount; ++i) {
+ if (i < myStarCount) {
+ painter->drawPolygon(starPolygon, Qt::WindingFill);
+ } else if (mode == Editable) {
+ painter->drawPolygon(diamondPolygon, Qt::WindingFill);
+ }
+ painter->translate(1.0, 0.0);
+ }
+
+ painter->restore();
+}
+//! [2]
diff --git a/examples/itemviews/stardelegate/starrating.h b/examples/itemviews/stardelegate/starrating.h
new file mode 100644
index 0000000..1e73076
--- /dev/null
+++ b/examples/itemviews/stardelegate/starrating.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STARRATING_H
+#define STARRATING_H
+
+#include <QMetaType>
+#include <QPointF>
+#include <QVector>
+
+//! [0]
+class StarRating
+{
+public:
+ enum EditMode { Editable, ReadOnly };
+
+ StarRating(int starCount = 1, int maxStarCount = 5);
+
+ void paint(QPainter *painter, const QRect &rect,
+ const QPalette &palette, EditMode mode) const;
+ QSize sizeHint() const;
+ int starCount() const { return myStarCount; }
+ int maxStarCount() const { return myMaxStarCount; }
+ void setStarCount(int starCount) { myStarCount = starCount; }
+ void setMaxStarCount(int maxStarCount) { myMaxStarCount = maxStarCount; }
+
+private:
+ QPolygonF starPolygon;
+ QPolygonF diamondPolygon;
+ int myStarCount;
+ int myMaxStarCount;
+};
+//! [0]
+
+//! [1]
+Q_DECLARE_METATYPE(StarRating)
+//! [1]
+
+#endif
diff --git a/examples/layouts/README b/examples/layouts/README
new file mode 100644
index 0000000..edaea78
--- /dev/null
+++ b/examples/layouts/README
@@ -0,0 +1,41 @@
+Qt uses a layout-based approach to widget management. Widgets are arranged in
+the optimal positions in windows based on simple layout rules, leading to a
+consistent look and feel.
+
+Custom layouts can be used to provide more control over the positions and
+sizes of child widgets.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/layouts/basiclayouts/basiclayouts.pro b/examples/layouts/basiclayouts/basiclayouts.pro
new file mode 100644
index 0000000..8fa73ff
--- /dev/null
+++ b/examples/layouts/basiclayouts/basiclayouts.pro
@@ -0,0 +1,9 @@
+HEADERS = dialog.h
+SOURCES = dialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/layouts/basiclayouts
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/basiclayouts
+INSTALLS += target sources
diff --git a/examples/layouts/basiclayouts/dialog.cpp b/examples/layouts/basiclayouts/dialog.cpp
new file mode 100644
index 0000000..86cafb9
--- /dev/null
+++ b/examples/layouts/basiclayouts/dialog.cpp
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+
+//! [0]
+Dialog::Dialog()
+{
+ createMenu();
+ createHorizontalGroupBox();
+ createGridGroupBox();
+ createFormGroupBox();
+//! [0]
+
+//! [1]
+ bigEditor = new QTextEdit;
+ bigEditor->setPlainText(tr("This widget takes up all the remaining space "
+ "in the top-level layout."));
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel);
+
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+//! [1]
+
+//! [2]
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+//! [2] //! [3]
+ mainLayout->setMenuBar(menuBar);
+//! [3] //! [4]
+ mainLayout->addWidget(horizontalGroupBox);
+ mainLayout->addWidget(gridGroupBox);
+ mainLayout->addWidget(formGroupBox);
+ mainLayout->addWidget(bigEditor);
+ mainLayout->addWidget(buttonBox);
+//! [4] //! [5]
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Basic Layouts"));
+}
+//! [5]
+
+//! [6]
+void Dialog::createMenu()
+{
+ menuBar = new QMenuBar;
+
+ fileMenu = new QMenu(tr("&File"), this);
+ exitAction = fileMenu->addAction(tr("E&xit"));
+ menuBar->addMenu(fileMenu);
+
+ connect(exitAction, SIGNAL(triggered()), this, SLOT(accept()));
+}
+//! [6]
+
+//! [7]
+void Dialog::createHorizontalGroupBox()
+{
+ horizontalGroupBox = new QGroupBox(tr("Horizontal layout"));
+ QHBoxLayout *layout = new QHBoxLayout;
+
+ for (int i = 0; i < NumButtons; ++i) {
+ buttons[i] = new QPushButton(tr("Button %1").arg(i + 1));
+ layout->addWidget(buttons[i]);
+ }
+ horizontalGroupBox->setLayout(layout);
+}
+//! [7]
+
+//! [8]
+void Dialog::createGridGroupBox()
+{
+ gridGroupBox = new QGroupBox(tr("Grid layout"));
+//! [8]
+ QGridLayout *layout = new QGridLayout;
+
+//! [9]
+ for (int i = 0; i < NumGridRows; ++i) {
+ labels[i] = new QLabel(tr("Line %1:").arg(i + 1));
+ lineEdits[i] = new QLineEdit;
+ layout->addWidget(labels[i], i + 1, 0);
+ layout->addWidget(lineEdits[i], i + 1, 1);
+ }
+
+//! [9] //! [10]
+ smallEditor = new QTextEdit;
+ smallEditor->setPlainText(tr("This widget takes up about two thirds of the "
+ "grid layout."));
+ layout->addWidget(smallEditor, 0, 2, 4, 1);
+//! [10]
+
+//! [11]
+ layout->setColumnStretch(1, 10);
+ layout->setColumnStretch(2, 20);
+ gridGroupBox->setLayout(layout);
+}
+//! [11]
+
+//! [12]
+void Dialog::createFormGroupBox()
+{
+ formGroupBox = new QGroupBox(tr("Form layout"));
+ QFormLayout *layout = new QFormLayout;
+ layout->addRow(new QLabel(tr("Line 1:")), new QLineEdit);
+ layout->addRow(new QLabel(tr("Line 2, long text:")), new QComboBox);
+ layout->addRow(new QLabel(tr("Line 3:")), new QSpinBox);
+ formGroupBox->setLayout(layout);
+}
+//! [12]
diff --git a/examples/layouts/basiclayouts/dialog.h b/examples/layouts/basiclayouts/dialog.h
new file mode 100644
index 0000000..b6b1e3a
--- /dev/null
+++ b/examples/layouts/basiclayouts/dialog.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QDialogButtonBox;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QMenu;
+class QMenuBar;
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog();
+
+private:
+ void createMenu();
+ void createHorizontalGroupBox();
+ void createGridGroupBox();
+ void createFormGroupBox();
+
+ enum { NumGridRows = 3, NumButtons = 4 };
+
+ QMenuBar *menuBar;
+ QGroupBox *horizontalGroupBox;
+ QGroupBox *gridGroupBox;
+ QGroupBox *formGroupBox;
+ QTextEdit *smallEditor;
+ QTextEdit *bigEditor;
+ QLabel *labels[NumGridRows];
+ QLineEdit *lineEdits[NumGridRows];
+ QPushButton *buttons[NumButtons];
+ QDialogButtonBox *buttonBox;
+
+ QMenu *fileMenu;
+ QAction *exitAction;
+};
+//! [0]
+
+#endif
diff --git a/examples/layouts/basiclayouts/main.cpp b/examples/layouts/basiclayouts/main.cpp
new file mode 100644
index 0000000..09c49ee
--- /dev/null
+++ b/examples/layouts/basiclayouts/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Dialog dialog;
+ return dialog.exec();
+}
diff --git a/examples/layouts/borderlayout/borderlayout.cpp b/examples/layouts/borderlayout/borderlayout.cpp
new file mode 100644
index 0000000..25a4778
--- /dev/null
+++ b/examples/layouts/borderlayout/borderlayout.cpp
@@ -0,0 +1,214 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "borderlayout.h"
+
+BorderLayout::BorderLayout(QWidget *parent, int margin, int spacing)
+ : QLayout(parent)
+{
+ setMargin(margin);
+ setSpacing(spacing);
+}
+
+BorderLayout::BorderLayout(int spacing)
+{
+ setSpacing(spacing);
+}
+
+
+BorderLayout::~BorderLayout()
+{
+ QLayoutItem *l;
+ while ((l = takeAt(0)))
+ delete l;
+}
+
+void BorderLayout::addItem(QLayoutItem *item)
+{
+ add(item, West);
+}
+
+void BorderLayout::addWidget(QWidget *widget, Position position)
+{
+ add(new QWidgetItem(widget), position);
+}
+
+Qt::Orientations BorderLayout::expandingDirections() const
+{
+ return Qt::Horizontal | Qt::Vertical;
+}
+
+bool BorderLayout::hasHeightForWidth() const
+{
+ return false;
+}
+
+int BorderLayout::count() const
+{
+ return list.size();
+}
+
+QLayoutItem *BorderLayout::itemAt(int index) const
+{
+ ItemWrapper *wrapper = list.value(index);
+ if (wrapper)
+ return wrapper->item;
+ else
+ return 0;
+}
+
+QSize BorderLayout::minimumSize() const
+{
+ return calculateSize(MinimumSize);
+}
+
+void BorderLayout::setGeometry(const QRect &rect)
+{
+ ItemWrapper *center = 0;
+ int eastWidth = 0;
+ int westWidth = 0;
+ int northHeight = 0;
+ int southHeight = 0;
+ int centerHeight = 0;
+ int i;
+
+ QLayout::setGeometry(rect);
+
+ for (i = 0; i < list.size(); ++i) {
+ ItemWrapper *wrapper = list.at(i);
+ QLayoutItem *item = wrapper->item;
+ Position position = wrapper->position;
+
+ if (position == North) {
+ item->setGeometry(QRect(rect.x(), northHeight, rect.width(),
+ item->sizeHint().height()));
+
+ northHeight += item->geometry().height() + spacing();
+ } else if (position == South) {
+ item->setGeometry(QRect(item->geometry().x(),
+ item->geometry().y(), rect.width(),
+ item->sizeHint().height()));
+
+ southHeight += item->geometry().height() + spacing();
+
+ item->setGeometry(QRect(rect.x(),
+ rect.y() + rect.height() - southHeight + spacing(),
+ item->geometry().width(),
+ item->geometry().height()));
+ } else if (position == Center) {
+ center = wrapper;
+ }
+ }
+
+ centerHeight = rect.height() - northHeight - southHeight;
+
+ for (i = 0; i < list.size(); ++i) {
+ ItemWrapper *wrapper = list.at(i);
+ QLayoutItem *item = wrapper->item;
+ Position position = wrapper->position;
+
+ if (position == West) {
+ item->setGeometry(QRect(rect.x() + westWidth, northHeight,
+ item->sizeHint().width(), centerHeight));
+
+ westWidth += item->geometry().width() + spacing();
+ } else if (position == East) {
+ item->setGeometry(QRect(item->geometry().x(), item->geometry().y(),
+ item->sizeHint().width(), centerHeight));
+
+ eastWidth += item->geometry().width() + spacing();
+
+ item->setGeometry(QRect(
+ rect.x() + rect.width() - eastWidth + spacing(),
+ northHeight, item->geometry().width(),
+ item->geometry().height()));
+ }
+ }
+
+ if (center)
+ center->item->setGeometry(QRect(westWidth, northHeight,
+ rect.width() - eastWidth - westWidth,
+ centerHeight));
+}
+
+QSize BorderLayout::sizeHint() const
+{
+ return calculateSize(SizeHint);
+}
+
+QLayoutItem *BorderLayout::takeAt(int index)
+{
+ if (index >= 0 && index < list.size()) {
+ ItemWrapper *layoutStruct = list.takeAt(index);
+ return layoutStruct->item;
+ }
+ return 0;
+}
+
+void BorderLayout::add(QLayoutItem *item, Position position)
+{
+ list.append(new ItemWrapper(item, position));
+}
+
+QSize BorderLayout::calculateSize(SizeType sizeType) const
+{
+ QSize totalSize;
+
+ for (int i = 0; i < list.size(); ++i) {
+ ItemWrapper *wrapper = list.at(i);
+ Position position = wrapper->position;
+ QSize itemSize;
+
+ if (sizeType == MinimumSize)
+ itemSize = wrapper->item->minimumSize();
+ else // (sizeType == SizeHint)
+ itemSize = wrapper->item->sizeHint();
+
+ if (position == North || position == South || position == Center)
+ totalSize.rheight() += itemSize.height();
+
+ if (position == West || position == East || position == Center)
+ totalSize.rwidth() += itemSize.width();
+ }
+ return totalSize;
+}
diff --git a/examples/layouts/borderlayout/borderlayout.h b/examples/layouts/borderlayout/borderlayout.h
new file mode 100644
index 0000000..781a01f
--- /dev/null
+++ b/examples/layouts/borderlayout/borderlayout.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BORDERLAYOUT_H
+#define BORDERLAYOUT_H
+
+#include <QLayout>
+#include <QRect>
+#include <QWidgetItem>
+
+class BorderLayout : public QLayout
+{
+public:
+ enum Position { West, North, South, East, Center };
+
+ BorderLayout(QWidget *parent, int margin = 0, int spacing = -1);
+ BorderLayout(int spacing = -1);
+ ~BorderLayout();
+
+ void addItem(QLayoutItem *item);
+ void addWidget(QWidget *widget, Position position);
+ Qt::Orientations expandingDirections() const;
+ bool hasHeightForWidth() const;
+ int count() const;
+ QLayoutItem *itemAt(int index) const;
+ QSize minimumSize() const;
+ void setGeometry(const QRect &rect);
+ QSize sizeHint() const;
+ QLayoutItem *takeAt(int index);
+
+ void add(QLayoutItem *item, Position position);
+
+private:
+ struct ItemWrapper
+ {
+ ItemWrapper(QLayoutItem *i, Position p) {
+ item = i;
+ position = p;
+ }
+
+ QLayoutItem *item;
+ Position position;
+ };
+
+ enum SizeType { MinimumSize, SizeHint };
+ QSize calculateSize(SizeType sizeType) const;
+
+ QList<ItemWrapper *> list;
+};
+
+#endif
diff --git a/examples/layouts/borderlayout/borderlayout.pro b/examples/layouts/borderlayout/borderlayout.pro
new file mode 100644
index 0000000..e327574
--- /dev/null
+++ b/examples/layouts/borderlayout/borderlayout.pro
@@ -0,0 +1,11 @@
+HEADERS = borderlayout.h \
+ window.h
+SOURCES = borderlayout.cpp \
+ main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/layouts/borderlayout
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/borderlayout
+INSTALLS += target sources
diff --git a/examples/layouts/borderlayout/main.cpp b/examples/layouts/borderlayout/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/layouts/borderlayout/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/layouts/borderlayout/window.cpp b/examples/layouts/borderlayout/window.cpp
new file mode 100644
index 0000000..2b08551
--- /dev/null
+++ b/examples/layouts/borderlayout/window.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "borderlayout.h"
+#include "window.h"
+
+Window::Window()
+{
+ QTextBrowser *centralWidget = new QTextBrowser;
+ centralWidget->setPlainText(tr("Central widget"));
+
+ BorderLayout *layout = new BorderLayout;
+ layout->addWidget(centralWidget, BorderLayout::Center);
+ layout->addWidget(createLabel("North"), BorderLayout::North);
+ layout->addWidget(createLabel("West"), BorderLayout::West);
+ layout->addWidget(createLabel("East 1"), BorderLayout::East);
+ layout->addWidget(createLabel("East 2") , BorderLayout::East);
+ layout->addWidget(createLabel("South"), BorderLayout::South);
+ setLayout(layout);
+
+ setWindowTitle(tr("Border Layout"));
+}
+
+QLabel *Window::createLabel(const QString &text)
+{
+ QLabel *label = new QLabel(text);
+ label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ return label;
+}
diff --git a/examples/layouts/borderlayout/window.h b/examples/layouts/borderlayout/window.h
new file mode 100644
index 0000000..708d270
--- /dev/null
+++ b/examples/layouts/borderlayout/window.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ QLabel *createLabel(const QString &text);
+};
+
+#endif
diff --git a/examples/layouts/dynamiclayouts/dialog.cpp b/examples/layouts/dynamiclayouts/dialog.cpp
new file mode 100644
index 0000000..eee15f6
--- /dev/null
+++ b/examples/layouts/dynamiclayouts/dialog.cpp
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent)
+{
+ createRotableGroupBox();
+ createOptionsGroupBox();
+ createButtonBox();
+
+ mainLayout = new QGridLayout;
+ mainLayout->addWidget(rotableGroupBox, 0, 0);
+ mainLayout->addWidget(optionsGroupBox, 1, 0);
+ mainLayout->addWidget(buttonBox, 2, 0);
+ setLayout(mainLayout);
+
+ mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
+
+ setWindowTitle(tr("Dynamic Layouts"));
+}
+
+void Dialog::buttonsOrientationChanged(int index)
+{
+ mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
+ setMinimumSize(0, 0);
+
+ Qt::Orientation orientation = Qt::Orientation(
+ buttonsOrientationComboBox->itemData(index).toInt());
+
+ if (orientation == buttonBox->orientation())
+ return;
+
+ mainLayout->removeWidget(buttonBox);
+
+ int spacing = mainLayout->spacing();
+
+ QSize oldSizeHint = buttonBox->sizeHint() + QSize(spacing, spacing);
+ buttonBox->setOrientation(orientation);
+ QSize newSizeHint = buttonBox->sizeHint() + QSize(spacing, spacing);
+
+ if (orientation == Qt::Horizontal) {
+ mainLayout->addWidget(buttonBox, 2, 0);
+ resize(size() + QSize(-oldSizeHint.width(), newSizeHint.height()));
+ } else {
+ mainLayout->addWidget(buttonBox, 0, 3, 2, 1);
+ resize(size() + QSize(newSizeHint.width(), -oldSizeHint.height()));
+ }
+
+ mainLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
+}
+
+void Dialog::rotateWidgets()
+{
+ Q_ASSERT(rotableWidgets.count() % 2 == 0);
+
+ foreach (QWidget *widget, rotableWidgets)
+ rotableLayout->removeWidget(widget);
+
+ rotableWidgets.enqueue(rotableWidgets.dequeue());
+
+ const int n = rotableWidgets.count();
+ for (int i = 0; i < n / 2; ++i) {
+ rotableLayout->addWidget(rotableWidgets[n - i - 1], 0, i);
+ rotableLayout->addWidget(rotableWidgets[i], 1, i);
+ }
+}
+
+void Dialog::help()
+{
+ QMessageBox::information(this, tr("Dynamic Layouts Help"),
+ tr("This example shows how to change layouts "
+ "dynamically."));
+}
+
+void Dialog::createRotableGroupBox()
+{
+ rotableGroupBox = new QGroupBox(tr("Rotable Widgets"));
+
+ rotableWidgets.enqueue(new QSpinBox);
+ rotableWidgets.enqueue(new QSlider);
+ rotableWidgets.enqueue(new QDial);
+ rotableWidgets.enqueue(new QProgressBar);
+
+ int n = rotableWidgets.count();
+ for (int i = 0; i < n; ++i) {
+ connect(rotableWidgets[i], SIGNAL(valueChanged(int)),
+ rotableWidgets[(i + 1) % n], SLOT(setValue(int)));
+ }
+
+ rotableLayout = new QGridLayout;
+ rotableGroupBox->setLayout(rotableLayout);
+
+ rotateWidgets();
+}
+
+void Dialog::createOptionsGroupBox()
+{
+ optionsGroupBox = new QGroupBox(tr("Options"));
+
+ buttonsOrientationLabel = new QLabel(tr("Orientation of buttons:"));
+
+ buttonsOrientationComboBox = new QComboBox;
+ buttonsOrientationComboBox->addItem(tr("Horizontal"), Qt::Horizontal);
+ buttonsOrientationComboBox->addItem(tr("Vertical"), Qt::Vertical);
+
+ connect(buttonsOrientationComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(buttonsOrientationChanged(int)));
+
+ optionsLayout = new QGridLayout;
+ optionsLayout->addWidget(buttonsOrientationLabel, 0, 0);
+ optionsLayout->addWidget(buttonsOrientationComboBox, 0, 1);
+ optionsLayout->setColumnStretch(2, 1);
+ optionsGroupBox->setLayout(optionsLayout);
+}
+
+void Dialog::createButtonBox()
+{
+ buttonBox = new QDialogButtonBox;
+
+ closeButton = buttonBox->addButton(QDialogButtonBox::Close);
+ helpButton = buttonBox->addButton(QDialogButtonBox::Help);
+ rotateWidgetsButton = buttonBox->addButton(tr("Rotate &Widgets"),
+ QDialogButtonBox::ActionRole);
+
+ connect(rotateWidgetsButton, SIGNAL(clicked()), this, SLOT(rotateWidgets()));
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(helpButton, SIGNAL(clicked()), this, SLOT(help()));
+}
diff --git a/examples/layouts/dynamiclayouts/dialog.h b/examples/layouts/dynamiclayouts/dialog.h
new file mode 100644
index 0000000..bc1225a
--- /dev/null
+++ b/examples/layouts/dynamiclayouts/dialog.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+#include <QQueue>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QGridLayout;
+class QGroupBox;
+class QLabel;
+class QPushButton;
+QT_END_NAMESPACE
+
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QWidget *parent = 0);
+
+private slots:
+ void buttonsOrientationChanged(int index);
+ void rotateWidgets();
+ void help();
+
+private:
+ void createRotableGroupBox();
+ void createOptionsGroupBox();
+ void createButtonBox();
+
+ QGroupBox *rotableGroupBox;
+ QQueue<QWidget *> rotableWidgets;
+
+ QGroupBox *optionsGroupBox;
+ QLabel *buttonsOrientationLabel;
+ QComboBox *buttonsOrientationComboBox;
+
+ QDialogButtonBox *buttonBox;
+ QPushButton *closeButton;
+ QPushButton *helpButton;
+ QPushButton *rotateWidgetsButton;
+
+ QGridLayout *mainLayout;
+ QGridLayout *rotableLayout;
+ QGridLayout *optionsLayout;
+};
+
+#endif
diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
new file mode 100644
index 0000000..c169dd0
--- /dev/null
+++ b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
@@ -0,0 +1,9 @@
+HEADERS = dialog.h
+SOURCES = dialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/layouts/dynamiclayouts
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/dynamiclayouts
+INSTALLS += target sources
diff --git a/examples/layouts/dynamiclayouts/main.cpp b/examples/layouts/dynamiclayouts/main.cpp
new file mode 100644
index 0000000..09c49ee
--- /dev/null
+++ b/examples/layouts/dynamiclayouts/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Dialog dialog;
+ return dialog.exec();
+}
diff --git a/examples/layouts/flowlayout/flowlayout.cpp b/examples/layouts/flowlayout/flowlayout.cpp
new file mode 100644
index 0000000..d1e857d
--- /dev/null
+++ b/examples/layouts/flowlayout/flowlayout.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "flowlayout.h"
+
+FlowLayout::FlowLayout(QWidget *parent, int margin, int spacing)
+ : QLayout(parent)
+{
+ setMargin(margin);
+ setSpacing(spacing);
+}
+
+FlowLayout::FlowLayout(int spacing)
+{
+ setSpacing(spacing);
+}
+
+FlowLayout::~FlowLayout()
+{
+ QLayoutItem *item;
+ while ((item = takeAt(0)))
+ delete item;
+}
+
+void FlowLayout::addItem(QLayoutItem *item)
+{
+ itemList.append(item);
+}
+
+int FlowLayout::count() const
+{
+ return itemList.size();
+}
+
+QLayoutItem *FlowLayout::itemAt(int index) const
+{
+ return itemList.value(index);
+}
+
+QLayoutItem *FlowLayout::takeAt(int index)
+{
+ if (index >= 0 && index < itemList.size())
+ return itemList.takeAt(index);
+ else
+ return 0;
+}
+
+Qt::Orientations FlowLayout::expandingDirections() const
+{
+ return 0;
+}
+
+bool FlowLayout::hasHeightForWidth() const
+{
+ return true;
+}
+
+int FlowLayout::heightForWidth(int width) const
+{
+ int height = doLayout(QRect(0, 0, width, 0), true);
+ return height;
+}
+
+void FlowLayout::setGeometry(const QRect &rect)
+{
+ QLayout::setGeometry(rect);
+ doLayout(rect, false);
+}
+
+QSize FlowLayout::sizeHint() const
+{
+ return minimumSize();
+}
+
+QSize FlowLayout::minimumSize() const
+{
+ QSize size;
+ QLayoutItem *item;
+ foreach (item, itemList)
+ size = size.expandedTo(item->minimumSize());
+
+ size += QSize(2*margin(), 2*margin());
+ return size;
+}
+
+int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
+{
+ int x = rect.x();
+ int y = rect.y();
+ int lineHeight = 0;
+
+ QLayoutItem *item;
+ foreach (item, itemList) {
+ QWidget *wid = item->widget();
+ int spaceX = spacing() + wid->style()->layoutSpacing(
+ QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
+ int spaceY = spacing() + wid->style()->layoutSpacing(
+ QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
+ int nextX = x + item->sizeHint().width() + spaceX;
+ if (nextX - spaceX > rect.right() && lineHeight > 0) {
+ x = rect.x();
+ y = y + lineHeight + spaceY;
+ nextX = x + item->sizeHint().width() + spaceX;
+ lineHeight = 0;
+ }
+
+ if (!testOnly)
+ item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
+
+ x = nextX;
+ lineHeight = qMax(lineHeight, item->sizeHint().height());
+ }
+ return y + lineHeight - rect.y();
+}
diff --git a/examples/layouts/flowlayout/flowlayout.h b/examples/layouts/flowlayout/flowlayout.h
new file mode 100644
index 0000000..f864d8e
--- /dev/null
+++ b/examples/layouts/flowlayout/flowlayout.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FLOWLAYOUT_H
+#define FLOWLAYOUT_H
+
+#include <QLayout>
+#include <QRect>
+#include <QWidgetItem>
+
+class FlowLayout : public QLayout
+{
+public:
+ FlowLayout(QWidget *parent, int margin = -1, int spacing = 0);
+ FlowLayout(int spacing = 0);
+ ~FlowLayout();
+
+ void addItem(QLayoutItem *item);
+ Qt::Orientations expandingDirections() const;
+ bool hasHeightForWidth() const;
+ int heightForWidth(int) const;
+ int count() const;
+ QLayoutItem *itemAt(int index) const;
+ QSize minimumSize() const;
+ void setGeometry(const QRect &rect);
+ QSize sizeHint() const;
+ QLayoutItem *takeAt(int index);
+
+private:
+ int doLayout(const QRect &rect, bool testOnly) const;
+
+ QList<QLayoutItem *> itemList;
+};
+
+#endif
diff --git a/examples/layouts/flowlayout/flowlayout.pro b/examples/layouts/flowlayout/flowlayout.pro
new file mode 100644
index 0000000..0e97824
--- /dev/null
+++ b/examples/layouts/flowlayout/flowlayout.pro
@@ -0,0 +1,11 @@
+HEADERS = flowlayout.h \
+ window.h
+SOURCES = flowlayout.cpp \
+ main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/layouts/flowlayout
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/layouts/flowlayout
+INSTALLS += target sources
diff --git a/examples/layouts/flowlayout/main.cpp b/examples/layouts/flowlayout/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/layouts/flowlayout/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/layouts/flowlayout/window.cpp b/examples/layouts/flowlayout/window.cpp
new file mode 100644
index 0000000..51d9886
--- /dev/null
+++ b/examples/layouts/flowlayout/window.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "flowlayout.h"
+#include "window.h"
+
+Window::Window()
+{
+ FlowLayout *flowLayout = new FlowLayout;
+
+ flowLayout->addWidget(new QPushButton(tr("Short")));
+ flowLayout->addWidget(new QPushButton(tr("Longer")));
+ flowLayout->addWidget(new QPushButton(tr("Different text")));
+ flowLayout->addWidget(new QPushButton(tr("More text")));
+ flowLayout->addWidget(new QPushButton(tr("Even longer button text")));
+ setLayout(flowLayout);
+
+ setWindowTitle(tr("Flow Layout"));
+}
diff --git a/examples/layouts/flowlayout/window.h b/examples/layouts/flowlayout/window.h
new file mode 100644
index 0000000..ffd60af
--- /dev/null
+++ b/examples/layouts/flowlayout/window.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+};
+
+#endif
diff --git a/examples/layouts/layouts.pro b/examples/layouts/layouts.pro
new file mode 100644
index 0000000..9676f4b
--- /dev/null
+++ b/examples/layouts/layouts.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+SUBDIRS = basiclayouts \
+ borderlayout \
+ dynamiclayouts \
+ flowlayout
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/layouts
+INSTALLS += sources
diff --git a/examples/linguist/README b/examples/linguist/README
new file mode 100644
index 0000000..d1ef005
--- /dev/null
+++ b/examples/linguist/README
@@ -0,0 +1,37 @@
+Internationalization is a core feature of Qt. These examples show how to
+access translation and localization facilities at run-time.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/linguist/arrowpad/arrowpad.cpp b/examples/linguist/arrowpad/arrowpad.cpp
new file mode 100644
index 0000000..149247e
--- /dev/null
+++ b/examples/linguist/arrowpad/arrowpad.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "arrowpad.h"
+
+ArrowPad::ArrowPad(QWidget *parent)
+ : QWidget(parent)
+{
+//! [0]
+ upButton = new QPushButton(tr("&Up"));
+//! [0] //! [1]
+ downButton = new QPushButton(tr("&Down"));
+//! [1] //! [2]
+ leftButton = new QPushButton(tr("&Left"));
+//! [2] //! [3]
+ rightButton = new QPushButton(tr("&Right"));
+//! [3]
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(upButton, 0, 1);
+ mainLayout->addWidget(leftButton, 1, 0);
+ mainLayout->addWidget(rightButton, 1, 2);
+ mainLayout->addWidget(downButton, 2, 1);
+ setLayout(mainLayout);
+}
diff --git a/examples/linguist/arrowpad/arrowpad.h b/examples/linguist/arrowpad/arrowpad.h
new file mode 100644
index 0000000..d87a40c
--- /dev/null
+++ b/examples/linguist/arrowpad/arrowpad.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ARROWPAD_H
+#define ARROWPAD_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+QT_END_NAMESPACE
+
+//! [0]
+class ArrowPad : public QWidget
+//! [0] //! [1]
+{
+//! [1] //! [2]
+ Q_OBJECT
+//! [2]
+
+public:
+ ArrowPad(QWidget *parent = 0);
+
+private:
+ QPushButton *upButton;
+ QPushButton *downButton;
+ QPushButton *leftButton;
+ QPushButton *rightButton;
+};
+
+#endif
diff --git a/examples/linguist/arrowpad/arrowpad.pro b/examples/linguist/arrowpad/arrowpad.pro
new file mode 100644
index 0000000..c8a6fb2
--- /dev/null
+++ b/examples/linguist/arrowpad/arrowpad.pro
@@ -0,0 +1,16 @@
+#! [0]
+HEADERS = arrowpad.h \
+ mainwindow.h
+SOURCES = arrowpad.cpp \
+ main.cpp \
+ mainwindow.cpp
+#! [0] #! [1]
+TRANSLATIONS = arrowpad_fr.ts \
+ arrowpad_nl.ts
+#! [1]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/linguist/arrowpad
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/arrowpad
+INSTALLS += target sources
diff --git a/examples/linguist/arrowpad/main.cpp b/examples/linguist/arrowpad/main.cpp
new file mode 100644
index 0000000..912cac4
--- /dev/null
+++ b/examples/linguist/arrowpad/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+//! [0] //! [1]
+{
+ QApplication app(argc, argv);
+
+ QString locale = QLocale::system().name();
+
+//! [2]
+ QTranslator translator;
+//! [2] //! [3]
+ translator.load(QString("arrowpad_") + locale);
+ app.installTranslator(&translator);
+//! [1] //! [3]
+
+ MainWindow mainWindow;
+ mainWindow.show();
+ return app.exec();
+}
diff --git a/examples/linguist/arrowpad/mainwindow.cpp b/examples/linguist/arrowpad/mainwindow.cpp
new file mode 100644
index 0000000..a167cc2
--- /dev/null
+++ b/examples/linguist/arrowpad/mainwindow.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "arrowpad.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+//! [0]
+ arrowPad = new ArrowPad;
+//! [0]
+ setCentralWidget(arrowPad);
+
+//! [1]
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+//! [1]
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAct);
+}
diff --git a/examples/linguist/arrowpad/mainwindow.h b/examples/linguist/arrowpad/mainwindow.h
new file mode 100644
index 0000000..74e89be
--- /dev/null
+++ b/examples/linguist/arrowpad/mainwindow.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
+class ArrowPad;
+
+//! [0]
+class MainWindow : public QMainWindow
+//! [0] //! [1]
+{
+ Q_OBJECT
+//! [1]
+
+public:
+ MainWindow();
+
+private:
+ ArrowPad *arrowPad;
+ QMenu *fileMenu;
+ QAction *exitAct;
+};
+
+#endif
diff --git a/examples/linguist/hellotr/hellotr.pro b/examples/linguist/hellotr/hellotr.pro
new file mode 100644
index 0000000..c0065a4
--- /dev/null
+++ b/examples/linguist/hellotr/hellotr.pro
@@ -0,0 +1,11 @@
+#! [0]
+SOURCES = main.cpp
+#! [0] #! [1]
+TRANSLATIONS = hellotr_la.ts
+#! [1]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr
+INSTALLS += target sources
diff --git a/examples/linguist/hellotr/main.cpp b/examples/linguist/hellotr/main.cpp
new file mode 100644
index 0000000..f98089d
--- /dev/null
+++ b/examples/linguist/hellotr/main.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPushButton>
+//! [0]
+#include <QTranslator>
+//! [0]
+
+//! [1] //! [2]
+int main(int argc, char *argv[])
+//! [1] //! [3] //! [4]
+{
+ QApplication app(argc, argv);
+//! [3]
+
+//! [5]
+ QTranslator translator;
+//! [5] //! [6]
+ translator.load("hellotr_la");
+//! [6] //! [7]
+ app.installTranslator(&translator);
+//! [4] //! [7]
+
+//! [8]
+ QPushButton hello(QPushButton::tr("Hello world!"));
+//! [8]
+ hello.resize(100, 30);
+
+ hello.show();
+ return app.exec();
+}
+//! [2]
diff --git a/examples/linguist/linguist.pro b/examples/linguist/linguist.pro
new file mode 100644
index 0000000..921667d
--- /dev/null
+++ b/examples/linguist/linguist.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+SUBDIRS = arrowpad \
+ hellotr \
+ trollprint
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/linguist
+INSTALLS += sources
diff --git a/examples/linguist/trollprint/main.cpp b/examples/linguist/trollprint/main.cpp
new file mode 100644
index 0000000..9f37661
--- /dev/null
+++ b/examples/linguist/trollprint/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QString locale = QLocale::system().name();
+
+//! [0]
+ QTranslator translator;
+ translator.load(QString("trollprint_") + locale);
+ app.installTranslator(&translator);
+//! [0]
+
+ MainWindow mainWindow;
+ mainWindow.show();
+ return app.exec();
+}
diff --git a/examples/linguist/trollprint/mainwindow.cpp b/examples/linguist/trollprint/mainwindow.cpp
new file mode 100644
index 0000000..f7aa1ca
--- /dev/null
+++ b/examples/linguist/trollprint/mainwindow.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "printpanel.h"
+
+MainWindow::MainWindow()
+{
+ printPanel = new PrintPanel;
+ setCentralWidget(printPanel);
+
+ createActions();
+ createMenus();
+
+//! [0]
+ setWindowTitle(tr("Troll Print 1.0"));
+//! [0]
+}
+
+void MainWindow::about()
+{
+ QMessageBox::information(this, tr("About Troll Print 1.0"),
+ tr("Troll Print 1.0.\n\n"
+ "Copyright 1999 Software, Inc."));
+}
+
+//! [1]
+void MainWindow::createActions()
+{
+//! [2]
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q", "Quit"));
+//! [2]
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setShortcut(Qt::Key_F1);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+//! [1] //! [3]
+{
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [3]
diff --git a/examples/linguist/trollprint/mainwindow.h b/examples/linguist/trollprint/mainwindow.h
new file mode 100644
index 0000000..415512b
--- /dev/null
+++ b/examples/linguist/trollprint/mainwindow.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
+class PrintPanel;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+
+ PrintPanel *printPanel;
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/linguist/trollprint/printpanel.cpp b/examples/linguist/trollprint/printpanel.cpp
new file mode 100644
index 0000000..888c12a
--- /dev/null
+++ b/examples/linguist/trollprint/printpanel.cpp
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "printpanel.h"
+
+//! [0]
+PrintPanel::PrintPanel(QWidget *parent)
+ : QWidget(parent)
+{
+/*
+ QLabel *label = new QLabel(tr("<b>TROLL PRINT</b>"));
+ label->setAlignment(Qt::AlignCenter);
+*/
+//! [0]
+
+//! [1]
+ twoSidedGroupBox = new QGroupBox(tr("2-sided"));
+ twoSidedEnabledRadio = new QRadioButton(tr("Enabled"));
+ twoSidedDisabledRadio = new QRadioButton(tr("Disabled"));
+//! [1] //! [2]
+ twoSidedDisabledRadio->setChecked(true);
+
+ colorsGroupBox = new QGroupBox(tr("Colors"));
+ colorsEnabledRadio = new QRadioButton(tr("Enabled"));
+ colorsDisabledRadio = new QRadioButton(tr("Disabled"));
+//! [2]
+ colorsDisabledRadio->setChecked(true);
+
+ QHBoxLayout *twoSidedLayout = new QHBoxLayout;
+ twoSidedLayout->addWidget(twoSidedEnabledRadio);
+ twoSidedLayout->addWidget(twoSidedDisabledRadio);
+ twoSidedGroupBox->setLayout(twoSidedLayout);
+
+ QHBoxLayout *colorsLayout = new QHBoxLayout;
+ colorsLayout->addWidget(colorsEnabledRadio);
+ colorsLayout->addWidget(colorsDisabledRadio);
+ colorsGroupBox->setLayout(colorsLayout);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+/*
+ mainLayout->addWidget(label);
+*/
+ mainLayout->addWidget(twoSidedGroupBox);
+ mainLayout->addWidget(colorsGroupBox);
+ setLayout(mainLayout);
+}
diff --git a/examples/linguist/trollprint/printpanel.h b/examples/linguist/trollprint/printpanel.h
new file mode 100644
index 0000000..f6eef67
--- /dev/null
+++ b/examples/linguist/trollprint/printpanel.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PRINTPANEL_H
+#define PRINTPANEL_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QGroupBox;
+class QRadioButton;
+QT_END_NAMESPACE
+
+//! [0]
+class PrintPanel : public QWidget
+{
+ Q_OBJECT
+//! [0]
+
+public:
+ PrintPanel(QWidget *parent = 0);
+
+private:
+ QGroupBox *twoSidedGroupBox;
+ QGroupBox *colorsGroupBox;
+ QRadioButton *twoSidedEnabledRadio;
+ QRadioButton *twoSidedDisabledRadio;
+ QRadioButton *colorsEnabledRadio;
+ QRadioButton *colorsDisabledRadio;
+};
+
+#endif
diff --git a/examples/linguist/trollprint/trollprint.pro b/examples/linguist/trollprint/trollprint.pro
new file mode 100644
index 0000000..9f3aaeb
--- /dev/null
+++ b/examples/linguist/trollprint/trollprint.pro
@@ -0,0 +1,12 @@
+HEADERS = mainwindow.h \
+ printpanel.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ printpanel.cpp
+TRANSLATIONS = trollprint_pt.ts
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/linguist/trollprint
+sources.files = $$SOURCES $$HEADERS $$TRANSLATIONS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/trollprint
+INSTALLS += target sources
diff --git a/examples/linguist/trollprint/trollprint_pt.ts b/examples/linguist/trollprint/trollprint_pt.ts
new file mode 100644
index 0000000..e5871bd
--- /dev/null
+++ b/examples/linguist/trollprint/trollprint_pt.ts
@@ -0,0 +1,65 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>Troll Print 1.0</source>
+ <translation>Troll Imprimir 1.0</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Sair</translation>
+ </message>
+ <message>
+ <source>&amp;About</source>
+ <translation>&amp;Sobre</translation>
+ </message>
+ <message>
+ <source>About &amp;Qt</source>
+ <translation>Sobre &amp;Qt</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Arquivo</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>A&amp;juda</translation>
+ </message>
+ <message>
+ <source>About Troll Print 1.0</source>
+ <translation>Sobre Troll Imprimir 1.0</translation>
+ </message>
+ <message>
+ <source>Troll Print 1.0.
+
+Copyright 1999 Software, Inc.</source>
+ <translation>Troll Imprimir 1.0
+
+Copyright 1999 Software, Inc.</translation>
+ </message>
+ <message>
+ <source>Ctrl+Q</source>
+ <comment>Quit</comment>
+ <translation>Ctrl+Q</translation>
+ </message>
+</context>
+<context>
+ <name>PrintPanel</name>
+ <message>
+ <source>2-sided</source>
+ <translation>2-lados</translation>
+ </message>
+ <message>
+ <source>Enabled</source>
+ <translation>Ativado</translation>
+ </message>
+ <message>
+ <source>Disabled</source>
+ <translation>Desativado</translation>
+ </message>
+ <message>
+ <source>Colors</source>
+ <translation>Cores</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/mainwindows/README b/examples/mainwindows/README
new file mode 100644
index 0000000..15a6c23
--- /dev/null
+++ b/examples/mainwindows/README
@@ -0,0 +1,40 @@
+All the standard features of application main windows are provided by Qt.
+
+Main windows can have pull down menus, tool bars, and dock windows. These
+separate forms of user input are unified in an integrated action system that
+also supports keyboard shortcuts and accelerator keys in menu items.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro
new file mode 100644
index 0000000..ad1168a
--- /dev/null
+++ b/examples/mainwindows/application/application.pro
@@ -0,0 +1,12 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+#! [0]
+RESOURCES = application.qrc
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS application.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application
+INSTALLS += target sources
diff --git a/examples/mainwindows/application/application.qrc b/examples/mainwindows/application/application.qrc
new file mode 100644
index 0000000..0a776fa
--- /dev/null
+++ b/examples/mainwindows/application/application.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/copy.png</file>
+ <file>images/cut.png</file>
+ <file>images/new.png</file>
+ <file>images/open.png</file>
+ <file>images/paste.png</file>
+ <file>images/save.png</file>
+</qresource>
+</RCC>
diff --git a/examples/mainwindows/application/images/copy.png b/examples/mainwindows/application/images/copy.png
new file mode 100644
index 0000000..2aeb282
--- /dev/null
+++ b/examples/mainwindows/application/images/copy.png
Binary files differ
diff --git a/examples/mainwindows/application/images/cut.png b/examples/mainwindows/application/images/cut.png
new file mode 100644
index 0000000..54638e9
--- /dev/null
+++ b/examples/mainwindows/application/images/cut.png
Binary files differ
diff --git a/examples/mainwindows/application/images/new.png b/examples/mainwindows/application/images/new.png
new file mode 100644
index 0000000..12131b0
--- /dev/null
+++ b/examples/mainwindows/application/images/new.png
Binary files differ
diff --git a/examples/mainwindows/application/images/open.png b/examples/mainwindows/application/images/open.png
new file mode 100644
index 0000000..45fa288
--- /dev/null
+++ b/examples/mainwindows/application/images/open.png
Binary files differ
diff --git a/examples/mainwindows/application/images/paste.png b/examples/mainwindows/application/images/paste.png
new file mode 100644
index 0000000..c14425c
--- /dev/null
+++ b/examples/mainwindows/application/images/paste.png
Binary files differ
diff --git a/examples/mainwindows/application/images/save.png b/examples/mainwindows/application/images/save.png
new file mode 100644
index 0000000..daba865
--- /dev/null
+++ b/examples/mainwindows/application/images/save.png
Binary files differ
diff --git a/examples/mainwindows/application/main.cpp b/examples/mainwindows/application/main.cpp
new file mode 100644
index 0000000..0f9d1b2
--- /dev/null
+++ b/examples/mainwindows/application/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(application);
+
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/mainwindows/application/mainwindow.cpp b/examples/mainwindows/application/mainwindow.cpp
new file mode 100644
index 0000000..9a22254
--- /dev/null
+++ b/examples/mainwindows/application/mainwindow.cpp
@@ -0,0 +1,388 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtGui>
+
+#include "mainwindow.h"
+//! [0]
+
+//! [1]
+MainWindow::MainWindow()
+//! [1] //! [2]
+{
+ textEdit = new QPlainTextEdit;
+ setCentralWidget(textEdit);
+
+ createActions();
+ createMenus();
+ createToolBars();
+ createStatusBar();
+
+ readSettings();
+
+ connect(textEdit->document(), SIGNAL(contentsChanged()),
+ this, SLOT(documentWasModified()));
+
+ setCurrentFile("");
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+//! [2]
+
+//! [3]
+void MainWindow::closeEvent(QCloseEvent *event)
+//! [3] //! [4]
+{
+ if (maybeSave()) {
+ writeSettings();
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+//! [4]
+
+//! [5]
+void MainWindow::newFile()
+//! [5] //! [6]
+{
+ if (maybeSave()) {
+ textEdit->clear();
+ setCurrentFile("");
+ }
+}
+//! [6]
+
+//! [7]
+void MainWindow::open()
+//! [7] //! [8]
+{
+ if (maybeSave()) {
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty())
+ loadFile(fileName);
+ }
+}
+//! [8]
+
+//! [9]
+bool MainWindow::save()
+//! [9] //! [10]
+{
+ if (curFile.isEmpty()) {
+ return saveAs();
+ } else {
+ return saveFile(curFile);
+ }
+}
+//! [10]
+
+//! [11]
+bool MainWindow::saveAs()
+//! [11] //! [12]
+{
+ QString fileName = QFileDialog::getSaveFileName(this);
+ if (fileName.isEmpty())
+ return false;
+
+ return saveFile(fileName);
+}
+//! [12]
+
+//! [13]
+void MainWindow::about()
+//! [13] //! [14]
+{
+ QMessageBox::about(this, tr("About Application"),
+ tr("The <b>Application</b> example demonstrates how to "
+ "write modern GUI applications using Qt, with a menu bar, "
+ "toolbars, and a status bar."));
+}
+//! [14]
+
+//! [15]
+void MainWindow::documentWasModified()
+//! [15] //! [16]
+{
+ setWindowModified(textEdit->document()->isModified());
+}
+//! [16]
+
+//! [17]
+void MainWindow::createActions()
+//! [17] //! [18]
+{
+ newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+
+//! [19]
+ openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+//! [18] //! [19]
+
+ saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ saveAsAct = new QAction(tr("Save &As..."), this);
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
+ saveAsAct->setStatusTip(tr("Save the document under a new name"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+//! [20]
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+//! [20]
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+//! [21]
+ cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
+//! [21]
+ cutAct->setShortcuts(QKeySequence::Cut);
+ cutAct->setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"));
+ connect(cutAct, SIGNAL(triggered()), textEdit, SLOT(cut()));
+
+ copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
+ copyAct->setShortcuts(QKeySequence::Copy);
+ copyAct->setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"));
+ connect(copyAct, SIGNAL(triggered()), textEdit, SLOT(copy()));
+
+ pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
+ pasteAct->setShortcuts(QKeySequence::Paste);
+ pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"));
+ connect(pasteAct, SIGNAL(triggered()), textEdit, SLOT(paste()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+//! [22]
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+//! [22]
+
+//! [23]
+ cutAct->setEnabled(false);
+//! [23] //! [24]
+ copyAct->setEnabled(false);
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ cutAct, SLOT(setEnabled(bool)));
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ copyAct, SLOT(setEnabled(bool)));
+}
+//! [24]
+
+//! [25] //! [26]
+void MainWindow::createMenus()
+//! [25] //! [27]
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newAct);
+//! [28]
+ fileMenu->addAction(openAct);
+//! [28]
+ fileMenu->addAction(saveAct);
+//! [26]
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(cutAct);
+ editMenu->addAction(copyAct);
+ editMenu->addAction(pasteAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [27]
+
+//! [29] //! [30]
+void MainWindow::createToolBars()
+{
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newAct);
+//! [29] //! [31]
+ fileToolBar->addAction(openAct);
+//! [31]
+ fileToolBar->addAction(saveAct);
+
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(cutAct);
+ editToolBar->addAction(copyAct);
+ editToolBar->addAction(pasteAct);
+}
+//! [30]
+
+//! [32]
+void MainWindow::createStatusBar()
+//! [32] //! [33]
+{
+ statusBar()->showMessage(tr("Ready"));
+}
+//! [33]
+
+//! [34] //! [35]
+void MainWindow::readSettings()
+//! [34] //! [36]
+{
+ QSettings settings("Trolltech", "Application Example");
+ QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
+ QSize size = settings.value("size", QSize(400, 400)).toSize();
+ resize(size);
+ move(pos);
+}
+//! [35] //! [36]
+
+//! [37] //! [38]
+void MainWindow::writeSettings()
+//! [37] //! [39]
+{
+ QSettings settings("Trolltech", "Application Example");
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+}
+//! [38] //! [39]
+
+//! [40]
+bool MainWindow::maybeSave()
+//! [40] //! [41]
+{
+ if (textEdit->document()->isModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save)
+ return save();
+ else if (ret == QMessageBox::Cancel)
+ return false;
+ }
+ return true;
+}
+//! [41]
+
+//! [42]
+void MainWindow::loadFile(const QString &fileName)
+//! [42] //! [43]
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream in(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ textEdit->setPlainText(in.readAll());
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+//! [43]
+
+//! [44]
+bool MainWindow::saveFile(const QString &fileName)
+//! [44] //! [45]
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return false;
+ }
+
+ QTextStream out(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ out << textEdit->toPlainText();
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File saved"), 2000);
+ return true;
+}
+//! [45]
+
+//! [46]
+void MainWindow::setCurrentFile(const QString &fileName)
+//! [46] //! [47]
+{
+ curFile = fileName;
+ textEdit->document()->setModified(false);
+ setWindowModified(false);
+
+ QString shownName;
+ if (curFile.isEmpty())
+ shownName = "untitled.txt";
+ else
+ shownName = strippedName(curFile);
+
+ setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Application")));
+}
+//! [47]
+
+//! [48]
+QString MainWindow::strippedName(const QString &fullFileName)
+//! [48] //! [49]
+{
+ return QFileInfo(fullFileName).fileName();
+}
+//! [49]
diff --git a/examples/mainwindows/application/mainwindow.h b/examples/mainwindows/application/mainwindow.h
new file mode 100644
index 0000000..264be03
--- /dev/null
+++ b/examples/mainwindows/application/mainwindow.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QPlainTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void newFile();
+ void open();
+ bool save();
+ bool saveAs();
+ void about();
+ void documentWasModified();
+
+private:
+ void createActions();
+ void createMenus();
+ void createToolBars();
+ void createStatusBar();
+ void readSettings();
+ void writeSettings();
+ bool maybeSave();
+ void loadFile(const QString &fileName);
+ bool saveFile(const QString &fileName);
+ void setCurrentFile(const QString &fileName);
+ QString strippedName(const QString &fullFileName);
+
+ QPlainTextEdit *textEdit;
+ QString curFile;
+
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *helpMenu;
+ QToolBar *fileToolBar;
+ QToolBar *editToolBar;
+ QAction *newAct;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *cutAct;
+ QAction *copyAct;
+ QAction *pasteAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro
new file mode 100644
index 0000000..afc8aaa
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/dockwidgets.pro
@@ -0,0 +1,10 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+RESOURCES = dockwidgets.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/dockwidgets
+sources.files = $$SOURCES $$HEADERS $$RESOURCES dockwidgets.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/dockwidgets
+INSTALLS += target sources
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.qrc b/examples/mainwindows/dockwidgets/dockwidgets.qrc
new file mode 100644
index 0000000..968feac
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/dockwidgets.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/new.png</file>
+ <file>images/print.png</file>
+ <file>images/save.png</file>
+ <file>images/undo.png</file>
+</qresource>
+</RCC>
diff --git a/examples/mainwindows/dockwidgets/images/new.png b/examples/mainwindows/dockwidgets/images/new.png
new file mode 100644
index 0000000..dd795cf
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/images/new.png
Binary files differ
diff --git a/examples/mainwindows/dockwidgets/images/print.png b/examples/mainwindows/dockwidgets/images/print.png
new file mode 100644
index 0000000..2afb769
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/images/print.png
Binary files differ
diff --git a/examples/mainwindows/dockwidgets/images/save.png b/examples/mainwindows/dockwidgets/images/save.png
new file mode 100644
index 0000000..46eac82
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/images/save.png
Binary files differ
diff --git a/examples/mainwindows/dockwidgets/images/undo.png b/examples/mainwindows/dockwidgets/images/undo.png
new file mode 100644
index 0000000..eee23d2
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/images/undo.png
Binary files differ
diff --git a/examples/mainwindows/dockwidgets/main.cpp b/examples/mainwindows/dockwidgets/main.cpp
new file mode 100644
index 0000000..f4bed91
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(dockwidgets);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
new file mode 100644
index 0000000..1683034
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -0,0 +1,343 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtGui>
+
+#include "mainwindow.h"
+//! [0]
+
+//! [1]
+MainWindow::MainWindow()
+{
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ createActions();
+ createMenus();
+ createToolBars();
+ createStatusBar();
+ createDockWindows();
+
+ setWindowTitle(tr("Dock Widgets"));
+
+ newLetter();
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+//! [1]
+
+//! [2]
+void MainWindow::newLetter()
+{
+ textEdit->clear();
+
+ QTextCursor cursor(textEdit->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+ QTextFrame *topFrame = cursor.currentFrame();
+ QTextFrameFormat topFrameFormat = topFrame->frameFormat();
+ topFrameFormat.setPadding(16);
+ topFrame->setFrameFormat(topFrameFormat);
+
+ QTextCharFormat textFormat;
+ QTextCharFormat boldFormat;
+ boldFormat.setFontWeight(QFont::Bold);
+ QTextCharFormat italicFormat;
+ italicFormat.setFontItalic(true);
+
+ QTextTableFormat tableFormat;
+ tableFormat.setBorder(1);
+ tableFormat.setCellPadding(16);
+ tableFormat.setAlignment(Qt::AlignRight);
+ cursor.insertTable(1, 1, tableFormat);
+ cursor.insertText("The Firm", boldFormat);
+ cursor.insertBlock();
+ cursor.insertText("321 City Street", textFormat);
+ cursor.insertBlock();
+ cursor.insertText("Industry Park");
+ cursor.insertBlock();
+ cursor.insertText("Some Country");
+ cursor.setPosition(topFrame->lastPosition());
+ cursor.insertText(QDate::currentDate().toString("d MMMM yyyy"), textFormat);
+ cursor.insertBlock();
+ cursor.insertBlock();
+ cursor.insertText("Dear ", textFormat);
+ cursor.insertText("NAME", italicFormat);
+ cursor.insertText(",", textFormat);
+ for (int i = 0; i < 3; ++i)
+ cursor.insertBlock();
+ cursor.insertText(tr("Yours sincerely,"), textFormat);
+ for (int i = 0; i < 3; ++i)
+ cursor.insertBlock();
+ cursor.insertText("The Boss", textFormat);
+ cursor.insertBlock();
+ cursor.insertText("ADDRESS", italicFormat);
+}
+//! [2]
+
+//! [3]
+void MainWindow::print()
+{
+#ifndef QT_NO_PRINTDIALOG
+ QTextDocument *document = textEdit->document();
+ QPrinter printer;
+
+ QPrintDialog *dlg = new QPrintDialog(&printer, this);
+ if (dlg->exec() != QDialog::Accepted)
+ return;
+
+ document->print(&printer);
+
+ statusBar()->showMessage(tr("Ready"), 2000);
+#endif
+}
+//! [3]
+
+//! [4]
+void MainWindow::save()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Choose a file name"), ".",
+ tr("HTML (*.html *.htm)"));
+ if (fileName.isEmpty())
+ return;
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Dock Widgets"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream out(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ out << textEdit->toHtml();
+ QApplication::restoreOverrideCursor();
+
+ statusBar()->showMessage(tr("Saved '%1'").arg(fileName), 2000);
+}
+//! [4]
+
+//! [5]
+void MainWindow::undo()
+{
+ QTextDocument *document = textEdit->document();
+ document->undo();
+}
+//! [5]
+
+//! [6]
+void MainWindow::insertCustomer(const QString &customer)
+{
+ if (customer.isEmpty())
+ return;
+ QStringList customerList = customer.split(", ");
+ QTextDocument *document = textEdit->document();
+ QTextCursor cursor = document->find("NAME");
+ if (!cursor.isNull()) {
+ cursor.beginEditBlock();
+ cursor.insertText(customerList.at(0));
+ QTextCursor oldcursor = cursor;
+ cursor = document->find("ADDRESS");
+ if (!cursor.isNull()) {
+ for (int i = 1; i < customerList.size(); ++i) {
+ cursor.insertBlock();
+ cursor.insertText(customerList.at(i));
+ }
+ cursor.endEditBlock();
+ }
+ else
+ oldcursor.endEditBlock();
+ }
+}
+//! [6]
+
+//! [7]
+void MainWindow::addParagraph(const QString &paragraph)
+{
+ if (paragraph.isEmpty())
+ return;
+ QTextDocument *document = textEdit->document();
+ QTextCursor cursor = document->find(tr("Yours sincerely,"));
+ if (cursor.isNull())
+ return;
+ cursor.beginEditBlock();
+ cursor.movePosition(QTextCursor::PreviousBlock, QTextCursor::MoveAnchor, 2);
+ cursor.insertBlock();
+ cursor.insertText(paragraph);
+ cursor.insertBlock();
+ cursor.endEditBlock();
+
+}
+//! [7]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Dock Widgets"),
+ tr("The <b>Dock Widgets</b> example demonstrates how to "
+ "use Qt's dock widgets. You can enter your own text, "
+ "click a customer to add a customer name and "
+ "address, and click standard paragraphs to add them."));
+}
+
+void MainWindow::createActions()
+{
+ newLetterAct = new QAction(QIcon(":/images/new.png"), tr("&New Letter"),
+ this);
+ newLetterAct->setShortcuts(QKeySequence::New);
+ newLetterAct->setStatusTip(tr("Create a new form letter"));
+ connect(newLetterAct, SIGNAL(triggered()), this, SLOT(newLetter()));
+
+ saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save..."), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the current form letter"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this);
+ printAct->setShortcuts(QKeySequence::Print);
+ printAct->setStatusTip(tr("Print the current form letter"));
+ connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
+
+ undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this);
+ undoAct->setShortcuts(QKeySequence::Undo);
+ undoAct->setStatusTip(tr("Undo the last editing action"));
+ connect(undoAct, SIGNAL(triggered()), this, SLOT(undo()));
+
+ quitAct = new QAction(tr("&Quit"), this);
+ quitAct->setShortcut(tr("Ctrl+Q"));
+ quitAct->setStatusTip(tr("Quit the application"));
+ connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newLetterAct);
+ fileMenu->addAction(saveAct);
+ fileMenu->addAction(printAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(quitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(undoAct);
+
+ viewMenu = menuBar()->addMenu(tr("&View"));
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::createToolBars()
+{
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newLetterAct);
+ fileToolBar->addAction(saveAct);
+ fileToolBar->addAction(printAct);
+
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(undoAct);
+}
+
+//! [8]
+void MainWindow::createStatusBar()
+{
+ statusBar()->showMessage(tr("Ready"));
+}
+//! [8]
+
+//! [9]
+void MainWindow::createDockWindows()
+{
+ QDockWidget *dock = new QDockWidget(tr("Customers"), this);
+ dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+ customerList = new QListWidget(dock);
+ customerList->addItems(QStringList()
+ << "John Doe, Harmony Enterprises, 12 Lakeside, Ambleton"
+ << "Jane Doe, Memorabilia, 23 Watersedge, Beaton"
+ << "Tammy Shea, Tiblanka, 38 Sea Views, Carlton"
+ << "Tim Sheen, Caraba Gifts, 48 Ocean Way, Deal"
+ << "Sol Harvey, Chicos Coffee, 53 New Springs, Eccleston"
+ << "Sally Hobart, Tiroli Tea, 67 Long River, Fedula");
+ dock->setWidget(customerList);
+ addDockWidget(Qt::RightDockWidgetArea, dock);
+ viewMenu->addAction(dock->toggleViewAction());
+
+ dock = new QDockWidget(tr("Paragraphs"), this);
+ paragraphsList = new QListWidget(dock);
+ paragraphsList->addItems(QStringList()
+ << "Thank you for your payment which we have received today."
+ << "Your order has been dispatched and should be with you "
+ "within 28 days."
+ << "We have dispatched those items that were in stock. The "
+ "rest of your order will be dispatched once all the "
+ "remaining items have arrived at our warehouse. No "
+ "additional shipping charges will be made."
+ << "You made a small overpayment (less than $5) which we "
+ "will keep on account for you, or return at your request."
+ << "You made a small underpayment (less than $1), but we have "
+ "sent your order anyway. We'll add this underpayment to "
+ "your next bill."
+ << "Unfortunately you did not send enough money. Please remit "
+ "an additional $. Your order will be dispatched as soon as "
+ "the complete amount has been received."
+ << "You made an overpayment (more than $5). Do you wish to "
+ "buy more items, or should we return the excess to you?");
+ dock->setWidget(paragraphsList);
+ addDockWidget(Qt::RightDockWidgetArea, dock);
+ viewMenu->addAction(dock->toggleViewAction());
+
+ connect(customerList, SIGNAL(currentTextChanged(const QString &)),
+ this, SLOT(insertCustomer(const QString &)));
+ connect(paragraphsList, SIGNAL(currentTextChanged(const QString &)),
+ this, SLOT(addParagraph(const QString &)));
+}
+//! [9]
diff --git a/examples/mainwindows/dockwidgets/mainwindow.h b/examples/mainwindows/dockwidgets/mainwindow.h
new file mode 100644
index 0000000..f4768d7
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/mainwindow.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QListWidget;
+class QMenu;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void newLetter();
+ void save();
+ void print();
+ void undo();
+ void about();
+ void insertCustomer(const QString &customer);
+ void addParagraph(const QString &paragraph);
+
+private:
+ void createActions();
+ void createMenus();
+ void createToolBars();
+ void createStatusBar();
+ void createDockWindows();
+
+ QTextEdit *textEdit;
+ QListWidget *customerList;
+ QListWidget *paragraphsList;
+
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *viewMenu;
+ QMenu *helpMenu;
+ QToolBar *fileToolBar;
+ QToolBar *editToolBar;
+ QAction *newLetterAct;
+ QAction *saveAct;
+ QAction *printAct;
+ QAction *undoAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+ QAction *quitAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro
new file mode 100644
index 0000000..90ff3a5
--- /dev/null
+++ b/examples/mainwindows/mainwindows.pro
@@ -0,0 +1,13 @@
+TEMPLATE = subdirs
+SUBDIRS = application \
+ dockwidgets \
+ mdi \
+ menus \
+ recentfiles \
+ sdi
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mainwindows.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows
+INSTALLS += target sources
diff --git a/examples/mainwindows/mdi/images/copy.png b/examples/mainwindows/mdi/images/copy.png
new file mode 100644
index 0000000..2aeb282
--- /dev/null
+++ b/examples/mainwindows/mdi/images/copy.png
Binary files differ
diff --git a/examples/mainwindows/mdi/images/cut.png b/examples/mainwindows/mdi/images/cut.png
new file mode 100644
index 0000000..54638e9
--- /dev/null
+++ b/examples/mainwindows/mdi/images/cut.png
Binary files differ
diff --git a/examples/mainwindows/mdi/images/new.png b/examples/mainwindows/mdi/images/new.png
new file mode 100644
index 0000000..12131b0
--- /dev/null
+++ b/examples/mainwindows/mdi/images/new.png
Binary files differ
diff --git a/examples/mainwindows/mdi/images/open.png b/examples/mainwindows/mdi/images/open.png
new file mode 100644
index 0000000..45fa288
--- /dev/null
+++ b/examples/mainwindows/mdi/images/open.png
Binary files differ
diff --git a/examples/mainwindows/mdi/images/paste.png b/examples/mainwindows/mdi/images/paste.png
new file mode 100644
index 0000000..c14425c
--- /dev/null
+++ b/examples/mainwindows/mdi/images/paste.png
Binary files differ
diff --git a/examples/mainwindows/mdi/images/save.png b/examples/mainwindows/mdi/images/save.png
new file mode 100644
index 0000000..daba865
--- /dev/null
+++ b/examples/mainwindows/mdi/images/save.png
Binary files differ
diff --git a/examples/mainwindows/mdi/main.cpp b/examples/mainwindows/mdi/main.cpp
new file mode 100644
index 0000000..8592836
--- /dev/null
+++ b/examples/mainwindows/mdi/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(mdi);
+
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp
new file mode 100644
index 0000000..49f9b21
--- /dev/null
+++ b/examples/mainwindows/mdi/mainwindow.cpp
@@ -0,0 +1,399 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "mdichild.h"
+
+MainWindow::MainWindow()
+{
+ mdiArea = new QMdiArea;
+ mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ setCentralWidget(mdiArea);
+ connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)),
+ this, SLOT(updateMenus()));
+ windowMapper = new QSignalMapper(this);
+ connect(windowMapper, SIGNAL(mapped(QWidget *)),
+ this, SLOT(setActiveSubWindow(QWidget *)));
+
+ createActions();
+ createMenus();
+ createToolBars();
+ createStatusBar();
+ updateMenus();
+
+ readSettings();
+
+ setWindowTitle(tr("MDI"));
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ mdiArea->closeAllSubWindows();
+ if (activeMdiChild()) {
+ event->ignore();
+ } else {
+ writeSettings();
+ event->accept();
+ }
+}
+
+void MainWindow::newFile()
+{
+ MdiChild *child = createMdiChild();
+ child->newFile();
+ child->show();
+}
+
+void MainWindow::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty()) {
+ QMdiSubWindow *existing = findMdiChild(fileName);
+ if (existing) {
+ mdiArea->setActiveSubWindow(existing);
+ return;
+ }
+
+ MdiChild *child = createMdiChild();
+ if (child->loadFile(fileName)) {
+ statusBar()->showMessage(tr("File loaded"), 2000);
+ child->show();
+ } else {
+ child->close();
+ }
+ }
+}
+
+void MainWindow::save()
+{
+ if (activeMdiChild() && activeMdiChild()->save())
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+
+void MainWindow::saveAs()
+{
+ if (activeMdiChild() && activeMdiChild()->saveAs())
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+
+void MainWindow::cut()
+{
+ if (activeMdiChild())
+ activeMdiChild()->cut();
+}
+
+void MainWindow::copy()
+{
+ if (activeMdiChild())
+ activeMdiChild()->copy();
+}
+
+void MainWindow::paste()
+{
+ if (activeMdiChild())
+ activeMdiChild()->paste();
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About MDI"),
+ tr("The <b>MDI</b> example demonstrates how to write multiple "
+ "document interface applications using Qt."));
+}
+
+void MainWindow::updateMenus()
+{
+ bool hasMdiChild = (activeMdiChild() != 0);
+ saveAct->setEnabled(hasMdiChild);
+ saveAsAct->setEnabled(hasMdiChild);
+ pasteAct->setEnabled(hasMdiChild);
+ closeAct->setEnabled(hasMdiChild);
+ closeAllAct->setEnabled(hasMdiChild);
+ tileAct->setEnabled(hasMdiChild);
+ cascadeAct->setEnabled(hasMdiChild);
+ nextAct->setEnabled(hasMdiChild);
+ previousAct->setEnabled(hasMdiChild);
+ separatorAct->setVisible(hasMdiChild);
+
+ bool hasSelection = (activeMdiChild() &&
+ activeMdiChild()->textCursor().hasSelection());
+ cutAct->setEnabled(hasSelection);
+ copyAct->setEnabled(hasSelection);
+}
+
+void MainWindow::updateWindowMenu()
+{
+ windowMenu->clear();
+ windowMenu->addAction(closeAct);
+ windowMenu->addAction(closeAllAct);
+ windowMenu->addSeparator();
+ windowMenu->addAction(tileAct);
+ windowMenu->addAction(cascadeAct);
+ windowMenu->addSeparator();
+ windowMenu->addAction(nextAct);
+ windowMenu->addAction(previousAct);
+ windowMenu->addAction(separatorAct);
+
+ QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
+ separatorAct->setVisible(!windows.isEmpty());
+
+ for (int i = 0; i < windows.size(); ++i) {
+ MdiChild *child = qobject_cast<MdiChild *>(windows.at(i)->widget());
+
+ QString text;
+ if (i < 9) {
+ text = tr("&%1 %2").arg(i + 1)
+ .arg(child->userFriendlyCurrentFile());
+ } else {
+ text = tr("%1 %2").arg(i + 1)
+ .arg(child->userFriendlyCurrentFile());
+ }
+ QAction *action = windowMenu->addAction(text);
+ action->setCheckable(true);
+ action ->setChecked(child == activeMdiChild());
+ connect(action, SIGNAL(triggered()), windowMapper, SLOT(map()));
+ windowMapper->setMapping(action, windows.at(i));
+ }
+}
+
+MdiChild *MainWindow::createMdiChild()
+{
+ MdiChild *child = new MdiChild;
+ mdiArea->addSubWindow(child);
+
+ connect(child, SIGNAL(copyAvailable(bool)),
+ cutAct, SLOT(setEnabled(bool)));
+ connect(child, SIGNAL(copyAvailable(bool)),
+ copyAct, SLOT(setEnabled(bool)));
+
+ return child;
+}
+
+void MainWindow::createActions()
+{
+ newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+
+ openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ saveAsAct = new QAction(tr("Save &As..."), this);
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
+ saveAsAct->setStatusTip(tr("Save the document under a new name"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+//! [0]
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
+//! [0]
+
+ cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
+ cutAct->setShortcuts(QKeySequence::Cut);
+ cutAct->setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"));
+ connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
+
+ copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
+ copyAct->setShortcuts(QKeySequence::Copy);
+ copyAct->setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"));
+ connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
+
+ pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
+ pasteAct->setShortcuts(QKeySequence::Paste);
+ pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"));
+ connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste()));
+
+ closeAct = new QAction(tr("Cl&ose"), this);
+ closeAct->setShortcut(tr("Ctrl+F4"));
+ closeAct->setStatusTip(tr("Close the active window"));
+ connect(closeAct, SIGNAL(triggered()),
+ mdiArea, SLOT(closeActiveSubWindow()));
+
+ closeAllAct = new QAction(tr("Close &All"), this);
+ closeAllAct->setStatusTip(tr("Close all the windows"));
+ connect(closeAllAct, SIGNAL(triggered()),
+ mdiArea, SLOT(closeAllSubWindows()));
+
+ tileAct = new QAction(tr("&Tile"), this);
+ tileAct->setStatusTip(tr("Tile the windows"));
+ connect(tileAct, SIGNAL(triggered()), mdiArea, SLOT(tileSubWindows()));
+
+ cascadeAct = new QAction(tr("&Cascade"), this);
+ cascadeAct->setStatusTip(tr("Cascade the windows"));
+ connect(cascadeAct, SIGNAL(triggered()), mdiArea, SLOT(cascadeSubWindows()));
+
+ nextAct = new QAction(tr("Ne&xt"), this);
+ nextAct->setShortcuts(QKeySequence::NextChild);
+ nextAct->setStatusTip(tr("Move the focus to the next window"));
+ connect(nextAct, SIGNAL(triggered()),
+ mdiArea, SLOT(activateNextSubWindow()));
+
+ previousAct = new QAction(tr("Pre&vious"), this);
+ previousAct->setShortcuts(QKeySequence::PreviousChild);
+ previousAct->setStatusTip(tr("Move the focus to the previous "
+ "window"));
+ connect(previousAct, SIGNAL(triggered()),
+ mdiArea, SLOT(activatePreviousSubWindow()));
+
+ separatorAct = new QAction(this);
+ separatorAct->setSeparator(true);
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newAct);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addSeparator();
+ QAction *action = fileMenu->addAction(tr("Switch layout direction"));
+ connect(action, SIGNAL(triggered()), this, SLOT(switchLayoutDirection()));
+ fileMenu->addAction(exitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(cutAct);
+ editMenu->addAction(copyAct);
+ editMenu->addAction(pasteAct);
+
+ windowMenu = menuBar()->addMenu(tr("&Window"));
+ updateWindowMenu();
+ connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowMenu()));
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::createToolBars()
+{
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newAct);
+ fileToolBar->addAction(openAct);
+ fileToolBar->addAction(saveAct);
+
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(cutAct);
+ editToolBar->addAction(copyAct);
+ editToolBar->addAction(pasteAct);
+}
+
+void MainWindow::createStatusBar()
+{
+ statusBar()->showMessage(tr("Ready"));
+}
+
+void MainWindow::readSettings()
+{
+ QSettings settings("Trolltech", "MDI Example");
+ QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
+ QSize size = settings.value("size", QSize(400, 400)).toSize();
+ move(pos);
+ resize(size);
+}
+
+void MainWindow::writeSettings()
+{
+ QSettings settings("Trolltech", "MDI Example");
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+}
+
+MdiChild *MainWindow::activeMdiChild()
+{
+ if (QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow())
+ return qobject_cast<MdiChild *>(activeSubWindow->widget());
+ return 0;
+}
+
+QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName)
+{
+ QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
+
+ foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
+ MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
+ if (mdiChild->currentFile() == canonicalFilePath)
+ return window;
+ }
+ return 0;
+}
+
+void MainWindow::switchLayoutDirection()
+{
+ if (layoutDirection() == Qt::LeftToRight)
+ qApp->setLayoutDirection(Qt::RightToLeft);
+ else
+ qApp->setLayoutDirection(Qt::LeftToRight);
+}
+
+void MainWindow::setActiveSubWindow(QWidget *window)
+{
+ if (!window)
+ return;
+ mdiArea->setActiveSubWindow(qobject_cast<QMdiSubWindow *>(window));
+}
diff --git a/examples/mainwindows/mdi/mainwindow.h b/examples/mainwindows/mdi/mainwindow.h
new file mode 100644
index 0000000..ee91d36
--- /dev/null
+++ b/examples/mainwindows/mdi/mainwindow.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class MdiChild;
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QMdiArea;
+class QMdiSubWindow;
+class QSignalMapper;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void newFile();
+ void open();
+ void save();
+ void saveAs();
+ void cut();
+ void copy();
+ void paste();
+ void about();
+ void updateMenus();
+ void updateWindowMenu();
+ MdiChild *createMdiChild();
+ void switchLayoutDirection();
+ void setActiveSubWindow(QWidget *window);
+
+private:
+ void createActions();
+ void createMenus();
+ void createToolBars();
+ void createStatusBar();
+ void readSettings();
+ void writeSettings();
+ MdiChild *activeMdiChild();
+ QMdiSubWindow *findMdiChild(const QString &fileName);
+
+ QMdiArea *mdiArea;
+ QSignalMapper *windowMapper;
+
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *windowMenu;
+ QMenu *helpMenu;
+ QToolBar *fileToolBar;
+ QToolBar *editToolBar;
+ QAction *newAct;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *cutAct;
+ QAction *copyAct;
+ QAction *pasteAct;
+ QAction *closeAct;
+ QAction *closeAllAct;
+ QAction *tileAct;
+ QAction *cascadeAct;
+ QAction *nextAct;
+ QAction *previousAct;
+ QAction *separatorAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/mainwindows/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro
new file mode 100644
index 0000000..4601f1c
--- /dev/null
+++ b/examples/mainwindows/mdi/mdi.pro
@@ -0,0 +1,12 @@
+HEADERS = mainwindow.h \
+ mdichild.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ mdichild.cpp
+RESOURCES = mdi.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mdi.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi
+INSTALLS += target sources
diff --git a/examples/mainwindows/mdi/mdi.qrc b/examples/mainwindows/mdi/mdi.qrc
new file mode 100644
index 0000000..0a776fa
--- /dev/null
+++ b/examples/mainwindows/mdi/mdi.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/copy.png</file>
+ <file>images/cut.png</file>
+ <file>images/new.png</file>
+ <file>images/open.png</file>
+ <file>images/paste.png</file>
+ <file>images/save.png</file>
+</qresource>
+</RCC>
diff --git a/examples/mainwindows/mdi/mdichild.cpp b/examples/mainwindows/mdi/mdichild.cpp
new file mode 100644
index 0000000..1433450
--- /dev/null
+++ b/examples/mainwindows/mdi/mdichild.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mdichild.h"
+
+MdiChild::MdiChild()
+{
+ setAttribute(Qt::WA_DeleteOnClose);
+ isUntitled = true;
+}
+
+void MdiChild::newFile()
+{
+ static int sequenceNumber = 1;
+
+ isUntitled = true;
+ curFile = tr("document%1.txt").arg(sequenceNumber++);
+ setWindowTitle(curFile + "[*]");
+
+ connect(document(), SIGNAL(contentsChanged()),
+ this, SLOT(documentWasModified()));
+}
+
+bool MdiChild::loadFile(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("MDI"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return false;
+ }
+
+ QTextStream in(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ setPlainText(in.readAll());
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+
+ connect(document(), SIGNAL(contentsChanged()),
+ this, SLOT(documentWasModified()));
+
+ return true;
+}
+
+bool MdiChild::save()
+{
+ if (isUntitled) {
+ return saveAs();
+ } else {
+ return saveFile(curFile);
+ }
+}
+
+bool MdiChild::saveAs()
+{
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ curFile);
+ if (fileName.isEmpty())
+ return false;
+
+ return saveFile(fileName);
+}
+
+bool MdiChild::saveFile(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("MDI"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return false;
+ }
+
+ QTextStream out(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ out << toPlainText();
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ return true;
+}
+
+QString MdiChild::userFriendlyCurrentFile()
+{
+ return strippedName(curFile);
+}
+
+void MdiChild::closeEvent(QCloseEvent *event)
+{
+ if (maybeSave()) {
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+
+void MdiChild::documentWasModified()
+{
+ setWindowModified(document()->isModified());
+}
+
+bool MdiChild::maybeSave()
+{
+ if (document()->isModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("MDI"),
+ tr("'%1' has been modified.\n"
+ "Do you want to save your changes?")
+ .arg(userFriendlyCurrentFile()),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save)
+ return save();
+ else if (ret == QMessageBox::Cancel)
+ return false;
+ }
+ return true;
+}
+
+void MdiChild::setCurrentFile(const QString &fileName)
+{
+ curFile = QFileInfo(fileName).canonicalFilePath();
+ isUntitled = false;
+ document()->setModified(false);
+ setWindowModified(false);
+ setWindowTitle(userFriendlyCurrentFile() + "[*]");
+}
+
+QString MdiChild::strippedName(const QString &fullFileName)
+{
+ return QFileInfo(fullFileName).fileName();
+}
diff --git a/examples/mainwindows/mdi/mdichild.h b/examples/mainwindows/mdi/mdichild.h
new file mode 100644
index 0000000..04084c7
--- /dev/null
+++ b/examples/mainwindows/mdi/mdichild.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MDICHILD_H
+#define MDICHILD_H
+
+#include <QTextEdit>
+
+class MdiChild : public QTextEdit
+{
+ Q_OBJECT
+
+public:
+ MdiChild();
+
+ void newFile();
+ bool loadFile(const QString &fileName);
+ bool save();
+ bool saveAs();
+ bool saveFile(const QString &fileName);
+ QString userFriendlyCurrentFile();
+ QString currentFile() { return curFile; }
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void documentWasModified();
+
+private:
+ bool maybeSave();
+ void setCurrentFile(const QString &fileName);
+ QString strippedName(const QString &fullFileName);
+
+ QString curFile;
+ bool isUntitled;
+};
+
+#endif
diff --git a/examples/mainwindows/menus/main.cpp b/examples/mainwindows/menus/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/mainwindows/menus/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
new file mode 100644
index 0000000..4c10f73
--- /dev/null
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ QWidget *widget = new QWidget;
+ setCentralWidget(widget);
+//! [0]
+
+//! [1]
+ QWidget *topFiller = new QWidget;
+ topFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+ infoLabel = new QLabel(tr("<i>Choose a menu option, or right-click to "
+ "invoke a context menu</i>"));
+ infoLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ infoLabel->setAlignment(Qt::AlignCenter);
+
+ QWidget *bottomFiller = new QWidget;
+ bottomFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setMargin(5);
+ layout->addWidget(topFiller);
+ layout->addWidget(infoLabel);
+ layout->addWidget(bottomFiller);
+ widget->setLayout(layout);
+//! [1]
+
+//! [2]
+ createActions();
+ createMenus();
+
+ QString message = tr("A context menu is available by right-clicking");
+ statusBar()->showMessage(message);
+
+ setWindowTitle(tr("Menus"));
+ setMinimumSize(160, 160);
+ resize(480, 320);
+}
+//! [2]
+
+//! [3]
+void MainWindow::contextMenuEvent(QContextMenuEvent *event)
+{
+ QMenu menu(this);
+ menu.addAction(cutAct);
+ menu.addAction(copyAct);
+ menu.addAction(pasteAct);
+ menu.exec(event->globalPos());
+}
+//! [3]
+
+void MainWindow::newFile()
+{
+ infoLabel->setText(tr("Invoked <b>File|New</b>"));
+}
+
+void MainWindow::open()
+{
+ infoLabel->setText(tr("Invoked <b>File|Open</b>"));
+}
+
+void MainWindow::save()
+{
+ infoLabel->setText(tr("Invoked <b>File|Save</b>"));
+}
+
+void MainWindow::print()
+{
+ infoLabel->setText(tr("Invoked <b>File|Print</b>"));
+}
+
+void MainWindow::undo()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Undo</b>"));
+}
+
+void MainWindow::redo()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Redo</b>"));
+}
+
+void MainWindow::cut()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Cut</b>"));
+}
+
+void MainWindow::copy()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Copy</b>"));
+}
+
+void MainWindow::paste()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Paste</b>"));
+}
+
+void MainWindow::bold()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Bold</b>"));
+}
+
+void MainWindow::italic()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Italic</b>"));
+}
+
+void MainWindow::leftAlign()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Left Align</b>"));
+}
+
+void MainWindow::rightAlign()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Right Align</b>"));
+}
+
+void MainWindow::justify()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Justify</b>"));
+}
+
+void MainWindow::center()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Center</b>"));
+}
+
+void MainWindow::setLineSpacing()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Set Line Spacing</b>"));
+}
+
+void MainWindow::setParagraphSpacing()
+{
+ infoLabel->setText(tr("Invoked <b>Edit|Format|Set Paragraph Spacing</b>"));
+}
+
+void MainWindow::about()
+{
+ infoLabel->setText(tr("Invoked <b>Help|About</b>"));
+ QMessageBox::about(this, tr("About Menu"),
+ tr("The <b>Menu</b> example shows how to create "
+ "menu-bar menus and context menus."));
+}
+
+void MainWindow::aboutQt()
+{
+ infoLabel->setText(tr("Invoked <b>Help|About Qt</b>"));
+}
+
+//! [4]
+void MainWindow::createActions()
+{
+//! [5]
+ newAct = new QAction(tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+//! [4]
+
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+//! [5]
+
+ saveAct = new QAction(tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ printAct = new QAction(tr("&Print..."), this);
+ printAct->setShortcuts(QKeySequence::Print);
+ printAct->setStatusTip(tr("Print the document"));
+ connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ undoAct = new QAction(tr("&Undo"), this);
+ undoAct->setShortcuts(QKeySequence::Undo);
+ undoAct->setStatusTip(tr("Undo the last operation"));
+ connect(undoAct, SIGNAL(triggered()), this, SLOT(undo()));
+
+ redoAct = new QAction(tr("&Redo"), this);
+ redoAct->setShortcuts(QKeySequence::Redo);
+ redoAct->setStatusTip(tr("Redo the last operation"));
+ connect(redoAct, SIGNAL(triggered()), this, SLOT(redo()));
+
+ cutAct = new QAction(tr("Cu&t"), this);
+ cutAct->setShortcuts(QKeySequence::Cut);
+ cutAct->setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"));
+ connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
+
+ copyAct = new QAction(tr("&Copy"), this);
+ copyAct->setShortcut(tr("Ctrl+C"));
+ copyAct->setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"));
+ connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
+
+ pasteAct = new QAction(tr("&Paste"), this);
+ pasteAct->setShortcuts(QKeySequence::Paste);
+ pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"));
+ connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste()));
+
+ boldAct = new QAction(tr("&Bold"), this);
+ boldAct->setCheckable(true);
+ boldAct->setShortcut(tr("Ctrl+B"));
+ boldAct->setStatusTip(tr("Make the text bold"));
+ connect(boldAct, SIGNAL(triggered()), this, SLOT(bold()));
+
+ QFont boldFont = boldAct->font();
+ boldFont.setBold(true);
+ boldAct->setFont(boldFont);
+
+ italicAct = new QAction(tr("&Italic"), this);
+ italicAct->setCheckable(true);
+ italicAct->setShortcut(tr("Ctrl+I"));
+ italicAct->setStatusTip(tr("Make the text italic"));
+ connect(italicAct, SIGNAL(triggered()), this, SLOT(italic()));
+
+ QFont italicFont = italicAct->font();
+ italicFont.setItalic(true);
+ italicAct->setFont(italicFont);
+
+ setLineSpacingAct = new QAction(tr("Set &Line Spacing..."), this);
+ setLineSpacingAct->setStatusTip(tr("Change the gap between the lines of a "
+ "paragraph"));
+ connect(setLineSpacingAct, SIGNAL(triggered()), this, SLOT(setLineSpacing()));
+
+ setParagraphSpacingAct = new QAction(tr("Set &Paragraph Spacing..."), this);
+ setLineSpacingAct->setStatusTip(tr("Change the gap between paragraphs"));
+ connect(setParagraphSpacingAct, SIGNAL(triggered()),
+ this, SLOT(setParagraphSpacing()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(aboutQtAct, SIGNAL(triggered()), this, SLOT(aboutQt()));
+
+ leftAlignAct = new QAction(tr("&Left Align"), this);
+ leftAlignAct->setCheckable(true);
+ leftAlignAct->setShortcut(tr("Ctrl+L"));
+ leftAlignAct->setStatusTip(tr("Left align the selected text"));
+ connect(leftAlignAct, SIGNAL(triggered()), this, SLOT(leftAlign()));
+
+ rightAlignAct = new QAction(tr("&Right Align"), this);
+ rightAlignAct->setCheckable(true);
+ rightAlignAct->setShortcut(tr("Ctrl+R"));
+ rightAlignAct->setStatusTip(tr("Right align the selected text"));
+ connect(rightAlignAct, SIGNAL(triggered()), this, SLOT(rightAlign()));
+
+ justifyAct = new QAction(tr("&Justify"), this);
+ justifyAct->setCheckable(true);
+ justifyAct->setShortcut(tr("Ctrl+J"));
+ justifyAct->setStatusTip(tr("Justify the selected text"));
+ connect(justifyAct, SIGNAL(triggered()), this, SLOT(justify()));
+
+ centerAct = new QAction(tr("&Center"), this);
+ centerAct->setCheckable(true);
+ centerAct->setShortcut(tr("Ctrl+E"));
+ centerAct->setStatusTip(tr("Center the selected text"));
+ connect(centerAct, SIGNAL(triggered()), this, SLOT(center()));
+
+//! [6] //! [7]
+ alignmentGroup = new QActionGroup(this);
+ alignmentGroup->addAction(leftAlignAct);
+ alignmentGroup->addAction(rightAlignAct);
+ alignmentGroup->addAction(justifyAct);
+ alignmentGroup->addAction(centerAct);
+ leftAlignAct->setChecked(true);
+//! [6]
+}
+//! [7]
+
+//! [8]
+void MainWindow::createMenus()
+{
+//! [9] //! [10]
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newAct);
+//! [9]
+ fileMenu->addAction(openAct);
+//! [10]
+ fileMenu->addAction(saveAct);
+ fileMenu->addAction(printAct);
+//! [11]
+ fileMenu->addSeparator();
+//! [11]
+ fileMenu->addAction(exitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(undoAct);
+ editMenu->addAction(redoAct);
+ editMenu->addSeparator();
+ editMenu->addAction(cutAct);
+ editMenu->addAction(copyAct);
+ editMenu->addAction(pasteAct);
+ editMenu->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+//! [8]
+
+//! [12]
+ formatMenu = editMenu->addMenu(tr("&Format"));
+ formatMenu->addAction(boldAct);
+ formatMenu->addAction(italicAct);
+ formatMenu->addSeparator()->setText(tr("Alignment"));
+ formatMenu->addAction(leftAlignAct);
+ formatMenu->addAction(rightAlignAct);
+ formatMenu->addAction(justifyAct);
+ formatMenu->addAction(centerAct);
+ formatMenu->addSeparator();
+ formatMenu->addAction(setLineSpacingAct);
+ formatMenu->addAction(setParagraphSpacingAct);
+}
+//! [12]
diff --git a/examples/mainwindows/menus/mainwindow.h b/examples/mainwindows/menus/mainwindow.h
new file mode 100644
index 0000000..4894a9a
--- /dev/null
+++ b/examples/mainwindows/menus/mainwindow.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QActionGroup;
+class QLabel;
+class QMenu;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+protected:
+ void contextMenuEvent(QContextMenuEvent *event);
+//! [0]
+
+//! [1]
+private slots:
+ void newFile();
+ void open();
+ void save();
+ void print();
+ void undo();
+ void redo();
+ void cut();
+ void copy();
+ void paste();
+ void bold();
+ void italic();
+ void leftAlign();
+ void rightAlign();
+ void justify();
+ void center();
+ void setLineSpacing();
+ void setParagraphSpacing();
+ void about();
+ void aboutQt();
+//! [1]
+
+//! [2]
+private:
+ void createActions();
+ void createMenus();
+//! [2]
+
+//! [3]
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *formatMenu;
+ QMenu *helpMenu;
+ QActionGroup *alignmentGroup;
+ QAction *newAct;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *printAct;
+ QAction *exitAct;
+ QAction *undoAct;
+ QAction *redoAct;
+ QAction *cutAct;
+ QAction *copyAct;
+ QAction *pasteAct;
+ QAction *boldAct;
+ QAction *italicAct;
+ QAction *leftAlignAct;
+ QAction *rightAlignAct;
+ QAction *justifyAct;
+ QAction *centerAct;
+ QAction *setLineSpacingAct;
+ QAction *setParagraphSpacingAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+ QLabel *infoLabel;
+};
+//! [3]
+
+#endif
diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro
new file mode 100644
index 0000000..7b0a2ec
--- /dev/null
+++ b/examples/mainwindows/menus/menus.pro
@@ -0,0 +1,9 @@
+HEADERS = mainwindow.h
+SOURCES = mainwindow.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/menus
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/menus
+INSTALLS += target sources
diff --git a/examples/mainwindows/recentfiles/main.cpp b/examples/mainwindows/recentfiles/main.cpp
new file mode 100644
index 0000000..d1c8eb0
--- /dev/null
+++ b/examples/mainwindows/recentfiles/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *mainWin = new MainWindow;
+ mainWin->show();
+ return app.exec();
+}
diff --git a/examples/mainwindows/recentfiles/mainwindow.cpp b/examples/mainwindows/recentfiles/mainwindow.cpp
new file mode 100644
index 0000000..c8c2f88
--- /dev/null
+++ b/examples/mainwindows/recentfiles/mainwindow.cpp
@@ -0,0 +1,256 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ setAttribute(Qt::WA_DeleteOnClose);
+
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ createActions();
+ createMenus();
+ (void)statusBar();
+
+ setWindowTitle(tr("Recent Files"));
+ resize(400, 300);
+}
+
+void MainWindow::newFile()
+{
+ MainWindow *other = new MainWindow;
+ other->show();
+}
+
+void MainWindow::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty())
+ loadFile(fileName);
+}
+
+void MainWindow::save()
+{
+ if (curFile.isEmpty())
+ saveAs();
+ else
+ saveFile(curFile);
+}
+
+void MainWindow::saveAs()
+{
+ QString fileName = QFileDialog::getSaveFileName(this);
+ if (fileName.isEmpty())
+ return;
+
+ saveFile(fileName);
+}
+
+void MainWindow::openRecentFile()
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ if (action)
+ loadFile(action->data().toString());
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Recent Files"),
+ tr("The <b>Recent Files</b> example demonstrates how to provide a "
+ "recently used file menu in a Qt application."));
+}
+
+void MainWindow::createActions()
+{
+ newAct = new QAction(tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAct = new QAction(tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ saveAsAct = new QAction(tr("Save &As..."), this);
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
+ saveAsAct->setStatusTip(tr("Save the document under a new name"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ for (int i = 0; i < MaxRecentFiles; ++i) {
+ recentFileActs[i] = new QAction(this);
+ recentFileActs[i]->setVisible(false);
+ connect(recentFileActs[i], SIGNAL(triggered()),
+ this, SLOT(openRecentFile()));
+ }
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newAct);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAct);
+ fileMenu->addAction(saveAsAct);
+ separatorAct = fileMenu->addSeparator();
+ for (int i = 0; i < MaxRecentFiles; ++i)
+ fileMenu->addAction(recentFileActs[i]);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+ updateRecentFileActions();
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::loadFile(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Recent Files"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream in(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ textEdit->setPlainText(in.readAll());
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+
+void MainWindow::saveFile(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Recent Files"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream out(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ out << textEdit->toPlainText();
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+
+void MainWindow::setCurrentFile(const QString &fileName)
+{
+ curFile = fileName;
+ if (curFile.isEmpty())
+ setWindowTitle(tr("Recent Files"));
+ else
+ setWindowTitle(tr("%1 - %2").arg(strippedName(curFile))
+ .arg(tr("Recent Files")));
+
+ QSettings settings("Trolltech", "Recent Files Example");
+ QStringList files = settings.value("recentFileList").toStringList();
+ files.removeAll(fileName);
+ files.prepend(fileName);
+ while (files.size() > MaxRecentFiles)
+ files.removeLast();
+
+ settings.setValue("recentFileList", files);
+
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ MainWindow *mainWin = qobject_cast<MainWindow *>(widget);
+ if (mainWin)
+ mainWin->updateRecentFileActions();
+ }
+}
+
+void MainWindow::updateRecentFileActions()
+{
+ QSettings settings("Trolltech", "Recent Files Example");
+ QStringList files = settings.value("recentFileList").toStringList();
+
+ int numRecentFiles = qMin(files.size(), (int)MaxRecentFiles);
+
+ for (int i = 0; i < numRecentFiles; ++i) {
+ QString text = tr("&%1 %2").arg(i + 1).arg(strippedName(files[i]));
+ recentFileActs[i]->setText(text);
+ recentFileActs[i]->setData(files[i]);
+ recentFileActs[i]->setVisible(true);
+ }
+ for (int j = numRecentFiles; j < MaxRecentFiles; ++j)
+ recentFileActs[j]->setVisible(false);
+
+ separatorAct->setVisible(numRecentFiles > 0);
+}
+
+QString MainWindow::strippedName(const QString &fullFileName)
+{
+ return QFileInfo(fullFileName).fileName();
+}
diff --git a/examples/mainwindows/recentfiles/mainwindow.h b/examples/mainwindows/recentfiles/mainwindow.h
new file mode 100644
index 0000000..9d9d467
--- /dev/null
+++ b/examples/mainwindows/recentfiles/mainwindow.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void newFile();
+ void open();
+ void save();
+ void saveAs();
+ void openRecentFile();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ void loadFile(const QString &fileName);
+ void saveFile(const QString &fileName);
+ void setCurrentFile(const QString &fileName);
+ void updateRecentFileActions();
+ QString strippedName(const QString &fullFileName);
+
+ QString curFile;
+
+ QTextEdit *textEdit;
+ QMenu *fileMenu;
+ QMenu *recentFilesMenu;
+ QMenu *helpMenu;
+ QAction *newAct;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+ QAction *separatorAct;
+
+ enum { MaxRecentFiles = 5 };
+ QAction *recentFileActs[MaxRecentFiles];
+};
+
+#endif
diff --git a/examples/mainwindows/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro
new file mode 100644
index 0000000..7c62cdf
--- /dev/null
+++ b/examples/mainwindows/recentfiles/recentfiles.pro
@@ -0,0 +1,9 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/recentfiles
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS recentfiles.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/recentfiles
+INSTALLS += target sources
diff --git a/examples/mainwindows/sdi/images/copy.png b/examples/mainwindows/sdi/images/copy.png
new file mode 100644
index 0000000..2aeb282
--- /dev/null
+++ b/examples/mainwindows/sdi/images/copy.png
Binary files differ
diff --git a/examples/mainwindows/sdi/images/cut.png b/examples/mainwindows/sdi/images/cut.png
new file mode 100644
index 0000000..54638e9
--- /dev/null
+++ b/examples/mainwindows/sdi/images/cut.png
Binary files differ
diff --git a/examples/mainwindows/sdi/images/new.png b/examples/mainwindows/sdi/images/new.png
new file mode 100644
index 0000000..12131b0
--- /dev/null
+++ b/examples/mainwindows/sdi/images/new.png
Binary files differ
diff --git a/examples/mainwindows/sdi/images/open.png b/examples/mainwindows/sdi/images/open.png
new file mode 100644
index 0000000..45fa288
--- /dev/null
+++ b/examples/mainwindows/sdi/images/open.png
Binary files differ
diff --git a/examples/mainwindows/sdi/images/paste.png b/examples/mainwindows/sdi/images/paste.png
new file mode 100644
index 0000000..c14425c
--- /dev/null
+++ b/examples/mainwindows/sdi/images/paste.png
Binary files differ
diff --git a/examples/mainwindows/sdi/images/save.png b/examples/mainwindows/sdi/images/save.png
new file mode 100644
index 0000000..daba865
--- /dev/null
+++ b/examples/mainwindows/sdi/images/save.png
Binary files differ
diff --git a/examples/mainwindows/sdi/main.cpp b/examples/mainwindows/sdi/main.cpp
new file mode 100644
index 0000000..163ad93
--- /dev/null
+++ b/examples/mainwindows/sdi/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(sdi);
+ QApplication app(argc, argv);
+ MainWindow *mainWin = new MainWindow;
+ mainWin->show();
+ return app.exec();
+}
diff --git a/examples/mainwindows/sdi/mainwindow.cpp b/examples/mainwindows/sdi/mainwindow.cpp
new file mode 100644
index 0000000..61d63b3
--- /dev/null
+++ b/examples/mainwindows/sdi/mainwindow.cpp
@@ -0,0 +1,375 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ init();
+ setCurrentFile("");
+}
+
+MainWindow::MainWindow(const QString &fileName)
+{
+ init();
+ loadFile(fileName);
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ if (maybeSave()) {
+ writeSettings();
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+
+void MainWindow::newFile()
+{
+ MainWindow *other = new MainWindow;
+ other->move(x() + 40, y() + 40);
+ other->show();
+}
+
+void MainWindow::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty()) {
+ MainWindow *existing = findMainWindow(fileName);
+ if (existing) {
+ existing->show();
+ existing->raise();
+ existing->activateWindow();
+ return;
+ }
+
+ if (isUntitled && textEdit->document()->isEmpty()
+ && !isWindowModified()) {
+ loadFile(fileName);
+ } else {
+ MainWindow *other = new MainWindow(fileName);
+ if (other->isUntitled) {
+ delete other;
+ return;
+ }
+ other->move(x() + 40, y() + 40);
+ other->show();
+ }
+ }
+}
+
+bool MainWindow::save()
+{
+ if (isUntitled) {
+ return saveAs();
+ } else {
+ return saveFile(curFile);
+ }
+}
+
+bool MainWindow::saveAs()
+{
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ curFile);
+ if (fileName.isEmpty())
+ return false;
+
+ return saveFile(fileName);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About SDI"),
+ tr("The <b>SDI</b> example demonstrates how to write single "
+ "document interface applications using Qt."));
+}
+
+void MainWindow::documentWasModified()
+{
+ setWindowModified(true);
+}
+
+void MainWindow::init()
+{
+ setAttribute(Qt::WA_DeleteOnClose);
+
+ isUntitled = true;
+
+ textEdit = new QTextEdit;
+ setCentralWidget(textEdit);
+
+ createActions();
+ createMenus();
+ createToolBars();
+ createStatusBar();
+
+ readSettings();
+
+ connect(textEdit->document(), SIGNAL(contentsChanged()),
+ this, SLOT(documentWasModified()));
+
+ setUnifiedTitleAndToolBarOnMac(true);
+}
+
+void MainWindow::createActions()
+{
+ newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
+ newAct->setShortcuts(QKeySequence::New);
+ newAct->setStatusTip(tr("Create a new file"));
+ connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
+
+ openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
+ openAct->setShortcuts(QKeySequence::Open);
+ openAct->setStatusTip(tr("Open an existing file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this);
+ saveAct->setShortcuts(QKeySequence::Save);
+ saveAct->setStatusTip(tr("Save the document to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ saveAsAct = new QAction(tr("Save &As..."), this);
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
+ saveAsAct->setStatusTip(tr("Save the document under a new name"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ closeAct = new QAction(tr("&Close"), this);
+ closeAct->setShortcut(tr("Ctrl+W"));
+ closeAct->setStatusTip(tr("Close this window"));
+ connect(closeAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setStatusTip(tr("Exit the application"));
+ connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
+
+ cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
+ cutAct->setShortcuts(QKeySequence::Cut);
+ cutAct->setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"));
+ connect(cutAct, SIGNAL(triggered()), textEdit, SLOT(cut()));
+
+ copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this);
+ copyAct->setShortcuts(QKeySequence::Copy);
+ copyAct->setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"));
+ connect(copyAct, SIGNAL(triggered()), textEdit, SLOT(copy()));
+
+ pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this);
+ pasteAct->setShortcuts(QKeySequence::Paste);
+ pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"));
+ connect(pasteAct, SIGNAL(triggered()), textEdit, SLOT(paste()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+
+ cutAct->setEnabled(false);
+ copyAct->setEnabled(false);
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ cutAct, SLOT(setEnabled(bool)));
+ connect(textEdit, SIGNAL(copyAvailable(bool)),
+ copyAct, SLOT(setEnabled(bool)));
+}
+
+//! [implicit tr context]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+//! [implicit tr context]
+ fileMenu->addAction(newAct);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(closeAct);
+ fileMenu->addAction(exitAct);
+
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(cutAct);
+ editMenu->addAction(copyAct);
+ editMenu->addAction(pasteAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::createToolBars()
+{
+//! [0]
+ fileToolBar = addToolBar(tr("File"));
+ fileToolBar->addAction(newAct);
+ fileToolBar->addAction(openAct);
+//! [0]
+ fileToolBar->addAction(saveAct);
+
+ editToolBar = addToolBar(tr("Edit"));
+ editToolBar->addAction(cutAct);
+ editToolBar->addAction(copyAct);
+ editToolBar->addAction(pasteAct);
+}
+
+void MainWindow::createStatusBar()
+{
+ statusBar()->showMessage(tr("Ready"));
+}
+
+void MainWindow::readSettings()
+{
+ QSettings settings("Trolltech", "SDI Example");
+ QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
+ QSize size = settings.value("size", QSize(400, 400)).toSize();
+ move(pos);
+ resize(size);
+}
+
+void MainWindow::writeSettings()
+{
+ QSettings settings("Trolltech", "SDI Example");
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+}
+
+bool MainWindow::maybeSave()
+{
+ if (textEdit->document()->isModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("SDI"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save)
+ return save();
+ else if (ret == QMessageBox::Cancel)
+ return false;
+ }
+ return true;
+}
+
+void MainWindow::loadFile(const QString &fileName)
+{
+
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SDI"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream in(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ textEdit->setPlainText(in.readAll());
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+
+bool MainWindow::saveFile(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SDI"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return false;
+ }
+
+ QTextStream out(&file);
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ out << textEdit->toPlainText();
+ QApplication::restoreOverrideCursor();
+
+ setCurrentFile(fileName);
+ statusBar()->showMessage(tr("File saved"), 2000);
+ return true;
+}
+
+void MainWindow::setCurrentFile(const QString &fileName)
+{
+ static int sequenceNumber = 1;
+
+ isUntitled = fileName.isEmpty();
+ if (isUntitled) {
+ curFile = tr("document%1.txt").arg(sequenceNumber++);
+ } else {
+ curFile = QFileInfo(fileName).canonicalFilePath();
+ }
+
+ textEdit->document()->setModified(false);
+ setWindowModified(false);
+
+ setWindowTitle(tr("%1[*] - %2").arg(strippedName(curFile))
+ .arg(tr("SDI")));
+}
+
+QString MainWindow::strippedName(const QString &fullFileName)
+{
+ return QFileInfo(fullFileName).fileName();
+}
+
+MainWindow *MainWindow::findMainWindow(const QString &fileName)
+{
+ QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
+
+ foreach (QWidget *widget, qApp->topLevelWidgets()) {
+ MainWindow *mainWin = qobject_cast<MainWindow *>(widget);
+ if (mainWin && mainWin->curFile == canonicalFilePath)
+ return mainWin;
+ }
+ return 0;
+}
diff --git a/examples/mainwindows/sdi/mainwindow.h b/examples/mainwindows/sdi/mainwindow.h
new file mode 100644
index 0000000..f08cee2
--- /dev/null
+++ b/examples/mainwindows/sdi/mainwindow.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+ MainWindow(const QString &fileName);
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void newFile();
+ void open();
+ bool save();
+ bool saveAs();
+ void about();
+ void documentWasModified();
+
+private:
+ void init();
+ void createActions();
+ void createMenus();
+ void createToolBars();
+ void createStatusBar();
+ void readSettings();
+ void writeSettings();
+ bool maybeSave();
+ void loadFile(const QString &fileName);
+ bool saveFile(const QString &fileName);
+ void setCurrentFile(const QString &fileName);
+ QString strippedName(const QString &fullFileName);
+ MainWindow *findMainWindow(const QString &fileName);
+
+ QTextEdit *textEdit;
+ QString curFile;
+ bool isUntitled;
+
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *helpMenu;
+ QToolBar *fileToolBar;
+ QToolBar *editToolBar;
+ QAction *newAct;
+ QAction *openAct;
+ QAction *saveAct;
+ QAction *saveAsAct;
+ QAction *closeAct;
+ QAction *exitAct;
+ QAction *cutAct;
+ QAction *copyAct;
+ QAction *pasteAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro
new file mode 100644
index 0000000..3283334
--- /dev/null
+++ b/examples/mainwindows/sdi/sdi.pro
@@ -0,0 +1,10 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+RESOURCES = sdi.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/sdi
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS sdi.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/sdi
+INSTALLS += target sources
diff --git a/examples/mainwindows/sdi/sdi.qrc b/examples/mainwindows/sdi/sdi.qrc
new file mode 100644
index 0000000..0a776fa
--- /dev/null
+++ b/examples/mainwindows/sdi/sdi.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/copy.png</file>
+ <file>images/cut.png</file>
+ <file>images/new.png</file>
+ <file>images/open.png</file>
+ <file>images/paste.png</file>
+ <file>images/save.png</file>
+</qresource>
+</RCC>
diff --git a/examples/network/README b/examples/network/README
new file mode 100644
index 0000000..23721df
--- /dev/null
+++ b/examples/network/README
@@ -0,0 +1,40 @@
+Qt is provided with an extensive set of network classes to support both
+client-based and server side network programming.
+
+These examples demonstrate the fundamental aspects of network programming
+with Qt.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp
new file mode 100644
index 0000000..207ff5f
--- /dev/null
+++ b/examples/network/blockingfortuneclient/blockingclient.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "blockingclient.h"
+
+BlockingClient::BlockingClient(QWidget *parent)
+ : QDialog(parent)
+{
+ hostLabel = new QLabel(tr("&Server name:"));
+ portLabel = new QLabel(tr("S&erver port:"));
+
+ hostLineEdit = new QLineEdit("Localhost");
+ portLineEdit = new QLineEdit;
+ portLineEdit->setValidator(new QIntValidator(1, 65535, this));
+
+ hostLabel->setBuddy(hostLineEdit);
+ portLabel->setBuddy(portLineEdit);
+
+ statusLabel = new QLabel(tr("This examples requires that you run the "
+ "Fortune Server example as well."));
+
+ getFortuneButton = new QPushButton(tr("Get Fortune"));
+ getFortuneButton->setDefault(true);
+ getFortuneButton->setEnabled(false);
+
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ connect(hostLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableGetFortuneButton()));
+ connect(portLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableGetFortuneButton()));
+ connect(getFortuneButton, SIGNAL(clicked()),
+ this, SLOT(requestNewFortune()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+//! [0]
+ connect(&thread, SIGNAL(newFortune(const QString &)),
+ this, SLOT(showFortune(const QString &)));
+//! [0] //! [1]
+ connect(&thread, SIGNAL(error(int, const QString &)),
+ this, SLOT(displayError(int, const QString &)));
+//! [1]
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(hostLabel, 0, 0);
+ mainLayout->addWidget(hostLineEdit, 0, 1);
+ mainLayout->addWidget(portLabel, 1, 0);
+ mainLayout->addWidget(portLineEdit, 1, 1);
+ mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
+ mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Blocking Fortune Client"));
+ portLineEdit->setFocus();
+}
+
+//! [2]
+void BlockingClient::requestNewFortune()
+{
+ getFortuneButton->setEnabled(false);
+ thread.requestNewFortune(hostLineEdit->text(),
+ portLineEdit->text().toInt());
+}
+//! [2]
+
+//! [3]
+void BlockingClient::showFortune(const QString &nextFortune)
+{
+ if (nextFortune == currentFortune) {
+ requestNewFortune();
+ return;
+ }
+//! [3]
+
+//! [4]
+ currentFortune = nextFortune;
+ statusLabel->setText(currentFortune);
+ getFortuneButton->setEnabled(true);
+}
+//! [4]
+
+void BlockingClient::displayError(int socketError, const QString &message)
+{
+ switch (socketError) {
+ case QAbstractSocket::HostNotFoundError:
+ QMessageBox::information(this, tr("Blocking Fortune Client"),
+ tr("The host was not found. Please check the "
+ "host and port settings."));
+ break;
+ case QAbstractSocket::ConnectionRefusedError:
+ QMessageBox::information(this, tr("Blocking Fortune Client"),
+ tr("The connection was refused by the peer. "
+ "Make sure the fortune server is running, "
+ "and check that the host name and port "
+ "settings are correct."));
+ break;
+ default:
+ QMessageBox::information(this, tr("Blocking Fortune Client"),
+ tr("The following error occurred: %1.")
+ .arg(message));
+ }
+
+ getFortuneButton->setEnabled(true);
+}
+
+void BlockingClient::enableGetFortuneButton()
+{
+ getFortuneButton->setEnabled(!hostLineEdit->text().isEmpty()
+ && !portLineEdit->text().isEmpty());
+}
diff --git a/examples/network/blockingfortuneclient/blockingclient.h b/examples/network/blockingfortuneclient/blockingclient.h
new file mode 100644
index 0000000..2bc0b80
--- /dev/null
+++ b/examples/network/blockingfortuneclient/blockingclient.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BLOCKINGCLIENT_H
+#define BLOCKINGCLIENT_H
+
+#include <QDialog>
+
+#include "fortunethread.h"
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+//! [0]
+class BlockingClient : public QDialog
+{
+ Q_OBJECT
+
+public:
+ BlockingClient(QWidget *parent = 0);
+
+private slots:
+ void requestNewFortune();
+ void showFortune(const QString &fortune);
+ void displayError(int socketError, const QString &message);
+ void enableGetFortuneButton();
+
+private:
+ QLabel *hostLabel;
+ QLabel *portLabel;
+ QLineEdit *hostLineEdit;
+ QLineEdit *portLineEdit;
+ QLabel *statusLabel;
+ QPushButton *getFortuneButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+
+ FortuneThread thread;
+ QString currentFortune;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.pro b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
new file mode 100644
index 0000000..fa146fa
--- /dev/null
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
@@ -0,0 +1,12 @@
+HEADERS = blockingclient.h \
+ fortunethread.h
+SOURCES = blockingclient.cpp \
+ main.cpp \
+ fortunethread.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/blockingfortuneclient
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blockingfortuneclient.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/blockingfortuneclient
+INSTALLS += target sources
diff --git a/examples/network/blockingfortuneclient/fortunethread.cpp b/examples/network/blockingfortuneclient/fortunethread.cpp
new file mode 100644
index 0000000..af1c612
--- /dev/null
+++ b/examples/network/blockingfortuneclient/fortunethread.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtNetwork>
+
+#include "fortunethread.h"
+
+FortuneThread::FortuneThread(QObject *parent)
+ : QThread(parent), quit(false)
+{
+}
+
+//! [0]
+FortuneThread::~FortuneThread()
+{
+ mutex.lock();
+ quit = true;
+ cond.wakeOne();
+ mutex.unlock();
+ wait();
+}
+//! [0]
+
+//! [1] //! [2]
+void FortuneThread::requestNewFortune(const QString &hostName, quint16 port)
+{
+//! [1]
+ QMutexLocker locker(&mutex);
+ this->hostName = hostName;
+ this->port = port;
+//! [3]
+ if (!isRunning())
+ start();
+ else
+ cond.wakeOne();
+}
+//! [2] //! [3]
+
+//! [4]
+void FortuneThread::run()
+{
+ mutex.lock();
+//! [4] //! [5]
+ QString serverName = hostName;
+ quint16 serverPort = port;
+ mutex.unlock();
+//! [5]
+
+//! [6]
+ while (!quit) {
+//! [7]
+ const int Timeout = 5 * 1000;
+
+ QTcpSocket socket;
+ socket.connectToHost(serverName, serverPort);
+//! [6] //! [8]
+
+ if (!socket.waitForConnected(Timeout)) {
+ emit error(socket.error(), socket.errorString());
+ return;
+ }
+//! [8] //! [9]
+
+ while (socket.bytesAvailable() < (int)sizeof(quint16)) {
+ if (!socket.waitForReadyRead(Timeout)) {
+ emit error(socket.error(), socket.errorString());
+ return;
+ }
+//! [9] //! [10]
+ }
+//! [10] //! [11]
+
+ quint16 blockSize;
+ QDataStream in(&socket);
+ in.setVersion(QDataStream::Qt_4_0);
+ in >> blockSize;
+//! [11] //! [12]
+
+ while (socket.bytesAvailable() < blockSize) {
+ if (!socket.waitForReadyRead(Timeout)) {
+ emit error(socket.error(), socket.errorString());
+ return;
+ }
+//! [12] //! [13]
+ }
+//! [13] //! [14]
+
+ mutex.lock();
+ QString fortune;
+ in >> fortune;
+ emit newFortune(fortune);
+//! [7] //! [14] //! [15]
+
+ cond.wait(&mutex);
+ serverName = hostName;
+ serverPort = port;
+ mutex.unlock();
+ }
+//! [15]
+}
diff --git a/examples/network/blockingfortuneclient/fortunethread.h b/examples/network/blockingfortuneclient/fortunethread.h
new file mode 100644
index 0000000..c2fbe6f
--- /dev/null
+++ b/examples/network/blockingfortuneclient/fortunethread.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FORTUNETHREAD_H
+#define FORTUNETHREAD_H
+
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
+
+//! [0]
+class FortuneThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ FortuneThread(QObject *parent = 0);
+ ~FortuneThread();
+
+ void requestNewFortune(const QString &hostName, quint16 port);
+ void run();
+
+signals:
+ void newFortune(const QString &fortune);
+ void error(int socketError, const QString &message);
+
+private:
+ QString hostName;
+ quint16 port;
+ QMutex mutex;
+ QWaitCondition cond;
+ bool quit;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/blockingfortuneclient/main.cpp b/examples/network/blockingfortuneclient/main.cpp
new file mode 100644
index 0000000..98982c1
--- /dev/null
+++ b/examples/network/blockingfortuneclient/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "blockingclient.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ BlockingClient client;
+ client.show();
+ return client.exec();
+}
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro
new file mode 100644
index 0000000..ad04e2c
--- /dev/null
+++ b/examples/network/broadcastreceiver/broadcastreceiver.pro
@@ -0,0 +1,10 @@
+HEADERS = receiver.h
+SOURCES = receiver.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastreceiver
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastreceiver.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastreceiver
+INSTALLS += target sources
diff --git a/examples/network/broadcastreceiver/main.cpp b/examples/network/broadcastreceiver/main.cpp
new file mode 100644
index 0000000..f815729
--- /dev/null
+++ b/examples/network/broadcastreceiver/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "receiver.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Receiver receiver;
+ receiver.show();
+ return receiver.exec();
+}
diff --git a/examples/network/broadcastreceiver/receiver.cpp b/examples/network/broadcastreceiver/receiver.cpp
new file mode 100644
index 0000000..ea9ab14
--- /dev/null
+++ b/examples/network/broadcastreceiver/receiver.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "receiver.h"
+
+Receiver::Receiver(QWidget *parent)
+ : QDialog(parent)
+{
+ statusLabel = new QLabel(tr("Listening for broadcasted messages"));
+ quitButton = new QPushButton(tr("&Quit"));
+
+//! [0]
+ udpSocket = new QUdpSocket(this);
+ udpSocket->bind(45454);
+//! [0]
+
+//! [1]
+ connect(udpSocket, SIGNAL(readyRead()),
+ this, SLOT(processPendingDatagrams()));
+//! [1]
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addStretch(1);
+ buttonLayout->addWidget(quitButton);
+ buttonLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addLayout(buttonLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Broadcast Receiver"));
+}
+
+void Receiver::processPendingDatagrams()
+{
+//! [2]
+ while (udpSocket->hasPendingDatagrams()) {
+ QByteArray datagram;
+ datagram.resize(udpSocket->pendingDatagramSize());
+ udpSocket->readDatagram(datagram.data(), datagram.size());
+ statusLabel->setText(tr("Received datagram: \"%1\"")
+ .arg(datagram.data()));
+ }
+//! [2]
+}
diff --git a/examples/network/broadcastreceiver/receiver.h b/examples/network/broadcastreceiver/receiver.h
new file mode 100644
index 0000000..9939cbe
--- /dev/null
+++ b/examples/network/broadcastreceiver/receiver.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RECEIVER_H
+#define RECEIVER_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QUdpSocket;
+QT_END_NAMESPACE
+
+class Receiver : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Receiver(QWidget *parent = 0);
+
+private slots:
+ void processPendingDatagrams();
+
+private:
+ QLabel *statusLabel;
+ QPushButton *quitButton;
+ QUdpSocket *udpSocket;
+};
+
+#endif
diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro
new file mode 100644
index 0000000..b300a50
--- /dev/null
+++ b/examples/network/broadcastsender/broadcastsender.pro
@@ -0,0 +1,10 @@
+HEADERS = sender.h
+SOURCES = sender.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastsender
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastsender.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/broadcastsender
+INSTALLS += target sources
diff --git a/examples/network/broadcastsender/main.cpp b/examples/network/broadcastsender/main.cpp
new file mode 100644
index 0000000..85613c5
--- /dev/null
+++ b/examples/network/broadcastsender/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "sender.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Sender sender;
+ sender.show();
+ return sender.exec();
+}
diff --git a/examples/network/broadcastsender/sender.cpp b/examples/network/broadcastsender/sender.cpp
new file mode 100644
index 0000000..a74beae
--- /dev/null
+++ b/examples/network/broadcastsender/sender.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "sender.h"
+
+Sender::Sender(QWidget *parent)
+ : QDialog(parent)
+{
+ statusLabel = new QLabel(tr("Ready to broadcast datagrams on port 45454"));
+
+ startButton = new QPushButton(tr("&Start"));
+ quitButton = new QPushButton(tr("&Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(startButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ timer = new QTimer(this);
+//! [0]
+ udpSocket = new QUdpSocket(this);
+//! [0]
+ messageNo = 1;
+
+ connect(startButton, SIGNAL(clicked()), this, SLOT(startBroadcasting()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(timer, SIGNAL(timeout()), this, SLOT(broadcastDatagram()));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Broadcast Sender"));
+}
+
+void Sender::startBroadcasting()
+{
+ startButton->setEnabled(false);
+ timer->start(1000);
+}
+
+void Sender::broadcastDatagram()
+{
+ statusLabel->setText(tr("Now broadcasting datagram %1").arg(messageNo));
+//! [1]
+ QByteArray datagram = "Broadcast message " + QByteArray::number(messageNo);
+ udpSocket->writeDatagram(datagram.data(), datagram.size(),
+ QHostAddress::Broadcast, 45454);
+//! [1]
+ ++messageNo;
+}
diff --git a/examples/network/broadcastsender/sender.h b/examples/network/broadcastsender/sender.h
new file mode 100644
index 0000000..92265b8
--- /dev/null
+++ b/examples/network/broadcastsender/sender.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SENDER_H
+#define SENDER_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QPushButton;
+class QTimer;
+class QUdpSocket;
+QT_END_NAMESPACE
+
+class Sender : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Sender(QWidget *parent = 0);
+
+private slots:
+ void startBroadcasting();
+ void broadcastDatagram();
+
+private:
+ QLabel *statusLabel;
+ QPushButton *startButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+ QUdpSocket *udpSocket;
+ QTimer *timer;
+ int messageNo;
+};
+
+#endif
diff --git a/examples/network/download/download.pro b/examples/network/download/download.pro
new file mode 100644
index 0000000..254c356
--- /dev/null
+++ b/examples/network/download/download.pro
@@ -0,0 +1,19 @@
+######################################################################
+# Automatically generated by qmake (2.01a) fr. nov. 16 13:18:20 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT = core network
+CONFIG += console
+
+# Input
+SOURCES += main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/download
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/download
+INSTALLS += target sources
diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp
new file mode 100644
index 0000000..e0158e7
--- /dev/null
+++ b/examples/network/download/main.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QFile>
+#include <QFileInfo>
+#include <QList>
+#include <QNetworkAccessManager>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QStringList>
+#include <QTimer>
+#include <QUrl>
+
+#include <stdio.h>
+
+class DownloadManager: public QObject
+{
+ Q_OBJECT
+ QNetworkAccessManager manager;
+ QList<QNetworkReply *> currentDownloads;
+
+public:
+ DownloadManager();
+ void doDownload(const QUrl &url);
+ QString saveFileName(const QUrl &url);
+ bool saveToDisk(const QString &filename, QIODevice *data);
+
+public slots:
+ void execute();
+ void downloadFinished(QNetworkReply *reply);
+};
+
+DownloadManager::DownloadManager()
+{
+ connect(&manager, SIGNAL(finished(QNetworkReply*)),
+ SLOT(downloadFinished(QNetworkReply*)));
+}
+
+void DownloadManager::doDownload(const QUrl &url)
+{
+ QNetworkRequest request(url);
+ QNetworkReply *reply = manager.get(request);
+
+ currentDownloads.append(reply);
+}
+
+QString DownloadManager::saveFileName(const QUrl &url)
+{
+ QString path = url.path();
+ QString basename = QFileInfo(path).fileName();
+
+ if (basename.isEmpty())
+ basename = "download";
+
+ if (QFile::exists(basename)) {
+ // already exists, don't overwrite
+ int i = 0;
+ basename += '.';
+ while (QFile::exists(basename + QString::number(i)))
+ ++i;
+
+ basename += QString::number(i);
+ }
+
+ return basename;
+}
+
+bool DownloadManager::saveToDisk(const QString &filename, QIODevice *data)
+{
+ QFile file(filename);
+ if (!file.open(QIODevice::WriteOnly)) {
+ fprintf(stderr, "Could not open %s for writing: %s\n",
+ qPrintable(filename),
+ qPrintable(file.errorString()));
+ return false;
+ }
+
+ file.write(data->readAll());
+ file.close();
+
+ return true;
+}
+
+void DownloadManager::execute()
+{
+ QStringList args = QCoreApplication::instance()->arguments();
+ args.takeFirst(); // skip the first argument, which is the program's name
+ if (args.isEmpty()) {
+ printf("Qt Download example - downloads all URLs in parallel\n"
+ "Usage: download url1 [url2... urlN]\n"
+ "\n"
+ "Downloads the URLs passed in the command-line to the local directory\n"
+ "If the target file already exists, a .0, .1, .2, etc. is appended to\n"
+ "differentiate.\n");
+ QCoreApplication::instance()->quit();
+ return;
+ }
+
+ foreach (QString arg, args) {
+ QUrl url = QUrl::fromEncoded(arg.toLocal8Bit());
+ doDownload(url);
+ }
+}
+
+void DownloadManager::downloadFinished(QNetworkReply *reply)
+{
+ QUrl url = reply->url();
+ if (reply->error()) {
+ fprintf(stderr, "Download of %s failed: %s\n",
+ url.toEncoded().constData(),
+ qPrintable(reply->errorString()));
+ } else {
+ QString filename = saveFileName(url);
+ if (saveToDisk(filename, reply))
+ printf("Download of %s succeded (saved to %s)\n",
+ url.toEncoded().constData(), qPrintable(filename));
+ }
+
+ currentDownloads.removeAll(reply);
+ reply->deleteLater();
+
+ if (currentDownloads.isEmpty())
+ // all downloads finished
+ QCoreApplication::instance()->quit();
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ DownloadManager manager;
+ QTimer::singleShot(0, &manager, SLOT(execute()));
+
+ app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/network/downloadmanager/downloadmanager.cpp b/examples/network/downloadmanager/downloadmanager.cpp
new file mode 100644
index 0000000..a4721a2
--- /dev/null
+++ b/examples/network/downloadmanager/downloadmanager.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "downloadmanager.h"
+
+#include <QFileInfo>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+#include <QString>
+#include <QStringList>
+#include <QTimer>
+#include <stdio.h>
+
+DownloadManager::DownloadManager(QObject *parent)
+ : QObject(parent), downloadedCount(0), totalCount(0)
+{
+}
+
+void DownloadManager::append(const QStringList &urlList)
+{
+ foreach (QString url, urlList)
+ append(QUrl::fromEncoded(url.toLocal8Bit()));
+
+ if (downloadQueue.isEmpty())
+ QTimer::singleShot(0, this, SIGNAL(finished()));
+}
+
+void DownloadManager::append(const QUrl &url)
+{
+ if (downloadQueue.isEmpty())
+ QTimer::singleShot(0, this, SLOT(startNextDownload()));
+
+ downloadQueue.enqueue(url);
+ ++totalCount;
+}
+
+QString DownloadManager::saveFileName(const QUrl &url)
+{
+ QString path = url.path();
+ QString basename = QFileInfo(path).fileName();
+
+ if (basename.isEmpty())
+ basename = "download";
+
+ if (QFile::exists(basename)) {
+ // already exists, don't overwrite
+ int i = 0;
+ basename += '.';
+ while (QFile::exists(basename + QString::number(i)))
+ ++i;
+
+ basename += QString::number(i);
+ }
+
+ return basename;
+}
+
+void DownloadManager::startNextDownload()
+{
+ if (downloadQueue.isEmpty()) {
+ printf("%d/%d files downloaded successfully\n", downloadedCount, totalCount);
+ emit finished();
+ return;
+ }
+
+ QUrl url = downloadQueue.dequeue();
+
+ QString filename = saveFileName(url);
+ output.setFileName(filename);
+ if (!output.open(QIODevice::WriteOnly)) {
+ fprintf(stderr, "Problem opening save file '%s' for download '%s': %s\n",
+ qPrintable(filename), url.toEncoded().constData(),
+ qPrintable(output.errorString()));
+
+ startNextDownload();
+ return; // skip this download
+ }
+
+ QNetworkRequest request(url);
+ currentDownload = manager.get(request);
+ connect(currentDownload, SIGNAL(downloadProgress(qint64,qint64)),
+ SLOT(downloadProgress(qint64,qint64)));
+ connect(currentDownload, SIGNAL(finished()),
+ SLOT(downloadFinished()));
+ connect(currentDownload, SIGNAL(readyRead()),
+ SLOT(downloadReadyRead()));
+
+ // prepare the output
+ printf("Downloading %s...\n", url.toEncoded().constData());
+ downloadTime.start();
+}
+
+void DownloadManager::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
+{
+ progressBar.setStatus(bytesReceived, bytesTotal);
+
+ // calculate the download speed
+ double speed = bytesReceived * 1000.0 / downloadTime.elapsed();
+ QString unit;
+ if (speed < 1024) {
+ unit = "bytes/sec";
+ } else if (speed < 1024*1024) {
+ speed /= 1024;
+ unit = "kB/s";
+ } else {
+ speed /= 1024*1024;
+ unit = "MB/s";
+ }
+
+ progressBar.setMessage(QString::fromLatin1("%1 %2")
+ .arg(speed, 3, 'f', 1).arg(unit));
+ progressBar.update();
+}
+
+void DownloadManager::downloadFinished()
+{
+ progressBar.clear();
+ output.close();
+
+ if (currentDownload->error()) {
+ // download failed
+ fprintf(stderr, "Failed: %s\n", qPrintable(currentDownload->errorString()));
+ } else {
+ printf("Succeeded.\n");
+ ++downloadedCount;
+ }
+
+ currentDownload->deleteLater();
+ startNextDownload();
+}
+
+void DownloadManager::downloadReadyRead()
+{
+ output.write(currentDownload->readAll());
+}
diff --git a/examples/network/downloadmanager/downloadmanager.h b/examples/network/downloadmanager/downloadmanager.h
new file mode 100644
index 0000000..7ed80c4
--- /dev/null
+++ b/examples/network/downloadmanager/downloadmanager.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOWNLOADMANAGER_H
+#define DOWNLOADMANAGER_H
+
+#include <QFile>
+#include <QObject>
+#include <QQueue>
+#include <QTime>
+#include <QUrl>
+#include <QNetworkAccessManager>
+
+#include "textprogressbar.h"
+
+class DownloadManager: public QObject
+{
+ Q_OBJECT
+public:
+ DownloadManager(QObject *parent = 0);
+
+ void append(const QUrl &url);
+ void append(const QStringList &urlList);
+ QString saveFileName(const QUrl &url);
+
+signals:
+ void finished();
+
+private slots:
+ void startNextDownload();
+ void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
+ void downloadFinished();
+ void downloadReadyRead();
+
+private:
+ QNetworkAccessManager manager;
+ QQueue<QUrl> downloadQueue;
+ QNetworkReply *currentDownload;
+ QFile output;
+ QTime downloadTime;
+ TextProgressBar progressBar;
+
+ int downloadedCount;
+ int totalCount;
+};
+
+#endif
diff --git a/examples/network/downloadmanager/downloadmanager.pro b/examples/network/downloadmanager/downloadmanager.pro
new file mode 100644
index 0000000..1b979ca
--- /dev/null
+++ b/examples/network/downloadmanager/downloadmanager.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (2.01a) fr. nov. 16 14:11:36 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT = core network
+CONFIG += console
+
+# Input
+HEADERS += downloadmanager.h textprogressbar.h
+SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/downloadmanager
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/downloadmanager
+INSTALLS += target sources
diff --git a/examples/network/downloadmanager/main.cpp b/examples/network/downloadmanager/main.cpp
new file mode 100644
index 0000000..8a3fe24
--- /dev/null
+++ b/examples/network/downloadmanager/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QStringList>
+#include "downloadmanager.h"
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+ QStringList arguments = app.arguments();
+ arguments.takeFirst(); // remove the first argument, which is the program's name
+
+ if (arguments.isEmpty()) {
+ printf("Qt Download example\n"
+ "Usage: downloadmanager url1 [url2... urlN]\n"
+ "\n"
+ "Downloads the URLs passed in the command-line to the local directory\n"
+ "If the target file already exists, a .0, .1, .2, etc. is appended to\n"
+ "differentiate.\n");
+ return 0;
+ }
+
+ DownloadManager manager;
+ manager.append(arguments);
+
+ QObject::connect(&manager, SIGNAL(finished()), &app, SLOT(quit()));
+ app.exec();
+}
diff --git a/examples/network/downloadmanager/textprogressbar.cpp b/examples/network/downloadmanager/textprogressbar.cpp
new file mode 100644
index 0000000..e1fbf52
--- /dev/null
+++ b/examples/network/downloadmanager/textprogressbar.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textprogressbar.h"
+#include <QByteArray>
+#include <stdio.h>
+
+TextProgressBar::TextProgressBar()
+ : value(0), maximum(-1), iteration(0)
+{
+}
+
+void TextProgressBar::clear()
+{
+ printf("\n");
+ fflush(stdout);
+
+ iteration = 0;
+ value = 0;
+ maximum = -1;
+}
+
+void TextProgressBar::update()
+{
+ ++iteration;
+
+ if (maximum > 0) {
+ // we know the maximum
+ // draw a progress bar
+ int percent = value * 100 / maximum;
+ int hashes = percent / 2;
+
+ QByteArray progressbar(hashes, '#');
+ if (percent % 2)
+ progressbar += '>';
+
+ printf("\r[%-50s] %3d%% %s ",
+ progressbar.constData(),
+ percent,
+ qPrintable(message));
+ } else {
+ // we don't know the maximum, so we can't draw a progress bar
+ int center = (iteration % 48) + 1; // 50 spaces, minus 2
+ QByteArray before(qMax(center - 2, 0), ' ');
+ QByteArray after(qMin(center + 2, 50), ' ');
+
+ printf("\r[%s###%s] %s ",
+ before.constData(), after.constData(), qPrintable(message));
+ }
+}
+
+void TextProgressBar::setMessage(const QString &m)
+{
+ message = m;
+}
+
+void TextProgressBar::setStatus(qint64 val, qint64 max)
+{
+ value = val;
+ maximum = max;
+}
diff --git a/examples/network/downloadmanager/textprogressbar.h b/examples/network/downloadmanager/textprogressbar.h
new file mode 100644
index 0000000..34097d0
--- /dev/null
+++ b/examples/network/downloadmanager/textprogressbar.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTPROGRESSBAR_H
+#define TEXTPROGRESSBAR_H
+
+#include <QString>
+
+class TextProgressBar
+{
+public:
+ TextProgressBar();
+
+ void clear();
+ void update();
+ void setMessage(const QString &message);
+ void setStatus(qint64 value, qint64 maximum);
+
+private:
+ QString message;
+ qint64 value;
+ qint64 maximum;
+ int iteration;
+};
+
+#endif
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
new file mode 100644
index 0000000..4d65828
--- /dev/null
+++ b/examples/network/fortuneclient/client.cpp
@@ -0,0 +1,191 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "client.h"
+
+//! [0]
+Client::Client(QWidget *parent)
+ : QDialog(parent)
+{
+//! [0]
+ hostLabel = new QLabel(tr("&Server name:"));
+ portLabel = new QLabel(tr("S&erver port:"));
+
+ hostLineEdit = new QLineEdit("Localhost");
+ portLineEdit = new QLineEdit;
+ portLineEdit->setValidator(new QIntValidator(1, 65535, this));
+
+ hostLabel->setBuddy(hostLineEdit);
+ portLabel->setBuddy(portLineEdit);
+
+ statusLabel = new QLabel(tr("This examples requires that you run the "
+ "Fortune Server example as well."));
+
+ getFortuneButton = new QPushButton(tr("Get Fortune"));
+ getFortuneButton->setDefault(true);
+ getFortuneButton->setEnabled(false);
+
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+//! [1]
+ tcpSocket = new QTcpSocket(this);
+//! [1]
+
+ connect(hostLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableGetFortuneButton()));
+ connect(portLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableGetFortuneButton()));
+ connect(getFortuneButton, SIGNAL(clicked()),
+ this, SLOT(requestNewFortune()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+//! [2] //! [3]
+ connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(readFortune()));
+//! [2] //! [4]
+ connect(tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)),
+//! [3]
+ this, SLOT(displayError(QAbstractSocket::SocketError)));
+//! [4]
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(hostLabel, 0, 0);
+ mainLayout->addWidget(hostLineEdit, 0, 1);
+ mainLayout->addWidget(portLabel, 1, 0);
+ mainLayout->addWidget(portLineEdit, 1, 1);
+ mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
+ mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Fortune Client"));
+ portLineEdit->setFocus();
+//! [5]
+}
+//! [5]
+
+//! [6]
+void Client::requestNewFortune()
+{
+ getFortuneButton->setEnabled(false);
+ blockSize = 0;
+ tcpSocket->abort();
+//! [7]
+ tcpSocket->connectToHost(hostLineEdit->text(),
+ portLineEdit->text().toInt());
+//! [7]
+}
+//! [6]
+
+//! [8]
+void Client::readFortune()
+{
+//! [9]
+ QDataStream in(tcpSocket);
+ in.setVersion(QDataStream::Qt_4_0);
+
+ if (blockSize == 0) {
+ if (tcpSocket->bytesAvailable() < (int)sizeof(quint16))
+ return;
+//! [8]
+
+//! [10]
+ in >> blockSize;
+ }
+
+ if (tcpSocket->bytesAvailable() < blockSize)
+ return;
+//! [10] //! [11]
+
+ QString nextFortune;
+ in >> nextFortune;
+
+ if (nextFortune == currentFortune) {
+ QTimer::singleShot(0, this, SLOT(requestNewFortune()));
+ return;
+ }
+//! [11]
+
+//! [12]
+ currentFortune = nextFortune;
+//! [9]
+ statusLabel->setText(currentFortune);
+ getFortuneButton->setEnabled(true);
+}
+//! [12]
+
+//! [13]
+void Client::displayError(QAbstractSocket::SocketError socketError)
+{
+ switch (socketError) {
+ case QAbstractSocket::RemoteHostClosedError:
+ break;
+ case QAbstractSocket::HostNotFoundError:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The host was not found. Please check the "
+ "host name and port settings."));
+ break;
+ case QAbstractSocket::ConnectionRefusedError:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The connection was refused by the peer. "
+ "Make sure the fortune server is running, "
+ "and check that the host name and port "
+ "settings are correct."));
+ break;
+ default:
+ QMessageBox::information(this, tr("Fortune Client"),
+ tr("The following error occurred: %1.")
+ .arg(tcpSocket->errorString()));
+ }
+
+ getFortuneButton->setEnabled(true);
+}
+//! [13]
+
+void Client::enableGetFortuneButton()
+{
+ getFortuneButton->setEnabled(!hostLineEdit->text().isEmpty()
+ && !portLineEdit->text().isEmpty());
+}
diff --git a/examples/network/fortuneclient/client.h b/examples/network/fortuneclient/client.h
new file mode 100644
index 0000000..b9fe7b1
--- /dev/null
+++ b/examples/network/fortuneclient/client.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include <QDialog>
+#include <QTcpSocket>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTcpSocket;
+QT_END_NAMESPACE
+
+//! [0]
+class Client : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Client(QWidget *parent = 0);
+
+private slots:
+ void requestNewFortune();
+ void readFortune();
+ void displayError(QAbstractSocket::SocketError socketError);
+ void enableGetFortuneButton();
+
+private:
+ QLabel *hostLabel;
+ QLabel *portLabel;
+ QLineEdit *hostLineEdit;
+ QLineEdit *portLineEdit;
+ QLabel *statusLabel;
+ QPushButton *getFortuneButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+
+ QTcpSocket *tcpSocket;
+ QString currentFortune;
+ quint16 blockSize;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
new file mode 100644
index 0000000..1c7b0a8
--- /dev/null
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -0,0 +1,10 @@
+HEADERS = client.h
+SOURCES = client.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneclient
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneclient.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneclient
+INSTALLS += target sources
diff --git a/examples/network/fortuneclient/main.cpp b/examples/network/fortuneclient/main.cpp
new file mode 100644
index 0000000..11dcbc6
--- /dev/null
+++ b/examples/network/fortuneclient/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "client.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Client client;
+ client.show();
+ return client.exec();
+}
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
new file mode 100644
index 0000000..e98385a
--- /dev/null
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -0,0 +1,10 @@
+HEADERS = server.h
+SOURCES = server.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneserver
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneserver.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/fortuneserver
+INSTALLS += target sources
diff --git a/examples/network/fortuneserver/main.cpp b/examples/network/fortuneserver/main.cpp
new file mode 100644
index 0000000..b505c44
--- /dev/null
+++ b/examples/network/fortuneserver/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QtCore>
+
+#include <stdlib.h>
+
+#include "server.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Server server;
+ server.show();
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ return server.exec();
+}
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
new file mode 100644
index 0000000..09626a8
--- /dev/null
+++ b/examples/network/fortuneserver/server.cpp
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include <stdlib.h>
+
+#include "server.h"
+
+Server::Server(QWidget *parent)
+ : QDialog(parent)
+{
+ statusLabel = new QLabel;
+ quitButton = new QPushButton(tr("Quit"));
+ quitButton->setAutoDefault(false);
+
+//! [0] //! [1]
+ tcpServer = new QTcpServer(this);
+ if (!tcpServer->listen()) {
+ QMessageBox::critical(this, tr("Fortune Server"),
+ tr("Unable to start the server: %1.")
+ .arg(tcpServer->errorString()));
+ close();
+ return;
+ }
+//! [0]
+
+ statusLabel->setText(tr("The server is running on port %1.\n"
+ "Run the Fortune Client example now.")
+ .arg(tcpServer->serverPort()));
+//! [1]
+
+//! [2]
+ fortunes << tr("You've been leading a dog's life. Stay off the furniture.")
+ << tr("You've got to think about tomorrow.")
+ << tr("You will be surprised by a loud noise.")
+ << tr("You will feel hungry again in another hour.")
+ << tr("You might have mail.")
+ << tr("You cannot kill time without injuring eternity.")
+ << tr("Computers are not intelligent. They only think they are.");
+//! [2]
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+//! [3]
+ connect(tcpServer, SIGNAL(newConnection()), this, SLOT(sendFortune()));
+//! [3]
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addStretch(1);
+ buttonLayout->addWidget(quitButton);
+ buttonLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addLayout(buttonLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Fortune Server"));
+}
+
+//! [4]
+void Server::sendFortune()
+{
+//! [5]
+ QByteArray block;
+ QDataStream out(&block, QIODevice::WriteOnly);
+ out.setVersion(QDataStream::Qt_4_0);
+//! [4] //! [6]
+ out << (quint16)0;
+ out << fortunes.at(qrand() % fortunes.size());
+ out.device()->seek(0);
+ out << (quint16)(block.size() - sizeof(quint16));
+//! [6] //! [7]
+
+ QTcpSocket *clientConnection = tcpServer->nextPendingConnection();
+ connect(clientConnection, SIGNAL(disconnected()),
+ clientConnection, SLOT(deleteLater()));
+//! [7] //! [8]
+
+ clientConnection->write(block);
+ clientConnection->disconnectFromHost();
+//! [5]
+}
+//! [8]
diff --git a/examples/network/fortuneserver/server.h b/examples/network/fortuneserver/server.h
new file mode 100644
index 0000000..dcd64c7
--- /dev/null
+++ b/examples/network/fortuneserver/server.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QTcpServer;
+QT_END_NAMESPACE
+
+//! [0]
+class Server : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Server(QWidget *parent = 0);
+
+private slots:
+ void sendFortune();
+
+private:
+ QLabel *statusLabel;
+ QPushButton *quitButton;
+ QTcpServer *tcpServer;
+ QStringList fortunes;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/ftp/ftp.pro b/examples/network/ftp/ftp.pro
new file mode 100644
index 0000000..cabc003
--- /dev/null
+++ b/examples/network/ftp/ftp.pro
@@ -0,0 +1,11 @@
+HEADERS = ftpwindow.h
+SOURCES = ftpwindow.cpp \
+ main.cpp
+RESOURCES += ftp.qrc
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/ftp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS ftp.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/ftp
+INSTALLS += target sources
diff --git a/examples/network/ftp/ftp.qrc b/examples/network/ftp/ftp.qrc
new file mode 100644
index 0000000..b598ab8
--- /dev/null
+++ b/examples/network/ftp/ftp.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/cdtoparent.png</file>
+ <file>images/dir.png</file>
+ <file>images/file.png</file>
+</qresource>
+</RCC>
diff --git a/examples/network/ftp/ftpwindow.cpp b/examples/network/ftp/ftpwindow.cpp
new file mode 100644
index 0000000..a05a5dd
--- /dev/null
+++ b/examples/network/ftp/ftpwindow.cpp
@@ -0,0 +1,349 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "ftpwindow.h"
+
+FtpWindow::FtpWindow(QWidget *parent)
+ : QDialog(parent), ftp(0)
+{
+ ftpServerLabel = new QLabel(tr("Ftp &server:"));
+ ftpServerLineEdit = new QLineEdit("ftp.trolltech.com");
+ ftpServerLabel->setBuddy(ftpServerLineEdit);
+
+ statusLabel = new QLabel(tr("Please enter the name of an FTP server."));
+
+ fileList = new QTreeWidget;
+ fileList->setEnabled(false);
+ fileList->setRootIsDecorated(false);
+ fileList->setHeaderLabels(QStringList() << tr("Name") << tr("Size") << tr("Owner") << tr("Group") << tr("Time"));
+ fileList->header()->setStretchLastSection(false);
+
+ connectButton = new QPushButton(tr("Connect"));
+ connectButton->setDefault(true);
+
+ cdToParentButton = new QPushButton;
+ cdToParentButton->setIcon(QPixmap(":/images/cdtoparent.png"));
+ cdToParentButton->setEnabled(false);
+
+ downloadButton = new QPushButton(tr("Download"));
+ downloadButton->setEnabled(false);
+
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ progressDialog = new QProgressDialog(this);
+
+ connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
+ this, SLOT(processItem(QTreeWidgetItem *, int)));
+ connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+ this, SLOT(enableDownloadButton()));
+ connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
+ connect(connectButton, SIGNAL(clicked()), this, SLOT(connectOrDisconnect()));
+ connect(cdToParentButton, SIGNAL(clicked()), this, SLOT(cdToParent()));
+ connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QHBoxLayout *topLayout = new QHBoxLayout;
+ topLayout->addWidget(ftpServerLabel);
+ topLayout->addWidget(ftpServerLineEdit);
+ topLayout->addWidget(cdToParentButton);
+ topLayout->addWidget(connectButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(topLayout);
+ mainLayout->addWidget(fileList);
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("FTP"));
+}
+
+QSize FtpWindow::sizeHint() const
+{
+ return QSize(500, 300);
+}
+
+//![0]
+void FtpWindow::connectOrDisconnect()
+{
+ if (ftp) {
+ ftp->abort();
+ ftp->deleteLater();
+ ftp = 0;
+//![0]
+ fileList->setEnabled(false);
+ cdToParentButton->setEnabled(false);
+ downloadButton->setEnabled(false);
+ connectButton->setEnabled(true);
+ connectButton->setText(tr("Connect"));
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::ArrowCursor);
+#endif
+ return;
+ }
+
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::WaitCursor);
+#endif
+
+//![1]
+ ftp = new QFtp(this);
+ connect(ftp, SIGNAL(commandFinished(int, bool)),
+ this, SLOT(ftpCommandFinished(int, bool)));
+ connect(ftp, SIGNAL(listInfo(const QUrlInfo &)),
+ this, SLOT(addToList(const QUrlInfo &)));
+ connect(ftp, SIGNAL(dataTransferProgress(qint64, qint64)),
+ this, SLOT(updateDataTransferProgress(qint64, qint64)));
+
+ fileList->clear();
+ currentPath.clear();
+ isDirectory.clear();
+//![1]
+
+//![2]
+ QUrl url(ftpServerLineEdit->text());
+ if (!url.isValid() || url.scheme().toLower() != QLatin1String("ftp")) {
+ ftp->connectToHost(ftpServerLineEdit->text(), 21);
+ ftp->login();
+ } else {
+ ftp->connectToHost(url.host(), url.port(21));
+
+ if (!url.userName().isEmpty())
+ ftp->login(QUrl::fromPercentEncoding(url.userName().toLatin1()), url.password());
+ else
+ ftp->login();
+ if (!url.path().isEmpty())
+ ftp->cd(url.path());
+ }
+//![2]
+
+ fileList->setEnabled(true);
+ connectButton->setEnabled(false);
+ connectButton->setText(tr("Disconnect"));
+ statusLabel->setText(tr("Connecting to FTP server %1...")
+ .arg(ftpServerLineEdit->text()));
+}
+
+//![3]
+void FtpWindow::downloadFile()
+{
+ QString fileName = fileList->currentItem()->text(0);
+//![3]
+//
+ if (QFile::exists(fileName)) {
+ QMessageBox::information(this, tr("FTP"),
+ tr("There already exists a file called %1 in "
+ "the current directory.")
+ .arg(fileName));
+ return;
+ }
+
+//![4]
+ file = new QFile(fileName);
+ if (!file->open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("FTP"),
+ tr("Unable to save the file %1: %2.")
+ .arg(fileName).arg(file->errorString()));
+ delete file;
+ return;
+ }
+
+ ftp->get(fileList->currentItem()->text(0), file);
+
+ progressDialog->setLabelText(tr("Downloading %1...").arg(fileName));
+ downloadButton->setEnabled(false);
+ progressDialog->exec();
+}
+//![4]
+
+//![5]
+void FtpWindow::cancelDownload()
+{
+ ftp->abort();
+}
+//![5]
+
+//![6]
+void FtpWindow::ftpCommandFinished(int, bool error)
+{
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::ArrowCursor);
+#endif
+
+ if (ftp->currentCommand() == QFtp::ConnectToHost) {
+ if (error) {
+ QMessageBox::information(this, tr("FTP"),
+ tr("Unable to connect to the FTP server "
+ "at %1. Please check that the host "
+ "name is correct.")
+ .arg(ftpServerLineEdit->text()));
+ connectOrDisconnect();
+ return;
+ }
+ statusLabel->setText(tr("Logged onto %1.")
+ .arg(ftpServerLineEdit->text()));
+ fileList->setFocus();
+ downloadButton->setDefault(true);
+ connectButton->setEnabled(true);
+ return;
+ }
+//![6]
+
+//![7]
+ if (ftp->currentCommand() == QFtp::Login)
+ ftp->list();
+//![7]
+
+//![8]
+ if (ftp->currentCommand() == QFtp::Get) {
+ if (error) {
+ statusLabel->setText(tr("Canceled download of %1.")
+ .arg(file->fileName()));
+ file->close();
+ file->remove();
+ } else {
+ statusLabel->setText(tr("Downloaded %1 to current directory.")
+ .arg(file->fileName()));
+ file->close();
+ }
+ delete file;
+ enableDownloadButton();
+ progressDialog->hide();
+//![8]
+//![9]
+ } else if (ftp->currentCommand() == QFtp::List) {
+ if (isDirectory.isEmpty()) {
+ fileList->addTopLevelItem(new QTreeWidgetItem(QStringList() << tr("<empty>")));
+ fileList->setEnabled(false);
+ }
+ }
+//![9]
+}
+
+//![10]
+void FtpWindow::addToList(const QUrlInfo &urlInfo)
+{
+ QTreeWidgetItem *item = new QTreeWidgetItem;
+ item->setText(0, urlInfo.name());
+ item->setText(1, QString::number(urlInfo.size()));
+ item->setText(2, urlInfo.owner());
+ item->setText(3, urlInfo.group());
+ item->setText(4, urlInfo.lastModified().toString("MMM dd yyyy"));
+
+ QPixmap pixmap(urlInfo.isDir() ? ":/images/dir.png" : ":/images/file.png");
+ item->setIcon(0, pixmap);
+
+ isDirectory[urlInfo.name()] = urlInfo.isDir();
+ fileList->addTopLevelItem(item);
+ if (!fileList->currentItem()) {
+ fileList->setCurrentItem(fileList->topLevelItem(0));
+ fileList->setEnabled(true);
+ }
+}
+//![10]
+
+//![11]
+void FtpWindow::processItem(QTreeWidgetItem *item, int /*column*/)
+{
+ QString name = item->text(0);
+ if (isDirectory.value(name)) {
+ fileList->clear();
+ isDirectory.clear();
+ currentPath += "/" + name;
+ ftp->cd(name);
+ ftp->list();
+ cdToParentButton->setEnabled(true);
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::WaitCursor);
+#endif
+ return;
+ }
+}
+//![11]
+
+//![12]
+void FtpWindow::cdToParent()
+{
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::WaitCursor);
+#endif
+ fileList->clear();
+ isDirectory.clear();
+ currentPath = currentPath.left(currentPath.lastIndexOf('/'));
+ if (currentPath.isEmpty()) {
+ cdToParentButton->setEnabled(false);
+ ftp->cd("/");
+ } else {
+ ftp->cd(currentPath);
+ }
+ ftp->list();
+}
+//![12]
+
+//![13]
+void FtpWindow::updateDataTransferProgress(qint64 readBytes,
+ qint64 totalBytes)
+{
+ progressDialog->setMaximum(totalBytes);
+ progressDialog->setValue(readBytes);
+}
+//![13]
+
+//![14]
+void FtpWindow::enableDownloadButton()
+{
+ QTreeWidgetItem *current = fileList->currentItem();
+ if (current) {
+ QString currentFile = current->text(0);
+ downloadButton->setEnabled(!isDirectory.value(currentFile));
+ } else {
+ downloadButton->setEnabled(false);
+ }
+}
+//![14]
+
diff --git a/examples/network/ftp/ftpwindow.h b/examples/network/ftp/ftpwindow.h
new file mode 100644
index 0000000..a3045fa
--- /dev/null
+++ b/examples/network/ftp/ftpwindow.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FTPWINDOW_H
+#define FTPWINDOW_H
+
+#include <QDialog>
+#include <QHash>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QFile;
+class QFtp;
+class QLabel;
+class QLineEdit;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QProgressDialog;
+class QPushButton;
+class QUrlInfo;
+QT_END_NAMESPACE
+
+class FtpWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FtpWindow(QWidget *parent = 0);
+ QSize sizeHint() const;
+
+//![0]
+private slots:
+ void connectOrDisconnect();
+ void downloadFile();
+ void cancelDownload();
+
+ void ftpCommandFinished(int commandId, bool error);
+ void addToList(const QUrlInfo &urlInfo);
+ void processItem(QTreeWidgetItem *item, int column);
+ void cdToParent();
+ void updateDataTransferProgress(qint64 readBytes,
+ qint64 totalBytes);
+ void enableDownloadButton();
+//![0]
+
+private:
+ QLabel *ftpServerLabel;
+ QLineEdit *ftpServerLineEdit;
+ QLabel *statusLabel;
+ QTreeWidget *fileList;
+ QPushButton *cdToParentButton;
+ QPushButton *connectButton;
+ QPushButton *downloadButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+ QProgressDialog *progressDialog;
+
+//![1]
+ QHash<QString, bool> isDirectory;
+ QString currentPath;
+ QFtp *ftp;
+ QFile *file;
+//![1]
+};
+
+#endif
diff --git a/examples/network/ftp/images/cdtoparent.png b/examples/network/ftp/images/cdtoparent.png
new file mode 100644
index 0000000..24b6180
--- /dev/null
+++ b/examples/network/ftp/images/cdtoparent.png
Binary files differ
diff --git a/examples/network/ftp/images/dir.png b/examples/network/ftp/images/dir.png
new file mode 100644
index 0000000..0ce5ae7
--- /dev/null
+++ b/examples/network/ftp/images/dir.png
Binary files differ
diff --git a/examples/network/ftp/images/file.png b/examples/network/ftp/images/file.png
new file mode 100644
index 0000000..be6c530
--- /dev/null
+++ b/examples/network/ftp/images/file.png
Binary files differ
diff --git a/examples/network/ftp/main.cpp b/examples/network/ftp/main.cpp
new file mode 100644
index 0000000..b9ffd33
--- /dev/null
+++ b/examples/network/ftp/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "ftpwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(ftp);
+
+ QApplication app(argc, argv);
+ FtpWindow ftpWin;
+ ftpWin.show();
+ return ftpWin.exec();
+}
diff --git a/examples/network/http/authenticationdialog.ui b/examples/network/http/authenticationdialog.ui
new file mode 100644
index 0000000..82d908c
--- /dev/null
+++ b/examples/network/http/authenticationdialog.ui
@@ -0,0 +1,129 @@
+<ui version="4.0" >
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>389</width>
+ <height>243</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Http authentication required</string>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>You need to supply a Username and a Password to access this site</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Username:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="userEdit" />
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QLineEdit" name="passwordEdit" />
+ </item>
+ <item row="5" column="0" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Site:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="siteDescription" >
+ <property name="font" >
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text" >
+ <string>%1 at %2</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>Dialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>Dialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/network/http/http.pro b/examples/network/http/http.pro
new file mode 100644
index 0000000..7f58d9f
--- /dev/null
+++ b/examples/network/http/http.pro
@@ -0,0 +1,11 @@
+HEADERS += httpwindow.h
+SOURCES += httpwindow.cpp \
+ main.cpp
+FORMS += authenticationdialog.ui
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/http
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS http.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/http
+INSTALLS += target sources
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
new file mode 100644
index 0000000..ebde770
--- /dev/null
+++ b/examples/network/http/httpwindow.cpp
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "httpwindow.h"
+#include "ui_authenticationdialog.h"
+
+HttpWindow::HttpWindow(QWidget *parent)
+ : QDialog(parent)
+{
+#ifndef QT_NO_OPENSSL
+ urlLineEdit = new QLineEdit("https://");
+#else
+ urlLineEdit = new QLineEdit("http://");
+#endif
+
+ urlLabel = new QLabel(tr("&URL:"));
+ urlLabel->setBuddy(urlLineEdit);
+ statusLabel = new QLabel(tr("Please enter the URL of a file you want to "
+ "download."));
+
+ downloadButton = new QPushButton(tr("Download"));
+ downloadButton->setDefault(true);
+ quitButton = new QPushButton(tr("Quit"));
+ quitButton->setAutoDefault(false);
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ progressDialog = new QProgressDialog(this);
+
+ http = new QHttp(this);
+
+ connect(urlLineEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(enableDownloadButton()));
+ connect(http, SIGNAL(requestFinished(int, bool)),
+ this, SLOT(httpRequestFinished(int, bool)));
+ connect(http, SIGNAL(dataReadProgress(int, int)),
+ this, SLOT(updateDataReadProgress(int, int)));
+ connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
+ this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
+ connect(http, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)),
+ this, SLOT(slotAuthenticationRequired(const QString &, quint16, QAuthenticator *)));
+#ifndef QT_NO_OPENSSL
+ connect(http, SIGNAL(sslErrors(const QList<QSslError> &)),
+ this, SLOT(sslErrors(const QList<QSslError> &)));
+#endif
+ connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
+ connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QHBoxLayout *topLayout = new QHBoxLayout;
+ topLayout->addWidget(urlLabel);
+ topLayout->addWidget(urlLineEdit);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(topLayout);
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("HTTP"));
+ urlLineEdit->setFocus();
+}
+
+void HttpWindow::downloadFile()
+{
+ QUrl url(urlLineEdit->text());
+ QFileInfo fileInfo(url.path());
+ QString fileName = fileInfo.fileName();
+ if (fileName.isEmpty())
+ fileName = "index.html";
+
+ if (QFile::exists(fileName)) {
+ if (QMessageBox::question(this, tr("HTTP"),
+ tr("There already exists a file called %1 in "
+ "the current directory. Overwrite?").arg(fileName),
+ QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Cancel)
+ == QMessageBox::Cancel)
+ return;
+ QFile::remove(fileName);
+ }
+
+ file = new QFile(fileName);
+ if (!file->open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("HTTP"),
+ tr("Unable to save the file %1: %2.")
+ .arg(fileName).arg(file->errorString()));
+ delete file;
+ file = 0;
+ return;
+ }
+
+ QHttp::ConnectionMode mode = url.scheme().toLower() == "https" ? QHttp::ConnectionModeHttps : QHttp::ConnectionModeHttp;
+ http->setHost(url.host(), mode, url.port() == -1 ? 0 : url.port());
+
+ if (!url.userName().isEmpty())
+ http->setUser(url.userName(), url.password());
+
+ httpRequestAborted = false;
+ QByteArray path = QUrl::toPercentEncoding(url.path(), "!$&'()*+,;=:@/");
+ if (path.isEmpty())
+ path = "/";
+ httpGetId = http->get(path, file);
+
+ progressDialog->setWindowTitle(tr("HTTP"));
+ progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));
+ downloadButton->setEnabled(false);
+}
+
+void HttpWindow::cancelDownload()
+{
+ statusLabel->setText(tr("Download canceled."));
+ httpRequestAborted = true;
+ http->abort();
+ downloadButton->setEnabled(true);
+}
+
+void HttpWindow::httpRequestFinished(int requestId, bool error)
+{
+ if (requestId != httpGetId)
+ return;
+ if (httpRequestAborted) {
+ if (file) {
+ file->close();
+ file->remove();
+ delete file;
+ file = 0;
+ }
+
+ progressDialog->hide();
+ return;
+ }
+
+ if (requestId != httpGetId)
+ return;
+
+ progressDialog->hide();
+ file->close();
+
+ if (error) {
+ file->remove();
+ QMessageBox::information(this, tr("HTTP"),
+ tr("Download failed: %1.")
+ .arg(http->errorString()));
+ } else {
+ QString fileName = QFileInfo(QUrl(urlLineEdit->text()).path()).fileName();
+ statusLabel->setText(tr("Downloaded %1 to current directory.").arg(fileName));
+ }
+
+ downloadButton->setEnabled(true);
+ delete file;
+ file = 0;
+}
+
+void HttpWindow::readResponseHeader(const QHttpResponseHeader &responseHeader)
+{
+ switch (responseHeader.statusCode()) {
+ case 200: // Ok
+ case 301: // Moved Permanently
+ case 302: // Found
+ case 303: // See Other
+ case 307: // Temporary Redirect
+ // these are not error conditions
+ break;
+
+ default:
+ QMessageBox::information(this, tr("HTTP"),
+ tr("Download failed: %1.")
+ .arg(responseHeader.reasonPhrase()));
+ httpRequestAborted = true;
+ progressDialog->hide();
+ http->abort();
+ }
+}
+
+void HttpWindow::updateDataReadProgress(int bytesRead, int totalBytes)
+{
+ if (httpRequestAborted)
+ return;
+
+ progressDialog->setMaximum(totalBytes);
+ progressDialog->setValue(bytesRead);
+}
+
+void HttpWindow::enableDownloadButton()
+{
+ downloadButton->setEnabled(!urlLineEdit->text().isEmpty());
+}
+
+void HttpWindow::slotAuthenticationRequired(const QString &hostName, quint16, QAuthenticator *authenticator)
+{
+ QDialog dlg;
+ Ui::Dialog ui;
+ ui.setupUi(&dlg);
+ dlg.adjustSize();
+ ui.siteDescription->setText(tr("%1 at %2").arg(authenticator->realm()).arg(hostName));
+
+ if (dlg.exec() == QDialog::Accepted) {
+ authenticator->setUser(ui.userEdit->text());
+ authenticator->setPassword(ui.passwordEdit->text());
+ }
+}
+
+#ifndef QT_NO_OPENSSL
+void HttpWindow::sslErrors(const QList<QSslError> &errors)
+{
+ QString errorString;
+ foreach (const QSslError &error, errors) {
+ if (!errorString.isEmpty())
+ errorString += ", ";
+ errorString += error.errorString();
+ }
+
+ if (QMessageBox::warning(this, tr("HTTP Example"),
+ tr("One or more SSL errors has occurred: %1").arg(errorString),
+ QMessageBox::Ignore | QMessageBox::Abort) == QMessageBox::Ignore) {
+ http->ignoreSslErrors();
+ }
+}
+#endif
diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h
new file mode 100644
index 0000000..f0fb504
--- /dev/null
+++ b/examples/network/http/httpwindow.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HTTPWINDOW_H
+#define HTTPWINDOW_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QFile;
+class QHttp;
+class QHttpResponseHeader;
+class QLabel;
+class QLineEdit;
+class QProgressDialog;
+class QPushButton;
+class QSslError;
+class QAuthenticator;
+QT_END_NAMESPACE
+
+class HttpWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ HttpWindow(QWidget *parent = 0);
+
+private slots:
+ void downloadFile();
+ void cancelDownload();
+ void httpRequestFinished(int requestId, bool error);
+ void readResponseHeader(const QHttpResponseHeader &responseHeader);
+ void updateDataReadProgress(int bytesRead, int totalBytes);
+ void enableDownloadButton();
+ void slotAuthenticationRequired(const QString &, quint16, QAuthenticator *);
+#ifndef QT_NO_OPENSSL
+ void sslErrors(const QList<QSslError> &errors);
+#endif
+
+private:
+ QLabel *statusLabel;
+ QLabel *urlLabel;
+ QLineEdit *urlLineEdit;
+ QProgressDialog *progressDialog;
+ QPushButton *downloadButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+
+ QHttp *http;
+ QFile *file;
+ int httpGetId;
+ bool httpRequestAborted;
+};
+
+#endif
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp
new file mode 100644
index 0000000..dba4082
--- /dev/null
+++ b/examples/network/http/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "httpwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ HttpWindow httpWin;
+ httpWin.show();
+ return httpWin.exec();
+}
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
new file mode 100644
index 0000000..06ec8dd
--- /dev/null
+++ b/examples/network/loopback/dialog.cpp
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include "dialog.h"
+
+#if !defined(Q_OS_WINCE)
+static const int TotalBytes = 50 * 1024 * 1024;
+#else
+static const int TotalBytes = 5 * 1024 * 1024;
+#endif
+static const int PayloadSize = 65536;
+
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent)
+{
+ clientProgressBar = new QProgressBar;
+ clientStatusLabel = new QLabel(tr("Client ready"));
+ serverProgressBar = new QProgressBar;
+ serverStatusLabel = new QLabel(tr("Server ready"));
+
+ startButton = new QPushButton(tr("&Start"));
+ quitButton = new QPushButton(tr("&Quit"));
+
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(startButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+
+ connect(startButton, SIGNAL(clicked()), this, SLOT(start()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(&tcpServer, SIGNAL(newConnection()),
+ this, SLOT(acceptConnection()));
+ connect(&tcpClient, SIGNAL(connected()), this, SLOT(startTransfer()));
+ connect(&tcpClient, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(updateClientProgress(qint64)));
+ connect(&tcpClient, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SLOT(displayError(QAbstractSocket::SocketError)));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(clientProgressBar);
+ mainLayout->addWidget(clientStatusLabel);
+ mainLayout->addWidget(serverProgressBar);
+ mainLayout->addWidget(serverStatusLabel);
+ mainLayout->addStretch(1);
+ mainLayout->addSpacing(10);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Loopback"));
+}
+
+void Dialog::start()
+{
+ startButton->setEnabled(false);
+
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+#endif
+
+ bytesWritten = 0;
+ bytesReceived = 0;
+
+ while (!tcpServer.isListening() && !tcpServer.listen()) {
+ QMessageBox::StandardButton ret = QMessageBox::critical(this,
+ tr("Loopback"),
+ tr("Unable to start the test: %1.")
+ .arg(tcpServer.errorString()),
+ QMessageBox::Retry
+ | QMessageBox::Cancel);
+ if (ret == QMessageBox::Cancel)
+ return;
+ }
+
+ serverStatusLabel->setText(tr("Listening"));
+ clientStatusLabel->setText(tr("Connecting"));
+ tcpClient.connectToHost(QHostAddress::LocalHost, tcpServer.serverPort());
+}
+
+void Dialog::acceptConnection()
+{
+ tcpServerConnection = tcpServer.nextPendingConnection();
+ connect(tcpServerConnection, SIGNAL(readyRead()),
+ this, SLOT(updateServerProgress()));
+ connect(tcpServerConnection, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SLOT(displayError(QAbstractSocket::SocketError)));
+
+ serverStatusLabel->setText(tr("Accepted connection"));
+ tcpServer.close();
+}
+
+void Dialog::startTransfer()
+{
+ bytesToWrite = TotalBytes - (int)tcpClient.write(QByteArray(PayloadSize, '@'));
+ clientStatusLabel->setText(tr("Connected"));
+}
+
+void Dialog::updateServerProgress()
+{
+ bytesReceived += (int)tcpServerConnection->bytesAvailable();
+ tcpServerConnection->readAll();
+
+ serverProgressBar->setMaximum(TotalBytes);
+ serverProgressBar->setValue(bytesReceived);
+ serverStatusLabel->setText(tr("Received %1MB")
+ .arg(bytesReceived / (1024 * 1024)));
+
+ if (bytesReceived == TotalBytes) {
+ tcpServerConnection->close();
+ startButton->setEnabled(true);
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+ }
+}
+
+void Dialog::updateClientProgress(qint64 numBytes)
+{
+ bytesWritten += (int)numBytes;
+ if (bytesToWrite > 0)
+ bytesToWrite -= (int)tcpClient.write(QByteArray(qMin(bytesToWrite, PayloadSize), '@'));
+
+ clientProgressBar->setMaximum(TotalBytes);
+ clientProgressBar->setValue(bytesWritten);
+ clientStatusLabel->setText(tr("Sent %1MB")
+ .arg(bytesWritten / (1024 * 1024)));
+}
+
+void Dialog::displayError(QAbstractSocket::SocketError socketError)
+{
+ if (socketError == QTcpSocket::RemoteHostClosedError)
+ return;
+
+ QMessageBox::information(this, tr("Network error"),
+ tr("The following error occurred: %1.")
+ .arg(tcpClient.errorString()));
+
+ tcpClient.close();
+ tcpServer.close();
+ clientProgressBar->reset();
+ serverProgressBar->reset();
+ clientStatusLabel->setText(tr("Client ready"));
+ serverStatusLabel->setText(tr("Server ready"));
+ startButton->setEnabled(true);
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+}
diff --git a/examples/network/loopback/dialog.h b/examples/network/loopback/dialog.h
new file mode 100644
index 0000000..cc15376
--- /dev/null
+++ b/examples/network/loopback/dialog.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+#include <QTcpServer>
+#include <QTcpSocket>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QLabel;
+class QProgressBar;
+class QPushButton;
+class QTcpServer;
+class QTcpSocket;
+QT_END_NAMESPACE
+
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QWidget *parent = 0);
+
+public slots:
+ void start();
+ void acceptConnection();
+ void startTransfer();
+ void updateServerProgress();
+ void updateClientProgress(qint64 numBytes);
+ void displayError(QAbstractSocket::SocketError socketError);
+
+private:
+ QProgressBar *clientProgressBar;
+ QProgressBar *serverProgressBar;
+ QLabel *clientStatusLabel;
+ QLabel *serverStatusLabel;
+ QPushButton *startButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+
+ QTcpServer tcpServer;
+ QTcpSocket tcpClient;
+ QTcpSocket *tcpServerConnection;
+ int bytesToWrite;
+ int bytesWritten;
+ int bytesReceived;
+};
+
+#endif
diff --git a/examples/network/loopback/loopback.pro b/examples/network/loopback/loopback.pro
new file mode 100644
index 0000000..88b7a8b
--- /dev/null
+++ b/examples/network/loopback/loopback.pro
@@ -0,0 +1,10 @@
+HEADERS = dialog.h
+SOURCES = dialog.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/loopback
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS loopback.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/loopback
+INSTALLS += target sources
diff --git a/examples/network/loopback/main.cpp b/examples/network/loopback/main.cpp
new file mode 100644
index 0000000..3e9e62c
--- /dev/null
+++ b/examples/network/loopback/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Dialog dialog;
+ dialog.show();
+ return dialog.exec();
+}
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp
new file mode 100644
index 0000000..7e88e5b
--- /dev/null
+++ b/examples/network/network-chat/chatdialog.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "chatdialog.h"
+
+ChatDialog::ChatDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+
+ lineEdit->setFocusPolicy(Qt::StrongFocus);
+ textEdit->setFocusPolicy(Qt::NoFocus);
+ textEdit->setReadOnly(true);
+ listWidget->setFocusPolicy(Qt::NoFocus);
+
+ connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
+ connect(&client, SIGNAL(newMessage(const QString &, const QString &)),
+ this, SLOT(appendMessage(const QString &, const QString &)));
+ connect(&client, SIGNAL(newParticipant(const QString &)),
+ this, SLOT(newParticipant(const QString &)));
+ connect(&client, SIGNAL(participantLeft(const QString &)),
+ this, SLOT(participantLeft(const QString &)));
+
+ myNickName = client.nickName();
+ newParticipant(myNickName);
+ tableFormat.setBorder(0);
+ QTimer::singleShot(10 * 1000, this, SLOT(showInformation()));
+}
+
+void ChatDialog::appendMessage(const QString &from, const QString &message)
+{
+ if (from.isEmpty() || message.isEmpty())
+ return;
+
+ QTextCursor cursor(textEdit->textCursor());
+ cursor.movePosition(QTextCursor::End);
+ QTextTable *table = cursor.insertTable(1, 2, tableFormat);
+ table->cellAt(0, 0).firstCursorPosition().insertText("<" + from + "> ");
+ table->cellAt(0, 1).firstCursorPosition().insertText(message);
+ QScrollBar *bar = textEdit->verticalScrollBar();
+ bar->setValue(bar->maximum());
+}
+
+void ChatDialog::returnPressed()
+{
+ QString text = lineEdit->text();
+ if (text.isEmpty())
+ return;
+
+ if (text.startsWith(QChar('/'))) {
+ QColor color = textEdit->textColor();
+ textEdit->setTextColor(Qt::red);
+ textEdit->append(tr("! Unknown command: %1")
+ .arg(text.left(text.indexOf(' '))));
+ textEdit->setTextColor(color);
+ } else {
+ client.sendMessage(text);
+ appendMessage(myNickName, text);
+ }
+
+ lineEdit->clear();
+}
+
+void ChatDialog::newParticipant(const QString &nick)
+{
+ if (nick.isEmpty())
+ return;
+
+ QColor color = textEdit->textColor();
+ textEdit->setTextColor(Qt::gray);
+ textEdit->append(tr("* %1 has joined").arg(nick));
+ textEdit->setTextColor(color);
+ listWidget->addItem(nick);
+}
+
+void ChatDialog::participantLeft(const QString &nick)
+{
+ if (nick.isEmpty())
+ return;
+
+ QList<QListWidgetItem *> items = listWidget->findItems(nick,
+ Qt::MatchExactly);
+ if (items.isEmpty())
+ return;
+
+ delete items.at(0);
+ QColor color = textEdit->textColor();
+ textEdit->setTextColor(Qt::gray);
+ textEdit->append(tr("* %1 has left").arg(nick));
+ textEdit->setTextColor(color);
+}
+
+void ChatDialog::showInformation()
+{
+ if (listWidget->count() == 1) {
+ QMessageBox::information(this, tr("Chat"),
+ tr("Launch several instances of this "
+ "program on your local network and "
+ "start chatting!"));
+ }
+}
diff --git a/examples/network/network-chat/chatdialog.h b/examples/network/network-chat/chatdialog.h
new file mode 100644
index 0000000..552d794
--- /dev/null
+++ b/examples/network/network-chat/chatdialog.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHATDIALOG_H
+#define CHATDIALOG_H
+
+#include "ui_chatdialog.h"
+#include "client.h"
+
+class ChatDialog : public QDialog, private Ui::ChatDialog
+{
+ Q_OBJECT
+
+public:
+ ChatDialog(QWidget *parent = 0);
+
+public slots:
+ void appendMessage(const QString &from, const QString &message);
+
+private slots:
+ void returnPressed();
+ void newParticipant(const QString &nick);
+ void participantLeft(const QString &nick);
+ void showInformation();
+
+private:
+ Client client;
+ QString myNickName;
+ QTextTableFormat tableFormat;
+};
+
+#endif
diff --git a/examples/network/network-chat/chatdialog.ui b/examples/network/network-chat/chatdialog.ui
new file mode 100644
index 0000000..c85e0d0
--- /dev/null
+++ b/examples/network/network-chat/chatdialog.ui
@@ -0,0 +1,79 @@
+<ui version="4.0" >
+ <class>ChatDialog</class>
+ <widget class="QDialog" name="ChatDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>513</width>
+ <height>349</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Chat</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="textEdit" >
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QListWidget" name="listWidget" >
+ <property name="maximumSize" >
+ <size>
+ <width>180</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Message:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit" />
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp
new file mode 100644
index 0000000..d5931a6
--- /dev/null
+++ b/examples/network/network-chat/client.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtNetwork>
+
+#include "client.h"
+#include "connection.h"
+#include "peermanager.h"
+
+Client::Client()
+{
+ peerManager = new PeerManager(this);
+ peerManager->setServerPort(server.serverPort());
+ peerManager->startBroadcasting();
+
+ QObject::connect(peerManager, SIGNAL(newConnection(Connection *)),
+ this, SLOT(newConnection(Connection *)));
+ QObject::connect(&server, SIGNAL(newConnection(Connection *)),
+ this, SLOT(newConnection(Connection *)));
+}
+
+void Client::sendMessage(const QString &message)
+{
+ if (message.isEmpty())
+ return;
+
+ QList<Connection *> connections = peers.values();
+ foreach (Connection *connection, connections)
+ connection->sendMessage(message);
+}
+
+QString Client::nickName() const
+{
+ return QString(peerManager->userName()) + "@" + QHostInfo::localHostName()
+ + ":" + QString::number(server.serverPort());
+}
+
+bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const
+{
+ if (senderPort == -1)
+ return peers.contains(senderIp);
+
+ if (!peers.contains(senderIp))
+ return false;
+
+ QList<Connection *> connections = peers.values(senderIp);
+ foreach (Connection *connection, connections) {
+ if (connection->peerPort() == senderPort)
+ return true;
+ }
+
+ return false;
+}
+
+void Client::newConnection(Connection *connection)
+{
+ connection->setGreetingMessage(peerManager->userName());
+
+ connect(connection, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SLOT(connectionError(QAbstractSocket::SocketError)));
+ connect(connection, SIGNAL(disconnected()), this, SLOT(disconnected()));
+ connect(connection, SIGNAL(readyForUse()), this, SLOT(readyForUse()));
+}
+
+void Client::readyForUse()
+{
+ Connection *connection = qobject_cast<Connection *>(sender());
+ if (!connection || hasConnection(connection->peerAddress(),
+ connection->peerPort()))
+ return;
+
+ connect(connection, SIGNAL(newMessage(const QString &, const QString &)),
+ this, SIGNAL(newMessage(const QString &, const QString &)));
+
+ peers.insert(connection->peerAddress(), connection);
+ QString nick = connection->name();
+ if (!nick.isEmpty())
+ emit newParticipant(nick);
+}
+
+void Client::disconnected()
+{
+ if (Connection *connection = qobject_cast<Connection *>(sender()))
+ removeConnection(connection);
+}
+
+void Client::connectionError(QAbstractSocket::SocketError /* socketError */)
+{
+ if (Connection *connection = qobject_cast<Connection *>(sender()))
+ removeConnection(connection);
+}
+
+void Client::removeConnection(Connection *connection)
+{
+ if (peers.contains(connection->peerAddress())) {
+ peers.remove(connection->peerAddress());
+ QString nick = connection->name();
+ if (!nick.isEmpty())
+ emit participantLeft(nick);
+ }
+ connection->deleteLater();
+}
diff --git a/examples/network/network-chat/client.h b/examples/network/network-chat/client.h
new file mode 100644
index 0000000..307df46
--- /dev/null
+++ b/examples/network/network-chat/client.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include <QAbstractSocket>
+#include <QHash>
+#include <QHostAddress>
+
+#include "server.h"
+
+class PeerManager;
+
+class Client : public QObject
+{
+ Q_OBJECT
+
+public:
+ Client();
+
+ void sendMessage(const QString &message);
+ QString nickName() const;
+ bool hasConnection(const QHostAddress &senderIp, int senderPort = -1) const;
+
+signals:
+ void newMessage(const QString &from, const QString &message);
+ void newParticipant(const QString &nick);
+ void participantLeft(const QString &nick);
+
+private slots:
+ void newConnection(Connection *connection);
+ void connectionError(QAbstractSocket::SocketError socketError);
+ void disconnected();
+ void readyForUse();
+
+private:
+ void removeConnection(Connection *connection);
+
+ PeerManager *peerManager;
+ Server server;
+ QMultiHash<QHostAddress, Connection *> peers;
+};
+
+#endif
diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp
new file mode 100644
index 0000000..116ca3a
--- /dev/null
+++ b/examples/network/network-chat/connection.cpp
@@ -0,0 +1,276 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "connection.h"
+
+#include <QtNetwork>
+
+static const int TransferTimeout = 30 * 1000;
+static const int PongTimeout = 60 * 1000;
+static const int PingInterval = 5 * 1000;
+static const char SeparatorToken = ' ';
+
+Connection::Connection(QObject *parent)
+ : QTcpSocket(parent)
+{
+ greetingMessage = tr("undefined");
+ username = tr("unknown");
+ state = WaitingForGreeting;
+ currentDataType = Undefined;
+ numBytesForCurrentDataType = -1;
+ transferTimerId = 0;
+ isGreetingMessageSent = false;
+ pingTimer.setInterval(PingInterval);
+
+ QObject::connect(this, SIGNAL(readyRead()), this, SLOT(processReadyRead()));
+ QObject::connect(this, SIGNAL(disconnected()), &pingTimer, SLOT(stop()));
+ QObject::connect(&pingTimer, SIGNAL(timeout()), this, SLOT(sendPing()));
+ QObject::connect(this, SIGNAL(connected()),
+ this, SLOT(sendGreetingMessage()));
+}
+
+QString Connection::name() const
+{
+ return username;
+}
+
+void Connection::setGreetingMessage(const QString &message)
+{
+ greetingMessage = message;
+}
+
+bool Connection::sendMessage(const QString &message)
+{
+ if (message.isEmpty())
+ return false;
+
+ QByteArray msg = message.toUtf8();
+ QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg;
+ return write(data) == data.size();
+}
+
+void Connection::timerEvent(QTimerEvent *timerEvent)
+{
+ if (timerEvent->timerId() == transferTimerId) {
+ abort();
+ killTimer(transferTimerId);
+ transferTimerId = 0;
+ }
+}
+
+void Connection::processReadyRead()
+{
+ if (state == WaitingForGreeting) {
+ if (!readProtocolHeader())
+ return;
+ if (currentDataType != Greeting) {
+ abort();
+ return;
+ }
+ state = ReadingGreeting;
+ }
+
+ if (state == ReadingGreeting) {
+ if (!hasEnoughData())
+ return;
+
+ buffer = read(numBytesForCurrentDataType);
+ if (buffer.size() != numBytesForCurrentDataType) {
+ abort();
+ return;
+ }
+
+ username = QString(buffer) + "@" + peerAddress().toString() + ":"
+ + QString::number(peerPort());
+ currentDataType = Undefined;
+ numBytesForCurrentDataType = 0;
+ buffer.clear();
+
+ if (!isValid()) {
+ abort();
+ return;
+ }
+
+ if (!isGreetingMessageSent)
+ sendGreetingMessage();
+
+ pingTimer.start();
+ pongTime.start();
+ state = ReadyForUse;
+ emit readyForUse();
+ }
+
+ do {
+ if (currentDataType == Undefined) {
+ if (!readProtocolHeader())
+ return;
+ }
+ if (!hasEnoughData())
+ return;
+ processData();
+ } while (bytesAvailable() > 0);
+}
+
+void Connection::sendPing()
+{
+ if (pongTime.elapsed() > PongTimeout) {
+ abort();
+ return;
+ }
+
+ write("PING 1 p");
+}
+
+void Connection::sendGreetingMessage()
+{
+ QByteArray greeting = greetingMessage.toUtf8();
+ QByteArray data = "GREETING " + QByteArray::number(greeting.size()) + " " + greeting;
+ if (write(data) == data.size())
+ isGreetingMessageSent = true;
+}
+
+int Connection::readDataIntoBuffer(int maxSize)
+{
+ if (maxSize > MaxBufferSize)
+ return 0;
+
+ int numBytesBeforeRead = buffer.size();
+ if (numBytesBeforeRead == MaxBufferSize) {
+ abort();
+ return 0;
+ }
+
+ while (bytesAvailable() > 0 && buffer.size() < maxSize) {
+ buffer.append(read(1));
+ if (buffer.endsWith(SeparatorToken))
+ break;
+ }
+ return buffer.size() - numBytesBeforeRead;
+}
+
+int Connection::dataLengthForCurrentDataType()
+{
+ if (bytesAvailable() <= 0 || readDataIntoBuffer() <= 0
+ || !buffer.endsWith(SeparatorToken))
+ return 0;
+
+ buffer.chop(1);
+ int number = buffer.toInt();
+ buffer.clear();
+ return number;
+}
+
+bool Connection::readProtocolHeader()
+{
+ if (transferTimerId) {
+ killTimer(transferTimerId);
+ transferTimerId = 0;
+ }
+
+ if (readDataIntoBuffer() <= 0) {
+ transferTimerId = startTimer(TransferTimeout);
+ return false;
+ }
+
+ if (buffer == "PING ") {
+ currentDataType = Ping;
+ } else if (buffer == "PONG ") {
+ currentDataType = Pong;
+ } else if (buffer == "MESSAGE ") {
+ currentDataType = PlainText;
+ } else if (buffer == "GREETING ") {
+ currentDataType = Greeting;
+ } else {
+ currentDataType = Undefined;
+ abort();
+ return false;
+ }
+
+ buffer.clear();
+ numBytesForCurrentDataType = dataLengthForCurrentDataType();
+ return true;
+}
+
+bool Connection::hasEnoughData()
+{
+ if (transferTimerId) {
+ QObject::killTimer(transferTimerId);
+ transferTimerId = 0;
+ }
+
+ if (numBytesForCurrentDataType <= 0)
+ numBytesForCurrentDataType = dataLengthForCurrentDataType();
+
+ if (bytesAvailable() < numBytesForCurrentDataType
+ || numBytesForCurrentDataType <= 0) {
+ transferTimerId = startTimer(TransferTimeout);
+ return false;
+ }
+
+ return true;
+}
+
+void Connection::processData()
+{
+ buffer = read(numBytesForCurrentDataType);
+ if (buffer.size() != numBytesForCurrentDataType) {
+ abort();
+ return;
+ }
+
+ switch (currentDataType) {
+ case PlainText:
+ emit newMessage(username, QString::fromUtf8(buffer));
+ break;
+ case Ping:
+ write("PONG 1 p");
+ break;
+ case Pong:
+ pongTime.restart();
+ break;
+ default:
+ break;
+ }
+
+ currentDataType = Undefined;
+ numBytesForCurrentDataType = 0;
+ buffer.clear();
+}
diff --git a/examples/network/network-chat/connection.h b/examples/network/network-chat/connection.h
new file mode 100644
index 0000000..0784154
--- /dev/null
+++ b/examples/network/network-chat/connection.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONNECTION_H
+#define CONNECTION_H
+
+#include <QHostAddress>
+#include <QString>
+#include <QTcpSocket>
+#include <QTime>
+#include <QTimer>
+
+static const int MaxBufferSize = 1024000;
+
+class Connection : public QTcpSocket
+{
+ Q_OBJECT
+
+public:
+ enum ConnectionState {
+ WaitingForGreeting,
+ ReadingGreeting,
+ ReadyForUse
+ };
+ enum DataType {
+ PlainText,
+ Ping,
+ Pong,
+ Greeting,
+ Undefined
+ };
+
+ Connection(QObject *parent = 0);
+
+ QString name() const;
+ void setGreetingMessage(const QString &message);
+ bool sendMessage(const QString &message);
+
+signals:
+ void readyForUse();
+ void newMessage(const QString &from, const QString &message);
+
+protected:
+ void timerEvent(QTimerEvent *timerEvent);
+
+private slots:
+ void processReadyRead();
+ void sendPing();
+ void sendGreetingMessage();
+
+private:
+ int readDataIntoBuffer(int maxSize = MaxBufferSize);
+ int dataLengthForCurrentDataType();
+ bool readProtocolHeader();
+ bool hasEnoughData();
+ void processData();
+
+ QString greetingMessage;
+ QString username;
+ QTimer pingTimer;
+ QTime pongTime;
+ QByteArray buffer;
+ ConnectionState state;
+ DataType currentDataType;
+ int numBytesForCurrentDataType;
+ int transferTimerId;
+ bool isGreetingMessageSent;
+};
+
+#endif
diff --git a/examples/network/network-chat/main.cpp b/examples/network/network-chat/main.cpp
new file mode 100644
index 0000000..ffe28c9
--- /dev/null
+++ b/examples/network/network-chat/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "chatdialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ChatDialog dialog;
+ dialog.show();
+ return app.exec();
+}
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
new file mode 100644
index 0000000..5d5efea
--- /dev/null
+++ b/examples/network/network-chat/network-chat.pro
@@ -0,0 +1,19 @@
+HEADERS = chatdialog.h \
+ client.h \
+ connection.h \
+ peermanager.h \
+ server.h
+SOURCES = chatdialog.cpp \
+ client.cpp \
+ connection.cpp \
+ main.cpp \
+ peermanager.cpp \
+ server.cpp
+FORMS = chatdialog.ui
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/network-chat
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS network-chat.pro *.chat
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/network-chat
+INSTALLS += target sources
diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp
new file mode 100644
index 0000000..4ed4c5a
--- /dev/null
+++ b/examples/network/network-chat/peermanager.cpp
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtNetwork>
+
+#include "client.h"
+#include "connection.h"
+#include "peermanager.h"
+
+static const qint32 BroadcastInterval = 2000;
+static const unsigned broadcastPort = 45000;
+
+PeerManager::PeerManager(Client *client)
+ : QObject(client)
+{
+ this->client = client;
+
+ QStringList envVariables;
+ envVariables << "USERNAME.*" << "USER.*" << "USERDOMAIN.*"
+ << "HOSTNAME.*" << "DOMAINNAME.*";
+
+ QStringList environment = QProcess::systemEnvironment();
+ foreach (QString string, envVariables) {
+ int index = environment.indexOf(QRegExp(string));
+ if (index != -1) {
+ QStringList stringList = environment.at(index).split("=");
+ if (stringList.size() == 2) {
+ username = stringList.at(1).toUtf8();
+ break;
+ }
+ }
+ }
+
+ if (username.isEmpty())
+ username = "unknown";
+
+ updateAddresses();
+ serverPort = 0;
+
+ broadcastSocket.bind(QHostAddress::Any, broadcastPort, QUdpSocket::ShareAddress
+ | QUdpSocket::ReuseAddressHint);
+ connect(&broadcastSocket, SIGNAL(readyRead()),
+ this, SLOT(readBroadcastDatagram()));
+
+ broadcastTimer.setInterval(BroadcastInterval);
+ connect(&broadcastTimer, SIGNAL(timeout()),
+ this, SLOT(sendBroadcastDatagram()));
+}
+
+void PeerManager::setServerPort(int port)
+{
+ serverPort = port;
+}
+
+QByteArray PeerManager::userName() const
+{
+ return username;
+}
+
+void PeerManager::startBroadcasting()
+{
+ broadcastTimer.start();
+}
+
+bool PeerManager::isLocalHostAddress(const QHostAddress &address)
+{
+ foreach (QHostAddress localAddress, ipAddresses) {
+ if (address == localAddress)
+ return true;
+ }
+ return false;
+}
+
+void PeerManager::sendBroadcastDatagram()
+{
+ QByteArray datagram(username);
+ datagram.append('@');
+ datagram.append(QByteArray::number(serverPort));
+
+ bool validBroadcastAddresses = true;
+ foreach (QHostAddress address, broadcastAddresses) {
+ if (broadcastSocket.writeDatagram(datagram, address,
+ broadcastPort) == -1)
+ validBroadcastAddresses = false;
+ }
+
+ if (!validBroadcastAddresses)
+ updateAddresses();
+}
+
+void PeerManager::readBroadcastDatagram()
+{
+ while (broadcastSocket.hasPendingDatagrams()) {
+ QHostAddress senderIp;
+ quint16 senderPort;
+ QByteArray datagram;
+ datagram.resize(broadcastSocket.pendingDatagramSize());
+ if (broadcastSocket.readDatagram(datagram.data(), datagram.size(),
+ &senderIp, &senderPort) == -1)
+ continue;
+
+ QList<QByteArray> list = datagram.split('@');
+ if (list.size() != 2)
+ continue;
+
+ int senderServerPort = list.at(1).toInt();
+ if (isLocalHostAddress(senderIp) && senderServerPort == serverPort)
+ continue;
+
+ if (!client->hasConnection(senderIp)) {
+ Connection *connection = new Connection(this);
+ emit newConnection(connection);
+ connection->connectToHost(senderIp, senderServerPort);
+ }
+ }
+}
+
+void PeerManager::updateAddresses()
+{
+ broadcastAddresses.clear();
+ ipAddresses.clear();
+ foreach (QNetworkInterface interface, QNetworkInterface::allInterfaces()) {
+ foreach (QNetworkAddressEntry entry, interface.addressEntries()) {
+ QHostAddress broadcastAddress = entry.broadcast();
+ if (broadcastAddress != QHostAddress::Null &&
+ entry.ip() != QHostAddress::LocalHost) {
+ broadcastAddresses << broadcastAddress;
+ ipAddresses << entry.ip();
+ }
+ }
+ }
+}
diff --git a/examples/network/network-chat/peermanager.h b/examples/network/network-chat/peermanager.h
new file mode 100644
index 0000000..a729329
--- /dev/null
+++ b/examples/network/network-chat/peermanager.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PEERMANAGER_H
+#define PEERMANAGER_H
+
+#include <QByteArray>
+#include <QList>
+#include <QObject>
+#include <QTimer>
+#include <QUdpSocket>
+
+class Client;
+class Connection;
+
+class PeerManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ PeerManager(Client *client);
+
+ void setServerPort(int port);
+ QByteArray userName() const;
+ void startBroadcasting();
+ bool isLocalHostAddress(const QHostAddress &address);
+
+signals:
+ void newConnection(Connection *connection);
+
+private slots:
+ void sendBroadcastDatagram();
+ void readBroadcastDatagram();
+
+private:
+ void updateAddresses();
+
+ Client *client;
+ QList<QHostAddress> broadcastAddresses;
+ QList<QHostAddress> ipAddresses;
+ QUdpSocket broadcastSocket;
+ QTimer broadcastTimer;
+ QByteArray username;
+ int serverPort;
+};
+
+#endif
diff --git a/examples/network/network-chat/server.cpp b/examples/network/network-chat/server.cpp
new file mode 100644
index 0000000..26f1e70
--- /dev/null
+++ b/examples/network/network-chat/server.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtNetwork>
+
+#include "connection.h"
+#include "server.h"
+
+Server::Server(QObject *parent)
+ : QTcpServer(parent)
+{
+ listen(QHostAddress::Any);
+}
+
+void Server::incomingConnection(int socketDescriptor)
+{
+ Connection *connection = new Connection(this);
+ connection->setSocketDescriptor(socketDescriptor);
+ emit newConnection(connection);
+}
diff --git a/examples/network/network-chat/server.h b/examples/network/network-chat/server.h
new file mode 100644
index 0000000..d297693
--- /dev/null
+++ b/examples/network/network-chat/server.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <QTcpServer>
+
+class Connection;
+
+class Server : public QTcpServer
+{
+ Q_OBJECT
+
+public:
+ Server(QObject *parent = 0);
+
+signals:
+ void newConnection(Connection *connection);
+
+protected:
+ void incomingConnection(int socketDescriptor);
+};
+
+#endif
diff --git a/examples/network/network.pro b/examples/network/network.pro
new file mode 100644
index 0000000..13b3116
--- /dev/null
+++ b/examples/network/network.pro
@@ -0,0 +1,21 @@
+TEMPLATE = subdirs
+SUBDIRS = blockingfortuneclient \
+ broadcastreceiver \
+ broadcastsender \
+ network-chat \
+ download \
+ downloadmanager \
+ fortuneclient \
+ fortuneserver \
+ ftp \
+ http \
+ loopback \
+ threadedfortuneserver \
+ torrent
+
+contains(QT_CONFIG, openssl):SUBDIRS += securesocketclient
+
+# install
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS network.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/network
+INSTALLS += sources
diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp
new file mode 100644
index 0000000..d9be2e3
--- /dev/null
+++ b/examples/network/securesocketclient/certificateinfo.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "certificateinfo.h"
+#include "ui_certificateinfo.h"
+
+CertificateInfo::CertificateInfo(QWidget *parent)
+ : QDialog(parent)
+{
+ form = new Ui_CertificateInfo;
+ form->setupUi(this);
+
+ connect(form->certificationPathView, SIGNAL(currentRowChanged(int)),
+ this, SLOT(updateCertificateInfo(int)));
+}
+
+CertificateInfo::~CertificateInfo()
+{
+ delete form;
+}
+
+void CertificateInfo::setCertificateChain(const QList<QSslCertificate> &chain)
+{
+ this->chain = chain;
+
+ form->certificationPathView->clear();
+
+ for (int i = 0; i < chain.size(); ++i) {
+ const QSslCertificate &cert = chain.at(i);
+ form->certificationPathView->addItem(tr("%1%2 (%3)").arg(!i ? QString() : tr("Issued by: "))
+ .arg(cert.subjectInfo(QSslCertificate::Organization))
+ .arg(cert.subjectInfo(QSslCertificate::CommonName)));
+ }
+
+ form->certificationPathView->setCurrentRow(0);
+}
+
+void CertificateInfo::updateCertificateInfo(int index)
+{
+ form->certificateInfoView->clear();
+ if (index >= 0 && index < chain.size()) {
+ const QSslCertificate &cert = chain.at(index);
+ QStringList lines;
+ lines << tr("Organization: %1").arg(cert.subjectInfo(QSslCertificate::Organization))
+ << tr("Subunit: %1").arg(cert.subjectInfo(QSslCertificate::OrganizationalUnitName))
+ << tr("Country: %1").arg(cert.subjectInfo(QSslCertificate::CountryName))
+ << tr("Locality: %1").arg(cert.subjectInfo(QSslCertificate::LocalityName))
+ << tr("State/Province: %1").arg(cert.subjectInfo(QSslCertificate::StateOrProvinceName))
+ << tr("Common Name: %1").arg(cert.subjectInfo(QSslCertificate::CommonName))
+ << QString()
+ << tr("Issuer Organization: %1").arg(cert.issuerInfo(QSslCertificate::Organization))
+ << tr("Issuer Unit Name: %1").arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName))
+ << tr("Issuer Country: %1").arg(cert.issuerInfo(QSslCertificate::CountryName))
+ << tr("Issuer Locality: %1").arg(cert.issuerInfo(QSslCertificate::LocalityName))
+ << tr("Issuer State/Province: %1").arg(cert.issuerInfo(QSslCertificate::StateOrProvinceName))
+ << tr("Issuer Common Name: %1").arg(cert.issuerInfo(QSslCertificate::CommonName));
+ foreach (QString line, lines)
+ form->certificateInfoView->addItem(line);
+ } else {
+ form->certificateInfoView->clear();
+ }
+}
diff --git a/examples/network/securesocketclient/certificateinfo.h b/examples/network/securesocketclient/certificateinfo.h
new file mode 100644
index 0000000..dc6a200
--- /dev/null
+++ b/examples/network/securesocketclient/certificateinfo.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CERTIFICATEINFO_H
+#define CERTIFICATEINFO_H
+
+#include <QtGui/QDialog>
+#include <QtNetwork/QSslCertificate>
+
+QT_BEGIN_NAMESPACE
+class Ui_CertificateInfo;
+QT_END_NAMESPACE
+
+class CertificateInfo : public QDialog
+{
+ Q_OBJECT
+public:
+ CertificateInfo(QWidget *parent = 0);
+ ~CertificateInfo();
+
+ void setCertificateChain(const QList<QSslCertificate> &chain);
+
+private slots:
+ void updateCertificateInfo(int index);
+
+private:
+ Ui_CertificateInfo *form;
+ QList<QSslCertificate> chain;
+};
+
+#endif
diff --git a/examples/network/securesocketclient/certificateinfo.ui b/examples/network/securesocketclient/certificateinfo.ui
new file mode 100644
index 0000000..3761fe8
--- /dev/null
+++ b/examples/network/securesocketclient/certificateinfo.ui
@@ -0,0 +1,85 @@
+<ui version="4.0" >
+ <class>CertificateInfo</class>
+ <widget class="QDialog" name="CertificateInfo" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>397</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Display Certificate Information</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Certification Path</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QListWidget" name="certificationPathView" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Certificate Information</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QListWidget" name="certificateInfoView" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>clicked(QAbstractButton*)</signal>
+ <receiver>CertificateInfo</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>343</x>
+ <y>374</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>352</x>
+ <y>422</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/network/securesocketclient/encrypted.png b/examples/network/securesocketclient/encrypted.png
new file mode 100644
index 0000000..04a05c1
--- /dev/null
+++ b/examples/network/securesocketclient/encrypted.png
Binary files differ
diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp
new file mode 100644
index 0000000..200aa26
--- /dev/null
+++ b/examples/network/securesocketclient/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMessageBox>
+
+#include "sslclient.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(securesocketclient);
+
+ QApplication app(argc, argv);
+
+ if (!QSslSocket::supportsSsl()) {
+ QMessageBox::information(0, "Secure Socket Client",
+ "This system does not support OpenSSL.");
+ return -1;
+ }
+
+ SslClient client;
+ client.show();
+
+ return app.exec();
+}
diff --git a/examples/network/securesocketclient/securesocketclient.pro b/examples/network/securesocketclient/securesocketclient.pro
new file mode 100644
index 0000000..4d70a71
--- /dev/null
+++ b/examples/network/securesocketclient/securesocketclient.pro
@@ -0,0 +1,16 @@
+HEADERS += certificateinfo.h \
+ sslclient.h
+SOURCES += certificateinfo.cpp \
+ main.cpp \
+ sslclient.cpp
+RESOURCES += securesocketclient.qrc
+FORMS += certificateinfo.ui \
+ sslclient.ui \
+ sslerrors.ui
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/securesocketclient
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.jpg images
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/securesocketclient
+INSTALLS += target sources
diff --git a/examples/network/securesocketclient/securesocketclient.qrc b/examples/network/securesocketclient/securesocketclient.qrc
new file mode 100644
index 0000000..83b49c7
--- /dev/null
+++ b/examples/network/securesocketclient/securesocketclient.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>encrypted.png</file>
+</qresource>
+</RCC>
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
new file mode 100644
index 0000000..bf8443d
--- /dev/null
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "certificateinfo.h"
+#include "sslclient.h"
+#include "ui_sslclient.h"
+#include "ui_sslerrors.h"
+
+#include <QtGui/QScrollBar>
+#include <QtGui/QStyle>
+#include <QtGui/QToolButton>
+#include <QtNetwork/QSslCipher>
+
+SslClient::SslClient(QWidget *parent)
+ : QWidget(parent), socket(0), padLock(0), executingDialog(false)
+{
+ form = new Ui_Form;
+ form->setupUi(this);
+ form->hostNameEdit->setSelection(0, form->hostNameEdit->text().size());
+ form->sessionOutput->setHtml(tr("&lt;not connected&gt;"));
+
+ connect(form->hostNameEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(updateEnabledState()));
+ connect(form->connectButton, SIGNAL(clicked()),
+ this, SLOT(secureConnect()));
+ connect(form->sendButton, SIGNAL(clicked()),
+ this, SLOT(sendData()));
+}
+
+SslClient::~SslClient()
+{
+ delete form;
+}
+
+void SslClient::updateEnabledState()
+{
+ bool unconnected = !socket || socket->state() == QAbstractSocket::UnconnectedState;
+
+ form->hostNameEdit->setReadOnly(!unconnected);
+ form->hostNameEdit->setFocusPolicy(unconnected ? Qt::StrongFocus : Qt::NoFocus);
+
+ form->hostNameLabel->setEnabled(unconnected);
+ form->portBox->setEnabled(unconnected);
+ form->portLabel->setEnabled(unconnected);
+ form->connectButton->setEnabled(unconnected && !form->hostNameEdit->text().isEmpty());
+
+ bool connected = socket && socket->state() == QAbstractSocket::ConnectedState;
+ form->sessionBox->setEnabled(connected);
+ form->sessionOutput->setEnabled(connected);
+ form->sessionInput->setEnabled(connected);
+ form->sessionInputLabel->setEnabled(connected);
+ form->sendButton->setEnabled(connected);
+}
+
+void SslClient::secureConnect()
+{
+ if (!socket) {
+ socket = new QSslSocket(this);
+ connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
+ this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
+ connect(socket, SIGNAL(encrypted()),
+ this, SLOT(socketEncrypted()));
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)),
+ this, SLOT(sslErrors(QList<QSslError>)));
+ connect(socket, SIGNAL(readyRead()),
+ this, SLOT(socketReadyRead()));
+ }
+
+ socket->connectToHostEncrypted(form->hostNameEdit->text(), form->portBox->value());
+ updateEnabledState();
+}
+
+void SslClient::socketStateChanged(QAbstractSocket::SocketState state)
+{
+ if (executingDialog)
+ return;
+
+ updateEnabledState();
+ if (state == QAbstractSocket::UnconnectedState) {
+ form->hostNameEdit->setPalette(QPalette());
+ form->hostNameEdit->setFocus();
+ form->cipherLabel->setText(tr("<none>"));
+ if (padLock)
+ padLock->hide();
+ socket->deleteLater();
+ socket = 0;
+ }
+}
+
+void SslClient::socketEncrypted()
+{
+ if (!socket)
+ return; // might have disconnected already
+
+ form->sessionOutput->clear();
+ form->sessionInput->setFocus();
+
+ QPalette palette;
+ palette.setColor(QPalette::Base, QColor(255, 255, 192));
+ form->hostNameEdit->setPalette(palette);
+
+ QSslCipher ciph = socket->sessionCipher();
+ QString cipher = QString("%1, %2 (%3/%4)").arg(ciph.authenticationMethod())
+ .arg(ciph.name()).arg(ciph.usedBits()).arg(ciph.supportedBits());;
+ form->cipherLabel->setText(cipher);
+
+ if (!padLock) {
+ padLock = new QToolButton;
+ padLock->setIcon(QIcon(":/encrypted.png"));
+ padLock->setCursor(Qt::ArrowCursor);
+ padLock->setToolTip(tr("Display encryption details."));
+
+ int extent = form->hostNameEdit->height() - 2;
+ padLock->resize(extent, extent);
+ padLock->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored);
+
+ QHBoxLayout *layout = new QHBoxLayout(form->hostNameEdit);
+ layout->setMargin(form->hostNameEdit->style()->pixelMetric(QStyle::PM_DefaultFrameWidth));
+ layout->setSpacing(0);
+ layout->addStretch();
+ layout->addWidget(padLock);
+
+ form->hostNameEdit->setLayout(layout);
+
+ connect(padLock, SIGNAL(clicked()),
+ this, SLOT(displayCertificateInfo()));
+ } else {
+ padLock->show();
+ }
+}
+
+void SslClient::socketReadyRead()
+{
+ appendString(QString::fromUtf8(socket->readAll()));
+}
+
+void SslClient::sendData()
+{
+ QString input = form->sessionInput->text();
+ appendString(input + "\n");
+ socket->write(input.toUtf8() + "\r\n");
+ form->sessionInput->clear();
+}
+
+void SslClient::sslErrors(const QList<QSslError> &errors)
+{
+ QDialog errorDialog(this);
+ Ui_SslErrors ui;
+ ui.setupUi(&errorDialog);
+ connect(ui.certificateChainButton, SIGNAL(clicked()),
+ this, SLOT(displayCertificateInfo()));
+
+ foreach (const QSslError &error, errors)
+ ui.sslErrorList->addItem(error.errorString());
+
+ executingDialog = true;
+ if (errorDialog.exec() == QDialog::Accepted)
+ socket->ignoreSslErrors();
+ executingDialog = false;
+
+ // did the socket state change?
+ if (socket->state() != QAbstractSocket::ConnectedState)
+ socketStateChanged(socket->state());
+}
+
+void SslClient::displayCertificateInfo()
+{
+ CertificateInfo *info = new CertificateInfo(this);
+ info->setCertificateChain(socket->peerCertificateChain());
+ info->exec();
+ info->deleteLater();
+}
+
+void SslClient::appendString(const QString &line)
+{
+ QTextCursor cursor(form->sessionOutput->textCursor());
+ cursor.movePosition(QTextCursor::End);
+ cursor.insertText(line);
+ form->sessionOutput->verticalScrollBar()->setValue(form->sessionOutput->verticalScrollBar()->maximum());
+}
diff --git a/examples/network/securesocketclient/sslclient.h b/examples/network/securesocketclient/sslclient.h
new file mode 100644
index 0000000..ae208bb
--- /dev/null
+++ b/examples/network/securesocketclient/sslclient.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SSLCLIENT_H
+#define SSLCLIENT_H
+
+#include <QtGui/QWidget>
+#include <QtNetwork/QAbstractSocket>
+#include <QtNetwork/QSslSocket>
+
+QT_BEGIN_NAMESPACE
+class QSslSocket;
+class QToolButton;
+class Ui_Form;
+QT_END_NAMESPACE
+
+class SslClient : public QWidget
+{
+ Q_OBJECT
+public:
+ SslClient(QWidget *parent = 0);
+ ~SslClient();
+
+private slots:
+ void updateEnabledState();
+ void secureConnect();
+ void socketStateChanged(QAbstractSocket::SocketState state);
+ void socketEncrypted();
+ void socketReadyRead();
+ void sendData();
+ void sslErrors(const QList<QSslError> &errors);
+ void displayCertificateInfo();
+
+private:
+ void appendString(const QString &line);
+
+ QSslSocket *socket;
+ QToolButton *padLock;
+ Ui_Form *form;
+ bool executingDialog;
+};
+
+#endif
diff --git a/examples/network/securesocketclient/sslclient.ui b/examples/network/securesocketclient/sslclient.ui
new file mode 100644
index 0000000..5a24751
--- /dev/null
+++ b/examples/network/securesocketclient/sslclient.ui
@@ -0,0 +1,190 @@
+<ui version="4.0" >
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>343</width>
+ <height>320</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Secure Socket Client</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="hostNameLabel" >
+ <property name="text" >
+ <string>Host name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="hostNameEdit" >
+ <property name="text" >
+ <string>imap.example.com</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="portLabel" >
+ <property name="text" >
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="portBox" >
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="maximum" >
+ <number>65535</number>
+ </property>
+ <property name="value" >
+ <number>993</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="connectButton" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="text" >
+ <string>Connect to host</string>
+ </property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="sessionBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="title" >
+ <string>Active session</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="cipherText" >
+ <property name="text" >
+ <string>Cryptographic Cipher:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="cipherLabel" >
+ <property name="text" >
+ <string>&lt;none></string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="sessionOutput" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="sessionInputLabel" >
+ <property name="text" >
+ <string>Input:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="sessionInput" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="sendButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::TabFocus</enum>
+ </property>
+ <property name="text" >
+ <string>&amp;Send</string>
+ </property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>hostNameEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>connectButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>126</x>
+ <y>20</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>142</x>
+ <y>78</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>sessionInput</sender>
+ <signal>returnPressed()</signal>
+ <receiver>sendButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>142</x>
+ <y>241</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>297</x>
+ <y>234</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/network/securesocketclient/sslerrors.ui b/examples/network/securesocketclient/sslerrors.ui
new file mode 100644
index 0000000..4aac18c
--- /dev/null
+++ b/examples/network/securesocketclient/sslerrors.ui
@@ -0,0 +1,110 @@
+<ui version="4.0" >
+ <class>SslErrors</class>
+ <widget class="QDialog" name="SslErrors" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>371</width>
+ <height>216</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Unable To Validate The Connection</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; color:#ff0000;">Warning&lt;/span>&lt;span style=" color:#ff0000;">:&lt;/span>&lt;span style=" color:#000000;"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click &lt;/span>&lt;span style=" color:#000000;">Ignore&lt;/span>&lt;span style=" color:#000000;"> to continue, or &lt;/span>&lt;span style=" color:#000000;">Cancel&lt;/span>&lt;span style=" color:#000000;"> to abort the connection.&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QListWidget" name="sslErrorList" />
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="certificateChainButton" >
+ <property name="text" >
+ <string>View Certificate Chain</string>
+ </property>
+ <property name="autoDefault" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton" >
+ <property name="text" >
+ <string>Ignore</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton_2" >
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>pushButton</sender>
+ <signal>clicked()</signal>
+ <receiver>SslErrors</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>235</x>
+ <y>185</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>228</x>
+ <y>287</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>pushButton_2</sender>
+ <signal>clicked()</signal>
+ <receiver>SslErrors</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>325</x>
+ <y>192</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>333</x>
+ <y>231</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
new file mode 100644
index 0000000..4161c7f
--- /dev/null
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtNetwork>
+
+#include <stdlib.h>
+
+#include "dialog.h"
+#include "fortuneserver.h"
+
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent)
+{
+ statusLabel = new QLabel;
+ quitButton = new QPushButton(tr("Quit"));
+ quitButton->setAutoDefault(false);
+
+ if (!server.listen()) {
+ QMessageBox::critical(this, tr("Threaded Fortune Server"),
+ tr("Unable to start the server: %1.")
+ .arg(server.errorString()));
+ close();
+ return;
+ }
+
+ statusLabel->setText(tr("The server is running on port %1.\n"
+ "Run the Fortune Client example now.")
+ .arg(server.serverPort()));
+
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout;
+ buttonLayout->addStretch(1);
+ buttonLayout->addWidget(quitButton);
+ buttonLayout->addStretch(1);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(statusLabel);
+ mainLayout->addLayout(buttonLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Threaded Fortune Server"));
+}
diff --git a/examples/network/threadedfortuneserver/dialog.h b/examples/network/threadedfortuneserver/dialog.h
new file mode 100644
index 0000000..5fe1c67
--- /dev/null
+++ b/examples/network/threadedfortuneserver/dialog.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+#include "fortuneserver.h"
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+QT_END_NAMESPACE
+
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QWidget *parent = 0);
+
+private:
+ QLabel *statusLabel;
+ QPushButton *quitButton;
+ FortuneServer server;
+};
+
+#endif
diff --git a/examples/network/threadedfortuneserver/fortuneserver.cpp b/examples/network/threadedfortuneserver/fortuneserver.cpp
new file mode 100644
index 0000000..e23c899
--- /dev/null
+++ b/examples/network/threadedfortuneserver/fortuneserver.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "fortuneserver.h"
+#include "fortunethread.h"
+
+#include <stdlib.h>
+
+//! [0]
+FortuneServer::FortuneServer(QObject *parent)
+ : QTcpServer(parent)
+{
+ fortunes << tr("You've been leading a dog's life. Stay off the furniture.")
+ << tr("You've got to think about tomorrow.")
+ << tr("You will be surprised by a loud noise.")
+ << tr("You will feel hungry again in another hour.")
+ << tr("You might have mail.")
+ << tr("You cannot kill time without injuring eternity.")
+ << tr("Computers are not intelligent. They only think they are.");
+}
+//! [0]
+
+//! [1]
+void FortuneServer::incomingConnection(int socketDescriptor)
+{
+ QString fortune = fortunes.at(qrand() % fortunes.size());
+ FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);
+ connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
+ thread->start();
+}
+//! [1]
diff --git a/examples/network/threadedfortuneserver/fortuneserver.h b/examples/network/threadedfortuneserver/fortuneserver.h
new file mode 100644
index 0000000..2374f85
--- /dev/null
+++ b/examples/network/threadedfortuneserver/fortuneserver.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FORTUNESERVER_H
+#define FORTUNESERVER_H
+
+#include <QStringList>
+#include <QTcpServer>
+
+//! [0]
+class FortuneServer : public QTcpServer
+{
+ Q_OBJECT
+
+public:
+ FortuneServer(QObject *parent = 0);
+
+protected:
+ void incomingConnection(int socketDescriptor);
+
+private:
+ QStringList fortunes;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/threadedfortuneserver/fortunethread.cpp b/examples/network/threadedfortuneserver/fortunethread.cpp
new file mode 100644
index 0000000..8c41076
--- /dev/null
+++ b/examples/network/threadedfortuneserver/fortunethread.cpp
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "fortunethread.h"
+
+#include <QtNetwork>
+
+//! [0]
+FortuneThread::FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent)
+ : QThread(parent), socketDescriptor(socketDescriptor), text(fortune)
+{
+}
+//! [0]
+
+//! [1]
+void FortuneThread::run()
+{
+ QTcpSocket tcpSocket;
+//! [1] //! [2]
+ if (!tcpSocket.setSocketDescriptor(socketDescriptor)) {
+ emit error(tcpSocket.error());
+ return;
+ }
+//! [2] //! [3]
+
+ QByteArray block;
+ QDataStream out(&block, QIODevice::WriteOnly);
+ out.setVersion(QDataStream::Qt_4_0);
+ out << (quint16)0;
+ out << text;
+ out.device()->seek(0);
+ out << (quint16)(block.size() - sizeof(quint16));
+//! [3] //! [4]
+
+ tcpSocket.write(block);
+ tcpSocket.disconnectFromHost();
+ tcpSocket.waitForDisconnected();
+}
+//! [4]
diff --git a/examples/network/threadedfortuneserver/fortunethread.h b/examples/network/threadedfortuneserver/fortunethread.h
new file mode 100644
index 0000000..e534032
--- /dev/null
+++ b/examples/network/threadedfortuneserver/fortunethread.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FORTUNETHREAD_H
+#define FORTUNETHREAD_H
+
+#include <QThread>
+#include <QTcpSocket>
+
+//! [0]
+class FortuneThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ FortuneThread(int socketDescriptor, const QString &fortune, QObject *parent);
+
+ void run();
+
+signals:
+ void error(QTcpSocket::SocketError socketError);
+
+private:
+ int socketDescriptor;
+ QString text;
+};
+//! [0]
+
+#endif
diff --git a/examples/network/threadedfortuneserver/main.cpp b/examples/network/threadedfortuneserver/main.cpp
new file mode 100644
index 0000000..5187495
--- /dev/null
+++ b/examples/network/threadedfortuneserver/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QtCore>
+
+#include <stdlib.h>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Dialog dialog;
+ dialog.show();
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ return dialog.exec();
+}
diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.pro b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
new file mode 100644
index 0000000..0867dac
--- /dev/null
+++ b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
@@ -0,0 +1,14 @@
+HEADERS = dialog.h \
+ fortuneserver.h \
+ fortunethread.h
+SOURCES = dialog.cpp \
+ fortuneserver.cpp \
+ fortunethread.cpp \
+ main.cpp
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/threadedfortuneserver
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS threadedfortuneserver.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/threadedfortuneserver
+INSTALLS += target sources
diff --git a/examples/network/torrent/addtorrentdialog.cpp b/examples/network/torrent/addtorrentdialog.cpp
new file mode 100644
index 0000000..fb43f59
--- /dev/null
+++ b/examples/network/torrent/addtorrentdialog.cpp
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "addtorrentdialog.h"
+#include "metainfo.h"
+
+#include <QFile>
+#include <QFileDialog>
+#include <QLineEdit>
+#include <QMetaObject>
+
+static QString stringNumber(qint64 number)
+{
+ QString tmp;
+ if (number > (1024 * 1024 * 1024))
+ tmp.sprintf("%.2fGB", number / (1024.0 * 1024.0 * 1024.0));
+ else if (number > (1024 * 1024))
+ tmp.sprintf("%.2fMB", number / (1024.0 * 1024.0));
+ else if (number > (1024))
+ tmp.sprintf("%.2fKB", number / (1024.0));
+ else
+ tmp.sprintf("%d bytes", int(number));
+ return tmp;
+}
+
+AddTorrentDialog::AddTorrentDialog(QWidget *parent)
+ : QDialog(parent, Qt::Sheet)
+{
+ ui.setupUi(this);
+
+ connect(ui.browseTorrents, SIGNAL(clicked()),
+ this, SLOT(selectTorrent()));
+ connect(ui.browseDestination, SIGNAL(clicked()),
+ this, SLOT(selectDestination()));
+ connect(ui.torrentFile, SIGNAL(textChanged(const QString &)),
+ this, SLOT(setTorrent(const QString &)));
+
+ ui.destinationFolder->setText(destinationDirectory = QDir::current().path());
+ ui.torrentFile->setFocus();
+}
+
+void AddTorrentDialog::selectTorrent()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a torrent file"),
+ lastDirectory,
+ tr("Torrents (*.torrent);; All files (*.*)"));
+ if (fileName.isEmpty())
+ return;
+ lastDirectory = QFileInfo(fileName).absolutePath();
+ setTorrent(fileName);
+}
+
+void AddTorrentDialog::selectDestination()
+{
+ QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a destination directory"),
+ lastDestinationDirectory);
+ if (dir.isEmpty())
+ return;
+ lastDestinationDirectory = destinationDirectory = dir;
+ ui.destinationFolder->setText(destinationDirectory);
+ enableOkButton();
+}
+
+void AddTorrentDialog::enableOkButton()
+{
+ ui.okButton->setEnabled(!ui.destinationFolder->text().isEmpty()
+ && !ui.torrentFile->text().isEmpty());
+}
+
+void AddTorrentDialog::setTorrent(const QString &torrentFile)
+{
+ if (torrentFile.isEmpty()) {
+ enableOkButton();
+ return;
+ }
+
+ ui.torrentFile->setText(torrentFile);
+ if (!torrentFile.isEmpty())
+ lastDirectory = QFileInfo(torrentFile).absolutePath();
+
+ if (lastDestinationDirectory.isEmpty())
+ lastDestinationDirectory = lastDirectory;
+
+ MetaInfo metaInfo;
+ QFile torrent(torrentFile);
+ if (!torrent.open(QFile::ReadOnly) || !metaInfo.parse(torrent.readAll())) {
+ enableOkButton();
+ return;
+ }
+
+ ui.torrentFile->setText(torrentFile);
+ ui.announceUrl->setText(metaInfo.announceUrl());
+ if (metaInfo.comment().isEmpty())
+ ui.commentLabel->setText("<unknown>");
+ else
+ ui.commentLabel->setText(metaInfo.comment());
+ if (metaInfo.createdBy().isEmpty())
+ ui.creatorLabel->setText("<unknown>");
+ else
+ ui.creatorLabel->setText(metaInfo.createdBy());
+ ui.sizeLabel->setText(stringNumber(metaInfo.totalSize()));
+ if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
+ ui.torrentContents->setHtml(metaInfo.singleFile().name);
+ } else {
+ QString html;
+ foreach (MetaInfoMultiFile file, metaInfo.multiFiles()) {
+ QString name = metaInfo.name();
+ if (!name.isEmpty()) {
+ html += name;
+ if (!name.endsWith('/'))
+ html += '/';
+ }
+ html += file.path + "<br>";
+ }
+ ui.torrentContents->setHtml(html);
+ }
+
+ QFileInfo info(torrentFile);
+ ui.destinationFolder->setText(info.absolutePath());
+
+ enableOkButton();
+}
+
+QString AddTorrentDialog::torrentFileName() const
+{
+ return ui.torrentFile->text();
+}
+
+QString AddTorrentDialog::destinationFolder() const
+{
+ return ui.destinationFolder->text();
+}
diff --git a/examples/network/torrent/addtorrentdialog.h b/examples/network/torrent/addtorrentdialog.h
new file mode 100644
index 0000000..89cb77c
--- /dev/null
+++ b/examples/network/torrent/addtorrentdialog.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDTORRENTDIALOG_H
+#define ADDTORRENTDIALOG_H
+
+#include <QDialog>
+
+#include "ui_addtorrentform.h"
+
+class AddTorrentDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ AddTorrentDialog(QWidget *parent = 0);
+
+ QString torrentFileName() const;
+ QString destinationFolder() const;
+
+public slots:
+ void setTorrent(const QString &torrentFile);
+
+private slots:
+ void selectTorrent();
+ void selectDestination();
+ void enableOkButton();
+
+private:
+ Ui_AddTorrentFile ui;
+ QString destinationDirectory;
+ QString lastDirectory;
+ QString lastDestinationDirectory;
+};
+
+#endif
diff --git a/examples/network/torrent/bencodeparser.cpp b/examples/network/torrent/bencodeparser.cpp
new file mode 100644
index 0000000..9311c0c
--- /dev/null
+++ b/examples/network/torrent/bencodeparser.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bencodeparser.h"
+
+#include <QList>
+#include <QMetaType>
+
+BencodeParser::BencodeParser()
+{
+}
+
+bool BencodeParser::parse(const QByteArray &content)
+{
+ if (content.isEmpty()) {
+ errString = QString("No content");
+ return false;
+ }
+
+ this->content = content;
+ index = 0;
+ infoStart = 0;
+ infoLength = 0;
+ return getDictionary(&dictionaryValue);
+}
+
+QString BencodeParser::errorString() const
+{
+ return errString;
+}
+
+QMap<QByteArray, QVariant> BencodeParser::dictionary() const
+{
+ return dictionaryValue;
+}
+
+QByteArray BencodeParser::infoSection() const
+{
+ return content.mid(infoStart, infoLength);
+}
+
+bool BencodeParser::getByteString(QByteArray *byteString)
+{
+ const int contentSize = content.size();
+ int size = -1;
+ do {
+ char c = content.at(index);
+ if (c < '0' || c > '9') {
+ if (size == -1)
+ return false;
+ if (c != ':') {
+ errString = QString("Unexpected character at pos %1: %2")
+ .arg(index).arg(c);
+ return false;
+ }
+ ++index;
+ break;
+ }
+ if (size == -1)
+ size = 0;
+ size *= 10;
+ size += c - '0';
+ } while (++index < contentSize);
+
+ if (byteString)
+ *byteString = content.mid(index, size);
+ index += size;
+ return true;
+}
+
+bool BencodeParser::getInteger(qint64 *integer)
+{
+ const int contentSize = content.size();
+ if (content.at(index) != 'i')
+ return false;
+
+ ++index;
+ qint64 num = -1;
+ bool negative = false;
+
+ do {
+ char c = content.at(index);
+ if (c < '0' || c > '9') {
+ if (num == -1) {
+ if (c != '-' || negative)
+ return false;
+ negative = true;
+ continue;
+ } else {
+ if (c != 'e') {
+ errString = QString("Unexpected character at pos %1: %2")
+ .arg(index).arg(c);
+ return false;
+ }
+ ++index;
+ break;
+ }
+ }
+ if (num == -1)
+ num = 0;
+ num *= 10;
+ num += c - '0';
+ } while (++index < contentSize);
+
+ if (integer)
+ *integer = negative ? -num : num;
+ return true;
+}
+
+bool BencodeParser::getList(QList<QVariant> *list)
+{
+ const int contentSize = content.size();
+ if (content.at(index) != 'l')
+ return false;
+
+ QList<QVariant> tmp;
+ ++index;
+
+ do {
+ if (content.at(index) == 'e') {
+ ++index;
+ break;
+ }
+
+ qint64 number;
+ QByteArray byteString;
+ QList<QVariant> tmpList;
+ QMap<QByteArray, QVariant> dictionary;
+
+ if (getInteger(&number))
+ tmp << number;
+ else if (getByteString(&byteString))
+ tmp << byteString;
+ else if (getList(&tmpList))
+ tmp << tmpList;
+ else if (getDictionary(&dictionary))
+ tmp << qVariantFromValue<QMap<QByteArray, QVariant> >(dictionary);
+ else {
+ errString = QString("error at index %1").arg(index);
+ return false;
+ }
+ } while (index < contentSize);
+
+ if (list)
+ *list = tmp;
+ return true;
+}
+
+bool BencodeParser::getDictionary(QMap<QByteArray, QVariant> *dictionary)
+{
+ const int contentSize = content.size();
+ if (content.at(index) != 'd')
+ return false;
+
+ QMap<QByteArray, QVariant> tmp;
+ ++index;
+
+ do {
+ if (content.at(index) == 'e') {
+ ++index;
+ break;
+ }
+
+ QByteArray key;
+ if (!getByteString(&key))
+ break;
+
+ if (key == "info")
+ infoStart = index;
+
+ qint64 number;
+ QByteArray byteString;
+ QList<QVariant> tmpList;
+ QMap<QByteArray, QVariant> dictionary;
+
+ if (getInteger(&number))
+ tmp.insert(key, number);
+ else if (getByteString(&byteString))
+ tmp.insert(key, byteString);
+ else if (getList(&tmpList))
+ tmp.insert(key, tmpList);
+ else if (getDictionary(&dictionary))
+ tmp.insert(key, qVariantFromValue<QMap<QByteArray, QVariant> >(dictionary));
+ else {
+ errString = QString("error at index %1").arg(index);
+ return false;
+ }
+
+ if (key == "info")
+ infoLength = index - infoStart;
+
+ } while (index < contentSize);
+
+ if (dictionary)
+ *dictionary = tmp;
+ return true;
+}
diff --git a/examples/network/torrent/bencodeparser.h b/examples/network/torrent/bencodeparser.h
new file mode 100644
index 0000000..b4fc74b
--- /dev/null
+++ b/examples/network/torrent/bencodeparser.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BENCODEPARSER_H
+#define BENCODEPARSER_H
+
+#include <QByteArray>
+#include <QMap>
+#include <QString>
+#include <QVariant>
+#include <QList>
+
+typedef QMap<QByteArray,QVariant> Dictionary;
+Q_DECLARE_METATYPE(Dictionary)
+
+class BencodeParser
+{
+public:
+ BencodeParser();
+
+ bool parse(const QByteArray &content);
+ QString errorString() const;
+
+ QMap<QByteArray, QVariant> dictionary() const;
+ QByteArray infoSection() const;
+
+private:
+ bool getByteString(QByteArray *byteString);
+ bool getInteger(qint64 *integer);
+ bool getList(QList<QVariant> *list);
+ bool getDictionary(QMap<QByteArray, QVariant> *dictionary);
+
+ QMap<QByteArray, QVariant> dictionaryValue;
+
+ QString errString;
+ QByteArray content;
+ int index;
+
+ int infoStart;
+ int infoLength;
+};
+
+#endif
diff --git a/examples/network/torrent/connectionmanager.cpp b/examples/network/torrent/connectionmanager.cpp
new file mode 100644
index 0000000..3b78537
--- /dev/null
+++ b/examples/network/torrent/connectionmanager.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "connectionmanager.h"
+
+#include <QByteArray>
+#include <QDateTime>
+
+static const int MaxConnections = 250;
+
+Q_GLOBAL_STATIC(ConnectionManager, connectionManager)
+
+ConnectionManager *ConnectionManager::instance()
+{
+ return connectionManager();
+}
+
+bool ConnectionManager::canAddConnection() const
+{
+ return (connections.size() < MaxConnections);
+}
+
+void ConnectionManager::addConnection(PeerWireClient *client)
+{
+ connections << client;
+}
+
+void ConnectionManager::removeConnection(PeerWireClient *client)
+{
+ connections.remove(client);
+}
+
+int ConnectionManager::maxConnections() const
+{
+ return MaxConnections;
+}
+
+QByteArray ConnectionManager::clientId() const
+{
+ if (id.isEmpty()) {
+ // Generate peer id
+ int startupTime = int(QDateTime::currentDateTime().toTime_t());
+
+ QString s;
+ s.sprintf("-QT%04x-", (QT_VERSION % 0xffff00) >> 8);
+ id += s.toLatin1();
+ id += QByteArray::number(startupTime, 10);
+ id += QByteArray(20 - id.size(), '-');
+ }
+ return id;
+}
diff --git a/examples/network/torrent/connectionmanager.h b/examples/network/torrent/connectionmanager.h
new file mode 100644
index 0000000..3b791e3
--- /dev/null
+++ b/examples/network/torrent/connectionmanager.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONNECTIONMANAGER_H
+#define CONNECTIONMANAGER_H
+
+class PeerWireClient;
+
+#include <QByteArray>
+#include <QSet>
+
+class ConnectionManager
+{
+public:
+ static ConnectionManager *instance();
+
+ bool canAddConnection() const;
+ void addConnection(PeerWireClient *connection);
+ void removeConnection(PeerWireClient *connection);
+ int maxConnections() const;
+ QByteArray clientId() const;
+
+ private:
+ QSet<PeerWireClient *> connections;
+ mutable QByteArray id;
+};
+
+#endif
diff --git a/examples/network/torrent/filemanager.cpp b/examples/network/torrent/filemanager.cpp
new file mode 100644
index 0000000..07d5cca
--- /dev/null
+++ b/examples/network/torrent/filemanager.cpp
@@ -0,0 +1,447 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "filemanager.h"
+#include "metainfo.h"
+
+#include <QByteArray>
+#include <QDir>
+#include <QFile>
+#include <QTimer>
+#include <QTimerEvent>
+#include <QCryptographicHash>
+
+FileManager::FileManager(QObject *parent)
+ : QThread(parent)
+{
+ quit = false;
+ totalLength = 0;
+ readId = 0;
+ startVerification = false;
+ wokeUp = false;
+ newFile = false;
+ numPieces = 0;
+ verifiedPieces.fill(false);
+}
+
+FileManager::~FileManager()
+{
+ quit = true;
+ cond.wakeOne();
+ wait();
+
+ foreach (QFile *file, files) {
+ file->close();
+ delete file;
+ }
+}
+
+int FileManager::read(int pieceIndex, int offset, int length)
+{
+ ReadRequest request;
+ request.pieceIndex = pieceIndex;
+ request.offset = offset;
+ request.length = length;
+
+ QMutexLocker locker(&mutex);
+ request.id = readId++;
+ readRequests << request;
+
+ if (!wokeUp) {
+ wokeUp = true;
+ QMetaObject::invokeMethod(this, "wakeUp", Qt::QueuedConnection);
+ }
+
+ return request.id;
+}
+
+void FileManager::write(int pieceIndex, int offset, const QByteArray &data)
+{
+ WriteRequest request;
+ request.pieceIndex = pieceIndex;
+ request.offset = offset;
+ request.data = data;
+
+ QMutexLocker locker(&mutex);
+ writeRequests << request;
+
+ if (!wokeUp) {
+ wokeUp = true;
+ QMetaObject::invokeMethod(this, "wakeUp", Qt::QueuedConnection);
+ }
+}
+
+void FileManager::verifyPiece(int pieceIndex)
+{
+ QMutexLocker locker(&mutex);
+ pendingVerificationRequests << pieceIndex;
+ startVerification = true;
+
+ if (!wokeUp) {
+ wokeUp = true;
+ QMetaObject::invokeMethod(this, "wakeUp", Qt::QueuedConnection);
+ }
+}
+
+int FileManager::pieceLengthAt(int pieceIndex) const
+{
+ QMutexLocker locker(&mutex);
+ return (sha1s.size() == pieceIndex + 1)
+ ? (totalLength % pieceLength) : pieceLength;
+}
+
+QBitArray FileManager::completedPieces() const
+{
+ QMutexLocker locker(&mutex);
+ return verifiedPieces;
+}
+
+void FileManager::setCompletedPieces(const QBitArray &pieces)
+{
+ QMutexLocker locker(&mutex);
+ verifiedPieces = pieces;
+}
+
+QString FileManager::errorString() const
+{
+ return errString;
+}
+
+void FileManager::run()
+{
+ if (!generateFiles())
+ return;
+
+ do {
+ {
+ // Go to sleep if there's nothing to do.
+ QMutexLocker locker(&mutex);
+ if (!quit && readRequests.isEmpty() && writeRequests.isEmpty() && !startVerification)
+ cond.wait(&mutex);
+ }
+
+ // Read pending read requests
+ mutex.lock();
+ QList<ReadRequest> newReadRequests = readRequests;
+ readRequests.clear();
+ mutex.unlock();
+ while (!newReadRequests.isEmpty()) {
+ ReadRequest request = newReadRequests.takeFirst();
+ QByteArray block = readBlock(request.pieceIndex, request.offset, request.length);
+ emit dataRead(request.id, request.pieceIndex, request.offset, block);
+ }
+
+ // Write pending write requests
+ mutex.lock();
+ QList<WriteRequest> newWriteRequests = writeRequests;
+ writeRequests.clear();
+ while (!quit && !newWriteRequests.isEmpty()) {
+ WriteRequest request = newWriteRequests.takeFirst();
+ writeBlock(request.pieceIndex, request.offset, request.data);
+ }
+
+ // Process pending verification requests
+ if (startVerification) {
+ newPendingVerificationRequests = pendingVerificationRequests;
+ pendingVerificationRequests.clear();
+ verifyFileContents();
+ startVerification = false;
+ }
+ mutex.unlock();
+ newPendingVerificationRequests.clear();
+
+ } while (!quit);
+
+ // Write pending write requests
+ mutex.lock();
+ QList<WriteRequest> newWriteRequests = writeRequests;
+ writeRequests.clear();
+ mutex.unlock();
+ while (!newWriteRequests.isEmpty()) {
+ WriteRequest request = newWriteRequests.takeFirst();
+ writeBlock(request.pieceIndex, request.offset, request.data);
+ }
+}
+
+void FileManager::startDataVerification()
+{
+ QMutexLocker locker(&mutex);
+ startVerification = true;
+ cond.wakeOne();
+}
+
+bool FileManager::generateFiles()
+{
+ numPieces = -1;
+
+ // Set up the thread local data
+ if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
+ QMutexLocker locker(&mutex);
+ MetaInfoSingleFile singleFile = metaInfo.singleFile();
+
+ QString prefix;
+ if (!destinationPath.isEmpty()) {
+ prefix = destinationPath;
+ if (!prefix.endsWith("/"))
+ prefix += "/";
+ QDir dir;
+ if (!dir.mkpath(prefix)) {
+ errString = tr("Failed to create directory %1").arg(prefix);
+ emit error();
+ return false;
+ }
+ }
+ QFile *file = new QFile(prefix + singleFile.name);
+ if (!file->open(QFile::ReadWrite)) {
+ errString = tr("Failed to open/create file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ return false;
+ }
+
+ if (file->size() != singleFile.length) {
+ newFile = true;
+ if (!file->resize(singleFile.length)) {
+ errString = tr("Failed to resize file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ return false;
+ }
+ }
+ fileSizes << file->size();
+ files << file;
+ file->close();
+
+ pieceLength = singleFile.pieceLength;
+ totalLength = singleFile.length;
+ sha1s = singleFile.sha1Sums;
+ } else {
+ QMutexLocker locker(&mutex);
+ QDir dir;
+ QString prefix;
+
+ if (!destinationPath.isEmpty()) {
+ prefix = destinationPath;
+ if (!prefix.endsWith("/"))
+ prefix += "/";
+ }
+ if (!metaInfo.name().isEmpty()) {
+ prefix += metaInfo.name();
+ if (!prefix.endsWith("/"))
+ prefix += "/";
+ }
+ if (!dir.mkpath(prefix)) {
+ errString = tr("Failed to create directory %1").arg(prefix);
+ emit error();
+ return false;
+ }
+
+ foreach (const MetaInfoMultiFile &entry, metaInfo.multiFiles()) {
+ QString filePath = QFileInfo(prefix + entry.path).path();
+ if (!QFile::exists(filePath)) {
+ if (!dir.mkpath(filePath)) {
+ errString = tr("Failed to create directory %1").arg(filePath);
+ emit error();
+ return false;
+ }
+ }
+
+ QFile *file = new QFile(prefix + entry.path);
+ if (!file->open(QFile::ReadWrite)) {
+ errString = tr("Failed to open/create file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ return false;
+ }
+
+ if (file->size() != entry.length) {
+ newFile = true;
+ if (!file->resize(entry.length)) {
+ errString = tr("Failed to resize file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ return false;
+ }
+ }
+ fileSizes << file->size();
+ files << file;
+ file->close();
+
+ totalLength += entry.length;
+ }
+
+ sha1s = metaInfo.sha1Sums();
+ pieceLength = metaInfo.pieceLength();
+ }
+ numPieces = sha1s.size();
+ return true;
+}
+
+QByteArray FileManager::readBlock(int pieceIndex, int offset, int length)
+{
+ QByteArray block;
+ qint64 startReadIndex = (quint64(pieceIndex) * pieceLength) + offset;
+ qint64 currentIndex = 0;
+
+ for (int i = 0; !quit && i < files.size() && length > 0; ++i) {
+ QFile *file = files[i];
+ qint64 currentFileSize = fileSizes.at(i);
+ if ((currentIndex + currentFileSize) > startReadIndex) {
+ if (!file->isOpen()) {
+ if (!file->open(QFile::ReadWrite)) {
+ errString = tr("Failed to read from file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ break;
+ }
+ }
+
+ file->seek(startReadIndex - currentIndex);
+ QByteArray chunk = file->read(qMin<qint64>(length, currentFileSize - file->pos()));
+ file->close();
+
+ block += chunk;
+ length -= chunk.size();
+ startReadIndex += chunk.size();
+ if (length < 0) {
+ errString = tr("Failed to read from file %1 (read %3 bytes): %2")
+ .arg(file->fileName()).arg(file->errorString()).arg(length);
+ emit error();
+ break;
+ }
+ }
+ currentIndex += currentFileSize;
+ }
+ return block;
+}
+
+bool FileManager::writeBlock(int pieceIndex, int offset, const QByteArray &data)
+{
+ qint64 startWriteIndex = (qint64(pieceIndex) * pieceLength) + offset;
+ qint64 currentIndex = 0;
+ int bytesToWrite = data.size();
+ int written = 0;
+
+ for (int i = 0; !quit && i < files.size(); ++i) {
+ QFile *file = files[i];
+ qint64 currentFileSize = fileSizes.at(i);
+
+ if ((currentIndex + currentFileSize) > startWriteIndex) {
+ if (!file->isOpen()) {
+ if (!file->open(QFile::ReadWrite)) {
+ errString = tr("Failed to write to file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ break;
+ }
+ }
+
+ file->seek(startWriteIndex - currentIndex);
+ qint64 bytesWritten = file->write(data.constData() + written,
+ qMin<qint64>(bytesToWrite, currentFileSize - file->pos()));
+ file->close();
+
+ if (bytesWritten <= 0) {
+ errString = tr("Failed to write to file %1: %2")
+ .arg(file->fileName()).arg(file->errorString());
+ emit error();
+ return false;
+ }
+
+ written += bytesWritten;
+ startWriteIndex += bytesWritten;
+ bytesToWrite -= bytesWritten;
+ if (bytesToWrite == 0)
+ break;
+ }
+ currentIndex += currentFileSize;
+ }
+ return true;
+}
+
+void FileManager::verifyFileContents()
+{
+ // Verify all pieces the first time
+ if (newPendingVerificationRequests.isEmpty()) {
+ if (verifiedPieces.count(true) == 0) {
+ verifiedPieces.resize(sha1s.size());
+
+ int oldPercent = 0;
+ if (!newFile) {
+ int numPieces = sha1s.size();
+
+ for (int index = 0; index < numPieces; ++index) {
+ verifySinglePiece(index);
+
+ int percent = ((index + 1) * 100) / numPieces;
+ if (oldPercent != percent) {
+ emit verificationProgress(percent);
+ oldPercent = percent;
+ }
+ }
+ }
+ }
+ emit verificationDone();
+ return;
+ }
+
+ // Verify all pending pieces
+ foreach (int index, newPendingVerificationRequests)
+ emit pieceVerified(index, verifySinglePiece(index));
+}
+
+bool FileManager::verifySinglePiece(int pieceIndex)
+{
+ QByteArray block = readBlock(pieceIndex, 0, pieceLength);
+ QByteArray sha1Sum = QCryptographicHash::hash(block, QCryptographicHash::Sha1);
+
+ if (sha1Sum != sha1s.at(pieceIndex))
+ return false;
+ verifiedPieces.setBit(pieceIndex);
+ return true;
+}
+
+void FileManager::wakeUp()
+{
+ QMutexLocker locker(&mutex);
+ wokeUp = false;
+ cond.wakeOne();
+}
diff --git a/examples/network/torrent/filemanager.h b/examples/network/torrent/filemanager.h
new file mode 100644
index 0000000..05d1f49
--- /dev/null
+++ b/examples/network/torrent/filemanager.h
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FILEMANAGER_H
+#define FILEMANAGER_H
+
+#include <QBitArray>
+#include <QList>
+#include <QMutex>
+#include <QThread>
+#include <QWaitCondition>
+
+#include "metainfo.h"
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+class QFile;
+class QTimerEvent;
+QT_END_NAMESPACE
+
+class FileManager : public QThread
+{
+ Q_OBJECT
+
+public:
+ FileManager(QObject *parent = 0);
+ virtual ~FileManager();
+
+ inline void setMetaInfo(const MetaInfo &info) { metaInfo = info; }
+ inline void setDestinationFolder(const QString &directory) { destinationPath = directory; }
+
+ int read(int pieceIndex, int offset, int length);
+ void write(int pieceIndex, int offset, const QByteArray &data);
+ void verifyPiece(int pieceIndex);
+ inline qint64 totalSize() const { return totalLength; }
+
+ inline int pieceCount() const { return numPieces; }
+ int pieceLengthAt(int pieceIndex) const;
+
+ QBitArray completedPieces() const;
+ void setCompletedPieces(const QBitArray &pieces);
+
+ QString errorString() const;
+
+public slots:
+ void startDataVerification();
+
+signals:
+ void dataRead(int id, int pieceIndex, int offset, const QByteArray &data);
+ void error();
+ void verificationProgress(int percent);
+ void verificationDone();
+ void pieceVerified(int pieceIndex, bool verified);
+
+protected:
+ void run();
+
+private slots:
+ bool verifySinglePiece(int pieceIndex);
+ void wakeUp();
+
+private:
+ bool generateFiles();
+ QByteArray readBlock(int pieceIndex, int offset, int length);
+ bool writeBlock(int pieceIndex, int offset, const QByteArray &data);
+ void verifyFileContents();
+
+ struct WriteRequest {
+ int pieceIndex;
+ int offset;
+ QByteArray data;
+ };
+ struct ReadRequest {
+ int pieceIndex;
+ int offset;
+ int length;
+ int id;
+ };
+
+ QString errString;
+ QString destinationPath;
+ MetaInfo metaInfo;
+ QList<QFile *> files;
+ QList<QByteArray> sha1s;
+ QBitArray verifiedPieces;
+
+ bool newFile;
+ int pieceLength;
+ qint64 totalLength;
+ int numPieces;
+ int readId;
+ bool startVerification;
+ bool quit;
+ bool wokeUp;
+
+ QList<WriteRequest> writeRequests;
+ QList<ReadRequest> readRequests;
+ QList<int> pendingVerificationRequests;
+ QList<int> newPendingVerificationRequests;
+ QList<qint64> fileSizes;
+
+ mutable QMutex mutex;
+ mutable QWaitCondition cond;
+};
+
+#endif
diff --git a/examples/network/torrent/forms/addtorrentform.ui b/examples/network/torrent/forms/addtorrentform.ui
new file mode 100644
index 0000000..950bb67
--- /dev/null
+++ b/examples/network/torrent/forms/addtorrentform.ui
@@ -0,0 +1,266 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>AddTorrentFile</class>
+ <widget class="QDialog" name="AddTorrentFile" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>464</width>
+ <height>385</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Add a torrent</string>
+ </property>
+ <property name="sizeGripEnabled" >
+ <bool>false</bool>
+ </property>
+ <property name="modal" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Select a torrent source</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="6" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Destination:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2" >
+ <widget class="QLineEdit" name="torrentFile" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Tracker URL:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" >
+ <widget class="QPushButton" name="browseTorrents" >
+ <property name="text" >
+ <string>Browse</string>
+ </property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>File(s):</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Size:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Creator:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="3" >
+ <widget class="QTextEdit" name="torrentContents" >
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="tabChangesFocus" >
+ <bool>true</bool>
+ </property>
+ <property name="lineWrapMode" >
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1" colspan="2" >
+ <widget class="QLineEdit" name="destinationFolder" >
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="3" >
+ <widget class="QLabel" name="announceUrl" >
+ <property name="text" >
+ <string>&lt;none></string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Torrent file:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3" >
+ <widget class="QPushButton" name="browseDestination" >
+ <property name="text" >
+ <string>Browse</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>Comment:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="3" >
+ <widget class="QLabel" name="commentLabel" >
+ <property name="text" >
+ <string>&lt;none></string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="3" >
+ <widget class="QLabel" name="creatorLabel" >
+ <property name="text" >
+ <string>&lt;none></string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="3" >
+ <widget class="QLabel" name="sizeLabel" >
+ <property name="text" >
+ <string>0</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ <widget class="QWidget" name="widget" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>364</width>
+ <height>33</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>131</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="text" >
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>torrentFile</tabstop>
+ <tabstop>browseTorrents</tabstop>
+ <tabstop>torrentContents</tabstop>
+ <tabstop>destinationFolder</tabstop>
+ <tabstop>browseDestination</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AddTorrentFile</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>278</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>96</x>
+ <y>254</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AddTorrentFile</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>369</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>179</x>
+ <y>282</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/network/torrent/icons.qrc b/examples/network/torrent/icons.qrc
new file mode 100644
index 0000000..9541ef7
--- /dev/null
+++ b/examples/network/torrent/icons.qrc
@@ -0,0 +1,12 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>icons/peertopeer.png</file>
+ <file>icons/1uparrow.png</file>
+ <file>icons/1downarrow.png</file>
+ <file>icons/bottom.png</file>
+ <file>icons/player_pause.png</file>
+ <file>icons/player_play.png</file>
+ <file>icons/player_stop.png</file>
+ <file>icons/exit.png</file>
+</qresource>
+</RCC>
diff --git a/examples/network/torrent/icons/1downarrow.png b/examples/network/torrent/icons/1downarrow.png
new file mode 100644
index 0000000..08403b8
--- /dev/null
+++ b/examples/network/torrent/icons/1downarrow.png
Binary files differ
diff --git a/examples/network/torrent/icons/1uparrow.png b/examples/network/torrent/icons/1uparrow.png
new file mode 100644
index 0000000..f044811
--- /dev/null
+++ b/examples/network/torrent/icons/1uparrow.png
Binary files differ
diff --git a/examples/network/torrent/icons/bottom.png b/examples/network/torrent/icons/bottom.png
new file mode 100644
index 0000000..fe66b5d
--- /dev/null
+++ b/examples/network/torrent/icons/bottom.png
Binary files differ
diff --git a/examples/network/torrent/icons/edit_add.png b/examples/network/torrent/icons/edit_add.png
new file mode 100644
index 0000000..85b022e
--- /dev/null
+++ b/examples/network/torrent/icons/edit_add.png
Binary files differ
diff --git a/examples/network/torrent/icons/edit_remove.png b/examples/network/torrent/icons/edit_remove.png
new file mode 100644
index 0000000..93361f5
--- /dev/null
+++ b/examples/network/torrent/icons/edit_remove.png
Binary files differ
diff --git a/examples/network/torrent/icons/exit.png b/examples/network/torrent/icons/exit.png
new file mode 100644
index 0000000..2f7ff43
--- /dev/null
+++ b/examples/network/torrent/icons/exit.png
Binary files differ
diff --git a/examples/network/torrent/icons/peertopeer.png b/examples/network/torrent/icons/peertopeer.png
new file mode 100644
index 0000000..f4856dc
--- /dev/null
+++ b/examples/network/torrent/icons/peertopeer.png
Binary files differ
diff --git a/examples/network/torrent/icons/player_pause.png b/examples/network/torrent/icons/player_pause.png
new file mode 100644
index 0000000..8c9bcc4
--- /dev/null
+++ b/examples/network/torrent/icons/player_pause.png
Binary files differ
diff --git a/examples/network/torrent/icons/player_play.png b/examples/network/torrent/icons/player_play.png
new file mode 100644
index 0000000..70daa33
--- /dev/null
+++ b/examples/network/torrent/icons/player_play.png
Binary files differ
diff --git a/examples/network/torrent/icons/player_stop.png b/examples/network/torrent/icons/player_stop.png
new file mode 100644
index 0000000..ce6585a
--- /dev/null
+++ b/examples/network/torrent/icons/player_stop.png
Binary files differ
diff --git a/examples/network/torrent/icons/stop.png b/examples/network/torrent/icons/stop.png
new file mode 100644
index 0000000..52e593a
--- /dev/null
+++ b/examples/network/torrent/icons/stop.png
Binary files differ
diff --git a/examples/network/torrent/main.cpp b/examples/network/torrent/main.cpp
new file mode 100644
index 0000000..3821254
--- /dev/null
+++ b/examples/network/torrent/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QApplication>
+#include <QtCore>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ Q_INIT_RESOURCE(icons);
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
new file mode 100644
index 0000000..6ca3247
--- /dev/null
+++ b/examples/network/torrent/mainwindow.cpp
@@ -0,0 +1,713 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "addtorrentdialog.h"
+#include "mainwindow.h"
+#include "ratecontroller.h"
+#include "torrentclient.h"
+
+// TorrentView extends QTreeWidget to allow drag and drop.
+class TorrentView : public QTreeWidget
+{
+ Q_OBJECT
+public:
+ TorrentView(QWidget *parent = 0);
+
+signals:
+ void fileDropped(const QString &fileName);
+
+protected:
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+};
+
+// TorrentViewDelegate is used to draw the progress bars.
+class TorrentViewDelegate : public QItemDelegate
+{
+ Q_OBJECT
+public:
+ inline TorrentViewDelegate(MainWindow *mainWindow) : QItemDelegate(mainWindow) {}
+
+ inline void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index ) const
+ {
+ if (index.column() != 2) {
+ QItemDelegate::paint(painter, option, index);
+ return;
+ }
+
+ // Set up a QStyleOptionProgressBar to precisely mimic the
+ // environment of a progress bar.
+ QStyleOptionProgressBar progressBarOption;
+ progressBarOption.state = QStyle::State_Enabled;
+ progressBarOption.direction = QApplication::layoutDirection();
+ progressBarOption.rect = option.rect;
+ progressBarOption.fontMetrics = QApplication::fontMetrics();
+ progressBarOption.minimum = 0;
+ progressBarOption.maximum = 100;
+ progressBarOption.textAlignment = Qt::AlignCenter;
+ progressBarOption.textVisible = true;
+
+ // Set the progress and text values of the style option.
+ int progress = qobject_cast<MainWindow *>(parent())->clientForRow(index.row())->progress();
+ progressBarOption.progress = progress < 0 ? 0 : progress;
+ progressBarOption.text = QString().sprintf("%d%%", progressBarOption.progress);
+
+ // Draw the progress bar onto the view.
+ QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOption, painter);
+ }
+};
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent), quitDialog(0), saveChanges(false)
+{
+ // Initialize some static strings
+ QStringList headers;
+ headers << tr("Torrent") << tr("Peers/Seeds") << tr("Progress")
+ << tr("Down rate") << tr("Up rate") << tr("Status");
+
+ // Main torrent list
+ torrentView = new TorrentView(this);
+ torrentView->setItemDelegate(new TorrentViewDelegate(this));
+ torrentView->setHeaderLabels(headers);
+ torrentView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ torrentView->setAlternatingRowColors(true);
+ torrentView->setRootIsDecorated(false);
+ setCentralWidget(torrentView);
+
+ // Set header resize modes and initial section sizes
+ QFontMetrics fm = fontMetrics();
+ QHeaderView *header = torrentView->header();
+ header->resizeSection(0, fm.width("typical-name-for-a-torrent.torrent"));
+ header->resizeSection(1, fm.width(headers.at(1) + " "));
+ header->resizeSection(2, fm.width(headers.at(2) + " "));
+ header->resizeSection(3, qMax(fm.width(headers.at(3) + " "), fm.width(" 1234.0 KB/s ")));
+ header->resizeSection(4, qMax(fm.width(headers.at(4) + " "), fm.width(" 1234.0 KB/s ")));
+ header->resizeSection(5, qMax(fm.width(headers.at(5) + " "), fm.width(tr("Downloading") + " ")));
+
+ // Create common actions
+ QAction *newTorrentAction = new QAction(QIcon(":/icons/bottom.png"), tr("Add &new torrent"), this);
+ pauseTorrentAction = new QAction(QIcon(":/icons/player_pause.png"), tr("&Pause torrent"), this);
+ removeTorrentAction = new QAction(QIcon(":/icons/player_stop.png"), tr("&Remove torrent"), this);
+
+ // File menu
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(newTorrentAction);
+ fileMenu->addAction(pauseTorrentAction);
+ fileMenu->addAction(removeTorrentAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(QIcon(":/icons/exit.png"), tr("E&xit"), this, SLOT(close()));
+
+ // Help menu
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(tr("&About"), this, SLOT(about()));
+ helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+
+ // Top toolbar
+ QToolBar *topBar = new QToolBar(tr("Tools"));
+ addToolBar(Qt::TopToolBarArea, topBar);
+ topBar->setMovable(false);
+ topBar->addAction(newTorrentAction);
+ topBar->addAction(removeTorrentAction);
+ topBar->addAction(pauseTorrentAction);
+ topBar->addSeparator();
+ downActionTool = topBar->addAction(QIcon(tr(":/icons/1downarrow.png")), tr("Move down"));
+ upActionTool = topBar->addAction(QIcon(tr(":/icons/1uparrow.png")), tr("Move up"));
+
+ // Bottom toolbar
+ QToolBar *bottomBar = new QToolBar(tr("Rate control"));
+ addToolBar(Qt::BottomToolBarArea, bottomBar);
+ bottomBar->setMovable(false);
+ downloadLimitSlider = new QSlider(Qt::Horizontal);
+ downloadLimitSlider->setRange(0, 1000);
+ bottomBar->addWidget(new QLabel(tr("Max download:")));
+ bottomBar->addWidget(downloadLimitSlider);
+ bottomBar->addWidget((downloadLimitLabel = new QLabel(tr("0 KB/s"))));
+ downloadLimitLabel->setFixedSize(QSize(fm.width(tr("99999 KB/s")), fm.lineSpacing()));
+ bottomBar->addSeparator();
+ uploadLimitSlider = new QSlider(Qt::Horizontal);
+ uploadLimitSlider->setRange(0, 1000);
+ bottomBar->addWidget(new QLabel(tr("Max upload:")));
+ bottomBar->addWidget(uploadLimitSlider);
+ bottomBar->addWidget((uploadLimitLabel = new QLabel(tr("0 KB/s"))));
+ uploadLimitLabel->setFixedSize(QSize(fm.width(tr("99999 KB/s")), fm.lineSpacing()));
+
+ // Set up connections
+ connect(torrentView, SIGNAL(itemSelectionChanged()),
+ this, SLOT(setActionsEnabled()));
+ connect(torrentView, SIGNAL(fileDropped(const QString &)),
+ this, SLOT(acceptFileDrop(const QString &)));
+ connect(uploadLimitSlider, SIGNAL(valueChanged(int)),
+ this, SLOT(setUploadLimit(int)));
+ connect(downloadLimitSlider, SIGNAL(valueChanged(int)),
+ this, SLOT(setDownloadLimit(int)));
+ connect(newTorrentAction, SIGNAL(triggered()),
+ this, SLOT(addTorrent()));
+ connect(pauseTorrentAction, SIGNAL(triggered()),
+ this, SLOT(pauseTorrent()));
+ connect(removeTorrentAction, SIGNAL(triggered()),
+ this, SLOT(removeTorrent()));
+ connect(upActionTool, SIGNAL(triggered(bool)),
+ this, SLOT(moveTorrentUp()));
+ connect(downActionTool, SIGNAL(triggered(bool)),
+ this, SLOT(moveTorrentDown()));
+
+ // Load settings and start
+ setWindowTitle(tr("Torrent Client"));
+ setActionsEnabled();
+ QMetaObject::invokeMethod(this, "loadSettings", Qt::QueuedConnection);
+}
+
+QSize MainWindow::sizeHint() const
+{
+ const QHeaderView *header = torrentView->header();
+
+ // Add up the sizes of all header sections. The last section is
+ // stretched, so its size is relative to the size of the width;
+ // instead of counting it, we count the size of its largest value.
+ int width = fontMetrics().width(tr("Downloading") + " ");
+ for (int i = 0; i < header->count() - 1; ++i)
+ width += header->sectionSize(i);
+
+ return QSize(width, QMainWindow::sizeHint().height())
+ .expandedTo(QApplication::globalStrut());
+}
+
+const TorrentClient *MainWindow::clientForRow(int row) const
+{
+ // Return the client at the given row.
+ return jobs.at(row).client;
+}
+
+int MainWindow::rowOfClient(TorrentClient *client) const
+{
+ // Return the row that displays this client's status, or -1 if the
+ // client is not known.
+ int row = 0;
+ foreach (Job job, jobs) {
+ if (job.client == client)
+ return row;
+ ++row;
+ }
+ return -1;
+}
+
+void MainWindow::loadSettings()
+{
+ // Load base settings (last working directory, upload/download limits).
+ QSettings settings("Trolltech", "Torrent");
+ lastDirectory = settings.value("LastDirectory").toString();
+ if (lastDirectory.isEmpty())
+ lastDirectory = QDir::currentPath();
+ int up = settings.value("UploadLimit").toInt();
+ int down = settings.value("DownloadLimit").toInt();
+ uploadLimitSlider->setValue(up ? up : 170);
+ downloadLimitSlider->setValue(down ? down : 550);
+
+ // Resume all previous downloads.
+ int size = settings.beginReadArray("Torrents");
+ for (int i = 0; i < size; ++i) {
+ settings.setArrayIndex(i);
+ QByteArray resumeState = settings.value("resumeState").toByteArray();
+ QString fileName = settings.value("sourceFileName").toString();
+ QString dest = settings.value("destinationFolder").toString();
+
+ if (addTorrent(fileName, dest, resumeState)) {
+ TorrentClient *client = jobs.last().client;
+ client->setDownloadedBytes(settings.value("downloadedBytes").toLongLong());
+ client->setUploadedBytes(settings.value("uploadedBytes").toLongLong());
+ }
+ }
+}
+
+bool MainWindow::addTorrent()
+{
+ // Show the file dialog, let the user select what torrent to start downloading.
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a torrent file"),
+ lastDirectory,
+ tr("Torrents (*.torrent);;"
+ " All files (*.*)"));
+ if (fileName.isEmpty())
+ return false;
+ lastDirectory = QFileInfo(fileName).absolutePath();
+
+ // Show the "Add Torrent" dialog.
+ AddTorrentDialog *addTorrentDialog = new AddTorrentDialog(this);
+ addTorrentDialog->setTorrent(fileName);
+ addTorrentDialog->deleteLater();
+ if (!addTorrentDialog->exec())
+ return false;
+
+ // Add the torrent to our list of downloads
+ addTorrent(fileName, addTorrentDialog->destinationFolder());
+ if (!saveChanges) {
+ saveChanges = true;
+ QTimer::singleShot(1000, this, SLOT(saveSettings()));
+ }
+ return true;
+}
+
+void MainWindow::removeTorrent()
+{
+ // Find the row of the current item, and find the torrent client
+ // for that row.
+ int row = torrentView->indexOfTopLevelItem(torrentView->currentItem());
+ TorrentClient *client = jobs.at(row).client;
+
+ // Stop the client.
+ client->disconnect();
+ connect(client, SIGNAL(stopped()), this, SLOT(torrentStopped()));
+ client->stop();
+
+ // Remove the row from the view.
+ delete torrentView->takeTopLevelItem(row);
+ jobs.removeAt(row);
+ setActionsEnabled();
+
+ saveChanges = true;
+ saveSettings();
+}
+
+void MainWindow::torrentStopped()
+{
+ // Schedule the client for deletion.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ client->deleteLater();
+
+ // If the quit dialog is shown, update its progress.
+ if (quitDialog) {
+ if (++jobsStopped == jobsToStop)
+ quitDialog->close();
+ }
+}
+
+void MainWindow::torrentError(TorrentClient::Error)
+{
+ // Delete the client.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+ QString fileName = jobs.at(row).torrentFileName;
+ jobs.removeAt(row);
+
+ // Display the warning.
+ QMessageBox::warning(this, tr("Error"),
+ tr("An error occurred while downloading %0: %1")
+ .arg(fileName)
+ .arg(client->errorString()));
+
+ delete torrentView->takeTopLevelItem(row);
+ client->deleteLater();
+}
+
+bool MainWindow::addTorrent(const QString &fileName, const QString &destinationFolder,
+ const QByteArray &resumeState)
+{
+ // Check if the torrent is already being downloaded.
+ foreach (Job job, jobs) {
+ if (job.torrentFileName == fileName && job.destinationDirectory == destinationFolder) {
+ QMessageBox::warning(this, tr("Already downloading"),
+ tr("The torrent file %1 is "
+ "already being downloaded.").arg(fileName));
+ return false;
+ }
+ }
+
+ // Create a new torrent client and attempt to parse the torrent data.
+ TorrentClient *client = new TorrentClient(this);
+ if (!client->setTorrent(fileName)) {
+ QMessageBox::warning(this, tr("Error"),
+ tr("The torrent file %1 cannot not be opened/resumed.").arg(fileName));
+ delete client;
+ return false;
+ }
+ client->setDestinationFolder(destinationFolder);
+ client->setDumpedState(resumeState);
+
+ // Setup the client connections.
+ connect(client, SIGNAL(stateChanged(TorrentClient::State)), this, SLOT(updateState(TorrentClient::State)));
+ connect(client, SIGNAL(peerInfoUpdated()), this, SLOT(updatePeerInfo()));
+ connect(client, SIGNAL(progressUpdated(int)), this, SLOT(updateProgress(int)));
+ connect(client, SIGNAL(downloadRateUpdated(int)), this, SLOT(updateDownloadRate(int)));
+ connect(client, SIGNAL(uploadRateUpdated(int)), this, SLOT(updateUploadRate(int)));
+ connect(client, SIGNAL(stopped()), this, SLOT(torrentStopped()));
+ connect(client, SIGNAL(error(TorrentClient::Error)), this, SLOT(torrentError(TorrentClient::Error)));
+
+ // Add the client to the list of downloading jobs.
+ Job job;
+ job.client = client;
+ job.torrentFileName = fileName;
+ job.destinationDirectory = destinationFolder;
+ jobs << job;
+
+ // Create and add a row in the torrent view for this download.
+ QTreeWidgetItem *item = new QTreeWidgetItem(torrentView);
+
+ QString baseFileName = QFileInfo(fileName).fileName();
+ if (baseFileName.toLower().endsWith(".torrent"))
+ baseFileName.remove(baseFileName.size() - 8);
+
+ item->setText(0, baseFileName);
+ item->setToolTip(0, tr("Torrent: %1<br>Destination: %2")
+ .arg(baseFileName).arg(destinationFolder));
+ item->setText(1, tr("0/0"));
+ item->setText(2, "0");
+ item->setText(3, "0.0 KB/s");
+ item->setText(4, "0.0 KB/s");
+ item->setText(5, tr("Idle"));
+ item->setFlags(item->flags() & ~Qt::ItemIsEditable);
+ item->setTextAlignment(1, Qt::AlignHCenter);
+
+ if (!saveChanges) {
+ saveChanges = true;
+ QTimer::singleShot(5000, this, SLOT(saveSettings()));
+ }
+ client->start();
+ return true;
+}
+
+void MainWindow::saveSettings()
+{
+ if (!saveChanges)
+ return;
+ saveChanges = false;
+
+ // Prepare and reset the settings
+ QSettings settings("Trolltech", "Torrent");
+ settings.clear();
+
+ settings.setValue("LastDirectory", lastDirectory);
+ settings.setValue("UploadLimit", uploadLimitSlider->value());
+ settings.setValue("DownloadLimit", downloadLimitSlider->value());
+
+ // Store data on all known torrents
+ settings.beginWriteArray("Torrents");
+ for (int i = 0; i < jobs.size(); ++i) {
+ settings.setArrayIndex(i);
+ settings.setValue("sourceFileName", jobs.at(i).torrentFileName);
+ settings.setValue("destinationFolder", jobs.at(i).destinationDirectory);
+ settings.setValue("uploadedBytes", jobs.at(i).client->uploadedBytes());
+ settings.setValue("downloadedBytes", jobs.at(i).client->downloadedBytes());
+ settings.setValue("resumeState", jobs.at(i).client->dumpedState());
+ }
+ settings.endArray();
+ settings.sync();
+}
+
+void MainWindow::updateState(TorrentClient::State)
+{
+ // Update the state string whenever the client's state changes.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+ QTreeWidgetItem *item = torrentView->topLevelItem(row);
+ if (item) {
+ item->setToolTip(0, tr("Torrent: %1<br>Destination: %2<br>State: %3")
+ .arg(jobs.at(row).torrentFileName)
+ .arg(jobs.at(row).destinationDirectory)
+ .arg(client->stateString()));
+
+ item->setText(5, client->stateString());
+ }
+ setActionsEnabled();
+}
+
+void MainWindow::updatePeerInfo()
+{
+ // Update the number of connected, visited, seed and leecher peers.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+
+ QTreeWidgetItem *item = torrentView->topLevelItem(row);
+ item->setText(1, tr("%1/%2").arg(client->connectedPeerCount())
+ .arg(client->seedCount()));
+}
+
+void MainWindow::updateProgress(int percent)
+{
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+
+ // Update the progressbar.
+ QTreeWidgetItem *item = torrentView->topLevelItem(row);
+ if (item)
+ item->setText(2, QString::number(percent));
+}
+
+void MainWindow::setActionsEnabled()
+{
+ // Find the view item and client for the current row, and update
+ // the states of the actions.
+ QTreeWidgetItem *item = 0;
+ if (!torrentView->selectedItems().isEmpty())
+ item = torrentView->selectedItems().first();
+ TorrentClient *client = item ? jobs.at(torrentView->indexOfTopLevelItem(item)).client : 0;
+ bool pauseEnabled = client && ((client->state() == TorrentClient::Paused)
+ || (client->state() > TorrentClient::Preparing));
+
+ removeTorrentAction->setEnabled(item != 0);
+ pauseTorrentAction->setEnabled(item != 0 && pauseEnabled);
+
+ if (client && client->state() == TorrentClient::Paused) {
+ pauseTorrentAction->setIcon(QIcon(":/icons/player_play.png"));
+ pauseTorrentAction->setText(tr("Resume torrent"));
+ } else {
+ pauseTorrentAction->setIcon(QIcon(":/icons/player_pause.png"));
+ pauseTorrentAction->setText(tr("Pause torrent"));
+ }
+
+ int row = torrentView->indexOfTopLevelItem(item);
+ upActionTool->setEnabled(item && row != 0);
+ downActionTool->setEnabled(item && row != jobs.size() - 1);
+}
+
+void MainWindow::updateDownloadRate(int bytesPerSecond)
+{
+ // Update the download rate.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+ QString num;
+ num.sprintf("%.1f KB/s", bytesPerSecond / 1024.0);
+ torrentView->topLevelItem(row)->setText(3, num);
+
+ if (!saveChanges) {
+ saveChanges = true;
+ QTimer::singleShot(5000, this, SLOT(saveSettings()));
+ }
+}
+
+void MainWindow::updateUploadRate(int bytesPerSecond)
+{
+ // Update the upload rate.
+ TorrentClient *client = qobject_cast<TorrentClient *>(sender());
+ int row = rowOfClient(client);
+ QString num;
+ num.sprintf("%.1f KB/s", bytesPerSecond / 1024.0);
+ torrentView->topLevelItem(row)->setText(4, num);
+
+ if (!saveChanges) {
+ saveChanges = true;
+ QTimer::singleShot(5000, this, SLOT(saveSettings()));
+ }
+}
+
+void MainWindow::pauseTorrent()
+{
+ // Pause or unpause the current torrent.
+ int row = torrentView->indexOfTopLevelItem(torrentView->currentItem());
+ TorrentClient *client = jobs.at(row).client;
+ client->setPaused(client->state() != TorrentClient::Paused);
+ setActionsEnabled();
+}
+
+void MainWindow::moveTorrentUp()
+{
+ QTreeWidgetItem *item = torrentView->currentItem();
+ int row = torrentView->indexOfTopLevelItem(item);
+ if (row == 0)
+ return;
+
+ Job tmp = jobs.at(row - 1);
+ jobs[row - 1] = jobs[row];
+ jobs[row] = tmp;
+
+ QTreeWidgetItem *itemAbove = torrentView->takeTopLevelItem(row - 1);
+ torrentView->insertTopLevelItem(row, itemAbove);
+ setActionsEnabled();
+}
+
+void MainWindow::moveTorrentDown()
+{
+ QTreeWidgetItem *item = torrentView->currentItem();
+ int row = torrentView->indexOfTopLevelItem(item);
+ if (row == jobs.size() - 1)
+ return;
+
+ Job tmp = jobs.at(row + 1);
+ jobs[row + 1] = jobs[row];
+ jobs[row] = tmp;
+
+ QTreeWidgetItem *itemAbove = torrentView->takeTopLevelItem(row + 1);
+ torrentView->insertTopLevelItem(row, itemAbove);
+ setActionsEnabled();
+}
+
+static int rateFromValue(int value)
+{
+ int rate = 0;
+ if (value >= 0 && value < 250) {
+ rate = 1 + int(value * 0.124);
+ } else if (value < 500) {
+ rate = 32 + int((value - 250) * 0.384);
+ } else if (value < 750) {
+ rate = 128 + int((value - 500) * 1.536);
+ } else {
+ rate = 512 + int((value - 750) * 6.1445);
+ }
+ return rate;
+}
+
+void MainWindow::setUploadLimit(int value)
+{
+ int rate = rateFromValue(value);
+ uploadLimitLabel->setText(tr("%1 KB/s").arg(QString().sprintf("%4d", rate)));
+ RateController::instance()->setUploadLimit(rate * 1024);
+}
+
+void MainWindow::setDownloadLimit(int value)
+{
+ int rate = rateFromValue(value);
+ downloadLimitLabel->setText(tr("%1 KB/s").arg(QString().sprintf("%4d", rate)));
+ RateController::instance()->setDownloadLimit(rate * 1024);
+}
+
+void MainWindow::about()
+{
+ QLabel *icon = new QLabel;
+ icon->setPixmap(QPixmap(":/icons/peertopeer.png"));
+
+ QLabel *text = new QLabel;
+ text->setWordWrap(true);
+ text->setText("<p>The <b>Torrent Client</b> example demonstrates how to"
+ " write a complete peer-to-peer file sharing"
+ " application using Qt's network and thread classes.</p>"
+ "<p>This feature complete client implementation of"
+ " the BitTorrent protocol can efficiently"
+ " maintain several hundred network connections"
+ " simultaneously.</p>");
+
+ QPushButton *quitButton = new QPushButton("OK");
+
+ QHBoxLayout *topLayout = new QHBoxLayout;
+ topLayout->setMargin(10);
+ topLayout->setSpacing(10);
+ topLayout->addWidget(icon);
+ topLayout->addWidget(text);
+
+ QHBoxLayout *bottomLayout = new QHBoxLayout;
+ bottomLayout->addStretch();
+ bottomLayout->addWidget(quitButton);
+ bottomLayout->addStretch();
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(topLayout);
+ mainLayout->addLayout(bottomLayout);
+
+ QDialog about(this);
+ about.setModal(true);
+ about.setWindowTitle(tr("About Torrent Client"));
+ about.setLayout(mainLayout);
+
+ connect(quitButton, SIGNAL(clicked()), &about, SLOT(close()));
+
+ about.exec();
+}
+
+void MainWindow::acceptFileDrop(const QString &fileName)
+{
+ // Create and show the "Add Torrent" dialog.
+ AddTorrentDialog *addTorrentDialog = new AddTorrentDialog;
+ lastDirectory = QFileInfo(fileName).absolutePath();
+ addTorrentDialog->setTorrent(fileName);
+ addTorrentDialog->deleteLater();
+ if (!addTorrentDialog->exec())
+ return;
+
+ // Add the torrent to our list of downloads.
+ addTorrent(fileName, addTorrentDialog->destinationFolder());
+ saveSettings();
+}
+
+void MainWindow::closeEvent(QCloseEvent *)
+{
+ if (jobs.isEmpty())
+ return;
+
+ // Save upload / download numbers.
+ saveSettings();
+ saveChanges = false;
+
+ quitDialog = new QProgressDialog(tr("Disconnecting from trackers"), tr("Abort"), 0, jobsToStop, this);
+
+ // Stop all clients, remove the rows from the view and wait for
+ // them to signal that they have stopped.
+ jobsToStop = 0;
+ jobsStopped = 0;
+ foreach (Job job, jobs) {
+ ++jobsToStop;
+ TorrentClient *client = job.client;
+ client->disconnect();
+ connect(client, SIGNAL(stopped()), this, SLOT(torrentStopped()));
+ client->stop();
+ delete torrentView->takeTopLevelItem(0);
+ }
+
+ if (jobsToStop > jobsStopped)
+ quitDialog->exec();
+ quitDialog->deleteLater();
+ quitDialog = 0;
+}
+
+TorrentView::TorrentView(QWidget *parent)
+ : QTreeWidget(parent)
+{
+ setAcceptDrops(true);
+}
+
+void TorrentView::dragMoveEvent(QDragMoveEvent *event)
+{
+ // Accept file actions with a '.torrent' extension.
+ QUrl url(event->mimeData()->text());
+ if (url.isValid() && url.scheme().toLower() == "file"
+ && url.path().toLower().endsWith(".torrent"))
+ event->acceptProposedAction();
+}
+
+void TorrentView::dropEvent(QDropEvent *event)
+{
+ // Accept drops if the file has a '.torrent' extension and it
+ // exists.
+ QString fileName = QUrl(event->mimeData()->text()).path();
+ if (QFile::exists(fileName) && fileName.toLower().endsWith(".torrent"))
+ emit fileDropped(fileName);
+}
+
+#include "mainwindow.moc"
diff --git a/examples/network/torrent/mainwindow.h b/examples/network/torrent/mainwindow.h
new file mode 100644
index 0000000..3249781
--- /dev/null
+++ b/examples/network/torrent/mainwindow.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QStringList>
+#include <QMainWindow>
+
+#include "torrentclient.h"
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QCloseEvent;
+class QLabel;
+class QProgressDialog;
+class QSlider;
+QT_END_NAMESPACE
+class TorrentView;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+ const TorrentClient *clientForRow(int row) const;
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void loadSettings();
+ void saveSettings();
+
+ bool addTorrent();
+ void removeTorrent();
+ void pauseTorrent();
+ void moveTorrentUp();
+ void moveTorrentDown();
+
+ void torrentStopped();
+ void torrentError(TorrentClient::Error error);
+
+ void updateState(TorrentClient::State state);
+ void updatePeerInfo();
+ void updateProgress(int percent);
+ void updateDownloadRate(int bytesPerSecond);
+ void updateUploadRate(int bytesPerSecond);
+
+ void setUploadLimit(int bytes);
+ void setDownloadLimit(int bytes);
+
+ void about();
+ void setActionsEnabled();
+ void acceptFileDrop(const QString &fileName);
+
+private:
+ int rowOfClient(TorrentClient *client) const;
+ bool addTorrent(const QString &fileName, const QString &destinationFolder,
+ const QByteArray &resumeState = QByteArray());
+
+ TorrentView *torrentView;
+ QAction *pauseTorrentAction;
+ QAction *removeTorrentAction;
+ QAction *upActionTool;
+ QAction *downActionTool;
+ QSlider *uploadLimitSlider;
+ QSlider *downloadLimitSlider;
+ QLabel *uploadLimitLabel;
+ QLabel *downloadLimitLabel;
+
+ int uploadLimit;
+ int downloadLimit;
+
+ struct Job {
+ TorrentClient *client;
+ QString torrentFileName;
+ QString destinationDirectory;
+ };
+ QList<Job> jobs;
+ int jobsStopped;
+ int jobsToStop;
+
+ QString lastDirectory;
+ QProgressDialog *quitDialog;
+
+ bool saveChanges;
+};
+
+#endif
diff --git a/examples/network/torrent/metainfo.cpp b/examples/network/torrent/metainfo.cpp
new file mode 100644
index 0000000..03d824c
--- /dev/null
+++ b/examples/network/torrent/metainfo.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bencodeparser.h"
+#include "metainfo.h"
+
+#include <QDateTime>
+#include <QMetaType>
+#include <QString>
+
+MetaInfo::MetaInfo()
+{
+ clear();
+}
+
+void MetaInfo::clear()
+{
+ errString = "Unknown error";
+ content.clear();
+ infoData.clear();
+ metaInfoMultiFiles.clear();
+ metaInfoAnnounce.clear();
+ metaInfoAnnounceList.clear();
+ metaInfoCreationDate = QDateTime();
+ metaInfoComment.clear();
+ metaInfoCreatedBy.clear();
+ metaInfoName.clear();
+ metaInfoPieceLength = 0;
+ metaInfoSha1Sums.clear();
+}
+
+bool MetaInfo::parse(const QByteArray &data)
+{
+ clear();
+ content = data;
+
+ BencodeParser parser;
+ if (!parser.parse(content)) {
+ errString = parser.errorString();
+ return false;
+ }
+
+ infoData = parser.infoSection();
+
+ QMap<QByteArray, QVariant> dict = parser.dictionary();
+ if (!dict.contains("info"))
+ return false;
+
+ QMap<QByteArray, QVariant> info = qVariantValue<Dictionary>(dict.value("info"));
+
+ if (info.contains("files")) {
+ metaInfoFileForm = MultiFileForm;
+
+ QList<QVariant> files = info.value("files").toList();
+
+ for (int i = 0; i < files.size(); ++i) {
+ QMap<QByteArray, QVariant> file = qVariantValue<Dictionary>(files.at(i));
+ QList<QVariant> pathElements = file.value("path").toList();
+ QByteArray path;
+ foreach (QVariant p, pathElements) {
+ if (!path.isEmpty())
+ path += "/";
+ path += p.toByteArray();
+ }
+
+ MetaInfoMultiFile multiFile;
+ multiFile.length = file.value("length").toLongLong();
+ multiFile.path = QString::fromUtf8(path);
+ multiFile.md5sum = file.value("md5sum").toByteArray();
+ metaInfoMultiFiles << multiFile;
+ }
+
+ metaInfoName = QString::fromUtf8(info.value("name").toByteArray());
+ metaInfoPieceLength = info.value("piece length").toInt();
+ QByteArray pieces = info.value("pieces").toByteArray();
+ for (int i = 0; i < pieces.size(); i += 20)
+ metaInfoSha1Sums << pieces.mid(i, 20);
+ } else if (info.contains("length")) {
+ metaInfoFileForm = SingleFileForm;
+ metaInfoSingleFile.length = info.value("length").toLongLong();
+ metaInfoSingleFile.md5sum = info.value("md5sum").toByteArray();
+ metaInfoSingleFile.name = QString::fromUtf8(info.value("name").toByteArray());
+ metaInfoSingleFile.pieceLength = info.value("piece length").toInt();
+
+ QByteArray pieces = info.value("pieces").toByteArray();
+ for (int i = 0; i < pieces.size(); i += 20)
+ metaInfoSingleFile.sha1Sums << pieces.mid(i, 20);
+ }
+
+ metaInfoAnnounce = QString::fromUtf8(dict.value("announce").toByteArray());
+
+ if (dict.contains("announce-list")) {
+ // ### unimplemented
+ }
+
+ if (dict.contains("creation date"))
+ metaInfoCreationDate.setTime_t(dict.value("creation date").toInt());
+ if (dict.contains("comment"))
+ metaInfoComment = QString::fromUtf8(dict.value("comment").toByteArray());
+ if (dict.contains("created by"))
+ metaInfoCreatedBy = QString::fromUtf8(dict.value("created by").toByteArray());
+
+ return true;
+}
+
+QByteArray MetaInfo::infoValue() const
+{
+ return infoData;
+}
+
+QString MetaInfo::errorString() const
+{
+ return errString;
+}
+
+MetaInfo::FileForm MetaInfo::fileForm() const
+{
+ return metaInfoFileForm;
+}
+
+QString MetaInfo::announceUrl() const
+{
+ return metaInfoAnnounce;
+}
+
+QStringList MetaInfo::announceList() const
+{
+ return metaInfoAnnounceList;
+}
+
+QDateTime MetaInfo::creationDate() const
+{
+ return metaInfoCreationDate;
+}
+
+QString MetaInfo::comment() const
+{
+ return metaInfoComment;
+}
+
+QString MetaInfo::createdBy() const
+{
+ return metaInfoCreatedBy;
+}
+
+MetaInfoSingleFile MetaInfo::singleFile() const
+{
+ return metaInfoSingleFile;
+}
+
+QList<MetaInfoMultiFile> MetaInfo::multiFiles() const
+{
+ return metaInfoMultiFiles;
+}
+
+QString MetaInfo::name() const
+{
+ return metaInfoName;
+}
+
+int MetaInfo::pieceLength() const
+{
+ return metaInfoPieceLength;
+}
+
+QList<QByteArray> MetaInfo::sha1Sums() const
+{
+ return metaInfoSha1Sums;
+}
+
+qint64 MetaInfo::totalSize() const
+{
+ if (fileForm() == SingleFileForm)
+ return singleFile().length;
+
+ qint64 size = 0;
+ foreach (MetaInfoMultiFile file, multiFiles())
+ size += file.length;
+ return size;
+}
diff --git a/examples/network/torrent/metainfo.h b/examples/network/torrent/metainfo.h
new file mode 100644
index 0000000..de60b99
--- /dev/null
+++ b/examples/network/torrent/metainfo.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef METAINFO_H
+#define METAINFO_H
+
+#include <QByteArray>
+#include <QDateTime>
+#include <QList>
+#include <QMap>
+#include <QString>
+#include <QStringList>
+#include <QVariant>
+
+struct MetaInfoSingleFile
+{
+ qint64 length;
+ QByteArray md5sum;
+ QString name;
+ int pieceLength;
+ QList<QByteArray> sha1Sums;
+};
+
+struct MetaInfoMultiFile
+{
+ qint64 length;
+ QByteArray md5sum;
+ QString path;
+};
+
+class MetaInfo
+{
+public:
+ enum FileForm {
+ SingleFileForm,
+ MultiFileForm
+ };
+
+ MetaInfo();
+ void clear();
+
+ bool parse(const QByteArray &data);
+ QString errorString() const;
+
+ QByteArray infoValue() const;
+
+ FileForm fileForm() const;
+ QString announceUrl() const;
+ QStringList announceList() const;
+ QDateTime creationDate() const;
+ QString comment() const;
+ QString createdBy() const;
+
+ // For single file form
+ MetaInfoSingleFile singleFile() const;
+
+ // For multifile form
+ QList<MetaInfoMultiFile> multiFiles() const;
+ QString name() const;
+ int pieceLength() const;
+ QList<QByteArray> sha1Sums() const;
+
+ // Total size
+ qint64 totalSize() const;
+
+private:
+ QString errString;
+ QByteArray content;
+ QByteArray infoData;
+
+ FileForm metaInfoFileForm;
+ MetaInfoSingleFile metaInfoSingleFile;
+ QList<MetaInfoMultiFile> metaInfoMultiFiles;
+ QString metaInfoAnnounce;
+ QStringList metaInfoAnnounceList;
+ QDateTime metaInfoCreationDate;
+ QString metaInfoComment;
+ QString metaInfoCreatedBy;
+ QString metaInfoName;
+ int metaInfoPieceLength;
+ QList<QByteArray> metaInfoSha1Sums;
+};
+
+#endif
diff --git a/examples/network/torrent/peerwireclient.cpp b/examples/network/torrent/peerwireclient.cpp
new file mode 100644
index 0000000..e79184b
--- /dev/null
+++ b/examples/network/torrent/peerwireclient.cpp
@@ -0,0 +1,665 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "peerwireclient.h"
+
+#include <QHostAddress>
+#include <QTimerEvent>
+
+static const int PendingRequestTimeout = 60 * 1000;
+static const int ClientTimeout = 120 * 1000;
+static const int ConnectTimeout = 60 * 1000;
+static const int KeepAliveInterval = 30 * 1000;
+static const int RateControlTimerDelay = 2000;
+static const int MinimalHeaderSize = 48;
+static const int FullHeaderSize = 68;
+static const char ProtocolId[] = "BitTorrent protocol";
+static const char ProtocolIdSize = 19;
+
+// Reads a 32bit unsigned int from data in network order.
+static inline quint32 fromNetworkData(const char *data)
+{
+ const unsigned char *udata = (const unsigned char *)data;
+ return (quint32(udata[0]) << 24)
+ | (quint32(udata[1]) << 16)
+ | (quint32(udata[2]) << 8)
+ | (quint32(udata[3]));
+}
+
+// Writes a 32bit unsigned int from num to data in network order.
+static inline void toNetworkData(quint32 num, char *data)
+{
+ unsigned char *udata = (unsigned char *)data;
+ udata[3] = (num & 0xff);
+ udata[2] = (num & 0xff00) >> 8;
+ udata[1] = (num & 0xff0000) >> 16;
+ udata[0] = (num & 0xff000000) >> 24;
+}
+
+// Constructs an unconnected PeerWire client and starts the connect timer.
+PeerWireClient::PeerWireClient(const QByteArray &peerId, QObject *parent)
+ : QTcpSocket(parent), pendingBlockSizes(0),
+ pwState(ChokingPeer | ChokedByPeer), receivedHandShake(false), gotPeerId(false),
+ sentHandShake(false), nextPacketLength(-1), pendingRequestTimer(0), invalidateTimeout(false),
+ keepAliveTimer(0), torrentPeer(0)
+{
+ memset(uploadSpeedData, 0, sizeof(uploadSpeedData));
+ memset(downloadSpeedData, 0, sizeof(downloadSpeedData));
+
+ transferSpeedTimer = startTimer(RateControlTimerDelay);
+ timeoutTimer = startTimer(ConnectTimeout);
+ peerIdString = peerId;
+
+ connect(this, SIGNAL(readyRead()), this, SIGNAL(readyToTransfer()));
+ connect(this, SIGNAL(connected()), this, SIGNAL(readyToTransfer()));
+
+ connect(&socket, SIGNAL(connected()),
+ this, SIGNAL(connected()));
+ connect(&socket, SIGNAL(readyRead()),
+ this, SIGNAL(readyRead()));
+ connect(&socket, SIGNAL(disconnected()),
+ this, SIGNAL(disconnected()));
+ connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SIGNAL(error(QAbstractSocket::SocketError)));
+ connect(&socket, SIGNAL(bytesWritten(qint64)),
+ this, SIGNAL(bytesWritten(qint64)));
+ connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
+ this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
+
+}
+
+// Registers the peer ID and SHA1 sum of the torrent, and initiates
+// the handshake.
+void PeerWireClient::initialize(const QByteArray &infoHash, int pieceCount)
+{
+ this->infoHash = infoHash;
+ peerPieces.resize(pieceCount);
+ if (!sentHandShake)
+ sendHandShake();
+}
+
+void PeerWireClient::setPeer(TorrentPeer *peer)
+{
+ torrentPeer = peer;
+}
+
+TorrentPeer *PeerWireClient::peer() const
+{
+ return torrentPeer;
+}
+
+QBitArray PeerWireClient::availablePieces() const
+{
+ return peerPieces;
+}
+
+QList<TorrentBlock> PeerWireClient::incomingBlocks() const
+{
+ return incoming;
+}
+
+// Sends a "choke" message, asking the peer to stop requesting blocks.
+void PeerWireClient::chokePeer()
+{
+ const char message[] = {0, 0, 0, 1, 0};
+ write(message, sizeof(message));
+ pwState |= ChokingPeer;
+
+ // After receiving a choke message, the peer will assume all
+ // pending requests are lost.
+ pendingBlocks.clear();
+ pendingBlockSizes = 0;
+}
+
+// Sends an "unchoke" message, allowing the peer to start/resume
+// requesting blocks.
+void PeerWireClient::unchokePeer()
+{
+ const char message[] = {0, 0, 0, 1, 1};
+ write(message, sizeof(message));
+ pwState &= ~ChokingPeer;
+
+ if (pendingRequestTimer)
+ killTimer(pendingRequestTimer);
+}
+
+// Sends a "keep-alive" message to prevent the peer from closing
+// the connection when there's no activity
+void PeerWireClient::sendKeepAlive()
+{
+ const char message[] = {0, 0, 0, 0};
+ write(message, sizeof(message));
+}
+
+// Sends an "interested" message, informing the peer that it has got
+// pieces that we'd like to download.
+void PeerWireClient::sendInterested()
+{
+ const char message[] = {0, 0, 0, 1, 2};
+ write(message, sizeof(message));
+ pwState |= InterestedInPeer;
+
+ // After telling the peer that we're interested, we expect to get
+ // unchoked within a certain timeframe; otherwise we'll drop the
+ // connection.
+ if (pendingRequestTimer)
+ killTimer(pendingRequestTimer);
+ pendingRequestTimer = startTimer(PendingRequestTimeout);
+}
+
+// Sends a "not interested" message, informing the peer that it does
+// not have any pieces that we'd like to download.
+void PeerWireClient::sendNotInterested()
+{
+ const char message[] = {0, 0, 0, 1, 3};
+ write(message, sizeof(message));
+ pwState &= ~InterestedInPeer;
+}
+
+// Sends a piece notification / a "have" message, informing the peer
+// that we have just downloaded a new piece.
+void PeerWireClient::sendPieceNotification(int piece)
+{
+ if (!sentHandShake)
+ sendHandShake();
+
+ char message[] = {0, 0, 0, 5, 4, 0, 0, 0, 0};
+ toNetworkData(piece, &message[5]);
+ write(message, sizeof(message));
+}
+
+// Sends the complete list of pieces that we have downloaded.
+void PeerWireClient::sendPieceList(const QBitArray &bitField)
+{
+ // The bitfield message may only be sent immediately after the
+ // handshaking sequence is completed, and before any other
+ // messages are sent.
+ if (!sentHandShake)
+ sendHandShake();
+
+ // Don't send the bitfield if it's all zeros.
+ if (bitField.count(true) == 0)
+ return;
+
+ int bitFieldSize = bitField.size();
+ int size = (bitFieldSize + 7) / 8;
+ QByteArray bits(size, '\0');
+ for (int i = 0; i < bitFieldSize; ++i) {
+ if (bitField.testBit(i)) {
+ quint32 byte = quint32(i) / 8;
+ quint32 bit = quint32(i) % 8;
+ bits[byte] = uchar(bits.at(byte)) | (1 << (7 - bit));
+ }
+ }
+
+ char message[] = {0, 0, 0, 1, 5};
+ toNetworkData(bits.size() + 1, &message[0]);
+ write(message, sizeof(message));
+ write(bits);
+}
+
+// Sends a request for a block.
+void PeerWireClient::requestBlock(int piece, int offset, int length)
+{
+ char message[] = {0, 0, 0, 1, 6};
+ toNetworkData(13, &message[0]);
+ write(message, sizeof(message));
+
+ char numbers[4 * 3];
+ toNetworkData(piece, &numbers[0]);
+ toNetworkData(offset, &numbers[4]);
+ toNetworkData(length, &numbers[8]);
+ write(numbers, sizeof(numbers));
+
+ incoming << TorrentBlock(piece, offset, length);
+
+ // After requesting a block, we expect the block to be sent by the
+ // other peer within a certain number of seconds. Otherwise, we
+ // drop the connection.
+ if (pendingRequestTimer)
+ killTimer(pendingRequestTimer);
+ pendingRequestTimer = startTimer(PendingRequestTimeout);
+}
+
+// Cancels a request for a block.
+void PeerWireClient::cancelRequest(int piece, int offset, int length)
+{
+ char message[] = {0, 0, 0, 1, 8};
+ toNetworkData(13, &message[0]);
+ write(message, sizeof(message));
+
+ char numbers[4 * 3];
+ toNetworkData(piece, &numbers[0]);
+ toNetworkData(offset, &numbers[4]);
+ toNetworkData(length, &numbers[8]);
+ write(numbers, sizeof(numbers));
+
+ incoming.removeAll(TorrentBlock(piece, offset, length));
+}
+
+// Sends a block to the peer.
+void PeerWireClient::sendBlock(int piece, int offset, const QByteArray &data)
+{
+ QByteArray block;
+
+ char message[] = {0, 0, 0, 1, 7};
+ toNetworkData(9 + data.size(), &message[0]);
+ block += QByteArray(message, sizeof(message));
+
+ char numbers[4 * 2];
+ toNetworkData(piece, &numbers[0]);
+ toNetworkData(offset, &numbers[4]);
+ block += QByteArray(numbers, sizeof(numbers));
+ block += data;
+
+ BlockInfo blockInfo;
+ blockInfo.pieceIndex = piece;
+ blockInfo.offset = offset;
+ blockInfo.length = data.size();
+ blockInfo.block = block;
+
+ pendingBlocks << blockInfo;
+ pendingBlockSizes += block.size();
+
+ if (pendingBlockSizes > 32 * 16384) {
+ chokePeer();
+ unchokePeer();
+ return;
+ }
+ emit readyToTransfer();
+}
+
+// Attempts to write 'bytes' bytes to the socket from the buffer.
+// This is used by RateController, which precisely controls how much
+// each client can write.
+qint64 PeerWireClient::writeToSocket(qint64 bytes)
+{
+ qint64 totalWritten = 0;
+ do {
+ if (outgoingBuffer.isEmpty() && !pendingBlocks.isEmpty()) {
+ BlockInfo block = pendingBlocks.takeFirst();
+ pendingBlockSizes -= block.length;
+ outgoingBuffer += block.block;
+ }
+ qint64 written = socket.write(outgoingBuffer.constData(),
+ qMin<qint64>(bytes - totalWritten, outgoingBuffer.size()));
+ if (written <= 0)
+ return totalWritten ? totalWritten : written;
+
+ totalWritten += written;
+ uploadSpeedData[0] += written;
+ outgoingBuffer.remove(0, written);
+ } while (totalWritten < bytes && (!outgoingBuffer.isEmpty() || !pendingBlocks.isEmpty()));
+
+ return totalWritten;
+}
+
+// Attempts to read at most 'bytes' bytes from the socket.
+qint64 PeerWireClient::readFromSocket(qint64 bytes)
+{
+ char buffer[1024];
+ qint64 totalRead = 0;
+ do {
+ qint64 bytesRead = socket.read(buffer, qMin<qint64>(sizeof(buffer), bytes - totalRead));
+ if (bytesRead <= 0)
+ break;
+ qint64 oldSize = incomingBuffer.size();
+ incomingBuffer.resize(oldSize + bytesRead);
+ memcpy(incomingBuffer.data() + oldSize, buffer, bytesRead);
+
+ totalRead += bytesRead;
+ } while (totalRead < bytes);
+
+ if (totalRead > 0) {
+ downloadSpeedData[0] += totalRead;
+ emit bytesReceived(totalRead);
+ processIncomingData();
+ }
+ return totalRead;
+}
+
+// Returns the average number of bytes per second this client is
+// downloading.
+qint64 PeerWireClient::downloadSpeed() const
+{
+ qint64 sum = 0;
+ for (unsigned int i = 0; i < sizeof(downloadSpeedData) / sizeof(qint64); ++i)
+ sum += downloadSpeedData[i];
+ return sum / (8 * 2);
+}
+
+// Returns the average number of bytes per second this client is
+// uploading.
+qint64 PeerWireClient::uploadSpeed() const
+{
+ qint64 sum = 0;
+ for (unsigned int i = 0; i < sizeof(uploadSpeedData) / sizeof(qint64); ++i)
+ sum += uploadSpeedData[i];
+ return sum / (8 * 2);
+}
+
+void PeerWireClient::setReadBufferSize(int size)
+{
+ socket.setReadBufferSize(size);
+}
+
+bool PeerWireClient::canTransferMore() const
+{
+ return bytesAvailable() > 0 || socket.bytesAvailable() > 0
+ || !outgoingBuffer.isEmpty() || !pendingBlocks.isEmpty();
+}
+
+void PeerWireClient::connectToHostImplementation(const QString &hostName,
+ quint16 port, OpenMode openMode)
+
+{
+ setOpenMode(openMode);
+ socket.connectToHost(hostName, port, openMode);
+}
+
+void PeerWireClient::diconnectFromHostImplementation()
+{
+ socket.disconnectFromHost();
+}
+
+void PeerWireClient::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == transferSpeedTimer) {
+ // Rotate the upload / download records.
+ for (int i = 6; i >= 0; --i) {
+ uploadSpeedData[i + 1] = uploadSpeedData[i];
+ downloadSpeedData[i + 1] = downloadSpeedData[i];
+ }
+ uploadSpeedData[0] = 0;
+ downloadSpeedData[0] = 0;
+ } else if (event->timerId() == timeoutTimer) {
+ // Disconnect if we timed out; otherwise the timeout is
+ // restarted.
+ if (invalidateTimeout) {
+ invalidateTimeout = false;
+ } else {
+ abort();
+ emit infoHashReceived(QByteArray());
+ }
+ } else if (event->timerId() == pendingRequestTimer) {
+ abort();
+ } else if (event->timerId() == keepAliveTimer) {
+ sendKeepAlive();
+ }
+ QTcpSocket::timerEvent(event);
+}
+
+// Sends the handshake to the peer.
+void PeerWireClient::sendHandShake()
+{
+ sentHandShake = true;
+
+ // Restart the timeout
+ if (timeoutTimer)
+ killTimer(timeoutTimer);
+ timeoutTimer = startTimer(ClientTimeout);
+
+ // Write the 68 byte PeerWire handshake.
+ write(&ProtocolIdSize, 1);
+ write(ProtocolId, ProtocolIdSize);
+ write(QByteArray(8, '\0'));
+ write(infoHash);
+ write(peerIdString);
+}
+
+void PeerWireClient::processIncomingData()
+{
+ invalidateTimeout = true;
+ if (!receivedHandShake) {
+ // Check that we received enough data
+ if (bytesAvailable() < MinimalHeaderSize)
+ return;
+
+ // Sanity check the protocol ID
+ QByteArray id = read(ProtocolIdSize + 1);
+ if (id.at(0) != ProtocolIdSize || !id.mid(1).startsWith(ProtocolId)) {
+ abort();
+ return;
+ }
+
+ // Discard 8 reserved bytes, then read the info hash and peer ID
+ (void) read(8);
+
+ // Read infoHash
+ QByteArray peerInfoHash = read(20);
+ if (!infoHash.isEmpty() && peerInfoHash != infoHash) {
+ abort();
+ return;
+ }
+
+ emit infoHashReceived(peerInfoHash);
+ if (infoHash.isEmpty()) {
+ abort();
+ return;
+ }
+
+ // Send handshake
+ if (!sentHandShake)
+ sendHandShake();
+ receivedHandShake = true;
+ }
+
+ // Handle delayed peer id arrival
+ if (!gotPeerId) {
+ if (bytesAvailable() < 20)
+ return;
+ gotPeerId = true;
+ if (read(20) == peerIdString) {
+ // We connected to ourself
+ abort();
+ return;
+ }
+ }
+
+ // Initialize keep-alive timer
+ if (!keepAliveTimer)
+ keepAliveTimer = startTimer(KeepAliveInterval);
+
+ do {
+ // Find the packet length
+ if (nextPacketLength == -1) {
+ if (bytesAvailable() < 4)
+ return;
+
+ char tmp[4];
+ read(tmp, sizeof(tmp));
+ nextPacketLength = fromNetworkData(tmp);
+
+ if (nextPacketLength < 0 || nextPacketLength > 200000) {
+ // Prevent DoS
+ abort();
+ return;
+ }
+ }
+
+ // KeepAlive
+ if (nextPacketLength == 0) {
+ nextPacketLength = -1;
+ continue;
+ }
+
+ // Wait with parsing until the whole packet has been received
+ if (bytesAvailable() < nextPacketLength)
+ return;
+
+ // Read the packet
+ QByteArray packet = read(nextPacketLength);
+ if (packet.size() != nextPacketLength) {
+ abort();
+ return;
+ }
+
+ switch (packet.at(0)) {
+ case ChokePacket:
+ // We have been choked.
+ pwState |= ChokedByPeer;
+ incoming.clear();
+ if (pendingRequestTimer)
+ killTimer(pendingRequestTimer);
+ emit choked();
+ break;
+ case UnchokePacket:
+ // We have been unchoked.
+ pwState &= ~ChokedByPeer;
+ emit unchoked();
+ break;
+ case InterestedPacket:
+ // The peer is interested in downloading.
+ pwState |= PeerIsInterested;
+ emit interested();
+ break;
+ case NotInterestedPacket:
+ // The peer is not interested in downloading.
+ pwState &= ~PeerIsInterested;
+ emit notInterested();
+ break;
+ case HavePacket: {
+ // The peer has a new piece available.
+ quint32 index = fromNetworkData(&packet.data()[1]);
+ if (index < quint32(peerPieces.size())) {
+ // Only accept indexes within the valid range.
+ peerPieces.setBit(int(index));
+ }
+ emit piecesAvailable(availablePieces());
+ break;
+ }
+ case BitFieldPacket:
+ // The peer has the following pieces available.
+ for (int i = 1; i < packet.size(); ++i) {
+ for (int bit = 0; bit < 8; ++bit) {
+ if (packet.at(i) & (1 << (7 - bit))) {
+ int bitIndex = int(((i - 1) * 8) + bit);
+ if (bitIndex >= 0 && bitIndex < peerPieces.size()) {
+ // Occasionally, broken clients claim to have
+ // pieces whose index is outside the valid range.
+ // The most common mistake is the index == size
+ // case.
+ peerPieces.setBit(bitIndex);
+ }
+ }
+ }
+ }
+ emit piecesAvailable(availablePieces());
+ break;
+ case RequestPacket: {
+ // The peer requests a block.
+ quint32 index = fromNetworkData(&packet.data()[1]);
+ quint32 begin = fromNetworkData(&packet.data()[5]);
+ quint32 length = fromNetworkData(&packet.data()[9]);
+ emit blockRequested(int(index), int(begin), int(length));
+ break;
+ }
+ case PiecePacket: {
+ int index = int(fromNetworkData(&packet.data()[1]));
+ int begin = int(fromNetworkData(&packet.data()[5]));
+
+ incoming.removeAll(TorrentBlock(index, begin, packet.size() - 9));
+
+ // The peer sends a block.
+ emit blockReceived(index, begin, packet.mid(9));
+
+ // Kill the pending block timer.
+ if (pendingRequestTimer) {
+ killTimer(pendingRequestTimer);
+ pendingRequestTimer = 0;
+ }
+ break;
+ }
+ case CancelPacket: {
+ // The peer cancels a block request.
+ quint32 index = fromNetworkData(&packet.data()[1]);
+ quint32 begin = fromNetworkData(&packet.data()[5]);
+ quint32 length = fromNetworkData(&packet.data()[9]);
+ for (int i = 0; i < pendingBlocks.size(); ++i) {
+ const BlockInfo &blockInfo = pendingBlocks.at(i);
+ if (blockInfo.pieceIndex == int(index)
+ && blockInfo.offset == int(begin)
+ && blockInfo.length == int(length)) {
+ pendingBlocks.removeAt(i);
+ break;
+ }
+ }
+ break;
+ }
+ default:
+ // Unsupported packet type; just ignore it.
+ break;
+ }
+ nextPacketLength = -1;
+ } while (bytesAvailable() > 0);
+}
+
+void PeerWireClient::socketStateChanged(QAbstractSocket::SocketState state)
+{
+ setLocalAddress(socket.localAddress());
+ setLocalPort(socket.localPort());
+ setPeerName(socket.peerName());
+ setPeerAddress(socket.peerAddress());
+ setPeerPort(socket.peerPort());
+ setSocketState(state);
+}
+
+qint64 PeerWireClient::readData(char *data, qint64 size)
+{
+ int n = qMin<int>(size, incomingBuffer.size());
+ memcpy(data, incomingBuffer.constData(), n);
+ incomingBuffer.remove(0, n);
+ return n;
+}
+
+qint64 PeerWireClient::readLineData(char *data, qint64 maxlen)
+{
+ return QIODevice::readLineData(data, maxlen);
+}
+
+qint64 PeerWireClient::writeData(const char *data, qint64 size)
+{
+ int oldSize = outgoingBuffer.size();
+ outgoingBuffer.resize(oldSize + size);
+ memcpy(outgoingBuffer.data() + oldSize, data, size);
+ emit readyToTransfer();
+ return size;
+}
diff --git a/examples/network/torrent/peerwireclient.h b/examples/network/torrent/peerwireclient.h
new file mode 100644
index 0000000..a21faa2
--- /dev/null
+++ b/examples/network/torrent/peerwireclient.h
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PEERWIRECLIENT_H
+#define PEERWIRECLIENT_H
+
+#include <QBitArray>
+#include <QList>
+#include <QTcpSocket>
+
+QT_BEGIN_NAMESPACE
+class QHostAddress;
+class QTimerEvent;
+QT_END_NAMESPACE
+class TorrentPeer;
+
+struct TorrentBlock
+{
+ inline TorrentBlock(int p, int o, int l)
+ : pieceIndex(p), offset(o), length(l)
+ {
+ }
+ inline bool operator==(const TorrentBlock &other) const
+ {
+ return pieceIndex == other.pieceIndex
+ && offset == other.offset
+ && length == other.length;
+ }
+
+ int pieceIndex;
+ int offset;
+ int length;
+};
+
+class PeerWireClient : public QTcpSocket
+{
+ Q_OBJECT
+
+public:
+ enum PeerWireStateFlag {
+ ChokingPeer = 0x1,
+ InterestedInPeer = 0x2,
+ ChokedByPeer = 0x4,
+ PeerIsInterested = 0x8
+ };
+ Q_DECLARE_FLAGS(PeerWireState, PeerWireStateFlag)
+
+ PeerWireClient(const QByteArray &peerId, QObject *parent = 0);
+ void initialize(const QByteArray &infoHash, int pieceCount);
+
+ void setPeer(TorrentPeer *peer);
+ TorrentPeer *peer() const;
+
+ // State
+ inline PeerWireState peerWireState() const { return pwState; }
+ QBitArray availablePieces() const;
+ QList<TorrentBlock> incomingBlocks() const;
+
+ // Protocol
+ void chokePeer();
+ void unchokePeer();
+ void sendInterested();
+ void sendKeepAlive();
+ void sendNotInterested();
+ void sendPieceNotification(int piece);
+ void sendPieceList(const QBitArray &bitField);
+ void requestBlock(int piece, int offset, int length);
+ void cancelRequest(int piece, int offset, int length);
+ void sendBlock(int piece, int offset, const QByteArray &data);
+
+ // Rate control
+ qint64 writeToSocket(qint64 bytes);
+ qint64 readFromSocket(qint64 bytes);
+ qint64 downloadSpeed() const;
+ qint64 uploadSpeed() const;
+
+ bool canTransferMore() const;
+ qint64 bytesAvailable() const { return incomingBuffer.size() + QTcpSocket::bytesAvailable(); }
+ qint64 socketBytesAvailable() const { return socket.bytesAvailable(); }
+ qint64 socketBytesToWrite() const { return socket.bytesToWrite(); }
+
+ void setReadBufferSize(int size);
+
+signals:
+ void infoHashReceived(const QByteArray &infoHash);
+ void readyToTransfer();
+
+ void choked();
+ void unchoked();
+ void interested();
+ void notInterested();
+
+ void piecesAvailable(const QBitArray &pieces);
+ void blockRequested(int pieceIndex, int begin, int length);
+ void blockReceived(int pieceIndex, int begin, const QByteArray &data);
+
+ void bytesReceived(qint64 size);
+
+protected slots:
+ void connectToHostImplementation(const QString &hostName,
+ quint16 port, OpenMode openMode = ReadWrite);
+ void diconnectFromHostImplementation();
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 readLineData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 len);
+
+private slots:
+ void sendHandShake();
+ void processIncomingData();
+ void socketStateChanged(QAbstractSocket::SocketState state);
+
+private:
+ // Data waiting to be read/written
+ QByteArray incomingBuffer;
+ QByteArray outgoingBuffer;
+
+ struct BlockInfo {
+ int pieceIndex;
+ int offset;
+ int length;
+ QByteArray block;
+ };
+ QList<BlockInfo> pendingBlocks;
+ int pendingBlockSizes;
+ QList<TorrentBlock> incoming;
+
+ enum PacketType {
+ ChokePacket = 0,
+ UnchokePacket = 1,
+ InterestedPacket = 2,
+ NotInterestedPacket = 3,
+ HavePacket = 4,
+ BitFieldPacket = 5,
+ RequestPacket = 6,
+ PiecePacket = 7,
+ CancelPacket = 8
+ };
+
+ // State
+ PeerWireState pwState;
+ bool receivedHandShake;
+ bool gotPeerId;
+ bool sentHandShake;
+ int nextPacketLength;
+
+ // Upload/download speed records
+ qint64 uploadSpeedData[8];
+ qint64 downloadSpeedData[8];
+ int transferSpeedTimer;
+
+ // Timeout handling
+ int timeoutTimer;
+ int pendingRequestTimer;
+ bool invalidateTimeout;
+ int keepAliveTimer;
+
+ // Checksum, peer ID and set of available pieces
+ QByteArray infoHash;
+ QByteArray peerIdString;
+ QBitArray peerPieces;
+ TorrentPeer *torrentPeer;
+
+ QTcpSocket socket;
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(PeerWireClient::PeerWireState)
+
+#endif
diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp
new file mode 100644
index 0000000..243d897
--- /dev/null
+++ b/examples/network/torrent/ratecontroller.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "peerwireclient.h"
+#include "ratecontroller.h"
+
+#include <QtCore>
+
+Q_GLOBAL_STATIC(RateController, rateController)
+
+RateController *RateController::instance()
+{
+ return rateController();
+}
+
+void RateController::addSocket(PeerWireClient *socket)
+{
+ connect(socket, SIGNAL(readyToTransfer()), this, SLOT(scheduleTransfer()));
+ socket->setReadBufferSize(downLimit * 4);
+ sockets << socket;
+ scheduleTransfer();
+}
+
+void RateController::removeSocket(PeerWireClient *socket)
+{
+ disconnect(socket, SIGNAL(readyToTransfer()), this, SLOT(scheduleTransfer()));
+ socket->setReadBufferSize(0);
+ sockets.remove(socket);
+}
+
+void RateController::setDownloadLimit(int bytesPerSecond)
+{
+ downLimit = bytesPerSecond;
+ foreach (PeerWireClient *socket, sockets)
+ socket->setReadBufferSize(downLimit * 4);
+}
+
+void RateController::scheduleTransfer()
+{
+ if (transferScheduled)
+ return;
+ transferScheduled = true;
+ QTimer::singleShot(50, this, SLOT(transfer()));
+}
+
+void RateController::transfer()
+{
+ transferScheduled = false;
+ if (sockets.isEmpty())
+ return;
+
+ int msecs = 1000;
+ if (!stopWatch.isNull())
+ msecs = qMin(msecs, stopWatch.elapsed());
+
+ qint64 bytesToWrite = (upLimit * msecs) / 1000;
+ qint64 bytesToRead = (downLimit * msecs) / 1000;
+ if (bytesToWrite == 0 && bytesToRead == 0) {
+ scheduleTransfer();
+ return;
+ }
+
+ QSet<PeerWireClient *> pendingSockets;
+ foreach (PeerWireClient *client, sockets) {
+ if (client->canTransferMore())
+ pendingSockets << client;
+ }
+ if (pendingSockets.isEmpty())
+ return;
+
+ stopWatch.start();
+
+ bool canTransferMore;
+ do {
+ canTransferMore = false;
+ qint64 writeChunk = qMax<qint64>(1, bytesToWrite / pendingSockets.size());
+ qint64 readChunk = qMax<qint64>(1, bytesToRead / pendingSockets.size());
+
+ QSetIterator<PeerWireClient *> it(pendingSockets);
+ while (it.hasNext() && (bytesToWrite > 0 || bytesToRead > 0)) {
+ PeerWireClient *socket = it.next();
+ if (socket->state() != QAbstractSocket::ConnectedState) {
+ pendingSockets.remove(socket);
+ continue;
+ }
+
+ bool dataTransferred = false;
+ qint64 available = qMin<qint64>(socket->socketBytesAvailable(), readChunk);
+ if (available > 0) {
+ qint64 readBytes = socket->readFromSocket(qMin<qint64>(available, bytesToRead));
+ if (readBytes > 0) {
+ bytesToRead -= readBytes;
+ dataTransferred = true;
+ }
+ }
+
+ if (upLimit * 2 > socket->bytesToWrite()) {
+ qint64 chunkSize = qMin<qint64>(writeChunk, bytesToWrite);
+ qint64 toWrite = qMin(upLimit * 2 - socket->bytesToWrite(), chunkSize);
+ if (toWrite > 0) {
+ qint64 writtenBytes = socket->writeToSocket(toWrite);
+ if (writtenBytes > 0) {
+ bytesToWrite -= writtenBytes;
+ dataTransferred = true;
+ }
+ }
+ }
+
+ if (dataTransferred && socket->canTransferMore())
+ canTransferMore = true;
+ else
+ pendingSockets.remove(socket);
+ }
+ } while (canTransferMore && (bytesToWrite > 0 || bytesToRead > 0) && !pendingSockets.isEmpty());
+
+ if (canTransferMore || bytesToWrite == 0 || bytesToRead == 0)
+ scheduleTransfer();
+}
diff --git a/examples/network/torrent/ratecontroller.h b/examples/network/torrent/ratecontroller.h
new file mode 100644
index 0000000..fb22159
--- /dev/null
+++ b/examples/network/torrent/ratecontroller.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RATECONTROLLER_H
+#define RATECONTROLLER_H
+
+#include <QObject>
+#include <QSet>
+#include <QTime>
+
+class PeerWireClient;
+
+class RateController : public QObject
+{
+ Q_OBJECT
+
+public:
+ inline RateController(QObject *parent = 0)
+ : QObject(parent), transferScheduled(false) { }
+ static RateController *instance();
+
+ void addSocket(PeerWireClient *socket);
+ void removeSocket(PeerWireClient *socket);
+
+ inline int uploadLimit() const { return upLimit; }
+ inline int downloadLimit() const { return downLimit; }
+ inline void setUploadLimit(int bytesPerSecond) { upLimit = bytesPerSecond; }
+ void setDownloadLimit(int bytesPerSecond);
+
+public slots:
+ void transfer();
+ void scheduleTransfer();
+
+private:
+ QTime stopWatch;
+ QSet<PeerWireClient *> sockets;
+ int upLimit;
+ int downLimit;
+ bool transferScheduled;
+};
+
+#endif
diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro
new file mode 100644
index 0000000..10b2672
--- /dev/null
+++ b/examples/network/torrent/torrent.pro
@@ -0,0 +1,37 @@
+HEADERS += addtorrentdialog.h \
+ bencodeparser.h \
+ connectionmanager.h \
+ mainwindow.h \
+ metainfo.h \
+ peerwireclient.h \
+ ratecontroller.h \
+ filemanager.h \
+ torrentclient.h \
+ torrentserver.h \
+ trackerclient.h
+
+SOURCES += main.cpp \
+ addtorrentdialog.cpp \
+ bencodeparser.cpp \
+ connectionmanager.cpp \
+ mainwindow.cpp \
+ metainfo.cpp \
+ peerwireclient.cpp \
+ ratecontroller.cpp \
+ filemanager.cpp \
+ torrentclient.cpp \
+ torrentserver.cpp \
+ trackerclient.cpp
+
+# Forms and resources
+FORMS += forms/addtorrentform.ui
+RESOURCES += icons.qrc
+
+QT += network
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/network/torrent
+sources.files = $$SOURCES $$HEADERS $$RESOURCES torrent.pro *.torrent
+sources.files += icons forms 3rdparty
+sources.path = $$[QT_INSTALL_EXAMPLES]/network/torrent
+INSTALLS += target sources
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
new file mode 100644
index 0000000..e8473bb
--- /dev/null
+++ b/examples/network/torrent/torrentclient.cpp
@@ -0,0 +1,1529 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "connectionmanager.h"
+#include "filemanager.h"
+#include "metainfo.h"
+#include "torrentclient.h"
+#include "torrentserver.h"
+#include "trackerclient.h"
+#include "peerwireclient.h"
+#include "ratecontroller.h"
+
+#include <QtCore>
+#include <QNetworkInterface>
+
+// These constants could also be configurable by the user.
+static const int ServerMinPort = 6881;
+static const int ServerMaxPort = /* 6889 */ 7000;
+static const int BlockSize = 16384;
+static const int MaxBlocksInProgress = 5;
+static const int MaxBlocksInMultiMode = 2;
+static const int MaxConnectionPerPeer = 1;
+static const int RateControlWindowLength = 10;
+static const int RateControlTimerDelay = 1000;
+static const int MinimumTimeBeforeRevisit = 30;
+static const int MaxUploads = 4;
+static const int UploadScheduleInterval = 10000;
+static const int EndGamePieces = 5;
+
+class TorrentPiece {
+public:
+ int index;
+ int length;
+ QBitArray completedBlocks;
+ QBitArray requestedBlocks;
+ bool inProgress;
+};
+
+class TorrentClientPrivate
+{
+public:
+ TorrentClientPrivate(TorrentClient *qq);
+
+ // State / error
+ void setError(TorrentClient::Error error);
+ void setState(TorrentClient::State state);
+ TorrentClient::Error error;
+ TorrentClient::State state;
+ QString errorString;
+ QString stateString;
+
+ // Where to save data
+ QString destinationFolder;
+ MetaInfo metaInfo;
+
+ // Announce tracker and file manager
+ QByteArray peerId;
+ QByteArray infoHash;
+ TrackerClient trackerClient;
+ FileManager fileManager;
+
+ // Connections
+ QList<PeerWireClient *> connections;
+ QList<TorrentPeer *> peers;
+ bool schedulerCalled;
+ void callScheduler();
+ bool connectingToClients;
+ void callPeerConnector();
+ int uploadScheduleTimer;
+
+ // Pieces
+ QMap<int, PeerWireClient *> readIds;
+ QMultiMap<PeerWireClient *, TorrentPiece *> payloads;
+ QMap<int, TorrentPiece *> pendingPieces;
+ QBitArray completedPieces;
+ QBitArray incompletePieces;
+ int pieceCount;
+
+ // Progress
+ int lastProgressValue;
+ qint64 downloadedBytes;
+ qint64 uploadedBytes;
+ int downloadRate[RateControlWindowLength];
+ int uploadRate[RateControlWindowLength];
+ int transferRateTimer;
+
+ TorrentClient *q;
+};
+
+TorrentClientPrivate::TorrentClientPrivate(TorrentClient *qq)
+ : trackerClient(qq), q(qq)
+{
+ error = TorrentClient::UnknownError;
+ state = TorrentClient::Idle;
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "Unknown error");
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Idle");
+ schedulerCalled = false;
+ connectingToClients = false;
+ uploadScheduleTimer = 0;
+ lastProgressValue = -1;
+ pieceCount = 0;
+ downloadedBytes = 0;
+ uploadedBytes = 0;
+ memset(downloadRate, 0, sizeof(downloadRate));
+ memset(uploadRate, 0, sizeof(uploadRate));
+ transferRateTimer = 0;
+}
+
+void TorrentClientPrivate::setError(TorrentClient::Error errorCode)
+{
+ this->error = errorCode;
+ switch (error) {
+ case TorrentClient::UnknownError:
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "Unknown error");
+ break;
+ case TorrentClient::TorrentParseError:
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "Invalid torrent data");
+ break;
+ case TorrentClient::InvalidTrackerError:
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "Unable to connect to tracker");
+ break;
+ case TorrentClient::FileError:
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "File error");
+ break;
+ case TorrentClient::ServerError:
+ errorString = QT_TRANSLATE_NOOP(TorrentClient, "Unable to initialize server");
+ break;
+ }
+ emit q->error(errorCode);
+}
+
+void TorrentClientPrivate::setState(TorrentClient::State state)
+{
+ this->state = state;
+ switch (state) {
+ case TorrentClient::Idle:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Idle");
+ break;
+ case TorrentClient::Paused:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Paused");
+ break;
+ case TorrentClient::Stopping:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Stopping");
+ break;
+ case TorrentClient::Preparing:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Preparing");
+ break;
+ case TorrentClient::Searching:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Searching");
+ break;
+ case TorrentClient::Connecting:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Connecting");
+ break;
+ case TorrentClient::WarmingUp:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Warming up");
+ break;
+ case TorrentClient::Downloading:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Downloading");
+ break;
+ case TorrentClient::Endgame:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Finishing");
+ break;
+ case TorrentClient::Seeding:
+ stateString = QT_TRANSLATE_NOOP(TorrentClient, "Seeding");
+ break;
+ }
+ emit q->stateChanged(state);
+}
+
+void TorrentClientPrivate::callScheduler()
+{
+ if (!schedulerCalled) {
+ schedulerCalled = true;
+ QMetaObject::invokeMethod(q, "scheduleDownloads", Qt::QueuedConnection);
+ }
+}
+
+void TorrentClientPrivate::callPeerConnector()
+{
+ if (!connectingToClients) {
+ connectingToClients = true;
+ QTimer::singleShot(10000, q, SLOT(connectToPeers()));
+ }
+}
+
+TorrentClient::TorrentClient(QObject *parent)
+ : QObject(parent), d(new TorrentClientPrivate(this))
+{
+ // Connect the file manager
+ connect(&d->fileManager, SIGNAL(dataRead(int, int, int, const QByteArray &)),
+ this, SLOT(sendToPeer(int, int, int, const QByteArray &)));
+ connect(&d->fileManager, SIGNAL(verificationProgress(int)),
+ this, SLOT(updateProgress(int)));
+ connect(&d->fileManager, SIGNAL(verificationDone()),
+ this, SLOT(fullVerificationDone()));
+ connect(&d->fileManager, SIGNAL(pieceVerified(int, bool)),
+ this, SLOT(pieceVerified(int, bool)));
+ connect(&d->fileManager, SIGNAL(error()),
+ this, SLOT(handleFileError()));
+
+ // Connect the tracker client
+ connect(&d->trackerClient, SIGNAL(peerListUpdated(const QList<TorrentPeer> &)),
+ this, SLOT(addToPeerList(const QList<TorrentPeer> &)));
+ connect(&d->trackerClient, SIGNAL(stopped()),
+ this, SIGNAL(stopped()));
+}
+
+TorrentClient::~TorrentClient()
+{
+ qDeleteAll(d->peers);
+ qDeleteAll(d->pendingPieces);
+ delete d;
+}
+
+bool TorrentClient::setTorrent(const QString &fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly) || !setTorrent(file.readAll())) {
+ d->setError(TorrentParseError);
+ return false;
+ }
+ return true;
+}
+
+bool TorrentClient::setTorrent(const QByteArray &torrentData)
+{
+ if (!d->metaInfo.parse(torrentData)) {
+ d->setError(TorrentParseError);
+ return false;
+ }
+
+ // Calculate SHA1 hash of the "info" section in the torrent
+ QByteArray infoValue = d->metaInfo.infoValue();
+ d->infoHash = QCryptographicHash::hash(infoValue, QCryptographicHash::Sha1);
+
+ return true;
+}
+
+MetaInfo TorrentClient::metaInfo() const
+{
+ return d->metaInfo;
+}
+
+void TorrentClient::setDestinationFolder(const QString &directory)
+{
+ d->destinationFolder = directory;
+}
+
+QString TorrentClient::destinationFolder() const
+{
+ return d->destinationFolder;
+}
+
+void TorrentClient::setDumpedState(const QByteArray &dumpedState)
+{
+ // Recover partially completed pieces
+ QDataStream stream(dumpedState);
+
+ quint16 version = 0;
+ stream >> version;
+ if (version != 2)
+ return;
+
+ stream >> d->completedPieces;
+
+ while (!stream.atEnd()) {
+ int index;
+ int length;
+ QBitArray completed;
+ stream >> index >> length >> completed;
+ if (stream.status() != QDataStream::Ok) {
+ d->completedPieces.clear();
+ break;
+ }
+
+ TorrentPiece *piece = new TorrentPiece;
+ piece->index = index;
+ piece->length = length;
+ piece->completedBlocks = completed;
+ piece->requestedBlocks.resize(completed.size());
+ piece->inProgress = false;
+ d->pendingPieces[index] = piece;
+ }
+}
+
+QByteArray TorrentClient::dumpedState() const
+{
+ QByteArray partials;
+ QDataStream stream(&partials, QIODevice::WriteOnly);
+
+ stream << quint16(2);
+ stream << d->completedPieces;
+
+ // Save the state of all partially downloaded pieces into a format
+ // suitable for storing in settings.
+ QMap<int, TorrentPiece *>::ConstIterator it = d->pendingPieces.constBegin();
+ while (it != d->pendingPieces.constEnd()) {
+ TorrentPiece *piece = it.value();
+ if (blocksLeftForPiece(piece) > 0 && blocksLeftForPiece(piece) < piece->completedBlocks.size()) {
+ stream << piece->index;
+ stream << piece->length;
+ stream << piece->completedBlocks;
+ }
+ ++it;
+ }
+
+ return partials;
+}
+
+qint64 TorrentClient::progress() const
+{
+ return d->lastProgressValue;
+}
+
+void TorrentClient::setDownloadedBytes(qint64 bytes)
+{
+ d->downloadedBytes = bytes;
+}
+
+qint64 TorrentClient::downloadedBytes() const
+{
+ return d->downloadedBytes;
+}
+
+void TorrentClient::setUploadedBytes(qint64 bytes)
+{
+ d->uploadedBytes = bytes;
+}
+
+qint64 TorrentClient::uploadedBytes() const
+{
+ return d->uploadedBytes;
+}
+
+int TorrentClient::connectedPeerCount() const
+{
+ int tmp = 0;
+ foreach (PeerWireClient *client, d->connections) {
+ if (client->state() == QAbstractSocket::ConnectedState)
+ ++tmp;
+ }
+ return tmp;
+}
+
+int TorrentClient::seedCount() const
+{
+ int tmp = 0;
+ foreach (PeerWireClient *client, d->connections) {
+ if (client->availablePieces().count(true) == d->pieceCount)
+ ++tmp;
+ }
+ return tmp;
+}
+
+TorrentClient::State TorrentClient::state() const
+{
+ return d->state;
+}
+
+QString TorrentClient::stateString() const
+{
+ return d->stateString;
+}
+
+TorrentClient::Error TorrentClient::error() const
+{
+ return d->error;
+}
+
+QString TorrentClient::errorString() const
+{
+ return d->errorString;
+}
+
+QByteArray TorrentClient::peerId() const
+{
+ return d->peerId;
+}
+
+QByteArray TorrentClient::infoHash() const
+{
+ return d->infoHash;
+}
+
+void TorrentClient::start()
+{
+ if (d->state != Idle)
+ return;
+
+ TorrentServer::instance()->addClient(this);
+
+ // Initialize the file manager
+ d->setState(Preparing);
+ d->fileManager.setMetaInfo(d->metaInfo);
+ d->fileManager.setDestinationFolder(d->destinationFolder);
+ d->fileManager.setCompletedPieces(d->completedPieces);
+ d->fileManager.start(QThread::LowestPriority);
+ d->fileManager.startDataVerification();
+}
+
+void TorrentClient::stop()
+{
+ if (d->state == Stopping)
+ return;
+
+ TorrentServer::instance()->removeClient(this);
+
+ // Update the state
+ State oldState = d->state;
+ d->setState(Stopping);
+
+ // Stop the timer
+ if (d->transferRateTimer) {
+ killTimer(d->transferRateTimer);
+ d->transferRateTimer = 0;
+ }
+
+ // Abort all existing connections
+ foreach (PeerWireClient *client, d->connections) {
+ RateController::instance()->removeSocket(client);
+ ConnectionManager::instance()->removeConnection(client);
+ client->abort();
+ }
+ d->connections.clear();
+
+ // Perhaps stop the tracker
+ if (oldState > Preparing) {
+ d->trackerClient.stop();
+ } else {
+ d->setState(Idle);
+ emit stopped();
+ }
+}
+
+void TorrentClient::setPaused(bool paused)
+{
+ if (paused) {
+ // Abort all connections, and set the max number of
+ // connections to 0. Keep the list of peers, so we can quickly
+ // resume later.
+ d->setState(Paused);
+ foreach (PeerWireClient *client, d->connections)
+ client->abort();
+ d->connections.clear();
+ TorrentServer::instance()->removeClient(this);
+ } else {
+ // Restore the max number of connections, and start the peer
+ // connector. We should also quickly start receiving incoming
+ // connections.
+ d->setState(d->completedPieces.count(true) == d->fileManager.pieceCount()
+ ? Seeding : Searching);
+ connectToPeers();
+ TorrentServer::instance()->addClient(this);
+ }
+}
+
+void TorrentClient::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == d->uploadScheduleTimer) {
+ // Update the state of who's choked and who's not
+ scheduleUploads();
+ return;
+ }
+
+ if (event->timerId() != d->transferRateTimer) {
+ QObject::timerEvent(event);
+ return;
+ }
+
+ // Calculate average upload/download rate
+ qint64 uploadBytesPerSecond = 0;
+ qint64 downloadBytesPerSecond = 0;
+ for (int i = 0; i < RateControlWindowLength; ++i) {
+ uploadBytesPerSecond += d->uploadRate[i];
+ downloadBytesPerSecond += d->downloadRate[i];
+ }
+ uploadBytesPerSecond /= qint64(RateControlWindowLength);
+ downloadBytesPerSecond /= qint64(RateControlWindowLength);
+ for (int i = RateControlWindowLength - 2; i >= 0; --i) {
+ d->uploadRate[i + 1] = d->uploadRate[i];
+ d->downloadRate[i + 1] = d->downloadRate[i];
+ }
+ d->uploadRate[0] = 0;
+ d->downloadRate[0] = 0;
+ emit uploadRateUpdated(int(uploadBytesPerSecond));
+ emit downloadRateUpdated(int(downloadBytesPerSecond));
+
+ // Stop the timer if there is no activity.
+ if (downloadBytesPerSecond == 0 && uploadBytesPerSecond == 0) {
+ killTimer(d->transferRateTimer);
+ d->transferRateTimer = 0;
+ }
+}
+
+void TorrentClient::sendToPeer(int readId, int pieceIndex, int begin, const QByteArray &data)
+{
+ // Send the requested block to the peer if the client connection
+ // still exists; otherwise do nothing. This slot is called by the
+ // file manager after it has read a block of data.
+ PeerWireClient *client = d->readIds.value(readId);
+ if (client) {
+ if ((client->peerWireState() & PeerWireClient::ChokingPeer) == 0)
+ client->sendBlock(pieceIndex, begin, data);
+ }
+ d->readIds.remove(readId);
+}
+
+void TorrentClient::fullVerificationDone()
+{
+ // Update our list of completed and incomplete pieces.
+ d->completedPieces = d->fileManager.completedPieces();
+ d->incompletePieces.resize(d->completedPieces.size());
+ d->pieceCount = d->completedPieces.size();
+ for (int i = 0; i < d->fileManager.pieceCount(); ++i) {
+ if (!d->completedPieces.testBit(i))
+ d->incompletePieces.setBit(i);
+ }
+
+ updateProgress();
+
+ // If the checksums show that what the dumped state thought was
+ // partial was in fact complete, then we trust the checksums.
+ QMap<int, TorrentPiece *>::Iterator it = d->pendingPieces.begin();
+ while (it != d->pendingPieces.end()) {
+ if (d->completedPieces.testBit(it.key()))
+ it = d->pendingPieces.erase(it);
+ else
+ ++it;
+ }
+
+ d->uploadScheduleTimer = startTimer(UploadScheduleInterval);
+
+ // Start the server
+ TorrentServer *server = TorrentServer::instance();
+ if (!server->isListening()) {
+ // Set up the peer wire server
+ for (int i = ServerMinPort; i <= ServerMaxPort; ++i) {
+ if (server->listen(QHostAddress::Any, i))
+ break;
+ }
+ if (!server->isListening()) {
+ d->setError(ServerError);
+ return;
+ }
+ }
+
+ d->setState(d->completedPieces.count(true) == d->pieceCount ? Seeding : Searching);
+
+ // Start the tracker client
+ d->trackerClient.start(d->metaInfo);
+}
+
+void TorrentClient::pieceVerified(int pieceIndex, bool ok)
+{
+ TorrentPiece *piece = d->pendingPieces.value(pieceIndex);
+
+ // Remove this piece from all payloads
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.begin();
+ while (it != d->payloads.end()) {
+ if (it.value()->index == pieceIndex)
+ it = d->payloads.erase(it);
+ else
+ ++it;
+ }
+
+ if (!ok) {
+ // If a piece did not pass the SHA1 check, we'll simply clear
+ // its state, and the scheduler will re-request it
+ piece->inProgress = false;
+ piece->completedBlocks.fill(false);
+ piece->requestedBlocks.fill(false);
+ d->callScheduler();
+ return;
+ }
+
+ // Update the peer list so we know who's still interesting.
+ foreach (TorrentPeer *peer, d->peers) {
+ if (!peer->interesting)
+ continue;
+ bool interesting = false;
+ for (int i = 0; i < d->pieceCount; ++i) {
+ if (peer->pieces.testBit(i) && d->incompletePieces.testBit(i)) {
+ interesting = true;
+ break;
+ }
+ }
+ peer->interesting = interesting;
+ }
+
+ // Delete the piece and update our structures.
+ delete piece;
+ d->pendingPieces.remove(pieceIndex);
+ d->completedPieces.setBit(pieceIndex);
+ d->incompletePieces.clearBit(pieceIndex);
+
+ // Notify connected peers.
+ foreach (PeerWireClient *client, d->connections) {
+ if (client->state() == QAbstractSocket::ConnectedState
+ && !client->availablePieces().testBit(pieceIndex)) {
+ client->sendPieceNotification(pieceIndex);
+ }
+ }
+
+ // Notify the tracker if we've entered Seeding status; otherwise
+ // call the scheduler.
+ int completed = d->completedPieces.count(true);
+ if (completed == d->pieceCount) {
+ if (d->state != Seeding) {
+ d->setState(Seeding);
+ d->trackerClient.startSeeding();
+ }
+ } else {
+ if (completed == 1)
+ d->setState(Downloading);
+ else if (d->incompletePieces.count(true) < 5 && d->pendingPieces.size() > d->incompletePieces.count(true))
+ d->setState(Endgame);
+ d->callScheduler();
+ }
+
+ updateProgress();
+}
+
+void TorrentClient::handleFileError()
+{
+ if (d->state == Paused)
+ return;
+ setPaused(true);
+ emit error(FileError);
+}
+
+void TorrentClient::connectToPeers()
+{
+ d->connectingToClients = false;
+
+ if (d->state == Stopping || d->state == Idle || d->state == Paused)
+ return;
+
+ if (d->state == Searching)
+ d->setState(Connecting);
+
+ // Find the list of peers we are not currently connected to, where
+ // the more interesting peers are listed more than once.
+ QList<TorrentPeer *> weighedPeers = weighedFreePeers();
+
+ // Start as many connections as we can
+ while (!weighedPeers.isEmpty() && ConnectionManager::instance()->canAddConnection()
+ && (qrand() % (ConnectionManager::instance()->maxConnections() / 2))) {
+ PeerWireClient *client = new PeerWireClient(ConnectionManager::instance()->clientId(), this);
+ RateController::instance()->addSocket(client);
+ ConnectionManager::instance()->addConnection(client);
+
+ initializeConnection(client);
+ d->connections << client;
+
+ // Pick a random peer from the list of weighed peers.
+ TorrentPeer *peer = weighedPeers.takeAt(qrand() % weighedPeers.size());
+ weighedPeers.removeAll(peer);
+ peer->connectStart = QDateTime::currentDateTime().toTime_t();
+ peer->lastVisited = peer->connectStart;
+
+ // Connect to the peer.
+ client->setPeer(peer);
+ client->connectToHost(peer->address, peer->port);
+ }
+}
+
+QList<TorrentPeer *> TorrentClient::weighedFreePeers() const
+{
+ QList<TorrentPeer *> weighedPeers;
+
+ // Generate a list of peers that we want to connect to.
+ uint now = QDateTime::currentDateTime().toTime_t();
+ QList<TorrentPeer *> freePeers;
+ QMap<QString, int> connectionsPerPeer;
+ foreach (TorrentPeer *peer, d->peers) {
+ bool busy = false;
+ foreach (PeerWireClient *client, d->connections) {
+ if (client->state() == PeerWireClient::ConnectedState
+ && client->peerAddress() == peer->address
+ && client->peerPort() == peer->port) {
+ if (++connectionsPerPeer[peer->address.toString()] >= MaxConnectionPerPeer) {
+ busy = true;
+ break;
+ }
+ }
+ }
+ if (!busy && (now - peer->lastVisited) > uint(MinimumTimeBeforeRevisit))
+ freePeers << peer;
+ }
+
+ // Nothing to connect to
+ if (freePeers.isEmpty())
+ return weighedPeers;
+
+ // Assign points based on connection speed and pieces available.
+ QList<QPair<int, TorrentPeer *> > points;
+ foreach (TorrentPeer *peer, freePeers) {
+ int tmp = 0;
+ if (peer->interesting) {
+ tmp += peer->numCompletedPieces;
+ if (d->state == Seeding)
+ tmp = d->pieceCount - tmp;
+ if (!peer->connectStart) // An unknown peer is as interesting as a seed
+ tmp += d->pieceCount;
+
+ // 1/5 of the total score for each second below 5 it takes to
+ // connect.
+ if (peer->connectTime < 5)
+ tmp += (d->pieceCount / 10) * (5 - peer->connectTime);
+ }
+ points << QPair<int, TorrentPeer *>(tmp, peer);
+ }
+ qSort(points);
+
+ // Minimize the list so the point difference is never more than 1.
+ typedef QPair<int,TorrentPeer*> PointPair;
+ QMultiMap<int, TorrentPeer *> pointMap;
+ int lowestScore = 0;
+ int lastIndex = 0;
+ foreach (PointPair point, points) {
+ if (point.first > lowestScore) {
+ lowestScore = point.first;
+ ++lastIndex;
+ }
+ pointMap.insert(lastIndex, point.second);
+ }
+
+ // Now make up a list of peers where the ones with more points are
+ // listed many times.
+ QMultiMap<int, TorrentPeer *>::ConstIterator it = pointMap.constBegin();
+ while (it != pointMap.constEnd()) {
+ for (int i = 0; i < it.key() + 1; ++i)
+ weighedPeers << it.value();
+ ++it;
+ }
+
+ return weighedPeers;
+}
+
+void TorrentClient::setupIncomingConnection(PeerWireClient *client)
+{
+ // Connect signals
+ initializeConnection(client);
+
+ // Initialize this client
+ RateController::instance()->addSocket(client);
+ d->connections << client;
+
+ client->initialize(d->infoHash, d->pieceCount);
+ client->sendPieceList(d->completedPieces);
+
+ emit peerInfoUpdated();
+
+ if (d->state == Searching || d->state == Connecting) {
+ int completed = d->completedPieces.count(true);
+ if (completed == 0)
+ d->setState(WarmingUp);
+ else if (d->incompletePieces.count(true) < 5 && d->pendingPieces.size() > d->incompletePieces.count(true))
+ d->setState(Endgame);
+ }
+
+ if (d->connections.isEmpty())
+ scheduleUploads();
+}
+
+void TorrentClient::setupOutgoingConnection()
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+
+ // Update connection statistics.
+ foreach (TorrentPeer *peer, d->peers) {
+ if (peer->port == client->peerPort() && peer->address == client->peerAddress()) {
+ peer->connectTime = peer->lastVisited - peer->connectStart;
+ break;
+ }
+ }
+
+ // Send handshake and piece list
+ client->initialize(d->infoHash, d->pieceCount);
+ client->sendPieceList(d->completedPieces);
+
+ emit peerInfoUpdated();
+
+ if (d->state == Searching || d->state == Connecting) {
+ int completed = d->completedPieces.count(true);
+ if (completed == 0)
+ d->setState(WarmingUp);
+ else if (d->incompletePieces.count(true) < 5 && d->pendingPieces.size() > d->incompletePieces.count(true))
+ d->setState(Endgame);
+ }
+}
+
+void TorrentClient::initializeConnection(PeerWireClient *client)
+{
+ connect(client, SIGNAL(connected()),
+ this, SLOT(setupOutgoingConnection()));
+ connect(client, SIGNAL(disconnected()),
+ this, SLOT(removeClient()));
+ connect(client, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SLOT(removeClient()));
+ connect(client, SIGNAL(piecesAvailable(const QBitArray &)),
+ this, SLOT(peerPiecesAvailable(const QBitArray &)));
+ connect(client, SIGNAL(blockRequested(int, int, int)),
+ this, SLOT(peerRequestsBlock(int, int, int)));
+ connect(client, SIGNAL(blockReceived(int, int, const QByteArray &)),
+ this, SLOT(blockReceived(int, int, const QByteArray &)));
+ connect(client, SIGNAL(choked()),
+ this, SLOT(peerChoked()));
+ connect(client, SIGNAL(unchoked()),
+ this, SLOT(peerUnchoked()));
+ connect(client, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(peerWireBytesWritten(qint64)));
+ connect(client, SIGNAL(bytesReceived(qint64)),
+ this, SLOT(peerWireBytesReceived(qint64)));
+}
+
+void TorrentClient::removeClient()
+{
+ PeerWireClient *client = static_cast<PeerWireClient *>(sender());
+
+ // Remove the host from our list of known peers if the connection
+ // failed.
+ if (client->peer() && client->error() == QAbstractSocket::ConnectionRefusedError)
+ d->peers.removeAll(client->peer());
+
+ // Remove the client from RateController and all structures.
+ RateController::instance()->removeSocket(client);
+ d->connections.removeAll(client);
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.find(client);
+ while (it != d->payloads.end() && it.key() == client) {
+ TorrentPiece *piece = it.value();
+ piece->inProgress = false;
+ piece->requestedBlocks.fill(false);
+ it = d->payloads.erase(it);
+ }
+
+ // Remove pending read requests.
+ QMapIterator<int, PeerWireClient *> it2(d->readIds);
+ while (it2.findNext(client))
+ d->readIds.remove(it2.key());
+
+ // Delete the client later.
+ disconnect(client, SIGNAL(disconnected()), this, SLOT(removeClient()));
+ client->deleteLater();
+ ConnectionManager::instance()->removeConnection(client);
+
+ emit peerInfoUpdated();
+ d->callPeerConnector();
+}
+
+void TorrentClient::peerPiecesAvailable(const QBitArray &pieces)
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+
+ // Find the peer in our list of announced peers. If it's there,
+ // then we can use the piece list into to gather statistics that
+ // help us decide what peers to connect to.
+ TorrentPeer *peer = 0;
+ QList<TorrentPeer *>::Iterator it = d->peers.begin();
+ while (it != d->peers.end()) {
+ if ((*it)->address == client->peerAddress() && (*it)->port == client->peerPort()) {
+ peer = *it;
+ break;
+ }
+ ++it;
+ }
+
+ // If the peer is a seed, and we are in seeding mode, then the
+ // peer is uninteresting.
+ if (pieces.count(true) == d->pieceCount) {
+ if (peer)
+ peer->seed = true;
+ emit peerInfoUpdated();
+ if (d->state == Seeding) {
+ client->abort();
+ return;
+ } else {
+ if (peer)
+ peer->interesting = true;
+ if ((client->peerWireState() & PeerWireClient::InterestedInPeer) == 0)
+ client->sendInterested();
+ d->callScheduler();
+ return;
+ }
+ }
+
+ // Update our list of available pieces.
+ if (peer) {
+ peer->pieces = pieces;
+ peer->numCompletedPieces = pieces.count(true);
+ }
+
+ // Check for interesting pieces, and tell the peer whether we are
+ // interested or not.
+ bool interested = false;
+ int piecesSize = pieces.size();
+ for (int pieceIndex = 0; pieceIndex < piecesSize; ++pieceIndex) {
+ if (!pieces.testBit(pieceIndex))
+ continue;
+ if (!d->completedPieces.testBit(pieceIndex)) {
+ interested = true;
+ if ((client->peerWireState() & PeerWireClient::InterestedInPeer) == 0) {
+ if (peer)
+ peer->interesting = true;
+ client->sendInterested();
+ }
+
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.find(client);
+ int inProgress = 0;
+ while (it != d->payloads.end() && it.key() == client) {
+ if (it.value()->inProgress)
+ inProgress += it.value()->requestedBlocks.count(true);
+ ++it;
+ }
+ if (!inProgress)
+ d->callScheduler();
+ break;
+ }
+ }
+ if (!interested && (client->peerWireState() & PeerWireClient::InterestedInPeer)) {
+ if (peer)
+ peer->interesting = false;
+ client->sendNotInterested();
+ }
+}
+
+void TorrentClient::peerRequestsBlock(int pieceIndex, int begin, int length)
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+
+ // Silently ignore requests from choked peers
+ if (client->peerWireState() & PeerWireClient::ChokingPeer)
+ return;
+
+ // Silently ignore requests for pieces we don't have.
+ if (!d->completedPieces.testBit(pieceIndex))
+ return;
+
+ // Request the block from the file manager
+ d->readIds.insert(d->fileManager.read(pieceIndex, begin, length),
+ qobject_cast<PeerWireClient *>(sender()));
+}
+
+void TorrentClient::blockReceived(int pieceIndex, int begin, const QByteArray &data)
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+ if (data.size() == 0) {
+ client->abort();
+ return;
+ }
+
+ // Ignore it if we already have this block.
+ int blockBit = begin / BlockSize;
+ TorrentPiece *piece = d->pendingPieces.value(pieceIndex);
+ if (!piece || piece->completedBlocks.testBit(blockBit)) {
+ // Discard blocks that we already have, and fill up the pipeline.
+ requestMore(client);
+ return;
+ }
+
+ // If we are in warmup or endgame mode, cancel all duplicate
+ // requests for this block.
+ if (d->state == WarmingUp || d->state == Endgame) {
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.begin();
+ while (it != d->payloads.end()) {
+ PeerWireClient *otherClient = it.key();
+ if (otherClient != client && it.value()->index == pieceIndex) {
+ if (otherClient->incomingBlocks().contains(TorrentBlock(pieceIndex, begin, data.size())))
+ it.key()->cancelRequest(pieceIndex, begin, data.size());
+ }
+ ++it;
+ }
+ }
+
+ if (d->state != Downloading && d->state != Endgame && d->completedPieces.count(true) > 0)
+ d->setState(Downloading);
+
+ // Store this block
+ d->fileManager.write(pieceIndex, begin, data);
+ piece->completedBlocks.setBit(blockBit);
+ piece->requestedBlocks.clearBit(blockBit);
+
+ if (blocksLeftForPiece(piece) == 0) {
+ // Ask the file manager to verify the newly downloaded piece
+ d->fileManager.verifyPiece(piece->index);
+
+ // Remove this piece from all payloads
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.begin();
+ while (it != d->payloads.end()) {
+ if (!it.value() || it.value()->index == piece->index)
+ it = d->payloads.erase(it);
+ else
+ ++it;
+ }
+ }
+
+ // Fill up the pipeline.
+ requestMore(client);
+}
+
+void TorrentClient::peerWireBytesWritten(qint64 size)
+{
+ if (!d->transferRateTimer)
+ d->transferRateTimer = startTimer(RateControlTimerDelay);
+
+ d->uploadRate[0] += size;
+ d->uploadedBytes += size;
+ emit dataSent(size);
+}
+
+void TorrentClient::peerWireBytesReceived(qint64 size)
+{
+ if (!d->transferRateTimer)
+ d->transferRateTimer = startTimer(RateControlTimerDelay);
+
+ d->downloadRate[0] += size;
+ d->downloadedBytes += size;
+ emit dataSent(size);
+}
+
+int TorrentClient::blocksLeftForPiece(const TorrentPiece *piece) const
+{
+ int blocksLeft = 0;
+ int completedBlocksSize = piece->completedBlocks.size();
+ for (int i = 0; i < completedBlocksSize; ++i) {
+ if (!piece->completedBlocks.testBit(i))
+ ++blocksLeft;
+ }
+ return blocksLeft;
+}
+
+void TorrentClient::scheduleUploads()
+{
+ // Generate a list of clients sorted by their transfer
+ // speeds. When leeching, we sort by download speed, and when
+ // seeding, we sort by upload speed. Seeds are left out; there's
+ // no use in unchoking them.
+ QList<PeerWireClient *> allClients = d->connections;
+ QMultiMap<int, PeerWireClient *> transferSpeeds;
+ foreach (PeerWireClient *client, allClients) {
+ if (client->state() == QAbstractSocket::ConnectedState
+ && client->availablePieces().count(true) != d->pieceCount) {
+ if (d->state == Seeding) {
+ transferSpeeds.insert(client->uploadSpeed(), client);
+ } else {
+ transferSpeeds.insert(client->downloadSpeed(), client);
+ }
+ }
+ }
+
+ // Unchoke the top 'MaxUploads' downloaders (peers that we are
+ // uploading to) and choke all others.
+ int maxUploaders = MaxUploads;
+ QMapIterator<int, PeerWireClient *> it(transferSpeeds);
+ it.toBack();
+ while (it.hasPrevious()) {
+ PeerWireClient *client = it.previous().value();
+ bool interested = (client->peerWireState() & PeerWireClient::PeerIsInterested);
+
+ if (maxUploaders) {
+ allClients.removeAll(client);
+ if (client->peerWireState() & PeerWireClient::ChokingPeer)
+ client->unchokePeer();
+ --maxUploaders;
+ continue;
+ }
+
+ if ((client->peerWireState() & PeerWireClient::ChokingPeer) == 0) {
+ if ((qrand() % 10) == 0)
+ client->abort();
+ else
+ client->chokePeer();
+ allClients.removeAll(client);
+ }
+ if (!interested)
+ allClients.removeAll(client);
+ }
+
+ // Only interested peers are left in allClients. Unchoke one
+ // random peer to allow it to compete for a position among the
+ // downloaders. (This is known as an "optimistic unchoke".)
+ if (!allClients.isEmpty()) {
+ PeerWireClient *client = allClients[qrand() % allClients.size()];
+ if (client->peerWireState() & PeerWireClient::ChokingPeer)
+ client->unchokePeer();
+ }
+}
+
+void TorrentClient::scheduleDownloads()
+{
+ d->schedulerCalled = false;
+
+ if (d->state == Stopping || d->state == Paused || d->state == Idle)
+ return;
+
+ // Check what each client is doing, and assign payloads to those
+ // who are either idle or done.
+ foreach (PeerWireClient *client, d->connections)
+ schedulePieceForClient(client);
+}
+
+void TorrentClient::schedulePieceForClient(PeerWireClient *client)
+{
+ // Only schedule connected clients.
+ if (client->state() != QTcpSocket::ConnectedState)
+ return;
+
+ // The peer has choked us; try again later.
+ if (client->peerWireState() & PeerWireClient::ChokedByPeer)
+ return;
+
+ // Make a list of all the client's pending pieces, and count how
+ // many blocks have been requested.
+ QList<int> currentPieces;
+ bool somePiecesAreNotInProgress = false;
+ TorrentPiece *lastPendingPiece = 0;
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.find(client);
+ while (it != d->payloads.end() && it.key() == client) {
+ lastPendingPiece = it.value();
+ if (lastPendingPiece->inProgress) {
+ currentPieces << lastPendingPiece->index;
+ } else {
+ somePiecesAreNotInProgress = true;
+ }
+ ++it;
+ }
+
+ // Skip clients that already have too many blocks in progress.
+ if (client->incomingBlocks().size() >= ((d->state == Endgame || d->state == WarmingUp)
+ ? MaxBlocksInMultiMode : MaxBlocksInProgress))
+ return;
+
+ // If all pieces are in progress, but we haven't filled up our
+ // block requesting quota, then we need to schedule another piece.
+ if (!somePiecesAreNotInProgress || client->incomingBlocks().size() > 0)
+ lastPendingPiece = 0;
+ TorrentPiece *piece = lastPendingPiece;
+
+ // In warmup state, all clients request blocks from the same pieces.
+ if (d->state == WarmingUp && d->pendingPieces.size() >= 4) {
+ piece = d->payloads.value(client);
+ if (!piece) {
+ QList<TorrentPiece *> values = d->pendingPieces.values();
+ piece = values.value(qrand() % values.size());
+ piece->inProgress = true;
+ d->payloads.insert(client, piece);
+ }
+ if (piece->completedBlocks.count(false) == client->incomingBlocks().size())
+ return;
+ }
+
+ // If no pieces are currently in progress, schedule a new one.
+ if (!piece) {
+ // Build up a list of what pieces that we have not completed
+ // are available to this client.
+ QBitArray incompletePiecesAvailableToClient = d->incompletePieces;
+
+ // Remove all pieces that are marked as being in progress
+ // already (i.e., pieces that this or other clients are
+ // already waiting for). A special rule applies to warmup and
+ // endgame mode; there, we allow several clients to request
+ // the same piece. In endgame mode, this only applies to
+ // clients that are currently uploading (more than 1.0KB/s).
+ if ((d->state == Endgame && client->uploadSpeed() < 1024) || d->state != WarmingUp) {
+ QMap<int, TorrentPiece *>::ConstIterator it = d->pendingPieces.constBegin();
+ while (it != d->pendingPieces.constEnd()) {
+ if (it.value()->inProgress)
+ incompletePiecesAvailableToClient.clearBit(it.key());
+ ++it;
+ }
+ }
+
+ // Remove all pieces that the client cannot download.
+ incompletePiecesAvailableToClient &= client->availablePieces();
+
+ // Remove all pieces that this client has already requested.
+ foreach (int i, currentPieces)
+ incompletePiecesAvailableToClient.clearBit(i);
+
+ // Only continue if more pieces can be scheduled. If no pieces
+ // are available and no blocks are in progress, just leave
+ // the connection idle; it might become interesting later.
+ if (incompletePiecesAvailableToClient.count(true) == 0)
+ return;
+
+ // Check if any of the partially completed pieces can be
+ // recovered, and if so, pick a random one of them.
+ QList<TorrentPiece *> partialPieces;
+ QMap<int, TorrentPiece *>::ConstIterator it = d->pendingPieces.constBegin();
+ while (it != d->pendingPieces.constEnd()) {
+ TorrentPiece *tmp = it.value();
+ if (incompletePiecesAvailableToClient.testBit(it.key())) {
+ if (!tmp->inProgress || d->state == WarmingUp || d->state == Endgame) {
+ partialPieces << tmp;
+ break;
+ }
+ }
+ ++it;
+ }
+ if (!partialPieces.isEmpty())
+ piece = partialPieces.value(qrand() % partialPieces.size());
+
+ if (!piece) {
+ // Pick a random piece 3 out of 4 times; otherwise, pick either
+ // one of the most common or the least common pieces available,
+ // depending on the state we're in.
+ int pieceIndex = 0;
+ if (d->state == WarmingUp || (qrand() & 4) == 0) {
+ int *occurrances = new int[d->pieceCount];
+ memset(occurrances, 0, d->pieceCount * sizeof(int));
+
+ // Count how many of each piece are available.
+ foreach (PeerWireClient *peer, d->connections) {
+ QBitArray peerPieces = peer->availablePieces();
+ int peerPiecesSize = peerPieces.size();
+ for (int i = 0; i < peerPiecesSize; ++i) {
+ if (peerPieces.testBit(i))
+ ++occurrances[i];
+ }
+ }
+
+ // Find the rarest or most common pieces.
+ int numOccurrances = d->state == WarmingUp ? 0 : 99999;
+ QList<int> piecesReadyForDownload;
+ for (int i = 0; i < d->pieceCount; ++i) {
+ if (d->state == WarmingUp) {
+ // Add common pieces
+ if (occurrances[i] >= numOccurrances
+ && incompletePiecesAvailableToClient.testBit(i)) {
+ if (occurrances[i] > numOccurrances)
+ piecesReadyForDownload.clear();
+ piecesReadyForDownload.append(i);
+ numOccurrances = occurrances[i];
+ }
+ } else {
+ // Add rare pieces
+ if (occurrances[i] <= numOccurrances
+ && incompletePiecesAvailableToClient.testBit(i)) {
+ if (occurrances[i] < numOccurrances)
+ piecesReadyForDownload.clear();
+ piecesReadyForDownload.append(i);
+ numOccurrances = occurrances[i];
+ }
+ }
+ }
+
+ // Select one piece randomly
+ pieceIndex = piecesReadyForDownload.at(qrand() % piecesReadyForDownload.size());
+ delete [] occurrances;
+ } else {
+ // Make up a list of available piece indices, and pick
+ // a random one.
+ QList<int> values;
+ int incompletePiecesAvailableToClientSize = incompletePiecesAvailableToClient.size();
+ for (int i = 0; i < incompletePiecesAvailableToClientSize; ++i) {
+ if (incompletePiecesAvailableToClient.testBit(i))
+ values << i;
+ }
+ pieceIndex = values.at(qrand() % values.size());
+ }
+
+ // Create a new TorrentPiece and fill in all initial
+ // properties.
+ piece = new TorrentPiece;
+ piece->index = pieceIndex;
+ piece->length = d->fileManager.pieceLengthAt(pieceIndex);
+ int numBlocks = piece->length / BlockSize;
+ if (piece->length % BlockSize)
+ ++numBlocks;
+ piece->completedBlocks.resize(numBlocks);
+ piece->requestedBlocks.resize(numBlocks);
+ d->pendingPieces.insert(pieceIndex, piece);
+ }
+
+ piece->inProgress = true;
+ d->payloads.insert(client, piece);
+ }
+
+ // Request more blocks from all pending pieces.
+ requestMore(client);
+}
+
+void TorrentClient::requestMore(PeerWireClient *client)
+{
+ // Make a list of all pieces this client is currently waiting for,
+ // and count the number of blocks in progress.
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.find(client);
+ int numBlocksInProgress = client->incomingBlocks().size();
+ QList<TorrentPiece *> piecesInProgress;
+ while (it != d->payloads.end() && it.key() == client) {
+ TorrentPiece *piece = it.value();
+ if (piece->inProgress || (d->state == WarmingUp || d->state == Endgame))
+ piecesInProgress << piece;
+ ++it;
+ }
+
+ // If no pieces are in progress, call the scheduler.
+ if (piecesInProgress.isEmpty() && d->incompletePieces.count(true)) {
+ d->callScheduler();
+ return;
+ }
+
+ // If too many pieces are in progress, there's nothing to do.
+ int maxInProgress = ((d->state == Endgame || d->state == WarmingUp)
+ ? MaxBlocksInMultiMode : MaxBlocksInProgress);
+ if (numBlocksInProgress == maxInProgress)
+ return;
+
+ // Starting with the first piece that we're waiting for, request
+ // blocks until the quota is filled up.
+ foreach (TorrentPiece *piece, piecesInProgress) {
+ numBlocksInProgress += requestBlocks(client, piece, maxInProgress - numBlocksInProgress);
+ if (numBlocksInProgress == maxInProgress)
+ break;
+ }
+
+ // If we still didn't fill up the quota, we need to schedule more
+ // pieces.
+ if (numBlocksInProgress < maxInProgress && d->state != WarmingUp)
+ d->callScheduler();
+}
+
+int TorrentClient::requestBlocks(PeerWireClient *client, TorrentPiece *piece, int maxBlocks)
+{
+ // Generate the list of incomplete blocks for this piece.
+ QVector<int> bits;
+ int completedBlocksSize = piece->completedBlocks.size();
+ for (int i = 0; i < completedBlocksSize; ++i) {
+ if (!piece->completedBlocks.testBit(i) && !piece->requestedBlocks.testBit(i))
+ bits << i;
+ }
+
+ // Nothing more to request.
+ if (bits.size() == 0) {
+ if (d->state != WarmingUp && d->state != Endgame)
+ return 0;
+ bits.clear();
+ for (int i = 0; i < completedBlocksSize; ++i) {
+ if (!piece->completedBlocks.testBit(i))
+ bits << i;
+ }
+ }
+
+ if (d->state == WarmingUp || d->state == Endgame) {
+ // By randomizing the list of blocks to request, we
+ // significantly speed up the warmup and endgame modes, where
+ // the same blocks are requested from multiple peers. The
+ // speedup comes from an increased chance of receiving
+ // different blocks from the different peers.
+ for (int i = 0; i < bits.size(); ++i) {
+ int a = qrand() % bits.size();
+ int b = qrand() % bits.size();
+ int tmp = bits[a];
+ bits[a] = bits[b];
+ bits[b] = tmp;
+ }
+ }
+
+ // Request no more blocks than we've been asked to.
+ int blocksToRequest = qMin(maxBlocks, bits.size());
+
+ // Calculate the offset and size of each block, and send requests.
+ for (int i = 0; i < blocksToRequest; ++i) {
+ int blockSize = BlockSize;
+ if ((piece->length % BlockSize) && bits.at(i) == completedBlocksSize - 1)
+ blockSize = piece->length % BlockSize;
+ client->requestBlock(piece->index, bits.at(i) * BlockSize, blockSize);
+ piece->requestedBlocks.setBit(bits.at(i));
+ }
+
+ return blocksToRequest;
+}
+
+void TorrentClient::peerChoked()
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+ if (!client)
+ return;
+
+ // When the peer chokes us, we immediately forget about all blocks
+ // we've requested from it. We also remove the piece from out
+ // payload, making it available to other clients.
+ QMultiMap<PeerWireClient *, TorrentPiece *>::Iterator it = d->payloads.find(client);
+ while (it != d->payloads.end() && it.key() == client) {
+ it.value()->inProgress = false;
+ it.value()->requestedBlocks.fill(false);
+ it = d->payloads.erase(it);
+ }
+}
+
+void TorrentClient::peerUnchoked()
+{
+ PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
+ if (!client)
+ return;
+
+ // We got unchoked, which means we can request more blocks.
+ if (d->state != Seeding)
+ d->callScheduler();
+}
+
+void TorrentClient::addToPeerList(const QList<TorrentPeer> &peerList)
+{
+ // Add peers we don't already know of to our list of peers.
+ QList<QHostAddress> addresses = QNetworkInterface::allAddresses();
+ foreach (TorrentPeer peer, peerList) {
+ if (addresses.contains(peer.address)
+ && peer.port == TorrentServer::instance()->serverPort()) {
+ // Skip our own server.
+ continue;
+ }
+
+ bool known = false;
+ foreach (TorrentPeer *knownPeer, d->peers) {
+ if (knownPeer->port == peer.port
+ && knownPeer->address == peer.address) {
+ known = true;
+ break;
+ }
+ }
+ if (!known) {
+ TorrentPeer *newPeer = new TorrentPeer;
+ *newPeer = peer;
+ newPeer->interesting = true;
+ newPeer->seed = false;
+ newPeer->lastVisited = 0;
+ newPeer->connectStart = 0;
+ newPeer->connectTime = 999999;
+ newPeer->pieces.resize(d->pieceCount);
+ newPeer->numCompletedPieces = 0;
+ d->peers << newPeer;
+ }
+ }
+
+ // If we've got more peers than we can connect to, we remove some
+ // of the peers that have no (or low) activity.
+ int maxPeers = ConnectionManager::instance()->maxConnections() * 3;
+ if (d->peers.size() > maxPeers) {
+ // Find what peers are currently connected & active
+ QSet<TorrentPeer *> activePeers;
+ foreach (TorrentPeer *peer, d->peers) {
+ foreach (PeerWireClient *client, d->connections) {
+ if (client->peer() == peer && (client->downloadSpeed() + client->uploadSpeed()) > 1024)
+ activePeers << peer;
+ }
+ }
+
+ // Remove inactive peers from the peer list until we're below
+ // the max connections count.
+ QList<int> toRemove;
+ for (int i = 0; i < d->peers.size() && (d->peers.size() - toRemove.size()) > maxPeers; ++i) {
+ if (!activePeers.contains(d->peers.at(i)))
+ toRemove << i;
+ }
+ QListIterator<int> toRemoveIterator(toRemove);
+ toRemoveIterator.toBack();
+ while (toRemoveIterator.hasPrevious())
+ d->peers.removeAt(toRemoveIterator.previous());
+
+ // If we still have too many peers, remove the oldest ones.
+ while (d->peers.size() > maxPeers)
+ d->peers.takeFirst();
+ }
+
+ if (d->state != Paused && d->state != Stopping && d->state != Idle) {
+ if (d->state == Searching || d->state == WarmingUp)
+ connectToPeers();
+ else
+ d->callPeerConnector();
+ }
+}
+
+void TorrentClient::trackerStopped()
+{
+ d->setState(Idle);
+ emit stopped();
+}
+
+void TorrentClient::updateProgress(int progress)
+{
+ if (progress == -1 && d->pieceCount > 0) {
+ int newProgress = (d->completedPieces.count(true) * 100) / d->pieceCount;
+ if (d->lastProgressValue != newProgress) {
+ d->lastProgressValue = newProgress;
+ emit progressUpdated(newProgress);
+ }
+ } else if (d->lastProgressValue != progress) {
+ d->lastProgressValue = progress;
+ emit progressUpdated(progress);
+ }
+}
diff --git a/examples/network/torrent/torrentclient.h b/examples/network/torrent/torrentclient.h
new file mode 100644
index 0000000..6caaf38
--- /dev/null
+++ b/examples/network/torrent/torrentclient.h
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TORRENTCLIENT_H
+#define TORRENTCLIENT_H
+
+#include <QBitArray>
+#include <QHostAddress>
+#include <QList>
+
+class MetaInfo;
+class PeerWireClient;
+class TorrentClientPrivate;
+class TorrentPeer;
+class TorrentPiece;
+QT_BEGIN_NAMESPACE
+class QTimerEvent;
+QT_END_NAMESPACE
+
+class TorrentPeer {
+public:
+ QHostAddress address;
+ quint16 port;
+ QString id;
+ bool interesting;
+ bool seed;
+ uint lastVisited;
+ uint connectStart;
+ uint connectTime;
+ QBitArray pieces;
+ int numCompletedPieces;
+
+ inline bool operator==(const TorrentPeer &other)
+ {
+ return port == other.port
+ && address == other.address
+ && id == other.id;
+ }
+};
+
+class TorrentClient : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum State {
+ Idle,
+ Paused,
+ Stopping,
+ Preparing,
+ Searching,
+ Connecting,
+ WarmingUp,
+ Downloading,
+ Endgame,
+ Seeding
+ };
+ enum Error {
+ UnknownError,
+ TorrentParseError,
+ InvalidTrackerError,
+ FileError,
+ ServerError
+ };
+
+ TorrentClient(QObject *parent = 0);
+ ~TorrentClient();
+
+ bool setTorrent(const QString &fileName);
+ bool setTorrent(const QByteArray &torrentData);
+ MetaInfo metaInfo() const;
+
+ void setMaxConnections(int connections);
+ int maxConnections() const;
+
+ void setDestinationFolder(const QString &directory);
+ QString destinationFolder() const;
+
+ void setDumpedState(const QByteArray &dumpedState);
+ QByteArray dumpedState() const;
+
+ // Progress and stats for download feedback.
+ qint64 progress() const;
+ void setDownloadedBytes(qint64 bytes);
+ qint64 downloadedBytes() const;
+ void setUploadedBytes(qint64 bytes);
+ qint64 uploadedBytes() const;
+ int connectedPeerCount() const;
+ int seedCount() const;
+
+ // Accessors for the tracker
+ QByteArray peerId() const;
+ QByteArray infoHash() const;
+ quint16 serverPort() const;
+
+ // State and error.
+ State state() const;
+ QString stateString() const;
+ Error error() const;
+ QString errorString() const;
+
+signals:
+ void stateChanged(TorrentClient::State state);
+ void error(TorrentClient::Error error);
+
+ void downloadCompleted();
+ void peerInfoUpdated();
+
+ void dataSent(int uploadedBytes);
+ void dataReceived(int downloadedBytes);
+ void progressUpdated(int percentProgress);
+ void downloadRateUpdated(int bytesPerSecond);
+ void uploadRateUpdated(int bytesPerSecond);
+
+ void stopped();
+
+public slots:
+ void start();
+ void stop();
+ void setPaused(bool paused);
+ void setupIncomingConnection(PeerWireClient *client);
+
+protected slots:
+ void timerEvent(QTimerEvent *event);
+
+private slots:
+ // File management
+ void sendToPeer(int readId, int pieceIndex, int begin, const QByteArray &data);
+ void fullVerificationDone();
+ void pieceVerified(int pieceIndex, bool ok);
+ void handleFileError();
+
+ // Connection handling
+ void connectToPeers();
+ QList<TorrentPeer *> weighedFreePeers() const;
+ void setupOutgoingConnection();
+ void initializeConnection(PeerWireClient *client);
+ void removeClient();
+ void peerPiecesAvailable(const QBitArray &pieces);
+ void peerRequestsBlock(int pieceIndex, int begin, int length);
+ void blockReceived(int pieceIndex, int begin, const QByteArray &data);
+ void peerWireBytesWritten(qint64 bytes);
+ void peerWireBytesReceived(qint64 bytes);
+ int blocksLeftForPiece(const TorrentPiece *piece) const;
+
+ // Scheduling
+ void scheduleUploads();
+ void scheduleDownloads();
+ void schedulePieceForClient(PeerWireClient *client);
+ void requestMore(PeerWireClient *client);
+ int requestBlocks(PeerWireClient *client, TorrentPiece *piece, int maxBlocks);
+ void peerChoked();
+ void peerUnchoked();
+
+ // Tracker handling
+ void addToPeerList(const QList<TorrentPeer> &peerList);
+ void trackerStopped();
+
+ // Progress
+ void updateProgress(int progress = -1);
+
+private:
+ TorrentClientPrivate *d;
+ friend class TorrentClientPrivate;
+};
+
+#endif
diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp
new file mode 100644
index 0000000..3087d6a
--- /dev/null
+++ b/examples/network/torrent/torrentserver.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "connectionmanager.h"
+#include "peerwireclient.h"
+#include "ratecontroller.h"
+#include "torrentclient.h"
+#include "torrentserver.h"
+
+Q_GLOBAL_STATIC(TorrentServer, torrentServer)
+
+TorrentServer *TorrentServer::instance()
+{
+ return torrentServer();
+}
+
+void TorrentServer::addClient(TorrentClient *client)
+{
+ clients << client;
+}
+
+void TorrentServer::removeClient(TorrentClient *client)
+{
+ clients.removeAll(client);
+}
+
+void TorrentServer::incomingConnection(int socketDescriptor)
+{
+ PeerWireClient *client =
+ new PeerWireClient(ConnectionManager::instance()->clientId(), this);
+
+ if (client->setSocketDescriptor(socketDescriptor)) {
+ if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) {
+ connect(client, SIGNAL(infoHashReceived(const QByteArray &)),
+ this, SLOT(processInfoHash(const QByteArray &)));
+ connect(client, SIGNAL(error(QAbstractSocket::SocketError)),
+ this, SLOT(removeClient()));
+ RateController::instance()->addSocket(client);
+ ConnectionManager::instance()->addConnection(client);
+ return;
+ }
+ }
+ client->abort();
+ delete client;
+}
+
+void TorrentServer::removeClient()
+{
+ PeerWireClient *peer = qobject_cast<PeerWireClient *>(sender());
+ RateController::instance()->removeSocket(peer);
+ ConnectionManager::instance()->removeConnection(peer);
+ peer->deleteLater();
+}
+
+void TorrentServer::processInfoHash(const QByteArray &infoHash)
+{
+ PeerWireClient *peer = qobject_cast<PeerWireClient *>(sender());
+ foreach (TorrentClient *client, clients) {
+ if (client->state() >= TorrentClient::Searching && client->infoHash() == infoHash) {
+ peer->disconnect(peer, 0, this, 0);
+ client->setupIncomingConnection(peer);
+ return;
+ }
+ }
+ removeClient();
+}
diff --git a/examples/network/torrent/torrentserver.h b/examples/network/torrent/torrentserver.h
new file mode 100644
index 0000000..6ae89e1
--- /dev/null
+++ b/examples/network/torrent/torrentserver.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TORRENTSERVER_H
+#define TORRENTSERVER_H
+
+#include <QList>
+#include <QTcpServer>
+
+class TorrentClient;
+
+class TorrentServer : public QTcpServer
+{
+ Q_OBJECT
+
+public:
+ inline TorrentServer() {}
+ static TorrentServer *instance();
+
+ void addClient(TorrentClient *client);
+ void removeClient(TorrentClient *client);
+
+protected:
+ void incomingConnection(int socketDescriptor);
+
+private slots:
+ void removeClient();
+ void processInfoHash(const QByteArray &infoHash);
+
+private:
+ QList<TorrentClient *> clients;
+};
+
+#endif
diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp
new file mode 100644
index 0000000..bda8140
--- /dev/null
+++ b/examples/network/torrent/trackerclient.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bencodeparser.h"
+#include "connectionmanager.h"
+#include "torrentclient.h"
+#include "torrentserver.h"
+#include "trackerclient.h"
+
+#include <QtCore>
+
+TrackerClient::TrackerClient(TorrentClient *downloader, QObject *parent)
+ : QObject(parent), torrentDownloader(downloader)
+{
+ length = 0;
+ requestInterval = 5 * 60;
+ requestIntervalTimer = -1;
+ firstTrackerRequest = true;
+ lastTrackerRequest = false;
+ firstSeeding = true;
+
+ connect(&http, SIGNAL(done(bool)), this, SLOT(httpRequestDone(bool)));
+}
+
+void TrackerClient::start(const MetaInfo &info)
+{
+ metaInfo = info;
+ QTimer::singleShot(0, this, SLOT(fetchPeerList()));
+
+ if (metaInfo.fileForm() == MetaInfo::SingleFileForm) {
+ length = metaInfo.singleFile().length;
+ } else {
+ QList<MetaInfoMultiFile> files = metaInfo.multiFiles();
+ for (int i = 0; i < files.size(); ++i)
+ length += files.at(i).length;
+ }
+}
+
+void TrackerClient::startSeeding()
+{
+ firstSeeding = true;
+ fetchPeerList();
+}
+
+void TrackerClient::stop()
+{
+ lastTrackerRequest = true;
+ http.abort();
+ fetchPeerList();
+}
+
+void TrackerClient::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == requestIntervalTimer) {
+ if (http.state() == QHttp::Unconnected)
+ fetchPeerList();
+ } else {
+ QObject::timerEvent(event);
+ }
+}
+
+void TrackerClient::fetchPeerList()
+{
+ // Prepare connection details
+ QString fullUrl = metaInfo.announceUrl();
+ QUrl url(fullUrl);
+ QString passkey = "?";
+ if (fullUrl.contains("?passkey")) {
+ passkey = metaInfo.announceUrl().mid(fullUrl.indexOf("?passkey"), -1);
+ passkey += "&";
+ }
+
+ // Percent encode the hash
+ QByteArray infoHash = torrentDownloader->infoHash();
+ QString encodedSum;
+ for (int i = 0; i < infoHash.size(); ++i) {
+ encodedSum += '%';
+ encodedSum += QString::number(infoHash[i], 16).right(2).rightJustified(2, '0');
+ }
+
+ bool seeding = (torrentDownloader->state() == TorrentClient::Seeding);
+ QByteArray query;
+ query += url.path().toLatin1();
+ query += passkey;
+ query += "info_hash=" + encodedSum;
+ query += "&peer_id=" + ConnectionManager::instance()->clientId();
+ query += "&port=" + QByteArray::number(TorrentServer::instance()->serverPort());
+ query += "&compact=1";
+ query += "&uploaded=" + QByteArray::number(torrentDownloader->uploadedBytes());
+
+ if (!firstSeeding) {
+ query += "&downloaded=0";
+ query += "&left=0";
+ } else {
+ query += "&downloaded=" + QByteArray::number(
+ torrentDownloader->downloadedBytes());
+ int left = qMax<int>(0, metaInfo.totalSize() - torrentDownloader->downloadedBytes());
+ query += "&left=" + QByteArray::number(seeding ? 0 : left);
+ }
+
+ if (seeding && firstSeeding) {
+ query += "&event=completed";
+ firstSeeding = false;
+ } else if (firstTrackerRequest) {
+ firstTrackerRequest = false;
+ query += "&event=started";
+ } else if(lastTrackerRequest) {
+ query += "&event=stopped";
+ }
+
+ if (!trackerId.isEmpty())
+ query += "&trackerid=" + trackerId;
+
+ http.setHost(url.host(), url.port() == -1 ? 80 : url.port());
+ if (!url.userName().isEmpty())
+ http.setUser(url.userName(), url.password());
+ http.get(query);
+}
+
+void TrackerClient::httpRequestDone(bool error)
+{
+ if (lastTrackerRequest) {
+ emit stopped();
+ return;
+ }
+
+ if (error) {
+ emit connectionError(http.error());
+ return;
+ }
+
+ QByteArray response = http.readAll();
+ http.abort();
+
+ BencodeParser parser;
+ if (!parser.parse(response)) {
+ qWarning("Error parsing bencode response from tracker: %s",
+ qPrintable(parser.errorString()));
+ http.abort();
+ return;
+ }
+
+ QMap<QByteArray, QVariant> dict = parser.dictionary();
+
+ if (dict.contains("failure reason")) {
+ // no other items are present
+ emit failure(QString::fromUtf8(dict.value("failure reason").toByteArray()));
+ return;
+ }
+
+ if (dict.contains("warning message")) {
+ // continue processing
+ emit warning(QString::fromUtf8(dict.value("warning message").toByteArray()));
+ }
+
+ if (dict.contains("tracker id")) {
+ // store it
+ trackerId = dict.value("tracker id").toByteArray();
+ }
+
+ if (dict.contains("interval")) {
+ // Mandatory item
+ if (requestIntervalTimer != -1)
+ killTimer(requestIntervalTimer);
+ requestIntervalTimer = startTimer(dict.value("interval").toInt() * 1000);
+ }
+
+ if (dict.contains("peers")) {
+ // store it
+ peers.clear();
+ QVariant peerEntry = dict.value("peers");
+ if (peerEntry.type() == QVariant::List) {
+ QList<QVariant> peerTmp = peerEntry.toList();
+ for (int i = 0; i < peerTmp.size(); ++i) {
+ TorrentPeer tmp;
+ QMap<QByteArray, QVariant> peer = qVariantValue<QMap<QByteArray, QVariant> >(peerTmp.at(i));
+ tmp.id = QString::fromUtf8(peer.value("peer id").toByteArray());
+ tmp.address.setAddress(QString::fromUtf8(peer.value("ip").toByteArray()));
+ tmp.port = peer.value("port").toInt();
+ peers << tmp;
+ }
+ } else {
+ QByteArray peerTmp = peerEntry.toByteArray();
+ for (int i = 0; i < peerTmp.size(); i += 6) {
+ TorrentPeer tmp;
+ uchar *data = (uchar *)peerTmp.constData() + i;
+ tmp.port = (int(data[4]) << 8) + data[5];
+ uint ipAddress = 0;
+ ipAddress += uint(data[0]) << 24;
+ ipAddress += uint(data[1]) << 16;
+ ipAddress += uint(data[2]) << 8;
+ ipAddress += uint(data[3]);
+ tmp.address.setAddress(ipAddress);
+ peers << tmp;
+ }
+ }
+ emit peerListUpdated(peers);
+ }
+}
diff --git a/examples/network/torrent/trackerclient.h b/examples/network/torrent/trackerclient.h
new file mode 100644
index 0000000..f1ce37db
--- /dev/null
+++ b/examples/network/torrent/trackerclient.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TRACKERCLIENT_H
+#define TRACKERCLIENT_H
+
+#include <QByteArray>
+#include <QList>
+#include <QObject>
+#include <QHostAddress>
+#include <QHttp>
+
+#include "metainfo.h"
+#include "torrentclient.h"
+
+class TorrentClient;
+
+class TrackerClient : public QObject
+{
+ Q_OBJECT
+
+public:
+ TrackerClient(TorrentClient *downloader, QObject *parent = 0);
+
+ void start(const MetaInfo &info);
+ void stop();
+ void startSeeding();
+
+signals:
+ void connectionError(QHttp::Error error);
+
+ void failure(const QString &reason);
+ void warning(const QString &message);
+ void peerListUpdated(const QList<TorrentPeer> &peerList);
+
+ void uploadCountUpdated(qint64 newUploadCount);
+ void downloadCountUpdated(qint64 newDownloadCount);
+
+ void stopped();
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private slots:
+ void fetchPeerList();
+ void httpRequestDone(bool error);
+
+private:
+ TorrentClient *torrentDownloader;
+
+ int requestInterval;
+ int requestIntervalTimer;
+ QHttp http;
+ MetaInfo metaInfo;
+ QByteArray trackerId;
+ QList<TorrentPeer> peers;
+ qint64 uploadedBytes;
+ qint64 downloadedBytes;
+ qint64 length;
+
+ bool firstTrackerRequest;
+ bool lastTrackerRequest;
+ bool firstSeeding;
+};
+
+#endif
diff --git a/examples/opengl/2dpainting/2dpainting.pro b/examples/opengl/2dpainting/2dpainting.pro
new file mode 100644
index 0000000..c45b764
--- /dev/null
+++ b/examples/opengl/2dpainting/2dpainting.pro
@@ -0,0 +1,17 @@
+QT += opengl
+
+HEADERS = glwidget.h \
+ helper.h \
+ widget.h \
+ window.h
+SOURCES = glwidget.cpp \
+ helper.cpp \
+ main.cpp \
+ widget.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/2dpainting
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS 2dpainting.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/2dpainting
+INSTALLS += target sources
diff --git a/examples/opengl/2dpainting/glwidget.cpp b/examples/opengl/2dpainting/glwidget.cpp
new file mode 100644
index 0000000..d5f63d2
--- /dev/null
+++ b/examples/opengl/2dpainting/glwidget.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "glwidget.h"
+#include "helper.h"
+
+//! [0]
+GLWidget::GLWidget(Helper *helper, QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent), helper(helper)
+{
+ elapsed = 0;
+ setFixedSize(200, 200);
+ setAutoFillBackground(false);
+}
+//! [0]
+
+//! [1]
+void GLWidget::animate()
+{
+ elapsed = (elapsed + qobject_cast<QTimer*>(sender())->interval()) % 1000;
+ repaint();
+}
+//! [1]
+
+//! [2]
+void GLWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter;
+ painter.begin(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ helper->paint(&painter, event, elapsed);
+ painter.end();
+}
+//! [2]
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
new file mode 100644
index 0000000..f3a9bd5
--- /dev/null
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+
+//! [0]
+class Helper;
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+class QWidget;
+QT_END_NAMESPACE
+
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(Helper *helper, QWidget *parent);
+
+public slots:
+ void animate();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ Helper *helper;
+ int elapsed;
+};
+//! [0]
+
+#endif
diff --git a/examples/opengl/2dpainting/helper.cpp b/examples/opengl/2dpainting/helper.cpp
new file mode 100644
index 0000000..8796d87
--- /dev/null
+++ b/examples/opengl/2dpainting/helper.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "helper.h"
+
+//! [0]
+Helper::Helper()
+{
+ QLinearGradient gradient(QPointF(50, -20), QPointF(80, 20));
+ gradient.setColorAt(0.0, Qt::white);
+ gradient.setColorAt(1.0, QColor(0xa6, 0xce, 0x39));
+
+ background = QBrush(QColor(64, 32, 64));
+ circleBrush = QBrush(gradient);
+ circlePen = QPen(Qt::black);
+ circlePen.setWidth(1);
+ textPen = QPen(Qt::white);
+ textFont.setPixelSize(50);
+}
+//! [0]
+
+//! [1]
+void Helper::paint(QPainter *painter, QPaintEvent *event, int elapsed)
+{
+ painter->fillRect(event->rect(), background);
+ painter->translate(100, 100);
+//! [1]
+
+//! [2]
+ painter->save();
+ painter->setBrush(circleBrush);
+ painter->setPen(circlePen);
+ painter->rotate(elapsed * 0.030);
+
+ qreal r = elapsed/1000.0;
+ int n = 30;
+ for (int i = 0; i < n; ++i) {
+ painter->rotate(30);
+ qreal radius = 0 + 120.0*((i+r)/n);
+ qreal circleRadius = 1 + ((i+r)/n)*20;
+ painter->drawEllipse(QRectF(radius, -circleRadius,
+ circleRadius*2, circleRadius*2));
+ }
+ painter->restore();
+//! [2]
+
+//! [3]
+ painter->setPen(textPen);
+ painter->setFont(textFont);
+ painter->drawText(QRect(-50, -50, 100, 100), Qt::AlignCenter, "Qt");
+}
+//! [3]
diff --git a/examples/opengl/2dpainting/helper.h b/examples/opengl/2dpainting/helper.h
new file mode 100644
index 0000000..1d63cc9
--- /dev/null
+++ b/examples/opengl/2dpainting/helper.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HELPER_H
+#define HELPER_H
+
+#include <QBrush>
+#include <QFont>
+#include <QPen>
+
+QT_BEGIN_NAMESPACE
+class QPainter;
+class QPaintEvent;
+QT_END_NAMESPACE
+
+//! [0]
+class Helper
+{
+public:
+ Helper();
+
+public:
+ void paint(QPainter *painter, QPaintEvent *event, int elapsed);
+
+private:
+ QBrush background;
+ QBrush circleBrush;
+ QFont textFont;
+ QPen circlePen;
+ QPen textPen;
+};
+//! [0]
+
+#endif
diff --git a/examples/opengl/2dpainting/main.cpp b/examples/opengl/2dpainting/main.cpp
new file mode 100644
index 0000000..58c9705
--- /dev/null
+++ b/examples/opengl/2dpainting/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/opengl/2dpainting/widget.cpp b/examples/opengl/2dpainting/widget.cpp
new file mode 100644
index 0000000..89d4608
--- /dev/null
+++ b/examples/opengl/2dpainting/widget.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "widget.h"
+#include "helper.h"
+
+
+//! [0]
+Widget::Widget(Helper *helper, QWidget *parent)
+ : QWidget(parent), helper(helper)
+{
+ elapsed = 0;
+ setFixedSize(200, 200);
+}
+//! [0]
+
+//! [1]
+void Widget::animate()
+{
+ elapsed = (elapsed + qobject_cast<QTimer*>(sender())->interval()) % 1000;
+ repaint();
+}
+//! [1]
+
+//! [2]
+void Widget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter;
+ painter.begin(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ helper->paint(&painter, event, elapsed);
+ painter.end();
+}
+//! [2]
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
new file mode 100644
index 0000000..f88c676
--- /dev/null
+++ b/examples/opengl/2dpainting/widget.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WIDGET_H
+#define WIDGET_H
+
+#include <QWidget>
+
+//! [0]
+class Helper;
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+QT_END_NAMESPACE
+
+class Widget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Widget(Helper *helper, QWidget *parent);
+
+public slots:
+ void animate();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ Helper *helper;
+ int elapsed;
+};
+//! [0]
+
+#endif
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
new file mode 100644
index 0000000..f55e90e
--- /dev/null
+++ b/examples/opengl/2dpainting/window.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "glwidget.h"
+#include "widget.h"
+#include "window.h"
+
+//! [0]
+Window::Window()
+ : QWidget()
+{
+ Widget *native = new Widget(&helper, this);
+ GLWidget *openGL = new GLWidget(&helper, this);
+ QLabel *nativeLabel = new QLabel(tr("Native"));
+ nativeLabel->setAlignment(Qt::AlignHCenter);
+ QLabel *openGLLabel = new QLabel(tr("OpenGL"));
+ openGLLabel->setAlignment(Qt::AlignHCenter);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(native, 0, 0);
+ layout->addWidget(openGL, 0, 1);
+ layout->addWidget(nativeLabel, 1, 0);
+ layout->addWidget(openGLLabel, 1, 1);
+ setLayout(layout);
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), native, SLOT(animate()));
+ connect(timer, SIGNAL(timeout()), openGL, SLOT(animate()));
+ timer->start(50);
+
+ setWindowTitle(tr("2D Painting on Native and OpenGL Widgets"));
+}
+//! [0]
diff --git a/examples/opengl/2dpainting/window.h b/examples/opengl/2dpainting/window.h
new file mode 100644
index 0000000..84a4440
--- /dev/null
+++ b/examples/opengl/2dpainting/window.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+#include "helper.h"
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ Helper helper;
+};
+//! [0]
+
+#endif
diff --git a/examples/opengl/README b/examples/opengl/README
new file mode 100644
index 0000000..69bd134
--- /dev/null
+++ b/examples/opengl/README
@@ -0,0 +1,41 @@
+Qt provides support for integration with OpenGL implementations on all
+platforms, giving developers the opportunity to display hardware accelerated
+3D graphics alongside a more conventional user interface.
+
+These examples demonstrate the basic techniques used to take advantage of
+OpenGL in Qt applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/opengl/framebufferobject/bubbles.svg b/examples/opengl/framebufferobject/bubbles.svg
new file mode 100644
index 0000000..65867da
--- /dev/null
+++ b/examples/opengl/framebufferobject/bubbles.svg
@@ -0,0 +1,215 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="20cm" height="15cm" viewBox="0 0 800 600"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Semi-transparent bubbles on a colored background.</desc>
+ <defs>
+ <!-- Create radial gradients for each bubble. -->
+ <radialGradient id="blueBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdcdff" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#cdaacd" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="redBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffcdcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbb99" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="greenBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#99aaaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="yellowBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbbaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="background" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="400" fx="250" fy="250">
+ <stop offset="0%" stop-color="#ffffee" />
+ <stop offset="100%" stop-color="#ccccaa" />
+ </radialGradient>
+ <linearGradient id="surface" gradientUnits="userSpaceOnUse"
+ x1="-100" y1="200" x2="400" y2="200">
+ <stop offset="0%" stop-color="#ffffcc" />
+ <stop offset="100%" stop-color="#bbbb88" />
+ </linearGradient>
+
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadowGrad)" cx="0" cy="0" r="100" />
+ <g id="bubble">
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <circle cx="0" cy="0" r="100" />
+ </g>
+ </defs>
+ <g>
+ <rect fill="url(#background)" x="0" y="0" width="800" height="600" />
+ </g>
+
+ <g transform="translate(200,700)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(315,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(80,700)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(255,700)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(565,700)">
+ <g transform="scale(0.4,0.4)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(715,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(645,700)">
+ <g transform="scale(0.375,0.375)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(555,700)">
+ <g transform="scale(0.9,0.9)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(360,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(215,700)">
+ <g transform="scale(0.45,0.45)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(420,700)">
+ <g transform="scale(0.75,0.75)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(815,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(225,375)" >
+ <g transform="scale(1.0,0.5)" >
+ <path d="M 0 0 L 350 0 L 450 450 L -100 450 z"
+ fill="url(#surface)" stroke="none" />
+ </g>
+ </g>
+ <g transform="translate(200,0)" >
+ <g transform="translate(200,490) scale(2.0,1.0) rotate(45)" >
+ <rect fill="#a6ce39" x="-69" y="-69" width="138" height="138" />
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(200,375)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,440)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,475)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,525)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/examples/opengl/framebufferobject/designer.png b/examples/opengl/framebufferobject/designer.png
new file mode 100644
index 0000000..4f32d57
--- /dev/null
+++ b/examples/opengl/framebufferobject/designer.png
Binary files differ
diff --git a/examples/opengl/framebufferobject/framebufferobject.pro b/examples/opengl/framebufferobject/framebufferobject.pro
new file mode 100644
index 0000000..4bc667c
--- /dev/null
+++ b/examples/opengl/framebufferobject/framebufferobject.pro
@@ -0,0 +1,22 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Fri May 12 17:15:46 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+QT += opengl svg
+
+# Input
+HEADERS += glwidget.h
+SOURCES += glwidget.cpp main.cpp
+RESOURCES += framebufferobject.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.png *.svg
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject
+INSTALLS += target sources
+
diff --git a/examples/opengl/framebufferobject/framebufferobject.qrc b/examples/opengl/framebufferobject/framebufferobject.qrc
new file mode 100644
index 0000000..986f1ca
--- /dev/null
+++ b/examples/opengl/framebufferobject/framebufferobject.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>bubbles.svg</file>
+ <file>designer.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/framebufferobject/glwidget.cpp b/examples/opengl/framebufferobject/glwidget.cpp
new file mode 100644
index 0000000..d3591d6
--- /dev/null
+++ b/examples/opengl/framebufferobject/glwidget.cpp
@@ -0,0 +1,309 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QImage>
+#include "glwidget.h"
+
+#include <math.h>
+
+#ifndef GL_MULTISAMPLE
+#define GL_MULTISAMPLE 0x809D
+#endif
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers|QGL::AlphaChannel), parent)
+{
+ setWindowTitle(tr("OpenGL framebuffer objects"));
+ makeCurrent();
+ fbo = new QGLFramebufferObject(1024, 1024);
+ rot_x = rot_y = rot_z = 0.0f;
+ scale = 0.1f;
+ anim = new QTimeLine(750, this);
+ anim->setUpdateInterval(20);
+ connect(anim, SIGNAL(valueChanged(qreal)), SLOT(animate(qreal)));
+ connect(anim, SIGNAL(finished()), SLOT(animFinished()));
+
+ svg_renderer = new QSvgRenderer(QLatin1String(":/res/bubbles.svg"), this);
+ connect(svg_renderer, SIGNAL(repaintNeeded()), this, SLOT(draw()));
+
+ logo = QImage(":/res/designer.png");
+ logo = logo.convertToFormat(QImage::Format_ARGB32);
+
+ tile_list = glGenLists(1);
+ glNewList(tile_list, GL_COMPILE);
+ glBegin(GL_QUADS);
+ {
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ }
+ glEnd();
+ glEndList();
+
+ wave = new GLfloat[logo.width()*logo.height()];
+ memset(wave, 0, logo.width()*logo.height());
+ startTimer(30); // wave timer
+}
+
+GLWidget::~GLWidget()
+{
+ delete[] wave;
+ glDeleteLists(tile_list, 1);
+ delete fbo;
+}
+
+void GLWidget::paintEvent(QPaintEvent *)
+{
+ draw();
+}
+
+void GLWidget::draw()
+{
+ QPainter p(this); // used for text overlay
+
+ // save the GL state set for QPainter
+ saveGLState();
+
+ // render the 'bubbles.svg' file into our framebuffer object
+ QPainter fbo_painter(fbo);
+ svg_renderer->render(&fbo_painter);
+ fbo_painter.end();
+
+ // draw into the GL widget
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-1, 1, -1, 1, 10, 100);
+ glTranslatef(0.0f, 0.0f, -15.0f);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glViewport(0, 0, width(), height());
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+ glBindTexture(GL_TEXTURE_2D, fbo->texture());
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_MULTISAMPLE);
+ glEnable(GL_CULL_FACE);
+
+ // draw background
+ glPushMatrix();
+ glScalef(1.7f, 1.7f, 1.7f);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ glCallList(tile_list);
+ glPopMatrix();
+
+ const int w = logo.width();
+ const int h = logo.height();
+
+ glRotatef(rot_x, 1.0f, 0.0f, 0.0f);
+ glRotatef(rot_y, 0.0f, 1.0f, 0.0f);
+ glRotatef(rot_z, 0.0f, 0.0f, 1.0f);
+ glScalef(scale/w, scale/w, scale/w);
+
+ glDepthFunc(GL_LESS);
+ glEnable(GL_DEPTH_TEST);
+ // draw the Qt icon
+ glTranslatef(-w+1, -h+1, 0.0f);
+ for (int y=h-1; y>=0; --y) {
+ uint *p = (uint*) logo.scanLine(y);
+ uint *end = p + w;
+ int x = 0;
+ while (p < end) {
+ glColor4ub(qRed(*p), qGreen(*p), qBlue(*p), uchar(qAlpha(*p)*.9));
+ glTranslatef(0.0f, 0.0f, wave[y*w+x]);
+ if (qAlpha(*p) > 128)
+ glCallList(tile_list);
+ glTranslatef(0.0f, 0.0f, -wave[y*w+x]);
+ glTranslatef(2.0f, 0.0f, 0.0f);
+ ++x;
+ ++p;
+ }
+ glTranslatef(-w*2.0f, 2.0f, 0.0f);
+ }
+
+ // restore the GL state that QPainter expects
+ restoreGLState();
+
+ // draw the overlayed text using QPainter
+ p.setPen(QColor(197, 197, 197, 157));
+ p.setBrush(QColor(197, 197, 197, 127));
+ p.drawRect(QRect(0, 0, width(), 50));
+ p.setPen(Qt::black);
+ p.setBrush(Qt::NoBrush);
+ const QString str1(tr("A simple OpenGL framebuffer object example."));
+ const QString str2(tr("Use the mouse wheel to zoom, press buttons and move mouse to rotate, double-click to flip."));
+ QFontMetrics fm(p.font());
+ p.drawText(width()/2 - fm.width(str1)/2, 20, str1);
+ p.drawText(width()/2 - fm.width(str2)/2, 20 + fm.lineSpacing(), str2);
+}
+
+void GLWidget::mousePressEvent(QMouseEvent *e)
+{
+ anchor = e->pos();
+}
+
+void GLWidget::mouseMoveEvent(QMouseEvent *e)
+{
+ QPoint diff = e->pos() - anchor;
+ if (e->buttons() & Qt::LeftButton) {
+ rot_x += diff.y()/5.0f;
+ rot_y += diff.x()/5.0f;
+ } else if (e->buttons() & Qt::RightButton) {
+ rot_z += diff.x()/5.0f;
+ }
+
+ anchor = e->pos();
+ draw();
+}
+
+void GLWidget::wheelEvent(QWheelEvent *e)
+{
+ e->delta() > 0 ? scale += scale*0.1f : scale -= scale*0.1f;
+ draw();
+}
+
+void GLWidget::mouseDoubleClickEvent(QMouseEvent *)
+{
+ anim->start();
+}
+
+void GLWidget::animate(qreal val)
+{
+ rot_y = val * 180;
+ draw();
+}
+
+void GLWidget::animFinished()
+{
+ if (anim->direction() == QTimeLine::Forward)
+ anim->setDirection(QTimeLine::Backward);
+ else
+ anim->setDirection(QTimeLine::Forward);
+}
+
+void GLWidget::saveGLState()
+{
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+}
+
+void GLWidget::restoreGLState()
+{
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glPopAttrib();
+}
+
+#define PI 3.14159
+
+void GLWidget::timerEvent(QTimerEvent *)
+{
+ if (QApplication::mouseButtons() != 0)
+ return;
+
+ static bool scale_in = true;
+
+ if (scale_in && scale > 35.0f)
+ scale_in = false;
+ else if (!scale_in && scale < .5f)
+ scale_in = true;
+
+ scale = scale_in ? scale + scale*0.01f : scale-scale*0.01f;
+ rot_z += 0.3f;
+ rot_x += 0.1f;
+
+ int dx, dy; // disturbance point
+ float s, v, W, t;
+ int i, j;
+ static float wt[128][128];
+ const int width = logo.width();
+ const int AMP = 5;
+
+ dx = dy = width >> 1;
+
+ W = .3f;
+ v = -4; // wave speed
+
+ for (i = 0; i < width; ++i) {
+ for ( j = 0; j < width; ++j) {
+ s = sqrt((double) ((j - dx) * (j - dx) + (i - dy) * (i - dy)));
+ wt[i][j] += 0.1f;
+ t = s / v;
+ if (s != 0)
+ wave[i*width + j] = AMP * sin(2 * PI * W * (wt[i][j] + t)) / (0.2*(s + 2));
+ else
+ wave[i*width + j] = AMP * sin(2 * PI * W * (wt[i][j] + t));
+ }
+ }
+}
diff --git a/examples/opengl/framebufferobject/glwidget.h b/examples/opengl/framebufferobject/glwidget.h
new file mode 100644
index 0000000..b64cfa8
--- /dev/null
+++ b/examples/opengl/framebufferobject/glwidget.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL>
+#include <QImage>
+#include <QTimeLine>
+#include <QSvgRenderer>
+
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent);
+ ~GLWidget();
+
+ void saveGLState();
+ void restoreGLState();
+
+ void paintEvent(QPaintEvent *);
+ void mousePressEvent(QMouseEvent *);
+ void mouseDoubleClickEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void timerEvent(QTimerEvent *);
+ void wheelEvent(QWheelEvent *);
+
+public slots:
+ void animate(qreal);
+ void animFinished();
+ void draw();
+
+private:
+ QPoint anchor;
+ float scale;
+ float rot_x, rot_y, rot_z;
+ GLuint tile_list;
+ GLfloat *wave;
+
+ QImage logo;
+ QTimeLine *anim;
+ QSvgRenderer *svg_renderer;
+ QGLFramebufferObject *fbo;
+};
+
diff --git a/examples/opengl/framebufferobject/main.cpp b/examples/opengl/framebufferobject/main.cpp
new file mode 100644
index 0000000..f9af3f9
--- /dev/null
+++ b/examples/opengl/framebufferobject/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include "glwidget.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(framebufferobject);
+
+ QApplication a(argc, argv);
+ if (!QGLFormat::hasOpenGL() || !QGLFramebufferObject::hasOpenGLFramebufferObjects()) {
+ QMessageBox::information(0, "OpenGL framebuffer objects",
+ "This system does not support OpenGL/framebuffer objects.");
+ return -1;
+ }
+
+ GLWidget widget(0);
+ widget.resize(640, 480);
+ widget.show();
+ return a.exec();
+}
+
diff --git a/examples/opengl/framebufferobject2/cubelogo.png b/examples/opengl/framebufferobject2/cubelogo.png
new file mode 100644
index 0000000..3ae0f9b
--- /dev/null
+++ b/examples/opengl/framebufferobject2/cubelogo.png
Binary files differ
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro
new file mode 100644
index 0000000..9f1644c
--- /dev/null
+++ b/examples/opengl/framebufferobject2/framebufferobject2.pro
@@ -0,0 +1,11 @@
+HEADERS += glwidget.h
+SOURCES += glwidget.cpp main.cpp
+RESOURCES += framebufferobject2.qrc
+
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject2
+sources.files = $$SOURCES $$HEADERS $$RESOURCES framebufferobject2.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject2
+INSTALLS += target sources
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.qrc b/examples/opengl/framebufferobject2/framebufferobject2.qrc
new file mode 100644
index 0000000..9fc1a56
--- /dev/null
+++ b/examples/opengl/framebufferobject2/framebufferobject2.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>cubelogo.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/framebufferobject2/glwidget.cpp b/examples/opengl/framebufferobject2/glwidget.cpp
new file mode 100644
index 0000000..24bc2ef
--- /dev/null
+++ b/examples/opengl/framebufferobject2/glwidget.cpp
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glwidget.h"
+#include <QtGui/QImage>
+
+#include <math.h>
+
+static GLint cubeArray[][3] = {
+ {0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0},
+ {0, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1},
+ {0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1},
+ {0, 1, 0}, {0, 1, 1}, {1, 1, 1}, {1, 1, 0},
+ {0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1},
+ {1, 0, 0}, {1, 1, 0}, {1, 1, 1}, {1, 0, 1}
+};
+
+static GLint cubeTextureArray[][2] = {
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {0, 0}, {0, 1}, {1, 1}, {1, 0},
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {1, 0}, {0, 0}, {0, 1}, {1, 1},
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {1, 0}, {0, 0}, {0, 1}, {1, 1}
+};
+
+static GLint faceArray[][2] = {
+ {1, -1}, {1, 1}, {-1, 1}, {-1, -1}
+};
+
+static GLubyte colorArray[][4] = {
+ {102, 176, 54, 255},
+ {81, 141, 41, 255},
+ {62, 108, 32, 255},
+ {45, 79, 23, 255}
+};
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
+{
+ // create the framebuffer object - make sure to have a current
+ // context before creating it
+ makeCurrent();
+ fbo = new QGLFramebufferObject(512, 512);
+ timerId = startTimer(20);
+ setWindowTitle(tr("OpenGL framebuffer objects 2"));
+}
+
+GLWidget::~GLWidget()
+{
+ glDeleteLists(pbufferList, 1);
+ delete fbo;
+}
+
+void GLWidget::initializeGL()
+{
+ glMatrixMode(GL_MODELVIEW);
+
+ glEnable(GL_CULL_FACE);
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+ glTexCoordPointer(2, GL_INT, 0, cubeTextureArray);
+ glColorPointer(4, GL_UNSIGNED_BYTE, 0, colorArray);
+
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_DEPTH_TEST);
+
+ glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ pbufferList = glGenLists(1);
+ glNewList(pbufferList, GL_COMPILE);
+ {
+ glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
+
+ // draw cube background
+ glPushMatrix();
+ glLoadIdentity();
+ glTranslatef(0.5f, 0.5f, -2.0f);
+ glDisable(GL_TEXTURE_2D);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glVertexPointer(2, GL_INT, 0, faceArray);
+ glDrawArrays(GL_QUADS, 0, 4);
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+ glDisableClientState(GL_COLOR_ARRAY);
+ glEnable(GL_TEXTURE_2D);
+ glPopMatrix();
+
+ // draw cube
+ glTranslatef(0.5f, 0.5f, 0.5f);
+ glRotatef(3.0f, 1.0f, 1.0f, 1.0f);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+ glColor4f(0.9f, 0.9f, 0.9f, 1.0f);
+ glDrawArrays(GL_QUADS, 0, 24);
+
+ glPushMatrix(); // this state is popped back in the paintGL() function
+ }
+ glEndList();
+
+ for (int i = 0; i < 3; ++i) {
+ yOffs[i] = 0.0f;
+ xInc[i] = 0.005f;
+ rot[i] = 0.0f;
+ }
+ xOffs[0]= 0.0f;
+ xOffs[1]= 0.5f;
+ xOffs[2]= 1.0f;
+
+ cubeTexture = bindTexture(QImage(":res/cubelogo.png"));
+
+ glPushMatrix(); // push to avoid stack underflow in the first paintGL() call
+}
+
+void GLWidget::resizeGL(int w, int h)
+{
+ glViewport(0, 0, w, h);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ float aspect = w/(float)(h ? h : 1);
+ glFrustum(-aspect, aspect, -1, 1, 10, 100);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+ glTranslatef(0.0f, 0.0f, -15.0f);
+}
+
+void GLWidget::paintGL()
+{
+ glPopMatrix(); // pop the matrix pushed in the pbuffer list
+
+ // push the projection matrix and the entire GL state before
+ // doing any rendering into our framebuffer object
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+
+ glViewport(0, 0, fbo->size().width(), fbo->size().height());
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-1, 1, -1, 1, -99, 99);
+ glTranslatef(-0.5f, -0.5f, 0.0f);
+ glMatrixMode(GL_MODELVIEW);
+
+ // render to the framebuffer object
+ fbo->bind();
+ glBindTexture(GL_TEXTURE_2D, cubeTexture);
+ glCallList(pbufferList);
+ fbo->release();
+
+ // pop the projection matrix and GL state back for rendering
+ // to the actual widget
+ glPopAttrib();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+
+ glBindTexture(GL_TEXTURE_2D, fbo->texture());
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ // draw the background
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glVertexPointer(2, GL_INT, 0, faceArray);
+ glTranslatef(-1.2f, -0.8f, 0.0f);
+ glScalef(0.2f, 0.2f, 0.2f);
+ for (int y = 0; y < 5; ++y) {
+ for (int x = 0; x < 5; ++x) {
+ glTranslatef(2.0f, 0, 0);
+ glColor4f(0.8, 0.8, 0.8, 1.0);
+ glDrawArrays(GL_QUADS, 0, 4);
+ }
+ glTranslatef(-10.0f, 2.0f, 0);
+ }
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+
+ // draw the bouncing cubes
+ drawCube(0, 0.0f, 1.5f, 2.5f, 1.5f);
+ drawCube(1, 1.0f, 2.0f, 2.5f, 2.0f);
+ drawCube(2, 2.0f, 3.5f, 2.5f, 2.5f);
+ glPopMatrix();
+}
+
+void GLWidget::drawCube(int i, GLfloat z, GLfloat rotation, GLfloat jmp, GLfloat amp)
+{
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(xOffs[i], yOffs[i], z);
+ glTranslatef(0.5f, 0.5f, 0.5f);
+ GLfloat scale = 0.75 + i*(0.25f/2);
+ glScalef(scale, scale, scale);
+ glRotatef(rot[i], 1.0f, 1.0f, 1.0f);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+
+ glColor4f(1.0f, 1.0f, 1.0f, 0.8f);
+ glDrawArrays(GL_QUADS, 0, 24);
+
+ if (xOffs[i] > 1.0f || xOffs[i] < -1.0f) {
+ xInc[i] = -xInc[i];
+ xOffs[i] = xOffs[i] > 1.0f ? 1.0f : -1.0f;
+ }
+ xOffs[i] += xInc[i];
+ yOffs[i] = qAbs(cos((-3.141592f * jmp) * xOffs[i]) * amp) - 1;
+ rot[i] += rotation;
+}
diff --git a/examples/opengl/framebufferobject2/glwidget.h b/examples/opengl/framebufferobject2/glwidget.h
new file mode 100644
index 0000000..e200ac2
--- /dev/null
+++ b/examples/opengl/framebufferobject2/glwidget.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL>
+
+class GLWidget : public QGLWidget
+{
+public:
+ GLWidget(QWidget *parent);
+ ~GLWidget();
+ void initializeGL();
+ void resizeGL(int w, int h);
+ void paintGL();
+ void timerEvent(QTimerEvent *) { update(); }
+ void mousePressEvent(QMouseEvent *) { killTimer(timerId); }
+ void mouseReleaseEvent(QMouseEvent *) { timerId = startTimer(20); }
+
+ void drawCube(int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp);
+
+private:
+ GLfloat rot[3], xOffs[3], yOffs[3], xInc[3];
+ GLuint pbufferList;
+ GLuint cubeTexture;
+ int timerId;
+
+ QGLFramebufferObject *fbo;
+};
+
diff --git a/examples/opengl/framebufferobject2/main.cpp b/examples/opengl/framebufferobject2/main.cpp
new file mode 100644
index 0000000..912f4ec
--- /dev/null
+++ b/examples/opengl/framebufferobject2/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include "glwidget.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(framebufferobject2);
+
+ QApplication a(argc, argv);
+ if (!QGLFormat::hasOpenGL() || !QGLFramebufferObject::hasOpenGLFramebufferObjects()) {
+ QMessageBox::information(0, "OpenGL framebuffer objects 2",
+ "This system does not support OpenGL/framebuffer objects.");
+ return -1;
+ }
+
+ GLWidget widget(0);
+ widget.resize(640, 480);
+ widget.show();
+ return a.exec();
+}
+
diff --git a/examples/opengl/grabber/glwidget.cpp b/examples/opengl/grabber/glwidget.cpp
new file mode 100644
index 0000000..71550ac
--- /dev/null
+++ b/examples/opengl/grabber/glwidget.cpp
@@ -0,0 +1,284 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include <math.h>
+
+#include "glwidget.h"
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(parent)
+{
+ gear1 = 0;
+ gear2 = 0;
+ gear3 = 0;
+ xRot = 0;
+ yRot = 0;
+ zRot = 0;
+ gear1Rot = 0;
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(advanceGears()));
+ timer->start(20);
+}
+
+GLWidget::~GLWidget()
+{
+ makeCurrent();
+ glDeleteLists(gear1, 1);
+ glDeleteLists(gear2, 1);
+ glDeleteLists(gear3, 1);
+}
+
+void GLWidget::setXRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != xRot) {
+ xRot = angle;
+ emit xRotationChanged(angle);
+ updateGL();
+ }
+}
+
+void GLWidget::setYRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != yRot) {
+ yRot = angle;
+ emit yRotationChanged(angle);
+ updateGL();
+ }
+}
+
+void GLWidget::setZRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != zRot) {
+ zRot = angle;
+ emit zRotationChanged(angle);
+ updateGL();
+ }
+}
+
+void GLWidget::initializeGL()
+{
+ static const GLfloat lightPos[4] = { 5.0f, 5.0f, 10.0f, 1.0f };
+ static const GLfloat reflectance1[4] = { 0.8f, 0.1f, 0.0f, 1.0f };
+ static const GLfloat reflectance2[4] = { 0.0f, 0.8f, 0.2f, 1.0f };
+ static const GLfloat reflectance3[4] = { 0.2f, 0.2f, 1.0f, 1.0f };
+
+ glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+ glEnable(GL_DEPTH_TEST);
+
+ gear1 = makeGear(reflectance1, 1.0, 4.0, 1.0, 0.7, 20);
+ gear2 = makeGear(reflectance2, 0.5, 2.0, 2.0, 0.7, 10);
+ gear3 = makeGear(reflectance3, 1.3, 2.0, 0.5, 0.7, 10);
+
+ glEnable(GL_NORMALIZE);
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+}
+
+void GLWidget::paintGL()
+{
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glPushMatrix();
+ glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
+ glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
+ glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
+
+ drawGear(gear1, -3.0, -2.0, 0.0, gear1Rot / 16.0);
+ drawGear(gear2, +3.1, -2.0, 0.0, -2.0 * (gear1Rot / 16.0) - 9.0);
+
+ glRotated(+90.0, 1.0, 0.0, 0.0);
+ drawGear(gear3, -3.1, -1.8, -2.2, +2.0 * (gear1Rot / 16.0) - 2.0);
+
+ glPopMatrix();
+}
+
+void GLWidget::resizeGL(int width, int height)
+{
+ int side = qMin(width, height);
+ glViewport((width - side) / 2, (height - side) / 2, side, side);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-1.0, +1.0, -1.0, 1.0, 5.0, 60.0);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslated(0.0, 0.0, -40.0);
+}
+
+void GLWidget::mousePressEvent(QMouseEvent *event)
+{
+ lastPos = event->pos();
+}
+
+void GLWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ int dx = event->x() - lastPos.x();
+ int dy = event->y() - lastPos.y();
+
+ if (event->buttons() & Qt::LeftButton) {
+ setXRotation(xRot + 8 * dy);
+ setYRotation(yRot + 8 * dx);
+ } else if (event->buttons() & Qt::RightButton) {
+ setXRotation(xRot + 8 * dy);
+ setZRotation(zRot + 8 * dx);
+ }
+ lastPos = event->pos();
+}
+
+void GLWidget::advanceGears()
+{
+ gear1Rot += 2 * 16;
+ updateGL();
+}
+
+GLuint GLWidget::makeGear(const GLfloat *reflectance, GLdouble innerRadius,
+ GLdouble outerRadius, GLdouble thickness,
+ GLdouble toothSize, GLint toothCount)
+{
+ const double Pi = 3.14159265358979323846;
+
+ GLuint list = glGenLists(1);
+ glNewList(list, GL_COMPILE);
+ glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, reflectance);
+
+ GLdouble r0 = innerRadius;
+ GLdouble r1 = outerRadius - toothSize / 2.0;
+ GLdouble r2 = outerRadius + toothSize / 2.0;
+ GLdouble delta = (2.0 * Pi / toothCount) / 4.0;
+ GLdouble z = thickness / 2.0;
+ int i, j;
+
+ glShadeModel(GL_FLAT);
+
+ for (i = 0; i < 2; ++i) {
+ GLdouble sign = (i == 0) ? +1.0 : -1.0;
+
+ glNormal3d(0.0, 0.0, sign);
+
+ glBegin(GL_QUAD_STRIP);
+ for (j = 0; j <= toothCount; ++j) {
+ GLdouble angle = 2.0 * Pi * j / toothCount;
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
+ glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), sign * z);
+ glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta),
+ sign * z);
+ }
+ glEnd();
+
+ glBegin(GL_QUADS);
+ for (j = 0; j < toothCount; ++j) {
+ GLdouble angle = 2.0 * Pi * j / toothCount;
+ glVertex3d(r1 * cos(angle), r1 * sin(angle), sign * z);
+ glVertex3d(r2 * cos(angle + delta), r2 * sin(angle + delta),
+ sign * z);
+ glVertex3d(r2 * cos(angle + 2 * delta), r2 * sin(angle + 2 * delta),
+ sign * z);
+ glVertex3d(r1 * cos(angle + 3 * delta), r1 * sin(angle + 3 * delta),
+ sign * z);
+ }
+ glEnd();
+ }
+
+ glBegin(GL_QUAD_STRIP);
+ for (i = 0; i < toothCount; ++i) {
+ for (j = 0; j < 2; ++j) {
+ GLdouble angle = 2.0 * Pi * (i + (j / 2.0)) / toothCount;
+ GLdouble s1 = r1;
+ GLdouble s2 = r2;
+ if (j == 1)
+ qSwap(s1, s2);
+
+ glNormal3d(cos(angle), sin(angle), 0.0);
+ glVertex3d(s1 * cos(angle), s1 * sin(angle), +z);
+ glVertex3d(s1 * cos(angle), s1 * sin(angle), -z);
+
+ glNormal3d(s2 * sin(angle + delta) - s1 * sin(angle),
+ s1 * cos(angle) - s2 * cos(angle + delta), 0.0);
+ glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), +z);
+ glVertex3d(s2 * cos(angle + delta), s2 * sin(angle + delta), -z);
+ }
+ }
+ glVertex3d(r1, 0.0, +z);
+ glVertex3d(r1, 0.0, -z);
+ glEnd();
+
+ glShadeModel(GL_SMOOTH);
+
+ glBegin(GL_QUAD_STRIP);
+ for (i = 0; i <= toothCount; ++i) {
+ GLdouble angle = i * 2.0 * Pi / toothCount;
+ glNormal3d(-cos(angle), -sin(angle), 0.0);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), +z);
+ glVertex3d(r0 * cos(angle), r0 * sin(angle), -z);
+ }
+ glEnd();
+
+ glEndList();
+
+ return list;
+}
+
+void GLWidget::drawGear(GLuint gear, GLdouble dx, GLdouble dy, GLdouble dz,
+ GLdouble angle)
+{
+ glPushMatrix();
+ glTranslated(dx, dy, dz);
+ glRotated(angle, 0.0, 0.0, 1.0);
+ glCallList(gear);
+ glPopMatrix();
+}
+
+void GLWidget::normalizeAngle(int *angle)
+{
+ while (*angle < 0)
+ *angle += 360 * 16;
+ while (*angle > 360 * 16)
+ *angle -= 360 * 16;
+}
diff --git a/examples/opengl/grabber/glwidget.h b/examples/opengl/grabber/glwidget.h
new file mode 100644
index 0000000..4e66b1f
--- /dev/null
+++ b/examples/opengl/grabber/glwidget.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent = 0);
+ ~GLWidget();
+
+ int xRotation() const { return xRot; }
+ int yRotation() const { return yRot; }
+ int zRotation() const { return zRot; }
+
+public slots:
+ void setXRotation(int angle);
+ void setYRotation(int angle);
+ void setZRotation(int angle);
+
+signals:
+ void xRotationChanged(int angle);
+ void yRotationChanged(int angle);
+ void zRotationChanged(int angle);
+
+protected:
+ void initializeGL();
+ void paintGL();
+ void resizeGL(int width, int height);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+
+private slots:
+ void advanceGears();
+
+private:
+ GLuint makeGear(const GLfloat *reflectance, GLdouble innerRadius,
+ GLdouble outerRadius, GLdouble thickness,
+ GLdouble toothSize, GLint toothCount);
+ void drawGear(GLuint gear, GLdouble dx, GLdouble dy, GLdouble dz,
+ GLdouble angle);
+ void normalizeAngle(int *angle);
+
+ GLuint gear1;
+ GLuint gear2;
+ GLuint gear3;
+ int xRot;
+ int yRot;
+ int zRot;
+ int gear1Rot;
+
+ QPoint lastPos;
+};
+
+#endif
diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro
new file mode 100644
index 0000000..15eaf02
--- /dev/null
+++ b/examples/opengl/grabber/grabber.pro
@@ -0,0 +1,12 @@
+HEADERS = glwidget.h \
+ mainwindow.h
+SOURCES = glwidget.cpp \
+ main.cpp \
+ mainwindow.cpp
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/grabber
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grabber.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/grabber
+INSTALLS += target sources
diff --git a/examples/opengl/grabber/main.cpp b/examples/opengl/grabber/main.cpp
new file mode 100644
index 0000000..4856752
--- /dev/null
+++ b/examples/opengl/grabber/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
new file mode 100644
index 0000000..7e878f9
--- /dev/null
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -0,0 +1,207 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include "glwidget.h"
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ centralWidget = new QWidget;
+ setCentralWidget(centralWidget);
+
+ glWidget = new GLWidget;
+ pixmapLabel = new QLabel;
+
+ glWidgetArea = new QScrollArea;
+ glWidgetArea->setWidget(glWidget);
+ glWidgetArea->setWidgetResizable(true);
+ glWidgetArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ glWidgetArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ glWidgetArea->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+ glWidgetArea->setMinimumSize(50, 50);
+
+ pixmapLabelArea = new QScrollArea;
+ pixmapLabelArea->setWidget(pixmapLabel);
+ pixmapLabelArea->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+ pixmapLabelArea->setMinimumSize(50, 50);
+
+ xSlider = createSlider(SIGNAL(xRotationChanged(int)),
+ SLOT(setXRotation(int)));
+ ySlider = createSlider(SIGNAL(yRotationChanged(int)),
+ SLOT(setYRotation(int)));
+ zSlider = createSlider(SIGNAL(zRotationChanged(int)),
+ SLOT(setZRotation(int)));
+
+ createActions();
+ createMenus();
+
+ QGridLayout *centralLayout = new QGridLayout;
+ centralLayout->addWidget(glWidgetArea, 0, 0);
+ centralLayout->addWidget(pixmapLabelArea, 0, 1);
+ centralLayout->addWidget(xSlider, 1, 0, 1, 2);
+ centralLayout->addWidget(ySlider, 2, 0, 1, 2);
+ centralLayout->addWidget(zSlider, 3, 0, 1, 2);
+ centralWidget->setLayout(centralLayout);
+
+ xSlider->setValue(15 * 16);
+ ySlider->setValue(345 * 16);
+ zSlider->setValue(0 * 16);
+
+ setWindowTitle(tr("Grabber"));
+ resize(400, 300);
+}
+
+void MainWindow::renderIntoPixmap()
+{
+ QSize size = getSize();
+ if (size.isValid()) {
+ QPixmap pixmap = glWidget->renderPixmap(size.width(), size.height());
+ setPixmap(pixmap);
+ }
+}
+
+void MainWindow::grabFrameBuffer()
+{
+ QImage image = glWidget->grabFrameBuffer();
+ setPixmap(QPixmap::fromImage(image));
+}
+
+void MainWindow::clearPixmap()
+{
+ setPixmap(QPixmap());
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Grabber"),
+ tr("The <b>Grabber</b> example demonstrates two approaches for "
+ "rendering OpenGL into a Qt pixmap."));
+}
+
+void MainWindow::createActions()
+{
+ renderIntoPixmapAct = new QAction(tr("&Render into Pixmap..."), this);
+ renderIntoPixmapAct->setShortcut(tr("Ctrl+R"));
+ connect(renderIntoPixmapAct, SIGNAL(triggered()),
+ this, SLOT(renderIntoPixmap()));
+
+ grabFrameBufferAct = new QAction(tr("&Grab Frame Buffer"), this);
+ grabFrameBufferAct->setShortcut(tr("Ctrl+G"));
+ connect(grabFrameBufferAct, SIGNAL(triggered()),
+ this, SLOT(grabFrameBuffer()));
+
+ clearPixmapAct = new QAction(tr("&Clear Pixmap"), this);
+ clearPixmapAct->setShortcut(tr("Ctrl+L"));
+ connect(clearPixmapAct, SIGNAL(triggered()), this, SLOT(clearPixmap()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(renderIntoPixmapAct);
+ fileMenu->addAction(grabFrameBufferAct);
+ fileMenu->addAction(clearPixmapAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+QSlider *MainWindow::createSlider(const char *changedSignal,
+ const char *setterSlot)
+{
+ QSlider *slider = new QSlider(Qt::Horizontal);
+ slider->setRange(0, 360 * 16);
+ slider->setSingleStep(16);
+ slider->setPageStep(15 * 16);
+ slider->setTickInterval(15 * 16);
+ slider->setTickPosition(QSlider::TicksRight);
+ connect(slider, SIGNAL(valueChanged(int)), glWidget, setterSlot);
+ connect(glWidget, changedSignal, slider, SLOT(setValue(int)));
+ return slider;
+}
+
+void MainWindow::setPixmap(const QPixmap &pixmap)
+{
+ pixmapLabel->setPixmap(pixmap);
+ QSize size = pixmap.size();
+ if (size - QSize(1, 0) == pixmapLabelArea->maximumViewportSize())
+ size -= QSize(1, 0);
+ pixmapLabel->resize(size);
+}
+
+QSize MainWindow::getSize()
+{
+ bool ok;
+ QString text = QInputDialog::getText(this, tr("Grabber"),
+ tr("Enter pixmap size:"),
+ QLineEdit::Normal,
+ tr("%1 x %2").arg(glWidget->width())
+ .arg(glWidget->height()),
+ &ok);
+ if (!ok)
+ return QSize();
+
+ QRegExp regExp(tr("([0-9]+) *x *([0-9]+)"));
+ if (regExp.exactMatch(text)) {
+ int width = regExp.cap(1).toInt();
+ int height = regExp.cap(2).toInt();
+ if (width > 0 && width < 2048 && height > 0 && height < 2048)
+ return QSize(width, height);
+ }
+
+ return glWidget->size();
+}
diff --git a/examples/opengl/grabber/mainwindow.h b/examples/opengl/grabber/mainwindow.h
new file mode 100644
index 0000000..8f77747
--- /dev/null
+++ b/examples/opengl/grabber/mainwindow.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QMenu;
+class QScrollArea;
+class QSlider;
+QT_END_NAMESPACE
+class GLWidget;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void renderIntoPixmap();
+ void grabFrameBuffer();
+ void clearPixmap();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ QSlider *createSlider(const char *changedSignal, const char *setterSlot);
+ void setPixmap(const QPixmap &pixmap);
+ QSize getSize();
+
+ QWidget *centralWidget;
+ QScrollArea *glWidgetArea;
+ QScrollArea *pixmapLabelArea;
+ GLWidget *glWidget;
+ QLabel *pixmapLabel;
+ QSlider *xSlider;
+ QSlider *ySlider;
+ QSlider *zSlider;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *grabFrameBufferAct;
+ QAction *renderIntoPixmapAct;
+ QAction *clearPixmapAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
new file mode 100644
index 0000000..d81e7e6
--- /dev/null
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include <math.h>
+
+#include "glwidget.h"
+
+//! [0]
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(parent)
+{
+ object = 0;
+ xRot = 0;
+ yRot = 0;
+ zRot = 0;
+
+ trolltechGreen = QColor::fromCmykF(0.40, 0.0, 1.0, 0.0);
+ trolltechPurple = QColor::fromCmykF(0.39, 0.39, 0.0, 0.0);
+}
+//! [0]
+
+//! [1]
+GLWidget::~GLWidget()
+{
+ makeCurrent();
+ glDeleteLists(object, 1);
+}
+//! [1]
+
+//! [2]
+QSize GLWidget::minimumSizeHint() const
+{
+ return QSize(50, 50);
+}
+//! [2]
+
+//! [3]
+QSize GLWidget::sizeHint() const
+//! [3] //! [4]
+{
+ return QSize(400, 400);
+}
+//! [4]
+
+//! [5]
+void GLWidget::setXRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != xRot) {
+ xRot = angle;
+ emit xRotationChanged(angle);
+ updateGL();
+ }
+}
+//! [5]
+
+void GLWidget::setYRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != yRot) {
+ yRot = angle;
+ emit yRotationChanged(angle);
+ updateGL();
+ }
+}
+
+void GLWidget::setZRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != zRot) {
+ zRot = angle;
+ emit zRotationChanged(angle);
+ updateGL();
+ }
+}
+
+//! [6]
+void GLWidget::initializeGL()
+{
+ qglClearColor(trolltechPurple.dark());
+ object = makeObject();
+ glShadeModel(GL_FLAT);
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+}
+//! [6]
+
+//! [7]
+void GLWidget::paintGL()
+{
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glLoadIdentity();
+ glTranslated(0.0, 0.0, -10.0);
+ glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
+ glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
+ glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
+ glCallList(object);
+}
+//! [7]
+
+//! [8]
+void GLWidget::resizeGL(int width, int height)
+{
+ int side = qMin(width, height);
+ glViewport((width - side) / 2, (height - side) / 2, side, side);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
+ glMatrixMode(GL_MODELVIEW);
+}
+//! [8]
+
+//! [9]
+void GLWidget::mousePressEvent(QMouseEvent *event)
+{
+ lastPos = event->pos();
+}
+//! [9]
+
+//! [10]
+void GLWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ int dx = event->x() - lastPos.x();
+ int dy = event->y() - lastPos.y();
+
+ if (event->buttons() & Qt::LeftButton) {
+ setXRotation(xRot + 8 * dy);
+ setYRotation(yRot + 8 * dx);
+ } else if (event->buttons() & Qt::RightButton) {
+ setXRotation(xRot + 8 * dy);
+ setZRotation(zRot + 8 * dx);
+ }
+ lastPos = event->pos();
+}
+//! [10]
+
+GLuint GLWidget::makeObject()
+{
+ GLuint list = glGenLists(1);
+ glNewList(list, GL_COMPILE);
+
+ glBegin(GL_QUADS);
+
+ GLdouble x1 = +0.06;
+ GLdouble y1 = -0.14;
+ GLdouble x2 = +0.14;
+ GLdouble y2 = -0.06;
+ GLdouble x3 = +0.08;
+ GLdouble y3 = +0.00;
+ GLdouble x4 = +0.30;
+ GLdouble y4 = +0.22;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const double Pi = 3.14159265358979323846;
+ const int NumSectors = 200;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ double angle1 = (i * 2 * Pi) / NumSectors;
+ GLdouble x5 = 0.30 * sin(angle1);
+ GLdouble y5 = 0.30 * cos(angle1);
+ GLdouble x6 = 0.20 * sin(angle1);
+ GLdouble y6 = 0.20 * cos(angle1);
+
+ double angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ GLdouble x7 = 0.20 * sin(angle2);
+ GLdouble y7 = 0.20 * cos(angle2);
+ GLdouble x8 = 0.30 * sin(angle2);
+ GLdouble y8 = 0.30 * cos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+ glEnd();
+
+ glEndList();
+ return list;
+}
+
+void GLWidget::quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
+{
+ qglColor(trolltechGreen);
+
+ glVertex3d(x1, y1, -0.05);
+ glVertex3d(x2, y2, -0.05);
+ glVertex3d(x3, y3, -0.05);
+ glVertex3d(x4, y4, -0.05);
+
+ glVertex3d(x4, y4, +0.05);
+ glVertex3d(x3, y3, +0.05);
+ glVertex3d(x2, y2, +0.05);
+ glVertex3d(x1, y1, +0.05);
+}
+
+void GLWidget::extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ qglColor(trolltechGreen.dark(250 + int(100 * x1)));
+
+ glVertex3d(x1, y1, +0.05);
+ glVertex3d(x2, y2, +0.05);
+ glVertex3d(x2, y2, -0.05);
+ glVertex3d(x1, y1, -0.05);
+}
+
+void GLWidget::normalizeAngle(int *angle)
+{
+ while (*angle < 0)
+ *angle += 360 * 16;
+ while (*angle > 360 * 16)
+ *angle -= 360 * 16;
+}
diff --git a/examples/opengl/hellogl/glwidget.h b/examples/opengl/hellogl/glwidget.h
new file mode 100644
index 0000000..a5f73ee
--- /dev/null
+++ b/examples/opengl/hellogl/glwidget.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+
+//! [0]
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent = 0);
+ ~GLWidget();
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+//! [0]
+
+//! [1]
+public slots:
+ void setXRotation(int angle);
+ void setYRotation(int angle);
+ void setZRotation(int angle);
+
+signals:
+ void xRotationChanged(int angle);
+ void yRotationChanged(int angle);
+ void zRotationChanged(int angle);
+//! [1]
+
+//! [2]
+protected:
+ void initializeGL();
+ void paintGL();
+ void resizeGL(int width, int height);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+//! [2]
+
+//! [3]
+private:
+ GLuint makeObject();
+ void quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
+ void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+ void normalizeAngle(int *angle);
+
+ GLuint object;
+ int xRot;
+ int yRot;
+ int zRot;
+ QPoint lastPos;
+ QColor trolltechGreen;
+ QColor trolltechPurple;
+};
+//! [3]
+
+#endif
diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro
new file mode 100644
index 0000000..ce9c8e8
--- /dev/null
+++ b/examples/opengl/hellogl/hellogl.pro
@@ -0,0 +1,12 @@
+HEADERS = glwidget.h \
+ window.h
+SOURCES = glwidget.cpp \
+ main.cpp \
+ window.cpp
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl
+INSTALLS += target sources
diff --git a/examples/opengl/hellogl/main.cpp b/examples/opengl/hellogl/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/opengl/hellogl/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/opengl/hellogl/window.cpp b/examples/opengl/hellogl/window.cpp
new file mode 100644
index 0000000..82031ee
--- /dev/null
+++ b/examples/opengl/hellogl/window.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "glwidget.h"
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ glWidget = new GLWidget;
+
+ xSlider = createSlider();
+ ySlider = createSlider();
+ zSlider = createSlider();
+
+ connect(xSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXRotation(int)));
+ connect(glWidget, SIGNAL(xRotationChanged(int)), xSlider, SLOT(setValue(int)));
+ connect(ySlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setYRotation(int)));
+ connect(glWidget, SIGNAL(yRotationChanged(int)), ySlider, SLOT(setValue(int)));
+ connect(zSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setZRotation(int)));
+ connect(glWidget, SIGNAL(zRotationChanged(int)), zSlider, SLOT(setValue(int)));
+//! [0]
+
+//! [1]
+ QHBoxLayout *mainLayout = new QHBoxLayout;
+ mainLayout->addWidget(glWidget);
+ mainLayout->addWidget(xSlider);
+ mainLayout->addWidget(ySlider);
+ mainLayout->addWidget(zSlider);
+ setLayout(mainLayout);
+
+ xSlider->setValue(15 * 16);
+ ySlider->setValue(345 * 16);
+ zSlider->setValue(0 * 16);
+ setWindowTitle(tr("Hello GL"));
+}
+//! [1]
+
+//! [2]
+QSlider *Window::createSlider()
+{
+ QSlider *slider = new QSlider(Qt::Vertical);
+ slider->setRange(0, 360 * 16);
+ slider->setSingleStep(16);
+ slider->setPageStep(15 * 16);
+ slider->setTickInterval(15 * 16);
+ slider->setTickPosition(QSlider::TicksRight);
+ return slider;
+}
+//! [2]
diff --git a/examples/opengl/hellogl/window.h b/examples/opengl/hellogl/window.h
new file mode 100644
index 0000000..b20f8a8
--- /dev/null
+++ b/examples/opengl/hellogl/window.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QSlider;
+QT_END_NAMESPACE
+//! [0]
+class GLWidget;
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ QSlider *createSlider();
+
+ GLWidget *glWidget;
+ QSlider *xSlider;
+ QSlider *ySlider;
+ QSlider *zSlider;
+};
+//! [0]
+
+#endif
diff --git a/examples/opengl/hellogl_es/bubble.cpp b/examples/opengl/hellogl_es/bubble.cpp
new file mode 100644
index 0000000..691d314
--- /dev/null
+++ b/examples/opengl/hellogl_es/bubble.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "bubble.h"
+
+Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
+ : position(position), vel(velocity), radius(radius)
+{
+ innerColor = randomColor();
+ outerColor = randomColor();
+ cache = 0;
+ updateBrush();
+}
+
+//! [0]
+void Bubble::updateCache()
+{
+ if (cache)
+ delete cache;
+ cache = new QImage(qRound(radius * 2 + 2), qRound(radius * 2 + 2), QImage::Format_ARGB32);
+ cache->fill(0x00000000);
+ QPainter p(cache);
+ p.setRenderHint(QPainter::HighQualityAntialiasing);
+ QPen pen(Qt::white);
+ pen.setWidth(2);
+ p.setPen(pen);
+ p.setBrush(brush);
+ p.drawEllipse(0, 0, int(2*radius), int(2*radius));
+}
+//! [0]
+
+Bubble::~Bubble()
+{
+ if (cache)
+ delete cache;
+}
+
+void Bubble::updateBrush()
+{
+ QRadialGradient gradient(QPointF(radius, radius), radius,
+ QPointF(radius*0.5, radius*0.5));
+
+ gradient.setColorAt(0, QColor(255, 255, 255, 255));
+ gradient.setColorAt(0.25, innerColor);
+ gradient.setColorAt(1, outerColor);
+ brush = QBrush(gradient);
+ updateCache();
+}
+
+//! [1]
+void Bubble::drawBubble(QPainter *painter)
+{
+ painter->save();
+ painter->translate(position.x() - radius, position.y() - radius);
+ painter->setOpacity(0.8);
+ painter->drawImage(0, 0, *cache);
+ painter->restore();
+}
+//! [1]
+
+QColor Bubble::randomColor()
+{
+ int red = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
+ int green = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
+ int blue = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
+ int alpha = int(91 + 100.0*qrand()/(RAND_MAX+1.0));
+
+ return QColor(red, green, blue, alpha);
+}
+
+void Bubble::move(const QRect &bbox)
+{
+ position += vel;
+ qreal leftOverflow = position.x() - radius - bbox.left();
+ qreal rightOverflow = position.x() + radius - bbox.right();
+ qreal topOverflow = position.y() - radius - bbox.top();
+ qreal bottomOverflow = position.y() + radius - bbox.bottom();
+
+ if (leftOverflow < 0.0) {
+ position.setX(position.x() - 2 * leftOverflow);
+ vel.setX(-vel.x());
+ } else if (rightOverflow > 0.0) {
+ position.setX(position.x() - 2 * rightOverflow);
+ vel.setX(-vel.x());
+ }
+
+ if (topOverflow < 0.0) {
+ position.setY(position.y() - 2 * topOverflow);
+ vel.setY(-vel.y());
+ } else if (bottomOverflow > 0.0) {
+ position.setY(position.y() - 2 * bottomOverflow);
+ vel.setY(-vel.y());
+ }
+}
+
+QRectF Bubble::rect()
+{
+ return QRectF(position.x() - radius, position.y() - radius,
+ 2 * radius, 2 * radius);
+}
diff --git a/examples/opengl/hellogl_es/bubble.h b/examples/opengl/hellogl_es/bubble.h
new file mode 100644
index 0000000..a32754f
--- /dev/null
+++ b/examples/opengl/hellogl_es/bubble.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BUBBLE_H
+#define BUBBLE_H
+
+#include <QBrush>
+#include <QColor>
+#include <QPointF>
+#include <QRect>
+#include <QRectF>
+
+class QPainter;
+
+class Bubble
+{
+public:
+ Bubble(const QPointF &position, qreal radius, const QPointF &velocity);
+ ~Bubble();
+
+ void drawBubble(QPainter *painter);
+ void updateBrush();
+ void move(const QRect &bbox);
+ void updateCache();
+ QRectF rect();
+
+private:
+ QColor randomColor();
+
+ QBrush brush;
+ QPointF position;
+ QPointF vel;
+ qreal radius;
+ QColor innerColor;
+ QColor outerColor;
+ QImage *cache;
+};
+
+#endif
diff --git a/examples/opengl/hellogl_es/cl_helper.h b/examples/opengl/hellogl_es/cl_helper.h
new file mode 100644
index 0000000..416c9bb
--- /dev/null
+++ b/examples/opengl/hellogl_es/cl_helper.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef QT_OPENGL_ES_1_CL
+
+//! [0]
+#define FLOAT2X(f) ((int) ( (f) * (65536)))
+#define X2FLOAT(x) ((float)(x) / 65536.0f)
+
+#define f2vt(f) FLOAT2X(f)
+#define vt2f(x) X2FLOAT(x)
+
+#define q_vertexType GLfixed
+#define q_vertexTypeEnum GL_FIXED
+
+#define q_glFog glFogx
+#define q_glFogv glFogxv
+//! [0]
+
+#define q_glLight glLightx
+#define q_glLightv glLightxv
+#define q_glLightModel glLightModelx
+#define q_glLightModelv glLightModelxv
+
+#define q_glAlphaFunc glAlphaFuncx
+
+#define q_glMaterial glMaterialx
+#define q_glMaterialv glMaterialxv
+#define q_glColor4 glColor4x
+
+#define q_glTexParameter glTexParameterx
+#define q_glTexEnv glTexEnvx
+
+#define q_glOrtho glOrthox
+#define q_glFrustum glFrustumx
+
+#define q_glTranslate glTranslatex
+#define q_glScale glScalex
+#define q_glRotate glRotatex
+#define q_glLoadMatrix glLoadMatrixx
+
+#define q_glClearColor glClearColorx
+
+#define q_glMultMatrix glMultMatrixx
+
+#define q_glNormal3 glNormal3x
+
+#define q_glPolygonOffset glPolygonOffsetx
+#define q_glPointSize glPointSizex
+
+//! [1]
+#else
+
+#define f2vt(f) (f)
+#define vt2f(x) (x)
+
+#define q_vertexType GLfloat
+#define q_vertexTypeEnum GL_FLOAT
+
+#define q_glFog glFogf
+#define q_glFogv glFogfv
+//! [1]
+
+#define q_glLight glLightf
+#define q_glLightv glLightfv
+#define q_glLightModel glLightModelf
+#define q_glLightModelv glLightModelfv
+
+#define q_glAlphaFunc glAlphaFuncf
+
+#define q_glMaterial glMaterialf
+#define q_glMaterialv glMaterialfv
+#define q_glColor4 glColor4f
+
+#define q_glTexParameter glTexParameterf
+#define q_glTexEnv glTexEnvf
+
+#define q_glOrtho glOrthof
+#define q_glFrustum glFrustumf
+
+#define q_glTranslate glTranslatef
+#define q_glScale glScalef
+#define q_glRotate glRotatef
+#define q_glLoadMatrix glLoadMatrixf
+
+#define q_glClearColor glClearColor
+
+#define q_glMultMatrix glMultMatrixf
+
+#define q_glNormal3 glNormal3f
+
+#define q_glPolygonOffset glPolygonOffsetf
+#define q_glPointSize glPointSizef
+
+#endif
diff --git a/examples/opengl/hellogl_es/glwidget.cpp b/examples/opengl/hellogl_es/glwidget.cpp
new file mode 100644
index 0000000..6098c99
--- /dev/null
+++ b/examples/opengl/hellogl_es/glwidget.cpp
@@ -0,0 +1,457 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glwidget.h"
+#include <QPainter>
+#include <math.h>
+
+#include "bubble.h"
+#include "cl_helper.h"
+
+
+const int bubbleNum = 8;
+
+inline void CrossProduct(qreal &xOut, qreal &yOut, qreal &zOut, qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2)
+{
+ xOut = y1 * z2 - z1 * y2;
+ yOut = z1 * x2 - x1 * z2;
+ zOut = x1 * y2 - y1 * x2;
+}
+
+inline void Normalize(qreal &x, qreal &y, qreal &z)
+{
+ qreal l = sqrt(x*x + y*y + z*z);
+ x = x / l;
+ y = y / l;
+ z = z / l;
+}
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(parent)
+{
+ qtLogo = true;
+ createdVertices = 0;
+ createdNormals = 0;
+ m_vertexNumber = 0;
+ frames = 0;
+ setAttribute(Qt::WA_PaintOnScreen);
+ setAttribute(Qt::WA_NoSystemBackground);
+ setAutoBufferSwap(false);
+ m_showBubbles = true;
+}
+
+GLWidget::~GLWidget()
+{
+ if (createdVertices)
+ delete[] createdVertices;
+ if (createdNormals)
+ delete[] createdNormals;
+}
+
+void GLWidget::setScaling(int scale) {
+
+ if (scale > 50)
+ m_fScale = 1 + qreal(scale -50) / 50 * 0.5;
+ else if (scale < 50)
+ m_fScale = 1- (qreal(50 - scale) / 50 * 1/2);
+ else
+ m_fScale = 1;
+}
+
+void GLWidget::setLogo() {
+ qtLogo = true;
+}
+
+void GLWidget::setTexture() {
+ qtLogo = false;
+}
+
+void GLWidget::showBubbles(bool bubbles)
+{
+ m_showBubbles = bubbles;
+}
+
+//! [2]
+void GLWidget::paintQtLogo()
+{
+ glDisable(GL_TEXTURE_2D);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3,q_vertexTypeEnum,0, createdVertices);
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glNormalPointer(q_vertexTypeEnum,0,createdNormals);
+ glDrawArrays(GL_TRIANGLES, 0, m_vertexNumber / 3);
+}
+//! [2]
+
+void GLWidget::paintTexturedCube()
+{
+ glEnable(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, m_uiTexture);
+ q_vertexType afVertices[] = {
+ f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),
+ f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),
+ f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),
+ f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),
+
+ f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(0.5),f2vt(0.5),f2vt(-0.5),
+ f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(0.5),
+ f2vt(-0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(-0.5),
+ f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),f2vt(0.5),f2vt(-0.5),f2vt(-0.5),f2vt(0.5),f2vt(0.5),
+
+ f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(-0.5),
+ f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(0.5),
+ f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5),
+ f2vt(0.5), f2vt(-0.5), f2vt(0.5), f2vt(0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(-0.5), f2vt(0.5)
+ };
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3,q_vertexTypeEnum,0,afVertices);
+
+ q_vertexType afTexCoord[] = {
+ f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
+ f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
+ f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
+ f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
+
+ f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
+ f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
+ f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f),
+ f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f),
+
+ f2vt(0.0f),f2vt(1.0f), f2vt(1.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f),
+ f2vt(1.0f),f2vt(0.0f), f2vt(0.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f),
+ f2vt(1.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f),
+ f2vt(0.0f),f2vt(1.0f), f2vt(0.0f),f2vt(0.0f), f2vt(1.0f),f2vt(1.0f)
+ };
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glTexCoordPointer(2,q_vertexTypeEnum,0,afTexCoord);
+
+ q_vertexType afNormals[] = {
+
+ f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1),
+ f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1), f2vt(0),f2vt(0),f2vt(-1),
+ f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1),
+ f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1), f2vt(0),f2vt(0),f2vt(1),
+
+ f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0),
+ f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0), f2vt(-1),f2vt(0),f2vt(0),
+ f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0),
+ f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0), f2vt(1),f2vt(0),f2vt(0),
+
+ f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0),
+ f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0), f2vt(0),f2vt(-1),f2vt(0),
+ f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0),
+ f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0), f2vt(0),f2vt(1),f2vt(0)
+ };
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glNormalPointer(q_vertexTypeEnum,0,afNormals);
+
+ glDrawArrays(GL_TRIANGLES, 0, 36);
+}
+
+void GLWidget::initializeGL ()
+{
+ q_glClearColor(f2vt(0.1f), f2vt(0.1f), f2vt(0.2f), f2vt(1.0f));
+
+ glEnable(GL_TEXTURE_2D);
+ glGenTextures(1, &m_uiTexture);
+ m_uiTexture = bindTexture(QImage(":/qt.png"));
+
+ q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+
+ q_vertexType aLightPosition[] = {f2vt(0.0f),f2vt(0.3f),f2vt(1.0f),f2vt(0.0f)};
+
+ q_glLightv(GL_LIGHT0, GL_SPOT_DIRECTION, aLightPosition);
+ m_fAngle = 0;
+ m_fScale = 1;
+ createGeometry();
+ createBubbles(bubbleNum - bubbles.count());
+}
+
+void GLWidget::paintGL()
+{
+ createBubbles(bubbleNum - bubbles.count());
+
+//! [3]
+ QPainter painter;
+ painter.begin(this);
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+//! [3]
+
+//! [4]
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+
+ //Since OpenGL ES does not support glPush/PopAttrib(GL_ALL_ATTRIB_BITS)
+ //we have to take care of the states ourselves
+
+ q_glClearColor(f2vt(0.1f), f2vt(0.1f), f2vt(0.2f), f2vt(1.0f));
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glEnable(GL_TEXTURE_2D);
+
+ q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ q_glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+
+ glShadeModel(GL_FLAT);
+ glFrontFace(GL_CW);
+ glCullFace(GL_FRONT);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ q_glRotate(f2vt(m_fAngle), f2vt(0.0), f2vt(1.0), f2vt(0.0));
+ q_glRotate(f2vt(m_fAngle), f2vt(1.0), f2vt(0.0), f2vt(0.0));
+ q_glRotate(f2vt(m_fAngle), f2vt(0.0), f2vt(0.0), f2vt(1.0));
+ q_glScale(f2vt(m_fScale), f2vt(m_fScale),f2vt(m_fScale));
+ q_glTranslate(f2vt(0),f2vt(-0.2),f2vt(0));
+
+ q_vertexType matDiff[] = {f2vt(0.40), f2vt(1.0), f2vt(0.0), f2vt(1.0)};
+ q_glMaterialv(GL_FRONT_AND_BACK, GL_DIFFUSE, matDiff);
+
+ if (qtLogo)
+ paintQtLogo();
+ else
+ paintTexturedCube();
+//! [4]
+
+//![5]
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
+
+ glDisable(GL_LIGHTING);
+ glDisable(GL_LIGHT0);
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+//![5]
+
+//! [6]
+ if (m_showBubbles)
+ foreach (Bubble *bubble, bubbles) {
+ bubble->drawBubble(&painter);
+ }
+//! [6]
+
+//! [7]
+ QString framesPerSecond;
+ framesPerSecond.setNum(frames /(time.elapsed() / 1000.0), 'f', 2);
+
+ painter.setPen(Qt::white);
+
+ painter.drawText(20, 40, framesPerSecond + " fps");
+
+ painter.end();
+//! [7]
+
+//! [8]
+ swapBuffers();
+//! [8]
+
+ QMutableListIterator<Bubble*> iter(bubbles);
+
+ while (iter.hasNext()) {
+ Bubble *bubble = iter.next();
+ bubble->move(rect());
+ }
+ if (!(frames % 100)) {
+ time.start();
+ frames = 0;
+ }
+ m_fAngle += 1.0f;
+ frames ++;
+}
+
+void GLWidget::createBubbles(int number)
+{
+ for (int i = 0; i < number; ++i) {
+ QPointF position(width()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))),
+ height()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))));
+ qreal radius = qMin(width(), height())*(0.0175 + 0.0875*qrand()/(RAND_MAX+1.0));
+ QPointF velocity(width()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)),
+ height()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)));
+
+ bubbles.append(new Bubble(position, radius, velocity));
+ }
+}
+
+void GLWidget::createGeometry()
+{
+ vertices.clear();
+ normals.clear();
+
+ qreal x1 = +0.06f;
+ qreal y1 = -0.14f;
+ qreal x2 = +0.14f;
+ qreal y2 = -0.06f;
+ qreal x3 = +0.08f;
+ qreal y3 = +0.00f;
+ qreal x4 = +0.30f;
+ qreal y4 = +0.22f;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const qreal Pi = 3.14159f;
+ const int NumSectors = 100;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ qreal angle1 = (i * 2 * Pi) / NumSectors;
+ qreal x5 = 0.30 * sin(angle1);
+ qreal y5 = 0.30 * cos(angle1);
+ qreal x6 = 0.20 * sin(angle1);
+ qreal y6 = 0.20 * cos(angle1);
+
+ qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ qreal x7 = 0.20 * sin(angle2);
+ qreal y7 = 0.20 * cos(angle2);
+ qreal x8 = 0.30 * sin(angle2);
+ qreal y8 = 0.30 * cos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+//! [1]
+ m_vertexNumber = vertices.size();
+ createdVertices = new q_vertexType[m_vertexNumber];
+ createdNormals = new q_vertexType[m_vertexNumber];
+ for (int i = 0;i < m_vertexNumber;i++) {
+ createdVertices[i] = f2vt(vertices.at(i) * 2);
+ createdNormals[i] = f2vt(normals.at(i));
+ }
+ vertices.clear();
+ normals.clear();
+}
+//! [1]
+
+//! [0]
+void GLWidget::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
+{
+ qreal nx, ny, nz;
+
+ vertices << x1 << y1 << -0.05f;
+ vertices << x2 << y2 << -0.05f;
+ vertices << x4 << y4 << -0.05f;
+
+ vertices << x3 << y3 << -0.05f;
+ vertices << x4 << y4 << -0.05f;
+ vertices << x2 << y2 << -0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0, x4 - x1, y4 - y1, 0);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ vertices << x4 << y4 << 0.05f;
+ vertices << x2 << y2 << 0.05f;
+ vertices << x1 << y1 << 0.05f;
+
+ vertices << x2 << y2 << 0.05f;
+ vertices << x4 << y4 << 0.05f;
+ vertices << x3 << y3 << 0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x4, y2 - y4, 0, x1 - x4, y1 - y4, 0);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+}
+//! [0]
+
+void GLWidget::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
+{
+ qreal nx, ny, nz;
+
+ vertices << x1 << y1 << +0.05f;
+ vertices << x2 << y2 << +0.05f;
+ vertices << x1 << y1 << -0.05f;
+
+ vertices << x2 << y2 << -0.05f;
+ vertices << x1 << y1 << -0.05f;
+ vertices << x2 << y2 << +0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0.0f, 0.0f, 0.0f, -0.1f);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+}
diff --git a/examples/opengl/hellogl_es/glwidget.h b/examples/opengl/hellogl_es/glwidget.h
new file mode 100644
index 0000000..954342e
--- /dev/null
+++ b/examples/opengl/hellogl_es/glwidget.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+#include <QTime>
+
+#include "cl_helper.h"
+
+
+class Bubble;
+class GLWidget : public QGLWidget {
+
+ Q_OBJECT
+public:
+ GLWidget(QWidget *parent = 0);
+ ~GLWidget();
+public slots:
+ void setScaling(int scale);
+ void setLogo();
+ void setTexture();
+ void showBubbles(bool);
+protected:
+ void paintGL ();
+ void initializeGL ();
+private:
+ GLuint m_uiTexture;
+ qreal m_fAngle;
+ qreal m_fScale;
+ bool m_showBubbles;
+ void paintTexturedCube();
+ void paintQtLogo();
+ void createGeometry();
+ void createBubbles(int number);
+ void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
+ void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
+ QList<qreal> vertices;
+ QList<qreal> normals;
+ q_vertexType *createdVertices;
+ q_vertexType *createdNormals;
+ int m_vertexNumber;
+ bool qtLogo;
+ QList<Bubble*> bubbles;
+ int frames;
+ QTime time;
+};
+#endif
diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro
new file mode 100644
index 0000000..7459456
--- /dev/null
+++ b/examples/opengl/hellogl_es/hellogl_es.pro
@@ -0,0 +1,34 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Oct 4 19:01:12 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+SOURCES += glwidget.cpp
+SOURCES += mainwindow.cpp
+SOURCES += bubble.cpp
+
+HEADERS += glwidget.h
+HEADERS += mainwindow.h
+HEADERS += bubble.h
+
+RESOURCES += texture.qrc
+QT += opengl
+
+contains(QT_CONFIG,opengles1) {
+ QMAKE_LIBS += "libGLES_CM.lib"
+}
+contains(QT_CONFIG,opengles1cl) {
+ QMAKE_LIBS += "libGLES_CL.lib"
+}
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es
+INSTALLS += target sources
diff --git a/examples/opengl/hellogl_es/main.cpp b/examples/opengl/hellogl_es/main.cpp
new file mode 100644
index 0000000..feff054
--- /dev/null
+++ b/examples/opengl/hellogl_es/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMainWindow>
+#include "mainwindow.h"
+
+int main( int argc, char ** argv )
+{
+ Q_INIT_RESOURCE(texture);
+ QApplication a( argc, argv );
+ MainWindow mw;
+ mw.showMaximized();
+ return a.exec();
+}
diff --git a/examples/opengl/hellogl_es/mainwindow.cpp b/examples/opengl/hellogl_es/mainwindow.cpp
new file mode 100644
index 0000000..26fbeaa
--- /dev/null
+++ b/examples/opengl/hellogl_es/mainwindow.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QApplication>
+#include <QMenuBar>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QSlider>
+#include <QLabel>
+#include <QTimer>
+
+#include "glwidget.h"
+
+MainWindow::MainWindow()
+{
+ GLWidget *glwidget = new GLWidget();
+ QLabel *label = new QLabel(this);
+ QTimer *timer = new QTimer(this);
+ QSlider *slider = new QSlider(this);
+ slider->setOrientation(Qt::Horizontal);
+
+ slider->setRange(0, 100);
+ slider->setSliderPosition(50);
+ timer->setInterval(10);
+ label->setText("A QGlWidget with OpenGl ES");
+ label->setAlignment(Qt::AlignHCenter);
+
+ QGroupBox * groupBox = new QGroupBox(this);
+ setCentralWidget(groupBox);
+ groupBox->setTitle("OpenGL ES Example");
+
+ QGridLayout *layout = new QGridLayout(groupBox);
+
+ layout->addWidget(glwidget,1,0,8,1);
+ layout->addWidget(label,9,0,1,1);
+ layout->addWidget(slider, 11,0,1,1);
+
+ groupBox->setLayout(layout);
+
+ QMenu *fileMenu = new QMenu("File");
+ QMenu *helpMenu = new QMenu("Help");
+ QMenu *showMenu = new QMenu("Show");
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(showMenu);
+ menuBar()->addMenu(helpMenu);
+ QAction *exit = new QAction("Exit", fileMenu);
+ QAction *aboutQt = new QAction("AboutQt", helpMenu);
+ QAction *showLogo = new QAction("Show 3D Logo", showMenu);
+ QAction *showTexture = new QAction("Show 2D Texture", showMenu);
+ QAction *showBubbles = new QAction("Show bubbles", showMenu);
+ showBubbles->setCheckable(true);
+ showBubbles->setChecked(true);
+ fileMenu->addAction(exit);
+ helpMenu->addAction(aboutQt);
+ showMenu->addAction(showLogo);
+ showMenu->addAction(showTexture);
+ showMenu->addAction(showBubbles);
+
+ QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL()));
+ QObject::connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
+ QObject::connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
+
+ QObject::connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
+ QObject::connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
+ QObject::connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(showBubbles(bool)));
+ QObject::connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
+ timer->start();
+}
diff --git a/examples/opengl/hellogl_es/mainwindow.h b/examples/opengl/hellogl_es/mainwindow.h
new file mode 100644
index 0000000..72b723c
--- /dev/null
+++ b/examples/opengl/hellogl_es/mainwindow.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class QSlider;
+class GLWidget;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+};
+
+#endif
diff --git a/examples/opengl/hellogl_es/qt.png b/examples/opengl/hellogl_es/qt.png
new file mode 100644
index 0000000..79e383c
--- /dev/null
+++ b/examples/opengl/hellogl_es/qt.png
Binary files differ
diff --git a/examples/opengl/hellogl_es/texture.qrc b/examples/opengl/hellogl_es/texture.qrc
new file mode 100644
index 0000000..ff1d0e5
--- /dev/null
+++ b/examples/opengl/hellogl_es/texture.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>qt.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/hellogl_es2/bubble.cpp b/examples/opengl/hellogl_es2/bubble.cpp
new file mode 100644
index 0000000..691d314
--- /dev/null
+++ b/examples/opengl/hellogl_es2/bubble.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "bubble.h"
+
+Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
+ : position(position), vel(velocity), radius(radius)
+{
+ innerColor = randomColor();
+ outerColor = randomColor();
+ cache = 0;
+ updateBrush();
+}
+
+//! [0]
+void Bubble::updateCache()
+{
+ if (cache)
+ delete cache;
+ cache = new QImage(qRound(radius * 2 + 2), qRound(radius * 2 + 2), QImage::Format_ARGB32);
+ cache->fill(0x00000000);
+ QPainter p(cache);
+ p.setRenderHint(QPainter::HighQualityAntialiasing);
+ QPen pen(Qt::white);
+ pen.setWidth(2);
+ p.setPen(pen);
+ p.setBrush(brush);
+ p.drawEllipse(0, 0, int(2*radius), int(2*radius));
+}
+//! [0]
+
+Bubble::~Bubble()
+{
+ if (cache)
+ delete cache;
+}
+
+void Bubble::updateBrush()
+{
+ QRadialGradient gradient(QPointF(radius, radius), radius,
+ QPointF(radius*0.5, radius*0.5));
+
+ gradient.setColorAt(0, QColor(255, 255, 255, 255));
+ gradient.setColorAt(0.25, innerColor);
+ gradient.setColorAt(1, outerColor);
+ brush = QBrush(gradient);
+ updateCache();
+}
+
+//! [1]
+void Bubble::drawBubble(QPainter *painter)
+{
+ painter->save();
+ painter->translate(position.x() - radius, position.y() - radius);
+ painter->setOpacity(0.8);
+ painter->drawImage(0, 0, *cache);
+ painter->restore();
+}
+//! [1]
+
+QColor Bubble::randomColor()
+{
+ int red = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
+ int green = int(185 + 70.0*qrand()/(RAND_MAX+1.0));
+ int blue = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
+ int alpha = int(91 + 100.0*qrand()/(RAND_MAX+1.0));
+
+ return QColor(red, green, blue, alpha);
+}
+
+void Bubble::move(const QRect &bbox)
+{
+ position += vel;
+ qreal leftOverflow = position.x() - radius - bbox.left();
+ qreal rightOverflow = position.x() + radius - bbox.right();
+ qreal topOverflow = position.y() - radius - bbox.top();
+ qreal bottomOverflow = position.y() + radius - bbox.bottom();
+
+ if (leftOverflow < 0.0) {
+ position.setX(position.x() - 2 * leftOverflow);
+ vel.setX(-vel.x());
+ } else if (rightOverflow > 0.0) {
+ position.setX(position.x() - 2 * rightOverflow);
+ vel.setX(-vel.x());
+ }
+
+ if (topOverflow < 0.0) {
+ position.setY(position.y() - 2 * topOverflow);
+ vel.setY(-vel.y());
+ } else if (bottomOverflow > 0.0) {
+ position.setY(position.y() - 2 * bottomOverflow);
+ vel.setY(-vel.y());
+ }
+}
+
+QRectF Bubble::rect()
+{
+ return QRectF(position.x() - radius, position.y() - radius,
+ 2 * radius, 2 * radius);
+}
diff --git a/examples/opengl/hellogl_es2/bubble.h b/examples/opengl/hellogl_es2/bubble.h
new file mode 100644
index 0000000..a32754f
--- /dev/null
+++ b/examples/opengl/hellogl_es2/bubble.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BUBBLE_H
+#define BUBBLE_H
+
+#include <QBrush>
+#include <QColor>
+#include <QPointF>
+#include <QRect>
+#include <QRectF>
+
+class QPainter;
+
+class Bubble
+{
+public:
+ Bubble(const QPointF &position, qreal radius, const QPointF &velocity);
+ ~Bubble();
+
+ void drawBubble(QPainter *painter);
+ void updateBrush();
+ void move(const QRect &bbox);
+ void updateCache();
+ QRectF rect();
+
+private:
+ QColor randomColor();
+
+ QBrush brush;
+ QPointF position;
+ QPointF vel;
+ qreal radius;
+ QColor innerColor;
+ QColor outerColor;
+ QImage *cache;
+};
+
+#endif
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp
new file mode 100644
index 0000000..213c5b2
--- /dev/null
+++ b/examples/opengl/hellogl_es2/glwidget.cpp
@@ -0,0 +1,642 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glwidget.h"
+#include <QPainter>
+#include <math.h>
+
+#include "bubble.h"
+
+
+const int bubbleNum = 8;
+
+inline void CrossProduct(qreal &xOut, qreal &yOut, qreal &zOut, qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2)
+{
+ xOut = y1 * z2 - z1 * y2;
+ yOut = z1 * x2 - x1 * z2;
+ zOut = x1 * y2 - y1 * x2;
+}
+
+inline void Normalize(qreal &x, qreal &y, qreal &z)
+{
+ qreal l = sqrt(x*x + y*y + z*z);
+ x = x / l;
+ y = y / l;
+ z = z / l;
+}
+
+inline void IdentityMatrix(GLfloat *m)
+{
+ m[0 * 4 + 0] = 1.0f;
+ m[1 * 4 + 0] = 0.0f;
+ m[2 * 4 + 0] = 0.0f;
+ m[3 * 4 + 0] = 0.0f;
+ m[0 * 4 + 1] = 0.0f;
+ m[1 * 4 + 1] = 1.0f;
+ m[2 * 4 + 1] = 0.0f;
+ m[3 * 4 + 1] = 0.0f;
+ m[0 * 4 + 2] = 0.0f;
+ m[1 * 4 + 2] = 0.0f;
+ m[2 * 4 + 2] = 1.0f;
+ m[3 * 4 + 2] = 0.0f;
+ m[0 * 4 + 3] = 0.0f;
+ m[1 * 4 + 3] = 0.0f;
+ m[2 * 4 + 3] = 0.0f;
+ m[3 * 4 + 3] = 1.0f;
+}
+
+// Adjust a 4x4 matrix to apply a scale.
+inline void ScaleMatrix(GLfloat *m, GLfloat scalex, GLfloat scaley, GLfloat scalez)
+{
+ m[0 * 4 + 0] *= scalex;
+ m[0 * 4 + 1] *= scalex;
+ m[0 * 4 + 2] *= scalex;
+ m[0 * 4 + 3] *= scalex;
+ m[1 * 4 + 0] *= scaley;
+ m[1 * 4 + 1] *= scaley;
+ m[1 * 4 + 2] *= scaley;
+ m[1 * 4 + 3] *= scaley;
+ m[2 * 4 + 0] *= scalez;
+ m[2 * 4 + 1] *= scalez;
+ m[2 * 4 + 2] *= scalez;
+ m[2 * 4 + 3] *= scalez;
+}
+
+// Adjust a 4x4 matrix to apply a translation.
+inline void TranslateMatrix(GLfloat *m, GLfloat translatex, GLfloat translatey, GLfloat translatez)
+{
+ m[3 * 4 + 0] += m[0 * 4 + 0] * translatex + m[1 * 4 + 0] * translatey + m[2 * 4 + 0] * translatez;
+ m[3 * 4 + 1] += m[0 * 4 + 1] * translatex + m[1 * 4 + 1] * translatey + m[2 * 4 + 1] * translatez;
+ m[3 * 4 + 2] += m[0 * 4 + 2] * translatex + m[1 * 4 + 2] * translatey + m[2 * 4 + 2] * translatez;
+ m[3 * 4 + 3] += m[0 * 4 + 3] * translatex + m[1 * 4 + 3] * translatey + m[2 * 4 + 3] * translatez;
+}
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+// Adjust a 4x4 matrix to apply a rotation.
+inline void RotateMatrix(GLfloat *m, GLfloat angle, GLfloat vx, GLfloat vy, GLfloat vz)
+{
+ GLfloat len = sqrt(vx * vx + vy * vy + vz * vz);
+ if (len != 0) {
+ vx /= len;
+ vy /= len;
+ vz /= len;
+ }
+
+ GLfloat c, s, ic;
+ c = cos(angle * M_PI / 180.0);
+ s = sin(angle * M_PI / 180.0);
+ ic = 1.0f - c;
+
+ GLfloat rot[16];
+ rot[0 * 4 + 0] = vx * vx * ic + c;
+ rot[1 * 4 + 0] = vx * vy * ic - vz * s;
+ rot[2 * 4 + 0] = vx * vz * ic + vy * s;
+ rot[3 * 4 + 0] = 0.0f;
+ rot[0 * 4 + 1] = vy * vx * ic + vz * s;
+ rot[1 * 4 + 1] = vy * vy * ic + c;
+ rot[2 * 4 + 1] = vy * vz * ic - vx * s;
+ rot[3 * 4 + 1] = 0.0f;
+ rot[0 * 4 + 2] = vx * vz * ic - vy * s;
+ rot[1 * 4 + 2] = vy * vz * ic + vx * s;
+ rot[2 * 4 + 2] = vz * vz * ic + c;
+ rot[3 * 4 + 2] = 0.0f;
+ rot[0 * 4 + 3] = 0.0f;
+ rot[1 * 4 + 3] = 0.0f;
+ rot[2 * 4 + 3] = 0.0f;
+ rot[3 * 4 + 3] = 1.0f;
+
+ GLfloat temp[16];
+ for (int i = 0; i < 4; ++i) {
+ for (int j = 0; j < 4; ++j) {
+ temp[j * 4 + i] = 0.0f;
+ for (int k = 0; k < 4; ++k) {
+ temp[j * 4 + i] += m[k * 4 + i] * rot[j * 4 + k];
+ }
+ }
+ }
+
+ qMemCopy(m, temp, sizeof(temp));
+}
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(parent)
+{
+ qtLogo = true;
+ createdVertices = 0;
+ createdNormals = 0;
+ m_vertexNumber = 0;
+ frames = 0;
+ setAttribute(Qt::WA_PaintOnScreen);
+ setAttribute(Qt::WA_NoSystemBackground);
+ setAutoBufferSwap(false);
+ m_showBubbles = true;
+#ifndef Q_WS_QWS
+ setMinimumSize(300, 250);
+#endif
+}
+
+GLWidget::~GLWidget()
+{
+ if (createdVertices)
+ delete[] createdVertices;
+ if (createdNormals)
+ delete[] createdNormals;
+}
+
+void GLWidget::setScaling(int scale) {
+
+ if (scale > 50)
+ m_fScale = 1 + qreal(scale -50) / 50 * 0.5;
+ else if (scale < 50)
+ m_fScale = 1- (qreal(50 - scale) / 50 * 1/2);
+ else
+ m_fScale = 1;
+}
+
+void GLWidget::setLogo() {
+ qtLogo = true;
+}
+
+void GLWidget::setTexture() {
+ qtLogo = false;
+}
+
+void GLWidget::showBubbles(bool bubbles)
+{
+ m_showBubbles = bubbles;
+}
+
+void GLWidget::paintQtLogo()
+{
+ glDisable(GL_TEXTURE_2D);
+ glVertexAttribPointer(vertexAttr1, 3, GL_FLOAT, GL_FALSE, 0, createdVertices);
+ glEnableVertexAttribArray(vertexAttr1);
+ glVertexAttribPointer(normalAttr1, 3, GL_FLOAT, GL_FALSE, 0, createdNormals);
+ glEnableVertexAttribArray(normalAttr1);
+ glDrawArrays(GL_TRIANGLES, 0, m_vertexNumber / 3);
+ glDisableVertexAttribArray(normalAttr1);
+ glDisableVertexAttribArray(vertexAttr1);
+}
+
+void GLWidget::paintTexturedCube()
+{
+ glEnable(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, m_uiTexture);
+ GLfloat afVertices[] = {
+ -0.5, 0.5, 0.5, 0.5,-0.5,0.5,-0.5,-0.5,0.5,
+ 0.5, -0.5, 0.5, -0.5,0.5,0.5,0.5,0.5,0.5,
+ -0.5, -0.5, -0.5, 0.5,-0.5,-0.5,-0.5,0.5,-0.5,
+ 0.5, 0.5, -0.5, -0.5,0.5,-0.5,0.5,-0.5,-0.5,
+
+ 0.5, -0.5, -0.5, 0.5,-0.5,0.5,0.5,0.5,-0.5,
+ 0.5, 0.5, 0.5, 0.5,0.5,-0.5,0.5,-0.5,0.5,
+ -0.5, 0.5, -0.5, -0.5,-0.5,0.5,-0.5,-0.5,-0.5,
+ -0.5, -0.5, 0.5, -0.5,0.5,-0.5,-0.5,0.5,0.5,
+
+ 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5,
+ -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5,
+ -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5,
+ 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5
+ };
+ glVertexAttribPointer(vertexAttr2, 3, GL_FLOAT, GL_FALSE, 0, afVertices);
+ glEnableVertexAttribArray(vertexAttr2);
+
+ GLfloat afTexCoord[] = {
+ 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
+ 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
+ 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
+ 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
+
+ 1.0f,1.0f, 1.0f,0.0f, 0.0f,1.0f,
+ 0.0f,0.0f, 0.0f,1.0f, 1.0f,0.0f,
+ 0.0f,0.0f, 1.0f,1.0f, 1.0f,0.0f,
+ 1.0f,1.0f, 0.0f,0.0f, 0.0f,1.0f,
+
+ 0.0f,1.0f, 1.0f,0.0f, 1.0f,1.0f,
+ 1.0f,0.0f, 0.0f,1.0f, 0.0f,0.0f,
+ 1.0f,0.0f, 1.0f,1.0f, 0.0f,0.0f,
+ 0.0f,1.0f, 0.0f,0.0f, 1.0f,1.0f
+ };
+ glVertexAttribPointer(texCoordAttr2, 2, GL_FLOAT, GL_FALSE, 0, afTexCoord);
+ glEnableVertexAttribArray(texCoordAttr2);
+
+ GLfloat afNormals[] = {
+
+ 0,0,-1, 0,0,-1, 0,0,-1,
+ 0,0,-1, 0,0,-1, 0,0,-1,
+ 0,0,1, 0,0,1, 0,0,1,
+ 0,0,1, 0,0,1, 0,0,1,
+
+ -1,0,0, -1,0,0, -1,0,0,
+ -1,0,0, -1,0,0, -1,0,0,
+ 1,0,0, 1,0,0, 1,0,0,
+ 1,0,0, 1,0,0, 1,0,0,
+
+ 0,-1,0, 0,-1,0, 0,-1,0,
+ 0,-1,0, 0,-1,0, 0,-1,0,
+ 0,1,0, 0,1,0, 0,1,0,
+ 0,1,0, 0,1,0, 0,1,0
+ };
+ glVertexAttribPointer(normalAttr2, 3, GL_FLOAT, GL_FALSE, 0, afNormals);
+ glEnableVertexAttribArray(normalAttr2);
+
+ glUniform1i(textureUniform2, 0); // use texture unit 0
+
+ glDrawArrays(GL_TRIANGLES, 0, 36);
+
+ glDisableVertexAttribArray(vertexAttr2);
+ glDisableVertexAttribArray(normalAttr2);
+ glDisableVertexAttribArray(texCoordAttr2);
+}
+
+static void reportCompileErrors(GLuint shader, const char *src)
+{
+ GLint value = 0;
+ glGetShaderiv(shader, GL_COMPILE_STATUS, &value);
+ bool compiled = (value != 0);
+ value = 0;
+ glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &value);
+ if (!compiled && value > 1) {
+ char *log = new char [value];
+ GLint len;
+ glGetShaderInfoLog(shader, value, &len, log);
+ qWarning("%s\n", log);
+ qWarning("when compiling:\n%s\n", src);
+ delete [] log;
+ }
+}
+
+static void reportLinkErrors(GLuint program, const char *vsrc, const char *fsrc)
+{
+ GLint value = 0;
+ glGetProgramiv(program, GL_LINK_STATUS, &value);
+ bool linked = (value != 0);
+ value = 0;
+ glGetProgramiv(program, GL_INFO_LOG_LENGTH, &value);
+ if (!linked && value > 1) {
+ char *log = new char [value];
+ GLint len;
+ glGetProgramInfoLog(program, value, &len, log);
+ qWarning("%s\n", log);
+ qWarning("when linking:\n%s\nwith:\n%s\n", vsrc, fsrc);
+ delete [] log;
+ }
+}
+
+void GLWidget::initializeGL ()
+{
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+
+ glEnable(GL_TEXTURE_2D);
+ glGenTextures(1, &m_uiTexture);
+ m_uiTexture = bindTexture(QImage(":/qt.png"));
+
+ GLuint vshader1 = glCreateShader(GL_VERTEX_SHADER);
+ const char *vsrc1[1] = {
+ "attribute highp vec4 vertex;\n"
+ "attribute mediump vec3 normal;\n"
+ "uniform mediump mat4 matrix;\n"
+ "varying mediump vec4 color;\n"
+ "void main(void)\n"
+ "{\n"
+ " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));\n"
+ " float angle = max(dot(normal, toLight), 0.0);\n"
+ " vec3 col = vec3(0.40, 1.0, 0.0);\n"
+ " color = vec4(col * 0.2 + col * 0.8 * angle, 1.0);\n"
+ " color = clamp(color, 0.0, 1.0);\n"
+ " gl_Position = matrix * vertex;\n"
+ "}\n"
+ };
+ glShaderSource(vshader1, 1, vsrc1, 0);
+ glCompileShader(vshader1);
+ reportCompileErrors(vshader1, vsrc1[0]);
+
+ GLuint fshader1 = glCreateShader(GL_FRAGMENT_SHADER);
+ const char *fsrc1[1] = {
+ "varying mediump vec4 color;\n"
+ "void main(void)\n"
+ "{\n"
+ " gl_FragColor = color;\n"
+ "}\n"
+ };
+ glShaderSource(fshader1, 1, fsrc1, 0);
+ glCompileShader(fshader1);
+ reportCompileErrors(fshader1, fsrc1[0]);
+
+ program1 = glCreateProgram();
+ glAttachShader(program1, vshader1);
+ glAttachShader(program1, fshader1);
+ glLinkProgram(program1);
+ reportLinkErrors(program1, vsrc1[0], fsrc1[0]);
+
+ vertexAttr1 = glGetAttribLocation(program1, "vertex");
+ normalAttr1 = glGetAttribLocation(program1, "normal");
+ matrixUniform1 = glGetUniformLocation(program1, "matrix");
+
+ GLuint vshader2 = glCreateShader(GL_VERTEX_SHADER);
+ const char *vsrc2[1] = {
+ "attribute highp vec4 vertex;\n"
+ "attribute highp vec4 texCoord;\n"
+ "attribute mediump vec3 normal;\n"
+ "uniform mediump mat4 matrix;\n"
+ "varying highp vec4 texc;\n"
+ "varying mediump float angle;\n"
+ "void main(void)\n"
+ "{\n"
+ " vec3 toLight = normalize(vec3(0.0, 0.3, 1.0));\n"
+ " angle = max(dot(normal, toLight), 0.0);\n"
+ " gl_Position = matrix * vertex;\n"
+ " texc = texCoord;\n"
+ "}\n"
+ };
+ glShaderSource(vshader2, 1, vsrc2, 0);
+ glCompileShader(vshader2);
+ reportCompileErrors(vshader2, vsrc2[0]);
+
+ GLuint fshader2 = glCreateShader(GL_FRAGMENT_SHADER);
+ const char *fsrc2[1] = {
+ "varying highp vec4 texc;\n"
+ "uniform sampler2D tex;\n"
+ "varying mediump float angle;\n"
+ "void main(void)\n"
+ "{\n"
+ " highp vec3 color = texture2D(tex, texc.st).rgb;\n"
+ " color = color * 0.2 + color * 0.8 * angle;\n"
+ " gl_FragColor = vec4(clamp(color, 0.0, 1.0), 1.0);\n"
+ "}\n"
+ };
+ glShaderSource(fshader2, 1, fsrc2, 0);
+ glCompileShader(fshader2);
+ reportCompileErrors(fshader2, fsrc2[0]);
+
+ program2 = glCreateProgram();
+ glAttachShader(program2, vshader2);
+ glAttachShader(program2, fshader2);
+ glLinkProgram(program2);
+ reportLinkErrors(program2, vsrc2[0], fsrc2[0]);
+
+ vertexAttr2 = glGetAttribLocation(program2, "vertex");
+ normalAttr2 = glGetAttribLocation(program2, "normal");
+ texCoordAttr2 = glGetAttribLocation(program2, "texCoord");
+ matrixUniform2 = glGetUniformLocation(program2, "matrix");
+ textureUniform2 = glGetUniformLocation(program2, "tex");
+
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+
+ m_fAngle = 0;
+ m_fScale = 1;
+ createGeometry();
+ createBubbles(bubbleNum - bubbles.count());
+}
+
+void GLWidget::paintGL()
+{
+ createBubbles(bubbleNum - bubbles.count());
+
+ QPainter painter;
+ painter.begin(this);
+
+ glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glEnable(GL_TEXTURE_2D);
+
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+
+ glFrontFace(GL_CW);
+ glCullFace(GL_FRONT);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_DEPTH_TEST);
+
+ GLfloat modelview[16];
+ IdentityMatrix(modelview);
+ RotateMatrix(modelview, m_fAngle, 0.0, 1.0, 0.0);
+ RotateMatrix(modelview, m_fAngle, 1.0, 0.0, 0.0);
+ RotateMatrix(modelview, m_fAngle, 0.0, 0.0, 1.0);
+ ScaleMatrix(modelview, m_fScale, m_fScale, m_fScale);
+ TranslateMatrix(modelview, 0, -0.2, 0);
+
+ if (qtLogo) {
+ glUseProgram(program1);
+ glUniformMatrix4fv(matrixUniform1, 1, GL_FALSE, modelview);
+ paintQtLogo();
+ glUseProgram(0);
+ } else {
+ glUseProgram(program2);
+ glUniformMatrix4fv(matrixUniform2, 1, GL_FALSE, modelview);
+ paintTexturedCube();
+ glUseProgram(0);
+ }
+
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_CULL_FACE);
+
+ if (m_showBubbles)
+ foreach (Bubble *bubble, bubbles) {
+ bubble->drawBubble(&painter);
+ }
+
+ QString framesPerSecond;
+ framesPerSecond.setNum(frames /(time.elapsed() / 1000.0), 'f', 2);
+
+ painter.setPen(Qt::white);
+
+ painter.drawText(20, 40, framesPerSecond + " fps");
+
+ painter.end();
+
+ swapBuffers();
+
+ QMutableListIterator<Bubble*> iter(bubbles);
+
+ while (iter.hasNext()) {
+ Bubble *bubble = iter.next();
+ bubble->move(rect());
+ }
+ if (!(frames % 100)) {
+ time.start();
+ frames = 0;
+ }
+ m_fAngle += 1.0f;
+ frames ++;
+}
+
+void GLWidget::createBubbles(int number)
+{
+ for (int i = 0; i < number; ++i) {
+ QPointF position(width()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))),
+ height()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))));
+ qreal radius = qMin(width(), height())*(0.0175 + 0.0875*qrand()/(RAND_MAX+1.0));
+ QPointF velocity(width()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)),
+ height()*0.0175*(-0.5 + qrand()/(RAND_MAX+1.0)));
+
+ bubbles.append(new Bubble(position, radius, velocity));
+ }
+}
+
+void GLWidget::createGeometry()
+{
+ vertices.clear();
+ normals.clear();
+
+ qreal x1 = +0.06f;
+ qreal y1 = -0.14f;
+ qreal x2 = +0.14f;
+ qreal y2 = -0.06f;
+ qreal x3 = +0.08f;
+ qreal y3 = +0.00f;
+ qreal x4 = +0.30f;
+ qreal y4 = +0.22f;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const qreal Pi = 3.14159f;
+ const int NumSectors = 100;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ qreal angle1 = (i * 2 * Pi) / NumSectors;
+ qreal x5 = 0.30 * sin(angle1);
+ qreal y5 = 0.30 * cos(angle1);
+ qreal x6 = 0.20 * sin(angle1);
+ qreal y6 = 0.20 * cos(angle1);
+
+ qreal angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ qreal x7 = 0.20 * sin(angle2);
+ qreal y7 = 0.20 * cos(angle2);
+ qreal x8 = 0.30 * sin(angle2);
+ qreal y8 = 0.30 * cos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+ m_vertexNumber = vertices.size();
+ createdVertices = new GLfloat[m_vertexNumber];
+ createdNormals = new GLfloat[m_vertexNumber];
+ for (int i = 0;i < m_vertexNumber;i++) {
+ createdVertices[i] = vertices.at(i) * 2;
+ createdNormals[i] = normals.at(i);
+ }
+ vertices.clear();
+ normals.clear();
+}
+
+void GLWidget::quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4)
+{
+ qreal nx, ny, nz;
+
+ vertices << x1 << y1 << -0.05f;
+ vertices << x2 << y2 << -0.05f;
+ vertices << x4 << y4 << -0.05f;
+
+ vertices << x3 << y3 << -0.05f;
+ vertices << x4 << y4 << -0.05f;
+ vertices << x2 << y2 << -0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0, x4 - x1, y4 - y1, 0);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ vertices << x4 << y4 << 0.05f;
+ vertices << x2 << y2 << 0.05f;
+ vertices << x1 << y1 << 0.05f;
+
+ vertices << x2 << y2 << 0.05f;
+ vertices << x4 << y4 << 0.05f;
+ vertices << x3 << y3 << 0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x4, y2 - y4, 0, x1 - x4, y1 - y4, 0);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+}
+
+void GLWidget::extrude(qreal x1, qreal y1, qreal x2, qreal y2)
+{
+ qreal nx, ny, nz;
+
+ vertices << x1 << y1 << +0.05f;
+ vertices << x2 << y2 << +0.05f;
+ vertices << x1 << y1 << -0.05f;
+
+ vertices << x2 << y2 << -0.05f;
+ vertices << x1 << y1 << -0.05f;
+ vertices << x2 << y2 << +0.05f;
+
+ CrossProduct(nx, ny, nz, x2 - x1, y2 - y1, 0.0f, 0.0f, 0.0f, -0.1f);
+ Normalize(nx, ny, nz);
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+ normals << nx << ny << nz;
+}
diff --git a/examples/opengl/hellogl_es2/glwidget.h b/examples/opengl/hellogl_es2/glwidget.h
new file mode 100644
index 0000000..9a7823a
--- /dev/null
+++ b/examples/opengl/hellogl_es2/glwidget.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+#include <QTime>
+
+class Bubble;
+class GLWidget : public QGLWidget {
+
+ Q_OBJECT
+public:
+ GLWidget(QWidget *parent = 0);
+ ~GLWidget();
+public slots:
+ void setScaling(int scale);
+ void setLogo();
+ void setTexture();
+ void showBubbles(bool);
+protected:
+ void paintGL ();
+ void initializeGL ();
+private:
+ GLuint m_uiTexture;
+ qreal m_fAngle;
+ qreal m_fScale;
+ bool m_showBubbles;
+ void paintTexturedCube();
+ void paintQtLogo();
+ void createGeometry();
+ void createBubbles(int number);
+ void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4);
+ void extrude(qreal x1, qreal y1, qreal x2, qreal y2);
+ QList<qreal> vertices;
+ QList<qreal> normals;
+ GLfloat *createdVertices;
+ GLfloat *createdNormals;
+ int m_vertexNumber;
+ bool qtLogo;
+ QList<Bubble*> bubbles;
+ int frames;
+ QTime time;
+ GLuint program1;
+ GLuint program2;
+ GLuint vertexAttr1;
+ GLuint normalAttr1;
+ GLuint matrixUniform1;
+ GLuint vertexAttr2;
+ GLuint normalAttr2;
+ GLuint texCoordAttr2;
+ GLuint matrixUniform2;
+ GLuint textureUniform2;
+};
+#endif
diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro
new file mode 100644
index 0000000..92b4224
--- /dev/null
+++ b/examples/opengl/hellogl_es2/hellogl_es2.pro
@@ -0,0 +1,27 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Oct 4 19:01:12 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+SOURCES += glwidget.cpp
+SOURCES += mainwindow.cpp
+SOURCES += bubble.cpp
+
+HEADERS += glwidget.h
+HEADERS += mainwindow.h
+HEADERS += bubble.h
+
+RESOURCES += texture.qrc
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es2
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es2.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es2
+INSTALLS += target sources
diff --git a/examples/opengl/hellogl_es2/main.cpp b/examples/opengl/hellogl_es2/main.cpp
new file mode 100644
index 0000000..feff054
--- /dev/null
+++ b/examples/opengl/hellogl_es2/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMainWindow>
+#include "mainwindow.h"
+
+int main( int argc, char ** argv )
+{
+ Q_INIT_RESOURCE(texture);
+ QApplication a( argc, argv );
+ MainWindow mw;
+ mw.showMaximized();
+ return a.exec();
+}
diff --git a/examples/opengl/hellogl_es2/mainwindow.cpp b/examples/opengl/hellogl_es2/mainwindow.cpp
new file mode 100644
index 0000000..26fbeaa
--- /dev/null
+++ b/examples/opengl/hellogl_es2/mainwindow.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QApplication>
+#include <QMenuBar>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QSlider>
+#include <QLabel>
+#include <QTimer>
+
+#include "glwidget.h"
+
+MainWindow::MainWindow()
+{
+ GLWidget *glwidget = new GLWidget();
+ QLabel *label = new QLabel(this);
+ QTimer *timer = new QTimer(this);
+ QSlider *slider = new QSlider(this);
+ slider->setOrientation(Qt::Horizontal);
+
+ slider->setRange(0, 100);
+ slider->setSliderPosition(50);
+ timer->setInterval(10);
+ label->setText("A QGlWidget with OpenGl ES");
+ label->setAlignment(Qt::AlignHCenter);
+
+ QGroupBox * groupBox = new QGroupBox(this);
+ setCentralWidget(groupBox);
+ groupBox->setTitle("OpenGL ES Example");
+
+ QGridLayout *layout = new QGridLayout(groupBox);
+
+ layout->addWidget(glwidget,1,0,8,1);
+ layout->addWidget(label,9,0,1,1);
+ layout->addWidget(slider, 11,0,1,1);
+
+ groupBox->setLayout(layout);
+
+ QMenu *fileMenu = new QMenu("File");
+ QMenu *helpMenu = new QMenu("Help");
+ QMenu *showMenu = new QMenu("Show");
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(showMenu);
+ menuBar()->addMenu(helpMenu);
+ QAction *exit = new QAction("Exit", fileMenu);
+ QAction *aboutQt = new QAction("AboutQt", helpMenu);
+ QAction *showLogo = new QAction("Show 3D Logo", showMenu);
+ QAction *showTexture = new QAction("Show 2D Texture", showMenu);
+ QAction *showBubbles = new QAction("Show bubbles", showMenu);
+ showBubbles->setCheckable(true);
+ showBubbles->setChecked(true);
+ fileMenu->addAction(exit);
+ helpMenu->addAction(aboutQt);
+ showMenu->addAction(showLogo);
+ showMenu->addAction(showTexture);
+ showMenu->addAction(showBubbles);
+
+ QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL()));
+ QObject::connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
+ QObject::connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
+
+ QObject::connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
+ QObject::connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
+ QObject::connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(showBubbles(bool)));
+ QObject::connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
+ timer->start();
+}
diff --git a/examples/opengl/hellogl_es2/mainwindow.h b/examples/opengl/hellogl_es2/mainwindow.h
new file mode 100644
index 0000000..72b723c
--- /dev/null
+++ b/examples/opengl/hellogl_es2/mainwindow.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class QSlider;
+class GLWidget;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+};
+
+#endif
diff --git a/examples/opengl/hellogl_es2/qt.png b/examples/opengl/hellogl_es2/qt.png
new file mode 100644
index 0000000..79e383c
--- /dev/null
+++ b/examples/opengl/hellogl_es2/qt.png
Binary files differ
diff --git a/examples/opengl/hellogl_es2/texture.qrc b/examples/opengl/hellogl_es2/texture.qrc
new file mode 100644
index 0000000..ff1d0e5
--- /dev/null
+++ b/examples/opengl/hellogl_es2/texture.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>qt.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
new file mode 100644
index 0000000..a4c2a22
--- /dev/null
+++ b/examples/opengl/opengl.pro
@@ -0,0 +1,29 @@
+TEMPLATE = subdirs
+
+contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles1cl)|contains(QT_CONFIG, opengles2){
+ contains(QT_CONFIG, opengles2) {
+ SUBDIRS = hellogl_es2
+ } else {
+ SUBDIRS = hellogl_es
+ }
+} else {
+ SUBDIRS = 2dpainting \
+ grabber \
+ hellogl \
+ overpainting \
+ pbuffers \
+ framebufferobject2 \
+ samplebuffers \
+ textures
+
+ contains(QT_CONFIG, svg) {
+ SUBDIRS += framebufferobject \
+ pbuffers2
+ }
+}
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl
+INSTALLS += target sources
diff --git a/examples/opengl/overpainting/bubble.cpp b/examples/opengl/overpainting/bubble.cpp
new file mode 100644
index 0000000..8bbe9b0
--- /dev/null
+++ b/examples/opengl/overpainting/bubble.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "bubble.h"
+
+Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
+ : position(position), vel(velocity), radius(radius)
+{
+ innerColor = randomColor();
+ outerColor = randomColor();
+ updateBrush();
+}
+
+void Bubble::updateBrush()
+{
+ QRadialGradient gradient(QPointF(radius, radius), radius,
+ QPointF(radius*0.5, radius*0.5));
+
+ gradient.setColorAt(0, QColor(255, 255, 255, 255));
+ gradient.setColorAt(0.25, innerColor);
+ gradient.setColorAt(1, outerColor);
+ brush = QBrush(gradient);
+}
+
+void Bubble::drawBubble(QPainter *painter)
+{
+ painter->save();
+ painter->translate(position.x() - radius, position.y() - radius);
+ painter->setBrush(brush);
+ painter->drawEllipse(0, 0, int(2*radius), int(2*radius));
+ painter->restore();
+}
+
+QColor Bubble::randomColor()
+{
+ int red = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
+ int green = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
+ int blue = int(205 + 50.0*qrand()/(RAND_MAX+1.0));
+ int alpha = int(91 + 100.0*qrand()/(RAND_MAX+1.0));
+
+ return QColor(red, green, blue, alpha);
+}
+
+void Bubble::move(const QRect &bbox)
+{
+ position += vel;
+ qreal leftOverflow = position.x() - radius - bbox.left();
+ qreal rightOverflow = position.x() + radius - bbox.right();
+ qreal topOverflow = position.y() - radius - bbox.top();
+ qreal bottomOverflow = position.y() + radius - bbox.bottom();
+
+ if (leftOverflow < 0.0) {
+ position.setX(position.x() - 2 * leftOverflow);
+ vel.setX(-vel.x());
+ } else if (rightOverflow > 0.0) {
+ position.setX(position.x() - 2 * rightOverflow);
+ vel.setX(-vel.x());
+ }
+
+ if (topOverflow < 0.0) {
+ position.setY(position.y() - 2 * topOverflow);
+ vel.setY(-vel.y());
+ } else if (bottomOverflow > 0.0) {
+ position.setY(position.y() - 2 * bottomOverflow);
+ vel.setY(-vel.y());
+ }
+}
+
+QRectF Bubble::rect()
+{
+ return QRectF(position.x() - radius, position.y() - radius,
+ 2 * radius, 2 * radius);
+}
diff --git a/examples/opengl/overpainting/bubble.h b/examples/opengl/overpainting/bubble.h
new file mode 100644
index 0000000..7e71550
--- /dev/null
+++ b/examples/opengl/overpainting/bubble.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BUBBLE_H
+#define BUBBLE_H
+
+#include <QBrush>
+#include <QColor>
+#include <QPointF>
+#include <QRect>
+#include <QRectF>
+
+QT_BEGIN_NAMESPACE
+class QPainter;
+QT_END_NAMESPACE
+
+class Bubble
+{
+public:
+ Bubble(const QPointF &position, qreal radius, const QPointF &velocity);
+
+ void drawBubble(QPainter *painter);
+ void updateBrush();
+ void move(const QRect &bbox);
+ QRectF rect();
+
+private:
+ QColor randomColor();
+
+ QBrush brush;
+ QPointF position;
+ QPointF vel;
+ qreal radius;
+ QColor innerColor;
+ QColor outerColor;
+};
+
+#endif
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp
new file mode 100644
index 0000000..e3a7b1e
--- /dev/null
+++ b/examples/opengl/overpainting/glwidget.cpp
@@ -0,0 +1,360 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtOpenGL>
+#include <stdlib.h>
+
+#include <math.h>
+
+#include "bubble.h"
+#include "glwidget.h"
+
+#ifndef GL_MULTISAMPLE
+#define GL_MULTISAMPLE 0x809D
+#endif
+
+//! [0]
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
+{
+ QTime midnight(0, 0, 0);
+ qsrand(midnight.secsTo(QTime::currentTime()));
+
+ object = 0;
+ xRot = 0;
+ yRot = 0;
+ zRot = 0;
+
+ trolltechGreen = QColor::fromCmykF(0.40, 0.0, 1.0, 0.0);
+ trolltechPurple = QColor::fromCmykF(0.39, 0.39, 0.0, 0.0);
+
+ animationTimer.setSingleShot(false);
+ connect(&animationTimer, SIGNAL(timeout()), this, SLOT(animate()));
+ animationTimer.start(25);
+
+ setAutoFillBackground(false);
+ setMinimumSize(200, 200);
+ setWindowTitle(tr("Overpainting a Scene"));
+}
+//! [0]
+
+//! [1]
+GLWidget::~GLWidget()
+{
+ makeCurrent();
+ glDeleteLists(object, 1);
+}
+//! [1]
+
+void GLWidget::setXRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != xRot)
+ xRot = angle;
+}
+
+void GLWidget::setYRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != yRot)
+ yRot = angle;
+}
+
+void GLWidget::setZRotation(int angle)
+{
+ normalizeAngle(&angle);
+ if (angle != zRot)
+ zRot = angle;
+}
+
+//! [2]
+void GLWidget::initializeGL()
+{
+ object = makeObject();
+}
+//! [2]
+
+void GLWidget::mousePressEvent(QMouseEvent *event)
+{
+ lastPos = event->pos();
+}
+
+void GLWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ int dx = event->x() - lastPos.x();
+ int dy = event->y() - lastPos.y();
+
+ if (event->buttons() & Qt::LeftButton) {
+ setXRotation(xRot + 8 * dy);
+ setYRotation(yRot + 8 * dx);
+ } else if (event->buttons() & Qt::RightButton) {
+ setXRotation(xRot + 8 * dy);
+ setZRotation(zRot + 8 * dx);
+ }
+ lastPos = event->pos();
+}
+
+void GLWidget::paintEvent(QPaintEvent *event)
+{
+ makeCurrent();
+//! [4]
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+//! [4]
+
+//! [6]
+ qglClearColor(trolltechPurple.dark());
+ glShadeModel(GL_SMOOTH);
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+ glEnable(GL_MULTISAMPLE);
+ static GLfloat lightPosition[4] = { 0.5, 5.0, 7.0, 1.0 };
+ glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
+
+ setupViewport(width(), height());
+//! [6]
+
+//! [7]
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glLoadIdentity();
+ glTranslated(0.0, 0.0, -10.0);
+ glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
+ glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
+ glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
+ glCallList(object);
+//! [7]
+
+//! [8]
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+//! [8]
+
+//! [10]
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ foreach (Bubble *bubble, bubbles) {
+ if (bubble->rect().intersects(event->rect()))
+ bubble->drawBubble(&painter);
+ }
+ drawInstructions(&painter);
+ painter.end();
+}
+//! [10]
+
+//! [11]
+void GLWidget::resizeGL(int width, int height)
+{
+ setupViewport(width, height);
+}
+//! [11]
+
+//! [12]
+void GLWidget::showEvent(QShowEvent *event)
+{
+ Q_UNUSED(event);
+ createBubbles(20 - bubbles.count());
+}
+//! [12]
+
+QSize GLWidget::sizeHint() const
+{
+ return QSize(400, 400);
+}
+
+GLuint GLWidget::makeObject()
+{
+ GLuint list = glGenLists(1);
+ glNewList(list, GL_COMPILE);
+
+ glEnable(GL_NORMALIZE);
+ glBegin(GL_QUADS);
+
+ static GLfloat logoDiffuseColor[4] = {trolltechGreen.red()/255.0,
+ trolltechGreen.green()/255.0,
+ trolltechGreen.blue()/255.0, 1.0};
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, logoDiffuseColor);
+
+ GLdouble x1 = +0.06;
+ GLdouble y1 = -0.14;
+ GLdouble x2 = +0.14;
+ GLdouble y2 = -0.06;
+ GLdouble x3 = +0.08;
+ GLdouble y3 = +0.00;
+ GLdouble x4 = +0.30;
+ GLdouble y4 = +0.22;
+
+ quad(x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(x3, y3, x4, y4, y4, x4, y3, x3);
+
+ extrude(x1, y1, x2, y2);
+ extrude(x2, y2, y2, x2);
+ extrude(y2, x2, y1, x1);
+ extrude(y1, x1, x1, y1);
+ extrude(x3, y3, x4, y4);
+ extrude(x4, y4, y4, x4);
+ extrude(y4, x4, y3, x3);
+
+ const double Pi = 3.14159265358979323846;
+ const int NumSectors = 200;
+
+ for (int i = 0; i < NumSectors; ++i) {
+ double angle1 = (i * 2 * Pi) / NumSectors;
+ GLdouble x5 = 0.30 * sin(angle1);
+ GLdouble y5 = 0.30 * cos(angle1);
+ GLdouble x6 = 0.20 * sin(angle1);
+ GLdouble y6 = 0.20 * cos(angle1);
+
+ double angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ GLdouble x7 = 0.20 * sin(angle2);
+ GLdouble y7 = 0.20 * cos(angle2);
+ GLdouble x8 = 0.30 * sin(angle2);
+ GLdouble y8 = 0.30 * cos(angle2);
+
+ quad(x5, y5, x6, y6, x7, y7, x8, y8);
+
+ extrude(x6, y6, x7, y7);
+ extrude(x8, y8, x5, y5);
+ }
+
+ glEnd();
+
+ glEndList();
+ return list;
+}
+
+void GLWidget::quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
+{
+ glNormal3d(0.0, 0.0, -1.0);
+ glVertex3d(x1, y1, -0.05);
+ glVertex3d(x2, y2, -0.05);
+ glVertex3d(x3, y3, -0.05);
+ glVertex3d(x4, y4, -0.05);
+
+ glNormal3d(0.0, 0.0, 1.0);
+ glVertex3d(x4, y4, +0.05);
+ glVertex3d(x3, y3, +0.05);
+ glVertex3d(x2, y2, +0.05);
+ glVertex3d(x1, y1, +0.05);
+}
+
+void GLWidget::extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+{
+ qglColor(trolltechGreen.dark(250 + int(100 * x1)));
+
+ glNormal3d((x1 + x2)/2.0, (y1 + y2)/2.0, 0.0);
+ glVertex3d(x1, y1, +0.05);
+ glVertex3d(x2, y2, +0.05);
+ glVertex3d(x2, y2, -0.05);
+ glVertex3d(x1, y1, -0.05);
+}
+
+void GLWidget::normalizeAngle(int *angle)
+{
+ while (*angle < 0)
+ *angle += 360 * 16;
+ while (*angle > 360 * 16)
+ *angle -= 360 * 16;
+}
+
+void GLWidget::createBubbles(int number)
+{
+ for (int i = 0; i < number; ++i) {
+ QPointF position(width()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))),
+ height()*(0.1 + (0.8*qrand()/(RAND_MAX+1.0))));
+ qreal radius = qMin(width(), height())*(0.0125 + 0.0875*qrand()/(RAND_MAX+1.0));
+ QPointF velocity(width()*0.0125*(-0.5 + qrand()/(RAND_MAX+1.0)),
+ height()*0.0125*(-0.5 + qrand()/(RAND_MAX+1.0)));
+
+ bubbles.append(new Bubble(position, radius, velocity));
+ }
+}
+
+//! [13]
+void GLWidget::animate()
+{
+ QMutableListIterator<Bubble*> iter(bubbles);
+
+ while (iter.hasNext()) {
+ Bubble *bubble = iter.next();
+ bubble->move(rect());
+ }
+ update();
+}
+//! [13]
+
+//! [14]
+void GLWidget::setupViewport(int width, int height)
+{
+ int side = qMin(width, height);
+ glViewport((width - side) / 2, (height - side) / 2, side, side);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
+ glMatrixMode(GL_MODELVIEW);
+}
+//! [14]
+
+//! [15]
+void GLWidget::drawInstructions(QPainter *painter)
+{
+ QString text = tr("Click and drag with the left mouse button "
+ "to rotate the Qt logo.");
+ QFontMetrics metrics = QFontMetrics(font());
+ int border = qMax(4, metrics.leading());
+
+ QRect rect = metrics.boundingRect(0, 0, width() - 2*border, int(height()*0.125),
+ Qt::AlignCenter | Qt::TextWordWrap, text);
+ painter->setRenderHint(QPainter::TextAntialiasing);
+ painter->fillRect(QRect(0, 0, width(), rect.height() + 2*border),
+ QColor(0, 0, 0, 127));
+ painter->setPen(Qt::white);
+ painter->fillRect(QRect(0, 0, width(), rect.height() + 2*border),
+ QColor(0, 0, 0, 127));
+ painter->drawText((width() - rect.width())/2, border,
+ rect.width(), rect.height(),
+ Qt::AlignCenter | Qt::TextWordWrap, text);
+}
+//! [15]
diff --git a/examples/opengl/overpainting/glwidget.h b/examples/opengl/overpainting/glwidget.h
new file mode 100644
index 0000000..f1b49c1
--- /dev/null
+++ b/examples/opengl/overpainting/glwidget.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QBrush>
+#include <QFont>
+#include <QImage>
+#include <QPen>
+#include <QGLWidget>
+#include <QTimer>
+
+class Bubble;
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+class QWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent = 0);
+ ~GLWidget();
+//! [0]
+
+ QSize sizeHint() const;
+ int xRotation() const { return xRot; }
+ int yRotation() const { return yRot; }
+ int zRotation() const { return zRot; }
+
+public slots:
+ void setXRotation(int angle);
+ void setYRotation(int angle);
+ void setZRotation(int angle);
+
+//! [1]
+protected:
+ void initializeGL();
+ void paintEvent(QPaintEvent *event);
+ void resizeGL(int width, int height);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void showEvent(QShowEvent *event);
+
+private slots:
+ void animate();
+
+private:
+ GLuint makeObject();
+ void createBubbles(int number);
+ void drawInstructions(QPainter *painter);
+//! [1]
+ void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+ void normalizeAngle(int *angle);
+ void quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
+ void setupViewport(int width, int height);
+
+ GLuint object;
+ int xRot;
+ int yRot;
+ int zRot;
+ QPoint lastPos;
+ QColor trolltechGreen;
+ QColor trolltechPurple;
+//! [4]
+ QList<Bubble*> bubbles;
+ QTimer animationTimer;
+};
+//! [4]
+
+#endif
diff --git a/examples/opengl/overpainting/main.cpp b/examples/opengl/overpainting/main.cpp
new file mode 100644
index 0000000..c1b17df
--- /dev/null
+++ b/examples/opengl/overpainting/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "glwidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ GLWidget window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro
new file mode 100644
index 0000000..b8e79eb
--- /dev/null
+++ b/examples/opengl/overpainting/overpainting.pro
@@ -0,0 +1,13 @@
+QT += opengl
+
+HEADERS = bubble.h \
+ glwidget.h
+SOURCES = bubble.cpp \
+ glwidget.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS overpainting.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting
+INSTALLS += target sources
diff --git a/examples/opengl/pbuffers/cubelogo.png b/examples/opengl/pbuffers/cubelogo.png
new file mode 100644
index 0000000..3ae0f9b
--- /dev/null
+++ b/examples/opengl/pbuffers/cubelogo.png
Binary files differ
diff --git a/examples/opengl/pbuffers/glwidget.cpp b/examples/opengl/pbuffers/glwidget.cpp
new file mode 100644
index 0000000..4dfbcf4
--- /dev/null
+++ b/examples/opengl/pbuffers/glwidget.cpp
@@ -0,0 +1,260 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glwidget.h"
+#include <QtGui/QImage>
+
+#include <math.h>
+
+static GLint cubeArray[][3] = {
+ {0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0},
+ {0, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1},
+ {0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1},
+ {0, 1, 0}, {0, 1, 1}, {1, 1, 1}, {1, 1, 0},
+ {0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1},
+ {1, 0, 0}, {1, 1, 0}, {1, 1, 1}, {1, 0, 1}
+};
+
+static GLint cubeTextureArray[][2] = {
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {0, 0}, {0, 1}, {1, 1}, {1, 0},
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {1, 0}, {0, 0}, {0, 1}, {1, 1},
+ {0, 0}, {1, 0}, {1, 1}, {0, 1},
+ {1, 0}, {0, 0}, {0, 1}, {1, 1}
+};
+
+static GLint faceArray[][2] = {
+ {1, -1}, {1, 1}, {-1, 1}, {-1, -1}
+};
+
+static GLubyte colorArray[][4] = {
+ {102, 176, 54, 255},
+ {81, 141, 41, 255},
+ {62, 108, 32, 255},
+ {45, 79, 23, 255}
+};
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
+{
+ // create the pbuffer
+ pbuffer = new QGLPixelBuffer(QSize(512, 512), format(), this);
+ timerId = startTimer(20);
+ setWindowTitle(tr("OpenGL pbuffers"));
+}
+
+GLWidget::~GLWidget()
+{
+ pbuffer->releaseFromDynamicTexture();
+ glDeleteTextures(1, &dynamicTexture);
+ glDeleteLists(pbufferList, 1);
+ delete pbuffer;
+}
+
+void GLWidget::initializeGL()
+{
+ glMatrixMode(GL_MODELVIEW);
+
+ glEnable(GL_CULL_FACE);
+ initCommon();
+ initPbuffer();
+
+ for (int i = 0; i < 3; ++i) {
+ yOffs[i] = 0.0f;
+ xInc[i] = 0.005f;
+ rot[i] = 0.0f;
+ }
+ xOffs[0]= 0.0f;
+ xOffs[1]= 0.5f;
+ xOffs[2]= 1.0f;
+
+ cubeTexture = bindTexture(QImage(":res/cubelogo.png"));
+}
+
+void GLWidget::resizeGL(int w, int h)
+{
+ glViewport(0, 0, w, h);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ float aspect = w/(float)(h ? h : 1);
+ glFrustum(-aspect, aspect, -1, 1, 10, 100);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+ glTranslatef(0.0f, 0.0f, -15.0f);
+}
+
+void GLWidget::paintGL()
+{
+ // draw a spinning cube into the pbuffer..
+ pbuffer->makeCurrent();
+ glBindTexture(GL_TEXTURE_2D, cubeTexture);
+ glCallList(pbufferList);
+ glFlush();
+
+ // rendering directly to a texture is not supported on X11 and
+ // some Windows implementations, unfortunately
+ if (!hasDynamicTextureUpdate)
+ pbuffer->updateDynamicTexture(dynamicTexture);
+
+ // ..and use the pbuffer contents as a texture when rendering the
+ // background and the bouncing cubes
+ makeCurrent();
+ glBindTexture(GL_TEXTURE_2D, dynamicTexture);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ // draw the background
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+
+ glVertexPointer(2, GL_INT, 0, faceArray);
+ glTranslatef(-1.2f, -0.8f, 0.0f);
+ glScalef(0.2f, 0.2f, 0.2f);
+ for (int y = 0; y < 5; ++y) {
+ for (int x = 0; x < 5; ++x) {
+ glTranslatef(2.0f, 0, 0);
+ glColor4f(0.8, 0.8, 0.8, 1.0);
+ glDrawArrays(GL_QUADS, 0, 4);
+ }
+ glTranslatef(-10.0f, 2.0f, 0);
+ }
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+
+ // draw the bouncing cubes
+ drawCube(0, 0.0f, 1.5f, 2.5f, 1.5f);
+ drawCube(1, 1.0f, 2.0f, 2.5f, 2.0f);
+ drawCube(2, 2.0f, 3.5f, 2.5f, 2.5f);
+}
+
+void GLWidget::drawCube(int i, GLfloat z, GLfloat rotation, GLfloat jmp, GLfloat amp)
+{
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(xOffs[i], yOffs[i], z);
+ glTranslatef(0.5f, 0.5f, 0.5f);
+ GLfloat scale = 0.75 + i*(0.25f/2);
+ glScalef(scale, scale, scale);
+ glRotatef(rot[i], 1.0f, 1.0f, 1.0f);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+
+ glColor4f(1.0f, 1.0f, 1.0f, 0.8f);
+ glDrawArrays(GL_QUADS, 0, 24);
+
+ if (xOffs[i] > 1.0f || xOffs[i] < -1.0f) {
+ xInc[i] = -xInc[i];
+ xOffs[i] = xOffs[i] > 1.0f ? 1.0f : -1.0f;
+ }
+ xOffs[i] += xInc[i];
+ yOffs[i] = qAbs(cos((-3.141592f * jmp) * xOffs[i]) * amp) - 1;
+ rot[i] += rotation;
+}
+
+void GLWidget::initCommon()
+{
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+ glTexCoordPointer(2, GL_INT, 0, cubeTextureArray);
+ glColorPointer(4, GL_UNSIGNED_BYTE, 0, colorArray);
+
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_DEPTH_TEST);
+
+ glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+}
+
+void GLWidget::initPbuffer()
+{
+ // set up the pbuffer context
+ pbuffer->makeCurrent();
+ initCommon();
+
+ glViewport(0, 0, pbuffer->size().width(), pbuffer->size().height());
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-1, 1, -1, 1, -99, 99);
+ glTranslatef(-0.5f, -0.5f, 0.0f);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ pbufferList = glGenLists(1);
+ glNewList(pbufferList, GL_COMPILE);
+ {
+ glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
+
+ // draw cube background
+ glPushMatrix();
+ glLoadIdentity();
+ glTranslatef(0.5f, 0.5f, -2.0f);
+ glDisable(GL_TEXTURE_2D);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glVertexPointer(2, GL_INT, 0, faceArray);
+ glDrawArrays(GL_QUADS, 0, 4);
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+ glDisableClientState(GL_COLOR_ARRAY);
+ glEnable(GL_TEXTURE_2D);
+ glPopMatrix();
+
+ // draw cube
+ glTranslatef(0.5f, 0.5f, 0.5f);
+ glRotatef(3.0f, 1.0f, 1.0f, 1.0f);
+ glTranslatef(-0.5f, -0.5f, -0.5f);
+ glColor4f(0.9f, 0.9f, 0.9f, 1.0f);
+ glDrawArrays(GL_QUADS, 0, 24);
+ }
+ glEndList();
+ // generate a texture that has the same size/format as the pbuffer
+ dynamicTexture = pbuffer->generateDynamicTexture();
+
+ // bind the dynamic texture to the pbuffer - this is a no-op under X11
+ hasDynamicTextureUpdate = pbuffer->bindToDynamicTexture(dynamicTexture);
+ makeCurrent();
+}
+
diff --git a/examples/opengl/pbuffers/glwidget.h b/examples/opengl/pbuffers/glwidget.h
new file mode 100644
index 0000000..9f2e86c
--- /dev/null
+++ b/examples/opengl/pbuffers/glwidget.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL>
+
+class GLWidget : public QGLWidget
+{
+public:
+ GLWidget(QWidget *parent);
+ ~GLWidget();
+ void initializeGL();
+ void resizeGL(int w, int h);
+ void paintGL();
+ void timerEvent(QTimerEvent *) { update(); }
+ void mousePressEvent(QMouseEvent *) { killTimer(timerId); }
+ void mouseReleaseEvent(QMouseEvent *) { timerId = startTimer(20); }
+
+ void drawCube(int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp);
+ void initCommon();
+ void initPbuffer();
+
+private:
+ GLfloat rot[3], xOffs[3], yOffs[3], xInc[3];
+ GLuint pbufferList;
+ GLuint dynamicTexture;
+ GLuint cubeTexture;
+ int timerId;
+ bool hasDynamicTextureUpdate;
+
+ QGLPixelBuffer *pbuffer;
+};
+
diff --git a/examples/opengl/pbuffers/main.cpp b/examples/opengl/pbuffers/main.cpp
new file mode 100644
index 0000000..91799e0
--- /dev/null
+++ b/examples/opengl/pbuffers/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include "glwidget.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(pbuffers);
+
+ QApplication a(argc, argv);
+ if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) {
+ QMessageBox::information(0, "OpenGL pbuffers",
+ "This system does not support OpenGL/pbuffers.");
+ return -1;
+ }
+
+ GLWidget widget(0);
+ widget.resize(640, 480);
+ widget.show();
+ return a.exec();
+}
+
diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro
new file mode 100644
index 0000000..c1060e2
--- /dev/null
+++ b/examples/opengl/pbuffers/pbuffers.pro
@@ -0,0 +1,11 @@
+HEADERS += glwidget.h
+SOURCES += glwidget.cpp main.cpp
+RESOURCES += pbuffers.qrc
+
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers
+sources.files = $$SOURCES $$HEADERS $$RESOURCES pbuffers.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers
+INSTALLS += target sources
diff --git a/examples/opengl/pbuffers/pbuffers.qrc b/examples/opengl/pbuffers/pbuffers.qrc
new file mode 100644
index 0000000..9fc1a56
--- /dev/null
+++ b/examples/opengl/pbuffers/pbuffers.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>cubelogo.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/pbuffers2/bubbles.svg b/examples/opengl/pbuffers2/bubbles.svg
new file mode 100644
index 0000000..65867da
--- /dev/null
+++ b/examples/opengl/pbuffers2/bubbles.svg
@@ -0,0 +1,215 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="20cm" height="15cm" viewBox="0 0 800 600"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Semi-transparent bubbles on a colored background.</desc>
+ <defs>
+ <!-- Create radial gradients for each bubble. -->
+ <radialGradient id="blueBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdcdff" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#cdaacd" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="redBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffcdcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbb99" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="greenBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#99aaaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="yellowBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbbaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="background" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="400" fx="250" fy="250">
+ <stop offset="0%" stop-color="#ffffee" />
+ <stop offset="100%" stop-color="#ccccaa" />
+ </radialGradient>
+ <linearGradient id="surface" gradientUnits="userSpaceOnUse"
+ x1="-100" y1="200" x2="400" y2="200">
+ <stop offset="0%" stop-color="#ffffcc" />
+ <stop offset="100%" stop-color="#bbbb88" />
+ </linearGradient>
+
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadowGrad)" cx="0" cy="0" r="100" />
+ <g id="bubble">
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <circle cx="0" cy="0" r="100" />
+ </g>
+ </defs>
+ <g>
+ <rect fill="url(#background)" x="0" y="0" width="800" height="600" />
+ </g>
+
+ <g transform="translate(200,700)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(315,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(80,700)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(255,700)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(565,700)">
+ <g transform="scale(0.4,0.4)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(715,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(645,700)">
+ <g transform="scale(0.375,0.375)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(555,700)">
+ <g transform="scale(0.9,0.9)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(360,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(215,700)">
+ <g transform="scale(0.45,0.45)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(420,700)">
+ <g transform="scale(0.75,0.75)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(815,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(225,375)" >
+ <g transform="scale(1.0,0.5)" >
+ <path d="M 0 0 L 350 0 L 450 450 L -100 450 z"
+ fill="url(#surface)" stroke="none" />
+ </g>
+ </g>
+ <g transform="translate(200,0)" >
+ <g transform="translate(200,490) scale(2.0,1.0) rotate(45)" >
+ <rect fill="#a6ce39" x="-69" y="-69" width="138" height="138" />
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(200,375)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,440)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,475)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,525)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/examples/opengl/pbuffers2/designer.png b/examples/opengl/pbuffers2/designer.png
new file mode 100644
index 0000000..4f32d57
--- /dev/null
+++ b/examples/opengl/pbuffers2/designer.png
Binary files differ
diff --git a/examples/opengl/pbuffers2/glwidget.cpp b/examples/opengl/pbuffers2/glwidget.cpp
new file mode 100644
index 0000000..fa37946
--- /dev/null
+++ b/examples/opengl/pbuffers2/glwidget.cpp
@@ -0,0 +1,326 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QImage>
+#include "glwidget.h"
+
+#include <math.h>
+
+#ifndef GL_MULTISAMPLE
+#define GL_MULTISAMPLE 0x809D
+#endif
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
+{
+ setWindowTitle(tr("OpenGL pbuffers 2"));
+
+ pbuffer = new QGLPixelBuffer(1024, 1024, format(), this);
+
+ rot_x = rot_y = rot_z = 0.0f;
+ scale = 0.1f;
+ anim = new QTimeLine(750, this);
+ anim->setUpdateInterval(20);
+ connect(anim, SIGNAL(valueChanged(qreal)), SLOT(animate(qreal)));
+ connect(anim, SIGNAL(finished()), SLOT(animFinished()));
+
+ svg_renderer = new QSvgRenderer(QLatin1String(":/res/bubbles.svg"), this);
+ connect(svg_renderer, SIGNAL(repaintNeeded()), this, SLOT(draw()));
+
+ logo = QImage(":/res/designer.png");
+ logo = logo.convertToFormat(QImage::Format_ARGB32);
+
+ makeCurrent(); // need a current context to create the display list
+ tile_list = glGenLists(1);
+ glNewList(tile_list, GL_COMPILE);
+ glBegin(GL_QUADS);
+ {
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+
+ glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
+
+ glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
+ glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
+ glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
+ glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
+}
+ glEnd();
+ glEndList();
+
+ wave = new GLfloat[logo.width()*logo.height()];
+ memset(wave, 0, logo.width()*logo.height());
+ startTimer(30); // wave timer
+
+ pbuffer->makeCurrent();
+ dynamicTexture = pbuffer->generateDynamicTexture();
+
+ // bind the dynamic texture to the pbuffer - this is a no-op under X11
+ hasDynamicTextureUpdate = pbuffer->bindToDynamicTexture(dynamicTexture);
+}
+
+GLWidget::~GLWidget()
+{
+ delete[] wave;
+ glDeleteLists(tile_list, 1);
+ pbuffer->releaseFromDynamicTexture();
+ glDeleteTextures(1, &dynamicTexture);
+ delete pbuffer;
+}
+
+void GLWidget::paintEvent(QPaintEvent *)
+{
+ draw();
+}
+
+void GLWidget::draw()
+{
+ QPainter p(this); // used for text overlay
+
+ // save the GL state set for QPainter
+ saveGLState();
+
+ // render the 'bubbles.svg' file into our pbuffer
+ QPainter pbuffer_painter(pbuffer);
+ svg_renderer->render(&pbuffer_painter);
+ pbuffer_painter.end();
+ glFlush();
+
+ // rendering directly to a texture is not supported on X11 and
+ // some Windows implementations, unfortunately
+ if (!hasDynamicTextureUpdate)
+ pbuffer->updateDynamicTexture(dynamicTexture);
+
+ makeCurrent();
+ // draw into the GL widget
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-1, 1, -1, 1, 10, 100);
+ glTranslatef(0.0f, 0.0f, -15.0f);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glViewport(0, 0, width(), height());
+
+ glBindTexture(GL_TEXTURE_2D, dynamicTexture);
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_MULTISAMPLE);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+ // draw background
+ glPushMatrix();
+ glScalef(1.7f, 1.7f, 1.7f);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ glCallList(tile_list);
+ glPopMatrix();
+
+ const int w = logo.width();
+ const int h = logo.height();
+
+ glRotatef(rot_x, 1.0f, 0.0f, 0.0f);
+ glRotatef(rot_y, 0.0f, 1.0f, 0.0f);
+ glRotatef(rot_z, 0.0f, 0.0f, 1.0f);
+ glScalef(scale/w, scale/w, scale/w);
+
+ glDepthFunc(GL_LESS);
+ glEnable(GL_DEPTH_TEST);
+
+ // draw the Qt icon
+ glTranslatef(-w+1, -h+1, 0.0f);
+ for (int y=h-1; y>=0; --y) {
+ uint *p = (uint*) logo.scanLine(y);
+ uint *end = p + w;
+ int x = 0;
+ while (p < end) {
+ glColor4ub(qRed(*p), qGreen(*p), qBlue(*p), uchar(qAlpha(*p)*.9));
+ glTranslatef(0.0f, 0.0f, wave[y*w+x]);
+ if (qAlpha(*p) > 128)
+ glCallList(tile_list);
+ glTranslatef(0.0f, 0.0f, -wave[y*w+x]);
+ glTranslatef(2.0f, 0.0f, 0.0f);
+ ++x;
+ ++p;
+ }
+ glTranslatef(-w*2.0f, 2.0f, 0.0f);
+ }
+
+ // restore the GL state that QPainter expects
+ restoreGLState();
+
+ // draw the overlayed text using QPainter
+ p.setPen(QColor(197, 197, 197, 157));
+ p.setBrush(QColor(197, 197, 197, 127));
+ p.drawRect(QRect(0, 0, width(), 50));
+ p.setPen(Qt::black);
+ p.setBrush(Qt::NoBrush);
+ const QString str1(tr("A simple OpenGL pbuffer example."));
+ const QString str2(tr("Use the mouse wheel to zoom, press buttons and move mouse to rotate, double-click to flip."));
+ QFontMetrics fm(p.font());
+ p.drawText(width()/2 - fm.width(str1)/2, 20, str1);
+ p.drawText(width()/2 - fm.width(str2)/2, 20 + fm.lineSpacing(), str2);
+}
+
+void GLWidget::mousePressEvent(QMouseEvent *e)
+{
+ anchor = e->pos();
+}
+
+void GLWidget::mouseMoveEvent(QMouseEvent *e)
+{
+ QPoint diff = e->pos() - anchor;
+ if (e->buttons() & Qt::LeftButton) {
+ rot_x += diff.y()/5.0f;
+ rot_y += diff.x()/5.0f;
+ } else if (e->buttons() & Qt::RightButton) {
+ rot_z += diff.x()/5.0f;
+ }
+
+ anchor = e->pos();
+ draw();
+}
+
+void GLWidget::wheelEvent(QWheelEvent *e)
+{
+ e->delta() > 0 ? scale += scale*0.1f : scale -= scale*0.1f;
+ draw();
+}
+
+void GLWidget::mouseDoubleClickEvent(QMouseEvent *)
+{
+ anim->start();
+}
+
+void GLWidget::animate(qreal val)
+{
+ rot_y = val * 180;
+ draw();
+}
+
+void GLWidget::animFinished()
+{
+ if (anim->direction() == QTimeLine::Forward)
+ anim->setDirection(QTimeLine::Backward);
+ else
+ anim->setDirection(QTimeLine::Forward);
+}
+
+void GLWidget::saveGLState()
+{
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+}
+
+void GLWidget::restoreGLState()
+{
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glPopAttrib();
+}
+
+#define PI 3.14159
+
+void GLWidget::timerEvent(QTimerEvent *)
+{
+ if (QApplication::mouseButtons() != 0)
+ return;
+
+ static bool scale_in = true;
+
+ if (scale_in && scale > 35.0f)
+ scale_in = false;
+ else if (!scale_in && scale < .5f)
+ scale_in = true;
+
+ scale = scale_in ? scale + scale*0.01f : scale-scale*0.01f;
+ rot_z += 0.3f;
+ rot_x += 0.1f;
+
+ int dx, dy; // disturbance point
+ float s, v, W, t;
+ int i, j;
+ static float wt[128][128];
+ const int width = logo.width();
+ const int AMP = 5;
+
+ dx = dy = width >> 1;
+
+ W = .3f;
+ v = -4; // wave speed
+
+ for (i = 0; i < width; ++i) {
+ for ( j = 0; j < width; ++j) {
+ s = sqrt((double) ((j - dx) * (j - dx) + (i - dy) * (i - dy)));
+ wt[i][j] += 0.1f;
+ t = s / v;
+ if (s != 0)
+ wave[i*width + j] = AMP * sin(2 * PI * W * (wt[i][j] + t)) / (0.2*(s + 2));
+ else
+ wave[i*width + j] = AMP * sin(2 * PI * W * (wt[i][j] + t));
+ }
+ }
+}
diff --git a/examples/opengl/pbuffers2/glwidget.h b/examples/opengl/pbuffers2/glwidget.h
new file mode 100644
index 0000000..8058a41
--- /dev/null
+++ b/examples/opengl/pbuffers2/glwidget.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL>
+#include <QImage>
+#include <QTimeLine>
+#include <QSvgRenderer>
+
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent);
+ ~GLWidget();
+
+ void saveGLState();
+ void restoreGLState();
+
+ void paintEvent(QPaintEvent *);
+ void mousePressEvent(QMouseEvent *);
+ void mouseDoubleClickEvent(QMouseEvent *);
+ void mouseMoveEvent(QMouseEvent *);
+ void timerEvent(QTimerEvent *);
+ void wheelEvent(QWheelEvent *);
+
+public slots:
+ void animate(qreal);
+ void animFinished();
+ void draw();
+
+private:
+ QPoint anchor;
+ float scale;
+ float rot_x, rot_y, rot_z;
+ GLuint tile_list;
+ GLfloat *wave;
+ bool hasDynamicTextureUpdate;
+
+ QImage logo;
+ QTimeLine *anim;
+ QSvgRenderer *svg_renderer;
+
+ GLuint dynamicTexture;
+ QGLPixelBuffer *pbuffer;
+};
+
diff --git a/examples/opengl/pbuffers2/main.cpp b/examples/opengl/pbuffers2/main.cpp
new file mode 100644
index 0000000..9d03beb
--- /dev/null
+++ b/examples/opengl/pbuffers2/main.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include "glwidget.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(pbuffers2);
+
+ QApplication a(argc, argv);
+ if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) {
+ QMessageBox::information(0, "OpenGL pbuffers 2",
+ "This system does not support OpenGL/pbuffers.");
+ return -1;
+ }
+
+ GLWidget widget(0);
+ widget.resize(640, 480);
+ widget.show();
+ return a.exec();
+}
+
diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro
new file mode 100644
index 0000000..cbd0cb5
--- /dev/null
+++ b/examples/opengl/pbuffers2/pbuffers2.pro
@@ -0,0 +1,21 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Fri May 12 17:15:46 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+QT += opengl svg
+
+# Input
+HEADERS += glwidget.h
+SOURCES += glwidget.cpp main.cpp
+RESOURCES += pbuffers2.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2
+sources.files = $$SOURCES $$HEADERS $$RESOURCES pbuffers2.pro *.png *.svg
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2
+INSTALLS += target sources
diff --git a/examples/opengl/pbuffers2/pbuffers2.qrc b/examples/opengl/pbuffers2/pbuffers2.qrc
new file mode 100644
index 0000000..986f1ca
--- /dev/null
+++ b/examples/opengl/pbuffers2/pbuffers2.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/res">
+ <file>bubbles.svg</file>
+ <file>designer.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/samplebuffers/glwidget.cpp b/examples/opengl/samplebuffers/glwidget.cpp
new file mode 100644
index 0000000..381ff95
--- /dev/null
+++ b/examples/opengl/samplebuffers/glwidget.cpp
@@ -0,0 +1,165 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "glwidget.h"
+#include <math.h>
+
+#ifndef GL_MULTISAMPLE
+#define GL_MULTISAMPLE 0x809D
+#endif
+
+GLWidget::GLWidget(QWidget *parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
+{
+ startTimer(40);
+ setWindowTitle(tr("Sample Buffers"));
+}
+
+void GLWidget::initializeGL()
+{
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-.5, .5, .5, -.5, -1000, 1000);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+
+ makeObject();
+}
+
+void GLWidget::resizeGL(int w, int h)
+{
+ glViewport(0, 0, w, h);
+}
+
+void GLWidget::paintGL()
+{
+ static float rot = 0.0;
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glEnable(GL_MULTISAMPLE);
+ glTranslatef(-0.25f, -0.10f, 0.0f);
+ glScalef(0.75f, 1.15f, 0.0f);
+ glRotatef(rot, 0.0f, 0.f, 1.0f);
+ glCallList(list);
+ glPopMatrix();
+
+ glPushMatrix();
+ glDisable(GL_MULTISAMPLE);
+ glTranslatef(0.25f, -0.10f, 0.0f);
+ glScalef(0.75f, 1.15f, 0.0f);
+ glRotatef(rot, 0.0f, 0.0f, 1.0f);
+ glCallList(list);
+ glPopMatrix();
+
+ rot += 0.2f;
+
+ qglColor(Qt::black);
+ renderText(-0.35, 0.4, 0.0, "Multisampling enabled");
+ renderText(0.15, 0.4, 0.0, "Multisampling disabled");
+}
+
+void GLWidget::timerEvent(QTimerEvent *)
+{
+ update();
+}
+
+void GLWidget::makeObject()
+{
+ QColor trolltechGreen(QColor::fromCmykF(0.40, 0.0, 1.0, 0.0));
+ const double Pi = 3.14159265358979323846;
+ const int NumSectors = 15;
+ GLdouble x1 = +0.06;
+ GLdouble y1 = -0.14;
+ GLdouble x2 = +0.14;
+ GLdouble y2 = -0.06;
+ GLdouble x3 = +0.08;
+ GLdouble y3 = +0.00;
+ GLdouble x4 = +0.30;
+ GLdouble y4 = +0.22;
+
+ list = glGenLists(1);
+ glNewList(list, GL_COMPILE);
+ {
+ for (int i = 0; i < NumSectors; ++i) {
+ double angle1 = (i * 2 * Pi) / NumSectors;
+ GLdouble x5 = 0.30 * sin(angle1);
+ GLdouble y5 = 0.30 * cos(angle1);
+ GLdouble x6 = 0.20 * sin(angle1);
+ GLdouble y6 = 0.20 * cos(angle1);
+
+ double angle2 = ((i + 1) * 2 * Pi) / NumSectors;
+ GLdouble x7 = 0.20 * sin(angle2);
+ GLdouble y7 = 0.20 * cos(angle2);
+ GLdouble x8 = 0.30 * sin(angle2);
+ GLdouble y8 = 0.30 * cos(angle2);
+
+ qglColor(trolltechGreen);
+ quad(GL_QUADS, x5, y5, x6, y6, x7, y7, x8, y8);
+ qglColor(Qt::black);
+ quad(GL_LINE_LOOP, x5, y5, x6, y6, x7, y7, x8, y8);
+ }
+
+ qglColor(trolltechGreen);
+ quad(GL_QUADS, x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(GL_QUADS, x3, y3, x4, y4, y4, x4, y3, x3);
+
+ qglColor(Qt::black);
+ quad(GL_LINE_LOOP, x1, y1, x2, y2, y2, x2, y1, x1);
+ quad(GL_LINE_LOOP, x3, y3, x4, y4, y4, x4, y3, x3);
+ }
+ glEndList();
+}
+
+void GLWidget::quad(GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4)
+{
+ glBegin(primitive);
+ {
+ glVertex2d(x1, y1);
+ glVertex2d(x2, y2);
+ glVertex2d(x3, y3);
+ glVertex2d(x4, y4);
+ }
+ glEnd();
+}
diff --git a/examples/opengl/samplebuffers/glwidget.h b/examples/opengl/samplebuffers/glwidget.h
new file mode 100644
index 0000000..dee739e
--- /dev/null
+++ b/examples/opengl/samplebuffers/glwidget.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtOpenGL>
+
+class GLWidget : public QGLWidget
+{
+public:
+ GLWidget(QWidget *parent);
+
+protected:
+ void initializeGL();
+ void resizeGL(int w, int h);
+ void paintGL();
+ void timerEvent(QTimerEvent *);
+
+ void makeObject();
+ void quad(GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
+ GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
+
+private:
+ GLuint list;
+};
+
diff --git a/examples/opengl/samplebuffers/main.cpp b/examples/opengl/samplebuffers/main.cpp
new file mode 100644
index 0000000..88a37b4
--- /dev/null
+++ b/examples/opengl/samplebuffers/main.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+#include "glwidget.h"
+
+int main(int argc, char **argv)
+{
+ QApplication a(argc, argv);
+
+ QGLFormat f = QGLFormat::defaultFormat();
+ f.setSampleBuffers(true);
+ QGLFormat::setDefaultFormat(f);
+ if (!QGLFormat::hasOpenGL()) {
+ QMessageBox::information(0, "OpenGL samplebuffers",
+ "This system does not support OpenGL.");
+ return 0;
+ }
+
+ GLWidget widget(0);
+
+ if (!widget.format().sampleBuffers()) {
+ QMessageBox::information(0, "OpenGL samplebuffers",
+ "This system does not have sample buffer support.");
+ return 0;
+ }
+
+ widget.resize(640, 480);
+ widget.show();
+
+ return a.exec();
+}
+
diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro
new file mode 100644
index 0000000..9eb5f58
--- /dev/null
+++ b/examples/opengl/samplebuffers/samplebuffers.pro
@@ -0,0 +1,10 @@
+HEADERS += glwidget.h
+SOURCES += glwidget.cpp main.cpp
+
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/samplebuffers
+sources.files = $$SOURCES $$HEADERS samplebuffers.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/samplebuffers
+INSTALLS += target sources
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
new file mode 100644
index 0000000..5882373
--- /dev/null
+++ b/examples/opengl/textures/glwidget.cpp
@@ -0,0 +1,182 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtOpenGL>
+
+#include <math.h>
+
+#include "glwidget.h"
+
+GLuint GLWidget::sharedObject = 0;
+int GLWidget::refCount = 0;
+
+GLWidget::GLWidget(QWidget *parent, QGLWidget *shareWidget)
+ : QGLWidget(parent, shareWidget)
+{
+ clearColor = Qt::black;
+ xRot = 0;
+ yRot = 0;
+ zRot = 0;
+}
+
+GLWidget::~GLWidget()
+{
+ if (--refCount == 0) {
+ makeCurrent();
+ glDeleteLists(sharedObject, 1);
+ }
+}
+
+QSize GLWidget::minimumSizeHint() const
+{
+ return QSize(50, 50);
+}
+
+QSize GLWidget::sizeHint() const
+{
+ return QSize(200, 200);
+}
+
+void GLWidget::rotateBy(int xAngle, int yAngle, int zAngle)
+{
+ xRot += xAngle;
+ yRot += yAngle;
+ zRot += zAngle;
+ updateGL();
+}
+
+void GLWidget::setClearColor(const QColor &color)
+{
+ clearColor = color;
+ updateGL();
+}
+
+void GLWidget::initializeGL()
+{
+ if (!sharedObject)
+ sharedObject = makeObject();
+ ++refCount;
+
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_TEXTURE_2D);
+}
+
+void GLWidget::paintGL()
+{
+ qglClearColor(clearColor);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glLoadIdentity();
+ glTranslated(0.0, 0.0, -10.0);
+ glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
+ glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
+ glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
+ glCallList(sharedObject);
+}
+
+void GLWidget::resizeGL(int width, int height)
+{
+ int side = qMin(width, height);
+ glViewport((width - side) / 2, (height - side) / 2, side, side);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
+ glMatrixMode(GL_MODELVIEW);
+}
+
+void GLWidget::mousePressEvent(QMouseEvent *event)
+{
+ lastPos = event->pos();
+}
+
+void GLWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ int dx = event->x() - lastPos.x();
+ int dy = event->y() - lastPos.y();
+
+ if (event->buttons() & Qt::LeftButton) {
+ rotateBy(8 * dy, 8 * dx, 0);
+ } else if (event->buttons() & Qt::RightButton) {
+ rotateBy(8 * dy, 0, 8 * dx);
+ }
+ lastPos = event->pos();
+}
+
+void GLWidget::mouseReleaseEvent(QMouseEvent * /* event */)
+{
+ emit clicked();
+}
+
+GLuint GLWidget::makeObject()
+{
+ static const int coords[6][4][3] = {
+ { { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
+ { { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
+ { { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
+ { { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
+ { { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
+ { { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
+ };
+
+
+ GLuint textures[6];
+ for (int j=0; j < 6; ++j)
+ textures[j] = bindTexture(QPixmap(QString(":/images/side%1.png").arg(j + 1)),
+ GL_TEXTURE_2D);
+
+ GLuint list = glGenLists(1);
+ glNewList(list, GL_COMPILE);
+ for (int i = 0; i < 6; ++i) {
+ glBindTexture(GL_TEXTURE_2D, textures[i]);
+ glBegin(GL_QUADS);
+ for (int j = 0; j < 4; ++j) {
+ glTexCoord2d(j == 0 || j == 3, j == 0 || j == 1);
+ glVertex3d(0.2 * coords[i][j][0], 0.2 * coords[i][j][1],
+ 0.2 * coords[i][j][2]);
+ }
+ glEnd();
+ }
+
+ glEndList();
+ return list;
+}
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
new file mode 100644
index 0000000..623b301
--- /dev/null
+++ b/examples/opengl/textures/glwidget.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GLWIDGET_H
+#define GLWIDGET_H
+
+#include <QGLWidget>
+
+class GLWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+ GLWidget(QWidget *parent = 0, QGLWidget *shareWidget = 0);
+ ~GLWidget();
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+ void rotateBy(int xAngle, int yAngle, int zAngle);
+ void setClearColor(const QColor &color);
+
+signals:
+ void clicked();
+
+protected:
+ void initializeGL();
+ void paintGL();
+ void resizeGL(int width, int height);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private:
+ GLuint makeObject();
+
+ QColor clearColor;
+ QPoint lastPos;
+ int xRot;
+ int yRot;
+ int zRot;
+
+ static GLuint sharedObject;
+ static int refCount;
+};
+
+#endif
diff --git a/examples/opengl/textures/images/side1.png b/examples/opengl/textures/images/side1.png
new file mode 100644
index 0000000..2e6b471
--- /dev/null
+++ b/examples/opengl/textures/images/side1.png
Binary files differ
diff --git a/examples/opengl/textures/images/side2.png b/examples/opengl/textures/images/side2.png
new file mode 100644
index 0000000..d1acf1b
--- /dev/null
+++ b/examples/opengl/textures/images/side2.png
Binary files differ
diff --git a/examples/opengl/textures/images/side3.png b/examples/opengl/textures/images/side3.png
new file mode 100644
index 0000000..a638613
--- /dev/null
+++ b/examples/opengl/textures/images/side3.png
Binary files differ
diff --git a/examples/opengl/textures/images/side4.png b/examples/opengl/textures/images/side4.png
new file mode 100644
index 0000000..ebbc1e3
--- /dev/null
+++ b/examples/opengl/textures/images/side4.png
Binary files differ
diff --git a/examples/opengl/textures/images/side5.png b/examples/opengl/textures/images/side5.png
new file mode 100644
index 0000000..fa2f709
--- /dev/null
+++ b/examples/opengl/textures/images/side5.png
Binary files differ
diff --git a/examples/opengl/textures/images/side6.png b/examples/opengl/textures/images/side6.png
new file mode 100644
index 0000000..97141e4
--- /dev/null
+++ b/examples/opengl/textures/images/side6.png
Binary files differ
diff --git a/examples/opengl/textures/main.cpp b/examples/opengl/textures/main.cpp
new file mode 100644
index 0000000..5129cda
--- /dev/null
+++ b/examples/opengl/textures/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(textures);
+
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/opengl/textures/textures.pro b/examples/opengl/textures/textures.pro
new file mode 100644
index 0000000..cd98a68
--- /dev/null
+++ b/examples/opengl/textures/textures.pro
@@ -0,0 +1,13 @@
+HEADERS = glwidget.h \
+ window.h
+SOURCES = glwidget.cpp \
+ main.cpp \
+ window.cpp
+RESOURCES = textures.qrc
+QT += opengl
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS textures.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures
+INSTALLS += target sources
diff --git a/examples/opengl/textures/textures.qrc b/examples/opengl/textures/textures.qrc
new file mode 100644
index 0000000..efa9e9c
--- /dev/null
+++ b/examples/opengl/textures/textures.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/side1.png</file>
+ <file>images/side2.png</file>
+ <file>images/side3.png</file>
+ <file>images/side4.png</file>
+ <file>images/side5.png</file>
+ <file>images/side6.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/textures/window.cpp b/examples/opengl/textures/window.cpp
new file mode 100644
index 0000000..a974e68
--- /dev/null
+++ b/examples/opengl/textures/window.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "glwidget.h"
+#include "window.h"
+
+Window::Window()
+{
+ QGridLayout *mainLayout = new QGridLayout;
+
+ glWidgets[0][0] = 0;
+
+ for (int i = 0; i < NumRows; ++i) {
+ for (int j = 0; j < NumColumns; ++j) {
+ QColor clearColor;
+ clearColor.setHsv(((i * NumColumns) + j) * 255
+ / (NumRows * NumColumns - 1),
+ 255, 63);
+
+ glWidgets[i][j] = new GLWidget(0, glWidgets[0][0]);
+ glWidgets[i][j]->setClearColor(clearColor);
+ glWidgets[i][j]->rotateBy(+42 * 16, +42 * 16, -21 * 16);
+ mainLayout->addWidget(glWidgets[i][j], i, j);
+
+ connect(glWidgets[i][j], SIGNAL(clicked()),
+ this, SLOT(setCurrentGlWidget()));
+ }
+ }
+ setLayout(mainLayout);
+
+ currentGlWidget = glWidgets[0][0];
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(rotateOneStep()));
+ timer->start(20);
+
+ setWindowTitle(tr("Textures"));
+}
+
+void Window::setCurrentGlWidget()
+{
+ currentGlWidget = qobject_cast<GLWidget *>(sender());
+}
+
+void Window::rotateOneStep()
+{
+ if (currentGlWidget)
+ currentGlWidget->rotateBy(+2 * 16, +2 * 16, -1 * 16);
+}
diff --git a/examples/opengl/textures/window.h b/examples/opengl/textures/window.h
new file mode 100644
index 0000000..50bb7f0
--- /dev/null
+++ b/examples/opengl/textures/window.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+class GLWidget;
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private slots:
+ void setCurrentGlWidget();
+ void rotateOneStep();
+
+private:
+ enum { NumRows = 2, NumColumns = 3 };
+
+ GLWidget *glWidgets[NumRows][NumColumns];
+ GLWidget *currentGlWidget;
+};
+
+#endif
diff --git a/examples/painting/README b/examples/painting/README
new file mode 100644
index 0000000..4f9dca0
--- /dev/null
+++ b/examples/painting/README
@@ -0,0 +1,42 @@
+Qt's painting system is able to render vector graphics, images, and outline
+font-based text with sub-pixel accuracy accuracy using anti-aliasing to
+improve rendering quality.
+
+These examples show the most common techniques that are used when painting
+with Qt, from basic concepts such as drawing simple primitives to the use of
+transformations.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/painting/basicdrawing/basicdrawing.pro b/examples/painting/basicdrawing/basicdrawing.pro
new file mode 100644
index 0000000..4011260
--- /dev/null
+++ b/examples/painting/basicdrawing/basicdrawing.pro
@@ -0,0 +1,12 @@
+HEADERS = renderarea.h \
+ window.h
+SOURCES = main.cpp \
+ renderarea.cpp \
+ window.cpp
+RESOURCES = basicdrawing.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/basicdrawing
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS basicdrawing.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/basicdrawing
+INSTALLS += target sources
diff --git a/examples/painting/basicdrawing/basicdrawing.qrc b/examples/painting/basicdrawing/basicdrawing.qrc
new file mode 100644
index 0000000..9d8a23a
--- /dev/null
+++ b/examples/painting/basicdrawing/basicdrawing.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/brick.png</file>
+ <file>images/qt-logo.png</file>
+</qresource>
+</RCC>
diff --git a/examples/painting/basicdrawing/images/brick.png b/examples/painting/basicdrawing/images/brick.png
new file mode 100644
index 0000000..87e7df5
--- /dev/null
+++ b/examples/painting/basicdrawing/images/brick.png
Binary files differ
diff --git a/examples/painting/basicdrawing/images/qt-logo.png b/examples/painting/basicdrawing/images/qt-logo.png
new file mode 100644
index 0000000..a8b452e
--- /dev/null
+++ b/examples/painting/basicdrawing/images/qt-logo.png
Binary files differ
diff --git a/examples/painting/basicdrawing/main.cpp b/examples/painting/basicdrawing/main.cpp
new file mode 100644
index 0000000..e7c3da4
--- /dev/null
+++ b/examples/painting/basicdrawing/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(basicdrawing);
+
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/basicdrawing/renderarea.cpp b/examples/painting/basicdrawing/renderarea.cpp
new file mode 100644
index 0000000..22e511f
--- /dev/null
+++ b/examples/painting/basicdrawing/renderarea.cpp
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "renderarea.h"
+
+//! [0]
+RenderArea::RenderArea(QWidget *parent)
+ : QWidget(parent)
+{
+ shape = Polygon;
+ antialiased = false;
+ transformed = false;
+ pixmap.load(":/images/qt-logo.png");
+
+ setBackgroundRole(QPalette::Base);
+ setAutoFillBackground(true);
+}
+//! [0]
+
+//! [1]
+QSize RenderArea::minimumSizeHint() const
+{
+ return QSize(100, 100);
+}
+//! [1]
+
+//! [2]
+QSize RenderArea::sizeHint() const
+{
+ return QSize(400, 200);
+}
+//! [2]
+
+//! [3]
+void RenderArea::setShape(Shape shape)
+{
+ this->shape = shape;
+ update();
+}
+//! [3]
+
+//! [4]
+void RenderArea::setPen(const QPen &pen)
+{
+ this->pen = pen;
+ update();
+}
+//! [4]
+
+//! [5]
+void RenderArea::setBrush(const QBrush &brush)
+{
+ this->brush = brush;
+ update();
+}
+//! [5]
+
+//! [6]
+void RenderArea::setAntialiased(bool antialiased)
+{
+ this->antialiased = antialiased;
+ update();
+}
+//! [6]
+
+//! [7]
+void RenderArea::setTransformed(bool transformed)
+{
+ this->transformed = transformed;
+ update();
+}
+//! [7]
+
+//! [8]
+void RenderArea::paintEvent(QPaintEvent * /* event */)
+{
+ static const QPoint points[4] = {
+ QPoint(10, 80),
+ QPoint(20, 10),
+ QPoint(80, 30),
+ QPoint(90, 70)
+ };
+
+ QRect rect(10, 20, 80, 60);
+
+ QPainterPath path;
+ path.moveTo(20, 80);
+ path.lineTo(20, 30);
+ path.cubicTo(80, 0, 50, 50, 80, 80);
+
+ int startAngle = 20 * 16;
+ int arcLength = 120 * 16;
+//! [8]
+
+//! [9]
+ QPainter painter(this);
+ painter.setPen(pen);
+ painter.setBrush(brush);
+ if (antialiased) {
+ painter.setRenderHint(QPainter::Antialiasing, true);
+//! [9]
+ painter.translate(+0.5, +0.5);
+ }
+
+//! [10]
+ for (int x = 0; x < width(); x += 100) {
+ for (int y = 0; y < height(); y += 100) {
+ painter.save();
+ painter.translate(x, y);
+//! [10] //! [11]
+ if (transformed) {
+ painter.translate(50, 50);
+ painter.rotate(60.0);
+ painter.scale(0.6, 0.9);
+ painter.translate(-50, -50);
+ }
+//! [11]
+
+//! [12]
+ switch (shape) {
+ case Line:
+ painter.drawLine(rect.bottomLeft(), rect.topRight());
+ break;
+ case Points:
+ painter.drawPoints(points, 4);
+ break;
+ case Polyline:
+ painter.drawPolyline(points, 4);
+ break;
+ case Polygon:
+ painter.drawPolygon(points, 4);
+ break;
+ case Rect:
+ painter.drawRect(rect);
+ break;
+ case RoundedRect:
+ painter.drawRoundedRect(rect, 25, 25, Qt::RelativeSize);
+ break;
+ case Ellipse:
+ painter.drawEllipse(rect);
+ break;
+ case Arc:
+ painter.drawArc(rect, startAngle, arcLength);
+ break;
+ case Chord:
+ painter.drawChord(rect, startAngle, arcLength);
+ break;
+ case Pie:
+ painter.drawPie(rect, startAngle, arcLength);
+ break;
+ case Path:
+ painter.drawPath(path);
+ break;
+ case Text:
+ painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nQt Software"));
+ break;
+ case Pixmap:
+ painter.drawPixmap(10, 10, pixmap);
+ }
+//! [12] //! [13]
+ painter.restore();
+ }
+ }
+
+ painter.setPen(palette().dark().color());
+ painter.setBrush(Qt::NoBrush);
+ painter.drawRect(QRect(0, 0, width() - 1, height() - 1));
+}
+//! [13]
diff --git a/examples/painting/basicdrawing/renderarea.h b/examples/painting/basicdrawing/renderarea.h
new file mode 100644
index 0000000..f59e843
--- /dev/null
+++ b/examples/painting/basicdrawing/renderarea.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERAREA_H
+#define RENDERAREA_H
+
+#include <QBrush>
+#include <QPen>
+#include <QPixmap>
+#include <QWidget>
+
+//! [0]
+class RenderArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ enum Shape { Line, Points, Polyline, Polygon, Rect, RoundedRect, Ellipse, Arc,
+ Chord, Pie, Path, Text, Pixmap };
+
+ RenderArea(QWidget *parent = 0);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+
+public slots:
+ void setShape(Shape shape);
+ void setPen(const QPen &pen);
+ void setBrush(const QBrush &brush);
+ void setAntialiased(bool antialiased);
+ void setTransformed(bool transformed);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ Shape shape;
+ QPen pen;
+ QBrush brush;
+ bool antialiased;
+ bool transformed;
+ QPixmap pixmap;
+};
+//! [0]
+
+#endif
diff --git a/examples/painting/basicdrawing/window.cpp b/examples/painting/basicdrawing/window.cpp
new file mode 100644
index 0000000..8640162
--- /dev/null
+++ b/examples/painting/basicdrawing/window.cpp
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "renderarea.h"
+#include "window.h"
+
+//! [0]
+const int IdRole = Qt::UserRole;
+//! [0]
+
+//! [1]
+Window::Window()
+{
+ renderArea = new RenderArea;
+
+ shapeComboBox = new QComboBox;
+ shapeComboBox->addItem(tr("Polygon"), RenderArea::Polygon);
+ shapeComboBox->addItem(tr("Rectangle"), RenderArea::Rect);
+ shapeComboBox->addItem(tr("Rounded Rectangle"), RenderArea::RoundedRect);
+ shapeComboBox->addItem(tr("Ellipse"), RenderArea::Ellipse);
+ shapeComboBox->addItem(tr("Pie"), RenderArea::Pie);
+ shapeComboBox->addItem(tr("Chord"), RenderArea::Chord);
+ shapeComboBox->addItem(tr("Path"), RenderArea::Path);
+ shapeComboBox->addItem(tr("Line"), RenderArea::Line);
+ shapeComboBox->addItem(tr("Polyline"), RenderArea::Polyline);
+ shapeComboBox->addItem(tr("Arc"), RenderArea::Arc);
+ shapeComboBox->addItem(tr("Points"), RenderArea::Points);
+ shapeComboBox->addItem(tr("Text"), RenderArea::Text);
+ shapeComboBox->addItem(tr("Pixmap"), RenderArea::Pixmap);
+
+ shapeLabel = new QLabel(tr("&Shape:"));
+ shapeLabel->setBuddy(shapeComboBox);
+//! [1]
+
+//! [2]
+ penWidthSpinBox = new QSpinBox;
+ penWidthSpinBox->setRange(0, 20);
+ penWidthSpinBox->setSpecialValueText(tr("0 (cosmetic pen)"));
+
+ penWidthLabel = new QLabel(tr("Pen &Width:"));
+ penWidthLabel->setBuddy(penWidthSpinBox);
+//! [2]
+
+//! [3]
+ penStyleComboBox = new QComboBox;
+ penStyleComboBox->addItem(tr("Solid"), Qt::SolidLine);
+ penStyleComboBox->addItem(tr("Dash"), Qt::DashLine);
+ penStyleComboBox->addItem(tr("Dot"), Qt::DotLine);
+ penStyleComboBox->addItem(tr("Dash Dot"), Qt::DashDotLine);
+ penStyleComboBox->addItem(tr("Dash Dot Dot"), Qt::DashDotDotLine);
+ penStyleComboBox->addItem(tr("None"), Qt::NoPen);
+
+ penStyleLabel = new QLabel(tr("&Pen Style:"));
+ penStyleLabel->setBuddy(penStyleComboBox);
+
+ penCapComboBox = new QComboBox;
+ penCapComboBox->addItem(tr("Flat"), Qt::FlatCap);
+ penCapComboBox->addItem(tr("Square"), Qt::SquareCap);
+ penCapComboBox->addItem(tr("Round"), Qt::RoundCap);
+
+ penCapLabel = new QLabel(tr("Pen &Cap:"));
+ penCapLabel->setBuddy(penCapComboBox);
+
+ penJoinComboBox = new QComboBox;
+ penJoinComboBox->addItem(tr("Miter"), Qt::MiterJoin);
+ penJoinComboBox->addItem(tr("Bevel"), Qt::BevelJoin);
+ penJoinComboBox->addItem(tr("Round"), Qt::RoundJoin);
+
+ penJoinLabel = new QLabel(tr("Pen &Join:"));
+ penJoinLabel->setBuddy(penJoinComboBox);
+//! [3]
+
+//! [4]
+ brushStyleComboBox = new QComboBox;
+ brushStyleComboBox->addItem(tr("Linear Gradient"),
+ Qt::LinearGradientPattern);
+ brushStyleComboBox->addItem(tr("Radial Gradient"),
+ Qt::RadialGradientPattern);
+ brushStyleComboBox->addItem(tr("Conical Gradient"),
+ Qt::ConicalGradientPattern);
+ brushStyleComboBox->addItem(tr("Texture"), Qt::TexturePattern);
+ brushStyleComboBox->addItem(tr("Solid"), Qt::SolidPattern);
+ brushStyleComboBox->addItem(tr("Horizontal"), Qt::HorPattern);
+ brushStyleComboBox->addItem(tr("Vertical"), Qt::VerPattern);
+ brushStyleComboBox->addItem(tr("Cross"), Qt::CrossPattern);
+ brushStyleComboBox->addItem(tr("Backward Diagonal"), Qt::BDiagPattern);
+ brushStyleComboBox->addItem(tr("Forward Diagonal"), Qt::FDiagPattern);
+ brushStyleComboBox->addItem(tr("Diagonal Cross"), Qt::DiagCrossPattern);
+ brushStyleComboBox->addItem(tr("Dense 1"), Qt::Dense1Pattern);
+ brushStyleComboBox->addItem(tr("Dense 2"), Qt::Dense2Pattern);
+ brushStyleComboBox->addItem(tr("Dense 3"), Qt::Dense3Pattern);
+ brushStyleComboBox->addItem(tr("Dense 4"), Qt::Dense4Pattern);
+ brushStyleComboBox->addItem(tr("Dense 5"), Qt::Dense5Pattern);
+ brushStyleComboBox->addItem(tr("Dense 6"), Qt::Dense6Pattern);
+ brushStyleComboBox->addItem(tr("Dense 7"), Qt::Dense7Pattern);
+ brushStyleComboBox->addItem(tr("None"), Qt::NoBrush);
+
+ brushStyleLabel = new QLabel(tr("&Brush Style:"));
+ brushStyleLabel->setBuddy(brushStyleComboBox);
+//! [4]
+
+//! [5]
+ otherOptionsLabel = new QLabel(tr("Other Options:"));
+//! [5] //! [6]
+ antialiasingCheckBox = new QCheckBox(tr("&Antialiasing"));
+//! [6] //! [7]
+ transformationsCheckBox = new QCheckBox(tr("&Transformations"));
+//! [7]
+
+//! [8]
+ connect(shapeComboBox, SIGNAL(activated(int)),
+ this, SLOT(shapeChanged()));
+ connect(penWidthSpinBox, SIGNAL(valueChanged(int)),
+ this, SLOT(penChanged()));
+ connect(penStyleComboBox, SIGNAL(activated(int)),
+ this, SLOT(penChanged()));
+ connect(penCapComboBox, SIGNAL(activated(int)),
+ this, SLOT(penChanged()));
+ connect(penJoinComboBox, SIGNAL(activated(int)),
+ this, SLOT(penChanged()));
+ connect(brushStyleComboBox, SIGNAL(activated(int)),
+ this, SLOT(brushChanged()));
+ connect(antialiasingCheckBox, SIGNAL(toggled(bool)),
+ renderArea, SLOT(setAntialiased(bool)));
+ connect(transformationsCheckBox, SIGNAL(toggled(bool)),
+ renderArea, SLOT(setTransformed(bool)));
+//! [8]
+
+//! [9]
+ QGridLayout *mainLayout = new QGridLayout;
+//! [9] //! [10]
+ mainLayout->setColumnStretch(0, 1);
+ mainLayout->setColumnStretch(3, 1);
+ mainLayout->addWidget(renderArea, 0, 0, 1, 4);
+ mainLayout->setRowMinimumHeight(1, 6);
+ mainLayout->addWidget(shapeLabel, 2, 1, Qt::AlignRight);
+ mainLayout->addWidget(shapeComboBox, 2, 2);
+ mainLayout->addWidget(penWidthLabel, 3, 1, Qt::AlignRight);
+ mainLayout->addWidget(penWidthSpinBox, 3, 2);
+ mainLayout->addWidget(penStyleLabel, 4, 1, Qt::AlignRight);
+ mainLayout->addWidget(penStyleComboBox, 4, 2);
+ mainLayout->addWidget(penCapLabel, 5, 1, Qt::AlignRight);
+ mainLayout->addWidget(penCapComboBox, 5, 2);
+ mainLayout->addWidget(penJoinLabel, 6, 1, Qt::AlignRight);
+ mainLayout->addWidget(penJoinComboBox, 6, 2);
+ mainLayout->addWidget(brushStyleLabel, 7, 1, Qt::AlignRight);
+ mainLayout->addWidget(brushStyleComboBox, 7, 2);
+ mainLayout->setRowMinimumHeight(8, 6);
+ mainLayout->addWidget(otherOptionsLabel, 9, 1, Qt::AlignRight);
+ mainLayout->addWidget(antialiasingCheckBox, 9, 2);
+ mainLayout->addWidget(transformationsCheckBox, 10, 2);
+ setLayout(mainLayout);
+
+ shapeChanged();
+ penChanged();
+ brushChanged();
+ antialiasingCheckBox->setChecked(true);
+
+ setWindowTitle(tr("Basic Drawing"));
+}
+//! [10]
+
+//! [11]
+void Window::shapeChanged()
+{
+ RenderArea::Shape shape = RenderArea::Shape(shapeComboBox->itemData(
+ shapeComboBox->currentIndex(), IdRole).toInt());
+ renderArea->setShape(shape);
+}
+//! [11]
+
+//! [12]
+void Window::penChanged()
+{
+ int width = penWidthSpinBox->value();
+ Qt::PenStyle style = Qt::PenStyle(penStyleComboBox->itemData(
+ penStyleComboBox->currentIndex(), IdRole).toInt());
+ Qt::PenCapStyle cap = Qt::PenCapStyle(penCapComboBox->itemData(
+ penCapComboBox->currentIndex(), IdRole).toInt());
+ Qt::PenJoinStyle join = Qt::PenJoinStyle(penJoinComboBox->itemData(
+ penJoinComboBox->currentIndex(), IdRole).toInt());
+
+ renderArea->setPen(QPen(Qt::blue, width, style, cap, join));
+}
+//! [12]
+
+//! [13]
+void Window::brushChanged()
+{
+ Qt::BrushStyle style = Qt::BrushStyle(brushStyleComboBox->itemData(
+//! [13]
+ brushStyleComboBox->currentIndex(), IdRole).toInt());
+
+//! [14]
+ if (style == Qt::LinearGradientPattern) {
+ QLinearGradient linearGradient(0, 0, 100, 100);
+ linearGradient.setColorAt(0.0, Qt::white);
+ linearGradient.setColorAt(0.2, Qt::green);
+ linearGradient.setColorAt(1.0, Qt::black);
+ renderArea->setBrush(linearGradient);
+//! [14] //! [15]
+ } else if (style == Qt::RadialGradientPattern) {
+ QRadialGradient radialGradient(50, 50, 50, 70, 70);
+ radialGradient.setColorAt(0.0, Qt::white);
+ radialGradient.setColorAt(0.2, Qt::green);
+ radialGradient.setColorAt(1.0, Qt::black);
+ renderArea->setBrush(radialGradient);
+ } else if (style == Qt::ConicalGradientPattern) {
+ QConicalGradient conicalGradient(50, 50, 150);
+ conicalGradient.setColorAt(0.0, Qt::white);
+ conicalGradient.setColorAt(0.2, Qt::green);
+ conicalGradient.setColorAt(1.0, Qt::black);
+ renderArea->setBrush(conicalGradient);
+//! [15] //! [16]
+ } else if (style == Qt::TexturePattern) {
+ renderArea->setBrush(QBrush(QPixmap(":/images/brick.png")));
+//! [16] //! [17]
+ } else {
+ renderArea->setBrush(QBrush(Qt::green, style));
+ }
+}
+//! [17]
diff --git a/examples/painting/basicdrawing/window.h b/examples/painting/basicdrawing/window.h
new file mode 100644
index 0000000..7c42aef
--- /dev/null
+++ b/examples/painting/basicdrawing/window.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QComboBox;
+class QLabel;
+class QSpinBox;
+QT_END_NAMESPACE
+class RenderArea;
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private slots:
+ void shapeChanged();
+ void penChanged();
+ void brushChanged();
+
+private:
+ RenderArea *renderArea;
+ QLabel *shapeLabel;
+ QLabel *penWidthLabel;
+ QLabel *penStyleLabel;
+ QLabel *penCapLabel;
+ QLabel *penJoinLabel;
+ QLabel *brushStyleLabel;
+ QLabel *otherOptionsLabel;
+ QComboBox *shapeComboBox;
+ QSpinBox *penWidthSpinBox;
+ QComboBox *penStyleComboBox;
+ QComboBox *penCapComboBox;
+ QComboBox *penJoinComboBox;
+ QComboBox *brushStyleComboBox;
+ QCheckBox *antialiasingCheckBox;
+ QCheckBox *transformationsCheckBox;
+};
+//! [0]
+
+#endif
diff --git a/examples/painting/concentriccircles/circlewidget.cpp b/examples/painting/concentriccircles/circlewidget.cpp
new file mode 100644
index 0000000..ab62a88
--- /dev/null
+++ b/examples/painting/concentriccircles/circlewidget.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "circlewidget.h"
+
+#include <stdlib.h>
+
+//! [0]
+CircleWidget::CircleWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ floatBased = false;
+ antialiased = false;
+ frameNo = 0;
+
+ setBackgroundRole(QPalette::Base);
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+}
+//! [0]
+
+//! [1]
+void CircleWidget::setFloatBased(bool floatBased)
+{
+ this->floatBased = floatBased;
+ update();
+}
+//! [1]
+
+//! [2]
+void CircleWidget::setAntialiased(bool antialiased)
+{
+ this->antialiased = antialiased;
+ update();
+}
+//! [2]
+
+//! [3]
+QSize CircleWidget::minimumSizeHint() const
+{
+ return QSize(50, 50);
+}
+//! [3]
+
+//! [4]
+QSize CircleWidget::sizeHint() const
+{
+ return QSize(180, 180);
+}
+//! [4]
+
+//! [5]
+void CircleWidget::nextAnimationFrame()
+{
+ ++frameNo;
+ update();
+}
+//! [5]
+
+//! [6]
+void CircleWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing, antialiased);
+ painter.translate(width() / 2, height() / 2);
+//! [6]
+
+//! [7]
+ for (int diameter = 0; diameter < 256; diameter += 9) {
+ int delta = abs((frameNo % 128) - diameter / 2);
+ int alpha = 255 - (delta * delta) / 4 - diameter;
+//! [7] //! [8]
+ if (alpha > 0) {
+ painter.setPen(QPen(QColor(0, diameter / 2, 127, alpha), 3));
+
+ if (floatBased) {
+ painter.drawEllipse(QRectF(-diameter / 2.0, -diameter / 2.0,
+ diameter, diameter));
+ } else {
+ painter.drawEllipse(QRect(-diameter / 2, -diameter / 2,
+ diameter, diameter));
+ }
+ }
+ }
+}
+//! [8]
diff --git a/examples/painting/concentriccircles/circlewidget.h b/examples/painting/concentriccircles/circlewidget.h
new file mode 100644
index 0000000..c5acaa8
--- /dev/null
+++ b/examples/painting/concentriccircles/circlewidget.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CIRCLEWIDGET_H
+#define CIRCLEWIDGET_H
+
+#include <QWidget>
+
+//! [0]
+class CircleWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CircleWidget(QWidget *parent = 0);
+
+ void setFloatBased(bool floatBased);
+ void setAntialiased(bool antialiased);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+
+public slots:
+ void nextAnimationFrame();
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ bool floatBased;
+ bool antialiased;
+ int frameNo;
+};
+//! [0]
+
+#endif
diff --git a/examples/painting/concentriccircles/concentriccircles.pro b/examples/painting/concentriccircles/concentriccircles.pro
new file mode 100644
index 0000000..093ea1c
--- /dev/null
+++ b/examples/painting/concentriccircles/concentriccircles.pro
@@ -0,0 +1,11 @@
+HEADERS = circlewidget.h \
+ window.h
+SOURCES = circlewidget.cpp \
+ main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/concentriccircles
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS concentriccircles.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/concentriccircles
+INSTALLS += target sources
diff --git a/examples/painting/concentriccircles/main.cpp b/examples/painting/concentriccircles/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/painting/concentriccircles/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/concentriccircles/window.cpp b/examples/painting/concentriccircles/window.cpp
new file mode 100644
index 0000000..dd5e6e5
--- /dev/null
+++ b/examples/painting/concentriccircles/window.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "circlewidget.h"
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ aliasedLabel = createLabel(tr("Aliased"));
+ antialiasedLabel = createLabel(tr("Antialiased"));
+ intLabel = createLabel(tr("Int"));
+ floatLabel = createLabel(tr("Float"));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(aliasedLabel, 0, 1);
+ layout->addWidget(antialiasedLabel, 0, 2);
+ layout->addWidget(intLabel, 1, 0);
+ layout->addWidget(floatLabel, 2, 0);
+//! [0]
+
+//! [1]
+ QTimer *timer = new QTimer(this);
+
+ for (int i = 0; i < 2; ++i) {
+ for (int j = 0; j < 2; ++j) {
+ circleWidgets[i][j] = new CircleWidget;
+ circleWidgets[i][j]->setAntialiased(j != 0);
+ circleWidgets[i][j]->setFloatBased(i != 0);
+
+ connect(timer, SIGNAL(timeout()),
+ circleWidgets[i][j], SLOT(nextAnimationFrame()));
+
+ layout->addWidget(circleWidgets[i][j], i + 1, j + 1);
+ }
+ }
+//! [1] //! [2]
+ timer->start(100);
+ setLayout(layout);
+
+ setWindowTitle(tr("Concentric Circles"));
+}
+//! [2]
+
+//! [3]
+QLabel *Window::createLabel(const QString &text)
+{
+ QLabel *label = new QLabel(text);
+ label->setAlignment(Qt::AlignCenter);
+ label->setMargin(2);
+ label->setFrameStyle(QFrame::Box | QFrame::Sunken);
+ return label;
+}
+//! [3]
diff --git a/examples/painting/concentriccircles/window.h b/examples/painting/concentriccircles/window.h
new file mode 100644
index 0000000..2b3ad67
--- /dev/null
+++ b/examples/painting/concentriccircles/window.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+class CircleWidget;
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ QLabel *createLabel(const QString &text);
+
+ QLabel *aliasedLabel;
+ QLabel *antialiasedLabel;
+ QLabel *intLabel;
+ QLabel *floatLabel;
+ CircleWidget *circleWidgets[2][2];
+};
+//! [0]
+
+#endif
diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro
new file mode 100644
index 0000000..8b63752
--- /dev/null
+++ b/examples/painting/fontsampler/fontsampler.pro
@@ -0,0 +1,10 @@
+FORMS = mainwindowbase.ui
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/fontsampler
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fontsampler.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/fontsampler
+INSTALLS += target sources
diff --git a/examples/painting/fontsampler/main.cpp b/examples/painting/fontsampler/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/painting/fontsampler/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp
new file mode 100644
index 0000000..424f175
--- /dev/null
+++ b/examples/painting/fontsampler/mainwindow.cpp
@@ -0,0 +1,373 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupUi(this);
+
+ sampleSizes << 32 << 24 << 16 << 14 << 12 << 8 << 4 << 2 << 1;
+ markedCount = 0;
+ setupFontTree();
+
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+ this, SLOT(showFont(QTreeWidgetItem *)));
+ connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+ this, SLOT(updateStyles(QTreeWidgetItem *, int)));
+
+ fontTree->setItemSelected(fontTree->topLevelItem(0), true);
+ showFont(fontTree->topLevelItem(0));
+}
+
+void MainWindow::setupFontTree()
+{
+ QFontDatabase database;
+ fontTree->setColumnCount(1);
+ fontTree->setHeaderLabels(QStringList() << tr("Font"));
+
+ foreach (QString family, database.families()) {
+ const QStringList styles = database.styles(family);
+ if (styles.isEmpty())
+ continue;
+
+ QTreeWidgetItem *familyItem = new QTreeWidgetItem(fontTree);
+ familyItem->setText(0, family);
+ familyItem->setCheckState(0, Qt::Unchecked);
+
+ foreach (QString style, styles) {
+ QTreeWidgetItem *styleItem = new QTreeWidgetItem(familyItem);
+ styleItem->setText(0, style);
+ styleItem->setCheckState(0, Qt::Unchecked);
+ styleItem->setData(0, Qt::UserRole,
+ QVariant(database.weight(family, style)));
+ styleItem->setData(0, Qt::UserRole + 1,
+ QVariant(database.italic(family, style)));
+ }
+ }
+}
+
+void MainWindow::on_clearAction_triggered()
+{
+ QTreeWidgetItem *currentItem = fontTree->currentItem();
+ foreach (QTreeWidgetItem *item, fontTree->selectedItems())
+ fontTree->setItemSelected(item, false);
+ fontTree->setItemSelected(currentItem, true);
+}
+
+void MainWindow::on_markAction_triggered()
+{
+ markUnmarkFonts(Qt::Checked);
+}
+
+void MainWindow::on_unmarkAction_triggered()
+{
+ markUnmarkFonts(Qt::Unchecked);
+}
+
+void MainWindow::markUnmarkFonts(Qt::CheckState state)
+{
+ QList<QTreeWidgetItem *> items = fontTree->selectedItems();
+ foreach (QTreeWidgetItem *item, items) {
+ if (item->checkState(0) != state)
+ item->setCheckState(0, state);
+ }
+}
+
+void MainWindow::showFont(QTreeWidgetItem *item)
+{
+ if (!item)
+ return;
+
+ QString family;
+ QString style;
+ int weight;
+ bool italic;
+
+ if (item->parent()) {
+ family = item->parent()->text(0);
+ style = item->text(0);
+ weight = item->data(0, Qt::UserRole).toInt();
+ italic = item->data(0, Qt::UserRole + 1).toBool();
+ } else {
+ family = item->text(0);
+ style = item->child(0)->text(0);
+ weight = item->child(0)->data(0, Qt::UserRole).toInt();
+ italic = item->child(0)->data(0, Qt::UserRole + 1).toBool();
+ }
+
+ QString oldText = textEdit->toPlainText().trimmed();
+ bool modified = textEdit->document()->isModified();
+ textEdit->clear();
+ textEdit->document()->setDefaultFont(QFont(family, 32, weight, italic));
+
+ QTextCursor cursor = textEdit->textCursor();
+ QTextBlockFormat blockFormat;
+ blockFormat.setAlignment(Qt::AlignCenter);
+ cursor.insertBlock(blockFormat);
+
+ if (modified)
+ cursor.insertText(QString(oldText));
+ else
+ cursor.insertText(QString("%1 %2").arg(family).arg(style));
+
+ textEdit->document()->setModified(modified);
+}
+
+void MainWindow::updateStyles(QTreeWidgetItem *item, int column)
+{
+ if (!item || column != 0)
+ return;
+
+ Qt::CheckState state = item->checkState(0);
+ QTreeWidgetItem *parent = item->parent();
+
+ if (parent) {
+
+ // Only count style items.
+ if (state == Qt::Checked)
+ ++markedCount;
+ else
+ --markedCount;
+
+ if (state == Qt::Checked &&
+ parent->checkState(0) == Qt::Unchecked) {
+ // Mark parent items when child items are checked.
+ parent->setCheckState(0, Qt::Checked);
+
+ } else if (state == Qt::Unchecked &&
+ parent->checkState(0) == Qt::Checked) {
+
+ bool marked = false;
+ for (int row = 0; row < parent->childCount(); ++row) {
+ if (parent->child(row)->checkState(0) == Qt::Checked) {
+ marked = true;
+ break;
+ }
+ }
+ // Unmark parent items when all child items are unchecked.
+ if (!marked)
+ parent->setCheckState(0, Qt::Unchecked);
+ }
+ } else {
+ int row;
+ int number = 0;
+ for (row = 0; row < item->childCount(); ++row) {
+ if (item->child(row)->checkState(0) == Qt::Checked)
+ ++number;
+ }
+
+ // Mark/unmark all child items when marking/unmarking top-level
+ // items.
+ if (state == Qt::Checked && number == 0) {
+ for (row = 0; row < item->childCount(); ++row) {
+ if (item->child(row)->checkState(0) == Qt::Unchecked)
+ item->child(row)->setCheckState(0, Qt::Checked);
+ }
+ } else if (state == Qt::Unchecked && number > 0) {
+ for (row = 0; row < item->childCount(); ++row) {
+ if (item->child(row)->checkState(0) == Qt::Checked)
+ item->child(row)->setCheckState(0, Qt::Unchecked);
+ }
+ }
+ }
+
+ printAction->setEnabled(markedCount > 0);
+ printPreviewAction->setEnabled(markedCount > 0);
+}
+
+void MainWindow::on_printAction_triggered()
+{
+ pageMap = currentPageMap();
+
+ if (pageMap.count() == 0)
+ return;
+
+ QPrinter printer(QPrinter::HighResolution);
+ QPrintDialog dialog(&printer, this);
+ if (dialog.exec() != QDialog::Accepted)
+ return;
+
+ int from = printer.fromPage();
+ int to = printer.toPage();
+ if (from <= 0 && to <= 0)
+ printer.setFromTo(1, pageMap.keys().count());
+
+ printDocument(&printer);
+}
+
+void MainWindow::printDocument(QPrinter *printer)
+{
+ printer->setFromTo(1, pageMap.count());
+
+ QProgressDialog progress(tr("Preparing font samples..."), tr("&Cancel"),
+ 0, pageMap.count(), this);
+ progress.setWindowModality(Qt::ApplicationModal);
+ progress.setWindowTitle(tr("Font Sampler"));
+ progress.setMinimum(printer->fromPage() - 1);
+ progress.setMaximum(printer->toPage());
+
+ QPainter painter;
+ painter.begin(printer);
+ bool firstPage = true;
+
+ for (int page = printer->fromPage(); page <= printer->toPage(); ++page) {
+
+ if (!firstPage)
+ printer->newPage();
+
+ qApp->processEvents();
+ if (progress.wasCanceled())
+ break;
+
+ printPage(page - 1, &painter, printer);
+ progress.setValue(page);
+ firstPage = false;
+ }
+
+ painter.end();
+}
+
+void MainWindow::on_printPreviewAction_triggered()
+{
+ pageMap = currentPageMap();
+
+ if (pageMap.count() == 0)
+ return;
+
+ QPrinter printer(QPrinter::HighResolution);
+ QPrintPreviewDialog preview(&printer, this);
+ connect(&preview, SIGNAL(paintRequested(QPrinter *)),
+ this, SLOT(printDocument(QPrinter *)));
+ preview.exec();
+}
+
+QMap<QString, StyleItems> MainWindow::currentPageMap()
+{
+ QMap<QString, StyleItems> pageMap;
+
+ for (int row = 0; row < fontTree->topLevelItemCount(); ++row) {
+ QTreeWidgetItem *familyItem = fontTree->topLevelItem(row);
+ QString family;
+
+ if (familyItem->checkState(0) == Qt::Checked) {
+ family = familyItem->text(0);
+ pageMap[family] = StyleItems();
+ }
+
+ for (int childRow = 0; childRow < familyItem->childCount(); ++childRow) {
+ QTreeWidgetItem *styleItem = familyItem->child(childRow);
+ if (styleItem->checkState(0) == Qt::Checked)
+ pageMap[family].append(styleItem);
+ }
+ }
+
+ return pageMap;
+}
+
+void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
+{
+ QString family = pageMap.keys()[index];
+ StyleItems items = pageMap[family];
+
+ // Find the dimensions of the text on each page.
+ qreal width = 0.0;
+ qreal height = 0.0;
+ foreach (QTreeWidgetItem *item, items) {
+ QString style = item->text(0);
+ int weight = item->data(0, Qt::UserRole).toInt();
+ bool italic = item->data(0, Qt::UserRole + 1).toBool();
+
+ // Calculate the maximum width and total height of the text.
+ foreach (int size, sampleSizes) {
+ QFont font(family, size, weight, italic);
+ font = QFont(font, painter->device());
+ QFontMetricsF fontMetrics(font);
+ QRectF rect = fontMetrics.boundingRect(
+ QString("%1 %2").arg(family).arg(style));
+ width = qMax(rect.width(), width);
+ height += rect.height();
+ }
+ }
+
+ qreal xScale = printer->pageRect().width() / width;
+ qreal yScale = printer->pageRect().height() / height;
+ qreal scale = qMin(xScale, yScale);
+
+ qreal remainingHeight = printer->pageRect().height()/scale - height;
+ qreal spaceHeight = (remainingHeight/4.0) / (items.count() + 1);
+ qreal interLineHeight = (remainingHeight/4.0) / (sampleSizes.count() * items.count());
+
+ painter->save();
+ painter->translate(printer->pageRect().width()/2.0, printer->pageRect().height()/2.0);
+ painter->scale(scale, scale);
+ painter->setBrush(QBrush(Qt::black));
+
+ qreal x = -width/2.0;
+ qreal y = -height/2.0 - remainingHeight/4.0 + spaceHeight;
+
+ foreach (QTreeWidgetItem *item, items) {
+ QString style = item->text(0);
+ int weight = item->data(0, Qt::UserRole).toInt();
+ bool italic = item->data(0, Qt::UserRole + 1).toBool();
+
+ // Draw each line of text.
+ foreach (int size, sampleSizes) {
+ QFont font(family, size, weight, italic);
+ font = QFont(font, painter->device());
+ QFontMetricsF fontMetrics(font);
+ QRectF rect = fontMetrics.boundingRect(QString("%1 %2").arg(
+ font.family()).arg(style));
+ y += rect.height();
+ painter->setFont(font);
+ painter->drawText(QPointF(x, y),
+ QString("%1 %2").arg(family).arg(style));
+ y += interLineHeight;
+ }
+ y += spaceHeight;
+ }
+
+ painter->restore();
+}
diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h
new file mode 100644
index 0000000..25d7730
--- /dev/null
+++ b/examples/painting/fontsampler/mainwindow.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include "ui_mainwindowbase.h"
+
+QT_BEGIN_NAMESPACE
+class QTextEdit;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+typedef QList<QTreeWidgetItem *> StyleItems;
+
+class MainWindow : public QMainWindow, private Ui::MainWindowBase
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void on_clearAction_triggered();
+ void on_markAction_triggered();
+ void on_printAction_triggered();
+ void on_printPreviewAction_triggered();
+ void on_unmarkAction_triggered();
+ void printDocument(QPrinter *printer);
+ void printPage(int index, QPainter *painter, QPrinter *printer);
+ void showFont(QTreeWidgetItem *item);
+ void updateStyles(QTreeWidgetItem *item, int column);
+
+private:
+ QMap<QString, StyleItems> currentPageMap();
+ void markUnmarkFonts(Qt::CheckState state);
+ void setupFontTree();
+
+ QList<int> sampleSizes;
+ QMap<QString, StyleItems> pageMap;
+ int markedCount;
+};
+
+#endif
diff --git a/examples/painting/fontsampler/mainwindowbase.ui b/examples/painting/fontsampler/mainwindowbase.ui
new file mode 100644
index 0000000..6545b34
--- /dev/null
+++ b/examples/painting/fontsampler/mainwindowbase.ui
@@ -0,0 +1,140 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MainWindowBase</class>
+ <widget class="QMainWindow" name="MainWindowBase" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>345</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Font Sampler</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="textEdit" />
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_Selection" >
+ <property name="title" >
+ <string>&amp;Selection</string>
+ </property>
+ <addaction name="markAction" />
+ <addaction name="unmarkAction" />
+ <addaction name="clearAction" />
+ </widget>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="printPreviewAction" />
+ <addaction name="printAction" />
+ <addaction name="quitAction" />
+ </widget>
+ <addaction name="menu_File" />
+ <addaction name="menu_Selection" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <widget class="QDockWidget" name="dockWidget" >
+ <property name="features" >
+ <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable|QDockWidget::NoDockWidgetFeatures</set>
+ </property>
+ <property name="windowTitle" >
+ <string>Available Fonts</string>
+ </property>
+ <attribute name="dockWidgetArea" >
+ <number>1</number>
+ </attribute>
+ <widget class="QWidget" name="dockWidgetContents" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTreeWidget" name="fontTree" >
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <action name="printAction" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&amp;Print...</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+P</string>
+ </property>
+ </action>
+ <action name="quitAction" >
+ <property name="text" >
+ <string>E&amp;xit</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+Q</string>
+ </property>
+ </action>
+ <action name="markAction" >
+ <property name="text" >
+ <string>&amp;Mark</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+M</string>
+ </property>
+ </action>
+ <action name="unmarkAction" >
+ <property name="text" >
+ <string>&amp;Unmark</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+U</string>
+ </property>
+ </action>
+ <action name="clearAction" >
+ <property name="text" >
+ <string>&amp;Clear</string>
+ </property>
+ </action>
+ <action name="printPreviewAction" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Print Preview...</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/painting/imagecomposition/imagecomposer.cpp b/examples/painting/imagecomposition/imagecomposer.cpp
new file mode 100644
index 0000000..c16d85f
--- /dev/null
+++ b/examples/painting/imagecomposition/imagecomposer.cpp
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagecomposer.h"
+
+//! [0]
+static const QSize resultSize(200, 200);
+//! [0]
+
+//! [1]
+ImageComposer::ImageComposer()
+{
+ sourceButton = new QToolButton;
+ sourceButton->setIconSize(resultSize);
+
+ operatorComboBox = new QComboBox;
+ addOp(QPainter::CompositionMode_SourceOver, tr("SourceOver"));
+ addOp(QPainter::CompositionMode_DestinationOver, tr("DestinationOver"));
+ addOp(QPainter::CompositionMode_Clear, tr("Clear"));
+ addOp(QPainter::CompositionMode_Source, tr("Source"));
+ addOp(QPainter::CompositionMode_Destination, tr("Destination"));
+ addOp(QPainter::CompositionMode_SourceIn, tr("SourceIn"));
+ addOp(QPainter::CompositionMode_DestinationIn, tr("DestinationIn"));
+ addOp(QPainter::CompositionMode_SourceOut, tr("SourceOut"));
+ addOp(QPainter::CompositionMode_DestinationOut, tr("DestinationOut"));
+ addOp(QPainter::CompositionMode_SourceAtop, tr("SourceAtop"));
+ addOp(QPainter::CompositionMode_DestinationAtop, tr("DestinationAtop"));
+ addOp(QPainter::CompositionMode_Xor, tr("Xor"));
+ addOp(QPainter::CompositionMode_Plus, tr("Plus"));
+ addOp(QPainter::CompositionMode_Multiply, tr("Multiply"));
+ addOp(QPainter::CompositionMode_Screen, tr("Screen"));
+ addOp(QPainter::CompositionMode_Overlay, tr("Overlay"));
+ addOp(QPainter::CompositionMode_Darken, tr("Darken"));
+ addOp(QPainter::CompositionMode_Lighten, tr("Lighten"));
+ addOp(QPainter::CompositionMode_ColorDodge, tr("ColorDodge"));
+ addOp(QPainter::CompositionMode_ColorBurn, tr("ColorBurn"));
+ addOp(QPainter::CompositionMode_HardLight, tr("HardLight"));
+ addOp(QPainter::CompositionMode_SoftLight, tr("SoftLight"));
+ addOp(QPainter::CompositionMode_Difference, tr("Difference"));
+ addOp(QPainter::CompositionMode_Exclusion, tr("Exclusion"));
+//! [1]
+
+//! [2]
+ destinationButton = new QToolButton;
+ destinationButton->setIconSize(resultSize);
+
+ equalLabel = new QLabel(tr("="));
+
+ resultLabel = new QLabel;
+ resultLabel->setMinimumWidth(resultSize.width());
+//! [2]
+
+//! [3]
+ connect(sourceButton, SIGNAL(clicked()), this, SLOT(chooseSource()));
+ connect(operatorComboBox, SIGNAL(activated(int)),
+ this, SLOT(recalculateResult()));
+ connect(destinationButton, SIGNAL(clicked()),
+ this, SLOT(chooseDestination()));
+//! [3]
+
+//! [4]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(sourceButton, 0, 0, 3, 1);
+ mainLayout->addWidget(operatorComboBox, 1, 1);
+ mainLayout->addWidget(destinationButton, 0, 2, 3, 1);
+ mainLayout->addWidget(equalLabel, 1, 3);
+ mainLayout->addWidget(resultLabel, 0, 4, 3, 1);
+ mainLayout->setSizeConstraint(QLayout::SetFixedSize);
+ setLayout(mainLayout);
+//! [4]
+
+//! [5]
+ resultImage = QImage(resultSize, QImage::Format_ARGB32_Premultiplied);
+
+ loadImage(":/images/butterfly.png", &sourceImage, sourceButton);
+ loadImage(":/images/checker.png", &destinationImage, destinationButton);
+
+ setWindowTitle(tr("Image Composition"));
+}
+//! [5]
+
+//! [6]
+void ImageComposer::chooseSource()
+{
+ chooseImage(tr("Choose Source Image"), &sourceImage, sourceButton);
+}
+//! [6]
+
+//! [7]
+void ImageComposer::chooseDestination()
+{
+ chooseImage(tr("Choose Destination Image"), &destinationImage,
+ destinationButton);
+}
+//! [7]
+
+//! [8]
+void ImageComposer::recalculateResult()
+{
+ QPainter::CompositionMode mode = currentMode();
+
+ QPainter painter(&resultImage);
+ painter.setCompositionMode(QPainter::CompositionMode_Source);
+ painter.fillRect(resultImage.rect(), Qt::transparent);
+ painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
+ painter.drawImage(0, 0, destinationImage);
+ painter.setCompositionMode(mode);
+ painter.drawImage(0, 0, sourceImage);
+ painter.setCompositionMode(QPainter::CompositionMode_DestinationOver);
+ painter.fillRect(resultImage.rect(), Qt::white);
+ painter.end();
+
+ resultLabel->setPixmap(QPixmap::fromImage(resultImage));
+}
+//! [8]
+
+//! [9]
+void ImageComposer::addOp(QPainter::CompositionMode mode, const QString &name)
+{
+ operatorComboBox->addItem(name, mode);
+}
+//! [9]
+
+//! [10]
+void ImageComposer::chooseImage(const QString &title, QImage *image,
+ QToolButton *button)
+{
+ QString fileName = QFileDialog::getOpenFileName(this, title);
+ if (!fileName.isEmpty())
+ loadImage(fileName, image, button);
+}
+//! [10]
+
+//! [11]
+void ImageComposer::loadImage(const QString &fileName, QImage *image,
+ QToolButton *button)
+{
+ image->load(fileName);
+
+ QImage fixedImage(resultSize, QImage::Format_ARGB32_Premultiplied);
+ QPainter painter(&fixedImage);
+ painter.setCompositionMode(QPainter::CompositionMode_Source);
+ painter.fillRect(fixedImage.rect(), Qt::transparent);
+ painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
+ painter.drawImage(imagePos(*image), *image);
+ painter.end();
+ button->setIcon(QPixmap::fromImage(fixedImage));
+
+ *image = fixedImage;
+
+ recalculateResult();
+}
+//! [11]
+
+//! [12]
+QPainter::CompositionMode ImageComposer::currentMode() const
+{
+ return (QPainter::CompositionMode)
+ operatorComboBox->itemData(operatorComboBox->currentIndex()).toInt();
+}
+//! [12]
+
+//! [13]
+QPoint ImageComposer::imagePos(const QImage &image) const
+{
+ return QPoint((resultSize.width() - image.width()) / 2,
+ (resultSize.height() - image.height()) / 2);
+}
+//! [13]
diff --git a/examples/painting/imagecomposition/imagecomposer.h b/examples/painting/imagecomposition/imagecomposer.h
new file mode 100644
index 0000000..e8d039f
--- /dev/null
+++ b/examples/painting/imagecomposition/imagecomposer.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGECOMPOSER_H
+#define IMAGECOMPOSER_H
+
+#include <QPainter>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QLabel;
+class QToolButton;
+QT_END_NAMESPACE
+
+//! [0]
+class ImageComposer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ImageComposer();
+
+private slots:
+ void chooseSource();
+ void chooseDestination();
+ void recalculateResult();
+//! [0]
+
+//! [1]
+private:
+ void addOp(QPainter::CompositionMode mode, const QString &name);
+ void chooseImage(const QString &title, QImage *image, QToolButton *button);
+ void loadImage(const QString &fileName, QImage *image, QToolButton *button);
+ QPainter::CompositionMode currentMode() const;
+ QPoint imagePos(const QImage &image) const;
+
+ QToolButton *sourceButton;
+ QToolButton *destinationButton;
+ QComboBox *operatorComboBox;
+ QLabel *equalLabel;
+ QLabel *resultLabel;
+
+ QImage sourceImage;
+ QImage destinationImage;
+ QImage resultImage;
+};
+//! [1]
+
+#endif
diff --git a/examples/painting/imagecomposition/imagecomposition.pro b/examples/painting/imagecomposition/imagecomposition.pro
new file mode 100644
index 0000000..935a1d4
--- /dev/null
+++ b/examples/painting/imagecomposition/imagecomposition.pro
@@ -0,0 +1,11 @@
+HEADERS = imagecomposer.h
+SOURCES = imagecomposer.cpp \
+ main.cpp
+RESOURCES = imagecomposition.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/imagecomposition
+sources.files = $$SOURCES $$HEADERS $$RESOURCES images *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/imagecomposition
+INSTALLS += target sources
+
diff --git a/examples/painting/imagecomposition/imagecomposition.qrc b/examples/painting/imagecomposition/imagecomposition.qrc
new file mode 100644
index 0000000..ebba7b2
--- /dev/null
+++ b/examples/painting/imagecomposition/imagecomposition.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/butterfly.png</file>
+ <file>images/checker.png</file>
+</qresource>
+</RCC>
diff --git a/examples/painting/imagecomposition/images/background.png b/examples/painting/imagecomposition/images/background.png
new file mode 100644
index 0000000..f6ad899
--- /dev/null
+++ b/examples/painting/imagecomposition/images/background.png
Binary files differ
diff --git a/examples/painting/imagecomposition/images/blackrectangle.png b/examples/painting/imagecomposition/images/blackrectangle.png
new file mode 100644
index 0000000..5f2ecf8
--- /dev/null
+++ b/examples/painting/imagecomposition/images/blackrectangle.png
Binary files differ
diff --git a/examples/painting/imagecomposition/images/butterfly.png b/examples/painting/imagecomposition/images/butterfly.png
new file mode 100644
index 0000000..f3e050e
--- /dev/null
+++ b/examples/painting/imagecomposition/images/butterfly.png
Binary files differ
diff --git a/examples/painting/imagecomposition/images/checker.png b/examples/painting/imagecomposition/images/checker.png
new file mode 100644
index 0000000..546609d
--- /dev/null
+++ b/examples/painting/imagecomposition/images/checker.png
Binary files differ
diff --git a/examples/painting/imagecomposition/main.cpp b/examples/painting/imagecomposition/main.cpp
new file mode 100644
index 0000000..34527a4
--- /dev/null
+++ b/examples/painting/imagecomposition/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "imagecomposer.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(imagecomposition);
+
+ QApplication app(argc, argv);
+ ImageComposer composer;
+ composer.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/painting/painterpaths/main.cpp b/examples/painting/painterpaths/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/painting/painterpaths/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/painterpaths/painterpaths.pro b/examples/painting/painterpaths/painterpaths.pro
new file mode 100644
index 0000000..76c9e82
--- /dev/null
+++ b/examples/painting/painterpaths/painterpaths.pro
@@ -0,0 +1,12 @@
+HEADERS = renderarea.h \
+ window.h
+SOURCES = main.cpp \
+ renderarea.cpp \
+ window.cpp
+unix:!mac:LIBS += -lm
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/painterpaths
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS painterpaths.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/painterpaths
+INSTALLS += target sources
diff --git a/examples/painting/painterpaths/renderarea.cpp b/examples/painting/painterpaths/renderarea.cpp
new file mode 100644
index 0000000..64d149b
--- /dev/null
+++ b/examples/painting/painterpaths/renderarea.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "renderarea.h"
+
+//! [0]
+RenderArea::RenderArea(const QPainterPath &path, QWidget *parent)
+ : QWidget(parent), path(path)
+{
+ penWidth = 1;
+ rotationAngle = 0;
+ setBackgroundRole(QPalette::Base);
+}
+//! [0]
+
+//! [1]
+QSize RenderArea::minimumSizeHint() const
+{
+ return QSize(50, 50);
+}
+//! [1]
+
+//! [2]
+QSize RenderArea::sizeHint() const
+{
+ return QSize(100, 100);
+}
+//! [2]
+
+//! [3]
+void RenderArea::setFillRule(Qt::FillRule rule)
+{
+ path.setFillRule(rule);
+ update();
+}
+//! [3]
+
+//! [4]
+void RenderArea::setFillGradient(const QColor &color1, const QColor &color2)
+{
+ fillColor1 = color1;
+ fillColor2 = color2;
+ update();
+}
+//! [4]
+
+//! [5]
+void RenderArea::setPenWidth(int width)
+{
+ penWidth = width;
+ update();
+}
+//! [5]
+
+//! [6]
+void RenderArea::setPenColor(const QColor &color)
+{
+ penColor = color;
+ update();
+}
+//! [6]
+
+//! [7]
+void RenderArea::setRotationAngle(int degrees)
+{
+ rotationAngle = degrees;
+ update();
+}
+//! [7]
+
+//! [8]
+void RenderArea::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+//! [8] //! [9]
+ painter.scale(width() / 100.0, height() / 100.0);
+ painter.translate(50.0, 50.0);
+ painter.rotate(-rotationAngle);
+ painter.translate(-50.0, -50.0);
+
+//! [9] //! [10]
+ painter.setPen(QPen(penColor, penWidth, Qt::SolidLine, Qt::RoundCap,
+ Qt::RoundJoin));
+ QLinearGradient gradient(0, 0, 0, 100);
+ gradient.setColorAt(0.0, fillColor1);
+ gradient.setColorAt(1.0, fillColor2);
+ painter.setBrush(gradient);
+ painter.drawPath(path);
+}
+//! [10]
diff --git a/examples/painting/painterpaths/renderarea.h b/examples/painting/painterpaths/renderarea.h
new file mode 100644
index 0000000..39b7efd
--- /dev/null
+++ b/examples/painting/painterpaths/renderarea.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERAREA_H
+#define RENDERAREA_H
+
+#include <QPainterPath>
+#include <QWidget>
+
+//! [0]
+class RenderArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ RenderArea(const QPainterPath &path, QWidget *parent = 0);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+
+public slots:
+ void setFillRule(Qt::FillRule rule);
+ void setFillGradient(const QColor &color1, const QColor &color2);
+ void setPenWidth(int width);
+ void setPenColor(const QColor &color);
+ void setRotationAngle(int degrees);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+//! [0]
+
+//! [1]
+private:
+ QPainterPath path;
+ QColor fillColor1;
+ QColor fillColor2;
+ int penWidth;
+ QColor penColor;
+ int rotationAngle;
+};
+//! [1]
+
+#endif
diff --git a/examples/painting/painterpaths/window.cpp b/examples/painting/painterpaths/window.cpp
new file mode 100644
index 0000000..712e961
--- /dev/null
+++ b/examples/painting/painterpaths/window.cpp
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+
+#include "renderarea.h"
+#include "window.h"
+
+//! [0]
+const float Pi = 3.14159f;
+//! [0]
+
+//! [1]
+Window::Window()
+{
+ QPainterPath rectPath;
+ rectPath.moveTo(20.0, 30.0);
+ rectPath.lineTo(80.0, 30.0);
+ rectPath.lineTo(80.0, 70.0);
+ rectPath.lineTo(20.0, 70.0);
+ rectPath.closeSubpath();
+//! [1]
+
+//! [2]
+ QPainterPath roundRectPath;
+ roundRectPath.moveTo(80.0, 35.0);
+ roundRectPath.arcTo(70.0, 30.0, 10.0, 10.0, 0.0, 90.0);
+ roundRectPath.lineTo(25.0, 30.0);
+ roundRectPath.arcTo(20.0, 30.0, 10.0, 10.0, 90.0, 90.0);
+ roundRectPath.lineTo(20.0, 65.0);
+ roundRectPath.arcTo(20.0, 60.0, 10.0, 10.0, 180.0, 90.0);
+ roundRectPath.lineTo(75.0, 70.0);
+ roundRectPath.arcTo(70.0, 60.0, 10.0, 10.0, 270.0, 90.0);
+ roundRectPath.closeSubpath();
+//! [2]
+
+//! [3]
+ QPainterPath ellipsePath;
+ ellipsePath.moveTo(80.0, 50.0);
+ ellipsePath.arcTo(20.0, 30.0, 60.0, 40.0, 0.0, 360.0);
+//! [3]
+
+//! [4]
+ QPainterPath piePath;
+ piePath.moveTo(50.0, 50.0);
+ piePath.arcTo(20.0, 30.0, 60.0, 40.0, 60.0, 240.0);
+ piePath.closeSubpath();
+//! [4]
+
+//! [5]
+ QPainterPath polygonPath;
+ polygonPath.moveTo(10.0, 80.0);
+ polygonPath.lineTo(20.0, 10.0);
+ polygonPath.lineTo(80.0, 30.0);
+ polygonPath.lineTo(90.0, 70.0);
+ polygonPath.closeSubpath();
+//! [5]
+
+//! [6]
+ QPainterPath groupPath;
+ groupPath.moveTo(60.0, 40.0);
+ groupPath.arcTo(20.0, 20.0, 40.0, 40.0, 0.0, 360.0);
+ groupPath.moveTo(40.0, 40.0);
+ groupPath.lineTo(40.0, 80.0);
+ groupPath.lineTo(80.0, 80.0);
+ groupPath.lineTo(80.0, 40.0);
+ groupPath.closeSubpath();
+//! [6]
+
+//! [7]
+ QPainterPath textPath;
+ QFont timesFont("Times", 50);
+ timesFont.setStyleStrategy(QFont::ForceOutline);
+ textPath.addText(10, 70, timesFont, tr("Qt"));
+//! [7]
+
+//! [8]
+ QPainterPath bezierPath;
+ bezierPath.moveTo(20, 30);
+ bezierPath.cubicTo(80, 0, 50, 50, 80, 80);
+//! [8]
+
+//! [9]
+ QPainterPath starPath;
+ starPath.moveTo(90, 50);
+ for (int i = 1; i < 5; ++i) {
+ starPath.lineTo(50 + 40 * cos(0.8 * i * Pi),
+ 50 + 40 * sin(0.8 * i * Pi));
+ }
+ starPath.closeSubpath();
+//! [9]
+
+//! [10]
+ renderAreas[0] = new RenderArea(rectPath);
+ renderAreas[1] = new RenderArea(roundRectPath);
+ renderAreas[2] = new RenderArea(ellipsePath);
+ renderAreas[3] = new RenderArea(piePath);
+ renderAreas[4] = new RenderArea(polygonPath);
+ renderAreas[5] = new RenderArea(groupPath);
+ renderAreas[6] = new RenderArea(textPath);
+ renderAreas[7] = new RenderArea(bezierPath);
+ renderAreas[8] = new RenderArea(starPath);
+ Q_ASSERT(NumRenderAreas == 9);
+//! [10]
+
+//! [11]
+ fillRuleComboBox = new QComboBox;
+ fillRuleComboBox->addItem(tr("Odd Even"), Qt::OddEvenFill);
+ fillRuleComboBox->addItem(tr("Winding"), Qt::WindingFill);
+
+ fillRuleLabel = new QLabel(tr("Fill &Rule:"));
+ fillRuleLabel->setBuddy(fillRuleComboBox);
+//! [11]
+
+//! [12]
+ fillColor1ComboBox = new QComboBox;
+ populateWithColors(fillColor1ComboBox);
+ fillColor1ComboBox->setCurrentIndex(
+ fillColor1ComboBox->findText("mediumslateblue"));
+
+ fillColor2ComboBox = new QComboBox;
+ populateWithColors(fillColor2ComboBox);
+ fillColor2ComboBox->setCurrentIndex(
+ fillColor2ComboBox->findText("cornsilk"));
+
+ fillGradientLabel = new QLabel(tr("&Fill Gradient:"));
+ fillGradientLabel->setBuddy(fillColor1ComboBox);
+
+ fillToLabel = new QLabel(tr("to"));
+ fillToLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+ penWidthSpinBox = new QSpinBox;
+ penWidthSpinBox->setRange(0, 20);
+
+ penWidthLabel = new QLabel(tr("&Pen Width:"));
+ penWidthLabel->setBuddy(penWidthSpinBox);
+
+ penColorComboBox = new QComboBox;
+ populateWithColors(penColorComboBox);
+ penColorComboBox->setCurrentIndex(
+ penColorComboBox->findText("darkslateblue"));
+
+ penColorLabel = new QLabel(tr("Pen &Color:"));
+ penColorLabel->setBuddy(penColorComboBox);
+
+ rotationAngleSpinBox = new QSpinBox;
+ rotationAngleSpinBox->setRange(0, 359);
+ rotationAngleSpinBox->setWrapping(true);
+ rotationAngleSpinBox->setSuffix("\xB0");
+
+ rotationAngleLabel = new QLabel(tr("&Rotation Angle:"));
+ rotationAngleLabel->setBuddy(rotationAngleSpinBox);
+//! [12]
+
+//! [16]
+ connect(fillRuleComboBox, SIGNAL(activated(int)),
+ this, SLOT(fillRuleChanged()));
+ connect(fillColor1ComboBox, SIGNAL(activated(int)),
+ this, SLOT(fillGradientChanged()));
+ connect(fillColor2ComboBox, SIGNAL(activated(int)),
+ this, SLOT(fillGradientChanged()));
+ connect(penColorComboBox, SIGNAL(activated(int)),
+ this, SLOT(penColorChanged()));
+
+ for (int i = 0; i < NumRenderAreas; ++i) {
+ connect(penWidthSpinBox, SIGNAL(valueChanged(int)),
+ renderAreas[i], SLOT(setPenWidth(int)));
+ connect(rotationAngleSpinBox, SIGNAL(valueChanged(int)),
+ renderAreas[i], SLOT(setRotationAngle(int)));
+ }
+
+//! [16] //! [17]
+ QGridLayout *topLayout = new QGridLayout;
+ for (int i = 0; i < NumRenderAreas; ++i)
+ topLayout->addWidget(renderAreas[i], i / 3, i % 3);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addLayout(topLayout, 0, 0, 1, 4);
+ mainLayout->addWidget(fillRuleLabel, 1, 0);
+ mainLayout->addWidget(fillRuleComboBox, 1, 1, 1, 3);
+ mainLayout->addWidget(fillGradientLabel, 2, 0);
+ mainLayout->addWidget(fillColor1ComboBox, 2, 1);
+ mainLayout->addWidget(fillToLabel, 2, 2);
+ mainLayout->addWidget(fillColor2ComboBox, 2, 3);
+ mainLayout->addWidget(penWidthLabel, 3, 0);
+ mainLayout->addWidget(penWidthSpinBox, 3, 1, 1, 3);
+ mainLayout->addWidget(penColorLabel, 4, 0);
+ mainLayout->addWidget(penColorComboBox, 4, 1, 1, 3);
+ mainLayout->addWidget(rotationAngleLabel, 5, 0);
+ mainLayout->addWidget(rotationAngleSpinBox, 5, 1, 1, 3);
+ setLayout(mainLayout);
+//! [17]
+
+//! [18]
+ fillRuleChanged();
+ fillGradientChanged();
+ penColorChanged();
+ penWidthSpinBox->setValue(2);
+
+ setWindowTitle(tr("Painter Paths"));
+}
+//! [18]
+
+//! [19]
+void Window::fillRuleChanged()
+{
+ Qt::FillRule rule = (Qt::FillRule)currentItemData(fillRuleComboBox).toInt();
+
+ for (int i = 0; i < NumRenderAreas; ++i)
+ renderAreas[i]->setFillRule(rule);
+}
+//! [19]
+
+//! [20]
+void Window::fillGradientChanged()
+{
+ QColor color1 = qvariant_cast<QColor>(currentItemData(fillColor1ComboBox));
+ QColor color2 = qvariant_cast<QColor>(currentItemData(fillColor2ComboBox));
+
+ for (int i = 0; i < NumRenderAreas; ++i)
+ renderAreas[i]->setFillGradient(color1, color2);
+}
+//! [20]
+
+//! [21]
+void Window::penColorChanged()
+{
+ QColor color = qvariant_cast<QColor>(currentItemData(penColorComboBox));
+
+ for (int i = 0; i < NumRenderAreas; ++i)
+ renderAreas[i]->setPenColor(color);
+}
+//! [21]
+
+//! [22]
+void Window::populateWithColors(QComboBox *comboBox)
+{
+ QStringList colorNames = QColor::colorNames();
+ foreach (QString name, colorNames)
+ comboBox->addItem(name, QColor(name));
+}
+//! [22]
+
+//! [23]
+QVariant Window::currentItemData(QComboBox *comboBox)
+{
+ return comboBox->itemData(comboBox->currentIndex());
+}
+//! [23]
diff --git a/examples/painting/painterpaths/window.h b/examples/painting/painterpaths/window.h
new file mode 100644
index 0000000..f2ad0ae
--- /dev/null
+++ b/examples/painting/painterpaths/window.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QLabel;
+class QSpinBox;
+QT_END_NAMESPACE
+class RenderArea;
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private slots:
+ void fillRuleChanged();
+ void fillGradientChanged();
+ void penColorChanged();
+//! [0]
+
+//! [1]
+private:
+ void populateWithColors(QComboBox *comboBox);
+ QVariant currentItemData(QComboBox *comboBox);
+//! [1]
+
+//! [2]
+ enum { NumRenderAreas = 9 };
+
+ RenderArea *renderAreas[NumRenderAreas];
+ QLabel *fillRuleLabel;
+ QLabel *fillGradientLabel;
+ QLabel *fillToLabel;
+ QLabel *penWidthLabel;
+ QLabel *penColorLabel;
+ QLabel *rotationAngleLabel;
+ QComboBox *fillRuleComboBox;
+ QComboBox *fillColor1ComboBox;
+ QComboBox *fillColor2ComboBox;
+ QSpinBox *penWidthSpinBox;
+ QComboBox *penColorComboBox;
+ QSpinBox *rotationAngleSpinBox;
+};
+//! [2]
+
+#endif
diff --git a/examples/painting/painting.pro b/examples/painting/painting.pro
new file mode 100644
index 0000000..b6fad5a
--- /dev/null
+++ b/examples/painting/painting.pro
@@ -0,0 +1,16 @@
+TEMPLATE = subdirs
+SUBDIRS = basicdrawing \
+ concentriccircles \
+ imagecomposition \
+ painterpaths \
+ transformations
+
+!wince*: SUBDIRS += fontsampler
+
+contains(QT_CONFIG, svg): SUBDIRS += svgviewer
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS painting.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting
+INSTALLS += target sources
diff --git a/examples/painting/svgviewer/files/bubbles.svg b/examples/painting/svgviewer/files/bubbles.svg
new file mode 100644
index 0000000..65867da
--- /dev/null
+++ b/examples/painting/svgviewer/files/bubbles.svg
@@ -0,0 +1,215 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="20cm" height="15cm" viewBox="0 0 800 600"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Semi-transparent bubbles on a colored background.</desc>
+ <defs>
+ <!-- Create radial gradients for each bubble. -->
+ <radialGradient id="blueBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdcdff" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#cdaacd" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="redBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffcdcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbb99" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="greenBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#cdffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#99aaaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="yellowBubble" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" stop-opacity="1" />
+ <stop offset="25%" stop-color="#ffffcd" stop-opacity=".65" />
+ <stop offset="100%" stop-color="#bbbbaa" stop-opacity=".75" />
+ </radialGradient>
+ <radialGradient id="background" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="400" fx="250" fy="250">
+ <stop offset="0%" stop-color="#ffffee" />
+ <stop offset="100%" stop-color="#ccccaa" />
+ </radialGradient>
+ <linearGradient id="surface" gradientUnits="userSpaceOnUse"
+ x1="-100" y1="200" x2="400" y2="200">
+ <stop offset="0%" stop-color="#ffffcc" />
+ <stop offset="100%" stop-color="#bbbb88" />
+ </linearGradient>
+
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadowGrad)" cx="0" cy="0" r="100" />
+ <g id="bubble">
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <circle cx="0" cy="0" r="100" />
+ </g>
+ </defs>
+ <g>
+ <rect fill="url(#background)" x="0" y="0" width="800" height="600" />
+ </g>
+
+ <g transform="translate(200,700)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(315,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(80,700)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(255,700)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(565,700)">
+ <g transform="scale(0.4,0.4)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="4s" dur="8s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(715,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="4s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(645,700)">
+ <g transform="scale(0.375,0.375)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="0s" dur="11s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(555,700)">
+ <g transform="scale(0.9,0.9)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="7.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(360,700)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#bubble" fill="url(#blueBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="3s" dur="6s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(215,700)">
+ <g transform="scale(0.45,0.45)">
+ <use xlink:href="#bubble" fill="url(#redBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="5.5s" dur="7s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(420,700)">
+ <g transform="scale(0.75,0.75)">
+ <use xlink:href="#bubble" fill="url(#greenBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="1s" dur="9s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(815,700)">
+ <g transform="scale(0.6,0.6)">
+ <use xlink:href="#bubble" fill="url(#yellowBubble)" />
+ </g>
+ <animateTransform attributeName="transform" type="translate"
+ values="0,0; 0,-800" begin="2s" dur="9.5s" fill="freeze" repeatCount="indefinite" />
+ </g>
+
+ <g transform="translate(225,375)" >
+ <g transform="scale(1.0,0.5)" >
+ <path d="M 0 0 L 350 0 L 450 450 L -100 450 z"
+ fill="url(#surface)" stroke="none" />
+ </g>
+ </g>
+ <g transform="translate(200,0)" >
+ <g transform="translate(200,490) scale(2.0,1.0) rotate(45)" >
+ <rect fill="#a6ce39" x="-69" y="-69" width="138" height="138" />
+ <circle fill="black" cx="0" cy="0" r="50" />
+ <circle fill="#a6ce39" cx="0" cy="0" r="33" />
+ <path fill="black" d="M 37,50 L 50,37 L 12,-1 L 22,-11 L 10,-24 L -24,10
+ L -11,22 L -1,12 Z" />
+ <animateTransform attributeName="transform" type="rotate" values="0; 360"
+ begin="0s" dur="10s" fill="freeze" repeatCount="indefinite" />
+ </g>
+ <g transform="translate(200,375)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,440)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,475)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,525)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/examples/painting/svgviewer/files/cubic.svg b/examples/painting/svgviewer/files/cubic.svg
new file mode 100644
index 0000000..492bb72
--- /dev/null
+++ b/examples/painting/svgviewer/files/cubic.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="10cm" height="10cm" viewBox="0 0 1000 1000"
+ xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
+ <title>Example cubic02 - cubic Bezier commands in path data</title>
+ <desc>Picture showing examples of "C" and "S" commands,
+ along with annotations showing the control points
+ and end points</desc>
+
+ <rect fill="none" stroke="blue" stroke-width="1" x="1" y="1" width="998" height="998" />
+
+ <!-- Path 1 -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="100,200 100,100" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="400,100 400,200" />
+ <path fill="none" stroke="red" stroke-width="5" d="M100,200 C100,100 400,100 400,200" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="100" cy="200" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="400" cy="200" r="10" />
+ <circle class="CtlPoint" cx="100" cy="100" r="10" />
+ <circle class="CtlPoint" cx="400" cy="100" r="10" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="250" y="275">M100,200 C100,100 400,100 400,200</text>
+
+ <!-- Path 2 -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="100,500 25,400" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="475,400 400,500" />
+ <path fill="none" stroke="red" stroke-width="5" d="M100,500 C25,400 475,400 400,500" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="100" cy="500" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="400" cy="500" r="10" />
+ <circle fill="#888888" stroke="none" cx="25" cy="400" r="10" />
+ <circle fill="#888888" stroke="none" cx="475" cy="400" r="10" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="250" y="575">M100,500 C25,400 475,400 400,500</text>
+
+ <!-- Path 3 -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="100,800 175,700" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="325,700 400,800" />
+ <path fill="none" stroke="red" stroke-width="5" d="M100,800 C175,700 325,700 400,800" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="100" cy="800" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="400" cy="800" r="10" />
+ <circle fill="#888888" stroke="none" cx="175" cy="700" r="10" />
+ <circle fill="#888888" stroke="none" cx="325" cy="700" r="10" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="250" y="875">M100,800 C175,700 325,700 400,800</text>
+
+ <!-- Path 4 -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="600,200 675,100" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="975,100 900,200" />
+ <path fill="none" stroke="red" stroke-width="5" d="M600,200 C675,100 975,100 900,200" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="600" cy="200" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="900" cy="200" r="10" />
+ <circle fill="#888888" stroke="none" cx="675" cy="100" r="10" />
+ <circle fill="#888888" stroke="none" cx="975" cy="100" r="10" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="750" y="275">M600,200 C675,100 975,100 900,200</text>
+
+ <!-- Path 5 -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="600,500 600,350" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="900,650 900,500" />
+ <path fill="none" stroke="red" stroke-width="5" d="M600,500 C600,350 900,650 900,500" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="600" cy="500" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="900" cy="500" r="10" />
+ <circle fill="#888888" stroke="none" cx="600" cy="350" r="10" />
+ <circle fill="#888888" stroke="none" cx="900" cy="650" r="10" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="750" y="575">M600,500 C600,350 900,650 900,500</text>
+
+ <!-- Path 6 (C and S command) -->
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="600,800 625,700" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="725,700 750,800" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="750,800 775,900" />
+ <polyline fill="none" stroke="#888888" stroke-width="2" points="875,900 900,800" />
+ <path fill="none" stroke="red" stroke-width="5" d="M600,800 C625,700 725,700 750,800
+ S875,900 900,800" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="600" cy="800" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="750" cy="800" r="10" />
+ <circle fill="none" stroke="#888888" stroke-width="2" cx="900" cy="800" r="10" />
+ <circle fill="#888888" stroke="none" cx="625" cy="700" r="10" />
+ <circle fill="#888888" stroke="none" cx="725" cy="700" r="10" />
+ <circle fill="#888888" stroke="none" cx="875" cy="900" r="10" />
+ <circle fill="none" stroke="blue" stroke-width="4" cx="775" cy="900" r="9" />
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="750" y="945">M600,800 C625,700 725,700 750,800</text>
+ <text text-anchor="middle" font-size="22" font-family="Verdana" x="750" y="975">S875,900 900,800</text>
+</svg>
diff --git a/examples/painting/svgviewer/files/spheres.svg b/examples/painting/svgviewer/files/spheres.svg
new file mode 100644
index 0000000..b23164b
--- /dev/null
+++ b/examples/painting/svgviewer/files/spheres.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" standalone="no"?>
+<svg width="8cm" height="8cm" viewBox="0 0 400 400"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink/"
+ baseProfile="tiny" version="1.2">
+ <title>Spheres</title>
+ <desc>Gradient filled spheres with different colors.</desc>
+ <defs>
+ <!-- Create radial gradients for each circle to make them look like
+ spheres. -->
+ <radialGradient id="blueSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="blue" />
+ <stop offset="100%" stop-color="#222244" />
+ </radialGradient>
+ <radialGradient id="redSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="red" />
+ <stop offset="100%" stop-color="#442222" />
+ </radialGradient>
+ <radialGradient id="greenSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="green" />
+ <stop offset="100%" stop-color="#113311" />
+ </radialGradient>
+ <radialGradient id="yellowSphere" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="-50">
+ <stop offset="0%" stop-color="white" />
+ <stop offset="75%" stop-color="yellow" />
+ <stop offset="100%" stop-color="#444422" />
+ </radialGradient>
+ <radialGradient id="shadowGrad" gradientUnits="userSpaceOnUse"
+ cx="0" cy="0" r="100" fx="-50" fy="50">
+ <stop offset="0%" stop-color="black" stop-opacity="1.0" />
+ <stop offset="100%" stop-color="white" stop-opacity="0.0" />
+ </radialGradient>
+
+ <!-- Define a shadow for each sphere. -->
+ <circle id="shadow" fill="url(#shadowGrad)" cx="0" cy="0" r="100" />
+ </defs>
+ <g fill="#ffee99" stroke="none" >
+ <rect x="0" y="0" width="400" height="400" />
+ </g>
+ <g fill="white" stroke="none" >
+ <rect x="0" y="175" width="400" height="225" />
+ </g>
+ <g transform="translate(200,175)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#blueSphere)" cx="0" cy="0" r="100" />
+ </g>
+ <g transform="translate(315,240)">
+ <g transform="scale(0.5,0.5)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#redSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(80,275)">
+ <g transform="scale(0.65,0.65)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#greenSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+ <g transform="translate(255,325)">
+ <g transform="scale(0.3,0.3)">
+ <use xlink:href="#shadow" transform="translate(25,55) scale(1.0,0.5)" />
+ <circle fill="url(#yellowSphere)" cx="0" cy="0" r="100" />
+ </g>
+ </g>
+</svg>
diff --git a/examples/painting/svgviewer/main.cpp b/examples/painting/svgviewer/main.cpp
new file mode 100644
index 0000000..18520f7
--- /dev/null
+++ b/examples/painting/svgviewer/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QString>
+#ifndef QT_NO_OPENGL
+#include <QGLFormat>
+#endif
+
+#include "mainwindow.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(svgviewer);
+
+ QApplication app(argc, argv);
+
+ MainWindow window;
+ if (argc == 2)
+ window.openFile(argv[1]);
+ else
+ window.openFile(":/files/bubbles.svg");
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/svgviewer/mainwindow.cpp b/examples/painting/svgviewer/mainwindow.cpp
new file mode 100644
index 0000000..22393eb
--- /dev/null
+++ b/examples/painting/svgviewer/mainwindow.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QtGui>
+
+#include "svgview.h"
+
+MainWindow::MainWindow()
+ : QMainWindow()
+ , m_view(new SvgView)
+{
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ QAction *openAction = fileMenu->addAction(tr("&Open..."));
+ openAction->setShortcut(QKeySequence(tr("Ctrl+O")));
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
+
+ menuBar()->addMenu(fileMenu);
+
+ QMenu *viewMenu = new QMenu(tr("&View"), this);
+ m_backgroundAction = viewMenu->addAction(tr("&Background"));
+ m_backgroundAction->setEnabled(false);
+ m_backgroundAction->setCheckable(true);
+ m_backgroundAction->setChecked(false);
+ connect(m_backgroundAction, SIGNAL(toggled(bool)), m_view, SLOT(setViewBackground(bool)));
+
+ m_outlineAction = viewMenu->addAction(tr("&Outline"));
+ m_outlineAction->setEnabled(false);
+ m_outlineAction->setCheckable(true);
+ m_outlineAction->setChecked(true);
+ connect(m_outlineAction, SIGNAL(toggled(bool)), m_view, SLOT(setViewOutline(bool)));
+
+ menuBar()->addMenu(viewMenu);
+
+ QMenu *rendererMenu = new QMenu(tr("&Renderer"), this);
+ m_nativeAction = rendererMenu->addAction(tr("&Native"));
+ m_nativeAction->setCheckable(true);
+ m_nativeAction->setChecked(true);
+#ifndef QT_NO_OPENGL
+ m_glAction = rendererMenu->addAction(tr("&OpenGL"));
+ m_glAction->setCheckable(true);
+#endif
+ m_imageAction = rendererMenu->addAction(tr("&Image"));
+ m_imageAction->setCheckable(true);
+
+#ifndef QT_NO_OPENGL
+ rendererMenu->addSeparator();
+ m_highQualityAntialiasingAction = rendererMenu->addAction(tr("&High Quality Antialiasing"));
+ m_highQualityAntialiasingAction->setEnabled(false);
+ m_highQualityAntialiasingAction->setCheckable(true);
+ m_highQualityAntialiasingAction->setChecked(false);
+ connect(m_highQualityAntialiasingAction, SIGNAL(toggled(bool)), m_view, SLOT(setHighQualityAntialiasing(bool)));
+#endif
+
+ QActionGroup *rendererGroup = new QActionGroup(this);
+ rendererGroup->addAction(m_nativeAction);
+#ifndef QT_NO_OPENGL
+ rendererGroup->addAction(m_glAction);
+#endif
+ rendererGroup->addAction(m_imageAction);
+
+ menuBar()->addMenu(rendererMenu);
+
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(rendererGroup, SIGNAL(triggered(QAction *)),
+ this, SLOT(setRenderer(QAction *)));
+
+ setCentralWidget(m_view);
+ setWindowTitle(tr("SVG Viewer"));
+}
+
+void MainWindow::openFile(const QString &path)
+{
+ QString fileName;
+ if (path.isNull())
+ fileName = QFileDialog::getOpenFileName(this, tr("Open SVG File"),
+ m_currentPath, "SVG files (*.svg *.svgz *.svg.gz)");
+ else
+ fileName = path;
+
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+ if (!file.exists()) {
+ QMessageBox::critical(this, tr("Open SVG File"),
+ QString("Could not open file '%1'.").arg(fileName));
+
+ m_outlineAction->setEnabled(false);
+ m_backgroundAction->setEnabled(false);
+ return;
+ }
+
+ m_view->openFile(file);
+
+ if (!fileName.startsWith(":/")) {
+ m_currentPath = fileName;
+ setWindowTitle(tr("%1 - SVGViewer").arg(m_currentPath));
+ }
+
+ m_outlineAction->setEnabled(true);
+ m_backgroundAction->setEnabled(true);
+
+ resize(m_view->sizeHint() + QSize(80, 80 + menuBar()->height()));
+ }
+}
+
+void MainWindow::setRenderer(QAction *action)
+{
+#ifndef QT_NO_OPENGL
+ m_highQualityAntialiasingAction->setEnabled(false);
+#endif
+
+ if (action == m_nativeAction)
+ m_view->setRenderer(SvgView::Native);
+#ifndef QT_NO_OPENGL
+ else if (action == m_glAction) {
+ m_highQualityAntialiasingAction->setEnabled(true);
+ m_view->setRenderer(SvgView::OpenGL);
+ }
+#endif
+ else if (action == m_imageAction) {
+ m_view->setRenderer(SvgView::Image);
+ }
+}
diff --git a/examples/painting/svgviewer/mainwindow.h b/examples/painting/svgviewer/mainwindow.h
new file mode 100644
index 0000000..5df430b
--- /dev/null
+++ b/examples/painting/svgviewer/mainwindow.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QString>
+
+class SvgView;
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QGraphicsView;
+class QGraphicsScene;
+class QGraphicsRectItem;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void openFile(const QString &path = QString());
+ void setRenderer(QAction *action);
+
+private:
+ QAction *m_nativeAction;
+ QAction *m_glAction;
+ QAction *m_imageAction;
+ QAction *m_highQualityAntialiasingAction;
+ QAction *m_backgroundAction;
+ QAction *m_outlineAction;
+
+ SvgView *m_view;
+
+ QString m_currentPath;
+};
+
+#endif
diff --git a/examples/painting/svgviewer/svgview.cpp b/examples/painting/svgviewer/svgview.cpp
new file mode 100644
index 0000000..daf7bf0
--- /dev/null
+++ b/examples/painting/svgviewer/svgview.cpp
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "svgview.h"
+
+#include <QFile>
+#include <QWheelEvent>
+#include <QMouseEvent>
+#include <QGraphicsRectItem>
+#include <QGraphicsSvgItem>
+#include <QPaintEvent>
+#include <qmath.h>
+
+#ifndef QT_NO_OPENGL
+#include <QGLWidget>
+#endif
+
+SvgView::SvgView(QWidget *parent)
+ : QGraphicsView(parent)
+ , m_renderer(Native)
+ , m_svgItem(0)
+ , m_backgroundItem(0)
+ , m_outlineItem(0)
+{
+ setScene(new QGraphicsScene(this));
+ setTransformationAnchor(AnchorUnderMouse);
+ setDragMode(ScrollHandDrag);
+
+ // Prepare background check-board pattern
+ QPixmap tilePixmap(64, 64);
+ tilePixmap.fill(Qt::white);
+ QPainter tilePainter(&tilePixmap);
+ QColor color(220, 220, 220);
+ tilePainter.fillRect(0, 0, 32, 32, color);
+ tilePainter.fillRect(32, 32, 32, 32, color);
+ tilePainter.end();
+
+ setBackgroundBrush(tilePixmap);
+}
+
+void SvgView::drawBackground(QPainter *p, const QRectF &)
+{
+ p->save();
+ p->resetTransform();
+ p->drawTiledPixmap(viewport()->rect(), backgroundBrush().texture());
+ p->restore();
+}
+
+void SvgView::openFile(const QFile &file)
+{
+ if (!file.exists())
+ return;
+
+ QGraphicsScene *s = scene();
+
+ bool drawBackground = (m_backgroundItem ? m_backgroundItem->isVisible() : false);
+ bool drawOutline = (m_outlineItem ? m_outlineItem->isVisible() : true);
+
+ s->clear();
+ resetTransform();
+
+ m_svgItem = new QGraphicsSvgItem(file.fileName());
+ m_svgItem->setFlags(QGraphicsItem::ItemClipsToShape);
+ m_svgItem->setCacheMode(QGraphicsItem::NoCache);
+ m_svgItem->setZValue(0);
+
+ m_backgroundItem = new QGraphicsRectItem(m_svgItem->boundingRect());
+ m_backgroundItem->setBrush(Qt::white);
+ m_backgroundItem->setPen(Qt::NoPen);
+ m_backgroundItem->setVisible(drawBackground);
+ m_backgroundItem->setZValue(-1);
+
+ m_outlineItem = new QGraphicsRectItem(m_svgItem->boundingRect());
+ QPen outline(Qt::black, 2, Qt::DashLine);
+ outline.setCosmetic(true);
+ m_outlineItem->setPen(outline);
+ m_outlineItem->setBrush(Qt::NoBrush);
+ m_outlineItem->setVisible(drawOutline);
+ m_outlineItem->setZValue(1);
+
+ s->addItem(m_backgroundItem);
+ s->addItem(m_svgItem);
+ s->addItem(m_outlineItem);
+
+ s->setSceneRect(m_outlineItem->boundingRect().adjusted(-10, -10, 10, 10));
+}
+
+void SvgView::setRenderer(RendererType type)
+{
+ m_renderer = type;
+
+ if (m_renderer == OpenGL) {
+#ifndef QT_NO_OPENGL
+ setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+#endif
+ } else {
+ setViewport(new QWidget);
+ }
+}
+
+void SvgView::setHighQualityAntialiasing(bool highQualityAntialiasing)
+{
+#ifndef QT_NO_OPENGL
+ setRenderHint(QPainter::HighQualityAntialiasing, highQualityAntialiasing);
+#else
+ Q_UNUSED(highQualityAntialiasing);
+#endif
+}
+
+void SvgView::setViewBackground(bool enable)
+{
+ if (!m_backgroundItem)
+ return;
+
+ m_backgroundItem->setVisible(enable);
+}
+
+void SvgView::setViewOutline(bool enable)
+{
+ if (!m_outlineItem)
+ return;
+
+ m_outlineItem->setVisible(enable);
+}
+
+void SvgView::paintEvent(QPaintEvent *event)
+{
+ if (m_renderer == Image) {
+ if (m_image.size() != viewport()->size()) {
+ m_image = QImage(viewport()->size(), QImage::Format_ARGB32_Premultiplied);
+ }
+
+ QPainter imagePainter(&m_image);
+ QGraphicsView::render(&imagePainter);
+ imagePainter.end();
+
+ QPainter p(viewport());
+ p.drawImage(0, 0, m_image);
+
+ } else {
+ QGraphicsView::paintEvent(event);
+ }
+}
+
+void SvgView::wheelEvent(QWheelEvent *event)
+{
+ qreal factor = qPow(1.2, event->delta() / 240.0);
+ scale(factor, factor);
+ event->accept();
+}
+
diff --git a/examples/painting/svgviewer/svgview.h b/examples/painting/svgviewer/svgview.h
new file mode 100644
index 0000000..993268a
--- /dev/null
+++ b/examples/painting/svgviewer/svgview.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGVIEW_H
+#define SVGVIEW_H
+
+#include <QGraphicsView>
+
+QT_BEGIN_NAMESPACE
+class QWheelEvent;
+class QPaintEvent;
+class QFile;
+QT_END_NAMESPACE
+
+class SvgView : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ enum RendererType { Native, OpenGL, Image };
+
+ SvgView(QWidget *parent = 0);
+
+ void openFile(const QFile &file);
+ void setRenderer(RendererType type = Native);
+ void drawBackground(QPainter *p, const QRectF &rect);
+
+public slots:
+ void setHighQualityAntialiasing(bool highQualityAntialiasing);
+ void setViewBackground(bool enable);
+ void setViewOutline(bool enable);
+
+protected:
+ void wheelEvent(QWheelEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ RendererType m_renderer;
+
+ QGraphicsItem *m_svgItem;
+ QGraphicsRectItem *m_backgroundItem;
+ QGraphicsRectItem *m_outlineItem;
+
+ QImage m_image;
+};
+#endif // SVGVIEW_H
diff --git a/examples/painting/svgviewer/svgviewer.pro b/examples/painting/svgviewer/svgviewer.pro
new file mode 100644
index 0000000..b29e218
--- /dev/null
+++ b/examples/painting/svgviewer/svgviewer.pro
@@ -0,0 +1,23 @@
+HEADERS = mainwindow.h \
+ svgview.h
+RESOURCES = svgviewer.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ svgview.cpp
+QT += svg xml
+
+contains(QT_CONFIG, opengl): QT += opengl
+
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/svgviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES svgviewer.pro files
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/svgviewer
+INSTALLS += target sources
+
+wince*: {
+ addFiles.sources = files\*.svg
+ addFiles.path = \My Documents
+ DEPLOYMENT += addFiles
+}
diff --git a/examples/painting/svgviewer/svgviewer.qrc b/examples/painting/svgviewer/svgviewer.qrc
new file mode 100644
index 0000000..db611f5
--- /dev/null
+++ b/examples/painting/svgviewer/svgviewer.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>files/bubbles.svg</file>
+</qresource>
+</RCC>
+
diff --git a/examples/painting/transformations/main.cpp b/examples/painting/transformations/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/painting/transformations/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/painting/transformations/renderarea.cpp b/examples/painting/transformations/renderarea.cpp
new file mode 100644
index 0000000..a25869b
--- /dev/null
+++ b/examples/painting/transformations/renderarea.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "renderarea.h"
+
+//! [0]
+RenderArea::RenderArea(QWidget *parent)
+ : QWidget(parent)
+{
+ QFont newFont = font();
+ newFont.setPixelSize(12);
+ setFont(newFont);
+
+ QFontMetrics fontMetrics(newFont);
+ xBoundingRect = fontMetrics.boundingRect(tr("x"));
+ yBoundingRect = fontMetrics.boundingRect(tr("y"));
+}
+//! [0]
+
+//! [1]
+void RenderArea::setOperations(const QList<Operation> &operations)
+{
+ this->operations = operations;
+ update();
+}
+//! [1]
+
+//! [2]
+void RenderArea::setShape(const QPainterPath &shape)
+{
+ this->shape = shape;
+ update();
+}
+//! [2]
+
+//! [3]
+QSize RenderArea::minimumSizeHint() const
+{
+ return QSize(182, 182);
+}
+//! [3]
+
+//! [4]
+QSize RenderArea::sizeHint() const
+{
+ return QSize(232, 232);
+}
+//! [4]
+
+//! [5]
+void RenderArea::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillRect(event->rect(), QBrush(Qt::white));
+
+ painter.translate(66, 66);
+//! [5]
+
+//! [6]
+ painter.save();
+ transformPainter(painter);
+ drawShape(painter);
+ painter.restore();
+//! [6]
+
+//! [7]
+ drawOutline(painter);
+//! [7]
+
+//! [8]
+ transformPainter(painter);
+ drawCoordinates(painter);
+}
+//! [8]
+
+//! [9]
+void RenderArea::drawCoordinates(QPainter &painter)
+{
+ painter.setPen(Qt::red);
+
+ painter.drawLine(0, 0, 50, 0);
+ painter.drawLine(48, -2, 50, 0);
+ painter.drawLine(48, 2, 50, 0);
+ painter.drawText(60 - xBoundingRect.width() / 2,
+ 0 + xBoundingRect.height() / 2, tr("x"));
+
+ painter.drawLine(0, 0, 0, 50);
+ painter.drawLine(-2, 48, 0, 50);
+ painter.drawLine(2, 48, 0, 50);
+ painter.drawText(0 - yBoundingRect.width() / 2,
+ 60 + yBoundingRect.height() / 2, tr("y"));
+}
+//! [9]
+
+//! [10]
+void RenderArea::drawOutline(QPainter &painter)
+{
+ painter.setPen(Qt::darkGreen);
+ painter.setPen(Qt::DashLine);
+ painter.setBrush(Qt::NoBrush);
+ painter.drawRect(0, 0, 100, 100);
+}
+//! [10]
+
+//! [11]
+void RenderArea::drawShape(QPainter &painter)
+{
+ painter.fillPath(shape, Qt::blue);
+}
+//! [11]
+
+//! [12]
+void RenderArea::transformPainter(QPainter &painter)
+{
+ for (int i = 0; i < operations.size(); ++i) {
+ switch (operations[i]) {
+ case Translate:
+ painter.translate(50, 50);
+ break;
+ case Scale:
+ painter.scale(0.75, 0.75);
+ break;
+ case Rotate:
+ painter.rotate(60);
+ break;
+ case NoTransformation:
+ default:
+ ;
+ }
+ }
+}
+//! [12]
diff --git a/examples/painting/transformations/renderarea.h b/examples/painting/transformations/renderarea.h
new file mode 100644
index 0000000..04ab0d3
--- /dev/null
+++ b/examples/painting/transformations/renderarea.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERAREA_H
+#define RENDERAREA_H
+
+#include <QFont>
+#include <QList>
+#include <QPainterPath>
+#include <QRect>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+QT_END_NAMESPACE
+
+//! [0]
+enum Operation { NoTransformation, Translate, Rotate, Scale };
+//! [0]
+
+//! [1]
+class RenderArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ RenderArea(QWidget *parent = 0);
+
+ void setOperations(const QList<Operation> &operations);
+ void setShape(const QPainterPath &shape);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent(QPaintEvent *event);
+//! [1]
+
+//! [2]
+private:
+ void drawCoordinates(QPainter &painter);
+ void drawOutline(QPainter &painter);
+ void drawShape(QPainter &painter);
+ void transformPainter(QPainter &painter);
+
+ QList<Operation> operations;
+ QPainterPath shape;
+ QRect xBoundingRect;
+ QRect yBoundingRect;
+};
+//! [2]
+
+#endif
diff --git a/examples/painting/transformations/transformations.pro b/examples/painting/transformations/transformations.pro
new file mode 100644
index 0000000..a8ff610
--- /dev/null
+++ b/examples/painting/transformations/transformations.pro
@@ -0,0 +1,11 @@
+HEADERS = renderarea.h \
+ window.h
+SOURCES = main.cpp \
+ renderarea.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/painting/transformations
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS transformations.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/painting/transformations
+INSTALLS += target sources
diff --git a/examples/painting/transformations/window.cpp b/examples/painting/transformations/window.cpp
new file mode 100644
index 0000000..7d83654
--- /dev/null
+++ b/examples/painting/transformations/window.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ originalRenderArea = new RenderArea;
+
+ shapeComboBox = new QComboBox;
+ shapeComboBox->addItem(tr("Clock"));
+ shapeComboBox->addItem(tr("House"));
+ shapeComboBox->addItem(tr("Text"));
+ shapeComboBox->addItem(tr("Truck"));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(originalRenderArea, 0, 0);
+ layout->addWidget(shapeComboBox, 1, 0);
+//! [0]
+
+//! [1]
+ for (int i = 0; i < NumTransformedAreas; ++i) {
+ transformedRenderAreas[i] = new RenderArea;
+
+ operationComboBoxes[i] = new QComboBox;
+ operationComboBoxes[i]->addItem(tr("No transformation"));
+ operationComboBoxes[i]->addItem(tr("Rotate by 60\xB0"));
+ operationComboBoxes[i]->addItem(tr("Scale to 75%"));
+ operationComboBoxes[i]->addItem(tr("Translate by (50, 50)"));
+
+ connect(operationComboBoxes[i], SIGNAL(activated(int)),
+ this, SLOT(operationChanged()));
+
+ layout->addWidget(transformedRenderAreas[i], 0, i + 1);
+ layout->addWidget(operationComboBoxes[i], 1, i + 1);
+ }
+//! [1]
+
+//! [2]
+ setLayout(layout);
+ setupShapes();
+ shapeSelected(0);
+
+ setWindowTitle(tr("Transformations"));
+}
+//! [2]
+
+//! [3]
+void Window::setupShapes()
+{
+ QPainterPath truck;
+//! [3]
+ truck.setFillRule(Qt::WindingFill);
+ truck.moveTo(0.0, 87.0);
+ truck.lineTo(0.0, 60.0);
+ truck.lineTo(10.0, 60.0);
+ truck.lineTo(35.0, 35.0);
+ truck.lineTo(100.0, 35.0);
+ truck.lineTo(100.0, 87.0);
+ truck.lineTo(0.0, 87.0);
+ truck.moveTo(17.0, 60.0);
+ truck.lineTo(55.0, 60.0);
+ truck.lineTo(55.0, 40.0);
+ truck.lineTo(37.0, 40.0);
+ truck.lineTo(17.0, 60.0);
+ truck.addEllipse(17.0, 75.0, 25.0, 25.0);
+ truck.addEllipse(63.0, 75.0, 25.0, 25.0);
+
+//! [4]
+ QPainterPath clock;
+//! [4]
+ clock.addEllipse(-50.0, -50.0, 100.0, 100.0);
+ clock.addEllipse(-48.0, -48.0, 96.0, 96.0);
+ clock.moveTo(0.0, 0.0);
+ clock.lineTo(-2.0, -2.0);
+ clock.lineTo(0.0, -42.0);
+ clock.lineTo(2.0, -2.0);
+ clock.lineTo(0.0, 0.0);
+ clock.moveTo(0.0, 0.0);
+ clock.lineTo(2.732, -0.732);
+ clock.lineTo(24.495, 14.142);
+ clock.lineTo(0.732, 2.732);
+ clock.lineTo(0.0, 0.0);
+
+//! [5]
+ QPainterPath house;
+//! [5]
+ house.moveTo(-45.0, -20.0);
+ house.lineTo(0.0, -45.0);
+ house.lineTo(45.0, -20.0);
+ house.lineTo(45.0, 45.0);
+ house.lineTo(-45.0, 45.0);
+ house.lineTo(-45.0, -20.0);
+ house.addRect(15.0, 5.0, 20.0, 35.0);
+ house.addRect(-35.0, -15.0, 25.0, 25.0);
+
+//! [6]
+ QPainterPath text;
+//! [6]
+ QFont font;
+ font.setPixelSize(50);
+ QRect fontBoundingRect = QFontMetrics(font).boundingRect(tr("Qt"));
+ text.addText(-QPointF(fontBoundingRect.center()), font, tr("Qt"));
+
+//! [7]
+ shapes.append(clock);
+ shapes.append(house);
+ shapes.append(text);
+ shapes.append(truck);
+
+ connect(shapeComboBox, SIGNAL(activated(int)),
+ this, SLOT(shapeSelected(int)));
+}
+//! [7]
+
+//! [8]
+void Window::operationChanged()
+{
+ static const Operation operationTable[] = {
+ NoTransformation, Rotate, Scale, Translate
+ };
+
+ QList<Operation> operations;
+ for (int i = 0; i < NumTransformedAreas; ++i) {
+ int index = operationComboBoxes[i]->currentIndex();
+ operations.append(operationTable[index]);
+ transformedRenderAreas[i]->setOperations(operations);
+ }
+}
+//! [8]
+
+//! [9]
+void Window::shapeSelected(int index)
+{
+ QPainterPath shape = shapes[index];
+ originalRenderArea->setShape(shape);
+ for (int i = 0; i < NumTransformedAreas; ++i)
+ transformedRenderAreas[i]->setShape(shape);
+}
+//! [9]
diff --git a/examples/painting/transformations/window.h b/examples/painting/transformations/window.h
new file mode 100644
index 0000000..f4f05d6
--- /dev/null
+++ b/examples/painting/transformations/window.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QList>
+#include <QPainterPath>
+#include <QWidget>
+
+#include "renderarea.h"
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+public slots:
+ void operationChanged();
+ void shapeSelected(int index);
+//! [0]
+
+//! [1]
+private:
+ void setupShapes();
+
+ enum { NumTransformedAreas = 3 };
+ RenderArea *originalRenderArea;
+ RenderArea *transformedRenderAreas[NumTransformedAreas];
+ QComboBox *shapeComboBox;
+ QComboBox *operationComboBoxes[NumTransformedAreas];
+ QList<QPainterPath> shapes;
+};
+//! [1]
+
+#endif
diff --git a/examples/phonon/README b/examples/phonon/README
new file mode 100644
index 0000000..d0f4462
--- /dev/null
+++ b/examples/phonon/README
@@ -0,0 +1,39 @@
+Qt usese the Phonon cross-platform multimedia framework to play common
+multimedia formats.
+
+Applications can be written to take advantage of the native multimedia
+technologies on each platform via a consistent cross-platform Qt API.
+
+
+Some of the examples in this directory can be run from the example launcher;
+others can only be used from within Qt Designer.
+
+Documentation for these examples can be found via the "Tutorial and Examples"
+link in the main Qt documentation.
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/phonon/capabilities/capabilities.pro b/examples/phonon/capabilities/capabilities.pro
new file mode 100644
index 0000000..52b6b1b
--- /dev/null
+++ b/examples/phonon/capabilities/capabilities.pro
@@ -0,0 +1,16 @@
+QT += phonon
+
+HEADERS += window.h
+SOURCES += window.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/phonon/capabilities
+sources.files = $$SOURCES $$HEADERS capabilities.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/capabilities
+INSTALLS += target sources
+
+wince*{
+DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
+}
+
diff --git a/examples/phonon/capabilities/main.cpp b/examples/phonon/capabilities/main.cpp
new file mode 100644
index 0000000..a746925
--- /dev/null
+++ b/examples/phonon/capabilities/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [everything]
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ app.setApplicationName("Phonon Capabilities Example");
+
+ Window window;
+ window.show();
+
+ return app.exec();
+}
+//! [everything]
+
diff --git a/examples/phonon/capabilities/window.cpp b/examples/phonon/capabilities/window.cpp
new file mode 100644
index 0000000..920e3e0
--- /dev/null
+++ b/examples/phonon/capabilities/window.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [constructor]
+Window::Window()
+{
+ setupUi();
+ updateWidgets();
+
+ connect(Phonon::BackendCapabilities::notifier(),
+ SIGNAL(capabilitiesChanged()), this, SLOT(updateWidgets()));
+ connect(Phonon::BackendCapabilities::notifier(),
+ SIGNAL(availableAudioOutputDevicesChanged()), SLOT(updateWidgets()));
+}
+//! [constructor]
+
+//! [outputDevices]
+void Window::updateWidgets()
+{
+ devicesListView->setModel(new QStandardItemModel());
+ Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType> *model =
+ new Phonon::ObjectDescriptionModel<Phonon::AudioOutputDeviceType>();
+ model->setModelData(Phonon::BackendCapabilities::availableAudioOutputDevices());
+ devicesListView->setModel(model);
+//! [outputDevices]
+
+//! [mimeTypes]
+ mimeListWidget->clear();
+ QStringList mimeTypes =
+ Phonon::BackendCapabilities::availableMimeTypes();
+ foreach (QString mimeType, mimeTypes) {
+ QListWidgetItem *item = new QListWidgetItem(mimeListWidget);
+ item->setText(mimeType);
+ }
+//! [mimeTypes]
+
+//! [effects]
+ effectsTreeWidget->clear();
+ QList<Phonon::EffectDescription> effects =
+ Phonon::BackendCapabilities::availableAudioEffects();
+ foreach (Phonon::EffectDescription effect, effects) {
+ QTreeWidgetItem *item = new QTreeWidgetItem(effectsTreeWidget);
+ item->setText(0, tr("Effect"));
+ item->setText(1, effect.name());
+ item->setText(2, effect.description());
+//! [effects]
+
+//! [effectsParameters]
+ Phonon::Effect *instance = new Phonon::Effect(effect, this);
+ QList<Phonon::EffectParameter> parameters = instance->parameters();
+ for (int i = 0; i < parameters.size(); ++i) {
+ Phonon::EffectParameter parameter = parameters.at(i);
+
+ QVariant defaultValue = parameter.defaultValue();
+ QVariant minimumValue = parameter.minimumValue();
+ QVariant maximumValue = parameter.maximumValue();
+
+ QString valueString = QString("%1 / %2 / %3")
+ .arg(defaultValue.toString()).arg(minimumValue.toString())
+ .arg(maximumValue.toString());
+
+ QTreeWidgetItem *parameterItem = new QTreeWidgetItem(item);
+ parameterItem->setText(0, tr("Parameter"));
+ parameterItem->setText(1, parameter.name());
+ parameterItem->setText(2, parameter.description());
+ parameterItem->setText(3, QVariant::typeToName(parameter.type()));
+ parameterItem->setText(4, valueString);
+ }
+ }
+//! [effectsParameters]
+ for (int i = 0; i < effectsTreeWidget->columnCount(); ++i) {
+ if (i == 0)
+ effectsTreeWidget->setColumnWidth(0, 150);
+ else if (i == 2)
+ effectsTreeWidget->setColumnWidth(2, 350);
+ else
+ effectsTreeWidget->resizeColumnToContents(i);
+ }
+}
+
+void Window::setupUi()
+{
+ setupBackendBox();
+
+ QLayout *layout = new QVBoxLayout;
+ layout->addWidget(backendBox);
+
+ setLayout(layout);
+ setWindowTitle(tr("Backend Capabilities Example"));
+}
+
+void Window::setupBackendBox()
+{
+ backendBox = new QGroupBox(tr("Backend Capabilities"));
+
+ devicesLabel = new QLabel(tr("Available Audio Devices:"));
+ devicesListView = new QListView;
+
+ mimeTypesLabel = new QLabel(tr("Supported MIME Types:"));
+ mimeListWidget = new QListWidget;
+
+ effectsLabel = new QLabel(tr("Available Audio Effects:"));
+
+ QStringList headerLabels;
+ headerLabels << tr("Type") << tr("Name") << tr("Description") <<
+ tr("Value Type") << tr("Default/Min/Max Values");
+
+ effectsTreeWidget = new QTreeWidget;
+ effectsTreeWidget->setHeaderLabels(headerLabels);
+ effectsTreeWidget->setColumnCount(5);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(devicesLabel, 0, 0);
+ layout->addWidget(devicesListView, 1, 0);
+ layout->addWidget(mimeTypesLabel, 0, 1);
+ layout->addWidget(mimeListWidget, 1, 1);
+ layout->addWidget(effectsLabel, 2, 0);
+ layout->addWidget(effectsTreeWidget, 3, 0, 2, 2);
+ layout->setRowStretch(3, 100);
+
+ backendBox = new QGroupBox(tr("Backend Capabilities"));
+ backendBox->setLayout(layout);
+}
+
diff --git a/examples/phonon/capabilities/window.h b/examples/phonon/capabilities/window.h
new file mode 100644
index 0000000..23121d3
--- /dev/null
+++ b/examples/phonon/capabilities/window.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+#include <Phonon/AudioOutput>
+#include <Phonon/SeekSlider>
+#include <Phonon/MediaObject>
+#include <Phonon/VolumeSlider>
+#include <Phonon/BackendCapabilities>
+#include <Phonon/Effect>
+#include <Phonon/EffectParameter>
+#include <Phonon/ObjectDescriptionModel>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QGroupBox;
+class QPushButton;
+class QLabel;
+class QListWidget;
+class QListView;
+class QTextEdit;
+class QTreeWidget;
+QT_END_NAMESPACE
+
+
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+//! [windowMembers]
+private slots:
+ void updateWidgets();
+
+private:
+ void setupUi();
+ void setupBackendBox();
+
+ QGroupBox *backendBox;
+
+ QLabel *devicesLabel;
+ QLabel *mimeTypesLabel;
+ QLabel *effectsLabel;
+
+ QListWidget *mimeListWidget;
+ QListView *devicesListView;
+ QTreeWidget *effectsTreeWidget;
+//! [windowMembers]
+};
+
+#endif
+
diff --git a/examples/phonon/musicplayer/main.cpp b/examples/phonon/musicplayer/main.cpp
new file mode 100644
index 0000000..4a614c8
--- /dev/null
+++ b/examples/phonon/musicplayer/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//![1]
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+ app.setApplicationName("Music Player");
+ app.setQuitOnLastWindowClosed(true);
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
+//![1]
diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp
new file mode 100644
index 0000000..f50a2bd
--- /dev/null
+++ b/examples/phonon/musicplayer/mainwindow.cpp
@@ -0,0 +1,352 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+***************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//![0]
+MainWindow::MainWindow()
+{
+ audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
+ mediaObject = new Phonon::MediaObject(this);
+ metaInformationResolver = new Phonon::MediaObject(this);
+
+ mediaObject->setTickInterval(1000);
+//![0]
+//![2]
+ connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64)));
+ connect(mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
+ this, SLOT(stateChanged(Phonon::State, Phonon::State)));
+ connect(metaInformationResolver, SIGNAL(stateChanged(Phonon::State,Phonon::State)),
+ this, SLOT(metaStateChanged(Phonon::State, Phonon::State)));
+ connect(mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource &)),
+ this, SLOT(sourceChanged(const Phonon::MediaSource &)));
+ connect(mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish()));
+//![2]
+
+//![1]
+ Phonon::createPath(mediaObject, audioOutput);
+//![1]
+
+ setupActions();
+ setupMenus();
+ setupUi();
+ timeLcd->display("00:00");
+}
+
+//![6]
+void MainWindow::addFiles()
+{
+ QStringList files = QFileDialog::getOpenFileNames(this, tr("Select Music Files"),
+ QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
+
+ if (files.isEmpty())
+ return;
+
+ int index = sources.size();
+ foreach (QString string, files) {
+ Phonon::MediaSource source(string);
+
+ sources.append(source);
+ }
+ if (!sources.isEmpty())
+ metaInformationResolver->setCurrentSource(sources.at(index));
+
+}
+//![6]
+
+void MainWindow::about()
+{
+ QMessageBox::information(this, tr("About Music Player"),
+ tr("The Music Player example shows how to use Phonon - the multimedia"
+ " framework that comes with Qt - to create a simple music player."));
+}
+
+//![9]
+void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState */)
+{
+ switch (newState) {
+ case Phonon::ErrorState:
+ if (mediaObject->errorType() == Phonon::FatalError) {
+ QMessageBox::warning(this, tr("Fatal Error"),
+ mediaObject->errorString());
+ } else {
+ QMessageBox::warning(this, tr("Error"),
+ mediaObject->errorString());
+ }
+ break;
+//![9]
+//![10]
+ case Phonon::PlayingState:
+ playAction->setEnabled(false);
+ pauseAction->setEnabled(true);
+ stopAction->setEnabled(true);
+ break;
+ case Phonon::StoppedState:
+ stopAction->setEnabled(false);
+ playAction->setEnabled(true);
+ pauseAction->setEnabled(false);
+ timeLcd->display("00:00");
+ break;
+ case Phonon::PausedState:
+ pauseAction->setEnabled(false);
+ stopAction->setEnabled(true);
+ playAction->setEnabled(true);
+ break;
+//![10]
+ case Phonon::BufferingState:
+ break;
+ default:
+ ;
+ }
+}
+
+//![11]
+void MainWindow::tick(qint64 time)
+{
+ QTime displayTime(0, (time / 60000) % 60, (time / 1000) % 60);
+
+ timeLcd->display(displayTime.toString("mm:ss"));
+}
+//![11]
+
+//![12]
+void MainWindow::tableClicked(int row, int /* column */)
+{
+ bool wasPlaying = mediaObject->state() == Phonon::PlayingState;
+
+ mediaObject->stop();
+ mediaObject->clearQueue();
+
+ mediaObject->setCurrentSource(sources[row]);
+
+ if (wasPlaying)
+ mediaObject->play();
+ else
+ mediaObject->stop();
+}
+//![12]
+
+//![13]
+void MainWindow::sourceChanged(const Phonon::MediaSource &source)
+{
+ musicTable->selectRow(sources.indexOf(source));
+ timeLcd->display("00:00");
+}
+//![13]
+
+//![14]
+void MainWindow::metaStateChanged(Phonon::State newState, Phonon::State /* oldState */)
+{
+ if (newState == Phonon::ErrorState) {
+ QMessageBox::warning(this, tr("Error opening files"),
+ metaInformationResolver->errorString());
+ while (!sources.isEmpty() &&
+ !(sources.takeLast() == metaInformationResolver->currentSource()));
+ return;
+ }
+
+ if (newState != Phonon::StoppedState && newState != Phonon::PausedState)
+ return;
+
+ if (metaInformationResolver->currentSource().type() == Phonon::MediaSource::Invalid)
+ return;
+
+ QMap<QString, QString> metaData = metaInformationResolver->metaData();
+
+ QString title = metaData.value("TITLE");
+ if (title == "")
+ title = metaInformationResolver->currentSource().fileName();
+
+ QTableWidgetItem *titleItem = new QTableWidgetItem(title);
+ titleItem->setFlags(titleItem->flags() ^ Qt::ItemIsEditable);
+ QTableWidgetItem *artistItem = new QTableWidgetItem(metaData.value("ARTIST"));
+ artistItem->setFlags(artistItem->flags() ^ Qt::ItemIsEditable);
+ QTableWidgetItem *albumItem = new QTableWidgetItem(metaData.value("ALBUM"));
+ albumItem->setFlags(albumItem->flags() ^ Qt::ItemIsEditable);
+ QTableWidgetItem *yearItem = new QTableWidgetItem(metaData.value("DATE"));
+ yearItem->setFlags(yearItem->flags() ^ Qt::ItemIsEditable);
+//![14]
+
+ int currentRow = musicTable->rowCount();
+ musicTable->insertRow(currentRow);
+ musicTable->setItem(currentRow, 0, titleItem);
+ musicTable->setItem(currentRow, 1, artistItem);
+ musicTable->setItem(currentRow, 2, albumItem);
+ musicTable->setItem(currentRow, 3, yearItem);
+
+//![15]
+ if (musicTable->selectedItems().isEmpty()) {
+ musicTable->selectRow(0);
+ mediaObject->setCurrentSource(metaInformationResolver->currentSource());
+ }
+
+ Phonon::MediaSource source = metaInformationResolver->currentSource();
+ int index = sources.indexOf(metaInformationResolver->currentSource()) + 1;
+ if (sources.size() > index) {
+ metaInformationResolver->setCurrentSource(sources.at(index));
+ }
+ else {
+ musicTable->resizeColumnsToContents();
+ if (musicTable->columnWidth(0) > 300)
+ musicTable->setColumnWidth(0, 300);
+ }
+}
+//![15]
+
+//![16]
+void MainWindow::aboutToFinish()
+{
+ int index = sources.indexOf(mediaObject->currentSource()) + 1;
+ if (sources.size() > index) {
+ mediaObject->enqueue(sources.at(index));
+ }
+}
+//![16]
+
+void MainWindow::setupActions()
+{
+ playAction = new QAction(style()->standardIcon(QStyle::SP_MediaPlay), tr("Play"), this);
+ playAction->setShortcut(tr("Crl+P"));
+ playAction->setDisabled(true);
+ pauseAction = new QAction(style()->standardIcon(QStyle::SP_MediaPause), tr("Pause"), this);
+ pauseAction->setShortcut(tr("Ctrl+A"));
+ pauseAction->setDisabled(true);
+ stopAction = new QAction(style()->standardIcon(QStyle::SP_MediaStop), tr("Stop"), this);
+ stopAction->setShortcut(tr("Ctrl+S"));
+ stopAction->setDisabled(true);
+ nextAction = new QAction(style()->standardIcon(QStyle::SP_MediaSkipForward), tr("Next"), this);
+ nextAction->setShortcut(tr("Ctrl+N"));
+ previousAction = new QAction(style()->standardIcon(QStyle::SP_MediaSkipBackward), tr("Previous"), this);
+ previousAction->setShortcut(tr("Ctrl+R"));
+ addFilesAction = new QAction(tr("Add &Files"), this);
+ addFilesAction->setShortcut(tr("Ctrl+F"));
+ exitAction = new QAction(tr("E&xit"), this);
+ exitAction->setShortcut(tr("Ctrl+X"));
+ aboutAction = new QAction(tr("A&bout"), this);
+ aboutAction->setShortcut(tr("Ctrl+B"));
+ aboutQtAction = new QAction(tr("About &Qt"), this);
+ aboutQtAction->setShortcut(tr("Ctrl+Q"));
+
+//![5]
+ connect(playAction, SIGNAL(triggered()), mediaObject, SLOT(play()));
+ connect(pauseAction, SIGNAL(triggered()), mediaObject, SLOT(pause()) );
+ connect(stopAction, SIGNAL(triggered()), mediaObject, SLOT(stop()));
+//![5]
+ connect(addFilesAction, SIGNAL(triggered()), this, SLOT(addFiles()));
+ connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::setupMenus()
+{
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(addFilesAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAction);
+
+ QMenu *aboutMenu = menuBar()->addMenu(tr("&Help"));
+ aboutMenu->addAction(aboutAction);
+ aboutMenu->addAction(aboutQtAction);
+}
+
+//![3]
+void MainWindow::setupUi()
+{
+//![3]
+ QToolBar *bar = new QToolBar;
+
+ bar->addAction(playAction);
+ bar->addAction(pauseAction);
+ bar->addAction(stopAction);
+
+//![4]
+ seekSlider = new Phonon::SeekSlider(this);
+ seekSlider->setMediaObject(mediaObject);
+
+ volumeSlider = new Phonon::VolumeSlider(this);
+ volumeSlider->setAudioOutput(audioOutput);
+//![4]
+ volumeSlider->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
+
+ QLabel *volumeLabel = new QLabel;
+ volumeLabel->setPixmap(QPixmap("images/volume.png"));
+
+ QPalette palette;
+ palette.setBrush(QPalette::Light, Qt::darkGray);
+
+ timeLcd = new QLCDNumber;
+ timeLcd->setPalette(palette);
+
+ QStringList headers;
+ headers << tr("Title") << tr("Artist") << tr("Album") << tr("Year");
+
+ musicTable = new QTableWidget(0, 4);
+ musicTable->setHorizontalHeaderLabels(headers);
+ musicTable->setSelectionMode(QAbstractItemView::SingleSelection);
+ musicTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ connect(musicTable, SIGNAL(cellPressed(int, int)),
+ this, SLOT(tableClicked(int, int)));
+
+ QHBoxLayout *seekerLayout = new QHBoxLayout;
+ seekerLayout->addWidget(seekSlider);
+ seekerLayout->addWidget(timeLcd);
+
+ QHBoxLayout *playbackLayout = new QHBoxLayout;
+ playbackLayout->addWidget(bar);
+ playbackLayout->addStretch();
+ playbackLayout->addWidget(volumeLabel);
+ playbackLayout->addWidget(volumeSlider);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(musicTable);
+ mainLayout->addLayout(seekerLayout);
+ mainLayout->addLayout(playbackLayout);
+
+ QWidget *widget = new QWidget;
+ widget->setLayout(mainLayout);
+
+ setCentralWidget(widget);
+ setWindowTitle("Phonon Music Player");
+}
+
diff --git a/examples/phonon/musicplayer/mainwindow.h b/examples/phonon/musicplayer/mainwindow.h
new file mode 100644
index 0000000..2d4e297
--- /dev/null
+++ b/examples/phonon/musicplayer/mainwindow.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <Phonon/AudioOutput>
+#include <Phonon/SeekSlider>
+#include <Phonon/MediaObject>
+#include <Phonon/VolumeSlider>
+#include <Phonon/BackendCapabilities>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QTableWidget;
+class QLCDNumber;
+QT_END_NAMESPACE
+
+//![0]
+
+class MainWindow : public QMainWindow
+{
+//![0]
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+ QSize sizeHint() const {
+ return QSize(500, 300);
+ }
+
+private slots:
+ void addFiles();
+ void about();
+//![1]
+ void stateChanged(Phonon::State newState, Phonon::State oldState);
+ void tick(qint64 time);
+ void sourceChanged(const Phonon::MediaSource &source);
+ void metaStateChanged(Phonon::State newState, Phonon::State oldState);
+ void aboutToFinish();
+ void tableClicked(int row, int column);
+//![1]
+
+private:
+ void setupActions();
+ void setupMenus();
+ void setupUi();
+
+//![2]
+ Phonon::SeekSlider *seekSlider;
+ Phonon::MediaObject *mediaObject;
+ Phonon::MediaObject *metaInformationResolver;
+ Phonon::AudioOutput *audioOutput;
+ Phonon::VolumeSlider *volumeSlider;
+ QList<Phonon::MediaSource> sources;
+//![2]
+
+ QAction *playAction;
+ QAction *pauseAction;
+ QAction *stopAction;
+ QAction *nextAction;
+ QAction *previousAction;
+ QAction *addFilesAction;
+ QAction *exitAction;
+ QAction *aboutAction;
+ QAction *aboutQtAction;
+ QLCDNumber *timeLcd;
+ QTableWidget *musicTable;
+};
+
+#endif
diff --git a/examples/phonon/musicplayer/musicplayer.pro b/examples/phonon/musicplayer/musicplayer.pro
new file mode 100644
index 0000000..0a93dc2
--- /dev/null
+++ b/examples/phonon/musicplayer/musicplayer.pro
@@ -0,0 +1,16 @@
+QT += phonon
+
+HEADERS += mainwindow.h
+SOURCES += main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/phonon/musicplayer
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png images
+sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/musicplayer
+INSTALLS += target sources
+
+wince*{
+DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
+}
+
diff --git a/examples/phonon/phonon.pro b/examples/phonon/phonon.pro
new file mode 100644
index 0000000..0dea766
--- /dev/null
+++ b/examples/phonon/phonon.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = musicplayer \
+ capabilities
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/phonon
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS phonon.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/phonon
+INSTALLS += target sources
diff --git a/examples/qmake/precompile/main.cpp b/examples/qmake/precompile/main.cpp
new file mode 100644
index 0000000..28eb25e
--- /dev/null
+++ b/examples/qmake/precompile/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QApplication>
+#include <QPushButton>
+#include <QLabel>
+#include "myobject.h"
+#include "mydialog.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ MyObject obj;
+ MyDialog dialog;
+
+ dialog.connect(dialog.aButton, SIGNAL(clicked()), SLOT(close()));
+ dialog.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/qmake/precompile/mydialog.cpp b/examples/qmake/precompile/mydialog.cpp
new file mode 100644
index 0000000..544a94b
--- /dev/null
+++ b/examples/qmake/precompile/mydialog.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mydialog.h"
+
+MyDialog::MyDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+}
diff --git a/examples/qmake/precompile/mydialog.h b/examples/qmake/precompile/mydialog.h
new file mode 100644
index 0000000..948afc2
--- /dev/null
+++ b/examples/qmake/precompile/mydialog.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYDIALOG_H
+#define MYDIALOG_H
+
+#include "ui_mydialog.h"
+
+class MyDialog : public QDialog, public Ui::MyDialog
+{
+ Q_OBJECT
+
+public:
+ MyDialog(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/qmake/precompile/mydialog.ui b/examples/qmake/precompile/mydialog.ui
new file mode 100644
index 0000000..d765b30
--- /dev/null
+++ b/examples/qmake/precompile/mydialog.ui
@@ -0,0 +1,47 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MyDialog</class>
+ <widget class="QDialog" name="MyDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>401</width>
+ <height>70</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Mach 2!</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="aLabel" >
+ <property name="text" >
+ <string>Join the life in the fastlane; - PCH enable your project today! -</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="aButton" >
+ <property name="text" >
+ <string>&amp;Quit</string>
+ </property>
+ <property name="shortcut" >
+ <string>Alt+Q</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/qmake/precompile/myobject.cpp b/examples/qmake/precompile/myobject.cpp
new file mode 100644
index 0000000..5d399eb
--- /dev/null
+++ b/examples/qmake/precompile/myobject.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <iostream>
+#include <QDebug>
+#include <QObject>
+#include "myobject.h"
+
+MyObject::MyObject()
+ : QObject()
+{
+ std::cout << "MyObject::MyObject()\n";
+}
+//! [0]
+
+MyObject::~MyObject()
+{
+ qDebug() << "MyObject::~MyObject()";
+}
diff --git a/examples/qmake/precompile/myobject.h b/examples/qmake/precompile/myobject.h
new file mode 100644
index 0000000..90fb59d
--- /dev/null
+++ b/examples/qmake/precompile/myobject.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYOBJECT_H
+#define MYOBJECT_H
+
+//! [0]
+#include <QObject>
+
+class MyObject : public QObject
+{
+public:
+ MyObject();
+ ~MyObject();
+};
+//! [0]
+
+#endif
diff --git a/examples/qmake/precompile/precompile.pro b/examples/qmake/precompile/precompile.pro
new file mode 100644
index 0000000..6360f06
--- /dev/null
+++ b/examples/qmake/precompile/precompile.pro
@@ -0,0 +1,22 @@
+#############################################
+#
+# Example for using Precompiled Headers
+#
+#############################################
+#! [0]
+TEMPLATE = app
+LANGUAGE = C++
+CONFIG += console precompile_header
+
+# Use Precompiled headers (PCH)
+PRECOMPILED_HEADER = stable.h
+
+HEADERS = stable.h \
+ mydialog.h \
+ myobject.h
+SOURCES = main.cpp \
+ mydialog.cpp \
+ myobject.cpp \
+ util.cpp
+FORMS = mydialog.ui
+#! [0]
diff --git a/examples/qmake/precompile/stable.h b/examples/qmake/precompile/stable.h
new file mode 100644
index 0000000..3eaaea9
--- /dev/null
+++ b/examples/qmake/precompile/stable.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+/* Add C includes here */
+
+#if defined __cplusplus
+/* Add C++ includes here */
+
+# include <iostream>
+# include <QApplication>
+# include <QPushButton>
+# include <QLabel>
+#endif
+//! [0]
diff --git a/examples/qmake/precompile/util.cpp b/examples/qmake/precompile/util.cpp
new file mode 100644
index 0000000..c361258
--- /dev/null
+++ b/examples/qmake/precompile/util.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+void util_function_does_nothing()
+{
+ // Nothing here...
+ int x = 0;
+ ++x;
+}
+//! [0]
+
diff --git a/examples/qmake/tutorial/hello.cpp b/examples/qmake/tutorial/hello.cpp
new file mode 100644
index 0000000..9edc2af
--- /dev/null
+++ b/examples/qmake/tutorial/hello.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include "hello.h"
+
+MyPushButton::MyPushButton(const QString &text)
+ : QPushButton(text)
+{
+ setObjectName("mypushbutton");
+ qDebug() << "My PushButton has been constructed";
+}
diff --git a/examples/qmake/tutorial/hello.h b/examples/qmake/tutorial/hello.h
new file mode 100644
index 0000000..9e73e47
--- /dev/null
+++ b/examples/qmake/tutorial/hello.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QPushButton>
+
+class MyPushButton : public QPushButton
+{
+public:
+ MyPushButton(const QString &text);
+};
diff --git a/examples/qmake/tutorial/hellounix.cpp b/examples/qmake/tutorial/hellounix.cpp
new file mode 100644
index 0000000..0fbeffd
--- /dev/null
+++ b/examples/qmake/tutorial/hellounix.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file does nothing, but check your Makefile to see if there is a
+// reference to hello_win.cpp - there shouldn't be if qmake is used on X11.
diff --git a/examples/qmake/tutorial/hellowin.cpp b/examples/qmake/tutorial/hellowin.cpp
new file mode 100644
index 0000000..2e966da
--- /dev/null
+++ b/examples/qmake/tutorial/hellowin.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file does nothing, but check your Makefile to see if there is a
+// reference to hello_x11.cpp - there shouldn't be if qmake is used on Windows.
diff --git a/examples/qmake/tutorial/main.cpp b/examples/qmake/tutorial/main.cpp
new file mode 100644
index 0000000..e0452e2
--- /dev/null
+++ b/examples/qmake/tutorial/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "hello.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ MyPushButton helloButton("Hello world!");
+ helloButton.resize(100, 30);
+
+ helloButton.show();
+ return app.exec();
+}
diff --git a/examples/qtconcurrent/README b/examples/qtconcurrent/README
new file mode 100644
index 0000000..af659af
--- /dev/null
+++ b/examples/qtconcurrent/README
@@ -0,0 +1,38 @@
+Qt 4 extends Qt's support for multithreaded applications with an API for
+concurrent programming which includes implementations of the well-known
+map-reduce and filter-reduce algorithms.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.cpp b/examples/qtconcurrent/imagescaling/imagescaling.cpp
new file mode 100644
index 0000000..d69adaa
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/imagescaling.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "imagescaling.h"
+#include "math.h"
+
+#ifndef QT_NO_CONCURRENT
+
+const int imageSize = 100;
+
+QImage scale(const QString &imageFileName)
+{
+ QImage image(imageFileName);
+ return image.scaled(QSize(imageSize, imageSize), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+}
+
+Images::Images(QWidget *parent)
+: QWidget(parent)
+{
+ setWindowTitle(tr("Image loading and scaling example"));
+ resize(800, 600);
+
+ imageScaling = new QFutureWatcher<QImage>(this);
+ connect(imageScaling, SIGNAL(resultReadyAt(int)), SLOT(showImage(int)));
+ connect(imageScaling, SIGNAL(finished()), SLOT(finished()));
+
+ openButton = new QPushButton(tr("Open Images"));
+ connect(openButton, SIGNAL(clicked()), SLOT(open()));
+
+ cancelButton = new QPushButton(tr("Cancel"));
+ cancelButton->setEnabled(false);
+ connect(cancelButton, SIGNAL(clicked()), imageScaling, SLOT(cancel()));
+
+ pauseButton = new QPushButton(tr("Pause/Resume"));
+ pauseButton->setEnabled(false);
+ connect(pauseButton, SIGNAL(clicked()), imageScaling, SLOT(togglePaused()));
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout();
+ buttonLayout->addWidget(openButton);
+ buttonLayout->addWidget(cancelButton);
+ buttonLayout->addWidget(pauseButton);
+ buttonLayout->addStretch();
+
+ imagesLayout = new QGridLayout();
+
+ mainLayout = new QVBoxLayout();
+ mainLayout->addLayout(buttonLayout);
+ mainLayout->addLayout(imagesLayout);
+ mainLayout->addStretch();
+ setLayout(mainLayout);
+}
+
+Images::~Images()
+{
+ imageScaling->cancel();
+ imageScaling->waitForFinished();
+}
+
+void Images::open()
+{
+ // Cancel and wait if we are already loading images.
+ if (imageScaling->isRunning()) {
+ imageScaling->cancel();
+ imageScaling->waitForFinished();
+ }
+
+ // Show a file open dialog at QDesktopServices::PicturesLocation.
+ QStringList files = QFileDialog::getOpenFileNames(this, tr("Select Images"),
+ QDesktopServices::storageLocation(QDesktopServices::PicturesLocation),
+ "*.jpg *.png");
+
+ if (files.count() == 0)
+ return;
+
+ // Do a simple layout.
+ qDeleteAll(labels);
+ labels.clear();
+
+ int dim = sqrt(qreal(files.count())) + 1;
+ for (int i = 0; i < dim; ++i) {
+ for (int j = 0; j < dim; ++j) {
+ QLabel *imageLabel = new QLabel;
+ imageLabel->setFixedSize(imageSize,imageSize);
+ imagesLayout->addWidget(imageLabel,i,j);
+ labels.append(imageLabel);
+ }
+ }
+
+ // Use mapped to run the thread safe scale function on the files.
+ imageScaling->setFuture(QtConcurrent::mapped(files, scale));
+
+ openButton->setEnabled(false);
+ cancelButton->setEnabled(true);
+ pauseButton->setEnabled(true);
+}
+
+void Images::showImage(int num)
+{
+ labels[num]->setPixmap(QPixmap::fromImage(imageScaling->resultAt(num)));
+}
+
+void Images::finished()
+{
+ openButton->setEnabled(true);
+ cancelButton->setEnabled(false);
+ pauseButton->setEnabled(false);
+}
+
+#endif // QT_NO_CONCURRENT
+
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.h b/examples/qtconcurrent/imagescaling/imagescaling.h
new file mode 100644
index 0000000..46dccf5
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/imagescaling.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef IMAGESCALING_H
+#define IMAGESCALING_H
+
+#include <QtGui>
+
+#ifndef QT_NO_CONCURRENT
+
+class Images : public QWidget
+{
+Q_OBJECT
+public:
+ Images(QWidget *parent = 0);
+ ~Images();
+public Q_SLOTS:
+ void open();
+ void showImage(int num);
+ void finished();
+private:
+ QPushButton *openButton;
+ QPushButton *cancelButton;
+ QPushButton *pauseButton;
+ QVBoxLayout *mainLayout;
+ QList<QLabel *> labels;
+ QGridLayout *imagesLayout;
+ QFutureWatcher<QImage> *imageScaling;
+};
+
+#else
+
+// Dummy class required because QT_NO_CONCURRENT is not set when moc is run.
+class Images : public QWidget
+{
+Q_OBJECT
+public Q_SLOTS:
+ void open() {}
+ void showImage(int) {}
+ void finished() {}
+};
+
+#endif // QT_NO_CONCURRENT
+
+#endif // IMAGESCALING_H
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro
new file mode 100644
index 0000000..fbf864a
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/imagescaling.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp imagescaling.cpp
+HEADERS += imagescaling.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/imagescaling
+INSTALLS += target sources
diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp
new file mode 100644
index 0000000..c0bf9ce
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtGui>
+
+#ifndef QT_NO_CONCURRENT
+
+#include "imagescaling.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc,argv);
+
+ Images imageView;
+ imageView.show();
+
+ return app.exec();
+}
+
+#else
+
+int main()
+{
+ qDebug() << "Qt Concurrent is not supported on this platform";
+}
+
+#endif
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp
new file mode 100644
index 0000000..35b484d
--- /dev/null
+++ b/examples/qtconcurrent/map/main.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QImage>
+#include <QList>
+#include <QThread>
+#include <QDebug>
+#include <QApplication>
+#include <qtconcurrentmap.h>
+
+#ifndef QT_NO_CONCURRENT
+
+QImage scale(const QImage &image)
+{
+ qDebug() << "Scaling image in thread" << QThread::currentThread();
+ return image.scaled(QSize(100, 100), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ const int imageCount = 20;
+
+ // Create a list containing imageCount images.
+ QList<QImage> images;
+ for (int i = 0; i < imageCount; ++i)
+ images.append(QImage(1600, 1200, QImage::Format_ARGB32_Premultiplied));
+
+ // Use QtConcurrentBlocking::mapped to apply the scale function to all the
+ // images in the list.
+ QList<QImage> thumbnails = QtConcurrent::blockingMapped(images, scale);
+
+ return 0;
+}
+
+#else
+
+int main()
+{
+ qDebug() << "Qt Concurrent is not yet supported on this platform";
+}
+
+#endif
diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro
new file mode 100644
index 0000000..f20267b
--- /dev/null
+++ b/examples/qtconcurrent/map/map.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET = mapdemo
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/map
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/map
+INSTALLS += target sources
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
new file mode 100644
index 0000000..249fbc1
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#ifndef QT_NO_CONCURRENT
+
+using namespace QtConcurrent;
+
+const int iterations = 20;
+
+void spin(int &iteration)
+{
+ const int work = 1000 * 1000 * 40;
+ volatile int v = 0;
+ for (int j = 0; j < work; ++j)
+ ++v;
+
+ qDebug() << "iteration" << iteration << "in thread" << QThread::currentThreadId();
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ // Prepare the vector.
+ QVector<int> vector;
+ for (int i = 0; i < iterations; ++i)
+ vector.append(i);
+
+ // Create a progress dialog.
+ QProgressDialog dialog;
+ dialog.setLabelText(QString("Progressing using %1 thread(s)...").arg(QThread::idealThreadCount()));
+
+ // Create a QFutureWatcher and conncect signals and slots.
+ QFutureWatcher<void> futureWatcher;
+ QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset()));
+ QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel()));
+ QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int, int)), &dialog, SLOT(setRange(int, int)));
+ QObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int)));
+
+ // Start the computation.
+ futureWatcher.setFuture(QtConcurrent::map(vector, spin));
+
+ // Display the dialog and start the event loop.
+ dialog.exec();
+
+ futureWatcher.waitForFinished();
+
+ // Query the future to check if was canceled.
+ qDebug() << "Canceled?" << futureWatcher.future().isCanceled();
+}
+
+#else
+
+int main()
+{
+ qDebug() << "Qt Concurrent is not yet supported on this platform";
+}
+
+#endif
+
diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro
new file mode 100644
index 0000000..12ba0bf
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/progressdialog.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/progressdialog
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/progressdialog
+INSTALLS += target sources
diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro
new file mode 100644
index 0000000..53008f0
--- /dev/null
+++ b/examples/qtconcurrent/qtconcurrent.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = imagescaling \
+ map \
+ progressdialog \
+ runfunction \
+ wordcount
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtconcurrent.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent
+INSTALLS += target sources
diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp
new file mode 100644
index 0000000..c758f83
--- /dev/null
+++ b/examples/qtconcurrent/runfunction/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include <QThread>
+#include <QString>
+#include <qtconcurrentrun.h>
+#include <QApplication>
+
+#ifndef QT_NO_CONCURRENT
+
+using namespace QtConcurrent;
+
+void hello(QString name)
+{
+ qDebug() << "Hello" << name << "from" << QThread::currentThread();
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QFuture<void> f1 = run(hello, QString("Alice"));
+ QFuture<void> f2 = run(hello, QString("Bob"));
+ f1.waitForFinished();
+ f2.waitForFinished();
+}
+
+#else
+
+int main()
+{
+ qDebug() << "Qt Concurrent is not yet supported on this platform";
+}
+
+#endif
diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro
new file mode 100644
index 0000000..9034476
--- /dev/null
+++ b/examples/qtconcurrent/runfunction/runfunction.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/runfunction
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/runfunction
+INSTALLS += target sources
diff --git a/examples/qtconcurrent/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp
new file mode 100644
index 0000000..5008eaf
--- /dev/null
+++ b/examples/qtconcurrent/wordcount/main.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QList>
+#include <QMap>
+#include <QTextStream>
+#include <QString>
+#include <QStringList>
+#include <QDir>
+#include <QTime>
+#include <QApplication>
+#include <QDebug>
+
+#include <qtconcurrentmap.h>
+
+#ifndef QT_NO_CONCURRENT
+
+using namespace QtConcurrent;
+
+/*
+ Utility function that recursivily searches for files.
+*/
+QStringList findFiles(const QString &startDir, QStringList filters)
+{
+ QStringList names;
+ QDir dir(startDir);
+
+ foreach (QString file, dir.entryList(filters, QDir::Files))
+ names += startDir + "/" + file;
+
+ foreach (QString subdir, dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot))
+ names += findFiles(startDir + "/" + subdir, filters);
+ return names;
+}
+
+typedef QMap<QString, int> WordCount;
+
+/*
+ Single threaded word counter function.
+*/
+WordCount singleThreadedWordCount(QStringList files)
+{
+ WordCount wordCount;
+ foreach (QString file, files) {
+ QFile f(file);
+ f.open(QIODevice::ReadOnly);
+ QTextStream textStream(&f);
+ while (textStream.atEnd() == false)
+ foreach(QString word, textStream.readLine().split(" "))
+ wordCount[word] += 1;
+
+ }
+ return wordCount;
+}
+
+
+// countWords counts the words in a single file. This function is
+// called in parallel by several threads and must be thread
+// safe.
+WordCount countWords(const QString &file)
+{
+ QFile f(file);
+ f.open(QIODevice::ReadOnly);
+ QTextStream textStream(&f);
+ WordCount wordCount;
+
+ while (textStream.atEnd() == false)
+ foreach (QString word, textStream.readLine().split(" "))
+ wordCount[word] += 1;
+
+ return wordCount;
+}
+
+// reduce adds the results from map to the final
+// result. This functor will only be called by one thread
+// at a time.
+void reduce(WordCount &result, const WordCount &w)
+{
+ QMapIterator<QString, int> i(w);
+ while (i.hasNext()) {
+ i.next();
+ result[i.key()] += i.value();
+ }
+}
+
+int main(int argc, char** argv)
+{
+ QApplication app(argc, argv);
+ qDebug() << "finding files...";
+ QStringList files = findFiles("../../", QStringList() << "*.cpp" << "*.h");
+ qDebug() << files.count() << "files";
+
+ qDebug() << "warmup";
+ {
+ QTime time;
+ time.start();
+ WordCount total = singleThreadedWordCount(files);
+ }
+
+ qDebug() << "warmup done";
+
+ int singleThreadTime = 0;
+ {
+ QTime time;
+ time.start();
+ WordCount total = singleThreadedWordCount(files);
+ singleThreadTime = time.elapsed();
+ qDebug() << "single thread" << singleThreadTime;
+ }
+
+ int mapReduceTime = 0;
+ {
+ QTime time;
+ time.start();
+ WordCount total = mappedReduced(files, countWords, reduce);
+ mapReduceTime = time.elapsed();
+ qDebug() << "MapReduce" << mapReduceTime;
+ }
+ qDebug() << "MapReduce speedup x" << ((double)singleThreadTime - (double)mapReduceTime) / (double)mapReduceTime + 1;
+}
+
+#else
+
+int main()
+{
+ qDebug() << "Qt Concurrent is not yet supported on this platform";
+}
+
+#endif
diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro
new file mode 100644
index 0000000..fba95ee
--- /dev/null
+++ b/examples/qtconcurrent/wordcount/wordcount.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET +=
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/wordcount
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtconcurrent/wordcount
+INSTALLS += target sources
diff --git a/examples/qtestlib/README b/examples/qtestlib/README
new file mode 100644
index 0000000..e89bf5d
--- /dev/null
+++ b/examples/qtestlib/README
@@ -0,0 +1,38 @@
+The QTestLib framework is a tool for unit testing Qt based applications
+and libraries. QTestLib provides all the functionality commonly found
+in unit testing frameworks as well as extensions for testing graphical
+user interfaces.
+
+
+The examples in this directory should be run from the command line so
+that output printed to the console can be examined.
+
+Documentation for these examples can be found via the "Tutorial and Examples"
+link in the main Qt documentation.
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/qtestlib/qtestlib.pro b/examples/qtestlib/qtestlib.pro
new file mode 100644
index 0000000..8addbcb
--- /dev/null
+++ b/examples/qtestlib/qtestlib.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = tutorial1 tutorial2 tutorial3 tutorial4 tutorial5
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qtestlib.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib
+INSTALLS += target sources
diff --git a/examples/qtestlib/tutorial1/testqstring.cpp b/examples/qtestlib/tutorial1/testqstring.cpp
new file mode 100644
index 0000000..cc2e7ca
--- /dev/null
+++ b/examples/qtestlib/tutorial1/testqstring.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtTest/QtTest>
+
+class TestQString: public QObject
+{
+ Q_OBJECT
+private slots:
+ void toUpper();
+};
+//! [0]
+
+//! [1]
+void TestQString::toUpper()
+{
+ QString str = "Hello";
+ QCOMPARE(str.toUpper(), QString("HELLO"));
+}
+//! [1]
+
+//! [2]
+QTEST_MAIN(TestQString)
+#include "testqstring.moc"
+//! [2]
+
diff --git a/examples/qtestlib/tutorial1/tutorial1.pro b/examples/qtestlib/tutorial1/tutorial1.pro
new file mode 100644
index 0000000..baa15b2
--- /dev/null
+++ b/examples/qtestlib/tutorial1/tutorial1.pro
@@ -0,0 +1,8 @@
+SOURCES = testqstring.cpp
+CONFIG += qtestlib
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial1
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial1
+INSTALLS += target sources
diff --git a/examples/qtestlib/tutorial2/testqstring.cpp b/examples/qtestlib/tutorial2/testqstring.cpp
new file mode 100644
index 0000000..1c1f6f7
--- /dev/null
+++ b/examples/qtestlib/tutorial2/testqstring.cpp
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+//! [0]
+class TestQString: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void toUpper_data();
+ void toUpper();
+};
+//! [0]
+
+//! [1]
+void TestQString::toUpper_data()
+{
+ QTest::addColumn<QString>("string");
+ QTest::addColumn<QString>("result");
+
+ QTest::newRow("all lower") << "hello" << "HELLO";
+ QTest::newRow("mixed") << "Hello" << "HELLO";
+ QTest::newRow("all upper") << "HELLO" << "HELLO";
+}
+//! [1]
+
+//! [2]
+void TestQString::toUpper()
+{
+ QFETCH(QString, string);
+ QFETCH(QString, result);
+
+ QCOMPARE(string.toUpper(), result);
+}
+//! [2]
+
+//! [3]
+QTEST_MAIN(TestQString)
+#include "testqstring.moc"
+//! [3]
+
diff --git a/examples/qtestlib/tutorial2/tutorial2.pro b/examples/qtestlib/tutorial2/tutorial2.pro
new file mode 100644
index 0000000..44211d8
--- /dev/null
+++ b/examples/qtestlib/tutorial2/tutorial2.pro
@@ -0,0 +1,8 @@
+SOURCES = testqstring.cpp
+CONFIG += qtestlib
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial2
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial2
+INSTALLS += target sources
diff --git a/examples/qtestlib/tutorial3/testgui.cpp b/examples/qtestlib/tutorial3/testgui.cpp
new file mode 100644
index 0000000..8e116f8
--- /dev/null
+++ b/examples/qtestlib/tutorial3/testgui.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtGui>
+#include <QtTest/QtTest>
+
+class TestGui: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testGui();
+
+};
+//! [0]
+
+//! [1]
+void TestGui::testGui()
+{
+ QLineEdit lineEdit;
+
+ QTest::keyClicks(&lineEdit, "hello world");
+
+ QCOMPARE(lineEdit.text(), QString("hello world"));
+}
+//! [1]
+
+//! [2]
+QTEST_MAIN(TestGui)
+#include "testgui.moc"
+//! [2]
+
diff --git a/examples/qtestlib/tutorial3/tutorial3.pro b/examples/qtestlib/tutorial3/tutorial3.pro
new file mode 100644
index 0000000..b494ba8
--- /dev/null
+++ b/examples/qtestlib/tutorial3/tutorial3.pro
@@ -0,0 +1,8 @@
+SOURCES = testgui.cpp
+CONFIG += qtestlib
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial3
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial3
+INSTALLS += target sources
diff --git a/examples/qtestlib/tutorial4/testgui.cpp b/examples/qtestlib/tutorial4/testgui.cpp
new file mode 100644
index 0000000..f392fec
--- /dev/null
+++ b/examples/qtestlib/tutorial4/testgui.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtTest/QtTest>
+
+//! [0]
+class TestGui: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testGui_data();
+ void testGui();
+};
+//! [0]
+
+//! [1]
+void TestGui::testGui_data()
+{
+ QTest::addColumn<QTestEventList>("events");
+ QTest::addColumn<QString>("expected");
+
+ QTestEventList list1;
+ list1.addKeyClick('a');
+ QTest::newRow("char") << list1 << "a";
+
+ QTestEventList list2;
+ list2.addKeyClick('a');
+ list2.addKeyClick(Qt::Key_Backspace);
+ QTest::newRow("there and back again") << list2 << "";
+}
+//! [1]
+
+//! [2]
+void TestGui::testGui()
+{
+ QFETCH(QTestEventList, events);
+ QFETCH(QString, expected);
+
+ QLineEdit lineEdit;
+
+ events.simulate(&lineEdit);
+
+ QCOMPARE(lineEdit.text(), expected);
+}
+//! [2]
+
+//! [3]
+QTEST_MAIN(TestGui)
+#include "testgui.moc"
+//! [3]
+
diff --git a/examples/qtestlib/tutorial4/tutorial4.pro b/examples/qtestlib/tutorial4/tutorial4.pro
new file mode 100644
index 0000000..0777d48
--- /dev/null
+++ b/examples/qtestlib/tutorial4/tutorial4.pro
@@ -0,0 +1,8 @@
+SOURCES = testgui.cpp
+CONFIG += qtestlib
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial4
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial4
+INSTALLS += target sources
diff --git a/examples/qtestlib/tutorial5/benchmarking.cpp b/examples/qtestlib/tutorial5/benchmarking.cpp
new file mode 100644
index 0000000..05ca266
--- /dev/null
+++ b/examples/qtestlib/tutorial5/benchmarking.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <qtest.h>
+
+class TestBenchmark : public QObject
+{
+ Q_OBJECT
+private slots:
+ void simple();
+ void multiple_data();
+ void multiple();
+ void series_data();
+ void series();
+};
+
+//! [0]
+void TestBenchmark::simple()
+{
+ QString str1 = QLatin1String("This is a test string");
+ QString str2 = QLatin1String("This is a test string");
+
+ QCOMPARE(str1.localeAwareCompare(str2), 0);
+
+ QBENCHMARK {
+ str1.localeAwareCompare(str2);
+ }
+}
+//! [0]
+
+//! [1]
+void TestBenchmark::multiple_data()
+{
+ QTest::addColumn<bool>("useLocaleCompare");
+ QTest::newRow("locale aware compare") << true;
+ QTest::newRow("standard compare") << false;
+}
+//! [1]
+
+//! [2]
+void TestBenchmark::multiple()
+{
+ QFETCH(bool, useLocaleCompare);
+ QString str1 = QLatin1String("This is a test string");
+ QString str2 = QLatin1String("This is a test string");
+
+ int result;
+ if (useLocaleCompare) {
+ QBENCHMARK {
+ result = str1.localeAwareCompare(str2);
+ }
+ } else {
+ QBENCHMARK {
+ result = (str1 == str2);
+ }
+ }
+}
+//! [2]
+
+//! [3]
+void TestBenchmark::series_data()
+{
+ QTest::addColumn<bool>("useLocaleCompare");
+ QTest::addColumn<int>("stringSize");
+
+ for (int i = 1; i < 10000; i += 2000) {
+ QByteArray size = QByteArray::number(i);
+ QTest::newRow(("locale aware compare--" + size).constData()) << true << i;
+ QTest::newRow(("standard compare--" + size).constData()) << false << i;
+ }
+}
+//! [4]
+
+//! [5]
+void TestBenchmark::series()
+{
+ QFETCH(bool, useLocaleCompare);
+ QFETCH(int, stringSize);
+
+ QString str1 = QString().fill('A', stringSize);
+ QString str2 = QString().fill('A', stringSize);
+ int result;
+ if (useLocaleCompare) {
+ QBENCHMARK {
+ result = str1.localeAwareCompare(str2);
+ }
+ } else {
+ QBENCHMARK {
+ result = (str1 == str2);
+ }
+ }
+}
+//! [5]
+
+QTEST_MAIN(TestBenchmark)
+#include "benchmarking.moc"
diff --git a/examples/qtestlib/tutorial5/tutorial5.pro b/examples/qtestlib/tutorial5/tutorial5.pro
new file mode 100644
index 0000000..0310916
--- /dev/null
+++ b/examples/qtestlib/tutorial5/tutorial5.pro
@@ -0,0 +1,8 @@
+SOURCES = benchmarking.cpp
+CONFIG += qtestlib
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial5
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtestlib/tutorial5
+INSTALLS += target sources
diff --git a/examples/qws/README b/examples/qws/README
new file mode 100644
index 0000000..d7cf21a
--- /dev/null
+++ b/examples/qws/README
@@ -0,0 +1,38 @@
+These examples show how to take advantage of features specifically designed
+for use on systems with limited resources, specialized hardware, and small
+screens.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/qws/ahigl/ahigl.pro b/examples/qws/ahigl/ahigl.pro
new file mode 100644
index 0000000..1ee8e6e
--- /dev/null
+++ b/examples/qws/ahigl/ahigl.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+QT += opengl
+CONFIG += plugin
+
+TARGET = qahiglscreen
+
+target.path = $$[QT_INSTALL_PLUGINS]/gfxdrivers
+INSTALLS += target
+
+HEADERS = qwindowsurface_ahigl_p.h \
+ qscreenahigl_qws.h
+
+SOURCES = qwindowsurface_ahigl.cpp \
+ qscreenahigl_qws.cpp \
+ qscreenahiglplugin.cpp
+
diff --git a/examples/qws/ahigl/qscreenahigl_qws.cpp b/examples/qws/ahigl/qscreenahigl_qws.cpp
new file mode 100644
index 0000000..b5880b3
--- /dev/null
+++ b/examples/qws/ahigl/qscreenahigl_qws.cpp
@@ -0,0 +1,963 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qscreenahigl_qws.h"
+#include "qwindowsurface_ahigl_p.h"
+
+#include <QWSServer>
+#include <QMap>
+#include <QTimer>
+#include <QTimeLine>
+
+#include <qwindowsystem_qws.h>
+#include <private/qwindowsurface_qws_p.h>
+#include <private/qfixed_p.h>
+
+#include <GLES/egl.h>
+#include <GLES/gl.h>
+#include <math.h>
+
+const int animationLength = 1500;
+const int frameSpan = 20;
+
+static GLuint createTexture(const QImage &img);
+
+class QAhiGLCursor : public QScreenCursor
+{
+public:
+ QAhiGLCursor() : texture(0) {}
+ ~QAhiGLCursor();
+
+ void set(const QImage &image, int hotx, int hoty);
+
+ GLuint texture;
+};
+
+QAhiGLCursor::~QAhiGLCursor()
+{
+ if (texture)
+ glDeleteTextures(1, &texture);
+}
+
+void QAhiGLCursor::set(const QImage &image, int hotx, int hoty)
+{
+ if (texture)
+ glDeleteTextures(1, &texture);
+
+ if (image.isNull())
+ texture = 0;
+ else
+ texture = createTexture(image.convertToFormat(QImage::Format_ARGB32));
+
+ QScreenCursor::set(image, hotx, hoty);
+}
+
+
+/*!
+ \class QAhiGLScreenPrivate
+ The QAhiGLScreenPrivate class contains state information for class QAhiGLScreen.
+
+ An instance of this class points to the owning instance of
+ class QAhiGLScreen. This class uses a QTimer to limit the
+ update frequency.
+ */
+//! [0]
+class QAhiGLScreenPrivate : public QObject
+{
+ Q_OBJECT
+
+public:
+ QAhiGLScreenPrivate(QAhiGLScreen *s);
+
+public slots:
+ void windowEvent(QWSWindow *w, QWSServer::WindowEvent e);
+ void redrawScreen();
+
+public:
+ QAhiGLScreen *screen;
+ QAhiGLCursor *cursor;
+
+ EGLContext eglContext;
+ EGLDisplay eglDisplay;
+ EGLSurface eglSurface;
+
+ QTimer updateTimer;
+ bool doEffects;
+};
+//! [0]
+
+//! [1]
+class ShowAnimation : public QTimeLine
+{
+public:
+ ShowAnimation(QAhiGLScreenPrivate *screen);
+ qreal valueForTime(int msec);
+};
+//! [1]
+
+//! [2]
+struct WindowInfo
+{
+ WindowInfo() : texture(0), animation(0) {}
+
+ GLuint texture;
+ QPointer<ShowAnimation> animation;
+};
+
+static QMap<QWSWindow*, WindowInfo*> windowMap;
+//! [2]
+
+/*!
+ Constructs the animation for the transition effect used
+ when the window associated with \a screen is displayed.
+ */
+//! [3]
+ShowAnimation::ShowAnimation(QAhiGLScreenPrivate *screen)
+ : QTimeLine(animationLength)
+{
+ setUpdateInterval(frameSpan);
+ connect(this, SIGNAL(valueChanged(qreal)), screen, SLOT(redrawScreen()));
+ connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
+ start();
+}
+//! [3]
+
+//! [4]
+qreal ShowAnimation::valueForTime(int msec)
+{
+ const qreal t = msec / qreal(duration());
+ return 3*t*t - 2*t*t*t;
+}
+//! [4]
+
+QAhiGLScreenPrivate::QAhiGLScreenPrivate(QAhiGLScreen *s)
+ : screen(s), cursor(0), doEffects(false)
+{
+ connect(&updateTimer, SIGNAL(timeout()), this, SLOT(redrawScreen()));
+}
+
+/*!
+ This slot handles the \a event when the \l {QWSServer}
+ {window server} emits a window event for the specified
+ \a window.
+
+ The \l {QWSServer::WindowEvent} {window events} handled
+ are \c Create, \c Destroy, and \c Show. The \c Create
+ event creates a new instance of \l {WindowInfo} and stores
+ it in a window map to mark the creation of a new window.
+ The \c Destroy event causes the \l {WindoInfo} instance
+ to be removed from the map and destroyed.
+
+ The \c Show event is the most interesting. If the user
+ has started the application with -display ahigl:effects,
+ then the \c Show event is handled by creating a small
+ \l {ShowAnimation} {animation} for use when the window
+ is first shown.
+ */
+//! [5]
+void QAhiGLScreenPrivate::windowEvent(QWSWindow *window,
+ QWSServer::WindowEvent event)
+{
+ switch (event) {
+ case QWSServer::Create:
+ windowMap[window] = new WindowInfo;
+ break;
+ case QWSServer::Show:
+ if (doEffects)
+ windowMap[window]->animation = new ShowAnimation(this);
+ break;
+ case QWSServer::Destroy:
+ delete windowMap[window];
+ windowMap.remove(window);
+ break;
+ default:
+ break;
+ }
+}
+//! [5]
+
+/*!
+ This function assumes the updateTimer is still counting down and stops it
+ and then calls redrawScreen() in the public screen driver class QAhiGLScreen.
+ */
+//! [6]
+void QAhiGLScreenPrivate::redrawScreen()
+{
+ updateTimer.stop();
+ screen->redrawScreen();
+}
+//! [6]
+
+/*!
+ \class QAhiGLScreen
+
+ \brief The QAhiGLScreen class is the screen driver for the ATI handheld device interface.
+
+ QAhiGLScreen is implemented with the d-pointer pattern. That is,
+ the only data member the class contains is a pointer called d_ptr,
+ which means data pointer. It points to an instance of a private
+ class called QAhiGLScreenPrivate, where all the screen driver's
+ context data members are defined. The d-pointer pattern is used
+ so that changes can be made to the screen driver's context data
+ members without destroying the binary compatibility of the public
+ screen driver class.
+
+ The pure virtual functions found in the base class QScreen are
+ listed below. All must have implementations in any screen driver
+ class derived from QScreen. All are impemented in this example,
+ except for setMode(), which has only been given a stub
+ implementation to satisfy the compiler.
+
+ bool connect(const QString & displaySpec);
+ void disconnect();
+ bool initDevice();
+ void setMode(int width, int height, int depth);
+
+ The stub implementation of setMode() is not meant to indicate
+ setMode() can be ignored in your own screen driver class. It was
+ simply decided not to provide a fully implemented screen driver
+ class for the example, which would normally be tailored to your
+ device's specific requirements.
+
+ The base class QGLScreen has only one pure virtual function,
+ hasOpenGL(), which must return true if your screen driver class
+ supports OpenGL.
+
+ QWSWindowSurface * createSurface(const QString & key) const
+ QWSWindowSurface * createSurface(QWidget * widget) const
+ void exposeRegion(QRegion region, int windowIndex)
+
+ */
+
+/*!
+ Constructs a new, ATI handheld device screen driver.
+
+ The displayId identifies the QWS server to connect to.
+ */
+QAhiGLScreen::QAhiGLScreen(int displayId) : QGLScreen(displayId)
+{
+ d_ptr = new QAhiGLScreenPrivate(this);
+ d_ptr->eglDisplay = EGL_NO_DISPLAY;
+ d_ptr->eglSurface = EGL_NO_SURFACE;
+}
+
+/*!
+ Destroys this ATI handheld device screen driver.
+ */
+QAhiGLScreen::~QAhiGLScreen()
+{
+ delete d_ptr;
+}
+
+/*!
+ \reimp
+ */
+//! [7]
+bool QAhiGLScreen::connect(const QString &displaySpec)
+{
+ // Hardcoded values for this device
+ w = 480;
+ h = 640;
+ dw = w;
+ dh = h;
+ d = 16;
+
+ const int dpi = 120;
+ physWidth = qRound(dw * 25.4 / dpi);
+ physHeight = qRound(dh * 25.4 / dpi);
+
+ if (displaySpec.section(':', 1, 1).contains("effects"))
+ d_ptr->doEffects = true;
+
+ return true;
+}
+//! [7]
+
+/*!
+ \reimp
+ */
+//! [8]
+bool QAhiGLScreen::initDevice()
+{
+ EGLint version, subversion;
+ EGLint attrs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_STENCIL_SIZE, 8, EGL_DEPTH_SIZE, 16,
+ EGL_NONE };
+ EGLint numConfig;
+ EGLConfig eglConfig;
+
+ d_ptr->eglDisplay = eglGetDisplay(0);
+ if (d_ptr->eglDisplay == EGL_NO_DISPLAY) {
+ qCritical("QAhiGLScreen::initDevice(): eglGetDisplay failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ if (!eglInitialize(d_ptr->eglDisplay, &version, &subversion)) {
+ qCritical("QAhiGLScreen::initDevice(): eglInitialize failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ if (!eglChooseConfig(d_ptr->eglDisplay, attrs, &eglConfig, 1, &numConfig)) {
+ qCritical("QAhiGLScreen::initDevice(): eglChooseConfig failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ static DummyScreen win = { w, h };
+ d_ptr->eglSurface = eglCreateWindowSurface(d_ptr->eglDisplay, eglConfig,
+ &win, 0);
+ if (d_ptr->eglSurface == EGL_NO_SURFACE) {
+ qCritical("QAhiGLScreen::initDevice(): eglCreateWindowSurface failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ d_ptr->eglContext = eglCreateContext(d_ptr->eglDisplay, eglConfig,
+ EGL_NO_CONTEXT, 0);
+ if (d_ptr->eglContext == EGL_NO_CONTEXT) {
+ qCritical("QAhiGLScreen::initDevice(): eglCreateContext failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ if (!eglMakeCurrent(d_ptr->eglDisplay, d_ptr->eglSurface, d_ptr->eglSurface, d_ptr->eglContext)) {
+ qCritical("QAhiGLScreen::initDevice(): eglMakeCurrent failed: 0x%x",
+ eglGetError());
+ return false;
+ }
+
+ d_ptr->connect(QWSServer::instance(),
+ SIGNAL(windowEvent(QWSWindow*, QWSServer::WindowEvent)),
+ SLOT(windowEvent(QWSWindow*, QWSServer::WindowEvent)));
+
+ d_ptr->cursor = new QAhiGLCursor;
+ qt_screencursor = d_ptr->cursor;
+
+ return true;
+}
+//! [8]
+
+/*!
+ \reimp
+ */
+//! [9]
+void QAhiGLScreen::shutdownDevice()
+{
+ delete d_ptr->cursor;
+ d_ptr->cursor = 0;
+ qt_screencursor = 0;
+
+ eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE,
+ EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ eglDestroyContext(d_ptr->eglDisplay, d_ptr->eglContext);
+ eglDestroySurface(d_ptr->eglDisplay, d_ptr->eglSurface);
+ eglTerminate(d_ptr->eglDisplay);
+}
+//! [9]
+
+/*!
+ \reimp
+
+ In this case, the reimplimentation does nothing. It is
+ required because the function is declared as pure virtual
+ in the base class QScreen.
+ */
+void QAhiGLScreen::disconnect()
+{
+}
+
+/*
+ This internal function rounds up to the next power of
+ two. If v is already a power of two, that same value is
+ returned.
+ */
+inline static uint nextPowerOfTwo(uint v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ ++v;
+ return v;
+}
+
+/*
+ This internal function creates a texture from the image img
+ and returns its texture identifier.
+
+ The term "texture" is a graphics technology term that refers
+ to a pixmap constructed from an image by adding extra points
+ of contrast to the otherwise plain color image. The texture
+ has a, well, texture, that the original image doesn't have.
+ */
+static GLuint createTexture(const QImage &img)
+{
+ if (img.isNull())
+ return 0;
+
+ int width = img.width();
+ int height = img.height();
+ int textureWidth;
+ int textureHeight;
+ GLuint texture;
+
+ glGenTextures(1, &texture);
+ textureWidth = nextPowerOfTwo(width);
+ textureHeight = nextPowerOfTwo(height);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ switch (img.format()) {
+ case QImage::Format_RGB16:
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
+ textureWidth,
+ textureHeight, 0,
+ GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0);
+
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,
+ GL_RGB, GL_UNSIGNED_SHORT_5_6_5, img.bits());
+ break;
+
+ case QImage::Format_ARGB32_Premultiplied:
+ case QImage::Format_ARGB32:
+ case QImage::Format_RGB32:
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
+ textureWidth,
+ textureHeight, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,
+ GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
+ break;
+
+ default:
+ break;
+ }
+
+ return texture;
+}
+
+/*
+ A helper function used by QAhiGLScreen::drawQuad().
+ */
+static void drawQuad_helper(GLshort *coords, GLfloat *texCoords)
+{
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_SHORT, 0, coords);
+ glEnable(GL_TEXTURE_2D);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glDisable(GL_TEXTURE_2D);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+}
+
+/*
+ A helper function used by QAhiGLScreen::drawQuadWavyFlag().
+ */
+static void drawQuad_helper(GLshort *coords, GLfloat *texCoords,
+ int arraySize, int numArrays)
+{
+ glEnable(GL_TEXTURE_2D);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_SHORT, 0, coords);
+
+ for (int i = 0; i < numArrays-1; ++i)
+ glDrawArrays(GL_TRIANGLE_STRIP, i*arraySize, arraySize);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisable(GL_TEXTURE_2D);
+}
+
+/*
+ A convenience function used by QAhiGLScreen::drawQuad().
+ */
+static void setRectCoords(GLshort *coords, QRect rect)
+{
+ coords[0] = GLshort(rect.left());
+ coords[1] = GLshort(rect.top());
+
+ coords[2] = GLshort(rect.right());
+ coords[3] = GLshort(rect.top());
+
+ coords[4] = GLshort(rect.right());
+ coords[5] = GLshort(rect.bottom());
+
+ coords[6] = GLshort(rect.left());
+ coords[7] = GLshort(rect.bottom());
+}
+
+/*!
+ A helper function used by QAhiGLScreen::drawWindow() and
+ QAhiGLScreen::redrawScreen().
+ */
+void QAhiGLScreen::drawQuad(const QRect &textureGeometry,
+ const QRect &subGeometry,
+ const QRect &screenGeometry)
+{
+ qreal textureWidth = qreal(nextPowerOfTwo(textureGeometry.width()));
+ qreal textureHeight = qreal(nextPowerOfTwo(textureGeometry.height()));
+
+ GLshort coords[8];
+ setRectCoords(coords, screenGeometry);
+
+ GLfloat texcoords[8];
+ texcoords[0] = (subGeometry.left() - textureGeometry.left()) / textureWidth;
+ texcoords[1] = (subGeometry.top() - textureGeometry.top()) / textureHeight;
+
+ texcoords[2] = (subGeometry.right() - textureGeometry.left()) / textureWidth;
+ texcoords[3] = (subGeometry.top() - textureGeometry.top()) / textureHeight;
+
+ texcoords[4] = (subGeometry.right() - textureGeometry.left()) / textureWidth;
+ texcoords[5] = (subGeometry.bottom() - textureGeometry.top()) / textureHeight;
+
+ texcoords[6] = (subGeometry.left() - textureGeometry.left()) / textureWidth;
+ texcoords[7] = (subGeometry.bottom() - textureGeometry.top()) / textureHeight;
+
+ drawQuad_helper(coords, texcoords);
+}
+
+/*
+ My own sine function.
+ */
+static qreal mySin(QFixed radians)
+{
+ const QFixed twoPI = QFixed::fromReal(2*M_PI);
+
+ const int tableSize = 40;
+ static int *table = 0;
+
+ if (!table) {
+ table = new int[tableSize];
+ for (int i = 0; i < tableSize; ++i) {
+ table[i] = qRound(sin(M_PI*(i*360.0/40.0)/180.0) * 16776960.0);
+ }
+ }
+
+ QFixed tableLookup = radians*tableSize/twoPI;
+ return table[tableLookup.truncate()%tableSize]/16776960.0;
+}
+
+/*
+ My own cosine function.
+ */
+static qreal myCos(QFixed radians)
+{
+ const int twoPI = qRound(2*M_PI);
+
+ const int tableSize = 40;
+ static int *table = 0;
+
+ if (!table) {
+ table = new int[tableSize];
+ for (int i = 0; i < tableSize; ++i) {
+ table[i] = int(cos(M_PI*(i*360.0/40.0)/180.0) * 16776960.0);
+ }
+ }
+
+ QFixed tableLookup = radians*tableSize/twoPI;
+ return table[tableLookup.truncate()%tableSize]/16776960.0;
+}
+
+// number of grid cells in wavy flag tesselation in x- and y-direction
+const int subdivisions = 10;
+
+/*
+ A helper function used by drawQuadWavyFlag(). It computes
+ coordinates for grid cells for a wavy flag tesselation and
+ stores them in the array called coords.
+ */
+static void setFlagCoords(GLshort *coords,
+ QRectF screenGeometry,
+ int frameNum,
+ qreal progress)
+{
+ int coordIndex = 0;
+ qreal waveHeight = 30.0*(1.0-progress);
+ for (int j = 0; j < subdivisions-1; ++j) {
+ for (int i = 0; i < subdivisions; ++i) {
+ qreal c;
+ c = screenGeometry.left()
+ + (i * screenGeometry.width() / (subdivisions - 1))
+ + waveHeight * qRound(mySin(QFixed::fromReal(M_PI * 20 * (frameNum + i) / 180.0)))
+ + waveHeight * qRound(myCos(QFixed::fromReal(M_PI * 20 * (frameNum + j) / 180.0)));
+ coords[coordIndex++] = qRound(c);
+ c = screenGeometry.top()
+ + (j * screenGeometry.height() / (subdivisions - 1))
+ + waveHeight * mySin(QFixed::fromReal(M_PI * 20 * (frameNum + i) / 180.0))
+ + waveHeight * myCos(QFixed::fromReal(M_PI * 20 * (frameNum + j) / 180.0));
+ coords[coordIndex++] = qRound(c);
+ c = screenGeometry.left() + (i * screenGeometry.width() / (subdivisions - 1))
+ + waveHeight * mySin(QFixed::fromReal(M_PI * 20 * (frameNum + i) / 180.0))
+ + waveHeight * myCos(QFixed::fromReal(M_PI * 20 * (frameNum + (j+1)) / 180.0));
+ coords[coordIndex++] = qRound(c);
+
+ c = screenGeometry.top()
+ + ((j + 1) * screenGeometry.height() / (subdivisions - 1))
+ + waveHeight * mySin(QFixed::fromReal(M_PI * 20 * (frameNum + i) / 180.0))
+ + waveHeight * myCos(QFixed::fromReal(M_PI * 20 * (frameNum + (j + 1)) / 180.0));
+ coords[coordIndex++] = qRound(c);
+ }
+ }
+}
+
+static void setFlagTexCoords(GLfloat *texcoords,
+ const QRectF &subTexGeometry,
+ const QRectF &textureGeometry,
+ int textureWidth, int textureHeight)
+{
+ qreal topLeftX = (subTexGeometry.left() - textureGeometry.left())/textureWidth;
+ qreal topLeftY = (textureGeometry.height() - (subTexGeometry.top() - textureGeometry.top()))/textureHeight;
+
+ qreal width = (subTexGeometry.right() - textureGeometry.left())/textureWidth - topLeftX;
+ qreal height = (textureGeometry.height() - (subTexGeometry.bottom() - textureGeometry.top()))/textureHeight - topLeftY;
+
+ int coordIndex = 0;
+ qreal spacing = subdivisions - 1;
+ for (int j = 0; j < subdivisions-1; ++j) {
+ for (int i = 0; i < subdivisions; ++i) {
+ texcoords[coordIndex++] = topLeftX + (i*width) / spacing;
+ texcoords[coordIndex++] = topLeftY + (j*height) / spacing;
+ texcoords[coordIndex++] = topLeftX + (i*width) / spacing;
+ texcoords[coordIndex++] = topLeftY + ((j+1)*height) / spacing;
+ }
+ }
+}
+
+void QAhiGLScreen::drawQuadWavyFlag(const QRect &textureGeometry,
+ const QRect &subTexGeometry,
+ const QRect &screenGeometry,
+ qreal progress)
+{
+ const int textureWidth = nextPowerOfTwo(textureGeometry.width());
+ const int textureHeight = nextPowerOfTwo(textureGeometry.height());
+
+ static int frameNum = 0;
+
+ GLshort coords[subdivisions*subdivisions*2*2];
+ setFlagCoords(coords, screenGeometry, frameNum++, progress);
+
+ GLfloat texcoords[subdivisions*subdivisions*2*2];
+ setFlagTexCoords(texcoords, subTexGeometry, textureGeometry,
+ textureWidth, textureHeight);
+
+ drawQuad_helper(coords, texcoords, subdivisions*2, subdivisions);
+}
+
+void QAhiGLScreen::invalidateTexture(int windowIndex)
+{
+ if (windowIndex < 0)
+ return;
+
+ QList<QWSWindow*> windows = QWSServer::instance()->clientWindows();
+ if (windowIndex > windows.size() - 1)
+ return;
+
+ QWSWindow *win = windows.at(windowIndex);
+ if (!win)
+ return;
+
+ WindowInfo *info = windowMap[win];
+ if (info->texture) {
+ glDeleteTextures(1, &info->texture);
+ info->texture = 0;
+ }
+}
+
+void QAhiGLScreen::drawWindow(QWSWindow *win, qreal progress)
+{
+ const QRect screenRect = win->allocatedRegion().boundingRect();
+ QRect drawRect = screenRect;
+
+ glColor4f(1.0, 1.0, 1.0, progress);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ QWSWindowSurface *surface = win->windowSurface();
+ if (!surface)
+ return;
+
+ if (progress >= 1.0) {
+ if (surface->key() == QLatin1String("ahigl")) {
+ drawRect.setCoords(drawRect.left(), drawRect.bottom(),
+ drawRect.right(), drawRect.top());
+ }
+ drawQuad(win->requestedRegion().boundingRect(), screenRect, drawRect);
+ return;
+ }
+
+ const int dx = qRound((1 - progress) * drawRect.width() / 2);
+ const int dy = qRound((1 - progress) * drawRect.height() / 2);
+
+ drawRect.adjust(dx, dy, -dx, -dy);
+
+ if (surface->key() != QLatin1String("ahigl")) {
+ drawRect.setCoords(drawRect.left(), drawRect.bottom(),
+ drawRect.right(), drawRect.top());
+ }
+
+ drawQuadWavyFlag(win->requestedRegion().boundingRect(), screenRect,
+ drawRect, progress);
+}
+
+/*!
+ The window compositions are constructed here.
+ */
+//! [10]
+void QAhiGLScreen::redrawScreen()
+{
+ glBindFramebufferOES(GL_FRAMEBUFFER_EXT, 0);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrthof(0, w, h, 0, -999999, 999999);
+ glViewport(0, 0, w, h);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ // Fill background color
+
+ QColor bgColor = QWSServer::instance()->backgroundBrush().color();
+ glClearColor(bgColor.redF(), bgColor.greenF(),
+ bgColor.blueF(), bgColor.alphaF());
+ glClear(GL_COLOR_BUFFER_BIT);
+//! [10]
+
+ // Draw all windows
+
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_STENCIL_TEST);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ZERO);
+ glDisable(GL_ALPHA_TEST);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+
+//! [11]
+ QList<QWSWindow*> windows = QWSServer::instance()->clientWindows();
+ for (int i = windows.size() - 1; i >= 0; --i) {
+ QWSWindow *win = windows.at(i);
+ QWSWindowSurface *surface = win->windowSurface();
+ if (!surface)
+ continue;
+
+ WindowInfo *info = windowMap[win];
+
+ if (!info->texture) {
+ if (surface->key() == QLatin1String("ahigl"))
+ info->texture = static_cast<QAhiGLWindowSurface*>(surface)->textureId();
+ else
+ info->texture = createTexture(surface->image());
+ }
+ qreal progress;
+ if (info->animation)
+ progress = info->animation->currentValue();
+ else
+ progress = 1.0;
+
+ glBindTexture(GL_TEXTURE_2D, info->texture);
+ drawWindow(win, progress);
+ } // for i
+//! [11] //! [12]
+
+ // Draw cursor
+
+ const QAhiGLCursor *cursor = d_ptr->cursor;
+ if (cursor->texture) {
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBindTexture(GL_TEXTURE_2D, d_ptr->cursor->texture);
+ drawQuad(cursor->boundingRect(), cursor->boundingRect(),
+ cursor->boundingRect());
+ }
+
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+
+ eglSwapBuffers(d_ptr->eglDisplay, d_ptr->eglSurface);
+}
+//! [12]
+
+/*!
+ \reimp
+
+ */
+//! [13]
+void QAhiGLScreen::exposeRegion(QRegion r, int windowIndex)
+{
+ if ((r & region()).isEmpty())
+ return;
+
+ invalidateTexture(windowIndex);
+
+ if (!d_ptr->updateTimer.isActive())
+ d_ptr->updateTimer.start(frameSpan);
+}
+//! [13]
+
+/*!
+ \reimp
+
+ This overloading of createSurface() is called on the client side to
+ create a window surface for a new window. If the \a widget is a
+ QGLWidget, or if the widget's width and height are both less than or
+ equal to 256, it creates an instance of QAhiGLWindowSurface.
+ Otherwise, it calls QScreen::createSurface() to create a non-OpenGL
+ window surface. The pointer to the new window surface is returned.
+
+ Note that this function first asks whether this application is the
+ server, and it only creates an instance of QAhiGLWindowSurface if
+ the answer is yes. What this means is we only let the server have
+ access to the OpenGL hardware, because of an implementation
+ restyriction in the OpenGL libraries we are using. Thus only clients
+ that are in the server process get to create OpenGL window surfaces.
+ */
+//! [14]
+QWSWindowSurface* QAhiGLScreen::createSurface(QWidget *widget) const
+{
+ if (QApplication::type() == QApplication::GuiServer) {
+ if (qobject_cast<QGLWidget*>(widget)) {
+ return new QAhiGLWindowSurface(widget,
+ d_ptr->eglDisplay,
+ d_ptr->eglSurface,
+ d_ptr->eglContext);
+ }
+
+ const QRect rect = widget->frameGeometry();
+ if (rect.width() <= 256 && rect.height() <= 256) {
+ return new QAhiGLWindowSurface(widget,
+ d_ptr->eglDisplay,
+ d_ptr->eglSurface,
+ d_ptr->eglContext);
+ }
+ }
+
+ return QScreen::createSurface(widget);
+}
+//! [14]
+
+/*!
+ \reimp
+
+ This overloading of createSurface() is called on the server side
+ to manage a window surface corresponding to a window surface
+ already created on the client side.
+
+ If the \a key is "ahigl", create an instance of QAhiGLWindowSurface
+ and return it. Otherwise, call QScreen::createSurface() and return
+ the window surface it creates.
+
+ See QScreen::createSurface().
+ */
+//! [15]
+QWSWindowSurface* QAhiGLScreen::createSurface(const QString &key) const
+{
+ if (key == QLatin1String("ahigl")) {
+ return new QAhiGLWindowSurface(d_ptr->eglDisplay,
+ d_ptr->eglSurface,
+ d_ptr->eglContext);
+ }
+
+ return QScreen::createSurface(key);
+}
+//! [15]
+
+/*!
+ This function would normally reset the frame buffer resolution
+ according to \a width, \a height, and the bit \a depth. It would
+ then notify other applications that their frame buffer size had
+ changed so they could redraw. The function is a no-op in this
+ example, which means the example screen driver can't change its
+ frame buffer resolution. There is no significance to that in the
+ example. You would normally implement setMode() in an OpenGL
+ screen driver. This no-op reimplementation is required here
+ because setMode() in QScreen is a pure virtual function.
+
+ See QScreen::setMode()
+ */
+void QAhiGLScreen::setMode(int width, int height, int depth)
+{
+ Q_UNUSED(width);
+ Q_UNUSED(height);
+ Q_UNUSED(depth);
+}
+
+/*!
+ This function would normally be reimplemented to prevent the
+ screen driver from updating the screen if \a on is true. It is a
+ no-op in this example, which means the screen driver can always
+ update the screen.
+
+ See QScreen::blank().
+ */
+void QAhiGLScreen::blank(bool on)
+{
+ Q_UNUSED(on);
+}
+
+/*!
+ This function always returns true, since the purpose of
+ this screen driver class is to implement an OpenGL ES
+ screen driver. In some other class designed to handle both
+ OpenGL and non-OpenGL graphics, it might test the system to
+ determine whether OpenGL graphics are supported and return
+ true or false accordingly.
+ */
+bool QAhiGLScreen::hasOpenGL()
+{
+ return true;
+}
+
+#include "qscreenahigl_qws.moc"
diff --git a/examples/qws/ahigl/qscreenahigl_qws.h b/examples/qws/ahigl/qscreenahigl_qws.h
new file mode 100644
index 0000000..332d5c3
--- /dev/null
+++ b/examples/qws/ahigl/qscreenahigl_qws.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QAHIGLSCREEN_H
+#define QAHIGLSCREEN_H
+
+#include <QGLScreen>
+#include <QWSServer>
+
+QT_BEGIN_NAMESPACE
+class QAhiGLScreenPrivate;
+QT_END_NAMESPACE
+
+//! [0]
+class QAhiGLScreen : public QGLScreen
+{
+public:
+ QAhiGLScreen(int displayId);
+ virtual ~QAhiGLScreen();
+
+ bool initDevice();
+ bool connect(const QString &displaySpec);
+ void disconnect();
+ void shutdownDevice();
+
+ void setMode(int width, int height, int depth);
+ void blank(bool on);
+
+ void exposeRegion(QRegion r, int changing);
+
+ QWSWindowSurface* createSurface(QWidget *widget) const;
+ QWSWindowSurface* createSurface(const QString &key) const;
+
+ bool hasOpenGL();
+
+private:
+ void invalidateTexture(int windowIndex);
+ void redrawScreen();
+ void drawWindow(QWSWindow *win, qreal progress);
+ void drawQuad(const QRect &textureGeometry,
+ const QRect &subGeometry,
+ const QRect &screenGeometry);
+ void drawQuadWavyFlag(const QRect &textureGeometry,
+ const QRect &subTexGeometry,
+ const QRect &screenGeometry,
+ float progress);
+
+ QAhiGLScreenPrivate *d_ptr;
+ friend class QAhiGLScreenPrivate;
+};
+//! [0]
+
+#endif // QAHIGLSCREEN_H
diff --git a/examples/qws/ahigl/qscreenahiglplugin.cpp b/examples/qws/ahigl/qscreenahiglplugin.cpp
new file mode 100644
index 0000000..828de82
--- /dev/null
+++ b/examples/qws/ahigl/qscreenahiglplugin.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qscreenahigl_qws.h"
+
+#include <QScreenDriverPlugin>
+#include <QStringList>
+
+//! [0]
+class QAhiGLScreenPlugin : public QScreenDriverPlugin
+{
+public:
+ QAhiGLScreenPlugin();
+
+ QStringList keys() const;
+ QScreen *create(const QString&, int displayId);
+};
+//! [0]
+
+/*!
+ \class QAhiGLScreenPlugin
+ \brief The QAhiGLScreenPlugin class is the plugin for the ATI handheld device graphics driver.
+
+ QAhiGLScreenPlugin inherits QScreenDriverPlugin. See
+ \l{How to Create Qt Plugins} for details.
+ */
+
+/*!
+ This is the default constructor.
+ */
+QAhiGLScreenPlugin::QAhiGLScreenPlugin()
+ : QScreenDriverPlugin()
+{
+}
+
+/*!
+ Returns a string list containing the string "ahigl" which
+ is the only screen driver supported by this plugin.
+ */
+QStringList QAhiGLScreenPlugin::keys() const
+{
+ return (QStringList() << "ahigl");
+}
+
+/*!
+ Creates a screen driver of the kind specified by \a driver.
+ The \a displayId identifies the Qt for Embedded Linux server to connect to.
+ */
+QScreen* QAhiGLScreenPlugin::create(const QString& driver, int displayId)
+{
+ if (driver.toLower() != "ahigl")
+ return 0;
+
+ return new QAhiGLScreen(displayId);
+}
+
+//! [1]
+Q_EXPORT_PLUGIN2(qahiglscreen, QAhiGLScreenPlugin)
+//! [1]
diff --git a/examples/qws/ahigl/qwindowsurface_ahigl.cpp b/examples/qws/ahigl/qwindowsurface_ahigl.cpp
new file mode 100644
index 0000000..79924f9
--- /dev/null
+++ b/examples/qws/ahigl/qwindowsurface_ahigl.cpp
@@ -0,0 +1,349 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowsurface_ahigl_p.h"
+#include "qscreenahigl_qws.h"
+
+#include <qwsdisplay_qws.h>
+#include <QtGui/QPaintDevice>
+#include <QtGui/QWidget>
+#include <QtOpenGL/private/qglpaintdevice_qws_p.h>
+#include <QtOpenGL/private/qgl_p.h>
+#include <GLES/gl.h>
+
+/*!
+ \class QAhiGLWindowSurfacePrivate
+ \internal
+
+ \brief The QAhiGLWindowSurfacePrivate class is the private implementation
+ class for class QAhiGLWindowSurface.
+
+ This class contains only state variables.
+ */
+//! [0]
+class QAhiGLWindowSurfacePrivate
+{
+public:
+ QAhiGLWindowSurfacePrivate(EGLDisplay eglDisplay,
+ EGLSurface eglSurface,
+ EGLContext eglContext);
+
+ QPaintDevice *device;
+
+ int textureWidth;
+ int textureHeight;
+
+ GLuint texture;
+ GLuint frameBufferObject;
+ GLuint depthbuf;
+
+ EGLDisplay display;
+ EGLSurface surface;
+ EGLContext context;
+};
+//! [0]
+
+/*!
+ The construct just sets statwe variables using the ones
+ provided.
+ */
+QAhiGLWindowSurfacePrivate::QAhiGLWindowSurfacePrivate(EGLDisplay eglDisplay,
+ EGLSurface eglSurface,
+ EGLContext eglContext)
+ : texture(0), frameBufferObject(0), depthbuf(0), display(eglDisplay),
+ surface(eglSurface), context(eglContext)
+{
+}
+
+inline static int nextPowerOfTwo(uint v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ ++v;
+ return v;
+}
+
+/*!
+ \class QAhiGLWindowSurface
+ \preliminary
+ \internal
+
+ \brief The QAhiGLWindowSurface class provides the drawing area
+ for top-level windows using OpenGL for drawing on an ATI handheld
+ device.
+
+ In \l{Qt for Embedded Linux}, the default behavior for each client is to
+ render widgets into an area of memory. The server then displays
+ the contents of that memory on the screen. For ATI handheld
+ devices using OpenGL, QAhiGLWindowSurface is the window surface
+ class that allocates and manages the memory areas in the clients
+ and the server.
+
+ When a screen update is required, the server runs through all the
+ top-level windows that intersect with the region being updated,
+ ensuring that the clients have updated their window surfaces. Then
+ the server uses the screen driver to copy the contents of the
+ affected window surfaces into its composition and then display the
+ composition on the screen.
+
+ \tableofcontents
+
+ \section1 Pure Virtual Functions
+
+ There are two window surface instances for each top-level window.
+ One is used by the application when drawing a window, and the
+ other is used by the server application to make its copy for
+ building a window composition to send to the screen.
+
+ The key() function is implemented to uniquely identify this window
+ surface class as "ahigl", and the isValid() function is
+ implemented to determine whether the associated window is still
+ acceptable for representation by this window surface class. It
+ must either be a window using an \l {QGLWidget} {OpenGL widget},
+ or it must be a window whose frame is no bigger than 256 x 256.
+
+ The setGeometry() function is implemented to change the geometry
+ of the frame buffer whenever the geometry of the associated
+ top-level window changes. The image() function is called by the
+ window system when building window compositions to return an image
+ of the top-level window.
+
+ The paintDevice() function is implemented to return the appropriate
+ paint device.
+
+ \section1 Virtual Functions
+
+ When painting onto the surface, the window system will always call
+ the beginPaint() function before any painting operations are
+ performed. It ensures that the correct frame buffer will be used
+ by the OpenGL library for painting operations. Likewise, the
+ endPaint() function is automatically called when the painting is
+ done, but it isn't implemented for this example.
+*/
+
+/*!
+ This is the client side constructor.
+ */
+//! [1]
+QAhiGLWindowSurface::QAhiGLWindowSurface(QWidget *widget,
+ EGLDisplay eglDisplay,
+ EGLSurface eglSurface,
+ EGLContext eglContext)
+ : QWSGLWindowSurface(widget)
+{
+ d_ptr = new QAhiGLWindowSurfacePrivate(eglDisplay, eglSurface, eglContext);
+ d_ptr->device = new QWSGLPaintDevice(widget);
+
+ setSurfaceFlags(QWSWindowSurface::Buffered);
+}
+//! [1]
+
+/*!
+ This is the server side constructor.
+ */
+//! [2]
+QAhiGLWindowSurface::QAhiGLWindowSurface(EGLDisplay eglDisplay,
+ EGLSurface eglSurface,
+ EGLContext eglContext)
+{
+ d_ptr = new QAhiGLWindowSurfacePrivate(eglDisplay, eglSurface, eglContext);
+ setSurfaceFlags(QWSWindowSurface::Buffered);
+}
+//! [2]
+
+/*!
+ The destructor deletes the OpenGL structures held by the
+ private implementation class, and then it deletes the
+ private implementation class.
+ */
+QAhiGLWindowSurface::~QAhiGLWindowSurface()
+{
+ if (d_ptr->texture)
+ glDeleteTextures(1, &d_ptr->texture);
+ if (d_ptr->depthbuf)
+ glDeleteRenderbuffersOES(1, &d_ptr->depthbuf);
+ if (d_ptr->frameBufferObject)
+ glDeleteFramebuffersOES(1, &d_ptr->frameBufferObject);
+
+ delete d_ptr;
+}
+
+/*!
+ This function changes the geometry of the frame buffer
+ to the geometry in \a rect. It is called whenever the
+ geometry of the associated top-level window changes. It
+ also rebuilds the window surface's texture and binds
+ the OpenGL identifier to the texture for use by the
+ OpenGL library.
+ */
+//! [3]
+void QAhiGLWindowSurface::setGeometry(const QRect &rect)
+{
+ QSize size = rect.size();
+
+ const QWidget *w = window();
+ if (w && !w->mask().isEmpty()) {
+ const QRegion region = w->mask()
+ & rect.translated(-w->geometry().topLeft());
+ size = region.boundingRect().size();
+ }
+
+ if (geometry().size() != size) {
+
+ // Driver specific limitations:
+ // FBO maximimum size of 256x256
+ // Depth buffer required
+
+ d_ptr->textureWidth = qMin(256, nextPowerOfTwo(size.width()));
+ d_ptr->textureHeight = qMin(256, nextPowerOfTwo(size.height()));
+
+ glGenTextures(1, &d_ptr->texture);
+ glBindTexture(GL_TEXTURE_2D, d_ptr->texture);
+
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ const int bufSize = d_ptr->textureWidth * d_ptr->textureHeight * 2;
+ GLshort buf[bufSize];
+ memset(buf, 0, sizeof(GLshort) * bufSize);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, d_ptr->textureWidth,
+ d_ptr->textureHeight, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, buf);
+
+ glGenRenderbuffersOES(1, &d_ptr->depthbuf);
+ glBindRenderbufferOES(GL_RENDERBUFFER_EXT, d_ptr->depthbuf);
+ glRenderbufferStorageOES(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT16,
+ d_ptr->textureWidth, d_ptr->textureHeight);
+
+ glGenFramebuffersOES(1, &d_ptr->frameBufferObject);
+ glBindFramebufferOES(GL_FRAMEBUFFER_EXT, d_ptr->frameBufferObject);
+
+ glFramebufferTexture2DOES(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_2D, d_ptr->texture, 0);
+ glFramebufferRenderbufferOES(GL_FRAMEBUFFER_EXT,
+ GL_DEPTH_ATTACHMENT_EXT,
+ GL_RENDERBUFFER_EXT, d_ptr->depthbuf);
+ glBindFramebufferOES(GL_FRAMEBUFFER_EXT, 0);
+ }
+
+ QWSGLWindowSurface::setGeometry(rect);
+}
+//! [3]
+
+/*!
+ Returns the window surface's texture as a QByteArray.
+ */
+QByteArray QAhiGLWindowSurface::permanentState() const
+{
+ QByteArray array;
+ array.resize(sizeof(GLuint));
+
+ char *ptr = array.data();
+ reinterpret_cast<GLuint*>(ptr)[0] = textureId();
+ return array;
+}
+
+/*!
+ Sets the window surface's texture to \a data.
+ */
+void QAhiGLWindowSurface::setPermanentState(const QByteArray &data)
+{
+ const char *ptr = data.constData();
+ d_ptr->texture = reinterpret_cast<const GLuint*>(ptr)[0];
+}
+
+/*!
+ Returns the paint device being used for this window surface.
+ */
+QPaintDevice *QAhiGLWindowSurface::paintDevice()
+{
+ return d_ptr->device;
+}
+
+/*!
+ Returns the window surface's texture.
+ */
+GLuint QAhiGLWindowSurface::textureId() const
+{
+ return d_ptr->texture;
+}
+
+/*!
+ The \l {QWSServer} {window system} always calls this function
+ before any painting operations begin for this window surface.
+ It ensures that the correct frame buffer will be used by the
+ OpenGL library for painting operations.
+ */
+//! [4]
+void QAhiGLWindowSurface::beginPaint(const QRegion &region)
+{
+ QWSGLWindowSurface::beginPaint(region);
+
+ if (d_ptr->frameBufferObject)
+ glBindFramebufferOES(GL_FRAMEBUFFER_EXT, d_ptr->frameBufferObject);
+}
+//! [4]
+
+/*!
+ This function returns true if the window associated with
+ this window surface can still rendered using this window
+ surface class. Either the window's top-level widget must
+ be an \l {QGLWidget} {OpenGL widget}, or the window's
+ frame must be no bigger than 256 x 256.
+ */
+//! [5]
+bool QAhiGLWindowSurface::isValid() const
+{
+ if (!qobject_cast<QGLWidget*>(window())) {
+ const QRect r = window()->frameGeometry();
+ if (r.width() > 256 || r.height() > 256)
+ return false;
+ }
+ return true;
+}
+//! [5]
diff --git a/examples/qws/ahigl/qwindowsurface_ahigl_p.h b/examples/qws/ahigl/qwindowsurface_ahigl_p.h
new file mode 100644
index 0000000..40a82ed
--- /dev/null
+++ b/examples/qws/ahigl/qwindowsurface_ahigl_p.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINDOWSURFACE_AHIGL_P_H
+#define QWINDOWSURFACE_AHIGL_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 QAhiGLWindowSurface class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtOpenGL/private/qglwindowsurface_qws_p.h>
+#include <GLES/gl.h>
+#include <GLES/egl.h>
+
+QT_BEGIN_NAMESPACE
+class QAhiGLWindowSurfacePrivate;
+QT_END_NAMESPACE
+
+//! [0]
+class QAhiGLWindowSurface : public QWSGLWindowSurface
+{
+public:
+ QAhiGLWindowSurface(QWidget *widget, EGLDisplay eglDisplay,
+ EGLSurface eglSurface, EGLContext eglContext);
+ QAhiGLWindowSurface(EGLDisplay eglDisplay, EGLSurface eglSurface,
+ EGLContext eglContext);
+ ~QAhiGLWindowSurface();
+
+ QString key() const { return QLatin1String("ahigl"); }
+ void setGeometry(const QRect &rect);
+ QPaintDevice *paintDevice();
+ void beginPaint(const QRegion &region);
+ bool isValid() const;
+
+ QByteArray permanentState() const;
+ void setPermanentState(const QByteArray &);
+
+ QImage image() const { return QImage(); }
+
+ GLuint textureId() const;
+
+private:
+ QAhiGLWindowSurfacePrivate *d_ptr;
+};
+//! [0]
+
+#endif // QWINDOWSURFACE_AHIGL_P_H
diff --git a/examples/qws/dbscreen/dbscreen.cpp b/examples/qws/dbscreen/dbscreen.cpp
new file mode 100644
index 0000000..bd26848
--- /dev/null
+++ b/examples/qws/dbscreen/dbscreen.cpp
@@ -0,0 +1,99 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+ **
+ ** This file is part of the examples of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+ **
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ **
+ ****************************************************************************/
+
+#include "dbscreen.h"
+#include <QApplication>
+
+//! [0]
+bool DBScreen::initDevice()
+{
+ if (!QLinuxFbScreen::initDevice())
+ return false;
+
+ QScreenCursor::initSoftwareCursor();
+ image = new QImage(deviceWidth(), deviceHeight(), pixelFormat());
+ painter = new QPainter(image);
+
+ return true;
+}
+//! [0]
+
+//! [1]
+void DBScreen::shutdownDevice()
+{
+ QLinuxFbScreen::shutdownDevice();
+ delete painter;
+ delete image;
+}
+//! [1]
+
+//! [2]
+void DBScreen::solidFill(const QColor &color, const QRegion &region)
+{
+ QVector<QRect> rects = region.rects();
+ for (int i = 0; i < rects.size(); i++)
+ painter->fillRect(rects.at(i), color);
+}
+//! [2]
+
+//! [3]
+void DBScreen::blit(const QImage &image, const QPoint &topLeft, const QRegion &region)
+{
+ QVector<QRect> rects = region.rects();
+ for (int i = 0; i < rects.size(); i++) {
+ QRect destRect = rects.at(i);
+ QRect srcRect(destRect.x()-topLeft.x(), destRect.y()-topLeft.y(), destRect.width(), destRect.height());
+ painter->drawImage(destRect.topLeft(), image, srcRect);
+ }
+}
+//! [3]
+
+//! [4]
+void DBScreen::exposeRegion(QRegion region, int changing)
+{
+ QLinuxFbScreen::exposeRegion(region, changing);
+ QLinuxFbScreen::blit(*image, QPoint(0, 0), region);
+}
+//! [4]
+
diff --git a/examples/qws/dbscreen/dbscreen.h b/examples/qws/dbscreen/dbscreen.h
new file mode 100644
index 0000000..00221e9
--- /dev/null
+++ b/examples/qws/dbscreen/dbscreen.h
@@ -0,0 +1,70 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+ **
+ ** This file is part of the examples of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+ **
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ **
+ ****************************************************************************/
+
+#ifndef DBSCREEN_H
+#define DBSCREEN_H
+
+#include <QLinuxFbScreen>
+#include <QPainter>
+
+//! [0]
+class DBScreen : public QLinuxFbScreen
+{
+public:
+ DBScreen(int displayId) : QLinuxFbScreen(displayId) {};
+ ~DBScreen() {}
+ bool initDevice();
+ void shutdownDevice();
+ void blit(const QImage &image, const QPoint &topLeft, const QRegion &region);
+ void solidFill(const QColor &color, const QRegion &region);
+ void exposeRegion(QRegion region, int changing);
+
+private:
+ QPainter *painter;
+ QImage *image;
+};
+//! [0]
+
+#endif // DBSCREEN_H
+
diff --git a/examples/qws/dbscreen/dbscreen.pro b/examples/qws/dbscreen/dbscreen.pro
new file mode 100644
index 0000000..172a02a
--- /dev/null
+++ b/examples/qws/dbscreen/dbscreen.pro
@@ -0,0 +1,11 @@
+TEMPLATE = lib
+CONFIG += plugin
+
+TARGET = dbscreen
+target.path += $$[QT_INSTALL_PLUGINS]/gfxdrivers
+INSTALLS += target
+
+HEADERS = dbscreen.h
+SOURCES = dbscreendriverplugin.cpp \
+ dbscreen.cpp
+
diff --git a/examples/qws/dbscreen/dbscreendriverplugin.cpp b/examples/qws/dbscreen/dbscreendriverplugin.cpp
new file mode 100644
index 0000000..36587a1
--- /dev/null
+++ b/examples/qws/dbscreen/dbscreendriverplugin.cpp
@@ -0,0 +1,80 @@
+ /****************************************************************************
+ **
+ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+ **
+ ** This file is part of the examples of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+ **
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ **
+ ****************************************************************************/
+
+#include <QScreenDriverPlugin>
+#include "dbscreen.h"
+
+//! [0]
+class DBScreenDriverPlugin : public QScreenDriverPlugin
+{
+public:
+ DBScreenDriverPlugin();
+ QScreen* create(const QString& key, int displayId);
+ QStringList keys () const;
+};
+//! [0]
+
+DBScreenDriverPlugin::DBScreenDriverPlugin() : QScreenDriverPlugin()
+{
+}
+
+//! [1]
+QScreen* DBScreenDriverPlugin::create(const QString& key, int displayId)
+{
+ if (key.toLower() != "dbscreen")
+ return 0;
+
+ return new DBScreen(displayId);
+}
+//! [1]
+
+//! [2]
+QStringList DBScreenDriverPlugin::keys() const
+{
+ return QStringList() << "dbscreen";
+}
+//! [2] //! [3]
+
+Q_EXPORT_PLUGIN2(dbscreen, DBScreenDriverPlugin)
+//! [3]
diff --git a/examples/qws/framebuffer/framebuffer.pro b/examples/qws/framebuffer/framebuffer.pro
new file mode 100644
index 0000000..f9fe850
--- /dev/null
+++ b/examples/qws/framebuffer/framebuffer.pro
@@ -0,0 +1,11 @@
+TEMPLATE = app
+TARGET = framebuffer
+CONFIG -= qt
+
+SOURCES += main.c
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qws/framebuffer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS framebuffer.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qws/framebuffer
+INSTALLS += target sources
diff --git a/examples/qws/framebuffer/main.c b/examples/qws/framebuffer/main.c
new file mode 100644
index 0000000..2c2cf31
--- /dev/null
+++ b/examples/qws/framebuffer/main.c
@@ -0,0 +1,586 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <linux/fb.h>
+#include <linux/kd.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <string.h>
+#include <errno.h>
+
+struct fb_var_screeninfo vinfo;
+struct fb_fix_screeninfo finfo;
+char *frameBuffer = 0;
+int fbFd = 0;
+int ttyFd = 0;
+
+void printFixedInfo()
+{
+ printf("Fixed screen info:\n"
+ "\tid: %s\n"
+ "\tsmem_start: 0x%lx\n"
+ "\tsmem_len: %d\n"
+ "\ttype: %d\n"
+ "\ttype_aux: %d\n"
+ "\tvisual: %d\n"
+ "\txpanstep: %d\n"
+ "\typanstep: %d\n"
+ "\tywrapstep: %d\n"
+ "\tline_length: %d\n"
+ "\tmmio_start: 0x%lx\n"
+ "\tmmio_len: %d\n"
+ "\taccel: %d\n"
+ "\n",
+ finfo.id, finfo.smem_start, finfo.smem_len, finfo.type,
+ finfo.type_aux, finfo.visual, finfo.xpanstep, finfo.ypanstep,
+ finfo.ywrapstep, finfo.line_length, finfo.mmio_start,
+ finfo.mmio_len, finfo.accel);
+}
+
+void printVariableInfo()
+{
+ printf("Variable screen info:\n"
+ "\txres: %d\n"
+ "\tyres: %d\n"
+ "\txres_virtual: %d\n"
+ "\tyres_virtual: %d\n"
+ "\tyoffset: %d\n"
+ "\txoffset: %d\n"
+ "\tbits_per_pixel: %d\n"
+ "\tgrayscale: %d\n"
+ "\tred: offset: %2d, length: %2d, msb_right: %2d\n"
+ "\tgreen: offset: %2d, length: %2d, msb_right: %2d\n"
+ "\tblue: offset: %2d, length: %2d, msb_right: %2d\n"
+ "\ttransp: offset: %2d, length: %2d, msb_right: %2d\n"
+ "\tnonstd: %d\n"
+ "\tactivate: %d\n"
+ "\theight: %d\n"
+ "\twidth: %d\n"
+ "\taccel_flags: 0x%x\n"
+ "\tpixclock: %d\n"
+ "\tleft_margin: %d\n"
+ "\tright_margin: %d\n"
+ "\tupper_margin: %d\n"
+ "\tlower_margin: %d\n"
+ "\thsync_len: %d\n"
+ "\tvsync_len: %d\n"
+ "\tsync: %d\n"
+ "\tvmode: %d\n"
+ "\n",
+ vinfo.xres, vinfo.yres, vinfo.xres_virtual, vinfo.yres_virtual,
+ vinfo.xoffset, vinfo.yoffset, vinfo.bits_per_pixel, vinfo.grayscale,
+ vinfo.red.offset, vinfo.red.length, vinfo.red.msb_right,
+ vinfo.green.offset, vinfo.green.length, vinfo.green.msb_right,
+ vinfo.blue.offset, vinfo.blue.length, vinfo.blue.msb_right,
+ vinfo.transp.offset, vinfo.transp.length, vinfo.transp.msb_right,
+ vinfo.nonstd, vinfo.activate, vinfo.height, vinfo.width,
+ vinfo.accel_flags, vinfo.pixclock, vinfo.left_margin,
+ vinfo.right_margin, vinfo.upper_margin, vinfo.lower_margin,
+ vinfo.hsync_len, vinfo.vsync_len, vinfo.sync, vinfo.vmode);
+}
+
+long switchToGraphicsMode()
+{
+ const char *const devs[] = {"/dev/tty0", "/dev/tty", "/dev/console", 0};
+ const char * const *dev;
+ long oldMode = KD_TEXT;
+
+ for (dev = devs; *dev; ++dev) {
+ ttyFd = open(*dev, O_RDWR);
+ if (ttyFd != -1)
+ break;
+ printf("Opening tty device %s failed: %s\n", *dev, strerror(errno));
+ }
+
+ ioctl(ttyFd, KDGETMODE, &oldMode);
+ if (oldMode == KD_GRAPHICS) {
+ printf("Was in graphics mode already. Skipping\n");
+ return oldMode;
+ }
+ int ret = ioctl(ttyFd, KDSETMODE, KD_GRAPHICS);
+ if (ret == -1) {
+ printf("Switch to graphics mode failed: %s\n", strerror(errno));
+ return oldMode;
+ }
+
+ printf("Successfully switched to graphics mode.\n\n");
+
+ return oldMode;
+}
+
+void restoreTextMode(long oldMode)
+{
+ if (ttyFd == -1)
+ return;
+
+ ioctl(ttyFd, KDSETMODE, oldMode);
+ close(ttyFd);
+}
+
+struct fb_cmap oldPalette;
+struct fb_cmap palette;
+int paletteSize = 0;
+
+void initPalette_16()
+{
+ if (finfo.type == FB_TYPE_PACKED_PIXELS) {
+ // We'll setup a grayscale map for 4bpp linear
+ int val = 0;
+ int i;
+ for (i = 0; i < 16; ++i) {
+ palette.red[i] = (val << 8) | val;
+ palette.green[i] = (val << 8) | val;
+ palette.blue[i] = (val << 8) | val;
+ val += 17;
+ }
+ return;
+ }
+
+ // Default 16 colour palette
+ unsigned char reds[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0xFF, 0xA2,
+ 0x00, 0xFF, 0xFF, 0x00, 0x7F, 0x7F,
+ 0x00, 0x00, 0x00, 0x82 };
+ unsigned char greens[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0x00, 0xC5,
+ 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00,
+ 0x00, 0x7F, 0x7F, 0x7F };
+ unsigned char blues[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0x00, 0x11,
+ 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x7F,
+ 0x7F, 0x7F, 0x00, 0x00 };
+
+ int i;
+ for (i = 0; i < 16; ++i) {
+ palette.red[i] = ((reds[i]) << 8) | reds[i];
+ palette.green[i] = ((greens[i]) << 8) | greens[i];
+ palette.blue[i] = ((blues[i]) << 8) | blues[i];
+ palette.transp[i] = 0;
+ }
+}
+
+void initPalette_256()
+{
+ if (vinfo.grayscale) {
+ int i;
+ for (i = 0; i < 256; ++i) {
+ unsigned short c = (i << 8) | i;
+ palette.red[i] = c;
+ palette.green[i] = c;
+ palette.blue[i] = c;
+ palette.transp[i] = 0;
+ }
+ return;
+ }
+
+ // 6x6x6 216 color cube
+ int i = 0;
+ int ir, ig, ib;
+ for (ir = 0x0; ir <= 0xff; ir += 0x33) {
+ for (ig = 0x0; ig <= 0xff; ig += 0x33) {
+ for (ib = 0x0; ib <= 0xff; ib += 0x33) {
+ palette.red[i] = (ir << 8)|ir;
+ palette.green[i] = (ig << 8)|ig;
+ palette.blue[i] = (ib << 8)|ib;
+ palette.transp[i] = 0;
+ ++i;
+ }
+ }
+ }
+}
+
+void initPalette()
+{
+ switch (vinfo.bits_per_pixel) {
+ case 8: paletteSize = 256; break;
+ case 4: paletteSize = 16; break;
+ default: break;
+ }
+
+ if (!paletteSize)
+ return; /* not using a palette */
+
+ /* read old palette */
+ oldPalette.start = 0;
+ oldPalette.len = paletteSize;
+ oldPalette.red = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ oldPalette.green = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ oldPalette.blue=(unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ oldPalette.transp=(unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ if (ioctl(ttyFd, FBIOGETCMAP, &oldPalette) == -1)
+ perror("initPalette: error reading palette");
+
+ /* create new palette */
+ palette.start = 0;
+ palette.len = paletteSize;
+ palette.red = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ palette.green = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ palette.blue = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ palette.transp = (unsigned short*)malloc(sizeof(unsigned short)*paletteSize);
+ switch (paletteSize) {
+ case 16: initPalette_16(); break;
+ case 256: initPalette_256(); break;
+ default: break;
+ }
+
+ /* set new palette */
+ if (ioctl(ttyFd, FBIOPUTCMAP, &palette) == -1)
+ perror("initPalette: error setting palette");
+}
+
+void resetPalette()
+{
+ if (paletteSize == 0)
+ return;
+
+ if (ioctl(ttyFd, FBIOPUTCMAP, &oldPalette) == -1)
+ perror("resetPalette");
+
+ free(oldPalette.red);
+ free(oldPalette.green);
+ free(oldPalette.blue);
+ free(oldPalette.transp);
+
+ free(palette.red);
+ free(palette.green);
+ free(palette.blue);
+ free(palette.transp);
+}
+
+void drawRect_rgb32(int x0, int y0, int width, int height, int color)
+{
+ const int bytesPerPixel = 4;
+ const int stride = finfo.line_length / bytesPerPixel;
+
+ int *dest = (int*)(frameBuffer)
+ + (y0 + vinfo.yoffset) * stride
+ + (x0 + vinfo.xoffset);
+
+ int x, y;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; ++x) {
+ dest[x] = color;
+ }
+ dest += stride;
+ }
+}
+
+void drawRect_rgb18(int x0, int y0, int width, int height, int color)
+{
+ const int bytesPerPixel = 3;
+ const int stride = finfo.line_length - width * bytesPerPixel;
+ const int red = (color & 0xff0000) >> 16;
+ const int green = (color & 0xff00) >> 8;
+ const int blue = (color & 0xff);
+ const unsigned int packed = (blue >> 2) |
+ ((green >> 2) << 6) |
+ ((red >> 2) << 12);
+ const char color18[3] = { packed & 0xff,
+ (packed & 0xff00) >> 8,
+ (packed & 0xff0000) >> 16 };
+
+ char *dest = (char*)(frameBuffer)
+ + (y0 + vinfo.yoffset) * stride
+ + (x0 + vinfo.xoffset);
+
+ int x, y;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; ++x) {
+ *dest++ = color18[0];
+ *dest++ = color18[1];
+ *dest++ = color18[2];
+ }
+ dest += stride;
+ }
+}
+
+void drawRect_rgb16(int x0, int y0, int width, int height, int color)
+{
+ const int bytesPerPixel = 2;
+ const int stride = finfo.line_length / bytesPerPixel;
+ const int red = (color & 0xff0000) >> (16 + 3);
+ const int green = (color & 0xff00) >> (8 + 2);
+ const int blue = (color & 0xff) >> 3;
+ const short color16 = blue | (green << 5) | (red << (5 + 6));
+
+ short *dest = (short*)(frameBuffer)
+ + (y0 + vinfo.yoffset) * stride
+ + (x0 + vinfo.xoffset);
+
+ int x, y;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; ++x) {
+ dest[x] = color16;
+ }
+ dest += stride;
+ }
+}
+
+void drawRect_rgb15(int x0, int y0, int width, int height, int color)
+{
+ const int bytesPerPixel = 2;
+ const int stride = finfo.line_length / bytesPerPixel;
+ const int red = (color & 0xff0000) >> (16 + 3);
+ const int green = (color & 0xff00) >> (8 + 3);
+ const int blue = (color & 0xff) >> 3;
+ const short color15 = blue | (green << 5) | (red << (5 + 5));
+
+ short *dest = (short*)(frameBuffer)
+ + (y0 + vinfo.yoffset) * stride
+ + (x0 + vinfo.xoffset);
+
+ int x, y;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; ++x) {
+ dest[x] = color15;
+ }
+ dest += stride;
+ }
+}
+
+void drawRect_palette(int x0, int y0, int width, int height, int color)
+{
+ const int bytesPerPixel = 1;
+ const int stride = finfo.line_length / bytesPerPixel;
+ const unsigned char color8 = color;
+
+ unsigned char *dest = (unsigned char*)(frameBuffer)
+ + (y0 + vinfo.yoffset) * stride
+ + (x0 + vinfo.xoffset);
+
+ int x, y;
+ for (y = 0; y < height; ++y) {
+ for (x = 0; x < width; ++x) {
+ dest[x] = color8;
+ }
+ dest += stride;
+ }
+}
+
+void drawRect(int x0, int y0, int width, int height, int color)
+{
+ switch (vinfo.bits_per_pixel) {
+ case 32:
+ drawRect_rgb32(x0, y0, width, height, color);
+ break;
+ case 18:
+ drawRect_rgb18(x0, y0, width, height, color);
+ break;
+ case 16:
+ drawRect_rgb16(x0, y0, width, height, color);
+ break;
+ case 15:
+ drawRect_rgb15(x0, y0, width, height, color);
+ break;
+ case 8:
+ drawRect_palette(x0, y0, width, height, color);
+ break;
+ case 4:
+ drawRect_palette(x0, y0, width, height, color);
+ break;
+ default:
+ printf("Warning: drawRect() not implemented for color depth %i\n",
+ vinfo.bits_per_pixel);
+ break;
+ }
+}
+
+#define PERFORMANCE_RUN_COUNT 5
+void performSpeedTest(void* fb, int fbSize)
+{
+ int i, j, run;
+
+ struct timeval startTime, endTime;
+ unsigned long long results[PERFORMANCE_RUN_COUNT];
+ unsigned long long average;
+
+ unsigned int* testImage;
+
+ unsigned int randData[17] = {
+ 0x3A428472, 0x724B84D3, 0x26B898AB, 0x7D980E3C, 0x5345A084,
+ 0x6779B66B, 0x791EE4B4, 0x6E8EE3CC, 0x63AF504A, 0x18A21B33,
+ 0x0E26EB73, 0x022F708E, 0x1740F3B0, 0x7E2C699D, 0x0E8A570B,
+ 0x5F2C22FB, 0x6A742130
+ };
+
+ printf("Frame Buffer Performance test...\n");
+
+ for (run=0; run<PERFORMANCE_RUN_COUNT; ++run) {
+
+ /* Generate test image with random(ish) data: */
+ testImage = (unsigned int*) malloc(fbSize);
+ j = run;
+ for (i=0; i < (int)(fbSize / sizeof(int)); ++i) {
+ testImage[i] = randData[j];
+ j++;
+ if (j >= 17)
+ j = 0;
+ }
+
+ gettimeofday(&startTime, NULL);
+ memcpy(fb, testImage, fbSize);
+ gettimeofday(&endTime, NULL);
+
+ long secsDiff = endTime.tv_sec - startTime.tv_sec;
+ results[run] = secsDiff * 1000000 + (endTime.tv_usec - startTime.tv_usec);
+
+ free(testImage);
+ }
+
+
+ average = 0;
+ for (i=0; i<PERFORMANCE_RUN_COUNT; ++i)
+ average += results[i];
+ average = average / PERFORMANCE_RUN_COUNT;
+
+ printf(" Average: %llu usecs\n", average);
+ printf(" Bandwidth: %.03f MByte/Sec\n", (fbSize / 1048576.0) / ((double)average / 1000000.0));
+ printf(" Max. FPS: %.03f fps\n\n", 1000000.0 / (double)average);
+
+ /* Clear the framebuffer back to black again: */
+ memset(fb, 0, fbSize);
+}
+
+int main(int argc, char **argv)
+{
+ long int screensize = 0;
+ int doGraphicsMode = 1;
+ long oldKdMode = KD_TEXT;
+ const char *devfile = "/dev/fb0";
+ int nextArg = 1;
+
+ if (nextArg < argc) {
+ if (strncmp("nographicsmodeswitch", argv[nextArg],
+ strlen("nographicsmodeswitch")) == 0)
+ {
+ ++nextArg;
+ doGraphicsMode = 0;
+ }
+ }
+ if (nextArg < argc)
+ devfile = argv[nextArg++];
+
+ /* Open the file for reading and writing */
+ fbFd = open(devfile, O_RDWR);
+ if (fbFd == -1) {
+ perror("Error: cannot open framebuffer device");
+ exit(1);
+ }
+ printf("The framebuffer device was opened successfully.\n\n");
+
+ /* Get fixed screen information */
+ if (ioctl(fbFd, FBIOGET_FSCREENINFO, &finfo) == -1) {
+ perror("Error reading fixed information");
+ exit(2);
+ }
+
+ printFixedInfo();
+
+ /* Figure out the size of the screen in bytes */
+ screensize = finfo.smem_len;
+
+ /* Map the device to memory */
+ frameBuffer = (char *)mmap(0, screensize,
+ PROT_READ | PROT_WRITE, MAP_SHARED,
+ fbFd, 0);
+ if (frameBuffer == MAP_FAILED) {
+ perror("Error: Failed to map framebuffer device to memory");
+ exit(4);
+ }
+ printf("The framebuffer device was mapped to memory successfully.\n"
+ "\n");
+
+ if (doGraphicsMode)
+ oldKdMode = switchToGraphicsMode();
+
+ /* Get variable screen information */
+ if (ioctl(fbFd, FBIOGET_VSCREENINFO, &vinfo) == -1) {
+ perror("Error reading variable information");
+ exit(3);
+ }
+
+ printVariableInfo();
+
+ performSpeedTest(frameBuffer, screensize);
+
+ initPalette();
+
+ if (paletteSize == 0) {
+ printf("Will draw 3 rectangles on the screen,\n"
+ "they should be colored red, green and blue (in that order).\n");
+ drawRect(vinfo.xres / 8, vinfo.yres / 8,
+ vinfo.xres / 4, vinfo.yres / 4,
+ 0xffff0000);
+ drawRect(vinfo.xres * 3 / 8, vinfo.yres * 3 / 8,
+ vinfo.xres / 4, vinfo.yres / 4,
+ 0xff00ff00);
+ drawRect(vinfo.xres * 5 / 8, vinfo.yres * 5 / 8,
+ vinfo.xres / 4, vinfo.yres / 4,
+ 0xff0000ff);
+ } else {
+ printf("Will rectangles from the 16 first entries in the color palette"
+ " on the screen\n");
+ int y;
+ int x;
+ for (y = 0; y < 4; ++y) {
+ for (x = 0; x < 4; ++x) {
+ drawRect(vinfo.xres / 4 * x, vinfo.yres / 4 * y,
+ vinfo.xres / 4, vinfo.yres / 4,
+ 4 * y + x);
+ }
+ }
+ }
+
+ sleep(5);
+
+ resetPalette();
+
+ printf(" Done.\n");
+
+ if (doGraphicsMode)
+ restoreTextMode(oldKdMode);
+
+ munmap(frameBuffer, screensize);
+ close(fbFd);
+ return 0;
+}
diff --git a/examples/qws/mousecalibration/calibration.cpp b/examples/qws/mousecalibration/calibration.cpp
new file mode 100644
index 0000000..7e344e0
--- /dev/null
+++ b/examples/qws/mousecalibration/calibration.cpp
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "calibration.h"
+
+#include <QWSPointerCalibrationData>
+#include <QPainter>
+#include <QFile>
+#include <QTimer>
+#include <QApplication>
+#include <QDesktopWidget>
+#include <QMouseEvent>
+#include <QScreen>
+#include <QWSServer>
+
+//! [0]
+Calibration::Calibration()
+{
+ QRect desktop = QApplication::desktop()->geometry();
+ desktop.moveTo(QPoint(0, 0));
+ setGeometry(desktop);
+
+ setFocusPolicy(Qt::StrongFocus);
+ setFocus();
+ setModal(true);
+//! [0]
+
+//! [1]
+ int width = qt_screen->deviceWidth();
+ int height = qt_screen->deviceHeight();
+
+ int dx = width / 10;
+ int dy = height / 10;
+
+ QPoint *points = data.screenPoints;
+ points[QWSPointerCalibrationData::TopLeft] = QPoint(dx, dy);
+ points[QWSPointerCalibrationData::BottomLeft] = QPoint(dx, height - dy);
+ points[QWSPointerCalibrationData::BottomRight] = QPoint(width - dx, height - dy);
+ points[QWSPointerCalibrationData::TopRight] = QPoint(width - dx, dy);
+ points[QWSPointerCalibrationData::Center] = QPoint(width / 2, height / 2);
+//! [1]
+
+//! [2]
+ pressCount = 0;
+}
+//! [2]
+
+//! [3]
+Calibration::~Calibration()
+{
+}
+//! [3]
+
+//! [4]
+int Calibration::exec()
+{
+ QWSServer::mouseHandler()->clearCalibration();
+ grabMouse();
+ activateWindow();
+ int ret = QDialog::exec();
+ releaseMouse();
+ return ret;
+}
+//! [4]
+
+//! [5]
+void Calibration::paintEvent(QPaintEvent*)
+{
+ QPainter p(this);
+ p.fillRect(rect(), Qt::white);
+
+ QPoint point = data.screenPoints[pressCount];
+
+ // Map to logical coordinates in case the screen is transformed
+ QSize screenSize(qt_screen->deviceWidth(), qt_screen->deviceHeight());
+ point = qt_screen->mapFromDevice(point, screenSize);
+
+ p.fillRect(point.x() - 6, point.y() - 1, 13, 3, Qt::black);
+ p.fillRect(point.x() - 1, point.y() - 6, 3, 13, Qt::black);
+}
+//! [5]
+
+//! [6]
+void Calibration::mouseReleaseEvent(QMouseEvent *event)
+{
+ // Map from device coordinates in case the screen is transformed
+ QSize screenSize(qt_screen->width(), qt_screen->height());
+ QPoint p = qt_screen->mapToDevice(event->pos(), screenSize);
+
+ data.devPoints[pressCount] = p;
+
+ if (++pressCount < 5)
+ repaint();
+ else
+ accept();
+}
+//! [6]
+
+//! [7]
+void Calibration::accept()
+{
+ Q_ASSERT(pressCount == 5);
+ QWSServer::mouseHandler()->calibrate(&data);
+ QDialog::accept();
+}
+//! [7]
+
diff --git a/examples/qws/mousecalibration/calibration.h b/examples/qws/mousecalibration/calibration.h
new file mode 100644
index 0000000..ae862e5
--- /dev/null
+++ b/examples/qws/mousecalibration/calibration.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALIBRATION_H
+#define CALIBRATION_H
+
+#include <QDialog>
+#include <QWSPointerCalibrationData>
+
+//! [0]
+class Calibration : public QDialog
+{
+public:
+ Calibration();
+ ~Calibration();
+ int exec();
+
+protected:
+ void paintEvent(QPaintEvent*);
+ void mouseReleaseEvent(QMouseEvent*);
+ void accept();
+
+private:
+ QWSPointerCalibrationData data;
+ int pressCount;
+};
+//! [0]
+
+
+#endif
diff --git a/examples/qws/mousecalibration/main.cpp b/examples/qws/mousecalibration/main.cpp
new file mode 100644
index 0000000..c318383
--- /dev/null
+++ b/examples/qws/mousecalibration/main.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMessageBox>
+#include <QTimer>
+#include <QWSServer>
+
+#include "calibration.h"
+#include "scribblewidget.h"
+
+//! [0]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv, QApplication::GuiServer);
+
+ if (!QWSServer::mouseHandler())
+ qFatal("No mouse handler installed");
+
+ {
+ QMessageBox message;
+ message.setText("<p>Please press once at each of the marks "
+ "shown in the next screen.</p>"
+ "<p>This messagebox will timout after 10 seconds "
+ "if you are unable to close it.</p>");
+ QTimer::singleShot(10 * 1000, &message, SLOT(accept()));
+ message.exec();
+ }
+
+//! [0] //! [1]
+ Calibration cal;
+ cal.exec();
+//! [1]
+
+//! [2]
+ {
+ QMessageBox message;
+ message.setText("<p>The next screen will let you test the calibration "
+ "by drawing into a widget.</p><p>This program will "
+ "automatically close after 20 seconds.<p>");
+ QTimer::singleShot(10 * 1000, &message, SLOT(accept()));
+ message.exec();
+ }
+
+ ScribbleWidget scribble;
+ scribble.showMaximized();
+ scribble.show();
+
+ app.setActiveWindow(&scribble);
+ QTimer::singleShot(20 * 1000, &app, SLOT(quit()));
+
+ return app.exec();
+}
+//! [2]
+
diff --git a/examples/qws/mousecalibration/mousecalibration.pro b/examples/qws/mousecalibration/mousecalibration.pro
new file mode 100644
index 0000000..bd31853
--- /dev/null
+++ b/examples/qws/mousecalibration/mousecalibration.pro
@@ -0,0 +1,11 @@
+HEADERS += calibration.h \
+ scribblewidget.h
+SOURCES += calibration.cpp \
+ scribblewidget.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qws/mousecalibration
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qws/mousecalibration
+INSTALLS += target sources
diff --git a/examples/qws/mousecalibration/scribblewidget.cpp b/examples/qws/mousecalibration/scribblewidget.cpp
new file mode 100644
index 0000000..255afd0
--- /dev/null
+++ b/examples/qws/mousecalibration/scribblewidget.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "scribblewidget.h"
+
+ScribbleWidget::ScribbleWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ scribbling = false;
+}
+
+void ScribbleWidget::resizeEvent(QResizeEvent *e)
+{
+ image = QImage(e->size(), QImage::Format_RGB32);
+ image.fill(QColor(Qt::white).rgb());
+}
+
+void ScribbleWidget::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() != Qt::LeftButton)
+ return;
+
+ lastPoint = event->pos();
+ scribbling = true;
+}
+
+void ScribbleWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if ((event->buttons() & Qt::LeftButton) && scribbling)
+ drawLineTo(event->pos());
+}
+
+void ScribbleWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton && scribbling) {
+ drawLineTo(event->pos());
+ scribbling = false;
+ }
+}
+
+void ScribbleWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.drawImage(QPoint(0, 0), image);
+}
+
+void ScribbleWidget::drawLineTo(const QPoint &endPoint)
+{
+ QPainter painter(&image);
+ painter.setPen(QPen(Qt::blue, 1, Qt::SolidLine,
+ Qt::RoundCap, Qt::RoundJoin));
+ painter.drawLine(lastPoint, endPoint);
+ update();
+ lastPoint = endPoint;
+}
diff --git a/examples/qws/mousecalibration/scribblewidget.h b/examples/qws/mousecalibration/scribblewidget.h
new file mode 100644
index 0000000..6693082
--- /dev/null
+++ b/examples/qws/mousecalibration/scribblewidget.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCRIBBLEWIDGET_H
+#define SCRIBBLEWIDGET_H
+
+#include <QLabel>
+#include <QMouseEvent>
+#include <QResizeEvent>
+#include <QImage>
+#include <QPainter>
+
+class ScribbleWidget : public QWidget
+{
+public:
+ ScribbleWidget(QWidget *parent = 0);
+
+ void resizeEvent(QResizeEvent *e);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *);
+
+private:
+ void drawLineTo(const QPoint &endPoint);
+
+private:
+ bool scribbling;
+ QPoint lastPoint;
+ QImage image;
+};
+
+#endif // SCRIBBLEWIDGET_H
diff --git a/examples/qws/qws.pro b/examples/qws/qws.pro
new file mode 100644
index 0000000..fb3c3c7
--- /dev/null
+++ b/examples/qws/qws.pro
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+SUBDIRS = framebuffer mousecalibration simpledecoration
+
+# install
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qws
+INSTALLS += sources
diff --git a/examples/qws/simpledecoration/analogclock.cpp b/examples/qws/simpledecoration/analogclock.cpp
new file mode 100644
index 0000000..28155ba
--- /dev/null
+++ b/examples/qws/simpledecoration/analogclock.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "analogclock.h"
+
+AnalogClock::AnalogClock(QWidget *parent)
+ : QWidget(parent)
+{
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ setWindowTitle(tr("Analog Clock"));
+ resize(200, 200);
+}
+
+void AnalogClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+}
diff --git a/examples/qws/simpledecoration/analogclock.h b/examples/qws/simpledecoration/analogclock.h
new file mode 100644
index 0000000..f779744
--- /dev/null
+++ b/examples/qws/simpledecoration/analogclock.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANALOGCLOCK_H
+#define ANALOGCLOCK_H
+
+#include <QWidget>
+
+class AnalogClock : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AnalogClock(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+};
+
+#endif
diff --git a/examples/qws/simpledecoration/main.cpp b/examples/qws/simpledecoration/main.cpp
new file mode 100644
index 0000000..597f5b3
--- /dev/null
+++ b/examples/qws/simpledecoration/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "analogclock.h"
+#include "mydecoration.h"
+
+//! [create application]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MyDecoration *decoration = new MyDecoration();
+ app.qwsSetDecoration(decoration);
+//! [create application]
+
+//! [start application]
+ AnalogClock clock;
+ clock.show();
+
+ return app.exec();
+}
+//! [start application]
diff --git a/examples/qws/simpledecoration/mydecoration.cpp b/examples/qws/simpledecoration/mydecoration.cpp
new file mode 100644
index 0000000..282bc88
--- /dev/null
+++ b/examples/qws/simpledecoration/mydecoration.cpp
@@ -0,0 +1,375 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mydecoration.h"
+
+/* XPM */
+static const char * const _close_button[] = {
+"16 16 3 1",
+" c none",
+". c #ffafaf",
+"x c #000000",
+" ",
+" xxxxxxxxxxxxxx ",
+" x............x ",
+" x.x........x.x ",
+" x..x......x..x ",
+" x...x....x...x ",
+" x....x..x....x ",
+" x.....xx.....x ",
+" x.....xx.....x ",
+" x....x..x....x ",
+" x...x....x...x ",
+" x..x......x..x ",
+" x.x........x.x ",
+" x............x ",
+" xxxxxxxxxxxxxx ",
+" "};
+
+static const char * const _normalize_button[] = {
+"16 16 4 1",
+" c none",
+". c #dfdfff",
+"o c #7f7f7f",
+"x c #000000",
+" ",
+" xxxxxxxxxxxxxx ",
+" xx...........x ",
+" x.x..........x ",
+" x..x..x......x ",
+" x...xxx......x ",
+" x...xxx......x ",
+" x..xxxx......x ",
+" x............x ",
+" x.......xxxx.x ",
+" x.......x..x.x ",
+" x.......x..x.x ",
+" x.......xxxx.x ",
+" x............x ",
+" xxxxxxxxxxxxxx ",
+" "};
+
+static const char * const _maximize_button[] = {
+"16 16 4 1",
+" c none",
+". c #dfdfff",
+"o c #7f7f7f",
+"x c #000000",
+" ",
+" xxxxxxxxxxxxxx ",
+" x............x ",
+" x.......xxxx.x ",
+" x........xxx.x ",
+" x........xxx.x ",
+" x.......x..x.x ",
+" x......x.....x ",
+" x.....x......x ",
+" x.oooo.......x ",
+" x.o..o.......x ",
+" x.o..o.......x ",
+" x.oooo.......x ",
+" x............x ",
+" xxxxxxxxxxxxxx ",
+" "};
+
+static const char * const _help_button[] = {
+"16 16 3 1",
+" c none",
+". c #afffdf",
+"x c #000000",
+" ",
+" xxxxxxxxxxxxxx ",
+" x............x ",
+" x....xxxx....x ",
+" x..xx....xx..x ",
+" x.xx......xx.x ",
+" x.xx......xx.x ",
+" x........xx..x ",
+" x......xx....x ",
+" x.....xx.....x ",
+" x.....xx.....x ",
+" x............x ",
+" x.....xx.....x ",
+" x............x ",
+" xxxxxxxxxxxxxx ",
+" "};
+
+//! [constructor start]
+MyDecoration::MyDecoration()
+ : QDecorationDefault()
+{
+ border = 4;
+ titleHeight = 24;
+ buttonWidth = 20;
+ buttonHeight = 20;
+ buttonMargin = 2;
+ buttonHints << Qt::Window
+ << Qt::WindowMaximizeButtonHint
+ << Qt::WindowContextHelpButtonHint;
+ //! [constructor start]
+
+ //! [map window flags to decoration regions]
+ buttonHintMap[Qt::Window] = Close;
+ buttonHintMap[Qt::WindowMaximizeButtonHint] = Maximize;
+ buttonHintMap[Qt::WindowContextHelpButtonHint] = Help;
+ //! [map window flags to decoration regions]
+
+ //! [map decoration regions to pixmaps]
+ normalButtonPixmaps[Close] = QPixmap(_close_button);
+ normalButtonPixmaps[Maximize] = QPixmap(_maximize_button);
+ normalButtonPixmaps[Normalize] = QPixmap(_normalize_button);
+ normalButtonPixmaps[Help] = QPixmap(_help_button);
+
+ maximizedButtonPixmaps[Close] = QPixmap(_close_button);
+ maximizedButtonPixmaps[Maximize] = QPixmap(_normalize_button);
+ maximizedButtonPixmaps[Normalize] = QPixmap(_normalize_button);
+ maximizedButtonPixmaps[Help] = QPixmap(_help_button);
+ //! [map decoration regions to pixmaps]
+
+ //! [constructor end]
+ stateRegions << Close << Maximize << Help;
+}
+//! [constructor end]
+
+//! [region start]
+QRegion MyDecoration::region(const QWidget *widget, const QRect &insideRect,
+ int decorationRegion)
+{
+ //! [region start]
+ //! [calculate the positions of buttons based on the window flags used]
+ QHash<DecorationRegion, int> buttons;
+ Qt::WindowFlags flags = widget->windowFlags();
+ int dx = -buttonMargin - buttonWidth;
+
+ foreach (Qt::WindowType button, buttonHints) {
+ if (flags & button) {
+ int x = (buttons.size() + 1) * dx;
+ buttons[buttonHintMap[button]] = x;
+ }
+ }
+ //! [calculate the positions of buttons based on the window flags used]
+
+ //! [calculate the extent of the title]
+ int titleRightMargin = buttons.size() * dx;
+
+ QRect outsideRect(insideRect.left() - border,
+ insideRect.top() - titleHeight - border,
+ insideRect.width() + 2 * border,
+ insideRect.height() + titleHeight + 2 * border);
+ //! [calculate the extent of the title]
+
+ //! [check for all regions]
+ QRegion region;
+
+ if (decorationRegion == All) {
+ region += QRegion(outsideRect) - QRegion(insideRect);
+ return region;
+ }
+ //! [check for all regions]
+
+ //! [compose a region based on the decorations specified]
+ if (decorationRegion & Title) {
+ QRect rect = outsideRect.adjusted(border, border, -border, 0);
+ rect.setHeight(titleHeight);
+
+ // Adjust the width to accommodate buttons.
+ rect.setWidth(qMax(0, rect.width() + titleRightMargin));
+ region += rect;
+ }
+ if (decorationRegion & Top) {
+ QRect rect = outsideRect.adjusted(border, 0, -border, 0);
+ rect.setHeight(border);
+ region += rect;
+ }
+ if (decorationRegion & Left) {
+ QRect rect = outsideRect.adjusted(0, border, 0, -border);
+ rect.setWidth(border);
+ region += rect;
+ }
+ if (decorationRegion & Right) {
+ QRect rect = outsideRect.adjusted(0, border, 0, -border);
+ rect.setLeft(rect.right() + 1 - border);
+ region += rect;
+ }
+ if (decorationRegion & Bottom) {
+ QRect rect = outsideRect.adjusted(border, 0, -border, 0);
+ rect.setTop(rect.bottom() + 1 - border);
+ region += rect;
+ }
+ if (decorationRegion & TopLeft) {
+ QRect rect = outsideRect;
+ rect.setWidth(border);
+ rect.setHeight(border);
+ region += rect;
+ }
+ if (decorationRegion & TopRight) {
+ QRect rect = outsideRect;
+ rect.setLeft(rect.right() + 1 - border);
+ rect.setHeight(border);
+ region += rect;
+ }
+ if (decorationRegion & BottomLeft) {
+ QRect rect = outsideRect;
+ rect.setWidth(border);
+ rect.setTop(rect.bottom() + 1 - border);
+ region += rect;
+ }
+ if (decorationRegion & BottomRight) {
+ QRect rect = outsideRect;
+ rect.setLeft(rect.right() + 1 - border);
+ rect.setTop(rect.bottom() + 1 - border);
+ region += rect;
+ }
+ //! [compose a region based on the decorations specified]
+
+ //! [add a region for each button only if it is present]
+ foreach (QDecoration::DecorationRegion testRegion, stateRegions) {
+ if (decorationRegion & testRegion and buttons.contains(testRegion)) {
+ // Inside the title rectangle
+ QRect rect = outsideRect.adjusted(border, border, -border, 0);
+ rect.setHeight(titleHeight);
+
+ dx = buttons[testRegion];
+ rect.setLeft(rect.right() + 1 + dx);
+ rect.setWidth(buttonWidth + buttonMargin);
+ region += rect;
+ }
+ }
+ //! [add a region for each button only if it is present]
+
+ //! [region end]
+ return region;
+}
+//! [region end]
+
+//! [paint start]
+bool MyDecoration::paint(QPainter *painter, const QWidget *widget,
+ int decorationRegion, DecorationState state)
+{
+ if (decorationRegion == None)
+ return false;
+ //! [paint start]
+
+ //! [paint different regions]
+ bool handled = false;
+
+ QPalette palette = QApplication::palette();
+ QHash<DecorationRegion, QPixmap> buttonPixmaps;
+
+ if (widget->windowState() == Qt::WindowMaximized)
+ buttonPixmaps = maximizedButtonPixmaps;
+ else
+ buttonPixmaps = normalButtonPixmaps;
+
+ if (decorationRegion & Title) {
+ QRect rect = QDecoration::region(widget, Title).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Base));
+ painter->save();
+ painter->setPen(QPen(palette.color(QPalette::Text)));
+ painter->drawText(rect, Qt::AlignCenter, widget->windowTitle());
+ painter->restore();
+ handled = true;
+ }
+ if (decorationRegion & Top) {
+ QRect rect = QDecoration::region(widget, Top).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & Left) {
+ QRect rect = QDecoration::region(widget, Left).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & Right) {
+ QRect rect = QDecoration::region(widget, Right).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & Bottom) {
+ QRect rect = QDecoration::region(widget, Bottom).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & TopLeft) {
+ QRect rect = QDecoration::region(widget, TopLeft).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & TopRight) {
+ QRect rect = QDecoration::region(widget, TopRight).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & BottomLeft) {
+ QRect rect = QDecoration::region(widget, BottomLeft).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ if (decorationRegion & BottomRight) {
+ QRect rect = QDecoration::region(widget, BottomRight).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Dark));
+ handled = true;
+ }
+ //! [paint different regions]
+
+ //! [paint buttons]
+ int margin = (titleHeight - 16) / 2;
+ Qt::WindowFlags flags = widget->windowFlags();
+
+ foreach (DecorationRegion testRegion, stateRegions) {
+ if (decorationRegion & testRegion && flags & buttonHintMap.key(testRegion)) {
+ QRect rect = QDecoration::region(
+ widget, testRegion).boundingRect();
+ painter->fillRect(rect, palette.brush(QPalette::Base));
+
+ QRect buttonRect = rect.adjusted(0, margin, -buttonMargin - margin,
+ -buttonMargin);
+ painter->drawPixmap(buttonRect.topLeft(), buttonPixmaps[testRegion]);
+ handled = true;
+ }
+ }
+ //! [paint buttons]
+
+ //! [paint end]
+ return handled;
+}
+//! [paint end]
diff --git a/examples/qws/simpledecoration/mydecoration.h b/examples/qws/simpledecoration/mydecoration.h
new file mode 100644
index 0000000..dffac30
--- /dev/null
+++ b/examples/qws/simpledecoration/mydecoration.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MYDECORATION_H
+#define MYDECORATION_H
+
+#include <QDecorationDefault>
+#include <QHash>
+#include <QPixmap>
+#include <QRegion>
+#include <Qt>
+
+//! [decoration class definition]
+class MyDecoration : public QDecorationDefault
+{
+public:
+ MyDecoration();
+ QRegion region(const QWidget *widget, const QRect &insideRect, int decorationRegion);
+ bool paint(QPainter *painter, const QWidget *widget, int decorationRegion, DecorationState state);
+
+private:
+ int border;
+ int buttonHeight;
+ int buttonMargin;
+ int buttonWidth;
+ int titleHeight;
+ QHash<Qt::WindowType, DecorationRegion> buttonHintMap;
+ QHash<DecorationRegion, QPixmap> normalButtonPixmaps;
+ QHash<DecorationRegion, QPixmap> maximizedButtonPixmaps;
+ QVector<Qt::WindowType> buttonHints;
+ QVector<DecorationRegion> stateRegions;
+};
+//! [decoration class definition]
+
+#endif
diff --git a/examples/qws/simpledecoration/simpledecoration.pro b/examples/qws/simpledecoration/simpledecoration.pro
new file mode 100644
index 0000000..b409878
--- /dev/null
+++ b/examples/qws/simpledecoration/simpledecoration.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+HEADERS = analogclock.h \
+ mydecoration.h
+SOURCES = analogclock.cpp \
+ main.cpp \
+ mydecoration.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qws/simpledecoration
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qws/simpledecoration
+INSTALLS += target sources
diff --git a/examples/qws/svgalib/README b/examples/qws/svgalib/README
new file mode 100644
index 0000000..0b2831f
--- /dev/null
+++ b/examples/qws/svgalib/README
@@ -0,0 +1,5 @@
+This is the SVGA screen driver plugin example from Qt 4.4. The code does
+not compile with Qt 4.5, because the internal graphics engine has changed.
+
+This is unsupported code, provided for convenience in case there is
+interest in porting it to Qt 4.5.
diff --git a/examples/qws/svgalib/svgalib.pro b/examples/qws/svgalib/svgalib.pro
new file mode 100644
index 0000000..8a47c1d
--- /dev/null
+++ b/examples/qws/svgalib/svgalib.pro
@@ -0,0 +1,19 @@
+TEMPLATE = lib
+CONFIG += plugin
+
+LIBS += -lvgagl -lvga
+
+TARGET = svgalibscreen
+target.path = $$[QT_INSTALL_PLUGINS]/gfxdrivers
+INSTALLS += target
+
+HEADERS = svgalibscreen.h \
+ svgalibpaintengine.h \
+ svgalibsurface.h \
+ svgalibpaintdevice.h
+SOURCES = svgalibscreen.cpp \
+ svgalibpaintengine.cpp \
+ svgalibsurface.cpp \
+ svgalibpaintdevice.cpp \
+ svgalibplugin.cpp
+
diff --git a/examples/qws/svgalib/svgalibpaintdevice.cpp b/examples/qws/svgalib/svgalibpaintdevice.cpp
new file mode 100644
index 0000000..b4e0276
--- /dev/null
+++ b/examples/qws/svgalib/svgalibpaintdevice.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "svgalibpaintdevice.h"
+#include "svgalibpaintengine.h"
+
+#include <QApplication>
+#include <QDesktopWidget>
+
+SvgalibPaintDevice::SvgalibPaintDevice(QWidget *w)
+ : QCustomRasterPaintDevice(w)
+{
+ pengine = new SvgalibPaintEngine;
+}
+
+SvgalibPaintDevice::~SvgalibPaintDevice()
+{
+ delete pengine;
+}
+
+int SvgalibPaintDevice::metric(PaintDeviceMetric m) const
+{
+ if (m == PdmWidth)
+ return QApplication::desktop()->screenGeometry().width();
+ else if (m == PdmHeight)
+ return QApplication::desktop()->screenGeometry().height();
+ return QCustomRasterPaintDevice::metric(m);
+}
+
diff --git a/examples/qws/svgalib/svgalibpaintdevice.h b/examples/qws/svgalib/svgalibpaintdevice.h
new file mode 100644
index 0000000..bf6cc7a
--- /dev/null
+++ b/examples/qws/svgalib/svgalibpaintdevice.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGALIBPAINTDEVICE_H
+#define SVGALIBPAINTDEVICE_H
+
+#include "svgalibpaintengine.h"
+#include <private/qpaintengine_raster_p.h>
+#include <qscreen_qws.h>
+
+//! [0]
+class SvgalibPaintDevice : public QCustomRasterPaintDevice
+{
+public:
+ SvgalibPaintDevice(QWidget *w);
+ ~SvgalibPaintDevice();
+
+ void* memory() const { return QScreen::instance()->base(); }
+
+ QPaintEngine *paintEngine() const { return pengine; }
+ int metric(PaintDeviceMetric m) const;
+
+private:
+ SvgalibPaintEngine *pengine;
+};
+//! [0]
+
+#endif // SVGALIBPAINTDEVICE_H
diff --git a/examples/qws/svgalib/svgalibpaintengine.cpp b/examples/qws/svgalib/svgalibpaintengine.cpp
new file mode 100644
index 0000000..3621db7
--- /dev/null
+++ b/examples/qws/svgalib/svgalibpaintengine.cpp
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "svgalibpaintengine.h"
+
+#include <QColor>
+#include <vga.h>
+#include <vgagl.h>
+
+SvgalibPaintEngine::SvgalibPaintEngine()
+{
+}
+
+SvgalibPaintEngine::~SvgalibPaintEngine()
+{
+}
+
+//! [0]
+bool SvgalibPaintEngine::begin(QPaintDevice *dev)
+{
+ device = dev;
+ pen = Qt::NoPen;
+ simplePen = true;
+ brush = Qt::NoBrush;
+ simpleBrush = true;
+ matrix = QMatrix();
+ simpleMatrix = true;
+ setClip(QRect(0, 0, device->width(), device->height()));
+ opaque = true;
+ aliased = true;
+ sourceOver = true;
+
+ return QRasterPaintEngine::begin(dev);
+}
+//! [0]
+
+//! [1]
+bool SvgalibPaintEngine::end()
+{
+ gl_setclippingwindow(0, 0, device->width() - 1, device->height() - 1);
+ return QRasterPaintEngine::end();
+}
+//! [1]
+
+//! [2]
+void SvgalibPaintEngine::updateState(const QPaintEngineState &state)
+{
+ QPaintEngine::DirtyFlags flags = state.state();
+
+ if (flags & DirtyTransform) {
+ matrix = state.matrix();
+ simpleMatrix = (matrix.m12() == 0 && matrix.m21() == 0);
+ }
+
+ if (flags & DirtyPen) {
+ pen = state.pen();
+ simplePen = (pen.width() == 0 || pen.widthF() <= 1)
+ && (pen.style() == Qt::NoPen || pen.style() == Qt::SolidLine)
+ && (pen.color().alpha() == 255);
+ }
+
+ if (flags & DirtyBrush) {
+ brush = state.brush();
+ simpleBrush = (brush.style() == Qt::SolidPattern
+ || brush.style() == Qt::NoBrush)
+ && (brush.color().alpha() == 255);
+ }
+
+ if (flags & DirtyClipRegion)
+ setClip(state.clipRegion());
+
+ if (flags & DirtyClipEnabled) {
+ clipEnabled = state.isClipEnabled();
+ updateClip();
+ }
+
+ if (flags & DirtyClipPath) {
+ setClip(QRegion());
+ simpleClip = false;
+ }
+
+ if (flags & DirtyCompositionMode) {
+ const QPainter::CompositionMode m = state.compositionMode();
+ sourceOver = (m == QPainter::CompositionMode_SourceOver);
+ }
+
+ if (flags & DirtyOpacity)
+ opaque = (state.opacity() == 256);
+
+ if (flags & DirtyHints)
+ aliased = !(state.renderHints() & QPainter::Antialiasing);
+
+ QRasterPaintEngine::updateState(state);
+}
+//! [2]
+
+//! [3]
+void SvgalibPaintEngine::setClip(const QRegion &region)
+{
+ if (region.isEmpty())
+ clip = QRect(0, 0, device->width(), device->height());
+ else
+ clip = matrix.map(region) & QRect(0, 0, device->width(), device->height());
+ clipEnabled = true;
+ updateClip();
+}
+//! [3]
+
+//! [4]
+void SvgalibPaintEngine::updateClip()
+{
+ QRegion clipRegion = QRect(0, 0, device->width(), device->height());
+
+ if (!systemClip().isEmpty())
+ clipRegion &= systemClip();
+ if (clipEnabled)
+ clipRegion &= clip;
+
+ simpleClip = (clipRegion.rects().size() <= 1);
+
+ const QRect r = clipRegion.boundingRect();
+ gl_setclippingwindow(r.left(), r.top(),
+ r.x() + r.width(),
+ r.y() + r.height());
+}
+//! [4]
+
+//! [5]
+void SvgalibPaintEngine::drawRects(const QRect *rects, int rectCount)
+{
+ const bool canAccelerate = simplePen && simpleBrush && simpleMatrix
+ && simpleClip && opaque && aliased
+ && sourceOver;
+ if (!canAccelerate) {
+ QRasterPaintEngine::drawRects(rects, rectCount);
+ return;
+ }
+
+ for (int i = 0; i < rectCount; ++i) {
+ const QRect r = matrix.mapRect(rects[i]);
+ if (brush != Qt::NoBrush) {
+ gl_fillbox(r.left(), r.top(), r.width(), r.height(),
+ brush.color().rgba());
+ }
+ if (pen != Qt::NoPen) {
+ const int c = pen.color().rgba();
+ gl_hline(r.left(), r.top(), r.right(), c);
+ gl_hline(r.left(), r.bottom(), r.right(), c);
+ gl_line(r.left(), r.top(), r.left(), r.bottom(), c);
+ gl_line(r.right(), r.top(), r.right(), r.bottom(), c);
+ }
+ }
+}
+//! [5]
diff --git a/examples/qws/svgalib/svgalibpaintengine.h b/examples/qws/svgalib/svgalibpaintengine.h
new file mode 100644
index 0000000..1fa9770
--- /dev/null
+++ b/examples/qws/svgalib/svgalibpaintengine.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGALIBPAINTENGINE_H
+#define SVGALIBPAINTENGINE_H
+
+//! [0]
+#include <private/qpaintengine_raster_p.h>
+
+class SvgalibPaintEngine : public QRasterPaintEngine
+{
+public:
+ SvgalibPaintEngine();
+ ~SvgalibPaintEngine();
+
+ bool begin(QPaintDevice *device);
+ bool end();
+ void updateState(const QPaintEngineState &state);
+ void drawRects(const QRect *rects, int rectCount);
+
+private:
+ void setClip(const QRegion &region);
+ void updateClip();
+
+ QPen pen;
+ bool simplePen;
+ QBrush brush;
+ bool simpleBrush;
+ QMatrix matrix;
+ bool simpleMatrix;
+ QRegion clip;
+ bool clipEnabled;
+ bool simpleClip;
+ bool opaque;
+ bool aliased;
+ bool sourceOver;
+ QPaintDevice *device;
+};
+//! [0]
+
+#endif // SVGALIBPAINTENGINE_H
diff --git a/examples/qws/svgalib/svgalibplugin.cpp b/examples/qws/svgalib/svgalibplugin.cpp
new file mode 100644
index 0000000..080a350
--- /dev/null
+++ b/examples/qws/svgalib/svgalibplugin.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "svgalibscreen.h"
+
+#include <QScreenDriverPlugin>
+#include <QStringList>
+
+class SvgalibPlugin : public QScreenDriverPlugin
+{
+public:
+ SvgalibPlugin();
+
+ QStringList keys() const;
+ QScreen *create(const QString&, int displayId);
+};
+
+SvgalibPlugin::SvgalibPlugin()
+ : QScreenDriverPlugin()
+{
+}
+
+QStringList SvgalibPlugin::keys() const
+{
+ return (QStringList() << "svgalib");
+}
+
+QScreen* SvgalibPlugin::create(const QString& driver, int displayId)
+{
+ if (driver.toLower() != "svgalib")
+ return 0;
+
+ return new SvgalibScreen(displayId);
+}
+
+Q_EXPORT_STATIC_PLUGIN(Svgalib)
+Q_EXPORT_PLUGIN2(svgalibscreendriver, SvgalibPlugin)
diff --git a/examples/qws/svgalib/svgalibscreen.cpp b/examples/qws/svgalib/svgalibscreen.cpp
new file mode 100644
index 0000000..1961d3c
--- /dev/null
+++ b/examples/qws/svgalib/svgalibscreen.cpp
@@ -0,0 +1,354 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "svgalibscreen.h"
+#include "svgalibsurface.h"
+
+#include <QVector>
+#include <QApplication>
+#include <QColor>
+#include <QWidget>
+
+#include <math.h>
+
+static int getModeDepth(vga_modeinfo *mode)
+{
+ const int bits = int(log2(mode->colors));
+ if (bits == 24 && mode->bytesperpixel == 4)
+ return 32;
+ return bits;
+}
+
+//! [0]
+bool SvgalibScreen::connect(const QString &displaySpec)
+{
+ int mode = vga_getdefaultmode();
+ if (mode <= 0) {
+ qCritical("SvgalibScreen::connect(): invalid vga mode");
+ return false;
+ }
+
+ vga_modeinfo *modeinfo = vga_getmodeinfo(mode);
+
+ QScreen::lstep = modeinfo->linewidth;
+ QScreen::dw = QScreen::w = modeinfo->width;
+ QScreen::dh = QScreen::h = modeinfo->height;
+ QScreen::d = getModeDepth(modeinfo);
+ QScreen::size = QScreen::lstep * dh;
+ QScreen::data = 0;
+
+ switch (depth()) {
+ case 32:
+ setPixelFormat(QImage::Format_ARGB32_Premultiplied);
+ break;
+ case 24:
+ setPixelFormat(QImage::Format_RGB888);
+ break;
+ case 16:
+ setPixelFormat(QImage::Format_RGB16);
+ break;
+ case 15:
+ setPixelFormat(QImage::Format_RGB555);
+ break;
+ default:
+ break;
+ }
+
+ const int dpi = 72;
+ QScreen::physWidth = qRound(QScreen::dw * 25.4 / dpi);
+ QScreen::physHeight = qRound(QScreen::dh * 25.4 / dpi);
+
+ const QStringList args = displaySpec.split(QLatin1Char(':'),
+ QString::SkipEmptyParts);
+ grayscale = args.contains(QLatin1String("grayscale"), Qt::CaseInsensitive);
+
+ return true;
+}
+//! [0]
+
+void SvgalibScreen::initColorMap()
+{
+ const int numColors = vga_getcolors();
+ if (numColors == 2 || numColors > 256) {
+ screencols = 0;
+ return; // not a palette based mode
+ }
+
+ if (numColors == 16) {
+ if (grayscale) {
+ for (int i = 0; i < 256; ++i) {
+ const int c = i * 16 / 256;
+ vga_setpalette(i, c, c, c);
+ }
+ screencols = 256; // XXX: takes advantage of optimization in alloc()
+ } else { // read in EGA palette
+ int r, g, b;
+ for (int i = 0; i < 16; ++i) {
+ vga_getpalette(i, &r, &g, &b);
+ screenclut[i] = qRgb(r, g, b);
+ }
+ screencols = 16;
+ }
+
+ return;
+ }
+
+ Q_ASSERT(numColors == 256);
+
+ if (grayscale) {
+ for (int i = 0; i < 256; ++i) {
+ const int c = i * 64 / 256;
+ vga_setpalette(i, c, c, c);
+ }
+ } else {
+ int i = 0;
+
+#if 0
+ // read in EGA palette
+ while (i < 16) {
+ int r, g, b;
+ vga_getpalette(i, &r, &g, &b);
+ screenclut[i] = qRgb(r, g, b);
+ ++i;
+ }
+ screencols = 16;
+#endif
+
+ // 6 * 6 * 6 color cube
+ for (int r = 0; r < 6; ++r) {
+ for (int g = 0; g < 6; ++g) {
+ for (int b = 0; b < 6; ++b) {
+ vga_setpalette(i, r * 64/6, g * 64/6, b * 64/6);
+ screenclut[i] = qRgb(r * 256/6, g * 256/6, b * 256/6);
+ ++i;
+ }
+ }
+ }
+ screencols = i;
+
+ while (i < 256) {
+ screenclut[i] = qRgb(0, 0, 0);
+ ++i;
+ }
+ }
+}
+
+//! [1]
+bool SvgalibScreen::initDevice()
+{
+ if (vga_init() != 0) {
+ qCritical("SvgalibScreen::initDevice(): unable to initialize svgalib");
+ return false;
+ }
+
+ int mode = vga_getdefaultmode();
+ if (vga_setmode(mode) == -1) {
+ qCritical("SvgalibScreen::initialize(): unable to set graphics mode");
+ return false;
+ }
+
+ if (gl_setcontextvga(mode) != 0) {
+ qCritical("SvgalibScreen::initDevice(): unable to set vga context");
+ return false;
+ }
+ context = gl_allocatecontext();
+ gl_getcontext(context);
+
+ vga_modeinfo *modeinfo = vga_getmodeinfo(mode);
+ if (modeinfo->flags & IS_LINEAR)
+ QScreen::data = vga_getgraphmem();
+
+ initColorMap();
+
+ QScreenCursor::initSoftwareCursor();
+ return true;
+}
+//! [1]
+
+//! [2]
+void SvgalibScreen::shutdownDevice()
+{
+ gl_freecontext(context);
+ vga_setmode(TEXT);
+}
+//! [2]
+
+//! [3]
+void SvgalibScreen::disconnect()
+{
+}
+//! [3]
+
+//! [4]
+void SvgalibScreen::solidFill(const QColor &color, const QRegion &reg)
+{
+ int c;
+ if (depth() == 4 || depth() == 8)
+ c = alloc(color.red(), color.green(), color.blue());
+ else
+ c = gl_rgbcolor(color.red(), color.green(), color.blue());
+
+ const QVector<QRect> rects = (reg & region()).rects();
+ for (int i = 0; i < rects.size(); ++i) {
+ const QRect r = rects.at(i);
+ gl_fillbox(r.left(), r.top(), r.width(), r.height(), c);
+ }
+}
+//! [4]
+
+void SvgalibScreen::blit16To8(const QImage &image,
+ const QPoint &topLeft, const QRegion &region)
+{
+ const int imageStride = image.bytesPerLine() / 2;
+ const QVector<QRect> rects = region.rects();
+
+ for (int i = 0; i < rects.size(); ++i) {
+ const QRect r = rects.at(i).translated(-topLeft);
+ int y = r.y();
+ const quint16 *s = reinterpret_cast<const quint16*>(image.scanLine(y));
+
+ while (y <= r.bottom()) {
+ int x1 = r.x();
+ while (x1 <= r.right()) {
+ const quint16 c = s[x1];
+ int x2 = x1;
+ // find span length
+ while ((x2+1 < r.right()) && (s[x2+1] == c))
+ ++x2;
+ gl_hline(x1 + topLeft.x(), y + topLeft.y(), x2 + topLeft.x(),
+ qt_colorConvert<quint8, quint16>(c, 0));
+ x1 = x2 + 1;
+ }
+ s += imageStride;
+ ++y;
+ }
+ }
+}
+
+void SvgalibScreen::blit32To8(const QImage &image,
+ const QPoint &topLeft, const QRegion &region)
+{
+ const int imageStride = image.bytesPerLine() / 4;
+ const QVector<QRect> rects = region.rects();
+
+ for (int i = 0; i < rects.size(); ++i) {
+ const QRect r = rects.at(i).translated(-topLeft);
+ int y = r.y();
+ const quint32 *s = reinterpret_cast<const quint32*>(image.scanLine(y));
+
+ while (y <= r.bottom()) {
+ int x1 = r.x();
+ while (x1 <= r.right()) {
+ const quint32 c = s[x1];
+ int x2 = x1;
+ // find span length
+ while ((x2+1 < r.right()) && (s[x2+1] == c))
+ ++x2;
+ gl_hline(x1 + topLeft.x(), y + topLeft.y(), x2 + topLeft.x(),
+ qt_colorConvert<quint8, quint32>(c, 0));
+ x1 = x2 + 1;
+ }
+ s += imageStride;
+ ++y;
+ }
+ }
+}
+
+//! [5]
+void SvgalibScreen::blit(const QImage &img, const QPoint &topLeft,
+ const QRegion &reg)
+{
+ if (depth() == 8) {
+ switch (img.format()) {
+ case QImage::Format_RGB16:
+ blit16To8(img, topLeft, reg);
+ return;
+ case QImage::Format_RGB32:
+ case QImage::Format_ARGB32:
+ case QImage::Format_ARGB32_Premultiplied:
+ blit32To8(img, topLeft, reg);
+ return;
+ default:
+ break;
+ }
+ }
+
+ if (img.format() != pixelFormat()) {
+ if (base())
+ QScreen::blit(img, topLeft, reg);
+ return;
+ }
+
+ const QVector<QRect> rects = (reg & region()).rects();
+
+ for (int i = 0; i < rects.size(); ++i) {
+ const QRect r = rects.at(i);
+ gl_putboxpart(r.x(), r.y(), r.width(), r.height(),
+ img.width(), img.height(),
+ static_cast<void*>(const_cast<uchar*>(img.bits())),
+ r.x() - topLeft.x(), r.y() - topLeft.y());
+ }
+}
+//! [5]
+
+//! [7]
+QWSWindowSurface* SvgalibScreen::createSurface(QWidget *widget) const
+{
+ if (base()) {
+ static int onScreenPaint = -1;
+ if (onScreenPaint == -1)
+ onScreenPaint = qgetenv("QT_ONSCREEN_PAINT").toInt();
+
+ if (onScreenPaint > 0 || widget->testAttribute(Qt::WA_PaintOnScreen))
+ return new SvgalibSurface(widget);
+ }
+ return QScreen::createSurface(widget);
+}
+//! [7]
+
+//! [8]
+QWSWindowSurface* SvgalibScreen::createSurface(const QString &key) const
+{
+ if (key == QLatin1String("svgalib"))
+ return new SvgalibSurface;
+ return QScreen::createSurface(key);
+}
+//! [8]
diff --git a/examples/qws/svgalib/svgalibscreen.h b/examples/qws/svgalib/svgalibscreen.h
new file mode 100644
index 0000000..4d32b7c
--- /dev/null
+++ b/examples/qws/svgalib/svgalibscreen.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGALIBSCREEN_H
+#define SVGALIBSCREEN_H
+
+#include <QScreen>
+
+#include <vga.h>
+#include <vgagl.h>
+
+//! [0]
+class SvgalibScreen : public QScreen
+{
+public:
+ SvgalibScreen(int displayId) : QScreen(displayId) {}
+ ~SvgalibScreen() {}
+
+ bool connect(const QString &displaySpec);
+ bool initDevice();
+ void shutdownDevice();
+ void disconnect();
+
+ void setMode(int, int, int) {}
+ void blank(bool) {}
+
+ void blit(const QImage &img, const QPoint &topLeft, const QRegion &region);
+ void solidFill(const QColor &color, const QRegion &region);
+//! [0]
+
+ QWSWindowSurface* createSurface(QWidget *widget) const;
+ QWSWindowSurface* createSurface(const QString &key) const;
+
+//! [1]
+private:
+ void initColorMap();
+ void blit16To8(const QImage &image,
+ const QPoint &topLeft, const QRegion &region);
+ void blit32To8(const QImage &image,
+ const QPoint &topLeft, const QRegion &region);
+
+ GraphicsContext *context;
+};
+//! [1]
+
+#endif // SVGALIBSCREEN_H
diff --git a/examples/qws/svgalib/svgalibsurface.cpp b/examples/qws/svgalib/svgalibsurface.cpp
new file mode 100644
index 0000000..8e7e6b6
--- /dev/null
+++ b/examples/qws/svgalib/svgalibsurface.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "svgalibsurface.h"
+#include "svgalibpaintdevice.h"
+
+#include <vgagl.h>
+
+SvgalibSurface::SvgalibSurface() : QWSWindowSurface(), pdevice(0)
+{
+ setSurfaceFlags(Opaque);
+}
+
+SvgalibSurface::SvgalibSurface(QWidget *w)
+ : QWSWindowSurface(w)
+{
+ setSurfaceFlags(Opaque);
+ pdevice = new SvgalibPaintDevice(w);
+}
+
+SvgalibSurface::~SvgalibSurface()
+{
+ delete pdevice;
+}
+
+void SvgalibSurface::setGeometry(const QRect &rect)
+{
+ QWSWindowSurface::setGeometry(rect);
+}
+
+QPoint SvgalibSurface::painterOffset() const
+{
+ return geometry().topLeft() + QWSWindowSurface::painterOffset();
+}
+
+//! [0]
+bool SvgalibSurface::scroll(const QRegion &region, int dx, int dy)
+{
+ const QVector<QRect> rects = region.rects();
+ for (int i = 0; i < rects.size(); ++i) {
+ const QRect r = rects.at(i);
+ gl_copybox(r.left(), r.top(), r.width(), r.height(),
+ r.left() + dx, r.top() + dy);
+ }
+
+ return true;
+}
+//! [0]
+
diff --git a/examples/qws/svgalib/svgalibsurface.h b/examples/qws/svgalib/svgalibsurface.h
new file mode 100644
index 0000000..c33d51a
--- /dev/null
+++ b/examples/qws/svgalib/svgalibsurface.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGALIBSURFACE_H
+#define SVGALIBSURFACE_H
+
+#include "svgalibpaintengine.h"
+#include "svgalibpaintdevice.h"
+#include <private/qwindowsurface_qws_p.h>
+
+class SvgalibPaintDevice;
+
+//! [0]
+class SvgalibSurface : public QWSWindowSurface
+{
+public:
+ SvgalibSurface();
+ SvgalibSurface(QWidget *w);
+ ~SvgalibSurface();
+
+ void setGeometry(const QRect &rect);
+ bool isValid() const { return true; }
+ bool scroll(const QRegion &region, int dx, int dy);
+ QString key() const { return QLatin1String("svgalib"); }
+
+ bool attach(const QByteArray &) { return true; }
+ void detach() {}
+
+ QImage image() const { return QImage(); }
+ QPaintDevice *paintDevice() { return pdevice; }
+ QPoint painterOffset() const;
+
+private:
+ SvgalibPaintDevice *pdevice;
+};
+//! [0]
+
+#endif // SVGALIBSURFACE_H
diff --git a/examples/richtext/README b/examples/richtext/README
new file mode 100644
index 0000000..6697b23
--- /dev/null
+++ b/examples/richtext/README
@@ -0,0 +1,42 @@
+Qt provides powerful document-oriented rich text engine that supports Unicode
+and right-to-left scripts. Documents can be manipulated using a cursor-based
+API, and their contents can be imported and exported as both HTML and in a
+custom XML format.
+
+Text is rendered using anti-aliased outline fonts to provide the best
+possible on-screen representation.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro
new file mode 100644
index 0000000..bf032f5
--- /dev/null
+++ b/examples/richtext/calendar/calendar.pro
@@ -0,0 +1,9 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/richtext/calendar
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendar.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/calendar
+INSTALLS += target sources
diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp
new file mode 100644
index 0000000..aab8adc
--- /dev/null
+++ b/examples/richtext/calendar/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.resize(640, 256);
+ window.show();
+ return app.exec();
+}
diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp
new file mode 100644
index 0000000..ca8ab5a
--- /dev/null
+++ b/examples/richtext/calendar/mainwindow.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ selectedDate = QDate::currentDate();
+ fontSize = 10;
+
+ QWidget *centralWidget = new QWidget;
+//! [0]
+
+//! [1]
+ QLabel *dateLabel = new QLabel(tr("Date:"));
+ QComboBox *monthCombo = new QComboBox;
+
+ for (int month = 1; month <= 12; ++month)
+ monthCombo->addItem(QDate::longMonthName(month));
+
+ QDateTimeEdit *yearEdit = new QDateTimeEdit;
+ yearEdit->setDisplayFormat("yyyy");
+ yearEdit->setDateRange(QDate(1753, 1, 1), QDate(8000, 1, 1));
+//! [1]
+
+ monthCombo->setCurrentIndex(selectedDate.month() - 1);
+ yearEdit->setDate(selectedDate);
+
+//! [2]
+ QLabel *fontSizeLabel = new QLabel(tr("Font size:"));
+ QSpinBox *fontSizeSpinBox = new QSpinBox;
+ fontSizeSpinBox->setRange(1, 64);
+ fontSizeSpinBox->setValue(10);
+
+ editor = new QTextBrowser;
+ insertCalendar();
+//! [2]
+
+//! [3]
+ connect(monthCombo, SIGNAL(activated(int)), this, SLOT(setMonth(int)));
+ connect(yearEdit, SIGNAL(dateChanged(QDate)), this, SLOT(setYear(QDate)));
+ connect(fontSizeSpinBox, SIGNAL(valueChanged(int)),
+ this, SLOT(setFontSize(int)));
+//! [3]
+
+//! [4]
+ QHBoxLayout *controlsLayout = new QHBoxLayout;
+ controlsLayout->addWidget(dateLabel);
+ controlsLayout->addWidget(monthCombo);
+ controlsLayout->addWidget(yearEdit);
+ controlsLayout->addSpacing(24);
+ controlsLayout->addWidget(fontSizeLabel);
+ controlsLayout->addWidget(fontSizeSpinBox);
+ controlsLayout->addStretch(1);
+
+ QVBoxLayout *centralLayout = new QVBoxLayout;
+ centralLayout->addLayout(controlsLayout);
+ centralLayout->addWidget(editor, 1);
+ centralWidget->setLayout(centralLayout);
+
+ setCentralWidget(centralWidget);
+//! [4]
+}
+
+//! [5]
+void MainWindow::insertCalendar()
+{
+ editor->clear();
+ QTextCursor cursor = editor->textCursor();
+ cursor.beginEditBlock();
+
+ QDate date(selectedDate.year(), selectedDate.month(), 1);
+//! [5]
+
+//! [6]
+ QTextTableFormat tableFormat;
+ tableFormat.setAlignment(Qt::AlignHCenter);
+ tableFormat.setBackground(QColor("#e0e0e0"));
+ tableFormat.setCellPadding(2);
+ tableFormat.setCellSpacing(4);
+//! [6] //! [7]
+ QVector<QTextLength> constraints;
+ constraints << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14)
+ << QTextLength(QTextLength::PercentageLength, 14);
+ tableFormat.setColumnWidthConstraints(constraints);
+//! [7]
+
+//! [8]
+ QTextTable *table = cursor.insertTable(1, 7, tableFormat);
+//! [8]
+
+//! [9]
+ QTextFrame *frame = cursor.currentFrame();
+ QTextFrameFormat frameFormat = frame->frameFormat();
+ frameFormat.setBorder(1);
+ frame->setFrameFormat(frameFormat);
+//! [9]
+
+//! [10]
+ QTextCharFormat format = cursor.charFormat();
+ format.setFontPointSize(fontSize);
+
+ QTextCharFormat boldFormat = format;
+ boldFormat.setFontWeight(QFont::Bold);
+
+ QTextCharFormat highlightedFormat = boldFormat;
+ highlightedFormat.setBackground(Qt::yellow);
+//! [10]
+
+//! [11]
+ for (int weekDay = 1; weekDay <= 7; ++weekDay) {
+ QTextTableCell cell = table->cellAt(0, weekDay-1);
+//! [11] //! [12]
+ QTextCursor cellCursor = cell.firstCursorPosition();
+ cellCursor.insertText(QString("%1").arg(QDate::longDayName(weekDay)),
+ boldFormat);
+ }
+//! [12]
+
+//! [13]
+ table->insertRows(table->rows(), 1);
+//! [13]
+
+ while (date.month() == selectedDate.month()) {
+ int weekDay = date.dayOfWeek();
+ QTextTableCell cell = table->cellAt(table->rows()-1, weekDay-1);
+ QTextCursor cellCursor = cell.firstCursorPosition();
+
+ if (date == QDate::currentDate())
+ cellCursor.insertText(QString("%1").arg(date.day()), highlightedFormat);
+ else
+ cellCursor.insertText(QString("%1").arg(date.day()), format);
+
+ date = date.addDays(1);
+ if (weekDay == 7 && date.month() == selectedDate.month())
+ table->insertRows(table->rows(), 1);
+ }
+
+ cursor.endEditBlock();
+//! [14]
+ setWindowTitle(tr("Calendar for %1 %2"
+ ).arg(QDate::longMonthName(selectedDate.month())
+ ).arg(selectedDate.year()));
+}
+//! [14]
+
+//! [15]
+void MainWindow::setFontSize(int size)
+{
+ fontSize = size;
+ insertCalendar();
+}
+//! [15]
+
+//! [16]
+void MainWindow::setMonth(int month)
+{
+ selectedDate = QDate(selectedDate.year(), month + 1, selectedDate.day());
+ insertCalendar();
+}
+//! [16]
+
+//! [17]
+void MainWindow::setYear(QDate date)
+{
+ selectedDate = QDate(date.year(), selectedDate.month(), selectedDate.day());
+ insertCalendar();
+}
+//! [17]
diff --git a/examples/richtext/calendar/mainwindow.h b/examples/richtext/calendar/mainwindow.h
new file mode 100644
index 0000000..704bdd9
--- /dev/null
+++ b/examples/richtext/calendar/mainwindow.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QDate>
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTextBrowser;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void setFontSize(int size);
+ void setMonth(int month);
+ void setYear(QDate date);
+
+private:
+ void insertCalendar();
+
+ int fontSize;
+ QDate selectedDate;
+ QTextBrowser *editor;
+};
+//! [0]
+
+#endif
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp
new file mode 100644
index 0000000..273ed57
--- /dev/null
+++ b/examples/richtext/orderform/detailsdialog.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "detailsdialog.h"
+
+//! [0]
+DetailsDialog::DetailsDialog(const QString &title, QWidget *parent)
+ : QDialog(parent)
+{
+ nameLabel = new QLabel(tr("Name:"));
+ addressLabel = new QLabel(tr("Address:"));
+ addressLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+
+ nameEdit = new QLineEdit;
+ addressEdit = new QTextEdit;
+
+ offersCheckBox = new QCheckBox(tr("Send information about products and "
+ "special offers"));
+
+ setupItemsTable();
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel);
+
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(verify()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+//! [0]
+
+//! [1]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameEdit, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0);
+ mainLayout->addWidget(addressEdit, 1, 1);
+ mainLayout->addWidget(itemsTable, 0, 2, 2, 1);
+ mainLayout->addWidget(offersCheckBox, 2, 1, 1, 2);
+ mainLayout->addWidget(buttonBox, 3, 0, 1, 3);
+ setLayout(mainLayout);
+
+ setWindowTitle(title);
+}
+//! [1]
+
+//! [2]
+void DetailsDialog::setupItemsTable()
+{
+ items << tr("T-shirt") << tr("Badge") << tr("Reference book")
+ << tr("Coffee cup");
+
+ itemsTable = new QTableWidget(items.count(), 2);
+
+ for (int row = 0; row < items.count(); ++row) {
+ QTableWidgetItem *name = new QTableWidgetItem(items[row]);
+ name->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
+ itemsTable->setItem(row, 0, name);
+ QTableWidgetItem *quantity = new QTableWidgetItem("1");
+ itemsTable->setItem(row, 1, quantity);
+ }
+}
+//! [2]
+
+//! [3]
+QList<QPair<QString, int> > DetailsDialog::orderItems()
+{
+ QList<QPair<QString, int> > orderList;
+
+ for (int row = 0; row < items.count(); ++row) {
+ QPair<QString, int> item;
+ item.first = itemsTable->item(row, 0)->text();
+ int quantity = itemsTable->item(row, 1)->data(Qt::DisplayRole).toInt();
+ item.second = qMax(0, quantity);
+ orderList.append(item);
+ }
+
+ return orderList;
+}
+//! [3]
+
+//! [4]
+QString DetailsDialog::senderName() const
+{
+ return nameEdit->text();
+}
+//! [4]
+
+//! [5]
+QString DetailsDialog::senderAddress() const
+{
+ return addressEdit->toPlainText();
+}
+//! [5]
+
+//! [6]
+bool DetailsDialog::sendOffers()
+{
+ return offersCheckBox->isChecked();
+}
+//! [6]
+
+//! [7]
+void DetailsDialog::verify()
+{
+ if (!nameEdit->text().isEmpty() && !addressEdit->toPlainText().isEmpty()) {
+ accept();
+ return;
+ }
+
+ QMessageBox::StandardButton answer;
+ answer = QMessageBox::warning(this, tr("Incomplete Form"),
+ tr("The form does not contain all the necessary information.\n"
+ "Do you want to discard it?"),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (answer == QMessageBox::Yes)
+ reject();
+}
+//! [7]
diff --git a/examples/richtext/orderform/detailsdialog.h b/examples/richtext/orderform/detailsdialog.h
new file mode 100644
index 0000000..c74ff2a
--- /dev/null
+++ b/examples/richtext/orderform/detailsdialog.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DETAILSDIALOG_H
+#define DETAILSDIALOG_H
+
+#include <QDialog>
+#include <QList>
+#include <QPair>
+#include <QString>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QDialogButtonBox;
+class QLabel;
+class QLineEdit;
+class QTableWidget;
+class QTextEdit;
+class QWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class DetailsDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ DetailsDialog(const QString &title, QWidget *parent);
+
+public slots:
+ void verify();
+
+public:
+ QList<QPair<QString, int> > orderItems();
+ QString senderName() const;
+ QString senderAddress() const;
+ bool sendOffers();
+
+private:
+ void setupItemsTable();
+
+ QLabel *nameLabel;
+ QLabel *addressLabel;
+ QCheckBox *offersCheckBox;
+ QLineEdit *nameEdit;
+ QStringList items;
+ QTableWidget *itemsTable;
+ QTextEdit *addressEdit;
+ QDialogButtonBox *buttonBox;
+};
+//! [0]
+
+#endif
diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp
new file mode 100644
index 0000000..d6458bc
--- /dev/null
+++ b/examples/richtext/orderform/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.resize(640, 480);
+ window.show();
+ window.createSample();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/richtext/orderform/mainwindow.cpp b/examples/richtext/orderform/mainwindow.cpp
new file mode 100644
index 0000000..e5cffe3
--- /dev/null
+++ b/examples/richtext/orderform/mainwindow.cpp
@@ -0,0 +1,250 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "detailsdialog.h"
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ QAction *newAction = fileMenu->addAction(tr("&New..."));
+ newAction->setShortcut(tr("Ctrl+N"));
+ printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile()));
+ printAction->setShortcut(tr("Ctrl+P"));
+ printAction->setEnabled(false);
+ QAction *quitAction = fileMenu->addAction(tr("E&xit"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+ menuBar()->addMenu(fileMenu);
+
+ letters = new QTabWidget;
+
+ connect(newAction, SIGNAL(triggered()), this, SLOT(openDialog()));
+ connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ setCentralWidget(letters);
+ setWindowTitle(tr("Order Form"));
+}
+//! [0]
+
+//! [1]
+void MainWindow::createLetter(const QString &name, const QString &address,
+ QList<QPair<QString,int> > orderItems,
+ bool sendOffers)
+{
+ QTextEdit *editor = new QTextEdit;
+ int tabIndex = letters->addTab(editor, name);
+ letters->setCurrentIndex(tabIndex);
+//! [1]
+
+//! [2]
+ QTextCursor cursor(editor->textCursor());
+ cursor.movePosition(QTextCursor::Start);
+//! [2] //! [3]
+ QTextFrame *topFrame = cursor.currentFrame();
+ QTextFrameFormat topFrameFormat = topFrame->frameFormat();
+ topFrameFormat.setPadding(16);
+ topFrame->setFrameFormat(topFrameFormat);
+
+ QTextCharFormat textFormat;
+ QTextCharFormat boldFormat;
+ boldFormat.setFontWeight(QFont::Bold);
+
+ QTextFrameFormat referenceFrameFormat;
+ referenceFrameFormat.setBorder(1);
+ referenceFrameFormat.setPadding(8);
+ referenceFrameFormat.setPosition(QTextFrameFormat::FloatRight);
+ referenceFrameFormat.setWidth(QTextLength(QTextLength::PercentageLength, 40));
+ cursor.insertFrame(referenceFrameFormat);
+
+ cursor.insertText("A company", boldFormat);
+ cursor.insertBlock();
+ cursor.insertText("321 City Street");
+ cursor.insertBlock();
+ cursor.insertText("Industry Park");
+ cursor.insertBlock();
+ cursor.insertText("Another country");
+//! [3]
+
+//! [4]
+ cursor.setPosition(topFrame->lastPosition());
+
+ cursor.insertText(name, textFormat);
+ QString line;
+ foreach (line, address.split("\n")) {
+ cursor.insertBlock();
+ cursor.insertText(line);
+ }
+//! [4] //! [5]
+ cursor.insertBlock();
+ cursor.insertBlock();
+
+ QDate date = QDate::currentDate();
+ cursor.insertText(tr("Date: %1").arg(date.toString("d MMMM yyyy")),
+ textFormat);
+ cursor.insertBlock();
+
+ QTextFrameFormat bodyFrameFormat;
+ bodyFrameFormat.setWidth(QTextLength(QTextLength::PercentageLength, 100));
+ cursor.insertFrame(bodyFrameFormat);
+//! [5]
+
+//! [6]
+ cursor.insertText(tr("I would like to place an order for the following "
+ "items:"), textFormat);
+ cursor.insertBlock();
+//! [6] //! [7]
+ cursor.insertBlock();
+//! [7]
+
+//! [8]
+ QTextTableFormat orderTableFormat;
+ orderTableFormat.setAlignment(Qt::AlignHCenter);
+ QTextTable *orderTable = cursor.insertTable(1, 2, orderTableFormat);
+
+ QTextFrameFormat orderFrameFormat = cursor.currentFrame()->frameFormat();
+ orderFrameFormat.setBorder(1);
+ cursor.currentFrame()->setFrameFormat(orderFrameFormat);
+//! [8]
+
+//! [9]
+ cursor = orderTable->cellAt(0, 0).firstCursorPosition();
+ cursor.insertText(tr("Product"), boldFormat);
+ cursor = orderTable->cellAt(0, 1).firstCursorPosition();
+ cursor.insertText(tr("Quantity"), boldFormat);
+//! [9]
+
+//! [10]
+ for (int i = 0; i < orderItems.count(); ++i) {
+ QPair<QString,int> item = orderItems[i];
+ int row = orderTable->rows();
+
+ orderTable->insertRows(row, 1);
+ cursor = orderTable->cellAt(row, 0).firstCursorPosition();
+ cursor.insertText(item.first, textFormat);
+ cursor = orderTable->cellAt(row, 1).firstCursorPosition();
+ cursor.insertText(QString("%1").arg(item.second), textFormat);
+ }
+//! [10]
+
+//! [11]
+ cursor.setPosition(topFrame->lastPosition());
+
+ cursor.insertBlock();
+//! [11] //! [12]
+ cursor.insertText(tr("Please update my records to take account of the "
+ "following privacy information:"));
+ cursor.insertBlock();
+//! [12]
+
+//! [13]
+ QTextTable *offersTable = cursor.insertTable(2, 2);
+
+ cursor = offersTable->cellAt(0, 1).firstCursorPosition();
+ cursor.insertText(tr("I want to receive more information about your "
+ "company's products and special offers."), textFormat);
+ cursor = offersTable->cellAt(1, 1).firstCursorPosition();
+ cursor.insertText(tr("I do not want to receive any promotional information "
+ "from your company."), textFormat);
+
+ if (sendOffers)
+ cursor = offersTable->cellAt(0, 0).firstCursorPosition();
+ else
+ cursor = offersTable->cellAt(1, 0).firstCursorPosition();
+
+ cursor.insertText("X", boldFormat);
+//! [13]
+
+//! [14]
+ cursor.setPosition(topFrame->lastPosition());
+ cursor.insertBlock();
+ cursor.insertText(tr("Sincerely,"), textFormat);
+ cursor.insertBlock();
+ cursor.insertBlock();
+ cursor.insertBlock();
+ cursor.insertText(name);
+
+ printAction->setEnabled(true);
+}
+//! [14]
+
+//! [15]
+void MainWindow::createSample()
+{
+ DetailsDialog dialog("Dialog with default values", this);
+ createLetter("Mr. Smith", "12 High Street\nSmall Town\nThis country",
+ dialog.orderItems(), true);
+}
+//! [15]
+
+//! [16]
+void MainWindow::openDialog()
+{
+ DetailsDialog dialog(tr("Enter Customer Details"), this);
+
+ if (dialog.exec() == QDialog::Accepted)
+ createLetter(dialog.senderName(), dialog.senderAddress(),
+ dialog.orderItems(), dialog.sendOffers());
+}
+//! [16]
+
+//! [17]
+void MainWindow::printFile()
+{
+#ifndef QT_NO_PRINTER
+ QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
+//! [18]
+ QPrinter printer;
+
+ QPrintDialog *dialog = new QPrintDialog(&printer, this);
+ dialog->setWindowTitle(tr("Print Document"));
+ if (editor->textCursor().hasSelection())
+ dialog->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ if (dialog->exec() != QDialog::Accepted)
+ return;
+//! [18]
+
+ editor->print(&printer);
+#endif
+}
+//! [17]
diff --git a/examples/richtext/orderform/mainwindow.h b/examples/richtext/orderform/mainwindow.h
new file mode 100644
index 0000000..70cc9cc
--- /dev/null
+++ b/examples/richtext/orderform/mainwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+#include <QPair>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QTabWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+ void createSample();
+
+public slots:
+ void openDialog();
+ void printFile();
+
+private:
+ void createLetter(const QString &name, const QString &address,
+ QList<QPair<QString,int> > orderItems,
+ bool sendOffers);
+
+ QAction *printAction;
+ QTabWidget *letters;
+};
+//! [0]
+
+#endif
diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro
new file mode 100644
index 0000000..63739b0
--- /dev/null
+++ b/examples/richtext/orderform/orderform.pro
@@ -0,0 +1,11 @@
+HEADERS = detailsdialog.h \
+ mainwindow.h
+SOURCES = detailsdialog.cpp \
+ main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/richtext/orderform
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS orderform.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/orderform
+INSTALLS += target sources
diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro
new file mode 100644
index 0000000..ef8f094
--- /dev/null
+++ b/examples/richtext/richtext.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = calendar \
+ orderform \
+ syntaxhighlighter
+
+contains(QT_CONFIG, svg): SUBDIRS += textobject
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/richtext
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS richtext.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/richtext
+INSTALLS += target sources
diff --git a/examples/richtext/syntaxhighlighter/highlighter.cpp b/examples/richtext/syntaxhighlighter/highlighter.cpp
new file mode 100644
index 0000000..5d9939d
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/highlighter.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "highlighter.h"
+
+//! [0]
+Highlighter::Highlighter(QTextDocument *parent)
+ : QSyntaxHighlighter(parent)
+{
+ HighlightingRule rule;
+
+ keywordFormat.setForeground(Qt::darkBlue);
+ keywordFormat.setFontWeight(QFont::Bold);
+ QStringList keywordPatterns;
+ keywordPatterns << "\\bchar\\b" << "\\bclass\\b" << "\\bconst\\b"
+ << "\\bdouble\\b" << "\\benum\\b" << "\\bexplicit\\b"
+ << "\\bfriend\\b" << "\\binline\\b" << "\\bint\\b"
+ << "\\blong\\b" << "\\bnamespace\\b" << "\\boperator\\b"
+ << "\\bprivate\\b" << "\\bprotected\\b" << "\\bpublic\\b"
+ << "\\bshort\\b" << "\\bsignals\\b" << "\\bsigned\\b"
+ << "\\bslots\\b" << "\\bstatic\\b" << "\\bstruct\\b"
+ << "\\btemplate\\b" << "\\btypedef\\b" << "\\btypename\\b"
+ << "\\bunion\\b" << "\\bunsigned\\b" << "\\bvirtual\\b"
+ << "\\bvoid\\b" << "\\bvolatile\\b";
+ foreach (const QString &pattern, keywordPatterns) {
+ rule.pattern = QRegExp(pattern);
+ rule.format = keywordFormat;
+ highlightingRules.append(rule);
+//! [0] //! [1]
+ }
+//! [1]
+
+//! [2]
+ classFormat.setFontWeight(QFont::Bold);
+ classFormat.setForeground(Qt::darkMagenta);
+ rule.pattern = QRegExp("\\bQ[A-Za-z]+\\b");
+ rule.format = classFormat;
+ highlightingRules.append(rule);
+//! [2]
+
+//! [3]
+ singleLineCommentFormat.setForeground(Qt::red);
+ rule.pattern = QRegExp("//[^\n]*");
+ rule.format = singleLineCommentFormat;
+ highlightingRules.append(rule);
+
+ multiLineCommentFormat.setForeground(Qt::red);
+//! [3]
+
+//! [4]
+ quotationFormat.setForeground(Qt::darkGreen);
+ rule.pattern = QRegExp("\".*\"");
+ rule.format = quotationFormat;
+ highlightingRules.append(rule);
+//! [4]
+
+//! [5]
+ functionFormat.setFontItalic(true);
+ functionFormat.setForeground(Qt::blue);
+ rule.pattern = QRegExp("\\b[A-Za-z0-9_]+(?=\\()");
+ rule.format = functionFormat;
+ highlightingRules.append(rule);
+//! [5]
+
+//! [6]
+ commentStartExpression = QRegExp("/\\*");
+ commentEndExpression = QRegExp("\\*/");
+}
+//! [6]
+
+//! [7]
+void Highlighter::highlightBlock(const QString &text)
+{
+ foreach (const HighlightingRule &rule, highlightingRules) {
+ QRegExp expression(rule.pattern);
+ int index = expression.indexIn(text);
+ while (index >= 0) {
+ int length = expression.matchedLength();
+ setFormat(index, length, rule.format);
+ index = expression.indexIn(text, index + length);
+ }
+ }
+//! [7] //! [8]
+ setCurrentBlockState(0);
+//! [8]
+
+//! [9]
+ int startIndex = 0;
+ if (previousBlockState() != 1)
+ startIndex = commentStartExpression.indexIn(text);
+
+//! [9] //! [10]
+ while (startIndex >= 0) {
+//! [10] //! [11]
+ int endIndex = commentEndExpression.indexIn(text, startIndex);
+ int commentLength;
+ if (endIndex == -1) {
+ setCurrentBlockState(1);
+ commentLength = text.length() - startIndex;
+ } else {
+ commentLength = endIndex - startIndex
+ + commentEndExpression.matchedLength();
+ }
+ setFormat(startIndex, commentLength, multiLineCommentFormat);
+ startIndex = commentStartExpression.indexIn(text, startIndex + commentLength);
+ }
+}
+//! [11]
diff --git a/examples/richtext/syntaxhighlighter/highlighter.h b/examples/richtext/syntaxhighlighter/highlighter.h
new file mode 100644
index 0000000..2774212
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/highlighter.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HIGHLIGHTER_H
+#define HIGHLIGHTER_H
+
+#include <QSyntaxHighlighter>
+
+#include <QHash>
+#include <QTextCharFormat>
+
+QT_BEGIN_NAMESPACE
+class QTextDocument;
+QT_END_NAMESPACE
+
+//! [0]
+class Highlighter : public QSyntaxHighlighter
+{
+ Q_OBJECT
+
+public:
+ Highlighter(QTextDocument *parent = 0);
+
+protected:
+ void highlightBlock(const QString &text);
+
+private:
+ struct HighlightingRule
+ {
+ QRegExp pattern;
+ QTextCharFormat format;
+ };
+ QVector<HighlightingRule> highlightingRules;
+
+ QRegExp commentStartExpression;
+ QRegExp commentEndExpression;
+
+ QTextCharFormat keywordFormat;
+ QTextCharFormat classFormat;
+ QTextCharFormat singleLineCommentFormat;
+ QTextCharFormat multiLineCommentFormat;
+ QTextCharFormat quotationFormat;
+ QTextCharFormat functionFormat;
+};
+//! [0]
+
+#endif
diff --git a/examples/richtext/syntaxhighlighter/main.cpp b/examples/richtext/syntaxhighlighter/main.cpp
new file mode 100644
index 0000000..fbb822d
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.resize(640, 512);
+ window.show();
+ return app.exec();
+}
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.cpp b/examples/richtext/syntaxhighlighter/mainwindow.cpp
new file mode 100644
index 0000000..a6312f9
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/mainwindow.cpp
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setupFileMenu();
+ setupHelpMenu();
+ setupEditor();
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Syntax Highlighter"));
+}
+//! [0]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Syntax Highlighter"),
+ tr("<p>The <b>Syntax Highlighter</b> example shows how " \
+ "to perform simple syntax highlighting by subclassing " \
+ "the QSyntaxHighlighter class and describing " \
+ "highlighting rules using regular expressions.</p>"));
+}
+
+void MainWindow::newFile()
+{
+ editor->clear();
+}
+
+void MainWindow::openFile(const QString &path)
+{
+ QString fileName = path;
+
+ if (fileName.isNull())
+ fileName = QFileDialog::getOpenFileName(this,
+ tr("Open File"), "", "C++ Files (*.cpp *.h)");
+
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+ if (file.open(QFile::ReadOnly | QFile::Text))
+ editor->setPlainText(file.readAll());
+ }
+}
+
+//! [1]
+void MainWindow::setupEditor()
+{
+ QFont font;
+ font.setFamily("Courier");
+ font.setFixedPitch(true);
+ font.setPointSize(10);
+
+ editor = new QTextEdit;
+ editor->setFont(font);
+
+ highlighter = new Highlighter(editor->document());
+
+ QFile file("mainwindow.h");
+ if (file.open(QFile::ReadOnly | QFile::Text))
+ editor->setPlainText(file.readAll());
+}
+//! [1]
+
+void MainWindow::setupFileMenu()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"), this);
+ menuBar()->addMenu(fileMenu);
+
+ fileMenu->addAction(tr("&New"), this, SLOT(newFile()),
+ QKeySequence(tr("Ctrl+N",
+ "File|New")));
+ fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()),
+ QKeySequence(tr("Ctrl+O",
+ "File|Open")));
+ fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()),
+ QKeySequence(tr("Ctrl+Q",
+ "File|Exit")));
+}
+
+void MainWindow::setupHelpMenu()
+{
+ QMenu *helpMenu = new QMenu(tr("&Help"), this);
+ menuBar()->addMenu(helpMenu);
+
+ helpMenu->addAction(tr("&About"), this, SLOT(about()));
+ helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+}
diff --git a/examples/richtext/syntaxhighlighter/mainwindow.h b/examples/richtext/syntaxhighlighter/mainwindow.h
new file mode 100644
index 0000000..12334ab
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+#include "highlighter.h"
+
+QT_BEGIN_NAMESPACE
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+public slots:
+ void about();
+ void newFile();
+ void openFile(const QString &path = QString());
+
+private:
+ void setupEditor();
+ void setupFileMenu();
+ void setupHelpMenu();
+
+ QTextEdit *editor;
+ Highlighter *highlighter;
+};
+//! [0]
+
+#endif
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
new file mode 100644
index 0000000..b861970
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -0,0 +1,17 @@
+HEADERS = highlighter.h \
+ mainwindow.h
+SOURCES = highlighter.cpp \
+ mainwindow.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/richtext/syntaxhighlighter
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS syntaxhighlighter.pro examples
+sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/syntaxhighlighter
+INSTALLS += target sources
+
+wince*: {
+ addFiles.sources = main.cpp mainwindow.cpp
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+}
diff --git a/examples/richtext/textobject/files/heart.svg b/examples/richtext/textobject/files/heart.svg
new file mode 100644
index 0000000..ba5f050
--- /dev/null
+++ b/examples/richtext/textobject/files/heart.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) --><svg viewBox="100 200 550 500" height="595.27559pt" id="svg1" inkscape:version="0.40+cvs" sodipodi:docbase="C:\Documents and Settings\Jon Phillips\My Documents\projects\clipart-project\submissions" sodipodi:docname="heart-left-highlight.svg" sodipodi:version="0.32" width="595.27559pt" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Heart Left-Highlight</dc:title>
+<dc:description>This is a normal valentines day heart.</dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li>holiday</rdf:li>
+<rdf:li>valentines</rdf:li>
+<rdf:li></rdf:li>
+<rdf:li>valentine</rdf:li>
+<rdf:li>hash(0x8a091c0)</rdf:li>
+<rdf:li>hash(0x8a0916c)</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+<rdf:li>hash(0x8a091f0)</rdf:li>
+<rdf:li>day</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<defs id="defs3"/>
+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="549.40674" inkscape:cy="596.00159" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="615" inkscape:window-width="866" inkscape:window-x="88" inkscape:window-y="116" inkscape:zoom="0.35000000" pagecolor="#ffffff" showguides="true"/>
+<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
+<path d="M 263.41570,235.14588 C 197.17570,235.14588 143.41575,288.90587 143.41575,355.14588 C 143.41575,489.90139 279.34890,525.23318 371.97820,658.45392 C 459.55244,526.05056 600.54070,485.59932 600.54070,355.14588 C 600.54070,288.90588 546.78080,235.14587 480.54070,235.14588 C 432.49280,235.14588 391.13910,263.51631 371.97820,304.33338 C 352.81740,263.51630 311.46370,235.14587 263.41570,235.14588 z " id="path7" sodipodi:nodetypes="ccccccc" style="fill:#e60000;fill-opacity:1.0000000;stroke:#000000;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+<path d="M 265.00000,253.59375 C 207.04033,253.59375 160.00000,300.63407 160.00000,358.59375 C 160.00000,476.50415 278.91857,507.43251 359.96875,624.00000 C 366.52868,614.08205 220.00000,478.47309 220.00000,378.59375 C 220.00000,320.63407 267.04033,273.59375 325.00000,273.59375 C 325.50453,273.59375 325.99718,273.64912 326.50000,273.65625 C 309.22436,261.07286 288.00557,253.59374 265.00000,253.59375 z " id="path220" sodipodi:nodetypes="ccccccc" style="fill:#e6e6e6;fill-opacity:0.64556962;stroke:none;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+</g>
+</svg>
diff --git a/examples/richtext/textobject/main.cpp b/examples/richtext/textobject/main.cpp
new file mode 100644
index 0000000..263d03e
--- /dev/null
+++ b/examples/richtext/textobject/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ Window window;
+ window.show();
+
+ return app.exec();
+}
+
diff --git a/examples/richtext/textobject/svgtextobject.cpp b/examples/richtext/textobject/svgtextobject.cpp
new file mode 100644
index 0000000..6c336e5
--- /dev/null
+++ b/examples/richtext/textobject/svgtextobject.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSvg>
+
+#include "svgtextobject.h"
+#include "window.h"
+
+//![0]
+QSizeF SvgTextObject::intrinsicSize(QTextDocument *doc, int posInDocument,
+ const QTextFormat &format)
+{
+ QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
+ QSize size = bufferedImage.size();
+
+ if (size.height() > 25)
+ size *= 25.0 / (double) size.height();
+
+ return QSizeF(size);
+}
+//![0]
+
+//![1]
+void SvgTextObject::drawObject(QPainter *painter, const QRectF &rect,
+ QTextDocument *doc, int posInDocument,
+ const QTextFormat &format)
+{
+ QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
+
+ painter->drawImage(rect, bufferedImage);
+}
+//![1]
+
diff --git a/examples/richtext/textobject/svgtextobject.h b/examples/richtext/textobject/svgtextobject.h
new file mode 100644
index 0000000..1e91a8b
--- /dev/null
+++ b/examples/richtext/textobject/svgtextobject.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SVGTEXTOBJECT_H
+#define SVGTEXTOBJECT_H
+
+#include <QTextObjectInterface>
+
+QT_BEGIN_NAMESPACE
+class QTextDocument;
+class QTextFormat;
+class QPainter;
+class QRectF;
+class QSizeF;
+QT_END_NAMESPACE
+
+//![0] //![1]
+class SvgTextObject : public QObject, public QTextObjectInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QTextObjectInterface)
+//![1]
+
+public:
+ QSizeF intrinsicSize(QTextDocument *doc, int posInDocument,
+ const QTextFormat &format);
+ void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc,
+ int posInDocument, const QTextFormat &format);
+};
+//![0]
+
+#endif
diff --git a/examples/richtext/textobject/textobject.pro b/examples/richtext/textobject/textobject.pro
new file mode 100644
index 0000000..fbb809c
--- /dev/null
+++ b/examples/richtext/textobject/textobject.pro
@@ -0,0 +1,14 @@
+HEADERS = svgtextobject.h \
+ window.h
+SOURCES = main.cpp \
+ svgtextobject.cpp \
+ window.cpp
+
+QT += svg
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/richtext/textobject
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/textobject
+INSTALLS += target sources
+
diff --git a/examples/richtext/textobject/window.cpp b/examples/richtext/textobject/window.cpp
new file mode 100644
index 0000000..5fbb100
--- /dev/null
+++ b/examples/richtext/textobject/window.cpp
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSvg>
+
+#include "window.h"
+#include "svgtextobject.h"
+
+Window::Window()
+{
+ setupGui();
+ setupTextObject();
+
+ setWindowTitle("Text Object Example");
+}
+
+//![1]
+void Window::insertTextObject()
+{
+ QString fileName = fileNameLineEdit->text();
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::warning(this, tr("Error Opening File"),
+ tr("Could not open '%1'").arg(fileName));
+ }
+
+ QByteArray svgData = file.readAll();
+//![1]
+
+//![2]
+ QTextCharFormat svgCharFormat;
+ svgCharFormat.setObjectType(SvgTextFormat);
+ QSvgRenderer renderer(svgData);
+
+ QImage svgBufferImage(renderer.defaultSize(), QImage::Format_ARGB32);
+ QPainter painter(&svgBufferImage);
+ renderer.render(&painter, svgBufferImage.rect());
+
+ svgCharFormat.setProperty(SvgData, svgBufferImage);
+
+ QTextCursor cursor = textEdit->textCursor();
+ cursor.insertText(QString(QChar::ObjectReplacementCharacter), svgCharFormat);
+ textEdit->setTextCursor(cursor);
+}
+//![2]
+
+//![3]
+void Window::setupTextObject()
+{
+ QObject *svgInterface = new SvgTextObject;
+ textEdit->document()->documentLayout()->registerHandler(SvgTextFormat, svgInterface);
+}
+//![3]
+
+void Window::setupGui()
+{
+ fileNameLabel = new QLabel(tr("Svg File Name:"));
+ fileNameLineEdit = new QLineEdit;
+ insertTextObjectButton = new QPushButton(tr("Insert Image"));
+
+ fileNameLineEdit->setText("./files/heart.svg");
+ connect(insertTextObjectButton, SIGNAL(clicked()),
+ this, SLOT(insertTextObject()));
+
+ QHBoxLayout *bottomLayout = new QHBoxLayout;
+ bottomLayout->addWidget(fileNameLabel);
+ bottomLayout->addWidget(fileNameLineEdit);
+ bottomLayout->addWidget(insertTextObjectButton);
+
+ textEdit = new QTextEdit;
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(textEdit);
+ mainLayout->addLayout(bottomLayout);
+
+ setLayout(mainLayout);
+}
+
diff --git a/examples/richtext/textobject/window.h b/examples/richtext/textobject/window.h
new file mode 100644
index 0000000..8994e23
--- /dev/null
+++ b/examples/richtext/textobject/window.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+#include <QTextFormat>
+
+QT_BEGIN_NAMESPACE
+class QTextEdit;
+class QLineEdit;
+class QPushButton;
+class QLabel;
+QT_END_NAMESPACE
+
+//![0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ enum { SvgTextFormat = QTextFormat::UserObject + 1 };
+ enum SvgProperties { SvgData = 1 };
+
+ Window();
+
+private slots:
+ void insertTextObject();
+
+private:
+ void setupTextObject();
+ void setupGui();
+
+private:
+ QTextEdit *textEdit;
+ QLabel *fileNameLabel;
+ QLineEdit *fileNameLineEdit;
+ QPushButton *insertTextObjectButton;
+};
+//![0]
+
+#endif
diff --git a/examples/script/README b/examples/script/README
new file mode 100644
index 0000000..089a7fa
--- /dev/null
+++ b/examples/script/README
@@ -0,0 +1,40 @@
+Qt is provided with a powerful embedded scripting environment through the QtScript
+classes.
+
+These examples demonstrate the fundamental aspects of scripting applications
+with Qt.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/script/calculator/calculator.js b/examples/script/calculator/calculator.js
new file mode 100644
index 0000000..62c2cba
--- /dev/null
+++ b/examples/script/calculator/calculator.js
@@ -0,0 +1,264 @@
+//! [0]
+function Calculator(ui)
+{
+ this.ui = ui;
+
+ this.pendingAdditiveOperator = "";
+ this.pendingMultiplicativeOperator = "";
+ this.sumInMemory = 0;
+ this.sumSoFar = 0;
+ this.factorSoFar = 0;
+ this.waitingForOperand = true;
+
+ with (ui) {
+ display.text = "0";
+
+ zeroButton.clicked.connect(this, this.digitClicked);
+ oneButton.clicked.connect(this, "digitClicked");
+ twoButton.clicked.connect(this, "digitClicked");
+ threeButton.clicked.connect(this, "digitClicked");
+ fourButton.clicked.connect(this, "digitClicked");
+ fiveButton.clicked.connect(this, "digitClicked");
+ sixButton.clicked.connect(this, "digitClicked");
+ sevenButton.clicked.connect(this, "digitClicked");
+ eightButton.clicked.connect(this, "digitClicked");
+ nineButton.clicked.connect(this, "digitClicked");
+
+ pointButton.clicked.connect(this, "pointClicked");
+ changeSignButton.clicked.connect(this, "changeSignClicked");
+
+ backspaceButton.clicked.connect(this, "backspaceClicked");
+ clearButton.clicked.connect(this, "clear");
+ clearAllButton.clicked.connect(this, "clearAll");
+
+ clearMemoryButton.clicked.connect(this, "clearMemory");
+ readMemoryButton.clicked.connect(this, "readMemory");
+ setMemoryButton.clicked.connect(this, "setMemory");
+ addToMemoryButton.clicked.connect(this, "addToMemory");
+
+ divisionButton.clicked.connect(this, "multiplicativeOperatorClicked");
+ timesButton.clicked.connect(this, "multiplicativeOperatorClicked");
+ minusButton.clicked.connect(this, "additiveOperatorClicked");
+ plusButton.clicked.connect(this, "additiveOperatorClicked");
+
+ squareRootButton.clicked.connect(this, "unaryOperatorClicked");
+ powerButton.clicked.connect(this, "unaryOperatorClicked");
+ reciprocalButton.clicked.connect(this, "unaryOperatorClicked");
+ equalButton.clicked.connect(this, "equalClicked");
+ }
+}
+//! [0]
+
+Calculator.prototype.abortOperation = function()
+{
+ this.clearAll();
+ this.ui.display.text = "####";
+}
+
+Calculator.prototype.calculate = function(rightOperand, pendingOperator)
+{
+ if (pendingOperator == "+") {
+ this.sumSoFar += rightOperand;
+ } else if (pendingOperator == "-") {
+ this.sumSoFar -= rightOperand;
+ } else if (pendingOperator == "*") {
+ this.factorSoFar *= rightOperand;
+ } else if (pendingOperator == "/") {
+ if (rightOperand == 0)
+ return false;
+ this.factorSoFar /= rightOperand;
+ }
+ return true;
+}
+
+//! [1]
+Calculator.prototype.digitClicked = function()
+{
+ var digitValue = __qt_sender__.text - 0;
+ if ((digitValue == 0) && (this.ui.display.text == "0"))
+ return;
+ if (this.waitingForOperand) {
+ this.ui.display.clear();
+ this.waitingForOperand = false;
+ }
+ this.ui.display.text += digitValue;
+}
+//! [1]
+
+Calculator.prototype.unaryOperatorClicked = function()
+{
+ var operand = this.ui.display.text - 0;
+ var result = 0;
+ if (__qt_sender__.text == "Sqrt") {
+ if (operand < 0) {
+ this.abortOperation();
+ return;
+ }
+ result = Math.sqrt(operand);
+ } else if (__qt_sender__.text == "x^2") {
+ result = Math.pow(operand, 2);
+ } else if (__qt_sender__.text == "1/x") {
+ if (operand == 0.0) {
+ this.abortOperation();
+ return;
+ }
+ result = 1 / operand;
+ }
+ this.ui.display.text = result + "";
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.additiveOperatorClicked = function()
+{
+ var operand = this.ui.display.text - 0;
+
+ if (this.pendingMultiplicativeOperator.length != 0) {
+ if (!this.calculate(operand, this.pendingMultiplicativeOperator)) {
+ this.abortOperation();
+ return;
+ }
+ this.ui.display.text = this.factorSoFar + "";
+ operand = this.factorSoFar;
+ this.factorSoFar = 0;
+ this.pendingMultiplicativeOperator = "";
+ }
+
+ if (this.pendingAdditiveOperator.length != 0) {
+ if (!this.calculate(operand, this.pendingAdditiveOperator)) {
+ this.abortOperation();
+ return;
+ }
+ this.ui.display.text = this.sumSoFar + "";
+ } else {
+ this.sumSoFar = operand;
+ }
+
+ this.pendingAdditiveOperator = __qt_sender__.text;
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.multiplicativeOperatorClicked = function()
+{
+ var operand = this.ui.display.text - 0;
+
+ if (this.pendingMultiplicativeOperator.length != 0) {
+ if (!this.calculate(operand, this.pendingMultiplicativeOperator)) {
+ this.abortOperation();
+ return;
+ }
+ this.ui.display.text = this.factorSoFar + "";
+ } else {
+ this.factorSoFar = operand;
+ }
+
+ this.pendingMultiplicativeOperator = __qt_sender__.text;
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.equalClicked = function()
+{
+ var operand = this.ui.display.text - 0;
+
+ if (this.pendingMultiplicativeOperator.length != 0) {
+ if (!this.calculate(operand, this.pendingMultiplicativeOperator)) {
+ this.abortOperation();
+ return;
+ }
+ operand = this.factorSoFar;
+ this.factorSoFar = 0.0;
+ this.pendingMultiplicativeOperator = "";
+ }
+ if (this.pendingAdditiveOperator.length != 0) {
+ if (!this.calculate(operand, this.pendingAdditiveOperator)) {
+ this.abortOperation();
+ return;
+ }
+ this.pendingAdditiveOperator = "";
+ } else {
+ this.sumSoFar = operand;
+ }
+
+ this.ui.display.text = this.sumSoFar + "";
+ this.sumSoFar = 0.0;
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.pointClicked = function()
+{
+ if (this.waitingForOperand)
+ this.ui.display.text = "0";
+ if (this.ui.display.text.indexOf(".") == -1)
+ this.ui.display.text += ".";
+ this.waitingForOperand = false;
+}
+
+//! [2]
+Calculator.prototype.changeSignClicked = function()
+{
+ var text = this.ui.display.text;
+ var value = text - 0;
+
+ if (value > 0) {
+ text = "-" + text;
+ } else if (value < 0) {
+ text = text.slice(1);
+ }
+ this.ui.display.text = text;
+}
+//! [2]
+
+Calculator.prototype.backspaceClicked = function()
+{
+ if (this.waitingForOperand)
+ return;
+
+ var text = this.ui.display.text;
+ text = text.slice(0, -1);
+ if (text.length == 0) {
+ text = "0";
+ this.waitingForOperand = true;
+ }
+ this.ui.display.text = text;
+}
+
+Calculator.prototype.clear = function()
+{
+ if (this.waitingForOperand)
+ return;
+
+ this.ui.display.text = "0";
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.clearAll = function()
+{
+ this.sumSoFar = 0.0;
+ this.factorSoFar = 0.0;
+ this.pendingAdditiveOperator = "";
+ this.pendingMultiplicativeOperator = "";
+ this.ui.display.text = "0";
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.clearMemory = function()
+{
+ this.sumInMemory = 0.0;
+}
+
+Calculator.prototype.readMemory = function()
+{
+ this.ui.display.text = this.sumInMemory + "";
+ this.waitingForOperand = true;
+}
+
+Calculator.prototype.setMemory = function()
+{
+ this.equalClicked();
+ this.sumInMemory = this.ui.display.text - 0;
+}
+
+Calculator.prototype.addToMemory = function()
+{
+ this.equalClicked();
+ this.sumInMemory += this.ui.display.text - 0;
+}
diff --git a/examples/script/calculator/calculator.pro b/examples/script/calculator/calculator.pro
new file mode 100644
index 0000000..226d5f4
--- /dev/null
+++ b/examples/script/calculator/calculator.pro
@@ -0,0 +1,12 @@
+QT += script
+CONFIG += uitools
+RESOURCES += calculator.qrc
+SOURCES += main.cpp
+
+contains(QT_CONFIG, scripttools): QT += scripttools
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/calculator
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.js *.ui
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/calculator
+INSTALLS += target sources
diff --git a/examples/script/calculator/calculator.qrc b/examples/script/calculator/calculator.qrc
new file mode 100644
index 0000000..afa6686
--- /dev/null
+++ b/examples/script/calculator/calculator.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>calculator.js</file>
+ <file>calculator.ui</file>
+ </qresource>
+</RCC>
diff --git a/examples/script/calculator/calculator.ui b/examples/script/calculator/calculator.ui
new file mode 100644
index 0000000..bb519ba
--- /dev/null
+++ b/examples/script/calculator/calculator.ui
@@ -0,0 +1,406 @@
+<ui version="4.0" >
+ <class>Calculator</class>
+ <widget class="QWidget" name="Calculator" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>314</width>
+ <height>301</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>314</width>
+ <height>301</height>
+ </size>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>314</width>
+ <height>301</height>
+ </size>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator</string>
+ </property>
+ <widget class="QToolButton" name="backspaceButton" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>91</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Backspace</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="clearButton" >
+ <property name="geometry" >
+ <rect>
+ <x>110</x>
+ <y>50</y>
+ <width>91</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Clear</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="clearAllButton" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>50</y>
+ <width>91</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Clear All</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="clearMemoryButton" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>MC</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="readMemoryButton" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>MR</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="setMemoryButton" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>MS</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="addToMemoryButton" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>M+</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="sevenButton" >
+ <property name="geometry" >
+ <rect>
+ <x>60</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>7</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="eightButton" >
+ <property name="geometry" >
+ <rect>
+ <x>110</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>8</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="nineButton" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>9</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="fourButton" >
+ <property name="geometry" >
+ <rect>
+ <x>60</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>4</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="fiveButton" >
+ <property name="geometry" >
+ <rect>
+ <x>110</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>5</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="sixButton" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>6</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="oneButton" >
+ <property name="geometry" >
+ <rect>
+ <x>60</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="twoButton" >
+ <property name="geometry" >
+ <rect>
+ <x>110</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>2</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="threeButton" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>3</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="zeroButton" >
+ <property name="geometry" >
+ <rect>
+ <x>60</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="pointButton" >
+ <property name="geometry" >
+ <rect>
+ <x>110</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>.</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="changeSignButton" >
+ <property name="geometry" >
+ <rect>
+ <x>160</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+-</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="plusButton" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="divisionButton" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>/</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="timesButton" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>*</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="minusButton" >
+ <property name="geometry" >
+ <rect>
+ <x>210</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>-</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="squareRootButton" >
+ <property name="geometry" >
+ <rect>
+ <x>260</x>
+ <y>100</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Sqrt</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="powerButton" >
+ <property name="geometry" >
+ <rect>
+ <x>260</x>
+ <y>150</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>x^2</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="reciprocalButton" >
+ <property name="geometry" >
+ <rect>
+ <x>260</x>
+ <y>200</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>1/x</string>
+ </property>
+ </widget>
+ <widget class="QToolButton" name="equalButton" >
+ <property name="geometry" >
+ <rect>
+ <x>260</x>
+ <y>250</y>
+ <width>41</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="display" >
+ <property name="geometry" >
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>291</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="maxLength" >
+ <number>15</number>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/script/calculator/main.cpp b/examples/script/calculator/main.cpp
new file mode 100644
index 0000000..4608aa5
--- /dev/null
+++ b/examples/script/calculator/main.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QUiLoader>
+#include <QtScript>
+#include <QWidget>
+#include <QFile>
+#include <QMainWindow>
+#include <QLineEdit>
+
+#ifndef QT_NO_SCRIPTTOOLS
+#include <QScriptEngineDebugger>
+#endif
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(calculator);
+
+ QApplication app(argc, argv);
+//! [0a]
+ QScriptEngine engine;
+//! [0a]
+
+#ifndef QT_NO_SCRIPTTOOLS
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&engine);
+ QMainWindow *debugWindow = debugger.standardWindow();
+ debugWindow->resize(1024, 640);
+#endif
+
+//! [0b]
+ QString scriptFileName(":/calculator.js");
+ QFile scriptFile(scriptFileName);
+ scriptFile.open(QIODevice::ReadOnly);
+ engine.evaluate(scriptFile.readAll(), scriptFileName);
+ scriptFile.close();
+//! [0b]
+
+//! [1]
+ QUiLoader loader;
+ QFile uiFile(":/calculator.ui");
+ uiFile.open(QIODevice::ReadOnly);
+ QWidget *ui = loader.load(&uiFile);
+ uiFile.close();
+//! [1]
+
+//! [2]
+ QScriptValue ctor = engine.evaluate("Calculator");
+ QScriptValue scriptUi = engine.newQObject(ui, QScriptEngine::ScriptOwnership);
+ QScriptValue calc = ctor.construct(QScriptValueList() << scriptUi);
+//! [2]
+
+#ifndef QT_NO_SCRIPTTOOLS
+ QLineEdit *display = qFindChild<QLineEdit*>(ui, "display");
+ QObject::connect(display, SIGNAL(returnPressed()),
+ debugWindow, SLOT(show()));
+#endif
+//! [3]
+ ui->show();
+ return app.exec();
+//! [3]
+}
diff --git a/examples/script/context2d/context2d.cpp b/examples/script/context2d/context2d.cpp
new file mode 100644
index 0000000..d49cc3d
--- /dev/null
+++ b/examples/script/context2d/context2d.cpp
@@ -0,0 +1,825 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "context2d.h"
+
+#include <QVariant>
+
+#include <math.h>
+static const double Q_PI = 3.14159265358979323846; // pi
+
+#define DEGREES(t) ((t) * 180.0 / Q_PI)
+
+#define qClamp(val, min, max) qMin(qMax(val, min), max)
+static QList<qreal> parseNumbersList(QString::const_iterator &itr)
+{
+ QList<qreal> points;
+ QString temp;
+ while ((*itr).isSpace())
+ ++itr;
+ while ((*itr).isNumber() ||
+ (*itr) == '-' || (*itr) == '+' || (*itr) == '.') {
+ temp = QString();
+
+ if ((*itr) == '-')
+ temp += *itr++;
+ else if ((*itr) == '+')
+ temp += *itr++;
+ while ((*itr).isDigit())
+ temp += *itr++;
+ if ((*itr) == '.')
+ temp += *itr++;
+ while ((*itr).isDigit())
+ temp += *itr++;
+ while ((*itr).isSpace())
+ ++itr;
+ if ((*itr) == ',')
+ ++itr;
+ points.append(temp.toDouble());
+ //eat spaces
+ while ((*itr).isSpace())
+ ++itr;
+ }
+
+ return points;
+}
+
+QColor colorFromString(const QString &name)
+{
+ QString::const_iterator itr = name.constBegin();
+ QList<qreal> compo;
+ if (name.startsWith("rgba(")) {
+ ++itr; ++itr; ++itr; ++itr; ++itr;
+ compo = parseNumbersList(itr);
+ if (compo.size() != 4) {
+ return QColor();
+ }
+ //alpha seems to be always between 0-1
+ compo[3] *= 255;
+ return QColor((int)compo[0], (int)compo[1],
+ (int)compo[2], (int)compo[3]);
+ } else if (name.startsWith("rgb(")) {
+ ++itr; ++itr; ++itr; ++itr;
+ compo = parseNumbersList(itr);
+ if (compo.size() != 3) {
+ return QColor();
+ }
+ return QColor((int)qClamp(compo[0], qreal(0), qreal(255)),
+ (int)qClamp(compo[1], qreal(0), qreal(255)),
+ (int)qClamp(compo[2], qreal(0), qreal(255)));
+ } else {
+ //QRgb color;
+ //CSSParser::parseColor(name, color);
+ return QColor(name);
+ }
+}
+
+
+static QPainter::CompositionMode compositeOperatorFromString(const QString &compositeOperator)
+{
+ if ( compositeOperator == "source-over" ) {
+ return QPainter::CompositionMode_SourceOver;
+ } else if ( compositeOperator == "source-out" ) {
+ return QPainter::CompositionMode_SourceOut;
+ } else if ( compositeOperator == "source-in" ) {
+ return QPainter::CompositionMode_SourceIn;
+ } else if ( compositeOperator == "source-atop" ) {
+ return QPainter::CompositionMode_SourceAtop;
+ } else if ( compositeOperator == "destination-atop" ) {
+ return QPainter::CompositionMode_DestinationAtop;
+ } else if ( compositeOperator == "destination-in" ) {
+ return QPainter::CompositionMode_DestinationIn;
+ } else if ( compositeOperator == "destination-out" ) {
+ return QPainter::CompositionMode_DestinationOut;
+ } else if ( compositeOperator == "destination-over" ) {
+ return QPainter::CompositionMode_DestinationOver;
+ } else if ( compositeOperator == "darker" ) {
+ return QPainter::CompositionMode_SourceOver;
+ } else if ( compositeOperator == "lighter" ) {
+ return QPainter::CompositionMode_SourceOver;
+ } else if ( compositeOperator == "copy" ) {
+ return QPainter::CompositionMode_Source;
+ } else if ( compositeOperator == "xor" ) {
+ return QPainter::CompositionMode_Xor;
+ }
+
+ return QPainter::CompositionMode_SourceOver;
+}
+
+static QString compositeOperatorToString(QPainter::CompositionMode op)
+{
+ switch (op) {
+ case QPainter::CompositionMode_SourceOver:
+ return "source-over";
+ case QPainter::CompositionMode_DestinationOver:
+ return "destination-over";
+ case QPainter::CompositionMode_Clear:
+ return "clear";
+ case QPainter::CompositionMode_Source:
+ return "source";
+ case QPainter::CompositionMode_Destination:
+ return "destination";
+ case QPainter::CompositionMode_SourceIn:
+ return "source-in";
+ case QPainter::CompositionMode_DestinationIn:
+ return "destination-in";
+ case QPainter::CompositionMode_SourceOut:
+ return "source-out";
+ case QPainter::CompositionMode_DestinationOut:
+ return "destination-out";
+ case QPainter::CompositionMode_SourceAtop:
+ return "source-atop";
+ case QPainter::CompositionMode_DestinationAtop:
+ return "destination-atop";
+ case QPainter::CompositionMode_Xor:
+ return "xor";
+ case QPainter::CompositionMode_Plus:
+ return "plus";
+ case QPainter::CompositionMode_Multiply:
+ return "multiply";
+ case QPainter::CompositionMode_Screen:
+ return "screen";
+ case QPainter::CompositionMode_Overlay:
+ return "overlay";
+ case QPainter::CompositionMode_Darken:
+ return "darken";
+ case QPainter::CompositionMode_Lighten:
+ return "lighten";
+ case QPainter::CompositionMode_ColorDodge:
+ return "color-dodge";
+ case QPainter::CompositionMode_ColorBurn:
+ return "color-burn";
+ case QPainter::CompositionMode_HardLight:
+ return "hard-light";
+ case QPainter::CompositionMode_SoftLight:
+ return "soft-light";
+ case QPainter::CompositionMode_Difference:
+ return "difference";
+ case QPainter::CompositionMode_Exclusion:
+ return "exclusion";
+ default:
+ break;
+ }
+ return QString();
+}
+
+void Context2D::save()
+{
+ m_stateStack.push(m_state);
+}
+
+
+void Context2D::restore()
+{
+ if (!m_stateStack.isEmpty()) {
+ m_state = m_stateStack.pop();
+ m_state.flags = AllIsFullOfDirt;
+ }
+}
+
+
+void Context2D::scale(qreal x, qreal y)
+{
+ m_state.matrix.scale(x, y);
+ m_state.flags |= DirtyTransformationMatrix;
+}
+
+
+void Context2D::rotate(qreal angle)
+{
+ m_state.matrix.rotate(DEGREES(angle));
+ m_state.flags |= DirtyTransformationMatrix;
+}
+
+
+void Context2D::translate(qreal x, qreal y)
+{
+ m_state.matrix.translate(x, y);
+ m_state.flags |= DirtyTransformationMatrix;
+}
+
+
+void Context2D::transform(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy)
+{
+ QMatrix mat(m11, m12,
+ m21, m22,
+ dx, dy);
+ m_state.matrix *= mat;
+ m_state.flags |= DirtyTransformationMatrix;
+}
+
+
+void Context2D::setTransform(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy)
+{
+ QMatrix mat(m11, m12,
+ m21, m22,
+ dx, dy);
+ m_state.matrix = mat;
+ m_state.flags |= DirtyTransformationMatrix;
+}
+
+
+QString Context2D::globalCompositeOperation() const
+{
+ return compositeOperatorToString(m_state.globalCompositeOperation);
+}
+
+void Context2D::setGlobalCompositeOperation(const QString &op)
+{
+ QPainter::CompositionMode mode =
+ compositeOperatorFromString(op);
+ m_state.globalCompositeOperation = mode;
+ m_state.flags |= DirtyGlobalCompositeOperation;
+}
+
+QVariant Context2D::strokeStyle() const
+{
+ return m_state.strokeStyle;
+}
+
+void Context2D::setStrokeStyle(const QVariant &style)
+{
+ if (qVariantCanConvert<CanvasGradient>(style)) {
+ CanvasGradient cg = qvariant_cast<CanvasGradient>(style);
+ m_state.strokeStyle = cg.value;
+ } else {
+ QColor color = colorFromString(style.toString());
+ m_state.strokeStyle = color;
+ }
+ m_state.flags |= DirtyStrokeStyle;
+}
+
+QVariant Context2D::fillStyle() const
+{
+ return m_state.fillStyle;
+}
+
+//! [3]
+void Context2D::setFillStyle(const QVariant &style)
+{
+ if (qVariantCanConvert<CanvasGradient>(style)) {
+ CanvasGradient cg = qvariant_cast<CanvasGradient>(style);
+ m_state.fillStyle = cg.value;
+ } else {
+ QColor color = colorFromString(style.toString());
+ m_state.fillStyle = color;
+ }
+ m_state.flags |= DirtyFillStyle;
+}
+//! [3]
+
+qreal Context2D::globalAlpha() const
+{
+ return m_state.globalAlpha;
+}
+
+void Context2D::setGlobalAlpha(qreal alpha)
+{
+ m_state.globalAlpha = alpha;
+ m_state.flags |= DirtyGlobalAlpha;
+}
+
+
+CanvasGradient Context2D::createLinearGradient(qreal x0, qreal y0,
+ qreal x1, qreal y1)
+{
+ QLinearGradient g(x0, y0, x1, y1);
+ return CanvasGradient(g);
+}
+
+
+CanvasGradient Context2D::createRadialGradient(qreal x0, qreal y0,
+ qreal r0, qreal x1,
+ qreal y1, qreal r1)
+{
+ QRadialGradient g(QPointF(x1, y1), r0+r1, QPointF(x0, y0));
+ return CanvasGradient(g);
+}
+
+qreal Context2D::lineWidth() const
+{
+ return m_state.lineWidth;
+}
+
+void Context2D::setLineWidth(qreal w)
+{
+ m_state.lineWidth = w;
+ m_state.flags |= DirtyLineWidth;
+}
+
+//! [0]
+QString Context2D::lineCap() const
+{
+ switch (m_state.lineCap) {
+ case Qt::FlatCap:
+ return "butt";
+ case Qt::SquareCap:
+ return "square";
+ case Qt::RoundCap:
+ return "round";
+ default: ;
+ }
+ return QString();
+}
+
+void Context2D::setLineCap(const QString &capString)
+{
+ Qt::PenCapStyle style;
+ if (capString == "round")
+ style = Qt::RoundCap;
+ else if (capString == "square")
+ style = Qt::SquareCap;
+ else if (capString == "butt")
+ style = Qt::FlatCap;
+ m_state.lineCap = style;
+ m_state.flags |= DirtyLineCap;
+}
+//! [0]
+
+QString Context2D::lineJoin() const
+{
+ switch (m_state.lineJoin) {
+ case Qt::RoundJoin:
+ return "round";
+ case Qt::BevelJoin:
+ return "bevel";
+ case Qt::MiterJoin:
+ return "miter";
+ default: ;
+ }
+ return QString();
+}
+
+void Context2D::setLineJoin(const QString &joinString)
+{
+ Qt::PenJoinStyle style;
+ if (joinString == "round")
+ style = Qt::RoundJoin;
+ else if (joinString == "bevel")
+ style = Qt::BevelJoin;
+ else if (joinString == "miter")
+ style = Qt::MiterJoin;
+ m_state.lineJoin = style;
+ m_state.flags |= DirtyLineJoin;
+}
+
+qreal Context2D::miterLimit() const
+{
+ return m_state.miterLimit;
+}
+
+void Context2D::setMiterLimit(qreal m)
+{
+ m_state.miterLimit = m;
+ m_state.flags |= DirtyMiterLimit;
+}
+
+void Context2D::setShadowOffsetX(qreal x)
+{
+ m_state.shadowOffsetX = x;
+ m_state.flags |= DirtyShadowOffsetX;
+}
+
+void Context2D::setShadowOffsetY(qreal y)
+{
+ m_state.shadowOffsetY = y;
+ m_state.flags |= DirtyShadowOffsetY;
+}
+
+void Context2D::setShadowBlur(qreal b)
+{
+ m_state.shadowBlur = b;
+ m_state.flags |= DirtyShadowBlur;
+}
+
+void Context2D::setShadowColor(const QString &str)
+{
+ m_state.shadowColor = colorFromString(str);
+ m_state.flags |= DirtyShadowColor;
+}
+
+qreal Context2D::shadowOffsetX() const
+{
+ return m_state.shadowOffsetX;
+}
+
+qreal Context2D::shadowOffsetY() const
+{
+ return m_state.shadowOffsetY;
+}
+
+
+qreal Context2D::shadowBlur() const
+{
+ return m_state.shadowBlur;
+}
+
+
+QString Context2D::shadowColor() const
+{
+ return m_state.shadowColor.name();
+}
+
+
+void Context2D::clearRect(qreal x, qreal y, qreal w, qreal h)
+{
+ beginPainting();
+ m_painter.save();
+ m_painter.setMatrix(m_state.matrix, false);
+ m_painter.setCompositionMode(QPainter::CompositionMode_Source);
+ m_painter.fillRect(QRectF(x, y, w, h), QColor(0, 0, 0, 0));
+ m_painter.restore();
+ scheduleChange();
+}
+
+
+//! [1]
+void Context2D::fillRect(qreal x, qreal y, qreal w, qreal h)
+{
+ beginPainting();
+ m_painter.save();
+ m_painter.setMatrix(m_state.matrix, false);
+ m_painter.fillRect(QRectF(x, y, w, h), m_painter.brush());
+ m_painter.restore();
+ scheduleChange();
+}
+//! [1]
+
+
+void Context2D::strokeRect(qreal x, qreal y, qreal w, qreal h)
+{
+ QPainterPath path;
+ path.addRect(x, y, w, h);
+ beginPainting();
+ m_painter.save();
+ m_painter.setMatrix(m_state.matrix, false);
+ m_painter.strokePath(path, m_painter.pen());
+ m_painter.restore();
+ scheduleChange();
+}
+
+
+void Context2D::beginPath()
+{
+ m_path = QPainterPath();
+}
+
+
+void Context2D::closePath()
+{
+ m_path.closeSubpath();
+}
+
+
+void Context2D::moveTo(qreal x, qreal y)
+{
+ QPointF pt = m_state.matrix.map(QPointF(x, y));
+ m_path.moveTo(pt);
+}
+
+
+void Context2D::lineTo(qreal x, qreal y)
+{
+ QPointF pt = m_state.matrix.map(QPointF(x, y));
+ m_path.lineTo(pt);
+}
+
+
+void Context2D::quadraticCurveTo(qreal cpx, qreal cpy, qreal x, qreal y)
+{
+ QPointF cp = m_state.matrix.map(QPointF(cpx, cpy));
+ QPointF xy = m_state.matrix.map(QPointF(x, y));
+ m_path.quadTo(cp, xy);
+}
+
+
+void Context2D::bezierCurveTo(qreal cp1x, qreal cp1y,
+ qreal cp2x, qreal cp2y, qreal x, qreal y)
+{
+ QPointF cp1 = m_state.matrix.map(QPointF(cp1x, cp1y));
+ QPointF cp2 = m_state.matrix.map(QPointF(cp2x, cp2y));
+ QPointF end = m_state.matrix.map(QPointF(x, y));
+ m_path.cubicTo(cp1, cp2, end);
+}
+
+
+void Context2D::arcTo(qreal x1, qreal y1, qreal x2, qreal y2, qreal radius)
+{
+ //FIXME: this is surely busted
+ QPointF st = m_state.matrix.map(QPointF(x1, y1));
+ QPointF end = m_state.matrix.map(QPointF(x2, y2));
+ m_path.arcTo(st.x(), st.y(),
+ end.x()-st.x(), end.y()-st.y(),
+ radius, 90);
+}
+
+
+void Context2D::rect(qreal x, qreal y, qreal w, qreal h)
+{
+ QPainterPath path; path.addRect(x, y, w, h);
+ path = m_state.matrix.map(path);
+ m_path.addPath(path);
+}
+
+void Context2D::arc(qreal xc, qreal yc, qreal radius,
+ qreal sar, qreal ear,
+ bool anticlockwise)
+{
+ //### HACK
+ // In Qt we don't switch the coordinate system for degrees
+ // and still use the 0,0 as bottom left for degrees so we need
+ // to switch
+ sar = -sar;
+ ear = -ear;
+ anticlockwise = !anticlockwise;
+ //end hack
+
+ float sa = DEGREES(sar);
+ float ea = DEGREES(ear);
+
+ double span = 0;
+
+ double xs = xc - radius;
+ double ys = yc - radius;
+ double width = radius*2;
+ double height = radius*2;
+
+ if (!anticlockwise && (ea < sa)) {
+ span += 360;
+ } else if (anticlockwise && (sa < ea)) {
+ span -= 360;
+ }
+
+ //### this is also due to switched coordinate system
+ // we would end up with a 0 span instead of 360
+ if (!(qFuzzyCompare(span + (ea - sa) + 1, 1) &&
+ qFuzzyCompare(qAbs(span), 360))) {
+ span += ea - sa;
+ }
+
+ QPainterPath path;
+ path.moveTo(QPointF(xc + radius * cos(sar),
+ yc - radius * sin(sar)));
+
+ path.arcTo(xs, ys, width, height, sa, span);
+ path = m_state.matrix.map(path);
+ m_path.addPath(path);
+}
+
+
+void Context2D::fill()
+{
+ beginPainting();
+ m_painter.fillPath(m_path, m_painter.brush());
+ scheduleChange();
+}
+
+
+void Context2D::stroke()
+{
+ beginPainting();
+ m_painter.save();
+ m_painter.setMatrix(m_state.matrix, false);
+ QPainterPath tmp = m_state.matrix.inverted().map(m_path);
+ m_painter.strokePath(tmp, m_painter.pen());
+ m_painter.restore();
+ scheduleChange();
+}
+
+
+void Context2D::clip()
+{
+ m_state.clipPath = m_path;
+ m_state.flags |= DirtyClippingRegion;
+}
+
+
+bool Context2D::isPointInPath(qreal x, qreal y) const
+{
+ return m_path.contains(QPointF(x, y));
+}
+
+
+ImageData Context2D::getImageData(qreal sx, qreal sy, qreal sw, qreal sh)
+{
+ Q_UNUSED(sx);
+ Q_UNUSED(sy);
+ Q_UNUSED(sw);
+ Q_UNUSED(sh);
+ return ImageData();
+}
+
+
+void Context2D::putImageData(ImageData image, qreal dx, qreal dy)
+{
+ Q_UNUSED(image);
+ Q_UNUSED(dx);
+ Q_UNUSED(dy);
+}
+
+Context2D::Context2D(QObject *parent)
+ : QObject(parent), m_changeTimerId(-1)
+{
+ reset();
+}
+
+const QImage &Context2D::endPainting()
+{
+ if (m_painter.isActive())
+ m_painter.end();
+ return m_image;
+}
+
+void Context2D::beginPainting()
+{
+ if (!m_painter.isActive()) {
+ m_painter.begin(&m_image);
+ m_painter.setRenderHint(QPainter::Antialiasing);
+ if (!m_state.clipPath.isEmpty())
+ m_painter.setClipPath(m_state.clipPath);
+ m_painter.setBrush(m_state.fillStyle);
+ m_painter.setOpacity(m_state.globalAlpha);
+ QPen pen;
+ pen.setBrush(m_state.strokeStyle);
+ if (pen.style() == Qt::NoPen)
+ pen.setStyle(Qt::SolidLine);
+ pen.setCapStyle(m_state.lineCap);
+ pen.setJoinStyle(m_state.lineJoin);
+ pen.setWidthF(m_state.lineWidth);
+ pen.setMiterLimit(m_state.miterLimit);
+ m_painter.setPen(pen);
+ } else {
+ if ((m_state.flags & DirtyClippingRegion) && !m_state.clipPath.isEmpty())
+ m_painter.setClipPath(m_state.clipPath);
+ if (m_state.flags & DirtyFillStyle)
+ m_painter.setBrush(m_state.fillStyle);
+ if (m_state.flags & DirtyGlobalAlpha)
+ m_painter.setOpacity(m_state.globalAlpha);
+ if (m_state.flags & DirtyGlobalCompositeOperation)
+ m_painter.setCompositionMode(m_state.globalCompositeOperation);
+ if (m_state.flags & MDirtyPen) {
+ QPen pen = m_painter.pen();
+ if (m_state.flags & DirtyStrokeStyle)
+ pen.setBrush(m_state.strokeStyle);
+ if (m_state.flags & DirtyLineWidth)
+ pen.setWidthF(m_state.lineWidth);
+ if (m_state.flags & DirtyLineCap)
+ pen.setCapStyle(m_state.lineCap);
+ if (m_state.flags & DirtyLineJoin)
+ pen.setJoinStyle(m_state.lineJoin);
+ if (m_state.flags & DirtyMiterLimit)
+ pen.setMiterLimit(m_state.miterLimit);
+ m_painter.setPen(pen);
+ }
+ m_state.flags = 0;
+ }
+}
+
+void Context2D::clear()
+{
+ endPainting();
+ m_image.fill(qRgba(0,0,0,0));
+ scheduleChange();
+}
+
+void Context2D::reset()
+{
+ m_stateStack.clear();
+ m_state.matrix = QMatrix();
+ m_state.clipPath = QPainterPath();
+ m_state.globalAlpha = 1.0;
+ m_state.globalCompositeOperation = QPainter::CompositionMode_SourceOver;
+ m_state.strokeStyle = Qt::black;
+ m_state.fillStyle = Qt::black;
+ m_state.lineWidth = 1;
+ m_state.lineCap = Qt::FlatCap;
+ m_state.lineJoin = Qt::MiterJoin;
+ m_state.miterLimit = 10;
+ m_state.shadowOffsetX = 0;
+ m_state.shadowOffsetY = 0;
+ m_state.shadowBlur = 0;
+ m_state.shadowColor = qRgba(0, 0, 0, 0);
+ m_state.flags = AllIsFullOfDirt;
+ clear();
+}
+
+void Context2D::setSize(int width, int height)
+{
+ endPainting();
+ QImage newi(width, height, QImage::Format_ARGB32_Premultiplied);
+ newi.fill(qRgba(0,0,0,0));
+ QPainter p(&newi);
+ p.drawImage(0, 0, m_image);
+ p.end();
+ m_image = newi;
+ scheduleChange();
+}
+
+void Context2D::setSize(const QSize &size)
+{
+ setSize(size.width(), size.height());
+}
+
+QSize Context2D::size() const
+{
+ return m_image.size();
+}
+
+void Context2D::drawImage(DomImage *image, qreal dx, qreal dy)
+{
+ if (!image)
+ return;
+ if (dx < 0) {
+ qreal sx = qAbs(dx);
+ qreal sy = qAbs(dy);
+ qreal sw = image->width() - sx;
+ qreal sh = image->height() - sy;
+
+ drawImage(image, sx, sy, sw, sh, 0, 0, sw, sh);
+ } else {
+ beginPainting();
+ m_painter.drawImage(QPointF(dx, dy), image->image());
+ scheduleChange();
+ }
+}
+
+void Context2D::drawImage(DomImage *image, qreal dx, qreal dy,
+ qreal dw, qreal dh)
+{
+ if (!image)
+ return;
+ beginPainting();
+ m_painter.drawImage(QRectF(dx, dy, dw, dh).toRect(), image->image());
+ scheduleChange();
+}
+
+void Context2D::drawImage(DomImage *image, qreal sx, qreal sy,
+ qreal sw, qreal sh, qreal dx, qreal dy,
+ qreal dw, qreal dh)
+{
+ if (!image)
+ return;
+ beginPainting();
+ m_painter.drawImage(QRectF(dx, dy, dw, dh), image->image(),
+ QRectF(sx, sy, sw, sh));
+ scheduleChange();
+}
+
+//! [2]
+void Context2D::scheduleChange()
+{
+ if (m_changeTimerId == -1)
+ m_changeTimerId = startTimer(0);
+}
+
+void Context2D::timerEvent(QTimerEvent *e)
+{
+ if (e->timerId() == m_changeTimerId) {
+ killTimer(m_changeTimerId);
+ m_changeTimerId = -1;
+ emit changed(endPainting());
+ } else {
+ QObject::timerEvent(e);
+ }
+}
+//! [2]
diff --git a/examples/script/context2d/context2d.h b/examples/script/context2d/context2d.h
new file mode 100644
index 0000000..38188f7
--- /dev/null
+++ b/examples/script/context2d/context2d.h
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTEXT2D_H
+#define CONTEXT2D_H
+
+#include "domimage.h"
+
+#include <QPainter>
+#include <QPainterPath>
+#include <QString>
+#include <QStack>
+#include <QMetaType>
+#include <QTimerEvent>
+
+// [3]
+class CanvasGradient
+{
+public:
+ CanvasGradient(const QGradient &v)
+ : value(v) {}
+ CanvasGradient() {}
+
+ QGradient value;
+};
+// [3]
+
+Q_DECLARE_METATYPE(CanvasGradient)
+Q_DECLARE_METATYPE(CanvasGradient*)
+
+class ImageData {
+};
+
+class QContext2DCanvas;
+
+//! [0]
+class Context2D : public QObject
+{
+ Q_OBJECT
+ // compositing
+ Q_PROPERTY(qreal globalAlpha READ globalAlpha WRITE setGlobalAlpha)
+ Q_PROPERTY(QString globalCompositeOperation READ globalCompositeOperation WRITE setGlobalCompositeOperation)
+ Q_PROPERTY(QVariant strokeStyle READ strokeStyle WRITE setStrokeStyle)
+ Q_PROPERTY(QVariant fillStyle READ fillStyle WRITE setFillStyle)
+ // line caps/joins
+ Q_PROPERTY(qreal lineWidth READ lineWidth WRITE setLineWidth)
+ Q_PROPERTY(QString lineCap READ lineCap WRITE setLineCap)
+ Q_PROPERTY(QString lineJoin READ lineJoin WRITE setLineJoin)
+ Q_PROPERTY(qreal miterLimit READ miterLimit WRITE setMiterLimit)
+ // shadows
+ Q_PROPERTY(qreal shadowOffsetX READ shadowOffsetX WRITE setShadowOffsetX)
+ Q_PROPERTY(qreal shadowOffsetY READ shadowOffsetY WRITE setShadowOffsetY)
+ Q_PROPERTY(qreal shadowBlur READ shadowBlur WRITE setShadowBlur)
+ Q_PROPERTY(QString shadowColor READ shadowColor WRITE setShadowColor)
+//! [0]
+
+public:
+ Context2D(QObject *parent = 0);
+ void setSize(int width, int height);
+ void setSize(const QSize &size);
+ QSize size() const;
+
+ void clear();
+ void reset();
+
+ // compositing
+ qreal globalAlpha() const; // (default 1.0)
+ QString globalCompositeOperation() const; // (default over)
+ QVariant strokeStyle() const; // (default black)
+ QVariant fillStyle() const; // (default black)
+
+ void setGlobalAlpha(qreal alpha);
+ void setGlobalCompositeOperation(const QString &op);
+ void setStrokeStyle(const QVariant &style);
+ void setFillStyle(const QVariant &style);
+
+ // line caps/joins
+ qreal lineWidth() const; // (default 1)
+ QString lineCap() const; // "butt", "round", "square" (default "butt")
+ QString lineJoin() const; // "round", "bevel", "miter" (default "miter")
+ qreal miterLimit() const; // (default 10)
+
+ void setLineWidth(qreal w);
+ void setLineCap(const QString &s);
+ void setLineJoin(const QString &s);
+ void setMiterLimit(qreal m);
+
+ // shadows
+ qreal shadowOffsetX() const; // (default 0)
+ qreal shadowOffsetY() const; // (default 0)
+ qreal shadowBlur() const; // (default 0)
+ QString shadowColor() const; // (default black)
+
+ void setShadowOffsetX(qreal x);
+ void setShadowOffsetY(qreal y);
+ void setShadowBlur(qreal b);
+ void setShadowColor(const QString &str);
+
+//! [1]
+public slots:
+ void save(); // push state on state stack
+ void restore(); // pop state stack and restore state
+
+ void scale(qreal x, qreal y);
+ void rotate(qreal angle);
+ void translate(qreal x, qreal y);
+ void transform(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy);
+ void setTransform(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy);
+
+ CanvasGradient createLinearGradient(qreal x0, qreal y0,
+ qreal x1, qreal y1);
+ CanvasGradient createRadialGradient(qreal x0, qreal y0,
+ qreal r0, qreal x1,
+ qreal y1, qreal r1);
+
+ // rects
+ void clearRect(qreal x, qreal y, qreal w, qreal h);
+ void fillRect(qreal x, qreal y, qreal w, qreal h);
+ void strokeRect(qreal x, qreal y, qreal w, qreal h);
+
+ // path API
+ void beginPath();
+ void closePath();
+ void moveTo(qreal x, qreal y);
+ void lineTo(qreal x, qreal y);
+ void quadraticCurveTo(qreal cpx, qreal cpy, qreal x, qreal y);
+ void bezierCurveTo(qreal cp1x, qreal cp1y,
+ qreal cp2x, qreal cp2y, qreal x, qreal y);
+ void arcTo(qreal x1, qreal y1, qreal x2, qreal y2, qreal radius);
+ void rect(qreal x, qreal y, qreal w, qreal h);
+ void arc(qreal x, qreal y, qreal radius,
+ qreal startAngle, qreal endAngle,
+ bool anticlockwise);
+ void fill();
+ void stroke();
+ void clip();
+ bool isPointInPath(qreal x, qreal y) const;
+//! [1]
+
+ // drawing images
+ void drawImage(DomImage *image, qreal dx, qreal dy);
+ void drawImage(DomImage *image, qreal dx, qreal dy,
+ qreal dw, qreal dh);
+ void drawImage(DomImage *image, qreal sx, qreal sy,
+ qreal sw, qreal sh, qreal dx, qreal dy,
+ qreal dw, qreal dh);
+
+ // pixel manipulation
+ ImageData getImageData(qreal sx, qreal sy, qreal sw, qreal sh);
+ void putImageData(ImageData image, qreal dx, qreal dy);
+
+//! [2]
+signals:
+ void changed(const QImage &image);
+//! [2]
+
+protected:
+ void timerEvent(QTimerEvent *e);
+
+private:
+ void beginPainting();
+ const QImage &endPainting();
+ void scheduleChange();
+
+ int m_changeTimerId;
+ QImage m_image;
+ QPainter m_painter;
+ QPainterPath m_path;
+
+ enum DirtyFlag {
+ DirtyTransformationMatrix = 0x00001,
+ DirtyClippingRegion = 0x00002,
+ DirtyStrokeStyle = 0x00004,
+ DirtyFillStyle = 0x00008,
+ DirtyGlobalAlpha = 0x00010,
+ DirtyLineWidth = 0x00020,
+ DirtyLineCap = 0x00040,
+ DirtyLineJoin = 0x00080,
+ DirtyMiterLimit = 0x00100,
+ MDirtyPen = DirtyStrokeStyle
+ | DirtyLineWidth
+ | DirtyLineCap
+ | DirtyLineJoin
+ | DirtyMiterLimit,
+ DirtyShadowOffsetX = 0x00200,
+ DirtyShadowOffsetY = 0x00400,
+ DirtyShadowBlur = 0x00800,
+ DirtyShadowColor = 0x01000,
+ DirtyGlobalCompositeOperation = 0x2000,
+ DirtyFont = 0x04000,
+ DirtyTextAlign = 0x08000,
+ DirtyTextBaseline = 0x10000,
+ AllIsFullOfDirt = 0xfffff
+ };
+
+ struct State {
+ State() : flags(0) {}
+ QMatrix matrix;
+ QPainterPath clipPath;
+ QBrush strokeStyle;
+ QBrush fillStyle;
+ qreal globalAlpha;
+ qreal lineWidth;
+ Qt::PenCapStyle lineCap;
+ Qt::PenJoinStyle lineJoin;
+ qreal miterLimit;
+ qreal shadowOffsetX;
+ qreal shadowOffsetY;
+ qreal shadowBlur;
+ QColor shadowColor;
+ QPainter::CompositionMode globalCompositeOperation;
+ QFont font;
+ int textAlign;
+ int textBaseline;
+ int flags;
+ };
+ State m_state;
+ QStack<State> m_stateStack;
+};
+
+#endif
diff --git a/examples/script/context2d/context2d.pro b/examples/script/context2d/context2d.pro
new file mode 100644
index 0000000..30ec9a7
--- /dev/null
+++ b/examples/script/context2d/context2d.pro
@@ -0,0 +1,23 @@
+TEMPLATE = app
+QT += script
+# Input
+HEADERS += qcontext2dcanvas.h \
+ context2d.h \
+ domimage.h \
+ environment.h \
+ window.h
+SOURCES += qcontext2dcanvas.cpp \
+ context2d.cpp \
+ domimage.cpp \
+ environment.cpp \
+ window.cpp \
+ main.cpp
+RESOURCES += context2d.qrc
+
+contains(QT_CONFIG, scripttools): QT += scripttools
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/context2d
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS context2d.pro scripts
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/context2d
+INSTALLS += target sources
diff --git a/examples/script/context2d/context2d.qrc b/examples/script/context2d/context2d.qrc
new file mode 100644
index 0000000..75e570c
--- /dev/null
+++ b/examples/script/context2d/context2d.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>scripts</file>
+</qresource>
+</RCC>
diff --git a/examples/script/context2d/domimage.cpp b/examples/script/context2d/domimage.cpp
new file mode 100644
index 0000000..66a2c95
--- /dev/null
+++ b/examples/script/context2d/domimage.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "domimage.h"
+
+#include <QVariant>
+
+#include <qscriptcontext.h>
+
+QScriptValue DomImage::s_self;
+
+DomImage::DomImage()
+{
+}
+
+
+int DomImage::width() const
+{
+ return m_image.width();
+}
+
+
+int DomImage::height() const
+{
+ return m_image.height();
+}
+
+
+QString DomImage::src() const
+{
+ return m_src;
+}
+
+void DomImage::setSrc(const QString &src)
+{
+ m_src = src;
+ m_image = QImage(m_src);
+}
+
+
+QString DomImage::name() const
+{
+ return m_src;
+}
+
+static QScriptValue Image(QScriptContext *context, QScriptEngine *env)
+{
+ QScriptValue val = context->thisObject();
+ DomImage *image = new DomImage();
+ QScriptValue klass = env->newVariant(qVariantFromValue(image));
+ klass.setPrototype(DomImage::s_self);
+ return klass;
+}
+
+
+static QScriptValue width(QScriptContext *context, QScriptEngine *)
+{
+ QScriptValue val = context->thisObject();
+
+ DomImage *image = qvariant_cast<DomImage*> (val.toVariant());
+ if (image)
+ return image->width();
+
+ return 0;
+}
+
+
+static QScriptValue height(QScriptContext *context, QScriptEngine *)
+{
+ QScriptValue val = context->thisObject();
+
+ DomImage *image = qvariant_cast<DomImage*> (val.toVariant());
+ if (image)
+ return image->height();
+
+ return 0;
+}
+
+
+static QScriptValue setSrc(QScriptContext *context, QScriptEngine *env)
+{
+ QScriptValue val = context->thisObject();
+ QString src = context->argument(0).toString();
+
+ DomImage *image = qvariant_cast<DomImage*> (val.toVariant());
+ if (image)
+ image->setSrc(src);
+
+ return env->undefinedValue();
+}
+
+
+static QScriptValue name(QScriptContext *context, QScriptEngine *)
+{
+ QScriptValue val = context->thisObject();
+
+ DomImage *image = qvariant_cast<DomImage*> (val.toVariant());
+ if (image)
+ return image->name();
+
+ return QString();
+}
+
+
+void DomImage::setup(QScriptEngine *e)
+{
+ qRegisterMetaType<DomImage>();
+
+ e->globalObject().setProperty("Image",
+ e->newFunction(::Image, 0));
+
+ s_self = e->newObject();
+ s_self.setProperty("setSrc", e->newFunction(&::setSrc, 1));
+ s_self.setProperty("width", e->newFunction(&::width));
+ s_self.setProperty("height", e->newFunction(&::height));
+ s_self.setProperty("name", e->newFunction(&::name));
+
+ e->setDefaultPrototype(qMetaTypeId<DomImage>(), s_self);
+}
diff --git a/examples/script/context2d/domimage.h b/examples/script/context2d/domimage.h
new file mode 100644
index 0000000..0793d1d
--- /dev/null
+++ b/examples/script/context2d/domimage.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DOMIMAGE_H
+#define DOMIMAGE_H
+
+#include <QPixmap>
+#include <QImage>
+#include <QMetaType>
+
+#include <qscriptengine.h>
+
+class DomImage
+{
+public:
+ DomImage();
+ static void setup(QScriptEngine *e);
+
+ int width() const;
+ int height() const;
+
+ QString src() const;
+ void setSrc(const QString &src);
+
+ QString name() const;
+
+ static QScriptValue s_self;
+
+ const QImage &image() const
+ {
+ return m_image;
+ }
+private:
+ QImage m_image;
+ QString m_src;
+ //attribute boolean isMap;
+ //attribute DOMString longDesc;
+ //attribute DOMString useMap;
+ //attribute DOMString align;
+ //attribute DOMString alt;
+ //attribute DOMString border;
+ //attribute long vspace;
+ //attribute long hspace;
+};
+
+Q_DECLARE_METATYPE(DomImage)
+Q_DECLARE_METATYPE(DomImage*)
+
+#endif
diff --git a/examples/script/context2d/environment.cpp b/examples/script/context2d/environment.cpp
new file mode 100644
index 0000000..1c1a3a6
--- /dev/null
+++ b/examples/script/context2d/environment.cpp
@@ -0,0 +1,561 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "environment.h"
+#include "qcontext2dcanvas.h"
+#include "context2d.h"
+#include <QScriptValueIterator>
+#include <QDateTime>
+
+struct FakeDomEvent
+{
+ enum KeyCodes {
+ DOM_VK_UNDEFINED = 0x0,
+ DOM_VK_RIGHT_ALT = 0x12,
+ DOM_VK_LEFT_ALT = 0x12,
+ DOM_VK_LEFT_CONTROL = 0x11,
+ DOM_VK_RIGHT_CONTROL = 0x11,
+ DOM_VK_LEFT_SHIFT = 0x10,
+ DOM_VK_RIGHT_SHIFT = 0x10,
+ DOM_VK_META = 0x9D,
+ DOM_VK_BACK_SPACE = 0x08,
+ DOM_VK_CAPS_LOCK = 0x14,
+ DOM_VK_DELETE = 0x7F,
+ DOM_VK_END = 0x23,
+ DOM_VK_ENTER = 0x0D,
+ DOM_VK_ESCAPE = 0x1B,
+ DOM_VK_HOME = 0x24,
+ DOM_VK_NUM_LOCK = 0x90,
+ DOM_VK_PAUSE = 0x13,
+ DOM_VK_PRINTSCREEN = 0x9A,
+ DOM_VK_SCROLL_LOCK = 0x91,
+ DOM_VK_SPACE = 0x20,
+ DOM_VK_TAB = 0x09,
+ DOM_VK_LEFT = 0x25,
+ DOM_VK_RIGHT = 0x27,
+ DOM_VK_UP = 0x26,
+ DOM_VK_DOWN = 0x28,
+ DOM_VK_PAGE_DOWN = 0x22,
+ DOM_VK_PAGE_UP = 0x21,
+ DOM_VK_F1 = 0x70,
+ DOM_VK_F2 = 0x71,
+ DOM_VK_F3 = 0x72,
+ DOM_VK_F4 = 0x73,
+ DOM_VK_F5 = 0x74,
+ DOM_VK_F6 = 0x75,
+ DOM_VK_F7 = 0x76,
+ DOM_VK_F8 = 0x77,
+ DOM_VK_F9 = 0x78,
+ DOM_VK_F10 = 0x79,
+ DOM_VK_F11 = 0x7A,
+ DOM_VK_F12 = 0x7B,
+ DOM_VK_F13 = 0xF000,
+ DOM_VK_F14 = 0xF001,
+ DOM_VK_F15 = 0xF002,
+ DOM_VK_F16 = 0xF003,
+ DOM_VK_F17 = 0xF004,
+ DOM_VK_F18 = 0xF005,
+ DOM_VK_F19 = 0xF006,
+ DOM_VK_F20 = 0xF007,
+ DOM_VK_F21 = 0xF008,
+ DOM_VK_F22 = 0xF009,
+ DOM_VK_F23 = 0xF00A,
+ DOM_VK_F24 = 0xF00B
+ };
+
+ static int qtToDomKey(int keyCode);
+};
+
+int FakeDomEvent::qtToDomKey(int keyCode)
+{
+ switch (keyCode) {
+ case Qt::Key_Backspace:
+ return DOM_VK_BACK_SPACE;
+ case Qt::Key_Enter:
+ return DOM_VK_ENTER;
+ case Qt::Key_Return:
+ return DOM_VK_ENTER;
+ case Qt::Key_NumLock:
+ return DOM_VK_NUM_LOCK;
+ case Qt::Key_Alt:
+ return DOM_VK_RIGHT_ALT;
+ case Qt::Key_Control:
+ return DOM_VK_LEFT_CONTROL;
+ case Qt::Key_Shift:
+ return DOM_VK_LEFT_SHIFT;
+ case Qt::Key_Meta:
+ return DOM_VK_META;
+ case Qt::Key_CapsLock:
+ return DOM_VK_CAPS_LOCK;
+ case Qt::Key_Delete:
+ return DOM_VK_DELETE;
+ case Qt::Key_End:
+ return DOM_VK_END;
+ case Qt::Key_Escape:
+ return DOM_VK_ESCAPE;
+ case Qt::Key_Home:
+ return DOM_VK_HOME;
+ case Qt::Key_Pause:
+ return DOM_VK_PAUSE;
+ case Qt::Key_Print:
+ return DOM_VK_PRINTSCREEN;
+ case Qt::Key_ScrollLock:
+ return DOM_VK_SCROLL_LOCK;
+ case Qt::Key_Left:
+ return DOM_VK_LEFT;
+ case Qt::Key_Right:
+ return DOM_VK_RIGHT;
+ case Qt::Key_Up:
+ return DOM_VK_UP;
+ case Qt::Key_Down:
+ return DOM_VK_DOWN;
+ case Qt::Key_PageDown:
+ return DOM_VK_PAGE_DOWN;
+ case Qt::Key_PageUp:
+ return DOM_VK_PAGE_UP;
+ case Qt::Key_F1:
+ return DOM_VK_F1;
+ case Qt::Key_F2:
+ return DOM_VK_F2;
+ case Qt::Key_F3:
+ return DOM_VK_F3;
+ case Qt::Key_F4:
+ return DOM_VK_F4;
+ case Qt::Key_F5:
+ return DOM_VK_F5;
+ case Qt::Key_F6:
+ return DOM_VK_F6;
+ case Qt::Key_F7:
+ return DOM_VK_F7;
+ case Qt::Key_F8:
+ return DOM_VK_F8;
+ case Qt::Key_F9:
+ return DOM_VK_F9;
+ case Qt::Key_F10:
+ return DOM_VK_F10;
+ case Qt::Key_F11:
+ return DOM_VK_F11;
+ case Qt::Key_F12:
+ return DOM_VK_F12;
+ case Qt::Key_F13:
+ return DOM_VK_F13;
+ case Qt::Key_F14:
+ return DOM_VK_F14;
+ case Qt::Key_F15:
+ return DOM_VK_F15;
+ case Qt::Key_F16:
+ return DOM_VK_F16;
+ case Qt::Key_F17:
+ return DOM_VK_F17;
+ case Qt::Key_F18:
+ return DOM_VK_F18;
+ case Qt::Key_F19:
+ return DOM_VK_F19;
+ case Qt::Key_F20:
+ return DOM_VK_F20;
+ case Qt::Key_F21:
+ return DOM_VK_F21;
+ case Qt::Key_F22:
+ return DOM_VK_F22;
+ case Qt::Key_F23:
+ return DOM_VK_F23;
+ case Qt::Key_F24:
+ return DOM_VK_F24;
+ }
+ return keyCode;
+}
+
+//! [0]
+Environment::Environment(QObject *parent)
+ : QObject(parent)
+{
+ m_engine = new QScriptEngine(this);
+
+ m_document = m_engine->newQObject(
+ new Document(this), QScriptEngine::QtOwnership,
+ QScriptEngine::ExcludeSuperClassContents);
+
+ CanvasGradientPrototype::setup(m_engine);
+
+ m_originalGlobalObject = m_engine->globalObject();
+ reset();
+}
+//! [0]
+
+Environment::~Environment()
+{
+}
+
+QScriptEngine *Environment::engine() const
+{
+ return m_engine;
+}
+
+QScriptValue Environment::document() const
+{
+ return m_document;
+}
+
+int Environment::setTimeout(const QScriptValue &expression, int delay)
+{
+ if (expression.isString() || expression.isFunction()) {
+ int timerId = startTimer(delay);
+ m_timeoutHash.insert(timerId, expression);
+ return timerId;
+ }
+ return -1;
+}
+
+void Environment::clearTimeout(int timerId)
+{
+ killTimer(timerId);
+ m_timeoutHash.remove(timerId);
+}
+
+//! [1]
+int Environment::setInterval(const QScriptValue &expression, int delay)
+{
+ if (expression.isString() || expression.isFunction()) {
+ int timerId = startTimer(delay);
+ m_intervalHash.insert(timerId, expression);
+ return timerId;
+ }
+ return -1;
+}
+
+void Environment::clearInterval(int timerId)
+{
+ killTimer(timerId);
+ m_intervalHash.remove(timerId);
+}
+
+void Environment::timerEvent(QTimerEvent *event)
+{
+ int id = event->timerId();
+ QScriptValue expression = m_intervalHash.value(id);
+ if (!expression.isValid()) {
+ expression = m_timeoutHash.value(id);
+ if (expression.isValid())
+ killTimer(id);
+ }
+ if (expression.isString()) {
+ evaluate(expression.toString());
+ } else if (expression.isFunction()) {
+ expression.call();
+ }
+ maybeEmitScriptError();
+}
+//! [1]
+
+//! [5]
+void Environment::addCanvas(QContext2DCanvas *canvas)
+{
+ m_canvases.append(canvas);
+}
+
+QContext2DCanvas *Environment::canvasByName(const QString &name) const
+{
+ for (int i = 0; i < m_canvases.size(); ++i) {
+ QContext2DCanvas *canvas = m_canvases.at(i);
+ if (canvas->objectName() == name)
+ return canvas;
+ }
+ return 0;
+}
+//! [5]
+
+QList<QContext2DCanvas*> Environment::canvases() const
+{
+ return m_canvases;
+}
+
+void Environment::reset()
+{
+ if (m_engine->isEvaluating())
+ m_engine->abortEvaluation();
+
+ {
+ QHash<int, QScriptValue>::const_iterator it;
+ for (it = m_intervalHash.constBegin(); it != m_intervalHash.constEnd(); ++it)
+ killTimer(it.key());
+ m_intervalHash.clear();
+ for (it = m_timeoutHash.constBegin(); it != m_timeoutHash.constEnd(); ++it)
+ killTimer(it.key());
+ m_timeoutHash.clear();
+ }
+
+ for (int i = 0; i < m_canvases.size(); ++i)
+ m_canvases.at(i)->reset();
+
+ QScriptValue self = m_engine->newQObject(
+ this, QScriptEngine::QtOwnership,
+ QScriptEngine::ExcludeSuperClassContents);
+
+ {
+ QScriptValueIterator it(m_originalGlobalObject);
+ while (it.hasNext()) {
+ it.next();
+ self.setProperty(it.scriptName(), it.value(), it.flags());
+ }
+ }
+
+ self.setProperty("self", self);
+ self.setProperty("window", self);
+
+ QScriptValue navigator = m_engine->newObject();
+ navigator.setProperty("appCodeName", "context2d");
+ navigator.setProperty("appMinorVersion", 1);
+ navigator.setProperty("appVersion", 1);
+ navigator.setProperty("browserLanguage", "en_US");
+ navigator.setProperty("cookieEnabled", false);
+ navigator.setProperty("cpuClass", "i686");
+ navigator.setProperty("onLine", false);
+ navigator.setProperty("platform", "bogus OS");
+ navigator.setProperty("systemLanguage", "en_US");
+ navigator.setProperty("userAgent", "Context2D/1.1");
+ navigator.setProperty("userLanguage", "en_US");
+ self.setProperty("navigator", navigator);
+
+ m_engine->setGlobalObject(self);
+
+ m_engine->collectGarbage();
+}
+
+QScriptValue Environment::evaluate(const QString &code, const QString &fileName)
+{
+ return m_engine->evaluate(code, fileName);
+}
+
+//! [2]
+QScriptValue Environment::toWrapper(QObject *object)
+{
+ return m_engine->newQObject(object, QScriptEngine::QtOwnership,
+ QScriptEngine::PreferExistingWrapperObject
+ | QScriptEngine::ExcludeSuperClassContents);
+}
+//! [2]
+
+//! [3]
+void Environment::handleEvent(QContext2DCanvas *canvas, QMouseEvent *e)
+{
+ QString type;
+ switch (e->type()) {
+ case QEvent::MouseButtonPress:
+ type = "mousedown"; break;
+ case QEvent::MouseButtonRelease:
+ type = "mouseup"; break;
+ case QEvent::MouseMove:
+ type = "mousemove"; break;
+ default: break;
+ }
+ if (type.isEmpty())
+ return;
+
+ QScriptValue handlerObject;
+ QScriptValue handler = eventHandler(canvas, type, &handlerObject);
+ if (!handler.isFunction())
+ return;
+
+ QScriptValue scriptEvent = newFakeDomEvent(type, toWrapper(canvas));
+ // MouseEvent
+ scriptEvent.setProperty("screenX", e->globalX(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("screenY", e->globalY(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("clientX", e->x(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("clientY", e->y(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("layerX", e->x(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("layerY", e->y(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("pageX", e->x(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("pageY", e->y(), QScriptValue::ReadOnly);
+ scriptEvent.setProperty("altKey", (e->modifiers() & Qt::AltModifier) != 0,
+ QScriptValue::ReadOnly);
+ scriptEvent.setProperty("ctrlKey", (e->modifiers() & Qt::ControlModifier) != 0,
+ QScriptValue::ReadOnly);
+ scriptEvent.setProperty("metaKey", (e->modifiers() & Qt::MetaModifier) != 0,
+ QScriptValue::ReadOnly);
+ scriptEvent.setProperty("shiftKey", (e->modifiers() & Qt::ShiftModifier) != 0,
+ QScriptValue::ReadOnly);
+ int button = 0;
+ if (e->button() == Qt::RightButton)
+ button = 2;
+ else if (e->button() == Qt::MidButton)
+ button = 1;
+ scriptEvent.setProperty("button", button);
+ scriptEvent.setProperty("relatedTarget", m_engine->nullValue(),
+ QScriptValue::ReadOnly);
+ handler.call(handlerObject, QScriptValueList() << scriptEvent);
+ maybeEmitScriptError();
+}
+//! [3]
+
+void Environment::handleEvent(QContext2DCanvas *canvas, QKeyEvent *e)
+{
+ QString type;
+ switch (e->type()) {
+ case QEvent::KeyPress:
+ type = "keydown"; break;
+ case QEvent::KeyRelease:
+ type = "keyup"; break;
+ default: break;
+ }
+ if (type.isEmpty())
+ return;
+
+ QScriptValue handlerObject;
+ QScriptValue handler = eventHandler(canvas, type, &handlerObject);
+ if (!handler.isFunction())
+ return;
+
+ QScriptValue scriptEvent = newFakeDomEvent(type, toWrapper(canvas));
+ // KeyEvent
+ scriptEvent.setProperty("isChar", !e->text().isEmpty());
+ scriptEvent.setProperty("charCode", e->text());
+ scriptEvent.setProperty("keyCode", FakeDomEvent::qtToDomKey(e->key()));
+ scriptEvent.setProperty("which", e->key());
+
+ handler.call(handlerObject, QScriptValueList() << scriptEvent);
+ maybeEmitScriptError();
+}
+
+QScriptValue Environment::eventHandler(QContext2DCanvas *canvas, const QString &type,
+ QScriptValue *who)
+{
+ QString handlerName = "on" + type;
+ QScriptValue obj = toWrapper(canvas);
+ QScriptValue handler = obj.property(handlerName);
+ if (!handler.isValid()) {
+ obj = m_document;
+ handler = obj.property(handlerName);
+ }
+ if (who && handler.isFunction())
+ *who = obj;
+ return handler;
+}
+
+//! [4]
+QScriptValue Environment::newFakeDomEvent(const QString &type, const QScriptValue &target)
+{
+ QScriptValue e = m_engine->newObject();
+ // Event
+ e.setProperty("type", type, QScriptValue::ReadOnly);
+ e.setProperty("bubbles", true, QScriptValue::ReadOnly);
+ e.setProperty("cancelable", false, QScriptValue::ReadOnly);
+ e.setProperty("target", target, QScriptValue::ReadOnly);
+ e.setProperty("currentTarget", target, QScriptValue::ReadOnly);
+ e.setProperty("eventPhase", 3); // bubbling
+ e.setProperty("timeStamp", QDateTime::currentDateTime().toTime_t());
+ // UIEvent
+ e.setProperty("detail", 0, QScriptValue::ReadOnly);
+ e.setProperty("view", m_engine->globalObject(), QScriptValue::ReadOnly);
+ return e;
+}
+//! [4]
+
+void Environment::maybeEmitScriptError()
+{
+ if (m_engine->hasUncaughtException())
+ emit scriptError(m_engine->uncaughtException());
+}
+
+
+Document::Document(Environment *env)
+ : QObject(env)
+{
+}
+
+Document::~Document()
+{
+}
+
+QScriptValue Document::getElementById(const QString &id) const
+{
+ Environment *env = qobject_cast<Environment*>(parent());
+ QContext2DCanvas *canvas = env->canvasByName(id);
+ if (!canvas)
+ return QScriptValue();
+ return env->toWrapper(canvas);
+}
+
+QScriptValue Document::getElementsByTagName(const QString &name) const
+{
+ if (name != "canvas")
+ return QScriptValue();
+ Environment *env = qobject_cast<Environment*>(parent());
+ QList<QContext2DCanvas*> list = env->canvases();
+ QScriptValue result = env->engine()->newArray(list.size());
+ for (int i = 0; i < list.size(); ++i)
+ result.setProperty(i, env->toWrapper(list.at(i)));
+ return result;
+}
+
+void Document::addEventListener(const QString &type, const QScriptValue &listener,
+ bool useCapture)
+{
+ Q_UNUSED(useCapture);
+ if (listener.isFunction()) {
+ Environment *env = qobject_cast<Environment*>(parent());
+ QScriptValue self = env->toWrapper(this);
+ self.setProperty("on" + type, listener);
+ }
+}
+
+
+QColor colorFromString(const QString &name);
+
+CanvasGradientPrototype::CanvasGradientPrototype(QObject *parent)
+ : QObject(parent)
+{
+}
+
+void CanvasGradientPrototype::addColorStop(qreal offset, const QString &color)
+{
+ CanvasGradient *self = qscriptvalue_cast<CanvasGradient*>(thisObject());
+ if (!self || (self->value.type() == QGradient::NoGradient))
+ return;
+ self->value.setColorAt(offset, colorFromString(color));
+}
+
+void CanvasGradientPrototype::setup(QScriptEngine *engine)
+{
+ CanvasGradientPrototype *proto = new CanvasGradientPrototype();
+ engine->setDefaultPrototype(qMetaTypeId<CanvasGradient>(),
+ engine->newQObject(proto, QScriptEngine::ScriptOwnership,
+ QScriptEngine::ExcludeSuperClassContents));
+}
diff --git a/examples/script/context2d/environment.h b/examples/script/context2d/environment.h
new file mode 100644
index 0000000..e47e6cb
--- /dev/null
+++ b/examples/script/context2d/environment.h
@@ -0,0 +1,145 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ENVIRONMENT_H
+#define ENVIRONMENT_H
+
+#include <qobject.h>
+#include <qlist.h>
+#include <qhash.h>
+#include <QTimerEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QScriptEngine>
+#include <QScriptable>
+class QContext2DCanvas;
+
+//! [0]
+class Environment : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QScriptValue document READ document)
+public:
+ Environment(QObject *parent = 0);
+ ~Environment();
+
+ QScriptValue document() const;
+
+ void addCanvas(QContext2DCanvas *canvas);
+ QContext2DCanvas *canvasByName(const QString &name) const;
+ QList<QContext2DCanvas*> canvases() const;
+
+ QScriptValue evaluate(const QString &code,
+ const QString &fileName = QString());
+
+ QScriptValue toWrapper(QObject *object);
+
+ void handleEvent(QContext2DCanvas *canvas, QMouseEvent *e);
+ void handleEvent(QContext2DCanvas *canvas, QKeyEvent *e);
+
+ void reset();
+//! [0]
+
+ QScriptEngine *engine() const;
+
+//! [1]
+public slots:
+ int setInterval(const QScriptValue &expression, int delay);
+ void clearInterval(int timerId);
+
+ int setTimeout(const QScriptValue &expression, int delay);
+ void clearTimeout(int timerId);
+//! [1]
+
+//! [2]
+signals:
+ void scriptError(const QScriptValue &error);
+//! [2]
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private:
+ QScriptValue eventHandler(QContext2DCanvas *canvas,
+ const QString &type, QScriptValue *who);
+ QScriptValue newFakeDomEvent(const QString &type,
+ const QScriptValue &target);
+ void maybeEmitScriptError();
+
+ QScriptEngine *m_engine;
+ QScriptValue m_originalGlobalObject;
+ QScriptValue m_document;
+ QList<QContext2DCanvas*> m_canvases;
+ QHash<int, QScriptValue> m_intervalHash;
+ QHash<int, QScriptValue> m_timeoutHash;
+};
+
+//! [3]
+class Document : public QObject
+{
+ Q_OBJECT
+public:
+ Document(Environment *env);
+ ~Document();
+
+public slots:
+ QScriptValue getElementById(const QString &id) const;
+ QScriptValue getElementsByTagName(const QString &name) const;
+
+ // EventTarget
+ void addEventListener(const QString &type, const QScriptValue &listener,
+ bool useCapture);
+};
+//! [3]
+
+class CanvasGradientPrototype : public QObject, public QScriptable
+{
+ Q_OBJECT
+protected:
+ CanvasGradientPrototype(QObject *parent = 0);
+public:
+ static void setup(QScriptEngine *engine);
+
+public slots:
+ void addColorStop(qreal offset, const QString &color);
+};
+
+#endif
diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp
new file mode 100644
index 0000000..78c9df9
--- /dev/null
+++ b/examples/script/context2d/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(context2d);
+
+ QApplication app(argc, argv);
+ Window win;
+ win.show();
+ return app.exec();
+}
diff --git a/examples/script/context2d/qcontext2dcanvas.cpp b/examples/script/context2d/qcontext2dcanvas.cpp
new file mode 100644
index 0000000..30bb3eb
--- /dev/null
+++ b/examples/script/context2d/qcontext2dcanvas.cpp
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcontext2dcanvas.h"
+
+#include "context2d.h"
+#include "environment.h"
+#include "domimage.h"
+
+#include <QPainter>
+#include <QPaintEvent>
+
+//! [3]
+QContext2DCanvas::QContext2DCanvas(Context2D *context, Environment *env, QWidget *parent)
+ : QWidget(parent), m_context(context), m_env(env)
+{
+ QObject::connect(context, SIGNAL(changed(QImage)), this, SLOT(contentsChanged(QImage)));
+ setMouseTracking(true);
+}
+//! [3]
+
+QContext2DCanvas::~QContext2DCanvas()
+{
+}
+
+Context2D *QContext2DCanvas::context() const
+{
+ return m_context;
+}
+
+//! [0]
+QScriptValue QContext2DCanvas::getContext(const QString &str)
+{
+ if (str != "2d")
+ return QScriptValue();
+ return m_env->toWrapper(m_context);
+}
+//! [0]
+
+//! [1]
+void QContext2DCanvas::contentsChanged(const QImage &image)
+{
+ m_image = image;
+ update();
+}
+
+void QContext2DCanvas::paintEvent(QPaintEvent *e)
+{
+ QPainter p(this);
+ p.setClipRect(e->rect());
+ p.drawImage(0, 0, m_image);
+}
+//! [1]
+
+//! [2]
+void QContext2DCanvas::mouseMoveEvent(QMouseEvent *e)
+{
+ m_env->handleEvent(this, e);
+}
+
+void QContext2DCanvas::mousePressEvent(QMouseEvent *e)
+{
+ m_env->handleEvent(this, e);
+}
+
+void QContext2DCanvas::mouseReleaseEvent(QMouseEvent *e)
+{
+ m_env->handleEvent(this, e);
+}
+
+void QContext2DCanvas::keyPressEvent(QKeyEvent *e)
+{
+ m_env->handleEvent(this, e);
+}
+
+void QContext2DCanvas::keyReleaseEvent(QKeyEvent *e)
+{
+ m_env->handleEvent(this, e);
+}
+//! [2]
+
+void QContext2DCanvas::resizeEvent(QResizeEvent *e)
+{
+ m_context->setSize(e->size().width(), e->size().height());
+}
+
+void QContext2DCanvas::resize(int width, int height)
+{
+ QWidget::resize(width, height);
+}
+
+void QContext2DCanvas::reset()
+{
+ m_context->reset();
+}
+
+void QContext2DCanvas::addEventListener(const QString &type, const QScriptValue &listener,
+ bool useCapture)
+{
+ Q_UNUSED(useCapture);
+ if (listener.isFunction()) {
+ QScriptValue self = m_env->toWrapper(this);
+ self.setProperty("on" + type, listener);
+ }
+}
diff --git a/examples/script/context2d/qcontext2dcanvas.h b/examples/script/context2d/qcontext2dcanvas.h
new file mode 100644
index 0000000..657ffc3
--- /dev/null
+++ b/examples/script/context2d/qcontext2dcanvas.h
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCONTEXT2DCANVAS_H
+#define QCONTEXT2DCANVAS_H
+
+#include <qscriptengine.h>
+#include <qscriptcontext.h>
+#include <qscriptvalue.h>
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+class QResizeEvent;
+class QMouseEvent;
+class QKeyEvent;
+QT_END_NAMESPACE
+class Environment;
+class Context2D;
+
+//! [0]
+class QContext2DCanvas : public QWidget
+{
+ Q_OBJECT
+public:
+ QContext2DCanvas(Context2D *context, Environment *env, QWidget *parent = 0);
+ ~QContext2DCanvas();
+
+ Context2D *context() const;
+ void reset();
+
+public slots:
+ QScriptValue getContext(const QString &str);
+ void resize(int width, int height);
+
+ // EventTarget
+ void addEventListener(const QString &type, const QScriptValue &listener,
+ bool useCapture);
+
+protected:
+ virtual void paintEvent(QPaintEvent *e);
+ virtual void mouseMoveEvent(QMouseEvent *e);
+ virtual void mousePressEvent(QMouseEvent *e);
+ virtual void mouseReleaseEvent(QMouseEvent *e);
+ virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyReleaseEvent(QKeyEvent *e);
+ virtual void resizeEvent(QResizeEvent *e);
+
+private slots:
+ void contentsChanged(const QImage &image);
+//! [0]
+
+private:
+ Context2D *m_context;
+ Environment *m_env;
+ QImage m_image;
+};
+
+#endif
diff --git a/examples/script/context2d/scripts/alpha.js b/examples/script/context2d/scripts/alpha.js
new file mode 100644
index 0000000..23fa5d4
--- /dev/null
+++ b/examples/script/context2d/scripts/alpha.js
@@ -0,0 +1,21 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ // draw background
+ ctx.fillStyle = '#FD0';
+ ctx.fillRect(0,0,75,75);
+ ctx.fillStyle = '#6C0';
+ ctx.fillRect(75,0,75,75);
+ ctx.fillStyle = '#09F';
+ ctx.fillRect(0,75,75,75);
+ ctx.fillStyle = '#F30';
+ ctx.fillRect(75,75,75,75);
+ ctx.fillStyle = '#FFF';
+
+ // set transparency value
+ ctx.globalAlpha = 0.2;
+
+ // Draw semi transparent circles
+ for (i=0;i<7;i++){
+ ctx.beginPath();
+ ctx.arc(75,75,10+10*i,0,Math.PI*2,true);
+ ctx.fill();
+ }
diff --git a/examples/script/context2d/scripts/arc.js b/examples/script/context2d/scripts/arc.js
new file mode 100644
index 0000000..650bcda
--- /dev/null
+++ b/examples/script/context2d/scripts/arc.js
@@ -0,0 +1,30 @@
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Draw shapes
+ for (i=0;i<4;i++){
+ for(j=0;j<3;j++){
+ ctx.beginPath();
+ var x = 25+j*50; // x coordinate
+ var y = 25+i*50; // y coordinate
+ var radius = 20; // Arc radius
+ var startAngle = 0; // Starting point on circle
+ var endAngle = Math.PI+(Math.PI*j)/2; // End point on circle
+ var clockwise = i%2==0 ? false : true; // clockwise or anticlockwise
+
+ ctx.arc(x,y,radius,startAngle,endAngle, clockwise);
+
+ if (i>1){
+ ctx.fill();
+ } else {
+ ctx.stroke();
+ }
+ }
+ }
+
+ }
diff --git a/examples/script/context2d/scripts/bezier.js b/examples/script/context2d/scripts/bezier.js
new file mode 100644
index 0000000..719800e
--- /dev/null
+++ b/examples/script/context2d/scripts/bezier.js
@@ -0,0 +1,26 @@
+function drawShape() {
+// get the canvas element using the DOM
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Draw shapes
+
+ ctx.beginPath();
+ ctx.moveTo(75,40);
+ ctx.bezierCurveTo(75,37,70,25,50,25);
+ ctx.bezierCurveTo(20,25,20,62.5,20,62.5);
+ ctx.bezierCurveTo(20,80,40,102,75,120);
+ ctx.bezierCurveTo(110,102,130,80,130,62.5);
+ ctx.bezierCurveTo(130,62.5,130,25,100,25);
+ ctx.bezierCurveTo(85,25,75,37,75,40);
+ ctx.fill();
+ ctx.globalAlpha = 0.5;
+ }
+}
+
+drawShape();
diff --git a/examples/script/context2d/scripts/clock.js b/examples/script/context2d/scripts/clock.js
new file mode 100644
index 0000000..ad287d8
--- /dev/null
+++ b/examples/script/context2d/scripts/clock.js
@@ -0,0 +1,99 @@
+function init(){
+ clock();
+ setInterval('clock()',1000);
+}
+function clock(){
+ var now = new Date();
+ var ctx = document.getElementById('tutorial').getContext('2d');
+ ctx.save();
+ ctx.clearRect(0,0,150,150);
+ ctx.translate(75,75);
+ ctx.scale(0.4,0.4);
+ ctx.rotate(-Math.PI/2);
+ ctx.strokeStyle = "black";
+ ctx.fillStyle = "white";
+ ctx.lineWidth = 8;
+ ctx.lineCap = "round";
+
+ // Hour marks
+ ctx.save();
+ ctx.beginPath();
+ for (i=0;i<12;i++){
+ ctx.rotate(Math.PI/6);
+ ctx.moveTo(100,0);
+ ctx.lineTo(120,0);
+ }
+ ctx.stroke();
+ ctx.restore();
+
+ // Minute marks
+ ctx.save();
+ ctx.lineWidth = 5;
+ ctx.beginPath();
+ for (i=0;i<60;i++){
+ if (i%5!=0) {
+ ctx.moveTo(117,0);
+ ctx.lineTo(120,0);
+ }
+ ctx.rotate(Math.PI/30);
+ }
+ ctx.stroke();
+ ctx.restore();
+
+ var sec = now.getSeconds();
+ var min = now.getMinutes();
+ var hr = now.getHours();
+ hr = hr>=12 ? hr-12 : hr;
+
+ ctx.fillStyle = "black";
+
+ // write Hours
+ ctx.save();
+ ctx.rotate( hr*(Math.PI/6) + (Math.PI/360)*min + (Math.PI/21600)*sec )
+ ctx.lineWidth = 14;
+ ctx.beginPath();
+ ctx.moveTo(-20,0);
+ ctx.lineTo(80,0);
+ ctx.stroke();
+ ctx.restore();
+
+ // write Minutes
+ ctx.save();
+ ctx.rotate( (Math.PI/30)*min + (Math.PI/1800)*sec )
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(-28,0);
+ ctx.lineTo(112,0);
+ ctx.stroke();
+ ctx.restore();
+
+ // Write seconds
+ ctx.save();
+ ctx.rotate(sec * Math.PI/30);
+ ctx.strokeStyle = "#D40000";
+ ctx.fillStyle = "#D40000";
+ ctx.lineWidth = 6;
+ ctx.beginPath();
+ ctx.moveTo(-30,0);
+ ctx.lineTo(83,0);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0,0,10,0,Math.PI*2,true);
+ ctx.fill();
+ ctx.beginPath();
+ ctx.arc(95,0,10,0,Math.PI*2,true);
+ ctx.stroke();
+ ctx.fillStyle = "#555";
+ ctx.arc(0,0,3,0,Math.PI*2,true);
+ ctx.fill();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.lineWidth = 14;
+ ctx.strokeStyle = '#325FA2';
+ ctx.arc(0,0,142,0,Math.PI*2,true);
+ ctx.stroke();
+
+ ctx.restore();
+}
+init();
diff --git a/examples/script/context2d/scripts/fill1.js b/examples/script/context2d/scripts/fill1.js
new file mode 100644
index 0000000..db5eeb7
--- /dev/null
+++ b/examples/script/context2d/scripts/fill1.js
@@ -0,0 +1,8 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ for (i=0;i<6;i++){
+ for (j=0;j<6;j++){
+ ctx.fillStyle = 'rgb(' + Math.floor(255-42.5*i) + ',' +
+ Math.floor(255-42.5*j) + ',0)';
+ ctx.fillRect(j*25,i*25,25,25);
+ }
+ }
diff --git a/examples/script/context2d/scripts/grad.js b/examples/script/context2d/scripts/grad.js
new file mode 100644
index 0000000..24ccfbb
--- /dev/null
+++ b/examples/script/context2d/scripts/grad.js
@@ -0,0 +1,20 @@
+ var ctx = document.getElementById('tutorial').getContext('2d');
+
+ // Create gradients
+ var lingrad = ctx.createLinearGradient(0,0,0,150);
+ lingrad.addColorStop(0, '#00ABEB');
+ lingrad.addColorStop(0.5, '#fff');
+ lingrad.addColorStop(0.5, '#66CC00');
+ lingrad.addColorStop(1, '#fff');
+
+ var lingrad2 = ctx.createLinearGradient(0,50,0,95);
+ lingrad2.addColorStop(0.5, '#000');
+ lingrad2.addColorStop(1, 'rgba(0,0,0,0)');
+
+ // assign gradients to fill and stroke styles
+ ctx.fillStyle = lingrad;
+ ctx.strokeStyle = lingrad2;
+
+ // draw shapes
+ ctx.fillRect(10,10,130,130);
+ ctx.strokeRect(50,50,50,50);
diff --git a/examples/script/context2d/scripts/linecap.js b/examples/script/context2d/scripts/linecap.js
new file mode 100644
index 0000000..18ceb23
--- /dev/null
+++ b/examples/script/context2d/scripts/linecap.js
@@ -0,0 +1,24 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ var lineCap = ['butt','round','square'];
+
+ // Draw guides
+ ctx.save();
+ ctx.strokeStyle = '#09f';
+ ctx.beginPath();
+ ctx.moveTo(10,10);
+ ctx.lineTo(140,10);
+ ctx.moveTo(10,140);
+ ctx.lineTo(140,140);
+ ctx.stroke();
+
+ // Draw lines
+ ctx.strokeStyle = 'black';
+ for (i=0;i<lineCap.length;i++){
+ ctx.lineWidth = 15;
+ ctx.lineCap = lineCap[i];
+ ctx.beginPath();
+ ctx.moveTo(25+i*50,10);
+ ctx.lineTo(25+i*50,140);
+ ctx.stroke();
+ }
+ ctx.restore();
diff --git a/examples/script/context2d/scripts/linestye.js b/examples/script/context2d/scripts/linestye.js
new file mode 100644
index 0000000..728e3e6
--- /dev/null
+++ b/examples/script/context2d/scripts/linestye.js
@@ -0,0 +1,10 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ctx.save();
+ for (i=0;i<10;i++){
+ ctx.lineWidth = 1+i;
+ ctx.beginPath();
+ ctx.moveTo(5+i*14,5);
+ ctx.lineTo(5+i*14,140);
+ ctx.stroke();
+ }
+ctx.restore(); \ No newline at end of file
diff --git a/examples/script/context2d/scripts/moveto.js b/examples/script/context2d/scripts/moveto.js
new file mode 100644
index 0000000..73c4e8d
--- /dev/null
+++ b/examples/script/context2d/scripts/moveto.js
@@ -0,0 +1,20 @@
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Draw shapes
+ ctx.beginPath();
+ ctx.arc(75,75,50,0,Math.PI*2,true); // Outer circle
+ ctx.moveTo(110,75);
+ ctx.arc(75,75,35,0,Math.PI,false); // Mouth
+ ctx.moveTo(65,65);
+ ctx.arc(60,65,5,0,Math.PI*2,true); // Left eye
+ ctx.moveTo(95,65);
+ ctx.arc(90,65,5,0,Math.PI*2,true); // Right eye
+ ctx.stroke();
+
+ }
diff --git a/examples/script/context2d/scripts/moveto2.js b/examples/script/context2d/scripts/moveto2.js
new file mode 100644
index 0000000..021f47b
--- /dev/null
+++ b/examples/script/context2d/scripts/moveto2.js
@@ -0,0 +1,24 @@
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Filled triangle
+ ctx.beginPath();
+ ctx.moveTo(25,25);
+ ctx.lineTo(105,25);
+ ctx.lineTo(25,105);
+ ctx.fill();
+
+ // Stroked triangle
+ ctx.beginPath();
+ ctx.moveTo(125,125);
+ ctx.lineTo(125,45);
+ ctx.lineTo(45,125);
+ ctx.closePath();
+ ctx.stroke();
+
+ }
diff --git a/examples/script/context2d/scripts/pacman.js b/examples/script/context2d/scripts/pacman.js
new file mode 100644
index 0000000..af3750f
--- /dev/null
+++ b/examples/script/context2d/scripts/pacman.js
@@ -0,0 +1,83 @@
+function roundedRect(ctx,x,y,width,height,radius){
+ ctx.beginPath();
+ ctx.moveTo(x,y+radius);
+ ctx.lineTo(x,y+height-radius);
+ ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
+ ctx.lineTo(x+width-radius,y+height);
+ ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
+ ctx.lineTo(x+width,y+radius);
+ ctx.quadraticCurveTo(x+width,y,x+width-radius,y);
+ ctx.lineTo(x+radius,y);
+ ctx.quadraticCurveTo(x,y,x,y+radius);
+ ctx.stroke();
+}
+
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Draw shapes
+ roundedRect(ctx,12,12,150,150,15);
+ roundedRect(ctx,19,19,150,150,9);
+ roundedRect(ctx,53,53,49,33,10);
+ roundedRect(ctx,53,119,49,16,6);
+ roundedRect(ctx,135,53,49,33,10);
+ roundedRect(ctx,135,119,25,49,10);
+
+ // Character 1
+ ctx.beginPath();
+ ctx.arc(37,37,13,Math.PI/7,-Math.PI/7,false);
+ ctx.lineTo(34,37);
+ ctx.fill();
+
+ // blocks
+ for(i=0;i<8;i++){
+ ctx.fillRect(51+i*16,35,4,4);
+ }
+ for(i=0;i<6;i++){
+ ctx.fillRect(115,51+i*16,4,4);
+ }
+ for(i=0;i<8;i++){
+ ctx.fillRect(51+i*16,99,4,4);
+ }
+
+ // character 2
+ ctx.beginPath();
+ ctx.moveTo(83,116);
+ ctx.lineTo(83,102);
+
+ ctx.bezierCurveTo(83,94,89,88,97,88);
+ ctx.bezierCurveTo(105,88,111,94,111,102);
+ ctx.lineTo(111,116);
+ ctx.lineTo(106.333,111.333);
+ ctx.lineTo(101.666,116);
+ ctx.lineTo(97,111.333);
+ ctx.lineTo(92.333,116);
+ ctx.lineTo(87.666,111.333);
+ ctx.lineTo(83,116);
+ ctx.fill();
+ ctx.fillStyle = "white";
+ ctx.beginPath();
+ ctx.moveTo(91,96);
+ ctx.bezierCurveTo(88,96,87,99,87,101);
+ ctx.bezierCurveTo(87,103,88,106,91,106);
+ ctx.bezierCurveTo(94,106,95,103,95,101);
+ ctx.bezierCurveTo(95,99,94,96,91,96);
+ ctx.moveTo(103,96);
+ ctx.bezierCurveTo(100,96,99,99,99,101);
+ ctx.bezierCurveTo(99,103,100,106,103,106);
+ ctx.bezierCurveTo(106,106,107,103,107,101);
+ ctx.bezierCurveTo(107,99,106,96,103,96);
+ ctx.fill();
+ ctx.fillStyle = "black";
+ ctx.beginPath();
+ ctx.arc(101,102,2,0,Math.PI*2,true);
+ ctx.fill();
+ ctx.beginPath();
+ ctx.arc(89,102,2,0,Math.PI*2,true);
+ ctx.fill();
+ }
diff --git a/examples/script/context2d/scripts/plasma.js b/examples/script/context2d/scripts/plasma.js
new file mode 100644
index 0000000..1aa9294
--- /dev/null
+++ b/examples/script/context2d/scripts/plasma.js
@@ -0,0 +1,58 @@
+var counter = 0;
+
+var PIXEL_SIZE = 4;
+
+var temp_1 = 0;
+
+function init()
+{
+ setInterval('render()',50);
+}
+
+function dist(a, b, c, d)
+{
+ return Math.sqrt((a - c) * (a - c) + (b - d) * (b - d));
+}
+
+
+function render()
+{
+ var canvas = document.getElementById('tutorial');
+ canvas.resize(128, 128);
+ var ctx = canvas.getContext('2d');
+ ctx.save();
+
+ var time = counter * 5;
+
+
+ for( y = 0; y < 128; y+=PIXEL_SIZE) {
+ for( x = 0 ; x < 128; x+=PIXEL_SIZE) {
+
+
+ var temp_val = Math.floor(Math.sin(dist(x + time, y, 128.0, 128.0) / 8.0)
+ + Math.sin(dist(x, y, 64.0, 64.0) / 8.0)
+ + Math.sin(dist(x, y + time / 7, 192.0, 64) / 7.0)
+ + Math.sin(dist(x, y, 192.0, 100.0) / 8.0));
+
+
+
+
+ var temp_col = Math.floor((2 + temp_val) * 50);
+
+ var rand_red = temp_col * 3;
+ var rand_green = temp_col ;
+ var rand_blue = 128 - temp_col;
+
+ ctx.fillStyle = "rgb("+rand_red+","+rand_green+","+rand_blue+")";
+
+ ctx.fillRect(x,y,PIXEL_SIZE,PIXEL_SIZE);
+ }
+ }
+
+
+ ctx.restore();
+ counter++;
+
+}
+
+init();
diff --git a/examples/script/context2d/scripts/pong.js b/examples/script/context2d/scripts/pong.js
new file mode 100644
index 0000000..2bff053
--- /dev/null
+++ b/examples/script/context2d/scripts/pong.js
@@ -0,0 +1,235 @@
+// globals
+playarea_canvas = document.getElementById('tutorial');
+playarea_canvas.resize(320,200);
+playarea = playarea_canvas.getContext('2d');
+//p1_scr = document.getElementById('p1_scr');
+//p2_scr = document.getElementById('p2_scr');
+//status_msg = document.getElementById('status');
+//debug = document.getElementById('debug');
+ball_direction = 0;
+up = -1;
+down = 1;
+
+//key codes
+key_up = 38;
+key_down = 40;
+key_W = 87;
+key_S = 83;
+key_pause = 32;
+
+speed = 2; //controls the speed of the ball
+paddle_inc = 10; //how many pixels paddle can move in either direction
+pause = false;
+
+player_1 = 0; //player IDs
+player_2 = 1;
+player_1_scr = 0; //player scores
+player_2_scr = 0;
+player_1_direction = null; //null = no movement whatsoever
+player_2_direction = null;
+
+pa = new Array();
+divider = new Array();
+paddle_1 = new Array();
+paddle_2 = new Array();
+ball = new Array();
+
+
+function sleep(numberMillis)
+{
+ var now = new Date();
+ var exitTime = now.getTime() + numberMillis;
+ while (true) {
+ now = new Date();
+ if (now.getTime() > exitTime)
+ return;
+ }
+}
+
+function init()
+{
+ pa['width'] = 150;
+ pa['height'] = 140;
+ pa['player_margin'] = 10; //area behind player paddles
+ pa['foreground'] = "#FFFFFF";
+ pa['background'] = "#000000";
+
+ divider['pos'] = pa['width']/2;
+ divider['width'] = 4;
+
+ paddle_1['width'] = 8;
+ paddle_1['height'] = 64;
+ paddle_1['x'] = pa['player_margin'];
+ paddle_1['y'] = (pa['height'] /2 ) - (paddle_1['height'] / 2);
+
+ paddle_2['width'] = 8;
+ paddle_2['height'] = 64;
+ paddle_2['x'] = (pa['width'] - pa['player_margin'] - paddle_2['width']);
+ paddle_2['y'] = (pa['height'] /2 ) - (paddle_2['height'] / 2);
+
+ ball['width'] = 10;
+ ball['height'] = 10;
+ ball['x'] = (pa['width']/2) - (ball['width'] / 2);
+ ball['y'] = (pa['height']/2) - (ball['height'] / 2);
+
+ ball_direction = Math.random() * 360; //initialize ball direction, which is determined by angle, at random
+ speed = 2;
+}
+
+function renderPlayarea()
+{
+ playarea.beginPath();
+
+ playarea.clearRect(0,0,pa['width'],pa['height']);
+ playarea.fillStyle = pa['background'];
+ playarea.strokeStyle = pa['foreground'];
+ playarea.fillRect(0,0, pa['width'], pa['height']);
+
+ //move paddles
+ if(player_1_direction != null)
+ {
+ if(player_1_direction == up)
+ paddle_1['y'] = paddle_1['y'] - paddle_inc;
+ else
+ paddle_1['y'] = paddle_1['y'] + paddle_inc;
+ }
+ if(player_2_direction != null)
+ {
+ if(player_2_direction == up)
+ paddle_2['y'] = paddle_2['y'] - paddle_inc;
+ else
+ paddle_2['y'] = paddle_2['y'] + paddle_inc;
+ }
+ playarea.rect(paddle_1['x'],paddle_1['y'],paddle_1['width'],paddle_1['height']);
+ playarea.rect(paddle_2['x'],paddle_2['y'],paddle_2['width'],paddle_2['height']);
+
+ //move ball
+ playarea.rect(ball['x'], ball['y'], ball['width'], ball['height']);
+ ball['x'] = ball['x'] + Math.cos((ball_direction)*Math.PI/180) * speed;
+ ball['y'] = ball['y'] + Math.sin((ball_direction)*Math.PI/180) * speed;
+
+ playarea.fillStyle = pa['foreground'];
+ playarea.fill();
+
+ playarea.beginPath();
+ //redraw divider
+ playarea.lineWidth = divider['width'];
+ playarea.lineTo(divider['pos'], 0);
+ playarea.lineTo(divider['pos'], pa['height'] = 200);
+ playarea.lineWidth = 1;
+
+ playarea.stroke();
+ playarea.closePath();
+}
+
+function testCollisions()
+{
+ //make sure paddles don't go beyond play area
+ if(((paddle_1['y'] <= 0) && (player_1_direction == up)) || ((paddle_1['y'] >= (pa['height'] - paddle_1['height'])) && (player_1_direction == down)))
+ player_1_direction = null;
+ if(((paddle_2['y'] <= 0) && (player_2_direction == up)) || ((paddle_2['y'] >= (pa['height'] - paddle_2['height'])) && (player_2_direction == down)))
+ player_2_direction = null;
+
+ //check to see if ball went beyond paddles, and if so, score accordingly and reset playarea
+ if(ball['x'] <= 0)
+ {
+ setScore(player_2);
+ init()
+ sleep(1000);
+ }
+ if(ball['x'] >= (pa['width'] - ball['width']))
+ {
+ setScore(player_1);
+ init();
+ sleep(1000);
+ }
+
+ //check to see if ball hit top or bottom wall. if so, change direction
+ if((ball['y'] >= (pa['height'] - ball['height'])) || ball['y'] <= 0)
+ ball_direction = -ball_direction;
+
+ //check to see if the ball hit a paddle, and if so, change ball angle dependant on where it hit the paddle
+ if((ball['x'] <= (paddle_1['x'] + paddle_1['width'])) && (ball['y'] >= paddle_1['y']) && (ball['y'] <= (paddle_1['y'] + paddle_1['height'])))
+ {
+ ball_direction = -ball_direction/2;
+ speed += .5;
+ }
+ if(((ball['x'] + ball['width']) >= paddle_2['x']) && (ball['y'] >= paddle_2['y']) && (ball['y'] <= (paddle_2['y'] + paddle_2['height'])))
+ {
+ ball_direction = (180+ball_direction)/2;
+ speed += .5;
+ }
+}
+
+function setScore(p)
+{
+ if(p == player_1)
+ {
+ player_1_scr++;
+ //p1_scr.firstChild.nodeValue = player_1_scr;
+ }
+ if(p == player_2)
+ {
+ player_2_scr++;
+ //p2_scr.firstChild.nodeValue = player_2_scr;
+ }
+}
+
+
+//handle input
+document.onkeydown = function(ev)
+{
+ switch(ev.keyCode)
+ {
+ case key_W:
+ player_1_direction = up;
+ break;
+ case key_S:
+ player_1_direction = down;
+ break;
+ case key_up:
+ player_2_direction = up;
+ break;
+ case key_down:
+ player_2_direction = down;
+ break;
+ }
+}
+
+document.onkeyup = function(ev)
+{
+ switch(ev.keyCode)
+ {
+ case key_W:
+ case key_S:
+ player_1_direction = null;
+ break;
+ case key_up:
+ case key_down:
+ player_2_direction = null;
+ break;
+ case key_pause:
+ if(pause == false)
+ {
+ clearInterval(game);
+ //status_msg.style.visibility = "visible";
+ pause = true;
+ }
+ else
+ {
+ game = setInterval(main, 25);
+ //status_msg.style.visibility = "hidden";
+ pause = false;
+ }
+ break;
+ }
+}
+
+function main()
+{
+ testCollisions();
+ renderPlayarea();
+}
+
+init();
+game = setInterval(main, 25);
diff --git a/examples/script/context2d/scripts/quad.js b/examples/script/context2d/scripts/quad.js
new file mode 100644
index 0000000..ad3a0d5
--- /dev/null
+++ b/examples/script/context2d/scripts/quad.js
@@ -0,0 +1,21 @@
+var canvas = document.getElementById('tutorial');
+
+ // Make sure we don't execute when canvas isn't supported
+ if (canvas.getContext){
+
+ // use getContext to use the canvas for drawing
+ var ctx = canvas.getContext('2d');
+
+ // Draw shapes
+
+ ctx.beginPath();
+ ctx.moveTo(75,25);
+ ctx.quadraticCurveTo(25,25,25,62.5);
+ ctx.quadraticCurveTo(25,100,50,100);
+ ctx.quadraticCurveTo(50,120,30,125);
+ ctx.quadraticCurveTo(60,120,65,100);
+ ctx.quadraticCurveTo(125,100,125,62.5);
+ ctx.quadraticCurveTo(125,25,75,25);
+ ctx.stroke();
+
+ }
diff --git a/examples/script/context2d/scripts/rgba.js b/examples/script/context2d/scripts/rgba.js
new file mode 100644
index 0000000..a4e5e9a
--- /dev/null
+++ b/examples/script/context2d/scripts/rgba.js
@@ -0,0 +1,19 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+
+ // Draw background
+ ctx.fillStyle = 'rgb(255,221,0)';
+ ctx.fillRect(0,0,150,37.5);
+ ctx.fillStyle = 'rgb(102,204,0)';
+ ctx.fillRect(0,37.5,150,37.5);
+ ctx.fillStyle = 'rgb(0,153,255)';
+ ctx.fillRect(0,75,150,37.5);
+ ctx.fillStyle = 'rgb(255,51,0)';
+ ctx.fillRect(0,112.5,150,37.5);
+
+ // Draw semi transparent rectangles
+ for (i=0;i<10;i++){
+ ctx.fillStyle = 'rgba(255,255,255,'+(i+1)/10+')';
+ for (j=0;j<4;j++){
+ ctx.fillRect(5+i*14,5+j*37.5,14,27.5)
+ }
+ }
diff --git a/examples/script/context2d/scripts/rotate.js b/examples/script/context2d/scripts/rotate.js
new file mode 100644
index 0000000..c7ef369
--- /dev/null
+++ b/examples/script/context2d/scripts/rotate.js
@@ -0,0 +1,16 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ ctx.translate(75,75);
+
+ for (i=1;i<6;i++){ // Loop through rings (from inside to out)
+ ctx.save();
+ ctx.fillStyle = 'rgb('+(51*i)+','+(255-51*i)+',255)';
+
+ for (j=0;j<i*6;j++){ // draw individual dots
+ ctx.rotate(Math.PI*2/(i*6));
+ ctx.beginPath();
+ ctx.arc(0,i*12.5,5,0,Math.PI*2,true);
+ ctx.fill();
+ }
+
+ ctx.restore();
+ }
diff --git a/examples/script/context2d/scripts/scale.js b/examples/script/context2d/scripts/scale.js
new file mode 100644
index 0000000..75ef865
--- /dev/null
+++ b/examples/script/context2d/scripts/scale.js
@@ -0,0 +1,67 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ ctx.strokeStyle = "#fc0";
+ ctx.lineWidth = 1.5;
+ ctx.fillRect(0,0,300,300);
+
+ // Uniform scaling
+ ctx.save()
+ ctx.translate(50,50);
+ drawSpirograph(ctx,22,6,5); // no scaling
+
+ ctx.translate(100,0);
+ ctx.scale(0.75,0.75);
+ drawSpirograph(ctx,22,6,5);
+
+ ctx.translate(133.333,0);
+ ctx.scale(0.75,0.75);
+ drawSpirograph(ctx,22,6,5);
+ ctx.restore();
+
+ // Non uniform scaling (y direction)
+ ctx.strokeStyle = "#0cf";
+ ctx.save()
+ ctx.translate(50,150);
+ ctx.scale(1,0.75);
+ drawSpirograph(ctx,22,6,5);
+
+ ctx.translate(100,0);
+ ctx.scale(1,0.75);
+ drawSpirograph(ctx,22,6,5);
+
+ ctx.translate(100,0);
+ ctx.scale(1,0.75);
+ drawSpirograph(ctx,22,6,5);
+ ctx.restore();
+
+ // Non uniform scaling (x direction)
+ ctx.strokeStyle = "#cf0";
+ ctx.save()
+ ctx.translate(50,250);
+ ctx.scale(0.75,1);
+ drawSpirograph(ctx,22,6,5);
+
+ ctx.translate(133.333,0);
+ ctx.scale(0.75,1);
+ drawSpirograph(ctx,22,6,5);
+
+ ctx.translate(177.777,0);
+ ctx.scale(0.75,1);
+ drawSpirograph(ctx,22,6,5);
+ ctx.restore();
+function drawSpirograph(ctx,R,r,O){
+ var x1 = R-O;
+ var y1 = 0;
+ var i = 1;
+ ctx.beginPath();
+ ctx.moveTo(x1,y1);
+ do {
+ if (i>20000) break;
+ var x2 = (R+r)*Math.cos(i*Math.PI/72) - (r+O)*Math.cos(((R+r)/r)*(i*Math.PI/72))
+ var y2 = (R+r)*Math.sin(i*Math.PI/72) - (r+O)*Math.sin(((R+r)/r)*(i*Math.PI/72))
+ ctx.lineTo(x2,y2);
+ x1 = x2;
+ y1 = y2;
+ i++;
+ } while (x2 != R-O && y2 != 0 );
+ ctx.stroke();
+}
diff --git a/examples/script/context2d/scripts/stroke1.js b/examples/script/context2d/scripts/stroke1.js
new file mode 100644
index 0000000..0561a52
--- /dev/null
+++ b/examples/script/context2d/scripts/stroke1.js
@@ -0,0 +1,10 @@
+var ctx = document.getElementById('tutorial').getContext('2d');
+ for (i=0;i<6;i++){
+ for (j=0;j<6;j++){
+ ctx.strokeStyle = 'rgb(0,' + Math.floor(255-42.5*i) + ',' +
+ Math.floor(255-42.5*j) + ')';
+ ctx.beginPath();
+ ctx.arc(12.5+j*25,12.5+i*25,10,0,Math.PI*2,true);
+ ctx.stroke();
+ }
+ }
diff --git a/examples/script/context2d/scripts/translate.js b/examples/script/context2d/scripts/translate.js
new file mode 100644
index 0000000..7c94433
--- /dev/null
+++ b/examples/script/context2d/scripts/translate.js
@@ -0,0 +1,29 @@
+ var ctx = document.getElementById('tutorial').getContext('2d');
+ ctx.fillRect(0,0,300,300);
+ for (var i=0;i<3;i++) {
+ for (var j=0;j<3;j++) {
+ ctx.save();
+ ctx.strokeStyle = "#9CFF00";
+ ctx.translate(50+j*100,50+i*100);
+ drawSpirograph(ctx,20*(j+2)/(j+1),-8*(i+3)/(i+1),10);
+ ctx.restore();
+ }
+ }
+
+function drawSpirograph(ctx,R,r,O){
+ var x1 = R-O;
+ var y1 = 0;
+ var i = 1;
+ ctx.beginPath();
+ ctx.moveTo(x1,y1);
+ do {
+ if (i>20000) break;
+ var x2 = (R+r)*Math.cos(i*Math.PI/72) - (r+O)*Math.cos(((R+r)/r)*(i*Math.PI/72))
+ var y2 = (R+r)*Math.sin(i*Math.PI/72) - (r+O)*Math.sin(((R+r)/r)*(i*Math.PI/72))
+ ctx.lineTo(x2,y2);
+ x1 = x2;
+ y1 = y2;
+ i++;
+ } while (x2 != R-O && y2 != 0 );
+ ctx.stroke();
+}
diff --git a/examples/script/context2d/window.cpp b/examples/script/context2d/window.cpp
new file mode 100644
index 0000000..a93bf30
--- /dev/null
+++ b/examples/script/context2d/window.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+#include "environment.h"
+#include "context2d.h"
+#include "qcontext2dcanvas.h"
+#include <QHBoxLayout>
+#include <QListWidget>
+#include <QDir>
+#include <QMessageBox>
+
+#ifndef QT_NO_SCRIPTTOOLS
+#include <QAction>
+#include <QApplication>
+#include <QMainWindow>
+#include <QPushButton>
+#include <QVBoxLayout>
+#include <QScriptEngineDebugger>
+#endif
+
+static QString scriptsDir()
+{
+ if (QFile::exists("./scripts"))
+ return "./scripts";
+ return ":/scripts";
+}
+
+//! [0]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ m_env = new Environment(this);
+ QObject::connect(m_env, SIGNAL(scriptError(QScriptValue)),
+ this, SLOT(reportScriptError(QScriptValue)));
+
+ Context2D *context = new Context2D(this);
+ context->setSize(150, 150);
+ m_canvas = new QContext2DCanvas(context, m_env, this);
+ m_canvas->setFixedSize(context->size());
+ m_canvas->setObjectName("tutorial");
+ m_env->addCanvas(m_canvas);
+//! [0]
+
+#ifndef QT_NO_SCRIPTTOOLS
+ QVBoxLayout *vbox = new QVBoxLayout();
+ vbox->addWidget(m_canvas);
+ m_debugButton = new QPushButton(tr("Run in Debugger"));
+ connect(m_debugButton, SIGNAL(clicked()), this, SLOT(runInDebugger()));
+ vbox->addWidget(m_debugButton);
+#endif
+
+ QHBoxLayout *hbox = new QHBoxLayout(this);
+ m_view = new QListWidget(this);
+ m_view->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ hbox->addWidget(m_view);
+#ifndef QT_NO_SCRIPTTOOLS
+ hbox->addLayout(vbox);
+#else
+ hbox->addWidget(m_canvas);
+#endif
+
+//! [1]
+ QDir dir(scriptsDir());
+ QFileInfoList entries = dir.entryInfoList(QStringList() << "*.js");
+ for (int i = 0; i < entries.size(); ++i)
+ m_view->addItem(entries.at(i).fileName());
+ connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
+ this, SLOT(selectScript(QListWidgetItem*)));
+//! [1]
+
+#ifndef QT_NO_SCRIPTTOOLS
+ m_debugger = new QScriptEngineDebugger(this);
+ m_debugger->attachTo(m_env->engine());
+ m_debugWindow = m_debugger->standardWindow();
+ m_debugWindow->setWindowModality(Qt::ApplicationModal);
+ m_debugWindow->resize(1280, 704);
+#endif
+
+ setWindowTitle(tr("Context 2D"));
+}
+
+//! [2]
+void Window::selectScript(QListWidgetItem *item)
+{
+ QString fileName = item->text();
+ runScript(fileName, /*debug=*/false);
+}
+//! [2]
+
+void Window::reportScriptError(const QScriptValue &error)
+{
+ QMessageBox::warning(this, tr("Context 2D"), tr("Line %0: %1")
+ .arg(error.property("lineNumber").toInt32())
+ .arg(error.toString()));
+}
+
+#ifndef QT_NO_SCRIPTTOOLS
+//! [3]
+void Window::runInDebugger()
+{
+ QListWidgetItem *item = m_view->currentItem();
+ if (item) {
+ QString fileName = item->text();
+ runScript(fileName, /*debug=*/true);
+ }
+}
+//! [3]
+#endif
+
+//! [4]
+void Window::runScript(const QString &fileName, bool debug)
+{
+ QFile file(scriptsDir() + "/" + fileName);
+ file.open(QIODevice::ReadOnly);
+ QString contents = file.readAll();
+ file.close();
+ m_env->reset();
+
+#ifndef QT_NO_SCRIPTTOOLS
+ if (debug)
+ m_debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
+#else
+ Q_UNUSED(debug);
+#endif
+
+ QScriptValue ret = m_env->evaluate(contents, fileName);
+
+#ifndef QT_NO_SCRIPTTOOLS
+ m_debugWindow->hide();
+#endif
+
+ if (ret.isError())
+ reportScriptError(ret);
+}
+//! [4]
diff --git a/examples/script/context2d/window.h b/examples/script/context2d/window.h
new file mode 100644
index 0000000..a0aff8e
--- /dev/null
+++ b/examples/script/context2d/window.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+class Environment;
+class QContext2DCanvas;
+QT_BEGIN_NAMESPACE
+class QListWidget;
+class QListWidgetItem;
+class QMainWindow;
+class QPushButton;
+class QScriptValue;
+class QScriptEngineDebugger;
+QT_END_NAMESPACE
+
+class Window : public QWidget
+{
+ Q_OBJECT
+public:
+ Window(QWidget *parent = 0);
+private slots:
+ void selectScript(QListWidgetItem *item);
+ void reportScriptError(const QScriptValue &value);
+#ifndef QT_NO_SCRIPTTOOLS
+ void runInDebugger();
+#endif
+private:
+ void runScript(const QString &fileName, bool debug);
+
+ QListWidget *m_view;
+ Environment *m_env;
+ QContext2DCanvas *m_canvas;
+#ifndef QT_NO_SCRIPTTOOLS
+ QScriptEngineDebugger *m_debugger;
+ QPushButton *m_debugButton;
+ QMainWindow *m_debugWindow;
+#endif
+};
+
+#endif // WINDOW_H
diff --git a/examples/script/customclass/bytearrayclass.cpp b/examples/script/customclass/bytearrayclass.cpp
new file mode 100644
index 0000000..7865381
--- /dev/null
+++ b/examples/script/customclass/bytearrayclass.cpp
@@ -0,0 +1,304 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtScript/QScriptClassPropertyIterator>
+#include <QtScript/QScriptEngine>
+#include "bytearrayclass.h"
+#include "bytearrayprototype.h"
+
+#include <stdlib.h>
+
+Q_DECLARE_METATYPE(QByteArray*)
+Q_DECLARE_METATYPE(ByteArrayClass*)
+
+class ByteArrayClassPropertyIterator : public QScriptClassPropertyIterator
+{
+public:
+ ByteArrayClassPropertyIterator(const QScriptValue &object);
+ ~ByteArrayClassPropertyIterator();
+
+ bool hasNext() const;
+ void next();
+
+ bool hasPrevious() const;
+ void previous();
+
+ void toFront();
+ void toBack();
+
+ QScriptString name() const;
+ uint id() const;
+
+private:
+ int m_index;
+ int m_last;
+};
+
+static qint32 toArrayIndex(const QString &str)
+{
+ QByteArray bytes = str.toUtf8();
+ char *eptr;
+ quint32 pos = strtoul(bytes.constData(), &eptr, 10);
+ if ((eptr == bytes.constData() + bytes.size())
+ && (QByteArray::number(pos) == bytes)) {
+ return pos;
+ }
+ return -1;
+}
+
+//! [0]
+ByteArrayClass::ByteArrayClass(QScriptEngine *engine)
+ : QObject(engine), QScriptClass(engine)
+{
+ qScriptRegisterMetaType<QByteArray>(engine, toScriptValue, fromScriptValue);
+
+ length = engine->toStringHandle(QLatin1String("length"));
+
+ proto = engine->newQObject(new ByteArrayPrototype(this),
+ QScriptEngine::QtOwnership,
+ QScriptEngine::SkipMethodsInEnumeration
+ | QScriptEngine::ExcludeSuperClassMethods
+ | QScriptEngine::ExcludeSuperClassProperties);
+ QScriptValue global = engine->globalObject();
+ proto.setPrototype(global.property("Object").property("prototype"));
+
+ ctor = engine->newFunction(construct);
+ ctor.setData(qScriptValueFromValue(engine, this));
+}
+//! [0]
+
+ByteArrayClass::~ByteArrayClass()
+{
+}
+
+//! [3]
+QScriptClass::QueryFlags ByteArrayClass::queryProperty(const QScriptValue &object,
+ const QScriptString &name,
+ QueryFlags flags, uint *id)
+{
+ QByteArray *ba = qscriptvalue_cast<QByteArray*>(object.data());
+ if (!ba)
+ return 0;
+ if (name == length) {
+ return flags;
+ } else {
+ qint32 pos = toArrayIndex(name);
+ if (pos == -1)
+ return 0;
+ *id = pos;
+ if ((flags & HandlesReadAccess) && (pos >= ba->size()))
+ flags &= ~HandlesReadAccess;
+ return flags;
+ }
+}
+//! [3]
+
+//! [4]
+QScriptValue ByteArrayClass::property(const QScriptValue &object,
+ const QScriptString &name, uint id)
+{
+ QByteArray *ba = qscriptvalue_cast<QByteArray*>(object.data());
+ if (!ba)
+ return QScriptValue();
+ if (name == length) {
+ return ba->length();
+ } else {
+ qint32 pos = id;
+ if ((pos < 0) || (pos >= ba->size()))
+ return QScriptValue();
+ return uint(ba->at(pos)) & 255;
+ }
+ return QScriptValue();
+}
+//! [4]
+
+//! [5]
+void ByteArrayClass::setProperty(QScriptValue &object,
+ const QScriptString &name,
+ uint id, const QScriptValue &value)
+{
+ QByteArray *ba = qscriptvalue_cast<QByteArray*>(object.data());
+ if (!ba)
+ return;
+ if (name == length) {
+ ba->resize(value.toInt32());
+ } else {
+ qint32 pos = id;
+ if (pos < 0)
+ return;
+ if (ba->size() <= pos)
+ ba->resize(pos + 1);
+ (*ba)[pos] = char(value.toInt32());
+ }
+}
+//! [5]
+
+//! [6]
+QScriptValue::PropertyFlags ByteArrayClass::propertyFlags(
+ const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/)
+{
+ if (name == length) {
+ return QScriptValue::Undeletable
+ | QScriptValue::SkipInEnumeration;
+ }
+ return QScriptValue::Undeletable;
+}
+//! [6]
+
+//! [7]
+QScriptClassPropertyIterator *ByteArrayClass::newIterator(const QScriptValue &object)
+{
+ return new ByteArrayClassPropertyIterator(object);
+}
+//! [7]
+
+QString ByteArrayClass::name() const
+{
+ return QLatin1String("ByteArray");
+}
+
+QScriptValue ByteArrayClass::prototype() const
+{
+ return proto;
+}
+
+QScriptValue ByteArrayClass::constructor()
+{
+ return ctor;
+}
+
+QScriptValue ByteArrayClass::newInstance(int size)
+{
+ return newInstance(QByteArray(size, /*ch=*/0));
+}
+
+//! [1]
+QScriptValue ByteArrayClass::newInstance(const QByteArray &ba)
+{
+ QScriptValue data = engine()->newVariant(qVariantFromValue(ba));
+ return engine()->newObject(this, data);
+}
+//! [1]
+
+//! [2]
+QScriptValue ByteArrayClass::construct(QScriptContext *ctx, QScriptEngine *)
+{
+ ByteArrayClass *cls = qscriptvalue_cast<ByteArrayClass*>(ctx->callee().data());
+ if (!cls)
+ return QScriptValue();
+ int size = ctx->argument(0).toInt32();
+ return cls->newInstance(size);
+}
+//! [2]
+
+QScriptValue ByteArrayClass::toScriptValue(QScriptEngine *eng, const QByteArray &ba)
+{
+ QScriptValue ctor = eng->globalObject().property("ByteArray");
+ ByteArrayClass *cls = qscriptvalue_cast<ByteArrayClass*>(ctor.data());
+ if (!cls)
+ return eng->newVariant(qVariantFromValue(ba));
+ return cls->newInstance(ba);
+}
+
+void ByteArrayClass::fromScriptValue(const QScriptValue &obj, QByteArray &ba)
+{
+ ba = qscriptvalue_cast<QByteArray>(obj.data());
+}
+
+
+
+ByteArrayClassPropertyIterator::ByteArrayClassPropertyIterator(const QScriptValue &object)
+ : QScriptClassPropertyIterator(object)
+{
+ toFront();
+}
+
+ByteArrayClassPropertyIterator::~ByteArrayClassPropertyIterator()
+{
+}
+
+//! [8]
+bool ByteArrayClassPropertyIterator::hasNext() const
+{
+ QByteArray *ba = qscriptvalue_cast<QByteArray*>(object().data());
+ return m_index < ba->size();
+}
+
+void ByteArrayClassPropertyIterator::next()
+{
+ m_last = m_index;
+ ++m_index;
+}
+
+bool ByteArrayClassPropertyIterator::hasPrevious() const
+{
+ return (m_index > 0);
+}
+
+void ByteArrayClassPropertyIterator::previous()
+{
+ --m_index;
+ m_last = m_index;
+}
+
+void ByteArrayClassPropertyIterator::toFront()
+{
+ m_index = 0;
+ m_last = -1;
+}
+
+void ByteArrayClassPropertyIterator::toBack()
+{
+ QByteArray *ba = qscriptvalue_cast<QByteArray*>(object().data());
+ m_index = ba->size();
+ m_last = -1;
+}
+
+QScriptString ByteArrayClassPropertyIterator::name() const
+{
+ return QScriptString();
+}
+
+uint ByteArrayClassPropertyIterator::id() const
+{
+ return m_last;
+}
+//! [8]
diff --git a/examples/script/customclass/bytearrayclass.h b/examples/script/customclass/bytearrayclass.h
new file mode 100644
index 0000000..e9a5f07
--- /dev/null
+++ b/examples/script/customclass/bytearrayclass.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BYTEARRAYCLASS_H
+#define BYTEARRAYCLASS_H
+
+#include <QtCore/QObject>
+#include <QtScript/QScriptClass>
+#include <QtScript/QScriptString>
+
+class ByteArrayClass : public QObject, public QScriptClass
+{
+public:
+ ByteArrayClass(QScriptEngine *engine);
+ ~ByteArrayClass();
+
+ QScriptValue constructor();
+
+ QScriptValue newInstance(int size = 0);
+ QScriptValue newInstance(const QByteArray &ba);
+
+ QueryFlags queryProperty(const QScriptValue &object,
+ const QScriptString &name,
+ QueryFlags flags, uint *id);
+
+ QScriptValue property(const QScriptValue &object,
+ const QScriptString &name, uint id);
+
+ void setProperty(QScriptValue &object, const QScriptString &name,
+ uint id, const QScriptValue &value);
+
+ QScriptValue::PropertyFlags propertyFlags(
+ const QScriptValue &object, const QScriptString &name, uint id);
+
+ QScriptClassPropertyIterator *newIterator(const QScriptValue &object);
+
+ QString name() const;
+
+ QScriptValue prototype() const;
+
+private:
+ static QScriptValue construct(QScriptContext *ctx, QScriptEngine *eng);
+
+ static QScriptValue toScriptValue(QScriptEngine *eng, const QByteArray &ba);
+ static void fromScriptValue(const QScriptValue &obj, QByteArray &ba);
+
+ QScriptString length;
+ QScriptValue proto;
+ QScriptValue ctor;
+};
+
+#endif
diff --git a/examples/script/customclass/bytearrayclass.pri b/examples/script/customclass/bytearrayclass.pri
new file mode 100644
index 0000000..05fdeb4
--- /dev/null
+++ b/examples/script/customclass/bytearrayclass.pri
@@ -0,0 +1,6 @@
+SOURCES += $$PWD/bytearrayclass.cpp \
+ $$PWD/bytearrayprototype.cpp
+HEADERS += $$PWD/bytearrayclass.h \
+ $$PWD/bytearrayprototype.h
+
+INCLUDEPATH += $$PWD
diff --git a/examples/script/customclass/bytearrayprototype.cpp b/examples/script/customclass/bytearrayprototype.cpp
new file mode 100644
index 0000000..eeb73f9
--- /dev/null
+++ b/examples/script/customclass/bytearrayprototype.cpp
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "bytearrayprototype.h"
+#include <QtScript/QScriptEngine>
+
+Q_DECLARE_METATYPE(QByteArray*)
+
+ByteArrayPrototype::ByteArrayPrototype(QObject *parent)
+ : QObject(parent)
+{
+}
+
+ByteArrayPrototype::~ByteArrayPrototype()
+{
+}
+
+//! [0]
+QByteArray *ByteArrayPrototype::thisByteArray() const
+{
+ return qscriptvalue_cast<QByteArray*>(thisObject().data());
+}
+//! [0]
+
+void ByteArrayPrototype::chop(int n)
+{
+ thisByteArray()->chop(n);
+}
+
+bool ByteArrayPrototype::equals(const QByteArray &other)
+{
+ return *thisByteArray() == other;
+}
+
+QByteArray ByteArrayPrototype::left(int len) const
+{
+ return thisByteArray()->left(len);
+}
+
+//! [1]
+QByteArray ByteArrayPrototype::mid(int pos, int len) const
+{
+ return thisByteArray()->mid(pos, len);
+}
+
+QScriptValue ByteArrayPrototype::remove(int pos, int len)
+{
+ thisByteArray()->remove(pos, len);
+ return thisObject();
+}
+//! [1]
+
+QByteArray ByteArrayPrototype::right(int len) const
+{
+ return thisByteArray()->right(len);
+}
+
+QByteArray ByteArrayPrototype::simplified() const
+{
+ return thisByteArray()->simplified();
+}
+
+QByteArray ByteArrayPrototype::toBase64() const
+{
+ return thisByteArray()->toBase64();
+}
+
+QByteArray ByteArrayPrototype::toLower() const
+{
+ return thisByteArray()->toLower();
+}
+
+QByteArray ByteArrayPrototype::toUpper() const
+{
+ return thisByteArray()->toUpper();
+}
+
+QByteArray ByteArrayPrototype::trimmed() const
+{
+ return thisByteArray()->trimmed();
+}
+
+void ByteArrayPrototype::truncate(int pos)
+{
+ thisByteArray()->truncate(pos);
+}
+
+QString ByteArrayPrototype::toLatin1String() const
+{
+ return QString::fromLatin1(*thisByteArray());
+}
+
+//! [2]
+QScriptValue ByteArrayPrototype::valueOf() const
+{
+ return thisObject().data();
+}
+//! [2]
diff --git a/examples/script/customclass/bytearrayprototype.h b/examples/script/customclass/bytearrayprototype.h
new file mode 100644
index 0000000..fe9e15b
--- /dev/null
+++ b/examples/script/customclass/bytearrayprototype.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BYTEARRAYPROTOTYPE_H
+#define BYTEARRAYPROTOTYPE_H
+
+#include <QtCore/QByteArray>
+#include <QtCore/QObject>
+#include <QtScript/QScriptable>
+#include <QtScript/QScriptValue>
+
+//! [0]
+class ByteArrayPrototype : public QObject, public QScriptable
+{
+Q_OBJECT
+public:
+ ByteArrayPrototype(QObject *parent = 0);
+ ~ByteArrayPrototype();
+
+public slots:
+ void chop(int n);
+ bool equals(const QByteArray &other);
+ QByteArray left(int len) const;
+ QByteArray mid(int pos, int len = -1) const;
+ QScriptValue remove(int pos, int len);
+ QByteArray right(int len) const;
+ QByteArray simplified() const;
+ QByteArray toBase64() const;
+ QByteArray toLower() const;
+ QByteArray toUpper() const;
+ QByteArray trimmed() const;
+ void truncate(int pos);
+ QString toLatin1String() const;
+ QScriptValue valueOf() const;
+
+private:
+ QByteArray *thisByteArray() const;
+};
+//! [0]
+
+
+#endif
diff --git a/examples/script/customclass/customclass.pro b/examples/script/customclass/customclass.pro
new file mode 100644
index 0000000..ba7f69d
--- /dev/null
+++ b/examples/script/customclass/customclass.pro
@@ -0,0 +1,13 @@
+QT = core script
+win32: CONFIG += console
+mac:CONFIG -= app_bundle
+
+SOURCES += main.cpp
+
+include(bytearrayclass.pri)
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/customclass
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.pri
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/customclass
+INSTALLS += target sources
diff --git a/examples/script/customclass/main.cpp b/examples/script/customclass/main.cpp
new file mode 100644
index 0000000..1c3ceb1
--- /dev/null
+++ b/examples/script/customclass/main.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtScript>
+#include "bytearrayclass.h"
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QScriptEngine eng;
+
+ ByteArrayClass *baClass = new ByteArrayClass(&eng);
+ eng.globalObject().setProperty("ByteArray", baClass->constructor());
+
+ qDebug() << "ba = new ByteArray(4):" << eng.evaluate("ba = new ByteArray(4)").toString();
+ qDebug() << "ba.length:" << eng.evaluate("ba.length").toNumber();
+ qDebug() << "ba[1] = 123; ba[1]:" << eng.evaluate("ba[1] = 123; ba[1]").toNumber();
+ qDebug() << "ba[7] = 224; ba.length:" << eng.evaluate("ba[7] = 224; ba.length").toNumber();
+ qDebug() << "for-in loop:" << eng.evaluate("result = '';\n"
+ "for (var p in ba) {\n"
+ " if (result.length > 0)\n"
+ " result += ', ';\n"
+ " result += '(' + p + ',' + ba[p] + ')';\n"
+ "} result").toString();
+ qDebug() << "ba.toBase64():" << eng.evaluate("b64 = ba.toBase64()").toString();
+ qDebug() << "ba.toBase64().toLatin1String():" << eng.evaluate("b64.toLatin1String()").toString();
+ qDebug() << "ba.valueOf():" << eng.evaluate("ba.valueOf()").toString();
+ qDebug() << "ba.chop(2); ba.length:" << eng.evaluate("ba.chop(2); ba.length").toNumber();
+
+ return 0;
+}
diff --git a/examples/script/defaultprototypes/code.js b/examples/script/defaultprototypes/code.js
new file mode 100644
index 0000000..048e131
--- /dev/null
+++ b/examples/script/defaultprototypes/code.js
@@ -0,0 +1,20 @@
+//! [0]
+listWidget.addItem("Red");
+listWidget.addItem("Blue");
+listWidget.addItem("Green");
+listWidget.addItem("Cyan");
+listWidget.addItem("Yellow");
+listWidget.addItem("Purple");
+listWidget.addItems(["Orange", "Gray"]);
+//! [0]
+
+//! [1]
+listWidget.currentItemChanged.connect(
+ function(item)
+ {
+ listWidget.setBackgroundColor(item.text);
+ }
+);
+//! [1]
+
+listWidget.show();
diff --git a/examples/script/defaultprototypes/defaultprototypes.pro b/examples/script/defaultprototypes/defaultprototypes.pro
new file mode 100644
index 0000000..b9a6765
--- /dev/null
+++ b/examples/script/defaultprototypes/defaultprototypes.pro
@@ -0,0 +1,10 @@
+QT += script
+RESOURCES += defaultprototypes.qrc
+SOURCES += main.cpp prototypes.cpp
+HEADERS += prototypes.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/defaultprototypes
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.js defaultprototypes.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/defaultprototypes
+INSTALLS += target sources
diff --git a/examples/script/defaultprototypes/defaultprototypes.qrc b/examples/script/defaultprototypes/defaultprototypes.qrc
new file mode 100644
index 0000000..ada405b
--- /dev/null
+++ b/examples/script/defaultprototypes/defaultprototypes.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>code.js</file>
+ </qresource>
+</RCC>
diff --git a/examples/script/defaultprototypes/main.cpp b/examples/script/defaultprototypes/main.cpp
new file mode 100644
index 0000000..3245ae0
--- /dev/null
+++ b/examples/script/defaultprototypes/main.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtScript>
+#include "prototypes.h"
+
+//! [0]
+Q_DECLARE_METATYPE(QListWidgetItem*)
+Q_DECLARE_METATYPE(QListWidget*)
+//! [0]
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(defaultprototypes);
+
+ QApplication app(argc, argv);
+//! [1]
+ QScriptEngine engine;
+
+ ListWidgetItemPrototype lwiProto;
+ engine.setDefaultPrototype(qMetaTypeId<QListWidgetItem*>(),
+ engine.newQObject(&lwiProto));
+
+ ListWidgetPrototype lwProto;
+ engine.setDefaultPrototype(qMetaTypeId<QListWidget*>(),
+ engine.newQObject(&lwProto));
+//! [1]
+
+//! [2]
+ QListWidget listWidget;
+ engine.globalObject().setProperty("listWidget",
+ engine.newQObject(&listWidget));
+//! [2]
+
+ QFile file(":/code.js");
+ file.open(QIODevice::ReadOnly);
+ QScriptValue result = engine.evaluate(file.readAll());
+ file.close();
+ if (engine.hasUncaughtException()) {
+ int lineNo = engine.uncaughtExceptionLineNumber();
+ qWarning() << "line" << lineNo << ":" << result.toString();
+ }
+
+ return app.exec();
+}
diff --git a/examples/script/defaultprototypes/prototypes.cpp b/examples/script/defaultprototypes/prototypes.cpp
new file mode 100644
index 0000000..b2bad45
--- /dev/null
+++ b/examples/script/defaultprototypes/prototypes.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "prototypes.h"
+#include <QtGui/QListWidgetItem>
+#include <QtGui/QListWidget>
+#include <QtScript/QScriptValue>
+#include <QtScript/QScriptEngine>
+
+Q_DECLARE_METATYPE(QListWidgetItem*)
+Q_DECLARE_METATYPE(QListWidget*)
+
+//! [0]
+ListWidgetItemPrototype::ListWidgetItemPrototype(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QString ListWidgetItemPrototype::text() const
+{
+ QListWidgetItem *item = qscriptvalue_cast<QListWidgetItem*>(thisObject());
+ if (item)
+ return item->text();
+ return QString();
+}
+
+void ListWidgetItemPrototype::setText(const QString &text)
+{
+ QListWidgetItem *item = qscriptvalue_cast<QListWidgetItem*>(thisObject());
+ if (item)
+ item->setText(text);
+}
+
+QString ListWidgetItemPrototype::toString() const
+{
+ return QString("ListWidgetItem(text = %0)").arg(text());
+}
+//! [0]
+
+
+
+//! [1]
+ListWidgetPrototype::ListWidgetPrototype(QObject *parent)
+ : QObject(parent)
+{
+}
+
+void ListWidgetPrototype::addItem(const QString &text)
+{
+ QListWidget *widget = qscriptvalue_cast<QListWidget*>(thisObject());
+ if (widget)
+ widget->addItem(text);
+}
+
+void ListWidgetPrototype::addItems(const QStringList &texts)
+{
+ QListWidget *widget = qscriptvalue_cast<QListWidget*>(thisObject());
+ if (widget)
+ widget->addItems(texts);
+}
+
+void ListWidgetPrototype::setBackgroundColor(const QString &colorName)
+{
+ QListWidget *widget = qscriptvalue_cast<QListWidget*>(thisObject());
+ if (widget) {
+ QPalette palette = widget->palette();
+ QColor color(colorName);
+ palette.setBrush(QPalette::Base, color);
+ widget->setPalette(palette);
+ }
+}
+//! [1]
diff --git a/examples/script/defaultprototypes/prototypes.h b/examples/script/defaultprototypes/prototypes.h
new file mode 100644
index 0000000..76cecaa
--- /dev/null
+++ b/examples/script/defaultprototypes/prototypes.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PROTOTYPES_H
+#define PROTOTYPES_H
+
+#include <QtCore/QObject>
+#include <QtScript/QScriptable>
+
+//! [0]
+class ListWidgetItemPrototype : public QObject, public QScriptable
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText)
+public:
+ ListWidgetItemPrototype(QObject *parent = 0);
+
+ QString text() const;
+ void setText(const QString &text);
+
+public slots:
+ QString toString() const;
+};
+//! [0]
+
+//! [1]
+class ListWidgetPrototype : public QObject, public QScriptable
+{
+ Q_OBJECT
+public:
+ ListWidgetPrototype(QObject *parent = 0);
+
+public slots:
+ void addItem(const QString &text);
+ void addItems(const QStringList &texts);
+ void setBackgroundColor(const QString &colorName);
+};
+//! [1]
+
+#endif
diff --git a/examples/script/helloscript/helloscript.pro b/examples/script/helloscript/helloscript.pro
new file mode 100644
index 0000000..d94a318
--- /dev/null
+++ b/examples/script/helloscript/helloscript.pro
@@ -0,0 +1,9 @@
+QT += script
+RESOURCES += helloscript.qrc
+SOURCES += main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/helloscript
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS helloscript.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/helloscript
+INSTALLS += target sources
diff --git a/examples/script/helloscript/helloscript.qrc b/examples/script/helloscript/helloscript.qrc
new file mode 100644
index 0000000..dc93461
--- /dev/null
+++ b/examples/script/helloscript/helloscript.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>helloscript.qs</file>
+ </qresource>
+</RCC>
diff --git a/examples/script/helloscript/helloscript.qs b/examples/script/helloscript/helloscript.qs
new file mode 100644
index 0000000..6d8e87c
--- /dev/null
+++ b/examples/script/helloscript/helloscript.qs
@@ -0,0 +1,5 @@
+//! [0]
+button.text = qsTr('Hello World!');
+button.styleSheet = 'font-style: italic';
+button.show();
+//! [0]
diff --git a/examples/script/helloscript/main.cpp b/examples/script/helloscript/main.cpp
new file mode 100644
index 0000000..4d243a6
--- /dev/null
+++ b/examples/script/helloscript/main.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QtScript>
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(helloscript);
+//! [0]
+
+//! [1]
+ QApplication app(argc, argv);
+
+ QScriptEngine engine;
+
+ QTranslator translator;
+ translator.load("helloscript_la");
+ app.installTranslator(&translator);
+ engine.installTranslatorFunctions();
+//! [1]
+
+//! [2]
+ QPushButton button;
+ QScriptValue scriptButton = engine.newQObject(&button);
+ engine.globalObject().setProperty("button", scriptButton);
+//! [2]
+
+//! [3]
+ QString fileName(":/helloscript.qs");
+ QFile scriptFile(fileName);
+ scriptFile.open(QIODevice::ReadOnly);
+ QTextStream stream(&scriptFile);
+ QString contents = stream.readAll();
+ scriptFile.close();
+//! [3]
+
+//! [4]
+ QScriptValue result = engine.evaluate(contents, fileName);
+//! [4]
+
+//! [5]
+ if (result.isError()) {
+ QMessageBox::critical(0, "Hello Script",
+ QString::fromLatin1("%0:%1: %2")
+ .arg(fileName)
+ .arg(result.property("lineNumber").toInt32())
+ .arg(result.toString()));
+ return -1;
+ }
+//! [5]
+
+//! [6]
+ return app.exec();
+}
+//! [6]
diff --git a/examples/script/marshal/main.cpp b/examples/script/marshal/main.cpp
new file mode 100644
index 0000000..e5dbdde
--- /dev/null
+++ b/examples/script/marshal/main.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtScript>
+
+template <class Container>
+QScriptValue toScriptValue(QScriptEngine *eng, const Container &cont)
+{
+ QScriptValue a = eng->newArray();
+ typename Container::const_iterator begin = cont.begin();
+ typename Container::const_iterator end = cont.end();
+ typename Container::const_iterator it;
+ for (it = begin; it != end; ++it)
+ a.setProperty(quint32(it - begin), qScriptValueFromValue(eng, *it));
+ return a;
+}
+
+template <class Container>
+void fromScriptValue(const QScriptValue &value, Container &cont)
+{
+ quint32 len = value.property("length").toUInt32();
+ for (quint32 i = 0; i < len; ++i) {
+ QScriptValue item = value.property(i);
+ typedef typename Container::value_type ContainerValue;
+ cont.push_back(qscriptvalue_cast<ContainerValue>(item));
+ }
+}
+
+typedef QVector<int> IntVector;
+typedef QVector<QString> StringVector;
+
+Q_DECLARE_METATYPE(IntVector)
+Q_DECLARE_METATYPE(StringVector)
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+
+ QScriptEngine eng;
+ // register our custom types
+ qScriptRegisterMetaType<IntVector>(&eng, toScriptValue, fromScriptValue);
+ qScriptRegisterMetaType<StringVector>(&eng, toScriptValue, fromScriptValue);
+
+ QScriptValue val = eng.evaluate("[1, 4, 7, 11, 50, 3, 19, 60]");
+
+ fprintf(stdout, "Script array: %s\n", qPrintable(val.toString()));
+
+ IntVector iv = qscriptvalue_cast<IntVector>(val);
+
+ fprintf(stdout, "qscriptvalue_cast to QVector<int>: ");
+ for (int i = 0; i < iv.size(); ++i)
+ fprintf(stdout, "%s%d", (i > 0) ? "," : "", iv.at(i));
+ fprintf(stdout, "\n");
+
+ val = eng.evaluate("[9, 'foo', 46.5, 'bar', 'Qt', 555, 'hello']");
+
+ fprintf(stdout, "Script array: %s\n", qPrintable(val.toString()));
+
+ StringVector sv = qscriptvalue_cast<StringVector>(val);
+
+ fprintf(stdout, "qscriptvalue_cast to QVector<QString>: ");
+ for (int i = 0; i < sv.size(); ++i)
+ fprintf(stdout, "%s%s", (i > 0) ? "," : "", qPrintable(sv.at(i)));
+ fprintf(stdout, "\n");
+
+ return 0;
+}
diff --git a/examples/script/marshal/marshal.pro b/examples/script/marshal/marshal.pro
new file mode 100644
index 0000000..46b33b9
--- /dev/null
+++ b/examples/script/marshal/marshal.pro
@@ -0,0 +1,9 @@
+QT = core script
+CONFIG += console
+SOURCES += main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/marshal
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS marshal.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/marshal
+INSTALLS += target sources
diff --git a/examples/script/qscript/main.cpp b/examples/script/qscript/main.cpp
new file mode 100644
index 0000000..891c89f
--- /dev/null
+++ b/examples/script/qscript/main.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <qscriptengine.h>
+
+#include <QtCore/QFile>
+#include <QtCore/QTextStream>
+#include <QtCore/QStringList>
+#include <QtGui/QApplication>
+
+#include <stdlib.h>
+
+#include "bytearrayclass.h"
+
+static bool wantsToQuit;
+
+static QScriptValue qtscript_quit(QScriptContext *ctx, QScriptEngine *eng)
+{
+ Q_UNUSED(ctx);
+ wantsToQuit = true;
+ return eng->undefinedValue();
+}
+
+static void interactive(QScriptEngine *eng)
+{
+ QScriptValue global = eng->globalObject();
+ QScriptValue quitFunction = eng->newFunction(qtscript_quit);
+ if (!global.property(QLatin1String("exit")).isValid())
+ global.setProperty(QLatin1String("exit"), quitFunction);
+ if (!global.property(QLatin1String("quit")).isValid())
+ global.setProperty(QLatin1String("quit"), quitFunction);
+ wantsToQuit = false;
+
+ QTextStream qin(stdin, QFile::ReadOnly);
+
+ const char *qscript_prompt = "qs> ";
+ const char *dot_prompt = ".... ";
+ const char *prompt = qscript_prompt;
+
+ QString code;
+
+ forever {
+ QString line;
+
+ printf("%s", prompt);
+ fflush(stdout);
+
+ line = qin.readLine();
+ if (line.isNull())
+ break;
+
+ code += line;
+ code += QLatin1Char('\n');
+
+ if (line.trimmed().isEmpty()) {
+ continue;
+
+ } else if (! eng->canEvaluate(code)) {
+ prompt = dot_prompt;
+
+ } else {
+ QScriptValue result = eng->evaluate(code, QLatin1String("typein"));
+
+ code.clear();
+ prompt = qscript_prompt;
+
+ if (! result.isUndefined())
+ fprintf(stderr, "%s\n", qPrintable(result.toString()));
+
+ if (wantsToQuit)
+ break;
+ }
+ }
+}
+
+static QScriptValue importExtension(QScriptContext *context, QScriptEngine *engine)
+{
+ return engine->importExtension(context->argument(0).toString());
+}
+
+static QScriptValue loadScripts(QScriptContext *context, QScriptEngine *engine)
+{
+ for (int i = 0; i < context->argumentCount(); ++i) {
+ QString fileName = context->argument(0).toString();
+ QFile file(fileName);
+ if (!file.open(QIODevice::ReadOnly))
+ return context->throwError(QString::fromLatin1("could not open %0 for reading").arg(fileName));
+ QTextStream ts(&file);
+ QString contents = ts.readAll();
+ file.close();
+ QScriptContext *pc = context->parentContext();
+ context->setActivationObject(pc->activationObject());
+ context->setThisObject(pc->thisObject());
+ QScriptValue ret = engine->evaluate(contents);
+ if (engine->hasUncaughtException())
+ return ret;
+ }
+ return engine->undefinedValue();
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication *app;
+ if (argc >= 2 && !qstrcmp(argv[1], "-tty")) {
+ ++argv;
+ --argc;
+ app = new QApplication(argc, argv, QApplication::Tty);
+ } else {
+ app = new QApplication(argc, argv);
+ }
+
+ QScriptEngine *eng = new QScriptEngine();
+
+ QScriptValue globalObject = eng->globalObject();
+
+ globalObject.setProperty("load", eng->newFunction(loadScripts, /*length=*/1));
+
+ {
+ if (!globalObject.property("qt").isObject())
+ globalObject.setProperty("qt", eng->newObject());
+ QScriptValue qscript = eng->newObject();
+ qscript.setProperty("importExtension", eng->newFunction(importExtension));
+ globalObject.property("qt").setProperty("script", qscript);
+ }
+
+ ByteArrayClass *byteArrayClass = new ByteArrayClass(eng);
+ globalObject.setProperty("ByteArray", byteArrayClass->constructor());
+
+ if (! *++argv) {
+ interactive(eng);
+ return EXIT_SUCCESS;
+ }
+
+ while (const char *arg = *argv++) {
+ QString fn = QString::fromLocal8Bit(arg);
+
+ if (fn == QLatin1String("-i")) {
+ interactive(eng);
+ break;
+ }
+
+ QString contents;
+ int lineNumber = 1;
+
+ if (fn == QLatin1String("-")) {
+ QTextStream stream(stdin, QFile::ReadOnly);
+ contents = stream.readAll();
+ }
+
+ else {
+ QFile file(fn);
+
+ if (file.open(QFile::ReadOnly)) {
+ QTextStream stream(&file);
+ contents = stream.readAll();
+ file.close();
+
+ // strip off #!/usr/bin/env qscript line
+ if (contents.startsWith("#!")) {
+ contents.remove(0, contents.indexOf("\n"));
+ ++lineNumber;
+ }
+ }
+ }
+
+ if (contents.isEmpty())
+ continue;
+
+ QScriptValue r = eng->evaluate(contents, fn, lineNumber);
+ if (eng->hasUncaughtException()) {
+ QStringList backtrace = eng->uncaughtExceptionBacktrace();
+ fprintf (stderr, " %s\n%s\n\n", qPrintable(r.toString()),
+ qPrintable(backtrace.join("\n")));
+ return EXIT_FAILURE;
+ }
+ }
+
+ delete eng;
+ delete app;
+
+ return EXIT_SUCCESS;
+}
diff --git a/examples/script/qscript/qscript.pro b/examples/script/qscript/qscript.pro
new file mode 100644
index 0000000..759eedf
--- /dev/null
+++ b/examples/script/qscript/qscript.pro
@@ -0,0 +1,14 @@
+
+QT += script
+win32: CONFIG += console
+mac:CONFIG -= app_bundle
+
+SOURCES += main.cpp
+
+include(../customclass/bytearrayclass.pri)
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/qscript
+sources.files = $$RESOURCES $$FORMS main.cpp qscript.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/qscript
+INSTALLS += target sources
diff --git a/examples/script/qsdbg/example.qs b/examples/script/qsdbg/example.qs
new file mode 100644
index 0000000..47c1363
--- /dev/null
+++ b/examples/script/qsdbg/example.qs
@@ -0,0 +1,17 @@
+function bar() {
+ var x = 1;
+ var y = 2;
+ return x + y;
+}
+
+function foo(a, b, c) {
+ var i = a + bar();
+ var j = b - bar();
+ var k = c * bar();
+ return Math.cos(i) + Math.sin(j) - Math.atan(k);
+}
+
+var first = foo(1, 2, 3);
+var second = foo(4, 5, 6);
+print("first was:", first, ", and second was:", second);
+
diff --git a/examples/script/qsdbg/main.cpp b/examples/script/qsdbg/main.cpp
new file mode 100644
index 0000000..eb377cf
--- /dev/null
+++ b/examples/script/qsdbg/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtScript>
+
+#include "scriptdebugger.h"
+
+int main(int argc, char **argv)
+{
+ if (argc < 2) {
+ fprintf(stderr, "*** you must specify a script file to evaluate (try example.qs)\n");
+ return(-1);
+ }
+
+ QString fileName = QString::fromLatin1(argv[1]);
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly)) {
+ fprintf(stderr, "*** failed to open `%s' for reading\n", argv[1]);
+ return(-1);
+ }
+
+ QScriptEngine engine;
+ QString code = QTextStream(&file).readAll();
+ file.close();
+
+ fprintf(stdout, "\n*** Welcome to qsdbg. Debugger commands start with a . (period)\n");
+ fprintf(stdout, "*** Any other input will be evaluated by the script interpreter.\n");
+ fprintf(stdout, "*** Type .help for help.\n\n");
+
+ ScriptDebugger *dbg = new ScriptDebugger(&engine);
+ dbg->breakAtNextStatement();
+
+ engine.evaluate(code, fileName);
+
+ return 0;
+}
diff --git a/examples/script/qsdbg/qsdbg.pri b/examples/script/qsdbg/qsdbg.pri
new file mode 100644
index 0000000..618e623
--- /dev/null
+++ b/examples/script/qsdbg/qsdbg.pri
@@ -0,0 +1,9 @@
+SOURCES += \
+ $$PWD/scriptdebugger.cpp \
+ $$PWD/scriptbreakpointmanager.cpp
+
+HEADERS += \
+ $$PWD/scriptdebugger.h \
+ $$PWD/scriptbreakpointmanager.h
+
+INCLUDEPATH += $$PWD
diff --git a/examples/script/qsdbg/qsdbg.pro b/examples/script/qsdbg/qsdbg.pro
new file mode 100644
index 0000000..c199123
--- /dev/null
+++ b/examples/script/qsdbg/qsdbg.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += script
+win32: CONFIG += console
+mac: CONFIG -= app_bundle
+
+SOURCES += main.cpp
+
+include(qsdbg.pri)
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/qsdbg
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qsdbg.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/qsdbg
+INSTALLS += target sources
+
+
diff --git a/examples/script/qsdbg/scriptbreakpointmanager.cpp b/examples/script/qsdbg/scriptbreakpointmanager.cpp
new file mode 100644
index 0000000..7668d7b
--- /dev/null
+++ b/examples/script/qsdbg/scriptbreakpointmanager.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "scriptbreakpointmanager.h"
+
+ScriptBreakpointManager::ScriptBreakpointManager()
+{
+}
+
+ScriptBreakpointManager::~ScriptBreakpointManager()
+{
+}
+
+bool ScriptBreakpointManager::hasBreakpoints() const
+{
+ return !breakpoints.isEmpty();
+}
+
+int ScriptBreakpointManager::setBreakpoint(const QString &fileName, int lineNumber)
+{
+ breakpoints.append(ScriptBreakpointInfo(fileName, lineNumber));
+ return breakpoints.size() - 1;
+}
+
+int ScriptBreakpointManager::setBreakpoint(const QString &functionName, const QString &fileName)
+{
+ breakpoints.append(ScriptBreakpointInfo(functionName, fileName));
+ return breakpoints.size() - 1;
+}
+
+int ScriptBreakpointManager::setBreakpoint(const QScriptValue &function)
+{
+ breakpoints.append(ScriptBreakpointInfo(function));
+ return breakpoints.size() - 1;
+}
+
+void ScriptBreakpointManager::removeBreakpoint(int id)
+{
+ if (id >= 0 && id < breakpoints.size())
+ breakpoints[id] = ScriptBreakpointInfo();
+}
+
+int ScriptBreakpointManager::findBreakpoint(const QString &fileName, int lineNumber) const
+{
+ for (int i = 0; i < breakpoints.size(); ++i) {
+ const ScriptBreakpointInfo &brk = breakpoints.at(i);
+ if (brk.type != ScriptBreakpointInfo::File)
+ continue;
+ if (brk.fileName == fileName && brk.lineNumber == lineNumber)
+ return i;
+ }
+ return -1;
+}
+
+int ScriptBreakpointManager::findBreakpoint(const QString &functionName, const QString &fileName) const
+{
+ for (int i = 0; i < breakpoints.size(); ++i) {
+ const ScriptBreakpointInfo &brk = breakpoints.at(i);
+ if (brk.type != ScriptBreakpointInfo::FunctionName)
+ continue;
+ if (brk.functionName == functionName && brk.fileName == fileName)
+ return i;
+ }
+ return -1;
+}
+
+int ScriptBreakpointManager::findBreakpoint(const QScriptValue &function) const
+{
+ for (int i = 0; i < breakpoints.size(); ++i) {
+ const ScriptBreakpointInfo &brk = breakpoints.at(i);
+ if (brk.type != ScriptBreakpointInfo::Function)
+ continue;
+ if (brk.function.strictlyEquals(function))
+ return i;
+ }
+ return -1;
+}
+
+bool ScriptBreakpointManager::isBreakpointEnabled(int id) const
+{
+ return breakpoints.value(id).enabled;
+}
+
+void ScriptBreakpointManager::setBreakpointEnabled(int id, bool enabled)
+{
+ if (id >= 0 && id < breakpoints.size())
+ breakpoints[id].enabled = enabled;
+}
+
+QString ScriptBreakpointManager::breakpointCondition(int id) const
+{
+ return breakpoints.value(id).condition;
+}
+
+void ScriptBreakpointManager::setBreakpointCondition(int id, const QString &expression)
+{
+ if (id >= 0 && id < breakpoints.size())
+ breakpoints[id].condition = expression;
+}
+
+int ScriptBreakpointManager::breakpointIgnoreCount(int id) const
+{
+ return breakpoints.value(id).ignoreCount;
+}
+
+void ScriptBreakpointManager::setBreakpointIgnoreCount(int id, int ignoreCount)
+{
+ if (id >= 0 && id < breakpoints.size())
+ breakpoints[id].ignoreCount = ignoreCount;
+}
+
+bool ScriptBreakpointManager::isBreakpointSingleShot(int id) const
+{
+ return breakpoints.value(id).singleShot;
+}
+
+void ScriptBreakpointManager::setBreakpointSingleShot(int id, bool singleShot)
+{
+ if (id >= 0 && id < breakpoints.size())
+ breakpoints[id].singleShot = singleShot;
+}
diff --git a/examples/script/qsdbg/scriptbreakpointmanager.h b/examples/script/qsdbg/scriptbreakpointmanager.h
new file mode 100644
index 0000000..cdb176c
--- /dev/null
+++ b/examples/script/qsdbg/scriptbreakpointmanager.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCRIPTBREAKPOINTMANAGER_H
+#define SCRIPTBREAKPOINTMANAGER_H
+
+#include <QtCore/qlist.h>
+#include <QtCore/qstring.h>
+#include <QtScript/qscriptvalue.h>
+
+class ScriptBreakpointInfo
+{
+public:
+ enum Type {
+ File,
+ FunctionName,
+ Function,
+ Invalid
+ };
+
+ Type type;
+ QString functionName;
+ QString fileName;
+ int lineNumber;
+ QScriptValue function;
+ bool enabled;
+ QString condition;
+ int ignoreCount;
+ bool singleShot;
+
+ ScriptBreakpointInfo(const QString &fileName, int lineNumber)
+ : type(File), fileName(fileName), lineNumber(lineNumber),
+ enabled(true), ignoreCount(0), singleShot(false)
+ { }
+ ScriptBreakpointInfo(const QString &functionName, const QString &fileName = QString())
+ : type(FunctionName), functionName(functionName), fileName(fileName),
+ enabled(true), ignoreCount(0), singleShot(false)
+ { }
+ ScriptBreakpointInfo(const QScriptValue &function)
+ : type(Function), function(function),
+ enabled(true), ignoreCount(0), singleShot(false)
+ { }
+ ScriptBreakpointInfo()
+ : type(Invalid)
+ { }
+};
+
+class ScriptBreakpointManager
+{
+public:
+ ScriptBreakpointManager();
+ ~ScriptBreakpointManager();
+
+ bool hasBreakpoints() const;
+
+ int setBreakpoint(const QString &fileName, int lineNumber);
+ int setBreakpoint(const QString &functionName, const QString &fileName = QString());
+ int setBreakpoint(const QScriptValue &function);
+
+ void removeBreakpoint(int id);
+
+ int findBreakpoint(const QString &fileName, int lineNumber) const;
+ int findBreakpoint(const QString &functionName, const QString &fileName = QString()) const;
+ int findBreakpoint(const QScriptValue &function) const;
+
+ bool isBreakpointEnabled(int id) const;
+ void setBreakpointEnabled(int id, bool enabled);
+
+ QString breakpointCondition(int id) const;
+ void setBreakpointCondition(int id, const QString &expression);
+
+ int breakpointIgnoreCount(int id) const;
+ void setBreakpointIgnoreCount(int id, int ignoreCount);
+
+ bool isBreakpointSingleShot(int id) const;
+ void setBreakpointSingleShot(int id, bool singleShot);
+
+private:
+ QList<ScriptBreakpointInfo> breakpoints;
+
+ Q_DISABLE_COPY(ScriptBreakpointManager)
+};
+
+#endif // SCRIPTBREAKPOINTMANAGER_H
diff --git a/examples/script/qsdbg/scriptdebugger.cpp b/examples/script/qsdbg/scriptdebugger.cpp
new file mode 100644
index 0000000..e3639b9
--- /dev/null
+++ b/examples/script/qsdbg/scriptdebugger.cpp
@@ -0,0 +1,737 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "scriptdebugger.h"
+#include "scriptbreakpointmanager.h"
+
+#include <QtScript/QScriptEngine>
+#include <QtScript/QScriptEngineAgent>
+#include <QtScript/QScriptContextInfo>
+#include <QtScript/QScriptValueIterator>
+#include <QtCore/QTextStream>
+#include <QtCore/QStack>
+
+static QString safeValueToString(const QScriptValue &value)
+{
+ if (value.isObject())
+ return QLatin1String("[object Object]");
+ else
+ return value.toString();
+}
+
+class ScriptInfo;
+class ScriptBreakpointManager;
+
+class ScriptDebuggerPrivate
+ : public QScriptEngineAgent
+{
+ Q_DECLARE_PUBLIC(ScriptDebugger)
+public:
+ enum Mode {
+ Run,
+ StepInto,
+ StepOver
+ };
+
+ ScriptDebuggerPrivate(QScriptEngine *engine);
+ ~ScriptDebuggerPrivate();
+
+ // QScriptEngineAgent interface
+ void scriptLoad(qint64 id, const QString &program,
+ const QString &fileName, int lineNumber);
+ void scriptUnload(qint64 id);
+
+ void positionChange(qint64 scriptId,
+ int lineNumber, int columnNumber);
+
+ void functionEntry(qint64 scriptId);
+ void functionExit(qint64 scriptId,
+ const QScriptValue &returnValue);
+
+ void exceptionThrow(qint64 scriptId,
+ const QScriptValue &exception, bool hasHandler);
+
+
+ void interactive();
+ bool executeCommand(const QString &command, const QStringList &args);
+
+ void setMode(Mode mode);
+ Mode mode() const;
+
+ int frameCount() const;
+ void setCurrentFrameIndex(int index);
+ int currentFrameIndex() const;
+
+ QScriptContext *frameContext(int index) const;
+ QScriptContext *currentFrameContext() const;
+
+ ScriptInfo *scriptInfo(QScriptContext *context) const;
+
+ int listLineNumber() const;
+ void setListLineNumber(int lineNumber);
+
+ QString readLine();
+ void output(const QString &text);
+ void message(const QString &text);
+ void errorMessage(const QString &text);
+
+ // attributes
+ QTextStream *m_defaultInputStream;
+ QTextStream *m_defaultOutputStream;
+ QTextStream *m_defaultErrorStream;
+ QTextStream *m_inputStream;
+ QTextStream *m_outputStream;
+ QTextStream *m_errorStream;
+
+ ScriptBreakpointManager *m_bpManager;
+ Mode m_mode;
+ QMap<qint64, ScriptInfo*> m_scripts;
+ QMap<QScriptContext*, QStack<qint64> > m_contextProgramIds;
+
+ QString m_lastInteractiveCommand;
+ QString m_commandPrefix;
+ int m_stepDepth;
+ int m_currentFrameIndex;
+ int m_listLineNumber;
+
+ ScriptDebugger *q_ptr;
+};
+
+class ScriptInfo
+{
+public:
+ ScriptInfo(const QString &code, const QString &fileName, int lineNumber)
+ : m_code(code), m_fileName(fileName), m_lineNumber(lineNumber)
+ { }
+
+ inline QString code() const
+ { return m_code; }
+ inline QString fileName() const
+ { return m_fileName; }
+ inline int lineNumber() const
+ { return m_lineNumber; }
+
+ QString lineText(int lineNumber);
+ QMap<int, int> m_lineOffsets;
+
+private:
+ int lineOffset(int lineNumber);
+
+ QString m_code;
+ QString m_fileName;
+ int m_lineNumber;
+};
+
+int ScriptInfo::lineOffset(int lineNumber)
+{
+ QMap<int, int>::const_iterator it = m_lineOffsets.constFind(lineNumber);
+ if (it != m_lineOffsets.constEnd())
+ return it.value();
+
+ int offset;
+ it = m_lineOffsets.constFind(lineNumber - 1);
+ if (it != m_lineOffsets.constEnd()) {
+ offset = it.value();
+ offset = m_code.indexOf(QLatin1Char('\n'), offset);
+ if (offset != -1)
+ ++offset;
+ m_lineOffsets.insert(lineNumber, offset);
+ } else {
+ int index;
+ it = m_lineOffsets.lowerBound(lineNumber);
+ --it;
+ if (it != m_lineOffsets.constBegin()) {
+ index = it.key();
+ offset = it.value();
+ } else {
+ index = m_lineNumber;
+ offset = 0;
+ }
+ int j = index;
+ for ( ; j < lineNumber; ++j) {
+ m_lineOffsets.insert(j, offset);
+ offset = m_code.indexOf(QLatin1Char('\n'), offset);
+ if (offset == -1)
+ break;
+ ++offset;
+ }
+ m_lineOffsets.insert(j, offset);
+ }
+ return offset;
+}
+
+QString ScriptInfo::lineText(int lineNumber)
+{
+ int startOffset = lineOffset(lineNumber);
+ if (startOffset == -1)
+ return QString();
+ int endOffset = lineOffset(lineNumber + 1);
+ if (endOffset == -1)
+ return m_code.mid(startOffset);
+ else
+ return m_code.mid(startOffset, endOffset - startOffset - 1);
+}
+
+
+
+ScriptDebuggerPrivate::ScriptDebuggerPrivate(QScriptEngine *engine)
+ : QScriptEngineAgent(engine), m_mode(Run)
+{
+ m_commandPrefix = QLatin1String(".");
+ m_bpManager = new ScriptBreakpointManager;
+ m_defaultInputStream = new QTextStream(stdin);
+ m_defaultOutputStream = new QTextStream(stdout);
+ m_defaultErrorStream = new QTextStream(stderr);
+ m_inputStream = m_defaultInputStream;
+ m_outputStream = m_defaultOutputStream;
+ m_errorStream = m_defaultErrorStream;
+}
+
+ScriptDebuggerPrivate::~ScriptDebuggerPrivate()
+{
+ delete m_defaultInputStream;
+ delete m_defaultOutputStream;
+ delete m_defaultErrorStream;
+ delete m_bpManager;
+ qDeleteAll(m_scripts);
+}
+
+QString ScriptDebuggerPrivate::readLine()
+{
+ return m_inputStream->readLine();
+}
+
+void ScriptDebuggerPrivate::output(const QString &text)
+{
+ *m_outputStream << text;
+}
+
+void ScriptDebuggerPrivate::message(const QString &text)
+{
+ *m_outputStream << text << endl;
+ m_outputStream->flush();
+}
+
+void ScriptDebuggerPrivate::errorMessage(const QString &text)
+{
+ *m_errorStream << text << endl;
+ m_errorStream->flush();
+}
+
+void ScriptDebuggerPrivate::setMode(Mode mode)
+{
+ m_mode = mode;
+}
+
+ScriptDebuggerPrivate::Mode ScriptDebuggerPrivate::mode() const
+{
+ return m_mode;
+}
+
+QScriptContext *ScriptDebuggerPrivate::frameContext(int index) const
+{
+ QScriptContext *ctx = engine()->currentContext();
+ for (int i = 0; i < index; ++i) {
+ ctx = ctx->parentContext();
+ if (!ctx)
+ break;
+ }
+ return ctx;
+}
+
+int ScriptDebuggerPrivate::currentFrameIndex() const
+{
+ return m_currentFrameIndex;
+}
+
+void ScriptDebuggerPrivate::setCurrentFrameIndex(int index)
+{
+ m_currentFrameIndex = index;
+ m_listLineNumber = -1;
+}
+
+int ScriptDebuggerPrivate::listLineNumber() const
+{
+ return m_listLineNumber;
+}
+
+void ScriptDebuggerPrivate::setListLineNumber(int lineNumber)
+{
+ m_listLineNumber = lineNumber;
+}
+
+QScriptContext *ScriptDebuggerPrivate::currentFrameContext() const
+{
+ return frameContext(currentFrameIndex());
+}
+
+int ScriptDebuggerPrivate::frameCount() const
+{
+ int count = 0;
+ QScriptContext *ctx = engine()->currentContext();
+ while (ctx) {
+ ++count;
+ ctx = ctx->parentContext();
+ }
+ return count;
+}
+
+ScriptInfo *ScriptDebuggerPrivate::scriptInfo(QScriptContext *context) const
+{
+ QStack<qint64> pids = m_contextProgramIds.value(context);
+ if (pids.isEmpty())
+ return 0;
+ return m_scripts.value(pids.top());
+}
+
+void ScriptDebuggerPrivate::interactive()
+{
+ setCurrentFrameIndex(0);
+
+ QString qsdbgPrompt = QString::fromLatin1("(qsdbg) ");
+ QString dotPrompt = QString::fromLatin1(".... ");
+ QString prompt = qsdbgPrompt;
+
+ QString code;
+
+ forever {
+
+ *m_outputStream << prompt;
+ m_outputStream->flush();
+
+ QString line = readLine();
+
+ if (code.isEmpty() && (line.isEmpty() || line.startsWith(m_commandPrefix))) {
+ if (line.isEmpty())
+ line = m_lastInteractiveCommand;
+ else
+ m_lastInteractiveCommand = line;
+
+ QStringList parts = line.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ if (!parts.isEmpty()) {
+ QString command = parts.takeFirst().mid(1);
+ if (executeCommand(command, parts))
+ break;
+ }
+
+ } else {
+ if (line.isEmpty())
+ continue;
+
+ code += line;
+ code += QLatin1Char('\n');
+
+ if (line.trimmed().isEmpty()) {
+ continue;
+
+ } else if (! engine()->canEvaluate(code)) {
+ prompt = dotPrompt;
+
+ } else {
+ setMode(Run);
+ QScriptValue result = engine()->evaluate(code, QLatin1String("typein"));
+
+ code.clear();
+ prompt = qsdbgPrompt;
+
+ if (! result.isUndefined()) {
+ errorMessage(result.toString());
+ engine()->clearExceptions();
+ }
+ }
+ }
+ }
+}
+
+bool ScriptDebuggerPrivate::executeCommand(const QString &command, const QStringList &args)
+{
+ if (command == QLatin1String("c")
+ || command == QLatin1String("continue")) {
+ setMode(Run);
+ return true;
+ } else if (command == QLatin1String("s")
+ || command == QLatin1String("step")) {
+ setMode(StepInto);
+ return true;
+ } else if (command == QLatin1String("n")
+ || command == QLatin1String("next")) {
+ setMode(StepOver);
+ m_stepDepth = 0;
+ return true;
+ } else if (command == QLatin1String("f")
+ || command == QLatin1String("frame")) {
+ bool ok = false;
+ int index = args.value(0).toInt(&ok);
+ if (ok) {
+ if (index < 0 || index >= frameCount()) {
+ errorMessage("No such frame.");
+ } else {
+ setCurrentFrameIndex(index);
+ QScriptContext *ctx = currentFrameContext();
+ message(QString::fromLatin1("#%0 %1").arg(index).arg(ctx->toString()));
+ }
+ }
+ } else if (command == QLatin1String("bt")
+ || command == QLatin1String("backtrace")) {
+ QScriptContext *ctx = engine()->currentContext();
+ int index = -1;
+ while (ctx) {
+ ++index;
+ QString line = ctx->toString();
+ message(QString::fromLatin1("#%0 %1").arg(index).arg(line));
+ ctx = ctx->parentContext();
+ }
+ } else if (command == QLatin1String("up")) {
+ int index = currentFrameIndex() + 1;
+ if (index == frameCount()) {
+ errorMessage(QString::fromLatin1("Initial frame selected; you cannot go up."));
+ } else {
+ setCurrentFrameIndex(index);
+ QScriptContext *ctx = currentFrameContext();
+ message(QString::fromLatin1("#%0 %1").arg(index).arg(ctx->toString()));
+ }
+ } else if (command == QLatin1String("down")) {
+ int index = currentFrameIndex() - 1;
+ if (index < 0) {
+ errorMessage(QString::fromLatin1("Bottom (innermost) frame selected; you cannot go down."));
+ } else {
+ setCurrentFrameIndex(index);
+ QScriptContext *ctx = currentFrameContext();
+ message(QString::fromLatin1("#%0 %1").arg(index).arg(ctx->toString()));
+ }
+ } else if (command == QLatin1String("b")
+ || command == QLatin1String("break")) {
+ QString str = args.value(0);
+ int colonIndex = str.indexOf(QLatin1Char(':'));
+ if (colonIndex != -1) {
+ // filename:line form
+ QString fileName = str.left(colonIndex);
+ int lineNumber = str.mid(colonIndex+1).toInt();
+ int id = m_bpManager->setBreakpoint(fileName, lineNumber);
+ message(QString::fromLatin1("Breakpoint %0 at %1, line %2.").arg(id+1).arg(fileName).arg(lineNumber));
+ } else {
+ // function
+ QScriptValue fun = engine()->globalObject().property(str);
+ if (fun.isFunction()) {
+ int id = m_bpManager->setBreakpoint(fun);
+ message(QString::fromLatin1("Breakpoint %0 at %1().").arg(id+1).arg(str));
+ }
+ }
+ } else if (command == QLatin1String("d")
+ || command == QLatin1String("delete")) {
+ int id = args.value(0).toInt() - 1;
+ m_bpManager->removeBreakpoint(id);
+ } else if (command == QLatin1String("disable")) {
+ int id = args.value(0).toInt() - 1;
+ m_bpManager->setBreakpointEnabled(id, false);
+ } else if (command == QLatin1String("enable")) {
+ int id = args.value(0).toInt() - 1;
+ m_bpManager->setBreakpointEnabled(id, true);
+ } else if (command == QLatin1String("list")) {
+ QScriptContext *ctx = currentFrameContext();
+ ScriptInfo *progInfo = scriptInfo(ctx);
+ if (!progInfo) {
+ errorMessage("No source text available for this frame.");
+ } else {
+ QScriptContextInfo ctxInfo(ctx);
+ bool ok;
+ int line = args.value(0).toInt(&ok);
+ if (ok) {
+ line = qMax(1, line - 5);
+ } else {
+ line = listLineNumber();
+ if (line == -1)
+ line = qMax(progInfo->lineNumber(), ctxInfo.lineNumber() - 5);
+ }
+ for (int i = line; i < line + 10; ++i) {
+ message(QString::fromLatin1("%0\t%1").arg(i).arg(progInfo->lineText(i)));
+ }
+ setListLineNumber(line + 10);
+ }
+ } else if (command == QLatin1String("info")) {
+ if (args.size() < 1) {
+ } else {
+ QString what = args.value(0);
+ if (what == QLatin1String("locals")) {
+ QScriptValueIterator it(currentFrameContext()->activationObject());
+ while (it.hasNext()) {
+ it.next();
+ QString line;
+ line.append(it.name());
+ line.append(QLatin1String(" = "));
+ line.append(safeValueToString(it.value()));
+ message(line);
+ }
+ }
+ }
+ } else if (command == QLatin1String("help")) {
+ message("continue - continue execution\n"
+ "step - step into statement\n"
+ "next - step over statement\n"
+ "list - show where you are\n"
+ "\n"
+ "break - set breakpoint\n"
+ "delete - remove breakpoint\n"
+ "disable - disable breakpoint\n"
+ "enable - enable breakpoint\n"
+ "\n"
+ "backtrace - show backtrace\n"
+ "up - one frame up\n"
+ "down - one frame down\n"
+ "frame - set frame\n"
+ "\n"
+ "info locals - show local variables");
+ } else {
+ errorMessage(QString::fromLatin1("Undefined command \"%0\". Try \"help\".")
+ .arg(command));
+ }
+
+ return false;
+}
+
+
+// QScriptEngineAgent interface
+
+void ScriptDebuggerPrivate::scriptLoad(qint64 id, const QString &program,
+ const QString &fileName, int lineNumber)
+{
+ ScriptInfo *info = new ScriptInfo(program, fileName, lineNumber);
+ m_scripts.insert(id, info);
+}
+
+void ScriptDebuggerPrivate::scriptUnload(qint64 id)
+{
+ ScriptInfo *info = m_scripts.take(id);
+ delete info;
+}
+
+void ScriptDebuggerPrivate::functionEntry(qint64 scriptId)
+{
+ if (scriptId != -1) {
+ QScriptContext *ctx = engine()->currentContext();
+ QStack<qint64> ids = m_contextProgramIds.value(ctx);
+ ids.push(scriptId);
+ m_contextProgramIds.insert(ctx, ids);
+ }
+
+ if (mode() == StepOver)
+ ++m_stepDepth;
+}
+
+void ScriptDebuggerPrivate::functionExit(qint64 scriptId,
+ const QScriptValue &/*returnValue*/)
+{
+ if (scriptId != -1) {
+ QScriptContext *ctx = engine()->currentContext();
+ QStack<qint64> ids = m_contextProgramIds.value(ctx);
+ Q_ASSERT(!ids.isEmpty());
+ Q_ASSERT(ids.top() == scriptId);
+ ids.pop();
+ m_contextProgramIds.insert(ctx, ids);
+ }
+
+ if (mode() == StepOver)
+ --m_stepDepth;
+}
+
+void ScriptDebuggerPrivate::positionChange(qint64 scriptId,
+ int lineNumber, int /*columnNumber*/)
+{
+ ScriptInfo *info = 0;
+ bool enterInteractiveMode = false;
+
+ if (m_bpManager->hasBreakpoints()) {
+ // check if we hit a breakpoint
+ info = m_scripts.value(scriptId);
+ QScriptContext *ctx = engine()->currentContext();
+ QScriptContextInfo ctxInfo(ctx);
+ QScriptValue callee = ctx->callee();
+
+ // try fileName:lineNumber
+ int bpid = m_bpManager->findBreakpoint(info->fileName(), lineNumber);
+ if ((bpid != -1) && m_bpManager->isBreakpointEnabled(bpid)) {
+ message(QString::fromLatin1("Breakpoint %0 at %1:%2")
+ .arg(bpid + 1).arg(info->fileName()).arg(lineNumber));
+ if (m_bpManager->isBreakpointSingleShot(bpid))
+ m_bpManager->removeBreakpoint(bpid);
+ }
+ if (bpid == -1) {
+ // try function
+ bpid = m_bpManager->findBreakpoint(callee);
+ if ((bpid != -1) && m_bpManager->isBreakpointEnabled(bpid)) {
+ message(QString::fromLatin1("Breakpoint %0, %1()")
+ .arg(bpid + 1).arg(ctxInfo.functionName()));
+ if (m_bpManager->isBreakpointSingleShot(bpid))
+ m_bpManager->removeBreakpoint(bpid);
+ }
+ }
+ if ((bpid == -1) && !ctxInfo.functionName().isEmpty()) {
+ // try functionName:fileName
+ bpid = m_bpManager->findBreakpoint(ctxInfo.functionName(), ctxInfo.fileName());
+ if ((bpid != -1) && m_bpManager->isBreakpointEnabled(bpid)) {
+ message(QString::fromLatin1("Breakpoint %0, %1():%2").arg(bpid + 1)
+ .arg(ctxInfo.functionName()).arg(ctxInfo.fileName()));
+ if (m_bpManager->isBreakpointSingleShot(bpid))
+ m_bpManager->removeBreakpoint(bpid);
+ }
+ }
+
+ enterInteractiveMode = (bpid != -1);
+ }
+
+ switch (mode()) {
+ case Run:
+ break;
+
+ case StepInto:
+ enterInteractiveMode = true;
+ break;
+
+ case StepOver:
+ enterInteractiveMode = enterInteractiveMode || (m_stepDepth <= 0);
+ break;
+ }
+
+ if (enterInteractiveMode) {
+ if (!info)
+ info = m_scripts.value(scriptId);
+ Q_ASSERT(info);
+ message(QString::fromLatin1("%0\t%1").arg(lineNumber).arg(info->lineText(lineNumber)));
+ interactive();
+ }
+}
+
+void ScriptDebuggerPrivate::exceptionThrow(qint64 /*scriptId*/,
+ const QScriptValue &exception,
+ bool hasHandler)
+{
+ if (!hasHandler) {
+ errorMessage(QString::fromLatin1("uncaught exception: %0").arg(exception.toString()));
+ QScriptContext *ctx = engine()->currentContext();
+ int lineNumber = QScriptContextInfo(ctx).lineNumber();
+ ScriptInfo *info = scriptInfo(ctx);
+ QString lineText = info ? info->lineText(lineNumber) : QString("(no source text available)");
+ message(QString::fromLatin1("%0\t%1").arg(lineNumber).arg(lineText));
+ interactive();
+ }
+}
+
+
+
+ScriptDebugger::ScriptDebugger(QScriptEngine *engine)
+ : d_ptr(new ScriptDebuggerPrivate(engine))
+{
+ d_ptr->q_ptr = this;
+ engine->setAgent(d_ptr);
+}
+
+ScriptDebugger::ScriptDebugger(QScriptEngine *engine, ScriptDebuggerPrivate &dd)
+ : d_ptr(&dd)
+{
+ d_ptr->q_ptr = this;
+ engine->setAgent(d_ptr);
+}
+
+ScriptDebugger::~ScriptDebugger()
+{
+ delete d_ptr;
+ d_ptr = 0;
+}
+
+void ScriptDebugger::breakAtNextStatement()
+{
+ Q_D(ScriptDebugger);
+ d->setMode(ScriptDebuggerPrivate::StepInto);
+}
+
+void ScriptDebugger::setBreakpoint(const QString &fileName, int lineNumber)
+{
+ Q_D(ScriptDebugger);
+ d->m_bpManager->setBreakpoint(fileName, lineNumber);
+}
+
+void ScriptDebugger::setBreakpoint(const QString &functionName, const QString &fileName)
+{
+ Q_D(ScriptDebugger);
+ d->m_bpManager->setBreakpoint(functionName, fileName);
+}
+
+void ScriptDebugger::setBreakpoint(const QScriptValue &function)
+{
+ Q_D(ScriptDebugger);
+ d->m_bpManager->setBreakpoint(function);
+}
+
+QTextStream *ScriptDebugger::inputStream() const
+{
+ Q_D(const ScriptDebugger);
+ return d->m_inputStream;
+}
+
+void ScriptDebugger::setInputStream(QTextStream *inputStream)
+{
+ Q_D(ScriptDebugger);
+ d->m_inputStream = inputStream;
+}
+
+QTextStream *ScriptDebugger::outputStream() const
+{
+ Q_D(const ScriptDebugger);
+ return d->m_outputStream;
+}
+
+void ScriptDebugger::setOutputStream(QTextStream *outputStream)
+{
+ Q_D(ScriptDebugger);
+ d->m_outputStream = outputStream;
+}
+
+QTextStream *ScriptDebugger::errorStream() const
+{
+ Q_D(const ScriptDebugger);
+ return d->m_errorStream;
+}
+
+void ScriptDebugger::setErrorStream(QTextStream *errorStream)
+{
+ Q_D(ScriptDebugger);
+ d->m_errorStream = errorStream;
+}
diff --git a/examples/script/qsdbg/scriptdebugger.h b/examples/script/qsdbg/scriptdebugger.h
new file mode 100644
index 0000000..c33adf6
--- /dev/null
+++ b/examples/script/qsdbg/scriptdebugger.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCRIPTDEBUGGER_H
+#define SCRIPTDEBUGGER_H
+
+#include <QtCore/qlist.h>
+#include <QtCore/qstring.h>
+
+QT_BEGIN_NAMESPACE
+class QScriptEngine;
+class QScriptValue;
+class QTextStream;
+QT_END_NAMESPACE
+
+class ScriptDebuggerPrivate;
+class ScriptDebugger
+{
+public:
+ ScriptDebugger(QScriptEngine *engine);
+ virtual ~ScriptDebugger();
+
+ void breakAtNextStatement();
+
+ void setBreakpoint(const QString &fileName, int lineNumber);
+ void setBreakpoint(const QString &functionName, const QString &fileName = QString());
+ void setBreakpoint(const QScriptValue &function);
+
+ QTextStream *inputStream() const;
+ void setInputStream(QTextStream *inputStream);
+
+ QTextStream *outputStream() const;
+ void setOutputStream(QTextStream *outputStream);
+
+ QTextStream *errorStream() const;
+ void setErrorStream(QTextStream *errorStream);
+
+protected:
+ ScriptDebugger(QScriptEngine *engine, ScriptDebuggerPrivate &dd);
+ ScriptDebuggerPrivate *d_ptr;
+
+private:
+ Q_DECLARE_PRIVATE(ScriptDebugger)
+ Q_DISABLE_COPY(ScriptDebugger)
+};
+
+#endif // SCRIPTDEBUGGER_H
diff --git a/examples/script/qstetrix/main.cpp b/examples/script/qstetrix/main.cpp
new file mode 100644
index 0000000..6d7af45
--- /dev/null
+++ b/examples/script/qstetrix/main.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tetrixboard.h"
+
+#include <QtGui>
+#include <QtScript>
+#include <QUiLoader>
+
+#ifndef QT_NO_SCRIPTTOOLS
+#include <QtScriptTools>
+#endif
+
+struct QtMetaObject : private QObject
+{
+public:
+ static const QMetaObject *get()
+ { return &static_cast<QtMetaObject*>(0)->staticQtMetaObject; }
+};
+
+//! [0]
+class TetrixUiLoader : public QUiLoader
+{
+public:
+ TetrixUiLoader(QObject *parent = 0)
+ : QUiLoader(parent)
+ { }
+ virtual QWidget *createWidget(const QString &className, QWidget *parent = 0,
+ const QString &name = QString())
+ {
+ if (className == QLatin1String("TetrixBoard")) {
+ QWidget *board = new TetrixBoard(parent);
+ board->setObjectName(name);
+ return board;
+ }
+ return QUiLoader::createWidget(className, parent, name);
+ }
+};
+//! [0]
+
+static QScriptValue evaluateFile(QScriptEngine &engine, const QString &fileName)
+{
+ QFile file(fileName);
+ file.open(QIODevice::ReadOnly);
+ return engine.evaluate(file.readAll(), fileName);
+}
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(tetrix);
+
+//! [1]
+ QApplication app(argc, argv);
+ QScriptEngine engine;
+
+ QScriptValue Qt = engine.newQMetaObject(QtMetaObject::get());
+ Qt.setProperty("App", engine.newQObject(&app));
+ engine.globalObject().setProperty("Qt", Qt);
+//! [1]
+
+#ifndef QT_NO_SCRIPTTOOLS
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&engine);
+ QMainWindow *debugWindow = debugger.standardWindow();
+ debugWindow->resize(1024, 640);
+#endif
+
+//! [2]
+ evaluateFile(engine, ":/tetrixpiece.js");
+ evaluateFile(engine, ":/tetrixboard.js");
+ evaluateFile(engine, ":/tetrixwindow.js");
+//! [2]
+
+//! [3]
+ TetrixUiLoader loader;
+ QFile uiFile(":/tetrixwindow.ui");
+ uiFile.open(QIODevice::ReadOnly);
+ QWidget *ui = loader.load(&uiFile);
+ uiFile.close();
+
+ QScriptValue ctor = engine.evaluate("TetrixWindow");
+ QScriptValue scriptUi = engine.newQObject(ui, QScriptEngine::ScriptOwnership);
+ QScriptValue tetrix = ctor.construct(QScriptValueList() << scriptUi);
+//! [3]
+
+ QPushButton *debugButton = qFindChild<QPushButton*>(ui, "debugButton");
+#ifndef QT_NO_SCRIPTTOOLS
+ QObject::connect(debugButton, SIGNAL(clicked()),
+ debugger.action(QScriptEngineDebugger::InterruptAction),
+ SIGNAL(triggered()));
+ QObject::connect(debugButton, SIGNAL(clicked()),
+ debugWindow, SLOT(show()));
+#else
+ debugButton->hide();
+#endif
+
+//! [4]
+ ui->resize(550, 370);
+ ui->show();
+
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ return app.exec();
+//! [4]
+}
diff --git a/examples/script/qstetrix/qstetrix.pro b/examples/script/qstetrix/qstetrix.pro
new file mode 100644
index 0000000..3db66ab
--- /dev/null
+++ b/examples/script/qstetrix/qstetrix.pro
@@ -0,0 +1,17 @@
+QT += script
+CONFIG += uitools
+
+HEADERS = tetrixboard.h
+SOURCES = main.cpp \
+ tetrixboard.cpp
+
+FORMS = tetrixwindow.ui
+RESOURCES = tetrix.qrc
+
+contains(QT_CONFIG, scripttools): QT += scripttools
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script/qstetrix
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qstetrix.pro *.js
+sources.path = $$[QT_INSTALL_EXAMPLES]/script/qstetrix
+INSTALLS += target sources
diff --git a/examples/script/qstetrix/tetrix.qrc b/examples/script/qstetrix/tetrix.qrc
new file mode 100644
index 0000000..58d085a
--- /dev/null
+++ b/examples/script/qstetrix/tetrix.qrc
@@ -0,0 +1,8 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>tetrixwindow.js</file>
+ <file>tetrixwindow.ui</file>
+ <file>tetrixboard.js</file>
+ <file>tetrixpiece.js</file>
+ </qresource>
+</RCC>
diff --git a/examples/script/qstetrix/tetrixboard.cpp b/examples/script/qstetrix/tetrixboard.cpp
new file mode 100644
index 0000000..55c4d3c
--- /dev/null
+++ b/examples/script/qstetrix/tetrixboard.cpp
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "tetrixboard.h"
+
+#include <QtGui>
+
+Q_DECLARE_METATYPE(QPainter*)
+
+TetrixBoard::TetrixBoard(QWidget *parent)
+ : QFrame(parent)
+{
+ timer = new QTimer(this);
+ qMetaTypeId<QPainter*>();
+}
+
+void TetrixBoard::setNextPieceLabel(QWidget *label)
+{
+ nextPieceLabel = qobject_cast<QLabel*>(label);
+}
+
+QObject *TetrixBoard::getTimer()
+{
+ return timer;
+}
+
+QSize TetrixBoard::minimumSizeHint() const
+{
+ return QSize(BoardWidth * 5 + frameWidth() * 2,
+ BoardHeight * 5 + frameWidth() * 2);
+}
+
+void TetrixBoard::paintEvent(QPaintEvent *event)
+{
+ QFrame::paintEvent(event);
+ QPainter painter(this);
+ painter.drawImage(0, 0, image);
+}
+
+void TetrixBoard::keyPressEvent(QKeyEvent *event)
+{
+ emit keyPressed(event->key());
+}
+
+void TetrixBoard::showNextPiece(int width, int height)
+{
+ if (!nextPieceLabel)
+ return;
+
+ QPixmap pixmap(width * squareWidth(), height * squareHeight());
+ QPainter painter(&pixmap);
+ painter.fillRect(pixmap.rect(), nextPieceLabel->palette().background());
+
+ emit paintNextPieceRequested(&painter);
+
+ nextPieceLabel->setPixmap(pixmap);
+}
+
+void TetrixBoard::drawPauseScreen(QPainter *painter)
+{
+ painter->drawText(contentsRect(), Qt::AlignCenter, tr("Pause"));
+}
+
+void TetrixBoard::drawSquare(QPainter *painter, int x, int y, int shape)
+{
+ static const QRgb colorTable[8] = {
+ 0x000000, 0xCC6666, 0x66CC66, 0x6666CC,
+ 0xCCCC66, 0xCC66CC, 0x66CCCC, 0xDAAA00
+ };
+
+ x = x*squareWidth();
+ y = y*squareHeight();
+
+ QColor color = colorTable[shape];
+ painter->fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2,
+ color);
+
+ painter->setPen(color.light());
+ painter->drawLine(x, y + squareHeight() - 1, x, y);
+ painter->drawLine(x, y, x + squareWidth() - 1, y);
+
+ painter->setPen(color.dark());
+ painter->drawLine(x + 1, y + squareHeight() - 1,
+ x + squareWidth() - 1, y + squareHeight() - 1);
+ painter->drawLine(x + squareWidth() - 1, y + squareHeight() - 1,
+ x + squareWidth() - 1, y + 1);
+}
+
+void TetrixBoard::update()
+{
+ QRect rect = contentsRect();
+ if (image.size() != rect.size())
+ image = QImage(rect.size(), QImage::Format_ARGB32_Premultiplied);
+ image.fill(qRgba(0,0,0,0));
+ QPainter painter;
+ painter.begin(&image);
+ int boardTop = rect.bottom() - BoardHeight*squareHeight();
+ painter.translate(rect.left(), boardTop);
+ emit paintRequested(&painter);
+ QFrame::update();
+}
diff --git a/examples/script/qstetrix/tetrixboard.h b/examples/script/qstetrix/tetrixboard.h
new file mode 100644
index 0000000..e8c1016
--- /dev/null
+++ b/examples/script/qstetrix/tetrixboard.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TETRIXBOARD_H
+#define TETRIXBOARD_H
+
+#include <QTimer>
+#include <QFrame>
+#include <QPointer>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+
+class TetrixBoard : public QFrame
+{
+ Q_OBJECT
+ Q_PROPERTY(QObject* timer READ getTimer)
+ Q_PROPERTY(QWidget* nextPieceLabel WRITE setNextPieceLabel)
+
+public:
+ TetrixBoard(QWidget *parent = 0);
+
+ void setNextPieceLabel(QWidget *label);
+ void setBoardWidth(int width);
+ void setBoardHeight(int height);
+ QSize minimumSizeHint() const;
+
+ QObject *getTimer();
+
+signals:
+ void scoreChanged(int score);
+ void levelChanged(int level);
+ void linesRemovedChanged(int numLines);
+
+#if !defined(Q_MOC_RUN)
+private: // can only be emitted by TetrixBoard
+#endif
+ void keyPressed(int key);
+ void paintRequested(QPainter *painter);
+ void paintNextPieceRequested(QPainter *painter);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+
+protected slots:
+ void showNextPiece(int width, int height);
+ void drawPauseScreen(QPainter *painter);
+ void drawSquare(QPainter *painter, int x, int y, int shape);
+ void update();
+
+private:
+ enum { BoardWidth = 10, BoardHeight = 22 };
+
+ int squareWidth() { return contentsRect().width() / BoardWidth; }
+ int squareHeight() { return contentsRect().height() / BoardHeight; }
+
+ QTimer *timer;
+ QPointer<QLabel> nextPieceLabel;
+ QImage image;
+};
+
+#endif
diff --git a/examples/script/qstetrix/tetrixboard.js b/examples/script/qstetrix/tetrixboard.js
new file mode 100644
index 0000000..f198397
--- /dev/null
+++ b/examples/script/qstetrix/tetrixboard.js
@@ -0,0 +1,261 @@
+function TetrixBoard(ui)
+{
+ this.ui = ui;
+
+ this.isStarted = false;
+ this.isPaused = false;
+ this.inKeyPress = false;
+
+ this._board = new Array(TetrixBoard.BoardWidth * TetrixBoard.BoardHeight);
+ this.clearBoard();
+
+ this.curPiece = new TetrixPiece();
+ this.nextPiece = new TetrixPiece();
+ this.nextPiece.setRandomShape();
+
+ ui.timer.singleShot = true;
+ ui.timer.timeout.connect(this, this.onTimer);
+ ui.keyPressed.connect(this, this.onKeyPress);
+ ui.paintRequested.connect(this, this.onPaint);
+ ui.paintNextPieceRequested.connect(this, this.onPaintNextPiece);
+}
+
+TetrixBoard.BoardWidth = 10;
+TetrixBoard.BoardHeight = 22;
+
+TetrixBoard.prototype.start = function() {
+ if (this.isPaused)
+ return;
+
+ this.isStarted = true;
+ this.isWaitingAfterLine = false;
+ this.numLinesRemoved = 0;
+ this.numPiecesDropped = 0;
+ this.score = 0;
+ this.level = 1;
+ this.clearBoard();
+
+ this.ui.linesRemovedChanged(this.numLinesRemoved);
+ this.ui.scoreChanged(this.score);
+ this.ui.levelChanged(this.level);
+
+ this.newPiece();
+ this.ui.timer.start(this.timeoutTime());
+}
+
+TetrixBoard.prototype.pause = function() {
+ if (!this.isStarted)
+ return;
+
+ this.isPaused = !this.isPaused;
+ if (this.isPaused) {
+ this.ui.timer.stop();
+ } else {
+ this.ui.timer.start(this.timeoutTime());
+ }
+ this.ui.update();
+}
+
+TetrixBoard.prototype.getShapeAt = function(x, y) {
+ return this._board[(y * TetrixBoard.BoardWidth) + x];
+}
+
+TetrixBoard.prototype.setShapeAt = function(x, y, newShape) {
+ this._board[(y * TetrixBoard.BoardWidth) + x] = newShape;
+}
+
+TetrixBoard.prototype.clearBoard = function() {
+ for (var i = 0; i < TetrixBoard.BoardHeight * TetrixBoard.BoardWidth; ++i)
+ this._board[i] = TetrixShape.NoShape;
+}
+
+TetrixBoard.prototype.dropDown = function() {
+ var dropHeight = 0;
+ var newY = this.curY;
+ while (newY > 0) {
+ if (!this.tryMove(this.curPiece, this.curX, newY - 1))
+ break;
+ --newY;
+ ++dropHeight;
+ }
+ this.pieceDropped(dropHeight);
+}
+
+TetrixBoard.prototype.oneLineDown = function() {
+ if (!this.tryMove(this.curPiece, this.curX, this.curY - 1))
+ this.pieceDropped(0);
+}
+
+TetrixBoard.prototype.pieceDropped = function(dropHeight) {
+ for (var i = 0; i < 4; ++i) {
+ var x = this.curX + this.curPiece.getX(i);
+ var y = this.curY - this.curPiece.getY(i);
+ this.setShapeAt(x, y, this.curPiece.shape);
+ }
+
+ ++this.numPiecesDropped;
+ if ((this.numPiecesDropped % 25) == 0) {
+ ++this.level;
+ this.ui.timer.start(this.timeoutTime());
+ this.ui.levelChanged(this.level);
+ }
+
+ this.score += dropHeight + 7;
+ this.ui.scoreChanged(this.score);
+ this.removeFullLines();
+
+ if (!this.isWaitingAfterLine)
+ this.newPiece();
+
+ if (this.isStarted && !this.ui.timer.active)
+ this.ui.timer.start(this.timeoutTime());
+}
+
+TetrixBoard.prototype.removeFullLines = function() {
+ var numFullLines = 0;
+
+ for (var i = TetrixBoard.BoardHeight - 1; i >= 0; --i) {
+ var lineIsFull = true;
+
+ for (var j = 0; j < TetrixBoard.BoardWidth; ++j) {
+ if (this.getShapeAt(j, i) == TetrixShape.NoShape) {
+ lineIsFull = false;
+ break;
+ }
+ }
+
+ if (lineIsFull) {
+ ++numFullLines;
+ for (var k = i; k < TetrixBoard.BoardHeight - 1; ++k) {
+ for (var j = 0; j < TetrixBoard.BoardWidth; ++j)
+ this.setShapeAt(j, k, this.getShapeAt(j, k + 1));
+ }
+ for (var j = 0; j < TetrixBoard.BoardWidth; ++j)
+ this.setShapeAt(j, TetrixBoard.BoardHeight - 1, TetrixShape.NoShape);
+ }
+ }
+
+ if (numFullLines > 0) {
+ this.numLinesRemoved += numFullLines;
+ this.score += 10 * numFullLines;
+ this.ui.linesRemovedChanged(this.numLinesRemoved);
+ this.ui.scoreChanged(this.score);
+
+ this.ui.timer.start(500);
+ this.isWaitingAfterLine = true;
+ this.curPiece.shape = TetrixShape.NoShape;
+ this.ui.update();
+ }
+}
+
+TetrixBoard.prototype.newPiece = function() {
+ this.curPiece = this.nextPiece;
+ this.nextPiece = new TetrixPiece();
+ this.nextPiece.setRandomShape();
+ this.ui.showNextPiece(this.nextPiece.maxX - this.nextPiece.minX + 1,
+ this.nextPiece.maxY - this.nextPiece.minY + 1);
+ this.curX = TetrixBoard.BoardWidth / 2 + 1;
+ this.curY = TetrixBoard.BoardHeight - 1 + this.curPiece.minY;
+
+ if (!this.tryMove(this.curPiece, this.curX, this.curY)) {
+ this.curPiece.shape = TetrixShape.NoShape;
+ this.ui.timer.stop();
+ this.isStarted = false;
+ }
+}
+
+TetrixBoard.prototype.tryMove = function(newPiece, newX, newY) {
+ for (var i = 0; i < 4; ++i) {
+ var x = newX + newPiece.getX(i);
+ var y = newY - newPiece.getY(i);
+ if ((x < 0) || (x >= TetrixBoard.BoardWidth) || (y < 0) || (y >= TetrixBoard.BoardHeight))
+ return false;
+ if (this.getShapeAt(x, y) != TetrixShape.NoShape)
+ return false;
+ }
+
+ this.curPiece = newPiece;
+ this.curX = newX;
+ this.curY = newY;
+ this.ui.update();
+ return true;
+}
+
+TetrixBoard.prototype.onPaint = function(painter) {
+ if (this.isPaused) {
+ this.ui.drawPauseScreen(painter);
+ return;
+ }
+
+ for (var i = 0; i < TetrixBoard.BoardHeight; ++i) {
+ for (var j = 0; j < TetrixBoard.BoardWidth; ++j) {
+ var shape = this.getShapeAt(j, TetrixBoard.BoardHeight - i - 1);
+ if (shape != TetrixShape.NoShape)
+ this.ui.drawSquare(painter, j, i, shape);
+ }
+ }
+
+ if (this.curPiece.shape != TetrixShape.NoShape) {
+ for (var i = 0; i < 4; ++i) {
+ var x = this.curX + this.curPiece.getX(i);
+ var y = this.curY - this.curPiece.getY(i);
+ this.ui.drawSquare(painter, x, TetrixBoard.BoardHeight - y - 1,
+ this.curPiece.shape);
+ }
+ }
+}
+
+TetrixBoard.prototype.onPaintNextPiece = function(painter) {
+ for (var i = 0; i < 4; ++i) {
+ var x = this.nextPiece.getX(i) - this.nextPiece.minX;
+ var y = this.nextPiece.getY(i) - this.nextPiece.minY;
+ this.ui.drawSquare(painter, x, y, this.nextPiece.shape);
+ }
+}
+
+TetrixBoard.prototype.onKeyPress = function(key) {
+ if (!this.isStarted || this.isPaused || (this.curPiece.shape == TetrixShape.NoShape))
+ return;
+ this.inKeyPress = true;
+ switch (key) {
+ case Qt.Key_Left:
+ this.tryMove(this.curPiece, this.curX - 1, this.curY);
+ break;
+ case Qt.Key_Right:
+ this.tryMove(this.curPiece, this.curX + 1, this.curY);
+ break;
+ case Qt.Key_Down:
+ this.tryMove(this.curPiece.rotatedRight(), this.curX, this.curY);
+ break;
+ case Qt.Key_Up:
+ this.tryMove(this.curPiece.rotatedLeft(), this.curX, this.curY);
+ break;
+ case Qt.Key_Space:
+ this.dropDown();
+ break;
+ case Qt.Key_D:
+ this.oneLineDown();
+ break;
+ }
+ this.inKeyPress = false;
+ if (this.isStarted && !this.ui.timer.active)
+ this.ui.timer.start(this.timeoutTime());
+}
+
+TetrixBoard.prototype.onTimer = function() {
+ if (this.isWaitingAfterLine) {
+ this.isWaitingAfterLine = false;
+ this.newPiece();
+ this.ui.timer.start(this.timeoutTime());
+ } else {
+ if (!this.inKeyPress) {
+ this.oneLineDown();
+ if (this.isStarted && !this.ui.timer.active)
+ this.ui.timer.start(this.timeoutTime());
+ }
+ }
+}
+
+TetrixBoard.prototype.timeoutTime = function() {
+ return 1000 / (1 + this.level);
+}
diff --git a/examples/script/qstetrix/tetrixpiece.js b/examples/script/qstetrix/tetrixpiece.js
new file mode 100644
index 0000000..e99fa8a
--- /dev/null
+++ b/examples/script/qstetrix/tetrixpiece.js
@@ -0,0 +1,131 @@
+TetrixShape = {
+ NoShape:0,
+ ZShape:1,
+ SShape:2,
+ LineShape:3,
+ TShape:4,
+ SquareShape:5,
+ LShape:6,
+ MirroredLShape:7
+}
+
+TetrixCoordsTable = [
+ [ [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
+ [ [ 0, -1 ], [ 0, 0 ], [ -1, 0 ], [ -1, 1 ] ],
+ [ [ 0, -1 ], [ 0, 0 ], [ 1, 0 ], [ 1, 1 ] ],
+ [ [ 0, -1 ], [ 0, 0 ], [ 0, 1 ], [ 0, 2 ] ],
+ [ [ -1, 0 ], [ 0, 0 ], [ 1, 0 ], [ 0, 1 ] ],
+ [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 1, 1 ] ],
+ [ [ -1, -1 ], [ 0, -1 ], [ 0, 0 ], [ 0, 1 ] ],
+ [ [ 1, -1 ], [ 0, -1 ], [ 0, 0 ], [ 0, 1 ] ]
+]
+
+function TetrixPiece()
+{
+ this.shape = TetrixShape.NoShape;
+}
+
+TetrixPiece.prototype.__defineGetter__(
+ "shape",
+ function() {
+ return this._shape;
+ }
+);
+
+TetrixPiece.prototype.__defineSetter__(
+ "shape",
+ function(shape) {
+ this._shape = shape;
+ this._coords = new Array(4);
+ for (var i = 0; i < 4; ++i)
+ this._coords[i] = TetrixCoordsTable[shape][i].slice();
+ }
+);
+
+TetrixPiece.prototype.setRandomShape = function() {
+ this.shape = Math.floor(((Math.random() * 100000) % 7) + 1);
+}
+
+TetrixPiece.prototype.getX = function(index) {
+ return this._coords[index][0];
+}
+
+TetrixPiece.prototype.getY = function(index) {
+ return this._coords[index][1];
+}
+
+TetrixPiece.prototype._setX = function(index, x) {
+ this._coords[index][0] = x;
+}
+
+TetrixPiece.prototype._setY = function(index, y) {
+ this._coords[index][1] = y;
+}
+
+TetrixPiece.prototype.__defineGetter__(
+ "minX",
+ function() {
+ var min = this._coords[0][0];
+ for (var i = 1; i < 4; ++i)
+ min = Math.min(min, this._coords[i][0]);
+ return min;
+ }
+);
+
+TetrixPiece.prototype.__defineGetter__(
+ "maxX",
+ function() {
+ var max = this._coords[0][0];
+ for (var i = 1; i < 4; ++i)
+ max = Math.max(max, this._coords[i][0]);
+ return max;
+ }
+);
+
+TetrixPiece.prototype.__defineGetter__(
+ "minY",
+ function() {
+ var min = this._coords[0][1];
+ for (var i = 1; i < 4; ++i)
+ min = Math.min(min, this._coords[i][1]);
+ return min;
+ }
+);
+
+TetrixPiece.prototype.__defineGetter__(
+ "maxY",
+ function() {
+ var max = this._coords[0][1];
+ for (var i = 1; i < 4; ++i)
+ max = Math.max(max, this._coords[i][1]);
+ return max;
+ }
+);
+
+TetrixPiece.prototype.rotatedLeft = function() {
+ var result = new TetrixPiece();
+ if (this._shape == TetrixShape.SquareShape) {
+ result.shape = this._shape;
+ return result;
+ }
+ result._shape = this._shape;
+ for (var i = 0; i < 4; ++i) {
+ result._setX(i, this.getY(i));
+ result._setY(i, -this.getX(i));
+ }
+ return result;
+}
+
+TetrixPiece.prototype.rotatedRight = function() {
+ var result = new TetrixPiece();
+ if (this._shape == TetrixShape.SquareShape) {
+ result.shape = this._shape;
+ return result;
+ }
+ result._shape = this._shape;
+ for (var i = 0; i < 4; ++i) {
+ result._setX(i, -this.getY(i));
+ result._setY(i, this.getX(i));
+ }
+ return result;
+}
diff --git a/examples/script/qstetrix/tetrixwindow.js b/examples/script/qstetrix/tetrixwindow.js
new file mode 100644
index 0000000..6157a8c
--- /dev/null
+++ b/examples/script/qstetrix/tetrixwindow.js
@@ -0,0 +1,16 @@
+function TetrixWindow(ui)
+{
+ this.ui = ui;
+
+ var boardUi = ui.findChild("board");
+ boardUi.nextPieceLabel = ui.findChild("nextPieceLabel");
+
+ this.board = new TetrixBoard(boardUi);
+
+ ui.findChild("startButton").clicked.connect(this.board, this.board.start);
+ ui.findChild("quitButton").clicked.connect(Qt.App.quit);
+ ui.findChild("pauseButton").clicked.connect(this.board, this.board.pause);
+ boardUi.scoreChanged.connect(ui.findChild("scoreLcd")["display(int)"]);
+ boardUi.levelChanged.connect(ui.findChild("levelLcd")["display(int)"]);
+ boardUi.linesRemovedChanged.connect(ui.findChild("linesLcd")["display(int)"]);
+}
diff --git a/examples/script/qstetrix/tetrixwindow.ui b/examples/script/qstetrix/tetrixwindow.ui
new file mode 100644
index 0000000..a53e94f
--- /dev/null
+++ b/examples/script/qstetrix/tetrixwindow.ui
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>TetrixWindow</class>
+ <widget class="QWidget" name="TetrixWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>537</width>
+ <height>475</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Tetrix</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <item>
+ <layout class="QGridLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="4" column="0">
+ <widget class="QPushButton" name="startButton">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Start</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QLCDNumber" name="linesLcd">
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Filled</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="linesRemovedLabel">
+ <property name="text">
+ <string>LINES REMOVED</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLCDNumber" name="scoreLcd">
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Filled</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" rowspan="6">
+ <widget class="TetrixBoard" name="board">
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="levelLabel">
+ <property name="text">
+ <string>LEVEL</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="nextLabel">
+ <property name="text">
+ <string>NEXT</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLCDNumber" name="levelLcd">
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Filled</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="scoreLabel">
+ <property name="text">
+ <string>SCORE</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="nextPieceLabel">
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QPushButton" name="quitButton">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Quit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QPushButton" name="pauseButton">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QPushButton" name="debugButton">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Debug</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>TetrixBoard</class>
+ <extends>QFrame</extends>
+ <header>tetrixboard.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/script/script.pro b/examples/script/script.pro
new file mode 100644
index 0000000..ae3542e
--- /dev/null
+++ b/examples/script/script.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+SUBDIRS = helloscript context2d defaultprototypes customclass
+
+!wince*:SUBDIRS += qscript marshal
+!wince*:!cross_compile:SUBDIRS += calculator qstetrix
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/script
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS script.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/script
+INSTALLS += target sources
diff --git a/examples/sql/README b/examples/sql/README
new file mode 100644
index 0000000..56b4b3e
--- /dev/null
+++ b/examples/sql/README
@@ -0,0 +1,40 @@
+Qt provides extensive database interoperability, with support for products
+from both open source and proprietary vendors.
+
+SQL support is integrated with Qt's model/view architecture, making it easier
+to provide GUI integration for your database applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro
new file mode 100644
index 0000000..a14aa42
--- /dev/null
+++ b/examples/sql/cachedtable/cachedtable.pro
@@ -0,0 +1,11 @@
+HEADERS = ../connection.h \
+ tableeditor.h
+SOURCES = main.cpp \
+ tableeditor.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS cachedtable.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable
+INSTALLS += target sources
diff --git a/examples/sql/cachedtable/main.cpp b/examples/sql/cachedtable/main.cpp
new file mode 100644
index 0000000..47e3b9f
--- /dev/null
+++ b/examples/sql/cachedtable/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "../connection.h"
+#include "tableeditor.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!createConnection())
+ return 1;
+
+ TableEditor editor("person");
+ editor.show();
+ return editor.exec();
+}
+//! [0]
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
new file mode 100644
index 0000000..33ddd54
--- /dev/null
+++ b/examples/sql/cachedtable/tableeditor.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSql>
+
+#include "tableeditor.h"
+
+//! [0]
+TableEditor::TableEditor(const QString &tableName, QWidget *parent)
+ : QDialog(parent)
+{
+ model = new QSqlTableModel(this);
+ model->setTable(tableName);
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+ model->select();
+
+ model->setHeaderData(0, Qt::Horizontal, tr("ID"));
+ model->setHeaderData(1, Qt::Horizontal, tr("First name"));
+ model->setHeaderData(2, Qt::Horizontal, tr("Last name"));
+
+//! [0] //! [1]
+ QTableView *view = new QTableView;
+ view->setModel(model);
+//! [1]
+
+//! [2]
+ submitButton = new QPushButton(tr("Submit"));
+ submitButton->setDefault(true);
+ revertButton = new QPushButton(tr("&Revert"));
+ quitButton = new QPushButton(tr("Quit"));
+
+ buttonBox = new QDialogButtonBox(Qt::Vertical);
+ buttonBox->addButton(submitButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(revertButton, QDialogButtonBox::ActionRole);
+ buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
+//! [2]
+
+//! [3]
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submit()));
+ connect(revertButton, SIGNAL(clicked()), model, SLOT(revertAll()));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+//! [3]
+
+//! [4]
+ QHBoxLayout *mainLayout = new QHBoxLayout;
+ mainLayout->addWidget(view);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Cached Table"));
+}
+//! [4]
+
+//! [5]
+void TableEditor::submit()
+{
+ model->database().transaction();
+ if (model->submitAll()) {
+ model->database().commit();
+ } else {
+ model->database().rollback();
+ QMessageBox::warning(this, tr("Cached Table"),
+ tr("The database reported an error: %1")
+ .arg(model->lastError().text()));
+ }
+}
+//! [5]
diff --git a/examples/sql/cachedtable/tableeditor.h b/examples/sql/cachedtable/tableeditor.h
new file mode 100644
index 0000000..3485fd3
--- /dev/null
+++ b/examples/sql/cachedtable/tableeditor.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABLEEDITOR_H
+#define TABLEEDITOR_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+class QPushButton;
+class QSqlTableModel;
+QT_END_NAMESPACE
+
+//! [0]
+class TableEditor : public QDialog
+{
+ Q_OBJECT
+
+public:
+ TableEditor(const QString &tableName, QWidget *parent = 0);
+
+private slots:
+ void submit();
+
+private:
+ QPushButton *submitButton;
+ QPushButton *revertButton;
+ QPushButton *quitButton;
+ QDialogButtonBox *buttonBox;
+ QSqlTableModel *model;
+};
+//! [0]
+
+#endif
diff --git a/examples/sql/connection.h b/examples/sql/connection.h
new file mode 100644
index 0000000..d4b77ef
--- /dev/null
+++ b/examples/sql/connection.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONNECTION_H
+#define CONNECTION_H
+
+#include <QMessageBox>
+#include <QSqlDatabase>
+#include <QSqlError>
+#include <QSqlQuery>
+
+/*
+ This file defines a helper function to open a connection to an
+ in-memory SQLITE database and to create a test table.
+
+ If you want to use another database, simply modify the code
+ below. All the examples in this directory use this function to
+ connect to a database.
+*/
+//! [0]
+static bool createConnection()
+{
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
+ db.setDatabaseName(":memory:");
+ if (!db.open()) {
+ QMessageBox::critical(0, qApp->tr("Cannot open database"),
+ qApp->tr("Unable to establish a database connection.\n"
+ "This example needs SQLite support. Please read "
+ "the Qt SQL driver documentation for information how "
+ "to build it.\n\n"
+ "Click Cancel to exit."), QMessageBox::Cancel);
+ return false;
+ }
+
+ QSqlQuery query;
+ query.exec("create table person (id int primary key, "
+ "firstname varchar(20), lastname varchar(20))");
+ query.exec("insert into person values(101, 'Danny', 'Young')");
+ query.exec("insert into person values(102, 'Christine', 'Holand')");
+ query.exec("insert into person values(103, 'Lars', 'Gordon')");
+ query.exec("insert into person values(104, 'Roberto', 'Robitaille')");
+ query.exec("insert into person values(105, 'Maria', 'Papadopoulos')");
+
+ query.exec("create table offices (id int primary key,"
+ "imagefile int,"
+ "location varchar(20),"
+ "country varchar(20),"
+ "description varchar(100))");
+ query.exec("insert into offices "
+ "values(0, 0, 'Oslo', 'Norway',"
+ "'Oslo is home to more than 500 000 citizens and has a "
+ "lot to offer.It has been called \"The city with the big "
+ "heart\" and this is a nickname we are happy to live up to.')");
+ query.exec("insert into offices "
+ "values(1, 1, 'Brisbane', 'Australia',"
+ "'Brisbane is the capital of Queensland, the Sunshine State, "
+ "where it is beautiful one day, perfect the next. "
+ "Brisbane is Australia''s 3rd largest city, being home "
+ "to almost 2 million people.')");
+ query.exec("insert into offices "
+ "values(2, 2, 'Redwood City', 'US',"
+ "'You find Redwood City in the heart of the Bay Area "
+ "just north of Silicon Valley. The largest nearby city is "
+ "San Jose which is the third largest city in California "
+ "and the 10th largest in the US.')");
+ query.exec("insert into offices "
+ "values(3, 3, 'Berlin', 'Germany',"
+ "'Berlin, the capital of Germany is dynamic, cosmopolitan "
+ "and creative, allowing for every kind of lifestyle. "
+ "East meets West in the metropolis at the heart of a "
+ "changing Europe.')");
+ query.exec("insert into offices "
+ "values(4, 4, 'Munich', 'Germany',"
+ "'Several technology companies are represented in Munich, "
+ "and the city is often called the \"Bavarian Silicon Valley\". "
+ "The exciting city is also filled with culture, "
+ "art and music. ')");
+ query.exec("insert into offices "
+ "values(5, 5, 'Beijing', 'China',"
+ "'Beijing as a capital city has more than 3000 years of "
+ "history. Today the city counts 12 million citizens, and "
+ "is the political, economic and cultural centre of China.')");
+
+ query.exec("create table images (locationid int, file varchar(20))");
+ query.exec("insert into images values(0, 'images/oslo.png')");
+ query.exec("insert into images values(1, 'images/brisbane.png')");
+ query.exec("insert into images values(2, 'images/redwood.png')");
+ query.exec("insert into images values(3, 'images/berlin.png')");
+ query.exec("insert into images values(4, 'images/munich.png')");
+ query.exec("insert into images values(5, 'images/beijing.png')");
+
+
+
+ return true;
+}
+//! [0]
+
+#endif
diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro
new file mode 100644
index 0000000..e15a4ad
--- /dev/null
+++ b/examples/sql/drilldown/drilldown.pro
@@ -0,0 +1,16 @@
+HEADERS = ../connection.h \
+ imageitem.h \
+ informationwindow.h \
+ view.h
+RESOURCES = drilldown.qrc
+SOURCES = imageitem.cpp \
+ informationwindow.cpp \
+ main.cpp \
+ view.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS drilldown.pro *.png *.jpg images
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown
+INSTALLS += target sources
diff --git a/examples/sql/drilldown/drilldown.qrc b/examples/sql/drilldown/drilldown.qrc
new file mode 100644
index 0000000..d2fb122
--- /dev/null
+++ b/examples/sql/drilldown/drilldown.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>images/oslo.png</file>
+ <file>images/brisbane.png</file>
+ <file>images/redwood.png</file>
+ <file>images/berlin.png</file>
+ <file>images/munich.png</file>
+ <file>images/beijing.png</file>
+ <file>logo.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/sql/drilldown/imageitem.cpp b/examples/sql/drilldown/imageitem.cpp
new file mode 100644
index 0000000..620afed
--- /dev/null
+++ b/examples/sql/drilldown/imageitem.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "imageitem.h"
+
+//! [0]
+ImageItem::ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent,
+ QGraphicsScene *scene)
+ : QGraphicsPixmapItem(pixmap, parent, scene)
+{
+ recordId = id;
+ setAcceptsHoverEvents(true);
+
+ timeLine.setDuration(150);
+ timeLine.setFrameRange(0, 150);
+
+ connect(&timeLine, SIGNAL(frameChanged(int)), this, SLOT(setFrame(int)));
+ connect(&timeLine, SIGNAL(finished()), this, SLOT(updateItemPosition()));
+
+ adjust();
+}
+//! [0]
+
+//! [1]
+void ImageItem::hoverEnterEvent(QGraphicsSceneHoverEvent * /*event*/)
+{
+ timeLine.setDirection(QTimeLine::Forward);
+
+ if (z != 1.0) {
+ z = 1.0;
+ updateItemPosition();
+ }
+
+ if (timeLine.state() == QTimeLine::NotRunning)
+ timeLine.start();
+}
+//! [1]
+
+//! [2]
+void ImageItem::hoverLeaveEvent(QGraphicsSceneHoverEvent * /*event*/)
+{
+ timeLine.setDirection(QTimeLine::Backward);
+ if (z != 0.0)
+ z = 0.0;
+
+ if (timeLine.state() == QTimeLine::NotRunning)
+ timeLine.start();
+}
+//! [2]
+
+//! [3]
+void ImageItem::setFrame(int frame)
+{
+ adjust();
+ QPointF center = boundingRect().center();
+
+ translate(center.x(), center.y());
+ scale(1 + frame / 330.0, 1 + frame / 330.0);
+ translate(-center.x(), -center.y());
+}
+//! [3]
+
+//! [4]
+void ImageItem::adjust()
+{
+ QMatrix matrix;
+ matrix.scale(150/ boundingRect().width(), 120/ boundingRect().height());
+ setMatrix(matrix);
+}
+//! [4]
+
+//! [5]
+int ImageItem::id()
+{
+ return recordId;
+}
+//! [5]
+
+//! [6]
+void ImageItem::updateItemPosition()
+{
+ setZValue(z);
+}
+//! [6]
+
+
diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h
new file mode 100644
index 0000000..20c7811
--- /dev/null
+++ b/examples/sql/drilldown/imageitem.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEITEM_H
+#define IMAGEITEM_H
+
+#include <QtCore>
+#include <QtGui/QGraphicsPixmapItem>
+
+//! [0]
+class ImageItem : public QObject, public QGraphicsPixmapItem
+{
+ Q_OBJECT
+
+public:
+ ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent = 0,
+ QGraphicsScene *scene = 0);
+
+ void adjust();
+ int id();
+
+protected:
+ void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
+
+private slots:
+ void setFrame(int frame);
+ void updateItemPosition();
+
+private:
+ QTimeLine timeLine;
+ int recordId;
+ double z;
+};
+//! [0]
+
+#endif
diff --git a/examples/sql/drilldown/images/beijing.png b/examples/sql/drilldown/images/beijing.png
new file mode 100644
index 0000000..45df148
--- /dev/null
+++ b/examples/sql/drilldown/images/beijing.png
Binary files differ
diff --git a/examples/sql/drilldown/images/berlin.png b/examples/sql/drilldown/images/berlin.png
new file mode 100644
index 0000000..ead62f0
--- /dev/null
+++ b/examples/sql/drilldown/images/berlin.png
Binary files differ
diff --git a/examples/sql/drilldown/images/brisbane.png b/examples/sql/drilldown/images/brisbane.png
new file mode 100644
index 0000000..04fff57
--- /dev/null
+++ b/examples/sql/drilldown/images/brisbane.png
Binary files differ
diff --git a/examples/sql/drilldown/images/munich.png b/examples/sql/drilldown/images/munich.png
new file mode 100644
index 0000000..741eb77
--- /dev/null
+++ b/examples/sql/drilldown/images/munich.png
Binary files differ
diff --git a/examples/sql/drilldown/images/oslo.png b/examples/sql/drilldown/images/oslo.png
new file mode 100644
index 0000000..02fa25e
--- /dev/null
+++ b/examples/sql/drilldown/images/oslo.png
Binary files differ
diff --git a/examples/sql/drilldown/images/redwood.png b/examples/sql/drilldown/images/redwood.png
new file mode 100644
index 0000000..f39ac06
--- /dev/null
+++ b/examples/sql/drilldown/images/redwood.png
Binary files differ
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
new file mode 100644
index 0000000..6573ae1
--- /dev/null
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "informationwindow.h"
+
+//! [0]
+InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
+ QWidget *parent)
+ : QDialog(parent)
+{
+//! [0] //! [1]
+ QLabel *locationLabel = new QLabel(tr("Location: "));
+ QLabel *countryLabel = new QLabel(tr("Country: "));
+ QLabel *descriptionLabel = new QLabel(tr("Description: "));
+ QLabel *imageFileLabel = new QLabel(tr("Image file: "));
+
+ createButtons();
+
+ locationText = new QLabel;
+ countryText = new QLabel;
+ descriptionEditor = new QTextEdit;
+//! [1]
+
+//! [2]
+ imageFileEditor = new QComboBox;
+ imageFileEditor->setModel(offices->relationModel(1));
+ imageFileEditor->setModelColumn(offices->relationModel(1)->fieldIndex("file"));
+//! [2]
+
+//! [3]
+ mapper = new QDataWidgetMapper(this);
+ mapper->setModel(offices);
+ mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
+ mapper->setItemDelegate(new QSqlRelationalDelegate(mapper));
+ mapper->addMapping(imageFileEditor, 1);
+ mapper->addMapping(locationText, 2, "text");
+ mapper->addMapping(countryText, 3, "text");
+ mapper->addMapping(descriptionEditor, 4);
+ mapper->setCurrentIndex(id);
+//! [3]
+
+//! [4]
+ connect(descriptionEditor, SIGNAL(textChanged()),
+ this, SLOT(enableButtons()));
+ connect(imageFileEditor, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(enableButtons()));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(locationLabel, 0, 0, Qt::AlignLeft | Qt::AlignTop);
+ layout->addWidget(countryLabel, 1, 0, Qt::AlignLeft | Qt::AlignTop);
+ layout->addWidget(imageFileLabel, 2, 0, Qt::AlignLeft | Qt::AlignTop);
+ layout->addWidget(descriptionLabel, 3, 0, Qt::AlignLeft | Qt::AlignTop);
+ layout->addWidget(locationText, 0, 1);
+ layout->addWidget(countryText, 1, 1);
+ layout->addWidget(imageFileEditor, 2, 1);
+ layout->addWidget(descriptionEditor, 3, 1);
+ layout->addWidget(buttonBox, 4, 0, 1, 2);
+ setLayout(layout);
+
+ locationId = id;
+ displayedImage = imageFileEditor->currentText();
+
+ setWindowFlags(Qt::Window);
+ enableButtons(false);
+ setWindowTitle(tr("Office: %1").arg(locationText->text()));
+ resize(320, sizeHint().height());
+}
+//! [4]
+
+//! [5]
+int InformationWindow::id()
+{
+ return locationId;
+}
+//! [5]
+
+//! [6]
+void InformationWindow::revert()
+{
+ mapper->revert();
+ enableButtons(false);
+}
+//! [6]
+
+//! [7]
+void InformationWindow::submit()
+{
+ QString newImage(imageFileEditor->currentText());
+
+ if (displayedImage != newImage) {
+ displayedImage = newImage;
+ emit imageChanged(locationId, newImage);
+ }
+
+ mapper->submit();
+ mapper->setCurrentIndex(locationId);
+
+ enableButtons(false);
+}
+//! [7]
+
+//! [8]
+void InformationWindow::createButtons()
+{
+ closeButton = new QPushButton(tr("&Close"));
+ revertButton = new QPushButton(tr("&Revert"));
+ submitButton = new QPushButton(tr("&Submit"));
+
+ closeButton->setDefault(true);
+
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(revertButton, SIGNAL(clicked()), this, SLOT(revert()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submit()));
+//! [8]
+
+//! [9]
+ buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(submitButton, QDialogButtonBox::ResetRole);
+ buttonBox->addButton(revertButton, QDialogButtonBox::ResetRole);
+ buttonBox->addButton(closeButton, QDialogButtonBox::RejectRole);
+}
+//! [9]
+
+//! [10]
+void InformationWindow::enableButtons(bool enable)
+{
+ revertButton->setEnabled(enable);
+ submitButton->setEnabled(enable);
+}
+//! [10]
+
+
diff --git a/examples/sql/drilldown/informationwindow.h b/examples/sql/drilldown/informationwindow.h
new file mode 100644
index 0000000..f28b47d
--- /dev/null
+++ b/examples/sql/drilldown/informationwindow.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef INFORMATIONWINDOW_H
+#define INFORMATIONWINDOW_H
+
+#include <QtGui>
+#include <QtSql>
+
+//! [0]
+class InformationWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ InformationWindow(int id, QSqlRelationalTableModel *offices,
+ QWidget *parent = 0);
+
+ int id();
+
+signals:
+ void imageChanged(int id, const QString &fileName);
+//! [0]
+
+//! [1]
+private slots:
+ void revert();
+ void submit();
+ void enableButtons(bool enable = true);
+//! [1]
+
+//! [2]
+private:
+ void createButtons();
+
+ int locationId;
+ QString displayedImage;
+
+ QComboBox *imageFileEditor;
+ QLabel *locationText;
+ QLabel *countryText;
+ QTextEdit *descriptionEditor;
+
+ QPushButton *closeButton;
+ QPushButton *submitButton;
+ QPushButton *revertButton;
+ QDialogButtonBox *buttonBox;
+
+ QDataWidgetMapper *mapper;
+};
+//! [2]
+
+#endif
diff --git a/examples/sql/drilldown/logo.png b/examples/sql/drilldown/logo.png
new file mode 100644
index 0000000..4b1d235
--- /dev/null
+++ b/examples/sql/drilldown/logo.png
Binary files differ
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
new file mode 100644
index 0000000..ee5a4d5
--- /dev/null
+++ b/examples/sql/drilldown/main.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "../connection.h"
+#include "view.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(drilldown);
+
+ QApplication app(argc, argv);
+
+ if (!createConnection())
+ return 1;
+
+ View view("offices", "images");
+ view.show();
+ return app.exec();
+}
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
new file mode 100644
index 0000000..763d094
--- /dev/null
+++ b/examples/sql/drilldown/view.cpp
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "informationwindow.h"
+#include "imageitem.h"
+#include "view.h"
+
+//! [0]
+View::View(const QString &offices, const QString &images, QWidget *parent)
+ : QGraphicsView(parent)
+{
+ officeTable = new QSqlRelationalTableModel(this);
+ officeTable->setTable(offices);
+ officeTable->setRelation(1, QSqlRelation(images, "locationid", "file"));
+ officeTable->select();
+//! [0]
+
+//! [1]
+ scene = new QGraphicsScene(this);
+ scene->setSceneRect(0, 0, 465, 615);
+ setScene(scene);
+
+ addItems();
+
+ QGraphicsPixmapItem *logo = scene->addPixmap(QPixmap(":/logo.png"));
+ logo->setPos(30, 515);
+
+ setMinimumSize(470, 620);
+ setMaximumSize(470, 620);
+ setWindowTitle(tr("Offices World Wide"));
+}
+//! [1]
+
+//! [3]
+void View::addItems()
+{
+ int officeCount = officeTable->rowCount();
+
+ int imageOffset = 150;
+ int leftMargin = 70;
+ int topMargin = 40;
+
+ for (int i = 0; i < officeCount; i++) {
+ ImageItem *image;
+ QGraphicsTextItem *label;
+ QSqlRecord record = officeTable->record(i);
+
+ int id = record.value("id").toInt();
+ QString file = record.value("file").toString();
+ QString location = record.value("location").toString();
+
+ int columnOffset = ((i / 3) * 37);
+ int x = ((i / 3) * imageOffset) + leftMargin + columnOffset;
+ int y = ((i % 3) * imageOffset) + topMargin;
+
+ image = new ImageItem(id, QPixmap(":/" + file));
+ image->setData(0, i);
+ image->setPos(x, y);
+ scene->addItem(image);
+
+ label = scene->addText(location);
+ QPointF labelOffset((150 - label->boundingRect().width()) / 2, 120.0);
+ label->setPos(QPointF(x, y) + labelOffset);
+ }
+}
+//! [3]
+
+//! [5]
+void View::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (QGraphicsItem *item = itemAt(event->pos())) {
+ if (ImageItem *image = qgraphicsitem_cast<ImageItem *>(item))
+ showInformation(image);
+ }
+ QGraphicsView::mouseReleaseEvent(event);
+}
+//! [5]
+
+//! [6]
+void View::showInformation(ImageItem *image)
+{
+ int id = image->id();
+ if (id < 0 || id >= officeTable->rowCount())
+ return;
+
+ InformationWindow *window = findWindow(id);
+ if (window && window->isVisible()) {
+ window->raise();
+ window->activateWindow();
+ } else if (window && !window->isVisible()) {
+ window->show();
+ } else {
+ InformationWindow *window;
+ window = new InformationWindow(id, officeTable, this);
+
+ connect(window, SIGNAL(imageChanged(int, QString)),
+ this, SLOT(updateImage(int, QString)));
+
+ window->move(pos() + QPoint(20, 40));
+ window->show();
+ informationWindows.append(window);
+ }
+}
+//! [6]
+
+//! [7]
+void View::updateImage(int id, const QString &fileName)
+{
+ QList<QGraphicsItem *> items = scene->items();
+
+ while(!items.empty()) {
+ QGraphicsItem *item = items.takeFirst();
+
+ if (ImageItem *image = qgraphicsitem_cast<ImageItem *>(item)) {
+ if (image->id() == id){
+ image->setPixmap(QPixmap(":/" +fileName));
+ image->adjust();
+ break;
+ }
+ }
+ }
+}
+//! [7]
+
+//! [8]
+InformationWindow* View::findWindow(int id)
+{
+ QList<InformationWindow*>::iterator i, beginning, end;
+
+ beginning = informationWindows.begin();
+ end = informationWindows.end();
+
+ for (i = beginning; i != end; ++i) {
+ InformationWindow *window = (*i);
+ if (window && (window->id() == id))
+ return window;
+ }
+ return 0;
+}
+//! [8]
+
diff --git a/examples/sql/drilldown/view.h b/examples/sql/drilldown/view.h
new file mode 100644
index 0000000..37ddabb
--- /dev/null
+++ b/examples/sql/drilldown/view.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VIEW_H
+#define VIEW_H
+
+#include <QtGui>
+#include <QtSql>
+
+class ImageItem;
+class InformationWindow;
+
+//! [0]
+class View : public QGraphicsView
+{
+ Q_OBJECT
+
+public:
+ View(const QString &offices, const QString &images, QWidget *parent = 0);
+
+protected:
+ void mouseReleaseEvent(QMouseEvent *event);
+//! [0]
+
+//! [1]
+private slots:
+ void updateImage(int id, const QString &fileName);
+//! [1]
+
+//! [2]
+private:
+ void addItems();
+ InformationWindow* findWindow(int id);
+ void showInformation(ImageItem *image);
+
+ QGraphicsScene *scene;
+ QList<InformationWindow *> informationWindows;
+//! [2] //! [3]
+ QSqlRelationalTableModel *officeTable;
+};
+//! [3]
+
+#endif
diff --git a/examples/sql/masterdetail/albumdetails.xml b/examples/sql/masterdetail/albumdetails.xml
new file mode 100644
index 0000000..aacbdac
--- /dev/null
+++ b/examples/sql/masterdetail/albumdetails.xml
@@ -0,0 +1,98 @@
+ <archive>
+ <album id="1" >
+ <track number="01" >Humming one of your songs</track>
+ <track number="02" >Are they saying goodbye</track>
+ <track number="03" >On off</track>
+ <track number="04" >I shot my heart</track>
+ <track number="05" >Drowning in Those Eyes</track>
+ <track number="06" >So you did it again</track>
+ <track number="07" >One more time</track>
+ <track number="08" >Headphone silence</track>
+ <track number="09" >What I want</track>
+ <track number="10" >Sleeping by the Fyris River</track>
+ <track number="11" >Wooden Body</track>
+ <track number="12" >Humming one of your songs (encore)</track>
+ </album>
+ <album id="2" >
+ <track number="01" >To let myself go</track>
+ <track number="02" >Rubber and Soul</track>
+ <track number="03" >Balloon ranger</track>
+ <track number="04" >My lover will go</track>
+ <track number="05" >Temporary dive</track>
+ <track number="06" >Laid in earth</track>
+ <track number="07" >This voice</track>
+ <track number="08" >Where friend rhymes with end</track>
+ <track number="09" >Song No.6 feat Ron Sexsmith</track>
+ <track number="10" >The Fight Song</track>
+ </album>
+ <album id="3" >
+ <track number="01" >From Grace</track>
+ <track number="02" >All's not last</track>
+ <track number="03" >That Great October Sound</track>
+ <track number="04" >Life Here Is Gold</track>
+ <track number="05" >Tomorrow Stays The Same</track>
+ <track number="06" >Postulate</track>
+ <track number="07" >Adelaide</track>
+ <track number="08" >John Wayne</track>
+ <track number="09" >Love's Lost</track>
+ <track number="10" >Dreamweaver</track>
+ <track number="11" >Outro</track>
+ </album>
+ <album id="4" >
+ <track number="01" >Rain down on me</track>
+ <track number="02" >Cecilia</track>
+ <track number="03" >Make a mess of yourself</track>
+ <track number="04" >Pale green eyes</track>
+ <track number="05" >Either way I'm gone</track>
+ <track number="06" >Honey</track>
+ <track number="07" >Rise in shame</track>
+ <track number="08" >Stray dogs</track>
+ <track number="09" >The willow</track>
+ <track number="10" >Stay home</track>
+ <track number="11" >Outro</track>
+ </album>
+ <album id="5" >
+ </album>
+ <album id="6" >
+ <track number="01" >Kontroll på kontinentet</track>
+ <track number="02" >Ompa til du dør</track>
+ <track number="03" >Bøn fra helvete</track>
+ <track number="04" >170</track>
+ <track number="05" >Rullett</track>
+ <track number="06" >Dr. Mowinckel</track>
+ <track number="07" >Fra sjåfør til passasjer</track>
+ <track number="08" >Resistansen</track>
+ <track number="09" >Dekk bord</track>
+ <track number="10" >Bak et halleluja</track>
+ <track number="11" >Bris</track>
+ <track number="12" >Mr. Kaizer, hans Constanze og meg</track>
+ </album>
+ <album id="7" >
+ <track number="01" >Di grind</track>
+ <track number="02" >Hevnervals</track>
+ <track number="03" >Evig pint</track>
+ <track number="04" >De involverte</track>
+ <track number="05" >Djevelens orkester</track>
+ <track number="06" >Container</track>
+ <track number="07" >Naade</track>
+ <track number="08" >Min kvite russer</track>
+ <track number="09" >Veterans klage</track>
+ <track number="10" >Til depotet</track>
+ <track number="11" >Salt og pepper</track>
+ <track number="12" >Drøm Hardt (Requiem Part I)</track>
+ </album>
+ <album id="8" >
+ <track number="01" >KGB</track>
+ <track number="02" >Maestro</track>
+ <track number="03" >Knekker deg til sist</track>
+ <track number="04" >Senor Flamingos Adieu</track>
+ <track number="05" >Blitzregn baby</track>
+ <track number="06" >Dieter Meyers Inst.</track>
+ <track number="07" >Christiania</track>
+ <track number="08" >Delikatessen</track>
+ <track number="09" >Jævel av en tango</track>
+ <track number="10" >Papa har lov</track>
+ <track number="11" >Auksjon (i Dieter Meyers hall)</track>
+ <track number="12" >PÃ¥ ditt skift</track>
+ </album>
+ </archive>
diff --git a/examples/sql/masterdetail/database.h b/examples/sql/masterdetail/database.h
new file mode 100644
index 0000000..a760e41
--- /dev/null
+++ b/examples/sql/masterdetail/database.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DATABASE_H
+#define DATABASE_H
+
+#include <QMessageBox>
+#include <QSqlDatabase>
+#include <QSqlError>
+#include <QSqlQuery>
+
+static bool createConnection()
+{
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
+ db.setDatabaseName(":memory:");
+ if (!db.open()) {
+ QMessageBox::critical(0, qApp->tr("Cannot open database"),
+ qApp->tr("Unable to establish a database connection.\n"
+ "This example needs SQLite support. Please read "
+ "the Qt SQL driver documentation for information how "
+ "to build it.\n\n"
+ "Click Cancel to exit."), QMessageBox::Cancel);
+ return false;
+ }
+
+ QSqlQuery query;
+
+ query.exec("create table artists (id int primary key, "
+ "artist varchar(40), "
+ "albumcount int)");
+
+ query.exec("insert into artists values(0, '<all>', 0)");
+ query.exec("insert into artists values(1, 'Ane Brun', 2)");
+ query.exec("insert into artists values(2, 'Thomas Dybdahl', 3)");
+ query.exec("insert into artists values(3, 'Kaizers Orchestra', 3)");
+
+ query.exec("create table albums (albumid int primary key, "
+ "title varchar(50), "
+ "artistid int, "
+ "year int)");
+
+ query.exec("insert into albums values(1, 'Spending Time With Morgan', 1, "
+ "2003)");
+ query.exec("insert into albums values(2, 'A Temporary Dive', 1, 2005)");
+ query.exec("insert into albums values(3, '...The Great October Sound', 2, "
+ "2002)");
+ query.exec("insert into albums values(4, 'Stray Dogs', 2, 2003)");
+ query.exec("insert into albums values(5, "
+ "'One day you`ll dance for me, New York City', 2, 2004)");
+ query.exec("insert into albums values(6, 'Ompa Til Du D\xf8r', 3, 2001)");
+ query.exec("insert into albums values(7, 'Evig Pint', 3, 2002)");
+ query.exec("insert into albums values(8, 'Maestro', 3, 2005)");
+
+ return true;
+}
+
+#endif
+
+
diff --git a/examples/sql/masterdetail/dialog.cpp b/examples/sql/masterdetail/dialog.cpp
new file mode 100644
index 0000000..0adf208
--- /dev/null
+++ b/examples/sql/masterdetail/dialog.cpp
@@ -0,0 +1,283 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dialog.h"
+
+int uniqueAlbumId;
+int uniqueArtistId;
+
+Dialog::Dialog(QSqlRelationalTableModel *albums, QDomDocument details,
+ QFile *output, QWidget *parent)
+ : QDialog(parent)
+{
+ model = albums;
+ albumDetails = details;
+ outputFile = output;
+
+ QGroupBox *inputWidgetBox = createInputWidgets();
+ QDialogButtonBox *buttonBox = createButtons();
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(inputWidgetBox);
+ layout->addWidget(buttonBox);
+ setLayout(layout);
+
+ setWindowTitle(tr("Add Album"));
+}
+
+void Dialog::submit()
+{
+ QString artist = artistEditor->text();
+ QString title = titleEditor->text();
+
+ if (artist.isEmpty() || title.isEmpty()) {
+ QString message(tr("Please provide both the name of the artist "
+ "and the title of the album."));
+ QMessageBox::information(this, tr("Add Album"), message);
+ } else {
+ int artistId = findArtistId(artist);
+ int albumId = addNewAlbum(title, artistId);
+
+ QStringList tracks;
+ tracks = tracksEditor->text().split(',', QString::SkipEmptyParts);
+ addTracks(albumId, tracks);
+
+ increaseAlbumCount(indexOfArtist(artist));
+ accept();
+ }
+}
+
+int Dialog::findArtistId(const QString &artist)
+{
+ QSqlTableModel *artistModel = model->relationModel(2);
+ int row = 0;
+
+ while (row < artistModel->rowCount()) {
+ QSqlRecord record = artistModel->record(row);
+ if (record.value("artist") == artist)
+ return record.value("id").toInt();
+ else
+ row++;
+ }
+ return addNewArtist(artist);
+}
+
+
+int Dialog::addNewArtist(const QString &name)
+{
+ QSqlTableModel *artistModel = model->relationModel(2);
+ QSqlRecord record;
+
+ int id = generateArtistId();
+
+ QSqlField f1("id", QVariant::Int);
+ QSqlField f2("artist", QVariant::String);
+ QSqlField f3("albumcount", QVariant::Int);
+
+ f1.setValue(QVariant(id));
+ f2.setValue(QVariant(name));
+ f3.setValue(QVariant(0));
+ record.append(f1);
+ record.append(f2);
+ record.append(f3);
+
+ artistModel->insertRecord(-1, record);
+ return id;
+}
+
+int Dialog::addNewAlbum(const QString &title, int artistId)
+{
+ int id = generateAlbumId();
+ QSqlRecord record;
+
+ QSqlField f1("albumid", QVariant::Int);
+ QSqlField f2("title", QVariant::String);
+ QSqlField f3("artistid", QVariant::Int);
+ QSqlField f4("year", QVariant::Int);
+
+ f1.setValue(QVariant(id));
+ f2.setValue(QVariant(title));
+ f3.setValue(QVariant(artistId));
+ f4.setValue(QVariant(yearEditor->value()));
+ record.append(f1);
+ record.append(f2);
+ record.append(f3);
+ record.append(f4);
+
+ model->insertRecord(-1, record);
+ return id;
+}
+
+void Dialog::addTracks(int albumId, QStringList tracks)
+{
+ QDomElement albumNode = albumDetails.createElement("album");
+ albumNode.setAttribute("id", albumId);
+
+ for (int i = 0; i < tracks.count(); i++) {
+ QString trackNumber = QString::number(i);
+ if (i < 10)
+ trackNumber.prepend("0");
+
+ QDomText textNode = albumDetails.createTextNode(tracks.at(i));
+
+ QDomElement trackNode = albumDetails.createElement("track");
+ trackNode.setAttribute("number", trackNumber);
+ trackNode.appendChild(textNode);
+
+ albumNode.appendChild(trackNode);
+ }
+
+ QDomNodeList archive = albumDetails.elementsByTagName("archive");
+ archive.item(0).appendChild(albumNode);
+
+/*
+ The following code is commented out since the example uses an in
+ memory database, i.e., altering the XML file will bring the data
+ out of sync.
+
+ if (!outputFile->open(QIODevice::WriteOnly)) {
+ return;
+ } else {
+ QTextStream stream(outputFile);
+ archive.item(0).save(stream, 4);
+ outputFile->close();
+ }
+*/
+}
+
+void Dialog::increaseAlbumCount(QModelIndex artistIndex)
+{
+ QSqlTableModel *artistModel = model->relationModel(2);
+
+ QModelIndex albumCountIndex;
+ albumCountIndex = artistIndex.sibling(artistIndex.row(), 2);
+
+ int albumCount = albumCountIndex.data().toInt();
+ artistModel->setData(albumCountIndex, QVariant(albumCount + 1));
+}
+
+
+void Dialog::revert()
+{
+ artistEditor->clear();
+ titleEditor->clear();
+ yearEditor->setValue(QDate::currentDate().year());
+ tracksEditor->clear();
+}
+
+QGroupBox *Dialog::createInputWidgets()
+{
+ QGroupBox *box = new QGroupBox(tr("Add Album"));
+
+ QLabel *artistLabel = new QLabel(tr("Artist:"));
+ QLabel *titleLabel = new QLabel(tr("Title:"));
+ QLabel *yearLabel = new QLabel(tr("Year:"));
+ QLabel *tracksLabel = new QLabel(tr("Tracks (separated by comma):"));
+
+ artistEditor = new QLineEdit;
+ titleEditor = new QLineEdit;
+
+ yearEditor = new QSpinBox;
+ yearEditor->setMinimum(1900);
+ yearEditor->setMaximum(QDate::currentDate().year());
+ yearEditor->setValue(yearEditor->maximum());
+ yearEditor->setReadOnly(false);
+
+ tracksEditor = new QLineEdit;
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(artistLabel, 0, 0);
+ layout->addWidget(artistEditor, 0, 1);
+ layout->addWidget(titleLabel, 1, 0);
+ layout->addWidget(titleEditor, 1, 1);
+ layout->addWidget(yearLabel, 2, 0);
+ layout->addWidget(yearEditor, 2, 1);
+ layout->addWidget(tracksLabel, 3, 0, 1, 2);
+ layout->addWidget(tracksEditor, 4, 0, 1, 2);
+ box->setLayout(layout);
+
+ return box;
+}
+
+QDialogButtonBox *Dialog::createButtons()
+{
+ QPushButton *closeButton = new QPushButton(tr("&Close"));
+ QPushButton *revertButton = new QPushButton(tr("&Revert"));
+ QPushButton *submitButton = new QPushButton(tr("&Submit"));
+
+ closeButton->setDefault(true);
+
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(revertButton, SIGNAL(clicked()), this, SLOT(revert()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submit()));
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox;
+ buttonBox->addButton(submitButton, QDialogButtonBox::ResetRole);
+ buttonBox->addButton(revertButton, QDialogButtonBox::ResetRole);
+ buttonBox->addButton(closeButton, QDialogButtonBox::RejectRole);
+
+ return buttonBox;
+}
+
+QModelIndex Dialog::indexOfArtist(const QString &artist)
+{
+ QSqlTableModel *artistModel = model->relationModel(2);
+
+ for (int i = 0; i < artistModel->rowCount(); i++) {
+ QSqlRecord record = artistModel->record(i);
+ if (record.value("artist") == artist)
+ return artistModel->index(i, 1);
+ }
+
+ return QModelIndex();
+}
+
+int Dialog::generateArtistId()
+{
+ uniqueArtistId += 1;
+ return uniqueArtistId;
+}
+
+int Dialog::generateAlbumId()
+{
+ uniqueAlbumId += 1;
+ return uniqueAlbumId;
+}
diff --git a/examples/sql/masterdetail/dialog.h b/examples/sql/masterdetail/dialog.h
new file mode 100644
index 0000000..0f4b54a
--- /dev/null
+++ b/examples/sql/masterdetail/dialog.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QtGui>
+#include <QtSql>
+#include <QtXml>
+
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QSqlRelationalTableModel *albums, QDomDocument details,
+ QFile *output, QWidget *parent = 0);
+
+private slots:
+ void revert();
+ void submit();
+
+private:
+ int addNewAlbum(const QString &title, int artistId);
+ int addNewArtist(const QString &name);
+ void addTracks(int albumId, QStringList tracks);
+ QDialogButtonBox *createButtons();
+ QGroupBox *createInputWidgets();
+ int findArtistId(const QString &artist);
+ int generateAlbumId();
+ int generateArtistId();
+ void increaseAlbumCount(QModelIndex artistIndex);
+ QModelIndex indexOfArtist(const QString &artist);
+
+ QSqlRelationalTableModel *model;
+ QDomDocument albumDetails;
+ QFile *outputFile;
+
+ QLineEdit *artistEditor;
+ QLineEdit *titleEditor;
+ QSpinBox *yearEditor;
+ QLineEdit *tracksEditor;
+};
+
+#endif
diff --git a/examples/sql/masterdetail/images/icon.png b/examples/sql/masterdetail/images/icon.png
new file mode 100644
index 0000000..31f68b8
--- /dev/null
+++ b/examples/sql/masterdetail/images/icon.png
Binary files differ
diff --git a/examples/sql/masterdetail/images/image.png b/examples/sql/masterdetail/images/image.png
new file mode 100644
index 0000000..1d78037
--- /dev/null
+++ b/examples/sql/masterdetail/images/image.png
Binary files differ
diff --git a/examples/sql/masterdetail/main.cpp b/examples/sql/masterdetail/main.cpp
new file mode 100644
index 0000000..932b67a
--- /dev/null
+++ b/examples/sql/masterdetail/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "database.h"
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(masterdetail);
+
+ QApplication app(argc, argv);
+
+ if (!createConnection())
+ return 1;
+
+ QFile *albumDetails = new QFile("albumdetails.xml");
+ MainWindow window("artists", "albums", albumDetails);
+ window.show();
+ return app.exec();
+}
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
new file mode 100644
index 0000000..67825d6
--- /dev/null
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -0,0 +1,430 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "dialog.h"
+
+#include <QtGui>
+#include <QtSql>
+#include <QtXml>
+
+extern int uniqueAlbumId;
+extern int uniqueArtistId;
+
+MainWindow::MainWindow(const QString &artistTable, const QString &albumTable,
+ QFile *albumDetails, QWidget *parent)
+ : QMainWindow(parent)
+{
+ file = albumDetails;
+ readAlbumData();
+
+ model = new QSqlRelationalTableModel(this);
+ model->setTable(albumTable);
+ model->setRelation(2, QSqlRelation(artistTable, "id", "artist"));
+ model->select();
+
+ QGroupBox *artists = createArtistGroupBox();
+ QGroupBox *albums = createAlbumGroupBox();
+ QGroupBox *details = createDetailsGroupBox();
+
+ artistView->setCurrentIndex(0);
+ uniqueAlbumId = model->rowCount();
+ uniqueArtistId = artistView->count();
+
+ connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)),
+ this, SLOT(updateHeader(QModelIndex, int, int)));
+ connect(model, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+ this, SLOT(updateHeader(QModelIndex, int, int)));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(artists, 0, 0);
+ layout->addWidget(albums, 1, 0);
+ layout->addWidget(details, 0, 1, 2, 1);
+ layout->setColumnStretch(1, 1);
+ layout->setColumnMinimumWidth(0, 500);
+
+ QWidget *widget = new QWidget;
+ widget->setLayout(layout);
+ setCentralWidget(widget);
+ createMenuBar();
+
+ showImageLabel();
+ resize(850, 400);
+ setWindowTitle(tr("Music Archive"));
+}
+
+void MainWindow::changeArtist(int row)
+{
+ if (row > 0) {
+ QModelIndex index = model->relationModel(2)->index(row, 1);
+ model->setFilter("artist = '" + index.data().toString() + '\'') ;
+ showArtistProfile(index);
+ } else if (row == 0) {
+ model->setFilter(QString());
+ showImageLabel();
+ } else {
+ return;
+ }
+}
+
+void MainWindow::showArtistProfile(QModelIndex index)
+{
+ QSqlRecord record = model->relationModel(2)->record(index.row());
+
+ QString name = record.value("artist").toString();
+ QString count = record.value("albumcount").toString();
+ profileLabel->setText(tr("Artist : %1 \n" \
+ "Number of Albums: %2").arg(name).arg(count));
+
+ profileLabel->show();
+ iconLabel->show();
+
+ titleLabel->hide();
+ trackList->hide();
+ imageLabel->hide();
+}
+
+void MainWindow::showAlbumDetails(QModelIndex index)
+{
+ QSqlRecord record = model->record(index.row());
+
+ QString artist = record.value("artist").toString();
+ QString title = record.value("title").toString();
+ QString year = record.value("year").toString();
+ QString albumId = record.value("albumid").toString();
+
+ showArtistProfile(indexOfArtist(artist));
+ titleLabel->setText(tr("Title: %1 (%2)").arg(title).arg(year));
+ titleLabel->show();
+
+ QDomNodeList albums = albumData.elementsByTagName("album");
+ for (int i = 0; i < albums.count(); i++) {
+ QDomNode album = albums.item(i);
+ if (album.toElement().attribute("id") == albumId) {
+ getTrackList(album.toElement());
+ break;
+ }
+ }
+ if (!trackList->count() == 0)
+ trackList->show();
+}
+
+void MainWindow::getTrackList(QDomNode album)
+{
+ trackList->clear();
+
+ QDomNodeList tracks = album.childNodes();
+ QDomNode track;
+ QString trackNumber;
+
+ for (int j = 0; j < tracks.count(); j++) {
+
+ track = tracks.item(j);
+ trackNumber = track.toElement().attribute("number");
+
+ QListWidgetItem *item = new QListWidgetItem(trackList);
+ item->setText(trackNumber + ": " + track.toElement().text());
+ }
+}
+
+void MainWindow::addAlbum()
+{
+ Dialog *dialog = new Dialog(model, albumData, file, this);
+ int accepted = dialog->exec();
+
+ if (accepted == 1) {
+ int lastRow = model->rowCount() - 1;
+ albumView->selectRow(lastRow);
+ albumView->scrollToBottom();
+ showAlbumDetails(model->index(lastRow, 0));
+ }
+}
+
+void MainWindow::deleteAlbum()
+{
+ QModelIndexList selection = albumView->selectionModel()->selectedRows(0);
+
+ if (!selection.empty()) {
+ QModelIndex idIndex = selection.at(0);
+ int id = idIndex.data().toInt();
+ QString title = idIndex.sibling(idIndex.row(), 1).data().toString();
+ QString artist = idIndex.sibling(idIndex.row(), 2).data().toString();
+
+ QMessageBox::StandardButton button;
+ button = QMessageBox::question(this, tr("Delete Album"),
+ QString(tr("Are you sure you want to " \
+ "delete '%1' by '%2'?"))
+ .arg(title).arg(artist),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+ removeAlbumFromFile(id);
+ removeAlbumFromDatabase(idIndex);
+ decreaseAlbumCount(indexOfArtist(artist));
+
+ showImageLabel();
+ }
+ } else {
+ QMessageBox::information(this, tr("Delete Album"),
+ tr("Select the album you want to delete."));
+ }
+}
+
+void MainWindow::removeAlbumFromFile(int id)
+{
+
+ QDomNodeList albums = albumData.elementsByTagName("album");
+
+ for (int i = 0; i < albums.count(); i++) {
+ QDomNode node = albums.item(i);
+ if (node.toElement().attribute("id").toInt() == id) {
+ albumData.elementsByTagName("archive").item(0).removeChild(node);
+ break;
+ }
+ }
+/*
+ The following code is commented out since the example uses an in
+ memory database, i.e., altering the XML file will bring the data
+ out of sync.
+
+ if (!file->open(QIODevice::WriteOnly)) {
+ return;
+ } else {
+ QTextStream stream(file);
+ albumData.elementsByTagName("archive").item(0).save(stream, 4);
+ file->close();
+ }
+*/
+}
+
+void MainWindow::removeAlbumFromDatabase(QModelIndex index)
+{
+ model->removeRow(index.row());
+}
+
+void MainWindow::decreaseAlbumCount(QModelIndex artistIndex)
+{
+ int row = artistIndex.row();
+ QModelIndex albumCountIndex = artistIndex.sibling(row, 2);
+ int albumCount = albumCountIndex.data().toInt();
+
+ QSqlTableModel *artists = model->relationModel(2);
+
+ if (albumCount == 1) {
+ artists->removeRow(row);
+ showImageLabel();
+ } else {
+ artists->setData(albumCountIndex, QVariant(albumCount - 1));
+ }
+}
+
+void MainWindow::readAlbumData()
+{
+ if (!file->open(QIODevice::ReadOnly))
+ return;
+
+ if (!albumData.setContent(file)) {
+ file->close();
+ return;
+ }
+ file->close();
+}
+
+QGroupBox* MainWindow::createArtistGroupBox()
+{
+ artistView = new QComboBox;
+ artistView->setModel(model->relationModel(2));
+ artistView->setModelColumn(1);
+
+ connect(artistView, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(changeArtist(int)));
+
+ QGroupBox *box = new QGroupBox(tr("Artist"));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(artistView, 0, 0);
+ box->setLayout(layout);
+
+ return box;
+}
+
+QGroupBox* MainWindow::createAlbumGroupBox()
+{
+ QGroupBox *box = new QGroupBox(tr("Album"));
+
+ albumView = new QTableView;
+ albumView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ albumView->setSortingEnabled(true);
+ albumView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ albumView->setSelectionMode(QAbstractItemView::SingleSelection);
+ albumView->setShowGrid(false);
+ albumView->verticalHeader()->hide();
+ albumView->setAlternatingRowColors(true);
+ albumView->setModel(model);
+ adjustHeader();
+
+ QLocale locale = albumView->locale();
+ locale.setNumberOptions(QLocale::OmitGroupSeparator);
+ albumView->setLocale(locale);
+
+ connect(albumView, SIGNAL(clicked(QModelIndex)),
+ this, SLOT(showAlbumDetails(QModelIndex)));
+ connect(albumView, SIGNAL(activated(QModelIndex)),
+ this, SLOT(showAlbumDetails(QModelIndex)));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(albumView, 0, 0);
+ box->setLayout(layout);
+
+ return box;
+}
+
+QGroupBox* MainWindow::createDetailsGroupBox()
+{
+ QGroupBox *box = new QGroupBox(tr("Details"));
+
+ profileLabel = new QLabel;
+ profileLabel->setWordWrap(true);
+ profileLabel->setAlignment(Qt::AlignBottom);
+
+ titleLabel = new QLabel;
+ titleLabel->setWordWrap(true);
+ titleLabel->setAlignment(Qt::AlignBottom);
+
+ iconLabel = new QLabel();
+ iconLabel->setAlignment(Qt::AlignBottom | Qt::AlignRight);
+ iconLabel->setPixmap(QPixmap(":/images/icon.png"));
+
+ imageLabel = new QLabel;
+ imageLabel->setWordWrap(true);
+ imageLabel->setAlignment(Qt::AlignCenter);
+ imageLabel->setPixmap(QPixmap(":/images/image.png"));
+
+ trackList = new QListWidget;
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(imageLabel, 0, 0, 3, 2);
+ layout->addWidget(profileLabel, 0, 0);
+ layout->addWidget(iconLabel, 0, 1);
+ layout->addWidget(titleLabel, 1, 0, 1, 2);
+ layout->addWidget(trackList, 2, 0, 1, 2);
+ layout->setRowStretch(2, 1);
+ box->setLayout(layout);
+
+ return box;
+}
+
+void MainWindow::createMenuBar()
+{
+ QAction *addAction = new QAction(tr("&Add album..."), this);
+ QAction *deleteAction = new QAction(tr("&Delete album..."), this);
+ QAction *quitAction = new QAction(tr("&Quit"), this);
+ QAction *aboutAction = new QAction(tr("&About"), this);
+ QAction *aboutQtAction = new QAction(tr("About &Qt"), this);
+
+ addAction->setShortcut(tr("Ctrl+A"));
+ deleteAction->setShortcut(tr("Ctrl+D"));
+ quitAction->setShortcut(tr("Ctrl+Q"));
+
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(addAction);
+ fileMenu->addAction(deleteAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(quitAction);
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAction);
+ helpMenu->addAction(aboutQtAction);
+
+ connect(addAction, SIGNAL(triggered(bool)), this, SLOT(addAlbum()));
+ connect(deleteAction, SIGNAL(triggered(bool)), this, SLOT(deleteAlbum()));
+ connect(quitAction, SIGNAL(triggered(bool)), this, SLOT(close()));
+ connect(aboutAction, SIGNAL(triggered(bool)), this, SLOT(about()));
+ connect(aboutQtAction, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::showImageLabel()
+{
+ profileLabel->hide();
+ titleLabel->hide();
+ iconLabel->hide();
+ trackList->hide();
+
+ imageLabel->show();
+}
+
+QModelIndex MainWindow::indexOfArtist(const QString &artist)
+{
+ QSqlTableModel *artistModel = model->relationModel(2);
+
+ for (int i = 0; i < artistModel->rowCount(); i++) {
+ QSqlRecord record = artistModel->record(i);
+ if (record.value("artist") == artist)
+ return artistModel->index(i, 1);
+ }
+ return QModelIndex();
+}
+
+void MainWindow::updateHeader(QModelIndex, int, int)
+{
+ adjustHeader();
+}
+
+void MainWindow::adjustHeader()
+{
+ albumView->hideColumn(0);
+ albumView->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch);
+ albumView->resizeColumnToContents(2);
+ albumView->resizeColumnToContents(3);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Music Archive"),
+ tr("<p>The <b>Music Archive</b> example shows how to present "
+ "data from different data sources in the same application. "
+ "The album titles, and the corresponding artists and release dates, "
+ "are kept in a database, while each album's tracks are stored "
+ "in an XML file. </p><p>The example also shows how to add as "
+ "well as remove data from both the database and the "
+ "associated XML file using the API provided by the QtSql and "
+ "QtXml modules, respectively.</p>"));
+}
diff --git a/examples/sql/masterdetail/mainwindow.h b/examples/sql/masterdetail/mainwindow.h
new file mode 100644
index 0000000..4d05022
--- /dev/null
+++ b/examples/sql/masterdetail/mainwindow.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QDomDocument>
+#include <QMainWindow>
+#include <QModelIndex>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QFile;
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QSqlRelationalTableModel;
+class QTableView;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(const QString &artistTable, const QString &albumTable,
+ QFile *albumDetails, QWidget *parent = 0);
+
+private slots:
+ void about();
+ void addAlbum();
+ void changeArtist(int row);
+ void deleteAlbum();
+ void showAlbumDetails(QModelIndex index);
+ void showArtistProfile(QModelIndex index);
+ void updateHeader(QModelIndex, int, int);
+
+private:
+ void adjustHeader();
+ QGroupBox *createAlbumGroupBox();
+ QGroupBox *createArtistGroupBox();
+ QGroupBox *createDetailsGroupBox();
+ void createMenuBar();
+ void decreaseAlbumCount(QModelIndex artistIndex);
+ void getTrackList(QDomNode album);
+ QModelIndex indexOfArtist(const QString &artist);
+ void readAlbumData();
+ void removeAlbumFromDatabase(QModelIndex album);
+ void removeAlbumFromFile(int id);
+ void showImageLabel();
+
+ QTableView *albumView;
+ QComboBox *artistView;
+ QListWidget *trackList;
+
+ QLabel *iconLabel;
+ QLabel *imageLabel;
+ QLabel *profileLabel;
+ QLabel *titleLabel;
+
+ QDomDocument albumData;
+ QFile *file;
+ QSqlRelationalTableModel *model;
+};
+
+#endif
diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro
new file mode 100644
index 0000000..205c544
--- /dev/null
+++ b/examples/sql/masterdetail/masterdetail.pro
@@ -0,0 +1,16 @@
+HEADERS = database.h \
+ dialog.h \
+ mainwindow.h
+RESOURCES = masterdetail.qrc
+SOURCES = dialog.cpp \
+ main.cpp \
+ mainwindow.cpp
+
+QT += sql
+QT += xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS masterdetail.pro *.xml images
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail
+INSTALLS += target sources
diff --git a/examples/sql/masterdetail/masterdetail.qrc b/examples/sql/masterdetail/masterdetail.qrc
new file mode 100644
index 0000000..717c2eb
--- /dev/null
+++ b/examples/sql/masterdetail/masterdetail.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>images/icon.png</file>
+ <file>images/image.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/sql/querymodel/customsqlmodel.cpp b/examples/sql/querymodel/customsqlmodel.cpp
new file mode 100644
index 0000000..e122ce8
--- /dev/null
+++ b/examples/sql/querymodel/customsqlmodel.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "customsqlmodel.h"
+
+CustomSqlModel::CustomSqlModel(QObject *parent)
+ : QSqlQueryModel(parent)
+{
+}
+
+//! [0]
+QVariant CustomSqlModel::data(const QModelIndex &index, int role) const
+{
+ QVariant value = QSqlQueryModel::data(index, role);
+ if (value.isValid() && role == Qt::DisplayRole) {
+ if (index.column() == 0)
+ return value.toString().prepend("#");
+ else if (index.column() == 2)
+ return value.toString().toUpper();
+ }
+ if (role == Qt::TextColorRole && index.column() == 1)
+ return qVariantFromValue(QColor(Qt::blue));
+ return value;
+}
+//! [0]
diff --git a/examples/sql/querymodel/customsqlmodel.h b/examples/sql/querymodel/customsqlmodel.h
new file mode 100644
index 0000000..f4a0eab
--- /dev/null
+++ b/examples/sql/querymodel/customsqlmodel.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CUSTOMSQLMODEL_H
+#define CUSTOMSQLMODEL_H
+
+#include <QSqlQueryModel>
+
+//! [0]
+class CustomSqlModel : public QSqlQueryModel
+{
+ Q_OBJECT
+
+public:
+ CustomSqlModel(QObject *parent = 0);
+
+ QVariant data(const QModelIndex &item, int role) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/sql/querymodel/editablesqlmodel.cpp b/examples/sql/querymodel/editablesqlmodel.cpp
new file mode 100644
index 0000000..d7841f6
--- /dev/null
+++ b/examples/sql/querymodel/editablesqlmodel.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtSql>
+
+#include "editablesqlmodel.h"
+
+EditableSqlModel::EditableSqlModel(QObject *parent)
+ : QSqlQueryModel(parent)
+{
+}
+
+//! [0]
+Qt::ItemFlags EditableSqlModel::flags(
+ const QModelIndex &index) const
+{
+ Qt::ItemFlags flags = QSqlQueryModel::flags(index);
+ if (index.column() == 1 || index.column() == 2)
+ flags |= Qt::ItemIsEditable;
+ return flags;
+}
+//! [0]
+
+//! [1]
+bool EditableSqlModel::setData(const QModelIndex &index, const QVariant &value, int /* role */)
+{
+ if (index.column() < 1 || index.column() > 2)
+ return false;
+
+ QModelIndex primaryKeyIndex = QSqlQueryModel::index(index.row(), 0);
+ int id = data(primaryKeyIndex).toInt();
+
+ clear();
+
+ bool ok;
+ if (index.column() == 1) {
+ ok = setFirstName(id, value.toString());
+ } else {
+ ok = setLastName(id, value.toString());
+ }
+ refresh();
+ return ok;
+}
+//! [1]
+
+void EditableSqlModel::refresh()
+{
+ setQuery("select * from person");
+ setHeaderData(0, Qt::Horizontal, QObject::tr("ID"));
+ setHeaderData(1, Qt::Horizontal, QObject::tr("First name"));
+ setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
+}
+
+//! [2]
+bool EditableSqlModel::setFirstName(int personId, const QString &firstName)
+{
+ QSqlQuery query;
+ query.prepare("update person set firstname = ? where id = ?");
+ query.addBindValue(firstName);
+ query.addBindValue(personId);
+ return query.exec();
+}
+//! [2]
+
+bool EditableSqlModel::setLastName(int personId, const QString &lastName)
+{
+ QSqlQuery query;
+ query.prepare("update person set lastname = ? where id = ?");
+ query.addBindValue(lastName);
+ query.addBindValue(personId);
+ return query.exec();
+}
diff --git a/examples/sql/querymodel/editablesqlmodel.h b/examples/sql/querymodel/editablesqlmodel.h
new file mode 100644
index 0000000..3606ebc
--- /dev/null
+++ b/examples/sql/querymodel/editablesqlmodel.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EDITABLESQLMODEL_H
+#define EDITABLESQLMODEL_H
+
+#include <QSqlQueryModel>
+
+class EditableSqlModel : public QSqlQueryModel
+{
+ Q_OBJECT
+
+public:
+ EditableSqlModel(QObject *parent = 0);
+
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ bool setData(const QModelIndex &index, const QVariant &value, int role);
+
+private:
+ bool setFirstName(int personId, const QString &firstName);
+ bool setLastName(int personId, const QString &lastName);
+ void refresh();
+};
+
+#endif
diff --git a/examples/sql/querymodel/main.cpp b/examples/sql/querymodel/main.cpp
new file mode 100644
index 0000000..90d4265
--- /dev/null
+++ b/examples/sql/querymodel/main.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "../connection.h"
+#include "customsqlmodel.h"
+#include "editablesqlmodel.h"
+
+void initializeModel(QSqlQueryModel *model)
+{
+ model->setQuery("select * from person");
+ model->setHeaderData(0, Qt::Horizontal, QObject::tr("ID"));
+ model->setHeaderData(1, Qt::Horizontal, QObject::tr("First name"));
+ model->setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
+}
+
+void createView(const QString &title, QSqlQueryModel *model)
+{
+ static int offset = 0;
+
+ QTableView *view = new QTableView;
+ view->setModel(model);
+ view->setWindowTitle(title);
+ view->move(100 + offset, 100 + offset);
+ offset += 20;
+ view->show();
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!createConnection())
+ return 1;
+
+ QSqlQueryModel plainModel;
+ EditableSqlModel editableModel;
+ CustomSqlModel customModel;
+
+ initializeModel(&plainModel);
+ initializeModel(&editableModel);
+ initializeModel(&customModel);
+
+ createView(QObject::tr("Plain Query Model"), &plainModel);
+ createView(QObject::tr("Editable Query Model"), &editableModel);
+ createView(QObject::tr("Custom Query Model"), &customModel);
+
+ return app.exec();
+}
diff --git a/examples/sql/querymodel/querymodel.pro b/examples/sql/querymodel/querymodel.pro
new file mode 100644
index 0000000..e0e0813
--- /dev/null
+++ b/examples/sql/querymodel/querymodel.pro
@@ -0,0 +1,13 @@
+HEADERS = ../connection.h \
+ customsqlmodel.h \
+ editablesqlmodel.h
+SOURCES = customsqlmodel.cpp \
+ editablesqlmodel.cpp \
+ main.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/querymodel
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS querymodel.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/querymodel
+INSTALLS += target sources
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
new file mode 100644
index 0000000..b38cdda
--- /dev/null
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSql>
+
+#include "../connection.h"
+
+void initializeModel(QSqlRelationalTableModel *model)
+{
+//! [0]
+ model->setTable("employee");
+//! [0]
+
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+//! [1]
+ model->setRelation(2, QSqlRelation("city", "id", "name"));
+//! [1] //! [2]
+ model->setRelation(3, QSqlRelation("country", "id", "name"));
+//! [2]
+
+//! [3]
+ model->setHeaderData(0, Qt::Horizontal, QObject::tr("ID"));
+ model->setHeaderData(1, Qt::Horizontal, QObject::tr("Name"));
+ model->setHeaderData(2, Qt::Horizontal, QObject::tr("City"));
+ model->setHeaderData(3, Qt::Horizontal, QObject::tr("Country"));
+//! [3]
+
+ model->select();
+}
+
+QTableView *createView(const QString &title, QSqlTableModel *model)
+{
+//! [4]
+ QTableView *view = new QTableView;
+ view->setModel(model);
+ view->setItemDelegate(new QSqlRelationalDelegate(view));
+//! [4]
+ view->setWindowTitle(title);
+ return view;
+}
+
+void createRelationalTables()
+{
+ QSqlQuery query;
+ query.exec("create table employee(id int primary key, name varchar(20), city int, country int)");
+ query.exec("insert into employee values(1, 'Espen', 5000, 47)");
+ query.exec("insert into employee values(2, 'Harald', 80000, 49)");
+ query.exec("insert into employee values(3, 'Sam', 100, 1)");
+
+ query.exec("create table city(id int, name varchar(20))");
+ query.exec("insert into city values(100, 'San Jose')");
+ query.exec("insert into city values(5000, 'Oslo')");
+ query.exec("insert into city values(80000, 'Munich')");
+
+ query.exec("create table country(id int, name varchar(20))");
+ query.exec("insert into country values(1, 'USA')");
+ query.exec("insert into country values(47, 'Norway')");
+ query.exec("insert into country values(49, 'Germany')");
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!createConnection())
+ return 1;
+ createRelationalTables();
+
+ QSqlRelationalTableModel model;
+
+ initializeModel(&model);
+
+ QTableView *view = createView(QObject::tr("Relational Table Model"), &model);
+ view->show();
+
+ return app.exec();
+}
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.pro b/examples/sql/relationaltablemodel/relationaltablemodel.pro
new file mode 100644
index 0000000..38f1e21
--- /dev/null
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.pro
@@ -0,0 +1,9 @@
+HEADERS = ../connection.h
+SOURCES = relationaltablemodel.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/relationaltablemodel
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS relationaltablemodel.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/relationaltablemodel
+INSTALLS += target sources
diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro
new file mode 100644
index 0000000..6d0d402
--- /dev/null
+++ b/examples/sql/sql.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = cachedtable \
+ drilldown \
+ relationaltablemodel \
+ sqlwidgetmapper
+
+!wince*: SUBDIRS += querymodel tablemodel masterdetail
+
+# install
+sources.files = connection.h sql.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql
+INSTALLS += sources
diff --git a/examples/sql/sqlwidgetmapper/main.cpp b/examples/sql/sqlwidgetmapper/main.cpp
new file mode 100644
index 0000000..055ac21
--- /dev/null
+++ b/examples/sql/sqlwidgetmapper/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
new file mode 100644
index 0000000..1881fce
--- /dev/null
+++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
@@ -0,0 +1,10 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/sqlwidgetmapper
+INSTALLS += target sources
diff --git a/examples/sql/sqlwidgetmapper/window.cpp b/examples/sql/sqlwidgetmapper/window.cpp
new file mode 100644
index 0000000..ebfa2cf
--- /dev/null
+++ b/examples/sql/sqlwidgetmapper/window.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSql>
+
+#include "window.h"
+
+//! [Set up widgets]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ setupModel();
+
+ nameLabel = new QLabel(tr("Na&me:"));
+ nameEdit = new QLineEdit();
+ addressLabel = new QLabel(tr("&Address:"));
+ addressEdit = new QTextEdit();
+ typeLabel = new QLabel(tr("&Type:"));
+ typeComboBox = new QComboBox();
+ nextButton = new QPushButton(tr("&Next"));
+ previousButton = new QPushButton(tr("&Previous"));
+
+ nameLabel->setBuddy(nameEdit);
+ addressLabel->setBuddy(addressEdit);
+ typeLabel->setBuddy(typeComboBox);
+//! [Set up widgets]
+
+//! [Set up the mapper]
+ QSqlTableModel *relModel = model->relationModel(typeIndex);
+ typeComboBox->setModel(relModel);
+ typeComboBox->setModelColumn(relModel->fieldIndex("description"));
+
+ mapper = new QDataWidgetMapper(this);
+ mapper->setModel(model);
+ mapper->setItemDelegate(new QSqlRelationalDelegate(this));
+ mapper->addMapping(nameEdit, model->fieldIndex("name"));
+ mapper->addMapping(addressEdit, model->fieldIndex("address"));
+ mapper->addMapping(typeComboBox, typeIndex);
+//! [Set up the mapper]
+
+//! [Set up connections and layouts]
+ connect(previousButton, SIGNAL(clicked()),
+ mapper, SLOT(toPrevious()));
+ connect(nextButton, SIGNAL(clicked()),
+ mapper, SLOT(toNext()));
+ connect(mapper, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(updateButtons(int)));
+
+ QGridLayout *layout = new QGridLayout();
+ layout->addWidget(nameLabel, 0, 0, 1, 1);
+ layout->addWidget(nameEdit, 0, 1, 1, 1);
+ layout->addWidget(previousButton, 0, 2, 1, 1);
+ layout->addWidget(addressLabel, 1, 0, 1, 1);
+ layout->addWidget(addressEdit, 1, 1, 2, 1);
+ layout->addWidget(nextButton, 1, 2, 1, 1);
+ layout->addWidget(typeLabel, 3, 0, 1, 1);
+ layout->addWidget(typeComboBox, 3, 1, 1, 1);
+ setLayout(layout);
+
+ setWindowTitle(tr("SQL Widget Mapper"));
+ mapper->toFirst();
+}
+//! [Set up connections and layouts]
+
+//! [Set up the main table]
+void Window::setupModel()
+{
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
+ db.setDatabaseName(":memory:");
+ if (!db.open()) {
+ QMessageBox::critical(0, tr("Cannot open database"),
+ tr("Unable to establish a database connection.\n"
+ "This example needs SQLite support. Please read "
+ "the Qt SQL driver documentation for information how "
+ "to build it."), QMessageBox::Cancel);
+ return;
+ }
+
+ QSqlQuery query;
+ query.exec("create table person (id int primary key, "
+ "name varchar(20), address varchar(200), typeid int)");
+ query.exec("insert into person values(1, 'Alice', "
+ "'<qt>123 Main Street<br/>Market Town</qt>', 101)");
+ query.exec("insert into person values(2, 'Bob', "
+ "'<qt>PO Box 32<br/>Mail Handling Service"
+ "<br/>Service City</qt>', 102)");
+ query.exec("insert into person values(3, 'Carol', "
+ "'<qt>The Lighthouse<br/>Remote Island</qt>', 103)");
+ query.exec("insert into person values(4, 'Donald', "
+ "'<qt>47338 Park Avenue<br/>Big City</qt>', 101)");
+ query.exec("insert into person values(5, 'Emma', "
+ "'<qt>Research Station<br/>Base Camp<br/>"
+ "Big Mountain</qt>', 103)");
+//! [Set up the main table]
+
+//! [Set up the address type table]
+ query.exec("create table addresstype (id int, description varchar(20))");
+ query.exec("insert into addresstype values(101, 'Home')");
+ query.exec("insert into addresstype values(102, 'Work')");
+ query.exec("insert into addresstype values(103, 'Other')");
+
+ model = new QSqlRelationalTableModel(this);
+ model->setTable("person");
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+
+ typeIndex = model->fieldIndex("typeid");
+
+ model->setRelation(typeIndex,
+ QSqlRelation("addresstype", "id", "description"));
+ model->select();
+}
+//! [Set up the address type table]
+
+//! [Slot for updating the buttons]
+void Window::updateButtons(int row)
+{
+ previousButton->setEnabled(row > 0);
+ nextButton->setEnabled(row < model->rowCount() - 1);
+}
+//! [Slot for updating the buttons]
diff --git a/examples/sql/sqlwidgetmapper/window.h b/examples/sql/sqlwidgetmapper/window.h
new file mode 100644
index 0000000..a3628a9
--- /dev/null
+++ b/examples/sql/sqlwidgetmapper/window.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDataWidgetMapper;
+class QItemSelectionModel;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QSqlRelationalTableModel;
+class QStandardItemModel;
+class QStringListModel;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [Window definition]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+private slots:
+ void updateButtons(int row);
+
+private:
+ void setupModel();
+
+ QLabel *nameLabel;
+ QLabel *addressLabel;
+ QLabel *typeLabel;
+ QLineEdit *nameEdit;
+ QTextEdit *addressEdit;
+ QComboBox *typeComboBox;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+
+ QSqlRelationalTableModel *model;
+ QItemSelectionModel *selectionModel;
+ QDataWidgetMapper *mapper;
+ int typeIndex;
+};
+//! [Window definition]
+
+#endif
diff --git a/examples/sql/tablemodel/tablemodel.cpp b/examples/sql/tablemodel/tablemodel.cpp
new file mode 100644
index 0000000..f24c62f
--- /dev/null
+++ b/examples/sql/tablemodel/tablemodel.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtSql>
+
+#include "../connection.h"
+
+void initializeModel(QSqlTableModel *model)
+{
+ model->setTable("person");
+ model->setEditStrategy(QSqlTableModel::OnManualSubmit);
+ model->select();
+
+ model->setHeaderData(0, Qt::Horizontal, QObject::tr("ID"));
+ model->setHeaderData(1, Qt::Horizontal, QObject::tr("First name"));
+ model->setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
+}
+
+QTableView *createView(const QString &title, QSqlTableModel *model)
+{
+ QTableView *view = new QTableView;
+ view->setModel(model);
+ view->setWindowTitle(title);
+ return view;
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!createConnection())
+ return 1;
+
+ QSqlTableModel model;
+
+ initializeModel(&model);
+
+ QTableView *view1 = createView(QObject::tr("Table Model (View 1)"), &model);
+ QTableView *view2 = createView(QObject::tr("Table Model (View 2)"), &model);
+
+ view1->show();
+ view2->move(view1->x() + view1->width() + 20, view1->y());
+ view2->show();
+
+ return app.exec();
+}
diff --git a/examples/sql/tablemodel/tablemodel.pro b/examples/sql/tablemodel/tablemodel.pro
new file mode 100644
index 0000000..4d099d0
--- /dev/null
+++ b/examples/sql/tablemodel/tablemodel.pro
@@ -0,0 +1,9 @@
+HEADERS = ../connection.h
+SOURCES = tablemodel.cpp
+QT += sql
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/sql/tablemodel
+sources.files = $$SOURCES *.h $$RESOURCES $$FORMS tablemodel.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/sql/tablemodel
+INSTALLS += target sources
diff --git a/examples/threads/README b/examples/threads/README
new file mode 100644
index 0000000..e4b426f
--- /dev/null
+++ b/examples/threads/README
@@ -0,0 +1,40 @@
+Qt 4 makes it easier than ever to write multithreaded applications. More
+classes have been made usable from non-GUI threads, and the signals and slots
+mechanism can now be used to communicate between threads.
+
+Additionally, it is now possible to move objects between threads.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/threads/mandelbrot/main.cpp b/examples/threads/mandelbrot/main.cpp
new file mode 100644
index 0000000..2395ff6
--- /dev/null
+++ b/examples/threads/mandelbrot/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mandelbrotwidget.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MandelbrotWidget widget;
+ widget.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro
new file mode 100644
index 0000000..437f449
--- /dev/null
+++ b/examples/threads/mandelbrot/mandelbrot.pro
@@ -0,0 +1,13 @@
+HEADERS = mandelbrotwidget.h \
+ renderthread.h
+SOURCES = main.cpp \
+ mandelbrotwidget.cpp \
+ renderthread.cpp
+
+unix:!mac:LIBS += -lm
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mandelbrot.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
+INSTALLS += target sources
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
new file mode 100644
index 0000000..74b27d8
--- /dev/null
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+
+#include "mandelbrotwidget.h"
+
+//! [0]
+const double DefaultCenterX = -0.637011f;
+const double DefaultCenterY = -0.0395159f;
+const double DefaultScale = 0.00403897f;
+
+const double ZoomInFactor = 0.8f;
+const double ZoomOutFactor = 1 / ZoomInFactor;
+const int ScrollStep = 20;
+//! [0]
+
+//! [1]
+MandelbrotWidget::MandelbrotWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ centerX = DefaultCenterX;
+ centerY = DefaultCenterY;
+ pixmapScale = DefaultScale;
+ curScale = DefaultScale;
+
+ qRegisterMetaType<QImage>("QImage");
+ connect(&thread, SIGNAL(renderedImage(const QImage &, double)),
+ this, SLOT(updatePixmap(const QImage &, double)));
+
+ setWindowTitle(tr("Mandelbrot"));
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::CrossCursor);
+#endif
+ resize(550, 400);
+}
+//! [1]
+
+//! [2]
+void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
+{
+ QPainter painter(this);
+ painter.fillRect(rect(), Qt::black);
+
+ if (pixmap.isNull()) {
+ painter.setPen(Qt::white);
+ painter.drawText(rect(), Qt::AlignCenter,
+ tr("Rendering initial image, please wait..."));
+//! [2] //! [3]
+ return;
+//! [3] //! [4]
+ }
+//! [4]
+
+//! [5]
+ if (curScale == pixmapScale) {
+//! [5] //! [6]
+ painter.drawPixmap(pixmapOffset, pixmap);
+//! [6] //! [7]
+ } else {
+//! [7] //! [8]
+ double scaleFactor = pixmapScale / curScale;
+ int newWidth = int(pixmap.width() * scaleFactor);
+ int newHeight = int(pixmap.height() * scaleFactor);
+ int newX = pixmapOffset.x() + (pixmap.width() - newWidth) / 2;
+ int newY = pixmapOffset.y() + (pixmap.height() - newHeight) / 2;
+
+ painter.save();
+ painter.translate(newX, newY);
+ painter.scale(scaleFactor, scaleFactor);
+ QRectF exposed = painter.matrix().inverted().mapRect(rect()).adjusted(-1, -1, 1, 1);
+ painter.drawPixmap(exposed, pixmap, exposed);
+ painter.restore();
+ }
+//! [8] //! [9]
+
+ QString text = tr("Use mouse wheel or the '+' and '-' keys to zoom. "
+ "Press and hold left mouse button to scroll.");
+ QFontMetrics metrics = painter.fontMetrics();
+ int textWidth = metrics.width(text);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(QColor(0, 0, 0, 127));
+ painter.drawRect((width() - textWidth) / 2 - 5, 0, textWidth + 10,
+ metrics.lineSpacing() + 5);
+ painter.setPen(Qt::white);
+ painter.drawText((width() - textWidth) / 2,
+ metrics.leading() + metrics.ascent(), text);
+}
+//! [9]
+
+//! [10]
+void MandelbrotWidget::resizeEvent(QResizeEvent * /* event */)
+{
+ thread.render(centerX, centerY, curScale, size());
+}
+//! [10]
+
+//! [11]
+void MandelbrotWidget::keyPressEvent(QKeyEvent *event)
+{
+ switch (event->key()) {
+ case Qt::Key_Plus:
+ zoom(ZoomInFactor);
+ break;
+ case Qt::Key_Minus:
+ zoom(ZoomOutFactor);
+ break;
+ case Qt::Key_Left:
+ scroll(-ScrollStep, 0);
+ break;
+ case Qt::Key_Right:
+ scroll(+ScrollStep, 0);
+ break;
+ case Qt::Key_Down:
+ scroll(0, -ScrollStep);
+ break;
+ case Qt::Key_Up:
+ scroll(0, +ScrollStep);
+ break;
+ default:
+ QWidget::keyPressEvent(event);
+ }
+}
+//! [11]
+
+//! [12]
+void MandelbrotWidget::wheelEvent(QWheelEvent *event)
+{
+ int numDegrees = event->delta() / 8;
+ double numSteps = numDegrees / 15.0f;
+ zoom(pow(ZoomInFactor, numSteps));
+}
+//! [12]
+
+//! [13]
+void MandelbrotWidget::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton)
+ lastDragPos = event->pos();
+}
+//! [13]
+
+//! [14]
+void MandelbrotWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() & Qt::LeftButton) {
+ pixmapOffset += event->pos() - lastDragPos;
+ lastDragPos = event->pos();
+ update();
+ }
+}
+//! [14]
+
+//! [15]
+void MandelbrotWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ pixmapOffset += event->pos() - lastDragPos;
+ lastDragPos = QPoint();
+
+ int deltaX = (width() - pixmap.width()) / 2 - pixmapOffset.x();
+ int deltaY = (height() - pixmap.height()) / 2 - pixmapOffset.y();
+ scroll(deltaX, deltaY);
+ }
+}
+//! [15]
+
+//! [16]
+void MandelbrotWidget::updatePixmap(const QImage &image, double scaleFactor)
+{
+ if (!lastDragPos.isNull())
+ return;
+
+ pixmap = QPixmap::fromImage(image);
+ pixmapOffset = QPoint();
+ lastDragPos = QPoint();
+ pixmapScale = scaleFactor;
+ update();
+}
+//! [16]
+
+//! [17]
+void MandelbrotWidget::zoom(double zoomFactor)
+{
+ curScale *= zoomFactor;
+ update();
+ thread.render(centerX, centerY, curScale, size());
+}
+//! [17]
+
+//! [18]
+void MandelbrotWidget::scroll(int deltaX, int deltaY)
+{
+ centerX += deltaX * curScale;
+ centerY += deltaY * curScale;
+ update();
+ thread.render(centerX, centerY, curScale, size());
+}
+//! [18]
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
new file mode 100644
index 0000000..3e8084c
--- /dev/null
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MANDELBROTWIDGET_H
+#define MANDELBROTWIDGET_H
+
+#include <QPixmap>
+#include <QWidget>
+
+#include "renderthread.h"
+
+//! [0]
+class MandelbrotWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MandelbrotWidget(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void wheelEvent(QWheelEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private slots:
+ void updatePixmap(const QImage &image, double scaleFactor);
+
+private:
+ void zoom(double zoomFactor);
+ void scroll(int deltaX, int deltaY);
+
+ RenderThread thread;
+ QPixmap pixmap;
+ QPoint pixmapOffset;
+ QPoint lastDragPos;
+ double centerX;
+ double centerY;
+ double pixmapScale;
+ double curScale;
+};
+//! [0]
+
+#endif
diff --git a/examples/threads/mandelbrot/renderthread.cpp b/examples/threads/mandelbrot/renderthread.cpp
new file mode 100644
index 0000000..5879035
--- /dev/null
+++ b/examples/threads/mandelbrot/renderthread.cpp
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+
+#include "renderthread.h"
+
+//! [0]
+RenderThread::RenderThread(QObject *parent)
+ : QThread(parent)
+{
+ restart = false;
+ abort = false;
+
+ for (int i = 0; i < ColormapSize; ++i)
+ colormap[i] = rgbFromWaveLength(380.0 + (i * 400.0 / ColormapSize));
+}
+//! [0]
+
+//! [1]
+RenderThread::~RenderThread()
+{
+ mutex.lock();
+ abort = true;
+ condition.wakeOne();
+ mutex.unlock();
+
+ wait();
+}
+//! [1]
+
+//! [2]
+void RenderThread::render(double centerX, double centerY, double scaleFactor,
+ QSize resultSize)
+{
+ QMutexLocker locker(&mutex);
+
+ this->centerX = centerX;
+ this->centerY = centerY;
+ this->scaleFactor = scaleFactor;
+ this->resultSize = resultSize;
+
+ if (!isRunning()) {
+ start(LowPriority);
+ } else {
+ restart = true;
+ condition.wakeOne();
+ }
+}
+//! [2]
+
+//! [3]
+void RenderThread::run()
+{
+ forever {
+ mutex.lock();
+ QSize resultSize = this->resultSize;
+ double scaleFactor = this->scaleFactor;
+ double centerX = this->centerX;
+ double centerY = this->centerY;
+ mutex.unlock();
+//! [3]
+
+//! [4]
+ int halfWidth = resultSize.width() / 2;
+//! [4] //! [5]
+ int halfHeight = resultSize.height() / 2;
+ QImage image(resultSize, QImage::Format_RGB32);
+
+ const int NumPasses = 8;
+ int pass = 0;
+ while (pass < NumPasses) {
+ const int MaxIterations = (1 << (2 * pass + 6)) + 32;
+ const int Limit = 4;
+ bool allBlack = true;
+
+ for (int y = -halfHeight; y < halfHeight; ++y) {
+ if (restart)
+ break;
+ if (abort)
+ return;
+
+ uint *scanLine =
+ reinterpret_cast<uint *>(image.scanLine(y + halfHeight));
+ double ay = centerY + (y * scaleFactor);
+
+ for (int x = -halfWidth; x < halfWidth; ++x) {
+ double ax = centerX + (x * scaleFactor);
+ double a1 = ax;
+ double b1 = ay;
+ int numIterations = 0;
+
+ do {
+ ++numIterations;
+ double a2 = (a1 * a1) - (b1 * b1) + ax;
+ double b2 = (2 * a1 * b1) + ay;
+ if ((a2 * a2) + (b2 * b2) > Limit)
+ break;
+
+ ++numIterations;
+ a1 = (a2 * a2) - (b2 * b2) + ax;
+ b1 = (2 * a2 * b2) + ay;
+ if ((a1 * a1) + (b1 * b1) > Limit)
+ break;
+ } while (numIterations < MaxIterations);
+
+ if (numIterations < MaxIterations) {
+ *scanLine++ = colormap[numIterations % ColormapSize];
+ allBlack = false;
+ } else {
+ *scanLine++ = qRgb(0, 0, 0);
+ }
+ }
+ }
+
+ if (allBlack && pass == 0) {
+ pass = 4;
+ } else {
+ if (!restart)
+ emit renderedImage(image, scaleFactor);
+//! [5] //! [6]
+ ++pass;
+ }
+//! [6] //! [7]
+ }
+//! [7]
+
+//! [8]
+ mutex.lock();
+//! [8] //! [9]
+ if (!restart)
+ condition.wait(&mutex);
+ restart = false;
+ mutex.unlock();
+ }
+}
+//! [9]
+
+//! [10]
+uint RenderThread::rgbFromWaveLength(double wave)
+{
+ double r = 0.0;
+ double g = 0.0;
+ double b = 0.0;
+
+ if (wave >= 380.0 && wave <= 440.0) {
+ r = -1.0 * (wave - 440.0) / (440.0 - 380.0);
+ b = 1.0;
+ } else if (wave >= 440.0 && wave <= 490.0) {
+ g = (wave - 440.0) / (490.0 - 440.0);
+ b = 1.0;
+ } else if (wave >= 490.0 && wave <= 510.0) {
+ g = 1.0;
+ b = -1.0 * (wave - 510.0) / (510.0 - 490.0);
+ } else if (wave >= 510.0 && wave <= 580.0) {
+ r = (wave - 510.0) / (580.0 - 510.0);
+ g = 1.0;
+ } else if (wave >= 580.0 && wave <= 645.0) {
+ r = 1.0;
+ g = -1.0 * (wave - 645.0) / (645.0 - 580.0);
+ } else if (wave >= 645.0 && wave <= 780.0) {
+ r = 1.0;
+ }
+
+ double s = 1.0;
+ if (wave > 700.0)
+ s = 0.3 + 0.7 * (780.0 - wave) / (780.0 - 700.0);
+ else if (wave < 420.0)
+ s = 0.3 + 0.7 * (wave - 380.0) / (420.0 - 380.0);
+
+ r = pow(r * s, 0.8);
+ g = pow(g * s, 0.8);
+ b = pow(b * s, 0.8);
+ return qRgb(int(r * 255), int(g * 255), int(b * 255));
+}
+//! [10]
diff --git a/examples/threads/mandelbrot/renderthread.h b/examples/threads/mandelbrot/renderthread.h
new file mode 100644
index 0000000..2b03186
--- /dev/null
+++ b/examples/threads/mandelbrot/renderthread.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERTHREAD_H
+#define RENDERTHREAD_H
+
+#include <QMutex>
+#include <QSize>
+#include <QThread>
+#include <QWaitCondition>
+
+QT_BEGIN_NAMESPACE
+class QImage;
+QT_END_NAMESPACE
+
+//! [0]
+class RenderThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ RenderThread(QObject *parent = 0);
+ ~RenderThread();
+
+ void render(double centerX, double centerY, double scaleFactor,
+ QSize resultSize);
+
+signals:
+ void renderedImage(const QImage &image, double scaleFactor);
+
+protected:
+ void run();
+
+private:
+ uint rgbFromWaveLength(double wave);
+
+ QMutex mutex;
+ QWaitCondition condition;
+ double centerX;
+ double centerY;
+ double scaleFactor;
+ QSize resultSize;
+ bool restart;
+ bool abort;
+
+ enum { ColormapSize = 512 };
+ uint colormap[ColormapSize];
+};
+//! [0]
+
+#endif
diff --git a/examples/threads/queuedcustomtype/block.cpp b/examples/threads/queuedcustomtype/block.cpp
new file mode 100644
index 0000000..1a14f09
--- /dev/null
+++ b/examples/threads/queuedcustomtype/block.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QColor>
+#include <QRect>
+#include "block.h"
+
+Block::Block()
+{
+}
+
+Block::Block(const Block &other)
+{
+ m_rect = other.m_rect;
+ m_color = other.m_color;
+}
+
+Block::~Block()
+{
+}
+
+Block::Block(const QRect &rect, const QColor &color)
+{
+ m_rect = rect;
+ m_color = color;
+}
+
+QColor Block::color() const
+{
+ return m_color;
+}
+
+QRect Block::rect() const
+{
+ return m_rect;
+}
diff --git a/examples/threads/queuedcustomtype/block.h b/examples/threads/queuedcustomtype/block.h
new file mode 100644
index 0000000..2a75529
--- /dev/null
+++ b/examples/threads/queuedcustomtype/block.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BLOCK_H
+#define BLOCK_H
+
+#include <QColor>
+#include <QDebug>
+#include <QMetaType>
+#include <QRect>
+
+//! [custom type definition and meta-type declaration]
+class Block
+{
+public:
+ Block();
+ Block(const Block &other);
+ ~Block();
+
+ Block(const QRect &rect, const QColor &color);
+
+ QColor color() const;
+ QRect rect() const;
+
+private:
+ QRect m_rect;
+ QColor m_color;
+};
+
+Q_DECLARE_METATYPE(Block);
+//! [custom type definition and meta-type declaration]
+
+#endif
diff --git a/examples/threads/queuedcustomtype/main.cpp b/examples/threads/queuedcustomtype/main.cpp
new file mode 100644
index 0000000..93dab49
--- /dev/null
+++ b/examples/threads/queuedcustomtype/main.cpp
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QPainter>
+#include <QTime>
+#include "block.h"
+#include "window.h"
+
+QImage createImage(int width, int height)
+{
+ QImage image(width, height, QImage::Format_RGB16);
+ QPainter painter;
+ QPen pen;
+ pen.setStyle(Qt::NoPen);
+ QBrush brush(Qt::blue);
+
+ painter.begin(&image);
+ painter.fillRect(image.rect(), brush);
+ brush.setColor(Qt::white);
+ painter.setPen(pen);
+ painter.setBrush(brush);
+
+ static const QPointF points1[3] = {
+ QPointF(4, 4),
+ QPointF(7, 4),
+ QPointF(5.5, 1)
+ };
+
+ static const QPointF points2[3] = {
+ QPointF(1, 4),
+ QPointF(7, 4),
+ QPointF(10, 10)
+ };
+
+ static const QPointF points3[3] = {
+ QPointF(4, 4),
+ QPointF(10, 4),
+ QPointF(1, 10)
+ };
+
+ painter.setWindow(0, 0, 10, 10);
+
+ int x = 0;
+ int y = 0;
+ int starWidth = image.width()/3;
+ int starHeight = image.height()/3;
+
+ QRect rect(x, y, starWidth, starHeight);
+
+ for (int i = 0; i < 9; ++i) {
+
+ painter.setViewport(rect);
+ painter.drawPolygon(points1, 3);
+ painter.drawPolygon(points2, 3);
+ painter.drawPolygon(points3, 3);
+
+ if (i % 3 == 2) {
+ y = y + starHeight;
+ rect.moveTop(y);
+
+ x = 0;
+ rect.moveLeft(x);
+
+ } else {
+ x = x + starWidth;
+ rect.moveLeft(x);
+ }
+ }
+
+ painter.end();
+ return image;
+}
+
+//! [main function] //! [main start]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [main start] //! [register meta-type for queued communications]
+ qRegisterMetaType<Block>();
+//! [register meta-type for queued communications]
+ qsrand(QTime::currentTime().elapsed());
+
+ Window window;
+ window.show();
+
+ window.loadImage(createImage(256, 256));
+//! [main finish]
+ return app.exec();
+}
+//! [main finish] //! [main function]
diff --git a/examples/threads/queuedcustomtype/queuedcustomtype.pro b/examples/threads/queuedcustomtype/queuedcustomtype.pro
new file mode 100644
index 0000000..6f39121
--- /dev/null
+++ b/examples/threads/queuedcustomtype/queuedcustomtype.pro
@@ -0,0 +1,7 @@
+HEADERS = block.h \
+ renderthread.h \
+ window.h
+SOURCES = main.cpp \
+ block.cpp \
+ renderthread.cpp \
+ window.cpp
diff --git a/examples/threads/queuedcustomtype/renderthread.cpp b/examples/threads/queuedcustomtype/renderthread.cpp
new file mode 100644
index 0000000..052dd39
--- /dev/null
+++ b/examples/threads/queuedcustomtype/renderthread.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "renderthread.h"
+
+RenderThread::RenderThread(QObject *parent)
+ : QThread(parent)
+{
+ m_abort = false;
+}
+
+RenderThread::~RenderThread()
+{
+ mutex.lock();
+ m_abort = true;
+ mutex.unlock();
+
+ wait();
+}
+
+//![processing the image (start)]
+void RenderThread::processImage(const QImage &image)
+{
+ if (image.isNull())
+ return;
+
+ m_image = image;
+ m_abort = false;
+ start();
+}
+
+void RenderThread::run()
+{
+ int size = qMax(m_image.width()/20, m_image.height()/20);
+ for (int s = size; s > 0; --s) {
+ for (int c = 0; c < 400; ++c) {
+//![processing the image (start)]
+ int x1 = qMax(0, (qrand() % m_image.width()) - s/2);
+ int x2 = qMin(x1 + s/2 + 1, m_image.width());
+ int y1 = qMax(0, (qrand() % m_image.height()) - s/2);
+ int y2 = qMin(y1 + s/2 + 1, m_image.height());
+ int n = 0;
+ int red = 0;
+ int green = 0;
+ int blue = 0;
+ for (int i = y1; i < y2; ++i) {
+ for (int j = x1; j < x2; ++j) {
+ QRgb pixel = m_image.pixel(j, i);
+ red += qRed(pixel);
+ green += qGreen(pixel);
+ blue += qBlue(pixel);
+ n += 1;
+ }
+ }
+//![processing the image (finish)]
+ Block block(QRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1),
+ QColor(red/n, green/n, blue/n));
+ emit sendBlock(block);
+ if (m_abort)
+ return;
+ msleep(10);
+ }
+ }
+}
+//![processing the image (finish)]
+
+void RenderThread::stopProcess()
+{
+ mutex.lock();
+ m_abort = true;
+ mutex.unlock();
+}
diff --git a/examples/threads/queuedcustomtype/renderthread.h b/examples/threads/queuedcustomtype/renderthread.h
new file mode 100644
index 0000000..9c7f049
--- /dev/null
+++ b/examples/threads/queuedcustomtype/renderthread.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RENDERTHREAD_H
+#define RENDERTHREAD_H
+
+#include <QImage>
+#include <QMutex>
+#include <QThread>
+#include "block.h"
+
+//! [RenderThread class definition]
+class RenderThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ RenderThread(QObject *parent = 0);
+ ~RenderThread();
+
+ void processImage(const QImage &image);
+
+signals:
+ void sendBlock(const Block &block);
+
+public slots:
+ void stopProcess();
+
+protected:
+ void run();
+
+private:
+ bool m_abort;
+ QImage m_image;
+ QMutex mutex;
+};
+//! [RenderThread class definition]
+
+#endif
diff --git a/examples/threads/queuedcustomtype/window.cpp b/examples/threads/queuedcustomtype/window.cpp
new file mode 100644
index 0000000..7282e0c
--- /dev/null
+++ b/examples/threads/queuedcustomtype/window.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "window.h"
+
+//! [Window constructor start]
+Window::Window()
+{
+ thread = new RenderThread();
+//! [Window constructor start] //! [set up widgets and connections]
+
+ label = new QLabel();
+ label->setAlignment(Qt::AlignCenter);
+
+ loadButton = new QPushButton(tr("&Load image..."));
+ resetButton = new QPushButton(tr("&Stop"));
+ resetButton->setEnabled(false);
+
+ connect(loadButton, SIGNAL(clicked()), this, SLOT(loadImage()));
+ connect(resetButton, SIGNAL(clicked()), thread, SLOT(stopProcess()));
+ connect(thread, SIGNAL(finished()), this, SLOT(resetUi()));
+//! [set up widgets and connections] //! [connecting signal with custom type]
+ connect(thread, SIGNAL(sendBlock(Block)), this, SLOT(addBlock(Block)));
+//! [connecting signal with custom type]
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout();
+ buttonLayout->addStretch();
+ buttonLayout->addWidget(loadButton);
+ buttonLayout->addWidget(resetButton);
+ buttonLayout->addStretch();
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(label);
+ layout->addLayout(buttonLayout);
+
+//! [Window constructor finish]
+ setWindowTitle(tr("Queued Custom Type"));
+}
+//! [Window constructor finish]
+
+void Window::loadImage()
+{
+ QStringList formats;
+ foreach (QByteArray format, QImageReader::supportedImageFormats())
+ if (format.toLower() == format)
+ formats.append("*." + format);
+
+ QString newPath = QFileDialog::getOpenFileName(this, tr("Open Image"),
+ path, tr("Image files (%1)").arg(formats.join(" ")));
+
+ if (newPath.isEmpty())
+ return;
+
+ QImage image(newPath);
+ if (!image.isNull()) {
+ loadImage(image);
+ path = newPath;
+ }
+}
+
+void Window::loadImage(const QImage &image)
+{
+ QDesktopWidget desktop;
+ QImage useImage;
+ QRect space = desktop.availableGeometry();
+ if (image.width() > 0.75*space.width() || image.height() > 0.75*space.height())
+ useImage = image.scaled(0.75*space.width(), 0.75*space.height(),
+ Qt::KeepAspectRatio, Qt::SmoothTransformation);
+ else
+ useImage = image;
+
+ pixmap = QPixmap(useImage.width(), useImage.height());
+ pixmap.fill(qRgb(255, 255, 255));
+ label->setPixmap(pixmap);
+ loadButton->setEnabled(false);
+ resetButton->setEnabled(true);
+ thread->processImage(useImage);
+}
+
+//! [Adding blocks to the display]
+void Window::addBlock(const Block &block)
+{
+ QColor color = block.color();
+ color.setAlpha(64);
+
+ QPainter painter;
+ painter.begin(&pixmap);
+ painter.fillRect(block.rect(), color);
+ painter.end();
+ label->setPixmap(pixmap);
+}
+//! [Adding blocks to the display]
+
+void Window::resetUi()
+{
+ loadButton->setEnabled(true);
+ resetButton->setEnabled(false);
+}
diff --git a/examples/threads/queuedcustomtype/window.h b/examples/threads/queuedcustomtype/window.h
new file mode 100644
index 0000000..c0ed280
--- /dev/null
+++ b/examples/threads/queuedcustomtype/window.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+#include "renderthread.h"
+
+class QLabel;
+class QPushButton;
+
+//! [Window class definition]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+ void loadImage(const QImage &image);
+
+public slots:
+ void addBlock(const Block &block);
+
+private slots:
+ void loadImage();
+ void resetUi();
+
+private:
+ QLabel *label;
+ QPixmap pixmap;
+ QPushButton *loadButton;
+ QPushButton *resetButton;
+ QString path;
+ RenderThread *thread;
+};
+//! [Window class definition]
+
+#endif
diff --git a/examples/threads/semaphores/semaphores.cpp b/examples/threads/semaphores/semaphores.cpp
new file mode 100644
index 0000000..548380d
--- /dev/null
+++ b/examples/threads/semaphores/semaphores.cpp
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+//! [0]
+const int DataSize = 100000;
+const int BufferSize = 8192;
+char buffer[BufferSize];
+
+QSemaphore freeBytes(BufferSize);
+QSemaphore usedBytes;
+//! [0]
+
+//! [1]
+class Producer : public QThread
+//! [1] //! [2]
+{
+public:
+ void run();
+};
+
+void Producer::run()
+{
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ for (int i = 0; i < DataSize; ++i) {
+ freeBytes.acquire();
+ buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
+ usedBytes.release();
+ }
+}
+//! [2]
+
+//! [3]
+class Consumer : public QThread
+//! [3] //! [4]
+{
+public:
+ void run();
+};
+
+void Consumer::run()
+{
+ for (int i = 0; i < DataSize; ++i) {
+ usedBytes.acquire();
+ fprintf(stderr, "%c", buffer[i % BufferSize]);
+ freeBytes.release();
+ }
+ fprintf(stderr, "\n");
+}
+//! [4]
+
+//! [5]
+int main(int argc, char *argv[])
+//! [5] //! [6]
+{
+ QCoreApplication app(argc, argv);
+ Producer producer;
+ Consumer consumer;
+ producer.start();
+ consumer.start();
+ producer.wait();
+ consumer.wait();
+ return 0;
+}
+//! [6]
diff --git a/examples/threads/semaphores/semaphores.pro b/examples/threads/semaphores/semaphores.pro
new file mode 100644
index 0000000..2e468b7
--- /dev/null
+++ b/examples/threads/semaphores/semaphores.pro
@@ -0,0 +1,10 @@
+SOURCES += semaphores.cpp
+QT = core
+CONFIG -= app_bundle
+CONFIG += console
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/threads/semaphores
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS semaphores.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/threads/semaphores
+INSTALLS += target sources
diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro
new file mode 100644
index 0000000..a2ccfa7
--- /dev/null
+++ b/examples/threads/threads.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+SUBDIRS = mandelbrot \
+ semaphores \
+ waitconditions
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/threads
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS threads.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/threads
+INSTALLS += target sources
diff --git a/examples/threads/waitconditions/waitconditions.cpp b/examples/threads/waitconditions/waitconditions.cpp
new file mode 100644
index 0000000..44188d5
--- /dev/null
+++ b/examples/threads/waitconditions/waitconditions.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+//! [0]
+const int DataSize = 100000;
+const int BufferSize = 8192;
+char buffer[BufferSize];
+
+QWaitCondition bufferNotEmpty;
+QWaitCondition bufferNotFull;
+QMutex mutex;
+int numUsedBytes = 0;
+//! [0]
+
+//! [1]
+class Producer : public QThread
+//! [1] //! [2]
+{
+public:
+ void run();
+};
+
+void Producer::run()
+{
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ for (int i = 0; i < DataSize; ++i) {
+ mutex.lock();
+ if (numUsedBytes == BufferSize)
+ bufferNotFull.wait(&mutex);
+ mutex.unlock();
+
+ buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
+
+ mutex.lock();
+ ++numUsedBytes;
+ bufferNotEmpty.wakeAll();
+ mutex.unlock();
+ }
+}
+//! [2]
+
+//! [3]
+class Consumer : public QThread
+//! [3] //! [4]
+{
+public:
+ void run();
+};
+
+void Consumer::run()
+{
+ for (int i = 0; i < DataSize; ++i) {
+ mutex.lock();
+ if (numUsedBytes == 0)
+ bufferNotEmpty.wait(&mutex);
+ mutex.unlock();
+
+ fprintf(stderr, "%c", buffer[i % BufferSize]);
+
+ mutex.lock();
+ --numUsedBytes;
+ bufferNotFull.wakeAll();
+ mutex.unlock();
+ }
+ fprintf(stderr, "\n");
+}
+//! [4]
+
+//! [5]
+int main(int argc, char *argv[])
+//! [5] //! [6]
+{
+ QCoreApplication app(argc, argv);
+ Producer producer;
+ Consumer consumer;
+ producer.start();
+ consumer.start();
+ producer.wait();
+ consumer.wait();
+ return 0;
+}
+//! [6]
diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro
new file mode 100644
index 0000000..8c34cec
--- /dev/null
+++ b/examples/threads/waitconditions/waitconditions.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (1.08a) Fri Jan 7 15:25:07 2005
+######################################################################
+
+TEMPLATE = app
+CONFIG -= moc app_bundle
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += waitconditions.cpp
+CONFIG += qt warn_on create_prl link_prl console
+OBJECTS_DIR=.obj/debug-shared
+MOC_DIR=.moc/debug-shared
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/threads/waitconditions
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS waitconditions.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/threads/waitconditions
+INSTALLS += target sources
diff --git a/examples/tools/README b/examples/tools/README
new file mode 100644
index 0000000..b0926f2
--- /dev/null
+++ b/examples/tools/README
@@ -0,0 +1,40 @@
+Qt is equipped with a range of capable tool classes, from containers and
+iterators to classes for string handling and manipulation.
+
+Other classes provide application infrastructure support, handling plugin
+loading and managing configuration files.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/tools/codecs/codecs.pro b/examples/tools/codecs/codecs.pro
new file mode 100644
index 0000000..6ae225a
--- /dev/null
+++ b/examples/tools/codecs/codecs.pro
@@ -0,0 +1,11 @@
+HEADERS += mainwindow.h \
+ previewform.h
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ previewform.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS encodedfiles codecs.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs
+INSTALLS += target sources
diff --git a/examples/tools/codecs/encodedfiles/.gitattributes b/examples/tools/codecs/encodedfiles/.gitattributes
new file mode 100644
index 0000000..996aab2
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/.gitattributes
@@ -0,0 +1,2 @@
+iso-8859-15.txt -crlf
+iso-8859-1.txt -crlf
diff --git a/examples/tools/codecs/encodedfiles/iso-8859-1.txt b/examples/tools/codecs/encodedfiles/iso-8859-1.txt
new file mode 100644
index 0000000..4a7ebe3
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/iso-8859-1.txt
@@ -0,0 +1,6 @@
+Paulo Coelho: O Gênio e as Rosas
+Anna Hallström, Urban Östberg: Svår svenska
+Darrell Huff: How to Lie with Statistics
+Franz Kafka: Das Schloß
+Walter Moers: Die 13½ Leben des Käpt'n Blaubär
+Dag Solstad: Forsøk på å beskrive det ugjennomtrengelige
diff --git a/examples/tools/codecs/encodedfiles/iso-8859-15.txt b/examples/tools/codecs/encodedfiles/iso-8859-15.txt
new file mode 100644
index 0000000..cd43ea3
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/iso-8859-15.txt
@@ -0,0 +1,8 @@
+Paulo Coelho: O Gênio e as Rosas
+Jean-Pierre Coffe: À table en famille avec 15 ¤ par jour
+Anna Hallström, Urban Östberg: Svår svenska
+Darrell Huff: How to Lie with Statistics
+Franz Kafka: Das Schloß
+Helena Lehecková: T¨ekkiä suomalaisille
+Arthur Rimbaud: ¼uvres complètes
+Dag Solstad: Forsøk på å beskrive det ugjennomtrengelige
diff --git a/examples/tools/codecs/encodedfiles/utf-16.txt b/examples/tools/codecs/encodedfiles/utf-16.txt
new file mode 100644
index 0000000..371f06f
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/utf-16.txt
Binary files differ
diff --git a/examples/tools/codecs/encodedfiles/utf-16be.txt b/examples/tools/codecs/encodedfiles/utf-16be.txt
new file mode 100644
index 0000000..d8ae642
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/utf-16be.txt
Binary files differ
diff --git a/examples/tools/codecs/encodedfiles/utf-16le.txt b/examples/tools/codecs/encodedfiles/utf-16le.txt
new file mode 100644
index 0000000..3779264
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/utf-16le.txt
Binary files differ
diff --git a/examples/tools/codecs/encodedfiles/utf-8.txt b/examples/tools/codecs/encodedfiles/utf-8.txt
new file mode 100644
index 0000000..a5e4ae6f
--- /dev/null
+++ b/examples/tools/codecs/encodedfiles/utf-8.txt
@@ -0,0 +1,6 @@
+Språk: Norsk
+Γλώσσα: Ελληνικά
+Язык: РуÑÑкий
+언어 : 한국어
+言語: 日本語
+Langage : Français
diff --git a/examples/tools/codecs/main.cpp b/examples/tools/codecs/main.cpp
new file mode 100644
index 0000000..4856752
--- /dev/null
+++ b/examples/tools/codecs/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp
new file mode 100644
index 0000000..1e6fa69
--- /dev/null
+++ b/examples/tools/codecs/mainwindow.cpp
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "previewform.h"
+
+MainWindow::MainWindow()
+{
+ textEdit = new QTextEdit;
+ textEdit->setLineWrapMode(QTextEdit::NoWrap);
+ setCentralWidget(textEdit);
+
+ findCodecs();
+
+ previewForm = new PreviewForm(this);
+ previewForm->setCodecList(codecs);
+
+ createActions();
+ createMenus();
+
+ setWindowTitle(tr("Codecs"));
+ resize(500, 400);
+}
+
+void MainWindow::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly)) {
+ QMessageBox::warning(this, tr("Codecs"),
+ tr("Cannot read file %1:\n%2")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QByteArray data = file.readAll();
+
+ previewForm->setEncodedData(data);
+ if (previewForm->exec())
+ textEdit->setPlainText(previewForm->decodedString());
+ }
+}
+
+void MainWindow::save()
+{
+ QString fileName = QFileDialog::getSaveFileName(this);
+ if (!fileName.isEmpty()) {
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Codecs"),
+ tr("Cannot write file %1:\n%2")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QAction *action = qobject_cast<QAction *>(sender());
+ QByteArray codecName = action->data().toByteArray();
+
+ QTextStream out(&file);
+ out.setCodec(codecName);
+ out << textEdit->toPlainText();
+ }
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Codecs"),
+ tr("The <b>Codecs</b> example demonstrates how to read and write "
+ "files using various encodings."));
+}
+
+void MainWindow::aboutToShowSaveAsMenu()
+{
+ QString currentText = textEdit->toPlainText();
+
+ foreach (QAction *action, saveAsActs) {
+ QByteArray codecName = action->data().toByteArray();
+ QTextCodec *codec = QTextCodec::codecForName(codecName);
+ action->setVisible(codec && codec->canEncode(currentText));
+ }
+}
+
+void MainWindow::findCodecs()
+{
+ QMap<QString, QTextCodec *> codecMap;
+ QRegExp iso8859RegExp("ISO[- ]8859-([0-9]+).*");
+
+ foreach (int mib, QTextCodec::availableMibs()) {
+ QTextCodec *codec = QTextCodec::codecForMib(mib);
+
+ QString sortKey = codec->name().toUpper();
+ int rank;
+
+ if (sortKey.startsWith("UTF-8")) {
+ rank = 1;
+ } else if (sortKey.startsWith("UTF-16")) {
+ rank = 2;
+ } else if (iso8859RegExp.exactMatch(sortKey)) {
+ if (iso8859RegExp.cap(1).size() == 1)
+ rank = 3;
+ else
+ rank = 4;
+ } else {
+ rank = 5;
+ }
+ sortKey.prepend(QChar('0' + rank));
+
+ codecMap.insert(sortKey, codec);
+ }
+ codecs = codecMap.values();
+}
+
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ foreach (QTextCodec *codec, codecs) {
+ QString text = tr("%1...").arg(QString(codec->name()));
+
+ QAction *action = new QAction(text, this);
+ action->setData(codec->name());
+ connect(action, SIGNAL(triggered()), this, SLOT(save()));
+ saveAsActs.append(action);
+ }
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ saveAsMenu = new QMenu(tr("&Save As"), this);
+ foreach (QAction *action, saveAsActs)
+ saveAsMenu->addAction(action);
+ connect(saveAsMenu, SIGNAL(aboutToShow()),
+ this, SLOT(aboutToShowSaveAsMenu()));
+
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addMenu(saveAsMenu);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addSeparator();
+ menuBar()->addMenu(helpMenu);
+}
diff --git a/examples/tools/codecs/mainwindow.h b/examples/tools/codecs/mainwindow.h
new file mode 100644
index 0000000..1702d5c
--- /dev/null
+++ b/examples/tools/codecs/mainwindow.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QTextCodec;
+class QTextEdit;
+QT_END_NAMESPACE
+class PreviewForm;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void open();
+ void save();
+ void about();
+ void aboutToShowSaveAsMenu();
+
+private:
+ void findCodecs();
+ void createActions();
+ void createMenus();
+
+ QTextEdit *textEdit;
+ PreviewForm *previewForm;
+ QList<QTextCodec *> codecs;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QMenu *saveAsMenu;
+ QAction *openAct;
+ QList<QAction *> saveAsActs;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/tools/codecs/previewform.cpp b/examples/tools/codecs/previewform.cpp
new file mode 100644
index 0000000..cbe084f
--- /dev/null
+++ b/examples/tools/codecs/previewform.cpp
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "previewform.h"
+
+PreviewForm::PreviewForm(QWidget *parent)
+ : QDialog(parent)
+{
+ encodingComboBox = new QComboBox;
+
+ encodingLabel = new QLabel(tr("&Encoding:"));
+ encodingLabel->setBuddy(encodingComboBox);
+
+ textEdit = new QTextEdit;
+ textEdit->setLineWrapMode(QTextEdit::NoWrap);
+ textEdit->setReadOnly(true);
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel);
+
+ connect(encodingComboBox, SIGNAL(activated(int)),
+ this, SLOT(updateTextEdit()));
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(encodingLabel, 0, 0);
+ mainLayout->addWidget(encodingComboBox, 0, 1);
+ mainLayout->addWidget(textEdit, 1, 0, 1, 2);
+ mainLayout->addWidget(buttonBox, 2, 0, 1, 2);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Choose Encoding"));
+ resize(400, 300);
+}
+
+void PreviewForm::setCodecList(const QList<QTextCodec *> &list)
+{
+ encodingComboBox->clear();
+ foreach (QTextCodec *codec, list)
+ encodingComboBox->addItem(codec->name(), codec->mibEnum());
+}
+
+void PreviewForm::setEncodedData(const QByteArray &data)
+{
+ encodedData = data;
+ updateTextEdit();
+}
+
+void PreviewForm::updateTextEdit()
+{
+ int mib = encodingComboBox->itemData(
+ encodingComboBox->currentIndex()).toInt();
+ QTextCodec *codec = QTextCodec::codecForMib(mib);
+
+ QTextStream in(&encodedData);
+ in.setAutoDetectUnicode(false);
+ in.setCodec(codec);
+ decodedStr = in.readAll();
+
+ textEdit->setPlainText(decodedStr);
+}
diff --git a/examples/tools/codecs/previewform.h b/examples/tools/codecs/previewform.h
new file mode 100644
index 0000000..130cb79
--- /dev/null
+++ b/examples/tools/codecs/previewform.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PREVIEWFORM_H
+#define PREVIEWFORM_H
+
+#include <QDialog>
+#include <QList>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QLabel;
+class QTextCodec;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class PreviewForm : public QDialog
+{
+ Q_OBJECT
+
+public:
+ PreviewForm(QWidget *parent = 0);
+
+ void setCodecList(const QList<QTextCodec *> &list);
+ void setEncodedData(const QByteArray &data);
+ QString decodedString() const { return decodedStr; }
+
+private slots:
+ void updateTextEdit();
+
+private:
+ QByteArray encodedData;
+ QString decodedStr;
+
+ QComboBox *encodingComboBox;
+ QLabel *encodingLabel;
+ QTextEdit *textEdit;
+ QDialogButtonBox *buttonBox;
+};
+
+#endif
diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro
new file mode 100644
index 0000000..4ac5084
--- /dev/null
+++ b/examples/tools/completer/completer.pro
@@ -0,0 +1,12 @@
+HEADERS = dirmodel.h \
+ mainwindow.h
+SOURCES = dirmodel.cpp \
+ main.cpp \
+ mainwindow.cpp
+RESOURCES = completer.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/completer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS completer.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/completer
+INSTALLS += target sources
diff --git a/examples/tools/completer/completer.qrc b/examples/tools/completer/completer.qrc
new file mode 100644
index 0000000..4f57e1a8
--- /dev/null
+++ b/examples/tools/completer/completer.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>resources/countries.txt</file>
+ <file>resources/wordlist.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/tools/completer/dirmodel.cpp b/examples/tools/completer/dirmodel.cpp
new file mode 100644
index 0000000..1daf03c
--- /dev/null
+++ b/examples/tools/completer/dirmodel.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dirmodel.h"
+
+//! [0]
+DirModel::DirModel(QObject *parent)
+ : QDirModel(parent)
+{
+}
+//! [0]
+
+//! [1]
+QVariant DirModel::data(const QModelIndex &index, int role) const
+{
+ if (role == Qt::DisplayRole && index.column() == 0) {
+ QString path = QDir::toNativeSeparators(filePath(index));
+ if (path.endsWith(QDir::separator()))
+ path.chop(1);
+ return path;
+ }
+
+ return QDirModel::data(index, role);
+}
+//! [1]
diff --git a/examples/tools/completer/dirmodel.h b/examples/tools/completer/dirmodel.h
new file mode 100644
index 0000000..bd49ca9
--- /dev/null
+++ b/examples/tools/completer/dirmodel.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIRMODEL_H
+#define DIRMODEL_H
+
+#include <QDirModel>
+
+// With a QDirModel, set on a view, you will see "Program Files" in the view
+// But with this model, you will see "C:\Program Files" in the view.
+// We acheive this, by having the data() return the entire file path for
+// the display role. Note that the Qt::EditRole over which the QCompleter
+// looks for matches is left unchanged
+//! [0]
+class DirModel : public QDirModel
+{
+public:
+ DirModel(QObject *parent = 0);
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/completer/main.cpp b/examples/tools/completer/main.cpp
new file mode 100644
index 0000000..a414cd5
--- /dev/null
+++ b/examples/tools/completer/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(completer);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp
new file mode 100644
index 0000000..862967a
--- /dev/null
+++ b/examples/tools/completer/mainwindow.cpp
@@ -0,0 +1,264 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "dirmodel.h"
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent), completer(0), lineEdit(0)
+{
+ createMenu();
+
+ QWidget *centralWidget = new QWidget;
+
+ QLabel *modelLabel = new QLabel;
+ modelLabel->setText(tr("Model"));
+
+ modelCombo = new QComboBox;
+ modelCombo->addItem(tr("QDirModel"));
+ modelCombo->addItem(tr("QDirModel that shows full path"));
+ modelCombo->addItem(tr("Country list"));
+ modelCombo->addItem(tr("Word list"));
+ modelCombo->setCurrentIndex(0);
+
+ QLabel *modeLabel = new QLabel;
+ modeLabel->setText(tr("Completion Mode"));
+ modeCombo = new QComboBox;
+ modeCombo->addItem(tr("Inline"));
+ modeCombo->addItem(tr("Filtered Popup"));
+ modeCombo->addItem(tr("Unfiltered Popup"));
+ modeCombo->setCurrentIndex(1);
+
+ QLabel *caseLabel = new QLabel;
+ caseLabel->setText(tr("Case Sensitivity"));
+ caseCombo = new QComboBox;
+ caseCombo->addItem(tr("Case Insensitive"));
+ caseCombo->addItem(tr("Case Sensitive"));
+ caseCombo->setCurrentIndex(0);
+//! [0]
+
+//! [1]
+ wrapCheckBox = new QCheckBox;
+ wrapCheckBox->setText(tr("Wrap around completions"));
+ wrapCheckBox->setChecked(true);
+//! [1]
+
+//! [2]
+ contentsLabel = new QLabel;
+ contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+ connect(modelCombo, SIGNAL(activated(int)), this, SLOT(changeModel()));
+ connect(modeCombo, SIGNAL(activated(int)), this, SLOT(changeMode(int)));
+ connect(caseCombo, SIGNAL(activated(int)), this, SLOT(changeCase(int)));
+//! [2]
+
+//! [3]
+ lineEdit = new QLineEdit;
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(modelLabel, 0, 0); layout->addWidget(modelCombo, 0, 1);
+ layout->addWidget(modeLabel, 1, 0); layout->addWidget(modeCombo, 1, 1);
+ layout->addWidget(caseLabel, 2, 0); layout->addWidget(caseCombo, 2, 1);
+ layout->addWidget(wrapCheckBox, 3, 0);
+ layout->addWidget(contentsLabel, 4, 0, 1, 2);
+ layout->addWidget(lineEdit, 5, 0, 1, 2);
+ centralWidget->setLayout(layout);
+ setCentralWidget(centralWidget);
+
+ changeModel();
+
+ setWindowTitle(tr("Completer"));
+ lineEdit->setFocus();
+}
+//! [3]
+
+//! [4]
+void MainWindow::createMenu()
+{
+ QAction *exitAction = new QAction(tr("Exit"), this);
+ QAction *aboutAct = new QAction(tr("About"), this);
+ QAction *aboutQtAct = new QAction(tr("About Qt"), this);
+
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+ QMenu* fileMenu = menuBar()->addMenu(tr("File"));
+ fileMenu->addAction(exitAction);
+
+ QMenu* helpMenu = menuBar()->addMenu(tr("About"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [4]
+
+//! [5]
+QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly))
+ return new QStringListModel(completer);
+//! [5]
+
+//! [6]
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+#endif
+ QStringList words;
+
+ while (!file.atEnd()) {
+ QByteArray line = file.readLine();
+ if (!line.isEmpty())
+ words << line.trimmed();
+ }
+
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+//! [6]
+
+//! [7]
+ if (!fileName.contains(QLatin1String("countries.txt")))
+ return new QStringListModel(words, completer);
+//! [7]
+
+ // The last two chars of the countries.txt file indicate the country
+ // symbol. We put that in column 2 of a standard item model
+//! [8]
+ QStandardItemModel *m = new QStandardItemModel(words.count(), 2, completer);
+//! [8] //! [9]
+ for (int i = 0; i < words.count(); ++i) {
+ QModelIndex countryIdx = m->index(i, 0);
+ QModelIndex symbolIdx = m->index(i, 1);
+ QString country = words[i].mid(0, words[i].length() - 2).trimmed();
+ QString symbol = words[i].right(2);
+ m->setData(countryIdx, country);
+ m->setData(symbolIdx, symbol);
+ }
+
+ return m;
+}
+//! [9]
+
+//! [10]
+void MainWindow::changeMode(int index)
+{
+ QCompleter::CompletionMode mode;
+ if (index == 0)
+ mode = QCompleter::InlineCompletion;
+ else if (index == 1)
+ mode = QCompleter::PopupCompletion;
+ else
+ mode = QCompleter::UnfilteredPopupCompletion;
+
+ completer->setCompletionMode(mode);
+}
+//! [10]
+
+void MainWindow::changeCase(int cs)
+{
+ completer->setCaseSensitivity(cs ? Qt::CaseSensitive : Qt::CaseInsensitive);
+}
+
+//! [11]
+void MainWindow::changeModel()
+{
+ delete completer;
+ completer = new QCompleter(this);
+
+ switch (modelCombo->currentIndex()) {
+ default:
+ case 0:
+ { // Unsorted QDirModel
+ QDirModel *dirModel = new QDirModel(completer);
+ completer->setModel(dirModel);
+ contentsLabel->setText(tr("Enter file path"));
+ }
+ break;
+//! [11] //! [12]
+ case 1:
+ { // DirModel that shows full paths
+ DirModel *dirModel = new DirModel(completer);
+ completer->setModel(dirModel);
+ contentsLabel->setText(tr("Enter file path"));
+ }
+ break;
+//! [12] //! [13]
+ case 2:
+ { // Country List
+ completer->setModel(modelFromFile(":/resources/countries.txt"));
+ QTreeView *treeView = new QTreeView;
+ completer->setPopup(treeView);
+ treeView->setRootIsDecorated(false);
+ treeView->header()->hide();
+ treeView->header()->setStretchLastSection(false);
+ treeView->header()->setResizeMode(0, QHeaderView::Stretch);
+ treeView->header()->setResizeMode(1, QHeaderView::ResizeToContents);
+ contentsLabel->setText(tr("Enter name of your country"));
+ }
+ break;
+//! [13] //! [14]
+ case 3:
+ { // Word list
+ completer->setModel(modelFromFile(":/resources/wordlist.txt"));
+ completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
+ contentsLabel->setText(tr("Enter a word"));
+ }
+ break;
+ }
+
+ changeMode(modeCombo->currentIndex());
+ changeCase(caseCombo->currentIndex());
+ completer->setWrapAround(wrapCheckBox->isChecked());
+ lineEdit->setCompleter(completer);
+ connect(wrapCheckBox, SIGNAL(clicked(bool)), completer, SLOT(setWrapAround(bool)));
+}
+//! [14]
+
+//! [15]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About"), tr("This example demonstrates the "
+ "different features of the QCompleter class."));
+}
+//! [15]
diff --git a/examples/tools/completer/mainwindow.h b/examples/tools/completer/mainwindow.h
new file mode 100644
index 0000000..f6fba9c
--- /dev/null
+++ b/examples/tools/completer/mainwindow.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QComboBox;
+class QCompleter;
+class QLabel;
+class QLineEdit;
+class QProgressBar;
+class QCheckBox;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void about();
+ void changeCase(int);
+ void changeMode(int);
+ void changeModel();
+//! [0]
+
+//! [1]
+private:
+ void createMenu();
+ QAbstractItemModel *modelFromFile(const QString& fileName);
+
+ QComboBox *caseCombo;
+ QComboBox *modeCombo;
+ QComboBox *modelCombo;
+ QCheckBox *wrapCheckBox;
+ QCompleter *completer;
+ QLabel *contentsLabel;
+ QLineEdit *lineEdit;
+};
+//! [1]
+
+#endif // MAINWINDOW_H
diff --git a/examples/tools/completer/resources/countries.txt b/examples/tools/completer/resources/countries.txt
new file mode 100644
index 0000000..5854fbc
--- /dev/null
+++ b/examples/tools/completer/resources/countries.txt
@@ -0,0 +1,241 @@
+Afghanistan AF
+Albania AL
+Algeria DZ
+American Samoa AS
+Andorra AD
+Angola AO
+Anguilla AI
+Antarctica AQ
+Antigua And Barbuda AG
+Argentina AR
+Armenia AM
+Aruba AW
+Australia AU
+Austria AT
+Azerbaijan AZ
+Bahamas BS
+Bahrain BH
+Bangladesh BD
+Barbados BB
+Belarus BY
+Belgium BE
+Belize BZ
+Benin BJ
+Bermuda BM
+Bhutan BT
+Bolivia BO
+Bosnia And Herzegowina BA
+Botswana BW
+Bouvet Island BV
+Brazil BR
+British Indian Ocean Territory IO
+British Virgin Islands VG
+Brunei Darussalam BN
+Bulgaria BG
+Burkina Faso BF
+Burundi BI
+Cambodia KH
+Cameroon CM
+Canada CA
+Cape Verde CV
+Cayman Islands KY
+Central African Republic CF
+Chad TD
+Chile CL
+China CN
+Christmas Island CX
+Cocos Islands CC
+Colombia CO
+Comoros KM
+Cook Islands CK
+Costa Rica CR
+Croatia HR
+Cuba CU
+Cyprus CY
+Czech Republic CZ
+Democratic Republic Of Congo CD
+Democratic Republic Of Korea KP
+Denmark DK
+Djibouti DJ
+Dominica DM
+Dominican Republic DO
+EastTimor TL
+Ecuador EC
+Egypt EG
+El Salvador SV
+Equatorial Guinea GQ
+Eritrea ER
+Estonia EE
+Ethiopia ET
+Falkland Islands FK
+Faroe Islands FO
+Fiji FJ
+Finland FI
+France FR
+French Guiana GF
+French Polynesia PF
+French Southern Territories TF
+Gabon GA
+Gambia GM
+Georgia GE
+Germany DE
+Ghana GH
+Gibraltar GI
+Greece GR
+Greenland GL
+Grenada GD
+Guadeloupe GP
+Guam GU
+Guatemala GT
+Guinea GN
+Guinea Bissau GW
+Guyana GY
+Haiti HT
+Heard And McDonald Islands HM
+Honduras HN
+Hong Kong HK
+Hungary HU
+Iceland IS
+India IN
+Indonesia ID
+Iran IR
+Iraq IQ
+Ireland IE
+Israel IL
+Italy IT
+Ivory Coast CI
+Jamaica JM
+Japan JP
+Jordan JO
+Kazakhstan KZ
+Kenya KE
+Kiribati KI
+Kuwait KW
+Kyrgyzstan KG
+Lao LA
+Latvia LV
+Lebanon LB
+Lesotho LS
+Liberia LR
+Libyan Arab Jamahiriya LY
+Liechtenstein LI
+Lithuania LT
+Luxembourg LU
+Macau MO
+Macedonia MK
+Madagascar MG
+Malawi MW
+Malaysia MY
+Maldives MV
+Mali ML
+Malta MT
+Marshall Islands MH
+Martinique MQ
+Mauritania MR
+Mauritius MU
+Mayotte YT
+Metropolitan France FX
+Mexico MX
+Micronesia FM
+Moldova MD
+Monaco MC
+Mongolia MN
+Montserrat MS
+Morocco MA
+Mozambique MZ
+Myanmar MM
+Namibia NA
+Nauru NR
+Nepal NP
+Netherlands NL
+Netherlands Antilles AN
+New Caledonia NC
+New Zealand NZ
+Nicaragua NI
+Niger NE
+Nigeria NG
+Niue NU
+Norfolk Island NF
+Northern Mariana Islands MP
+Norway NO
+Oman OM
+Pakistan PK
+Palau PW
+Palestinian Territory PS
+Panama PA
+Papua New Guinea PG
+Paraguay PY
+Peoples Republic Of Congo CG
+Peru PE
+Philippines PH
+Pitcairn PN
+Poland PL
+Portugal PT
+Puerto Rico PR
+Qatar QA
+Republic Of Korea KR
+Reunion RE
+Romania RO
+Russian Federation RU
+Rwanda RW
+Saint Kitts And Nevis KN
+Samoa WS
+San Marino SM
+Sao Tome And Principe ST
+Saudi Arabia SA
+Senegal SN
+Serbia And Montenegro CS
+Seychelles SC
+Sierra Leone SL
+Singapore SG
+Slovakia SK
+Slovenia SI
+Solomon Islands SB
+Somalia SO
+South Africa ZA
+South Georgia And The South Sandwich Islands GS
+Spain ES
+Sri Lanka LK
+St Helena SH
+St Lucia LC
+St Pierre And Miquelon PM
+St Vincent And The Grenadines VC
+Sudan SD
+Suriname SR
+Svalbard And Jan Mayen Islands SJ
+Swaziland SZ
+Sweden SE
+Switzerland CH
+Syrian Arab Republic SY
+Taiwan TW
+Tajikistan TJ
+Tanzania TZ
+Thailand TH
+Togo TG
+Tokelau TK
+Tonga TO
+Trinidad And Tobago TT
+Tunisia TN
+Turkey TR
+Turkmenistan TM
+Turks And Caicos Islands TC
+Tuvalu TV
+US Virgin Islands VI
+Uganda UG
+Ukraine UA
+United Arab Emirates AE
+United Kingdom GB
+United States US
+United States Minor Outlying Islands UM
+Uruguay UY
+Uzbekistan UZ
+Vanuatu VU
+Vatican City State VA
+Venezuela VE
+Viet Nam VN
+Wallis And Futuna Islands WF
+Western Sahara EH
+Yemen YE
+Yugoslavia YU
+Zambia ZM
+Zimbabwe ZW
diff --git a/examples/tools/completer/resources/wordlist.txt b/examples/tools/completer/resources/wordlist.txt
new file mode 100644
index 0000000..e598a19
--- /dev/null
+++ b/examples/tools/completer/resources/wordlist.txt
@@ -0,0 +1,1486 @@
+A4
+able
+about
+above
+absence
+absolutely
+abstract
+access
+according
+accumulated
+achieve
+achieving
+activity
+acts
+actual
+actually
+add
+added
+adding
+addition
+additionally
+additions
+addresses
+adjust
+adjustments
+advanced
+advice
+after
+afterwards
+again
+agenda
+aim
+algorithm
+all
+allocated
+allow
+allowed
+allowing
+allows
+along
+alpha
+already
+also
+alternative
+alternatively
+although
+American
+an
+and
+announced
+annoy
+another
+answer
+answers
+any
+anything
+anyway
+apart
+API
+appear
+appears
+appendices
+appendix
+appends
+application
+applications
+apply
+approach
+approaches
+appropriate
+Arabic
+arbitrary
+are
+areas
+ARGB
+argument
+arguments
+around
+arrangements
+arrive
+arrived
+Arthur
+article
+articles
+as
+asked
+aspects
+assume
+at
+attachment
+attempt
+attempting
+attend
+attendees
+attributes
+authors
+auto-detect
+auto-detecting
+availability
+available
+avoid
+away
+back
+background
+backgrounds
+bandwidth
+bandwidths
+Barcelona
+base
+based
+basic
+basically
+basics
+be
+because
+been
+before
+behave
+behavior
+behind
+being
+below
+benefits
+Berkeley
+between
+bit
+bits
+bitwise
+black
+blended
+blending
+blends
+block
+blue
+BMP
+body
+bold
+booking
+bool
+Boston
+both
+bottom
+box
+boxes
+braces
+break
+breaks
+broad
+browsers
+buffer
+buffers
+build
+builds
+built
+bundled
+burdens
+busy
+but
+by
+bypass
+bypassing
+bytes
+calendar
+call
+called
+calling
+calls
+Cambridge
+can
+canonical
+canonicalised
+cap
+capabilities
+capacity
+caption
+card
+care
+case
+cast
+catch
+causing
+centre
+certain
+challenges
+chance
+change
+changes
+changing
+channel
+channels
+chapter
+char
+chart
+charts
+check
+checks
+Chicago
+chit-chat
+chosen
+chunk
+circle
+citation
+city
+claim
+class
+classes
+clause
+clauses
+clear
+clearing
+client
+clients
+close
+closed
+co-author
+code
+colon
+color
+color-coded
+colorize
+colorizer
+colors
+colour
+column
+columns
+combine
+combined
+combines
+combining
+comes
+command
+commands
+comment
+common
+communicate
+community
+compiled
+complement
+complete
+completely
+completeness
+completes
+completion
+complex
+compliant
+component
+components
+compositing
+composition
+compression
+computation
+computer
+concepts
+conclusion
+concurrent
+configurable
+congested
+congestion
+connect
+connected
+connection
+connections
+cons
+consider
+consisting
+consists
+construct
+constructed
+constructing
+constructor
+constructs
+consume
+contact
+contain
+containing
+contains
+contents
+contents
+continue
+continued
+contributors
+control
+controlled
+controller
+controller
+controlling
+controls
+controls
+conventions
+cook
+cooperation
+copy
+copyright
+core
+cores
+corollary
+correct
+correctly
+corresponding
+could
+couple
+coworkers
+CPU
+create
+creates
+creating
+cross-platform
+crucial
+cultures
+current
+currently
+custom
+customized
+cut
+data
+database
+datasets
+datum
+day
+days
+deal
+dealing
+decide
+decouple
+decoupled
+deeply
+def
+default
+define
+defines
+definition
+definitions
+delegate
+delete
+demo
+demonstrate
+demonstrations
+deployed
+describe
+describes
+design
+desktop
+desktops
+destination
+destinations
+destructor
+details
+detect
+determine
+determines
+developer
+developers
+development
+developments
+device
+devices
+diagram
+dialogs
+dictionary
+did
+difference
+differences
+different
+differs
+digital
+direct
+direct
+directions
+directly
+directory
+discuss
+display
+displaying
+displays
+distribute
+distribution
+disturbing
+divide
+do
+documentation
+documents
+does
+done
+down
+downLimit
+download
+downloaded
+downloading
+draw
+drawing
+drawn
+drop
+drop-in
+Duff
+during
+DVD
+dynamic
+dynamically
+dynamics
+each
+earlier
+easily
+editing
+editors
+education
+effect
+effectively
+effects
+either
+ellipse
+ellipses
+elliptical
+else
+email
+e-mail
+embedded
+emit
+emits
+empty
+enable
+enables
+encapsulates
+enclose
+end
+endnote
+endnotes
+end-user
+engineer
+engineering
+English
+enjoys
+enough
+ensure
+ensures
+entails
+enter
+entire
+entitled
+entries
+entry
+environment
+erases
+error
+errors
+especially
+established
+etc.
+Europe
+even
+evenly
+event
+events
+eventually
+every
+everyone
+example
+examples
+except
+exception
+excessive
+exclusive
+existing
+exists
+expand
+expected
+expense
+export
+exposes
+extend
+extended
+extending
+extensible
+extension
+external
+extra
+extract
+faces
+facilities
+factory
+fade
+failure
+fairness
+falls
+false
+family
+fashion
+fast
+faster
+features
+February
+feedback
+feel
+fetch
+fetching
+few
+fields
+figure
+figures
+file
+file name
+files
+filled
+filler
+final
+finally
+find
+fine
+finish
+finished
+first
+flow
+fly
+focus
+followed
+following
+font
+foot
+footnote
+footnotes
+for
+form
+format
+formats
+format-specific
+forms
+formula
+formulas
+forum
+found
+framework
+France
+from
+front
+full
+fully
+function
+functionality
+function-based
+functions
+future
+gain
+games
+gap
+general
+generic
+Germany
+get
+gill
+give
+given
+gives
+giving
+global
+go
+goes
+got
+gradient
+gradient-filled
+graph
+graphical
+graphics
+gray
+great
+greatly
+green
+grey
+group
+growing
+gui
+GUI
+hack
+had
+half
+Hamburg
+hand
+handing
+handle
+handler
+handlers
+handles
+handling
+happens
+hardware
+harmonica
+has
+have
+having
+he
+head
+header
+headers
+hear
+height
+help
+helper
+here
+high
+high-complexity
+high-level
+highlight
+highly
+hints
+his
+hold
+holder
+holding
+hole
+home
+horizontal
+host
+hosting
+hours
+Houston
+how
+however
+huge
+hyphen
+ID
+idea
+ideally
+if
+Illinois
+illustrate
+illustrated
+illustrates
+image
+images
+impact
+implement
+implementation
+implementations
+implemented
+implementing
+implements
+import
+important
+improvements
+in
+include
+included
+includes
+including
+inclusion
+incoming
+inconvenient
+indent
+index
+indicate
+inexpensively
+influence
+info
+information
+ingenious
+inherits
+initial
+initially
+inner
+input
+inspired
+install
+installs
+instance
+instead
+instructs
+integer
+integers
+integration
+intended
+intensive
+interest
+interests
+interface
+interfaces
+interfere
+internal
+interval
+into
+intriguing
+intro
+introduce
+introduced
+invalid
+invented
+inverse
+invocation
+involved
+Irish
+irregular
+is
+ISO
+ISPs
+issue
+issues
+it
+items
+iterate
+its
+itself
+job
+join
+JPEG
+jungle
+just
+Karaoke
+keep
+keeping
+key
+kind
+king
+known
+label
+labels
+landscape
+language
+large
+last
+later
+latest
+lawn
+layout
+lead
+leader
+leaders
+lean
+leaves
+leaving
+left
+lemma
+length
+less
+let
+level
+levels
+libraries
+library
+lies
+like
+likely
+limit
+limiting
+limits
+line
+linear
+lines
+linewidth
+link
+linked
+linking
+Linux
+list
+lists
+little
+lives
+load
+loading
+loads
+located
+location
+locations
+logo
+long
+longer
+look
+looked
+looking
+looks
+lookup
+lookups
+loop
+lout
+low
+lower-case
+low-level
+macro
+made
+magazine
+magic
+main
+major
+make
+makes
+making
+manage
+managed
+managing
+mandatory
+manipulate
+manipulation
+manner
+many
+map
+maps
+March
+margin
+mask
+masking
+Massachusetts
+match
+mathematical
+maximum
+may
+means
+meet
+member
+members
+memory
+merged
+method
+might
+milliseconds
+minimize
+minimum
+minor
+mix
+MNG
+mode
+model
+models
+modes
+modified
+module
+moments
+monitored
+monthly
+more
+most
+mostly
+move
+much
+multitude
+Munich
+must
+name
+named
+names
+necessary
+need
+needed
+needs
+network
+new
+news
+newsletter
+next
+nicely
+no
+none
+non-Qt
+non-trivial
+non-zero
+normally
+Norway
+not
+note
+notes
+nothing
+notifies
+notify
+now
+null
+number
+numbered
+numbering
+numbers
+Nydalen
+object
+objects
+obtain
+obtaining
+odd
+of
+off
+office
+offset
+offsets
+often
+old
+on
+once
+one
+ones
+online
+only
+on-screen
+onto
+opacity
+opaque
+open
+opens
+operates
+operating
+operation
+operations
+operator
+opportunity
+opposed
+optimize
+option
+optionally
+options
+or
+OR
+order
+ordinary
+original
+originally
+Oslo
+other
+otherwise
+our
+out
+outer
+outgoing
+output
+outside
+over
+overcoming
+overrides
+overview
+own
+owner
+owners
+pace
+Pacific
+package
+packages
+packets
+page
+pages
+paint
+painted
+painting
+paragraph
+paragraphs
+parameters
+parent
+Paris
+parse
+part
+partial
+partially
+particular
+partners
+parts
+party
+passed
+passing
+patches
+path
+pattern
+patterns
+pause
+PDF
+peek
+pending
+perform
+performed
+performs
+permission
+permutations
+personal
+pick
+pie
+pipe
+pixel
+pixels
+place
+places
+planning
+platform-independent
+platforms
+play
+players
+playing
+please
+pleasing
+plugin
+plugin-enabled
+plugins
+plus
+PNG
+pointer
+pop
+popular
+populates
+porter
+Porter
+portrait
+possibility
+possible
+potential
+potentially
+power
+powers
+preceded
+presence
+present
+prevent
+prevents
+previous
+previously
+primarily
+primary
+primitives
+printed
+printing
+prior
+probably
+problem
+process
+processes
+processing
+produce
+produced
+produces
+products
+programming
+programs
+project
+projects
+proof
+proper
+properly
+properties
+property
+proposed
+proposition
+pros
+protocols
+proud
+provide
+provided
+provides
+provision
+proxy
+public
+published
+punch
+punches
+pursuing
+put
+Qt
+Qtopia
+Qt-related
+quality
+quarter
+quarterly
+queried
+queries
+query
+question
+questions
+radial
+ragged
+range
+rate
+rate-controlled
+rates
+rather
+ratio
+raw
+read
+reader
+reading
+reads
+ready
+real
+realistic
+really
+real-time
+received
+recent
+recognized
+recommended
+recompile
+rectangle
+rectangular
+red
+redistribute
+reducing
+reference
+references
+reflect
+regardless
+regional
+register
+registered
+registration
+reimplement
+reimplementation
+reimplemented
+release
+released
+releases
+reliable
+rely
+remains
+remember
+removed
+removes
+repeatedly
+replace
+report
+represent
+represented
+represents
+reproduced
+requested
+require
+required
+requires
+resetting
+resides
+resolve
+respective
+respectively
+response
+rest
+restart
+result
+resulting
+resume
+return
+returning
+returns
+reuse
+revealing
+rich
+riches
+right
+roadshow
+role
+Roman
+round-trip
+router
+routers
+rule
+run
+runner
+runners
+running
+runs
+run-time
+sake
+sales
+salespeople
+same
+sample
+San Jose
+save
+saved
+saves
+say
+scalable
+scale
+scanline
+scanline-level
+scene
+scenes
+schedule
+school
+script
+seam
+seamless
+search
+searches
+searching
+second
+seconds
+section
+sections
+security
+see
+seen
+selection
+seminar
+seminars
+sending
+separated
+separates
+series
+service
+services
+set
+setting
+setup
+seven
+seventh
+several
+shade
+shadow
+shape
+shares
+shaves
+shine
+shorter
+should
+show
+shown
+shows
+side
+signal
+signals
+signature
+significantly
+similar
+similarily
+similarly
+simple
+simplest
+simplified
+simplifying
+simply
+simulate
+simultaneous
+since
+single
+size
+sizes
+slightly
+slope
+slot
+slowing
+small
+smaller
+so
+socket
+sockets
+software
+solutions
+solved
+some
+soon
+sort
+sorting
+source
+sources
+south
+space
+special
+specialized
+specific
+specifically
+specification
+specifications
+specified
+specify
+speed
+spend
+split
+SQL
+standard
+standards
+start
+starts
+starve
+state
+states
+static
+steady
+stealing
+step
+still
+stop
+stopwatch
+store
+stored
+stores
+straightforward
+stream
+string
+strings
+structure
+structured
+strut
+style
+styles
+styling
+subclass
+subclassing
+subdirectory
+subsection
+subsections
+succeeds
+success
+successful
+successfully
+such
+suggestion
+suggestions
+suitable
+support
+supported
+supports
+suppose
+supposes
+sure
+switch
+switches
+symbol
+symbols
+synonyms
+system
+systems
+table
+tables
+tags
+take
+takes
+tap
+target
+targets
+TCP
+team
+technically-focused
+technique
+technology
+template
+templates
+Texas
+text
+than
+that
+the
+their
+them
+then
+theorem
+there
+these
+they
+thickness
+thin
+third
+this
+those
+three
+throttling
+through
+tightly
+time
+timer
+times
+tiny
+tips
+title
+titles
+to
+together
+too
+top
+torrent
+total
+tour
+trademarks
+traffic
+training
+transaction
+transfer
+transferred
+transferring
+transfers
+translucency
+translucent
+transparency
+transparent
+travel
+traveled
+Trolltech
+true
+try
+turn
+twice
+two
+type
+typed
+typical
+typically
+unable
+under
+underlying
+understanding
+undoes
+unique
+united
+unlike
+unpack
+unsigned
+until
+untouched
+up
+update
+updated
+updates
+upload
+uploading
+uploads
+up-to-date
+us
+use
+used
+useful
+user
+user-friendly
+users
+uses
+using
+usual
+usually
+valid
+value
+values
+variable
+variation
+variety
+various
+vector
+venturing
+verifying
+versa
+version
+versions
+vertical
+very
+via
+vice
+virtual
+visual
+void
+VP
+waiting
+Wales
+want
+wants
+was
+way
+ways
+we
+web
+website
+well
+were
+what
+when
+whenever
+where
+whether
+which
+while
+whistle
+white
+who
+whole
+why
+widget
+widgets
+width
+widths
+will
+window
+windows
+wish
+with
+without
+word
+words
+work
+working
+works
+would
+wrap
+wrapper
+write
+writes
+writing
+writings
+written
+X
+X11
+XOR
+year
+years
+yes
+you
+your
+zero
diff --git a/examples/tools/customcompleter/customcompleter.pro b/examples/tools/customcompleter/customcompleter.pro
new file mode 100644
index 0000000..ebaa831
--- /dev/null
+++ b/examples/tools/customcompleter/customcompleter.pro
@@ -0,0 +1,12 @@
+HEADERS = mainwindow.h \
+ textedit.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ textedit.cpp
+RESOURCES = customcompleter.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customcompleter.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+INSTALLS += target sources
diff --git a/examples/tools/customcompleter/customcompleter.qrc b/examples/tools/customcompleter/customcompleter.qrc
new file mode 100644
index 0000000..d7da1bf
--- /dev/null
+++ b/examples/tools/customcompleter/customcompleter.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>resources/wordlist.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/tools/customcompleter/main.cpp b/examples/tools/customcompleter/main.cpp
new file mode 100644
index 0000000..8e64f6c
--- /dev/null
+++ b/examples/tools/customcompleter/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(customcompleter);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/customcompleter/mainwindow.cpp b/examples/tools/customcompleter/mainwindow.cpp
new file mode 100644
index 0000000..8d75ddd
--- /dev/null
+++ b/examples/tools/customcompleter/mainwindow.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+#include "textedit.h"
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent), completer(0)
+{
+ createMenu();
+
+ completingTextEdit = new TextEdit;
+ completer = new QCompleter(this);
+ completer->setModel(modelFromFile(":/resources/wordlist.txt"));
+ completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
+ completer->setCaseSensitivity(Qt::CaseInsensitive);
+ completer->setWrapAround(false);
+ completingTextEdit->setCompleter(completer);
+
+ setCentralWidget(completingTextEdit);
+ resize(500, 300);
+ setWindowTitle(tr("Completer"));
+}
+//! [0]
+
+//! [1]
+void MainWindow::createMenu()
+{
+ QAction *exitAction = new QAction(tr("Exit"), this);
+ QAction *aboutAct = new QAction(tr("About"), this);
+ QAction *aboutQtAct = new QAction(tr("About Qt"), this);
+
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+ QMenu* fileMenu = menuBar()->addMenu(tr("File"));
+ fileMenu->addAction(exitAction);
+
+ QMenu* helpMenu = menuBar()->addMenu(tr("About"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [1]
+
+//! [2]
+QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly))
+ return new QStringListModel(completer);
+
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+#endif
+ QStringList words;
+
+ while (!file.atEnd()) {
+ QByteArray line = file.readLine();
+ if (!line.isEmpty())
+ words << line.trimmed();
+ }
+
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+ return new QStringListModel(words, completer);
+}
+//! [2]
+
+//! [3]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About"), tr("This example demonstrates the "
+ "different features of the QCompleter class."));
+}
+//! [3]
+
diff --git a/examples/tools/customcompleter/mainwindow.h b/examples/tools/customcompleter/mainwindow.h
new file mode 100644
index 0000000..77089c2
--- /dev/null
+++ b/examples/tools/customcompleter/mainwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QComboBox;
+class QCompleter;
+class QLabel;
+class QLineEdit;
+class QProgressBar;
+QT_END_NAMESPACE
+class TextEdit;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void about();
+
+private:
+ void createMenu();
+ QAbstractItemModel *modelFromFile(const QString& fileName);
+
+ QCompleter *completer;
+ TextEdit *completingTextEdit;
+};
+//! [0]
+
+#endif // MAINWINDOW_H
diff --git a/examples/tools/customcompleter/resources/wordlist.txt b/examples/tools/customcompleter/resources/wordlist.txt
new file mode 100644
index 0000000..a5de826
--- /dev/null
+++ b/examples/tools/customcompleter/resources/wordlist.txt
@@ -0,0 +1,1455 @@
+A4
+able
+about
+above
+absence
+absolutely
+abstract
+access
+according
+accumulated
+achieve
+achieving
+activity
+acts
+actual
+actually
+add
+added
+adding
+addition
+additionally
+additions
+addresses
+adjust
+adjustments
+advanced
+advice
+after
+afterwards
+again
+agenda
+aim
+algorithm
+all
+allocated
+allow
+allowed
+allowing
+allows
+along
+alpha
+already
+also
+alternative
+alternatively
+although
+American
+an
+and
+announced
+annoy
+another
+answer
+answers
+any
+anything
+anyway
+apart
+API
+appear
+appears
+appendices
+appendix
+appends
+application
+applications
+apply
+approach
+approaches
+appropriate
+Arabic
+arbitrary
+are
+areas
+ARGB
+argument
+arguments
+around
+arrangements
+arrive
+arrived
+Arthur
+article
+articles
+as
+asked
+aspects
+assume
+at
+attachment
+attempt
+attempting
+attend
+attendees
+attributes
+authors
+availability
+available
+avoid
+away
+back
+background
+backgrounds
+bandwidth
+bandwidths
+Barcelona
+base
+based
+basic
+basically
+basics
+be
+because
+been
+before
+behave
+behavior
+behind
+being
+below
+benefits
+Berkeley
+between
+bit
+bits
+bitwise
+black
+blended
+blending
+blends
+block
+blue
+BMP
+body
+bold
+booking
+bool
+Boston
+both
+bottom
+box
+boxes
+braces
+break
+breaks
+broad
+browsers
+buffer
+buffers
+build
+builds
+built
+bundled
+burdens
+busy
+but
+by
+bypass
+bypassing
+bytes
+calendar
+call
+called
+calling
+calls
+Cambridge
+can
+canonical
+canonicalised
+cap
+capabilities
+capacity
+caption
+card
+care
+case
+cast
+catch
+causing
+centre
+certain
+challenges
+chance
+change
+changes
+changing
+channel
+channels
+chapter
+char
+chart
+charts
+check
+checks
+Chicago
+chosen
+chunk
+circle
+citation
+city
+claim
+class
+classes
+clause
+clauses
+clear
+clearing
+client
+clients
+close
+closed
+code
+colon
+color
+colorize
+colorizer
+colors
+colour
+column
+columns
+combine
+combined
+combines
+combining
+comes
+command
+commands
+comment
+common
+communicate
+community
+compiled
+complement
+complete
+completely
+completeness
+completes
+completion
+complex
+compliant
+component
+components
+compositing
+composition
+compression
+computation
+computer
+concepts
+conclusion
+concurrent
+configurable
+congested
+congestion
+connect
+connected
+connection
+connections
+cons
+consider
+consisting
+consists
+construct
+constructed
+constructing
+constructor
+constructs
+consume
+contact
+contain
+containing
+contains
+contents
+contents
+continue
+continued
+contributors
+control
+controlled
+controller
+controller
+controlling
+controls
+controls
+conventions
+cook
+cooperation
+copy
+copyright
+core
+cores
+corollary
+correct
+correctly
+corresponding
+could
+couple
+coworkers
+CPU
+create
+creates
+creating
+crucial
+cultures
+current
+currently
+custom
+customized
+cut
+data
+database
+datasets
+datum
+day
+days
+deal
+dealing
+decide
+decouple
+decoupled
+deeply
+def
+default
+define
+defines
+definition
+definitions
+delegate
+delete
+demo
+demonstrate
+demonstrations
+deployed
+describe
+describes
+design
+desktop
+desktops
+destination
+destinations
+destructor
+details
+detect
+determine
+determines
+developer
+developers
+development
+developments
+device
+devices
+diagram
+dialogs
+dictionary
+did
+difference
+differences
+different
+differs
+digital
+direct
+direct
+directions
+directly
+directory
+discuss
+display
+displaying
+displays
+distribute
+distribution
+disturbing
+divide
+do
+documentation
+documents
+does
+done
+down
+downLimit
+download
+downloaded
+downloading
+draw
+drawing
+drawn
+drop
+Duff
+during
+DVD
+dynamic
+dynamically
+dynamics
+each
+earlier
+easily
+editing
+editors
+education
+effect
+effectively
+effects
+either
+ellipse
+ellipses
+elliptical
+else
+email
+embedded
+emit
+emits
+empty
+enable
+enables
+encapsulates
+enclose
+end
+endnote
+endnotes
+engineer
+engineering
+English
+enjoys
+enough
+ensure
+ensures
+entails
+enter
+entire
+entitled
+entries
+entry
+environment
+erases
+error
+errors
+especially
+established
+etc.
+Europe
+even
+evenly
+event
+events
+eventually
+every
+everyone
+example
+examples
+except
+exception
+excessive
+exclusive
+existing
+exists
+expand
+expected
+expense
+export
+exposes
+extend
+extended
+extending
+extensible
+extension
+external
+extra
+extract
+faces
+facilities
+factory
+fade
+failure
+fairness
+falls
+false
+family
+fashion
+fast
+faster
+features
+February
+feedback
+feel
+fetch
+fetching
+few
+fields
+figure
+figures
+file
+file name
+files
+filled
+filler
+final
+finally
+find
+fine
+finish
+finished
+first
+flow
+fly
+focus
+followed
+following
+font
+foot
+footnote
+footnotes
+for
+form
+format
+formats
+forms
+formula
+formulas
+forum
+found
+framework
+France
+from
+front
+full
+fully
+function
+functionality
+functions
+future
+gain
+games
+gap
+general
+generic
+Germany
+get
+gill
+give
+given
+gives
+giving
+global
+go
+goes
+got
+gradient
+graph
+graphical
+graphics
+gray
+great
+greatly
+green
+grey
+group
+growing
+gui
+GUI
+hack
+had
+half
+Hamburg
+hand
+handing
+handle
+handler
+handlers
+handles
+handling
+happens
+hardware
+harmonica
+has
+have
+having
+he
+head
+header
+headers
+hear
+height
+help
+helper
+here
+high
+highlight
+highly
+hints
+his
+hold
+holder
+holding
+hole
+home
+horizontal
+host
+hosting
+hours
+Houston
+how
+however
+huge
+hyphen
+ID
+idea
+ideally
+if
+Illinois
+illustrate
+illustrated
+illustrates
+image
+images
+impact
+implement
+implementation
+implementations
+implemented
+implementing
+implements
+import
+important
+improvements
+in
+include
+included
+includes
+including
+inclusion
+incoming
+inconvenient
+indent
+index
+indicate
+inexpensively
+influence
+info
+information
+ingenious
+inherits
+initial
+initially
+inner
+input
+inspired
+install
+installs
+instance
+instead
+instructs
+integer
+integers
+integration
+intended
+intensive
+interest
+interests
+interface
+interfaces
+interfere
+internal
+interval
+into
+intriguing
+intro
+introduce
+introduced
+invalid
+invented
+inverse
+invocation
+involved
+Irish
+irregular
+is
+ISO
+ISPs
+issue
+issues
+it
+items
+iterate
+its
+itself
+job
+join
+JPEG
+jungle
+just
+Karaoke
+keep
+keeping
+key
+kind
+king
+known
+label
+labels
+landscape
+language
+large
+last
+later
+latest
+lawn
+layout
+lead
+leader
+leaders
+lean
+leaves
+leaving
+left
+lemma
+length
+less
+let
+level
+levels
+libraries
+library
+lies
+like
+likely
+limit
+limiting
+limits
+line
+linear
+lines
+linewidth
+link
+linked
+linking
+Linux
+list
+lists
+little
+lives
+load
+loading
+loads
+located
+location
+locations
+logo
+long
+longer
+look
+looked
+looking
+looks
+lookup
+lookups
+loop
+lout
+low
+macro
+made
+magazine
+magic
+main
+major
+make
+makes
+making
+manage
+managed
+managing
+mandatory
+manipulate
+manipulation
+manner
+many
+map
+maps
+March
+margin
+mask
+masking
+Massachusetts
+match
+mathematical
+maximum
+may
+means
+meet
+member
+members
+memory
+merged
+method
+might
+milliseconds
+minimize
+minimum
+minor
+mix
+MNG
+mode
+model
+models
+modes
+modified
+module
+moments
+monitored
+monthly
+more
+most
+mostly
+move
+much
+multitude
+Munich
+must
+name
+named
+names
+necessary
+need
+needed
+needs
+network
+new
+news
+newsletter
+next
+nicely
+no
+none
+normally
+Norway
+not
+note
+notes
+nothing
+notifies
+notify
+now
+null
+number
+numbered
+numbering
+numbers
+Nydalen
+object
+objects
+obtain
+obtaining
+odd
+of
+off
+office
+offset
+offsets
+often
+old
+on
+once
+one
+ones
+online
+only
+onto
+opacity
+opaque
+open
+opens
+operates
+operating
+operation
+operations
+operator
+opportunity
+opposed
+optimize
+option
+optionally
+options
+or
+OR
+order
+ordinary
+original
+originally
+Oslo
+other
+otherwise
+our
+out
+outer
+outgoing
+output
+outside
+over
+overcoming
+overrides
+overview
+own
+owner
+owners
+pace
+Pacific
+package
+packages
+packets
+page
+pages
+paint
+painted
+painting
+paragraph
+paragraphs
+parameters
+parent
+Paris
+parse
+part
+partial
+partially
+particular
+partners
+parts
+party
+passed
+passing
+patches
+path
+pattern
+patterns
+pause
+PDF
+peek
+pending
+perform
+performed
+performs
+permission
+permutations
+personal
+pick
+pie
+pipe
+pixel
+pixels
+place
+places
+planning
+platforms
+play
+players
+playing
+please
+pleasing
+plugin
+plugins
+plus
+PNG
+pointer
+pop
+popular
+populates
+porter
+Porter
+portrait
+possibility
+possible
+potential
+potentially
+power
+powers
+preceded
+presence
+present
+prevent
+prevents
+previous
+previously
+primarily
+primary
+primitives
+printed
+printing
+prior
+probably
+problem
+process
+processes
+processing
+produce
+produced
+produces
+products
+programming
+programs
+project
+projects
+proof
+proper
+properly
+properties
+property
+proposed
+proposition
+pros
+protocols
+proud
+provide
+provided
+provides
+provision
+proxy
+public
+published
+punch
+punches
+pursuing
+put
+Qt
+Qtopia
+quality
+quarter
+quarterly
+queried
+queries
+query
+question
+questions
+radial
+ragged
+range
+rate
+rates
+rather
+ratio
+raw
+read
+reader
+reading
+reads
+ready
+real
+realistic
+really
+received
+recent
+recognized
+recommended
+recompile
+rectangle
+rectangular
+red
+redistribute
+reducing
+reference
+references
+reflect
+regardless
+regional
+register
+registered
+registration
+reimplement
+reimplementation
+reimplemented
+release
+released
+releases
+reliable
+rely
+remains
+remember
+removed
+removes
+repeatedly
+replace
+report
+represent
+represented
+represents
+reproduced
+requested
+require
+required
+requires
+resetting
+resides
+resolve
+respective
+respectively
+response
+rest
+restart
+result
+resulting
+resume
+return
+returning
+returns
+reuse
+revealing
+rich
+riches
+right
+roadshow
+role
+Roman
+router
+routers
+rule
+run
+runner
+runners
+running
+runs
+sake
+sales
+salespeople
+same
+sample
+San Jose
+save
+saved
+saves
+say
+scalable
+scale
+scanline
+scene
+scenes
+schedule
+school
+script
+seam
+seamless
+search
+searches
+searching
+second
+seconds
+section
+sections
+security
+see
+seen
+selection
+seminar
+seminars
+sending
+separated
+separates
+series
+service
+services
+set
+setting
+setup
+seven
+seventh
+several
+shade
+shadow
+shape
+shares
+shaves
+shine
+shorter
+should
+show
+shown
+shows
+side
+signal
+signals
+signature
+significantly
+similar
+similarily
+similarly
+simple
+simplest
+simplified
+simplifying
+simply
+simulate
+simultaneous
+since
+single
+size
+sizes
+slightly
+slope
+slot
+slowing
+small
+smaller
+so
+socket
+sockets
+software
+solutions
+solved
+some
+soon
+sort
+sorting
+source
+sources
+south
+space
+special
+specialized
+specific
+specifically
+specification
+specifications
+specified
+specify
+speed
+spend
+split
+SQL
+standard
+standards
+start
+starts
+starve
+state
+states
+static
+steady
+stealing
+step
+still
+stop
+stopwatch
+store
+stored
+stores
+straightforward
+stream
+string
+strings
+structure
+structured
+strut
+style
+styles
+styling
+subclass
+subclassing
+subdirectory
+subsection
+subsections
+succeeds
+success
+successful
+successfully
+such
+suggestion
+suggestions
+suitable
+support
+supported
+supports
+suppose
+supposes
+sure
+switch
+switches
+symbol
+symbols
+synonyms
+system
+systems
+table
+tables
+tags
+take
+takes
+tap
+target
+targets
+TCP
+team
+technique
+technology
+template
+templates
+Texas
+text
+than
+that
+the
+their
+them
+then
+theorem
+there
+these
+they
+thickness
+thin
+third
+this
+those
+three
+throttling
+through
+tightly
+time
+timer
+times
+tiny
+tips
+title
+titles
+to
+together
+too
+top
+torrent
+total
+tour
+trademarks
+traffic
+training
+transaction
+transfer
+transferred
+transferring
+transfers
+translucency
+translucent
+transparency
+transparent
+travel
+traveled
+Trolltech
+true
+try
+turn
+twice
+two
+type
+typed
+typical
+typically
+unable
+under
+underlying
+understanding
+undoes
+unique
+united
+unlike
+unpack
+unsigned
+until
+untouched
+up
+update
+updated
+updates
+upload
+uploading
+uploads
+us
+use
+used
+useful
+user
+users
+uses
+using
+usual
+usually
+valid
+value
+values
+variable
+variation
+variety
+various
+vector
+venturing
+verifying
+versa
+version
+versions
+vertical
+very
+via
+vice
+virtual
+visual
+void
+VP
+waiting
+Wales
+want
+wants
+was
+way
+ways
+we
+web
+website
+well
+were
+what
+when
+whenever
+where
+whether
+which
+while
+whistle
+white
+who
+whole
+why
+widget
+widgets
+width
+widths
+will
+window
+windows
+wish
+with
+without
+word
+words
+work
+working
+works
+would
+wrap
+wrapper
+write
+writes
+writing
+writings
+written
+X
+X11
+XOR
+year
+years
+yes
+you
+your
+zero
diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp
new file mode 100644
index 0000000..ecafa8f
--- /dev/null
+++ b/examples/tools/customcompleter/textedit.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "textedit.h"
+#include <QCompleter>
+#include <QKeyEvent>
+#include <QAbstractItemView>
+#include <QtDebug>
+#include <QApplication>
+#include <QModelIndex>
+#include <QAbstractItemModel>
+#include <QScrollBar>
+
+//! [0]
+TextEdit::TextEdit(QWidget *parent)
+: QTextEdit(parent), c(0)
+{
+ setPlainText(tr("This TextEdit provides autocompletions for words that have more than"
+ " 3 characters. You can trigger autocompletion using ") +
+ QKeySequence("Ctrl+E").toString(QKeySequence::NativeText));
+}
+//! [0]
+
+//! [1]
+TextEdit::~TextEdit()
+{
+}
+//! [1]
+
+//! [2]
+void TextEdit::setCompleter(QCompleter *completer)
+{
+ if (c)
+ QObject::disconnect(c, 0, this, 0);
+
+ c = completer;
+
+ if (!c)
+ return;
+
+ c->setWidget(this);
+ c->setCompletionMode(QCompleter::PopupCompletion);
+ c->setCaseSensitivity(Qt::CaseInsensitive);
+ QObject::connect(c, SIGNAL(activated(const QString&)),
+ this, SLOT(insertCompletion(const QString&)));
+}
+//! [2]
+
+//! [3]
+QCompleter *TextEdit::completer() const
+{
+ return c;
+}
+//! [3]
+
+//! [4]
+void TextEdit::insertCompletion(const QString& completion)
+{
+ if (c->widget() != this)
+ return;
+ QTextCursor tc = textCursor();
+ int extra = completion.length() - c->completionPrefix().length();
+ tc.movePosition(QTextCursor::Left);
+ tc.movePosition(QTextCursor::EndOfWord);
+ tc.insertText(completion.right(extra));
+ setTextCursor(tc);
+}
+//! [4]
+
+//! [5]
+QString TextEdit::textUnderCursor() const
+{
+ QTextCursor tc = textCursor();
+ tc.select(QTextCursor::WordUnderCursor);
+ return tc.selectedText();
+}
+//! [5]
+
+//! [6]
+void TextEdit::focusInEvent(QFocusEvent *e)
+{
+ if (c)
+ c->setWidget(this);
+ QTextEdit::focusInEvent(e);
+}
+//! [6]
+
+//! [7]
+void TextEdit::keyPressEvent(QKeyEvent *e)
+{
+ if (c && c->popup()->isVisible()) {
+ // The following keys are forwarded by the completer to the widget
+ switch (e->key()) {
+ case Qt::Key_Enter:
+ case Qt::Key_Return:
+ case Qt::Key_Escape:
+ case Qt::Key_Tab:
+ case Qt::Key_Backtab:
+ e->ignore();
+ return; // let the completer do default behavior
+ default:
+ break;
+ }
+ }
+
+ bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E
+ if (!c || !isShortcut) // dont process the shortcut when we have a completer
+ QTextEdit::keyPressEvent(e);
+//! [7]
+
+//! [8]
+ const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);
+ if (!c || (ctrlOrShift && e->text().isEmpty()))
+ return;
+
+ static QString eow("~!@#$%^&*()_+{}|:\"<>?,./;'[]\\-="); // end of word
+ bool hasModifier = (e->modifiers() != Qt::NoModifier) && !ctrlOrShift;
+ QString completionPrefix = textUnderCursor();
+
+ if (!isShortcut && (hasModifier || e->text().isEmpty()|| completionPrefix.length() < 3
+ || eow.contains(e->text().right(1)))) {
+ c->popup()->hide();
+ return;
+ }
+
+ if (completionPrefix != c->completionPrefix()) {
+ c->setCompletionPrefix(completionPrefix);
+ c->popup()->setCurrentIndex(c->completionModel()->index(0, 0));
+ }
+ QRect cr = cursorRect();
+ cr.setWidth(c->popup()->sizeHintForColumn(0)
+ + c->popup()->verticalScrollBar()->sizeHint().width());
+ c->complete(cr); // popup it up!
+}
+//! [8]
+
diff --git a/examples/tools/customcompleter/textedit.h b/examples/tools/customcompleter/textedit.h
new file mode 100644
index 0000000..d727228
--- /dev/null
+++ b/examples/tools/customcompleter/textedit.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTEDIT_H
+#define TEXTEDIT_H
+
+#include <QTextEdit>
+
+QT_BEGIN_NAMESPACE
+class QCompleter;
+QT_END_NAMESPACE
+
+//! [0]
+class TextEdit : public QTextEdit
+{
+ Q_OBJECT
+
+public:
+ TextEdit(QWidget *parent = 0);
+ ~TextEdit();
+
+ void setCompleter(QCompleter *c);
+ QCompleter *completer() const;
+
+protected:
+ void keyPressEvent(QKeyEvent *e);
+ void focusInEvent(QFocusEvent *e);
+
+private slots:
+ void insertCompletion(const QString &completion);
+
+private:
+ QString textUnderCursor() const;
+
+private:
+ QCompleter *c;
+};
+//! [0]
+
+#endif // TEXTEDIT_H
+
diff --git a/examples/tools/customtype/customtype.pro b/examples/tools/customtype/customtype.pro
new file mode 100644
index 0000000..3079964
--- /dev/null
+++ b/examples/tools/customtype/customtype.pro
@@ -0,0 +1,3 @@
+HEADERS = message.h
+SOURCES = main.cpp \
+ message.cpp
diff --git a/examples/tools/customtype/main.cpp b/examples/tools/customtype/main.cpp
new file mode 100644
index 0000000..e8f4265
--- /dev/null
+++ b/examples/tools/customtype/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QVariant>
+#include "message.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QStringList headers;
+ headers << "Subject: Hello World"
+ << "From: qt-info@nokia.com";
+ QString body = "This is a test.\r\n";
+
+//! [printing a custom type]
+ Message message(body, headers);
+ qDebug() << "Original:" << message;
+//! [printing a custom type]
+
+//! [storing a custom value]
+ QVariant stored;
+ stored.setValue(message);
+//! [storing a custom value]
+
+ qDebug() << "Stored:" << stored;
+
+//! [retrieving a custom value]
+ Message retrieved = stored.value<Message>();
+ qDebug() << "Retrieved:" << retrieved;
+ retrieved = qVariantValue<Message>(stored);
+ qDebug() << "Retrieved:" << retrieved;
+//! [retrieving a custom value]
+
+ return 0;
+}
diff --git a/examples/tools/customtype/message.cpp b/examples/tools/customtype/message.cpp
new file mode 100644
index 0000000..b6fd536
--- /dev/null
+++ b/examples/tools/customtype/message.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "message.h"
+
+//! [Message class implementation]
+Message::Message()
+{
+}
+
+Message::Message(const Message &other)
+{
+ m_body = other.m_body;
+ m_headers = other.m_headers;
+}
+
+Message::~Message()
+{
+}
+//! [Message class implementation]
+
+Message::Message(const QString &body, const QStringList &headers)
+{
+ m_body = body;
+ m_headers = headers;
+}
+
+//! [custom type streaming operator]
+QDebug &operator<<(QDebug &dbg, const Message &message)
+{
+ QStringList pieces = message.body().split("\r\n", QString::SkipEmptyParts);
+ if (pieces.isEmpty())
+ dbg.nospace() << "Message()";
+ else if (pieces.size() == 1)
+ dbg.nospace() << "Message(" << pieces.first() << ")";
+ else
+ dbg.nospace() << "Message(" << pieces.first() << " ...)";
+ return dbg.maybeSpace();
+}
+//! [custom type streaming operator]
+
+//! [getter functions]
+QString Message::body() const
+{
+ return m_body;
+}
+
+QStringList Message::headers() const
+{
+ return m_headers;
+}
+//! [getter functions]
diff --git a/examples/tools/customtype/message.h b/examples/tools/customtype/message.h
new file mode 100644
index 0000000..2620557
--- /dev/null
+++ b/examples/tools/customtype/message.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MESSAGE_H
+#define MESSAGE_H
+
+#include <QDebug>
+#include <QMetaType>
+#include <QStringList>
+
+//! [custom type definition]
+class Message
+{
+public:
+ Message();
+ Message(const Message &other);
+ ~Message();
+
+ Message(const QString &body, const QStringList &headers);
+
+ QString body() const;
+ QStringList headers() const;
+
+private:
+ QString m_body;
+ QStringList m_headers;
+};
+//! [custom type definition]
+
+//! [custom type meta-type declaration]
+Q_DECLARE_METATYPE(Message);
+//! [custom type meta-type declaration]
+
+//! [custom type streaming operator]
+QDebug &operator<<(QDebug &dbg, const Message &message);
+//! [custom type streaming operator]
+
+#endif
diff --git a/examples/tools/customtypesending/customtypesending.pro b/examples/tools/customtypesending/customtypesending.pro
new file mode 100644
index 0000000..b8b2aaf
--- /dev/null
+++ b/examples/tools/customtypesending/customtypesending.pro
@@ -0,0 +1,5 @@
+HEADERS = message.h \
+ window.h
+SOURCES = main.cpp \
+ message.cpp \
+ window.cpp
diff --git a/examples/tools/customtypesending/main.cpp b/examples/tools/customtypesending/main.cpp
new file mode 100644
index 0000000..336f3d8
--- /dev/null
+++ b/examples/tools/customtypesending/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "message.h"
+#include "window.h"
+
+//! [main function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Window window1;
+ QStringList headers;
+ headers << "Subject: Hello World"
+ << "From: qt-info@nokia.com";
+ QString body = "This is a test.\r\n";
+ Message message(body, headers);
+ window1.setMessage(message);
+
+ Window window2;
+ QObject::connect(&window1, SIGNAL(messageSent(Message)),
+ &window2, SLOT(setMessage(Message)));
+ QObject::connect(&window2, SIGNAL(messageSent(Message)),
+ &window1, SLOT(setMessage(Message)));
+ window1.show();
+ window2.show();
+ return app.exec();
+}
+//! [main function]
diff --git a/examples/tools/customtypesending/message.cpp b/examples/tools/customtypesending/message.cpp
new file mode 100644
index 0000000..6992804
--- /dev/null
+++ b/examples/tools/customtypesending/message.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "message.h"
+
+Message::Message()
+{
+}
+
+Message::Message(const Message &other)
+{
+ m_body = other.m_body;
+ m_headers = other.m_headers;
+}
+
+Message::~Message()
+{
+}
+
+Message::Message(const QString &body, const QStringList &headers)
+{
+ m_body = body;
+ m_headers = headers;
+}
+
+QString Message::body() const
+{
+ return m_body;
+}
+
+QStringList Message::headers() const
+{
+ return m_headers;
+}
diff --git a/examples/tools/customtypesending/message.h b/examples/tools/customtypesending/message.h
new file mode 100644
index 0000000..55f9568
--- /dev/null
+++ b/examples/tools/customtypesending/message.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MESSAGE_H
+#define MESSAGE_H
+
+#include <QDebug>
+#include <QMetaType>
+#include <QStringList>
+
+//! [custom type definition]
+class Message
+{
+public:
+ Message();
+ Message(const Message &other);
+ ~Message();
+
+ Message(const QString &body, const QStringList &headers);
+
+ QString body() const;
+ QStringList headers() const;
+
+private:
+ QString m_body;
+ QStringList m_headers;
+};
+//! [custom type definition]
+
+//! [custom type meta-type declaration]
+Q_DECLARE_METATYPE(Message);
+//! [custom type meta-type declaration]
+
+#endif
diff --git a/examples/tools/customtypesending/window.cpp b/examples/tools/customtypesending/window.cpp
new file mode 100644
index 0000000..be79518
--- /dev/null
+++ b/examples/tools/customtypesending/window.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "window.h"
+
+//! [Window constructor]
+Window::Window()
+{
+ editor = new QTextEdit();
+ QPushButton *sendButton = new QPushButton(tr("&Send message"));
+
+ connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage()));
+
+ QHBoxLayout *buttonLayout = new QHBoxLayout();
+ buttonLayout->addStretch();
+ buttonLayout->addWidget(sendButton);
+ buttonLayout->addStretch();
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+ layout->addWidget(editor);
+ layout->addLayout(buttonLayout);
+
+ setWindowTitle(tr("Custom Type Sending"));
+}
+//! [Window constructor]
+
+//! [sending a message]
+void Window::sendMessage()
+{
+ thisMessage = Message(editor->toPlainText(), thisMessage.headers());
+ emit messageSent(thisMessage);
+}
+//! [sending a message]
+
+//! [receiving a message]
+void Window::setMessage(const Message &message)
+{
+ thisMessage = message;
+ editor->setPlainText(thisMessage.body());
+}
+//! [receiving a message]
diff --git a/examples/tools/customtypesending/window.h b/examples/tools/customtypesending/window.h
new file mode 100644
index 0000000..cbe9775
--- /dev/null
+++ b/examples/tools/customtypesending/window.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+#include "message.h"
+
+class QTextEdit;
+
+//! [Window class definition]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+signals:
+ void messageSent(const Message &message);
+
+public slots:
+ void setMessage(const Message &message);
+
+private slots:
+ void sendMessage();
+
+private:
+ Message thisMessage;
+ QTextEdit *editor;
+};
+//! [Window class definition]
+
+#endif
diff --git a/examples/tools/echoplugin/echoplugin.pro b/examples/tools/echoplugin/echoplugin.pro
new file mode 100644
index 0000000..998f25c
--- /dev/null
+++ b/examples/tools/echoplugin/echoplugin.pro
@@ -0,0 +1,11 @@
+#! [0]
+TEMPLATE = subdirs
+SUBDIRS = echowindow \
+ plugin
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echoplugin.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin
+INSTALLS += target sources
diff --git a/examples/tools/echoplugin/echowindow/echointerface.h b/examples/tools/echoplugin/echowindow/echointerface.h
new file mode 100644
index 0000000..d4aecd2
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/echointerface.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ECHOINTERFACE_H
+#define ECHOINTERFACE_H
+
+#include <QString>
+
+//! [0]
+class EchoInterface
+{
+public:
+ virtual ~EchoInterface() {}
+ virtual QString echo(const QString &message) = 0;
+};
+
+
+QT_BEGIN_NAMESPACE
+Q_DECLARE_INTERFACE(EchoInterface,
+ "com.trolltech.Plugin.EchoInterface/1.0");
+QT_END_NAMESPACE
+
+//! [0]
+#endif
diff --git a/examples/tools/echoplugin/echowindow/echowindow.cpp b/examples/tools/echoplugin/echowindow/echowindow.cpp
new file mode 100644
index 0000000..0de85ea
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/echowindow.cpp
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "echowindow.h"
+
+//! [0]
+EchoWindow::EchoWindow()
+{
+ createGUI();
+ setLayout(layout);
+ setWindowTitle("Echo Plugin Example");
+
+ if (!loadPlugin()) {
+ QMessageBox::information(this, "Error", "Could not load the plugin");
+ lineEdit->setEnabled(false);
+ button->setEnabled(false);
+ }
+}
+//! [0]
+
+//! [1]
+void EchoWindow::sendEcho()
+{
+ QString text = echoInterface->echo(lineEdit->text());
+ label->setText(text);
+}
+//! [1]
+
+//! [2]
+void EchoWindow::createGUI()
+{
+ lineEdit = new QLineEdit;
+ label = new QLabel;
+ label->setFrameStyle(QFrame::Box | QFrame::Plain);
+ button = new QPushButton(tr("Send Message"));
+
+ connect(lineEdit, SIGNAL(editingFinished()),
+ this, SLOT(sendEcho()));
+ connect(button, SIGNAL(clicked()),
+ this, SLOT(sendEcho()));
+
+ layout = new QGridLayout;
+ layout->addWidget(new QLabel(tr("Message:")), 0, 0);
+ layout->addWidget(lineEdit, 0, 1);
+ layout->addWidget(new QLabel(tr("Answer:")), 1, 0);
+ layout->addWidget(label, 1, 1);
+ layout->addWidget(button, 2, 1, Qt::AlignRight);
+ layout->setSizeConstraint(QLayout::SetFixedSize);
+}
+//! [2]
+
+//! [3]
+bool EchoWindow::loadPlugin()
+{
+ QDir pluginsDir(qApp->applicationDirPath());
+#if defined(Q_OS_WIN)
+ if (pluginsDir.dirName().toLower() == "debug" || pluginsDir.dirName().toLower() == "release")
+ pluginsDir.cdUp();
+#elif defined(Q_OS_MAC)
+ if (pluginsDir.dirName() == "MacOS") {
+ pluginsDir.cdUp();
+ pluginsDir.cdUp();
+ pluginsDir.cdUp();
+ }
+#endif
+ pluginsDir.cd("plugins");
+ foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
+ QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
+ QObject *plugin = pluginLoader.instance();
+ if (plugin) {
+ echoInterface = qobject_cast<EchoInterface *>(plugin);
+ if (echoInterface)
+ return true;
+ }
+ }
+
+ return false;
+}
+//! [3]
diff --git a/examples/tools/echoplugin/echowindow/echowindow.h b/examples/tools/echoplugin/echowindow/echowindow.h
new file mode 100644
index 0000000..7378e62
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/echowindow.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ECHODIALOG_H
+#define ECHODIALOG_H
+
+#include <QWidget>
+
+#include "echointerface.h"
+
+QT_BEGIN_NAMESPACE
+class QString;
+class QLineEdit;
+class QLabel;
+class QPushButton;
+class QGridLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class EchoWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ EchoWindow();
+
+private slots:
+ void sendEcho();
+
+private:
+ void createGUI();
+ bool loadPlugin();
+
+ EchoInterface *echoInterface;
+ QLineEdit *lineEdit;
+ QLabel *label;
+ QPushButton *button;
+ QGridLayout *layout;
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/echoplugin/echowindow/echowindow.pro b/examples/tools/echoplugin/echowindow/echowindow.pro
new file mode 100644
index 0000000..fb1cea9
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/echowindow.pro
@@ -0,0 +1,18 @@
+HEADERS = echowindow.h \
+ echointerface.h
+SOURCES = echowindow.cpp \
+ main.cpp
+
+TARGET = echoplugin
+win32 {
+ debug:DESTDIR = ../debug/
+ release:DESTDIR = ../release/
+} else {
+ DESTDIR = ../
+}
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echowindow.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/echowindow
+INSTALLS += target sources
diff --git a/examples/tools/echoplugin/echowindow/main.cpp b/examples/tools/echoplugin/echowindow/main.cpp
new file mode 100644
index 0000000..cc18f66
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "echowindow.h"
+#include "echointerface.h"
+
+//! [0]
+int main(int argv, char *args[])
+{
+ QApplication app(argv, args);
+
+ EchoWindow window;
+ window.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/echoplugin/plugin/echoplugin.cpp b/examples/tools/echoplugin/plugin/echoplugin.cpp
new file mode 100644
index 0000000..67126be
--- /dev/null
+++ b/examples/tools/echoplugin/plugin/echoplugin.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "echoplugin.h"
+
+//! [0]
+QString EchoPlugin::echo(const QString &message)
+{
+ return message;
+}
+//! [0]
+
+//! [1]
+Q_EXPORT_PLUGIN2(echoplugin, EchoPlugin);
+//! [1]
diff --git a/examples/tools/echoplugin/plugin/echoplugin.h b/examples/tools/echoplugin/plugin/echoplugin.h
new file mode 100644
index 0000000..7ea1d47
--- /dev/null
+++ b/examples/tools/echoplugin/plugin/echoplugin.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ECHOPLUGIN_H
+#define ECHOPLUGIN_H
+
+#include <QObject>
+#include "echoplugin.h"
+#include "echointerface.h"
+
+//! [0]
+class EchoPlugin : public QObject, EchoInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(EchoInterface)
+
+public:
+ QString echo(const QString &message);
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro
new file mode 100644
index 0000000..5c0c5af
--- /dev/null
+++ b/examples/tools/echoplugin/plugin/plugin.pro
@@ -0,0 +1,15 @@
+#! [0]
+TEMPLATE = lib
+CONFIG += plugin
+INCLUDEPATH += ../echowindow
+HEADERS = echoplugin.h
+SOURCES = echoplugin.cpp
+TARGET = $$qtLibraryTarget(echoplugin)
+DESTDIR = ../plugins
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin
+INSTALLS += target sources
diff --git a/examples/tools/i18n/i18n.pro b/examples/tools/i18n/i18n.pro
new file mode 100644
index 0000000..0ef9a0b
--- /dev/null
+++ b/examples/tools/i18n/i18n.pro
@@ -0,0 +1,26 @@
+HEADERS = languagechooser.h \
+ mainwindow.h
+SOURCES = languagechooser.cpp \
+ main.cpp \
+ mainwindow.cpp
+RESOURCES += i18n.qrc
+TRANSLATIONS += translations/i18n_ar.ts \
+ translations/i18n_cs.ts \
+ translations/i18n_de.ts \
+ translations/i18n_el.ts \
+ translations/i18n_en.ts \
+ translations/i18n_eo.ts \
+ translations/i18n_fr.ts \
+ translations/i18n_it.ts \
+ translations/i18n_jp.ts \
+ translations/i18n_ko.ts \
+ translations/i18n_no.ts \
+ translations/i18n_ru.ts \
+ translations/i18n_sv.ts \
+ translations/i18n_zh.ts
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n
+sources.files = $$SOURCES $$HEADERS $$RESOURCES translations i18n.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n
+INSTALLS += target sources
diff --git a/examples/tools/i18n/i18n.qrc b/examples/tools/i18n/i18n.qrc
new file mode 100644
index 0000000..16a89f1
--- /dev/null
+++ b/examples/tools/i18n/i18n.qrc
@@ -0,0 +1,18 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>translations/i18n_ar.qm</file>
+ <file>translations/i18n_cs.qm</file>
+ <file>translations/i18n_de.qm</file>
+ <file>translations/i18n_el.qm</file>
+ <file>translations/i18n_en.qm</file>
+ <file>translations/i18n_eo.qm</file>
+ <file>translations/i18n_fr.qm</file>
+ <file>translations/i18n_it.qm</file>
+ <file>translations/i18n_jp.qm</file>
+ <file>translations/i18n_ko.qm</file>
+ <file>translations/i18n_no.qm</file>
+ <file>translations/i18n_ru.qm</file>
+ <file>translations/i18n_sv.qm</file>
+ <file>translations/i18n_zh.qm</file>
+</qresource>
+</RCC>
diff --git a/examples/tools/i18n/languagechooser.cpp b/examples/tools/i18n/languagechooser.cpp
new file mode 100644
index 0000000..a8e9779
--- /dev/null
+++ b/examples/tools/i18n/languagechooser.cpp
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "languagechooser.h"
+#include "mainwindow.h"
+
+#ifdef Q_WS_MAC
+QT_BEGIN_NAMESPACE
+extern void qt_mac_set_menubar_merge(bool merge);
+QT_END_NAMESPACE
+#endif
+
+LanguageChooser::LanguageChooser(QWidget *parent)
+ : QDialog(parent, Qt::WindowStaysOnTopHint)
+{
+ groupBox = new QGroupBox("Languages");
+
+ QGridLayout *groupBoxLayout = new QGridLayout;
+
+ QStringList qmFiles = findQmFiles();
+ for (int i = 0; i < qmFiles.size(); ++i) {
+ QCheckBox *checkBox = new QCheckBox(languageName(qmFiles[i]));
+ qmFileForCheckBoxMap.insert(checkBox, qmFiles[i]);
+ connect(checkBox, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled()));
+ groupBoxLayout->addWidget(checkBox, i / 2, i % 2);
+ }
+ groupBox->setLayout(groupBoxLayout);
+
+ buttonBox = new QDialogButtonBox;
+
+ showAllButton = buttonBox->addButton("Show All",
+ QDialogButtonBox::ActionRole);
+ hideAllButton = buttonBox->addButton("Hide All",
+ QDialogButtonBox::ActionRole);
+
+ connect(showAllButton, SIGNAL(clicked()), this, SLOT(showAll()));
+ connect(hideAllButton, SIGNAL(clicked()), this, SLOT(hideAll()));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(groupBox);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+#ifdef Q_WS_MAC
+ qt_mac_set_menubar_merge(false);
+#endif
+
+ setWindowTitle("I18N");
+}
+
+bool LanguageChooser::eventFilter(QObject *object, QEvent *event)
+{
+ if (event->type() == QEvent::Close) {
+ MainWindow *window = qobject_cast<MainWindow *>(object);
+ if (window) {
+ QCheckBox *checkBox = mainWindowForCheckBoxMap.key(window);
+ if (checkBox)
+ checkBox->setChecked(false);
+ }
+ }
+ return QWidget::eventFilter(object, event);
+}
+
+void LanguageChooser::closeEvent(QCloseEvent * /* event */)
+{
+ qApp->quit();
+}
+
+void LanguageChooser::checkBoxToggled()
+{
+ QCheckBox *checkBox = qobject_cast<QCheckBox *>(sender());
+ MainWindow *window = mainWindowForCheckBoxMap[checkBox];
+ if (!window) {
+ QTranslator translator;
+ translator.load(qmFileForCheckBoxMap[checkBox]);
+ qApp->installTranslator(&translator);
+
+ window = new MainWindow;
+ window->setPalette(colorForLanguage(checkBox->text()));
+
+ window->installEventFilter(this);
+ mainWindowForCheckBoxMap.insert(checkBox, window);
+ }
+ window->setVisible(checkBox->isChecked());
+}
+
+void LanguageChooser::showAll()
+{
+ foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
+ checkBox->setChecked(true);
+}
+
+void LanguageChooser::hideAll()
+{
+ foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
+ checkBox->setChecked(false);
+}
+
+QStringList LanguageChooser::findQmFiles()
+{
+ QDir dir(":/translations");
+ QStringList fileNames = dir.entryList(QStringList("*.qm"), QDir::Files,
+ QDir::Name);
+ QMutableStringListIterator i(fileNames);
+ while (i.hasNext()) {
+ i.next();
+ i.setValue(dir.filePath(i.value()));
+ }
+ return fileNames;
+}
+
+QString LanguageChooser::languageName(const QString &qmFile)
+{
+ QTranslator translator;
+ translator.load(qmFile);
+
+ return translator.translate("MainWindow", "English");
+}
+
+QColor LanguageChooser::colorForLanguage(const QString &language)
+{
+ uint hashValue = qHash(language);
+ int red = 156 + (hashValue & 0x3F);
+ int green = 156 + ((hashValue >> 6) & 0x3F);
+ int blue = 156 + ((hashValue >> 12) & 0x3F);
+ return QColor(red, green, blue);
+}
diff --git a/examples/tools/i18n/languagechooser.h b/examples/tools/i18n/languagechooser.h
new file mode 100644
index 0000000..69914f7
--- /dev/null
+++ b/examples/tools/i18n/languagechooser.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LANGUAGECHOOSER_H
+#define LANGUAGECHOOSER_H
+
+#include <QDialog>
+#include <QMap>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+class QAbstractButton;
+class QCheckBox;
+class QDialogButtonBox;
+class QGroupBox;
+QT_END_NAMESPACE
+class MainWindow;
+
+class LanguageChooser : public QDialog
+{
+ Q_OBJECT
+
+public:
+ LanguageChooser(QWidget *parent = 0);
+
+protected:
+ bool eventFilter(QObject *object, QEvent *event);
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void checkBoxToggled();
+ void showAll();
+ void hideAll();
+
+private:
+ QStringList findQmFiles();
+ QString languageName(const QString &qmFile);
+ QColor colorForLanguage(const QString &language);
+
+ QGroupBox *groupBox;
+ QDialogButtonBox *buttonBox;
+ QAbstractButton *showAllButton;
+ QAbstractButton *hideAllButton;
+ QMap<QCheckBox *, QString> qmFileForCheckBoxMap;
+ QMap<QCheckBox *, MainWindow *> mainWindowForCheckBoxMap;
+};
+
+#endif
diff --git a/examples/tools/i18n/main.cpp b/examples/tools/i18n/main.cpp
new file mode 100644
index 0000000..98d3da0
--- /dev/null
+++ b/examples/tools/i18n/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "languagechooser.h"
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(i18n);
+
+ QApplication app(argc, argv);
+ LanguageChooser chooser;
+ chooser.show();
+ return app.exec();
+}
diff --git a/examples/tools/i18n/mainwindow.cpp b/examples/tools/i18n/mainwindow.cpp
new file mode 100644
index 0000000..33cd5f5
--- /dev/null
+++ b/examples/tools/i18n/mainwindow.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+static const char * const listEntries[] = {
+ QT_TRANSLATE_NOOP("MainWindow", "First"),
+ QT_TRANSLATE_NOOP("MainWindow", "Second"),
+ QT_TRANSLATE_NOOP("MainWindow", "Third"),
+ 0
+};
+
+MainWindow::MainWindow()
+{
+ centralWidget = new QWidget;
+ setCentralWidget(centralWidget);
+
+ createGroupBox();
+
+ listWidget = new QListWidget;
+ for (int i = 0; listEntries[i]; ++i)
+ listWidget->addItem(tr(listEntries[i]));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(groupBox);
+ mainLayout->addWidget(listWidget);
+ centralWidget->setLayout(mainLayout);
+
+ exitAction = new QAction(tr("E&xit"), this);
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->setPalette(QPalette(Qt::red));
+ fileMenu->addAction(exitAction);
+
+ setWindowTitle(tr("Language: %1").arg(tr("English")));
+ statusBar()->showMessage(tr("Internationalization Example"));
+
+ if (tr("LTR") == "RTL")
+ setLayoutDirection(Qt::RightToLeft);
+}
+
+void MainWindow::createGroupBox()
+{
+ groupBox = new QGroupBox(tr("View"));
+ perspectiveRadioButton = new QRadioButton(tr("Perspective"));
+ isometricRadioButton = new QRadioButton(tr("Isometric"));
+ obliqueRadioButton = new QRadioButton(tr("Oblique"));
+ perspectiveRadioButton->setChecked(true);
+
+ QVBoxLayout *groupBoxLayout = new QVBoxLayout;
+ groupBoxLayout->addWidget(perspectiveRadioButton);
+ groupBoxLayout->addWidget(isometricRadioButton);
+ groupBoxLayout->addWidget(obliqueRadioButton);
+ groupBox->setLayout(groupBoxLayout);
+}
diff --git a/examples/tools/i18n/mainwindow.h b/examples/tools/i18n/mainwindow.h
new file mode 100644
index 0000000..5928be2
--- /dev/null
+++ b/examples/tools/i18n/mainwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QGroupBox;
+class QLabel;
+class QListWidget;
+class QMenu;
+class QRadioButton;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private:
+ void createGroupBox();
+
+ QWidget *centralWidget;
+ QLabel *label;
+ QGroupBox *groupBox;
+ QListWidget *listWidget;
+ QRadioButton *perspectiveRadioButton;
+ QRadioButton *isometricRadioButton;
+ QRadioButton *obliqueRadioButton;
+ QMenu *fileMenu;
+ QAction *exitAction;
+};
+
+#endif
diff --git a/examples/tools/i18n/translations/i18n_ar.qm b/examples/tools/i18n/translations/i18n_ar.qm
new file mode 100644
index 0000000..a134c46
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ar.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ar.ts b/examples/tools/i18n/translations/i18n_ar.ts
new file mode 100644
index 0000000..a7ec2c9
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ar.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>First</source>
+ <translation>أول</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>مثال التدويل</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>متماثل</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>اللغة: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>العربية</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>مصمت</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>منظور</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>ثانى</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>ثالث</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>مرئى</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>أخرج</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>الملÙ</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>RTL</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_cs.qm b/examples/tools/i18n/translations/i18n_cs.qm
new file mode 100644
index 0000000..5b7ff95
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_cs.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_cs.ts b/examples/tools/i18n/translations/i18n_cs.ts
new file mode 100644
index 0000000..6c4dee9
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_cs.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Pohled</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Soubor</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Konec</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>První</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Třetí</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Jayzk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Český</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Nakloněný</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Druhý</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrický</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivní</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Ukázka lokalizace</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_de.qm b/examples/tools/i18n/translations/i18n_de.qm
new file mode 100644
index 0000000..177fc49
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_de.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_de.ts b/examples/tools/i18n/translations/i18n_de.ts
new file mode 100644
index 0000000..249a61d
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_de.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Ansicht</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Datei</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Be&amp;enden</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Erstens</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Drittens</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Deutsch</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Sprache: %1</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Schief</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Zweitens</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrisch</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivisch</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationalisierungsbeispiel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_el.qm b/examples/tools/i18n/translations/i18n_el.qm
new file mode 100644
index 0000000..5483291
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_el.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_el.ts b/examples/tools/i18n/translations/i18n_el.ts
new file mode 100644
index 0000000..d23a0aa
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_el.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;ΑÏχείο</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Έ&amp;ξοδος</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>ΠÏώτο</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>ΠαÏάδειγμα διεθνοποίησης</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>ΙσομετÏική</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Γλώσσα: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Ελληνικά</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Πλάγια</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>ΠÏοοπτική</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>ΔεÏτεÏο</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>ΤÏίτο</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Όψη</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_en.qm b/examples/tools/i18n/translations/i18n_en.qm
new file mode 100644
index 0000000..9190ac7
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_en.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_en.ts b/examples/tools/i18n/translations/i18n_en.ts
new file mode 100644
index 0000000..ca38e95
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_en.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>E&amp;xit</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;File</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationalization Example</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Language: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>English</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>View</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspective</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometric</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblique</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>First</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Second</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Third</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_eo.qm b/examples/tools/i18n/translations/i18n_eo.qm
new file mode 100644
index 0000000..a8457be
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_eo.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_eo.ts b/examples/tools/i18n/translations/i18n_eo.ts
new file mode 100644
index 0000000..16a37be
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_eo.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Dosiero</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Unue</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Ekzemplo pri internaciigo</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometria</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Lingvo: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Esperanto</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblikva</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektiva</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Due</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Trie</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Aspekto</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Fini</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_fr.qm b/examples/tools/i18n/translations/i18n_fr.qm
new file mode 100644
index 0000000..3e8a69b
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_fr.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_fr.ts b/examples/tools/i18n/translations/i18n_fr.ts
new file mode 100644
index 0000000..0012892
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_fr.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Vue</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fichier</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Quitter</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Premier</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Troisième</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Langue : %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Français</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Oblique</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Deuxième</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isométrique</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspective</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Exemple d&apos;internationalisation</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_it.qm b/examples/tools/i18n/translations/i18n_it.qm
new file mode 100644
index 0000000..3dffd30
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_it.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_it.ts b/examples/tools/i18n/translations/i18n_it.ts
new file mode 100644
index 0000000..d516a27
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_it.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>First</source>
+ <translation>Primo</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Esempio di localizzazione</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrica</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Lingua: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Italiano</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Obliqua</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Prospettica</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Secondo</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Terzo</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>Vista</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Esci</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;File</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_jp.qm b/examples/tools/i18n/translations/i18n_jp.qm
new file mode 100644
index 0000000..017bc96
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_jp.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_jp.ts b/examples/tools/i18n/translations/i18n_jp.ts
new file mode 100644
index 0000000..067b5a8
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_jp.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>ファイル(&amp;F)</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>終了(&amp;X)</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>第一行</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>国際化(i18n)ã®ä¾‹</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>等角投影法</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>言語: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>日本語</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>æ–œã‚投影法</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>é è¿‘法</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>第二行</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>第三行</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>表示方å¼</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_ko.qm b/examples/tools/i18n/translations/i18n_ko.qm
new file mode 100644
index 0000000..d61b93d
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ko.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ko.ts b/examples/tools/i18n/translations/i18n_ko.ts
new file mode 100644
index 0000000..bfd5924
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ko.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>&amp;File</source>
+ <translation>파ì¼&amp;F</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>종료&amp;X</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>첫번째</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>국제화 예제</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>등측ë„</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>언어 : %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>한국어</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>ë¹—ê°</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>ì›ê·¼í™”법</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>ë‘번째</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>세번째</translation>
+ </message>
+ <message>
+ <source>View</source>
+ <translation>보기</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_no.qm b/examples/tools/i18n/translations/i18n_no.qm
new file mode 100644
index 0000000..c84b0d7
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_no.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_no.ts b/examples/tools/i18n/translations/i18n_no.ts
new file mode 100644
index 0000000..2e06974
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_no.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Vis</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fil</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Avslutt</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Første</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Tredje</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Språk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Norsk</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Skjevt</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Andre</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometrisk</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektiv</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internasjonaliseringseksempel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_ru.qm b/examples/tools/i18n/translations/i18n_ru.qm
new file mode 100644
index 0000000..a76e1b8
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ru.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_ru.ts b/examples/tools/i18n/translations/i18n_ru.ts
new file mode 100644
index 0000000..748cc12
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_ru.ts
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="ru">
+<defaultcodec></defaultcodec>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Вид</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>Файл</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>Выход</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Первый</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Третий</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Язык: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>РуÑÑкий</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>КурÑив</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Второй</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>ИзометричеÑкий</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>ПерÑпектива</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Пример интернационализации</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_sv.qm b/examples/tools/i18n/translations/i18n_sv.qm
new file mode 100644
index 0000000..7204b30
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_sv.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_sv.ts b/examples/tools/i18n/translations/i18n_sv.ts
new file mode 100644
index 0000000..ac4ab98
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_sv.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>Visa</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Arkiv</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Avsluta</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>Första</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>Tredje</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>Språk: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>Svenska</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>Skevt</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Andra</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>Isometriskt</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>Perspektivt</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>Internationaliseringsexempel</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/i18n/translations/i18n_zh.qm b/examples/tools/i18n/translations/i18n_zh.qm
new file mode 100644
index 0000000..32053f4
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_zh.qm
Binary files differ
diff --git a/examples/tools/i18n/translations/i18n_zh.ts b/examples/tools/i18n/translations/i18n_zh.ts
new file mode 100644
index 0000000..3b71547
--- /dev/null
+++ b/examples/tools/i18n/translations/i18n_zh.ts
@@ -0,0 +1,57 @@
+<!DOCTYPE TS><TS>
+<context>
+ <name>MainWindow</name>
+ <message>
+ <source>View</source>
+ <translation>视图</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>文件[&amp;F]</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>退出[&amp;x]</translation>
+ </message>
+ <message>
+ <source>First</source>
+ <translation>第一个</translation>
+ </message>
+ <message>
+ <source>Third</source>
+ <translation>第三个</translation>
+ </message>
+ <message>
+ <source>Language: %1</source>
+ <translation>语言: %1</translation>
+ </message>
+ <message>
+ <source>English</source>
+ <translation>简体中文</translation>
+ </message>
+ <message>
+ <source>Oblique</source>
+ <translation>斜投影</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>第二个</translation>
+ </message>
+ <message>
+ <source>Isometric</source>
+ <translation>等角投影</translation>
+ </message>
+ <message>
+ <source>Perspective</source>
+ <translation>é€è§†æŠ•å½±</translation>
+ </message>
+ <message>
+ <source>Internationalization Example</source>
+ <translation>国际化范例</translation>
+ </message>
+ <message>
+ <source>LTR</source>
+ <translation>LTR</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/tools/plugandpaint/interfaces.h b/examples/tools/plugandpaint/interfaces.h
new file mode 100644
index 0000000..87eb9d0
--- /dev/null
+++ b/examples/tools/plugandpaint/interfaces.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef INTERFACES_H
+#define INTERFACES_H
+
+#include <QtPlugin>
+
+QT_BEGIN_NAMESPACE
+class QImage;
+class QPainter;
+class QWidget;
+class QPainterPath;
+class QPoint;
+class QRect;
+class QString;
+class QStringList;
+QT_END_NAMESPACE
+
+//! [0]
+class BrushInterface
+{
+public:
+ virtual ~BrushInterface() {}
+
+ virtual QStringList brushes() const = 0;
+ virtual QRect mousePress(const QString &brush, QPainter &painter,
+ const QPoint &pos) = 0;
+ virtual QRect mouseMove(const QString &brush, QPainter &painter,
+ const QPoint &oldPos, const QPoint &newPos) = 0;
+ virtual QRect mouseRelease(const QString &brush, QPainter &painter,
+ const QPoint &pos) = 0;
+};
+//! [0]
+
+//! [1]
+class ShapeInterface
+{
+public:
+ virtual ~ShapeInterface() {}
+
+ virtual QStringList shapes() const = 0;
+ virtual QPainterPath generateShape(const QString &shape,
+ QWidget *parent) = 0;
+};
+//! [1]
+
+//! [2]
+class FilterInterface
+{
+public:
+ virtual ~FilterInterface() {}
+
+ virtual QStringList filters() const = 0;
+ virtual QImage filterImage(const QString &filter, const QImage &image,
+ QWidget *parent) = 0;
+};
+//! [2]
+
+QT_BEGIN_NAMESPACE
+//! [3] //! [4]
+Q_DECLARE_INTERFACE(BrushInterface,
+ "com.trolltech.PlugAndPaint.BrushInterface/1.0")
+//! [3]
+Q_DECLARE_INTERFACE(ShapeInterface,
+ "com.trolltech.PlugAndPaint.ShapeInterface/1.0")
+//! [5]
+Q_DECLARE_INTERFACE(FilterInterface,
+ "com.trolltech.PlugAndPaint.FilterInterface/1.0")
+//! [4] //! [5]
+QT_END_NAMESPACE
+
+#endif
diff --git a/examples/tools/plugandpaint/main.cpp b/examples/tools/plugandpaint/main.cpp
new file mode 100644
index 0000000..7778cac
--- /dev/null
+++ b/examples/tools/plugandpaint/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "mainwindow.h"
+#include <QtPlugin>
+#include <QApplication>
+
+QT_BEGIN_NAMESPACE
+Q_IMPORT_PLUGIN(pnp_basictools)
+QT_END_NAMESPACE
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp
new file mode 100644
index 0000000..224bc71
--- /dev/null
+++ b/examples/tools/plugandpaint/mainwindow.cpp
@@ -0,0 +1,310 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "interfaces.h"
+#include "mainwindow.h"
+#include "paintarea.h"
+#include "plugindialog.h"
+
+#include <QPluginLoader>
+#include <QTimer>
+
+#include <QScrollArea>
+#include <QMessageBox>
+#include <QActionGroup>
+#include <QAction>
+#include <QMenu>
+#include <QMenuBar>
+#include <QFileDialog>
+#include <QColorDialog>
+#include <QInputDialog>
+#include <QApplication>
+
+MainWindow::MainWindow() :
+ paintArea(new PaintArea),
+ scrollArea(new QScrollArea)
+{
+ scrollArea->setBackgroundRole(QPalette::Dark);
+ scrollArea->setWidget(paintArea);
+ setCentralWidget(scrollArea);
+
+ createActions();
+ createMenus();
+ loadPlugins();
+
+ setWindowTitle(tr("Plug & Paint"));
+
+ if (!brushActionGroup->actions().isEmpty())
+ brushActionGroup->actions().first()->trigger();
+
+ QTimer::singleShot(500, this, SLOT(aboutPlugins()));
+}
+
+void MainWindow::open()
+{
+ const QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open File"),
+ QDir::currentPath());
+ if (!fileName.isEmpty()) {
+ if (!paintArea->openImage(fileName)) {
+ QMessageBox::information(this, tr("Plug & Paint"),
+ tr("Cannot load %1.").arg(fileName));
+ return;
+ }
+ paintArea->adjustSize();
+ }
+}
+
+bool MainWindow::saveAs()
+{
+ const QString initialPath = QDir::currentPath() + "/untitled.png";
+
+ const QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ initialPath);
+ if (fileName.isEmpty()) {
+ return false;
+ } else {
+ return paintArea->saveImage(fileName, "png");
+ }
+}
+
+void MainWindow::brushColor()
+{
+ const QColor newColor = QColorDialog::getColor(paintArea->brushColor());
+ if (newColor.isValid())
+ paintArea->setBrushColor(newColor);
+}
+
+void MainWindow::brushWidth()
+{
+ bool ok;
+ const int newWidth = QInputDialog::getInteger(this, tr("Plug & Paint"),
+ tr("Select brush width:"),
+ paintArea->brushWidth(),
+ 1, 50, 1, &ok);
+ if (ok)
+ paintArea->setBrushWidth(newWidth);
+}
+
+//! [0]
+void MainWindow::changeBrush()
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ BrushInterface *iBrush = qobject_cast<BrushInterface *>(action->parent());
+ const QString brush = action->text();
+
+ paintArea->setBrush(iBrush, brush);
+}
+//! [0]
+
+//! [1]
+void MainWindow::insertShape()
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ ShapeInterface *iShape = qobject_cast<ShapeInterface *>(action->parent());
+
+ const QPainterPath path = iShape->generateShape(action->text(), this);
+ if (!path.isEmpty())
+ paintArea->insertShape(path);
+}
+//! [1]
+
+//! [2]
+void MainWindow::applyFilter()
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ FilterInterface *iFilter =
+ qobject_cast<FilterInterface *>(action->parent());
+
+ const QImage image = iFilter->filterImage(action->text(), paintArea->image(),
+ this);
+ paintArea->setImage(image);
+}
+//! [2]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Plug & Paint"),
+ tr("The <b>Plug & Paint</b> example demonstrates how to write Qt "
+ "applications that can be extended through plugins."));
+}
+
+//! [3]
+void MainWindow::aboutPlugins()
+{
+ PluginDialog dialog(pluginsDir.path(), pluginFileNames, this);
+ dialog.exec();
+}
+//! [3]
+
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAsAct = new QAction(tr("&Save As..."), this);
+ saveAsAct->setShortcut(tr("Ctrl+S"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ brushColorAct = new QAction(tr("&Brush Color..."), this);
+ connect(brushColorAct, SIGNAL(triggered()), this, SLOT(brushColor()));
+
+ brushWidthAct = new QAction(tr("&Brush Width..."), this);
+ connect(brushWidthAct, SIGNAL(triggered()), this, SLOT(brushWidth()));
+
+ brushActionGroup = new QActionGroup(this);
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+ aboutPluginsAct = new QAction(tr("About &Plugins"), this);
+ connect(aboutPluginsAct, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ brushMenu = menuBar()->addMenu(tr("&Brush"));
+ brushMenu->addAction(brushColorAct);
+ brushMenu->addAction(brushWidthAct);
+ brushMenu->addSeparator();
+
+ shapesMenu = menuBar()->addMenu(tr("&Shapes"));
+
+ filterMenu = menuBar()->addMenu(tr("&Filter"));
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+ helpMenu->addAction(aboutPluginsAct);
+}
+
+//! [4]
+void MainWindow::loadPlugins()
+{
+ foreach (QObject *plugin, QPluginLoader::staticInstances())
+ populateMenus(plugin);
+//! [4] //! [5]
+
+ pluginsDir = QDir(qApp->applicationDirPath());
+
+#if defined(Q_OS_WIN)
+ if (pluginsDir.dirName().toLower() == "debug" || pluginsDir.dirName().toLower() == "release")
+ pluginsDir.cdUp();
+#elif defined(Q_OS_MAC)
+ if (pluginsDir.dirName() == "MacOS") {
+ pluginsDir.cdUp();
+ pluginsDir.cdUp();
+ pluginsDir.cdUp();
+ }
+#endif
+ pluginsDir.cd("plugins");
+//! [5]
+
+//! [6]
+ foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
+ QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
+ QObject *plugin = loader.instance();
+ if (plugin) {
+ populateMenus(plugin);
+ pluginFileNames += fileName;
+//! [6] //! [7]
+ }
+//! [7] //! [8]
+ }
+//! [8]
+
+//! [9]
+ brushMenu->setEnabled(!brushActionGroup->actions().isEmpty());
+ shapesMenu->setEnabled(!shapesMenu->actions().isEmpty());
+ filterMenu->setEnabled(!filterMenu->actions().isEmpty());
+}
+//! [9]
+
+//! [10]
+void MainWindow::populateMenus(QObject *plugin)
+{
+ BrushInterface *iBrush = qobject_cast<BrushInterface *>(plugin);
+ if (iBrush)
+ addToMenu(plugin, iBrush->brushes(), brushMenu, SLOT(changeBrush()),
+ brushActionGroup);
+
+ ShapeInterface *iShape = qobject_cast<ShapeInterface *>(plugin);
+ if (iShape)
+ addToMenu(plugin, iShape->shapes(), shapesMenu, SLOT(insertShape()));
+
+ FilterInterface *iFilter = qobject_cast<FilterInterface *>(plugin);
+ if (iFilter)
+ addToMenu(plugin, iFilter->filters(), filterMenu, SLOT(applyFilter()));
+}
+//! [10]
+
+void MainWindow::addToMenu(QObject *plugin, const QStringList &texts,
+ QMenu *menu, const char *member,
+ QActionGroup *actionGroup)
+{
+ foreach (QString text, texts) {
+ QAction *action = new QAction(text, plugin);
+ connect(action, SIGNAL(triggered()), this, member);
+ menu->addAction(action);
+
+ if (actionGroup) {
+ action->setCheckable(true);
+ actionGroup->addAction(action);
+ }
+ }
+}
diff --git a/examples/tools/plugandpaint/mainwindow.h b/examples/tools/plugandpaint/mainwindow.h
new file mode 100644
index 0000000..47afb2d
--- /dev/null
+++ b/examples/tools/plugandpaint/mainwindow.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QDir>
+#include <QMainWindow>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QActionGroup;
+class QMenu;
+class QScrollArea;
+QT_END_NAMESPACE
+class PaintArea;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void open();
+ bool saveAs();
+ void brushColor();
+ void brushWidth();
+ void changeBrush();
+ void insertShape();
+ void applyFilter();
+ void about();
+ void aboutPlugins();
+
+private:
+ void createActions();
+ void createMenus();
+ void loadPlugins();
+ void populateMenus(QObject *plugin);
+ void addToMenu(QObject *plugin, const QStringList &texts, QMenu *menu,
+ const char *member, QActionGroup *actionGroup = 0);
+
+ PaintArea *paintArea;
+ QScrollArea *scrollArea;
+ QDir pluginsDir;
+ QStringList pluginFileNames;
+
+ QMenu *fileMenu;
+ QMenu *brushMenu;
+ QMenu *shapesMenu;
+ QMenu *filterMenu;
+ QMenu *helpMenu;
+ QActionGroup *brushActionGroup;
+ QAction *openAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *brushWidthAct;
+ QAction *brushColorAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+ QAction *aboutPluginsAct;
+};
+
+#endif
diff --git a/examples/tools/plugandpaint/paintarea.cpp b/examples/tools/plugandpaint/paintarea.cpp
new file mode 100644
index 0000000..9d5b3c5
--- /dev/null
+++ b/examples/tools/plugandpaint/paintarea.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "interfaces.h"
+#include "paintarea.h"
+
+#include <QPainter>
+#include <QMouseEvent>
+
+PaintArea::PaintArea(QWidget *parent) :
+ QWidget(parent),
+ theImage(500, 400, QImage::Format_RGB32),
+ color(Qt::blue),
+ thickness(3),
+ brushInterface(0),
+ lastPos(-1, -1)
+{
+ setAttribute(Qt::WA_StaticContents);
+ setAttribute(Qt::WA_NoBackground);
+
+ theImage.fill(qRgb(255, 255, 255));
+}
+
+bool PaintArea::openImage(const QString &fileName)
+{
+ QImage image;
+ if (!image.load(fileName))
+ return false;
+
+ setImage(image);
+ return true;
+}
+
+bool PaintArea::saveImage(const QString &fileName, const char *fileFormat)
+{
+ return theImage.save(fileName, fileFormat);
+}
+
+void PaintArea::setImage(const QImage &image)
+{
+ theImage = image.convertToFormat(QImage::Format_RGB32);
+ update();
+ updateGeometry();
+}
+
+void PaintArea::insertShape(const QPainterPath &path)
+{
+ pendingPath = path;
+#ifndef QT_NO_CURSOR
+ setCursor(Qt::CrossCursor);
+#endif
+}
+
+void PaintArea::setBrushColor(const QColor &color)
+{
+ this->color = color;
+}
+
+void PaintArea::setBrushWidth(int width)
+{
+ thickness = width;
+}
+
+//! [0]
+void PaintArea::setBrush(BrushInterface *brushInterface, const QString &brush)
+{
+ this->brushInterface = brushInterface;
+ this->brush = brush;
+}
+//! [0]
+
+QSize PaintArea::sizeHint() const
+{
+ return theImage.size();
+}
+
+void PaintArea::paintEvent(QPaintEvent * /* event */)
+{
+ QPainter painter(this);
+ painter.drawImage(QPoint(0, 0), theImage);
+}
+
+void PaintArea::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ if (!pendingPath.isEmpty()) {
+ QPainter painter(&theImage);
+ setupPainter(painter);
+
+ const QRectF boundingRect = pendingPath.boundingRect();
+ QLinearGradient gradient(boundingRect.topRight(),
+ boundingRect.bottomLeft());
+ gradient.setColorAt(0.0, QColor(color.red(), color.green(),
+ color.blue(), 63));
+ gradient.setColorAt(1.0, QColor(color.red(), color.green(),
+ color.blue(), 191));
+ painter.setBrush(gradient);
+ painter.translate(event->pos() - boundingRect.center());
+ painter.drawPath(pendingPath);
+
+ pendingPath = QPainterPath();
+#ifndef QT_NO_CURSOR
+ unsetCursor();
+#endif
+ update();
+ } else {
+ if (brushInterface) {
+ QPainter painter(&theImage);
+ setupPainter(painter);
+ const QRect rect = brushInterface->mousePress(brush, painter,
+ event->pos());
+ update(rect);
+ }
+
+ lastPos = event->pos();
+ }
+ }
+}
+
+//! [1]
+void PaintArea::mouseMoveEvent(QMouseEvent *event)
+{
+ if ((event->buttons() & Qt::LeftButton) && lastPos != QPoint(-1, -1)) {
+ if (brushInterface) {
+ QPainter painter(&theImage);
+ setupPainter(painter);
+ const QRect rect = brushInterface->mouseMove(brush, painter, lastPos,
+ event->pos());
+ update(rect);
+ }
+
+ lastPos = event->pos();
+ }
+}
+//! [1]
+
+void PaintArea::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton && lastPos != QPoint(-1, -1)) {
+ if (brushInterface) {
+ QPainter painter(&theImage);
+ setupPainter(painter);
+ QRect rect = brushInterface->mouseRelease(brush, painter,
+ event->pos());
+ update(rect);
+ }
+
+ lastPos = QPoint(-1, -1);
+ }
+}
+
+void PaintArea::setupPainter(QPainter &painter)
+{
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.setPen(QPen(color, thickness, Qt::SolidLine, Qt::RoundCap,
+ Qt::RoundJoin));
+}
diff --git a/examples/tools/plugandpaint/paintarea.h b/examples/tools/plugandpaint/paintarea.h
new file mode 100644
index 0000000..e4215d5
--- /dev/null
+++ b/examples/tools/plugandpaint/paintarea.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PAINTAREA_H
+#define PAINTAREA_H
+
+#include <QColor>
+#include <QImage>
+#include <QPainterPath>
+#include <QWidget>
+
+class BrushInterface;
+
+class PaintArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PaintArea(QWidget *parent = 0);
+
+ bool openImage(const QString &fileName);
+ bool saveImage(const QString &fileName, const char *fileFormat);
+ void setImage(const QImage &image);
+ void insertShape(const QPainterPath &path);
+ void setBrushColor(const QColor &color);
+ void setBrushWidth(int width);
+ void setBrush(BrushInterface *brushInterface, const QString &brush);
+
+ QImage image() const { return theImage; }
+ QColor brushColor() const { return color; }
+ int brushWidth() const { return thickness; }
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private:
+ void setupPainter(QPainter &painter);
+
+ QImage theImage;
+ QColor color;
+ int thickness;
+
+ BrushInterface *brushInterface;
+ QString brush;
+ QPoint lastPos;
+
+ QPainterPath pendingPath;
+};
+
+#endif
diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro
new file mode 100644
index 0000000..15bc21e
--- /dev/null
+++ b/examples/tools/plugandpaint/plugandpaint.pro
@@ -0,0 +1,22 @@
+#! [0]
+HEADERS = interfaces.h \
+ mainwindow.h \
+ paintarea.h \
+ plugindialog.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ paintarea.cpp \
+ plugindialog.cpp
+LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools
+
+if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
+ mac:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)_debug
+ win32:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)d
+}
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaint.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint
+INSTALLS += target sources
diff --git a/examples/tools/plugandpaint/plugindialog.cpp b/examples/tools/plugandpaint/plugindialog.cpp
new file mode 100644
index 0000000..5e37a8b
--- /dev/null
+++ b/examples/tools/plugandpaint/plugindialog.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "interfaces.h"
+#include "plugindialog.h"
+
+#include <QPluginLoader>
+#include <QStringList>
+#include <QDir>
+
+#include <QLabel>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QHeaderView>
+
+PluginDialog::PluginDialog(const QString &path, const QStringList &fileNames,
+ QWidget *parent) :
+ QDialog(parent),
+ label(new QLabel),
+ treeWidget(new QTreeWidget),
+ okButton(new QPushButton(tr("OK")))
+{
+ treeWidget->setAlternatingRowColors(false);
+ treeWidget->setSelectionMode(QAbstractItemView::NoSelection);
+ treeWidget->setColumnCount(1);
+ treeWidget->header()->hide();
+
+ okButton->setDefault(true);
+
+ connect(okButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->setColumnStretch(0, 1);
+ mainLayout->setColumnStretch(2, 1);
+ mainLayout->addWidget(label, 0, 0, 1, 3);
+ mainLayout->addWidget(treeWidget, 1, 0, 1, 3);
+ mainLayout->addWidget(okButton, 2, 1);
+ setLayout(mainLayout);
+
+ interfaceIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirOpenIcon),
+ QIcon::Normal, QIcon::On);
+ interfaceIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirClosedIcon),
+ QIcon::Normal, QIcon::Off);
+ featureIcon.addPixmap(style()->standardPixmap(QStyle::SP_FileIcon));
+
+ setWindowTitle(tr("Plugin Information"));
+ findPlugins(path, fileNames);
+}
+
+//! [0]
+void PluginDialog::findPlugins(const QString &path,
+ const QStringList &fileNames)
+{
+ label->setText(tr("Plug & Paint found the following plugins\n"
+ "(looked in %1):")
+ .arg(QDir::toNativeSeparators(path)));
+
+ const QDir dir(path);
+
+ foreach (QObject *plugin, QPluginLoader::staticInstances())
+ populateTreeWidget(plugin, tr("%1 (Static Plugin)")
+ .arg(plugin->metaObject()->className()));
+
+ foreach (QString fileName, fileNames) {
+ QPluginLoader loader(dir.absoluteFilePath(fileName));
+ QObject *plugin = loader.instance();
+ if (plugin)
+ populateTreeWidget(plugin, fileName);
+ }
+}
+//! [0]
+
+//! [1]
+void PluginDialog::populateTreeWidget(QObject *plugin, const QString &text)
+{
+ QTreeWidgetItem *pluginItem = new QTreeWidgetItem(treeWidget);
+ pluginItem->setText(0, text);
+ treeWidget->setItemExpanded(pluginItem, true);
+
+ QFont boldFont = pluginItem->font(0);
+ boldFont.setBold(true);
+ pluginItem->setFont(0, boldFont);
+
+ if (plugin) {
+ BrushInterface *iBrush = qobject_cast<BrushInterface *>(plugin);
+ if (iBrush)
+ addItems(pluginItem, "BrushInterface", iBrush->brushes());
+
+ ShapeInterface *iShape = qobject_cast<ShapeInterface *>(plugin);
+ if (iShape)
+ addItems(pluginItem, "ShapeInterface", iShape->shapes());
+
+ FilterInterface *iFilter =
+ qobject_cast<FilterInterface *>(plugin);
+ if (iFilter)
+ addItems(pluginItem, "FilterInterface", iFilter->filters());
+ }
+}
+//! [1]
+
+void PluginDialog::addItems(QTreeWidgetItem *pluginItem,
+ const char *interfaceName,
+ const QStringList &features)
+{
+ QTreeWidgetItem *interfaceItem = new QTreeWidgetItem(pluginItem);
+ interfaceItem->setText(0, interfaceName);
+ interfaceItem->setIcon(0, interfaceIcon);
+
+ foreach (QString feature, features) {
+ if (feature.endsWith("..."))
+ feature.chop(3);
+ QTreeWidgetItem *featureItem = new QTreeWidgetItem(interfaceItem);
+ featureItem->setText(0, feature);
+ featureItem->setIcon(0, featureIcon);
+ }
+}
diff --git a/examples/tools/plugandpaint/plugindialog.h b/examples/tools/plugandpaint/plugindialog.h
new file mode 100644
index 0000000..73cb6e4
--- /dev/null
+++ b/examples/tools/plugandpaint/plugindialog.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PLUGINDIALOG_H
+#define PLUGINDIALOG_H
+
+#include <QDialog>
+#include <QIcon>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QStringList;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class PluginDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ PluginDialog(const QString &path, const QStringList &fileNames,
+ QWidget *parent = 0);
+
+private:
+ void findPlugins(const QString &path, const QStringList &fileNames);
+ void populateTreeWidget(QObject *plugin, const QString &text);
+ void addItems(QTreeWidgetItem *pluginItem, const char *interfaceName,
+ const QStringList &features);
+
+ QLabel *label;
+ QTreeWidget *treeWidget;
+ QPushButton *okButton;
+ QIcon interfaceIcon;
+ QIcon featureIcon;
+};
+
+#endif
diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.pro b/examples/tools/plugandpaintplugins/basictools/basictools.pro
new file mode 100644
index 0000000..f015fdc
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/basictools/basictools.pro
@@ -0,0 +1,15 @@
+#! [0]
+TEMPLATE = lib
+CONFIG += plugin static
+INCLUDEPATH += ../..
+HEADERS = basictoolsplugin.h
+SOURCES = basictoolsplugin.cpp
+TARGET = $$qtLibraryTarget(pnp_basictools)
+DESTDIR = ../../plugandpaint/plugins
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS basictools.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/basictools
+INSTALLS += target sources
diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
new file mode 100644
index 0000000..95b239f
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+#include <stdlib.h>
+
+#include "basictoolsplugin.h"
+
+const float Pi = 3.14159f;
+
+//! [0]
+QStringList BasicToolsPlugin::brushes() const
+{
+ return QStringList() << tr("Pencil") << tr("Air Brush")
+ << tr("Random Letters");
+}
+//! [0]
+
+//! [1]
+QRect BasicToolsPlugin::mousePress(const QString &brush, QPainter &painter,
+ const QPoint &pos)
+{
+ return mouseMove(brush, painter, pos, pos);
+}
+//! [1]
+
+//! [2]
+QRect BasicToolsPlugin::mouseMove(const QString &brush, QPainter &painter,
+ const QPoint &oldPos, const QPoint &newPos)
+{
+ painter.save();
+
+ int rad = painter.pen().width() / 2;
+ QRect boundingRect = QRect(oldPos, newPos).normalized()
+ .adjusted(-rad, -rad, +rad, +rad);
+ QColor color = painter.pen().color();
+ int thickness = painter.pen().width();
+ QColor transparentColor(color.red(), color.green(), color.blue(), 0);
+//! [2] //! [3]
+
+ if (brush == tr("Pencil")) {
+ painter.drawLine(oldPos, newPos);
+ } else if (brush == tr("Air Brush")) {
+ int numSteps = 2 + (newPos - oldPos).manhattanLength() / 2;
+
+ painter.setBrush(QBrush(color, Qt::Dense6Pattern));
+ painter.setPen(Qt::NoPen);
+
+ for (int i = 0; i < numSteps; ++i) {
+ int x = oldPos.x() + i * (newPos.x() - oldPos.x()) / (numSteps - 1);
+ int y = oldPos.y() + i * (newPos.y() - oldPos.y()) / (numSteps - 1);
+
+ painter.drawEllipse(x - (thickness / 2), y - (thickness / 2),
+ thickness, thickness);
+ }
+ } else if (brush == tr("Random Letters")) {
+ QChar ch('A' + (qrand() % 26));
+
+ QFont biggerFont = painter.font();
+ biggerFont.setBold(true);
+ biggerFont.setPointSize(biggerFont.pointSize() + thickness);
+ painter.setFont(biggerFont);
+
+ painter.drawText(newPos, QString(ch));
+
+ QFontMetrics metrics(painter.font());
+ boundingRect = metrics.boundingRect(ch);
+ boundingRect.translate(newPos);
+ boundingRect.adjust(-10, -10, +10, +10);
+ }
+ painter.restore();
+ return boundingRect;
+}
+//! [3]
+
+//! [4]
+QRect BasicToolsPlugin::mouseRelease(const QString & /* brush */,
+ QPainter & /* painter */,
+ const QPoint & /* pos */)
+{
+ return QRect(0, 0, 0, 0);
+}
+//! [4]
+
+//! [5]
+QStringList BasicToolsPlugin::shapes() const
+{
+ return QStringList() << tr("Circle") << tr("Star") << tr("Text...");
+}
+//! [5]
+
+//! [6]
+QPainterPath BasicToolsPlugin::generateShape(const QString &shape,
+ QWidget *parent)
+{
+ QPainterPath path;
+
+ if (shape == tr("Circle")) {
+ path.addEllipse(0, 0, 50, 50);
+ } else if (shape == tr("Star")) {
+ path.moveTo(90, 50);
+ for (int i = 1; i < 5; ++i) {
+ path.lineTo(50 + 40 * cos(0.8 * i * Pi),
+ 50 + 40 * sin(0.8 * i * Pi));
+ }
+ path.closeSubpath();
+ } else if (shape == tr("Text...")) {
+ QString text = QInputDialog::getText(parent, tr("Text Shape"),
+ tr("Enter text:"),
+ QLineEdit::Normal, tr("Qt"));
+ if (!text.isEmpty()) {
+ QFont timesFont("Times", 50);
+ timesFont.setStyleStrategy(QFont::ForceOutline);
+ path.addText(0, 0, timesFont, text);
+ }
+ }
+
+ return path;
+}
+//! [6]
+
+//! [7]
+QStringList BasicToolsPlugin::filters() const
+{
+ return QStringList() << tr("Invert Pixels") << tr("Swap RGB")
+ << tr("Grayscale");
+}
+//! [7]
+
+//! [8]
+QImage BasicToolsPlugin::filterImage(const QString &filter, const QImage &image,
+ QWidget * /* parent */)
+{
+ QImage result = image.convertToFormat(QImage::Format_RGB32);
+
+ if (filter == tr("Invert Pixels")) {
+ result.invertPixels();
+ } else if (filter == tr("Swap RGB")) {
+ result = result.rgbSwapped();
+ } else if (filter == tr("Grayscale")) {
+ for (int y = 0; y < result.height(); ++y) {
+ for (int x = 0; x < result.width(); ++x) {
+ int pixel = result.pixel(x, y);
+ int gray = qGray(pixel);
+ int alpha = qAlpha(pixel);
+ result.setPixel(x, y, qRgba(gray, gray, gray, alpha));
+ }
+ }
+ }
+ return result;
+}
+//! [8]
+
+QT_BEGIN_NAMESPACE
+//! [9]
+Q_EXPORT_PLUGIN2(pnp_basictools, BasicToolsPlugin)
+//! [9]
+QT_END_NAMESPACE
diff --git a/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h
new file mode 100644
index 0000000..98aed0b
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BASICTOOLSPLUGIN_H
+#define BASICTOOLSPLUGIN_H
+
+#include <QRect>
+#include <QObject>
+#include <QStringList>
+#include <QPainterPath>
+#include <QImage>
+
+//! [0]
+#include <plugandpaint/interfaces.h>
+
+//! [1]
+class BasicToolsPlugin : public QObject,
+ public BrushInterface,
+ public ShapeInterface,
+ public FilterInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(BrushInterface ShapeInterface FilterInterface)
+//! [0]
+
+//! [2]
+public:
+//! [1]
+ // BrushInterface
+ QStringList brushes() const;
+ QRect mousePress(const QString &brush, QPainter &painter,
+ const QPoint &pos);
+ QRect mouseMove(const QString &brush, QPainter &painter,
+ const QPoint &oldPos, const QPoint &newPos);
+ QRect mouseRelease(const QString &brush, QPainter &painter,
+ const QPoint &pos);
+
+ // ShapeInterface
+ QStringList shapes() const;
+ QPainterPath generateShape(const QString &shape, QWidget *parent);
+
+ // FilterInterface
+ QStringList filters() const;
+ QImage filterImage(const QString &filter, const QImage &image,
+ QWidget *parent);
+//! [3]
+};
+//! [2] //! [3]
+
+#endif
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
new file mode 100644
index 0000000..3cf2b66
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
@@ -0,0 +1,15 @@
+#! [0]
+TEMPLATE = lib
+CONFIG += plugin
+INCLUDEPATH += ../..
+HEADERS = extrafiltersplugin.h
+SOURCES = extrafiltersplugin.cpp
+TARGET = $$qtLibraryTarget(pnp_extrafilters)
+DESTDIR = ../../plugandpaint/plugins
+
+#! [0]
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extrafilters.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/extrafilters
+INSTALLS += target sources
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
new file mode 100644
index 0000000..b54d8b6
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp
@@ -0,0 +1,125 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+#include <stdlib.h>
+
+#include "extrafiltersplugin.h"
+
+QStringList ExtraFiltersPlugin::filters() const
+{
+ return QStringList() << tr("Flip Horizontally") << tr("Flip Vertically")
+ << tr("Smudge...") << tr("Threshold...");
+}
+
+QImage ExtraFiltersPlugin::filterImage(const QString &filter,
+ const QImage &image, QWidget *parent)
+{
+ QImage original = image.convertToFormat(QImage::Format_RGB32);
+ QImage result = original;
+
+ if (filter == tr("Flip Horizontally")) {
+ for (int y = 0; y < original.height(); ++y) {
+ for (int x = 0; x < original.width(); ++x) {
+ int pixel = original.pixel(original.width() - x - 1, y);
+ result.setPixel(x, y, pixel);
+ }
+ }
+ } else if (filter == tr("Flip Vertically")) {
+ for (int y = 0; y < original.height(); ++y) {
+ for (int x = 0; x < original.width(); ++x) {
+ int pixel = original.pixel(x, original.height() - y - 1);
+ result.setPixel(x, y, pixel);
+ }
+ }
+ } else if (filter == tr("Smudge...")) {
+ bool ok;
+ int numIters = QInputDialog::getInteger(parent, tr("Smudge Filter"),
+ tr("Enter number of iterations:"),
+ 5, 1, 20, 1, &ok);
+ if (ok) {
+ for (int i = 0; i < numIters; ++i) {
+ for (int y = 1; y < original.height() - 1; ++y) {
+ for (int x = 1; x < original.width() - 1; ++x) {
+ int p1 = original.pixel(x, y);
+ int p2 = original.pixel(x, y + 1);
+ int p3 = original.pixel(x, y - 1);
+ int p4 = original.pixel(x + 1, y);
+ int p5 = original.pixel(x - 1, y);
+
+ int red = (qRed(p1) + qRed(p2) + qRed(p3) + qRed(p4)
+ + qRed(p5)) / 5;
+ int green = (qGreen(p1) + qGreen(p2) + qGreen(p3)
+ + qGreen(p4) + qGreen(p5)) / 5;
+ int blue = (qBlue(p1) + qBlue(p2) + qBlue(p3)
+ + qBlue(p4) + qBlue(p5)) / 5;
+ int alpha = (qAlpha(p1) + qAlpha(p2) + qAlpha(p3)
+ + qAlpha(p4) + qAlpha(p5)) / 5;
+
+ result.setPixel(x, y, qRgba(red, green, blue, alpha));
+ }
+ }
+ }
+ }
+ } else if (filter == tr("Threshold...")) {
+ bool ok;
+ int threshold = QInputDialog::getInteger(parent, tr("Threshold Filter"),
+ tr("Enter threshold:"),
+ 10, 1, 256, 1, &ok);
+ if (ok) {
+ int factor = 256 / threshold;
+ for (int y = 0; y < original.height(); ++y) {
+ for (int x = 0; x < original.width(); ++x) {
+ int pixel = original.pixel(x, y);
+ result.setPixel(x, y, qRgba(qRed(pixel) / factor * factor,
+ qGreen(pixel) / factor * factor,
+ qBlue(pixel) / factor * factor,
+ qAlpha(pixel)));
+ }
+ }
+ }
+ }
+ return result;
+}
+
+Q_EXPORT_PLUGIN2(pnp_extrafilters, ExtraFiltersPlugin)
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h
new file mode 100644
index 0000000..b1b497e
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EXTRAFILTERSPLUGIN_H
+#define EXTRAFILTERSPLUGIN_H
+
+//! [0]
+#include <QObject>
+#include <QStringList>
+#include <QImage>
+
+#include <plugandpaint/interfaces.h>
+
+class ExtraFiltersPlugin : public QObject, public FilterInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(FilterInterface)
+
+public:
+ QStringList filters() const;
+ QImage filterImage(const QString &filter, const QImage &image,
+ QWidget *parent);
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
new file mode 100644
index 0000000..89e8b7e
--- /dev/null
+++ b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+SUBDIRS = basictools \
+ extrafilters
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaintplugins.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins
+INSTALLS += target sources
diff --git a/examples/tools/regexp/main.cpp b/examples/tools/regexp/main.cpp
new file mode 100644
index 0000000..4fc8de8
--- /dev/null
+++ b/examples/tools/regexp/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "regexpdialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ RegExpDialog dialog;
+ dialog.show();
+ return dialog.exec();
+}
diff --git a/examples/tools/regexp/regexp.pro b/examples/tools/regexp/regexp.pro
new file mode 100644
index 0000000..15ca9a4
--- /dev/null
+++ b/examples/tools/regexp/regexp.pro
@@ -0,0 +1,9 @@
+HEADERS = regexpdialog.h
+SOURCES = regexpdialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS regexp.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp
+INSTALLS += target sources
diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp
new file mode 100644
index 0000000..8fe7383
--- /dev/null
+++ b/examples/tools/regexp/regexpdialog.cpp
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "regexpdialog.h"
+
+RegExpDialog::RegExpDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ patternComboBox = new QComboBox;
+ patternComboBox->setEditable(true);
+ patternComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ patternLabel = new QLabel(tr("&Pattern:"));
+ patternLabel->setBuddy(patternComboBox);
+
+ escapedPatternLineEdit = new QLineEdit;
+ escapedPatternLineEdit->setReadOnly(true);
+ QPalette palette = escapedPatternLineEdit->palette();
+ palette.setBrush(QPalette::Base,
+ palette.brush(QPalette::Disabled, QPalette::Base));
+ escapedPatternLineEdit->setPalette(palette);
+
+ escapedPatternLabel = new QLabel(tr("&Escaped Pattern:"));
+ escapedPatternLabel->setBuddy(escapedPatternLineEdit);
+
+ syntaxComboBox = new QComboBox;
+ syntaxComboBox->addItem(tr("Regular expression v1"), QRegExp::RegExp);
+ syntaxComboBox->addItem(tr("Regular expression v2"), QRegExp::RegExp2);
+ syntaxComboBox->addItem(tr("Wildcard"), QRegExp::Wildcard);
+ syntaxComboBox->addItem(tr("Fixed string"), QRegExp::FixedString);
+
+ syntaxLabel = new QLabel(tr("&Pattern Syntax:"));
+ syntaxLabel->setBuddy(syntaxComboBox);
+
+ textComboBox = new QComboBox;
+ textComboBox->setEditable(true);
+ textComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+
+ textLabel = new QLabel(tr("&Text:"));
+ textLabel->setBuddy(textComboBox);
+
+ caseSensitiveCheckBox = new QCheckBox(tr("Case &Sensitive"));
+ caseSensitiveCheckBox->setChecked(true);
+ minimalCheckBox = new QCheckBox(tr("&Minimal"));
+
+ indexLabel = new QLabel(tr("Index of Match:"));
+ indexEdit = new QLineEdit;
+ indexEdit->setReadOnly(true);
+
+ matchedLengthLabel = new QLabel(tr("Matched Length:"));
+ matchedLengthEdit = new QLineEdit;
+ matchedLengthEdit->setReadOnly(true);
+
+ for (int i = 0; i < MaxCaptures; ++i) {
+ captureLabels[i] = new QLabel(tr("Capture %1:").arg(i));
+ captureEdits[i] = new QLineEdit;
+ captureEdits[i]->setReadOnly(true);
+ }
+ captureLabels[0]->setText(tr("Match:"));
+
+ QHBoxLayout *checkBoxLayout = new QHBoxLayout;
+ checkBoxLayout->addWidget(caseSensitiveCheckBox);
+ checkBoxLayout->addWidget(minimalCheckBox);
+ checkBoxLayout->addStretch(1);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(patternLabel, 0, 0);
+ mainLayout->addWidget(patternComboBox, 0, 1);
+ mainLayout->addWidget(escapedPatternLabel, 1, 0);
+ mainLayout->addWidget(escapedPatternLineEdit, 1, 1);
+ mainLayout->addWidget(syntaxLabel, 2, 0);
+ mainLayout->addWidget(syntaxComboBox, 2, 1);
+ mainLayout->addLayout(checkBoxLayout, 3, 0, 1, 2);
+ mainLayout->addWidget(textLabel, 4, 0);
+ mainLayout->addWidget(textComboBox, 4, 1);
+ mainLayout->addWidget(indexLabel, 5, 0);
+ mainLayout->addWidget(indexEdit, 5, 1);
+ mainLayout->addWidget(matchedLengthLabel, 6, 0);
+ mainLayout->addWidget(matchedLengthEdit, 6, 1);
+
+ for (int j = 0; j < MaxCaptures; ++j) {
+ mainLayout->addWidget(captureLabels[j], 7 + j, 0);
+ mainLayout->addWidget(captureEdits[j], 7 + j, 1);
+ }
+ setLayout(mainLayout);
+
+ connect(patternComboBox, SIGNAL(editTextChanged(const QString &)),
+ this, SLOT(refresh()));
+ connect(textComboBox, SIGNAL(editTextChanged(const QString &)),
+ this, SLOT(refresh()));
+ connect(caseSensitiveCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(refresh()));
+ connect(minimalCheckBox, SIGNAL(toggled(bool)), this, SLOT(refresh()));
+ connect(syntaxComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(refresh()));
+
+ patternComboBox->addItem(tr("[A-Za-z_]+([A-Za-z_0-9]*)"));
+ textComboBox->addItem(tr("(10 + delta4) * 32"));
+
+ setWindowTitle(tr("RegExp"));
+ setFixedHeight(sizeHint().height());
+ refresh();
+}
+
+void RegExpDialog::refresh()
+{
+ setUpdatesEnabled(false);
+
+ QString pattern = patternComboBox->currentText();
+ QString text = textComboBox->currentText();
+
+ QString escaped = pattern;
+ escaped.replace("\\", "\\\\");
+ escaped.replace("\"", "\\\"");
+ escaped.prepend("\"");
+ escaped.append("\"");
+ escapedPatternLineEdit->setText(escaped);
+
+ QRegExp rx(pattern);
+ Qt::CaseSensitivity cs = Qt::CaseInsensitive;
+ if (caseSensitiveCheckBox->isChecked())
+ cs = Qt::CaseSensitive;
+ rx.setCaseSensitivity(cs);
+ rx.setMinimal(minimalCheckBox->isChecked());
+ QRegExp::PatternSyntax syntax = QRegExp::PatternSyntax(
+ syntaxComboBox->itemData(syntaxComboBox->currentIndex()).toInt());
+ rx.setPatternSyntax(syntax);
+
+ QPalette palette = patternComboBox->palette();
+ if (rx.isValid()) {
+ palette.setColor(QPalette::Text,
+ textComboBox->palette().color(QPalette::Text));
+ } else {
+ palette.setColor(QPalette::Text, Qt::red);
+ }
+ patternComboBox->setPalette(palette);
+
+ indexEdit->setText(QString::number(rx.indexIn(text)));
+ matchedLengthEdit->setText(QString::number(rx.matchedLength()));
+ for (int i = 0; i < MaxCaptures; ++i) {
+ captureLabels[i]->setEnabled(i <= rx.numCaptures());
+ captureEdits[i]->setEnabled(i <= rx.numCaptures());
+ captureEdits[i]->setText(rx.cap(i));
+ }
+
+ setUpdatesEnabled(true);
+}
diff --git a/examples/tools/regexp/regexpdialog.h b/examples/tools/regexp/regexpdialog.h
new file mode 100644
index 0000000..d4dfb65
--- /dev/null
+++ b/examples/tools/regexp/regexpdialog.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef REGEXPDIALOG_H
+#define REGEXPDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QComboBox;
+class QLabel;
+class QLineEdit;
+QT_END_NAMESPACE
+
+class RegExpDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ RegExpDialog(QWidget *parent = 0);
+
+private slots:
+ void refresh();
+
+private:
+ QLabel *patternLabel;
+ QLabel *escapedPatternLabel;
+ QLabel *syntaxLabel;
+ QLabel *textLabel;
+ QComboBox *patternComboBox;
+ QLineEdit *escapedPatternLineEdit;
+ QComboBox *textComboBox;
+ QCheckBox *caseSensitiveCheckBox;
+ QCheckBox *minimalCheckBox;
+ QComboBox *syntaxComboBox;
+
+ QLabel *indexLabel;
+ QLabel *matchedLengthLabel;
+ QLineEdit *indexEdit;
+ QLineEdit *matchedLengthEdit;
+
+ enum { MaxCaptures = 6 };
+ QLabel *captureLabels[MaxCaptures];
+ QLineEdit *captureEdits[MaxCaptures];
+};
+
+#endif
diff --git a/examples/tools/settingseditor/inifiles/licensepage.ini b/examples/tools/settingseditor/inifiles/licensepage.ini
new file mode 100644
index 0000000..608d1b7
--- /dev/null
+++ b/examples/tools/settingseditor/inifiles/licensepage.ini
@@ -0,0 +1,46 @@
+[Field%201]
+Bottom=89
+Flags=MULTILINE|VSCROLL|READONLY
+Left=4
+Right=296
+State=No license agreement file found. Please contact support.
+Top=14
+Type=Text
+
+[Field%202]
+Bottom=8
+Left=4
+Right=294
+Text=Press Page Down to see the rest of the agreement.
+Top=0
+Type=Label
+
+[Field%203]
+Bottom=111
+Left=4
+Right=297
+Text=If you accept the terms of the agreement, select the first option below. You must accept the agreement to install this software. Click Next to continue.
+Top=92
+Type=Label
+
+[Field%204]
+Bottom=129
+Flags=GROUP|NOTIFY
+Left=4
+Right=299
+Text=I &accept the terms in the License Agreement
+Top=120
+Type=RadioButton
+
+[Field%205]
+Bottom=140
+Flags=NOTIFY
+Left=4
+Right=300
+State=1
+Text=I &do not accept the terms in the License Agreement
+Top=129
+Type=RadioButton
+
+[Settings]
+NumFields=5
diff --git a/examples/tools/settingseditor/inifiles/qsa.ini b/examples/tools/settingseditor/inifiles/qsa.ini
new file mode 100644
index 0000000..56a2964
--- /dev/null
+++ b/examples/tools/settingseditor/inifiles/qsa.ini
@@ -0,0 +1,26 @@
+[Field%201]
+Bottom=65
+Left=0
+Right=299
+Text=QSA Build Options
+Top=9
+Type=Groupbox
+
+[Field%202]
+Bottom=37
+Left=20
+Right=284
+Text=Don't compile QSA Workbench into QSA.
+Top=27
+Type=Checkbox
+
+[Field%203]
+Bottom=56
+Left=20
+Right=247
+Text=Don't compile QSA Workbench nor QSA Editor into QSA.
+Top=45
+Type=Checkbox
+
+[Settings]
+NumFields=3
diff --git a/examples/tools/settingseditor/locationdialog.cpp b/examples/tools/settingseditor/locationdialog.cpp
new file mode 100644
index 0000000..600038b
--- /dev/null
+++ b/examples/tools/settingseditor/locationdialog.cpp
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "locationdialog.h"
+
+LocationDialog::LocationDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ formatComboBox = new QComboBox;
+ formatComboBox->addItem(tr("Native"));
+ formatComboBox->addItem(tr("INI"));
+
+ scopeComboBox = new QComboBox;
+ scopeComboBox->addItem(tr("User"));
+ scopeComboBox->addItem(tr("System"));
+
+ organizationComboBox = new QComboBox;
+ organizationComboBox->addItem(tr("Trolltech"));
+ organizationComboBox->setEditable(true);
+
+ applicationComboBox = new QComboBox;
+ applicationComboBox->addItem(tr("Any"));
+ applicationComboBox->addItem(tr("Application Example"));
+ applicationComboBox->addItem(tr("Assistant"));
+ applicationComboBox->addItem(tr("Designer"));
+ applicationComboBox->addItem(tr("Linguist"));
+ applicationComboBox->setEditable(true);
+ applicationComboBox->setCurrentIndex(3);
+
+ formatLabel = new QLabel(tr("&Format:"));
+ formatLabel->setBuddy(formatComboBox);
+
+ scopeLabel = new QLabel(tr("&Scope:"));
+ scopeLabel->setBuddy(scopeComboBox);
+
+ organizationLabel = new QLabel(tr("&Organization:"));
+ organizationLabel->setBuddy(organizationComboBox);
+
+ applicationLabel = new QLabel(tr("&Application:"));
+ applicationLabel->setBuddy(applicationComboBox);
+
+ locationsGroupBox = new QGroupBox(tr("Setting Locations"));
+
+ QStringList labels;
+ labels << tr("Location") << tr("Access");
+
+ locationsTable = new QTableWidget;
+ locationsTable->setSelectionMode(QAbstractItemView::SingleSelection);
+ locationsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+ locationsTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ locationsTable->setColumnCount(2);
+ locationsTable->setHorizontalHeaderLabels(labels);
+ locationsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+ locationsTable->horizontalHeader()->resizeSection(1, 180);
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel);
+
+ connect(formatComboBox, SIGNAL(activated(int)),
+ this, SLOT(updateLocationsTable()));
+ connect(scopeComboBox, SIGNAL(activated(int)),
+ this, SLOT(updateLocationsTable()));
+ connect(organizationComboBox->lineEdit(),
+ SIGNAL(editingFinished()),
+ this, SLOT(updateLocationsTable()));
+ connect(applicationComboBox->lineEdit(),
+ SIGNAL(editingFinished()),
+ this, SLOT(updateLocationsTable()));
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ QVBoxLayout *locationsLayout = new QVBoxLayout;
+ locationsLayout->addWidget(locationsTable);
+ locationsGroupBox->setLayout(locationsLayout);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(formatLabel, 0, 0);
+ mainLayout->addWidget(formatComboBox, 0, 1);
+ mainLayout->addWidget(scopeLabel, 1, 0);
+ mainLayout->addWidget(scopeComboBox, 1, 1);
+ mainLayout->addWidget(organizationLabel, 2, 0);
+ mainLayout->addWidget(organizationComboBox, 2, 1);
+ mainLayout->addWidget(applicationLabel, 3, 0);
+ mainLayout->addWidget(applicationComboBox, 3, 1);
+ mainLayout->addWidget(locationsGroupBox, 4, 0, 1, 2);
+ mainLayout->addWidget(buttonBox, 5, 0, 1, 2);
+ setLayout(mainLayout);
+
+ updateLocationsTable();
+
+ setWindowTitle(tr("Open Application Settings"));
+ resize(650, 400);
+}
+
+QSettings::Format LocationDialog::format() const
+{
+ if (formatComboBox->currentIndex() == 0)
+ return QSettings::NativeFormat;
+ else
+ return QSettings::IniFormat;
+}
+
+QSettings::Scope LocationDialog::scope() const
+{
+ if (scopeComboBox->currentIndex() == 0)
+ return QSettings::UserScope;
+ else
+ return QSettings::SystemScope;
+}
+
+QString LocationDialog::organization() const
+{
+ return organizationComboBox->currentText();
+}
+
+QString LocationDialog::application() const
+{
+ if (applicationComboBox->currentText() == tr("Any"))
+ return "";
+ else
+ return applicationComboBox->currentText();
+}
+
+void LocationDialog::updateLocationsTable()
+{
+ locationsTable->setUpdatesEnabled(false);
+ locationsTable->setRowCount(0);
+
+ for (int i = 0; i < 2; ++i) {
+ if (i == 0 && scope() == QSettings::SystemScope)
+ continue;
+
+ QSettings::Scope actualScope = (i == 0) ? QSettings::UserScope
+ : QSettings::SystemScope;
+ for (int j = 0; j < 2; ++j) {
+ if (j == 0 && application().isEmpty())
+ continue;
+
+ QString actualApplication;
+ if (j == 0)
+ actualApplication = application();
+ QSettings settings(format(), actualScope, organization(),
+ actualApplication);
+
+ int row = locationsTable->rowCount();
+ locationsTable->setRowCount(row + 1);
+
+ QTableWidgetItem *item0 = new QTableWidgetItem;
+ item0->setText(settings.fileName());
+
+ QTableWidgetItem *item1 = new QTableWidgetItem;
+ bool disable = (settings.childKeys().isEmpty()
+ && settings.childGroups().isEmpty());
+
+ if (row == 0) {
+ if (settings.isWritable()) {
+ item1->setText(tr("Read-write"));
+ disable = false;
+ } else {
+ item1->setText(tr("Read-only"));
+ }
+ buttonBox->button(QDialogButtonBox::Ok)->setDisabled(disable);
+ } else {
+ item1->setText(tr("Read-only fallback"));
+ }
+
+ if (disable) {
+ item0->setFlags(item0->flags() & ~Qt::ItemIsEnabled);
+ item1->setFlags(item1->flags() & ~Qt::ItemIsEnabled);
+ }
+
+ locationsTable->setItem(row, 0, item0);
+ locationsTable->setItem(row, 1, item1);
+ }
+ }
+ locationsTable->setUpdatesEnabled(true);
+}
diff --git a/examples/tools/settingseditor/locationdialog.h b/examples/tools/settingseditor/locationdialog.h
new file mode 100644
index 0000000..3ea8359
--- /dev/null
+++ b/examples/tools/settingseditor/locationdialog.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LOCATIONDIALOG_H
+#define LOCATIONDIALOG_H
+
+#include <QDialog>
+#include <QSettings>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QGroupBox;
+class QLabel;
+class QTableWidget;
+QT_END_NAMESPACE
+
+class LocationDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ LocationDialog(QWidget *parent = 0);
+
+ QSettings::Format format() const;
+ QSettings::Scope scope() const;
+ QString organization() const;
+ QString application() const;
+
+private slots:
+ void updateLocationsTable();
+
+private:
+ QLabel *formatLabel;
+ QLabel *scopeLabel;
+ QLabel *organizationLabel;
+ QLabel *applicationLabel;
+ QComboBox *formatComboBox;
+ QComboBox *scopeComboBox;
+ QComboBox *organizationComboBox;
+ QComboBox *applicationComboBox;
+ QGroupBox *locationsGroupBox;
+ QTableWidget *locationsTable;
+ QDialogButtonBox *buttonBox;
+};
+
+#endif
diff --git a/examples/tools/settingseditor/main.cpp b/examples/tools/settingseditor/main.cpp
new file mode 100644
index 0000000..4856752
--- /dev/null
+++ b/examples/tools/settingseditor/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp
new file mode 100644
index 0000000..0f48a5c
--- /dev/null
+++ b/examples/tools/settingseditor/mainwindow.cpp
@@ -0,0 +1,223 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "locationdialog.h"
+#include "mainwindow.h"
+#include "settingstree.h"
+
+MainWindow::MainWindow()
+{
+ settingsTree = new SettingsTree;
+ setCentralWidget(settingsTree);
+
+ locationDialog = 0;
+
+ createActions();
+ createMenus();
+
+ autoRefreshAct->setChecked(true);
+ fallbacksAct->setChecked(true);
+
+ setWindowTitle(tr("Settings Editor"));
+ resize(500, 600);
+}
+
+void MainWindow::openSettings()
+{
+ if (!locationDialog)
+ locationDialog = new LocationDialog(this);
+
+ if (locationDialog->exec()) {
+ QSettings *settings = new QSettings(locationDialog->format(),
+ locationDialog->scope(),
+ locationDialog->organization(),
+ locationDialog->application());
+ setSettingsObject(settings);
+ fallbacksAct->setEnabled(true);
+ }
+}
+
+void MainWindow::openIniFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open INI File"),
+ "", tr("INI Files (*.ini *.conf)"));
+ if (!fileName.isEmpty()) {
+ QSettings *settings = new QSettings(fileName, QSettings::IniFormat);
+ setSettingsObject(settings);
+ fallbacksAct->setEnabled(false);
+ }
+}
+
+void MainWindow::openPropertyList()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Property List"),
+ "", tr("Property List Files (*.plist)"));
+ if (!fileName.isEmpty()) {
+ QSettings *settings = new QSettings(fileName, QSettings::NativeFormat);
+ setSettingsObject(settings);
+ fallbacksAct->setEnabled(false);
+ }
+}
+
+void MainWindow::openRegistryPath()
+{
+ QString path = QInputDialog::getText(this, tr("Open Registry Path"),
+ tr("Enter the path in the Windows registry:"),
+ QLineEdit::Normal, "HKEY_CURRENT_USER\\");
+ if (!path.isEmpty()) {
+ QSettings *settings = new QSettings(path, QSettings::NativeFormat);
+ setSettingsObject(settings);
+ fallbacksAct->setEnabled(false);
+ }
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Settings Editor"),
+ tr("The <b>Settings Editor</b> example shows how to access "
+ "application settings using Qt."));
+}
+
+void MainWindow::createActions()
+{
+ openSettingsAct = new QAction(tr("&Open Application Settings..."), this);
+ openSettingsAct->setShortcut(tr("Ctrl+O"));
+ connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(openSettings()));
+
+ openIniFileAct = new QAction(tr("Open I&NI File..."), this);
+ openIniFileAct->setShortcut(tr("Ctrl+N"));
+ connect(openIniFileAct, SIGNAL(triggered()), this, SLOT(openIniFile()));
+
+ openPropertyListAct = new QAction(tr("Open Mac &Property List..."), this);
+ openPropertyListAct->setShortcut(tr("Ctrl+P"));
+ connect(openPropertyListAct, SIGNAL(triggered()),
+ this, SLOT(openPropertyList()));
+
+ openRegistryPathAct = new QAction(tr("Open Windows &Registry Path..."),
+ this);
+ openRegistryPathAct->setShortcut(tr("Ctrl+G"));
+ connect(openRegistryPathAct, SIGNAL(triggered()),
+ this, SLOT(openRegistryPath()));
+
+ refreshAct = new QAction(tr("&Refresh"), this);
+ refreshAct->setShortcut(tr("Ctrl+R"));
+ refreshAct->setEnabled(false);
+ connect(refreshAct, SIGNAL(triggered()), settingsTree, SLOT(refresh()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ autoRefreshAct = new QAction(tr("&Auto-Refresh"), this);
+ autoRefreshAct->setShortcut(tr("Ctrl+A"));
+ autoRefreshAct->setCheckable(true);
+ autoRefreshAct->setEnabled(false);
+ connect(autoRefreshAct, SIGNAL(triggered(bool)),
+ settingsTree, SLOT(setAutoRefresh(bool)));
+ connect(autoRefreshAct, SIGNAL(triggered(bool)),
+ refreshAct, SLOT(setDisabled(bool)));
+
+ fallbacksAct = new QAction(tr("&Fallbacks"), this);
+ fallbacksAct->setShortcut(tr("Ctrl+F"));
+ fallbacksAct->setCheckable(true);
+ fallbacksAct->setEnabled(false);
+ connect(fallbacksAct, SIGNAL(triggered(bool)),
+ settingsTree, SLOT(setFallbacksEnabled(bool)));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+#ifndef Q_WS_MAC
+ openPropertyListAct->setEnabled(false);
+#endif
+#ifndef Q_WS_WIN
+ openRegistryPathAct->setEnabled(false);
+#endif
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openSettingsAct);
+ fileMenu->addAction(openIniFileAct);
+ fileMenu->addAction(openPropertyListAct);
+ fileMenu->addAction(openRegistryPathAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(refreshAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ optionsMenu = menuBar()->addMenu(tr("&Options"));
+ optionsMenu->addAction(autoRefreshAct);
+ optionsMenu->addAction(fallbacksAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::setSettingsObject(QSettings *settings)
+{
+ settings->setFallbacksEnabled(fallbacksAct->isChecked());
+ settingsTree->setSettingsObject(settings);
+
+ refreshAct->setEnabled(true);
+ autoRefreshAct->setEnabled(true);
+
+ QString niceName = settings->fileName();
+ niceName.replace("\\", "/");
+ int pos = niceName.lastIndexOf("/");
+ if (pos != -1)
+ niceName.remove(0, pos + 1);
+
+ if (!settings->isWritable())
+ niceName = tr("%1 (read only)").arg(niceName);
+
+ setWindowTitle(tr("%1 - %2").arg(niceName).arg(tr("Settings Editor")));
+}
diff --git a/examples/tools/settingseditor/mainwindow.h b/examples/tools/settingseditor/mainwindow.h
new file mode 100644
index 0000000..749602d
--- /dev/null
+++ b/examples/tools/settingseditor/mainwindow.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+class QSettings;
+QT_END_NAMESPACE
+class LocationDialog;
+class SettingsTree;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void openSettings();
+ void openIniFile();
+ void openPropertyList();
+ void openRegistryPath();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ void setSettingsObject(QSettings *settings);
+
+ SettingsTree *settingsTree;
+ LocationDialog *locationDialog;
+
+ QMenu *fileMenu;
+ QMenu *optionsMenu;
+ QMenu *helpMenu;
+ QAction *openSettingsAct;
+ QAction *openIniFileAct;
+ QAction *openPropertyListAct;
+ QAction *openRegistryPathAct;
+ QAction *refreshAct;
+ QAction *exitAct;
+ QAction *autoRefreshAct;
+ QAction *fallbacksAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/tools/settingseditor/settingseditor.pro b/examples/tools/settingseditor/settingseditor.pro
new file mode 100644
index 0000000..321c2bb
--- /dev/null
+++ b/examples/tools/settingseditor/settingseditor.pro
@@ -0,0 +1,15 @@
+HEADERS = locationdialog.h \
+ mainwindow.h \
+ settingstree.h \
+ variantdelegate.h
+SOURCES = locationdialog.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ settingstree.cpp \
+ variantdelegate.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS settingseditor.pro inifiles
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor
+INSTALLS += target sources
diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp
new file mode 100644
index 0000000..82d32fd
--- /dev/null
+++ b/examples/tools/settingseditor/settingstree.cpp
@@ -0,0 +1,263 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "settingstree.h"
+#include "variantdelegate.h"
+
+SettingsTree::SettingsTree(QWidget *parent)
+ : QTreeWidget(parent)
+{
+ setItemDelegate(new VariantDelegate(this));
+
+ QStringList labels;
+ labels << tr("Setting") << tr("Type") << tr("Value");
+ setHeaderLabels(labels);
+ header()->setResizeMode(0, QHeaderView::Stretch);
+ header()->setResizeMode(2, QHeaderView::Stretch);
+
+ settings = 0;
+ refreshTimer.setInterval(2000);
+ autoRefresh = false;
+
+ groupIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirClosedIcon),
+ QIcon::Normal, QIcon::Off);
+ groupIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirOpenIcon),
+ QIcon::Normal, QIcon::On);
+ keyIcon.addPixmap(style()->standardPixmap(QStyle::SP_FileIcon));
+
+ connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(maybeRefresh()));
+}
+
+void SettingsTree::setSettingsObject(QSettings *settings)
+{
+ delete this->settings;
+ this->settings = settings;
+ clear();
+
+ if (settings) {
+ settings->setParent(this);
+ refresh();
+ if (autoRefresh)
+ refreshTimer.start();
+ } else {
+ refreshTimer.stop();
+ }
+}
+
+QSize SettingsTree::sizeHint() const
+{
+ return QSize(800, 600);
+}
+
+void SettingsTree::setAutoRefresh(bool autoRefresh)
+{
+ this->autoRefresh = autoRefresh;
+ if (settings) {
+ if (autoRefresh) {
+ maybeRefresh();
+ refreshTimer.start();
+ } else {
+ refreshTimer.stop();
+ }
+ }
+}
+
+void SettingsTree::setFallbacksEnabled(bool enabled)
+{
+ if (settings) {
+ settings->setFallbacksEnabled(enabled);
+ refresh();
+ }
+}
+
+void SettingsTree::maybeRefresh()
+{
+ if (state() != EditingState)
+ refresh();
+}
+
+void SettingsTree::refresh()
+{
+ if (!settings)
+ return;
+
+ disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+ this, SLOT(updateSetting(QTreeWidgetItem *)));
+
+ settings->sync();
+ updateChildItems(0);
+
+ connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+ this, SLOT(updateSetting(QTreeWidgetItem *)));
+}
+
+bool SettingsTree::event(QEvent *event)
+{
+ if (event->type() == QEvent::WindowActivate) {
+ if (isActiveWindow() && autoRefresh)
+ maybeRefresh();
+ }
+ return QTreeWidget::event(event);
+}
+
+void SettingsTree::updateSetting(QTreeWidgetItem *item)
+{
+ QString key = item->text(0);
+ QTreeWidgetItem *ancestor = item->parent();
+ while (ancestor) {
+ key.prepend(ancestor->text(0) + "/");
+ ancestor = ancestor->parent();
+ }
+
+ settings->setValue(key, item->data(2, Qt::UserRole));
+ if (autoRefresh)
+ refresh();
+}
+
+void SettingsTree::updateChildItems(QTreeWidgetItem *parent)
+{
+ int dividerIndex = 0;
+
+ foreach (QString group, settings->childGroups()) {
+ QTreeWidgetItem *child;
+ int childIndex = findChild(parent, group, dividerIndex);
+ if (childIndex != -1) {
+ child = childAt(parent, childIndex);
+ child->setText(1, "");
+ child->setText(2, "");
+ child->setData(2, Qt::UserRole, QVariant());
+ moveItemForward(parent, childIndex, dividerIndex);
+ } else {
+ child = createItem(group, parent, dividerIndex);
+ }
+ child->setIcon(0, groupIcon);
+ ++dividerIndex;
+
+ settings->beginGroup(group);
+ updateChildItems(child);
+ settings->endGroup();
+ }
+
+ foreach (QString key, settings->childKeys()) {
+ QTreeWidgetItem *child;
+ int childIndex = findChild(parent, key, 0);
+
+ if (childIndex == -1 || childIndex >= dividerIndex) {
+ if (childIndex != -1) {
+ child = childAt(parent, childIndex);
+ for (int i = 0; i < child->childCount(); ++i)
+ delete childAt(child, i);
+ moveItemForward(parent, childIndex, dividerIndex);
+ } else {
+ child = createItem(key, parent, dividerIndex);
+ }
+ child->setIcon(0, keyIcon);
+ ++dividerIndex;
+ } else {
+ child = childAt(parent, childIndex);
+ }
+
+ QVariant value = settings->value(key);
+ if (value.type() == QVariant::Invalid) {
+ child->setText(1, "Invalid");
+ } else {
+ child->setText(1, value.typeName());
+ }
+ child->setText(2, VariantDelegate::displayText(value));
+ child->setData(2, Qt::UserRole, value);
+ }
+
+ while (dividerIndex < childCount(parent))
+ delete childAt(parent, dividerIndex);
+}
+
+QTreeWidgetItem *SettingsTree::createItem(const QString &text,
+ QTreeWidgetItem *parent, int index)
+{
+ QTreeWidgetItem *after = 0;
+ if (index != 0)
+ after = childAt(parent, index - 1);
+
+ QTreeWidgetItem *item;
+ if (parent)
+ item = new QTreeWidgetItem(parent, after);
+ else
+ item = new QTreeWidgetItem(this, after);
+
+ item->setText(0, text);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
+ return item;
+}
+
+QTreeWidgetItem *SettingsTree::childAt(QTreeWidgetItem *parent, int index)
+{
+ if (parent)
+ return parent->child(index);
+ else
+ return topLevelItem(index);
+}
+
+int SettingsTree::childCount(QTreeWidgetItem *parent)
+{
+ if (parent)
+ return parent->childCount();
+ else
+ return topLevelItemCount();
+}
+
+int SettingsTree::findChild(QTreeWidgetItem *parent, const QString &text,
+ int startIndex)
+{
+ for (int i = startIndex; i < childCount(parent); ++i) {
+ if (childAt(parent, i)->text(0) == text)
+ return i;
+ }
+ return -1;
+}
+
+void SettingsTree::moveItemForward(QTreeWidgetItem *parent, int oldIndex,
+ int newIndex)
+{
+ for (int i = 0; i < oldIndex - newIndex; ++i)
+ delete childAt(parent, newIndex);
+}
diff --git a/examples/tools/settingseditor/settingstree.h b/examples/tools/settingseditor/settingstree.h
new file mode 100644
index 0000000..f82034b
--- /dev/null
+++ b/examples/tools/settingseditor/settingstree.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SETTINGSTREE_H
+#define SETTINGSTREE_H
+
+#include <QIcon>
+#include <QTimer>
+#include <QTreeWidget>
+
+QT_BEGIN_NAMESPACE
+class QSettings;
+QT_END_NAMESPACE
+
+class SettingsTree : public QTreeWidget
+{
+ Q_OBJECT
+
+public:
+ SettingsTree(QWidget *parent = 0);
+
+ void setSettingsObject(QSettings *settings);
+ QSize sizeHint() const;
+
+public slots:
+ void setAutoRefresh(bool autoRefresh);
+ void setFallbacksEnabled(bool enabled);
+ void maybeRefresh();
+ void refresh();
+
+protected:
+ bool event(QEvent *event);
+
+private slots:
+ void updateSetting(QTreeWidgetItem *item);
+
+private:
+ void updateChildItems(QTreeWidgetItem *parent);
+ QTreeWidgetItem *createItem(const QString &text, QTreeWidgetItem *parent,
+ int index);
+ QTreeWidgetItem *childAt(QTreeWidgetItem *parent, int index);
+ int childCount(QTreeWidgetItem *parent);
+ int findChild(QTreeWidgetItem *parent, const QString &text, int startIndex);
+ void moveItemForward(QTreeWidgetItem *parent, int oldIndex, int newIndex);
+
+ QSettings *settings;
+ QTimer refreshTimer;
+ bool autoRefresh;
+ QIcon groupIcon;
+ QIcon keyIcon;
+};
+
+#endif
diff --git a/examples/tools/settingseditor/variantdelegate.cpp b/examples/tools/settingseditor/variantdelegate.cpp
new file mode 100644
index 0000000..937a0e1
--- /dev/null
+++ b/examples/tools/settingseditor/variantdelegate.cpp
@@ -0,0 +1,317 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "variantdelegate.h"
+
+VariantDelegate::VariantDelegate(QObject *parent)
+ : QItemDelegate(parent)
+{
+ boolExp.setPattern("true|false");
+ boolExp.setCaseSensitivity(Qt::CaseInsensitive);
+
+ byteArrayExp.setPattern("[\\x00-\\xff]*");
+ charExp.setPattern(".");
+ colorExp.setPattern("\\(([0-9]*),([0-9]*),([0-9]*),([0-9]*)\\)");
+ doubleExp.setPattern("");
+ pointExp.setPattern("\\((-?[0-9]*),(-?[0-9]*)\\)");
+ rectExp.setPattern("\\((-?[0-9]*),(-?[0-9]*),(-?[0-9]*),(-?[0-9]*)\\)");
+ signedIntegerExp.setPattern("-?[0-9]*");
+ sizeExp = pointExp;
+ unsignedIntegerExp.setPattern("[0-9]*");
+
+ dateExp.setPattern("([0-9]{,4})-([0-9]{,2})-([0-9]{,2})");
+ timeExp.setPattern("([0-9]{,2}):([0-9]{,2}):([0-9]{,2})");
+ dateTimeExp.setPattern(dateExp.pattern() + "T" + timeExp.pattern());
+}
+
+void VariantDelegate::paint(QPainter *painter,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index) const
+{
+ if (index.column() == 2) {
+ QVariant value = index.model()->data(index, Qt::UserRole);
+ if (!isSupportedType(value.type())) {
+ QStyleOptionViewItem myOption = option;
+ myOption.state &= ~QStyle::State_Enabled;
+ QItemDelegate::paint(painter, myOption, index);
+ return;
+ }
+ }
+
+ QItemDelegate::paint(painter, option, index);
+}
+
+QWidget *VariantDelegate::createEditor(QWidget *parent,
+ const QStyleOptionViewItem & /* option */,
+ const QModelIndex &index) const
+{
+ if (index.column() != 2)
+ return 0;
+
+ QVariant originalValue = index.model()->data(index, Qt::UserRole);
+ if (!isSupportedType(originalValue.type()))
+ return 0;
+
+ QLineEdit *lineEdit = new QLineEdit(parent);
+ lineEdit->setFrame(false);
+
+ QRegExp regExp;
+
+ switch (originalValue.type()) {
+ case QVariant::Bool:
+ regExp = boolExp;
+ break;
+ case QVariant::ByteArray:
+ regExp = byteArrayExp;
+ break;
+ case QVariant::Char:
+ regExp = charExp;
+ break;
+ case QVariant::Color:
+ regExp = colorExp;
+ break;
+ case QVariant::Date:
+ regExp = dateExp;
+ break;
+ case QVariant::DateTime:
+ regExp = dateTimeExp;
+ break;
+ case QVariant::Double:
+ regExp = doubleExp;
+ break;
+ case QVariant::Int:
+ case QVariant::LongLong:
+ regExp = signedIntegerExp;
+ break;
+ case QVariant::Point:
+ regExp = pointExp;
+ break;
+ case QVariant::Rect:
+ regExp = rectExp;
+ break;
+ case QVariant::Size:
+ regExp = sizeExp;
+ break;
+ case QVariant::Time:
+ regExp = timeExp;
+ break;
+ case QVariant::UInt:
+ case QVariant::ULongLong:
+ regExp = unsignedIntegerExp;
+ break;
+ default:
+ ;
+ }
+
+ if (!regExp.isEmpty()) {
+ QValidator *validator = new QRegExpValidator(regExp, lineEdit);
+ lineEdit->setValidator(validator);
+ }
+
+ return lineEdit;
+}
+
+void VariantDelegate::setEditorData(QWidget *editor,
+ const QModelIndex &index) const
+{
+ QVariant value = index.model()->data(index, Qt::UserRole);
+ if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor))
+ lineEdit->setText(displayText(value));
+}
+
+void VariantDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const
+{
+ QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor);
+ if (!lineEdit->isModified())
+ return;
+
+ QString text = lineEdit->text();
+ const QValidator *validator = lineEdit->validator();
+ if (validator) {
+ int pos;
+ if (validator->validate(text, pos) != QValidator::Acceptable)
+ return;
+ }
+
+ QVariant originalValue = index.model()->data(index, Qt::UserRole);
+ QVariant value;
+
+ switch (originalValue.type()) {
+ case QVariant::Char:
+ value = text.at(0);
+ break;
+ case QVariant::Color:
+ colorExp.exactMatch(text);
+ value = QColor(qMin(colorExp.cap(1).toInt(), 255),
+ qMin(colorExp.cap(2).toInt(), 255),
+ qMin(colorExp.cap(3).toInt(), 255),
+ qMin(colorExp.cap(4).toInt(), 255));
+ break;
+ case QVariant::Date:
+ {
+ QDate date = QDate::fromString(text, Qt::ISODate);
+ if (!date.isValid())
+ return;
+ value = date;
+ }
+ break;
+ case QVariant::DateTime:
+ {
+ QDateTime dateTime = QDateTime::fromString(text, Qt::ISODate);
+ if (!dateTime.isValid())
+ return;
+ value = dateTime;
+ }
+ break;
+ case QVariant::Point:
+ pointExp.exactMatch(text);
+ value = QPoint(pointExp.cap(1).toInt(), pointExp.cap(2).toInt());
+ break;
+ case QVariant::Rect:
+ rectExp.exactMatch(text);
+ value = QRect(rectExp.cap(1).toInt(), rectExp.cap(2).toInt(),
+ rectExp.cap(3).toInt(), rectExp.cap(4).toInt());
+ break;
+ case QVariant::Size:
+ sizeExp.exactMatch(text);
+ value = QSize(sizeExp.cap(1).toInt(), sizeExp.cap(2).toInt());
+ break;
+ case QVariant::StringList:
+ value = text.split(",");
+ break;
+ case QVariant::Time:
+ {
+ QTime time = QTime::fromString(text, Qt::ISODate);
+ if (!time.isValid())
+ return;
+ value = time;
+ }
+ break;
+ default:
+ value = text;
+ value.convert(originalValue.type());
+ }
+
+ model->setData(index, displayText(value), Qt::DisplayRole);
+ model->setData(index, value, Qt::UserRole);
+}
+
+bool VariantDelegate::isSupportedType(QVariant::Type type)
+{
+ switch (type) {
+ case QVariant::Bool:
+ case QVariant::ByteArray:
+ case QVariant::Char:
+ case QVariant::Color:
+ case QVariant::Date:
+ case QVariant::DateTime:
+ case QVariant::Double:
+ case QVariant::Int:
+ case QVariant::LongLong:
+ case QVariant::Point:
+ case QVariant::Rect:
+ case QVariant::Size:
+ case QVariant::String:
+ case QVariant::StringList:
+ case QVariant::Time:
+ case QVariant::UInt:
+ case QVariant::ULongLong:
+ return true;
+ default:
+ return false;
+ }
+}
+
+QString VariantDelegate::displayText(const QVariant &value)
+{
+ switch (value.type()) {
+ case QVariant::Bool:
+ case QVariant::ByteArray:
+ case QVariant::Char:
+ case QVariant::Double:
+ case QVariant::Int:
+ case QVariant::LongLong:
+ case QVariant::String:
+ case QVariant::UInt:
+ case QVariant::ULongLong:
+ return value.toString();
+ case QVariant::Color:
+ {
+ QColor color = qvariant_cast<QColor>(value);
+ return QString("(%1,%2,%3,%4)")
+ .arg(color.red()).arg(color.green())
+ .arg(color.blue()).arg(color.alpha());
+ }
+ case QVariant::Date:
+ return value.toDate().toString(Qt::ISODate);
+ case QVariant::DateTime:
+ return value.toDateTime().toString(Qt::ISODate);
+ case QVariant::Invalid:
+ return "<Invalid>";
+ case QVariant::Point:
+ {
+ QPoint point = value.toPoint();
+ return QString("(%1,%2)").arg(point.x()).arg(point.y());
+ }
+ case QVariant::Rect:
+ {
+ QRect rect = value.toRect();
+ return QString("(%1,%2,%3,%4)")
+ .arg(rect.x()).arg(rect.y())
+ .arg(rect.width()).arg(rect.height());
+ }
+ case QVariant::Size:
+ {
+ QSize size = value.toSize();
+ return QString("(%1,%2)").arg(size.width()).arg(size.height());
+ }
+ case QVariant::StringList:
+ return value.toStringList().join(",");
+ case QVariant::Time:
+ return value.toTime().toString(Qt::ISODate);
+ default:
+ break;
+ }
+ return QString("<%1>").arg(value.typeName());
+}
diff --git a/examples/tools/settingseditor/variantdelegate.h b/examples/tools/settingseditor/variantdelegate.h
new file mode 100644
index 0000000..60997f7
--- /dev/null
+++ b/examples/tools/settingseditor/variantdelegate.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VARIANTDELEGATE_H
+#define VARIANTDELEGATE_H
+
+#include <QItemDelegate>
+#include <QRegExp>
+
+class VariantDelegate : public QItemDelegate
+{
+ Q_OBJECT
+
+public:
+ VariantDelegate(QObject *parent = 0);
+
+ void paint(QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const;
+
+ static bool isSupportedType(QVariant::Type type);
+ static QString displayText(const QVariant &value);
+
+private:
+ mutable QRegExp boolExp;
+ mutable QRegExp byteArrayExp;
+ mutable QRegExp charExp;
+ mutable QRegExp colorExp;
+ mutable QRegExp dateExp;
+ mutable QRegExp dateTimeExp;
+ mutable QRegExp doubleExp;
+ mutable QRegExp pointExp;
+ mutable QRegExp rectExp;
+ mutable QRegExp signedIntegerExp;
+ mutable QRegExp sizeExp;
+ mutable QRegExp timeExp;
+ mutable QRegExp unsignedIntegerExp;
+};
+
+#endif
diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro
new file mode 100644
index 0000000..1e84e3c
--- /dev/null
+++ b/examples/tools/styleplugin/plugin/plugin.pro
@@ -0,0 +1,21 @@
+#! [0]
+TEMPLATE = lib
+CONFIG += plugin
+HEADERS = simplestyle.h \
+ simplestyleplugin.h
+SOURCES = simplestyle.cpp \
+ simplestyleplugin.cpp
+TARGET = simplestyleplugin
+#! [0]
+win32 {
+ debug:DESTDIR = ../debug/styles/
+ release:DESTDIR = ../release/styles/
+} else {
+ DESTDIR = ../styles/
+}
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/styles
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/plugin
+INSTALLS += target sources
diff --git a/examples/tools/styleplugin/plugin/simplestyle.cpp b/examples/tools/styleplugin/plugin/simplestyle.cpp
new file mode 100644
index 0000000..900c772
--- /dev/null
+++ b/examples/tools/styleplugin/plugin/simplestyle.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "simplestyle.h"
+
+void SimpleStyle::polish(QPalette &palette)
+{
+ palette.setBrush(QPalette::Button, Qt::red);
+}
diff --git a/examples/tools/styleplugin/plugin/simplestyle.h b/examples/tools/styleplugin/plugin/simplestyle.h
new file mode 100644
index 0000000..f4c499c
--- /dev/null
+++ b/examples/tools/styleplugin/plugin/simplestyle.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SIMPLESTYLE_H
+#define SIMPLESTYLE_H
+
+#include <QWindowsStyle>
+
+QT_BEGIN_NAMESPACE
+class QPalette;
+QT_END_NAMESPACE
+
+class SimpleStyle : public QWindowsStyle
+{
+ Q_OBJECT
+
+public:
+ SimpleStyle() {};
+
+ void polish(QPalette &palette);
+};
+
+#endif
diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.cpp b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
new file mode 100644
index 0000000..6845c81
--- /dev/null
+++ b/examples/tools/styleplugin/plugin/simplestyleplugin.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "simplestyleplugin.h"
+#include "simplestyle.h"
+
+//! [0]
+QStringList SimpleStylePlugin::keys() const
+{
+ return QStringList() << "SimpleStyle";
+}
+//! [0]
+
+//! [1]
+QStyle *SimpleStylePlugin::create(const QString &key)
+{
+ if (key.toLower() == "simplestyle")
+ return new SimpleStyle;
+ return 0;
+}
+//! [1]
+
+QT_BEGIN_NAMESPACE
+Q_EXPORT_PLUGIN2(simplestyleplugin, SimpleStylePlugin)
+QT_END_NAMESPACE
diff --git a/examples/tools/styleplugin/plugin/simplestyleplugin.h b/examples/tools/styleplugin/plugin/simplestyleplugin.h
new file mode 100644
index 0000000..106c4a9
--- /dev/null
+++ b/examples/tools/styleplugin/plugin/simplestyleplugin.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SIMPLESTYLEPLUGIN_H
+#define SIMPLESTYLEPLUGIN_H
+
+#include <QStylePlugin>
+
+QT_BEGIN_NAMESPACE
+class QStringList;
+class QStyle;
+QT_END_NAMESPACE
+
+//! [0]
+class SimpleStylePlugin : public QStylePlugin
+{
+ Q_OBJECT
+
+public:
+ SimpleStylePlugin() {};
+
+ QStringList keys() const;
+ QStyle *create(const QString &key);
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/styleplugin/styleplugin.pro b/examples/tools/styleplugin/styleplugin.pro
new file mode 100644
index 0000000..bf4fa5c
--- /dev/null
+++ b/examples/tools/styleplugin/styleplugin.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+SUBDIRS = stylewindow \
+ plugin
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS styleplugin.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin
+INSTALLS += target sources
diff --git a/examples/tools/styleplugin/stylewindow/main.cpp b/examples/tools/styleplugin/stylewindow/main.cpp
new file mode 100644
index 0000000..b6e69ef
--- /dev/null
+++ b/examples/tools/styleplugin/stylewindow/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stylewindow.h"
+
+//! [0]
+int main(int argv, char *args[])
+{
+ QApplication app(argv, args);
+ QApplication::setStyle(QStyleFactory::create("simplestyle"));
+
+ StyleWindow window;
+ window.resize(200, 50);
+ window.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.cpp b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
new file mode 100644
index 0000000..8a813ba
--- /dev/null
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stylewindow.h"
+
+StyleWindow::StyleWindow()
+{
+ QPushButton *styledButton = new QPushButton(tr("Big Red Button"));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(styledButton);
+
+ QGroupBox *styleBox = new QGroupBox(tr("A simple style button"));
+ styleBox->setLayout(layout);
+
+ QGridLayout *outerLayout = new QGridLayout;
+ outerLayout->addWidget(styleBox, 0, 0);
+ setLayout(outerLayout);
+
+ setWindowTitle(tr("Style Plugin Example"));
+}
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.h b/examples/tools/styleplugin/stylewindow/stylewindow.h
new file mode 100644
index 0000000..5eba751
--- /dev/null
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STYLEWINDOW_H
+#define STYLEWINDOW_H
+
+#include <QWidget>
+
+class StyleWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ StyleWindow();
+};
+
+#endif
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.pro b/examples/tools/styleplugin/stylewindow/stylewindow.pro
new file mode 100644
index 0000000..7c5266d
--- /dev/null
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.pro
@@ -0,0 +1,17 @@
+HEADERS = stylewindow.h
+SOURCES = stylewindow.cpp \
+ main.cpp
+
+TARGET = styleplugin
+win32 {
+ debug:DESTDIR = ../debug/
+ release:DESTDIR = ../release/
+} else {
+ DESTDIR = ../
+}
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stylewindow.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/stylewindow
+INSTALLS += target sources
diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro
new file mode 100644
index 0000000..79f0faa
--- /dev/null
+++ b/examples/tools/tools.pro
@@ -0,0 +1,22 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = codecs \
+ completer \
+ customcompleter \
+ echoplugin \
+ i18n \
+ plugandpaintplugins \
+ plugandpaint \
+ regexp \
+ settingseditor \
+ styleplugin \
+ treemodelcompleter \
+ undoframework
+
+plugandpaint.depends = plugandpaintplugins
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tools.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools
+INSTALLS += target sources
diff --git a/examples/tools/treemodelcompleter/main.cpp b/examples/tools/treemodelcompleter/main.cpp
new file mode 100644
index 0000000..982575e
--- /dev/null
+++ b/examples/tools/treemodelcompleter/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(treemodelcompleter);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp
new file mode 100644
index 0000000..9f69e80
--- /dev/null
+++ b/examples/tools/treemodelcompleter/mainwindow.cpp
@@ -0,0 +1,247 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "treemodelcompleter.h"
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent), completer(0), lineEdit(0)
+{
+ createMenu();
+
+ completer = new TreeModelCompleter(this);
+ completer->setModel(modelFromFile(":/resources/treemodel.txt"));
+ completer->setSeparator(QLatin1String("."));
+ QObject::connect(completer, SIGNAL(highlighted(const QModelIndex&)),
+ this, SLOT(highlight(const QModelIndex&)));
+
+ QWidget *centralWidget = new QWidget;
+
+ QLabel *modelLabel = new QLabel;
+ modelLabel->setText(tr("Tree Model<br>(Double click items to edit)"));
+
+ QLabel *modeLabel = new QLabel;
+ modeLabel->setText(tr("Completion Mode"));
+ modeCombo = new QComboBox;
+ modeCombo->addItem(tr("Inline"));
+ modeCombo->addItem(tr("Filtered Popup"));
+ modeCombo->addItem(tr("Unfiltered Popup"));
+ modeCombo->setCurrentIndex(1);
+
+ QLabel *caseLabel = new QLabel;
+ caseLabel->setText(tr("Case Sensitivity"));
+ caseCombo = new QComboBox;
+ caseCombo->addItem(tr("Case Insensitive"));
+ caseCombo->addItem(tr("Case Sensitive"));
+ caseCombo->setCurrentIndex(0);
+//! [0]
+
+//! [1]
+ QLabel *separatorLabel = new QLabel;
+ separatorLabel->setText(tr("Tree Separator"));
+
+ QLineEdit *separatorLineEdit = new QLineEdit;
+ separatorLineEdit->setText(completer->separator());
+ connect(separatorLineEdit, SIGNAL(textChanged(const QString&)),
+ completer, SLOT(setSeparator(const QString&)));
+
+ QCheckBox *wrapCheckBox = new QCheckBox;
+ wrapCheckBox->setText(tr("Wrap around completions"));
+ wrapCheckBox->setChecked(completer->wrapAround());
+ connect(wrapCheckBox, SIGNAL(clicked(bool)), completer, SLOT(setWrapAround(bool)));
+
+ contentsLabel = new QLabel;
+ contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ connect(separatorLineEdit, SIGNAL(textChanged(const QString&)),
+ this, SLOT(updateContentsLabel(const QString&)));
+
+ treeView = new QTreeView;
+ treeView->setModel(completer->model());
+ treeView->header()->hide();
+ treeView->expandAll();
+//! [1]
+
+//! [2]
+ connect(modeCombo, SIGNAL(activated(int)), this, SLOT(changeMode(int)));
+ connect(caseCombo, SIGNAL(activated(int)), this, SLOT(changeCase(int)));
+
+ lineEdit = new QLineEdit;
+ lineEdit->setCompleter(completer);
+//! [2]
+
+//! [3]
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(modelLabel, 0, 0); layout->addWidget(treeView, 0, 1);
+ layout->addWidget(modeLabel, 1, 0); layout->addWidget(modeCombo, 1, 1);
+ layout->addWidget(caseLabel, 2, 0); layout->addWidget(caseCombo, 2, 1);
+ layout->addWidget(separatorLabel, 3, 0); layout->addWidget(separatorLineEdit, 3, 1);
+ layout->addWidget(wrapCheckBox, 4, 0);
+ layout->addWidget(contentsLabel, 5, 0, 1, 2);
+ layout->addWidget(lineEdit, 6, 0, 1, 2);
+ centralWidget->setLayout(layout);
+ setCentralWidget(centralWidget);
+
+ changeCase(caseCombo->currentIndex());
+ changeMode(modeCombo->currentIndex());
+
+ setWindowTitle(tr("Tree Model Completer"));
+ lineEdit->setFocus();
+}
+//! [3]
+
+//! [4]
+void MainWindow::createMenu()
+{
+ QAction *exitAction = new QAction(tr("Exit"), this);
+ QAction *aboutAct = new QAction(tr("About"), this);
+ QAction *aboutQtAct = new QAction(tr("About Qt"), this);
+
+ connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+
+ QMenu* fileMenu = menuBar()->addMenu(tr("File"));
+ fileMenu->addAction(exitAction);
+
+ QMenu* helpMenu = menuBar()->addMenu(tr("About"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [4]
+
+//! [5]
+void MainWindow::changeMode(int index)
+{
+ QCompleter::CompletionMode mode;
+ if (index == 0)
+ mode = QCompleter::InlineCompletion;
+ else if (index == 1)
+ mode = QCompleter::PopupCompletion;
+ else
+ mode = QCompleter::UnfilteredPopupCompletion;
+
+ completer->setCompletionMode(mode);
+}
+//! [5]
+
+QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
+{
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly))
+ return new QStringListModel(completer);
+
+#ifndef QT_NO_CURSOR
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+#endif
+ QStringList words;
+
+ QStandardItemModel *model = new QStandardItemModel(completer);
+ QVector<QStandardItem *> parents(10);
+ parents[0] = model->invisibleRootItem();
+
+ while (!file.atEnd()) {
+ QString line = file.readLine();
+ QString trimmedLine = line.trimmed();
+ if (line.isEmpty() || trimmedLine.isEmpty())
+ continue;
+
+ QRegExp re("^\\s+");
+ int nonws = re.indexIn(line);
+ int level = 0;
+ if (nonws == -1) {
+ level = 0;
+ } else {
+ if (line.startsWith("\t")) {
+ level = re.cap(0).length();
+ } else {
+ level = re.cap(0).length()/4;
+ }
+ }
+
+ if (level+1 >= parents.size())
+ parents.resize(parents.size()*2);
+
+ QStandardItem *item = new QStandardItem;
+ item->setText(trimmedLine);
+ parents[level]->appendRow(item);
+ parents[level+1] = item;
+ }
+
+#ifndef QT_NO_CURSOR
+ QApplication::restoreOverrideCursor();
+#endif
+
+ return model;
+}
+
+void MainWindow::highlight(const QModelIndex &index)
+{
+ QAbstractItemModel *completionModel = completer->completionModel();
+ QAbstractProxyModel *proxy = qobject_cast<QAbstractProxyModel *>(completionModel);
+ if (!proxy)
+ return;
+ QModelIndex sourceIndex = proxy->mapToSource(index);
+ treeView->selectionModel()->select(sourceIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
+ treeView->scrollTo(index);
+}
+
+//! [6]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About"), tr("This example demonstrates how "
+ "to use a QCompleter with a custom tree model."));
+}
+//! [6]
+
+//! [7]
+void MainWindow::changeCase(int cs)
+{
+ completer->setCaseSensitivity(cs ? Qt::CaseSensitive : Qt::CaseInsensitive);
+}
+//! [7]
+
+void MainWindow::updateContentsLabel(const QString& sep)
+{
+ contentsLabel->setText(QString(tr("Type path from model above with items at each level separated by a '%1'")).arg(sep));
+}
+
diff --git a/examples/tools/treemodelcompleter/mainwindow.h b/examples/tools/treemodelcompleter/mainwindow.h
new file mode 100644
index 0000000..be14c34
--- /dev/null
+++ b/examples/tools/treemodelcompleter/mainwindow.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QModelIndex>
+
+class TreeModelCompleter;
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QComboBox;
+class QLabel;
+class QLineEdit;
+class QProgressBar;
+class QCheckBox;
+class QTreeView;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void about();
+ void changeCase(int);
+ void changeMode(int);
+ void highlight(const QModelIndex&);
+ void updateContentsLabel(const QString&);
+//! [0]
+
+//! [1]
+private:
+ void createMenu();
+ QAbstractItemModel *modelFromFile(const QString& fileName);
+
+ QTreeView *treeView;
+ QComboBox *caseCombo;
+ QComboBox *modeCombo;
+ QLabel *contentsLabel;
+ TreeModelCompleter *completer;
+ QLineEdit *lineEdit;
+};
+//! [1]
+
+#endif // MAINWINDOW_H
diff --git a/examples/tools/treemodelcompleter/resources/treemodel.txt b/examples/tools/treemodelcompleter/resources/treemodel.txt
new file mode 100644
index 0000000..06c9007
--- /dev/null
+++ b/examples/tools/treemodelcompleter/resources/treemodel.txt
@@ -0,0 +1,20 @@
+Parent1
+ Child1
+ GrandChild1
+ GrandChild2
+ GrandChild3
+ GrandGrandChild1
+ Child2
+ GrandChild1
+ GrandGrandChild1
+ GrandChild2
+ Child3
+
+Parent2
+ Child1
+ GrandChild1
+ Child2
+ Child3
+ GrandChild1
+ GrandChild2
+
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.cpp b/examples/tools/treemodelcompleter/treemodelcompleter.cpp
new file mode 100644
index 0000000..c1464b0
--- /dev/null
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "treemodelcompleter.h"
+#include <QStringList>
+
+//! [0]
+TreeModelCompleter::TreeModelCompleter(QObject *parent)
+ : QCompleter(parent)
+{
+}
+//! [0]
+
+//! [1]
+TreeModelCompleter::TreeModelCompleter(QAbstractItemModel *model, QObject *parent)
+ : QCompleter(model, parent)
+{
+}
+//! [1]
+
+void TreeModelCompleter::setSeparator(const QString &separator)
+{
+ sep = separator;
+}
+
+//! [2]
+QString TreeModelCompleter::separator() const
+{
+ return sep;
+}
+//! [2]
+
+//! [3]
+QStringList TreeModelCompleter::splitPath(const QString &path) const
+{
+ if (sep.isNull()) {
+ return QCompleter::splitPath(path);
+ }
+
+ return path.split(sep);
+}
+//! [3]
+
+//! [4]
+QString TreeModelCompleter::pathFromIndex(const QModelIndex &index) const
+{
+ if (sep.isNull()) {
+ return QCompleter::pathFromIndex(index);
+ }
+
+ // navigate up and accumulate data
+ QStringList dataList;
+ for (QModelIndex i = index; i.isValid(); i = i.parent()) {
+ dataList.prepend(model()->data(i, completionRole()).toString());
+ }
+
+ return dataList.join(sep);
+}
+//! [4]
+
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.h b/examples/tools/treemodelcompleter/treemodelcompleter.h
new file mode 100644
index 0000000..51a5902
--- /dev/null
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TREEMODELCOMPLETER_H
+#define TREEMODELCOMPLETER_H
+
+#include <QCompleter>
+
+//! [0]
+class TreeModelCompleter : public QCompleter
+{
+ Q_OBJECT
+ Q_PROPERTY(QString separator READ separator WRITE setSeparator)
+
+public:
+ TreeModelCompleter(QObject *parent = 0);
+ TreeModelCompleter(QAbstractItemModel *model, QObject *parent = 0);
+
+ QString separator() const;
+public slots:
+ void setSeparator(const QString &separator);
+
+protected:
+ QStringList splitPath(const QString &path) const;
+ QString pathFromIndex(const QModelIndex &index) const;
+
+private:
+ QString sep;
+};
+//! [0]
+
+#endif // TREEMODELCOMPLETER_H
+
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.pro b/examples/tools/treemodelcompleter/treemodelcompleter.pro
new file mode 100644
index 0000000..8631e2b
--- /dev/null
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.pro
@@ -0,0 +1,12 @@
+HEADERS = treemodelcompleter.h \
+ mainwindow.h
+SOURCES = treemodelcompleter.cpp \
+ main.cpp \
+ mainwindow.cpp
+RESOURCES = treemodelcompleter.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS treemodelcompleter.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter
+INSTALLS += target sources
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.qrc b/examples/tools/treemodelcompleter/treemodelcompleter.qrc
new file mode 100644
index 0000000..1130fcd
--- /dev/null
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+ <file>resources/treemodel.txt</file>
+</qresource>
+</RCC>
diff --git a/examples/tools/undoframework/commands.cpp b/examples/tools/undoframework/commands.cpp
new file mode 100644
index 0000000..78f0c16
--- /dev/null
+++ b/examples/tools/undoframework/commands.cpp
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "commands.h"
+#include "diagramitem.h"
+
+//! [0]
+MoveCommand::MoveCommand(DiagramItem *diagramItem, const QPointF &oldPos,
+ QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ myDiagramItem = diagramItem;
+ newPos = diagramItem->pos();
+ myOldPos = oldPos;
+}
+//! [0]
+
+//! [1]
+bool MoveCommand::mergeWith(const QUndoCommand *command)
+{
+ const MoveCommand *moveCommand = static_cast<const MoveCommand *>(command);
+ DiagramItem *item = moveCommand->myDiagramItem;
+
+ if (myDiagramItem != item)
+ return false;
+
+ newPos = item->pos();
+ setText(QObject::tr("Move %1")
+ .arg(createCommandString(myDiagramItem, newPos)));
+
+ return true;
+}
+//! [1]
+
+//! [2]
+void MoveCommand::undo()
+{
+ myDiagramItem->setPos(myOldPos);
+ myDiagramItem->scene()->update();
+ setText(QObject::tr("Move %1")
+ .arg(createCommandString(myDiagramItem, newPos)));
+}
+//! [2]
+
+//! [3]
+void MoveCommand::redo()
+{
+ myDiagramItem->setPos(newPos);
+ setText(QObject::tr("Move %1")
+ .arg(createCommandString(myDiagramItem, newPos)));
+}
+//! [3]
+
+//! [4]
+DeleteCommand::DeleteCommand(QGraphicsScene *scene, QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ myGraphicsScene = scene;
+ QList<QGraphicsItem *> list = myGraphicsScene->selectedItems();
+ list.first()->setSelected(false);
+ myDiagramItem = static_cast<DiagramItem *>(list.first());
+ setText(QObject::tr("Delete %1")
+ .arg(createCommandString(myDiagramItem, myDiagramItem->pos())));
+}
+//! [4]
+
+//! [5]
+void DeleteCommand::undo()
+{
+ myGraphicsScene->addItem(myDiagramItem);
+ myGraphicsScene->update();
+}
+//! [5]
+
+//! [6]
+void DeleteCommand::redo()
+{
+ myGraphicsScene->removeItem(myDiagramItem);
+}
+//! [6]
+
+//! [7]
+AddCommand::AddCommand(DiagramItem::DiagramType addType,
+ QGraphicsScene *scene, QUndoCommand *parent)
+ : QUndoCommand(parent)
+{
+ static int itemCount = 0;
+
+ myGraphicsScene = scene;
+ myDiagramItem = new DiagramItem(addType);
+ initialPosition = QPointF((itemCount * 15) % int(scene->width()),
+ (itemCount * 15) % int(scene->height()));
+ scene->update();
+ ++itemCount;
+ setText(QObject::tr("Add %1")
+ .arg(createCommandString(myDiagramItem, initialPosition)));
+}
+//! [7]
+
+//! [8]
+void AddCommand::undo()
+{
+ myGraphicsScene->removeItem(myDiagramItem);
+ myGraphicsScene->update();
+}
+//! [8]
+
+//! [9]
+void AddCommand::redo()
+{
+ myGraphicsScene->addItem(myDiagramItem);
+ myDiagramItem->setPos(initialPosition);
+ myGraphicsScene->clearSelection();
+ myGraphicsScene->update();
+}
+//! [9]
+
+QString createCommandString(DiagramItem *item, const QPointF &pos)
+{
+ return QObject::tr("%1 at (%2, %3)")
+ .arg(item->diagramType() == DiagramItem::Box ? "Box" : "Triangle")
+ .arg(pos.x()).arg(pos.y());
+}
diff --git a/examples/tools/undoframework/commands.h b/examples/tools/undoframework/commands.h
new file mode 100644
index 0000000..17e4f3c
--- /dev/null
+++ b/examples/tools/undoframework/commands.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMMANDS_H
+#define COMMANDS_H
+
+#include <QUndoCommand>
+
+#include "diagramitem.h"
+
+//! [0]
+class MoveCommand : public QUndoCommand
+{
+public:
+ enum { Id = 1234 };
+
+ MoveCommand(DiagramItem *diagramItem, const QPointF &oldPos,
+ QUndoCommand *parent = 0);
+
+ void undo();
+ void redo();
+ bool mergeWith(const QUndoCommand *command);
+ int id() const { return Id; }
+
+private:
+ DiagramItem *myDiagramItem;
+ QPointF myOldPos;
+ QPointF newPos;
+};
+//! [0]
+
+//! [1]
+class DeleteCommand : public QUndoCommand
+{
+public:
+ DeleteCommand(QGraphicsScene *graphicsScene, QUndoCommand *parent = 0);
+
+ void undo();
+ void redo();
+
+private:
+ DiagramItem *myDiagramItem;
+ QGraphicsScene *myGraphicsScene;
+};
+//! [1]
+
+//! [2]
+class AddCommand : public QUndoCommand
+{
+public:
+ AddCommand(DiagramItem::DiagramType addType, QGraphicsScene *graphicsScene,
+ QUndoCommand *parent = 0);
+
+ void undo();
+ void redo();
+
+private:
+ DiagramItem *myDiagramItem;
+ QGraphicsScene *myGraphicsScene;
+ QPointF initialPosition;
+};
+//! [2]
+
+QString createCommandString(DiagramItem *item, const QPointF &point);
+
+#endif
diff --git a/examples/tools/undoframework/diagramitem.cpp b/examples/tools/undoframework/diagramitem.cpp
new file mode 100644
index 0000000..1b4301e
--- /dev/null
+++ b/examples/tools/undoframework/diagramitem.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "diagramitem.h"
+
+DiagramItem::DiagramItem(DiagramType diagramType, QGraphicsItem *item,
+ QGraphicsScene *scene)
+ : QGraphicsPolygonItem(item, scene)
+{
+ if (diagramType == Box) {
+ boxPolygon << QPointF(0, 0) << QPointF(0, 30) << QPointF(30, 30)
+ << QPointF(30, 0) << QPointF(0, 0);
+ setPolygon(boxPolygon);
+ } else {
+ trianglePolygon << QPointF(15, 0) << QPointF(30, 30) << QPointF(0, 30)
+ << QPointF(15, 0);
+ setPolygon(trianglePolygon);
+ }
+
+ QColor color(static_cast<int>(qrand()) % 256,
+ static_cast<int>(qrand()) % 256, static_cast<int>(qrand()) % 256);
+ QBrush brush(color);
+ setBrush(brush);
+ setFlag(QGraphicsItem::ItemIsSelectable);
+ setFlag(QGraphicsItem::ItemIsMovable);
+}
diff --git a/examples/tools/undoframework/diagramitem.h b/examples/tools/undoframework/diagramitem.h
new file mode 100644
index 0000000..68da876
--- /dev/null
+++ b/examples/tools/undoframework/diagramitem.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIAGRAMITEM_H
+#define DIAGRAMITEM_H
+
+#include <QGraphicsPolygonItem>
+
+QT_BEGIN_NAMESPACE
+class QGraphicsItem;
+class QGraphicsScene;
+class QGraphicsSceneMouseEvent;
+class QPointF;
+QT_END_NAMESPACE
+
+class DiagramItem : public QGraphicsPolygonItem
+{
+public:
+ enum { Type = UserType + 1 };
+ enum DiagramType { Box, Triangle };
+
+ DiagramItem(DiagramType diagramType, QGraphicsItem *item = 0,
+ QGraphicsScene *scene = 0);
+
+ DiagramType diagramType() const {
+ return polygon() == boxPolygon ? Box : Triangle;
+ }
+ int type() const { return Type; }
+
+private:
+ QPolygonF boxPolygon;
+ QPolygonF trianglePolygon;
+};
+
+#endif
diff --git a/examples/tools/undoframework/diagramscene.cpp b/examples/tools/undoframework/diagramscene.cpp
new file mode 100644
index 0000000..fcc63c9
--- /dev/null
+++ b/examples/tools/undoframework/diagramscene.cpp
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "diagramscene.h"
+#include "diagramitem.h"
+
+DiagramScene::DiagramScene(QObject *parent)
+ : QGraphicsScene(parent)
+{
+ movingItem = 0;
+}
+
+void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
+{
+ QPointF mousePos(event->buttonDownScenePos(Qt::LeftButton).x(),
+ event->buttonDownScenePos(Qt::LeftButton).y());
+ movingItem = itemAt(mousePos.x(), mousePos.y());
+
+ if (movingItem != 0 && event->button() == Qt::LeftButton) {
+ oldPos = movingItem->pos();
+ }
+
+ clearSelection();
+ QGraphicsScene::mousePressEvent(event);
+}
+
+void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (movingItem != 0 && event->button() == Qt::LeftButton) {
+ if (oldPos != movingItem->pos())
+ emit itemMoved(qgraphicsitem_cast<DiagramItem *>(movingItem),
+ oldPos);
+ movingItem = 0;
+ }
+ QGraphicsScene::mouseReleaseEvent(event);
+}
diff --git a/examples/tools/undoframework/diagramscene.h b/examples/tools/undoframework/diagramscene.h
new file mode 100644
index 0000000..e1537cc
--- /dev/null
+++ b/examples/tools/undoframework/diagramscene.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIAGRAMSCENE_H
+#define DIAGRAMSCENE_H
+
+#include <QObject>
+#include <QGraphicsScene>
+
+class DiagramItem;
+QT_BEGIN_NAMESPACE
+class QGraphicsSceneDragDropEvent;
+class QGraphicsViewItem;
+QT_END_NAMESPACE
+
+//! [0]
+class DiagramScene : public QGraphicsScene
+{
+ Q_OBJECT
+
+public:
+ DiagramScene(QObject *parent = 0);
+
+signals:
+ void itemMoved(DiagramItem *movedItem, const QPointF &movedFromPosition);
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+private:
+ QGraphicsItem *movingItem;
+ QPointF oldPos;
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/undoframework/images/cross.png b/examples/tools/undoframework/images/cross.png
new file mode 100644
index 0000000..09e5e8c
--- /dev/null
+++ b/examples/tools/undoframework/images/cross.png
Binary files differ
diff --git a/examples/tools/undoframework/main.cpp b/examples/tools/undoframework/main.cpp
new file mode 100644
index 0000000..170d292
--- /dev/null
+++ b/examples/tools/undoframework/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+//! [0]
+int main(int argv, char *args[])
+{
+ Q_INIT_RESOURCE(undoframework);
+
+ QApplication app(argv, args);
+
+ MainWindow mainWindow;
+ mainWindow.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
new file mode 100644
index 0000000..f912ff2
--- /dev/null
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -0,0 +1,209 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "diagramscene.h"
+#include "diagramitem.h"
+#include "commands.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ undoStack = new QUndoStack();
+
+ createActions();
+ createMenus();
+
+ createUndoView();
+
+ diagramScene = new DiagramScene();
+ QBrush pixmapBrush(QPixmap(":/images/cross.png").scaled(30, 30));
+ diagramScene->setBackgroundBrush(pixmapBrush);
+ diagramScene->setSceneRect(QRect(0, 0, 500, 500));
+
+ connect(diagramScene, SIGNAL(itemMoved(DiagramItem *, const QPointF &)),
+ this, SLOT(itemMoved(DiagramItem *, const QPointF &)));
+
+ setWindowTitle("Undo Framework");
+ QGraphicsView *view = new QGraphicsView(diagramScene);
+ setCentralWidget(view);
+ resize(700, 500);
+}
+//! [0]
+
+//! [1]
+void MainWindow::createUndoView()
+{
+ undoView = new QUndoView(undoStack);
+ undoView->setWindowTitle(tr("Command List"));
+ undoView->show();
+ undoView->setAttribute(Qt::WA_QuitOnClose, false);
+}
+//! [1]
+
+//! [2]
+void MainWindow::createActions()
+{
+ deleteAction = new QAction(tr("&Delete Item"), this);
+ deleteAction->setShortcut(tr("Del"));
+ connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItem()));
+//! [2] //! [3]
+
+//! [3] //! [4]
+ addBoxAction = new QAction(tr("Add &Box"), this);
+//! [4]
+ addBoxAction->setShortcut(tr("Ctrl+O"));
+ connect(addBoxAction, SIGNAL(triggered()), this, SLOT(addBox()));
+
+ addTriangleAction = new QAction(tr("Add &Triangle"), this);
+ addTriangleAction->setShortcut(tr("Ctrl+T"));
+ connect(addTriangleAction, SIGNAL(triggered()), this, SLOT(addTriangle()));
+
+//! [5]
+ undoAction = undoStack->createUndoAction(this, tr("&Undo"));
+ undoAction->setShortcut(tr("Ctrl+Z"));
+
+ redoAction = undoStack->createRedoAction(this, tr("&Redo"));
+ QList<QKeySequence> redoShortcuts;
+ redoShortcuts << tr("Ctrl+Y") << tr("Shift+Ctrl+Z");
+ redoAction->setShortcuts(redoShortcuts);
+//! [5]
+
+ exitAction = new QAction(tr("E&xit"), this);
+ exitAction->setShortcut(tr("Ctrl+Q"));
+ connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAction = new QAction(tr("&About"), this);
+ QList<QKeySequence> aboutShortcuts;
+ aboutShortcuts << tr("Ctrl+A") << tr("Ctrl+B");
+ aboutAction->setShortcuts(aboutShortcuts);
+ connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
+}
+
+//! [6]
+void MainWindow::createMenus()
+{
+//! [6]
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAction);
+
+//! [7]
+ editMenu = menuBar()->addMenu(tr("&Edit"));
+ editMenu->addAction(undoAction);
+ editMenu->addAction(redoAction);
+ editMenu->addSeparator();
+ editMenu->addAction(deleteAction);
+ connect(editMenu, SIGNAL(aboutToShow()),
+ this, SLOT(itemMenuAboutToShow()));
+ connect(editMenu, SIGNAL(aboutToHide()),
+ this, SLOT(itemMenuAboutToHide()));
+
+//! [7]
+ itemMenu = menuBar()->addMenu(tr("&Item"));
+ itemMenu->addAction(addBoxAction);
+ itemMenu->addAction(addTriangleAction);
+
+ helpMenu = menuBar()->addMenu(tr("&About"));
+ helpMenu->addAction(aboutAction);
+//! [8]
+}
+//! [8]
+
+//! [9]
+void MainWindow::itemMoved(DiagramItem *movedItem,
+ const QPointF &oldPosition)
+{
+ undoStack->push(new MoveCommand(movedItem, oldPosition));
+}
+//! [9]
+
+//! [10]
+void MainWindow::deleteItem()
+{
+ if (diagramScene->selectedItems().isEmpty())
+ return;
+
+ QUndoCommand *deleteCommand = new DeleteCommand(diagramScene);
+ undoStack->push(deleteCommand);
+}
+//! [10]
+
+//! [11]
+void MainWindow::itemMenuAboutToHide()
+{
+ deleteAction->setEnabled(true);
+}
+//! [11]
+
+//! [12]
+void MainWindow::itemMenuAboutToShow()
+{
+ deleteAction->setEnabled(!diagramScene->selectedItems().isEmpty());
+}
+//! [12]
+
+//! [13]
+void MainWindow::addBox()
+{
+ QUndoCommand *addCommand = new AddCommand(DiagramItem::Box, diagramScene);
+ undoStack->push(addCommand);
+}
+//! [13]
+
+//! [14]
+void MainWindow::addTriangle()
+{
+ QUndoCommand *addCommand = new AddCommand(DiagramItem::Triangle,
+ diagramScene);
+ undoStack->push(addCommand);
+}
+//! [14]
+
+//! [15]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Undo"),
+ tr("The <b>Undo</b> example demonstrates how to "
+ "use Qt's undo framework."));
+}
+//! [15]
diff --git a/examples/tools/undoframework/mainwindow.h b/examples/tools/undoframework/mainwindow.h
new file mode 100644
index 0000000..5f08ffc
--- /dev/null
+++ b/examples/tools/undoframework/mainwindow.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QToolBar;
+class QMenu;
+class QUndoStack;
+class QUndoView;
+QT_END_NAMESPACE
+class DiagramScene;
+class DiagramItem;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void itemMoved(DiagramItem *movedDiagram, const QPointF &moveStartPosition);
+
+private slots:
+ void deleteItem();
+ void addBox();
+ void addTriangle();
+ void about();
+ void itemMenuAboutToShow();
+ void itemMenuAboutToHide();
+
+private:
+ void createActions();
+ void createMenus();
+ void createUndoView();
+
+ QAction *deleteAction;
+ QAction *addBoxAction;
+ QAction *addTriangleAction;
+ QAction *undoAction;
+ QAction *redoAction;
+ QAction *exitAction;
+ QAction *aboutAction;
+
+ QMenu *fileMenu;
+ QMenu *editMenu;
+ QMenu *itemMenu;
+ QMenu *helpMenu;
+
+ DiagramScene *diagramScene;
+ QUndoStack *undoStack;
+ QUndoView *undoView;
+};
+//! [0]
+
+#endif
diff --git a/examples/tools/undoframework/undoframework.pro b/examples/tools/undoframework/undoframework.pro
new file mode 100644
index 0000000..42010f5
--- /dev/null
+++ b/examples/tools/undoframework/undoframework.pro
@@ -0,0 +1,16 @@
+HEADERS = commands.h \
+ diagramitem.h \
+ diagramscene.h \
+ mainwindow.h
+SOURCES = commands.cpp \
+ diagramitem.cpp \
+ diagramscene.cpp \
+ main.cpp \
+ mainwindow.cpp
+RESOURCES = undoframework.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS undoframework.pro README images
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework
+INSTALLS += target sources
diff --git a/examples/tools/undoframework/undoframework.qrc b/examples/tools/undoframework/undoframework.qrc
new file mode 100644
index 0000000..6321d94
--- /dev/null
+++ b/examples/tools/undoframework/undoframework.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>images/cross.png</file>
+ </qresource>
+ </RCC>
+
diff --git a/examples/tutorials/README b/examples/tutorials/README
new file mode 100644
index 0000000..0aab263
--- /dev/null
+++ b/examples/tutorials/README
@@ -0,0 +1,37 @@
+Qt is supplied with tutorials that have been written to provide developers
+with an introduction to the Qt API.
+
+The example and demo launcher can be used to explore these tutorials, lets
+you view the documentation in Qt Assistant, and is able to launch each part
+in a series of tutorial programs.
+
+Documentation for tutorials can be found in the Tutorial and Examples section
+of the Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/tutorials/addressbook-fr/README b/examples/tutorials/addressbook-fr/README
new file mode 100644
index 0000000..2d528b5
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/README
@@ -0,0 +1,42 @@
+The Address Book Tutorial shows how to put together a simple yet
+fully-functioning GUI application. The tutorial chapters can be found in the
+Qt documentation, which can be viewed using Qt Assistant or a Web browser.
+
+The tutorial is also available online at
+
+http://doc.trolltech.com/4.4/tutorial.html
+
+All programs corresponding to the chapters in the tutorial should
+automatically be built when Qt is compiled, or will be provided as
+pre-built executables if you have obtained a binary package of Qt.
+
+If you have only compiled the Qt libraries, use the following instructions
+to build the tutorial.
+
+On Linux/Unix:
+
+Typing 'make' in this directory builds all the programs (part1/part1,
+part2/part2, part3/part3 and so on). Typing 'make' in each subdirectory
+builds just that tutorial program.
+
+On Windows:
+
+Create a single Visual Studio project for the tutorial directory in
+the usual way. You can do this by typing the following at the command
+line:
+
+qmake -tp vc
+
+You should now be able to open the project file in Visual Studio and
+build all of the tutorial programs at the same time.
+
+On Mac OS X:
+
+Create an Xcode project with the .pro file in the tutorial directory.
+You can do this by typing the following at the command line:
+
+qmake -spec macx-xcode
+
+Then open the generated Xcode project in Xcode and build it.
+
+Feel free to send comments about the tutorial to qt-bugs@trolltech.com.
diff --git a/examples/tutorials/addressbook-fr/addressbook-fr.pro b/examples/tutorials/addressbook-fr/addressbook-fr.pro
new file mode 100644
index 0000000..2cdd458
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/addressbook-fr.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = part1 part2 part3 part4 part5 part6 part7
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook-fr
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook-fr.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook-fr
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part1/addressbook.cpp b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
new file mode 100644
index 0000000..d0107ba
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part1/addressbook.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [constructor and input fields]
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+//! [constructor and input fields]
+
+//! [layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+//! [layout]
+
+//![setting the layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+//! [setting the layout]
diff --git a/examples/tutorials/addressbook-fr/part1/addressbook.h b/examples/tutorials/addressbook-fr/part1/addressbook.h
new file mode 100644
index 0000000..811fb05
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part1/addressbook.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [class definition]
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+private:
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+};
+//! [class definition]
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part1/main.cpp b/examples/tutorials/addressbook-fr/part1/main.cpp
new file mode 100644
index 0000000..22bfd3e
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part1/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [main function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
+//! [main function]
diff --git a/examples/tutorials/addressbook-fr/part1/part1.pro b/examples/tutorials/addressbook-fr/part1/part1.pro
new file mode 100644
index 0000000..bb181dd
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part1/part1.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
new file mode 100644
index 0000000..ac4b9c1
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+//! [setting readonly 1]
+ nameLine->setReadOnly(true);
+//! [setting readonly 1]
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+//! [setting readonly 2]
+ addressText->setReadOnly(true);
+//! [setting readonly 2]
+
+//! [pushbutton declaration]
+ addButton = new QPushButton(tr("&Add"));
+ addButton->show();
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+//! [pushbutton declaration]
+//! [connecting signals and slots]
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+//! [connecting signals and slots]
+//! [vertical layout]
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton, Qt::AlignTop);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+//! [vertical layout]
+//! [grid layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+//! [grid layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+//! [addContact]
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ submitButton->show();
+ cancelButton->show();
+}
+//! [addContact]
+
+//! [submitContact part1]
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+//! [submitContact part1]
+//! [submitContact part2]
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+//! [submitContact part2]
+//! [submitContact part3]
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+ submitButton->hide();
+ cancelButton->hide();
+}
+//! [submitContact part3]
+//! [cancel]
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ nameLine->setReadOnly(true);
+
+ addressText->setText(oldAddress);
+ addressText->setReadOnly(true);
+
+ addButton->setEnabled(true);
+ submitButton->hide();
+ cancelButton->hide();
+}
+//! [cancel]
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.h b/examples/tutorials/addressbook-fr/part2/addressbook.h
new file mode 100644
index 0000000..c99b373
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+//! [slots]
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [slots]
+
+//! [pushbutton declaration]
+private:
+ QPushButton *addButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+//! [pushbutton declaration]
+
+//! [remaining private variables]
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+};
+//! [remaining private variables]
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part2/main.cpp b/examples/tutorials/addressbook-fr/part2/main.cpp
new file mode 100644
index 0000000..22bfd3e
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part2/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [main function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
+//! [main function]
diff --git a/examples/tutorials/addressbook-fr/part2/part2.pro b/examples/tutorials/addressbook-fr/part2/part2.pro
new file mode 100644
index 0000000..01ce344
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part2/part2.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part2
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part2
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
new file mode 100644
index 0000000..49c5206
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+ addButton->show();
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+//! [navigation pushbuttons]
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+//! [navigation pushbuttons]
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+//! [connecting navigation signals]
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+//! [connecting navigation signals]
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton, Qt::AlignTop);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+//! [navigation layout]
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+//! [ navigation layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+//! [adding navigation layout]
+ mainLayout->addLayout(buttonLayout2, 3, 1);
+//! [adding navigation layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+//! [disabling navigation]
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+//! [disabling navigation]
+ submitButton->show();
+ cancelButton->show();
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and adderss."));
+ return;
+ }
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+//! [enabling navigation]
+ int number = contacts.size();
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+//! [enabling navigation]
+ submitButton->hide();
+ cancelButton->hide();
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+}
+
+//! [next() function]
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [next() function]
+//! [previous() function]
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()){
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [previous() function]
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.h b/examples/tutorials/addressbook-fr/part3/addressbook.h
new file mode 100644
index 0000000..c13dc21
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [navigation functions]
+ void next();
+ void previous();
+//! [navigation functions]
+
+private:
+ QPushButton *addButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+//! [navigation pushbuttons]
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+//! [navigation pushbuttons]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part3/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook-fr/part3/part3.pro b/examples/tutorials/addressbook-fr/part3/part3.pro
new file mode 100644
index 0000000..128c038
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part3/part3.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part3
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part3
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
new file mode 100644
index 0000000..95def9c
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
@@ -0,0 +1,291 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+//! [edit and remove buttons]
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+//! [edit and remove buttons]
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+//! [connecting edit and remove]
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+//! [connecting edit and remove]
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+//! [adding edit and remove to the layout]
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+//! [adding edit and remove to the layout]
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 3, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+//! [editContact() function]
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+//! [editContact() function]
+//! [submitContact() function beginning]
+void AddressBook::submitContact()
+{
+//! [submitContact() function beginning]
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+//! [submitContact() function part1]
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+//! [submitContact() function part1]
+//! [submitContact() function part2]
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [submitContact() function part2]
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+//! [removeContact() function]
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [removeContact() function]
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [update interface() part 1]
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+ break;
+//! [update interface() part 1]
+//! [update interface() part 2]
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number >1 );
+
+ submitButton->hide();
+ cancelButton->hide();
+ break;
+ }
+}
+//! [update interface() part 2]
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.h b/examples/tutorials/addressbook-fr/part4/addressbook.h
new file mode 100644
index 0000000..83c7af3
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+//! [Mode enum]
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+//! [Mode enum]
+
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [edit and remove slots]
+ void editContact();
+ void removeContact();
+//! [edit and remove slots]
+ void next();
+ void previous();
+
+private:
+//! [updateInterface() declaration]
+ void updateInterface(Mode mode);
+//! [updateInterface() declaration]
+ QPushButton *addButton;
+//! [buttons declaration]
+ QPushButton *editButton;
+ QPushButton *removeButton;
+//! [buttons declaration]
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+//! [mode declaration]
+ Mode currentMode;
+//! [mode declaration]
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part4/main.cpp b/examples/tutorials/addressbook-fr/part4/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part4/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook-fr/part4/part4.pro b/examples/tutorials/addressbook-fr/part4/part4.pro
new file mode 100644
index 0000000..23ce3e6
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part4/part4.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part4
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part4
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
new file mode 100644
index 0000000..5afb6b8
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+//! [instantiating findButton]
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+//! [instantiating findButton]
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+//! [instantiating FindDialog]
+ dialog = new FindDialog;
+//! [instantiating FindDialog]
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+//! [signals and slots for find]
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+//! [signals and slots for find]
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+//! [adding findButton to layout]
+ buttonLayout1->addWidget(findButton);
+//! [adding findButton to layout]
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [findContact() function]
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == QDialog::Accepted) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [findContact() function]
+
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+ break;
+ }
+}
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.h b/examples/tutorials/addressbook-fr/part5/addressbook.h
new file mode 100644
index 0000000..04dfa00
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+//! [include finddialog's header]
+#include "finddialog.h"
+//! [include finddialog's header]
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+//! [findContact() declaration]
+ void findContact();
+//! [findContact() declaration]
+ void next();
+ void previous();
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+//! [findButton declaration]
+ QPushButton *findButton;
+//! [findButton declaration]
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+//! [FindDialog declaration]
+ FindDialog *dialog;
+//! [FindDialog declaration]
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part5/finddialog.cpp b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
new file mode 100644
index 0000000..f883950
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/finddialog.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+//! [constructor]
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+//! [constructor]
+//! [findClicked() function]
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+//! [findClicked() function]
+//! [getFindText() function]
+QString FindDialog::getFindText()
+{
+ return findText;
+}
+//! [getFindText() function]
diff --git a/examples/tutorials/addressbook-fr/part5/finddialog.h b/examples/tutorials/addressbook-fr/part5/finddialog.h
new file mode 100644
index 0000000..db60784
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+//! [FindDialog header]
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+//! [FindDialog header]
+#endif
diff --git a/examples/tutorials/addressbook-fr/part5/main.cpp b/examples/tutorials/addressbook-fr/part5/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook-fr/part5/part5.pro b/examples/tutorials/addressbook-fr/part5/part5.pro
new file mode 100644
index 0000000..95123d0
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/part5.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part5
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part5
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
new file mode 100644
index 0000000..b7cd446
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
@@ -0,0 +1,396 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ loadButton = new QPushButton(tr("&Load..."));
+//! [tooltip 1]
+ loadButton->setToolTip(tr("Load contacts from a file"));
+//! [tooltip 1]
+ saveButton = new QPushButton(tr("Sa&ve..."));
+//! [tooltip 2]
+ saveButton->setToolTip(tr("Save contacts to a file"));
+//! [tooltip 2]
+ saveButton->setEnabled(false);
+
+ dialog = new FindDialog;
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
+ connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+ buttonLayout1->addWidget(findButton);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addWidget(loadButton);
+ buttonLayout1->addWidget(saveButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == 1) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+
+ loadButton->setEnabled(false);
+ saveButton->setEnabled(false);
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+
+ loadButton->setEnabled(true);
+ saveButton->setEnabled(number >= 1);
+ break;
+ }
+}
+
+//! [saveToFile() function part1]
+void AddressBook::saveToFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+//! [saveToFile() function part1]
+//! [saveToFile() function part2]
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+//! [saveToFile() function part2]
+//! [saveToFile() function part3]
+ QDataStream out(&file);
+ out.setVersion(QDataStream::Qt_4_5);
+ out << contacts;
+ }
+}
+//! [saveToFile() function part3]
+
+//! [loadFromFile() function part1]
+void AddressBook::loadFromFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+//! [loadFromFile() function part1]
+
+//! [loadFromFile() function part2]
+ if (fileName.isEmpty())
+ return;
+ else {
+
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream in(&file);
+ in.setVersion(QDataStream::Qt_4_5);
+ contacts.empty(); // empty existing contacts
+ in >> contacts;
+//! [loadFromFile() function part2]
+
+//! [loadFromFile() function part3]
+ if (contacts.isEmpty()) {
+ QMessageBox::information(this, tr("No contacts in file"),
+ tr("The file you are attempting to open contains no contacts."));
+ } else {
+ QMap<QString, QString>::iterator i = contacts.begin();
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [loadFromFile() function part3]
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.h b/examples/tutorials/addressbook-fr/part6/addressbook.h
new file mode 100644
index 0000000..5a36af3
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+#include "finddialog.h"
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+ void findContact();
+ void next();
+ void previous();
+//! [save and load functions declaration]
+ void saveToFile();
+ void loadFromFile();
+//! [save and load functions declaration]
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+ QPushButton *findButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+//! [save and load buttons declaration]
+ QPushButton *loadButton;
+ QPushButton *saveButton;
+//! [save and load buttons declaration]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ FindDialog *dialog;
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part6/finddialog.cpp b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
new file mode 100644
index 0000000..e28bbae
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/finddialog.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+
+QString FindDialog::getFindText()
+{
+ return findText;
+}
diff --git a/examples/tutorials/addressbook-fr/part6/finddialog.h b/examples/tutorials/addressbook-fr/part6/finddialog.h
new file mode 100644
index 0000000..c94baad
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part6/main.cpp b/examples/tutorials/addressbook-fr/part6/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook-fr/part6/part6.pro b/examples/tutorials/addressbook-fr/part6/part6.pro
new file mode 100644
index 0000000..dc895613
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/part6.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part6
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part6
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
new file mode 100644
index 0000000..2f81d2b
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
@@ -0,0 +1,449 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ loadButton = new QPushButton(tr("&Load..."));
+ loadButton->setToolTip(tr("Load contacts from a file"));
+ saveButton = new QPushButton(tr("Sa&ve..."));
+ saveButton->setToolTip(tr("Save contacts to a file"));
+ saveButton->setEnabled(false);
+
+ exportButton = new QPushButton(tr("E&xport"));
+ exportButton->setToolTip(tr("Export as vCard"));
+ exportButton->setEnabled(false);
+
+ dialog = new FindDialog;
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
+ connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+ connect(exportButton, SIGNAL(clicked()), this, SLOT(exportAsVCard()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+ buttonLayout1->addWidget(findButton);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addWidget(loadButton);
+ buttonLayout1->addWidget(saveButton);
+ buttonLayout1->addWidget(exportButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == 1) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+
+ loadButton->setEnabled(false);
+ saveButton->setEnabled(false);
+ exportButton->setEnabled(false);
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+
+ exportButton->setEnabled(number >= 1);
+
+ loadButton->setEnabled(true);
+ saveButton->setEnabled(number >= 1);
+ break;
+ }
+}
+
+void AddressBook::saveToFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream out(&file);
+ out.setVersion(QDataStream::Qt_4_3);
+ out << contacts;
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::loadFromFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream in(&file);
+ in.setVersion(QDataStream::Qt_4_3);
+ contacts.empty(); // empty existing contacts
+ in >> contacts;
+
+ QMap<QString, QString>::iterator i = contacts.begin();
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+ }
+
+ updateInterface(NavigationMode);
+}
+
+//! [export function part1]
+void AddressBook::exportAsVCard()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+ QString firstName;
+ QString lastName;
+ QStringList nameList;
+
+ int index = name.indexOf(" ");
+
+ if (index != -1) {
+ nameList = name.split(QRegExp("\\s+"), QString::SkipEmptyParts);
+ firstName = nameList.first();
+ lastName = nameList.last();
+ } else {
+ firstName = name;
+ lastName = "";
+ }
+
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Export Contact"), "",
+ tr("vCard Files (*.vcf);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+//! [export function part1]
+
+//! [export function part2]
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QTextStream out(&file);
+//! [export function part2]
+
+//! [export function part3]
+ out << "BEGIN:VCARD" << "\n";
+ out << "VERSION:2.1" << "\n";
+ out << "N:" << lastName << ";" << firstName << "\n";
+
+ if (!nameList.isEmpty())
+ out << "FN:" << nameList.join(" ") << "\n";
+ else
+ out << "FN:" << firstName << "\n";
+//! [export function part3]
+
+//! [export function part4]
+ address.replace(";", "\\;", Qt::CaseInsensitive);
+ address.replace("\n", ";", Qt::CaseInsensitive);
+ address.replace(",", " ", Qt::CaseInsensitive);
+
+ out << "ADR;HOME:;" << address << "\n";
+ out << "END:VCARD" << "\n";
+
+ QMessageBox::information(this, tr("Export Successful"),
+ tr("\"%1\" has been exported as a vCard.").arg(name));
+}
+//! [export function part4]
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.h b/examples/tutorials/addressbook-fr/part7/addressbook.h
new file mode 100644
index 0000000..3a6ae41
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+#include "finddialog.h"
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+ void findContact();
+ void next();
+ void previous();
+ void saveToFile();
+ void loadFromFile();
+//! [exportAsVCard() declaration]
+ void exportAsVCard();
+//! [exportAsVCard() declaration]
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+ QPushButton *findButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QPushButton *loadButton;
+ QPushButton *saveButton;
+//! [exportButton declaration]
+ QPushButton *exportButton;
+//! [exportButton declaration]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ FindDialog *dialog;
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part7/finddialog.cpp b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
new file mode 100644
index 0000000..e28bbae
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/finddialog.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+
+QString FindDialog::getFindText()
+{
+ return findText;
+}
diff --git a/examples/tutorials/addressbook-fr/part7/finddialog.h b/examples/tutorials/addressbook-fr/part7/finddialog.h
new file mode 100644
index 0000000..c94baad
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook-fr/part7/part7.pro b/examples/tutorials/addressbook-fr/part7/part7.pro
new file mode 100644
index 0000000..a726d91
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/part7.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part7
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part7
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/README b/examples/tutorials/addressbook/README
new file mode 100644
index 0000000..2d528b5
--- /dev/null
+++ b/examples/tutorials/addressbook/README
@@ -0,0 +1,42 @@
+The Address Book Tutorial shows how to put together a simple yet
+fully-functioning GUI application. The tutorial chapters can be found in the
+Qt documentation, which can be viewed using Qt Assistant or a Web browser.
+
+The tutorial is also available online at
+
+http://doc.trolltech.com/4.4/tutorial.html
+
+All programs corresponding to the chapters in the tutorial should
+automatically be built when Qt is compiled, or will be provided as
+pre-built executables if you have obtained a binary package of Qt.
+
+If you have only compiled the Qt libraries, use the following instructions
+to build the tutorial.
+
+On Linux/Unix:
+
+Typing 'make' in this directory builds all the programs (part1/part1,
+part2/part2, part3/part3 and so on). Typing 'make' in each subdirectory
+builds just that tutorial program.
+
+On Windows:
+
+Create a single Visual Studio project for the tutorial directory in
+the usual way. You can do this by typing the following at the command
+line:
+
+qmake -tp vc
+
+You should now be able to open the project file in Visual Studio and
+build all of the tutorial programs at the same time.
+
+On Mac OS X:
+
+Create an Xcode project with the .pro file in the tutorial directory.
+You can do this by typing the following at the command line:
+
+qmake -spec macx-xcode
+
+Then open the generated Xcode project in Xcode and build it.
+
+Feel free to send comments about the tutorial to qt-bugs@trolltech.com.
diff --git a/examples/tutorials/addressbook/addressbook.pro b/examples/tutorials/addressbook/addressbook.pro
new file mode 100644
index 0000000..4607c25
--- /dev/null
+++ b/examples/tutorials/addressbook/addressbook.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = part1 part2 part3 part4 part5 part6 part7
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part1/addressbook.cpp b/examples/tutorials/addressbook/part1/addressbook.cpp
new file mode 100644
index 0000000..d0107ba
--- /dev/null
+++ b/examples/tutorials/addressbook/part1/addressbook.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [constructor and input fields]
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+//! [constructor and input fields]
+
+//! [layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+//! [layout]
+
+//![setting the layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+//! [setting the layout]
diff --git a/examples/tutorials/addressbook/part1/addressbook.h b/examples/tutorials/addressbook/part1/addressbook.h
new file mode 100644
index 0000000..811fb05
--- /dev/null
+++ b/examples/tutorials/addressbook/part1/addressbook.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [class definition]
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+private:
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+};
+//! [class definition]
+
+#endif
diff --git a/examples/tutorials/addressbook/part1/main.cpp b/examples/tutorials/addressbook/part1/main.cpp
new file mode 100644
index 0000000..22bfd3e
--- /dev/null
+++ b/examples/tutorials/addressbook/part1/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [main function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
+//! [main function]
diff --git a/examples/tutorials/addressbook/part1/part1.pro b/examples/tutorials/addressbook/part1/part1.pro
new file mode 100644
index 0000000..bb181dd
--- /dev/null
+++ b/examples/tutorials/addressbook/part1/part1.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part2/addressbook.cpp b/examples/tutorials/addressbook/part2/addressbook.cpp
new file mode 100644
index 0000000..ac4b9c1
--- /dev/null
+++ b/examples/tutorials/addressbook/part2/addressbook.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+//! [setting readonly 1]
+ nameLine->setReadOnly(true);
+//! [setting readonly 1]
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+//! [setting readonly 2]
+ addressText->setReadOnly(true);
+//! [setting readonly 2]
+
+//! [pushbutton declaration]
+ addButton = new QPushButton(tr("&Add"));
+ addButton->show();
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+//! [pushbutton declaration]
+//! [connecting signals and slots]
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+//! [connecting signals and slots]
+//! [vertical layout]
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton, Qt::AlignTop);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+//! [vertical layout]
+//! [grid layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+//! [grid layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+//! [addContact]
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ submitButton->show();
+ cancelButton->show();
+}
+//! [addContact]
+
+//! [submitContact part1]
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+//! [submitContact part1]
+//! [submitContact part2]
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+//! [submitContact part2]
+//! [submitContact part3]
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+ submitButton->hide();
+ cancelButton->hide();
+}
+//! [submitContact part3]
+//! [cancel]
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ nameLine->setReadOnly(true);
+
+ addressText->setText(oldAddress);
+ addressText->setReadOnly(true);
+
+ addButton->setEnabled(true);
+ submitButton->hide();
+ cancelButton->hide();
+}
+//! [cancel]
diff --git a/examples/tutorials/addressbook/part2/addressbook.h b/examples/tutorials/addressbook/part2/addressbook.h
new file mode 100644
index 0000000..c99b373
--- /dev/null
+++ b/examples/tutorials/addressbook/part2/addressbook.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+//! [slots]
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [slots]
+
+//! [pushbutton declaration]
+private:
+ QPushButton *addButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+//! [pushbutton declaration]
+
+//! [remaining private variables]
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+};
+//! [remaining private variables]
+
+#endif
diff --git a/examples/tutorials/addressbook/part2/main.cpp b/examples/tutorials/addressbook/part2/main.cpp
new file mode 100644
index 0000000..22bfd3e
--- /dev/null
+++ b/examples/tutorials/addressbook/part2/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+//! [main function]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
+//! [main function]
diff --git a/examples/tutorials/addressbook/part2/part2.pro b/examples/tutorials/addressbook/part2/part2.pro
new file mode 100644
index 0000000..01ce344
--- /dev/null
+++ b/examples/tutorials/addressbook/part2/part2.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part2
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part2
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
new file mode 100644
index 0000000..49c5206
--- /dev/null
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+ addButton->show();
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+//! [navigation pushbuttons]
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+//! [navigation pushbuttons]
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+//! [connecting navigation signals]
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+//! [connecting navigation signals]
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton, Qt::AlignTop);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+//! [navigation layout]
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+//! [ navigation layout]
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+//! [adding navigation layout]
+ mainLayout->addLayout(buttonLayout2, 3, 1);
+//! [adding navigation layout]
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+//! [disabling navigation]
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+//! [disabling navigation]
+ submitButton->show();
+ cancelButton->show();
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and adderss."));
+ return;
+ }
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+//! [enabling navigation]
+ int number = contacts.size();
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+//! [enabling navigation]
+ submitButton->hide();
+ cancelButton->hide();
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+}
+
+//! [next() function]
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [next() function]
+//! [previous() function]
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()){
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [previous() function]
diff --git a/examples/tutorials/addressbook/part3/addressbook.h b/examples/tutorials/addressbook/part3/addressbook.h
new file mode 100644
index 0000000..c13dc21
--- /dev/null
+++ b/examples/tutorials/addressbook/part3/addressbook.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [navigation functions]
+ void next();
+ void previous();
+//! [navigation functions]
+
+private:
+ QPushButton *addButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+//! [navigation pushbuttons]
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+//! [navigation pushbuttons]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part3/main.cpp b/examples/tutorials/addressbook/part3/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook/part3/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook/part3/part3.pro b/examples/tutorials/addressbook/part3/part3.pro
new file mode 100644
index 0000000..128c038
--- /dev/null
+++ b/examples/tutorials/addressbook/part3/part3.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part3
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part3
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
new file mode 100644
index 0000000..95def9c
--- /dev/null
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -0,0 +1,291 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+//! [edit and remove buttons]
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+//! [edit and remove buttons]
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+//! [connecting edit and remove]
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+//! [connecting edit and remove]
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+//! [adding edit and remove to the layout]
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+//! [adding edit and remove to the layout]
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 3, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+//! [editContact() function]
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+//! [editContact() function]
+//! [submitContact() function beginning]
+void AddressBook::submitContact()
+{
+//! [submitContact() function beginning]
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+//! [submitContact() function part1]
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+//! [submitContact() function part1]
+//! [submitContact() function part2]
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [submitContact() function part2]
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+//! [removeContact() function]
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [removeContact() function]
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [update interface() part 1]
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+ break;
+//! [update interface() part 1]
+//! [update interface() part 2]
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number >1 );
+
+ submitButton->hide();
+ cancelButton->hide();
+ break;
+ }
+}
+//! [update interface() part 2]
diff --git a/examples/tutorials/addressbook/part4/addressbook.h b/examples/tutorials/addressbook/part4/addressbook.h
new file mode 100644
index 0000000..83c7af3
--- /dev/null
+++ b/examples/tutorials/addressbook/part4/addressbook.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+//! [Mode enum]
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+//! [Mode enum]
+
+public slots:
+ void addContact();
+ void submitContact();
+ void cancel();
+//! [edit and remove slots]
+ void editContact();
+ void removeContact();
+//! [edit and remove slots]
+ void next();
+ void previous();
+
+private:
+//! [updateInterface() declaration]
+ void updateInterface(Mode mode);
+//! [updateInterface() declaration]
+ QPushButton *addButton;
+//! [buttons declaration]
+ QPushButton *editButton;
+ QPushButton *removeButton;
+//! [buttons declaration]
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ QString oldName;
+ QString oldAddress;
+//! [mode declaration]
+ Mode currentMode;
+//! [mode declaration]
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part4/main.cpp b/examples/tutorials/addressbook/part4/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook/part4/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook/part4/part4.pro b/examples/tutorials/addressbook/part4/part4.pro
new file mode 100644
index 0000000..23ce3e6
--- /dev/null
+++ b/examples/tutorials/addressbook/part4/part4.pro
@@ -0,0 +1,9 @@
+SOURCES = addressbook.cpp \
+ main.cpp
+HEADERS = addressbook.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part4
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part4
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
new file mode 100644
index 0000000..5afb6b8
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+//! [instantiating findButton]
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+//! [instantiating findButton]
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+//! [instantiating FindDialog]
+ dialog = new FindDialog;
+//! [instantiating FindDialog]
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+//! [signals and slots for find]
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+//! [signals and slots for find]
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+//! [adding findButton to layout]
+ buttonLayout1->addWidget(findButton);
+//! [adding findButton to layout]
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+//! [findContact() function]
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == QDialog::Accepted) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [findContact() function]
+
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+ break;
+ }
+}
diff --git a/examples/tutorials/addressbook/part5/addressbook.h b/examples/tutorials/addressbook/part5/addressbook.h
new file mode 100644
index 0000000..04dfa00
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/addressbook.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+//! [include finddialog's header]
+#include "finddialog.h"
+//! [include finddialog's header]
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+//! [findContact() declaration]
+ void findContact();
+//! [findContact() declaration]
+ void next();
+ void previous();
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+//! [findButton declaration]
+ QPushButton *findButton;
+//! [findButton declaration]
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+//! [FindDialog declaration]
+ FindDialog *dialog;
+//! [FindDialog declaration]
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part5/finddialog.cpp b/examples/tutorials/addressbook/part5/finddialog.cpp
new file mode 100644
index 0000000..f883950
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/finddialog.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+//! [constructor]
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+//! [constructor]
+//! [findClicked() function]
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+//! [findClicked() function]
+//! [getFindText() function]
+QString FindDialog::getFindText()
+{
+ return findText;
+}
+//! [getFindText() function]
diff --git a/examples/tutorials/addressbook/part5/finddialog.h b/examples/tutorials/addressbook/part5/finddialog.h
new file mode 100644
index 0000000..db60784
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+//! [FindDialog header]
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+//! [FindDialog header]
+#endif
diff --git a/examples/tutorials/addressbook/part5/main.cpp b/examples/tutorials/addressbook/part5/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook/part5/part5.pro b/examples/tutorials/addressbook/part5/part5.pro
new file mode 100644
index 0000000..95123d0
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/part5.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part5
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part5
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
new file mode 100644
index 0000000..b7cd446
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -0,0 +1,396 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ loadButton = new QPushButton(tr("&Load..."));
+//! [tooltip 1]
+ loadButton->setToolTip(tr("Load contacts from a file"));
+//! [tooltip 1]
+ saveButton = new QPushButton(tr("Sa&ve..."));
+//! [tooltip 2]
+ saveButton->setToolTip(tr("Save contacts to a file"));
+//! [tooltip 2]
+ saveButton->setEnabled(false);
+
+ dialog = new FindDialog;
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
+ connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+ buttonLayout1->addWidget(findButton);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addWidget(loadButton);
+ buttonLayout1->addWidget(saveButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == 1) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+
+ loadButton->setEnabled(false);
+ saveButton->setEnabled(false);
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+
+ loadButton->setEnabled(true);
+ saveButton->setEnabled(number >= 1);
+ break;
+ }
+}
+
+//! [saveToFile() function part1]
+void AddressBook::saveToFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+//! [saveToFile() function part1]
+//! [saveToFile() function part2]
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+//! [saveToFile() function part2]
+//! [saveToFile() function part3]
+ QDataStream out(&file);
+ out.setVersion(QDataStream::Qt_4_5);
+ out << contacts;
+ }
+}
+//! [saveToFile() function part3]
+
+//! [loadFromFile() function part1]
+void AddressBook::loadFromFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+//! [loadFromFile() function part1]
+
+//! [loadFromFile() function part2]
+ if (fileName.isEmpty())
+ return;
+ else {
+
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream in(&file);
+ in.setVersion(QDataStream::Qt_4_5);
+ contacts.empty(); // empty existing contacts
+ in >> contacts;
+//! [loadFromFile() function part2]
+
+//! [loadFromFile() function part3]
+ if (contacts.isEmpty()) {
+ QMessageBox::information(this, tr("No contacts in file"),
+ tr("The file you are attempting to open contains no contacts."));
+ } else {
+ QMap<QString, QString>::iterator i = contacts.begin();
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+//! [loadFromFile() function part3]
diff --git a/examples/tutorials/addressbook/part6/addressbook.h b/examples/tutorials/addressbook/part6/addressbook.h
new file mode 100644
index 0000000..5a36af3
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/addressbook.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+#include "finddialog.h"
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+ void findContact();
+ void next();
+ void previous();
+//! [save and load functions declaration]
+ void saveToFile();
+ void loadFromFile();
+//! [save and load functions declaration]
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+ QPushButton *findButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+//! [save and load buttons declaration]
+ QPushButton *loadButton;
+ QPushButton *saveButton;
+//! [save and load buttons declaration]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ FindDialog *dialog;
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part6/finddialog.cpp b/examples/tutorials/addressbook/part6/finddialog.cpp
new file mode 100644
index 0000000..e28bbae
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/finddialog.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+
+QString FindDialog::getFindText()
+{
+ return findText;
+}
diff --git a/examples/tutorials/addressbook/part6/finddialog.h b/examples/tutorials/addressbook/part6/finddialog.h
new file mode 100644
index 0000000..c94baad
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part6/main.cpp b/examples/tutorials/addressbook/part6/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook/part6/part6.pro b/examples/tutorials/addressbook/part6/part6.pro
new file mode 100644
index 0000000..dc895613
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/part6.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part6
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part6
+INSTALLS += target sources
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
new file mode 100644
index 0000000..2f81d2b
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -0,0 +1,449 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+AddressBook::AddressBook(QWidget *parent)
+ : QWidget(parent)
+{
+ QLabel *nameLabel = new QLabel(tr("Name:"));
+ nameLine = new QLineEdit;
+ nameLine->setReadOnly(true);
+
+ QLabel *addressLabel = new QLabel(tr("Address:"));
+ addressText = new QTextEdit;
+ addressText->setReadOnly(true);
+
+ addButton = new QPushButton(tr("&Add"));
+
+ editButton = new QPushButton(tr("&Edit"));
+ editButton->setEnabled(false);
+ removeButton = new QPushButton(tr("&Remove"));
+ removeButton->setEnabled(false);
+ findButton = new QPushButton(tr("&Find"));
+ findButton->setEnabled(false);
+ submitButton = new QPushButton(tr("&Submit"));
+ submitButton->hide();
+ cancelButton = new QPushButton(tr("&Cancel"));
+ cancelButton->hide();
+
+ nextButton = new QPushButton(tr("&Next"));
+ nextButton->setEnabled(false);
+ previousButton = new QPushButton(tr("&Previous"));
+ previousButton->setEnabled(false);
+
+ loadButton = new QPushButton(tr("&Load..."));
+ loadButton->setToolTip(tr("Load contacts from a file"));
+ saveButton = new QPushButton(tr("Sa&ve..."));
+ saveButton->setToolTip(tr("Save contacts to a file"));
+ saveButton->setEnabled(false);
+
+ exportButton = new QPushButton(tr("E&xport"));
+ exportButton->setToolTip(tr("Export as vCard"));
+ exportButton->setEnabled(false);
+
+ dialog = new FindDialog;
+
+ connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
+ connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
+ connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+ connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
+ connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
+ connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+ connect(exportButton, SIGNAL(clicked()), this, SLOT(exportAsVCard()));
+
+ QVBoxLayout *buttonLayout1 = new QVBoxLayout;
+ buttonLayout1->addWidget(addButton);
+ buttonLayout1->addWidget(editButton);
+ buttonLayout1->addWidget(removeButton);
+ buttonLayout1->addWidget(findButton);
+ buttonLayout1->addWidget(submitButton);
+ buttonLayout1->addWidget(cancelButton);
+ buttonLayout1->addWidget(loadButton);
+ buttonLayout1->addWidget(saveButton);
+ buttonLayout1->addWidget(exportButton);
+ buttonLayout1->addStretch();
+
+ QHBoxLayout *buttonLayout2 = new QHBoxLayout;
+ buttonLayout2->addWidget(previousButton);
+ buttonLayout2->addWidget(nextButton);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(nameLabel, 0, 0);
+ mainLayout->addWidget(nameLine, 0, 1);
+ mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
+ mainLayout->addWidget(addressText, 1, 1);
+ mainLayout->addLayout(buttonLayout1, 1, 2);
+ mainLayout->addLayout(buttonLayout2, 2, 1);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Simple Address Book"));
+}
+
+void AddressBook::addContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ nameLine->clear();
+ addressText->clear();
+
+ updateInterface(AddingMode);
+}
+
+void AddressBook::editContact()
+{
+ oldName = nameLine->text();
+ oldAddress = addressText->toPlainText();
+
+ updateInterface(EditingMode);
+}
+
+void AddressBook::submitContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (name == "" || address == "") {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name and address."));
+ return;
+ }
+
+ if (currentMode == AddingMode) {
+
+ if (!contacts.contains(name)) {
+ contacts.insert(name, address);
+ QMessageBox::information(this, tr("Add Successful"),
+ tr("\"%1\" has been added to your address book.").arg(name));
+ } else {
+ QMessageBox::information(this, tr("Add Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (currentMode == EditingMode) {
+
+ if (oldName != name) {
+ if (!contacts.contains(name)) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(oldName));
+ contacts.remove(oldName);
+ contacts.insert(name, address);
+ } else {
+ QMessageBox::information(this, tr("Edit Unsuccessful"),
+ tr("Sorry, \"%1\" is already in your address book.").arg(name));
+ return;
+ }
+ } else if (oldAddress != address) {
+ QMessageBox::information(this, tr("Edit Successful"),
+ tr("\"%1\" has been edited in your address book.").arg(name));
+ contacts[name] = address;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::cancel()
+{
+ nameLine->setText(oldName);
+ addressText->setText(oldAddress);
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::removeContact()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+
+ if (contacts.contains(name)) {
+
+ int button = QMessageBox::question(this,
+ tr("Confirm Remove"),
+ tr("Are you sure you want to remove \"%1\"?").arg(name),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (button == QMessageBox::Yes) {
+
+ previous();
+ contacts.remove(name);
+
+ QMessageBox::information(this, tr("Remove Successful"),
+ tr("\"%1\" has been removed from your address book.").arg(name));
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::next()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i != contacts.end())
+ i++;
+
+ if (i == contacts.end())
+ i = contacts.begin();
+
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::previous()
+{
+ QString name = nameLine->text();
+ QMap<QString, QString>::iterator i = contacts.find(name);
+
+ if (i == contacts.end()) {
+ nameLine->clear();
+ addressText->clear();
+ return;
+ }
+
+ if (i == contacts.begin())
+ i = contacts.end();
+
+ i--;
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+}
+
+void AddressBook::findContact()
+{
+ dialog->show();
+
+ if (dialog->exec() == 1) {
+ QString contactName = dialog->getFindText();
+
+ if (contacts.contains(contactName)) {
+ nameLine->setText(contactName);
+ addressText->setText(contacts.value(contactName));
+ } else {
+ QMessageBox::information(this, tr("Contact Not Found"),
+ tr("Sorry, \"%1\" is not in your address book.").arg(contactName));
+ return;
+ }
+ }
+
+ updateInterface(NavigationMode);
+}
+void AddressBook::updateInterface(Mode mode)
+{
+ currentMode = mode;
+
+ switch (currentMode) {
+
+ case AddingMode:
+ case EditingMode:
+
+ nameLine->setReadOnly(false);
+ nameLine->setFocus(Qt::OtherFocusReason);
+ addressText->setReadOnly(false);
+
+ addButton->setEnabled(false);
+ editButton->setEnabled(false);
+ removeButton->setEnabled(false);
+
+ nextButton->setEnabled(false);
+ previousButton->setEnabled(false);
+
+ submitButton->show();
+ cancelButton->show();
+
+ loadButton->setEnabled(false);
+ saveButton->setEnabled(false);
+ exportButton->setEnabled(false);
+ break;
+
+ case NavigationMode:
+
+ if (contacts.isEmpty()) {
+ nameLine->clear();
+ addressText->clear();
+ }
+
+ nameLine->setReadOnly(true);
+ addressText->setReadOnly(true);
+ addButton->setEnabled(true);
+
+ int number = contacts.size();
+ editButton->setEnabled(number >= 1);
+ removeButton->setEnabled(number >= 1);
+ findButton->setEnabled(number > 2);
+ nextButton->setEnabled(number > 1);
+ previousButton->setEnabled(number > 1);
+
+ submitButton->hide();
+ cancelButton->hide();
+
+ exportButton->setEnabled(number >= 1);
+
+ loadButton->setEnabled(true);
+ saveButton->setEnabled(number >= 1);
+ break;
+ }
+}
+
+void AddressBook::saveToFile()
+{
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Save Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream out(&file);
+ out.setVersion(QDataStream::Qt_4_3);
+ out << contacts;
+ }
+
+ updateInterface(NavigationMode);
+}
+
+void AddressBook::loadFromFile()
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open Address Book"), "",
+ tr("Address Book (*.abk);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+ else {
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QDataStream in(&file);
+ in.setVersion(QDataStream::Qt_4_3);
+ contacts.empty(); // empty existing contacts
+ in >> contacts;
+
+ QMap<QString, QString>::iterator i = contacts.begin();
+ nameLine->setText(i.key());
+ addressText->setText(i.value());
+ }
+
+ updateInterface(NavigationMode);
+}
+
+//! [export function part1]
+void AddressBook::exportAsVCard()
+{
+ QString name = nameLine->text();
+ QString address = addressText->toPlainText();
+ QString firstName;
+ QString lastName;
+ QStringList nameList;
+
+ int index = name.indexOf(" ");
+
+ if (index != -1) {
+ nameList = name.split(QRegExp("\\s+"), QString::SkipEmptyParts);
+ firstName = nameList.first();
+ lastName = nameList.last();
+ } else {
+ firstName = name;
+ lastName = "";
+ }
+
+ QString fileName = QFileDialog::getSaveFileName(this,
+ tr("Export Contact"), "",
+ tr("vCard Files (*.vcf);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+//! [export function part1]
+
+//! [export function part2]
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QTextStream out(&file);
+//! [export function part2]
+
+//! [export function part3]
+ out << "BEGIN:VCARD" << "\n";
+ out << "VERSION:2.1" << "\n";
+ out << "N:" << lastName << ";" << firstName << "\n";
+
+ if (!nameList.isEmpty())
+ out << "FN:" << nameList.join(" ") << "\n";
+ else
+ out << "FN:" << firstName << "\n";
+//! [export function part3]
+
+//! [export function part4]
+ address.replace(";", "\\;", Qt::CaseInsensitive);
+ address.replace("\n", ";", Qt::CaseInsensitive);
+ address.replace(",", " ", Qt::CaseInsensitive);
+
+ out << "ADR;HOME:;" << address << "\n";
+ out << "END:VCARD" << "\n";
+
+ QMessageBox::information(this, tr("Export Successful"),
+ tr("\"%1\" has been exported as a vCard.").arg(name));
+}
+//! [export function part4]
diff --git a/examples/tutorials/addressbook/part7/addressbook.h b/examples/tutorials/addressbook/part7/addressbook.h
new file mode 100644
index 0000000..3a6ae41
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/addressbook.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSBOOK_H
+#define ADDRESSBOOK_H
+
+#include <QWidget>
+#include <QMap>
+#include "finddialog.h"
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QLabel;
+class QLineEdit;
+class QTextEdit;
+QT_END_NAMESPACE
+
+
+class AddressBook : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressBook(QWidget *parent = 0);
+ enum Mode { NavigationMode, AddingMode, EditingMode };
+
+public slots:
+ void addContact();
+ void editContact();
+ void submitContact();
+ void cancel();
+ void removeContact();
+ void findContact();
+ void next();
+ void previous();
+ void saveToFile();
+ void loadFromFile();
+//! [exportAsVCard() declaration]
+ void exportAsVCard();
+//! [exportAsVCard() declaration]
+
+private:
+ void updateInterface(Mode mode);
+
+ QPushButton *addButton;
+ QPushButton *editButton;
+ QPushButton *removeButton;
+ QPushButton *findButton;
+ QPushButton *submitButton;
+ QPushButton *cancelButton;
+ QPushButton *nextButton;
+ QPushButton *previousButton;
+ QPushButton *loadButton;
+ QPushButton *saveButton;
+//! [exportButton declaration]
+ QPushButton *exportButton;
+//! [exportButton declaration]
+ QLineEdit *nameLine;
+ QTextEdit *addressText;
+
+ QMap<QString, QString> contacts;
+ FindDialog *dialog;
+ QString oldName;
+ QString oldAddress;
+ Mode currentMode;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part7/finddialog.cpp b/examples/tutorials/addressbook/part7/finddialog.cpp
new file mode 100644
index 0000000..e28bbae
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/finddialog.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "finddialog.h"
+
+FindDialog::FindDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ QLabel *findLabel = new QLabel(tr("Enter the name of a contact:"));
+ lineEdit = new QLineEdit;
+
+ findButton = new QPushButton(tr("&Find"));
+ findText = "";
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(findLabel);
+ layout->addWidget(lineEdit);
+ layout->addWidget(findButton);
+
+ setLayout(layout);
+ setWindowTitle(tr("Find a Contact"));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
+ connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+
+void FindDialog::findClicked()
+{
+ QString text = lineEdit->text();
+
+ if (text.isEmpty()) {
+ QMessageBox::information(this, tr("Empty Field"),
+ tr("Please enter a name."));
+ return;
+ } else {
+ findText = text;
+ lineEdit->clear();
+ hide();
+ }
+}
+
+QString FindDialog::getFindText()
+{
+ return findText;
+}
diff --git a/examples/tutorials/addressbook/part7/finddialog.h b/examples/tutorials/addressbook/part7/finddialog.h
new file mode 100644
index 0000000..c94baad
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/finddialog.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDDIALOG_H
+#define FINDDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class FindDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindDialog(QWidget *parent = 0);
+ QString getFindText();
+
+public slots:
+ void findClicked();
+
+private:
+ QPushButton *findButton;
+ QLineEdit *lineEdit;
+ QString findText;
+};
+
+#endif
diff --git a/examples/tutorials/addressbook/part7/main.cpp b/examples/tutorials/addressbook/part7/main.cpp
new file mode 100644
index 0000000..b25d656
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "addressbook.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ AddressBook *addressBook = new AddressBook;
+ addressBook->show();
+
+ return app.exec();
+}
diff --git a/examples/tutorials/addressbook/part7/part7.pro b/examples/tutorials/addressbook/part7/part7.pro
new file mode 100644
index 0000000..a726d91
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/part7.pro
@@ -0,0 +1,11 @@
+SOURCES = addressbook.cpp \
+ finddialog.cpp \
+ main.cpp
+HEADERS = addressbook.h \
+ finddialog.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part7
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part7
+INSTALLS += target sources
diff --git a/examples/tutorials/tutorials.pro b/examples/tutorials/tutorials.pro
new file mode 100644
index 0000000..8b3f41f
--- /dev/null
+++ b/examples/tutorials/tutorials.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = \
+ addressbook
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials
+INSTALLS += sources
diff --git a/examples/uitools/multipleinheritance/calculatorform.cpp b/examples/uitools/multipleinheritance/calculatorform.cpp
new file mode 100644
index 0000000..d2241d2
--- /dev/null
+++ b/examples/uitools/multipleinheritance/calculatorform.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "calculatorform.h"
+
+
+//! [0]
+CalculatorForm::CalculatorForm(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+//! [0]
+
+//! [1]
+void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
+{
+ outputWidget->setText(QString::number(value + inputSpinBox2->value()));
+}
+//! [1]
+
+//! [2]
+void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
+{
+ outputWidget->setText(QString::number(value + inputSpinBox1->value()));
+}
+//! [2]
diff --git a/examples/uitools/multipleinheritance/calculatorform.h b/examples/uitools/multipleinheritance/calculatorform.h
new file mode 100644
index 0000000..2483244
--- /dev/null
+++ b/examples/uitools/multipleinheritance/calculatorform.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATORFORM_H
+#define CALCULATORFORM_H
+
+//! [0]
+#include "ui_calculatorform.h"
+//! [0]
+
+//! [1]
+class CalculatorForm : public QWidget, private Ui::CalculatorForm
+{
+ Q_OBJECT
+
+public:
+ CalculatorForm(QWidget *parent = 0);
+
+private slots:
+ void on_inputSpinBox1_valueChanged(int value);
+ void on_inputSpinBox2_valueChanged(int value);
+};
+//! [1]
+
+#endif
diff --git a/examples/uitools/multipleinheritance/calculatorform.ui b/examples/uitools/multipleinheritance/calculatorform.ui
new file mode 100644
index 0000000..dda0e62
--- /dev/null
+++ b/examples/uitools/multipleinheritance/calculatorform.ui
@@ -0,0 +1,303 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>276</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Builder</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>54</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>120</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>37</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>37</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>85</x>
+ <y>69</y>
+ <width>20</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>188</x>
+ <y>26</y>
+ <width>79</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/uitools/multipleinheritance/main.cpp b/examples/uitools/multipleinheritance/main.cpp
new file mode 100644
index 0000000..2ed0016
--- /dev/null
+++ b/examples/uitools/multipleinheritance/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "calculatorform.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ CalculatorForm calculator;
+ calculator.show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/uitools/multipleinheritance/multipleinheritance.pro b/examples/uitools/multipleinheritance/multipleinheritance.pro
new file mode 100644
index 0000000..92dda2e
--- /dev/null
+++ b/examples/uitools/multipleinheritance/multipleinheritance.pro
@@ -0,0 +1,11 @@
+#! [0]
+SOURCES = calculatorform.cpp main.cpp
+HEADERS = calculatorform.h
+FORMS = calculatorform.ui
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/uitools/multipleinheritance
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/uitools/multipleinheritance
+INSTALLS += target sources
diff --git a/examples/uitools/textfinder/forms/input.txt b/examples/uitools/textfinder/forms/input.txt
new file mode 100644
index 0000000..fae542f
--- /dev/null
+++ b/examples/uitools/textfinder/forms/input.txt
@@ -0,0 +1,9 @@
+These forms are processed at run-time to produce dynamically-generated user interfaces.
+In order to generate a form at run-time, a resource file containing a .ui file is needed.
+Applications that use the form handling classes need to be configured to be built against
+the QtUiTools module. This is done by including the following declaration in a qmake project
+file to ensure that the application is compiled and linked appropriately. A form loader object,
+provided by the QUiLoader class, is used to construct the user interface. This user interface
+can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form
+stored in a project's resources. The QUiLoader::load() function takes the user interface
+description contained in the file and constructs the form widget. \ No newline at end of file
diff --git a/examples/uitools/textfinder/forms/textfinder.ui b/examples/uitools/textfinder/forms/textfinder.ui
new file mode 100644
index 0000000..af05192
--- /dev/null
+++ b/examples/uitools/textfinder/forms/textfinder.ui
@@ -0,0 +1,89 @@
+<ui version="4.0" >
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>378</width>
+ <height>158</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Find Text</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="lineEdit" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="searchLabel" >
+ <property name="text" >
+ <string>&amp;Keyword:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>lineEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="findButton" >
+ <property name="text" >
+ <string>&amp;Find</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="textEdit" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>lineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>findButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>261</x>
+ <y>17</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>320</x>
+ <y>17</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/uitools/textfinder/main.cpp b/examples/uitools/textfinder/main.cpp
new file mode 100644
index 0000000..dac93c6
--- /dev/null
+++ b/examples/uitools/textfinder/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "textfinder.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(textfinder);
+ QApplication app(argc, argv);
+
+ TextFinder *textFinder = new TextFinder;
+ textFinder->show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/uitools/textfinder/textfinder.cpp b/examples/uitools/textfinder/textfinder.cpp
new file mode 100644
index 0000000..d4b5d9e
--- /dev/null
+++ b/examples/uitools/textfinder/textfinder.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtUiTools>
+#include <QtGui>
+#include "textfinder.h"
+
+//! [0]
+TextFinder::TextFinder(QWidget *parent)
+ : QWidget(parent)
+{
+ QWidget *formWidget = loadUiFile();
+
+//! [1]
+ ui_findButton = qFindChild<QPushButton*>(this, "findButton");
+ ui_textEdit = qFindChild<QTextEdit*>(this, "textEdit");
+ ui_lineEdit = qFindChild<QLineEdit*>(this, "lineEdit");
+//! [0] //! [1]
+
+//! [2]
+ QMetaObject::connectSlotsByName(this);
+//! [2]
+
+//! [3a]
+ loadTextFile();
+//! [3a]
+
+//! [3b]
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(formWidget);
+ setLayout(layout);
+//! [3b]
+
+//! [3c]
+ setWindowTitle(tr("Text Finder"));
+ isFirstTime = true;
+}
+//! [3c]
+
+//! [4]
+QWidget* TextFinder::loadUiFile()
+{
+ QUiLoader loader;
+
+ QFile file(":/forms/textfinder.ui");
+ file.open(QFile::ReadOnly);
+
+ QWidget *formWidget = loader.load(&file, this);
+ file.close();
+
+ return formWidget;
+}
+//! [4]
+
+//! [5]
+void TextFinder::loadTextFile()
+{
+ QFile inputFile(":/forms/input.txt");
+ inputFile.open(QIODevice::ReadOnly);
+ QTextStream in(&inputFile);
+ QString line = in.readAll();
+ inputFile.close();
+
+ ui_textEdit->append(line);
+ ui_textEdit->setUndoRedoEnabled(false);
+ ui_textEdit->setUndoRedoEnabled(true);
+}
+//! [5]
+
+//! [6] //! [7]
+void TextFinder::on_findButton_clicked()
+{
+ QString searchString = ui_lineEdit->text();
+ QTextDocument *document = ui_textEdit->document();
+
+ bool found = false;
+
+ if (isFirstTime == false)
+ document->undo();
+
+ if (searchString == "") {
+ QMessageBox::information(this, tr("Empty Search Field"),
+ "The search field is empty. Please enter a word and click Find.");
+ } else {
+
+ QTextCursor highlightCursor(document);
+ QTextCursor cursor(document);
+
+ cursor.beginEditBlock();
+//! [6]
+
+ QTextCharFormat plainFormat(highlightCursor.charFormat());
+ QTextCharFormat colorFormat = plainFormat;
+ colorFormat.setForeground(Qt::red);
+
+ while (!highlightCursor.isNull() && !highlightCursor.atEnd()) {
+ highlightCursor = document->find(searchString, highlightCursor, QTextDocument::FindWholeWords);
+
+ if (!highlightCursor.isNull()) {
+ found = true;
+ highlightCursor.movePosition(QTextCursor::WordRight,
+ QTextCursor::KeepAnchor);
+ highlightCursor.mergeCharFormat(colorFormat);
+ }
+ }
+
+//! [8]
+ cursor.endEditBlock();
+//! [7] //! [9]
+ isFirstTime = false;
+
+ if (found == false) {
+ QMessageBox::information(this, tr("Word Not Found"),
+ "Sorry, the word cannot be found.");
+ }
+ }
+}
+//! [8] //! [9]
diff --git a/examples/uitools/textfinder/textfinder.h b/examples/uitools/textfinder/textfinder.h
new file mode 100644
index 0000000..c4880dc
--- /dev/null
+++ b/examples/uitools/textfinder/textfinder.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TEXTFINDER_H
+#define TEXTFINDER_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QTextEdit;
+class QLineEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class TextFinder : public QWidget
+{
+ Q_OBJECT
+
+public:
+ TextFinder(QWidget *parent = 0);
+
+private slots:
+ void on_findButton_clicked();
+
+private:
+ QWidget* loadUiFile();
+ void loadTextFile();
+
+ QPushButton *ui_findButton;
+ QTextEdit *ui_textEdit;
+ QLineEdit *ui_lineEdit;
+ bool isFirstTime;
+};
+//! [0]
+
+#endif
diff --git a/examples/uitools/textfinder/textfinder.pro b/examples/uitools/textfinder/textfinder.pro
new file mode 100644
index 0000000..9d2a96d
--- /dev/null
+++ b/examples/uitools/textfinder/textfinder.pro
@@ -0,0 +1,10 @@
+CONFIG += uitools
+HEADERS = textfinder.h
+RESOURCES = textfinder.qrc
+SOURCES = textfinder.cpp main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/uitools/textfinder
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro forms
+sources.path = $$[QT_INSTALL_EXAMPLES]/uitools/textfinder
+INSTALLS += target sources
diff --git a/examples/uitools/textfinder/textfinder.qrc b/examples/uitools/textfinder/textfinder.qrc
new file mode 100644
index 0000000..a4cea8a
--- /dev/null
+++ b/examples/uitools/textfinder/textfinder.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>forms/textfinder.ui</file>
+ <file>forms/input.txt</file>
+</qresource>
+</RCC> \ No newline at end of file
diff --git a/examples/uitools/uitools.pro b/examples/uitools/uitools.pro
new file mode 100644
index 0000000..ddec822
--- /dev/null
+++ b/examples/uitools/uitools.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+SUBDIRS = multipleinheritance
+
+!wince*:contains(QT_BUILD_PARTS, tools): SUBDIRS += textfinder
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/uitools
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS uitools.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/uitools
+INSTALLS += target sources
diff --git a/examples/webkit/formextractor/form.html b/examples/webkit/formextractor/form.html
new file mode 100755
index 0000000..18ddff1
--- /dev/null
+++ b/examples/webkit/formextractor/form.html
@@ -0,0 +1,64 @@
+<html><script>
+function extractFormValues()
+{
+ var firstName = document.getElementById("firstname").value;
+ var lastName = document.getElementById("lastname").value;
+ var maleGender = document.getElementById("genderMale");
+ var femaleGender = document.getElementById("genderFemale");
+
+ var gender = "";
+ if (maleGender.checked)
+ gender = maleGender.value;
+ else if (femaleGender.checked)
+ gender = femaleGender.value;
+
+ var updates = document.getElementById("updates").checked;
+
+ formExtractor.setValues(firstName, lastName, gender, updates);
+}
+</script><body>
+<h1>
+The Green People Book Club
+</h1>
+
+<p>
+Welcome to The Green People Book Club. Please register to obtain a membership with us.
+</p>
+ <form onsubmit="extractFormValues()">
+ <table>
+ <tbody><tr>
+ <td>
+ First name:
+ </td>
+ <td>
+ <input type="text" id="firstname">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Last name:
+ </td>
+ <td>
+ <input type="text" id="lastname">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Gender:
+ </td>
+ <td>
+ <input type="radio" name="gender" id="genderMale" value="Male"> Male
+ <input type="radio" name="gender" id="genderFemale" value="Female"> Female
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="checkbox" id="updates" value="receive">
+ Check here if you would like to receive regular updates from us:
+ </td>
+ </tr>
+ </tbody></table>
+ <input type="submit" value="Submit">
+ </form>
+
+</body></html> \ No newline at end of file
diff --git a/examples/webkit/formextractor/formextractor.cpp b/examples/webkit/formextractor/formextractor.cpp
new file mode 100644
index 0000000..d5ecc29
--- /dev/null
+++ b/examples/webkit/formextractor/formextractor.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "formextractor.h"
+
+FormExtractor::FormExtractor(QWidget *parent, Qt::WFlags flags)
+ : QWidget(parent, flags)
+{
+ ui.setupUi(this);
+ ui.webView->setUrl(QUrl("qrc:/form.html"));
+ connect(ui.webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
+ this, SLOT(populateJavaScriptWindowObject()));
+ resize(300, 300);
+}
+
+FormExtractor::~FormExtractor()
+{
+}
+
+void FormExtractor::setValues(const QString &firstName, const QString &lastName,
+ const QString &gender, bool updates)
+{
+ ui.firstNameEdit->setText(firstName);
+ ui.lastNameEdit->setText(lastName);
+ ui.genderEdit->setText(gender);
+
+ if (updates == false)
+ ui.updatesEdit->setText("No");
+ else
+ ui.updatesEdit->setText("Yes");
+}
+
+void FormExtractor::populateJavaScriptWindowObject()
+{
+ ui.webView->page()->mainFrame()->addToJavaScriptWindowObject("formExtractor", this);
+}
diff --git a/examples/webkit/formextractor/formextractor.h b/examples/webkit/formextractor/formextractor.h
new file mode 100644
index 0000000..5b11565
--- /dev/null
+++ b/examples/webkit/formextractor/formextractor.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FORMEXTRACTOR_H
+#define FORMEXTRACTOR_H
+
+#include <QtGui/QWidget>
+#include <QWebFrame>
+#include "ui_formextractor.h"
+
+class FormExtractor : public QWidget
+{
+ Q_OBJECT
+
+public:
+ FormExtractor(QWidget *parent = 0, Qt::WFlags flags = 0);
+ ~FormExtractor();
+
+public slots:
+ void setValues(const QString &firstName, const QString &lastName,
+ const QString &gender, bool updates);
+
+ void populateJavaScriptWindowObject();
+
+private:
+ Ui::Form ui;
+};
+
+#endif // FORMEXTRACTOR_H
diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro
new file mode 100644
index 0000000..d2cb240
--- /dev/null
+++ b/examples/webkit/formextractor/formextractor.pro
@@ -0,0 +1,16 @@
+QT += webkit
+TARGET = formExtractor
+TEMPLATE = app
+SOURCES += main.cpp \
+ formextractor.cpp \
+ mainwindow.cpp
+HEADERS += formextractor.h \
+ mainwindow.h
+FORMS += formextractor.ui
+RESOURCES += formextractor.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/webkit/formextractor
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro form.html images
+sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/formextractor
+INSTALLS += target sources
diff --git a/examples/webkit/formextractor/formextractor.qrc b/examples/webkit/formextractor/formextractor.qrc
new file mode 100644
index 0000000..e35f4b2
--- /dev/null
+++ b/examples/webkit/formextractor/formextractor.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>form.html</file>
+ </qresource>
+ </RCC> \ No newline at end of file
diff --git a/examples/webkit/formextractor/formextractor.ui b/examples/webkit/formextractor/formextractor.ui
new file mode 100644
index 0000000..5c4afec
--- /dev/null
+++ b/examples/webkit/formextractor/formextractor.ui
@@ -0,0 +1,159 @@
+<ui version="4.0" >
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>680</width>
+ <height>218</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QGroupBox" name="webFormGroupBox" >
+ <property name="title" >
+ <string>Web Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QWebView" name="webView" >
+ <property name="minimumSize" >
+ <size>
+ <width>200</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>400</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="url" >
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>28</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="dataGroupBox" >
+ <property name="title" >
+ <string>Extracted Data</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <layout class="QFormLayout" name="formLayout" >
+ <property name="fieldGrowthPolicy" >
+ <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="firstNameLabel" >
+ <property name="text" >
+ <string>First Name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="firstNameEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="lastNameLabel" >
+ <property name="text" >
+ <string>Last Name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="lastNameEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="genderLabel" >
+ <property name="text" >
+ <string>Gender</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="genderEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="updatesLabel" >
+ <property name="text" >
+ <string>Receive Updates</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QLineEdit" name="updatesEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>24</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKit/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/webkit/formextractor/main.cpp b/examples/webkit/formextractor/main.cpp
new file mode 100644
index 0000000..aa7847d
--- /dev/null
+++ b/examples/webkit/formextractor/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(formextractor);
+ QApplication app(argc, argv);
+ MainWindow mainWindow;
+ mainWindow.setWindowTitle("Form Extractor");
+ mainWindow.show();
+ return app.exec();
+}
diff --git a/examples/webkit/formextractor/mainwindow.cpp b/examples/webkit/formextractor/mainwindow.cpp
new file mode 100644
index 0000000..222d9b2
--- /dev/null
+++ b/examples/webkit/formextractor/mainwindow.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ createActions();
+ createMenus();
+ centralWidget = new FormExtractor(this);
+ setCentralWidget(centralWidget);
+}
+
+void MainWindow::createActions()
+{
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setStatusTip(tr("Exit the application"));
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Form Extractor"),
+ tr("The <b>Form Extractor</b> example demonstrates how to "
+ "extract data from a web form using QtWebKit."));
+
+}
diff --git a/examples/webkit/formextractor/mainwindow.h b/examples/webkit/formextractor/mainwindow.h
new file mode 100644
index 0000000..7918870
--- /dev/null
+++ b/examples/webkit/formextractor/mainwindow.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "formextractor.h"
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void about();
+
+private:
+ FormExtractor *centralWidget;
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+
+ void createActions();
+ void createMenus();
+};
+
+#endif // MAINWINDOW_H
diff --git a/examples/webkit/previewer/main.cpp b/examples/webkit/previewer/main.cpp
new file mode 100644
index 0000000..87612e2
--- /dev/null
+++ b/examples/webkit/previewer/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char * argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *mainWindow = new MainWindow;
+ mainWindow->show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/webkit/previewer/mainwindow.cpp b/examples/webkit/previewer/mainwindow.cpp
new file mode 100644
index 0000000..abe7941
--- /dev/null
+++ b/examples/webkit/previewer/mainwindow.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtWebKit>
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ createActions();
+ createMenus();
+ centralWidget = new Previewer(this);
+ setCentralWidget(centralWidget);
+
+ connect(centralWidget->webView, SIGNAL(loadFinished(bool)),
+ this, SLOT(updateTextEdit()));
+ setStartupText();
+}
+//! [0]
+
+//! [1]
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setStatusTip(tr("Open an existing HTML file"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ openUrlAct = new QAction(tr("&Open URL..."), this);
+ openUrlAct->setShortcut(tr("Ctrl+U"));
+ openUrlAct->setStatusTip(tr("Open a URL"));
+ connect(openUrlAct, SIGNAL(triggered()), this, SLOT(openUrl()));
+//! [1]
+
+ saveAct = new QAction(tr("&Save"), this);
+ saveAct->setShortcut(tr("Ctrl+S"));
+ saveAct->setStatusTip(tr("Save the HTML file to disk"));
+ connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setStatusTip(tr("Exit the application"));
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ aboutAct->setStatusTip(tr("Show the application's About box"));
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+//! [2]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(openUrlAct);
+ fileMenu->addAction(saveAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [2]
+
+//! [3]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Previewer"),
+ tr("The <b>Previewer</b> example demonstrates how to "
+ "view HTML documents using a QWebView."));
+}
+//! [3]
+
+//! [4]
+void MainWindow::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this);
+ if (!fileName.isEmpty()) {
+ // read from file
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QTextStream out(&file);
+ QString output = out.readAll();
+
+ // display contents
+ centralWidget->plainTextEdit->setPlainText(output);
+ centralWidget->setBaseUrl(QUrl::fromLocalFile(fileName));
+ }
+}
+//! [4]
+
+//! [5]
+void MainWindow::openUrl()
+{
+ bool ok;
+ QString url = QInputDialog::getText(this, tr("Enter a URL"),
+ tr("URL:"), QLineEdit::Normal, "http://", &ok);
+
+ if (ok && !url.isEmpty()) {
+ centralWidget->webView->setUrl(url);
+ }
+}
+//! [5]
+
+//! [6]
+void MainWindow::save()
+{
+ QString content = centralWidget->plainTextEdit->toPlainText();
+ QString fileName = QFileDialog::getSaveFileName(this);
+
+ if (!fileName.isEmpty()) {
+ // save to file
+ QFile file(fileName);
+
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::information(this, tr("Unable to open file"),
+ file.errorString());
+ return;
+ }
+
+ QTextStream in(&file);
+ in << content;
+ }
+}
+//! [6]
+
+//! [7]
+void MainWindow::updateTextEdit()
+{
+ QWebFrame *mainFrame = centralWidget->webView->page()->mainFrame();
+ QString frameText = mainFrame->toHtml();
+ centralWidget->plainTextEdit->setPlainText(frameText);
+}
+//! [7]
+
+//! [8]
+void MainWindow::setStartupText()
+{
+ QString string = "<html><body><h1>HTML Previewer</h1>"
+ " <p>This example shows you how to use QWebView to"
+ " preview HTML data written in a QPlainTextEdit.</p>"
+ " </body></html>";
+ centralWidget->webView->setHtml(string);
+}
+//! [8]
diff --git a/examples/webkit/previewer/mainwindow.h b/examples/webkit/previewer/mainwindow.h
new file mode 100644
index 0000000..3a0a4b1
--- /dev/null
+++ b/examples/webkit/previewer/mainwindow.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "previewer.h"
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void open();
+ void openUrl();
+ void save();
+ void about();
+ void updateTextEdit();
+//! [0]
+
+//! [1]
+private:
+ Previewer *centralWidget;
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *openAct;
+ QAction *openUrlAct;
+ QAction *saveAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+
+ void createActions();
+ void createMenus();
+ void setStartupText();
+};
+//! [1]
+
+#endif
diff --git a/examples/webkit/previewer/previewer.cpp b/examples/webkit/previewer/previewer.cpp
new file mode 100644
index 0000000..51419d7
--- /dev/null
+++ b/examples/webkit/previewer/previewer.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "previewer.h"
+
+//! [0]
+Previewer::Previewer(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+//! [0]
+
+void Previewer::setBaseUrl(const QUrl &url)
+{
+ baseUrl = url;
+}
+
+//! [1]
+void Previewer::on_previewButton_clicked()
+{
+ // Update the contents in web viewer
+ QString text = plainTextEdit->toPlainText();
+ webView->setHtml(text, baseUrl);
+}
+//! [1]
diff --git a/examples/webkit/previewer/previewer.h b/examples/webkit/previewer/previewer.h
new file mode 100644
index 0000000..ae70f9f
--- /dev/null
+++ b/examples/webkit/previewer/previewer.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PREVIEWER_H
+#define PREVIEWER_H
+
+#include "ui_previewer.h"
+
+//! [0]
+class Previewer : public QWidget, public Ui::Form
+{
+ Q_OBJECT
+
+public:
+ Previewer(QWidget *parent = 0);
+
+ void setBaseUrl(const QUrl &url);
+
+public slots:
+ void on_previewButton_clicked();
+
+private:
+ QUrl baseUrl;
+};
+//! [0]
+
+#endif
diff --git a/examples/webkit/previewer/previewer.pro b/examples/webkit/previewer/previewer.pro
new file mode 100644
index 0000000..75ab6fb
--- /dev/null
+++ b/examples/webkit/previewer/previewer.pro
@@ -0,0 +1,13 @@
+QT += webkit
+HEADERS = previewer.h \
+ mainwindow.h
+SOURCES = main.cpp \
+ previewer.cpp \
+ mainwindow.cpp
+FORMS = previewer.ui
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/webkit/previewer
+sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/previewer
+INSTALLS += target sources
diff --git a/examples/webkit/previewer/previewer.ui b/examples/webkit/previewer/previewer.ui
new file mode 100644
index 0000000..d4c9992
--- /dev/null
+++ b/examples/webkit/previewer/previewer.ui
@@ -0,0 +1,99 @@
+<ui version="4.0" >
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>911</width>
+ <height>688</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_4" >
+ <item>
+ <widget class="QSplitter" name="splitter" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <widget class="QGroupBox" name="editorBox" >
+ <property name="title" >
+ <string>HTML Editor</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QPlainTextEdit" name="plainTextEdit" />
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QPushButton" name="clearButton" >
+ <property name="text" >
+ <string>Clear</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="previewButton" >
+ <property name="text" >
+ <string>Preview</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QGroupBox" name="previewerBox" >
+ <property name="title" >
+ <string>HTML Preview</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <item>
+ <widget class="QWebView" name="webView" >
+ <property name="url" >
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKit/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>clearButton</sender>
+ <signal>clicked()</signal>
+ <receiver>plainTextEdit</receiver>
+ <slot>clear()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>56</x>
+ <y>653</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>98</x>
+ <y>551</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro
new file mode 100644
index 0000000..3777eec
--- /dev/null
+++ b/examples/webkit/webkit.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+SUBDIRS += formextractor \
+ previewer
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/webkit
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webkit.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/webkit
+INSTALLS += target sources
diff --git a/examples/widgets/README b/examples/widgets/README
new file mode 100644
index 0000000..fd16c67
--- /dev/null
+++ b/examples/widgets/README
@@ -0,0 +1,44 @@
+Qt comes with a large range of standard widgets that users of modern
+applications have come to expect.
+
+You can also develop your own custom widgets and controls, and use them
+alongside standard widgets.
+
+It is even possible to provide custom styles and themes for widgets that can
+be used to change the appearance of standard widgets and appropriately
+written custom widgets.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/widgets/analogclock/analogclock.cpp b/examples/widgets/analogclock/analogclock.cpp
new file mode 100644
index 0000000..5856ec9
--- /dev/null
+++ b/examples/widgets/analogclock/analogclock.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "analogclock.h"
+
+//! [0] //! [1]
+AnalogClock::AnalogClock(QWidget *parent)
+//! [0] //! [2]
+ : QWidget(parent)
+//! [2] //! [3]
+{
+//! [3] //! [4]
+ QTimer *timer = new QTimer(this);
+//! [4] //! [5]
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+//! [5] //! [6]
+ timer->start(1000);
+//! [6]
+
+ setWindowTitle(tr("Analog Clock"));
+ resize(200, 200);
+//! [7]
+}
+//! [1] //! [7]
+
+//! [8] //! [9]
+void AnalogClock::paintEvent(QPaintEvent *)
+//! [8] //! [10]
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+//! [10]
+
+//! [11]
+ QPainter painter(this);
+//! [11] //! [12]
+ painter.setRenderHint(QPainter::Antialiasing);
+//! [12] //! [13]
+ painter.translate(width() / 2, height() / 2);
+//! [13] //! [14]
+ painter.scale(side / 200.0, side / 200.0);
+//! [9] //! [14]
+
+//! [15]
+ painter.setPen(Qt::NoPen);
+//! [15] //! [16]
+ painter.setBrush(hourColor);
+//! [16]
+
+//! [17] //! [18]
+ painter.save();
+//! [17] //! [19]
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+//! [18] //! [19]
+
+//! [20]
+ painter.setPen(hourColor);
+//! [20] //! [21]
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+//! [21]
+
+//! [22]
+ painter.setPen(Qt::NoPen);
+//! [22] //! [23]
+ painter.setBrush(minuteColor);
+
+//! [24]
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+//! [23] //! [24]
+
+//! [25]
+ painter.setPen(minuteColor);
+//! [25] //! [26]
+
+//! [27]
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+//! [27]
+}
+//! [26]
diff --git a/examples/widgets/analogclock/analogclock.h b/examples/widgets/analogclock/analogclock.h
new file mode 100644
index 0000000..4a32219
--- /dev/null
+++ b/examples/widgets/analogclock/analogclock.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANALOGCLOCK_H
+#define ANALOGCLOCK_H
+
+#include <QWidget>
+
+//! [0]
+class AnalogClock : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AnalogClock(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/analogclock/analogclock.pro b/examples/widgets/analogclock/analogclock.pro
new file mode 100644
index 0000000..62a1806
--- /dev/null
+++ b/examples/widgets/analogclock/analogclock.pro
@@ -0,0 +1,9 @@
+HEADERS = analogclock.h
+SOURCES = analogclock.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/analogclock
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS analogclock.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/analogclock
+INSTALLS += target sources
diff --git a/examples/widgets/analogclock/main.cpp b/examples/widgets/analogclock/main.cpp
new file mode 100644
index 0000000..e8fa08b
--- /dev/null
+++ b/examples/widgets/analogclock/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "analogclock.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ AnalogClock clock;
+ clock.show();
+ return app.exec();
+}
diff --git a/examples/widgets/calculator/button.cpp b/examples/widgets/calculator/button.cpp
new file mode 100644
index 0000000..e77442e
--- /dev/null
+++ b/examples/widgets/calculator/button.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "button.h"
+
+//! [0]
+Button::Button(const QString &text, QWidget *parent)
+ : QToolButton(parent)
+{
+ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ setText(text);
+}
+//! [0]
+
+//! [1]
+QSize Button::sizeHint() const
+//! [1] //! [2]
+{
+ QSize size = QToolButton::sizeHint();
+ size.rheight() += 20;
+ size.rwidth() = qMax(size.width(), size.height());
+ return size;
+}
+//! [2]
diff --git a/examples/widgets/calculator/button.h b/examples/widgets/calculator/button.h
new file mode 100644
index 0000000..5637e6b
--- /dev/null
+++ b/examples/widgets/calculator/button.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BUTTON_H
+#define BUTTON_H
+
+#include <QToolButton>
+
+//! [0]
+class Button : public QToolButton
+{
+ Q_OBJECT
+
+public:
+ Button(const QString &text, QWidget *parent = 0);
+
+ QSize sizeHint() const;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/calculator/calculator.cpp b/examples/widgets/calculator/calculator.cpp
new file mode 100644
index 0000000..9c2ef4a
--- /dev/null
+++ b/examples/widgets/calculator/calculator.cpp
@@ -0,0 +1,398 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <math.h>
+
+#include "button.h"
+#include "calculator.h"
+
+//! [0]
+Calculator::Calculator(QWidget *parent)
+ : QDialog(parent)
+{
+ sumInMemory = 0.0;
+ sumSoFar = 0.0;
+ factorSoFar = 0.0;
+ waitingForOperand = true;
+//! [0]
+
+//! [1]
+ display = new QLineEdit("0");
+//! [1] //! [2]
+ display->setReadOnly(true);
+ display->setAlignment(Qt::AlignRight);
+ display->setMaxLength(15);
+
+ QFont font = display->font();
+ font.setPointSize(font.pointSize() + 8);
+ display->setFont(font);
+//! [2]
+
+//! [4]
+ for (int i = 0; i < NumDigitButtons; ++i) {
+ digitButtons[i] = createButton(QString::number(i), SLOT(digitClicked()));
+ }
+
+ Button *pointButton = createButton(tr("."), SLOT(pointClicked()));
+ Button *changeSignButton = createButton(tr("\261"), SLOT(changeSignClicked()));
+
+ Button *backspaceButton = createButton(tr("Backspace"), SLOT(backspaceClicked()));
+ Button *clearButton = createButton(tr("Clear"), SLOT(clear()));
+ Button *clearAllButton = createButton(tr("Clear All"), SLOT(clearAll()));
+
+ Button *clearMemoryButton = createButton(tr("MC"), SLOT(clearMemory()));
+ Button *readMemoryButton = createButton(tr("MR"), SLOT(readMemory()));
+ Button *setMemoryButton = createButton(tr("MS"), SLOT(setMemory()));
+ Button *addToMemoryButton = createButton(tr("M+"), SLOT(addToMemory()));
+
+ Button *divisionButton = createButton(tr("\367"), SLOT(multiplicativeOperatorClicked()));
+ Button *timesButton = createButton(tr("\327"), SLOT(multiplicativeOperatorClicked()));
+ Button *minusButton = createButton(tr("-"), SLOT(additiveOperatorClicked()));
+ Button *plusButton = createButton(tr("+"), SLOT(additiveOperatorClicked()));
+
+ Button *squareRootButton = createButton(tr("Sqrt"), SLOT(unaryOperatorClicked()));
+ Button *powerButton = createButton(tr("x\262"), SLOT(unaryOperatorClicked()));
+ Button *reciprocalButton = createButton(tr("1/x"), SLOT(unaryOperatorClicked()));
+ Button *equalButton = createButton(tr("="), SLOT(equalClicked()));
+//! [4]
+
+//! [5]
+ QGridLayout *mainLayout = new QGridLayout;
+//! [5] //! [6]
+ mainLayout->setSizeConstraint(QLayout::SetFixedSize);
+
+ mainLayout->addWidget(display, 0, 0, 1, 6);
+ mainLayout->addWidget(backspaceButton, 1, 0, 1, 2);
+ mainLayout->addWidget(clearButton, 1, 2, 1, 2);
+ mainLayout->addWidget(clearAllButton, 1, 4, 1, 2);
+
+ mainLayout->addWidget(clearMemoryButton, 2, 0);
+ mainLayout->addWidget(readMemoryButton, 3, 0);
+ mainLayout->addWidget(setMemoryButton, 4, 0);
+ mainLayout->addWidget(addToMemoryButton, 5, 0);
+
+ for (int i = 1; i < NumDigitButtons; ++i) {
+ int row = ((9 - i) / 3) + 2;
+ int column = ((i - 1) % 3) + 1;
+ mainLayout->addWidget(digitButtons[i], row, column);
+ }
+
+ mainLayout->addWidget(digitButtons[0], 5, 1);
+ mainLayout->addWidget(pointButton, 5, 2);
+ mainLayout->addWidget(changeSignButton, 5, 3);
+
+ mainLayout->addWidget(divisionButton, 2, 4);
+ mainLayout->addWidget(timesButton, 3, 4);
+ mainLayout->addWidget(minusButton, 4, 4);
+ mainLayout->addWidget(plusButton, 5, 4);
+
+ mainLayout->addWidget(squareRootButton, 2, 5);
+ mainLayout->addWidget(powerButton, 3, 5);
+ mainLayout->addWidget(reciprocalButton, 4, 5);
+ mainLayout->addWidget(equalButton, 5, 5);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Calculator"));
+}
+//! [6]
+
+//! [7]
+void Calculator::digitClicked()
+{
+ Button *clickedButton = qobject_cast<Button *>(sender());
+ int digitValue = clickedButton->text().toInt();
+ if (display->text() == "0" && digitValue == 0.0)
+ return;
+
+ if (waitingForOperand) {
+ display->clear();
+ waitingForOperand = false;
+ }
+ display->setText(display->text() + QString::number(digitValue));
+}
+//! [7]
+
+//! [8]
+void Calculator::unaryOperatorClicked()
+//! [8] //! [9]
+{
+ Button *clickedButton = qobject_cast<Button *>(sender());
+ QString clickedOperator = clickedButton->text();
+ double operand = display->text().toDouble();
+ double result = 0.0;
+
+ if (clickedOperator == tr("Sqrt")) {
+ if (operand < 0.0) {
+ abortOperation();
+ return;
+ }
+ result = sqrt(operand);
+ } else if (clickedOperator == tr("x\262")) {
+ result = pow(operand, 2.0);
+ } else if (clickedOperator == tr("1/x")) {
+ if (operand == 0.0) {
+ abortOperation();
+ return;
+ }
+ result = 1.0 / operand;
+ }
+ display->setText(QString::number(result));
+ waitingForOperand = true;
+}
+//! [9]
+
+//! [10]
+void Calculator::additiveOperatorClicked()
+//! [10] //! [11]
+{
+ Button *clickedButton = qobject_cast<Button *>(sender());
+ QString clickedOperator = clickedButton->text();
+ double operand = display->text().toDouble();
+
+//! [11] //! [12]
+ if (!pendingMultiplicativeOperator.isEmpty()) {
+//! [12] //! [13]
+ if (!calculate(operand, pendingMultiplicativeOperator)) {
+ abortOperation();
+ return;
+ }
+ display->setText(QString::number(factorSoFar));
+ operand = factorSoFar;
+ factorSoFar = 0.0;
+ pendingMultiplicativeOperator.clear();
+ }
+
+//! [13] //! [14]
+ if (!pendingAdditiveOperator.isEmpty()) {
+//! [14] //! [15]
+ if (!calculate(operand, pendingAdditiveOperator)) {
+ abortOperation();
+ return;
+ }
+ display->setText(QString::number(sumSoFar));
+ } else {
+ sumSoFar = operand;
+ }
+
+//! [15] //! [16]
+ pendingAdditiveOperator = clickedOperator;
+//! [16] //! [17]
+ waitingForOperand = true;
+}
+//! [17]
+
+//! [18]
+void Calculator::multiplicativeOperatorClicked()
+{
+ Button *clickedButton = qobject_cast<Button *>(sender());
+ QString clickedOperator = clickedButton->text();
+ double operand = display->text().toDouble();
+
+ if (!pendingMultiplicativeOperator.isEmpty()) {
+ if (!calculate(operand, pendingMultiplicativeOperator)) {
+ abortOperation();
+ return;
+ }
+ display->setText(QString::number(factorSoFar));
+ } else {
+ factorSoFar = operand;
+ }
+
+ pendingMultiplicativeOperator = clickedOperator;
+ waitingForOperand = true;
+}
+//! [18]
+
+//! [20]
+void Calculator::equalClicked()
+{
+ double operand = display->text().toDouble();
+
+ if (!pendingMultiplicativeOperator.isEmpty()) {
+ if (!calculate(operand, pendingMultiplicativeOperator)) {
+ abortOperation();
+ return;
+ }
+ operand = factorSoFar;
+ factorSoFar = 0.0;
+ pendingMultiplicativeOperator.clear();
+ }
+ if (!pendingAdditiveOperator.isEmpty()) {
+ if (!calculate(operand, pendingAdditiveOperator)) {
+ abortOperation();
+ return;
+ }
+ pendingAdditiveOperator.clear();
+ } else {
+ sumSoFar = operand;
+ }
+
+ display->setText(QString::number(sumSoFar));
+ sumSoFar = 0.0;
+ waitingForOperand = true;
+}
+//! [20]
+
+//! [22]
+void Calculator::pointClicked()
+{
+ if (waitingForOperand)
+ display->setText("0");
+ if (!display->text().contains("."))
+ display->setText(display->text() + tr("."));
+ waitingForOperand = false;
+}
+//! [22]
+
+//! [24]
+void Calculator::changeSignClicked()
+{
+ QString text = display->text();
+ double value = text.toDouble();
+
+ if (value > 0.0) {
+ text.prepend(tr("-"));
+ } else if (value < 0.0) {
+ text.remove(0, 1);
+ }
+ display->setText(text);
+}
+//! [24]
+
+//! [26]
+void Calculator::backspaceClicked()
+{
+ if (waitingForOperand)
+ return;
+
+ QString text = display->text();
+ text.chop(1);
+ if (text.isEmpty()) {
+ text = "0";
+ waitingForOperand = true;
+ }
+ display->setText(text);
+}
+//! [26]
+
+//! [28]
+void Calculator::clear()
+{
+ if (waitingForOperand)
+ return;
+
+ display->setText("0");
+ waitingForOperand = true;
+}
+//! [28]
+
+//! [30]
+void Calculator::clearAll()
+{
+ sumSoFar = 0.0;
+ factorSoFar = 0.0;
+ pendingAdditiveOperator.clear();
+ pendingMultiplicativeOperator.clear();
+ display->setText("0");
+ waitingForOperand = true;
+}
+//! [30]
+
+//! [32]
+void Calculator::clearMemory()
+{
+ sumInMemory = 0.0;
+}
+
+void Calculator::readMemory()
+{
+ display->setText(QString::number(sumInMemory));
+ waitingForOperand = true;
+}
+
+void Calculator::setMemory()
+{
+ equalClicked();
+ sumInMemory = display->text().toDouble();
+}
+
+void Calculator::addToMemory()
+{
+ equalClicked();
+ sumInMemory += display->text().toDouble();
+}
+//! [32]
+//! [34]
+Button *Calculator::createButton(const QString &text, const char *member)
+{
+ Button *button = new Button(text);
+ connect(button, SIGNAL(clicked()), this, member);
+ return button;
+}
+//! [34]
+
+//! [36]
+void Calculator::abortOperation()
+{
+ clearAll();
+ display->setText(tr("####"));
+}
+//! [36]
+
+//! [38]
+bool Calculator::calculate(double rightOperand, const QString &pendingOperator)
+{
+ if (pendingOperator == tr("+")) {
+ sumSoFar += rightOperand;
+ } else if (pendingOperator == tr("-")) {
+ sumSoFar -= rightOperand;
+ } else if (pendingOperator == tr("\327")) {
+ factorSoFar *= rightOperand;
+ } else if (pendingOperator == tr("\367")) {
+ if (rightOperand == 0.0)
+ return false;
+ factorSoFar /= rightOperand;
+ }
+ return true;
+}
+//! [38]
diff --git a/examples/widgets/calculator/calculator.h b/examples/widgets/calculator/calculator.h
new file mode 100644
index 0000000..4955c28
--- /dev/null
+++ b/examples/widgets/calculator/calculator.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATOR_H
+#define CALCULATOR_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+QT_END_NAMESPACE
+class Button;
+
+//! [0]
+class Calculator : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Calculator(QWidget *parent = 0);
+
+private slots:
+ void digitClicked();
+ void unaryOperatorClicked();
+ void additiveOperatorClicked();
+ void multiplicativeOperatorClicked();
+ void equalClicked();
+ void pointClicked();
+ void changeSignClicked();
+ void backspaceClicked();
+ void clear();
+ void clearAll();
+ void clearMemory();
+ void readMemory();
+ void setMemory();
+ void addToMemory();
+//! [0]
+
+//! [1]
+private:
+//! [1] //! [2]
+ Button *createButton(const QString &text, const char *member);
+ void abortOperation();
+ bool calculate(double rightOperand, const QString &pendingOperator);
+//! [2]
+
+//! [3]
+ double sumInMemory;
+//! [3] //! [4]
+ double sumSoFar;
+//! [4] //! [5]
+ double factorSoFar;
+//! [5] //! [6]
+ QString pendingAdditiveOperator;
+//! [6] //! [7]
+ QString pendingMultiplicativeOperator;
+//! [7] //! [8]
+ bool waitingForOperand;
+//! [8]
+
+//! [9]
+ QLineEdit *display;
+//! [9] //! [10]
+
+ enum { NumDigitButtons = 10 };
+ Button *digitButtons[NumDigitButtons];
+};
+//! [10]
+
+#endif
diff --git a/examples/widgets/calculator/calculator.pro b/examples/widgets/calculator/calculator.pro
new file mode 100644
index 0000000..a9a50d6
--- /dev/null
+++ b/examples/widgets/calculator/calculator.pro
@@ -0,0 +1,11 @@
+HEADERS = button.h \
+ calculator.h
+SOURCES = button.cpp \
+ calculator.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/calculator
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calculator.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/calculator
+INSTALLS += target sources
diff --git a/examples/widgets/calculator/main.cpp b/examples/widgets/calculator/main.cpp
new file mode 100644
index 0000000..ddb0028
--- /dev/null
+++ b/examples/widgets/calculator/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "calculator.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Calculator calc;
+ calc.show();
+ return app.exec();
+}
diff --git a/examples/widgets/calendarwidget/calendarwidget.pro b/examples/widgets/calendarwidget/calendarwidget.pro
new file mode 100644
index 0000000..9326989
--- /dev/null
+++ b/examples/widgets/calendarwidget/calendarwidget.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/calendarwidget
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendarwidget.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/calendarwidget
+INSTALLS += target sources
diff --git a/examples/widgets/calendarwidget/main.cpp b/examples/widgets/calendarwidget/main.cpp
new file mode 100644
index 0000000..a2fa399
--- /dev/null
+++ b/examples/widgets/calendarwidget/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+int main(int argv, char *args[])
+{
+ QApplication app(argv, args);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/calendarwidget/window.cpp b/examples/widgets/calendarwidget/window.cpp
new file mode 100644
index 0000000..613a30a
--- /dev/null
+++ b/examples/widgets/calendarwidget/window.cpp
@@ -0,0 +1,462 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ createPreviewGroupBox();
+ createGeneralOptionsGroupBox();
+ createDatesGroupBox();
+ createTextFormatsGroupBox();
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(previewGroupBox, 0, 0);
+ layout->addWidget(generalOptionsGroupBox, 0, 1);
+ layout->addWidget(datesGroupBox, 1, 0);
+ layout->addWidget(textFormatsGroupBox, 1, 1);
+ layout->setSizeConstraint(QLayout::SetFixedSize);
+ setLayout(layout);
+
+ previewLayout->setRowMinimumHeight(0, calendar->sizeHint().height());
+ previewLayout->setColumnMinimumWidth(0, calendar->sizeHint().width());
+
+ setWindowTitle(tr("Calendar Widget"));
+}
+//! [0]
+
+void Window::localeChanged(int index)
+{
+ calendar->setLocale(localeCombo->itemData(index).toLocale());
+}
+
+//! [1]
+void Window::firstDayChanged(int index)
+{
+ calendar->setFirstDayOfWeek(Qt::DayOfWeek(
+ firstDayCombo->itemData(index).toInt()));
+}
+//! [1]
+
+void Window::selectionModeChanged(int index)
+{
+ calendar->setSelectionMode(QCalendarWidget::SelectionMode(
+ selectionModeCombo->itemData(index).toInt()));
+}
+
+void Window::horizontalHeaderChanged(int index)
+{
+ calendar->setHorizontalHeaderFormat(QCalendarWidget::HorizontalHeaderFormat(
+ horizontalHeaderCombo->itemData(index).toInt()));
+}
+
+void Window::verticalHeaderChanged(int index)
+{
+ calendar->setVerticalHeaderFormat(QCalendarWidget::VerticalHeaderFormat(
+ verticalHeaderCombo->itemData(index).toInt()));
+}
+
+//! [2]
+void Window::selectedDateChanged()
+{
+ currentDateEdit->setDate(calendar->selectedDate());
+}
+//! [2]
+
+//! [3]
+void Window::minimumDateChanged(const QDate &date)
+{
+ calendar->setMinimumDate(date);
+ maximumDateEdit->setDate(calendar->maximumDate());
+}
+//! [3]
+
+//! [4]
+void Window::maximumDateChanged(const QDate &date)
+{
+ calendar->setMaximumDate(date);
+ minimumDateEdit->setDate(calendar->minimumDate());
+}
+//! [4]
+
+//! [5]
+void Window::weekdayFormatChanged()
+{
+ QTextCharFormat format;
+
+ format.setForeground(qvariant_cast<QColor>(
+ weekdayColorCombo->itemData(weekdayColorCombo->currentIndex())));
+ calendar->setWeekdayTextFormat(Qt::Monday, format);
+ calendar->setWeekdayTextFormat(Qt::Tuesday, format);
+ calendar->setWeekdayTextFormat(Qt::Wednesday, format);
+ calendar->setWeekdayTextFormat(Qt::Thursday, format);
+ calendar->setWeekdayTextFormat(Qt::Friday, format);
+}
+//! [5]
+
+//! [6]
+void Window::weekendFormatChanged()
+{
+ QTextCharFormat format;
+
+ format.setForeground(qvariant_cast<QColor>(
+ weekendColorCombo->itemData(weekendColorCombo->currentIndex())));
+ calendar->setWeekdayTextFormat(Qt::Saturday, format);
+ calendar->setWeekdayTextFormat(Qt::Sunday, format);
+}
+//! [6]
+
+//! [7]
+void Window::reformatHeaders()
+{
+ QString text = headerTextFormatCombo->currentText();
+ QTextCharFormat format;
+
+ if (text == tr("Bold")) {
+ format.setFontWeight(QFont::Bold);
+ } else if (text == tr("Italic")) {
+ format.setFontItalic(true);
+ } else if (text == tr("Green")) {
+ format.setForeground(Qt::green);
+ }
+ calendar->setHeaderTextFormat(format);
+}
+//! [7]
+
+//! [8]
+void Window::reformatCalendarPage()
+{
+ QTextCharFormat mayFirstFormat;
+ if (mayFirstCheckBox->isChecked())
+ mayFirstFormat.setForeground(Qt::red);
+
+ QTextCharFormat firstFridayFormat;
+ if (firstFridayCheckBox->isChecked())
+ firstFridayFormat.setForeground(Qt::blue);
+
+ QDate date(calendar->yearShown(), calendar->monthShown(), 1);
+
+ calendar->setDateTextFormat(QDate(date.year(), 5, 1), mayFirstFormat);
+
+ date.setDate(date.year(), date.month(), 1);
+ while (date.dayOfWeek() != Qt::Friday)
+ date = date.addDays(1);
+ calendar->setDateTextFormat(date, firstFridayFormat);
+}
+//! [8]
+
+//! [9]
+void Window::createPreviewGroupBox()
+{
+ previewGroupBox = new QGroupBox(tr("Preview"));
+
+ calendar = new QCalendarWidget;
+ calendar->setMinimumDate(QDate(1900, 1, 1));
+ calendar->setMaximumDate(QDate(3000, 1, 1));
+ calendar->setGridVisible(true);
+
+ connect(calendar, SIGNAL(currentPageChanged(int, int)),
+ this, SLOT(reformatCalendarPage()));
+
+ previewLayout = new QGridLayout;
+ previewLayout->addWidget(calendar, 0, 0, Qt::AlignCenter);
+ previewGroupBox->setLayout(previewLayout);
+}
+//! [9]
+
+//! [10]
+void Window::createGeneralOptionsGroupBox()
+{
+ generalOptionsGroupBox = new QGroupBox(tr("General Options"));
+
+ localeCombo = new QComboBox;
+ int curLocaleIndex = -1;
+ int index = 0;
+ for (int _lang = QLocale::C; _lang <= QLocale::LastLanguage; ++_lang) {
+ QLocale::Language lang = static_cast<QLocale::Language>(_lang);
+ QList<QLocale::Country> countries = QLocale::countriesForLanguage(lang);
+ for (int i = 0; i < countries.count(); ++i) {
+ QLocale::Country country = countries.at(i);
+ QString label = QLocale::languageToString(lang);
+ label += QLatin1Char('/');
+ label += QLocale::countryToString(country);
+ QLocale locale(lang, country);
+ if (this->locale().language() == lang && this->locale().country() == country)
+ curLocaleIndex = index;
+ localeCombo->addItem(label, locale);
+ ++index;
+ }
+ }
+ if (curLocaleIndex != -1)
+ localeCombo->setCurrentIndex(curLocaleIndex);
+ localeLabel = new QLabel(tr("&Locale"));
+ localeLabel->setBuddy(localeCombo);
+
+ firstDayCombo = new QComboBox;
+ firstDayCombo->addItem(tr("Sunday"), Qt::Sunday);
+ firstDayCombo->addItem(tr("Monday"), Qt::Monday);
+ firstDayCombo->addItem(tr("Tuesday"), Qt::Tuesday);
+ firstDayCombo->addItem(tr("Wednesday"), Qt::Wednesday);
+ firstDayCombo->addItem(tr("Thursday"), Qt::Thursday);
+ firstDayCombo->addItem(tr("Friday"), Qt::Friday);
+ firstDayCombo->addItem(tr("Saturday"), Qt::Saturday);
+
+ firstDayLabel = new QLabel(tr("Wee&k starts on:"));
+ firstDayLabel->setBuddy(firstDayCombo);
+//! [10]
+
+ selectionModeCombo = new QComboBox;
+ selectionModeCombo->addItem(tr("Single selection"),
+ QCalendarWidget::SingleSelection);
+ selectionModeCombo->addItem(tr("None"), QCalendarWidget::NoSelection);
+
+ selectionModeLabel = new QLabel(tr("&Selection mode:"));
+ selectionModeLabel->setBuddy(selectionModeCombo);
+
+ gridCheckBox = new QCheckBox(tr("&Grid"));
+ gridCheckBox->setChecked(calendar->isGridVisible());
+
+ navigationCheckBox = new QCheckBox(tr("&Navigation bar"));
+ navigationCheckBox->setChecked(true);
+
+ horizontalHeaderCombo = new QComboBox;
+ horizontalHeaderCombo->addItem(tr("Single letter day names"),
+ QCalendarWidget::SingleLetterDayNames);
+ horizontalHeaderCombo->addItem(tr("Short day names"),
+ QCalendarWidget::ShortDayNames);
+ horizontalHeaderCombo->addItem(tr("None"),
+ QCalendarWidget::NoHorizontalHeader);
+ horizontalHeaderCombo->setCurrentIndex(1);
+
+ horizontalHeaderLabel = new QLabel(tr("&Horizontal header:"));
+ horizontalHeaderLabel->setBuddy(horizontalHeaderCombo);
+
+ verticalHeaderCombo = new QComboBox;
+ verticalHeaderCombo->addItem(tr("ISO week numbers"),
+ QCalendarWidget::ISOWeekNumbers);
+ verticalHeaderCombo->addItem(tr("None"), QCalendarWidget::NoVerticalHeader);
+
+ verticalHeaderLabel = new QLabel(tr("&Vertical header:"));
+ verticalHeaderLabel->setBuddy(verticalHeaderCombo);
+
+//! [11]
+ connect(localeCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(localeChanged(int)));
+ connect(firstDayCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(firstDayChanged(int)));
+ connect(selectionModeCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(selectionModeChanged(int)));
+ connect(gridCheckBox, SIGNAL(toggled(bool)),
+ calendar, SLOT(setGridVisible(bool)));
+ connect(navigationCheckBox, SIGNAL(toggled(bool)),
+ calendar, SLOT(setNavigationBarVisible(bool)));
+ connect(horizontalHeaderCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(horizontalHeaderChanged(int)));
+ connect(verticalHeaderCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(verticalHeaderChanged(int)));
+//! [11]
+
+ QHBoxLayout *checkBoxLayout = new QHBoxLayout;
+ checkBoxLayout->addWidget(gridCheckBox);
+ checkBoxLayout->addStretch();
+ checkBoxLayout->addWidget(navigationCheckBox);
+
+ QGridLayout *outerLayout = new QGridLayout;
+ outerLayout->addWidget(localeLabel, 0, 0);
+ outerLayout->addWidget(localeCombo, 0, 1);
+ outerLayout->addWidget(firstDayLabel, 1, 0);
+ outerLayout->addWidget(firstDayCombo, 1, 1);
+ outerLayout->addWidget(selectionModeLabel, 2, 0);
+ outerLayout->addWidget(selectionModeCombo, 2, 1);
+ outerLayout->addLayout(checkBoxLayout, 3, 0, 1, 2);
+ outerLayout->addWidget(horizontalHeaderLabel, 4, 0);
+ outerLayout->addWidget(horizontalHeaderCombo, 4, 1);
+ outerLayout->addWidget(verticalHeaderLabel, 5, 0);
+ outerLayout->addWidget(verticalHeaderCombo, 5, 1);
+ generalOptionsGroupBox->setLayout(outerLayout);
+
+//! [12]
+ firstDayChanged(firstDayCombo->currentIndex());
+ selectionModeChanged(selectionModeCombo->currentIndex());
+ horizontalHeaderChanged(horizontalHeaderCombo->currentIndex());
+ verticalHeaderChanged(verticalHeaderCombo->currentIndex());
+}
+//! [12]
+
+//! [13]
+void Window::createDatesGroupBox()
+{
+ datesGroupBox = new QGroupBox(tr("Dates"));
+
+ minimumDateEdit = new QDateEdit;
+ minimumDateEdit->setDisplayFormat("MMM d yyyy");
+ minimumDateEdit->setDateRange(calendar->minimumDate(),
+ calendar->maximumDate());
+ minimumDateEdit->setDate(calendar->minimumDate());
+
+ minimumDateLabel = new QLabel(tr("&Minimum Date:"));
+ minimumDateLabel->setBuddy(minimumDateEdit);
+
+ currentDateEdit = new QDateEdit;
+ currentDateEdit->setDisplayFormat("MMM d yyyy");
+ currentDateEdit->setDate(calendar->selectedDate());
+ currentDateEdit->setDateRange(calendar->minimumDate(),
+ calendar->maximumDate());
+
+ currentDateLabel = new QLabel(tr("&Current Date:"));
+ currentDateLabel->setBuddy(currentDateEdit);
+
+ maximumDateEdit = new QDateEdit;
+ maximumDateEdit->setDisplayFormat("MMM d yyyy");
+ maximumDateEdit->setDateRange(calendar->minimumDate(),
+ calendar->maximumDate());
+ maximumDateEdit->setDate(calendar->maximumDate());
+
+ maximumDateLabel = new QLabel(tr("Ma&ximum Date:"));
+ maximumDateLabel->setBuddy(maximumDateEdit);
+
+//! [13] //! [14]
+ connect(currentDateEdit, SIGNAL(dateChanged(const QDate &)),
+ calendar, SLOT(setSelectedDate(const QDate &)));
+ connect(calendar, SIGNAL(selectionChanged()),
+ this, SLOT(selectedDateChanged()));
+ connect(minimumDateEdit, SIGNAL(dateChanged(const QDate &)),
+ this, SLOT(minimumDateChanged(const QDate &)));
+ connect(maximumDateEdit, SIGNAL(dateChanged(const QDate &)),
+ this, SLOT(maximumDateChanged(const QDate &)));
+
+//! [14]
+ QGridLayout *dateBoxLayout = new QGridLayout;
+ dateBoxLayout->addWidget(currentDateLabel, 1, 0);
+ dateBoxLayout->addWidget(currentDateEdit, 1, 1);
+ dateBoxLayout->addWidget(minimumDateLabel, 0, 0);
+ dateBoxLayout->addWidget(minimumDateEdit, 0, 1);
+ dateBoxLayout->addWidget(maximumDateLabel, 2, 0);
+ dateBoxLayout->addWidget(maximumDateEdit, 2, 1);
+ dateBoxLayout->setRowStretch(3, 1);
+
+ datesGroupBox->setLayout(dateBoxLayout);
+//! [15]
+}
+//! [15]
+
+//! [16]
+void Window::createTextFormatsGroupBox()
+{
+ textFormatsGroupBox = new QGroupBox(tr("Text Formats"));
+
+ weekdayColorCombo = createColorComboBox();
+ weekdayColorCombo->setCurrentIndex(
+ weekdayColorCombo->findText(tr("Black")));
+
+ weekdayColorLabel = new QLabel(tr("&Weekday color:"));
+ weekdayColorLabel->setBuddy(weekdayColorCombo);
+
+ weekendColorCombo = createColorComboBox();
+ weekendColorCombo->setCurrentIndex(
+ weekendColorCombo->findText(tr("Red")));
+
+ weekendColorLabel = new QLabel(tr("Week&end color:"));
+ weekendColorLabel->setBuddy(weekendColorCombo);
+
+//! [16] //! [17]
+ headerTextFormatCombo = new QComboBox;
+ headerTextFormatCombo->addItem(tr("Bold"));
+ headerTextFormatCombo->addItem(tr("Italic"));
+ headerTextFormatCombo->addItem(tr("Plain"));
+
+ headerTextFormatLabel = new QLabel(tr("&Header text:"));
+ headerTextFormatLabel->setBuddy(headerTextFormatCombo);
+
+ firstFridayCheckBox = new QCheckBox(tr("&First Friday in blue"));
+
+ mayFirstCheckBox = new QCheckBox(tr("May &1 in red"));
+
+//! [17] //! [18]
+ connect(weekdayColorCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(weekdayFormatChanged()));
+ connect(weekendColorCombo, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(weekendFormatChanged()));
+ connect(headerTextFormatCombo, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(reformatHeaders()));
+ connect(firstFridayCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(reformatCalendarPage()));
+ connect(mayFirstCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(reformatCalendarPage()));
+
+//! [18]
+ QHBoxLayout *checkBoxLayout = new QHBoxLayout;
+ checkBoxLayout->addWidget(firstFridayCheckBox);
+ checkBoxLayout->addStretch();
+ checkBoxLayout->addWidget(mayFirstCheckBox);
+
+ QGridLayout *outerLayout = new QGridLayout;
+ outerLayout->addWidget(weekdayColorLabel, 0, 0);
+ outerLayout->addWidget(weekdayColorCombo, 0, 1);
+ outerLayout->addWidget(weekendColorLabel, 1, 0);
+ outerLayout->addWidget(weekendColorCombo, 1, 1);
+ outerLayout->addWidget(headerTextFormatLabel, 2, 0);
+ outerLayout->addWidget(headerTextFormatCombo, 2, 1);
+ outerLayout->addLayout(checkBoxLayout, 3, 0, 1, 2);
+ textFormatsGroupBox->setLayout(outerLayout);
+
+ weekdayFormatChanged();
+ weekendFormatChanged();
+//! [19]
+ reformatHeaders();
+ reformatCalendarPage();
+}
+//! [19]
+
+//! [20]
+QComboBox *Window::createColorComboBox()
+{
+ QComboBox *comboBox = new QComboBox;
+ comboBox->addItem(tr("Red"), Qt::red);
+ comboBox->addItem(tr("Blue"), Qt::blue);
+ comboBox->addItem(tr("Black"), Qt::black);
+ comboBox->addItem(tr("Magenta"), Qt::magenta);
+ return comboBox;
+}
+//! [20]
diff --git a/examples/widgets/calendarwidget/window.h b/examples/widgets/calendarwidget/window.h
new file mode 100644
index 0000000..a483cf5
--- /dev/null
+++ b/examples/widgets/calendarwidget/window.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCalendarWidget;
+class QCheckBox;
+class QComboBox;
+class QDate;
+class QDateEdit;
+class QGridLayout;
+class QGroupBox;
+class QLabel;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private slots:
+ void localeChanged(int index);
+ void firstDayChanged(int index);
+ void selectionModeChanged(int index);
+ void horizontalHeaderChanged(int index);
+ void verticalHeaderChanged(int index);
+ void selectedDateChanged();
+ void minimumDateChanged(const QDate &date);
+ void maximumDateChanged(const QDate &date);
+ void weekdayFormatChanged();
+ void weekendFormatChanged();
+ void reformatHeaders();
+ void reformatCalendarPage();
+
+private:
+ void createPreviewGroupBox();
+ void createGeneralOptionsGroupBox();
+ void createDatesGroupBox();
+ void createTextFormatsGroupBox();
+ QComboBox *createColorComboBox();
+
+ QGroupBox *previewGroupBox;
+ QGridLayout *previewLayout;
+ QCalendarWidget *calendar;
+
+ QGroupBox *generalOptionsGroupBox;
+ QLabel *localeLabel;
+ QLabel *firstDayLabel;
+//! [0]
+ QLabel *selectionModeLabel;
+ QLabel *horizontalHeaderLabel;
+ QLabel *verticalHeaderLabel;
+ QComboBox *localeCombo;
+ QComboBox *firstDayCombo;
+ QComboBox *selectionModeCombo;
+ QCheckBox *gridCheckBox;
+ QCheckBox *navigationCheckBox;
+ QComboBox *horizontalHeaderCombo;
+ QComboBox *verticalHeaderCombo;
+
+ QGroupBox *datesGroupBox;
+ QLabel *currentDateLabel;
+ QLabel *minimumDateLabel;
+ QLabel *maximumDateLabel;
+ QDateEdit *currentDateEdit;
+ QDateEdit *minimumDateEdit;
+ QDateEdit *maximumDateEdit;
+
+ QGroupBox *textFormatsGroupBox;
+ QLabel *weekdayColorLabel;
+ QLabel *weekendColorLabel;
+ QLabel *headerTextFormatLabel;
+ QComboBox *weekdayColorCombo;
+ QComboBox *weekendColorCombo;
+ QComboBox *headerTextFormatCombo;
+
+ QCheckBox *firstFridayCheckBox;
+//! [1]
+ QCheckBox *mayFirstCheckBox;
+};
+//! [1]
+
+#endif
diff --git a/examples/widgets/charactermap/charactermap.pro b/examples/widgets/charactermap/charactermap.pro
new file mode 100644
index 0000000..fe0733d
--- /dev/null
+++ b/examples/widgets/charactermap/charactermap.pro
@@ -0,0 +1,11 @@
+HEADERS = characterwidget.h \
+ mainwindow.h
+SOURCES = characterwidget.cpp \
+ mainwindow.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/charactermap
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS charactermap.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/charactermap
+INSTALLS += target sources
diff --git a/examples/widgets/charactermap/characterwidget.cpp b/examples/widgets/charactermap/characterwidget.cpp
new file mode 100644
index 0000000..3409169
--- /dev/null
+++ b/examples/widgets/charactermap/characterwidget.cpp
@@ -0,0 +1,178 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "characterwidget.h"
+
+//! [0]
+CharacterWidget::CharacterWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ squareSize = 24;
+ columns = 16;
+ lastKey = -1;
+ setMouseTracking(true);
+}
+//! [0]
+
+//! [1]
+void CharacterWidget::updateFont(const QFont &font)
+{
+ displayFont.setFamily(font.family());
+ squareSize = qMax(24, QFontMetrics(displayFont).xHeight() * 3);
+ adjustSize();
+ update();
+}
+//! [1]
+
+//! [2]
+void CharacterWidget::updateSize(const QString &fontSize)
+{
+ displayFont.setPointSize(fontSize.toInt());
+ squareSize = qMax(24, QFontMetrics(displayFont).xHeight() * 3);
+ adjustSize();
+ update();
+}
+//! [2]
+
+void CharacterWidget::updateStyle(const QString &fontStyle)
+{
+ QFontDatabase fontDatabase;
+ const QFont::StyleStrategy oldStrategy = displayFont.styleStrategy();
+ displayFont = fontDatabase.font(displayFont.family(), fontStyle, displayFont.pointSize());
+ displayFont.setStyleStrategy(oldStrategy);
+ squareSize = qMax(24, QFontMetrics(displayFont).xHeight() * 3);
+ adjustSize();
+ update();
+}
+
+void CharacterWidget::updateFontMerging(bool enable)
+{
+ if (enable)
+ displayFont.setStyleStrategy(QFont::PreferDefault);
+ else
+ displayFont.setStyleStrategy(QFont::NoFontMerging);
+ adjustSize();
+ update();
+}
+
+//! [3]
+QSize CharacterWidget::sizeHint() const
+{
+ return QSize(columns*squareSize, (65536/columns)*squareSize);
+}
+//! [3]
+
+//! [4]
+void CharacterWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ QPoint widgetPosition = mapFromGlobal(event->globalPos());
+ uint key = (widgetPosition.y()/squareSize)*columns + widgetPosition.x()/squareSize;
+
+ QString text = QString::fromLatin1("<p>Character: <span style=\"font-size: 24pt; font-family: %1\">").arg(displayFont.family())
+ + QChar(key)
+ + QString::fromLatin1("</span><p>Value: 0x")
+ + QString::number(key, 16);
+ QToolTip::showText(event->globalPos(), text, this);
+}
+//! [4]
+
+//! [5]
+void CharacterWidget::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ lastKey = (event->y()/squareSize)*columns + event->x()/squareSize;
+ if (QChar(lastKey).category() != QChar::NoCategory)
+ emit characterSelected(QString(QChar(lastKey)));
+ update();
+ }
+ else
+ QWidget::mousePressEvent(event);
+}
+//! [5]
+
+//! [6]
+void CharacterWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter painter(this);
+ painter.fillRect(event->rect(), QBrush(Qt::white));
+ painter.setFont(displayFont);
+//! [6]
+
+//! [7]
+ QRect redrawRect = event->rect();
+ int beginRow = redrawRect.top()/squareSize;
+ int endRow = redrawRect.bottom()/squareSize;
+ int beginColumn = redrawRect.left()/squareSize;
+ int endColumn = redrawRect.right()/squareSize;
+//! [7]
+
+//! [8]
+ painter.setPen(QPen(Qt::gray));
+ for (int row = beginRow; row <= endRow; ++row) {
+ for (int column = beginColumn; column <= endColumn; ++column) {
+ painter.drawRect(column*squareSize, row*squareSize, squareSize, squareSize);
+ }
+//! [8] //! [9]
+ }
+//! [9]
+
+//! [10]
+ QFontMetrics fontMetrics(displayFont);
+ painter.setPen(QPen(Qt::black));
+ for (int row = beginRow; row <= endRow; ++row) {
+
+ for (int column = beginColumn; column <= endColumn; ++column) {
+
+ int key = row*columns + column;
+ painter.setClipRect(column*squareSize, row*squareSize, squareSize, squareSize);
+
+ if (key == lastKey)
+ painter.fillRect(column*squareSize + 1, row*squareSize + 1, squareSize, squareSize, QBrush(Qt::red));
+
+ painter.drawText(column*squareSize + (squareSize / 2) - fontMetrics.width(QChar(key))/2,
+ row*squareSize + 4 + fontMetrics.ascent(),
+ QString(QChar(key)));
+ }
+ }
+}
+//! [10]
diff --git a/examples/widgets/charactermap/characterwidget.h b/examples/widgets/charactermap/characterwidget.h
new file mode 100644
index 0000000..aa95963
--- /dev/null
+++ b/examples/widgets/charactermap/characterwidget.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHARACTERWIDGET_H
+#define CHARACTERWIDGET_H
+
+#include <QFont>
+#include <QPoint>
+#include <QSize>
+#include <QString>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QMouseEvent;
+class QPaintEvent;
+QT_END_NAMESPACE
+
+//! [0]
+class CharacterWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CharacterWidget(QWidget *parent = 0);
+ QSize sizeHint() const;
+
+public slots:
+ void updateFont(const QFont &font);
+ void updateSize(const QString &fontSize);
+ void updateStyle(const QString &fontStyle);
+ void updateFontMerging(bool enable);
+
+signals:
+ void characterSelected(const QString &character);
+
+protected:
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ QFont displayFont;
+ int columns;
+ int lastKey;
+ int squareSize;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/charactermap/main.cpp b/examples/widgets/charactermap/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/widgets/charactermap/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/charactermap/mainwindow.cpp b/examples/widgets/charactermap/mainwindow.cpp
new file mode 100644
index 0000000..a1e206b
--- /dev/null
+++ b/examples/widgets/charactermap/mainwindow.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "characterwidget.h"
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ QWidget *centralWidget = new QWidget;
+
+ QLabel *fontLabel = new QLabel(tr("Font:"));
+ fontCombo = new QFontComboBox;
+ QLabel *sizeLabel = new QLabel(tr("Size:"));
+ sizeCombo = new QComboBox;
+ QLabel *styleLabel = new QLabel(tr("Style:"));
+ styleCombo = new QComboBox;
+ QLabel *fontMergingLabel = new QLabel(tr("Automatic Font Merging:"));
+ fontMerging = new QCheckBox;
+ fontMerging->setChecked(true);
+
+ scrollArea = new QScrollArea;
+ characterWidget = new CharacterWidget;
+ scrollArea->setWidget(characterWidget);
+//! [0]
+
+//! [1]
+ findStyles(fontCombo->currentFont());
+//! [1]
+ findSizes(fontCombo->currentFont());
+
+//! [2]
+ lineEdit = new QLineEdit;
+ QPushButton *clipboardButton = new QPushButton(tr("&To clipboard"));
+//! [2]
+
+//! [3]
+ clipboard = QApplication::clipboard();
+//! [3]
+
+//! [4]
+ connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)),
+ this, SLOT(findStyles(const QFont &)));
+ connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)),
+ this, SLOT(findSizes(const QFont &)));
+ connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)),
+ characterWidget, SLOT(updateFont(const QFont &)));
+ connect(sizeCombo, SIGNAL(currentIndexChanged(const QString &)),
+ characterWidget, SLOT(updateSize(const QString &)));
+ connect(styleCombo, SIGNAL(currentIndexChanged(const QString &)),
+ characterWidget, SLOT(updateStyle(const QString &)));
+//! [4] //! [5]
+ connect(characterWidget, SIGNAL(characterSelected(const QString &)),
+ this, SLOT(insertCharacter(const QString &)));
+ connect(clipboardButton, SIGNAL(clicked()), this, SLOT(updateClipboard()));
+//! [5]
+ connect(fontMerging, SIGNAL(toggled(bool)), characterWidget, SLOT(updateFontMerging(bool)));
+
+//! [6]
+ QHBoxLayout *controlsLayout = new QHBoxLayout;
+ controlsLayout->addWidget(fontLabel);
+ controlsLayout->addWidget(fontCombo, 1);
+ controlsLayout->addWidget(sizeLabel);
+ controlsLayout->addWidget(sizeCombo, 1);
+ controlsLayout->addWidget(styleLabel);
+ controlsLayout->addWidget(styleCombo, 1);
+ controlsLayout->addWidget(fontMergingLabel);
+ controlsLayout->addWidget(fontMerging, 1);
+ controlsLayout->addStretch(1);
+
+ QHBoxLayout *lineLayout = new QHBoxLayout;
+ lineLayout->addWidget(lineEdit, 1);
+ lineLayout->addSpacing(12);
+ lineLayout->addWidget(clipboardButton);
+
+ QVBoxLayout *centralLayout = new QVBoxLayout;
+ centralLayout->addLayout(controlsLayout);
+ centralLayout->addWidget(scrollArea, 1);
+ centralLayout->addSpacing(4);
+ centralLayout->addLayout(lineLayout);
+ centralWidget->setLayout(centralLayout);
+
+ setCentralWidget(centralWidget);
+ setWindowTitle(tr("Character Map"));
+}
+//! [6]
+
+//! [7]
+void MainWindow::findStyles(const QFont &font)
+{
+ QFontDatabase fontDatabase;
+ QString currentItem = styleCombo->currentText();
+ styleCombo->clear();
+//! [7]
+
+//! [8]
+ QString style;
+ foreach (style, fontDatabase.styles(font.family()))
+ styleCombo->addItem(style);
+
+ int styleIndex = styleCombo->findText(currentItem);
+
+ if (styleIndex == -1)
+ styleCombo->setCurrentIndex(0);
+ else
+ styleCombo->setCurrentIndex(styleIndex);
+}
+//! [8]
+
+void MainWindow::findSizes(const QFont &font)
+{
+ QFontDatabase fontDatabase;
+ QString currentSize = sizeCombo->currentText();
+ sizeCombo->blockSignals(true);
+ sizeCombo->clear();
+
+ int size;
+ if(fontDatabase.isSmoothlyScalable(font.family(), fontDatabase.styleString(font))) {
+ foreach(size, QFontDatabase::standardSizes()) {
+ sizeCombo->addItem(QVariant(size).toString());
+ sizeCombo->setEditable(true);
+ }
+
+ } else {
+ foreach(size, fontDatabase.smoothSizes(font.family(), fontDatabase.styleString(font))) {
+ sizeCombo->addItem(QVariant(size).toString());
+ sizeCombo->setEditable(false);
+ }
+ }
+
+ sizeCombo->blockSignals(false);
+
+ int sizeIndex = sizeCombo->findText(currentSize);
+
+ if(sizeIndex == -1)
+ sizeCombo->setCurrentIndex(qMax(0, sizeCombo->count() / 3));
+ else
+ sizeCombo->setCurrentIndex(sizeIndex);
+}
+
+//! [9]
+void MainWindow::insertCharacter(const QString &character)
+{
+ lineEdit->insert(character);
+}
+//! [9]
+
+//! [10]
+void MainWindow::updateClipboard()
+{
+//! [11]
+ clipboard->setText(lineEdit->text(), QClipboard::Clipboard);
+//! [11]
+ clipboard->setText(lineEdit->text(), QClipboard::Selection);
+}
+//! [10]
diff --git a/examples/widgets/charactermap/mainwindow.h b/examples/widgets/charactermap/mainwindow.h
new file mode 100644
index 0000000..3f3208c
--- /dev/null
+++ b/examples/widgets/charactermap/mainwindow.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QString>
+
+QT_BEGIN_NAMESPACE
+class QClipboard;
+class QComboBox;
+class QFontComboBox;
+class QLineEdit;
+class QScrollArea;
+class QCheckBox;
+QT_END_NAMESPACE
+class CharacterWidget;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void findStyles(const QFont &font);
+ void findSizes(const QFont &font);
+ void insertCharacter(const QString &character);
+ void updateClipboard();
+
+private:
+ CharacterWidget *characterWidget;
+ QClipboard *clipboard;
+ QComboBox *styleCombo;
+ QComboBox *sizeCombo;
+ QFontComboBox *fontCombo;
+ QLineEdit *lineEdit;
+ QScrollArea *scrollArea;
+ QCheckBox *fontMerging;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/codeeditor/codeeditor.cpp b/examples/widgets/codeeditor/codeeditor.cpp
new file mode 100644
index 0000000..b855c7a
--- /dev/null
+++ b/examples/widgets/codeeditor/codeeditor.cpp
@@ -0,0 +1,171 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <codeeditor.h>
+
+//![constructor]
+
+CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent)
+{
+ lineNumberArea = new LineNumberArea(this);
+
+ connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int)));
+ connect(this, SIGNAL(updateRequest(const QRect &, int)), this, SLOT(updateLineNumberArea(const QRect &, int)));
+ connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine()));
+
+ updateLineNumberAreaWidth(0);
+ highlightCurrentLine();
+}
+
+//![constructor]
+
+//![extraAreaWidth]
+
+int CodeEditor::lineNumberAreaWidth()
+{
+ int digits = 1;
+ int max = qMax(1, blockCount());
+ while (max >= 10) {
+ max /= 10;
+ ++digits;
+ }
+
+ int space = 3 + fontMetrics().width(QLatin1Char('9')) * digits;
+
+ return space;
+}
+
+//![extraAreaWidth]
+
+//![slotUpdateExtraAreaWidth]
+
+void CodeEditor::updateLineNumberAreaWidth(int /* newBlockCount */)
+{
+ setViewportMargins(lineNumberAreaWidth(), 0, 0, 0);
+}
+
+//![slotUpdateExtraAreaWidth]
+
+//![slotUpdateRequest]
+
+void CodeEditor::updateLineNumberArea(const QRect &rect, int dy)
+{
+ if (dy)
+ lineNumberArea->scroll(0, dy);
+ else
+ lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height());
+
+ if (rect.contains(viewport()->rect()))
+ updateLineNumberAreaWidth(0);
+}
+
+//![slotUpdateRequest]
+
+//![resizeEvent]
+
+void CodeEditor::resizeEvent(QResizeEvent *e)
+{
+ QPlainTextEdit::resizeEvent(e);
+
+ QRect cr = contentsRect();
+ lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height()));
+}
+
+//![resizeEvent]
+
+//![cursorPositionChanged]
+
+void CodeEditor::highlightCurrentLine()
+{
+ QList<QTextEdit::ExtraSelection> extraSelections;
+
+ if (!isReadOnly()) {
+ QTextEdit::ExtraSelection selection;
+
+ QColor lineColor = QColor(Qt::yellow).lighter(160);
+
+ selection.format.setBackground(lineColor);
+ selection.format.setProperty(QTextFormat::FullWidthSelection, true);
+ selection.cursor = textCursor();
+ selection.cursor.clearSelection();
+ extraSelections.append(selection);
+ }
+
+ setExtraSelections(extraSelections);
+}
+
+//![cursorPositionChanged]
+
+//![extraAreaPaintEvent_0]
+
+void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
+{
+ QPainter painter(lineNumberArea);
+ painter.fillRect(event->rect(), Qt::lightGray);
+
+//![extraAreaPaintEvent_0]
+
+//![extraAreaPaintEvent_1]
+ QTextBlock block = firstVisibleBlock();
+ int blockNumber = block.blockNumber();
+ int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top();
+ int bottom = top + (int) blockBoundingRect(block).height();
+//![extraAreaPaintEvent_1]
+
+//![extraAreaPaintEvent_2]
+ while (block.isValid() && top <= event->rect().bottom()) {
+ if (block.isVisible() && bottom >= event->rect().top()) {
+ QString number = QString::number(blockNumber + 1);
+ painter.setPen(Qt::black);
+ painter.drawText(0, top, lineNumberArea->width(), fontMetrics().height(),
+ Qt::AlignRight, number);
+ }
+
+ block = block.next();
+ top = bottom;
+ bottom = top + (int) blockBoundingRect(block).height();
+ ++blockNumber;
+ }
+}
+//![extraAreaPaintEvent_2]
+
diff --git a/examples/widgets/codeeditor/codeeditor.h b/examples/widgets/codeeditor/codeeditor.h
new file mode 100644
index 0000000..51ecf11
--- /dev/null
+++ b/examples/widgets/codeeditor/codeeditor.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CODEEDITOR_H
+#define CODEEDITOR_H
+
+#include <QPlainTextEdit>
+#include <QObject>
+
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+class QResizeEvent;
+class QSize;
+class QWidget;
+QT_END_NAMESPACE
+
+class LineNumberArea;
+
+//![codeeditordefinition]
+
+class CodeEditor : public QPlainTextEdit
+{
+ Q_OBJECT
+
+public:
+ CodeEditor(QWidget *parent = 0);
+
+ void lineNumberAreaPaintEvent(QPaintEvent *event);
+ int lineNumberAreaWidth();
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private slots:
+ void updateLineNumberAreaWidth(int newBlockCount);
+ void highlightCurrentLine();
+ void updateLineNumberArea(const QRect &, int);
+
+private:
+ QWidget *lineNumberArea;
+};
+
+//![codeeditordefinition]
+//![extraarea]
+
+class LineNumberArea : public QWidget
+{
+public:
+ LineNumberArea(CodeEditor *editor) : QWidget(editor) {
+ codeEditor = editor;
+ }
+
+ QSize sizeHint() const {
+ return QSize(codeEditor->lineNumberAreaWidth(), 0);
+ }
+
+protected:
+ void paintEvent(QPaintEvent *event) {
+ codeEditor->lineNumberAreaPaintEvent(event);
+ }
+
+private:
+ CodeEditor *codeEditor;
+};
+
+//![extraarea]
+
+#endif
diff --git a/examples/widgets/codeeditor/codeeditor.pro b/examples/widgets/codeeditor/codeeditor.pro
new file mode 100644
index 0000000..a94a5e0
--- /dev/null
+++ b/examples/widgets/codeeditor/codeeditor.pro
@@ -0,0 +1,9 @@
+HEADERS = codeeditor.h
+SOURCES = main.cpp \
+ codeeditor.cpp
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/codeeditor
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/codeeditor
+INSTALLS += target sources
+
diff --git a/examples/widgets/codeeditor/main.cpp b/examples/widgets/codeeditor/main.cpp
new file mode 100644
index 0000000..a8b26c9
--- /dev/null
+++ b/examples/widgets/codeeditor/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "codeeditor.h"
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ CodeEditor editor;
+ editor.setWindowTitle(QObject::tr("Code Editor Example"));
+ editor.show();
+
+ return app.exec();
+}
+
diff --git a/examples/widgets/digitalclock/digitalclock.cpp b/examples/widgets/digitalclock/digitalclock.cpp
new file mode 100644
index 0000000..5bc9292
--- /dev/null
+++ b/examples/widgets/digitalclock/digitalclock.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "digitalclock.h"
+
+//! [0]
+DigitalClock::DigitalClock(QWidget *parent)
+ : QLCDNumber(parent)
+{
+ setSegmentStyle(Filled);
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(showTime()));
+ timer->start(1000);
+
+ showTime();
+
+ setWindowTitle(tr("Digital Clock"));
+ resize(150, 60);
+}
+//! [0]
+
+//! [1]
+void DigitalClock::showTime()
+//! [1] //! [2]
+{
+ QTime time = QTime::currentTime();
+ QString text = time.toString("hh:mm");
+ if ((time.second() % 2) == 0)
+ text[2] = ' ';
+ display(text);
+}
+//! [2]
diff --git a/examples/widgets/digitalclock/digitalclock.h b/examples/widgets/digitalclock/digitalclock.h
new file mode 100644
index 0000000..4bf26bc
--- /dev/null
+++ b/examples/widgets/digitalclock/digitalclock.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIGITALCLOCK_H
+#define DIGITALCLOCK_H
+
+#include <QLCDNumber>
+
+//! [0]
+class DigitalClock : public QLCDNumber
+{
+ Q_OBJECT
+
+public:
+ DigitalClock(QWidget *parent = 0);
+
+private slots:
+ void showTime();
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/digitalclock/digitalclock.pro b/examples/widgets/digitalclock/digitalclock.pro
new file mode 100644
index 0000000..b87b4a0
--- /dev/null
+++ b/examples/widgets/digitalclock/digitalclock.pro
@@ -0,0 +1,9 @@
+HEADERS = digitalclock.h
+SOURCES = digitalclock.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/digitalclock
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS digitalclock.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/digitalclock
+INSTALLS += target sources
diff --git a/examples/widgets/digitalclock/main.cpp b/examples/widgets/digitalclock/main.cpp
new file mode 100644
index 0000000..9e7e16d
--- /dev/null
+++ b/examples/widgets/digitalclock/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "digitalclock.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ DigitalClock clock;
+ clock.show();
+ return app.exec();
+}
diff --git a/examples/widgets/groupbox/groupbox.pro b/examples/widgets/groupbox/groupbox.pro
new file mode 100644
index 0000000..7175f66
--- /dev/null
+++ b/examples/widgets/groupbox/groupbox.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = window.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/groupbox
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS groupbox.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/groupbox
+INSTALLS += target sources
diff --git a/examples/widgets/groupbox/main.cpp b/examples/widgets/groupbox/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/widgets/groupbox/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/groupbox/window.cpp b/examples/widgets/groupbox/window.cpp
new file mode 100644
index 0000000..8acc307
--- /dev/null
+++ b/examples/widgets/groupbox/window.cpp
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window(QWidget *parent)
+ : QWidget(parent)
+{
+ QGridLayout *grid = new QGridLayout;
+ grid->addWidget(createFirstExclusiveGroup(), 0, 0);
+ grid->addWidget(createSecondExclusiveGroup(), 1, 0);
+ grid->addWidget(createNonExclusiveGroup(), 0, 1);
+ grid->addWidget(createPushButtonGroup(), 1, 1);
+ setLayout(grid);
+
+ setWindowTitle(tr("Group Boxes"));
+ resize(480, 320);
+}
+//! [0]
+
+//! [1]
+QGroupBox *Window::createFirstExclusiveGroup()
+{
+//! [2]
+ QGroupBox *groupBox = new QGroupBox(tr("Exclusive Radio Buttons"));
+
+ QRadioButton *radio1 = new QRadioButton(tr("&Radio button 1"));
+ QRadioButton *radio2 = new QRadioButton(tr("R&adio button 2"));
+ QRadioButton *radio3 = new QRadioButton(tr("Ra&dio button 3"));
+
+ radio1->setChecked(true);
+//! [1] //! [3]
+
+ QVBoxLayout *vbox = new QVBoxLayout;
+ vbox->addWidget(radio1);
+ vbox->addWidget(radio2);
+ vbox->addWidget(radio3);
+ vbox->addStretch(1);
+ groupBox->setLayout(vbox);
+//! [2]
+
+ return groupBox;
+}
+//! [3]
+
+//! [4]
+QGroupBox *Window::createSecondExclusiveGroup()
+{
+ QGroupBox *groupBox = new QGroupBox(tr("E&xclusive Radio Buttons"));
+ groupBox->setCheckable(true);
+ groupBox->setChecked(false);
+//! [4]
+
+//! [5]
+ QRadioButton *radio1 = new QRadioButton(tr("Rad&io button 1"));
+ QRadioButton *radio2 = new QRadioButton(tr("Radi&o button 2"));
+ QRadioButton *radio3 = new QRadioButton(tr("Radio &button 3"));
+ radio1->setChecked(true);
+ QCheckBox *checkBox = new QCheckBox(tr("Ind&ependent checkbox"));
+ checkBox->setChecked(true);
+//! [5]
+
+//! [6]
+ QVBoxLayout *vbox = new QVBoxLayout;
+ vbox->addWidget(radio1);
+ vbox->addWidget(radio2);
+ vbox->addWidget(radio3);
+ vbox->addWidget(checkBox);
+ vbox->addStretch(1);
+ groupBox->setLayout(vbox);
+
+ return groupBox;
+}
+//! [6]
+
+//! [7]
+QGroupBox *Window::createNonExclusiveGroup()
+{
+ QGroupBox *groupBox = new QGroupBox(tr("Non-Exclusive Checkboxes"));
+ groupBox->setFlat(true);
+//! [7]
+
+//! [8]
+ QCheckBox *checkBox1 = new QCheckBox(tr("&Checkbox 1"));
+ QCheckBox *checkBox2 = new QCheckBox(tr("C&heckbox 2"));
+ checkBox2->setChecked(true);
+ QCheckBox *tristateBox = new QCheckBox(tr("Tri-&state button"));
+ tristateBox->setTristate(true);
+//! [8]
+ tristateBox->setCheckState(Qt::PartiallyChecked);
+
+//! [9]
+ QVBoxLayout *vbox = new QVBoxLayout;
+ vbox->addWidget(checkBox1);
+ vbox->addWidget(checkBox2);
+ vbox->addWidget(tristateBox);
+ vbox->addStretch(1);
+ groupBox->setLayout(vbox);
+
+ return groupBox;
+}
+//! [9]
+
+//! [10]
+QGroupBox *Window::createPushButtonGroup()
+{
+ QGroupBox *groupBox = new QGroupBox(tr("&Push Buttons"));
+ groupBox->setCheckable(true);
+ groupBox->setChecked(true);
+//! [10]
+
+//! [11]
+ QPushButton *pushButton = new QPushButton(tr("&Normal Button"));
+ QPushButton *toggleButton = new QPushButton(tr("&Toggle Button"));
+ toggleButton->setCheckable(true);
+ toggleButton->setChecked(true);
+ QPushButton *flatButton = new QPushButton(tr("&Flat Button"));
+ flatButton->setFlat(true);
+//! [11]
+
+//! [12]
+ QPushButton *popupButton = new QPushButton(tr("Pop&up Button"));
+ QMenu *menu = new QMenu(this);
+ menu->addAction(tr("&First Item"));
+ menu->addAction(tr("&Second Item"));
+ menu->addAction(tr("&Third Item"));
+ menu->addAction(tr("F&ourth Item"));
+ popupButton->setMenu(menu);
+//! [12]
+
+ QAction *newAction = menu->addAction(tr("Submenu"));
+ QMenu *subMenu = new QMenu(tr("Popup Submenu"));
+ subMenu->addAction(tr("Item 1"));
+ subMenu->addAction(tr("Item 2"));
+ subMenu->addAction(tr("Item 3"));
+ newAction->setMenu(subMenu);
+
+//! [13]
+ QVBoxLayout *vbox = new QVBoxLayout;
+ vbox->addWidget(pushButton);
+ vbox->addWidget(toggleButton);
+ vbox->addWidget(flatButton);
+ vbox->addWidget(popupButton);
+ vbox->addStretch(1);
+ groupBox->setLayout(vbox);
+
+ return groupBox;
+}
+//! [13]
diff --git a/examples/widgets/groupbox/window.h b/examples/widgets/groupbox/window.h
new file mode 100644
index 0000000..9f196fd
--- /dev/null
+++ b/examples/widgets/groupbox/window.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QGroupBox;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window(QWidget *parent = 0);
+
+private:
+ QGroupBox *createFirstExclusiveGroup();
+ QGroupBox *createSecondExclusiveGroup();
+ QGroupBox *createNonExclusiveGroup();
+ QGroupBox *createPushButtonGroup();
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/icons/iconpreviewarea.cpp b/examples/widgets/icons/iconpreviewarea.cpp
new file mode 100644
index 0000000..d80d41d
--- /dev/null
+++ b/examples/widgets/icons/iconpreviewarea.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "iconpreviewarea.h"
+
+//! [0]
+IconPreviewArea::IconPreviewArea(QWidget *parent)
+ : QWidget(parent)
+{
+ QGridLayout *mainLayout = new QGridLayout;
+ setLayout(mainLayout);
+
+ stateLabels[0] = createHeaderLabel(tr("Off"));
+ stateLabels[1] = createHeaderLabel(tr("On"));
+ Q_ASSERT(NumStates == 2);
+
+ modeLabels[0] = createHeaderLabel(tr("Normal"));
+ modeLabels[1] = createHeaderLabel(tr("Active"));
+ modeLabels[2] = createHeaderLabel(tr("Disabled"));
+ modeLabels[3] = createHeaderLabel(tr("Selected"));
+ Q_ASSERT(NumModes == 4);
+
+ for (int j = 0; j < NumStates; ++j)
+ mainLayout->addWidget(stateLabels[j], j + 1, 0);
+
+ for (int i = 0; i < NumModes; ++i) {
+ mainLayout->addWidget(modeLabels[i], 0, i + 1);
+
+ for (int j = 0; j < NumStates; ++j) {
+ pixmapLabels[i][j] = createPixmapLabel();
+ mainLayout->addWidget(pixmapLabels[i][j], j + 1, i + 1);
+ }
+ }
+}
+//! [0]
+
+//! [1]
+void IconPreviewArea::setIcon(const QIcon &icon)
+{
+ this->icon = icon;
+ updatePixmapLabels();
+}
+//! [1]
+
+//! [2]
+void IconPreviewArea::setSize(const QSize &size)
+{
+ if (size != this->size) {
+ this->size = size;
+ updatePixmapLabels();
+ }
+}
+//! [2]
+
+//! [3]
+QLabel *IconPreviewArea::createHeaderLabel(const QString &text)
+{
+ QLabel *label = new QLabel(tr("<b>%1</b>").arg(text));
+ label->setAlignment(Qt::AlignCenter);
+ return label;
+}
+//! [3]
+
+//! [4]
+QLabel *IconPreviewArea::createPixmapLabel()
+{
+ QLabel *label = new QLabel;
+ label->setEnabled(false);
+ label->setAlignment(Qt::AlignCenter);
+ label->setFrameShape(QFrame::Box);
+ label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ label->setBackgroundRole(QPalette::Base);
+ label->setAutoFillBackground(true);
+ label->setMinimumSize(132, 132);
+ return label;
+}
+//! [4]
+
+//! [5]
+void IconPreviewArea::updatePixmapLabels()
+{
+ for (int i = 0; i < NumModes; ++i) {
+ QIcon::Mode mode;
+ if (i == 0) {
+ mode = QIcon::Normal;
+ } else if (i == 1) {
+ mode = QIcon::Active;
+ } else if (i == 2) {
+ mode = QIcon::Disabled;
+ } else {
+ mode = QIcon::Selected;
+ }
+
+ for (int j = 0; j < NumStates; ++j) {
+ QIcon::State state = (j == 0) ? QIcon::Off : QIcon::On;
+ QPixmap pixmap = icon.pixmap(size, mode, state);
+ pixmapLabels[i][j]->setPixmap(pixmap);
+ pixmapLabels[i][j]->setEnabled(!pixmap.isNull());
+ }
+ }
+}
+//! [5]
diff --git a/examples/widgets/icons/iconpreviewarea.h b/examples/widgets/icons/iconpreviewarea.h
new file mode 100644
index 0000000..9b915a4
--- /dev/null
+++ b/examples/widgets/icons/iconpreviewarea.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ICONPREVIEWAREA_H
+#define ICONPREVIEWAREA_H
+
+#include <QIcon>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+
+//! [0]
+class IconPreviewArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ IconPreviewArea(QWidget *parent = 0);
+
+ void setIcon(const QIcon &icon);
+ void setSize(const QSize &size);
+
+private:
+ QLabel *createHeaderLabel(const QString &text);
+ QLabel *createPixmapLabel();
+ void updatePixmapLabels();
+
+ enum { NumModes = 4, NumStates = 2 };
+
+ QIcon icon;
+ QSize size;
+ QLabel *stateLabels[NumStates];
+ QLabel *modeLabels[NumModes];
+ QLabel *pixmapLabels[NumModes][NumStates];
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/icons/icons.pro b/examples/widgets/icons/icons.pro
new file mode 100644
index 0000000..3b432d9
--- /dev/null
+++ b/examples/widgets/icons/icons.pro
@@ -0,0 +1,25 @@
+HEADERS = iconpreviewarea.h \
+ iconsizespinbox.h \
+ imagedelegate.h \
+ mainwindow.h
+SOURCES = iconpreviewarea.cpp \
+ iconsizespinbox.cpp \
+ imagedelegate.cpp \
+ main.cpp \
+ mainwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/icons
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS icons.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/icons
+INSTALLS += target sources
+
+wince*: {
+ imageFiles.sources = images/*
+ wincewm*: {
+ imageFiles.path = "/My Documents/My Pictures"
+ } else {
+ imageFiles.path = images
+ }
+ DEPLOYMENT += imageFiles
+}
diff --git a/examples/widgets/icons/iconsizespinbox.cpp b/examples/widgets/icons/iconsizespinbox.cpp
new file mode 100644
index 0000000..22f45e9
--- /dev/null
+++ b/examples/widgets/icons/iconsizespinbox.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "iconsizespinbox.h"
+
+//! [0]
+IconSizeSpinBox::IconSizeSpinBox(QWidget *parent)
+ : QSpinBox(parent)
+{
+}
+//! [0]
+
+//! [1]
+int IconSizeSpinBox::valueFromText(const QString &text) const
+{
+ QRegExp regExp(tr("(\\d+)(\\s*[xx]\\s*\\d+)?"));
+
+ if (regExp.exactMatch(text)) {
+ return regExp.cap(1).toInt();
+ } else {
+ return 0;
+ }
+}
+//! [1]
+
+//! [2]
+QString IconSizeSpinBox::textFromValue(int value) const
+{
+ return tr("%1 x %1").arg(value);
+}
+//! [2]
diff --git a/examples/widgets/icons/iconsizespinbox.h b/examples/widgets/icons/iconsizespinbox.h
new file mode 100644
index 0000000..ea84dc7
--- /dev/null
+++ b/examples/widgets/icons/iconsizespinbox.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ICONSIZESPINBOX_H
+#define ICONSIZESPINBOX_H
+
+#include <QSpinBox>
+
+//! [0]
+class IconSizeSpinBox : public QSpinBox
+{
+ Q_OBJECT
+
+public:
+ IconSizeSpinBox(QWidget *parent = 0);
+
+ int valueFromText(const QString &text) const;
+ QString textFromValue(int value) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/icons/imagedelegate.cpp b/examples/widgets/icons/imagedelegate.cpp
new file mode 100644
index 0000000..e8e79b3
--- /dev/null
+++ b/examples/widgets/icons/imagedelegate.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imagedelegate.h"
+
+//! [0]
+ImageDelegate::ImageDelegate(QObject *parent)
+ : QItemDelegate(parent)
+{
+}
+//! [0]
+
+//! [1]
+QWidget *ImageDelegate::createEditor(QWidget *parent,
+ const QStyleOptionViewItem & /* option */,
+ const QModelIndex &index) const
+{
+ QComboBox *comboBox = new QComboBox(parent);
+ if (index.column() == 1) {
+ comboBox->addItem(tr("Normal"));
+ comboBox->addItem(tr("Active"));
+ comboBox->addItem(tr("Disabled"));
+ comboBox->addItem(tr("Selected"));
+ } else if (index.column() == 2) {
+ comboBox->addItem(tr("Off"));
+ comboBox->addItem(tr("On"));
+ }
+
+ connect(comboBox, SIGNAL(activated(int)), this, SLOT(emitCommitData()));
+
+ return comboBox;
+}
+//! [1]
+
+//! [2]
+void ImageDelegate::setEditorData(QWidget *editor,
+ const QModelIndex &index) const
+{
+ QComboBox *comboBox = qobject_cast<QComboBox *>(editor);
+ if (!comboBox)
+ return;
+
+ int pos = comboBox->findText(index.model()->data(index).toString(),
+ Qt::MatchExactly);
+ comboBox->setCurrentIndex(pos);
+}
+//! [2]
+
+//! [3]
+void ImageDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const
+{
+ QComboBox *comboBox = qobject_cast<QComboBox *>(editor);
+ if (!comboBox)
+ return;
+
+ model->setData(index, comboBox->currentText());
+}
+//! [3]
+
+//! [4]
+void ImageDelegate::emitCommitData()
+{
+ emit commitData(qobject_cast<QWidget *>(sender()));
+}
+//! [4]
diff --git a/examples/widgets/icons/imagedelegate.h b/examples/widgets/icons/imagedelegate.h
new file mode 100644
index 0000000..638c0eb
--- /dev/null
+++ b/examples/widgets/icons/imagedelegate.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEDELEGATE_H
+#define IMAGEDELEGATE_H
+
+#include <QItemDelegate>
+
+//! [0]
+class ImageDelegate : public QItemDelegate
+{
+ Q_OBJECT
+
+public:
+ ImageDelegate(QObject *parent = 0);
+//! [0]
+
+//! [1]
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const;
+ void setEditorData(QWidget *editor, const QModelIndex &index) const;
+ void setModelData(QWidget *editor, QAbstractItemModel *model,
+ const QModelIndex &index) const;
+
+//! [1] //! [2]
+private slots:
+ void emitCommitData();
+};
+//! [2]
+
+#endif
diff --git a/examples/widgets/icons/images/designer.png b/examples/widgets/icons/images/designer.png
new file mode 100644
index 0000000..0988fce
--- /dev/null
+++ b/examples/widgets/icons/images/designer.png
Binary files differ
diff --git a/examples/widgets/icons/images/find_disabled.png b/examples/widgets/icons/images/find_disabled.png
new file mode 100644
index 0000000..e85e33f
--- /dev/null
+++ b/examples/widgets/icons/images/find_disabled.png
Binary files differ
diff --git a/examples/widgets/icons/images/find_normal.png b/examples/widgets/icons/images/find_normal.png
new file mode 100644
index 0000000..728c27f
--- /dev/null
+++ b/examples/widgets/icons/images/find_normal.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_off_128x128.png b/examples/widgets/icons/images/monkey_off_128x128.png
new file mode 100644
index 0000000..f878267
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_off_128x128.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_off_16x16.png b/examples/widgets/icons/images/monkey_off_16x16.png
new file mode 100644
index 0000000..0ac57d7
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_off_16x16.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_off_32x32.png b/examples/widgets/icons/images/monkey_off_32x32.png
new file mode 100644
index 0000000..1f7fab6
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_off_32x32.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_off_64x64.png b/examples/widgets/icons/images/monkey_off_64x64.png
new file mode 100644
index 0000000..47d8f6d
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_off_64x64.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_on_128x128.png b/examples/widgets/icons/images/monkey_on_128x128.png
new file mode 100644
index 0000000..8e1c746
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_on_128x128.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_on_16x16.png b/examples/widgets/icons/images/monkey_on_16x16.png
new file mode 100644
index 0000000..082e852
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_on_16x16.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_on_32x32.png b/examples/widgets/icons/images/monkey_on_32x32.png
new file mode 100644
index 0000000..bf9acc6
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_on_32x32.png
Binary files differ
diff --git a/examples/widgets/icons/images/monkey_on_64x64.png b/examples/widgets/icons/images/monkey_on_64x64.png
new file mode 100644
index 0000000..990f604
--- /dev/null
+++ b/examples/widgets/icons/images/monkey_on_64x64.png
Binary files differ
diff --git a/examples/widgets/icons/images/qt_extended_16x16.png b/examples/widgets/icons/images/qt_extended_16x16.png
new file mode 100644
index 0000000..95d3bae
--- /dev/null
+++ b/examples/widgets/icons/images/qt_extended_16x16.png
Binary files differ
diff --git a/examples/widgets/icons/images/qt_extended_32x32.png b/examples/widgets/icons/images/qt_extended_32x32.png
new file mode 100644
index 0000000..7b7a790
--- /dev/null
+++ b/examples/widgets/icons/images/qt_extended_32x32.png
Binary files differ
diff --git a/examples/widgets/icons/images/qt_extended_48x48.png b/examples/widgets/icons/images/qt_extended_48x48.png
new file mode 100644
index 0000000..8434dc2
--- /dev/null
+++ b/examples/widgets/icons/images/qt_extended_48x48.png
Binary files differ
diff --git a/examples/widgets/icons/main.cpp b/examples/widgets/icons/main.cpp
new file mode 100644
index 0000000..4856752
--- /dev/null
+++ b/examples/widgets/icons/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ return app.exec();
+}
diff --git a/examples/widgets/icons/mainwindow.cpp b/examples/widgets/icons/mainwindow.cpp
new file mode 100644
index 0000000..00ce8b0
--- /dev/null
+++ b/examples/widgets/icons/mainwindow.cpp
@@ -0,0 +1,443 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "iconpreviewarea.h"
+#include "iconsizespinbox.h"
+#include "imagedelegate.h"
+#include "mainwindow.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ centralWidget = new QWidget;
+ setCentralWidget(centralWidget);
+
+ createPreviewGroupBox();
+ createImagesGroupBox();
+ createIconSizeGroupBox();
+
+ createActions();
+ createMenus();
+ createContextMenu();
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addWidget(previewGroupBox, 0, 0, 1, 2);
+ mainLayout->addWidget(imagesGroupBox, 1, 0);
+ mainLayout->addWidget(iconSizeGroupBox, 1, 1);
+ centralWidget->setLayout(mainLayout);
+
+ setWindowTitle(tr("Icons"));
+ checkCurrentStyle();
+ otherRadioButton->click();
+
+ resize(minimumSizeHint());
+}
+//! [0]
+
+//! [1]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Icons"),
+ tr("The <b>Icons</b> example illustrates how Qt renders an icon in "
+ "different modes (active, normal, disabled, and selected) and "
+ "states (on and off) based on a set of images."));
+}
+//! [1]
+
+//! [2]
+void MainWindow::changeStyle(bool checked)
+{
+ if (!checked)
+ return;
+
+ QAction *action = qobject_cast<QAction *>(sender());
+//! [2] //! [3]
+ QStyle *style = QStyleFactory::create(action->data().toString());
+//! [3] //! [4]
+ Q_ASSERT(style);
+ QApplication::setStyle(style);
+
+ smallRadioButton->setText(tr("Small (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_SmallIconSize)));
+ largeRadioButton->setText(tr("Large (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_LargeIconSize)));
+ toolBarRadioButton->setText(tr("Toolbars (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_ToolBarIconSize)));
+ listViewRadioButton->setText(tr("List views (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_ListViewIconSize)));
+ iconViewRadioButton->setText(tr("Icon views (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_IconViewIconSize)));
+ tabBarRadioButton->setText(tr("Tab bars (%1 x %1)")
+ .arg(style->pixelMetric(QStyle::PM_TabBarIconSize)));
+
+ changeSize();
+}
+//! [4]
+
+//! [5]
+void MainWindow::changeSize(bool checked)
+{
+ if (!checked)
+ return;
+
+ int extent;
+
+ if (otherRadioButton->isChecked()) {
+ extent = otherSpinBox->value();
+ } else {
+ QStyle::PixelMetric metric;
+
+ if (smallRadioButton->isChecked()) {
+ metric = QStyle::PM_SmallIconSize;
+ } else if (largeRadioButton->isChecked()) {
+ metric = QStyle::PM_LargeIconSize;
+ } else if (toolBarRadioButton->isChecked()) {
+ metric = QStyle::PM_ToolBarIconSize;
+ } else if (listViewRadioButton->isChecked()) {
+ metric = QStyle::PM_ListViewIconSize;
+ } else if (iconViewRadioButton->isChecked()) {
+ metric = QStyle::PM_IconViewIconSize;
+ } else {
+ metric = QStyle::PM_TabBarIconSize;
+ }
+ extent = QApplication::style()->pixelMetric(metric);
+ }
+ previewArea->setSize(QSize(extent, extent));
+ otherSpinBox->setEnabled(otherRadioButton->isChecked());
+}
+//! [5]
+
+//! [6]
+void MainWindow::changeIcon()
+{
+ QIcon icon;
+
+ for (int row = 0; row < imagesTable->rowCount(); ++row) {
+ QTableWidgetItem *item0 = imagesTable->item(row, 0);
+ QTableWidgetItem *item1 = imagesTable->item(row, 1);
+ QTableWidgetItem *item2 = imagesTable->item(row, 2);
+
+ if (item0->checkState() == Qt::Checked) {
+ QIcon::Mode mode;
+ if (item1->text() == tr("Normal")) {
+ mode = QIcon::Normal;
+ } else if (item1->text() == tr("Active")) {
+ mode = QIcon::Active;
+ } else if (item1->text() == tr("Disabled")) {
+ mode = QIcon::Disabled;
+ } else {
+ mode = QIcon::Selected;
+ }
+
+ QIcon::State state;
+ if (item2->text() == tr("On")) {
+ state = QIcon::On;
+ } else {
+ state = QIcon::Off;
+//! [6] //! [7]
+ }
+//! [7]
+
+//! [8]
+ QString fileName = item0->data(Qt::UserRole).toString();
+ QImage image(fileName);
+ if (!image.isNull())
+ icon.addPixmap(QPixmap::fromImage(image), mode, state);
+//! [8] //! [9]
+ }
+//! [9] //! [10]
+ }
+//! [10]
+
+//! [11]
+ previewArea->setIcon(icon);
+}
+//! [11]
+
+//! [12]
+void MainWindow::addImages()
+{
+ QStringList fileNames = QFileDialog::getOpenFileNames(this,
+ tr("Open Images"), "",
+ tr("Images (*.png *.xpm *.jpg);;"
+ "All Files (*)"));
+ if (!fileNames.isEmpty()) {
+ foreach (QString fileName, fileNames) {
+ int row = imagesTable->rowCount();
+ imagesTable->setRowCount(row + 1);
+//! [12]
+
+//! [13]
+ QString imageName = QFileInfo(fileName).baseName();
+//! [13] //! [14]
+ QTableWidgetItem *item0 = new QTableWidgetItem(imageName);
+ item0->setData(Qt::UserRole, fileName);
+ item0->setFlags(item0->flags() & ~Qt::ItemIsEditable);
+//! [14]
+
+//! [15]
+ QTableWidgetItem *item1 = new QTableWidgetItem(tr("Normal"));
+//! [15] //! [16]
+ QTableWidgetItem *item2 = new QTableWidgetItem(tr("Off"));
+
+ if (guessModeStateAct->isChecked()) {
+ if (fileName.contains("_act")) {
+ item1->setText(tr("Active"));
+ } else if (fileName.contains("_dis")) {
+ item1->setText(tr("Disabled"));
+ } else if (fileName.contains("_sel")) {
+ item1->setText(tr("Selected"));
+ }
+
+ if (fileName.contains("_on"))
+ item2->setText(tr("On"));
+//! [16] //! [17]
+ }
+//! [17]
+
+//! [18]
+ imagesTable->setItem(row, 0, item0);
+//! [18] //! [19]
+ imagesTable->setItem(row, 1, item1);
+ imagesTable->setItem(row, 2, item2);
+ imagesTable->openPersistentEditor(item1);
+ imagesTable->openPersistentEditor(item2);
+
+ item0->setCheckState(Qt::Checked);
+ }
+ }
+}
+//! [19]
+
+//! [20]
+void MainWindow::removeAllImages()
+{
+ imagesTable->setRowCount(0);
+ changeIcon();
+}
+//! [20]
+
+void MainWindow::createPreviewGroupBox()
+{
+ previewGroupBox = new QGroupBox(tr("Preview"));
+
+ previewArea = new IconPreviewArea;
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(previewArea);
+ previewGroupBox->setLayout(layout);
+}
+
+//! [21]
+void MainWindow::createImagesGroupBox()
+{
+ imagesGroupBox = new QGroupBox(tr("Images"));
+
+ imagesTable = new QTableWidget;
+ imagesTable->setSelectionMode(QAbstractItemView::NoSelection);
+ imagesTable->setItemDelegate(new ImageDelegate(this));
+//! [21]
+
+//! [22]
+ QStringList labels;
+//! [22] //! [23]
+ labels << tr("Image") << tr("Mode") << tr("State");
+
+ imagesTable->horizontalHeader()->setDefaultSectionSize(90);
+ imagesTable->setColumnCount(3);
+ imagesTable->setHorizontalHeaderLabels(labels);
+ imagesTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+ imagesTable->horizontalHeader()->setResizeMode(1, QHeaderView::Fixed);
+ imagesTable->horizontalHeader()->setResizeMode(2, QHeaderView::Fixed);
+ imagesTable->verticalHeader()->hide();
+//! [23]
+
+//! [24]
+ connect(imagesTable, SIGNAL(itemChanged(QTableWidgetItem *)),
+//! [24] //! [25]
+ this, SLOT(changeIcon()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(imagesTable);
+ imagesGroupBox->setLayout(layout);
+}
+//! [25]
+
+//! [26]
+void MainWindow::createIconSizeGroupBox()
+{
+ iconSizeGroupBox = new QGroupBox(tr("Icon Size"));
+
+ smallRadioButton = new QRadioButton;
+ largeRadioButton = new QRadioButton;
+ toolBarRadioButton = new QRadioButton;
+ listViewRadioButton = new QRadioButton;
+ iconViewRadioButton = new QRadioButton;
+ tabBarRadioButton = new QRadioButton;
+ otherRadioButton = new QRadioButton(tr("Other:"));
+
+ otherSpinBox = new IconSizeSpinBox;
+ otherSpinBox->setRange(8, 128);
+ otherSpinBox->setValue(64);
+//! [26]
+
+//! [27]
+ connect(smallRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(largeRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(toolBarRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(listViewRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(iconViewRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(tabBarRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(otherRadioButton, SIGNAL(toggled(bool)),
+ this, SLOT(changeSize(bool)));
+ connect(otherSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeSize()));
+
+ QHBoxLayout *otherSizeLayout = new QHBoxLayout;
+ otherSizeLayout->addWidget(otherRadioButton);
+ otherSizeLayout->addWidget(otherSpinBox);
+ otherSizeLayout->addStretch();
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(smallRadioButton, 0, 0);
+ layout->addWidget(largeRadioButton, 1, 0);
+ layout->addWidget(toolBarRadioButton, 2, 0);
+ layout->addWidget(listViewRadioButton, 0, 1);
+ layout->addWidget(iconViewRadioButton, 1, 1);
+ layout->addWidget(tabBarRadioButton, 2, 1);
+ layout->addLayout(otherSizeLayout, 3, 0, 1, 2);
+ layout->setRowStretch(4, 1);
+ iconSizeGroupBox->setLayout(layout);
+}
+//! [27]
+
+//! [28]
+void MainWindow::createActions()
+{
+ addImagesAct = new QAction(tr("&Add Images..."), this);
+ addImagesAct->setShortcut(tr("Ctrl+A"));
+ connect(addImagesAct, SIGNAL(triggered()), this, SLOT(addImages()));
+
+ removeAllImagesAct = new QAction(tr("&Remove All Images"), this);
+ removeAllImagesAct->setShortcut(tr("Ctrl+R"));
+ connect(removeAllImagesAct, SIGNAL(triggered()),
+ this, SLOT(removeAllImages()));
+
+ exitAct = new QAction(tr("&Quit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ styleActionGroup = new QActionGroup(this);
+ foreach (QString styleName, QStyleFactory::keys()) {
+ QAction *action = new QAction(styleActionGroup);
+ action->setText(tr("%1 Style").arg(styleName));
+ action->setData(styleName);
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered(bool)), this, SLOT(changeStyle(bool)));
+ }
+
+ guessModeStateAct = new QAction(tr("&Guess Image Mode/State"), this);
+ guessModeStateAct->setCheckable(true);
+ guessModeStateAct->setChecked(true);
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+//! [28]
+
+//! [29]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(addImagesAct);
+ fileMenu->addAction(removeAllImagesAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ viewMenu = menuBar()->addMenu(tr("&View"));
+ foreach (QAction *action, styleActionGroup->actions())
+ viewMenu->addAction(action);
+ viewMenu->addSeparator();
+ viewMenu->addAction(guessModeStateAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [29]
+
+//! [30]
+void MainWindow::createContextMenu()
+{
+ imagesTable->setContextMenuPolicy(Qt::ActionsContextMenu);
+ imagesTable->addAction(addImagesAct);
+ imagesTable->addAction(removeAllImagesAct);
+}
+//! [30]
+
+//! [31]
+void MainWindow::checkCurrentStyle()
+{
+ foreach (QAction *action, styleActionGroup->actions()) {
+ QString styleName = action->data().toString();
+ QStyle *candidate = QStyleFactory::create(styleName);
+ Q_ASSERT(candidate);
+ if (candidate->metaObject()->className()
+ == QApplication::style()->metaObject()->className()) {
+ action->trigger();
+ return;
+ }
+ delete candidate;
+ }
+}
+//! [31]
diff --git a/examples/widgets/icons/mainwindow.h b/examples/widgets/icons/mainwindow.h
new file mode 100644
index 0000000..3494359
--- /dev/null
+++ b/examples/widgets/icons/mainwindow.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QIcon>
+#include <QList>
+#include <QMainWindow>
+#include <QPixmap>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QActionGroup;
+class QGroupBox;
+class QMenu;
+class QRadioButton;
+class QTableWidget;
+QT_END_NAMESPACE
+class IconPreviewArea;
+class IconSizeSpinBox;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void about();
+ void changeStyle(bool checked);
+ void changeSize(bool checked = true);
+ void changeIcon();
+ void addImages();
+ void removeAllImages();
+
+private:
+ void createPreviewGroupBox();
+ void createImagesGroupBox();
+ void createIconSizeGroupBox();
+ void createActions();
+ void createMenus();
+ void createContextMenu();
+ void checkCurrentStyle();
+
+ QWidget *centralWidget;
+
+ QGroupBox *previewGroupBox;
+ IconPreviewArea *previewArea;
+
+ QGroupBox *imagesGroupBox;
+ QTableWidget *imagesTable;
+
+ QGroupBox *iconSizeGroupBox;
+ QRadioButton *smallRadioButton;
+ QRadioButton *largeRadioButton;
+ QRadioButton *toolBarRadioButton;
+ QRadioButton *listViewRadioButton;
+ QRadioButton *iconViewRadioButton;
+ QRadioButton *tabBarRadioButton;
+ QRadioButton *otherRadioButton;
+ IconSizeSpinBox *otherSpinBox;
+
+ QMenu *fileMenu;
+ QMenu *viewMenu;
+ QMenu *helpMenu;
+ QAction *addImagesAct;
+ QAction *removeAllImagesAct;
+ QAction *exitAct;
+ QAction *guessModeStateAct;
+ QActionGroup *styleActionGroup;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/imageviewer/imageviewer.cpp b/examples/widgets/imageviewer/imageviewer.cpp
new file mode 100644
index 0000000..39d1b35
--- /dev/null
+++ b/examples/widgets/imageviewer/imageviewer.cpp
@@ -0,0 +1,278 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "imageviewer.h"
+
+//! [0]
+ImageViewer::ImageViewer()
+{
+ imageLabel = new QLabel;
+ imageLabel->setBackgroundRole(QPalette::Base);
+ imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+ imageLabel->setScaledContents(true);
+
+ scrollArea = new QScrollArea;
+ scrollArea->setBackgroundRole(QPalette::Dark);
+ scrollArea->setWidget(imageLabel);
+ setCentralWidget(scrollArea);
+
+ createActions();
+ createMenus();
+
+ setWindowTitle(tr("Image Viewer"));
+ resize(500, 400);
+}
+//! [0]
+
+//! [1]
+void ImageViewer::open()
+//! [1] //! [2]
+{
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open File"), QDir::currentPath());
+ if (!fileName.isEmpty()) {
+ QImage image(fileName);
+ if (image.isNull()) {
+ QMessageBox::information(this, tr("Image Viewer"),
+ tr("Cannot load %1.").arg(fileName));
+ return;
+ }
+//! [2] //! [3]
+ imageLabel->setPixmap(QPixmap::fromImage(image));
+//! [3] //! [4]
+ scaleFactor = 1.0;
+
+ printAct->setEnabled(true);
+ fitToWindowAct->setEnabled(true);
+ updateActions();
+
+ if (!fitToWindowAct->isChecked())
+ imageLabel->adjustSize();
+ }
+}
+//! [4]
+
+//! [5]
+void ImageViewer::print()
+//! [5] //! [6]
+{
+ Q_ASSERT(imageLabel->pixmap());
+#ifndef QT_NO_PRINTER
+//! [6] //! [7]
+ QPrintDialog dialog(&printer, this);
+//! [7] //! [8]
+ if (dialog.exec()) {
+ QPainter painter(&printer);
+ QRect rect = painter.viewport();
+ QSize size = imageLabel->pixmap()->size();
+ size.scale(rect.size(), Qt::KeepAspectRatio);
+ painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
+ painter.setWindow(imageLabel->pixmap()->rect());
+ painter.drawPixmap(0, 0, *imageLabel->pixmap());
+ }
+#endif
+}
+//! [8]
+
+//! [9]
+void ImageViewer::zoomIn()
+//! [9] //! [10]
+{
+ scaleImage(1.25);
+}
+
+void ImageViewer::zoomOut()
+{
+ scaleImage(0.8);
+}
+
+//! [10] //! [11]
+void ImageViewer::normalSize()
+//! [11] //! [12]
+{
+ imageLabel->adjustSize();
+ scaleFactor = 1.0;
+}
+//! [12]
+
+//! [13]
+void ImageViewer::fitToWindow()
+//! [13] //! [14]
+{
+ bool fitToWindow = fitToWindowAct->isChecked();
+ scrollArea->setWidgetResizable(fitToWindow);
+ if (!fitToWindow) {
+ normalSize();
+ }
+ updateActions();
+}
+//! [14]
+
+
+//! [15]
+void ImageViewer::about()
+//! [15] //! [16]
+{
+ QMessageBox::about(this, tr("About Image Viewer"),
+ tr("<p>The <b>Image Viewer</b> example shows how to combine QLabel "
+ "and QScrollArea to display an image. QLabel is typically used "
+ "for displaying a text, but it can also display an image. "
+ "QScrollArea provides a scrolling view around another widget. "
+ "If the child widget exceeds the size of the frame, QScrollArea "
+ "automatically provides scroll bars. </p><p>The example "
+ "demonstrates how QLabel's ability to scale its contents "
+ "(QLabel::scaledContents), and QScrollArea's ability to "
+ "automatically resize its contents "
+ "(QScrollArea::widgetResizable), can be used to implement "
+ "zooming and scaling features. </p><p>In addition the example "
+ "shows how to use QPainter to print an image.</p>"));
+}
+//! [16]
+
+//! [17]
+void ImageViewer::createActions()
+//! [17] //! [18]
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ printAct = new QAction(tr("&Print..."), this);
+ printAct->setShortcut(tr("Ctrl+P"));
+ printAct->setEnabled(false);
+ connect(printAct, SIGNAL(triggered()), this, SLOT(print()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ zoomInAct = new QAction(tr("Zoom &In (25%)"), this);
+ zoomInAct->setShortcut(tr("Ctrl++"));
+ zoomInAct->setEnabled(false);
+ connect(zoomInAct, SIGNAL(triggered()), this, SLOT(zoomIn()));
+
+ zoomOutAct = new QAction(tr("Zoom &Out (25%)"), this);
+ zoomOutAct->setShortcut(tr("Ctrl+-"));
+ zoomOutAct->setEnabled(false);
+ connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(zoomOut()));
+
+ normalSizeAct = new QAction(tr("&Normal Size"), this);
+ normalSizeAct->setShortcut(tr("Ctrl+S"));
+ normalSizeAct->setEnabled(false);
+ connect(normalSizeAct, SIGNAL(triggered()), this, SLOT(normalSize()));
+
+ fitToWindowAct = new QAction(tr("&Fit to Window"), this);
+ fitToWindowAct->setEnabled(false);
+ fitToWindowAct->setCheckable(true);
+ fitToWindowAct->setShortcut(tr("Ctrl+F"));
+ connect(fitToWindowAct, SIGNAL(triggered()), this, SLOT(fitToWindow()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+//! [18]
+
+//! [19]
+void ImageViewer::createMenus()
+//! [19] //! [20]
+{
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(printAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ viewMenu = new QMenu(tr("&View"), this);
+ viewMenu->addAction(zoomInAct);
+ viewMenu->addAction(zoomOutAct);
+ viewMenu->addAction(normalSizeAct);
+ viewMenu->addSeparator();
+ viewMenu->addAction(fitToWindowAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(viewMenu);
+ menuBar()->addMenu(helpMenu);
+}
+//! [20]
+
+//! [21]
+void ImageViewer::updateActions()
+//! [21] //! [22]
+{
+ zoomInAct->setEnabled(!fitToWindowAct->isChecked());
+ zoomOutAct->setEnabled(!fitToWindowAct->isChecked());
+ normalSizeAct->setEnabled(!fitToWindowAct->isChecked());
+}
+//! [22]
+
+//! [23]
+void ImageViewer::scaleImage(double factor)
+//! [23] //! [24]
+{
+ Q_ASSERT(imageLabel->pixmap());
+ scaleFactor *= factor;
+ imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
+
+ adjustScrollBar(scrollArea->horizontalScrollBar(), factor);
+ adjustScrollBar(scrollArea->verticalScrollBar(), factor);
+
+ zoomInAct->setEnabled(scaleFactor < 3.0);
+ zoomOutAct->setEnabled(scaleFactor > 0.333);
+}
+//! [24]
+
+//! [25]
+void ImageViewer::adjustScrollBar(QScrollBar *scrollBar, double factor)
+//! [25] //! [26]
+{
+ scrollBar->setValue(int(factor * scrollBar->value()
+ + ((factor - 1) * scrollBar->pageStep()/2)));
+}
+//! [26]
diff --git a/examples/widgets/imageviewer/imageviewer.h b/examples/widgets/imageviewer/imageviewer.h
new file mode 100644
index 0000000..b84f7d5
--- /dev/null
+++ b/examples/widgets/imageviewer/imageviewer.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef IMAGEVIEWER_H
+#define IMAGEVIEWER_H
+
+#include <QMainWindow>
+#include <QPrinter>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QMenu;
+class QScrollArea;
+class QScrollBar;
+QT_END_NAMESPACE
+
+//! [0]
+class ImageViewer : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ ImageViewer();
+
+private slots:
+ void open();
+ void print();
+ void zoomIn();
+ void zoomOut();
+ void normalSize();
+ void fitToWindow();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ void updateActions();
+ void scaleImage(double factor);
+ void adjustScrollBar(QScrollBar *scrollBar, double factor);
+
+ QLabel *imageLabel;
+ QScrollArea *scrollArea;
+ double scaleFactor;
+
+#ifndef QT_NO_PRINTER
+ QPrinter printer;
+#endif
+
+ QAction *openAct;
+ QAction *printAct;
+ QAction *exitAct;
+ QAction *zoomInAct;
+ QAction *zoomOutAct;
+ QAction *normalSizeAct;
+ QAction *fitToWindowAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+
+ QMenu *fileMenu;
+ QMenu *viewMenu;
+ QMenu *helpMenu;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/imageviewer/imageviewer.pro b/examples/widgets/imageviewer/imageviewer.pro
new file mode 100644
index 0000000..31c9d47
--- /dev/null
+++ b/examples/widgets/imageviewer/imageviewer.pro
@@ -0,0 +1,13 @@
+HEADERS = imageviewer.h
+SOURCES = imageviewer.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/imageviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS imageviewer.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/imageviewer
+INSTALLS += target sources
+
+wince*: {
+ DEPLOYMENT_PLUGIN += qjpeg qmng qgif
+}
diff --git a/examples/widgets/imageviewer/main.cpp b/examples/widgets/imageviewer/main.cpp
new file mode 100644
index 0000000..090580c
--- /dev/null
+++ b/examples/widgets/imageviewer/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "imageviewer.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ImageViewer imageViewer;
+ imageViewer.show();
+ return app.exec();
+}
diff --git a/examples/widgets/lineedits/lineedits.pro b/examples/widgets/lineedits/lineedits.pro
new file mode 100644
index 0000000..e963024
--- /dev/null
+++ b/examples/widgets/lineedits/lineedits.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/lineedits
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lineedits.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/lineedits
+INSTALLS += target sources
diff --git a/examples/widgets/lineedits/main.cpp b/examples/widgets/lineedits/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/widgets/lineedits/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/lineedits/window.cpp b/examples/widgets/lineedits/window.cpp
new file mode 100644
index 0000000..13acffd
--- /dev/null
+++ b/examples/widgets/lineedits/window.cpp
@@ -0,0 +1,257 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ QGroupBox *echoGroup = new QGroupBox(tr("Echo"));
+
+ QLabel *echoLabel = new QLabel(tr("Mode:"));
+ QComboBox *echoComboBox = new QComboBox;
+ echoComboBox->addItem(tr("Normal"));
+ echoComboBox->addItem(tr("Password"));
+ echoComboBox->addItem(tr("PasswordEchoOnEdit"));
+ echoComboBox->addItem(tr("No Echo"));
+
+ echoLineEdit = new QLineEdit;
+ echoLineEdit->setFocus();
+//! [0]
+
+//! [1]
+ QGroupBox *validatorGroup = new QGroupBox(tr("Validator"));
+
+ QLabel *validatorLabel = new QLabel(tr("Type:"));
+ QComboBox *validatorComboBox = new QComboBox;
+ validatorComboBox->addItem(tr("No validator"));
+ validatorComboBox->addItem(tr("Integer validator"));
+ validatorComboBox->addItem(tr("Double validator"));
+
+ validatorLineEdit = new QLineEdit;
+//! [1]
+
+//! [2]
+ QGroupBox *alignmentGroup = new QGroupBox(tr("Alignment"));
+
+ QLabel *alignmentLabel = new QLabel(tr("Type:"));
+ QComboBox *alignmentComboBox = new QComboBox;
+ alignmentComboBox->addItem(tr("Left"));
+ alignmentComboBox->addItem(tr("Centered"));
+ alignmentComboBox->addItem(tr("Right"));
+
+ alignmentLineEdit = new QLineEdit;
+//! [2]
+
+//! [3]
+ QGroupBox *inputMaskGroup = new QGroupBox(tr("Input mask"));
+
+ QLabel *inputMaskLabel = new QLabel(tr("Type:"));
+ QComboBox *inputMaskComboBox = new QComboBox;
+ inputMaskComboBox->addItem(tr("No mask"));
+ inputMaskComboBox->addItem(tr("Phone number"));
+ inputMaskComboBox->addItem(tr("ISO date"));
+ inputMaskComboBox->addItem(tr("License key"));
+
+ inputMaskLineEdit = new QLineEdit;
+//! [3]
+
+//! [4]
+ QGroupBox *accessGroup = new QGroupBox(tr("Access"));
+
+ QLabel *accessLabel = new QLabel(tr("Read-only:"));
+ QComboBox *accessComboBox = new QComboBox;
+ accessComboBox->addItem(tr("False"));
+ accessComboBox->addItem(tr("True"));
+
+ accessLineEdit = new QLineEdit;
+//! [4]
+
+//! [5]
+ connect(echoComboBox, SIGNAL(activated(int)),
+ this, SLOT(echoChanged(int)));
+ connect(validatorComboBox, SIGNAL(activated(int)),
+ this, SLOT(validatorChanged(int)));
+ connect(alignmentComboBox, SIGNAL(activated(int)),
+ this, SLOT(alignmentChanged(int)));
+ connect(inputMaskComboBox, SIGNAL(activated(int)),
+ this, SLOT(inputMaskChanged(int)));
+ connect(accessComboBox, SIGNAL(activated(int)),
+ this, SLOT(accessChanged(int)));
+//! [5]
+
+//! [6]
+ QGridLayout *echoLayout = new QGridLayout;
+ echoLayout->addWidget(echoLabel, 0, 0);
+ echoLayout->addWidget(echoComboBox, 0, 1);
+ echoLayout->addWidget(echoLineEdit, 1, 0, 1, 2);
+ echoGroup->setLayout(echoLayout);
+//! [6]
+
+//! [7]
+ QGridLayout *validatorLayout = new QGridLayout;
+ validatorLayout->addWidget(validatorLabel, 0, 0);
+ validatorLayout->addWidget(validatorComboBox, 0, 1);
+ validatorLayout->addWidget(validatorLineEdit, 1, 0, 1, 2);
+ validatorGroup->setLayout(validatorLayout);
+
+ QGridLayout *alignmentLayout = new QGridLayout;
+ alignmentLayout->addWidget(alignmentLabel, 0, 0);
+ alignmentLayout->addWidget(alignmentComboBox, 0, 1);
+ alignmentLayout->addWidget(alignmentLineEdit, 1, 0, 1, 2);
+ alignmentGroup-> setLayout(alignmentLayout);
+
+ QGridLayout *inputMaskLayout = new QGridLayout;
+ inputMaskLayout->addWidget(inputMaskLabel, 0, 0);
+ inputMaskLayout->addWidget(inputMaskComboBox, 0, 1);
+ inputMaskLayout->addWidget(inputMaskLineEdit, 1, 0, 1, 2);
+ inputMaskGroup->setLayout(inputMaskLayout);
+
+ QGridLayout *accessLayout = new QGridLayout;
+ accessLayout->addWidget(accessLabel, 0, 0);
+ accessLayout->addWidget(accessComboBox, 0, 1);
+ accessLayout->addWidget(accessLineEdit, 1, 0, 1, 2);
+ accessGroup->setLayout(accessLayout);
+//! [7]
+
+//! [8]
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(echoGroup, 0, 0);
+ layout->addWidget(validatorGroup, 1, 0);
+ layout->addWidget(alignmentGroup, 2, 0);
+ layout->addWidget(inputMaskGroup, 0, 1);
+ layout->addWidget(accessGroup, 1, 1);
+ setLayout(layout);
+
+ setWindowTitle(tr("Line Edits"));
+}
+//! [8]
+
+//! [9]
+void Window::echoChanged(int index)
+{
+ switch (index) {
+ case 0:
+ echoLineEdit->setEchoMode(QLineEdit::Normal);
+ break;
+ case 1:
+ echoLineEdit->setEchoMode(QLineEdit::Password);
+ break;
+ case 2:
+ echoLineEdit->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+ break;
+ case 3:
+ echoLineEdit->setEchoMode(QLineEdit::NoEcho);
+ }
+}
+//! [9]
+
+//! [10]
+void Window::validatorChanged(int index)
+{
+ switch (index) {
+ case 0:
+ validatorLineEdit->setValidator(0);
+ break;
+ case 1:
+ validatorLineEdit->setValidator(new QIntValidator(
+ validatorLineEdit));
+ break;
+ case 2:
+ validatorLineEdit->setValidator(new QDoubleValidator(-999.0,
+ 999.0, 2, validatorLineEdit));
+ }
+
+ validatorLineEdit->clear();
+}
+//! [10]
+
+//! [11]
+void Window::alignmentChanged(int index)
+{
+ switch (index) {
+ case 0:
+ alignmentLineEdit->setAlignment(Qt::AlignLeft);
+ break;
+ case 1:
+ alignmentLineEdit->setAlignment(Qt::AlignCenter);
+ break;
+ case 2:
+ alignmentLineEdit->setAlignment(Qt::AlignRight);
+ }
+}
+//! [11]
+
+//! [12]
+void Window::inputMaskChanged(int index)
+{
+ switch (index) {
+ case 0:
+ inputMaskLineEdit->setInputMask("");
+ break;
+ case 1:
+ inputMaskLineEdit->setInputMask("+99 99 99 99 99;_");
+ break;
+ case 2:
+ inputMaskLineEdit->setInputMask("0000-00-00");
+ inputMaskLineEdit->setText("00000000");
+ inputMaskLineEdit->setCursorPosition(0);
+ break;
+ case 3:
+ inputMaskLineEdit->setInputMask(">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#");
+ }
+}
+//! [12]
+
+//! [13]
+void Window::accessChanged(int index)
+{
+ switch (index) {
+ case 0:
+ accessLineEdit->setReadOnly(false);
+ break;
+ case 1:
+ accessLineEdit->setReadOnly(true);
+ }
+}
+//! [13]
diff --git a/examples/widgets/lineedits/window.h b/examples/widgets/lineedits/window.h
new file mode 100644
index 0000000..2d10d78
--- /dev/null
+++ b/examples/widgets/lineedits/window.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QLineEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+public slots:
+ void echoChanged(int);
+ void validatorChanged(int);
+ void alignmentChanged(int);
+ void inputMaskChanged(int);
+ void accessChanged(int);
+
+private:
+ QLineEdit *echoLineEdit;
+ QLineEdit *validatorLineEdit;
+ QLineEdit *alignmentLineEdit;
+ QLineEdit *inputMaskLineEdit;
+ QLineEdit *accessLineEdit;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/movie/animation.mng b/examples/widgets/movie/animation.mng
new file mode 100644
index 0000000..12b688a
--- /dev/null
+++ b/examples/widgets/movie/animation.mng
Binary files differ
diff --git a/examples/widgets/movie/main.cpp b/examples/widgets/movie/main.cpp
new file mode 100644
index 0000000..50bec73
--- /dev/null
+++ b/examples/widgets/movie/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "movieplayer.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MoviePlayer player;
+ player.show();
+ return app.exec();
+}
diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro
new file mode 100644
index 0000000..b5f0a7a
--- /dev/null
+++ b/examples/widgets/movie/movie.pro
@@ -0,0 +1,9 @@
+HEADERS = movieplayer.h
+SOURCES = main.cpp \
+ movieplayer.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie
+sources.files = $$SOURCES $$HEADERS $$RESOURCES movie.pro movies
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/movie
+INSTALLS += target sources
diff --git a/examples/widgets/movie/movieplayer.cpp b/examples/widgets/movie/movieplayer.cpp
new file mode 100644
index 0000000..1ffc233
--- /dev/null
+++ b/examples/widgets/movie/movieplayer.cpp
@@ -0,0 +1,211 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "movieplayer.h"
+
+MoviePlayer::MoviePlayer(QWidget *parent)
+ : QWidget(parent)
+{
+ movie = new QMovie(this);
+ movie->setCacheMode(QMovie::CacheAll);
+
+ movieLabel = new QLabel(tr("No movie loaded"));
+ movieLabel->setAlignment(Qt::AlignCenter);
+ movieLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+ movieLabel->setBackgroundRole(QPalette::Dark);
+ movieLabel->setAutoFillBackground(true);
+
+ currentMovieDirectory = "movies";
+
+ createControls();
+ createButtons();
+
+ connect(movie, SIGNAL(frameChanged(int)), this, SLOT(updateFrameSlider()));
+ connect(movie, SIGNAL(stateChanged(QMovie::MovieState)),
+ this, SLOT(updateButtons()));
+ connect(fitCheckBox, SIGNAL(clicked()), this, SLOT(fitToWindow()));
+ connect(frameSlider, SIGNAL(valueChanged(int)), this, SLOT(goToFrame(int)));
+ connect(speedSpinBox, SIGNAL(valueChanged(int)),
+ movie, SLOT(setSpeed(int)));
+
+ mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(movieLabel);
+ mainLayout->addLayout(controlsLayout);
+ mainLayout->addLayout(buttonsLayout);
+ setLayout(mainLayout);
+
+ updateFrameSlider();
+ updateButtons();
+
+ setWindowTitle(tr("Movie Player"));
+ resize(400, 400);
+}
+
+void MoviePlayer::open()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open a Movie"),
+ currentMovieDirectory);
+ if (!fileName.isEmpty())
+ openFile(fileName);
+}
+
+void MoviePlayer::openFile(const QString &fileName)
+{
+ currentMovieDirectory = QFileInfo(fileName).path();
+
+ movie->stop();
+ movieLabel->setMovie(movie);
+ movie->setFileName(fileName);
+ movie->start();
+
+ updateFrameSlider();
+ updateButtons();
+}
+
+void MoviePlayer::goToFrame(int frame)
+{
+ movie->jumpToFrame(frame);
+}
+
+void MoviePlayer::fitToWindow()
+{
+ movieLabel->setScaledContents(fitCheckBox->isChecked());
+}
+
+void MoviePlayer::updateFrameSlider()
+{
+ bool hasFrames = (movie->currentFrameNumber() >= 0);
+
+ if (hasFrames) {
+ if (movie->frameCount() > 0) {
+ frameSlider->setMaximum(movie->frameCount() - 1);
+ } else {
+ if (movie->currentFrameNumber() > frameSlider->maximum())
+ frameSlider->setMaximum(movie->currentFrameNumber());
+ }
+ frameSlider->setValue(movie->currentFrameNumber());
+ } else {
+ frameSlider->setMaximum(0);
+ }
+ frameLabel->setEnabled(hasFrames);
+ frameSlider->setEnabled(hasFrames);
+}
+
+void MoviePlayer::updateButtons()
+{
+ playButton->setEnabled(movie->isValid() && movie->frameCount() != 1
+ && movie->state() == QMovie::NotRunning);
+ pauseButton->setEnabled(movie->state() != QMovie::NotRunning);
+ pauseButton->setChecked(movie->state() == QMovie::Paused);
+ stopButton->setEnabled(movie->state() != QMovie::NotRunning);
+}
+
+void MoviePlayer::createControls()
+{
+ fitCheckBox = new QCheckBox(tr("Fit to Window"));
+
+ frameLabel = new QLabel(tr("Current frame:"));
+
+ frameSlider = new QSlider(Qt::Horizontal);
+ frameSlider->setTickPosition(QSlider::TicksBelow);
+ frameSlider->setTickInterval(10);
+
+ speedLabel = new QLabel(tr("Speed:"));
+
+ speedSpinBox = new QSpinBox;
+ speedSpinBox->setRange(1, 9999);
+ speedSpinBox->setValue(100);
+ speedSpinBox->setSuffix(tr("%"));
+
+ controlsLayout = new QGridLayout;
+ controlsLayout->addWidget(fitCheckBox, 0, 0, 1, 2);
+ controlsLayout->addWidget(frameLabel, 1, 0);
+ controlsLayout->addWidget(frameSlider, 1, 1, 1, 2);
+ controlsLayout->addWidget(speedLabel, 2, 0);
+ controlsLayout->addWidget(speedSpinBox, 2, 1);
+}
+
+void MoviePlayer::createButtons()
+{
+ QSize iconSize(36, 36);
+
+ openButton = new QToolButton;
+ openButton->setIcon(style()->standardIcon(QStyle::SP_DialogOpenButton));
+ openButton->setIconSize(iconSize);
+ openButton->setToolTip(tr("Open File"));
+ connect(openButton, SIGNAL(clicked()), this, SLOT(open()));
+
+ playButton = new QToolButton;
+ playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
+ playButton->setIconSize(iconSize);
+ playButton->setToolTip(tr("Play"));
+ connect(playButton, SIGNAL(clicked()), movie, SLOT(start()));
+
+ pauseButton = new QToolButton;
+ pauseButton->setCheckable(true);
+ pauseButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
+ pauseButton->setIconSize(iconSize);
+ pauseButton->setToolTip(tr("Pause"));
+ connect(pauseButton, SIGNAL(clicked(bool)), movie, SLOT(setPaused(bool)));
+
+ stopButton = new QToolButton;
+ stopButton->setIcon(style()->standardIcon(QStyle::SP_MediaStop));
+ stopButton->setIconSize(iconSize);
+ stopButton->setToolTip(tr("Stop"));
+ connect(stopButton, SIGNAL(clicked()), movie, SLOT(stop()));
+
+ quitButton = new QToolButton;
+ quitButton->setIcon(style()->standardIcon(QStyle::SP_DialogCloseButton));
+ quitButton->setIconSize(iconSize);
+ quitButton->setToolTip(tr("Quit"));
+ connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch();
+ buttonsLayout->addWidget(openButton);
+ buttonsLayout->addWidget(playButton);
+ buttonsLayout->addWidget(pauseButton);
+ buttonsLayout->addWidget(stopButton);
+ buttonsLayout->addWidget(quitButton);
+ buttonsLayout->addStretch();
+}
diff --git a/examples/widgets/movie/movieplayer.h b/examples/widgets/movie/movieplayer.h
new file mode 100644
index 0000000..123c2e2
--- /dev/null
+++ b/examples/widgets/movie/movieplayer.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MOVIEPLAYER_H
+#define MOVIEPLAYER_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGridLayout;
+class QHBoxLayout;
+class QLabel;
+class QMovie;
+class QSlider;
+class QSpinBox;
+class QToolButton;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+class MoviePlayer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MoviePlayer(QWidget *parent = 0);
+ void openFile(const QString &fileName);
+
+private slots:
+ void open();
+ void goToFrame(int frame);
+ void fitToWindow();
+ void updateButtons();
+ void updateFrameSlider();
+
+private:
+ void createControls();
+ void createButtons();
+
+ QString currentMovieDirectory;
+ QLabel *movieLabel;
+ QMovie *movie;
+ QToolButton *openButton;
+ QToolButton *playButton;
+ QToolButton *pauseButton;
+ QToolButton *stopButton;
+ QToolButton *quitButton;
+ QCheckBox *fitCheckBox;
+ QSlider *frameSlider;
+ QSpinBox *speedSpinBox;
+ QLabel *frameLabel;
+ QLabel *speedLabel;
+
+ QGridLayout *controlsLayout;
+ QHBoxLayout *buttonsLayout;
+ QVBoxLayout *mainLayout;
+};
+
+#endif
diff --git a/examples/widgets/scribble/main.cpp b/examples/widgets/scribble/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/widgets/scribble/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/scribble/mainwindow.cpp b/examples/widgets/scribble/mainwindow.cpp
new file mode 100644
index 0000000..ad1a837
--- /dev/null
+++ b/examples/widgets/scribble/mainwindow.cpp
@@ -0,0 +1,251 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "scribblearea.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ scribbleArea = new ScribbleArea;
+ setCentralWidget(scribbleArea);
+
+ createActions();
+ createMenus();
+
+ setWindowTitle(tr("Scribble"));
+ resize(500, 500);
+}
+//! [0]
+
+//! [1]
+void MainWindow::closeEvent(QCloseEvent *event)
+//! [1] //! [2]
+{
+ if (maybeSave()) {
+ event->accept();
+ } else {
+ event->ignore();
+ }
+}
+//! [2]
+
+//! [3]
+void MainWindow::open()
+//! [3] //! [4]
+{
+ if (maybeSave()) {
+ QString fileName = QFileDialog::getOpenFileName(this,
+ tr("Open File"), QDir::currentPath());
+ if (!fileName.isEmpty())
+ scribbleArea->openImage(fileName);
+ }
+}
+//! [4]
+
+//! [5]
+void MainWindow::save()
+//! [5] //! [6]
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ QByteArray fileFormat = action->data().toByteArray();
+ saveFile(fileFormat);
+}
+//! [6]
+
+//! [7]
+void MainWindow::penColor()
+//! [7] //! [8]
+{
+ QColor newColor = QColorDialog::getColor(scribbleArea->penColor());
+ if (newColor.isValid())
+ scribbleArea->setPenColor(newColor);
+}
+//! [8]
+
+//! [9]
+void MainWindow::penWidth()
+//! [9] //! [10]
+{
+ bool ok;
+ int newWidth = QInputDialog::getInteger(this, tr("Scribble"),
+ tr("Select pen width:"),
+ scribbleArea->penWidth(),
+ 1, 50, 1, &ok);
+ if (ok)
+ scribbleArea->setPenWidth(newWidth);
+}
+//! [10]
+
+//! [11]
+void MainWindow::about()
+//! [11] //! [12]
+{
+ QMessageBox::about(this, tr("About Scribble"),
+ tr("<p>The <b>Scribble</b> example shows how to use QMainWindow as the "
+ "base widget for an application, and how to reimplement some of "
+ "QWidget's event handlers to receive the events generated for "
+ "the application's widgets:</p><p> We reimplement the mouse event "
+ "handlers to facilitate drawing, the paint event handler to "
+ "update the application and the resize event handler to optimize "
+ "the application's appearance. In addition we reimplement the "
+ "close event handler to intercept the close events before "
+ "terminating the application.</p><p> The example also demonstrates "
+ "how to use QPainter to draw an image in real time, as well as "
+ "to repaint widgets.</p>"));
+}
+//! [12]
+
+//! [13]
+void MainWindow::createActions()
+//! [13] //! [14]
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
+ QString text = tr("%1...").arg(QString(format).toUpper());
+
+ QAction *action = new QAction(text, this);
+ action->setData(format);
+ connect(action, SIGNAL(triggered()), this, SLOT(save()));
+ saveAsActs.append(action);
+ }
+
+ printAct = new QAction(tr("&Print..."), this);
+ connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ penColorAct = new QAction(tr("&Pen Color..."), this);
+ connect(penColorAct, SIGNAL(triggered()), this, SLOT(penColor()));
+
+ penWidthAct = new QAction(tr("Pen &Width..."), this);
+ connect(penWidthAct, SIGNAL(triggered()), this, SLOT(penWidth()));
+
+ clearScreenAct = new QAction(tr("&Clear Screen"), this);
+ clearScreenAct->setShortcut(tr("Ctrl+L"));
+ connect(clearScreenAct, SIGNAL(triggered()),
+ scribbleArea, SLOT(clearImage()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+//! [14]
+
+//! [15]
+void MainWindow::createMenus()
+//! [15] //! [16]
+{
+ saveAsMenu = new QMenu(tr("&Save As"), this);
+ foreach (QAction *action, saveAsActs)
+ saveAsMenu->addAction(action);
+
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addMenu(saveAsMenu);
+ fileMenu->addAction(printAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ optionMenu = new QMenu(tr("&Options"), this);
+ optionMenu->addAction(penColorAct);
+ optionMenu->addAction(penWidthAct);
+ optionMenu->addSeparator();
+ optionMenu->addAction(clearScreenAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(optionMenu);
+ menuBar()->addMenu(helpMenu);
+}
+//! [16]
+
+//! [17]
+bool MainWindow::maybeSave()
+//! [17] //! [18]
+{
+ if (scribbleArea->isModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, tr("Scribble"),
+ tr("The image has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
+ if (ret == QMessageBox::Save) {
+ return saveFile("png");
+ } else if (ret == QMessageBox::Cancel) {
+ return false;
+ }
+ }
+ return true;
+}
+//! [18]
+
+//! [19]
+bool MainWindow::saveFile(const QByteArray &fileFormat)
+//! [19] //! [20]
+{
+ QString initialPath = QDir::currentPath() + "/untitled." + fileFormat;
+
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ initialPath,
+ tr("%1 Files (*.%2);;All Files (*)")
+ .arg(QString(fileFormat.toUpper()))
+ .arg(QString(fileFormat)));
+ if (fileName.isEmpty()) {
+ return false;
+ } else {
+ return scribbleArea->saveImage(fileName, fileFormat);
+ }
+}
+//! [20]
diff --git a/examples/widgets/scribble/mainwindow.h b/examples/widgets/scribble/mainwindow.h
new file mode 100644
index 0000000..0c3b2a4
--- /dev/null
+++ b/examples/widgets/scribble/mainwindow.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QList>
+#include <QMainWindow>
+
+class ScribbleArea;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void open();
+ void save();
+ void penColor();
+ void penWidth();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+ bool maybeSave();
+ bool saveFile(const QByteArray &fileFormat);
+
+ ScribbleArea *scribbleArea;
+
+ QMenu *saveAsMenu;
+ QMenu *fileMenu;
+ QMenu *optionMenu;
+ QMenu *helpMenu;
+
+ QAction *openAct;
+ QList<QAction *> saveAsActs;
+ QAction *exitAct;
+ QAction *penColorAct;
+ QAction *penWidthAct;
+ QAction *printAct;
+ QAction *clearScreenAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/scribble/scribble.pro b/examples/widgets/scribble/scribble.pro
new file mode 100644
index 0000000..21f24cc
--- /dev/null
+++ b/examples/widgets/scribble/scribble.pro
@@ -0,0 +1,11 @@
+HEADERS = mainwindow.h \
+ scribblearea.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ scribblearea.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/scribble
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS scribble.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/scribble
+INSTALLS += target sources
diff --git a/examples/widgets/scribble/scribblearea.cpp b/examples/widgets/scribble/scribblearea.cpp
new file mode 100644
index 0000000..0d10fcd
--- /dev/null
+++ b/examples/widgets/scribble/scribblearea.cpp
@@ -0,0 +1,215 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "scribblearea.h"
+
+//! [0]
+ScribbleArea::ScribbleArea(QWidget *parent)
+ : QWidget(parent)
+{
+ setAttribute(Qt::WA_StaticContents);
+ modified = false;
+ scribbling = false;
+ myPenWidth = 1;
+ myPenColor = Qt::blue;
+}
+//! [0]
+
+//! [1]
+bool ScribbleArea::openImage(const QString &fileName)
+//! [1] //! [2]
+{
+ QImage loadedImage;
+ if (!loadedImage.load(fileName))
+ return false;
+
+ QSize newSize = loadedImage.size().expandedTo(size());
+ resizeImage(&loadedImage, newSize);
+ image = loadedImage;
+ modified = false;
+ update();
+ return true;
+}
+//! [2]
+
+//! [3]
+bool ScribbleArea::saveImage(const QString &fileName, const char *fileFormat)
+//! [3] //! [4]
+{
+ QImage visibleImage = image;
+ resizeImage(&visibleImage, size());
+
+ if (visibleImage.save(fileName, fileFormat)) {
+ modified = false;
+ return true;
+ } else {
+ return false;
+ }
+}
+//! [4]
+
+//! [5]
+void ScribbleArea::setPenColor(const QColor &newColor)
+//! [5] //! [6]
+{
+ myPenColor = newColor;
+}
+//! [6]
+
+//! [7]
+void ScribbleArea::setPenWidth(int newWidth)
+//! [7] //! [8]
+{
+ myPenWidth = newWidth;
+}
+//! [8]
+
+//! [9]
+void ScribbleArea::clearImage()
+//! [9] //! [10]
+{
+ image.fill(qRgb(255, 255, 255));
+ modified = true;
+ update();
+}
+//! [10]
+
+//! [11]
+void ScribbleArea::mousePressEvent(QMouseEvent *event)
+//! [11] //! [12]
+{
+ if (event->button() == Qt::LeftButton) {
+ lastPoint = event->pos();
+ scribbling = true;
+ }
+}
+
+void ScribbleArea::mouseMoveEvent(QMouseEvent *event)
+{
+ if ((event->buttons() & Qt::LeftButton) && scribbling)
+ drawLineTo(event->pos());
+}
+
+void ScribbleArea::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton && scribbling) {
+ drawLineTo(event->pos());
+ scribbling = false;
+ }
+}
+
+//! [12] //! [13]
+void ScribbleArea::paintEvent(QPaintEvent * /* event */)
+//! [13] //! [14]
+{
+ QPainter painter(this);
+ painter.drawImage(QPoint(0, 0), image);
+}
+//! [14]
+
+//! [15]
+void ScribbleArea::resizeEvent(QResizeEvent *event)
+//! [15] //! [16]
+{
+ if (width() > image.width() || height() > image.height()) {
+ int newWidth = qMax(width() + 128, image.width());
+ int newHeight = qMax(height() + 128, image.height());
+ resizeImage(&image, QSize(newWidth, newHeight));
+ update();
+ }
+ QWidget::resizeEvent(event);
+}
+//! [16]
+
+//! [17]
+void ScribbleArea::drawLineTo(const QPoint &endPoint)
+//! [17] //! [18]
+{
+ QPainter painter(&image);
+ painter.setPen(QPen(myPenColor, myPenWidth, Qt::SolidLine, Qt::RoundCap,
+ Qt::RoundJoin));
+ painter.drawLine(lastPoint, endPoint);
+ modified = true;
+
+ int rad = (myPenWidth / 2) + 2;
+ update(QRect(lastPoint, endPoint).normalized()
+ .adjusted(-rad, -rad, +rad, +rad));
+ lastPoint = endPoint;
+}
+//! [18]
+
+//! [19]
+void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
+//! [19] //! [20]
+{
+ if (image->size() == newSize)
+ return;
+
+ QImage newImage(newSize, QImage::Format_RGB32);
+ newImage.fill(qRgb(255, 255, 255));
+ QPainter painter(&newImage);
+ painter.drawImage(QPoint(0, 0), *image);
+ *image = newImage;
+}
+//! [20]
+
+//! [21]
+void ScribbleArea::print()
+{
+#ifndef QT_NO_PRINTER
+ QPrinter printer(QPrinter::HighResolution);
+
+ QPrintDialog *printDialog = new QPrintDialog(&printer, this);
+//! [21] //! [22]
+ if (printDialog->exec() == QDialog::Accepted) {
+ QPainter painter(&printer);
+ QRect rect = painter.viewport();
+ QSize size = image.size();
+ size.scale(rect.size(), Qt::KeepAspectRatio);
+ painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
+ painter.setWindow(image.rect());
+ painter.drawImage(0, 0, image);
+ }
+#endif // QT_NO_PRINTER
+}
+//! [22]
diff --git a/examples/widgets/scribble/scribblearea.h b/examples/widgets/scribble/scribblearea.h
new file mode 100644
index 0000000..afa3cbc
--- /dev/null
+++ b/examples/widgets/scribble/scribblearea.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCRIBBLEAREA_H
+#define SCRIBBLEAREA_H
+
+#include <QColor>
+#include <QImage>
+#include <QPoint>
+#include <QWidget>
+
+//! [0]
+class ScribbleArea : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ScribbleArea(QWidget *parent = 0);
+
+ bool openImage(const QString &fileName);
+ bool saveImage(const QString &fileName, const char *fileFormat);
+ void setPenColor(const QColor &newColor);
+ void setPenWidth(int newWidth);
+
+ bool isModified() const { return modified; }
+ QColor penColor() const { return myPenColor; }
+ int penWidth() const { return myPenWidth; }
+
+public slots:
+ void clearImage();
+ void print();
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ void drawLineTo(const QPoint &endPoint);
+ void resizeImage(QImage *image, const QSize &newSize);
+
+ bool modified;
+ bool scribbling;
+ int myPenWidth;
+ QColor myPenColor;
+ QImage image;
+ QPoint lastPoint;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/shapedclock/main.cpp b/examples/widgets/shapedclock/main.cpp
new file mode 100644
index 0000000..889aac1
--- /dev/null
+++ b/examples/widgets/shapedclock/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "shapedclock.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ShapedClock clock;
+ clock.show();
+ return app.exec();
+}
diff --git a/examples/widgets/shapedclock/shapedclock.cpp b/examples/widgets/shapedclock/shapedclock.cpp
new file mode 100644
index 0000000..9b8a282
--- /dev/null
+++ b/examples/widgets/shapedclock/shapedclock.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "shapedclock.h"
+
+//! [0]
+ShapedClock::ShapedClock(QWidget *parent)
+ : QWidget(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint)
+{
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ QAction *quitAction = new QAction(tr("E&xit"), this);
+ quitAction->setShortcut(tr("Ctrl+Q"));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ addAction(quitAction);
+
+ setContextMenuPolicy(Qt::ActionsContextMenu);
+ setToolTip(tr("Drag the clock with the left mouse button.\n"
+ "Use the right mouse button to open a context menu."));
+ setWindowTitle(tr("Shaped Analog Clock"));
+}
+//! [0]
+
+//! [1]
+void ShapedClock::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ dragPosition = event->globalPos() - frameGeometry().topLeft();
+ event->accept();
+ }
+}
+//! [1]
+
+//! [2]
+void ShapedClock::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() & Qt::LeftButton) {
+ move(event->globalPos() - dragPosition);
+ event->accept();
+ }
+}
+//! [2]
+
+//! [3]
+void ShapedClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+}
+//! [3]
+
+//! [4]
+void ShapedClock::resizeEvent(QResizeEvent * /* event */)
+{
+ int side = qMin(width(), height());
+ QRegion maskedRegion(width() / 2 - side / 2, height() / 2 - side / 2, side,
+ side, QRegion::Ellipse);
+ setMask(maskedRegion);
+}
+//! [4]
+
+//! [5]
+QSize ShapedClock::sizeHint() const
+{
+ return QSize(100, 100);
+}
+//! [5]
diff --git a/examples/widgets/shapedclock/shapedclock.h b/examples/widgets/shapedclock/shapedclock.h
new file mode 100644
index 0000000..1de52e7
--- /dev/null
+++ b/examples/widgets/shapedclock/shapedclock.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SHAPEDCLOCK_H
+#define SHAPEDCLOCK_H
+
+#include <QWidget>
+
+//! [0]
+class ShapedClock : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ShapedClock(QWidget *parent = 0);
+ QSize sizeHint() const;
+
+protected:
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ QPoint dragPosition;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/shapedclock/shapedclock.pro b/examples/widgets/shapedclock/shapedclock.pro
new file mode 100644
index 0000000..6ef5dd0
--- /dev/null
+++ b/examples/widgets/shapedclock/shapedclock.pro
@@ -0,0 +1,9 @@
+HEADERS = shapedclock.h
+SOURCES = shapedclock.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/shapedclock
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS shapedclock.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/shapedclock
+INSTALLS += target sources
diff --git a/examples/widgets/sliders/main.cpp b/examples/widgets/sliders/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/widgets/sliders/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/sliders/sliders.pro b/examples/widgets/sliders/sliders.pro
new file mode 100644
index 0000000..b845554
--- /dev/null
+++ b/examples/widgets/sliders/sliders.pro
@@ -0,0 +1,11 @@
+HEADERS = slidersgroup.h \
+ window.h
+SOURCES = main.cpp \
+ slidersgroup.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/sliders
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS sliders.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/sliders
+INSTALLS += target sources
diff --git a/examples/widgets/sliders/slidersgroup.cpp b/examples/widgets/sliders/slidersgroup.cpp
new file mode 100644
index 0000000..9a0b98b
--- /dev/null
+++ b/examples/widgets/sliders/slidersgroup.cpp
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "slidersgroup.h"
+
+//! [0]
+SlidersGroup::SlidersGroup(Qt::Orientation orientation, const QString &title,
+ QWidget *parent)
+ : QGroupBox(title, parent)
+{
+ slider = new QSlider(orientation);
+ slider->setFocusPolicy(Qt::StrongFocus);
+ slider->setTickPosition(QSlider::TicksBothSides);
+ slider->setTickInterval(10);
+ slider->setSingleStep(1);
+
+ scrollBar = new QScrollBar(orientation);
+ scrollBar->setFocusPolicy(Qt::StrongFocus);
+
+ dial = new QDial;
+ dial->setFocusPolicy(Qt::StrongFocus);
+
+ connect(slider, SIGNAL(valueChanged(int)), scrollBar, SLOT(setValue(int)));
+ connect(scrollBar, SIGNAL(valueChanged(int)), dial, SLOT(setValue(int)));
+ connect(dial, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int)));
+//! [0] //! [1]
+ connect(dial, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int)));
+//! [1] //! [2]
+
+//! [2] //! [3]
+ QBoxLayout::Direction direction;
+//! [3] //! [4]
+
+ if (orientation == Qt::Horizontal)
+ direction = QBoxLayout::TopToBottom;
+ else
+ direction = QBoxLayout::LeftToRight;
+
+ QBoxLayout *slidersLayout = new QBoxLayout(direction);
+ slidersLayout->addWidget(slider);
+ slidersLayout->addWidget(scrollBar);
+ slidersLayout->addWidget(dial);
+ setLayout(slidersLayout);
+}
+//! [4]
+
+//! [5]
+void SlidersGroup::setValue(int value)
+//! [5] //! [6]
+{
+ slider->setValue(value);
+}
+//! [6]
+
+//! [7]
+void SlidersGroup::setMinimum(int value)
+//! [7] //! [8]
+{
+ slider->setMinimum(value);
+ scrollBar->setMinimum(value);
+ dial->setMinimum(value);
+}
+//! [8]
+
+//! [9]
+void SlidersGroup::setMaximum(int value)
+//! [9] //! [10]
+{
+ slider->setMaximum(value);
+ scrollBar->setMaximum(value);
+ dial->setMaximum(value);
+}
+//! [10]
+
+//! [11]
+void SlidersGroup::invertAppearance(bool invert)
+//! [11] //! [12]
+{
+ slider->setInvertedAppearance(invert);
+ scrollBar->setInvertedAppearance(invert);
+ dial->setInvertedAppearance(invert);
+}
+//! [12]
+
+//! [13]
+void SlidersGroup::invertKeyBindings(bool invert)
+//! [13] //! [14]
+{
+ slider->setInvertedControls(invert);
+ scrollBar->setInvertedControls(invert);
+ dial->setInvertedControls(invert);
+}
+//! [14]
diff --git a/examples/widgets/sliders/slidersgroup.h b/examples/widgets/sliders/slidersgroup.h
new file mode 100644
index 0000000..1f2ea82
--- /dev/null
+++ b/examples/widgets/sliders/slidersgroup.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SLIDERSGROUP_H
+#define SLIDERSGROUP_H
+
+#include <QGroupBox>
+
+QT_BEGIN_NAMESPACE
+class QDial;
+class QScrollBar;
+class QSlider;
+QT_END_NAMESPACE
+
+//! [0]
+class SlidersGroup : public QGroupBox
+{
+ Q_OBJECT
+
+public:
+ SlidersGroup(Qt::Orientation orientation, const QString &title,
+ QWidget *parent = 0);
+
+signals:
+ void valueChanged(int value);
+
+public slots:
+ void setValue(int value);
+ void setMinimum(int value);
+ void setMaximum(int value);
+ void invertAppearance(bool invert);
+ void invertKeyBindings(bool invert);
+
+private:
+ QSlider *slider;
+ QScrollBar *scrollBar;
+ QDial *dial;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/sliders/window.cpp b/examples/widgets/sliders/window.cpp
new file mode 100644
index 0000000..f74af74
--- /dev/null
+++ b/examples/widgets/sliders/window.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "slidersgroup.h"
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ horizontalSliders = new SlidersGroup(Qt::Horizontal, tr("Horizontal"));
+ verticalSliders = new SlidersGroup(Qt::Vertical, tr("Vertical"));
+
+ stackedWidget = new QStackedWidget;
+ stackedWidget->addWidget(horizontalSliders);
+ stackedWidget->addWidget(verticalSliders);
+
+ createControls(tr("Controls"));
+//! [0]
+
+//! [1]
+ connect(horizontalSliders, SIGNAL(valueChanged(int)),
+//! [1] //! [2]
+ verticalSliders, SLOT(setValue(int)));
+ connect(verticalSliders, SIGNAL(valueChanged(int)),
+ valueSpinBox, SLOT(setValue(int)));
+ connect(valueSpinBox, SIGNAL(valueChanged(int)),
+ horizontalSliders, SLOT(setValue(int)));
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(controlsGroup);
+ layout->addWidget(stackedWidget);
+ setLayout(layout);
+
+ minimumSpinBox->setValue(0);
+ maximumSpinBox->setValue(20);
+ valueSpinBox->setValue(5);
+
+ setWindowTitle(tr("Sliders"));
+}
+//! [2]
+
+//! [3]
+void Window::createControls(const QString &title)
+//! [3] //! [4]
+{
+ controlsGroup = new QGroupBox(title);
+
+ minimumLabel = new QLabel(tr("Minimum value:"));
+ maximumLabel = new QLabel(tr("Maximum value:"));
+ valueLabel = new QLabel(tr("Current value:"));
+
+ invertedAppearance = new QCheckBox(tr("Inverted appearance"));
+ invertedKeyBindings = new QCheckBox(tr("Inverted key bindings"));
+
+//! [4] //! [5]
+ minimumSpinBox = new QSpinBox;
+//! [5] //! [6]
+ minimumSpinBox->setRange(-100, 100);
+ minimumSpinBox->setSingleStep(1);
+
+ maximumSpinBox = new QSpinBox;
+ maximumSpinBox->setRange(-100, 100);
+ maximumSpinBox->setSingleStep(1);
+
+ valueSpinBox = new QSpinBox;
+ valueSpinBox->setRange(-100, 100);
+ valueSpinBox->setSingleStep(1);
+
+ orientationCombo = new QComboBox;
+ orientationCombo->addItem(tr("Horizontal slider-like widgets"));
+ orientationCombo->addItem(tr("Vertical slider-like widgets"));
+
+//! [6] //! [7]
+ connect(orientationCombo, SIGNAL(activated(int)),
+//! [7] //! [8]
+ stackedWidget, SLOT(setCurrentIndex(int)));
+ connect(minimumSpinBox, SIGNAL(valueChanged(int)),
+ horizontalSliders, SLOT(setMinimum(int)));
+ connect(minimumSpinBox, SIGNAL(valueChanged(int)),
+ verticalSliders, SLOT(setMinimum(int)));
+ connect(maximumSpinBox, SIGNAL(valueChanged(int)),
+ horizontalSliders, SLOT(setMaximum(int)));
+ connect(maximumSpinBox, SIGNAL(valueChanged(int)),
+ verticalSliders, SLOT(setMaximum(int)));
+ connect(invertedAppearance, SIGNAL(toggled(bool)),
+ horizontalSliders, SLOT(invertAppearance(bool)));
+ connect(invertedAppearance, SIGNAL(toggled(bool)),
+ verticalSliders, SLOT(invertAppearance(bool)));
+ connect(invertedKeyBindings, SIGNAL(toggled(bool)),
+ horizontalSliders, SLOT(invertKeyBindings(bool)));
+ connect(invertedKeyBindings, SIGNAL(toggled(bool)),
+ verticalSliders, SLOT(invertKeyBindings(bool)));
+
+ QGridLayout *controlsLayout = new QGridLayout;
+ controlsLayout->addWidget(minimumLabel, 0, 0);
+ controlsLayout->addWidget(maximumLabel, 1, 0);
+ controlsLayout->addWidget(valueLabel, 2, 0);
+ controlsLayout->addWidget(minimumSpinBox, 0, 1);
+ controlsLayout->addWidget(maximumSpinBox, 1, 1);
+ controlsLayout->addWidget(valueSpinBox, 2, 1);
+ controlsLayout->addWidget(invertedAppearance, 0, 2);
+ controlsLayout->addWidget(invertedKeyBindings, 1, 2);
+ controlsLayout->addWidget(orientationCombo, 3, 0, 1, 3);
+ controlsGroup->setLayout(controlsLayout);
+}
+//! [8]
diff --git a/examples/widgets/sliders/window.h b/examples/widgets/sliders/window.h
new file mode 100644
index 0000000..e8854fb
--- /dev/null
+++ b/examples/widgets/sliders/window.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QComboBox;
+class QGroupBox;
+class QLabel;
+class QSpinBox;
+class QStackedWidget;
+QT_END_NAMESPACE
+class SlidersGroup;
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+private:
+ void createControls(const QString &title);
+
+ SlidersGroup *horizontalSliders;
+ SlidersGroup *verticalSliders;
+ QStackedWidget *stackedWidget;
+
+ QGroupBox *controlsGroup;
+ QLabel *minimumLabel;
+ QLabel *maximumLabel;
+ QLabel *valueLabel;
+ QCheckBox *invertedAppearance;
+ QCheckBox *invertedKeyBindings;
+ QSpinBox *minimumSpinBox;
+ QSpinBox *maximumSpinBox;
+ QSpinBox *valueSpinBox;
+ QComboBox *orientationCombo;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/spinboxes/main.cpp b/examples/widgets/spinboxes/main.cpp
new file mode 100644
index 0000000..fa8b0ab
--- /dev/null
+++ b/examples/widgets/spinboxes/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "window.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Window window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/spinboxes/spinboxes.pro b/examples/widgets/spinboxes/spinboxes.pro
new file mode 100644
index 0000000..4edb79a
--- /dev/null
+++ b/examples/widgets/spinboxes/spinboxes.pro
@@ -0,0 +1,9 @@
+HEADERS = window.h
+SOURCES = main.cpp \
+ window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/spinboxes
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS spinboxes.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/spinboxes
+INSTALLS += target sources
diff --git a/examples/widgets/spinboxes/window.cpp b/examples/widgets/spinboxes/window.cpp
new file mode 100644
index 0000000..0dae9c5
--- /dev/null
+++ b/examples/widgets/spinboxes/window.cpp
@@ -0,0 +1,252 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "window.h"
+
+//! [0]
+Window::Window()
+{
+ createSpinBoxes();
+ createDateTimeEdits();
+ createDoubleSpinBoxes();
+
+ QHBoxLayout *layout = new QHBoxLayout;
+ layout->addWidget(spinBoxesGroup);
+ layout->addWidget(editsGroup);
+ layout->addWidget(doubleSpinBoxesGroup);
+ setLayout(layout);
+
+ setWindowTitle(tr("Spin Boxes"));
+}
+//! [0]
+
+//! [1]
+void Window::createSpinBoxes()
+{
+ spinBoxesGroup = new QGroupBox(tr("Spinboxes"));
+
+ QLabel *integerLabel = new QLabel(tr("Enter a value between "
+ "%1 and %2:").arg(-20).arg(20));
+ QSpinBox *integerSpinBox = new QSpinBox;
+ integerSpinBox->setRange(-20, 20);
+ integerSpinBox->setSingleStep(1);
+ integerSpinBox->setValue(0);
+//! [1]
+
+//! [2]
+ QLabel *zoomLabel = new QLabel(tr("Enter a zoom value between "
+ "%1 and %2:").arg(0).arg(1000));
+//! [3]
+ QSpinBox *zoomSpinBox = new QSpinBox;
+ zoomSpinBox->setRange(0, 1000);
+ zoomSpinBox->setSingleStep(10);
+ zoomSpinBox->setSuffix("%");
+ zoomSpinBox->setSpecialValueText(tr("Automatic"));
+ zoomSpinBox->setValue(100);
+//! [2] //! [3]
+
+//! [4]
+ QLabel *priceLabel = new QLabel(tr("Enter a price between "
+ "%1 and %2:").arg(0).arg(999));
+ QSpinBox *priceSpinBox = new QSpinBox;
+ priceSpinBox->setRange(0, 999);
+ priceSpinBox->setSingleStep(1);
+ priceSpinBox->setPrefix("$");
+ priceSpinBox->setValue(99);
+//! [4] //! [5]
+
+ QVBoxLayout *spinBoxLayout = new QVBoxLayout;
+ spinBoxLayout->addWidget(integerLabel);
+ spinBoxLayout->addWidget(integerSpinBox);
+ spinBoxLayout->addWidget(zoomLabel);
+ spinBoxLayout->addWidget(zoomSpinBox);
+ spinBoxLayout->addWidget(priceLabel);
+ spinBoxLayout->addWidget(priceSpinBox);
+ spinBoxesGroup->setLayout(spinBoxLayout);
+}
+//! [5]
+
+//! [6]
+void Window::createDateTimeEdits()
+{
+ editsGroup = new QGroupBox(tr("Date and time spin boxes"));
+
+ QLabel *dateLabel = new QLabel;
+ QDateEdit *dateEdit = new QDateEdit(QDate::currentDate());
+ dateEdit->setDateRange(QDate(2005, 1, 1), QDate(2010, 12, 31));
+ dateLabel->setText(tr("Appointment date (between %0 and %1):")
+ .arg(dateEdit->minimumDate().toString(Qt::ISODate))
+ .arg(dateEdit->maximumDate().toString(Qt::ISODate)));
+//! [6]
+
+//! [7]
+ QLabel *timeLabel = new QLabel;
+ QTimeEdit *timeEdit = new QTimeEdit(QTime::currentTime());
+ timeEdit->setTimeRange(QTime(9, 0, 0, 0), QTime(16, 30, 0, 0));
+ timeLabel->setText(tr("Appointment time (between %0 and %1):")
+ .arg(timeEdit->minimumTime().toString(Qt::ISODate))
+ .arg(timeEdit->maximumTime().toString(Qt::ISODate)));
+//! [7]
+
+//! [8]
+ meetingLabel = new QLabel;
+ meetingEdit = new QDateTimeEdit(QDateTime::currentDateTime());
+//! [8]
+
+//! [9]
+ QLabel *formatLabel = new QLabel(tr("Format string for the meeting date "
+ "and time:"));
+ QComboBox *formatComboBox = new QComboBox;
+ formatComboBox->addItem("yyyy-MM-dd hh:mm:ss (zzz 'ms')");
+ formatComboBox->addItem("hh:mm:ss MM/dd/yyyy");
+ formatComboBox->addItem("hh:mm:ss dd/MM/yyyy");
+ formatComboBox->addItem("hh:mm:ss");
+ formatComboBox->addItem("hh:mm ap");
+//! [9] //! [10]
+
+ connect(formatComboBox, SIGNAL(activated(const QString &)),
+ this, SLOT(setFormatString(const QString &)));
+//! [10]
+
+ setFormatString(formatComboBox->currentText());
+
+//! [11]
+ QVBoxLayout *editsLayout = new QVBoxLayout;
+ editsLayout->addWidget(dateLabel);
+ editsLayout->addWidget(dateEdit);
+ editsLayout->addWidget(timeLabel);
+ editsLayout->addWidget(timeEdit);
+ editsLayout->addWidget(meetingLabel);
+ editsLayout->addWidget(meetingEdit);
+ editsLayout->addWidget(formatLabel);
+ editsLayout->addWidget(formatComboBox);
+ editsGroup->setLayout(editsLayout);
+}
+//! [11]
+
+//! [12]
+void Window::setFormatString(const QString &formatString)
+{
+ meetingEdit->setDisplayFormat(formatString);
+//! [12] //! [13]
+ if (meetingEdit->displayedSections() & QDateTimeEdit::DateSections_Mask) {
+ meetingEdit->setDateRange(QDate(2004, 11, 1), QDate(2005, 11, 30));
+ meetingLabel->setText(tr("Meeting date (between %0 and %1):")
+ .arg(meetingEdit->minimumDate().toString(Qt::ISODate))
+ .arg(meetingEdit->maximumDate().toString(Qt::ISODate)));
+ } else {
+ meetingEdit->setTimeRange(QTime(0, 7, 20, 0), QTime(21, 0, 0, 0));
+ meetingLabel->setText(tr("Meeting time (between %0 and %1):")
+ .arg(meetingEdit->minimumTime().toString(Qt::ISODate))
+ .arg(meetingEdit->maximumTime().toString(Qt::ISODate)));
+ }
+}
+//! [13]
+
+//! [14]
+void Window::createDoubleSpinBoxes()
+{
+ doubleSpinBoxesGroup = new QGroupBox(tr("Double precision spinboxes"));
+
+ QLabel *precisionLabel = new QLabel(tr("Number of decimal places "
+ "to show:"));
+ QSpinBox *precisionSpinBox = new QSpinBox;
+ precisionSpinBox->setRange(0, 100);
+ precisionSpinBox->setValue(2);
+//! [14]
+
+//! [15]
+ QLabel *doubleLabel = new QLabel(tr("Enter a value between "
+ "%1 and %2:").arg(-20).arg(20));
+ doubleSpinBox = new QDoubleSpinBox;
+ doubleSpinBox->setRange(-20.0, 20.0);
+ doubleSpinBox->setSingleStep(1.0);
+ doubleSpinBox->setValue(0.0);
+//! [15]
+
+//! [16]
+ QLabel *scaleLabel = new QLabel(tr("Enter a scale factor between "
+ "%1 and %2:").arg(0).arg(1000.0));
+ scaleSpinBox = new QDoubleSpinBox;
+ scaleSpinBox->setRange(0.0, 1000.0);
+ scaleSpinBox->setSingleStep(10.0);
+ scaleSpinBox->setSuffix("%");
+ scaleSpinBox->setSpecialValueText(tr("No scaling"));
+ scaleSpinBox->setValue(100.0);
+//! [16]
+
+//! [17]
+ QLabel *priceLabel = new QLabel(tr("Enter a price between "
+ "%1 and %2:").arg(0).arg(1000));
+ priceSpinBox = new QDoubleSpinBox;
+ priceSpinBox->setRange(0.0, 1000.0);
+ priceSpinBox->setSingleStep(1.0);
+ priceSpinBox->setPrefix("$");
+ priceSpinBox->setValue(99.99);
+
+ connect(precisionSpinBox, SIGNAL(valueChanged(int)),
+//! [17]
+ this, SLOT(changePrecision(int)));
+
+//! [18]
+ QVBoxLayout *spinBoxLayout = new QVBoxLayout;
+ spinBoxLayout->addWidget(precisionLabel);
+ spinBoxLayout->addWidget(precisionSpinBox);
+ spinBoxLayout->addWidget(doubleLabel);
+ spinBoxLayout->addWidget(doubleSpinBox);
+ spinBoxLayout->addWidget(scaleLabel);
+ spinBoxLayout->addWidget(scaleSpinBox);
+ spinBoxLayout->addWidget(priceLabel);
+ spinBoxLayout->addWidget(priceSpinBox);
+ doubleSpinBoxesGroup->setLayout(spinBoxLayout);
+}
+//! [18]
+
+//! [19]
+void Window::changePrecision(int decimals)
+{
+ doubleSpinBox->setDecimals(decimals);
+ scaleSpinBox->setDecimals(decimals);
+ priceSpinBox->setDecimals(decimals);
+}
+//! [19]
diff --git a/examples/widgets/spinboxes/window.h b/examples/widgets/spinboxes/window.h
new file mode 100644
index 0000000..68055f6
--- /dev/null
+++ b/examples/widgets/spinboxes/window.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QDateTimeEdit;
+class QDoubleSpinBox;
+class QGroupBox;
+class QLabel;
+QT_END_NAMESPACE
+
+//! [0]
+class Window : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Window();
+
+public slots:
+ void changePrecision(int decimals);
+ void setFormatString(const QString &formatString);
+
+private:
+ void createSpinBoxes();
+ void createDateTimeEdits();
+ void createDoubleSpinBoxes();
+
+ QDateTimeEdit *meetingEdit;
+ QDoubleSpinBox *doubleSpinBox;
+ QDoubleSpinBox *priceSpinBox;
+ QDoubleSpinBox *scaleSpinBox;
+ QGroupBox *spinBoxesGroup;
+ QGroupBox *editsGroup;
+ QGroupBox *doubleSpinBoxesGroup;
+ QLabel *meetingLabel;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/styles/images/woodbackground.png b/examples/widgets/styles/images/woodbackground.png
new file mode 100644
index 0000000..8be3366
--- /dev/null
+++ b/examples/widgets/styles/images/woodbackground.png
Binary files differ
diff --git a/examples/widgets/styles/images/woodbutton.png b/examples/widgets/styles/images/woodbutton.png
new file mode 100644
index 0000000..adb59ef
--- /dev/null
+++ b/examples/widgets/styles/images/woodbutton.png
Binary files differ
diff --git a/examples/widgets/styles/main.cpp b/examples/widgets/styles/main.cpp
new file mode 100644
index 0000000..8998858
--- /dev/null
+++ b/examples/widgets/styles/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "widgetgallery.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(styles);
+
+ QApplication app(argc, argv);
+ WidgetGallery gallery;
+ gallery.show();
+ return app.exec();
+}
diff --git a/examples/widgets/styles/norwegianwoodstyle.cpp b/examples/widgets/styles/norwegianwoodstyle.cpp
new file mode 100644
index 0000000..1be5db0
--- /dev/null
+++ b/examples/widgets/styles/norwegianwoodstyle.cpp
@@ -0,0 +1,331 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "norwegianwoodstyle.h"
+
+//! [0]
+void NorwegianWoodStyle::polish(QPalette &palette)
+{
+ QColor brown(212, 140, 95);
+ QColor beige(236, 182, 120);
+ QColor slightlyOpaqueBlack(0, 0, 0, 63);
+
+ QPixmap backgroundImage(":/images/woodbackground.png");
+ QPixmap buttonImage(":/images/woodbutton.png");
+ QPixmap midImage = buttonImage;
+
+ QPainter painter;
+ painter.begin(&midImage);
+ painter.setPen(Qt::NoPen);
+ painter.fillRect(midImage.rect(), slightlyOpaqueBlack);
+ painter.end();
+//! [0]
+
+//! [1]
+ palette = QPalette(brown);
+
+ palette.setBrush(QPalette::BrightText, Qt::white);
+ palette.setBrush(QPalette::Base, beige);
+ palette.setBrush(QPalette::Highlight, Qt::darkGreen);
+ setTexture(palette, QPalette::Button, buttonImage);
+ setTexture(palette, QPalette::Mid, midImage);
+ setTexture(palette, QPalette::Window, backgroundImage);
+
+ QBrush brush = palette.background();
+ brush.setColor(brush.color().dark());
+
+ palette.setBrush(QPalette::Disabled, QPalette::WindowText, brush);
+ palette.setBrush(QPalette::Disabled, QPalette::Text, brush);
+ palette.setBrush(QPalette::Disabled, QPalette::ButtonText, brush);
+ palette.setBrush(QPalette::Disabled, QPalette::Base, brush);
+ palette.setBrush(QPalette::Disabled, QPalette::Button, brush);
+ palette.setBrush(QPalette::Disabled, QPalette::Mid, brush);
+}
+//! [1]
+
+//! [3]
+void NorwegianWoodStyle::polish(QWidget *widget)
+//! [3] //! [4]
+{
+ if (qobject_cast<QPushButton *>(widget)
+ || qobject_cast<QComboBox *>(widget))
+ widget->setAttribute(Qt::WA_Hover, true);
+}
+//! [4]
+
+//! [5]
+void NorwegianWoodStyle::unpolish(QWidget *widget)
+//! [5] //! [6]
+{
+ if (qobject_cast<QPushButton *>(widget)
+ || qobject_cast<QComboBox *>(widget))
+ widget->setAttribute(Qt::WA_Hover, false);
+}
+//! [6]
+
+//! [7]
+int NorwegianWoodStyle::pixelMetric(PixelMetric metric,
+//! [7] //! [8]
+ const QStyleOption *option,
+ const QWidget *widget) const
+{
+ switch (metric) {
+ case PM_ComboBoxFrameWidth:
+ return 8;
+ case PM_ScrollBarExtent:
+ return QMotifStyle::pixelMetric(metric, option, widget) + 4;
+ default:
+ return QMotifStyle::pixelMetric(metric, option, widget);
+ }
+}
+//! [8]
+
+//! [9]
+int NorwegianWoodStyle::styleHint(StyleHint hint, const QStyleOption *option,
+//! [9] //! [10]
+ const QWidget *widget,
+ QStyleHintReturn *returnData) const
+{
+ switch (hint) {
+ case SH_DitherDisabledText:
+ return int(false);
+ case SH_EtchDisabledText:
+ return int(true);
+ default:
+ return QMotifStyle::styleHint(hint, option, widget, returnData);
+ }
+}
+//! [10]
+
+//! [11]
+void NorwegianWoodStyle::drawPrimitive(PrimitiveElement element,
+//! [11] //! [12]
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget) const
+{
+ switch (element) {
+ case PE_PanelButtonCommand:
+ {
+ int delta = (option->state & State_MouseOver) ? 64 : 0;
+ QColor slightlyOpaqueBlack(0, 0, 0, 63);
+ QColor semiTransparentWhite(255, 255, 255, 127 + delta);
+ QColor semiTransparentBlack(0, 0, 0, 127 - delta);
+
+ int x, y, width, height;
+ option->rect.getRect(&x, &y, &width, &height);
+//! [12]
+
+//! [13]
+ QPainterPath roundRect = roundRectPath(option->rect);
+//! [13] //! [14]
+ int radius = qMin(width, height) / 2;
+//! [14]
+
+//! [15]
+ QBrush brush;
+//! [15] //! [16]
+ bool darker;
+
+ const QStyleOptionButton *buttonOption =
+ qstyleoption_cast<const QStyleOptionButton *>(option);
+ if (buttonOption
+ && (buttonOption->features & QStyleOptionButton::Flat)) {
+ brush = option->palette.background();
+ darker = (option->state & (State_Sunken | State_On));
+ } else {
+ if (option->state & (State_Sunken | State_On)) {
+ brush = option->palette.mid();
+ darker = !(option->state & State_Sunken);
+ } else {
+ brush = option->palette.button();
+ darker = false;
+//! [16] //! [17]
+ }
+//! [17] //! [18]
+ }
+//! [18]
+
+//! [19]
+ painter->save();
+//! [19] //! [20]
+ painter->setRenderHint(QPainter::Antialiasing, true);
+//! [20] //! [21]
+ painter->fillPath(roundRect, brush);
+//! [21] //! [22]
+ if (darker)
+//! [22] //! [23]
+ painter->fillPath(roundRect, slightlyOpaqueBlack);
+//! [23]
+
+//! [24]
+ int penWidth;
+//! [24] //! [25]
+ if (radius < 10)
+ penWidth = 3;
+ else if (radius < 20)
+ penWidth = 5;
+ else
+ penWidth = 7;
+
+ QPen topPen(semiTransparentWhite, penWidth);
+ QPen bottomPen(semiTransparentBlack, penWidth);
+
+ if (option->state & (State_Sunken | State_On))
+ qSwap(topPen, bottomPen);
+//! [25]
+
+//! [26]
+ int x1 = x;
+ int x2 = x + radius;
+ int x3 = x + width - radius;
+ int x4 = x + width;
+
+ if (option->direction == Qt::RightToLeft) {
+ qSwap(x1, x4);
+ qSwap(x2, x3);
+ }
+
+ QPolygon topHalf;
+ topHalf << QPoint(x1, y)
+ << QPoint(x4, y)
+ << QPoint(x3, y + radius)
+ << QPoint(x2, y + height - radius)
+ << QPoint(x1, y + height);
+
+ painter->setClipPath(roundRect);
+ painter->setClipRegion(topHalf, Qt::IntersectClip);
+ painter->setPen(topPen);
+ painter->drawPath(roundRect);
+//! [26] //! [32]
+
+ QPolygon bottomHalf = topHalf;
+ bottomHalf[0] = QPoint(x4, y + height);
+
+ painter->setClipPath(roundRect);
+ painter->setClipRegion(bottomHalf, Qt::IntersectClip);
+ painter->setPen(bottomPen);
+ painter->drawPath(roundRect);
+
+ painter->setPen(option->palette.foreground().color());
+ painter->setClipping(false);
+ painter->drawPath(roundRect);
+
+ painter->restore();
+ }
+ break;
+//! [32] //! [33]
+ default:
+//! [33] //! [34]
+ QMotifStyle::drawPrimitive(element, option, painter, widget);
+ }
+}
+//! [34]
+
+//! [35]
+void NorwegianWoodStyle::drawControl(ControlElement element,
+//! [35] //! [36]
+ const QStyleOption *option,
+ QPainter *painter,
+ const QWidget *widget) const
+{
+ switch (element) {
+ case CE_PushButtonLabel:
+ {
+ QStyleOptionButton myButtonOption;
+ const QStyleOptionButton *buttonOption =
+ qstyleoption_cast<const QStyleOptionButton *>(option);
+ if (buttonOption) {
+ myButtonOption = *buttonOption;
+ if (myButtonOption.palette.currentColorGroup()
+ != QPalette::Disabled) {
+ if (myButtonOption.state & (State_Sunken | State_On)) {
+ myButtonOption.palette.setBrush(QPalette::ButtonText,
+ myButtonOption.palette.brightText());
+ }
+ }
+ }
+ QMotifStyle::drawControl(element, &myButtonOption, painter, widget);
+ }
+ break;
+ default:
+ QMotifStyle::drawControl(element, option, painter, widget);
+ }
+}
+//! [36]
+
+//! [37]
+void NorwegianWoodStyle::setTexture(QPalette &palette, QPalette::ColorRole role,
+//! [37] //! [38]
+ const QPixmap &pixmap)
+{
+ for (int i = 0; i < QPalette::NColorGroups; ++i) {
+ QColor color = palette.brush(QPalette::ColorGroup(i), role).color();
+ palette.setBrush(QPalette::ColorGroup(i), role, QBrush(color, pixmap));
+ }
+}
+//! [38]
+
+//! [39]
+QPainterPath NorwegianWoodStyle::roundRectPath(const QRect &rect)
+//! [39] //! [40]
+{
+ int radius = qMin(rect.width(), rect.height()) / 2;
+ int diam = 2 * radius;
+
+ int x1, y1, x2, y2;
+ rect.getCoords(&x1, &y1, &x2, &y2);
+
+ QPainterPath path;
+ path.moveTo(x2, y1 + radius);
+ path.arcTo(QRect(x2 - diam, y1, diam, diam), 0.0, +90.0);
+ path.lineTo(x1 + radius, y1);
+ path.arcTo(QRect(x1, y1, diam, diam), 90.0, +90.0);
+ path.lineTo(x1, y2 - radius);
+ path.arcTo(QRect(x1, y2 - diam, diam, diam), 180.0, +90.0);
+ path.lineTo(x1 + radius, y2);
+ path.arcTo(QRect(x2 - diam, y2 - diam, diam, diam), 270.0, +90.0);
+ path.closeSubpath();
+ return path;
+}
+//! [40]
diff --git a/examples/widgets/styles/norwegianwoodstyle.h b/examples/widgets/styles/norwegianwoodstyle.h
new file mode 100644
index 0000000..07c7797
--- /dev/null
+++ b/examples/widgets/styles/norwegianwoodstyle.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NORWEGIANWOODSTYLE_H
+#define NORWEGIANWOODSTYLE_H
+
+#include <QMotifStyle>
+#include <QPalette>
+
+QT_BEGIN_NAMESPACE
+class QPainterPath;
+QT_END_NAMESPACE
+
+//! [0]
+class NorwegianWoodStyle : public QMotifStyle
+{
+ Q_OBJECT
+
+public:
+ NorwegianWoodStyle() {}
+
+ void polish(QPalette &palette);
+ void polish(QWidget *widget);
+ void unpolish(QWidget *widget);
+ int pixelMetric(PixelMetric metric, const QStyleOption *option,
+ const QWidget *widget) const;
+ int styleHint(StyleHint hint, const QStyleOption *option,
+ const QWidget *widget, QStyleHintReturn *returnData) const;
+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const;
+ void drawControl(ControlElement control, const QStyleOption *option,
+ QPainter *painter, const QWidget *widget) const;
+
+private:
+ static void setTexture(QPalette &palette, QPalette::ColorRole role,
+ const QPixmap &pixmap);
+ static QPainterPath roundRectPath(const QRect &rect);
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/styles/styles.pro b/examples/widgets/styles/styles.pro
new file mode 100644
index 0000000..4c6c682
--- /dev/null
+++ b/examples/widgets/styles/styles.pro
@@ -0,0 +1,14 @@
+HEADERS = norwegianwoodstyle.h \
+ widgetgallery.h
+SOURCES = main.cpp \
+ norwegianwoodstyle.cpp \
+ widgetgallery.cpp
+RESOURCES = styles.qrc
+
+REQUIRES += "contains(styles, motif)"
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/styles
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS styles.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/styles
+INSTALLS += target sources
diff --git a/examples/widgets/styles/styles.qrc b/examples/widgets/styles/styles.qrc
new file mode 100644
index 0000000..4fdad8d
--- /dev/null
+++ b/examples/widgets/styles/styles.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/woodbutton.png</file>
+ <file>images/woodbackground.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/styles/widgetgallery.cpp b/examples/widgets/styles/widgetgallery.cpp
new file mode 100644
index 0000000..9a071a6
--- /dev/null
+++ b/examples/widgets/styles/widgetgallery.cpp
@@ -0,0 +1,276 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "norwegianwoodstyle.h"
+#include "widgetgallery.h"
+
+//! [0]
+WidgetGallery::WidgetGallery(QWidget *parent)
+ : QDialog(parent)
+{
+ originalPalette = QApplication::palette();
+
+ styleComboBox = new QComboBox;
+ styleComboBox->addItem("NorwegianWood");
+ styleComboBox->addItems(QStyleFactory::keys());
+
+ styleLabel = new QLabel(tr("&Style:"));
+ styleLabel->setBuddy(styleComboBox);
+
+ useStylePaletteCheckBox = new QCheckBox(tr("&Use style's standard palette"));
+ useStylePaletteCheckBox->setChecked(true);
+
+ disableWidgetsCheckBox = new QCheckBox(tr("&Disable widgets"));
+
+ createTopLeftGroupBox();
+ createTopRightGroupBox();
+ createBottomLeftTabWidget();
+ createBottomRightGroupBox();
+ createProgressBar();
+//! [0]
+
+//! [1]
+ connect(styleComboBox, SIGNAL(activated(const QString &)),
+//! [1] //! [2]
+ this, SLOT(changeStyle(const QString &)));
+ connect(useStylePaletteCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(changePalette()));
+ connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)),
+ topLeftGroupBox, SLOT(setDisabled(bool)));
+ connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)),
+ topRightGroupBox, SLOT(setDisabled(bool)));
+ connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)),
+ bottomLeftTabWidget, SLOT(setDisabled(bool)));
+ connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)),
+ bottomRightGroupBox, SLOT(setDisabled(bool)));
+//! [2]
+
+//! [3]
+ QHBoxLayout *topLayout = new QHBoxLayout;
+//! [3] //! [4]
+ topLayout->addWidget(styleLabel);
+ topLayout->addWidget(styleComboBox);
+ topLayout->addStretch(1);
+ topLayout->addWidget(useStylePaletteCheckBox);
+ topLayout->addWidget(disableWidgetsCheckBox);
+
+ QGridLayout *mainLayout = new QGridLayout;
+ mainLayout->addLayout(topLayout, 0, 0, 1, 2);
+ mainLayout->addWidget(topLeftGroupBox, 1, 0);
+ mainLayout->addWidget(topRightGroupBox, 1, 1);
+ mainLayout->addWidget(bottomLeftTabWidget, 2, 0);
+ mainLayout->addWidget(bottomRightGroupBox, 2, 1);
+ mainLayout->addWidget(progressBar, 3, 0, 1, 2);
+ mainLayout->setRowStretch(1, 1);
+ mainLayout->setRowStretch(2, 1);
+ mainLayout->setColumnStretch(0, 1);
+ mainLayout->setColumnStretch(1, 1);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Styles"));
+ changeStyle("NorwegianWood");
+}
+//! [4]
+
+//! [5]
+void WidgetGallery::changeStyle(const QString &styleName)
+//! [5] //! [6]
+{
+ if (styleName == "NorwegianWood") {
+ QApplication::setStyle(new NorwegianWoodStyle);
+ } else {
+ QApplication::setStyle(QStyleFactory::create(styleName));
+ }
+ changePalette();
+}
+//! [6]
+
+//! [7]
+void WidgetGallery::changePalette()
+//! [7] //! [8]
+{
+ if (useStylePaletteCheckBox->isChecked())
+ QApplication::setPalette(QApplication::style()->standardPalette());
+ else
+ QApplication::setPalette(originalPalette);
+}
+//! [8]
+
+//! [9]
+void WidgetGallery::advanceProgressBar()
+//! [9] //! [10]
+{
+ int curVal = progressBar->value();
+ int maxVal = progressBar->maximum();
+ progressBar->setValue(curVal + (maxVal - curVal) / 100);
+}
+//! [10]
+
+//! [11]
+void WidgetGallery::createTopLeftGroupBox()
+//! [11] //! [12]
+{
+ topLeftGroupBox = new QGroupBox(tr("Group 1"));
+
+ radioButton1 = new QRadioButton(tr("Radio button 1"));
+ radioButton2 = new QRadioButton(tr("Radio button 2"));
+ radioButton3 = new QRadioButton(tr("Radio button 3"));
+ radioButton1->setChecked(true);
+
+ checkBox = new QCheckBox(tr("Tri-state check box"));
+ checkBox->setTristate(true);
+ checkBox->setCheckState(Qt::PartiallyChecked);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(radioButton1);
+ layout->addWidget(radioButton2);
+ layout->addWidget(radioButton3);
+ layout->addWidget(checkBox);
+ layout->addStretch(1);
+ topLeftGroupBox->setLayout(layout);
+}
+//! [12]
+
+void WidgetGallery::createTopRightGroupBox()
+{
+ topRightGroupBox = new QGroupBox(tr("Group 2"));
+
+ defaultPushButton = new QPushButton(tr("Default Push Button"));
+ defaultPushButton->setDefault(true);
+
+ togglePushButton = new QPushButton(tr("Toggle Push Button"));
+ togglePushButton->setCheckable(true);
+ togglePushButton->setChecked(true);
+
+ flatPushButton = new QPushButton(tr("Flat Push Button"));
+ flatPushButton->setFlat(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(defaultPushButton);
+ layout->addWidget(togglePushButton);
+ layout->addWidget(flatPushButton);
+ layout->addStretch(1);
+ topRightGroupBox->setLayout(layout);
+}
+
+void WidgetGallery::createBottomLeftTabWidget()
+{
+ bottomLeftTabWidget = new QTabWidget;
+ bottomLeftTabWidget->setSizePolicy(QSizePolicy::Preferred,
+ QSizePolicy::Ignored);
+
+ QWidget *tab1 = new QWidget;
+ tableWidget = new QTableWidget(10, 10);
+
+ QHBoxLayout *tab1hbox = new QHBoxLayout;
+ tab1hbox->setMargin(5);
+ tab1hbox->addWidget(tableWidget);
+ tab1->setLayout(tab1hbox);
+
+ QWidget *tab2 = new QWidget;
+ textEdit = new QTextEdit;
+
+ textEdit->setPlainText(tr("Twinkle, twinkle, little star,\n"
+ "How I wonder what you are.\n"
+ "Up above the world so high,\n"
+ "Like a diamond in the sky.\n"
+ "Twinkle, twinkle, little star,\n"
+ "How I wonder what you are!\n"));
+
+ QHBoxLayout *tab2hbox = new QHBoxLayout;
+ tab2hbox->setMargin(5);
+ tab2hbox->addWidget(textEdit);
+ tab2->setLayout(tab2hbox);
+
+ bottomLeftTabWidget->addTab(tab1, tr("&Table"));
+ bottomLeftTabWidget->addTab(tab2, tr("Text &Edit"));
+}
+
+void WidgetGallery::createBottomRightGroupBox()
+{
+ bottomRightGroupBox = new QGroupBox(tr("Group 3"));
+ bottomRightGroupBox->setCheckable(true);
+ bottomRightGroupBox->setChecked(true);
+
+ lineEdit = new QLineEdit("s3cRe7");
+ lineEdit->setEchoMode(QLineEdit::Password);
+
+ spinBox = new QSpinBox(bottomRightGroupBox);
+ spinBox->setValue(50);
+
+ dateTimeEdit = new QDateTimeEdit(bottomRightGroupBox);
+ dateTimeEdit->setDateTime(QDateTime::currentDateTime());
+
+ slider = new QSlider(Qt::Horizontal, bottomRightGroupBox);
+ slider->setValue(40);
+
+ scrollBar = new QScrollBar(Qt::Horizontal, bottomRightGroupBox);
+ scrollBar->setValue(60);
+
+ dial = new QDial(bottomRightGroupBox);
+ dial->setValue(30);
+ dial->setNotchesVisible(true);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(lineEdit, 0, 0, 1, 2);
+ layout->addWidget(spinBox, 1, 0, 1, 2);
+ layout->addWidget(dateTimeEdit, 2, 0, 1, 2);
+ layout->addWidget(slider, 3, 0);
+ layout->addWidget(scrollBar, 4, 0);
+ layout->addWidget(dial, 3, 1, 2, 1);
+ layout->setRowStretch(5, 1);
+ bottomRightGroupBox->setLayout(layout);
+}
+
+//! [13]
+void WidgetGallery::createProgressBar()
+{
+ progressBar = new QProgressBar;
+ progressBar->setRange(0, 10000);
+ progressBar->setValue(0);
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(advanceProgressBar()));
+ timer->start(1000);
+}
+//! [13]
diff --git a/examples/widgets/styles/widgetgallery.h b/examples/widgets/styles/widgetgallery.h
new file mode 100644
index 0000000..f9f1723
--- /dev/null
+++ b/examples/widgets/styles/widgetgallery.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WIDGETGALLERY_H
+#define WIDGETGALLERY_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QComboBox;
+class QDateTimeEdit;
+class QDial;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QProgressBar;
+class QPushButton;
+class QRadioButton;
+class QScrollBar;
+class QSlider;
+class QSpinBox;
+class QTabWidget;
+class QTableWidget;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class WidgetGallery : public QDialog
+{
+ Q_OBJECT
+
+public:
+ WidgetGallery(QWidget *parent = 0);
+
+private slots:
+ void changeStyle(const QString &styleName);
+ void changePalette();
+ void advanceProgressBar();
+
+private:
+ void createTopLeftGroupBox();
+ void createTopRightGroupBox();
+ void createBottomLeftTabWidget();
+ void createBottomRightGroupBox();
+ void createProgressBar();
+
+ QPalette originalPalette;
+
+ QLabel *styleLabel;
+ QComboBox *styleComboBox;
+ QCheckBox *useStylePaletteCheckBox;
+ QCheckBox *disableWidgetsCheckBox;
+//! [0]
+
+ QGroupBox *topLeftGroupBox;
+ QRadioButton *radioButton1;
+ QRadioButton *radioButton2;
+ QRadioButton *radioButton3;
+ QCheckBox *checkBox;
+
+ QGroupBox *topRightGroupBox;
+ QPushButton *defaultPushButton;
+ QPushButton *togglePushButton;
+ QPushButton *flatPushButton;
+
+ QTabWidget *bottomLeftTabWidget;
+ QTableWidget *tableWidget;
+ QTextEdit *textEdit;
+
+ QGroupBox *bottomRightGroupBox;
+ QLineEdit *lineEdit;
+ QSpinBox *spinBox;
+ QDateTimeEdit *dateTimeEdit;
+ QSlider *slider;
+ QScrollBar *scrollBar;
+ QDial *dial;
+
+ QProgressBar *progressBar;
+//! [1]
+};
+//! [1]
+
+#endif
diff --git a/examples/widgets/stylesheet/images/checkbox_checked.png b/examples/widgets/stylesheet/images/checkbox_checked.png
new file mode 100644
index 0000000..cbf06f6
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_checked.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/checkbox_checked_hover.png b/examples/widgets/stylesheet/images/checkbox_checked_hover.png
new file mode 100644
index 0000000..fb4d4d3
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_checked_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/checkbox_checked_pressed.png b/examples/widgets/stylesheet/images/checkbox_checked_pressed.png
new file mode 100644
index 0000000..852fcc0
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_checked_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/checkbox_unchecked.png b/examples/widgets/stylesheet/images/checkbox_unchecked.png
new file mode 100644
index 0000000..5f54655
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_unchecked.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/checkbox_unchecked_hover.png b/examples/widgets/stylesheet/images/checkbox_unchecked_hover.png
new file mode 100644
index 0000000..6873644
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_unchecked_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/checkbox_unchecked_pressed.png b/examples/widgets/stylesheet/images/checkbox_unchecked_pressed.png
new file mode 100644
index 0000000..6a768c4
--- /dev/null
+++ b/examples/widgets/stylesheet/images/checkbox_unchecked_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/down_arrow.png b/examples/widgets/stylesheet/images/down_arrow.png
new file mode 100644
index 0000000..85004ae
--- /dev/null
+++ b/examples/widgets/stylesheet/images/down_arrow.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/down_arrow_disabled.png b/examples/widgets/stylesheet/images/down_arrow_disabled.png
new file mode 100644
index 0000000..d9eefed
--- /dev/null
+++ b/examples/widgets/stylesheet/images/down_arrow_disabled.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/frame.png b/examples/widgets/stylesheet/images/frame.png
new file mode 100644
index 0000000..05a6005
--- /dev/null
+++ b/examples/widgets/stylesheet/images/frame.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/pagefold.png b/examples/widgets/stylesheet/images/pagefold.png
new file mode 100644
index 0000000..69be8f2
--- /dev/null
+++ b/examples/widgets/stylesheet/images/pagefold.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/pushbutton.png b/examples/widgets/stylesheet/images/pushbutton.png
new file mode 100644
index 0000000..c7529ba
--- /dev/null
+++ b/examples/widgets/stylesheet/images/pushbutton.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/pushbutton_hover.png b/examples/widgets/stylesheet/images/pushbutton_hover.png
new file mode 100644
index 0000000..af0ef9d
--- /dev/null
+++ b/examples/widgets/stylesheet/images/pushbutton_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/pushbutton_pressed.png b/examples/widgets/stylesheet/images/pushbutton_pressed.png
new file mode 100644
index 0000000..f7381f7
--- /dev/null
+++ b/examples/widgets/stylesheet/images/pushbutton_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_checked.png b/examples/widgets/stylesheet/images/radiobutton_checked.png
new file mode 100644
index 0000000..8ab9157
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_checked.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_checked_hover.png b/examples/widgets/stylesheet/images/radiobutton_checked_hover.png
new file mode 100644
index 0000000..d68cb00
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_checked_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_checked_pressed.png b/examples/widgets/stylesheet/images/radiobutton_checked_pressed.png
new file mode 100644
index 0000000..e3cd5a5
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_checked_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_unchecked.png b/examples/widgets/stylesheet/images/radiobutton_unchecked.png
new file mode 100644
index 0000000..321a9a1
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_unchecked.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_unchecked_hover.png b/examples/widgets/stylesheet/images/radiobutton_unchecked_hover.png
new file mode 100644
index 0000000..666a3b0
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_unchecked_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.png b/examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.png
new file mode 100644
index 0000000..c4b0567
--- /dev/null
+++ b/examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/sizegrip.png b/examples/widgets/stylesheet/images/sizegrip.png
new file mode 100644
index 0000000..350583a
--- /dev/null
+++ b/examples/widgets/stylesheet/images/sizegrip.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spindown.png b/examples/widgets/stylesheet/images/spindown.png
new file mode 100644
index 0000000..7ff3c64
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spindown.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spindown_hover.png b/examples/widgets/stylesheet/images/spindown_hover.png
new file mode 100644
index 0000000..1486c4d
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spindown_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spindown_off.png b/examples/widgets/stylesheet/images/spindown_off.png
new file mode 100644
index 0000000..a90ab3f
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spindown_off.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spindown_pressed.png b/examples/widgets/stylesheet/images/spindown_pressed.png
new file mode 100644
index 0000000..f6271cb
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spindown_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spinup.png b/examples/widgets/stylesheet/images/spinup.png
new file mode 100644
index 0000000..1069dd0
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spinup.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spinup_hover.png b/examples/widgets/stylesheet/images/spinup_hover.png
new file mode 100644
index 0000000..884c8d7
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spinup_hover.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spinup_off.png b/examples/widgets/stylesheet/images/spinup_off.png
new file mode 100644
index 0000000..02dad1f
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spinup_off.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/spinup_pressed.png b/examples/widgets/stylesheet/images/spinup_pressed.png
new file mode 100644
index 0000000..b1843e2
--- /dev/null
+++ b/examples/widgets/stylesheet/images/spinup_pressed.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/up_arrow.png b/examples/widgets/stylesheet/images/up_arrow.png
new file mode 100644
index 0000000..e7f7ddb
--- /dev/null
+++ b/examples/widgets/stylesheet/images/up_arrow.png
Binary files differ
diff --git a/examples/widgets/stylesheet/images/up_arrow_disabled.png b/examples/widgets/stylesheet/images/up_arrow_disabled.png
new file mode 100644
index 0000000..4d2c277
--- /dev/null
+++ b/examples/widgets/stylesheet/images/up_arrow_disabled.png
Binary files differ
diff --git a/examples/widgets/stylesheet/layouts/default.ui b/examples/widgets/stylesheet/layouts/default.ui
new file mode 100644
index 0000000..431a409
--- /dev/null
+++ b/examples/widgets/stylesheet/layouts/default.ui
@@ -0,0 +1,329 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>388</width>
+ <height>413</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="text" >
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>nameCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3" >
+ <widget class="QComboBox" name="nameCombo" >
+ <property name="toolTip" >
+ <string>Specify your name</string>
+ </property>
+ <property name="editable" >
+ <bool>true</bool>
+ </property>
+ <property name="currentIndex" >
+ <number>-1</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Girish</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Jasmin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Simon</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Zack</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QRadioButton" name="femaleRadioButton" >
+ <property name="toolTip" >
+ <string>Check this if you are female</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Female</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="4" >
+ <widget class="QCheckBox" name="agreeCheckBox" >
+ <property name="toolTip" >
+ <string>Please read the license before checking this</string>
+ </property>
+ <property name="text" >
+ <string>I &amp;accept the terms and conditions</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QRadioButton" name="maleRadioButton" >
+ <property name="toolTip" >
+ <string>Check this if you are male</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Male</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="genderLabel" >
+ <property name="text" >
+ <string>Gender:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="3" >
+ <widget class="QSpinBox" name="ageSpinBox" >
+ <property name="toolTip" >
+ <string>Specify your age</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your age here</string>
+ </property>
+ <property name="minimum" >
+ <number>12</number>
+ </property>
+ <property name="value" >
+ <number>22</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="ageLabel" >
+ <property name="text" >
+ <string>&amp;Age:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>ageSpinBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="passwordLabel" >
+ <property name="text" >
+ <string>&amp;Password:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>passwordEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="3" >
+ <widget class="QLineEdit" name="passwordEdit" >
+ <property name="toolTip" >
+ <string>Specify your password</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your password here</string>
+ </property>
+ <property name="text" >
+ <string>Password</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Profession</string>
+ </property>
+ <property name="buddy" >
+ <cstring>professionList</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="countryLabel" >
+ <property name="text" >
+ <string>&amp;Country</string>
+ </property>
+ <property name="buddy" >
+ <cstring>professionList</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="3" >
+ <widget class="QListWidget" name="professionList" >
+ <property name="toolTip" >
+ <string>Select your profession</string>
+ </property>
+ <property name="statusTip" >
+ <string>Select your profession</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Select your profession</string>
+ </property>
+ <property name="currentRow" >
+ <number>1</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Developer</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Student</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Fisherman</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="3" >
+ <widget class="QComboBox" name="countryCombo" >
+ <property name="toolTip" >
+ <string>Specify your country</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your country here</string>
+ </property>
+ <property name="currentIndex" >
+ <number>2</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Germany</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>India</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Norway</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>United States Of America</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>United Kingdom</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>388</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="editStyleAction" />
+ <addaction name="separator" />
+ <addaction name="exitAction" />
+ </widget>
+ <widget class="QMenu" name="menu_Help" >
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="aboutAction" />
+ <addaction name="separator" />
+ <addaction name="aboutQtAction" />
+ </widget>
+ <addaction name="menu_File" />
+ <addaction name="menu_Help" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="exitAction" >
+ <property name="text" >
+ <string>&amp;Exit</string>
+ </property>
+ </action>
+ <action name="aboutQtAction" >
+ <property name="text" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <action name="editStyleAction" >
+ <property name="text" >
+ <string>Edit &amp;Style</string>
+ </property>
+ </action>
+ <action name="aboutAction" >
+ <property name="text" >
+ <string>About</string>
+ </property>
+ </action>
+ </widget>
+ <tabstops>
+ <tabstop>maleRadioButton</tabstop>
+ <tabstop>femaleRadioButton</tabstop>
+ <tabstop>ageSpinBox</tabstop>
+ <tabstop>passwordEdit</tabstop>
+ <tabstop>professionList</tabstop>
+ <tabstop>agreeCheckBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/widgets/stylesheet/layouts/pagefold.ui b/examples/widgets/stylesheet/layouts/pagefold.ui
new file mode 100644
index 0000000..7ae313c
--- /dev/null
+++ b/examples/widgets/stylesheet/layouts/pagefold.ui
@@ -0,0 +1,349 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>392</width>
+ <height>412</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="mainFrame" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="1" colspan="3" >
+ <widget class="QComboBox" name="nameCombo" >
+ <property name="toolTip" >
+ <string>Specify your name</string>
+ </property>
+ <property name="editable" >
+ <bool>true</bool>
+ </property>
+ <property name="currentIndex" >
+ <number>-1</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Girish</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Jasmin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Simon</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Zack</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QRadioButton" name="femaleRadioButton" >
+ <property name="styleSheet" >
+ <string>Check this if you are female</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Female</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="genderLabel" >
+ <property name="text" >
+ <string>Gender:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="ageLabel" >
+ <property name="text" >
+ <string>&amp;Age:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>ageSpinBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QRadioButton" name="maleRadioButton" >
+ <property name="toolTip" >
+ <string>Check this if you are male</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Male</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="text" >
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>nameCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="passwordLabel" >
+ <property name="text" >
+ <string>&amp;Password:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>passwordEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="3" >
+ <widget class="QSpinBox" name="ageSpinBox" >
+ <property name="toolTip" >
+ <string>Specify your age</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your age</string>
+ </property>
+ <property name="minimum" >
+ <number>12</number>
+ </property>
+ <property name="value" >
+ <number>22</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" colspan="4" >
+ <widget class="QCheckBox" name="agreeCheckBox" >
+ <property name="toolTip" >
+ <string>Please read the LICENSE file before checking</string>
+ </property>
+ <property name="text" >
+ <string>I &amp;accept the terms and &amp;conditions</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="3" >
+ <widget class="QLineEdit" name="passwordEdit" >
+ <property name="toolTip" >
+ <string>Specify your password</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your password</string>
+ </property>
+ <property name="text" >
+ <string>Password</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="3" >
+ <widget class="QListWidget" name="professionList" >
+ <property name="toolTip" >
+ <string>Select your profession</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your name here</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Specify your name here</string>
+ </property>
+ <property name="currentRow" >
+ <number>0</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Developer</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Student</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Fisherman</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Profession:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>professionList</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="3" >
+ <widget class="QComboBox" name="countryCombo" >
+ <property name="toolTip" >
+ <string>Specify country of origin</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify country of origin</string>
+ </property>
+ <property name="currentIndex" >
+ <number>6</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Egypt</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>France</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Germany</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>India</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Italy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Korea</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Norway</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="countryLabel" >
+ <property name="text" >
+ <string>Pro&amp;fession</string>
+ </property>
+ <property name="buddy" >
+ <cstring>professionList</cstring>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>392</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="editStyleAction" />
+ <addaction name="separator" />
+ <addaction name="exitAction" />
+ </widget>
+ <widget class="QMenu" name="menu_Help" >
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="aboutAction" />
+ <addaction name="separator" />
+ <addaction name="aboutQtAction" />
+ </widget>
+ <addaction name="menu_File" />
+ <addaction name="menu_Help" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="exitAction" >
+ <property name="text" >
+ <string>&amp;Exit</string>
+ </property>
+ </action>
+ <action name="aboutQtAction" >
+ <property name="text" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <action name="editStyleAction" >
+ <property name="text" >
+ <string>Edit &amp;Style</string>
+ </property>
+ </action>
+ <action name="aboutAction" >
+ <property name="text" >
+ <string>About</string>
+ </property>
+ </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/widgets/stylesheet/main.cpp b/examples/widgets/stylesheet/main.cpp
new file mode 100644
index 0000000..931a89b
--- /dev/null
+++ b/examples/widgets/stylesheet/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(stylesheet);
+
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/widgets/stylesheet/mainwindow.cpp b/examples/widgets/stylesheet/mainwindow.cpp
new file mode 100644
index 0000000..a1307a8
--- /dev/null
+++ b/examples/widgets/stylesheet/mainwindow.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "stylesheeteditor.h"
+
+MainWindow::MainWindow()
+{
+ ui.setupUi(this);
+
+ ui.nameLabel->setProperty("class", "mandatory QLabel");
+
+ styleSheetEditor = new StyleSheetEditor(this);
+
+ statusBar()->addWidget(new QLabel(tr("Ready")));
+
+ connect(ui.exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(ui.aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::on_editStyleAction_triggered()
+{
+ styleSheetEditor->show();
+ styleSheetEditor->activateWindow();
+}
+
+void MainWindow::on_aboutAction_triggered()
+{
+ QMessageBox::about(this, tr("About Style sheet"),
+ tr("The <b>Style Sheet</b> example shows how widgets can be styled "
+ "using <a href=\"http://doc.trolltech.com/4.5/stylesheet.html\">Qt "
+ "Style Sheets</a>. Click <b>File|Edit Style Sheet</b> to pop up the "
+ "style editor, and either choose an existing style sheet or design "
+ "your own."));
+}
diff --git a/examples/widgets/stylesheet/mainwindow.h b/examples/widgets/stylesheet/mainwindow.h
new file mode 100644
index 0000000..eedca88
--- /dev/null
+++ b/examples/widgets/stylesheet/mainwindow.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui>
+
+#include "ui_mainwindow.h"
+
+class StyleSheetEditor;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void on_editStyleAction_triggered();
+ void on_aboutAction_triggered();
+
+private:
+ StyleSheetEditor *styleSheetEditor;
+ Ui::MainWindow ui;
+};
+
+#endif
diff --git a/examples/widgets/stylesheet/mainwindow.ui b/examples/widgets/stylesheet/mainwindow.ui
new file mode 100644
index 0000000..740d37b
--- /dev/null
+++ b/examples/widgets/stylesheet/mainwindow.ui
@@ -0,0 +1,356 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>413</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Style Sheet</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="mainFrame" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="6" column="0" colspan="5" >
+ <widget class="QCheckBox" name="agreeCheckBox" >
+ <property name="toolTip" >
+ <string>Please read the LICENSE file before checking</string>
+ </property>
+ <property name="text" >
+ <string>I &amp;accept the terms and &amp;conditions</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Profession:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
+ </property>
+ <property name="buddy" >
+ <cstring>professionList</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="nameLabel" >
+ <property name="text" >
+ <string>&amp;Name:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy" >
+ <cstring>nameCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QRadioButton" name="maleRadioButton" >
+ <property name="toolTip" >
+ <string>Check this if you are male</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Male</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="passwordLabel" >
+ <property name="text" >
+ <string>&amp;Password:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy" >
+ <cstring>passwordEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" colspan="4" >
+ <widget class="QComboBox" name="countryCombo" >
+ <property name="toolTip" >
+ <string>Specify country of origin</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify country of origin</string>
+ </property>
+ <property name="currentIndex" >
+ <number>6</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Egypt</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>France</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Germany</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>India</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Italy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Norway</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Pakistan</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="ageLabel" >
+ <property name="text" >
+ <string>&amp;Age:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy" >
+ <cstring>ageSpinBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="countryLabel" >
+ <property name="text" >
+ <string>Country:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy" >
+ <cstring>countryCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="genderLabel" >
+ <property name="text" >
+ <string>Gender:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" colspan="4" >
+ <widget class="QLineEdit" name="passwordEdit" >
+ <property name="toolTip" >
+ <string>Specify your password</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your password</string>
+ </property>
+ <property name="text" >
+ <string>Password</string>
+ </property>
+ <property name="echoMode" >
+ <enum>QLineEdit::Password</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="2" >
+ <widget class="QRadioButton" name="femaleRadioButton" >
+ <property name="styleSheet" >
+ <string>Check this if you are female</string>
+ </property>
+ <property name="text" >
+ <string>&amp;Female</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="2" >
+ <widget class="QSpinBox" name="ageSpinBox" >
+ <property name="toolTip" >
+ <string>Specify your age</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your age</string>
+ </property>
+ <property name="minimum" >
+ <number>12</number>
+ </property>
+ <property name="value" >
+ <number>22</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="4" >
+ <widget class="QComboBox" name="nameCombo" >
+ <property name="toolTip" >
+ <string>Specify your name</string>
+ </property>
+ <property name="editable" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="3" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="7" column="3" colspan="2" >
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" colspan="4" >
+ <widget class="QListWidget" name="professionList" >
+ <property name="toolTip" >
+ <string>Select your profession</string>
+ </property>
+ <property name="statusTip" >
+ <string>Specify your name here</string>
+ </property>
+ <property name="whatsThis" >
+ <string>Specify your name here</string>
+ </property>
+ <property name="currentRow" >
+ <number>0</number>
+ </property>
+ <item>
+ <property name="text" >
+ <string>Developer</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Student</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Fisherman</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menu_File" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="editStyleAction" />
+ <addaction name="separator" />
+ <addaction name="exitAction" />
+ </widget>
+ <widget class="QMenu" name="menu_Help" >
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="aboutAction" />
+ <addaction name="aboutQtAction" />
+ </widget>
+ <addaction name="menu_File" />
+ <addaction name="menu_Help" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="exitAction" >
+ <property name="text" >
+ <string>&amp;Exit</string>
+ </property>
+ </action>
+ <action name="aboutQtAction" >
+ <property name="text" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <action name="editStyleAction" >
+ <property name="text" >
+ <string>Edit &amp;Style...</string>
+ </property>
+ </action>
+ <action name="aboutAction" >
+ <property name="text" >
+ <string>About</string>
+ </property>
+ </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/widgets/stylesheet/qss/coffee.qss b/examples/widgets/stylesheet/qss/coffee.qss
new file mode 100644
index 0000000..4571d42
--- /dev/null
+++ b/examples/widgets/stylesheet/qss/coffee.qss
@@ -0,0 +1,112 @@
+.QWidget {
+ background-color: beige;
+}
+
+/* Nice Windows-XP-style password character. */
+QLineEdit[echoMode="2"] {
+ lineedit-password-character: 9679;
+}
+
+/* We provide a min-width and min-height for push buttons
+ so that they look elegant regardless of the width of the text. */
+QPushButton {
+ background-color: palegoldenrod;
+ border-width: 2px;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 5;
+ padding: 3px;
+ min-width: 9ex;
+ min-height: 2.5ex;
+}
+
+QPushButton:hover {
+ background-color: khaki;
+}
+
+/* Increase the padding, so the text is shifted when the button is
+ pressed. */
+QPushButton:pressed {
+ padding-left: 5px;
+ padding-top: 5px;
+ background-color: #d0d67c;
+}
+
+QLabel, QAbstractButton {
+ font: bold;
+}
+
+/* Mark mandatory fields with a brownish color. */
+.mandatory {
+ color: brown;
+}
+
+/* Bold text on status bar looks awful. */
+QStatusBar QLabel {
+ font: normal;
+}
+
+QStatusBar::item {
+ border-width: 1;
+ border-color: darkkhaki;
+ border-style: solid;
+ border-radius: 2;
+}
+
+QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView {
+ background-color: cornsilk;
+ selection-color: #0a214c;
+ selection-background-color: #C19A6B;
+}
+
+QListView {
+ show-decoration-selected: 1;
+}
+
+QListView::item:hover {
+ background-color: wheat;
+}
+
+/* We reserve 1 pixel space in padding. When we get the focus,
+ we kill the padding and enlarge the border. This makes the items
+ glow. */
+QLineEdit, QFrame {
+ border-width: 2px;
+ padding: 1px;
+ border-style: solid;
+ border-color: darkkhaki;
+ border-radius: 5px;
+}
+
+/* As mentioned above, eliminate the padding and increase the border. */
+QLineEdit:focus, QFrame:focus {
+ border-width: 3px;
+ padding: 0px;
+}
+
+/* A QLabel is a QFrame ... */
+QLabel {
+ border: none;
+ padding: 0;
+ background: none;
+}
+
+/* A QToolTip is a QLabel ... */
+QToolTip {
+ border: 2px solid darkkhaki;
+ padding: 5px;
+ border-radius: 3px;
+ opacity: 200;
+}
+
+/* Nice to have the background color change when hovered. */
+QRadioButton:hover, QCheckBox:hover {
+ background-color: wheat;
+}
+
+/* Force the dialog's buttons to follow the Windows guidelines. */
+QDialogButtonBox {
+ button-layout: 0;
+}
+
+
diff --git a/examples/widgets/stylesheet/qss/default.qss b/examples/widgets/stylesheet/qss/default.qss
new file mode 100644
index 0000000..84eb5e0
--- /dev/null
+++ b/examples/widgets/stylesheet/qss/default.qss
@@ -0,0 +1 @@
+/* empty stylesheet */
diff --git a/examples/widgets/stylesheet/qss/pagefold.qss b/examples/widgets/stylesheet/qss/pagefold.qss
new file mode 100644
index 0000000..3701fc7
--- /dev/null
+++ b/examples/widgets/stylesheet/qss/pagefold.qss
@@ -0,0 +1,299 @@
+/* Customize any plain widget that is a child of a QMainWindow. */
+QMainWindow > .QWidget {
+ background-color: gainsboro;
+ background-image: url(:/images/pagefold.png);
+ background-position: top right;
+ background-repeat: no-repeat
+}
+
+/* Provide a padding for the layout inside the frame. The frame
+ exists only to provide a padding for the top-right image, so we
+ explicitly disable the border. */
+#mainFrame {
+ padding-right: 30px;
+ border-style: none;
+ border-image: none; /* since we set a border-image below */
+}
+
+/* mainFrame won't have this border-image since we have
+ explicitly set it to 'none' using a more specific selector. */
+QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox {
+ border-image: url(:/images/frame.png) 4;
+ border-width: 3;
+}
+
+QLabel {
+ border: none;
+ border-image: none;
+ padding: 0;
+ background: none;
+}
+
+/* Make text in message boxes selectable. */
+QMessageBox {
+ /* LinksAccessibleByMouse | TextSelectableByMouse */
+ messagebox-text-interaction-flags: 5;
+}
+
+/* Set the selection colors for all widgets. */
+QWidget {
+ selection-color: black;
+ selection-background-color: Silver;
+ color: black;
+}
+
+/* Make the entire row selected in item views. */
+QAbstractItemView {
+ show-decoration-selected: 1;
+}
+
+/* Nice WindowsXP-style password character for password line edits. */
+QLineEdit[echoMode="2"] {
+ lineedit-password-character: 9679;
+}
+
+/* Customize tooltips. */
+QToolTip {
+ background-color: rgb(200,200,255);
+ border-color: darkslategray;
+ border-width: 1px;
+ border-style: solid;
+ padding: 3px;
+ font: bold;
+ border-radius: 3px;
+ opacity: 200;
+}
+
+/* Customize radio buttons. */
+
+QRadioButton {
+ spacing: 5px;
+}
+
+QRadioButton::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+QRadioButton::indicator::unchecked {
+ image: url(:/images/radiobutton_unchecked.png);
+}
+
+QRadioButton::indicator:unchecked:hover {
+ image: url(:/images/radiobutton_unchecked_hover.png);
+}
+
+QRadioButton::indicator:unchecked:pressed {
+ image: url(:/images/radiobutton_unchecked_pressed.png);
+}
+
+QRadioButton::indicator::checked {
+ image: url(:/images/radiobutton_checked.png);
+}
+
+QRadioButton::indicator:checked:hover {
+ image: url(:/images/radiobutton_checked_hover.png);
+}
+
+QRadioButton::indicator:checked:pressed {
+ image: url(:/images/radiobutton_checked_pressed.png);
+}
+
+/* Customize arrows. */
+
+*::down-arrow, *::menu-indicator {
+ image: url(:/images/down_arrow.png);
+ width: 7px;
+ height: 7px;
+}
+
+*::down-arrow:disabled, *::down-arrow:off {
+ image: url(:/images/down_arrow_disabled.png);
+}
+
+*::up-arrow {
+ image: url(:/images/up_arrow.png);
+ width: 7px;
+ height: 7px;
+}
+
+*::up-arrow:disabled, *::up-arrow:off {
+ image: url(:/images/up_arrow_disabled.png);
+}
+
+/* Customize push buttons and comboboxes. Our read-only combobox
+ is very similar to a push button, so they share the same border image. */
+
+QPushButton {
+ min-width: 4em;
+}
+
+QPushButton, QComboBox[editable="false"],
+QComboBox[editable="true"]::drop-down {
+ border-image: url(:/images/pushbutton.png) 5;
+ border-width: 5;
+}
+
+QPushButton:hover, QComboBox[editable="false"]:hover,
+QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover {
+ border-image: url(:/images/pushbutton_hover.png) 5;
+ border-width: 5;
+}
+
+QPushButton:pressed, QComboBox[editable="false"]:on,
+QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on {
+ border-image: url(:/images/pushbutton_pressed.png) 5;
+ border-width: 5;
+}
+
+/* Customize read-only comboboxes. */
+
+QComboBox[editable="false"] {
+ padding-left: 3px;
+ padding-right: 20px; /* space for the arrow */
+}
+
+QComboBox[editable="false"]::drop-down {
+ subcontrol-origin: padding;
+ subcontrol-position: top right;
+ width: 15px;
+ border-left-style: solid;
+ border-left-color: darkgray;
+ border-left-width: 1px;
+}
+
+QComboBox[editable="false"]::down-arrow {
+ subcontrol-origin: content;
+ subcontrol-position: center;
+ position: relative;
+ left: 1px; /* 1 pixel dropdown border */
+}
+
+/* The combobox arrow is on when the popup is open. */
+QComboBox[editable="false"]::down-arrow:on {
+ position: relative;
+ top: 1px;
+ left: 2px;
+}
+
+/* Customize editable comboboxes. */
+
+QComboBox[editable="true"] {
+ padding-right: 16px;
+}
+
+QComboBox[editable="true"]::drop-down {
+ subcontrol-origin: border;
+ subcontrol-position: top right;
+ width: 13px;
+ position: absolute;
+ top: 2px;
+ bottom: 2px;
+ right: 2px;
+}
+
+QComboBox[editable="true"]::drop-down,
+QComboBox[editable="true"]::drop-down:hover,
+QComboBox[editable="true"]::drop-down:on {
+ border-width: 0px;
+ border-left-width: 3px; /* we need only left and center part */
+}
+
+/* Shift the arrow when it's open. */
+QComboBox[editable="true"]::down-arrow:on {
+ position: relative;
+ top: 1px;
+ left: 1px;
+}
+
+/* Customize check boxes. */
+QCheckBox {
+ spacing: 5px;
+}
+
+QCheckBox::indicator {
+ width: 13px;
+ height: 13px;
+}
+
+QCheckBox::indicator:unchecked {
+ image: url(:/images/checkbox_unchecked.png);
+}
+
+QCheckBox::indicator:unchecked:hover {
+ image: url(:/images/checkbox_unchecked_hover.png);
+}
+
+QCheckBox::indicator:unchecked:pressed {
+ image: url(:/images/checkbox_unchecked_pressed.png);
+}
+
+QCheckBox::indicator:checked {
+ image: url(:/images/checkbox_checked.png);
+}
+
+QCheckBox::indicator:checked:hover {
+ image: url(:/images/checkbox_checked_hover.png);
+}
+
+QCheckBox::indicator:checked:pressed {
+ image: url(:/images/checkbox_checked_pressed.png);
+}
+
+/* Customize the size grip. */
+QSizeGrip {
+ image: url(:/images/sizegrip.png);
+ width: 16px;
+ height: 16px;
+}
+
+/* Customize the menu bar. */
+QMenuBar {
+ border-image: none;
+ border-style: none;
+ border-width: 1px;
+ border-bottom-style: solid;
+ border-bottom-color: darkslategray;
+ padding: 2px;
+}
+
+/* Customize spin boxes. */
+
+QSpinBox {
+ padding-right: 15px;
+}
+
+QSpinBox::up-button {
+ subcontrol-origin: border;
+ subcontrol-position: top right;
+
+ width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
+ border-image: url(:/images/spinup.png) 1;
+ border-width: 1px;
+}
+
+QSpinBox::up-button:hover {
+ border-image: url(:/images/spinup_hover.png) 1;
+}
+
+QSpinBox::up-button:pressed {
+ border-image: url(:/images/spinup_pressed.png) 1;
+}
+
+QSpinBox::down-button {
+ subcontrol-origin: border;
+ subcontrol-position: bottom right;
+
+ width: 16px;
+ border-image: url(:/images/spindown.png) 1;
+ border-width: 1px;
+ border-top-width: 0;
+}
+
+QSpinBox::down-button:hover {
+ border-image: url(:/images/spindown_hover.png) 1;
+}
+
+QSpinBox::down-button:pressed {
+ border-image: url(:/images/spindown_pressed.png) 1;
+}
diff --git a/examples/widgets/stylesheet/stylesheet.pro b/examples/widgets/stylesheet/stylesheet.pro
new file mode 100644
index 0000000..9a64c00
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheet.pro
@@ -0,0 +1,14 @@
+HEADERS = mainwindow.h \
+ stylesheeteditor.h
+FORMS = mainwindow.ui \
+ stylesheeteditor.ui
+RESOURCES = stylesheet.qrc
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ stylesheeteditor.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/stylesheet
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images layouts qss
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/stylesheet
+INSTALLS += target sources
diff --git a/examples/widgets/stylesheet/stylesheet.qrc b/examples/widgets/stylesheet/stylesheet.qrc
new file mode 100644
index 0000000..e1e61a9
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheet.qrc
@@ -0,0 +1,39 @@
+<RCC>
+<qresource prefix="/">
+ <file>layouts/default.ui</file>
+ <file>layouts/pagefold.ui</file>
+ <file>qss/coffee.qss</file>
+ <file>qss/default.qss</file>
+ <file>qss/pagefold.qss</file>
+ <file>images/pagefold.png</file>
+ <file>images/frame.png</file>
+ <file>images/radiobutton_unchecked.png</file>
+ <file>images/radiobutton_unchecked_pressed.png</file>
+ <file>images/radiobutton_unchecked_hover.png</file>
+ <file>images/radiobutton_checked.png</file>
+ <file>images/radiobutton_checked_pressed.png</file>
+ <file>images/radiobutton_checked_hover.png</file>
+ <file>images/pushbutton.png</file>
+ <file>images/pushbutton_hover.png</file>
+ <file>images/pushbutton_pressed.png</file>
+ <file>images/checkbox_unchecked.png</file>
+ <file>images/checkbox_unchecked_pressed.png</file>
+ <file>images/checkbox_unchecked_hover.png</file>
+ <file>images/checkbox_checked.png</file>
+ <file>images/checkbox_checked_pressed.png</file>
+ <file>images/checkbox_checked_hover.png</file>
+ <file>images/down_arrow.png</file>
+ <file>images/down_arrow_disabled.png</file>
+ <file>images/up_arrow.png</file>
+ <file>images/up_arrow_disabled.png</file>
+ <file>images/sizegrip.png</file>
+ <file>images/spinup.png</file>
+ <file>images/spinup_off.png</file>
+ <file>images/spinup_hover.png</file>
+ <file>images/spinup_pressed.png</file>
+ <file>images/spindown.png</file>
+ <file>images/spindown_off.png</file>
+ <file>images/spindown_hover.png</file>
+ <file>images/spindown_pressed.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/stylesheet/stylesheeteditor.cpp b/examples/widgets/stylesheet/stylesheeteditor.cpp
new file mode 100644
index 0000000..1210415
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheeteditor.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "stylesheeteditor.h"
+
+StyleSheetEditor::StyleSheetEditor(QWidget *parent)
+ : QDialog(parent)
+{
+ ui.setupUi(this);
+
+ QRegExp regExp(".(.*)\\+?Style");
+ QString defaultStyle = QApplication::style()->metaObject()->className();
+
+ if (regExp.exactMatch(defaultStyle))
+ defaultStyle = regExp.cap(1);
+
+ ui.styleCombo->addItems(QStyleFactory::keys());
+ ui.styleCombo->setCurrentIndex(ui.styleCombo->findText(defaultStyle, Qt::MatchContains));
+ ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText("Coffee"));
+ loadStyleSheet("Coffee");
+}
+
+void StyleSheetEditor::on_styleCombo_activated(const QString &styleName)
+{
+ qApp->setStyle(styleName);
+ ui.applyButton->setEnabled(false);
+}
+
+void StyleSheetEditor::on_styleSheetCombo_activated(const QString &sheetName)
+{
+ loadStyleSheet(sheetName);
+}
+
+void StyleSheetEditor::on_styleTextEdit_textChanged()
+{
+ ui.applyButton->setEnabled(true);
+}
+
+void StyleSheetEditor::on_applyButton_clicked()
+{
+ qApp->setStyleSheet(ui.styleTextEdit->toPlainText());
+ ui.applyButton->setEnabled(false);
+}
+
+void StyleSheetEditor::loadStyleSheet(const QString &sheetName)
+{
+ QFile file(":/qss/" + sheetName.toLower() + ".qss");
+ file.open(QFile::ReadOnly);
+ QString styleSheet = QLatin1String(file.readAll());
+
+ ui.styleTextEdit->setPlainText(styleSheet);
+ qApp->setStyleSheet(styleSheet);
+ ui.applyButton->setEnabled(false);
+}
diff --git a/examples/widgets/stylesheet/stylesheeteditor.h b/examples/widgets/stylesheet/stylesheeteditor.h
new file mode 100644
index 0000000..bd90f9e
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheeteditor.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STYLESHEETEDITOR_H
+#define STYLESHEETEDITOR_H
+
+#include <QDialog>
+
+#include "ui_stylesheeteditor.h"
+
+class StyleSheetEditor : public QDialog
+{
+ Q_OBJECT
+
+public:
+ StyleSheetEditor(QWidget *parent = 0);
+
+private slots:
+ void on_styleCombo_activated(const QString &styleName);
+ void on_styleSheetCombo_activated(const QString &styleSheetName);
+ void on_styleTextEdit_textChanged();
+ void on_applyButton_clicked();
+
+private:
+ void loadStyleSheet(const QString &sheetName);
+
+ Ui::StyleSheetEditor ui;
+};
+
+#endif
diff --git a/examples/widgets/stylesheet/stylesheeteditor.ui b/examples/widgets/stylesheet/stylesheeteditor.ui
new file mode 100644
index 0000000..34cd7f6
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheeteditor.ui
@@ -0,0 +1,171 @@
+<ui version="4.0" >
+ <class>StyleSheetEditor</class>
+ <widget class="QWidget" name="StyleSheetEditor" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>445</width>
+ <height>289</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Style Editor</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="6" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>32</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>32</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="5" >
+ <widget class="QComboBox" name="styleSheetCombo" >
+ <item>
+ <property name="text" >
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Coffee</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Pagefold</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="3" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>10</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QComboBox" name="styleCombo" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="label_7" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Style:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="7" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>321</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="applyButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>&amp;Apply</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" colspan="7" >
+ <widget class="QTextEdit" name="styleTextEdit" />
+ </item>
+ <item row="0" column="4" >
+ <widget class="QLabel" name="label_8" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Style Sheet:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/widgets/tablet/main.cpp b/examples/widgets/tablet/main.cpp
new file mode 100644
index 0000000..15043a6
--- /dev/null
+++ b/examples/widgets/tablet/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "tabletapplication.h"
+#include "tabletcanvas.h"
+
+//! [0]
+int main(int argv, char *args[])
+{
+ TabletApplication app(argv, args);
+ TabletCanvas *canvas = new TabletCanvas;
+ app.setCanvas(canvas);
+
+ MainWindow mainWindow(canvas);
+ mainWindow.resize(500, 500);
+ mainWindow.show();
+
+ return app.exec();
+}
+//! [0]
diff --git a/examples/widgets/tablet/mainwindow.cpp b/examples/widgets/tablet/mainwindow.cpp
new file mode 100644
index 0000000..56a10cd
--- /dev/null
+++ b/examples/widgets/tablet/mainwindow.cpp
@@ -0,0 +1,275 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "tabletcanvas.h"
+
+//! [0]
+MainWindow::MainWindow(TabletCanvas *canvas)
+{
+ myCanvas = canvas;
+ createActions();
+ createMenus();
+
+ myCanvas->setColor(Qt::red);
+ myCanvas->setLineWidthType(TabletCanvas::LineWidthPressure);
+ myCanvas->setAlphaChannelType(TabletCanvas::NoAlpha);
+ myCanvas->setColorSaturationType(TabletCanvas::NoSaturation);
+
+ setWindowTitle(tr("Tablet Example"));
+ setCentralWidget(myCanvas);
+}
+//! [0]
+
+//! [1]
+void MainWindow::brushColorAct()
+{
+ QColor color = QColorDialog::getColor(myCanvas->color());
+
+ if (color.isValid())
+ myCanvas->setColor(color);
+}
+//! [1]
+
+//! [2]
+void MainWindow::alphaActionTriggered(QAction *action)
+{
+ if (action == alphaChannelPressureAction) {
+ myCanvas->setAlphaChannelType(TabletCanvas::AlphaPressure);
+ } else if (action == alphaChannelTiltAction) {
+ myCanvas->setAlphaChannelType(TabletCanvas::AlphaTilt);
+ } else {
+ myCanvas->setAlphaChannelType(TabletCanvas::NoAlpha);
+ }
+}
+//! [2]
+
+//! [3]
+void MainWindow::lineWidthActionTriggered(QAction *action)
+{
+ if (action == lineWidthPressureAction) {
+ myCanvas->setLineWidthType(TabletCanvas::LineWidthPressure);
+ } else if (action == lineWidthTiltAction) {
+ myCanvas->setLineWidthType(TabletCanvas::LineWidthTilt);
+ } else {
+ myCanvas->setLineWidthType(TabletCanvas::NoLineWidth);
+ }
+}
+//! [3]
+
+//! [4]
+void MainWindow::saturationActionTriggered(QAction *action)
+{
+ if (action == colorSaturationVTiltAction) {
+ myCanvas->setColorSaturationType(TabletCanvas::SaturationVTilt);
+ } else if (action == colorSaturationHTiltAction) {
+ myCanvas->setColorSaturationType(TabletCanvas::SaturationHTilt);
+ } else if (action == colorSaturationPressureAction) {
+ myCanvas->setColorSaturationType(TabletCanvas::SaturationPressure);
+ } else {
+ myCanvas->setColorSaturationType(TabletCanvas::NoSaturation);
+ }
+}
+//! [4]
+
+//! [5]
+void MainWindow::saveAct()
+{
+ QString path = QDir::currentPath() + "/untitled.png";
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save Picture"),
+ path);
+
+ if (!myCanvas->saveImage(fileName))
+ QMessageBox::information(this, "Error Saving Picture",
+ "Could not save the image");
+}
+//! [5]
+
+//! [6]
+void MainWindow::loadAct()
+{
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open Picture"),
+ QDir::currentPath());
+
+ if (!myCanvas->loadImage(fileName))
+ QMessageBox::information(this, "Error Opening Picture",
+ "Could not open picture");
+}
+//! [6]
+
+//! [7]
+void MainWindow::aboutAct()
+{
+ QMessageBox::about(this, tr("About Tablet Example"),
+ tr("This example shows use of a Wacom tablet in Qt"));
+}
+//! [7]
+
+//! [8]
+void MainWindow::createActions()
+{
+//! [8]
+ brushColorAction = new QAction(tr("&Brush Color..."), this);
+ brushColorAction->setShortcut(tr("Ctrl+C"));
+ connect(brushColorAction, SIGNAL(triggered()),
+ this, SLOT(brushColorAct()));
+
+//! [9]
+ alphaChannelPressureAction = new QAction(tr("&Pressure"), this);
+ alphaChannelPressureAction->setCheckable(true);
+
+ alphaChannelTiltAction = new QAction(tr("&Tilt"), this);
+ alphaChannelTiltAction->setCheckable(true);
+
+ noAlphaChannelAction = new QAction(tr("No Alpha Channel"), this);
+ noAlphaChannelAction->setCheckable(true);
+ noAlphaChannelAction->setChecked(true);
+
+ alphaChannelGroup = new QActionGroup(this);
+ alphaChannelGroup->addAction(alphaChannelPressureAction);
+ alphaChannelGroup->addAction(alphaChannelTiltAction);
+ alphaChannelGroup->addAction(noAlphaChannelAction);
+ connect(alphaChannelGroup, SIGNAL(triggered(QAction *)),
+ this, SLOT(alphaActionTriggered(QAction *)));
+
+//! [9]
+ colorSaturationVTiltAction = new QAction(tr("&Vertical Tilt"), this);
+ colorSaturationVTiltAction->setCheckable(true);
+
+ colorSaturationHTiltAction = new QAction(tr("&Horizontal Tilt"), this);
+ colorSaturationHTiltAction->setCheckable(true);
+
+ colorSaturationPressureAction = new QAction(tr("&Pressure"), this);
+ colorSaturationPressureAction->setCheckable(true);
+
+ noColorSaturationAction = new QAction(tr("&No Color Saturation"), this);
+ noColorSaturationAction->setCheckable(true);
+ noColorSaturationAction->setChecked(true);
+
+ colorSaturationGroup = new QActionGroup(this);
+ colorSaturationGroup->addAction(colorSaturationVTiltAction);
+ colorSaturationGroup->addAction(colorSaturationHTiltAction);
+ colorSaturationGroup->addAction(colorSaturationPressureAction);
+ colorSaturationGroup->addAction(noColorSaturationAction);
+ connect(colorSaturationGroup, SIGNAL(triggered(QAction *)),
+ this, SLOT(saturationActionTriggered(QAction *)));
+
+ lineWidthPressureAction = new QAction(tr("&Pressure"), this);
+ lineWidthPressureAction->setCheckable(true);
+ lineWidthPressureAction->setChecked(true);
+
+ lineWidthTiltAction = new QAction(tr("&Tilt"), this);
+ lineWidthTiltAction->setCheckable(true);
+
+ lineWidthFixedAction = new QAction(tr("&Fixed"), this);
+ lineWidthFixedAction->setCheckable(true);
+
+ lineWidthGroup = new QActionGroup(this);
+ lineWidthGroup->addAction(lineWidthPressureAction);
+ lineWidthGroup->addAction(lineWidthTiltAction);
+ lineWidthGroup->addAction(lineWidthFixedAction);
+ connect(lineWidthGroup, SIGNAL(triggered(QAction *)),
+ this, SLOT(lineWidthActionTriggered(QAction *)));
+
+ exitAction = new QAction(tr("E&xit"), this);
+ exitAction->setShortcut(tr("Ctrl+X"));
+ connect(exitAction, SIGNAL(triggered()),
+ this, SLOT(close()));
+
+ loadAction = new QAction(tr("&Open..."), this);
+ loadAction->setShortcut(tr("Ctrl+O"));
+ connect(loadAction, SIGNAL(triggered()),
+ this, SLOT(loadAct()));
+
+ saveAction = new QAction(tr("&Save As..."), this);
+ saveAction->setShortcut(tr("Ctrl+S"));
+ connect(saveAction, SIGNAL(triggered()),
+ this, SLOT(saveAct()));
+
+ aboutAction = new QAction(tr("A&bout"), this);
+ aboutAction->setShortcut(tr("Ctrl+B"));
+ connect(aboutAction, SIGNAL(triggered()),
+ this, SLOT(aboutAct()));
+
+ aboutQtAction = new QAction(tr("About &Qt"), this);
+ aboutQtAction->setShortcut(tr("Ctrl+Q"));
+ connect(aboutQtAction, SIGNAL(triggered()),
+ qApp, SLOT(aboutQt()));
+//! [10]
+}
+//! [10]
+
+//! [11]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(loadAction);
+ fileMenu->addAction(saveAction);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAction);
+
+ brushMenu = menuBar()->addMenu(tr("&Brush"));
+ brushMenu->addAction(brushColorAction);
+
+ tabletMenu = menuBar()->addMenu(tr("&Tablet"));
+
+ lineWidthMenu = tabletMenu->addMenu(tr("&Line Width"));
+ lineWidthMenu->addAction(lineWidthPressureAction);
+ lineWidthMenu->addAction(lineWidthTiltAction);
+ lineWidthMenu->addAction(lineWidthFixedAction);
+
+ alphaChannelMenu = tabletMenu->addMenu(tr("&Alpha Channel"));
+ alphaChannelMenu->addAction(alphaChannelPressureAction);
+ alphaChannelMenu->addAction(alphaChannelTiltAction);
+ alphaChannelMenu->addAction(noAlphaChannelAction);
+
+ colorSaturationMenu = tabletMenu->addMenu(tr("&Color Saturation"));
+ colorSaturationMenu->addAction(colorSaturationVTiltAction);
+ colorSaturationMenu->addAction(colorSaturationHTiltAction);
+ colorSaturationMenu->addAction(noColorSaturationAction);
+
+ helpMenu = menuBar()->addMenu("&Help");
+ helpMenu->addAction(aboutAction);
+ helpMenu->addAction(aboutQtAction);
+}
+//! [11]
diff --git a/examples/widgets/tablet/mainwindow.h b/examples/widgets/tablet/mainwindow.h
new file mode 100644
index 0000000..85be425
--- /dev/null
+++ b/examples/widgets/tablet/mainwindow.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QActionGroup;
+class QMenu;
+class QStatusBar;
+QT_END_NAMESPACE
+class TabletCanvas;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(TabletCanvas *canvas);
+
+private slots:
+ void brushColorAct();
+ void alphaActionTriggered(QAction *action);
+ void lineWidthActionTriggered(QAction *action);
+ void saturationActionTriggered(QAction *action);
+ void saveAct();
+ void loadAct();
+ void aboutAct();
+
+private:
+ void createActions();
+ void createMenus();
+
+ TabletCanvas *myCanvas;
+
+ QAction *brushColorAction;
+ QActionGroup *brushActionGroup;
+
+ QActionGroup *alphaChannelGroup;
+ QAction *alphaChannelPressureAction;
+ QAction *alphaChannelTiltAction;
+ QAction *noAlphaChannelAction;
+
+ QActionGroup *colorSaturationGroup;
+ QAction *colorSaturationVTiltAction;
+ QAction *colorSaturationHTiltAction;
+ QAction *colorSaturationPressureAction;
+ QAction *noColorSaturationAction;
+
+ QActionGroup *lineWidthGroup;
+ QAction *lineWidthPressureAction;
+ QAction *lineWidthTiltAction;
+ QAction *lineWidthFixedAction;
+
+ QAction *exitAction;
+ QAction *saveAction;
+ QAction *loadAction;
+
+ QAction *aboutAction;
+ QAction *aboutQtAction;
+
+ QMenu *fileMenu;
+ QMenu *brushMenu;
+ QMenu *tabletMenu;
+ QMenu *helpMenu;
+ QMenu *colorSaturationMenu;
+ QMenu *lineWidthMenu;
+ QMenu *alphaChannelMenu;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tablet/tablet.pro b/examples/widgets/tablet/tablet.pro
new file mode 100644
index 0000000..27d8d2c
--- /dev/null
+++ b/examples/widgets/tablet/tablet.pro
@@ -0,0 +1,13 @@
+HEADERS = mainwindow.h \
+ tabletcanvas.h \
+ tabletapplication.h
+SOURCES = mainwindow.cpp \
+ main.cpp \
+ tabletcanvas.cpp \
+ tabletapplication.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tablet
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tablet.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tablet
+INSTALLS += target sources
diff --git a/examples/widgets/tablet/tabletapplication.cpp b/examples/widgets/tablet/tabletapplication.cpp
new file mode 100644
index 0000000..c318b85
--- /dev/null
+++ b/examples/widgets/tablet/tabletapplication.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tabletapplication.h"
+
+//! [0]
+bool TabletApplication::event(QEvent *event)
+{
+ if (event->type() == QEvent::TabletEnterProximity ||
+ event->type() == QEvent::TabletLeaveProximity) {
+ myCanvas->setTabletDevice(
+ static_cast<QTabletEvent *>(event)->device());
+ return true;
+ }
+ return QApplication::event(event);
+}
+//! [0]
diff --git a/examples/widgets/tablet/tabletapplication.h b/examples/widgets/tablet/tabletapplication.h
new file mode 100644
index 0000000..acbaa50
--- /dev/null
+++ b/examples/widgets/tablet/tabletapplication.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABLETAPPLICATION_H
+#define TABLETAPPLICATION_H
+
+#include <QApplication>
+
+#include "tabletcanvas.h"
+
+//! [0]
+class TabletApplication : public QApplication
+{
+ Q_OBJECT
+
+public:
+ TabletApplication(int &argv, char **args)
+ : QApplication(argv, args) {}
+
+ bool event(QEvent *event);
+ void setCanvas(TabletCanvas *canvas)
+ { myCanvas = canvas; }
+
+private:
+ TabletCanvas *myCanvas;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tablet/tabletcanvas.cpp b/examples/widgets/tablet/tabletcanvas.cpp
new file mode 100644
index 0000000..dc42c3c
--- /dev/null
+++ b/examples/widgets/tablet/tabletcanvas.cpp
@@ -0,0 +1,257 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <math.h>
+
+#include "tabletcanvas.h"
+
+//! [0]
+TabletCanvas::TabletCanvas()
+{
+ resize(500, 500);
+ myBrush = QBrush();
+ myPen = QPen();
+ initImage();
+ setAutoFillBackground(true);
+ deviceDown = false;
+ myColor = Qt::red;
+ myTabletDevice = QTabletEvent::Stylus;
+ alphaChannelType = NoAlpha;
+ colorSaturationType = NoSaturation;
+ lineWidthType = LineWidthPressure;
+}
+
+void TabletCanvas::initImage()
+{
+ QImage newImage = QImage(width(), height(), QImage::Format_ARGB32);
+ QPainter painter(&newImage);
+ painter.fillRect(0, 0, newImage.width(), newImage.height(), Qt::white);
+ if (!image.isNull())
+ painter.drawImage(0, 0, image);
+ painter.end();
+ image = newImage;
+}
+//! [0]
+
+//! [1]
+bool TabletCanvas::saveImage(const QString &file)
+{
+ return image.save(file);
+}
+//! [1]
+
+//! [2]
+bool TabletCanvas::loadImage(const QString &file)
+{
+ bool success = image.load(file);
+
+ if (success) {
+ update();
+ return true;
+ }
+ return false;
+}
+//! [2]
+
+//! [3]
+void TabletCanvas::tabletEvent(QTabletEvent *event)
+{
+
+ switch (event->type()) {
+ case QEvent::TabletPress:
+ if (!deviceDown)
+ deviceDown = true;
+ break;
+ case QEvent::TabletRelease:
+ if (deviceDown)
+ deviceDown = false;
+ break;
+ case QEvent::TabletMove:
+ polyLine[2] = polyLine[1];
+ polyLine[1] = polyLine[0];
+ polyLine[0] = event->pos();
+
+ if (deviceDown) {
+ updateBrush(event);
+ QPainter painter(&image);
+ paintImage(painter, event);
+ }
+ break;
+ default:
+ break;
+ }
+ update();
+}
+//! [3]
+
+//! [4]
+void TabletCanvas::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.drawImage(QPoint(0, 0), image);
+}
+//! [4]
+
+//! [5]
+void TabletCanvas::paintImage(QPainter &painter, QTabletEvent *event)
+{
+ QPoint brushAdjust(10, 10);
+
+ switch (myTabletDevice) {
+ case QTabletEvent::Stylus:
+ painter.setBrush(myBrush);
+ painter.setPen(myPen);
+ painter.drawLine(polyLine[1], event->pos());
+ break;
+ case QTabletEvent::Airbrush:
+ myBrush.setColor(myColor);
+ myBrush.setStyle(brushPattern(event->pressure()));
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(myBrush);
+
+ for (int i = 0; i < 3; ++i) {
+ painter.drawEllipse(QRect(polyLine[i] - brushAdjust,
+ polyLine[i] + brushAdjust));
+ }
+ break;
+ case QTabletEvent::Puck:
+ case QTabletEvent::FourDMouse:
+ case QTabletEvent::RotationStylus:
+ qWarning("This input device is not supported by the example.");
+ break;
+ default:
+ qWarning("Unknown tablet device.");
+ }
+}
+//! [5]
+
+//! [6]
+Qt::BrushStyle TabletCanvas::brushPattern(qreal value)
+{
+ int pattern = int((value) * 100.0) % 7;
+
+ switch (pattern) {
+ case 0:
+ return Qt::SolidPattern;
+ case 1:
+ return Qt::Dense1Pattern;
+ case 2:
+ return Qt::Dense2Pattern;
+ case 3:
+ return Qt::Dense3Pattern;
+ case 4:
+ return Qt::Dense4Pattern;
+ case 5:
+ return Qt::Dense5Pattern;
+ case 6:
+ return Qt::Dense6Pattern;
+ default:
+ return Qt::Dense7Pattern;
+ }
+}
+//! [6]
+
+//! [7]
+void TabletCanvas::updateBrush(QTabletEvent *event)
+{
+ int hue, saturation, value, alpha;
+ myColor.getHsv(&hue, &saturation, &value, &alpha);
+
+ int vValue = int(((event->yTilt() + 60.0) / 120.0) * 255);
+ int hValue = int(((event->xTilt() + 60.0) / 120.0) * 255);
+//! [7] //! [8]
+
+ switch (alphaChannelType) {
+ case AlphaPressure:
+ myColor.setAlpha(int(event->pressure() * 255.0));
+ break;
+ case AlphaTilt:
+ myColor.setAlpha(maximum(abs(vValue - 127), abs(hValue - 127)));
+ break;
+ default:
+ myColor.setAlpha(255);
+ }
+
+//! [8] //! [9]
+ switch (colorSaturationType) {
+ case SaturationVTilt:
+ myColor.setHsv(hue, vValue, value, alpha);
+ break;
+ case SaturationHTilt:
+ myColor.setHsv(hue, hValue, value, alpha);
+ break;
+ case SaturationPressure:
+ myColor.setHsv(hue, int(event->pressure() * 255.0), value, alpha);
+ break;
+ default:
+ ;
+ }
+
+//! [9] //! [10]
+ switch (lineWidthType) {
+ case LineWidthPressure:
+ myPen.setWidthF(event->pressure() * 10 + 1);
+ break;
+ case LineWidthTilt:
+ myPen.setWidthF(maximum(abs(vValue - 127), abs(hValue - 127)) / 12);
+ break;
+ default:
+ myPen.setWidthF(1);
+ }
+
+//! [10] //! [11]
+ if (event->pointerType() == QTabletEvent::Eraser) {
+ myBrush.setColor(Qt::white);
+ myPen.setColor(Qt::white);
+ myPen.setWidthF(event->pressure() * 10 + 1);
+ } else {
+ myBrush.setColor(myColor);
+ myPen.setColor(myColor);
+ }
+}
+//! [11]
+
+void TabletCanvas::resizeEvent(QResizeEvent *event)
+{
+ initImage();
+ polyLine[0] = polyLine[1] = polyLine[2] = QPoint();
+}
diff --git a/examples/widgets/tablet/tabletcanvas.h b/examples/widgets/tablet/tabletcanvas.h
new file mode 100644
index 0000000..90eb1db
--- /dev/null
+++ b/examples/widgets/tablet/tabletcanvas.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TABLETCANVAS_H
+#define TABLETCANVAS_H
+
+#include <QWidget>
+#include <QImage>
+#include <QPoint>
+#include <QTabletEvent>
+#include <QColor>
+#include <QBrush>
+#include <QPen>
+#include <QPoint>
+
+QT_BEGIN_NAMESPACE
+class QPaintEvent;
+class QString;
+QT_END_NAMESPACE
+
+//! [0]
+class TabletCanvas : public QWidget
+{
+ Q_OBJECT
+
+public:
+ enum AlphaChannelType { AlphaPressure, AlphaTilt, NoAlpha };
+ enum ColorSaturationType { SaturationVTilt, SaturationHTilt,
+ SaturationPressure, NoSaturation };
+ enum LineWidthType { LineWidthPressure, LineWidthTilt, NoLineWidth };
+
+ TabletCanvas();
+
+ bool saveImage(const QString &file);
+ bool loadImage(const QString &file);
+ void setAlphaChannelType(AlphaChannelType type)
+ { alphaChannelType = type; }
+ void setColorSaturationType(ColorSaturationType type)
+ { colorSaturationType = type; }
+ void setLineWidthType(LineWidthType type)
+ { lineWidthType = type; }
+ void setColor(const QColor &color)
+ { myColor = color; }
+ QColor color() const
+ { return myColor; }
+ void setTabletDevice(QTabletEvent::TabletDevice device)
+ { myTabletDevice = device; }
+ int maximum(int a, int b)
+ { return a > b ? a : b; }
+
+protected:
+ void tabletEvent(QTabletEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ void initImage();
+ void paintImage(QPainter &painter, QTabletEvent *event);
+ Qt::BrushStyle brushPattern(qreal value);
+ void updateBrush(QTabletEvent *event);
+
+ AlphaChannelType alphaChannelType;
+ ColorSaturationType colorSaturationType;
+ LineWidthType lineWidthType;
+ QTabletEvent::PointerType pointerType;
+ QTabletEvent::TabletDevice myTabletDevice;
+ QColor myColor;
+
+ QImage image;
+ QBrush myBrush;
+ QPen myPen;
+ bool deviceDown;
+ QPoint polyLine[3];
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tetrix/main.cpp b/examples/widgets/tetrix/main.cpp
new file mode 100644
index 0000000..c9bf49a
--- /dev/null
+++ b/examples/widgets/tetrix/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <stdlib.h>
+
+#include "tetrixwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ TetrixWindow window;
+ window.show();
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ return app.exec();
+}
diff --git a/examples/widgets/tetrix/tetrix.pro b/examples/widgets/tetrix/tetrix.pro
new file mode 100644
index 0000000..59392fa
--- /dev/null
+++ b/examples/widgets/tetrix/tetrix.pro
@@ -0,0 +1,13 @@
+HEADERS = tetrixboard.h \
+ tetrixpiece.h \
+ tetrixwindow.h
+SOURCES = main.cpp \
+ tetrixboard.cpp \
+ tetrixpiece.cpp \
+ tetrixwindow.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tetrix
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tetrix.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tetrix
+INSTALLS += target sources
diff --git a/examples/widgets/tetrix/tetrixboard.cpp b/examples/widgets/tetrix/tetrixboard.cpp
new file mode 100644
index 0000000..e8ef4bf
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixboard.cpp
@@ -0,0 +1,409 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tetrixboard.h"
+
+//! [0]
+TetrixBoard::TetrixBoard(QWidget *parent)
+ : QFrame(parent)
+{
+ setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ setFocusPolicy(Qt::StrongFocus);
+ isStarted = false;
+ isPaused = false;
+ clearBoard();
+
+ nextPiece.setRandomShape();
+}
+//! [0]
+
+//! [1]
+void TetrixBoard::setNextPieceLabel(QLabel *label)
+{
+ nextPieceLabel = label;
+}
+//! [1]
+
+//! [2]
+QSize TetrixBoard::sizeHint() const
+{
+ return QSize(BoardWidth * 15 + frameWidth() * 2,
+ BoardHeight * 15 + frameWidth() * 2);
+}
+
+QSize TetrixBoard::minimumSizeHint() const
+//! [2] //! [3]
+{
+ return QSize(BoardWidth * 5 + frameWidth() * 2,
+ BoardHeight * 5 + frameWidth() * 2);
+}
+//! [3]
+
+//! [4]
+void TetrixBoard::start()
+{
+ if (isPaused)
+ return;
+
+ isStarted = true;
+ isWaitingAfterLine = false;
+ numLinesRemoved = 0;
+ numPiecesDropped = 0;
+ score = 0;
+ level = 1;
+ clearBoard();
+
+ emit linesRemovedChanged(numLinesRemoved);
+ emit scoreChanged(score);
+ emit levelChanged(level);
+
+ newPiece();
+ timer.start(timeoutTime(), this);
+}
+//! [4]
+
+//! [5]
+void TetrixBoard::pause()
+{
+ if (!isStarted)
+ return;
+
+ isPaused = !isPaused;
+ if (isPaused) {
+ timer.stop();
+ } else {
+ timer.start(timeoutTime(), this);
+ }
+ update();
+//! [5] //! [6]
+}
+//! [6]
+
+//! [7]
+void TetrixBoard::paintEvent(QPaintEvent *event)
+{
+ QFrame::paintEvent(event);
+
+ QPainter painter(this);
+ QRect rect = contentsRect();
+//! [7]
+
+ if (isPaused) {
+ painter.drawText(rect, Qt::AlignCenter, tr("Pause"));
+ return;
+ }
+
+//! [8]
+ int boardTop = rect.bottom() - BoardHeight*squareHeight();
+
+ for (int i = 0; i < BoardHeight; ++i) {
+ for (int j = 0; j < BoardWidth; ++j) {
+ TetrixShape shape = shapeAt(j, BoardHeight - i - 1);
+ if (shape != NoShape)
+ drawSquare(painter, rect.left() + j * squareWidth(),
+ boardTop + i * squareHeight(), shape);
+ }
+//! [8] //! [9]
+ }
+//! [9]
+
+//! [10]
+ if (curPiece.shape() != NoShape) {
+ for (int i = 0; i < 4; ++i) {
+ int x = curX + curPiece.x(i);
+ int y = curY - curPiece.y(i);
+ drawSquare(painter, rect.left() + x * squareWidth(),
+ boardTop + (BoardHeight - y - 1) * squareHeight(),
+ curPiece.shape());
+ }
+//! [10] //! [11]
+ }
+//! [11] //! [12]
+}
+//! [12]
+
+//! [13]
+void TetrixBoard::keyPressEvent(QKeyEvent *event)
+{
+ if (!isStarted || isPaused || curPiece.shape() == NoShape) {
+ QFrame::keyPressEvent(event);
+ return;
+ }
+//! [13]
+
+//! [14]
+ switch (event->key()) {
+ case Qt::Key_Left:
+ tryMove(curPiece, curX - 1, curY);
+ break;
+ case Qt::Key_Right:
+ tryMove(curPiece, curX + 1, curY);
+ break;
+ case Qt::Key_Down:
+ tryMove(curPiece.rotatedRight(), curX, curY);
+ break;
+ case Qt::Key_Up:
+ tryMove(curPiece.rotatedLeft(), curX, curY);
+ break;
+ case Qt::Key_Space:
+ dropDown();
+ break;
+ case Qt::Key_D:
+ oneLineDown();
+ break;
+ default:
+ QFrame::keyPressEvent(event);
+ }
+//! [14]
+}
+
+//! [15]
+void TetrixBoard::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() == timer.timerId()) {
+ if (isWaitingAfterLine) {
+ isWaitingAfterLine = false;
+ newPiece();
+ timer.start(timeoutTime(), this);
+ } else {
+ oneLineDown();
+ }
+ } else {
+ QFrame::timerEvent(event);
+//! [15] //! [16]
+ }
+//! [16] //! [17]
+}
+//! [17]
+
+//! [18]
+void TetrixBoard::clearBoard()
+{
+ for (int i = 0; i < BoardHeight * BoardWidth; ++i)
+ board[i] = NoShape;
+}
+//! [18]
+
+//! [19]
+void TetrixBoard::dropDown()
+{
+ int dropHeight = 0;
+ int newY = curY;
+ while (newY > 0) {
+ if (!tryMove(curPiece, curX, newY - 1))
+ break;
+ --newY;
+ ++dropHeight;
+ }
+ pieceDropped(dropHeight);
+//! [19] //! [20]
+}
+//! [20]
+
+//! [21]
+void TetrixBoard::oneLineDown()
+{
+ if (!tryMove(curPiece, curX, curY - 1))
+ pieceDropped(0);
+}
+//! [21]
+
+//! [22]
+void TetrixBoard::pieceDropped(int dropHeight)
+{
+ for (int i = 0; i < 4; ++i) {
+ int x = curX + curPiece.x(i);
+ int y = curY - curPiece.y(i);
+ shapeAt(x, y) = curPiece.shape();
+ }
+
+ ++numPiecesDropped;
+ if (numPiecesDropped % 25 == 0) {
+ ++level;
+ timer.start(timeoutTime(), this);
+ emit levelChanged(level);
+ }
+
+ score += dropHeight + 7;
+ emit scoreChanged(score);
+ removeFullLines();
+
+ if (!isWaitingAfterLine)
+ newPiece();
+//! [22] //! [23]
+}
+//! [23]
+
+//! [24]
+void TetrixBoard::removeFullLines()
+{
+ int numFullLines = 0;
+
+ for (int i = BoardHeight - 1; i >= 0; --i) {
+ bool lineIsFull = true;
+
+ for (int j = 0; j < BoardWidth; ++j) {
+ if (shapeAt(j, i) == NoShape) {
+ lineIsFull = false;
+ break;
+ }
+ }
+
+ if (lineIsFull) {
+//! [24] //! [25]
+ ++numFullLines;
+ for (int k = i; k < BoardHeight - 1; ++k) {
+ for (int j = 0; j < BoardWidth; ++j)
+ shapeAt(j, k) = shapeAt(j, k + 1);
+ }
+//! [25] //! [26]
+ for (int j = 0; j < BoardWidth; ++j)
+ shapeAt(j, BoardHeight - 1) = NoShape;
+ }
+//! [26] //! [27]
+ }
+//! [27]
+
+//! [28]
+ if (numFullLines > 0) {
+ numLinesRemoved += numFullLines;
+ score += 10 * numFullLines;
+ emit linesRemovedChanged(numLinesRemoved);
+ emit scoreChanged(score);
+
+ timer.start(500, this);
+ isWaitingAfterLine = true;
+ curPiece.setShape(NoShape);
+ update();
+ }
+//! [28] //! [29]
+}
+//! [29]
+
+//! [30]
+void TetrixBoard::newPiece()
+{
+ curPiece = nextPiece;
+ nextPiece.setRandomShape();
+ showNextPiece();
+ curX = BoardWidth / 2 + 1;
+ curY = BoardHeight - 1 + curPiece.minY();
+
+ if (!tryMove(curPiece, curX, curY)) {
+ curPiece.setShape(NoShape);
+ timer.stop();
+ isStarted = false;
+ }
+//! [30] //! [31]
+}
+//! [31]
+
+//! [32]
+void TetrixBoard::showNextPiece()
+{
+ if (!nextPieceLabel)
+ return;
+
+ int dx = nextPiece.maxX() - nextPiece.minX() + 1;
+ int dy = nextPiece.maxY() - nextPiece.minY() + 1;
+
+ QPixmap pixmap(dx * squareWidth(), dy * squareHeight());
+ QPainter painter(&pixmap);
+ painter.fillRect(pixmap.rect(), nextPieceLabel->palette().background());
+
+ for (int i = 0; i < 4; ++i) {
+ int x = nextPiece.x(i) - nextPiece.minX();
+ int y = nextPiece.y(i) - nextPiece.minY();
+ drawSquare(painter, x * squareWidth(), y * squareHeight(),
+ nextPiece.shape());
+ }
+ nextPieceLabel->setPixmap(pixmap);
+//! [32] //! [33]
+}
+//! [33]
+
+//! [34]
+bool TetrixBoard::tryMove(const TetrixPiece &newPiece, int newX, int newY)
+{
+ for (int i = 0; i < 4; ++i) {
+ int x = newX + newPiece.x(i);
+ int y = newY - newPiece.y(i);
+ if (x < 0 || x >= BoardWidth || y < 0 || y >= BoardHeight)
+ return false;
+ if (shapeAt(x, y) != NoShape)
+ return false;
+ }
+//! [34]
+
+//! [35]
+ curPiece = newPiece;
+ curX = newX;
+ curY = newY;
+ update();
+ return true;
+}
+//! [35]
+
+//! [36]
+void TetrixBoard::drawSquare(QPainter &painter, int x, int y, TetrixShape shape)
+{
+ static const QRgb colorTable[8] = {
+ 0x000000, 0xCC6666, 0x66CC66, 0x6666CC,
+ 0xCCCC66, 0xCC66CC, 0x66CCCC, 0xDAAA00
+ };
+
+ QColor color = colorTable[int(shape)];
+ painter.fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2,
+ color);
+
+ painter.setPen(color.light());
+ painter.drawLine(x, y + squareHeight() - 1, x, y);
+ painter.drawLine(x, y, x + squareWidth() - 1, y);
+
+ painter.setPen(color.dark());
+ painter.drawLine(x + 1, y + squareHeight() - 1,
+ x + squareWidth() - 1, y + squareHeight() - 1);
+ painter.drawLine(x + squareWidth() - 1, y + squareHeight() - 1,
+ x + squareWidth() - 1, y + 1);
+}
+//! [36]
diff --git a/examples/widgets/tetrix/tetrixboard.h b/examples/widgets/tetrix/tetrixboard.h
new file mode 100644
index 0000000..5d71125
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixboard.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TETRIXBOARD_H
+#define TETRIXBOARD_H
+
+#include <QBasicTimer>
+#include <QFrame>
+#include <QPointer>
+
+#include "tetrixpiece.h"
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+QT_END_NAMESPACE
+
+//! [0]
+class TetrixBoard : public QFrame
+{
+ Q_OBJECT
+
+public:
+ TetrixBoard(QWidget *parent = 0);
+
+ void setNextPieceLabel(QLabel *label);
+ QSize sizeHint() const;
+ QSize minimumSizeHint() const;
+
+public slots:
+ void start();
+ void pause();
+
+signals:
+ void scoreChanged(int score);
+ void levelChanged(int level);
+ void linesRemovedChanged(int numLines);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void timerEvent(QTimerEvent *event);
+//! [0]
+
+//! [1]
+private:
+ enum { BoardWidth = 10, BoardHeight = 22 };
+
+ TetrixShape &shapeAt(int x, int y) { return board[(y * BoardWidth) + x]; }
+ int timeoutTime() { return 1000 / (1 + level); }
+ int squareWidth() { return contentsRect().width() / BoardWidth; }
+ int squareHeight() { return contentsRect().height() / BoardHeight; }
+ void clearBoard();
+ void dropDown();
+ void oneLineDown();
+ void pieceDropped(int dropHeight);
+ void removeFullLines();
+ void newPiece();
+ void showNextPiece();
+ bool tryMove(const TetrixPiece &newPiece, int newX, int newY);
+ void drawSquare(QPainter &painter, int x, int y, TetrixShape shape);
+
+ QBasicTimer timer;
+ QPointer<QLabel> nextPieceLabel;
+ bool isStarted;
+ bool isPaused;
+ bool isWaitingAfterLine;
+ TetrixPiece curPiece;
+ TetrixPiece nextPiece;
+ int curX;
+ int curY;
+ int numLinesRemoved;
+ int numPiecesDropped;
+ int score;
+ int level;
+ TetrixShape board[BoardWidth * BoardHeight];
+};
+//! [1]
+
+#endif
diff --git a/examples/widgets/tetrix/tetrixpiece.cpp b/examples/widgets/tetrix/tetrixpiece.cpp
new file mode 100644
index 0000000..eeaab53
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixpiece.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+
+#include <stdlib.h>
+
+#include "tetrixpiece.h"
+
+//! [0]
+void TetrixPiece::setRandomShape()
+{
+ setShape(TetrixShape(qrand() % 7 + 1));
+}
+//! [0]
+
+//! [1]
+void TetrixPiece::setShape(TetrixShape shape)
+{
+ static const int coordsTable[8][4][2] = {
+ { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
+ { { 0, -1 }, { 0, 0 }, { -1, 0 }, { -1, 1 } },
+ { { 0, -1 }, { 0, 0 }, { 1, 0 }, { 1, 1 } },
+ { { 0, -1 }, { 0, 0 }, { 0, 1 }, { 0, 2 } },
+ { { -1, 0 }, { 0, 0 }, { 1, 0 }, { 0, 1 } },
+ { { 0, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } },
+ { { -1, -1 }, { 0, -1 }, { 0, 0 }, { 0, 1 } },
+ { { 1, -1 }, { 0, -1 }, { 0, 0 }, { 0, 1 } }
+ };
+
+ for (int i = 0; i < 4 ; i++) {
+ for (int j = 0; j < 2; ++j)
+ coords[i][j] = coordsTable[shape][i][j];
+ }
+ pieceShape = shape;
+//! [1] //! [2]
+}
+//! [2]
+
+//! [3]
+int TetrixPiece::minX() const
+{
+ int min = coords[0][0];
+ for (int i = 1; i < 4; ++i)
+ min = qMin(min, coords[i][0]);
+ return min;
+}
+
+int TetrixPiece::maxX() const
+//! [3] //! [4]
+{
+ int max = coords[0][0];
+ for (int i = 1; i < 4; ++i)
+ max = qMax(max, coords[i][0]);
+ return max;
+}
+//! [4]
+
+//! [5]
+int TetrixPiece::minY() const
+{
+ int min = coords[0][1];
+ for (int i = 1; i < 4; ++i)
+ min = qMin(min, coords[i][1]);
+ return min;
+}
+
+int TetrixPiece::maxY() const
+//! [5] //! [6]
+{
+ int max = coords[0][1];
+ for (int i = 1; i < 4; ++i)
+ max = qMax(max, coords[i][1]);
+ return max;
+}
+//! [6]
+
+//! [7]
+TetrixPiece TetrixPiece::rotatedLeft() const
+{
+ if (pieceShape == SquareShape)
+ return *this;
+
+ TetrixPiece result;
+ result.pieceShape = pieceShape;
+ for (int i = 0; i < 4; ++i) {
+ result.setX(i, y(i));
+ result.setY(i, -x(i));
+ }
+//! [7]
+ return result;
+}
+
+//! [9]
+TetrixPiece TetrixPiece::rotatedRight() const
+{
+ if (pieceShape == SquareShape)
+ return *this;
+
+ TetrixPiece result;
+ result.pieceShape = pieceShape;
+ for (int i = 0; i < 4; ++i) {
+ result.setX(i, -y(i));
+ result.setY(i, x(i));
+ }
+//! [9]
+ return result;
+}
diff --git a/examples/widgets/tetrix/tetrixpiece.h b/examples/widgets/tetrix/tetrixpiece.h
new file mode 100644
index 0000000..cbf5583
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixpiece.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TETRIXPIECE_H
+#define TETRIXPIECE_H
+
+enum TetrixShape { NoShape, ZShape, SShape, LineShape, TShape, SquareShape,
+ LShape, MirroredLShape };
+
+//! [0]
+class TetrixPiece
+{
+public:
+ TetrixPiece() { setShape(NoShape); }
+
+ void setRandomShape();
+ void setShape(TetrixShape shape);
+
+ TetrixShape shape() const { return pieceShape; }
+ int x(int index) const { return coords[index][0]; }
+ int y(int index) const { return coords[index][1]; }
+ int minX() const;
+ int maxX() const;
+ int minY() const;
+ int maxY() const;
+ TetrixPiece rotatedLeft() const;
+ TetrixPiece rotatedRight() const;
+
+private:
+ void setX(int index, int x) { coords[index][0] = x; }
+ void setY(int index, int y) { coords[index][1] = y; }
+
+ TetrixShape pieceShape;
+ int coords[4][2];
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tetrix/tetrixwindow.cpp b/examples/widgets/tetrix/tetrixwindow.cpp
new file mode 100644
index 0000000..98e460a
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixwindow.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tetrixboard.h"
+#include "tetrixwindow.h"
+
+//! [0]
+TetrixWindow::TetrixWindow()
+{
+ board = new TetrixBoard;
+//! [0]
+
+ nextPieceLabel = new QLabel;
+ nextPieceLabel->setFrameStyle(QFrame::Box | QFrame::Raised);
+ nextPieceLabel->setAlignment(Qt::AlignCenter);
+ board->setNextPieceLabel(nextPieceLabel);
+
+//! [1]
+ scoreLcd = new QLCDNumber(5);
+ scoreLcd->setSegmentStyle(QLCDNumber::Filled);
+//! [1]
+ levelLcd = new QLCDNumber(2);
+ levelLcd->setSegmentStyle(QLCDNumber::Filled);
+ linesLcd = new QLCDNumber(5);
+ linesLcd->setSegmentStyle(QLCDNumber::Filled);
+
+//! [2]
+ startButton = new QPushButton(tr("&Start"));
+ startButton->setFocusPolicy(Qt::NoFocus);
+ quitButton = new QPushButton(tr("&Quit"));
+ quitButton->setFocusPolicy(Qt::NoFocus);
+ pauseButton = new QPushButton(tr("&Pause"));
+//! [2] //! [3]
+ pauseButton->setFocusPolicy(Qt::NoFocus);
+//! [3] //! [4]
+
+ connect(startButton, SIGNAL(clicked()), board, SLOT(start()));
+//! [4] //! [5]
+ connect(quitButton , SIGNAL(clicked()), qApp, SLOT(quit()));
+ connect(pauseButton, SIGNAL(clicked()), board, SLOT(pause()));
+ connect(board, SIGNAL(scoreChanged(int)), scoreLcd, SLOT(display(int)));
+ connect(board, SIGNAL(levelChanged(int)), levelLcd, SLOT(display(int)));
+ connect(board, SIGNAL(linesRemovedChanged(int)),
+ linesLcd, SLOT(display(int)));
+//! [5]
+
+//! [6]
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(createLabel(tr("NEXT")), 0, 0);
+ layout->addWidget(nextPieceLabel, 1, 0);
+ layout->addWidget(createLabel(tr("LEVEL")), 2, 0);
+ layout->addWidget(levelLcd, 3, 0);
+ layout->addWidget(startButton, 4, 0);
+ layout->addWidget(board, 0, 1, 6, 1);
+ layout->addWidget(createLabel(tr("SCORE")), 0, 2);
+ layout->addWidget(scoreLcd, 1, 2);
+ layout->addWidget(createLabel(tr("LINES REMOVED")), 2, 2);
+ layout->addWidget(linesLcd, 3, 2);
+ layout->addWidget(quitButton, 4, 2);
+ layout->addWidget(pauseButton, 5, 2);
+ setLayout(layout);
+
+ setWindowTitle(tr("Tetrix"));
+ resize(550, 370);
+}
+//! [6]
+
+//! [7]
+QLabel *TetrixWindow::createLabel(const QString &text)
+{
+ QLabel *lbl = new QLabel(text);
+ lbl->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
+ return lbl;
+}
+//! [7]
+
diff --git a/examples/widgets/tetrix/tetrixwindow.h b/examples/widgets/tetrix/tetrixwindow.h
new file mode 100644
index 0000000..ad22b0f
--- /dev/null
+++ b/examples/widgets/tetrix/tetrixwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TETRIXWINDOW_H
+#define TETRIXWINDOW_H
+
+#include <QFrame>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLCDNumber;
+class QLabel;
+class QPushButton;
+QT_END_NAMESPACE
+class TetrixBoard;
+
+//! [0]
+class TetrixWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ TetrixWindow();
+
+private:
+ QLabel *createLabel(const QString &text);
+
+ TetrixBoard *board;
+ QLabel *nextPieceLabel;
+ QLCDNumber *scoreLcd;
+ QLCDNumber *levelLcd;
+ QLCDNumber *linesLcd;
+ QPushButton *startButton;
+ QPushButton *quitButton;
+ QPushButton *pauseButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tooltips/images/circle.png b/examples/widgets/tooltips/images/circle.png
new file mode 100644
index 0000000..dc392cb
--- /dev/null
+++ b/examples/widgets/tooltips/images/circle.png
Binary files differ
diff --git a/examples/widgets/tooltips/images/square.png b/examples/widgets/tooltips/images/square.png
new file mode 100644
index 0000000..c0fd2d5
--- /dev/null
+++ b/examples/widgets/tooltips/images/square.png
Binary files differ
diff --git a/examples/widgets/tooltips/images/triangle.png b/examples/widgets/tooltips/images/triangle.png
new file mode 100644
index 0000000..2ee15f8
--- /dev/null
+++ b/examples/widgets/tooltips/images/triangle.png
Binary files differ
diff --git a/examples/widgets/tooltips/main.cpp b/examples/widgets/tooltips/main.cpp
new file mode 100644
index 0000000..2f4c713
--- /dev/null
+++ b/examples/widgets/tooltips/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "sortingbox.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(tooltips);
+
+ QApplication app(argc, argv);
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+ SortingBox sortingBox;
+ sortingBox.show();
+ return app.exec();
+}
diff --git a/examples/widgets/tooltips/shapeitem.cpp b/examples/widgets/tooltips/shapeitem.cpp
new file mode 100644
index 0000000..a8d8f3a
--- /dev/null
+++ b/examples/widgets/tooltips/shapeitem.cpp
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "shapeitem.h"
+
+//! [0]
+QPainterPath ShapeItem::path() const
+{
+ return myPath;
+}
+//! [0]
+
+//! [1]
+QPoint ShapeItem::position() const
+{
+ return myPosition;
+}
+//! [1]
+
+//! [2]
+QColor ShapeItem::color() const
+{
+ return myColor;
+}
+//! [2]
+
+//! [3]
+QString ShapeItem::toolTip() const
+{
+ return myToolTip;
+}
+//! [3]
+
+//! [4]
+void ShapeItem::setPath(const QPainterPath &path)
+{
+ myPath = path;
+}
+//! [4]
+
+//! [5]
+void ShapeItem::setToolTip(const QString &toolTip)
+{
+ myToolTip = toolTip;
+}
+//! [5]
+
+//! [6]
+void ShapeItem::setPosition(const QPoint &position)
+{
+ myPosition = position;
+}
+//! [6]
+
+//! [7]
+void ShapeItem::setColor(const QColor &color)
+{
+ myColor = color;
+}
+//! [7]
diff --git a/examples/widgets/tooltips/shapeitem.h b/examples/widgets/tooltips/shapeitem.h
new file mode 100644
index 0000000..d41b990
--- /dev/null
+++ b/examples/widgets/tooltips/shapeitem.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SHAPEITEM_H
+#define SHAPEITEM_H
+
+#include <QColor>
+#include <QPainterPath>
+#include <QPoint>
+
+//! [0]
+class ShapeItem
+{
+public:
+ void setPath(const QPainterPath &path);
+ void setToolTip(const QString &toolTip);
+ void setPosition(const QPoint &position);
+ void setColor(const QColor &color);
+
+ QPainterPath path() const;
+ QPoint position() const;
+ QColor color() const;
+ QString toolTip() const;
+
+private:
+ QPainterPath myPath;
+ QPoint myPosition;
+ QColor myColor;
+ QString myToolTip;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/tooltips/sortingbox.cpp b/examples/widgets/tooltips/sortingbox.cpp
new file mode 100644
index 0000000..995da3e
--- /dev/null
+++ b/examples/widgets/tooltips/sortingbox.cpp
@@ -0,0 +1,302 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include <stdlib.h>
+
+#include "sortingbox.h"
+
+//! [0]
+SortingBox::SortingBox()
+{
+//! [0] //! [1]
+ setMouseTracking(true);
+//! [1] //! [2]
+ setBackgroundRole(QPalette::Base);
+//! [2]
+
+ itemInMotion = 0;
+
+//! [3]
+ newCircleButton = createToolButton(tr("New Circle"),
+ QIcon(":/images/circle.png"),
+ SLOT(createNewCircle()));
+
+ newSquareButton = createToolButton(tr("New Square"),
+ QIcon(":/images/square.png"),
+ SLOT(createNewSquare()));
+
+ newTriangleButton = createToolButton(tr("New Triangle"),
+ QIcon(":/images/triangle.png"),
+ SLOT(createNewTriangle()));
+
+ circlePath.addEllipse(QRect(0, 0, 100, 100));
+ squarePath.addRect(QRect(0, 0, 100, 100));
+
+ qreal x = trianglePath.currentPosition().x();
+ qreal y = trianglePath.currentPosition().y();
+ trianglePath.moveTo(x + 120 / 2, y);
+ trianglePath.lineTo(0, 100);
+ trianglePath.lineTo(120, 100);
+ trianglePath.lineTo(x + 120 / 2, y);
+
+//! [3] //! [4]
+ setWindowTitle(tr("Tool Tips"));
+ resize(500, 300);
+
+ createShapeItem(circlePath, tr("Circle"), initialItemPosition(circlePath),
+ initialItemColor());
+ createShapeItem(squarePath, tr("Square"), initialItemPosition(squarePath),
+ initialItemColor());
+ createShapeItem(trianglePath, tr("Triangle"),
+ initialItemPosition(trianglePath), initialItemColor());
+}
+//! [4]
+
+//! [5]
+bool SortingBox::event(QEvent *event)
+{
+//! [5] //! [6]
+ if (event->type() == QEvent::ToolTip) {
+ QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
+ int index = itemAt(helpEvent->pos());
+ if (index != -1) {
+ QToolTip::showText(helpEvent->globalPos(), shapeItems[index].toolTip());
+ } else {
+ QToolTip::hideText();
+ event->ignore();
+ }
+
+ return true;
+ }
+ return QWidget::event(event);
+}
+//! [6]
+
+//! [7]
+void SortingBox::resizeEvent(QResizeEvent * /* event */)
+{
+ int margin = style()->pixelMetric(QStyle::PM_DefaultTopLevelMargin);
+ int x = width() - margin;
+ int y = height() - margin;
+
+ y = updateButtonGeometry(newCircleButton, x, y);
+ y = updateButtonGeometry(newSquareButton, x, y);
+ updateButtonGeometry(newTriangleButton, x, y);
+}
+//! [7]
+
+//! [8]
+void SortingBox::paintEvent(QPaintEvent * /* event */)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ foreach (ShapeItem shapeItem, shapeItems) {
+//! [8] //! [9]
+ painter.translate(shapeItem.position());
+//! [9] //! [10]
+ painter.setBrush(shapeItem.color());
+ painter.drawPath(shapeItem.path());
+ painter.translate(-shapeItem.position());
+ }
+}
+//! [10]
+
+//! [11]
+void SortingBox::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ int index = itemAt(event->pos());
+ if (index != -1) {
+ itemInMotion = &shapeItems[index];
+ previousPosition = event->pos();
+ shapeItems.move(index, shapeItems.size() - 1);
+ update();
+ }
+ }
+}
+//! [11]
+
+//! [12]
+void SortingBox::mouseMoveEvent(QMouseEvent *event)
+{
+ if ((event->buttons() & Qt::LeftButton) && itemInMotion)
+ moveItemTo(event->pos());
+}
+//! [12]
+
+//! [13]
+void SortingBox::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton && itemInMotion) {
+ moveItemTo(event->pos());
+ itemInMotion = 0;
+ }
+}
+//! [13]
+
+//! [14]
+void SortingBox::createNewCircle()
+{
+ static int count = 1;
+ createShapeItem(circlePath, tr("Circle <%1>").arg(++count),
+ randomItemPosition(), randomItemColor());
+}
+//! [14]
+
+//! [15]
+void SortingBox::createNewSquare()
+{
+ static int count = 1;
+ createShapeItem(squarePath, tr("Square <%1>").arg(++count),
+ randomItemPosition(), randomItemColor());
+}
+//! [15]
+
+//! [16]
+void SortingBox::createNewTriangle()
+{
+ static int count = 1;
+ createShapeItem(trianglePath, tr("Triangle <%1>").arg(++count),
+ randomItemPosition(), randomItemColor());
+}
+//! [16]
+
+//! [17]
+int SortingBox::itemAt(const QPoint &pos)
+{
+ for (int i = shapeItems.size() - 1; i >= 0; --i) {
+ const ShapeItem &item = shapeItems[i];
+ if (item.path().contains(pos - item.position()))
+ return i;
+ }
+ return -1;
+}
+//! [17]
+
+//! [18]
+void SortingBox::moveItemTo(const QPoint &pos)
+{
+ QPoint offset = pos - previousPosition;
+ itemInMotion->setPosition(itemInMotion->position() + offset);
+//! [18] //! [19]
+ previousPosition = pos;
+ update();
+}
+//! [19]
+
+//! [20]
+int SortingBox::updateButtonGeometry(QToolButton *button, int x, int y)
+{
+ QSize size = button->sizeHint();
+ button->setGeometry(x - size.rwidth(), y - size.rheight(),
+ size.rwidth(), size.rheight());
+
+ return y - size.rheight()
+ - style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
+}
+//! [20]
+
+//! [21]
+void SortingBox::createShapeItem(const QPainterPath &path,
+ const QString &toolTip, const QPoint &pos,
+ const QColor &color)
+{
+ ShapeItem shapeItem;
+ shapeItem.setPath(path);
+ shapeItem.setToolTip(toolTip);
+ shapeItem.setPosition(pos);
+ shapeItem.setColor(color);
+ shapeItems.append(shapeItem);
+ update();
+}
+//! [21]
+
+//! [22]
+QToolButton *SortingBox::createToolButton(const QString &toolTip,
+ const QIcon &icon, const char *member)
+{
+ QToolButton *button = new QToolButton(this);
+ button->setToolTip(toolTip);
+ button->setIcon(icon);
+ button->setIconSize(QSize(32, 32));
+ connect(button, SIGNAL(clicked()), this, member);
+
+ return button;
+}
+//! [22]
+
+//! [23]
+QPoint SortingBox::initialItemPosition(const QPainterPath &path)
+{
+ int x;
+ int y = (height() - (int)path.controlPointRect().height()) / 2;
+ if (shapeItems.size() == 0)
+ x = ((3 * width()) / 2 - (int)path.controlPointRect().width()) / 2;
+ else
+ x = (width() / shapeItems.size()
+ - (int)path.controlPointRect().width()) / 2;
+
+ return QPoint(x, y);
+}
+//! [23]
+
+//! [24]
+QPoint SortingBox::randomItemPosition()
+{
+ return QPoint(qrand() % (width() - 120), qrand() % (height() - 120));
+}
+//! [24]
+
+//! [25]
+QColor SortingBox::initialItemColor()
+{
+ return QColor::fromHsv(((shapeItems.size() + 1) * 85) % 256, 255, 190);
+}
+//! [25]
+
+//! [26]
+QColor SortingBox::randomItemColor()
+{
+ return QColor::fromHsv(qrand() % 256, 255, 190);
+}
+//! [26]
diff --git a/examples/widgets/tooltips/sortingbox.h b/examples/widgets/tooltips/sortingbox.h
new file mode 100644
index 0000000..fb565cd
--- /dev/null
+++ b/examples/widgets/tooltips/sortingbox.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SORTINGBOX_H
+#define SORTINGBOX_H
+
+#include <QWidget>
+
+#include "shapeitem.h"
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QPoint;
+class QToolButton;
+QT_END_NAMESPACE
+
+//! [0]
+class SortingBox : public QWidget
+{
+ Q_OBJECT
+
+public:
+ SortingBox();
+
+protected:
+ bool event(QEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+
+private slots:
+ void createNewCircle();
+ void createNewSquare();
+ void createNewTriangle();
+//! [0]
+
+//! [1]
+private:
+ int updateButtonGeometry(QToolButton *button, int x, int y);
+ void createShapeItem(const QPainterPath &path, const QString &toolTip,
+ const QPoint &pos, const QColor &color);
+ int itemAt(const QPoint &pos);
+ void moveItemTo(const QPoint &pos);
+ QPoint initialItemPosition(const QPainterPath &path);
+ QPoint randomItemPosition();
+ QColor initialItemColor();
+ QColor randomItemColor();
+ QToolButton *createToolButton(const QString &toolTip, const QIcon &icon,
+//! [1]
+ const char *member);
+
+//! [2]
+ QList<ShapeItem> shapeItems;
+ QPainterPath circlePath;
+ QPainterPath squarePath;
+ QPainterPath trianglePath;
+
+ QPoint previousPosition;
+ ShapeItem *itemInMotion;
+
+ QToolButton *newCircleButton;
+ QToolButton *newSquareButton;
+ QToolButton *newTriangleButton;
+};
+//! [2]
+
+#endif
diff --git a/examples/widgets/tooltips/tooltips.pro b/examples/widgets/tooltips/tooltips.pro
new file mode 100644
index 0000000..9f0bf41
--- /dev/null
+++ b/examples/widgets/tooltips/tooltips.pro
@@ -0,0 +1,12 @@
+HEADERS = shapeitem.h \
+ sortingbox.h
+SOURCES = main.cpp \
+ shapeItem.cpp \
+ sortingbox.cpp
+RESOURCES = tooltips.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tooltips
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS tooltips.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/tooltips
+INSTALLS += target sources
diff --git a/examples/widgets/tooltips/tooltips.qrc b/examples/widgets/tooltips/tooltips.qrc
new file mode 100644
index 0000000..dabc894
--- /dev/null
+++ b/examples/widgets/tooltips/tooltips.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/circle.png</file>
+ <file>images/square.png</file>
+ <file>images/triangle.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/validators/ledoff.png b/examples/widgets/validators/ledoff.png
new file mode 100644
index 0000000..8b1f2ed
--- /dev/null
+++ b/examples/widgets/validators/ledoff.png
Binary files differ
diff --git a/examples/widgets/validators/ledon.png b/examples/widgets/validators/ledon.png
new file mode 100644
index 0000000..601c34d
--- /dev/null
+++ b/examples/widgets/validators/ledon.png
Binary files differ
diff --git a/examples/widgets/validators/ledwidget.cpp b/examples/widgets/validators/ledwidget.cpp
new file mode 100644
index 0000000..9213755
--- /dev/null
+++ b/examples/widgets/validators/ledwidget.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "ledwidget.h"
+
+LEDWidget::LEDWidget(QWidget *parent)
+ : QLabel(parent), onPixmap(":/ledon.png"), offPixmap(":/ledoff.png")
+{
+ setPixmap(offPixmap);
+ flashTimer.setInterval(200);
+ flashTimer.setSingleShot(true);
+ connect(&flashTimer, SIGNAL(timeout()), this, SLOT(extinguish()));
+};
+
+void LEDWidget::extinguish()
+{
+ setPixmap(offPixmap);
+}
+
+void LEDWidget::flash()
+{
+ setPixmap(onPixmap);
+ flashTimer.start();
+}
+
diff --git a/examples/widgets/validators/ledwidget.h b/examples/widgets/validators/ledwidget.h
new file mode 100644
index 0000000..08992f9
--- /dev/null
+++ b/examples/widgets/validators/ledwidget.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LEDWIDGET_H
+#define LEDWIDGET_H
+
+#include <QLabel>
+#include <QPixmap>
+#include <QTimer>
+
+class LEDWidget : public QLabel
+{
+ Q_OBJECT
+public:
+ LEDWidget(QWidget *parent = 0);
+public slots:
+ void flash();
+
+private slots:
+ void extinguish();
+
+private:
+ QPixmap onPixmap, offPixmap;
+ QTimer flashTimer;
+};
+
+#endif // LEDWIDGET_H
diff --git a/examples/widgets/validators/localeselector.cpp b/examples/widgets/validators/localeselector.cpp
new file mode 100644
index 0000000..b725d26
--- /dev/null
+++ b/examples/widgets/validators/localeselector.cpp
@@ -0,0 +1,313 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "localeselector.h"
+#include <QLocale>
+
+struct SupportedLocale
+{
+ int lang, country;
+};
+
+const SupportedLocale SUPPORTED_LOCALES[] = {
+ { 1, 0 }, // C/AnyCountry
+ { 3, 69 }, // Afan/Ethiopia
+ { 3, 111 }, // Afan/Kenya
+ { 4, 59 }, // Afar/Djibouti
+ { 4, 67 }, // Afar/Eritrea
+ { 4, 69 }, // Afar/Ethiopia
+ { 5, 195 }, // Afrikaans/SouthAfrica
+ { 5, 148 }, // Afrikaans/Namibia
+ { 6, 2 }, // Albanian/Albania
+ { 7, 69 }, // Amharic/Ethiopia
+ { 8, 186 }, // Arabic/SaudiArabia
+ { 8, 3 }, // Arabic/Algeria
+ { 8, 17 }, // Arabic/Bahrain
+ { 8, 64 }, // Arabic/Egypt
+ { 8, 103 }, // Arabic/Iraq
+ { 8, 109 }, // Arabic/Jordan
+ { 8, 115 }, // Arabic/Kuwait
+ { 8, 119 }, // Arabic/Lebanon
+ { 8, 122 }, // Arabic/LibyanArabJamahiriya
+ { 8, 145 }, // Arabic/Morocco
+ { 8, 162 }, // Arabic/Oman
+ { 8, 175 }, // Arabic/Qatar
+ { 8, 201 }, // Arabic/Sudan
+ { 8, 207 }, // Arabic/SyrianArabRepublic
+ { 8, 216 }, // Arabic/Tunisia
+ { 8, 223 }, // Arabic/UnitedArabEmirates
+ { 8, 237 }, // Arabic/Yemen
+ { 9, 11 }, // Armenian/Armenia
+ { 10, 100 }, // Assamese/India
+ { 12, 15 }, // Azerbaijani/Azerbaijan
+ { 14, 197 }, // Basque/Spain
+ { 15, 18 }, // Bengali/Bangladesh
+ { 15, 100 }, // Bengali/India
+ { 16, 25 }, // Bhutani/Bhutan
+ { 20, 33 }, // Bulgarian/Bulgaria
+ { 22, 20 }, // Byelorussian/Belarus
+ { 23, 36 }, // Cambodian/Cambodia
+ { 24, 197 }, // Catalan/Spain
+ { 25, 44 }, // Chinese/China
+ { 25, 97 }, // Chinese/HongKong
+ { 25, 126 }, // Chinese/Macau
+ { 25, 190 }, // Chinese/Singapore
+ { 25, 208 }, // Chinese/Taiwan
+ { 27, 54 }, // Croatian/Croatia
+ { 28, 57 }, // Czech/CzechRepublic
+ { 29, 58 }, // Danish/Denmark
+ { 30, 151 }, // Dutch/Netherlands
+ { 30, 21 }, // Dutch/Belgium
+ { 31, 225 }, // English/UnitedStates
+ { 31, 4 }, // English/AmericanSamoa
+ { 31, 13 }, // English/Australia
+ { 31, 21 }, // English/Belgium
+ { 31, 22 }, // English/Belize
+ { 31, 28 }, // English/Botswana
+ { 31, 38 }, // English/Canada
+ { 31, 89 }, // English/Guam
+ { 31, 97 }, // English/HongKong
+ { 31, 100 }, // English/India
+ { 31, 104 }, // English/Ireland
+ { 31, 107 }, // English/Jamaica
+ { 31, 133 }, // English/Malta
+ { 31, 134 }, // English/MarshallIslands
+ { 31, 148 }, // English/Namibia
+ { 31, 154 }, // English/NewZealand
+ { 31, 160 }, // English/NorthernMarianaIslands
+ { 31, 163 }, // English/Pakistan
+ { 31, 170 }, // English/Philippines
+ { 31, 190 }, // English/Singapore
+ { 31, 195 }, // English/SouthAfrica
+ { 31, 215 }, // English/TrinidadAndTobago
+ { 31, 224 }, // English/UnitedKingdom
+ { 31, 226 }, // English/UnitedStatesMinorOutlyingIslands
+ { 31, 234 }, // English/USVirginIslands
+ { 31, 240 }, // English/Zimbabwe
+ { 33, 68 }, // Estonian/Estonia
+ { 34, 71 }, // Faroese/FaroeIslands
+ { 36, 73 }, // Finnish/Finland
+ { 37, 74 }, // French/France
+ { 37, 21 }, // French/Belgium
+ { 37, 38 }, // French/Canada
+ { 37, 125 }, // French/Luxembourg
+ { 37, 142 }, // French/Monaco
+ { 37, 206 }, // French/Switzerland
+ { 40, 197 }, // Galician/Spain
+ { 41, 81 }, // Georgian/Georgia
+ { 42, 82 }, // German/Germany
+ { 42, 14 }, // German/Austria
+ { 42, 21 }, // German/Belgium
+ { 42, 123 }, // German/Liechtenstein
+ { 42, 125 }, // German/Luxembourg
+ { 42, 206 }, // German/Switzerland
+ { 43, 85 }, // Greek/Greece
+ { 43, 56 }, // Greek/Cyprus
+ { 44, 86 }, // Greenlandic/Greenland
+ { 46, 100 }, // Gujarati/India
+ { 47, 83 }, // Hausa/Ghana
+ { 47, 156 }, // Hausa/Niger
+ { 47, 157 }, // Hausa/Nigeria
+ { 48, 105 }, // Hebrew/Israel
+ { 49, 100 }, // Hindi/India
+ { 50, 98 }, // Hungarian/Hungary
+ { 51, 99 }, // Icelandic/Iceland
+ { 52, 101 }, // Indonesian/Indonesia
+ { 57, 104 }, // Irish/Ireland
+ { 58, 106 }, // Italian/Italy
+ { 58, 206 }, // Italian/Switzerland
+ { 59, 108 }, // Japanese/Japan
+ { 61, 100 }, // Kannada/India
+ { 63, 110 }, // Kazakh/Kazakhstan
+ { 64, 179 }, // Kinyarwanda/Rwanda
+ { 65, 116 }, // Kirghiz/Kyrgyzstan
+ { 66, 114 }, // Korean/RepublicOfKorea
+ { 67, 102 }, // Kurdish/Iran
+ { 67, 103 }, // Kurdish/Iraq
+ { 67, 207 }, // Kurdish/SyrianArabRepublic
+ { 67, 217 }, // Kurdish/Turkey
+ { 69, 117 }, // Laothian/Lao
+ { 71, 118 }, // Latvian/Latvia
+ { 72, 49 }, // Lingala/DemocraticRepublicOfCongo
+ { 72, 50 }, // Lingala/PeoplesRepublicOfCongo
+ { 73, 124 }, // Lithuanian/Lithuania
+ { 74, 127 }, // Macedonian/Macedonia
+ { 76, 130 }, // Malay/Malaysia
+ { 76, 32 }, // Malay/BruneiDarussalam
+ { 77, 100 }, // Malayalam/India
+ { 78, 133 }, // Maltese/Malta
+ { 80, 100 }, // Marathi/India
+ { 82, 143 }, // Mongolian/Mongolia
+ { 84, 150 }, // Nepali/Nepal
+ { 85, 161 }, // Norwegian/Norway
+ { 87, 100 }, // Oriya/India
+ { 88, 1 }, // Pashto/Afghanistan
+ { 89, 102 }, // Persian/Iran
+ { 89, 1 }, // Persian/Afghanistan
+ { 90, 172 }, // Polish/Poland
+ { 91, 173 }, // Portuguese/Portugal
+ { 91, 30 }, // Portuguese/Brazil
+ { 92, 100 }, // Punjabi/India
+ { 92, 163 }, // Punjabi/Pakistan
+ { 95, 177 }, // Romanian/Romania
+ { 96, 178 }, // Russian/RussianFederation
+ { 96, 222 }, // Russian/Ukraine
+ { 99, 100 }, // Sanskrit/India
+ { 100, 241 }, // Serbian/SerbiaAndMontenegro
+ { 100, 27 }, // Serbian/BosniaAndHerzegowina
+ { 100, 238 }, // Serbian/Yugoslavia
+ { 101, 241 }, // SerboCroatian/SerbiaAndMontenegro
+ { 101, 27 }, // SerboCroatian/BosniaAndHerzegowina
+ { 101, 238 }, // SerboCroatian/Yugoslavia
+ { 102, 195 }, // Sesotho/SouthAfrica
+ { 103, 195 }, // Setswana/SouthAfrica
+ { 107, 195 }, // Siswati/SouthAfrica
+ { 108, 191 }, // Slovak/Slovakia
+ { 109, 192 }, // Slovenian/Slovenia
+ { 110, 194 }, // Somali/Somalia
+ { 110, 59 }, // Somali/Djibouti
+ { 110, 69 }, // Somali/Ethiopia
+ { 110, 111 }, // Somali/Kenya
+ { 111, 197 }, // Spanish/Spain
+ { 111, 10 }, // Spanish/Argentina
+ { 111, 26 }, // Spanish/Bolivia
+ { 111, 43 }, // Spanish/Chile
+ { 111, 47 }, // Spanish/Colombia
+ { 111, 52 }, // Spanish/CostaRica
+ { 111, 61 }, // Spanish/DominicanRepublic
+ { 111, 63 }, // Spanish/Ecuador
+ { 111, 65 }, // Spanish/ElSalvador
+ { 111, 90 }, // Spanish/Guatemala
+ { 111, 96 }, // Spanish/Honduras
+ { 111, 139 }, // Spanish/Mexico
+ { 111, 155 }, // Spanish/Nicaragua
+ { 111, 166 }, // Spanish/Panama
+ { 111, 168 }, // Spanish/Paraguay
+ { 111, 169 }, // Spanish/Peru
+ { 111, 174 }, // Spanish/PuertoRico
+ { 111, 225 }, // Spanish/UnitedStates
+ { 111, 227 }, // Spanish/Uruguay
+ { 111, 231 }, // Spanish/Venezuela
+ { 113, 111 }, // Swahili/Kenya
+ { 113, 210 }, // Swahili/Tanzania
+ { 114, 205 }, // Swedish/Sweden
+ { 114, 73 }, // Swedish/Finland
+ { 116, 209 }, // Tajik/Tajikistan
+ { 117, 100 }, // Tamil/India
+ { 118, 178 }, // Tatar/RussianFederation
+ { 119, 100 }, // Telugu/India
+ { 120, 211 }, // Thai/Thailand
+ { 122, 67 }, // Tigrinya/Eritrea
+ { 122, 69 }, // Tigrinya/Ethiopia
+ { 124, 195 }, // Tsonga/SouthAfrica
+ { 125, 217 }, // Turkish/Turkey
+ { 129, 222 }, // Ukrainian/Ukraine
+ { 130, 100 }, // Urdu/India
+ { 130, 163 }, // Urdu/Pakistan
+ { 131, 228 }, // Uzbek/Uzbekistan
+ { 131, 1 }, // Uzbek/Afghanistan
+ { 132, 232 }, // Vietnamese/VietNam
+ { 134, 224 }, // Welsh/UnitedKingdom
+ { 136, 195 }, // Xhosa/SouthAfrica
+ { 138, 157 }, // Yoruba/Nigeria
+ { 140, 195 }, // Zulu/SouthAfrica
+ { 141, 161 }, // Nynorsk/Norway
+ { 142, 27 }, // Bosnian/BosniaAndHerzegowina
+ { 143, 131 }, // Divehi/Maldives
+ { 144, 224 }, // Manx/UnitedKingdom
+ { 145, 224 }, // Cornish/UnitedKingdom
+ { 146, 83 }, // Akan/Ghana
+ { 147, 100 }, // Konkani/India
+ { 148, 83 }, // Ga/Ghana
+ { 149, 157 }, // Igbo/Nigeria
+ { 150, 111 }, // Kamba/Kenya
+ { 151, 207 }, // Syriac/SyrianArabRepublic
+ { 152, 67 }, // Blin/Eritrea
+ { 153, 67 }, // Geez/Eritrea
+ { 153, 69 }, // Geez/Ethiopia
+ { 154, 157 }, // Koro/Nigeria
+ { 155, 69 }, // Sidamo/Ethiopia
+ { 156, 157 }, // Atsam/Nigeria
+ { 157, 67 }, // Tigre/Eritrea
+ { 158, 157 }, // Jju/Nigeria
+ { 159, 106 }, // Friulian/Italy
+ { 160, 195 }, // Venda/SouthAfrica
+ { 161, 83 }, // Ewe/Ghana
+ { 161, 212 }, // Ewe/Togo
+ { 163, 225 }, // Hawaiian/UnitedStates
+ { 164, 157 }, // Tyap/Nigeria
+ { 165, 129 } // Chewa/Malawi
+};
+
+const int SUPPORTED_LOCALES_COUNT = sizeof(SUPPORTED_LOCALES)/sizeof(SupportedLocale);
+
+typedef QPair<int, int> IntPair;
+Q_DECLARE_METATYPE(SupportedLocale)
+
+LocaleSelector::LocaleSelector(QWidget *parent)
+ : QComboBox(parent)
+{
+ int curIndex = -1;
+ QLocale curLocale;
+
+ for (int i = 0; i < SUPPORTED_LOCALES_COUNT; ++i) {
+ const SupportedLocale &l = SUPPORTED_LOCALES[i];
+ if (l.lang == curLocale.language() && l.country == curLocale.country())
+ curIndex = i;
+ QString text = QLocale::languageToString(QLocale::Language(l.lang))
+ + QLatin1Char('/')
+ + QLocale::countryToString(QLocale::Country(l.country));
+ addItem(text, qVariantFromValue(l));
+ }
+
+ setCurrentIndex(curIndex);
+
+ connect(this, SIGNAL(activated(int)), this, SLOT(emitLocaleSelected(int)));
+}
+
+void LocaleSelector::emitLocaleSelected(int index)
+{
+ QVariant v = itemData(index);
+ if (!v.isValid())
+ return;
+ SupportedLocale l = qVariantValue<SupportedLocale>(v);
+ emit localeSelected(QLocale(QLocale::Language(l.lang), QLocale::Country(l.country)));
+}
diff --git a/examples/widgets/validators/localeselector.h b/examples/widgets/validators/localeselector.h
new file mode 100644
index 0000000..763b58b
--- /dev/null
+++ b/examples/widgets/validators/localeselector.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LOCALESELECTOR_H
+#define LOCALESELECTOR_H
+
+#include <QComboBox>
+
+class LocaleSelector : public QComboBox
+{
+ Q_OBJECT
+
+public:
+ LocaleSelector(QWidget *parent = 0);
+
+signals:
+ void localeSelected(const QLocale &locale);
+
+private slots:
+ void emitLocaleSelected(int index);
+};
+
+#endif //LOCALESELECTOR_H
diff --git a/examples/widgets/validators/main.cpp b/examples/widgets/validators/main.cpp
new file mode 100644
index 0000000..6822b62
--- /dev/null
+++ b/examples/widgets/validators/main.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qdebug.h>
+#include <QApplication>
+#include <QLineEdit>
+#include <QValidator>
+
+#include "ui_validators.h"
+
+class ValidatorWidget : public QWidget, public Ui::ValidatorsForm
+{
+ Q_OBJECT
+public:
+ ValidatorWidget(QWidget *parent = 0);
+
+private slots:
+ void updateValidator();
+ void updateDoubleValidator();
+ void _setLocale(const QLocale &l) { setLocale(l); updateValidator(); updateDoubleValidator(); }
+
+private:
+ QIntValidator *validator;
+ QDoubleValidator *doubleValidator;
+};
+
+ValidatorWidget::ValidatorWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ connect(localeSelector, SIGNAL(localeSelected(QLocale)), this, SLOT(_setLocale(QLocale)));
+
+ connect(minVal, SIGNAL(editingFinished()), this, SLOT(updateValidator()));
+ connect(maxVal, SIGNAL(editingFinished()), this, SLOT(updateValidator()));
+ connect(editor, SIGNAL(editingFinished()), ledWidget, SLOT(flash()));
+
+ connect(doubleMaxVal, SIGNAL(editingFinished()), this, SLOT(updateDoubleValidator()));
+ connect(doubleMinVal, SIGNAL(editingFinished()), this, SLOT(updateDoubleValidator()));
+ connect(doubleDecimals, SIGNAL(valueChanged(int)), this, SLOT(updateDoubleValidator()));
+ connect(doubleFormat, SIGNAL(activated(int)), this, SLOT(updateDoubleValidator()));
+ connect(doubleEditor, SIGNAL(editingFinished()), doubleLedWidget, SLOT(flash()));
+
+ validator = 0;
+ doubleValidator = 0;
+ updateValidator();
+ updateDoubleValidator();
+};
+
+void ValidatorWidget::updateValidator()
+{
+ QIntValidator *v = new QIntValidator(minVal->value(), maxVal->value(), this);
+ v->setLocale(locale());
+ editor->setValidator(v);
+ delete validator;
+ validator = v;
+
+ QString s = editor->text();
+ int i = 0;
+ if (validator->validate(s, i) == QValidator::Invalid) {
+ editor->clear();
+ } else {
+ editor->setText(s);
+ }
+}
+
+void ValidatorWidget::updateDoubleValidator()
+{
+ QDoubleValidator *v
+ = new QDoubleValidator(doubleMinVal->value(), doubleMaxVal->value(),
+ doubleDecimals->value(), this);
+ v->setNotation(static_cast<QDoubleValidator::Notation>(doubleFormat->currentIndex()));
+ v->setLocale(locale());
+ doubleEditor->setValidator(v);
+ delete doubleValidator;
+ doubleValidator = v;
+
+ QString s = doubleEditor->text();
+ int i = 0;
+ if (doubleValidator->validate(s, i) == QValidator::Invalid) {
+ doubleEditor->clear();
+ } else {
+ doubleEditor->setText(s);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(validators);
+
+ QApplication app(argc, argv);
+
+ ValidatorWidget w;
+ w.show();
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/widgets/validators/validators.pro b/examples/widgets/validators/validators.pro
new file mode 100644
index 0000000..8e7884d
--- /dev/null
+++ b/examples/widgets/validators/validators.pro
@@ -0,0 +1,21 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Tue Nov 28 13:20:04 2006
+######################################################################
+
+TEMPLATE = app
+TARGET = validators
+DEPENDPATH += .
+INCLUDEPATH += .
+
+FORMS += validators.ui
+RESOURCES += validators.qrc
+
+# Input
+SOURCES += main.cpp ledwidget.cpp localeselector.cpp
+HEADERS += ledwidget.h localeselector.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/validators
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/validators
+INSTALLS += target sources
diff --git a/examples/widgets/validators/validators.qrc b/examples/widgets/validators/validators.qrc
new file mode 100644
index 0000000..9487431
--- /dev/null
+++ b/examples/widgets/validators/validators.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>ledoff.png</file>
+ <file>ledon.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/widgets/validators/validators.ui b/examples/widgets/validators/validators.ui
new file mode 100644
index 0000000..f05b96f
--- /dev/null
+++ b/examples/widgets/validators/validators.ui
@@ -0,0 +1,467 @@
+<ui version="4.0" >
+ <class>ValidatorsForm</class>
+ <widget class="QWidget" name="ValidatorsForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>526</width>
+ <height>668</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="LocaleSelector" name="localeSelector" />
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>QIntValidator</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Min:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QSpinBox" name="minVal" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <number>-1000000</number>
+ </property>
+ <property name="maximum" >
+ <number>1000000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Max:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QSpinBox" name="maxVal" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <number>-1000000</number>
+ </property>
+ <property name="maximum" >
+ <number>1000000</number>
+ </property>
+ <property name="value" >
+ <number>1000</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="LEDWidget" name="ledWidget" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="pixmap" >
+ <pixmap resource="validators.qrc" >:/ledoff.png</pixmap>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>editingFinished()</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="editor" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>QDoubleValidator</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Min:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QDoubleSpinBox" name="doubleMinVal" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <double>-100000.000000000000000</double>
+ </property>
+ <property name="maximum" >
+ <double>100000.000000000000000</double>
+ </property>
+ <property name="value" >
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Format:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" >
+ <widget class="QComboBox" name="doubleFormat" >
+ <item>
+ <property name="text" >
+ <string>Standard</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Scientific</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Max:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QDoubleSpinBox" name="doubleMaxVal" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <double>-100000.000000000000000</double>
+ </property>
+ <property name="maximum" >
+ <double>100000.000000000000000</double>
+ </property>
+ <property name="value" >
+ <double>1000.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Decimals:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3" >
+ <widget class="QSpinBox" name="doubleDecimals" >
+ <property name="value" >
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_2" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="LEDWidget" name="doubleLedWidget" >
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="pixmap" >
+ <pixmap resource="validators.qrc" >:/ledoff.png</pixmap>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8" >
+ <property name="text" >
+ <string>editingFinished()</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="doubleEditor" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>111</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton" >
+ <property name="text" >
+ <string>Quit</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>LEDWidget</class>
+ <extends>QLabel</extends>
+ <header>ledwidget.h</header>
+ </customwidget>
+ <customwidget>
+ <class>LocaleSelector</class>
+ <extends>QComboBox</extends>
+ <header>localeselector.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
+ <include location="validators.qrc" />
+ </resources>
+ <connections>
+ <connection>
+ <sender>pushButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ValidatorsForm</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>94</x>
+ <y>274</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>131</x>
+ <y>260</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
new file mode 100644
index 0000000..0af83c7
--- /dev/null
+++ b/examples/widgets/widgets.pro
@@ -0,0 +1,31 @@
+TEMPLATE = subdirs
+SUBDIRS = analogclock \
+ calculator \
+ calendarwidget \
+ charactermap \
+ codeeditor \
+ digitalclock \
+ groupbox \
+ icons \
+ imageviewer \
+ lineedits \
+ movie \
+ scribble \
+ shapedclock \
+ sliders \
+ spinboxes \
+ stylesheet \
+ tablet \
+ tetrix \
+ tooltips \
+ validators \
+ wiggly \
+ windowflags
+
+contains(styles, motif): SUBDIRS += styles
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS widgets.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets
+INSTALLS += target sources
diff --git a/examples/widgets/wiggly/dialog.cpp b/examples/widgets/wiggly/dialog.cpp
new file mode 100644
index 0000000..2f4191d
--- /dev/null
+++ b/examples/widgets/wiggly/dialog.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "dialog.h"
+#include "wigglywidget.h"
+
+//! [0]
+Dialog::Dialog(QWidget *parent)
+ : QDialog(parent)
+{
+ WigglyWidget *wigglyWidget = new WigglyWidget;
+ QLineEdit *lineEdit = new QLineEdit;
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(wigglyWidget);
+ layout->addWidget(lineEdit);
+ setLayout(layout);
+
+ connect(lineEdit, SIGNAL(textChanged(QString)),
+ wigglyWidget, SLOT(setText(QString)));
+
+ lineEdit->setText(tr("Hello world!"));
+
+ setWindowTitle(tr("Wiggly"));
+ resize(360, 145);
+}
+//! [0]
diff --git a/examples/widgets/wiggly/dialog.h b/examples/widgets/wiggly/dialog.h
new file mode 100644
index 0000000..9c209e1
--- /dev/null
+++ b/examples/widgets/wiggly/dialog.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef DIALOG_H
+#define DIALOG_H
+
+#include <QDialog>
+
+//! [0]
+class Dialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ Dialog(QWidget *parent = 0);
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
new file mode 100644
index 0000000..872dce6
--- /dev/null
+++ b/examples/widgets/wiggly/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ Dialog dialog;
+ dialog.show();
+ return app.exec();
+}
diff --git a/examples/widgets/wiggly/wiggly.pro b/examples/widgets/wiggly/wiggly.pro
new file mode 100644
index 0000000..5288dd3
--- /dev/null
+++ b/examples/widgets/wiggly/wiggly.pro
@@ -0,0 +1,11 @@
+HEADERS = wigglywidget.h \
+ dialog.h
+SOURCES = wigglywidget.cpp \
+ dialog.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/wiggly
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wiggly.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/wiggly
+INSTALLS += target sources
diff --git a/examples/widgets/wiggly/wigglywidget.cpp b/examples/widgets/wiggly/wigglywidget.cpp
new file mode 100644
index 0000000..e89fdde
--- /dev/null
+++ b/examples/widgets/wiggly/wigglywidget.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "wigglywidget.h"
+
+//! [0]
+WigglyWidget::WigglyWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setBackgroundRole(QPalette::Midlight);
+ setAutoFillBackground(true);
+
+ QFont newFont = font();
+ newFont.setPointSize(newFont.pointSize() + 20);
+ setFont(newFont);
+
+ step = 0;
+ timer.start(60, this);
+}
+//! [0]
+
+//! [1]
+void WigglyWidget::paintEvent(QPaintEvent * /* event */)
+//! [1] //! [2]
+{
+ static const int sineTable[16] = {
+ 0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38
+ };
+
+ QFontMetrics metrics(font());
+ int x = (width() - metrics.width(text)) / 2;
+ int y = (height() + metrics.ascent() - metrics.descent()) / 2;
+ QColor color;
+//! [2]
+
+//! [3]
+ QPainter painter(this);
+//! [3] //! [4]
+ for (int i = 0; i < text.size(); ++i) {
+ int index = (step + i) % 16;
+ color.setHsv((15 - index) * 16, 255, 191);
+ painter.setPen(color);
+ painter.drawText(x, y - ((sineTable[index] * metrics.height()) / 400),
+ QString(text[i]));
+ x += metrics.width(text[i]);
+ }
+}
+//! [4]
+
+//! [5]
+void WigglyWidget::timerEvent(QTimerEvent *event)
+//! [5] //! [6]
+{
+ if (event->timerId() == timer.timerId()) {
+ ++step;
+ update();
+ } else {
+ QWidget::timerEvent(event);
+ }
+//! [6]
+}
diff --git a/examples/widgets/wiggly/wigglywidget.h b/examples/widgets/wiggly/wigglywidget.h
new file mode 100644
index 0000000..8b6a137
--- /dev/null
+++ b/examples/widgets/wiggly/wigglywidget.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WIGGLYWIDGET_H
+#define WIGGLYWIDGET_H
+
+#include <QBasicTimer>
+#include <QWidget>
+
+//! [0]
+class WigglyWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ WigglyWidget(QWidget *parent = 0);
+
+public slots:
+ void setText(const QString &newText) { text = newText; }
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ void timerEvent(QTimerEvent *event);
+
+private:
+ QBasicTimer timer;
+ QString text;
+ int step;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/windowflags/controllerwindow.cpp b/examples/widgets/windowflags/controllerwindow.cpp
new file mode 100644
index 0000000..075bcb3
--- /dev/null
+++ b/examples/widgets/windowflags/controllerwindow.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "controllerwindow.h"
+
+//! [0]
+ControllerWindow::ControllerWindow()
+{
+ previewWindow = new PreviewWindow(this);
+
+ createTypeGroupBox();
+ createHintsGroupBox();
+
+ quitButton = new QPushButton(tr("&Quit"));
+ connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+ QHBoxLayout *bottomLayout = new QHBoxLayout;
+ bottomLayout->addStretch();
+ bottomLayout->addWidget(quitButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(typeGroupBox);
+ mainLayout->addWidget(hintsGroupBox);
+ mainLayout->addLayout(bottomLayout);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Window Flags"));
+ updatePreview();
+}
+//! [0]
+
+//! [1]
+void ControllerWindow::updatePreview()
+{
+ Qt::WindowFlags flags = 0;
+
+ if (windowRadioButton->isChecked()) {
+ flags = Qt::Window;
+ } else if (dialogRadioButton->isChecked()) {
+ flags = Qt::Dialog;
+ } else if (sheetRadioButton->isChecked()) {
+ flags = Qt::Sheet;
+ } else if (drawerRadioButton->isChecked()) {
+ flags = Qt::Drawer;
+ } else if (popupRadioButton->isChecked()) {
+ flags = Qt::Popup;
+ } else if (toolRadioButton->isChecked()) {
+ flags = Qt::Tool;
+ } else if (toolTipRadioButton->isChecked()) {
+ flags = Qt::ToolTip;
+ } else if (splashScreenRadioButton->isChecked()) {
+ flags = Qt::SplashScreen;
+//! [1] //! [2]
+ }
+//! [2] //! [3]
+
+ if (msWindowsFixedSizeDialogCheckBox->isChecked())
+ flags |= Qt::MSWindowsFixedSizeDialogHint;
+ if (x11BypassWindowManagerCheckBox->isChecked())
+ flags |= Qt::X11BypassWindowManagerHint;
+ if (framelessWindowCheckBox->isChecked())
+ flags |= Qt::FramelessWindowHint;
+ if (windowTitleCheckBox->isChecked())
+ flags |= Qt::WindowTitleHint;
+ if (windowSystemMenuCheckBox->isChecked())
+ flags |= Qt::WindowSystemMenuHint;
+ if (windowMinimizeButtonCheckBox->isChecked())
+ flags |= Qt::WindowMinimizeButtonHint;
+ if (windowMaximizeButtonCheckBox->isChecked())
+ flags |= Qt::WindowMaximizeButtonHint;
+ if (windowCloseButtonCheckBox->isChecked())
+ flags |= Qt::WindowCloseButtonHint;
+ if (windowContextHelpButtonCheckBox->isChecked())
+ flags |= Qt::WindowContextHelpButtonHint;
+ if (windowShadeButtonCheckBox->isChecked())
+ flags |= Qt::WindowShadeButtonHint;
+ if (windowStaysOnTopCheckBox->isChecked())
+ flags |= Qt::WindowStaysOnTopHint;
+ if (windowStaysOnBottomCheckBox->isChecked())
+ flags |= Qt::WindowStaysOnBottomHint;
+ if (customizeWindowHintCheckBox->isChecked())
+ flags |= Qt::CustomizeWindowHint;
+
+ previewWindow->setWindowFlags(flags);
+//! [3] //! [4]
+
+ QPoint pos = previewWindow->pos();
+ if (pos.x() < 0)
+ pos.setX(0);
+ if (pos.y() < 0)
+ pos.setY(0);
+ previewWindow->move(pos);
+ previewWindow->show();
+}
+//! [4]
+
+//! [5]
+void ControllerWindow::createTypeGroupBox()
+{
+ typeGroupBox = new QGroupBox(tr("Type"));
+
+ windowRadioButton = createRadioButton(tr("Window"));
+ dialogRadioButton = createRadioButton(tr("Dialog"));
+ sheetRadioButton = createRadioButton(tr("Sheet"));
+ drawerRadioButton = createRadioButton(tr("Drawer"));
+ popupRadioButton = createRadioButton(tr("Popup"));
+ toolRadioButton = createRadioButton(tr("Tool"));
+ toolTipRadioButton = createRadioButton(tr("Tooltip"));
+ splashScreenRadioButton = createRadioButton(tr("Splash screen"));
+ windowRadioButton->setChecked(true);
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(windowRadioButton, 0, 0);
+ layout->addWidget(dialogRadioButton, 1, 0);
+ layout->addWidget(sheetRadioButton, 2, 0);
+ layout->addWidget(drawerRadioButton, 3, 0);
+ layout->addWidget(popupRadioButton, 0, 1);
+ layout->addWidget(toolRadioButton, 1, 1);
+ layout->addWidget(toolTipRadioButton, 2, 1);
+ layout->addWidget(splashScreenRadioButton, 3, 1);
+ typeGroupBox->setLayout(layout);
+}
+//! [5]
+
+//! [6]
+void ControllerWindow::createHintsGroupBox()
+{
+ hintsGroupBox = new QGroupBox(tr("Hints"));
+
+ msWindowsFixedSizeDialogCheckBox =
+ createCheckBox(tr("MS Windows fixed size dialog"));
+ x11BypassWindowManagerCheckBox =
+ createCheckBox(tr("X11 bypass window manager"));
+ framelessWindowCheckBox = createCheckBox(tr("Frameless window"));
+ windowTitleCheckBox = createCheckBox(tr("Window title"));
+ windowSystemMenuCheckBox = createCheckBox(tr("Window system menu"));
+ windowMinimizeButtonCheckBox = createCheckBox(tr("Window minimize button"));
+ windowMaximizeButtonCheckBox = createCheckBox(tr("Window maximize button"));
+ windowCloseButtonCheckBox = createCheckBox(tr("Window close button"));
+ windowContextHelpButtonCheckBox =
+ createCheckBox(tr("Window context help button"));
+ windowShadeButtonCheckBox = createCheckBox(tr("Window shade button"));
+ windowStaysOnTopCheckBox = createCheckBox(tr("Window stays on top"));
+ windowStaysOnBottomCheckBox = createCheckBox(tr("Window stays on bottom"));
+ customizeWindowHintCheckBox= createCheckBox(tr("Customize window"));
+
+ QGridLayout *layout = new QGridLayout;
+ layout->addWidget(msWindowsFixedSizeDialogCheckBox, 0, 0);
+ layout->addWidget(x11BypassWindowManagerCheckBox, 1, 0);
+ layout->addWidget(framelessWindowCheckBox, 2, 0);
+ layout->addWidget(windowTitleCheckBox, 3, 0);
+ layout->addWidget(windowSystemMenuCheckBox, 4, 0);
+ layout->addWidget(windowMinimizeButtonCheckBox, 0, 1);
+ layout->addWidget(windowMaximizeButtonCheckBox, 1, 1);
+ layout->addWidget(windowCloseButtonCheckBox, 2, 1);
+ layout->addWidget(windowContextHelpButtonCheckBox, 3, 1);
+ layout->addWidget(windowShadeButtonCheckBox, 4, 1);
+ layout->addWidget(windowStaysOnTopCheckBox, 5, 1);
+ layout->addWidget(windowStaysOnBottomCheckBox, 6, 1);
+ layout->addWidget(customizeWindowHintCheckBox, 5, 0);
+ hintsGroupBox->setLayout(layout);
+}
+//! [6]
+
+//! [7]
+QCheckBox *ControllerWindow::createCheckBox(const QString &text)
+{
+ QCheckBox *checkBox = new QCheckBox(text);
+ connect(checkBox, SIGNAL(clicked()), this, SLOT(updatePreview()));
+ return checkBox;
+}
+//! [7]
+
+//! [8]
+QRadioButton *ControllerWindow::createRadioButton(const QString &text)
+{
+ QRadioButton *button = new QRadioButton(text);
+ connect(button, SIGNAL(clicked()), this, SLOT(updatePreview()));
+ return button;
+}
+//! [8]
diff --git a/examples/widgets/windowflags/controllerwindow.h b/examples/widgets/windowflags/controllerwindow.h
new file mode 100644
index 0000000..467ab7d
--- /dev/null
+++ b/examples/widgets/windowflags/controllerwindow.h
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTROLLERWINDOW_H
+#define CONTROLLERWINDOW_H
+
+#include <QWidget>
+
+#include "previewwindow.h"
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QRadioButton;
+QT_END_NAMESPACE
+
+//! [0]
+class ControllerWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ControllerWindow();
+
+private slots:
+ void updatePreview();
+
+private:
+ void createTypeGroupBox();
+ void createHintsGroupBox();
+ QCheckBox *createCheckBox(const QString &text);
+ QRadioButton *createRadioButton(const QString &text);
+
+ PreviewWindow *previewWindow;
+
+ QGroupBox *typeGroupBox;
+ QGroupBox *hintsGroupBox;
+ QPushButton *quitButton;
+
+ QRadioButton *windowRadioButton;
+ QRadioButton *dialogRadioButton;
+ QRadioButton *sheetRadioButton;
+ QRadioButton *drawerRadioButton;
+ QRadioButton *popupRadioButton;
+ QRadioButton *toolRadioButton;
+ QRadioButton *toolTipRadioButton;
+ QRadioButton *splashScreenRadioButton;
+
+ QCheckBox *msWindowsFixedSizeDialogCheckBox;
+ QCheckBox *x11BypassWindowManagerCheckBox;
+ QCheckBox *framelessWindowCheckBox;
+ QCheckBox *windowTitleCheckBox;
+ QCheckBox *windowSystemMenuCheckBox;
+ QCheckBox *windowMinimizeButtonCheckBox;
+ QCheckBox *windowMaximizeButtonCheckBox;
+ QCheckBox *windowCloseButtonCheckBox;
+ QCheckBox *windowContextHelpButtonCheckBox;
+ QCheckBox *windowShadeButtonCheckBox;
+ QCheckBox *windowStaysOnTopCheckBox;
+ QCheckBox *windowStaysOnBottomCheckBox;
+ QCheckBox *customizeWindowHintCheckBox;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/windowflags/main.cpp b/examples/widgets/windowflags/main.cpp
new file mode 100644
index 0000000..338da56
--- /dev/null
+++ b/examples/widgets/windowflags/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "controllerwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ControllerWindow controller;
+ controller.show();
+ return app.exec();
+}
diff --git a/examples/widgets/windowflags/previewwindow.cpp b/examples/widgets/windowflags/previewwindow.cpp
new file mode 100644
index 0000000..6fbd654
--- /dev/null
+++ b/examples/widgets/windowflags/previewwindow.cpp
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "previewwindow.h"
+
+//! [0]
+PreviewWindow::PreviewWindow(QWidget *parent)
+ : QWidget(parent)
+{
+ textEdit = new QTextEdit;
+ textEdit->setReadOnly(true);
+ textEdit->setLineWrapMode(QTextEdit::NoWrap);
+
+ closeButton = new QPushButton(tr("&Close"));
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(textEdit);
+ layout->addWidget(closeButton);
+ setLayout(layout);
+
+ setWindowTitle(tr("Preview"));
+}
+//! [0]
+
+//! [1]
+void PreviewWindow::setWindowFlags(Qt::WindowFlags flags)
+{
+ QWidget::setWindowFlags(flags);
+
+ QString text;
+
+ Qt::WindowFlags type = (flags & Qt::WindowType_Mask);
+ if (type == Qt::Window) {
+ text = "Qt::Window";
+ } else if (type == Qt::Dialog) {
+ text = "Qt::Dialog";
+ } else if (type == Qt::Sheet) {
+ text = "Qt::Sheet";
+ } else if (type == Qt::Drawer) {
+ text = "Qt::Drawer";
+ } else if (type == Qt::Popup) {
+ text = "Qt::Popup";
+ } else if (type == Qt::Tool) {
+ text = "Qt::Tool";
+ } else if (type == Qt::ToolTip) {
+ text = "Qt::ToolTip";
+ } else if (type == Qt::SplashScreen) {
+ text = "Qt::SplashScreen";
+ }
+
+ if (flags & Qt::MSWindowsFixedSizeDialogHint)
+ text += "\n| Qt::MSWindowsFixedSizeDialogHint";
+ if (flags & Qt::X11BypassWindowManagerHint)
+ text += "\n| Qt::X11BypassWindowManagerHint";
+ if (flags & Qt::FramelessWindowHint)
+ text += "\n| Qt::FramelessWindowHint";
+ if (flags & Qt::WindowTitleHint)
+ text += "\n| Qt::WindowTitleHint";
+ if (flags & Qt::WindowSystemMenuHint)
+ text += "\n| Qt::WindowSystemMenuHint";
+ if (flags & Qt::WindowMinimizeButtonHint)
+ text += "\n| Qt::WindowMinimizeButtonHint";
+ if (flags & Qt::WindowMaximizeButtonHint)
+ text += "\n| Qt::WindowMaximizeButtonHint";
+ if (flags & Qt::WindowCloseButtonHint)
+ text += "\n| Qt::WindowCloseButtonHint";
+ if (flags & Qt::WindowContextHelpButtonHint)
+ text += "\n| Qt::WindowContextHelpButtonHint";
+ if (flags & Qt::WindowShadeButtonHint)
+ text += "\n| Qt::WindowShadeButtonHint";
+ if (flags & Qt::WindowStaysOnTopHint)
+ text += "\n| Qt::WindowStaysOnTopHint";
+ if (flags & Qt::CustomizeWindowHint)
+ text += "\n| Qt::CustomizeWindowHint";
+
+ textEdit->setPlainText(text);
+}
+//! [1]
diff --git a/examples/widgets/windowflags/previewwindow.h b/examples/widgets/windowflags/previewwindow.h
new file mode 100644
index 0000000..22ec649
--- /dev/null
+++ b/examples/widgets/windowflags/previewwindow.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PREVIEWWINDOW_H
+#define PREVIEWWINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QPushButton;
+class QTextEdit;
+QT_END_NAMESPACE
+
+//! [0]
+class PreviewWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PreviewWindow(QWidget *parent = 0);
+
+ void setWindowFlags(Qt::WindowFlags flags);
+
+private:
+ QTextEdit *textEdit;
+ QPushButton *closeButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/widgets/windowflags/windowflags.pro b/examples/widgets/windowflags/windowflags.pro
new file mode 100644
index 0000000..fa8a567
--- /dev/null
+++ b/examples/widgets/windowflags/windowflags.pro
@@ -0,0 +1,11 @@
+HEADERS = controllerwindow.h \
+ previewwindow.h
+SOURCES = controllerwindow.cpp \
+ previewwindow.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/windowflags
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowflags.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/widgets/windowflags
+INSTALLS += target sources
diff --git a/examples/xml/README b/examples/xml/README
new file mode 100644
index 0000000..a6d81bb
--- /dev/null
+++ b/examples/xml/README
@@ -0,0 +1,40 @@
+XML parsing and handling is supported through SAX and DOM compliant APIs.
+
+Qt's SAX compliant classes allow you to parse XML incrementally; the DOM
+classes enable more complex document-level operations to be performed on
+XML files.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro
new file mode 100644
index 0000000..e55754f
--- /dev/null
+++ b/examples/xml/dombookmarks/dombookmarks.pro
@@ -0,0 +1,18 @@
+HEADERS = mainwindow.h \
+ xbeltree.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xbeltree.cpp
+QT += xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dombookmarks.pro *.xbel
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks
+INSTALLS += target sources
+
+wince*: {
+ addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.path = \My Documents
+ DEPLOYMENT += addFiles
+}
diff --git a/examples/xml/dombookmarks/frank.xbel b/examples/xml/dombookmarks/frank.xbel
new file mode 100644
index 0000000..d6a12c6
--- /dev/null
+++ b/examples/xml/dombookmarks/frank.xbel
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="yes">
+ <title>Literate Programming</title>
+ <bookmark href="http://www.vivtek.com/litprog.html">
+ <title>Synopsis of Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
+ <title>Literate Programming: Propaganda and Tools</title>
+ </bookmark>
+ <bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
+ <title>Literate Programming by Henrik Turbell</title>
+ </bookmark>
+ <bookmark href="http://www.desy.de/user/projects/LitProg.html">
+ <title>Literate Programming Library</title>
+ </bookmark>
+ <bookmark href="http://www.loria.fr/services/tex/english/litte.html">
+ <title>Literate Programming Basics</title>
+ </bookmark>
+ <bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
+ <title>Literate Programming Overview</title>
+ </bookmark>
+ <bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
+ <title>POD is not Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
+ <title>Computers That We Can Count On</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
+ <title>Literate Programming - Issues and Problems</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
+ <title>Literate Programming - Wiki Pages</title>
+ </bookmark>
+ <bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
+ <title>What is well-commented code?</title>
+ </bookmark>
+ <bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
+ <title>Bibliography on literate programming - A searchable bibliography</title>
+ </bookmark>
+ <bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
+ <title>Program comprehension and code reading bibliography</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
+ <title>Elucidative Programming</title>
+ </bookmark>
+ <bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
+ <title>AVL Trees (TexiWeb)</title>
+ </bookmark>
+ <bookmark href="http://literate-programming.wikiverse.org/">
+ <title>Literate Programming on Wikiverse</title>
+ </bookmark>
+ <bookmark href="http://www.pbrt.org/">
+ <title>Physically Based Rendering: From Theory to Implementation</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Useful C++ Links</title>
+ <folder folded="no">
+ <title>STL</title>
+ <bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
+ <title>STL Reference Documentation</title>
+ </bookmark>
+ <bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
+ <title>STL Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.cppreference.com/cpp_stl.html">
+ <title>STL Reference</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Qt</title>
+ <bookmark href="http://doc.trolltech.com/2.3/">
+ <title>Qt 2.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/3.3/">
+ <title>Qt 3.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 Reference</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech Home Page</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>IOStreams</title>
+ <bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
+ <title>IO Stream Library</title>
+ </bookmark>
+ <bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
+ <title>Binary I/O</title>
+ </bookmark>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
+ <title>I/O Stream FAQ</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>gdb</title>
+ <bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
+ <title>GDB Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
+ <title>Debugging with GDB</title>
+ </bookmark>
+ <bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
+ <title>GDB Quick Reference Page (PDF) (Handy)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Classes and Constructors</title>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
+ <title>Constructor FAQ</title>
+ </bookmark>
+ <bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
+ <title>Organizing Classes</title>
+ </bookmark>
+ </folder>
+ </folder>
+ <folder folded="yes">
+ <title>Software Documentation or System Documentation</title>
+ <bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
+ <title>The Almighty Thud</title>
+ </bookmark>
+ <bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
+ <title>Microsoft Coding Techniques and Programming Practices</title>
+ </bookmark>
+ <bookmark href="http://www.bearcave.com/software/prog_docs.html">
+ <title>Software and Documentation</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
+ <title>The Source Code is the Design</title>
+ </bookmark>
+ <bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
+ <title>What is Software Design?</title>
+ </bookmark>
+ <bookmark href="http://www.mindprod.com/unmain.html">
+ <title>How To Write Unmaintainable Code</title>
+ </bookmark>
+ <bookmark href="http://www.idinews.com/selfDoc.html">
+ <title>Self Documenting Program Code Remains a Distant Goal</title>
+ </bookmark>
+ <bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
+ <title>Place Tab A in Slot B</title>
+ </bookmark>
+ <bookmark href="http://www.holub.com/class/uml/uml.html">
+ <title>UML Reference Card</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>TeX Resources</title>
+ <bookmark href="http://www.tug.org/">
+ <title>The TeX User's Group</title>
+ </bookmark>
+ <bookmark href="http://www.miktex.org/">
+ <title>MikTeX website</title>
+ </bookmark>
+ <bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
+ <title>MetaPost website</title>
+ </bookmark>
+ <bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
+ <title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Portable Document Format (PDF)</title>
+ <bookmark href="http://www.adobe.com/">
+ <title>Adobe - The postscript and PDF standards</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
+ <title>Reference Manual Portable Document Format</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
+ <title>Adobe Acrobat Software Development Kit</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Literature Sites</title>
+ <bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
+ <title>Guide to Special Collections (Columbia University)</title>
+ </bookmark>
+ <bookmark href="http://www.ipl.org/ref/litcrit/">
+ <title>Literary Criticism on the Web from the Internet Public Library</title>
+ </bookmark>
+ <bookmark href="http://www.victorianweb.org/">
+ <title>Victorian Web.</title>
+ </bookmark>
+ <bookmark href="http://vos.ucsb.edu/">
+ <title>Voice of the Shuttle.</title>
+ </bookmark>
+ <bookmark href="http://www.modjourn.brown.edu/">
+ <title>Modernist Journals Project</title>
+ </bookmark>
+ <bookmark href="http://www.poetspath.com">
+ <title>Museum of American Poetics</title>
+ </bookmark>
+ <bookmark href="http://www.english.uiuc.edu/maps/">
+ <title>Modern American Poetry</title>
+ </bookmark>
+ <bookmark href="http://www.findarticles.com/">
+ <title>FindArticles.com</title>
+ </bookmark>
+ <bookmark href="http://www.literaryhistory.com">
+ <title>Literary History</title>
+ </bookmark>
+ <bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
+ <title>Literary Encyclopedia</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://texts.cdlib.org/ucpress/">
+ <title>The University of California Press</title>
+ </bookmark>
+ <bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
+ <title>Wright American Fiction, 1851-1875</title>
+ </bookmark>
+ <bookmark href="http://docsouth.unc.edu/">
+ <title>Documenting the American South: Beginnings to 1920</title>
+ </bookmark>
+ <bookmark href="http://etext.lib.virginia.edu/eng-on.html">
+ <title>Electronic Text Center at the University of Virginia</title>
+ </bookmark>
+ <bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
+ <title>The Schomburg Center for Research in Black Culture</title>
+ </bookmark>
+ <bookmark href="http://www.infomotions.com/alex2/">
+ <title>Alex Catalogue of Electronic Texts.</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/dombookmarks/jennifer.xbel b/examples/xml/dombookmarks/jennifer.xbel
new file mode 100644
index 0000000..597880a
--- /dev/null
+++ b/examples/xml/dombookmarks/jennifer.xbel
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="no">
+ <title>Qt Resources</title>
+ <folder folded="yes">
+ <title>Trolltech Partners</title>
+ <bookmark href="http://partners.trolltech.com/partners/training.html">
+ <title>Training Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/service.html">
+ <title>Consultants and System Integrators</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/tech.html">
+ <title>Technology Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/resellers.html">
+ <title>Value Added Resellers (VARs)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Community Resources</title>
+ <bookmark href="http://www.qtforum.org/">
+ <title>QtForum.org</title>
+ </bookmark>
+ <bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
+ <title>The Independent Qt Tutorial</title>
+ </bookmark>
+ <bookmark href="http://prog.qt.free.fr/">
+ <title>French PROG.Qt</title>
+ </bookmark>
+ <bookmark href="http://www.qtforum.de/">
+ <title>German Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://www.korone.net/">
+ <title>Korean Qt Community Site</title>
+ </bookmark>
+ <bookmark href="http://prog.org.ru/forum/forum_14.html">
+ <title>Russian Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://qt4.digitalfanatics.org/">
+ <title>Digitalfanatics: The QT 4 Resource Center</title>
+ </bookmark>
+ <bookmark href="http://www.qtquestions.org/">
+ <title>QtQuestions</title>
+ </bookmark>
+ </folder>
+ <bookmark href="http://doc.trolltech.com/qq/">
+ <title>Qt Quarterly</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech's home page</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 documentation</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/developer/faqs/">
+ <title>Frequently Asked Questions</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Online Dictionaries</title>
+ <bookmark href="http://www.dictionary.com/">
+ <title>Dictionary.com</title>
+ </bookmark>
+ <bookmark href="http://www.m-w.com/">
+ <title>Merriam-Webster Online</title>
+ </bookmark>
+ <bookmark href="http://dictionary.cambridge.org/">
+ <title>Cambridge Dictionaries Online</title>
+ </bookmark>
+ <bookmark href="http://www.onelook.com/">
+ <title>OneLook Dictionary Search</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="www.iee.et.tu-dresden.de/">
+ <title>The New English-German Dictionary</title>
+ </bookmark>
+ <bookmark href="http://dict.tu-chemnitz.de/">
+ <title>TU Chemnitz German-English Dictionary</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://atilf.atilf.fr/tlf.htm">
+ <title>Trésor de la Langue Française informatisé</title>
+ </bookmark>
+ <bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
+ <title>Dictionnaire de l'Académie Française</title>
+ </bookmark>
+ <bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
+ <title>Dictionnaire des synonymes</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/dombookmarks/main.cpp b/examples/xml/dombookmarks/main.cpp
new file mode 100644
index 0000000..3f0a207
--- /dev/null
+++ b/examples/xml/dombookmarks/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ mainWin.open();
+ return app.exec();
+}
diff --git a/examples/xml/dombookmarks/mainwindow.cpp b/examples/xml/dombookmarks/mainwindow.cpp
new file mode 100644
index 0000000..6b0c101
--- /dev/null
+++ b/examples/xml/dombookmarks/mainwindow.cpp
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xbeltree.h"
+
+MainWindow::MainWindow()
+{
+ xbelTree = new XbelTree;
+ setCentralWidget(xbelTree);
+
+ createActions();
+ createMenus();
+
+ statusBar()->showMessage(tr("Ready"));
+
+ setWindowTitle(tr("DOM Bookmarks"));
+ resize(480, 320);
+}
+
+void MainWindow::open()
+{
+ QString fileName =
+ QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SAX Bookmarks"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ if (xbelTree->read(&file))
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+
+void MainWindow::saveAs()
+{
+ QString fileName =
+ QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SAX Bookmarks"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ if (xbelTree->write(&file))
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About DOM Bookmarks"),
+ tr("The <b>DOM Bookmarks</b> example demonstrates how to "
+ "use Qt's DOM classes to read and write XML "
+ "documents."));
+}
+
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAsAct = new QAction(tr("&Save As..."), this);
+ saveAsAct->setShortcut(tr("Ctrl+S"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
diff --git a/examples/xml/dombookmarks/mainwindow.h b/examples/xml/dombookmarks/mainwindow.h
new file mode 100644
index 0000000..cf30a3e
--- /dev/null
+++ b/examples/xml/dombookmarks/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class XbelTree;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void open();
+ void saveAs();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+
+ XbelTree *xbelTree;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *openAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/xml/dombookmarks/xbeltree.cpp b/examples/xml/dombookmarks/xbeltree.cpp
new file mode 100644
index 0000000..37e8bb2
--- /dev/null
+++ b/examples/xml/dombookmarks/xbeltree.cpp
@@ -0,0 +1,187 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xbeltree.h"
+
+XbelTree::XbelTree(QWidget *parent)
+ : QTreeWidget(parent)
+{
+ QStringList labels;
+ labels << tr("Title") << tr("Location");
+
+ header()->setResizeMode(QHeaderView::Stretch);
+ setHeaderLabels(labels);
+
+ folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirClosedIcon),
+ QIcon::Normal, QIcon::Off);
+ folderIcon.addPixmap(style()->standardPixmap(QStyle::SP_DirOpenIcon),
+ QIcon::Normal, QIcon::On);
+ bookmarkIcon.addPixmap(style()->standardPixmap(QStyle::SP_FileIcon));
+}
+
+bool XbelTree::read(QIODevice *device)
+{
+ QString errorStr;
+ int errorLine;
+ int errorColumn;
+
+ if (!domDocument.setContent(device, true, &errorStr, &errorLine,
+ &errorColumn)) {
+ QMessageBox::information(window(), tr("DOM Bookmarks"),
+ tr("Parse error at line %1, column %2:\n%3")
+ .arg(errorLine)
+ .arg(errorColumn)
+ .arg(errorStr));
+ return false;
+ }
+
+ QDomElement root = domDocument.documentElement();
+ if (root.tagName() != "xbel") {
+ QMessageBox::information(window(), tr("DOM Bookmarks"),
+ tr("The file is not an XBEL file."));
+ return false;
+ } else if (root.hasAttribute("version")
+ && root.attribute("version") != "1.0") {
+ QMessageBox::information(window(), tr("DOM Bookmarks"),
+ tr("The file is not an XBEL version 1.0 "
+ "file."));
+ return false;
+ }
+
+ clear();
+
+ disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+ this, SLOT(updateDomElement(QTreeWidgetItem *, int)));
+
+ QDomElement child = root.firstChildElement("folder");
+ while (!child.isNull()) {
+ parseFolderElement(child);
+ child = child.nextSiblingElement("folder");
+ }
+
+ connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)),
+ this, SLOT(updateDomElement(QTreeWidgetItem *, int)));
+
+ return true;
+}
+
+bool XbelTree::write(QIODevice *device)
+{
+ const int IndentSize = 4;
+
+ QTextStream out(device);
+ domDocument.save(out, IndentSize);
+ return true;
+}
+
+void XbelTree::updateDomElement(QTreeWidgetItem *item, int column)
+{
+ QDomElement element = domElementForItem.value(item);
+ if (!element.isNull()) {
+ if (column == 0) {
+ QDomElement oldTitleElement = element.firstChildElement("title");
+ QDomElement newTitleElement = domDocument.createElement("title");
+
+ QDomText newTitleText = domDocument.createTextNode(item->text(0));
+ newTitleElement.appendChild(newTitleText);
+
+ element.replaceChild(newTitleElement, oldTitleElement);
+ } else {
+ if (element.tagName() == "bookmark")
+ element.setAttribute("href", item->text(1));
+ }
+ }
+}
+
+void XbelTree::parseFolderElement(const QDomElement &element,
+ QTreeWidgetItem *parentItem)
+{
+ QTreeWidgetItem *item = createItem(element, parentItem);
+
+ QString title = element.firstChildElement("title").text();
+ if (title.isEmpty())
+ title = QObject::tr("Folder");
+
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
+ item->setIcon(0, folderIcon);
+ item->setText(0, title);
+
+ bool folded = (element.attribute("folded") != "no");
+ setItemExpanded(item, !folded);
+
+ QDomElement child = element.firstChildElement();
+ while (!child.isNull()) {
+ if (child.tagName() == "folder") {
+ parseFolderElement(child, item);
+ } else if (child.tagName() == "bookmark") {
+ QTreeWidgetItem *childItem = createItem(child, item);
+
+ QString title = child.firstChildElement("title").text();
+ if (title.isEmpty())
+ title = QObject::tr("Folder");
+
+ childItem->setFlags(item->flags() | Qt::ItemIsEditable);
+ childItem->setIcon(0, bookmarkIcon);
+ childItem->setText(0, title);
+ childItem->setText(1, child.attribute("href"));
+ } else if (child.tagName() == "separator") {
+ QTreeWidgetItem *childItem = createItem(child, item);
+ childItem->setFlags(item->flags() & ~(Qt::ItemIsSelectable | Qt::ItemIsEditable));
+ childItem->setText(0, QString(30, 0xB7));
+ }
+ child = child.nextSiblingElement();
+ }
+}
+
+QTreeWidgetItem *XbelTree::createItem(const QDomElement &element,
+ QTreeWidgetItem *parentItem)
+{
+ QTreeWidgetItem *item;
+ if (parentItem) {
+ item = new QTreeWidgetItem(parentItem);
+ } else {
+ item = new QTreeWidgetItem(this);
+ }
+ domElementForItem.insert(item, element);
+ return item;
+}
diff --git a/examples/xml/dombookmarks/xbeltree.h b/examples/xml/dombookmarks/xbeltree.h
new file mode 100644
index 0000000..4f2d304
--- /dev/null
+++ b/examples/xml/dombookmarks/xbeltree.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELTREE_H
+#define XBELTREE_H
+
+#include <QDomDocument>
+#include <QHash>
+#include <QIcon>
+#include <QTreeWidget>
+
+class XbelTree : public QTreeWidget
+{
+ Q_OBJECT
+
+public:
+ XbelTree(QWidget *parent = 0);
+
+ bool read(QIODevice *device);
+ bool write(QIODevice *device);
+
+private slots:
+ void updateDomElement(QTreeWidgetItem *item, int column);
+
+private:
+ void parseFolderElement(const QDomElement &element,
+ QTreeWidgetItem *parentItem = 0);
+ QTreeWidgetItem *createItem(const QDomElement &element,
+ QTreeWidgetItem *parentItem = 0);
+
+ QDomDocument domDocument;
+ QHash<QTreeWidgetItem *, QDomElement> domElementForItem;
+ QIcon folderIcon;
+ QIcon bookmarkIcon;
+};
+
+#endif
diff --git a/examples/xml/rsslisting/main.cpp b/examples/xml/rsslisting/main.cpp
new file mode 100644
index 0000000..0c9b275
--- /dev/null
+++ b/examples/xml/rsslisting/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+main.cpp
+
+Provides the main function for the RSS news reader example.
+*/
+
+#include <QtGui>
+
+#include "rsslisting.h"
+
+/*!
+ Create an application and a main widget. Open the main widget for
+ user input, and exit with an appropriate return value when it is
+ closed.
+*/
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ RSSListing *rsslisting = new RSSListing;
+ rsslisting->show();
+ return app.exec();
+}
diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp
new file mode 100644
index 0000000..9212c11
--- /dev/null
+++ b/examples/xml/rsslisting/rsslisting.cpp
@@ -0,0 +1,239 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+rsslisting.cpp
+
+Provides a widget for displaying news items from RDF news sources.
+RDF is an XML-based format for storing items of information (see
+http://www.w3.org/RDF/ for details).
+
+The widget itself provides a simple user interface for specifying
+the URL of a news source, and controlling the downloading of news.
+
+The widget downloads and parses the XML asynchronously, feeding the
+data to an XML reader in pieces. This allows the user to interrupt
+its operation, and also allows very large data sources to be read.
+*/
+
+
+#include <QtCore>
+#include <QtGui>
+#include <QtNetwork>
+
+#include "rsslisting.h"
+
+
+/*
+ Constructs an RSSListing widget with a simple user interface, and sets
+ up the XML reader to use a custom handler class.
+
+ The user interface consists of a line edit, two push buttons, and a
+ list view widget. The line edit is used for entering the URLs of news
+ sources; the push buttons start and abort the process of reading the
+ news.
+*/
+
+RSSListing::RSSListing(QWidget *parent)
+ : QWidget(parent)
+{
+ lineEdit = new QLineEdit(this);
+ lineEdit->setText("http://labs.trolltech.com/blogs/feed");
+
+ fetchButton = new QPushButton(tr("Fetch"), this);
+ abortButton = new QPushButton(tr("Abort"), this);
+ abortButton->setEnabled(false);
+
+ treeWidget = new QTreeWidget(this);
+ connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*, int)),
+ this, SLOT(itemActivated(QTreeWidgetItem*)));
+ QStringList headerLabels;
+ headerLabels << tr("Title") << tr("Link");
+ treeWidget->setHeaderLabels(headerLabels);
+ treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
+
+ connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)),
+ this, SLOT(readData(const QHttpResponseHeader &)));
+
+ connect(&http, SIGNAL(requestFinished(int, bool)),
+ this, SLOT(finished(int, bool)));
+
+ connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch()));
+ connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch()));
+ connect(abortButton, SIGNAL(clicked()), &http, SLOT(abort()));
+
+ QVBoxLayout *layout = new QVBoxLayout(this);
+
+ QHBoxLayout *hboxLayout = new QHBoxLayout;
+
+ hboxLayout->addWidget(lineEdit);
+ hboxLayout->addWidget(fetchButton);
+ hboxLayout->addWidget(abortButton);
+
+ layout->addLayout(hboxLayout);
+ layout->addWidget(treeWidget);
+
+ setWindowTitle(tr("RSS listing example"));
+ resize(640,480);
+}
+
+/*
+ Starts fetching data from a news source specified in the line
+ edit widget.
+
+ The line edit is made read only to prevent the user from modifying its
+ contents during the fetch; this is only for cosmetic purposes.
+ The fetch button is disabled, and the abort button is enabled to allow
+ the user to interrupt processing. The list view is cleared, and we
+ define the last list view item to be 0, meaning that there are no
+ existing items in the list.
+
+ The HTTP handler is supplied with the raw contents of the line edit and
+ a fetch is initiated. We keep the ID value returned by the HTTP handler
+ for future reference.
+*/
+
+void RSSListing::fetch()
+{
+ lineEdit->setReadOnly(true);
+ fetchButton->setEnabled(false);
+ abortButton->setEnabled(true);
+ treeWidget->clear();
+
+ xml.clear();
+
+ QUrl url(lineEdit->text());
+
+ http.setHost(url.host());
+ connectionId = http.get(url.path());
+}
+
+/*
+ Reads data received from the RDF source.
+
+ We read all the available data, and pass it to the XML
+ stream reader. Then we call the XML parsing function.
+
+ If parsing fails for any reason, we abort the fetch.
+*/
+
+void RSSListing::readData(const QHttpResponseHeader &resp)
+{
+ if (resp.statusCode() != 200)
+ http.abort();
+ else {
+ xml.addData(http.readAll());
+ parseXml();
+ }
+}
+
+/*
+ Finishes processing an HTTP request.
+
+ The default behavior is to keep the text edit read only.
+
+ If an error has occurred, the user interface is made available
+ to the user for further input, allowing a new fetch to be
+ started.
+
+ If the HTTP get request has finished, we make the
+ user interface available to the user for further input.
+*/
+
+void RSSListing::finished(int id, bool error)
+{
+ if (error) {
+ qWarning("Received error during HTTP fetch.");
+ lineEdit->setReadOnly(false);
+ abortButton->setEnabled(false);
+ fetchButton->setEnabled(true);
+ }
+ else if (id == connectionId) {
+ lineEdit->setReadOnly(false);
+ abortButton->setEnabled(false);
+ fetchButton->setEnabled(true);
+ }
+}
+
+
+/*
+ Parses the XML data and creates treeWidget items accordingly.
+*/
+void RSSListing::parseXml()
+{
+ while (!xml.atEnd()) {
+ xml.readNext();
+ if (xml.isStartElement()) {
+ if (xml.name() == "item")
+ linkString = xml.attributes().value("rss:about").toString();
+ currentTag = xml.name().toString();
+ } else if (xml.isEndElement()) {
+ if (xml.name() == "item") {
+
+ QTreeWidgetItem *item = new QTreeWidgetItem;
+ item->setText(0, titleString);
+ item->setText(1, linkString);
+ treeWidget->addTopLevelItem(item);
+
+ titleString.clear();
+ linkString.clear();
+ }
+
+ } else if (xml.isCharacters() && !xml.isWhitespace()) {
+ if (currentTag == "title")
+ titleString += xml.text().toString();
+ else if (currentTag == "link")
+ linkString += xml.text().toString();
+ }
+ }
+ if (xml.error() && xml.error() != QXmlStreamReader::PrematureEndOfDocumentError) {
+ qWarning() << "XML ERROR:" << xml.lineNumber() << ": " << xml.errorString();
+ http.abort();
+ }
+}
+
+/*
+ Open the link in the browser
+*/
+void RSSListing::itemActivated(QTreeWidgetItem * item)
+{
+ QDesktopServices::openUrl(QUrl(item->text(1)));
+}
diff --git a/examples/xml/rsslisting/rsslisting.h b/examples/xml/rsslisting/rsslisting.h
new file mode 100644
index 0000000..f0007de
--- /dev/null
+++ b/examples/xml/rsslisting/rsslisting.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RSSLISTING_H
+#define RSSLISTING_H
+
+#include <QHttp>
+#include <QWidget>
+#include <QBuffer>
+#include <QXmlStreamReader>
+
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QPushButton;
+QT_END_NAMESPACE
+
+class RSSListing : public QWidget
+{
+ Q_OBJECT
+public:
+ RSSListing(QWidget *widget = 0);
+
+public slots:
+ void fetch();
+ void finished(int id, bool error);
+ void readData(const QHttpResponseHeader &);
+ void itemActivated(QTreeWidgetItem * item);
+
+private:
+ void parseXml();
+
+ QXmlStreamReader xml;
+ QString currentTag;
+ QString linkString;
+ QString titleString;
+
+ QHttp http;
+ int connectionId;
+
+ QLineEdit *lineEdit;
+ QTreeWidget *treeWidget;
+ QPushButton *abortButton;
+ QPushButton *fetchButton;
+};
+
+#endif
+
diff --git a/examples/xml/rsslisting/rsslisting.pro b/examples/xml/rsslisting/rsslisting.pro
new file mode 100644
index 0000000..95a23e9
--- /dev/null
+++ b/examples/xml/rsslisting/rsslisting.pro
@@ -0,0 +1,10 @@
+HEADERS += rsslisting.h
+SOURCES += main.cpp rsslisting.cpp
+QT += network xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml/rsslisting
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS rsslisting.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml/rsslisting
+INSTALLS += target sources
+
diff --git a/examples/xml/saxbookmarks/frank.xbel b/examples/xml/saxbookmarks/frank.xbel
new file mode 100644
index 0000000..d6a12c6
--- /dev/null
+++ b/examples/xml/saxbookmarks/frank.xbel
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="yes">
+ <title>Literate Programming</title>
+ <bookmark href="http://www.vivtek.com/litprog.html">
+ <title>Synopsis of Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
+ <title>Literate Programming: Propaganda and Tools</title>
+ </bookmark>
+ <bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
+ <title>Literate Programming by Henrik Turbell</title>
+ </bookmark>
+ <bookmark href="http://www.desy.de/user/projects/LitProg.html">
+ <title>Literate Programming Library</title>
+ </bookmark>
+ <bookmark href="http://www.loria.fr/services/tex/english/litte.html">
+ <title>Literate Programming Basics</title>
+ </bookmark>
+ <bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
+ <title>Literate Programming Overview</title>
+ </bookmark>
+ <bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
+ <title>POD is not Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
+ <title>Computers That We Can Count On</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
+ <title>Literate Programming - Issues and Problems</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
+ <title>Literate Programming - Wiki Pages</title>
+ </bookmark>
+ <bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
+ <title>What is well-commented code?</title>
+ </bookmark>
+ <bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
+ <title>Bibliography on literate programming - A searchable bibliography</title>
+ </bookmark>
+ <bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
+ <title>Program comprehension and code reading bibliography</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
+ <title>Elucidative Programming</title>
+ </bookmark>
+ <bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
+ <title>AVL Trees (TexiWeb)</title>
+ </bookmark>
+ <bookmark href="http://literate-programming.wikiverse.org/">
+ <title>Literate Programming on Wikiverse</title>
+ </bookmark>
+ <bookmark href="http://www.pbrt.org/">
+ <title>Physically Based Rendering: From Theory to Implementation</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Useful C++ Links</title>
+ <folder folded="no">
+ <title>STL</title>
+ <bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
+ <title>STL Reference Documentation</title>
+ </bookmark>
+ <bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
+ <title>STL Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.cppreference.com/cpp_stl.html">
+ <title>STL Reference</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Qt</title>
+ <bookmark href="http://doc.trolltech.com/2.3/">
+ <title>Qt 2.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/3.3/">
+ <title>Qt 3.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 Reference</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech Home Page</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>IOStreams</title>
+ <bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
+ <title>IO Stream Library</title>
+ </bookmark>
+ <bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
+ <title>Binary I/O</title>
+ </bookmark>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
+ <title>I/O Stream FAQ</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>gdb</title>
+ <bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
+ <title>GDB Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
+ <title>Debugging with GDB</title>
+ </bookmark>
+ <bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
+ <title>GDB Quick Reference Page (PDF) (Handy)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Classes and Constructors</title>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
+ <title>Constructor FAQ</title>
+ </bookmark>
+ <bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
+ <title>Organizing Classes</title>
+ </bookmark>
+ </folder>
+ </folder>
+ <folder folded="yes">
+ <title>Software Documentation or System Documentation</title>
+ <bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
+ <title>The Almighty Thud</title>
+ </bookmark>
+ <bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
+ <title>Microsoft Coding Techniques and Programming Practices</title>
+ </bookmark>
+ <bookmark href="http://www.bearcave.com/software/prog_docs.html">
+ <title>Software and Documentation</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
+ <title>The Source Code is the Design</title>
+ </bookmark>
+ <bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
+ <title>What is Software Design?</title>
+ </bookmark>
+ <bookmark href="http://www.mindprod.com/unmain.html">
+ <title>How To Write Unmaintainable Code</title>
+ </bookmark>
+ <bookmark href="http://www.idinews.com/selfDoc.html">
+ <title>Self Documenting Program Code Remains a Distant Goal</title>
+ </bookmark>
+ <bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
+ <title>Place Tab A in Slot B</title>
+ </bookmark>
+ <bookmark href="http://www.holub.com/class/uml/uml.html">
+ <title>UML Reference Card</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>TeX Resources</title>
+ <bookmark href="http://www.tug.org/">
+ <title>The TeX User's Group</title>
+ </bookmark>
+ <bookmark href="http://www.miktex.org/">
+ <title>MikTeX website</title>
+ </bookmark>
+ <bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
+ <title>MetaPost website</title>
+ </bookmark>
+ <bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
+ <title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Portable Document Format (PDF)</title>
+ <bookmark href="http://www.adobe.com/">
+ <title>Adobe - The postscript and PDF standards</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
+ <title>Reference Manual Portable Document Format</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
+ <title>Adobe Acrobat Software Development Kit</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Literature Sites</title>
+ <bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
+ <title>Guide to Special Collections (Columbia University)</title>
+ </bookmark>
+ <bookmark href="http://www.ipl.org/ref/litcrit/">
+ <title>Literary Criticism on the Web from the Internet Public Library</title>
+ </bookmark>
+ <bookmark href="http://www.victorianweb.org/">
+ <title>Victorian Web.</title>
+ </bookmark>
+ <bookmark href="http://vos.ucsb.edu/">
+ <title>Voice of the Shuttle.</title>
+ </bookmark>
+ <bookmark href="http://www.modjourn.brown.edu/">
+ <title>Modernist Journals Project</title>
+ </bookmark>
+ <bookmark href="http://www.poetspath.com">
+ <title>Museum of American Poetics</title>
+ </bookmark>
+ <bookmark href="http://www.english.uiuc.edu/maps/">
+ <title>Modern American Poetry</title>
+ </bookmark>
+ <bookmark href="http://www.findarticles.com/">
+ <title>FindArticles.com</title>
+ </bookmark>
+ <bookmark href="http://www.literaryhistory.com">
+ <title>Literary History</title>
+ </bookmark>
+ <bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
+ <title>Literary Encyclopedia</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://texts.cdlib.org/ucpress/">
+ <title>The University of California Press</title>
+ </bookmark>
+ <bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
+ <title>Wright American Fiction, 1851-1875</title>
+ </bookmark>
+ <bookmark href="http://docsouth.unc.edu/">
+ <title>Documenting the American South: Beginnings to 1920</title>
+ </bookmark>
+ <bookmark href="http://etext.lib.virginia.edu/eng-on.html">
+ <title>Electronic Text Center at the University of Virginia</title>
+ </bookmark>
+ <bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
+ <title>The Schomburg Center for Research in Black Culture</title>
+ </bookmark>
+ <bookmark href="http://www.infomotions.com/alex2/">
+ <title>Alex Catalogue of Electronic Texts.</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/saxbookmarks/jennifer.xbel b/examples/xml/saxbookmarks/jennifer.xbel
new file mode 100644
index 0000000..597880a
--- /dev/null
+++ b/examples/xml/saxbookmarks/jennifer.xbel
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="no">
+ <title>Qt Resources</title>
+ <folder folded="yes">
+ <title>Trolltech Partners</title>
+ <bookmark href="http://partners.trolltech.com/partners/training.html">
+ <title>Training Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/service.html">
+ <title>Consultants and System Integrators</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/tech.html">
+ <title>Technology Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/resellers.html">
+ <title>Value Added Resellers (VARs)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Community Resources</title>
+ <bookmark href="http://www.qtforum.org/">
+ <title>QtForum.org</title>
+ </bookmark>
+ <bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
+ <title>The Independent Qt Tutorial</title>
+ </bookmark>
+ <bookmark href="http://prog.qt.free.fr/">
+ <title>French PROG.Qt</title>
+ </bookmark>
+ <bookmark href="http://www.qtforum.de/">
+ <title>German Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://www.korone.net/">
+ <title>Korean Qt Community Site</title>
+ </bookmark>
+ <bookmark href="http://prog.org.ru/forum/forum_14.html">
+ <title>Russian Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://qt4.digitalfanatics.org/">
+ <title>Digitalfanatics: The QT 4 Resource Center</title>
+ </bookmark>
+ <bookmark href="http://www.qtquestions.org/">
+ <title>QtQuestions</title>
+ </bookmark>
+ </folder>
+ <bookmark href="http://doc.trolltech.com/qq/">
+ <title>Qt Quarterly</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech's home page</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 documentation</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/developer/faqs/">
+ <title>Frequently Asked Questions</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Online Dictionaries</title>
+ <bookmark href="http://www.dictionary.com/">
+ <title>Dictionary.com</title>
+ </bookmark>
+ <bookmark href="http://www.m-w.com/">
+ <title>Merriam-Webster Online</title>
+ </bookmark>
+ <bookmark href="http://dictionary.cambridge.org/">
+ <title>Cambridge Dictionaries Online</title>
+ </bookmark>
+ <bookmark href="http://www.onelook.com/">
+ <title>OneLook Dictionary Search</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="www.iee.et.tu-dresden.de/">
+ <title>The New English-German Dictionary</title>
+ </bookmark>
+ <bookmark href="http://dict.tu-chemnitz.de/">
+ <title>TU Chemnitz German-English Dictionary</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://atilf.atilf.fr/tlf.htm">
+ <title>Trésor de la Langue Française informatisé</title>
+ </bookmark>
+ <bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
+ <title>Dictionnaire de l'Académie Française</title>
+ </bookmark>
+ <bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
+ <title>Dictionnaire des synonymes</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/saxbookmarks/main.cpp b/examples/xml/saxbookmarks/main.cpp
new file mode 100644
index 0000000..3f0a207
--- /dev/null
+++ b/examples/xml/saxbookmarks/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ mainWin.open();
+ return app.exec();
+}
diff --git a/examples/xml/saxbookmarks/mainwindow.cpp b/examples/xml/saxbookmarks/mainwindow.cpp
new file mode 100644
index 0000000..2cba559
--- /dev/null
+++ b/examples/xml/saxbookmarks/mainwindow.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xbelgenerator.h"
+#include "xbelhandler.h"
+
+MainWindow::MainWindow()
+{
+ QStringList labels;
+ labels << tr("Title") << tr("Location");
+
+ treeWidget = new QTreeWidget;
+ treeWidget->header()->setResizeMode(QHeaderView::Stretch);
+ treeWidget->setHeaderLabels(labels);
+ setCentralWidget(treeWidget);
+
+ createActions();
+ createMenus();
+
+ statusBar()->showMessage(tr("Ready"));
+
+ setWindowTitle(tr("SAX Bookmarks"));
+ resize(480, 320);
+}
+
+void MainWindow::open()
+{
+ QString fileName =
+ QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ treeWidget->clear();
+
+ XbelHandler handler(treeWidget);
+ QXmlSimpleReader reader;
+ reader.setContentHandler(&handler);
+ reader.setErrorHandler(&handler);
+
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SAX Bookmarks"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QXmlInputSource xmlInputSource(&file);
+ if (reader.parse(xmlInputSource))
+ statusBar()->showMessage(tr("File loaded"), 2000);
+}
+
+void MainWindow::saveAs()
+{
+ QString fileName =
+ QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("SAX Bookmarks"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ XbelGenerator generator(treeWidget);
+ if (generator.write(&file))
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About SAX Bookmarks"),
+ tr("The <b>SAX Bookmarks</b> example demonstrates how to use Qt's "
+ "SAX classes to read XML documents and how to generate XML by "
+ "hand."));
+}
+
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAsAct = new QAction(tr("&Save As..."), this);
+ saveAsAct->setShortcut(tr("Ctrl+S"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
diff --git a/examples/xml/saxbookmarks/mainwindow.h b/examples/xml/saxbookmarks/mainwindow.h
new file mode 100644
index 0000000..2c70d4a
--- /dev/null
+++ b/examples/xml/saxbookmarks/mainwindow.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void open();
+ void saveAs();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+
+ QTreeWidget *treeWidget;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *openAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/xml/saxbookmarks/saxbookmarks.pro b/examples/xml/saxbookmarks/saxbookmarks.pro
new file mode 100644
index 0000000..d0eec44
--- /dev/null
+++ b/examples/xml/saxbookmarks/saxbookmarks.pro
@@ -0,0 +1,20 @@
+HEADERS = mainwindow.h \
+ xbelgenerator.h \
+ xbelhandler.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xbelgenerator.cpp \
+ xbelhandler.cpp
+QT += xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml/saxbookmarks
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS saxbookmarks.pro *.xbel
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml/saxbookmarks
+INSTALLS += target sources
+
+wince*: {
+ addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.path = \My Documents
+ DEPLOYMENT += addFiles
+}
diff --git a/examples/xml/saxbookmarks/xbelgenerator.cpp b/examples/xml/saxbookmarks/xbelgenerator.cpp
new file mode 100644
index 0000000..cafaf51
--- /dev/null
+++ b/examples/xml/saxbookmarks/xbelgenerator.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xbelgenerator.h"
+
+XbelGenerator::XbelGenerator(QTreeWidget *treeWidget)
+ : treeWidget(treeWidget)
+{
+}
+
+bool XbelGenerator::write(QIODevice *device)
+{
+ out.setDevice(device);
+ out.setCodec("UTF-8");
+ out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ << "<!DOCTYPE xbel>\n"
+ << "<xbel version=\"1.0\">\n";
+
+ for (int i = 0; i < treeWidget->topLevelItemCount(); ++i)
+ generateItem(treeWidget->topLevelItem(i), 1);
+
+ out << "</xbel>\n";
+ return true;
+}
+
+QString XbelGenerator::indent(int depth)
+{
+ const int IndentSize = 4;
+ return QString(IndentSize * depth, ' ');
+}
+
+QString XbelGenerator::escapedText(const QString &str)
+{
+ QString result = str;
+ result.replace("&", "&amp;");
+ result.replace("<", "&lt;");
+ result.replace(">", "&gt;");
+ return result;
+}
+
+QString XbelGenerator::escapedAttribute(const QString &str)
+{
+ QString result = escapedText(str);
+ result.replace("\"", "&quot;");
+ result.prepend("\"");
+ result.append("\"");
+ return result;
+}
+
+void XbelGenerator::generateItem(QTreeWidgetItem *item, int depth)
+{
+ QString tagName = item->data(0, Qt::UserRole).toString();
+ if (tagName == "folder") {
+ bool folded = !treeWidget->isItemExpanded(item);
+ out << indent(depth) << "<folder folded=\"" << (folded ? "yes" : "no")
+ << "\">\n"
+ << indent(depth + 1) << "<title>" << escapedText(item->text(0))
+ << "</title>\n";
+
+ for (int i = 0; i < item->childCount(); ++i)
+ generateItem(item->child(i), depth + 1);
+
+ out << indent(depth) << "</folder>\n";
+ } else if (tagName == "bookmark") {
+ out << indent(depth) << "<bookmark";
+ if (!item->text(1).isEmpty())
+ out << " href=" << escapedAttribute(item->text(1));
+ out << ">\n"
+ << indent(depth + 1) << "<title>" << escapedText(item->text(0))
+ << "</title>\n"
+ << indent(depth) << "</bookmark>\n";
+ } else if (tagName == "separator") {
+ out << indent(depth) << "<separator/>\n";
+ }
+}
diff --git a/examples/xml/saxbookmarks/xbelgenerator.h b/examples/xml/saxbookmarks/xbelgenerator.h
new file mode 100644
index 0000000..023d626
--- /dev/null
+++ b/examples/xml/saxbookmarks/xbelgenerator.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELGENERATOR_H
+#define XBELGENERATOR_H
+
+#include <QTextStream>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class XbelGenerator
+{
+public:
+ XbelGenerator(QTreeWidget *treeWidget);
+
+ bool write(QIODevice *device);
+
+private:
+ static QString indent(int indentLevel);
+ static QString escapedText(const QString &str);
+ static QString escapedAttribute(const QString &str);
+ void generateItem(QTreeWidgetItem *item, int depth);
+
+ QTreeWidget *treeWidget;
+ QTextStream out;
+};
+
+#endif
diff --git a/examples/xml/saxbookmarks/xbelhandler.cpp b/examples/xml/saxbookmarks/xbelhandler.cpp
new file mode 100644
index 0000000..2fdb1fa
--- /dev/null
+++ b/examples/xml/saxbookmarks/xbelhandler.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xbelhandler.h"
+
+XbelHandler::XbelHandler(QTreeWidget *treeWidget)
+ : treeWidget(treeWidget)
+{
+ item = 0;
+ metXbelTag = false;
+
+ QStyle *style = treeWidget->style();
+
+ folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirClosedIcon),
+ QIcon::Normal, QIcon::Off);
+ folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirOpenIcon),
+ QIcon::Normal, QIcon::On);
+ bookmarkIcon.addPixmap(style->standardPixmap(QStyle::SP_FileIcon));
+}
+
+bool XbelHandler::startElement(const QString & /* namespaceURI */,
+ const QString & /* localName */,
+ const QString &qName,
+ const QXmlAttributes &attributes)
+{
+ if (!metXbelTag && qName != "xbel") {
+ errorStr = QObject::tr("The file is not an XBEL file.");
+ return false;
+ }
+
+ if (qName == "xbel") {
+ QString version = attributes.value("version");
+ if (!version.isEmpty() && version != "1.0") {
+ errorStr = QObject::tr("The file is not an XBEL version 1.0 file.");
+ return false;
+ }
+ metXbelTag = true;
+ } else if (qName == "folder") {
+ item = createChildItem(qName);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
+ item->setIcon(0, folderIcon);
+ item->setText(0, QObject::tr("Folder"));
+ bool folded = (attributes.value("folded") != "no");
+ treeWidget->setItemExpanded(item, !folded);
+ } else if (qName == "bookmark") {
+ item = createChildItem(qName);
+ item->setFlags(item->flags() | Qt::ItemIsEditable);
+ item->setIcon(0, bookmarkIcon);
+ item->setText(0, QObject::tr("Unknown title"));
+ item->setText(1, attributes.value("href"));
+ } else if (qName == "separator") {
+ item = createChildItem(qName);
+ item->setFlags(item->flags() & ~Qt::ItemIsSelectable);
+ item->setText(0, QString(30, 0xB7));
+ }
+
+ currentText.clear();
+ return true;
+}
+
+bool XbelHandler::endElement(const QString & /* namespaceURI */,
+ const QString & /* localName */,
+ const QString &qName)
+{
+ if (qName == "title") {
+ if (item)
+ item->setText(0, currentText);
+ } else if (qName == "folder" || qName == "bookmark"
+ || qName == "separator") {
+ item = item->parent();
+ }
+ return true;
+}
+
+bool XbelHandler::characters(const QString &str)
+{
+ currentText += str;
+ return true;
+}
+
+bool XbelHandler::fatalError(const QXmlParseException &exception)
+{
+ QMessageBox::information(treeWidget->window(), QObject::tr("SAX Bookmarks"),
+ QObject::tr("Parse error at line %1, column %2:\n"
+ "%3")
+ .arg(exception.lineNumber())
+ .arg(exception.columnNumber())
+ .arg(exception.message()));
+ return false;
+}
+
+QString XbelHandler::errorString() const
+{
+ return errorStr;
+}
+
+QTreeWidgetItem *XbelHandler::createChildItem(const QString &tagName)
+{
+ QTreeWidgetItem *childItem;
+ if (item) {
+ childItem = new QTreeWidgetItem(item);
+ } else {
+ childItem = new QTreeWidgetItem(treeWidget);
+ }
+ childItem->setData(0, Qt::UserRole, tagName);
+ return childItem;
+}
diff --git a/examples/xml/saxbookmarks/xbelhandler.h b/examples/xml/saxbookmarks/xbelhandler.h
new file mode 100644
index 0000000..5b6c0c0
--- /dev/null
+++ b/examples/xml/saxbookmarks/xbelhandler.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELHANDLER_H
+#define XBELHANDLER_H
+
+#include <QIcon>
+#include <QXmlDefaultHandler>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class XbelHandler : public QXmlDefaultHandler
+{
+public:
+ XbelHandler(QTreeWidget *treeWidget);
+
+ bool startElement(const QString &namespaceURI, const QString &localName,
+ const QString &qName, const QXmlAttributes &attributes);
+ bool endElement(const QString &namespaceURI, const QString &localName,
+ const QString &qName);
+ bool characters(const QString &str);
+ bool fatalError(const QXmlParseException &exception);
+ QString errorString() const;
+
+private:
+ QTreeWidgetItem *createChildItem(const QString &tagName);
+
+ QTreeWidget *treeWidget;
+ QTreeWidgetItem *item;
+ QString currentText;
+ QString errorStr;
+ bool metXbelTag;
+
+ QIcon folderIcon;
+ QIcon bookmarkIcon;
+};
+
+#endif
diff --git a/examples/xml/streambookmarks/frank.xbel b/examples/xml/streambookmarks/frank.xbel
new file mode 100644
index 0000000..d6a12c6
--- /dev/null
+++ b/examples/xml/streambookmarks/frank.xbel
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="yes">
+ <title>Literate Programming</title>
+ <bookmark href="http://www.vivtek.com/litprog.html">
+ <title>Synopsis of Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
+ <title>Literate Programming: Propaganda and Tools</title>
+ </bookmark>
+ <bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
+ <title>Literate Programming by Henrik Turbell</title>
+ </bookmark>
+ <bookmark href="http://www.desy.de/user/projects/LitProg.html">
+ <title>Literate Programming Library</title>
+ </bookmark>
+ <bookmark href="http://www.loria.fr/services/tex/english/litte.html">
+ <title>Literate Programming Basics</title>
+ </bookmark>
+ <bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
+ <title>Literate Programming Overview</title>
+ </bookmark>
+ <bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
+ <title>POD is not Literate Programming</title>
+ </bookmark>
+ <bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
+ <title>Computers That We Can Count On</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
+ <title>Literate Programming - Issues and Problems</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
+ <title>Literate Programming - Wiki Pages</title>
+ </bookmark>
+ <bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
+ <title>What is well-commented code?</title>
+ </bookmark>
+ <bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
+ <title>Bibliography on literate programming - A searchable bibliography</title>
+ </bookmark>
+ <bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
+ <title>Program comprehension and code reading bibliography</title>
+ </bookmark>
+ <bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
+ <title>Elucidative Programming</title>
+ </bookmark>
+ <bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
+ <title>AVL Trees (TexiWeb)</title>
+ </bookmark>
+ <bookmark href="http://literate-programming.wikiverse.org/">
+ <title>Literate Programming on Wikiverse</title>
+ </bookmark>
+ <bookmark href="http://www.pbrt.org/">
+ <title>Physically Based Rendering: From Theory to Implementation</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Useful C++ Links</title>
+ <folder folded="no">
+ <title>STL</title>
+ <bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
+ <title>STL Reference Documentation</title>
+ </bookmark>
+ <bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
+ <title>STL Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.cppreference.com/cpp_stl.html">
+ <title>STL Reference</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Qt</title>
+ <bookmark href="http://doc.trolltech.com/2.3/">
+ <title>Qt 2.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/3.3/">
+ <title>Qt 3.3 Reference</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 Reference</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech Home Page</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>IOStreams</title>
+ <bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
+ <title>IO Stream Library</title>
+ </bookmark>
+ <bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
+ <title>Binary I/O</title>
+ </bookmark>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
+ <title>I/O Stream FAQ</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>gdb</title>
+ <bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
+ <title>GDB Tutorial</title>
+ </bookmark>
+ <bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
+ <title>Debugging with GDB</title>
+ </bookmark>
+ <bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
+ <title>GDB Quick Reference Page (PDF) (Handy)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Classes and Constructors</title>
+ <bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
+ <title>Constructor FAQ</title>
+ </bookmark>
+ <bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
+ <title>Organizing Classes</title>
+ </bookmark>
+ </folder>
+ </folder>
+ <folder folded="yes">
+ <title>Software Documentation or System Documentation</title>
+ <bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
+ <title>The Almighty Thud</title>
+ </bookmark>
+ <bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
+ <title>Microsoft Coding Techniques and Programming Practices</title>
+ </bookmark>
+ <bookmark href="http://www.bearcave.com/software/prog_docs.html">
+ <title>Software and Documentation</title>
+ </bookmark>
+ <bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
+ <title>The Source Code is the Design</title>
+ </bookmark>
+ <bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
+ <title>What is Software Design?</title>
+ </bookmark>
+ <bookmark href="http://www.mindprod.com/unmain.html">
+ <title>How To Write Unmaintainable Code</title>
+ </bookmark>
+ <bookmark href="http://www.idinews.com/selfDoc.html">
+ <title>Self Documenting Program Code Remains a Distant Goal</title>
+ </bookmark>
+ <bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
+ <title>Place Tab A in Slot B</title>
+ </bookmark>
+ <bookmark href="http://www.holub.com/class/uml/uml.html">
+ <title>UML Reference Card</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>TeX Resources</title>
+ <bookmark href="http://www.tug.org/">
+ <title>The TeX User's Group</title>
+ </bookmark>
+ <bookmark href="http://www.miktex.org/">
+ <title>MikTeX website</title>
+ </bookmark>
+ <bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
+ <title>MetaPost website</title>
+ </bookmark>
+ <bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
+ <title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Portable Document Format (PDF)</title>
+ <bookmark href="http://www.adobe.com/">
+ <title>Adobe - The postscript and PDF standards</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
+ <title>Reference Manual Portable Document Format</title>
+ </bookmark>
+ <bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
+ <title>Adobe Acrobat Software Development Kit</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Literature Sites</title>
+ <bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
+ <title>Guide to Special Collections (Columbia University)</title>
+ </bookmark>
+ <bookmark href="http://www.ipl.org/ref/litcrit/">
+ <title>Literary Criticism on the Web from the Internet Public Library</title>
+ </bookmark>
+ <bookmark href="http://www.victorianweb.org/">
+ <title>Victorian Web.</title>
+ </bookmark>
+ <bookmark href="http://vos.ucsb.edu/">
+ <title>Voice of the Shuttle.</title>
+ </bookmark>
+ <bookmark href="http://www.modjourn.brown.edu/">
+ <title>Modernist Journals Project</title>
+ </bookmark>
+ <bookmark href="http://www.poetspath.com">
+ <title>Museum of American Poetics</title>
+ </bookmark>
+ <bookmark href="http://www.english.uiuc.edu/maps/">
+ <title>Modern American Poetry</title>
+ </bookmark>
+ <bookmark href="http://www.findarticles.com/">
+ <title>FindArticles.com</title>
+ </bookmark>
+ <bookmark href="http://www.literaryhistory.com">
+ <title>Literary History</title>
+ </bookmark>
+ <bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
+ <title>Literary Encyclopedia</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://texts.cdlib.org/ucpress/">
+ <title>The University of California Press</title>
+ </bookmark>
+ <bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
+ <title>Wright American Fiction, 1851-1875</title>
+ </bookmark>
+ <bookmark href="http://docsouth.unc.edu/">
+ <title>Documenting the American South: Beginnings to 1920</title>
+ </bookmark>
+ <bookmark href="http://etext.lib.virginia.edu/eng-on.html">
+ <title>Electronic Text Center at the University of Virginia</title>
+ </bookmark>
+ <bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
+ <title>The Schomburg Center for Research in Black Culture</title>
+ </bookmark>
+ <bookmark href="http://www.infomotions.com/alex2/">
+ <title>Alex Catalogue of Electronic Texts.</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/streambookmarks/jennifer.xbel b/examples/xml/streambookmarks/jennifer.xbel
new file mode 100644
index 0000000..597880a
--- /dev/null
+++ b/examples/xml/streambookmarks/jennifer.xbel
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xbel>
+<xbel version="1.0">
+ <folder folded="no">
+ <title>Qt Resources</title>
+ <folder folded="yes">
+ <title>Trolltech Partners</title>
+ <bookmark href="http://partners.trolltech.com/partners/training.html">
+ <title>Training Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/service.html">
+ <title>Consultants and System Integrators</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/tech.html">
+ <title>Technology Partners</title>
+ </bookmark>
+ <bookmark href="http://partners.trolltech.com/partners/resellers.html">
+ <title>Value Added Resellers (VARs)</title>
+ </bookmark>
+ </folder>
+ <folder folded="yes">
+ <title>Community Resources</title>
+ <bookmark href="http://www.qtforum.org/">
+ <title>QtForum.org</title>
+ </bookmark>
+ <bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
+ <title>The Independent Qt Tutorial</title>
+ </bookmark>
+ <bookmark href="http://prog.qt.free.fr/">
+ <title>French PROG.Qt</title>
+ </bookmark>
+ <bookmark href="http://www.qtforum.de/">
+ <title>German Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://www.korone.net/">
+ <title>Korean Qt Community Site</title>
+ </bookmark>
+ <bookmark href="http://prog.org.ru/forum/forum_14.html">
+ <title>Russian Qt Forum</title>
+ </bookmark>
+ <bookmark href="http://qt4.digitalfanatics.org/">
+ <title>Digitalfanatics: The QT 4 Resource Center</title>
+ </bookmark>
+ <bookmark href="http://www.qtquestions.org/">
+ <title>QtQuestions</title>
+ </bookmark>
+ </folder>
+ <bookmark href="http://doc.trolltech.com/qq/">
+ <title>Qt Quarterly</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/">
+ <title>Trolltech's home page</title>
+ </bookmark>
+ <bookmark href="http://doc.trolltech.com/4.0/">
+ <title>Qt 4.0 documentation</title>
+ </bookmark>
+ <bookmark href="http://qtsoftware.com/developer/faqs/">
+ <title>Frequently Asked Questions</title>
+ </bookmark>
+ </folder>
+ <folder folded="no">
+ <title>Online Dictionaries</title>
+ <bookmark href="http://www.dictionary.com/">
+ <title>Dictionary.com</title>
+ </bookmark>
+ <bookmark href="http://www.m-w.com/">
+ <title>Merriam-Webster Online</title>
+ </bookmark>
+ <bookmark href="http://dictionary.cambridge.org/">
+ <title>Cambridge Dictionaries Online</title>
+ </bookmark>
+ <bookmark href="http://www.onelook.com/">
+ <title>OneLook Dictionary Search</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="www.iee.et.tu-dresden.de/">
+ <title>The New English-German Dictionary</title>
+ </bookmark>
+ <bookmark href="http://dict.tu-chemnitz.de/">
+ <title>TU Chemnitz German-English Dictionary</title>
+ </bookmark>
+ <separator/>
+ <bookmark href="http://atilf.atilf.fr/tlf.htm">
+ <title>Trésor de la Langue Française informatisé</title>
+ </bookmark>
+ <bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
+ <title>Dictionnaire de l'Académie Française</title>
+ </bookmark>
+ <bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
+ <title>Dictionnaire des synonymes</title>
+ </bookmark>
+ </folder>
+</xbel>
diff --git a/examples/xml/streambookmarks/main.cpp b/examples/xml/streambookmarks/main.cpp
new file mode 100644
index 0000000..58b5c5e
--- /dev/null
+++ b/examples/xml/streambookmarks/main.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow mainWin;
+ mainWin.show();
+ mainWin.open();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp
new file mode 100644
index 0000000..2136b4b
--- /dev/null
+++ b/examples/xml/streambookmarks/mainwindow.cpp
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "xbelreader.h"
+#include "xbelwriter.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ QStringList labels;
+ labels << tr("Title") << tr("Location");
+
+ treeWidget = new QTreeWidget;
+ treeWidget->header()->setResizeMode(QHeaderView::Stretch);
+ treeWidget->setHeaderLabels(labels);
+ setCentralWidget(treeWidget);
+
+ createActions();
+ createMenus();
+
+ statusBar()->showMessage(tr("Ready"));
+
+ setWindowTitle(tr("QXmlStream Bookmarks"));
+ resize(480, 320);
+}
+//! [0]
+
+//! [1]
+void MainWindow::open()
+{
+ QString fileName =
+ QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ treeWidget->clear();
+
+
+ QFile file(fileName);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("QXmlStream Bookmarks"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ XbelReader reader(treeWidget);
+ if (!reader.read(&file)) {
+ QMessageBox::warning(this, tr("QXmlStream Bookmarks"),
+ tr("Parse error in file %1 at line %2, column %3:\n%4")
+ .arg(fileName)
+ .arg(reader.lineNumber())
+ .arg(reader.columnNumber())
+ .arg(reader.errorString()));
+ } else {
+ statusBar()->showMessage(tr("File loaded"), 2000);
+ }
+
+}
+//! [1]
+
+//! [2]
+void MainWindow::saveAs()
+{
+ QString fileName =
+ QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
+ QDir::currentPath(),
+ tr("XBEL Files (*.xbel *.xml)"));
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("QXmlStream Bookmarks"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+ XbelWriter writer(treeWidget);
+ if (writer.writeFile(&file))
+ statusBar()->showMessage(tr("File saved"), 2000);
+}
+//! [2]
+
+//! [3]
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About QXmlStream Bookmarks"),
+ tr("The <b>QXmlStream Bookmarks</b> example demonstrates how to use Qt's "
+ "QXmlStream classes to read and write XML documents."));
+}
+//! [3]
+
+//! [4]
+void MainWindow::createActions()
+{
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ saveAsAct = new QAction(tr("&Save As..."), this);
+ saveAsAct->setShortcut(tr("Ctrl+S"));
+ connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+//! [4]
+
+//! [5]
+void MainWindow::createMenus()
+{
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(saveAsAct);
+ fileMenu->addAction(exitAct);
+
+ menuBar()->addSeparator();
+
+ helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+}
+//! [5]
diff --git a/examples/xml/streambookmarks/mainwindow.h b/examples/xml/streambookmarks/mainwindow.h
new file mode 100644
index 0000000..8bed33d
--- /dev/null
+++ b/examples/xml/streambookmarks/mainwindow.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+QT_END_NAMESPACE
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void open();
+ void saveAs();
+ void about();
+
+private:
+ void createActions();
+ void createMenus();
+
+ QTreeWidget *treeWidget;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+ QAction *openAct;
+ QAction *saveAsAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+//! [0]
+
+#endif
diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro
new file mode 100644
index 0000000..e66b95a
--- /dev/null
+++ b/examples/xml/streambookmarks/streambookmarks.pro
@@ -0,0 +1,14 @@
+HEADERS = mainwindow.h \
+ xbelreader.h \
+ xbelwriter.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ xbelreader.cpp \
+ xbelwriter.cpp
+QT += xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml/streambookmarks
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xbel
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml/streambookmarks
+INSTALLS += target sources
diff --git a/examples/xml/streambookmarks/xbelreader.cpp b/examples/xml/streambookmarks/xbelreader.cpp
new file mode 100644
index 0000000..561997a
--- /dev/null
+++ b/examples/xml/streambookmarks/xbelreader.cpp
@@ -0,0 +1,205 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xbelreader.h"
+
+//! [0]
+XbelReader::XbelReader(QTreeWidget *treeWidget)
+ : treeWidget(treeWidget)
+{
+ QStyle *style = treeWidget->style();
+
+ folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirClosedIcon),
+ QIcon::Normal, QIcon::Off);
+ folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirOpenIcon),
+ QIcon::Normal, QIcon::On);
+ bookmarkIcon.addPixmap(style->standardPixmap(QStyle::SP_FileIcon));
+}
+//! [0]
+
+//! [1]
+bool XbelReader::read(QIODevice *device)
+{
+ setDevice(device);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isStartElement()) {
+ if (name() == "xbel" && attributes().value("version") == "1.0")
+ readXBEL();
+ else
+ raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
+ }
+ }
+
+ return !error();
+}
+//! [1]
+
+//! [2]
+void XbelReader::readUnknownElement()
+{
+ Q_ASSERT(isStartElement());
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ readUnknownElement();
+ }
+}
+//! [2]
+
+//! [3]
+void XbelReader::readXBEL()
+{
+ Q_ASSERT(isStartElement() && name() == "xbel");
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == "folder")
+ readFolder(0);
+ else if (name() == "bookmark")
+ readBookmark(0);
+ else if (name() == "separator")
+ readSeparator(0);
+ else
+ readUnknownElement();
+ }
+ }
+}
+//! [3]
+
+//! [4]
+void XbelReader::readTitle(QTreeWidgetItem *item)
+{
+ Q_ASSERT(isStartElement() && name() == "title");
+
+ QString title = readElementText();
+ item->setText(0, title);
+}
+//! [4]
+
+//! [5]
+void XbelReader::readSeparator(QTreeWidgetItem *item)
+{
+ QTreeWidgetItem *separator = createChildItem(item);
+ separator->setFlags(item->flags() & ~Qt::ItemIsSelectable);
+ separator->setText(0, QString(30, 0xB7));
+ readElementText();
+}
+//! [5]
+
+void XbelReader::readFolder(QTreeWidgetItem *item)
+{
+ Q_ASSERT(isStartElement() && name() == "folder");
+
+ QTreeWidgetItem *folder = createChildItem(item);
+ bool folded = (attributes().value("folded") != "no");
+ treeWidget->setItemExpanded(folder, !folded);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == "title")
+ readTitle(folder);
+ else if (name() == "folder")
+ readFolder(folder);
+ else if (name() == "bookmark")
+ readBookmark(folder);
+ else if (name() == "separator")
+ readSeparator(folder);
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readBookmark(QTreeWidgetItem *item)
+{
+ Q_ASSERT(isStartElement() && name() == "bookmark");
+
+ QTreeWidgetItem *bookmark = createChildItem(item);
+ bookmark->setFlags(bookmark->flags() | Qt::ItemIsEditable);
+ bookmark->setIcon(0, bookmarkIcon);
+ bookmark->setText(0, QObject::tr("Unknown title"));
+ bookmark->setText(1, attributes().value("href").toString());
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == "title")
+ readTitle(bookmark);
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+QTreeWidgetItem *XbelReader::createChildItem(QTreeWidgetItem *item)
+{
+ QTreeWidgetItem *childItem;
+ if (item) {
+ childItem = new QTreeWidgetItem(item);
+ } else {
+ childItem = new QTreeWidgetItem(treeWidget);
+ }
+ childItem->setData(0, Qt::UserRole, name().toString());
+ return childItem;
+}
diff --git a/examples/xml/streambookmarks/xbelreader.h b/examples/xml/streambookmarks/xbelreader.h
new file mode 100644
index 0000000..dc5eac9
--- /dev/null
+++ b/examples/xml/streambookmarks/xbelreader.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELREADER_H
+#define XBELREADER_H
+
+#include <QIcon>
+#include <QXmlStreamReader>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+//! [0]
+class XbelReader : public QXmlStreamReader
+{
+public:
+//! [1]
+ XbelReader(QTreeWidget *treeWidget);
+//! [1]
+
+ bool read(QIODevice *device);
+
+private:
+//! [2]
+ void readUnknownElement();
+ void readXBEL();
+ void readTitle(QTreeWidgetItem *item);
+ void readSeparator(QTreeWidgetItem *item);
+ void readFolder(QTreeWidgetItem *item);
+ void readBookmark(QTreeWidgetItem *item);
+
+ QTreeWidgetItem *createChildItem(QTreeWidgetItem *item);
+
+ QTreeWidget *treeWidget;
+//! [2]
+
+ QIcon folderIcon;
+ QIcon bookmarkIcon;
+};
+//! [0]
+
+#endif
diff --git a/examples/xml/streambookmarks/xbelwriter.cpp b/examples/xml/streambookmarks/xbelwriter.cpp
new file mode 100644
index 0000000..b3ce288
--- /dev/null
+++ b/examples/xml/streambookmarks/xbelwriter.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "xbelwriter.h"
+
+//! [0]
+XbelWriter::XbelWriter(QTreeWidget *treeWidget)
+ : treeWidget(treeWidget)
+{
+ setAutoFormatting(true);
+}
+//! [0]
+
+//! [1]
+bool XbelWriter::writeFile(QIODevice *device)
+{
+ setDevice(device);
+
+ writeStartDocument();
+ writeDTD("<!DOCTYPE xbel>");
+ writeStartElement("xbel");
+ writeAttribute("version", "1.0");
+ for (int i = 0; i < treeWidget->topLevelItemCount(); ++i)
+ writeItem(treeWidget->topLevelItem(i));
+
+ writeEndDocument();
+ return true;
+}
+//! [1]
+
+//! [2]
+void XbelWriter::writeItem(QTreeWidgetItem *item)
+{
+ QString tagName = item->data(0, Qt::UserRole).toString();
+ if (tagName == "folder") {
+ bool folded = !treeWidget->isItemExpanded(item);
+ writeStartElement(tagName);
+ writeAttribute("folded", folded ? "yes" : "no");
+ writeTextElement("title", item->text(0));
+ for (int i = 0; i < item->childCount(); ++i)
+ writeItem(item->child(i));
+ writeEndElement();
+ } else if (tagName == "bookmark") {
+ writeStartElement(tagName);
+ if (!item->text(1).isEmpty())
+ writeAttribute("href", item->text(1));
+ writeTextElement("title", item->text(0));
+ writeEndElement();
+ } else if (tagName == "separator") {
+ writeEmptyElement(tagName);
+ }
+}
+//! [2]
diff --git a/examples/xml/streambookmarks/xbelwriter.h b/examples/xml/streambookmarks/xbelwriter.h
new file mode 100644
index 0000000..ec80e05
--- /dev/null
+++ b/examples/xml/streambookmarks/xbelwriter.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XBELWRITER_H
+#define XBELWRITER_H
+
+#include <QXmlStreamWriter>
+
+QT_BEGIN_NAMESPACE
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+//! [0]
+class XbelWriter : public QXmlStreamWriter
+{
+public:
+ XbelWriter(QTreeWidget *treeWidget);
+ bool writeFile(QIODevice *device);
+
+private:
+ void writeItem(QTreeWidgetItem *item);
+ QTreeWidget *treeWidget;
+};
+//! [0]
+
+#endif
diff --git a/examples/xml/xml.pro b/examples/xml/xml.pro
new file mode 100644
index 0000000..866b0cc
--- /dev/null
+++ b/examples/xml/xml.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = dombookmarks \
+ rsslisting \
+ saxbookmarks \
+ streambookmarks \
+ xmlstreamlint
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xml.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml
+INSTALLS += target sources
diff --git a/examples/xml/xmlstreamlint/main.cpp b/examples/xml/xmlstreamlint/main.cpp
new file mode 100644
index 0000000..6063b84
--- /dev/null
+++ b/examples/xml/xmlstreamlint/main.cpp
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QCoreApplication>
+#include <QFile>
+#include <QStringList>
+#include <QTextStream>
+#include <QXmlStreamReader>
+
+/*
+ This class exists for the sole purpose of creating a translation context.
+*/
+class XmlStreamLint
+{
+public:
+ Q_DECLARE_TR_FUNCTIONS(XmlStreamLint)
+};
+
+int main(int argc, char *argv[])
+{
+ enum ExitCode
+ {
+ Success,
+ ParseFailure,
+ ArgumentError,
+ WriteError,
+ FileFailure
+ };
+
+ QCoreApplication app(argc, argv);
+
+ QTextStream errorStream(stderr);
+
+ if (argc != 2)
+ {
+ errorStream << XmlStreamLint::tr(
+ "Usage: xmlstreamlint <path to XML file>\n");
+ return ArgumentError;
+ }
+
+ QString inputFilePath(QCoreApplication::arguments().at(1));
+ QFile inputFile(inputFilePath);
+
+ if (!QFile::exists(inputFilePath))
+ {
+ errorStream << XmlStreamLint::tr(
+ "File %1 does not exist.\n").arg(inputFilePath);
+ return FileFailure;
+
+ } else if (!inputFile.open(QIODevice::ReadOnly)) {
+ errorStream << XmlStreamLint::tr(
+ "Failed to open file %1.\n").arg(inputFilePath);
+ return FileFailure;
+ }
+
+ QFile outputFile;
+ if (!outputFile.open(stdout, QIODevice::WriteOnly))
+ {
+ errorStream << XmlStreamLint::tr("Failed to open stdout.");
+ return WriteError;
+ }
+
+//! [0]
+ QXmlStreamReader reader(&inputFile);
+ QXmlStreamWriter writer(&outputFile);
+//! [0]
+
+//! [1]
+ while (!reader.atEnd())
+ {
+ reader.readNext();
+
+ if (reader.error())
+ {
+ errorStream << XmlStreamLint::tr(
+ "Error: %1 in file %2 at line %3, column %4.\n").arg(
+ reader.errorString(), inputFilePath,
+ QString::number(reader.lineNumber()),
+ QString::number(reader.columnNumber()));
+ return ParseFailure;
+//! [1]
+
+//! [2]
+ } else
+ writer.writeCurrentToken(reader);
+ }
+//! [2]
+
+ return Success;
+}
diff --git a/examples/xml/xmlstreamlint/xmlstreamlint.pro b/examples/xml/xmlstreamlint/xmlstreamlint.pro
new file mode 100644
index 0000000..7034e7b
--- /dev/null
+++ b/examples/xml/xmlstreamlint/xmlstreamlint.pro
@@ -0,0 +1,10 @@
+CONFIG += console
+QT -= gui
+QT += xml
+SOURCES += main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xml/xmlstreamlint
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xmlstreamlint.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/xml/xmlstreamlint
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/README b/examples/xmlpatterns/README
new file mode 100644
index 0000000..5d585dc
--- /dev/null
+++ b/examples/xmlpatterns/README
@@ -0,0 +1,38 @@
+XQuery queries and XPath expressions can be used in Qt with the
+QtXmlPatterns module.
+
+XQuery is a query language used to query XML in a concise and safe manner.
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/xmlpatterns/filetree/filetree.cpp b/examples/xmlpatterns/filetree/filetree.cpp
new file mode 100644
index 0000000..6695a96
--- /dev/null
+++ b/examples/xmlpatterns/filetree/filetree.cpp
@@ -0,0 +1,372 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QUrl>
+#include <QtCore/QVariant>
+#include <QtXmlPatterns/QXmlNamePool>
+#include "filetree.h"
+
+/*
+The model has two types of nodes: elements & attributes.
+
+ <directory name="">
+ <file name="">
+ </file>
+ </directory>
+
+ In QXmlNodeModelIndex we store two values. QXmlNodeIndex::data()
+ is treated as a signed int, and it is an index into m_fileInfos
+ unless it is -1, in which case it has no meaning and the value
+ of QXmlNodeModelIndex::additionalData() is a Type name instead.
+ */
+
+/*!
+ The constructor passes \a pool to the base class, then loads an
+ internal vector with an instance of QXmlName for each of the
+ strings "file", "directory", "fileName", "filePath", "size",
+ "mimeType", and "suffix".
+ */
+//! [2]
+FileTree::FileTree(const QXmlNamePool& pool)
+ : QSimpleXmlNodeModel(pool),
+ m_filterAllowAll(QDir::AllEntries |
+ QDir::AllDirs |
+ QDir::NoDotAndDotDot |
+ QDir::Hidden),
+ m_sortFlags(QDir::Name)
+{
+ QXmlNamePool np = namePool();
+ m_names.resize(7);
+ m_names[File] = QXmlName(np, QLatin1String("file"));
+ m_names[Directory] = QXmlName(np, QLatin1String("directory"));
+ m_names[AttributeFileName] = QXmlName(np, QLatin1String("fileName"));
+ m_names[AttributeFilePath] = QXmlName(np, QLatin1String("filePath"));
+ m_names[AttributeSize] = QXmlName(np, QLatin1String("size"));
+ m_names[AttributeMIMEType] = QXmlName(np, QLatin1String("mimeType"));
+ m_names[AttributeSuffix] = QXmlName(np, QLatin1String("suffix"));
+}
+//! [2]
+
+/*!
+ Returns the QXmlNodeModelIndex for the model node representing
+ the directory \a dirName.
+
+ It calls QDir::cleanPath(), because an instance of QFileInfo
+ constructed for a path ending in '/' will return the empty string in
+ fileName(), instead of the directory name.
+*/
+QXmlNodeModelIndex FileTree::nodeFor(const QString& dirName) const
+{
+ QFileInfo dirInfo(QDir::cleanPath(dirName));
+ Q_ASSERT(dirInfo.exists());
+ return toNodeIndex(dirInfo);
+}
+
+/*!
+ Since the value will always be in m_fileInfos, it is safe for
+ us to return a const reference to it.
+ */
+//! [6]
+const QFileInfo&
+FileTree::toFileInfo(const QXmlNodeModelIndex &nodeIndex) const
+{
+ return m_fileInfos.at(nodeIndex.data());
+}
+//! [6]
+
+/*!
+ Returns the model node index for the node specified by the
+ QFileInfo and node Type.
+ */
+//! [1]
+QXmlNodeModelIndex
+FileTree::toNodeIndex(const QFileInfo &fileInfo, Type attributeName) const
+{
+ const int indexOf = m_fileInfos.indexOf(fileInfo);
+
+ if (indexOf == -1) {
+ m_fileInfos.append(fileInfo);
+ return createIndex(m_fileInfos.count()-1, attributeName);
+ }
+ else
+ return createIndex(indexOf, attributeName);
+}
+//! [1]
+
+/*!
+ Returns the model node index for the node specified by the
+ QFileInfo, which must be a Type::File or Type::Directory.
+ */
+//! [0]
+QXmlNodeModelIndex FileTree::toNodeIndex(const QFileInfo &fileInfo) const
+{
+ return toNodeIndex(fileInfo, fileInfo.isDir() ? Directory : File);
+}
+//! [0]
+
+/*!
+ This private helper function is only called by nextFromSimpleAxis().
+ It is called whenever nextFromSimpleAxis() is called with an axis
+ parameter of either \c{PreviousSibling} or \c{NextSibling}.
+ */
+//! [5]
+QXmlNodeModelIndex FileTree::nextSibling(const QXmlNodeModelIndex &nodeIndex,
+ const QFileInfo &fileInfo,
+ qint8 offset) const
+{
+ Q_ASSERT(offset == -1 || offset == 1);
+
+ // Get the context node's parent.
+ const QXmlNodeModelIndex parent(nextFromSimpleAxis(Parent, nodeIndex));
+
+ if (parent.isNull())
+ return QXmlNodeModelIndex();
+
+ // Get the parent's child list.
+ const QFileInfo parentFI(toFileInfo(parent));
+ Q_ASSERT(Type(parent.additionalData()) == Directory);
+ const QFileInfoList siblings(QDir(parentFI.absoluteFilePath()).entryInfoList(QStringList(),
+ m_filterAllowAll,
+ m_sortFlags));
+ Q_ASSERT_X(!siblings.isEmpty(), Q_FUNC_INFO, "Can't happen! We started at a child.");
+
+ // Find the index of the child where we started.
+ const int indexOfMe = siblings.indexOf(fileInfo);
+
+ // Apply the offset.
+ const int siblingIndex = indexOfMe + offset;
+ if (siblingIndex < 0 || siblingIndex > siblings.count() - 1)
+ return QXmlNodeModelIndex();
+ else
+ return toNodeIndex(siblings.at(siblingIndex));
+}
+//! [5]
+
+/*!
+ This function is called by the QtXmlPatterns query engine when it
+ wants to move to the next node in the model. It moves along an \a
+ axis, \e from the node specified by \a nodeIndex.
+
+ This function is usually the one that requires the most design and
+ implementation work, because the implementation depends on the
+ perhaps unique structure of your non-XML data.
+
+ There are \l {QAbstractXmlNodeModel::SimpleAxis} {four values} for
+ \a axis that the implementation must handle, but there are really
+ only two axes, i.e., vertical and horizontal. Two of the four values
+ specify direction on the vertical axis (\c{Parent} and
+ \c{FirstChild}), and the other two values specify direction on the
+ horizontal axis (\c{PreviousSibling} and \c{NextSibling}).
+
+ The typical implementation will be a \c switch statement with
+ a case for each of the four \a axis values.
+ */
+//! [4]
+QXmlNodeModelIndex
+FileTree::nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &nodeIndex) const
+{
+ const QFileInfo fi(toFileInfo(nodeIndex));
+ const Type type = Type(nodeIndex.additionalData());
+
+ if (type != File && type != Directory) {
+ Q_ASSERT_X(axis == Parent, Q_FUNC_INFO, "An attribute only has a parent!");
+ return toNodeIndex(fi, Directory);
+ }
+
+ switch (axis) {
+ case Parent:
+ return toNodeIndex(QFileInfo(fi.path()), Directory);
+
+ case FirstChild:
+ {
+ if (type == File) // A file has no children.
+ return QXmlNodeModelIndex();
+ else {
+ Q_ASSERT(type == Directory);
+ Q_ASSERT_X(fi.isDir(), Q_FUNC_INFO, "It isn't really a directory!");
+ const QDir dir(fi.absoluteFilePath());
+ Q_ASSERT(dir.exists());
+
+ const QFileInfoList children(dir.entryInfoList(QStringList(),
+ m_filterAllowAll,
+ m_sortFlags));
+ if (children.isEmpty())
+ return QXmlNodeModelIndex();
+ const QFileInfo firstChild(children.first());
+ return toNodeIndex(firstChild);
+ }
+ }
+
+ case PreviousSibling:
+ return nextSibling(nodeIndex, fi, -1);
+
+ case NextSibling:
+ return nextSibling(nodeIndex, fi, 1);
+ }
+
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Don't ever get here!");
+ return QXmlNodeModelIndex();
+}
+//! [4]
+
+/*!
+ No matter what part of the file system we model (the whole file
+ tree or a subtree), \a node will always have \c{file:///} as
+ the document URI.
+ */
+QUrl FileTree::documentUri(const QXmlNodeModelIndex &node) const
+{
+ Q_UNUSED(node);
+ return QUrl("file:///");
+}
+
+/*!
+ This function returns QXmlNodeModelIndex::Element if \a node
+ is a directory or a file, and QXmlNodeModelIndex::Attribute
+ otherwise.
+ */
+QXmlNodeModelIndex::NodeKind
+FileTree::kind(const QXmlNodeModelIndex &node) const
+{
+ switch (Type(node.additionalData())) {
+ case Directory:
+ case File:
+ return QXmlNodeModelIndex::Element;
+ default:
+ return QXmlNodeModelIndex::Attribute;
+ }
+}
+
+/*!
+ No order is defined for this example, so we always return
+ QXmlNodeModelIndex::Precedes, just to keep everyone happy.
+ */
+QXmlNodeModelIndex::DocumentOrder
+FileTree::compareOrder(const QXmlNodeModelIndex&,
+ const QXmlNodeModelIndex&) const
+{
+ return QXmlNodeModelIndex::Precedes;
+}
+
+/*!
+ Returns the name of \a node. The caller guarantees that \a node is
+ not null and that it is contained in this node model.
+ */
+//! [3]
+QXmlName FileTree::name(const QXmlNodeModelIndex &node) const
+{
+ return m_names.at(node.additionalData());
+}
+//! [3]
+
+/*!
+ Always returns the QXmlNodeModelIndex for the root of the
+ file system, i.e. "/".
+ */
+QXmlNodeModelIndex FileTree::root(const QXmlNodeModelIndex &node) const
+{
+ Q_UNUSED(node);
+ return toNodeIndex(QFileInfo(QLatin1String("/")));
+}
+
+/*!
+ Returns the typed value for \a node, which must be either an
+ attribute or an element. The QVariant returned represents the atomic
+ value of an attribute or the atomic value contained in an element.
+
+ If the QVariant is returned as a default constructed variant,
+ it means that \a node has no typed value.
+ */
+QVariant FileTree::typedValue(const QXmlNodeModelIndex &node) const
+{
+ const QFileInfo &fi = toFileInfo(node);
+
+ switch (Type(node.additionalData())) {
+ case Directory:
+ // deliberate fall through.
+ case File:
+ return QString();
+ case AttributeFileName:
+ return fi.fileName();
+ case AttributeFilePath:
+ return fi.filePath();
+ case AttributeSize:
+ return fi.size();
+ case AttributeMIMEType:
+ {
+ /* We don't have any MIME detection code currently, so return
+ * the most generic one. */
+ return QLatin1String("application/octet-stream");
+ }
+ case AttributeSuffix:
+ return fi.suffix();
+ }
+
+ Q_ASSERT_X(false, Q_FUNC_INFO, "This line should never be reached.");
+ return QString();
+}
+
+/*!
+ Returns the attributes of \a element. The caller guarantees
+ that \a element is an element in this node model.
+ */
+QVector<QXmlNodeModelIndex>
+FileTree::attributes(const QXmlNodeModelIndex &element) const
+{
+ QVector<QXmlNodeModelIndex> result;
+
+ /* Both elements has this attribute. */
+ const QFileInfo &forElement = toFileInfo(element);
+ result.append(toNodeIndex(forElement, AttributeFilePath));
+ result.append(toNodeIndex(forElement, AttributeFileName));
+
+ if (Type(element.additionalData() == File)) {
+ result.append(toNodeIndex(forElement, AttributeSize));
+ result.append(toNodeIndex(forElement, AttributeSuffix));
+ //result.append(toNodeIndex(forElement, AttributeMIMEType));
+ }
+ else {
+ Q_ASSERT(element.additionalData() == Directory);
+ }
+
+ return result;
+}
+
diff --git a/examples/xmlpatterns/filetree/filetree.h b/examples/xmlpatterns/filetree/filetree.h
new file mode 100644
index 0000000..7c8f3ca
--- /dev/null
+++ b/examples/xmlpatterns/filetree/filetree.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QDir>
+#include <QtCore/QVector>
+#include <QtXmlPatterns/QSimpleXmlNodeModel>
+
+class FileTree : public QSimpleXmlNodeModel
+{
+ public:
+ FileTree(const QXmlNamePool &namePool);
+
+ QXmlNodeModelIndex nodeFor(const QString &fileName) const;
+
+ //! [0]
+ virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex&, const QXmlNodeModelIndex&) const;
+ virtual QXmlName name(const QXmlNodeModelIndex &node) const;
+ virtual QUrl documentUri(const QXmlNodeModelIndex &node) const;
+ virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &node) const;
+ virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &node) const;
+ virtual QVariant typedValue(const QXmlNodeModelIndex &node) const;
+ //! [0]
+ protected:
+ //! [1]
+ virtual QVector<QXmlNodeModelIndex> attributes(const QXmlNodeModelIndex &element) const;
+ virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis, const QXmlNodeModelIndex&) const;
+ //! [1]
+
+ private:
+ //! [4]
+ enum Type {
+ File,
+ Directory,
+ AttributeFileName,
+ AttributeFilePath,
+ AttributeSize,
+ AttributeMIMEType,
+ AttributeSuffix
+ };
+ //! [4]
+
+ inline QXmlNodeModelIndex nextSibling(const QXmlNodeModelIndex &nodeIndex,
+ const QFileInfo &from,
+ qint8 offset) const;
+ inline const QFileInfo &toFileInfo(const QXmlNodeModelIndex &index) const;
+ inline QXmlNodeModelIndex toNodeIndex(const QFileInfo &index,
+ Type attributeName) const;
+ inline QXmlNodeModelIndex toNodeIndex(const QFileInfo &index) const;
+
+ /*
+ One possible improvement is to use a hash, and use the &*&value()
+ trick to get a pointer, which would be stored in data() instead
+ of the index.
+ */
+ //! [2]
+ mutable QVector<QFileInfo> m_fileInfos;
+ const QDir::Filters m_filterAllowAll;
+ const QDir::SortFlags m_sortFlags;
+ QVector<QXmlName> m_names;
+ //! [2]
+};
+
+ //! [3]
+ //! [3]
diff --git a/examples/xmlpatterns/filetree/filetree.pro b/examples/xmlpatterns/filetree/filetree.pro
new file mode 100644
index 0000000..469ee8d
--- /dev/null
+++ b/examples/xmlpatterns/filetree/filetree.pro
@@ -0,0 +1,13 @@
+SOURCES += main.cpp filetree.cpp mainwindow.cpp ../shared/xmlsyntaxhighlighter.cpp
+HEADERS += filetree.h mainwindow.h ../shared/xmlsyntaxhighlighter.h
+FORMS += forms/mainwindow.ui
+QT += xmlpatterns
+CONFIG -= app_bundle
+RESOURCES += queries.qrc
+INCLUDEPATH += ../shared/
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/filetree
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xq *.html
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/filetree
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/filetree/forms/mainwindow.ui b/examples/xmlpatterns/filetree/forms/mainwindow.ui
new file mode 100644
index 0000000..993050f
--- /dev/null
+++ b/examples/xmlpatterns/filetree/forms/mainwindow.ui
@@ -0,0 +1,200 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>910</width>
+ <height>676</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>File Tree</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>29</y>
+ <width>910</width>
+ <height>625</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font" >
+ <font>
+ <italic>true</italic>
+ </font>
+ </property>
+ <property name="text" >
+ <string></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSplitter" name="splitter_2" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <widget class="QWidget" name="" >
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QLabel" name="treeInfo" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="fileTree" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QComboBox" name="queryBox" />
+ </item>
+ <item>
+ <widget class="QSplitter" name="splitter" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <widget class="QTextEdit" name="queryEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QTextEdit" name="output" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ <zorder>label</zorder>
+ <zorder>splitter_2</zorder>
+ <zorder>queryBox</zorder>
+ <zorder>treeInfo</zorder>
+ <zorder>splitter</zorder>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>910</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <addaction name="actionOpenDirectory" />
+ </widget>
+ <widget class="QMenu" name="menu_Help" >
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ </widget>
+ <addaction name="menuFile" />
+ <addaction name="menu_Help" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>654</y>
+ <width>910</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
+ <action name="actionOpenDirectory" >
+ <property name="text" >
+ <string>Open Directory...</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+O</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="text" >
+ <string>&amp;About</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+A</string>
+ </property>
+ </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/xmlpatterns/filetree/main.cpp b/examples/xmlpatterns/filetree/main.cpp
new file mode 100644
index 0000000..e407a45
--- /dev/null
+++ b/examples/xmlpatterns/filetree/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(queries);
+ QApplication app(argc, argv);
+ MainWindow mainWindow;
+
+ mainWindow.show();
+ return app.exec();
+}
diff --git a/examples/xmlpatterns/filetree/mainwindow.cpp b/examples/xmlpatterns/filetree/mainwindow.cpp
new file mode 100644
index 0000000..341128a
--- /dev/null
+++ b/examples/xmlpatterns/filetree/mainwindow.cpp
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QLibraryInfo>
+#include <QtXmlPatterns>
+
+#include "mainwindow.h"
+#include "xmlsyntaxhighlighter.h"
+
+//! [0]
+MainWindow::MainWindow() : m_fileTree(m_namePool)
+{
+ setupUi(this);
+
+ new XmlSyntaxHighlighter(fileTree->document());
+
+ // Set up the font.
+ {
+ QFont font("Courier",10);
+ font.setFixedPitch(true);
+
+ fileTree->setFont(font);
+ queryEdit->setFont(font);
+ output->setFont(font);
+ }
+
+ const QString dir(QLibraryInfo::location(QLibraryInfo::ExamplesPath) + "/xmlpatterns/filetree");
+ qDebug() << dir;
+
+ if (QDir(dir).exists())
+ loadDirectory(dir);
+ else
+ fileTree->setPlainText(tr("Use the Open menu entry to select a directory."));
+
+ const QStringList queries(QDir(":/queries/", "*.xq").entryList());
+ int len = queries.count();
+
+ for (int i = 0; i < len; ++i)
+ queryBox->addItem(queries.at(i));
+
+}
+//! [0]
+
+//! [2]
+void MainWindow::on_queryBox_currentIndexChanged()
+{
+ QFile queryFile(":/queries/" + queryBox->currentText());
+ queryFile.open(QIODevice::ReadOnly);
+
+ queryEdit->setPlainText(QString::fromLatin1(queryFile.readAll()));
+ evaluateResult();
+}
+//! [2]
+
+//! [3]
+void MainWindow::evaluateResult()
+{
+ if (queryBox->currentText().isEmpty())
+ return;
+
+ QXmlQuery query(m_namePool);
+ query.bindVariable("fileTree", m_fileNode);
+ query.setQuery(QUrl("qrc:/queries/" + queryBox->currentText()));
+
+ QByteArray formatterOutput;
+ QBuffer buffer(&formatterOutput);
+ buffer.open(QIODevice::WriteOnly);
+
+ QXmlFormatter formatter(query, &buffer);
+ query.evaluateTo(&formatter);
+
+ output->setText(QString::fromLatin1(formatterOutput.constData()));
+}
+//! [3]
+
+//! [1]
+void MainWindow::on_actionOpenDirectory_triggered()
+{
+ const QString directoryName = QFileDialog::getExistingDirectory(this);
+ if (!directoryName.isEmpty())
+ loadDirectory(directoryName);
+}
+//! [1]
+
+//! [4]
+//! [5]
+void MainWindow::loadDirectory(const QString &directory)
+{
+ Q_ASSERT(QDir(directory).exists());
+
+ m_fileNode = m_fileTree.nodeFor(directory);
+//! [5]
+
+ QXmlQuery query(m_namePool);
+ query.bindVariable("fileTree", m_fileNode);
+ query.setQuery(QUrl("qrc:/queries/wholeTree.xq"));
+
+ QByteArray output;
+ QBuffer buffer(&output);
+ buffer.open(QIODevice::WriteOnly);
+
+ QXmlFormatter formatter(query, &buffer);
+ query.evaluateTo(&formatter);
+
+ treeInfo->setText((QString(tr("Model of %1 output as XML.")).arg(directory)));
+ fileTree->setText(QString::fromLatin1(output.constData()));
+ evaluateResult();
+//! [6]
+}
+//! [6]
+//! [4]
+
+void MainWindow::on_actionAbout_triggered()
+{
+ QMessageBox::about(this, tr("About File Tree"),
+ tr("<p>Select <b>File->Open Directory</b> and "
+ "choose a directory. The directory is then "
+ "loaded into the model, and the model is "
+ "displayed on the left as XML.</p>"
+
+ "<p>From the query menu on the right, select "
+ "a query. The query is displayed and then run "
+ "on the model. The results are displayed below "
+ "the query.</p>"));
+}
+
+
diff --git a/examples/xmlpatterns/filetree/mainwindow.h b/examples/xmlpatterns/filetree/mainwindow.h
new file mode 100644
index 0000000..6651c80
--- /dev/null
+++ b/examples/xmlpatterns/filetree/mainwindow.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QFile>
+#include <QMainWindow>
+#include <QXmlNamePool>
+//! [0]
+#include "filetree.h"
+#include "ui_mainwindow.h"
+
+class MainWindow : public QMainWindow, private Ui_MainWindow
+{
+ Q_OBJECT
+
+ public:
+ MainWindow();
+
+ private slots:
+ void on_actionOpenDirectory_triggered();
+ void on_actionAbout_triggered();
+ void on_queryBox_currentIndexChanged();
+
+ private:
+ void loadDirectory(const QString &directory);
+ void evaluateResult();
+
+ const QXmlNamePool m_namePool;
+ const FileTree m_fileTree;
+ QXmlNodeModelIndex m_fileNode;
+};
+//! [0]
+#endif
diff --git a/examples/xmlpatterns/filetree/queries.qrc b/examples/xmlpatterns/filetree/queries.qrc
new file mode 100644
index 0000000..2e48601
--- /dev/null
+++ b/examples/xmlpatterns/filetree/queries.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC>
+ <RCC version="1.0">
+<qresource>
+ <file>queries/listCPPFiles.xq</file>
+ <file>queries/wholeTree.xq</file>
+</qresource>
+</RCC>
diff --git a/examples/xmlpatterns/filetree/queries/listCPPFiles.xq b/examples/xmlpatterns/filetree/queries/listCPPFiles.xq
new file mode 100644
index 0000000..e311d27
--- /dev/null
+++ b/examples/xmlpatterns/filetree/queries/listCPPFiles.xq
@@ -0,0 +1,19 @@
+declare variable $where as xs:string := string($fileTree/@filePath);
+<html>
+ <head>
+ <title>All cpp files in: {$where}</title>
+ </head>
+ <body>
+ <p>
+ cpp-files found in {$where} sorted by size:
+ </p>
+ <ul> {
+ for $file in $fileTree//file[@suffix = "cpp"]
+ order by xs:integer($file/@size)
+ return
+ <li>
+ {string($file/@fileName)}, size: {string($file/@size)}
+ </li>
+ } </ul>
+ </body>
+</html>
diff --git a/examples/xmlpatterns/filetree/queries/wholeTree.xq b/examples/xmlpatterns/filetree/queries/wholeTree.xq
new file mode 100644
index 0000000..ec2977b
--- /dev/null
+++ b/examples/xmlpatterns/filetree/queries/wholeTree.xq
@@ -0,0 +1 @@
+$fileTree
diff --git a/examples/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui b/examples/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui
new file mode 100644
index 0000000..ad43284
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui
@@ -0,0 +1,196 @@
+<ui version="4.0" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>QObjectXmlModel Example</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>29</y>
+ <width>800</width>
+ <height>549</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="font" >
+ <font>
+ <italic>true</italic>
+ </font>
+ </property>
+ <property name="text" >
+ <string>See the About menu entry for a description of this example.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="inheritanceTab" >
+ <property name="autoFillBackground" >
+ <bool>true</bool>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="wholeTreeTab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>778</width>
+ <height>475</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Whole QObjectTree</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QSplitter" name="splitter" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <widget class="QTextEdit" name="wholeTree" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Minimum" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QTextEdit" name="wholeTreeOutput" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="htmlTab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>778</width>
+ <height>475</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Statistics in HTML </string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QSplitter" name="splitter_2" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <widget class="QTextEdit" name="htmlQueryEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ <property name="html" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QWebView" name="htmlOutput" >
+ <property name="url" >
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>29</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuHelp" >
+ <property name="title" >
+ <string>Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ </widget>
+ <addaction name="menuHelp" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>578</y>
+ <width>800</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
+ <action name="actionAbout" >
+ <property name="text" >
+ <string>About</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+B</string>
+ </property>
+ </action>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKit/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/xmlpatterns/qobjectxmlmodel/main.cpp b/examples/xmlpatterns/qobjectxmlmodel/main.cpp
new file mode 100644
index 0000000..c73d211
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char* argv[])
+{
+ Q_INIT_RESOURCE(queries);
+ QApplication app(argc, argv);
+ MainWindow mainWindow;
+ mainWindow.show();
+ return app.exec();
+}
diff --git a/examples/xmlpatterns/qobjectxmlmodel/mainwindow.cpp b/examples/xmlpatterns/qobjectxmlmodel/mainwindow.cpp
new file mode 100644
index 0000000..056ebae
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/mainwindow.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtXmlPatterns>
+
+#include "mainwindow.h"
+#include "qobjectxmlmodel.h"
+#include "xmlsyntaxhighlighter.h"
+
+MainWindow::MainWindow()
+{
+ setupUi(this);
+
+ new XmlSyntaxHighlighter(wholeTreeOutput->document());
+
+ /* Setup the font. */
+ {
+ QFont font("Courier");
+ font.setFixedPitch(true);
+
+ wholeTree->setFont(font);
+ wholeTreeOutput->setFont(font);
+ htmlQueryEdit->setFont(font);
+ }
+
+ QXmlNamePool namePool;
+ QObjectXmlModel qObjectModel(this, namePool);
+ QXmlQuery query(namePool);
+
+ /* The QObject tree as XML view. */
+ {
+ query.bindVariable("root", qObjectModel.root());
+ query.setQuery(QUrl("qrc:/queries/wholeTree.xq"));
+
+ Q_ASSERT(query.isValid());
+ QByteArray output;
+ QBuffer buffer(&output);
+ buffer.open(QIODevice::WriteOnly);
+
+ /* Let's the use the formatter, so it's a bit easier to read. */
+ QXmlFormatter serializer(query, &buffer);
+
+ query.evaluateTo(&serializer);
+ buffer.close();
+
+ {
+ QFile queryFile(":/queries/wholeTree.xq");
+ queryFile.open(QIODevice::ReadOnly);
+ wholeTree->setPlainText(QString::fromUtf8(queryFile.readAll()));
+ wholeTreeOutput->setPlainText(QString::fromUtf8(output.constData()));
+ }
+ }
+
+ /* The QObject occurrence statistics as HTML view. */
+ {
+ query.setQuery(QUrl("qrc:/queries/statisticsInHTML.xq"));
+ Q_ASSERT(query.isValid());
+
+ QByteArray output;
+ QBuffer buffer(&output);
+ buffer.open(QIODevice::WriteOnly);
+
+ /* Let's the use the serializer, so we gain a bit of speed. */
+ QXmlSerializer serializer(query, &buffer);
+
+ query.evaluateTo(&serializer);
+ buffer.close();
+
+ {
+ QFile queryFile(":/queries/statisticsInHTML.xq");
+ queryFile.open(QIODevice::ReadOnly);
+ htmlQueryEdit->setPlainText(QString::fromUtf8(queryFile.readAll()));
+ htmlOutput->setHtml(QString(output));
+ }
+ }
+}
+
+void MainWindow::on_actionAbout_triggered()
+{
+ QMessageBox::about(this,
+ tr("About QObject XML Model"),
+ tr("<p>The <b>QObject XML Model</b> example shows "
+ "how to use XQuery on top of data of your choice "
+ "without converting it to an XML document.</p>"
+ "<p>In this example a QSimpleXmlNodeModel subclass "
+ "makes it possible to query a QObject tree using "
+ "XQuery and retrieve the result as pointers to "
+ "QObjects, or as XML.</p>"
+ "<p>A possible use case of this could be to write "
+ "an application that tests a graphical interface "
+ "against Human Interface Guidelines, or that "
+ "queries an application's data which is modeled "
+ "using a QObject tree and dynamic properties."));
+}
+
+
diff --git a/examples/xmlpatterns/qobjectxmlmodel/mainwindow.h b/examples/xmlpatterns/qobjectxmlmodel/mainwindow.h
new file mode 100644
index 0000000..362bd0e
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/mainwindow.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QFile>
+
+#include "ui_mainwindow.h"
+
+//! [0]
+class MainWindow : public QMainWindow,
+ private Ui_MainWindow
+{
+ Q_OBJECT
+
+ public:
+ MainWindow();
+
+ private slots:
+ void on_actionAbout_triggered();
+};
+//! [0]
+
+#endif
diff --git a/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp
new file mode 100644
index 0000000..3eee67a
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp
@@ -0,0 +1,459 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QVector>
+#include <QtDebug>
+
+#include <QCoreApplication>
+#include <QMetaProperty>
+#include <QXmlQuery>
+#include <QXmlResultItems>
+
+#include "qobjectxmlmodel.h"
+
+QT_BEGIN_NAMESPACE
+
+/*
+<metaObjects>
+ <metaObject className="QObject"/>
+ <metaObject className="QWidget" superClass="QObject">
+ </metaObject>
+ ...
+</metaObjects>
+<QObject objectName="MyWidget" property1="..." property2="..."> <!-- This is root() -->
+ <QObject objectName="MyFOO" property1="..."/>
+ ....
+</QObject>
+*/
+
+QObjectXmlModel::QObjectXmlModel(QObject *const object, const QXmlNamePool &np)
+ : QSimpleXmlNodeModel(np),
+ m_baseURI(QUrl::fromLocalFile(QCoreApplication::applicationFilePath())),
+ m_root(object),
+ m_allMetaObjects(allMetaObjects())
+{
+ Q_ASSERT(m_baseURI.isValid());
+}
+
+//! [5]
+QXmlNodeModelIndex QObjectXmlModel::qObjectSibling(const int pos, const QXmlNodeModelIndex &n) const
+{
+ Q_ASSERT(pos == 1 || pos == -1);
+ Q_ASSERT(asQObject(n));
+
+ const QObject *parent = asQObject(n)->parent();
+ if (parent) {
+ const QList<QObject *> &children = parent->children();
+ const int siblingPos = children.indexOf(asQObject(n)) + pos;
+
+ if (siblingPos >= 0 && siblingPos < children.count())
+ return createIndex(children.at(siblingPos));
+ else
+ return QXmlNodeModelIndex();
+ }
+ else
+ return QXmlNodeModelIndex();
+}
+//! [5]
+
+//! [1]
+QObjectXmlModel::QObjectNodeType QObjectXmlModel::toNodeType(const QXmlNodeModelIndex &n)
+{
+ return QObjectNodeType(n.additionalData() & (15 << 26));
+}
+//! [1]
+
+//! [9]
+QObjectXmlModel::AllMetaObjects QObjectXmlModel::allMetaObjects() const
+{
+ QXmlQuery query(namePool());
+ query.bindVariable("root", root());
+ query.setQuery("declare variable $root external;"
+ "$root/descendant-or-self::QObject");
+ Q_ASSERT(query.isValid());
+
+ QXmlResultItems result;
+ query.evaluateTo(&result);
+ QXmlItem i(result.next());
+
+ AllMetaObjects objects;
+ while (!i.isNull()) {
+ const QMetaObject *moo = asQObject(i.toNodeModelIndex())->metaObject();
+ while (moo) {
+ if (!objects.contains(moo))
+ objects.append(moo);
+ moo = moo->superClass();
+ }
+ i = result.next();
+ }
+
+ Q_ASSERT(!objects.contains(0));
+ return objects;
+}
+//! [9]
+
+QXmlNodeModelIndex QObjectXmlModel::metaObjectSibling(const int pos, const QXmlNodeModelIndex &n) const
+{
+ Q_ASSERT(pos == 1 || pos == -1);
+ Q_ASSERT(!n.isNull());
+
+ const int indexOf = m_allMetaObjects.indexOf(static_cast<const QMetaObject *>(n.internalPointer())) + pos;
+
+ if (indexOf >= 0 && indexOf < m_allMetaObjects.count())
+ return createIndex(const_cast<QMetaObject *>(m_allMetaObjects.at(indexOf)), MetaObject);
+ else
+ return QXmlNodeModelIndex();
+}
+
+//! [2]
+QXmlNodeModelIndex QObjectXmlModel::nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &n) const
+{
+ switch (toNodeType(n))
+ {
+ case IsQObject:
+ {
+ switch (axis)
+ {
+ case Parent:
+ return createIndex(asQObject(n)->parent());
+
+ case FirstChild:
+ {
+ if (!asQObject(n) || asQObject(n)->children().isEmpty())
+ return QXmlNodeModelIndex();
+ else
+ return createIndex(asQObject(n)->children().first());
+ }
+
+ case NextSibling:
+ return qObjectSibling(1, n);
+
+//! [10]
+ case PreviousSibling:
+ {
+ if (asQObject(n) == m_root)
+ return createIndex(qint64(0), MetaObjects);
+ else
+ return qObjectSibling(-1, n);
+ }
+//! [10]
+ }
+ Q_ASSERT(false);
+ }
+
+//! [7]
+ case QObjectClassName:
+ case QObjectProperty:
+ {
+ Q_ASSERT(axis == Parent);
+ return createIndex(asQObject(n));
+ }
+//! [7]
+//! [2]
+//! [3]
+
+//! [11]
+ case MetaObjects:
+ {
+ switch (axis)
+ {
+ case Parent:
+ return QXmlNodeModelIndex();
+ case PreviousSibling:
+ return QXmlNodeModelIndex();
+ case NextSibling:
+ return root();
+ case FirstChild:
+ {
+ return createIndex(const_cast<QMetaObject*>(m_allMetaObjects.first()),MetaObject);
+ }
+ }
+ Q_ASSERT(false);
+ }
+//! [11]
+
+ case MetaObject:
+ {
+ switch (axis)
+ {
+ case FirstChild:
+ return QXmlNodeModelIndex();
+ case Parent:
+ return createIndex(qint64(0), MetaObjects);
+ case PreviousSibling:
+ return metaObjectSibling(-1, n);
+ case NextSibling:
+ return metaObjectSibling(1, n);
+ }
+ }
+
+ case MetaObjectClassName:
+ case MetaObjectSuperClass:
+ {
+ Q_ASSERT(axis == Parent);
+ return createIndex(asQObject(n), MetaObject);
+ }
+//! [3]
+//! [4]
+ }
+
+ Q_ASSERT(false);
+ return QXmlNodeModelIndex();
+}
+//! [4]
+
+//! [6]
+QVector<QXmlNodeModelIndex> QObjectXmlModel::attributes(const QXmlNodeModelIndex& n) const
+{
+ QVector<QXmlNodeModelIndex> result;
+ QObject *const object = asQObject(n);
+
+ switch(toNodeType(n))
+ {
+ case IsQObject:
+ {
+ const QMetaObject *const metaObject = object->metaObject();
+ const int count = metaObject->propertyCount();
+ result.append(createIndex(object, QObjectClassName));
+
+ for (int i = 0; i < count; ++i) {
+ const QMetaProperty qmp(metaObject->property(i));
+ const int ii = metaObject->indexOfProperty(qmp.name());
+ if (i == ii)
+ result.append(createIndex(object, QObjectProperty | i));
+ }
+ return result;
+ }
+//! [6]
+
+ case MetaObject:
+ {
+ result.append(createIndex(object, MetaObjectClassName));
+ result.append(createIndex(object, MetaObjectSuperClass));
+ return result;
+ }
+//! [8]
+ default:
+ return QVector<QXmlNodeModelIndex>();
+ }
+}
+//! [8]
+
+QObject *QObjectXmlModel::asQObject(const QXmlNodeModelIndex &n)
+{
+ return static_cast<QObject *>(n.internalPointer());
+}
+
+bool QObjectXmlModel::isProperty(const QXmlNodeModelIndex n)
+{
+ return n.additionalData() & QObjectProperty;
+}
+
+QUrl QObjectXmlModel::documentUri(const QXmlNodeModelIndex& ) const
+{
+ return m_baseURI;
+}
+
+QXmlNodeModelIndex::NodeKind QObjectXmlModel::kind(const QXmlNodeModelIndex& n) const
+{
+ switch (toNodeType(n))
+ {
+ case IsQObject:
+ case MetaObject:
+ case MetaObjects:
+ return QXmlNodeModelIndex::Element;
+
+ case QObjectProperty:
+ case MetaObjectClassName:
+ case MetaObjectSuperClass:
+ case QObjectClassName:
+ return QXmlNodeModelIndex::Attribute;
+ }
+
+ Q_ASSERT(false);
+ return QXmlNodeModelIndex::Element;
+}
+
+QXmlNodeModelIndex::DocumentOrder QObjectXmlModel::compareOrder(const QXmlNodeModelIndex& , const QXmlNodeModelIndex& ) const
+{
+ return QXmlNodeModelIndex::Follows; // TODO
+}
+
+//! [0]
+QXmlNodeModelIndex QObjectXmlModel::root() const
+{
+ return createIndex(m_root);
+}
+//! [0]
+
+QXmlNodeModelIndex QObjectXmlModel::root(const QXmlNodeModelIndex& n) const
+{
+ QObject *p = asQObject(n);
+ Q_ASSERT(p);
+
+ do {
+ QObject *const candidate = p->parent();
+ if (candidate)
+ p = candidate;
+ else
+ break;
+ }
+ while (true);
+
+ return createIndex(p);
+}
+
+/*!
+ We simply throw all of them into a QList and
+ return an iterator over it.
+ */
+QXmlNodeModelIndex::List QObjectXmlModel::ancestors(const QXmlNodeModelIndex n) const
+{
+ const QObject *p = asQObject(n);
+ Q_ASSERT(p);
+
+ QXmlNodeModelIndex::List result;
+ do {
+ QObject *const candidate = p->parent();
+ if (candidate) {
+ result.append(createIndex(candidate, 0));
+ p = candidate;
+ }
+ else
+ break;
+ }
+ while (true);
+
+ return result;
+}
+
+QMetaProperty QObjectXmlModel::toMetaProperty(const QXmlNodeModelIndex &n)
+{
+ const int propertyOffset = n.additionalData() & (~QObjectProperty);
+ const QObject *const qo = asQObject(n);
+ return qo->metaObject()->property(propertyOffset);
+}
+
+QXmlName QObjectXmlModel::name(const QXmlNodeModelIndex &n) const
+{
+ switch (toNodeType(n))
+ {
+ case IsQObject:
+ return QXmlName(namePool(), QLatin1String("QObject"));
+ case MetaObject:
+ return QXmlName(namePool(), QLatin1String("metaObject"));
+ case QObjectClassName:
+ case MetaObjectClassName:
+ return QXmlName(namePool(), QLatin1String("className"));
+ case QObjectProperty:
+ return QXmlName(namePool(), toMetaProperty(n).name());
+ case MetaObjects:
+ return QXmlName(namePool(), QLatin1String("metaObjects"));
+ case MetaObjectSuperClass:
+ return QXmlName(namePool(), QLatin1String("superClass"));
+ }
+
+ Q_ASSERT(false);
+ return QXmlName();
+}
+
+QVariant QObjectXmlModel::typedValue(const QXmlNodeModelIndex &n) const
+{
+ switch (toNodeType(n))
+ {
+ case QObjectProperty:
+ {
+ const QVariant &candidate = toMetaProperty(n).read(asQObject(n));
+ if (isTypeSupported(candidate.type()))
+ return candidate;
+ else
+ return QVariant();
+ }
+
+ case MetaObjectClassName:
+ return QVariant(static_cast<QMetaObject*>(n.internalPointer())->className());
+
+ case MetaObjectSuperClass:
+ {
+ const QMetaObject *const superClass = static_cast<QMetaObject*>(n.internalPointer())->superClass();
+ if (superClass)
+ return QVariant(superClass->className());
+ else
+ return QVariant();
+ }
+
+ case QObjectClassName:
+ return QVariant(asQObject(n)->metaObject()->className());
+
+ default:
+ return QVariant();
+ }
+}
+
+/*!
+ Returns \c true if QVariants of type \a type can be used
+ in QtXmlPatterns, otherwise \c false.
+ */
+bool QObjectXmlModel::isTypeSupported(QVariant::Type type)
+{
+ /* See data/qatomicvalue.cpp too. */
+ switch (type)
+ {
+ /* Fallthrough all these. */
+ case QVariant::Char:
+ case QVariant::String:
+ case QVariant::Url:
+ case QVariant::Bool:
+ case QVariant::ByteArray:
+ case QVariant::Int:
+ case QVariant::LongLong:
+ case QVariant::ULongLong:
+ case QVariant::Date:
+ case QVariant::DateTime:
+ case QVariant::Time:
+ case QVariant::Double:
+ return true;
+ default:
+ return false;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h
new file mode 100644
index 0000000..2c2b468
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef Patternist_QObjectNodeModel_H
+#define Patternist_QObjectNodeModel_H
+
+#include <QSimpleXmlNodeModel>
+
+QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
+class QObject;
+class PropertyToAtomicValue;
+
+/**
+ * @short Delegates QtCore's QObject into Patternist's QAbstractXmlNodeModel.
+ * known as pre/post numbering.
+ *
+ * QObjectXmlModel sets the toggle on QXmlNodeModelIndex to @c true, if it
+ * represents a property of the QObject. That is, if the QXmlNodeModelIndex is
+ * an attribute.
+ *
+ * @author Frans Englich <fenglich@trolltech.com>
+ */
+class QObjectXmlModel : public QSimpleXmlNodeModel
+{
+ public:
+ QObjectXmlModel(QObject *const object, const QXmlNamePool &np);
+
+ QXmlNodeModelIndex root() const;
+
+//! [0]
+ virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex &n1, const QXmlNodeModelIndex &n2) const;
+ virtual QXmlName name(const QXmlNodeModelIndex &n) const;
+ virtual QUrl documentUri(const QXmlNodeModelIndex &n) const;
+ virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &n) const;
+ virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &n) const;
+ virtual QVariant typedValue(const QXmlNodeModelIndex &n) const;
+ virtual QVector<QXmlNodeModelIndex> attributes(const QXmlNodeModelIndex&) const;
+ virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis, const QXmlNodeModelIndex&) const;
+//! [0]
+
+ private:
+ /**
+ * The highest three bits are used to signify whether the node index
+ * is an artificial node.
+ *
+ * @short if QXmlNodeModelIndex::additionalData() has the
+ * QObjectPropery flag set, then the QXmlNodeModelIndex is an
+ * attribute of the QObject element, and the remaining bits form
+ * an offset to the QObject property that the QXmlNodeModelIndex
+ * refers to.
+ *
+ */
+//! [3]
+ enum QObjectNodeType
+ {
+ IsQObject = 0,
+ QObjectProperty = 1 << 26,
+ MetaObjects = 2 << 26,
+ MetaObject = 3 << 26,
+ MetaObjectClassName = 4 << 26,
+ MetaObjectSuperClass = 5 << 26,
+ QObjectClassName = 6 << 26
+ };
+//! [3]
+
+//! [1]
+ typedef QVector<const QMetaObject *> AllMetaObjects;
+//! [1]
+ AllMetaObjects allMetaObjects() const;
+
+ static QObjectNodeType toNodeType(const QXmlNodeModelIndex &n);
+ static bool isTypeSupported(QVariant::Type type);
+ static inline QObject *asQObject(const QXmlNodeModelIndex &n);
+ static inline bool isProperty(const QXmlNodeModelIndex n);
+ static inline QMetaProperty toMetaProperty(const QXmlNodeModelIndex &n);
+ /**
+ * Returns the ancestors of @p n. Does therefore not include
+ * @p n.
+ */
+ inline QXmlNodeModelIndex::List ancestors(const QXmlNodeModelIndex n) const;
+ QXmlNodeModelIndex qObjectSibling(const int pos,
+ const QXmlNodeModelIndex &n) const;
+ QXmlNodeModelIndex metaObjectSibling(const int pos,
+ const QXmlNodeModelIndex &n) const;
+
+//! [2]
+ const QUrl m_baseURI;
+ QObject *const m_root;
+//! [4]
+ const AllMetaObjects m_allMetaObjects;
+//! [4]
+//! [2]
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro
new file mode 100644
index 0000000..39f0106
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro
@@ -0,0 +1,13 @@
+
+FORMS += forms/mainwindow.ui
+QT += xmlpatterns webkit
+SOURCES += qobjectxmlmodel.cpp main.cpp mainwindow.cpp ../shared/xmlsyntaxhighlighter.cpp
+HEADERS += qobjectxmlmodel.h mainwindow.h ../shared/xmlsyntaxhighlighter.h
+RESOURCES = queries.qrc
+INCLUDEPATH += ../shared/
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/qobjectxmlmodel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xq *.html
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/qobjectxmlmodel
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/qobjectxmlmodel/queries.qrc b/examples/xmlpatterns/qobjectxmlmodel/queries.qrc
new file mode 100644
index 0000000..ec8cc6b
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/queries.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC>
+ <RCC version="1.0">
+<qresource>
+ <file>queries/wholeTree.xq</file>
+ <file>queries/statisticsInHTML.xq</file>
+</qresource>
+</RCC>
diff --git a/examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq b/examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq
new file mode 100644
index 0000000..14a7a14
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq
@@ -0,0 +1,58 @@
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <p>In total the tree has {count($root//QObject)} QObject instances.</p>
+ <p>Order by occurrence, the QObjects are:</p>
+
+ <ol>
+ {
+ for $i in $root/preceding-sibling::metaObjects/metaObject
+ let $count := count($root//QObject[@className eq $i/@className])
+ stable order by $count descending
+ return if($count > 1)
+ then <li>{string($i/@className), $count} occurrences</li>
+ else ()
+ }
+ </ol>
+
+ <h1>Properties</h1>
+ {
+ (: For each QObject, we create a table listing
+ : the properties of that object. :)
+ for $object in $root//QObject
+ return (<h2>{let $name := string($object/@objectName)
+ return if(string-length($name))
+ then $name
+ else "[no name]",
+ '(', string($object/@className), ')'}</h2>,
+ <table border="1">
+ <thead>
+ <tr>
+ <td>Property Name</td>
+ <td>Value</td>
+ </tr>
+ </thead>
+ <tbody>
+ {
+ $object/@*/<tr>
+ <td>
+ {
+ name()
+ }
+ </td>
+ <td>
+ {
+ if(data(.))
+ then string(.)
+ else "N/A"
+ }
+ </td>
+ </tr>
+ }
+ </tbody>
+ </table>)
+ }
+ </body>
+</html>
diff --git a/examples/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq b/examples/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq
new file mode 100644
index 0000000..253cd43
--- /dev/null
+++ b/examples/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq
@@ -0,0 +1,3 @@
+<!-- This is the QObject tree for this application, rendered as XML. -->,
+$root/preceding-sibling::metaObjects,
+$root
diff --git a/examples/xmlpatterns/recipes/files/allRecipes.xq b/examples/xmlpatterns/recipes/files/allRecipes.xq
new file mode 100644
index 0000000..6888c31
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/allRecipes.xq
@@ -0,0 +1,4 @@
+(: Select all recipes. :)
+declare variable $inputDocument external;
+
+doc($inputDocument)/cookbook/recipe/<p>{string(title)}</p>
diff --git a/examples/xmlpatterns/recipes/files/cookbook.xml b/examples/xmlpatterns/recipes/files/cookbook.xml
new file mode 100644
index 0000000..3b6f621
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/cookbook.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cookbook>
+ <recipe xml:id="MushroomSoup">
+ <title>Quick and Easy Mushroom Soup</title>
+ <ingredient name="Fresh mushrooms"
+ quantity="7"
+ unit="pieces"/>
+ <ingredient name="Garlic"
+ quantity="1"
+ unit="cloves"/>
+ <ingredient name="Olive oil"
+ quantity="2"
+ unit="tablespoons"/>
+ <ingredient name="Milk"
+ quantity="200"
+ unit="milliliters"/>
+ <ingredient name="Water"
+ quantity="200"
+ unit="milliliters"/>
+ <ingredient name="Cream"
+ quantity="100"
+ unit="milliliters"/>
+ <ingredient name="Vegetable soup cube"
+ quantity="1/2"
+ unit="cubes"/>
+ <ingredient name="Ground black pepper"
+ quantity="1/2"
+ unit="teaspoons"/>
+ <ingredient name="Dried parsley"
+ quantity="1"
+ unit="teaspoons"/>
+ <time quantity="20"
+ unit="minutes"/>
+ <method>
+ <step>1. Slice mushrooms and garlic.</step>
+ <step>2. Fry mushroom slices and garlic with olive oil.</step>
+ <step>3. Once mushrooms are cooked, add milk, cream water. Stir.</step>
+ <step>4. Add vegetable soup cube.</step>
+ <step>5. Reduce heat, add pepper and parsley.</step>
+ <step>6. Turn off the stove before the mixture boils.</step>
+ <step>7. Blend the mixture.</step>
+ </method>
+ </recipe>
+ <recipe xml:id="CheeseOnToast">
+ <title>Cheese on Toast</title>
+ <ingredient name="Bread"
+ quantity="2"
+ unit="slices"/>
+ <ingredient name="Cheese"
+ quantity="2"
+ unit="slices"/>
+ <time quantity="3"
+ unit="minutes"/>
+ <method>
+ <step>1. Slice the bread and cheese.</step>
+ <step>2. Grill one side of each slice of bread.</step>
+ <step>3. Turn over the bread and place a slice of cheese on each piece.</step>
+ <step>4. Grill until the cheese has started to melt.</step>
+ <step>5. Serve and enjoy!</step>
+ </method>
+ </recipe>
+</cookbook>
diff --git a/examples/xmlpatterns/recipes/files/liquidIngredientsInSoup.xq b/examples/xmlpatterns/recipes/files/liquidIngredientsInSoup.xq
new file mode 100644
index 0000000..3baecd8
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/liquidIngredientsInSoup.xq
@@ -0,0 +1,5 @@
+(: All liquid ingredients form Mushroom Soup. :)
+declare variable $inputDocument external;
+
+doc($inputDocument)/cookbook/recipe[@xml:id = "MushroomSoup"]/ingredient[@unit = "milliliters"]/
+<p>{@name, @quantity, @unit}</p>
diff --git a/examples/xmlpatterns/recipes/files/mushroomSoup.xq b/examples/xmlpatterns/recipes/files/mushroomSoup.xq
new file mode 100644
index 0000000..b1fee34
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/mushroomSoup.xq
@@ -0,0 +1,5 @@
+(: All ingredients for Mushroom Soup. :)
+declare variable $inputDocument external;
+
+doc($inputDocument)/cookbook/recipe[@xml:id = "MushroomSoup"]/ingredient/
+<p>{@name, @quantity}</p>
diff --git a/examples/xmlpatterns/recipes/files/preparationLessThan30.xq b/examples/xmlpatterns/recipes/files/preparationLessThan30.xq
new file mode 100644
index 0000000..d74a4eb
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/preparationLessThan30.xq
@@ -0,0 +1,9 @@
+(: All recipes taking 10 minutes or less to prepare. :)
+declare variable $inputDocument external;
+
+doc($inputDocument)/cookbook/recipe/time[@unit = "minutes" and xs:integer(@quantity) <= 10]/
+<p>
+ {
+ concat(../title, ' (', @quantity, ' ', @unit, ')')
+ }
+</p>
diff --git a/examples/xmlpatterns/recipes/files/preparationTimes.xq b/examples/xmlpatterns/recipes/files/preparationTimes.xq
new file mode 100644
index 0000000..cb4217f
--- /dev/null
+++ b/examples/xmlpatterns/recipes/files/preparationTimes.xq
@@ -0,0 +1,5 @@
+(: All recipes with preparation times. :)
+declare variable $inputDocument external;
+
+doc($inputDocument)/cookbook/recipe/
+<recipe title="{title}" time="{time/@quantity} {time/@unit}"/>
diff --git a/examples/xmlpatterns/recipes/forms/querywidget.ui b/examples/xmlpatterns/recipes/forms/querywidget.ui
new file mode 100644
index 0000000..fb2ab64
--- /dev/null
+++ b/examples/xmlpatterns/recipes/forms/querywidget.ui
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>QueryWidget</class>
+ <widget class="QMainWindow" name="QueryWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>570</width>
+ <height>531</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Recipes XQuery Example</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="inputGroupBox">
+ <property name="minimumSize">
+ <size>
+ <width>550</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Input Document</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QVBoxLayout" name="_2">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="inputTextEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="queryGroupBox">
+ <property name="minimumSize">
+ <size>
+ <width>550</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Select your query:</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QComboBox" name="defaultQueries"/>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="queryTextEdit">
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="acceptRichText">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="outputGroupBox">
+ <property name="minimumSize">
+ <size>
+ <width>550</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Output Document</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <layout class="QVBoxLayout" name="_3">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="outputTextEdit">
+ <property name="minimumSize">
+ <size>
+ <width>500</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="acceptRichText">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>570</width>
+ <height>26</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/xmlpatterns/recipes/main.cpp b/examples/xmlpatterns/recipes/main.cpp
new file mode 100644
index 0000000..ee0698f
--- /dev/null
+++ b/examples/xmlpatterns/recipes/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "querymainwindow.h"
+
+//! [0]
+int main(int argc, char* argv[])
+{
+ Q_INIT_RESOURCE(recipes);
+ QApplication app(argc, argv);
+ QueryMainWindow* const queryWindow = new QueryMainWindow;
+ queryWindow->show();
+ return app.exec();
+}
+//! [0]
diff --git a/examples/xmlpatterns/recipes/querymainwindow.cpp b/examples/xmlpatterns/recipes/querymainwindow.cpp
new file mode 100644
index 0000000..0438ab9
--- /dev/null
+++ b/examples/xmlpatterns/recipes/querymainwindow.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtXmlPatterns>
+
+#include "querymainwindow.h"
+#include "xmlsyntaxhighlighter.h"
+
+//! [0]
+QueryMainWindow::QueryMainWindow() : ui_defaultQueries(0)
+{
+ setupUi(this);
+
+ new XmlSyntaxHighlighter(qFindChild<QTextEdit*>(this, "inputTextEdit")->document());
+ new XmlSyntaxHighlighter(qFindChild<QTextEdit*>(this, "outputTextEdit")->document());
+
+ ui_defaultQueries = qFindChild<QComboBox*>(this, "defaultQueries");
+ QMetaObject::connectSlotsByName(this);
+ connect(ui_defaultQueries, SIGNAL(currentIndexChanged(int)), SLOT(displayQuery(int)));
+
+ loadInputFile();
+ const QStringList queries(QDir(":/files/", "*.xq").entryList());
+ int len = queries.count();
+ for(int i = 0; i < len; ++i)
+ ui_defaultQueries->addItem(queries.at(i));
+}
+//! [0]
+
+
+//! [1]
+void QueryMainWindow::displayQuery(int index)
+{
+ QFile queryFile(QString(":files/") + ui_defaultQueries->itemText(index));
+ queryFile.open(QIODevice::ReadOnly);
+ const QString query(QString::fromLatin1(queryFile.readAll()));
+ qFindChild<QTextEdit*>(this, "queryTextEdit")->setPlainText(query);
+
+ evaluate(query);
+}
+//! [1]
+
+
+void QueryMainWindow::loadInputFile()
+{
+ QFile forView;
+ forView.setFileName(":/files/cookbook.xml");
+ if (!forView.open(QIODevice::ReadOnly)) {
+ QMessageBox::information(this,
+ tr("Unable to open file"), forView.errorString());
+ return;
+ }
+
+ QTextStream in(&forView);
+ QString inputDocument = in.readAll();
+ qFindChild<QTextEdit*>(this, "inputTextEdit")->setPlainText(inputDocument);
+}
+
+
+//! [2]
+void QueryMainWindow::evaluate(const QString &str)
+{
+ QFile sourceDocument;
+ sourceDocument.setFileName(":/files/cookbook.xml");
+ sourceDocument.open(QIODevice::ReadOnly);
+
+ QByteArray outArray;
+ QBuffer buffer(&outArray);
+ buffer.open(QIODevice::ReadWrite);
+
+ QXmlQuery query;
+ query.bindVariable("inputDocument", &sourceDocument);
+ query.setQuery(str);
+ if (!query.isValid())
+ return;
+
+ QXmlFormatter formatter(query, &buffer);
+ if (!query.evaluateTo(&formatter))
+ return;
+
+ buffer.close();
+ qFindChild<QTextEdit*>(this, "outputTextEdit")->setPlainText(QString::fromUtf8(outArray.constData()));
+
+}
+//! [2]
+
diff --git a/examples/xmlpatterns/recipes/querymainwindow.h b/examples/xmlpatterns/recipes/querymainwindow.h
new file mode 100644
index 0000000..2c85932
--- /dev/null
+++ b/examples/xmlpatterns/recipes/querymainwindow.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QUERYMAINWINDOW_H
+#define QUERYMAINWINDOW_H
+
+#include <QMainWindow>
+
+#include "ui_querywidget.h"
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+QT_END_NAMESPACE
+
+//! [0]
+class QueryMainWindow : public QMainWindow,
+ private Ui::QueryWidget
+{
+ Q_OBJECT
+
+ public:
+ QueryMainWindow();
+
+ public slots:
+ void displayQuery(int index);
+
+ private:
+ QComboBox* ui_defaultQueries;
+
+ void evaluate(const QString &str);
+ void loadInputFile();
+};
+//! [0]
+#endif
diff --git a/examples/xmlpatterns/recipes/recipes.pro b/examples/xmlpatterns/recipes/recipes.pro
new file mode 100644
index 0000000..87708a9
--- /dev/null
+++ b/examples/xmlpatterns/recipes/recipes.pro
@@ -0,0 +1,11 @@
+QT += xmlpatterns
+FORMS += forms/querywidget.ui
+HEADERS = querymainwindow.h ../shared/xmlsyntaxhighlighter.h
+RESOURCES = recipes.qrc
+SOURCES = main.cpp querymainwindow.cpp ../shared/xmlsyntaxhighlighter.cpp
+INCLUDEPATH += ../shared/
+
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/recipes
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xq *.html forms files
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/recipes
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/recipes/recipes.qrc b/examples/xmlpatterns/recipes/recipes.qrc
new file mode 100644
index 0000000..2f375ee
--- /dev/null
+++ b/examples/xmlpatterns/recipes/recipes.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>forms/querywidget.ui</file>
+ <file>files/cookbook.xml</file>
+ <file>files/allRecipes.xq</file>
+ <file>files/liquidIngredientsInSoup.xq</file>
+ <file>files/mushroomSoup.xq</file>
+ <file>files/preparationLessThan30.xq</file>
+ <file>files/preparationTimes.xq</file>
+</qresource>
+</RCC>
diff --git a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
new file mode 100644
index 0000000..c796f81
--- /dev/null
+++ b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xmlsyntaxhighlighter.h"
+
+XmlSyntaxHighlighter::XmlSyntaxHighlighter(QTextDocument *parent)
+ : QSyntaxHighlighter(parent)
+{
+ HighlightingRule rule;
+
+ // tag format
+ tagFormat.setForeground(Qt::darkBlue);
+ tagFormat.setFontWeight(QFont::Bold);
+ rule.pattern = QRegExp("(<[a-zA-Z:]+\\b|<\\?[a-zA-Z:]+\\b|\\?>|>|/>|</[a-zA-Z:]+>)");
+ rule.format = tagFormat;
+ highlightingRules.append(rule);
+
+ // attribute format
+ attributeFormat.setForeground(Qt::darkGreen);
+ rule.pattern = QRegExp("[a-zA-Z:]+=");
+ rule.format = attributeFormat;
+ highlightingRules.append(rule);
+
+ // attribute content format
+ attributeContentFormat.setForeground(Qt::red);
+ rule.pattern = QRegExp("(\"[^\"]*\"|'[^']*')");
+ rule.format = attributeContentFormat;
+ highlightingRules.append(rule);
+
+ commentFormat.setForeground(Qt::lightGray);
+ commentFormat.setFontItalic(true);
+
+ commentStartExpression = QRegExp("<!--");
+ commentEndExpression = QRegExp("-->");
+}
+
+void XmlSyntaxHighlighter::highlightBlock(const QString &text)
+{
+ foreach (const HighlightingRule &rule, highlightingRules) {
+ QRegExp expression(rule.pattern);
+ int index = text.indexOf(expression);
+ while (index >= 0) {
+ int length = expression.matchedLength();
+ setFormat(index, length, rule.format);
+ index = text.indexOf(expression, index + length);
+ }
+ }
+ setCurrentBlockState(0);
+
+ int startIndex = 0;
+ if (previousBlockState() != 1)
+ startIndex = text.indexOf(commentStartExpression);
+
+ while (startIndex >= 0) {
+ int endIndex = text.indexOf(commentEndExpression, startIndex);
+ int commentLength;
+ if (endIndex == -1) {
+ setCurrentBlockState(1);
+ commentLength = text.length() - startIndex;
+ } else {
+ commentLength = endIndex - startIndex
+ + commentEndExpression.matchedLength();
+ }
+ setFormat(startIndex, commentLength, commentFormat);
+ startIndex = text.indexOf(commentStartExpression,
+ startIndex + commentLength);
+ }
+}
diff --git a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h
new file mode 100644
index 0000000..5fe9aa4
--- /dev/null
+++ b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef XMLSYNTAXHIGHLIGHTER_H
+#define XMLSYNTAXHIGHLIGHTER_H
+
+#include <QtGui/QSyntaxHighlighter>
+
+class XmlSyntaxHighlighter : public QSyntaxHighlighter
+{
+ public:
+ XmlSyntaxHighlighter(QTextDocument *parent = 0);
+
+ protected:
+ virtual void highlightBlock(const QString &text);
+
+ private:
+ struct HighlightingRule
+ {
+ QRegExp pattern;
+ QTextCharFormat format;
+ };
+ QVector<HighlightingRule> highlightingRules;
+
+ QRegExp commentStartExpression;
+ QRegExp commentEndExpression;
+
+ QTextCharFormat tagFormat;
+ QTextCharFormat attributeFormat;
+ QTextCharFormat attributeContentFormat;
+ QTextCharFormat commentFormat;
+};
+
+#endif
diff --git a/examples/xmlpatterns/trafficinfo/main.cpp b/examples/xmlpatterns/trafficinfo/main.cpp
new file mode 100644
index 0000000..97b2bf7
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QtGui/QApplication>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
new file mode 100644
index 0000000..c4ca731
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "stationdialog.h"
+
+#include <QtCore/QSettings>
+#include <QtCore/QTimer>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QBitmap>
+#include <QtGui/QLinearGradient>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QPainter>
+
+MainWindow::MainWindow()
+ : QWidget(0, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
+{
+ QAction *quitAction = new QAction(tr("E&xit"), this);
+ quitAction->setShortcut(tr("Ctrl+Q"));
+ connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+
+ QAction *configAction = new QAction(tr("&Select station..."), this);
+ configAction->setShortcut(tr("Ctrl+C"));
+ connect(configAction, SIGNAL(triggered()), this, SLOT(configure()));
+
+ addAction(configAction);
+ addAction(quitAction);
+
+ setContextMenuPolicy(Qt::ActionsContextMenu);
+
+ setWindowTitle(tr("Traffic Info Oslo"));
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(updateTimeInformation()));
+ timer->start(1000*60);
+
+ const QSettings settings("Qt Software", "trafficinfo");
+ m_station = StationInformation(settings.value("stationId", "03012130").toString(),
+ settings.value("stationName", "Nydalen [T-bane] (OSL)").toString());
+ m_lines = settings.value("lines", QStringList()).toStringList();
+
+ updateTimeInformation();
+}
+
+MainWindow::~MainWindow()
+{
+ QSettings settings("Qt Software", "trafficinfo");
+ settings.setValue("stationId", m_station.id());
+ settings.setValue("stationName", m_station.name());
+ settings.setValue("lines", m_lines);
+}
+
+QSize MainWindow::sizeHint() const
+{
+ return QSize(300, 200);
+}
+
+void MainWindow::mouseMoveEvent(QMouseEvent *event)
+{
+ if (event->buttons() & Qt::LeftButton) {
+ move(event->globalPos() - m_dragPosition);
+ event->accept();
+ }
+}
+
+void MainWindow::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ m_dragPosition = event->globalPos() - frameGeometry().topLeft();
+ event->accept();
+ }
+}
+
+void MainWindow::paintEvent(QPaintEvent*)
+{
+ QLinearGradient gradient(QPoint(width()/2, 0), QPoint(width()/2, height()));
+ const QColor qtGreen(102, 176, 54);
+ gradient.setColorAt(0, qtGreen.dark());
+ gradient.setColorAt(0.5, qtGreen);
+ gradient.setColorAt(1, qtGreen.dark());
+
+ QPainter p(this);
+ p.fillRect(0, 0, width(), height(), gradient);
+
+ QFont headerFont("Sans Serif", 12, QFont::Bold);
+ QFont normalFont("Sans Serif", 9, QFont::Normal);
+
+ // draw it twice for shadow effect
+ p.setFont(headerFont);
+ QRect headerRect(1, 1, width(), 25);
+ p.setPen(Qt::black);
+ p.drawText(headerRect, Qt::AlignCenter, m_station.name());
+
+ headerRect.moveTopLeft(QPoint(0, 0));
+ p.setPen(Qt::white);
+ p.drawText(headerRect, Qt::AlignCenter, m_station.name());
+
+ p.setFont(normalFont);
+ int pos = 40;
+ for (int i = 0; i < m_times.count() && i < 9; ++i) {
+ p.setPen(Qt::black);
+ p.drawText(51, pos + 1, m_times.at(i).time());
+ p.drawText(101, pos + 1, m_times.at(i).direction());
+
+ p.setPen(Qt::white);
+ p.drawText(50, pos, m_times.at(i).time());
+ p.drawText(100, pos, m_times.at(i).direction());
+
+ pos += 18;
+ }
+}
+
+void MainWindow::resizeEvent(QResizeEvent*)
+{
+ QBitmap maskBitmap(width(), height());
+ maskBitmap.clear();
+
+ QPainter p(&maskBitmap);
+ p.setBrush(Qt::black);
+ p.drawRoundRect(0, 0, width(), height(), 20, 30);
+ p.end();
+
+ setMask(maskBitmap);
+}
+
+void MainWindow::updateTimeInformation()
+{
+ TimeQuery query;
+ m_times = query.query(m_station.id(), m_lines, QDateTime::currentDateTime());
+
+ update();
+}
+
+void MainWindow::configure()
+{
+ StationDialog dlg(m_station.name(), m_lines, this);
+ if (dlg.exec()) {
+ m_station = dlg.selectedStation();
+ m_lines = dlg.lineNumbers();
+ updateTimeInformation();
+ }
+}
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.h b/examples/xmlpatterns/trafficinfo/mainwindow.h
new file mode 100644
index 0000000..d48109d
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include "stationquery.h"
+#include "timequery.h"
+
+#include <QtGui/QWidget>
+
+class MainWindow : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ MainWindow();
+ ~MainWindow();
+
+ QSize sizeHint() const;
+
+ protected:
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+ private Q_SLOTS:
+ void updateTimeInformation();
+ void configure();
+
+ private:
+ QPoint m_dragPosition;
+ TimeInformation::List m_times;
+ StationInformation m_station;
+ QStringList m_lines;
+};
+
+#endif
diff --git a/examples/xmlpatterns/trafficinfo/station_example.wml b/examples/xmlpatterns/trafficinfo/station_example.wml
new file mode 100644
index 0000000..da7f82f
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/station_example.wml
@@ -0,0 +1,31 @@
+//! [0]
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
+<wml>
+<template>
+ <do type="prev" name="b" label="Tilbake"><prev/></do>
+ <do type="options" label="Nytt søk"><go href="velkommen.wml"/></do>
+</template>
+<card id="Liste" title="Trafikanten">
+<p>
+<small>
+Velg stoppsted: <br />
+
+ <a title="Velg" href="DateLink.asp?fra=05280320">Nydalen (Østre Toten) (Ø-T)</a><br />
+
+ <a title="Velg" href="DateLink.asp?fra=03012126">Nydalen st. (i Store ringvei) (OSL)</a><br />
+
+ <a title="Velg" href="DateLink.asp?fra=03012131">Nydalen T [buss] (OSL)</a><br />
+
+ <a title="Velg" href="DateLink.asp?fra=03012130">Nydalen [T-bane] (OSL)</a><br />
+
+ <a title="Velg" href="DateLink.asp?fra=03012125">Nydalen [tog] (OSL)</a><br />
+
+<br/>
+<a title="Nytt søk" href="Velkommen.wml">"Nytt søk"</a>
+<br/>
+</small>
+</p>
+</card>
+</wml>
+//! [0]
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
new file mode 100644
index 0000000..9876bdb
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "stationdialog.h"
+#include "ui_stationdialog.h"
+
+#include <QtCore/QAbstractListModel>
+
+class StationModel : public QAbstractListModel
+{
+ public:
+ enum Role
+ {
+ StationIdRole = Qt::UserRole + 1,
+ StationNameRole
+ };
+
+ StationModel(QObject *parent = 0)
+ : QAbstractListModel(parent)
+ {
+ }
+
+ void setStations(const StationInformation::List &list)
+ {
+ m_stations = list;
+ layoutChanged();
+ }
+
+ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const
+ {
+ if (!parent.isValid())
+ return m_stations.count();
+ else
+ return 0;
+ }
+
+ virtual int columnCount(const QModelIndex &parent = QModelIndex()) const
+ {
+ if (!parent.isValid())
+ return 1;
+ else
+ return 0;
+ }
+
+ virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const
+ {
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.column() > 1 || index.row() >= m_stations.count())
+ return QVariant();
+
+ const StationInformation info = m_stations.at(index.row());
+ if (role == Qt::DisplayRole || role == StationNameRole)
+ return info.name();
+ else if (role == StationIdRole)
+ return info.id();
+
+ return QVariant();
+ }
+
+ private:
+ StationInformation::List m_stations;
+};
+
+StationDialog::StationDialog(const QString &name, const QStringList &lineNumbers, QWidget *parent)
+ : QDialog(parent)
+{
+ m_ui.setupUi(this);
+
+ connect(m_ui.m_searchButton, SIGNAL(clicked()), this, SLOT(searchStations()));
+
+ m_ui.m_searchButton->setDefault(true);
+ m_ui.m_input->setText(name);
+
+ m_model = new StationModel(this);
+ m_ui.m_view->setModel(m_model);
+
+ for (int i = 0; i < lineNumbers.count(); ++i) {
+ if (i == 0)
+ m_ui.m_line1->setText(lineNumbers.at(i));
+ else if (i == 1)
+ m_ui.m_line2->setText(lineNumbers.at(i));
+ else if (i == 2)
+ m_ui.m_line3->setText(lineNumbers.at(i));
+ else if (i == 3)
+ m_ui.m_line4->setText(lineNumbers.at(i));
+ }
+
+ searchStations();
+}
+
+StationInformation StationDialog::selectedStation() const
+{
+ const QModelIndex index = m_ui.m_view->currentIndex();
+
+ if (!index.isValid())
+ return StationInformation();
+
+ return StationInformation(index.data(StationModel::StationIdRole).toString(),
+ index.data(StationModel::StationNameRole).toString());
+}
+
+QStringList StationDialog::lineNumbers() const
+{
+ QStringList lines;
+
+ if (!m_ui.m_line1->text().simplified().isEmpty())
+ lines.append(m_ui.m_line1->text().simplified());
+ if (!m_ui.m_line2->text().simplified().isEmpty())
+ lines.append(m_ui.m_line2->text().simplified());
+ if (!m_ui.m_line3->text().simplified().isEmpty())
+ lines.append(m_ui.m_line3->text().simplified());
+ if (!m_ui.m_line4->text().simplified().isEmpty())
+ lines.append(m_ui.m_line4->text().simplified());
+
+ return lines;
+}
+
+void StationDialog::searchStations()
+{
+ StationQuery query;
+
+ m_model->setStations(query.query(m_ui.m_input->text()));
+ m_ui.m_view->keyboardSearch(m_ui.m_input->text());
+}
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.h b/examples/xmlpatterns/trafficinfo/stationdialog.h
new file mode 100644
index 0000000..5ac1635
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STATIONDIALOG_H
+#define STATIONDIALOG_H
+
+#include <QtGui/QDialog>
+
+#include "stationquery.h"
+#include "ui_stationdialog.h"
+
+class StationModel;
+
+class StationDialog : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ StationDialog(const QString &id, const QStringList &lineNumbers, QWidget *parent);
+
+ StationInformation selectedStation() const;
+ QStringList lineNumbers() const;
+
+ private Q_SLOTS:
+ void searchStations();
+
+ private:
+ Ui_StationDialog m_ui;
+ StationModel *m_model;
+};
+
+#endif
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.ui b/examples/xmlpatterns/trafficinfo/stationdialog.ui
new file mode 100644
index 0000000..254dedb
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.ui
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>StationDialog</class>
+ <widget class="QDialog" name="StationDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>462</width>
+ <height>391</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Select Station</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLineEdit" name="m_input"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="m_searchButton">
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QListView" name="m_view"/>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Lines:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="m_line1"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="m_line2"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="m_line3"/>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="m_line4"/>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>StationDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>228</x>
+ <y>373</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>StationDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>296</x>
+ <y>372</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.cpp b/examples/xmlpatterns/trafficinfo/stationquery.cpp
new file mode 100644
index 0000000..ab42ad9
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/stationquery.cpp
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "stationquery.h"
+
+#include <QtCore/QStringList>
+#include <QtXmlPatterns/QXmlQuery>
+
+StationInformation::StationInformation()
+{
+}
+
+StationInformation::StationInformation(const QString &id, const QString &name)
+ : m_id(id), m_name(name)
+{
+}
+
+QString StationInformation::id() const
+{
+ return m_id;
+}
+
+QString StationInformation::name() const
+{
+ return m_name;
+}
+
+//! [0]
+StationInformation::List StationQuery::query(const QString &name)
+{
+ const QString stationIdQueryUrl = QString("doc(concat('http://wap.trafikanten.no/FromLink1.asp?fra=', $station))/wml/card/p/small/a[@title='Velg']/substring(@href,18)");
+ const QString stationNameQueryUrl = QString("doc(concat('http://wap.trafikanten.no/FromLink1.asp?fra=', $station))/wml/card/p/small/a[@title='Velg']/string()");
+
+ QStringList stationIds;
+ QStringList stationNames;
+
+ QXmlQuery query;
+
+ query.bindVariable("station", QVariant(QString::fromLatin1(QUrl::toPercentEncoding(name))));
+ query.setQuery(stationIdQueryUrl);
+ query.evaluateTo(&stationIds);
+
+ query.bindVariable("station", QVariant(QString::fromLatin1(QUrl::toPercentEncoding(name))));
+ query.setQuery(stationNameQueryUrl);
+ query.evaluateTo(&stationNames);
+
+ if (stationIds.count() != stationNames.count()) // something went wrong...
+ return StationInformation::List();
+
+ StationInformation::List information;
+ for (int i = 0; i < stationIds.count(); ++i)
+ information.append(StationInformation(stationIds.at(i), stationNames.at(i)));
+
+ return information;
+}
+//! [0]
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.h b/examples/xmlpatterns/trafficinfo/stationquery.h
new file mode 100644
index 0000000..5cbf28a
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/stationquery.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STATIONQUERY_H
+#define STATIONQUERY_H
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+//! [0]
+class StationInformation
+{
+ public:
+ typedef QList<StationInformation> List;
+
+ StationInformation();
+ StationInformation(const QString &id, const QString &name);
+
+ QString id() const;
+ QString name() const;
+
+ private:
+ QString m_id;
+ QString m_name;
+};
+//! [0]
+
+//! [1]
+class StationQuery
+{
+ public:
+ static StationInformation::List query(const QString &name);
+};
+//! [1]
+
+#endif
diff --git a/examples/xmlpatterns/trafficinfo/time_example.wml b/examples/xmlpatterns/trafficinfo/time_example.wml
new file mode 100644
index 0000000..75e3408
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/time_example.wml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
+<wml>
+<template>
+ <do type="prev" name="b" label="Tilbake"><prev/></do>
+ <do type="options" name="n" label="Nytt søk"><go href="velkommen.wml"/></do>
+</template>
+<card id="Liste" title="Trafikanten">
+<p>
+<small>
+Fra Nydalen [T-bane]:<br />
+
+ <a href="Rute.asp?d=3011030&amp;t=21832&amp;l=4&amp;Start=1">13.00</a>
+ 4 Bergkrystallen [T-bane]<br />
+
+ <a href="Rute.asp?d=3012585&amp;t=22543&amp;l=6&amp;Start=1">13.05</a>
+ 6 Åsjordet<br />
+
+ <a href="Rute.asp?d=3011730&amp;t=22264&amp;l=5&amp;Start=1">13.09</a>
+ 5 Vestli [T-bane]<br />
+
+ <a href="Rute.asp?d=3012120&amp;t=22080&amp;l=5&amp;Start=1">13.13</a>
+ 5 Storo [T-bane]<br />
+
+ <a href="Rute.asp?d=3011030&amp;t=21831&amp;l=4&amp;Start=1">13.15</a>
+ 4 Bergkrystallen [T-bane]<br />
+
+ <a href="Rute.asp?d=3012585&amp;t=22542&amp;l=6&amp;Start=1">13.20</a>
+ 6 Åsjordet<br />
+
+ <a href="Rute.asp?d=3011730&amp;t=22263&amp;l=5&amp;Start=1">13.24</a>
+ 5 Vestli [T-bane]<br />
+
+ <a href="Rute.asp?d=3012120&amp;t=22079&amp;l=5&amp;Start=1">13.28</a>
+ 5 Storo [T-bane]<br />
+
+ <a href="Rute.asp?d=3011030&amp;t=21830&amp;l=4&amp;Start=1">13.30</a>
+ 4 Bergkrystallen [T-bane]<br />
+
+ <a href="Rute.asp?d=3012585&amp;t=22541&amp;l=6&amp;Start=1">13.35</a>
+ 6 Åsjordet<br />
+
+ <br />
+ <a title="Neste 10" href="F.asp?f=03012130&amp;t=13&amp;m=35&amp;d=14.11.2008&amp;Start=11">Neste 10 avganger</a>
+
+<br/>
+<a href="F.asp?f=03012130&amp;t=14&amp;d=14.11.2008&amp;Start=1">Neste timeintervall</a>
+<br/>
+<a href="F.asp?f=03012130&amp;t=12&amp;d=14.11.2008&amp;Start=1">Forrige timeintervall</a>
+<br/>
+<a href="Velkommen.wml">"Nytt søk"</a>
+<br/>
+</small>
+</p>
+</card>
+</wml>
diff --git a/examples/xmlpatterns/trafficinfo/timequery.cpp b/examples/xmlpatterns/trafficinfo/timequery.cpp
new file mode 100644
index 0000000..bd63560
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/timequery.cpp
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "timequery.h"
+
+#include <QtCore/QStringList>
+#include <QtXmlPatterns/QXmlQuery>
+
+TimeInformation::TimeInformation(const QString &time, const QString &direction)
+ : m_time(time), m_direction(direction)
+{
+}
+
+QString TimeInformation::time() const
+{
+ return m_time;
+}
+
+QString TimeInformation::direction() const
+{
+ return m_direction;
+}
+
+TimeInformation::List TimeQuery::query(const QString &stationId, const QStringList &lineNumbers, const QDateTime &dateTime)
+{
+ const TimeInformation::List information = queryInternal(stationId, dateTime);
+
+ TimeInformation::List filteredInformation;
+
+ if (!lineNumbers.isEmpty()) {
+ for (int i = 0; i < information.count(); ++i) {
+ const TimeInformation info = information.at(i);
+ for (int j = 0; j < lineNumbers.count(); ++j) {
+ if (info.direction().startsWith(QString("%1 ").arg(lineNumbers.at(j))))
+ filteredInformation.append(info);
+ }
+ }
+ } else {
+ filteredInformation = information;
+ }
+
+ return filteredInformation;
+}
+
+//! [1]
+TimeInformation::List TimeQuery::queryInternal(const QString &stationId, const QDateTime &dateTime)
+{
+ const QString timesQueryUrl = QString("doc('http://wap.trafikanten.no/F.asp?f=%1&amp;t=%2&amp;m=%3&amp;d=%4&amp;start=1')/wml/card/p/small/a[fn:starts-with(@href, 'Rute')]/string()")
+ .arg(stationId)
+ .arg(dateTime.time().hour())
+ .arg(dateTime.time().minute())
+ .arg(dateTime.toString("dd.MM.yyyy"));
+ const QString directionsQueryUrl = QString("doc('http://wap.trafikanten.no/F.asp?f=%1&amp;t=%2&amp;m=%3&amp;d=%4&amp;start=1')/wml/card/p/small/text()[matches(., '[0-9].*')]/string()")
+ .arg(stationId)
+ .arg(dateTime.time().hour())
+ .arg(dateTime.time().minute())
+ .arg(dateTime.toString("dd.MM.yyyy"));
+
+ QStringList times;
+ QStringList directions;
+
+ QXmlQuery query;
+ query.setQuery(timesQueryUrl);
+ query.evaluateTo(&times);
+
+ query.setQuery(directionsQueryUrl);
+ query.evaluateTo(&directions);
+
+ if (times.count() != directions.count()) // something went wrong...
+ return TimeInformation::List();
+
+ TimeInformation::List information;
+ for (int i = 0; i < times.count(); ++i)
+ information.append(TimeInformation(times.at(i).simplified(), directions.at(i).simplified()));
+
+ return information;
+}
+//! [1]
diff --git a/examples/xmlpatterns/trafficinfo/timequery.h b/examples/xmlpatterns/trafficinfo/timequery.h
new file mode 100644
index 0000000..f88e62c
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/timequery.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TIMEQUERY_H
+#define TIMEQUERY_H
+
+#include <QtCore/QDateTime>
+#include <QtCore/QList>
+#include <QtCore/QStringList>
+
+class TimeInformation
+{
+ public:
+ typedef QList<TimeInformation> List;
+
+ TimeInformation(const QString &time, const QString &direction);
+
+ QString time() const;
+ QString direction() const;
+
+ private:
+ QString m_time;
+ QString m_direction;
+};
+
+
+class TimeQuery
+{
+ public:
+ static TimeInformation::List query(const QString &stationId, const QStringList &lineNumbers, const QDateTime &dateTime);
+
+ private:
+ static TimeInformation::List queryInternal(const QString &stationId, const QDateTime &dateTime);
+};
+
+#endif
diff --git a/examples/xmlpatterns/trafficinfo/trafficinfo.pro b/examples/xmlpatterns/trafficinfo/trafficinfo.pro
new file mode 100644
index 0000000..52bcc19
--- /dev/null
+++ b/examples/xmlpatterns/trafficinfo/trafficinfo.pro
@@ -0,0 +1,9 @@
+QT += xmlpatterns
+HEADERS = mainwindow.h stationdialog.h stationquery.h timequery.h
+SOURCES = main.cpp mainwindow.cpp stationdialog.cpp stationquery.cpp timequery.cpp
+FORMS = stationdialog.ui
+
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/trafficinfo
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/trafficinfo
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/xmlpatterns.pro b/examples/xmlpatterns/xmlpatterns.pro
new file mode 100644
index 0000000..1a57005
--- /dev/null
+++ b/examples/xmlpatterns/xmlpatterns.pro
@@ -0,0 +1,14 @@
+TEMPLATE = subdirs
+SUBDIRS = recipes \
+ trafficinfo \
+ xquery \
+ filetree
+
+# This example depends on QtWebkit as well.
+contains(QT_CONFIG, webkit):SUBDIRS += qobjectxmlmodel
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xmlpatterns.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro b/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro
new file mode 100644
index 0000000..8ca900b
--- /dev/null
+++ b/examples/xmlpatterns/xquery/globalVariables/globalVariables.pro
@@ -0,0 +1,9 @@
+# We don't have any C++ files to build, so in order to trick qmake which
+# doesn't understand that, we use the subdirs template, but without specifying
+# any subdirs.
+TEMPLATE = subdirs
+
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery/globalVariables
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.cpp *.pro *.xq *.html globals.gccxml
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery/globalVariables
+INSTALLS += target sources
diff --git a/examples/xmlpatterns/xquery/globalVariables/globals.cpp b/examples/xmlpatterns/xquery/globalVariables/globals.cpp
new file mode 100644
index 0000000..7ecd9ed
--- /dev/null
+++ b/examples/xmlpatterns/xquery/globalVariables/globals.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+ 1. int mutablePrimitive1;
+ 2. int mutablePrimitive2;
+ 3. const int constPrimitive1 = 4;
+ 4. const int constPrimitive2 = 3;
+ 5.
+ 6. class ComplexClass
+ 7. {
+ 8. public:
+ 9. ComplexClass();
+10. ComplexClass(const ComplexClass &);
+11. ~ComplexClass();
+12. };
+13.
+14. ComplexClass mutableComplex1;
+15. ComplexClass mutableComplex2;
+16. const ComplexClass constComplex1;
+17. const ComplexClass constComplex2;
+18.
+19. int main()
+20. {
+22. int localVariable;
+23. localVariable = 0;
+24. return localVariable;
+25. }
+//! [0]
diff --git a/examples/xmlpatterns/xquery/globalVariables/globals.gccxml b/examples/xmlpatterns/xquery/globalVariables/globals.gccxml
new file mode 100644
index 0000000..81bcb22
--- /dev/null
+++ b/examples/xmlpatterns/xquery/globalVariables/globals.gccxml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<GCC_XML>
+ <Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15 " mangled="_Z2::"/>
+ <Namespace id="_2" name="std" context="_1" members="" mangled="_Z3std"/>
+ <Function id="_3" name="_GLOBAL__D_globals.cppwVRo3a" returns="_16" context="_1" location="f0:14" file="f0" line="14" endline="14"/>
+ <Function id="_4" name="_GLOBAL__I_globals.cppwVRo3a" returns="_16" context="_1" location="f0:14" file="f0" line="14" endline="14"/>
+ <Function id="_5" name="__static_initialization_and_destruction_0" returns="_16" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" location="f0:23" file="f0" line="23" endline="14">
+ <Argument name="__initialize_p" type="_17"/>
+ <Argument name="__priority" type="_17"/>
+ </Function>
+ <Function id="_6" name="main" returns="_17" context="_1" location="f0:20" file="f0" line="20" endline="24"/>
+ <Variable id="_7" name="constComplex2" type="_11c" context="_1" location="f0:17" file="f0" line="17"/>
+ <Variable id="_8" name="constComplex1" type="_11c" context="_1" location="f0:16" file="f0" line="16"/>
+ <Variable id="_9" name="mutableComplex2" type="_11" context="_1" location="f0:15" file="f0" line="15"/>
+ <Variable id="_10" name="mutableComplex1" type="_11" context="_1" location="f0:14" file="f0" line="14"/>
+ <Class id="_11" name="ComplexClass" context="_1" mangled="12ComplexClass" location="f0:7" file="f0" line="7" members="_19 _20 _21 " bases=""/>
+ <Variable id="_12" name="constPrimitive2" type="_17c" init="3" context="_1" location="f0:4" file="f0" line="4"/>
+ <Variable id="_13" name="constPrimitive1" type="_17c" init="4" context="_1" location="f0:3" file="f0" line="3"/>
+ <Variable id="_14" name="mutablePrimitive2" type="_17" context="_1" location="f0:2" file="f0" line="2"/>
+ <Variable id="_15" name="mutablePrimitive1" type="_17" context="_1" location="f0:1" file="f0" line="1"/>
+ <FundamentalType id="_16" name="void"/>
+ <FundamentalType id="_17" name="int"/>
+ <CvQualifiedType id="_11c" type="_11" const="1"/>
+ <Constructor id="_19" name="ComplexClass" context="_11" mangled="_ZN12ComplexClassC1Ev *INTERNAL* " location="f0:9" file="f0" line="9" extern="1"/>
+ <Constructor id="_20" name="ComplexClass" context="_11" mangled="_ZN12ComplexClassC1ERKS_ *INTERNAL* " location="f0:10" file="f0" line="10" extern="1">
+ <Argument type="_23"/>
+ </Constructor>
+ <Destructor id="_21" name="ComplexClass" context="_11" mangled="_ZN12ComplexClassD1Ev *INTERNAL* " location="f0:11" file="f0" line="11" extern="1">
+ </Destructor>
+ <CvQualifiedType id="_17c" type="_17" const="1"/>
+ <ReferenceType id="_23" type="_11c"/>
+ <File id="f0" name="globals.cpp"/>
+</GCC_XML>
diff --git a/examples/xmlpatterns/xquery/globalVariables/globals.html b/examples/xmlpatterns/xquery/globalVariables/globals.html
new file mode 100644
index 0000000..d8affc8
--- /dev/null
+++ b/examples/xmlpatterns/xquery/globalVariables/globals.html
@@ -0,0 +1,40 @@
+<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
+ <head>
+ <title>Global variables report for globals.gccxml</title>
+ </head>
+ <style type="text/css">
+ .details
+ {
+ text-align: center;
+ font-size: 80%;
+ color: blue
+ }
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ </style>
+ <body>
+ <p class="details">Start report: 2008-12-16T13:43:49.65Z</p>
+ <p>Global variables with complex types:</p>
+ <ol>
+ <li>
+ <span class="variableName">mutableComplex1</span> in globals.cpp at line 14</li>
+ <li>
+ <span class="variableName">mutableComplex2</span> in globals.cpp at line 15</li>
+ <li>
+ <span class="variableName">constComplex1</span> in globals.cpp at line 16</li>
+ <li>
+ <span class="variableName">constComplex2</span> in globals.cpp at line 17</li>
+ </ol>
+ <p>Mutable global variables with primitives types:</p>
+ <ol>
+ <li>
+ <span class="variableName">mutablePrimitive1</span> in globals.cpp at line 1</li>
+ <li>
+ <span class="variableName">mutablePrimitive2</span> in globals.cpp at line 2</li>
+ </ol>
+ <p class="details">End report: 2008-12-16T13:43:49.65Z</p>
+ </body>
+</html>
diff --git a/examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq b/examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
new file mode 100644
index 0000000..026679d
--- /dev/null
+++ b/examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq
@@ -0,0 +1,110 @@
+(:
+ This XQuery loads a GCC-XML file and reports the locations of all
+ global variables in the original C++ source. To run the query,
+ use the command line:
+
+ xmlpatterns reportGlobals.xq -param fileToOpen=globals.gccxml -output globals.html
+
+ "fileToOpen=globals.gccxml" binds the file name "globals.gccxml"
+ to the variable "fileToOpen" declared and used below.
+:)
+
+declare variable $fileToOpen as xs:anyURI external;
+declare variable $inDoc as document-node() := doc($fileToOpen);
+
+(:
+ This function determines whether the typeId is a complex type,
+ e.g. QString. We only check whether it's a class. To be strictly
+ correct, we should check whether the class has a non-synthesized
+ constructor. We accept both mutable and const types.
+:)
+declare function local:isComplexType($typeID as xs:string) as xs:boolean
+{
+ exists($inDoc/GCC_XML/Class[@id = $typeID])
+ or
+ exists($inDoc/GCC_XML/Class[@id = $inDoc/GCC_XML/CvQualifiedType[@id = $typeID]/@type])
+};
+
+(:
+ This function determines whether the typeId is a primitive type.
+:)
+declare function local:isPrimitive($typeId as xs:string) as xs:boolean
+{
+ exists($inDoc/GCC_XML/FundamentalType[@id = $typeId])
+};
+
+(:
+ This function constructs a line for the report. The line contains
+ a variable name, the source file, and the line number.
+:)
+declare function local:location($block as element()) as xs:string
+{
+ concat($inDoc/GCC_XML/File[@id = $block/@file]/@name, " at line ", $block/@line)
+};
+
+(:
+ This function generates the report. Note that it is called once
+ in the <body> element of the <html> output.
+
+ It ignores const variables of simple types but reports all others.
+:)
+declare function local:report() as element()+
+{
+ let $complexVariables as element(Variable)* := $inDoc/GCC_XML/Variable[local:isComplexType(@type)]
+ return if (exists($complexVariables))
+ then (<p xmlns="http://www.w3.org/1999/xhtml/">Global variables with complex types:</p>,
+ <ol xmlns="http://www.w3.org/1999/xhtml/">
+ {
+ (: For each Variable in $complexVariables... :)
+ $complexVariables/<li><span class="variableName">{string(@name)}</span> in {local:location(.)}</li>
+ }
+ </ol>)
+ else <p xmlns="http://www.w3.org/1999/xhtml/">No complex global variables found.</p>
+
+ ,
+
+ let $primitiveVariables as element(Variable)+ := $inDoc/GCC_XML/Variable[local:isPrimitive(@type)]
+ return if (exists($primitiveVariables))
+ then (<p xmlns="http://www.w3.org/1999/xhtml/">Mutable global variables with primitives types:</p>,
+ <ol xmlns="http://www.w3.org/1999/xhtml/">
+ {
+ (: For each Variable in $complexVariables... :)
+ $primitiveVariables/<li><span class="variableName">{string(@name)}</span> in {local:location(.)}</li>
+ }
+ </ol>)
+ else <p xmlns="http://www.w3.org/1999/xhtml/">No mutable primitive global variables found.</p>
+};
+
+(:
+ This is where the <html> report is output. First
+ there is some style stuff, then the <body> element,
+ which contains the call to the \c{local:report()}
+ declared above.
+:)
+<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
+ <head>
+ <title>Global variables report for {$fileToOpen}</title>
+ </head>
+ <style type="text/css">
+ .details
+ {{
+ text-align: left;
+ font-size: 80%;
+ color: blue
+ }}
+ .variableName
+ {{
+ font-family: courier;
+ color: blue
+ }}
+ </style>
+
+ <body>
+ <p class="details">Start report: {current-dateTime()}</p>
+ {
+ local:report()
+ }
+ <p class="details">End report: {current-dateTime()}</p>
+ </body>
+
+</html>
diff --git a/examples/xmlpatterns/xquery/xquery.pro b/examples/xmlpatterns/xquery/xquery.pro
new file mode 100644
index 0000000..f7ac5ef
--- /dev/null
+++ b/examples/xmlpatterns/xquery/xquery.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS += globalVariables
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS xquery.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/xmlpatterns/xquery
+INSTALLS += target sources
diff --git a/lib/README b/lib/README
new file mode 100644
index 0000000..a9a58e2
--- /dev/null
+++ b/lib/README
@@ -0,0 +1 @@
+If this directory is empty, you probably forgot to compile the Qt library.
diff --git a/lib/fonts/DejaVuSans-Bold.ttf b/lib/fonts/DejaVuSans-Bold.ttf
new file mode 100644
index 0000000..040bb9d
--- /dev/null
+++ b/lib/fonts/DejaVuSans-Bold.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSans-BoldOblique.ttf b/lib/fonts/DejaVuSans-BoldOblique.ttf
new file mode 100644
index 0000000..d0fc12f
--- /dev/null
+++ b/lib/fonts/DejaVuSans-BoldOblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSans-Oblique.ttf b/lib/fonts/DejaVuSans-Oblique.ttf
new file mode 100644
index 0000000..19f9f74
--- /dev/null
+++ b/lib/fonts/DejaVuSans-Oblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSans.ttf b/lib/fonts/DejaVuSans.ttf
new file mode 100644
index 0000000..7e411a7
--- /dev/null
+++ b/lib/fonts/DejaVuSans.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSansMono-Bold.ttf b/lib/fonts/DejaVuSansMono-Bold.ttf
new file mode 100644
index 0000000..86f9722
--- /dev/null
+++ b/lib/fonts/DejaVuSansMono-Bold.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSansMono-BoldOblique.ttf b/lib/fonts/DejaVuSansMono-BoldOblique.ttf
new file mode 100644
index 0000000..b143938
--- /dev/null
+++ b/lib/fonts/DejaVuSansMono-BoldOblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSansMono-Oblique.ttf b/lib/fonts/DejaVuSansMono-Oblique.ttf
new file mode 100644
index 0000000..81208a6
--- /dev/null
+++ b/lib/fonts/DejaVuSansMono-Oblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSansMono.ttf b/lib/fonts/DejaVuSansMono.ttf
new file mode 100644
index 0000000..029fcac
--- /dev/null
+++ b/lib/fonts/DejaVuSansMono.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSerif-Bold.ttf b/lib/fonts/DejaVuSerif-Bold.ttf
new file mode 100644
index 0000000..e7aeb9e
--- /dev/null
+++ b/lib/fonts/DejaVuSerif-Bold.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSerif-BoldOblique.ttf b/lib/fonts/DejaVuSerif-BoldOblique.ttf
new file mode 100644
index 0000000..a457fd8
--- /dev/null
+++ b/lib/fonts/DejaVuSerif-BoldOblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSerif-Oblique.ttf b/lib/fonts/DejaVuSerif-Oblique.ttf
new file mode 100644
index 0000000..887939c
--- /dev/null
+++ b/lib/fonts/DejaVuSerif-Oblique.ttf
Binary files differ
diff --git a/lib/fonts/DejaVuSerif.ttf b/lib/fonts/DejaVuSerif.ttf
new file mode 100644
index 0000000..5d096d1
--- /dev/null
+++ b/lib/fonts/DejaVuSerif.ttf
Binary files differ
diff --git a/lib/fonts/README b/lib/fonts/README
new file mode 100644
index 0000000..076fc9c
--- /dev/null
+++ b/lib/fonts/README
@@ -0,0 +1,21 @@
+Copyright statements and the source of the qpf fonts are located in ../../src/3rdparty/fonts
+
+The fonts here are in various formats:
+
+ *.ttf - TrueType fonts, requires QT_FEATURE_TRUETYPE
+ *.pfa - PostScript fonts, used as source material for some QPF fonts
+ *.qpf - Qt prerendered fonts (QPF format) rendered from above fonts.
+
+QPF is the portable, endian-independent format used by Qt/Embedded 2.x and 3.x.
+
+The prerendered fonts are generated from various sources:
+
+ fixed* - Fixed font.
+ helvetica* - Helvetica BDF format font distributed with X11
+ - Latin-1 characters (about 250 characters).
+ japanese* - Helvetica BDF format font distributed with X11
+ - ISO 10646-1 encoding.
+ micro* - Micro font (see micro.bdf).
+ unifont* - Unifont (see unifont.bdf)
+ - full unicode range (about 50000 characters).
+
diff --git a/lib/fonts/UTBI____.pfa b/lib/fonts/UTBI____.pfa
new file mode 100644
index 0000000..a4fda2e
--- /dev/null
+++ b/lib/fonts/UTBI____.pfa
@@ -0,0 +1,1172 @@
+%!PS-AdobeFont-1.0: Utopia-BoldItalic 001.001
+%%CreationDate: Wed Oct 2 18:45:57 1991
+%%VMusage: 34429 41321
+%% Utopia is a registered trademark of Adobe Systems Incorporated.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.001) readonly def
+/Notice (Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated.) readonly def
+/FullName (Utopia Bold Italic) readonly def
+/FamilyName (Utopia) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle -13 def
+/isFixedPitch false def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Utopia-BoldItalic def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 36546 def
+/FontBBox{-141 -250 1297 916}readonly def
+currentdict end
+currentfile eexec
+f9d13ed4c538ee56ca0c8979e615439db5863a5292e578086555752cf04323b5
+761364ec433e576f108b1bff6c56d0f56331bc1243c31feb9985de983b0b3300
+e35eaa63cb5ef5a522d2e2731f37eef0cc62a540af58c4780559b4a0499bd168
+7642677ef167669aa264d68a8ef6da7425b771d48260108ab87a077560b2ebc7
+dafcace10cee472c35746fc11d5304e441fa0678decc0652588a56cef7c28ba5
+5cbd94a7acac9a06942a82d6abc1ed45ef21f4f3f5f61d0002340725ba15b9b3
+0b9992741770f020ec318f514874b6abdb27c3f0dee979cce17199b9f3ecb0f0
+709736e55bc48c55ebc8f7259d9e0ba13b46c2983c6e8265633d11358057019a
+9bc40f9ef8830b5cf7022bc19c01160d17df4ab51d113cd49bde4d1e3b5f8ba2
+7d179464b8fa28e12092267d5c70cc341eb3ed0eec08b343175d5458311a7404
+a9463d728eda1642be73366ec57a705501aa054b60b04983e30b9987bdbd1c69
+95ef18d327beb2f2086a2245602495ccb7851bcc5eb302b980ada64a262c562f
+6b2748b8f7dc4a0a06c69a7231fd40568bb236b33f33ac04f1d2f91573f60470
+599ca51abce802711c7fbd95247ec33fba3a393195a5cd54622434e668d1e63a
+a39a51699962bfcc4774228ebdb0b01f29b430434d8023331bd1b6b2c76e43df
+b3c68753c55075856e9ea0f5c7d60f510bc115bb70e0a8eb9998d3f32a0b72d3
+ab524841ef36b198e3ae58129ca64e005f776a0676dcef57e7961dd2b948c2da
+f392cba950f1101a7bba99952251c82ab5d0eb5ecd8af07973eeafcb3e0b5f2a
+3b6c8852ea072b9787fb945cb7cc7a2acebe92a5458e7dab5ea2551a61a55068
+d7023b6193c750e32502fe1e1d8e8d497453fff493caaed83c410eef050c30c6
+e38339831517101b07fc15d5f63470a9863bbfee0c0002695669900aa70a18f7
+a87f1b0b83494c39c3c90a8313060204d19553e2d66419e7b002b25108ba00ff
+a7e60c68b73c53f306e112ecba3b64d35caf59f11a41ae76aa2fb4882ffffb96
+400c2b6b0051c90d7279ffd0df3a6ba63daf802888bb6b98db281b89734b6e2c
+9ebd473352b36e11b5c3f3c7ecb22095b7aae220fbc89cf6036fa963530b8a01
+1cb06875ceaa143eacdbf1015631e8858bfe5917e01737ec6c840fa7097a42f1
+15884772664b9665e5575dc3003914643d34f329b9cd12b1012e93133a27d139
+ebcf7f9b68dc21575f3ef070ef94d4f3f9ea0d3ab4a75e6ec849a4630f4f13f5
+0883dd86a9903613ecf36ed6ab7294afdc167e0eda4b1944870a2f99ae8a22c8
+1b711d1eeefd489009b86f08078f4510c6846b17ae72c87dc51d0433ed9cb40f
+197db7e3c2ef41f077481b3d194aa3284d5400681001e0531348b91cb957c396
+5611aab14b92dbb110db950073dcaf69d6454588bf63c477112c38ac578b0ddb
+18fbf7f0d44138c4721743fc05cbef7cc3c684328df7c4bbc17afd9084bafec9
+99b4b8304cfd2d604e31d96c466466cebb6ef3a2236498e31b3c8dd8f15c1ec1
+c67d2b6472c3dce8f613c8a206e5dbca88b03ea931fdbb7e2d19625d4aa0d800
+b2eb953de5ae22b2478432710ad8efc57558171c332f6b27a2cac9145badf751
+9cf4987b853ed30d3a726039a83158c03a0f457dfc9a81e78d909f070e8d47e0
+252b72d03d049ed6349c752a01b92072a2c8f6c50ae85d6a5469eedab2e0a5f2
+6e502cf72a76706ecaaf7a590105feb6f0c1f52a820369fe3b903b08ec602ab6
+882e1ea21007443e2460e29de7fc07fa72bf89c145b04be55df48c0ae5ba1bcc
+c84bbf0a2de650ded51dbb240dadc2faf3a2fd0fa8749f0b1e372c579f905148
+706e910cd5578d06c8018e3ff8b88af6002c549b87a9fe2b1f804e95921ef83a
+2810e015e315d55496eec2bd16e0b71e4d7004dfbaab8a5d651c4446e343e382
+8204f6e7b4cababa6aed624942902c65899615d858ca24fe6c91a41d087fd647
+e50c52850049c81a5dd9447761b3a308df7403fa4f8669df366d3e114628858d
+17ba68a92fed47c199d1f7d415c8315d30b394177b161fa487225c38e0b9d9c7
+ab236e90e926614f9fbdb3bc081e948319ec3871fd37193f0889ecf2c47841c0
+666b272328bbd281f719181b4e509c01ce80afe08f6244ecbfc136f8edaccf79
+36399e63e5982d27fbdaffab086e1e064c84cd97d4eef959aa3a452e065618f6
+b549e3fe7207bcdf85ec1917612c098236b9124d6f1c037bd0656777dfee995d
+5d125d678fa7ac5c995515e952194f9620579316eb0f0ad55930ac82fa773159
+c1ac7f4b072f06baef03ee07c23fcb4ad8072503469a8e4eda4cf143c7a68d27
+bbf01668c0abf4950277c195fa1cba7297a2e863299e195c6684f2a076427e5a
+a2f308fcfb1dc11d14bcc8a4a59611eb8bfcbfcd73e963d69c82fcd95e989ff5
+ed486f9809d3f9e1a0ddfb573b37d1d3d57e0fa4594f66ac56fe16168a472552
+eca179c7ad26be24e9afb1a759b73de53e9f7075b7ce0ab8bc8e30ec6d68aa42
+a84b36f2c4e4afa9e59c6dfa9af97a93b2cbd9ba786fff8d8b60305b608bfc36
+83c2c94dac72000fa51ff15739975e9ec0185f3b7cd805e67b5ff91fabfa648d
+81e0beddecb47dbbad28a99acc3074f1c248b2231be3fb01b331e90a1bc723e2
+8a0b2e99f2defe00a0b33c13f0a6a37717089fb28b7c58daf478e877e4bcb73d
+54b358c509a630d73938bca5126547c94f88c97cedd1c65a3d514b3ab86a489c
+317554f67e1aecc75e3c71cd37f268999f17fb649cc52ce4ada26d2d4ff1c248
+e9e4f6f5ccb85aa64e90f371cb94da1ecf5b995ded0fa6771e3f874ef449186b
+4b78c298d5c24e5127532b67c9479f70c3703ab7800ba8ecbca511703d6a1733
+7f2edbaa61171f00f01debc6eba2094465e248cc8262bd35cab622443a1be5c2
+8e6318e4f3b7131045b8f676e2086f0432f51983c74fea25cd5aad0797a4cb5c
+6503695292d798c755170f0ae137674d25759bbd89cf4fe0917e32999b4a04a3
+655ea871b30e22b0ee39f29f7915fa3dbac0d01c55a454728869501335f97e3d
+24b17ab7ea28784b6f8c9e0b72b38f64e0fdb578eecaa5590c20a1d17ebd4ec4
+1632b40553aa80fced6d88079eee8097a410a29b549a0bb3b6fec526caa745a7
+202eabbe2cf3f1262db3e6e309e0afc3d9c808fced17b05c320945fdf0a05459
+ea7ba64fc4112fa68eb4887bc845e63a598e2d31df0ab0d64155e631e3ab4621
+744da7c3da19a2e66ed2bf759505e0cfb47a76a81ed7242cc29c7383989afc30
+df86c4b38be0a5c8b360f586f463e53d6684584a3a5fc75495200fc707cd1981
+1a0fbcc0fa784b02140158ef0913170979c4fe96f3fdeb414cad01b38d2b5934
+0b21cf14a28c24a583472ae3cd667ab094e56744c6b35ab7870ee5b0aa22a70d
+dc68afd34b44e45275ca8d12747dc6fef76b826f1dcd70a5a30537e096935f7d
+ba37414aa1f0111cf7a1844c5e2b3f63764458ce9e113d06cc844bead4d22109
+069b5174e0ba5aabef78dea7e384369de2e4142bfe6521efadfe67aa41fd7bf5
+52ff016ad8d6314b4285e129ebbdbfd3c6e3383906248f0ce045ad370b0f90f2
+a832944cbd59bc7cf15a9c17ee0fa0bbe12f2304fd6a9f56cbd65e7cc91ed860
+7d09e58934079a74d02c1b25b958567133657dc028148e9f13a0ff6db812422b
+6c7cfe064a171b4fc5e1764000d4a761d1c476aeb59a45f7b64ba1c8623b1423
+91d79d124b8506eaf94ef8fd28b5fa6ca6aa5677ffe979dd3d75f540d577ea8f
+9cc95f5b41942294df812c4d4aa4ee701f654be2c00440ba575c5512bb5c196b
+3ad24366514f2b4ea4ab0c35927517bfe166c261c0c7f9b73ab0c52ed0da3696
+628a1f230e48cdaf2ae53000dbb2ee3fe17b9785faf74baec7caadb23fe6e329
+b2b908bae996af74097cdb6e280b5d5c2783b33ba106d6f458179822af89ee24
+f99514605cb4e232b62d92014636841a991b3790ae7478d020d6513e70244034
+dec5f2106a1820acac4b7e091dce521896f25dcfaf58a521ecb5d26ae3b8bed6
+c61c3c25d09d159d5ef58e253dc0f9817fbb469e44eed683ffecb08689e66108
+ce6f93327a5ade948640d0e9347b113d846846fae982687d95b66d6a75ffe876
+a2c50ce60e3f7953d9dd5a9f5d65b1105a7849d734336804de32576e81abd201
+4aff1a36aae15c725df295daaf26238b21c6d288450aa4d94e26ce6a1de7f096
+5838c195a97ddeb019500e8fb95e8b48190b020cbf0582a99df66b7192b67448
+c1695882808efb39a3c54fa42c183f65492f9d0cccd832b5590a6c4cf18e8d2a
+e9f50100f197818f192c39d4204b6dab711c2f8cb53e5ef002719755cfee11e4
+f1ca77783034901fa2da7f82254d1184f2f724e36be731fe923c99d444407539
+3000ceb19548d5c11d7aab1e13917ea4391ac626e02bd7a1960bcdf24e048f46
+76fc3cb4031811d94f83a0c23b309cc9a537b599c174dc862429bba8b94e7e56
+56682c13bc4deb402af2334993c66d6ef48cebcf6dcc924a2a1615ee92edb7bd
+221fd3204d9dfc6b2abe84d5b47a9d03227a4c015204af7dc5f937adc8c60de9
+feb1c1c722a911b2a5f186478ad7540ff28f7cbc82d85e461c740e8aa51c16d8
+8f939075b78f8a097f647de080dadd87dd5a4107ae7cbc25a7964e5e8e0aff10
+1f17185e95a7c432c76f5fba2138ee76b7ec76c691df228099c0de7107aa0f5b
+523209576c023ed23e9ea9047d1def8175e515bd1ee133167f0f92fc87732091
+4be8e6a04a796e5affd91f2e0bfb1b47d960228b970cae0824b32f602504cb12
+9f29f933e538a01fc231eedadd0bea5523ce4acd3ca5d512aeffd4bd91adc088
+47e520f07aa173dc6d1dcda5c7a20a1cbb399d7a11694bd2c959d2546d5cd1b9
+b7afba473e7c9f0492c2d4b4ed1204d6f633a431d83b813b5ec5ecbe41b6c8ac
+003fbe65fee1581fb80c2f4c691f9e8a33630940b198deba7491d83421017409
+6dd46e914bf82841e2377e57cf81c0f03db26133519f638d0b6422585af7f7f2
+589aed2dfd15c02f83bb6fbac42b4fe85e14256c5b5f6e7a287953a4f96a0c6c
+562b87ff8a8ddf922571aedf6898faf7f9327f92a6f736546c5699aefc4cd1ba
+b403a43f8464b215993ef53d2d9186ab1218f7e1f2ccf589ee0a52096a153ac5
+e328654465f3f734fb590ed232399f9f6dcfdfe7f702b4ed829e444ad685b1e0
+d0764217ae144e4af82554faf6d013be83816ab94a6b175905916bea3c053fdf
+8d033e48ce7e6a7338fdebdf9cd047624cfcf3be1aa133690eed083e28939707
+778274ae874e906f972080d9dd453ff5039cd351776a1ed52d3e4a8fbc749f9c
+588478826593e0e8625b013ff1469bf76aef8ae06a63ebbda3176d517a7cc32d
+ad93a096258b227102b2b748359ff2e70a438709eb5f1b60be92f7a6c8f92372
+c3b9a58ee0934083f2300c6423250c00ecc2cfc67a6be83450eeaeca993fd695
+939e47e7c7d28f9db30e2a82ad4895092a1a5a734f1727b4734a14743ee1c9dc
+851c9463451042f28a519e8c532e16c6a7f65a11286b85d48ee3bd6f09caf327
+cd87df6f40cc9ed5784744408da6a2e65cdbc6838812b2da414fcf7a33ebe676
+d381f7cb0bc1d84273b03240fd3eacfab2693d04abe2a89f6d884fc1ba2c0c6b
+183916096f98f062bbe990f87a9d74d275f18d5d97e9eff897b99fd5e5f2353e
+16fe417e644364017a1f014cd0ea62ad0a684fcb1f7a4969bb2d0119d3021ea6
+91ad90564b7cd59c03662d4809943ac3c0316c45b3e6576a9cac3f549f04a9cf
+b21aa641eeced2af9c0e9944bcd355444f1ef2dd626d94d65c1e00b208f06fd7
+526f73917bfebde0538984edc704fb56a92f429f2b3ccd2324926605ffb9e06c
+e3f9435778a9972bc1d9511b1c9e013c9232cfa8fa03b8076de78144e24583da
+ce13c107390a4b4a66fcf41d02c7ea3889fcf648bd9b202a77ee0debb98745c9
+b424aa89f8028129fea8293f44efdfea96ca75d1462715087baceb18506124ad
+843bf5b5eb3044665921c1e711ae61d7ea772773f99f7aee6de71fcd8c5c2c9a
+4e5d5a1f02ba9ad0e31ac0673594882b491d8dcc9b7c4d8bf806845cb7e7b054
+e073b9379f6f7b756786174fdf25b080adf0cb4645dd8fe1b4cb5377195bbbc8
+88e09bf98c82e523794bc350fa0fa12413dbffc006a66c47c402b78164fd9234
+b9fae67432f7a9423ee7569d3e6bb293cc0a095f3c5a0abb6a2c52a0c4dccddf
+54dccede5914afbb9bce717409060d5772bf6c19ec65700c6395884b3da5bd6c
+d81daba48977e3af9653875148fe7ddab905a0cf6c5352a468c36ad2bd09d897
+2d54f62bf9af9688c1454b67f24b5cbe39e9c069d6b5429ab9e8b2117c0b09eb
+7f877d667af2af4c06339230c2e2d082f389d7006f8bacf00bcef8b652a8f1a7
+e210e7facbe69f8b0cebc21b6cb559ce9f6d8e1b0546870d773f6335426b6978
+60bfe9e2c6cfd1206ff1fa27cadbdd58c4c2368e95e17bda712c4feb1e89c63c
+45c0cc72dac845d10847408dfc7dd390ea0c50fbf3012939372707be42c88a8b
+025a77150be73e08e73fa1e15fb39d985d5e6666d2a4f77f947eb1b2228ef0e4
+bdb7f767621b7edf5b863d44c09a02b08a41a3feeb239ec9e022d0d8c2fbe939
+fc242a923b082a3035a23c0ae48dae76b4c2147a7f8126ab66dfbb8c892d858a
+48f8b65eb85d3216b8c156ee4005045697a11f0f349d05620b1c0d41575c11bd
+e8165d443d4e836d4b4b2fc028e3ee7eb995115de8bb5b58d7575a260c8ebb93
+cc5d43766f56ce454dff93669f41be40953c42ffcc98a89e9f6ab320f7688083
+32a48d4ff8eb88c84c7e0cbb9e031ac71c53873da074cd4112dc30b4f27c163c
+0d6371b35d0571dbc1b80f5101c90d4745e978091c4c8b2bfe8aa23db4979a9f
+143dba6c041772bfdda2077985fe5da829d9de5d8c5c9d02175f65e23495756e
+2ba67a1f46d862bb76a4f330c66adc2df5303b34ca0e705f28a97e2782105359
+3ade715c3f7eea39e401af757229bd314b886dda55f418b3a67657d199cdc8b4
+d05a5b7aaf37b53e1c5707fe5454d512c954b6887731d2626499cccd6e80b1cf
+9b3116814c0f7705d53b402fc4e9b6307b22941daa12d9c66849165e8de01e0b
+20c33b1b503c6ac7995d4bda83da72dee3b177389d500061e16c6decd05bd391
+1e2d1727b5436aa550e1bd505e91ce0efcea62d9fcaebc098880180caa252f6a
+667c75a3185f62caa0c28763104f57e93fba3a396d7015b3a55161401970668c
+7e6ed168f6e0f1029216c27c33544cc77111b2ef2b1538f1e89397a2e78f0319
+28e948640198d7d2b5684f9566b5e70988c2516a81623a6fba82c1554f3a8a85
+98c1efd626eea0ea586cea3b1f6b62f97b1ea416332ae107f0f174ebde1f84b7
+4af56a9495913e0e84ed0d8702ebe1c699f8e8f056de6e7728023e6fe0dc68cc
+aa76c3e2aac6eb5f5ee502c1098db8033c4432fd0c6f62aadb989954d81e4247
+6efe3ddfef52cb066d3da1811e1bf13a9da68d77b3d88ae4b5e0ec252a992b2b
+dd6b487458694df4bb1f300f88f6891f2033dfd4ed6eb147315ea84efef20c16
+3b2acdbd1a6812ebfa51f69413d1750c60d374839d46400b9563daea410e4bb6
+4231cc49a6db6f9acad1bd930faa27bc25e636deef091d07ee8c405eacf00d37
+a67027a49443231fb38cf74b4afe723353838866c9d56c2218507344cfe23e85
+264ec426283982e0e299b8557f37010c921d4b1e92b1997498426d3690408685
+5e0ab86ffb4c74192269197dad437aafdfc98809cc865a72f397901a02e22f97
+f035deb4063864798cbbdca6adfdd2e1f644c299d5acaa8b0ebf0102cdc1e478
+77179fd1e5c69595485ce83dd18e3a154e8f6bf6aad3752f209ad3e561cb2400
+0959f964e853ec9cde9deea9278c5988db3f026a6120e0020438f44066d270f4
+af05c4d6568fa3b288c0443be3cc406b6ea555ba97b9fae56c2b7e75263397c4
+f247bee72066fc445c158297eab5151852dc2c32306794b7be0a5f23c22f76f8
+4c80909a303d6d29d808a606b8c0739e69d715778ae843c033bcc8065ce83795
+f3d5b1a403aecd1ce8db79b148946d9f96673b51840fe073065a7da8cf8a8e98
+0e70984d88ef691e21a7f3b52c2a455286d80e3831ef4b7119459970a77e2bfb
+1b2e12a6e2cd4e02d80cdf90fc00a1fbcb42817660487d5fadefde0278d4fcad
+98fe39b3827b681d4427fe992adae296946720129777c73d954e1f91dfe80130
+362fd97c8a7f693b73ebe45155434eb078fc66adde8f9217583680f5e0c9f80e
+c413226de65a1e06fd6bb4a4870e8702d2d77eeafc0ea5634272f19f31a6ea21
+b51de45449e89807b18588c9a43524713c31f27be41941c32da7c5cb636c5e1d
+0ef69e2ef2c18ab0746cb2d19980fbdcf9691c1d74606830522219310193b32e
+f886e8f200135b55e178d832f0416de4b86e2fb4eb8731337efccf833c044446
+1ab477118d9b6d53ebf5c42e46ed8e5d0181eef7a15145d5a51d7a1b8f82189a
+f6ccde81e2f1da5a0e419838b90adc945a7e74a2132aa57807fe6107caff8296
+aca45bdc7366cf3b738cf402674c2c2ef0954ccdf7c7df0377641e9ffa12a165
+725cc7bca1a0d38dbabd6982b2f1c432454919fb58876f7854ec713ebf05e0e7
+01d1135f89b31ffa94413f30f72527de872418559c07c8a87556fb558bbd7726
+aa9cfb99d41a7ddbc8d5e4f8aaf20619b2dfdc18ed319b958b5812867e5f4442
+fc670f55f78be8ec1c3ed00fa36cbd52c5c15d45a5c77746de5aaadbce70eb29
+05c3972ddd7e2c220ba4137a5a6aa178af65fd65f225393a08197057d5dd407e
+9c238702425991496f7c7c91754399ff3be95c95704f26de0cf99aabc5786994
+9b727f5cd72f4428908b95f1b879c2366ebc061ad4ef68ccd4f957cc76594d88
+dbea7f48b814a94be79e2cebf4de7d2f6b2fa680baab5196b132c5970d035801
+e021704e10823478c68b4f791e63cf7d9725088a6fc2279e1d09a68b04f31901
+7bfdf33caf58ef856a1aaa0793d327c91a2224e7239c211f1210ab11cab44b93
+0ac2b75868db9a0faca784a130fdf9f47cc09d44f9bc9f697f698d2da440441c
+1adf05c77b768535ec2dd30b9897c52b1e28d081f1dde26d5e8438c405277c2c
+2291b1911cbd914a714159a957e0b436583b1d90cd36c7ba1b6e1041c8eb3996
+dd2715fc01e9a82bd1590cb4ad8fbbdac9410beda818b81260a3a8742c137f6d
+175fa8bf26d648c991fe684e0e1469900ed0a53b7d44e35e63c7e1fd0b5aacbf
+5e9b854f302f3ee9c7620f5c9e2a5446f7653446f0bdc192a34e23654830e5d1
+52bf36fc02c220ac72569f80795ee9271fa89b438a8fa4de0a3fef6de60310e0
+77bb99f86ae3e0824c593cb2d0387faf97b3612131a2b0edbbc79a4444acd77a
+53ec23d447610ad92120f7702df3c0955e5870e1ede213b5edcfe5c0405538bd
+6d1a06aa55a8afa73fb82a29c6eba9adb721473d0756c31e77a4012d10dab6e5
+80c90caae60c3ea5a846f74536079bd790979059936c7e879eb79905e3b67b3f
+ace6bd0a20a8afbf1034dff455f130347f54b6f7862a772f0afd46f3601349e8
+9d1caf04d0598df4cdb164190614aaa872036855c02c3c92374a3baf5453baec
+0c0d2d89d79fd0452babb562e925422d17e888a9350fa50d9b34bd119618a1a3
+50f9059f36ffc5adb1f29923af100fadb5d32aa948ae738d53ba04c44c3afb82
+e935f0ccf3a7903ee5f939f10d3668c672b75e90777354d1429453010e4f72ac
+23bb5cd7ddb1712a6851c033bfc10470f8ae87308777dc1d69a1b95e0ab1a655
+e46f843d3c4bbf2714177d4c83747f918884d366dad7705e4668087eb0d13548
+2d3c35939ad5402b94d3fd7f2bdceb0ec55ec0fde7fe7a555ab921dac698917a
+fc4bd079834d26e0b1d4020bb50588e961658935079e8b542f927ec7a7e0ccfc
+d03a7bff24ddedd6d7df33c3507c449067e548b0db1a42baa9e3b1d0528298ce
+981f8e35b10b00f69c92390e4aa06d2b3374e868b4ee0cf0ee5f59f1c734550f
+640bd5eeeddf30a340558a831b9e39bff15b35649a22b23b8f39d0d473a07be8
+0c757d16f7738a0190178de0e5509ad9fe624499d7464c43833515c9a5841c1b
+e704c88e2df4508101dbb7330ab3dd863f544294887e6ad56bdf15800ae7a0d8
+e523cc1bd1f9424576492b11b41ccbdf5daaf31e3278b3d1c9160c9310f604be
+1e869ce18ea776bd3ad33ad41dbc5b3a0acce72033b37aaa5fd6854d0f2faf59
+d2e674cf97ed09c3ec2f7a02657bc036f78c29e25284c7caa6e480beec4772ff
+09b02feed2cf374a02b43f653c1d095d21cccefd30d2049c50327fc38bf44e61
+1e5afc9d29d37fc5c22f62b927fd2c5720a8025194734d8d361bd63745781d3c
+996f448dd51f345442f1738ef8915a69bced678b6dc75ce6d77c44464d4e3c23
+0f90600074b5d31a870ccb24ccca94e8597177d51f85f9079d3de3ea0978a8fe
+f94346f14cc5dca7c6476dd60ee8a7f402e498d91f4c3b8071f5238bf16e8909
+0c0d2b246fd6ac9bdff3ec3633c6d90dc5ae76e353293823b20abdaae12a66f5
+19637c1e69ddfd24df8a76807c441732f3bc7d334bdf5cd5eca5b3ef88798b59
+6f0eee2d147dd35f57c4a776a9c89eb781acc56491e6adf40b94df9e8953df54
+ebff8faa7bc3128a375ee91a17ef4e6ac5fbd17f84db3bcb2ac0468efcf8575f
+b51865ed827e1dae4a3b601239519fc552e9959875285d9f688b1f4da4a62ffb
+b166645fcc7e587fa82d02f8ea43049f9c589a3b570c16aa3d37f34f999c4f13
+ef852c19789834269ecdc91433b6351f1936b24fda2c6614a467855679c50162
+fb62daa72b9b971511e81c8dc7305e90cfad4950bc2dcfee8f1ad6f30c2133cf
+c117dacb41836efe6d5ddb09b6948475c21a7c7e0b843820564b7f4375b43c09
+a07632390ba4fb796e2ff6b45a0584f763873e6a36768ef958c306fdb23607ba
+73cfc5d53a282585b9c7c97e8b59ceeb43360107efd16c2d54f825fc77e4eeed
+50c040e210a2be8034648a0cd886e2720b8d939ef7c94df36bec7ceb983e7157
+5d8c7d688fdbea4c23b8bdca5e5719ad6bbd1384032235ab03d05af8e86b2e01
+2f6ba96703f6d2e4a014c3de80067fd3fd665ed1c64c3362f254e3c7fba06800
+389cbf12c7b229b66b2df82a823765b41235e31a1e348cf57da0e304fca82b44
+0b2af48040f04750d7df18ebf95da0101b418c3820e161be149a3459e1c39758
+e8063dd0fce331702e9f7be3d10da99033bf2c90a1a24ebc48cc276d78f61cc2
+a6721f3ec1d48d86b54f8eb88b9ef248ee50896901be472b8196f52289869d9a
+a656932d4872bab54cfde6eb67537c70078bb808bdd52f4d4b99f4d3a3d7fa4a
+ee72b2b5202983641496ab3cd44434d44062db39d6c3e8b60ac6f73ab9b101a3
+2d687ab24b84e27043126bf4eee162f2cbea040586f49fd91b5d4069704bb9d6
+9ea28a6c20643c3f92f648b38273abb8bd944e7edabfd4e3085056f4b29fbe1f
+ff5ec131de60fa61812a8ab0d3673272309e36f6a1bd1552a3c41af2a2228f85
+f3809d222aec8eedcb4baf373f37d2a5de8ecc62ea37b335b81005f8e92f27fa
+6b2397952bbbe44fe9a3213c33e368d9dc37465e84f538d969f97d55b31956ae
+7d8522a5ee6d6fdcef2cb6ecb636de6ee1b2e7b44530166f7b2eb278a0892504
+30cd9e39ad1d38748ccef3f201330fc43f12f6581162775064b6275c6959ad21
+b5486b450d8581de96291f870ed3768da5833520cc36c14b31a90232d1d1cb03
+de7f8f0a506c979b765205d82b518a8ddf6e3e494b4217e47c5dd770c51e47f8
+106f23e7e9c0c4c9b2bdbba64bef04c5acbcf437db53d1c47fcde3bf88d58f23
+fa8a8c482b5d45c78985e7e850b676d773a4ad42bea32e3090403c01c1532a7f
+ec6e008ca9911f15319bb2708a57499e19b3482537ac0bcfe8a2dd398b0ad1a3
+a4f9812a66e9b82b095da83a9925c4e9128ad159dfb674cef7090c06626853c9
+0f5d64f662ce69cb135a4ed6eab6f69df2f376f1e3ea47a1903d066441d157f8
+858848b89aa4634011799b26842adc6981686381638e9d7e2c6c8ca22e8cb9ba
+d86986aa0300a224d2d0bc6fd227fd557de7da66c301e4cac1aae538c62697b0
+b2258394e0af0333ef56007b98b436dde0d40937923c9c72ad3e3fc7b39d1c70
+2851b4dde84e697f7983d5f71089c3f94abe8ea47392800d7300f4576e9498a4
+20b537ff69231fe3643209c59c485471b2cfa89aec05e50b2ab081eefc80e1f2
+b08f772631c8c649497745610363246af135e2c3231b64be0d5db3789aa6a000
+f27ede24cbc19346557465818d4bf4c4286e08840f030dddf30bb175e81482a6
+bdbdd5c83a361a28b8ea5654a9066b5c8cfc8f5d4380cae506d6a61cf0ad481e
+832e08f17bd9bf87749ef53d858b2a9eeab8d7be7e259bf110c4e3313d6ea87c
+1ae3664089e4af8160d334fb3c3005de0d5037211f888ac0d959dad0a586b61c
+0dddb0be9c5110479f5b0674d00f0e54ca7f642b62b32593779591b4dc119a25
+1e8fb9c40b68ecc9e5a08e63bae86aa52235dea3902f3c355fc1ae6b8c79644c
+01a54c68fcbcf46ebfdf0a54eedeafd5d1120bf228ef499913b4426ba7dba017
+75d6e240dcb7d41352b5cb624bafd11fa37fde8b4d4fed2c106a34d8325fc31a
+b86701cc72fc1e8db68a1508337947352c46d46d4393384cfef2c9e9e9d6d877
+f13780441ed70e86aee02516ee87bf567857f6af21aeb625ac3e30fb1b873bb2
+862a5ba6c7a6f30dba14fea378a41d38116214c999ab4666e48ce091751ce700
+62bd9e47351e9458e355e08bdf9f38ce3f52993df8d6893bdfa29813fafcefd2
+217b481c1100b8db69b9f3a2169c2a66300af2099a9acecbc542f140ad5d3a64
+6a1d818b0cfad8cd8b4b8a3f8e8ffddc03ba62a624e72df170b65fafed325883
+feb1bd45e3865043bb008d3055c08a3e4c95734db50f983f3ce6b6fb9367104e
+c44b96c80b2fff43285967667a3edfd341ce587b212e12b2fcf156f03b0848b9
+3545bf50fe4ba75c13529ee16857d317ae98a934a369b83db5f6039b72bc09be
+6d14c88a6e2c77543796939789252b70f51fa37a69b08551be5416fe8c785110
+30264f52592909c8e7f81f54f1b37c2b488f088e85994336c7a075779b168464
+fb37e8f7085f8fbeee68fb68ca9fb2986a53878454d72a3ead0b5b2ed507528a
+ff6aa53b238380d6f0e59e991f4092d68e2001c0e6d945b810141d3d1bbb7405
+46d378af9ba3fefd4d44f6caf78b74450a0e230431a5c46e79c222c3767c4132
+90cb9f75baea5d1bbd25a718e8cbbe551441b642f10173e90aaa9b2cd6301332
+0ced79e66e38e8dd290bf36fe33244548216916fad18f20da7b73e31838930c7
+f4a9c44b3207eeb6c103f633f3fc8b2b74fb04a072fbc156089ee3f7351ef196
+f365dd43088f4d4a280be7e81fe73293912000e3e5f493dc4bfc275b5b8a8796
+bdbd266090733ba17e45239f7c0dfb4153be451a8560de6551202f700efafa6d
+2bdaac1ba9c8f6e084e4b273fb8c501f336b005cab01ffd38cb6d27941096f75
+db1721eeaec315842dc7938dfa1b9e530b285604ec2c6982389e6c22fbb126c1
+e6a21916e06ee778b51fd72db2dcc11d878f21276a00bae3cf3ad0999c64d007
+f909d0ee79251810c64c4d05a2a759ef0837cf5563a8765817003dac3aa1bd1e
+7e3b868307e2d1ccc93b1a5a0a4cc32b4eb6961f71750644fde26dc7b01a66dc
+667005b396bb597d1eaeaa55b46506d447449497d29872485b31207e460df2b8
+c5b181459bc68b686182f1b6e164a825199c3ee24c1bd6a1dca450ca1a3fde70
+2d2e89bf6d8b98e4c4f25284b667cec77677be9046ede444a1b93b3b03db6aea
+f89aa0759cc8aa7f10a2c4b36f63487f59bfd6e3a2025f26c346847fc257741b
+629a3f662e3bda8c3c010c5dc1838afd26f875a56fd6042aebe1dbf119cfd387
+477d713cdda669f61ec1070705382520548a94749711144d8311df5db319ec0a
+033f2d5c4c639b5af42549b1bcfd95afa55994389ca8a66b64c28520f821c808
+4ae9dcc9d6020aa6b1f93de064318e5e464e8808bdf0ac519653752e612c9149
+6e3c8e61434d012a5e4537465cb678b6e9a9005f5039e415dd2872ff0985439d
+12d524a4f34c520aeecdc4d96383e1edd0059943d59d47880f51729e54a68a98
+a03fd6ba4ecb567c47422e04966c4655f9bb6f74f2b82d4d3ded42a42e90157c
+6639f18ecae1cdc636bd616b60218d1b6f8294ecd09a88fc5928c37c9304d7b9
+5bc609286a3524fcfb9e406f636bf1b40573225e658543c29be863964556b622
+da308dcbb6516c88155f6d9b8ae4fe34b17374d46dc560809fccb19e87f7fede
+beaece1ec0f41102b99ba6c4de9dd105dc5d90b6d3b392040273e0703b204d26
+89d1a340d0d32d6e201b91244e07ebbaae8b4c877a213ceb2f1b1d3ca07880ec
+3f4817c00d48a06102352ef4de3440699cfd69ffaddfd1b90edb42034e5b8e3b
+c42fa37c38d563554f8d5b96956879b63866e552fb931c6462b934dd0454dd9f
+965055bb3e969b0063dfd2bc299df5552d8edb68b6530673fc08f3a0bb96557f
+13b068d62dd8b42060e67d2584b4e6fb97e9dc7439f5c1d23c6a324e72062395
+6305ab4be3a430141d8e615b9f59c3a3eb2b1267ede3987cefcc1419a9f6de7d
+d73ff35749b44018da9e79aadebafd0495ee9e29ae4fc7e420d86572f735134a
+f54e8f853b764c6e0319f720e8350110c1b300290c8bf8fa4cd3be47533482d1
+53553691ebcdfb46c6879347e3573c318195bc13ea1c732d8d0e7567eb655b22
+1960e8476188532af8af85f7ed7d399ce2ced204894be3a592ffbccbd831f027
+7ae604851702b50c4ef6482c78c77c7959869e83001f7f8f93bb3b8be70d587d
+9e5cae3aeccfb455463adef4038ccb6eb8447a7e1992929f5ff7f8e6f37d4a11
+d5815c2ae35f90d3708f3e2a166953d9823846d87d2e7a7419abc47f4044c8bb
+a9129cbda3c7fef7725b481fbfab1ec2b3700b3b3780ce5e711663557e873531
+72c3bf0ea8ba03a66c5033602f12cd8aeb3c5cd0e0abd65c936cd7d973e8d3d7
+c5d09bec259f41005187115317afe5f6ef895eac769459c0ad7ab039febed7c1
+dadaf14d015a7a3356982c242713e27eccc7c4d7237052b004e8e5f15008a826
+ed515dd699e6bf60e3a2aba08c07b8c8d9df393094069e781c7d75b090445c7b
+1741949aeddd01691102b001781598b87f493ed956b500b2d813d50ba749ea1e
+bdceede30f45e0fac0aae683ae087a635ca344411c26a2dcd04a084b5d1774fe
+c1f77079af1f9d8c75f383b3755f3ea120e2bef4375dccdd221e1811b4b775a4
+f45b142ae17f1654a53a938eab4c2b2e71293cdc8e2d18ebb8b502af594de4f5
+00795c3712a58bb65b8287aadf183e508d907290cdb9ad20e578ee485ca6aedd
+432f01a550980bf7ffdd0a61834748fa4ddd4d2f561b9aabab279e8c131f4d32
+68d89b5f8f542d881286b3c8913a0a71036058755e2f47994157f645ff086729
+67ae4c8461191607b1cd8c4c83298a4bcb397fa5eeef83c5955b301fa270c293
+88d0fa7d58b00f5f79cdb0326172364a0f4f91e189101a2bbbbd448b576c275e
+ae6b320f61d6536649b0b0f9340d25ed5ef2746f385bec9526a2d989271e9a38
+302c84169518891d336882d85871ab751c147d1c8563e2d7bf5c3a660c0b0ae4
+9c0981e96dcd4ec45c166f7a34270018a852d5108219486b706f84ebbe9ede96
+6dabe61fcaa62658db716919af23f384948b4ed54ed369dd3e6e9a4f0422f35c
+afac114819e7b1b9a09bfd1b985e18e6dde975e610f48d752eebea00ede16f3a
+0b090103100000d0c213c4425a5b0ff3193941e27eeb978c7a42dc6927bf301d
+1f0f366a5d0ed75b8a969ba68c8106466db17cdf5b516a0ab63f3772dc7ffcf0
+4ff5a952d0798b68273dcefc30c3324ab824690821875bb8580543ada7b15b50
+aa04cefb22aedd548ca17e0c334493245c2eb4fa7549fbf0833f142967753111
+96dfd986a2536834b4dbee2945c2ed76205a05b9fdef35c9b4e41a808220e6d6
+e0349659c3ac8c3f86462866807ee5179d6994dca75b8d162763e8af6107b272
+bb10c72d297aa93c0055125a426ca0ef9a2c79a4b73060ff6b45719c3dfe2924
+8ee4430acc1c9c28f8b93f554f668cf14f39a728d7b2cf00523248d5877c718d
+28aa6d2b25e1b0ef7fbca7bd87a1bba4ea760b7db91c7d8f0811840654860fcb
+ef679163d03dab048f05194924b68433b76330a6ac806034e954b80b5a7c8652
+719aa83b70fd434ede624963a0ffe25bb1f72b71f3351164d1124712d58a79f2
+5c60a3fdecccb25a5658ad50961a756880b81698c2f2915d13f02ec6cbd28edf
+587457d825544af042a800e4387e004d0701b12b8281bdc76197de64309c5a33
+463bb7d317e7646ea2e7bdf7c0a38e82b0142d51a055bb90689f11bfb8cc5065
+b98cb98bcac7c740d9b1676a103af5a3501e6949ebd9705131b7f30f10323ac8
+0e69159b8da52acc1bbcccb8096d378536ecb498900fcf1d21a92dfcadcca90f
+cceeb56d38916c2fb64a9c9df5ceada68553e18d5c5d184c8c23ec78dd5fbc1e
+f685737e77767afdf33fc585e5d4e9fa1d85446b1b209ed0f18e529dc1487bef
+57c45e10759705297476b4d9b323b45c9d7b364df726b9108f4efdf1c080c151
+5d379adb369724746185abfb9567978b090f9159317be68fefd735a62d686ff5
+0b08e19c87f668aebde88f66fbba5c614415c7ba4085b35b3b086662064ad401
+abe40b7c4d0541d69b745f7e4a9ff3657e74c797ee656e721088409226aeee8a
+be944ef94ccc9d0d7f4f059eeba35ad008e961a252119950277e7f1028305b7c
+a09a5f4c99a3620001d53d8df889589c9aca04f525a39a67fe2f776fc650b3f2
+ec5a895911171356df2bef1fb6302d4e9ec698af4e2c4320821f37533e1cae94
+a5e14eb18f98a127c498ea7e70b1c8599d4ca425272bca3aad3f499130c386a3
+ec3632c8ce2d714d309b52a90ae662ffd310e335a3690bdd831f52ac88279a31
+c3441d8e0c6a741f615c78ef08502af34d81cb1ebd03af02a3fcc76b6648efa4
+d8e550d995bbfa02d5a1d08d0625432267ed55aa34fecd3078c75e1d8e4185f0
+390abfacbf6dc83e8e6bd75094a54a28ac5c44ba886c3b586759e192beaa88ad
+b1f1e7b59703ccc55d0c4383875f8d9fc1e24d7574828f8db01ed10919e3abdf
+f062f0350da3414719c765b600a281ac245f4f7a33efdaf6ea3cefcf081158e3
+1451b8bef0e8ac74d0ecd0ea1958e171fe2a1f23b8557556927b4db67a09a077
+fca48bfd110420bd160c931c07799fddc47df1d5a7050bf1221bf3c5335f994e
+c002a6621068cf4630fc508cfbb7a89ed86593370fe36d559e4fad3853aa596f
+50a4d4fa7c28ddb348986fd5e41c12aa6612e1b8ae69723decfecf062e7108d9
+f0b6f92c3d9251d7d061911fa6d35ed466763f82f669b3ff5dc1cdc5ecd21b23
+6424453dc9fd542578983cecdccd279cd52a2461499ff3709ca9b52e7d8ca177
+b59ebb7aac2e5a65dad9f3d07694e4f161b6c78c37f85cb9d21f2a4908c523e6
+5faf1a391066e68344a9f15467991f809d421af2cbdb9692e4ad9e64d0175f59
+729db92384af1d1c9d058b4c5c9808404e72db14c434929a2ee56772a623811c
+4bd21e254fc99e23ed1f8b2997ab725f809b5b4a6a9019d61e82b151a3a03c24
+4189ad819e0c0852ece01cdb4829fdb205a3f704480c57235cef0b9960134ab7
+4b3bdc8ed7376980e75d48829dfa6b1f6b3300e2ed170771b9c450ff104ea759
+666461d62a16674950d54d804ae25dbe2540896e7a9fe57006efa21a6efc9630
+4836db559319fe389cf960f041a4d9a0366121a1ead35032afd4b699db7e6252
+abc9a67d9bbd956f5e99de22a0ca48ae978d2c8e018bff87406a9f0c437eb552
+e19d2455b56d4ef37b47577d009d14b2ce56b87966b8d2de7a7c423f89a22ca2
+60c837d76b2ba0d5c4817e9f67ea9348d65975fa356851a9e56c19bce0ef8aaf
+3905b73c16eae90cbcd8c1eb4c8e9d840cb7158f145120e3dd6398e3a2034fd9
+95f34006745ccac381cf8c36a13bad6cc4a5420ebe75ee9aa608437fa831d5d3
+3113083cad048dc0730667388bdbed24b33d2c39f67f501f948fd810b8111903
+63e2fe20f823845f9a876e679120f93ba686cf408bd7d69237538e3751c20e84
+4b48e15f86188b8b1002be79cbbc75f226bdf458193c024629aa680f650cc8c8
+71f4a6983ae5a1598821f3f4d8a53aeca3fb8b3bb4266c4aca496110962a8de4
+bf4d133bef58ce2dda36222249d0532cb935804e1ab3fa15066bd90ce643ef8f
+4446bf23d64a9212f5386f4cec60ac632c0e9d7404eb70303f35c50b3ec8dd5a
+99d309b6b7364cdf5fbc1ef653b661442b260764c902e8f4cf6f2ff2252472b7
+53fdea2300d5d6e1f77e46494d6dc0533a77fc007e723591769fea95906c9a0a
+c65f04a8fab8fae134b1227406bb3e44fa20a8379c91318d21315f730b208763
+654d279af7d123b98f2ae67bd5b2f7920187ca936b45b7e3d1da116953f1416c
+46a41d922df8d5941e1a860879c052020ee0ebb78eab5e0936b1c8d02eb4061c
+11c2cd1098e566a180e63cbc8ccf70a0298f45adbfd0db942abb2470bc1b9c3c
+98f61b3ca787d0f823c90231439ac4c5f8ffc7057469b2955b9bea13dcd9835d
+8d020f593e21b87cc8becab62522a1b1dcde669760e830be5c3bb7b12decca2d
+785e1eafc5d6bb3ddb447c2e69215f7647d4e725a2c647746b7bc7f5df9d3189
+d6239ee2a2bfded2745418befb8def463433405f4b4c278295c8c2ad9ee43917
+11353ecb9ae9685f17550f208bb3eb7179a1fa69882ee2691d280ead58e93f37
+70ca26ac429ee5b8e0dbbb7dc1876f11ebe6f1a0dc330cdbb24b9cd1439b3044
+8cb62e50b33ff18099602c620af45674a3ec0c93fde12ebde8b1543c1f9c5d0e
+0a12916ed048ea3244f07060235145cd2a366581ea658b85272d59cd429fc509
+8f62c9937dfa11d29ef22c74e5115f6383d5aea6b2de0ca4c5366800a2bd802f
+162c3e3774b12b016914e4c4e008d81b0278c336d764dad0cbbda4652abd4a8c
+213c7da9c9fd6ff7270575c6c15bf622b6f6f4802ff6f7991d371a7f06755ff3
+cc7b344749f239036a68803d367d121a24241a559e8d64b6658a8363371cd9e9
+b79231afa2f6284a1ba5b99f18bded77db058469932ebe7d405cc7fad3224536
+fa5fa3f7c643637960e88b0e50014a391c65f22424f7edada3a7dd72a3bbe5cf
+47a7dbc05a7955d77fd115db666f4858df46260425575b8ad8ad44912540ff7d
+1cc336c3f9056df50f5a0a2c34f12830f81a332b982db204d218593b804661df
+5adf14c6ff71504cf9a6faf948601e3e1319c806301ba2915fcb59208ca378e7
+afb5adee01e4167cac25e8a1da13034162c5b1d648bf608174a38205ef838067
+c4943118642ac1d5723eccb0d5e365226ff4c34ab97cec6c9ccb7b73c01ca8c5
+85ec906334753fe353bdee090a79bd56905deeb8e4314620e509a83867ea1c19
+a16599dcf0f2d2f3eae58d8bcd8da926a1af99b4057ce29d6ffdec24a7db1a14
+4ed9feaedaa325b6eb583ed87901c43f9f31bb97563afe8630df00acced9d95d
+4b8c1d0f47e02a76730b960e95fb78a4a11284923e9c91a2a5804c14ffb3e352
+943cefbcb1dc6ac888c3a332528a89ffe36fd2824c48eaca69919838665a3367
+7d528ce020fbf68a32d10f0e0708e16611e734a0b20d18aa6dcbf8c450e2b5b5
+f09d32c94c115e9ea5e1a634a163cec01c3a2f3c7826ef7e9d5e8d19d4c4866c
+84666db73ec62d9c5b2508b05145522c3da50a31871ef2b6ea0f48187c191e06
+e0d8160390c05376f0eb931bc07007fb313af86bc0934bcab824073d6b30aed6
+5bcb843f80cfd4c3ca11926c604512bb9c14ddc64bed2eeb5522a4ff3120fa47
+d454352891efe9fac5fa88660011a8c0ec0570e0430b19b698160d4ddebf7051
+079809d76d8aecd01ead398d4e2fb15423fb38a6dbec48fbad2098a9ed738f81
+f6330165622f646fdb5b148ae89168c3a1fbadedd5d316246ae37e45bc896d9b
+aee9dff0f5de45b6121e9a092ac8b4c69eb61138505ec66b367f59b0c6f18fec
+c0010864ccc7a0dfb650115242f1664ec78b1861b93a82a793ad55f1d27d646e
+90cb1534ffc6b9f5e982db9070fc65c9559b67285696acb8c7d680e7f109890f
+4df338c15cc2359fdc3d52bf64c5f1f04d2507e80b4f3c51e68c2fc099e56fcb
+89d0d3bc15657fce79a2633352e4b6ef022f23f17c9b99006de8f42b6c09f5c2
+c82d88b0bf013d7500e10a838d34098b657ce411d22916acfa09121a3a84fce2
+a6ebf229b12763e2f5777c99234ec8a966a7858330ef3330a3e3d0fed0c8969c
+1d5099164cc9f1dc0e398cd9d30bcaf6a4b02b148705de166306633ae538f9cc
+e791641864e73441382828e68f406a673cae2853224428921ffec808630e495c
+64ab4c0754cd85327bfd7fc9ef957642a6d30258b4b9d29bc059392b7e3fd339
+5a6e5a0eb060f9dbd09d110fadbd8a061b1ee8880c61e01fce52c661e1d1b5f7
+cc45b9efab2880a9bea2bd64e8ec183632b1a7a996baa7eff23b18ccaac6c88b
+1835eb751974d2930c1f354f5173c9266918872eb7c70d90f64113f12b86e6f2
+eca0e29c4d4c20fa26df487b9be3323ef6de8dfad3f81c7a23a4930fd3a1c6ff
+ae0a952f8e074f0f034d4dc16e0f3c11463a57ce0c14fba845733568ae0e8f46
+1a00d55508e00a80be53d818d38acc4f7212c628cb2047f18bcaef075e7fb3d9
+6d090ea9a95a21ca3e7f797aa2934653176bd7ae0e72c52dc19196142e571338
+572a939790b6fab6592f56f8a876c99bc0f9d04afb37da897e2dd8a3818f9134
+ff6dfc66c7142738167ac5688b4da11dbbf343aeab2fddc82631fc7f5e3e5bae
+c857ff3757de3c01f097db34436e6d9ce0736734acc91c447277baf1df07c5ab
+ae7bed411bb203043f0c16155e38f62da67dff78f94bff4e8ee86e0261628487
+0290e8b302f9941c60a04973aaebd7ff2c4fd0c5fad6e85625921e641b73bd91
+8ab85ecc505552442e1d1802460024a9d3f523fde2d1139733fe54e74dc1322c
+0d67261490354ed262e2601098689d583f0feabd9b90fe030812442be5645817
+5fcb9cc603f45146004f4f06d3b6325adb329b6c0686403678ee2901165cd44a
+f85d7977c6e3c84a0c5f5d7ac40be097e91259eb0928f84166b2bea549d82ffb
+e2187555d160a406a8f273d18778b42f37ec7045734e579b9a7141f48559d8a1
+2a491e774eb885449bf57ed3737c42ebfeff262bff74eed2d0a2a8915006950d
+24b1f2ed4bccaaa7a37f126759e52034dc7264eedad951a69dfaa509af59549a
+f2de1eb4a74f18abd83d7e8bf00ebc4755ca342836ecfdd0c11221aa26c187ea
+95700568592036fa3a03b7378633984b7340e8080f82355c2a572579c06d2c86
+b3602943102236aa99d971cd3fab42db95dcedf44d04c8f05a2a1381c6e9c58a
+a526db2ab99b4033ba0d339ab2e1d93b57e691e66efbb79e627f2d0eba005080
+7ed4a60011be87ceae68fade61f969daec01accbaa640cca88a550c7de3b13c0
+ee86bcc1b3d11cb069bb2c205c205b35da97c554e0eac66dd8585bbfcb18c8a0
+cb3941d9eef3a493a2f7dc187a480d21a7b4e5285de82b81e04d6e239f7807a6
+6a334b6c7bf6fafe27c1a81c3957ac1590de2f5d74a0c9b8a990e2dfbde91298
+30c494a28e29557f3cb2ae8a6637fa3d83eb11331f8a3554a1419d8c5e84c1e3
+35f4325506a08bc8ae49a113a5c3a10f6d4b5446fca9a287d02d8db0bd53d706
+00137e83ed703f3e72e6f5f3f2fb14b6dc3e61c1bf7d910f03610666f5579a81
+644c5eca8ba56df6790561ecc91db4fbb7872fa49d2b7f10ba2aa28fb9ac85a3
+4d571ad54e98993f94b7c551e237b314536681cf8e42a26144ea39d9f9a9b295
+9aff80e5b965d2b3127d89e27ab1c8804c68ff4a1ab678ad2f1bfd5b2df38985
+bce719099c9c7a128e29ca4ba9187ef9462d4059034d7379a04aba778756f48a
+2373c32c4b29b769c6e9fb458bacc4bf10bf25320d757b76bacf1745c0593e2c
+fd20432e32bade5a213d53c77d56d34d67f436c1566395e6143c36c16796cb27
+bdbdad5cfe3dd3eae67b9474edd492c85879169324cd9fdef636d5b9c3abaf36
+edbb4ac14a98893e36dfbe7316c3b9dd3c072327b0bee8bf09fed0a0262f0e5c
+08bb6dc0474ac2b428a4c1ee5b624bb1833be8b2f4b14c254d7129a2162308e6
+48035a579d1a7c236ec5bf6255630be94bf6129b96989b933f9ce2745f69140a
+515da1fdf975588afbd4c39201ab3ae8b016635c2bbbe6aa27bdca6215617e2e
+b9d4c0e1fdcffa313d847929c37ac7b07f96b0180fbbb67f46e9b6cfcae1a66d
+4be0afa99fa7787e7f8be5a04e723d4f30abd5a25f080f51de36130b7862b025
+eb56872f2744686fe5959fd51b40e6d11876f61bd9e3eaecd57b40441b5bf86b
+378c83c4deaddddb6ea17f6997549eccdcee9a7a48a24466d9c55ed17d7733fb
+f323871fd7bcb8414609729c27575ba9fd429553e3d63ecdf78851b72dabe4eb
+9ac67e961a4dc4cabf70946cfecc144a87dbd9c73259455199412faeeaa3644c
+2022489a3136253e1497bb3458be497afd4c9049c4a615a102829c85e9a4576e
+350e14d837372b4b1663d415cbae6a3a954880114b13a1c214b61ea6594127e5
+742b98849778893631b67469aef59b15919872a7cfd255910f17c53576f03571
+0819d59e2c1a46d0dea64fa7e03a63256a8e65047a1ffe4fe36497d2281b6aa8
+9ce1ec831cce61de63c1da6c8a5672c25e5a5a7bf20a7f933bfdc45cf7bbe921
+42d8625b3aac773bafdcc614425fadc62699de088714b72691a1447506e9a37a
+093a960287e418f2e530c537c08a3e19ec7becfa4ca9320b05f27974d4c22ddf
+61a0ccb6b866d8961f04f9f9b85809bc57d358cd918dfdc9603b32fcbea81d3b
+e193034bc458941b7a413947a1594e46b4ac9bdfe9416c275807a4302694f7b9
+2a226b8c96361a389a9bf92a47b28e501a06d91d6cd54fd2d2707ce52af2c279
+24c6e95948a936b4e0cea35c6bc62edb1f545a28ab762ebc3c2ab4c4c3a670fd
+14cd631fb5fbc26cb51ded32461d69a2b82c586c40cd1841fa3ba780dbad789a
+cca61d286389dae51295141ed27217db047eea3247388390c153c22f949642b8
+5f87f9193421abdcb6d4d3882578f9e70b28ad6238d1fc25877f42e3899ed0eb
+4cd9f13eb898e67a053d41ec485931655c9575370aa8f4ff30e8d3e7a26bf27e
+f32f2ad0bd244272f84af019bcb2bc6332142b4d0bb50fcfe13b9c4e9883f0cd
+c4773686b3ebc08b1dbd2ee12fc3f18a28be0610c4bea2df1543ae37dabd861e
+2c1a65515d8bddd314f8949b5941aca77220073b541c9ee457e24c862781f8b7
+56fa69719cfcea364a0d983989ced39ba2c910fcc25a00601b0340d8d6083f54
+73d54c577012ff8895d006922198cbd4718e32d5fdfc56143818901a670d67e1
+0971b6754390848db25f059764a99801ecb89fd0f38d46c8da9e01011bcd32ef
+c3c445769122d22409c8492bd716782f411aef4b4e0f1234a936e71b9e8a6237
+9b18088464e5e2934c748c64d69b3f2a92d81a1e0ff81a3150013c3764ca0194
+110f7691c3a2b8809900ab262825cef744812fd2f5566894ba1f8d2250d98b89
+a8683f736d4b5a59f51f2e332c8ed0751089e9c51b91b1c54d9b260e312959f0
+c692d4a760932264214ed92c3ded8f45ed1f40dbde9f20fa7a658b6a36e121dd
+cd1bde6e0b8942715b5080fc04a7e6db224faedd8c5778219966177e476de4a5
+a22be484107a0c11d6eaded4ebb020651777add24537d83b6d61b407df0f60cd
+34ee532a9343f5b4231937839a5b330df795293ffb2b27521d142065edeeefc4
+8fc9f90558cae326dc18fa6b759e4d0db1decbe33bf3c1fae3e3ab33c9392d62
+429506196d1050a0e2da447161f2e323103da806d05c40618288fbeff828d053
+d3c6e0b0718f5c9afd1581f0098eb9b97c35aad2cd590e97f4a139733cfcc7dc
+acaa5814d3b63efee7c764c0d0a8ef392e3dc3f02c8e89f64fae8ee4ca05f115
+4314eb98e6a0e032886fdf29692dfed62802e84b48e4705cc0c158eaccf4d7db
+dc47b91aa3c5a49ab600679c13a2177c145759d8bdd337e35c77717a15c55caa
+45339aadbda46e71a8a018d7782b9299a2681c927888408328699da5b8cbc45a
+b2705038b818fc0bdca4d52896057e105c8b859a52676735022208a76abe3f53
+3b012a22daadacfdf29aefd86f67ca840a1473dcd650f03c315f23bc6ed8285a
+9d1796862a88051a4ec70fab8697b54c53260eb12edcb9e533eba6f9c1668f5c
+9709dc308f35b927c974fb1d0c58757086770e1774485e757f1b777db15a6857
+1c084f48b3da6102cc7b38dc89f7a8e33411d7e35434750ebc98dab8439fce99
+37f7b35ebdef734e2b44faf3dc68fd5d36e8fa82face91146ca6bfe1b1710cfa
+60a6178c88ef1137074956c67cf81e0052d7109debf10409d752e3f770933111
+a069a639005c0e043d42f622e96fab8a4a203857a788b32d3b2b5867c7fcc075
+9236e5dea77a574f4cf964d0cc2cc786c6f0068049f20015dda844a3f409b4dd
+bc95f22266529f58e88eb9568ba44cc414535075b383937d1b33135f77c87a92
+9e77f95cdb0d71a1807f1193ef20ecc1c497df8e08732505288fd2ccc73b77dc
+cd88fa4db43b9410af1524b03864642f44ded44466b5caf39429e2c18e634834
+11bda54bfb6787cdf3810a3f2e15141d7dbf09aec5b80675d65aec2c66e80177
+4bd3e428b6d111e50d6f2e6b5d4d9140689598d147473b57a71ab08080d37d2a
+7f2b89ae2f5948eb11f3808542b8af7ca2173bd33eb513c67f28bbeb87627ad0
+09fff3b7ab0c2deb1668fb922649bec4bde78448bf7070e07b101055584d002e
+93826a781916f1e2ac7d272f1a31611835737d54671d9fe6e5b9460b15e39fa9
+af198819f2073d6dae3b3763abc240732d719b0b1c8a37e5f9f76103e770c0fc
+9343289d8cf3cb969bb4053cd377413a610084e68c255a6faed405bed1e4437f
+f93b34eae37559b78cac42761c985e280b92c57c0641c244f3c480bf57fdbf6f
+8749fa7a45d44a40f690d7cbf8b6d9d014a533b8fc62717eac7e069cbe6e3a2d
+62e0472bdd23f0edf4202a643c8fe7dcf37f4401d94abf44c749ccd26c2d8fd7
+1ebf9ecfcf534280e759959c243f3592622d799747efa7d5b75964090e0a3dbe
+dd08b6106631bdfcc890bd5eac60e6fe316e1780b0073eb4a25dd38ea62793c2
+e3e73f9c4ec3d85693dfe038e322c2c383193b789d13c4be802852b7c877cf29
+4b58bf6ab55f9d6669bae41771d926ca28aa6a58c2601f13fd1aa9b0d7b481f6
+2be12d72c3ee24851851bbaca53045b24823e02581988e4432a8ec843866efbe
+5f4511418efec41146309c7a57d665d8ff4d97dd85578dece104a6589ab5de28
+c7d3e653f01ca8492ae98a2dc7381be07abdbb5ca3ef9241ad0e74561f9f5a15
+2ae8cd680fe804aeb1f73eba506da5aab780d3fb24f617957f7835c406c2f017
+1bcedf43715e7f01450f3bdd30c91d91c64e55ea52a8fe5423d54965aebf4574
+b1e9c8e46c78b76fb87df3491440a7bedc74af6a963a2d34486b81daabdf4ff0
+37529951e2bac3dc85ae2aa8a2a0543a0093d2ad7a872369458db38188a346bf
+43d572f9e2bc2f780ec70a5b65d94aad411f888b5592894da1e4486a0d800895
+c08accb0c9b8e0f18c0ded81be332ce12989c95f451c661496fae73ed7f0eced
+8a9a8754bf7778ff0b4cb4ba16c67c9a905e781ddbe16bfa57462ccb6044d891
+83d761ce58941024a403ab718764a1855d0673d39975a286ac8b32f043176f85
+f2efab1f0a0fa4e32ff159be4f53292d5e393262e9f6404b6ed6349ee4ebb62a
+53dfe5dbd2f6b63960cb2bbbfa89d7c66a44b2cf5969ee98854cea3e04b27c19
+f4c79157311318bc975bdcac70548ace6dcce4d71e506e4fcf2eb115309a4444
+f76b6c271017a02953d0ea0a2448aa832e89ab0895bcccc314fb02968cf754ed
+3307f1c59306eb773d7f63f7b853f0ae71093da716b6c0b8ab469c2371c26c85
+193ef171b6c1f48c559146d1989af1700d9d08e3d60ffdf548d5cf7a8712c75d
+24ad4dc445f310b625c4a00e0879b95a2699189cbf88fa7d2c3fd191c963164b
+d363998c215e8121fc3c44a6fd4e428b244a8f2c08b3b058220bd3a83ecc4b12
+24b192d8972430693d9692a045df6f8cc8e04829a1ad2a690cb876c8c72ef8b7
+d04a119430d9882aa7b4994581ea9d846970e80f29c4e4386e95cc74e60d1aa0
+e0eb8d5a9b018dcb3bdb9fca1605efebb39bab3abdeed7585fb989f8149db2b1
+22bff8090404c44bf2da1492a697454804b85f7f282f78ed0df62d59d911107d
+524f6db56e00f897c58015f399bc82d4340a62025c7867c38f7063dc4012a795
+016ee4d90f14c9568d5e324e73f6b7c57ee5f5375907bc403584eb44a4e33c4a
+88435a399d72307c46d232ae24b3ffd31514ad891b7af711263d5778f1412db7
+4b8302b179fa8810340f07fc9b0acc27c06c915f1b45dd1d4d238e00796d937b
+4539a8386a42d6d73f66bea6d8719d057d54cfcaa282c4f06336c05285f53667
+8feeae08253eb094aa8290c40ad00bcb7e1ec20cc99a0ceb80f08f8f356657da
+ba56829d869fde7c4645559f9349d3371efa44f58bc36aa493d9a0624b5ed4fa
+935703ee695de66e687f27e1f88228261eb8c5a42a6c9b30eb45227874f42fa6
+aeb66ec01d1b140af535b1e28d625b1849d2914cba6545727125f739bcd1da1b
+7d1fa4b2b0e6db67c549e0e2e52953cd3a240d3eacbf623043d28b119193923c
+94a15f4773e0c3c974325f608d0ac0015cd450c02118fef94cd39341b8b1144d
+9ed9f3764f3c7796bae60881f6d9d84e76fc18ed060cc82a1beba6123f05ea92
+9a3f3eb82e2ac1eb99e5c6ec65a9cf2a4e0b3c9d55816779edf45c429b49f553
+f0ef1f1c49966a822920230d1a4dd6c05e2c676780ad7a6cd325422d3fb97cfb
+1594f9a31f0730c1c811cd0533671940b3dca7a70fe1c1a79cb4d22194a7eb83
+20323cea558fa1ab48573b4d56fadc9ffc911c8e94680985b0f527be4d218233
+890a06787f21b60b459b8a712eda9797f9dfefea8bdadd077e56ae6035fd5ce1
+a405b543538c790b0bac9c7586d9677feb4518aa590e4b4499902f8afba48386
+908d301b8ed6b87ee1f1ddfe80c37eb0affdc1406617d37613b9a3e82694f7b1
+60b2d43483a09811ea5f50cb559022034d9726c0f9f80b5efbbae8d1dff34e34
+ad6a03f4fe2396b50560fb8a9e9edb2c33f359728f2ff393da760f9a50a04320
+916a583228be053cf17a11246d97e2adf68891b73cf607a1c2705f9066408137
+39c09fe101bbf9d6f0be4fea0b469c47ce6bc2ab1df3c5123f3693ecd1e29ce4
+20f76b77f99d428254f8bc54f0cb95ec02872f83677bdb3aa42e6ac247df1a65
+9c53f63c779b4a2d8a720818033395d47798594ae67a5d84c4505697991830a1
+b244d86dbdcb1b57499332ce0c7c2b69275d043e5be094d835ed3058fef037d1
+2771c26dcbb2da45f3cbf68f219f102b5926200726ae55a214c5267b0ea374de
+41c46376cfb6bc7c005fc5cc803822982133c604261f3a53c7f100fb43638195
+5f4d544d99e3296fec2d65b9f3c40636cbf6f6225e62498320a0148dea171546
+6ec4a4a6626c2d69ade49abc9856a5df5d5854aeec16070750dd7de29b8b6a30
+63aeb9bd772f232e80080f9eec514e8578ff7a51f2d7c083695c50c679130a83
+9708e9e7111c6d8abeb055502ab14e0e4310676140a79bc88a0cd652eaf497df
+e92d43ac0bc724892d7b44926852030ba229527177d42f648f829a77942f1181
+2aa4688d4953c18b231b0e016441022450b6a4efa08a10b550734c2e7794bf06
+567fec60c62d0c159025dec3805ee2ff0e85280442f9cb14b5e6d2cbf2035153
+b49ba7836a372a2c4a4173e2b63fa839a368ac7896cfe0e3c8b131cc4385377c
+b4ce47bb4fc50e84a24af35342cd3356b1299d421ef7d172679816d7bc8ec23e
+e778c76e59cff801a01bacea63f46568ce5fdb81e5fd21f9f43661a9f8815df2
+58e2e9de4b22fb8b2588cdb3037b5725ebdd76a50ebf6afe36eaaa072aabbebd
+0c6adb74468395b34b84567cfa423b19deb4bc67dcfc86345cda9a9f511ee834
+a17ea4349584ece87b4fb9ea12718c600a1122c1096326e06e193da1b32f9945
+3a40f5f8b37245c99e5225c6b75e1bf9af0fb5d0b522fad58eeb2d6dd9d63ec3
+d9dc272a5a80ee7626651f9181ce39fd8717c870dd9e84ce9e942e1713c11c6c
+87acd1b3415c15ac0b34c24dcdfc59acdfa56d5980efbeba111a4e5693c341f8
+613d83b3a0828d48ea00487e55a27ee4be7b93c30bee530ebd2bd0c41e280f60
+eaf6ea444894e24af55e04c7892dc8860d19dbd60f157537e2808d2f561bf869
+143efcd8a7e3e52911c58f2148fc2485e3b37ddb23e933b074638c6459c09e2c
+29244a49f8e7fc86546210e7bd68b966e67333b2b527ae20180f8af858a1e2d9
+8f21bda6e98e02f310ad7960411eb89bdd97e79751ce5cad665ecd7e7995cc6b
+18969d13e902252b163eb346857d6b091c1f8e5f7ac76284be6eec4748e92c68
+4e31a333726ff7d5c1fe6d9867814781ccbdcbd1d270cc2bf014d8d1cce6a8dc
+b184f18651a2cc94975385906e22128aadf419672cc862aafe5110fd9cb4a028
+4f7413e4e244638660a20968a81ad923eaf27bcbb2aae3106ebc5050a69a92d3
+483e3ce8e5ce69f06edfe2c6a1ead8522184f4beff28313a8109731fda4228ff
+e3ca429f4cfd68035d2f73667bf0510135d968fff85cf8c516a09cf60bddecea
+8f889b3e63bbb6ebd2ef7ccb0db00ef5a92794b162c82846f7fcf3e69bc6956c
+5e63776482c6043bf73c986f1f18c6abe32c71f1a4a74f29e9fddada315f5ec7
+e4b38e1225ae92ba3dfd4746ce74c1004a7c2007bc3a95d0bca6eedaacc05078
+ec3a6e32fe37b6b3edc1ba46da5eb8bb981867b64404805dcc91b4b5e0b527b0
+be53e79596a7db573edd7f8f913082e0ba15e74d44ba59f89b0c9d46fb34c2f1
+25ce2d967c903debbdf67040af8bdae68ee0b1e0e89d79e9bec185394ce531ec
+8ff639e1ad00caefc9fab3880fccf55dce1e3937860b25a47aab8fbe4376f854
+f0c983ae950bfa5b53ac225557d28dbef67a89ea7571ddc8a710756833bdb5c4
+30ce1ddcb86623a82cb4e1be4ffe6b777a0a8409813580b75a89f6a8c65e81c0
+168dc486916be4f40cafa4cc6b1e22d553963b2449e00796e459c57b94e34ed9
+5bd4f1eb9798dac04521d031bb8eef565c6b0740dbe50f0b23fb1d799fdc2f61
+3f46ccdd6ff1ae778909d8998598fb796e9921069e4766ed35a4422782f62338
+a03acbc0a8f42c0dbba5917d7fd0bd2481e1835c660ceb5f2334acd57d4427d1
+97a82e44b0b172ee769b69666776597e018d05db7161e3662e42e0a1d5906c96
+607ae2ed6447cf857ce0e58984d8c363a3a6516bf4713c3b23246232b5e512d3
+9d2c3e32c33408c03262cbf5c517772ace92982b59db582ff69a3ff6c0497405
+8dac147089c03c44bff3ac70e685939ed4c1097a0cb6bb9fb399c5c0950f6689
+5dd9f05c7d262061813eca80e87e2c15a266f5be420796d1493ff3547db70f66
+26543b1ae2d6fa431c5623191327118c5eb8b331ccaa0f198f062c51cfbb981a
+dbc442937f63c8a0c179c2c42d572564bb872a2e6dde8e7d680372b157e840f6
+6fef984b009c671bbec94d3446e85579806b11586cdfefd7e2bffce117f15e11
+f9f47bcc9e390595b06f7207f6457cf1f775f781af79b5b825dbbc98e3858056
+aec61f1d9210769e2761f216f01038b24422e67b5c2386182a4e9382d1f345c2
+c6ee6299e4e3a784a4166183be9c2628afcc27c45ca0391975591961cdd718a4
+3c3d1b85b793b5f3a8b6d7590daa27eb6e73ed7726d9719b43aa13e05ea7ade5
+ccef5bf1333eb7880311869e055391412a9f09b676ec67c994783d0be74cca70
+76424bad7f2c80f031c2dcfefb6f2c8e352d2f41e010dff7d37dd6b03cfd207c
+6308d43432d33a1ffc94b74248b5db43f044764a865cf2a6671bb1f99a7e0df9
+5ac614da6c4a8d2f8fafef2fb5358abeb8cf307e0a710a4d3670de75e0f19410
+3062037291a143c03375e6c1fcca2711de12aafacdd5c071adf22c86dc240ce2
+d5182701ade04a8a1c73144012e2b88d4d5621e76a26dd5418f171f8edcd1dee
+3bbe3d6a357b75a217a40e79545113fa2ee15ac0ea2a94b8abdc82e7645596b0
+d8de0966693b23183fc34324b6b7c3d58dcd3b9a6fee2df7b599ec03fddc0aac
+632305776c092c7d45c8e64d9f4c4d9342fa55f9777ebe941ac71abcbaa94a0f
+91ecd9ba159dbaa6ab418c1bdc3580728705e782b6259478a036df71d56cd481
+1e5679ec3fe59432d6491749a9653ea2f22a16cb93a0762e7f2aae8fcfdfb43c
+fee053fd488746b2af285ac480e7830a0707adc87161595a5cc5a81feeaae5e7
+64a73af7c1d7e8c1dcca93374c6dcd57d0d31c479b3e89ff4135e66352290dac
+86d663c53d9b2f4479662c8a335b00ff194e0a29931552a641510bb9b08dc991
+78a63331f41b7a813ac7640ba77d7a82d9f9823f75c01175d49d2d357b2be420
+b8137c3821f260f3dac79818a7d0b4d86d257af7bec5fed35f157024f89795fb
+6723d13bdc0f41a1d16cb2a232d457376acc0e332fbe5b36344fbdb22ca8d7e5
+660a86f3902f04ad8e1685998888baa9b4e0a2c064d2b63cbbde79914f3d8f52
+059ba32a5f541fed91ab69b69ad53d045755270345d3ce9916488f75bc83e7ce
+041b96eded251aaf6abc9b68b16da135f86c74556394cf9042b54cb38784c548
+6491c83043598564ca6c64ac7e11fa09a3c3887fe20d9314c21ad36136e6bc05
+561c0c1e9be70079846939b84eafbb0030f4a9b0cb303cbcfcf16ddbf44cf977
+7f8cfd027bad28fb461b29ec10abf2655341f0dd3950a508026ad4031f3b139c
+1e16220521c36ed2f7a0e11780dd8982747af44a62bf13bba9eec406077238b6
+a03acfc88709d33589cbf6341eb2d1f3b096e515efbca9b6c1328d97cd840dec
+e341741bac9d0ac07f5608652af7caec833adff0e09eb728588a6da3e3fa8038
+b8c1f4105a5fd50dabc7609007ed1ae39a0b75f11772a452ca7d0bf856e0c9f4
+fa0e98d21df2f47924528b6edaf372b937d3fc9e418b6e5c18058f93d5bb0e28
+a2b59dfb5b5924cb20ba6aa4a5e5a1239e864c9de629aa43543ac2eacf89f6fc
+cac316215a3295ff05f42bc41cd8504f33326a3f1596c63f15272c2484386544
+9ce9e479d5df3214c91b9ee0fa94da29036912a6b1f2b8e240a9123a6854d84a
+08f647bad14829aeb65a3a6fc8b7cc53723b992db9a94d8057c33c369b401ad7
+1ddbf2078bd8ab303b399002600d5eea4dc469535562e1e6e50366728441fd2d
+35cd771495ffa169ed4cdac01f988e7ce5c7d28f9dd0093bb95aa97ffb30bc6e
+dbe2f71fd3e70aa1e2de7cdbe96181e92326d26a7558b1c1fd0edb58c63c51f8
+b1d741513d98e06d3769d64e1a11fae44088583ee7584e867b9492e66e9c7114
+3e165b672204d444aad59893d4212860f074d1c6079a261f6b3e7383c57ef17a
+bb600552eb518698dff54a48ef83ac82ad43534c07dce6e9e32078b5d60240f8
+b10d07d496f7b7de76fda6a20db434f88428dda2c5320a38836ab84de94645f1
+c511080a50d8254c0cfb67bc3ac2101c401541a34959107898bfacc611bb2962
+f4b3d1ba8006c28103c2a55286bcdba75a3537f81e7cd0d02a9a3f574cb6389f
+332983f4cce98c6d53089588532402a4b8a1d1427d550c7015e5ef584272160f
+a044a92664299ddfc990ab0c885666c09b6f2d6240db9f7dd3f1a53a6e312a80
+963080a78e62169cfc1a1a7a329ea2998568d9be427b7c69a504e56a7920246b
+1d12fc87e7f797798b01aa76fb34594749fca31041373c2a3e1bdf066c839925
+fd89b479bc991372dedcd1c4588f1edc25ba46b7f48c93d13ee470727c9f9f27
+dc942e55051d4f73af8ff183bcd232980fa907def8f9192c3397552070d0792a
+0e13f3dce6f14c904992940dc66abcf4de5d31be037a8d913fbf6f0a71c8a9b3
+ae5962d0e70397aef6d42d2959bf2f4058f4aa2226afdaf9a24f326e37d3757c
+56d590dfc41a5a2313ef3a460932e71c16229a152a36bfda828d9d68a411d64b
+24e4854cf677d412d22db866c7f70ce1514684a9a09203572a0b5088ce3d2652
+b014a181389279bc373f982b2db5d6cd9e6f17af6dc1ffa3b05787c50ff2b9c5
+21509b9ff68384217c6c8027b93478e31083e71b91ac4e8de22352ac08aff22f
+e7821600af0d1a269bc56a658bf7650187545a1ff2b85d73c969199277a76dbc
+5f1246a6a7066720b62310321411be865fabd80cba515d52a7767fd70d3bd0c3
+7512150200b4d5e8d92548bd3f392c1f16a55ae1a110fa2bc6ebacc5276e6983
+7dedca629ff9d85218522e59566991ac22a584af50b6155873012e623e64c0dd
+9b029546c73368bd1a91a1365a3082b715738d2d470b4c9cc0798a9d09756157
+74b8b5fe0fd88864260e3af1b2cb01f3cb6123834a468fcf1de1f1ecf945b6fb
+6e2eac258b0e67cbae19250eb2ec927bacde291d4424d8a5537bafdc2bea300e
+3fb2eb614a952717fa35749dc90a683359dc426d901b4f407710ca529f6d100a
+143cc3264586dcf7aeb6ae1e0a38ce7efa0bcc2eaba937bc1d924c61fc4e1214
+f421cab4a51d223cb75fb13258fe0cf3001760df8081e5d8796e329b2219c773
+4ba75cd625e873f19d07dca484886174c089c1a50482edce0b33e297980eca19
+7e80f95612562f655958510bee41fc43eb6f3a6dcfac20af5492449994016664
+9f17f649844b0061a2c7bdfdc3d2d8bbc0decf248382e29b34ec934c3be95aa4
+4d7ad210d2f47c986bb74b162a8b646246e7399dbf42e744dda2aa4814f184be
+9e5b40762dc25102e036833f22f02ac701bcd27adfd7233ecf8178c4406372a9
+44b2afe64739bec4f3fb782643245a7c76a541997da6ab9273d73b506775db1c
+d1009aab2289e1bec86bbb3079e20b0814a0dc046c557d8d5d9a04fcd8deb4ac
+76bc3daaeaa95012770da4d96120e153595c2cfde91499ec1d3371e4f662cd2b
+4b3becdaf3d3cef3c93e786bead46fc8b7dcafddf067e43571cfac08e2c2a94b
+33c824176159bd0612cbad0ab9c87e86ecc7e6fce0e09ac6b42aa81cf1d216ca
+5fa78b5e5df6ea279a8466822c15e9c570c782dbedfd2a2b472dd555551d7e06
+6c582844169e4ff992f0632f3a5d84d0ad97e5e0c87471714f87fd02f7470af0
+f64820292af14a29e600293cd53e9a0d3c2e4a10386913a08d3aeb81830745be
+be651d33c4dc3f9a362b295a9feeaed0a2691659f86846dbf96fa73d14c69fb6
+2934e3e881ed6ac09db98bc4d485ce9b190d1aab30e1bb2c6fac242505c68e89
+d796cafde8195ca0922fe315295e9644d4aed6b4f2a0219784b3933b7814ef25
+5e37a309edb100a6a9484778f195f1b89620e7a46a719953fbf11ea504575842
+9deed1c4d9d9eeffc4988e1db72107ae09873586256168e00f74efc803245f90
+7191058b70b823f06a5728d4bb2cc329b16b1622efe45898da9c3eeb82a0faaa
+ceb67820fc60ed2f8673e089ede97024fd7e7a4c34fe53882f09aaa8fa14d5a8
+ae172b4a20774dba7e98bcd626b6f45ff15742fbb2586c581a44ec7197019e2a
+2a53038e15af2acd5e33fea4f76617d0bdfa83fb7a8ce070abbf357a394c166b
+7991ccfb463e4178d4d4e92629e993639b9f2e80d90d0e040e12c60b563426cf
+0c5444224aee42c44f7dedc06aa93cee86fe7407f2f8cb11d1ecd71852eabc6c
+bf25ce66d4776da60f4daeebfcafa240620e9b261b922ffb670d53007ad659ad
+f25e33c2635201b15afa6ccd81b225d9d59ef78e6f809d03f39b6b968deaf8e3
+b52bcc1c9dc6ff4de50d039d98d0b36773cc230153fa438f8fb4de8fe1f0a3d9
+548ef3078abac9aa74bb499fb06fecc78db02bfe48dc441510a393f6805613f5
+a762368142cc9b1de1163bee652ff1427f0b81836d42bc0d50e70d29846115f7
+3299bec648eaa5afa960b13740716767c92e4217eeabf4f42f7773cf08eede70
+c092e17c4be3e18a0a18bed80c2538f53dbc7410e9cb346df72070dceea70d68
+fcf91f821da4fac781a50ace3f2fa9a4d1f843e07d24b906ac9eee025ba98f5c
+29de05050c88a0c5e645bb6abb68ac9b6e1b376e32d0e6e312bf8115479bdc62
+c34a9d7dbd3b7232e96e326352c6957e316c4b68befaaec0d8c72835a4833ee4
+e745985eacb33c712ac6639f86959c11d6d22c562de124dc83613e86e9359c07
+a1517830eadd1286aa48f699258e9d85678cfeb425680f630c5090d9528ee401
+26b02bac723e01b5613ef12dc9dc22f5c3061f5c39a3948bbb46c20fe86f48c2
+408bfc9d8b8d6bbe00b14bb86070df73dd49d24db3e54a11c87aae6741ea6419
+bd9a370f71f23a42d2ab67d8a7b01967416dfec9220c40ec6203e0739034e29d
+ea00e150ad58da630bb057036216c811a26fd1dc945babf9af676f1bc6f67a7a
+f4ff3f67e34677c5c5012de714c8c0fb6ad2cebbccc73f82b0cc4b52eb992756
+51dbf27622056839bb491674f7632c55a7ef67b249e3d695a883d6fc0cdde6b3
+79cdecea565d186d798bbf65b2a420896dd075df38bd54236a93e968b5d9fd75
+cb178a7da86634231332d0382a0e58c800f453e1fc1a83e19d17115037466395
+71987f6a57092bb46e0ae10110f84d1d959c567b67b9603d22b4e5cacdc827e1
+85e5559fed3b702e3f79577c4b4b3ad26fc8e14a326a94e776f4ada16ad544e9
+0b3a19012f9d6e0d3583f2e814648e86c01561fed1bddcf9b3cde825d0a7eec9
+bc7aeb705c5d1476ecb00ae4b8b8a021bf03aed4e7c9c5c6753f04fd87bb1322
+350e6db3ed8da517dd938dec6befce20a854567d0fcf1a339149369235889a1d
+70f31bad6c47c4e52f6b2e785a0eb141359d76a05a37bd1c566e36d262780140
+65a4fd366723c4841bec798e4ce07f542183a01ef9d7f8f1979539e84ec241d6
+6aa2339275f588352fbe3b05bbae7b7bef3485b05641ebb8c8e3a619c48f93a6
+dd301f0b108ae77b36302af00e580cae0174eb6d30813e9ffad6058e7e850338
+1e53adb9f1f03d8524c4aad05c98ab3862d6d7cbbdcd7d2d7bd921a4069392b0
+bc8a531ae000b67c7e8bebd6b94c2c79f5303c53b045a47be451a3f10afafc76
+a28360374d5fda8895b79d1f94555c30966e5ad8a5f58d54b2dc4c4c39e47b1e
+b3b2a57c8f7aed2ae776fdf4f839cb77f1b2be2d23aa4cb8b8d205152fe3f9b0
+d9002b58fdda551caac65569880995267003437b20cd3a72c3ab3166e593f3e2
+c5399da8ee17843e224b01cbe2c1548d1054a8c21304085b93b95caed462679a
+fa228b98a458e5f08435bcc981e58e4cdc310f57c85478e56b186a65cb8ed185
+4e8a1b30ac414152cabcf2773a2a6c296f89fda5f0cb3634288291022eb1e608
+d7d0a8a46f84aaf58929f8dd7097ca83443ce71f56455092d27b22816379eb04
+4930c56449c419e37978806f3b42e97e1279e9e897a3a709dacdd5d87d0d774b
+e14672a4ef12ba4b49915c76d4d574d44f3e94a20d911db728d973356e91604b
+45e6eb25bc0dd3d285311bd2b01a22559f1e14387c996d531898d5fafceba4ba
+0c6b87aaf5f8e82afc71c04d634c782ae7288f397e50ca0cace18eaa1c17cea0
+cf388e326c7ea4ba925331fefbda0606aec1defbee547666002d478a69538c99
+28106f509a53bdc2167903c9e1d54c41b3696e25106a6062c10d945602e341c9
+b50f1df6630a886c8c6f27383f29817e1b2aa326cc85e43afb136fa58ec24dd7
+03c43b4694b403a1471053cff14fbf9b34567b4eaa0b96adea3a5d428bdf8b9f
+c0159e4acb57deac8d87597b4ee450e93f682bca0712f2136f8216945ea482ec
+8ca99a112e447aab44850a576b69a254a9cfaf86d7cd1c130dc6c1181515b79a
+d703f0903faea4c8e76375951b03b924c1079df5ac55802b53cb34113ffdc513
+8201c1fb93767ede80e76cfbea2f07ac0f95f250697ff0267c206bb7048a862b
+7715741877e4c27b7a88bae1414be335d97ddc235deb4b95a5c51089f50996d6
+a812c4e9cefbcbdfe18388e75df88d04df66eb53cf3e7eac5fea15ff041ac3c8
+834356278f31517ef1d30d53e0dbadab04bd70f2ac190c35e7273d45a0259363
+40dc1e0b0017a7ef36c4c8669f29f21591e43541f149c4a3b1412a5057c5348d
+33b8aee4f452db49b54d4faac7ec9c4eff03bc3c783d901a896fb7533b51097b
+81783a016b20dacb75f52bf78dde107172803db8d3a24300aaff61863ac87c27
+f62e44bafd260a687a8cb47daddc2bdb6570669fd3b63b9609c57caad4fc29b2
+01082b752a679423dde1a8c86836c44dba5d1e3ab96676707df07bb47f730363
+cf78ceff36ff2ca976c969cb74abb3f72f693396518e9f1ec0fab6b53fa334ec
+741b043045e31ace728698c097d458dc733fa74a63d61f53fd4f45b9ac1880d0
+ade4bad2e774af7ee6549e2824168f0aadebcc069efea4a90d4f2d327a242042
+9557284971dc1f1ecef59b92550929dcc42a3168d7f5df5d18e53837ca6bd01e
+003a02c3700842fac98946f6d516ef503be66d4897cf2f138286ee3aa79f771b
+4af8541855c21d583f747c294bf1d1016d3e4313b5df8fd2c3172820bdf19792
+428072fae237ea94b4e28daf257d41cbcbbf9c56dc2d964ad26aab3df4f912db
+71546ec1fb9dbaef67a4a8771f859e0e78a9f6972724df27f79ded61b92ff3df
+4de0f497c50f569891279b968d0567d17c99cacf6c07da376b986299423adc90
+84d4f8e93dead2970857b2c562244f898a59995b5ba464087cb3e2318eff4975
+5079a9ec897cc4dd5bed02e820619bc1edcb56385e0fde4c2ba27fb51a3e80be
+9a2116bf27a5a42e2a70487177d1ab878bfd89347513c54eb92abbc87d50ce70
+3e2d237187cc8abeda00f686bca95cfb404053b6261d4795e558f3886c523282
+06adbea3cb36212dd839d26755ac16632a723754890ac8d9a6599d6f2663f2c9
+b920d92da7c773aecbe0cc7b950e619ba5eb1abc667cd354d417995d6eee1b0e
+e43f5bc9061b897e0779b023eaf9aed24ea5cec2082050c92e0f30e23ba713f6
+2fe14d9957dace391f05e8370b9551423dd76bb50dc218d7fddbbf235753e1fd
+f35e73d4b81e2f8bce061451a2c53e95015a7be71df27847b628bf8d3b682b4f
+0ea381f5635fdd2b8e49e534a9c4d50e2e3991a7d5d418c9922774246f8e9e62
+9096c4c4bbbdb0b7fa78877883fe2f47f4570b4188d540163bfbd5d10975a80e
+c4a21c1ecd43e211ecfbcdc391869a27b06a47bc1540a708a4e58c2fce67bdde
+94fbf0310a60fc2baab83cd16b1c0c3b05a6fe84367b3e46f93a409633ce202b
+fef120b0c791a48d376e3707689a186c73135f034ec6bc28870ff0f9ca5c2dab
+2412d8292fdca20113abfff496ca34eb7829f43d6e1b51eb79ec9d331d6aad28
+2046c1eac346953e6db62225770dda2d02150601fc66f53f94e9d58b4d3499ff
+22494b4ce45de3739f3ed286e421febeaf9e125168babd9b705b51ea733e31f1
+ce295f4d144d86a26bc8aabcd042a4953ac9d61b90e2d4feabab18648ba16ea3
+ae99f53b971f48ce1985c0a02703f1c609b7cc77d551fca1a6dbae9ad7d2dc7b
+a61a5e6f8b729bd7623d9c73d33fe9ae249a3b776634e10dd49222cbc4705af6
+4e262a75bf5e60b249acf6d40358f5ead7fc3096342ea25de703909be907e364
+0a1315a1589df358b7eadf394d4b355571809b1e860d96f4d1386b9d8276b85d
+6ff051e2883e2fb05c809d189e66bce5465fbe830282a23f1bdf0fe3bbf77780
+8b2c93fe7b69d6156f6ec93cae83bbe9c54638bba8d6df08da9bafcb3d080d3c
+775c0347a472a23da6a22ca855ace9385893fa7d851cace8768fda1b2716e6cb
+fe875530ed94c49e8c67922ee003911c08f2165d97d8a18f62d040e64b35b544
+d740bd40d8715005dd5469d106a4bd8040fa53cef750287560433965c6656508
+9cdc19875262c227b8ca384cd97047d279224e13bc8cb280f18e163d1aceaadf
+d4986a6db5a6bdad04d188a927b6b7a8c21bd67bdd4210eca16dfdef107c8228
+0d722d8a3bb5102c0dceba5e75a5d8834e8f253bc5b9938d5099873e1848b0d2
+76040a020d677b2b5b4f7e029df54650b0d1408bb81824f003232c5e8fa4cc52
+8da2f15b4cfa2fd8770e0ef75a7a82d92fe20af3d5132d00c136a8740d88b7bd
+5004d69fc459d373672b2b72f3ca1fbe58a3c2dbe5708b57bb3c2489f28a9e3a
+81d61c0a661b8b039b1b7677438906399a6b8fabedf9b25dc024a038574d7719
+cc4686a43725c624d07a0760aac63f477123f7f4af8caf41874046fb963eaf4d
+eb027b0651dfe68f224a5631eec6342258f71bae4053cb491c6c37bd9c4c0915
+2a643ca05150b84e2342205415be8556ce7b2f22ebceea680873da60f1a1efe6
+97e3e9e43c1756a243d3a9757f1219ae739579d393d46d747bf36bbea11dc549
+df94f5b12386c770d6927ca29b80eb728d68b7c20438ba3932429e5e7cb190e0
+3213cfe74fe392ba93dedd3b1779fc44c85d9ad678d92bc25827807b607aacc2
+414b2d0d59147ab8e0be0d32f76b95b27fddb2ff275c870a5c441612faa47330
+5ff3ea6caa6cfd284c2349ac9e5d185beb1eedbbe07b8c2a3ad4766142c02434
+042568172b0d3781bfe703b149eaa84fd09e8d488b99aa38eb577f7b21c740e4
+6088dbc4e17d9333a3e387531f97b4ca1ea179952eb33878bcaa465333e1de7c
+83616e413ee6e4c5bcc1fde1987a0cc78d279468b9b1511081f6e3bc802e8d6d
+78b19dc59990579eddcfaad310e0f360632da25ed5f6f16d560ae7d0175e7b2b
+01c3dbd8c98f55f494bfc52b49f3227ce12dc4f458de34b2ad36b3b00168ac80
+85e35caa9ffb7ff60098e5027e32be43790a0dbdeeb8223b692aedb3d6c6130b
+b6089c764fa7897b9a36207c9fbf50ac0c481a37096a57da8beadd05bd16deeb
+d93fd56fe54a6097c61c1d647f2f52553609c3f936831f4f981862526139cb29
+48a02146d1815d3d078bc3dbd7c32f2167a70edc28b30025ef761cd43bcecf7a
+a8ea6619cecdeb83147467c3970c772db2989301cc8337350be1f55c8566d14d
+8d963234133bc7ad37397be014950d325d2b67d70232a50fc6a4a064dab0a970
+e7d4e1949f7a0e50ea970934a621330fd477107843bcc7713dd08075127c19d1
+5497f2a13f917c3b7a8917a5e7be2009dba70ea513b405b8926631562a0a8ffb
+4bee56250fd7c147f5b515a8f1032564b6baf2569e913e7660098d72eaf586a0
+078af231d4595d67cc0c73faaf4463fe6ca8f94a8aa8f9132106da58d45bbfb8
+3e574f76201cd5ef05d47daa02001a89452b5a8bcef2cdb714b0bf5c36c76557
+7e2eb7aa71d085de5a4f5fefd4b22e25854c21a8e9e8460a2686da7f4dd2926d
+3533f3fd3ef0d7cf276fabccf0c1dd01eaf32d788aa6e01d810713bf2d236a83
+4c67f4c69fa9281451c98307d7e69afafe851f8502421c4276061bd6c3790029
+5f72f1ac5d78564cc221302cd97889400b3238c65a2cb820bf23006208c65d23
+9b428ba1a5f9696665bfdf9057d645615993d7f572c6646d710482b9ed62f0cd
+4dd6515b31ddc3a154beac3d89c81c8628daf456ac62abbe9de7a5b6062cf650
+4060c23ae920cc4967798b6eefbc752e3baf2492d8327d295f710814eb11b167
+629c496c555117f76309ea311c03ed7fc7f248f7d1492587d0cd5c5ae5e037a9
+57e68d48f4b8128c31dd014ad5230ea69ce33ba6c0c4e6aa1e1a7b3eb2245445
+979a59d7796a059f54c3a1332e06906cd565d21c0acef799d9d8aadfa6f5aa2a
+309b296c1bd84c1fe08bae310f5f22e60c9ec7096490bbee14ca80cafee768f5
+7ca0d7a51894b2d52ffe875b3762d20f0a1500adda6a401dfc1adace27677890
+ec2794c07529ee08ff575ebcce496c16e6b36f9a9beb924f95c4566ac092be59
+1694ca2a76062112ac62b1360cccda1c5020fcb4f400de7e87b26391d4177341
+c91c4633b878ff121715bdf6eaef905841cb096f66547d03aea8d8c66dc7b603
+9b354bf14f3bdb74184393f00dd5840e23b08653d045f18155098fcaefaaf8b6
+2c548f4a756994f8427598ac8f68d7304ee37107738c74c0b1c911396c7de26a
+3f33dc50809c971c394d2846208999bdb9bbe252ce67cd7df343a4f0e108623a
+837a18e3f19a9689b823ede76f782b46d3635d60e4fb66d7a672b973d3d14262
+dc6e05092fc79544b2d82b03a089e8314c4ad8a64498f1bc699f58983c1c5087
+98aa563860b833bcc7c490b0eb852d2ec7ee9d9a02c91ae1e94a4f5a94688492
+05bc1df3e49c6368463303c81ebd9ec0742a8374ddbc39da1ba8e51d1e074e05
+1b3311fab5daab09de62bc9580ba9dd337f8c72fe557ae91caf5bb3c1932b544
+04eb6a55d79892f70331e72acb7093b38e7327c336fb6b4a6e6cfaf17ea978f0
+04b58b0c8a04b0c8806741abd1684835fd5a1a7c0345d5a2387f22ddd0b93269
+8559f7a4b1170e98ca957fc9c903cffd18fe9b92b4b32c508e53efb68883e042
+7f8b646afc1d1c597942e79111d571be9cec5221383f5f6b03193e0c8eeedd50
+261b9f57e594b795c3c7f493296e9a8ba1f4506f868b8502649d7784503fd253
+c5e99f3041f2b4cd9db715728f1e692ae507e234e0e8a3a8f6c732413b90176d
+48e910abc918ccfd30a33c872f9efe34a8944f692f5f770c027da9bad3f65866
+2abeeb55a57dc13c71bfb71cef2886453b43d9961172723556639642ae281980
+50fb7ee850651738a68be6420eefae78d1a20817ed96dff413656bb4a968a70c
+b9fdd1e9bdb2c0e1dd5d32ea1b50cc487de1f55407eadbf2b3fb9c03b64c15c9
+5aeb67cbb5ecba0889ea4708141e82d2ace7a841896c77ab00dfdbccfafa1f64
+61abe7803872d15961c1c31a6b1ad50f120d555471579bf02399f815988958ff
+97d0132e6429769ecfe39b270a07ffd1469246229cbc1450251e71b1beb00886
+35399527233576ead74ef01d7bd7bad02d951e93b2e71dd1a82c523abba753e0
+95af0c249ad1f5d59f5c95da00d4eafeede3a093e4cb6e108469c6cc80fdb8b4
+5116c29b0a9a02a48f6f77115649b583ba4474900f69e9472ff178e41a33842e
+78b476a924c14814191a61620e398ee3b48ebaff1b3635edb48ad16d497b3362
+ca9fe38284e1261344b34dfa8d46e43324b3d3b21f31146ef95c2c7c08029e20
+776474fa622d5f145ee66aef74e4d42b40e981fd5ca36c6697c2655b2183c655
+9901a8f632beaee841515da5956eb82b341d4683c37050ce998df19480662d7e
+2d09b430b0d79441295b2d599bcb59a3ccbbf3333745e509903400c74b30dfc7
+7da9616b21b268b07f65a4a32d878feca9852a78d43e341e893238a2b2c0cf1e
+3dfd75592bb9f15c4e8653dd6e8aee0b772961a9e54696a266506ae7146947f0
+ea378bd1ed22b391795bbe5737994bf9756ca3019f42a032435f9429eedf2d41
+5ff27dfa5aac62a418667843ad3995684018c1b1de4ea68848e3762818e5b80e
+0d5bbd9dd866753537ed7ba8ec145d49df30fc8d293d69e3083209754a4b425b
+99e39da47bf27152049231f60dc3a849ad6a21b86771e945877cb2ecf7451261
+b5943f02252618cc734cd0ddcdb312ab729f35826c89fa9420fb1ad70647a74b
+70474ddd8ae200fca9317e1c50f9cb68de8379399bfa7424e66311c9d7574746
+e19d44413a0c6149f28a340062946288f9f78b1c2b6f5233885e6a19cacb78f2
+31534202b24aa659211adc6420b95b17b20226e74e9ebe01948582b8ea2d3ab1
+78d5b4ed4c778041fc17d11157d5262c90571ff706099c5b06130412490833b9
+c5267a7163ff7e1d45c89050d6497d097826f5b26be150ddf1ee486d232e687e
+453116f0b6b7c93064207213540cbbd88d549b74dbea59176bb6d7f7712dd598
+5256a9273aa32d1701a6b2faa0da6d21356be95968dfc03221b0ac65b2b22287
+90c3cb64ab2a65909824dbee9b5399b0c651bf5efd603621b94feae2fde41963
+c266e40755ca4266496ece2fe93c4397d907cf8d413a230701e7045cb9da1d17
+f1a00e00ea64b45dbca755a454a9fb232a8b4b80d6032650231b9fde78ad9664
+71232d9076520306940852e529fc46d83fee4d6fea15056cf42fafba1e8482db
+6870f41187c0906484e8996738b52a946aa34dae017d19faa08c86845a85a543
+20dad4f4002f6625b84a1b4b80467d102c678823b676df24c9ca802d568ccccd
+615858fe6517ae56d631eba96da6b71e0e0e7b71ad9a9483c61574e23c47bfc9
+a0394b4bd85fe41c3a8bb60ee8c6f788017ea90ede0a70cf82f14056b24a6c3f
+58849d613f08ec3ee21d990dc4fe661dcf4b3afc8ed34ec2ddd279cfc2cee1b7
+f1929ecb72d10752ea012342923450110ec1868292babcf755d0b393768de27f
+702fb68daf1154e8855a89bc32bc378580ad405a05cd12b35826a9d88a3cfb65
+987f364b89c30340a2b1e25ca29cec4988afd940c1321d12cbd50eb411a29a65
+657b2e7fe642bd8c90cce146b9d216b7f87aa135ffb9ccf0fc8da1146bb6f03c
+1cea3f7d532fb572bae2db81b7f15c14de973f6bacaadde5cd0333e71a9a539a
+8356038f876ece85f7e6b2d057ee8d48626483ba054f8a662991cd52fc317738
+2d029b04dc44da269de8be9b025f7929a34ccb6efeef271232894ba8c837698a
+fe6cefeb4c1ca0180215c2adb029986953af902ba21c7531850ca7ef798ce22b
+3496988dd07347e36f26cd55db9caaa73c5ac260256432c9e0f6e3bdcebd81a6
+59e822ba4188ef395f10c448c4c09270daa19a856c34f5cf0f91a74ea962b4a9
+5459408633966d6730b85c54e2de6ae317409287414079072d9422ff38db6c93
+d37994e7ef1a0e65c88019e729528b51ad23bffad9ec9954de8678f03a307c43
+0c498a7c16b3b348947e25a896bdab2168bf3119b296a327c2378904045e322b
+9cb321d23d74f470fafc828404612288252f1701df6c743de571e2e876cc2672
+23f2aff00d26f1155d6d41a3b08322cf8eab002fe47f5265bfb67a405d4ed77e
+89cbb4a61b54e796b8f3cdf388d5418b96615c1312ab7d4e7deb1aba8984e3a6
+76dccad1bb953569931f8c26f7af460c5689412648cdb7803f1c93dd452a8ec1
+6c8e3e6190d558919b855b7b5db34bc42b992ea155615cab202009a96fe13363
+4f649e77e4268cf651a74b8c8c645aae6dff800ad17b194c0b883867151c6230
+dddfaf596c2639a46e6746fc3ccd1593d432063ba27bf2476bb3ee610fd7d92c
+c09b70c657a8255cbe2d8ac281892280d5f19fc27b5f0e912eed9c38007e748b
+079ce05131c3956dd078c0846963268fb4dfb5eda5ee8894a89920088f721d1e
+b725870aa43e92c565d10d5d796cc04a114b5c32e90c9c7f5a9b5d03d894f96b
+9ef0b123b9f90d1692be30515757e54c2f9e073c16c04587363c1e9bd4f834df
+4134a10fffc0b5960a83c4f75979a14bbbbd52d4d4b5eb75901fd20a36613826
+0d39c035f3144381fb6d4eaa99953736614d1a46fc05f800ee66ca63b1c6ef10
+673e4faec2288afbf5cae62b7f6ab8c80e96c8cbc7b666ebe78e68d184d85c4c
+d8b92adb253aef17ada1dcb3eb1895047b93163050a6f3c1a69a7935a12244ba
+cc164a780f44dba4c432f913f5b649529721b123f4d6816ac8f1029bba12f442
+935e1b03a434297d33e03357e0a4a56a10f0fc2c16dcd060cf858b58f3cdb5b3
+4f571ca4ef8a7a22bf7b54c35b38aeaa6548be8a70027994834ba2d55b4893a3
+c70d9d44cdf6cb9d1d6b92af027a0fa802f207d34c10f8c4aa3a2cb64f8817b5
+78408cd8f98466905ec58a8df6cf060d6ba17235dc6591e2ebf061f5a7f1bf9a
+7690df303dffc583b98e8765977c887e776814899b45feb0f0cac642912d4b81
+e51c5ae48c0cdf9024cb96f421d1b7ae45b5ce9d41d9d35c2b00416c8b9c032f
+b27680c1f8c1e55d9973a698180a786b92fe97c1b0a9017e37b51cab3f388b2f
+42329ec38e452fceaef2152d36471573caa830a5c80eb0ea73c1c7161f7b21b4
+cb7d3e55f29e36dfaa09c8b3592fd8afbb64adde44d8665143ebf1f3afa1a5eb
+a16860b8e8f52eda1a6793be62ee8a682a1dd30b6482a3188b5e6b8dcad4c688
+98e39892691434d85c42922a035c752827474e01cfa507d0c434f746993ed746
+3d32f530ea324bbe0ff4a38581296788fa2dde0db5dec9666d8af2deb947f200
+b617a83e84114e684442fe3360e0a66880f3a87f1030dead88eba805cdceb8fa
+4b110dcd71f720d93de7c0e8122a09081b9cd1152dbba5f0411728ed87028a21
+9cc36c72bccd73e3cd517b9a7210cf1f3c719e7e23511b0f0c272de69951e0cc
+c264387948b95b3fd7d7d849947117e1f14bec10d2d718374eb09734709ca60e
+c7037c7c3c5d1b9797b9e4c539733fb69fe61cc569f76b269780fe9abd497f54
+4d728bea738a4ec3e17aae0ffc36c2bce74cd24bb8a2758b9c8554d92a64413b
+ad5f35aafdb387b28f1ca329a32d8d99db75121207109e6fba304fc86e027bab
+b631f93526be28022f06af5126cf0a69c7de8aec8043aff5a47f6397097b8dd8
+8538bb33987fbdd064558e7634612b8b2c22390f35b8096fb0674fd62084d7fd
+15d98b22fab5dd19f9d222a2c4d2573badb76db8383c74b4996cb068ad4856b3
+a01a8f42bda0501aa7c317c275e050a133df090b6274f9beb1af87f8b48f7b03
+64bb4e937369972839448dc459dbb463e8df91e0fc7fb909f5a423ea9aeb2f23
+0d24b27dbe955c4b6c3a9d22603b42c6c5ebcfd67c74f915a47ed1b762e10738
+b7f181feb8e6a3b2b764336966c6acff5a2e2fe237a4dcd64b7dc7b7dd33669d
+8dea06bc3c1ad351e2305335036b8f109fece9e30cde9ae2f472907780dc1667
+e34cc399da1ae24fb728529cf610c6592df901ec9a7a1d0c52ef3840a99861da
+b28412b3751b07206391aa61c33ca87d4164876b92bd6d27de24d6abe4af0119
+aed63c73e43a696bebc21252a6c39d5ecdf45042d230a583e177b1e41167ff25
+1e633941dd1808f8a4436e663197fd2442e085c596d3fc12b654f94f05453599
+e7957e70a965c87132bdebab6eb857a450c23d36538da886be9785a15ed6a2d1
+64dcce81504e271f58101d36257f8cb1d146c5dca3d00963d245634ab074b95d
+d490b8a999b83ad4e4fba3573858fda34ef4735ece350868c4ab772298e22b6e
+d78e9faa6af70f400df8c6777d27a205fc1b40b26e9ebd72e37a18948d447dd6
+021aefcbc2ab7939928daa51eb03d66172d0d4df7e01b032de40c3ff156e46be
+28fad368241ae811d6914a3cc4ecb640531adc026496999ffa429093a40615db
+81b63de704aeb0ae6363559a0b70d55940bfa22415edb9239b27bc5ef0e4fdf6
+3a91764ca5dbc491df84e07875da4814bcae9b715d3e4dccc55cd83fcfd63696
+c30648600c986bdf4b1f00c1334b1403670a56d0cc8bae15187e1f4dc8082eb6
+7d85d9413fa5bd3215c6af814cdb8c1b7dc579c6f8f2bb11836a5760021c0fe5
+e715080339b24aa017ce4aae8bafa417f889c5d27a285004429383bf4cb8f65a
+6bb72bcb975d903020bc27752c7e40a2d00ea67609a04b125da0ae443cba553e
+d3d7bed8408f3cf9d22176f96382fe832a85fcdc995663c777ba80b9750000a7
+921d3fb174ffc454547a90a74289c2a5b49029b3e7798f5587e9c646ac23f2b9
+254b151cfbab3472eff67ded7ce08db90c0a9a858b3d58e7b185212a0c45c1d2
+ba5d5527e23860ff4a9c985f74efa6c70a749206addbd93278965d3b6ade68ca
+8e2e9ad4974a836fb78836fb95e4fb7dd7d6c2b5423334aed2644b09259367ab
+8a06c57a99803b547e3becb7ccdbba446a7061d624a8ed0ab1f86740351ffa61
+2f55ad009fe1486418119f3b9932014cc92ed1f13ec433c62c3a004f9fa207a8
+da0dc1d5adc59d2268866b143868feabd83a7a27aa68c1d2d31b5a3c5b2dc1b5
+6f65f46b5a3e33c9d2202d901c9eb2b100667903493999f0a23bff58c6dafedb
+7f2914f65e1654579b4a7df69ee950a223b679161f4455cde3d275edb6e8977b
+5067a80d040e349655f4a3a60adffa2a9e56a4c0a3b1d4475c29dbcb177b18bc
+2c755214570988ebdcce1d8f54c59fca0b0e19116e6a2bf951ee7d00b3feca8c
+bbfe7c9914ff0eca51ac6273ce6e8f5915eae72bb2e3b8c67635da114e783e91
+57f1ea86d828fc1aa506e0fd7843bb036aea75714c5638793076f0b87de3f6d8
+8527a8b3adfb5171c076ad8fc47b68f186af94a0de3b7badfa167cf09c7909dc
+d9649484238f6be5c2cea6b58f37e55e6aa1e331d2bfd64e5103841ebd324f3a
+f9b9d7ff7dd9934a1eca605ba4a38c926c654d0c9ed2ef59506fd93f25ee09f9
+ef6383481ff4f29d33098d0b1c3675a256d924c8a344590fde46880cf9c12128
+dbe09c32735b56de14dbab2957fae3ba143a07de4b48c25b399b0e77d537da00
+f0fe4d154f1e9a09b9c4bb74f62ae698fbfe43bd06f038089e8b1876eb07e249
+533f9aca9fe1eba0d89e0bc4a0f98488462a11f95f6d77ee6ff20508293d8e71
+cc81d9bc80450c2c6e6a0fd46b8a24aa263acd703217ff2e19e7c61d7d1200aa
+b8c6234e397ae8f474f7afd9dabb65cb6de25212987a8530dd5ee78aeea4226b
+56fbc58fc736c7fe3eaa7a842907cb4f4589814479ad2a09bd1e3bb0bf575d15
+f0aa886a56e30b5991f7064d4b298c4eeb2c6a33a7307014315e3dae2ff72581
+283e0a607a7d8c62766a23f42c8722590a784b34f5e97b9707bd45fbe3b08630
+1df111d0aba815c03369f7caf6aa950498bcd6bd02736bf70970525b70c023eb
+11ef2901a01abc672153ddeb66264d59a7eca681c602e1b4a362bd4fe09ec788
+2e739d4c3aa9ac9446b2cb7da376c4617cdf9fe436aab026d2e23c755be7ba9c
+fb61013c90dd986c2f90ab7444661c16ac4db3a8402b03450173aba644a61e98
+99d1cafa06a27e428ecd6307ae89b1747de0609ba95f4d882986a904f1c1f3bb
+da550327d637a29fb1b4b23f5e08772889d27bf3cb461144d0f01db6699b2cc4
+8c2a7cb91090432d70fa673b7ade79f862e9b79a94f06405c44c2b0de8f233b4
+8080e440921cfabc9133916a0419613528f04b00275b140d691f4057c5420d49
+a1e53fde0e926a60613d1168d886ba0e2d5de629e212cb9b8b4e2253a7c7b531
+8287a0fa5438528bd414e679d20b92d0ae2ed58d2c6874354ece38b933a1da35
+508e5c4e63e62437a77a443a2a9ad7044d63f36c23b5f3a2ab443c717219e02f
+dcb6a4286f765477eaae1a18bb63c3375fcd109a953a644e168f2ac0e1d85f91
+3d62b34dc51e3a134aa30bfccfd6178cbe7dfde088a435ecd7b310f5f10a5b8d
+9387ad196d7e1b37047670c8ef0397cd1f380415de77419a20ea5349ce908027
+a8f8d1498f5bffa712690e4ccca077a452c902fc4a9b7c7882ad7b9db0d626c6
+7def29713c25d7ca466958350d56aeb8dcd0987ac05fce2205081d301cd3e601
+f386f99eef9857fabc6bf49a32ec3d4a921ed57063e5366cfe51adbcc48b3fc1
+ea1e40205c7fccec4fbe6dc0bcc7af55984f6e49a8a466e144b7e1bbf63506c5
+f60caa2320f9ec1732e9767ff4c9effc5b2f9ba6a9dad549dd30771c53f9a4dd
+24adfd39cc5be74851d51b4fb038b22fb65eca6cecf6c7e902e9391c89b1587c
+509bf28a987cb1c8ad74ebe7557792a9ddad7dbdb1a367c633a8eacb91e3131f
+02000b5d06213700a011011cc1cfc3abe1bac54878cf32145d9b18eea7b59b9e
+19f551170b92472f8922c0838f5d7ab5421d59a325c05372fe2c4c37184361a3
+71572d378c3d0de308e2c1cf3dd7f2c3dfe703de9df84e569dbe2e8cf00c54f5
+15db602bb2d44d1f99cf2aaaf78953b4e838fc1532e2ef4de4f0268b2e6e2c2b
+cdd46138aac78f9f34d6911ae387008d594291c7a57d693386170e7e6d377cf8
+11966b59bfa3cf47fae49324348a91f80399e29991d659b32e0fb0af79763ad0
+93630b21d061cd935351fad564039a2fac55b025a04e9668771118e86f9216bc
+55c4cc8ac588333bbc1b8fbf6b76a08bc14e1f83a683aefed0e20c7bacd2ee51
+96d723daf15279d8e2ebb993847b43d63e4960ad2f4150b07fd081517de48a9f
+6f4ab09802181a2e4e44cb0204200fc112fd99ee2e09cbaa3c6d3cbf97f95bdc
+a4f6d06ad415ebe00d6a78c3ac0ce6cd4dbc06d2829749b7e410e6fbd6f8390a
+b958ce73414a8766576c3b642916778c22cfcaa498afd93aaa19cd506e231a81
+f9994006f5e948a2b20912d70132e6a0382666f35fcf21b6edd947d1e497f66e
+da9cb07d716cabfdb6535e5ebffff6196b495327fa4e5c60778f76b40d46d4f2
+769ea09961f24b8110be2c59f426f16928866233066135ff9e1f15379ed5b11e
+de442dae3895e438ac05889c683687242a4758f1a234ef144510bbcc89e20954
+93272fa2dd7373c6b7cf9170287f4dbe3022b20bfc08e27c3232514c813e93b1
+cb37193b2eb17a832c1833ece9666aa24c12424d6c157d4f279e1950d45b4940
+2c54e2bee3f3eb017af95881e32f009764f5e67b93eeb2172023b510a874a159
+4975ed54f35268d3df9c2cfb65c6316b8178d1945abae3c5566b9da3c8681b4d
+acee486d5084d66e88620af120a44b5e35ab55591ea5283b4a69a31a9f5b212f
+96456ccee559dd42c58b6da34dc181a0ec0a5be41a9b3e0958f399d083fba072
+686a38da9b05355fd47c3f59708c7b7d4c31de833a87a4d8da6abb4b9d2ef519
+7575de9dc5b012e2e3aa51c407afe407001a0714d7ef1184b33afe085754edeb
+3ae4472f53011049af4ce4e0ef299720cf8c10911dc0bcb0f9f81a8caec00855
+91b750dcae4e3b0e0f507c25c1ca59cc38e366f27ea5f13427f2bf6809fcff29
+5d513e03c98272a0a822592dc9682a49d9324dc1c07f5b8b933ea9232ada0108
+27eba8837797d8782f46dadf53cb7404cb6612e71820478bf37f88615ada4989
+00f10078a2385cb83c8e41aa5464148bd90f7f2a18fd0b3f41a78b10471bc33e
+0b2815ed757515a331a6dbf861844ffcbf6b37ef7f348d7d918fefa2248d82d5
+56580cbbc3ff9c079d04b9ab4fccf1682c0b66358cff6840a9808d91374319b3
+09fb2f795569eab9c00e850a50afeb42248a251473156bf4d220f220e8acd814
+2554128f83693005694e19707d0630ddf56bb55f47f21f87c37286015677685d
+d6763e4a3e28de9d9f7292f659ac307ef3e83d84529389f7eb0639c02239861b
+86df711f11038176d9a70b04aad94f14285bd7ba4b264696c383bdb6cde76ea2
+c3870ada2dbd7fa7c70e3fbf92ee9baebf07e97da553aec0c90ea3feb38ff428
+7625706fd41f54aa6d85124920c33c48228cdfb0e426eefbc3732e12813bd368
+01698802e58db4eed2aa7fda4c1e439ce2012457c55115d69eedb9f587e46b5d
+35abf7e7372203b01ffecff24226de4e428217c5313a2e8bb58efd0f465cc612
+c143ccae5d8b6dfe04583b1168259f15c363bd4a7db272642b0816c7e0e5ba0c
+b2bb4690aed8e0455b878e139c15ffa403828e30c079b3c3a26278050ba66ba6
+fce91bad29dc2d980c06678131d961e47363f11856b72f5ca039fc991ba248fc
+f838d935789da19681db4d9119cf55bd29847d2536ef4f69327163c3e262cf63
+695d42a83ab0553b4c72c5eebb9e71c358c5fdbc209ada006f885f262e3d077f
+b9966e8f53ce61e144d5a2d096a2ba15af75790609218bcbf7097a0342e1dacd
+4eecf33fe3c4c7dff8b4c1f501007957f8aaba2e7176a707064c266cb723ba18
+6139e0bd697b37528fbd3a4bc8be5f7c6a50aa6fc65a0a52fd310140e750176c
+698a919512867a1ae998b32043c0e11106f81154aad48fa3f6acc98bb2b38493
+863b2ab05aa77dc16e5b01b328d10dd7af79ec3a5fd38eb7712e9624cfa2a620
+74988bbd4014a7816a4826319490594c0abba1643e85e961870e7125de720ed9
+db31febdcb739b3f8f0a5a2803819f9f7f3fb3ac983e3b6743c7cb3feeebe578
+0b0456f15047a76ade4d764e56093b19ae91d52cd93ca61bab22095711e2dd56
+cdb2db4cb0a1120dba8939720c84f2faadbda3b0cab8ffd83bd77580e0dd59da
+67cebf38ac126e54f6b70b55e7940c6b44d459757958c13f1c6f248eefb5af86
+48d752e91788945fda3da668a887f657de389b123260e3ef4f1b93393c1f484f
+7268e84e78585c0a3695ce84bf217637f8326c98407c1060a00ef8950e498d0b
+79ce31264ab755493d4ec00babe341e431d34c8b7228d0c5297bb776992586c5
+ae9ceaed8020f3ed8c0ff4bb963b9c488f8ca6c667c851861e8410973373fbf7
+56b0355b1a0dea5adf037ccf59bd1d4957c116187c99c558d5827d609dd27cd3
+b2fcede2d281ad3c33c5f9d55cce22bb1b8e9b14d9b6dc140620733a10389574
+eed9fa2caffd5591b8091c8533cc29d600b4a75b738f8dd2951983f06da5cb54
+26c1b1039bdb3550ec6cba9be971034a125f58e74152bf38e59b6365e7c6be2a
+8d5decd0397e0edeb638238e8320f0425c5ba6f18ed9bb32693dfe1b079ffaa0
+3bef302dad880b1b4625865d2e8794793e1e63fdd5b0acc91d1f83d12238427b
+47dc31e3b218ddef4813ba2e15d872b0e6b640905e261405d148de380b062b9b
+a73f115b4f5ef94d4023bbad60fe61939b5c6cfcfacbd85110cc027a194d92b6
+f64b2b2bd0c5648e744da3048486e5d9b77b45f0360aed982351fadce42a42fe
+f2151ec97e2e546940a7d9154cef3b2b8dc94aa1076369d9b1fc54e22d65b6c3
+bdbbc16f315b52e31933acb14929e23f0a1806d7bef12578a6
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/UTB_____.pfa b/lib/fonts/UTB_____.pfa
new file mode 100644
index 0000000..36ef339
--- /dev/null
+++ b/lib/fonts/UTB_____.pfa
@@ -0,0 +1,1134 @@
+%!PS-AdobeFont-1.0: Utopia-Bold 001.001
+%%CreationDate: Wed Oct 2 18:24:56 1991
+%%VMusage: 33079 39971
+%% Utopia is a registered trademark of Adobe Systems Incorporated.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.001) readonly def
+/Notice (Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated.) readonly def
+/FullName (Utopia Bold) readonly def
+/FamilyName (Utopia) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Utopia-Bold def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 36543 def
+/FontBBox{-155 -250 1249 916}readonly def
+currentdict end
+currentfile eexec
+f9cd86fd4821715265f16a614e3770ef80561e77ba6ecbb4ef4232445eef2839
+94e93e3c8c9b09c09d71542241821e07888ceb54e8cacc8a45802f50c0afeeca
+5e3d9114c1860bcb2ba5fd2a879a0d79953e30c90d8347513f4ca5f05b2e231b
+4973bd1e9db66a39d846a8b3d9e48da72e2de8743ba2e104893167c235719245
+87b43ed3b6552cd85e4bbdeb9f46bd813298d531c74be81995a52ceaad4112c7
+f65773b088bffbc9874f615371c5e7b50ae99d5b6acf9c80d87057bf3a424377
+f4284b7232096b6ea623dacd1c925ce09cfa6515f675aacf815c38e984b4ba40
+0d409bb62cd4ebac75201c8e782e68fd73e8622c46b696b1ba37ca9621400041
+d95b948a6bbc089fe6b230b39bd358228af9b3e68418166a9adc4e7665341088
+c47c074aa4b21b0949fef9929e1a32ffddd2d02145cdb256863cf6067d27ed9a
+f0aba85b1e0cfcbab7e74880e9693b5626ad31e6b5c2d208087d86c116513212
+710c9d6ca50e1503f8d4c2863fa378f8184189af0cf109f4affe7cb74563d513
+2104fb9dc6f3f5992e075633a0baebda8ebe9a07c3ec4b25fef015d9915a26b1
+d401a6722015090672714181580350560caf79bccd6040c0c1651d917c73107c
+2d46aad5d4a370b55e896ce1eed127b6f0aabaf7c4ca62e89003032abb2c95ba
+58c4a0eb0bb1a59a439a6a0c2082e50725b9e8139324af06ff03b4269a697342
+8fab0c1fabd320f1452d9c435e48037eb8cf6df4233cd9c05691604146cc813f
+7ea131f21e9863b7bd1b087a583af14675b9bd31fd364d5dbddbc9b533a6ac38
+c4bdeb28a1ae3d2b374da72405acf67b1b3a83d80726301b3677c067c748d857
+ae1da4f723d4365647de10f90e96dd7e9ab9ef5c7e6866a13b807fd3f78136d5
+72950a10bb0165e61f12c60a813c7e35eeb9a0500725dd912ca2deebb238538e
+790af851b14643f40e5eea13660e57b5c407735079a292a7c162dd11d0a3d342
+67290f1c9261fa5de6b92ca1e7daeb7cb970c766b3e0396ec0ce55dffbef0bdc
+b437fbb4d63634b9abcf5844e76f9313ab2182e1fb3c47a705a1d97b79e93dbc
+5e48ac19b45f9be4b9225e5a7e1d3679dd21001eca3c08d6febd35fa5453290e
+1269c1d195e45338c10aa60fb8ab9e5a5aaf08c82e737f082bb6216d7cc1d5d8
+8906c8b05c4432d04561377438447eb5fade652af84c1ced99551365cf9e6f99
+03d1593de0e450003fb0d5b5588330d6527fdd0c8193fc0cd2293012310a425e
+0ea0f8b901b991648ebbc894cfb7d95da6d35fb7c947e887bd3b6599e673b921
+c96f2a033e30b341a14066076ff0abd5fe77f393b548a15ea2185f99a3545b01
+dada854fce1ddd3448a9aa42ba260a4f85a0d1bdcf08b3de2ff8b6411adff446
+4a2929193ade35f4e26006cfdc45929250bb76ef007043d739d798a4973f350f
+52fa1690423381539e3a4cc458600fed91fa8e16b5ae0aca710dbf318d16e3d9
+16a082a093b59f35ff92a1b235d5621e87ab471310ca26a07a9ecdd3cbdc9bdc
+7506ff13b886b26eda6d4ccc52a312593a0f2845a4a30aef829109e6b76bfcbd
+2f2fe267d9376acc0686c9b1df3a25fc41d9e5390a90249cc26c502e4bcf582e
+ca5054d96b6ebb2bec79ae23125b4c2a13a97570153b83dfcc4d9dec9717679a
+ba8c37c02697d8f47269b9ddb983bd4dc029968d0d1729bcb9f94c899906af40
+0df490eaad13acd5a893663fc90a850533263cf6657632e8e4df31e6e6636521
+78dac783feb9616172d7651e3e4092b409383ccfcf8aa04b330119c334d6c8ab
+bdf97d97fb475c25331044413a117dee0f15d6560cac5ca6c01c1c98b56d2971
+724c135de3c624fb7a1994a8267ead0628af72d5af1dc0ae3177c3b678dc15cf
+9dcf100dd9de9bb71f568661293515002220681b0afd9775464be2f66df08c5c
+7d3995a57ffd2af299564dd57614e3273d8555f705ce2a2cb095cd662acb8163
+dc5c587747e27fbfab667dd449228e7b2f40cea584c997d2b98e78a063edd327
+9e23947ba2577035ff349019293b13953ceea11b49b230e2a29d295b032ebbe1
+dacf823e3587184182d0b910794a1d784f0bdc21c74a65d12b5875cdf0c1cddd
+5995a6e56c9a95dfff55167f82b3de41a2eb653b0d1eb61e9c48654424ce13ec
+8671211b2b8a78839a4569b3cefae520e91c538f09d96f98ebbe905b01ddb080
+f7f6ff00d2f662e02bbe7dc3044b66723956559669000810f706f4ad544b9a29
+b384f554816696eb7b59540b407d438efb6c8bfdcf05324cdb65e9ffb8864a9a
+05adaa3678a341983aac1f6bed28040df2f0e18d27300cab0930958704d900fc
+5e194b149740b089814d1050e11a9d885bb1d835a7cc092ada9f08858e1ac5b1
+84b6fdfdea41d4b1241ae64fa3c47f125f48cc05c5dd8e2c896bb88b0a846379
+4477252f0d7abd31d4bd5703b9f280b09a59bfaec0663dcb2ccce2821e0e382f
+837f4a4fdf0e57d531383155f4fd633bc4b7315e54425a0395bd91f050783685
+eb0b85e15e331166795acc5dcb2ea1239209f8296c2c4cd1eb15b37e3ddfd2ba
+33a25c3761da66c0c08635101534607ca02990447c210689d31e49376d152161
+7696160aa2da75f993535e6cfbce229c657578620d7c8de8cf720f21ccc22ed1
+2be5c92bf7e26cb750f707fa7e2348a04a642ff319cda45fb9884caacb562df1
+365992416084a4d40da9831865b02246bda402f4354e8882e98215c37d3eb3c4
+d2f9ba2b93f190005da1bbb506a5d39e2a24be0ddc50e1bc5235d221a151698b
+803f0f0414bc085a395fbada62a73a9a3d4c66415ff1704226f8437e9bc470cc
+63011be0e1f3dbe6e6ad3ff35541961f6dfaae1425b2020349486880fe7fae78
+5a2db27a586f0daddab8ca62887db0a18462a9a3d821f31923c583bb731d7299
+f051b8db5f33fcf53c37c1e4ac7fa0275dd39ab9abc97cedd1c65a3d514d96df
+8b7a49217fe1af15b5c738e927028d1ec523e8e8575f018e7bb3f7e9afc81ff9
+3de7a4969ba59f7093772e5696bc4f2d6616419b43ff26f2a9da0e183f7bd542
+b31f175724d2e8f18a61ccd010d8c18394f640f905b6832fcfe7d3e9c02e3e03
+911dff14d0a1c73129ba85e2179372aff3c028388f30621d1f8aac757660079c
+63c22cfec96ad9ee4846c0854ec912abbf3f934e293e0f1211786455019a7f7f
+38f9e877f4186a9440c75a4babf3a9fbad1c5fc484082e1be4084ca3018b676f
+0e037cfaa4195a18948d8bb46a6d00b68213c09d5e69673ed4e00155fba9d840
+9e08ca2dffafc93110751b59ebc2b6ed4bf5f535ac9d73c9399d9081eb6b2ba0
+a13aabde56a7f9200749c9e866cac735bc6e2f7859cbda912f0c26e85d3f7b25
+3185ec64546cfeb89d3992b12815e70a548299615c6889379218c0e7dd1cffaa
+ff4ccaf3c35c77b09513b5f9b0d501322a862af4f6df0af50b62e4e1c1b3067a
+f5b24a44190c41e96b659f62921dd6075609f7d7db532298a425c675e4537952
+bf06fa9b1295e32068740c361048301f6ba6386602b8cb54bf8f38fd77669f5d
+791a7b1854b7f3effa193e9e5a435694b1c8578ec78426134c9c56e6c9f08951
+2469a5137bb452be5ec3b3d27c3cbf6e6fee0d58d73dd3d277bb0c1540ad102c
+50b746093832be65d05c102ddc982b08c7ec1fba629dbe27d4604c1476d91392
+801f91ff781aeabec88132162e021741f8f31f06db82b29d17fe66ee04e9c200
+5240d68ba82373c7a567ba33bad4aed1d6b5c570d03c5c394c09e5c5eb9e924d
+9e1c2f161a9d52cbafdad75dd674327ec81ce286cf1abfb5ddd8606de9265784
+5c950413caeca8ef80303793826c3ac4b58d9fd4b02fab612fdbf71c2a1698f9
+048769235eb9dd35823536662ccccc128c74818c8ae48edbe9a4624ece9d1ff5
+39795c7b4808520a08d611af58eec60bfc8d272a944201096c45749bc97f32ce
+a52618a1d6d53267ab4fde671ef1a47b03687a59e47a8e277c02a618af09b78c
+f5be89f5da433ea9d31cb8319bbd220099a8d7d2f879abd99b4a96b06ae3f8ab
+4cb89e72fea1355a010405cd72dedc7bd35b3ae32fac3d40642fe88e7a938579
+f4c10f751174cf042331e7274eeeaa28e5829f0e6e866783412a45e8ce8ce127
+5438c3fedf8cfbc9078e2b6dc439d9a513fb2a74a672b496e19af3c092342811
+983b1a3d6c60981db5aaf03b1fcd375f4ad64a10b57d378f52f29cb89dc77814
+1dd5106934bae98eee32b779eddc6cb5fd13d38ee5b39d4513338af4feafcece
+dda1f3d9b6f0b5cae4e7efa14921578cf07ad6e1eb7e0a3bf7d52bb7e2fc9656
+32c5c642a6ab07c108d79699d56727db2da956cb576b97648ade80eab2ae12bb
+2dedab0672ae666115758614c91108c9e4a4da0bd49f15379cf6716a303accbf
+477ae6756d18a0f6e3801f72eaff179849888104e38e69fb722a385a630e06ad
+e71c5553a14c5955f6189e08f8cce45ba8fbb5c5b6b0bac8ca48d11c0656f21a
+9b9286c4f958db61b111ffd40b3c8d69720b6e2eeac5452ba0837fd6806464f1
+0cf5bd73423b9f065b6ff58954a9090a53e31a16fa9703700fba14f8b6666ee7
+4b6a7bec61fdce1fc10245e2e90e31463bb7d326857e389d87834ddffa9ca581
+5a5abc54a958bd3738753e38b255cb1012cadb7278f8e84d9c649a4a659a8385
+19e128ddbd0985505fc613d9c577fc10c429648ad18771b0da1087ef584c2628
+b91d33da27c403c0214e0b7f984a9bfe6c2c574883f446e4dc1a563c32898bff
+ca2433f1161168565e063ecf045408d619f2a3215ee881cbd13a7751b14189bd
+a0cfafee7ce4d9600fdf993ceddd965c4a608129c89b52b5b59419ed079a6f57
+9efc222187cf25f848d47bf3bdca06ec2573fa8fe20624cfeec3f9ead6ded709
+75cae667bf025ad867944faef14fa9d6617b74cee3804d5edb688d9ed4a0c2bf
+1aede05eaca61e297f03026864c738014d8afd79294e062e04e5fce1a784d850
+b00e58fdf6fb5182d6ff08bcd05d2c7860dde223a37ce53131c09cba9c52e9e5
+76cf7e58bb99f045c8b23d67c43449c6c3f6acdb5b5f35be96d17fb0f8d42685
+cc79fbd421fdbed2fbfbdbac976736a6fb34c62eded4a12ad456d94aea2a2bf5
+f1fe4e1519361177998c8272866d26cc0e1af48fcc5a399edb8550046f3e8b31
+baf20c0ba1210fa2487cc2982e3d39e6a630d11813801bfdf4cc3695384410e6
+067d10d37aed54394448427032c9cce4d00f89418f10a45fda8aa392db636c06
+a26c0b39b25f128f7e5ad81a548f643eb1802117172d9be1fccaa3f1a73b7c1f
+1cb21f7f8f71fd8d063ebf41cf2f3eba32392f0303affcb36e113a7e46e5406d
+20e6c47a9be1e8f8085a8c49b04d219e13082d344c91dda69384c0b16d3fd7e5
+e46f213b789603c5d89257d6510ab618f24df56b1ded2029779af220b40eb86b
+cb9ecc32f2b1b713132ba229c3bfa888b014e12ccc1cc902b28bd5a9d5263ac2
+a47b38f37f0c9b279418b1bb81b288d0312667dfeb0aff86b8072c2bbdc79835
+f6a04d34c0825caef54293348bd6c672ba2ace4d7d3fa604faacba1a42dfe02c
+0150abaf33d0a6582071af6b15929a4857cd57048c9e32b04237ba047a2e2837
+a23da6917bf5912e2b1abaab68fa65891788a6c3b30ced2fb907e603a7654c27
+976d2fffbad1538395c05cf876bb3b64198e0a1b94f40d748c03373736018466
+6a9a9e53e0a159ac7a5890bcc18cab7172dedf4b8fdea3544184b0032edee0f4
+6429cd0451949277013d89dc6bbb23566cb158489d168a341271aa99618de261
+9580e6ebc094ebc5d7122fac0cc95021df41feffbf34ed59dee7556ecad36d75
+12b96ace5f81203e47d9e3b9698163a175767762fe2278648d0823b7a41e8730
+16fea5eaf17effef6b2c537b2727de3ab71987b49f9bed16fd8aaa06e5580643
+c2514bda11e7fb68f310bdded37ff6e6fd67b04c83fb8ef288da520954f0c2e4
+ee463de5ce7bcbdfa5403a4de7c64a7d9807dc7fc21678fcbee60d8b2bfa59bb
+c8303d7f060c0a2182f6779a386fd82b9b44550a03d98cfc0095524a7308cf6a
+e0c2c366b8bba56ccc354f3319a888e1483595b28f38868231631d25f50743f5
+07d08da61232da0353fe9fef9bee08c93e66b4cde93369efa538d03dcae19d88
+1fffcbd05c767b97fdf225685d18d7076b2b9b788404b79715b18655bf816f57
+2d96ea5f0d6ec848b399d0629c5775e5edde2a79a3dc6bb189506fcf65ff104b
+389ccf9387a3d6d243e4c83a5d78e9ee659b8e47b54559c80e15e1d9b3fdf838
+565e0ec14404dbfb5da05ebd0c3cc925f2a0be3ba741b9dfdc0531c2d35985ff
+89268541bbc6e4ecc13a50d937cead6b3a9863f85a8c1870838f4abd35494e28
+92248f65c7d3c452f6f743a345087661c3f5e8f09cc6854e7f2d6b5c9461c0f8
+3170337fb694d91478be1ccefe270f28e1c8ce48ffd25ed2dc83c070289405ce
+533af0bd4aa922d8d3b9220edc5b2fe6fadeeb81dfd270ee469b434f44622223
+307e041823e65f762048d028c2b66c306422102c19e3eb113b6f613759b68d15
+9ed5665ab83a1fd1e8d45f0de9c187db9f0f7d145c3bc457b5ac065a0bf447d4
+2f92b61a915f4dc8c03757eaf6cc115c87cf2aba456e01834a0e283347d487b5
+0e9bf1ef39ff7ce6505d1be0e20f425943cbbb4c188a359348d67c0247da0c3e
+3116f9a961e616894a704f192f550ed25503bf14c828ab8bf3211ce02689ba55
+49b2237fb5861f7fd2003d4c82a15ac10f5e1325928aeff9169fcf585334f62c
+571057f3e5d5bf3ebbbac63110353fcb05a533af4199d0abf922653efecb2177
+5fe358df229a5daac3ebede23bb469173a33ada03cb2afbe309195dbcfe08cf5
+472f9979956828289448a9781ff3b8a4a3f375a57ccc6d1ed120ac150b1b4ad0
+5d76760c330d85616e88801050c93c9e44dde990a8d1867ecdcea7700b6ad389
+010a5f0b846c2fbc7e4c4b2daaf0fc6443004d6993fbf3990f78d69350bdec37
+66b9f8d3659fb44cc7917208072d1cdc3618044e0706804aadbfd6e6823e197e
+e8dcbeac8f6ae996260f5d75279b3d1508ba47b61759dbc1dfe41cc229ff0f5a
+a3ff10b0e1ab34e1b29fc95f245b69d61f8ccd5835937b8cf2afda032bd85635
+9448b70d736946734ecacdfc0652cd5fc7653b3fd367c4c5d9c7f7ae1be27671
+8bf62030e55fed95b073eb8b805088eda02d726e2f9416eb02ef7ed5ee19b57f
+f196b0ce036cee614680585d911a289a4953b5288dbadd44e2e6c1e406836a6f
+cab530c36ddfcef4a58922f96cdb00a41929cc98dc77c52dc6c7e9d83b188a88
+1c8a16de3557f9bd5b23e03d5c9cd00f921a1e7f7c520b6c55205ab0dfc8caa7
+6f6d7aa1e2c4819e4d19af8bd07aebb63e716d0a4fefbd0c9600e5c5a9857ff8
+a637e2da191cc7bb8b1a09f4f4d1ebad7549b7b2d41d74cc991cb0ef99fc1bd7
+b3575dc3003914643d277f88131facc8b58b3bdcc55dcbc372de6e3104a92609
+09d9fe9c16e18ddb44a481438ca22330c7d6b7a4eedda79f01bf19c266ec672f
+99fd1f26d55faa7c485af35609a799918dce99225bc28a60256f5d393d488bc8
+660af7a2651391bfb765a8e7993a8701dec9254c983682fbcd136b4774ee2c41
+bb2e1c64a6371db80c433e8b0c14658ce0ae511bef8da3ab0d10d4aec7d9545b
+90881504302bcb086528834bee3a0c744092067de2205a7d773a5b1882d6094b
+9f32b36d94033259881aaf60c7ea2eb496ff2bf705aeb576a41170461fd95e2c
+0c4a65ba15357e7ef123f8a749b89583e037e1e9e2ea2d8f435bce1627cbe529
+7183f4634de4d321d6b63d939abd38085a1d1ecd916fceb8dccac6798b358449
+ae06c3f7dc948b9f32346a3f492db2b894605f0d33bf2ad98445afcb05b6be5c
+2f38338c78b40cc533b4d7dea2b9760f48a5822ce3776e87a8748f81c84ee7d3
+d43971f8d572904da8b6e1f2f20f95bb2c31a4febdf195973dbb2b8399883d9d
+7edd05e710d4161fa96e30244dea9c2dae7ed30e36058bf077f060067c3c6331
+b26d7e358cf3efbd5dd8820d0f383071fd7c8f29886e7fa098a9521eeb557af5
+d275f95ccd75f593e97aa2a1d7463ed69ca8b87e3ca8359861cdf24ff3a01955
+befe00289476891a2db20b0c808ccd590598c4486d00a53ae66acea05e921f91
+b6b8410bb4708bf580998f9e08df92798f3da75b1ba7e380d4e3a5efac7424a1
+83bd2adcfd45d84a0495cb2cf6f647ed38042d03ebc57cc7fb01c9b6eb809815
+aaff355c0048fd1456bb3b666d69b61e62e5f8764d8fb8cbe568ffab07b2b20a
+dd75e6e8afc57cdd6a368b35903177c16db14c14f861eb4318e158caa7615743
+c847e066be616524248056f1f1323cb75f976f3c45db703df818eb011499049a
+3795c81add7bdb60c942fc7dc78cc0644a6cbffee86744af3127d021b0db7cad
+29745fed8dcc7c814da5085ffb6537dc87b2b10c0d739ec72037060d77d03479
+80b7c1c66f33594dcb8fab64cb6a7595bf4321074e177b613d8ff0d6b3165734
+ef7ba807198398cbfa82b5c22268966bf1c6efcb763bda2771370fe353d5f74e
+39b97d0007c8f07cd4ec408d5fd8e0b91898da51c5995f1bf401201f3d990741
+a413a1873c0630b02461dbe7eefc315718b935819245a3e4ed6f7245205b0260
+2ba4e3fbd10e9e9a6d795b7e5faeeb4bb327f8e2bf6288afa17b33febc30da26
+339646fde4bc2052156bb105b6495ebb1f109772fc0cf4e74d04fc343e59455d
+f66e127b01af76306f1eefb66cdde33513c9cd8cfde5191a30a611fc740c7778
+a8ec6ed6ab7294afdc13c647b5beb50d055f1713d94f8f4c34198de9e7d69140
+4a6ac35aee04add4622ee052dc6e5ac069ca16f44699d6dd1135b167daef2640
+6354b17dd0065b0667167a32152e0a1bfabcc906d6a83f57322b6aaeb665739b
+0a129704c95439feae80813d4e016707e58501284f589bcfefb24f2d4f4a64f6
+8f498156b4b33739c6d709353b297803d5e2be86d22a8537ecd6f22eae4a9a08
+8675186ed6b6f04bf4ebf656f62c93b707b488177b56c671218c0ecfc7c331e5
+ebf4d7d19e24e3874722d2ec41850586bed01c51501cdafb58f62da3bacf1e5f
+fbe991ae47504f4cff536cd07c27ea98c7874d0332184e8e9ec489a8b88cf4da
+3aab2cbf5fce08fce1aac46f7be72bfd13b2e68247c6dbc126e94b6c223b65b8
+e10e023b083a73ba7116097cc30b32619e0337e0234231d125c615edab87a076
+11dedf515e1015422838455580e1ee2332f79b66e0b187045fc80b02a42b5864
+ca8f5ec65bcd6740cac58c1bef50462dab2b0148c1f38ece89fbdc8fa08aa8c2
+6bb7f7c2760f88e4b56e3ead341f6696544fc6735122c136ebab68afa8dadb4f
+54c6fc0166bf56990d9b28d0fa8d843f1c971029a46665c1e5b7bcd2b9d794cd
+ef19e52d4a154e0d537d14c4bf0feb4ee4f289cae0c86cc82fbac3b43102c28c
+b5f6a82948da4c51fcf85d95a91a5a60806815f04c7175f695e1af5270f961ca
+bf7ca7376887489e598d4014b2bcfb9f4a745a14f577ccb2f402be279fda4d02
+3f464004998682716083496d4112ed9ec7351d81bd4729511a96f001d119e714
+7641307abad87eef8cb42bb7ddd62f61eee2a3944a834039a5456d3324c53c4e
+7b44016242baa784eba34a2ca7556dedad425bdefc04f11aab77263b508ac9b4
+4f372af561266420f852b0f288c5a8d08cb682b47bcd0f8c738370c48ff9dc51
+17e8551a946b9b0d0b441e8353e15214cb669f5a696b50a23a4092b65d3fdec6
+f174fd8b2d51b22cefac51cd5fc7653b3fd367dbf0aad2f94172a50a1bc5c236
+103d08e2aca1b465cdbd6441a8b9f05b2e998d330ae453cb4d2ecebd069ea9ea
+10a0652dc518141e6bf674282bd3ac1aaf7361513a945163bbfd249effeba765
+38c41e708a6e765fe6b7fde08d192ae7e1e4a12e61ced834f873f89bd13934db
+828fe9925e412e687fd5b99ce4f0fadd5d20a2d5d2c083b98d7e85655df6dcb7
+f488d3bafc7e1cf88a8ddac3e33b3f38c1da0bca42f052f379bf663f7ddd047f
+227dc4461713cf88d27780480ef4154c1cda2c40ef944a86aa053375d9504107
+4149481e9f6d061b6cf70d533ea7f4df16075c1cb2d84fe52ea967b85adee81d
+976e3b5cc75fa41286cefd804fd3b471c74e973e3961346a3b6473390660492f
+1e602e7f27c38f282c7d398013f133812a6e8d2d20c45f8c31c8dd26e53ac22c
+5581ab149190010f6e3213f77da2662dbe1919d79a23aa976d23183074171102
+9dc5311c96a7dcd36bf4e60780ba68f44292b23c6301bfe39defe3f420306b6f
+c94a224e43638aaa1d3ddcaf6d4976dc33831d413f691ad7867feebf53ff31e9
+05a6f084f525873c6e1a7eaf956f8c1f9728f88303c6cb14b6f79fd730febac7
+1552d5a8e5f4b8e0bcb10efbf8a49ca6f470ef4ba8fc2b5b05d0e2077ff12202
+bf480f21c47ef74592b6f8a25ed1bdec3a87a3afca117fd40ce5fd5700cc0b62
+5f29828d7dc95812d142e1967b748961b343cb96408146a6aee63d8cb82e0984
+1073d3085e5db40b230814bf4a2fe816891d33003db3cd0a585c1dd306042423
+a212af55353f1e915436137cb6ef0823dc1f14746d0de7425e036cfb6722a890
+3e5260dec6a7dafd44c995c215d6a917075a3c8220884be62c0660b833b658a8
+74f9af8d280d67bcaa96429d4882427c81b38570c66d0e309628d8d7cc28c442
+2511210838a12cde39af4eca0423e5b040c52124b5c549774e207401ffe8a771
+08192fcbbfb5a127c24241c8d3e0bd8a70456ae850725fc1dc1b2d5c2d1acb49
+71fcdcd33e027a562c0ab202e73bb3e701d4f675fc4e301a710bfcef00da6ff0
+926112665593322dfac72485b8eddfaf4cc449154c53c4403eed5332f38c7498
+9851e9e056c6b8cf9fb7079b48420f04cd54cc12d505f13f111df1a51672447a
+71defa3128cbd7ccd50afa388170bc80162228c1ab8b8b98ab9bcfb0d49686f9
+2fef95de610905562e92665992fc6fc31c2a0e9ec7fc06bd22addc740e02bb02
+d08cff9cdd111cf41b91a7e4d8f38d88d8cbb7dcd4120fbb76f69a24a773f32e
+a1f63f906a92a16861db77523c55cfbfee0e96b00e1f93dd20d154343ee774e0
+1fdb1be91c43a7d690a557dcd5f75fc2bb0e3e18286dd8e1e23412fd61fd79ad
+602259e90d0e5a2894a29eda1c096289766160e356931015f1ccda0a56f3f2a9
+d9c2e495157514e1b03768d8190619e0bd113afcf91f67de3ec80a09281107b6
+b2af3e22a970ddc8a28c61140b102d990392c923a50e55971f6751287aef256e
+f1c4540af2b1d7754b16fec88e3ecaedb6b713ba39fe835b27cd7fc8c132a740
+46702a4b9737dc04b12310ba7f30ad94de90c4cc2c0e174c5a119d14ba6488a6
+a1134a68ec0ea009c0caef6c0b1edbfcac670162a1b3235757ad4dc4b0ef153e
+a4c396a809c8ad3945607752dc6ecd49348d9100c3029da91cdd15852d80cff2
+dddce3e7e2818294a4113ce0bb2e4d930b1069156c346c2eef80e8441084fa66
+7ed142e5f9414f02a362992ad52055fb82d627dd481405966836efb51f858f8b
+6104fe5d335427b528c2a83512fc056de5f0590945e84d9da75012e2382cc99d
+cd957c861f43582d982411c74d62c0ba1320d0e069cdf1ad193a4afdae8b0b3e
+8bc1179ed8b02e0acf0591edd39971dc36698a884f750694b57bcd28ffa1848b
+621f22b1a5c9b85498caa13e82aa9573695d3e1ddd2c408123494d46e671b50f
+5314e92a073fc52522f6492de090208493f1581017e05d7f8bcda9cd8cb62cf8
+2cfa57390a3e27ea3a15014a00c9b6189bc82996f2823b1f7b6c932ae9d44cd2
+351af96c918294e743f054f1cd71f1287e7d0dd8908e573c3113734c091cd343
+95647aea885cd9df1211028b13f99591f653f69df2bc629297ec1c273ff6c446
+a7d6bc6579118915705baad148ce2d8d0f032ab0ce4608d3f2c19ec255df6b86
+c88700d11dfc2953b60391c5c4eafab97fb6fc87c467f25db92c05ac2aec8ab9
+f4f624b08f92522739d920f7e07eb4d32807990a1f03dd323c5b5d2b4b5af128
+c18cf5270e0cfbb3744fbe8041d7ffebbaea8bbc7b851f6e34e7abe48cfa8b72
+00ba0034a95bec468ca2f49f7f34fb3a441936128fe1d842380aee63867b2ec7
+38963bd51781d14bb5971e156e6fb64b2ac5fd5fb3c1c1569a6081ba0f98d8c7
+7736a52aa2313dece258c0b9e2cc3c8547fcdf0ecaf7c704cb646eb9b00b0d29
+4ff444b03c4d041667206d44adf45890b1672eed8cd460c32b8cb37e21be14c6
+0852be32de9002618df604770ffadf5cfc05857966bccb01edd59906bbf4faca
+52a14c2e1f0857cf039a4a82474f03dafd54b8c163882ba77436820fec657082
+45bb02be9e7fcad3cc9ffbd119ab53982acb49e7c74fa8fcd92b2b0dee92eb87
+fc7f8bde3000b42656b338078c2ae8f58eb616fdf447c06ca70048b2f5ae25c5
+123655dd45b546277bd35b63a1308ca47cf4d8917c4bbde2b8a07855a0628c7e
+eb5bef472819729b3878168096a81bf7dcdd59df236fabfcb0c95c86ad80800f
+c2f69fc835544ea36403ff2cf0f3bc8127bc2eb5abacaee987b76e202c8de7d9
+954fdfb49cad1a5e9dd6e5b943d9b3477acb63cc884168cdda0961b483c20b73
+2f7012e980d1c6a353134e2ab65b8f93b6c6929ba78287c215daf08f480b786c
+45b5ee6df0b2b030fa7a27e39268c1526759aa0e095606d2de48f0e7ead25596
+09eae59437b3621716a4892a241d8fa957bb65db783ce120cbd1e6bd83b8a26f
+579f062654e17f8e35159212f7b1b7788934279c0315b9a603b3008cfb1393d0
+edd53889e22df7108a6cb6e2732f9edb9ea792e00469f192a288ca6fe995c7f9
+e3b321efa32329d3b1f0d467e49aa584000810c5b547149295a7676ff1e4cd89
+d8d6da7e117e8cfd0877e8d7ad0869b15e69da45fe038ba3d62ae756bec8802e
+e27ead377a333d62377718b523658dce2f8669a67a70585fc50549b52ec5289d
+22dd47a8892152cde34423e671a3820089f4f3b4007759dd686bbce52c7c9fde
+61585a41e1e74d33d72e052708b3163d62ca2e89fd981b595b3840c94afc7b5a
+3148be452208a894dab2becf9820d8e7769ec43d9635aa867edc4453e7d03b4d
+f0e4b89b4b6a3297cfbcdb97b158e46503f38c9543c49d81a41665228c07c28c
+33965bb4fbdf8fe213bba119605114bf07c4de83aca1eeaddea3345caec6ef41
+ea7bc93bab21a2948eb3808f467090058fd08f00510ff600658fa971d1f66e54
+7ad1965a174786e4d92e059fb6769e965b1147f4048648fe82ec51b13bc56c71
+229b19829abcc1ffa85a051c413245bacfe48d720fbf8d4496c05d7b5f45572e
+6190fdc37301f6cbdc44031c1e97cf47f9c5b9ebec8f79c8bf8157c5fd861ca6
+4a5d258d12a8e48f7c9ed901fdc289b53641d5cd5e63310a8be495b1104a96ea
+664da883db4d8b8dd8ab1dfcdc10d771d37562edaa793cc9019389d060709efd
+18d78bcb6d3719a0ee0a5316f9f40fa503d9707a6d6abd1cced61dbfccb06be6
+714985a9ca63809cbba77857712c2381c569207cf9db2699dc0aa6b7f5565043
+816bdeb09e29be611cc336c31e84302245c9ed37231a7b92d711742c640d06ce
+e484024b5335dbd0387548b2b71655e83cad37abc1496e1cf9d8fe792fde96a3
+bb684ca9fed1bd75d9bf50b06d58bc2929de047f96f003302fa2872ad8be3e0b
+68873f143abdfa4a73702f481ec4e32018581f19ff862c93fdba310f5914a242
+30a24df9f56ee75d274c9d5cdeeecd61618c14a3c2d36ae5167b04312e7a7797
+0267e2df6837256f0cad7af1b5e29386fb384a8ec2a3a116e026bd2e48fdbc5a
+90d503e2f3c5919c715724b234b71349ccc9dbee51808884d39a8b1ffa448488
+504b67e245eb403221348735723197708a564298581b5d75384b13ba92a7e25a
+5c40792e86d3401f9fab4a41762d95982365f6408f9683877402ce4e98e4a00c
+c3178e104c0857719ac4cfd53d07c219eb60e66d463708e3ed65cb4280285c2e
+723673836995e18aef5a9a503d7e89aa2ce4e17c33a1214df21ef551d68c3066
+64583dfd9664e09acecee772d6a70a23f3840ecdf6a671dd7870e1fa9f261e79
+6048168a73a20c53a971656d47a0ecdf7e7c5cad76073335ccdc14477746c675
+e2628951ee83c402f7a0b581af8ee6a594923a375d18c98a2dd01d3d5eb8f71e
+657bd49e5b0c4f4cc0a62ffbe13f10cbca8bc2b631d21b43827a5c3ee7548ed2
+baee96c94af70cadccd81dd3a48c7190b0630a0c7ce48249b91d92a1bfd06ba3
+123f97326e31c195fd1771fe71abf66fe3fcea8b285d6a1d4cb55b9de4699b0e
+c55bf2f5d6c245f41cd933a4ce3eda258cb90e401c6075a02757e36717c8f547
+4b4e9f3a8c2d172b5d380dbb9e5cf8dbbd8b2d8cfd014a5011b9069cc00b7dba
+21b4d17f44a55ef1e5c49ae01d91ab509c3313f2b0a8461194bb89fec131a396
+4e58fceb5677baa816bfb9e15a5121b3f0649562f920ddc302a949268741a677
+4e8c2fcd11288f6705250232d4de4caa56a8e8219dcb805ed08722a674d94491
+ee9f530d2eb8e07173f86912f0e585e0051cdb190e4d0040f9da037f29890068
+4e4d5577f67a9359e6f86b690ed5e6d3e772f7817edc2867dcd6d11dbd59b9ed
+904a57f2c5dbaedc298dc4f2bffd42a93e77925e00b4d74460c68196f0326f39
+f1ba9059cdee88c8a5377b623fe791c7eaaaf6ee2454ec3f681bf42600a97acf
+bba69df07157f26b64a642849a3da66f0e458fa885255699024771c0e448e620
+c3a2607b32cedb6e0b72a5a5dddb10981c3cefe08ed3921c4d0ff87c18cea04c
+16bde8148e530979c140973c68ae56da99048448c6041f1e15d162163c46f7f0
+5f9bd3ec2c7b2012d6f3c29eb76abfb56641774cf6b6bf17ba63b7dc94efd7f0
+c5412d1448ae3a093cce169908469e6ce06971d89a547f25d5479fbce1b89278
+2440339e904500a9446ed22e000a9213858c097896a83f008b180d942e397804
+a669da5d731b2b29c3af90d009e4d5fc9885e9a446a8e4c7d1e4f2e64629d829
+444da50342173a10deee11630aa33d865c532f39cad6326674ec49a348a02da9
+966cf4f77692ec51253f5dbc8650e28992673c97a8bb57ae2b2a1331644d3de2
+0236f8cf1c3f071fa6bb2bbda641410c39585a57895988e5d653daa8558d797a
+87d8ad98fdd07477a82c09076c6d5b8c2b6da0c3f4b916149bfae6ab3e47b977
+9c00f9e01cefe0e56a3dc2820a78bac7ce577e4e3e9b30724ca1ae980bf5320a
+41f38e2fea835dd1b7f8f252ec7052793b34314e0faa27ab4edc58ce25feaef4
+011cda00461160b772ac3dbb072cb3bb02b27f33ac2b9873a8131954a4abcffe
+1ff1b3acbb237877ef0faebe4ba87e886a217d62a86fff64119cb68a54ea16e4
+6042eb0ac3194be279f6662a3bc1f6d46aad795274df8c5810832a8a7b442a4b
+acdef42384bd3c25765321fa46f000e330d01a4d63cd71f11bf2cccecbc0916d
+3a78816f519b6ab5e58cae3543236eea83678c61c3bf8da0db91f4f9553565a1
+ef7cada3a2eaf42bdad0fb7702dbf84ccaee6e01b97b2acec60a47cf19f42871
+c4255eae175c0265ce822ba301bbf495104a995014cd9456e73d2ec34d417402
+38c08c6c296cca1ca3b6591e3bb34ed9aa0061b1309444c29f544bdc8b22083e
+f8a1975c3b20d6d5ca9c351c26334eea4dd8b8a94f33e6195c1a80d6e37bd2e8
+4122ec755d4c52614af9dd42d9741e365b019654bfadfc69a90e2ef9b84957fc
+6d546f6d8d8f75f7dcf53ac4f597cb302ff298fd67a72ec5fd2d2e480e239060
+d6c242f3101f449fb1c394a0e5aab4e2c045506d3839f811d173c0564fcd1657
+f668ba835451a95dee465ae2ea790afe0e9538a6da482e3c9dfd134366ebe8ef
+d446d7daa9c05da01815985a2a5f2c3ec1f0a7a929717d234e3e2eb26a5552dc
+3577e7aa7bb1ca1ca6c3b36503d08f079892a2e797a54def5681eee1f9a3577c
+40e7ca2fc5dea406e54890bab23732e6384a647926d8e072de0bd636f1c75e51
+952c8aa250389079d6b04490e372b4218613ab658ac1c77ea9a1ab429277b778
+6ea8dde78ffb71bc0bc4dfd9ff7e1a6b2ef19a12276f3ce7d4a5b281401af046
+f8b6c6548bda69192ca355cf43bf1175b033f01e1bf61ef403053a79288671ba
+85dfda331ad1fdcd203e875047c740c42bb12304c4a18a407bc99a2c13a87c60
+645b158b0513a90049845a03cf574e1496acd0f2fb0f914e011b103533e61aa0
+1ac25bcfadd456f33b64000440c1e935fc1681e9fb6685786b72c909055e4f40
+b70afc227ac5f2dc1e3e58363547223cd835d369351f36cf698120403c53e4e5
+a16b756600bf0a37d1965a2ea457df75e07f3021023072b12aa7f3d9e8dd010b
+2dfa92b24d7375b7ba1290060b5b5c9f1537dd0969cf9a7701fda9f9a96359c6
+ccc15f736f5d2479824e8488f6aba11b3d25187a9337effa41ae611da4e35763
+f60ab26fc896697bddca64b70300f09a104d041ea41c4dff6f33861b8ce4f45d
+98fe08b1626cd9e60a4453597e2fc3287d9790296da5087c25ae7b85be898583
+ba29d25a59c776bc93fef8f3059e77827449056c2e55a4772385354bfdd19284
+7a02b8d0d5ab6b34ad9968d68c1641a4ccb2c03e5253f1aac444c1afcca8c94b
+934806c61442f810a7c53f06db5b23d0b017a72afb5be70287eedd1e0289ad87
+43965dae9770a18faa7944cad4c638eb8d918558aec3a0a695765172d5c834c2
+13e680fc79d9566fc3b47601c706c2609892dc9d1650465703ee6c2f7eeadf92
+809cd4831e47a0188c633102019b6425cb76403f967af48976a2737504060649
+954c118f616bae1de9cb94ed75f6a3dff1ce4954dd298ce8b5007d1e182a7e6c
+e0c6873f582d21cbc2f0638d4a7b2679ae58bb54c7f8a1bc1c3e9eafbbe909c6
+40ac2bba74aeed432242720e473163091cf6fbfec4d44095434600789d7d795b
+e5ae5500584e8e637daf9a7ac458532f3e44320be7ce7aa1f106b6420e67a96f
+459c23b7b02404c1b7620742766142545551de23fa8ca655c1579fb2c0a10e93
+1c220e584e9fc86eca3aab882f3881c530ff92dae83340193d5aa93bc857671d
+ca3fb1f03534ef6ab4cab64e29c02a5c37e19d1274618211f2e7493a4a7045b5
+3d39adcc8de68bc7f2265914218d2d69abd7c49bc9237535b4d364cd67bbbe35
+f13f71b88e83e3bd6f09caf327c629cbc2b8ee728daa1626795c2995c7919a2a
+e966108bc76de252e4df625e95338332b6aba850f0fe97fdf247e85db1fa4a8f
+3d307543c80426061ff86b4ef8d26997baaed5679cf430bc88ce20e31cf510e6
+987be01e58a170bfc8a6259f113cdd3541fac41467a862acb3de36fb60f72de3
+e0cb8a02e17ea8cd2eea27aba315fc34795ab06dcabf5ffd1b83e2308b2a21c7
+72cb356f98a7d2d0f0cfcf69d672aaf7fbe6198344aadd2ec28f593c7332b0f6
+1809ef49d7c19bcb6c065ec2d890d4c8a172e061f47ef2cc392e974d1874278e
+250453cfbbe55c77a0715475a7cb383a287cb83f5a14fd027c332f79a09cfcfb
+2c7546c8aa601d925ef6b72a2f1ac1df26505bcc8229a4aa0c7167b9d7c56508
+901efdc77754cdc396482d17a6e9fcd200a0cf35f67948d11beec6d38794a826
+7c48da337fd191705e26eed2981df5ac1e8f4bb23952b9eb6f92cef4139e1884
+bff9f37257cced07790b6ec333d66a6800d8c8befb1d6362786b3ed00ccd233d
+80e8c4fbec37dc7dcde3e5ff2b8a81596dd10b714d9697419ecc542a661be66e
+a5082e50ab273dbae50d60ba68273be1adc6f750ba2115af58ce22e8e10443e7
+2048d5b248294cf81e9e1995dffa731795817c556133b714d4970b379b310698
+d4f690f2d799153b8890e74dfb72a5a50c476be90cd65157b82fe6b42c5f1be4
+3d5cb0c00ccc62f270ba879311467dcfe9fb62aec22c5d4872f6b02b8a8442d9
+d309722c4d30047232cd0c97049695a2cd80478ef3845f6d1005f36730c41429
+0576753e869c83d458f0dc3f42f68264e020270889c63218df8e1a8ee73488f6
+49ff10926847ac73be9e89879157cf78af203a66ac491eb93ba365b8891dbb8a
+bf8a4403b36e0334beea6749cc202ab18dcd07028f2f6b29b0eb5865a3748aaa
+c60575212f532b4cd4c9dfdf00aedf6cfe6703ec89b63950a1011785f6dc9c78
+d09280ba67eb5a78f9bfb797add8d7b705ac5ac61a16fbdedfc1ae720f9a4ca3
+4cd9828c287b680c24f11bad00b644beb9f6196dbaec8ba231de2d065bd7f42c
+d731e09725adc7213bb1f5e675bc11aadaa56da37f62ede33a390d43f42a795a
+0a5df034adca9ecd0e3132453aba99fdf4ae8cc2a7600e4aa10db1db113674f5
+10b2427b1dcb424623a259cca49ed14c97f0613edeb93f459fe9b9cb75b4f308
+15f5c65f839208a6f25652c8f63196ebc83c081c4739a692bf14ee8ee54ec4ce
+72a35bf84d5f4e6c0015a4443e7f799b7bc6828e30a97687a0e5b8b722fc69ab
+5baa477d07bbe2ef09a4fb7f05db2e02923bc8582f27693a5ce2b473ca02a815
+9c0789ef683ad4c7d8708dd28c408a21e358fa2c30cc598bc36c5651917da2e0
+593e472b57d70c0d6854fa5422e8b3825a9e39b0a54b0634190c2aebff4913a9
+7534bc70e3e9b3458f272d24087e74a538764b43168e74108da00351ea558e3c
+34bc8bdac1e1bc9061a688723bd54f0bd4ed7c165f32dec016b056b7cc566a4b
+1c873e36ffdb7e29fb088782ce60524e2d75cacd23fc274e307dd1d2b07558a2
+7f64c4742eb3ba451c8ef3b6591d193d4a55a42fddc17f12ec3aaf51de8056d2
+80f09997bb31a07d6112a855dbf7062218dbe89a6844a006f23899f98624ff6c
+6c364bf079c4b3c2f92cd79534f89925cfc55016218192a98cdf6cf4fe1b5fc6
+9540ea49643891db45a7a71cbb85f41035f507dbc6b161f7f1eada70e7905aea
+0b1983f7909d5575e3e7e8095bf0f4978217b23f329f057f1152ffc14b9bad8e
+cd6fff8598542a6adabc992ab3563f424d108d95abffe9977f09630ef4c6ba01
+90828d34098bb40bd230685153e7282671478138e578f608873d64b00eaf1339
+6dbfa02de3fa983735d90fe2d0cf7d28bd9f35a475a6f55017124a58988d00c8
+713745c7c999ea746bc969d31aa62eb0d722cab1e57cb0ee97cb969d1c3c1b41
+cced2d7ad87df16215f908e02a358b725eb5b234fd620f7f54d70f764eafe8a5
+de65e3e171c885eb012b3db1707c76724b62bb0c1a51be0b67179f96a46ea538
+17bd480e774c31fa131141e017ecd4c1864f62636127a4c7e9bdd05679462314
+042f0858441e3d261ded65833d91d80a6ce303de41060312e60527a3dd45404f
+55c93a9535c3a393f1748609b002be9511d87af20c7bb2c4cfffe466df21b100
+e20172c8215855aec00e3680c7efc58128a95820085cbe598b9603c70638e128
+bf0c2ab7113eb95b62fd40fef845b1eb5414737cd94ac65970a4d6dc2726d2ed
+2ba7567155154ad30301ee997a3bd52738dd17030860d3a479426c652cdc22b6
+2c70f185d812543f836c7d0253ebf8788cd6148ffc163699f72a85bd2600cd2a
+72104cfae46c836939c5a8a6584a58022d0ffbbc1d1f035d959fe58013611cd5
+be08db068630e5a4c5fe915e20e5652bcdcc44f0ce93221ae09c55fd565c2523
+79189a85ccb93f2d6162402f2209df604f140799d7e0b34639149eb5e54c33c4
+05389d46c775ef19519f1ad4a6f63a62435c090d8e3bdcd6423f5b7dab32d263
+165c93dbfb1af542af08aa5ea25595b3d8ef053e19a16e5a1b13f437fcd2586e
+4534aafbbfe1e76906e832c6d1d47a3c5c868e65afa7af2e21e54ce233170b0d
+e44bf290c512ff3acc84f0e492c73a0d827d701bc9766abc4c08d12fee986020
+d06762d4a0163a976031bb13e7e86fdd3101b8d5155046ad9d82fc26496661d8
+8cc516350229461d6c11114c35a0d13a1c6ffcb96fdd56105d67bc5666512de9
+6aa15713998ad53064b7023f64dcbec8ecfee625ef76f5a024c92330585cd17f
+1c3f82bbcb509d4d31b535cd5853d803ab7cf1862e8a87cc3d6557aeb7567ac7
+9ee04bfc8a445169afdd1b1375274fbb78ce431ffb9c6fd61a99a0bf1b41c19e
+1ccd5dff38a45647d51fb014099c74ebb11c5a07050078507d45a1ff1fa2e178
+567f745448157bad850f1fdcf9a37afc8968120892ebc0f85f5dfce9116a7108
+b5cc34c5d85a91a65d18b9093fd27e9778ce26bd93644e4c20ffad131503b509
+850f4fb260edb6d8cd0bdcca4beb8a25ec1fa44eb5b31e9213d11d0a42d1aac0
+650e1ad3880d59d2256a2720081fa2a7482e3bf1e4f4afa59ec16b810c0c1cf3
+2cfc726205b285ad7cb21d7a59fbe526a844a5d75ab5d61a801701c2984b48f4
+ff020607f2ce9b468df2f74e04812262943d8932d2e3c0478afd42a8a04eb7eb
+44f9dd70b1da28153f4f366df0fd25e89f942aef374fb9bd31d9575803c03e57
+50e5e75975f108b6c7bb770d824e5eb88d67dac4526d6e4df1c6fca0a5fce033
+84b06624e906912a26412b36cb177fa2dd18279591a0db289d18b1754461b97d
+076631b5d598cb2741652bcbcb9804e1d01a8502b03739981b42e4754e21287f
+ae2adecc9ab60a3ba753bf94d1b586c0f689309cddf12131eb442180c1c25b75
+05bae86b985d6975d1048d3da9ccac02bac3e6d8a2748082e252167809ec7b81
+7cd72fd364f27f9aa276cd5e70edf56cd5a0b9cd00b815411c766b67dfa424a5
+1d9a9c7e27cf57e513965379e180f1bb94b174bf827dcbdc89ffef77f5e2ffe3
+9f1dafdb747f003723dfdfc91af3c6c23619237e4f661de027809a510242ea85
+d9b93733b9276e37c01da481bf86fd040b2a21df21b3aebd8cb974925ac339cc
+110b604531af29325b8d844305196e5e1366edbd5e6196ddfcfafb27e28b1adb
+6c2a3fd16d904a1ffb4a998a4614cacc85157d8463f7cda5363f5f03b9141bbf
+4788f8e92de9680f3fdea66415c9ce8295c8a1276fbb9b57e97f899caa8ccd60
+275e20ef7c0ea888cd60bae018ab8d59d4b9b0e9a19d71cdaa96392893a7284f
+6d94291130edefb156dd9a7d172c89b881aa5dd8d1a4d9177640bcc8d308a801
+547a4fe7b75f04f99d529c854dc059641c7652132291dcd0deca5ae1044880d0
+4a82600f293dbce78d2dd503a4b20ea39f25633c216021b78cdeedf51fd73c9f
+ff3b4e7b637e90de3838f8aa7e1703cbb6b5c74e1f0ef474c9ecfedd79d0b8a6
+1559407b87435fad2ca5ec36b170391fea7cde5824286f66bb0f2b14431d2481
+0fe6b2a6905c2ef0908bdd4b05a16c01c00b2eae7bf294251633e806ba08d21c
+3e1823e8c0e9b6ff171c19f2d4b27f070389606d90ddbe0303133f565644c8ec
+d9dac4daeeeb490b2dd2ffecc57d69daf3fd4ac8666adc318c245e14f5e67d44
+d8941a967696da623d22c077d7484bb1c9029bcf536aa060626df3d5593bd4b7
+af56296934d03d03c682426f00542ad5d3f9f8631e97eba46416979b6b2fd5f4
+4f19b0cc18d28d551fec3b3fc5440f3dd5a0d79fff8df917dd515f68eea2ed9b
+73fe68e395c7fa2cfcbbffbb4a7cef13b875b96f5e805dd45a7c8d3e2eaae5a1
+34e00e26988281b159cd8f9d31a2f15246efd8d927e881a173487df644cc7656
+b847682c04542f35de33a7d638b5a2187a74f036ac693e4ad95142e8fd852899
+b8ffd2405f5d79af6fa919f2613c2f6f4fb729f5d6c3fc8ae921eb23a0827667
+11432b8e7ea4c6c823b57acb073fc00ae93223a0f893bb8e3ddcde28de69cec6
+5c0ab65d48799ab8d1c269ce7ce346d40256992947b609cf9d3da1d758ceb593
+1d6f05acddafc290e2b59a93bd94507be8a4d4d675dccca80891ee13846be24b
+8cc4f7052c5de700c953319b29aa4b87ac3c85377ad31a14584ed6970928e850
+5819d527dfdb85e330a5cd47a60932ac93b359bc0921ca40703f8abea6ad6d63
+83f8d2660f8c8571c5a13d889437d12d6a41552d9c4afcdf2fbc2bde8055d681
+3b7be320d48247a34cbe1b84791d2c8e9c417777bab9869cafea2c522c59b12f
+23cd59779cb58f047e0b81fe4d42d1f4433dae0ad691b9c26e8f82b5ab867ea6
+fcb2d7f2c0718610130ecb7ce93d1ec2eddd2cedf1458412dfed5f7f067c473e
+aa0235862bac6f8c8408c0f61d978312fc1a671c292620bc863537d286a60a22
+03a2d5dbbb772b365b925b9a616ec398359425e3b935c7e833e572ca8ecddf98
+121a7bbbef3f8e262d4c08cab12d97f15776e7e202f493e2e12b87f2e421e5b7
+6e3db0ebae2f1e62239072e98391135f5ce4141cea6d7e7a19ec1236b81d1ea8
+0fde0b0f2fb4aad1fdde1a004ac235c896a8a5cb15a4806401727e7dbd148ec5
+8bbdadd754e31592c37a7207a82989e5405a7ac58067f07932acadb77de65c56
+92caff85e5c183181cfde88b045e596cfbca6b4e0d37e6b881bd3f081ccc4a04
+a6d576b41e277b1eccff69feeb5253bbd9a8e11b554e496a16f714ad3bd963f6
+b8425f07ca5de122de2717d09917f19ec3238fe557c44782caca0e4e52f38b5f
+7c207b180b498a8fa04e66f6abee7d7e79fae9e54cf566803a885db7488506e3
+8727b5bd772198624051c64da3945da5e904788ec969dbb890f264e54e2c661a
+9574347d34634550d5b1a1355f35140adbc07be4d5ca5c791cc8cc01c4b26875
+26d8937cfea55684de8165b792f7740044e50ba4c19677a30bd453419a7b8d46
+437f44d206dd8a871269c903d78bfaa35c4d1a054d0935afc44f048da40cdfdb
+5c15cfe9c8f19cf87cb93a6594cd394c7f64fe21cb599985a69836ddbaf80410
+4848eb7252b523563b1c24e57d4966d1eb261e4c9c5ecdb8547e936506175440
+381020593bd8cbce659a7a345a4c05a9790df98ef2bddc9fe45f6968c49373d2
+d55cbdb4de22c4f7d53f8263843f8690baa842f6f1bc7cc1545f3e0a169633a4
+01e5656f08a48b17a69d7babea61d476ec62fe1395d1c01988926fb0e69326da
+c69b5e5347167c0541f226d4d2d8ed2b4828ba74f3939a4b77dea31d881c7b70
+18e1c1b646c10a935807e6d3a9e6674aee575023f941a098d2df22af754b5296
+360777bd1a5b1a8fbb29ec9ad201dbe0170850ecde219ad290af01017f26b777
+56c14a5d3ebe7ab8560ddf0140924131cb0a693433437d4a17f33bb22e92503a
+337de079b27ceea348d9218278870e1404f7733200e31de980e38ffc55268921
+200bb4a6bf116ffc94e5d68015c7b0957254589bbcfd6b0d7318e1983d18bb22
+982e598484b2c7c7ca5b08482cc0f23f74d1ca4baa5bc61d1fd9094b860edffc
+44c5bba1d314b46d6c45a5a1ad97706893733a9eaab22bec79f4437a5917beed
+f24271040da4386867c830621ffd6744ddfb078caf5cf59e7e7fa456eac5abba
+dfea921d226d36cc6d03c73716badab60c4021630643824a81ae62a731d7d647
+69749ec4f34068330b11d2f9664f56ab8b8a91864a3a2d2680717a6f7ebf8785
+a18fababe5abf9b1e759573dad33c4a968505e887c7b0f9bdf65db75bc04c8e3
+f397740b94b07dd154a5523b19b87879f8f0466d8fc9f3acfee32fba47661417
+a6a97aa66eb83ab06a8347a76890bc83e6bbb6de46f007e7ddf4c316e904244c
+214382939b4507a69a29fa3a60ad96e420d6873f0f28c8283fe85c59f9a5ec11
+0001740aad1de7f7bb72ab2b699492b5b6855c1bb78562caf497ef78ce8ac3fe
+b5f05639785318ce1b7e9ece0f28d560dbda6d134ba8222d94fc98e1910eabb5
+b8ac30c4d0f2574f2e83f309293c3530ffa08d140c4b568e1868c7b5b3edc79d
+716a5597bc45616e2f11b4caa3e248fb96d9e84afc205280fcd76842b913fdb0
+d22a1c741274af30fe94c29a2c690e4e32292220e58e31e815000aadd624fee2
+4d72625d57ebd75a24ead23e75889bf3fb35738516b3b77a6fddb6590ce59804
+6bc39e4e9ae32ecdccb0bf9490ce9c8cd23e997a63bbef088fdedfd9ea40f21c
+4d89f264329c674689a8536d83e395b5c17e6714cb48fc72a4879e525a954048
+595ef80d4b03d92f12664b841e00220e3a2c7abd65457f95d1d6b53ac96e545c
+25b8ac77d8549bf343fbd27700f1d5b344e965aed917c82211f723410c8260e5
+ec603111b03673922f118f1b41f1b436dc347909355467db3bf0dee4a7844c27
+5b15c9ffcdcf334ccde89fb61c58e42848582bd44e2833619b0ad907fdfaa8b6
+97a09f114e9e204db7e2319a41a5866eccc8665ef6d94a9abaf54a71760bcae3
+f253f7079fde5e138dfa210368707b963f0c4ad772d30e1b56b969d911192482
+e1c3484f52bcc8751b4c4a20430316d90adb8114ac02e8fa845dc66978cdf313
+4f1c58be8a9c2990a1dbf0c1151996d1eed8dbc6f35d4a0a5f44c22515575d32
+6772a70d00dd938360ef9940beec9ac9a9aa2143cc02c3c030fc6288ae783bf9
+e6c6a04cc0549e2e0108807b31acc0def31458a8b32096d5ec0ea1e9871db2b6
+35dba89e4b0cb6b965c48be61d891a0faeedc6ce4ff743bf826f524d4f313414
+9368b2da65c9c14546084d955e937ac3ebeb5823d90670e2480b29402d0db8c4
+31e12164912a5214b439d8546711a39648e652d68cddb4c4e28aec95cacdf5d5
+73a7141e0963422cd82cb1d4568ff99cd8cfc938614f13a5948add5d8914dc57
+ac6b916f4fc5fa6b0a42f35e7c2120b623c61a6b95e35ee2c6040654623d2e78
+f2009bc55a897e0373ec35427787370450bf03ee788482396b09dbe8e2ca8d19
+dbbd3d71115978044e3568b63fe15d56cc5b08767f5a72861b85262e8b194db3
+5e2bd58275c19de4a46f45b3ac0c297a9e1d8238cacdad6b8728fc1c3c7c980e
+49e05424f7cb02991dafd70e277388591e3e34923415c383d62cb366dec6f2f5
+da863baefbece4000fc620227cd325071aef5e62dc3e4bfdbd4915c03e686d17
+371c75ae25ac8cbc6683a378f9f617d19725057d84531c89cb0bb686bf9e66e4
+844fc8d6ac46b4c309cc74a1a948bffdd1d5d663672ccd358c9ed2e21e72767c
+16a968605b3c403d99b8bc2bd8d9fc41a1f30a692a1302943db69e5b9c69076c
+51233bd6963cfa363b280b8499331c172abef2000c09ef43f04db75fd5502a77
+b0c1027c3fb29456f60b56d7e9983e8574b1e75032b8605a27a713be6e0106f5
+fc61ff596c600275a27a13140056fca17426d235e71cb6c4eaede2cac9529d0e
+e0bbe303ef02bd6e4cf0446fc21d90079f91eab4484a9251bd956483113c5eab
+36e7b8c94cd0dcd6c5c82a082d335665b37effc612bcb5793e7db4a831b51ba3
+2b44f1f9a10027a92cd92634c93167e88b0564498af080eb0e1f92bac9672986
+ceda766c4d674cf74a1124f9aba60cf8074b493bb28cc379485fc6d11f050dd0
+80a6fb444933008df47b50a0214bc210090f9a0cadff94f254e58af23ed76340
+34eba92a70693c7288a79477d7e9a6afbe342867ccbf6b44ee7c9adebde42793
+e4a59ef5953d031f33fe4f12652f26a74b958fe4ced8e6025289027340bb27aa
+946ae6445d6c3f79147c67393cf739061c2417cf81c75f85be80c99c8f37331a
+e6526df9d46a11c3c1fd15886f07ca08112fe60ee83cea46016d15f68e64bb48
+167cfce032d138f6c124ac0281f297439995583cb9825547be0017918dde64c0
+1d78776bee428f7534f80a3bac7005aaeb2ab9abc0b534be7563cb582d298390
+f47c2e5a6f0376e7312d6d0093bf017f64f6697b18b9ef831b2a29ac630f80dd
+1d6cee9eba526f2eab63cd1a53d842f52e58df2815f07f166e7960a410726b4e
+b4437978696e134d4cbc80a465744b872bbf340155d9789194a06e891d1a1f88
+7a74da8de0065d6bfe492d1326910624cc8f50405bd9510c27dab17e281b462f
+7decb40932108ec5ad173e146a3258d88c43c9f30be963eefc7bfe130beaafd4
+98e339cafccb138f954576ad1a38c0f149aa852cb3f0354fde3c7949de59dcbd
+a42a73f39348a8fa776c27b5e23dcb6d90adf52289f3c84d49c185fd5394f712
+0d2c35f112a99197484795467b3215ecc0d51a807fc77d76264c305cb61377b4
+97a0f1dbaf69c35529584a46de46f516fd4d1a8172360bb1e1d0d0c44e158511
+87b471d543e4884c6ae7cb6f5618cc584d1e978f744b3bee0269bbae4dd4718c
+ba02513e332a6170d0ea4015dc74aec1ff63a35b13b2bb91233026504a8a328f
+ac1e11c82fe34d6d24bd5753caf5f0d8b83c945add3e7b36cd0aed086bcd0e47
+3996dd6f821236d36324e3d387ca7bf1707e7de378286a5065e050dcbfad91d3
+5c82b436b4fdf3736b422c00c6728583539527b554ef64b1c2e6a9c1d17e35b1
+3c58226254ac2a47dd1223193b4e1649095013734c40aeaffbd7160679f8e801
+f18376260ee6e393deec9e0693b4e6b728e35de36b1f40a6683f7e34e6e086cc
+9805432b4ccda429b0136dcb4115c56cb01fc85f333204e534fa17558f7fe48c
+ad9a89128ca6c821b01864bbb67062d5286283ebc1c559e5668e11f469bc7e33
+ef69003732d1bd8f0b3f153bc22e8b99a3ca9669ebc50526461fe3baca5cfa6b
+5f7962fbc8cf0372cc716062f29dc7728499c9861424ee92b094227303046fbf
+54aa62766e8c9eec066901a8a54f395beadf01af8620298cff08f20a455416e2
+2247b637c6597a272f7b0a28d616a82e234e49b0ada3999073e77b58f11fd0aa
+ef941d49f73e962e9ae57574d57fc46a6b3ba2547dfc9e9667c08ebc05c98fbf
+02e2e43bffc8a244136206f481f0d584fba9db1ba41ef8a2e4c10227633aadb0
+846c79c5d7049648f50528b5ad34e449540418ae28b53c3e34ae0d8867ac3902
+9746aca8629d847851a6a13b21e2cd95acac4abca1ccbf5f955e6749656314d4
+5bfa890e77a9fcee0d7d67b9a34cb2a140954678555ee64f95aecb843d32b4a2
+281ea103839fd3860ac5de0de726d02341bbec556d8626fe39e3df189c3269a6
+b73d27881d4bc81c125a1cc26b0c6f28811d4f74bc8a757785053162f64ec819
+4b9bb8300b7184699ac7edaeb491f1f7bf236ce695a5ff56bf5c1f4390fb3c68
+68fbe2d542005635927e401e338b6bf6bfc12702ff8fc951a22fdab1d720faab
+e66f16d85889d6a15586b2f53edbc5f907179169c2a8a22e747a12d1bba358e0
+b0fc014a1c42990e01d76268d311e05e4ce5948c42bfba4ce63f0b86e0cfde4b
+4be316bb2cebd0e73e26f446ca8478bebc132a064ed117f1a02affff29dafafa
+c4ecd8e8e32bf8128a62aae5e7f2d84e6b63435cf6d2bfdb918a5d28ef147547
+f9e569b09b50dbee423c1a7ee40355a1cbece709a13273cba0da2e3825c8a970
+8037c94de0e67d5ada84c0bfbf5b96c0741fa043868c402079df2ffe8b8eb03e
+2492ea5a6338a5deb290315e26eaf43086655014ba9ffe48f4d19e172f9bedd1
+218e1164730a81bbc1391615488c5b66d2f4c66bf1bfb54e226df3893a4b5a48
+2f540f19560d9f7d3b32757582782aeaf607567e8f4f0a0a30f976dca0ba5206
+02488b0b7f41861a28247eaa84af240a91ee8a4292454f7c3c05ead6f814bcb7
+84b96a394e834cf5ef4dbef50ca3d287409b060f767758d95114a26b1613266b
+6debb528e85d77deb7f3bcb8a572ea917bf39aca584c4f841ca622e6e06ff8f9
+e8970dd1c9510c1618d01e1af0baec26c3882b6eb80a7e8f945ad9abd60911e2
+6bcb6aaa5f0ce78068400f9eea67fcaccc763770ccdcf7477f32dcc49abb5566
+4e75f91acaea2a9141436861ecbc358628590b2adc5ac76f1971818a49383737
+9fd6fe8d74e76a367abb6f7b624568fc7a4e2132513fdb1e66e06b9f81067e91
+3d6d1e5d95e052d569e75164830c1cad1bc168213da1cd06de144f4c714b0e42
+34ad2f8037115ec2c1a8fa611ee4094accd1ac585bf7235b1f07b6e2b14111a7
+409fe76c1abfaca8a35436eec605e4b43760883b31c6ef176342f834647de59b
+b54c16ffe522bb5d71f432a253b966587dbc5bdf85472472d9111b8a23c49285
+391771f0e037bcb24a5803b323a27f6f0aa96b46f1c23dd91cf899bb59b2beaf
+6ba551cacfed10663e3e7c6e7dd856ee8a3aef30b0dbbc22aecf3b3a8ee10fe9
+873892898ceab62300309a4cbe779873fb3bc7784a159e02ecb484f2016af7c6
+bff8798c7f00bdf847a6fe0e317465343b4c1585d03f83f2aa56904148de6d90
+65999bb74ec61877d74bb895b7dbb977d88e55fde157d4e0176416b03044e895
+655fcd0d98ea455342ce0e27a1c71c9178fbecd2eb6c35666763a6558d297fa9
+9983a24384848911542f0fb3956c7c6761b7e2b8588354eeaac4aa145203dbc6
+2d3b319538af1da0602ec260085ce3256b9a0ce6be0208920dc49eb2954ad6cc
+912846d093aa398ae77075faf578d0c86650318fd8bfb82341281507691449d2
+b498947c9ac0c46f7676e0ec94a1a7aeab00dafbe8b1a464bdc9b41137e0219e
+9eeb5a8c72795c7bc34600c7325efac4f2cbf55aa9b4a996c42dbbfc0329a694
+7f9dd261330856fbc0819043b357343eaa1d3fcf362fbd0af9a99ad57c5cc4fd
+a10dd10097941bec739ba978da465599d16b6be018bf7fa1ee3ffff04d35db7c
+a7f6acf148a663f999280b36e51bd77763d6a6ef6ff28950a8d4b04590d8b51a
+dcb555cc47d92b21ad032d31cd54ff911516f356127e38f2fa9108aff32d2e5b
+1f1452901c38cccfc8f23122f4680bc316785e012f61d2ddb468cfa55ac91998
+93a8ee273eec61e760ac5097167994cb9f52e62182fa0845b2fa6779c914047b
+41d1a35ff4c499474ac5c277aedc0ee957400fb6643a0437f7f6eace0f512ed9
+3a33686f28bbc8ec68aca9a2bdeb407e975a8524ec3c068bc0a63ac6779cd84e
+1d46c983fac8c89073669d02af734fbfddec35e195c1444c4ca678835a54b0f3
+f8a0aba3f3b5db7cefb364f491cd80110b6333f061613b5bcb834a3ceb20d95e
+8119457df0838105bc9998b41067b9ce9612825cdf10a56c7b3af464fc4bd133
+a9d9b14bbad06ac3598419ce3537fcb383ce9f650bcec756592bee0205e0ab71
+77b172fc8c15425359e43af5aa75959561e3b0e6ed08ded9da737f3181218d1a
+1be1044211e9d9fc86f23f48ea8dabeae2de9ee4ebca14a734dfffe643c55875
+e934dc377f170ef8fd4e83b1ea53026cf1343dfff18fdf667bfdcf21f82a5a3d
+d40d34e7c3090e76c1dfc01aa0194721d9a0a3783dda58edcdd65a497718a66f
+658a3c0dc104bc44b36a4372794702baadb0f7cb1594598414d5eaf0369405e8
+9726efdc14ce04bfea94bb1935c4d07587400eaa1d565714a33891f3e64c1d25
+fa527eea2ef14dad353c11733d6b0189dbf7c910601528d5bae1f98c01c6a347
+47b9c484e09e03e10e13b5be1d22ab7b8906c5e41a0b2ebacbf640e187468ce8
+af86b096de62d206bbc54492431b8728c55249aa887c01a82219e62e17b62eac
+82a7e09b484eca291295f575593607af6373ad85c692e7130a4b652ae5a706f1
+2457875d6098e477354eb52010424e6ecb1b69447261fd1b1f93e72de04e3f31
+7dd7313d7bcd5afcfff4e0f02f7e2dafe2f476810450fa2cf4daae1f85150f6b
+df4e5e7ca6533523dbe78054c7bdf73b04c4b562fc75fd6f6e2f9285410fb08c
+7bade37df9910ded1d21f0543b24ccf0c1c984a4d7811b8dab97ea56a14e9028
+999c9f71c8ee8fbcf78da616194678da5311ad63acafee762fc268fc2bf79881
+60f1a3a61ec3467956f15085c1808c8187ac5c5cc91b9165bbd978dd45d2c100
+de3fd8533581beb1864ad04e7dd74a016dd77520d2739a1d3e9524c8498bdf6a
+d7e9e0571c5108c7c7870dd240ca2a53e30353d7bf39bf075d3839681c1f8eb4
+b289720980a1d3ee6c5bc7349bfc37345b1ad0d770bb12819d72834cbe2670a2
+7129cb9f51973694153d80309e5a4f6f3a0476025074c15b091989d0976b5e15
+858a83818105b144f5097087f3219bcb26b446b033510a955c891a501983b25a
+d72cbfe682ad3b64c90853163504c4d2872a88ff8db26c3a62ac564d49eaae00
+c7f92cba1712464281b4100725792f62d16981ec1b1ca7a7c82ae9687c326ee6
+36ff55fd3211461deaaff7dff6bc94b248ea50f86a39d5edc51572afecb891d4
+c893dfd74fa47ebbacfb0d4490b5a8c012db8a6aa5f4531250869150c1c25fd9
+2769ee82670d8ea963329d3119005d280dfae888d29494533edb026fe0f11018
+3bf246ec4bd9f5c0de7dd158895ff40b7c2fe9f8cc537d23771cddd1bfdc171b
+72d58e2fe9de17cee61af288318932a6137f976d3804e2fbfcfdbf66bc31f435
+ee1e0dacc8599ef22ec48010d4c79707118da59588bd89557142af786ca66ed0
+a5a2bd6424d137c2352a0fe3ffca8db62656d143093f205c18e8dc761448fec5
+510fd026493991ee9ce12f4b2cecdc157f3bb6bf46509abbdabeaf66703a6a2e
+616d5d15f1145ef8654f810b2e30158cc883f04d31798672421afe80979630da
+fa9c444aa6e4b242c28df13c80d8799b8916c9dad6eeeca41ca24cbe3741de73
+193674f95269bfb2f832513d434c34704365a3aa76d3f6fae51b8d75f4460df2
+95b64bf0668fe311f78177bb0f560dab089ab5a6fd11ee9bd6faac3e6c5ee08f
+79c94b34fe82b1a2561000fde54d3b8fc1fbc7d82392690b2216982e8d9b09cd
+1151a8aae36231d9606f2d737dbf282f4f685698e48698815664d0a4eac63dea
+f0d58ea4edc1ef27ee2f4995e0231c246aaa5e212bad9a4f133f1752140cd8bd
+7e203b235b3f54a74a8c2d8a4106ce38d558d3e9061c34cbbcb5d133820cd5ec
+fc7ad5c83bb1b22781bf049a9381bd3743c6ff79bf98a25fbd361dfb8a7facc1
+708d075739668598c9d0b597a9417849de1e8169df8ba2f2dc6fd57d7d07ed4c
+bf6f64734a56795c6480216208026a24e0272e871a44752e850892e9fe72b22c
+15d83271bc1613cccdf6616838668fa293c564f8dbfabfea0305b7497286fde3
+411e00adaf00fe89f1625c57ac1121927000bf28cf712e55b2a717a4f5d2db33
+c2921df3f6449bfea10d566ffc096450e78807f7611e281693e30463d32b2135
+4d94b8a6d32f158f1053513eea31213d73dedbd3db635e0497bf3ff4876049d2
+922e0bf8a8da35e25d19b6b0ce73eb7da1402b73627e90ba89877bfc16f3166c
+5a458aca38c58e7c652926c6547d018e109c4fc5c9961aefb4607e48b0c89cc5
+b373ad46dacdea10a1d503a7496ada54d41c342c36dfeee1dbbe8e7fc3664460
+6860622ae1c90d5045e3a6eba40df23d4eb867693a5c3d25ea2e1c31d8d9e630
+b22140e1078d577df6cc81b92bebafd700562ed45772247a7edd7fb4b99db8df
+6aa8ab82b059d995474744b7a7bc637a449cd4175d19116cd1e122beda56868b
+f904ab38fe601ee18ac0d56afaca712d10c09763cd21df0b222405160cba40f7
+a1828fae4db2edd32a8e2c5c173434348271dce53562d1c7f96264023f4e54da
+63035f84596d3a2a028b4692ef98b3362258c59996c07b04e83b66d7e5ce103d
+2352d8404e32c8408a5b05cf150f151484d3cd493f2429ca170b555d7d2be9da
+96212b3b60936fa14a71b72359b03bc93d72f9018aab793ea640582b24109e63
+5bae72061eb66bdc9f28a9c6ba27caf470e05e41dee81b43ef660d5baea7463b
+d36c47bf900b78f8053cdc842fa4c642c5e313fefa82c1aed58038df06201027
+79450a5b69923a4057d090544c8b343d45be71ecb3564b5ae59e18685679c804
+3ca2680a60ffb8dea818085870c75b54014fb031764e95b666d6ed70b3711b9a
+012479e72d988d5cd8f8a95c3d923b9ea9717eb15c47885c7cc5ce411d4adbf0
+8cd49e76553efefb04888f85f17e6000c0d1c3a875b54ff0aa1a85bf1ca4dedf
+d0adf53da875eefa66319d47b8b7af2e641dafe9466a8a1ee3f81458359780f8
+4037e4c647a86cc2630a6cb49675ffc1dc97667a589df4e77e3cc5c41215c16d
+43691a68f62e779eb70af689ba7770ce5c2f6e060b35c7289e3fe5369ea79179
+8bc466d7c415a0c68fdccdf5af35776cfc5074a92a8f131b5c2423cdd13315ad
+a0e4969330ca8b505c0d86efcd3cadb7f5c77c2666dd9e89b9b03023e1db13b6
+34d442bcf0e3df94c239e06e9519c70632788c64bc9f4c0d92be238be009cd8f
+c8765e62d5702bd31435c9eaf5f2a04d3e2cff1406337338821096da07740689
+68e4918bd0e5e26d0404e4a8b0169ab68b2980d2eb8a5c1ce0a8c751f5db447a
+b0cb1f731aa4c912ed0e07c3fee570ccc6653b649e6ce447bf2fa355ac39f692
+b54d744d5a6c1c03249e03b298301941d89bf065a2b30a0c3aa993ad18eed0b9
+cd70955aa7aff8003711178da2eadac58cefc9c1e0e4fe7ec10ced8be8e1b40e
+56effc97fcd8c1e68230a111da8d36806ff8c9bac32c879fc461c4cce809c49a
+5c489b352f86456032a19b6bed07c13089bf948d32831f2ed25c587a477f21b8
+ff3bc437460438312fad6141cac9311bf29dd9f221b7a0cf442b48ef64c810db
+82a097530a129f2e087cc45cb96d8e7a9b3e761d3f3ff61f8f84ae47d6a2407c
+c653914a9c1dd0139f299c84f5f964e6266edfeeacabc4f5fb89b9189b119ce5
+7c8ba8709b3f3b73e9e152de57d9be8c3a339ee8ca40c1bedff6008c158d777a
+611b1f2a7e8ab0b52d211d7a8998f6cf2e59d5b6ed0f0ba65985353d2734f025
+11d235720b0860e35cb63b65657f2c002fa54d6ba8054cd94cb450559bf18ff8
+41f886d991d1298cec09ab4bff98440cbc4977521f74c2c1024eb76c6c827b20
+64af83474d982ef71b5b4d10ff5e99f69943d9ac4cad444fe5aef239e51d0bd9
+2bf89b9aa0462413961b459b1d7fe25672cfba44da5d787590db7cf6f41bf8ff
+f568147f252935fe642f45be670a1f5ae82a53d6e850e6a0d7a37efe8b6c3384
+7df10e6dad855b05d8cc56db3d5b457cb44ba2061ed18bcd714b6ae4cfeab6c1
+f44a983d3b09fdbdbcf49ab4d4328aa83bf6d35136cbfbd7d9efb9387bb43859
+82761e4dd9a2e8af77f8f975b08f158dcec98b861a7da0da7b72c54fc7f32ded
+961d8a402150fa9936415195a5d45da466d90bcf96269b77a549c615291b4aa1
+9387d40c6fc1befd017e98de8f8353e8eedd53e13f858f5b428d8d481d43b23a
+34cc07b024e84e56ba46df541baf7ae5444de3aa77a387d27d5149ba0d83a910
+44f1f3692324fb3a7cc2adb22d5063e5bda1979b7cf64e264da24a21c636699f
+57b75385698366c7a44d025c4d96735ea99cc446bb20371b234bbe531aa36e4e
+2d2aadb8e6282fbee95b8b4b71f90f2d7d6d38c9030428b0ff301c8e6620375c
+13828b08801a6099924f114fd3fb26afdba9100caa7796f312e5b98b9057a932
+e5789fd8f710032d29b526c9df47af7023d4acaf512e4b7f4f2d13827e235821
+3c4a8e0224939013a38fc7d73fd599b1a7f2fc9e314118864621981243462328
+61e1c62f8ce1d4ce8473d8dff76600b670e7649fbf8422d09dd79b80526a6284
+e74b3d04f1ffcb2a31bca539a25b64754f893b9ad03d965b5fdab567cd967320
+8a1511b9442f896f0d5d5094649b6296279549ad3699f348796aed2316194404
+e0ddb0d0f89682de1648f4675c2d8db63b68cc653d390fe2333ea0829eedd9c1
+b6f6a945aeb5ae4d7973756eb8297231c9ce5213446345bc133ce5b1470c6b79
+063c8877442e16dbda8de7c5365a9c8a91a8c9c99767d15acbcc2b82e54c8784
+7c93f7a51f91c2dbaf550130ad4dad6896d9c1d905aa7746d7af81b7f22e4e9b
+18db615cf7e7bc813159f5b125fea93787fa42db2b4602432c487bfb49f29d3a
+71ce1ffd9c30206b294f8281f58fbd27218317587316c308ff6f719cc347dca6
+49536a86205c1273edfda12610b212f375b91a841657a3e9b9a359d398edaa43
+f21041a76f2b2249e0f07925a996b24d56bf902cd2e6a2ea2b21c1840c0c1a2f
+85c98789b1438292bc27dca7dfe417258144d267c15b53532e49023d620b4471
+da5f47f99ba092cda984a7b9bd308b65fb0dda4c92cb84fca3e5086df0100ff0
+7a031a99e1b432fdecbdb2136e29faac53425c65cadb7ec198da5cb63f6e652e
+c84866add1b4f754c639ed962928edbfeef1325fb2bd80f8624ebc1465fcd609
+0931ffbedbef0aab40593c54a51d44ad7491e07d443ee0ca86167233de12657a
+34a84d7a96e9b73698356f5b7010eedfd0190287810dfe3bf4b75dd58e98ce98
+d10b180f754b686e8ab4c621e4684b34680d062bb6e93c5676f9637d72520771
+82e1f2d39e889b03785b28928291fb0997a2a859c7e732b27cd15ad1b70fd13f
+9200246496651f4d5580c0372a946a6a272c7eae3b071afca478e5f23e95f950
+f58ac0bdf7dc5e4ef0616bfd8e2b51fd5d2ff5ac5a816c4f79efa4a4435ff54a
+bc65250ec3ba0671ec26fd1179edcbf4198b5dc25434170efae9f03b5e6da69c
+f9d7c08f7aecfb5da7e493708e51339a7ede11d3de96e97300f97b550f84fc78
+175fa0d6ec79c2b29cabba67356f91f43bbc1bb659dac336d54a39eacb36038e
+29f8c412a4b8ba0272c2e0bda184577d41e3e257194925643c04ced8484e7f3a
+899b12a5d50b058f62578cffb5fdd06eaeb05def00d246c2a7233629efe00e24
+1d5a9e8bdb053c506cf1ed8d8305d4ad7bc7575d84fa8cd1c135a6e69ac8da9d
+09b0115a6110c6df36f7bd530e6f01beb2730acffa423c64537f419bfc76e56d
+099a956ee260ec7848be76d4ee19d16eed24b8f0a3d8ce3df142125dd863d00d
+8ec3a0b843378fb2c3ea865cae64914acc78f8951503547690233b4541f3f07f
+a38bfb69c3747cec408346d846d9a94b5e259b51833e258f78b8d56562190a80
+1e649a8ba76fcb180b6c93925e26d258c7c407262739e0252e1c41f4404d4e85
+458d6c0c821b6b5f099628edd92ed5e49ec2e72c3429ab2f3e5745d42d2e2d5a
+8f110fad66cdc39fa4a5cbf520130e2bdc9cae5b182e4d06d4e14caa48f035ea
+f9661ce17cc29d4c91c57d757ee5586400ee768b901c4fa51ce00bcfcfcfc5ce
+1b2c8a7dc2eaa4e4acce7692f00ee06e6f9ecc8be980cbedeeefa1de4571dbf0
+2ce7bd33eda192d31d31befeb2af77c43795fcc79b8d8f6cb0c693d3aa6cf49e
+0f3925aaa9f1173ef04f03d98e712334039fdbdc37308ffce34b411448bdca7d
+cbc32d6da5087c881d55e98f66f4679955b7a93c02f6b2960052319bb62c4063
+865b82366471478fd4f07b44d6443e308f8b2296068e4a32301cffa189a2a287
+74ee405234755f042addeee91b058edc49d37f438bb8693b5c8ec0dc84719b27
+c578b0586ee86290d38c1122da90e89102be47e53ac93f3be3fa55132dda885f
+4bccd87bdc334c32bdeb08933d4a5e6d85fd678f3858cf91f2338207c490c475
+7ce9d56960d5043b8c6b373bee6c0e173e6b3af58578fe6b36679793f07aaf5b
+388c7727d8e04a6f0076eaf9095a3ac2ca87eed2bd7a5c35fb9ef360158b0f64
+48ff114f281f2e8844d0ac1eaf0d3436c5310e6ae25b11e3740cd03ec49fdaab
+a40732a5bbc101b84d70449cb1c8880b0723e07bb2ef63bcc66b95aaaa03ad7e
+c163bb5e98ba3452d5373fc320fb774b13861b72624b46f92178c2d6212fb3e9
+abb7827037747261fbc93521cf1ba38a47a44efdbd6223a0f3f929309cd4e160
+83588b4ac6a9b874aea87a69a8081c5b6fc2f2f70a6b5a086493b644e5ab1d01
+31041fbd60c970f675b13a311e48b86425a83f68087dfe05a6aa22d6238e3e76
+d31d029915bd11d27dfaab5a3ae95e04ca156d2a600166616ebed20132690873
+8fd58eb219a91830624f6c1556436d82ceba3293b1c742f29fc5896fce7d9e54
+e1fa81bbe5b0ab391b73172c7ce9b1bee7b0784cf4495bc6fcb755092a5f2327
+c164e6d783be38ce46375f27afff4ed0878f8eb46634b8f0d84df58a54226d5e
+e4d25edb042bf51bde2ab6c83852c628bc95fb10ffb4cba46678b30f7b108ff9
+3adffe98f6adc255bf4b0d323dbf68fd559caaa55166dfc4f1987508ec46d6c6
+f1db251152af4b9366b559382a3741e8fb0383eea8deeb6b4ee9ac5c9cdad65f
+5996ed7dcc672c41852e9891d25ff257dd49989ed6eda6b3e5f762c930fe6d39
+75b412254c0279ddcd9fc664b9cfebbf06c884986340fdc76c8e4eb560300943
+3d2d96a10f09e80ae7b2eb1f74d82bcc9e16fd11617663768f5f51dc464355ce
+f33d0c912abc567c2d327b0bf95aac49f503927236814663541abb7c689365ce
+75587190537231e16c0d049332d3ce07562cea63b3dc191d68e86824b43887da
+4dbeec79ea7b0089f9bf2e61248ad3d27bb881b704b827e303c21cab98d23447
+dc20818fe8a249bdc03d772aa548f6c75925c74287ca9100e91ac1693d029f7d
+73027e8ae734e354f2828f18a8e87b13d803fa68e6d7c4a79333b21d177c61cc
+6097ca7ccbf700a75ca3b340472daacac6e39be45dd201f4517b22fc0acfd06e
+8920c858542ded1c95590a1b5814103c700c13ac904e7ca36aaea572110080e4
+0057ad118b690e48cb8545bd2eb99b06003c1387354fe3947eb5fbe0244e9350
+e7fa6e8da13b62b862b22fe5a28fb5f933d0d97d0e54d2ea8811762ad02488f6
+163c146a53f8ee78478ffab1b9e123872ee7f50e7f8b124765f3bad9c43b588e
+27c75b8e7ac979e20edfdd2cf68b506baade781facd7c00fe6c967d84c2a8758
+3a44c786038aaac152a10f82d5fcad2fb609f62c24fad60bbe5e8e0d3c3396f6
+3b00be25467570f5595f6dc9e53bd5a437fb7388acef7cfcbc22689149c386e0
+97f429be6c7ba8d70d8548e796192921b764deed94f5d4de9365d3535901aa91
+6081b7b548c3b7555f8936e343eeb062a2596b3065ed42f1489fe03ed0441236
+eda3796353e768a256f7eb8f6f9c05d9f8449bbe0a1d7e99519b7e119ca452ef
+46600b666c010d1f9a2eb21a66cff233852e8fcd21cd475423d32a5ed8f1df40
+e18b1290ffce0fb278066132598133f094b52988a9e3ceff74297f4bd6f8b8dd
+cc069cc7ef14ba3033ac19413afb7676de9a07a2ba70df9c96bd135564e7ffdd
+6ef470d939c5164eebd1d3824401c6e75b1b5695fbff0ecf5056142cc8afe527
+e260e93ce22b5e0098fb54ca8cb1ccb24ba0c4c8ed9ebc172dbb1b5755d34b29
+d175b739f71d3befbd43edd58f0b3b560466348628aeb205a6db30a05da09ed0
+a2a99eb5126257cd30c90758af231106871da538b340e7d6ce24fb0c43397f2c
+9dbc10f18c1839cc15c0e331deec3fceb468a9c6f60c233df45b0c53840dc659
+6a776c43976449b2cbe76e0939f060263cd00b837d21c32e1dd78d1b974fce3b
+e8df3ade9b4be5ee8c02bf10fc08f0148177e4b50bf6f1c98589092d8d9c52f8
+2ed71c6009abfefb3a2976e40e700a02b2d5ea69f59dc6598d46ff6b7e3050b2
+983a3e12acc618b4a2d369151b49cb89ca2bd0b150d6faa0ac681c932a7fef1b
+e77349f948e67596893acf953df11844fa2b074fcc8ef0b37e5d43a9282f3f82
+92436c0508cadf1b59b4e03f778dec524fd6465467ebe7b064ab2ec7f1e24a7d
+20ae5843b6919e1f4bd0215d91ab1ef346fd97fc9e4871ba30f83b06cdfd5180
+79d2926690101525f2361a54983ca427b4a7937b550aa9d3fa3409f6d4087cc3
+3507a7dcc6b5769a8023cc0b790e149494e0b4a62474fcf199f0522d0c0edfd2
+68a3b5b86d600177616323dec75753f4462239d88eb6c44827119de33665e57a
+a7a1f133819dab77d51b264df8b9028651050598ee266a645cf34719989a059b
+5493aa548ac308eb673f9c5edd38fac3997c4f7249f28883d763a6dbe8faaa9f
+ba42981773763490fd6ea356aabc5178f8e97387390910b3310bf74d879a02df
+15ce08929c489e7ab1b7fd5dba4b31f4d10a4d5d860b354549b948179339d08f
+09459bf54e119824e5a856cd287ee1066a69f78e0846fef677dcbe223357861c
+80e5b7f08bff3a08b1d3c18e0fbf66b43adbd1a91e0d609d92636ddc654afd83
+d490b7909b780c130d5ce89818169700a3ea8de81df1ace8a8443b4c365531e6
+ff35353f0923afa95c1c3fd19cdf0b9327ca8708ef9c891c5d5c96ea695d9047
+0ef9b222757d150824fe741bc0f9afa6ff11a882da853c1ef45a7f6936fbb2f6
+6efd8fcb33650ded480ee0d3857581fee0623dcd0207e6e708b19b0b93822994
+0151e373c3d60366d6a1b61f42ad9dafb751e557a7d4488ab09acda685610bdb
+4122e2ae576196f50c38a26a757b2b6e6ebb332a62b98c801fb67bc10a97df07
+f5b6ee43ba7a1c4583439a69b90f160a46f3cd05ee9d58774ccb8f11f8a1bf9f
+736579cf2d3b1ecde9546d86aac7e5a9602bc9cf2cb68dd3264a6b12f5d185bd
+10d2cff08d2ee240c3b2d4ae0d5f93e2dac55b8d3adf1166473119c3ea90cc51
+bb7f28012b48a63ee7acab3e774f043a008666af6d0efe9460c40ad82ff85ab3
+cbc09e4cd5867a52e25b1a72e678ae7cc06f6d8f913ac783749f30dee5feb866
+5ee18012b1c596918a5869a2eca7539063f16bbc2631f4ea99f041fc64b0be69
+82d3761638d1dea2ef828388c0629e3d953ba41816bb171d65e4b99cdb003281
+cd6c9b350577d2a922144402e90d8b2ede231304f055f7db115536c6fccda5ca
+a5f182bfbcb454c4d45dc9754d04a0e881fd03fed5383d8b30e8397fcef19169
+df94e71ba1689f4cf42e60fed255e8f49ab1c90a7148ac377807e088bf4a9110
+afb3a02181f44a7caa8fdc61d2fd78fc18883ef6bf006126737d5889dcba8e99
+7223053cf17a110798b1a1c5f319317ae63f9a6ad23eb6d47d61b34c596e37b9
+c1e107ba5eee08c98af96261458d758b9077c3874a4b7ad2cf2bf1d3a8f7abd2
+9533934e5f6adab0b87b68d953fb98e219f956ceb8f172f03286cb84384e9288
+6166b2b49da6e5696f042bb6006d942e34589984e970c2641b97fa88bc536d40
+5155f236de881c851a52ab869969a377433cafade08178b1d1133891e9df4b21
+f8348e0bba155ed17ed3c26fbbc282aa8c3f27192e1cba91e2c461dfb5a52977
+71874292019b743cbdbf11dd1a6bd6b7c1695f774a34f37748d49aa32b5ecf5a
+8a1a30e329e2ea9eef8f90bfffa68641bd11d749f5ba343cfdb0181a92ac9702
+97725b3968c8cd20a0af360e9b740bcec8644e4e1bab4cd7a3dd1876f09b6af7
+a90fa670a465949784201096eea610fcf2d5c15f57d39642bf0d3b246da6fcf7
+d01da8ce59b4d349ee76e8ae72fe26a170b2b320eb5d0a7d816488e248cc016c
+d9f4af759126fed20f54f6176b44203b3f1c248d9cc0e3c6ce05aeeb2d127183
+e1f89aad8ab25e5660ae88852b0465f2bf00f234aeff78a82abf21b3bd807172
+94760e71a0472d14f9d3445c24b38d72df442b8f78640c55412f21d6b42f7645
+277caed0dd19ffd5941e1a325aad194512d13e144259ae01fea735580c28c4c1
+48ce5ee289d8bc05bbe1323019076da77187d90a35fcc1d0b52e921ebef447c3
+fd0e445d5fc62c809df85bc141fe677098b65d78c29d9f279cab0e7b452d4490
+e93e6c3ce30c84ce73e2c419c91a304d0e265df004b549f73f69995347e3a654
+7e6a0ad2862de39e182bc4e880bf717643165a90b094ab19207369bd92fc3cab
+e1b71c496698044f2f1d2d30248eb0de57281ada534155d6991921fc3442c8e9
+0c77c1b1811bb3ab2bf9045afa0ef9f74f8577e48580eb9840354602b222e9a6
+cc9dc2c70f7c7e7ff18687a420c3f2a46680007c14d75fb701e5b8981f4e4175
+fc81d4286920db1080ad6c8d066ed15881d710952e5bc28c444448aad1df885a
+634ee6bc8ddb52470854ad55958e179f05e61f8151a6fc6311bba2419dd9a122
+93d6e5cf69411520f281b8ea2908ad8f4d774e777a633a8e9aafab363f426b65
+cd8889d109f0c0ef516da05063d1d3256250eed899d6ecbb587c7b2ea943127b
+f76453e581002ac170d6764cf3ef98ca600f07c75e2d124e3faff95fb28e23b2
+3969ed2b48b2be9b9c388660cbef5dd96ca0249dd307bd2044a5acc598aa0bc5
+73a97be07ccf5b6bec78d99b0e97238e550e4c56da12ec2657b6dcc9d9687795
+8411cf3d159f8796f6e9b8ee98daef301c4cd44bdf9da4c6aa6e50ff517dbfc9
+7be31ee0955a1440fe1cf27b6a708022104a9131d6ad031f87143394c7d21655
+2a540ddd9eb2cc438c06c9e38caa404ae87726a1edd9aaefa7e6b269cc543224
+35319eb5556497653b293197f1a5fee96c0c8fd7cefab51a34022eb008dad5ef
+e010fbea98e316dce7b94a9a766c121907be64f3759dee51413669aa882b454d
+51fb13a4b428d61b3506c20d551a6e96c1b538d6f10098abdc6fb8dd739cfe69
+512dce4336bd31eb5a626457ff6c1495200056c716a10c4c8e6cbf24e5a89a91
+a78d31db4b1dd71d65bb978edae1b0821bd3ba879a646c4e41ace1fb44d08e61
+1a9d945397ac69d01e8eb8e75fd60ca662ae1649346031ac32c3cfb352d84419
+52190ff0f58283bbd1bf4cda15bbd219f22e738d2c0a114e3d50f66f9fa5214a
+34dffca2cf6c88883b0e416196e49e45a513994ce8f1abe93591c2b6d67a151c
+820f1c7f4ec6a0531d2d13056f35c2c625044abce5111e3f625c09fa566c52c3
+615e8f83b28506f21ec2a9f0d93fbcccd3a2362ca0612bb8ca2123300786581f
+88f1632c5aa76dcaac69c8f0140b45bb46871caa9ff1c221dcebca18e506ea12
+c8ca217029dce549a4d34a58c3a5333e90286ce87919665657acec87d268c255
+36837e5b6cb6d46367faa2951dfdab709b2d2932f44561f73545c82e85599f5a
+8cd72bad593341e0de99b41b34f3e5f8c1ae749cc7e551f465da293ba7af4973
+35bf4d08a68e7abb0bff04ce36b4571b4212e6b98539da495ed516f0438baf8a
+ce13dcb57eeb473bec625cb3c5bc70ae22067e6f9a8b0f4b4fd231110aaf84c4
+a48559e8303e7016c0d02125d73c690abb75c178855eb2cfe2ededb11e76b06e
+6942a101a031fc5b110576389fbade6619ab0e05e20b8d750af2241619ff8224
+fd1396f44683f3735c0b83f93da04d435aabba9073a7985040bbc0ce5094ab39
+7579d5bf618b518ca8b1c4f9a8856c711aec8ca0609d7d338fc6edeb27fbb400
+db045314795a74317812652d0c1ffb1fcf453d5d769df6b38831c3914aa0d5b9
+ad41e0b7b9da3074043926028a84d1b09f52b619703814911710cd915e3ba310
+d17cd6d1e5bd4b7a9e7e3fa2f9d0dd50f88b50c895f3c7cea1077242cae145b6
+b6311f96996d437e369ee8e46d6680affb65c151541ce5e2eab2c851b693cf8f
+2b304d62d428fee0c99841d4518fe2f67ffd0a26934bc70b2d970e0dcc13892f
+d3b725ef5a946c273da4714ad1b2f4f54f1c257511770cb2bd0c010c3c8b03f6
+3190f52f50bb4db5aa56eacbc174e40452fec845b974920633f2185bb09beb6f
+f7f1be65ec2fef9d10313e6830db245c9c976784acd842f22c9a12d51fa47759
+d9c0db2858e0ac424e923a48e89eb55b4d8ec738caf394d3b4761a1370fa496b
+6d318f951299eccfd3de0b94ac27a952911e165ef590fd2729cc2cd86e0362ff
+f5b51dac1c08519ea8fd5cabcc45d1672f3f04d1e463acf0bf4125434e72cc76
+e900f78a48609069187cc80acb13d0f177b56280d468737cdfc77501bd9b4036
+fb146ec5319f7a3d828d5523ea007c9cd545ca043bc48f174f72bdbbc984b40f
+f6d51401d414fea2bb1ed31761cd919dd49199c0e0d0f1ed1f00e8c3b59659ed
+55a1bcbc97ad9195e1104af67d4ca355c0c37ee8fb6ed7be5f5ff6a68cc2ddec
+49cbbb71871262c4a1a7cfaa39aa6c86002050d91f7cc507715fd6b2d3777d2a
+3b9074928121dca38c6934019d4fb8401c4c2484dd0c0145950067025edaac4c
+67a0d18a77005bf9c9f953e9e55344f449278cd75a65a3b79071f4c3f0431c82
+f9fc739fc4f3e54611bfb7fca635a02492dadaccd7c85d8a4465aeb5285620be
+fc6180d39c44795748f3fa23b9de86a548feb40bd8658b4adaf79ba705edbe4d
+1e5c36ec57d22a9c8d64bbc765b504658c167ca8829e60526239ca6af7624781
+2c3d3b0d06f4a51cc6d8c8edb841bc0a5ed2f1ac4b9fe64e09fa32417817304e
+bc2ab036447956eaf189ec62f0e415f7020da9264ce26c5dbadb6dab9166fdcf
+56e1e323947513da6e14e111996db6f92e93c429cc62d4744f9ea96cc7c55cc8
+f1859730327991842fcc7c2f2fc74895ec3974ae60a1b3345edd7929761b6338
+5450c2927d83993844e156ecf5266e8bc5613bae81fda0a628954e111db74915
+285e808bb8a4660c098b60f251ce38512910d17628131476de7f1ac985ae1fbc
+a382688cad091dde470d6407a0967cdcd26328fa9a28952ba14fc49af8a908ef
+82cd09ef940c6f66076bf67250e40b19a1e9e4f164246f6d1324c702a59c143f
+53a829d967d83e905f49fa3a64a2b72689d35213f3ac78f80ae21fa415f2440c
+4bcaceb6ba89836679103b22bc93a425606d83c43fef202e4d6f20530da1ce81
+2963064da571136d79edefe79ee876a4e01fd64a5466315ecb61832fddcff2c0
+73e6aaed9940bd8d28eb78f75a04dca7235f8794074ccb5b2b8e5099124b91c2
+047aeeb70e8fc5dc8bec6e18376fb7d5546edc7bf20671931dac014c6fdcdb35
+43d15211873ee65f793aeb3291f3e88a603367f5beaa7ee59e862f54add1a819
+1c4b38065adcf525170842879e91529f35bc5f7f78e58f17f870dde83938c149
+b9d15b3e8996fbc2429993e05683a4c7e64f7bbd5a7efc2c9ddee24ba3f329cb
+0a7b32180e73cc1eb891104bc8b0a294816011bee7039c6fcec289e625c725c1
+546ac9b505162aa68156bfbf40720498408809e5312b4fcb1505e42effe3d3a5
+04d792517c2b85388280567a1554181855fa60e250dd91af20b44bc17931fc52
+a88f9a9eb5b8c1823ae73f4a7bffcdbef86288b38efb87dcd76ba02bacbc8349
+3613b0938cd5e98c4f3966339748854ee61bc5592ec209de1759a50663bb3360
+831bbcbe02f72cd061ad784137e2480fe026a9c1130a5a557062d72808530bd4
+0b470f97a025ec3b2789b6274ef44b92f5d7a7f138683cc6dfe03e0cd78f9df6
+5fc8eb68eec6f8528ae8a469cf0521062ab95a4c7997f38969541cdfecc7f89e
+3263cd46c25cf6b7cc64fd20e741017b89d0298e2c55e9b582e6afcdfa1edc1d
+fc65f458a91007254db8a33c38db16db0fb35352d54d9c88d602caca571af64c
+b0ce3b21689d64fa4561dd65be69b6e8fb81d3b2e32f7aba81353cb0f583f90e
+57df42cfe601d5c05df071b49d4bc7a45df5ca2eb8a1b547d8767a1c0263b93b
+e41caa3561b425093e8c8a44034d9553d96fd11e72be93b81b975533b30530f6
+fb7c44a81fc33028d1474d6d04ea1e8863403a4f27da27dbdb37f2af7eaba079
+ac68f395e8237597cd822fed413d10e4bc700e8e3409729b51ec700b17732149
+742fc60c9f5b26b11aaf47d3e80d4c671e5bc0511f8bd6e7dbd28790e622a32d
+15e9cfb4739f4c6d67c8dbee302232a3fc9cda721102dcdda24447202601daf9
+f6c374b9b5d687d06c0755df942e51d5522b896292211705cae907523b9e872a
+04f49baf43d89c3a4a37cddba1d3f20301666f7bc970b72f5cba25029bcbda99
+9afcb5df7a9fca9e11239902bb4b2e4609fc6fed679f9324c16216e4fdce2f3a
+50057b1e73344eb5a8b739788b30d3c4e3ed6336c95c84a2237525c33e59dcd8
+4a08ca60d031829e9bdf9a3ab6dfc6f8bec79e40cac1e69ff6d5d2ccc9c65a38
+bddcc8526320d847d7c6543f29f6f50959efaff66812939136bb69233f36d376
+c01c368e7fc20fe2afd1192229305000ab8c2068d8d2158878144b545c2ae572
+20700483bce6259efaf2cef4706059847bd721da53a0f842011e6ccf8c2c3ff8
+97a477bf6dc659a256cc73f4f3b02f541bffd23439b12520e45e1f731e06af12
+0c93c3b21993d1cfee5ca71eb495e705a830eaab201d4ed332d65661cd38e493
+039f250a3ddaf8c3a88231fb9a92c72e02d50159faeb9aea556c89017a8703f4
+f2bfc73d0a40182597a260cfb29c7cc946780548fa1fbf28d35a93a2393a0793
+1c789d864ef906249c1d36ee78a62512e29a9a3f970f7a1be3e7e566206d07b5
+15135f143706e0b713591524dd318f1b10210cda652d5a6cd43e4e4a1bb0e855
+26157e515df835a962e7fbebc7f51a74d5224d20b5e0472ffb65913d8da5900b
+31d90ca409446da57450fafdda1b5975d898b4ad2cd43b9d0660aa81417d2847
+d4d0cf0c9d73ec645e61f16b80e1506a2d2ab8f87a1ae7617d7fe8e5caba611e
+ba028b2036b33721f78dd420557254b02c071c99fe068be1430a1fc3a29ac15e
+37097bfd6ba1d7f095e98874ba909a6a58a419f82545c65aa70f5f2418fea14b
+1dc7efcb3144c4cf060e6bcf0bb68c3830e09d069e83f830e6e4cabda75e9cb8
+cdbe388b0a7c23f7e62a4990c705ef96fa6d95ecfd38b2575b0be70d0872509d
+d66bf4e2951121cae49c0b21a13685782a2a83a1ec70bc987bb9a0fa8f41b273
+e071a94a9fa55c8cfce83d1c7d9b0549c6227b8f8c0ed03760f5ca091c29a663
+749627d4038021a7c90bedadb4fa40b8548126986369e04f62c1b9c31624ff89
+debef79c9ca9b8ee82c6db65d8a67fd9c6fb4463e956a1d7120a5bf735902327
+6cd611fae157909073a41db7f5586666efea0c0ee7216a8a5699102ecc251f18
+f26c6630cf5273bfc9c1a27e6abc5156231d8879c0d1d767f6c86e7bb09829fb
+6b1434eef852c1c72751010e25f689adadc0e0ec47fb9e4515ee95bb75a77271
+0b13290ca72e10d1ee9ee35e9aecc6f32c83f2b2eb30aaf52d6948bbadef1b58
+7092fede63953a88925df565bbe37456e085bc3c22c2b340d07106ad7b699614
+f7e74dcf82bbba467ee87152378a4ffb6192fedbb103b9abe1d6af8e0b84143f
+f2da81b8bd16f4b9c110602129530d051a23df6d993e5f0251429a9dd8bac65e
+e13e0ad97335e389f3bfff17b562ed1526ed4ba8f1e52450de53dd275acfd050
+dfb13f167c1f18ca022c2b6a74cf496999b02ffc072a6aa998e386cb1418dbbd
+c30ab9ee4cd0ee2f0b4eb816f7cfff1916d0cc8cf278cc8a1ff0501f48a46b6e
+8dea7d7242efa272bc744d96dd89c2814c27417ab2d6ed7b765c02d8b9a1403e
+3ec34f94e6c198994da83a17ebfaff5e310140b44f9496caffedb1640d85d8b5
+d3e2b2b5ce786f6d910da398db88738498eda315c4c84acd1e3534f6612b1c41
+a27fef1368c001a24ec8b5ee18a9e0d84c6d79671cc362b0c89217158b930cbc
+c852b3ba003143a4a945aafa7d9c060c911722bf05018898840e8f72f459ed72
+13d17972624f593de7d4574a1a9c7e2590cf1d17c5e284021472e4c16fe656ff
+e0cca210ea8ef7a64190c489ecc098c09ce5d0fc6700ab2b4ff0d6dab59f37aa
+8962226106bcb7a416c48170e107f5bea3fc9fe680ad4a7858be6f1184bf8521
+4eb16a7549cabdd7fc6dc23c62f3164728dfbadeb65487fd0b979d3ddadfae17
+06cc49f9e781de915ff8d88ae280986549fd6e8e228940aff26e1263879af4d7
+228c6b84de15ce2b2a5ea3d3771bf8e95c04afa2e922582f3b7b4aae3bf322ff
+30a6464cf8c3dbb95a21a4f724c4e59d581a01bd6be1ec8948f82365125cc16f
+3caaecb92d36829d781ecb3b6cc69c70b28912a75010ef84402c6245a9013d0f
+7f24bce18f8d73b5c2ac9e9d91337bdde61801fde21bc848876817d2cdbd500b
+f745bdff95fe3e4e3751b157a590e88ca7cc089ef91d55757792019742bb9cf9
+000b47a1f0d14a1fbb71b8875f7069f246ce622727e771363475a132909f2723
+9d4782bf2bcb24db445a975d7b84c0c0668b0dd8dd990583788bfb5f6a4c853c
+32bfe6ca6718801b712e3eadccbb086a9245fe255413893f64a6a4083586f476
+c66112c90d7f9572e2ad81853e8157af2bdeb4d0945c02c046a1f0309ca2c93c
+fae5dde45a34e2d6e27f28af0a606c854eea86bc0ffdf96c77df1b89b39dcb75
+a49c09b7047689abe355ea5c2db4f5ec9c67451a4a3b7b92ba4a202b96b1f314
+ba8935ee7497f1d4375fe761841bbed442591f8154a5e9a62cc7091d594688f8
+70f11412ae503e594e26b3a55d6ec4f24b4c3697343f22ef816bd8fe8d13acc2
+c7544368358b2dc55ec9312ec58c536793ad6488e7a410427ea80bee493881e5
+273efb06078b999d66884513052db33f5304aa8a5e35f2881c3d7a3400fb6302
+9997a24ae45d0a092bc78d0d005da85969615da06213333c212cc42f4ac43902
+750caf338f4cb0c590c4d5fbc21d676c5b5c39e1cf9139ac9b66272abf97f0c5
+863f4a4be9c213b2b1bd67aa45b917d919ff99748ac72fa997a52d5b5958b38c
+40b3b89322dacb31b2ff49b98c2c6a5bcc5d2e26ecd69659bdb88ffa1e226a74
+d4810d6f0a7602d79992067908c058016b9d0d71c6dbf7bd1d13a2cf2280b7d1
+c5e53ae86e6480fe7fb57efc26de2df4cfb7afbf0a0f6fa6060f0b2a3d1c64c3
+cb9367e1f54d49cb808c1adcfbef9b278095cbbd2d3720f5ded47187106ae1bf
+becc86c6676c98a95eda58cad196e2da2bfbb8f11681ba95207df27dda96d8d4
+9943d4554ab623396c271b4a087a3693cae43f944a00bedc65e2c724cc3eef22
+0289695379b2bbfc594837e20963dfd0cf5dca06d8b2452be1fb37fdec2229bc
+e6928948e26596437978defafaf1020386c1523f047ac699802cd674359b35fe
+9bb4dcd3e2b60b54c70a28a5bb780baeb2a12c5e333fa7315b38eda4d03af438
+ed35fecb6f50f5cdd3b9fc770fb3bd6e3564b49737dfb730fce448a1ab008366
+2ed9113051be9589966ec890c750df83b89f07e95a8d34b9970503336941c35a
+fe2f09432285cedc586d70ce35ef5b6b678c2f20b5011e92d285421272c052e5
+4bac78ffdbfa89d1407572c8595e274244973fc29f3c1e3a85fb63ac3ee099c1
+5cae84c945970fbe4f8513055d5803139b8207687d2aaf9eae9f87f459422bce
+6fa9ac1b6b7cf09b8529b93b31abdd91a44278ee39faf29974f34ee4d787ecd0
+e689b5076c9113e4242c5e62c01a847825e402376465ba14d12477a241779bbe
+659eea57ef267d35ca3c88d34326028bd24747ac2cb6fd04e556a99f0bc44d8c
+35137b165465764bc92c9ccb13f77462fdae83fb68a2b36d70719346f56e79ce
+5271fb10bddd68982938c5a4be1601b16b32af11586fac8299a76d37ed286643
+18c06a87721cbfa8c5507b6b40458afd111e0945077f145cbbd2137ceeeac951
+5295ee98c1747f3209f8ce643017911a30a0d184889104fbfb01f9f1062af6e4
+b05b489302bfb2c8ce55839f7d6186b081e9ace3799cb323894e9d9bb59aaa91
+a7d78afca8aa91952fa5cdd1c76f602c95c31d5f83470c62e4fd90fc59f72b92
+2fb22b1f4414753875674e00ec274551d88a5a15341a2f98ab8bd6555edac3fe
+c5415609051a1c0174e69929fb164223b6cc9171758da0a676a5a95986229dd7
+bbc4f2e3685bad35de0cfe6e42dbc304bd763d8f1fb6557de226e00ce34b6f26
+2f7e621342a34409b3390c4b81c50d1de3ca485e1c56a61d6d13127be952cbb4
+617a079b3137af9e35bf8a65634b212199e232775d98f937d6a8bdf4c8aa233d
+5e598dacab2e87363acf2748ca7670fedb4c7f5ce9dd007a0b786e4619a82cfd
+350ba74410e49e93a15f1046b34c2014022ea2a44c31ca910e7105138c60a289
+a1327aef09a7e4dcd4b63ac29038cf2c57c5440a355446fbae9c90686493f055
+81a1fe20b5a1d9c657ed6c3a0ce0d363c86c5d9bf5a608e148d2e512b9234aad
+295ee956dff7ba58bbb2e2b62bf4d86099c6daceed8859c8f666f758e5533dc9
+63a98e679be18626d5cd0e04f2d92922fd0b1657c57bdd39e85adf80019953f7
+bb5f5c4b7d7b3df072a764e6f1e41ad3ad10d23386ab594cfd17d330c9341e39
+e67ff6cfecd3d7e2d4ba48ffac38572b61bef1f6ee7d631967a357b6299159b9
+a20dfdd3aa5b2b7edb1e686fc8081106912a5524b234b740a627741751ccc556
+ddd0424f5491a7a9101cbb197b99e3e9833790f8a7e65b4086e3f6014f0aa6d1
+424e405a5f75a55bc7d55374fcb4c1f50153f6c3bbae87b0f3af8261bc42f7e2
+48ae94a660db17d3db51527264501e8a5ffd8ce7582c71a0c220573a86181d12
+7346b4c7218a87f9578fba642b365d57cda7aa59a770f402f0c8ee2334360193
+1d519df5ac2e9cba36be0cad1a3817ece63b75eec256d0678799ad0a56f3b56c
+db021b6e8431f840e1a2aa9c898c5ee73cec569a8110878612c459e0356d51e5
+8d132726b2c4ca26209156b91950bd344628d7e6aeb7628ae4154ec8cd1cd6e8
+f77d9ae90930427d682fdf44239c52f43d93a5649ab1a94c8691622057946600
+23767f3b2ac73390eda83db23e6d1f0a3b58f09f7d82221d6ef5835a15644a5f
+6359a98de0acf1b8c06ec0de6d3c91804bb86280e11a982f4f238651e1d42335
+eac6301249802389fd8b45c30056fc29add3c4ec7cb007097799549267a45495
+9b83099d6409ef78d725cff9e13a0d5b13b59cf4f6d6a3b2402a1f80c1e35c19
+c448bc004cdc88cb76867b97b0156b0988a152eecf47b30d473f731df755c8cd
+8693cc86e9f0a1a0dd9dcfbbbc724f521dc300ac50bcd78e181113dcfeb74710
+a70d6e6c9920256d613c6b28b46ab08f82b5af67a4f216ccb31d3cda24d91782
+0e7f45b0a135c50e03fc75e622819aa54c02339474366c07129a5c42f4d8f2a0
+e23a38c34d47cddb09a417f2fb90923cbc508655de01235df27c7eb511aa56c2
+4fcd572512586843ac6a80816816e6dc852a36223bef2299c6a478155776e16b
+90031f71d6b7ae2b7227c5d8bbe57d1af693ccdb8ff883730cade61fde996bc0
+6566259af76a91b9b123665686d660ad9de6b292c5bc47eea9d2ea19a2adb49a
+7a1cb138d99e4473cf1a2c52579ddd41c04d302a9214c5ad7ac412be4794fef4
+15a5e11eeb5a84ec3a2e68811820e084a0256dd625e6f6a61241f8904bfefae0
+899891ffcc05cb11519da935e3b9e692ff22927da8c03efccd2aa9311e014ca7
+548db11e8e8c8c6aa5aa6507c70ffaf846a571e76fe421661dbd503141431262
+fd436c79108d8c7ca8c5eec44fd9eebf54181beed85aeff4e1b6ef6a9769e2f4
+ae97060298f4c7fede54865740cda6cbaf52ceb0c963e935fc894318b997add1
+977b0229fd0eb7d13ddabe457b7aa8a2d05b2b99421e01b4d775cdbcc820b1a8
+3ff39d8a7c4d6e4d96125ae2ad688f997e5f221b6ecc4134ce16f9613881f4d9
+049e171462845117cff0bb70669a62570e7361c5efb8aa5b6b858d8aed27c149
+70155e3406acdc035b1b9d1e49664a75c8d52b2e8777fe77aaa8ced567bbc904
+a44305a7b550
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/UTI_____.pfa b/lib/fonts/UTI_____.pfa
new file mode 100644
index 0000000..de07ce5
--- /dev/null
+++ b/lib/fonts/UTI_____.pfa
@@ -0,0 +1,1165 @@
+%!PS-AdobeFont-1.0: Utopia-Italic 001.001
+%%CreationDate: Wed Oct 2 18:58:18 1991
+%%VMusage: 34122 41014
+%% Utopia is a registered trademark of Adobe Systems Incorporated.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.001) readonly def
+/Notice (Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated.) readonly def
+/FullName (Utopia Italic) readonly def
+/FamilyName (Utopia) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle -13 def
+/isFixedPitch false def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Utopia-Italic def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 36549 def
+/FontBBox{-166 -250 1205 890}readonly def
+currentdict end
+currentfile eexec
+a9994c496574b9cb23f8cbcd64a4a16861c70f0f2da82f0c7b06ceacd6521bb0
+cc26f1cf47836cbab75757d7a81793f43e56cc8f22f926da04d715ab6ff2e257
+5a135dabbaaa58f31f548cbe8a76c69e2402589b9e5e46e757f06bf2eddbbe6e
+e48a624cbe1c4840a338e90f7efbe9f2194aee1c869bc4cd76e2f1937d78e207
+d8149c05b50ef0bb361f5905977c40be7d4dad07b54e087896acda5aa70ab803
+9dfc55a73134c7f1c9be9028d3ec6ccb0fbb8fda52bba4d7551a8124e68481d0
+775ed7f8ec68d8073bfdd3b67f72ec68634ffc57727e16b9aba841546ae54d99
+b60e227682315510edda09bd6ead4d1652f449d737592c44bb178689a3840169
+53d899636686efc6f838b19f966be5f833f5e7d41af38a899df96fdce1ebc116
+9b0ec87c930d9fdcbab7e74880e9693a24de9c67dbb0dd75b3dbd113b079c490
+60018433ccc06ac1df33fc090c4642fd5225fa0a188c131974ca8820319704dd
+14b1719b958779d1475d92e712322eb2e6a79d652c4e3f5833aca3091675fef3
+fde103446e565428267b009d87bb7d6bc40f46b498b19bf1223aba33079e41ba
+a9561254a9df97a48d71015b6a24cf952539f664f172d565f39a55e063154d80
+a960cd56c34011fe26e8849c6677427b2c7e728cd16272363d76661b3ab8bb2c
+85c20b747519a4431421d4c83783feb896c45688ff7f824381cff5654a1bfc68
+6f4894e1d265455fc00064d08c37dc3a47b59a5b2d14dd893a2b871492b07c4a
+591695c8df012ef46a750d6cb7fd86696e7ead280648bd737e9ea490140f3b1b
+1dffab2ff8e085a8b1c78e4b9ae9cee277a29233cec5ab2588d1cdaf4bbb6512
+e1b1476c68fd3db18ecc2536968ebebf4333c2c3709ca354f21fffc38c3858c0
+561378a701158ed0201a3b236ca9cb7f7528d1e5e07a9bfab04f8d0fa3d12405
+5ba2fa9dff76f41b980bfb36e8db1300f7172c902dcb9f5f0bba3cb9c212bf31
+76cb802ddebe556f4610021fa3700d476a2be2a66ae6c658fd0a95bc1b9629ad
+03fe4e775ffdfa9f87a274fd904c0db5beae258f9af213f257db2be0265b964a
+681fc4d2855f5356fc87576d847db274fed9ca5bb4961ffcf53f28b673f50e31
+c3c634604e70fd0895af711c9fa302572eede069f65502f68884a90d9f1ed7f1
+cdd95fc73ca6ae925cce4e01e49934539739f082f0ff1398deafda84c3d9b1e0
+cafdefe5bf321670bfa286078bc066bb1895b1a3f0253abc079b753c8f020fae
+ceb70acca52c4fd011825ba3ab32ce9c7ec263b4828d979b57588c48de210085
+e56eeb002dcecc967c95f219728511ccc6c51817125e1afdd3e4a9b35c8e5551
+06a026900808425393fa10ea4b6f4513f0af047d326d80462d36c2c7d033125c
+ab05bd0d3058b69f11a1d16f23345b3c97e444ffcfb4b3496743d9f6abca53e1
+b702a359cedda4d78e1a771989290f86ceee70502c574d6582a64045acbc33ed
+436871e9beaaefb12174806003037e8616b5f12ff470cc6e08b0af6789b9614e
+6ce98441b72e79b0c613e4a01835cb4d61c9cdecde9a66184af5876f0c6bea8d
+8280472a4c6a2f38fa95b7c475ce75f8acd6850e8e82dcbbbb96e7b389612cfb
+082c280fc4babf5da29e26f1f163d5ce353c9eb61122a10634ca3224261089f5
+e999b1d591d92216afe16a409f7735043885cd0218b4bb7289fb4547fdca93a1
+30280807d3c5fe5abf6d6ce88af04beb42ee031be89efad865f05daadc0ec4f7
+871c1a8d78e51a453a8c4b0ea780268639009c2ed6741fef8c598248ea9a2c5d
+f3ab0401a05b0fc35f66bcd6c812087ac03be6cee22ff97df7152681279de3bc
+be0a5c3574240a561f667c87a9fd065b788c9bf4e38dce8abc94f29acfef1933
+6568527336b48570be215a8ed6c54642ff28aa5edebe0228873c55a65430ff76
+8502e836e97ae8f2f6ac4dc5eee76beba71cb16389399a34535296a0175974a8
+c44918f7c668fcb07a72c0771fa8c49ab7d238611d8c2eb17a2a6f7bdce45b45
+2616dd51ec465225f83e886237b273488f4ec220d1837272df8a504273fdd95d
+ad88d197a3a6e92519eef80d7c18b31df15b9530d96f9982c1f7f870a95272c1
+325b394ec41c9e7fd2f13ce4adda1cc0cca0ad9b068e4d1c92e17d1ebbd4e365
+f7f4a9c547a81470f3ea6386dae456937b302a2e6f9c4553a39ea280895ad232
+57b00bf0b1c9c38746dd5438067ea5ba365b1a4509a29bf938f3c028cd2d0dbe
+441c1e881135b7abd353f1b14f225001812697df59ae92b11a92eb68b41a6e62
+637f097d4b079e266a81e6bc30a69d5741ebc518a6bab96ee0f79b9cdebb1d35
+04f88ac6a46db5e7be43a3c290399f00e2f78da44d348c66d7d12ce239b30dc0
+8f916c875e3e54cef7f5f1b966f606d8fa3e072d4a417b3cbd43bd3b644b2928
+626f29f4d369502b63ff43c7be25193bf11216db04ddc2f39faf825a559576be
+427bdb147daa9d9dc8a9839daba32fbfbc8d9fe41bae9d7b15d8106ae01e2cf0
+d59c6f8c2cf498fe7518fa7b84f38c6f4be7cfcfd0e75908650f52a107ab7d7d
+2bbb6361d5378232b80edb45dfc91750eadad74c9b42a19339d0227d83caaba1
+72a43d3e5c64129284a50ecbc669f29a4d4caf634369d069118fd7a3fe12bfdf
+e202f3376727ae5f1a9340d824dd8b76a517da44eacd882063c8243e121769d2
+809ff04b1e23d34d9ce5f496c7f1926cf1b0930466df9076dcd5b82c97fe1b45
+d1579437aa0820561298a96e22c94befa09929f74c067706594eb37375c136e1
+a9491f80c7a0a0fd447f078898778428309ad92d89cae7f48727d8912deba5f0
+d7b49674111a6033b67c19bb92129b7127d4ce80bce642b1880628df772a87ee
+5b48f395b55aee658c50ab2c81ab7de66eaa52382fadcc60957581a4e09ee989
+331ca245586217a7e6b0f746455c59552906d8a525f5ba5a07cc1df0c45b6ed0
+95230142ee05ec75e12531f65374f78173615c913532a330659b9beaa653eaed
+c0895b65d1a44304e09765cc9e070f61820249b6236194d952103f17799b68e0
+8b447986aea15ecfb780f7717986537516a6ae928648b16a51895f33adc17310
+f0813e7c715368bce559bab6c2292b42198f7f28a2ef66661f70aaad4e5ff132
+07de7de9f1691d5d1235d1e77a71403c2ce61c8f8960c262ea5fdf4e93fe87e3
+b4d7a400080f90a71a8805257c24318563575bedff7ecf2ee53a6ca8a24f8ac6
+e26c70b028f87a1806e63784542067b3d9deb6c96122c644e4052624a9f5e2fd
+c04d4c1d02d39b438097040027c0b7131dd5febaa0f09b767cce35c4e4447387
+567dc3887cbe792114a9a0bbcd01c3aeeb167b5ea4e08f2e04eeb67783669fc5
+16e91b1fd880efd3b1e9c1553a2900b5f1ef5f7b6ac7d3574456eb2fb6494511
+cdf324639998efce019716334e92407673b4ce1d19dd9ff89d301a7954e95b4b
+11e33d64682ee3a8e215ecbb482532e9f0dfa9859b014711a1789d97b8aa0809
+a1338f2de4e58a9c3d727b6efb754806c2cb3698d01ffda6ff4baf277aa570d6
+524ddf0898a02c508bc6684ae45ced430993828c8193cdf0091b2dfd7d811424
+364490b8e607aa52cf695a4179703ca2ea9d0b595770729228f912fd9228360b
+359e298a8845c00bb1fb2aca1abdfc1c570b044bcded5e35986c484f0c84cf37
+6fcccd6374804a3d380b48a6b50506b0f52c51dfa6d49c83c9a2a8bc366137cf
+3840355310b16356606f84b5da7783d2f6d6f46284f63f1ca4bd7672e114eb49
+9a2d80bf132de70d992d326f70a272c64f6264b68aa7722e7a0e400eee21e634
+8fc2524eed6e4df4ae7da2667dca0cc4d79eb78dc7db496a7f54564931434aba
+a06e085a1d1ecd916fca69e8cfbda338b6f873c90f3440ff8c442646dbf337dc
+9631f88f60d4efe91d35df767fa8a0e3c1db3d0053cb419e78453c595d6cb05f
+a4205d1b3334183c34b5bc80a898ed9ab1cc015c65189fd0efebe5aea9c71196
+ae040a0598a301c4aeeef4864e4789b1124dfe3f8e1aaf66a3a510705f6a21a0
+cf0de7e2f9a2b89179cdd4b009b33935b87765f3bab41ab667e39b74c3774edb
+443c772d06d80f7248bb6366d64b1a408044b55f61f641793436d23b35fd55db
+3a8f7d0e99953a6e74338c1d20083b579e534e887994c2080731ef4f9c6cba7d
+5ed6975b583022715232c005033ffb24995ccdffcb1f8655de53044fc3a46950
+694b82f991cdacaef5879fbbbc1ba7de04cab076fdc76b7e75aeb177c61143f2
+4ea610269642f4b1c765063418ebdb6e0fd220f6005ce8223f956d6755b7d145
+e734a947ffebea2904bad11b0fe43beb9baaa38108e475ff79e8ac33bc9d7138
+3feb6e6e7083fed7a31f178ba5b930f47f4c197fe5217f9ae5b64c3ee13ce1ea
+5db10538f5e54aff7b81aaeee741713bd60bffc2c8d3f7361ceacfdcca39882c
+6b0e2217bfe1990908c1c79c59939a2344174f73d069d0bf1279aa30f722691d
+faedace1bdbe056026c8c7970def57b68fb8fc30e7a86d461a2210998c103c6b
+835238192c02ceb0144f2e035fc89f160fb9f14f3a6772b5dcf908244629ef82
+30fd14e830fec7280100b5eda94d83208463e7358028f83fe2605e7dedb85355
+50384276f3b72f5895a6bd4170abd2bf25d6a6d8c165b2ac5620a3417927744c
+2a9798576343f472e6edd840b3082a22cc0efef8f53787167273e0cf926ebee7
+868803e55a266e761dc6ab8f7722efc301fa93ee781e081f4f58e6b6ebad140f
+ab33411eca49b23928a425e4348cf705a1e0f4fdd320025f3c315cf0da1170fe
+1a13ae53d45b712a3370f2e68051c1381311cd34da1096e7cc8d2c8e018bff87
+45621d8452fd40edaadb9e5d4f89d92b51f8ed170dbea911ecd14ac32be75dce
+dac5e26c212d389c94cd67126b98cdfab76600fdd7f36fb51813987daa38bab0
+974d2ff8e114b529a87d187e5d6e782e8f4f5e01342a5d8c95131a799149e496
+9549a3cd70a85c5e69894ea8b544c3df17e4f25d704b96e1ab28aa76babe5b74
+e39b799c88ba47826dd52f55d7840a32481524a5067c247389bd392e80318ae6
+cca790fbfd0d7c6ed9ed7523b80390e2a67d5e11d03cede53ca91580a4f90e83
+17fe325ce9f63b99ba9874c84cf44fd1b87d593bea28b5b674a643753758f9fd
+27aa8213e088f885272f0cdb0792cf315ba0b03ede938756d26a025ce9f682fe
+2c6cfd369314eecb40063f24f365edbeee61d41370bbec9b08665e43857ec274
+6516dc151c4fb114da529efafe44ba73a2675d1d19b1dd9e696c380379df7682
+42de54a93033c757441b7fdfa404678109b0034c4b4777ff05f4badda38c5b88
+d6c1ce1d281521ed0077f1bafd0426e63b522c3ef1eeeec9df67f3bae4bc48e5
+15ba02efc3be471c0ddb42372553ebcb4863d6625245dbb6c0eebb15efdf7e37
+27335a4e3ad99e4f70e57e218e749f30bf9c9a20f172c40f0532dd17d93eaff0
+911ffbee62309b59cc549faf8048f56afbd6936cf686514b16bca3113d17671e
+15731aa12b2ea9c46f887180c3885878a4b59f965f15e1af4cfa20f1d9fd84bf
+7d21d8488356d638867f2ce794c2d1b836bd471bd561daf63e1b427ea3e3c371
+1acd9f55e8fd1d53c279f5c93a2da8a8aa80857f1312d2e9e418ae4440a7c4ad
+6216861f66844f4ff36f5ccf37e96f76706f8dcf7d2a8b6e76a8bdd30d66abe8
+6846fa3b8d5e8c9b516457aec4036b402bffd6913d24cce8714449de2ba50848
+6d3f3fcfc5f81e9f85c99e20cd7551f1f0b63a04b5d8d9734fbbcaf55b44897d
+621b90bb0f3039ef877c04ea5d7c747cdbc9c25b98df15c1ae3946453ba2b8ea
+733dddb19f5a1f3ddcbd8d0c6bfa2e4b914249156d26e0e0bf16a088a9eaa107
+60fcbf45dd8e9d8bd7a837c3e4f840e1d747ec1bd31a82172152819011c53c1c
+7f2ddeecfa67ae102bcd5b12532bf43d6e1b515b27918c89c32d4df49c3afb6e
+3b719f37cf1cc9bd04c45129bde8b221f88e10cef81a75e890543f0a65afb387
+7df9dffbbc8a0bf424628a26a48448e17f180c4dca4c25daab5f4b5fecba8ec6
+24d80359767b2bb4dcc58163295031ff07ffe7b73bd22928f63c62c2e556c419
+c3aa968ba13b7bb559197339835490f2c15d7617578787ceb25e01cf3c7e031b
+607a2397a682db4b4ae408247d00136abd2e631c85653f45c833948b48aac4b9
+ce421dfc528d49cfe98ad6f5bf332ea672288b85520b13efdd67bd326a10e118
+6b9e7026afe8f70aa21888e25b6e28ceea8dbca35e168f23aeb233a18d291a34
+05cf105b4bb6966acf3a2ea3395cf406dc6271a358c3cf51ee3f63949e738c69
+3a2622ee7dd92ed867a3c279aa260499e75ce46503f33c62a85404c6715ee35b
+861357f1e5ad91e1779f474165b3c61b3f5cadb6e38af59fec5eb9fb81773bf9
+83e923c4a9d7aac4c64a4490d575030e5d1d2c788de808e626968374fddb4977
+954430d7513b84f74d7c16755027fe46e5b9ec95cc3913dcc28f8963e90cb00e
+ed7d1af4c8c05c52f4f799aa42dff81ce677d750aeed905ddce7ed886f1e7ca7
+ad587245d7c74f4b9272860b36a76701b184705e7e0225ab64ccdf3aa20f102c
+82ba6d86254808c33fd7205f340622360844e19a937645702c923faa2dbd1218
+ee5a8eafe6e66913d3a895ba65dd825c7dc1b579b0b8f6d4bd47de45e5f922a8
+25b20041f7b8a1a55281f0fc44b149f0e346e0f3e1e8fdf5634eed22537df9eb
+40d8c8bd63d844ba24798ca2060786679aaaf1753f2350f12c3a984628362db7
+f4df3e4ff03f14be6ca123bf8d4bf43817df72c92dcbd6234c0fee3b8bae81b8
+5d7495a6acdff5033bbc102016c267ba56013a739c9ac62dfe9fdafe427d22a7
+1fa02c29744c713dce48b9e52be12797084cc12dc805dda41fd60578a10a9f2f
+0a51b5efa3feb126888d0430649e858dcb9c59a17872602334edce0a92336f99
+250406dedea2e1b1d3f8031b2eca7ae2e96973b852c90b59878faf06286e8dba
+f7b1ff75a5454235035d1d68158585cb5f08aa68b4c5971ff0499f0a3f491d41
+8e2ed07b0cdfba8001740ae437674704ab6378f650d84b6b562bf346d5b3a338
+e21fbe69d330a12d69703a6625fc77e4eeed50c3eed7db53553e1183258cb374
+25c209961144262d9145735df60c1e3cee6c21ea9667d328aa6424dc1d0d4c31
+bdfb91c001b3b9c30e6343bc3e6af5148ef219e48e9c49e2d9f8818b86e13ec1
+ef1ba0e04c9a93b509972038925babe2964cc034d5947c9f8232fa9a40999fbc
+b26adb0ad1a69e25c896c97307ff214ff08b76427f982d0eb9eedd8cf2126219
+9758b2b07735c086e9a6dd43b4094d320379b3ef0c20bb9fcb691a6fb40b9c25
+9612905890f8fbbe837b1edac168764ae7721a97d9e0ef67424d2fd6166951f8
+00097747f5db43cd16c8f0a5e2041366bbfec05cf950876f7e4462c4231f83f4
+3f14e61553b99ebfa7ad033f51ecf10ad964d71c18b90e360e208ee79f86b722
+d6f062498e4294ec0991b318d18270374de5212418f54a5a1700a19b23a31dc7
+b1c4bf77bb4c4fb26d219d87c7c0ac10a88f65bf5cbb122cc250035499ebd3be
+7b839f311cb67349e68cacdefcaf9970b1e22a120ba90bdec02374a7fb96b232
+08619b8a9cb59e86fffb65f1f0cb64579de0cc5b4a1d428c0c4f4b46ce3ea0c0
+3a4c815b2d210e3ee18f1c5cef74ec07c3415f2dee72c7511cb479e78d3a0d96
+aa7f15360ae7455210f4528a18d74863516b1c688ce1e539306e260fcc203e9b
+5af0c06c3c04fade53ed1009672d75ddbf3358396868c2225e9460590590a37a
+d9b361c5872562a91042a635d8531a62088d1341f9519903f98e339a196c4e2c
+8e6ed843cd24fdbeb101f09bc4516a7cfc4554320a9318f10448fb9d10c45939
+050a55114e979f4cd9473af6254311e3f50d619d9f304df427ad53ffddfad0c2
+f849b4ea37eaf66005afa5269d435d1b3362553043e98eb631d8b4e820e9571f
+88ac251d767e3e92666f3c0aad0f5a5901dd5f0a72a44ca5f957b40bc29541ef
+5c28f10e36b8102e5038c96ca8a7cac9698d6f8fcbb82bc413d364e3bedde064
+a77e2347719c840ee53489d836646e8fd4ac6019d00a045157bf223f32f0e68d
+379965445dc50bb7b2c223f2aa12fffb8858197093319a10d3203038f4e16c04
+c62294d51a206da6ce0ba74e5b204656bc172c22cc2404f882e91ad157bf4dcb
+dd619aeb837e0bf53c4328e57e5be92943a9dc6f2c5664255d7872c976386c42
+5235e3ee2671789c3c32b7d5e7fee0262a43cde4d3bb98d2aab133429ae002f3
+b71c2b3688d9297cef802a2330b12b1e03989fc8b9d1dbc91a7bdaba94703525
+4efd991952a2be03e1147e9b5ca770638a5778a7a141a705ae4ce474000033f9
+e1ba21d948c4b016162cfff6bca97a7f8f81cc2c22f8011b0cb74e4c7c92ac80
+c7c53ee9c0520d2c7a5dc97a78fe15cee47994362c65210336de52f9841b8d09
+4be1aaa04e39d7f66d0c4d01eaf270e26eb38e09c8b303816c34ffb8cfda9f41
+c03d95d95688a154c087930ede2dfa63ed8f228e3917dcc8722d1f8636305073
+31d43ea9b53230b0d0797013e7604b528215f1a128cdbb26b0cc3fa43e3fe25c
+b57c9bf8f8e290586e27924cd20025c54d6d8792b4fa52450684c8d0e131aa49
+2ab0a4fec2d0f91f4b81d74153b5e2e9bcca216c1b49bcff347c57a727202068
+0e040eb5d5e2479209d7e085760a7604544f0e1b541bbc73431ebd722806cc24
+505dbef65e4ca3457d0587c4d4fccaf7f14c31b5cf62ae5f0c08661c9f5cb386
+ec057c82dedeedd54c8f380320831f2d6d9094a5d0075a0c5c203be292231353
+3aab44061f0c75483c8c90ddfe2de61eebaa5c23f3c1e14bead51e741963e5c9
+393e8c906adce443244f5fd6ad7ab164ee9a217e609fcf90e5b8157d27623d62
+a803207d9839752a19da399e82082ded26d15088bc3623923fe5d5bcdc2bec1c
+639e190dcf9181e90ddd7a07c773e6a0511f1e268acf8d1a0d985abab4c95363
+c88093bb9f111cd66e7b7d8cd8eca3407fdd45d01d566944abbfb99bbcd5602b
+dc8e250247dd7a37f4389e94c1342b5e6ccd99ac4d62595b91b15462dbad20b6
+5bf5fd83a8d8864cc9e75f018caba8d7feb8dbe58766dc0a06405ba89e39a6dc
+a302161f88b641a7427aa926d438cff5b5e463309a6cd2abfea827a512d03128
+ec1f323c8a92929a4a6f63c798fe0b73fe59ebcbb1e4614c2d3ea0ce81cf5cc8
+8a6d82334df23cc978d9a97930cee6f567067f7c3877cd46b672d116805b1543
+4a019e47fea549f9942732bd1537c24fdc2f1b0780f7c9b3ef7e846906abd277
+82e21a4a8456cd0a880174efbec65e6eb267a94a9e0bb6bdb6c1c4998d7523ff
+eca5ed22cd608abad4f8570d80ff8cb65bca81b09536ae22a0925ec620cfb875
+70ac3a8e19abf258af93113ffc08aa07f0ef6d751440d874b3631f8a4bbd7721
+9a796911b9dbc0b2e1fc5768d40cb8dbcd38ee9f970c35bbef52deec4582d18e
+17a184203a891ef39fc8d56c29ed3b9010bf9092c8afc63f072c6ae93eeb9342
+6647475cb38c7a634dae53b14995468e4e39464ad9829b48c97e78c580ac32ae
+b2f5631d37bda7f69936d4cfe342279eddc7ce5262969c87e74ec6c4728c82bb
+eff94703031bb14d7743d97690d7a2ff863904ebcd94d1a2fd7270343f38355b
+ad318250da6b388c644a9f62bf59482d7a7161f5d3b65ad5b41005bcced2c16b
+c60f81fb3b013544a32c81c2f455f34cdc12e195fb29631b613d0db8fe3b4957
+a49b3e0382b3ca954a0c135e19cb83b7e29c7904b5852641bb08cee1bdba5a09
+f1f03521a866d99a6b5e670351b73cfb453263adf92a8677de8067ff52ee5a63
+e9ba822e8a11dcbbfa745caf433ef673fbd0e6c7d28f9d3260e2b2d75b888181
+3662efea0548a4f4c2ea1031376182e12b36987f2afbdf205af3229b7e87b20b
+6b334fe8615d13b3c640d25b5c822a2270111d964e4cff01f36d2df200f41872
+29389c1482c576422c158fbf2405e3dc0d87d76237f6666e6e89c46b83289a9a
+718686fe767577688e8524474e522ba5fe3f6222ae659a12855b295d408b7da0
+042c02087ffab03b422ba9b4bac8c39d08605624026e355fe62328d4df8c5d9a
+63e3118bdd69a142412d43f20d23d990ccb50ef669a76a9fc3924a64fbd9bb39
+fda7015bd5b56d3402151be6c4240dd647138bce226f7ebb9b723b3b3e6b3b27
+4da0d1245dfe453bd9ea5fcd36eed1c09e800b20eb206e3f1782d70c67a82d88
+10451c2cdf052ef603a41d50b90dfa15a5e967c6ae7b505b1136fabc9898c004
+5c1043754b8bd712703233855db0895697dbfcec02ef25092d073f37f8f86fd5
+e647c80b0af65453bdd645f92209412ffdf14cb48b7daa02781bc981d89e075b
+39c7e8251d2d384835691f495b3d5a43557f1dff58b935246c2c0b715b40d4b7
+ed7386bcdf5be2beecdbb223dbf57c9a06864f399d4748c11b89760579f1e420
+a4e8c67241a8348ef3bd04634b9e69d5dc5015f89b10f7580a008e5dd424ffed
+60f14a39a759a0c05e4bc3b1e344feaf613be4e1007f5535a7850832760b84d7
+3391a60001d472449b3e4920f46186d0fb8c8a1b96165e2f463e39e289274985
+e4062504ce4ce8b24764d050c371e6545c3aaad645242e39876fa2d8c8fa931f
+73d56e5206d47649cbeae14ef3187d43f6a3bf48bad527f6c01c8b1287edefa1
+1016690d1f50d310d463f9636d6f8514a60337fce30e6d72ddd2f381bf2bbecd
+d416f7ad7338fd928296aeb8c58c33e08737974840b690f1e8d6c46928fddf4d
+65c07eb4cde5f6b5dedab807a67ee995fdef7e7fcb285ea981e0877da1b8bc42
+fc201fe269c44a48be11a5ee8a365b50760c477e51005db9fde781c080f8ab14
+44181e4a0bc80741530370fc987e7eed25cd1b2de3bd5c53e0cffd67f24f9e2a
+82fc866abac0d9e690a0075cb623a625ec6154da7bc0c36431f20fe0a8df2fe0
+50cdb6c3d767b5f640833e7ff56016665ab4d42f28853f5bc2726de5a7372ed4
+8666c51df290f796fb129d441bff05f661a123dad14e5b8bd3839f0de22e44ad
+77cc296603290f731b23a695b45f5b930a8d6d3c6783466226fa0a20ff0ac7c9
+f63eea109a17da0ddf5e1356e23c37528776ebda66b0a5ab37b7aaac291eae01
+aadf7c555a4fb77722c0a527b5a711188e28944494ac58f58c6dab6df90971f9
+9ed636c4eba0dbcad659aafc776c3efff28a7d28da972a8bc5d8eeef3b7bdcbb
+8de66ae1d2fa6ec3eb33c37e632118bbc8dda3bfa80da3b7a2770908fc4575ff
+de9b1db2fa31637a13f8b97e73a55f7a975fc836eead6dad2453aa31d00447d5
+6350145197d430f8e6af1246a7d605e7df7a5ff4fb58e8241469481bf48b8436
+31acf36fd14a7de24d3a90d681246d5bd65d31dcb7795f2c9f6dd3f04ad330ab
+37636fb9da5f27693b7613cb6268d36cbe13f628cbbd5257f2644b9be91b69f7
+2403f914beb707992fcc653b96fe7b23eacc1f46c325bf02427894a28ea28e74
+482a2585f57f4cca2a49fc473b73b2cc47ebe014e78f9dd868dd4c63923f660a
+0d465c1053e7a6dd9138ddead25cdfe5f3a211d6f06e2c19453b405173a814a7
+5017f34fb8504208864db35ea2406c19d989e65e5417105ddd09fe62ddce224a
+daffb81a19999b0459da464d3d10492b62c12d085f4381fb91b597f218b7fc1e
+c0418a9292c6d2fb2cca2786b1b9a5cbd5edef092b5a3afa05d09e6e59a70f02
+1346ef208122d8c8f6bd2da33609aee5917f0c92fbc0941dff2cb3df9feef235
+4efa7155231d3403ce8211ca2786915280811d9dc9275456e491331899265c69
+8b3698810effb9e6e6fc2f5b1daa88e0740f8195cc8de64711be512f43128d28
+58f130156cc2bf774075a2b0bd3a0fec0729494003d58fdde93a2fddb529803c
+76834d20a2f0654a56d1cb58ec344aeac5bb976c694fbb328a3cf9c355a5ccfa
+3de62645b792d17c86e64a14465c5d29686a03037abb8eddebf2c55c94e4d984
+713982f983d942b390674695a46485ee6eac26cf864348762b018ce478fcf5e1
+c434b8a26187f6707c6963a933c1e7e5addb9dca4d5e9f5ea43a40c43d068b87
+f3d8bd0324f2d10f52d92da826ad20917b039076bafd236881654a5abbae112c
+7fcb2bd027c96d69fa1224a8108d1b7caa4d4b03f813d461157a7b5956be1296
+d929e3e3e5249cded2fe79950e619b47b99cfcf0ce26e6c5135ef0d5a05662d9
+24d57e0be99056aea4094b3894b644585ecc7a6f016df96ce3fc1ae75635ec2a
+2761bf9402fa697a76e326afb8d7ae5f7d375d260ce60143a38913a4e085381f
+ae19ced0d207c80cfd0da23b999fa947408f31c00ed5046f48187ffa4a9dc8ee
+1e410719a9e1fa29f15ab776e8013158bef0615e6960273646af89da0fa935c1
+8a7a1b67df2b0fd72b42cf02c5e916b0761e89550303ff45560bcb350b7e9ac8
+0422c68d1e34211212999f5a99800c7b103afdd7c8c5e32ce86d906031418297
+415ecd921c44e3d65759bfbecdc688167896374b5cd91a64cf08e3c224b9f22b
+06d26bd1bb52679fb75e2489027a7cf868ce7fec588def5493f6570d2340a2d7
+61a6272402e9d29d02546929d02ec741a4f54c94a25ac1dc87b8f2087e4d9275
+32d6afc9597fa33166e593112001404b15e1691f002afaa8a4fe0fd803adaab4
+ba64ffbefea2acdb3059dd040b2305997fe7a6fd78db6e47e385af2cfa834af9
+3cff1bd3773d6b6d2f303ef4950825d6c3768532ba44a111af37f8b632cca18e
+7325171953b66ec7ad79eff3b69219cb31201f5bdd8da70a8bac1df11ca37519
+5658f07151fdecba4c1e14c375de60affcee4998a0a377587f54271bedd8b226
+ab3c9b3638b4e1f4b633120aef8e4a2989e2925cc84c7281674e7089b71bcd8f
+da8d1a26cc2181ba716d80be532578d6798584c364f9220f1725670c78007454
+0ece6487869cecd8e66f8adfefcf23cfc5fb8f1ce23a5e1e7159493a78742f05
+660bb55526f65f17eb255e84cf0a5c0b6b98f1d54d7fd00c1f8236c60c596f6c
+28c7adc584b38671839b5847e37a7017f4f7857e31c3108cac29640fe9cc2ddc
+9165273404769a556bd04c3bf5f9d76627603543947cf885de71f44c65760076
+a889b5b2d3511219936476ffd38e2d5e86fdeafaa17dd36436ea3dd6914e812f
+b1d5d0333a7ebbcf6e908d334ec8dd335357546e241e6f3064251323b2fd746e
+54d67d5e2d5b425cbdf89105b0c19ab4cea931a557f2d7d488009fa8685a1c78
+57f58bf6f62a8c71eae1b8944d78df9897dde68b628df2706d7aadbeb2d4a4b7
+561810d4f7e1988262f7460684575b38f13c4680c3dc254c7ad5bf5bf200950d
+857556ee412c33b42820f740ad368a8392ad0605f16692e2c06b78ed542729e6
+d399a052823686f83e8c3f0e0befd2e7405c52e1d083c13e9283b50b4a834249
+6214238f65e52491566c183d5ff36711e6a99eb49f5518efdae0743467dcc32e
+4d4c92ff8de5f8c649152d48106228117f5c160fc8bd2c69b1dd365337722742
+2c59cd0589bf70287b487799df5e698698f4ff13bf4618c63c2b0e000e57aad3
+dae45bdae9bbb459fd55584839dd185f48a75687a8192f3a63d2280648e9322b
+02b9625144e67c6080f0eebb7c741968736caaafc151c4a9a1c1395f31b61ca9
+004eb39a789a9ffc247a249991106df6e1c52e40e4533f0fb6087a59080bf55b
+f197ae35804870900129d9a941004273ca0065c42ecec8cb517609d01405ef3d
+b500f09d410e230f680e12e5cd607cc0d1edc63e1845fd1bf3d9ba07e1b7a5c2
+eb0accd178e1c0178ef55eceba43a30599a0477fa4f8ca397b69ae64f6b6310d
+9fdb875a00545daa9f0dfc0ff9fa355a9ad4b08d08ca7bece29a5d3a325c1463
+8f38dfe12ccd5c942a5aca6414a7b04c698c9adae4d8d43732e41dc0f04da349
+8bdf6b9f3a58296957d88f217d5c46f45c7c3a433ff9c355a5ccfa3de6553bae
+ddc411e40b9f5e95cd6e9f62dae79353c5e1b874f6677bc593d2a2a07b1c3b20
+9596abb07ee8f71212674a53b3a604f5af5449dbcef830433acdcf845e44d879
+fc619fe992d5f6ea9b0cddfc24fe223e7a357cb0d5771cbd12bf50851f400b49
+9e55a3efcdae3b6d6cfb72ca9e96f9355234ea284bf70abc81d29bfc928dac80
+5eaca5ca15e3b8303bd3710a1eba32e3c13ef7641c7637afb5cef5dc59902e6b
+aff4c7ce9fae89977d96691d306dfb9a54bd8b9cb8484ae4b50f7e2ae5ade3a2
+9076c21e036a78c3d78918c529b3eafbcffa7c842dc917f162fe68179bb45b4a
+75ccb684f7c4b5a6d5db3cc876537e4b643e447dc64bb76d9e74a3d378517880
+9896262b00893cd7474bb605994df0ee028f4a703b4ac00ec95dc3ccb3342835
+418a5a158b4e6072a657a7e3d2728c0f64242be6fbcdf27d5093139fd7bc95d9
+89320f2ac958c06cec8fdcf56596bbb45b18abf2c6b5b891236063441ba7331d
+613c0f1de49f50a839bceeee1f2ea065fa879f50918c6a3280bd7bbf1e366e27
+4d5e9e0a6bda5a8768f72b811252f40704a1190b5887bc5c586b1704ff1f7d4b
+a8ea68ab335a506771a681f80dde3b8aa04ee1bd6cf881217b829942d0282c3b
+e262314736557d8a43e8686f3280d4c9aeb9fd78262834ea5569a233d459abf4
+5e50d17d666d3e9caefe4f8d74710aaf2497a405d73fca9e107a922d0a9eea59
+6de7f71ef541a0a5b141f786dfdd1861f81651f540f82505b3fe83aa32067db1
+13812fa761a7f3b28342bf1ef531746b033232fbd06a12a0b80a9e23571fc1d2
+184a850fcceb331ff7076d3a03e8ed50991837925efc91e1ca33491b36cb1aff
+2c1c58338fccc4a9f0e298e781afb718990cb9eb141c6ebbebc79e437b52a17b
+0b4a8cfd0da2f9401ce9370a1ef04986793a67fea0fc96d8eb325cf73ae51c14
+c5030d9a8340b8b33986ccc325f93903c0928af3fb3766c8428fa690cda94c97
+939fd8df41abc0652e0ca8e82e048b133aba600278e3a227c4eaf8b557856ff9
+e6d2fb6671ba75b779e90f2bee7e349ec394ac76e16c73509b5e99d44fa10636
+ac63f8d546d5eba3c6bca7b738d4338134d2b79dd8436932d6ee22e2183a5c07
+a72f4742edfc2ed11145fcf8a9bb54313894709b28d214fffcc4b917e0c389b2
+590ef307e3ebbf0e42570de893328dcfe81e7edebf72b88ff1a557e2f038ef1f
+8c25c68dd7c037226f7dbab36cf73ee00b92ba6efdbf9a9e0f4a7a91853394b2
+a02077209350a2b61d4771f338e739c5382c07e18386e398b2946ade4c3f0a44
+ff6f333d550ea7db004654aad32542571febf3c31271cc5d167976c6407c7570
+115bfb3f838701b58b320496c39c59553b33fdd7fcf135bf4d849b130fa58739
+6a983a93344bfd37afdb01b18232af9f65d5e3f5131bdc40063d7916a2b67ade
+09e2fed7968e96c6ffdb6b41b0a7bb6b8e93c2ac4f1b466f16e219321c9ad83a
+8027101b3d007ed0e43594efafac9dc0e4764477f6328ef0936444bbb4fd20e4
+2ae35cc3090ea9ea8ffc5a85236a4597f661568964f6a839650470f79eac69ab
+e1794cc369c4183f66715746b9abff4c151ab6f06be72ae63f41f5f806b3fa05
+eee4f22990464b7e4950f5654b36b7e3158a7b4ecd4fc7d5600c831ea7521df8
+e61c5f5a3942eeb82e06477461ddbbbc9551ed095d78309f0dc9465f88e70fdd
+7cf599e493318efbb07aef45a81f2d36111838a736b422891c562c933005dc2f
+99a44557c978e4d9da41d3e2c3820e4a40fe28a8c268cb593960058f0fec18bd
+c23102a74807835b1244daf8bb9a7553961977ea5a7d0e8a59f58b868c9daf82
+5c4cca4d84f4f37484b6bf8c1da54c5e089d3cb47377a99eba19e3e81a13d2f0
+59c22952aad0fa4f3a4d82478a06a1913b8f2dd141e776fdd43d76fc9d28fb93
+d198f84310f271baaae7e44752a4f8fd1ab089d3555f9d7083999bdedafca730
+50598a2b85541f071716d335c793b55b007392a1f757469aae1436de65d00f07
+66e196c47010731b77aa457876cb8994b97e20991af4e7b47bdf752f59c7e6c1
+27f3043e2b06dead3d6fd024aeb2413d1dc2ac897aec8c2a97c848d09b102982
+06f2dc08f0f0ea755c68a0aa8062521d34f16beaf87d359db9cc79faabc3d256
+3cae31022f3d4ae7dbda58194866a7a29dd34f17a4d9b7f7987e01a6db74bf0c
+5e0c53bd07af310a2756f22c1cb9bf2a0e1a57aba6753d037887c4b65a661f70
+b2d10fad50c5ffd365d3778295d880f498ff4950257e5ce855161796989611b3
+e793c99f4e12e947b51643fa80b129c6664b283c100b5694d2d8bf60a3213157
+a17b72080842b4ee055d0860a801d930d63e5354f599854b5a142f11f6b78717
+8897d66f3f6a3ff20029ed1870d538076c1d4fa4ece214b0075ada5cbd5f4087
+8975b21a79d8a67be6d73f8777ba26c18ae3b8613387b25f43beda7a2c9f6692
+667015b80847d0759ccf2ef45aeb00a02d63f630dc6823d5f61e91b410fcbba3
+677470b440063d43bf734b16ab45a42b698037ca3cc5b460b563467d9b6f9453
+d31b47822f6fc7fa1604e77d00ab1f172bf8f4cd9bde3635703a4166293494b4
+37f032570a165604cf5b8b153da54077095196e55252dfccd90a8ebc09bb7f45
+ada3560fd014a844b2d9bae654a533733ca8ae359bd7537c60b52997e10ef2e6
+f9a2210dc484431af83a956af66f06646d918d2832ecd425ff9cd8e9268557c9
+efc84868728aff4d8174e6f85135c11a6968b13f7d8346334dba97a1a3f0990c
+d1d2bac3aa8a5c294e4d0d67e893a609189383a24cd3bf86c22720d320d59a6b
+5e543b799bb5d45fa9826b832a809026d104293f363200780278d973c9c63492
+8576754d19d28c0e4058684cd1a71a919e5814346bd40fc15eeca1591e0a709f
+f083b86841f04cdf8aadaedd95f26fb807bd09886a011443d410466fc6bbc56f
+95468646ababaf39887f25e485776892c89a6cb7bf5d20b6c4e8a0bd65c5de90
+7a988a3e2e39aa721dd03ca69608d59cc1e8a1d2ea706b0426622e4dc6c94013
+3f979e5d141f06fd2051a54d84fdd4c7170a44f81ac786d258f98893bb4559c6
+ac59332f599dbf644367e28fcf01da3e8f33b14f8f83052d9c0af2061465b059
+5a923f4567274cefb60341ba793ec77e5d8c7f96bb88b63591d8cbeda48642dd
+c631a115cba7694f64506c787271a8c9cee064d9af1ab39cd121f7a1ff1c812c
+903aed1a0d13791c051ae21ba92b5db47e72e7d6001fb31535a385202edd815a
+40bcb9937ef719f7cd20e30fda23fd356476d22ed6c206f15cb2a78fdb45389b
+6cfa3cc388cddb82886b8eedbd9447a48844921a51d4cb19921c3d42e58c0173
+5189ba388aa32ac9b75b5ab43e428b20957bf253a117efbdc6d9dc0931099af7
+eb10790dbb14844be86d80c5e1ae17d0fa0f73703f180effa98dc52c5a8a9740
+869fa97d0bce9fb59b36a960315cc1d7264f5fe730a397c6ee121021a3c82cf4
+bcd40e844b78f99ac28c27d9c4f4c90cfe0062736be1bd39d45592020daf0b9d
+91efd616232a6aed299c9a01388e0460b46ec288d4e1cc5b08769ac88002094c
+9b680abb4d3e0823b0832d0d60d08dd7e1a27531803b26f74966f6f4fa2f4117
+2048782c3e3ea7744dc52e7113d3e290d309881514fb40773b1ec9bd7932f7b7
+42c3a3dd44ad5207b89125d7a11aed1a249863a6e537c887b00161ffae6817d6
+269d93d4752375c48ad0a598d2486f1a173bc55562bc889eee0afac3a4b12fd5
+cc2a57080eb6e3880e1e2930fbbf7e6629c428a1025966b47ddba3d48874e8b4
+ac01d33158f31760d82a88ee60be24a62fb5ad9f24254e2198d968255d79e4df
+206d37d52891300c669855a59e666dbb4676c4ec6fa988d6378ce4d00892c711
+3fec62c89dac139cc2b77a954f6fe953064c52a9345df309d8baabbeb1cb7910
+5aecc2f99b451c1b028a81d62927e2c932805d38cc8ab7aff70fc84f944d3fe5
+12694fe2dc46e548177bb78e4a51ad574c30f29145be59a24faadf91d34e9750
+1b1bba9cd1563e7e339e9d8795a3cf887053f1ee7062fe98bbc2257e8a6a964c
+d8542df1129217515f38beee762ca45f9ac85c4497afc6b7200c540287d85c40
+7dd6cac0ae86a4d324d1b3fd2f249d3613772ab3362840a78ee8633b3f89b46e
+b6749c008a46eca09c3ac738011772215d2e61e59e2b35b0d9bd012378c2e8f9
+7a58b7febc683901bf086f32282a9e539f2816acd16d5b5a0d7c26372e1b7ecd
+d64464cbc518da0ab436329afd5f6e12d0ada7cb9bd84cd2b6eeadc4b966e2d1
+33dbfa0ebef84b45019f47c668325dd037f85dbca5fbcc54ef9aa710d998f3cc
+df1e64c0809bcf0386de718201cb3c474fb5ce9cb8054ad3394bb6626f7eef64
+f60626142f6939666fcefbc920932d389770acb70180dae25a1e06fd6be4f45a
+07e382d0c055447a99dd7e0952f24e89401a1c15a277d02dfb6d31f41ebcb754
+2f4f608640ef289ce4147dc1cab77ce02b1823a87bd46f0c00cefe0191d68573
+6af019569e89ab388d3d770af3f61546fe350adac3337713bbc091318cf92de1
+7b61ccda6e28c314cd2d6a27e758e48dd6038fb55c6841dcede725a1a30d5fda
+87a37ce7461be94135e94dc72c976fc326a32194046979c351a53fb544d1ea5c
+dc87382f3e020e019e03ab3ae26eaa4e64256cd32aa1eac38539d04ae425e1cd
+e4548d0c352b680b4922b6b407856f1ebf6f3ea6ae68eb941d914d50642dbf74
+fa2a8df6b682e0d53f3b21ffa7225b105e359f49488183dc94cdaf1d7aa849d8
+88849fbd3bf680dd02198a557e768668eb2fbbfa23cf3af7bcd76940e1329b04
+bea1e1da8d71850e11eed811616410e2f7db0557aad2d531e1d3af851329a38e
+96b192d5ab246fb72788f99e07d22f9bf6c35bd15036db0fe66364654ca2c34d
+4aa14542eab8d979311725ae045f9af9790b26f13d0e447b3f58a8b817eaf26e
+f9ac8938054c130583237c616a5f3be196c9252a0621cd35183ffa748b0c4e23
+869a58dc345282066b213b441823389934fea2e40aba453edbb936ef4695b6ca
+5734f49bf4c21f0c66287df7cd723cd1d0e6d1ef02514a89a0360d6630f41781
+e06d5d12f793d64c257de894f58a074c06e4e18a5991b46af372e7c1065a9132
+f88a83fdb08a4a54b50d4218785e15b6a86d90b7ed621302558b510c0c205100
+44c2ff47efed6ff373b46f1b1188f96da0b38b0a9430e571d4dad21eae98dcd2
+8d36affac5ee640128374d182d451b3aed3f2e2080a1531a2723ef40b496ae2d
+f0ba56582870fe7ddd397548d59042d981da2c5b15c2d3cf8ac934d91679067f
+e601409c220b8a6647414d0b73afe5e96fd5106f9e5c9883132953083730f75e
+2947bb0a0ad58d73cf0b0ff80481d2a152262e1b024df4ee74d22e9933f1f222
+f389b8367ec1d5200c70f7f48079fc559a6610e483fd55df95a8621c4e42774a
+0e978ad53ca8466cdfc66e1eae6ea5df41dce8369b40c6aebe585f4e9b3b23eb
+19139f371c9565ee85a2d8eec6e0c48ac857ee2660ce13eb5cb81616649953e5
+53e23fc2fcfbf98a83cf202cf6ec7f3816e9d70a4f86391e51327e047315f653
+906b49384b9c069fbdb27c84521aaaee74e53055897cdbd167a7b5d33b8feb24
+aff3e22b5d9da4966788ced11943e209ddd32f3085aa28f2b631e56693a390a1
+74b5cc902bd67a2c3959dcd84a08f8ff2dcfbfff5f75e2ef01c9fb619117fd97
+f8682a84f0e718362659df2d082fa8d9428010a76268380f525c4a3292cdaa9c
+475554ed161cd2c43355af9350c3fbc654993a3f8901391308af9bbb1fce0813
+7592a1a4b271cd98d094d77ba038314ea68a4e64d68b0165bb593b873b24fe3b
+8a59f22ea3714023825140e0658fb050e8c4e32d85e92cc0d2eeeeaff00c353c
+c00483ad71627438a50b4dade6b0aa1caac73ce846581b858910486820ad2190
+33a9a108a502fa6ea60b8c85d1ec5c816a325dc802f213ba6bfcbfc65306d07c
+3202f0d42fdbb7b62fc6eeace31837cc024965695c529e274ea638ea2a24847a
+db9eabb31283bb13944309c17e3615256c7b95d8f99f86feddc2c7a566e4dc87
+bb060d88c661f589080fae039f4fa4b5b611caa6c65455dcd4bff9ff89b63f60
+5dbbdb21c07404e02688b7f92a8373ee1a6a891bf6c315b793a9fe81079c1ef2
+804238c72039924ea63039020363282f24f969f6a1aa10ef2d9e7cbcaf53c9cc
+1f0925637190af45c7aa731e7dac0f091dd22e5ddab9a8dea87a0269d5343ef9
+f8297d133a037679c6834beb8741396754f2dc5a89a1621c13722289eded1880
+c9859ce2a9739d003bb874f747abe3ab28d79930680ca53ceba6db84aa3eb869
+0830eff19972d32f37eb6eab0723478f881127a84536374025a782a7cb24f90e
+892bf7b8b9a44a237779c4cdbe5325d3e67cd11ff1a58b9d69ce962a659486ba
+6649708daa2f7a0cb144f6b11161501464b7c7b20659f6e5ab21231aceb813fb
+b30f9d6c6afd24d638ece5dac5259af8eeaa46abfc1d6f29383188b4ef4d8e08
+fc13a8cb07f61f55727619cde4f86944b879e23dda590ecc57f312c9d6d6fbc6
+8c875291b617f8040f4494323cb93e84f2100092b5a0527dbf02fe55175a1b8f
+7b8b130de1ee8d39589b7489f2d087e6f865cb536b595c552534475f1bae5981
+807cfd89532d91a6316154dedc1b8fb3f8fa0270651107c5ab24ad8310303d98
+39b801b2f0158aca98833b79846369993bb4a3a715afb6eba5a2237652b17d60
+2dbc21281bbecab7df65812e9ba59b78f6e3f6248d5cbebfedde90149d823635
+0ad0a8cda735b701534eb682dd2261883e19355d6e31d980265351f1895cd212
+a8a006a6953dff2ff7ba40d5263b6547b6cd5a5317bd77c08364987424033bf5
+bd9dd20c0ba69bb3d25df2ef5fc06092981c2f57ac3d38b93976eced658544a7
+942cb27ef9cc649835863b2e14a4390fc3e5bc2c0be8fe2a67f1ecb3d4734636
+6b29b60d7261a743583915fba3c8f832c4c41bc1dff13178f2d61832fdd13853
+db2135b4d92b1628b80f3baca26481a48a9e0d0847e4c53427e5066816b474f1
+052fdbf71f550738c13f1c3ab27d1fa12a11194c145d90f61e4ef2a1fae0d25e
+6974f191d3e1106c406ce4fba266c952faa505954f6ddf00068422eb0cd4baa5
+34b06c1805468d7fc0b88a491b48a393c55726d4941ea7d869b239a69565a892
+82e020721bc7ed828c88681584e0c49452fa8f2bb88914491074cf0ffcb5fdb3
+628b292a0f2fbb488e96767aeeb4b5b738ddd65d50e143aeb6e37fd6110e0dda
+5e2120fbd267c00b1b90626ede7eb1fd37636e7f3b01ffc6f7216b396bc1a5a6
+04db15b065c9a030d08127a538f69779a5bd73a6d6f55d2da851afb9da60bbba
+d782ffc339762792fbf66b2d139b11e76a28e8b483aa5d858ad779e905456574
+8c2f59a94010ed153e90a961b45a225cd9a131315d2691f6fcce8b321078deea
+6582997e824705703029a8aecbfce61d427d476b559145f5ee40364c49ae13ee
+bd940e7104a70a5501f5c0a632ca1902b75598d3ae606319d0ff4f0bdae32c70
+b1e4d5065157499c15fae5349fd68e77acedeb296cda2c912562546b9d1a966b
+e7959a20045af835d9e7348b5b33614005f05fa26f45c3de3397e5ef9cf02036
+37b89a5085099eedcc025785eb5fc2130988a19570a1661772be2497d4c8ebdb
+fde6619b3af0fb42f4d4c3516db21d44941a62f62f087ae3731735beab50f7c5
+27856884c3c4c01b83a40af32613638be95390c4c66f71672651df6bb4c4a0bc
+a9533884c477f6ae268cf7c21fb12678c54e4b3fd8ef032d3e3c2d3651bd905c
+562e643f42d81fbbdf819a28c81c9874100a65e70466226d90662ade31127e95
+c7f5052cf24df0a04d14d1d8a5d5d9b89d212272860db459e07731b3a6537c6a
+83c352d2d1f09389fd4da36da0cc25a57f402976cf3a473ff27b6554faf254c2
+ec8e52fe59d346baf8b1fa0afb13289b6ab06c8d25afaf4f218ba88565cd3acd
+f1fbe77f5209e6d5dc361c18d9152ea6a5267116769c987b89dece4fabec70de
+3adbac8e5e7cffa82f4b7e2ac41696dfe89443c64d8fc50c5699117d094ce852
+c2d7dc91ca9f1e764bd117ea7cdcf98ecb87648e82c64d93f58daee619f531c3
+615ce9df8abd7a63b2957eaa3cdb10e48c379a96334f8510a1f04a7c433f3756
+81c565d30f7c7d9e05f4d6f249d203b286c45eaf851190ac74822c5a6caf4f04
+94520c329c09cc8e0f5ac803219b76c8be672d5eeb878eee0c1116ca9942b133
+0734efd931c8e5d54bf9f22d194475e14eb923a453c9b7f4ebba83c80b4d36e0
+617ba6de745ac02953a63a9d73bc2e07c52a6fb3182e001c021916ca4993647f
+8be57505636b75e2013b781c2ee65591694009f1aecc0195349d48d780db2da2
+dc8c60410235e5c3c7b4542873c609f921a62953760759d81b718500fa45b09c
+504f9cff973ce3e32a35b426c6f3fb2cbc366d980e133fee86f961dff6a21602
+d8e14529e91e10105afe9f88c9f65052db9b32cc2d88c7bbd1248d4448706d3a
+defe4dd13ed573d1e8d31bfaa9fdec9fb1dd2ecba1ec8cffb0601523d86b8187
+e1a1526c20166314bb65cfc266d01bbd562c79f00c390ff40c42e424976ba541
+ee3860910e852c72b4c8de0cbc50679ea9434f4f21940480f148365bcb9f8889
+9c6e39c309a84f63a0b01896d4165395618198fc9ce773a874074a2667120e7f
+3bd73ba915a657c161c04ed2ad2a25d81c286f5ef0e0fdf91f6c0a1da5da4d13
+56a4df2f14c4cc408165ad0fe1c60373909ce04828b2c333569b78f35c6594cf
+11becc7df1fe0d9980cbfc9b083e6ff52fdc26cd74e64b22196586f4b21768d5
+2fa9107d541384b53737b872b0d7b0f931eb1525e118a45764bb1945fa8b91cd
+944fbf3b63be737baad604e8e93d08521e00f8cc93052e4692f1de842505c39f
+054d49d7bc49a836c724d887c0905d218fec71b710fb0a5fd2dd736354c6b43a
+4bf4cca989e6deb360b45e8a353b712c2745da57934d5629923523686d471c60
+6e09b539c13f1c803dd11cdc41a41e8427a513e4808dd4f787114870b3bf8ece
+f68fcdc6820e82b4d537534cb2a7c81f4e6878bd0cf435cf5845fb8402aeb47a
+8be7f8658575e7fbcce387587b6563eac02d806aae5a83c185627d9e8857edea
+2fa37ab90a1aa2cacdacdcca8a23a2be13b1016b2716ff29c2a660d49d4d2400
+dbd73edf65aa2981dd46641d15f2b5bfd40768309c570d5b5bad657915ae022f
+7fd0805df33437b8ed5d961a0c65b33a6ac36a9ddbfe78169d4a6d2cfaa5672d
+9354964e4c756a20b65f1550064e435dc5b0b8a53732a97ae91c337bbfba8e1e
+87d2ce72b4577c8474a0ef36cd33a3dde20e650eba05a242065b8d1fe3c702df
+ce2f7ed86080bf5e0efd27e162ebc4471770197c13ab838945cc2df10daee14d
+901fe063ba909462ade61c130d7911c73be3d448f36455ed30c21bbc2527d0f2
+5bacfb066c0c45300752906845190fb3e76db5fa537fde62a1e7dea1af35898c
+3edf2d9e6bc359439e38d363fbc37f89001e3dec0a7b6a4a7b112cd687e7c5e8
+4b0fa42d52b534b2d16ee3ac26b4dc3fec6272d1867a390ff9fe074d449b6cfc
+93129a45a6624d91800c7e638c32c057c99673e7b57c5fa81e60e1b7a0604424
+458e1bdf2f7f77d1fd1275512e3f6d5411cfc20cb8571ef52c16adc6073a9542
+da94754c931e74704ac639fb69b227ec66d4446231bb566792321da24cc3510d
+89b59bff3d647ef55be28555e93318d9eb888e32abfb2b0276ad9483ae8bd4b6
+5f2a3876c094f8e22056b9a26dbda1b09b0ce8cdfa085c8803151de9187d5c63
+406d87c00f3ce085b9bec794b99b2365504e7274aff81c5032db910e31c8f2f7
+c647a598171a4e8b19d05b5a77f1073ca0d5f58ebef2be11c6f390af9c835f90
+9b726589c9e75687dd9ba33beb8a42b5bb63076a5cd2cbfbbd43498934b67f6d
+35556aaf2341c4d3121ace6338238cf67a76ad99ce7be30040484133b44d08f6
+e0d6acf93cbb3d7b3b860e620efafbb0c644fbf90228a339e9a5e99632238e99
+b1644b65c08859787d58988cb9b6b792aa43981c2eba7136fe17c9fa4a671864
+d39bc4ce208357e4e178a4c0ece034f01955199d38dad2b9e9f3c47ce7c652a1
+29476742bb9219514553a1bf9aba5af84a3530746f5d24795f7d79a1927f1266
+4e9e31e2d86be65a64463db3077fbb4d8ba24f577ad99d58220c09d15d7478ae
+7360e3f048ce8bc4e7c171f86d2055c61cb4e32c8e28e52d3e8a87109f5b9c43
+b3948f9e62356c4f55797f5c349ee40bdd6e6d98406e361af69bca61870057a6
+63c08cd95a45c1d49e5ded4ca719b675f8fecbbf6cae5bf666352afee85c48da
+e728a4672cfd6a669015d51c96e74ef3d42233fa3e5271134aac9354d289e7e6
+4d5d7be4433a62bbe54900fea32c6bb7863dde80c914a4d50e11db676af24cbc
+6161712ed2e4ae8f0d7407c83889a3e52486a3d7b1e4ff2676a80039d4217eae
+febc054ff700f06cbc565353cb08267b50276528e5da421aca6d458c8d381645
+3d524f1b7d143791c3939bb177dedd8000a364a4fcf6d27912cd57f8b1aae2e1
+2f012bd0049675d4b47fab974f28d57b151bb0cf1290aff5fa25e4219aa3e1d0
+e6007552aa41b3446b5624135d748405749cc1db00a6575685b8f78856607a3d
+db56c0232cec6d31608342c785fcf455898832088ae4e608d6fb63c57ef4b2c1
+055ba60b0945c580292adeb56bded15de6311695fc74c35f311ebf99702b54d8
+77a677ac6df01ce3fdc54c527c543d3bfd19265fc579c4fb688ba9f1b7233e29
+ae0355e5a94f2a25fffb4a8fbd74f6798c863a2f318b4ce0c826f738614f5726
+2a2dccf3d5b00fc8140b153f360dfcadc36873b124a035781afb7ed41fd3d546
+79598d5030a8661603465eb2ac7a615c3537ff96556dde086f16040935e04a1d
+32fca9256ce570eaa1ba42b53032bea880447949fe73fe1633a552346c930fea
+020e94d8f22f115b195d0d8ebab7a07cda81497b824bd9961b660836709e0c9a
+a7e61662b0684e925e4dd74fc97b675b79674aa3f6d16e96a1c86fdd2c6cc712
+1b00906b4d70c2b27390ad840962c2aea555822be94c6a46dd5a09d0ef16d346
+32e6e2d9563d10762b2606ed532d652b7949ab11efe383cd0afd2a92804998e0
+7559a8140c01ae4b4fb4eae2c147464cc71403bbfb42cf1bfb2e009327d29ed8
+65feaf33fe93c081568949c382806f465e178142d956b250a827bfa2c39f462f
+5fa069853ba2e2d18ef99bb53878c78ae61d3ca268e5123ce3706d0aa11c336e
+f5d8cc7036c9ff0e73c16bf7fba5d692847cf0016535be27b2119efef09c8890
+ea845adc88dae8bc41a11a861d31e86ffc64ea135aa53c1823a4e1d4aa8ba507
+9e5df4efce318b6d3f486b385377ebe65bc916f13609cea424f9c42e8921f757
+50a6c10c6c13ac5f8a5b629fdb16ce10200ea8f825280a115dd641cdf1763f47
+acad9790c90657ef835ee1d02f3d2e241b7d6749c9e4371216931887778de4b4
+60d0ce386aa03cad70c7e8a133ac4ed3ccf31d91dd0986caa5962c6312679d01
+359dff0b5a357fee803d61922367be5e97abb50f4048aaf6c76b6c65410a57eb
+77bbdaaa596833dabaedf537786063320d766fc6e6826be6fed511babaaee583
+7b0643306d7cdd12f02e183d46350bb7c25b94b7d4166666c556d2f3adaed6af
+fb36837cd861192b7a36e91b295cd832a67094197972348f44d0ce3870a0891e
+0ec2fdd4413f67060f412a3cd31a509028d6361353a5e50058fe4ea46a6732c9
+98900dec7fd4b20e6d6fec5a30fe1f4d743d0deca667b5fe871a7c68143acc21
+ed2512990fd94b7ae6fe738dd326258f6cd6060f243df995a3af97687a78eed4
+271f3dc4f79ed18dea9a84694cb969ef7221be2485c8ce9101e9b1dc59af6222
+02a8ff7225ea661d01d5370b535c33ea4202b6f1a3ec6525a56e1ea71611491f
+47bd21ca86ce6d8c924f28c8d5e5f66b9222827382dad72df22ea440726154c4
+19aa0517d06423294bcbc7c6f64940c999d9fe1c6f514c73cdf05acc4105bd2a
+764b69f7d17204e9291a1d13be111261c53b5aa1fc255a44acfbd6a3e27d20ba
+0c2d9fc7cb0fd2bf3a9cbfbb53eb0b03c6ab2cd636bac90076e486ce9ee10b8f
+e69b03cf6aff7b5a3fec75294bdf32f198d65680f6779a9c6ef6b8edd936ce66
+e9cca6bbdcf4cd0808f33175d40c3f2ab76a02d0051ab512e32adbc595014767
+1ff6c57a77b8303e50e7bf024c8af22a2c7d5adcb9ba42ee6565ffff73212f22
+5f69eec749413749bd663976da9e39c7f2120fc475427a64d578e332cc5d2ec2
+84307c30b92e8ec05500c8635a069294902bf4f2969dad5068bac49cac00a307
+0e5203b294f7a42c2db51b4bf3e80bbecb780b0adac425db4e167f893ef4d257
+8aca20afe2773ef6fdc6e07c20ed0b0b4620ff0d5dc28edb59f39ed3e976c510
+e339c4a0fc9f56524df0aaebc9d985fb6781da97e651df018635096cac944d58
+ab8634a3b02cf1376b1c5fad86ab57c5ce85435ace10216a9eb3bd3deb8ee5b9
+acd93838e9c5b26f6f02f5541ecf8e94ff33839b93e16b740beba88c19410250
+301614938b4a69ba7b9cd47d79d9f58649225ec073b8c86503ef606afcbcc79c
+287c9315cad03844d0a465ace3e83ed75182fa6de0166ed492659d8e872e5f32
+c3043b055e44b91ee3bee18777b28169dadc7375fd25ea67288c8a7919fb6b90
+e5a805a38a40f1ebd4bebbf6e26b5d5ef18e381970be0753c35de24b6253f9d2
+4a77ed4532f5eb2f464e946babea6cfb2450543655fdd5ba1d46894538dcaf49
+d824b3dcf5484ca5098cdcd138997398a60b711568f26ad6eb964de44038fc32
+07c85ae853ccf6406906bd00b9af16f3eb2246d3ae95f6944ff39b64453b5a99
+5592ab75507ebdd4a7f5ed567eef5aa2697e973e95b512549da9190dafa3f3bd
+abb118f5a81cda2103aac289be4ad5dcfa566bc51d8ba2d5b19b7bb31a484cd1
+8a84c5dce3c7e50429d637c22b29d8f750b60e65e2fe3a7316d458557c1e87c9
+c6f8105537aa3b5bc789cd7c370b741477d21af453ea2781d5ce29d20f2176c9
+9418ea8db195cdc57bc982e91ef665411741fda4f9fbfe4bb3966ac00b76e517
+c7c0988339bb8848e616a134f95078a0a5c1a295bee68499d1428ada2d995633
+39d92748fe4016a88f9d534b35c766c9f970903c0b466bf4867cf914c570ee9d
+f4ebc45e058759a851b8aa472d14c305f6410fc4d05acc1b11b431fa438490e1
+816475c1a6316c7635226b49399563b3dda5efa5b38d1a32efde767ba4a0fb3f
+3d93da113a8e3e32a33b5fabf64917251122ec6dc8165f26af07005b2da6aacb
+b7c8e299cd7cac6e3251bb812a600ffb1a028d36ce351b3216a7d23a195a9afe
+e3461a40159201f1a89b8ad3da7fccf08906310fd84eab1ae0a76589d69e13be
+ee3ba496b5c3f34757363c4f5623f975ec58c115901ddd9cf4b8e135f1d996e9
+1a438123b50d453656a44088b62fa37f575da53a2a42bc659540bc759ca7f24b
+d7290430dbd53edd3c602f2decc5d5c2e305e8c9ce56626fe5591ae3f6fc9b50
+62fb69b77e75d7e0808f984b7a062383d2514b0d682ee525b39fbad9b84663fc
+3b74f5ff1adee4775b8060b227c1df3c3b2fba8bd36cb216a5717ae6d6629a06
+c099300377b741877ef1db03047a531dffbf8dc6aca4ce0097b9e623717eef1f
+b40465ba5b56d6d618aa3e837cb2791736223243621b3c0f36e8cf3c5fa3b815
+36815d1a277411b9026a9eb2b1d1591aacbfc92b49babeb49269eecdc24efcbc
+7b0871150cb009a229b3d1665d05a796f84dea63d9c2e23af3a999f11f53aede
+953dedb336ff92e7839bc7023f8f4b868b5171e03857ac0ad870c8dc42c6ebdb
+cc7d51d1484f93106fbc79a677e97db44190ca4478f1c6e3ed2dd57eb8098798
+f3f163280a6ed0a87e57581fd663917674328cd2d1c6f720ba8c01f8ab79d4fa
+7c08f1417a9a9eedfdbc6d7c84bb796f3be629e476565a34885dfb7c4164e821
+529be9d79022b6e1268cf6517a0fc2864e4b718f4018744984a2376a822dff4c
+0344668df1caf06b38c229dabc5a8f51ba120b53ff9291b99340e46786c809f1
+912c2d910700252081efab3d5e1d96d8933b6709ec5198b27fe6c511209d84e3
+cb1aeaf13f364a8dc62bc37803dd71c663f7cceaee35e5b39f87bc7affc1dc97
+16f93f931ccb3164490787b1432be66246f8e8d2d01232ad3ecb7962b9ff256b
+886ca9f86af2956dd082491d015635e02d867a199c481d51f8751c6c9a3efc2c
+7de4970992cb00d45e1d71522ae651b177c2a5afa2ea22a1c083eec3fa104296
+b5b9b74464f293e394fe8ec2d4bb82b7a27b7b4878eb9ca6d8fda476b76c872f
+5f030a803c7b1f1c0483a96c6fbd43a97302e17b5e0e28eacca87be1015d91f7
+0ebb16c26c51a8d7efcf50cdaa4d7c3449b1134c30d181932ccd93ec16b44993
+329b44a6c3638b23521eefdd79e7200228425465b0c3df07868818cdf53d9945
+a740ccd2413b8d53b52f3f6b435f960173b0b4cff2e52cea7bf54e5002d254ed
+c7ed8f69fbe4fa8de61973454ca0a0c9ab2c2a9882f346d5ae456b074f367547
+54e4995e568d48065f9421f039c6b36d2b4baee80bec636374611123995da79d
+54a8e318f034d9245cc5f2fcb4096743366a1b6ea840461f45a74129ef2be0d1
+ab028681ab144f68f02aa84cd5bf824f06d7ebe88d55ce185e9defa29b55592f
+3896f917281ff282a252bc9e725ffafe2db8374c7c34820944991671ebc16393
+cdf712bb663640cfe1e700bed129c5b3b37cdc5b725396e471534e75acc23657
+12cb452bb410347fa3de8f13d2ae52de9e4a0291cff3f45bd1387e0b0717b0ab
+c7998d15558b3c80adc7f8d1dc3d3565a506050f3bb187f49ee8019da0b49917
+124e925bc05e633da732acaf407477b47dd9329dcaae0c3af728c577b5402521
+887d20bfefa2028e1ee7ebe6f5092cbf0493e4256dfb59d62b9f26ebbf5e3b96
+5be553da8a9e3ffa7ce4de7e428d8e02795ff5d7fe6dc2ccfde9c708233201cc
+b433e0fabcbc498b649af575066ec7a198ebd6d6bde12a1a5fba108bb34d316c
+03ff8b0368fef25689c95d3f1a1dbfdc891cedd92dbe22a037a2f3054897eeb4
+ddf01d1bda48d1eba76f5441354c342963da0b9b3f86b0738a8c58f4e798fdcd
+04882c1a3f18075e31b33c78529f4ee2fa66f09ff4c3975df960c6ba32ae0532
+3719cbbb5702844f3a84478c7e234341a02d44cc60e4390f335629b692832ffc
+ea98f9ccfcad11ea232a22998660ffd04320d94dc276af68dda0050406307287
+5e1af46fcc2859f6e91190b15e68e7aa56cf02593dc4e76631c3dcb7fc9ddd64
+6c7ab907941ec4348ff95fe5dba5d6233696b3ed777eaab40c4eaea7766f4856
+3679565c66ca57b9bf714be5504191337b4c9ac40f87b0255e22d24e4adce456
+3502c29ac30988ded18faafc96bd0ff8a268b0bf5830a6ff11cddda5929659fc
+ed4cee41b07eee3229d1241f8b0a3b9b1757e1a6cd2b53b29d245c0409321e53
+7f2c66df8356115857782d74dccbd69190852001b7bd6612511ca1c458c0459b
+1b1afc2dea548cd9984cb34af196b08d5147ab49aba60c0014077442e5b39170
+2c6c265b25a215fc6bb84931dc00156975908b76cf1fb54996cd798ea06d1840
+937c7e1caf0f5c595bc038d3689e7d4af6c15a3943bd3d5fa645bdc0fe0c7fa4
+a100b71d2b60cfe9ffc65d2503372bd5d7713cbbb0dd9481c19e5b24f987ab34
+861beac180f61c7e8ee68846db98c9c88aad992d8875d7b44b5de8e8c780722f
+4849ebaf90244b14d141264fceb58ea3ecffd9ca893f44a1d5104c6c9c4e63b1
+ced9e015b9f415690d526fff0be7ed7a93535c5f823ac753dc074d9cacd4a3fd
+c03879f8216a892924cc696b1d256f0d7f8f24850db602ddb9591126aa067343
+d61163475489a8ce2a4643c5e3db6a9608c1c506cfa2439991d807b8a3d89a5e
+711969217daca3bbee9289e474a0de12e6ccff0984f10aa965e6a38725f99f0d
+881053165dfe7f8a1bab8b24b9bfb7a382298cb7e9b625b78e53b731de5e5938
+24f1d53d970622a380d913c0db2b4f156033aa2c3a4423c5ba3be0261808c000
+a42bda95a6768ada32b929234e4c3a9d0c212f0b197615695f84c9a12cf77a02
+d446971dc5ffd7cbe68775d948fd9c9aca5d93438b7b2f77e83cca3d3c3cf885
+badbc9166d3eeff0473edbef598a9ddc5e5d50637fe9cec73e695d38e413fae5
+7f11aa2c1453c9c56d3a92fc33ad60e0f79e3da79b49c8cc77c40e4c82f2e9e9
+3f7eed0a0b488dcec44f8846f8a58a970dd88c12114ea58e1cdd105c656c4c34
+3d01f7bb5a35e18d730c3967c5b0e711009f14574d947ef626b4ed333baa9537
+ad0ad7d4bb5daed5af9903990bef203a529e310e5fee72aa629cfbaede5bde1b
+7a53c7cbf91a177fd3a40fff8a1eb215aa5ac9ecba228b853d55d54e5205d0d3
+2d68813164ff61cb3ed67387de44ee9d93ab2a082b50aa39050f11cb7c894914
+3850b334dc7db907ad6b5e7f3f89bacad3771604f0f1eb2843a1a5df85dc6d23
+bdfbaf5665edf79e652006a822f6b9dc0692af54a51860be74678b1c57f16240
+8c18a8efb515987fc1ef7522224dcd42450dd4a195c43117885d66850aa1f701
+54af834ee208ff22b3d49667cd64b18aab0c528ddb3363c1fc375f1f6c133f1a
+5e5ca1e83aa6cde513b11d0d80ce36bf7562a35643266996e4502fdc85ba05d3
+c1a7e39f62276ff85deaa199c3e357757f547d77467886ef66af72968e363221
+25b228b05df472afdf38d64dd4b846df73cbbf2ce1030d8ae964b330e8d7a3ce
+52eb0aa4f164d44d8683a6270e952f984dfc78a720775be462cbd41bc8d56ccb
+383daf0007b58e6fde73ad44e701c23750fb4a2afc174905b2554d8d95aff499
+713856cbb4cbd369455ba97b123ecde74a928afc03e2e11235b0c7373293bcbe
+6193a86693f5db6c6aa905dd539c19a5e953222e1c68007068f5d6b7e232fec9
+4ba203a44ec7318ef6a0db9d255585b7589f0d3e08e420f8ef7b612637a8ef0a
+2692f52d9b094d32e8c197d8c3aa8c671529a4012453bf23e7ae1def8600f056
+e715dbebf72bb7eeaee282c926f4ae871c495282c6dc98f191d03380337c8881
+07e6113ff0fbf360a225f354f0ed4ddf9c97d30fe5d4dd03dd929ee799714ce7
+6182e399f53969cf4c8cc2df7332a9de56dbd19a8704661d842997f06f3589ba
+f63999f94b4c00cf23d1b540818fe68ffe739b1773d8ac1746e51d8606e06400
+4eaed25d729b5168e8f4bef2c59eb953fcb9956d3f3e733591a3978700510553
+8f9c1721aa7cf7552188c2ee521116b1cdf4852ef70b0d2066a2b2e5dc194fe4
+c14503d57f7d7802014079f915f3af34d0fa4b3fd4a0be01952933c8e939eb95
+dba63306dfa0f2ecefa6f8a868e9b513f5ae04d8fa9715e04daef3225ff5dc69
+b6e455f4c8e8670f7b4c27f62f0c9c3083945d538b46edd1c20cca764e370178
+fd0e0753664691abf1be81c197fc26aef772e4cd6e3b3c08b092e84b80946788
+1a00df4bc03890f5464d453a683d59eef81734570e635e4c2ddfa34b41a6736c
+b740641e676556182d98b7e50c56f8bd57020f515d73867fe1a24e098a656833
+38039c76da859391f701e404a0218adb77abb649687e685821f0f32691a82b07
+15ab96d0bdb3baab325089911ea11f6112b69c1e877cd8f2b8dcfe55108f0fd2
+12efbd4f7954149e64e1aa1bd0d0b709f13d032d1ffd5c68bd4fb14fbd7721d7
+a9f9355767875dd2dbf55d85ff6f0378d60e81b3e37ff6bcb6031668ffaa0ecc
+cf414fe67e9261eb0f791a092f7c97dc98f9fdfd212a363bf7473fc107ee5fac
+0790704f6fb87246143e0a53472593157180617772180173d0b0ea6949dcc49a
+3f8ffc3f033bd306ef4b6a9001d34d05e7a8a200016afaaf6a69b5a10e6fc316
+5d9341b62bbc709ab8424b84d25965834f27750afae63468b791cba8dfcc32b4
+158cec29e8112e70bd237c1a180d078070c6feaabb7d35f5167447e54ce4c6f6
+0f55d9f97ce8f1a157af6b49567a16bbe23233e68bfadba699b69b22d70b94b3
+bb551113de57d25e2cc22a3096eae40bea7e353034231ec33554fba3920e3f80
+3611e4dc2d2bb7580869d0bf7cd3a0b24ba6a2cee9210164bf0e14e76642cea9
+bed0b279b01007826296ff79b3fdc11c24beac7857667139a80f0243b16b153d
+a927925575ae6315fba5e54d5f9958004e31a4acdb315b78d08188accf9a0099
+e8e706553f926d14afbd8c39cd805eff90b3993c96405990aa9d189fd66acbd3
+123e94f66d3d1a5f4061b0ae1a032ed9eb5010307a368c1c6104767bab95bc46
+86ddea0248d2eb0a886115e22304e81deafce6e1dfca09a8a8c93e7a44b6baee
+d222d3cdcc5a8b1661b9a874c1bd871a4cce7f9666d0ae94735fa3535a44920d
+6740d5e6dd0372733bebbc603d89cac8450df40be169d9bb90e3480f3659f28f
+5b2de56f7c596b3d3c2b80dd82c1f01196c301855d6217b99bfffa93b9d40e43
+1a22f7a9ab31462d3f14b5dfb0795ca0675cceddb8e7eb010b1521406689b491
+9d264bc1f084564e6a564a76437c6bd4317fcfedb47653f191d6c6b649270aaf
+d083771031afca63850e7a552dc8cde90b1c6556d49c09bcd3284956ff555e57
+77365a2ab6d7e265a1a4f29de8203a2a15756ae595a48e11b958c6ebc478ecec
+29e0ba3a7cdba448c7abc3bb6e21d21bedc9e49e730a5872082e9b2ce588956d
+b35eacbc2f3f41485b0b0403029b7a5405ed1a40d6d0a7a802c0bc4a0b1fa6c3
+32450dc5b1cc97378a2edba812918155e84e78267ec5e73f2c0bbdc96604294b
+3f840dd3d7159999fe24b2c6f297adff2074ae10a9087e2222af7bfa938a2058
+4dce0e6185a493b9c177b8238af099bd737ee30fc40381833e6a08176f3cb0a0
+504270ae6e7701a47a721d70ca5099a2c55e9558320285e4584e64d639560d37
+50993e0757a1419eeeee61f8186f8493034da3997e6000354bf0e07d948afd88
+ed9fb679b76b39b0b4b444bca762ffe47103bf812b63a2b7c26e56ae4b8c73c5
+58d0f7d6971cde60c257de6688d38bcda59d35ccda430df05fb25f2a3c75d377
+d88b1f22eb46731b7b36f8d9ecfdacd3f11f9fbbc1b4587141c4b3b9b0d0a9d9
+bac41cf6c67a995491d52d695aa14aedbbe48d49126e55b2ae43d0545d031e05
+1d52602401c68d41fd21e4faef1cc86a15dcd17c1975b2d841556017a8f39f26
+b6c0c9cf80e7b5d9488f9d4b08564c8ff25c52c16c3d11ee55e18dd3462f9436
+ce1e4bb7eb090929b4816aea6150fea2659389445800576aac75dd801524bc6b
+3f8852f9a999c05c7b29820afd544071e9432ef5cdea3610acb574cca130ddff
+aca7b6ac5a6d86758edcc686be2a61b6f5f2a3405faf7a9b06edc40df07b74b7
+409e2a172430b1d504b041a5c7b0a4107bf60581e1fd5e43a5732ad62a2301d0
+07c3a3489e8ed7c963cb5ea2bb5f4befeddce251c8fa914c424764311d16c7d4
+1e855f4b2fc2d4237ab0457b3a1752971bccd0e321dea65684d0e44a73023a19
+4a9823950a620ea838eb5d98f9959992f48d5ad23be313438385a6ffb29362ea
+a69f16b642066ffabd919bbccf49db54550299476a7143d3d89a6c1a18e94db0
+656a51dc9d77dbb58568b3365ccdd85d0e98097342559bace953b33cde10d826
+8a3839a28d7c218bb4b0a31d105c5d5464c2fa0ae31f69994057717892369191
+3b67d16584ae555dfe1aa32d4b40d144cdb9584cc5777d1e30429f09e0fc25ad
+c87af39d21328dca6c31be361d2382b2c20435e255c6f3014f052e8f4d305a06
+7b3866bfed5eb9b9434909f117bb602c1b743496c9ea13dfe4558b443c347a96
+6665d7e5c06125a8aa4e906f7cc0bc04118a26e9129fc23a63fb0eaa010deb73
+76fcce5d4a3d4ae626517d2d77550c50f7a45b4ade74018b746f5aed001cef52
+fec5e73534a2de1256ada58aa26e5bc0d9d848c8d0a7f42dbd7ecab47d6be1df
+71b7632ba5fdfc28fad09fab97fcdf3ba729973d39a5cffdcec0d1173be7e7d0
+85a59a4504617981421dc9600b2b65fc122d34ee2fab5640893e34ed50f53037
+102330d718f7c2bb7b9f50d18643e04af5c860215f7211271fb2075e0152d85e
+c440a933a87d20a0677ea2717baec45e8578a077805615c7d492db713259949f
+0392cd91480059059dff830b24e2e6e5c715efb4aced3dc637f88cf3ce57ca45
+2e96edc986edce66a831ee92e6e284c72b1307ce4ac479e57014d5114a9054f9
+cf9fba1ae66b0f83e173f31378fa74e8b087490bca05f77da7842d7167d8964d
+c59089eb222f1a33963622a9a17c3542d9940baf4d1b8d68cd4d51f16acf31f2
+91570def9261b67da9222acbeba21a6f3fa905e081be29befe3152b326902afb
+bc6a57c110bdfda8a5c4ce8e272eabdca671be16f4eb7953d1df46e250acc0b0
+674deed452de3b04f258e081110c5ba20a934fa9180abc09806e257abb22041b
+836ab3b73f5ea8dd1dd8cd56216d1bfee9a8ba78d83e2cf0935586c0cd7340cc
+5980e5ca4989174cd46fdadb86398bbcca75c9580310422f692812bbd8a91602
+4f28a49d35ca1c80d5c6c7b879f14d037ce98c0be18eefbca8acccec2fb01923
+69154709b772b7a13d2a9737652a1bea28da5be3815867a952fbdbdb8c45c347
+afb7d7de74620d97b52a6bb27d2b25fc3d0515129eb92be62f7efcadaeba61ef
+88d82df3daf2d1b0a117493075b501ad84ff1650bd7196a1e481c393de324dcc
+c50ed36647ad32f2c8c1820aee9190126c1e622d1f686c71855f8a50062abab5
+54fbc041de1cb0f6163df274e0b148cc24ff66aa16590447b5018474e5bc20eb
+77a870366b3ba577a6f484ef97c606cf71f15470905be27bac6fa4375629f80c
+b8aef8957b856abe4f885c47acd94a7a32b2d81cb5ccea65a52328820404f5bb
+512ae315f257f6196effbbb484ae7c877ca278a1f086e771092915d375667811
+f874c618cc6a117310287382fecd5fad1bf3656f9d41c6b798cc1f6e6f7f789c
+8eab2b1634cc255f999a72ea0e3e201a4335558e1dfc26a8b02a8a1fa55cfbca
+d1bc49f81b8f7837a29d7af533d9fdca050cbc2809ad4cb54699131364977a03
+775148adc0957ecf2d7317ee6b582592baea2f25d926a1738df65b37a519ab95
+a99bab4dc07e56df6e4ebfa0a8e4d8f90693f8de9d1cba77b3f11dbf7b1eb907
+a381fa256e2e943d68e773459c7ae4e7ff969b43d5693b5b612fbbcccc4c5411
+49a3dd6f01ba7bb3d11a331cfe3734ba2b9e1f8a353be0f7a6a0567e1f0acccc
+0e5f27eb18fd60d809ddea01e8d6d1e8c5f59b9554910206ec9c56e7c483478a
+1e4a4cbe7bfc97c7c96f119726e45d23b337e547667281022269e8b66dbf241b
+d74d3cb856da025944794c90cd5196bc8f3a57869c9f9647a0faf133263e96d1
+78ee01be0f6b67db214b2e9c3f10aefa22e7e0dc1ff6d463a2cf77d66218fc1d
+9a0f754c3681591d66f8c455a85e3e7d396fa1cecc04b218a892da24ea8dedf6
+2084965bb34be5e897a6a6c7818f0cc42be52edd5cd7c45cbcfaf89c94569343
+de0c4bfff1f6120684fed8652a071b6587f37aa970b5be3e8574918b97cba372
+81ec8e16a93fd111d796dc5833b76f3f3254a1c126fe28e103ce61a0eb89ef8c
+9202f06e04949602431a5cf57a940c059876b3724e461b7cba19a398427e0d07
+8a88c2eb0f9d12b608d777cc1558522e5f0e96362ee59cf1ee03b1ba9b864bc1
+d186152f24e7e28b92e3a799b23c2416afc0820ecb57a0fc36f44b73aaf6ea3e
+3b952de790af21f21a273a5c0f86ea671ed2ab467469a0ebba738b6257ad34ff
+499b8e21a77a5685dc1de5f21f8ae20d85c6c921f1ca434b67e876e9d3bc0136
+dce9e8d97c769e07e7535ede8bcc169bd38b5f3881f94fc7526ffa91b7870255
+f62e423e2ea2946faa96353152b56ae03010a42f15cea95dd27c89a4614605d3
+636f44785350a920f63f0cbc5566aa9fdfdaf29c109dc83169b3a64ffb0a7c58
+084a88d385ade5c3273c02f809e3dac76dbad71e76462d909348c609dc0bc7f5
+0cbe05994df34bd38feb8b5876cf5a50989a44792c36f0a989084acd73cb700b
+64103a290df126dadf1449a45c713a71353969d41bdda892871644f895fef631
+15b63299dc61de72c7201d8392dd3f10b819b792ef91f1bcddf9f04bf3b94c25
+ce81c6edced5ac26c9cc0e304683656c9ef456b1b666bedb3fac1c597bff1d9e
+932d05de433889db501bfa1abf7158b428b24a0d49b467b3a38f916601c9d36e
+22374c7c96dbb04a5de8ee1013ec7d8515a9eba05c41def2b8af7bae6691abad
+51b58b489b3b20f3276878bd520e6e70a9005ee6cd9651199e71269a9dc9e1b4
+cd24d01d37448b25ea34d6e0ec921c4c1904b7c4deb93a5c6a0c736a501ce7b3
+5e386a065c1f5df136c8bb89103febc7b9b3de8f74e0504fbd7ff702c5c7250b
+881e83499ecb6d80b3f9d9d17aed8414a6e723603c8762a3409f6766be726bc2
+79f70435a56a0e096209231f5b0c134bdb7aa6cb3db9895720cd02b9dc0476ca
+90c7a9ed37ff0b380348f66d85037e9abc95499cf6a3006a40c3874fbbc4efbc
+93b261cde619c9f86a4203dcb642e59c59709dfcad0d15235264fc7923227094
+ca105019b1bd20e4bfe5f3ea8edbc33a7bcb6ebc523533228ff682e8a1150aca
+fbee38b10517877329be50b45bd87df864b02c6c8cb5125b01e79c64048ddd3b
+7bc817f3998adc78819febb2d81c7cbfd179908cd36b7e5169218b449cfd1a1d
+d0979eee4aa2c2f664b9532775113f6d528c0e7c1ddf7f92738b1ec1c903710f
+9543712c0133b208a9bbafaca0a5ec4a087a1e5de118fda50b4b79a658e73a04
+ea556ee2b9891278e414984da3dc6d739ce951cf058e2bd79d671877c4d5680c
+2a757744cfe0cf31bf587043af1acf031fe82e85f1199c1e606232edd4501949
+dc70516a3c30b356f35c2b4e14fdc62abc3cef6b7703937a1c5561694b2e2022
+457603ec1210cfe44401a8ef8e43ab2c2244428c4f8138828f2a7646a8482b49
+00a7fca8dbfc30cf7dacbcb003d06c36644d61e901114cc5348ebf805af2f70f
+84398891f59cc49846e23463d89ba78dcadb3efe0f1f00f4b45c40bc0d2f3cd7
+63c231487557e68ebbb01cc9f96f246e9c2634cecff4a381dd27814e07cf1eef
+75a68378e92e56ff486dafb1bba124ccb1f2e9dfdf43c5fabc0336d8f237f9c8
+c0a656c7691c674c0031ec4531b6e7adffa69d634c9af413fe014cb6464b4ba8
+649cf7bf0b6ef90126d312c361fbf4618957798879d967496ae34ecdd53985be
+1bcea07ff99f19a7bf3dad5bc31e1941161e60b98a7f78316b95db862315bd25
+c46474a7e5cbe24c54f54fa23b299901cc2488480d258db25713dc97ab0e4b5a
+d66bc1131efb7296f2edbf6d27734cd45603cf5c1e0915dee25996df850dfa31
+13e23c722aef49ad2be71db794c86926c13ad66f17d8b8de2a4b66d9191afc44
+2b4e95d2cd04cf23374f172a183ba3d6adf8b2f919f14b4ab794f53531aa0da7
+fa0d5ea6f4c30e24db53640d51248cf1001e7330286c1668a7250d3a0d34f84a
+7acecf297caec2198b56eb1b9263ba531658d06a3d9902c3c96034cf79f4038a
+2859c9e47088ed6025d59a69abe6c86ffb467b4d8b44028fcd099729e37bf8f9
+5584763055731e7d7ac8b76765955c5c73c00bdbd426950f69ac97f55f9f9f2f
+bc217e166c442e627ee893965fbc7200396403b1f52693f6079886eac12d3553
+a02944981ead829e3bef62ce5d9274e039e305c48b23c604a86e6d816b649faa
+ecdff4777472f32094796aae48960b0f3d74e40fd1e4e72bb37e54322c126341
+039c3b3fc15a137fbee162877a2b1a27dbc2cb91b9b8cecad345cb00d519c051
+f46df1f96224e95646e02d4af7739638c5a261e36e46be731e3425d8f62d25ce
+5a7f1e72abf75237bc7109d0f6503b684c728a888ce8a67d622a298fc09d08a0
+39b7508db67d1fad998be17d49438696e9c402bf6ca7e5ad7ca7a1450e04d17c
+2b0fa2feb0b9d5af5dfa5367faab7b3e2f104dffb5da896d00b890764b83543f
+70d04bf1fb56fdf0a5873edc4124e42b1546dcd43f4896a2b313617c5675e84c
+1fb558d1b944084e431c29a8b1b1ea67f22bca2ea0e503c422f13d3d18c16dc2
+2f8215c71346762875d4864e20c107f50d9b42963aa2185db553e60af6c6a6a9
+886ed38b48052b0cce1e5b3f2f5d96975849eef01399553443d2722f1fbe8266
+aab7b8c1d69ee6926c1f916c62dce7a293589e10141173e30b5790f18763f1d8
+e1168cac05882de798bf361b1ec201c9f5fc970e5bba72515ecf3ddfcb14a6d6
+2f38cec6004fca8ec75d0b2ae1fc8bc94d4bac124c97b770759987d4322ae181
+55c7a1d7c0d3005385eeae58b8a07c556dd439b676b496682931327031d68f43
+daa631dff340b8531a8f1cddc1f7061dafd88109b78958d52acbf458dd3ee2a1
+fce78a3e5a8ad9a5314464a53699701ce17dfba2e176e9ac0f34e1692224926b
+61782f6ffad4c6278a32b1bdb73cf6b8b2f5646dbea6de31b2078cad5a87dcd9
+04ea4e60601f7547c1544b863ba383ee95ceb4a42ce89e815740e0abf8d3087c
+637a29e0645de6f2edd027cdd56e8b558dbd26e9582186bd5b4792500926f8b2
+5d0dd38c7af1ce0e2d99942b0099757140f9dfbd514c38e3d15e502dbbc34c0f
+61e3262e48f80bc3b6f93ac5aaab909cac3b776094c2a101b0ef5c891e28ce69
+9ecbbb70fa9a71bab19a9a4ae49f9316b7dbdfd63b43db9aa064df4092cee544
+7507275807a430358ff0df98f2fbaf716785742ba18888994a8e2b54aa0f6fdc
+07feee88c4c98951495943bd42b395b92b545cce05be3db4a0ffc43ca064ac4a
+9baad9d402c97fb79b8f70184e011f78d8e96538f4ef66d45950a80d186f3b96
+56ce530f019a1269ecd2249f6514a6b77e486198ed8e4c28760a6482b1d3bd8e
+8104a8c964154d8d23fb33f0028960d92c5bd3dfa6bb390f6dc708a9f4fec7a3
+7327a97723acf7b62070cd7dffb6aaa77505a05fb292c54baaf428f9b81e5ded
+8c92353e46081e4fc0edf39c53ad0e64a29e34aed73d18e25d0fb73134ca03fb
+382c1f2d703e241986e9bcb36f4a9a45bf183e5898364d95369febc1c8867d7a
+77b76f92c3668ace60e180b685698d403b86e27cb9725405955fecf496aaf327
+e4f5e75ff5123402b23b0e8c5f7cf7ccf1364fbc8d9bcb94f0f3f018a2902f61
+ce2e4992a5dd21e2432a6f412e77b13cc968355f9298c0fda7bef338086560a6
+7c774e05aa3e6d1f0a3b61bc1ea89cbe39423ab0c3bccf10e091a76563ff8b09
+c509f9f69409b7bbe8ccfb574ea7a80cb1ff7502388b4969f91f319e0c609bb5
+c3ab477330dc67d7d900f2cae9890caf14312ba25c8722f73ab0d9b0c884aafb
+b548a565b92af0ff6940d36d40442671cd9513f93d19107cca2462d5432696d0
+97f56f580721b0cc583aee69922f3d0209989ed6e6bf55e70e293c0c3e89f0a7
+caa0d50b519ffe06b5e86068deb84ae448d5041d20e03955b5bbf0d78ae45bbe
+2e548c64687229f1033fe264d1eddd5437e2519aaf8d1f7f2b8acff36cd650a6
+3cac39cb7c215c7b34e29b58fbf5d8493cc1bbc9e4dc92d8df9cbc28cb3884a9
+b5031e13c12ea77e63e74504fb6609b446ea85900cd8351853e71bbaad97ef8c
+14c8691ea4a1b39c94b7ffd97605796e7125ea5a6ef7cb631ed1d7805155f6dc
+d64e6773ab236b4c9eeabdae300229d4710af35c88f3a61fb3934dfcf4756533
+bf1a27c68f82bba998f2abd86aab3b741fa09837a3f32cfb5f0a35732c7df553
+1277c984e1c32777107cfbe7962971b6bc352ef17179d94a3accaa0730f3d360
+ccc9e41a9d019759443990c8ad253b2726872bb53a3e6217b3ecc57242068b70
+1116465f90b58a16e703ad75c3da86b2ca6f6e2f88ce00a60175843321e6e6d1
+8e1fb76455d729634c196a8048ba1d7e399b7e5529e312610cd6e38e11de0500
+47bf6d8e7fc899e90a40f639ab3ed83e4f8614245ae7929da6a8872a15b3b6d8
+c0769d8468fa9911fda9fe875c7f4532d2cd641d8024b1b43de1d9fc0cf0dd55
+0337769be1a0da6afa42b12c8b3d21ea450df447196ed23071ecc65385cf7111
+d025b3d4d396fc2ff5f814fc7b249b88c012765d66402a3cf926e3769522c650
+62336560b22fd0865350c75541ddece29da646b137d467aea2b14e0c8a9d004d
+c914e1e36247f010d5acdfc06a5a86477392e6b5df8bfa0201bd160c16edd42a
+1611d8569db8d294d64cd76f9132970e961a57cbc9478fa37507f44197d73490
+3a6aa1706d0e0b4115e3c6bddbd4cf4be087fe8cdde3a8d764b299fcaefbf13a
+2f480e9385aa9db1d4358cecb9958ef760f6dd14459f2a93bd2d49e354b7a672
+8e6bd45f17e2c6d86512f24234f1e8df4e5ebfab6c094504041adaaea0139028
+5b4223e9cefe6e67c7a055c9b56402202fc3964989ae3d435ab73b071c022aa4
+6c2226809e1c38f8436f42d3ac3a262c94cd71383b50dca30ca2d275ec463405
+e7de48bbfcf53a152083382b8426ce804c958b9aae95a13f2575658991c91988
+e3af9fc6d24986700798775ed0edfe717510f248d3fd68a5e229c9862f7e5850
+1527886041988bcb5fb8e76b80a5292e982f25d51a97a594c4bc30a0cf3739e5
+6381ee320c7a2908da6732b29184ba5312b24e0935fdea476a5aeaa75df407fa
+4ebf181d5a15a5ad7d0561ebf0a4e55c220a9beccae6fd830c0fda764583cc5f
+f59dd84c9c2486afd7039eb22a657ebcb48c5ca9053f9c6671cc6cb448897f01
+a33036fc2438c9afec583261506e1ce938894644af8d14b5af8b020f0061502c
+685d2919d5babfcbb1658002a2b5b6f5fe8636f4addbf97dc7c28eb93dde4f93
+831cb9aec8d2d3f6173f16d4c31ae3871e4bfad4b652c0f5e11af2270c983cf7
+47e3d8ef4619c2d76db67ffac11988cf3e7f6a2976305532a2a2174656a926fc
+1e9dbc981c19937c1fbfd11871ab3b96599182227ba0f840f29bf8533d33e4c0
+052e60cc0a266a97857f7c6bdb412ea779b4094a5ca237960957dd0fa2a37c66
+97db26e03b892bbf9ea9b6e39d131f8ceeaced68e12b7f2ce9ac64dfc61009a6
+a4959924651f7158dc9c25f3e603629c979aac5c308fb57a460f4229ec663d88
+51e6947cc40678dfc56e8472f021d3264c06a3b76cf1f77f4b4d0b1886039d3f
+e166d739bafe7cbfd72331c343fdd7395cb8cda3a85c735bb35a286090b6055b
+62808bd999289763d9e433d22573fa3f069f40aa45df44cd9e17e843e9841828
+d18b10f2325aafb6c872e26486f9c059476a50a4a3654ea8ae9e7f6fb7496a4a
+887054819293cfe78eb82ce32bdaf4c291faee9b01a04ca557cb09e614d0568b
+4fd1eb0cadaa3014aeb0325eb68606f07885a5234e54e76ef6d9769b80e640c1
+8b21a8f0d80f7029228c704ac5d747edc455493f33e844a3b450f36141417a52
+0677fad5d7812b65640113f8daf1c45aac012f587719d26e84e8f98cdbc9e3cd
+a9e148ec08d03ebbc9e875b21ae8a3456a032d39fb1e726effa0b5039871cd72
+6faf210bc4927de53fffa0d987c2232bf27dcecda650bb7d7ebadaa7036079c8
+0f067aa09ade73b0f22f92ca57ab4a1873ed901c7eb934fef1524824604092ff
+6f255608a2ad18636b7f69d842764c672d3392b35b7e12ddc355aaec9023f8c2
+730ddc4e7b49e754e7550c70a21b5bdd7acd0bde562b34faa2ecbbded4956cc6
+45747aaf479ddf5269180428781e96f3589ab47bf5d772b0a6a01eda4dbf27f1
+49cc8d9fc57e95245f9da122f1e3b6a31ca21d7bce9e846b3484bc32310902ff
+acbc3b5e1191ce9a65878695678a3ea186d03fa6cd13b1743f327ab65a848d30
+1dd0abd9aac5b38e9f727365120dd5024f3da20c5cd4f6105490e3e45df85ac1
+300a041e5a5ea1d8d882bbb1afd4cd7156f19a48f43ac58cbab60674b4daaf45
+7528e5c201d32ca7e06ff8719b79b94d6c571a99221e5ef00c8bcd7d82ce818a
+e2c4f8b426438788ba84c02e7c9395b00f9780b7770facde25094236e106c405
+14913fcd39c2d2b0d084931cb5b4ebdda3d91d8a25ecdef23154779b30a277c9
+509902c229d32557328bfb32b20561dc38e88fa16a9ebcd74377ee96dae69167
+87481289a5d322e9c34dce09c833d7e479200afdd9998669b16a30264e72ca70
+f34e79f2c544ab96c323dadda4c9900737121d68aef6978feac182fe1214b1e5
+e2f3321680eb5f0e6fa1f2bee600b07db3d9546954fb6137443956de879d58ad
+cb7d8a870f12a58c5475ab59790565de421f59b39e643ab54f38a94336cc0f6e
+c5c54c6fe6f61d6c6121aad3b9b1d66350061d1679e795c252dc429647c83d29
+c684a07d0b41c72a62be91564cccf41edc5b079b2f06e6a9236addad84d0fc4a
+b5d3403b42c9dbe80d119de3855e1b17498a9c2e827f4a8b85736371e39bc01f
+7d7d14421219d136d182783f5d6f8aadad83109f5bbe65ce504735367ca9b26c
+40e10288fbdea5d46532331eeaabcdd5ea937f1537796f43c7a3ff713ea2c86a
+2f325acf06ef921222eaaa928a4dbc95a9a720bdcab273737e7753294e42a8ab
+3a27daddd130ef705f2702702f39c84de8e5de998f507bc54a69de88621f1968
+bc135bd14c3ce226befa65d8e117c7dad682ce6dd839c443e5368b1dfcbb8cb1
+7357d126b021a47bc4b3eb4967183f4a5ad66bb4ced909993a13f365604432ab
+42bbda92d93d132d4194a64717c65d6bdfad697e3e2c1b2962382d43cfdb20c5
+ed6a61484b3322140ae300953acaff45077505701f7c161f108b902734803f93
+b6e89a2cb7640388248e2c263135f0dcf9d6945f8b648c89ffa5d39911bf196d
+24dd049e561cf823988605fb0b3b2b960be8448dafe7cb335dfd8870f2fed3a5
+ad8784ec4c5835f2aaac6a5f7fdf8f15e1bb5f28296f6af7f8fece5ba290030b
+885e30d245ed99db82c0d669ac135390af59032d6b44b34cf43df8b7e3434bec
+eb8794acf138dbe43d028c6bfb9b27f2690324f201352eaa4f3ae5601cfd4802
+81180cb05c6bb3a90948f261ae1e31edd7b34dd8f1dd2451eff15bc7b881e47e
+98183454b03554d5aaf541f087bf56ad3087681521bf3c7b84c8047d3c23b02f
+b80a55f6a26ea426feb545f7075a84d903e1ee6386e8bf13deef625de5ebef1e
+5d693c8fde15c264113394b035931bfd00308cb7fe9b84d4b18df639a65f454a
+9136598ad3f5fe4a71e2d7ee28ac54ab4735957cd1aeaf5b91247426a706415b
+1f974db500682c188fecb8ec291a81647d09c3326e05a671e6f406140d94a86c
+edccd20538009a2867c3fd9d8b8a703de2f9e2dda4a495f6c8adf2d8da8e06ef
+9f21cc11807dfa35a9732f9fe8bdb8f2406552ab3d67621d23bf5f425b4dbdca
+79a2796dd74cab6305c5a8459e54f5cd6d8ed1768676386d19e483f257b9fcee
+1c8d9a0ad09997343314ad22fd713a49b8a7da1e2302ab57360ac15abf917f4a
+930dece02b588a0564271e207746e4e7c330889a3f272e85120c7d1348379a95
+80f40a595b1a0f939aa46b7eb17d07981136851acc677e78e8715639357668fe
+fb162d0bf9e7b58eb0a0a8e3040de3cc5d6ba9236cfe5a921dc2342167ec9d9b
+1a6ed1b7da0da8474ffed17740221cfeb7de9aad199e58bbddce88ba826a14aa
+9b11abcc6f897453ddca5565a096a79125a192cfebe71ed37b5810f13fa07e1b
+286bca46d8f8c1e76c7ea100c2dcc5501653c7cf156582152bb6aa34ae041580
+6292f09c7c3ccf7581a1d1828a99866f5148de42ab060932d1366c2bd8104053
+f5d3744c9d825171812dbce8ef600b937ec0430f4a6129d69fefbefbd94aeaa5
+12673d7ab07f05528c529d4552ed20f00e8bfe54721cd959ccbca7f5c1850168
+5d5ab669a3aabbf6d431a429696274df399f3cf3760a4ac9453d407b211b2bd1
+b8416c1c23b3e68343ec28cc5e520fc2dacff7d41274aeb8f77beb6174560e35
+fcbf7fc20042393bf52b5278402ac5cd9f2e1ecd5a9dba963b9acf08d78cc5ec
+33bf5c620b6f5520cb781a48f247158899cb347b977cd62c54cad66c7e6cfade
+433e5be9ff8af602bdccec15daaa4316c8289921d19f809c20e68fca2b71db82
+df2bf6f0ab9d90b9830d399d838547fecad841b07fc429abdf02d544b41d5e31
+7655829d65c3c4eceb08dedbc1b2db023ad5e524ac9cfba00bbfc2bb2df14d60
+954d55560fa6e2ff31786acf9277e5e2018ea2f839873e3a4cff611d83a1cf8b
+7ea655c6bd34c7904818fd857cfcf4a9b39e5fd5cc551655dd75602a432a077e
+653d3096ebdfe93e0c7c7fdb0e52ac0145a5857d5bc46daccc9d9bc048cd6e56
+1ac2f5cac16d537abcf20dfe3c6aba54f400573da27a781dcbcee2bae55db664
+18f8f003aba535662a2c891070ae99839b4e0fcdf5ff9b7201ff83bbc9a5d39e
+bb61de440b63d08fe86bbb51e251a65501f8ace59ec1907c1268c639012974f0
+d8c09babdaad610d2c065174687fa1d783dad6567f1bc9056b4e7f90796ae034
+529735bb2c26f89166b67385c0b3ea8befaf0d3c5d2021c5e95f332659f57c20
+7b74c058fe712f9f6f7bba2afa24d922819590e2fdaa7b44e2b7a401fad4d28f
+05ab33026864f395ec60b658d42784533883b1cf6d5c32baf24262d835be78f1
+eb7b30ab043abc420085fc13622e1eea3438d9736c4ea328912fe1f587d4252d
+bac29ae8f47e156b7183c1b79034bbda31e08619fc106ff4ab743bf8b9d8bfcf
+a8ab6b810c1e1f862201010a3e3da3ebb9457071f5bfc811869fdfa0ea873a0f
+fc47d86b663bb3309bce467a81d6f757f62a195f7c6962a729794666635c8703
+db1e2d71ae67d5dcbae3cbf5b948eaae1e7e7ee478a0e4584ed70a019449b463
+9f812dea0ca7e191c9698c48defd784c76b4692337749365039b13055ad9114b
+1a456477c879893ec3bdd4d34184ae5f3e7bbd8b8ac1abeb315540673a792b21
+6473e225bf2b925d77276d0741cc50fb9ffdd34459642d337c044cb4d58c123d
+652dffe4dc9fb7df87bef364cd7d62d8fe7046cdcf4b387798754c409fea2867
+c3c3e9603e79d53c02465ed8b57b752f76477dbbd1c8945522901478aacf4871
+c3dc4aa90b10c08351d608a02d168a5978fba8eebb48ec93653a8e178d44daba
+e42ec334aea08544a01dd57943e050e87fdf8200d2cc475c02dff5ab8f90e58b
+d3efce06d49ea472df3f149b629059dd9e839536fe014503ebd1e6acc1c35637
+bee2f01138614af7521c7a9b0ad46187f168e387a095d795c067660f71b43521
+7132c561f442b12f84e183d1f5dc887b3e38f904dfa73777e7bd7d3ab6e91fe8
+fed58db8f42e4b65856d633c75e5c9f27fa20a7c352f30d2ceda868f61fc0548
+f2ef8ebcaa18fcbb4439ad597a2f2d89ecba33181e770d5e8b89d95ac0c9b137
+a8cabedafbb3a2071a0484c54dc24ba3b00314555dd3268690308c839cb0f0e0
+410116d5bdea76dc4e37d89e5262df1a2d5214bdc3287a67e7657cf5b5f66892
+0e5b549eb0929093bc809afe32a60894d7d5dbcc546b0664cdea07442c75ad9d
+8bcd96bc17af39925125ccad1a305829e9054454ae7db205fdb3c459836ae540
+ce773785b55b103bbb400a6472c14b125d85426138c06d67c5944cd0cb27b224
+e1dba5ac9631e37b2a3ef25adfb0271f729f6c4b9402771e0dac6068e12a0df7
+7dfe8ff7eabc22211bdc35062527e1ef26da58a905331a5062c66abafb46feb5
+05aa06ae1a4d7e88143666dc8a7add3f049fdede30f7785f968dbb0ea2de8bf0
+a08da2f0c9473885963b710f96fed7751c4ce01b4f954e486325488951d4bf83
+01662f9bb15f48623f8b61c7bf7dd47fc35e73669f03286ac8b1d714dfb24415
+7083b0340c5535e329f6a114070d01df96675ca34d6a0280ae26e81a64ce055a
+8261cf5db776cfae5cf1fdc3f8bee14efdd08b832ac93ed7094b7e57a02b86c1
+574ed345d13e9f9ee91bc99fff620fba401de9c6265a1ab696a581e15a3e5d56
+dc74fc5c276b7d1136c94e1816aa95c0f3207ee25769b17948d9a4aa60f7968b
+e033c5e124780bc4f532ec96f64e542a0851a75664b073dd16034e76adc06931
+5f5f2492fb97859d59cf2f6fa3a6053caf4013c4f47469b9bb1636e7017a0c3f
+5d90c8d94894613b51895a11f37e9f31fd98a37bbf4cc1e01e5420556160dcc1
+25bd769c66ebe645bfdd4eaa9c53d414ab9757c860861eac507a612a9309e5fe
+e75c85868fc360a41846a8fc79b60a175606bce995b584b5d645f9223b7b3a3c
+e4e249600921f783ec8f13abf5aaa3b5008389c46da5721dc304f56d7ed99f40
+264d7c378d96a6d1a960cc2e412a85fc3a2c47c6f70edf2cedede7cf39d8512b
+9679bb345fbc28716239bd95246b59d21a9d8378897e9c7607af76ce59e66ca9
+d07928d73ca7744dc5cddfbdac11468497cfc89dfa1a24b120753229598af48d
+0d2e6332a73189656cd1f584496e6f3b1552b04cdd6e51a8388dcaee3dcf8c88
+072651ee9cd44e3cf938172570ebb994bb821bc04e1a7723e16ea720bd8cceb8
+af7ddbb6ac14a58e144ebc37819ce9f2e78c0b8e5f68ed48a5529e47b2d9a7d5
+b381bbbf863a318d719ac4e678cc1092f721b5ca28430dd1b597004390ca2a34
+a54e73d1d8a556c14c4f04eddb0adfa43ce6ec57c8fd98ef7abc2cefbe991786
+a58ff65ee2bcc0ac940a0f07e367c032f0a306375948b54546c7379053ce25a5
+707d9c54aaeabe39fadadd74e1710f617d751f7751d396c5d054d28f93314ea1
+0e6803b627f3e1a1b2a2c4f14a8e9f9da3a032f7bfd872f86470b2f50e7247f8
+97ac03b1a4fc9ae5fe6dd088171746706b39432cacff853edf1b2fe87208a44b
+c1304b88b88f70b2c7596cf5ea33d9d11317da7dd2b8497aac6100ca08551dd2
+a57ce4efd1522a62f292caf6e273878073c82f48a6c9f10c42be92c439cf49aa
+8d4302a85a9f6f313ffeeef59e54aac64b7dbaa8265613f46e62d9a93b3e5740
+9eed68eea907fc84a6ad170b8e1ca16b62e46b1067f28eb6b35756c71443e0e7
+f0ea70df14dba384368a68baef33b7b2105085d179980d6622db47c1dd4f027c
+0fb25e8b1ed04be113f6961107c235eec39afa4db672fccd5c11737b22ca2a50
+af750d838462311c1111d31211fc41b76a96197ed5f62505bd627efc44c98cbb
+12d82f9969735d8f4f36e097ef1cc66629b901cd7d530d74521decc86ccc0707
+07e8a5208fd26e0fca9dc03e4b5b5bb6ee8d899d439457f139f7d2eaa4dc6676
+a411a40412cf8808cd1e9ece8df377dd30af8dcb28e8635c0596c9f68728a877
+671ff5872c81635145e98e055dbf7eff602a4cd98986e49a26c3754b8a264b99
+b53dde3ac4448ba76a550df75661094484ae263c8bc0613152890d17b1a09774
+a16fec15c779257a9038a6b81ce29162050e1fcdfb9aa0c88dad199a74470938
+21b4585d40e628823c42a45bad0c67427ae3dea6367b69d76820550cf3b9820b
+043f6c646cf42d20f1241d0ce8196b2c652e9e10278545cd289bcf37c813fe83
+1a437c6e4991750aa4c7970e200b86ec8e26657deaf058e633011946e8569c27
+fa7da592b78df95c94607eb1779393c5c2b4de50c425384431505a93cef43c13
+e042c12a57eeaa2c48d002369aceedda1b7866c865c8f043bc4e50d824d2e312
+04bd8c1a4d01a688bb2133a4ef37b858fe1de27fdf8e5382e4a3f323e016e151
+8b1da5df2706b1d76b72db59fd5753e23b41306070650d6990cc2e7ba3014d2f
+fde0d8e36ddc3de6917bf3ef03c84f8eafdbfa7dce1c3007bb57c3860f65e991
+13cbca57852b97ed21a7a55ea9f0803d13accab45fac1e4009be81d3da217dae
+45b421d6a76150d7997de83c0aec3d7c09d5e0cacc5678f2834e21c22aeb8ab7
+aa20ed2112bf7d3583cb287740f2e6f828f9d07385eafed61527d19055cdb129
+e1e5f1326edb56d107250346184e4580fe83bf44e2343cac0f366e04dc9aba72
+0261224f33ea17f779ca8532400edad7ac6a5868a0251b030360b1ec93aad4dd
+04caa52edd01246e2e275f007849b317394f9ef09064dfa18fd3c0b32ab4073c
+855cd08ffd407d937292f54b0857c281b0d7dc4ded8070d8616e92faac8fdecc
+710a60c61f88319733d888795c8b45ed895fd29863943b6632336aa49c2fe365
+752b6463cefbc1fcec8e8ace944ba4d35a4dbd87a519eb5ce02348e106c3eb9f
+a57577ba58e7d357e55259f182f72c426eb9e12daa1cee7210f75cd7519fa1bf
+80b5b2f3bb7eef8348e39c270336f4c96a4e458f71699be5eb94f26d0c7ae5a1
+b815789c4c038cdc8285c6394b442ae05dd2322f5aa943badddad4449606020b
+f0f63647645d0c1cefe0a0e4964c2f2c9df5754c5d671182d8e15774752e06e4
+f9bc5cb91fc5d31fe4fe2f9bfcb53b920c22ce8d0c244851c9433f2d8f9d00be
+47a03a8d4246ed7a9a9bf27235f7537d071a6208b6eaca1b2b6c7c43e4354a23
+b97ba4ecaa7d93fbb73a4bda88c406a9a1fbd9861252f03b2385c3517c321411
+2f968c018db6e3e3de8246c05da9f4dfa2b5d0f2cd2fc3ccc8005486b9c1d1be
+e1e8c14ffa77b18c024a98dc5a38b6b0e057d80111e7d2296414e87276c13da0
+e550c489381ec3da91eb4dcca6affcec210ecee0c8911fd338b9dc590d17896c
+9f96dd780503bb15e0638db81ce3f26b1857c3705fed78959c83ba079e49fd0e
+08b3a60d8641ff061398f779498633441313aaad5d54e4b3fdef4e0ce6013b20
+f17c6b7b1bcf14289c52cd55b0c456a69960f32fc06077819f32bade75c69b23
+bc97b0dc78532580f9fcb1a7d13b2dca90785a7e958b579d397a5df187d4b0b5
+f76282b4b00e94c92cc3653a047ea5a003a72f2fa4053e3e9098f82944131394
+8c471657767911fafb254abb22cb50693c8c644096a922069e2e2498d230bd19
+4d2cfb8086eff1761fa2b13a0ea61d6ee0923c7c4d31897eebeb1d73982e21d9
+66f303ae3ec4dc108f8ff4da3bb381be3f4050d101d37042b11b314535a1c370
+1b3dd8305868241efaeb394ea2d3efbfbbf3cadaad79416bcd47f8c19cec479d
+19bc73567bfe6d55713ad85a42337200752777a1af0bdfe46bd53534c4fee290
+c23aa58863bc3d0f1afc9622c886244c3da73f429f8a130510505b554f1688b7
+709b0282c94e36468a0af39d04fe42825369197784a82d13011cb3d193bc40d5
+5ca5393d2b32c57abbed3a0bdcf6f5dc0bf26c97aa46daa4269d6e2e104a78a5
+c96a39b4b121958a0e643244f646480b348563e417335e5703c368081c178054
+293bd69b1d6de52d140ac2dba03cf45c83dcadcddc046526b004373d8aa9d2fc
+bd3b354ea1136b0161a7de8ba06051f3cc22b028a2f76b6780f74c5509c49268
+0ac5e71a1578e344dfa147d4136d57a579bbae76a482d742b44ca381a96ee349
+613690f1a6f8bb1e8af1df6b2555681485122512162894c2e85b2b9a3bf5628c
+2a7d925e263edcf66eda45022c012d0ae52faced11324543ce842b5c6349a832
+d91999d162fdeea3451b87671f83bfe321726a6244d6f948088c0392d140d0d5
+5931ea72d9f6ef32bfbddc2fc6ed0c50decba208beefbe2da0f1b6d918f55ecd
+be29f3017d358dcc4a3daad96fbd6edce1a0144dcd3bac07d163935f8580040b
+426a9434da7a234354e273f62500f88237cba7771d4ca0f50a506f07b7eced7a
+6704154a7eb342bf879fc79f7bc6c488a155fadb56df553ac0b5546cdf3a167c
+528b6ea5f65f0e02c863a738ffba4c4a0fb67a788609bcea6e504547c6e66cd4
+45ac2c76dcde706679ef2d509f7f45624afc984e0a3f2bb2e1d1364b038d214c
+11260ea09afb681a4fdea1df8aa130bfe08ecb071e7fdc72c90dc1b114d81935
+92e0b7a609fe06b2c805730195748a02b1879ee6e350c7837c109063628d1f76
+e39e0b4fd212b2da075c82e052a9f66be9446c306a956f412a39fa903e430eba
+d831d86c7f66765f92137a8cf309cefde84580726dd922a4defc48604b992684
+a793c7a25a21438dc7eed60e0a0c82007888457ff63cbab3184d5009ebc30428
+b5c1359c3fd71ae27bccf2be4eeabd9ad709ac34bc6afeb60c3afecc39358bdc
+5b56f65b2768111635621d7797882dd1db755d26bb2e0f03b1a8d80f902c3960
+396dfc9aeca6ff7d42e7f6b4f83d1f217a68f3affb54e7e9aa1d0524e1bab538
+3843852ddf61b2ad706af3d609a8d1f841f9e9d12b1b0f92f3b47b0dd0bc5f04
+866528c0f63db3feab76645cde31f0283fb8c711fc34504697fa0cfb8cd7b150
+172cfc93d64ab6a1da1bc96d501d49ac87cc6a04db1635c167a1fdb58eb9e3cb
+94c90d2f9046890700513232d5bf1678651012e2f817114f46a1019e72220d7e
+d216d12712bb8ae73140aeeb48a3339dc1d5a6efac1e8f50c92b58e32725424e
+ba86033bb1bba686695cedd75be66d54275c8ddecbdcbbdda44f595e6b686af6
+f6117bcef51df5e3c98e90171952a23f445c2bca9b8626400905fdce9e0464b1
+c1d241ae619844513e9cc3a58a6f978089d209bd775438d7b87108a342c76b62
+8c3a6a28b9d0c42e696f3d5908cb2c70d8d3ead811ef4dd19023faf86ee053c3
+014ff20983774efe8e26646abda4954ead06c80c7670
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/UTRG____.pfa b/lib/fonts/UTRG____.pfa
new file mode 100644
index 0000000..d9fa0e7
--- /dev/null
+++ b/lib/fonts/UTRG____.pfa
@@ -0,0 +1,1126 @@
+%!PS-AdobeFont-1.0: Utopia-Regular 001.001
+%%CreationDate: Wed Oct 2 19:10:38 1991
+%%VMusage: 32987 39879
+%% Utopia is a registered trademark of Adobe Systems Incorporated.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.001) readonly def
+/Notice (Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated.) readonly def
+/FullName (Utopia Regular) readonly def
+/FamilyName (Utopia) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Utopia-Regular def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 36552 def
+/FontBBox{-158 -250 1158 890}readonly def
+currentdict end
+currentfile eexec
+fa444f2716d92b815f58ca9049c815358e22e32e73a3e6a653c538ee56873363
+67713b8cab082730570f5b5efcf34c2cdfb6f8dd2b7905a37c1924a2424c16e8
+711db76501f564506b0f45fef10d83c3e3c6df2dc0af7802e7f42c81b4243697
+ca09088b868d983e79e4b2c3e17321993cc8837921fd4ff7b92a1294c5ba33e6
+8fd40e63df624b51865721e034f71bf57bee0e0c2a9c169c7a626496540d45db
+585d2bc93f83e6829eacb859a194d7a57904cfae75e6188c7121003ae40153f0
+0fe6fb52f339e72d4aef38469328465a3bf0ca1ef58dfb447612eef4ada248e3
+ca525b0884971b85099d73538152affcad51d03eb4060a5c580f453ee78e5c4b
+991f77c6e9600c135395d56335a7c3a75c0341979d6b404ee496214a5d20ae06
+e17d80d37bd3540b8fe913bae1674afe37d0c41e3d9836a7b5147be32f9ba01a
+df1a73b89d30bb595a4b279032e37c8230b6d4933065947c3e9150d2c7c4d439
+d60197eb69991ef059edf886ec0bdd28158a71a2df96dcb67fc0bf81c34cf27e
+12d6ec950a75993af99fbb040af595134198151e7361672d8538cfadb4716785
+dbd48da442ccc911ae9157b14e433559dba1a1c5619e99b57274d6998eeca3a4
+7e804d8fe3a664f39f33237831385949a230a21e52a2dda733f2f89b02ef4ce2
+5d603c9bd2f8e4c0443070940f0380dd1ac60ff462a9a71965a79d787e0711df
+0a69bd86a4846965ac6c77f2e1699c4620c1bd9f5b2263e13a2213631c55f7ab
+cf60d2e63a7830d5011d9b9934bcee2103f4a5d56942ce0f590a15dab480e5e5
+723afc8e1d8d96f3e0d8629b88ee477ea6cb8121b0adddf20405f8a32756004a
+8a59b2cf922a6dc0747bc15e99079aa12ac0d9fabf8b47c5a61ca5268e01317e
+1f0a38c468ffea597a392ae3399daf7c03126987750258b5e077d703cdbe05b9
+a5fc4d80e8551c2c06a2c579272877fd462fac6569a7a9f964797df79628ba7f
+f77447fc2aefb25089ce946e0aa5c5ff21370f0cf84d8e2affa8b30891081b16
+6fb86fdfe65e7e02ee551c6b3e2e324cf7e18664883dc538018ec8cadf7093f4
+a13708013d6ca2afdf644c0155342917c2725598fcafddaf8807200682fcf04a
+4efd5919c21ed2ec2f7951c2db953ed292a54783f5c541bca68d305b05df5c5c
+f17b9af31035dd8a77ed8b54d4de7d684f54c58a28f0dc55e7c692cfe444216b
+18751c24ec1c8a00a5cbd458a0ad54e7c13f26b4c4257fd992fbd1338845fc69
+6b97a2ee6a4d4f03fd387e745eeb8e97eb67e40bacbdf1d6c08e9fa2e317d30a
+c4234559096affd5b2e65602ad9c4868e24d7f1d35e8b6679e436a010be5ebd1
+52666a26ba7f7b68a693add1d21138ad64425e9202a043cec98ebc182c152b93
+9f88cb8c89069b72f3c264e2bea7cea9aedf1a8736beb55cc77b02e3989e7013
+b4fdec2767194fa85b1aba185aa01fc8902209068fadfd1d282a59f8b1d7e30e
+3829383779fb9a28404759c595b986deb7c59d315023e542b461327e8645f440
+3d1b571403e30d988d5d17b09590d644cdaa885cf36881602f220a7891130e31
+2ed47ee703368c5beb240427e1b30446dae522143ffeac91f3bd6a3ea5c57a63
+f81919870daf71d9b522529438d5e51173973f612b3afa5e4c5c042c8a8a4ed8
+27d00b1f5a102ba8a11ee7d942e1954cf35b875abb184df026b1f600b27aca0e
+4dfea33866de9d8b6b8829c128876a2b882b1aa1518285d87de3c39bd74863aa
+229a0108f3070908664f4f77a62f0e67923d844c9ef91a6affb8a72606f5085d
+88c35fb9e8eeeb663742369e6b0ab87c82e3eec3dec4adb2098cb25a35d543a9
+70025ebe038e7057a8d0e8f7b2eb86418dc39b494884bee8c92c87f1af4cfc44
+c14a177f200389c0a23c24ef1c59e9a143756c1ac0ae50a12a82228faecf86c3
+4f7ba61f010a0d285063676097c7c3fad3b19479c8c50d712b48ab99e4858096
+a1799936df4bfc4169e5544adddf343c7fcb63e83e2b2b6eb68c8a33edf201c6
+5d89e5b0c3d21d1aad02bb07fd463f763c09dcbbf7c216b1554a9402a8eeb5cc
+9de4edf0753d8882ad183a9d14e2de51fd81daee2ddf53745a076dbbb790cdda
+4b25bcea0f98d832886f26bc15fdae9ebfe42f0a95b7d02c0f65ebb1fa0d730d
+a1f6d63c3da03f9ee0961f5e93cf943915e0dae3147e4c100fc97859f1db0e39
+a85a06f140305e9cad70247718385e9151a091aa9a09552c199e3ab164f28270
+fc60a08b30ce11e5d115577e54b57c73b2008fe0f9679cb7d60c3c80b8e63cc1
+046a093b0838c832125c9084c9d3691fdf6236f1e4b2cbbb4ce8d898d4c27a97
+5f4eb9ee7e3c2d1a694465a632356ac7c06abb42f89eb2791ecd146d29fae767
+2f132e065ae5f5432a5705414049f68b871b55c409ac3f02cddb56deb21c8d4b
+202b93e8a5f22d09b287fde695e9beab9fb790fadf1250dedfc8188b0a3975be
+db8973fd1ee42841b2bf6ae539bd46d0339dee6804a92a0c32ca204ec9897f76
+95d04cd16c3e09f37306109da8b55b5c69660682e8328724655f88a08f11f9b0
+6d3f1629240662f0a0ca024f16265503390d9adf8b521d971d419a4cbc15d322
+1eaa0b79e4a45d2f0bfc9bcbf135e44b937e4bed0a4ea896da90e40bd793ff7a
+d0bf85fed6224690f801cd8c0100c4a79be124833774b86ead4d58bfd2598e52
+6bb5d08264df1c4ccd29a918bb27d7c75d0fea288e066a74236de1828a0c9fe9
+6b1de344a4f57ff0997707f9e83c25cc5639ffcf2cd01152d9f676a80c637a69
+5cba153263f8c1d93bfc03642796263c3b460b1fb22fd4f63e742064a337d1cb
+c12ad7b5c36cfb0a62341c849e97ed8a6b5e3e93911dfbe3795f9debeb3cf7bd
+6311ccabcd1d80c76d608e0366e23725b4c27210c788f25726bcb13149c781b1
+3e77341630a99a22cd95717254844bfd4221df25ab740978011a301861c4f0cd
+cbf77e1b69b90ecd4aba88d2c0298bf525c4f6f0be9d34d74371517e485eda6b
+d38374ebc2ec4abd9b7969b426b40c356982b735289f80583b377ebca2c14068
+77d7a6516135878a18deefa530a88685cf0bb9ba03c45d283510a68b17853cbf
+c1c16428a598e078564a8d50bb1171771ff483ee395ed074d7f524eb8af23061
+5b30a01122d440365c7787ff477ce068ad1c8e4f9a409199138cf49a435326f3
+645d5e093179b96831b7dfc926ad11a2b9bf2ed3a5f4ad135278dceabe5f8aaf
+298bcf406c9c11cfb55400fcae95910ea7c09e607a1c2447ee82ce7e3faedbdc
+2b1827ec539eae6ae25927a35be1aa6b7951073746e5f684f758fcabea3cac25
+f608e033b3c92cb05b7c9738d3a6d2cd5e0c2d29b968ed7c7bb43d7fe734a959
+7636ca80ee97f6d88550c39d36db458997a98e8bef087c1000add77f8c6d24dd
+2e0f6f4772ef61c5bd5148c3d67dbe77df27a300e5d8c9e4b325a6d8cbbe8675
+15ad15966b130bf4499ea1923bef7a9047eb1b0d35acbf0b8303fa08b26c706b
+7368332adefb42b66dd9ccf61fdfba00b5aee231c2232e8d752703b0af6ae850
+ab8274563f8fead4bbe9fe860dfd95a6a7e0cfa3d8f6ebd0e066cdfd396d8c57
+f8f17bce0c5678649034a62418dd2463b8f963b43ca02d011a9a1ac4aef9c9fe
+151ef8c726e376158dacf1131f0ee855156d95730d3626003e51983624b417ad
+c258164ed5b2bd3d4e562f16da8a0b69871787cd9142d297ea3fadad3c2c6dfe
+3491c8313c2608cfb1d6a6b21d9569049031b0cfc1d9e96a7186164e04d713a3
+2f1350ab08811688619335e7f331cbf390039502cfa7f68ebcbd75937862add8
+f0c7f498d6695e9d48c4d3e07753062a992675f1eea3cbae77c7bf35433bf424
+45aeaae7876749942982520abcbe95a7ceeaff412a02f6922a1e6c05e9a94d82
+11db8144984dcec1d1fd6418934a57338e070b19ce6d45c0f861e429b3828c9a
+c98821dc4ec4d5b7f64cfef16380c478bc5a0ea0c4b82d94e3e01067b3027c73
+e93899ee5f37db55e0be88844dc7c5a538e43510a65716320dac3e01e164fe26
+3406de45c19c250cd2a9c3bb3bb7cd5fafe16d9eb7e00d012b65668104a68eff
+bd0c11b55497378896ac50abb47a6daa32f7c21cd34b19f3f797d883fc8745c7
+db21a910abd7e9733239c6751f71b126bd8e26f7cb16bcbe5a066cda9fce63e0
+a9d40a9527bdca47211648ec231d0aad9f4659cad640181b76d6b02309365348
+4e7e328bb1f7280ed4f8fb571d05a7a55842ad1dd294cc46cda410160f2f7c09
+4a34dbb0aca809a6271c8fc97f4103bd83b701f2f474e0bd1e7f37fb7d898e16
+6612f9b03e25bffde2a8d6ae1dac8b7c28b67c371ceaf8020ffc9e1e35973dee
+63cfb07a6e3eee03799b4841d195eba565c03e10998fb80fb279fa123c2e8dae
+94644927b473c414c1fd0fa0b359a279310e23fe44104f0988de3345d9aab3e1
+e64dd94ec8a6c20556d785e7e4f4bec46c0de73185fdf9a84c6f46ffe7c52c1d
+c7d62ad792987dccc225abddbb6fed504864476f1e8d0e2ae009de5f4c50bc6d
+8d3902c6c169cc0c2008dafeade6308daa473bc4f8af398ad4a8300f6b989271
+dd59f6d52ee210bab4028b4160979401ed9f626526e43b2362ff92b208a29b04
+8110c2801db3a59f1cbb89139c80bf025d45d61b2bbb6fed4456089976a94d82
+a094aa8201027413899a402050ddc0421afe5d357a8d8e0ab398e01da601a0e5
+1c6bdb86ca2d064b2d8af3ab7a8d39a564d2c2cfbb74f62aebe4c9cdb668909f
+2d83bf84894edf23a3db2d3b4ed77d091f21ff313c67a0abab68e57a541942f8
+58ebe5334687a8dfa0bc1eccfcb1b793d5aff3d7479a72ef70b3490f7ef3dbcc
+1beef6d171dc7cf8acb25d04181009407b2d61dfb7de55cc433272a46e86a74f
+a8a5bc69419e54c39220b7b3b716c5c4cac5313e4d8e1389a2217de9ebc0a4eb
+f72dd28b7b2e7481457123167f2a138a2a9ab099706c81b83e3a02a9f9e2e321
+c9658c611fba436a649d72ab9be1707e3711d20e15d778bfeeba66b09286be38
+2f903ec637a8ea274ef8a8c488c5cfeaaf616fa0e090ca2c7a767048b6086dc0
+ea0e3bbc8ef9d01a74cb264b3ca824f0d6ad786127c61d0d8ad13c31e5a25555
+ef5e64e1d19d150d24d1459e8da3ad799fa554dc7877a417f51dd1a3a02e7341
+51b6cd7a2c6915127017f748942865f30fe048b7e749bcba0e015761c0a9e1cd
+e1cbae4bb1807245d7547f062a05c1f13a753eb6fc3473caf620347338bae987
+1d2bf08764c309b32b0c915b4735481e25259f53c53c144b8ea3e8c2a4dc2725
+85e197f684936c0690e497653a46a7b86c7e57b8f4c890319279034cedc18bfc
+ebe1828d23cae6d1fa854149d1cde376470869f9383e83ccab2af11c2d35eb8f
+1bc9273cd399c7e8478ecf742c2db209479460e310f8013f1a64a385209d2e30
+000d71f5fcf62f251989a3d852b9c36e57273a60d565aa387236f61162e46821
+9f755ec5501247ae6bd14644106c04f36662afe7c3cf741664c6a4789f3f8ce5
+baf6e347f6564be8d6fd92ba9bf04ef31c9fd60a2650b1086f9a244a113d85e9
+405dcf23e29d7b46281baf01728b7355b8a1e50febf4443c2d1a2560cd47d652
+cfec6f5cbe060f8c1b20fd4720ed00186609c40771ec8db4e7e4434eff8aec89
+007816aa98863f8f8fd3ca454bc228bcf4d2522d948ab346b5137f1cb52b5a52
+3877acaca92215b9fba427112786c2fac9e5b57879d28249d2d71040aba21fc0
+f73498c856cbc6c5a5f25bbcf19ec97768b8ee9aad3436536a9ff8f22ff72206
+8555d0356ab16b1fce02b79220323bfee1ebbf156308bed2d91febd3f3a13927
+be4d619c75ed738dc1913971fab9a76bf697c6ce9db692d0495abb1034fe31c7
+23eea2feaee80aa07117c16008a7b5e00a13fe2dba4c4e3174762c28da98a191
+0d15eeef183cb994c829de35324614301a6e98311d9f5f282d28da1b485997ec
+41eab629352822a5583d307d6d417b869f6dfeb158523a581557f6acf91c4f28
+ba0af9e428099b152946769932a190410319fa3cf1274c6745ab16df56afc3eb
+4e67f521dd52f3e3b38e41d0055a8bb6f957817850d693f76c2237f78ef9e660
+9ba5ec79bb0cbb08f461991a7baf70e3f8c8d619c0ec7d3d7aeb964f2e8b7113
+8e9868c98d8fa3a5769147fb72bb82ae844c1331ab285dda9df924cf36f2200c
+b0c4b28f19aca7c4591413c8e89ce410d469a7844af4ad00b6089d1efa64de2d
+49069a4094f2af0552b68fbe03655686cd845e46a319cebb984fa717b7fc2565
+4cc9843d079512d8ad6d58d55332a962c7b20514d1b53818b47d028b59ec1176
+43d3571e690531d6980c0bbf2150f5afadf3198dfc48995afc745a8fd0b40b7b
+d48c00010ebce60dcf13ad056bb53ad3e7a3d0984dc28b8b4aa109ed4d62bbf9
+9f7be92fccdaab5c52cda9fdc972e55a933b2c4c1d2c54ed5d88ec8132d0241a
+91fda05af2a736547dbc1da85588b04ac56602cd9335d9a31bcbc50a5e13626f
+f86b9cf6bf32d2a5b6c4a3754f9447e2eefdb2207e1c277794bfa5defc88cc63
+1ff2093a0100c2db33baeb231846754a10eafd8640674dc03d737446a345eda9
+fa03143bcd01de7aa1486de001ff31f1f7e67681017a32dc46f8a9aec6cc0573
+4a0253dab3476519de29344ad7b0eee93d0e4438bc852f4ff4d018a690781924
+1730a369bd2312732816efa8000f0b30e8d19b8551857eba645f76f38257d96e
+4088b20e11f5485dafce80ab03820127a291acd4ddfadd039c03962078aee0fa
+6429e748bd3ea0290ac67f1c14eb8f63cd5b7f4a3e61b91f3428a73509151784
+3ec501946e468e8b68374ff8b0560cdd38f2eeb263106ddedaf7d54ff1ed7c65
+c9910de2993171eb6f5d9a4f0fc3368d6f6b5e57e280fd9c5c1969cc814d46ae
+81c2ab001f03e1aaff8017b6d7e84cdf0e3a747daa3d2e1d674cc49c8049e8f5
+8914f54313f1084396beb5defd89dfd0d73ff6ba76ece9939b988bc5353f221b
+e4bb40b79c19612319d196938935747e96030a5df12caadc7afe24878a2d6e82
+5230548f931259546b44b4460eded3188fd76d06a2d0392e2371036401e9ba72
+a14e50d6aac474d148a40872f222d3d3ea322c37aed0d04cbe2551e513e40943
+04b30dfb33710c66f3df8e24296604bb84e3e498200d942bf52c452f79b855f7
+bfc47420a44f80ea16be3f8e0716695d20ba1d28739ae88c04ed2848b70d7369
+46734ecac041a14ce87397706f1ddc57144b7a61231a1d0e458d3d6d014ce66a
+b6e37b46774a7a9c74d6a5b636303d3002151be679abfbb7399a0dcae5bcb5d8
+7c84bbc66fa03df92d4f5ae78e85313acd62522caf4fafd187c553302e692133
+f7971b24b92b9e0321f93e7b747bd6ae5f51cdbb247d36255740752549bcf8a0
+09e774a01bead6ad931c11453a179e0ae2d23c09acb7b2bdcb16fbecf07515da
+0ac8a4b2728b3d5c8945aaf10fcf770008a0aafd33c402b7304f6b203d0d6a7a
+be7a27608b10f9d67c39f5fa2c09ba5900f0a6e6c6bcea1a0ca14411ada0a36c
+d19c25ddd2d29ab25d4cb7dc3afaa0f5aad7e22761863cfb427fc4fb8c991251
+31cd3376c227747a6d3afedd341a4e6474ba273e687640eec85bae3bc83d762c
+3380159c2af1dc118fa1bd2382d339c5d213bcb89e89fc8241707e9bff40ec4f
+85a889421643ce7a87953bab67fda678da5111da8a95f29290ef70d672f0ef5d
+ce90ee85275392766ca752cb7a2bb9eb416ffce5166a955bcd54fa2082d942c2
+89a0fbac57b9cde759be0b98d0e6f5b51c7dbd6331730a15635edf1a3287c679
+61c0a248578b53559a3d040f8847813ad1d76480c43f4b674bc0659bebf9f1f7
+e8cd4acdc0e0fc27104601abbf25304f8d5aa221e02e73c37868baea6106e069
+88a7b580b091e6c4ef56e0b52bf9055039d2c3de83c3a6d4f8186646a6e1ec4b
+5ee53764f122509d63e339c51b15fdfdade4cba2880c66bd607977684ad01aa6
+d405553066de3d2bde7eb27b332d5bd0371881eb0a9d2c2b7728f827444a13d5
+758591eacaee4121c2a00c05b58357d8053d2223490b5124fa646965a0ddfcde
+0f99b41916f8f80d81970753daa6079aa0014e800c54052e01d0861a7d3add7c
+2b542695ad2a3d6c56190a170d23bb34829b049e2c02c69e79d597fb5d2f9ce2
+713d681f072435c8e3740fb61127f5d3bf4cf1adae5e99e66a0c472076f476c6
+171660a613a35eae2d353cf78a06dbe7dc227dff30a501a547241c6cfe8123ae
+053293e9ed0c1bca42ceddc775a9200420a37ef81552b721c077c005afcee2fd
+fb2e9088451e0260fef0be7dcaf9d0e4eeb3557241bbe429583e4fb813fe1992
+1ffec808630e4b3e64cdf9d2e664802f3f0846f0216b8422245a0363a2a6ccc7
+3f7d8b39438246611428c6c32584976b10375003469fe0efd968e21319e382f7
+50c386b57d7b7e8e4b5dd8dbdb8d816ce712bb7ec4d3a2ccb6fc5784c066f79d
+f9fab8f575b42bb18f22a7f2919364c61e81cd47d0b121bc0352247ad8d83ec9
+36891e106f85e8fe25efaf00582095dc7f16dc48b3cfbc34234aedfdd357643f
+79cea8fb1fa81b91b49f8c063fecaf8b8bf0fddd8f2063eaf6464de3e963acb4
+33a3afa3944fdcdf61597fc7d6caa8e7538a784024ed4cfd497ac35c6796fb14
+65aefd0498b994fca5c74c003c6ea1d6c8f935df6ef5cebc5ae7024986be09a1
+3a368d9da9061aa8ed1015a60778e63640addc44dcf2e32bb1d017f10a319f44
+fc8aaad5cb149ebfafc0dfcd665b07f6387f4e3fa9273815a7c0e87390b89964
+18fe077d8330190a04f348648e1eb790cc3cdb5005afa7dbeda6e102d848e725
+ce4d4a9a9e7dc16a9035892a73bfbbe130b8d059e0282693ba7f062ee031cd38
+edbf41556bdc7c34c6f2547797f2b4b202fcea7d6c1f6d6a890dc850549e2d9f
+d4fed66e6a66f93ac27cfbfe938832d17c171729fb0eedb5befd2d07fee6db06
+ee7d2e5302904d0ca4b21b40e3ed346e6976024f6ddf05ab1b7a339c42d2989b
+8afb7447b2b772f3cae03abfd55b1d14f412109e7e99057c66ed1fc1c842e336
+8f8ad95e67626219b6d538fa55e6146f7c4d2819b6ab69628d3f918d5c21ba65
+6101700f2f9b5d5399a1209e0fe5cf62cd4dd8b065abbb2024b7766478b78d89
+3ea80e633d445a240e27c7671018dbb01e4b38beb85ff02de34a4c06a092467b
+2409c7a6f7d94461d55073a87ced3a6048ee3b688042bcdaf6d4ddbde6edced1
+7c0b7a2317e60410453cba8646e00976bbf1542aa0614f93a6a323de99774176
+bb2babb068c8c29bd4e4cb7f8b3646ceaddcdb611215a5ee9e61bad78d8bd5ff
+f66177e2069d7b4f87c6fb13a61f2772e8632f158b4f1cadb8e3daf55e5df78e
+9d50a27bdece942f579490f570d3eb34cb69203627abe7bbb6c5b2323fd8fa7c
+1a9271f36f727ae3bd9bf660514a052c86625b1245e190fc91df37b7e6960fb5
+1396405a4f2de27f7146ad45f9e5e14755985c189cda794fa21d336354bedd98
+14ccc92cdecbef77ee962b78d053752a22f5ef66879af4d77cc798b2d6579d54
+9077dafbf4dcbe07c70ff56070ffcd869bbf2d96271e461c5432aacb7935ac07
+fd239929e5d27e34c91a785fdcc479b84a99dd3db6711f1026a613d24a6f5de9
+00e4a410ea22a81b1106f6e11edcf83a3a9f3adba5b22b129e3d8f30807303ed
+fe50943d68951bc743e7391d7aa1672fe0dda7fc8a6c2e87aec891a6d8ecc050
+03fbb9bc38114416c4e330c5b7b43ace475f0c8edc9abdf5fc137c9e07f1f8ea
+bb13365b3f7e3dbce2afc9388e9279136ec6e0edb289beeaed74370bcb453884
+3ce1b3afed75a47bfb50b7bf4d267b014f2480cff2d9e21685a64b5a6fad8963
+1d5ccae56079f4871aa6b9b6a7ec8982f266b6eadc060087f2f7af187dadf05f
+c31a47b30f2a250fb501f4faf7e18c3aebff55fa08c74ef27d96aae869a26b2c
+45ba8c84b958db1a7679ad0e6bd09c498543e6d20691b072d84c6760c70e8e90
+ec179e6d00f684e6c2d070f894b98d495cf2d2978b96ea13cebf5c8b9ccfbf05
+72a00358a8faa812b00c06f2ad40237839f0e2ecff57d359a2c2055a1361768e
+f816ffec8254c512e3d57ebb23da610fdfd5e1e16b97e1fe97e10a279a203e6b
+b52f0be0ae9742d1a7faf2a0d5d6e1560d6a3e8e1596fc57a3288fac6a541646
+5ad8c50485e42cb5214d4dcbb82a16c2a15d406698ddefbb5fa3dab291c4020d
+52b76c9f0c91b5516143d99d82611eeded385015cb53e07a30bab7f27f22ac73
+95210586bd245bc0d2366952c1d85ecea90e68e189fc313823433321d6ff1785
+0d8eb6f1e4f2f6153d84b4b0bf198ecca9c87a80dfc33977a9b06e994bd86800
+4ab2f317727243b9c9704fbd88a0e6fb5ab8c94f38c7e20daa078edaa9878c8f
+3509b2c135e9801c79500327adc9537318d0f6b700fe99166d4e7c8f6a41bd45
+6bda6719e0ea158b8aa25e73731e02d215294d91f44985ba21d4045b1f8dcd99
+69a0b36e07b3c7534e9401960683ac1696459b2a45e0a4133d630e5bc81024f0
+b1ed05e19a6991bcab03482ad446a1d542249cc9e1f13e091508eeab9f744a67
+85e3d64fa0c7c79275292a4284f62754d46c0835e432c3a1776396feab389c20
+775f2f94aaec26813eaffc4d1e6b4df16f7b25ad9cd3e8645dff53a354718283
+e6da4a788dca6de2521295f51bd4b41d7b1f06c02f9cf60ad1136425c7996c55
+a00798c6f180ee8bdf52c71c01b48b3798eff89600b2281d68fb2e8567d61d22
+9b31ddd64b49fd662131d12bb500ba609e2f298c237b90c17c4a29e1c4e75ad5
+c1631c7058f7aa486b9c19c760b2bbae67167472490d537d14c9c70437d8a964
+fa40effa6af2862db37b5ba62da47685971093e11103228b85a6a0acc3168486
+cb4d94f0b1b01bb35ff617b5b36a120f82f783752079b66cfbfe2088290ba9c0
+cf8255443a6230274299b82c7e0078a9435c2a48ab298954043521391cdb627a
+efc038208a97a62fefbc2284290e83c78fce56f1f6aa31428092800897d6adc8
+ba2c0bdb767e9b684dd51cb44dafbdd3f084b3ded0fa1af187bedd1e7271ba2d
+9b040ce2d98fd7a56f82191756bb8f582cb83ff0188350d8d5451671a2bb3478
+97ee71a4621d366d810945c790ec3bf4126eee53265a2ddf2bfdb8cb8d78352d
+8032e0b87fb87323d4defe5c5c974db8cf06203d0cfd1470aeb474dc0fa2d32d
+e1ac57cf43f5dc2d2751c84e10a5055ce00c594a0dea8c1f65268de077f06ff5
+c8e083d70fac84a5605eb80c81bdeb92a65fcda58979a93566b29c935b3ad83c
+a1303afe4eef046c2ed3646c0ced2e1066d4eb7f5db11f171b2440a0ca362253
+20098d9388aac930db7be1cffe5d6eb05dca2a6355df026393b99ef5e3cd70c7
+c82ee1fe5cd113766bf011bba63e78b2ddf4d86519aa68bd991d782713ccd2c1
+3f2eea70dc273576aafa2a0d2ed22e35f246e92d88c907425ad6843abbfd75e5
+78e1cbd1e59969cddfd6d26f89e617005718492b51442c55fe617da67d8ebe5f
+bef9bf22357a125d611e04d9e5e28d5178c83e2c3b073c205d7e3a792d4d0232
+c70e596680b5947e6504a7aa48c67795a15160d49d40174fea72dcce9f97edc4
+75d030d02347961b7d725b78c7024f98aa0d4fe953807b39632f0d4531c6c1f3
+7062320fb655447c355e55dac7faed0643d33f14cced8ff7398ec85fd93bef6d
+e6032c7689658a96cb9ddd856fb6c0a4be0fb15bb46c068673374bae1fa73bbc
+20dcaa9398b526128991d68eadf0b90bdfcfd097b2f858363d819fc6ca7fbb47
+6aa237cf38daa9653b5877aa322e3039f86bf54ca078c55a35301fdcad322d14
+8e65067a0e48cd62cecb0d7f50faf272b51c6d0a22c402f0df1373ddef2d3c2f
+25f3c636f9f5f8710bdb1f5998f2040b7bc4bf6dee428357a695e5f177feedc2
+be6ca3d7456f4fb7b97803df6de76aa4bd622cf080800628d35841a838371511
+04623706136658fa3cfacfc116a30542f8825d80532454675cd5c9ef6640dc79
+aeb9c37a0691d14bd260f58995b7ef2cbb236da7a93c042450d940df347494ca
+6d5df95bd04d3077b47926e34610583984253fa1cbaf4b0d544e71d5f7405e49
+41445c23b0a1c3c6882254602d0ae6582f64dddd079f2d112b0dbd31ca685bf3
+dfea6d3f310bea2b2f4cf4154cd37fb19016f703a1f9a045c7e21cc994c0f23c
+5e4a49d0ff47deee398d478302cd0c90380885ab4a59b6f3d50bfaf00d9e7f3f
+0b97562161091b4eb201c7bcd4d1cd239b00df09d03836a63e8a9419cc9dae0b
+493aca2a7fdafe0ff81b6a9896c7e57faf1355fce5f3d54afe62c018a5211fae
+935f1f9795d1606cf77673b699829c9a136c6534438ff817759f8684d5345417
+70f6554539184ad886156fd610f331532d0ed22685d56ed02fa51e265ff34a1e
+fc8cb40b749148ef80016f71cb0647e1232b7450237f686828c36dffba04aa6b
+46a526e693da4fc9e2c84d7245b76ee7dbeb360b2f92b112de8e5feb3e433321
+eb67e59f3a41c7c91e5fc51e811b2ea7a70a9562bcd8fd854d761ef290ca50c8
+16f3c58d8e48d13edc3ba242c35ca241fa15e6243aab8f4b5441cc0cffc1c9e2
+7729da8ba3fe1837504d73bb13ba53ee7029aa5a1b137244be2d16ff3ae6cd71
+8151c53d223def6463c124acf3c37bd5a42e4ccfe3db5d3a22f249d0a5cf59ed
+ab67a3a6cee4f7838314e9e167d3ac722539c6a60e5961cca947c8b9d818802e
+54162eed974283ead7dd09fc33bcefe33a78ae540a98fc6710011f0cd96300bf
+e5b9acc91af99c6b38d005481771655d1b89bf8fc5fa8d682ac36a54753a106d
+6cee95baa71b131786a76f6ca7cd143270f679c91635822a4a2285d6aa44699f
+38603c3af88b82d5658531bf36ff97bb959c44345f51ad2c990347d7f803c2d8
+3345ba5554ec0af247e7ff00f483ea94a3a6407a2d0ccc9fe5a530139336190a
+166575049e84f3964141e64f9f9fbe2feff15930340b49adc782b7ec9c2c24c7
+816b7cf5e7aa3c194b3f50af218aa2b1a69e9772a74cc661a96100f9607fec9f
+0e6a34b6d3b9b6df0d0cdef014c6e3ac43491883a33304b464c3219b883a1f2c
+9a1f882449ce7c0814be53e0a26aedb003f25f8ed3f9506efadba4b8133db373
+d66c0fb02ea5d1db6484418398a374bc43f624dc1dbcb70f9b6b97691d297b4f
+50b0b7aec4de5732ac5db32e488e8131d763ea2234a8b6ba67acc6ba688c3f09
+b1da0f7074b2ec71ef2778dc1dfdfa2b27d74756a43fdf2fb8be3fdc9189166f
+5747a30bfdd73b8507e6d41bff9607a770cd6d30a8b476cb972c896b90f15057
+f3b5095adf44ef4347da078dce7b6a41f01c29abb94e2c70e3b3a24f4169f80a
+7eff7a9b53909f97160964eedcc0862697c872a164be415d28661702c33f4edf
+bc8c172fdcd3e70d3db0341ef1ff453232617b89935a9249bef30cfb7115addc
+c06bac8b37d4363710731a69e3975c983b96bc5b8033cf0c17c4a6dee8e45f61
+53c1683d296a937f733c332fa08bc9f4c5455e308733567fb7b51300c3dd4665
+15a2d90c58d2155270e64f2a555f45084bc75cc2fcc2dd5ed0582943a7a5359a
+4fab1a5310c083343ccab56c224f114e46c8e6f8233e9fb01a352048144592ee
+fbffbe37b26c257f91220d792dd0f08da33f10baa54d92044f24646f9b998283
+1bb052d3873debe609ab925b8cab12a80067e52adaa1bc0f469b0406c975a17a
+c99594a7a8c7ff29754319338e16508989ecf307e9ea3680ee18cee760a02b76
+90e09970a402bf91895df85dde19f9f125c75558ec5002cabc1d4ff0ca1dd979
+ac53b2d742f45d787eebe0c983e12740ac3b74eaeb8ddb0a058030e2b5aaabe7
+3acc75052330fdce054d0df654b4dc7cce4b07b9e48abaa918a2c45b0675a360
+8f9aa1f307b1d93c13075a57903935978e764ef45628f219ea21740a2c720dc1
+4037ee1edec2082462f882bba13fe63a335eb8c18d95c420da75b152b5791200
+2dea7d6f2eae40f84a622f33376da36234c4baec46bcddc2a7874ba2f1f57b19
+b47a7f3a4f834b5780eefc08516d223b42a4e201194f03cc94aad45cc49cb238
+2f6af71dfd8abee459fe9f9e19f1d52659d6dd9d378c4f06c39552012e17e541
+f40704a1190b5887bd0cb07fdf4a3a3adf04639c237242cba12758e371dfb2f5
+5871567815806e74fe8cafda5031354aeecf88feaa172bf8f4cd9bde36362120
+2938fff3f84180ab0d5e2ca492631ff71835add3434bc1aca1589cf50ba27fee
+f0d86e6de410c00c5a40188a91c01d944d3b941ab249ce3de0dc988482ac835e
+ba5e0a045a6dee34f7c92ea4a1dba8c403d614dfdf3bbecafc61ee5762ae4f3e
+11511eaf682fbd245d75530476c2151c4ff6aa7959c5dd0c2f54c483ea556c95
+8774853ea5f841577eb57e89aeab3ed00e79902cf36fba0a18e460c849f4e5b3
+db02888493dc249f1c1f44bc7d7011ae65184280f5f4cb19793b3bb002a439a6
+5518fae1d5848e10ccc01e75a77fb1db966111754111044e6bd282ebf00b3731
+7227ee6f76a51e1921b2ba047a5f1f09f21f13e1cf44b3582af9c2d26df159b5
+04738c1d27acd2c898ef8148f9058dcdd4ce885927ef51c36b43fafdb08dc186
+180df681f94cb9b84c298bf7804280162f58f62fedfd7bc0e9b8214992f4063f
+7685d655f248ba694252e5ca13623f12062c4872b5989e13d9c162773f976144
+cc8fcc96013595b498562ae4261e7a1efede4b79efbe7ed5e4398d1d9e66b253
+a0f99f969c15fbdac089a5ccabbbad21402852801736f0dcc64b0d4d7cfcad33
+ee75b328427178082a96435c3c9f40e9cad04d223ab295eda1ffb193abb5718b
+f5efa9db4ae428bcfb422ef2ecb16225c67def9ef76ad21cf8626f46854ccedf
+885709053e56e6e758824ee80b0c8e4d67cab4e5d6d9e92fdd9b99912c709ff4
+57d0ae3c258229551c93fbd68e47b00bd643872e5ae53f292866e566f2f9787c
+1edd81b005745b10fafc9911644c5fee21e092fde448155c9f69ee2f55c023b1
+2eff9b86a86f8786b26069ff3f2a5f7112070db4f4bf93f40ce24d1a5c4bc5a2
+b577d39f069f506f197be8c590c73bb5f44ffd6994e2eb11786004c71d349521
+2efcba99561ba4cfd479ffe07ae4c45f5ec38c164db89b192d0dd7c07228bf2c
+0ca8374f377c4b8ae58a265cee76e71e952accb01a9cf1676faa4f49dc456c9d
+c020521a2e88d2e5c3904157d3e68158ca53371c73be43bfbe2cb78e3e1a9a15
+f29359be03fe111b87b252b060c453fe8bb0ce288a37907e7648352fbe66792e
+e4060dca4506ad6a7a8806951df8d3d29d0347fc5f4f408472edf2c4abdb7418
+28dd1afa26e6e8f84e09308bb68de881a61d106757c09840e49993551dae5915
+a28a25ee7949c3a00b7f33d3b2ac252f1b8d0896d3116396e2a7fe57c028308d
+d7864d81cabe4824bf15cb5778b941a6b5e9e46539a8206f8bdab18e92bc0aff
+2f7640dcdbc2b04f7cf5781345ea8513d00c7a22dd5f1e43b60ba05acfe45572
+76ff2374e36f5132b884ed8dacaf72d5926bdaf62a16715486bfcbe4758ae053
+687031d0fdba9199fb4221ffc9b12844c4d2e94e393f6f4ff2d6842abea45372
+12128d3234738783ae23850090718bef9adb55d26bf606dc4736e8be6ab5c079
+d5a6dcf0a6f1b1df6f33ea9c1cb5e916aac2b80395522382a1801e15b44e97bf
+c32017aa2eb223c188e63a7f5e093b7354bb25071eee2c3a545763dc93e44e35
+96b9dbd7c4b4818fe8237ee258a2032153fbae62f5dc4afc16bcad79d2550a1e
+2221482e072b9ff488bee9730aec44740b55a35d9454a4afd2542ca9e992d781
+6fb6ab598ec696cd7d58db737ea1e72cc4e4ee39e1d50cf8af3d94636239bb87
+2d4532e783ea90cb1c8278a9541e90aa0b6cb5a6522617b406b495cd2f9af263
+6d9e9453174251786b4c449aa9ae25f9f48d6eb00234003a421570f08b3081cd
+62e4de0418033395b45f559ade69a75075f363a13add803d20d13f54f0f6fa6e
+4061f653d4021f3eab7808ef212a5565de8ff35e46e8bb02660326fe6bf92cda
+02f4990e9c9653d2ec5687662b965468505f26d772499e649c3a0d69e118247a
+72077084bbf6828daca78ac4524c599df56a05ffcf11d073465fff2c52b8200f
+2ab7de3212d573455e4be882a31e3f3b92b79a9fd621c5dce0c70f09df800df4
+8a594435652f454905ac19fc7aa3d43a5a5f360778e85e0b6b82d126136f4858
+3796833f454bee0f16c40dd79fe440b263d9a354ce8e7dda6947ac89828f0a0b
+4ea40d62a651421c15fbc2d271cc47116df9ffb388093efe6a3bd4a6d21150b4
+286cb50aee34371b13083fc5cb8ce57ade9ddef9bc4a77f5ba71e9c71d159199
+b29203c64c53041e38b413b901e90bbc9c67378734c049e497cc67bff03fcac3
+684c5f18857fb8a0d941660e9b04b55209241226cab4684ed71dc9a212d2a7d8
+75d0090ebc27e3ea81cfe4daa0c3277f91544d134cec4b5da927a8b9c0727ffa
+9db44a2d6d9e34a8673903879b041462708af18ec1c658f83d4f65d3df623fc5
+db60e9ca57db545ba05c10a9a68e94f85b4c2a42a686de90a50f482cf150ca6b
+f1758078bf655b04bb9cb71336c96ed9b1a217d9a0619a747cbf82c4421f5520
+3ccb5cac0067f83d17b6e57264856491bc1220aa9b628ce4252a9932aaf5fd6a
+cba6cbc11a5cf2d34bd21c77f3963a49ca746d4f1661cbdf2803ecab28f50aae
+66d2c2dfb81f0aea5fc3ff710a5e35edadc08792b69c4af174fed9cdfb2e0c43
+b5cc87adf3fc71121b1cdfed660ae99d8d036c4896362463da11a7d7ca08c7c3
+49ca8733021acad25f152e797a946d1b4010deb8c6dbb9432979556e0cb80a89
+493d58cc933e173cbd48118605bf7de3e8a909519b1f7d58c4b9811e7d3b50c7
+297270d1c1edbcbe0f4c3e93143ca44dc128eb5b17d1cdb1cd8b8233387b6270
+d2a8215407cc1df046713aed6d1495150bbea29bebfd0c08fc1124a4624b7cd1
+fec7f156f95321825fdee4c0ea668e2fe1b0d92d6aced305ff511f13ca92afd2
+e99535de55a09a3b3e0355645df6b4547a50c2c29a2536cba3909bca6b761b91
+caf5d4ab8e9eb5cadf71eee71f0433b9b9d9ce0394b5c87d38193498f3961673
+7a748fdea2248f936dadf0d8952c33a4ce3eda258cb902f87e4f623c77151eb9
+18e6e4fdc9537fbf03b743693187dae6c9a749b5c7c07c325b9b27b025c38b48
+c5ece2d82a1b982b9d058dc49b33aa425e7eb79827b5a62a4bd7c5bd4488099f
+f7c8d9aa169ad961e17a946b4e65599e268a2a96d53a9c0147da713517f0bffd
+cd992a1ab06f6057e17eede9c7f9077fa60bf4f11e885810564c0f40b29ffd2f
+b6e9a8051c661dfa341ef0ca3c630e4df019eb057bce4c1407f9185a8ab4f882
+81d175eedd45086905342282d26ae4df524b713ef2088451f1073a59acc3a1f2
+4004418469561682e72d20f59cb9ad4ee5232aeefc996ccb77fb3beb9a635900
+06fe6d2bb606293d40410919e31db52063c87c17584854d108f711af8112eefb
+890429a772e77bd03e50db3a2a1ef371268ea9cac1bf7bb15a7746790d67cc0d
+a592fec74f0000f2d1073985fd1053537a455548d43a12bd556063a6fafb0127
+e8c1190f11b992a0fd26a3ca823cce5fcfd5742afcdc02a790a25fa57dc9359d
+ff8fb3550da075e3eb3582ef454c92493e1578788f966db39d0038d2cd7811ff
+da49bfeba9cfe0654b68fc512616439226b08264533f295ae94108168eaf284f
+290d61a62e8c8247b66a64289303ac847dee0f651c1b4575115d79a9abb9e71f
+8cf7dc4b3db7c835f2abb42c37456fe3202ed6ce061841723bb2cb759bfc78c9
+07c51737b52469f1f2dafa7ece85cc798050dc1bb63436c94ed1af3a0e6628f9
+dbb10bc24d2a6d94000b2d142f654a924911de0779ee7ca12d82e04bca01b3f0
+bf6d1679d8a4210bd58933be71e5bdd9e22ae192637c90e7b8905586d8312945
+4d68274af56c5d9636dd4976c0c8574e7804bd8fac44fef418eaa7f5a0410be5
+a4c592bf762ef8e66132f71378c37ce7c1fb485d5be0a27628125cd768ca1427
+790fb8c160a7f94b80188dbb55184ea6d657178f30c055596a370c9f40dd64c4
+f7246bba74679a347e03d7037a4994f348c8c4874df31358f02157132f98ddd2
+322231a9271018a49672897625fa0041550c99ca2cac35cee4281ed9db5cbb0a
+229fecf98aa5facfb951a1b116ed5c58cf4015a9bf03a0b1505132a46ca6b3cc
+02002c40f040e0b97303ed8c42d9f62a95610de3506c7a628546f9e4d6e9973f
+2a77cff929c7a41603a99363dd7f87f3c076990546e7814ba3150d70ce635943
+88152a0bb6d23bb4b0ad0c7edda0e5fd83842a6c2db044330119c3557ece70ef
+8297d1d86334958ed8037d6fb57ef20bcdfaefa66d2f02cf9a074dac8097469a
+b35a644035a7a0f91a813aedb3d9ec6fe2ded7c9d5a414cf394dc646df0510ba
+f27f501fb2627834376f9776d4f00869bc8b0189ce88008503bb16bbc588eaa1
+edbedee5e41b81774054df5b31c4323c4f2d2289f018a3d07dee4397b69470b8
+b1d64a694f1333130b5310763054870b88d2d017fbd62f3a2d042ddbc4cf68f8
+e1aa1f790bf2c7f598ddf275f11899e46d18d9ce4645671b14617cbee762a485
+95bf927abd6aa985c1bf117d82727432b8cc573197cd87a096daf130de5c101b
+ded264c14969b04f8f55299ff35cb77b033a1752ff04c96a4dd43e9e66fba118
+9dad547bf90c89bdbd77200042172c6243d1c465751dc96f5101eee86c76e4d5
+435d1f1fa667e7b575760681d8ef3b97f01f58e2406d3aa084552ebcf985ebed
+06baf00f2098f01976db0d4a36f39221b08c00b680ee425a9fa22b5baeb571d9
+31c9009a03a88501ca1cc8da7a3afaaceb87a92835161c3f4c84970ee219dab7
+ee9f5542d108b9326d5fc58cadc39d10527d481d303cc11cc424398756932aaa
+b06d5600e4d24a0d7dc36da7e8b32871fe36e59e1049cb9ae8c361c3c3ebb365
+5ee4a2facda18377394b68f046655d679ff8122da647ca64df6a7b99a3bae5b9
+da56fbfdce787f9f8263eae5e16f348c22aecb06398d714a69dce1a932f2b50d
+4964641ded3143548e33c879b8c03206f6feb025268f61f9cae4642e6009c804
+3adf0e4a1b5ce27a812559bbbecb7402ac2a580c6d8471dcdb02e6960fb51396
+4058ead51e6b121158c9e3d0dda75439e6eb47293c642c60a70bd9307ef337f5
+ef4601dc0eddaf6d675d17e37350ac6bf3cffb442a602054b52a5ec600f883d4
+cce1ff0d70304522df3d2cacb5bcb2cb37d453b76f7d4d915663e19c6e1335ef
+6fad8e7b76fab514abe26d837565908135cf8518819916bc9f0db07fe3b6439d
+c42de0dec1f5110b8fa5ef40289834953438a7bf83a6261dc80cfef8405eac76
+32815aef696c5b86d2cdec5d3588bb8fc5e9dc61d97d2a5869115c8260f31f06
+986110dfe2c477f80bbf6b3d9f59a6dd573eff782887c9b84bed766b63fdaf13
+dc4ac55b7a127be7c2555bfdfb63ddae8346cd6ccb6c77ac057bdb1c51372603
+8cbb594119970a50f42acae2b9d69784c5f621f53292fac082bf8a78c197af6a
+8b56466e9b14f825e45a9d8f554db27cafcae033831219f6bfb6e3568c7532c0
+ddb22ed77cfd1f46bb98480d1cea4800e3d2b8f623051da01bde6c8bfd1aac33
+240f6f89d49c824e4b5d8bfed9b536fd1773a3ea254d2e56725861a1289de1f7
+8960dd096d6ba285716881f26795345504bf0685127d91c893b57122f858e1f1
+93ce8270796fb9b0fd7246445d484005689948c40376a8e612fb8827965ba50b
+565748c8afb55247f32feb36a4245f136d6cabd1f491b753eca2104199bb3f1f
+461d1be91c8ebbe6379b2ff0eef8a6fdb5fa98029d7cf458e17e15631c2b63d1
+72264f66e45a8c108460e3e353997d9ee098f83537a22b5cef20fde0ee260b85
+c98befd03e86abce66eb6551625f8dfe379a07f53c32888e9e4c04817d6d5abc
+f02ca074a8d11754f4c6fafd3c0751886de2fac502bd1d3d9ec6b56b4d5d5c01
+90aef863969d280220e45f9bc52a18784cafa7e9bd0aba47832cd22e6c0cedb6
+28cf6a1eea4e519495c60be2f0657a43f311cf331e83e9e8109b6ca5235097e6
+d116373c76e9dce208bbd9573c7b815e33e3e39f8eda3d1d07be9ade9f74181d
+c5b9214372c93275865d0d4f3902c5dafd4fb246808dc253d15626549fd97102
+1be3384bdbeb3e70f5b846a85088dc8c4a9a411ef04cb3ee0399e2f92e889ec2
+800faedbebe32208a0f81f4fb33b97bbc9daa92a3b3a53d1f7a1a957cfcda2ba
+76ec22331c2ded3de9ccb0f51e7ca924ff8d4f0f541bba1a62da701fd2a05c02
+204ea9debffce3adeb99995087932d5963d2a6c39f715225d7662873624158b0
+a3fb470af5036028a3f04600f9e86ad203fe14dcb5360aa9cfe4e225b5abee97
+e21237ae6d76aecc97470950ee7a2d6b2c5d6ec7a88578ccd349aab544d151c9
+67d693f7de7005e4d92c5dc7b14b6979b1636092fd75b52ab6e83d7de079b2e3
+f5187467a0a6b3fb4e001ac42c3ca4ba743536d9e9a8f0a37b23a5509fd88ef8
+bbeda576aa8440eb7c76ed2c1b2309120478e5a35e071d75c16ef0086eb07ce0
+4e7242a68c801dc3c68663444db00efd46649bd00616b5a346955ba95b881e7d
+82733c8f7b563ef8a124d7312fcd0ce0dd57a26e6e104a080ae51b9b80b48960
+f1ac9f15f7ad23fdae73b7e93edb14823fadf09afe275d1503a0bbbbd57efc66
+e7b4f6468369718601a36e3b163be29fbefda393416a86f976d631b80ec34755
+9a0b2e328ffdb6a1ed1ede49ea6749d7d55b04342e40804f030b04daca04b43f
+f04d2e71c3686d9a3509086cc247524725cd7ac89fba7bd37212754fa0afa635
+317f846959f2a4ddd0dcfd1b1e5cb66bad528e47f850941d7ce69a967118f490
+95a8f8978254def9e7c5e91d736a70cc3ac70d1aad33d1195256020a9ccada88
+76c0ea39dabeebf3182b0fd89fe5be65661cdc62afd9a3ced45628adc41a1a3b
+d681dbb4c941020ce8b8478cacb0e4fceb5b6c16ed9ba14f1c3704c89114c5b0
+80d1a7115d69e6f932096eb9059a6252cd63531e9a72a36bab438a17686c41b1
+5a7616d857eebeb60c66d3b2a991fc2eb3f0b93df445b370cbfbc1754051d1bb
+b2997b93b66ecf29d6e7d3c552e0538fa41e0896d05c10684e280d683e48379e
+164b356e916afb48f42fb90acb10223b54e74a2a821787322e628f6eb02be9d0
+55f46574342907e69038ed2258dd96cfe873c6fd5ecc7d460252762e7fc4af9a
+608b65b1abd49db62324c1efb0742c2ac7453012840729e4798fb62bf15a2db5
+13fa7ddf79c204efe0d4b7cb7978aa3eb36a2c53c8d2c913ebf3debb9df9c52d
+c5ec37eed5d8924adee4ab8313467f3f0afb3bf9b424749f73715cabd5b86ec8
+7264cdcbb8c111a4bab2fbc568b65a081a8e7e18fa0d04462720baac968cb6a9
+445cdf029ab4adb8786f35a8d2e02459401b5be2ba6522a7a90b46d8333c35ba
+38437539b4b994e1c1ac8f6ec84a301b764b284ceff5ffa842f298d9c2f3c197
+54809e99550cec6ec73cc66b94d6e2980c54f17506e7c67902631704f51252cc
+1596405bf72ec7243687fc7a0de9b8c2f4b311dc8ec7fee6bc31645e4322efb2
+a59483c1734df0ab32ee58b6a156ca6b9507797706894aa412b9903203fb506f
+345be538c0e253dedcbef172cb9365f99e55b740b45a091848f8ce635f54f499
+43afe4697285361f718b6de2b79f98e0e3adae0509bf571370c425d1aa795cb4
+a1b10ced0d43b59bea690990313afe7ba7eba130f7e5639bf12c6b7dbbc1a17b
+4e0fdd4b02e7fe481ea5ca3cf45337d47488bfc09a0312b0258596771ec1e26b
+c7803227bd4a5bdfa0495c227a454a579dcab23fd4ae8034458fb61b7d89de7d
+4524d7bbdfb4e00a6b4275691be8f77a490e768309d6174379f52ddce411b55d
+80843074dc394e4e88b7311918985a58e5012c6eb8007f22903f3ee0cfa1aa61
+3128fd7b6dda6e93a6cafbc6a7f3f277868dc34939542072fa746c228745319e
+c0aeb14792d9d266b2d58c804d7f4094d5cae77bfe150debdc47f2f23b0b37c3
+b19e19cf0ebaaf50d64df8f624048c3cae65e0c5770792d6a6cb97202174b003
+a4deb8a3758a83283dc162cc88526a3d037d8ab1f823eff5115da7d2373d1d11
+56b883d419931f7956024a22312130659a8d2a946dc9cb721599fe7d5d28dd66
+12977032a94bf26215af645d8659ce53528b367e30368fe0db4b194487a4890c
+26230fd2bce623a12bc09b437df3a3faeee49571df114d6492b0c1e3ef4adb7f
+8ec807c39c3ac56aa82b2a8e7b4bce3777ce3104d3a62e8bba72608649f12b04
+e5908b5f9d167d865c9cbdc94e3e8c99e06693fd43283c58cde48e5295b327dc
+176b0ca861033c1f183a41a7002e9ebecced00584c5c1fccfeb630c20666d91f
+0eda19c9a59ef508260f6bea436b351af6518cb4e009865fea06d4fd3b2ba970
+c3632c4556861e54a6441f7398d420a99624fe52cbfb68b8c1ce2a27038809c0
+424bcb7e54c5781be2be39e52bcc1df2b74ce7828056cf8e3f5a56df1e54e7db
+d281570e270dc818aae4581789c7494baf7b1ac9cf3dcb9cbae77da67c39c6ba
+db606df4098d341e81cd5a24d1abe2dea05ea064cda4017526b956cdb79540bf
+7f1324f9e256d555ba4945767f2c72db5597abcabdc81e3015660232c67e0949
+0ba4b7a04074154e8083a8c883c8b884a1681cc2525f6cf45330d8818cf92906
+049da3a2455d2041a0cf9aeaa2ca7fd0f4e5d15580e5bae137d39baab9c400be
+0ff27d17d87970db423398e931f58afbc415758b1b1a8312facde8c4451dc91a
+09cdfa481770f0e445d35b98460b6a7b3e93f2b3d5f0b49b967a3819c13ff6b0
+4b3e665d95d8760fc380ba7f7d400154684e081ce7e2000c6e3a02322d3f3835
+4e49daf3c8bbb58422d64e73e0a491d3edfdb599614ef55b603b00d8e1aa200a
+225f39bc76f58506ee900c2db1d8fd16872998017927c4a561b83b6167a34ca9
+4407b21a2607d96846a9bb7b543382980e39fc1a9dd9f47c562de35e18a341b0
+63878dc89f993080a1d995ef07991d52ea00c6372863b56b744344541feddbf2
+75b432e36368e85161e1ad0ceeb772939ace8a7db790c66d5b821a90d1cccf7d
+ec5b2970a04efcc3060b0c163594d7b4f0215cc30b01e71b97f382e11f27b871
+922ce013ba8fc3bb678bd64630936f29f853e1379760bde9562f8708f8905a59
+6df302ff8f289896a7a38809246e2ece8e99e96b6b471916c883bb7c948e8fac
+6588e2b30bfed55f074fdb0989b85fdfd023f15f1ff89c2f29f4f5381c5ef9ff
+8e702aa40c1c6dc7aa48430c564ed5712ebb99af607df5860af30e1b4ec1a492
+6b9ddf2aac1352f4b15613cf6e86708c73bf73728f3bba7eb6b0d30c427454b3
+c8e882eeeaa998e9f02d10a787f6017a5c0a55027d2ea1da1485ab60a397f449
+4f2fab1106c23e3ed97dd268a6f5a9abb2f0cb470e1ee6411b27708b1f2cc7f6
+9efde016cf7c122903ac89dc47aa11d0c45414b8264bebce5850b39884195860
+39a7cb52c877e5ea6a0bbcbfbf3a104c0a66af928f6aaaf062b8da0fdb290f51
+9b26b6b2cf2fa49ff36e7435b86f720c06036f2a322c3fd0fb37ea7b850ea80c
+6cd6b4224e8eddd5adcf97f69d9c80102ae4f6f6e5663d0e47ccf992e11233db
+5f37e9efeb51f8cb754b919a80c0f0999311d1784221347d746be1590d077f8f
+c8a98ec3ba007a04866bf3e1e24bbdbe7839bb7adedb55c3584ce2e2b85a631a
+5bee6015589a877604e67121ede937afca89af6e186d10d3fa057c9703b17f26
+30025f6332087e97b1ce60c7e26e48d546ae484dbc604a1b33528b5dc41bc2b1
+1b9d717dcef2d469f7b5f0b3047876c578f3dcb15425678136229a7387966c00
+593c6e96e603f222d4bf10880978e1d0f2e246176e6daed0ecf75e30430ed2a1
+8907963577026bf6689b4a4c420c5a622602f2390ef9fbd5f6c716c8550acf50
+3180e80c95e8d4db4a8fa3eaccd85672b2fb2c0f7b0f8deb4955bd625f131904
+289166003bb3451c1d82b19c461b21f9523681468ea247f28d6e8eae788cf06f
+3148ea2d53810077c14b98b5aa1bb2294b202885808854bc6107f4667ebaec53
+6dca8dac30a933b183f5465bdb24ac02a6fe61d7c440e068d5c1b2511599971d
+09ca25be37e1baa6580850a7656ef4875ac5dca306ae04090496932140464a48
+2b60cf202b4e308a97d4f75123e655e4d210b6f2f285ff921a9906028e331aba
+6542a742fd93bbb77167d04267e3b7fa862437c37c2a8cbb1e4085ce24887ad9
+b00155d04414e5e8d35903c4b2f842b43a333442d17a0545681a20188e6f58ea
+bee8d954f42963533dead29cfeb41dc6cb8e70c122948be88afec65d315d3a1e
+8440ec98d8191c891affca48a8fcb5feba24cdb0716466840bdcec527520aa6e
+2fc538993766cd018effd726855a2759a0b90c12995b475d6e4703a8fb39a59f
+1499ca0079d2a25ab06e0c8772889354840c25e10cc6706e9108b62ae8e545dd
+1be37905f8adb05fa0265b736c55ffd4ccfd8b0e4ae6b558c1debdf02a836d0a
+bee910df3e245d668cd878f528b6d9d16f4a0fa5540623182028ca199a0a8386
+ae47cda55b8c71081a78efdda2d709d973d69ef1b8f27db52ebb298bdf2fb718
+afff5377c78edbc3a58fa3d56a3b811bf5873a8f787897c62ce1a281141df5af
+be323c10e74c8ce430dd192dccde81adc639fef9e5fbfecee5be9d0da1547211
+6d6961617b07b6d8a8e184969da1cecc18745012ced3834fa40dce5a0e93a673
+8f51f43afb5ad5ae0939f4d3cae2b1e386fbefd8c840e2685b156c4d2f2cb563
+511bfd502ea44f80eab5a58ea38a682e863e13b07a442864c1d8215db4e824c5
+bd5abb55ed959042b65bb7d1272c0e4d429024cb101d8d340e3c9b918661a55a
+d29cbd42b25000959044f9d5f9256410d5dbdc9619a54229a1ca1a96f939cd04
+7fb87288db04a3a105e61b967467123d186ace108abef8ea741a4f3aa45738cd
+37b9af8a997c9f6a4cf1b335e3248000dcad05d7565aa99dc144076bb70721b9
+eafa34f716ca82830e8981c4368559f859ebe5a89ef467193a08a3ce62822321
+4637619f8ec9595107d156be7153b6433bedf24d330968dd9153bb90a09f0a91
+43c851d4a5de88c60b0a5d8e3fd2ce90617d14c2ad91a3b9e54b5447bc0fc905
+d27e961b1888ae18d5455fd5878cd43849dcbc2b01a1cfd2543ef89aa4ac0a07
+e4b3bc437520361daada75f76668e37daf5c2f21133653ea1855851a3fac8a3c
+a8bcfc449febdcb4566b0ade704fb68e8715eb37461750897b802d099af47ba5
+3efd1f74f9d13ee62aa163174cf38d8e75f793f763f9ab03fafd8d52bef23f5f
+86f4da2b1cfbea8233805b9d9e47e7c4232631a56360dea075491e410ce10b33
+8e9bb61387fda4dee805d038c67ef2c9cf36ef4f2d7705ec90002afa3ee52059
+d4412a1ace2939ec8753653aab214344cc65b2c2e2a0fca95fe6144953c4b2f0
+8dd8b6d0bb097ee5d333e4f9c0c7a54687c3f2745a5ca79dc3238ab554ced0f6
+29707805440078bbbaedc13a2ebf81fe9d5686b9ea7aff8d6d98cefb0f453fbc
+441e9d82023541d3dcdb8d255e16a7b48832bfbabf7802161c7b164bd7fa7035
+8cb6f75c1dd4838277a5baabb00276394b7d3af5dd1ec4db34c33e73c6be810e
+d1e1c0f07b397c466ca035edadc839ccc6c3b7b07ec1f669ed0798d1296b191e
+31551b05356c2fed9fe7680e0b5e1ebc1dd117730554c57fa82854729f3e4c6b
+2428a8de3d3555ffe2220259ba377772616f367966c983a3ac18b04471506e6d
+07fce9847e39bd3a845bb894f7b0e04daea1f10f8a23d030a0054659db2b8949
+a79ff3d3df5e76e7bc5a0163e1d108e30d47c01a0d17780736a36b664372f6fd
+71f65fda05da8fa900c3f9e6f78c2e3a83e97cbf56aba6e4d6be0faa5ec5d7e0
+bb97e659c6c1a778354907ed74bd12d79d7a0b4fa78b2a157c3fafb6814b4759
+3db04c2a8b16f3635efb2d03525be6d6372560bc4c96e489e971559e49960bfa
+a5be48071bc009df1482b6c9b452dd558cf537ed3263a10b278ec050492728d0
+4f335c50b2ff81c70a78f8d8d3f2e3f9efe9efcc2c5f4e52e00b97ead7d11295
+912b35bd0dab31c9c3e661db42eb98b86e090e55db806b16035848de4b60bc07
+f6b7d9ba8841a73471692dcaf020cda34343fb71a18910aa400927d4359c535d
+773d3e4b7b95fc2b10292a38660f0aeee380148ab062142399c767c4add99367
+f28c35d5b8aea728aded4ae367b41d43b6adb2032410d70dd875828fdcc5c976
+e221f05c764c5042d2a7ab671a234a4baaef58054064a3265d6e5c92dc532663
+87c81c142f1b94ed0f5a16eb83fa9811c475aa0dc93f9ccf237970904d983cae
+a7914a8e481400e58f431701bf0cb884c1e5c1f52d592ad3caa7d8a37d1c9568
+acc90fde3c96fca19bede3d8d92114d4702e1d38e9526fb918c2b8b8a80fe52e
+5545fdc287108a435029613684952b6d9f5b14ecd5b02d607a311b90b84d68df
+ef5dc37f2c55ac5aba975bbe16f1f18b2f17b4a9fb96754fa1228a848fbc6fb1
+c874307680c9c58f46e69bd27ca7e55e7cdd7cff4271341dcb34ee5b300e8dd4
+bdec4fee74bc74cdbbd0ecacfc1a4ac7f4714b4bc308ce6d88438920fca53ece
+8367968559eaf9df11a0d3bb80e650e4d836ca854dc1556b5ef36b9e64bf60fe
+650125a292b63ef6982b7fc80de9903cfc18ad9a1a14dc03d32e9ee15adcacc5
+a9b11139757d948bf23e547769f4d9e897ba15ef4a495735af47de7bdaa63765
+40d035a6ae198f03ef371a49fa624478fee97359bdbab730e4750a79e4ecaa3d
+182c6bcf9af7f132392b5e0940c10d8cbb27a58f84001a951c356706ad2463b7
+24baaf3a13bb4aabd80f4c1d32d48a0a5a5be34b03fb140c638de3cfb14c4c1b
+ca45d82c270692d193f0aa4286cfa414beaa7be6908e4d1208b5c2ed29407091
+c6fd5e78400d148a9ae24dc6589dca89ada0ddf0126203229b33de78f409c247
+90ec215d8889e450b6041406aeb5732dea90891059e6f03edba61e003ef6eac6
+925e213b1b4cb51fec8578d36527de080e9b6a2f2a8cc08dd888b705e580f4a0
+5dfac8b6c05b297368fe786caf8730fb703b28ff3fb63c5183f4f8f97719e4ee
+d65d13043f1b28b01a2b555ce07acaaf98e47d034e6a3e271122935f6224a167
+5b4cd9fa85ee51deb3b132b36fccd473d1ec278c87a6e4c2976ea93c5348cd6b
+9eb4dddf8f3c9fd6d5b7a746756762f641adc4e1bce84423d589cd4d66d521b4
+a99ea4c0766e9de460ba8f32d580383884a9c5e4907d7469752ee7d68d04372e
+db9579b6b20fdc55c9bc29b227248252f595272fd12639d0f2179f27754adc25
+334f39f6205ba259f5544c39dada5d7ff050d80afeac0c552fd467b10023e530
+f791ad4b12d04665a9f9e04f7fa19f74c73890f6bffd42a7da2947ae70dd13d5
+8ab82e2c44a7bf38c6bce43d7026441418f12fa7a2a7cb81b7e4d4d0652d13b2
+2d6b130dbf0b6433db47ebd76cf0ee4f2aca9a4d8c9b3339c03087f871793105
+d25f5f4591a8c6af03c42ad8bc129437b5698a6c67fb36ef68ca0e9291a3eedd
+1e5fbe6e97a8a56482c0c2f99919648a24e4067c6180a35f37e066af4134abd4
+e366adf29467371a14c80002b5afc5003db922fa92af13306de6ad27edc0ff47
+ad4da4af9771c76ef2c77b54fe2a67719478718989abf9beefbd962b449ad634
+9ae7fce4e6f425e752460dbad42163fe5e9f8eeb93375fb3f46990445ef2e59b
+de0045c70a03300752482f1ddc1755806babc181224471af546b31584d50ab56
+9ff247586ef4e52363df927b8810a5975152d92915572e13c92a65e5444a8ca0
+46fcd260cc88761a3ec8834e169af050408655605c793f9298edb5f657fd9e0e
+0142cbcc53e74a5b00c3d0c77222b4b5df610ece643275968122e36135d86ada
+7fbea4d22e1b51017274365069d75851b50e8401c1c34a228c23c10cbe330dc6
+4ed9b9aca8f3069f636e286bba6cad0159321d5c27718f410b39f99f4724aaec
+1afc7f6ff415a8fc73d5e26be4cd6e93b5464b764b7cac70827d48a3fa61c7a0
+f1943551599bb6216bb70b19a1a0b763e2f6b1c4babd95094bb87c222fdaf5cf
+9eb0467a5c93a6c42f4ad9be37d0137a057aeee887f9ced56ee8ccd85bb8c5c7
+7de9bcbcb7200c063735150ae6f2fa20cf3cd920d5198483ecb81c0eda832843
+27e0c1828a244ff1106323d4ddef2c71430b4c4de536abbb28f87e5ff93c3a23
+7697a73cd0653bca405e167aa727b132e98092629971184405e342bd802d5b72
+f1a61d42152936472892786973ef23a6f4254b3c3a42531fe34af9569c466373
+8bb88d96f27a8478a732fe405840e685aa416052a8a86beb62fad458e6b90c17
+a45b1ded2eb9a31e2c2f7ae2832c34326dba870eb3fe7439fc69d6f26d5572c6
+ce9b77a07d977392f52594c4610d5c1974378d2626a79d7f084ece540d32ed18
+5ef252ad0b4be2fc499cc708cccb88a80ae59a31e3038fef230dd0c101781d95
+b754338c0286917d565feda78b54e9a46f929fe351c74b649d05e014f4b9f941
+14d84223a0f3b11f6985fac073e2e6a3124b664883a92a0efb9b1d017f823525
+fac9bc150808a58caad6b7c0f4892e0285d86e79d587686d0a52284572ccde01
+7a9eb12d4559e1793e09f92a84e99a0ca40e00024a9d80ecfafe6a4a0afd607b
+ef3c195148ca0699a363057b98be0ff2981bb9413fae9891d8ce9fa723c278f8
+828be8479cc8f1a792d5cc074bb7ec4c3e65c1e2ef34c14241fd0b6c097ad945
+479e7a932aa4654f34705cabc11d8fae6f4aebed345c325f907bfb04b41b35f2
+4d261885880bfb5b1f98b138ef31e3a7b96e439232e4d0d9bb84139f41f48561
+d828648a60ed3ae4f092b86bcd6789015b085506fe1f266cc02ff5c5f3ad7280
+4456b4ef8ad3c1eb2f4fb956f726dcfe2d49a73d7e9f7abca13cde848550cde8
+7e083b85084000f39d390d707a017c63b44a9563547648c48f3d3e5c577a9e15
+a7e663c19b7d82aaa700229bb541d7dc95d83c3a953670c6aa4ba8a95e2119f8
+ed8b056d8dc936c4fea8e8b298819a56cf089c0be99820bf2eb51455e3482f57
+62acb88c1baa53ac2dbae3030043e8992ebe1a7863e47d9e106a60fbb83355f3
+b98fb2744652df95ce801cc169936cb12c211aff9d77ae43dc7fbef2112e2d44
+a3ecd9a8c2cd6fc94b4ecc6d1f5b2fdacdfd153e11d8c936d822306ce7cd6d7a
+2172d8f72ecff7f8a4d1eab8247c1261f8df09ad23e5893f900e1e414d13c25a
+1f235af5fff7743baac23af56c8d8baa12e095ace339a4541e87eed758ae490d
+04da6c27bdfae6c59e263c3143caf2febad0f61a618a372052f3f550e80f6a25
+3109a9d2cd667ba408e019fb67f8360d5590850e1ac72160f57ff00cb8e766c1
+dfd23f82fb24b407dbe5cd232641880da9054ce3934475db0ecbfca3cf56eb3b
+5d5f9d5b69a847eb7bae3f80f5d96e49cc11251cd4e3ec235b211a75551d3df6
+8c9bf13c5cb2191f42a92d9ef1419a0b31996a53a1b13235b6dedf6719ae00af
+af731d1bdeb99eafdb8ac4007e4a689aaffe5afa456ef93cb02b4a6842d60ce1
+cd0b0d9ec8c90fc47779fc2494dbc683b6db5360887f367ad6f5cc2986d21cff
+622f47f4dd116d5e0300b0d1d5ac15ff4162435c7a10ed614359d63d230132c7
+bab8dbc07d28aa915a91c5bee6f3073f6de313d561c0ef9c8746ce87cee5d42b
+74a9bb276cb8797f1715136b8a181a7ce12c85f5b9e288ca852617add6b72ab6
+07eace83bf400342f5273f2670212358c22192bd0ad7a5905074e42081df0fe4
+de698f14471fb3162a847f5dfb83a84f93f8ee6b6519ea588e0d4baff3953bf8
+81b78049dcbd4b84ce45bdc45499e3a5776b8e4e9063137d4e2556aa2e62b2a9
+eb5ce11735ed65ed5cd49135bba4b6d5f184eed7933f698157525da9793c8b10
+41d1bdf92d244fe701d30ace06cc28dc4afbc99ac05f2b8ece0bd19771c7337d
+d7470206c9e4f9ce5241ba4f038c02a8db27f75218875cf8334ed4bdb739a13c
+9d1469d58033f821c98b3684b51731451d3b05dcb1a7a691d3f0e2fe44a82688
+cc91e3711114d2997e159c81408665b2050c89e10a045ebbec019bb9e7567d95
+9176ee0cd69104974a26c6c7da1f690b6503a75cfaeed44e9e37be1a9454b7bb
+921f7922c213b175abd329b680f5def8130c911c25f4ba34fb2bf49c65ce74bb
+223904c11d7860ee74ce7aa113fc40a64fa702db89517b0fd444d0166cff31f7
+da476a7415e5c308ed98b09cb41adad1807694c1a39a20d3ffe0f33211e36d54
+395061b0df33dda283e1d7f5a9399bc144ccb6863611e7aac1817fd2b95182dc
+92755c6bac1b4074dcf43e556641616541284d5eb13fb49a4b375c31df13db9f
+ed989c06f374582862caad3b745fec8145649dcc6b23adf6b4852b6021394dd6
+a19ce0cbfe5b041afdad277df48db2955de8cda9a54379ed246370442196dd80
+0875fb8a65e3300e3e4b97ee6cb4134aaa59ee3517e285982a4e65ce966836f3
+0465e0a7d4bd636870dab95869fbe7b7b9cf28db23839a964612322be21c4f0c
+3cab665c4dd6f40150542c3ac64d147c09e5cc969642154a35edcae9c119bdac
+2b82e582e2ff515e1c88f91f474e03381368417b4084f6788a8e19519c9f771d
+92133700a7ffbf3e82ae50fb19f59a7a385d169d1393c150b88e5156c41e28fd
+055eeeac7fee07c6a3be5a8587be73b77826274bd3d35574e2ad12bd1551be0d
+d4ff959077cdff691b265cb353ade31f77ecf60057c0eba5c51a7bdd69739633
+b45c312f9b77b0d87ec77fdac0049645c979663dc0314c8f101681e0e47aeeff
+fc8f7d39a57009ae49735d6c386262bd09cad0f52d862b60832ead3b3cbd3efc
+bb992f901443f78f45f9112a8b79d83888b412803e5621e70dc7b2eb475a7a3e
+0d07c36ab6dd2eb352738536c879ca83b31906ebc89c7304dd1cf95559cf7bae
+eecc29a5d0f839b64c0a24b6b9135dd0fef4bbfa01b7d6a86d407abeda8775a2
+6e20bdc6d2189cd7055b39d30315b9ba68f717840c10f27b88e22075a7288c8c
+3db83c27b55d6032a2b71f326469af86bc7342f43c4c95c8b13bf295ad130cb7
+421ce98e16cb34afd5342289819a8927447c0df7c98e9a965ee83269056a7c91
+961efa627927d007bf3836ff5eab5b6241ec8debc29dba3055d38101d1032307
+86644c8ae82f2c516028f780853be93fb7a220d71e60dafc26e582065444bda3
+5afe0470dfc2f2faa9d2af52eb11f048b16ebc88f23f33944085e1d9b1e85870
+18029b166b6a6eaf36f2507415fc1a58ad4b403c89994910896bd32acb360703
+17534352e8b001ea7a79e81c07e740c3dfae6f247579f957fac2c71cc792f7f0
+1c5d51b81f5029866f454fefc4c15fbc369d0b5f45633fe46a0fb141ad869770
+91af47762fb7c2291a413e51f9d697864c8a7018818a03203bda7d356382fe40
+b271118745973af3455e9021cffffc9c429273404e0813699841332ae86aa519
+608e948ba76806963b3656c44263a1c5df864e8634cecc6f8dc053ffedfcf030
+fb3c759daf5376152d39ad6e724f2a09a06e77bc1eb78fac830149954261f8cb
+765d2aaef1847073e6a5ed1d965ee9d3ef47650fc131a229bd68a22aa3bab374
+b0ca5b3ae476fd880957cc7c08f8729185aed5de06dc4ac1727ca7942ca50e7d
+8bd0c697d43c70cc1992205c9b914312b4a91344d47be4a9ba955da671977af9
+a92f0102e56705575bbb13106995f75de702f0eef35474ac55608c72bd513cb6
+e6ad69f1dd84869c03cf13d22550471c04cc72a5664d3154d56886fca7cd18fb
+e7e172dd975923c6e6a34dd59653260a28d90bd16e5ef7ed6a76a55345b08015
+b5e1e209e9db3471b9d0008174922d1e120f00620519d526e85a80fbdd658357
+56428f1549147e1adcf069508723625f929ceacdcfbcb0eac8337b3de3276894
+1298a952cc3fb5f55589aca8bb44111dd1023305f8a1d2b70d1da6fd510efddf
+a55a18dfb4cc9a1b4378f9dba73e29d16daed328d3b915821159b0bfb6872240
+acd1a3fbda983af9d64188be5412b15a03b52982bb60a7748f06897c63d97775
+3e60bda00e6cb10c4fd1c14a49a9ba5383f025393f79efffe774ad9cb66bdb11
+e3feae202ac9ab6dc25eb347b967b9a9af308368cd0702dbdd5f8ca2744eaad8
+0f0a9093c127b1b01bc718e7979c40d2c3c130dc3e9eaeed82e44f12872ff753
+ab30138a8b8ffa23123abf35e67a20a44fce65e6f7d20abaf919f8e1dae23d04
+5e3c5ff827a3ae677e0ec586f828a0f2a60e61eb82019ac0e1798af174de34f4
+d65c27344cd9f575de52695e1564d76b3bcd81d02fcb1ad4b12499fdd6ebfba7
+c1c55c98c7418936fcab4606dc7203dbca8471df5828ba2a8d6ca99d4aeaeb7c
+bef1d59a6daa5d0e7ec0a82fd392790b8e17d25f51cdf802784931d9f10b824d
+ab7026fe65d2832d166cfb9b108a75b02ac5b74c7726cb5f178784f68d478ca7
+e29097b39014e81f10828dd37e22889551489ba2f6a2f53c72e831c75d2c36fc
+e19cbb452652673c10a79b0eb2cd2bc4360a464a8bed2e369cf49660c9ece723
+7d8cbec3c3d7fe2b223b469a0feaccea1451d1cb931ecc6c307132d89a281fa5
+85626cd2ab00279137c326061a1f3165b68d04ce49bf0d308a21168d54f4a3f0
+7d8b8984b41248a4b5ba90c1b88403e69c920179c41c83a5e2dca301dc67bc54
+7171f622980e28f452568ea30e9dfb145d06afff9e28f43b04535ac63250cd37
+22ffda3ddc5049cc71ff4592766a786190c7fe9c7e87331b3bf1c8c25e289e00
+e9aa9e8ac24a978998366cb808f1dd3bf204af1adf8b6c3fcc93482510c720af
+03e18d7f6820935881c4732bc2bd68b1663260581ac200be9b0dacb1e6a910ee
+d5186437c5bdb966b939edaacabc104c3db19553117de2371839e6034f0f9f9b
+878626fb6de546c64224475d416418a1fffd40341edf45f4d91df8571000b6c4
+e7e890ee4ca95e65f18bd0ac230b98d2487a59af084feb16e4aa48cdcd150549
+f93a03156ff8b76913decf03fb5ca3213b14686b664daab69d9d6f056cc6d372
+31122a599b78080a0ef40e75b9d61b17612c0982690bab7a8dff6265189ea5cb
+4d8607b8a3447e2de6463f97e35c40efd806d021d47f01568ad586ea33fcdd4b
+37680417b08ed5fd7bb1cf72b3751fd861e0f5170d6cb02a803c908420482226
+e009240ba80b0275b1402f6536da71325bd6c88e2d0642d60f964ed85acfc28d
+d0fbcc7ebc3d462cb97fc41b8c4bf8352a09d71ccf318db3f2ef5e16d6711c37
+93bd1ab7f7c73db89c93b7843c2c2f2deb720a2e840fda79d3220ac62c280628
+0062d213b27010e5332a1bfff9ae17063c4aac27a190a5559933cffe1fb01db3
+b048fbb50add93b115ff5370ca33678389a703bb381841ef19d8cd1b930c2c3e
+0f1211744ea18b15e6b29d8fb3fee9f5416718e1da724b7b3a1e82a28ee059fe
+463640a5fa80025208ecdd98c0bab3ba2cbbcd80b730686ca27b14240fb1e9a5
+c751f88f42687a2901c489c8e7e428616ae0553d503d093729b64edf3937434a
+390e6c6e1094848d10511feedeaf239a1afeecb5981ff1f6d042914f02f17847
+4ceb12269438aa42a0f9bde00db8783c01383be5c3a45941f8afd0177055870f
+484eca20fe4288a96ba1d7a341b3c48cd24ba4dcb14e703db1389a5659e86ee6
+e4884fa3363238f8532d950d5b1566dc7f68eb0a31a0aa314deefdec9a87a7a6
+e7fbdf52e14cf413fd6029a77aeb5f0806ba51f9e63063185c926ad04df113e9
+265be0f9fc4e71d2b18680bbd314dae429c9eb2d84789bb85064468c26c04215
+321132cd4eac9046092f1979e2833d2d5d1a724d10629a0d4e9c7e03a9d3b2b6
+3c07d9f4cfed06a476ccd1941a071679df08f38154c2936fa47177986edac8a7
+925814c83814c705994bb0c9546a1fbce22111adaad613960c0a95d98d9452b8
+7441c3666b539950a27ce6d892c2d65b412fc58547ab21a6d02f1209cd304235
+ec32f4349fda2d1a6d9299c9ad560781dcd011e1d2d7cf91ecb6f5193bf9a33e
+9f73a66b5184f9266afc4183131e7854f949d4114c48cc079cb892e8cae078c9
+c88223e65723bbdd78e23843515712bff13f4544d43a144fd180639c00e0f6e3
+9f871f8c056d8e774fd3d05175e8b411038483f333e18f169048ff21000fe84b
+2541309205f6635a05de58dd71efacb7182f3972ea4aa2c5a6483ac9e38ddb1d
+008e5a2f4940fcf820987e2bb7b73fa38f8441806ac0de93736109af54048a1d
+e95cab99b1f3c5e104af17c67f0e0a99a0dd9c7cac7d917a8a0032abae8c577b
+f6a647f505fca2e854998057387da13f8189a3f9bde597d66a1d87388d840f09
+8a9e712c6e3485eb1b8005e3e3224d959b925a237e167e10965f6aed03941a4f
+90354b6bc6dcab1a2079d0fec8afb174b57d339252bc36a554682cf59773fca0
+36230a8bfe5538f7770e126ebd9dd87d800663c14f5f8a4d4bb935fe7d05d2e2
+11b720bfb754d323a8a252919a048db606eac7c590ad68115d052a78d8f0f7b4
+89e048372b293ae6a44169ea795cf46d25637c7252bc7a0062896f546624e151
+891ca2e70dac19e06a3fd3c67de2ff19c3d3838413f82a38369c5f2166ccd869
+5d4dbd9856755ab9f7c94810488bbc713b1aba7f66c07155138ce859a79f023e
+8954decac00adaa02e38cdfb927460cf42cd34caaaa62acb7ad369f917bdabef
+9e2103e0117f6f99b1e9dd73edae4b8c353f6961c8f078327d7256b5ca6a5996
+bcaf0cf21718f574f6f2b501dc8a3b115d4af7af8062e17a9f43ef05c1103ed1
+b406b350ad72f31ed50de231536a0ca1db4373b3641b39471774426a87d5731b
+7aebab1f6a9cc832f7a8e542abe1b8815d20addf94c143f4824ad09d702acca5
+f80bc581e0c848248613f5d86a006ed509a5a55591852200aa9a3534e90ae0fe
+95098ccb45bc63a4d86e2e1883db0bd1e293360158a5403467b96c1b9e11f082
+ac3d3a5ca47a04b7605ba54c8f9b34abe2fbeade06c3f3d32d667b6a0074eeb8
+84a40571a4e5f2c31483accf78230043c5a17f8da13b1bc9fa92d1db17724bac
+73e48427410b582352164389f95357f53902454e167ab86c5a5c404b648c4c37
+aaced6c49af4479405fb9d32f6cd78e2114b820cc03877c29cf4707642c942c7
+3874aa52f3f2955ca7832a12545f745cfb8768b1d24354f9bf721d55bd9d0722
+acd1fbbea4b1f26128902892bfafc8c9b1c5860f33321edc5afe7009f6ee10e8
+d5cd98fa521b3f45869b41f8ca4032e8f814ed3eb0dac7828893cc1ef2649390
+e70cef649f6c469c830a2820ac2b19bce71b76e2c7fb653093b9fcf65477ea03
+0e09e3de1306a2131a1792a616755b670e91a002166433e03a221310b633f96f
+7c4671b45b9e5933f67019ce6992ce8575efb90d4691680a02a4acb8978ce207
+817505cd7f01e027a965f79e6d698d6de13f56ce427a7ff627ed78237f99a702
+efb328304bfb288641d8685cbf43e96e85e2d6aedfe97e8bec0bd5f9622b98aa
+316450a090f406879c74985decdc96962a50b5de3a5848f92492037011d0f4e7
+dd0fdc25d578a0f86f80a8ae25b9975fbac71fbef5c04810ea0a19b89facc0cc
+aa73cd34b809854296cbdf532f9593332114e100ee289cd181bd3b3aa05c4fe7
+b3f323638087a2b97157b23505f9a653cee29017a39666e3680df121aaf641e5
+f971007acf53e8065a0fe536bb72e2fddb8bc51701f5d069faabd6c101e786c8
+ef8d299eee8fc6f7f97c1d9c09bc82f8204c9231083394ce840312344d592d98
+f652724515c99539d2c463fabd42c8360e0f0f5aa9739e3d2e484d3d39f2ce73
+f522a79dbc46266aa36518f0278432bb380904ebb6f30ea6edc835e33b81be18
+21b6e0d803f31e8be97a261b3b1426281b00b8b6baa6ddb76ced67d802415006
+1dbb011d04048481d815ea0db0dbccb20044fec53da88ec8cadc39bd57a2dcd0
+fd36197e8075729a1bd4517751dbae89bd44e2ca7cbed060e3e6e6b124b88ae3
+02f90a2388bce72b3ce9ef9e1bc8392246271d4cd5fa6067ce5eb426b2692836
+6f00ffbd94493239104a7d71adb54f3f1d74447676511fdcb82674cc89ed6b67
+7e6a24a5dd5d29f76eff3bcfbed6b5e81ff42a04b42b9c30763e501b1bd830e4
+4c9890fbe3b039eed303f064e63b7bf7291c58f2b45aa511b6e6fd2b169d6ce5
+3c9d4331ba7029bb94b7b5265da7c0cbab1afeeb6368ad410552a8b23c4838f5
+eb07bdafc3d60458649ac2c8fc787bbafb1b17128e82359c89a20075bfdb63e6
+d9be78d619689ca0f8c2e9c38a5e8b5eb42b4d07a9a3542cf835a423cb65bedb
+ba210e7b2073919ef7d76471d17b165d6aedef70651f46d22bb1b6d3a8b3898d
+e9370aaa67830689c4773e20e0264978655ee01d30e42f8a6ea3ce955c657970
+23129accb969cf84005341b24f92e23b4b3962834ed91ed40c6866f6aae07219
+f49f0d260d329c287d4bf91c504dbb44d13da65a96b522673b7912dde6fe5e76
+2ee0d89ed7fd96886e761c4f262c88db3e212c603e8981298e4520428c058480
+2f5fe0fb223f697f946330d97f6275c100e5d15f36867a7e9de9338d654cf267
+5bb52e5ee6c925faa522780519c15b655ae54ff19203a3465582e7b40e904716
+45152728ad912b05d25eff9cdf03b762507d6980908e22ba5399b2fc2cdddb10
+47d8d3b6d502ae49527a62ca8968a2c8b6c814ee0cf1a7618a8ea8d7e7c5f61a
+50515dba6ed6187394d8051121b685be8d029d97449c85c95b4d68da2a31278c
+dc7f39c44039a3a363d243910bd26c882ba1ef5be080d0f8b8eef954d9b7c186
+ea5e664aa4141f9ffea443d59124e25899d0d18dced06702499ab54e72894285
+fa1ce9a831ab914be5711a225ced342a9de51a7178a4e5c4491a3aff1a606aea
+4b91188a20a63747374aeb9014cb11cd6f52bbf906af5aa6b5ac2cfe27e75efb
+c554648f01f12eccccd3d94ad3b3271ec690e9a874284fd22587a58a4d78680f
+20bdaa27a59c0fe1eda28b86834234d291682efce38bcc93bf85ebb7b493066a
+40ecb74eb37dd1d018d3af16977ca7b539e5d9e68312d255b930cf1a859625f9
+bf81aec791a6fa63f578a4ecf972e1f61ef9258eff34f91ad002ea7a5c3b29ee
+2ab6d77ac6c14c71ad07895206b0a68ed4c21e197851ad6944d4f61f3d089c06
+d0589e1dc7494f3e4ebab1f56666b2290679a7656cf84ffa3f1a58c1fed9a62f
+3c1b0de1496a711f5b8e074712c3b44f49bffe341ed6e5926368388d0ff7882f
+ff24a63273155908d94e78ed8252603dd8eebe7d19e588b029e5136840a26664
+9918867370b5f8d3942127044ec81cc46d1e88fe88e47b8af625b6826f2c9ee3
+5f8a6afd319d66812d80a171a13316c2a4c73900686d4616126aa83d635c4f9d
+27fae14feef992bddddc1bd7c890e67cc544c31ac9d05541d7af116724081cb3
+8517dca6cc490a02295fbeed7e147b1e45033c70afbfd711a2d41248cba6b56c
+94e1b2c1a12409ca6e529f82e0f23bd91da21fbba01f22968a8cac2a231362e3
+61523dd5ebee42c524cfdf2eaf818650db8da4e382cc519214a7b4fb3f90e82b
+315db75c77b7ca98f2f21258a68417326cdb55cf6c2b31f197872a8d9d65e17c
+dd64e130ae2d6d2a16a717de89257bca08f5bca777b3021ce17d5b1a07aef098
+88fc1e420c9e08ae3ebd4ecd38d4417191658035a623a3dcc20257c0e1c4d1d7
+d7e0e54defa4d27fb4f815ddb2604103030e95f27871c7b0e9a4c4610948fa16
+012c4b30cc2e6c03a7ccad7f0643b9a1cc1eec9c7a2681ed802ddbe7d8eb18f0
+2770b022d4f2aba40045ffd23a888e04b800735f917f0abea17b934e4a7e4d06
+aaad3add44cca6826070ec12bc89e716dc416bcefe0725c086e7804ab8b7fd91
+6b1e1e3b289afbcb202d7074de5c61f2819f13735639aaeb50e7dc9aef89209a
+eca7316bb46f7f03ee99f56817d385102faaee63ca8eda61bc7b905ee48a9625
+69dc8122ebd8bfabcb8de515b7dae09542db46e0e6036611762442e8d3943d90
+a89024e8cf46bab577380287f30284717c433f304119762b276fe84fb0d0f075
+3d6591879886da5fc0e179a7fef454699e159e8a2d35dd1f678c8a5825febc07
+6b2d56fc48370317c9fd3cc71a4cf3772bc6a9f202a736e863ddb4cebe059958
+1ee4c17ea43b964cbc2add4d2e2ac013b43d11d1c1471565b90d1bb0da9b914c
+44810b030e137b37ef8942dbf6b041d9f7f90305afa411ad92527177f894c2ce
+835b8942eed694b6e7503851d5dc49bd40e05056841fdd21d6c29012161cff37
+8e213657bb2db9f3655cc1d18b8c6a4d31b2d37036b1be5f51d1277cee26c758
+685b9b2bb9b9f9e88f9146ba4ab794f535358fb49fc0d40ffa41ad402644120d
+0ea676f3d5588683683b79520de05a35c0f394f0f5ec6d13ac6b1df71e030dc6
+9d51c242324df025c96c5429f19c7190c77666731a46f8143c37252db87120e7
+8bf1c9f22b7a80dc4b999baa805d9f1eb5ac4e28a70d0fbd6c7dfdd7c1fbb560
+26073cc5cae5a1cdf5f8471585165ee0191d353ccdcd05f2117cdae9cce71d72
+9d0f61304f1d29eb2c5b6ec18290a9b27baceae80a405afb5664ba513ab26596
+bbaf87266ef51dbd35112eac5576b04b650031528738edfb937dec3f9b0caedf
+2447aeeffec2129814289b09842d3dd90b86300f1a035849b87fc2dc2e4292eb
+568ecf43a518512f9dd5287988e688c5f040a442150d447196bc5216df070c0a
+551928a0629cf3c7e430baab504b2315156cc367f55f090dc1f6ad0214353780
+f1cc7f4a9b262debe551a5de29cf1cdf08117de2df62f164fa91d166eaa72758
+9b862a3dfdbff31b404c11e411f0c642ca06962c18304403db2eb93cfadd392a
+c7a030971f2f897017317054572a4b5fe8fda9dfbad4c079b0c9c3e3336aae94
+b11baa3d0257a88a1919be409db0e1ea7f2f55fbafd3b4a8b5f55581aab8fb31
+a233d2081374327616cfc745b3c7039dd295a0b5068560fb68eb67c567c589f6
+08a45a312ca25accb1775badfd7b2eb0f4bc948b62362b3bcf40766b987622b7
+da7d9b68a7909104056fd5e0709a5928a0c314d407745c9b5f4c9a65483a7bd2
+3f550b7030671bba32d959442573fe4e6cbeb995b2fbc273b6894f70701fd2fc
+3f6ed6fe95cd521e83862350df167894510c93b44032187f171773b42f483e61
+2048daacd1f4be69c9ef5e6c1f63c72b759651047cd9ce71199dcbab1c36c1e7
+da6dd872b1a4c03d7145e4dca72064e2ffca5e43fd66a7c532feda1000904032
+843fcb1e24d99146dd27fc507cfba1a63b0843af0ebc0a336aafee4eb27d8796
+c0c1298a23874928f35c7cdd27145835742eab898c2d04e7ebd5c0fabf4806c4
+d44ba374cb1ff5052be5066d3a52e1f2ba4841fe35ae6c097cdd1c8b04883764
+efb0f51f646cccd0321ecab07647066dcff2bae0916983248b080730e45b8aaa
+df9fc1805e6c5fb1b536c598ad35c0f69f561dd949ed142ba7fde6778620e8d6
+ac443fdfdde254bf1475ef95bbd54d1ec0d9b531d1cf690cfea6ea9dd4d732e3
+e5bcdec23e92eeefd411298360effa920d3ceefe61858b9a356023766a181bf2
+aedd269b7d4c610fcc03cd8fda705186b3c842bc6d7299abf6f704b419bd2b2a
+a3f75c8b0ebdeab45eff8f1b9bbb9b187b03a0735b28813860d2916f7279fc8b
+e6df8e6f5155c3dba782aecff52b1be8710747c51e9a76d2574fcca699b9fdc5
+48043c2fb363a596f6b3b371657bdc2be900c9707a78fbfcbd1c0bf881468e2d
+f7adefd8bf30dee1b2347aecde496c012f0cbfe3816068ff31f3b3adf56b612a
+632703d469de017d29769ed5d55aa1f37651c11f0739ebb4c3af0a3c62c4523f
+05081ee09ae3076d361ca40f8b13d4a631b9f24a5366f4e678481abe3993ce9b
+ab8813c00b4b95be15086c69a55e65ae908fc071f0b3c59daa9719321edff148
+62fa6efdd42bd192d0138f6bbf5890f78a9c38d147ae00157f4307dc3095432f
+5bbe889da9a5bee8669c6651e758ed5ad38856433fb9702d70c12aa29cea4424
+8e50e17ce514b8ef3131a972b8db0b0be78c93831806e98916572e7959b8317c
+54149e5372718963eb74983316ba7a0418a921433d759e73cdacb1bb6ac69df6
+7961040ac80e5459f3120ca3c8eaea02497b64ef871030f1501ad79dc405019a
+00e355ae3b7c48ed22873196a98637ba2b25bf8b946ce509da8bd25456373c29
+dbf08751baf2bbb23ed57b32d3abe306c29eba95e3a404c3a15b172a8313932a
+c5ae1588a0227de80156713ea8239110c31e0452a2e2cf376cfcf90a41f68bdf
+c08018786b166a5e9326b1beff6a4ed7fa44f523911d1819cb6aa1ea58fc52cb
+51a74b886466964dba973726352554470d5c35353b60b68830bfcc8f14cbdf00
+f8974ab1914694025375901d71324ba933b2ba61204c4ba5f6429077f429f17e
+8f1f95c2308b2900bca909945f96f33d73a7a2186e28d4132db91aa6d8751e47
+fc1665361bbeaebdcf6bae29423c6fadb892bab7cc872ee4cf3490d2956907ff
+baeb199c2ccde45a2649aa2e4d8dc65142df9b332691d9b154dc072ea33d1710
+e64eea0969e54a54fcc812d6c8ce00c790d71ddd67c6b8d4ca7baa6575cfcee5
+8af7c205f455c24ede135b653875780f54c98e3159ed284139f4fb00f64ec8c1
+1191c0b484b9fd15fa6f0fb5b6999de6358741a0a48abeee116a44cbc015c0b4
+5584b76b7e73d6d3148bcd17cdfecbefd83aa402162367bc40e7835fb64a4b04
+dc4827158e4b8f193bc470c9bc0c46047b4cc4d797ea9ed7f35868331517fc43
+15b9a080d5171104dce9c6b8d9105b0031f4b1f9ce7d8e2b7d08c5d633290fa8
+8356b073770339203622f09407cd263412ecec6c7f58f8d8f5be935ccdebc64d
+5f0a0287fdcabae9ffd00c24e7cfaeddf9fae5f60d4864e8268885f71a8a941e
+facc6eca987d76f1ca3ff9795045b4b9057a7ecee50a04d09b859207ee869750
+282bc24be3dd0d84e33963c4c1a484de057541399cfe79a5bded1bb90833d8ef
+4bb6f36b7b9f236ff00bcf441ea1e1ea04bec9f3402e7993be2d024a5d06c653
+6c2c090d51187ad3eafd64bb0389da839cde99222868ce4ad6e03d6fad5411b0
+9826c410db9179d22db159ff72b0c9246c690b527bbaae566d145284f3e7bf24
+20c2a7bc2ee6607ced1e89c558f3a4bf132f23ddf53b240284de7c4839ef3b53
+6532a60c9df1cbd3470d44c7c0d26136cf4955951fdc3f0b85ff4d4057f47a6b
+8648c3640059f4543316ba9007c0e784f79c79156b04f60b030cb98b4fd47577
+dccc5c223e0f1211744ea18b7c0e676bfc5ca9592a7d9e7c13b93bbe2bc62251
+71d0a4c44950754ddc2ccd486d2b702f4188987595bf8988130b0c059b279418
+ee3d0e21a1a8e2b1852ba7e01e9cf19746131e126bf5eedb08e6c635d700b0b8
+caaf2de2c01f82ed911278abf80a8a47aebe6330e0d1bc308f00a9fb8944052b
+4cf11ec1f73f3dbac7a9124c6fd2009944732d672c3d4cd2d387b4235fec275b
+907d25342890dc44dd670020814e4155463f6bc4804f68efab0501388a3ef816
+e2ed8b83840782e22be4a0b562a6b0361b8129872c5ca1c0055940378bae85f8
+2a39e182e758f970c22aaead53ee5f934dfe39abfd55bdd3275b65b0b71eca9e
+467dd786fba4f8c7084db6069703dd97b05f80013cd99dea6698ad3ab5f09f11
+5a00e47fbfcd13caaa7e82191d1881b3992b69c6cfa15307d6ae8370252145b0
+97709d56b69ecb253757ae7b1a11cd9a8c2210af5c91fe93bc2147681b19c75e
+a360636446935d85470b0c28d927b07afcf63809a53c0a8baee76632982e9fa3
+1cd9b8f117a7b41689c83a23043550a3f165bfe81f0e0e224a6568e60e28c466
+28b633d66fc7370f65fd2ac5694e7c9a616bb88298cc7a7bdf9a39f1ffc1aefb
+16de11a575a58fb8f65c47aaab60b465d3e8eef5240a9773874bb658d7356723
+f449270f0eaa74cda1a6d5f732bffebf4415e77d3a566d48e47d7629fa6b8a21
+6e8032e7ceedbd8ead4e922685d6be6448a14fc839ae4a74f6a5a59c01375a4f
+d57555f569d036d0337351c7305c49217103adfe4b6ddc8376f134eeb11ca705
+92d1e2e80c423ae05a0822375e0d3f059cbe839b07a290a6b421c7d513f1961b
+27c632269a8c35eed49010c561b580412b9363aa0e9c76e210b6a86a55016da9
+e04e8f7a5c525ad3ef4edd7550b6e2f6669508051973e36e435579c178d2d39f
+3e27bde7de754bbc68da87698aada323575cca997a1cc75f706634834d1dac10
+7103b40c71a1e59358ede2d1ee87082235e808481f456968bd649a268e566680
+3a8471be291dea8358c52ad22508da5762fb1e1f6128b34e32bb68039237a400
+c1afe9e07c69d8b486281a9ec09067d09b0c8bc16c0960771066aca2f4c18907
+4e2ab98be4da38b2ef92f3a922a1fa3afa66ccb7dc5c59cd06f7b6dfe00eb86b
+8abc28551decbfcab8ae483839cbedd2cfd6e7c8f6348444ee0e67e943e88444
+f9f871e9291a5eae7d63522caf0396c4cb477d2df5377c39c46b14125e100ad2
+4f15e1aa3dc33b356f6a6d9e1404efa7f05b6208948b01acbfb8a1079181872b
+f06cdcd561a855b1884008e605d67e653ef3357b9c6d5af90228c6b4676644fc
+cabbab905c7e9164a901ba7fd1c4742d454784887907b7e1a9b2d1c844ca2f03
+3991fd9fdd19fb4af35738bb380bb940b03e9fddaac1f64afc6e3c99ee1d7dc5
+5ce48afb651c9595e41c894a8d75af382c709720a2e94f03fa45ec2cfbf7d3e7
+6fc0dba65ae93bad352e1b14aa0f3c39cb8766c106a1fc656401e4ff5c4584ab
+974e93b2bc7f16209d80bb566ed5b67acbc84635bfea38f1e87c39027a0d1ccb
+1a93049e936116e1847fb3123585096edccbfd0aa63e623b8503a0d4760aae40
+0a88a7e87400875eac6f14fb7a7a8682560de6cbb43fcdf303758e182c4d12d3
+87ed4533d7c9f2b8e13489130d6ae5fe066f4ad856b167725e4ca2e7b842dd7f
+599de83285aa617d5ead39c7ac6ab77e42f5e1153250803103f7769cf35430f4
+fc5b91642a1b798ef39d359f7196d3f7b0f864e016da2e43ea1a2b8e8334e8ba
+c0af735eeec83a2e344ac6a62461cc1dbfacfafe1cc1db2ab1655ba0a7d64eb2
+4f165b64608fb31dddf15f708f052adcb6ce974d807e6ad8f7b94979ac09fd65
+163a3699cb80a8a32d49efcafad68856da3be30b616873ee511e361963983106
+f700c080555e719697b0de489286e397f5f81af94632216e357f1020dacd270e
+c7d9bb4235aa738a8dca7f23680c377a643b0b59e6a7fb83507c8cfbd1df3758
+3a565760689d25526f064e961d0c3d2071054eed80850bb10ee9e73f27654d20
+32bc2a750714ece1a4ede7b7c4be79f4e0c3d7a6b433f44774d6cc6a93f6dd1a
+29b855b805788ff4436794d2aa348da5ab69ce698e7d5b1956d1a7888607d7bb
+a6b59226b144dc8589e4787c8ab0342c8a085e12fe9ddad5fe1c185099e207ac
+f4308371fa4afbdf90eb5d08a0076d70615a4d17264baa2e712063032c188877
+fcec4971f2c7f4a9012fbf3fe15b76adf4f35e5c0f337862584b12d04bfbf85e
+8b3e8eeb64bc0fea31faa7a697b34be4a8c3fcae69ebd8c25fba58f3d101c9cc
+7d6cb4a6835a5262a28f9304dae690bfaf6eaeef09d44a0418b78e2a4d381047
+35a4523e8341a74509eef699744865f10168cbe739d4eed29e6542cb0dbad470
+d9dd0ddfb8164959ec59a632863920e18ab5c001845ece330868dff7b7ed51a8
+c50a11861df524d4dd80c7b370886921b9f6b28015a83412cdc4fab786791bd6
+37081dff54753214e35477c847ea13286c28fdefe690fef446f4cad67ac3ba20
+958743af664767e8d8ef8a389ec1c138128aaff1b7557b52eb59dee75db67cbb
+60d9b08b3a443b10bc84417aac4aa89973c8d8932af5b91b82b7569cac09d69c
+0cae12b7411269a1c550c94dce68d60ef418f21ab29ab552eca48a4ee94a4b27
+5d174ae06ce469bd5110d23678269b244cd596650ab74f024460c84b564cfc31
+f10b7d0a15166acbc8e9a70668aecd4fda96ec72af4d438f3e9c42e068bb2504
+66e725c097f17e533d6ddb0223a8c018e6445a468e5afed7d7d93ca5e8807f6b
+cabc59e9d7eb20de335ee9328a6726bab86e2bbcb847e18e2be079bda3c1a380
+2d338cc33a35b0bb17b37188cbcd54c760cfb17d5da0c66197da9123942a8789
+6bf0e622dc9e93457e1b73b7f5b96c894eb76af290e1f9dc439e36e972b3f865
+187781130941b3596aa9dc699a6a586c1acfba7e1d7b340312856ba9caf63662
+02f6f303f92f15726dd083b1555263d2e3bd50baaf7c0bcca4ca774f5e35cd0c
+85caca2366e06fb942b482bbfb1926fe47b1d95a83a5143ba801efbc7d62c003
+2f915672ee8ae1b235096c8f62635bc5c42a03d6be518e9c4a68ee0d8e48d1e2
+2de2828cfc76efb4a12ba5c3a3a08175545256dfdf53edf0c91bdff981f5b9b3
+fb8b9ffabb007646755e76a278cb1752b8081ebe91dc77177aeca8ca90ce2077
+f90d35e6f7aa90b1505e472ae5f09bb05f2a37b5e2cea2e1a3e5fe0e367a07c0
+f31f855d7f1c7b4272ea37398bec83f7b79fbf86129799e2ca9e07b2a01213aa
+2d73499beb7ff978dafb22518227532efae2a60cae34347ad352a00c0adfea43
+e3f95208c6f5c21e1fb3c0b07a1d143d5a8b55cac717fda2b72ff0c3fdbabf56
+34cf4c2051dbc59ec4c00b6e1cfe454cdbd9fda033cda90a2b66fad3e8271e17
+fafa42139467358062f2a1c244c48d52a9fbf5c1f360bfa45d0b03ec7ec4805f
+3e7f67e258936a690090abd309b2b93424efeb8d5d7deabee5eaf0db5d56c33b
+3a728c08624ea5d0c85f77beac600c5fb8c184ac63b3fcc5344f22dd878abe96
+4320ad7ad8803c28b4753b071213851247f35a2f90a59072312059373cad6276
+2a17bb449602f8424ac583843810a1c6db922a87bbddf800bea24f6ebb071d2f
+3a82053bc5ddf3eb11c3c32f551a81deb3000e57282552fc0b8ee17ad909bb2d
+b851793f65123af449d07279de0999aa5208cc293593eb9ef607c7e20e873e64
+6097ff18507152a8d111e24e419c148a5a1fbd339428f184bb3c5ce3a36af6a6
+9b211cee9150c40506c1e990d19ba8b4f0b5c01e7c19a05904cb63d127118908
+5ab937a91b2dc3b59ac6bd1971c084e2c156c10661b2c7a3d170bde0fa3e682b
+abbbf187ff39304d6e5ae80eabce1c54a0bfe09f22d97133e94afa9981e837cc
+0a80b34b29899474b65ebc6df73e5abc2f2300226c4e96e7c32b3f80a26fadc1
+e503fed433b7cfaf681e6cb33057a915ec53112e76cd9602ff64a75543eeb82d
+e6f45aecf9620a5a3bae1f4459b9ae6162e472e93eb2e0daceec8f0608721072
+e456972d5fa6bc4a45afe5a8a5694e538e659107ff4cd6a8ee3d38544e397ffc
+26a98e8771a5e07c99402b1722b09cc959f9d25126a82c7820de21a9855eda2a
+1b7e4d0145ec7017caa0349bd13177070509276241a0aa7dfae14f1e2d1805ee
+58714e9f2a647fcede216c7b3297910df45f91d8e0c9ec279f16a744930f3b77
+0b80d299b44b478377ef237341ecc5d9a59b333cfbbc229be944d368559988c4
+940209b2a4fe6d55713acce94181339a1d70589e96a54a952163b072e116f5ae
+4e672556501ac126d0dc91531894b69d5c8c6bc531db69a961cd517d4bc07375
+5683fa7cd9a77fc56c6ae62cdf6bb0857e8906f835035e78d3f7ad14375b6f21
+fd0436e6c914c3b8d6e543df1ee4b992c024e9d9fd316dfba3ba9809a089cc99
+8f34466ac94d689350a5075998d7240efcda132f3b8f2ccc0fc78f5d77a313e4
+09d5ae9f2839b9ba67cb79e1a0e7ff8f77e766aae4e1931a51890b3f0e3b39bd
+5412ab04baeeae007ef88984afdd56b7f81f403fc6eae6993367ac9071b396b7
+f690f613193c638b9c6b10350d0170696db08055fc583cb04c3c66cb71d354a6
+6c02a9c33e312dd36d23c37836795088375e42241d176d2168dcea614a14850f
+d283c962ddd274d58fcbba7668fc6987cb0d204cc4db70ad44c53ab5da5e15fb
+55c5c53b85d0468b1798bffc105d55973d081db5cf801d98525597cfab8be326
+f6723c6c5060c6001ff9da8d01855933f68d88ea8c403e6dc8aa446e5eabd57a
+4d8c080ab4c164e3a97c1c6e87b3e279b97e99127fbbf1126099928ea8c0af7f
+3e592175164f46dd15ce60c6087d1893dd388b7a8eb65d0c38c56fa3fbbf88cf
+314e3ca2b710ff61f610ba945f7405c373c2b4147713206be618b238ba3e367b
+9d158dbbbe4dfc0aaede3f9457893910f3a83bf6baa3688fb1176c93132e24a9
+bdbecae4b53fd2cd971091dc99359d11af0aa3e94264538203459faf0cc36410
+def19e919a2714e2ce1895ceeb1f26ce613e5f1bee352ef3a63f94fc343fe7c3
+4f831ab892db8e438144821d5a701cb71d36526ac44a9354f3440f74e9e1fda7
+723f0120f75059513bd52cb2781a08b52142e53d0a4a23d7d003cae26b838552
+a1376832da4a1b8cc20cfa9f72fe3a9380a282bbb73a9ac07972677045589c0f
+e08cd002c80e0064a732a3dbb6dc83393d470f826fecdba4f1d2e4be76a5a433
+9a5e25b1f2b734d4f1469b84d977e3ccbe5951c768c9274d0423fe5d740ac8a4
+e3affe4fa68dd8cab058ebb21962d72dcfeaaa47e541a2ff3e6ecdacf0484ec3
+7151b6b1fa6109a0113e3bef3145b53d05c62e0391e266393ba1a4b39a806a12
+f2fe6562dff2fc97eff531ded8dc6e0ed359b2bf16d00031e9e0753bb32c156e
+ea81b7db813752506558d39f967450fa05390368950c456f106211dfc0621e52
+66c14e1ebc6a9f3de3165500218fd683fa0dd2b4fcb937f14f7d3fb85faf556e
+3f53ad74a4bcd96872b46716e0bd737dbf5d3115ce382ffb8243c499503283c4
+274a0e51c9d41b302fd57c648a4e1769dcab4668ee624f3b9c84f296ba9ca925
+056358d1e7f5a56ce13333e53b5676d5e9ccfa4cf68f18f28aee890b1bfad737
+03b64dcd7c5f34387f4522f421045adb7cb8b552d5145b83e24667d4f80cf636
+45f80b863f0293b1d494ed65532c3963b69fe1a858850799155ed2450d836d30
+d28dbfc50c7a58fd713346961d7f0e5513394b29c06c52b786b48a2f13b95b9d
+56d6aca8250f3b716f055275af003304d36713f14228b5ec40de7c3ba9ae32cd
+eb91f8110bafcf7c92ea383bd9ca4d4fd0f6ccb0902b07841a4cbee2cbe21c4a
+8124a11ef70c32d89e4b86d0e84294412f305ec186afd600ef7d72634e931f60
+a75a22b03abbb87b4a163044b96d43cb1a8eac9484df8955edd18bb298612f6d
+a9ab0fe3153be8def9616e883e5ca081c79f607d7439ce5a28ceb6b17f51f0f0
+9affc2a8a766dcbc19e1dafdb34bab555934bc8b3bf2255e4aab837de34079d7
+3b310d8d82d2abe249a28e1fc6f65e529c301933849883e86fd7b7b44271da63
+15913982ad40ffb9c796f3b519f84d15ba2fb42fdd632e042b7d9f94b28f5b81
+5139956c9d4e3521d59777d3c34a07e4ab2d92ce1e64c02c612023bd84153d02
+ac1b86b34937b82522277d5c11a7a3daa95e63e4d122e626d9167a5a17b4d041
+8d5aaf88b8a59de837362e48c9fd7123c3c30d906cc081ff9a0a1ce3b168b9e1
+ce50fb45fcaa3061d7dd0fce1c7051ea3c032fa52fa63442629461bbf742df11
+e6a548e7f73cd0441032ffb059fb81b468380c5eafb679d5ae2f384fca2236da
+5d5d878a6e29e282d045a419488daa5d3500bab9ddbb6123112949548b37cd85
+46e466baf1c18d05475029cf8b06206338df4d287541137ee8d509ae9e3716df
+32627c0e28eb8edcc62bcc37536bf8a36b8a545d539f2754fc39eb8da84fef99
+02a3733603379181d07b780b1f0dab6b69ab3268adeba5cac438510e80b96eb0
+79ccdf7e76b2f88a37beb1b83e4b3529ab0b6b1a35d5b7add114578ce3783582
+fc23f6c5df43330e9397c71e984817b908dddb6a02e6da93c87f623b3dcacbb7
+5c7b032d24a5e516bfe910b1569ef48975b8b7448f2469a41b4ab69f419f9f39
+2d3ca7b9bc768151274aaf55b06c3e399cb19b6e0f15ec8868c6e668e524aed3
+ec176ffb6a8accdc068a22eff5d79498a00a99562e490c7cff7e59e7d3b3b1f5
+8e48e1ef5e08391391c7e9ccebcce6376480909156717c07de203306e8c7c7db
+0b8737da43a6a8e9218133af777bcc505e5f5375a3fe8411cb5a317619e9d259
+07cbec0088f2610250754acf52e22dfd59a160aace94a7392f2f3a578980b1bd
+6d1dedb930b6948583f7d978fbde76276822ffa4014cfae2ac22913621b0f778
+d50edfe8517092759af5bdd038316d1b08f2b31550d1fe1fab8b62e79419010d
+6a59355a2e73cb08443700ceab7ee437401683f20cc5e9a21f056866f2b67dfb
+4e1e8df8ddcf2c5823e7fef6f91ebd1fa571ce77ba080c0f604a263379ec4e2f
+f5694975fa6adb5a646ad327db787c204f9b5ff9f9228a3337c111d32cbd6f8b
+1da885425af61709e40d4352a1be6d8e2775372a3f7717e9aa9b951f79d2bfb8
+399d1f915e26836d454d286655657b72378551cf133bfcaaaa2a45e98f840bca
+522311100c7c92f46661aa1a75fb44cb28a1a7f0cbeebc2008c5fe882108e2ee
+1e0c683320c084d1e5ff7c0657de7942b0daad28494b24649b271d82c10b7373
+f02be60741104e31bc70a2fc2ceb7db132f272caaf093993de5cc3d139d559b8
+ddfd287fb1705ca461eb03a4e039428ad0ea3baf3b29f824fc8c8edfffed4803
+e5d0af7bef8aac625a184911bb28809661eb2631a078fb9a244f043adb379476
+d0dcdabb21be4f1cee1b21d775a53dc6a1bfc4a8
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/Vera.ttf b/lib/fonts/Vera.ttf
new file mode 100644
index 0000000..58cd6b5
--- /dev/null
+++ b/lib/fonts/Vera.ttf
Binary files differ
diff --git a/lib/fonts/VeraBI.ttf b/lib/fonts/VeraBI.ttf
new file mode 100644
index 0000000..b55eee3
--- /dev/null
+++ b/lib/fonts/VeraBI.ttf
Binary files differ
diff --git a/lib/fonts/VeraBd.ttf b/lib/fonts/VeraBd.ttf
new file mode 100644
index 0000000..51d6111
--- /dev/null
+++ b/lib/fonts/VeraBd.ttf
Binary files differ
diff --git a/lib/fonts/VeraIt.ttf b/lib/fonts/VeraIt.ttf
new file mode 100644
index 0000000..cc23c9e
--- /dev/null
+++ b/lib/fonts/VeraIt.ttf
Binary files differ
diff --git a/lib/fonts/VeraMoBI.ttf b/lib/fonts/VeraMoBI.ttf
new file mode 100644
index 0000000..8624542
--- /dev/null
+++ b/lib/fonts/VeraMoBI.ttf
Binary files differ
diff --git a/lib/fonts/VeraMoBd.ttf b/lib/fonts/VeraMoBd.ttf
new file mode 100644
index 0000000..9be6547
--- /dev/null
+++ b/lib/fonts/VeraMoBd.ttf
Binary files differ
diff --git a/lib/fonts/VeraMoIt.ttf b/lib/fonts/VeraMoIt.ttf
new file mode 100644
index 0000000..2404924
--- /dev/null
+++ b/lib/fonts/VeraMoIt.ttf
Binary files differ
diff --git a/lib/fonts/VeraMono.ttf b/lib/fonts/VeraMono.ttf
new file mode 100644
index 0000000..139f0b4
--- /dev/null
+++ b/lib/fonts/VeraMono.ttf
Binary files differ
diff --git a/lib/fonts/VeraSe.ttf b/lib/fonts/VeraSe.ttf
new file mode 100644
index 0000000..4b4ecc6
--- /dev/null
+++ b/lib/fonts/VeraSe.ttf
Binary files differ
diff --git a/lib/fonts/VeraSeBd.ttf b/lib/fonts/VeraSeBd.ttf
new file mode 100644
index 0000000..672bf76
--- /dev/null
+++ b/lib/fonts/VeraSeBd.ttf
Binary files differ
diff --git a/lib/fonts/c0419bt_.pfb b/lib/fonts/c0419bt_.pfb
new file mode 100644
index 0000000..4a49dd5
--- /dev/null
+++ b/lib/fonts/c0419bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0582bt_.pfb b/lib/fonts/c0582bt_.pfb
new file mode 100644
index 0000000..9baa1da
--- /dev/null
+++ b/lib/fonts/c0582bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0583bt_.pfb b/lib/fonts/c0583bt_.pfb
new file mode 100644
index 0000000..08f6871
--- /dev/null
+++ b/lib/fonts/c0583bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0611bt_.pfb b/lib/fonts/c0611bt_.pfb
new file mode 100644
index 0000000..ec6ed06
--- /dev/null
+++ b/lib/fonts/c0611bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0632bt_.pfb b/lib/fonts/c0632bt_.pfb
new file mode 100644
index 0000000..0701172
--- /dev/null
+++ b/lib/fonts/c0632bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0633bt_.pfb b/lib/fonts/c0633bt_.pfb
new file mode 100644
index 0000000..d68f639
--- /dev/null
+++ b/lib/fonts/c0633bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0648bt_.pfb b/lib/fonts/c0648bt_.pfb
new file mode 100644
index 0000000..72a1606
--- /dev/null
+++ b/lib/fonts/c0648bt_.pfb
Binary files differ
diff --git a/lib/fonts/c0649bt_.pfb b/lib/fonts/c0649bt_.pfb
new file mode 100644
index 0000000..b5d4ded
--- /dev/null
+++ b/lib/fonts/c0649bt_.pfb
Binary files differ
diff --git a/lib/fonts/cour.pfa b/lib/fonts/cour.pfa
new file mode 100644
index 0000000..b8c097b
--- /dev/null
+++ b/lib/fonts/cour.pfa
@@ -0,0 +1,1954 @@
+%!PS-AdobeFont-1.0: Courier 001.003
+%%CreationDate: Tue Sep 17 16:16:38 1991
+%%VMusage: 57844 76768
+%% Copyright International Business Machines,Corp. 1991
+%% IBM Courier is a Trademark of the IBM Corporation.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.003) readonly def
+/Notice (Copyright (c) IBM Corporation 1990,1991. IBM Courier is a Trademark of the IBM Corporation.) readonly def
+/Copyright (Copyright (c) IBM Corporation 1990,1991.) readonly def
+/FullName (Courier) readonly def
+/FamilyName (Courier) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Courier def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 263786 def
+/FontBBox{-48 -288 684 841}readonly def
+currentdict end
+currentfile eexec
+b2de7b9b2a2783a9a81f7a04e7605e0bcc84ad7a981f9d6b201c5fc6acdad3ec
+d09a8a1907296b7bf5510822bd65c174d41912f5e2bdc23ec621dd28cb4f8b62
+5882cca862ca3c8bbed56696f8e17809439151596792163977eddcdae7b5c346
+e93a0756e7da36a403e30b34b70eb809ec5a5e6dd43dfc5d482e2424a93fd4d2
+d0e648621eb8f9339f10ba2db9312ae5c071e20946278b5d54f7858a41f0a1b6
+b2cecd201fe0cc773a733fd892bc4352fd2c68554ad49658bfececa5de0a4178
+07560879485b17f950018e00fb441ca6e0face6fa6acc95daea5b530a954419f
+a15ff97de6a7ab23540344e0193d5356ebdb99f60fce74a4c1828a36b3de4ec4
+92551fa4f0cc7ed791d897ed75bc5d034f85f7326b59e16a9e9d20d7c7072a4d
+311fff4cd4635852ab3e098236a1eb05be8e5d3e4ced8ea930076fb27ae7b5f3
+a135b8e3cfa19b4144c0672503b51641ecdb779eaaaaec164216beb4de034575
+66b93918a02aea1730b7f138623f2df763d6ccadea312d4059487851ad39fa5d
+6ae273d56563eb3788c4d9aefb2bd85feff2c8f6a0c383f653ddca8d4072a397
+26bc47616d936e336d1502b65cec60baa4f7c423c290d9a8e067b433ad52790a
+b3de64436aeb25a5b8e18a91e616b9c310d8bda5546cb5f46e8d74adb8f970d4
+88a1602e8ed3390cbb9f1e4564f70b2141cb8262cf4dfefbbeff3d15f49afa29
+da9deb04f1e004399a20f57f770b838059aa75ffb5da99581f2fc90dd7b7f4bc
+3d3d32a8b2df7a3b9ca0311f5a555e6f05babae4c577b02379370e5a364dcbb3
+1962317eded89394dd26e5e37e5f776a9ce97ffef9429f9e89773a6db3d642cf
+319957b03a0434f4f81e782121d8fccd08de4e54e29b1a25b1436d859db45cd3
+c254fb02b22288d080139bf20c4fa130f98e83fde39963c3068c7aafa1c6afb8
+2ff6753842d6dab630e63fd8f7853e9358bc6c074f0acbfe9d56d3b93eb7eb9a
+901ed2bbed92737fcae60b95e7186ca800ae2db1570ca4b0ed9ea9fed82ad73d
+ed3977472c257b253773de2ca37eccce4faf68f1eb5cdc827dd5bc8e3c03bbfa
+e9bd30bcb3cc1d35660637a882f0f4a037bd07fba1c6f5c0e8a88088ecf853dc
+b2dc41ee4ed1f75640a93e9208fe5cdc7366cf3b738cf4177df4f922d8081006
+8f8f2b0143a44caed520141238781111a1331e7a6afaedb2019cf0eb438177ba
+68fb0d443989e67d21f49cb8a52711507792c45bbf0c25f634cf7c1323d6146f
+7c778eff204c71778e5e9723e662106caeccb514b9be0936aa409567ea40b9af
+b5852cf3c9cce25acbfdee0097f828d90d21cfcfd46ea083ead540877e565883
+3234b8609a3f376ad94098ec1a1685323be81a64a6174851b6e8e80d3d8cd6f2
+41e2492bc07c052dfd66c7fa12ea0ca90a15f49194b0dbbd6f80aa49cc52e0ab
+134571c2883f5adf6b57a036dcadd18f7e397b87fa80be532ac7aac3673796f6
+f20f5341984695dc99359d6e923a79441b64b85d405d53f89edf79d76278604a
+4001ccbcf3e10ca83f71202d6f0a2f26db5114515f8eb58a2eedfc6c9f1f9a3f
+c40205c32ca33771d7497307b4f67618bf46d3ecadd0d5b6f21d298784f9e22f
+e8a97443e951a141e79a2cd6e500653fbb8e34613e57c270301dbad7b89d35b6
+b7f6cfc81e5e9f58508bfdd6c50c8b4d9114f9d9d0764232abf8c84b8c8d5284
+f78138778565991ffefaa9b63d205e74146229c2656d126e3664870c9800b9cf
+ee76f078dbb1064aa5609c6c553b2c660a4054e46fffd645e8eb8864d1e15c33
+e20d690b90b6a5b9a7213bdde4856236d9f00d882d8d8cff4b27fbad85503029
+b9a4a75da575bcf29ae444f0714b5580aca0bad9460fbe2c847cd770825c8b0d
+72fc684ae45ced430997d41467889fc1969702a44fb77e8de557851d4eb34433
+631c225a516281ac5e0ee6c0dafbc40855c315fd60559e53b5f33d9ef0fd1d04
+31be569d13f6dbd52bed9eff8e7eb514fb469daf3f9f31c7b8d31411692a72f8
+fc3907df11992b3aa76ca73c82710c4901b4eed793d4909a451f5f09f73db0e2
+0c32146422d4d5f83a4e2e92cbd9297944c8bb7205aa2adfc88dc6dcb4e82ff6
+07e4278885300463775ad999e2393ac0f67cd635d955f4ca5a9f57662c7e76a7
+26e7c4256827f0c03cec6855174fff2b78f1870ec2366a59a4e9983ce00941bf
+17dc97b59104d05746ffcc1f7bbfd007fbb0eeb36d42f959c90382e49737352a
+f582a0c76c1d86a1323af83fdfd653373a3c3b7460c839858f6fcc885f3d47d1
+902001ff877043ce9d13b1f8d1e819320f6374975e740aa77886063741e378c0
+ea28694a1bdcb89c1e2d5e8cb9fd5ab6d20be8cb0a2a74ee73d5f4c32b26c067
+0e7608a372b6e0cdc1819879ca3eb1870c22ee21b8d42780d9ca1489a4abaec2
+7dcc2fe096c55b528baf52e468bac2ee1db1c6e1609740828ad1f4faac82b9da
+066b8472b15faaab3109dfbb85667a7def1794ff158cbd6fdaf9987567d8a6c6
+f86ce77b9aa3fed671f7c74a345812c978fead18ac776f7cc2957540a1720941
+5b9cc4bbd5d8aef5997110b41daf2c3d41adf834aa24862f052446ff8a1747f6
+5dadef8451aa72f9c367f21a98e1cb18b2010fc17637a673959e5790df9abb82
+9314ba4785b7bbb5e68cc6da2e021cc4345f4e6f5c6488d481947454148db9f7
+c289ce25764ab1d810268a6db157520ce871f1dff95396f03780bba8202d430b
+f76046c04e1f0ef462afbf3650327876b5ce19d87ff9a6ec2e3c294976778c66
+9bf548ec241a295db3cf4139936b6127009f9807f48f09cd54e920474fc1ee65
+8dc69c4afb90f7a737df582b406c98801e77b02a02212a0d924ed58ead539b7d
+18f4940a717b46ad908d521b7d07237aa25b4969239fc4968f5cd9827ab24272
+3d29ffec1926011161405f8a9a5c9e1bdc9a9152af563fbeb44d5e4ae05405bc
+6a92b23e71cbb866366389fe0d91bcacd5b98a2ed4dcb9976ef9eb6c7cf06d9c
+185ef69af37163d441b756f08060fa733b3ebff43160d0ccf5befefeeae06468
+0d18f7c38748d1cec437e170ef4bb6d85eead3105b2a354de80a6396c185caa9
+1d57966cc000bff2880e068d61f2ba670f7f9a2fad0ac5d1f205c1e1fa0a1d3c
+110e184837018af730878a978ab3d08581e8b222307d00f86909c39c12d40bd6
+c7299dec0867f7417de60edd1897bd627767b29cea62593542c642f1089242d8
+53f2db5f45b7b21fa906851b2f28437933bd4229e32d093eda4d448641380da1
+9696d7a77fda761865d9a4a8ff48de5aa6550b2f80c7e7fef54f5dc709a9b2fc
+120b03223ad9ae5d06298699ff21ea2f71bd34afb79799e67cd496a57e417f1d
+87bcf2bb0c5f9fe9067af267e5740c26d6f3a256330d68f138c81883d7c07eb4
+cde5f6b5d82cbf5dd32e0c27c393cbb77cad6dbb058fb1c6653a5cd1a78f0577
+87c9dd5b1a5f83a13226571d38d367f2a4e369b4651a77789aa785f4a6561c92
+e0e82f217b2597d8a180ebe4547aa1500b0f814d309b5b1fe9dc53282c914407
+0fc79d82b5d5ae8bd272b022b35e66cd260c046d102eea1a1a4c0d376daa9b2f
+e0dcb3a7254130d5787191998d88d4872834f331c75485d09799d467bfb62465
+5ea38fd84edff90fbcae880820fda0f2a3bd5cab972b4d22f1c649f970e05549
+f33e95a6d0af69653ae918872958bf100a04a7c61b8fe7433697a92b451ea444
+4670e38e33893e59ecb4a621ecd68e76308ec0eb2716fc7427ffd64fe309a635
+71c7b86839add49634114c0aeed57a2afb2a46afb303fed2ca4a7b3cce180595
+49bccef00e92339805dbe1b0c05ace5cd5a9c6d8931cdf62ce4f5406f8ceba6b
+29b696b0e0ccbe8b9f9e1afdcec58064e3daa54676f493af1ebc8a2c26ccca62
+9418f0015d84e5931f620207d2c8b193113c8e6af5a0738f7085930e735227e3
+7bf703da80016e492cdffedd077be121b35093b031c35d369298f78134093147
+363062d031233a26726d549b16ccafe56eb0324ddeeb4ca8904da4fb9016fb5c
+46b60e873074c2e0c78364bdbd05e0246fb44e77dffbed7fb94364a0ec0970d3
+29ac31712d356bdaaefa99865561391247a78c8ff19f6086b4d8cc464d0b3b41
+7fbe5f6b3e68de6ece2242224dba66940dd25a412c337e4c19c3305e4e1699e4
+53bfa096d66bae0ddf3a3f6d84cbc7478a00f2ff606f86913b768a18f5adafbc
+8b18e653351cf8d251ecd0f0d3002862223e3488701c0a5647bfa63b55b5e162
+335533f701659833fed17ee4ef0281032344faf499ae8e33a25f97d5839fe077
+1ad9bfd9e2c1a863e0eb7ce72cc615f4ff19a8ebfe2f44aa6a636bf3197ec107
+37b3ab19482250c61d1a1bf7fc4f325056fc30554f92b88e6c8bc8ea8e5954dd
+e367a169447091d9d01b79265cb1054ff7000df3b659208c6166cae1973f3559
+6f4f9645361ecdb125b87b6b9096b8c1894e5e1cbada10134d54ece4bc0a73d0
+7a93de3a3b943697cd3be33ddfa0696663524a7b6e246984620dd268ff65291d
+e84855ec9192f88540c57826f6e6f25fbcb4c4e39f6b7fa2a3defd578c08c8ad
+f66fe2cc07a3317b3697ac9e5ee19a9e225edd3d52323982d83d4cfa156eb858
+681dca6e77ad60dd946c8a1be74a8bb83fedf6dab14f5a2a5d1cb08ad95f2a93
+c16c39cf8672fc59bf40400920265c7e06ed02b2a788aa23425b45dba3b35a53
+098d3ca23c0bb5a9e16ffd99cb4846121c6f5656bcb8d34d29e3eb078bb39fce
+be3b98fd375ba941c515c88cca36f7c55d325d3ff0932244f9c8359831981a10
+67c57e4b0ca5e2db14a9c2e24b10fddf7e037d4cddabae2e5b0443c3387eece2
+04af27ae3befdda5e88267ddcd3eebd90560de14c8f2817b6e6055e53e40b35b
+93d64234e4e749cc875d9cfd48032e1059f2d2ea0e7861f3f525c81fe1863640
+c851079cd35118f98d53ecf08b86add9fa65016797fb13f20fa4f9fa0c5644e2
+86e4f6427a278a0715ad34c88b103c6fb8c09d6500886c93f399d56dc0444a53
+f64649f39e423e9b8c5bd7e8711a4455b9bc82282ac372524bcab6140921f9b7
+10f75c662901c3ae885424b03f12a4c9f589ac693c7df6e188913b64a7b1f70f
+0c315dbef339b801d0f228c5d82d08c00a9c9b1d825559b47b00e98e58204a11
+257dfd1e7cfb5db205b0dc4c3211374459a58a3d23713068bff43c8b73fa51ce
+bf259e69f45b37f30869f44bf3898ef27d9f3b4710b28579538ead0240f72be6
+15eeef499d8d2f0a7aa72a6fffc68a0947dafa98f52e94aa14da157cc2c71aed
+17f3c2661ed84e058555d0354770c155c54a03186b815440cf8c7e37f9117e94
+67a5d50281ecea2188537254696c4b50c3aedbd3eba04b543dac970a7193bc79
+bc707725c13b8a747ad5df929cc8365da27c028745fcc82dde3b297258ee413c
+d84d17166ae6dad65489dc8d98a4c760c08dd0de05754b408a39434b17773f32
+a3519b27d51781c807a352880f5d667dc8cbe54f2132200db7971b0be03eb42f
+aea467cc7a1bdef783ce5d710772da9b71db45c7ba4f3c22ae9a9bdf1f26c29d
+811037a170868a8f6644b0092e7cc538fd5c13568ca262ba0fe244f7307727d9
+318a281f38b607c172e64134edb76d6535abbeb9689840a297accf5c15150f2b
+29e8cfee85d099297d0c6d50720d686cdd849751966c88e3aa8998c0c5c17665
+69029750afce844147abc710780af405d2a4163d272186ac4d486fc32c1770c8
+37a0656b6a0563e5b38a080f614ae9d49bafb92c96e2bfd140a88c4989952edf
+2c835503abd01565e2cafa4373b790376483d4762a99adabdfa0d7a7eaf9da29
+530f626e330c8cc65113b1b7ddf5b01249b9651ce4c47111a5c6590755ff0744
+5ea2a3afa851de664cae6706bf0b640f80ec4a178e518bf6b41c793995934999
+0ccc3cb8f1864b6f20b1160c9ea3f1f8e658e88c81fcb7a28280fb37acfc06d4
+5d5c93509db13e88349ccb959dd1f23c6d5a574b9489fefbca90f8c24982bd5f
+8fcc0ee7e13ec573153b51a760f47811a50c1b1e981ed0007e952d15de9fc00a
+64966a945ab7cbe49e6bf90062cd8f6fd438428b14612085dd18ecd59924242e
+e5c9038abee84cd94acba6c96e805305bacde3a0390a456e19dacc83f8767c5e
+a9fef61dc22613e3048cac14ed6a75fa28c06d348e240019aa36faae66d21853
+b43a4c05372b0a958d3d26cd22186f95057ee646602ba13e1974758307085b23
+6ff8b0f2194a00258a76b18dfda0d5049bc9780289dd54194800554a086b80ea
+65d97b1d6d03ef0ad22356fd31c90485c34a1cd00837c419c7295b712a9a9258
+b7f0452165473af73b7e21cef53ce54be278298053937f89d0d3bc15657fcc9f
+3246261de1a1443c26cca0bf28d291f451d3ce279eec77ab32d5463f7f5ccc69
+5f6fc60739a5ff55dee8232b2b868fbf60a2137d8371422c1fd08fc21468bb4e
+6addec19fb2def9aed1599fedacc1e5a38670011bd19ca8415af3d94010a50ac
+69e8d2f36cbad97548090d37e081824c5bff928e0a767e0947c8c4f00388e4a9
+5e992a705ca0e7037000e4c191a898b40a74808db0c15c9669d2009ea5c7a391
+dec4f2f4685dfc63fd94703f948d758f11efdd2e0a634e2d4274da9bd84ccea5
+8fb6f41e617ba30fa2114deb639b7b579e2ba187bec24145664921599b6b0559
+d742b3ddaaa4f91ef05cd15db7cb7fa2400f66fd9db3d207cc5728d65b866295
+10b2b6a1cd2a33424a9006a26e8bfa8b3571a59e5cee066cc10bf301269621d7
+4f1c492a02220c551560eab04213b3e8be62fbe2d7af013072ef82f1dbba5b3c
+be1974b35ad6e92e6d15c2609c17706422beb22f12d3c4c0a748426dbe65cea3
+a0ff0b208a66460ce8d359b09333e208ef39fc7fefa453cdcb028b195e70c577
+260962e2e8900a286e628bc5b0eac0328c2c6f64f0229ad0fc7872f48fed6d1b
+bc490da985c19f622bc07b388a4e70e79bbe40e75d928670eecf2911075dcd05
+6f0010a492dba50abc966411d49f39515b27aa1e16e7b6104b16c6b52b428ab4
+9a6e98ecdb65aca5377819de9d99db481a2d0ccb90a1663cfa6eb6456d101609
+a1958aee3c8f2fa4396038dc4aec5dfd472273900e50bcf3cf5e5711055b90a9
+dd6845b57fcb0d9c6cae3ed0180c7a4c554a1b05298518f4d7de4107993f2715
+4b90a115a8d1a3f074a4f34b67ca5d733d59630a5b0ed10fd6459f4f9e3d17e5
+352ef13aed05ed7a17a44068884977c653628d8bb5d185f5783d041db9644d0d
+69bff8433e2d00c9f6a8837a414270c66d0249e414ce0e56d5051ed7aff463c0
+5d6cd8ea3b09e1a3fa4c1a866ef3238fda1b43606f29cffafd8f91ae673bcc38
+804f91178c0d596e109b65d5a462a103a4a29d995567ec16f0263a03bac4132d
+e2573eab9dc7349b6b1fdce50dc21125e38d17a3f6ef66b3212de5e0b74c3dd3
+7541e341be122bbedb6ebc2db96dd991f71011aa719c1784e24479deb65f5d05
+3bc429785d4aad99de7b5b5c03e5ce4443dbc7bf483ef1be808c8e508e6000f5
+1dd9d907b07db3d9f6566e5023a8ab0eed23857b30a6ffda86dd1aa3b98eb1b7
+bca8ce298ec3cbe5049272ea33fdca7a8a5e701e27e07cb3da0d395d258a1dbb
+8714d83f3ccbbdaa9fe08900475ea6ec759f425bde968014214728d08ddd7358
+1408d3974773001d9bf782dc9cbb5209a5d3027aca7bc277b5dde20b991e8535
+1889d8d498d5e8ad712cd499727f61aa3953be4eb62133bcc578381ba3acddbd
+bbd5de324e4195cdc594baa48782031b9df8aad86ebd62218b119123e213615c
+cd6894853bfd77d26740d044f58e602733ee307442ab929222edb68527550414
+9ca05eced3d317f03715b8799ad1ef2ede2e3e0fb5aaa71931e70c33f7557128
+cdf1022264f9c9b5dd2d9b548a76ec92ecf9ec2029158b376c89a27c4f738009
+b555618b66865c2f98af0733208d65b1822c734d3a5a2a0d359a32dd566648db
+eee996fc085b7025b47b0f8f4df03a5f9a3168b722351088a1eadecb90456a05
+ba74d908d4804034a3b9a915cff7a3b2d467f9a6adbf12c2995b75c03db7b23e
+b224cdd2b64a0ea942ee4c07af8eea6587a8d3781ad7a6528d821bfd7028a2fc
+5478b6460aa696ee868319dec5e1bcaea69f007b1dc80c47701adacf722b5458
+60158e090398d30a9f049adf3274a492fe891fb7b2bf76b78bad2fb05bf43bf6
+b14095b00eadf94491eb50d75fcdd95025dd329127e4746c2b433cd4793deffe
+5015755a330b821f93f96ab10b508e71363ddb55cf4c6f9092201715cf26d859
+784c49b636c639caf84e044dbe3c14bf6d64e9c259af1f24ec73c9d30fc0fac3
+1f9eaf2ca8f49d0d5c18e6a12dc8acdb9f3d8ed49f607258c94967989cc31a21
+5020a9fc65815c230e8da7751552a895b0064c2a1cff3f18f9ceb908540a92a1
+06c7d46c596ecda2e25d331ab85f534313b214ed307dea03d4113ed6fa2ef1e1
+db3adb7861fa48ced61f10ab89faeb82caceda7fb1e9ca240e38611acb421be1
+119683647413c0c063c1468f1376a099f08351bffdfabdfce352ca87c125c021
+2301c6793146014d87d22727aa014d56c375945f7539863eff029d046197d65c
+6a7474feaf44f7c07b0ba500752ba29f5f165d4abef0ec13c625ecf722fc9ee4
+6958a291ca5b1f385c6a5c6ed4fb0036cfa6fbfc46f1622a59f019983d1a2f2b
+6662970ba2ffa63322b5bac4d58adac06e2ac789e0deda106a28a860e87ccf66
+39ed41fd29be8e218733d486633b763d0c226c18f264a632767957662400393f
+4ccbfeec54acd358dbd43e71fd59096150e9db5a2aa6b01bdf8549dc0c9170a0
+05a2e18275d6d74b6815f0205a6990862a083edf44b4052f83ead884c2d891a0
+698a2cdda09d43d67fef477eb0181246a8ea49d8407ca5e24691dc83c45bafb4
+4e555c33e59bb6a17f2bc3501217502c545082e1de1e43a3fbea39ef67644fec
+e36492edde144cd3aab6778cc0a4be0fb15bb46f95e86f7b4de290e66cc69f66
+5b20522987d2d0ed0ace9e250ec6c0c4793a2eab0f8f9a00d76d624cfed7399e
+d1e766b6c2dac1c46c6a8c3f291ffc03eb71dc220eba0573225e74c9df93e3c3
+d31f4bf8b79a0eae363eebc0d4547d61d0d54c42dd66fabc8befeead4fdc6bb2
+0586a0a47f373849b0b6ddf42a21c6be6e1c9ddb2f78c71a334f855173f681d7
+253a9084447b363872c750476365ac690bb27460e4bbf22ecf0e4d2481bf3b0b
+afa54d4295efa2d38cc6490324b12dc991060dede02e8e29156ffe3f9116067f
+0478f9b5928e44075e847e0864e06191c88f6ef0408124499b970c5c5acc28f0
+6f15eb4fcda631fbbeb199ec847fed052710c5d3e1f1598f7a279110dfb67e87
+8a0caa27ab4efcc03a6953e28aa9d660999624cb29ab8904942b5df81d67a462
+615111d743ca174075f3cfa6d239741a4e6bddf182de776addf3810047c24c44
+e453a67241e96bb3ed0ca17cd928b8f67585a228176d85ef4b7fc0374123987d
+2bc1a0fcb9c5a5be1749e684270f9b77c5cf4ae8d360c14ca596efe21302d343
+3f7881e8a25a88ca999a9f31a2467fb739511a42913b98d56671c74683f2b8de
+6cb20b8b9fb3d1b51b9a9a43b8afcee655a3f7217f5a952093f7a7ad84593aab
+fe0767f6879cc2ec7e9ab5b59bd82f48d06c9adc0fa218bcf9e1f63e9000eedf
+ed014a091dc952e3e0f07eb8e7dd1dfe0cc0e6af9072a53fc95199f9233a66f2
+d04c65bad02d00c3c5ba1f5af4d33a94e8eb5ef8b21ed1637b1c3e3522cff141
+77cbf28628d468249a154e900a9deac70f0be7b7d7efe43b9243eeeea068b03d
+0122feac859438fe96eba107d3ebaa99817816652b53944df5bde7b78eae04dc
+d2a179fa5c3002457ccce48def5739cd02a8bebc5d65a626bb50e4857a592d46
+52d7696129b176e5ca95c9c3491858d341deb70a0e2d57b811eaef78e52ca362
+9e9dee7e39259100ea60488aabcc05ae2c6f751f41bcb2c690161e8813fb4e7f
+d734f2c6fdb37ceee6f7bcbc29b2819e904e61f892fbaee59c4581e2f171f9f3
+60452fa11a872267d49f62df732dee74c8074370bb37d33d939e4a933758487b
+280b1d83cb23df036ea8304a2531465a647f81e63dde4734c49a51ad26401384
+0793737f31f69413e5f5152e30309701ea8e96357cbc6bd39053135647519300
+70836262da78a79f8ef1d9a17458e02d8040629b6dc7a7dc114d05a4bb01f90e
+01480ca86f291747c4c1b226b2ea6c15a38b6d7078f2f51b264eb125891db1bf
+a669525940531976089a9a63fda1c89fbbcf9e5a8ef413f837bb541b1fd6f825
+b7db4d1c1f3fa3eef70eb4df0e962393060034581ae4609479013a72d16803fc
+a455f9722c2bba278a1ba5bcf1b8d1a5139f5ae71ff532481524acef4fdee7ef
+14d343a1f0e3fe847d9c9e5878bf1e5530820de3e6d438e1e66f20baec033b4f
+92d055105ed98345bde4fbb5612dc76b7f51cb9d66150d153a10427c027ee838
+38faa910e77fcd45a41bdc6081b0826206b56c08232984a85a5251a8a8362cc0
+c4b4f4dce651519c55777e6ca349bc060f9523c421b264d1b30895da4abfc4ab
+9ecc4fe0b4a1ca8310f453de21a1e73e8bb587ebefa3f4555b5a332499cb2f1f
+49b7d122ed4f470711f436d05695fc1f275b93ceade6d04fb2108517d670949a
+4bdba8b6cddb62b1c9cc92ed63a8890d1e287e0051e7c8bc47b4a7fec9c7c33b
+f668abf07c2ce4e080c8c4e9503b61940db11c5f17c54d09b8b8c5ce3985b422
+1ed39a00c39e87166c7ba0ef441d352259022b609513a2b134e13f48065c7acb
+4b101230ba98195e8b49d570347fb95443269e9fcf9fd03c7aba76e7a1b13e18
+7d344d41907fcbdf19f616daa51df3b1b1be673f95c4ef1a271a908548cffd0c
+5f70521eec3119ca5588b4b7e04954df14b0589f1448eaa347734e92128f4d51
+28243b9e8d1d64fa12f0c89c604ef7ec03587ba0858739ff07b07dda99390b74
+a1ff879e4219a459c6ecca54896449c3bdf93582f0890bdd0bd6cf8d5168053b
+9a33cb7746f62a84af705b6135ad2bf04803e34abb34185acfde007901cfaa43
+64c992303e28a71bdda153858d252d7fd2da0d8dc618fda68f3d26c03641019d
+7dd2050beecbf38dd29039ef1923fdb29576b7e3f10671d1cfd93a2e5dbff204
+effcdf0035eea6912163e8a3d995ef07170e0d74f88762a3cdd080d6cb7cbb60
+3adf3cf1e8079a2642cf23f40277b1d0fa687adc1ce2e22ca28d2715d58cf727
+a9bc686734ec03602ac69fe7ee9c08a1a38ce9871e9038cc624c1e423f34539e
+4c1dd622e6a2d30e06e2095e30b6c545dfba323e78413ac65afc1be958369d64
+f21405f98fe5b5e58e9ee85dac85dc318349e91e64c839e9c94ce019c32c6cb8
+5ed016f2e6069a4b374e37155400beb75dc3fbdfa829980698b9d725996db955
+e4702b4ab9c406991b30154e150ad128f2bcc1d6aac5383acd6a9ce148ef92c8
+70931f701e867f254c7c82aa34f8d55b28f546e9b7f80437e5a258f22d55ff60
+916a502103299649fa9b14e5dcb9d2beea401e2a3a12bec2315fd88f23fa8a9d
+f60511057ad5ab55a602688c5d9b215355bd24cfa4dcbc9959d1facadd693a32
+0bd8737235896ff92faef4135e208e0b52fee9ff7f101a4957c241cb836ef31a
+4368603d687ebc95ed844fce7c18983c888ef7309fa051593913ad1d767e142a
+d6e6993375d0abce782bd9a6ce804fbf4634a65c063344c1d8469684c09a9d41
+d64736dd3c7dac43b546866d7182336b6a73a4335b8696a43116f9d4a83518ff
+1ef7be60d5a243461737ccdf00093ebc76627a1e24d3ac2a60cc8eb39b7ddd3c
+205d80bfdc89dc0571abc93def1998bf1c9c4128be86b52c362446f2ac2695d8
+8ad1626b27d6110b8d130fc7189266c5bb05f193e826a98e86374c57ee9af55a
+2ebcccf8497a068d6f60769d2c6a22bfb9685fe12e239b4b7c70f13d3ceb0dd5
+9eb53809883cffd0d5ec27e0b66b7a41e642ec1d989ce0ced2f386ee381ea1ef
+0c659556abc7dac2d458f816f04e0fcceec190d561c0683f4d579807554ef59d
+71762374f6bde146e18ed9944e053f99688ec4d84cb8ed2cff8f7aa3a9b624bc
+0bfcb231c35f93dff1382e9568db2499df08dd1f8f8b49ebadbbc2df3943d11f
+3a18992b25c7562a7f1faf0e6e653a678942ef689200eaada357e28f2610f9d2
+0f5fa45e81142d264e1e1a54a327ad4ed915749e9f27dd8a36af0b61c4440c6d
+9703e5d375f449d352148cfa26c266ef7afb0c3b598e6458d82780dc8d262fb4
+57a136e4107749b0efce94a6ac6c9d49d725d3ae79a217a38b238e4b766edaee
+64d0d9dd1e571f16ba46307838319adf6a0d1e7495cc545b7f1ea4911c21c8fc
+b88075446a45baa28a9ef33e0b3f3b8db25c57c3a85e34ab0c0fb1b18e7be01b
+cc2629fdc69e64825a845fdd7bae1cca2666dcd8a7f846521f4eaa2ab5eb1b51
+af7002dccab0a9a7389c2d3129175d8ce87cc4d73c6d46fcbc10018ea1538fae
+45d1b02efd79b908cea0b20d186dfbd0ab05ae06084c5b338d1f60111f5dcdc9
+e2818773fe82b7e0a621678987b93e37946bb24b181a4fb4cba56e3ef726c158
+b0e878ab6469ea8fc0de95a17742141c1ac2b765be853343cf3c935be5b14b37
+203788f32c418aa6206e80edc58a9af1b9547a5bbbce6cc95b56bca4994b32e7
+6bb19593d6da2bb4db58c0b0d1bd0f94149aad4b85a30131f56931a145a65f1c
+ccab13dd4b4f3f233d6eab4daf44f42b89da53d2df61dd7e1fa0575f27504b1b
+74f843847454fca0e5264fc642a28541d6f1d1caedf7db860ed45d9965121b53
+5611a3fdc881cd1366ebdfb490085ccf11f94905ede6442391bcd93b1d44bcd4
+a7b2f17c7b0ab3bf04d07787451e43b3f25d5e864fc6abbcee5297a293c02937
+b374d8578b71b911556f9c0e71dee07042bb46706f5523f72dda2156e364dce9
+644756987a5dac995c0c86c4df48c1cca629126a0b67b59d50c4e34635c04cdd
+165d5607a353568ead3949838d4e5ca7a8e7a9f88540508a122ecd371a77cddb
+588e6392fc187c1a210dc63e42491795c21f9f50421bcbb5f2b58fe1db5be2e9
+bb7938f70f3f12aabdb6cd26559d18fd1e7e6757c5470fc2dc7f8fcc6564fe95
+c2164fac044b3243c72f3fd8ca843f111df1a51672447e49070f6ee4c3adc8e2
+5754e8fac50535bd2b164987dc02452a9de63973203ede40ebdc6d0cee93160c
+05aa3aca73dc14bb9b8b01b94e8dbace5e937e7f0f09834f266d71d71bc4e06e
+885356033cee9a7f346c8609fabffebe003a54704a4035abd55b26fe6819805a
+cd33b6425a3b61dd8f3db2b7b9551318d8048b24ffa4b40861614765716d5e67
+a9b1799a48b69864e90476f693cbd8ec106c20e94502ea2ee452c200dfbf45ad
+273ced950370c316ecac58f3dd67b523261a30fbcef78d51d427d414619e812e
+72afbdfe5946e0e5ff7029808e6fbeb849fbd716ca435bcecfaedfffb8a2c48d
+3bf406a132e7a3fc2a9f52c28763e7575bbc2f22f4029bd90c19d9c816205b48
+2b03f88fa36332d72e5f0df82134760d26ffbc3c5867556120f26d10bf19a25f
+b52baf6a8f98f0a6322b2735e9c7cf5e152d0b7b01d97c5ee45438a287ff2172
+b164791b1b60b29e88f3b4eb5fcaf195f5d53910c8f00517a82c650621a83ea9
+94cc63f4788c98d56676ae219fef3e446356fba4b49a24c3e0a8c7413c8ac1be
+4d0a063d6dee027e9fc4ca54943cefbc760615b6ab16091114003b158b019e10
+5f8c488dba09b70db0ab77ea949f889c1498faf8883d63c36caaf1d3a198e2c7
+6a2c97a0a14e5c3dcfb7034ad7357b3be8cbf95d93131d778758c29887f5cf4b
+493044e28e29903a3763fd76b3d69aeb4ae6f95b160fd9519af1a8c90aeb2977
+6f438f1313feab076ccd14323a237ba5bf76faeb29d0ecef23adb8cbefcd6df7
+6741644d51076cf66f92b52d852c8994b9c763dd08099897b11adcf00e9dfcfe
+fb6c876b4f076f7923fc3975af92e9606475c78b98d53f60f656b5ff23fc4b60
+32de05f8077319f6b35e97c43dfa17b4de3cf2a3cc799f8bce3aa8c9d1b83a4a
+bc42a89abd121d46c1a0235aa761af492e2e2136221ac34039136c291e877912
+d3946118d5afb7f44a7bc0abb2b066606c7d4cb5fc0c8133a84721d8cc7ecafb
+fb6b15b6ad5adac50a7c3a3b8beaf70054601140cb8cc08b6372ff8fafb5bd0d
+f04364633edc41fa1c4522402313b35550fd3515b9feb6a17c4a5b197e694a07
+477cbd4a46999edf0f0a500ee4c701f55f00d5751c65d08a621cb3f41c298c6e
+4ddfe05703b6ec04c25de3e0e7ad4f11dc918e011c5fbb236e5bef784b2ffeb8
+d79be24f9c1c394d5bb839142c1193bb7f224acd259d1a90d2d237addfcec05e
+fa0c387d984ce73e67169dc36eebcf137fc9829e4bbddbcbd5f61c2f3155b72e
+8f427a15b099c2561ce8b9871feb7c1cfcc24a639e0f2d051ecfab89797d1b1c
+0bbb7b374df1d3df75e16998dd4198358e2829f7bd40f50a449b968813949115
+db90a7c403a2832454be362c71875df7476c7651f3414c0d4f497ad1b67b2952
+d41641c740028167677c48374b3151a9021fd3b9c21ca8a8efbd86b11d998813
+f01c3fcc990c60fba08f67d3ab4a302b62ec0f04b9063e01a8c6178f3806935f
+638c972686fef41baa1cf372b735fb19bc389af9d7ddbc7d31acb7e915d4b418
+d7a5ab181ce663314278cf8881ac4430ebd3ee131a7a2aade1de7731da96303d
+ff212e8fa851cefeafa4969d11b0c4a74e23654821ba2458961cc2b1361bad81
+a8fcbb99475b003c29f738ef40e4f9b1d89cadcef391db7cd117be434d085636
+3af49df9d46a0cfbff5af6e5e4d192a4d13050f5ce3e30471e489d57330853d2
+728007ffe1b7ce41375dbc823b84812a6794b58e38de43b2e22d0d059db64238
+5d32f79fe0d2b8482f61a0e1c2155dd69d2dbd2636bc0f07efb9f6f13c4e61ad
+16bc525b35930de9dd5ef4e5e91146acc78987a2e9578475522b3c87d2f5c5ec
+ac8e55de0399eb852551148047019fa08fcae9bb7831454ee0d5c36e3744d7a3
+4eed0cb0cc8e82810a673c1098986b7d3ca984597f37f695df8aa168a70d0ae9
+6f526f09ec75fd2c0d2fa0055c519459adc3e7c61816d57ca3bd36f78a06dbe7
+dc22505a4ca8af1b284d887b12b7f161fe27b6f1ed063fb4f7a37b5af0d1231e
+9ed802879896ecfad70260c1065ae88e593c75b6d0ce546440c482f5503467c8
+54758fdc1c95cdcb7d5663a0e1ac98d0a518894aa3c6f4e4adeaa8ac81d8952d
+585c2b70d5ad861b13f6b48616332c765d1fdd8a97e8b15d38097afa88cd7bb6
+b7c82dc031da0e5e919b3a8cce89da12b8548a7c45fe1ac418eeb8b2318c9516
+59a30e56f4f166a6fcf2473c213449f46cfb906df3ff8ac703020e8cbc71bf21
+6518a3c76265e644f62be4b2c17ce1c8fee549fd14d1cb94b646ecb1d14cfdb5
+cc422d8dae5a86550d4862acca62644fece36492edde670bc9ce80b0ffdaeff6
+82bde3dbf0c403b882882af7572a42b4f49f6bdb5a8aef91159546d90238ec37
+0ba7e2b0cf8bc7505d8a2936e88836d097f48d57aff9b04d08e9fe8f3f35d046
+47d6ae41ab09af7bc1335369407a9558436be878be6e8b7f4cf88cf09a6792af
+911ffc61653653d1c6c8da705377941c7d4c1a6cfa6f47c2984436ef697052f8
+8dc07c91414283515bec6bf581c046306800b755c301e5c5e2509c8717d7a450
+1666d78c7a63c74279dd218840526d5c64da4cd356d24ee7382a471e511aa7fb
+94dcc208f1d79e5b878bb110d5df78d7a25facd252ba729213bc5b60093c115f
+61d72b91eba38d54600893f12f41c59b26752d3efec1336d8a1bdc0e9a33b9c9
+cfb1946d4a60836b1dddddcab7c18a1db24bffe3df0aafce0c145f5c27b8bfef
+908fbff18d2f398b914a5803d2337b95bc7d0520bcd60d3730189af04c8417d6
+e12c20626580881bcbf4c7f6a6a5f43e7792de58f7ada1d8784f6a7b4e6f96ce
+73c7629a1b3f78b821629b8027e85eb5241d8723f1632145263b0457985be78a
+4709401ecb03f96444d94f3369b30b41ae1a16a7671d2a6ab6ecbdad3753fcbb
+0edb46887cca933f5909694344f7282cc7bfeff1c3e19e7668db02447082f8d1
+72111d8526c17a4458326bccf6aac24088a3f6dcdc42d5c5587e05ddc8ccfd07
+38e7f9185281192a15d248f7a7c7f013508024e4f2386df48f076b2674e5a720
+c8e5d5db8b7ea56c349a963ed8441501c23b7334c245069978b1d13aae19581a
+c8d6bd5bfd27b3083652678c15ea96ac0a901508d2dd0d4d89a772c740ac408b
+b9b61c28d5fd3f46463888a3ff49ee43721a0d03907f2d20f9c953c6c1db8bd4
+32afa377913b374443bd560f68d11611b017c876d7cd1a2bed5789a0e5bb2756
+60a68957b69249f0fa1822e3deb8c8c879287fb81344aa625a772093c6ba1517
+11232715b0d53725ab50343c5b1917e2d2575340d003db8adf03b3835475f098
+25e541e87a326369ac59d4b9a71b2d5485f01cfd40313d14492e828a47fef188
+57aad991e624ab1d3d8d696a55d34e3a3689dfb64c5c33fed34fb0c8293da01c
+83c58943509507870979b2c51f74ef700bc52509da2802c0f0c1f4516807c3dc
+fdcb32c4b5ed6a87231e58f5896c85687edc3e7872206b3c19be99a863a40ff1
+5776e396918ae1ddae9acd9a3c654133aa17294a9e57ba5287db3c71dc1c0d12
+d9d6a6b85f5d1cb487b51e8c1329204815962b6937a22375d5db47c4bde26ed9
+3ea18c82839f55a28f62a508958bc7fdffdfabad5757e5a4e891efdfe9421686
+7dfd4e36a3a394fc1451e38907b58d16fb110d8b18e99945c9d1a215f6c906dc
+5c2a8b98ba49c225c437068ed7120c3e591f754bbeb880fa51868ebe4735b7d5
+7c1107652525b3b844183f4cf351ba35d655bd5e66527cdc311a4f0db5412956
+9dabd87a4e45081b4cf219a75432c6c628b596afd87b39b68f600611b3ab3d83
+61b8b056e3aa2b403f6550b72019be02a27b7cd023c45f72ebafca0315f4fea9
+d490254d0adfd8702b6ee29af2e47be8350196e470d622bfd3febf223d7358a6
+a00f042f7d168507d7e69adaca8cdd219cca5ac0a1d28ec684467d9a16152c9c
+a31478464b5a35cbb18f064af9de5a5044ae920b9897d6eda7bdad45a2ce8196
+d918a6c98eafdb088df5e11e3eca1b860fee77e4a7a68e21edf484532e24246f
+345bc0136909dcdeb2d637b215f1087a3b14a74ce614e00dd9b52795f32dc03d
+f2b5fe1c2b19d76b3ec5bb517b0623faa536c0752c796b2179ca76a40c0171fa
+99c78e06bf1151c9384a0ecf7e384bc11248d954b21c9de2bf6df4229df208fe
+a16848c893f1f25b80020ea691d92d47d82504eebbab22c4fabb9aa29ebc2aab
+197d861b9a7949fd86f201a90ee2a453bfa2f49be46e87935cf365b21f946b88
+a3e8647fb2330928c1e5fde0a807c23fcb55b4e2008d5e3add8df3a74e5239b7
+aaec108ea92033cc581aebcf23116ae19f25b8d31eba90ce20388fe73b79cc93
+3fdd183ae909e3122384f79d2fe53cc07cea9151bb3ec076de154e672b580ae3
+42763452c9fd521e7be2ebd9f2a410e989ff4c5beb38346e37d6bc91108939f4
+3edba27cc6d69a60eca3cb41ddec11536719e3cadbfbbbfc877d39021aaaf578
+7b986a01db572a62b492c38466110e1f484fabf38054d0fd6acecc367fcda35c
+f928707a3e15a0cbd3f0a6d555e1625582dcf088b8fa6859b01357a3fa460e7e
+5cc1a3330318b3fada86b2c55f904d77675ef57f137e8d3852e1cf505029dd33
+153640e04fec2575888cae0258b22f309c93e9042d567ba4a0ffc57cb9e9caa5
+14ecba866518648f968390586f1cb0ac986ddddcdaab912a09c397d12a9973dd
+c5abc02b82c7b3c1caac0f1da96154677b7112bfdd1c349dfdb5c4bce5d7146c
+8475e3cf71ab9034abacae8182826bcc8836a6c0cbef7b64b67f874a11535956
+2c9a996748958e7238777f23511b0f2c18848599beb4979e22b98eb5d579611c
+86d917d84c50b23d55e5975a2cc934a1265c0731c9510c003930cd829e40a4b5
+7690c4b63595f1735d8c2ea162db038f58bf18f3155d0d6c5982d43e0bbcb187
+2eff929a6e4788611c2527175460fc9a8a8bc2b2b3acbeebd6c53779a1156257
+0f53eee2be859bdd702d4e983b2877f1f3ae6e4893cab50d607c42cc9dbd13fa
+64f20956338528553e7f0fd6db1fe98257c7acece718e79e6c3ea3588fac6ef5
+a280f937f89e570796220fc2b939832fbb6f34a9cff554269121ef6aa6c3b331
+4f2e22f5e597a4ff253fca5f757fe152e4fb5e6019766336e6288c352042fc2b
+e780c7e555f03b991bc44a7456762fd05c9c2e997c626379d447dc056d66332f
+fc2a137fc9c2dfa584b127429914c40bc3a8a0ea5e7d6cd3a86844cb8f1ed4b7
+63af17e80a0b808dcc5c70b38c1378c9cbf77601879d0019a8b2ad2d458c17da
+932639d69cef730623acd1243b062ccddb62116655812d396686ddc1c8938edb
+bafbfe0ccd33221070a60888c8397ca3924e55c5820f4eb29ff35bc501347a74
+6e3704fd2051a50c4c4c1c09c74c9e6ceecad42d37ddbc410485f90a0fea0752
+1d6508208d4d86ae19e2446d21902441b44739849abcbb2adcfa2fb353e6838a
+0444fc13839ca5edad7b5638d76537257187eb5dc89a1f412c35ee4d8bc661bc
+e25d809bf5e3b082051090b20b6b83225581b547421138abe92a2c3c554651c2
+604f7e79b48a1fe0e630a4caf13fc15fca552dc094be6f359736a68fb4791db2
+9b16edb6e06d3ddfd451b111a06bce53b70b7ef5858905663629e780d0a79fb8
+6c239fd3da4d2fc79a2b7619a3612490f147a44fb5a9a5a8826c7e6f70d9ac90
+41e33c39108c8b963f692c8719187246e9d34f34d5d6053ef759da18ee8251b4
+df0bbca723f7ad791c3dfb0f1db37b01cddda2ce698b3bf679d2cc1ce8685ce0
+c872c2f89c6a6897f8c203ed61aad3f8cc5e0371710f5c4c86343ac388770c56
+f7d1c14b15ca0434218f86befc24136ec73cca2ab768faa087ef70b3d5fb7f20
+0a68082ff38e522eab0ac5c74309807eb4597d8ede958790885aa18c792e6953
+74dd77595a94f74fb896587c5caf286f43223bbfdda9e89be778dffabde05823
+909db8ed5b5310ade1e80da1ef16805f5f8aa900be2ae91c54aa61d40a0cbf91
+4dcec7a0dfb650d6323855a5eb0adf481a2189f7b2736106c56e30a50c27578b
+b7b21db20bf5496e50df4e50c834624fc1275dc25375db000aed74ec1a1a6445
+4f041db66cba8a7c7455b4b55eef149414ee08bfad9bab1693f197efd3bd22fc
+8368d39b706cc7982ce7179cb85b9eb073fade8bacbb9af70f7101eb114a773b
+f5fb3b4231bb9f5e439bffc1464f50ee94b499b3d84d879fac0012433cd406bf
+b7420354879ea2220ef28c07df24dcb079fd0dc2a63f9cc9c709dd122b658f95
+e5211c61795a791544e9c21ffdab0acf64bd60644146153f02822f1518d0f6c7
+e3ca9a4096ff4c424516835c7f6607dafe23c0b70c8f8990eff7b8ae724a07b7
+13297d9d7c83d87a6b19eb98c48c6e9422dada99113c8540f48c1ca03058f052
+712c1a46f17a23b45135c443c1128563fd6a66fe9e3c07ba27511b4cf0ff68d7
+792f6fb1589fd22a2cf5051ed798976fb83d3b23b6981f169b44a3e3cc47af92
+9ba4716c51ef979a3ff7e4266899a457a875c0bb296ebeb8384586aa380f9eef
+9d52ef6c952e848923ab3f564e776dce58f21b6ded7960f326f4e925ab2cbdfa
+863e9c79453e338d7d61b387c193a862fa9e6c456b7652a791a91b0bf01a799d
+cbade03850b816ea002185f7740c8e5b7c32b003ff7a8c78911be015f2996455
+586fba449ae8f9b27940cc97d25d77d60b0aa847f586dc6672e0c0f6d2cb636b
+51aa401ba97d84da2774cb84912e47c9dade61de470b61994b83b75207af9abe
+5e10e5e8cfa8fdb8131bbc68a63886e7fdeed53ad867b6d3284f4e957322274a
+3b7b1846d860c446b0c5bbcc3c6241a56d2de295173c3d64103955b1bb8716ff
+c0dc492fd348cdd46707637eba91fa455d53b9f528d2245682997bb43cbcbc5e
+8ea3e9e2a2bd19202f67d7c16a42c602efe8254c3b2fe935c1f5bdd67d21d270
+35814763f60ab26fc8966849352d3fbdb628486cf74c5224f5d8965c5932f80e
+0d8be4b9716e5747ebd84bf452312042fe88d07e57a42a8049fff714e690ae0f
+5f7d54fde33112198294c3c6f546b09c76ecb3c414a5ed2a2f93e94c895a6010
+e6bcd4e883d2c7d7e826c14c9ee12f474948664138963a96f83ba7906736e893
+118be766df46767c4464623be7c3697be8fbfd662ef959e03b688d73d2a2d1f7
+4e9982faf31d21830d338bd8bcd83ac92127f9d48bd2660432e97bb6887e869a
+9e1871fa2c1eb361bf3916f571d9c7ff2b864658ac152431b931ec6c4f1d48f0
+665a90054febb824b428c2a997b404813e861723fb6c9e2c4bfcd04e8a4d2b26
+2cdce120e24912d32fc6cdd7d7235ac5f3d7840eaff18bd818b715afc03eba17
+7a8c3c3066e95c8840f291521c8429841e8b39d7dec80c3eb56b49a21a02ac90
+0e7a2b67e67732298f4e324825f7c823b7611fad2a8b7eb6bc44c3dc0705b4d2
+58fc26fab5d9c20a786188f593d010a843a9b6fd47f5a71cfd728c48279abd0e
+0a26dedb870faa7e19fffb970bcbfc6a61a487a19c56bc4e8d2e3ef093df0b55
+5a928a3b8f8f26c3e8cd4e1fbdb913d3235dabe2fa3b66c832bc9533c12fe5a5
+d6a004efde58f949bfc8bd48c44f8dc5f55d94ce79aa7d71ad14a4f7517ad7c1
+f17cab05e7a745220c32913f3c8f06cf02bacf882d8c293c8290740eb05c22ff
+c32c4cb2012c3d7dbd643ef84cd928ef8aaee42797d010e0fca4ed02a1edbe1e
+1d7861eb0a741cf976ca07bc02c22930776cb0a36b46b1a4aca00fd2d77f685d
+8ba3c1e24c522e43f198fed209ed810b0a7214faf8d583ea9146b26e9ebd52fe
+30826222af5fe432bd82d840d0a22b8ba2a7635de4c7fea5aacd8f946df99c0f
+cbb84e5194aeb9fbba94a33ccdb34b44a309954dfe2decc1c3f5056bda9456ec
+5a6e0bd801218083ac309c737f10e9a42e69b5bf74d0278fba6a691b934d748c
+ed7644dfd2f5c5ecac8e55df3b5a225e3d5ba7706fe4e50b7d9d53df98880cff
+01aa1a5936513db38de449dd1b1bcb6cf199752df7e2161857fa86cab9d1b645
+95da5a17bc0f305f9023bd265e341558f73a22bd4a01fed1867179986ed99822
+f6eb5eae2fcb74be99f34604fb47cba6c3a0f0cd388ed13dd07337175ffc9fb3
+3befc49a742d6f667af2a4476d6e8e0bb61a002b29ba069a4a78ee1bbd00fda9
+ac18a33cde76217e48b0444e7c90788e60ff3c820ffceda02891d12333d6788c
+8028507fa8b9c59d6d6d476c349c1e3646640fe504893b23587c0fef7c278fd7
+e1fc0c12de081c4bc55ee7bf65c9be4c6168abc5281429f3d39bd0bbf771d574
+8b321d993df752b5fecc462ff8306ff73ced8c946f61087ae9606699c2e85261
+c50715085f967542e98f92d89bd22d1b96c1bbf45e11958ce4f31ea3bc994ea8
+e9d0b7cf4ba9ef66b8b6005d6b2960e68dd0c0af4dd9957a253e2d4c47d46a09
+cec1580c02d05bd3720daf7e8fd3d2144b8e5b3414fe89b2b95f8cd153b326e4
+25b4733ddb2b4e1f02000dcc806252311c1e313a1ebbb4a9c445350609cb8bd7
+25e67f6fb760765b01ac474780faa7078d0d0a0973cf6a475087b720de8c5200
+e953eee885e5510b83a16014a6a255bd8273610fd698b773a0e2911690b1d5e0
+517fa1e2909905419d539b7d91f06fcfbe4c05041a06cb8a35bbb51b563e425d
+0e65eb7b086acab5475bfe889397b2326cde5d4f7b30da851c55c630805a0548
+eacaec8b20bc10ba9925d13990ffcdb569782c39032bc5c6834eefc519747cef
+23e1413ba5c6a03a399e7adc118dab0e5a1a8ddfeb5888a6855ad7ca9b8c5c96
+b33538ca373d4934a879387f55ce65390d313d93e4cc7ec7e0f67c483c3cba57
+f5625699cedee9da8622f0553d19231f626404329268f440398ac131190cb74e
+4cecd5be8cdb1a01bc980b993cd8b3ea77eca9642da8e185a363e7df2441b2b8
+d991a14e5a5fea3014aa375197fdbc0b1472b321d5b0d8a543cd958ac036208d
+6b33858d4f5a454fda0443a5976a1008da84749552fed657df42290ea9e0bf14
+49b2f609c3b69b8b2618a73e5839fa69cdac52a68932ffd4b9eac9a96aefd44f
+d7475a9cdcaf91cbf86e81758426068aad6dccbe6e874248d86bf55aca000641
+4e21877854e95f7b76b3994424bd597f3fbfe58461dc5eb0c03df892baaf83b7
+e5b743b0fec309198e019cb64047d127e47ecda08a6398a46621ee521d05ce94
+be413888a3ffbf5039563b15d39659a57a9044e6caac763d25aefa6ae3315fe2
+a2ee1f6fa44554bddd7150b8d852515988753ea49ead18885ae5d2c876335be4
+c4e022ab6fd7ccf70ebd8afb12c741f8a6b559aca8b7c8c71f2c7c2b046f5922
+4d15b2a85fb38fb2c15623bd669b4da58c1862a69e3d01dd5098887472bddb34
+8f37053c8a9022d23cceb6106487e1d9b3128ac1dc75cff1cbbeb778ecded89d
+47e4e96d97b8df40e2b1b21fc062a353ccda5e734d9ed9b1800a27f3f100764c
+5f568fa7668cbd8c9cec6ad262c36cac701239b6f462ac4936ba7593ce53e49b
+ff228411d4f133a019c029ccb7b973c8ed2239e18c207bfbf148019d088d2dee
+c58a1c243f368d42a7123f976cdd4bb47a754e112a27939bbae57c1335f365f3
+20d1e89079e71d3b8f7c2a4a4cda6961489a6f884d75d7493296e2dda3ee5bda
+4ec01a82354be5ca793904fa722bf37d85e7fec21b4e98c225fd66e819ff11df
+368257087feb4355932627f3f6b9c288afd80ce4533967f42b89da53d2df67f5
+77a03ad16d54cafcbb249565325b7609e419bce2f136756adb46f2bb37010fa4
+211f58e74d0931c6ce66474089df52b9401ea0e26c19714dbfec4f138d6a0acc
+f4cab67c1aac582a768819f6eb7f1591bb471640e8a262d8d6be3f935229a8fd
+e0c762f89935c88b847d7e7e6b15b2956ac4bc9095edf740c615c9018579fb81
+064a1d68f6982c0cbb0a33cf9a8bfc6e094c3f87bde2ac70fe526cbc63672520
+e6b35070550449599914f3be35eaa1e326bb251d9c9ef42a9244ca8ee79fab1a
+dae983f83af2a712f9bf9a2ef74b288a23ca7e958ce8c24ba0c4ad0683306da9
+51071e3ee96c25cd8123e87ecb93cf760360ca98727a7ca23f1273ef4a26eb14
+8e00c231bf56a66f74feafe07322ee921c5de6979821441201c46d7e6cfcbc31
+3edaabe7adaaef5f7f2d7d297de18b504ccb3c0b0d77f03bc9fe79394441267e
+5418523ae7f91bfd7389d20f77115a4a9129c33531cfd99a2ca3f7d3f39635cd
+0ec256f7bb65b980a9353e9692bc936d8ab18bea370933ff01e8eac03bc98f76
+87e754593e3e06bee184bec18b126f7bf3fd083f87cdfc2c1074ed007432a6d7
+97182114ab1c8e763f8f37c705584da16b4bee27a6b9b24746df9e9b71729bda
+630abb697f3348adac537b97ae350f64c8c8b05c82a49f8bdf4a2843c33be4f1
+3a201c7ca5b41823923c9d510ad2741b171e8506b0b79d3f18c8c363f3f04384
+1940e1be692b06b13774d4405ac2ff62876fdbf10d1a87456293c7f4cbbf8a7d
+8a0c5ad8da6698efd998f58929c2919d2f8b4c52a904b618a61d4a3936ceeecc
+fd97cecd156c2a5979b7321cc4f1b8cb84b00bfd6eb32e12febc812f0115b57e
+b60b4cb41d6c109d9d4c4684cc2e46f7a8012aeaa0d7effccf5057cd4efffb16
+79f3b1e8bcab177a67427e3643105ddd8a6d292681cc9114c008febdc659ee93
+70aa08e8bafd8607a45721df8f66d072ba67b863797c96053df935e1950a7ccb
+e9f22ee34e2e3607f1cf4bba18eb34480ee49898f7dfe120a3523646c7693b6e
+809eeb360ff12283e6c67f84517cc4794c580810df85b855e394d7f1a35c8905
+d61252c16ed95e1b8b64062d122ea621777678d13d7924cd71666c191599921d
+f18bbf96addce54db9ee2dd1d4083eb31593b706542e8cfd5438668747dd9234
+afee940b0c9ea6cf1470a700aaff7c1ef56751ba9b10fc5772dfa61f471890c6
+911d9b68bca77b2fc6021d86d68b032f1ba6774830f123e21b4656380efe06e7
+0a6755d5b599dd09e4b1e45c1dd74f7523f447c5fb468a871db7fd074305fde5
+ec49a348a02da990b1fc5cb991a715fa79f49b4d32f601f102618731d98a10b3
+05625db0c0e0eeb02a4fb69a39e4b716993caf7222e329d83cb7e60ea78ced15
+844f3079f7821a44c27c237873b9729c0d690c31e52f3b93349522c6a1da789c
+75cc0d1059a2d1339a463acb7da3399414b623751485e9ccb0523a5d0d42ddf2
+e89dfcae5e6a7b743f7e247d171deed57bd133eee43dcf5c95eeffe36b3440fa
+2276ec0e4f99715067736ff688c881396724214099c6e2f821721ebdfc68f16f
+936a7ca1cc3745ee9b127fca1d9a338cb602b03655e8de2111ea1371808381dd
+3190a5ab16fa563e4a71d2499e095eec2749e67e532583d7bb28c595bc45c665
+f14d206480ac3d562c7db8f3314cf070eb696fc952dd964704f7705c58351736
+2364b2b1017c71623027fa35e90a24d7f5172b16fe9a88bf97e05576e582edb0
+8893b5e2465c61ca3157432a1ffee7512e94e63060b4a5c43d8205da43c6f75c
+065dbdbfefcadf13177c2b77011e121c1f5d19b6bf1fa1de2a141c4b6210ec1f
+05dc8f30bb9feb6d9c22d6aef88aef4ce2c3c9563f0b0eb391cfe00df55e2e68
+1ea1707b2f0371d7095f718ae3bca6c483598937251cc43209701e55a0fec0ca
+2a84abe42e58b16b19a8cc1875463649b037bd08e0f3af1dd70348450784e46e
+23aed8305e833a81740513e494ec2f1083038404b3a79b679e530d8e1cc833f8
+4fd29391aea36d2b37d2ffeea00e90d50d52fa2d9cbe5224bd19a4bfebfd6d36
+04c250544cc529026dd473b7e906cac0bfd8b106953e4801768dd2f21a12b674
+3dc8e9ea6e662ef88cf8bce0e34f7a88d2401a80ce26d44b0897339dac523c85
+3953cb6a3794963e5cdf296b979a20fb69a20884894c05e38da4d3097da18417
+8185f72ca9e34e0b842662d9f51c59c0d61579414e44f294be31831e7f806b48
+a9c60ccd6ee051d4d29e406c6092f867ea3563fdcdbde1925fecc354ce0ec01e
+281d1b4360f3ebdbcdafd217081557869c8618ce923ded375425b9ce0a1f4a33
+eaee378ad6a1177df9432a2f140d5131bf576271a0db8d1e74ebdb78cde4c193
+a7f2fd5e1783013db6401acb51b108f4a71b16c9cf57ef903998163e5201a02a
+137992528337a595d9c17828074609b7380f9ea731edb55d4f31c542b522b6c6
+ea2e25c8c562d392317318150d4869c0417be8f5ee48600dee3bad8076d86109
+8a2a3b62bd512b4bcd48916497dbb3c90935321ffc39b457220cc32348a2d2a8
+02547d1f4b4d4bafa402b8a7a7afafbfbd3207b046a576e3f039643b325d8474
+1d1d156f026f664f2cad54fc268f41fb9ded61b9ab9dcda646b42c9070f40635
+a46dfe209b72eadd40049867e8b15bb0a927b1c51c31ea74ca99c4b06322dbc7
+1da693dde3e686c7494d7b49701e8f2b8cd754c30476cf9bd5e0d5af5c6d99a4
+bd87f1b73c25858ede3d1d82710e3bce544fc397a91cda4604e5db7ad2d6460a
+31bb35c9ba6df033a70ec0c6f601873d4c6a3d14ea9fc616786920f468c2cd0e
+ec9d63e8d085d0be593d8344d989bcaecd6f770f7763e0f8f8938a1a26afda38
+a79a1a0780ca251ab2d9b11e33e394e4ab7bb1f459e9695ad88ad71331277094
+5d3d6bbf673d418761ac787ef5159f9fed9103b28f0d5d86c4aaf4ee462228aa
+24bd59026dba7831062dfbc34276c5bde5eed1f7091a216d155ea9f4d9e1e4fc
+850ef02f31cf85eb5c9eb8d4f5c55ff4147242cce03827a0c60abf2a727981b9
+9891e361364bbe822a4a5a88f52328ab182a459e5856ef9edf6c835111e2b91a
+04d83ea913210e40015d3be601c0b43e2e677d5c9cda5a3d2c405b67095f3fdc
+f973bdbb333d13693924369c36f5ae1117bc90d9624016b22a3d6f23a80577b7
+5562f3d48655db8a537bf3409b92d2bd3b02b1aea544636a6b2856d0a1a8debc
+43bcf2023a54a3cd885fd9ee3fda7f3435a911c9103f101a39b5a3b5166eaa66
+6a348648ccdc9116fd0167dfa044e6f3f73539fa3444faea7a34b37e49c34ccb
+3851f03148c78ce454712f42044b159167701fddd5b664196666bfcbcb7b0b26
+1fdd85134d0a46fe319cf381a545b577d523894b7492f632c944848ea6901adf
+9deff2feacd94bc30f6db00a591cefe205390e32974b78f82a6ffa0c1e746ed0
+430f333fb242cc438e0e107faa0ca1a4073224fbdb3af21f6926b6c327f14bb3
+680282dd37e809b2180b112a1d686ed5beadcb5a230b890a30ba2832c1d08aa5
+9a6e9321c362edd0042c1483bdba5ff764a474e6254c16904f76642009c316a1
+41e3c824949a766c5e7067f9eb168a2f152bed22acc112bfdb3162a697698f8d
+7eebdf52bcbb14ff206de000beb437783d141f93daf468b1a6a62ca6422e0d3f
+c51fe03209132e719c3a7dc6a1aa36aade44c9f9b867afa34f3c26129cb619b5
+01ba4224c7ff90ef8b69650045c57d58d37ab9268abe8bb62459917aad27d939
+69e9c089cc4f417a679bdd99de84a400fcd4e388f4f156fefb6466039fbe72bb
+3d05549bcb90a7ec0c2c3565801b3a7a437615337c8dca761d83a7644b04d4da
+e67e00edbf2b3139c40dc3d470f8d476728119e9ab31d46b3ff3d6e34bbf6532
+62ecd23a9ecb93ac3d2498f63193ef72d192f98b05aa779b5015b6cad18fd29b
+421a17e01cb394d588e37ab7f986e20e204a0f5fe06224f53accc121f112d58a
+79f25c60a550a1b325bf33f568d69ca9a4cfb249096b8efe3b43cd703db80fa2
+0bfdfd3e01433f2f69913d13c1d14031545db4877ac7fe4f562322dbd2572cf9
+94b7eb300f26c3b53e75b02b5889cb0420f378a55c9a9b6bba64ce698ceef061
+349f8eee5b3a486870c6a11e9e3ff3fa00e3480610a449c9ea48bee511dda6cd
+9ea3e4653dbefb8224bc55a02f77bf16e7b9879bd9ac48788e2fb2e237dba707
+fa90cdb918e02cb6c3e49925b60e2a05a71546d49d1bb161ea5ce6d303fc1876
+dc17e24f47344fdf6029f63d8fe1cc789a7753e492f5421c8b7ec7b777ec3497
+4575b63e74fc255ec95f3a1e93c4d752b42fbc1b1b7dc52b3bd4e33102046fc1
+e16b7ee6fd0411727965c75de86e547608807e51cdc1e51b76b8f9ae0484488a
+7d21cf0f3b7ee73f691fa048309c990db12036ec5c299a4eae7411759dfc574a
+c321c443af71421b7ec71550348ea60512975b17d6ad6a22463aabdd94befd38
+88ccf264e94a723bad53e4ee0a32245aea16837b570ba36eb70a0414695eed42
+e02948c308e22fcc6d2e1bf714ca662f615aa7cf0b71941fe08fd416db23e1a2
+307575f66fb214814bdf38383587cb14f5096241a544edd522f12bfb4864f0bd
+989068be6e80b36c06d4a3609f45a3f249353225d7b0360c438ff0e862a2f29f
+77842f954c289477f1654aa13250611733e6c7c531ac69fcedbf29c1e6de2d5c
+edebb77f51a6ea25a3fea286986232a2410240b9b7f31ba31a59c40a5882f794
+832097dc9cb0e806db71677341efd5244c8c23a520c8267213204ff5f13e4bd9
+ce3e44c9387c17161ecc5d9c9f40b8dc4e6a16d93f833f07277e976ffb09be89
+d1fe74c1c6e1cf5e21724f8b83e70fd0d4ae72eb2bcd30eacb81710ac3a308f7
+e138c921577a06c8ec7293ac443fad6fd7a6a1873c09011b29e0469e411358e7
+f5d274a072ab9f84f3c5c74c7dd8121084019d89479d44bf25b47c248d4859e9
+c46d6f0acc65a9e1403ae66e84ef3141d688fcf71290cfc65eadab3f43474c2c
+c8ae995be0f19d7c0f8a3e2d3e40e2ecdba5efdd8f07981db3fdc34b3d014039
+3d2cb0bfb72e821d01bb22f461cd8f0ca7254cb8937f9f228f1b356c0eb3f522
+8a9337aa9e0b24d3bcdf37b2e2255a8df12b1b343f8df33908e6bed58d5ff638
+584c0c4bfe04e43a4237cefa6cdfaee5507428543ff220a987e68c769d0440a9
+d4a33739e9072bcdd885c601dd30771d731a7c57713bd4b8ccc0c3c188edd8ac
+1145ceaee80b1bd2ca85d582f05799bccd97b8547cccd71d10892b1409f2d672
+dabd6f0be7864de89fc66f758f120ca8a7983688e0b05283b5371ef01f2a68b2
+68d9fb855d7d7238b971371a8ab5f9d80e151c132a377d48704342146f9744ec
+d7ab4453d258a8719b8455ebe73d35a9f70dab2fdd5d41d2fae8cf56146215ba
+3fba4abf8f98765c6ed70b6ca8ab6e28c61611741eceb33e6c2958db40202f25
+8d78853a789ff3ec7afc19e5348d8422f6a28d65f2566d046d7b74973685473e
+5cc0ebeba1c944630042e7296d81ac8caa96238bbc09f3067a7d3bbc45b27431
+1abb8e4c580de95be79dd7cda3903094a88fde6a8cfe77633e0481b2e67ca61e
+2dcf7872318e63a4134c0f98a472813d4fcf98dffd30736ecbb4facb9c6fd915
+2461f90b736211e0ab68d5cb662be0b511a1e60132f7969dda9b229091286f87
+ec576661a94f818b99dd27ff65a4c2a3c500ff9cdb4b7df109db016ecb5a239a
+4cbef1d443c48703f62905ea599b82f76be0fcb01263eef1ef411c72875dd0a7
+a5157265ca3cad3d27f9f9c20577a552e59910187a9d04f4002e07e92d8f5929
+fff98442ffd6d3f8eed65f2c2be666aa6220ec4e18ffe0d2f3daa680d4f27044
+0c3ec7971da783bf7928f77cd7dd11ab8528a390318fc0572f13a5a2b20e5ebb
+1daa9df821c0cf3a34258dc56f872175f1d5d8bdf14478a19b53e278cb4fe83c
+527bf56a42eacdf193c6ee25337cc2215016a7014f1532df6711d9b637a3d500
+3849a0881c778c74e8e5a47204bae5374afcd1bb8e901bf2a703c5cda6df6915
+c9a93eb94d553d50d3f178eab2f8d6338416539f225964b688bb649f4f148737
+410ff38f25e56ecf583f62f09985f94ec048b8b460de00e58f4f238570b689a7
+ab307b7113814d5f3ff6cf280262acdf7b46aafbc234ec32a931399bab9f2ab8
+b6c05b23fa2152c10888ea6d4e44b44e65721ca646ecae52a79a532565371f14
+1940d81923ad84adc5c6a9f2d1d1efce1e53b5907122edf3df1b69e2d9a87acb
+303667cebf95dac21b053fbd39511df938b33032db098fa64fc7bc6407d11be9
+8402713b6bbd9027ba62baa364ea172aba41d3cdb8c6ffafc5468f51644b1576
+84bb51f49fb04a8a56a6cdff871b78b413d8b7bc595bc8e81e453c36087db7c0
+92ccee99d0d3f8ead6877edc5e28210a35dcf3cd49c594171e2531da1536f451
+0e0d51ef1760ec7b1fe195bcb5785c3f26d3c3cac4989c66f6f75a675ed97990
+5621f8b814be502c4c8a940bb6d825e27ca6633eecdc0f1bf725448950a37bef
+6abbe0bcd5620ef0a66a736b7eddfaffdf62796577a1f482ec4bdab07024afe3
+18e92459fd61a4277b5e885c50a825e94ec3e8aaf4292ae4bc9499a00ff14c6d
+4f742615f0f63a62f273218da051f35a1a429e1b79be5926c10c5a2ac38ea8a8
+6b055407faf2cd0fd6a6b16f847d9ec7e911e436d1d597e012cec5a08d98056d
+63ff4d16365a9033251e8dba1ee34f7359fb1115ee681f78a0d9840fd88cde7e
+e4791044bc3618b646af915e316d64bfbeac1f6c50cdbed248261813749e1c0c
+f998383bc6454d6b384ad69f9a8833860df4d66f750fd45e36f9aa1da976e55b
+0b06477f3bafe5feca828fde3a373dae7c2c029f2b2c4992d71ae4fc1804301b
+35ca5e73dd0a354b53d1c74531a4c860ca8946c9c05c93483c0f315caa8d791a
+afa03fcae03ee7f6378c9ae14cdaf68f002c3f306682777ffc83abccf992c787
+425f604253359ccc2d30361ced2137d2f825eab125a9f4411453292afa0a5228
+e5b6b4b6cdded786c3623f8d02bae3733a72bc1d1c5d8e6ad59a371a1769512e
+c26ebbb115291652182bc46ab673d016ec0f25487607fc04adfc072cd084e66a
+2d4ef87343c42a4d94cb9bef449af70bac826c0688e26fb2978bc71dcd25fae8
+c3e2d96e8812f882fbe9e0962e1bca90ce38a0da87c42579b1cc21c117ae7533
+1016b8827a466609f215fd6b6b4217beca5e741118e7f77600e1ec593fb3ce2f
+cd61c7083a4c5c9b4dc9babc7e573710341d678c527068533bd6d38d9d9c17c6
+51ab8db46418ab6a794d330c7d0c2c5f4d8e6e198b47ad4410fe1e3dbf9ce038
+0d82be729e3cbe262d2bb7f05f269022fcf6c89b204288de95aeb246bdecb355
+341eb2e622215e967abe6b6814e4f76f6dbe972688d7c2ceedbe858b96742122
+8cf1718747cc0b5ace901b98f4a99d7fbc8e5c675d78f0e822fea12e8100b88d
+5f8d86c5e048d4d33942bfe125d27f2a4cf26ade4b16d4986ce4e8464f7fd90a
+20a162991146ec48522d334120d140e31bc5dbc0c038f3ecb63ff9a2ed0efc3d
+a2d7c96b19d6ed49cc04a54f33d365737297ba328e3d646cd0390ec55747bba5
+248d44e594fa8389c72aa738a99dc4dde351d381d010a0f5fe48aade17f62958
+773d1d8500819db54d5f7a21a507f767f2ca63c5ac7c08fdf71e65aea255b971
+f5c2d65dd53d9f62d85be99c8ee05bd698cc7abb7e596ff0d11c51d0534dbb49
+2b219763fc99ba557da54c10bef24935e45364d8cb1ca2471bacacd1d67a77ac
+ea885796af2cad89cc2075f3b8bed21f9b56d11d21561e5752289352227e944a
+76f5fd44513b79a03f3639bbf8d2c7f4b8fef335a20482b0a3b401923458a4f9
+63f1e52f94ead00d13a5f0fbeaab7826cc8408635b28378899a05e4e390490f8
+d92a93eb8a105a4116a86611ac89f27d946e52ce39eaf255fce513d2b2042e66
+618cc2bc91e8c0128e8315624acb66f2d48cfe637bbf27cee5d0fbaa4b9f99a0
+ebb9f9d8093c08bd4e067abed9308ae286ecc5b0cedd695bb863da43eef448ad
+6ab3c9278955e9c1be2a059ba2524352a720c49e5db9eb8d06a09af38b957f78
+c686bfef9f881d906e5caa32e496939359397693aed22c868b2a0872ffd968f9
+53b7c508ae04f706876bc1e165c26abf7ad0cdbb6a0176df1564d7f7cff2359b
+cc151a058c48d429db6bd161b8410082d3ac53331c4b57a527d18847ef744ab8
+af983f3d22e35b8724dc460d0484f6e7470316dc9554906769faf9e1e070ea2c
+816a9c681e3e00be2a1ab9cbddc6a43a96aca4f4e7359c1535e1e88e4f360569
+13d587efe19e00d48137804dcf153719e8b7b80ff47c0c007d80a1c6a1327d17
+bdf5d8c0c72626ac7e5f569e12ef87a2e142ee2261634e8210f72d92f64e34a2
+c15f7f588e78865b3d6a62b0c3f5a3be15c0754e400d62e7e2618ec5a93417b9
+1a079de49906243fde354491603335b4bf6daa0798b51ca307e41f41baf0bf79
+490f892cf47f2fc51560023dd15049526e134d67f48181f3751305c34ee200db
+772cc0dd679264b45a99f5d30c7e893faeb3906d243a037e9baeea613596f222
+172033b01edd18c94df6641f049102ced150c535c70d1c4c66805c5626b52bf0
+9a97e5b539778a096b79166a592e0d5bb8950f7d28ff143f99495cc7c0778405
+fc7fdd349cf53686572f89219faddd5de8f3ddfd828f333edc15f3614f326975
+c9fe749a6a2730670919b4276eaf9b482ca96a0ca64af391696a78a377fd1010
+74a90f73d9895c89d4008683f0759813a61714269f67b10c082843a92fa97b55
+d2f9a40b8e4156f3aebc7fcba0773e00e781b80b07004e5b20f8c9fe14e7df67
+12a64ba22cb262799c84746e45f3f41c4776314c3f4a0b9d7eb83feffbeef166
+0d4590a43a9373c08942f46daaae287a420749f7046742e7b6e15ab3a04d2b97
+2ae73510f57de8d24e555c438d0953e1c41db9d6f6c12d2ae784af55f696efa0
+24b5aaf5b3e20cd6aeabb356f33b6b93ba8cdf2537f4570332c0dd0fce1cf8e2
+ff3cc038ff272b1df339cafe3659ac4541f2204e934a555ad9f1e9ba83148113
+8a8947bc49b9062e71c202631cd8c856e87cf08278f9fd047325dc4be74ede82
+42f483fed616aae2d6a5dad1e1e83f124dec374d57b81da43a0983daa34af7ec
+ddec60dbed7ecac68409956a0eaecc110145ceb8d99bda1a766c2ade43326b29
+cd6bfa4416d9e0f2153f4f9a969b033087e152ad9bb85a40479fbac509196c99
+a4f0841449eca6dcac1b9f9d7b26fdd6f7fbcb3cdd32b75091c5f96b3bf114f9
+610343ed284f5658752aac710270945c0a41bc3ddf3bb0b21448311e9331cd27
+06364e3090a1265a17b1b424d03b1e950c824645e11ab766503b0ce70415d410
+afaa5b33eba7b498d80302fe982d9778e4845f3659254ea382964e395d4d0341
+a9feeda8f963739e10ccc58baef8dd49a1361a0cf95083559ba32a8e5426c981
+42ec2e925e4b382d5a531912627eb2a0d98a25fcd540cd5fc6df156d4a5eb1e4
+14dd84c16fb9c6945e7920179130036b5f05f6e283ed715306cea7ecea13e281
+fd69e9a93b2bdac310088ca3153323138d52bb2db9d272b6ff67eb59f3db66f0
+8d1f6ce77c4519977721aa8f532006be856b00b33369fba6b980c420e34ad5b7
+810122ec90aad038dacd3db88ce061e05d12ffe44066c1671738aa913836edc9
+3ab7e596024fb3498a29e5bb543a67ed3e14b9eb13dba247325e70cb0e1fdc5e
+b3784da0415cff2b1a089779fab42debd53920ae48556e4f906f92abdcb35cf8
+d53e938b1ad434904aaaccc9463d608bd4dddcbb781f44b864e1703813fae91c
+c0b148445b88e4749cb9f52e8a6b8f598d754be58c22aa33d00597d22502a71d
+c207d7ebc4efab16f0a9c3bcf6f888698b443779236c33358ac4fc59c2f5ecab
+3ed32277fd98ba68be767aacc6abaddc7755b15c62b458a66086dfb464f6c7cd
+adad1017b7f4f14d98ef09f0c709ab6c529d19afbbac325ccd80d57ddc19ac69
+57f50212f6500e4adddb800bff909d6117961e6a1bd8580fae0e33103618d4d0
+ed7af5d04ebc3388821c121ba2067e10816fd1dc7a75dfc98106c6e9105f01b5
+99e845e0236258628b904df5441abd12772594645537c75b20460c48b5f21fd0
+2f73460068ec2574fe6829d86d6958a91a588ff609f3c9bcc2bfd3d2220e4550
+3d0e5a0fc0a837f73351be9752a659fee027ebcb926f5ede378f0bd10cc567da
+8a829b235b48eb7735919563136fa1a79f99591d431c768b5867a8d2e69e05ad
+4f5ff1e34e6971eb4413328c45f3267cfff49e498c870cdb50680ab42bcbc34f
+c836c1efcc10e50a43b648c88a7cc7d703389dae2b835cbd5510e1b26d4d436e
+5f5ff8f7527c1519bcdc7bd5fe20a390f484db9ed9b91ae7c4f03dfb68b1f204
+5118f5e814af4ae832444f60827aab48a9dd05ecd39dfc943775463889604a74
+58c324cd27782d8bf4b3017821759d70a344eb605bba453527aa7de48be86d71
+c3477d99f41360c647d103666648a5ca008af3e1d5cfa3b40ac10dd1e79b302b
+eff96c18bf92a086103a9aaa81e55d1af9fc36931952a736bdf7dc57354afcd6
+a964933bdb66423ea58edbf68618cd5ae35ec562f343c5915df0551e54888e29
+5c86cf31506cd44e8b3224db4aa472bd23bf94e1384078713baf280093460a52
+fd49cec5c2c29d91bf98064e53137575260c5867e73dd117e814a1b2aff8c497
+406a5dc5ded79cbe50fd30846c34d7841a850bd3fe132bebd9852d9b2f1d7726
+559e1cdd292bdac58eed6ae15d3f17b4ad0cdde87b584b190675d27b5fe5d0d4
+71f3040390f6d65937c6d83dc34ada9dcb8b2b401cb1e5396505d0af8c33f113
+518912b0b959f3c2e8d208e1ff28951f403400ad78ac0e4e1456fe9af63303da
+adb9fbc8e99ed0a02d960e54c39b3c27e58198d01e358b2336a4be0eb99ec566
+73d45d79e6706c7304c6982d64c00432335da50233fdd28d4dd03851cb8aee4f
+523bc43b61f26affdac9bbd7305d389f508b35072c30be43147727dad9199881
+c7044b0abecc5c64d7d3f13aad67177d34237ab9f8cd77893758e13619efbb0b
+67315237f63312eab8e1ee1e5a594ed963326bd2c6d54c50b8ee10538b4fec25
+16d138109d2d48849e015934d7e32a192ce4abe5156402c3ee8a3a5d502ce829
+d40b9c801b78c024fae15b5fb88c7ac33028235330da644482c0a22ad5444ed1
+0f69b227de49da59eac7aefcb4ee7dc0b5d1d1aeb6394ae1e0d9e130c1b1cafc
+10787eb5aeebc4e7235e6f5b1a991ee9a4cf0c0439025eafb59959c32604a640
+e9007f46f9136026d058b594b796e6747ac3cb6b14eb61a1d03dcf87f05f4edf
+e1c6c0dbf6c0618f2ba9d1a690cc811c28033815c699441ac4055e7cdd9d2b91
+b631f7c3ef32648d2ca927186872cf2fa646630d4eca09162ae9fbb00d1ce3c6
+585e4cdaa971d4b7d4ae0d5f8db5da74ad58fcc9e3378e7b2d4ca0036fb50611
+c98fcd020027cbe5faf311ac7a05af6039843af9fc3b830e0a2cea945eea5396
+a5dc74a465a0b6560b6663ac69e867925fb1a69cb553aef3dbc53d8a631e87b0
+0d48619e77de39aaed7dcb68a7a4108ce2225010964fc08660d54d73064d7cc9
+c7c6a2d12d7f5898280324a90128e4d0730ff35e7b93bbd350669297a6214df5
+6a775a5b7e73be6a972896e05d423f9e9798622b632d215812e911a93bdb0ad1
+3c5f628c4ac5704cddf78d3272fb1225bd4e12713557a403da937ea52d193726
+dc8178766f4e739d2e95f14939270b6507f35d83e1fad6c821ea1dcb5eb2a3cd
+be3870ece243b7f406cd6b5cb1caddb1b98c32ecdaabe8672dabb042cdecc286
+9e895eb6fe13df2abd25e66acdf07d402998dc54815386a3956cf36458234147
+c90a39e7101e4bf2186153c63ce96f3f34499ae1e1c234a3357ca2ce163106d7
+94083eb36aaa93e85e1676cd94259e173fb6ac65d133b16bd1314b259315c462
+56f294e37c763c5f16af239738efcedc3a6bdf8dd79b34775709ba54296899fb
+e9a316485274ed8363da0329ad0f41c62cdf48d7a25ed45ac95b5e6a4e1bbac5
+6da304edcf14c008e3f0d306c7f845b87ba80db258ba7881695209352f41d78d
+316017371a32fcd84bf788b511afe571f71e217c0dce3e04ab749d4596d0d340
+87540d4730c013796215caa073a1b99733cb7121a44e22e4fc2b1c052798acae
+0f086dba8eae791662949a26eb35613cba94ac58e47f4b7b953ef9913dd2c535
+37da9c1cce1474632288903c95bf7bab47f056b62d11401abc85b20b66d0ce72
+545566f9bf44f5cfa099b66ca02a728afb9877021ddf05c1245849dc6b6816ea
+b3cce3e604f604cc7cad40b2c919df5c92b356e0b81f6738a8dd7469a1015a4d
+6c5c6decb0c3eae39b7b3fcfd482d53ce5c171c73e23aa44ad41c062e8c7857d
+e8b56561cdcad550c6453c755e3e081273763f4e68233213a4059f6363f55741
+973356725ead4dc6398d1d6409ca8d49cc901f6e9958974a7ee5c02f9c426f11
+f29b54c316daa3f1d66e0c9ef73624aa70d23c0f15448cd295589bc2915a6a6d
+616d77134382687be88b7c1b9c63c0e695de5487a5a5162411b8218b1174f035
+216716b67f01661902287ae5b384b916d2c1682e2a0664600ce5e494f13ee820
+4b267bf8e863072bc11bb5e4506167ede7aba31f58e468d3f60cf5bd5a2a8721
+018ff213e5c84f672f6f2e651c4708a4f24c0302dcce4614233ac6f540ead177
+7a1155534ea0b6acf7dfebc0c6dc49fc9692951f587cb8c1cf3293328df7655a
+d82a144d193cf8b9a274d27c22dde2358ddaf79400a7977a1917fa10f445eaa6
+260ea56720e322abeeb790731031a345c323b9e2e220e9e9fd0d121475c6a7f2
+464252ed44f00d02181f1a5814d682f28c692f969db1d834227cd4b539539ffa
+46be32ad1ca3c9b4b337c64d3e61fa5a6d7dc29345a44d0470e564ad61cece8b
+37595d7eb3c0933457be8f73758d8d6f38b3e843c8d049103f5193b0e855d5c2
+df1092085c80154c50fa825254dc1b8a895e0bf3f681c2575bbb2b49e64a3c3e
+77794024051769ca5903cbb11fd3333656c4eb07d1d366d656467df392bdb9b9
+373e38deb2d83a9eddcb2699116e15b9d0da679aae82655eb917986e768788c6
+279d5559bb5b104b829164cce27896027913105aedc252cd0bc68032feb026c4
+1792df669bdb1d4bd94aea620cfef970e8756b258fa82a9eb86af25b6de4e5e4
+8b0bab5d552326d8c0e6c57783935d7f0cd66c078722682bde80af3645d4a9a7
+ef9aab474929c1749186c309347db0a5020865337542550397b2020dc666b333
+9ba495f358ab8d0adafcc5a3cf7014ac94b635e2ba1779bd0c44aac60cf3fa4f
+ecafdc876bbb528cafaf4f577266ed00509dfdc52aef8ece25912c04b8283f6d
+a8cbf712d5df4bed83702a76ab73d0adc789924a600c1b00761b986bd668b6db
+3de4008316053ec633300ee2e3ef9d0ccd3e2e5ed6a829ca814c8d127dc6f618
+d6165639c5ceadc8ff161f081a019def0f888ec6ccf12b69502a4ac2e802546e
+52600c91d51e70bd891c5ba957ed3951d84aa76f6d2a1a7198965409f1ee699c
+08694d9852f4a97839956d8060dd6004b0df827d6daf19325ffacf8773f5a14d
+b92eeb033282a681b443b54f242016dac22ca7388fb8d00dead2af7f39fd58b6
+f109bcbf96c58e46982148c86ca3bdbf8b61e8164b08f992744c67c636164fd6
+2d68c25016e9c672edbd444e058d3cd9154ae39993f1d5f319d58991f9bcb03b
+34910a12bbb597c3f871244561495f5d94b92f3c6b5e1ea0254c7f989e033eb0
+de0beae9676efb0d75ca0ec0fd07757bae8caff29bf2e1c0098e6d0843a2bfa3
+1031b383ebf4d12c07f1e3caee0397f7528ce5eb04c595358875d2872f19cd45
+7b41ac5dafcaecf120b2b11c0f3e927366e7a73bb033845eddabc9c62e373117
+de6a7e7d6895b6e6972d6c36634d46d55e0070e82f96ec375ffebce8a4e09818
+11328206eb0f4b66e0a8087d0145c1d10c49710c3fce4a5239df90d0ac21a0b1
+04d2505f7b5243dc96d4912c9dee3be9dcbfd9f7c2a9c8886dee4c41c58e9ad4
+71836d2e48f5ea7b0fb04ff6d2ba7b8e78ae70c765b11939aab939ec9b9a025c
+f27923c7bd0455bb858ac6f74baae573b066943598c3eeafc7f1bfa1b0e5fdad
+cc763c0badde7dd314d186b413216fc35ace73311dcf84d0faec0dfb9483eec8
+895fb678dd36d56618c3b125f7ff3b20f7bb8dbd86f52ebb08bad2a73ed6c940
+44706ff7ff263b0dae915e78cb36345989ccf84063ce6047e93a2acbaa983182
+db3ba114d80fecaabd2816ebefcaf0dc6eb42fb47b3d2318fd557cf96eb5201b
+b0b265bbb77da6922fbf9184afe896b88738ab3f9ec78e711e418275b101f8da
+be795d094d3b2c5f1c5e01da37b4e5976cdfb56fb459c8611ab2cc9081863e48
+eb4515035709f715f99fd62abc2e495cc8d4f8a1becb35d2126ffb08594ff4af
+bb82f793854d96a50ff37c24d198f533c348f657ec4726ffb648522893cc36df
+d25665df44ff0d6465ab46691fd9445cd3290cf2455618cc3a52d8056f179be5
+649a1b17bf25108f9b5b5a3eeeb22d970d968e25e20c5d4e503ece7bebbbe696
+465191dac3046b7dcd8c3824836bc6ace208dd60982451731e82aa0e85b2c6b0
+af9b9b14848146b09c64abbd9625f7a3bd7b5ee015c8f5edb3755b6356c37301
+18bd9f49bf060984259ae5d7fc6f3ba6f3ca2223e0782444bcbf911885a0dc77
+65d705146b91ebbe0cab032ca8336ce9133136ebe740d0a126f12f43b76fbd35
+4c09f5a66e3bd1c295a6034187e0ba7f916670b840f146d4681d43e9ce18387d
+70f44aee7ae7bfebcf588759213263a8a7c4c3fb7c31e890f285f502c5e88963
+964556caeac1f31b8975a9537e40c010380042359200b4a951a9effbaf6fcb28
+1fedcd940e10ceee8f3428f1e00eb8b1626ddc9c6554a8a7ef2e87319f3c532e
+afba30b322cc358c2ede14a5aff1ff1f835963929a3f396361b714f352133a81
+406515004549a91a192127406bb9f7a61536f16b6e2b51dfddcf0f31ea338259
+a0ba5126d1459dab06c8ea7d88816b2a750b4e4c6c45109cc8f0944f4a42371f
+383a585be96f72ad5884e8337582329971407ac1e6fa94d7faf980550004be9d
+a86af226e74b6b87ce02bc9949e3edddcfe0eaaedf502e649122829a4b5a0a96
+baf1aeecb528b092ba289cbe641e2775bd74434cd3915082c4a36a898d2a0347
+6a639cb3665b8621c9ca4b633e7b5e7fb699c39d2fa9583aaa000b1b3520661f
+398e43ff8ac75221bb92a5a19ba43def0c89b9ac73f936babf0c930cf3f22eae
+373a4c86e6356973490e17ce7163ae33583588d7b7d7e9d3ce84d68ef9c0b524
+8f14be69001dbf85b887e902b37813eaed85fd1b8610e2e964455bd3525f1e99
+c8bec17ae486775dcc124b4a3f2acbf05d6a73146ff4bd922a07022d09cbde83
+5c4dc2588db5720f6d73829b6fe92e592679efd487ec842be2a87a503d88d397
+36bef70dab7684f29558b85bc5ec75db196967063d4ea3942d18b6bb4842202e
+2ec18bff6a32a85a82f16342f1c8c2ad3e0cb12d4e61c7ac250f481725256c8c
+c7b29e35caabe5a130fe0c917b568453805ce48c7822f8323b7b6bde5450065e
+a4a1a6c2c11adc940d1dd15fbadab619b677fa1710eb86cf4d7d7b0c543bd182
+5cf7a30310c18c874c8040e10addd57de7c326253c2a9f550bce08565de02526
+e0f014a504529dec9086aa674b94c1e0786982849905fda956a2f85fe487163c
+c68a363c2d44a3300c0364d66824f31dd0f11ef7fa7553cc42fd8961baeecaa0
+edbd70d3f34363147328b558f8247baad15c994d33fa696af72ac2a0c8347179
+b041645dc46262a64d3983c46a3b460295b6afd8bb2de931bdb27a2e94f23553
+f1f87c2d47b88755575e09f50499d1cd6387c16c11399a6b4bac761e80b97370
+0d4d8e3d599119446c9de410e33aa6d5925e8c4947533bb2709b9b1d4d0b96e7
+4012b9cb27a8e1391ef72870058850227748afbbc55a03a79390b98aafc2869b
+fbc9ad0d171ab701befe311c559b3865fc0c1055b3e8e881a69fa630efc7a431
+75af2b55c9dee9bff2beae961861e45773e9e37735859983b9603008de8d569f
+a9a19016c9d9f101f64c345a4ed17113dc187584c1ac1cb7577927847793c8f7
+0c544d329a753aaf47aaeb5e6550777080224c57fa44a44ce4b16f7ab6a3fe74
+368f6c2d0f8df4f3ce6b762e43645ab0996894b358861c4927c45fc1cfffb7a7
+52cf9ba3966f53f00a3b26a394bf92094d579552f79ef2531e375876e52a88dd
+8222317318357ffe48d43a58229a93e7d6113dd47043efb48c85714ac19da484
+08000c866b7675813786229a16e5789f73c1c16b876a790913dd2cfcf92f9c5c
+31a33eaad8f368d6531c06ce189e07e9f1cd61aaaa3f8291a61311481e5ebf9b
+a45feebff7bd242fe2f018aafb62a4188435c46fe68a7ab09aa8c16b2fca9892
+0b9a2d7148603cb336fbd6b08eaaddb6eeeaf325d25c50f726379d9de1618c36
+d2a1034a29fa981b94220d711e6ba5dcb5ce7ea16d7ea03cbeefba5dc585e5f8
+bc032ff17febb2879e61c079f9b90d0a0b6eb537480000352a63ed828370467a
+c526f861c5cfc6e53e9a83077509573239c1d5a349fd53638689132f831ba29d
+9963a7497c2bbe933fb653110aabad3629e31a7cb3d6d3875b45b7bb8f62d740
+5a6ecde413d365ed05e7de1d2c95d46783a8be9d1b61f24191a1119078283800
+deb44a0cd447d47581972001497fd5d9972541b6ba2ca719a8177feef3a19097
+20f082c42a5de8a071e16e1bc181e34ad5018131127fbbcda2a9ce8b9f5eb83c
+c59c96bf0562e6916be9d99779d8d5294a04aa19d8dc839caa42f48f770f60e9
+18c593242436bd1dceebcd354f77e462fc249037b0fff2ee093a799010800ea4
+8da10c23b02dc20f3c3682b32bce8d7073c13f20ac232a6a42a4a0b5e995b197
+1fdf05dbe37aacc0ef62364c466817274496cbc8686650d480054a10c8105ee4
+47e2347c5cca657dc944fecdec1616cfb16ba4442d08d7f6b8cc69b38fa05211
+3213e8ba2990bbe7e3836c167d2c8fb126fb7cfbbbb28d33058c595cc6a16d6f
+e84babe05ccb4bce0b62193e337e8da5320f29f752f03a92cd843a99bc7a1e8e
+b449b0c95dca19b9ed1861812c7ed1f2ac7294d227358a5da798d7dd314a601a
+3bbed33797c6d571e9cef4a29fc421d2b7db70a7e92ebf91ee50f0ecf2ff63c7
+38a713d1b6d1c542d5c6d95fa4e9fd16f4d219ca943317baab091d2021ebff72
+0a5a81cdcbf5f3bfa3a633d16f4560cd3cf9bc1df7ea6504a3e3b9377e9869e3
+e149ab6fea0f80287c4fb26cc5ca6927f5219a8379c58450b7525bf017d72f4c
+b5611169c7d001fb816109b334060b0f2913bdeaea69ff36286c8fee4bf2cc7c
+83505fc4b7dcb29ac97b3682c48525e038e5d1274a069858e5505dc932c5634e
+fd115e02d0343b75907fe80d7d8d421ce40ca292140e0c0f3d79161c618981cb
+ccc0f9c4545942dfa182bdd45dbc71b8ea1d79f1ef51fa88d64247d4d2d3fb02
+f4d908ffd1a763d1383f7f54606269c4a0a6c8c82a01f8a40951dd141e4833d9
+7142aaa9b0a7e1c28dc578faaf9926cefdafaf084d50573395633ee6097b2c8a
+e70a16f3191405adb7cda9ab344d0872482f6db9969cda14b7e70821b16b0393
+a0431332b925e11f44882286eead545c0854cd41be75391e2a537f12c1826bee
+fb1e13a9e40995e2c20c3e330c993fc40df42e4c8d9f09dbe4f5f4476bc6addd
+0377ff3cd6a5f1fd26b5c23744555720cd7902f34407fc6f57fb83cb095a8703
+c9d70c96c50fb522affda15ac3ed668a70be3e1038125f57edb83c4a8e520747
+370b6131f6446eed8f68177b4d3a06333544969d04bc2ef75b891b943a89e011
+e078d01940caa9e1d4010670dfb80b1847bcf9578a6b6bfad675b65b31f8b075
+08ae31e6d3a26680b9cf228bf61514496fc2c7a2cf0a635be96383466226faf7
+a8c3570b3c55a009aa091fa99f71f8a4e82833428ae5cf0c5a585da9dac86a3e
+faf1c6c31fc7fbe4395a58b193311f67bbe598f88ad884a5381f82498aa3a2f9
+448f50a604d9db2c1f88b47aa783a82d6d0d45b2334b4ff48c8dc810751fe68d
+b2f04324562caa35c19a80ff56911399f5abeb971b982745efbd7b10edce63b5
+e490925781673def91f3329107936028e85f1f633791181217e239a2d4dfca97
+171812d2614131d19115eaac6550184f973d439d723f2c6b80a5678efd9fe5fb
+2526505ae8968700b352599b1bd964ef8391b3380e90e8febad06e4545c01017
+14bb2784abd7bd7ed8fff02a028767a781a57e1ff6543e996da730610fd00026
+3ea263f3c46d9844f4ea67c39701fc39e54b9f7316af609b22171c743e7e2fd2
+aac70ffaf84692b1d25735e95e45699a5e15a86a7ce7bfb7c51468c09d239a51
+45802559023de368135b52f4f299a4a3272c3969de888202bc1e99d1990d2aa3
+96a0e2230c6d2494e02ad04e8697e61e0b9420cc90bc0fb687aa27f85929fbcc
+f6484d047c785284c777bc07f1c7f558fdc170fb0495d1fc65a50a33a06a061d
+718391e14deb33fd37e7d27e47b8f3c9dde4bfe43866450e86105746d10cdfb1
+1e1714a0b78158517aad1eaa5847b37208dff3bf319d87184b82a18ed20d07b0
+ec25a1d278bc3840614953c1219add7c21998a6be45126eb61d87bfd5d1aef28
+7ff4b2724025db64ab552c28f0cddd89a04beb667988cfd5adc8f7b1ee091086
+c2b31a30a9bf56b671c81fe10db4214fe93f3d80bc6b0e90410e123b17fa0d41
+e5cbd5355c41bb9579e1ec93177d3f6ae798df9f70f9dcc6b541d5f4b3c6bd69
+83cc692c4448f91a730bae1f278d700c45a5ac32c6d5bda96aea73c95ba417a5
+5ad76fbb2c2a47c9896efd54cb4f178fda187dffaf47c89d5541c6ec74bb505c
+38c34cfe95faafb26eb9d1bcfcda8fc0617da52939ed4dc5b7616691a7188585
+8de6b6cb6f6f742b4a61836d6ccf60775aa0c5ef3bbf7b007f4e2053b4cab7f2
+23c96418426367fc5a833fd2b1a388f3352c8b390ce596b9caa79b9d77ca2020
+41550303c76625b527b29f0446e1e18b93abd527d537d927b9eb1f403c306b9c
+c3003ce36eca033b7655eac10b1c2ac5fe0774574d3bb4718039e498dfb06e92
+2e3ca571282388bade3e55cbd711c20a93fe24bfb1ebe38f0cf7e1627cf8fd3c
+d0be08d8cb4ad52bdc53587bbdb53362d31e8b0cec96c7f0bada54a0bee96c1c
+40b1d8506913e7edc80983683481e8a3e7b049fd9549f422945ccd41b63953c0
+6702215dd8a1e466ff3e2e9b97f7a96df89d3078d5ad49af9480fc84bafd02d0
+6b61dd88963e9ac75b42dc9b255a1c20594ce1265ad4df4c485b3f73cc59a4ca
+767b5f026acb27a0c71bb2e92e1761744882dc892d4e53297921a27510f23873
+91bbc37710eb2589dd6ca1784043f4e5dc2f08a3e1b9dff5747f69b3a6bc2e14
+2257f3de54ef93c57001539dd6779fb97029e17b9ed9672ccdd7b0286a3339f4
+30b78bd1de5730f6c46faa5b7b4b6213c3bc8671839ba50da8ad0e47890ec3ba
+78d1bc128cfdbfd11d59d3292b277e65ff1bfb343f84becf9130107326e4043e
+514a01e05be59423c44cd4366268650173cf594316bd18f0081f10f72a665f6e
+0020b773a90493b5ddaca8adbfb488d5854d1591170347cb16eb4a426dbb7cac
+8576f074017d3d34d98c5d82e84d52071c910929e417412dc64d0f5ce06535fc
+94c62b61337c5b27f4ca50b4f516775ed8ccada4c3203917af8014d0e01f9f5c
+568fa7668c26ea9e085fbc736b2e7c607db5c0e983107283fcd701d025d4eb2e
+1efef45b9d2cf08827d53568598104724fd6f025c50c97d182218e939b92fbc9
+42fe6460ab63ce07f43189dd38745a93a9179dba460173bb3715b145b74680a9
+aaf104ab04b6b8c8f5803bc03458fbc3ac036bf4f48894248048f6a81dbd403f
+12c31ea4736d0dbca37d0f45a264af161accaa64e645d20fd10856b063f83b8d
+079863f4984840b937efacb021d47bc94b1cfb9dc183247d25397ce41fb861e0
+0c95fc77407d98932d08c42f2393c8b37ef6357fefd4d196c4bd6fbc414e18c4
+aaaf1e54feb3d81f6d5644eb5759ef5440207410464efabf54645132e798dc10
+b068258a3be66fdebf1c1d428d3381aea736336fec6e86b56f5a6143f74e8bdb
+62e0f9dc7b80323b3eabbec05d1bbd6676de2e2543cd37d6055e88074c4bebbe
+53ce30241b46f82f635a1833f41888af3771414bb943353ff865da76e25be7ec
+2bcea61a15f180552f98af07333fc03749598ae8f3d37916c33deb106a2c15f2
+1989350f1dc372c831fdd25d104e82f05b7a102256d9f8008e23942e3f9aabf8
+9d723bb624d0f60cf559cef6379e552911ba014f422801b50b15ab9fdf4b3311
+a2d79df0a820e262ee4140bef47ed964b1dc7fd55b81e00368fffbc63814e3c1
+46cf77833cce07d69c7f1dc7189171484ce5051817ae7bc7b980eae9a2b05022
+60b19176564e2d1ceb79cee1666ee85f29331554d11037c8a79a7d53948a300e
+b7344a824338cfe73480989a0318ff63a0428c8134a2c754e1f5394ec300bc62
+989d2c9fd52e76124ebbaa3576a735ea45a87d8442782a617e765ec3d3b48076
+a97a3127effd10e46accd9947728a362fb83f8718b98331f9b84df8c270f7efd
+f2758c8660c1c0f7c570d86fe15bdec1d91cf8c1a417c9386e09c548bb401ec4
+db99ef40ca62cfd7a0e09fe111c4c72674254b5ae6e778dea51ac7e298ed7072
+7d0b85c0fe154538a90c7ecb7e1bebcae32f2db9016a00a6e3bf5a103efdb3fe
+8b0212049f9d79f95ed645ad3d53658f1e0ad84237d3fef48579cd86a76bae26
+eedc5dfdc3ed94c434903a6aa1706dc18b91e782b0f31dbd64358d6ae7edb7e8
+39dc973ca173c564c92ff13e56dc206415198dea13dcf9cb8a67af542efac923
+369061a76351da95da7e2e95fe0e245ad0671dbda13efca30a654c37320b4d2e
+7cc9699c634d129622df340923b7eca09e7b5961bb33ecb62c85591365a70b93
+ceaed2c7cc0339799783c1047df648349d9c800bae1443589f423ea385798b3c
+7bcc72cebcfd2bf1731a488365e50280ed9603b4c51931f91920df1a96bf62c4
+8282e4046baeced383604f06e310d9cea008ad5765d374f854fb5fc4ba116d73
+2439b37d8e391db3f4cfb4980fd6747d3e86aa425a5b4ede03674f404026a74b
+61940470546d80f7aefa98482cac4d8880aaa329129aae1831c26f91989901f6
+72b414ea6dc7d8468d112521f57ca320dc8cd56c9023c496cfef9588778d66b3
+79c1ae217e9b4706be2c7bc85ce7e98c7c58189f994450ac8ed2d2b153aec4ec
+ef5e8c68866d27e2e77b7760c8911753cbce4994eb7ce82e6b73e3e3567e2ca4
+4fe75a109a4276a6e7abb0dbd00b48318bbbdca6a7d7dea749995868aba5a1fe
+50ba244cd047fab144d67378e0b21a5f39231e7cc4ab9cf010432ac20ee61599
+34fa8142a2166266d0d192a502790ae0af11ecf3c94c17ecd26182d6a2a45bf7
+85e3abc677487bc20d52eaa378ac3088706d9b19d7a52efb495e34e605c00597
+faa503dabff584127c2a479075f89497cd7a2d54d02329b81d01c900d18f80ba
+46d4f7e8a464cbe141ad02a64951a2927c8fe8f155cd6fa4ff3a44412a59db72
+b74499d0b52486f55672f075ca1944073cff76df0ea2bf64f534bd3ea581e956
+e102bca1029ea246b1f08731ec931f1c0737cb931279bd51e31f83094d47ac55
+d969f50def8c9a2bdb3e340710c2c1337986beb1e032fb9bebf692a5a42dec22
+24befc772b8641e0de28e4fd6271decdb95156908b4a53e92f732888ccca9650
+a5496641ba0673f9a10c2e8c544e76d33e84d1d2cdcaa23fd55bcc7e2969ec01
+c009f0f7f834796bccd863b7f1528c13ff1c499e6dd8bb4ba671dec515fc9ec0
+81bdfd97a96311893af9e102a1ae63a96bc22a2e8a2acdcf082bcba6482285e0
+bb744c99a227a18179e661f63be26e242b3e0b0fd2ffa982a1c4e7f051a66204
+c13a59e66833ce590439c9f26356c74765bc0cf209c1d89e2893f017bae39ff7
+f01d79ed9a99a43a3f6259abc9822bb01ba93eaf77d03cbdc5075860ed4bcea4
+378285716de824c71cbf033015522ab3e741aec821747bd635bada9dc243e58c
+f4d8010383774f9f3a8d75bd5b9b8adb3ba2ae89772743fbb4713c46c30168bd
+aecbeff476e0c2e6ba174f9301df9b295bb213d3a733e4b5d82d24fe579dd73d
+87d647aa7cc0bb6ad46e4ff01d1bd6b8a8eaa59855e73a6e6a0a9a800842f7fd
+86748489e1b52a597f23220e6b1da30a92df4eeeed744f56b5ed811292d9c831
+1863ccccd7672ccf160851630b01f805c77893ddd70307d3cadf4e259d25dc37
+5c0f89cb28b082f9ed1b8d61e52f01b7f66e401d318db7a93943c78e47886af2
+56611c91c11e628f9aa71f7553370a97d2766baad7f9e74a1457fba25b6a2ed0
+750694da50f77e4b3dfbf38af5983499046732bce1cb3f435626de6a7b8e46b5
+04a80d1ef0ebd4ed0780b0ebfd8c792cea07d2f1b7e2a63a104088b87da1e620
+29c2741c5de63cfd9d12b4c5212ed7022b5eccb7df7faf85e1d5c4b82ec55795
+de8fa1e4654b594b83069e0692fc4954e6d0d3fe94cb574fac65ce4ed497386b
+16304392ea2defd78c6a96bb53bbac50ef7ac097ac45a902b39cc3be09d98f61
+2897ad7d1325af2ae4cc80716ba062243ac48dd0d90d86de3c88b16b4281d009
+08be72525f69b7b286fe28253c4be746976cec1de175b3aae41f3e56af915a04
+7dd0cdc064623e453db8123d652ceee41b60ee7db30d96ed641ccbdd70570c54
+82a169f1b9eac1e410b693301c0dd765afce2af327825cac271aeb79a9ff4691
+830517e26d4682dc30b60ab2555b39471ccb6f38ae631e7e1ef89fcd1847a242
+06592ff50bfc47c434142997a4b682da77300bd19d65af7d2b83dbda5b95903f
+220d1a2d90a19819607c481fecb5921de9099a60150a1ceb1a7723ce8b182897
+14c1c181343ec220b929336bb2f35056706dc481164f581bfb8b9492b4a93a76
+f4227de34613379b40d8682d58f56419b7b4fcebb75e58d4d17bc1bdcc114b9e
+9aa0ce37136b2d92312a40643559a8c8a2de53af09cf1bf9f978aea6ca80547e
+dc97a08a8677bdb27a599dc6027bcb2060274f5034af37c15d737307bed56099
+8df21be030b0e57c4d03e2cb2e3de42daa26ba760ea7279815e6175a6e98e496
+618cb4bcc6c071dc2cd94774b5dbc0f912a7aa808e8f4e92585d0a1bebf22596
+82257ec17a792283dfaafe2e93bd4bdd75c1bc2190454b2da333a335cdd0dcec
+6561b83cf0ccc9ac09e3b0b1e2e108f14b500358f8fba4a4c3fc05deeffdd4f8
+bf2d0cadd592f37933aeefb253c717ede98b3c870464382f1d97043a039e6202
+4ceb9e25a50834e1134b4c553442b5d4e763b2f833d494ff6f4f5fedd022066a
+c62c41d32bac09cc0faa9f00cea1ad21ffd7b62580d6e4973ef82a0a88a94ba3
+481cfc5541b1ac68e633e53823abe38df4bc11da9e41b6bfa4671082cd0fa20d
+d5aea26151a947f7345c69bdad50c344ebd7d52c13f0abb42669724bd7dcace8
+01a3727f02b2a9c7452c890425f74ec7a473b2f6cddb89fc02063349096616f0
+975b3f1360ffa5162b577d556c21c1465b997795313db5ad01a059d074d5186e
+5a039181aeb9281717d9fc71f2ae7c423303317f66d2c145a432d40ea79b0cb5
+eb426a4dbc2548439630bd49c09c3ac56aa8c857658bbe3c345cdbe60786dc1b
+aaeea1e8134c053bff0239c3b22d9f9811f0f986d34b10ebad0603b099e61a27
+f5da9d88b88c435ed87c4906de206849f5b4427ee0439ce2c99b3e52eb634ab5
+287abb15154d08932c6c360d85030a92bf8dcecad523c123c7d992f742823af4
+95a83c4fb38407e87946bedfc719cc3998d3487589d773ac6da3078b06cd5ecf
+77ffb84a96cd2cca241b84a0d35b0b340dff221b9190c1aa2d6ada767a0cfe14
+7e3428cad1c93da6f3a01f821c6a410cf69fd03a2e46f17a31df33af3fe25492
+c6ee8dfe79ffb29561f92f50c69b6fb2ee2841ff6e3723e18f86fa65ceb3bc0d
+61e2f19e9962320aa05e82ba9ec7fa6dda9edb2eadee478c2da6951a226ebef7
+b2fdfdea854e541a449db75700f057179623c32027ca181b1c8dd6d83ebb8bda
+521d637b32d7bb0900135f61d72bfc97aad5cd3a2aff218547cb96386023d3fb
+9a0b86d9ab93acdae4f4eb855735357b77a24ec5ed31811feaaa2f93d6e4ce51
+2c9fe4830743bd3082f52ba17e2a4cceb5bfd2c31099d852bc1d1d1d4ce92c95
+b1868a8fd559e2950a55a8dd30adb1f0aa7b40c900642e56c958764b81334ad2
+5386c2b94732865805b994b5e9949b7b59fa4e9e27cde175106e944d0466fdb0
+85a73fc4d329efc235f368515bf6a5e9460c9e997ccde7bb4691aa903911e9a4
+14fc8fea294185f8d8d80a2a1359f9707121661201a72e571810f9cdcf792c05
+ab01ae9c0916be2070c264b0baf34f63d78df7cefd0abefca77639bf25c32fbc
+143a000e2cb1fba326deca8b32671af989df004e1f355b4faf7323da6cdedd69
+1c73f44cd381644c8d6987161b3a5ed5a36cb698f94970a472a32da1ebc8074d
+e29a2d9967f7f3e656db600eb06daa0778478ab53b653d19cbc096e39945331e
+0d325d2667226e85f7d5e3442e70ab51c294b8eb95edb631cccf964fb8fdb8f2
+83d6dc2150b8c1c31f7a6b2990cff2dad2cce88d8982c4f01da6f41b271f4d43
+4ecea79d6a7c3408d986dad00d2173d387277e35095513a67dff237c7d92b745
+f0ecf708b72515cb9b695e73b321247a08834d084600b3eb7707b9f42cff1205
+814c1d788e3ba40d49b97f15df97173f17918d3e4da33485081791990389e2ee
+7350ec14e7d2311d7eaa03718035babf963053ec12e427a0e503f8d0aaef29af
+ab22a7ba4410cd40626c21d29eee1b4c5b632d68859d314670891f87f097e293
+80a0a248dd3c0d940f119bab3a42a4d5d62990a03d2dee622e14de8ed1939658
+4db30c49e896782cf4e451269bfcc00f5525b1ad733c068798f41579ca6a6ccd
+3aebe7de7bbc0739b45cd693227933d8f36ffdebb558894780fdd8c2f58dec0a
+d78ed417b05e089bf1c3c9fc389787a1f510b7c8f103b2ff8fcfa06aaa41cb22
+68939a1649976475b1b3c90d2a69d30ef7d1b800c8fe250fb605f04fba577776
+0cdff81066d7a7703574b0407eb78953dc8a21ea0864324e65c75060fc889f0a
+a8d26a6342364972e530cb822ab91393e298075263a6f2f31c2cced33c217aa4
+1b15e0acab0f88706b40b1bc490d9304f588c2df3331b47af241d0136216a1fd
+8869ee2ca67aa0b9f3e0920f815ed5f91bfb5b3701402ccdf990d0111254cd40
+00edc94f1960d511583f82f28f71c30eb44e1366f83f98b8ce38bc0a620b07b4
+9a0776d358f6e3d3ef6f145dff0158fd839583401753fff11cc7752ca1813ce2
+8d9266aa71bc27a6cdb2c3ea9bf486e4ce62a112c65f44649d7bd68d8b1d182b
+1b7d25cbee30bb6c56bf8fe290fb44946c5c7c5561d6c24e97137e915449ca81
+ade634ff781cb95ac4c43ee88c6c8bb0a5fdff6d0bbbfcd5801885b1bb4f4276
+1b6f2c117bb90058466bebc36ba78a4d229352347715965ade47fdc175bdacf3
+1de2d37ea1106e0ef279da2d566e42f98fe6e5fde8e3a292da9b327541b7cfd5
+d60538874042da03b15ce640ee2d940ddfff12ef13580efd2efcac2e779b9eac
+3964ba7e6ca66e05cf3673c49a18e35df6c69f9c4ce16ead461bc5b09e9fc35d
+0d66dd4fb6d33066c8b15d6704a9890435742271ea33fb6ac8e5261c2d3db0d8
+84d4ed885d5d4635a4e4898be0eeffebfc0ba8a90bd92bee924078802ff82ff9
+afee85f3a4676be2300906b95000516056165942ccda64e891325dacd9b73750
+5039d2520897cc43d9d404c299a9ee3884704408417d64512d9a6a2afdabacf5
+6ba334c51a72fc247dc3a079e3133517055b607adc13703fee0dca0f3f8ddd59
+8656337980bf58f3ae667b81458d7d539bbea00ee1f0fbe756a22cf51817e7b0
+8a7e28d2acd83b912365aa69ec031c135a5160fcc55a5f9ef4d023c92c2f4598
+8899b1abbc1c8e957c2a416b1be6eb1bedc273b3cc91b1a220bc40b96463def9
+58bbe5b6e685b472e81a125263816fe2e4165960b7851ea8f65cf61aaaf130c1
+04ab6c86ef0493d806386e889630fbf6ad9614041d92d35b5f788b63ee458ee2
+c6e3c06c60cd1f884ad3b1455043757e32e0a35d910c2fa33ac3abefeab3616c
+3023179fd264c8d3155dc6c73901a109abc353d664fc19a09ba716398118c94b
+5cbdc6c23364cbfeec6410ad2712edaa9932769f4c369877a832359d078559d1
+be39204ad8b6324806ae945e18fe20f6a757a0470a2667bb7284a9fbf1b343e7
+26df689bf6d69574c6e63572e9532fb1e38bd046936d340c55eb8e14fe2e80b3
+a06d4b911c6b3e8333c36b676ae8986469295cde55929a1d1d767476cd47557e
+d438bec525de2d4b3f55ae52a6ff18d00d5a1e1abca167a7d8b6dd2c6bf23fb4
+ca20701c9869cb5e930156da33d3b2fcb70404c0df725d664deb78814e175035
+02639a8935dfe80b8809086195a7cc4c354bfcddf7798edab74522bf447f2d47
+52532fe58da8b5aa1c4484b50ce37678f001a6aa77edbc7f0e2ab2b65e9a4635
+92dddbf932a5141e9ca9f108abd76de7c6f73269fd00eb8211f3ce32b92b788c
+85933381308f912476ab352462ce1e1d98fb6eea4f690e0e036f3deca9cf1435
+1e24a41320b229df0600c764b7e09984e96501c18eeb9d8b9b6636bf3b6e7068
+581bcdd1def63429afb5aed8edd44646a6dfc56b4f82f49d5819cdef9a6f08c0
+6c559f07d3f09c2b5956acc01544800a24d0c22b00cbb1c06b119521b967cb62
+2981313c666afab4c96817c230807850620fe00bf98be25defb29670cbc61440
+90be418d8263c478d879bb5ef72eede7207cc7b2dea21957e9c476608abcbdee
+d50e7d58160952ebd4e840d604d28d68292c556dd79340bae75c318a9f0b2f64
+f3616c680235bd7d4470b7e440bc8b37f351780aac3d311ba51d56cb5267fa2c
+0c45354d73fd084635552bf78898e2be90f5d7daaf9353f58920a0fe0de56eed
+fdea94349d207f4a5fff48c14c6bfe03eb9b051d28bc950574fde10e2e5e7cc7
+b4d9282e005a2174c09c62adda2e15f87360d8c02030de0b16af093feed4c409
+b908426705ddae110aa3ed8b1093702d8a50c08c2358b932e9b98b0b6e7cbd13
+7b6b2aa51ca68df71980ef797fd483f8dea3e44357451e2b834dd0df380ad9eb
+e1a974f1dafde3620fffed6385b1132df572cb35c705614556bd07129c02909c
+2bcc8c5aa450e94eef375efd8f77c0a8750c45f45379af43a12f288ede4a0935
+8c67eccb2733446f2a7cd0adbc989b21d5afb11fccb57bb350a39c13b3970e90
+17ec4f1e0c2ab7fe6310a4345d1934fca54b386305f015ec87cc15910c323450
+e1cb60b5a8e0dab68412dafc511811d7fb2ca08d9338a85bfc050e171dda308d
+4e58c9695cc8cd6ae5b14e1e5c47fc30e2f38d11c6f4964fd16934a8ffea5726
+8e489a334d073fac76196db7b3c8c6d4eb1b21171ba9d711433dfeef3b7bc0a9
+a50751154d77ef7f6c6be0e35fd0d983a5c03bbb35b7afdf952a9a883500a80b
+da5f65cd7aaa71e5abef7260a089bb730a5dbdde0a86c1e1a8acaf76f998eb17
+55a0edfe1207c5692c992741e653480788accb3d8fea8ffafb73650ac8a8c349
+664e92a2a8de84125c75d6155bb6165aee20a0a8ac09ede3a1fb800f6fdf0b4b
+4214fa222a5cc6c41f7f7763891f5d578b6d989ee6fa56d8e0f77fb09acf241a
+88f5a24d4c08f569c4a305162247216455c4bf6e529128081b10f5cb09f748b8
+e264ed4adc3a950c5ffac368799c4c031ca888d31ce9386986222dc3688f1c22
+82dd221f7463ec3cfdde846512774cc9ee1b1a6a2091355b09a33d4ca8538237
+8e5babc5eb20b1883bbb71a6987aa178aa4dc2378a344b5c6c3e214314c9ff3b
+dad4563fbe133fd2faadc70b5e36ec6de0f2d757d49b51c623d42f148f31d730
+a0cf5953840e388b8c6f750e3dae0677a00f78cd81ec1a76dcf0833dab08f3f0
+17b60777617649f85149c20fd9b13dae3efe3e8f1c7b801c5ec0a4e2ece7cc00
+9453c80674657d535bf0dbd60e31a2e9361671ebbd8591034fc5d77951ca9abd
+342d1b3ef381ccd243f083b3ca5cd79053a4b1efe8a668b73e9295cb78a9ca0b
+6e90f22fdf826ed2561f5b4bd0e6d1acb2fccddbde5db08e82d9113eacb6260c
+fbe7af67407eb89e4f29b5669f0172c6e4b1cfb81fd7d28ff5167111b16ee4a3
+49d5ab9408be98a51aa4d17412f0d23f7678238bee914506ae72b470fb581a89
+8969eb6bb0137f9b38873cb5ecb0501e49dd3704719743a5ba4ec9bf5c7d3973
+557888428d30d2fd228127ed32b484096edb0c8adfcf6ffe8cd030f3d5410e62
+2fe54d615272a7bf503ac89d0ef3ace83754978673f9db3e005807e470ea5b55
+3649f61148d42e9e6fd19e4145980c7ecff2bbd8ef84b435e6562a920e88698f
+7d1105af11926cd6180d6179eeb68823d99392dc95a948e48f3533ff1c4b2026
+b5ea505db22a265d56441ab455024f4263c9ad36c3e25ce067a1937303f9f216
+186ac443d0909a4ae76915584bbef1f884c321fb823b724c58757e619ffaf201
+17e5d826afb62d2fb7a1e115429191c80aedecf84cc71ac9e7eceed3aaa33838
+861d5699440962f38db466528bcd883ad8385e5b8b9ae1fc891152ffede5c2b1
+39b1445e0da532a4c9d19662c7b9af3a158ed868f5b11d284d19c850ad79bfdc
+fc4b44ba68537b205420140e803a16eb78111fdbf1d89cd1efd2663e3e306245
+84a5e70d413f73cc1f9392610d0c4a9a0a3e4e32906a058d8bba062c94fcf4e1
+e402024efb1b7ff8379500d16fdd85b556002de62f78c827de10fc2550bf000d
+fe81b29747882b8cab4cd04acbd92f009ae3f79956996cdd6cf5006e200caf32
+e014fa4b4e67ec87f6b76741006fa43e17f11e0aba57592f481bfb8655bc3499
+2e8bc3d57ad02b4744e1cdbfa0a76c543bf214cb6c637eaf4a958b337665baf1
+b286b40fafd6d833d45b4feddf163bea2716d90ddb483f8978b5d92d8f78d13e
+9c24b1044543b289efe180f0dc7fffb90cb99f928458d36dfcaa18145b130d7b
+6b57be3f81244f6064b61f630af5e876c8847ac278dc25aa942b9b90b25916a2
+ce48a2f2546056f7d3c9e0f637b52eac424c3c7b838b279e9cd310a520be41ab
+8c7bde64af685340f44d0d5e4bf793da6d7fa368e9ccec9c933251e56bbecd77
+b0a3a4566dc074e2bd55ec1adead11e4ec91937c8924b7fa593b24ef32db66fe
+8b27d795c12db95404b2c66945a9c3124cacb24311fca2567b10ceec21e22667
+8925a85067442df6e02e21e10d6ac641da354c318ab4f244c1c2dee6af49732d
+3f390fe6ba7c84e415b35e390ee2037026c01e2fa69d1348871b867a37ac2bcb
+df84ebed1024ee8fed087491c8978051c47fc1ab12a4deacfa17797ded28d929
+e212172d3d8efc3b04f5d074ca57271e604ef5d0b9893a6dadf516fd75cb84f1
+237ec510567264b2f20ac77c21e0a623ca2e05f50bdc856d7352bb03dfde6a0d
+b16e1afe6d3b6cee4e695d985b7fba36d64365c231ffcbb8be40948810e8147d
+591bcf096bbf5d2b545c9945612f60869abcafb92fde6616b5f863e55568c7de
+c6b413edc7473bb35c6907607ab5fbc91ad25f4c38707f57d22902f2519f9a76
+338a0c3630d101e49f14089aefb0e8d6c735493560900542402938b467e8437a
+1089d9460027ca5851a788767167589784e55718d98528883657b4fa709f5451
+00d0cb2ea4213a44a337afd552b19c10e3f6dbd866444735570db480f037ef4d
+18edcefd8f6b14cdba58e3fbf75b469364d0e69c92b8ba3895207d8217c72fb2
+6238e3c231451712babcf6e08c08c637d319867554b4426341e315217fb93c65
+bac24552f95e6890b9dbe1bf7530d720e48e1df460eed718b0fadd1960eec4f2
+f72742a1b8fa8846c10f1201b22c0d79b8c77350226476d4ced87e7b67649c9e
+661066879ab9dea79eed6bb0fe1300a73fb3578c0628255273ae4cd379231e9c
+aef0f8b72bf778bf14731c68ee50c2a2f31e848447190c3e42b5889f1623e196
+bffc1d8dd1323067e075fe70b4c762ce5fd8aff0e4013f47c2e2ddfd06ad78f1
+63da5f4065a272d91f296e2665b219d6e88c094523116ac9440ec2f9b25ade7c
+5852659ddb699fd030656733c6d232a49e75d776a235c1a56ee2f8901707a40f
+5b36ac3c98fe021bd1f28dfa10327cdefa5f06b471e8967eac5172dbeff6ef9e
+bfe7d129e8f99830e4a12c100d6c5bef79114757ce26d8f0d67b95d9865c7a5d
+c91c7d542a2a908b2227ef0b78c7a2bd562a8d73f9c20728917082a2c8dcb321
+de1c8f89588908cfe1a5833bf444f8944088e8742635774796d8d4a0040bcd9c
+64ddab4db438402813b59edfa79dfe26afdc6a87093baeabae0c10305f70cea6
+5803702798df945f6f45ed221fc9c2537151d086e2df720b8c689c4df331edc3
+2abf9d322cad08e3c2c06921f3a2c9f7a13a4f51b184cb77a4e7aef35613740b
+2bff9401d1488fc671828fef4ee8ac4fdd247d6b778e5df06179b5bbb462f2a2
+e2976cb8794041897a65bc5a9e1c561dcc34c98db07947a416c302b8f20a8614
+572639459e1ea1e510a8f8432b78bc5d1e294d8f57dfc956ef227584d236d0f0
+70a2aea00d94e48110decd629db3727e5015bb0c99a794106d1145fd9fa8f407
+bf279f7b1762421b1f3a1437018efc9704121176e2185065901df20159eece5b
+808b749e7847b6ae9ea268f561b90f8f47abdb6528a21a714b749377a3350761
+08e9506decc618e42dfa4ee0abe77d1f771cdde50143913f0407023e19fa0cc7
+464e53218da799ffe7a232241f3debfc6f68bcdc45a73e264b675e3af587042e
+1e35b346de4c76875c656aafe366c9097edd12df958335cedf7e25a72755a888
+78fb21bde7a863797c2f0adf73d3dcd928971e1543c594cb1a3a5c364840f0b5
+780b764655fcf831285671b076f7eee0f1c6245e47917124a832ac008ef60825
+0c5220af5e833b6aae1038e9f7dc3c793c7c1aceca66b3c6b0377a4acf9e5aa9
+8fd729ae8ee375e831f507cee9975b130402b78d84a9d685625ad309d078bc2b
+645c48ec8503b02569bccf978689a6ad2e2e06c1978f10bdb20d2f828237df91
+cdce385991a328c94e0b556f4cb8987de3a2698c78eb2f2fef4e047292fe9832
+dfc6252ef732568e87aca6b40f113e45852b213bf6e3d1e822b61a34344b65b9
+c68246f682588eaa0dce7c1d1e6a3d3491c34f7df5b0a55da9a33f4d59b5ee49
+beae9267a4542c4bcf7d650e0b533db67074f7a889568dc8d55da631cfe65d1c
+305c2c49574e2358bbab65e298b46eecac4caf9c79c918ae18626cb6ea3ea5ab
+afd51c88faf8309e2cc5ea3bf72fa7931475882da87a9249cb713bd25ddd0f66
+c98e58dc0eece6bfc1d537f887887e3bf5f52aaa42254ceb85481732f4f22ad0
+c326321139e35d2066b859faf9179d497da1bccc88614d1482cbf349474dd848
+7cfa8ae04a47cc440f9c08b7916727fb9a48325d84de181acd84db1f8450c727
+92f4d2472826883094a0bd330e79d8e79aa7f0fb363d6f6432cf6b191877315f
+13b0bd9c5e0dac052685f04b7314f1578e14042e777ef6c7e49b4b1c4510d8a1
+e97ca72c77a81b757ad555437123f371534851fb922fb8ae6eb861d4cd4f14a0
+7cd933d97c711e58704ed2cc1313f4a899b401d7354709fcb8c5204a5144e100
+fd49513bc03eb616b83fcb488905bcfc751efe672ce1911cd55c48dc34e5922c
+1e300e2be75c97aafb6d2c7d8b2a27dfcbb59a512e6498af827fdcb3a7a3b572
+2ffd35467d2f4e23a1bc2af72efc4ed8d0e86e983e5e822f5d7479203e7032bd
+1ae7a3a7930850325a42b803552a3b00753eb9031c57185c5ee5b8a2c448555a
+91cb4522b8688d2a42c15eb2e1931fd963b2e10d09cbef03e4ebf90ff61976be
+720e07614b853195dee2ededf3f30c750deaeeebdaf86cdc35cf6bc8f05d7e9f
+35eef1e212b9c6ed696bb4673cd837a8fe736c883f042b0dd9f14beca6a1128b
+204c2b57cd58e90f046d8ce6ea694e1b71ba8baf7cf6c3346cf0dd5642676b4f
+f8b45cacdb4975d45edeade19a7d1970ad567e03cd0fa17222f638b873f60c0c
+085b714c18c6ec4ac1213946824452fca1d2e85febb6c071bc80cd3728cbd8b3
+8a85376914273c134b8b8327fd591c5960a0ccf823512e936452df7302d19275
+fd19ee696eac93d10b3bcfec333e1fdb77439eee7f7ba673be0edfa26c52b258
+4f6a61bd87fc89f3cf7b662fa8760e30a800aa7d85e94e57749dc6ed26927ae5
+4e1f84ede593601063711a345afc9ad2daefb924ad66c9cf7ef4d7613cffb79d
+e86fc6b5e378a0eea2c69df8bd80d3b34f5e126dafbc5030bf408fd0963e0949
+a537002f59dbc2180085f46bcf7fca9356dd630328b7eef27b7577ce3c168281
+3c4df17f86a68ca27e8309ecc6e6d580df9d6073704008714381148da19acb91
+ce6fd2afa781a092b881b1e75c4525e668ac8450949eb5b4e49ff38806574657
+d45062a294972c441f8c354413102002790c9d27fcccd3f98503d6cac0f9a41c
+4966a3899636a40dc223f07568ec42822a05afd80e10795b86b05529faca9c05
+f956766457dfaf48992084889d76195cf5e72e3f689a85fadede52d52fde8385
+0ded200b05377ff550e9a26ee3e976d275c25b536bf429efbbe8084c8908ced2
+7091434606e6f8f76b7407bebadb2bfeb03bbac919875c308ea1c32bd56c30a1
+f61bbd705a87d63f4709d39100257c05a0fe66cdfdd0234cfcb67fd999f88f87
+c13dabfe1e7e91db67b83a4a7f5033bcca4d9e3ad4979b1091ba749e595729ae
+ad79ccbe02adef217c049c29e05508a09cc4eefcc004610acd3f45849c631697
+68253242095addad40ec80726101b6d25a4e52e746a9f956906c32f2cb316777
+bfdf3a470df987b5228620332983f68625e7e32a9ca809f61e3c25983fe95987
+a2b032cba145d2a9a31236d26e4bd86d71ea16a0fd85b393f7e3e1ff5b6e418a
+25b54766aee0d8272bb2d3c85401e788cb75bd8d676acb121198afc3179dbcdc
+8281c914295fc4dee61d150bd8623011b495ab2350e0047dcbdf9a9db40a87c1
+fe9464ff6e95562572c61346b1a00f37c3f0333c81753cf4c5911e5e370c70ed
+bbb4626b53f9716a3b83d201957059546ed22831f5ba5ddf5eda421b3167e5c5
+8e4a5ab8437540334a3b3285c1a94a5e2c87fce09d00ef5db6ee78400f1f9c4f
+4cdaf7bb85e56677c02dd2b46281c64522aeb1bb1fc83907b4fedd6678ec11ee
+46dacfa31b048910cc6c9463bbcebf80ae98304ff2ee9d5c05418c667ce54354
+d66d0c61ad5c8825941523ce6800c2fd3cc05a9bab764f79369599d055085e00
+8d36906da59a1fe6d137605dd7707ad144285bcf31a6047978146b61a4dfdd01
+ed38e1888896f8b02f0bd89a57402a92107e626383323a5fb2e943316575bbfe
+b707007cecb0edf4afc52419fa8ac4f6076e1dea9cce97c3f1e60b2212c239de
+b4e71711ce691ad89c42074ad4c9b9917b40119dac1f9fbd5cb3e241e5aaa2cb
+ba248028a4ab8389fecf0ecbbbd9d0ab8450535f2f7c85c02db8c287f24ec8ee
+f67baa4a0eb50a8bbbaf0841f4a24558044a0e41b7fb390b6512aef6d7795222
+5f7bc00e6a6b3e5314fac779a9eb11b38d36facb40ec14e0d875640c90d9e856
+a5a88a273886288f14d44d0d9a8d4144827d587ee2cefed089d6979793051660
+c322890d382117f38e35e643808fd66e48b521a6eacc926b748c7070b6f3cbad
+f2a3dfe4e2706dbca9439ffaebf1522e180bc2876cf7f736698fa955fe1f036d
+145e3216487fb904045d5533e1b2c3be21e1a64e96bb132581bf0180b8e370ff
+a32192305d1075352f404f4e8e338ef2926e71118383a9b328f8e55a5a938c73
+7b7b771d6ef4f4d62d96d5bd1c64190fc6932ac6a91c92f267c502d3c1539b48
+c6e0c511e83b687c80a8d290702c26ed02a355ec420667a8f1ab2e201b814b51
+da7700c5fcbbf06c1de4b4feea2562d1cbaf47c4015b72aa22a9b6490e775d60
+f7b5fe4e7362c765a398b0c39b047cfc5ada1d8abd3efd2894221d1676f04e24
+fd10f66a7a185403caae0a233896a2ae721c0c74798ea526db2a13a419f60883
+d4524d068379bfa6effa715d8907e4729a99acf06d7e2348ec9277c295dcbf30
+879c2a7e7aed3bf984bd8a3b73cd518f8a4f612a179ad16b5c8e6fb0c8f21692
+c764a39fbe7421d2584c7542f9f3e2e76b1a8d81f57df2276e098df6f9a2bcaa
+f783708d5d966883d2bafd88416177a159c304091202f2518f31e512e24f467c
+67bc619bcfd5b889b0d83229b76ccc9db033745ca4aa2b7fa65e12421c95364b
+bec1082d2828ac196ed6340d9c90bb5f102678640d3481397c077ea83cdc3ee0
+927dc768113d2f4deafc9a6a982e129c5000ee2f5051829969719fbe96bb73ea
+c332ac4c81c52ba840c1be9cbe9c735639bd9cde6da5f0cc484b20ab18cd8235
+fd2d8eab0cd5a9fe4c276ad9af585aa519de92be8aaec2c7ba6185d7703c02c8
+2a829b02d2cfa16188f5e3ab80aaa4526dc74bf173abafd7104c6c8351f5f362
+84a3db9c28acd707fca8a97979607f4d6dae5b23e111639271f8ea152a6d56db
+dd6a6c33c962020393e13a23101899e3d2d3b1be77f23dfe1bc8bb2c56fe0f8a
+4ca063369a0efc593be649feeb516b5bfc6994ab38a75beab00afa4c406c2ef9
+a7f2533b5f766bf115a05ae0dd8bd4a0436cf2abb04354d54c82e3e706587cc9
+32f95a254041b036b14d249d49d7390593231facb2c2d80848e94b7700b06527
+4b833e2a22722ff90731aa0f47166fd4fd286d5315e01cbedef249c9b740278d
+2a4e183d1148433cc20cd3479d7ee981b0bde4f7f46470d9ee2b6cedc48b0d15
+81849271ebb8536f55b6712a7bed80f2550298b1f81f3aa70d39261a187d7e6f
+2097660de875cea28e5583f475fa4e26950853bf6fd5e9b9cee59c1371780054
+b2238f9e6c3c9f3b4a1411fbb89fa1fbcd3052d1893332063add912ca1489077
+9b988149bb9d4da1436a18891fc7f229c2f900fb6b272d55ba55e581f8d0630d
+8bb6c022d366dbe8b4238058873514e0df31d73920a720f6dca145fbef4d15c9
+411f5e0322cc61990a48f98a63f23793318c22d178734fbeacc04988901481e1
+ff62d5a8c7aec831ab49c4b5721f68f693e442cbb62d13017ded5011eaa71f41
+7707b7915b92e280d0a7fa0063d90ced947c82ffb0a01b962d2b1aecdfb1839d
+d0e8335124fe352593c9938b4f4ec21a4d04bba3a46826df0972c5d8401f6871
+5c7b4906a37608dbd3f630d8f3bb64247d8e198cdf8ab8f891e00aeddbd48263
+17227225811fe52a9de08976cefdb7d5e76db46941b9576e87dd6b400c64a256
+a134755011e3d4d27cb90eded548f91e1acd8ce08b7adc929c1a02b22d65f10b
+bed695d8fb1337f715c792b04d103632223040eecf2703e597fdf30a8c42d448
+82e73b2a1c0a73919df7a5cddf25b32afb51f2d24dc4dac2a747cba641fc6fe7
+ec4ecfdfe98bca936ec2819ff6016a17bdfb1c91d893ff861a67fb1ba168c5ef
+59f774d859741c6606d680b68b67563b965ef7cb98e162f307504fb77ba9b3c3
+4eba8e45e161f8977fcc6fc2f4c2a677d8caef269e49c9f2f9ff6a309b2c21e5
+c810df536db392cd1b7018dca670f0d484cb7b6ee50ea1bd158af5547dd96166
+da10d10acadeaa04eb9d144a0d13d7a8f80b3e505177b3cf9893396cab022350
+bc705ba65811a2c60fc9f0e6f044206dcf524323b5cbf547d13d54ee0e87f00a
+d5a4f507757cef3b458e792cdfbcc25339d8bf388ca94bfc341d76ab42cad16c
+3f37cb51c85fe91e387f8c1d84a03da897a699fb80b5de32c0573014ea558d71
+a0eb713c0499438120b4702176b39a69bbf930309a555173d8558e7df642a40d
+d506f2498136a5cb19bbdec74d7b436af3ae2fef171244fef9711a9ae983e452
+20f3154be125816f948bb0d93b9853ae68c77ab71a8df0d5df10e4d6b7cdff22
+c3be071f0e5dc4b82293025a27c4ff3cb5209ced6295fa9303b624737e0f3e8c
+b8ef7e39762c82c89627cf2e430aa0c339eee58b684ca7fa818dd90aeda2f85e
+0844963d933da431ff54348d7d9bd3159549650fa956e1395abd116aeed54518
+649290b0b1f54950529f83b0d8d9620176d7a91b803edc637642c83a761cfc82
+1b21787f83920decfb906a5260def040e62e38135944df33f2c4ad7eab631f22
+6afcf035ff68b4b709311d9d713ac6cad9e7fceec73ae0abeb5fbeafce209148
+1a0e537bd666719b41028283cb1658f4aa7f4512fc61c7631fc4eda8d678e7fd
+e9db0fe0f89cf941fe65c32fc88f490226acbcbc93e5ba23dfc83ac4a289870e
+5ed31f2b5cf50a93525f381bd56d01bf11299258dc387694fc0cfd877eae3247
+8d6933340343ae8d2fd1740beb0eee04c44614f9c1d45beea74fd4c2d3f49d62
+4388241c96bb392add3896e74b93f670dd8a5c415631b2834b3b8135b49caaca
+007feaeca5fb75d9c4423f2f04ef576eaa87b69ff1033a70409cd5ecc93155c2
+18d154bb152491f87a8a49a77c1b6b6bd09982a55c33601547db6c8344c0ba64
+007c9487105cfd10a7bc342309d1aeba097d21d9c1da6e1ad1b1f05b2364678c
+e5e496c2e2056dcac7b5c90bc5dd0b0853e30d01800f91597206dc2a1bb5f0fa
+d8735dae0e61eb82138284fc4174b009d8dcb57c96b2897dce69785a571549d6
+67f539640bb0092d7d130ce57428b10a985a48576d7f6ea6c4207a53bb62c485
+5275cc7334b6fcb89bb496f3889377c1b0b5719254c3b9b19d041fad4a399e67
+1ba4b04b4a62b1879dd7b04f3b93fe31a3c544eaf70855d695eb3112a05b0537
+4c2196780e52fb906deab5add98ad9a075a1dc44a5e6b5ba6ca0f8d2a634491d
+eaca8a763311e9544556b65082f93074e5e4457956783c11dd6b1be5749fe952
+d2f642e8bf267e5426a0ec324af7d2e990254de48c505b1fb742652ac86f38bc
+cc59509737401620910489d3a4aae6e84f7b7001bcd617b0f09b5002ad00122f
+b1dc4c7db88585c31e637095d3d0dc7fac2337eb79f02fa62d13af0d4b76d43e
+69179bca2b3685d635c6f2e1e26bf1a9a609853d1510fa03f78f0b7fb384586f
+3e9c1ee38da709fd02ea0ff4d5ce512f8352aa15b232cb91411d1e95965f485d
+7ab5421d700af653b90839773fab6d37538ae3d61d9cdef3bd4ff94ec113e9da
+9a65f75abcdfac298717436af9c1a1667e7fe80339e1383bd3d45b94f76dd91e
+f1ba70a8bc50b51d6b51766722802205c0fc5e8ea0514fdfa5d5b18482694e65
+6ff5d21dc785b278f11b386e5812d42f0b4505f896d7f22b4ba42f4cff11dbe5
+07a53031462b3e29263851e0c91ceaa0573b49a2a6cbcc3c3c1a9c59c556dc2b
+12d1a9f6bcc751151ce62c3f30a0ef50eae7a56ab9eb35f93975fd3ad2e21459
+52d709f052197a64afbee9fa03ea2bb9201506c0b6441c9ef7250d73444e01d8
+7ee3dd07ca8cdd5549f62d1726c8d69833e0c9d2ff5af11b1fee0596853fb75b
+1387bfe18c4c747f83619a6096371fc6f444877ffaaff4a8f412847409be666d
+6f96f3a2a6bdfd20f0bd08afdd3506facd35e4b62c58b4a4645e732a9b1acd6a
+cc71f018c9e0622a1705ca635f96c7315f9d876afb459641315bf4ca0c4f7930
+1c0e30a8eeb441218c91d12647d5bdfe2512f2321bc51968c257fd339a24b1b4
+203ba90691564a9c83aae4ff68664d03b1a95da707bfb90033444ecf3deb43e6
+412fdea0ae772206a398de11c52b652ac04499968e2cdd4345fee97a40b86567
+2ed4711234d27ccae5f151d1825af76e8624c0ebe4a5bec34b6998040c3b8292
+76200fc70a6bff7a15cebb81e8b52221a45196fda4087bb32d5a260d077677b6
+6e070d33ad1868a51f7201924825b04335bc192bfefb74e496dab3d54ac4553c
+f959ec0dbfdee94289a4a2c166909c26c130ac3ad182057644c8c2dca84a3044
+4e86e891fe1b07729531642e7374c9a272cec66bc04a36db2d0b74a622028adc
+d6702773d0c9b6750c28a08902fcdc9f8a290c80c0360ba8019799d33fa42361
+c66575ac108946c97f3aa027ff95d2a6753f9dcf5949df046cbaea6333f19716
+9c0593db17459534deda9863a74b496a837c1d667df9afdaf54320664d0319bb
+3bd41ef9a54b4594e6be5dc416c275a73a26af17e493f77ca7ffbeb2f7abb317
+035c249b4b5a33757bf9601b4def56a6207ebfce6e073fc9427f95e4cc3799e5
+5eee6d0422a26449f713a74f0c114d3ea2e9b2e183dd857cf21bb3a53480b0a6
+9c7d8fde6da71863f2b21eb407345e4d72c5667137f83610cd2c391218478c14
+1f1f34be21dd6fdd444ab1c4b0a59439617cd0d04ed9fc568b0c70ab8222f17e
+e10c0934f9b567dbb26ee612929ef36036727e4b787015c76e78bef4aee02049
+4896893ffa23af70b4c6363f7b20db155f496ed5a8609be1e5173ce968cdff5b
+2fc5a3bc23894ec6f26b71a2ac555a5cac33aa9f71c184b8f9569d286978c586
+0c4d0be59e267ad86edac17b787cbb93dafab3ab4406d83af0fdc7a29b0a0b8b
+478d2717fbbc87b305b3f3020c69c358232b5b052d4376db297eef247ed2dd25
+6437c1139017556f879427b786a15bda065a1c70c6dc959f8e0cf727bd50924a
+b82a8c56c225fb35f49c6937495f2b6c7a80d6ecd28b0088b52558cb45b238a7
+dd65fc5f16ea69febdb60167d4de4785b1ed69c9f40495cf1aca058ae2795fee
+4812b5ae9a88ec6f37f8fc2a964e0170025fc558a7d5e093a498b018390064da
+45f6d3c9abcc3af22fb37946cc10ae42bd651e213d7e26570b1eed493c374260
+6e3861f1fa365824d012b5ba6b6bde3d198e0fe078c7c17b045109f6fa5700f4
+86e7fa8b9c1a5aa9a14955877f9c7ce8997cf709ce97211dae33e406979e83e6
+6ed2386c06b400c36404ac371ec3bf27dea61b15d3db5a2eaf68b5e5366112d6
+a18aeb880bf2df3f4c151cb23ed00afd1f41edb073022ea746336ccc2eeff94b
+0c896643f9d44d67ca2600eaba8db2a75a18edfdbeef3e55aae36d93c115835a
+a41cdcb41d00721efa83cf094a623c356cd01f9f3e61b52336e039f3ecccbcbb
+c3db862117281a50bdecc0057520b748a4beabb24b8a5f2d915eae78b359c012
+43b351570dae60fe822219d20aa73d0d2eebfd64a13fb0f05512f1c25eb8cfdb
+1f85aefe9cdbc6d213db2396580aee22e7f39ce8fcdd343c9a65f86263613ef5
+c8b1d3d2ce31961170db7f3a930aacc827643fddfebbf77d5a402be5d1000db4
+c80c05b38cb971bb260fb31f8a42750519ff7ca45076a75d3490b51cbcf8b47e
+9c43f349db24dedd1c41e013de99f4a02d7afbe73517241dd78d1bb77fb815e0
+23ec47e41c4f1f8cc34b6fa12cfb9837e7428a0eaa9769e786818556955407ba
+5079607225977b9d1329e9837fa6ade7df59a7a5c3c6a9de0791655b3a9c88a4
+b9d643f79acbc20eb60019d7afc63f30c5430f0dfdb0750a899347eb1d9cf604
+7bdb596275613295aea793d76f6c1c012385a29721cca1d4a49c666cd91e578b
+4cb177c7f24bb53b2a096e7abfd475d8fdbd0bad06ac17be32807dbef46afef6
+743bfe9c65d9f41691f698027dade394fb03a862d3c8aadd957f2e3d22af692e
+fa918ace6fce92a690b5481d88638747ebefaa504873781d51bbe392c8de01b5
+ae4efd418cddfb846ae695ca0c4f4bb18da6b54ac6deaf533c552d8dc157a233
+6382159f28a121c9f2f486f9ad00d487fdcee4459470a5f8e3d3ee056b7cf51c
+860ee6e54886aeac337f26d1ffc297b6903ef5756f964318d3aeaf9bab264111
+ef2ad05e4666ca98a320e0c30bdecb5d0bb00447c26e72a74cb5067c4734854e
+f85a9efea96a40705a62b9fe6ce93fdc47df59fde42c957fc276c86696a70d3f
+3503a4ce8c480c2f8abb6b86d4c0b689db26d606dbbfb1ba22960631d355bd6d
+f77ba316866036141960bea735580e6b306b30232485f662b05284775da99aac
+580a53dc696dcc027a4b008c7f55c8224e7c59eb86227bd3ab0f45f4080f2728
+3721ce2c92b117ef4ec8540bf86ab9aac4d142c87c483764691656f7b95d4c49
+69eb8403eb6e52effc8ce15cb9826fa477dabe136c2915d5f9e03b80e83b7158
+013b8ef2817b1020dacd0b8f8c80e00450cdb8e1d794cbf23596d25116a6eb71
+6186870e761f3b024ef87136d248af0077422381ddc0d997c10677e5c51c87c5
+873b5354c2f429661b9adb4b9c7ca76ccc878daa248857ea3746db53b3a5cb7e
+9b239744383e4652d32b75b75a4d678a4adbabe8e640f4e0a80fab602e09c81b
+4c563db440fc714dcd23d3a7e4aafa655d569b7f6e4a3e02233027d740b6950f
+349d0caf99ad47e7b40f3f9b88e1e6b32dce22027029ef7a470678ccb8651509
+bd9278055958c6c8802ace0c1655fe5e52a9840513b7925150d092a1f7ced5cc
+9938244b0bd766dec4954ac6cdd1db1304ae781383d253f65bd24ed05875eb50
+ad99d1bce15be48a6a363ce8f7d1d89b37ca7bc55dd84fb7a925ddacb6134a13
+13ec21412cf11b1182c1e88be892863fb487c57918a111d4857d3a4740603097
+8456c2ad7efd34d949111de4a616362f218528474dacc220f86814f2543f5038
+5f80cb9d39fbc70ae1f66855dcc1ef7982b3488f719683aa5296e955d72a3ed5
+6259fc3f9bc41b0e42514740d750a7c2987ac132eef1f7546a7ee8b073dcb7cb
+3077493e4cc2d0b8313968730bd2b0ab3d94258a840e25a52b96025704462c9f
+93c3cd3c2f3c66fc7e954dbcd5ffcffa622c797544121f91db0cb7793112dc48
+6996c71221bd8318a1439007735826533bdcf1fac581e5b3b8dd3356e4a578c8
+7d73026ef076fcec3124917ccafe0bf56f934dd8b57e2dbda712020b1c4a7b79
+19d9d7bcb7d5f850104e668f597d1c6945aba72f2ac3fdd00fcfd4f3aa871eda
+fa706e53c1fa0d376d1985655cf33ed3dc1791517e9414860e0ea2505d280db0
+864b7b02b80f72f10b5e92a7b79c71c656a14ce57f096ee937fbc8ccae999900
+bf31a9eecf2689584976cc5d9d20f84c3796a4c9c200775c03da8fd51644f372
+0ef4a6354fda3c562a001a95217b009a6b6f1adf1eda0ba99a5ae28faf22594f
+d80d09ea4bc02bd5d63f4e0116ad29ceba0b961f2d0530ddaafe3d3b3df8ffab
+804c7b7855117d0c0cd591b0828539c954e7b6c05bee6e8002f9453caec5cd25
+ab4397c807b2af43c2b2a883d87fddaf6051f8b2bd6d8c9beb43ea821e48de0d
+83ce6e93ac6959d8c7e4088b12240ecfd6a02e0a8a452161f878f024dc8a0786
+35ec88e6a33dc633147b9a2a1ef575e86048b9471713e0c8cc202d56c7ba584b
+9edcbfd980a069a994084180291a695144ca4e0ad3ca947180f6fbe8a709a3e5
+401e96b74f2009344d43723b1215d2a145d0e1e91985375efd8e340f01f825a5
+a0d457eb5c5b7da3551bd7edafedc14c3b6b9bfe7eabcb38bcec9f1f94439145
+a32ffc10032228b5d1154d2e22d2efed471a0651c3b9fb04c1910052d08649c6
+3d5b987ef316a90b2c1bdbcca3cbb12f1f426bdeedc8107c9f2538bb506c7524
+983e3147012dd9dbc0dafc96c65478bcf8eed378fee8a20dc9dcb0f229088a1a
+67336bbbb67e68efa61fc6a5750c7b29b868eb5c050c493b97ad7dfaef8f75c2
+8a8092c5be3c1fe73d519c1625670c78c373765b2803b932dab26c54664699ae
+d14e20aeed56b0a70516517a62473369e6541d759522598a0be737cfc0f4b74b
+17d63a72fa6798b867a1cb133cbe5ea48401fd4646773d5c377628a2560dd870
+283ecba942f65f660a909811a5332596b84ac3e6b583a24c7c5ce30ed978ebd6
+e0ea5b8f534d586b97b3d8f3d9511cf39b0ac45a21cb831c81e8b78b7824b0d9
+211b916b64a0efd2fb710b6777a93874dd625311bbb74a04c734bc3c8298b660
+9cf371f8a04b6e13bb4c5cf308a042e4346959cc5e7209f5d7e2ac25911f4f2b
+b14eb97582f80998b77714e872260ca785293e0f67aba0a232d677515c3e5611
+3bf6cc8c1b0d13219db4ec3d600392cfba7c3c7602d29ee0583baa53c1601433
+76d3f84601e562b73e389ec97a1863bd0063c5b2edbb5dbf35208a9a19291f25
+3913cc05c4ea5fe74c591893b53bd8bebbed59f13bbeada69cb75d3b8fa31afe
+3172b85cc8863f52b594621f80eb005e0d038adb6802e1ad80492867eaf8ea04
+6b391ac713a3fc24c0e036066c8c1143491e8854a4e8d3a6eac1c063bf1cc60c
+3333732f67b43bf55b43631eb2931a9519af5b44127b432871b99b3621236172
+d0ec4edcc0be44702893c0e749d7ffd81ae042be89442ed0d0f45fdfd2a34cff
+d26e692dac3f81ccfb7a7676444b48a5ee7df7b37da76b1c7c50654cf9df7f47
+da61082b64748c038e8b6fb6dcc2d82446064d826fc2406c3398b5d24fc41ef1
+ea4b833f9c9818a78864daafff9bfeac577964ea167734f4a4e4fd85516a68dc
+bc0a64b1d406651c9ec70e97bc15f4d0fc43e96bd31174dd4d0d228897a01bad
+1530f486e86bde3b7fe8203fe79f3904cc70f3fe5b70a52cdc3ac40812974ee4
+3ee335e05a5aad251c22b83bb027f8fd6a695a85eed610205c395f7ebba3a6cf
+27dec1048355636242f23e74b70640c1affa52309879376c911b07074bf35f5d
+d74e2a963209ef85f1902784898da3d4f43af02744afe6679890b7ac96f3176f
+e1cebe8d534617401e5342ecc07e115fa5cd1d77998d30c28da15b763f1e9412
+d314c535a574d0584a257487052c4f088066ed99e434bc8cc0f975436473f9c4
+17588ecc0c37bf0901211aeb658dd4d1b30a8155ec7ce8940f059935cf6ddb00
+e47d4da7428dce12920cdd864ed00fed8a18c39d32556a2a1befece0443beb0f
+690fc9552f851aba3862083d820da90009c546c0f8d974644c3f2033a81bc38e
+9432837e0469329715ad7c6d910a8506a4135fb4fd6951dedc46231de609f65d
+c86d66af10eeff7a899f92ef897410d56ab4193039c558325c7240ffe9172847
+42076b218220db2011c9dc6938f41d08634c9e07a81e91753f595a2fbb72752e
+0e2eb941101c30a26cb976cdd181a4d8fb0187092773e56b47acb7d6bc7c878a
+00bf69eafe8c2fd1665c3fe1b6358e3b6fc761bb19d8fdb16b77272f28c0ddcf
+db4c7afd48f12daf1ccee639e8cce5234f7e60905f7ef178b39cd17a5f5819af
+bd6523b008e1e3fcb7ebf0a85e328b9845788b9743ba205ff3809cdff74c8f83
+ac937ab9b041f32e9ce0209b62d8021c5d05809fe51d277a31f531f8e62d2e0d
+143125b599d06c714b6220981f5e8b20e64bfc4be032393b308cd99d1cda5433
+aee558820c95db7f5ed52e60baf77cd27a60db1d6ff7c907280b024e3c1d6726
+3f3eba29035bb5d70090c199ec5682ef5fd7ce0563c453eca594ab0349fa32a9
+707df207e19461c79c33b3e6ff2dc5700cba1b297d9d215dbc3647f7920b82b3
+1e7d22319352e83376b373197e03c4c42137754961ec274a241c492daafb078d
+8f0b2c1127e57f13de96d2bc9be9b5120e063757fe6b05d4e5bd7566b22d79cb
+78c01deeacd07d86e961d0cb9db376d61d1beada56b1a629a93f83405c7c10c1
+eca67a71aa87d7c0d28e295a01fddf038bad9b0de720718eae09d7edbf128a7d
+da8d786ee0b16d4d21b3564133476ff42ae7d8a5347749ec2a2a4642e87e7b64
+e6166032aacb00247f1ed8f552c94f3506f9939418ea62ff14d3ff98158eee04
+24bd5e3fa77c2562cd5bc6c7f0ffa1838653713e87b1da2e1a4d202f04e60dd2
+66d6d48653caea42cfc43d05894d1173cee0ff773fcf9803c2e5c150385f0c8d
+b67532b4012fd89c5558b045c3026017fa4cb17cece11712ab0d617631b1a509
+6677062be9a1289736fb1abfd9630274e40393cc9988d2589f22612bcba6b339
+c961e5a4e1fbf411a7e719959a322dbb622c8a9cf51d6f405ebebac19e6051ca
+5b750d7506ec8a03cdcc8e62c6d7af9f6a32b0b585f66b26ca61e290e39e341f
+0b2d3784d104f82872ba0e1ed967a064f708aacfe052002972006fe14cd4963e
+1b34ef38b99be8a7a83ede48c85d5c71d69e0e4ae72d7b6b1a46bd26cc636dae
+815786e9e0eee89493bfebb89037f3bac832781c8b1630e31542ef7cd6a483c9
+004ab161038ac6aeb38b48b8293ad11bf441db1fef2a168b77d69c4a79f921d7
+ab9f1cba257605d81928fc46c43a4f93d39b01b07ffd0006d38366393cc64b18
+d8b18fa2899b9178c40f008044fa0d1a41e879573171478c147cf71731075421
+650fbb856eca3b36a741e2077245845e074dbdd2fcfbbc4581a2766f1830fcf3
+3255695d54307eac8196cbb693d536795388233829cb670ea78b793c4c9aeb73
+f7e7de4860712a5fbc17ce5ad07ca98d70eb3c94a79383338199a56951a45a76
+6fee0d58788e22740f2568e515aa495edc80da6a84a2797c198cc1f3d6fbb2eb
+893f79f9f54ac81b39b6dac070a763cc81959bab607569423d423fc8fe5f98e1
+4bcf769ea77c0d11e5dbe2fb539ce15e09b68349a925949afcbe381192be5146
+d28382fed48e03ee3221bec2aa8c7270f43c948320a3cd0b831e529aa585a7c8
+66f2edbc5b569d4d95e3ec52c8a7d35381cafac5c301508672352d9b0f582a73
+9564b6cca37b517019c7633561f33198dd54a886408080671e1e77c0d2e5023f
+489305ca314ef082008d37da60896f6c4094451ccc52f7ac0d72286febd7c852
+5ed8f36974b846d64bdad643db37d8ea837387e100432131b11d5c42e5ec117a
+d17b2bcceb463d68ae7aad5b877b076f34609146884f216716186f4cdf7134c0
+f72d36ef9696d2b53ec3a3149a5b17f45bad371cbd72f2699cd52636151546e3
+d22c085349f42ba0c21d90524a94b37168ff489efe6de3ce97679298b18eca37
+bee071ba1f93d7d2fb811987973864dfad11bb5c645ce0a435f1db7bf20671b3
+caaa89df0478215fb76ea26f00682f4656e63c358f3b0bc84c64c17c3471dee3
+c97400d051617c205d5815ba63ff38bf46f06a8fbac182a4ca27038b0c8ee103
+6a9a449cc5a9ac774dcb04bc9f48503a3f4a085114e2f190e57859724a8f1e36
+cf97cfcc15d196ef82aa6d2964dbd886c39c4e72e15d869df1dbce4169171f27
+68cac43be9c95e344bcf7f0af27b45d386ab6248608416be5f432d582338d3fa
+c77b80e9874d5b65658698e21bd2d4ba153f97d21223e488d4c5c2c8a7520e95
+f6ff8b1a19d4cc920de4621166a4eaea5774219ab3efd4dc9202c5225d4e6505
+91c475337f68a2d870375bb8def9f4319aaec852b76049401c121568f16b9be4
+ed27ff64c810b325bca29b5642438e259135f361419e8b5b23f6aab03ac0b22a
+348478b32e93fc448502b81b0626489f4a358702e7067b1bbde9448c4af59d24
+a72c83e0042ac510c6a91e5a9ae0a69d2be865505238e396006527756734e924
+4e883e05abfe0dc62f9bfd0e8025172704111627916379044c3cfe0bd1d7e2c1
+05adfc871ff2db60351210af676444b37ce21aa14f1879ae06efe7b4338eb55f
+0aa768ac12df6bd8b87feac0f48fdd26f6d2de4ad88e898499608cb770f754d5
+3571822bdb5de28107b378f4b1bc67c0106a24e9d1785336bc80d1da9636a5f6
+d25dc355a88023f7189533e4a2416755821a03a069681f4b0554ab826d2819f2
+a4cc0726412e1d2a0001a3ca49709dc21e7032eccab2f58d80a8163cc8129684
+b4277d3ad896600f610b1883cc973f8a975e328cf4b069b44e4d5207ce889bcc
+49684bb2f1eebd711c8adfd4607abced0fba91b6958bcd5874b01e8370c7264b
+9cfe66d1298374288f3d3f399700fda41a7b193411d1873d321e846b089a2e51
+0426782a79990da94d6182c912fe9752a93d6de0d37eee602f0907b8cd2f46dc
+ed1179536bf9a3b74c0fbfe8974173a2c630c7360bd90f9c697b1d5068478814
+7806f05c70da8a11ef065cea507de043415f855f595aebd10ad001a0b68cd5a2
+ea7858041a9f40f05485b0385bdf08007f4213ab76c70b463e7427b79f826ea7
+ebf94bc420f700a50a2bbf291c867d5b181b8738738bbb76d93503e7c603a7f8
+354772c516443fbd33382b7913840785e5ae794fe571eb3fc65070eac273f00f
+d12bc28451ff8be0dde26dc63bedb66acc6570fb166a583d796fe9493793baf9
+6a13bce0e7952fee6c6700a9180f5ba2d0cfb2963e0cc8606d48b9be7bc99c9b
+efb1a2dea357ba87d790c52f7a90a2db476bdfb93f48910ae8cb5e91d1d146fc
+04736b13a017ee2216f286ed57965d2017adea323978d3fdaecf864b51fc9aff
+cc24902e266b084d518f1f063a2d0bc625ad9b108e322019d1ffe9a26aea6423
+69edd0537d1097bbd66dad8d859e7f02bfb3a77762907f989cb8579a352a0719
+969abd926a2caaeb9db6852b1494277fcfef88795af85f0750856b9a764f94a6
+5a120b04e33aab0d36907b89bee7586021221b27ca23559ae68a208fca16703a
+2fd2f1d8ceff5274e64c441befc0ef7901e5ec1be2faabb271b3801c485713bb
+8846c95c6ac596046cb941fe5a5ef828ead0808f0dbe808e96b5c48253cdc9ec
+a0f946a3877a9a0d61c0ad150f50b186f841125a311d606cde70d36f7c03ae8d
+027f88c6b92fa0f2d2b69f15a1563d5c76a3db13f43eeff40c9da317e8e0c93f
+ead28d0fefb5a253a9e998ae1cff676dfd88f6d005b148948b7407cb24285302
+35313ae2eb809b59813c15ddc621a69cb03e022a71dc1212627141a77c2441c4
+39202c7f4b0937828648544b05288337535cd3d4d2b80a0b3241169c8898e4a5
+db36b8230e8e56e3d0cdb214df9ab611003063037bace671454a70c801aba2af
+35048afeb620dc4fea9975bba58857ce16d2439633989d9306914bb002b376cf
+00be076bead119370763b131621c4daccf9ee58226a014d05c428c70e28bfc1c
+e9fbe10d94828d9510c22a7155bd28d6abdfb16e486322236b678978bc49eb1e
+8572abc47de533c8cb98d80b4a529b7d05fff2302fa2b099efbe64f56186f14d
+56771ff9802f23c1302732931a28bbccf8016aa68241da46b03c352237bf0182
+90f3afae514d05552932233857697a0aa8fe291d8ccfb8d85c5790157afce28c
+a0d50875e4107cdc0179afe2290120c6ef96ee34bebfccfdc2d47de8cc301c14
+959a4f14717e9bd54454f382394d0c9d653357c683d65857be45c662e8468bb4
+8f916c8baf08d028e339e64803d910196d19335a65f83230a9e6c2be9baeb01f
+9776b81d665f0bddd9a1a0ca31a0fb126b1aed8ffcc297786bd29cca18794fb7
+04231664a4cbedb3b41ec2d9066e6ca9d1b694a8d7be8973e9ccb799f79ed2fb
+e63e114daf8c937e361d4b7e0fc4caac2b87f0c9406820e9448ea9ff98d053ce
+9d5a7db9118707bfdda8f701bf6bae1021ca34b924185aab0526b046ea4fa65c
+d4412f43cfcda0628f0f5790976cd501621f5ba7937e6c04dd6700f9b35f3a52
+62640ee4be7db358b971c2aa5df1dd7d090195fb4fe96c8908d24529228e7f7f
+bfbe6138f00143a76b3c09e29f8eda3d5c630aed311c3fc3c9c57b48bd070b18
+b44aa15009176d0ce7ec488c945c51b26950d522bf80226251fde456d1c8399d
+7fb77759130de5e1620a47f6e8eabbc2ad48129f32e97974657c8aa6cb2e7ee0
+959ff4d70bb8b307d2b6fabbc887c04a6e95a986ce189927fc97d8ca7db8febe
+e699d3d193545b1937082373e930af3db6ec7e4eb8c8e1d6e5615b93177b9a2b
+ce0d7616642da91de69b7ddb922a4f47eda748a71eb4662d7476ac5b15184acc
+7bd92e2542f853d72f1259020f66b782f83727224470405099fdd181dd4210f9
+6e8e28b257b8444fc35053a7da19361b01bbc3bfe0f8600e582620d1afbc3803
+56359cf6e9f1964635e0e734d7bb9a1e4c7d704426b8d2a0700411c226e13818
+f739cfc023921809d6b1c8639eae19f014a519d6b71133c3e12451d21aa36cae
+16f002286b5aee0bc46d5dc92ae3779d957212fb276d86cd0c6cec26c2bc2dfd
+cc2c9fac9ebd5b4c7324352806a0d9894a1e809d8c9c2b1a4b56780cdcb7a548
+fbc3faa955088fa50746598b134f64f4d88e8599cc48a5d5f86f05f898f5c270
+18d50d256d761964c12aaab06befc98a84307547b80839f8fb1b7e6553d7e522
+c641db4ebd8faba0f24af058c6de88f1ddf478641c513423513002bfcba37ff8
+2336a6ab4ce3d926ca060a4084f3beb0073bce8b91271a3b2614bc0aa19013ec
+694afdeca7eead2a6527acd348d00458649ac2e475e8349d186ffaa64f2f058f
+a8c94e7202a8141f64ca347dfc8a7ce7ce3c9402072e188c77290563b766223f
+deebc865fd7ffd4507e74a972bdc5ba05f1595c4603627e07871268392522a65
+93d3035b5f05e8cac3d90e3b6a8c8563baa8f13d4d8a878445d230f71c257ca4
+90d72b7697719b66b62055fb8581037905a422baa45aaf39efd0c40fbcc7109f
+dc2eb4bd0f4ac59bedd12f12deb947f2008088321be00902d555e22391a9921d
+eda8691ddaecb8be07ce75f459c1a5e9ce7c57386e8629bcfbbccc796d3b0551
+e207f6e0fa063e926f6c663d576b8d6069c022a51f9f9c21147c7afbaae7f697
+762db69c73cfc80afa498024870e3b7af96203caddb5520bc20db4b7da0f3624
+4b20a8110e753d6129c9dbba86fb5581dd9be7a021fb027f5f0ddb40bb111af0
+a019900edecabaf3d5cdf84981fe2a659cf9f95a7f1d5146a566cff83ec3523e
+919d4a6ae54ac444e1e7f0a56746850186d8461721656b54bb784960b5251702
+33d92e8c89680f0c71ecdcba4b15152f2c933908449052c4b4ce617fea02a74b
+b715828d499d2208d85ef7e45c08858bb344144802c885d102364e217253a739
+2f6442170b29f8e70b4b24bfa97c434038364a0c52084c204a09ea5d48873d0c
+dbdc712312c582f9a8cb516a5aad8e30b591566389be57d444ee22bf80a06f76
+8530bb9cff7cba7b8374f091fa17ff0c1755d6917b073a2e167a82e381793592
+cfebf89561f0fdb63044f7636424bd0e406d622f957c740e6f0d3884702badd1
+2cfbb07a20558193c10e5cf372010a7955adf5d7e16e66c732ba52e3983026f0
+002b39b62b628dbbd44d467904e8726e79d79987812f07ef14465cbedaa19476
+5692fa39d503daf1f3f0a3ae881cfbf7c6a0e4ec54d7d0572d810f8861dcac41
+e4efe176c5219721911c8ad2b3985328d49e4cc4380892a6f108c62d711a8d9a
+c44c46936b90e4d1e6fc9cb7d01a6812d11a5bb0eabf497d0d3b1eb09c2cbe15
+823ed1791d2199481c08c1f284bf72d428650319b881fcf79934c5ee86885b40
+cc6240cb1f8d80b0c8f221d8ca58c228d6da93de005b11c15fecd9450293e3cd
+5005cf191803a161dca15fc2d187f22ecee8335d58f21f69d15fbbe3c1aa3d59
+5a142f8c3dcb7fa934830423f072b0d7d5613c148a28806085bb7c18a8c53c6e
+43821aa5cff8497822b48cb09ab2eca0fff054299726499124f7b25973cb9c80
+936aece707b66985d7bc56f2980444cf3b1ce6a462a5b78ec05a036ba12e479b
+cfad5953786ced3f29d5f6e5b33ed9d46901de314e87b831c376a21ff4c8385d
+175aa0568b1ebc5f890a213483cd218194e15bdc61d51feac0401432859b5dcd
+253395df487a1ffaa708a64ce045ebf6c6dbb4c9acc91db63a3bc1680a697538
+f342ae8b6e022b1a4d77293f596365503d5aa34712345d613e92a3b214cccec2
+a40d0e3a80e85caea6fa0145a6489e65a252ce407fb0a3e1f6ce12d4ff4737ab
+514065a7a791f8d33df8d52849ff5d97bfc8dba6568fb51667cd3f0179ec89c1
+0d656aa50b2ff5305168af18f77a28ac8573d8cbd277f8bc08482cc0f23bbfc3
+c62c400c5f064143fc73b04fe2ea7d48f823dd9631968048820d81e97f2d6046
+992d89770073b795682fe2fa6a9356ef89cddbd94e66c7a61bc6d3a3fc629643
+2d576a90d30cd1fbcf3d511e03374ca758a245fb43ef5dd1dba49072a627e35c
+10f831569b3b1d57f8857aa5c7eb7c0a9767bdc44d734d3f0794716b23f64831
+0af49c83e5aeb12dedf627af214c7c48f325f1102545981025d38fa0bb579388
+cc5c94144f5643dcb8986714082941d358d35d2c8d8b3e5f731a9c7940e81a03
+e3407b740234a2e20f1a7ce7f32b57d5f25b1788bc242f732540f0344950a6bb
+6bd5bfe7d1d62b1596c7ac5796ad727a47864aa730e4fe4b0b36154badca57a8
+3651d37f4344a6520c67b41b3ef31444399933ef13f053627d361d7b3e5bd1d4
+b94fee21034ca389bb4a6cd73c26021b23784bfa0bb621a17a13217d3cda2b68
+284f41b869b70ee24a3acf909a67686eb95805c8e7ef912d0dbd5c3eafd377f6
+7f94b76bd18f35684f9c4fefaef7829534900b301a0eb3557a73fac07a977f81
+b55ac50a1386c7d6a4019a8c3bec9bac1d1d54e68e53e15bc58348207fa58bd9
+89a20e2f3396354723aa3c823a957a133286080fbc124a11a42f416207ae673c
+0773c54007f9420f92c6bce228f5c93248e4bf7bcb85bb79fc6694ed1bb7e43e
+219b996905f6501948d0575358667e52445ee9665035904804d45cf926d91828
+8f1398b668941950ac0bb6fe53bcfc9fda2945245aedcbd07cf07f85a7981b4c
+e9e84139a46ddac48b8421fe99aeb64ea97f954b758175433e584d60cffacafc
+915b856e26dd41e000c1162f76d185f469d3271887505811e12e1558d1ecc456
+2de5bf7aa4c26cab047001afae3c5d3ec9cee9dd0b5edebeacc765924ba00624
+ec49223ca7be92cac4583509aff3016bcc446e14b5dd7d9a39007b5d222f70b0
+a977e0192e6080160412b520a8e72f7bc93737e344f1c99acb3630aeac72d60d
+344d5ca010e962de47cda71d704587d266d0e584e17917cf528623677da03619
+813bcbd6d360d945068e74f8eedb6aebf69c6e2d2158b050dc402d55fddf451a
+d0c1a407154b04a5904b6987662af27231cf49118603a4e5de4d0b5ab40c7ccc
+71847ea1f330b2a54ce9cf1abdd13208a6494d36c3fad5cbedf46d423bb07e72
+8188f9bf937e0db8d8566efd8e056acdc3f5689c8e19a27be166a0edb07bba64
+3ea6b53c4632ae33e0616222a54391b8cca32d7889f95f0039152b8dcce8ffaf
+c0ccd4310fc6dca19b0bb994ee62e8085f3989737619c8c516f7a6a25f9e9887
+fd60a30ccea017e50ebd5a2c32c553d0188cfa26796ab530acbb3eb090f88401
+12f6a52f0ca684d55ca2d414a36228d88a20b2eec02d182392f0924987cf72ac
+92897708af33bdcdb18c7437d103fe4a96dceef7788284878b4876333de5af76
+4617fcdd491c5c8095d19cd920dd3ad8b5b71a375f49520bbb6355eac3a188d4
+fbdcd55619ec3b6305f50d818f6ee5b5ae92dfe5a7f4f209e9f3ccbedcdeb78a
+e0d055c3729429e9ed3787b52545d480b5380e839374983b6224dfc56bc8bed1
+47c1a8e7dfcb285aa1db7716164cb63bdab011797c1a9bc76e73ab86958f325a
+7b7e15e987e90622824f2a12a220893f47737fe5b5496696e7772e50a8cada3b
+8c826724115a236c082389390fbd27b6c3bb10684cc720dcd875595b39a47196
+058b06758e80443175359c3402e4e84ab850e42415516a19f6d10ba52369884b
+e3fa91eb9a38d3aa07b0aa9294b7301faca79b4a601e92428026c70a7c6300d3
+ec7256768b257ffebb593eb497cde45d9acb4b44cfdc6452ac1f9f612af2c5c0
+be0952971025e5919fe3836a145be9e264a8c7c36c658f2ccd1acc9bb96a87f3
+a84acaad0a05f932907451ef8d050bef2f693726396152031b1f796103ee26c7
+0551f75a9334d8fcad954997d05e932c9f1f3a96e74c44e04fd18714a03d486f
+1cf8ba0688599fc8e6524e4d9beb6816a4e2030d8ea06a3fc50183abad196668
+f15bfa80281fdcca6436b04ca4312e7feee8ce08ccbf90b1638b9fb57db07975
+5115f9fbc599449bb101a7709fdfba691318060f52ba610b818a849d50d2b11f
+bb0d8b5f859ec9ed3ece36411d3d58d58f14827b14cd5c2a0ec4dce72a73c452
+0e1dab33aa33ca4cd3dfdb103c5579bdf0506853a7d08821ce69d4614d1a7c67
+9e9e9294526b50cc284adf3eb0cac4f6df491756f1216105e5c25d898c70edac
+dfe0ade3d98daa6c07f6b2f04d3cb19d108d63b432ba6db41e68121250e5ebea
+3d85b413afc8d87b934d14a663a62b4b18841b78f5965eb483631b4232cdf87f
+c3159b354b6f70c2b595f46f43fca2a19667b0f91f5ec7a31972b10462a6e83d
+5affa53f7c8e4b30436f7da31b6c41b831b30f9d98034708f1c5c3e34c451bc3
+9aaff97ae2c477748c7f96afdca8655c9dbd84f30bc1b568c3f9b6f495f17e18
+8ce2286696cce2367abcdb42e4000dbae8bed2d6d187b7e9fd616a17df7bb16d
+ddad03b29d51489c5092e032b6ec2f365774810771e2b03ce94f5b97cec5a896
+086909f0dd481c8028a720977fc8fbf5aa62f6cfd91a798210fdf28b3df8f4f3
+937e7306048dda7c69aa5f4912e7c6192e72b1e9700a3fe380b3c9b63fb3153d
+48787b1da476fd22e986874e123e30e532167bb3f17323094fc84143ccb8d7c8
+b5ef54126bd9d5e3eac00459b3636803a6dd2b3673ee865b1fc2828ae38b74fd
+8c0e3fdac44f7c5111d6ba2661dbc47a0d13e751b10de1e1346633efa2607a7a
+d1db1a062202c4facd05e829e37661014675f2df3775d88fe44e7ddbb3aea3ec
+27d7b4bf413d54ddbe1957cff63a267bcb8ef99c27280879f5aed3b55c288e31
+2d3bf0c631894b30e0c3c8179f277cc63a395d98b66f99a87351550545dfa98c
+ae027ee68d26c098d586537a2b3f0ae3de112aad1ea133adb4bbf5fec1f1472a
+b941aa2db1318cf1dabfa8ee0a184398f9dbb7e6d29229830fe091b487f04d8f
+f7d1daee5253cb84fbe492a4d1e117bbd9107f9ec521d924f115441f3abe6644
+6a1d4ced84caffd29e221c1e42c7379ff700abe131de0f363226a90abfb0401e
+970dd4a2727eadb374f5e933ee1a11e9e85a9740e0b9a850f3eda6e904770f69
+bc3edbd52ffacc16513d4eeaaa948e533a8d693d184660dd89ff3f945ccd2d5f
+602cc243ab739b4d488e2577e58648d78716fad157fbb814e0c7991764a3e0bf
+9d6da3925e634a1fb3d6de50b563d90dc8ae3be33c6369a1a96ba6fb8c16f2a0
+db154373adff4e920c0b32ec6aee55887d4670a2c2340a12556e5b9d688fc299
+283e19469a14a8068efa9b489522e2f44c293278d138c732129aa7d97a8ee41c
+30d2f40e8a7e241ce4d1596e6a1cd065e90167a52aedd2635e7465144df866e9
+9dac70f78425c9e68340ea5d19ad3d0fa0f944d2ad489911eb5abebd7b48bb95
+6e8ac0948aa564552395de41aa2a72646fb369ae9d08958f759afc10185bab4b
+34349c12294abc6802bb1ebe3357f3b0c0ca227067f3768e57dbca68c2d1955f
+5d18a7be0b9805fc2bc4b3287ef1a9d16350e5997f642ed6a9bbf46a68aa0ba0
+80102f020e5a331fdf8217fc1bf0da21ea7f20e9be95c1b59fbb458e4a5cb47d
+b38fb3a3c0ceac39788794e47ecdd42b81c5f8dc6b6e9af7349babc8fa79fc77
+df3b5b303aa5dd5a2949ceac2fd202423a918f8355253f20cd86d49d8ac956b0
+2993c270fe41c6c7c4fba75b10a777191f33618e4158dd046c5ba0b145a0b04e
+18a5f4ca5a7662bf6b913975d6fa9b4d1e6b71f0eca1029ed9440c91edb1d246
+7657d9ecfd8981eacd537757a8baa5318631c688d1d865d9645b4e52ccb9db3d
+6549a792a1f207df608b6278dec2956a2b00aa3783630f6c516d448daccf72c5
+3557436ae09b66e0ef1f1156945afa125eae9ced158b8301f19efb2daa86a71a
+fce1b319f87f0955fb113973adeb7f175590020beaa16db43bb361fec1dcf3c4
+d21a58d9d01f40b86f5059c437ecf83367ea8acb91baf187e03fc51cbf4c07a6
+74c5f63e7c7f8400c171f93ac7d3de26d141938cfbd6163240565995f44a6254
+c840c1b4bd66f05c2c08b55747540d267deeb6673f1ed54ac99ba83d15d6354b
+1df05680bb93b9237883261a3a475b138373c573efef4011f042102289a50dc3
+1eac543df910695b1971d03c256f258ca48878e6c1f3170017e3ee97b9b705ad
+2241ac927a86b4a44f05f37d260f451c0fb10daed031d67872764fa273a95c18
+3e9be8497c3f68236f32027f8c01fd707d2cbdd339b07dfaef35f9efa1d43a24
+5aba59558c3c0b172e30c3a64ed18c9eb7141a00f8862583cc9ab16b9184e099
+10ff30eaf0638988cf54d6e40e2a0ff8e5832cef7dc239ee90fd1eb079d0345d
+cdce0a6d9ec621dc6ea7aec3eee09eaa05cb6505865b90274fa890bb64d19d74
+a618a951e3b6e74ae3c65c84cb5d48ffe4ecb86c859cce068c1665c7aa9d982b
+951b95e10c6ec1dff747ebb981b380056d9ec5125ce14266bf81036a581aa8f2
+3d76432c7e846bc7d737ef0f3b91262e7cbba277966545940c67cf4feb14682b
+f557e45e6f44b120c90862f3f1da74e9b0b35571cca2c2860168821289d2f836
+897569d072774cecefb2ceb1f55460ea5aeb252a2a9f653c8b646dabb7d1dd53
+1e1da1c098cc5e5e41893944ebc6da81ce44d8096813f4323e97badbf6c2a118
+942e44874e63004f7b925d6f5b3a15a42c6808062eed0880a8893c816dedf674
+96f49c25ca5f2bb1f1f49b178490c1ec6aec6bb3590005f40f339c7efaac56a8
+8f132f9943edabb2fd1f3b8b1ca97c90d376f5f62c5ec6b3aa6c88ea7bb28eb8
+687e8d24498ce4c7cc7c2dc4c60beadab36d50f0705606c4777be8f391b78560
+56c87740ed507a3c4aec3c115f837de4a620b2b8a028e9ce52213f3e7c425e0c
+a2756efdfd243e55e094020fc74b820530051c414a32129cea783402238efa46
+b98348ad5cbf27b1137ba5d7ac1ea2d6e8df85908325f75bfc130bbf0b1056f0
+f1815bda877bf922f7f71488cd63f22107ab224da5af9f0bd07526df7b78ea18
+223eea608cb614bd38228782a8f6dd42d559a894b814f08f9120ba314fc85d80
+0b6909c98735b0bea839012811ecda1b5ac66974262a232eb06daf952b70e07b
+b417767fd420961262fc68c7f9c4084fc324d1b7c9550db0c3aa665cccdf684e
+f077cf33dc707a148e325dd3fcefb13b3d531849202f83a7909406c1f2190623
+658c0f9e483b8ec4379f43360f31c1c259f4a8dd369405affa2fd4ff1fc6bf7c
+57be200df6f16d82fe62f9daa00d10bfb79fe0351c7d5044bb6e6ef64914651e
+c046e9a6e9544e7fb5a983007a59dc78efacd8bac06dc49148d0df947b24db81
+551c6e8d05a75dbad023f1c600f6455eb1783aee8e2841b63659c57bc309605f
+e21524b5b59865ec7eaf6df1cac0032b10b9736da197620b86125db8a97f6d7e
+8e305f92b4912641b692bfd1b98193967d2847edf3c7e1efcee96b1239cdd35f
+f4c843564827f9f5adc858ba2b911637205a9fa8312675d021b259f56342e9b3
+95d3ebf837e945c7f08494fc2960b92f7f6bba9bc2f5455b5582fd670e6500dd
+ce38653d5dec5497726c15f3ddf885302a430f9b7946bb9ab2d9efb3c3f81ad0
+2394aa54141e3849b5ed816a717044bab44eac003a8095bc03e6b6b11cdec77e
+979fecf2e780afa121e03278fc99d25c0bd241c657558ad88128f0ba7fa7482e
+e6f643bceee670e0bdd932290624086df2198ca3bcdbb976379edc7204607f8d
+b0f6457b3bcac7eba6513e9b8dcf6a47c075e7418b0cade13c43180970d4ba6e
+fcf574c4f9da83b289a7a6d2a495b6ff32316b905f878579ed5565f7509437fa
+02a28c87083fda09105649beeee44fd1a80b0092f064f7600d3bea4c549e914a
+d8d595d8a278aeb78b5751eb2feb3b8099ae0495eceedbd747361df15659a9c6
+4718304f7780a881472317605a38a9c3f7a39e03fb7169390a5282acdac387d8
+88fa9ac46d3885e65be61519c131016d65f85bd2d1d6b321ed9bdb5f7210c4f3
+62254ceb44ce75e79d8aebb96654a28e96be766c19439e26ffef7f185bf62856
+b0fde276533cc68618b17221426f86406a5b0c999f7468d764dd92a632bc5998
+ce34724e7ddebb53e9c125a2be5b2712d029afdba0ff9826583fd261c85a7951
+7e0c89058d87e2105ddd8ba7e277e9bcb1cea56d64f2ddb3a3e92751d718e18a
+e8eb8d55d1a35edaff938c5f6d95ec089c727953c3ff6de24f7fcdb38cf73ab4
+1ebe06a67ad901ba536ee1d5b208b86e692498215075abc3af597dbf93aa87b5
+84876a167d593c5fc0c487235b6cd349d3edaab4265da66f7c4ee4967768fd89
+c7c28a64c97e20c3a34973b9142314a1511a6fc6deb13dd451ef69710513f18d
+d1c960e712d73b1db1e8e534096c255c63987ab4d32e1a8bfe145777fd1ca548
+762f7b4f7447d03a61e770c12ace3860c6189b3d0e41f0551cf722cb3dc09073
+f0567d0be9f39e8bfb0f338d6efd8e1279cbd43f6c4a063819aca553c54aa234
+6eb9d433c5426bcb9b81ce88b557a2d59bc7863397a9994dd6bfd6c7c7faac38
+0b128642a86241bbf8a4ffe9887758f94a153d6b2c138442c5ae670fb50218d1
+fd57d841af8f328b33173e4b8ac9b6db3006741eb323a502045702eede107dfc
+bd4081770e3d07dcf9cfccb7e56e3f0c7da3767ac373a12f3164f81b493f12d5
+49ac50605430dafcbd4a9f49edca82b594ff829ed3bae596a825a618d49a96a1
+6b61f8e8b0e5b3fa032561747b96fa1935d74d0130ae01accb3da668a887f6d0
+9741836de17dabb950d84738dc5ff722838b507dfa7f4a88de4d9aab12ff9a34
+1db27abb24fb8686161443341a975cc810ad1a7e352037dafc33682a5556e6fe
+46bcd08277461c74caf2ec1ca2db253d82dc72ffcf5cd471900b7c0f2390aaa4
+eb6196020e305edce04643a2faaa4fa9df91d3e21121da099ce25975d4c950df
+f59f5e4ca3f426af7b33b958ed1ff3e1d1970eea0b97da7212e8a42124372638
+cffdb6c5dac17629c3d04ff2344df5cb39f6f156b6b8a4bf38c77d421a26ed40
+eb2e4e1d274ce7b5934c69506c1705ad076c58ccc5e27c580ec2dd978dd1074d
+286163d79baf91e3ff30a507cf1c1691f60e28c780b8f2b2cd7a66e18413094d
+d4381a15cc3a2b8ca189320df07dd3a25580dcdf91a2b33b3d8fc89ce71cc087
+8c0d5d4fd12545bdc7fe4af1b9cba1652dc8c076df6dd029ad8b09d75631b4de
+63b3ee38b3d133d0d3b7d6c991cbae09a8aca77ad4e0351ad54d2a4a1a2c84b6
+2a8dc9646ea4cfd1b66af0707eb5fcffa78223898c0f377ad55e5657661bc1de
+e331cbd9fec4677181d3577978ec08dbda4c684cd0266ce6d1e487cfac64ef84
+62873d034ad7d22518a7e767ba80e8514317710a71a228f76a66ad59b345c4db
+f03e056eb6c9b2c444f2199c8488c037c37934d449f0049e14c588523d9acc78
+50538da9ea98e537418f811afb492818c285bdb80a31987b41a1671a77ab530e
+be57d8b71b6f9c95f7474faec60705c2132010887ad668b1d7d53e26b480590c
+28367553ef4cd87ee973a99346fbd55a2ab67635dbf2df12d4ced638b733a921
+4da2b898cbd41632807b34fafda648b3c1f53d0e5c835b0cd3803ccb34a447b7
+6a5bca240cb0b1db849d40dce5fc8f2e3f711ff47e7b0e1a71cabbcb4c42e265
+1f482c194c301b4ffde9f787f9ac37c620ad634e7d1bee6bf1dc92acb38c1e6f
+fc4f531f5e8959e55c5d6a97daf9b11841ee4b14c4ba58e7f0dc9aff440e2a5e
+61b046b0d47d4ed606b4055077bfc0d7c033b3e4fb817a02be0891fa360b6205
+8cfabfa60198f426bb7ca31877e4273912547e1738446c2816ccc6b796898310
+ce86f1f01654cf02b7e6f647e9a884041655a76d9d646e2e0098b15123de9ece
+8580c5e8b36946f2aecbd1922d21d15092617486d2a7da0419c430ff83a76428
+d183c15d0520b821c22e0aa806eaedd6df9392b6dd93db8f22072044883f7102
+dc2abf3ab094b1cff83bfafdbc0f115d1ca965885356039bd90c76a78bff2b7f
+931ec1a762b750146183f4080b7161d9e313c90a3d0ba031dca89f5155ef2c77
+d1e9949d07a2a318ed5bb9f43ea2df854dd15c45c09595450b0cc355db139f6a
+15792d516ffbf05d2ffde2ccb492bc5f8582c88695eb42ff075f1393d04e19e0
+5bbb51e286f578ee126792068106db3960ca7e7da8838c52381d1853e731f46a
+fc759825cdfd1c50cca5e63e1a24a9d3eb21a032cd4333648ab4b6725ef7ee64
+4bc1c07206312e241ae8c4206f8d211752ac7cb76f2569e2213c113a3d4f2277
+2fb6c2df9461da1b36a0860cf2dd52ceba0cb8fa5134d94438458dc4ef566166
+0931f0a13a88452fabba8805471b38d776fcfc616c602f91ad0072b92a13da58
+08f716287712de4f6acc57630b3c4343c37c5156fb610f2455795cc9e6804de0
+c7b6b16da5b274460bdfaa1a5249a3219caa1dbda045ce35c3b34d628d0a6e04
+3935f09635d6063592dfee4e8713fb04a74e0bbf8bdd6efddd86d6eab693df65
+d7e71b96d3ab69d78763f6c06b6ee1fc2b8bfc274d33e58f7c13e46f884f64cd
+2ff2091d63d8d0d2305704d42a18c353b55956f11057a920dc00a5c78ee5c61e
+0ab73272866a3b5c6a46683cd4f761f267fc8e98a5ee0e55a9d8cba48cde5215
+c96d0fb18f757705697c13055d7f2af893a097b594fc5200a1fff0d231487f94
+c6217ad21609874754afb8de70a84f92eb3999ad348ee6baefb476097ff1cb8b
+dafce224290bfaa04d3184d02ea2c8525232b1f62d8a3ebc5ed8d2aa1f7b009c
+83d427e281551583ff6d1690692648d7e65e7c98b67c8d181ce0736f1518f150
+9c2b13ef0135118fadb78e58fb01f90fd846fd9e7fdea4a8cc481333305b1e95
+4d0037fdfb31d34bdaff1e1c0ad0f30683bfcb8510c30eca21008147a17589e7
+2a8b2971c2c6e8d45259be84e4884fa79791f7bc3abfd138b8b4556bb75e4f68
+bb934676f740e015396c5ddcd224834f53dcc17fb33bc79e15374249c1d06a1b
+f20f3b29858ddb1cfd470449e098195aa1a64c187fbfe6488b89db49851bab87
+c77b617543570e105c27e7ac73583f02d0541afd6139ae5ebd8382464456731b
+6779788412dfc026575e27a197c5295e3a261864c9aa91442ed12d3024db79cd
+1025564f9cbf5686244000bf2caa92df14db97bd2a10535891ff3a84008209d9
+cad7566b8800ee7287ede867d79ecada749aa5e7ad22b01a9f211ab18e5f755e
+6736bb2fdb47e4152aaf887aff350a7a74eb69430287afc58d46e2c171aba4cc
+a01792b0dd4b0a67624d82b71b19c331e355a909eac5bb94802233e6e3310f97
+da3c5d40ea74ed3ce0d283233d1c5907fe29dad678a9c3309402167881d3daa7
+4e3fe4255ac1a73f15f90ddb601d827332115538f1bf93811a35b441e4442327
+d7fa2dd901f3d66b7e79e09f83f9bef5f5fe1c01fee76381ad3394861155cd08
+fdf2ec5778e4cba57acdefe6a35191c613cf12c946ad8b2b40b6026b5bd4b9cd
+909d1779782f4af32d295b2e8f881a18d2cb0570104768449ee2e960f082921b
+e9ad82731065b3c3ef18aba3f9beee050545d766b4bb012cb05e36c98916000b
+22f7dd0d60090fd5812d9c7e0b7f109eeb4c225c9b6260f687a39429e4ee4dcb
+2b1c5f8cfae108e005887b30a949df06bcfc34700b69a5103330e400e4666a1d
+5c758b6d5c2ad8a733882ac3cf1e6a1395534c3a9300371d3992436227635313
+531d453ae6142bc47f086f805faae0543b21d52962343b25f64bd46ca8f63f25
+bec767324d38576447056a6f508efb68e491af661b46f7ba81da215fe797a16e
+f03cfa53db0b51e39a7c71897ac5ba31d902964aaf3b148e7ada10fb7603d4c9
+b1585312db95625d45a286228dbe2217d6bba65c9a7dcbbdb7bacb5beefa3c8a
+43f848f473d9bf37abe92a2ca91d26707ac230f577f7a1618a02d2dca08bb84b
+3343f9175ebb3e89b36a46eb75b83b62df50b0108d6118f790dabbde765d53b2
+7cac6abe7b5440325adee21be51b9367eb9cdf8fed87a081679e7ae6aefbb6e6
+589cc42556fd865f312b54cff53284cdf8b442c4b3326eeb8d39abb1e0d2e95b
+316e87b7615b0c37e908d4391f1ad9d2715e94bf8de57a1c624512c23fba4d51
+9150b26a4f13be2e9ced538d80ef807612d561dc8d3f5b602f4886b8c9f2466c
+5c948ec6dae5b87d00c03caff6c7c241f4b965a6c6368a30013ee2ad5e1e5000
+94308aecc238f659e736965842b290ade6f05b5152a27fbde7a90fd97cd59509
+f5f05fab13461bd7374399bc6da554acd718e4f67d8696718facf56d5ac10468
+cac7833ba92c74bf186ec50fdbb043223974986e2012c1d18df40f5a9c52fd39
+97df5f9e5f3a827d50b6ebd6909e7a0de29fb97920a03e32422cd71d66bf5c52
+357a8d8eb241c6c8be42b67cfac2c3777a0fa43d2838db8250e2b5b8efd3c367
+80b19339332f67d477cd3600b04c05b87b7a41d0def6bf82fada771804a5a756
+bec34265b6fc9e11790f8d1306d36c0514f6bcc76e93b584bdf86384ac22a96e
+31549eec68909fd34bfcc467cc742dfa628b15abb7aa6a181dc3ac0fd08a2097
+9480abc06fcfbd81e7d4ea358839db58c30c3a7eb5d698cca371f7630939149e
+b897b24f6d957c084cf0e2932331fb5c0b501068b4551812a9b9abd4ec27df7c
+e824d672ffe6e5971ecf816f447482130819902d26039390f84fb513d2d89662
+defd5725eb153a074c84dab1d4d666d6e1a4ae2b078ac16f80caa6314a1f63fb
+6d7eb530ccd833ee1f4946790344ca86668cb3de69c3013c73c971d7bf583095
+539dbe02e8f18e2da3bf9fde9cc5a5e859f9e5bac8721e36a1d50192140ed21f
+a6fcc212ed167a50e940b38a0ab78d3053507500d768d1ea9c7bcc7b3100a05d
+1db9350ee33c7a492f4543b45e25740aa99a76a1dc7940b8b52883974b07a407
+df7560cdf1b103c75746fcfc418580816597424c0aa36e0dd38eaf524e593512
+174a0ebcac0488958b01c1199d786f93ccefc14d219b2dbabd5b50c57ac6c195
+fe51a6fac81db1fae5052f21b3af4ce8280bdeb5f27e15f069ece57b0b628858
+947ebcf41c69d0c023d67cd21b9e0db1366ba5abebfb9c98752a6c63cf1c8333
+d7185403199b82e9e5fa15d33e646e63459352f829fc039ef185e004cc63fe21
+bfbeee4c8102cef70f56aab4e35c4a7ad51c85d985f42d54e4cf5678ba7ef4bb
+3c768056fd223fbd6ae0a390e0e7489f5582d4ad805a6ed2e5cc0502be6f58ce
+b1e3de8cd4425a053f84ff85ca7a1b9c679b9b57457f91c441d9289469255452
+34c45d58ae796a7f21b960c8dd3195854ff59e6914dcca262af6e5db7f150976
+b91527a1f0f00caa0953e082f5dfea46c0029bed4eff22be6a32a9bb591334b1
+68da599128f4b31034e20c0efd5e532b9ded85e5633ae8631e83ec1d6069ff76
+aa302b99f88e0e4070e4b93e1cfe528123928ae67733bf6fe6068c22328f16ae
+3fa5b130d9651b531ea4e197ae3d3c16948503f1842d967eb3c5504e13986933
+cc0a3228269139d68aaf3480875149e25acd6aa8e14f5c21fd12096e274a1cb1
+223159ae0b531804c1a8f8dbb9101d3d0e435292f0452990ac4a646058651025
+3ed58cc6fc71eea6ea99c6f96f029b65f1c24cf911a35076564cef64dbbf82f8
+7de0c4f2faf3e56a1659d2b56dda42a3f63e277645b9bcd5c92c05c8b05adf75
+35b3aa4c341358c7c7927b8e9937c087e5e142b14dbe5e5f709634ae97bc9f2a
+a82a2f3c3dc16b1abbd1e3f33559f8670e1dc70a9e3b0b717ea458518357740b
+75a9b2b9cb076e81bb95d786d4720dd59120200dfe860b6e40f2c723dadb84ba
+e83a80a7c874b9d36a1843d3ab1dc330eb986d25d6e036940f89670cd41d7ff2
+0a9e19ee36a1c334c779093950bea2854369f4ef24dde7b17e4581c9c2f5e5d7
+49bfc7a6a9433ef9dc465362bb2b252d7505369b40ab4ed1280c690599765d3f
+6c395d4f3955dc9e7adcacd0f85b34e33c1d5b0da79e54132e115002728fbcc9
+def9ad99c3c72ef5fb77d883f47e417bd26cc8a13824297bbe6102cf7f60013b
+3410e61d06f4d9afe6d9eafc92b97459a0433a8928fd24240f6f3e388373efac
+1bedcb5dad56b55d248dfa546329ce77f4f94c388362e836195638066d636a1e
+9de34a86088831a498a52821e2843d704bc01d386e7f268855af107ab35982b5
+9a474a271c205b19ef717c66cdcfff8e53e207c2c1fbfb8129f045f0c150a053
+33787d5dd2d7322b3ec6f9193a891c3c1b414f27fea3635a1c1d88c21c18cdc9
+1805f3214e8536500b67ac22ee4fc1aaf6a12be4f8fe82e021a734937f0a05eb
+3de81d728121fa862a4993320c1fafb719ef1851929ac2efbe7c1e8d2a3e35b2
+5dbe28dac5ddce834663b196e17be78fef40be1ff3885293dc9b6db2a7973408
+0730556c0b64d66176078983b062cb073d32000e12e8cce47ff23f877078b5a4
+2207a050c62e39733bcdf87f6b71e39758f531cf55a874fe76548ccf8ecd227d
+9c0d76da8f0ea5b1971e71559203f2c731bf31f9563a58d6d110ea507bb7734d
+3baa443805c67207f3337ffe88e0a052eab7b73296e7011fbebc3984abf53382
+1f38a1483b88eed29606b25619acf5e21e6764dfac4559e8ab2e8b987c05cb3f
+23f7a9b18fc54c10e59b1dce3e3bee7299f9e98cb58df0fb48aa79c6b87476e4
+bcb73de1eb9603cef10b6ff191174e23741cfc9711ee68311a8e739dc52a1b69
+b6bd1afd81df4f6b1ae5df916faf6c6fa778f9330059fb88b5e97ba8b864e485
+b2747a1a7cf32e259ab7737530e55b2fe980ccc088c3f5e2815e960beaa9ecad
+530436a2c0b86f3c3aef098a8dd927ad13f9ff34b87a1a9f07f455b913cf1147
+270acc6db471e53dc3715cff25ac42d6786c3e9d90ea77873b301cab084b1472
+71c0cdd6e088bf710114ac00e1d6d215e5445605034b771390d0ff76d2f7dc34
+1a065f905f258d223b
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/courb.pfa b/lib/fonts/courb.pfa
new file mode 100644
index 0000000..795ec5c
--- /dev/null
+++ b/lib/fonts/courb.pfa
@@ -0,0 +1,1966 @@
+%!PS-AdobeFont-1.0: Courier-Bold 001.003
+%%CreationDate: Tue Sep 17 16:48:30 1991
+%%VMusage: 58156 77080
+%% Copyright International Business Machines,Corp. 1991
+%% IBM Courier is a Trademark of the IBM Corporation.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.003) readonly def
+/Notice (Copyright (c) IBM Corporation 1990,1991. IBM Courier is a Trademark of the IBM Corporation.) readonly def
+/Copyright (Copyright (c) IBM Corporation 1990,1991.) readonly def
+/FullName (Courier Bold) readonly def
+/FamilyName (Courier) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Courier-Bold def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 263788 def
+/FontBBox{-48 -288 746 847}readonly def
+currentdict end
+currentfile eexec
+f0e992e2abe69f26883d6a2f691cc4ffeaadae4ed96950027b000a0e04f88bf3
+07a055997fc4400b46368da1c0f572a6e1e58371f4770d8e09ba6f39d5948f18
+de1038883553c352f8e6add2a9df060927fcda05454a5bce5badc6153a92a950
+b91e671de818c860c77eb6b93cabe55b175ae8265971df2c78d5dc3bb7a23a3b
+5eb80699e4f540d2aa0774262097e2f171f03b3f8143143f7f192c7c3ea4b3b0
+d0bfe6893744a6ef8f3fe2071efdd77eb2ed6a1f8365d33ea9a2e3baccbf0886
+890dbe8fd6ec2d9db9b8a11d6f0c2a5ee4b84b2ed02498706a8c6fda02e1ac8a
+e43fe22852111c257d9da8a8d69c9fa405341c435bb91cf627e7ced2e96614bc
+ff826d0ceae4942a5c8ca794b11bd2bd48dea7cea631afa4f7c52cc775c70f17
+4c36dd977c5cf62ef80ae874fe87bf798674a7b32d84da7c9557f87c4c8b7b6a
+a061b8d1f83190fb4df552d2742fd99986e3e33a9a4c578d90637f42d84cd9ff
+0e866d419216ac5de7308e8b98bf17ff95383454d45ccf07e90cb1a0ce3b51a9
+dd88c2e2b3dd662cc745bb5b4ec33418a1e4cf6c9a528e6c283c34b24da3eb52
+4431c4da3cb34a43339c606956778e666815be262bd069b1b5103abcb91f1524
+5bf33428d6cc1d3e146f0c711336b471bbfaaddb4e1951c8325801c2898c6dbe
+b5d96418513226315c9c8bcee2f3ebc1117d5e136d8119839aefb2c76d8c8a37
+cea1d23467717a8398f2437f1e61a2dde224f07e835e67950bab0542fa635ca9
+9c457e420ecfd17797a5ac7d63b003e4bf6851400b5a9431d9e4746525107c4e
+4529224ad6f666c7b4e8419a3630ffddc5eabfc0e3f1c089004b79b6ffc45d19
+7087ce92f5691dcaae4223416a9bb4836b5e4d3963dba28445d81ffa93d59c14
+96a8bebb0dd93230a8fe36bd1a4e31d3be4818c99815e7ae26023e5c68fbd21b
+334b178ad4989c333c37de8f821bfbbacabeaaf49a38e875a6fd13ea6fe45235
+c96be719db5725ec6e507e1a64daa56bafd017460730b9befe29bb27115968b7
+241f56bbe5e1c787f3ffb590da9c3965c184cc5f94aeff1ea7b0a013caab3bd1
+c4d41e2f61ab5e2eaf1e9c075ca3dc040f988ffcb815622c7e0c31ed670a9aff
+3833cc7707c2887f0de43a590344a70e014cc67dee79bedee7ae796448e61c74
+02f2f7e72f5db644c2fbc093f5ff5d6a787194de10423849768a48d56103bddc
+598699a43094dabd1934e8ddeb284b9651b9ed215c9e3b5a63ac766e29e7f0cd
+2a4f010df4b1114115ce819af6706107be602a21d002e1c45cfcdb568a1c617a
+68c25f2e3e0781192c7ed85f449b56caee4ba991e1376ab43c1c556708e65797
+ad13dadd61ebfcdc57dbb59771fb0c8f0b4b829b6b4a575f17da658fdc2a261b
+87fa8d8f39540f3b9a0cf46b59341ad320f37d71a8a9811f5f24b307ca32ff6d
+e80b35ac8262334afed2567d691d0ffd933b26b977ab624d2757ef20e9ecc3f6
+8b0bb17594fad3c27fadd8487b441fd520c8feae3b22646d71073bf43ce3597e
+6063e073db9ab0ab98128b97a84482edff091bc809452f0b2a37b26e5f9963f7
+118dd4f78d097efb864a5495f0104674564227145d923fbf39d1e85c78c8f92a
+e316bd6b70231733d39c10590c070d173c7a4d10e08e63303a77206dcf01746b
+1f78cdc44e06a26191024686d64436e519ad103349fa496e4159b3a436bde5e4
+20bcfde3d3cf24f50a1a625ee6274576104a3ec62c0abfbb14bf6dd280559160
+887cda1b88edb9dc2496813cc21e7e26fd42fb6770df364096d34cb66ccf8a40
+af4530facc5dfc5a672f5c893ee33e85a88113f2f19d1a40dfdbd2c1f7e132ed
+3a2607569db81e7558b536d131dbc71f55cfcecb31137b0d807cb90b2df7eea7
+6e7790d59d7ea4fddd66247058ace1d33f6d8cbdff99be2840fca3727307ef96
+3e19cf0f08e953c85c4141bfdd8b6f6d942389ca120969c69f35c10738f5bda9
+b872253532604e5058fecc5ac4b911b3602546ea3a3b5f84dde99316fff9c1d6
+08b59bad54015883cf8cfc01f9828b9ce335aa26dcb5c6f445770d0fde2df51b
+83a128c79d7a1351e6da950c256bf97c69f73e7161692c192778d3d361149c40
+9c27e97562b7e2ca2f0a498818571fc7eb9552542bf56c93862aa9e06839d169
+ad983d0a370b0655d45260568ebd3cc272c344a3d0697e05e27641fffbcb13e1
+aabdd1cf7f24a5d550700c9129b392746103afb0ab72e0f0305ee21eec6d54ca
+bb0e5d92b7493719bce7ec85b3f683ceccee4fcfffc7d127ee6e8f76e7ab578f
+80933ae97405f4e25b793eeac86057448882c70e3497d430f8e6af1246a38a42
+0231a4f8bc095b87ebdbf6b6e5f0e9e824595835e06224fd549b55dab5d72511
+a8829822fbe050dc7b9d952a1a8274eeec665a7cd924718bdc21747e43ae8cd0
+acccb305a78f6c201916d5db4efd23a890826b74b9402f141de37d254d7656e1
+093cdce592272ab46e2c9dee9c100e7fd1f3a558ab7eae233b167b447bfb56d4
+becc14a403850a481eb75b554adddc89e1e2d0c1a5ecca30f7c2183cebae411a
+28ddbe48777e38e16bb02e1f62d1f9a090427f47a5da5bf867c04ae679617439
+b4674e92d80f659734b10d62ac5fcf1d0aec16297c11ba085eeab1c4a7017cb3
+d9653f6e8f77056074e3933e65ffa2b08acfc8b90599ed85f5d91818b80bba55
+6c05cd944be5e6d76e00f6df048992c4b293b83fe275cf4231cf0648f26a0d28
+0593ccb41a92b97c24a39de7886ba7f53924743fb66baa4c01ee21a16c66561d
+4fd8cfd7a7e7f4386cb6d818277efb779b2b219adbebdae898083d26d561e797
+14553ff7b1df6523f5c50c8d7d4bde22a4c220f77d9c3416709dd5c4c6a2baef
+71c8a7f65eec53d15ce0112e745418467e49172fc5cb0d5df2c000b3da184ddc
+9a3b24e4e4c919717c9e348a1a5665d06ee268303c11ddc16078fa8424796663
+eaa26915db69cc77126df2d80dde5beeb879b9c23ff1acea4dd0584f45ddb29f
+bca6f48dcd420b2fa5e81dfb3be958c18bccfe7c6a61016614017745a0f10a03
+ad4f56e670ce0a98a227feb9fb28b1b952c4b86bafbd9210ab745828533741b8
+4efed05f94d0aab602b37d7e9ea944138c541463621ce3ddf0ff99ae36f8b9e0
+c14ee7820eee3a45b8d69e8f65fd2288e6f1b7eec5c2a45822ef46148db12390
+e87c7a2708cf346e04f0bf81cb5623a92d17405cd0430df9d3b7cab3eb6115b1
+d18a1e8f3b56f1b93322cb091f1ad75e1e12b36f052592e6a0def7f5dd9e18fd
+2f52ec209488ca7a954a04eaf4c6c50d2175657755512d43734ffd5a545cfbc6
+f9b1e740cc0d3a171f46d0bfa29a55287aef25886ff435f9921b714c0553f566
+fb8dcf761180c167b014b57ae4428ba4ca642c0a88226aaa4dd86f822e93f19d
+3ddfa9f26b2a1079d87cd7b3c571f989b92ea58fd6661200664b36fdfb4afa4b
+5169c09ff2182a2c973b8fd3db31d1eb306957cfc99b6ffc9c060cc2c77308ba
+7f09373339b2a28eca14f263f91be194705f9b23915e2f6d68ffebdeb9b2da73
+ce80d19411dca457ca50870929f48c8d72badaf27fd8d64cbe2c1ce900cdbc35
+cab95fef9628f6c87fdb6c45e61e3c6b5bc15fb2583dcbce919786278ce3b691
+c0934f10c953d259848784fb9f325ee140f1c421d6d8a63ca4096c9c1ea6a5f8
+0476a9c4505129fde53639673371e803e60e3d337de079b2377d0bc9677734b1
+1188a98bf1d009d0e82d8e3d8817d465d568011a7c59fd2ffaae8d93379d124e
+91b182018b5e50b8b7cb0cf1f914edc6b44b38419caf14bff525a4a5790e85d0
+0b7741cab4dc8711985ae161a253f878e51a453a8c4b0a6c84f533affdd0aac4
+3e6744f1e43904c009f4bf3d8a677d66659108b526ecdc0ad8a51d16de6f8001
+4efb474aaefc49626bf733937c1d25f17f3d30abd35e074527e26056b3b4e0d1
+d1787939b0c8e14edcb4061ea004993463249de82d73912bc435c4d792fae794
+7b99b3e1ab7e5e1018fbbf1003b9fa965d43593fd0aa1b568b593d9dae2f6acc
+4a8b8d6d8b6b5d5fd2aecc392c7cb83588d250050dbed3b32df79de71ec1984c
+e841adc77597be223a79a37ec8f5ac91b45f40943932bf30b77a82a2c62d874a
+da8b86f910f1269ad594d5ff033724d3101098630d3728baf72fc281d13cde34
+fbdb8087c23d86fd0cce3ac530c5ebc086062ec32adc8fc2e5ed66f38d3b5a07
+d1f41fe240b3065bbd5f848d6c97f8b2ae149d07502166425d9285f9b9929100
+cc3b8c824c5ae124157f21d63c17d75990740c8e083540c0fdf55ab6a6128123
+894e6846d8f7098bc76ca1f696ecb31cfe5496ce20ee4859dac102bee4e9285b
+2ee0d97409fe5fd5f7dab76118d8394d3c4e91fbc3a0bbbbf314d91671ea9206
+598129e121977b36e97a9e7cc3949bd6aa7e92e58ffdbecc7bfa8712277d2b8f
+8e0f6e402e5e05b70db4d4d18b82a92dab7e712749b5632e62aaf26988f4ec20
+9755e47826073aa09c410741a8cae9ac19f0695f61db9552db60bd1d8dac78a5
+4a649f77461f7546fd35e33ae5c918d65418aca54cffedab20a86545a7d7970e
+1ab75c12d09714a37fd516613f1e9ad1887aa3566000bf8a7c9751ae22ec3be5
+5f7e8c58229da2944051ad23625ec7b1c26e65d30de52ab5fee7a5d3184cdf0d
+4acb0dd78ad3f79e2d6eecf19d8d45a18848611913336d25267ead7b1fae93a0
+c123c0dbc44f0178a8a1c31b8ca54827b34925b7b1432a029380e9571442a77a
+aed4dd342f6bd1f1b773a4f1ad1c0d4c955a1faa001e2ffdeeadc86282e09c8a
+ac6b9d886ffc443ed05966952482a7ef206e891c90b9dff910884ffee5c78de4
+ca40f6ce31bf465859c27c7b942246c43ca286dffcbb08ce12842f32175bfcb9
+21d324e0746ede76064849874534bdee62e99b2812d07314e76ea833e491b01b
+7dc009f842e10b4876bae3f132f8ae3ac04304dbfdcb2785557e7b48c45d940a
+45db8cdb374097a8c745ec7951e6e12ff3c51f0e0c8e7a82d3f77e90baa09658
+311167e0a688701bd62c3a598772e12c107deab4fc6ae3ce2b81659593e63734
+2bce989299c0cf8b815ec475e6b281e5d93725ab50f2881cd14588ba1cf800c1
+4656537f35711c98bd0d0fffd6fb6a1dbb5b8e3f3047d0ec60b902a64589594c
+904f9e4ba36837f774951fafd3b9c99b0a7e643350fa50fe0d69723493507b57
+6dfb9c9befd7dad68d2a094abb1a7c19d8b89d6b5290af2f774dec10699beb25
+9fa0bfa8d76cffe9ccdd9a56e20dbd043bebcd61b4f8d795d6f273705ef0f664
+02ca640413e2b97f721d16ffcf103a49ca746d4f166b3a241a9d35edeff5fbb0
+19af2ea1e4ac319ed01a39ebfb2623dc69470d2c7bc38e876daecda4888ae494
+28e94d9377c2634402dc988423358bc949db18d55388126c982b5965a9ad5648
+c12f46f6e5e6518e323d685011fbb99c0456c4566ba542929d767c7bd154454d
+75ddfa96c0e5a79c6bad3d0020556bda8b74e6199f327b0e17e5c3706c2adf05
+2007f91040a0f256b4d9748754638ff019afc766b12d937551b1814f28de13b9
+78344ae18668bd5f2792f7f12617043e40603d7474677f0b05967cc58a0ce610
+4c7e806f0646e6a631595384aba225d071848b176eba2a4232a2af75faef21b8
+cde74831d96c4682bc4c285ec5d4e1433b2750de64a9f42d0ee379908bccf699
+6baff1d5e115eb31e88aa4f123f4a9ab2ec71f3458001e53549a5bd512f27d50
+2f75d33db2732674738e98fd5562107aa071edf740e6fe4c3581f7f1a6bdea71
+11878ee1514d2a764770bca4a1db912ff98d26b7540915b03811844bb606fe66
+3d5de9f1b8ac6a46cb328b66151d5a7aafc5dbbef4931a94409ca6fa9b26c970
+f275431fbb91a35622d948fd939e56efb989f007b0d68b012a045ff725cde14f
+9acc5df8b491f21ea3fc8b2b435eaee1ad74572cf52f1e913d44f4aef6df048c
+00375d6734d0e829c0fed80358866c1988e3c09c7ef36f5ecfc0ed411e0b746f
+6b04d7cb5f7134921969a2751074a3e33e9a7e2e68f501e66b71d3f68f7d736f
+7c4cf241a6494045d87f7011a4a67279ac40d5ebd644e9fc56a97d5cdb31dc2f
+f047589909a0a4517d6057e668f3594fef45bcdf30c854eaba5c1baad26e647a
+097b4a0ab8538459ac97d822dda5827d96f29387b40f4b673bf3dff58b6845cd
+3fa300b8cf4acd3e6301f5a47f1370c8bfb8bc8b3a961204e2fd696fda87c16e
+30ac81f9d77634c5e8b19eeeaf9ecf43637aca16051acc7b63cf5b4fc157554d
+e510d2a8f1c65369ce48c3233c445a0e4a81df26d68a2dcbdeee609e81affc6d
+632d584b2d1e5939fb0eb3c6a7880ca593e99bb4d530445bf552e9f7fb0bb25b
+b13a151832acb776c7768ee9bfb2d320c90d746df806bd755cf8604b2b0b8786
+052c5e8d2cb2f96c7876dff63f5ed31634ced7a1098d754895ac6f7e8f5f6a01
+494770c3a22cda0fad4411cd76fbc92b0c76335a9bb5b3818259e62383f6a1e8
+df4b1ce43717a343df9f91a5d2df077af4fade7cb9af6608804c08808ee2ac9e
+dc25407c6e3ca02462b5d16e705f90b8fc64b7d8679f7d0de875b72f7c9c6a3d
+b45e96e0ee3ee6f8cbf4c85f09746745ecbcf39ac3b7d6e52f3c5e79af0962f9
+91935435880d10ff0f00dcd7cf994af8c776700df9a07b6161f44d9d803300c0
+8fc227bad040c6658beb8bc4a51bb0adf41beb908d39a7d60137a43de5f1d97e
+fa530897e71be24647b015cd2c76c0b0d1bd0f941499fe00ea4e09dd82910861
+e671f2f0c56f5d4a7f6f19999b4ed50426ce7085ff5ec9716f7393d604fb7387
+fe09bb5346a8cf2d054a7fd817e075e61961cdfcc9ff71d4651822ddc1fd05d0
+7d8a9d8d76da5391bd75ac047af65a351681baa87c9a6de0f1027cdf5266e68f
+48a290aa2197ba3c66c575082319700a8527fe308c78cbb4d1e3a2543f9796dc
+7105763fe7e57106179e22bf52aa25d472d6bffb0b906d24e788685b93211546
+0b97acf5adade19cd7cb6d9a5e7fe5012a3fa15e6e1b85648da877c1e3eadc9b
+630d2b92f60189c1fc93a8d49b13c1b97714052b1976599f98dd697b9dd91a0a
+06510ff600658fa9979cd633296db2a67a5d2d9c42fc530689167b7dce26ced0
+4d8a509f04a9cf65eba06ceac4c5e3644ca3280038626245666a2e0c19532c8c
+720afd6d43b436a7ba1181ea34b3ac852481809ecebb4ded573b688e896ba021
+8a08eedf873e331fb7d57c2fb132c53f1fe70356eb0e8bc41368f966b3cb9272
+fb1f8e44c76f0b12c3bc79d848fbf93e55cd36eed1c09e800b2b8f53ab92d8d5
+2c6ef3fcdb64195f74eb7b8e7f2052affc111c48818d1e69fbbf38aad47e59e5
+45dbecd57c7c9a42007888fddd7dc740742d3ce06aa6370d8427a3924731ceb0
+6330390afe0853ab4646e48ccb5d49286ded1b38188a881c8af0808db19d39a4
+b3525226b5cdf3aa901217bef8a5392651e4fb4e8c1ef6dcb8faa406d7ba1d77
+4d13f87ff0c0064ff0fe0e3dcca2e79c124ec86ec13762b49208fc35bc0ffb92
+9b8a38465533f260166c6f488eddfa0be4b6d15b8b1b59acb4e8827655eccb02
+559e8b90b384d0f0115f7f44c7a6247f246500aad2fe475a6aba511a10d70650
+7e8035d4f83e33adac6e14fe40ecec89b632c06996f1d68e7a1655d69ac4f6fc
+227aa5966547791a16d4416d785836b5a3724146a34324ec12a09cfd7519c05f
+d395699da7086d56e701539e0363d71fd9b279027252c8ccfa7a3d25a41a9644
+7d4d92b7fad210143afb526389342e18b790671676367c6cb41c3417d75522f7
+2187d83b605bb6db3a695d6cca090cd353e23d0512c06e8810f0fbda1b19ea83
+ebbc1ffc7f90fdfd8ef644874a7468f121564c9b259ebc94ad0b69c83cca6e20
+11f4a698aa690893a2116e502e847f9b9990b5a4d3f533bfe5ee1b5436b2f692
+f6b5f6b779b4e59697ccd5c04e8c0464009c48bd105482773f873902bed5ca6c
+b13a0d90c4ddb6ccc416b349ce7e2c8f91dc5219011ea6df871029ff22c7d10a
+fc890880b9f13669c7a6a60da0f66e5474cc30ff1e12ab765aaed416318a8405
+15ac5c30d883903bc5c04fd20ed977e22482591a46c63ff11ccf18756c080377
+b4f72c4fd3b127700dfe7353adb29431a50ba9d0ccf764a450a9a57668095392
+d9f924832309bf16b8d17c0fe2e147b9afd086c605ed6998f9873b9136575722
+ea03bfe76571ddfe0c86a1b5ee8b3c0712a81b397b5e0e6068810b0ee52bc0cf
+1ff6df62eafaca67e1f553316a7bcfeae787ac7bea86056fad39696b222e887c
+b1aee0acb9e4093068661a6564292808535ca4c7b9271165c73eb89757db9438
+47e609ef5766f00c21cc5696a5872cf39ae59e79ae9b0854dd3b6ea7763f59ab
+b4443fd1998d1c784d815b4c067c844d942f935123a0ccb76532f18572405458
+6eb065f20ca9f301fb04a0f05bbfdb167ed497dd191a06fd43c060fee5be2ffb
+b804236bfcb6c81abfb5ddd864a61dca262b97c5db8332d049287c39e0fc8532
+91bd8e2731532d461bd22f4fe65603efbbd39715f38fd06fce91a0014e80e7dd
+f80fb0f27dc96c6df12881a7c4f1c47b2c7b2cb7224960c44dc616fd8322efdf
+1905121f598b6e0aef30353763662ea6687ba0414cdb45384a729d1e903c51cc
+da599e566012592aa78c55e45808cbd9952c8c3b2f21d098370af67c2270f32e
+1dfbea8d7fc0b88a491b4a0101ce1d74a10e27c2eebe19f361b2fa384fe946b7
+c9720e9ed02b59cbe30062e902fbd01930e66400d69c274ca8ea0ff6f7580cb4
+54d3c3206477f7b0dc20cb80055d470383d137d226be0f9a15374e0a0112b04e
+f25db5ca9ee78fdf7fa7a8b3867f599a61e010d6ed3ec8b13e1439d3a231a099
+2179d4deaa4eefdbe467dd077fa49fc330f9e06a6aee7d102a3b55890e0aaad7
+e2276183ac7cd1259350ac2277e89bf452858d9418ed01a22919c9012daddc3f
+ce9bd052032c7fd79148000277ec903093c227e52f19b959a99c7edf0689f4a1
+9d004980edd98997da23cc1ed63c1cc0f1e46340d3cfac421df31a95f032f297
+0c397915c5dbb92a8596896d1d114a0964926be4dc940e857c5a53cf8fdec3da
+e2958089db083fcfcd3eb090282a7c978f3f58e93544c9173382031797bc2a44
+b5aa61adec96086af8ba5fca90dffc8d0f4d5a8a22013b2ea06675eed2641fc6
+03400edba05abcbf6a8afbd3c6319f23bde069c6721e7679610367ce47d40ff6
+9c018e23a85e2971e7136280bf42064fc33502e6c7375e328c32f03f05e1e3a7
+d35816e5862966a1efeae1eeac4a4c1a24cd89467bea5e9670da181fe333f795
+b6176f94702a496f8c4da01916dd5859f41fdca457ca50870929f49341d06392
+715d71e508f55416a59ebe5ba3c093fdadba2ac413b6238314e8eed5c7b353b8
+b09492a35309b3da82a8af47a2378c2e4ae452b5ba4d706ac27ca5107f98d4e9
+64300bcab484fdc8c9c967aedd2f351b54ae0ba150334ef42fe7d57eafbf1074
+cdafea5358e2239cfbe0abf635778065e433b9f1c17357e67f692f5e98641723
+24aa6a462c0334f2ef7bb30fef10929224ae0578fc49d68f7f48c91655371e99
+751c18e5f4c375a734404e533dff279c9a2692956957b07d11a72ce6c7ca64dc
+8c90eca4cd037dbad39a5e6393ed0ff2855711dc7bd1f33f122eaac8fb2cd4af
+ab6a00132c1300f152554b81a5e33e864f7baf93c2ae5d9feb5e2bca4f4b48f8
+c813c42accb8a9b1eea5a14f5f9795257d70d0910cb738a9d8d47146cdb5c837
+a74c0402493a3b3a849306cd997659088c8efeb0050758e1c2d8742f34350304
+8f80ca8cc9a9aedf8008579dd936b29e3f8495b61f0e416f7111124e95e9b0b4
+9c69063f46a9ef1f2ae58c57392ef498b1e0b9980f274d5d4504b47f03261e57
+2ce746715dd521d6d2d9ba1b570ec8de309778955e06f065a3d82ca42d0b8ccd
+5e635b1165478acb9ba24f02e429731c315ef0a2cdaf185a142654aa9dcb56c5
+c82e44a81a57ba271000597a99f7111e25f7a4247d40287bb78478b07f2c220b
+a4c43a1f1a87cefdd179447e9ea9cfa41aff4ad8d03eccda89819f0039637e64
+2a8f3de1b7182f4237c27429114ce1dd195f546b57ac964d59cb821b2261552b
+c8498cdc5a76879dc4de1dfaf3dc15505c0d3b4cda3ccfdc1049a9a5c48fbcd8
+8b74208e6c99826053abf4c2b0973277ddfe6505bb9f77e8a84957e144516600
+73a0e3fcad8c597bde3faa249d2511f545c051ce6461e3c01411ce7945ea829f
+d7f4ffd30ccdf757e7039df7deee4ef47a38b6f6f9f7af190b038e464ad3863d
+20c2a06954a7f29a61cb9b7daa437bf06f8b6a34426e85c94c93b037098b9aec
+5ffa37fbc51d19ecca38b26adce6704cffe57973a0090951da23385cbfcfee4e
+4c1f040273247c1f9ef76d20381ef92c9f7bfe723e90e176a34990c19df2ba53
+b2d0a21f64d48d0f2198444c945084f568a04155292361de380eb864f8e5e452
+b37db08686546417a3b87dfd34686c1dba5aeb055d5841c30b1c8c1a182eccdb
+876ec9c6a49e02e7b249d3da4061fb63a0342729a26838be79d6939fd0460f37
+fbf36c6a6a76c6a99478551b095c34df7d754a414ed5f0dd28a99519226be1b0
+da01e883e0d5b34e0f2a1a0d23ecac458f135173b7ab3f3c1d9441f8dcfb2c8a
+bffbe97cca66b4a1a3924333ab8c79151393a21fa0a215577b808f76b31f5065
+43af482160fa036f80f8ac65fe25d9cd2963ca14ab51718caf8ae7d636fb442e
+2e414ac7193fd67e408e86a034036f4a7d1a61557c11ecb9466a403e5b744427
+cf75d3be6081ad827b6db779da50626390603ca0f3adc54afac1febbdb78d6db
+776a4fc4bf7e1d0edc29b39fd107dc5974d03fb34a84403ce3b2f603fd30703f
+4d0e6c4fe5607dc36c530c88f6424c5ad080ed6b949e968be2b3d3cd9e719e62
+cce1dd547d54e39521e1028ee429689ea3bbab05e117fecdcb93ad8dcd04eddf
+f5de8dbecdfbbba43a6f66cdbf3c81f572bb1d4568311224685e691cf31d5961
+768dd919a400b000e74bbefddbc6c9b83ea18c82839f55a3bd3d8b6b900460cb
+b62526b4980837609d173a5870465d334de87bd11eedbc2f400c687e2003d74e
+605733410e790c0fb5a28c57325916a11f92ee2b9c4124001af738fcb6e6c588
+d75fd336e5b30da46d805767468fcec686284c953049f3d83dfc986fab43eb93
+bccb55c9c0304300f81602a9b9d8c2233baf519c7d72d11a55a2b7260f763437
+cdccdea198ca7cecfd9b5eb79da4772e711c74138a778d6a120fc530fa5ad085
+387a944223ad6cf9a621052e33fa3b64f60871dab95423565d806a64c00b6ed7
+375ef1aeaa10ba8f0843020e3fccdd5a830d79039544981d55b59fc6f2a799ee
+124640d4195d9db251984dcd0a0343c52f78904b9c688d2dad4260e7d4967517
+194c29b9313ee2c54939c329da64d5920d26a0c9718de120e577d92af78b8a71
+32180c1acb34d07b0846a34fd494078c06f3911a0bb4348825c3b5a0ea559449
+7ca555e36caea15dd36f778d8bace7f154f8a73535a845a9b3c97ab136eb96fc
+276bcb17ee7f191e8441dc025b272c59d4f454278a75f64925e441e40ff9435d
+a012b8f2a7686f6128346a5dda941dc2c5b7e8792ea8379aa91c38babc76bab7
+397661c8bc3162de6290736ba23fce40cb1c3827d0c65b19a9a23ce1b5b9cdfa
+60a7f0742a4ed69ee7e8d2dc8857cea1af870f7998e6fabedd3cf197130cad2e
+7c6d6bd75c1d24aede7d6e0160c67e138770e8ad4ee8822a8782cdf9e5e45424
+7ba28985a01dce99818c05f187e431d62e107b61543a83ee1f040d6e46b36a5f
+223a0a35418c9d328c5ce67bfdde69edc88c13995d52c93483abea8c80e083d5
+a384b35c8d2f87deef4048290b34bf3dec299d16f37e1baf0b620a72acaa04d5
+fe4731f88411c7bb53c4768f85ddfdfed7e7696ab17922606163852d79e8bcea
+e6c9d902108c24b4d83b5f325eef14c818bab38587b75532b9d38edee82204e8
+20f956e4f87cc7d033d68cb0017a79638e2360c4ff07a81706109beca9258c7c
+a60d52f07d102fdaf3cffb1ad14b999234d302fbbe7d3af784bd5fd9d1dacf05
+5b192654b7febf7f71d88277b3990af63a98520f27f65758bd9b2e5c1fb4f940
+b87ad3da4c96f4e1d38e5a7ace307c73e82d7b17c878fc55c33a3699fad5f841
+f9e9d17d92a4216543db45e9f92ac8f36cf01f220e295e1dae16cb50986ab0df
+cf7c6785742bc5e04086de192efe19fbb871932c8d992b763b226bf4f054ea42
+8ed3f6a580bb12a1a93e367a505ebad742ed63d4a9ef7c4da3a8f6eb55eb8cbe
+dd59afaad1e24a8b87c17f3a9c245dc4a30dfd8b0eb424d94266d61e2f47addc
+0a52fa4db7bdb7431e5f80604e95e4091aacc7bcea215e75a7eea59642ac0495
+6c08128c27c59089db3fd75f1fc8043d9636f4c0e3a29e2aa5f726d37876e6e9
+de7e578926359f3cb67ebc2e678267799cfd41f29de2cacca067715e79415fb5
+a5c06eaec36e4cd8d5c818312ffac88ccccad7fe46dafc3270ffcdd78c52f205
+04368ac9f622c1cb7ba8fc968378cf54cb42ebc9330062a9e9dcc466b674a9f7
+c455f575c1840535782c9f4106a47d5695a13f6fce147dae42e1b05784d0b66a
+a0c3a36afb3b58469be79bf5887c606490c7f9bc66aa9eb06aae67bc3f6b2c6e
+b1abafb3e128ddbd0985505adf6fdb4f85c84c6a2177e9871488885682125b3f
+d7ec6d50dc6886a867e87122502d7a5ec8101d81150b7a7c7836ebedde05b5e3
+a2b6afec021c3edbe2911bc8ec445638bae593b0443e3407e3218d59eb85a34a
+aa02d5b860324f28b7e8461cbb576fa71515af67c0f061ea0426f9b055f87066
+cfc94c2594cc55caf2be5dde04c6f36cf3261a6f9ab826134c9c56e6c9f76a9a
+c88734a060a0ea4463ac6ceb6a1c782dcc199be95860539cbb7b2ce5fc5503d7
+51f0a495337b94fc7118f7101b837651776ec0d40f1c61b57d7e7e16a0e410cf
+da4b0dff5728fee5922640e5faeed1e0d6b1e8b87c87e72feb3bd2a7ab8beef2
+c6ede873609fac5274bc1620fef65c7a9b52f8ed233fcea62d37f606d79699d5
+81bd29d2401feb3a9c32a34f15d0ff1ab299abeb05fd27cd6d26d8dbfd91fe3d
+dc8dfb290df7a58b72dacb7c24b4067dca4197f298c43ee8f9cea520c2055cd6
+0bcc95e3feabe7e6aa0abbd41dbf4a26c69bfd5c7926c5d4ce1e3c30b3165514
+5258db44055b68401326873a05ab30f645417706cc3fa6522098cf253a851e93
+92574758249035e3ec5e7b3a03f81532d871cbdf738e66261f51b094c5e3e8f9
+480f68e8f26f68348ab9afbd19a49653cce7ffffe8911ad8eb2761696a0c4eab
+39e268e261003e4cd0cb15fb36375ff4b2c39bd45710ed4396c1d89563ef8b6a
+4e86a73b8d36465b37cd5a50af5f8cf613e7c5fb9db895c6c9827a6e2b1e681f
+461dd52b5719b4d048dc63e47fa3aca8c8441376318be1358250f676bb9c4f8a
+982d971649a6e687c43b3861050bf5d846c24ce2fdda4917077b1cc4109bd764
+c650199f51dbd309877c268e750230d507e1140caeb2cdfbe1a03ee1d0f4906a
+645c9a378691eadadf8b1f291e32448f930e74133183379208b442988ae5da75
+22cfd3cc728a5dfa50dc4a708f25cb851fc94f5d82ebb37b08ea28b43a882d85
+b4d454ed11ab74d0ed50536577807e736fc6cb07a890537ca45e15b3beaf1c98
+07941b3a172e85c4fd7dc90195200036d413cd408eaaa640659e9826d9ba553e
+215ecaf8680b04cefe02fb8c0642c028f530815b2d2e4dfbc600852a7412b963
+bcfa31432a96e066ed29ff731b75dbbc801442f521ea3f4306cfe0333b4efb06
+840a81f213bc075b113050e6ecf2c18163f3329898e167e36729340f0cf89d20
+b34019ad3e8183ea5f666cb5387ec8ca8a6ad62b93f3554fd43b6b1a21dac8c1
+75299570f4aeb3c51b6bc7cc3cb80d0d2789e99625a37396aeef59bb3c661761
+47e02c3fb22c4199da98552807fc8ab9457ce81ff4ea010a36b0e319f1e98bbe
+a63056668a65b1822cb57a82551b1ab33fce67bc20cbd56e559bce3c2bdbdde3
+ef5d1f232eca045018b639b7378fa773c7486db53e1947bbd02f827a7e19883c
+078778e5bc7697a9e474804eb33c2af722dcaed37cd14e8ce92d093b83335eb1
+a25a6d99c7e286941d682ab64f098e93a252f959ba4e9c3ae26dfe3ff8a1a3e9
+b78e85efab7f67e5eb32d1f517d62d35563092598b0748b26c9567801223e93f
+adad3cc790b8029939db16ced7889de68a1767f700be22433b7494a079d6c85d
+b3816641d6ff42b5a99e575161254ce929120b78f489a76ca4f3b2f1ff4eae62
+16c08518955fe8e4e8efa4cf3dcbdbf512fc6be7329bc046d61acbc6b19540b2
+52ad79177053337ec4fc094c977cfc6eb036b5059e14b7f92782299a40c88209
+f7021f3d155b2fc306e7edcc98f9e93a6593caf8b4e5561af4088ac9c2ece955
+1b15f8b538d7f41731dc09acc707f08bd8a59d92d7d7eaf5764bdb7c5e85547a
+32743157dfeeaf3f7df8192a0da2cef45e1ff911d66cbfe005170cfb933d8bb5
+85d93708c87e51efb522944e2df9fcfac13ec7079e1af32d03e233af8ea6604d
+4d906af71dfd8abee459fdeef767a385b15d0e677b5034c1bc91f047b46f300b
+db6092c34dbff505b0897ca086377772ecb27b9ac70019cac5333d10b67b5b71
+482f241a91fda05af2a4abdb351c42672b580a25f01b79b8fede4c01051eb115
+c64485e3ba4fd9478f9172d6cd73198c318c9db59f71ad709b9d567b4e31e2c2
+8d0b93a1d24c82b50f01a070a952a079e1e7f9c2eb4bac979388d99a25577f93
+57d9179078aa0d2f7a8a65d58b8741244e3684285dda86cf3808e68b48accaa9
+5b3a91fa39542cd3c80bc5fb5d636ca5ecf506fe1e4e645705bdb10f9fc67a56
+7597dc5c9a1adc7b47c404c06ef16daa37d8fe6c952e06d056dd15008ad2e796
+15858275270c5804432e91c7adb467102e1e7ed962f04f3f6d39c6fbfcd93f21
+d11016f5e65e9945c1442ac63b535196d65cd3990d94128f3701fc32d1079668
+12749bfd5c15d965c3174221882914a1fab5495b5fd0d7a7fe3b11935c3aa6fc
+470ab52a32c9a9fd1ddbe800b60f3f24d9d9147fa86d0a0925d7140b5a04a493
+f3ad02d6c352a1f6ebf7ae326f6ee88d7701ee907c88728150e0a2c214b13f12
+e7d5d83efd62cfaabe68f02fc23332703c02daf224cab53c624dba61b5ebf164
+0205dec482b3a52443d207a11d4b4ecbef3dbcf17d48759e7e1d69108b4cd456
+d263d15d719f5230cdcabe96dc49df253b44aa047fcef75ddf931cbd6f3a2a52
+c23eeef852c1729e23e3bee93b0a5085913f64b7c3dc650432ef005301062a5c
+90c400852a7412b963bcd035e6942cc8ebba9a1e3d3353b26769ada213428979
+78a9f549a86210d53598cc1da57b8a7490ed6b8368cfff93578f979d16c8819c
+80dd050fc4aa8ccb4f7b2681245451d0d13403841da091442013a6c5609c7d68
+da409a41e4d90f36d0acd74368bdaa75e618883eac528cd6cafd20754cea601b
+33b0a58b33669ef561745830793f5a06e72c0c8718d24de9f64af17c50beb1f8
+cde6ed0ddc136eac0fa98d9f0ab9bab94d18d86a7907c2bbc50d69d07e3fa905
+68145b3c0acf303db053c8a0cf1d7619a215f6753f804c6739ca8c1017f553f6
+48d857f926d74d15812215b7fd87333b8f00e65c81fdbc856f1323a342bd0507
+be91b5c365d7f895e9c374a9b8e0d1413220403e4b5bcbfe5a5977640249a233
+fea8f1d22ac9f6e506801c4a68e9f8108af7ec2aec0ebefda8d1ea7851c0b226
+b3b8a76d93736c746a351ac265d9de903de0028a2013af8aafeafbaa8c2d1d54
+523925d4d606b13bd04f0e41fbeffae0f00d89c83366a1ee1e5bc0c18ddd134a
+ad7c32a0a25b921b33d91846fe945d785888091c558e3cbdeb761922386ca63a
+3ad37a2fae3f575e40d1223b416c798bc3732c6dff964b29a02714911858f156
+9c87d427f5087455da19f24eb75712692f3693f1d2ea5b3f40e9f9eeb0f0f8a3
+d00a0959ca4e3bfe8c4804a429ddee8d842c8de8312610e2cca9cd33c51a5145
+e7f8c8b97df06a0a023a43db46268c5bb2247df3993dd4536837eabd9c0d381d
+da84bc4ee58e730442cbd7966e070d8be71a0b24b871027bb3d586d8cc2d6fdc
+917ffb3e85d5f32acebd3093e53c83bfe41242307d774cb3ebad79ceacefd887
+57a0ed1ec8adf7cf1952411601ed59f4c4be8ddec78dd26a10c083f6f04fd83c
+705ed42a0891a5398169c528f7911cfc467cc6df8bd5c835494aa1a7c5bcb836
+40e6c78e60c19dfce997ed6e0dfc88fc01b0349e0455d4f22c06c16f7b9ed61d
+9ab3d5a4f6e2fa2ef4628431cedf579db02dcc30a54d6c10392ee4480af0998a
+b823cd0f9484c3579e90dc412967faecfa026bf654602f3bf6b7a6ec54350be1
+c836493fc0ded9384aa53b770cc0f008329765ab5bbb896c3bc12d21f37733e8
+7c7258778a68ae72133f40defc3a817a72c8cdfb2c2614bb84fdd568d51066b5
+5d9b4dfaeab9dc73b2d489cc1cd29461be050cc6e72b15bc7fdabae2b7792d34
+427ac97a386e31161bed431328c0ff34725192b95bf911814a98e09faa5620a4
+0af40530e9aa937d32facab765ab6efbded9066b7c6a031db5b0f34826719622
+ce9203e7396fea2e7d5cb567236ba11607ec8579e01d0741a5dafc86a49a3ff2
+c1898d961bedbabc3bfec4a4dc1ff565ab27805c0f27dbd4db1184ac8d13a66a
+03f3477e9303aabbe2e8f009506fa8e03e14c9cddac07b991db50356f7fb7a09
+86fa0dba919eecb006dbf46b9770c52bf38c992c1cfdf487bee675464fb41020
+70cbcd98348f290bc9f8064271899314f5d53cef33351b85a9b2782d891f4fe4
+f0dae67dd58fd46c7d2e3451ef0e7ff93c38e92685ef30660a8140aed73a239f
+1adb9547e33369457d849e1417363508961ff097241ceeb0bea7a1b8e350f680
+f5194175b51793efe0ae38a9b930473ec836c99e8c9fc220700f0f6577b77fc4
+5d69bcf32455d506629cf1b15af57f244eef2bb5b824957ced172fd621618fe4
+394a3b3f1a72836c4dceabae9190c3de48bcc34945bf21c468308590e4912896
+4f331cf48a1764a4f828cdb11fd36fbd2cf546afd8cb3ecedd7c0b9ea5bb0d82
+8bf269ecc868a9dbae49cd5173b30d568ded26e6c229b09868ccca377bb5878a
+390e48cb3d4d596e167fb5af544d01a429280fbce6caeed0df852406611e3f67
+b1e07a92c58e9887f39aa3b65df90f27a2f9ad203ef4923009a69cca234dd41a
+abaf30cca6b13d77e38626a228b59dee4c20279ddd3fb7e47f3630c69ce918eb
+0af51da83358654b2b28c0bef8ddd7a22261f873010e35adb40f63bd5f6febd3
+50e44cea34928aab9cbae1e6ef35e713eef769ea2e06f1005235b567cff130d0
+8b6dc201eb476bad95426e3c9a7df4a803ae01b5ba4a764dac131bd273f17e48
+c1b0bb228d5c9ad4c39262c4ff6d98547fecafdae4ec0cfb0c04dfe7982490ee
+82ebe0e712cac8b2ad4161c88602e87c68c7254fc019cbd98d1deeb991962910
+d44a6e8d11c2afdf94f140f4a94958b0189dec2fb7dfd7ce510210cd76a88254
+b832de6879983ebbdad0220c8c4d5f7c37a55a125ee681abae550575100e3cff
+f5ffb4e64a8d0b2e7bcd2d6d016c598c6baed2951e4e5110be8b5f4c95ec5583
+44cdbfe4d78f21b0bbf5562a9325fc8c75dda43d30c33c3902821b9a6041483d
+3f4346ab4b036e583674418db32c71d2a511103c105490b6fa774b61b7e03216
+a466960ac2db48d0826034e4eb74f2a95e735d9a2a048e4eb159e7d6702c28dd
+3a1d5a390e4d69e0da121673719173ffb31fbca5b59b86f9d65edaacd36d5e30
+bf872cb7977a3894802498d20d656d9d9ba7c997450b2a3f0ea6017ffb5c2a9e
+dd4a6a415c6c6bea9497313478da8630a9417a3a77ef6d1df9aa2ca014eaef96
+8ee377fc0b90c42a64486c4145044c72082e76fd9620d2335c27f87e169f7f9f
+b4962e06d98165ab1017436ccc68830ef42c904ff8d738ee2793526d476dcf19
+b51db620fafb84cc7b2188a293f0f7669f48e1d6ae0d12997432f67580c4e36e
+5ebd336638c50ec777965083dd485be6f550f9392441e53a78068e7057a8495f
+25406380eec1548fdbcc215d2417ed3a1a2db029f9ced3c0497c042921c72b8c
+566fb204a2f3adc54a88957260553c33301bdcec98b8797e1ed36d21a22686de
+2bde225886c16ec5d132ac0e543093e66568332aef3bb15f85cd442a8245bab7
+681458364ebeac7758c2c4b1e0f6c9e10e5c1149cbe99651944c29f042483440
+af0f3c88e181722940dc1a8a772d99f2dc495c97367126b14053de51a03a7907
+a725b1dec299588f81bb1992ebd9db972aac396c47fd229fac4becd1707ddf8e
+8733e447b03c1a671dc33557daef6c83be6fab0cccdc1eea095e9996131eae50
+cc9831922dec49ceac282b5e1c0542a01a71bfc28e91bbfbb3198d33901162d0
+4285a62e07f82b95d0e0db1cd8bd664f1a6603687705936a87269ed00616b505
+dfaa558c8be45f0425469904d42239b24d4ecba5efe9b29998a30ffa6722fa47
+5c5c63027d3349ff581f3cd71c9e948b419489485639c46ee6a62eecd082d89d
+639ca2a26d58fb3789e2dc853c4b6adaee2a45eda123a1620204ea143d2926e7
+049dfe2de7e1b4d14dcd6ad90dcf1fe26413ecda2008dea0d7b7409b5aab672c
+40c71aaf8536602406bbdf5ba17970341c90e60db0f8239f5190f0a46ba0993f
+f0ba8eaf9c45f1ceda81d521fd353072b694334473fcf3982b147d22911a76a1
+162fee53f301906e20938bf6f38e0886b9d340fd23497c52edd2b9319e9b40ce
+1e87a94353d01be656952db686e4fd9d22c0583d7c6569e46445c01d06ea3cc2
+6a564f0abaad453d006cf3e868e2bb4e23aa6a93542b0c4e06d839bccbb64470
+e689f85aae9034fe57c583a30090535a89c22fa8336ce9cae3855b6f3c80f1ca
+67db3c3d9193747dd24fe745496c12d951180e7a24bec0cf5a5ffba06b925895
+e2463e2046eafa6986b7299507002ce55df328059434a08817f76e1c0c6fe864
+c5d39048e042b01e35a86b322ccb2656474f2a0afbc1aae14543e72548dc927b
+d1fb32f689da15497868e14ab927ee6efbf2c1c16bfcf698b77b190b57ad5f48
+8734baad1e836f0348458139a4fffc8f9334552de099ee80c11e84697389c795
+93177a0e179949738c19d83b36986a769ce821736a3f2f69ec82b7e19c2f25db
+aa99e888592bd478b2cda54403af0786702badd1cb8e7af2cf44d98d142fa824
+9364b1e82c0bdfe255739c7aa1486de001ff336bd84d58d845dc77e573092b54
+9b2eb4d4309d113be1cc36c3e3a1a8fe6ba813e147c0ff6be1358865383a3b4e
+e242bdcdd2c4916d1eb595b6a6ffcc1532a60463f8e0670b96dedb7540a0233f
+a05467deac20d5544fc026e83c80fcd3b4a227598a2b320418cb2b37f132f68c
+048cc26f58904d1f6d0bcc4c668843a86e81fee25383a35514c6b18a0ecb0b81
+514d937fd90e3b70f3cb83a8d06a9bdeadad9763a34098a306a7d38da2e2a32f
+fc202db1b3cecd7a99d4d778287d34a1e5ddd3f6aeca5ddd730facc26899f838
+06dec4d2a4db94abdbdf46b10b4f2d11b3c94a8686d210c350759d479d995a9d
+33fd660b16c4ab555dbc247cb559d6072f44491b32423ae4eeb761e271f304b4
+dfcbaa03cbb1833c822085dc6d6aeeb436e24bc0639e5cd4de306a7301f3c077
+2dbd3289cc3fb7822f52b450641a345750ebbad08437bf23331bbd6ea4e210bf
+b81fefd3d410330fa1d2ce93a534b3772f4bce4bf5335881371940a8bb302e89
+6d5043f5c69babca785c3984ce2ae8128d861ad78270ff78b7dd3678f4a9ddb4
+c6d4442d0780dabd78e652c2f30bb993f28c669fe05b9eae576c44d9a17ddec5
+6f49682da228f917c955fd75194d0361a30549f677c8d4df6c215281218227dd
+b5893844ded6a908dfefa52d3c80a46f92701b8e41ccf0ce82195cb1584dfe0f
+ae4f282c2f0702f93f9f73bad96b899ab06604d48fecb0f4c7436dabd184d62f
+f3f35cea68bbaebaa8473f6278321982e1bccca10dc064c463e02a4529d9047d
+da5b65ad3fc13009db932c0ccabf8318e4309516c19375ba41440c70028f1773
+f4aec7ccfa41b60db4a624a735d27977642fd8a9061195104d8ec81f0c2a5534
+45b3775e1fe556db12e0b2785f3e55ca8b8f8bf47bbfb555d0cc2c4d2ed879f5
+4f4efff486b3f21a12f89228b2254c937a7f6b4cf97452063194ff23485bd3f4
+c106a3bcba156b42e806e6238c39a0ae0d06557ef260df0dd1bd149caa76fc4f
+b12b7f2188e627afe0890f16d8a5685d5feb9ae8f0031f165f63b5df63f65aeb
+2ef56f80362ca765f6e24056b6f0f93491f6d8dd1d90d7d4237158ce11fa3102
+b40fe936dd641afc1d60891acc80967b02ed9d83a464be8e07b2f80d65e3926b
+ed7a2075d5140f321b8dfebcc4d808d09f80311996e7822483ad59a870bf8f17
+9b376d66cb785fb5135dc1351432370fa4060345ad5b69c7ffda0f2497c8c12c
+e10396ac141575a04a9a409d4903cf36cbf6602e09d0823f9498d19fea36330e
+bfa209fb096c09b1e2fc8491c0124246be6e1d4ad452e43e91b30d938b6e7e49
+9439ae5c62f36ebae128821bb90753000bc9db92ea04ff6c7e34343348a57af7
+90fcdb72efb25a14a687df7dc3b76eef16f96c649611b79d640516a2f9e81874
+c539df496f9a9c14c1ee4012f41c37c3a3f2189d91ff8570899c8c2e07017bef
+8d2ee37c6588f896914bcfb8d551bb15fda56c856e08b830956a01a444a8d2f6
+72b6f8ebee46542bf7a9f5a6c9c84418f840a01acc612c65231ae2f4794ff8d3
+c97c4cf224c3d0c26355a424cac0f2d17a056d203b523e03c60c4ef8a715a3f9
+5d879a4f344e371af8c675ccf394957fac75e2c039ce7708a6c7f5b46ce6e34f
+4df11daafa6491a63a46b495805896acfe5034d037152c41d9997a02ba58010d
+c338b23f185b3e4e3ba1fd1c8284f904a112475a08d3b23a92213e7ce51efec6
+297850850c99b5aa0bb31c15c7fdc4aaa7564c0dd664d334a17fad333927a616
+21bd7ba42819171e14abe2410455ae42b2a0fe9db7693ed36ebdb6305da51a5c
+7cab74a7d6669bbb23da061c5d641997b3d0e55d06ac1a41d17ac326b874b450
+88881784220f0829ac2077e09bfe9579b078f08c250f94931824ad8157402a49
+45847593275ff352dbe59296c2b0fc96a2ed97dc6f79b23e3796dbb309145e1a
+aadcbe232de323bc2a55b7af043c39dd4113d560558677e8a202229b3ced466d
+e37abdb7473b21261cf96e2a2affbf7c6dbb3622de6661a90bad85825009ef2c
+ca808bddceda30a3ca8aec87f960fa7c85f215b393e11e09b48db55f01cd0a9a
+aa33a40ec2dcd70df052bba543d2c22c9e93b384bff9055b426b1cecd5f90ac9
+574dbef0f9f43d7005b2a9be95113db7b12520811d99df5e4e979a5adf762bfc
+5d0d4c3c8150715b7f319d35875a7adeb182c37521ee80d994054e902cad0489
+9176a8953d4b6e28f541d608ce5e3bde32099520fe617e9bc9496df113a43d90
+7e1b212d24535290ef66c9833a23fa7a66e7fa11462bd210456b6edbc16ccfc1
+70c322b65330f4251d6bdeea11a8a0e58b2d438d7f844b2216aa53354464eeb0
+77a06fbfb0b72f8ee1f0bab6d0c6b27f94965bbd6260c70dff6c08d4edbbc4cd
+5a8adc974b690fdb53b51ce295e6b2b40c784651c0e78ea6b33c567568d1ab87
+193d2feb76ec18f4f6394fa5508ec4d6f871101e26c122b7fe132cff7f115e1e
+22b3eabff49bd9deec3fe09317e00639fcf82f835e6ce7ca9a65e294e869e700
+1c85a71e1b3cc1a4b9716a4a2dfab2986cac085e176dcb45091a01ce61dac2ca
+b5306da956147fac8a3bc131f0d8f31953813f52748e70b4c8d94a82c17d83d1
+a8046f80956defe12693eda56512d6d29095bb1d42e36466f6fd2b7ba7c70bbf
+123d753593f2b6373bd74d40e00d59b2be8ea60438e42818821515c417e69bbe
+c457abc9204f0a8ddebb88c44be364b358e2dfd117072f125c71bee9801801e8
+ff5ba5b44b0115ffa676f3bb99aaec050641fd9f5b6bb095a682b52c64ce6a75
+bca3587e2ee13f2ee022fc905b3babe03f154684ff226990c2ca27ec57100cb7
+dfed37c5f5d52882eeaa64357be3c9ed5605380445bdf2bbe0dc4fd5af17a3ed
+784a20539621e6e1b889e75aaedcec08db740396cb01aa753130f4b0118e50a9
+dc10da6a1059f331df49a25e98103e09473304e099d8578f2387098e380ae9fc
+f91f9ea36c0d900aacf7fa9dc3ce29b984e1fab13532aa4cf1e19a37c6b4f78e
+da75b81069ba80e1ed4ef2b9b5084e5e1dcb8f01e7da8ebf491ec5924a51294b
+81019480bafb622cfe2e500739bf8f4754e7e3e85e04d4932a71cfddb8d3b6cd
+0bc90bb7b839be6d8c052d1f0d93c833811b452403874b2a5ee226631207b6e6
+6492248559db1ce609e516e659d6107378a2e6d51021473fca2f1b87dab66d98
+39f607dc5eb0c03df892baaed0345514570988eb4895e7765c5bc42d1e76fee6
+b05bf0c77abaa0d7c5d6dbf2f7e039f04f9bf3b9a71ec0ed91e3a00f725bb1f0
+c74deed454f903d2c96cf70a92a048b05bbb624c091e3181c607ddc2477ea47f
+e76824c0af0092a62aa367448a10fbb6355354c5ac0737c69a4d641fb3f2d80f
+11f64eb4366df7060b4e849261faec37ff325e7f583ba04ad4fb37d6cdfa99b3
+0d73c662d1ebb1af64a2ed168dfaf80fdc284dde297efef48134cd6483dc1bc8
+e46b1c3c45fd5d4bcef85d9772000144ec49dedb9cf161792333104e50a27b2f
+1add3398c121814015c92096fd6d3b1352cd41d2eda7f3729d45c1d288b0f560
+17059816840217f1ffeef482ae49ca6b376a5548b0edc9018cae5eb6b1c33c41
+03642f744cffbce7898e525b1e8ebdf8cdc7645516fdb1eba4cef73d18fbf4af
+3517a140b206119a0d1dcac28577aa115ac29be7de2f9ed1f679034929c48870
+a6d50c8fa1779560b1f5b760450db3b8b350ca3b2890d04d3b33f19aecedf0d1
+ac01c613d992b423891f9ed878c8840937ede7d8a1d62fee5f92826620d801ec
+3c3edfba8445cc52e5f83e01ad27abf5c205eb022ae6833c2aae6dd550da4a97
+f10a7e363afc6d53a274c0fe41b83c171785880b637434b2c8c4348615bc9259
+8d8508c412d17099971aab2bf372b96b0b14ad90670ad976714d000373380258
+4b6462644a34bfa6f5b746fc0db76690d52b2229f7c79172184fadf2b5a9983c
+573dc0f5c11aa85ba845f6e4f5836e95636c8cadafa8671b2632c84e3d94ef2b
+ac6565267518e2f747127c6f7b13b4aa888a5ee3869119ece0b2b447a5343edb
+f0996b80d9437e62546b137e22735347a684af93cfe80ec102a50516092cbc03
+b0e52d5e10b06e447c118fe2bcafd3ba6babed083ab7d423e7bc5c862cc06dde
+56801534f09260d1f246d070f094f57219407e92769952925bbd0cfa29a523b8
+fd3ab5b278b2a2f12c89e6ed1dc2bcc4ba69e6452869b246596f71a310af0867
+c9aafc6af2c88f1edea2ac2dea51e8fbd72eeb0893a18706e16ce17a8ac44545
+ac68951c0f284b0149b71d924330201362ebbf72dd8e5a8a986fbeed97e5ad11
+cc913858ede949d8f732f742b0d73ce9c8239c077ac9d24a80c03c0a7daae558
+f17d2310822d33918f75aa835b5b4f9fb61730fba8c55441218fec3c4d1f54ef
+708a05f6fcd38a51d287cfbc58d92e5f3793da39c0f55eb9fc03b658567e7474
+557de727bde7afeacb94c90d0b38b5e9f9b19a14d7c73e066eb556eb6ce393d8
+fa956f4b75f6aa4701d03360f1f354e1bcee9b167cace1605718f337dccf8cb4
+57c3ac8e3b5b730c60aee2e685a80ff8ecffbc005dfc5f11c5e338fa20ca3a43
+9154621626157e9efbc0b390b143ae736dba62723c99f5efaaa02a090b8aba16
+1b712e55d50a2a6bfc06b5eb32ddee1ddea7bda2f176f0f1c533810137262a59
+f8b14ec3b0349ec36bd0b8bae99368d21c4dc0c902e92dd73231b03a91275edd
+9250f14fff4457350c747938f2cd6170e6b8713f439ac4e116e70f00bdf5555a
+99a7162b703b45e92f8e77b50e85373f073b6907f95839c6f6dd306aede407d8
+642113e1bf2be60a5ec8a64431cb46f882d2df7eaed39c326c26327513b3a647
+9ce800635106cd90cd7f0083d2de423a5b9e5d63c49643d3e220aefb899f491d
+28a30c49abdd19ec4bf66677e8bde6e43e222a097398ed2a9e9933a1d5ca87e9
+cc6cffda1deb6d13806c2fc82c4b32dca80dda4e3945c6589e9110ac91681603
+c4bf11c9d5510fb8d4de96ce3177297b692464776d9c07a1116b6369204df7ec
+4592550563d3212b50bafad065887b3c369a7810f98bd521be06a3b4b997a6d5
+e0c5ad7ad8aae5275f400d86a6f09f1bff38d9d7220fcf688212eeebb8712f1d
+74ce4985615a59c89354c1fc0975caaff671151a561edcc2017b0de504974190
+49c53f1f17162afacce065f1300cc2571a0f9dba7d21d8488372d386c41a9fec
+bd1c7def33329827cc99c7eeb7e5b91607849173f68ce09a2aff09c94145aaa2
+76cce38832aed1a437e8206426ca41f49c9e45b6f581faa8afc3b47869d5762b
+793b8d5fb6f0ac9c391d49424528ea39f635185bb7192f87b72acad339471ebb
+decd039457a71837c2f543652284f1f40f82c38740c2ee36b45d620f004246e6
+d73f8777ba26c7a7e3a2413fae9b7dd37553169c7209790f14cc03c08d0bfa05
+6e72e0184d32cf070f685ee4507b79b21b353c6f228aa087ff469b69b1171567
+88fc37c39977e09d1c46456f1568628844a542736eb0ddf3fe3d134b7e78e87d
+b126702e8ec60839b53c363090f698c5c11643a1bb63ef2d2f159872efc68ae9
+a96666fc8ce25cc0e2b47fc82f5f25f7b6a732901cc6d4295bec66132cb3f175
+42cbb4d4ffed7156beef36446452cf2992e8d9ba3735269ed51ff32f8c915b8a
+f0050d9a1136e352d4eca8ef9ea6c1978fe689c8c563b8faaa1128625d9e91fa
+d173c8e2b7f94f520098dddf4483b12abad73e2303098ec46b603b08f34f2bc0
+8ad44e897c2ab11148728f4de8f0390ffd947bc424f0f0f1ba80a107ad2e00d0
+ff4e76ed5b305b72b72a07e43f98093e032088c52c07e3f77d4a2d417f141512
+43d996cb0867a056befb66f052e1b65b37d2eec54a802e570c8b32554b794392
+3280107fb91a91d5adb4adeaac86a422717603de317a563251073bc740f10928
+1df7669744f5fb89e3f460bf820cf006c75231e979fe162fee64786c144a19fa
+7ceb1da2096076fa0dadc7bd1522014288aa2fc96baab5078db3de94807f3af7
+854cc320e9f70da4efa02d38fa65c15801475207a09d254a1bba489b78a8214d
+cfd4da769a8ae060fb4eda4b51d780928bd6315bd293f6c6b0f3e4a593464f0c
+55ce0c1120b2099da0250d04f792b2270db2d7c606bf80e7a56062181f7da864
+a42e97863ec70187b6620559b29207c549366172c55d7f665952c8057a4f2152
+a69f772b065d414e65f57719a99cdbb57872a86de9fcca4dc7aa32b666d474e3
+d20508d06f0cf028521ad7d46e9c25a40d1390ee271d2ba5ddbaf7bf64585c3b
+a859a2f3ab88e58f72a1485a33c419187fde432b697809da526477341d7433ed
+f38e1ff4fe51920404138ec6403df7562e4443ea091c620a13603ed0388b88e3
+671f7436193eaad4cf55ace6d04b79f0389ce28a1eb223b24a9f8c92b4f5ca3c
+0bea3ec00a555756676d77de2a38e35375b82c5192001446c8517818f18be439
+6c900f7e1587969d9bf8a9fb5595bf055222951c2b0392fc387c258c8cef50be
+7696d9360b0f2d4095e52388b395a10096769586c03fc96a69615b92b9e4d3bc
+275229ea8df5c72ba0fcc67bf8c1b2708bbe298cf75d1a97d452d51743d457ad
+7d25ea5484500f4b086bdd81351f71885845fdf5e9129e8b0833259146dcd34a
+3547c21e093a4fae7469620a88a126e0d025d3e50103f66357e2e05985feeb5d
+4a9adb2db82460076845e54c083a2874aa56c5b95253a1e8cf8f1e35448577fb
+8147f62f33c968151352488feb6fa978676c9f274d6b11f7fb65fd39bcd7dcce
+7846008370dbc907341269f7d1c355d087fb176fe06836511cd9b01addccf580
+f68010958b8196f50277dd16f3039a9aa70411fd94d1b145b3ae34d5304e6c4b
+02fa4b80f3693cb6b16a70dfe06c132438e0e56c4fe504e1923196a58e04034d
+6cb67335f4218b857cdcdc928f3cc436c63f10ae872b93788b9a84b546c3f504
+7bbb0d419d7882dd1f7bfa5fe8a1d1c671ff3f56b50160cf4c23e8bd55111d03
+eaa7ff86ce5762687b6136f5728db1b9a1b914c7e2fce70c2da513594a989437
+ca8eb6792445ff806e502d238984d278a81d89b22864ddb0da2e49658657cfdc
+6214a570113a00e55812ccba870feb01f397f010a0377a34fbc8b052084e3d75
+5e0bdcffcb26045c428d8de34af04aa8b7a5031892935c16918f0ab2db811533
+545d35799195310e5b109688830bda180f096fc5dd2f2cd98801466cd44a2b50
+68e54fc80d1d80c9f875b7e75860cb406e83132f5cd0813757d75b5bca06c62a
+fdb7f0d55e94cc9a223c0f9eaa30c0a5c13ea0fb857fa703f2844d829418ae2b
+968dee2aa785c07ddf773e30bd42ee89df6618796171c58ef11f6570d21b89ad
+55e4ba58fffd7f112dbde6afb5c5cbe7d73b69b5a25003394ab6e0d5302ba575
+51ec63112e038b79f6b9632012ab775ae978f4d94ffa70e5d095a8fa0fcaae76
+18fa4fa41df5e34e7483c278d4470abafca5c110f1cbdc1e9e10fe169342a2e3
+6ea635ecf0f5ba7ac1fe1d11f661e825191ada43218eee5f5aadc42436c98789
+e7692be875ce211a94409ca6fa9b2bc1d67ee0e375b83b62feb2671b75566620
+47c9ba88ebd7f795c9c02e63cbfef0515a62db218f4e5a0c81b00bfd6ef12e8b
+7bbb8e9ab5a1be0c2773c7b5244d7a815d95644a188ce66280637dc8cbe5fb16
+f2ac4a45a8a8a3e13bce53c345f35b3ff85373a8733aa6777008ae9329c7e54b
+9fb18b1e137e253c72128820e04c7bf47189c1d1836f6df447ff9efc0adf7b0f
+09c1032853c67fe92d961a91e70add002c0b8f56a07c3423cefa2e5f65b028fa
+ddf99e24090b56e5be0173e8778b5c45fed11fc0c0ae64a824bbf77f1150b9b6
+cb4f96ba0413fc37f7590955d075120862015df7171ea3b49fe6b0f261db75e8
+5bb33fe6043a19688ce286573be42c114a0495cb2cf6f642e83674b5ab17c7a6
+191c140c1ffcc54d70e2b4d1b82fd0aa1e61583564753cd6c5c0d6d7743cfca1
+f6fecc0f51f247b081cd7fcdd498da22d5a2c8dec0b7a9f92e252f63644c50d0
+874617703ecdebf7ba8933041793391f67ef138fe0e4efdbad4fa6d7b01c1f01
+b9eb2868632c20ec8f3e34055f6793054bbc31c111686ebade4b4d44a9b69021
+54cc2fba1fcebfc1943433fb56b10b60f5edb160df0e33e7e98ff752060140c7
+8511c870920c2369a0d6d4dfb687c30541e014bf4443f665a24a5f05d5a21acf
+f99d9131495b773e42e3f1333866f45dc35ef9231a00129564d194006c447bb1
+5f341631210376632d90120ccfdaf8eb6df5e2cb1b9046cad64e34bf4e524c3a
+f786121f9136672b6bdc99baa00d412db7d5155c94796da2f490cb441786569e
+769561942b30cd8b72d01c11434b9a64a82f73be48821291df689324a361fb54
+c1760ba86b250c9a6a2c855eaf318703d4b6c23f67931b376f48dd3d87250ce5
+7614efcabb4a6b8fb9d332f121aa8e83edb6897987ee25bbf692d1c243e6b592
+1954fa91ab728b5844f0501a63abfb7f6c8a018e0f5cd409139ecda8b427754b
+089e9f71a74c55b8a0c7d3dc7ffc478e693ca78280c9b33193e82383627bdf30
+771103c535dcc00c7d9ca352f135de010a9dc95780046bf75b36e0a284d8c2a7
+f3b6096d905dac2abb33764249b1bd61e3994e96d0f3c1e8cc9959a404dce763
+31b01ba083a82d6d0d9cf9b163bbe2e84e01a9eb07bfa80ac69babca7e725fda
+43b67bedd3a23fa3926300349021c2337a5dbffa2021e05d26207958bef87ba7
+eba130cdbf56be5516c5ae4441390e999822089200aafecdccadd69169a27414
+1c0bf4ff1be4221b4e6465da6e5ed755568f79762a660653e10ae8d098471457
+9c6a90dde454ca311947f0d48749b14e04aa65a9d8c62097998b4d78e171f166
+40bfe92170c33de5ce03dee2bb50a656c2748ee8eaa15951da01771acb0a7c97
+25eb74788e6c283c6cde569ce52beaefcdb29f91dd345ec41b585f1e2dda5b29
+1e85d3a50e93ca8caa6fec04df003df18120152d0540efdc4020dd6475233f7a
+1bb0cd65e6e389a3d714455aa5341872a48c01f9f3451f0a41051340a9276afa
+50473824ebc231402f4ad6e35ee9d50cd89d2dde31cb5cb47c72cf47ad6e8538
+e1d41960475db823b56c20845107d5f2ebd3515ba63c00b73f9f069a7b2d8cd1
+862b61a9481a437aa4efa394315eff55fbd6ffcb26ed9010daf763a3806da8a7
+14a1e943547d733eaff9b1c8ff5d7ede9573851877756c99adac534773a87ba7
+e3e320ed16d4c383bb75fae51a0bdc694cf4b945a389878d38662a3d3b6287ed
+d505ff4d7947250e56c501f630ba5066f343e550de87b42ad8eeba15ac21de34
+ca8b18eed081283179a71ddd916c4efaac62f0603685530d08d499918b726311
+ebb642eae0db7fc91554fe6e77580244e6f3dc871f6bde18a80d732fa6f2f04e
+108029179f799d54c7eebbbcf6c013641657c98fc17d652a9b48d15204936752
+89f4312216dcd0605be6fac8c1994dfc7488f89fb2e777297b16c95c66e4b7c8
+5b30681029156954c59c7f4009e6e51e5a218de4722daac7b24176c9184f8da8
+150df8d26760dea0757344050a36ee320d1e71dafe9fef9bee08c93a2ec25d86
+310ccaa2c2b42c87298b238b449b8e9abbc89b9751cb1b2d86051baf9d84ed66
+e4123cc33e02b6c95f60d72dff4ec2e59c0e85370ee21c6ce7d2f2633c69f037
+00608a7d4c67e14d6eb9782762c193ce09d9700ed2207df978ac96d967f64d7c
+d1890a7992c7b1f0a6240d53bdc279a1e9809963532108114482b30325585466
+050647c568823771ea8e227bcf931321bdc7699707ce84721f3a8d9247ab7428
+2eed6d1f734244c0006db24d909c39575f3c31d67c4b06100dd37c12637e23be
+103d0fc36c3db59bdbe5c86474269c394b0d910ea9bfb4f321724e0b73ef96e7
+542bdd57d34c91b319d8ba7c692608a0c0db47d5c8164782c5f5d9a438c15afb
+80c7545832948717eeb7f6b646c59cd2d44be1fb792e9edf4a938f887304314e
+b064e64acee79563271364ccd68552bb354d1b868bb91aa38345a1f712bb191a
+44267a300c19d3ecb9c756879351f430eabfc5b596f63a6860dfc94cc6ad909f
+9815bf7d7d885b62d3aafd9624ed5eabe77acc50b5c8aeeadd4ad79e01f4fcf0
+c0bf6c0124da07e12348419aa115c90fad1d3a6b8d12a9d65cf3c7e8059eea56
+29a9a09e7d2df23e180c19734acc46356455886bd9e1981ad86ab2be96eeda66
+87654f6ea6e20c95aa61c9a50117db0a647ebc8c34c55f158ac2085ca23de1ca
+02b4ded478ca08c4686527cff76d641e0097f3cda433911682b399604ef61c89
+901c7da40dfc094df7025b1a692c159ba0a743b1550f3c548b2c5f7b33016a29
+a370407acf516e13a466e03a8a71ae6ccfa498d6ee19f53e258c3644a6e86852
+7f76d2d673ac3b07e3e23554886243d94d7712d778839a0c754a8a1217162b8d
+a3ec1006d9d36dee27d54e4c6e256f9a06db8a5a752a1f56766f0c6982df002e
+4201c9988b769c64aad5446a8190a5b5b3c1f9bc8cb6ad24c9beaab17c17441c
+4a9a8391950fcaba005782678466b3659c7eef7ade032612a9a2e238f59278da
+1deaa6dbc1a007c6fdd494eaa997ee56bbed5f797df482213f03b75da3a05a0b
+30b3d63c75b125b8ba5129e298c45d958a3c69067af3313cad7db36d928d8ec3
+dceec61f0f7ee22622434248cdd8696c5b54c8911b9d90714347f7f6b11c0bfd
+908e7f9cd6f98b97a3b8fccef61e6234332a1094b3c968eea224574947de42d7
+f8d5de799f40caeba36b4fc4bf430bb380dd217366446482f94d207c58a25e76
+2cda6f2af982916b182b477772674283254ae75a8d8d4cf121a73b3a2592ba76
+1d6d914992090c438c4a68018d474b7147beb38ae35b8d8e9229490655900c3d
+e615951797650c229683c3def25be277af6385b4f0ed240f86547a1a3742aaac
+a0d28fd8de4fbdeaaffc37a669bf709f0dcc13fe003c96e44a9d33ad16217675
+04e1f237dec054223a0a35a4ada96b0a683ea1e016c6fdde948e0a7a20f8e8a4
+a6d3bb3c09636e0373dca7746eb163f43810e2eebe8a50adb76468b8a779c371
+6c61b780626c027be20eddcaf408dcfe07cb044aa03f7805290d252ed3f30016
+9ddaac33d863e1ebcde7b8f3e0be3f906c3375e4242f64c7ea6f0f662bd9b776
+6702737841953a725113b45ab4eb8548a1c1479695ff4ff9eb8d474ff66c869b
+196aaff62849081a98ee963bd74da69ffa1dd8519b106ab22b4778cf97f1aec2
+d9b68354aab2fc0a8fd3516e2d2cf08c22ab093ba89434c57874f4f87831062f
+213a7fd7a5572d8088eea1cbf77b21ab4de8f4c7a1fa8312484dbaab9ab2a923
+d87b1fe0ba3183ab27d00fc13c624efe6ee45e62d2d328aaf9f501e64765b946
+f21d5f77d5b5436a6ccaeea7002b0fb24bae81ac550a731505287f37dc04af2d
+a4cfee3b3a1ab21781afb9222da39f72f2dcace99dab50d82bc73e73125279ff
+431a5a2bef0b78abf0bfb1b3140698456beb47261801937d55e1dcbe40403dcf
+2495b10dfa47211d9342f7676cbb498ecc5316b1dd64a74fa22cc977176d03c3
+f3b0760ec63393d846ea11b9c2aea75c5b7224dfa193a2534f0436cc90d9fe88
+1f56441906e4d5644fc33b472c28646ddbace7d8ee8fd8c78e5879e638b41b14
+eabb5715c81ab6cd2fb872370888be6f6aced19820394a42bb286adf8dc2a82b
+18b166efcf0c5c7626aebdd3abd5fda35cfd70887f695fdf82337b821c510005
+90c6f06a4e88ed6d4d0e5f2c3ae5e4865d67e144bba6f6f3ddf309c049772e56
+0d865223cd88963c6fdb573d56b8fbf67255f94c1c4e264a8a13810162f1ad7e
+b141f69b353c7a9737aa9d919d1bfdda75910dc5e841f4d52a5f58a3ebaf305a
+9075edc50f9fe0cce188ff64e09cf1769949589b221b451c0e7f2b6176f6ca5d
+680b1b4bfae4b7ae87c03049fcedfc09a33a680f96d96c1d09fb0921f3d4bbe1
+9655fd72398d8b66287357626d90d44b9f0e2973942dc06de660f7278cd0749d
+27abe4645698676a1ec645169bbf1134a573ed63fbddcf8e690fd66f943eb675
+2552768f52cdd9b8c4938e1d583cd6576611b1495b4339c86021ce6661175e68
+873991ac3c93a55d9430d510bb2d6c91dde275732c87275d2dfa3a0124b3da1e
+1fd7bed9edf509a3afe352813a8726522244d32c8bc31d01cba0e1248ae5c75d
+d25bcc26826fc61c172b5ed70c869894bf1a37369bf1b98f353caae79bc05fb9
+8c9d59c91e67e9040642e7b4c54912f603bc8f8696ac9d667c557c0e0b90679d
+9c809c82701fd2725752ffe02d243baa5d340a59d26935d520b3f0a7eed8fc8e
+fc352542627f167062b1d2657f36e518ac54d03df9a51e857a3ad589f7986513
+914d6b735e08c0f0e9925a49e08921da73050d323ef835f24565fe5b34aa55ec
+b8c41e873d766d66230b8156f06580034d61e5060f2b6c8b7bbacc2875c26c07
+ddadc43a8d13860888dd97accc083e597c99cd92180582ba9fbd03d6339efb43
+27af006d0784c3f661ba85086486f91df5dff5985c111dbd19c17b357bbee805
+6ee8afe1802988c49999f36a176aa339676f67b3a99638d6a9db1c8219636720
+a64fe07e8968c0e2d013aa3583095c15b4f6cd716dc4cf833d4595a5db580082
+66c95090df00addd1a266558da09328570fd3ebaed85e853b0c38fa90ce59417
+da533b879bba9813544f8768cd27b91275d44b3876c187c7b1866b943d01cf14
+3dc10332256dd9d603641390e9c4a5d69a2e3a5a64cf5f25f3c97fd69673cd04
+af830aac66c8c58c7d6ca5c9491776b6e0ff293a7340f55702448d1c13ced978
+a5925f0aa260461ee1c304caaf92b12f5e268ebfa0ded8cc0262bfaf51f5edca
+c304414a151d57c00c8d81018ba41f72e9f6b0ede165a4902be08de6796520f4
+84e03e723fc8fbdd5c708283d410bff715bcbb78184c9825bb93b13ff067b8b3
+8f13ee2781128cbace25fd8dc9b6cdf0094639797eedaf5cb118a2de7d53d66b
+aff54b243047c35c1fcd4adc5942757cc55792f3370059fffeb95ffa99f10e98
+adb201b57efc5ede4e03dafed763d81cd47b4c575435eb7bec1193ff84329a23
+8cf67d8414e8d1a57e41f3ed0ed3b46f1dd2edf8ef198cd857c05dbc65350dba
+a939e74d0394effef3780ac622549b301ae4539534ce23da4757a7205ca6dee2
+fdfc6608444093c046976b919204c92d985f4ee2db74678725c56348c40cc447
+8770ad251b6442630dfe076de75dd57da6a453e8ba58d0016aae4dbe05591e80
+fa2c2df3aca1de4f21d86c560a9d25280fee16d5844a5308d7922d9bc40201c1
+c648e37d929853249e572f88b21ec024bd07a8cf3dc4fce45df469c94192563e
+a695b6fed264c72b66256a3e9b0ebbba06d36a9dc18dadb4ac7bb9c33918a106
+ae23bdc5326af0b6ef663b6ed2894bdd80d334a084bd692ccc42fccc033ccb29
+5c7bd33199403d488c61a9e0c619a8e501a4f5c8034df1d2782d8286ef950513
+be7391b1543e36fc886672a4556c66c4a92c40ff9abde49024eba8e041236d3c
+f68125512f1803b8cadbdaa0926906c6a33ed1a52c75e5589dda5537ed70572b
+6f94756f25eb171372f4513377760fab4bda57d5badf1c2f81cc68f4189cf499
+bfc5002e5791bfd84a40a69983dac1b26cff33475913e7d410d65d228c695ed7
+6e896482179611844eb586a8023e6e03af4c787d991d361be5aec58fd67222bd
+a3a63f3785abfff3e90eda8f151bce01026a425587da9d8001e532fefb75db48
+ef723bb5ff12398ad736c4f329fa941b1951e171732ce74b2f569570ef9c11fe
+8e15a4746bd8c4dc3828e431329fe205584b946ac06beb7efdcc77d5bb6f299b
+265a56ea29b78903c605c1ef909dd25abe6562103084f9eccc550698ee2ba7c1
+ce69e49a7a3dafb88a155d7b6922c9efb5e1f8364728cad0b8b4761a1370f06a
+aad0d9467fe10f58cafeebeb187be257859be4d730f33c8d4dd5e1b0dffceca3
+b23434c2a25bb9cdd8c553ae92093b594ac139fe70fe9f4a607ed7d4f44fbfe7
+0abd31a1d27f550acbb627ed100b06b0a90af2c1aa9e334b54b23863693bcce4
+bc517db889fc3d8d179d670b1e282c6479d4f278a620bc61a5e3977458da98b6
+dc4ef9062ce128fc59a595f9741a7ab354a086bd1b0cfbc8830f19a0a5b7a278
+1ba1afac9e8f805f5563a954cbc48e85565b0acd3930dac4f1f4d0c0eb8b833e
+4ef339d3f5ad304e59f0958aef225767f1f992dca2d9279ed920e6b1f1d6ca66
+3814264a4455e999bde37475f3bc5ecff3622581ea9145dab6acdf95c22fe293
+272d2875a939ec35af73933e9acb08e419dde1c8296e1a5ac1006dad3bd4ff51
+f278103d486128712f55c34f4e1da744350965f2692d8d6690b67445b8d0a2d2
+6b1a18c1cac898071b9371cf39ce17153fa963d83e646486d9449d434200b912
+5bef39637f3e298c5dd1f0e817f523d68a994b3b05c8d4dab4700632f39f6410
+3417a3c7562cd8c399ab5d9b9efe99688b832d5a2dbcacb4ad5d4024ddb302f3
+38a6eb2e23e47702660dfb5327bb33347c833ac8c9ac158d2e676589def43d5d
+9bd741ff2d68859e6974891121a14afa2c9a0b591db56404b19f08adc039a6da
+0f5477677ba691e27d680068f832603cfaa10b27315e4ca8d8fb63b6a3c755a0
+aed3f49af639ca8735928670f37018e48bf3d9ccd8203017f5c52d4dcaaaeaf6
+d91371e52550e6e0bc72995965cc5a9f987e2099bb915bfa28fc0f57cbd740b2
+6630b3c1fe2f7314f66c36f3014d8940a6b99e20c2bbf66147ca17cd9d52e2dd
+3edb04670d745d9a2b33ab65cc16a68fcaf84e360ae1477d357afa62df1374f6
+1219e7ff000117ebe8dc15d58a4d2d44102d235d9788d897667cb686a61e9519
+8ffe8a7958659c0ee5e1289c8c1676ebbe71b61b20e4eb930d14927e2647ee60
+92b3a7fe0c8c02b760f75b85bbe0a429d98f021d0f4d9ae2219efd4dc06f3a44
+a1718101659bba461a904c2560f5d3e14a0b14992b489b2b524cace637aae881
+030ca980db54d8f1dd988ed0fe2da5f799c393d8d12582dd218710e0a171da2c
+25f637290d2296bcd20c593c0f4c3b05635d04b4504725442a5c038d3c3d4ca1
+9e121199a4517edfd81f9e50b9cc6a88c8c49e048a7de4dde8c77c9eb4aa36e5
+5b26a061ed03eec44693b9f5a7ef0bb70a26a147bda86981e93ded72f12a918f
+133e63ad8507daad920be5531d03b75b491f95b76e874180b434ac0795f961b0
+aed9e078966edf01ecd449afb7944080f6f09260e767f3a388c481df67d4d6a6
+3d5949ea21d07bafd52c2bb664295bacee81ad5a2b16e4e560be69e9f19fc9f0
+d5e0772784a6917d2bba7ccc8455f1572a716f1e032f5f244dd26e5e77bd6894
+829620277dee975d609c3a8d13c5dee7d05bc9842af7a84e9753420591d0f6e0
+e457111aad08fd5818b23baecaef43d6c42c423f37cde8ed09cadde44ee7e8b5
+c5699e82dd3b7d5f268907d978b58fa774dfaf90ebcc85ff390c78056806f6c8
+9ae7aae8295bfe14c499513fd2438fec5f13a9299500b0abbc17df9c39a44098
+1784299d7229e0f36748d957e5cfea65d8d2c940720ef6adafb4b40ea38bef22
+a997657aac9473469b33f7b35cf12f92a8906149fc17fd56febb5e8d728671e0
+0df089cb79e80e41de415f9e7d1b5b93a7355d9eb79bc74026afcfd0e82b53ed
+20715a06fad8a586bd1961b0cdaf91af18045107311f73f8f9fa185271ca70a9
+6242825133c68e6e480a9d96ced60694cb24a3127357b9ddbaaacb314bc76870
+8cc7dff7c1d96ec22e39930613b154a2d52f6d0ea5eaadd5429c2738b27bea90
+d05e15b53c2481406e56bd2fbcfd9c73b9bbf9ff905fa83f6359ccd92f2f6494
+69927e744de743f579b7d3c0221c8f1e644a49d33e86208d9f3940e313abf42f
+7820c38957f38908db156a4820cee64ffe0ed3637a26ae347df177abd9ea683e
+91b15018fed6071ac92cf31ed64e5152636a01ad869b09afc76a753620901110
+f317eae8a99e5bc888bfad1e435302146323d0b752d0347c9b5c40fca5393ee5
+ad16201bc6aa52b4700d790af61387f16f0ab6977291dfb25ba200ba5248bd25
+4850cd1197e0a7b289439b0442fba60a1896d5d8eccdad1f16e5824e665a249a
+2982bc9cbea19dc6a0429e192f005474e775d5dff231d5b3855a2da7040c1058
+5490126dc9c2e409bc8f4eab60b75db09b08c94c8a675efc22a0a8931c790cad
+ff09b39407c33cee4253e5c5f9e806b5bc5fa785fbfc6db334a484e8e0f023c9
+9094b1cff83bfb775af6751a4d1010416b4886b3a40213297340212604d556a6
+2c56be99d04ee8c1c0772783df3bfd97a9600c3336302155a019579b1c753b81
+93b5712637288c4c657d66aa21aad4ad0660f160c5c61c2ad73a1e1ce7518c31
+2df63067457a38a37f27e3e4224ae637c2a977a5ccae87292abb73a29b019bab
+91c4ad20b02dcb57774225183f9d386136ad0547e86b64cf5337d42efaca336c
+7bbc10cf8163aa44fee56370a74d47b6620c9c70f822b69d292e3a2379fd776c
+7540c44c8ba1f0f072336630d77e45a96b232897d32f726bc579fee33e2548f6
+3ea6c07e6b7c8a39d82905ec789c2ed837a380d354e93064a516605bcbe587e9
+99f69b562805b54604a6ed75d84f7cf08bf33bfde2cdef33efaa1a4e417d2640
+a05bb5f57cb7f96dec69cd6bd3cb909cfbd3088f60d4caea3373f31a684797cf
+0b1cdeafb76cace154d45bf7775f6441acddaceb8332ebbbf148395e08073da3
+f54f6d1a525217d554f294d9665fd12766de19fc11e23a1483cb0abc75b21bba
+9f7c2f5e21a0eb5b79585b9935b7d7f2254c4f7311d6367a6cf51fae5b228648
+8173d553701cccce508b5623bf23bb59a66356800f2513725046f115d10f3a68
+4d5aad7551797c563a6a5934cfac1c95216db928d08a8adcc4d12d855c142f41
+b663ab4755813cc4bc432147c5b9e4949d56a07c084be5bb14b74ff3a9ca0fa1
+708e861d3133c5caaa90213ac1042dca3febdc4431fe092c35cc2d60fe92eebd
+c96157af469b6e3bd124a183947cf960aa29504dd4eb9fc9c10d1bc77363644b
+6c452a8824b48ea64a3084f6219c65cdf36a1f8a4d7da515ead6f0e03d0bc2c1
+69ad00aaf8a2b1782c990f7ff40fb9bf2c00aee85eea074f4568760d8c78529f
+835e6ace945521a39af3bfe33b73b62a9c755921b29c0167190c6fc2133645d7
+6cd319525acaa82fd7727b055e212c7db32b5efda34de81160378efae97fcb51
+8fc021af9ec77692c0bff6e8ac0de9f938ad65c48d56322c5719767da14789a6
+06dd5ae421aeda6de57c968c883ae17712aade14da281fd823c99561b2c7895c
+c0ae4cd1a94e689bb579d3978ea9b2bd70bcd167f15508d1d820c8f54683cb3d
+8b302e2af9fc2474245fa9c3fcd50f57699ddbfe78c83b417f2ab301cf335284
+c7cca7e8d5225e036591bebcabec13262d1a7782f1e53e2a1d75c152c0ea6d18
+04cd294417f9cd90912181518915e6d81def1ac5957a7d59b62c5766e8ef3554
+43938d39498456ba87c424013135609c6437aa6346e59b385992b196e5bd7f8a
+0b44804854f29e194b6c2959ad55c5bc94cbc0f41f837d72c1e91e795e4d98af
+976eb1b55e01ab71a0a786032fb6a62fc6201db7c67f2340a5c504b9a9a9abb7
+3df1694ef6c098769477cefdd3b4b77ab716d240ff9fc0a1ac737877658df26a
+b6e7688c7382d170e1218cfc3be31a193f26e9a029c74da3ba2661014b58f58b
+2cc7719be663206c3cb3f8993a3400c149326651751e8e9d7902346660c4f845
+c7b0bb144ffee8e1187efc1a5e9e44fb277876d17221287c87ee6351a5c887b2
+72e0c04d45d060190dbe5b1bd8afb1de6c6d984b65362bfb0f9a4aec15979b4e
+e94307f351f30f02d8656f24a4885a5fe3bab465b7a0421f240edd8dbfd8f4a1
+fb2af2f4fdcd000d0aff4b5ad85b54b98a83c59654705ca2df9ef54b742bb3c0
+577f7f422cc7cc380e5dbdf0d4b1fcbcd418a219b88279fbbc8b5397744ff5df
+1d795570adffdf79a38a6ce62456c2601b8f09bbf18287bbc7ffec9d1b164856
+77b6f176286998b7e76698945e70510ee09966817854263354a751cb09afe9a0
+76b86ed14a837dc7c4c15ffe7a448056908deb055a02558aacbb6465481b81d1
+f42fac1b857a516852b3e7db8425d23dd0e2e80c423abcb3a5b95f1d34f28e76
+74c3e3a77431cf1f75ffc9f61efd8c9a09fe9d74681e541e4435d8443fbdd7b5
+4975b26b3c69d2e2283b0ffd5e934a480c4ee656e068aed4fd180fe5f6ef4af5
+1fc86e6f9271d0b07bc9805cfb43f06add9ec5e410a7bffaa925d84a26965fb7
+6942fec6318bc03627e112f16fa00f56ef464096aa0fb4298a98b3010c404009
+d16c2c133878b6f2988107a01cce2c7a3db4cbbaa7adc2d45083903a357d4911
+3775dbcaef8f814be6d600cb277b9af93d8ab005fef834ad50d8ce9d1dc09f95
+5b7fb930cce65c43d9cceaaf4517b8f1ad764b1c256280f19cb69373805ac79e
+a4cdefaaf9064efa1247ba74bacb09fd16122646d36980eee215f83dc9293193
+02789698f6fe0c5a0539fd7ff2b8a28746d92354bcff6d6c056171bda61e9ad1
+bad7f68caa7c81dd31d3effcd9074caa07943ccc3fa68438e9712002d7b7d5a5
+2ed1fb85a70e55a15ffd0fc5bbb64265a048ba668f0e8513f733ce257473c517
+0315715e26e0676819f8a16c22d8eb39d07846efeb177c488957a5237fd3d592
+3d10c2e5e1e6b50992649bc18fcc70c396312b350b9cad02e0af2146d9894f50
+20eb54df3eac30225deed70dfc42784e3da822f380f46b4b3036261b2e19e933
+675dc99e5bcb66381136877f0e9cb2ddf01522a66b33d559160d2f184a7ab052
+e5129afd8225900893ebd39e92830ed4da59e777ff5b0a298a2e3bcb2897a6ce
+8bec15a6522071afa21cc13ef47179c8877e6b3722180f9ce4ea63302640798b
+af1d2fc6e0132b3505d3b0e949d6fc4d9f744436c619fb0611b13a6b0a4e2372
+a21d4b034d9b4e0fcdf5f25c41e8ce94c8e417088db74d2d82a618c18111d385
+c4c66d1f37f6e64b8dfde45ad805c374cb8030fd3db32e8489ee7243c78ee4b4
+3f58f68c2f77d0917aa51ea69481d98cad76a2e6a2833f2b1cde6d15be2188e2
+40f304e95494f838630665b8c8330ea641683eb4aedef08ad22b5870e8508f4a
+098fb39f4dc7ec87bc0eb35ae1e97c29026d6c800deba720641445df76d42a8e
+6470dad8a60aebac364f773ab9e7f2a8b31af927190c4baf7f7b3d2da3becaec
+06162e878fa179de59cf84e37f0e56764963eabaf87b1fbe061917749ea18ac2
+1794eedf33f62c32de4f3db287d51373384a2cfe30bb5daf59aedf26fb1fab59
+5e8897f2328f9233d396e692cca1ba9cc4e6246968ae05fee297a5cbe1dec18c
+59d1618cce3b4bf40d4e07de3cff3b20f7bb88e7f1323f64bb8ea416700c3703
+52a06a717e69ceed80be16007079ee6d7ad3a87012eb2929312c2b68aa785214
+6a5760590785548490ee4b55bd78f179671e74268c670dc71971773683014080
+b742cdfa5f5c58173cac5dd60832c9b6ef16b85c4280472c96e264b54f158989
+386bb30d4336cc099887921049db56a41d2a6f57028a7cde2ea150e9bdc16d8e
+e0f42177a9fb423f2245a34dc8808ecad15ed373a368dce05930e4ad627da6ec
+30c03a2b9f4368ce8bea2a19405a5dfe6745c90ad99baec67cef778651e4ddcc
+e469d3978733fab41a687f7edb977653d119a9c8d33f299836f12759bd4f5abf
+ab5b1679c61b46854d8c9345a33d3338c813f5f8d0947abe01fb4846afee616b
+84f713090a8b665320c9b3be3baa1c7d1923804bb5ac590dd2f7d1cca105e7ae
+a1b880890497bdc0c965e6c355463f8a5c481fa144dedeba2b5d6e1c805096d9
+f343738b9bf2571b3675a19a2f919ad7da95cc16bfb4d7e83bbff08c5bfd5b51
+b3ac712724e9d031ec14e05979f79e2db6d1b85755c327ffe124bbfb62c93f0a
+28e5a60ca370948a3a2fbe3224849120cd74ae75aad8e4d110ea8cd3f7983cae
+e269bab03078c3ec14d9169b2ccd4c5a3173d63c7332b2ed58b622c8bdae6c31
+bbb347a18271f610c1192085b933051bf4dc83f627002b9654092bbb48a0c6d0
+e280db40562724e3284aa644e399062787a2b58e850adb5c1c3300c2731b53f0
+ea5e3d8c37ca795bfc171259877c8c3735a46beecb8e8cf9bf7a3ebf60d90a5a
+b228dea11f5b847663d97e8d43416cdab60be9641282027a152f39e953cc263a
+34e070785904b1cdc78998d53ea6a44b2edae5be3a22aef96970ced5b1a8fff7
+20e39b7214ade784dfb059d1b9ff5e8a0a1c910e0d6dd399055d7f91bd13d9ae
+2b6a651d1ac110d1bf8e2e43f1b4d98b3bf62b7aff5e7744eaa994d96d6a05c3
+cc66b18ef140d07551f83bfc4fb770f8674a6f9e844879f3f8b7bc956cfce62b
+c658bade1f84701103df87cf8ee9e5d33690839e8fb6e3fa7ede4fa9e093da77
+81d379d9b12bf2a56f968d0849311e81a72c96a421b6cbd58ebbe138ae58623f
+2208930037c3cf001134035d7e47cdf849004522de61c27263c515655618d1f8
+69784ab3f742689ee655228e1672ac9ca1806b76232fc9eb85f69b110ad6caf4
+2a054adf4e2767a95f5534c5525a5a6ac6008a10a59cb28bb70e1a41fab590b7
+3fcf80f3a989e905d344ce643aff41a74275905e9235cd33818c5bcee1994c33
+77938f2c4fd08fd052f6f59a9460d7897c139729e768cfa384df59bec67dc82f
+5cf8e2638bbd8dc769ce87857ff6e7c4580ed80e630815057a0e381a91321af2
+aaf3710f92d3bea496587cc1baf8e76a90d8406716ad85e8bb3067ee410e32cf
+9dbf16a6ba4a6993a1454a393aa1c6a4f5b85bd71dea9d09e16a82a2e64b5c98
+8d2f05107b11cce59735219b104815e38219b1dcc2a8fac862cdaed85b4e7f3a
+3f8de686cbe956d7b11ca62dd89c68754e56caa56ce6f523579e725213913d16
+987674baf3e75b9e1176845eb69121707b6d061fbf86a28ed7e3cde2c0ad5fff
+3200813651016bd240ea190b9240e682df8104baaea088c868e83924bfab865a
+99831038e67d113489df5abf11f7cf0c1ea9c24ff19a56faeeedb1b2e103e0ae
+b28b73d58224f590be7c0a7548caba79e8a312f758e48c9eeef76a012383e31c
+4f457d451bb1c3d9bbfa9dc84c016f6a34a40a5a7f61d5312abcf985a5b56bd1
+de2bfb6427053f4f73b04f545d2e7941d6aa8a465719bc818b14f388161419d6
+9a965691fb68b9a8a0d78f89ced539556ed137321ef6c35884e9485070d884da
+b5875d08200a593ae7f9398f4684d19a3a0b621496f032fb8d17a5735dd5a288
+0058b60770ef1136d78fc9dec10e5d78a7dcb4e804d199b659030aab2eff0a07
+c64aeb7b5bb2181d8a80f3c9c5bc1eaacccdef478777567c2f03d9706b4dce68
+2ee5f872e112f7a952101d859246bddac59acf9339b546fe213cfb6230bf2862
+3f0a53b0439839fdac6950f1d1ec14121a8762c94a928473e76e767931fdad0e
+c399a7b27203d2198ea577f2a518fa57c75188fbab9de2e7fae055afe6f3c7be
+80ae91ee04de86ed38fbd90fe76160e9eb222cc28c11ba39c3ec6155233f4313
+5478ddc2fcf853822921c9a5dacc1bd8a11858ce9af112e05ea6923d4f3af379
+26359d6f9fcad59dd887a7c302e868cf806c3804a997810b16d66ec54bd8993e
+ded40daf9c1326d48d649390652bc12f8df57db93013a53a340d060f8f0ea208
+51ba4eac5c3d3afce0dbdecf1b6284c3c16c5529bca906a4cbc295fbaa9b2588
+7d5c2c70f6d7e0e0b52c4c4f8fb406e03ab88787ed35f9c5d95f6abc995be12e
+9e51fd4f7771512064a1b2ecd96e89151cd5e135ed5f5ba07a16bcd4e51a1622
+75d9009dfdc4ece7a5bd9561a46099f05a8dc8f350069aad74aed48f7ccb4b96
+4cd0366b94ee152fbd623983a5fc38b9a68cc3d08914d2822e78da693b850b07
+b85a17793750802f661978504694e3eb4b5b2fea34b48eca0a8c24ef81d29ba7
+f6622d6be3305d90cb2af2d67a665c9acb1159a5b34353b0bdb0626a71efd2f2
+56188f41f6c85800ffd51866fa082561b6f19153b8afe445f88b4b7f15f8eb6f
+757743d88a687e44ede5135356e211c8b155f12ee7aab0f9abb94dbc3c4a5367
+737468e6a095481a76d16bbbf8ecf6ba56f710b1d18af7ffb4eeb8275e095d76
+743da78c7e97bb5531a71f00ae8e8f5dabe1bbfb651b076aa72fda2d8bd0a645
+b4862be4c0d789d645234b46286cfb807982101600186720180ccbf34d64b0d6
+232be45545cf2f4bf0d23dee4548208296064165c34a52e734155f56cde02134
+60c4aad2e5d9ed3b44a42dc897482d4a1f0780210decaa5fb38ee0cd00a8254d
+239b98ee8d82091f45afd8b2c825af54d78e1dafa382275da5fc8d345f643df4
+e4822123f04d053b026bbb686066674630165f5f0ac094d184cef0152242fed2
+fa7b4bde415c3f9ed71d34f37f59a132f8255706a3a4777d7af1fbd4321c86d5
+bc0fc80f4ab662c0f1e59689b6ffc36d81e9349ed7b762e10d85d7294e7d394c
+616f67dc9624951164f310307ef5c69db573794a6c0c67dfa180a6bf62df1194
+63029907d339f69af39663e8346d43ceb7433770a42c00c7ac49ae623f4773b4
+20205ef154d2bf9053a159c374021a8202b246e434164c4353e96c3055a70a08
+b890bb0bbdc381da324c1f443157880753f7dbe688640f35d012d011fdc3b84b
+530ed296eed8c3ba88ac312a5e94d23c4a6bf5639fd103c14db6fd71b6751d57
+92069f67cc142c1533e54fcd76109046f1acb94d66d3ead2ad35fb9e3e8e349e
+dea50fc8fc4506446a8ee556f8c6f3bda2bd502518bf237a7623bca8e81655a2
+22aaa7d829acdd789664f32ba972b6dda0b6d69340ac6a4840352ce04049b134
+e34187426220067f15168f593bad76800e3687a9ea99d5d79a544adf232bd90f
+205865688bcc84739eeb804f99f354dc932bedda4a54b0ccea94d3f129bb5978
+60a8d881a7b017c3ffae7c8b5ee76d09c8ab8572c81b994d49c2efaa80a5f2af
+299945e831d2335d669c596b4af8e9f5083f90d7846b9be991430e7d396efc33
+c232634fe93d5bde557879b106ac4c7a124d5cfa47250a666c2cc9ce0a158d37
+63dec10be1648ffe60b51e94e8317c71c0553ec74889f87b71c7920fd676e09f
+5f21a1fb909ac44dba922b62597681f9e9323e3599473f39e52b1348bf585cf4
+2029944d229073babc0536e8f4d73c8cb49264e660f0df5f606af0543a1137cb
+5c5d008b019d542bdfcdbb3761d8dc373a20b76ae2b4885189edfe5bfa1e0599
+8fc793a9804ec309b0024a04a3c24a1efa61b87d1bd95dfb688a6cba47fbfb94
+5ec8770e1ab19a879891ec6318981d6bb73234675a44966630f34efbea0fe1b5
+a585e5ffe8f6d58ffd7abb3a7a13b0d532fcd8cf878e57cc0dcb761f291c5536
+dd8222e8777f112bd7c5d9d16e7ea46b00bebba2fd8870fd94282339f7298c1a
+cf2f3c0eb7c203181b55043be782b79c1e33a178c53a7d09dc2ebbc3b338e5c0
+2dd813e2a456d88f4b658bb35c6ccfb1d51f83073cc5643fc3f98a6b712dab8a
+a41ee7183668913669d13c9b0cd981f1b6fae03f47961a49e349bbb0bd62f47d
+5a0d4c35a9bd80945177b33bb07ec5c92d03364649fc8683d1fc202c5ef8ffc0
+d7cf9ccb7589ebcb56f2ecbfe6a46a028b65889014748d56968746e37e9b4310
+7eaf668a9a949c851870dd5564e29be355b75f93496d997929888f451f4ff7b8
+3ec717df9865ac5769e8078669da3063645a9ae0576b5576bcfa3c1cecd8e82b
+6a6727448ab8e6d5f8a06b08c885f59fcb66e918521c32d006aac974c10323e7
+a1f97b9cf30c825c35483db7b5196744be5f286fb9814c7789ad4b1b397e00dd
+366b5b80a7e5aa28cad3856fba593cfefcbfb19bc6227b79c252936fb8f2d49a
+2315ac036c6e08766aa2b287b6e0a5d851cc66afddf1e577793209d2dc75f2b5
+d8050b0cc54efc673ee8e42a0d305812a5f89979478de4c24896489ee3df4328
+a585536232e065fde26e460fc9435bc02445058d56ba2bee0a7b54e359867ea0
+5955aabdfdac296c39ba589f11b3d2d9c5e3b7508fe43bf63fccddb5ba21bbee
+4269b218d978b5818751b2ac06871753c511d36f82557f561eb95c3b70f712dd
+fd84fb5230b503222cf3a17fe8fe2666d1485419f4ad7bcb32ff66396d929d3b
+207df2d811ee6fb1b4392f8b1a993dff3c254ac865a5217a459b24158269a889
+2a868c6c4fa9811e356371695713123d01a261af4eea0a72061137a17a93fbb2
+151979e29a11ca6914e3c6ba7990bd0ce58cac96c2e84927d1de1754a9d56ddd
+a0984576475946f63c2c454bace266de5a6f4487a03ebcd1fb0df6fb22af5434
+6938dc41bf1517b3fa99fdc97a8d09c320388fe718a843fc3d7ea5b5ecd27985
+74b38fd9f1d21f2d4a25d0688b7d311ac747b12066a7866204b91c648d51a9d1
+b67e7cdcbe4e4489948f9f70f6866be1a92b4f7931a12d134cc82fdc4782e8b0
+d42822d2fa5df15b349f8f8bb4f56125e5a578b7afa2f409565afb59cecb9952
+aa42a7bd56fc954052fd6706caa5fe3ecd54035f2dd9e10336543f4eb99e3177
+c0d3b65b64252b132e23df390875a3a612823d62959128b25e688fefd781df4c
+11a205fb7337c83b3191d7e38bcce10ccfa3c411bf6384c456e7d78bded31f8b
+eee65bf5dd748fbe4f70fea9a542f894616252d9d809deb49a9775542e613919
+fb07e86d16b3f51736e82d27dfbfed036782ee3739871239e34dd7fba8deccdc
+78aba8245f945c5b2dc53e2cd2f1354a5495d4a002878dbc7ab9ff6384d9d9e9
+131b73814ea9e5fd0b57889496763d073fdc1c5433be30acc62f3fca83326384
+5bf724e35bd947a611a7bcae04648298dc434e415b8c1236aa8bcca1be497a05
+8a0bbf35d224c77ebd7ce63a69b21163534c00499f312de6cd1d63112fad9c4b
+86d437a975b0854e35c68a0259e0f9aaff4ccaf3938a2e7711d6545d75f264d9
+a1a00d8407b8d2107183c2cade139485cc681b1127304fa3c40d377dcad69884
+86593525bab6ecb33e02c7203e75255b7e778583cad2c2bf8d5da414b37d87ce
+2c230c28ba4761ffe92ce3219d5168e54fc89ae3f1ad70cbc9b956b09ba6e3ee
+58e57de7b56d02a9cf7cb8da0d6ca2c3076cb9130165a2b65bdbcbd47c31ac3c
+382e0227ea54e52070ac8f126867360726e1124415c83ff1e64eefcdcefc0ce9
+54ff72e9a015e02e4bb8b9ca0e04592c833cb2cffa03eb0447c1cde397b2ef92
+2c95430ed3e54046921ba40bccde14d4ce5a0fbfacf25b2c7d7024545c4b51b7
+d03f662a87740abfe9248449753a9007deebb387d7e7ab76631aa062f79a434b
+35e38c577bac6a5efc56772255ac92326adf9023aebb17d8e073ed683a029ca7
+8da3d55197392554af500283b0e47611a3e2b68c852c349996113e47742ac3fa
+20e61b641e29eaadb4c90076d2734ecb674e64d25e859f6a085bccdc22d35885
+ba0960eb7bf1072bbe291f9b1d1ecd7935cb7656ec6bc15d64975b1c506180eb
+0dbb33dbb74551622ea37f0d813c71416051d0ca33dfbbd0d552863afb7061da
+a359160a493ef304656fba57239ab154af8727eebdca342b288bc07ebed351bc
+f276f5e6c1dc9cbdaa91451106df45822393a8eafaf03c3f024b20dc0bd5e4df
+43f3c6687f2019d642fa79e8ff88a42506d1d7d6b9be7feeda8e21315efe471d
+59bffa506786dbdbcace04a8fe8ae423a27b4b9c0c1b8dad3600f5bad7bf1780
+759d7cec3cba13cbf618a53df36c5c2702a38c3af55bff63829ad7f7ee534144
+13f4d5614c05b140de29a9db8135aa108757505841f855c24761c2ed71f89642
+041c855fe532013d0febf7a861bd8b019980fdebea9b245fc3059a8112559970
+a62fa095a55c638bd7a2f28fa2da186d62f130791e8c34e8d7dddd1e9cb6319b
+cf6ec3e238f5c1312e92b5dee3dac520eecf315610fc65f458f9f48b0dbc9e93
+b1343008995ac25955fbb881b051114ea5ec4a45a729fcbccee8da29c4798237
+5db572fb7eccb0ba2b41371686c237234a8866be9f1017ff5d151b931248b9a9
+d279e6faad1cee0e2c94b424be49aed7288311ea1ae5f9612bccce83e65ee68d
+00b3aa5358cd9fc62688a7694a0e4de3135cecd48721bbc4a686bde074832dce
+0f0c31099b35cfdbae50071d2f4c26b55ae51b919c4c1100a02927ca59cef516
+ab603d631abb6ac0a5bc4788bf8e53f22f83dc621cb82372ed4329f60e180c17
+e27e822de8a5ea5d3fb9e0ea0b2b96f1fa398392ac2e001721ddd7423f19b967
+4053cc18287e2ba5a3e2d0a0e80d93ab99b0b3ecb3afe71f6a384f62b938c818
+17462294d1c9b17ab3988e7ae73f3efac6ae24b3ff82df6eaa285f3ffb3248d4
+fadaa73b7217b0c1faf8f4dde2c53fe9ece617950bca9b3d66f0251536963e58
+15c6dff60754eda6427e43b0285643c0a619b14acf45da5dccf94a2332f99752
+dab07d1417ee757010e091cce4143b2053fbb276f5e1675006f3198d865b483f
+f4f9225dc95b47690742826aa2c0798e8adb97bcf983cacb4c3037d82a0afc4f
+5596547ffee1dc83e7fb94d3d14aa19e70c4d9bbe9f0cd519cfa91ab345f0e6f
+ef54525efc326d87993e8e51c9472be3b346b06d6a05b93b07e04c45779914c5
+66ae97cc9286e7218b9dcae206c48f73de2df368912f7a45602cc3071170b502
+93d8a6adc85da881ac3eca963b02849ae9889eacd3129678dba7d032d465fcf1
+bb50627f25cc2f290e35ae4897cbc9ee040e66db1cbd80025ca4188fc2d22d30
+38f7cc8e488b0a769599372fd924ae386c18bb6313b6dd7841302b8bf688ee31
+4477d11eb74b2402dd2a4dc51a6e795c141eb38a0920d6fb582abb07aba1efa7
+d28c7e6a7b0952e1ae2ed26de402f712c27a96c1c51abfb1f5d56c0b67e65cfb
+08adbb2c7f725dfc14c054c84e875746a704ef41122f0e9d496dc36d38c80861
+17341595c9c1097bd547bb1f25a5a64627def63820479beb5780cce34dc7dccd
+1d5bb7718177f49c6858c94178ab5dfe5a973f4fd9b621220c13f78aa5d2258d
+25cd8deafad8fd1dbc6778ff902e36a3c190d60547fa62f0341250ccbefe8647
+5e4b22828804d03f17f54549a66514f6458694b884a8a733ae55975249810acc
+354cc875ec55260386693c8ae60160d7af456e43e8b7a3cea517dc502a42803a
+73da983f7a78d086652d3e0add8fbdc7c9c2cea754a8305b9b79e103e65b1832
+a6a024a5b8fa8c77edcddccb5beefa3c9d1d01c37a74a08953642083851fcbe9
+4d8bce1f34b7c71b68f3247eb463e7a2fed1bda308c877e91a86d6052ef9d55d
+06d6b83b9af7600d61c36a6c460cb43af1cd5bf65113115de83bfc6081d1c0bd
+d88f19949680caaa9f48a608fc67deb98ce9577f24f1c2184530f78f788e19a1
+5f17836d2522fc9859b80d7a3c032f533bba7210e9fc43740dabd27fca4c0a84
+fb0b1849a93c4a09c58c553d0e910df0b2c5ba53e8290a3fe05680cd7c611bac
+2a82297a1d42e400df434b476be5a2f92aff2db009d26dc81043bbff997ba7be
+eebe8ebd761d56ec4e45328dc273f86f13bfc0f5139d908145acf933632b4f78
+aaf3d1917ff63904f2ec971b5b2f4ee6251c0e6500fadc45fd9aaca127967082
+a61ca2891a40763f1fa17f5c6ad3cd1643be1c088eaf4d91e328ebd670768dec
+dc895dfc6a554f7428b5423a86858aacadbc8819c0caf25ce204f98976c7f18b
+071b79f03d9be136d36b51fbab43d7b7e4a6b3792e3a0c39794c46eb4f4e27f5
+e805923bd6c4c5ea9612fac86f7ffd3b8ad343d2492b8d9f052baf864747fcb1
+b6465f1b1b7e020684c863ea38668c55ce6958eb6bdf0509834ee6fe50864116
+e3160227aa042e26fbd6629cae19d0435b19dfbc92058f319de60913fa956fd3
+26e76b5635b9f4d6adeaa45f31a32c99be06343571e5176e8a89c544f6ea4572
+964f1787df93981b88f68b4999768d382128d5316e83e74643d70a2ae288291e
+806d19b180582e19eebf8d295ed214d966b5282e93c32452d58805829d69add2
+4d9ea97d33da81df65a4fe30ebb6b5b8c9b5102ba616bc2da448eeb0f0a93762
+a40521b52f7387c535e17069ffbaf80f0dbf57b296043367237fa4229ffe30ca
+938265084c735ceb1fcaee87ee82a2aadf9efbbb4cd80168a0f975b913a236f7
+22fc543668e57e0b0cd201b099834b660b49673d12ecba4f123be5545bdd0df8
+4f1f0e00c46c679b915684b51995d80629cd4485a67fc28a18416a3639b11e34
+b40f292a620fafff9e21b31c85779e885f07fd8a400f84235b585634d233834c
+d20801ed4b4973f1e91379e451cd8d29cff2b9989ced4fc976536446fe2bbe7f
+f446c5f791ee401cc5dc916d94a2631396634be1a2bbc944da4017ebc4e3965c
+e780b758000c9928962f667300812363c761d33f868b1b8753adfc3e77666e04
+c1e468c04da304f2876d1afde4441719c3687c19e75dfaa44bfaa64bfae835cf
+501d71ff247d1dd18953e980c8c3701e1215c588ab78b27c41c35c265063c5de
+6fed78259cff1d0c848272b4991c414e94fb052043e0a7fd59df65fa27941e06
+9f1ffa2c5f0c32d0ce639ee9c4a5ffb288b749094c464c679ba3e39a11a19cad
+1f5192376ecdc9a9afabba7f4b036edcc94e472ae1d1aa64197eff0c87dc4d97
+5fc283cf7dc4944ebc13bd1e937c97e59f053633c52afdfe1495953740578168
+5d137087920373603688a3dc4ad18137b7dc38d8f94bccd6419d9d356d7596f2
+e027ff487fe91e74139ed748df7de8c3db5fbbe0e724bded756113bab6047ab1
+574e67413fd8aa1aa851d1841d7188685f0413ce23140d869c822e22ea13aced
+4ba4acbf0d9b65be4227d95e84944ff8de263775659eb52615d6ab62319d75bf
+805a6abd316794954d029491f9fb47110ed48760f7b39a8ac5b24841536c2a02
+2555eb6dc69324f9d735e5f2421c2271e6b2619d2515e035203778cf0233bf7f
+e98f23bd109cfc4ec0d01e3db3620b1b9846670bf1a8b2cbafdf7731f50601a0
+214619f59f389d6b1e0e0f5660292dbdc7f2a31a3370d54ad4b02d13f81a2f4d
+18b6487425ac00228266f1027a26e4903147213a7a5c29ba1bc748da6385d919
+dce09b00fc655251eae84d6f56ffdcadc25d8c22d5171f8c00ba8b61f151b985
+6d55137cb7008061645e8e4f2315c1553381147cbf7901c4207acf851ee2d34f
+ac0bbd28528525aa65c6321cbd68bc64694838fd81b20845de3088ec9e13a886
+801a40c656766860361e04ca6483aba7fb9ce30339df27fdfc44b34fc3db554b
+4e4ef91c3b7ba7484cdc036fbae749376229a608d1e00913c03018e247cd6346
+9769dfdf3012c2f562905d9da397bd007b2c81c47b8dd3ae61362fc8661dc620
+bcf9ef2561e3c342ad2f3962ccffe8e98e6d62c65fd9ab872783dcfa035ef347
+a2d0d61bc2ab27e4f96f609b91ca099895354ea9aa11881944c99ae187fb591c
+01cccfaae4247c6143689dc9da0224a43c2ce43b97d49c0caaa14b838bebc579
+37fe3a2aea774f1b1cb928d69b3cb31f937ce83097b12d6f76eba9be803c0a31
+b0bd8de2b22489e3da1b833bbf7524252d51ccf76088fc4125e1d0e6d6815468
+547b248d16317095d732d1e9276d063ab7665d2e684ba272af6351a737cb8751
+9c74e5c624c79a852a39bc22446a87c09bf4ca365b1d134c7d6ab23fb5069d83
+be00745f0672fee615dd8071b8ccb31a4866853d7805ba92c618d2b849ffc498
+6fdf4abc9711617d498fe7013936a85d12da318bd0b4d2a2dd715749747cad04
+ed570e583b2f33855af8a8d1437d389d6e9b3e47f9de9de4481c492a05ac49a3
+457307dde03b8a30ef2edebd60a5c556db43bff4854b255c716cce2eb9559a95
+5dfb185e18a341b0776d6c782c98675aff75d2fca752e915f58e5c9d0f192914
+88e46db6a51bae30403328930f5639ed29396895778431543578109c917e5730
+9c5cccdb2b6de16a8cbccd1bcc97556e666701659a43c5af8848fa4318cedb25
+67050ee249eb8a7fb5c210eef38be485c82d69ff77d68982222387a04b2d08e4
+48aa0d2dd0201a1d06b8bfc14169ba52d34bbe65a03715df03259656760f90d1
+043474c465b5c900b86461c5e33a5f93210871d0979fdb5b26ca1b2409c8b5a2
+9ac23b4a69053f7c63efd9c9d904472e1c387f97669a830f482bf3658403d095
+9795695185c1a677fd24f146a4c01821377e35373c2f29252f2d33bdb4c2e65b
+54f6fb2a74f4f69c8099cae259e3dda70f680d76027e951c523b33adfbae41bc
+33940df06666a88153f983ffcf016ad439a84cdbcb32117e5e597c541e7192b2
+11177afe54f0ccacd3b67c10d44ddad93e604585a513831c8ba986971b189295
+843caa12d4c3066951a9f5cb6fcaa07444e4be618b3d6de06fb7754823e62fc8
+a87aef5f867e80fd2bd0c699240cd59203136efc3a94eb3259f68a81e923a78c
+8c30c38150bc808b7a0aec0e254e623474456084331837bc16ef060780df87f2
+f74fcf280ff478a04add5a41aac7dd136afb9a4721cb04f1a54e8ad7c886cef7
+33d14d742c292a307b8c50ed8c16756a336c45e6843342a15ab362170975b429
+3986013ca616f6728ec65e0b4ef1f4b648db8f12c74e38b2164ff0a056b53aba
+a218e7ec36425b4e8dff37e420ca3e1ba16c5bf6adea301e6039b596f3ea7b29
+df568fe8c742d0bcafb24e7f561c73aeca87ae7cdf7ba2c4173a5fd76f941586
+48144781457282078513542a6ab75d2dc6976f185604e4ffc7480015d9feb000
+46bf9f6650d702058dda7e4f410de647e3ab2ac42561e4c73f96a22fea4a31d8
+f36da788f42ccd7ad66668fddac36c37b800b19bbb32721c40fdf1a523a06750
+86de6580a675fc5e254d782daf7c903bf2640aed85198ffd17f19d91ae85b526
+448d14aed5cc66dbef9b510c9edae9210dee8f44670b4ba2945dd98a92d49fdf
+b884118efc1263ba6fd2712047df194e12e107b793287007b57145b54056cde2
+e8310ccb234ea73ed35cd7a060b6088fddea99c4d93827a0adbce5d927faf657
+d3a7f8a49626f9ed40e1e3aaae8650268c4aa85e8b51f63ebe592e773306deb7
+c78f80d5c96968264d0001bda325f560e664f9be197ebc3bbcffcd0ae6fba5d2
+fa83b6da0f8a6278c84530e657e59ecdd591660a6607eae2191a0fcee0e8b8f7
+de61cc07fa55dc1b9bbb98930f93b1d9419b84e6e7b8ef2595442dc264c65746
+1bc7a160af243059e0030a31740a012b783247420967746903bbf44ff2b33aae
+487fce9e1b54b1e67fa272e64463a796201b20b6f123bdacc9f04ef881b16ff0
+b60c151419f090edc5d95ccae9773dd1909a37fee6bf39f2fa658c1da7a3ec5b
+290f183b4ea95fc6edeabb46b5f518a63d7b8a1e2e0b8c1eb35c95963ab65e55
+9720282fa5e4989ad605ddf5543f50382f539642340c26e379b5325a1262fc57
+532fc4e6a315aff2d4159a0eac7fd498e09ba2e64dde029f33402a21f54efc92
+609fbb36907d798a34c86644264e0ca3da53639e262b49be5f3d212d36086fd1
+5b68624476c0ab1f715d35907fb19dc62625f59b5e9e63cf8fcf3c3c68a6e480
+2d927018240a8fe4230922bd0a431d67664753d51d4f5ee894b5ecf678f342b8
+05b201c2d4540e452a1be93da7c0137a3852709a8362355935494b1401ab73d6
+0c4fe07b2314e63db3005a40f4b36dabd0db3eff936b0a1cc643227ca4fb7e0f
+a29ec03ab4610337bbcb63d72f42716fab0a3058dd961b2f291293beb9126000
+a8009a5ab98b0c7529c0e2c4ae27acb684bc3c07817a2d13c672dfc6cd448f2d
+9c8cd5a1f597039ff2601d88f2b3dee5980956fada5599c5c968c5cd2db83a9a
+e24e2a9eff9d3a0a488f3d7a68cd056a6f8502d6e5a61c305fb99416001a691e
+fa95afc08246bf070268f62f8ee9e4ac8b2d812a728db372c62209fb6b5f6789
+7bb1443ad5241a004b3cee1b9e1671d5de56ad5491e42ea7325cd718578a44ff
+fc73f544a6b0b1df27c39e213379a1017d60c11a5f8769022bc8fbec7405f4e2
+bef06c1962e4b4c45a1e080ae095ce911736f220831a2bc4c958a607b9c88a05
+96beb76fffcf4e469e2dcc09857bc9ea5687be77e1e392f416f681dbbd8da68b
+f378547ecf9648c1b95005bcfa1872dd1e72c5510bec48b0e411ca163c8214dc
+0efdfc1f08e925a5bfda8e6ad2f9ee106ab0a053fab30677c6ed7992899d3d1c
+30f11e59bccb1e0b329dbe5415fad4b7e420cf9c2caa8f7a032d5e9f9558c2b6
+80f5e6af2158a8ef1fb1e36554ffcff934bda7039ad926ab6e12555d30f76f0b
+e98e2e19f12d4f4e8e5ce72e4b2928c396b2e9debd44b9bf80e1df5acb4b9097
+f6fcb00e1ccedcc72e494e68d55151764795949847b513c4cf8694a759f1c5d3
+c6884ed10626bc8eef3097934426e7d45b919ec141b9ab389746b6c277469d33
+b82da2ef40123707646ca62adfeb5828706b571e160efc63d98e8e30af9a7c6a
+4046777b2a7c17d08e0cd5e1b79c261b60cd86fee6668f6a3812c6d1bbe85d1b
+53a79f0ff4e19c0bb6b2b07c3bc145727d25f9adf2f6ffa14e74e33f21827092
+1ff9d9227d08e044cc750d532bebf0962b6f65aa2d50fb238ad84646d16fa466
+3e592b1e3c21b07daa5e8978793436c50b30f31b17f3b8c3a8a9c98bebecd6b9
+2ad5f9a99cb4649d799dfcaf8860759ac26182ed3eb6a82a980232a426fb7934
+7869b8b24c966de308f669ee47f623b95abbd9f7d81e5d0e81714b6f328599f7
+5e7f9a85f92f76e3df446a7130fbd7652d17abdc021fcdc761f300cde20bb116
+e36484ea2f2ff9032bee64fffe992b4c437845edfa194bfa3388a22ce241fbd8
+fe8d0549d2bf43f0ddc6b0606e976dc36ec055c3722d7fe96a7339d15f93befc
+74b063908a089d9684f93364476f9694a9a4a4e46100a6d5d2f3ad34702ec2cb
+e64cf76d70e70fe725eb25780a3dcc619c3d3d1fab7d93ffdf695c9d2d86a007
+ac11eb3d551592ae551cda8f78ce2f4a06c798b6bce573d35f9c01a775fd3e6b
+9d6f2eca089b11c38b812b9fc497c58d96797744d9a433f0f0f545bd7b4b6ca8
+ba8011c1ecbf6ef91b1ff7d016865871a12eb9ff3f55e4052c152de96bef6d1d
+698b9918a8a68202378374097d8ee27f153aa3eff3c6d49b67d8e09cb51b9bb8
+d18eb43dfbd8647e4d2b3992810e46ac719cbff5a28be6532b39c2b462620109
+f42cf1cde4aed3b9f78ba888824dd0d32778be34ef4a7a84a785ad7920621a25
+74376e0faaa0fec39bdc769f5526fbb3f620b3926f6bc749df679115610bd29a
+fbefa357d082db7719a75b6396a01b775bfde12394c4ec0a0f75ccd92de8803f
+ec9f408861ab730860e0309b3f799eb7d99fae4989c83e46639d08a662e71ede
+60aceb5280b19a7ded32438cc1ce140487e52db031e53ffdf299d552b7f9556d
+438171ee4787bc6b445dd2bc23da420747f6e81046e715dd6f5cbd9a97f08deb
+a742feadcf5d93c7c2557e69b45a505b91ac6799e37f40a2a70f3d0c0885f85e
+cad7f5d5498c18d496f84010cc0da7fc91c4d1eca61ce021b3f204ccac60423c
+269631a05d330c8b4574754aa6019885866e0245eb7efcbd747dda328525cf9a
+3b13b29b8752df2c8c30c0bc3207b37948c30a2d037a29d1ce075b778db6ce18
+551facc66a4032c9479e5122ef759d8c58601a572b0a02d8c606e0f4df80f411
+ff5c60c06c5f263375fa7fb67b6f670a453bbda2f41e71c7da09770162f636b0
+108680424e1d6ed498acf2b997dfec6d8079b2d26103c67543fd0bfeabeb027f
+dea56c640827bcf1d5c9e353e30b46ee9d3495c9af5a6cac79703aedfce3a0c1
+d4ce1b20275ed9de111473494bec7da5d579ac5260aebe9a0cfb7c6730bd51ef
+c8b8343166a6ea72e0c25fc745b2c425d852b6cd9e8e2c0cfb16be2257bf6933
+86693e380a7eb1c9c24f193620d886921945e5043fd6b8798c1105ec40d4fb82
+56cc8ed9699a1f84d7438eb7447ff6112686403c97385442c3d34a9187eacd1d
+dcb4b5fcf4a11e90baaa10fbd457053f5270e4cab233f41f56cea906103c5b3b
+0e7e5f9b8abaf1d66572ff8b15e0979926dadd51de964dbbac8abc813c28ad71
+4b14bcc1690838b6a2a33a4045e7ae481d679178ff87b65d5e7bdab7bd59b536
+331c132115020fd681ae7705d805023ef790e163ec92f41035e28c6edebd276c
+d4de63de8141cdb8d77b6a657713bd1c38f02ef1d97dc791883e15d96b7b701a
+2f124ebb9aa3a2d90dc825470852ae8a959e10375ee5abfe70aa5a1cc6cb58cc
+df3ccec83216907b8b80ff54f35d53a2d9c679e61c2cc9d8b3271c597d1cf153
+f5dda0a71eb2d2ed289a5b0d8eba301e7a4fe05e649d53cf3c6275c802b88fd6
+5508933966a5f261c898f755a60d7d3c95223e470b0af6ca4b2a57615c3e2465
+f535753c0c3d21f6cbefc29036d3e925a4b6216290abf8ddc86ec955157ae441
+6772fb59eb3b6280a78f9183bfdca096d5b46f938058c03b38adeb1b4f4fe848
+ff24ffbbab3077bf50b1fc474688bcb05d9e07294f3871bb2c0dbd266866cda9
+a22b2f3638e7b93d6eece65df65835d6c8396e5a109bb65d9f23619ba85ca9a4
+34564b9f706f2b0b7b68518f6e0962e101d6a2a83565cb1bc4342fcedb6e7394
+4d303d4ed4f792238531bd105fff9aa61c29bccd5d6c6ee399b48ebbb5bf3932
+63de8e873dd0775fda5861d1a9c547c01fc3cbdb7f9574f14bdb1e97280c024a
+63a922657125be2d5f975e86c0e4b9b6174157126a9a06839530543f1fefb261
+143c666c42615933aace075512a988c9f2a46a449ec3b13fd118b4626e2a047e
+fc90a20772c4ebe9b23eb733fd45dcd20289ab7d801aaaf5fce13807ebc84420
+fcf927bc88e48903f17bad04fdeccb76c7e2ab93e008321fd5a83a39b8325343
+59d4cba664629d807b624ec727850bcb92043788a855a28e86aeed0fddc4f6f1
+fd11b6f00224dc2d88248abb9245112914e92c933800336c75e10550610c7569
+e09c8a3389f88d25cb30f7be1a6accc5dd17b02f141f729f1b36d32fe93b4ce9
+75865054e448fcf1ca846bf004c1c67fb3c48a4ad2bd9f1d594e4646eac106b6
+7e747f2e64fddd88d076c03b8d7fae26b53dcb1027f92fe769a8385e7cbdfff2
+e569a107b76e592fa59f8d92e9f009ebbd872a09f3fd3d9746e8a8955634858b
+4d4d967be07f8999d7fdc0ffed37e83f865469901ea075fc27e9a759a50dbf02
+a7a1d7031c78c9cd66e359459469e2896d6d4fff36b7b2b510d66761fe133053
+b2d64c8199558288054b842da2816588a898e05f2db1a5e11813ad89f1660910
+410c531faf42f728cc1b34188084de2578dd0f5458bab3c17da610b7d6afb635
+8ee66f8094436d0c4896550753f4a06cb566188ef59b536ba03ec04ee8650a3e
+3f3a932b61c940bb0eeef0ef7c1301ba52e59a904542ca2a9bb82e1e03500a04
+f818f8f747d3c431686d543e47b14b37cd1e44f021a5da657aab08bd56cbdd7f
+453c331b7041958d618d4b007f5798cb49260ab59801977df6eb49d3f1e609a9
+c862cb2a297a2acab8d2ff5263f40fffc73078e777863f7947b0419b6026b7a9
+f1c14bd344902c8837f5a5c6a7002984f40607f8dbf01e9caa04aacab39ee10c
+0509c706a04db09e08ecff57cce67da05ac8dc14f700b2ff731d0799236646ba
+68f305cf7f79020dee5c99511a37b63a693339706560635dcc6bc14d5d12ab98
+4ec26e657619d2c6d8f6490e55d3219ea28c69cc92c3f67bdc437a77fb9b320b
+ac18393b3fb793c308e92a336b174f7355710966c2cd8f1f8ee6f081f0c3031c
+58149c41849c763fc6395658dc43c86f5488404778235d7f066b3654b9e04d36
+786c1a766e2a2e10f870246bdc94e9241267d7b71c0f4acf0365d8f8dd3c1c1b
+178734bf1ccb8d202929f2e956b4f27809fb2e2677162c978fc098584f510765
+415d6254734a525d73c92050c3a2dac12e1c037eb2c1f1ea479cdb9a2da0e899
+05b9eb18eda7a314654f7ecf608531be3cc30bb8abfa03102a670b87b61eaac4
+5af4d898243ac70207fd1d5803138a78744528a47e9e371817674f2ca6b97a59
+f19fe641e8e121340daf52a2ed995658806777619a6b6dee640a04b63ea9f446
+f4dbfb071cb6f6b4d82e85b4be34c39a4d2dd417aa93e07fe3b3ee3b53644510
+4ecfef4e1caf7b89c0ec5c3ae61ba1e958f114aace905f7cafe7a2fb2cd17e91
+20275a058ac69193c471ef47490d21770792563a63d87e23d8e1e6158fee9510
+eea1d2bbccd5f8e28d63c04bcdb78b3a49d640825559634dc9e5625db3b72011
+85de810c60eea94efd5e25a04de8cef3566c0f4b6a92ed6e58700b5598fcd65d
+42c4ea8efeaed8168f36893aa2465f7f6d5d3087763b4f2a53b38ec3a61173e0
+48a4864ae6a6f6ecbfa1e92f15de678eea897b0776c7fd7ba192c7da0277699c
+a1ba6c9516f89ad044c418c24f8af15fdd129f2db45cefe186a20c6abc895c94
+241a19145c7f8652439fc92f8ee142abd14bdb4f80bd43c3a3aae6cc8c77b759
+21b42047c0e374c123d3f631e25bbf1ab42115927ff52af0c3c8a31cca288d72
+126fa5bfc2d54aec8d05488348b72e80b08cdbf483d994cee779296b9357fd9b
+addd288dc5a8ae95467e485a92409afbf3497aad25a097ef8165c40d802bf74e
+79f08b2320aa4b110076d4ebe15d073d0ee1107ed6e9d58c05286c62f4136b40
+4a89129c66c1d1726c99b8cb4ba8bbcb6b3b4e73a11cbf11354284f23a76e0f8
+aee94bbf4d661739b81e3b47d5b4ace66f695001fa09a18a9960d741a8cdcd4c
+4dc1c68c0fcc38416fa6f7877befef5aba8968621ff6653653b3c21c8bdd0c3f
+07b8eede44036cf8a0aaba353e2eb14cdc1341687bbf0ed1d1f910c6ee563179
+95bd02430a3eda60eee5d36abea5ec10e2de1dbd9e3cf96c0366b602ff976873
+3a49d5019640163949e41eb4073fee6681d61698932a4d8c613b686bee37bad6
+ee7f19ad012634c3b6aea6a4d44d1bcc018f57a72cd1b078ed3fefea13f991ae
+e6619bb1136bb64b271c96ac8b4290a34040c3d56638227676d75655abed1eb6
+d709082d70698cbd5940cde861d6dae8a7656d6772b89202d376076e6d530a2c
+c1ffca88e2aefd6c4ba2f3dea6881d835bba8d433e18a067bdb7dde867edce0e
+48d9854f21126726dfcf64cc97831883e35fc429be7c8ed512b3049b40af8114
+35477c782c676d374dd41673af8e4d3d929054f1cb3aae92a20469fcf2b0ebf3
+55e18aa050c89b1f35c8dd7ce1f26dd542d6c70af4501c7486a72cbaacf5624d
+66dda7607fe961681476fd54154705c0b0a2fb1f8adb4d50dcef80ea10b341ff
+d276e9e12bf4a41aaf9efff1b98a4223221a58eeb2c094972c4c61aa9d6b16f9
+a36fc6af6f121158c9e3d3fc47b8b716c785c0699703c91b80a0478a391ecd41
+ae7d56b313ecf34774933493d949346ed190a7a4ccb7e7fddc8da3c77324e9ae
+70af63b469cc3e8838d61784dabede694c35cfa46f1396296424ce3ad1dc7d05
+e6e94624065717493ed3dcf92620e88472118ed0981ffbaabef21fa5c708e3c0
+349c89b88fc10cba39a1807c8c74aa70829126ce906a351203e1542d43a45779
+59e9e65bfb567e9bb7929077a0a1dd08b089ab35fcccc96d3a6d5ebbe4860fd4
+3c936648b92b2d455f979d985bb1af8dca29859224b2f1e411c2cf9489d41dfb
+75dbc22658a45c16da828652dece832db5dd454783bac82eb4a33a4d3b82f62e
+a36ef09beb6683689077c8fd089efb46549515ffc875cc48aaf4152fc484782a
+4bfb4b2f38ed7ab8600d0066e27b03b7c4c21643f3e977d1a9a830e714d54b05
+04e2b7f883e9ff51f49621e53edac289052e44dc1099aba1717391973f827b08
+8b2c076e40abbc61fb9ed2582ef2484e7e07a7341defd54da7e21f16c071fa3a
+51aae26760029cb64ee948c4a54725890907e94804fd221be309b33ec2901dcb
+95be395576cee7f702a03901044054423e3aa0c508cba6f545d1faa5eeced999
+f0f9d4bfc5495c8fa65a1f18aa190bc11ea45ab16140f8ec88d309648c64eaa6
+57210b86df19d8d9ae5b98a2b74ea37b88cea4e11c44f879cab4e7510ce79079
+bf63192ad4904b92b6f622e535b538f246d802e089ef1c8b78666ac83d20f864
+681183aeeb6b4043afef1ad4cb4d5ed2d0bf8fcc4f1ee159c1291050da9a52ea
+fdbeef2e5d5b2579967b4f33aa310f8c726aab7b9a0a07523a3c17174ed67a37
+bea1fa202f75ef9dfd3c597f3d983bfb53ec3d5c0170cf5405ad3be2634315b7
+f823b857f8854bd67da9ff0a01e9950bb0699bc2a4c0fc0387f336ba33d7ed71
+84d531f2b0bf886b562c2ed2dd6fae78762d409ce0cddc96a7161b5b597fc154
+1a1abeb0954146fcd3e44c93295c709e30cfd0b7ed5eac7cc4eeb0e99dc8fb07
+9649645b8c590850ad20bc44eb2c4025a0a568ddeb503ac1c21da965ecf9fc0c
+5631cc74b3b0ef2b9826e2b4103ba3e0011ebfc2f0430afeff63ada1a3bb5568
+55bccd1ebab67ea9a04bc971ec6a055563a71e362ad3cb79d4c1ee5337ce5f87
+098a0ddada02c19cacb1002146bb3631beb166500d1fc9ae7b88949e36183f9d
+86a17a36b0acf3421162cf120180d3a436ee5f6bc937ae7cf18ffeb652c48633
+20ec0d42bf09c22daeafcc2bd681f19bae1f8ef7e15f5e09c4beb446d7578b0f
+49f2042482b785e8543acf5159a40e847b078629e632c5620b86e0e539b6b4cc
+f78da4d96f465ffe472fac5ebf8ea6e68b2310a558b9ce3ae2d16f0bd1a1caec
+e3e7ff8ef1ae81ec8fe81c6c5bb7315165e89d753987eed98ae9f2d89e3336a3
+0fc24c0f8c3f2ea135f6c306816470fdce5d48a229783f3d1f332b6f4ac565a4
+0b1ed85630e64a1ff78ca6b92d47d317064c88124331b78cd6caa7c93f5272a5
+123db565c6b798967e149307118178b1d4a0417c95b2df7d2867e15e7d5574a1
+4f2146a5377247336c09f3e4e5b45db385d7cc90a17543b86d7c1f77bf1c5182
+ef3d26e6e95b7365d12d5845301ee48f90391a8075a80306348637b56f25fb0b
+5ca4f6b8c2041a5697a182773b30208c5afcf5c9acb8902dfeadff795d998cf9
+b3a8abb77f90c91542ba110ef727c7d9a13696d858bcd567ef5d64ac43d26c20
+a9aa27606e9f5770c3cad5f8a9a527de7403ea118c8e43ea064e6a1da9af3382
+38591437dda2a87e80a9028459eb1ec3411b3f24f27630eb7e356ae3548570a5
+8bb9463d1abf3b3608ceb02aacc7c9c06ce283355e5073b2b445bd815d27708b
+4020e90cdef6bf39de645736d0730278dcb3fafd44ce088ab70287d9c767d49c
+8ad8117251fb55718cce2cbaa17d8494369b3ab37ccc50484fe7bf2d305210d7
+e011d36728405d1ef1a73f9e53e33ddc8fd38569ab2bf28cc07d0799772ab6c9
+6b8e28f396e0938dc86b896bd668768493ac290cca566e84a0aa432832df3b10
+8525cb08ca50ea7d71eb8d64e5ceff15da8a9c89849e85269cfce2e09fbcc42c
+28a3d675d9f75d7d63778deb63893b1e7676ab4408719ed6e3410b4e2b783013
+de27eaa26e7318c372ec61282404e7cb9f7b79d2a65f8077f0a7a1733538fa78
+66b32437cb5fc67eae875dd77374d3f2c3c082f2eccbb5d7887e49ae1adc0d84
+0f5171d843ea609516da88bbd906a8dbfa77cf4e68e76aeaf960cef82d8e8f9f
+7d03eea0c16aabe9501fb6c1993fe240b8b4804d92bbab0bfd58b8497e45d410
+033735eabeb4c92d17af8b9c5dd7bbf93ca4ef8010407d69c35a2b5897ca56ec
+920980a1c8f159520e6dc28f3a62d6e7d995df93447fc8e9c19215cef25dcd62
+c9a19e12862f8e3bf347561addfa34c9e85598b68490553cadff9ebebe1ebf9d
+954bb6d27608acf46322ef67b6537ee8ebf6c16b97b694641e9f2858fb9dcac6
+311e198ed43c34aa0a023c1008449186f2659beb9bf7085cf7a7ff5dd048c910
+66e704075bc9d5da90c2d26b14d7ef8e3d54fc72703186a8453b83a7bb4fb5ba
+d3f796de88910b843c9be15ef354d26bd39e1d1503385a169f3f92b16f3f20f3
+1ea9cf4642d5977fd23aa0e13ca82377ec95fa4b908eb0524e2c573e42ecf2bc
+90c51054a9a2e0cc8e93924a3f71edf177cbc656ae838f0542833b6deff1f990
+7d34eecb257585fea135ec1081a97818479c80215e8d5c4fc9ee6e9f68781682
+85e8873da0a1d6e44b3187df9a0e9cf69372d9fabbb11c9cb68b4bfeda609682
+dac5b5e18f004096c42ed39016ccbf4008fbbbb32ffbd970888247bd7d57b1d7
+11d4b5d76fd339fb769254a0833157eacf95703abbaa0936bb10a59e9149f070
+f82daa134f97f0e48f8cf9d508523e98d1e331e159a0c422866620aa859a30c3
+ea9ba48d4553ba65dd3f316bf64c103ca11839f2ace974e4e26221ad9f6741a4
+5004d4e3cd24bb296f1c58061f245792a5999a8053b246568c8c0dce7a030d95
+77824a46638ab0e07dd74ba20e76e28ddbfcfc27240998d418e9ec12cafb7dc1
+7e5916bdc46a59f31b3dca99263bc1c785aad33ac1aa0c57dbfe09d7757867a5
+67b47395f5d148c9ffdf1bb401e216c79f5ea233cd2a5a82c94e24f778c25353
+145ea4fc505c32c168cec430b3fae9e69a921daf0d5b2afbed1575fa115aaf2a
+61f1be743ecd301e63db4996958698cd1f27aaf66adfc853cbba31e0f98d8e15
+d2d643c8a3cae4d421a52adc0cd80d2ec4ec9e9de7bdb1315b52ec72d437746c
+5c91204e96e3bc839aab8833a766a7b05a223436e3a3cfb5c689425360fb7fd6
+508f6993fd4fa79dc4612ff9faaac79eddf47e0da29d6426508ec4271f1b87ac
+446f79d28e672c5c04c6b46e0d1b102cff6b9700ba8fb08b3139d9ff06fdbaf6
+a55128ea0ce3adb73fa00fbfe0450156e9183f6b91889d8e4ad6415f8438952b
+de7ebb125e4ff9c2e357a32d3707cad278b9aacc542aa83898e6a26e7f8719d2
+6088f6be110f7000a3a4b48ab264f84d1d7778629c41e0a2fc2d34e22382e1ef
+e688ca04d31119c4c120da10b9dba2708bf54e3ac3eb183d7f3b5cb8087249d5
+d4fcdfa9c4b71b036f46f720ebc0563f45199eea4cca13a5b95963a677a5b6f3
+3be08c9275fa8e66823fc04c151ae6793919c89185f65140d8d1f6772927b88c
+42c0d16d08d563f5b93e05689e7bb8ea958f90d4e5eff9bfdc7a5acbc29a4672
+f532776c79f34339983ccbaecd33a9daf6fc1672229c0022fbb13ae37f6fc27f
+1107593d8d88aa67c1a76495f5f2e08fe8d1013bad99b694c1762ee5e1bc100e
+9bb119a159392c286fc689dfc0693fb911d42d47a0e3ac59b516115b12884ce6
+6473c70272420338d03d2ccbe9f96e4fd12416939e92e52e3eddfbad15206bc7
+9fd633cff17ef63826879fd701f275b5fa06c48f462f4f5f9ff98046827c37fd
+91e254f95a14b354a0b5759d90a75eed92f126191d6437a81d538c7b55986e2e
+18523bf547845d77a3ded6c69ec5bf558094ddc40a6505c938ef395d008ef1de
+1296388919a9ce63ff38f476d01bc30445338735c7fda0359d03d58f748f4a28
+ccac2ba01879bc05a44fc21835e4aab1204b1c6b05ecf32c8247a63fb685a523
+35505e2be2b0000c7fdcb1604a6d480a1a5827919bbeb66faae78ed7d27fa8a6
+436af96fbefec3ee6e8f80cdc4ba28a65138b6b18671839bd96138795bf389bf
+2298b851db853c7906178a994223f533cf3b00680dde84aba13ef69f8191b7ca
+02f5de337081df829efd5f3f6a435d6d805272afd5b2af3eff829b14cdaacb31
+c179bbf59a3b10454d0b81e0382fdee3cd5c941a2c6e6b446cc7b08358ef4409
+c2a4e6ca109c9b3dfedae8728f60b560ed3ea8252d150e11db2b7fe19c8d5233
+1e8385afa0f792ead4c2ed5d3b0044dae4e732801724de12d360f0f47bf6d7fa
+aeddd62fc5b21f4dbea6ef739d1a005b141d4ba3ad34b9c34257ba5eed4b2e85
+4f5d8d07e0ebb4bc6b70d5a5260c7c0b4cc7bc1044c77e8703d0d59c9408f103
+6737c15b3ad668dc22066a6198967fd8653ba004737f5394445da06fb344a4b7
+43a1debd846c52687e9eefe5e06ddbe8c8126a87971a80d67f4600f442220b6f
+4c41f388645a6fc978c6dea9b31e09732f050e19ffa4b112771741c025d610b0
+6e1f8543890cd4cd2125d9238d008091ffc2e78ed57b9a6ec5113cc8044c9372
+f305f5ec1a992907464e22188c13ea10b1ac76196336222c0e052ef963a1c6ae
+df38e2fc92abc00d5a8b6d8cc608d670636a15cd41da8161e03d8361c09fe713
+dd60041cfe0c82f9df04625f3a8c01f1ff3f9f2d571e406a5775626e3dbb7d8c
+1e4aaf46df0b42e8b8f9c2abcdc7ccd0b6b6eda2fcc1602f0b777a8e494a892f
+d3cb1521199cadb66fcf60e6d9163a2ab0c2cfdb20e897a1f16555d97c2c91eb
+946d05f5905982ba85b77ff081d1c69f73d9014423795c4001af6f9bd2e484d6
+91fdc2a911be3c9185b28f89fae11ed94de19cab9b52e0f52493707e73de0e31
+f9d558e75bea05a5b02f5918e7139ab065affe31956ad54865d0097c9582514d
+99ad462d1a4de2ab2bac081e92ccead8c03318b8ea7f6d6077a779f74173794a
+59982dfb57998a0e64cb6413d774120fa51c165210b3c63678b0204d326db945
+678869868bf4abbc060d9961c03586e3603d01bcb12ecbeee7ef95e89429a2e9
+980c4c2d6165cb22670efdeeab861b9bbea1b10ab948c9e99eaaa7f0c6603c29
+c67bf2d42ea6e029bbe2ee4f48634d7c60cfac1cdab4daec98705fc8397fc656
+af7cfa465ed1f7ea9c0d1c5a86c5a33601d75c0293f9ec0b448fec40e348bfee
+4aa7a6d1293650c7773562b31cb8181535b3e5462b6b9acf3f74fbe01944512c
+feba186065cf34877600426abccae5ce76bff790dc03bf0758b64e5c95010a10
+ac1197e84514cd9df7ca150d0585a09bdbd3dfa86b6c8d328f4dc8ceae0122ea
+d7833cc21d6628c16003f7fa5e28b392d80a246483856c63dd35233cc7308ace
+0bea9a4f2c4e06e544bb2d5e412bfac62ec648f9fbbc488d65ccdb2fb7a6a3f5
+c682b805a16c6be9d03f4551387d3b19ec6f2ad0d2969041b18c0ed96ba90d74
+cf0c9e4c0812f2d98e761afc63a71e58e0eb5f4097bd7e72e7d650dc3a2b012c
+9329124c1ba2f4816275aab0d145103887770bfc9e488ab635245a5c8ac03cb7
+90aeb5eafc4e99e70e37190bb5012a6987ecc403b2b54b0a3a0bb30587e99fe7
+dd6beb3a3c8df7a50b4d5c350d7182e4497354eb5538061458af62d5a111ce95
+08a94bae4a4b9abb53f2d4395bd6fa4c1da13e97e4db15c598468d238b81a78b
+2a24530b43d81dba1f265581be36f4a19b5c51d7aeb0b4e017608656c6ce7cb4
+adcb33a8ff7cc76f7ce54354aa76fafd4958b9e1ec9936e587ecd4fa75e3dc0c
+d25ea85d744d52c8a6228bc4c9718ec43d056412b513e141a139f5c118a44060
+9827bc275c901b5ae9b6179a04513b6c4d039edf8cdb3f2c95b43316ada44146
+f9e7fa093fb2acf38891492cf93e407ca813da0ba34a3da595c346d3354c1f81
+2972d78b5fb3d09e413adcceea264a12da69451a786db4c4ee8f7ee2ebdf0854
+70f04388848dc5c782f7a91e070e1b79776b9254e27f0a0b3110c431f8fb3848
+294e724802de1e27ff3cadb8fcbeb920e7967be152c10e299eb30d632f54fe57
+823245fd26dfca5036c4cbebe443e8a4a21d1e6ef3f1dc6860613d908187ba56
+dd64f85dad9db1504e7f858cb388bdbe829e067c8dec2125c764b79607cc822c
+fabb2b2cc93b4d5dca0568057febf7cd86c72762955f2c9d7e1d734da77b0862
+60915afd088ac2b113aaf06be481ca2174fb224746e26b93175da43dbb72f4d9
+68a85dbfaa81b6802c130ae529ffdaf3dbafb39b4c55317825b3c687738f4370
+621a2e720ca0d5710f3a1d963c424a73eb88af68c3dc7ec0996a11babf14c823
+a3d52369c42e84301b47c9ebf16e33cf02d1cb1c872b0ac7ae59361d330f5fc6
+31f104cf221a3c6d23b9314dbf3190edf21331787a0ca1d55507eb76fcfcb8d6
+da4e2ba9d793d158998c06733cb34dc891a8e296a48bd0c0c4dcdf4fa27dcbc9
+0d7d1ead5f56a22336bdf4818f4f8ee4df9b82223389507725837abbb193854f
+fb0ae2c55d8259aebbabd35a4dbd3433430618462e9f23f91885d0f3ac99bcd4
+9d1424f9aeaa09887c06c6f62e07339b3e4424fc920b11bd0dd53b200c896ae0
+ede4931f85766645f04c94877b0364e6e7e2a0ace71347b8ab0323fdecf82003
+ad75a9390ae1d10ab82363ba83bbedfaf24225141a6033bca3f59d065926de8c
+efcb260f5e394ffab5e182473154b81ea98e5cbec099eff84d53b9348f4b081b
+9f120e5275d4e9490044fbc2a9d275b84a9a40b8451522e79c2fd383d5866c96
+84db0c0552cbb14e67ff321ca84793e8ab95cac35e71ae4e20958a5b274be4a3
+641cf01e9b50487a9263f4e60a7ecf6a80d4e2269303bcf8589bbc7d9306411d
+1f95e0b59d232b303dc030863cd6a5f25c769dbd49e150f56c4b0efee4c096e2
+130321e1dceac61b3f45a808fed8ea47e0354eae9578991d88c58526ba635f93
+591b3f8debb90e2c5a73050766868ab418e6bc1246f9a200c9010de827147f47
+4a9a35b39947767a2cf12774083708e7e7d1f25f75f1c27806a7e40c5f4f8456
+8bd43aefc069d7d862b78bdc488717928c0a283cbd5e57ca76efbadac172a6e6
+28009c10d8047648c549de7f26070eadecffad1e954185ccf9acf02ea2ba7bb6
+0730a1a46969fe637617e9283cf68ba3400fbc0bd9e24dd4ae4f33241451c4e4
+0f8b996eb76d3b47f0dd0ad64ac75b6e12c516f843578290079aefa03c6ab66b
+8063bfac6b2b07d8a94f636626b7803ff277e963222d738a6c4cca04592c9687
+8a9c74a4c528baafa16a2d87e6182b7a6836e901b558d4b9ac7c4258c2ef1dd4
+e70dc0e985661cae6535af3fa04de9be151d75502a65b9ce9ca88351728cddfe
+25bcd365d219ef27b7986cbef39cb7450ae28826530e0413108d08ce5c624dae
+b1906f7fcf4d83c91dc89a1165a1ea5470ea14a91634540d7e37379d358ffdb9
+38d3c40cb195be0259757ad84e0bff7271d666c62bc9d07dbdc2f463f0cdba3f
+fd33bc0b7b566934159b77ce59a431e837c913cb8a3159b4b665e0f0cf237dcd
+69c056d03b39db46d40ad75d31a1f27e28af37c0a3d95a6bb89844cdc60939a8
+a2827f7e9d64fad39befbea536b519ee61d1db59cccd0c1c62975c34fbdc4fdf
+a2c85d3122b83d27a81ee97c81d8c1e280d67fda2c89bb8ad5f9e34c4408278a
+20ce29f25391b4aebaca2bfa94855b58e53180cacd548d084cccdfe203399397
+3b34eb9758acf3335999069b05ca7784fbb467619bd48008c129ce80598cf595
+2d2263a36ba5a5b61d4ce7faf05e651d26d9a96ddf4d6e164a76caaffc7b7439
+37c2c332e496cbbe3a15e3f07c8211c9cb6f745c0b95a5bf36c55b37056f5159
+56a87691c070a5bc22adcb697165b17de566c6ae87473faa4329f9d34b84a448
+a93b1ae3c3b05dbafc8f0a9b246ab12fb5c5f21544d790a03b0772c6c07fe41e
+561c04d25290ad18bd24674c5d557dd73a1c022c4a0c3345c4e97ab872cfcd23
+93926ce1f80402e6f1e32a069e26388f85f58a6c2f8d37185f51325fbbcce7c0
+0ea9ce821951358816a3c35d9a3ae47c15a429feeb24ee9c6e91e7e4f4e4bd5e
+8e9020451b587aff54a9733beb5ddc14d478ec52011d172e308149f6f68ef4a3
+af9f56f2734989eaebb7b1bb96153429d9bcbf3ee0a6c2acca62f586b506368e
+21494002e1c972624da592c5e0e9a316482ef500dcdbded7f4d7331f7bfbcb0e
+1ecfe5e9991d59301b062abf6cd8e3543c24e948bfc730d8344e0a323efc5e4d
+b1c037b366de5ee1eaa0a0e74f39c7b1af40de37b4327e620df1bf7eed4dd9aa
+fd15a96128d8f37f1ae60b6aaffd96e806e2c0b29dd43c7c3ccd00d936f76924
+54e3234ec6529a77332b11a25c2242c53aee5e5d128f5805fa007d972eea2d9e
+fa55bb624acd378707405ab37a49e129d003fc9d561ba621eb71f2d1f0342f68
+fa3fc028a7f3ece1d94acf6c4e91eab1656cdedb6ecf4925207b9e547cab62e4
+af9cc1bb900b02d55a89ef5bfce1a8f121d0c80276d61e41bfca88674c65b4ad
+2d66dadb8223e8386d40b775d1195b6bc6207b439b2c5615bac548dcc041b7f2
+2f84d9c3d57bd7d58d95c455d74cdba0dafdf5333988d94aea34d01d93a6fa1a
+a034f7cdc3a486f0eb051a55a39379b78ea908a450c286b6f7902c1542b7054a
+be2449ecf445f56a5a4c2ef2f0994fb3b3adaa35987cbbc0c64ebccd1aa110fe
+379f36b8e590195f4409426ddc515ac37be56a6314537d839e77dca4190dcadb
+e423cc230dc717b9e7ca35647c3113fa2e27270079736680b0abd1905125275d
+18a3ca6ec043b23ba6d9f90b88a6cf51bf8aefe90c25b5c211940058962ec96a
+c03c144f18a1e1b13d5c871c8c5c7ad18b0c3045c7db5e77d6f5ed211bea4b00
+0b8bffd69c668c98bb08f4207a80247a80483fc8fe2484483177d6547bf66595
+4d7afc64a6bdefa6d8c12d8ca7a3acf95d56e6f6098345d3772369955e3ce2f0
+affea8a2475757361e2001976de029bf745d701cf0433997ca78c8cc1d6d130c
+692474ea0a9114359f645f722da96dedfb0bf6d94529326493b6b18d6abc70d0
+c7ab6f8b68a9ce6538a1d9ff6e41a151f37e96f6735d0fb76cee4d502d13e4bf
+4db0ad2c84d44596a66ab1fde477bf14cc7e673d598cffa89e8e8fcb1575890b
+4969a53570793d3cbbcb693b09bce2ea64c33f446f3f6b71a976ec1f960060d5
+b80631526110b7aa266b23eb27b1e565b8f0d9b44f4a90c57cfda6fc917f6efb
+f05630b00eda90f568c583cbe506b9b91314e31b1738cfafce12f8a17a7bb096
+631effaed2543a732fcb2e5d81689982399e1048ff6199ee677e859f36cb6070
+10ea3ab6faeb30973dfbd8b405134c96a6d40d5e278d76916ef4b66d3bfdb15b
+f0dc3f8cc169ca142ae73e778ac690e1038e8b5898f6101ce4d57faac936de06
+890b32c3768394e0d94829f51ff9bd315fc44e33a58394bd5a996ab52b1dad68
+d010935f5a0e7f118aaf9fb42dbac4e642d5b7ef61e43ec2a5b68a3584965c23
+f842dc4cab186b39650edc77dbf52068153c875bd28e4bc30f554b88436b40f3
+1500199d497958c28391846a00f83287fb4e14e508f8954b6ac61c572e634f09
+fde116d3cfb40b73573a969774883c5501d738fc67e3f31cece099996950efc8
+e431c63ff4eed98ab8caa0ed1996ac8530f315b2b62b882a6dae49e46c834b09
+c3c0d35f27be4aaf09e0abd445844c40754ad0c29dc4fc8a3569b182003b24b9
+cd79db88db16272238f9ae5f0a5f0823bd0b174bc25448d9ab253654781a2e4a
+51a23e73e22d714e45ae27dd5e8cfdd9dfbe032530765c0751ea3395fb0c1380
+414ef2cce4944f56a2a14a564e41d9409e1929956625b87a17f64ab0131e55b9
+cc1822d73b578854e8c26ae0d560d405dc8a72ff40b240ce00d52c3d8e74e30b
+57dd3f7686f6ce18805b2b7757853e49f956abce93dce1d2700915c5b2250ab3
+7ee35b1606aad163d121c4eafc2ff9d7648494db513af8aad8a3fd1ad32291eb
+901f9afbe0494a64a99230731841c455d82db72b9e577e17676f53d5f1f3a98d
+ef88460a898d5b5184e9e1f65ad43c108f679945bd7d6c777e131fb79d99c74b
+e3cafba83814d984752e99e7f86d1dce93d00615d064427f28148b37a2c49668
+974f6a2f5de659b42d04e73d0e5137204b5e68288029327ba9ad8d9124ed4560
+1344da203d7cc8a26af36454a392193657cde0fcac0ba0fd379b74481fc56c39
+63abbe29416be7ced922f0ff6ee6c2bcb032d83bc4fc0002578dc1943549ef81
+4b26f5938980e2b607ab290de624b06c31ca4eaef275212faeda9bd87aaa1b27
+3e8fc6882f298c8e503f59279f66b7b6ea576458b979ae92f3b6172a8f6b9f31
+a7fcb1a241891f044e20a29cd948ca8be18059e01381f445b75316f8fbc77b07
+cd8558b13dedf690eac3715afe7b45421f857d7df4df4229e9a5d5f81ee905e9
+6c63a6b1ea510d0a5fc7223ca5e14bc2475952beec5de9542c692f720e33b41f
+d7d1a649d788964430b605a6092fd5653edd47967fd72f8251bd9ba5b5347d25
+3f4b2329fabd0082b71b517d69afa5ae4c6a02983d07b905d4bccb1c0a249fdf
+8c6a8b12a7728270b4e90c05c1f6ff3a962ee8f67fde611fc39d95a2ca550290
+8157f91dd7a967b7b7068d1570885f763ff2ab8d57221e4780c5e8e981ea1d8d
+b703653412e13b2e99b9c6fa232077894aae6afe819068a141b876b20534d7f8
+d7e2b169dd5720f0170d3b801741797b7c775838b4b36842de3e3fe231ff2a5a
+57421433ed3bef75a860343dd31092f0bdebe47cd6a9881a63b55e675db769fe
+182a8967fc6829a1fe49d1b25bab86c04befca59b7fb9458863d779ad8df7b42
+835ac1c5a6d16c4479ca09eadc16742be17c1e59ef1ca1fb725db9e871b64db7
+8ef30f0e954be11aff43b674a527f5de267f2b52fee2e51a6681d5ad10e1d822
+c15ab0ca73f25e228f390c450621340f99c4870829a7e223b5bea167c7f6b968
+e2f7f7d3a5c3cb9bcbc45795e98aa6013bf142e2410107a410c3072b96d24e15
+4270a10457d03e9ee7425a416958e991806b139f36d2bc9971efd6bf29e06e92
+713344c9b1a6bd6ba6bd28b6404a4c4649589cc6bc917ba6af0ac4e3ee359cd4
+48a9f74b9601dabec713b8e795e942f0fb90f15f27a8491689c14a5e71e56e14
+022233bd3591a1c7aa417b22f0fa2a7b02e30fdfd56011c508513c8b4385f210
+9b0f01a69b45ad5c701436fdd05d780672ef30122e6b33aea4164664667cf0c7
+3d3bea1a4778b3d35db869c12cba4fb99c066159bb50518bfa211096ec448228
+039f96dadc9b9600ec5e60b70c475bfb024f6d7687c156aeadde8e48b0625c3c
+0aeca4fe017d4a18cfd1bbdc370ef6b1c7fe7c6463a961dd06b4329210eec8f6
+a172284470b0d933a2bf0fe7e54ae607f5fd17bf7e62be47db76210295e70f48
+3ee8d4c7f4350cac22004b68af0a1b0105efd86c72c1e6615c3d36e182cffe87
+6d4b4b2fc066d8b6de0283e1b64964cb0cf06a2bf9115d4a0451557602e9ed87
+fde4351940b3dca78d5d66db800efa7b9f0d6f4862323e541cbe078d9404696c
+42c62de5fd2fde68deaaab671313f371c2aff793fe6caf4d3529450a9310d4b2
+df00029c115ff3ac4969f454c8dd4cde13ac7f8da419fc22e985063ff6429211
+9a751f54f6402b43d01fcfb86d7ce8c18a69993d40313b419e75a419f88ab41a
+40a0052509401fb48777817a764192e55e2df39ea866b150339681a2c894106d
+daca983773e1a280a661663f5d192674d0288a303da868f93aee92743504f6e0
+271430d963093ff7172d748b14c917a99896e0b71866050aa97e8d969d111de9
+02874fa90cdee0dee39bb6fc0cce58558bbbab4a4d024157546a57eba7c1315c
+9a1c051c287b6e43b0b4195c1cfb7845df3ddac7005e22a861e82b1bdd1dcfe3
+ac9519c77e2a88b302beca597ca0cd3bcad5afd4080d38fa1155080570dab5f9
+f7f8ce9eebe14ab702d19ef0137c615f72b1b3509d3108bf7d6d0f5c7fa5a301
+42a45c30ebfd452e67b294d8ff9388aaaf3ec0572c26034b60ae088ff19e72c3
+ba186180d6f93c64202bc9591b441e303d5550c251d75ab94305979c9942b82e
+3bc053641641077a0d203d5d6036f1c918173309f04d27845249d2b92911affa
+84dcbec3baf6c61623f8a73002f9afd287dc162762a91f6698aac67bfcae3404
+db70f32c9d81e76f4145d8aae76c8a2b42557e79a3c658cb5ca8eb844cb780bb
+dec028775a380862b6d5ee1d5195dc507ce3ced0aeb8938660b4c727d40c6e89
+e60ab163b14cc1f713999906fa5fc58b8b1d10044c17c4e32fca78d99d33cd3b
+af638d37c1f396b898bd47776cebbd71fae4162012767362f833dd3f620cf5e2
+49d584ebe4eb183a253d5d4a85a65acc7ee764589234fa74a25849584bc6f9e7
+6da6323675bb14334c7d23db9f8da42d689c14691875712ac8f4263662ba9953
+76a972fa405c90a574ff35afb29038c4048085d6a61ebde090381207ee9dbb1c
+f2dccf97635796111a8886662d39d7e3b2b79c9ce048f6d769f36fc80348eed3
+f4d5999faed84c8f4e37271b29d0adeb25c980a8c388afd6fc015b7c5d182f57
+78e9317db58e2efe61a6c3a63a2a0ef9a3c6152b2dfcb81e3c0d00c6520d1a14
+2dd8d314384fa63fb33c47b3bb3e2624fb1ffeb31f673df5105e024ac697fa70
+051aacb07e671787f6f76741c69ea9204ee1216f75491e1e1011512656f48b40
+2272666adcb4fe07be5b79e39ba3aa85774dd992589aacfa7b080fc4b94d855e
+e9fa0afc3273d1ae161563c33740c5e2519ef806b6f3a4c7d832c46fa8f86f35
+8aa32b9b0c6e464e41797312d93fd25264b85fb996cce679586077df7e5fceea
+9852d4012959de6a9002b4e67317b4f87e2229c9bf89096c32b8ddb3c14855ad
+f5fffddbb24a63da28ad2b6028184a4c083f090976bda8fb60bc51d4c590dc97
+b80cce59290aff40472ee22afce117737dd804fbd43de024399081076cb701df
+bae537473ab542a08b6a5964ad5a5026f68dded04855c34144cedcf8380d4a89
+a744823b4ecec5f225d26f128912c3f3822e51b37b7e5b6b29e9f1f43fa7ce48
+9ccb6b309bbb9f879527660a6fbef9d7f11fa0104f6d27e32292ff2247668b1b
+352a4c244b53141263bf6f6842ae64f198266388aff922adf272ca3b360d8f89
+27f2aa449a42ad993382efa008c700fc74bc6c61a5348c052f247df465f63060
+49531b80c92753ae16a817af2e28182ed43f8a050ff90fd45cdd314b568b61ac
+45f575948f2da79a035ada12e83c50c24f09cfb5ce9bcc15bd9c34479ed4ea59
+21960243fa433442b345cf568d78e314b2054e2c146c7c9a8e938b9ce3c7ab4a
+2a2aba81a72caed7874134d4126ee3a3096282aa87b29949fbfdcc173e1df4d6
+a5957cec97a798e61ff9ed2d620f4e229041ddb5e9c0a787916374bdeb03d0ad
+1dbe01778b2b86c36818e89839e761b0098a7d8db58ccb0e4d67ceb9cbc04e6d
+c232c9fab1b2a63a24886b060a78e221fc964eba7f190f5c8d02e0e4711c4a46
+f6611940a8782fd1606a5975dc787fac23f15ca5bc3529af7695abd9b259484e
+90512c6667d85d78862e548984e8443511abe283b7714abf122110eb21747422
+c4fde0949df2811451d4bdafce1846156ea531a15a7f8f54b7a117f28885ef86
+5209ac012c0ec7641444fc4032e48c16d2dfbfa3bc12961d5d1ecf95cef74456
+df2efb574e4c42c80a65bb008defdea2e732b101ad7bbb9646874d2e799130b7
+208e1e174cb552d9fca89794f010525898a096c97f0cd41eb911c313efbaf01f
+8bf26d7d2820ae5937abc3994e0129d15838bb65a43203901fb3f2375231d818
+08c5ca211909db4cbeaccc21107181a5a3fd93ad6398734f86eab4bbbb5e929e
+b4062eee1cd6e18ef5a94b088cf6740b60b08ac496c6781e35d4be3c9c6c6150
+e25ffc859a51489798fa3037d7e2cd96399f663a9c3537649a88297effda3e77
+d98941953f41ee2973e7d80be32ee2d48d5c7d183f4608067c4a72f5067160ae
+aecc4b68596b7f80222771698584b1e34ca77c54a0426fa5d3e009350f0e71f1
+bcc6eccaf7001e7fa8b23c321b0335c87397d1a375d467f1783d9488dec2f269
+89590d3a23b21539cfe64752e51ad95c351033a1fa807fffeec3589efc1e8b76
+f81de863071160931055a01d94dc2b8fad30d5bccb926a1d4a9ff858d98d9178
+8c60932d50307b5993fbdd530a5e25fe381959b01e5ce66f8ba694c95b4d578f
+3c56d5cd9be8553cefe694b396407f46531c333f1dee44e8d1679133ae7163b9
+c9dcdb20ae4d2c87c7f37087e78570ff608effd4202caf7c2c64887e47617892
+de8f0b4006972fc32628aa340c05e7aba10d892a1d2523fd216534a0dfdd11d9
+db9157bf1febc5877179bd4d8c272a598b016468bb31908e1fdea32906963927
+18a303429a7e1b4240c382f2a02bc8ac9d28bd2181b576c09097c1a76866b5bc
+2af2ba8a15427f9827036d5d85d76e0a9fcffbc331d769378b610264c5a4d953
+7b44cff644c1dc209da02b6134622f26014e847e3efc68c1403447e7b3f59271
+2dfd293e0d4b86007a8d9071958d979bd36a47c9e709a0252d61a1e7ecb119f5
+5302f9ce3accafe7dfd8bb2e1708c775143f373ca805a442bef5523e82ffa034
+9f2530b9aed89a8e5c81e013a7edcab6a906173cb0cd48434ad711e89d970762
+3afe152cb282db3fe2e105575ab5b75c00c3b1ecded579cfa23e97c964bb3e9d
+48ec0ef42e4761f01ec5c12cd1411c9eba7ed00e85fd770a82266c71c841392e
+8c8f2724203b9a44f09005b3173d95a5de83f54bddf23fec70058564161da59d
+02121c675380fb0f0f7e0bdce96f656e46f15e2382f316c039826f091cc03e6b
+ac9969207117681e0f472ca8b5885355020e1848d66fd99b378542c811f63f5a
+bc79477067649055735f2d5a46a35c4133ca4191e6a75f798d6ddd8f72cdbd4e
+75de4762d2bae425796b19a65647a3971abbfb29132f35e9accae847962c218b
+4973888e3ac04631a358b57d1347e2a74544a70e219b2e6c4c0e4b9f3af2b872
+22f27ab269f3248935cc65135699eed4c1b85769da13cd156108a7d1cd894b46
+fa7e2884d180bf6962240b20812a6b89a49ea08ec6b5a5e8766adceb78cca7b5
+8b89a9c7299801939004db901e195ad16199998c821bdbfb7dabcf1a80081de4
+aa30d5653740803ec63c0f377eff0377d44e8aac6aa289b144acdd5207996dce
+96359a17dd3f6ca398b91e86af024f0533ac70b186a940f96d7464fffe38e22d
+f8e83d34c8011351ce7dac20a9e35c2460701eb62ed3c815d43dbef99828c025
+21dd0f3680e4505a5a166696d16187d6e85363023823e70f41e4fa7b796e8608
+493a3b3a53d575880f09fa117117d6c946fd8782637bf122d9a8421807105b35
+792dbe884b02a344bd235328c139bc91aa524a107197539fdb2abdc99a7113f6
+176ea649a61e4968187bc7a97475b063d4a52d085ecd3191137c4ea1579691b3
+8fe05a2d3d223c7e5a23526699054f254236b96bb3f799ae176fa86859acc325
+44e0adf45ade76a9d635ed8739c55defd14aa6b3aa86f3504e71176ca2fb51e4
+08f7a7b97ddbd73cd848390757f830abbd1e5437ccbdfe9117d73875c7241f52
+c4d8854a3ae81ac2646700268c5fbbcd03a9e6772dcb7d5b7f2e925a944f89c9
+0e7ad30925a1737a44bf80a83b5a68733ca7f30bc6f47150d337d13f8a9a33d4
+b94fe1cfd05cf1714d6e0496e21b4e6aa498cf59f4dfcb30625cba83a53f524e
+e90455af7c17310107b2abb1a287fd1c8489a6ba6195a0f4a18378392e860976
+cef9a48f00b7fbb6c04afbe796a3af0b3a7ff9ad53c448011709d4239ac523d4
+7286b3440f7f9abdf19e4062c415b5cf1e5b1c2ec79eff451643517a7cee43c5
+56f2d68440f64a2eb7f5861dd3de1175ea67b022a137bbe8d3ea80775898100b
+f29cb8e25c2f816bac1cef6d3ce5c15cbc3f449f6b5db7c901a4e0953b38f1ed
+ceedab0acb10df42e2cd6b4d231ccd752b69fe0627098a3f1bc3b547488bb1fc
+03e0e97103cec3d60635a27b41826283796db8bc2d72e0b3b8ec3285f3ef5a75
+5f69a2be9f0e0733bc32ca037df0af3c5f29af5772cf1bce273cb1dbc2143d0e
+0a0598cff5d570ed5f1821811e6c7aa8d9ca18593d178d55e45ebc2cb32a2adb
+c29f52bf976c98491a5d0a6300922a3031095820cab7baf7344541e08740df1c
+a6e661ff99a9011e6fecf6ffcdd8235824ed8f86e02be31440d93f7b65ced2d6
+d2381e370df510ed09b424193dd4202b8277c586e7398ce8e43dd2016f7e550e
+644dea807151d35e8d3b3fb66949c92191a86bb236aacb255ff8fd410ec4d884
+e41d54d1eeb2e724ce43d96aa249aee87a9c2637c8fa4b8c4f9e28c23c4af501
+f93d7120ed9b1167983c3c87c44823697113d6614ed80eeced54e2d0f3fb44f3
+4974e6135949b26f352acd7cfb4ec79e30dff73b8d75a6ee74a55e427980f946
+87aebd0edfef0769e12d199b2dbef64565a30a698c30ab05ffd06d68310e55ea
+93ccac06a08a530a7440d36f2a736af590a682a13b5a73689b8d8c00c5fb635a
+71bea3db8b8a1e5006f1f72e38ecc48e40f73c39d473b92048419be4e5825bfc
+2eb3a3130d47e541b5c714d5971497cd23d8a5abb6a93e2da1087bd4b2b0d841
+fdfdf7c17b92e47c9093ebafbaf1b9429958f74e79deef860b65c287370b4502
+26d5fdabc24c04b34f07a048db884927ed1dfbd19f5b45276b2f56ad0a5a51bd
+9578d53562766255256c985891b2fb3d1150fe772faa9537315b199788b4a596
+39572838b9deead32f579f9ec94da84971c35149fcd7780a34497879a5422546
+74172a429a6b85da115f966c34de2c00cb11a1fffa16d8cc84b86b9ea31d9af7
+9cc851fd0bb6e2397db8ef7d0f1e98edc5f302f0c9a5b33950990d4019293801
+1e06cfad4653e1a4f5ee4be3a959cffc2231be88055c6d724b9d83f5f8f5ed01
+f4863e329d3c757cac3ed3d9aa3bcfc812407c8b10a78f629d8f660b42423754
+ed23a022797e478f8b25f6a3346374b8e285986aa1e19a19c3af7a81f14e6b0e
+a595ec48a0c6a6e016c629c3f1a91043c0eab6ce5401267d5091dcc0c8e14b4a
+7062627a065c66fe9fe068267b8c434410774a97d28b76024e171deb2306eb01
+84854194c373ef3659b489e337134e5763d16d00d6a4e66afe3dbd30e0b808c2
+cf044b277485fb807d66b6d0033d0157c5aa1dca6ee774406a7d4acdbb06104d
+e582402782f0d19920b7c4c66a65a10703f07d30e5663b37688a090e7db49783
+b5b31e9478e1491c5b40325d6eaa41e35bafd45bc85c8f1be10463cd5534f110
+8369f8ea5a4895428c1dca59bde35cfead2dabb44bcabe96b27156abe4dd9a18
+cbb4dc7b5908715faf5db93a206a4f40a19060ad1c33474226482e8fa3cadd37
+197f9f8bbcf204e76e6e411e56c7b33664ffa0125cb0e8f7ff3a55647a841a28
+9589124c91519db94723a77ae008a7657949e8bf80388b5cc51585fad67bf242
+f5a081ff56ca0870dc9799fd03b5291474c63b83b771b8bee604a11a70e21d55
+3709247b92f5d26049cb3d2963ec785b68455bb485f30af7426cfd02faf10934
+d32c8d7b0909f993724bb7da23b7bc690754384fbdd366b14417e6bb59c8362b
+11b7aa76af2a21b0dba56d8c04f14cc768220acb8dc4d7c60646c85cf11eac9b
+710e60d1e02c4b9a078ee52c154abc7bbb5ed801087eaa68298014023f93af89
+bb257e37bb4ee55bdcc563b5f28959187135aeb95ee333196f6c0ad8e2fa493b
+c819e39856397cd076f6ec77c2de08517b15cd6404306bc45963aaaa8adcd1ad
+0c78bc5a53c2370870ccb3d5b781b811ddeed772b2b21d6cc2b8aefa894a8350
+48dba6afdef72f44d779dd9dc6ca91da09a9a825a12322a2bebc69cab203954d
+1fa1cd86adbc7810620475e8dd1ce2210cbc056d586e4d203ede41398ef9f106
+b58e657f3ea69f719e7ae006cc1347a31b573857446cb3fdf83afd5991993c94
+95e8fd62929149e5d83b852423a0a92d3799484464bfaddda2e3182c087cd330
+e7c077f7b37b1938e3ab954edb0b98b8f25ab428b313047b6e66e6f6ec940d2a
+8f9989ef2553993877bac51edf043efd752a82ea0a21a80f514b1ec69265d777
+e0e6f7b71bc23f53681ef43809a277799c930a1189ae11a7d30fe14c5df3dc8f
+86cf3e329c494ed6cf0f08b5ac828d16f522985effbbba364440e78c27535b77
+517b9bcf39f6a038593c6b5fa7a7df8144df223272188c8e5b672f55d3f862c5
+6747225c9f48b995c9f416d519ce7e302c22a8c568e53fca67692d0485d9c34b
+936b69c65919e2a1ebac36520c3dacd0fd0a837a8ab82964cca79590fa568eec
+936b0df2123977d9b0f4604ac160ece39eb624d285e930cd59b30e26dab47ddc
+bf1e601b39d3081be32eb3cf521ba730fbb52298732f17752d36758c331ddac9
+66478be91854a54e9b101a52f94b13f94a80e3dd73a077684192f88927224bfd
+35339070cbbcfe6e51bc583b1d6d1179edc0409c56190e3f08a67e4c59fddf24
+9f0a430f6a2093bb7a9e32eaff050ea21201febcad5514f5ea4e1c790437a3ff
+1722fbc4a51f4fd4e48653e6764bdb83195233206c6db692056e93eaad28fa16
+332517c4e2259bb6cf36fc5d9c923ccc69047f10e8bfe2f088b3e95077f4a312
+508ab431048bc2344a31a4583718c0b9e0ad8ab0ca97dd51debe6c3dde8a51ab
+01b9ed04a58e7a2e73f34f7e2e8e9ddd7b99949b5f0eda2cb61ddab64fd0dd5a
+344a20f03b6f9b3fed433329b8372eef9612608380f4916acc5292b7f5fda274
+e1b296f142ac27ac06a3bc96d5f4cd9d317a5318e69dbfba646074f2304849ea
+3c813981fc03fea55a109aa1e174556401bf37aa870778a73eca9d2c60eec4cd
+b88662527f7dde83a248475b5476dd935833d6ea8ce5cc912ca5897168bfed0b
+177d4fe4c328f55625f35d11f85ae70e360c68b5601dd64681d557ce51e724ed
+6e5cb05523f3860698b38910ef6348c9abeb14c645b34d08e42d84928a36e91e
+999d15841c9ace2276b65dd78ee6e4253c27376ff691a11e640fea8573509b70
+9b0fcf1fd6c4acbada4957ddc2e9b4bd7444cf0a658f56878da729cd2e6c340a
+3a3bf51132ceacf89a3bfbda4be6a18b0c5be6021076fbf6d2c5ffd4d35b8855
+d69f62c22621414d6dba9140f9fc62919d1f0c4b2d725cbb895bf04b874b8e42
+2619d4653d065b77f02148cf29931f52f94f0f21320e541cfa9b03612d76eaad
+48d1c2ed840c390363994f75fcbfeddb48dea5af3d5e869206f42cd37428844b
+e69d57813618c3cc6e4dfc270bad5a74023f38a379d101adc41f62173a19156c
+580d2c9870014a090bbdca4ea89aa7c0406e8f73bbfb90808956903b4908fd9f
+e439a4a7dfa4bf0cc31d89bd88c5470940a1a4dbd871b9c23518e5694950eb07
+79afe884b71caccb2f350154fd6b1f90482e2d9268fe383666365fc41c5b0c04
+6fcdaa0cc65e320103ef976f4aca093a5b41d47bb55bf58fab366d3c9088297d
+49c88fdf7eff4920faeae791887cde9a1c9b2f2fbc2e23f7bb5438f9a5c91790
+5d9666ed9a3a780a02dce5386f1af23bbed00c476cafc4734015e367cf600916
+4654d10bfc6d06af5316c45c8cc0a5f92cb4016a2b351d6484705e9f1f9056ee
+c530943ca1c9fc321a838fb02857f0709aac2009eb3cc38f81145d6ce6d44524
+da3e21e5701f972cb836afe077e6376875a953ba427b2b2483330dcfba0783df
+c371f9cc79cbde94fc5e6f968b14c56f0f7690965058f6ac266a8baf2f545336
+1b99a92db5f63cb16cf850f13e0c18a779679b03ab74f886b2357c612c0e2f38
+2c72cf7e4b979f888d772eeb5d5dd2b1d837f03f7f9ebd613663fcb8b2f7fdf8
+c761a958b41cffc4b2e2a48fb62ce80b10261b96a23b00f6084819d088cfb019
+84fbae235b2cf56b391a1973bb09fdaf180f6ba062bac913bfe0762f196d1680
+f7de26c276ecc19f6f8c84c580b8a007319ee045a04aa6e492b347004a26dd27
+fcb2590c4ac89041c481f8cce7043c2e84033e9ca3810a63e5b272e1b716993c
+48da6bd8aab1c70e28f2da5636a7757448608a7d36be50ac184c3e4a58d108aa
+e1aabad61f8773a698546f22f22df892a2ed287cdadf8858c86eece0bb566af9
+a0e48c19ae49dd2389fd38f2937ad3e02c8a8b281088affa0e1c7f7829d1b191
+9c5ef6f3ced2dd0c51f6e18de1602df35f588503b25039b79c371d4ef75e6ce6
+7514d977dec3af3de9f7dc7ab9064cb21d8b35b4a7efe21b6f4681c090c55aea
+1fd129f665053887abb1b5fcb09296c6226ceb394dee57664ca483e9d7496dbf
+10a480d97ff4af0ce136c51d90c3d8c3734536e69d0bb4c066d1bb05184fd7a2
+374328b352f4cbc93c613309d0f83387e565c8114e38677ec5972a64f701a1ae
+8ea54f1293f413123df659adc7d8e9eb0aad32ace9f2ab0f69a989b3bc58d13e
+8dae3890c928697a353da54311cf1e98719a82ff91754ca207409b6c10428228
+f78907e8e9e21f1cce47eedf402444344751d49afbfcb460b6d233ac8bc7a569
+32a3362bb06a575f686c1b68716ff9c8c93020fb6e5ac189834021d09d12d136
+529c6b5e28390a877a3daf3392e50dc60c4653f33abf9cd550371d6af3bc340c
+b5c34ef3d2ed6bda5e8e2b4e97a865525d21d43ccb1412f545e3f1a84168afb3
+378248f719bf8dee72e408caf3eee889129d389cbbd62fa285ec9eefefcdfe44
+5fc87a84d103b3fc8c349f162ed5d830b5e7ab99cb2f82cfc2a83ed146999a56
+11873298b1c8e983c539ab6acffb13be2dcde7816a7015c72ff2097de9334e76
+4fe9359d3b3f1b5dd5ae02ccb7b1175e5e5b2a5d4414af3376fb605d805446e7
+e131cfee56d1c41dfe690113b891a4950d57975b1d608a19cbd10d4d53ebd4db
+c6d78c9cf7c06be5fd47433aa18250fb896f3db663deff28f1976e93e7a36b4f
+50830f7b0b5b47e2c0ca4a08482290aaa77582887fbbd330ad0c0c412ecd3fc6
+534baf96f8739a4df7860f73b8abf2e97d3567c09c616b432235e0ea8505cefc
+26c4d7dc44f7789c338c8561a9742cf177620bdf68209254c1b6c83f26ff44e2
+74d98f45a913751919506bc3720cac860c01ced3f825d357afb098a5ae5db776
+63911f63a83b586e839d08a94715de06dc3765bcc949539394d75b0c6930eae1
+9c8772443ef8f8f1403c2a803100acd0305359b7544681097dadf07259fd7c09
+e80b28c4e0e75ed038feae6e0b3ba5d311d21f716d90fbd1aef28a60f84f8e87
+0a4d395cdc956ad485934ca58f11cf9ed829c4ecdd984dec9525a736cabd684d
+db24ab8b679218c355faa975d48e837066f017fe39cd135199616461b9c7c77a
+f3a986c56243594ab113115385bd8de3e560eaa3e468ee419f9b97d3b20dcbe8
+1a64942075d88d48a2b28c39328ad74e2b02b011331f655066b7790d1e2e68d0
+ed7298fc1040fdd407acb03e6dbf680651a9068082db7d43d1c85b56bbdf299c
+5a9b88b8608d2a21d7a9267d952d71b786f7cdcd4f63c13fce13c6dfd88f20cc
+874e1a42fe2430c0c0da698b021a7e82eb668371d7a8559ae906d7d6a0a60502
+c146f7e838822f22e4d0e1404cc853aa913087dc959b2fe1fea7131a4435938b
+2ceec71b3101fca9c4db903372b2cb6a6a0e88748dd8479cf0625a7d5159913e
+69ea97f5153b3fa681e940b0c59c1c4193fc979049b88cb38ea53e64ce6da9e9
+d77abf19140f3abd0c1b89f3690b59603abc202d4e0437431c8da5b6a2b1231f
+89723b569fcceef6a78c38843df658eef93f6414ab589c77ff88c25a1829cae3
+ea663f93db354455d10f4d40a4c075650a4e84a2468fe985ffec14548e2896e3
+b1dd0616c0a6b17681e24fabd35501bb0e446244dd55cc6a632dc018688d2b05
+18e7c16ad731096807c8c7984d9a90df59d2ca0649e1f7111f105fa3808df731
+10de360b039985e643fabe223c2836e1a992a5eb2ccd396ba1fc1be39c148e3b
+2f1414d762e9c95f1ab131aaa17d5632f6b3c3e566a1f1bc9be2ec3a89b595bf
+bf99ac8fd3963d7ab464059c643bc6de1e806d5361b55731281d2556878d1087
+10f4f9f79598e4f37a2bf74aa4a94e563cd226e50d1244f38978bc3994b1b082
+586e5fe3723cb33dfa0c48ca249ffc20283e7e3a84cdb0d8df92e540ed428fd2
+0943e502f763f7fc0c879d6a18ac22c7b9fb410761ffb5e60e2698828666450e
+aaa8e0c8d5541036badb9c7c92885462a9e7421c8923f82d978074d51483e594
+b0d24b3ab7306234079f4f52186a341a8cf7eec6485a491f558c50f86aef7c10
+6fdadeee7dbc16438b213746425c80bf19ee1ef22ab8952a6a91cf1629d027c1
+b4ec94221468a107eeae9b727e1463c690c41053c6ed0d27adec33586212cf52
+c4aa47cefa30fc2f22d1b36cd731f8818ecec6d3bcec641fcdfeb74f37f561b4
+f716913c74df2893324861227e362084ea3efa36414906bbe0ab92b8dc7360f8
+ab2dcdfca4bbc7f23ae6a6ec7eab609a6d04fc0eb78d95d63a7be15db384a098
+477c2d5b367996fe969f6b26be3d09a2ab3c3deda2f2ec4c9bb2f0646bf6124b
+23c91547ba42f72c6d4ff83478769924a09ea982092deaed2445530f7e62a64a
+6c6944f5c8a8272c7611fc494fd7c2a9f371bdd05607ba865fbf5cf8627922ed
+46d67ad28c4e8a01700634db291a8c900c37d8f7cda706184bde8dfbfda3cc1e
+e6071783a69c4fce21a094fdc2d7542d005b33850772f73a0e7ae2c6e4624ff8
+d77fb1e978e9b013c2c2810394675b76c7ec45e39f8f3dbbee1a92e43422ac76
+d9dc26e9b4163fd449f1d2442f9a17ac6034ef3cd200d50875b89843ea4ac7ad
+10c8a2cc4df2c690e68c6f1070abd2bf25d6a62dac0da009d9b949cc257b4941
+8ec05287561ab344e71aca7cb870e71fef718dd65a69c99cd4173cbfcfc8155f
+f8e67003b086437f488af5497fc9416b15fa81d22709730f32ccb984ff67e291
+355503d6d6253fcb17f072f324b3259bcb47f2ce27ef9708fe4b09449e99d575
+030ea81d86622fbaa1bd1e347105a283f2b394e5a541aeac32151b376464ed0c
+96a2282ae7812383e1434e766f240e1379dd7440b4901a124607c4463b6328f8
+25fd34dff1bc61dfc6c3fb2ffcafe3b67068711e1635becebf8c890c62f342de
+baabd191fd7f17369f6456cd3f69921466bedc81966b1055c49fb4d139f234c2
+8cd8eb0d15ceb048def05831b3e940627b2f98ed44a0cb193284c616cb77390f
+01cf62e583c01909a36b83e9dc1097f7d946b30edb637f431ae85871f33f24b0
+0f3d42e09bb3cf5b9fbeec56c2762d4c7e2571c3300058af94ed8a09ccae9e60
+420e3b78dbe9b76d2e661eeb84162d2514564d3bd76e59ec2385ea5ca8e77480
+cbac4e07de6aadf16a183fc172d5c5bf7f979a77660706f2df8fc7c49cc77f09
+e3232aea4172e2a10cea4a9753724ab2b5a31e40febcaeb284436daa7328bc3d
+48b2f8ba50495e566df032f44d23a1ea6d86557d48a71c7456c415562464c4ae
+0ea04fdc6b07680daa44a90f34b59dd67802ad85ab62ddf3790b8f8a8b8660ef
+815cfd50cb8607affc2e4fa152157101c957a422f4368aa35f9faa8b6735c27e
+7c6ad626bea86f8b66398dcf40080a2ff60fdf8431d0285ab80668d39590351c
+588cdbcb8245e5b9d5259ceb2e95f6238f0dc40b5406a15ea059751ca482b345
+10d6f256ba50792b8adbb790bcb9b52cb37cde2ba2029afa435bb4fc541735e4
+f76aaa503353a8370ef5a83bba65cae93b3bb20d727b24ac58635746de379ba9
+04bd03403cd2dd8cdbbb96282ff967bb11c89392c5510c1889dee5d2126d1e22
+c2815a7c54b10aaa07d797e0337c992bcfd5e023a0dd2603913df6fd060e40de
+ea1905d3c9da64ffebdc539bbb00792a098e0aba893cee2b2222f62f7bc33b9c
+0fe107b99feb52d76b600648b32dfad7f7edb025b143b445c2182c8278da240f
+8909e3de7456428deac22c0fc88c3ed99ef0444e762edac64c4a4afa0b97a609
+58c607172daf23b09bbebbf040b5dd5b55cba5f2bb1e765e359d1a80c6df7f76
+c703baa94076ab528d326cfd0a31156698b9c9c3ffe0f13b7711ee58276b8422
+80fa784133d0e5f5b07dee16f7fa0dbb95f7e1f5c8ba8b45ff72d64586fa334e
+0db8c968d3628ca508f945dd9189d1f7d3462897c141d080dbe946a66de8b2fc
+2f2c89df29e8ee18681c8f01a43213159b9cb09c121eb73a080047b9706d4b25
+de8b147972ae87932835a6f4f12389542de405192f0023ef363327dc02af7ab5
+f3eda2970f67ed2e5435c50c522dd8dafbe0dafcfcc58daf945657045b3bb9eb
+a9b9f8894400f2c1030c752e4ea6bb093fd5a09fb95bfd484cb326afa941e2d9
+6936453764c5828552529668257f87fee07977cc6d217b5b923808f93000a451
+d7c26a81dc47a1e7fffbae8016303157ceb3f64af87f5a2fd8c8dddd04b8ed7a
+809140824d1349bf77e19ae91f8e42d7550f4163570d87c349ed3dbf427625c4
+f18245abc4ead1ec09110a30f4fedaeee971a2fd5c4bedd0bd1c80576da035a3
+a2527d163b2198e6c483ed7b14e9882f0a4ebcc2b55b204fde963da8e5358371
+dbe833aa2c41f60e98abeaa394bcf0212743fc5a3efaebb77d3206362db106a4
+2c57562c547826a558bd82bd5dbf7d853edf511135538d554c25e94c40b3f73b
+5c79f9cfd585cc5cd1f0aecd196c019adf970563fe58627bcdeb9e2e03471e05
+d90d43ee6a20a468ab4ae304d8ac4049cbbbceb0cdce45d38975bd8f1ce5d1cb
+b20fb81cd0507a3699c888bd8127aadeafb330151049b09b3932bf301489cbf2
+b09f7c42502e6ea82041403ede92b34f1bfef5fb5f5d920d5533eb4d65445c06
+7899f0e07e081795c9ee931a34ee6a9c65e63744db3f97815ad946f41dff97cf
+7099378fbc99ce8e7f0c7f4f4e7ffb5089e970085b74988304ac99c229df5291
+9be0d25d890b071bea811aaa588d28f78e6331385c5e12d03682567e5abcd599
+1b51b54a680759f13683eeea378081c76234cdf5e3d3e5faa8363c2e74a7adc3
+92e744d370d8d466a7e1461907ebfa43f44376a7323847ac162c24ebe8ffcd9a
+3ef3f05e197604898f9dd3c737c7da17c8242b8f7a261774d48b822831ce02c4
+f9249b22cd805ac81a0b9fd24ca446594cc50137223b67b97507d18409586cdc
+aab9f58cadeb6e5a1f9a843b7cdb58adc014d4f2f7bee89cc3d207a82e6b9e7e
+65485bca7253c6668629c44632120edb18b3e4bd170b5f431c35b2b945f55f1f
+e0181e92aa60f35ee61bda2a2f25dd60afcab8962077b38db99c12efaa3e62f8
+024bf9e864953cabc76f42827360f39ca838b7b603b83f2c8acb52b4bbccb905
+953612745b0a8ee64753f5db78bf77762bbd7e48b370ae59f59a3609737ba1bd
+d08e30fff8ec11a92050a7733539758889fbb3ec25d7c287e74697f80a485653
+1453d337173bc751eb122095af020c6acd57451e9d492d87130f898073705b05
+d044c77d42bd91116dce3774460fdfdfb7942c45f3053f13e71cdc7e5ff368b6
+02adffaf5eb51099c87806cd481d923548e4a1b153f3518445c2734a5b852ef0
+7028968378a565dd0245685ed23165d93450a2fceca590410aef8ffec0747afe
+a184ac2c6ffd4252421a3fa67165c48e1c0bba8b039bf3c5f42bc031d8bde0bd
+075a3594ec943f67ea4dbe5d5ec1bedeb833af6bb8c6ae6a3974ba1241113597
+4eb0a6e3107654d209fc0f43416c71645605a70ca1f9537eb49e2b901ec67028
+63c6a6b6a142dcb22182e2cb05a6572ede50e2391943b3a589f496af92bc2053
+3f68d7ecb40d1cdacf114090014dad9b9c00f34c47263d626016bf57ee1735b8
+5944bee9cee9d46a7a78bdffce9015ba5120b062076ab7968384404bfc7912ce
+0025ae48ff3d663aa3b312ee77b669ec2b4052794e90e85a7769b500c709833c
+607a352a4e69b4fa6cf41908453d07394740bbe9cf4501c5a64c0603c6f24812
+85cc4f4d1b22fa1281084b24f73b3436d0db59f2da5a100cc70f57c033c04dea
+cc78a56999fffdc14c143e965bae844d87c7f7cd59aa05d352434cd3a70feb77
+3e878d1bb0bb9681622449483923de84737149dfc0566962808602790de465dc
+86051f569beae85236ecb0b6a8de7d2e5c62cde8c13830ba5d3a5943affce66b
+29f771f8edc3bae0df9629dcc9761b2caa07d29b92aa72564e700ec9bda0340e
+71281448fc01a5eb62516d5d921d22e69b54bd74e30f85fc52647ca24fa8d273
+4ace1a25faa68a654bb60827585a9b5dc901dccebf5bb02437b6456cdb93ee83
+3e226b7822f375d60a1b75cdcea40dc0acd32f9aaa39808d24043098d76e7367
+26e24d0602eabbc35d28509c64a4d66df7c008d32e5964de8aa2c50134a00177
+81d085806a2b2783911c89f6876c1a4964aff3e59644e05aa6fba05e970ee558
+614ced908bb4838b5fb24c1a3458ca50a1d7e51af615549d340cc334b96aeb9a
+4aa99e74f3939a4b640c653b03181a4c54d45604da621d4fae1aa04d4237b7cf
+9674a72b50e6f26c07aa85343b43e1cc4436e0b326b890440dbc6ff36202f144
+e118eee07c880f3d5121834366d6b174b9d67886b62ed002e78e592a42668cc6
+31e500ee27ab1beb2c87a7fd3b1f2274efcabc70dc189b942e55d6f3779d6bec
+67701f5aa3efea75615cae8bc8ae937cd29b9a6811f9ee11585e39b69b09176e
+e5b0e4a8cf0c6fc393fea31f0164ba03ccc6af688df68f4228868cd63a84c480
+1ae93da9c45f79f384fe3a54fe463d4c7853031870c9e14687dd9dd76b9db209
+9c21790b1523d2ff913552ffe62b3b371fdfb87919a2d961847bfcb4131a901e
+9a8cf933b2e2693a688e435ec50b1c0800ff31c63d1f5c7101fceabc9211860c
+d043f5a575ea71977c7a5065d927a4de2c7752c02a857b884910df8511eca9f3
+b81d36526a9083de5c32603649e944961781c3966fc6c8b9a7c1aefa7e08e5da
+782a9d694b8ca6d5c3887617e2bd3b5ddcfa2f965b78ed018a217ab5c4a4e538
+85ffb9485db87327232541ca112dec18d9f6d4e66256c929d8c38eb634cffe5b
+b4b3aecdd3ce66b85d9df1f87b3cabc609ca8d1c5bff49215f8c324bfc42dead
+64c43bcea81619ee6948ca0dcaa9c7e2a19f8b9e830b9febe1a59ed5cb8d650d
+51ec17b2844c9d67184557654add27c135aec9c6a6bb2068cbc4edfeb82133ef
+a5f46f0dbcb5996702b4b1b67b3cff6992ef64fcbacb316e901765a87d76b0d8
+17d389d165efd517aa40f6c75a91cf060968467c82b1294f2abbf54a35227b61
+3b3bb9d32eb143393796fca19b4812402f221c7859ab4cee3777a52f847ad8a1
+3c637ff08c83a58e5389960e44cbea061bf444fcb64e613f8f47bfb1990c5d6c
+5da42c20b4199b633f3675d91f301fd3fddb875093d565e01f45e3c22250358d
+1a7af5ce476b44245788eca65c4db73bde810290d8a63e59f30b3c83d16c5c62
+de36b6dbab5d10659924f32a5b876c1583cd8bf728afa797b33a6c3c0d85b40c
+536b2c7d1ec7ef7ee7a9df19bdb5fac451001bd1e8964a320209372646202954
+0eed46fb166faf15f8b10b8515724b409c7461a738248f60429976bf7ace5a7b
+bac4452ac45b5cd4caeaa310f154d78f101667fd22b0e69bde93ee67c68913a0
+67231e0b73377f31d3bbcb61d8819e32f0aa013fdc543ad95ea5f48cf95deb9a
+70c31b233f591549701daebb81dce7c3f6241d0a4c562bd9e267f55f017a20ca
+d232044a680e59425b8c072682dbe71e21c7ea603056d9ddc41f16f26ee5e74a
+523462e49d58fca01dc10d1ad6b6629cfdd36c556f8fb347af37886140a145fe
+4fe9e34d22e5d7804db730cc076ce074762f3849c62ac49a2d66c707455106f1
+ab854054aa54222ef6d5e628c8065228723805076993d356f0349243d9e43abb
+968eb1c9998ec26447bce6aadcd84f0b6993d4ffa5f536fec6e12943747aac99
+c253f9b24caa7db44311cba889b53ddc5664475c22526fc9e1e700b3d38b3568
+85ea0e60d4146811e80386c11b2ae0e2eb94afe92dbe3b5a82fc3b7ea5b39847
+475b707b4058e717d5ec2d599db0f27c04a3de4f85bab108f6d1463183291cc4
+75edb7b62e0c1d6e6f0c5f03e5b9862c6e5b1fdf755610ba188ca32f5994ba24
+8c6a0f6e1a6cbb2378b3f29c4543511dbff9345a6992fb19d67500372997478c
+5618920ea5a62eac4aa661291c8a3e46a26260c8658178e17605b413bb89cc6b
+fe10c7572049fd36357290dbbb19a670e1244281b4b2a3ba60e1b322182183f3
+96d486b97fa3d435987879c3ed1a4c4a5e1794f7594f05ba6a1d75138dbc76bc
+5994ccd69499f4fc7c01f0b0b04a7e2b8c2c3eb6cc39a6e61d8610d0db8bbf88
+074959d4efb3f4e638208c7935e08d34379884930d8e99c3465ea4d4213a8f41
+67e091345d5ead21e5d9cb489f2666c02a25c938cf7686a943d645feeeea7028
+7e1885a3a2b2cb9d3b3e75896058ea924009f40c8bc017c82495de1f8ff0c62d
+3245610b0e5d54908eb3d96091cb87df26ad8133c46040e168f82547a32346b5
+0175b7c37b6bde3f345b4322f9a57c25363d32d1988941be4a84403c0e4d3440
+c840be8d4697fcb6678cc2db85fc9d6ba2f59814f257f18bf17e57b436581d95
+d391e318081d75a1a9d8c1fac834819a82100b47b78424c28871ded159b5e5ba
+49a2ba27f1a0fe358661ef98a937baf3722a1b471f269e3f8cfed8f4b44ec694
+b38f4106570c9ba31a30d56a594fe4bd91178389667c3d15b54cf7590c46b9b9
+a1ce513f45ae78bdbfc81a820b2ea832f390ab3d389511add1f30d1d07f97e7d
+fef1e1f796826561873c6321e0915eceb5d141d5e8d9e664802f39be458850f1
+69990f176dc24f0b3148cada39a20c3afcbd82ce6fbbe0cec2f3cd6dfe390b96
+f9c450e3fb31fa357930ca4a2911b3441e4813db96daa79cbb6b6da2ee464055
+374194ff4d779d0ed6baf67e7c06d711fe1b5e868c1a4e6c7f3ed529fd3d3492
+ad079fdb6faa5dc0924400149ce79a9ab729283669917b2b538f05bab7596b8b
+bc9c86cb74481d0181c8fc2b0c333619b96c63b6fcd352f0564862205f685eed
+ff81f069dcb2bd3d0ea80b86952f7efd67ea8b60f3e90ca23cd176c76d73cb1d
+7c7de170a4196875e99ba42f5e53a5c3a7740bee37d08900d68e1a5836ad4c45
+2f325a1fd0d49f74e9437f2d28062ef5d2934d063f0521ef792638fbc96af2a8
+8bf23e8a33c7079d2abe21a018521acc0e14c5508e629fd83773c9f59cd37fa6
+4a121bdb1db13d1c598589b00da37e78bd59d0e9f3e6d3c99054626e9e0cfef3
+35d2dd25c138f96a3f7f62e2ff2ff12010049edb86f3645f0272f36eeae0a60e
+532cebda1c0c0f39c454e251aa6ee1ff82536c1fc1c9b7c9679fb2deae693a02
+9eb57eba3882901d2dd7d0c24d5f0ef6b799080e98ef048eeb4429ce058e05d7
+6a296e34c80467c71fee0d41a366ca38b6fa3c5eb7abcf854fa7adc4d6ec565d
+7d8c39d192fb3b06bb93518623a1b1c56cfe095354ef43fe73c1de5541a7af68
+c51ba01019d7685596d730bee70268
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/courbi.pfa b/lib/fonts/courbi.pfa
new file mode 100644
index 0000000..5162aa6
--- /dev/null
+++ b/lib/fonts/courbi.pfa
@@ -0,0 +1,1940 @@
+%!PS-AdobeFont-1.0: Courier-BoldItalic 001.003
+%%CreationDate: Tue Sep 17 17:04:09 1991
+%%VMusage: 57715 76639
+%% Copyright International Business Machines,Corp. 1991
+%% IBM Courier is a Trademark of the IBM Corporation.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.003) readonly def
+/Notice (Copyright (c) IBM Corporation 1990,1991. IBM Courier is a Trademark of the IBM Corporation.) readonly def
+/Copyright (Copyright (c) IBM Corporation 1990,1991.) readonly def
+/FullName (Courier Bold Italic) readonly def
+/FamilyName (Courier) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle -16 def
+/isFixedPitch true def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Courier-BoldItalic def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 263789 def
+/FontBBox{-48 -288 860 839}readonly def
+currentdict end
+currentfile eexec
+5c03f98a9ef1056084234938772b65b659a297a60831474f7f06192b155c7867
+6e337a4b7c45b34a88552e942ea1b7667df4b71b67df89e141537fb4b1d26675
+7b98b6502e4b2246f50fcdf717d3a5cbf57a5bf92df803946d950138fb0acd1a
+c81f3f66f82ef04256e333e070972e17b42d661f50b27463cec7ab9995060f63
+ad76b5de2ee0546d9a2e43488699c40c150f6d60a9fc1dd3b5367a87d081de8b
+a232ff2c4e9e7ab38f13f20d747cec9f5cb36fb8ad1b9228a42216d93925b91e
+3643f1c2f86f0ed4286847196391768d58895b7dcd757d9f656af1125a11f291
+42e28ccf91a17be1a89d3214be746c4fb82da439d6ab53f4bb12358b2f8c6b17
+32fe22465ba0dfc22a955139b55389d1904f3f742faee44c1af9c3c9f588ac13
+3635df24815df9c92f7ee93e79555f834f18f20eabf3b2b7a815770715bd2e16
+4b1fcb206e2fa3aacaddc54d5d61dce9a8795d8f346bc180a550aeec53154733
+bba47e38c6be925bb166c8b776c4350935f15e3c6123f8a91c65506f2ff63ac5
+d79c7a7519f9d09301a6de5052913938ed21c0194306c8ae995bb8f5ab991343
+5def56faa796248a10f995ff7d6ae352111eed560620bb6ac41103ab077d7cc2
+d97a20aa0a9dfabf6063f3a600f2c12fe79d30f9967788f90f5285da7c197d4e
+58a9ed99659dc24269914e0c0582e37840b0f6ef456b0f6b445b18e6b5073f41
+8ae4fc99f4998da4fd8820393e41aa4f953ceba2edcd901d5b7ef2fd026fc8a5
+26610bde74dc20173add2c71dd98cd1b6445ea20f88684638f269801cfea8dab
+e4cae300090a10211e08e37e65b79433989f2a3d888982631301a76e4c68a604
+b9ffbd0b7bf26b12cec3ef5c6af999e72243e396f5eaf36d7a02fd686268bd85
+d66d617e51c2c7a5033d160b8ebe9b7d3c0595cd0ec31cf4b88cacb3e74e2870
+ed7e20f88905075cb6821889e85fca3fcd5a397d44e9150750b16260177280fc
+92a20e8b891abff9492a07144e9ba614d069d8afe28441d03d34eece34f89640
+1ae1c190991de2ccd321ac65b9b575661dbb7dd5336f1af355062446fe088c45
+05d9eb7fd3f0740528564f945ce3e13e5697b23e1acdafb8322f77b455e983ab
+dadbc73bb4c8b593eb357226060c4f723311d7c48435ed02bece6c61523c3c75
+5be81484919dde97279579df674527ae2844220a490187e9350e34ddcac7c82e
+e1fe5cd11259688a987d6127565904904dc3d4ab7c41035c5258a9841dd2120e
+de49dc1ae7f4c308e169098267db701bb94b4862ec87e13c4176a3b362f7ac17
+39b75de7bd9fa615fed494334254229a30da7357f1015f7d2983fecfd2cd2444
+6e697b50f2b8e409e73e46194c89844ee5e5ae5a4d646587ed37a0255b86fd7f
+9c287a61cdbebb354185d2724464a70461a29dfd3c3a98291654bd13a64598f5
+4e23fac9ad312e05d6c689e529ce5ce92e97ddc924bb5c7ca024bfaff8e2021a
+dcb6f07bc45ae0f8c80b693fbab5c1c66d5655e7de5151f48fb0d5972e2f523f
+790c7c46663b5032f62a9a510d75f7809f3c7774d2f7378a8de57a912058247e
+30e29f65e7ab0a93ca198e6dcb287d7e44f01755f849cb46ee4e8a5668f5fe25
+a4a579201bb36e45d4208fc0309d5b763cf6f5903f4c59b3527e11a1d594f9fd
+d3f6e55a9ef313faf9ee6d0f05c3948fb186cc981ae63de15e4aee46d7e3b623
+736066975cb20d00149fa393a35d8aa21637c73c396aa1706d4486bc38ccc199
+573e5c564947739431f445a8620383c17350a9f818acaa67ef7aa609afc1cdb9
+44a8a2c76f2e298b1de868a5c379f8f7fd05af8e66b55858d579e09c84100b7d
+9aed565c5b3491b2fec23390ff21231bc4d231a75576cb7382619f0480126a31
+ea8bc6b2b1535c7bf260351756ee37f53ebe18c7115a594001dc5b6d3415b88d
+8a2bd9167a5ad2949af32718aa189645a94fa2f5ee1c07b8c2a6733fcd44b21e
+8adf515da9d623d02a7a0f4d34d7969454c68fae43681a970841a4fea9da5a94
+445d4fbcf36ca7f185e8f7d085fd869203a8f3f9bb87d31c46f459c1c3ab4854
+2def58e42fbdbf28cd14d3a1bd1f7d8f4bd136ca919263dbb3c52ca2db0fca55
+110940cddc11095c5562e4338cc7b74b0ff0c6370c1cb155154f0360220c82a9
+9fdb9eae6e988e28d7fb0d44869ca4c92667ae358dc1db7601ab42668ec40f50
+14fa64b966506873d63ba425d899ce827cb7532eaa44cb8ca1e5763399387a8e
+6dafa8b3b5852f23301c441366956805ab69dfc15cb156ac11ef709c651ff3b2
+064a491521cb0ba8abb66b99119d220a197516a7ed8d4d5d223bd6c2afabbc9a
+be1daf6a4b9d6064bef32971984fa314e9f3a8eddde83b39075b3b6f9f9f0b52
+793655e96efc0cf833fafc4460565056522b189870ab1493638d6cdca563e6b1
+793516c25d149caeafa2bde531b397c4beb75b09ac16430b4219ddce0c4c6400
+1a32fdd1385372158ee82b837becd6af14ebd1cf92ba934154232cf3f5b4200c
+41e65762b0dc5120e7034e1fd4774a0da978e6395e855c8cb369e677adc49ef9
+f4dce344953fe9da428bd35a79b6d6155263c0fb306f4195a5a181c38ba432a8
+1f7039f3221d3700d584e4018469dfe590a22c3bfcbeb02c56fe0f0f5b93e6c4
+0cd8225b071022e08372ef5c5de6de6d24e22640002597d92051197a2b88a27e
+071cb9c6580212f6dddcb80185ca39a774a905b447b5b836d72ed90faee84a51
+d9f5fe37de26e4a3e5209cbcf989644acad73eedd16f028a304e0eeff26655ca
+890a74c6ce61b49b81a191e158b6f3161d6ac5def3f084d1c0e48022f111bdf6
+091916d4adb5284d062c8d71d487dfed925c4f26fb6796d36eeb818b9ef5c503
+3d4fb3bc7b4aab1f562b563bfab9a79ebf49777f6b8c0dd77af6e4dcacf81688
+caf05981536b4e91ce965abe966acde3d304d9d0f3b6433078a8ebcb02ffdc7e
+c210a35c7dab3ebf015fa81b6dba86e683fcf8962117f44d68f562b4f7c68c0b
+5df0193ae2283f35c421c6da43dba3419c63438ae46eb65fec9d8902ac784015
+398706463e99a1cf1554ecc16494477fdf68d40ca992dbb01816d410662b743d
+f0255e6c891b1482ee1353a5cc268a264e300b94d15aab2fb2f80bc1f0b714cd
+7e1546bb733ee3db28611f58fe80bc6b4bf8b637b00fee2997cbd2d2f8808944
+f428727190675e1dbe9e4ea29869af8729248ba59abc84861be3814e003ac8e7
+f8f7d7ad667df77d6b9619d5776bd048c7399f01b3688730fc94af5fea41e905
+43faeb064b8a7e8c9ed0f04631f4223730e2bd7357d6c4c114419a2d4aead49c
+d2ed2b619a15204c8fbecaa51802f3fcd8f201ca100c36281294f2cf2981d59c
+ad0d9e2ed7ebf964dfb3a5f2b1bee1b3f361806b0a5f7a74b32791644d5184e0
+2515f2122ca3e24295e4aaa1165bfcba0ebe9718243db1f4587f24cf6a52f92b
+c2229b9fdae40d1c97b6bc6eea4e16231fbd92592ef326227fad7ca81701af4f
+f47a2be563bff9d42ac841df2914b89f372283b77d62faeb611eeb870cf9b052
+dccae0c500d9ba5c86f984fca0fbd37e813fce5339e177da499e68b74965fe03
+6a4e030386eb28c668c18b04bde229c53c86941d682ab64f0ef33c47cda25acf
+91ea2c53beb3a7552d69b092a76ff6c496d84608ead8080518943a6fc57fcbcc
+15da6f2c62a6326ce45f19b403c65ccc613991bb5e493d1cdd913269816341dd
+c484abade62ee0eb0f2aadc0fb4ca2b04cebfb9989611ef65b6697fc6f0fbaac
+6745ed1a21dea33907385730bdb0cdc2fc37376ab389267ee40056eee0e6467d
+8181a77d6478b78d4c140ba7427eca7357e0f7d5f72324aa1d5e6bda674c5743
+4fceef4a522731a5092cde4ed87211ddfc4267b93655789469d47cbe3d1cfd35
+2a98cc4896b7920887378174447ae1c501c55aec394822cd4beec7ee8b9b042e
+d6255479d8e1aa7a5efe0f486417e5a5e6f6ebd019aedb0992e033a8436f4da1
+44db254c8990b3d25a7786c1250d71fbfbf6f0e45faa7661399f12089822697e
+62e4081d586ea80ae533b192cac92f9f59ad445f7ddd088b66b307041b737ab8
+cfea19ed2a9d2d35bcbe1cc4fe4487f09288e7e85b98ddcac4b097038b8a7905
+c0293c2d66739bd457cbdd9892044dff52106839c707b2e02fc433bd1d1197bd
+3cdbe6b1e55298253b09f7ce80b94cf7715f2947cfab6dfb389e045294424fdb
+6f90ec45fbcdea39cb05c6d0a4614c33769d135ed0d6a6a5a4cb25ae1d1dd408
+51aadb3b4eec2651c290a62d95a9ecf17430db06a42593ce2d06d3590e76b929
+39a2f87c2614d353d109717fcd46a7f9b6795cc840ba6b4ec37502d3271d5ff8
+09c61aee0b67bc4b8629d9ea756fdb3724b1f67ddd7b0f47b3c47c4c067885eb
+d3cfd3b7fd4f949bf87994709f5f278a699b3addcdde90196b5fce894a44f3af
+82034d0b4ad4ac692f54b6bc07b849bcef0b651d2a1b1f69460bcb62985cc661
+4da60cb063586207661c758ec6bfec68b1f03a32e9b41e8742fe7ee126411cdd
+f327812a36818f8a88f4945202863de81671c01c608f2387d1de2d7e686b5f20
+b7dae705d654112576d937efb9cb33ee65b5435ec9ea9eba518b3f9f1d30b9ba
+7f7162e86ea5082e983295e074a854f1be92f637be4e7d99a75b582ca29f968d
+3585e2f6481ef968c08ce36976ee7dc1c1577fcf9cb546130352f80e880ff81e
+3458808bad09930300f85833c920c47d61f6be8ca5a5655eb4290fea4d4847c4
+bfe69e08c0a5cb8f58455f27d360da7950118eb86df84f490efcc4969827a14d
+884551b1185831850fe284b53b661098d1b145b3f2a16ea5c7ae601756da6aca
+c141e3ce0b4079accf03fd2376db53832bf0d41b49da9063e79d63bdfd37bf7c
+94906c6cd82ee31e2184bc695f2746a01cff0373b369bff632f3753058cba0cc
+2e7339a4c85170dbd24fbf89d917aa24de7583dbb8feda459081af95940e35dc
+58c7d363511b82b95d983b6679f11bea2675775a1390bd8b1f66afbbc1295bf1
+05bf399faf1665bf04d975b31d031c6c74e3ea1489c57e4826263fe56de76639
+2698ded8780494b338640fc42a58c354a49ed70301b128f18e1c33c45ceb89eb
+39ee8c97e200dc39325571494b49851ce1b8d1d0bcf79a3120411a8b168a7758
+15c0eb119ca69ba8fb227ce5747785e4a096f4b35eb15abf3a8f45bfb50246ed
+2a3b2be2d639fc263765a00fa0047972552466f8dd6d596bb6812fe530d78ad9
+5a6c1f0c70f003d4f5d6d255e747c99c7bad63f97b51de299f7788ee41f08ebe
+f60f52904502200fc62d912560792ef032433366860a3154a16bde3204401e00
+3bd3663669d15a79596abf25c6770bcf93012334db1f1383d80e18f783b5088c
+8e03e5537396852caff77cf3a15899d21f6cfd57ca4e73aa5a6db1d7f3e7dba7
+6a31baa5d770072c9a29c06010bffb0a0e1141c7d9ccf6193cdbe7da527f4cf3
+e63298fe54b6e82d64bebb75fdba752968910cf13b2320eef043de5a140ec54c
+01942dfbc94375e12a9612cb20d117f9d3e0878ea790088bfdd237ebb2caeef1
+6e13217f0f83f508777f9df0e37843fc9216a06eb096f7d6276df5ae8cd9db39
+25a9bd2966b7c3b58214efcd2f9af2636d9e9f73b09b4da344a81f7a47dceab2
+b23238f002540d017bf200bdc87bba433c7d7ec3b55da5af20c37cbff34701c4
+35f091ab701cc51c9f0191d5028668bd6a871e4d08ba19170f8c1430f1b542b1
+7bb65c5a95924a1093c04c9af060e456ae7695ff5f6bceb846976bbe437a780a
+e7cf5650496c859eb598942e3700e7d1825e0af3bbe764369a7ee75f14dcacb5
+24be8cca7f80985d42570543532aa5302964f5d50fcbfd1e094833464c361d94
+de5ae694e605271102112615143f68365c9a626218b923b2a2ca76c4e8707810
+f1cc16d0da031df23e71591b1cba436bbd25829c3d0f0eb60e8b85d2f47e30bc
+b0abb659bca53b96cc968db4d82f0adeb1467b54315451bc89e953e1e2f47141
+174fe9a4850b451ad468afb338539e2faa9320edff3118c60a5c4a7e32a072fb
+59bce786196cf4fecadfe62c4f3a000a230169397f73388f06d9c6ab33fefeb5
+b0c93ec5c4fd02ebd912fe85eca4668d8723d9a755ec2501ae74abac9ff03238
+d8f82e1b48071f527443f2a94a1f90b6f2260ccbf51b9bc2de684a2a8563beba
+3b05379fae11d6ec2214953decdeeb994dfa50847ab7357b121abea5672498b6
+9a52b029e8c77151bff878f7f30fd0f9a40b8e1579a8b672b7c755b68e28376e
+4b5becc11fce9480bcd2c10099447b4e6b3bbcd3b7e84ed51c633290ec084571
+ba4665bc26ef665621495045e18e2be0ee391f764d94f7e631d02c3c9191637f
+e49b03f893589e3ad60281ecea2160e8171783693e04355722ba6f7c8da1db86
+b1ea3004f486f94e9ccf37749e8a0e927d15e84523402684c1fc4c514e7baf20
+d77d00506cef1e9b81fb8244f0d6095ea861c446948fdbd822d10df5d6a82c3b
+0af0caed6d1fe7521c6515665be4a5e10c8703c8e4d7db3a735119fda2bfd79f
+8f3dd3accd038fe9158e33cac57890e6fb22b41f82fa854e1b6a75cea187d2b6
+18d4bf9117bea6261aaa838ead2e50c115c997dfc996c8d00b587791c5285df6
+b5cd27b12e338a650f53a0ec9cad5bcb0f2053dc77aa57a766e2f8e290586e27
+924cd5a5c1cf0c08c48d0e7f9990e84644e9a6f5c9b49be9e3d7322b9b66de57
+2e5b0ab001a2c9e2d9782796a4a7475ae1bf45d9389a99371ea684ae896f3985
+8d17a6c734ec6fd734a64c6747a207ee39f1c9f896b6f6ccead910d8bdb9b642
+b141d1a57dc06f9f303947c61fe1d97699fc3ce4c66bf9953b6ec5ef743717cd
+831c22f49a68446b3b8a966b8659fda893a67fda0cb566c0eaf31bf88f7b480e
+1f05a59cdbc561b6c7d532252aa464fda44727d80b6581c7f8fd89caedfc3b57
+802e694b74dc15b889c838571cb6ce197439ed966d5624ba7567e60e4dc52c48
+c74e5f2c2e0282e54cb82a5214b3a97fa82e779957265a4acf064bec17700158
+8036c7b52c4c2233cb0e8b5b244de31afa11afecdf26a916cf1ac85847a51eac
+6cb46b3b35d7fff18d2041a63d853535fd09213116b0b62a115623b471aa4849
+6d4112ed9ec7351894cb36e9f9a0bc1c015cb3110201390643b2925dea3a3dc0
+7fc8d62b62ebcdc38c2d3316b8ec0055c34acdbde86473e4dfb1d5e33266943e
+9f777ceb99c757b6c6fb5c69cdebf31336d418f0698622f2a0e46bbd0094cadd
+deedd149e7ebb57664649e550a850dc994df665b57d81b571e4bc6c0d25a470f
+bb9d78ac9d2fa47c41675a11f3e5b88b567813256f4a544fcb21238a91e2e30e
+c3fe52ff997ea81e1b0d9ba23e0815ea78f46003a8463158f6077024b33de798
+ed9c1b02aa6428d1dab23df5c5b055537b44c47b4cdea9c7783ae5d534e65b2b
+4dcbc46156e6353307e0e510e4d63c2b438737671c024f29b80513335be3b4d9
+8dd586131c242b34686881b7d38deee1ea765c86e7cedee45e8f184987ef2e19
+15e668f56d7864d1a8ffee2446c74c34163d2f3b7a9c130ffe08ed50f82ef23e
+de6b14e54da94c19bf1e845d52cfe4bb5799572993d3115c4e8026d233eeea4a
+2e9aded6f4f13059a77a291a68899f823c1dc8cb477b8a63e613dc9aba760219
+e59dd6207ca3a22da2934773001d735472c921f2c2edb778c8cf892295482ba7
+6253c77b38ceab6254eda38eda2ade861ecaee566ffb7228dbbaf41cac2cecce
+53631734fc3240ac314f0c027bbfcb5706cefe4f1f975a8e2ee0956b23fee700
+92ef2de443b84ce88d513ba4def345f5804f6b88752921e636e9f3805ad16575
+88415aa0e0de5696f58ee1f5bef9053265fbd2fb59b1ae56b57976169aca1856
+e577d8ac3f8682ac5ae380031077961b4f5109f32cf14844d5bf33c230bdfa36
+7849549ec66ace781a6872b0997b3ae724ecdbcdfe1e3bea3985c4c49a301c61
+d420275f26fcd495a44e006fb0dc4466adcadc04ed4e7d5327430b63da5fcbc6
+15df77ee82f16d884b82ae2ca29fa3ed9bef89c39636c60d9b3fa3b0979daa47
+247a16e7c85d3a2eff262f02693468edcbab854de2450ad5b57549cd210aa038
+66b7ce681a264c8fe84d1e9db444dc9384613dcdc5eba9b416e45957d6781b68
+2b91c3f421c8ab3cc4c34770d92c17154e67c70dcf432c75b9eb5ba31fc1db9a
+deac4609c8cabcddebf16af760647e84cea4ca275a0172367ad1267fc4b53a93
+bda2df9bcf433ae4a97e97d2216fc97fc6471b30d717c89c070f8907a7606c63
+2d584eb26c0def8166b20e33e5801f41937240794c42b9a89cbba3d69edd7983
+702788b068646d730615f77cab05aff0d0d3d6aa954aad02b927fd16ad2e0fc6
+e867725194465abc056a13368c8ddad965d1fc158d8b2860ecf62f91254f5d22
+642493aabeddcd7936ee057c74b65c3209f97d139b4ee97d071ca97ded70b3dc
+135b4f6bb4b614b9b873d8861803e52b5c1c244041ac55002271c638d59fe5e9
+81869703cd7a6c4bf77ee3c1e874d01e42e5971584c4fe6793c9bac4ce1e4241
+22267304ee3494db762355ad4ff4f4adab137c86b075c9b8f9d550f7c064c50a
+f47e512f1249167dc28d02f21f46de36139b14c872cf9bc0c42cb876b9381cc7
+c193a46d0e7e4445af03a2b80f21c03c1bdb4c8e73a45786b4e3bbb461765baa
+57b956e0cd966d1e6df77d4a4fb5ac914cdd7c6619ba317f7c33c453ebf567e4
+e4ec75816c790bd658350a0fae0eb699c708559b4b5df253895491ae9c77da38
+8ddd56129988ff4d6fdbe7c01d890ee2689f235590f0b80de4a591e33e8196c2
+0105969df7fe558f8e2f97372ffe67adda409f12c17c979739510da4b5314ca8
+e4e64281658b232b0e3edfade545fd3c7e7fbee52adff818010270b0855df99a
+acff5c77eb34159fbbe8c6d355da82eee52b7e153c354cf3f18baf88d4cffdb3
+00c8b1cc7f30219b26efc8abc8edd998eef793c7f4cbbf8a7d8f702271740335
+ba6e596c0876e5b3437218693508f5b59a5e24e754adb4fc549faac222b31402
+a8b754b37c2cc69a69abf86cc89123c9cf654d2d37a08251bc1f119ba6b72ad1
+55d2d0155edd88f76eb739280b74e364505548ecd95887229aab96271e461c54
+32aacb7fcccfd3616ceafbc4932eedcc145aa25e9ca13fa8d9ccbc9147418793
+b86718c5fcf833e4ee24fb58fddf71a53fc5203e1fd3f8132425d9a9bf216a79
+e769958a89ff7104dee938179b316361207cbb3aedb8422ddd16a10cab1edb0d
+0077f1d83716f824236037c83a759f323cd24d057a3057e5b5cb8364528b3676
+c9bdd5eb9c47412c1a65d04a72f4fb24aeff98ac6383398760f2d593f1462aed
+705e4ff227ac6805f91d12486a7658a9015ca7fe8badd6f449a97e4a4d3912a7
+3942c9ad0eeb2d732fb5243700cf95e18712cdefa2406b5c230a495e57b46274
+e064104b8b1ade3f2e62762a9528b850e4ef45440713626eb81df73b470c2f7e
+e1df0501871f216a39cf671ecd4a289dba51123997309113785b7b73a5bfac2b
+26532b86124942c3018c02f3d904c17596d451486f488593aaf66b73490eeaeb
+f28eb3eac5f2a7659015f205fadb5c833f10375b029c1e3046a957036bf27c18
+1ac81761cd177fedf126833b3dcf3e5caf296b7b910caf9f6ea742b6a8b7503b
+3772ab82feeadcbe041fc4b959586e06aa7185ced2095c33fe11564e857bc596
+2cee40d18e59317f21efe1f27a10b32ce40d3b4a60692d5346cdef10fc6ccebd
+2a7ce79bbce9c4ff44b2f06b9a28ee1328e043cc12b42ab03317cf9bae3e84d7
+bd52b0761c1c0fb049e7aabe8b2a6bae03b2a8ee4a6543cd1f2c89d4b906997d
+5530f949c403ebc40342e9d8816a39061aab7ff76c0080185afa3153500dfc70
+587481dc9db515fbd77c0b08d86f944f71745a0a29517136c9b679a5b0bedca7
+f623fba6b954f39e14e1fa04f01b6e377ebbe90e24d069908456762c42b35010
+677308247b6343061bc0d785d78a786b1a04bec9f9dabeb86e30e64fb4ada8f1
+b9fd75c9b0d64676c4c78d635b3386e362ec7cb06bf2c85b8a22292a58f7c038
+827a1a964af9b7b9f3fbcf8472d120c5d9c0bdbbe9c13ef14d2bab51a183e3ce
+487c2c463b5b74f4b770ef9e0c60ed08a7eb54bffc1c0ab00c51163af9a1d428
+c30a5f2abb783c39e1891b93b27ba533aea8aa8b3bde4d9bdbebd0cb63554705
+5e2dbc482dfd2f70e88f9d7785b37492e6068532149a9e8fd5607911993e9dee
+e1dfff50620ab8d327e51ecbc1d9f57045cad11228d13f073b197ed7bcf23bba
+338890c5e4c89a831d3d6ec6f4938658b12656546498a6c7ea94f50c04bfee0e
+96b00e1f90bbeef51162d5122d00a62d6fa8bcc6ba2609af9ef96f2af7341ef1
+ff453232622e760c66c04a5ad7005288a1963291a82ad061105283d9c1b6054c
+5ac6087102fa0840a71d8ca55225f5ee5d9d8c5f4233f6e27992351df89150e2
+0e4c5b3707c15bcbfc0a2eef1babd8bdc8ce88410b5d21b2ad07f6a6a752346a
+9392ac16bd36af87384b3959c8ad6092acfe0bcb4b1ecd45227fb53969512f34
+a99c43d16849f0282592f199a87cdcaa47af35b93c37b341d4f9df8aa99de0d3
+9dc3ee52a87141cb9dc54ee197d01063340f0d8c34abdfdc6132bc39e0d10e4b
+094ef37bc33398c0c2eca7b7fd26205816798ccdacde7f235a70433df45909da
+178e6ba670d4ee36c0894e42fba7c6e563dc44b64c253780c586a355963c153a
+d25126232fb9a930e7e46f68289d1d1ff10cf89c2b81a82872b725d74a0067cb
+76f0c8d490a3347c1e8c514dd118ffd233fcf22eebf361b73cf6d3a2fb137276
+4adf6e62d8787f9988416118607c6128f7210327017bcd6db915b88c7233b2d6
+25840ca2473d6a9b86442963466334f743263c0d9df232d42b7b35df16d80cbd
+a08e17732d864bbc1e3f244c54f22f8fc198355440f8790aa50af33aa967eddf
+d61cd3272c0e9bc63598c50c3af58a18c649ee88c38e4404af24867e43a0fabf
+8a709eb5ba11696a044c4d287dca9328d768fc04a14c382d55dd54500cd5e601
+bf64480cc4f247a4b0c2bcea1a0c648e7e8e661f69dc09e789e12581d99464b8
+549ad6a29c2874744c42b434eaea2d2943fca61c27bdeed1a52be6e6808383e6
+a7c204ab964e78295355e2c53f021a809475ac21375c55e0e7491f4b1289b3f7
+5a2e607195f602687628ae541fa96ff05d01dfcd6c04a2ac5b6236a7b9324fff
+00b71e095442bf04ad5b8e428b18dea2e6dbbd77a9c096cf4fd591f6a563bc3b
+734b45ef6bfa0e83ccb996b9f8981e55627f790eb93947b2f01c46b7b4ccd788
+d870da4d3242541fce9968ddd6e438be5d36359d09ffdfaf2bf1ee47d9633132
+f41001b946b4879400ccae1c8a934a808fd1fa6db83cbe3d8dcf2af0d577fe8d
+f6fe30b1e0ff0a68c7c8fcf950bd9aa17c8d8a19296670eea02cd17bece759ab
+abb6a93ed4a6af531b7f8ba2e9ddc5c438eee125506816025795683f27d4df22
+d811c2646ce8830860a5d8992ea6a8c0ae01280b8fc4f27b1b31d32f826caaa9
+635a1ef2cfef6ba6c9ca9c0fe970d6e601a88ce06719578c27f33ff9f6f2d672
+dabd6f0be0235e3ed61c90bb0f304188784a018ff90156d8d04c7071f0de22f7
+d2cf7ed96707a83461ec99fa40f6d894286308858bf6f616f6c1105e7e84060d
+1e20502bbb968b61eee38f151fef5af57e92f1d0196b8eaac2bcd8ce523529d3
+e8771aad8265b7e5e9846f28c2a83512fc056de6a20f8c4b0711231304b5050f
+9510c17801de0c8e2dc22934ebd24a6167ff15e9a06c023d025f05d1f960312a
+bbfbc9eae21c4da1a6cb51ced11db6669da3e2d8530fb9c9287a4dbeca43c0ca
+936364d960f7611ab03fb143557d9545ab4fa4d407f125b8ec4e5c366c4d2a7a
+0bb9a135eb9fee265dbb5955ace3bf374a0d321c82e99329166806ec8d198adc
+af85bf2ef282c3ad477224d4a028584b6a2b5e4677690874194bc2ca665ff590
+da247aee67eec7772dca11a4897b12cd08532dadd9a217055b4840f26a8e2103
+e1563952d46a596e511ef81d1fb0d502fba1c6f5c0ea17c3e75e2b69e54eec6e
+0bbb9278f565823dd1ba4e5e850cd6f5aae2672bae4a07bf015ff08a013bebf5
+810fa3969991aaf53ce458d35a44afbb39d4c3bd166ab4cdd2389f3cb67ebc2e
+6782677b79fa51bb557c49687bf1b11f2082665b151e757e94259ad6659502f9
+0dea0e4588b706f5b9dd7e75bbd371539949a4f203b1402e5b35c06a7061f048
+8ce78957c95f4d0db1897d624e8f6f60e4f604973a89445221191f8c06f5519a
+ec6be0a1c2be7cc6e5ba73c619f2badbaef9e54fa9ff4189246fb333f4dc1f9d
+deb1120971d08567d890c29571327fed1651b073a357d71cb48a852afcfd9a32
+3e1b540aafab71f6a61e05addb80a225b4b88c4c0f484197951e3972df4b9560
+33d831653a2ff15e7083adbea09b33a35575678e145030c94b0c6e0927c9d4f9
+866b72e6b2c203508848ee893c13ab752bce6fd4f9fc6ffd91d28d14db80db61
+733849442b4979ec6dc0d37c1467a2d5381c8d33663995ce613728d6ae739370
+2f9d266a3e09aee52ae15fec98a8abb59ac09dfd740c0eef4e11b78cad38208e
+5f60d396e41cc30828df87b3e50bdab69b39af0fec8c02c324d086eb42e097ae
+4ce80ad0d2dafdc139e67391347e116bf1520ec8772b4b74e9272b4bd1d4cf18
+e808908988ab4bb2cec3db5565393461ca5af862e6a0f2183fff5d81d6508247
+05d5036599fcca825a74d487a8db33e6bee831d324f78af5910919d966ea57fb
+830f6b782d3dbb8d5f7bad8aff2ffa541b16e78e2d23180b4c21aec877254afb
+34076c578e4c40058375ac7e7cbbb7793488d7544bde5a6d29cffae9eaf0bd69
+b717eb353a7151bb06bd5ef2a38259798a5a6c9a684b377c0d72c932d52db0d2
+c9e86fd712ab9efd0eede6c36f24f2209605c401a3ca9bd28ff0959ffa480ff4
+a0eba22ff723e4fb4699beb0eb10c3f8e52022bb2ba2541941582667a784f397
+3cff0191832b3eb363c6977661032b8728ac754db575f3504749f70c8b021518
+90c8010c0da0503726f4aff60c240e8fd733fe37c74ce40a236e8c088c083dec
+dd187a2c95515e54ea4ded8226dd9e8b217e936d4b41c767eed5d20da9615b32
+2193abab5fdf0a2c3ac1b35743e5dc9df9048557982b1d87296c2f82dccaa4c2
+3293ebfff03fb7f8f252ec7052793b3e01fb17cb526814d7b73ec1abf03d9769
+a18e3fd9d4ac55bfb534481780790b76fd92d947f3adabdc10d7ca73e59406ad
+65481ce38557f64c5a23d1841b896923011af9d7c3b999772085d8da26122059
+ccd4972c484f9fb3e6319414b393d39b813ca2b603fa2f18926178f1fd33d22a
+bcb5d561159b0bf186e52cadd6114791a9cb211c285118cf6550ba24a931dcf0
+d5c7bf30dc413918ab2f6404e51d612b50094de3dd281db363d254e17fb7b889
+cb5b906db3b604789ab7c7cd9922e879b1d7a5292990a7667fc1332d71e01be8
+95be5d17f05d662243c7e3088fab828dff19c60b61f1b413e38891b5c0125648
+59db561729c92db0aaca99d8309b18f0789a09429059c57f4aaf4d39c60e4866
+a01944c0adee288eedc7a3a3abdca9275720d1b3da4233c91a4ff6f1ad4b8eb4
+ef4954da9bc9e0c48f049baa0fb35815c66d644d3bb340872928802611b73c24
+397f3fe32125811c8891a8a4c454aa2ef649d12d9c285310e0177e0400d6cead
+27bb940f9ec37b7717c3668683ea1de7e6fa950a5df69c6acc537864062cb948
+435d769f1673dfefffa71d9fc33c063c12f77ffe7a9ae14198a6623488ef0721
+93b48be6c45bfe6a1eb11d5cdf6ca9dd4bf4a2f0585365c690e57f83f7c0a80f
+2e24520d10819e81809116c0948278b9a9de9bcf87b2cd06723c0d95480e5747
+f437531f4bd6fb9ed73f5072812f66dba6fbe10eed9b19ca8d16fc023ba44cfa
+d17841f9bfd586f914e0d2b3336b4cdfe63c602fc06ff2d8dee6705955bb5b40
+7ae736aea9e77d00f679ed23049980872f1ca425b6ba0f35703f5d3d28cd7bfd
+8ed8818703308374a6a0bf0411b8de186a8b9ae2c67a37e4d2a4048dab5228dc
+53dd2bb2b269b1d220975d7ae8db6f17eefcba79d8b8d21100e528110bc6c3dc
+147e8e2ae9a38c54dd105ba79b57816991c435f412e6deafa71724f00a1d0b68
+faf771589d6de7b07f48e0cfc509726d1015233a6d79ff1d290d40d3f1ad1dd9
+19a8b41646c625c840ccd98fa5856ebb7a36f778d9b920d7ad0357c13fb3235f
+52e7e9eb1316c4fd0d692c6ef630edb722568d9eafc20ee3103ec21ec8ecc46c
+c6cae184b121be328883aa1c0ef56ebe2eb0e4b7cf40cff3d0fd5cd2ca339dff
+5560ce823f29fb7e3cd0cb47b16ed8bd72a2126f3276cf178bb0f1a2017dc12c
+8a64aac7c26bc7f940e29410d516f4543a21b07f28625bbcbde727901f157a8f
+7ee6d875847151cc685c1474012f5c92f25e8117c16b816bf3d99f3fbf844e71
+51e2f5d2b487a03399b3e263ffc722f6d4652ff11eb158327a2c94ebe007f9bd
+fa6365221e676c846423d48cf1c945612bdddbafa91e7f76cb71174a48bcbcd7
+3330040298c4b93ad3dc7f7ab689d3c68daae2693482c746f3d16ab5fb291fcd
+16c7dfc8b36b5105c35d65e23b7ae1f46fe78204f0e48dca991d94bd4cd0ff6f
+b587386211746e1814daf38866e9293a890b47cbe47d6d0241d1a05db32f3947
+dcd22aae8d26a2c92aad8041372f86ad9a518b2b40d8f9a35e5afe82770ab8b7
+b1b2a2e2e456a7895fe9b3144ecc6f3dcb4804d21a6cf11e5f48c8f7d6e69e23
+cfed3dcbc7cade5410701d7dbb19297616419fee5ed72f6c4c302d4b6928e551
+7a810b9c7cbb33096cc68d509201879f24646bb6027b541be7013fae97ec91a2
+1161e2c49a2ab5f6ecc731da083842edab4d7a029cbace3af24dab6ef566228e
+892062ec9ac9420ad0cf098f89bcd0e46f385fa52943c352c62341d5a1054e5c
+5c8976d6085a43da60468e301e19f2c10dd0084143e377fb8f53b3a4ceeb0c83
+6f88ff44e180d46bb136fe75b2b2ebccc364260bd72ce07e935d65d2beea401e
+2a3a12b6b1a9399b76b66fb16f57431e0a84813db0672d84c405bff5c06dfb1a
+7cda4ab6974e13d88c631208a06ed15794469491547056e7929d543d05ef7f14
+a51f64728e444b0c6fcc06ff89a8289620160d82e36a477342b70ca1254e4792
+b3b0b5fd349c38dfaa19a3c306124d50079295bb7224ec8b8568c9a60f8063fb
+4d49cb80175ed24bff8260e3361ac5227cf87a0d9d49f56366756991112e567e
+a80ae3e6451f90184ec37082aed7eb7ffabaf3ea4cc8e9262a4c893da2e6531a
+4fd9e46d3c448031f043b0fcb636084bd0284a20c57333c11a150ab595049323
+d0b9c535bc57dfbc7f32247a374412328f5119098c9e2a5182a47e8ea456a42a
+bd3e53b3166a525cf6722aa07efff48901d63d851666ab149439f0a53fb5a45b
+f816564244c03ff44292183533ba2251bc0b2b1048a02b270dc0d20fc731104e
+176cdbd1dc8be38245cdc422ac0f96d8cf78f43343a3be655aa8b1fecbfc67e7
+aba66493f877b7437c84aadce69d46ad9d61a9b2cc484e0f0dc9376a857a8709
+39b695d5afcdb77049cde5a4ec726022d0f92d309cdbc7f6ac5e6b5630169dab
+c70fe75da2048a6c5c6b75fa2017e8892c8cd4aa408452e0054c2a9e73d43e91
+67104adaff3f149a43da3deb46045f507b08768dad3587cb00a1ce8c185f874b
+d66f45316bf9ba7cb47ee1a1a055a91c03c3d94128a82b5a7bad7e304f7baac6
+5d3ecca28b6624e745d728af83006891bfd39cc56e28af59ae3317501b450592
+bc6bdb032e8d5f319552bf281412e033b73644912eb30cec6010c152f36462f2
+5bca347b9ff899a593a7e9b96d6ad4b3ccb20e6a972a192428d4c5bdf79cc717
+97cc5d48a22981afa791078445b7873ba9f36a47d4e9124fb063506536bcf433
+d4f898d334548332e655f1430c5fd56161e78a98f8584de372f5036b7e02d712
+c0422bd413b89b831f41ef23d94dcec5db71061cffceb7c3f920a1a63d28cddc
+fa742f11028226b3c6c9987ecbeb75e343c61837bed4597f4b2e8e130537bd60
+7eb0016b5c48efd3282e758fce1868ff5b302074cbd62af9856de3fb54996a3a
+ecd8f0c6f0b20ac3b511321dce8f97d5e67643a9a63f7af293c863bfa4ec2c0f
+a2c76aaffa828aa6643eee7f6408b6ea09e91037f30cf2c391f4c9d9cb5fc01a
+5a012008b64c7e19ab795e24ec662cd3a931a98bfbb545be4489d7d5fe732cfd
+c903cbcf2f600bcfaf858b0123a31c12f2abb98c17833876b152ee9efe354873
+b9c144acfdefcb99273276050fe43a140247a35b0994927aa2a1d7463ed69e08
+8881a303b6131e3183893e3d001f241809a990efd1c1ad7c3b419cc1644bcdb9
+a47e3a8d8fcf1f52865c4efee0079b840b82a95223193515b85b9102c7e3f0e8
+65f44580845f0fb5fbc16e339b66aa51779eb714a056e56afaf0ff6be5bce7e4
+754a553912486a7658a9015e1cd381969ffb9c6bc4aaf54ebb6b0051fc7eb362
+39941c8e0fbd44bb2fdba5dc229e9d659db1b44bf2688cc7b29eb0bc96f03f79
+fa0b953aa215ece923ef8a4030ce185073c30ed1dc8f6d6c005eace2a3642060
+b95a54b0a0b1980b1f4608b63f245b8ed7e640a9c3bffa3fc42449d9d5cad579
+e86a050e5c9aa8696c5e7c4521daf837f3213249848ad7f26da04aed56f8c543
+61b910f4e1c0e56e336894db76da6031e445f889c946e4c79c79b21c5c64cf8b
+c88d06cce7614817e26c5d522a2c3d26048b964f93008d482af4f25638e190f5
+0d2775dbb1c4a4c077e3721df3e49bed7f8f642a6016963b6f58b8efd5ca7ff1
+1367b20a7019cd66c43738f84203abdc5b12ac2c0e9c8fdd15d1eefa86b464ea
+d60127e71e62feb7394d5b99d465cca9022a4942f9e8f6bee849d655f6e52dbf
+26188ced3107e70480cdc5e7eb3766fd734dc86f86f823c3e5c0bc0afc0707a1
+33663995ce61372981903adb5cef4df34a3b891cfb8c30ec92c4627b30078643
+14b9ef98e4acfbb87a6912b3559d58dfe7288402bfe33064f126a2da07b981ee
+0dfe84cf8b2c72a67ec9c94039cba069c3ef2a24847a72d01a86145d0a97be64
+700effa830feccf46541278fdd3d35d082ce150c39d946362f3e5d23096d97a4
+76367bcccdb04e7ef9c608416adbae868f8800e645a80793bc0ce0e648a398b9
+268f697af3372197c8b33bd2760b0e75f7f38a6d94c4a52ce711c3ea21292bf3
+d48ccf0088c5781979bac62f072e2702529e43ff4bd63d94048a825882d6311d
+dcdb6f2de1c3de60cab153c6f48f5b993ddae60211b154a5ef0fc2a0c3d18c90
+eca4e35b8796fe6d99734fff908735ee111af75af45b6665b82189dd3c835ffe
+b13290cc59b25161908d29f385b517e85401222a94e1e5f139c5c00b72d5d4a0
+f4b1fc8dd6af78b00442b19ff2b9e8d87b0c33565ee49eda9a5e3d26b7c7c82a
+ed94f162930ef2bd23fe4628085a3e7c41153fdd1a335b994b9bb10f6cfe6ef4
+2cb7dc8f3ce9d8458f560fdd41c6c189acc63a0c38e38cca94560924b4de1e59
+873896edc1b8d0170c7da1af5908497d4a48158498d8c23e49bc813eea34a1e7
+3aa06342b6f1c7914d73c1618d856a995cb51c407b2f6ab72f76ee037547279e
+336fc3d223ede5cefd69b5c15d3972b2f06ffcba1dfb9a0c9f23c47f369de28b
+662cdf284d112ce70934d22e2e00b5448905591d813e0ecba462d5edcebfac9d
+415539241ac5e4f2ba785515a78b7b009b4cd20cccdfe4f5d8390f9765749f5f
+d6e529814fb9d54e906bc323b160a29c65c60bdb47083a378727009feee85acd
+ae66a691a76f7d58d031692215c3a82bfdb44cf3c52697006e8a5899a78aebea
+ddd3b4c4c8139a0fe0ed2aafd845adaff7b26ef4c318a568dfd89b5060b20c4b
+3c000b7cf8562fe82185dcbb58298decd616f6d9a0e879f1887c1605bc921f72
+d6b7eab7a44a883ba9f1687432c498eba28a7e650eb7b1d97ecc72c9fec17047
+7c62e050da13dcf5f62f26e62f4025ffeec90ea5ec51a2326f5c08bd1f7ebf97
+483279163ac37bf0795ae19865fbc560658c512240d5771ae5b8da18ebd3ef91
+e83fdf9d32e40ec1e633733ecff3ba66190f94f2b5338fb7d0be162ae41dcd46
+388bac55ae53b56e308c714a91ff676ae87f1e6a478075e259e9148d1b60774a
+a1bee100372a7e29379ab244c8c4ba555f5d77c3d98f22e80f8a255a36f1faf0
+b2fa0ae59c61d33cd9e70d0259da5d93f19bfaf6b19df1dc35fc783b3939dc8e
+d93572299348201b4549a05f316cad76edfa35467c4328df10e362b91aaa50a2
+ea7b859a5b11a9c5e9dd49a2968913619b57b8a2d6319ea4f102d8a9813d6c8c
+3dc6de3091f3a4034078f15dbee8514a59e6eefbd5559192d86c7b55761afd5a
+6e97279028aecc6d391feae0deac7cfe033e9e64339b0e581f5284bc81cf79b3
+eaf122baeee10655aca357383fd83d481291f37c90b8737d16d3416af742ba1e
+db69f6a73f16aa2f7c122a2ba21c499818774d11141e740d8848ac15d0acd7d3
+f0acebb718fef48afec1dad102e364a5f4624ba04bc3d87fad0798bd45a99923
+abed715884d93590752b7f86a3c77b14543590eacf229f8f223b8e9a22eddc3f
+a2907482fb537652ac3f6df21fa57cf44ed6b8ab79495771acbf4e99c1451507
+e949dba77ffca3820c50570d56e1d49fc4e9d89aac4824c370ce8833441f8b02
+d19753daa907205d4a7fdaa0fa130c296cb7b345916ffe0cdd15d92b7521e46c
+93d5b6ad6c39e66d5d6a254bde88dfde11fc1e0a15ab05899434396d95dbd7aa
+fbb7e1335de4a13915d33bac3f4da705d9ae891eda4d9ac185a9fe58c1ef7ebf
+bd73a418c1e43ebb42938182c0d905e79506f642ec70961d096d6fb73be25805
+4064c56284f06ceca2a7afdbecb611a0f67e2e3ea52c186384f7713691c8174f
+0bf24103dbab5900253a5f424e485c7c27723fb555d0e2c8af7660a5b914e044
+51d41fa45b17eae3f7815926098fb5346d527a7d7db1cbdba966bea36e6b963c
+2cd8a9f509319cc9ba41eb6ac29832c8be17776779f8c2d6cedeac81005b91ba
+fc8e4cba19744a4433c91319ecf73ac1a013554ca0ddb4eee09ea087fc9b2596
+5a9cade9dc4c9888ad0c9cb468b33bb95231646f016fe42b2b2749f77f6cfbb2
+d4b131c98712e2df5d1b024f9f22944fdaca133567d66fe5a87e734b958bd292
+4d97cfd2c3a13dbcac7a09abf9b153549d9b9c078813f407b9a9d8afe99711db
+00edcbfbcfbb273d767e4c4334d9a91ae12522eaa15f54f84e2f9468b8e74bf5
+e74a1fbcba022550c63a64d85c5eb33d02ca6c0fd1f5a9aa46348a953aeb3396
+86a46ce0a13686927c03fdcb24ab3d98f1a4dbd8e6b991bcac96bde4603a9f1f
+7859375319a6a850dd327d7d745fcfdbe437255a3566e9edd14af6c2e3444b1d
+d9dbbcf70cbd7fc5b947266938c04c9f63938e88ca30e4d636aa9cfb2daa861c
+3874cf2fdbc490e32bd6598ec696cd7d58da40bfcb6199d24f07b283b4a9a9cb
+9b5426be43b4d0d67dfd8d88152fa14b531d522a9fac6cc79d2617993d95dca7
+d89b8d7efddf4c29e58cb0feb70ba74400b8be82c0499833253934c7edfe9e7a
+90a004c4ee1c7e3dc31c24ad166cb1320da8e3bdd05afcda1492bc34bca43b5d
+32d540f77fcf45d879a5646d4a4604397e37fcc732001d0af721d7aaf69952dd
+ed912594fa9428a20fe0ae76e8401a9535f38e448f69d48bbd770f23ec075d69
+10bfd3604a1dc79f2a5159e8fb26b4a3eba3b50cc46e84e4ad657fdb0d254f0f
+64e37824ed4c1efea12231df670dbc1847880cb64f7f3c382b88e183de261485
+f7e917e67ea381a568ce37212f8849df5cdd75575ebbcd7522e1dc3400a1d8e3
+8e09555799cbd6d3f488633a9e3bd4a2f6f180e1d27e0aa3949590cee53cfcb3
+3a14fe287e8021ab0777baa8859de5c21ed2fd8c3b818968bc26f5f9fd712eb9
+424c83d0ad28b76d1f5ba1678ca31925d49e2786356867ecca08a150a4591523
+964ce4589563210507493b74148ad80cb3c171e22f38e73a0aa59f13c839882a
+536c00ba899d409a98480a1c7f82a44c36698d8ba5d0fb8d50771c0e91cea55b
+836a946ae06e2f0c2275db32833265402264e2f6a1c8b896d5ebfc7c1872f2c0
+b4fcaa97210160403ae0ff1380d7e68251ef7c25e0a66a312fbad992aa1311b3
+61cc5afdc82f982d7343b8b7909c6c7171f568eeac8bbf8b43dde0d928e81c86
+ba3bf4549e255adf55d6e5909a01ce0b270f53169f9807cb9c7c70f3d3a569ba
+8675d0f345f8e3a00a1c6ec27d5f83d275358830afdfd12cf23a0500e2512fb2
+faa9d333566da5a65dfae8ee515ae450ec5aaef7374ae1d598d5cbf677b85dc2
+e0394ae746b8c9554581c737d79b31048f4471d72972fd34bc2662a83bebbb32
+7d3e2c2bd7c65e68672dbd3ddc32bcc31b27812a1841c3edcecb723bbae371c6
+70f5dec75dbc9dc90e557280a836ce401105aafb64deb25e6ef6396da68183aa
+a39e207a4ed29a41d9be11cfd888c1e7c1c5f869ec0272c7be8c85703721101b
+0d41921b6ce168b781b1c745dedc1b8fb3f8fa027b0c2f63aaef59bb3c485c1b
+c773e6c0672bd48bcec83042cad9b3058b14f14051906960602293261be27514
+bbfc3b41fcfaccf05d7eaed0f50b3f9d85d8bc79288b474094ae92dbec3b7870
+d16c92d667fb2074d176928ec7bcf3939f665b774762ea69b989ee8c8334f20e
+3451189600c26df2e3a2453057dcf2562cd28a8d04b101ef004990d09afbf7bb
+f0bc3b20218d3270e0a3e3446ed7ddfbac2c37c5bf8eddc74c008b170d912bf6
+b1da8b9377005a6b6fcfbff04d0250a74b93a1437ca0a7cf497637106c239017
+160bc50eeefc55e12d6c3d65261c238e00b0bdd7a7c0cab8d1e3902ac8d22a11
+a7ed80dc0dd04ac63ccb08399b92abe56b4cb2b29b2bf5bcc4e7ed008bb99881
+c74036842e45e41debec5cd4c652d37ddfea9049fa439747e6b700f7baba635a
+ed47282e91ce7eb743571d533b7eb9d09f0c70081dfe408e503f14a0e117196e
+c1e7960f5bd60a1f5f076e31c6ca28c9ce51061d4bdcf5e35beb3622e3424529
+ddead48eebdafef6d30c02dbdd5f1b5c00bb52266a8ac0819fd60371053ba1bb
+80a8954a4eb7464618ff70369083068f1b60f059ba217291b6585d12f9046aa5
+e66dd926f9d802e694ce1dcd909ecfc14b5f3f44c4f73a0efd3e1422a747a308
+06ead9d72deb9fcc1a33617fd94ce9cf6e31b027b86937d0dc58b350a3230d24
+2596131192677c84137f034d015613e65e04fce2fad699826a666ec8e1f758c0
+f6fea6d199c6b3fdb6b81ebf80fba48ee1192e0731eb1b6f439f654fe7f419f7
+618e1e00dbcc0dfbbd1897678a9e4a6078273233229035c98b0e1fb4f4ba5102
+91d44e807c37ba07dbfac535c9714fde3de3114776dc82e28f7906c342ed5688
+44c2f06a45de22c2704f3b8c6293626fb9a018026a9bf7f688dd2c25a6f35845
+fc3bf34ada6e71c93249a8575cb6753fa9d7d8a2b10f4b0979aa234326185387
+63a8a532543e427ac650c67aec94fd5f67a697d93baeb2c8d1fcd83f04de01be
+37e4b8d966f5d91818b80bba52c34e80897521bbf46172c89247c257c77be91a
+39c8e4b4eeb5d54215def158219b0111b7f9a6c3c5b32945a5da895ce74fecd1
+c89c2a3933fdc1183edfc2042594fb11d3f2ffdae852be0443f5c37765b3aa75
+2e94fb1a0ae436a38a5178023601e903851f015d1a74d1d132366af6ab2e78ff
+5493e19ad35553ca6fe7dc51b6f5dd62f22058c35f2b0ec5755aea9722491f8e
+6a7f5d3e855f56533fb9e5775fce5aeb0ed6af76c3e7b24eabc352548bfa2550
+c66dc44b2795ac40d1223b416c798cf1c3aa90a8b404bc4926b3bbdfc2c8a995
+823857a98bc528813437a0b892530fdcd05f1fd496340f528b8bd245a7cbb8e4
+a77482da0f6c2a00e492d878a13efdc2f280015a6864657ae3226ca00477cb3d
+c5ba741aa7e4bd3a876c6d7100564be6f6a2de0613ead5f9926c2e4cf5acf5d6
+5035e2a79e286ad6fb4289ec577bec28f51a8bff37423f9f0751a79b91bee5ef
+1e18ece169ed2723c9d2103b675e335641cfe424360ce2503ef49dd8d158b8fa
+7c3d6bb8d1d0bdc607a08630a67be00625786626f6ffe698c3dd414215b56ef6
+756720a12c1c32fc363db28ae0e206181ea32fe554972e6bae5fa7bf89ea3c5f
+85f8b274b9fde63c7251e43102fcf4aa7180ec3829c55040bbe511c619de5ca6
+95765172d5c832691f6c432be0397bc401e2e54ea1b847bd63c85c5c9f62cc5b
+e1ddb4ed907938472ce6a6a3cab60495ad8d5967150732915fbb5ba40a8130f0
+5df637309f37d4249298cd57619452601dcbdb1ac7f022f6a024d7ef53c0eab2
+b00ec3212764ae73ab88d18806c1252d0ab508951bdfa2afb67b9d5a1460c11f
+c24eb5ffe80440260d212923432ad3f3f9b67b58462a66e7313e5c886a046e34
+80a23e08048ff3c918f26194066e29c36841b547aa3e374c1bdea8c9802509e0
+e787ef0aa8a9955e1824d0ff95e294dddcb644a292e91e8f00109994cdf9681d
+c84725604b266b8ad4b196791f2752662189ec0e9fd076ecd5233b3a436f39a0
+388be1ffb33d075e55a4683b9cbe917b06c1d18de8f08bc06df4a8946869355b
+dff8bc9a240ed22bde34f932d90ad2994c7b001b55957b9dc7a7931d1a87e215
+367e5b424cb74545623d8aa9539b66803581c1746e463079f3b52fdad364eb68
+58d70b9835b140cd6db9ec95e50a64e4b88e88d2a79fc3cf7ffd469801bfac17
+1373ebfb52e32486416c387c27f0a455ae5023cf1259e691cf5b5b339a2ceba0
+9a2c556ad65734baef23d18acb009564a661f59e1e93fc163dbd1c0f2fe231a5
+8aa558be68f033d219b0736b42a0611fb15916f3058b3acb9f9fd35d81d6e1ac
+665a358233c0aa23367ec3adbc777539cbd7bee88e68849bc91037670e8d9df2
+5402768f04b5fcf34fa8f2153c37ba7ef356b669b5cf4615b745d8b9968b6009
+bfa5ada490637faaa554106d24d4e755e4f9f3a9f52a1b15a61c35b8ecb983b8
+083af04f9fd3511fd8d36f2d822dbdf884c61627d81020a0acc19f5e36099daa
+53b0d6d98d0394569fcc93833b89f87e115f5cc26317196ed78210afa8a5f0b4
+9abdf7ffd38a892bffcbf30064176ff3c7fb3030da4afeb5af90610abc321319
+020412a91fb03811741e1b0ba8a8c93e59161eb5b41f82bf41a5c21694c8373f
+58e3d1dfba33a6c5665d8b73ed95c9566d67df8456b2f61c559b2e8d60c6e2d2
+f1c85d4eb1ee33dc4718a4f37e6a5b965ad32f8d16cad21d98ad189721a79aa5
+454249076a91c684fdda1a1eeff70dd07274b8c402b6a37012b89c0c6870537d
+056fcea0c6fd79efd834fb29f8ca28c25c57de5123c540750972b2bb08311835
+c11e6a5bfa0c31b18ca3f44899a8e160d97715676ae211ae8ca83cecbc6bd654
+e1422aee98c12ed1fbfc834edb3229c7a693ae4e6c759bbf3cb496672469d856
+cf7da97eab3042ebc9bd3b645c1d314d3e7b38087a2b0e7f5aad5e880a4adb50
+e2819b638eb42a2cc2c3b84a27eee2959e51811af80b3abb38900e48a8bda718
+078a5402c724cb4080bad3657b1bab969e2f0a2a088fec1ad16c2f7100370b95
+62753c659fe32401787f51e1649274294d3886e7fdeed53adfc66efa195a546b
+05bf288823b178a968a20f8af64667d75e3e8b1c492b571aef01e55623e33e9a
+f88bef36a34d620fcc742244482747708491a1c56611abd75cd8964155f602bc
+60b24f38121bf53748455bd660f17ad52eef19ef0d16eadaba48d5b4e0cb0422
+7229961f8c1d14cf17a7e88abcaefc3eb54fb656c105b2babbd90dd6ff7d44bf
+9d29c6ccb09b5c8ef13515e6184d15939fc90aeb78b4e064e21e2d376dae6dd7
+3f4fb1442ba15e9161c62cc93acafcd55aa333ca496803927d4e40371cd7b5ea
+665113de3b56993e991c966b7777e80c8e0b82dac778254d6d9b3b4c661db3d9
+f2cf96fbdc16a936912a0781cd61af375f314fd8933642fa12b970a75cb813b2
+7a2e900a742de7d1d762f780fa3d29637c1b7dbd66b7d4f7aea7a3f51a6510bd
+8dcf5c4dc4b5ef5139a7f3f0f654588a4848e9d642676ea145d5df301ee491bd
+4784e01170c4a5a4a0787f83db24931b5d9b761b1ef47302944b8e689d56316f
+80cdfe37424c484c83c02ae707803169d1547cbebac170ef5779911878988333
+1577c0f514131c9f94914d942d0b4cc6d72a9d06c250e0454810862a0973ba63
+8ab9d4b424ed51d5abe3e39f0befae042437bf1acdd364d20d76e3737956a0c7
+e666ba52a889a52385496273bdce52e307440c4db4a70e7a6da7c655469d060d
+4353f090bd41f70dbe4b30f33c00d8964f64029c41ccae18243551afdee211b8
+9744d966c63913a6714ee2b4d1b82fd0aa1e6d2b296da04b3377f9b621f2fa39
+0b23bfa275b1342f62e6dfc4e3ba85dac525ace7cc2c170157b32dd13ef9ab65
+63c62e6c44c45affa457d12f0a8fc23e1e0cabb5927e7584fc714d310d3a5c30
+71d204f98979405a0edb83f468d58f0cd82ce3d84857f928124b5d4d592c2dc9
+196a7b32a7b8ca9f3877a9d6463f1a4eebd736d02e543d2ca7675702e06a5c54
+08f5fa709feda49a9b7e202610ac9dda957eb65d5615d91c2fd66c35b88ebd5b
+ed398fade31d7ab65cff138e211f9014ac86a994e58d20183908ffdb55f64da0
+39d1a1f86f28d18f9ecbdbe7f6abebb2ac41ac88e385c64eda6fb9f73c47c6fd
+b29f0b4dd0595e5c7f76da3ec7b81da2a516031bb54ac9678eaf2c16999e5181
+1af80b3abb07354a786e339e812ab142a59004733178d3922de9a23ade1bb2d9
+23234fd2a2836d3c99f582778cb069c46ee8c14999748c93f7b5d0b607abd3ba
+cc79739ba4bc945b8cc535ec56511c8b184569c7428ec82f5ee9766acd217037
+2b72cf351729da098cb6323a724db4561045f239731661d2ec26fd014f57bd27
+07948c03ede03875bff01c4972530cbb129359826e1081c9f2fccc0d9e6098c4
+4dd980b1988c77bb4e04962c501fd7f8c5d8cbf00e97b2020d75d1d73e4d19a4
+929f282565a130474ca0777cacbcf429f995873f54031469e3095e39976a6877
+92e3db78cde4e930213f64d8ada47874900a2fb611e18c45dbb8e219d44620e3
+151fd42a61da68301334c7c8883c800e7a851ef4072aae38076c4f11418443af
+7e22c10fb99f32b8ef835156173e00f37a1457bec7c74fdf0af7f75fb1cd15ab
+a72c0eea8ff66233b2bccb79ca66860a3154a16bd31283d0ebdac5fd5f54df28
+190388468f1a102a99b733781b7674dbcd9faa280416923e7331b6f407d8ae09
+5a380d8ca81de6dc066ebbbd1341553fdebfae0e60aaa229d6a80a419991e8ac
+7585cd947f6e026f6d1abdc3ebf4280d3292948b1ad434f26b98a05fd19646d6
+88894412749bfd5c15d963696fb5b8490eb5d0eb4a72d15be972d115db0be268
+724bbc432e470a467971c3f18feddca78ec38e60c79fe265959e82fd986918c7
+ef5b7a72361ab3249272ffb6e55b5608dd6c0a4fb1b72b50430f230b2383d8ff
+bef2b686cec585676616033e1a0c66287d6803376e5d8e689980c3a5bd5a7bc1
+ce993e47ffdeea6f94d8c562d4804034a3b9a910c4d567ba82af21e4fd778bde
+ca490b1c5e4982fdebbe4ca4592da9e70d5fa99fc17ee11963b866f7f62efebf
+e30cd690813542f4fd8a14b43ca849c323c8d67569d279406b31bc066e8a99b6
+284586fd6e7f5368bfca05466560952fabe47658cf67b93207b004a9e7995a8e
+49c81472e2bbf23fdc86466a6151e797bf086f32282a9e55749f94f8977fac75
+e2aa9e4af7784c533f50c8f1eabb82f5c325f8b89604d635c05878ffd17e45c6
+5f71425cbd6df1354f76a48ccd20d009e6d7a866bfb654fa0b1f4c1003f96419
+b49b5fd675698911d745106d7bc1d14db6d182fc82602ce2ed91deed5a07e683
+36c1768e8e0a87e1e112fa37aca99b4d37768120930c71cbacf45b58f70f767b
+3db154fd31061251ab484ce619129b2d5c13a76bd15cc92d68aff8773c65e212
+399c6d54cc6a5fc0b48ebb33b23b916421dfdf26d4e8afb814619dbb9dc67a07
+951192e58ffdbecc7bf82bfa10d37cff66f5b211da9b7424fdf504139e6e733a
+b1179cb9b56cf570f63aba413cb12872ae76eeed4ae160f83c977282f7c9a692
+cafaa72a6d89a9adfbc498625cdcd53fe9fe591ee00a625b157321839eb85784
+775665453d8187cfe0aea8a671194ae185ca9db23537356c9061d934de5249f0
+2ac01055fb32f110ffba4560ba8bc94cbf657ba57ac8f524a2d01a8323326777
+b6ff3413220187834e45da6076051cd695b1d51ede7348cdf8e51b675ca293df
+dd1101fc53db5d7f8de55ece38a55e5528cfb4e8266df99d41ae7db821903111
+bedd329b1237bf7468ffcb8f8ced0d4416b36f7b2bc0231aaa331bf2474f11f1
+3657a008f9279855854ebe123ef3918acf58530ff76553394ef3e72741e9fef6
+ef6aad2e58d4ec10614f041698e78bbef2456260e6842dab488d96d609f4c77a
+02e18dd13549d77925abe02fa098e923baaa3c0565028522fd8e7c0cd85e15ab
+18f37d4ef871b91a11b2b5de8f5faa21bd9d1d312d923964c2f608708aeb6301
+e31d028eeb41c46369ea39e99d0ace2a3739e5f8db16e86615c56eec5ca95f6f
+4195b39efe02a7ea9a6e7941baf8332f224bb9ab9ecb4b0dcbfba8e084ec7279
+24a004938789150a479da66cac3b054d108019b4745b3ad8b87aba19b39d00a6
+104e04eee9b26af64e338bf34d109b12b79fe268ea224a827311479b3a3b527e
+40e7e864ae56cec78bc5a487590e0178a8b6fc25654c60404661e09c1f82003e
+eaff3a58c0c3730cb34415c85a5a1f18d71b96cbcefe4685609aad50c106edf0
+9cc002ebd9fedff5e401affb0047bad90130e144fbe267234390b70f21d8dd18
+c43340c360bbbac5e15a745ec971d3fc7a07d78d9414e37ab6a1f547d7630c8b
+a657883d45e788c499157b37410934f73002f10e6183b696b1034248e449ba93
+9178ce2ae5249d4a4db91adf295fbf3bd72d201e90750a60d9224da50e2644dd
+6904b958fee6400b27cef19671c51bdea071c494acfcd1cf8d85bafbe9b2c3a3
+f39d120303ecd5636e6ea61ebc8af0037be2789d8d885953687df1c7207589fc
+62441bcb3e7b5fb34092d8f062aaaec579a29d0ee2eec0530eacab19356a0587
+d143aa46fd5f7748859fb088646edc3778ac9f8cde1da8684d62feede0ed12ba
+3e4efd2f1f3702edbba6f881e40b91ffe0a10ffe7f52f14bf975509bb43b2516
+e05ec913fbd145e7a6efe70d770fcc43700e9585432f78e3cf0c98a8c68d738a
+dec7a4b809014ed76cfb8fd1b12eb02ee8617f94d0f3a3bd273f0675c2371410
+42201b05d1d131af293d460105f728afba25e65d4f8aa3d1959fb4e6166b6ad8
+fc2d6d41f5b1d11143a7fead000e9f46c3a6c2610f013f39205e4dfaacbe7bc9
+dc534ca456f44f95ec4e573ddc053cc124499e20ef2ea5c4989a9fc053b48a87
+aa4618e403cebc2c398af7ecd2d4aadf65363842e27bc5d20f24ea8ed8bfb829
+506d5a1d0739cc7e5716d0581618a1125b87da79e086d52d030603da88493d4c
+14d99bfe5a30e955c233d3aa98f4b447aab941f069dff47374825d012b053733
+922c16fcda14aba584899d2766f4b0dfb3b2bc505149aebbe63a9ff68df22cab
+1beb9476ec1b69d1f036f3abf79799e6fab6a7fb7fe7f61878642b5a8fcd62d9
+1218e6e52585dfc3321798d4d27b147be6dcffc1bab7c372570c5608e0236f26
+2d9e81d2c11c06e453f40f8453e3a4df34fc0dc124108a9cf176d41f7e2675aa
+030d9c9a0c3eee010e2e6b53416b07a07addc43e22aac8a78c89f687fcf10924
+2b8e323b666063e23de1fb405d213567807edc2edf7955f4ce43938afd21eba7
+0239d81517b14c34a320e62ce46f48b10e3b8f0d443cda27717a5a416dcf968e
+93ccea00568c42b31dcc857ed537d1c32d4583ccacc21efbc9efd7cfcd22a88d
+4594dc9c9cce5c6dbb68a6b6a86568712a79321a3ef48335fdfc2a3937447b89
+d43a2fb9e0ec41085c249c571af59b4822519aa496da159326458b5168d9312c
+13ff0b9879a8c96dea99cdd10966071b12f2a3f75ae6b150bbd0e032f7a2393c
+6afbc4ffc9acc38afe90606c4f9afb95b5c2aa160539126dbdb2ae9d61e5c4e0
+ce260ba60a5c289eca44c0898637888e1bbaff38a4ce83a342fb92c64ce086a8
+5e6b0048c4282631bf1d6a42dbebc647f77e63429b18cdc8e89b2d0ba8040ba2
+7fc47879bc4eec51e5ea8f4b5628929a0859483cfb2089660cc15ec5d9dc577d
+6d69a076ed24e02e80b83f1444a1aaade36129cdd98f91697f0b28d53a56418e
+ca65cd49ca8c49863a8f066ddc4ad208dedaf2e54da80f294cb0211a90340771
+aedef1185653f5a2f7925894404a9c12a50b6e8615c2e5f48de9f9270d79c70f
+61599223c0a8e822d8c60c56fa46100f85e5ab43fd7dc58b8330563495317ef5
+8219cecbea2f11d8f24ce226b52fe0ac472069eba02e29655c20c272eadcc1c8
+18ca5a0e46eae3a5fe1f050fecaa2485899f8a53f4234baec7c38343552c1577
+10c72838c76b82bc6a323f1d8dc68ac54f8d468da99c828ded907e6f7c1e38cc
+bfe55c46ed3c2676335891a0e3f0f3e660435607a996030008f28fdc34ec67da
+c93e7062c6b46c6149ebdab9d8378aa7443fad6fa5fa52d76834aa04de524148
+e5db4023e4de3ca44d245b94d6d96b503c14abb03d7c2207f28439cb338120a4
+da8d30c55cc8976c25dc4affa410e8aa3749a6a08b7d37da55d8fe73f95d0b0d
+3c6b302a09738b28b703c31c3912646b2b64bb6124ed529748dcd032b4832174
+38c51c3dd591f4651a22f9fb00c91124c84d8717c4313437c014da2e72b62f56
+22ead7a96d0daefe66dddf7cd9d4f77eb17845958bd97249a5896cfdd57c4d8f
+24e3ce5dda5629409f881ab5e8498bbd473e61dd7160a5eb6e6b5f47c2e3de09
+3bc622e2d1aa235d4eb341ad4277c1d6261c77bdd27d14e8d0f5a226957906b5
+f6e86f1a72fef7d88a90bd711cec812ef92f08cef71eed903d8924f5493aabdd
+94cce69e2d4b04f111c63557f460cff4702b46f2e49195eb4f749dd4fc67070c
+e2770be237fc41a300600e8e4363dd2d57da17ebf287fff4b3247673b662c7e1
+eb74033ddbaef52f8a00c406e7b01875a54e2e41b9149cdcf919356aacb0d2b5
+88cbf5fd0088a65b789e51d2a0ac37f1c833d62f022eb47d0580e04932cf332b
+b7c6220ef8791981944439bbdd9934007dd5fdac813cefffd522164d16727705
+7078e41788ae6450dde5753f39edc4bc21861024aef6145aafc70d0d3c7c509d
+5662ea004699eba1876f6fcfaf1757ee7f580ad9c071ccd3d02bd445a8d2155e
+8a1bf1b8663af3102b1fe47a14bf454b789ac0c5dfa3afd8a47c55a7f1590c2c
+2f520cc3046555f35bf8a847041d54ef6babd4c91fc786336ead55c3e83bd9b2
+fb4b4a0e84184f0bd7130800760ea587157e08d5a2390f84359dae2b7ff1561d
+94d8dbcb34c98db6b45d0a593e2b0cd398e1a96dfa93a7ae8e7774ad57cf2ca8
+1028349f8a5feb9652f811221368bdb34eaae8d5e2e7e16cdb6f64ce04c37ba2
+4589e43481d723051f163789334a5bc087f2796b96d58cef21d82d0372a919b7
+93d782bee7cd8e91e26166f2041e371464ed4cb6a73e08048ff3a596f4689f6a
+7b09546d8984ff5931a5ad2c772eb59ba1386af0281de907561423ebbf7fae48
+225a4261359bb445959a50a34d4f6550a582d152a83066f90cd6d99029513b9b
+ef7f182b22afc41fdc2824bbee4fe2c53afa59ed68c9c2873aceb7e4354dc0a4
+75c03dc0bfa5697b7327661cd4f1e61471c439365707afa1b73377bca188774d
+a8135ce7279ee809f94a5de196b97dd70e89a152c11c57b88ef540ea1c083bfb
+3c99faa22248c786e216dbfe8fc6d60b3f7a5e291ff0870c61485a051264e213
+58fc910521db6766bc77721fa8ee503e40efc848be05822ec37f4aef6486cebd
+e693d839b7bb902efa75ada15cff2040d1ef45feb81f6f69010ecdcac215f5e5
+f11186cf3dbf369c11275a1874d4d8cda1e17565bf6b7a4f22e5f7452071b3d4
+14a1f17bb32ad088a7751101606c6881e9d2c1d72d88e05410df086d62936262
+5bdb1fc4d48bae24abe9a8c49238a194b009bd7049914897ef28879f14366e1a
+9ddf1f3bf2d55eaee7676cdd6fb111eeed0b67dec4ab583f53030cdfaa800a71
+cdcfc5fd361dbca0ae02c754ce8de1a2dd4d19d8d91f338b4f4dade9a5f10f6e
+6a0201c2a7a11ffa5bf843881b5fed41f778111cfbaf373806c1fe279a686b32
+a8ea253b2dd83d6af13c5111e1bf990300fb337672df16d47f9b988471775229
+337151a88011d68faa093c4439185ac1d4ab96c945a363cc9b599f1ea0b9a4c6
+6a53a7e5c49cd875f0565a693a5b99b4d70046545549e32e32173d1a33660de7
+a9104dc3cbaac08b6cd22095e7492aeb5ac369cdf9a5fca87d343af87d625d46
+b465d0fde1a5e425f6e6509808a775bf65510d64ba9f1fd4cf83dc244f637c05
+e108512d9ddc088f6fd41a4f4185e664cd906fb33fa0ccc4c3c0ce1d546fde4c
+c06919304f2fdb24500aa01a61ba0c365f6ca1b57bec0795850c6bbd3eb63218
+9fd7c118689b7a17793ed9d2165a51d563a96bdd2ac062d0c25e055e13965af5
+c140014d039ee059075a208035a5e9acdaeabc61b08ea51802be6cb592cf1e8b
+c276d2ce5f4ac5d914e8f8dbae3799372d0bb33ed94f8077bae807ef69a07758
+d442ffe74d01f6f960b8938140e83f1adffdf4f0f0393e73ed41bb2bf11bab8c
+aeabd4f54fca2aa26bd5bc52dd3e4d5c598e3af226deb96c3efc96c479e0db19
+6bf1debfcc4bd8bf05cb0e3dc04be5b445881266b74eac4595198addeb53dc46
+16781a275a481f4768f607346db394fd23eefc63e946a4357e8da64ff14813af
+0a06b51e6f9180a48cfe90f3c9b9eaf82823213d605e56359ccd898414fb088f
+6a7c483928d5ecb72fd544a8cb46e832b97653efa1629c4890b90e02b9e54ab1
+ae990473adc54d7b687a9c559734574248005dc2f125d7ebe7040eb23f4927b4
+d376768793b666f7acf187b985fa099b8890cb17e211b67ebd09742f06b224ed
+96a0c969d8bddf909afb02bb05cc66ac0a5bbc9b80cf09fd19611da7af1ca69b
+87179d1def40bbce64ae68a52e41978fff34f91a2b4369f0edfcbb7749b042b0
+d9ac767cd80d57438fe5108b4536b72e6e5e504a6e5b4cf70ffadb19d502bcdb
+e7e3e566d1269d0a9631776c4f5c52ec3c98d63f41fa32ef489b5b697e2e4998
+3da756a7791a3a036c258f59bb22ac004c821ade383830f0277cf580fb1e8972
+7c75a27af24910a338df6a4fb373c6622fbf818cd71a5e891d19aa95a0255968
+619f356d84f6b430bfda80012396a2ab3bf91ace171a6b3f6295fcb701f3573c
+684f445ee96b38ca3b53db61954b4de9250c487181f548bf9b2a20d62bf61c23
+02769834fc84af37612595d6e57be1c80c38e5b757b99c3c073a490356ce8099
+ed09b5fdb9c9e1d9f9219033d200c9e5b31846f4c14ccaa679b3d7fe2fa688b3
+7229c69c984c5982933f0ef41765b1c1656e4fc98a2086ff68b910391aae365c
+1d88447411145f885044a11f3e11110296d9a81793ad31310c1041fc79c337f0
+9d2f073d28ce537934b841c41bf677b24ba9826b6db142f36886f45162ec3679
+fd46d7a7c219182cc2e2760d8d2de2c975ba4d29ef94b65ecdb2bf1a75a8459d
+5facd5dae80fef1ffa72b0824165f25e7a47b100e1aaa34192d3f017fe5f11a0
+a9bedea570c9ccf6f8d18f5ab47ec271e5dfe1d4280d24f76b471e2d1dda8313
+4e0d760ff6f5673ae87466ec2e66e7ee5aed7bbdc5ebe9c723ef0e0bb20159c0
+d41ab0a2f609a0066f627fdb132fabdc28d067a4fa8f313421d5096071b17e33
+3311d9e905a42d49d9c6c2e3a09e7afe91fecf4e1ad5e6acc6ad0c91a79d3046
+c9ce741f9b2796f2d021f8494804eccd7e256fab1a8623a014060f0b19b7154d
+2aa1e772c9ca5c68b6247987d190cb0043a9d2ca7572bcb43a69503570b2a374
+3930210d268fa1b528ba3a2260e6363df7012857c411dd5e6dadf4286ce805a3
+f03295e3c3db0f81c6e4db5faaac574ee227f7b3c98f4b738c45c9bb39eaa1bd
+17812d2cb45fcc54ac785af72420ba310e3267d97bef54c29315eff146b2867c
+d300d8f6c0b943e2f206a3d14c9d8a9ab4358cfbcc9cdcfdbb9b2bde4aa8155b
+69c929f12179006235dd1af1a906d9769978fd90e21b9e3d2369f21f4b9e78ec
+41a67909a2de30cb2bd2c10d2b9a6020acad882d6ff778c4a6223899f1832b52
+a23ed654236c8e09543e2c6afbf03f4c1a150c0ec1563db17931b1304a8248f7
+76fa88792ec90a34d39f885c95af9ea39ee8e93f84a9e66785431a7a99a52bef
+d1cfe2b871cbd391e6b3cee6461e42d6837aa46d632dc3c302f07bbf934244f9
+77ce851023a129fed5b480b3bf8321488939288de6d054a55ed01a97a9f6364f
+7fec9ef87b9b49b1edbc3fc5e192c6d9aad582d2fb1ef161bc2ca9c421ad5bbe
+33bd0828d5228cc9b4caa49632781511789186c3212437e72e4914d5fb17698c
+74978dcb5f89b066b8804efad90b3bb8b7246d4943c71d54122c2a36d9f71f87
+c3c898cf272e017ee9e2cfa8a0c224da23a460a96133b13f7821119627b325b9
+bd2fa8f30977d85c690723bcfce51694bfe89439f2c39222bca6dd0c9215cd1d
+6b9bdf9f912c470d204d2b7b5717e018e03417181fb10685d9eebe592ce5dd6b
+626094a06dec5a89b7795d789519ae31f43763828d6075eb023983ff6fce4e21
+25d516de3b380f04c1f498b846d945a32664b61bab4c28e68ba4037a8e462be6
+8e5622372c5f8d56c2b6c0cac890918ba6995e1b03a4340c9ced6ebc875be611
+1f445f705f78cb117f3396f707d2736be5d32c58d98ba4d4f72a2bf05bd45271
+5f1da83969880e4b580539a3c06d4415e89ab8f17729bec04b961929834c9c2f
+05967038a7100bb5812f618a084a8d137d8fba8c414a5a0fca217e8f4fc0e3f7
+0da232421dbe0a2fb47a0d078ee4b3b484356ad7889a942fe6b29b4dda5734c9
+70f668a614cba321a71810550a84678e71f43f845cc47b0f4b82418fdbe34234
+0a28f53cae7f2ac0bffc4a9b4a4448cbc7403594b9c1570d475837bcd6277aa7
+8983daeb3f31442d4a0cec8a41b362402b7ec3afe2cc8c4372db07cab32b44a6
+3a00389f097006b1b1f7187b745a628f60f64124e845e16a8114b1d6402d3898
+158ed0573ca935bfd23bad60da9c6fbc0b10117dd56304cb58f81de3fa0feace
+1957bacedced8e8f626752cd755f067bcabfd234d4f551c684524a711a691fa5
+3be61de5319436e86688ef0f0b23fb1a8ade3a78a1348acdb47ca5c327305555
+156c24acc760602f133116649bcc5a413bf919a083c2dba88306dafa66f73382
+50ab5e70ffd8e298883c620d3a37a1dd532c193f7976051e8e2da980d5603ef4
+8bc2518775ff39b5390cb7994be69973e3fceea2a99046cca5d72a5a2e9fce56
+d1f5f31f9d05f4e95de8349a6645e936ce02825f55785d110c3843399c726129
+d7ef56bc39b65f4fe6bdadab905206bd305f034e6e64489b7d97da2d9831c988
+8a94cfa8ad0c0130154033bf82287160ad0340938a78cfa27aa291bf4c0a4b09
+1db4f3322e3f76e556fb16afafb55d9f90c0749636e71511102d3d2cc091e8a9
+bb0ab55707cd2fedca6151d279ca75d90940b3f8ccbff65982143af38d17090f
+02f8d5b6b25e1c49ba918cb6f3f2b9befeb404f150e593162ab14e277ee0ccc8
+3fde67c7778195b795519556db688e4f76a9045e029886f60db89fecca97fc9c
+23fa3c0ca5fefb0de6a923c715e90b8360b85a51dde11776fbc01323b578ef6d
+86b76123e3c41a2e9e8470034c64783072e549ce2949d5c2bf6b0d42836a60ab
+2b51621b608b2e22c16e6fd23a3288c8f721430b22043cf3b48a1c8a74e84aa3
+7a06514ad9f9a697328571e506d49ed1a7e1cdad6e1e9f3f41a99f84ed060d85
+41f56e88cbca3267e0d496857c103fca42fa3d4118396d494c82250c0273e939
+94a09f812dafa45efaaaa6194a234ee39eee66882798bfc41d24cc303f58a445
+5733943c10c0c10f6776b663d0f59286e2a127a906e8d7b2d55654b15bf58016
+0af11f67c20968d2b13139456385cf84430a425dfc6a48066a59f6a91ef3cf15
+b3c8e068b91892ac2218add4ddd8d201579d6ccf3664294bee67d3bbd0b2804c
+5165e37d567a70de26860b8c13e90d280b0a79776ee6fe064343b1350094cf41
+a5dd65ae40fa25a4a579bd9fb74f47114cce0c04e6c7f6b044fba8509f456b57
+81142522088226d82a95cc38a8823092bd3d113a61f6439fd78f70d781b0193c
+773a4c5810cd352d2febf25ec138f5af2e5ac51b4adb09fdbe4ea683922032ce
+1b202d30876a59a3c0009139b87b6cf0c37ca07e0d585435986fe85a9bdf2743
+da27b85d5d1a37de840d7fc2e5d92609d65bab8192f88b758a6c631df196980c
+2fdd706a2d8c28011699e7498aa1c14e47a7a2cbd54312a6c5943ac0a9a3f163
+47eb0d6a10f5ad603c080d9faf3571cd2335fe4d1c92c7315adc25f639a4f0ea
+609e73035bc24bb5d44371f19a7fe7c497be059904606007ad153b59c64bcdba
+e3a613c2787010cdc081df84ad9a44495d78f6440c9a7bc7395d04d776169c7f
+1ef0b7621e2b440a8c533ee3660d35acc3b482d20b3515457173bbe7faa9751d
+f1ab67fe48753834da25917b746ee6d2e30ec6062221241283d8c34787455db4
+541a04752313bf45c844a9ad0a29ae66356f4bef8fdec5741c19c0d2d7bdc699
+ccda2af082f28202f443a789e9b40bd6491e777a49a4be285d5f985583c502b1
+b2d9568e493bcc1498a90589e5981323234426e5769180d74a5bbe4358492875
+337845eea1381ac1be58745711667874a65ef86e367bf298a27b60319179294b
+d2138bab5125b6171150ea426a6158164fd3390cb51f1fbdc930a2c1ff6dc802
+cfbfe3c6b6e34f8138a0880a098992b2824ffeb149d5b136543b326d30520063
+42f2a60e79e576769de0e65da6f65c88ce9fe8d7869b1687d0912c518d1da5e0
+5d4aae80fe32d8f25aeaaf53865e022590056983221fb8966bcf4ecabcc6df19
+8f03ef373007e80e224e1a45e03b957d39fdcbdefe916b32f9afc8a48c91b647
+6ef437aa7768588068977c97892eb1d4b5d1c9c9d49b6ed7e0573345ef971304
+119f725e0f88fc8794b0c9cc35c925e4db50726d82d4788bbf8bca83ec533f2e
+7c19d7b153bf2d4cef8d5c7f46ed2f1b1a6ebc7f547a7ca5289a1fb0c7ea14a7
+34dfffd1543702cbb4b2b67e8cca16e54f971d115aae21019cae5e9b24defff9
+a7d4b50a44aa37015d68f3064f9c3185ec444cfa3af32aaaac7f4e6b2f71f7df
+02ba34a4d51e2886a2517ce0b21ee84b1f877852b3d5932840c14d523576777a
+114d80f83c8b730eb41447bf168c3a2d259851f545fdc15c5812c58c79c8cdd3
+f8e9eca6e2a41b53557beda8f889df48884d521add83e65e7ce4025c5187419f
+cce51c7ee43dd66baf2409b4bcae3a94ad2d99227be325ab135c9b38a8a0bca6
+3bbd58e7f7b0d438e8b01e441786d8a5faa23f6b957dee7c01e2172b09c7fcdb
+cebeb62ede3a36b13a3932a81f512c6ca6f69413a83ee30efb5513d2b5a6d15a
+ed4eb95338d01879109e113515553402c994f32ec590e11f4c0845a6729bbb71
+de7d4893839da80f1d1200a2ea5ded805b3f8b8e4209fc74a16733993e910e8c
+08c3aafa543c04d9ca3947cdba12a285466ae3cfeadb0cef83286da68a806e56
+62ec73ce7913223adf0c88deabfc3c5852ebec0b67c72a00650314724cf38bf1
+eb463820e829bce660104921f069bfadfe4e3454e9d6342abd2b8c5bef56f385
+f63c2e0d095687f04a2bde230fbc1beb95a19bc3ccb0e454967260b13313ac23
+048e48979aa0e379903fc3307a97aaa6933519318a68dde5bec8370956b11b07
+46a09198235e6a5d3a21ff337be92d5f291606cd3505ff41dfecef31c4d5804d
+3f361277028148653bfe090a8a9322d797c2f7c094b7e302a7cb7d0a6aef8533
+4db7dc06c846cef50a24d5a463f461c23b24b171f964f4733c1c249401e791f5
+088b0eae5cf16bfb79d5dac5532a7814aea77e35c072e6b69e50fb18445a6130
+2b19b60969afdec3edbb0b66b914c3973d1836faf2ea01c65d75401a57bef394
+8de682b7edd50be4b7a946ade2f5221d6cfc4b00e94ac2b390067f2dc92161c1
+d73f7e580de3063d112fa8f27cd5d6d37ade4149ec5f8b8c3c9d88d13c235a7e
+bd04cf1a2fafe65da20b949322b50dc78a485119775de3e5ee70ef714d598c27
+0b82d4e73697111d0fecc9552d8f5caa3439b7a52f5f445b27bba45c3606ac01
+0666c4bc2a39af44107750ac6bf3a8005dfa3248413d98b000bf5e55c3188ade
+5287349a01041067cce0f841d6c2f828248fb96e6ffd770789c72369cf05a9dc
+831e7b1b2c01bad69d465e83af7b3c291cc74fc5ca2e69c2060eac386abac347
+5d56028547656815f50f46a251020ff63ca64dc1fbeda490493a55b285d1407f
+3cd803fb15906baf8bff8aef2eec3a738fa9c011ceb51805ec77ca1a4e8434f0
+9fb36b45e8d95afa830e6ce6ab350a4ca06c463444d4184b681df11e04e733d2
+9dffa1a3a68c502a29e05be5206c5d31c3f260f56b5f88901fb0aa8d7dfaa992
+4045686222cece6a868b664a533571b19fc3e1e69397f3d9d0a8bfa4b3df5a6d
+40a52946b8bed057167e3c3ad3ee2305d7af4a16696b00bf5463e8fb76892a34
+8618ec3d153b3878c8bd72c21ab2c90ec88993b855e19bb7ca23e454415e9977
+3def574125029a9cf24540c6f61ae73ca96739ba838f1938627499014708f2e4
+1a00d397e7c67c74436dfbab39869975b9ad748b90abdbaaef6744b796696c19
+5b8b2d0651b163bca5a1a5b6188a29024ca97449dfc87a99ffa00f05c68c3906
+b2588be6003f1f35d16d2e4f52185b87a0195f64cce629f9ae188c4f21936b48
+01a34c69b570b67b4ab176b30f23e28f40b25da9d5f8b30d147c19dfdb1c5f3d
+a8ab8fdd2c22d629fbea477afdb3c230f8488b6d24791f76a53ff2c21daf7ea9
+08ff9fccf55f0712fe16bf836032f104eb2c454cb4e2a3bc93493f40f9dc0c02
+c121cc50ec16ae11128b8f43202622a4eba117753eb656fec0e702fd1f680ce9
+1865b792896d48aef87f5bdfe71429e5963c74a77b24a036cade70ed655b4271
+2b5ba33ef9166444840df7a1e3b0f6c5675994239840ffa04dd8f4cc8b47d694
+e6d6d601d775c19bf504ee8ebacbee258841aee1dbdadb64cce7c026897a3ffd
+e77b3e0043af31eb442ef7ed53dfcc969b726eff1f8a43c13c13131c6532ae0d
+9e8703618ed8af07ca8468aefd047658ed08d6f647fa2809cbfd58519adfd791
+3f970d65a3f97f63152d9dbe9af502a2b6f012d2a81e32f8d8cffbd56e63a9b9
+e49a301b2c3699706088f94e7a3f11c7fbd215cfa8fcf44892fbe4f50062bf95
+38fbcacca34099f0370de74576d768f1f199c1457bda68473729f390543aeead
+c9be3985cb5cb4e01febbfba7021d69b9d038a326a76fbd1aa2becd26f7979e5
+bfac785b8dbcd84cdc90993b553b694449c98ae3aaa0d1fc59953dd57598fc9e
+2062cfe07d482e20f23e1b6b8f397b797656f38116853178b7b1fd8a78fb7071
+c433fbbd9ebe90897f52651aefeda189f61069f96d195ecc93692c417c9778f4
+0b23525ce5a0f6d29bdadd0abd029089b9c255201d7d829d12e138538dad4108
+1826ce5a43d78ec57f641000d191c9631106268f64ac7f4946fb8ca5599aa3a5
+017d03a837ed1c765bdfa4780f3375d95041526cb137250a0af36b9f9d055fb1
+98fa33d374baf553aa3bdccb1f4eff10f972228355144c7709a6cb45052ce6e2
+bc667623b47c220498a25caceb28dcabaee4ccfced7aa6c14b586a2e1c60a9d5
+4f4313885970d4f824c9807375d8a1b70c7b5fbc36eae7affc902c89e394a2c8
+39dc7e4d0c7faad918c768214e16a3e3b38e3a3bb382bce607968c8c970a7bd5
+91c6d5bf50341ea777a3d64538875fd65a714c881e73818c61a567d1ff2e4d78
+0b2851ec0a9abe877f26dc9b7269cea5585ee3997eb314a370724caca582830c
+f1e1cb6e517528360930a1b81735adcf20d43511249f520bbacc0d94f7449d60
+b62c90d220e1b2f9afc749b9178829b5140c5471074b074b42ec5c28e600e8c3
+b596461665b2fa699f33ab8eefbb7932d383814a402748183cc59289b27f19bc
+ac8b64cedee4bb5bdca401e1714cdfcc9c0329d35939a76229b77f629fea9551
+ce87384ab083011c4bfc8d5e3a1367b48ae5a964785b34827aa72c7b6bb4e8b0
+3c6990b6fa4060dd7bd1eca5e2b6efe3c8d9915940525d6d70ff2b2c8fe45128
+22d4cbd4490ea070ba7b8688aca9ad168394170b7169979d7c223fd1c67c02b8
+df0aca0cc03331885c384c8a573770e5ac87b01bbbb8ced847f7a4d68e5e655f
+ea4920b32bdb79d3d7099d942f07c18b7829b1ec7d68d187c550081a4831ea95
+c3333e213aea8f45dc8aa8a5b7d925e05979cd2b0da0560be2367b9d1fc368e1
+837cfd77bece8538b26b9306e054fd86cddb668e58e487a772f89138c00cf8a8
+62b913e9ef8be9fb90cec90bd6a74c4e96f55b3a73be8f223eec41958313dd0c
+b0094305eb85730ba87f6827d6a5238727030123fdf6566581105d0645454553
+0cdcb5069c9f1ced3cebb1f5944e44979f17bca52400c98932e6391d5cdfccfc
+da6df93f86b6da1832f83683fbd0ff6b47ad7f2734fa4243520ed9da9521e922
+9fd4d1961d36f1fe1f0fff958d4a12caadb6de73b54ffc64d72c089090af3fd6
+24a712e60c9d7c95c030827d1da39227d5e6537f01e149f084451c7b1799dfdd
+ec0fb4d8b3655240ee03ae14b08c1947da7a66465d5accc205e0d4c3a25ae300
+2a1f991a5efb7f592260e6576a26d168c568deb32919a5f47325044e7ea0959c
+bc65907b731957685aae01d3fef2d9f87b3ab44cbdf72f161ce92240734b3018
+ca6c963aa5b29402b5f12d539672c4ea7bc1c66ab6104625d97f41e65abbedc7
+5d3df3802f9c2101b4cd6fc7e559873b88e8dd54309c8f53dd2d6cedf292b366
+2fffd38681bdc5936dfec644cf6b7a7e415bfd7fb9de469266927e5b82ef3e7f
+011aa4d70ca53c6e71e460a7be3fa42d9307ffa701ebe91baa7875816e1901a8
+15e3ba35c3b4cb00a6c87b98eed8d8095740ec71d3c00f8b578daa88b3f33dcf
+5bb6635f1b2ea62eb9abe181dff47374824dfefcafeab400020191e74671a097
+91a6757c880d4dd5a7e3da51241876415d9f70c689c804b6e9ab5b2b87f332b7
+c0e2c3bf5b2246ef438ed81ff8f7808859632ee8fa4458eae295eeeb9cfc7b03
+0c0b906d4805f9d33a39a3dea89ff2eb56db4c254579c92ee37286385a5c67e2
+0a1399a73ad6921b46082428bd84de18cf92fc9f8058b7bb3c193a4a50b34403
+358600d3d3251a543a6bd9ad3c5db4138dc043876387bc1f55d919fb8c35cc11
+cd707aa89a7618ff67f427c74998a6e75a84f261a2030710ce94325020dd8814
+91384f4c83ea17fbb58f73630613552a6e9a905a98206c8adc56b67419f996d4
+1da159cf2d8695507ee04fb958ef554e30d482cd8f214478062d4fa026f86b13
+3dbeb81c957e43ae99142d2b9eee13712878f5ade9912228bea38b1d42a835f6
+45f056ab9b40681d736ba72a9b4b5ce2743e92931676d8556000d32d259e163f
+ac90b30944a2cf1c52a236b4d71a1b2c0c8d45fcbfe447c732b9efa9d3e103c0
+381211c00da6df127d5f57aae449b9699466cb369b996898306722d85f8c24de
+e5ec2018a7a4042b07178fd55632305cd5bcc0467dfbcd5ecdbfc9e494dd5a65
+8327ef45f0ee3d232622646f56d7764398dd5d01e92f5aa4fbb11d95cfa277d8
+1c0d5a15007cde0aebd5436103be6833beac9fca1eba100724eff0924dbf1569
+97f7c080f05ba7eb68e201f6bbea8541a94973855b800cdb7ef6079de238b758
+e465e27c2efa56dc98ed8e4c2861e2ec8df3f2e919678ba369890d15b8002fc3
+546a3ff1def38e2694941a702ae77e16fa2e55442de9248110a8739e58cf4b76
+664897bbbe30c2b6d172b2604da84c60746a7339c7971a83d516ea4302785c02
+e508a35efeec0b61a42caba94b28bec74f53e66a9a54bbef4ea1171472e34bd1
+dd2072f460b24283c8217d6bdf8ab34210c08cba89a7d761df442ca147effc4b
+4c041cac1774eca35d106b2026d71615b4279207039ecc03b0404dcaaa7d61e9
+d18ef74eb9bdc614225238ec4ba8ae417be9a6386ad0327dcefeb5a25412bf36
+e6ece299be240192d182508a51c1c1ec7ff65096f0f6219f25b8d07d67aaa3ef
+d4bb00475135483905e87aadb826a889cfe5fd3af57466b0cbcb91c397cfb9ac
+f17bf93c4bd1547c6b196cee7741726321a55aadd02e6677872f6685af9d0030
+f1c331a926b9c42ea8b6832bca8ac9c607a73b527da6c9a2fbd289d781dfb35d
+7c5a053f8f91248f1c3ffd96a1a5813ceade13599db1b3ce32f5bc57f0335693
+c8d4c405b6f9a956e704e6e99163ef2f0b6787f0bff18623dbc1158e34006608
+70434bcc19164b41d499feb2b26fbbbe4020728e4882a6a123a8d78bd1f298d0
+5249ad33d6111b4a9c6f3ed2fc7b5a552b79af79a0ff935775823729936d3083
+b7b93a0b15ddcd84581e28b75451682eb6bf9d3c8ace9b275a510cd6561058a8
+8406173d4128c3cc60170d911246294f6c6f8e71a8de8c587e84d44b78e8ee6d
+b68a4e4dcb14d73b6d3b35f2d8c3aaddcd0967e570516ed9387382f78e741c05
+1093aa322dd6b0a42cdaa10e510ae3905d0542513d348ed98c4c9e01e0505f52
+2ee0b4658e51a433252f9d10cc18232783d58f88997634ecbf89a2124a89754a
+56a4b88de81815b3a17fa42e5b229f80aae7b8559459a773d408141928619cf0
+f56cee08f05f8748a201573013e41c6f6bfbfd740759e512a1e48cc4da24da1f
+aa24672d4164234b31c631da10260e2e9e788bc2289501b083e926d63152b46e
+6821383d6065e28d61d7a6b57b7d9859289dd3a2327d3251ff65c72ba121d0bc
+81b726e38ec1a2e9f2abd4827a6ff5d19f3b58ab955a609a97f221fbf793aead
+e245e3164f2824210a5b97912b0a71694c3cafbf60e0af983b31ae30b4b9a41a
+aae396d6433db119aaa6a174e02941a4209e3a7ec58581701021c3af19b12925
+4e16cfcbc2977089ec85258501494eeee8e21a4729fdab90efb334fd2ae0300f
+ee893650e27238444c5a8c0511712d6c00afaa55b83a258a691177384a7f2d7e
+17da838132d47c18a528098888bb160762d1d93660de8de402282c4df7492ce8
+920d1ac9e9886e4d9a1302739890fe2c95eb37f9dfe73ac4fc51c4b0dcb1ef45
+d1dba50df66f32c1b2e03e2bbdf0b151424eb2a5479dc085a84ff7940ecd5651
+7480a4e7653edccf6a147d8af6da9977aa7871708f6dbc0125ed0e4eb6a2aba3
+656018e05f90831ec7d00a9fded05da231c00b95779b0cb9780d9fe96b1dbbd2
+291d7eed562204c11393602fd2d90ddc31d438b420720b5e19a7a760773107b7
+8e2c1aa72e2e1fc16ea9474e7167ae6be661e6d0f37f3beab24d3f9ccace3dad
+be68fe29e086a62b2882eed800451f432db02614da4d1b7440d2c8aead012aac
+e32f90080f444b368755d49dc24b05e0c48ef3fdf57fd112166685773c138ee2
+36cee78ae6d93130e97e8e633688ceada23fe3aef575af02d5bd3c2c5bdbfae0
+7c83cb2710fab57f4fbbf57a8be81415c1abe8b6318db53dcb71e8850511af89
+4d43b842cae1e9b4f3db6304d45d99fdb452ebf0ca76c1d7592f1c9eac61f785
+c775c0cd72c883b0088cc2cea72367337a0af42b233da8324b02b660cebe5970
+ca1858217a3d140556d5894be895249f04a2fe9a03cd39eea05ddcfa0c757fe5
+0122410c80274e6fabeeec6c0f8181718ee6e673229a0a0ac2cb4414da14c4d8
+757e44d32207fa9f01cb6a4f04a6a67c38b219d1425dede228ba157b4d1ef96b
+e16bdb889e8c9527a0fc4cdb2fd6aca296d7c06daf3f259f0ad74fd806c047ff
+0250339e1c1d650d8867ef37c6c42cf7f930fa6027445692ed00f0be90a79ada
+9de99a986f81117165404bc82cd33a64c1778eefaa123c3581454a8334ec0529
+4cee91dc0226be0dd6e8a229199a069ed36d5b76ec66fcf363d749ce886fcfad
+d6cb008f76f0298be337c8eef13a24ef7c3d774010e2e4a7acc429d8c0da7a32
+f8bb44aa9389d4f594be75a2f764f9cdab9011a3c65a3555a9509f81c27dd091
+221ea30ec6ed8449368a5d4ffd302fe809f3ce67f4738e96ad29d93e265921ce
+45622608522273b64bc36454a7a2d3ebd334aa8acf9e4d4ffa863ec25819e7ab
+2ed613933fc57a4afbd0811d4829d2bd9802885735ccfb251ef38766b436deb5
+359278fc0067aa17cb27310c52cb5ac59802aab49029ecda9dd1e02696d4fd20
+75becc63dca6908d1ff00efce86d5ee281baa70f62e3738ae4f054bc027829f0
+5a57e15b9326df9fc56ff8c040daa752a0399db4d265f221103192fca2b3c88b
+a6d90659c0d85556e58c473dcf3a1f851b4a1c96cbb48971e1cbcadbde7b6799
+ed6b2d77eac67a7776eb7c571f6dc43ce0697f4392e75978b289965920cf17a0
+d78aeec7c733c885ee89ab9061094d0d01022bef4839951faf991876c26e5e42
+9eb7e5a57de0da10b61ce825a06d33df1989ef3a93b83130219f933ce36e4b0d
+1f626265306898140b6d6f4e4a253cc3c6e27304b975767a38127a0b8d906f60
+53d097e7a588648e71fff1fd9415ac7d7141abfb33086171868fde663f6a0aec
+ac7c8f8e8cadf5827ce72fd49d319ca5985cbd50341c30967084b5428cb488c4
+859b000c3f0cd1019267d9ac317e02cfd4f7d4480309e7f6850bce35c850155e
+7cb5f93160d33fafb4383ad3924d0d665647865b5b9835519ce1ae14cd4d26a9
+c46f889407d0d984d2a3e63cf6aca920262df305ed31d3d1a965c20422fa870c
+d860c3ec7d3b5966678c238c0e4f69daaca76fc006201072facd2873aa30db95
+626cf97cd33eb47950b2b831040be0691f451765f57824ff493c3d06133744c2
+9fbea2172f3097881cf406da9cccef1b6be9ada1909886ad58edb99228972dd4
+240898cd356432c333673b8902ae243686912f45ee6bde468bd3e8b09448ec5f
+00d7a9213628fd6743f0cb028707ffe5e5b8a8a24e83c3750d68c0e465b820b6
+30d209d39da1f548eb22aa88609136aabfd98026bdc4582bcbe7cbc50deabf90
+49d4737e44f1f899062386edfecd5dded3a743db71a61ebd8a81ffda6470612f
+7cdf827924bb4e7e75e6c91dde90e698b319d6fe6fd982955eb99424e0f26aa9
+3acf642ee1c9ffcebbdcb6102f9ba206238cfc64d68036129817a65a175327fc
+f34c379fa002c5a2b9112d5b9064ecd77912987e28883259a6ec9f2c2741a84a
+03830b31693492ea5286ee18a52af05b41a6c379b6c850b5cb4d31f60a6e519e
+981c22680db193fb72d365f0260abf3389832ab1d78759c1482eb1ffae6d8c4f
+20676bac1407720c6d3cb33d0b19106c6f3059afa85f3c782918708dbf809228
+81552754d6fa2c7ab482e703d664aa495805292274adcd64e7696a5d096ee928
+9e350c8294d7a1645354674e66213f18553a72fbeb7fca3647ebb5828f5a452e
+03941d4cb822ef0839254516c2e6fa668006bee04122ab89d1e958b57b98f0e8
+ef8839dda01dd884e0bca9cecd0a9d6a037f5731c7048b488f8e972884904692
+c0a558358d736a25b7eeaf608f9c85ce45bfb13fdb0011164c50f82513f8fa5f
+0a53330cfa24ca4c59c50813974c2307480a47c25044b2bd1360df7c82f2f482
+9fdcd0581ae31fdae1e36d59ed2a6b8cdc97f005d32333e27d1dd49444176a4c
+71887d2757d1034f27dc74793ddcdb0d97806e9e16328509c760801174dced00
+316084e04d488626ca71a824c2e1f36c7b325a3f1446b21d465b8870f7a6b05c
+ec4c2a996db293a754d49a6ec448b31cbcafe353209ead320bc8d963432888ef
+1ccfc29e46c0c7c8e2849ffb6bb680f5016670b639bb411a399c63371fd36c6b
+079077160bd539d0f253eb437d3c3f8bd522a05632db51872cc2b74cf505da34
+eda8b3039e636f2b8e9dd82951380a5e5e8bc776e996e50938b8f9c5a470f366
+e26e719646a3cf2e362a95f8ff6776cf5edbda555846f284c75874399d211240
+33cc43062237e479d024a7c34c6310b81f3a299a148c0510b78ef9d01a2c0db6
+151c80d7978a93409e2c7e01417bd898fc2d091a4f258e777f5c18dfc432cff3
+7a13005c10deba3b25411d93b6426cf9c1e25d3eaed39f8f7d1c17f8ff23bc9f
+47dd0674ce0ffd60e12c1d406587cf6ecc678220fcba0ed870e0be75768362c1
+2b8158c19cc70560a058e53b83b19560ecf18d0acb4316b7061a9d9dac63fa9d
+ee3a0da5f7cbc2addf7ae5310aa833ea1f45b97e7698558f73f952baf03ec25c
+ae370256a1f81578d360814dcf29b12764f88ceb7ec3358e923f781bfa4f632f
+de9414f7b98ea0b063536770f3fb4ecec21a68caed7fc7c85b9abf613b94ea8b
+94f49a2c22e23233d65d4d16e4e6cf2c317da20e8f2307d4b4c654ca9d215479
+9cb625b53cb49947961f81ed2ca5fdb4d64f97edec759265788cfc48333de518
+fa274828bdc27394e4a0888925d2d9270716c89f82c2bc569be497f7ce930924
+b4f16ceca99254efc0965a3eabd78da5a16cd9f8d581cb7106ec2e9058b2c9b6
+7550555c837e57fcb453174208c072f26c717b88ef55bc13bc3188e8f768aa6d
+11026d3b69f0628cdca2c2155df354f24d2af4c9941b0172acd73cf9c7f973a5
+394aebd41728178dbcd55e73a998df39cfb66a287c0288e8e0e0816ce5ec98a6
+804b2d1ce83f2e31a17d32d47033ed9549b0b0119df7e2736bc89a21ff725695
+018ff19d096d87e8b310b9c0884d4f8fedfb889538c9911d4e3fd53aa570492c
+98a5f5a822886c60b8b2a72e775d33d0509a4b63e016cff3b2c767a6d39143ba
+995cdd4aa4a8c4de041c27343cd57715fbb6d48a46238c18d79ecbb2548c0374
+b9af808dcdbab805c520b63b30aa66a4cdae35e4b71b45c3a2db55c34c2aa879
+29218f60b74af83e44b1ab43906a3a54a34d85891573c594d3ae52fcb548d177
+296b52fe2253195f97c568894e8678583165010db416012acfe3083431175563
+6d1dc919105faa02f9ca5878a719aa7f0719a4ea81ce7bbc5c2af1ce73a5b403
+c12ddffcb317a401a4e12e3a3168a04ed036f04b973093605d8d4a9be6bd4cf8
+6a8b57b37633a1fe2791b281f40c018bb53ca08a467735377ddecdcedb939d8a
+38f757b77970cbf6f174b6a6c60da653e3e3366ad55890e78f61d293c4f96e4f
+f03dd48b2b23f06b3dcedce3c624eae1497e5d65eaf1723447d2f0ece09c8f60
+df0976b17c95dd43edb503237218d7a36346d08b285ed0f288fffe09ddb03cb8
+d2d76449dd1d40db1d11992055f5494f9b8137e4c918a33446a616f12f5e0683
+a4979daa9b97d3acb1fdac75242e1c3f2bad66e3dc8a9203333e48376a6ee721
+a86b34087389370ce971a7057d608e93eb4d7989f487c874418fe9a58bedad1b
+622192bd5f8e012b1d1942a6d65bff9cf5af14cd6e4cced7379a77cad8221dd4
+06adf2beaf7b32155da0b6b22a92adaa95d206ecf5a7704c4760d14d70b7c268
+4812a0ea07f20c02a797cecd44bc22e147df1c10d51c221e0c2161633616da82
+53ab9a727305515f5e287f7ec56f540f1e7e7d9142811123b84df2cfe7124789
+447d50bfafffde6ee2d7f206996b2fc896978a06628c983f5e33335b20a20fe1
+a71f01634e917ebd7996da19287755e9f9eaa0efdd7a12934da4849121e0f52b
+da07c25468a7cc24e792f5d8b37443a72e2e50c655bd80a7badd47e4fffabc67
+7d7c4190824f88b63c0606e93ec889184c70e88f92dc556e7e71239bbd733af3
+0d781cd85b03ff796bfcc24e7ace070db05149982338665b57ada0e7c2b80d27
+a64bbf46940f28865292f05f249a1b0d3891efcd184f32f85bd96a2623c5329c
+c59686103b6593dcf33a6b77e263167dca4a067874724d57efe3786f97349854
+809d3c8ddfd04d3942877f5def5aa3fb5d8be234abe999704cc133dcb3fdaf1e
+889f6d43cd4fc7fb570460f7ae4c3b2de650b6d9e8caf3c6a338394a68bae1b8
+ab46be4452b9709240803db075bcaf0a5c36008ca4d8080cbae6adf1de652b8a
+72d6f9b1bd1628eddab2c1b1f28bb144f9cf7fa7f86613b5b0e13d3f870954d7
+6e358c7841733c90d28f8ca3b045bb494392d36a1b2c9da9fa354c0909fabe20
+b9335158f0258d231301e9ae5a2217e566b520bc87583a5d67d5b1b9b0a999d3
+dbb824d88fc6510e065329ebdeeb33e7e7ee38ab4c9afcf46b089f6489287a22
+59a1137f6f31978958e1c425c2b8aa54e8808d12fda962c912c44092646d2fc3
+cee8190baaa232d539f9b453aa07d1e0527e6493d97b970017bec1413409110d
+3709d1a7faa79f1f07757be5d05718b09cf1fd0fab0a442ca9d14483d95767d8
+d8538f13c198e4072c332b3e0002a3a77c014a1682a5b113eeb65155e5a0b464
+1fb6d589313a2e56709e1be53e8acff66fb138e8f18bcc6b684457c16aca8a02
+d063a19b8b2849205dc873ff1febbccd7778f5948e8f974d85f74ee9845716b7
+d431708eb918eff9ab80be8ccae06fa58caa0c57f6c3b0c4f24fb07aaf81da87
+e12ddb61435e564ecb3b74759374e8e08d98c011bfccfc824f1a7d9df9d83fb2
+cb3a4136415297410035b6c824bcfd9b01f7d6f19f065bfba1eee8d560045dd2
+c552badbfd6b03ba6293d12b01985eb156c61033bbfd2553c4f96a77559061c5
+8e9e0d7737316fc1a1b4fadfc662ef1caf4aec6c2231d50cd7583f94af423b18
+ab4b9dbff979c200181921d84a63e4e722bcba97e42f78170f9441d0001dc280
+451cdc1104dcbb65df237553e3baeee3c69153ced25001e6fb970e6072ac27c0
+fb99138c0c63a107c9ee8e9fe1de42e534180dd9ab1a5c2d4f4a5cfd47711c73
+f55ca3cbd2e074c1ba4700ba73d237113e9f1908836c5a334c157b903113a9d3
+5ddb5608d0efcd863b973fc55017d106e68bc4fba6eb3129259854d59da2b47f
+e82b837e5c9b44ef7f279c0f6c0ffaceb7f48a72245216e5ce316a09983455a5
+089114d310a111a4b11da77a68c5e965265504cffefded03b1dcde16d3c3f940
+ebee6cea1616cf132b0658baf0bae5d3cd6043a8bb2f071df65f1e5f16eb0e7f
+84411556a2a7e5fcdf6b692c3dbb9d9fb6c063a2ff8eadde118501b4edb0e647
+324860b5a4402ebee015b663eb8ea6fcc0ea91b97eea89545ae93c5e3cd5548f
+c83f754e3ce0ca0703c2a0f35e0343d137a499aba617f83d46c7b7c0597fa84e
+1e544dd77afd9cc36558449edd033fd4e7dbeb57071cf624c109ed1ebaad04c3
+15eef5bb0b004895834dbf6b867198688c9b4117909aef484930e8a31602452f
+c799fbebacbe7b75d1ac37f6afc8c32313db3c8e4d64ee504632c76654e984a3
+882762b78b8791e6e46e974ddbf7ab4d048076aded03b6071f373aab006e89d3
+87dc28db2580559d957e2a1626b1b936a869da79be30d451f42e583f0d9feb53
+14a59195da976d1b6f42472a9cd34834e3cc6656cfed7a4f56a00f721967c384
+d664d6a48781058652094ebd87350c6a3a4692526053edc59963e0c5623d1df4
+0a0579224fccfc98730df4e1e0ba9b258bbbbe9d2b4c1db9c33e2a4311080da6
+bab0e4044ace3f56fb92c99e3cd0229c4cd9c1cc03c1f1ee32e772ba7cddeb6f
+4057a68a458414611bc2eb218d824189818cb4a95cde2fb9a6700d412b3503f9
+8ddba098f014da81df3344748d1229fbf801c1e2316d95ed9559ea16c898ce9f
+64f4e41fc35748e1efc299c26dc3b42c26123c330b9c8cb7e001da5de642e6fa
+c44c19f97b20e47ecaa5263bee98690f122326556c5cb69e9a21286c3e462332
+e10721f7747d3425cc204d4b4f514501e14840aae43fb523b89e8b2abebea979
+c6762a89e4546531afff98c36cd30a38d13fc19116873917684fd3043c3446f3
+7c6c5a36ed36eb3900bcda089778c671d6711ccb2f7a7373aa6f519b27e7ac73
+581ea404ef17adf8c92a1f8e9edeb0201b3a48866584806e667d7eabc955e19c
+2abfd1bff1f71289b2d8f694937e965bcfd6de56844f0e5fc980efc777f50f18
+9cf4b2d7c0fed84513f215845aff1bf3e4250aec7d7c19158978110a81d73f44
+92da75ed640441da004cce30d28826514e409baf6d41f7661c4668016d9fa019
+380a21444e969a6aeb6ad3cb2341d0287e2782a409675295227fa2ade601e1ee
+33dadbbaed9ea5f0715a88f5390868706ae6b5ec4473c15e65ff58e9c8117106
+c83ca1b91001e741eca076cf0cda6d9e44de4f8dc762175f422e12382dec63df
+164388ffb614abd40924ff4f6ed0e57cb451b320136c34ad9e3462ad884e4472
+7fe5f7d5c6e55997355cfcdf375f3ceb4913f23d7873731d77435e78deb10d07
+d0afc29c261ab66f2b5d1ebebf36e96b536218e85de4211b5be3bfbbf0c359ff
+3207f6d35ee4738be6233e4fab21002039fe208f10fdde73d0ed01e117a69c8e
+056a048757242b698bc4567f0684c8437d5d391fe2d95ca241f09d573654fe1c
+cf138ac60ffbdbeb15f975f8b1fa3dff83f552e27844ae3f44c4a874feb1ba98
+5237293ef7cd143d83dd6ba9cd08cd0dfd63d3cf8b5536dc9d65ea582b2b5a1e
+852778730e3a0ef6853d3126dd7ab94bc3cb8c41f60c82aac4d82223296fecfa
+e01714eee59cc4f75ca5bc0eb875f8a4c9a6d499c9a7e1cc470987404dc820bb
+c610db9470c0153995c2ac7cfdd334174b91923efcf4de1f3543d1e9971dac29
+a6a67169daf36b910780d691201638783401bd49010122d7456c7d8c1d301fc3
+243103d48e9fda5982b07f7300315a1abd3c84d7aa3088f00214f8c2b4ade1dc
+d82061a23adb2d2112efdfc648dfb995ea7da854793df6cd6b3d6ed7a1120832
+220c9e43f05ba4af43913c5bf74c1d3340d4e11ab7d68f6e4b9f785034b64321
+1a1ff2fa676fd0cc367605ee99f1c7f4e618bdb26746cd879a8670c3506707b2
+b774104efb3596ce07ee5966c7a7bd06563f7856742b284bfbda52a2664e264a
+5f781c5fd79ba767a19936fb3a0ef2072c998e1b916a2f2f663b4343afb8f168
+f2f00d3f5e1f583d20ba03f6f41a980d777c7c5fa5300d457830c48faf007548
+b642a7da2ce598799b042d03f4a1979cd0130662cd81511a5ac2866097352329
+a93cf79be94055616a889151b66b0054053822de0248141d4d3c0471f3ec95da
+cc00eafbcf9010ff26f90c186fed7adcf4383297311c3dc317c5bde2da60ced0
+e6dfcce2f0b25d00b1f16f5884981a210483a1a4d7dbabe00baa1e2ddf541a8c
+cddc9e051a54be5f4c2d0ffec3b83e931fb42456d49b12f4488627d3d3214c4f
+876ac4ca7e3a4e09a13d09c0741c7511361ee2726a8973650c7af8175fb81882
+245d94df87618d1c17632cba8bf34c37f91681670dc816afef4ed278f63a9140
+9cdcda8ca64904523eda55908972827693cf36089dc580743a9eff42e3f793f3
+100bce00a6bfb089e595c736eac8444815aafae9654d9da0accfaddddf283629
+be4a00a9f6b464bd3b84bfe069761777f71c6fd398cef5b915b7729dc2ec8cae
+b4ef063d47ec4ad9a0d8d8316a0deb5fe7982824c9f20ba43f907b56b124a2f1
+b3fe3d644e9a6f1c1979130b56a08e9a91d71de0458777c461a93fa416246373
+81d8a7b70639422ecc3841958dda5cc2ff32fb018f7127b24fc1f8b2a97f4eb8
+a5ace935d51e1f55c5ac8f2f3627efd76f052bb517560359f6e139080b19f328
+46f0bf11f1a5485f055151b5a802d3c9b042ce62e367446f59519a37dabeaf46
+9c7951ae6216be980b97c3106e1bc77516555ce6a82a25a2c348eb0078cf5a49
+ae48b25df34867cbe4318b2180a68f0d283ead9448f3a93cf5006c9fb4105c38
+e3ee2a6a0c2c68516379781abcf30bcdd3e29353c08cbfc7c71cc33080a37fdb
+5eb3054341ff059d1b0adfd213644085ec8f1ec8e0ed033db2e69e5c0c479925
+1e7996a730640b1e16ac49341478ff1b73bfeab8dfcff54c4f10dd7f10d00db0
+16d2e673fe75ca7cdf656de1aece63bc018ce97c53335c140cf8b98927b869ca
+cb5b1f6667d9df1d62544dcfcf12a15432e31efda2d8f4d96b73f6128e73d9dc
+932d2babfc3220aa8c6319c9fb435470625f259104bac932b7cf05c222dee3d1
+70ac1627567417f41f4db1c7fc7b892d18b2c53f12995344466d44be856cd953
+49f4b959b4749d390f66bdc6ba0983b377af879fabbd02f1311b6d87b3a45075
+516e347a9bf9c30f0c22573d03294fe0bf1d86490dd5e0f1800e97aa4cd34328
+325d62c753ae10fbd5098d1659687f930da4f195b9e4b8616bec2fbd0b6c941b
+09b03eaf23bba7544838473f2b5aede4a712d754a117591bf98f2a534057d7ea
+4a99ce86c87ec2b12619223c8046f9e9947fc8ec69018cbe93dec5ea5ded8ec8
+56b1d03f7b57b6ca0d8894e7a26c721956a66df5d582c397beb57c6c120ea224
+a7d5acfbc6acd556f5a08d60e5c1a725fcf062c8755df1d6f22381564656446b
+19bf6518fff2bb1e04aca06aa90cad4333f10b16f9585e5d19ee150da3931c8d
+a05618f6e4e188b44059ac3758c930c3ae763267ceb422e1b4595802b374ecf3
+2576af6afccf151af304747e2405f609f04509f38f17dfadc6383ac24d18f5ae
+f8eb5125446d4d9b0c67001c84edb4032df4bf86e8eef2c113617f3771c333fa
+c9b4e8d10be191b4f0b62a21c839a52f75ab070ad8d7b6fa6fe538be4844841a
+d1da0cf4948c018259ff3065dee62ea4a2a586fb09550b1e32ee006768065f6c
+a62e69542a84ac74349e4682988f106f944da6132c49facfe3a71e78f15fc928
+ba3a391a2599b16fbd0624504f340a0854332c12215bc1a8638275f6bf3fc328
+8c9cbe92a0196afe73ce3ffe76b146842cffb10446e80edbc2675458f3143366
+803d716bc0254178f6a3412f9978dce95ef93dbbdce9dbb2e8495780a784dcae
+7e01eb627febe7ba97e715d3439d55e3d86ed0764b2ebb4e09a1a44a4f187fb4
+dcf7edb3bdd615cf4d8a2ec78483f2c5f1480cb520f50c370ea1adaac5d105e3
+1299ddf4c84b810164d9bd90500b956ca1e9cc387ec7b697a220d124696fe475
+b963bed158dd5e6a466e0674ab8fe21413d2bfa7b890a2f75447bd75e18f582c
+7b94f812009f9e8c842e68e3f4d8545ddcbd12b522adf6bef2db3d9c9e417d19
+ead754d89c81cc8355f3e74d9e83df3a5502027be852275d5a292e84fe0f3330
+f0430353f25f954b08c7798719e59d889814d0f3da68006c3866e1ce7d4e4c6d
+1637a36b81c57f076c2a534139a3fbd06e814308f41d534a0b8efa70dd0a3334
+28b39be5842b7ba882ebcb7cf6e4e39a8ef9049304661a35067d684d4338def5
+0651c76971c635cc67118e8fc3e14b1f4593e855bdf58cab00bd96c4b9fa3fae
+06e5f2f0453b9785067720fad4fa2bce85e75f4c7627ba4c9ff60264b7e3203c
+b7ffebc5a030ddb3e9f73e43476cb14db814f6582ae10880bc2e05d2b45d6703
+fe5ff8fac1811faced4a873bce848c67f21dec481e5bfa16273b317ad724471d
+d6c000d0567054afcaa249b29fe4868d3de14f3aec71a9a516534d7bcd5f520f
+4b692be725813ad0686818ecff6583db9caca9217d917ef8e95b4f0f65b359a7
+bfad81b047489b5a27f25e9d0083f3857155bafde723af49d89d12d0ace5fc57
+55ecf06556351af4cbbfb31ced64e43741e00effd88c100126f6a9ea7059a29e
+e676d797f763662be90baf5888d003a90e1b3d2972ce2d2692905474fc3ca302
+45dab5e679b2649139d087da1c52b573f720136584590951849ff1acf3fc3a8f
+3598951f265080079accc4792c81607e426c7c94c49235defbf99c2ce7cd6f83
+f6500ba6df15e5db02a83f6fc92a707f46763f7cc3e061ed52833ea1d5e2c3a5
+e792d30003fc4442c2b2da5a7b6265ff74c554b66cd79bb3f8fe8f925be0b8b7
+5539a85ec4d8fdec57744f34ff9046971df2cb948efe784244567ba3ca7585c2
+d30e9227fc65efda488c6258472b8078e4d53cfbc75a54b2ae83ca83d25eae24
+62925ec4c6a8a71f1659c30a40c27a8002d5af1f808e305584a987659eaf20c9
+bb9149bc90071f272e1668f28d01cf753dee6184f401dedd303e41270d956b3e
+e8b162458a0b5b36f1b44730faadb167a76a906e4d515640db77355c10ce489b
+f531944e2af613ddf4e8bf63744073505c11b7a2391f3bbea1eca42415e72784
+67ac2104f88c79ef1adcdd9708241b6c666a0d9376fb23ba488b16ba96a4ac15
+828e8d286635b79c99bf768f8fce273e569f2f1c6c34be942b833a1fe05de68d
+ef04afae2e78ad7d500d16d417b517459820a3056be375cdc94d51b97bbc360e
+918e36d526c1bff1242103d6aee802457fe39deed5f80f274a4a76930ed84c41
+08eb6d4ebadad5d97f9e5226af8bffc0366b13cd443863ed1f3ac1a43656997a
+1562b520c57ba0ce60b0470c6200fbb418b567b575b76cca63a371e05b44bacb
+8fd22384616378260738256cb80100fff9d04375e79f8740923c4f87d02eb586
+40b9af5147a7f15a8278252473c6a757900ecffb061aae3ef8437bed0f443f99
+7e1d41fbd1ae69e08a4b72f3d82c0c9aa74558f2000cd23feab368fb9fe8adff
+b1edec68788c845dca9093d157db4aff2385d94b615d680dd2463cae985d94c0
+bb1e898d1ba8a26e8fd4dd75fa1ff158032b42ece876dc01ef0af5e59889c9d3
+3867a41fbfbbacb9f2b182a9e88fb57f4abf2b4af4b76b262f8b04e60f41e64b
+9b54b05972a8c8377db85c8c057c7770ef3859ba3e6d4317246b4d82efec05b1
+b06749c85bc5a915b8da1d3ebdcf13ce8f09427bd6687eacc75ea0a196d22616
+6dc5dd288539be39b3fc157e957c1ae0c61f682ffdfbecb384796e603b33e5bc
+43a3ee16f854455cc1825a2fd49931dfbc0b76acd783b8d6cf57ffd909e44e0f
+65f51296a1be58b28ab759390ffefd476cdd169ede92dfd5362137f2412f76e9
+ab8d3d7c0829a910aa7866ef6d7712fbda2223ee1c672aa42584d3e5dceb6ccb
+e16755b381dd61e83c43ef2636c33c5e1a453bdb8f30f51074ffa5ff9b427639
+4bc83edb449f5dad51984e25e77062f4ef7981b0cbcb6b8f97e938aa6e8ebb92
+2d7f2c599d714d3732caaabe65994e20e56795579f7feaf5ccb5b1448b7cf3e4
+c59366d5e5af71390116e2d7c545523fd2ffecdb8e2a59766cd2a8720b3bb898
+063b54de265f82d6cc34e88bfd5707b1ad047686dbe9d434414b73ee4cb2bf32
+8882565e93a6434d7d5e40faefffd695ce65bcf0014232760e63389558ac39fc
+23a295ed68fa43957428c359b5256c6b7cdf7f4bf4de03d6e24dab79d709a27a
+0ca54d84fd365f67d85a0c641073971e12260b03c0d9f88bc45cdffa45bcf544
+77e564efee2b7d8b8fa4af0745b8f4eefb970e6072ac27c0fbcfff9444ea7126
+c7befb2dd02476f58123cbc23da0ab4c91c8839af709a516df1db6acbfa7874f
+50f41b707e2edc5cc705a64f3d9b1cf30231d422b97acf6a37b9c5d6c0f6ba6b
+0768ae1b907aa7e986fc583178c251b36bd3bb424c13bcb9cde19644bb8b40c7
+63d2c192798218322f63e82bd1176158ed074b7293e4178e9953766f19aa08b6
+1765dda1ec557de4d4841f98e10f53985d111edbf0e132dcfe12d8118ce78632
+b67ea99982fd3cf289ec0cc186ee5993acfa41113eb12f9457c01cf3a13714f0
+f3523eaf4229da65ef3bac70e6518dc954570033bec5bb9c49f2bdd52db14a0b
+9b1dca8b489d0e9992d9c44720f9e9039b920a69b36e31a27f33f105bc700e1a
+dbf42412f827b364c91bd06a57e22097806f615ff8cf20ddfab163f32351b638
+c39bd7b05d0fb10df6ae8bbbef8a47870af4198ffa6f35859a308513bb3cd6e2
+32e50206aaae2f5e14d5bc6b8ff3f64a9497ebf7566ef04ff1394d1997ccf7b8
+31629e685294fc9cb7468a919ccecd64048c60a44e217e775fec9d31711d2ed4
+839a68a91e099d16e24b813817aac1c10e6aef41b6c616dafc4f6965eb4641ea
+db27f46ac00e4aca80488665771724dac1fe2206506f09ec75885d5fa3129bbe
+4e15f47090e9310c0d47835c5e697a634bea062a60c4dfc2d4e67bb8591149ee
+30ee8c5d284d332f4d7058b1e21826ec6df07a1b12ced9b109af752cb4aca0d3
+b2f64eed115d963fc4356953a62dca58d03c6a1574eb46c2a902ef65c2d41e15
+677eedf8e0f92d99fe465d596ce0154785f623a6f21d0b293e211402870271b0
+a7669015f8fa46740fc7f171f42b1450e001190e0dec67a83f96e24ebd79d9cd
+f8767571b35a891f9a7da04ecb6d0b0ef28bf4be1e1e6ecb634a3bcf8d48f797
+89fef27a51d3da06742a93f5367ba9dd87932d6f41fdcdebc7313673a427f172
+b142a59879ec5a115ba6e50da31c0c65cc88b2c012f14e7acdcd39aa96f58b3d
+8feef0df2d568a41874b0ba77aa07ceb12fb6113698279479d15b5798d065431
+22d252e11d1a8ad35a267b8f9699f36c87e5f9e84f931f1fea9d9226de70a6e7
+e8503681d81dfc236d06bb2599f896cfb97ed5d287f452c7bfdc04b6c25bcd40
+5624a580f4e3ceab7d7e13768cb014bf82e1988b458a1d98f1e28ca698e5e108
+7be4a8f26c3a25035c6ca7c176215877b2ba1e812d79a37eb3914f2eb5ea4414
+7c3f38cac536f3a8d5f7f9a17e6008373c54669e00c937771e8d6ba2bd833648
+8f5b9b61fca0099ab4d8acc4b5df4a5dc685fdbc90a6cbe881cd4fb561e8ec6a
+c76c3a42146a5dc2ce7f6dc221d0717138f03e7c5a93ed07cf7620975f4fc4dc
+5ae665540f85b795e42b15df5b82644f6e817c831087e2f7b1a49eedec62a9ab
+6b6fef18ff94e1e1f9f60c445ae93afbcbccf496255b1b64433e445b8eee247a
+18d7e43f90e084b0728f70744f87313ff6fb2c7ac61f207abe55d9bf4f0551fb
+12ab7d62e77d0eccee2ffae62392d6cd7f1b70d29046933384cea2e2c1428d33
+4a33ddac649ec5d4b7a65bcb483096a6ac1dd6408f48102e378cf71dd4c872cb
+772c1eb0ca9c8535a757478b30fae38098b92d38a2972e3f765b8b302b74ead0
+b41dfd21601497bd746ebf9392bc35c358ff0debb36b6800d254a10214e0196b
+eb8150a66c59e0926813c5189a777e924cb6ba0ff1c593c6405d5709e70af9aa
+e553034680e3af6afca2327983165790a6be4850b378556b29f213a78ef91560
+82201faaf9cd64884a12b176e5941f4783bdd9c4ac23cd7b33aadc49d2f2ac11
+ed6b4196e3a1546f2723fa0cf4e74d51227237e5be8dbe5b61e2860100c8a212
+ae75d5fa0f3cf636ce9db565ae8503d426f7eabe413920d7a98c3fa47414ba75
+af6580df563f70c08422873e6ce8e1282a6058f87dcd2defb30e25bb3bea88ca
+c4365dff510d9ea8e3c85967d70d39c035f3083c3624d7617bc5dac707f5b993
+78ccd3e91f5a94a67413515a21233f1b09a18acee0602287bd3a1031e169098c
+6dda3771867c4b6035ee839a1547ac0532ddca75a8b778ae07ec9c917cfab4b0
+ff9298e54fff5c54b4ddf6e5c3c44c1cdf1acd48f7b70bf36fe1a8c675f957d8
+005836caf879933b4290dc7cae52900dd58897aee9f8d6d91270aacc08065815
+3753a34da04548780f70ba1ce29c1019f16d1193d94366b0dd071c323b4b65e8
+e0f8580ab8b9c1818fdf7b2a92a5dd7d4cdd005d5b902135f0410fee82cfe1d2
+44bcd29e599d6d5f95643bc960779083159e00905cd2fb3ac66d4bc2565c4aff
+6b0ad51d1a051bf9212363f5508a98035af3c89748249af4b08253891fa1c26c
+e2e47cc4c3585450162b3e94eae6efbf5314d1567e240179d642c50096fff099
+bfea2ed1d2a1aad5164ee7554deef672219fefc240f979ab9e97e746b65927d6
+ab034d96066e955a3c53b8e3f2f2271e977e6ab006293b2b3c1fd7f615eb76ee
+faa64f082f68bbd8bd690d154cf62d48a7aac61f37d325295724dc0aad8edf92
+d24eac64a11d372d132434dbd70f34a67ecb0fb97dbdebae6d738446949de8a5
+de1f039f4b49c7d637acfeb002b56b1b97dc504ba5f00f18881454aae16f0793
+baf18badd0dfb6b218aacd7d1d878cd9c637729924184c546de16aa550e81741
+3218f217fd6fb7ea6145dc73ee00b0c0bc6a93123706333ff6bd82cc38aa848e
+b014ed145236d5b8ef7905f9be3a98fafb89e811574779f482bb9b0cd4c8fbb3
+0f12457defd87f6576c0c37f542d5ed7dc35f09b1f382718c535893fb1c2c5d1
+989a1245e44738cf6a9c49d80158796a90e98b706b03ae10da2d58a3cb79890c
+0d45d554667aaf0b110deab7535656ee3995dc28b34af6796c52dd0fd682b048
+7dc06a27282d141cc02bb880a0a87756faf56972e53257af8ae9c362121b0d93
+0b8321683cf50c57a463600936c43bfb65396235837910fcc1a0bcb79c57f721
+c3cfbfc40643583d680b3162e12794979c6c593f9c9525060cbc2b77505977c2
+a88b40bd2e25d8aba89801a09ba7aa50c401647e65c89ac200f072231039f7d1
+962b7fd0104e04636114cb84e7317310b590245703e54b37781e473265d5db82
+a19fc83b9725f1aee25ef915815b3d3399de9ece699d2c54c2a39fe2408e3f2b
+84010a6ce7dc04d192ac308a3209dc0ddaee51a502f198b2f74913c2fb6cfdf1
+b39c7051b7a2b2c374cd33463d784da35f96e0298cfd1950c4f2fd7a64050e10
+98c07c3f8d4f6631b7aa1a0456825db870ccd2b8187a48dc6aca0cc86d5c1cd9
+1c062ae412283578268bb9241946644186bb61a71cb80fec8ecdbc2c1254d4f7
+cc02660552a8c46871b574714d9bfe53e7ad6315bf022fc769eee9988e7b8a06
+64d6c44e3642b9d06632ee37449b26d733f6201d862d7a4137142d7fafe95f3c
+1f63107ef0d183f69922c2927c9b244ef4efb28c9b1648423d03039806ce157e
+ae5bd445ca51f3eecb05f104ec9eefd3bf76a37bd23494768306f143f1170177
+2ecb2abbc0ff27ee68face57b720c0724e1afb2ad4405d35ce79fa406102cb93
+d110fe7c707781904e41a48fc4ecd9819cd5cbee4e606a88932172cbc37e1d66
+2f0f2ca2379f5c5a7f554c59ab6c151209972825a4b5fd4a20c77696427ea5ec
+1d30765e4ba579742ee3c719a9d93c77908ad70394669d66321f1200679efce9
+7257b2f7c5b2a68c7d097c8fb900b415b490f386d9f6c439b3067893eaccb2a3
+c376da7e13b14bf196bc9940d0aec3d560c63b8497381bb16625ef73b1f4e71f
+30fce3196c7643c0eb9683c4f311cb41f6825d736911b294117ecd759386db0b
+97def1aa3a7e433b89a8d8c7d1ee8b89e6e6c8082d80e71bacab06ab48b188d8
+f27811d13c04c03967bee4322dde4b2eb76e58249a74397fcb632a3c69ca5021
+10aea31c1f57cc1c9ab15cc2c8e66ab3b9c59e23b06e08782c9217cf8f2c6459
+3b0cc08e7f6c75ee74701a47c9504d6bbf5d2b5468f7270783139ebc2c14de22
+661522d175e3a847aa72db59a991f005bc86622168bf57a3d28c2ae1cbc06ac1
+319c4b8195bb715501fbd26cae0827ff92058d7a228eec31fa0c6eb70554a256
+1fd9b21773a3f765255b6eb4d4379ab3f599c11479f5085cefd19bddbce533bb
+9465f89e493a7ea66cdb039c2e85a0fd0aff5d7dd8f4fa0f618e248c837567a0
+9b72aadb2bf3ff6b9d4307e88c206ba9b75e0ac844848b5fd2a08d5f7c1848b6
+6e49bf533c94346902eae08ac41aba2836bec511d8bcac30986a18a8405c72cd
+0f189c2ccbfce5dbbd09070f0f916ef76683855fed5982bf9b1760420eb45765
+994e8da3f7033a5963c244439a7ac157219fe0a7ccee82804f641591e6b66fe0
+2b0d55bf5f704a04dabc1d5bf63739e6cdff39415a5fc216a55479fa8e7e2647
+643e302eb4205dfed647b3b8b47ef2616df65784347d5677b52e9abc82c18666
+0b786335ac635e573aeffcf8224205d947b0ea67b353640237a63bd73510f828
+3816c87d8f12be5f998b727ae398e1fb4e46e7cabe627d8f6ed455edaff7d8e1
+05dc0203e7c407dc05aaf9b9df596313630f683d408400c6b41ea1b7e05c8471
+a22d583135a9df1ae41b0a2ccb4a739c2844730893585ea7586c580a0f66eb87
+7066491a6835c2b3141fc1dc23e1bb1d5427860a996ebf4efd3c092edc54710a
+ec4da96ba61f0eaf6f0d5d9680bdeba2b6c5fe6d71c3ca7a425622135634cc68
+7aab3e9ca2bbe997e074d251c1e8daa885aad2c9322e6cc85031f9e205baf648
+d257f38b320a958e202ccad9dddeda59a8c0e4939aee0ee7fe1daa0acbeed8ee
+111214437e6695f25b52f1386ed2b5904b2cfa095a8ee8f0ac2707239091fdf5
+ddada518e04bb44580ee924a8c38d681aa160378fc3c76290b21a9cc03f1850a
+6a277de7ff51614e67043cbeebfbc2a473993b91bc7b31150ac22fecdc99dccf
+eba2d8ecdf38f46dead509b780ebe45bd0879b68d9052fcd50e431f299412272
+79afa25fde7a63961c924ff02b0990b938e96683f82537c0073e42e58a49690f
+369813992dc8049111536a76e1d1db712fbe9a9d353793e4b1e31b4e6c836a96
+e542d207c6987dea794d9fb2c23ce8d1cd9d1dc6b13222963320c0f3c5053323
+37744b297e3c1eadcee45dd8a0b62bafb7f6bf33c628e20f40c4aad75f19cc91
+c5832cc45aa9978c087ee415be15681e3abba579d8bf1f33c1208068a8150bd0
+deb3ce69a7cf00852a436a71f9c5065a3b262238910bb60fe4d08a6c74873628
+697c148fe67f1a59cc1e4f9d18d862fdd6bbffe395d9ac79686ecaf001cd9068
+2f6a838feed75ebcf706f01577fee2a437cf11cb392881cd9108223d71a95edf
+ae83dea1f6bd87dd0240edeae67c7ee6ca99b569d15deb7cb52a2c768882fcd9
+846359dc48a34f9c93cf5058d60342b01feac20aaa60ec0973dc5e3af0198a84
+052c2beb9c53e6ac865ba4567e42dbdc69e888f6c1ab4eb7b547a41141578c9e
+75647ad89fdc7c31b34a9ca6aeb332b3e6942b3c41775307a59a86275289dc84
+9430fc23784b0cac2a581e4389b16d17d83d685822d09e47113c3c03c45b90a8
+5de29e346636f864801b043d1a1bedbcc0c610144a6900d28ddeafd5533b5ffa
+79058fa4ff48ce1c7c7ff32024f4e7aad75032ebf0b125466356f95158194a5f
+5750c3022797f5d91e6ba6648c62b7e754fbd6a74b82f9671234020b78689f47
+638850f2e1a57bd3441c51716b6cea8d53a422ad81d7f35014709d2c960a6697
+0d7d8c00b63d97bf188004d78ba34a6f60309bea91c077335e09f72bfb662340
+156cee8710af1551e940719cf9f22d9a0ff51a0981301c4f1435450a0c9c16e0
+de8d669b759bf6796e6653a07b305df4c93e62dfb869c5c4439c79e1011f3676
+c8b71f6c0900ec9f5acaa83b12163a912b0448ac5adb76e29dee0ba832938f52
+895f878fce7bf9d3bdb7b16e41504dc90df6abbc31f2b9f50cf7edb363998de7
+3d77e142281b2d02067bef95da5e7429d4d16f41cfd94f76b139baa0b96576dc
+08e6e8d6bef850f2c530003efa2a12fc493f1432ca635512bee93893be90dce9
+6c65ba7c3472585bf1d37e6c3eba0b9bc34a438fad5ea0799c1bdc674951fcbf
+b5635d169110a70d9034cd19be6d7ee95a06e542968c21cd5427c8ace58f52cd
+8769ad774a2e46c8e0d8ea342fc39c683072bb821fda38c1e3fe34bbb209eb21
+e4d9f44ff3b252dc0df3361cfd671749023b1504e167a3e72c2f38bf20ff58ee
+ecc0bf2ffce73d51cc8ee71a43afaa6b5b91c8b27218f3287595ef75eb8c184d
+5386918ac83903ff8eac18e55ef730abf6262f36b7e3a58a25ba0219cff270cf
+eba11d973e4ac3b3f76a1cb0f6a3cbb03a8c17c92b89087347ec273db0035838
+7398603c291847da22ea02cd85cc438a9bf69cad8e6e1d44898d927d9e10eec4
+209c642383c700e644c9240259ca6ef8eef9c9a33337ca0f866850851e3e62be
+aea1357ced843cca5d5494d30917b78454c78387b15185748a852a91f6f9a981
+c7de39732653ae16f28b7cc2d8feac6da414de43621608e2fd7b2855de0975ed
+3e7ac410e6eedf48165310e4fb817a02800b9ce0be655e035174abfc073064af
+0b999221ab0e169b1afca5642e139f482771e4fd1fca9c2c197c0262094e6a71
+a37ac0c0970d89e7220a1ef66bef84c959f444a0a7bd666935970748c0bd4670
+604614d617e8c54edcd7c0ed73912cc074629d0fdbef9fb6529b82385adc3cde
+b0107b8b2ce9ac4c8b482ad14853f78be96e7b99c8c70ad7a0ebe802bdeeff5d
+b2ed7e836651db037f2c345f63285157ddf3238fa19130790e7a603afdc693e6
+ef58cb564a063050abf1d44ab800d754d354256802068f0062ee06952e95904c
+f3e456831a6c58214f9f48c507777e847a5408e7f1a4eb890dc97503718267b1
+45125ba0e28636d20caf4baaecc17c5545f1b11c73dcf7d1627b3abf6933ca21
+8db138a9dbd295818cce7b4931751c8eacffdf7110d9a37241b12b8906b6bd69
+6a8841a83b3ee2b85752e4cf927751c6cfdf7a7138a4aa5811a1c858e4b555c4
+05833d5ec60d25920de78fb347af37b50f1c3b2f7e087d059406f81ebce8746b
+8ac13758aaac6ec1cedbac0477927a5bce0564c1517f6a20f140a868f1624e2b
+20332bbb61fa5dca68c18a20bf9d1397cc0e991747ebecf1f6305c33aed5055b
+bd1bfcf15007ecb49b61334d1e2d38e5ef24339fe6d66948846a55a88296d2cb
+12f47df17c72af4370565e1f73a449a9b0d26c39eea04125fb9192141265a122
+449ff568a1f3654585dce47622ca0bac147715cb7a1275d02c1d083aad411878
+be64dc4da6ef276ea20697436faa00de144b11d2145a0a0280041e0618ceac52
+5039839261ee468bd1ab9a22a098f195d3853155740005473b0ed526751ad4d0
+d671313593340b36dac33b54bf78cc87256c6930a765f2fd927a3582343bc8f5
+8ec18900b67abd359ce7ef7eca1f1f9411943e057872f3386357300957e9e75a
+314835045839468e1e5d41b890f7f83255c3584ecd26e2971367aeaa1d3cd22f
+22121826d56aff35e356dab010747c2f46d46629a951159b6b69117fd548614f
+ec9e7d0a917402628829460cdb6bc8ce3f93f96837c594eb29c63500866d9ddb
+fe78d09876d3d2f8327c3318f96a1327691195afe12065448493411832ca1a1f
+3b0d4a9593625d8da1b359398827da68a7824255446e6342364db03dff29c917
+e44486cef063382245d06d9fd5a36a5ef79a08f36a66409a2f63e9235a12fe2c
+bc9bca58381b4d9cc7a6d79caad7d1b00cc6520836cf3794901295935bec1975
+8f473e0147da152eb2127f1d9da2500fc70be6811dad855d3a00ec44496a4338
+f89664ef47b5ae81fd8ac944448d1908345f3f0b448a028cae01e0e6c7c12e18
+30299a40196e5de461d5184efe63a568faffcf7c4272a37b8af0fd106dc94e7a
+9a55c62a4ef9b8d29b5d85fd0e596bbb228fc20a84641700ab85b33fd420163a
+deacc45055ffae165c50473f13119d6ce2d5ee143c52ce41260a22059b106529
+b87a8cc28917a38d5aa18029a96b3e095ef78730f4332c4f59eb02e686be85e0
+ddb57200449614b8209fdadf7ca82f4e8051a7baa6501270a3d1f00d99d552b6
+316010b7a51c23709b23849156adedc38379fe4be0ee796986674e2a73e34c7b
+195eb533fd924a2cdf6e73c1a02de2b3e0ce5ff89ab08383fe39d880d4dee544
+3dbddad4fd25d3881d8d5fb4422635e72a9c237249ccca7f926e728de0d293f8
+f5fff6b9f13ff9343df8a1bc3663d7786cb6d520b2a81874a17ea112e5b8dc0a
+b3b81ad49837767e7879ee03a82e7822c57e265be60d0f6b2789a3059b673da7
+5da7157f777cfdcd9f5c004ada55d8852952d8364c696e762dd8f449783f9290
+6b8f1c9817f5b3564c1fbd5f2ce6bdba25bad8a38b29dcc26938a7285577c391
+7b972d3fa1738737089433fedc6b6c11f2d9eac832727abff83342cd4f99e14d
+25e7463585c1be15989a0a0bb377ac009fd8ca8a5172903fa64566b06e2003da
+dafdd852a6937f9522a23711964b30d4fdbcff209d824491c0d0d46e22bde4b9
+4e33758ba1c3df8429ff69142e39d447d54caedd9e65ccd5a92015e979871f0b
+9d88029dfb4c74f286d7711a1dfb1c40fc3b697f3fc8feb4ca281b0027d8988e
+841a4a6ae8660c7c54d335322587693ba4fca91e55df91006a7626cfe30d331e
+5b518d2110e317d71461d12d8a908028c0030dea4fe6ab488f213fbcb97dc979
+4a844abe241435ca55616ae41715df1eb11558fdf3a39e7b854ca99d1535bc87
+98ffe95ff41816bf1d903fd839badcc7ef963f825c7c18079fb521c2c0f2405d
+397972e2038be57a51af173480e23b8b0959573029c386fbef6c0bf83a8ecf1c
+f3d6e1f174fecc45ca6caab7c90211013b552c6f7aaf3e837a02a2c2be6b4cae
+fd267fdc0c24da26d5ce30388a69280465886121614b029130325aefb656f38f
+5b56a08c2c379a8dbaccfebdd2d3e5217f75db4d7b0cfb8952aa192248e4bad2
+545fd3cec2c0cabb48f25817a4dbb1b9a0733f0a220ce533665abddd39a39eee
+9f4784cb26411c7862c644191fe63fa81dd9c69fb2c2f32d519ff145e5ff4ab6
+88a996b4e43c5289274aa0ce8b67bb95b9bd6ca6ba4e86505dea9dfa153e58fb
+ce3acb84b1d5b156ffc84eb9ed8d86f5dd8db7ea1a44a70feff4d03541199760
+0246a0071be64ead64a82f6f370a4f9d39555622e8bc09f4360aac8442c64959
+544189deeea7d78b62953fc6c1813c23f77c72761e56ee70ecc3f07bf4b5ee44
+ed0a6a7dcd4dcebca9925d39d190cf815b0585c1dda5897842e7dbd44b9a93ca
+9afb0344416c7e12f6a69bb9ec3a0a5ccd176839b24cf375c7b5aa63fb020ef3
+86d1a5467f5be498dd3dfc7041627ffc4b9ec0ae397c001a3f7703ca4ec8d27e
+ea5c798083c4756cd0d4dbfae4eb389026f97ba04094c0ed317efca15ada576e
+5315be4d6b84e91b8fc41b4ca765c508db57265a76dfed2ba23f2005ee3e1666
+f0f0ac085e4151f698661c4a69bea8061ea0d86db942164e18f51802ba4a4cc6
+2646865602d3d5bfab3dfd4a13d9127075dada545d9254dd39cad08661ee1891
+40da958aa1d7f9ffbc5d2bc6f8c13a54a4137bee3472955875df9643c71aaf89
+cc4d0b34313ad78fb100347e9a6ba236bffda2c9120f728f7f9dc24475885a7c
+6d647b40e380ff8772532f649a0a8af8d5d577a75548cc53bd93b2d94975bd82
+6058f644a247ddb8af1bf9169b39afa10d810842992d9503e869439b08958f75
+f255cf86e4943cca9ff8190955c4bbe52a22db1d33b38a8ceb231f25fe67d7d7
+1451d378083f32232c5f1f46a654d87705fe42be37f24130ddffc294ffa72d63
+3bf863e3668310562dcf82853af99ab19d16e015a5c52f718dbf998e20316811
+988fbd4e96bb4532e180f9f76e7089f7d15ad1530ab7e3b6a833c4ff4ac9a86d
+41c91a98c6f20c27d816b5cd07924e3dc3528f7cb3922500189f429ca8568af1
+fe89130ebd9c11860be49ad45643ec0d18993fdc9b0e50a166ff04b409a9bc3d
+99215881c09d26949749cf7ca37b0b89457d3b392cb44aab689fd25ba7b5bad7
+06257de81cb1c50d2b283726b050d1ae03fa491189c8b9fc1b22b373dd70e86b
+1d40de563ed4a3a80579255ef9dcddd6853c8a757957ce2907a0cec4e94fc5a5
+9641afbd3cde23d6a31dc99bf9180c35393e8e6fa092f5e0a5e215c618a6eb9d
+421d9eb8087fc539daf2b707856d59c049b650c264105d2eaf3c5c383b8c9665
+7a53e3aca0f93395f70a078369facc3cfcc8b17367e6d88887b4297644309b12
+8f4116185b756509d9df731553beb42e51e78953a7d9fb81f5dc3a149de0adde
+c7f7f517410f474c218cda7880bb53eb0b27d0e3903e1d50d641aaf4c510e03a
+4a0862d2205572130f86502a4fac7ba66e5ded860eb07cfc0d90e908eb7c74b1
+334d1783a3111f249055e620b622a4600224a38ef5ce99fa6689aa9fdd5fa97a
+f90e3c3d0b44a0090b840404686ad0825117bf9fa688c989597039238cb3bbec
+a709d680b9277d87eeffffbc5c21e8b667f1c3830c6feec3046e70b3f46431e8
+0fd084aa78463ecb7e4dcc7b73c046236372f8701397244950dfded1274ef63a
+74b45676af1f34b40a82def94255003583bb3845e92f656d0c553155016ad73c
+21c9b41d25876b01e1592384222e6c8af08f3bce00c1785aaeaff39fac59771f
+858c044ba0a298866bcd42fa82d6e2b1d947d922597892eb38dc8bf3cea0b556
+80d643f58644c80d55b64ed144a03f6a9b2b5471c685c8656f3c19756adbe22b
+be33a8f9b37e9b3bcb84c13171abc2acfd73fe7f20a8f6ece9ad9de3c8a08e75
+670425356ddca1f26aa9afc9f31de830373c71213d2b84c29fe667ab899df5fb
+9f0b5102556158112a095ba239a299b20056c981c17f2c06614a1a0862f084bb
+f420bd958d1d458169124d68c5299d9b35464588e192386347aece5e2a48ba84
+43213219c87812647a9410d34cca55a0a62bbab770ca79b6959dead30f6b5451
+8a20a077406e39d2d126b7e13375104a1ed7239b95a9443b95dc24079d0f149b
+08123838d5c21cb3e8d9fe656c5736306bdd4bb5c88393610947253ad725952e
+7d9b776ebcb6617e74de8e9c62dae3e081078a04c492c4a35f303e0f600d7d34
+eb629dee4f5531f86916dfbbdd1fb9f6b1e385afd3dae0cb6c15f45ee49911ef
+2a8e2ddc4c5e1570f512303d94907fd941bd7f7a053a42f990e7f25fb6f8d1ed
+e7d401ea0e4d3405ef89d47416aa7d24dee907fcdd88cb2ab09ef07261f45f78
+733903e89215d7acd1df74ba26056f5c7d3d0ac61d2718d984c022179c98c658
+4405af27a3c9863f1c8278dbde150addbdd057d5e11587ca2ba42c1e6b422932
+6bd7314e190103af64a33794b3ed12d8023483e8d17ee4f8c0bbef5c9b78e2e4
+f350c487df51e966f985b5ee5da43991da55362f6326324c77ae53d320326ff6
+202a089c8d8aa68c588ad9c82768c1f889615ec5b6ac79f75d95641a500a499f
+1b57a6758c9da836b7124af1d37ee04cf01478edecc008521831381f6225f593
+f371fd87ec832bc3bd853d579a20244c3030b0eb0db3191d900b654f1067b0e2
+d2a07232d032b264aeab347be9abd0d2a07b6caf85ecd57ec87ee34ea40733e0
+94dc88246eb7fe89c751326de8c008fd1b55e2cb07f3b6a08f7a0041540c7d68
+fbc4ece7a2d0184629adc0cfa77ac198901aa5a1479f1dc97a0b3ab87458e1fa
+4704290fc5a744412454a2d3677d9d7565a97eee239a5c5f7eb94793899cfcd7
+2566835d9998e772fb3afd9673b3c74f4bbd339095f2f71c93458484bafe9741
+a1a65b3e15ca5045fbdfabec1723ebbd4e7ab85cdac37df2141af2095e0e16ec
+bad6fe620d2e1b874c4e3bdc34f656e9604c6e33cfab4438324b8958c8a7528a
+4404b2b8aec31bb0420887f4a6f3c3866e370b1466526937851f6851865b23f0
+0245a38682f68990351c12f34e63aa96d729828bab71327b29eb1a96f30c36f7
+65d4cfbe0769864f4a46f037d2798279f914b8b2ae86acf94385c79db5095b86
+d684a976dc1e662c6e02ce94e69fd20a9960c304626aba2a113766c5923dd7fd
+fccbb999567520ff855248bf8377f01ef9dbd6ed1511581b3468d11e73ec622f
+6dfc289cc17026fb10143d870b68e32e6f84d19567e177fd4a48a6f003591c1a
+83fcd03148ba9f32e6ea26fb33e2b7626620acdca5b302caf98dc6cbe8f93d09
+a877d7cca4d52d75f4f39ce9a17aba04fea7707c097f5a8c50657ade42c5adc0
+76d6ecd980b068651e8d4c630827e0226343c57b39d782faa3f9004585cba68c
+ece0430f332e4501d2ca668145020181263aec4a988db312995df391c9638619
+6ee6d1810a9731cdba8632772f844feb41e34e7d046c13f3346b1b4af62f6f8e
+da0026e5b306830c0aaea5f3b91eadc7ff9108008fc1081e0371b08fea45ad38
+ea17df8a9d1b7194f1ae2819a2c1fc1b46fd054f5b98b84e4b221a7c50ccf1ba
+c995d85664cf8646e2e5880d847f532736d4de8c9fdc2f91be71d89b062d2246
+ceeab03bfa0f8e5e3ca581e958a8ccea868216178925614309f2ccb1616c44b1
+bf772125753fae57762c8a617e6da4d716aa20a762316bd91bdd080a30cd8751
+7462a59f7a90200980e620811ae9cdb8903887effe20061f3558ab479f365a06
+2a8cb74720631f690dea945f6149a4e010e73ec5937c180fd71e68fdd9f4b101
+0ef804407a9b2a375a5d742ca4126b102496c02a6f0630a4ee91089a2beef12b
+97f7a7ccf7c2c751aee789ea80cb91291eb2dfc2855fd792bc858a9a0df22e09
+19f5158f584771d9446bfd864fba50582ed52644eb80cbc73b37fe9f8e4f8ca8
+de234351e56df85ea853fc6bd27f5b4f0c1d45cab7dc0aaba49585f3d2e1086c
+1f002a8a6585816270be2953a6e6bbe0accd129e201423582909b00d7bb2c73f
+c2296a4769da723f979915a82363a457b814d97a2315dc448d3017681175b6d9
+2184936f9784d753644575d5ce4f499047871e30c84263722460ade708d0c2ba
+e7998af8194e6d041ceccf6c7ed6d937322b860081a165bf69be1b47490453ff
+0e2aa9f0c08c1856c53015152850b8cba83cb82ac6d21730ac9e00919e78f994
+0a14c2be0065b65351a4d130612afe42c09567c277dafd4e74bfef17c252ba7a
+e0e8480f0e184c93e34552d4fffa5e427fde368d6b1583581858081613e9074b
+a2d0ebc6965254a4d5dce59ca92a857873bda1575899839af87f456faba850e9
+16d06d3df6931f04330fb719a8cc91ecd28821bed1e993863cf9ea95d9e03c7c
+b67490ae6a05e0ca47da8d6d7777ff553477a949fb16864ed0ced4613dcd5e73
+5517d0eeb3b86b5892efd3f91b7a1d9eb11ab7bb7feb32f54a1e63788f3a4854
+a4e16f8e81459838f341e5d288d25ec470c18c29f8e5d449bdd29e40244332a0
+4ad3233d92beb334520f1285aa1b11d8f844d33ffb74edeb98de1923c0ac07f1
+92b887d19a423ffdb409def765678047b774d040f771a6b7b675814b63011cf5
+0584368a865b6cfcb4b124d79d7283df63d601795bf5ef80b747d3dc23276610
+46cc26d90ecb0f3261d1750958bf19925e4962cd95d10824a47cf1406e8881ed
+1bc5dee966ebb033a5af7a74d7183117b380fb848d4d5890faf6691e9bc3d0b8
+ee3edef892a29942544e1cc7bc2017ce7642c6eef265c916a011c4dc8fe47b45
+3e338d4655572c220bb50a1a05df970834ac6d0b91a86cc416eec40de3cf50c7
+0caa0b554698fae5fc76e5073a9ef47b6d739a8ee52758b82811811e32aff60d
+d474cfeb8ddaf5cd242c7a8e7747602aaad0de7f1124194eb3e30c060d3476fb
+43d520389df0b15c44007dc97245ca41f3e5b8fe0b283a1e238b57774472b73a
+da0ad5b739c912e42864f1ca568e7f8b3c7525ab752db196b35937a509e24596
+73ebd59d66a82daefc60b87f8e21a2bc4e85a5bb2f858a5cba43eb83f54bbcf8
+d85731024babb818063e68ebb3a7e0978b45fd02b7f3734777683cda727312ac
+b54f2606bebfe66499dbd8738fcad5b26e749a8806b7116ba138442bb85f55fd
+49049434878537165f2c573241b1c1a56a0f961cfb5a269556f3eabcb41b09bf
+0966d4cb4a0f3682c212e251310347a2b6bbb258f346d71dc4de399a4bc5529a
+dabbe008d511ede8a302a407c7a4095739c505f1fa1f7a51de21b542f23d5287
+2e8ed319d7e867282a407ab35b5ebbc72d96a4cc6d6cf8322d92a82c5ce488e6
+f7a90ca6f5f9b9972e29526031f9d5ff881bf951e0aa40c6b05d8651385c7eea
+48ca375b3f06732322f3259a5f92206755336a2579040d6768c85c4ca0afc4e1
+d28eab5d5f1ddb7d5d4f1a3b3b2b01cae132f4c0731e44f103abd7cdcd0d61d0
+8fccabb2471b66249c4ffc31711013cda5de95918cc50daec85398288439c7e1
+9a2196bc68ad745adc5fd398c3189c574380df2c2e4486a40817c23a81f3f316
+26825bef951991a1208cdb551d300ed38886ae677713f4b9d4092c9e9c76e5ea
+22f1ec6be10e62200f4f9f591fa0255f249739dc710de9addaa9d34ee904641c
+9bcbe6e79a6e4484fc6d0086ec2afa5b8b1926df580af637e73bf126680f9e49
+6e5bb8c21d6a428e77521156f78430ed51dc2e33284f88d78ce909fb940ceaae
+0a07dda0d9739b8a3d2a304c2d9f8cb443d4d4d6fc3047842cda21c0b0073e0b
+b52f5e1b7ddc2048fa9f67486e2496e0fd2d09ce80730d5f7d0f7e0ed91b6bf1
+87683b6f62f263c10b36b01ffe6fb601327450cd5a4cd8ef322277f942bb2567
+0b358456c29fe2f529d334d5db6245c1e8336b29af092689764cb1a19276d9e3
+2b4b77f0a1c3313421c89801f2c2ef5f75169fc2b3a98b69519c9a7c46b40148
+d474e7a98f7fa7cdb85c471fb1171da6de14027baf64315142b75f677ce7a413
+6466f817519848f9b9aad66b34e3be10e7fafc53571da25ea3b449d7929ec079
+bb4c3f6d513b9174a49bf5500a5272fba2d95362a562339eef996944951e61b7
+38beece89882bbc5580b7622f84adcd3b460828aada98e5cf6789dae52a41ecd
+7ab5fcd2dfe6aa11cfe66d6366672c46ef3140f2e0657da447a4dc2f855895ac
+b5a79d11a9e45aa7a457c11b4df4ad291f25a925e4a01dc7a64f848c64f2a739
+bffb51c2531e6717dea38da478ce0c932a3f9f856cbd2aaa1e148a0692a92642
+9d77254e7adf8aecd46a8626b7a31442e2046b9532817d285469f59d971bd398
+b6971a38e6d44f31cc46e3f48f10722641905d7ce093f5ae90fc6a56e53ac90f
+7f1cdf1ddcac29bc60d3202de837fc9d659e30cfd707ceb5453028d1199a8a6d
+87af5bab407c0a78c571e01020560bf1c77936521405c28cf79514579b017733
+70470f68de4e7667237065ece8e2e9bfe2b5d3df69a0bfd8b17ffb8254aac5f1
+d7a8c51d3f93947f7779f368c71c343159eac60c5a671f81cbf2ba05626f91d2
+aa7887e41804f5961b341a5d06b849cb52676311c81739a96d5da0d480cab2a8
+ecdfe115dab597f553767e59cf392a536dcc9d52ce25c424a9b840fbe6413361
+ef591c196e6fd7954ddfa457e7cbb9d5fc00c45d1ea21184f29291c54c353ffe
+59d19239224f9de9f6595d5fb5279fd19278e93b366cefa22b41750cbf2e03bd
+7b8bec58170e6d3c276f8dd4ccc99885a5582ba4ed5253a17910580a7195d775
+6e10c5608e2499df08572d1fcc0ea139beb4f0bffa5e18f7c1c17ecd20a9e400
+95e2d469da5d9403dbf146aab0a04ced94b508bed89375c6253424f6fcb2afc2
+a8019b6fc866646c1b54c32858992abf31da24399f89ead105a4056526d52965
+289830fb4bac1b0cb6a629104dfccae1a688563a271da0927cf2a644274d2a3f
+f90e5c1845205ff935fce3a7633cb8f14e01167b6a0368d2a2e8f072c1bbc6a7
+d6f441ab6d23cb3111d8ca1634cd58dfb4d704c5aac7dc2df32ef43c0fc490bf
+86592326f415cb9c543563e6c2204aa0e58eb42163bd9d7209899abe51946f7e
+7505e6491711e10d5d125fad62e34fd2e08a0ed0028fb0234768f7948ba2626e
+d037619703b922ef43225732aa509b580e92bf5adb3979bd8489d5a50a132b7a
+685b271c2facb092739061b8ff4f49b2253db3e10839827fc99498d5a44a5806
+8d9962908f92343b87f44a8bb92fe1830c362d29f990e861461210113ff1ab0a
+55436ddc38db4bf16131d9d96784f3165fcd0058401dbec514749dad00b6af4f
+73afb28ba5b5ff1a023cb318fce617f5f55eeb0bab7c5bf819edf6a7f81d38a5
+d75355916dcce33cf2b8e771f9730b385c646555b1137e9416c70d5f860a6138
+7d131a9d8acdbe4663772c07722c4e4bc85451fefd08dfccaba1c8f3c251cd09
+3fa5a333877d32ff4d2ce359e6aa47dac276bce065cbb7b50c0e3add00f41c6d
+be9778dc241411d1f9e934be7934c6506686ce7c8d619490f2a3f065ca6f213d
+9b173efd5541375438e9c6e58d664e8a61aa1f646be623688b1934fbad34b627
+2e1e5614345e8e42ef1456785fd526f21078798a49b61c106e23678f1f593c0e
+1ee8c5561147fa5bf38847b982228952ca06cf4549e210ddb6e37cc2921f98dc
+162b175bcddbd5b8ad6c58d59ec66c5e118d919ea48e81cde2c17149ab133d78
+e1f45f4c5d931f09526310f2bd8f0233fed3a6a64be805d626115b35b0b5b39e
+9cda7b197fec956504ccd72b71a29e9526a544957068c9b7ed6fe04255444d01
+2ecb4f59707fb4cc4a1636c37f9b94d0eec7fc12b70a3e88c7325c5524a5fdae
+bc4307a8ee518fb10801bb3ba4e17a2931b5596155171765fcca938fffb35693
+82e0b69a88235c65631e4072e3fff4b3f00a06624db945db691e97986357a509
+5410d64bac2774999f960f332c9050bee455f229061ed099eae00dfc3fb9724d
+ac85ac49b79a19410649f06099df677b8d0b39c4c7dc52e0aeb1d35baab7319c
+f16795131e2a6d83b4f30fa42d7057ff9030c348327c91f1a780209ae58ebbe4
+188d8ef5e354491d38bfaa4626736cce69132d6b1e71f0962644dc09ad793dbb
+368a8e4cffc7a8cb1697ea1b85f5eb9a831458c968ed6b860c344b928d182afb
+677a88a431acf29e76053bd900e3fcafe19cf96146b492cb0b046fc4388c326e
+1f5ba7f4f9b738c11af96f86cab033b8212716766c1d64675a52c304be62b163
+fa483e426fa8a8066bf82180f77909029eb1063b861ff73dffe14fbf7a25cd7d
+73a33d520f6349b76459f83ba004fb60e3dc4e50b4306fdb870f29cd7044d6cb
+20d345621ec5ea26ae9ea8e66dd198087e51e8ee972f6435b82f635c83fb4d95
+585e1f88829beeca19a6ea42157c10f703ae52b0c0df309a4634314327ee3ece
+2ce41c7dd423345ee25bb7f64f5b300002e11463baf80547ecadebca51b18156
+09c7e479883cd404756e73cc8411dff1dad55e88757314f155bf1eedfa94d1c8
+7806e41cbc3d89eec743c50aee90d6b69bea9de11684c85ea5d0a64cff534085
+f180ce75bd623afe1e08ff4fc4902d88f769e1b3221831f7559867e35137fba3
+773f7bf4977cc27997b9da44e1799353cdd563c88d067b13279752179752ad5a
+68f300640de27cf42c42c5e235f5d7d8b345ccd63bee391206499bee8304ea0a
+591ff1b118171c51ba62ececf66006f78d1c56415178b9c144ac2e83457126c0
+cc7266234abbc4c1ff4ee17fc352e9bc830aba16351a937cf1304173f0aa12a9
+f79575ba5e45e6c14b93d7a34001b29df1ceb73cae7fca7f34078f99a72357a5
+c7b040f377b8dbe90bdcced28f5363526bf14f0ecf89c919d53f4c3653528b79
+8dfc4b4244f2d9747e09ce16fba69911dad746356ab3f2db59e871b21b10939e
+ec4fe4d11b49055c5cdf81f37a0484978dd312eccd5e95d5ef7ba378196396b6
+cc3b51de1e27035f62fab5d507b5a95493e2ae54a6b600d1727db436933ec9f1
+1f01d50b0c645e8dfa94f43b15c47b2348c3c387010989bc4d0f7401a024d351
+0914708a6015b66af6f255efc2b86a535806de1fa9520889f566d000bd185ee0
+9dc171fe42079ac3c342ba13607bced1ecb521827c465f83ffd8d45d50a69a34
+8b1f0d3a524776641483ece863bc262f470c3e603b380c92dc8e5e4319428fa0
+a5a8cad19c001868977d6c36c49eec7a4e3068507b075b8071ac787db8a6d3a4
+3b290f01b24b0fce5c77ada9b89704a5fd3de6f5e8eabbc2c51daf3727b9474b
+8e2f4aecd0433e0ffd20671d68f64254db38847ecaa7b118bdf0ba25de5c45c5
+1815d08c82c6ba3dee113d34a1fde725ba8aa8fc05c607487b703c1ef2ab05e5
+575602cc6558f7620e43450f7f508e029693498e2728e4b62571e36e02360964
+62a9579264eb4baf12402284f0bf498d116da62e81d6d3b11c5fd8b0231d3c5d
+009a3b0a5506f2c5ff195923a8dbf04768655e63b48d22ebeb97f8e416925e76
+3bda061a1593c0233ac9c058b5ff5b6f483cbbaa4bac15d89f3093909a4d50e8
+a1f61bb76007205d4abd546628cb3d17202cad80f851ee95567cb313e3155258
+23459f6c8b3f02f7e1cdd1499eb58c0128b83c9086eef4e1479a915e75e06905
+f08ba8678f8ba2dda7a15a5461568c2a44e100e078fb41b49bf2e34a35774c59
+cbc642f03830c29c73c8c8334f7f0b8ae263235dd2acf4325973ae353194c10b
+a4d017e0d61602715e8a7a3fc90adb659da741a39b2dedb707d5446cf0a12997
+f5df3044fffb50bc9b40c0f551ca4f7b012bfb033e6324dd071372e93cef41b3
+8e29dc94fb145e8c080ca7e606dbca4b292ae98bdee61041e733140c638de3d5
+2e49482c182b75d5d1ea2a27cd8c40926b7aec98d97d80547fe840d1ce753797
+e8f903f0c59f5390823e6a15941a55af60a6b0f82423ca76acb3b0e27bf4998c
+2d35e08c4bd4534f0b43facc2b994775ab7c84903605358015445ab8649c8213
+8b1ef913b3c9a3d46d4d9c863c07ea43ef77f04fa4c91f238a5ddbed49629e62
+a4c84190f9ff58575dcf46392c0db97a225d99dc1e7ace1376ac9f20ceae14c1
+8372673772db403747b6067992238fcd257cdc9961f30cea0bc096c77936bc96
+51e8529f52175ddbfce202f38ef4bad1e437fa76c8801b7569c347cc9497bdfb
+d693d6f46e66aeeeee2f2b0d4d1784234064ff0f63a730d0c0c80669ec5b7ad2
+3e68a361a69b4de9663426606cecfd2b13171f3e1f8d278240803a0f9aa067e7
+24170d8ad2f4850e1cbf01f0460561a2d06b32c891f15727fb139ed20fe35875
+b04b174e9292b2be4f30f2fb783c2e35f6a47e5626ec3539c0ca7c78a8c65fad
+8255c95360855297e5baa060b4d0821ba56c95db62f42d5aafe040ab927d6e6b
+a50de0a1fe6c404bc445cd13d1ef1f6f9ac1591d174687f4d5e4b80f8c57f1ee
+e2ca56e6b71ee222fc3b75d9c8275b5ae804c530bcbaf814543b53b3cc333184
+f259717a387c6517e31cdff3742506dd3fdfac9e86a00d15ab09c2f381029609
+d34f14fd5a799f1460472115d8452882d250b72325f273261ee8cbd06dccd1e9
+88aa035ba584ef6062046704f0ce3b19eebb71ec933a174be1087f7e763e13c4
+fcd95a51745025643ba2ec4ebf6e7d08cc2661b38bdd189b68d4f5057cc1afec
+bd5920178b7ec3bf3073716bbefbc0fb0fff6dd56b32995245eaab7d686d61ce
+cf8d35d7ced60e1d8583a27803cc31eac0dba9dd35ac730304c057bc81ecd5b9
+9a7eba791852d17300c6253de776cc756614eea68c940d787656887930b9c38b
+74ebcd963254a3a116f15fd5e0568deb54dd076760fefc82e43ab8caf157f2a1
+0934ab492ba04b727b4a12380d8620ecb36b234ec23ea06e1c01b0ba6172c505
+b5fdfc5e1808c9050c8a9835859d97e4c626d48a3a26e077b86970a4a4f1f924
+2e056404c1c3c750c7e6de295c6b9eee36f1ebf4b7813d335144884068f1d8e8
+adb020e3f5971f627fe12b6c4d39e56be8cfc9855ac76493ed4994e9be17c9cc
+3464585754dddb9e577dcda000fee128090977165fb6bec6e90827bf7902a887
+ae02126496ffb08eb85095cdb4e5cf63afde1a5a5948793b163feffd60cfb9f8
+428ecf3bb84679c18356122b74ae5efd381d63e496750bbd3f294c55c4306df8
+4c4c5bc4d7e7aadd52704b1cc066bdff579ad4aa3dda718db17819884ff48c16
+18a6fc03cf9954436d24005f7d0975d8aa864660aa30d3bb3ca001ace7b6a0b8
+f115b6fe459915616304ec5fbdfccb656da02cae21b5802a9dcf20ae0e06c5cd
+fe92aa4bf2be74a17f7f8f2b338d3a53600248bd394982f97239089f5b7c6c8e
+de8339b8d17adf2ce3cbefccd4e6a6daf5d4881131330c1eb4c0ade5276dd50f
+2b0b4fc97ff5b6c887fe7bf378f58e5dce3d85b98a4a9fa335438158ee3cf58a
+f17b2a4553afa66043e146652c23a69e6f6f747ea368637d4e1003b4251a43ff
+71c4b12f7e2dd6848cb84316b9ccdb4fb282615f89384717a5016a0660adfca4
+7e9545b2182f553d14660f38ea41d327250ee94d9d1a23d0b395303295a6de00
+312ff97e49ccdde1359cf3d098e7ec51df6e7487b4f9b94a69330ec7885a90a7
+b294a8e5ef7e99aaca70ef8531bb8951fa70d28f8e94216ae8c54d03d5fb5766
+b08a89c1786affcc5b771581ba4ca4040bdcb201262985482c346fb3a00b5a38
+332ba95e627431fbcd2811018044d8fd34192c775a0025868c41c34619cdc4c3
+e07c62ff21e9b53ad927b473643185eff0e0af5dbba7a79cf8b2cce506c0f18e
+a3f8e23a4eff5c581bcbc6dddf0442780c00346859988f464557207c2f3d79ae
+830f86148daa52cad0fd0e768fdfddb665f046960da31f389460790c645fc65f
+ae80feb3ac5e96c07267175b41d80b79f8bf05eb5905aa917dd65a95b3b90b62
+5e692400b6bcba9c60df3de780ea6c3d39c3702a4d0fc899e26d5466c3ce7924
+60529634d54e61a992d907923ea6a831f94b1be0a311abc904dab3e0d71e9d9e
+4d87d50e6d99e03b54501fc78c3f57de92f6c336cbdee2f4c03728cdedaae12b
+1e28a0160cc0bbe6b332e5e0442763dda2701556c351c4f81ef3059b06804a1a
+da267bd5e1e0846e23f8472740f0260c9d5c82daacdc931190e7f10011a6f718
+80218742749e3493db5f64b500e53dbb333a87926b413444c0db7b39cfeb12a2
+8d4a45e223e651ea6e6c65f5b1c89d4debbc133c226c27f7d8638a4af9803b72
+e29c308e2c4bffd6285910b9968dd1eaaedaa84f335173fdfb51593384a9d128
+3e2e49c3d722e825f67c77b9bbf2ca5e19e64bd7dc212b7f512ac8835fabe249
+89a19f724e474456b6aaf6b0cfb951d3a522510b5556fe6ac1d993f1ad0ab9ef
+1d29ab40b6bbf4b8c1eb90db2220f3944f6a70f7dab210e0d2bdda392b85522c
+079843ab8d38903c54f2354520cea0a4c1f4d60d2b6d6bf97b9b657982d5d3c8
+4a60ac668bc365240bbe4b5c17ce2c64a1f2afdb01997851f7c405139b3e4c55
+eb2d2a9aee9d4ca05b3d11066167f4bbb75ad5bf8f35813c1692fc2338f70a78
+efd212989488b031ff8239c56ab9c65f96940e45422ec9f721cee7bb73be2a08
+5921862a0a039d658534931865e17607e35372e501562f074a8d7c2366faf616
+0e47317e3667b2abbec7be0a3dc640b0bbc7336db58de5ba26f1f1e910adb1e8
+5172e182308e9fac6a50cbee3e5e22c21026bc31a8ea05577a5aaae1ca049f43
+a9f930ff5994abde44ed4c5cdc4139d1687f30f2b414e106dda8c246a54497c5
+1e9aaaa4d3e2c35a13a3350514544c4096e4ef17510d59eec945a7825f560b98
+c96f5a51e05bcb8878a6187b607f135c69f1dcd1fdf7a88c60da3116c5e46ded
+2238210eee6bf3872c8b95e0e70ba4d7194d4aa51b356e060e2ec150cc9a666f
+4942009188b80f3ed33481d8b754a3e7f69b1913ad6c7a1807bf05c5c7f06f84
+5ea967d0cfdb1ccd8cf14a02183f1e8ee7c20aec2ad2d4882028df0e165fdfa9
+c06159026bcde2f858d7358819795d5460a464cfd3fe23bda12f4096b62d2039
+4be06a2b4b08f94aed653608dd59684cc9d5585a9ed606e2aa9cfa7191badfa1
+fe20e83d01f42f06e8431ed876381326e2a31c230aa834169a18e92a9ef20b98
+0c96bf695b7771aae13d335733c96dd8541b5a6e3c7777093955f598246d135e
+ee64474ada3f017cfed068c9f3115921276f1a95a1a2162f2eefffbcef0c3aa8
+e36f8c45889f3757b51af242c64fbc3d2c04574822487e014daa342ffbb8e1c5
+f0b7c0ad1eaea5bb5dd6b9b36f661e029001b40845d011dce1a9188718384933
+c0d3ec74eb27768cb5dc08f86b7914e2fb3f2b717a1f330c29d91e89888d83d2
+2f1d6d4531109a10f3b869377422cac3d2f89c0390b940321a8d0dc7f343b56f
+a417206882526ea43ffd467c2aa969cd80a09a9eafa0a103c8f8206178749c1f
+549a3393c1deda03623924281f806d8ed881ab7135903e993baad767de650fb5
+17615ef40209ce1ac15201fe094b32dc870208c0dd032ab639d4ce4b8b1e2a76
+ff3eb9f0472ad1bac009e3e9ccad32eeadc5047c8c80aeda16a946b558a4fc83
+6f8b9a897b415920a946bf2c81e2d9421ee21cefcbcc7f9ca6a8242d47d495c2
+158531ce2831f5da195954f10fa375d24d7e4e6a92af21972e02696780333cc1
+ae4b6c6bd8f43fbf196b2f7bf2f2f277e628e959dd51bbfec1d654fe7220f252
+cee9a500071f202a8567b6137551de985d5b0beb267d044c091a2e5066a0039b
+bfb96bb94cbf04dd2fbf7700f42b68c9be0eeac34915c212d5cc6c781c89af77
+9e5acd11d425c13239fa07f0e28f2447d63109d16f909515389fdeb76c930791
+9c4d10959b0b63b39f49af938f109e45e62d2e46abb44a873f291eb4d078dcbd
+c852cbb032ab7533ac8d651cba2f1429532122ff08967da9fbab8eb8e927d718
+136da194ce2a6433d6b92b441a4a9d06577c7c8cb4cd740f5cd83ebe74fde770
+229f7f090351a048893d43330247ac80afc9b28f7729287d54ed1fec1731a198
+a0642b50adcbfc5f9fc5dc00ceac0b4ef68f16cf5c5cdfc5c047ac5cdc26c357
+d8d9a6340846bbb4dc81966b4e54a550ed425b260da1b45a4905e6cd1014f197
+495ccb262aeb75b56377dac775b5ecfdc123eaebb617c48224c1e3276e453867
+65102b0313aa262d358566c9d518ba3c67692881747954e9e87e7900629fb73f
+56537924923a4aec74cffaa5f32b4fb2fc0eb5c599d80991c02f1369721cef28
+dbb86f5c67f9ee5bd42ce86dca1872a382038926277a1b7d690ad7ff52945536
+32db74e9a632a5554221871082e4c33d36f5b0d225f0f75286d8b117e7d2d3b5
+7c334aaefca81df6d585b767004b6bc0fcdfd7296e8225b3af501a5e6ca4b3cc
+3363da4c203513fc473bcf178c48a71e9fb1feb2d86d815d0c684daa1b2cef8b
+7a17ac40531b319250803d658ee867e7beb632307701626d55460946c478ec2d
+55e7f3f71c059816372a7ac7110bb97f6e86a782ea114b0adae033b89455d3e8
+19fe495b155971f926b139f8d003b9fc9c1e612d61508ec2fd4832740b47c14f
+b1f194c3e440e9fa435494135b6af2d9aa706b7516ff853dc3f13c57862d7406
+63efe646cf15a3a54823e9302d870204e8694857f5ab8b8152f6c5332997975d
+2bbc57e321c4f328ba2158850cd40a6227a64195817575c017f5fa090ae0556b
+a7665849a46ff51b36263392d22734551a6c2a4faf5159ab2ad481825fb666d5
+653006265ee72e32c8230e733788428c7a8bbf821a8c8ec41b2b7ab77142b626
+1951cb548c93955bd2b0bbac1b460b1f490a2b6711471bc33e10d412ef004577
+49760ee95cd989440f59f188458fbadc10780dcd6b76633f3f60689ccff06f4a
+ac24d19a052d25bb5247624e1251329b9f6e9200785faf56efc7955ba7dadfc3
+4bccb712a5ec29503cc890f16f14be12c9a98d27c4ad4ae7fe0feb05aba081ba
+004391f5cd198e418654fd240d523ef4df055eec36029723b311bf07c3388116
+bf4da3aa56d5b9e3330aab618736d2a5029387a472b437947e2b9029e05b0218
+912afd8d21d5aaabb3135ab311778262455f2a559e166f48506dab27e0ca87a5
+315d30aff6499bdee67e4137347133a9edbee671d6dfa01ab4959858b2c1fac4
+5aca951a3a87f45fb859d7c7921deaf989a56f12c09a899d5e2c20746d44c380
+a88c5b06697083996c3d7690fe1c268e772a68651fc36936a36ea4ce8dc9057c
+05f0a51898a7bb4b5045e2a58cea600491f21a09161ba7866e8d7f2d59d502b8
+ee2bb74404d02a92962d3c04a05659daba8ed04d8d92f2951863d67ba045f217
+bbb3f09bdcd2676bc970c34337695d053c6bbcbed78315ae82270b4aabf8f3f5
+8826a965b7ee29e3e6c13bb4213b28b0877a91145153f09ef866dfa1831481cd
+87df5322e6464ddf257908a35d2b49a3f41a5767f14f5ca17c0be3ff13a8bedf
+d59283abf933f33d7b0db0bc4d95c903fb422fd3b82c6ae88591d6fb3eddb7ab
+3966850a8bed62c957170fb89607fe22aaefddb22414ff7a55ab50d5f151d86e
+600889da55834432fe74afccc7be5f16a6c63262d5a788b3fdcd7ae98fe4f3e0
+a3ec297ffbb9d0875ffaa52ceb8894ddfa269df08d786a0e29102bf5a8d58d90
+293ea4e6f9d50bf4e7f19c10d805dd5de75770129639be680e06f25be7d07b40
+4001eb64a6b74e701782b42eb03c689d9b9327fd7fcbd0925f95630d3336cb5b
+789388b17aee7e3616e43f935f30608c02acdfba2487664865f998c5fbbe6a2d
+ed471586c5e68d4beeb65597c9ce368b494983548ec6fa4b15c556415bc15b27
+8186864315427c9aef3c102193c013b424e6ed789dbb0d21d75ce2afd3d9d8f6
+52f158edffb99e4e38b6df1ce9421e7eb130dfd305b5f9d88a94fd645a7a5669
+a5a2f447f3f1ed95ba822bbe972e4ab9b75e03094c3f23163385fc551050b982
+9b059a5a530f4ccd5eb0d4ba98f003f95c8f90210012830b76c89792d1898b9a
+76c0308878786c3fd23199701f383b986c8f5cdd99fc86223b3d4cfb39587800
+35d33a7e56428ba3cae9283aab4d5280d952d5d028299d958dac4a23fce6ffb7
+7cca4d88a720d5d47fb2cdcd69a1829235fffc728d6a4b98dd2aae73bc163263
+ec6356d0d9a909a512735263a1ab810296026a7b0141ca44afde4632c5e31f87
+116869aeef9626d5786ed2d25ab3a1cb3adad4beb38bb5e3197f18b678e3f5b3
+8923c5405121f0433167b3f8651877974ccc784d92d9bfdef8205f6cabb2da97
+5e2871b2a0acd7c5d4998f942af4d67d84233aa6ea1d54c8570c3eedb76b0907
+e50d67404fee83fd79623f0599eccfde0fb9c7e8dbd87baecf9cf68aa07992e0
+8ca55e5acb1948f6478102ede178577b1ecf8eb4851742c25a20c39a12774513
+dac23ac5b53be148a4bb4c80d55b273b58a7279220c377b25920c4d89a6544f5
+f73204ab88bf1ed0f9fb756d28696ba1b3ca2ddb292115cefbeb71feb75b1427
+12c238c978bebbb9584c63fc9afde0b2ce3a6ec8e8818b040588187e3f03f1f7
+d01da8632a8b74347ac40b419da45c6cbb9d76c66a97caa79e44dd5803d898f4
+a3f22409aa49c0a837b47004ca324a59ab3ca4d4b8c23f8cbf99fd72ddc1ec46
+205826b8ae3313675fb819e3d62a7a356e68f5b65dca8fc54e98982d9528a279
+7fce2ccf3eed85944bf571173c63b0911f1a34a2badcd67fb385468cc9d243ee
+f66aac6e15ed9add917ec73497ab853675c7721a1a767bc75ddd2a959e95b06c
+81d92ef8773b221334525fa10ce0829551bc0713d1cf062908c439448b56cb3b
+526742103abaa9e254d573728e902bd053a9c3cf044a99e509cb73b8d14a8dba
+05492c2dd922b7f30c120fc1159e6f442cab60ae23895d0318254e5b07381e5b
+1a2eac1bd664a9cb018a0c68b407dd84b17c21457e0c2501662f434ee592c6de
+8bbe5fb8aa2b88f398b2ab790bf10431abe91de30452704ebfb4450b90a99664
+1924960ae32615374b33dfb3669569b69cc60cef0178c38151c17887e3b7708c
+e0a473b3edc9aca81506cc0962786ecfb6333d51cf3c3d01a4f4ea20cfab0b75
+408887aa9cfc740ca661a7edd6af8e0b17ab5713165286d2ce1882ba9302e5e5
+9f02527ded5011eabd72ce5ff1f12350d4e5130a990857e9676ac998dfbc4351
+800e309e314cf6dcf3750f3bb5467fb72de0b3afab584e4915ba93233c5e513f
+d2f63bee7721881aa14a331c979028d7c20889115d626772b465ea0d9fc0c775
+b5edbc3f3e27edd6b46ab8c3a76b0245e14b755a308ef25a8dad6d9cdd64b890
+e169114fb7e06afe3b91ed8071c91235b25d4969ec9f03c1452d22b1ff2137ef
+bd3d7b465154a1966f9b203e94c3f136a92faec041f74af4470cb54208ea6ab6
+c92560f542b85dd9f9b31e8ee2b5ccbe4ce674dd9be8492a161d646b77cbeb49
+aa5244cc402524caabf499c8f2192cc1a9fd5517105999a0338a3648ca03f9b1
+1b486352b68ab7a4816929d4d2706b5561e3e7c91eb5b116fd10f9ec9ea529a2
+e1ed87699193a44c174900fbf685f5cfa2639ded75b2e40fe9b0fced8da05161
+51fc5db43926292602db810b3a412c6f1ead6428aa7f45b4599e611289b31648
+8e9304e1da4d49d67d6217564a1bf74c887a2b595ed2f7a43426e1a7f1851c5e
+97f591fc95625614cd115c03d8a3e2497b99c6b48510cb1e7f556e2d56babb27
+0ce9af4d3c3a37801e1fc28cf9457368737bd90d2bdffc8aa9e03ecc0f8c4eb4
+666936e527dc0efedc81a8acbb0f925de56566dbe14d187a862b43f7c56a438a
+97331856ba272c57653a90a4276186d9f16350ea0f59def08ad5cd2d67316254
+efd0b990048bf4b88af600ec5faf2aa5369ac7c81c6caa59f8dd5c7dd29f0a03
+369037756c72ed98032589a86d9f31267c4932fd5ea2929992035781ef53788e
+f64ba08a3573ce1f4eedf19744737486475480b4afe3cbf2ed608fa651d77047
+e6b016185db1503cdd5f17c8b515f40120f4a676ce153f8bcede25e0e998f7b4
+c9091b98d0364f599a783fb5ee99c24ccddc7bf77eef513b06753e26e2ba763c
+fc67abc3f845719cad166be74e582eb74884345ccf6c265f4ff6623671358624
+5ea33fb16a4a4c4443c3d3c217b167e97c9c0eab334cf6f4f02a61a4d9c6f41b
+5695fbff38e8d4d91733ceee4b1d93b642f974b510b1407d7992f02666d26ec7
+aba5eb40cc4cd100cd964df5dab0a31d07b36fa48efa64cf8c591c04381b3a92
+31c8f11150b820871fa64be805d62634c38a7ddd0855c315e32621fb962f7baa
+44c9f56de9b712119335863b8e08652c9ec3cbf07279950b11b2eaa12ff17909
+40abccfd12674887866c008f06976d3d3aa9bfb4bf064e50bdcf3823b7ce5d6a
+66732655620ea67c93ce77cfe64cd3e121c5ce207b6cb583fb317c1704034dfa
+8d7d5ce9bc776e2e3f7cd965d3e5bcc453842f07fc539dceaddb5d2625078735
+ac550c310d989a98b4eb17ddcbab25e709cfb854880a51109be883d0703b8f33
+c64a47fbcfb7c1a336831f666b18a7ea57ab7b090e54eff27ef90c1795920917
+18ce8255e72339bc4accf7c4a0a832b3ad6d326218954b6ef1eb2b1c6e283fdd
+1a84af455f2b88feb1e445278219265e36560e12262640f0b8c39d5823ec44f8
+f7fb0b0b1396706533621e3d3f1504f526224b9234c3cdcd1623c2025675be08
+89796843913c5bf74ad911974728626e2ea150b990e11027fa99ef57c7599702
+c0c8a8f3bd0a4453abcf0ee43b9d2f8bc691c5bf000c8d39a57e3a6061c7da19
+0332b98c25b3a5eb14181baf64d1ba6e846e962a5a3ea875ede2412419533f00
+0927ae15814e4fe907e6c002aefe845e32ce23a785965f87a4433e3d9cb40146
+fcfcf5dbd1cdf4cc5b00fcdec032af3383ee52d1bb019178b5d64ffc4735f4c6
+2350cea2f0c6c844fa492a097dd45af2692aded617e8a061d2734e40dd12cfac
+51565a595b10c4c6eab692c7d1898bc887f0664ca953a4220d49585b6910d048
+bbdfcf28540d9a418881877dbba6cb7214e3adab8da4c2fbe47e395900428f6d
+4b4b2f318199e3b60476b81d65ba33486d6581a95532ef5a8c4a6182756d1a5f
+19a35a156896d16eb1cbdc3c71c34cbdb15b27fa08744257f7ab4df53312cc59
+5899050b9a1a484c6e7d7d2b8156c1adc9e65fd3a0afffbf77880e596dd4fe88
+70160f117e7f994f1d44d82b290b3412c05094227d953cd8d936253e70bcc45b
+e679f3c37cd829e2210262691d4b4fd2715d235ed932fa7a4f3d6a51cd2c1c2d
+98bfdcab79d94ae5a0c763b5ecf82beaa0346c55591333a2fe74ddde412b5113
+4ecf85c4f33f16870585929ff3a43ca183880c3b342de71d0b50e0caec8ac96f
+84d6c65126ec6e15b475536b0cc310ac9f4b2e878f82c989f85aefb499cf31e7
+617300e920b4fc4c08a75760000fd68dcf357301c58a7d85d259456c19822a33
+33df916e8dab10ed7533e4a5cac1b999c30fa597da3fb3634b8c2d3f911ffa10
+c77152e36ddc54eb66be93aec9d38b41040fbcad8582789037c2752b45b95d89
+748fef565f2a0db42b2a5811388302fd3f66854ee861d3941f833051563adbc2
+ca1447923350863fbcd08df7b2014a1fc656bcc14549abff4345a697e7971457
+2fe7f47f74f6fb110ec6c19a820b9b8b250629ba3e1c5875e05b4f3337fb4964
+a4a4ccb5e2b3022070fbc8d443415baef77dc51cd2fc0e563a60ff115872eda2
+386b73b755eb353d84589804462783d6f2e47c88ac22149f64e5cbf873c41174
+7da691f652905e230e04457643f56a0693083c3ab6cd488d25b2ae3d4d093744
+4e7434e673578a3bf51005f94abbf2e2cec0c49bb157d6230c1166f890e7d888
+af0eefbdeb7a8c8e2c329736fb1abfd1c28a236f48bf45ad3f9800208e2c8941
+d7c2646791a2c6a9f77ff6b14d7a4cb1561ef7d5a1a4cddfa41490ef06be0dfa
+4dddb8323a2ea2db2acf4abf56bf4f0cc6f667d1ffe303fbea1022063007e244
+03bb1e90bb071aad2256fa48458390f293b11cd33588cc1360df26cf9d91d9c1
+f5b300a063059ee65641c58fe08b5ed6fccb1f67e54cfe0076b02ca362a45f97
+245ed407e9f1931206addd15ef3784dad8d867746dbbe36bb2ce156744a87b3b
+a15af3e3cb363c364563a81cdfcde7cf4161ac8896427d02328b951359a912d8
+1875b42c28813384ec0c949a6bc976f6742593e3c9a99448636568639dac3c53
+9a21cdc09cd7bfbc86cb8eda122ab9d6eda9fc0e4eb323431d002c6a8cb29983
+be023d9d52f147d73773c1f1380900e0072662ddde03b7c9d2e4db6368372608
+e0496a71c64ef37b03aaa37b039bb034e6a62ab9847c99bf3f9099a6ac828649
+32a248d723f9382cc93c76dcb0ec3db065bd6ffde538058914c02439a92aec80
+a66aed7b67ba8d5b75eb76e277c198f1f1c2f71565bc0c23d25d6437a7c69017
+c72c73f0fba4bfa80a5a046dfd0ca7a783d708a338ae2eae71790312ecf250ce
+a7fb1b69c6c52f955bf1b7333972d48f6f479e96f8fcbf0ab105b92ea72d0613
+7505068b025f00b576831cd180cdfc27494245d75802ed8220d1dab513e5927b
+083eaaae23ecc085b27d6ef444ec9fd98782e35f45b0347b55499af1e7a55526
+9ecd6b6b0b0aa2b711e5d3032ace6fee06d5542c686215133cb7f158c65184be
+e20041a7d55c838e396b3e50030d4ac5c5831dd6cf3be395aff8d416a1cf29c5
+88149b83c31cb8bc45a3f900ba4daef0564564dc006c44009a8c5967f87ee50e
+3fb7b500da32f03ab2abc380fddde8c875c19701d1b9ed54777f2a33030f1aa8
+def1ca0b3720e9859c189fa70462a3eb074bc25c2b97c2be9813f9dd887cf118
+6126db00de2b454417852b5ae707422cd60b337c63ba1acbdd549c79f0e16fbb
+ac549022ccbb79a62e2fff0bcf1d99a016304e8349fe6c7782f868c7ecc3c27b
+b81fa8c522d9cd26268c3606d529d8cbf039020630e084b6385ffe35d911bf6b
+138a9afa6174affd18a6204e0b67c8ca76c229c30a13ee2de45e35631fc03f4f
+9b1645ada82e4aaa2504df003f8c6f7ea621a0d2bb693feac0e68544e07acd39
+ad72aa50b3b9518e87763a52f92f7d2bfb84ebc5c6c7fd83ebf6ab660b5d39ef
+3b8ad3d47743809397e04c52fb109ff9a99a3dc2f462db485b70068b80546b58
+a77bd668c96f83fecd4947ea612638502aa06285885913c3d0a55ed59fcb5717
+4d6cc24d070d554074890f9a30bc5f749220def451ed203fa509e245d0022dec
+80185e5130ba4c2d55f2ea3b518cb97cbdb99c94b7c71de53416cf63db5662c9
+314bfe5972e405f56d9c64fed47f2403d9a369d9762d045c51a81f49f2dcf7f2
+9b4b2c95386371755169be5ac5c77bcd5781b0024707f89703390a57417224c2
+f3c071030c29c5362d86fe7b0d6fbdd4ae0d5f9d88b0b6b3f3ee624a06d12a3f
+cce2f10522acd3b1627264a10d27bf4e4228daab35976226415e2b5580801957
+580b9b57d264ae556bb8c19aa894a68cc203a4f1c61b8f736c0056a6396816e4
+b325c498cb8ff2163bef8775f0374edee0975c0e12664f28c91122b2ec426e3c
+bc4040b96af0a0e1f1f08181a125ff32f1deb1541e765d3f6c395d4dd72cf70a
+0c8786e78251339ca115ee3f5ad2f2833b3299b88dd51dd6e106312b6d2863a5
+d5be8dcdfd3aa0c23442f5d9f2c52e26b7bcd93f651531083cbdcc8a1983cd9f
+7dc0de8fe4a2e226196bb179f8b06c12041c55b3e8e8919980bc4dc1b7c40ff8
+37370003395291883fe84981a3890f0c7dbe8e528cb2a81ebc8af0faf17a9069
+a7a7c9ed225f696a36115daa94dfd10dd270ae15fe601a9987bab5c9f66b69fe
+893345a4f78534651e6a1c3c3569ddb6f9a055e1bfc7dd93b698d98797ec1328
+a49c6af1fd7955f566b8ec99300711cea2d99dc4bb2c6aaeba79af44bbc2debd
+d43bd144d1d53b6232dec21840790213b586fc630685c69e438ef6d245019c93
+9b506df33da438b20df1aea4a4e5c246a8e6e5d3bd22fcfee85566287ec4f7e8
+8e33762e9475279fba8c2a21b334d6f21f189dacad1f5df0e6de190418609ef5
+9dae7a86830607c5eff55bfa5dee90f611d04f634b19b68f3ad16320ab5df8c4
+ebe6a153b8aa346060bff0f079c765f5b007d5a480acd201cf21205f3999697d
+23868cbea55866d79f3f44bda0140212f0790f51dd9c8d6c1b6eaff7443241d7
+7ae286049962a7a2df2f86d77817eae276876498128bbf9d0bd0d8afd6b7df05
+640a58631d71a56095d048d54e43b95e2f63a09e36286bf5fc9caccc3b353eaf
+3215a65f0bd46782fa6eff4efbb0a35edfdf715e7a0cdfba50c6ecb72808f1cf
+e2fe93a936c821c4fef275c04c4ce10e503216d92f41dde7132b70e78ee27753
+5eb60b276faa9b10b2c485b6522741889e4d80ab8adcd269e598ac4fb359a4a1
+ca313b71d5c448d32f7828b9c0854adb69d25caf61a7fc418e524167ba324abf
+78995886c0a6edfde425d5e2171de85b609152f30305138418f76f9c3d15753b
+0b2716cf8f9c412e553a0b7dd4a3b1aad4c6d5ea4f18f55ea03b91305e2d23b4
+96b5746b9060aec17db39fdef6466e99c99dbaaf458d19a5290969bbd1241fee
+6f8d49448d81521655b7e24f5c4d4f60f8d136d4c62af41ec98611a04a0323fe
+51671e40ce6a0ebc879ca0823b42ef74758648a09bb7b6491ab3c87860dbfa5e
+1c55f515d43d55074764dc43d7fa8c9f
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/couri.pfa b/lib/fonts/couri.pfa
new file mode 100644
index 0000000..2822ec2
--- /dev/null
+++ b/lib/fonts/couri.pfa
@@ -0,0 +1,1893 @@
+%!PS-AdobeFont-1.0: Courier-Italic 001.003
+%%CreationDate: Tue Sep 17 16:31:02 1991
+%%VMusage: 56675 75599
+%% Copyright International Business Machines,Corp. 1991
+%% IBM Courier is a Trademark of the IBM Corporation.
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.003) readonly def
+/Notice (Copyright (c) IBM Corporation 1990,1991. IBM Courier is a Trademark of the IBM Corporation.) readonly def
+/Copyright (Copyright (c) IBM Corporation 1990,1991.) readonly def
+/FullName (Courier Italic) readonly def
+/FamilyName (Courier) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle -16 def
+/isFixedPitch true def
+/UnderlinePosition -100 def
+/UnderlineThickness 50 def
+end readonly def
+/FontName /Courier-Italic def
+/Encoding StandardEncoding def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/UniqueID 263787 def
+/FontBBox{-48 -288 800 841}readonly def
+currentdict end
+currentfile eexec
+9451d7e7a4929782edaf756a2645851dbcddfea354f61d8628b8cff733b549d1
+03a6c4f5bff18e7f42cc7ab902ffc194c26f5e122df5e4153316cf8bdd34f70f
+7f4ac63c058fb15bed425f41d00b0fc3ce2bc7aaf11938e1e62955f527022fa9
+101fa95110e14387d94d5f312dbfea32c17f8467e82d9c3c014699e7ceefd421
+346e8b03a0eeff980f4119e6862a5e4c2acf990756a4c25f41289ed051a09703
+966cddf3bb9f59d54985d5473684443849535c5c052a1a9fd7bd55f5f76f6e3f
+f7eaf762c3144175458d38e0c1cfad096c5f759c52459a0bceee202940109f4b
+7e589678aeaedb32e62789199f908ae2c370138de2b7d42d9fd5f24a1a39526a
+16f99ff43def7d9cc15cab7bd4984a978c5004eec4dec999af4f79cfd01ef149
+746140fcbe1dd3efd7bea7c6ad6b84229d3836f4d7f5714424c21a13a941181d
+cef9ea1d136feb92b96b3e3126d9529878cd620a1fa3e4cde95853533f067ac3
+39f288527ebc6ba9eac0e767731a02705d581144986ea6ac8eb055b550ca00ac
+d031813c1ae301f907efde4be3eecfcb4a5928013475debe556f045ee0df78cb
+cc080be9c5628a6254b28b146328f10163a09a83267de2cad5115f778a369cbc
+84fad9d59d6eee9785bb43e2c96d13476cdcecb6560ebfffa7de0cf4662b3490
+36859bde1974b21efb897c498691cfa294b724a58138e92e4a32b138302362d6
+784aee399bddfe6a40ac7a1e473d9eb34e949ea7fc42e7276591218e4237b50f
+b02bf78be202b0972447920155dbcb8fde70e74df1167fc2ce02a96fac4fba92
+4aecf5f4f94ced70e010eff9147c40fa6ee88c7e5b06e5f761f2c222d414cff8
+12999db0535504f922a533c7538d77239c45f04c9c31a48bded20106cf6d885f
+1f428e2144d399a8e589c3790d572985a9b26876960e31eef7b8ef5430d391da
+9618103b8d95452d9ad4fb2df2fe324500e205f5830649bb6688ce7b599dc96c
+884d0564a73d7a3bb2e2aa12102079ea29ed01340ea9c2e6cbdab1b2ab6301c1
+815b16b46aa4cd714d2454c81a5c65fe62bc038c62f3db91431361a832fa801b
+001999d79ed82fc813e004b875f8f0b69764d55966952482a015cf67587f3624
+f0e94e983980c9ada89df75eea4b6f3c0fec7288b07a51bcaf9b50b7316c4c22
+65da826d30372d94e3e01067b305907a6784fbd29b427dd950a27a4569c9a93e
+b94d553d5698f8f312e015cfbb4e411a521ce2f0216f900eff711d60a21e0487
+1191cd8a870bde5c7d90ef2c52ab892db301513264ae73b2213c6eadb474d7b6
+03e6fba747bd5532515b9385eb4da75f6acdeb8d5225f01745158ee38c574b4b
+842962be90df91632ab92fe2af21f8699e670bb3ace0f4b1e5f252f8a9e836e8
+baffed5e34f70561ffc24a440bb45129d3197476d9446d4d15929d957664c3cf
+a3f238ba39dd636376e86414e7b1efcb42a6079e1570d987916d1c0e3abe739d
+bd70ee831509b8bd6276adadee7fde2a39b015884f5a8dde60fb6422a00dddf2
+84839f70f58cd9674d2a5b3e6608dd892a76425f4a719d999846d53ee1a2ba19
+fd0a7144af29d774ed2d707e6f5c409dd262ef6a1a76ebb0f326165e41578203
+492fd1817cbfe7c20e4e71ad1e708f72aec944f42e097cd71e75e530b853eefe
+3930ee67d4765fa79b2922884a4f54f5ead4f149b3d7397affd32da788d33c0c
+34c7b6b747685680cf8de88352869e58aa05405f2100033aef8e07e465421ce6
+1906499e3a9219bf545a2fc6dab9363c51d28778cedfc72a14124bc174868a5a
+6b077a5bc3fab24ddcdb66ce8f1228f2e8795ca00d158dd85b6ce80bfa2c5b33
+54582dee7138beb45b0b795205263cb3922fdfdff57a077395eff212f13dbea7
+595159bf5fa6ef014b84484bd27d8cc405dca16b6aa3ed6ea9b0b69ff2b160ae
+c0af127322c7f3bed8b8089f9bed60aac6877faf30db93b59e3f99f751c03174
+37135c58c3c43e95681e4254ed00531a086de8fa24f68483db6a97fdfd3dac5a
+6e0296b4f2207e2c301e3e424e49c7c5e98f48bc1a545b3a1b7e4bd5b6829f20
+0e5663995deb31543a56990850f6614abb032a91994f9bf380a8d0a22f6e19d7
+006edb7e5dfcad6e01b9e3d791fc9326862e72aa717fa3b68c537202cd6ae9c5
+d81773186a4c30c5a95d86e6614e30eb630690c78a40eb87c08e6f679ff4f862
+25dce99ad158f978b63c037b51dc5267c11d2d46d5823f429ece0d1b1e5225ab
+092cadb0c5ac32d54404b1dc2b6b340e7b2d0b478ab13a3e53d1f365a50c515e
+8d4bec663f52a818faddde2cb9f05aef238b5cd55a29382faafa3089d6f69379
+ef72942826fc4742e7beb16a452d0319b6b3a3e08bafc4f69bcbe9dbb938e768
+b392c9755bc00415744c0f850c855a1ba009b1e2b3a8c48ae92e4b4d95bdfa30
+aa0b6e310854ce3137885f88f687ba590220d27378d0ea52145b84429071ca41
+fbc3d285a49c55f32cd0d31676e36a2bd406f33a0ad837af2cf35602f9c6921c
+9167ef568466c90308107b918419e3245dbfba44178559abc36fc6c1818aed6d
+91c79d4fda4b4b2a47c068a11bbb899ae064327238fe5b4816dd820fc81a8871
+40025ede257cb64429dd34f9a1632c60eb44f3b24799a8d271b5059b45092b23
+a4ada866e017c76c8f7f701a37169fe6404a9c2f3987f81b9d13fcbadcd2505d
+2793770da0f40850a837fa1ca9b6aff2004b92c5ee6fab82895f7b7b584d704c
+94345ffb2f055d296f79fd2adcb5b1c1604290913b8df0f49df05e637266c882
+c0aab6855aca04b6bcc488a4b4cfdd8314b932f50e5d2c72fe4551390098da93
+060d3b350082b6950e7c9ace10f3063f9c24956cc7312ee1453defd2618392ac
+b8c970cac9a2caa289639c4a3540fde6851e0801f5fe97b278e42280dce79568
+a4d459defe3682ee830c395e0949f8b0e90b43c5c1081b02d28ada072e63a5ed
+6bd693ab68093e99730bad8499a55fb9b50c8a1b7ff3e01735077552b1f14466
+d86462a79e3b965a9183c0539d827686ac0c0c828448bbc999cee7545e6ff564
+24d47780bc2ccb4031214818681f6c1aadf6fc05ef40feccae7a672c83487458
+694df4bb1aca47b5d7922e55fe29c7df4e80d6e4bd4b79402e299e98a89d22e5
+d39073fcd45c50d08224481a9da4ec0648f002e0e9ae733d56823c9504a467c6
+325b8c959e79a08504417dc181116ef4c082394ac90814e97cd63c2b591eb78b
+f78c30368cfd3ade41f83b89dd6ebc2db9bdc9e62c40db51eeeaae3c0e36ea1d
+153f80beba54c411b75852627f45de38e320e3fa7870134e7cd41e355fc90aba
+3adc77b781ef03e67e49a0a94c8fb24f7b01c6eb37fb38cd409d000438b39296
+dbe1edf020ee046411bd70a3100aa113c4be50f47371119570c7b5a74fa60b62
+ae02a8488a26ba8b057ebd29c3dd1d813f29c85049c86d339f32f0ed83b41f7e
+92da22abf963abf1afa56f424c127a23e39a5a2213388827660e1c6a1b016b9f
+834e6eb705a69f7ed8cc981c651014fb12c6de4894bf36a317db98b870d07409
+43144994a4be0cdc78c8b14acb0583b9c6ae0286cfc355c2652e3ce38e4b57d5
+da616ade47fb63fc9ca2d00e118de2f9a43a18d5065c91ee3b57cd05d5ab7dc2
+3cf8c1de80d30a857edf235da528370b006209854fb381fd693bbc060936639f
+3a90ffbfa38d497c5e04bc92ac2282064ded4f8b48a1f0684650e8ec7aa8729e
+cbd4f167f3d6fe90a095ba8f75f03a60cdd5bc4d83afe96faf8e8199c4211e57
+4f7f843cd927b2581aa05b07ebd916989d980e3dabd8140e200de167e0c81f93
+bfa47a97844c1a663bbf1975483989d9357229ab5c774d4222acf58c8da0e891
+a6068bebebc3baf1ccd312a45ac40706486735db1fb8eb68f75de2ba3b640fce
+39934712779c7a27ab2ad4c3467b0d00f48bd23c32b3a2c3fa9b60a26047d7e1
+052d1d8c316caf1be1bac044be3564604892b7d33202142e1ce3d5952fcf0fd2
+faea492b74cdc5112ab8af4dc17997831d98b641d39592a9e84b1d7981c413c7
+63c3ae7b07ee80199900c204b54ce8e28ea28a7efbf7f7a13cb9122ad020115c
+ad375a74983094c289061e23d54b8ca38e8a1567a4a44ba1c1f3489647faff31
+45ba870af754402bc3ef934ecbee92735e8d88f0ed1097247e40257c1fe188b7
+b100222b745d457d8ed2aab04206dd62391fa2dc7b3d728e10405c9b5cd93bc6
+afe10b476451d3edb361a090a6c32b8180bc02494e01ee684313c171b4cd96f6
+4dfa467b45577b795deeccc0701c29fb665e8a20d04683592f7b3ec507cc8d74
+4072115649b573b99cee72393f788ccfc8b6739ccafd4ece7f0fae20ded802cc
+ce4442beaec97cf0b5489707eb9779e9f72b5f55b314e26422a8019c44fed234
+a21f96b1b69f99e0a265c6435bc18edcf6cff798bdb0b9bca878776b925423d6
+0c9941fbfe4e374a51b4f4ab6bdfe767d3aca462d727a364ee60360248c54769
+7b3cdf8913a78f4ee0ac72369545b36a8a74ee785c1013f04ba3a482815af951
+703f3f3359ae963f49d1df66cdc5d47010cd3765e29b73702f9e0b687207b8ea
+28ddb6a47c9aac53b65fb50d86cf716c68572a6e9223ffa141a05856de949f61
+12bfc258cb674114f7a5afed4ac2d75e5ee8e5475ed070342c724be8a8e14474
+b044416541284b470ca3360ad99898dae8194581749b1d7626eb0ced901beb7e
+33b3672d74ca975b910e81f14569c725b9fd9bccea96bc61dfc6c3fb2f490e64
+97c6a20d8ad2e065a697ac178f99b174d65c8d082d9a9fc937bb669c9a93daf7
+c32d165b09e1b9a0824a3072990cf9ad7103ebcc6cb30c552ff984600560d2a6
+ab1270bed37af4b8b7863ed2d10fcf15a88fcac28c61f1e9f97dce05200a9a0f
+291b4d0420a6512e6614c28457bab7007fee6591241943deacbaa5be0edd15f2
+6bdb59adeaccf91b843bad3ad2066865c7736cc8b4eae5a1ebd3009802955717
+0dfe24c72ae5da4261ea8f9070ef1da48ed288e22ddb060220f6822595ff0208
+448c931d2c6ad2e132fefb7528de2b6afd1c6453d798ddafb3eeaf906f972080
+d9dd4539de39dbc3654ace2fbc914ffea6bdb35aedaed3f5e0717c0fbf60f167
+5c9755485c254b6106faa14c995b6043d073a009572dd50f5054879b2c75cf3d
+08048ff3f1957355bafa70ebdb1aed4a7c0ba38648d193b18cb83f90b2610cf2
+df3f4c96a25dc64a341e253cf2d09dbfafd95f562826cea8a85c38d76d0add80
+cabd96927cbee4a1c16d89aadebbff0a7e2632e25e1b5d82132527e4f47106f1
+0416aaf3766916ce6d4ed930fb45cbb2ff6d606323ea3557fc29e0403ae664b4
+434cf42973abbb2db64dabaaecbbebf16547396e751138a24ad9d5c3475304b7
+99e85b57b37ca1060378c8211a99078f8b8e8e43e3d191ef85f4b7a7e7f11898
+b3eeca83053cbb2e5cc421429361867d6631d5eb3c2dfd890f74b504cfdd2042
+6ff193765ccf5ae1c820bdcad46bd1097386d02a59360da1e30b0167e01557fe
+4360050e15ef77f236c833bb7589b6e335d3c7aba5f90baa924d725a7335712b
+4549bbbd20c12398b8c8e8f7abe3104c068ba6db673b81d9532ba41b8be616f0
+3350f14644713b17482bed129bd1c5c2c4c5c3924e90918ce9e7262701e314f3
+cc8956a36219aa6b3c6782b7fe6c91af6b272f9936ba0c819ec1b0fa0a8616d7
+2d4a63f758128e2c348c083050f06a0b6feeb189ef7a000f4ec552377671b0b0
+393c66047a5756d7e9ac38c955d3ce583f94e50b41a0a153961ee049cab60d85
+97cccbe0686d23140adc2fadbecaf085d96d31a8358912989dea8787c292cae1
+7d4df00e359d791cbc932a31626662e0552f79b396a22adaaff556326d508275
+a2bd744f4583dbd8c91c8e89bb70104d88e2faa619020412a91fb03d1b511c78
+ac048f87ae0ce52eee8161a84bd9994d8c4de132a71d06278e80d3fb341ce4b8
+49a4856f5d0bd770baad7bb1338449aba330590a9784447b363872c1a2c7a390
+101e4ac42b1331daacd27aaf670b13b29da7601e05bd49cd62787644ef6f6ce4
+c1e67e3fd2a3923281faff11ad358e756d285642be31a8b36fa372b6b826ab34
+af6a9dcbd37aad998a881b8910552cfd53a03b2ccf128fd5634b30279b854a7e
+c3d87c27da01113b2e134fbf0283f00e6bee34291027ebaaa310a6728b98a2f2
+40fd33a44caf62306a706b5ead4f7e16ade438be5d36359d0aad5da320d98657
+9fe6af830b8bf4bb32ccc46d56f48e769b49cb6ce9606bb0f32309333e87ac82
+91f85441a72bd6f6adc4922908aa822dfc4ec0e95123e35b40f72be615eeef40
+58ac7c03070bf65c5fcbf8b7751a4955985fc42ad26c6b87433bc98f03ce0f8f
+51c1e63c253d32f7383d02c5b8d7c57aaaeea850f13881972fb594fd74b57d63
+de373261225149e899d60daf10c7707a6572e5b61d0cebf985b1fafae29db8d4
+e2e0969bc8351d482d270d93c6741eacc85b53b3fcdf04a931776933e36f8009
+0d15d03f4c51f27e41e1b09a233e78b95d50bb59f80f025e497494a35168628c
+b69da174cd860bf66879831bba9cb20df1fe8a005929b8657ac38e5518b94ca8
+ddfa11cee6f424446593c9ab1061bc6d7d285b4d2ba61dc734f23c68165796eb
+48bb353d874ee8b354ea4ba245f249cededb1a45eff353d3b24e6ae36b4bf29b
+f2f0d4958e8652c90c8607ee99d364525ff45ed28b2cdb035f4a921ff09f7fa5
+a0fe308f9322bee5db6e8fa9c1b928c093c9e3cc21d7f914209ae12fa687fcf9
+b143b60d1b6eddbabe07324398a4dd3b96b38637b979ffdc844712bf1457e73a
+aa66b914a46707ea94d87bdbf964c736a72d1f173b5ca8eeff1aaec036756e86
+2ae63b2a05ce9bfe44dc59c91046127522b37dc99e1a0a40f9189f2041e6d3af
+64adf60b14ccab5b3e0f19075f44f0b24bfe305db1a8cc97fc268136462fe36b
+c18c54f419fab7c9e6cc41ec5fb01970cc761cc5439d32f2d05d7753934bbf7f
+9ae1abc694d25e864601aeea52cf0393a8d99c1e278915970019298f21fb1eeb
+253ad932b9ca86ece282690e7cd815ef823dfe706e31499b3200983d7b2e1e03
+ee85904457f4b67ecfc10b2911be7935059375b5e1f4a59aae648dfdadd37d9f
+92aa32dfd4ad6aa52709ba37237b9ec1c15f089d80306f4a2f86ee4e53d43177
+72139d975aca988ce9fb925d4e8869d9bc3807114c8cff3b89aabaaae6c004f0
+b47d29a951688e253d4b9edeec90537929563e134863a5bc5b14b10c7003b172
+af367f7109a0026ccd1b21b70d768bab9ca649052944b5713df04fa2c491ced6
+42abb041b7dc3afa5fa54a1bd682f2f4fc11028e2742e4620bb7f7d2b6b3cb04
+2cca29b6e140da488a6c015a5405f6a9e87597934bd2eb54ff7cb60b457e3125
+75d1c1fb0e2b263cfc8a36be85418bc089c7ff09808906fcf9b2fa33c37926b4
+2ab5548fa99a68ac72ebed94f9e196ab78661d1603829f1077ed9667f1153b5f
+30527f64b47ead21c8971e649c6f08930b334c052ef16bd8e08ed918b551ff1d
+5b06e6a02c22c325a36a628ffcb7cda2e204a09e6c029dc837a1220e728f3a26
+370f833b16d3a24510de53f83f6295853ecc202053748399b8ababc574b17fe7
+d543ca4269466ac9b2f96a5322b1b2bda825c483f632dca511240c9ed233b5f1
+ecd258867fa35d43126995a505ccd4bee92964493d633dedac48bb516eea368b
+6dd30c92ca794affcf72cf93efe15a5d5bb730dc2ff190b35e7805a6a448d8cb
+91095447ce11dff34debfbd18e88940a93d2b35ff12108b89733a4fef8a8aa09
+4a569660e66793ac5fafc00dd26b07bd1e8a5db3de4599153864cc9c9b5b978c
+939272c070947643f999070239fc0489e4248aa1ace1111fa45a02ace8924393
+d8781113740c2666a2a9338023a4f0c0ffa4c304bd96f04a93edb7b6f04526cd
+6dd6125edfff5a3e252aa049a974e00f62c449c68a6f636fc56abcc3ea957011
+d2ed2932c11f93a299f9c8f76a99c166a8f0b3ab07723601a5360fed33dd9af1
+f9de7d2e5c62cde83a485f7b701a1de173c6480bc2354328736d3012ff4026be
+5f4405e71a1f3c6589bbf93ec9b44e9172c872a23190da0eb8783d864a55b073
+c606eccf6e032aa395a025593c00c1ede21490d590f75e07a0ace72030a03103
+aa6452a75de120ee0e87dbc5100924a354d9bd59b45eae1ac3522f1560db9d4b
+cea57007a8e2efd9eeb415fba88c17b6a262608e03661f78d84d10d2e3ffa3b1
+a6e22f64c77c96606897483c283a61b6eac19867f8ea6d30e7ab1c8426bc521a
+9c6d95285ef146c3f26306048c0faab3ce8903141ac00d34188adbb2943bea3c
+24ada2b77c2fb234ba81b18319141d0f66ed8f030b9488b42a8b77a9ea818568
+33e52373e4af68063a20983f7ef9650b36d756a9914e19459ca5f73de2aaf099
+6b7a4feff0cb044b5efdbe79c0f92be56c034f0837407936c61cbfc5c246aebd
+bbd6d10151ff96e6c9a70c83c252caad6ccb7dce8f8daf0fd9369fb7ca917318
+305553c4065a128d48e72c15e73d342b60fa5cd5cddb4ccd312909f3aa74c6e8
+93e4d03dd5f14ffe7620fa57fcf052edf14b24946c3298ad90495d4ffb1a3efa
+fa2a7fe539da1eb9a1caae17db4d791f82a6f7549f1bc9c8511c67fa7f9a0c4d
+0e1f6b499c20ca4bddb2d01331235306174ddaa89fbba3940fe3f0d90ea99ca1
+7b6068cc3a067fadc54ca07971fc760dff6c379e0da34213efb3e31b8bce103c
+b213d370e9d56a7d45d717ec95c147a5587d8fdc2dc5a473c55682d8e6ddf0ff
+99b84ff7708d0861ba2e173cc1bc5bea35c9167f434af0892b36df9185858494
+9a8c30aa60f56427bc62605639c1fbbbe8b3abe849cf9811dd91e51c7cbaf230
+2de453d71129891f573111286f2e1e3409d655a5aab5b711c827727a1c2b3a12
+3c6e267745c9151e4f68fdc8408cbd61e2415af33491dbcb6213f7f863a885d0
+a0e22a64c414738fdde20b991e8535188c7fdfa2c4c2f7464996d39ee7a6e2a4
+edeb319993ca59cfab71ea429df70d7c13003a14195491f38bfe9ca0e847d5ac
+5b4cead59f46f9a96e9d2da356764c8f9ba7f28ddc44da1e71aa78a1f37f4d65
+67d089bfbfc5905d0d9f8bf91d59fb36368ebe6dc98d2dc30bd4dcfd95f8a7d4
+5e5fcb994cdf902dd0d1e1c6811da7035265c2500fc841b593581a685348cef3
+e7194022c27ce9b6e6b145c00673ec1b5e3b44c591b624be9b98af5a2047f91c
+ecde59fe67573c7ed7059abfaee47366095ec644982546b7ade8fab0405df825
+77a1e716f6c5ac53f6399471af444ab647d20d73b56bd4f691a1af23668676c8
+7fbdd5f36ccd0b511a3ddca6749aade0226839bf535c49aa48c8f77b93a92502
+ba49d66c339eb423849595aab668a0fddf1f05ceab7aeb0b07df1f074f5379a0
+716aef2d1ce011c7f446af69375061b61ee2a5d53070c700cd61d65a19699654
+5749531ead8bab91300d32155699a97ebac94fbb074c047f0891dabbf4efb01d
+183cecd9cd90e4276a8b706f851a9545e24b979db7a160171a647ce1dec9cbe1
+48c67575c9225276534d4954f5bb7980f8ff64d841441c358c2fa6745dd63377
+fba23fddfedd38a275d953dbae7f499e16fd528bd167e35895d92ac4a43f1390
+d18c8df01a18da71936f4f21274a19fc16ac14676e9204874dbd4c5375d1761c
+26a48edba84acea46018cc75c5d394f5a512ee51296607e8dd91cfb635cd52b8
+f789fa9efafb8ae5bb03f7dbd997a9c935a55cefd104f0f9668ea3682beac7ff
+68fbd047a47b2f31e775bb7c014aadf38448734b5077843ca1b0c170f212110e
+0cddfd06af06c11ddd5d77f705354f6bb10c132cc3009c229360799254319322
+09b3f4cd6527dd7843483bb59cfccde571e7f0c3eb1097227206846f4ad2e0ef
+20ccfa79a259dce46351f57e6e593ebad5bab102f379b3d092b4562a3ef7410d
+c31c4e65b0bc5db4a9e62744f222f389b8367ec3b98445d18ded8ff88473ddb0
+bad0e15f159e29f4498a68f566e7f9cb93b8d49f4b896323a364bad3260fd5b2
+18de9ef59b9d86cb2cc3d909ce04da0711a6e609ef5766f00c21c1b0866df62c
+1ab78933e58c6579b1db3f75f59063ac680a2c71eebf9eed664d261926a448f0
+597eb74549a6fdd03986f8c131436cb4d1c0c1c2700a8be389ce3b1599710199
+5f24a9b2a41c0a3d2cd603b0295d93b8353bd96266da252e13917a0559b1b17a
+14f7d6bc5337a70f25f14a530d10a10eb00f9e3cabd9957394fac9e6d7af4f42
+c87de4804b581186ca91a8be760d4b95e605168f28009c8ac52e043cee9076ac
+fe0454370fd4ed08294327d321f6f9269c31702c9e22ad65b7f1d1e5d88ed353
+a5c22be5a8bcc628d35532eb0be85229e66efbe32940d6a0deef0af4a712f9bf
+bc42144f489e4f55d128f3c190c0580cb73e1f8126bd9af51007d29c5ba37bf4
+193e55c40fec90ead412ed8e67ae1706487b8b99a0053287a67f9394924fba0e
+66befd41f5984d869e86ecaa2abe3bdcc88f0a293d4f8d6fededada3c95c63ca
+f315bc533cf7684d70a535397e0a365e51b0ddcdc44695d64fca2f88dc830caa
+520385dd0189477673c12dff1a8a933fcdd35ff44b378054a388659bc7d34b18
+747e91e762106878133ca087ba8745055fa56b7d55be79e87d1b5393a1e354b9
+37ca1ccfed929827205fd7f4c488c9771c4ffebd7ad282e35781db53a4980232
+36afa1c8285393b8babefdb39279cd7e81f552b60789d4b3e75db380e5f5e146
+bf710018254463c6fd3afe5d36e031d8aef7466003a59e02b9a33d47a984e10f
+1467571b66c861dad8df92ca1fa8258b2e050905f754428289f2fa21903569dd
+4f41d32008714e3274eb89df20e990e1f5f8e374d9a02c1d6bc259292c589a84
+b1627573ba844ce758650e4b06609876a3358b42dbab955c6be52033a353992e
+e992e1508ad495437176290ed1cfeafc4f810d1127ca707e632aa22a2adc7ce3
+fd75385bc5b0b0599d9177f2a73228dd510bb6136d02bd456f8a4a7fdd7b61b6
+5beeb68fa6d07ebb2f326a9604a45dd1281f2fda33a2e392f61c0b2d358539db
+8abded8ac63f5bee429ecfbb646482bf5233c568d9808d2d6d1223262d97cb67
+cad55177ffe979dd3d75f23885195d30e1052932f9b0f0b69f56d20a6afa3e7b
+716383a3af055c83d81350c49f3cba01202ae59fc4917435fe2d60141c4c9b4a
+10a737b86504c8218ce86564063ddba7e1f79d348247fc9a0e66ae45977943b4
+33314c4d62945b734ee2cff74e2251e57bafe2d7df36aacc16c4e7e8317a99f0
+cdb643fd9bb8baae7554a3ce36f46203bf90ad04d4308182fbe1443e5d9b06d6
+0f690e546f14a3b59e88c73f8cee9e14e933870e726e57b24ab26a42d208eba7
+6bb854b2616ea206249684c7deca7a2039cd56a8b61516f4b804a8e7cef8f7d4
+64d43dd5addb534af596e512989402c18e23ce24d71084f38ab320c95cb9e812
+d1b1e0a5985229ebee8c939a4e520e7a6a9509328969fcfa8068ff6d7d0b2554
+2a1692872457f852a723db78280fa52f7169b8a781429bb077359249e35a456d
+70e023cdcba49da955831be885c3cf2cc5f70645c66d22ba02896edf191f6b39
+6a475fa8ce12caedb99f36fa1a152bcf0ef1ed857bda26d8fd95a8f47cec70e2
+7bc1c1e6b526ab9f65b0dfef215e559f8e83b2fab3bcd7a84805bf30d6302b12
+3f04d1df11fa76fb79a173c3698b9c77a7696c96965cc63647dd5517ebc07c65
+2bd13ef9ab6b4c85f1138add1aca375e3d59bf5f706951a378801bc3aca40f34
+b3803a4ff311d461c636c05572e86af42078ba9e791887eba8e2a5794a39e119
+1eabbc368e55362f6d07a4785469815210cb386fe46f837187c2934158c4ab17
+977a1a7c901ae294523c2876955387f47a44eb4eb669e05fd34a07eea12fd6c1
+18e86e83837a76ff03f38f3ac579489f2ff340b0c3ec3bb0f2e57c226dcac005
+fefc63ec5047983995465ff27efc036e879267677a8ec92b6ab89c5cf347d25e
+68ae8eea58c00884e4061b05b22e8cf4eaa7754046cde1ff34ba093712179848
+04b598e20ece471f32f99b8dd2cded970c6aaf98250cd2a93ef2b539fa7ab354
+27c69e31bfcd9e7a5003735d4a477051fc41261e2fd14cacaaed091a2928cd90
+3808bf6f43f1c9c68bd3722eae14fb308786562abef6bb2cdf044cd8b0b26518
+45a0292d3f11cd9deea8197b2d5a33cc78d2c9e14a3289c98eefa1b1ea91eb94
+fe8b9e0c132a0a3cbdb70c9ded02a644b31cd766bcdb7508ea1f1ffb8a9f9a04
+f72a3dceb6b16673d20a6b7acd566a955247ba287cc74e6007362553bdb98102
+bd5a1a1f8df9e1c1adb8f290f659357b592e8a325ad1f9cf74136b576ff926f1
+f37c044961104de93de26a01a2d98b8aead9e113c47e9179e7ec06aa5148d1bd
+d00f415d4aa5a94293f8b0266587f463ef0db2d7f10749d072faa586b674abb6
+56849caefe4f8d74710aa97549103a526b89bc9d286f0f0b400cddf827afc178
+3ce120cbd1e6bd83bdaae22dbfe752158801c42460b64518f8c7a374cb23617a
+3ec662a90c324985c4693b6e80b88aa2e96f7d35323c0999f56f1f8db37f9448
+d6214fd1099b4a73065987a236a4353cb11051c1ef75950c2c03647abaa98615
+55907189bf0147ff0c5a2e1db0627cb316fd2e6dea8f8c9b34fd5a58ee6a4aa1
+7191e2b5a08818b72919af8173fce5863cbeed9b500c924a55e58252e710c648
+d41fe4c020c0fd607b08a4969f3fc7bfeda3e20897669f2ef32511e08e9207b7
+305e9723c52a16224e8d0f1bb7cf6f7b687aa5bfa61582d1d07e980f91fae736
+8b5ccd687da89c884c5d199518d0fc9b0e424e740aa04cdb52510b668c09a3b7
+ea5a527074cace5b2c4aee3c846c383a1c9acdec4a0bcba9e0b3d05aa81b573b
+14794a9961ba4d80b4f308cc38f89005120bc284c67e670e35238a3a72498be5
+b84a88daef4ab123258918a4bd292bcfca94049ed9b7310834a0c6d1d1b4258f
+e410beac79f5d5e2bcbec6206421358fd7ee8d5090539dd3565ac9cafc9c2768
+9d84a692b06601008390986d834cc44e0bac0c773b099501c02800247a1c81cb
+85f8502e773fb41256c84725fefc59c6f39b3696ab0bf812c3ad445193b9dd02
+1efc04c8a1e13b0c6161134fd0679c029780537d6e9dfc33f8b30b2549e8ee6d
+360d5bfcfcfad3083805e8ee6a54c4802c8e6629feb6a291ec26c9c393fa6049
+aedc546db31ab6377913737976822d44ed7d41325146f691604bffe6da0ca977
+821d9f2dc65e7099ad3a07b3cb2943b9d8e5380d8287a787de997ce19d37ca09
+2594b973b56e58b0d14977b4180f9753c6ba97e5de6f268bd0d9c6a81009d3c8
+1a0bcfb206e17104f491ab5a736429afa5954c1a65bb7df664b7922c4bd041aa
+4a2a0bedb4fecc36c0589e22d20f961c43e19aaa3f372bf4536644c19e0b4922
+baf7b50b04b6f7e0a6702cb7972b82fdc443ffbd22144dd9a5747801c587ca08
+815578b8cb6580c773d297f4fd1c087564a90bdefa63ed2eea4d44a728c84d89
+102537f5fac46638aecdc4e07ee9bfe2981f5add3d96f49976bad8fedec4bd19
+b352cc3f804a5109f058aaf9bd6fe1808166155c89c73cda60287c9f00e234db
+b787860ba0e02ed0ef5cd7eacbffcae54064cbf5f0ac568800689bf02341cfbe
+aa1902087ced298dd82db84866ed704b83fdb7e28b43154084ccb8beb437703d
+b3a3215417039df5532da395a2d5ba64f2c19354b5541390d58c9ad230675e8f
+0ae43962fc1a40aee6906e05a517c949eb03ac9763a33c232b3fc0b728111698
+685cbc993a0868b467bf7df14645d70739bad8dd0e3b10317ea9df08ca9208d9
+b7491ab3732fc730bbb33f062662db76df5622999109e566e7470d2d3cfeaac3
+f7de6b3d715ee3055126843b4a3d0d2f7f4e671da66a2bf4eba18fb4ce3abd5f
+2fec20771e3647980766da5a9e5618a36e0c1c1b37f0e2732c7e0db107cdd357
+005a12ee4449f8b57573ff8b1dca68ee16875845ac77e89b8d3ff57d046acc8d
+6e8930a8484ad26389fb6dbf0df6ae8b1ed9e689b6dbf205e3cb24f89f54f6c1
+240c693a1289a36bd5d286aeb94452c7d1238db5e904470bcf411db0db9b1a9e
+97684013ad8e8377147869490ff59cd008c5a5104d08ba192f96cf9752e3754f
+3e7850bcea027eea59aef4b18023f4b364423087b56b4c22e3942d6aa6a16300
+08703e93bf8a55509284cd1776b0c8c40777096ce1dc9aa6b5fa28e8a0030d39
+a9b64b72bee43f829b544172668b358b3cf3432f6d838ceb488f144e4b500ff1
+45a0edae69c61b7e457809392cde962540f36077803aec3e5e637b9ec513b623
+830204a7f532d6ea27ee2c4a2969eddc749c0dfb0d8e059a9e18347e094076a1
+15bc162c4979ad89aaf5ef22a715eeef6aa356e39f53e122259f21ddfd91fac3
+b8b6df3c3e91644b30102a9e656e6542926c13cc8401418f1c6b84953e527c3f
+dbe3e76e2edf034b63f68c1905409b5f03a2d5b1bdeb97dcb8987c06f877603d
+0c8bc8621836c082310de2fac8584fe5e453c3cdd1963093585942eedbb099c1
+1b659943eeec493efcfc13a1628b63e101a0a40ffac0dc492f03062dc18c3665
+d0b7b37cb756fe6102bd8590705b9de712f169514b8b6aa528e42e36012e0e57
+1de7c4cbd8a2097f0b3e4d6b240983657044e7184144db4d790d552e9d7198fe
+b3131ab841d51d2bae989ccd6525c6f8f52f536e9a8388a760402af7572a42b4
+f49f652dad74c2e3296aaf7b6005b5e3a8d95507c145744f071c6f9e71c43cb5
+7760b0413ef195db30aa604b362de810c56d438311cbd193e540c68dd86b296d
+2b75aa450134ce06d0084c2b52e7afe6e061935084759ed8b7bca87e58985741
+53255144a2c75fe57209787204a562a2d5a8ab5e14816075be42e56a062a695d
+13553f37570985410f780f849926da1470240ee9246d36cdc06082425e381abf
+7707eca0ea73e1ebb268494b190b020cbfc46d54e14bd0ef6595d49ad50fb1c4
+13b1bdc640a3a249102f3057855bbef5f17f1ecee2323fcfc5f85ef23a75e114
+8ff0538bf1cee2bdd9535aba93abd484d837a88c36f6270241205a1e1b0f50f9
+acf34b5175d5c41d93d406a606ba5a9fa4ad177d73b2d8e830fec7280100b0ee
+65329c638ca69430f227ffdab6d8535ea52cfc4b31d6edd1c888049499cafa73
+51d205e533ee0a11e531aa5b7cc7daef28341e15b6c868535afa65529ec1fb00
+ba680a5f9aa6f90db191db3c0a19bf54291beda8f02f73e692075e1fbd287bb7
+1ee34421d52715b3a1bef464d0af2d367dd6be9ea9dbd2926688c09ca1a0e1b4
+3261a0008201f1663d471a3d758b28f1c5a8be1e904502e34eda86d92b8d420c
+09febfe3f294e01915a8feb99feceec3c3a910c53b475eb5330b2541b41c701a
+d17c810a269767abd65426b3e95b33ef098ca20606c000a8e906332e25e6471e
+0e7d662bdadadd4ec64b301b415b8b7adbed32fef6b484809c8e8bbb98d058d1
+e68fae1442178c9a357ef1239b8ee076c7a04381f92aad974589dc543a4513b1
+ff178b50671ba14780cd777efd5bf09ccd81c2ed6e3bc723596ecba121403fa7
+e832bc13e5a549c311001a113e6c35786a65e654f83527e319233ed4130d20d8
+c2bfd29ee477e639eb1493d09078266056bfe3cbdf1e3181c607ddc24140ccee
+fa9c2774246f2c93e7e18822f967b2d67035476dff57f0d9fabad245c3f7e287
+351affa20a22dcac4e8709ecca97ce660172a5a896ec58bea7f2d45ced2b4885
+d27b124367b65de5397e773c2829755972821c8fc029d91ed777532a6404266d
+c3e40c32358049c6fbcb6b6e0827514d8064d0787bc4e232465908ed25db2cae
+e66d3160836f0ce4a9fe4c06895772f31fb6a0a7db32f965845a6b12d3c018b7
+321e63aed1d54fc0429ad1a022c44f7ba340a3d584cd587cddcff7fb299513b9
+3d4dce430e28af6a12515359866ccd441c912c8f4f1bccbc00a651688a909516
+567a8b6264da305812330d6a3482b2869d3e108ce3d7884d5a53d20a84f08fcc
+359dbf9869295eb94e154dd58c6097a8feca591e0039cdee5415c768facc86ff
+1784aa20e914f1bdb3938a137d09359d65d5351d5aa30c46d57444254fa97fc5
+2aaa91b4c5a350b5546a1c645d28d60c9e2e1c172810c3f522a6a982c442d262
+0215def70617b5facd0ff4813365e817c207163d58af491169d5170871c4e353
+2cf911c2393cd627c73d591b500206f420e7ed5128539ff74faa798ae990df72
+d72b7c724070b67e0c032b086b11760f7abc6ca32788fc0f382282fbbb30c453
+9a8f3c793cab5762afc63b996421411e25bcb2466f1a2eb451f20d49e204a006
+51bb615f14c511c57108d08139afe3b1caf4d5e26af909ccef2c4da1df7cbac6
+445c366d5ae5c8c3085411ab5c27a9a105501581c57a26270f809b6d6396bf89
+025115d2e8731d378815abbbb637d13ddb8e871374a58fef87c6586a47dd99b5
+bd8c4749ba5f1f340a8d3d4f237c9c5a57dde560443e1ac655667ad624fc9462
+c18a75317bd8b0e953dfa96871d6a00004fe1823264e04966227cd079564bc50
+13ba790cb1856b33e3b857a5e9fabf0dea0cfb18fe337d6a0566a72484631396
+e5b5ad7cbc0dea22cd13a8a4f077ba1872b602160a9adcaa68aafc759a78363d
+35aac022ef55bf2c760fff76c16678bb74f3a9206a85a4adbf6b0e3bb4d3e4ee
+b3558f6bee823a48f62071eda0c220023cdb400a28251a2677daf9ab2831bccb
+32143cb4cb8ec6a7c437cace06240b09f6a8fdc7786f02af0ad7c27747495c09
+45d09871028c14ad33d661bfd0ef987570b10838af72315ab79c7e4186ceab72
+322b65635b9c2e839a610505a43b82f6e84a43b2b501e5f9727baaac91224f2b
+b268351a72fd17d87e951d1014ca44199f828df4efb0beda1906f858374239ae
+1f8b1f957b8ae1244119f72f035bb6d65385ca0ba155bfa9c97d176aa1f66b3a
+ff9190159758d211c45ed2f1d6aa919409e7c89ab1eb46285fa3f062b4069319
+515e88cb84306a498a4f7251619a7b8c6a8ef6430a65da49563d82e908785b70
+bdc12a18d08f7edfe7dd8dfda3c2a13596e15af4570bcec1eeb14d29d5ff662a
+2958be2cd3333c3aea2f91b20972246d9a61a7732b238ff9e233cf311c49bea9
+a83d354966d8e964b0518f0f5f16cc003b589a9da8627101e51cd2ff759157a4
+8a9d9de94c6d47f1579d021482b8eff62393b1285ea5e521ba09751b9b722d77
+1690529076e745164716242b6dd41ef4fc5e95f15924b43f75a8c689f143ae87
+f5e7887a9873697a8c4131352911a8e50004468c72482b7a38149e7abf8534b7
+2388ed5b8cf474b3a3b78ac89e840697205b569eba2e85e2f6416d41149aae6a
+9434f7e8e95e2eda2c8eb78925345e59728da3310e9d5da06b3b88569cb7677f
+f348e8ed02296d1c2d4523a0843936592058e916dfc0524a8f240dc760867dc3
+0eb44ceda8f3d98733378ad7b24795574cba77f641a4498102296c985f9e8098
+719c0992a5b77292db052593bd5b8020c8fe583a46e804c00c715f1004e627e8
+bc976f9208c6b3c19cecf6158f27a80cae345ee464b2eb14ef033be31ca9b0b1
+a1dd40d025d2fc0ec2e40900a596bfd205803b1f4341933e0a998100e343fa04
+9de20c2534a06deb43f8f3d0a2a65dc9dcfcdc052282ae177f478048b0c1916e
+e599a29d36fa69075254e29ca1d158d8c7dcd2f7aa643a3a391380dbb5258d6e
+75ac53529abbc2bd29c803285d2a6be5089fb84704291d4a6219c040efb8f439
+07261d057541ccecc7846a3b8710c47f35a490a5078a6b4271e429e77782f315
+90dec87f91023bb8c9d9626b8dec28f4f15a88ad2378abb01c8ed262075f6f96
+6684c0b0c987daf6f52751c00c45c390e3929e7364b1959d5860f693b2e2385d
+5dbaf080163e6922b88824f632ca07585d8607d9e5af14980558e6fde1008972
+fb77980aea10e2fd441a0186461a802572a6fc72e64925d7acf6f60f3e5b2a93
+fa3c76bf1963936286f496bedc875a1c6b51b4edaef334193de9f0a4cb00e0aa
+19de0a3ee0b1658deb23de3912ce82982f7666df1167794e707a5dce52c620a0
+7a8d93ec150f53f2ec22528ea4514f5e8b47159cb7eaeaf5ba779fa274e34245
+1f0969e3315af81bd0fe268ceccd1f20d7ea709a3af61ec7726863ff1e5c2b44
+5d6c1da0ae53a2e62dee5f7f1a518eaddd3a9905f4cdbb74f62a16ad2e9a3ca2
+16a2eeb7da59521b43d9b358fe7fe5b252850a292a0112d22be0377b6be31696
+e342592437c19cf0e5fbce729c395fe046bf9412a3fb11e6182f53ad1124e129
+244b19c5dde1adba250bf9a82daea88ca70fef20f81bcc21bb7547c65c89ccc4
+8a62a161a541a984e6284cbf2e1158f053561ba3c6da02cf176afb494d1e020c
+dee46d50a8dc700e6b71742dd929207846dd02ad2e5eb5d0db70d6267305fe4f
+d99c1f9f8c260cc8e521d2ab0aaf5baee24e2b7a168aeb971aaaf2bf207593bd
+466fa0a2dc24f2951557d02af2de5a05ab226b2fdf7d95259814db46e9e3f069
+12ae5b7b5c93a3b024922803ef16112acb0a383af5142ac274010d4ffa4ee7a4
+b5460fc628b6e8ed5f449a4e879c8af7550e7ece8c63fc00b1f31a7905251a6d
+477e0b9dd1b42eba39041a54db3ec7349280eb9471f09b507e2c878a5e9aa8d1
+3f6a0d3e127ada508e3685a272ca56afba11347addf873b229fac5b047e2c950
+258f7d280a9cb608639702ae9e78ab11dec0bd348a7b9b43a53e30afe18ba463
+36cd658c82171f41750ea125f7bdcde7837c36b8309f8c7ef757a08dd3eeaf4b
+4c28d8308556afaadcfca572e9cba9ea6bf5ac682eb798bcd62f5e4d97a8c6b8
+71d0de906248b1b103f461aae6eb1ee2ee0283cbcbd662c94468128d61eef30e
+838075f383b3b4606c160bb9e702c2839224342685ba8673d284f80858530460
+5b82b2d44ac5ab01b426bf49a38647870889fd8c62fc5c34d3565aa0ce8d74ef
+1fb14c1cd8d6f4f1306166698b0fc3c0446cfa14c6bb2d9f6ed7d7361f8fd573
+d4e032772529fe2248699a10b305132e0b0e03f8c709ae75034468f3252be6de
+c005ddd79a854116edcfd4e17a04e5f737df69e0a6347930dd7dd8cf460563b0
+e85af9fff730731f3778faf6a95d696075fa932491fee95b206b652de5e35a82
+0217f13e9b0cd0f7156859f1484f3ccefbfeefa8ac8f006299f7ee663a1da3a5
+142999b6b0520696a17faf2eb7134e8e2b37664686a6bedf2cdc70fc66f7e970
+a0476a91340719ac17958179770cc2c0e38a6eb46922af669a531aa0e927fcec
+309a7b121fcfa2cef327c4e71ce6a7fdaa611a0db34ddf0ab5250b8dc6770384
+c49ae556dc1a613e98f20a3792699275ed4d187c87d412a15908b6832d95ab4c
+865b2af89c0e471c46fbc6d0686b36af4b12c3684a7f45d7c2d9d9817361df14
+7c5e95c3a813daa7048c0028afd43bdafcba03c5c74309501d0494ec31671d29
+b30cb884d9748f0e2b7a8d4e3ec11bccf9a491905628d2c4b6b40f8bb5d0b9c0
+b0acddfc846d84487e9c2e7f0d82b991ab2ff2140770f2492e3908b6df2d86eb
+b23af04389a27cb3ad0dce5528059a519a6092a18f3a2b035cefd46d885d4654
+24029359070136db35c346acb8b288d36dc85aa13231fce659d4391a8f5935cc
+c8e47200f97c15b8ebb5b8abc023d027bb5e8211d0595548e0c95ea47bebf498
+76ef585ad3b76331c75fc41bdd44d82671ac32fd665bfdecffd4b8fc61255e34
+58476113b59bec5aa15b03d623912276f1ac560c0cf18bd9043aca2c28e805d9
+d03de88dbcf10aa9d7d0b1cedeb5270871f632f7b703fc8eb5020e76a638bc75
+40cadbab7cfedceda58d0254ee7e8e48920b21a7cd38cc350cc6b67bacf468a8
+a246fabc596a2675c1fdba8cce35c28655d0e82755fda8a8b5bbbdee98c30d91
+c81f08cd0f809e1d55a046158365e04f224656a6c46a43a3f79fa2d55cc6e420
+fba22da808c4afbb03f6f7b0d33be67f9883b30a1c1fff85f78badad279de4c9
+77f1d9f16a5b9b7dc8abfc85488f117a5cb317fd5c84fc1e59ccf695892e6ef9
+26dd71c9a6c342a877406f0258adf45810746c1454627eee0b7ccf94ceba76c6
+7f1ce137f97ee6025a23ad42a4cfc2ded9bfe7e206f31a63e65bbc3e304ba088
+4f0e0738675e2a4535283045a69ff637ad95c9e0b86d834726e2ad29ab3a03fe
+71ec91f8c8564ccd0069b552ea28867440145f767db71486d2e38e5a0a3c6099
+b6d3b57ab4513a0c25897b46410c783297a9b280f138bf91bb17f4f5d5bad5e3
+f858fa265cb1c1b0d0d9b84426f0ee6e4f5ff5deb2e50ba82d3405de51fd265d
+3fa7396ab39ddeebf8bd2b61af0090e349863e88c9a5a280c4693b6e80b88aa2
+e9609721b4747b18008df3517ed1331f1dbfa46b00155288b7783862ea9e6498
+52ca1ddcab6c190aec0e25927e8526cdf32030cca61f071325cda7e0dafacf8b
+c3cadc3ddee55640a7c627beb2ac0cb38e3bfa38f9c3a49cd7a400be740d5f67
+e59582031ac46c467fb35622ccc7b627718f858abe34a43e5734a74681ef229f
+757dcbdb302475577d18d5cea044dcf3a8026ffdbde20a2585fc84bf53d6504b
+ad3dd458ea271e5bfb498f9289849349a0c8935843db2382069eef873895c978
+341bf3c1c9535d13ae4ef05f135588edd96bec9066045199a8e76582dd9c957c
+2fdd24cb36b53692448ee0db7b1689118fa13ad5f73107bf0a59fdb32a958438
+6d9ee99dbe469d3831f43773dacf2a228276d076b9144d6b70b315658dde76d5
+8b949e998c0f4e0c2f5e2e888bd316001cf0c981e9c89f69ab39c6892f658eaf
+5c754c0fcaea82eeb8a443cce68fe5cbc857d99df78215f00b222f799130b7e1
+8d985455482cdbf5b9f8eb096fb0966aecb5bd5394f4224d85fecf80632fd858
+ea3aa8bcb7834df7746ac013d8b980eedc405df342604a8f87d92ae38e5f758d
+4ace6d05c933347a85e08e6b796e6bb59ed8c7fb72d1ac04dbf57acab8875e08
+a5c4d4092166ea473dfa9c3da7e61c53b2249515365cc89ff4e5b6f4ab5d2514
+9b2f24ede7e8adceafbd8ef9d01a89500bc0ed3ba5d691dcd4719f70527ccf01
+ad15912e288dc397de28a0ca73837d54ab4f67e36dfcde2d75bba41fb152b312
+0eadd98894d332b20ad05436a75d0874a18fecaff6077db4ced96a6e91c2e4f4
+65cdc8e73b23299317a7ff4b4304c34ba43afd9768200e141a7309eb837223cb
+be451fc43db69dd2cd3b1cb6b5e879ddeb6990f19027ca2d15a90d11d999e519
+d7ae9f87b009ffd95c5d3b5f8d0ac22629797ce6374451ce62d659ed1da0a826
+26ad8021bfb2db4f00f81b8e524b217e3347c2f93d9140e817c7b49ee457b9f8
+1f5b49c665ab2468ae83b087f3b6454913f8498db5d8f2ce02af56f307042c8a
+290bdbf72c24ad3678e0c527129817dfa5240c03ed78153e0cfe712f301372c8
+bf4b82df2ceaddf1b819b828af9bd9e595009c1d96700a14a2ba9117a04dd425
+bfa4672d7f1d70df323fe6efbccd582ab3154358212cb5e4d1938b097185f53b
+8da80ba35ef2bc26b88b8b0df9eecbfaeb6fe80893eb48da291b5b6674c009d4
+b9a473c4e191b673d693f865946ea5c448109eed42b054cbb3a8b9bfc1b30b3b
+d021e90f56634c81ebfdfe6d00c97824729979b3e58481a0f6186093e4c74807
+04ad223b1a696fb51777c5695bc106ce57811c8ee455006f60bab6b6c43f1fc8
+c524674a638ed65aa0597ac1ed7052ab3f3caac9e62d806ea31ebdb359b005f6
+75c57cc36147841fcfac56baac914cd697fa2052eab5bf27d035f65cd0fea717
+ab06306d5901ee083f929cf13afb5a54d000f61524707cdc090cba1c46868502
+9b2469b0a29ce0178d61b66ce2f6b56d8a3d725687ee03611ea42f31f29c281e
+8c4dc1a783171441278cbe383473f7f6eb4ded8513c5e14edb793bf0c98fdaf1
+1e939330122543d2725d3e700e0dd8205e8c1d16bea0314f5a1e993e0bd1892d
+cd04efc67b855d03208086dee33d0297a853a1b913e71c7dc495984f7da86818
+7db70ab6e86c974a4983ae863927b0456534abdcf265133c00c42115455dc665
+6c1c683a43b373a1602efa87f4b3a1be04da20f7f51dbad3af313a5658093b25
+5156bf9693ab3ba5ab071cc5415e1eaa29160f8090968fd9dc458cc8830b500d
+14682c560683dd5c3e2745bd9935886053181ab7d323e4b993587605ada1d9f0
+42473496e8e09f9af27f287c29fd4607a7e246fa3e77666ef78c0a0ce9c3c10c
+5e75ef7385aa2078d8c98453449869d40d39a720e345779b5e20a3565eb47f78
+48bca3ca0e04daecc57db1a18ca96ec60b6ef42deea17246509dd81542f667fc
+6d3b808075d84cbd3ae5821ea71310369f5b31c13eb0d122400dcc9cc52ba85d
+6a7d2290af5e21268eb0e837e4830bdfe930ea91d4dff36ea26b2c4547437336
+4f5d8fbbb4ced10bfb1f3afa9e804c31c08057140e178d37408ee6f10b1f2054
+07839a09bee7931628b0720cc62160b3f541b2658cef64da994bf8adddd663e9
+668bf56e93e92edac17b9468bb02b1d90bc4dca43a508cb33e6d1f0ba5ef0f3e
+cf43109894b73cfa7484484cf3f18451db8c0993b339362183d42edbe0c1bc76
+9adaa253eaecb81286a4c9ee0a89ebf9b85c5ea0198dffa514a192fb872d15cc
+f70f773dc58a8f1f05d710f1de541327eb795bd5b3e5bd01dbdebbb33696242a
+dc92a04dca1323151227dba59dfb17835f5da70889940e3fb886ee4453bddc3f
+f02944799dfeba4b46272ae29aa6748e5408b90935a481be47303e5227f2e230
+5082fbff2bf084a05546d32b918ff8ef71ec86132f28a52777189ba8d05b1d00
+b08f9a78e37bea0b42ea7f48f53be4d72cef03c72ec948a4c23b16e7d3b54ca2
+6cc77493f5f2a767c0f348a0c85c85c544b0c24709e52272ec14fe72c719ea24
+61a1a842c599d4e6b8f175eea17429415bbc70b71433047e73c2ba5c4998cfff
+30172a45e39f7fe86ad780ec28b9cabf4429b55ae8aeb38d6027922e985e725e
+0a4aee85139bc1d3532e00b80b389e9d4c8197d0083323a495aa6ff75b613bea
+94ba02977f79fa5752418ba6b1f4def3e66440985c525a581e6b75bf81997f9e
+7d49bb437b500aaefc8423c1ea3aab735f87f7a17958a20e2de998148f6d777c
+54ab5a128ea1c37e65d14f360c671745a2911313d174f12214818ca417e38670
+699371a1f7ddfc5c1634bfd34ba99cfcdb86daeb368e5c46d79b974b609448d0
+90b832c1f958142754571fc98c9cd0270fabfb5e8466ccd7f34e56c52d086161
+d6def2b38cb28a5126a8c0f233cbb7e5b4bff2e0eb4c8474d7e0515b14fb7702
+5fb5c21ccf4827952e2e20757ca37afcba30f4dc2b7e9a66aa9ff34a1ba94156
+da92b255835e8c8dcf8c054393537ed4b9fe616b1fcac41724a19abb7a1541b5
+d3e5208363e42adbacffd409b8ed46e410bfbde876c1b77fdff235bcfdcff0df
+65998b975a24e2614a2a8ba89c2ab9f41469b409ec9e0a5c4234de73c630f870
+36060c9f9f3111586739972b638da804ea935ef2e74adcce254c9efe1bc00667
+9ac610b00a9c00a1e3ff36f5e982504f2fadd1d6c3d458819bb0359daf480777
+4d7e2cbe16f16afa47155c1cde36125d5e89432a508832c13fb8c7fd5ebc6440
+49814c8fa01838117f6d298baed8cc1158ff99d0a3a6c8e5231fb6aa4db98baa
+216a556c04bf0e6f39c8c30f39ad1ec64f4a0db2827652e8d354a821cffd4dca
+d23876224ed57795ea129d045e387a45bb88372e47757a16115b9ac149ccbe30
+982ad2a9207b175d2fbb72752e8d3dafbf4ba5c02c2dd6a15fc0490dd0f6324a
+ecc2523ed53e2d5fde36b3acdb5609d70809347bea983fc6db80888420d82722
+7d1d237567be0c9c24a585c52fe3cbec727823fe2ec67152944ee35a65e7a005
+37e096939e42099a3cf73e4633cdc85aa3b4a2511e27223e0053fdb65eb85df3
+54009e474bda07b6a07da75957e621bcbe7a1e9d1caef92565c5a6c73664abf5
+fde175a64314f6b166351af7acb166b6a0bf596288a5ab613b80db91ff50f7ca
+17e99d41d493031d1a5b5038303f091153cd08300ac6c3cc15860e33fbb3394d
+e4b383b97b77d8ff0c2707fca55a838e0a2b5089fff480af5a50e6f07b29945f
+789aa9333211be2ea8e425e00255f5a3725cfece8d262202a73db785b39e3188
+55abbba63de9c53c24bf11125f6f0d3b412f777795ab86c0cf9d9d43a2076fe8
+828085480e7adbc77fb137f8bd8cc8d26ee6435e7e3b2511e7a7d7a19d330d17
+e7d797061428bab2e7c290fedd6c0de9bdc2c5b6b2496b8356593c570bf8eca9
+c5aabe89434de698fa17ff0c08ec3cc13b60b4c3d3712df8ee02ab92a71cadac
+3f4cc5e69aaad92774edfafd88d95ff90c9781d9f771c143b9918f554e3b3497
+4f822ccc3e473d345c7c598271e59456d2b1f75560fa36b02d75d040c23fc511
+506955ca16901774f7b4b9d2ff9f4e0afd79fd66175c0dc634e932566d067fda
+e40a710edc1c893e919da8baeedb4ae0f4ecf0ede9f08e43dbeac3e62c97fceb
+c434c60ba5c80d15f79823e25563e2d746baa0ef31ff6826c120ccd9c2323844
+9a48a624790b757f9f8c03e1c447c16de51104688d79c87461f610af5daed900
+748acd52bb3eb9d975d128adbbe794421c434cf21d0b07c33427b81a6d8a4c97
+49e24142d669e8eecef30f35a96390b81ecaedf8bf65edaf9fa12adbb895d631
+986008fc95aeb2df5dd57a4e09582d9ebe82c685c856769186f36433400f1be0
+1daf022f7c217099e520d05ade233feaaac372f2e7f2067119925b801698ca24
+12976934dcd628be992734365ac6b522b098c7f3d788eb86f045c6c9fa7ee89d
+2d84a923ec1a6de6dda87bd949867b2a6d6f910ec58519088ed577531c624d32
+bc7c62116630a4ed7af8927fb6c4f4e65f000c69910841fb600e1de1c6a23f5a
+a2a5d199d79005294c66dc160c38a880a11ec92942c01ff8ad5e5693f132b238
+12c90045fa8d0b60c6b868f0c7d2a27815e196438c884d2d82222125d2219356
+555f8a67d48a13b3662e988d03a2dd3b648162884b715c89d7021be05917ea43
+d1be90113ed3b3af434ceec723ac4cd314527f560bcd83e7cb3a764fdd8f09dc
+f1f1f45fa4a47afa6401420b1a2a6cc0f28cdeaa0c83c6cb35fec7ff2e432270
+78d283f79547d6689b5450d02fd13ba6096e37b08ca096d942cb94ed324cb63a
+55c9f171cc29eda44d10545dfd8bcdc4afcb26191f92d0c61fea1b106769e9d5
+234112650aa8346eff624a259f3f6833997038e24fe4b74c459b14841e2189e6
+2842ea4cd2693bd162a9e90ad5ad3ff82bc6ed2e7978093b9bf4caa1012e6843
+5c34f01c470eb39483e22a1e67faf26fa74ab7434a682072ade050e72cc73123
+1505db7a7b2512ee6f8cedbe6caa06b939a440c9e5f0d5497611c291fadb0948
+1b19186861938233bc62228b15171612f026b677601715bb4c5b1f2ba72db37f
+d15c629cab69bcd96ad1a6ed6533b09cd3f6049e6d214caee58d4ed72e9f502f
+9a9f5682398dfaaae732b6306076deb3921685b419f41593a46e3cf4f7de9352
+950d1f0a6843175138e8589d22efa6c4996098ec3946aa1fcb1245625d7c4e1e
+d18abc806cd490f103da453ccbd52db6c97ebc5df69a3f94229994bbcab8805c
+975b57fcb6ab0221a1c1c553cb64ab882cd3ece7da6b13b0505950c5d58ace09
+fa7a0e4ad20be0733d9d540918922c588bec42902f9f8278dc0d6729a31c01fe
+7f90292b8c5c006035ff40f28498f88ce4d9981abb7c9c80b915f8c12062fc89
+2d49b55e06e3d1220d1d29c7844e96c259bd806ba601a6e6a1d9f34f15f8e10e
+945679f99ba204fd1b7cf84adacd615e858dff1365aa779b241c58ca6d07ded8
+81dc8c5cefc435b9ebd7139879674385c860251ad25d08745165e0aac6b46c61
+49fc0da7baac61ba658ee976689ae42c13d2b36f2fd0b526585b6098a6df1f11
+a3943366fab8eb81c4fc2f1e510b4452d23c41e47849b1f15f992e9428e8926b
+8a28f15206802507f5dce36de4cf257e56dfb6edea19c9078658c32212005db8
+5eb640885757fa5fa468f7267fd0d89dc2814828c5b1113b7b276093854b5fc6
+88a01863a861c535e227e98949aa3db4062f52a88a0dc7ec40d7c8a92e972982
+a0f7f6b0eff29154b5d0297ed270948f05fdefdae6126ee87a8baa0469512ab9
+c2ea9ac48d5a01d9160a3e38eaef6550cb05dfeaa33ade4de76f4ca4649c69df
+2ea79a0f787768b7300bae785977076d4777bd0c76e7bc23f90fceb533dba7d0
+b9ce8ee3de306315527bc84ae9a14dbae631881f485b88412a5d56f4e69438af
+33ef583f8e6516b1bb7414318cf785444cfe87ccf1a31af08f89c574b8394a0c
+7d260ef39f50feb4df3121ccae4ee370cb6a769b40292d559de8cf00700cde64
+439eb7ab50b0547252b14ea1c88fe9c6f3b5ef5ecf8ccc010d488fc3c91c5159
+e0baa7afdf4af77778331e7ece03d8aeb6de3bcb9ef6370b9fb01855bc68ac19
+476a442d3c5aa77f9280e04ef51960b53492665b3a6d0e5d95bf545ba3b1d2f0
+b80cea9b814ca19fa6399e2e93280ca1f93a9ff39cf7ac04badc4adbe383fc59
+e81c19fa691c829cc5fc63fc56341b724209becea74960adac6e033e07838b65
+20ef9a40db38442544133888acefa9a6fe282e745af83c5e9d9acbfd2c73df57
+7245f691e3012c8ab3d9aae16adf1791f2de33765d2697a3c9cc01955d138831
+87b46d44db880c7bbfb5f9839b4800c592ba0e96484350221080f457c2ff80c5
+4794387ebd07cdbe2dbb0099c078d7ce26c89cf4d47f52b5796a6a861c2c3bbb
+c28fc7321993e18295721898a059af827be695a1466572488fff3b00aeb24306
+743bef6b9616e0e69c6c123a86049d2038c9d58b13d43da51f4a31b2ebd6f84c
+c72ff201ddba0047d6bba501edc889ba84bdbe82845df10f6af17e8d32cf3c39
+a8e9cdb6fee684b9053ac5bf867867745c661b4244a6e9d416b96c9e7acf7c7e
+bf3e65a396917f5f3362091e221f30194efe419b15b01c2c172dda86af46b1b2
+fc5632820d48e1292694a3869d0550c7256eea172fd2c2c51b52b6a9204bb040
+6aff5c3ade4d44e7ea6b259aee7a2a196f96d8df445f6ba0439787a2f9d56dd0
+b7e1a48bb48c564f83397e299bb6e4de0a3ba3ae171095e1f29b30dadf456031
+237754be8fc42ecd1a5c2c47ba0a4dd454f9ad43b772a43f10b93b9f21456aa1
+0a6fdcb3dd43c9e9fe0029a3d78ebd534f1f1373caae0e69cb63551c80bcecd6
+ddd726fe1b8a10d46e0daf9b028f13cf4f2e248915eacdeebd403397077143d7
+982fa3be9b3690f299de482d9d9d30d1a3c73fc0f77a5642ea70a5a738c4a203
+a0ee361178d65dd9697f0ebbe7c03945e9797c2b4fde79d251088b54dc011dac
+2461d15a29f76fdc80e3ed21625a1ce5ee5848b32fae9fe6db0ae668d5fab8d4
+65dcfd42cfbebfaf42b5a2a604c429c29031dc86fd90161e9d25f7426e485171
+d6db1381147bf66d92fa199377109b05723c5b2dabd5dbc157b89b7965b07dfc
+bc1271ce306d95d2c75988978114e451e07dc5ea5a0a7ee2c4b5b560d8e63661
+52b8175c258dbfcbe57fc8f1369238118ec7c1ea2c8183a6bddae0def782d71a
+9f0e4cffdea4ad89fbbb351c139133936b7d8331f17a14faea91b0fdc69f7b28
+c63c13383f1bd915c08a74801a12342b690288c0be035bd5001de092b0b0e04b
+60d56735d50b99f9810588aa4231fc6c7ceeeeda1f5e420c6e8d01a0db4b1b09
+51057283a92739d75e494c69ee7fdcea905eba07480addd991fd2b7f066f84a7
+bd6c7a24a3f7632c0fa1965b0491dfc426e9efa2dd53c6cfe9c00bc1ade9b3f1
+54943704d3ef3d40cd97ff5c28cc2ac0709d9e765a06ebc729f16b442bb7eaf9
+6b8382db843cb5ac8c3e404b765ec45dd2b4ed24ba321d019592a37b2ac208cd
+450dc7107b57a74e9b7381dab65d48548c665f7c9aad56dbf5d8bc64074b186f
+abfd2d574801fa6ead0e1d00908456f361f17ba2c74c99ef7e26b7e8032b65f8
+ef19777bb992383f1f10d363fe7bb8ab7ce8dc304aacd1b6ef1b6b65d2d41d83
+0910a514c3059bef3f677b92fd2601917842f9836eadf6cd62a1100855bab14d
+225c974eb123849a23514d1f50c622b258e59cc367d6cfcaddf27630eaabffdb
+5394b86e724d634868ccc7e7991bb2997631f8fb35ef850076128d65ead586a9
+95cbeacb7e6de8edc0b369742cefcaa38775275a17a6c83d0a81e323fdb8bed7
+05f6261f7976f6f505f6c97c12f80eec0cd381a048ee9c7a8a05595af297dde8
+79803975697c31da784c5ca16c668d3b7503b3aae5494a4d631929870f9e603a
+38e311ec4480e366c79d4d03c533277c4aa585f99a32475fc691c2241b00ccbb
+c55c1e9b14851f815b162cd057f1bf85984a3393aee38c0b9ed3e9722495bfb0
+b13eac7d28d2aadaee2b280e48e5179743528efd7042ab6b7ed6dc2f4efbbce6
+ad43c35a3a0372814b1d64a342ca614d5e601827c1c18f8a347de9573b1f55f2
+2a3a3d709e17f7727477a45a4fce29efae3e16b80b6df52a4abb265577fc4178
+0ea7a98238174222eec322104e04dac53af8867b5bc0334b02f634602191d4b4
+960b4f482c46862a86e02f4c0b496d1a8108cac762022ce6644b4e6092353146
+c9c42942a74869c9351b3101bf15421a95a7ca34158a56e7de3a7d45d4fd2bdd
+f1f5b4e5b3bc9f7320eac4f94655e8a42c7799314376d6fbfa29fa8f836a83c4
+c1fc3dec65d28c408d8f4460b12d6c63a323c0533110c6b6809d1867110f166a
+3b41da821e59fb8c8b75068dcc4c8f8db77fef2e5d5cc965cf091b9f47369fa6
+1c1f5f5d501b11ccb9f43c3235f94cd287b944ff7203034f0985bb163054afec
+484e0e6046aeeb50ee74ac84186027cac9891b1871980bb94de61a47c7379204
+cd8662b17cf066567c9bba779f76edeb13d2ee996655def66a0cf0cc59659cfa
+e416a40ce4b7ef774185e79c76545ece7c498db03fa717a591f9aab08c167ec5
+f2b4d9bc25478aa6697d0edde31041f185c965b263acfb2399c5695e42901822
+543f8830ea58e49ec7189ea0b6bdbce349ec55346fc238a7a6c4cd6652c6c30a
+b5c8bcfd382e6a1fcb1344323db38fb9829e4ef506b21fa5b6d58a92657c05b2
+09adc73d93897867cd867c915cb7ccac7f1170f9a6c555ccd4a097574501b6b2
+565a57e5c1df5adf39c5740ae63016da9a566d7a830ca624b5b4c75685c95000
+5de2d662500107686eb62b3a8f7f9f72bd6071c85518741da3b455249d84152d
+a165aca84daebf9395d469146bd4e35452d00f742905c9a47ae2040e136e8e62
+38dd0e9c0901ba3a9c3216226c44b1f80e41c212daaadbdddadeae082b016305
+54798bd555a251d380ef952d085457041fc51dffb6eacd582ce2e7cd1df623cf
+9237da7c39b2167c7463bb427a7199588a6cab503aed16238c68c250ad9f1293
+b4904d843ee27e2c1010ec9f4d1190a11d986e8ab56ebc5615134d52764a3ebc
+a9aaa1b7d5bdd1ca23bcd8fef9048c4ec2fc1b60853930fe82c133bdf9021102
+15ec5dca1d137a14e519bbc2e35f93508753fbead6543c66d40b28d828be75cf
+2f2d3e116b42ea71772e07fe42f298945232934fb85f9b046e8fc56d843f0d5b
+ce1594c5bccf37117111cb497c1532afb3ab347e3f555ba63bd47525407004bd
+8ac2f37f632f253ed4bed95afebe62f2316c225f32f1ed41fba0f84d49cb80b3
+cb5503ff106053ea70540e3732b4474e5b6e1d53aba1b8ba36b1116d2516d883
+aa55e8401226b175450b8b4f1ef18d55e377f7b40f305a6df691d316a0ef17f3
+8cb4506398258e75cf230bb26523d391fbdfc331a74c64fd06b14441fe966641
+4469ab2f3ee113716cdf0415fa646bee2afe4dd3449dd1a38f4135ee5c4c83a2
+4faf571b0385d2a2a0b61fe9bd5a047999028fef216f2ba0dbd678572790f66c
+c575cc82c4825aff3b542499519f82f4d1833c2899b5a46e7a64793c291c7238
+da8d2c0c7ec69978d3848957062ca371c8808f6d3244844d54a49ae57e92adcc
+a97bc421d8cf01e3e2fef019fc2d9c3ff6edffa264e55a24fd1b7c32f4a86285
+3f9353aaa19e6918a3fe84c798e019eda844a5168397bc875368dfaf42514a20
+f8123edc760c20356bf81d8230ceb04730d5d7ab947ed143b6c3c772350eafdd
+9636db454174c0de1a047f0e30370cdd4cab9a1f9d8d7f99abd8494ee82836cf
+c73cf595a2a72807f133a8704172c069cc63cd317dc20d28e45d6690c25949d6
+6bd3293aa87b0a93d5675c42636a8837b71fae1945023db866ea01a774b5c2f4
+6ec4b86a3055327f28b179a6a93087b15e7c6169b7053d76026207c41dabd8fb
+bb17dd3d49e63686638b4611b43896d1c7697e352c976c26fc58b4e1e08df30f
+bd25f93e05f58892bc7f07c4f739d16de447d8eb84537e847926e39461dc385e
+f79c2ba9327ca12e7033e6df84d8f044b57881e71f32d52afb2b0e61975e730d
+a21fc31cce5aad86c09c82b7d0b4557fb79feb7e1ce6d98d26a49e8160159023
+4c5da702c3feef7041b5dc43ecbc8b2d66b7c33e5008a4d171ef828bd96da0e7
+4d8389f04fb4eeaf1f38865a912142c0eb9934dda5c4576fe18251eafd7608d3
+f35319aa2335e2df4a0aba8a246aa93324dfc19ea353fe27c47628f377259a19
+f9f89c599d11fc306e7181d35792401f9304662f56a2f3e44a1281ba24f4efdb
+35876d8bc31f5e19dbc58ee35b98282167d21a1069dc64ae87240384309c42ed
+ef9dbbd68dbfffd34c57a001aea0c91c36c2c8f422cb09f9456379f450edb717
+e7ab9b36b451c27f5bf10f018e25c57b1cdf4d2124f284b3f0c396ab3c806506
+ac6cab227e74d19a593671ade70455869614b5296d8768eb4d390a2e644b4ee0
+46a8d64d40633575087b3bafeea233f8e7f22ce22d2c190a0c4301647ce67668
+dbaab051719d516cd4e6e7f8c2b9557e8167c78ca6ca1cec05b79ab1ef61975d
+c2511aaaf3f20e393099ccd20ab4b022d2b206d9cbae6dbdaf96296df88f0092
+aa318348201f37a5738f17b440b35e47d17f0acb0d0d255d2871dd5dc43081dd
+4b0f9390af189582d2d9b39fba9644537ec6e1725de83991f190b5fdfef310b5
+e8483a7a91720758e329efc146c95771b2439bf2607a3f10ee247fcb1b7d5578
+a05775df4bc4ce1b59084f5e625e26e11243185d730fb8931455c3342fdaa91f
+7093b21bb911fdb04469469404dd387ab3a61fa4a1347be3c5d69324ff67c6c4
+b6de7d8ad88b287265a9609a6266b0d9146c3a3dbb0a3c9dcdc0d6f04d48a247
+df9ea9ac5daebacb06628fd7c9feaca1d71c058fec7eea5ba7b14bba8c5ceafa
+3b81037a197dd21919d6028849539f2be815d65057d23018049f2201c33608f0
+54f358433c3df8bd7c72f81d775f2a86ed7edb494db813e6dbaf76e405f64a4f
+cb3240348612e2940b7531ef8a93a5978faf36e37cbc1a02f2b5e3337fa2fa22
+91a9d6e9f9969604869b954ced43fb53ea1badcd0435817d1fda2e66552dfcff
+8acb5b5a5c819906a8fb02cc97f613f8400a9ab950e12d71f076807caaff259a
+e63f0de2c096a63eb4451e64a4f904162252f398496c8670b92923b8f7bc4f40
+a53e324f50a66920b4f9f9239dc0a3da083791fb4e524d2c599229aefd8f64d8
+34ed26ac3f7af54ffee427e4d9ec3f8d7d91d4978d974be305028d3a32954d4d
+79f64fd4b9bb74596c6f6d17043e104c664f42c70a3f526069cc369abb2608ae
+ec16a11b0a8ca8095e30cccd7df1c4543f9e53c3ef8ee191b3213c4e641e0772
+d85601019f3c9b6f94692e729b87c5de209a92dfd47a478e7580399d635ac5ed
+0bab11cd5b969e9af5bf1fa7d0865a518f177c77a8631784028fec51ee1ac336
+fd2d1d9c8c2fb4341187042ef872aa168b87054fd265885f2bc0a1332b3e406f
+259103dcb242f40a07a5de136a06b03d3ee31d6a5f385ff1dcf76d1a996cdeff
+76ad2f1dabe5e2d2ceb334ed78a9aae6c6ee8f17483a8e7c61f7ca4ba03794b7
+3582a8334cd5545eee22aea82e0b31b0981161abf1611c2e350f4dfbb77807f3
+3d3536c51f2a2b83e3a0f9b7ed72de16fc6503e9d8967d83a557d662062036a2
+7778fe6c9f521b3163a2692d16c4eff90d5fc06c69e98a4d2466a77d28c80c96
+5287008eb275a93713a78e8d542d4917abea24d60a0c90d1921a5880aa521fdd
+65a16bae6b72b82f2b2eb2e46ead1ba9b9710b4847a0ed217bf98dafd5759478
+cd3e8ad681703c00eb13feb3e5ff2761455a70e0bd9181ea6ee4850b281aba92
+0d8192418492352b2c7ca6a168915de1951f774de37d63ebb033d774606c5d4d
+b6bc72a68859237c5aa77421305ac6fcfb6e555ed3f52c41fa177ba49aa31bfa
+fbd4cb3f5df1d87df5f7dd810d8bb6ece0a8db60385f6aad7d9248ae8eb799c0
+9e4bd4d2e06ae9adcbe4f5d4b5c8232aee85ce60357a75886f3ed6f6e0082879
+c36c45d57707f76f8bcd1f472271a56095d05f4ced5ddb6a72bf6b410c7cf0e5
+c6cd21d8deca9f8ab7dc08efc69e5ed7925a0e531eff73aa537704db9779e83e
+097b9974b9d697521ea6b0f3a76820494608dd21ddf0aa164bd9830db40efc9e
+2c07c02b4c7236688d8fc135757aafa153e75b8bc3636485112b5bb57f01648e
+1e69d5e9e6ae84c2a58cce8011e71a7ccea36b8efac02f75cd506b402365b467
+ec1f9e60eb81169f8d7b676ed8fc4d5704b8d06eab192939cb570e0e0c2bebde
+3671b64dbfbcc5376e1464964d6e05eee27abdd36e52824d80c74cd20795f3e3
+647f70416d394c89bdb150ba20bec76b2be5f157d1a9dafed474c521a214769b
+4dcba56bac771999b3d3e172be1133d91755234a8d277b1d63942f0cc3933acd
+641e40287e5340f8efaf9d06715eb2abfa57a7ec2791b3fe2bfbd3f939cfff50
+ee4062c9fccef2f3296143190ab4f34cbf11ab5fff417a6ccf01f7a1d7b47b8a
+4ba4dd923b0621b26944b513e530352c92e0f783be39286ab144ee76c1e57088
+fe62f9c417eae4770fb7e27959fb74e3b6b3efcc36f96a5342d6ee780db6397b
+cb0478b4f1f8245bd8465850e3a83816697eb16163b7d78d9e0eafb40372b999
+e173293dfa6efc2516703d13836e11f407113c49676b16f43b4165731a4c0f21
+01aa6f3a89d7f5fb743c1ceb44f97857555774a63b59f96bcf03c87b5057032e
+4c8d1d6b768b7b0db5e444116be731e287ac0a13bb25e8143f15c493c417f20e
+be5217df4041413f59e33f6dc1737f9006bc221c6458b1a5c6d42da46e84e3fe
+4db8b35dfcf7c0933d4c1c977c5edc7d89185fde71534e2addbf635b819bd48a
+595b29cdf59e590f2eec097e3241d78fb27edb9f2274fcaa3246d0ca18e4cd05
+81e45dbd0783362463adb5177ed036e6f17f1edfabeceaa16d20a176968039cc
+89fd7902947fd931a080e2105f50ae2c865c1fb3629f22fdfc4f5c0f21dbf758
+56cb817833d0f510da858fd4bb64e91b30705114a2add3f3e8541a89825c9d3a
+0bada8a21626aa329875c9f90dc92e4af23a7d83ddcf140888e3098196ddfe30
+8014fed9451558c2f74b1f13aae39a1a0a50db19609b237bc96fe275806f2e13
+6c8049f38fef87d5d0dbcd10f232476ca4153bf2bb3cede4102dc388cb05caef
+723b21b6f6f2d6731f4c72cfed94f77bd76efdd37bca46c9f7dae18c05617a3c
+1941d5bf77a25169e19f0fb50c5335539680ddd39e018600021856ab815e8bc9
+cbe764e4e06c8f7b20f4f84d404423e6ab37271d564c8f3eb1b1ebec03de7c3e
+3a68be5edf58414076716cc454bb971c4d7e09af1c897ab8a5091024ababcfb2
+43b89e13ba6d3af800736f9ab077641c8be2849125ff20f3d760cd52d5bb6518
+afa9eb41b98094cc129c790094c6ac076e758ed6d1dae764ae66a7fba70d2671
+92afd13be3200f95432af7618203c6a28df7453198b8e426b82514648f8fd0e8
+79424287eafa66e276341064bc42dd35f670a2dd82d2c41021531532e4333463
+c95b0aad5247ad3b6f1582f2016e94bf1f9dfdee6a28d74e05dfaa5f41d1bac2
+fe4f355ad90c24361ca11c24d9a92203be1fced536bb855777a0065964cfc86c
+d3a27f3ad545fff70ce4921e4479b61281f728d334093f90ff6f33b0135d91bc
+684be649b6db580b1d34f38a491ffed9285ae4ab412b2e1623c8b6679422cdb1
+2263bba72cf82416e151f47fe4bde170ccbb8523459d36ef415903fbf38c4834
+86ec72ba6c9a02b4827433d39c27d3c7741d8a9dffed007cac8157d6e3145788
+45b0a5dc6a5c627d2a1e24b351d93e2dde958d206e434379cc20e4f7eab470d4
+e1159aa0e714d3d4191cd08dd45457319e2c41198923c8cc360532ae4f640b60
+7244c08e546c85f9d077e2a249ff2ea24a989abb69e861f8e71bf788fb81946e
+bef9d0b05804417e75589e89d2b8186dfcc79b2511c810a4581334d6d215effd
+0e8ebe5425d92eb19022582ad7dac770c36c3d6f86cc2ee279cf432196ea8eac
+d3514db0d7f6c59e1a68401358a2d5aa8b80259afd002e6975d86a1b8b2bafc4
+5cc0983e4deda769c0fce889e049c00673ec87ae17f1930af5a5e2423709c2da
+49f44db4dfec3e00507d4779d904384b801a43a15770a40f10752d29e14c253c
+f4e2a01f25b70386667e7e5b2877425502df89a4c25b9412b8a1abc432256a98
+1e50c2e2c7527b6219d0413dd104b80e9d045a4f6e8507f0bfb37339f864988c
+b1f62e3f68697b2cfbcf63178ef0d7cd564577d7a4d0517eaf8baeb8b81b5c42
+8273229f9013e77df1bedc6f04f380e3e90f5edd9c81c416fc78a02edac32ccf
+a01c5d8b6664fa08dca3d10b9fcc59fcdba45cd41c44a2e0f606dc1c7f2e618f
+ee8f9bcb4685f26fa93d73be1d97bb431fe198b04884eb2d75f604f7326e3064
+aabfc389b7230d325f32beebb2d0c339ca51feef98de442792c0b5b7bb4d9234
+b7f82ccd14bdd609816215a9921d67c4b891aebdade0677297e2b9fee67c60c1
+6bca445b3fa9924c81f46a0c88b0bf880477bba09b471da11dcb8e7c42714011
+70c4216ab739cc7e998aa1e54240f9913e0162333a49306ad5973c8f650200d0
+2123a5726c9e939db85cb8978184338adc1eaee4c892eec474731e567ed56618
+32bc375af73840f81530d8a2679d25b532495263eeec8a438b7a9569b01309c7
+e263f451e593689f209806808edef5a896c1632dfd9a823c9ec5d266702db77f
+b145dbf4d34a371344437074c6d9954253da577be60e4c2f3e303e382890e688
+112c07d9e4b2b6e5e710e51e1de8399eb0e01c618cbf2d0c02a71f3986575ce3
+f2afda7f40e9da546ffd5f61fa12ba786a27498ba5a60e568e09a7c0f0b1341c
+7bbc5552d10a3c23de3a76ede29825d50ae9c509bda892e6b3bbebff58dec41c
+c126f433c9f7a8f417585e026468565f5b2f823388e8d5a36807cd6b53294c6c
+bebce4329ae476c02d3e3e64dbc40b05c9d1eacc9321179491a4c760c0c14ea2
+a0b6fe66832957f908eaa6f18310690938a38a606f73132b44fab38884d169f9
+5826312ab82666de60297f057e98e26f0914a32f7b4ccd1c9640294909b17e5c
+1b6d206c57221a5a17e9eddc8e51cc9ba343eed45493fdb9aa37e477da35a4fc
+fbefb497d3eb070784ef08239303afc0f15b4a9d6d1e7ffe49783c3c4bdbb5f4
+7012884e1cef1996d2de2362492d8065009c863d0bcf4867463fd5befe4af3a3
+9730e869b632375b1696dd1b2479d21d98554ac1853fca848241b911b96988df
+db0713c481cff11118f5f0e99479a79b5e59eb0031f083721a37de51758fda74
+5332f9ab1215884c1476aee17267c91d5b354314804d1f56678a168ec756b61c
+d57d4a4476b7f3d280557586b0c0f88be44350338c1b43eae03d0f8f21232123
+6732997b3dc602628f23619a081af22185e1f0671d807f682885d9d7832ac477
+667dd8d99cdb3683cbb4758ec38c2982d4710ee31ef2b9427b9f0278b5a36b12
+8c1511fcfd79cd8bdd95f845e164202caa314bfe1dbfede5ef71016e61d47c89
+b880f63dc0a79122118304ccec4e3f5a7e9dd6a8d988664fe2165910a65b14b8
+27e34155b2857ed8af38eb81670657cef86b8151b5068ea992902fb55bd4468e
+617216c9e4f11a193c5e8d5444700caceb3bb49365e2dc4771a58cedda7d6640
+fa370a4aa115a45d78e61e1bef9b1f47eba3ad1d690aeb1cc1fbd14c003ddf04
+fa374f156be114144cd4a124063aea75f383bc81759535bac7accdf27adf05ed
+bc184fd63f064e97dc2b650f04ea22fba2c9765c9a90f00cd987a0bd5bf12f70
+54a870dd7e615b3ab5dc0f16879c7020ec4a60b7eb94dd23bae021d06454f6d3
+985e49bec7c5e01c8be251b4368d1f77b28f8c8aecf5a41b959bf43bab9f0ee3
+5a057d2671d5a408f48ec62be987e8df582f40931d1f3ffae7e9515df5452f73
+0aad038f607c30140ef336261a310fea7e13c18d44de07968367188b77930bbe
+d3be4cb2bf84392256b8a180397af2ff0ad22c0107c333b0c690ec01aedb574c
+9ecb935dab18a853b5de2fd79d63eb688bbfb55f8982a9f6d19cabc1d2f27999
+8185e5ff169c01ee9d41723c8762087b4e7fb05b7544972350438825df0343d8
+29005417158a5cb24e6df53d767c0d82f3d72c53bc5cc7de22d0c346efc28af8
+ceb4ee03194d7b9ccb465c0e6f9d015e1e2daea4a43d9b04d7473e1aad92e478
+d8f083b1b4cfae16b3aee3cddff25d6bac9e05289952044599c25143b6d58059
+9ffb92a171b10fac1c3f22cd64b9601894165b76f9da6021c90e1713ec69ec06
+5b3d3048ef04fc0f4da8fad276fef2a36f79488a5a00e61b3ccfe7b237dbaac0
+5e0a90e10eacbaf9bc7f47fcd09befc4e6f502bfcbf988327ff5ff8e4b85cd63
+f6f253e601c5b267488aaa1a0bc8b590e647455ebfced9a84e4126b0c67c5974
+8d85e0ad234d93ad38bf9d320b7349d5fd1b9ecddc1cec055903c9aa96584a4d
+03330eb0e95fe7ae0ab895828a9512989cdedfd1e66403bf4122e293582baa57
+60b961afcfd1e529240b44f5943fe38629fecee1446d6a20863b603634dc0605
+3985d82a111445f7006ff79a4bde99b758c18d3cef4c6c281269ddc43f6b3758
+0c58462b47b12d4f79f1c8745d9a197851e00329bcffaa2e312f45b9a909a7e3
+353fc343413647fdaddde0836faea6a7a0740623bf43fcc3beed6a99b9803a06
+a02ce672574d41898e330f18f3fdb0c3493e377dfb002728be112e6625023724
+a89da99cd67caf7c1f3b395677169559b06d748a331e2818f27f50efcf76d881
+c09c7c237e3c00304b0d6f59dd7a12caff0b1af769255bedb43de8d4a0fe7803
+62d04729ecde386d5e85e3476dafafbd4f41f24d9941f441cbc92b73a3c9817f
+ab397183e9a64ec258fd965707337408c4601049bd8c38d8b6f769ab08008f5a
+badf01bc94d801e9561a9ff414d7d2b9401ecbace8a8b80ba5abeb5d701d02bb
+6ddea8841621c977ef5d680b1d22b4ec83c1a749455c1aa9c5087035b832ad5a
+c364bd1f18bb7b20f6c735ae149fead92d2c3a5403c46e0d55d1ad0fa0d4f1d7
+f9d670e5f0426e865c8733825102b6b92dde23679b74cbb5ca4eee791b93ce27
+e8abb062e3eb82f38018dfb9f144cc640543fe7d8ed16493848b5f1f31fa86e6
+caff6c5fbd54555940d3f1bd376f454caf69f002b91c2fd77848c3353a3cf208
+414155a9fabf34047f1d6ac10e3967f434218357ac6c5159698f21e53075122c
+fa05ed1392431c4d2638965864baf262fb8d7fae487c4f755a782855aa157de0
+15dcba11a1c649cf5c926ffec3dc264386491f298d52071ea5b9bb50d82e1701
+fb5463461de9e98e029cc3b7d4621b16f29c598c10750f61ad95c1f096c3a3fd
+d4a327adda358bbbbb0dcfd9ad6331e6a28bee5c58506eeba7db703a9524bff6
+2abbce7362e3f0dd61052504cef97f1725a5beb35edb5e08de8cdb3b72c2aabe
+ba2c9f6340f95487edeed33d8fb9006b2b105a71dde5f440a0543af51b9d13a6
+70f0438884b84220229e992f3c18d0193267b133f8234cd5be9625c712913e2b
+14697b6042de352f6f1afacfc6a225a4faba63826675f83290965a536ea3f31b
+88ff1ca2774aab2d636ab6de2f1f87fb54a5380d3a8b5f9a303649a4f7c0de26
+626b97599b0a935da6a62d4dcf88b7f603bac672f6575bbcff1784271bf18bac
+4e33df2ae95221bc09d7a58b670df76bd96d1303f66ebf40c3712eaa384252bc
+b63d409a8f280ddea937f73388ab0acbe7f37145bed320d3efcbd94bfb6e6c29
+9ddd6925174f858497804ab4688db812cca27262e7b5713979f5d5fe167294c3
+5f10878e60950d1b9d1bd4f7f10c0c0e1fbbc095c4fc1856f4c04d85649b8011
+5fb0dfdf37f9604f4a9aa6061b5029ef157b757cf3064a9aac5aac24648a9c15
+f0a2a74dfb655e65341c03139de98db3dfc2dcbb39bffafdff9e67d734516e0a
+eb7c111c39b6ee987f99a7064f98c4f974a24466f60dcdd9f8e526033bfc238b
+35a5d78df28a114456211b5d26a164ac45bfe67bfa3b39c4622d67fb8a305d03
+e5b8548d0c01150d18ab5de5aba0aebc35b456c42933ce0370f8e8413b13bc6f
+db80d558ae7b5a32077897e3ef1eb98b93db5c00f34f33133d08a6a8e7665e3f
+eed2e1bb318afb48b73ed72bf9b6234c40f028e76a5a0f902f8702ea234a92b7
+b8dd516336336c31f9baf355450fbe924c44560f32510e183a976a1f98e0ee77
+e99e26faa72e5e7bb50248c336e6481c1e7b00596b1f511db2dbef7a288edf8e
+5653620ab52f7e3d10921ae2e194c6a842ff1829ccb8aaa542a53c04f8c23cd4
+08b414afdacc34931bbb91187dfd8c1f3bef02652e042adeac4b9bb5ff5ef7de
+60926e02d49e3d55cc1ecdd555c1f4c1a1083dd19c6d58972d86558198314511
+4cdcee4aadf3799bf6d81ec7d4347225eee6e67126fd91937c7711072047ed3c
+4bcaad89c800e05a3304b95dadaf9c7333f0bc8aa1d711122176f3db92d0a4b3
+30939d1b554d47893be691dfe0e5c47d32928fd984daf6c03f32c1b99efda210
+faae4a783ef7d6eed603d5db1828c274061c1fdf78c40ce76a7949af802bce9d
+d84a726212e23d97b0ec1e975245826f3c49c995c08940c680c39a598553dfef
+1b3c7232f0b698fdce76a0dbc3a2fdf0a53c6a0a48233a322d1701bf43c82bca
+12ca3393662fc5c4d38a693c30b9d3c987e872b91a0bed138bc6a671573d4840
+46c9adf2cb62df79585011d6d61e2159ba67b4e7cb35caa2de2ec53452dd6d82
+f488fed31ebb907cee7f61773290dd0e0cf4969f2f123670d59d24f909b8156b
+9af55056199c5a1a4d4d3f72eafcae937765a6e041f626fa9ef67ad918d9e10f
+328b3ee0aac1fe1d3a0231ee926659f238c60c772fdb1d13ca48217e43a54b03
+56cf7084cd9bcc3e0e482c18a1d5e01cfc1ccf0cf196af73f676b915e5efb9ef
+5427d032e8d4f9cfa5fed93f85707a1cc136b7bd35b52a7a4cadcbe3f3a6911c
+dc5b7fe0607861e73d5c36bda58e125d20c30ebe336dfcbc4232524a179d763f
+6e23915fa34eca1e4050027a2b8b7f54ebf0b95a68960c676a0927242a436cbe
+64f7fcbecf8dc5c850858725a1e3b701915f9be0a41214e42fe2b850dc7de4e5
+edff5f9c6eb1be2faf002a6c3347f5895a6b39f8a4ca5aa65261b03d7a17b58c
+b04fcff305a35b1afce3bc9465770b512604209efa3052c2a455ffa83b870d21
+15bccef823883d2a92d725123912a9e89b4abc02185621a728a447a5957d78ea
+36a3e8640e9169a850b4a2cab7ecf9ac05f2e0b30c6f626a1f59316e29081c07
+5b22a491b8cc89d149eaf7216cd9d55de0214ca1e70a5cedeb9824894dcccbd8
+dad1e22d7954a8434773ddfcc0474ff722a521462bc78d20369fb9383a6530cf
+e8ed7e26bf47e61f7d16c44631edc1bd494c461aedd67ab56aee434c442927e8
+1acdb71ad196938935646560a0cb98677a64431ff44f2e50552fb2706f206a1b
+39b95c94b82c148e1a3618b666c555a258908f96bffdf1e6c34f65919440e8a6
+4c10982dcb24cb5ae5ee34981c9c340065bb0a6d68b1735ca808bf5593d86440
+6bc88f81d3c9f0575216f2f2e5d7e12df7459bcfd90d217f4eda8a8d6855e960
+e7427f6f3630ccca0d72994f168eb9e0b7d401e797a1b3b250cb11d3873fa3a0
+4521d64a5c71b3bb2ed62c762184a15fcfd4290761f54e5c2dbac8a9e196bdfc
+0fb03afdfe8c441933c35296063e4a15699c82b83142ca7ba239b6c65e3fc1c4
+e287be933346e534d611c38b85b298c51dacd20fa15f91a7c84dce62e3f9ca70
+000b6d0e62ef647b47f8550ab0b3e0e0575509f08d73b522653610f2cdaa60aa
+a62677a35d57d06e9f15d99c7fdfa77fda7625fb3f418bcf4cbe480d748b99a1
+2e332920f119423c75e8d3b18de4284155230945da1e26b73cf56aadd9e20fc7
+b94a75b55e3e5ae6b51a831d087e6e5b1606757ebeed58b5895d47546620313d
+80c230bc01b17f0e11b70e1a9b17bd878e2d5ab31e3436c92e5366c5b92f2392
+08e2c6994fb869586c4095ab7c559bf8c70ba0ad8cc13ece387c57a6f79dc107
+ce6f7821f77c6e8e493f756453512038b01f872e90dc1d9cd0b82026446a9dde
+fcceb653599aa3b063fcec2f7e9c80665b65ea21e69b82ee4a99ea51d9441ffc
+0f2f7dbe9d4dd204cd4066874b85ba361fd0aff5bc11b8852625701c7f174302
+e60cc1e257e6511bb7c819a8838501b1432710df25b653e1e3804e4749cb9abe
+f08ee2a0b28ffd07b9742fbe2d67d568618a593945959a706fb055abef058a45
+c07d62ad9f63c2349ab441e2d72b8be49d1af258e365bbfea63da2449a87aded
+b306753dd10c806c0c9361cc27ca6f837723cb538ced898caffa815e12bf5e9c
+819b16a449f8e9bc06a8f8ad631ee0e8e23b42dc7eabf8dccb0f9dd14f129d23
+49dd04e23f1e033c95d11fac2e2809416055546a93c9d1bf3c95fe8cb4cd8cfc
+f0f7b21632bec14a136a9b694e40e36049c6f233e01df150a946bb28fb0f000a
+4d99dd94b292f45acd9bf8cb8269061bbecc062b64b38c526cc7a55e2aba039f
+c3bf691978904c0152d90c85f5c33779af5101a6ab0eac7577624649c9ea8604
+b942b0b966c3c6e670601cf3ade97a20fb5a7a79e5c3c0d5a7569d615120e89b
+1c33397696744512a60789193d699802ee1f37ab3a13f8c007da56db937f80d0
+b9a23b066971241f34004597effea6d0625fcd9f18258aa378c8fc4a41b7d1d3
+931d1a7d17edb0d36568955e81787f4f2ff2858855f60b3061a85e6cdebc42e3
+44559734780c07989a41642720daf7cb97bf3be7acbc590d57f1791238ac096c
+b373165488fec94045578f0a69fa4ed0366b94f000045ecf486b0bd54d89bbd2
+33d1d814886fff091d6bf567417120895056372ce8d490c02ee8c0b40634becb
+3f13ca1305f352e96df55e9467e16ff92d2a2be8b1d65eac380e41db62be9d4b
+341f4bd6aa69349791c98fa61490bfe18286bdcd936b27b18b6675733d447eb3
+79d07b8cdd7bcb3f1297d4c142798d6871bbac3752de9b23ff6853d5438dbda7
+6b33d3fe159a064ad2d2901d5b31ed8a3987ade8fe06cbbe7d69716b4a35c489
+841220a5365f0a000206619b081bf55dbf6abe9adbb9aead2dd25b66896f81f0
+9c1c9cc4332972ce1ff07930421dcf83428e6fb32fb86c6089495bf91273d7df
+681070765ffc1eb22f5a31a00d424f99e11bef8067980e3d9f0e66ca266bfca1
+61413cfe419bf03ebffe788882aa52b4ac2b1928800008394e18fc88a55f1db3
+788c6882da7e4a1eaf14fb1dbe6ebdefa5cef0d686245c1dc794298511d38006
+2fae24096f728f0aa080ecc9d85e5bb0d989c5ea82fcaef430cfeb7aa9f6369c
+74cead4731d892a49458cf89dbba50d7f6ec38140852169dc4ab886d92a91a61
+40fa81b25b8c93393837d64b8c390389205b36d444731b3ec745a944b6cd2d4c
+b75a668f49b01b6689ee9d3bf88be3ee24d39b00e20b4764513e0b2813c5d4ab
+2d067d468ee2a805e3ab73c05ae11e55b1205af42fb851bc69c54e8f3f1083e4
+4b4f781cfa7f44ef6b1ddf3163567d125e052870995761b2a9c5753e867339fb
+781f0f80452d6350d4cc6dea0c7c6dc7ebc3f1d99653ab1374b26091e7247364
+b9ef32721378fa994ee464b5d653438bb181e2d5af0d52f6f25955fe91825f2f
+504ed079a87da169ef93971413c2f31fe10ac677b7d533207be18b95360d9aaa
+ba427161e12af468b4d05e929406396ab010aa775b3746098a044328ff0e98a7
+e53240a0a3a87e955b3e7c5dbacd9a0cfd7575ad4cd9cc22652c7cbb43a29764
+01ae4868bd7f4530775f0a6bb230567ee11d542cb993b2aba34f0bc38a36204b
+85ba53df1d746b211b1bd22ba85d6a7dcf9c039527b26d950afdf4892d186b65
+c7ce1c2de59c03a520af9d013878e989d6d5762824733cba8a37b01fd7e3c169
+90bb8b8b469767dc749663904285bd4fb4de7d363efa8fe2e058c641744f7678
+99f9b384fafaed93e9dea5615f13957c8080388b70c478eeeeaeff2f0d3d123a
+04ba45066d402c6d1afcb4920bd0a07a386bc5876c73cc5e89cf3f2fda80a47a
+63c7d8a2403c2c767625f25f2407931ca9f11d3f3f1236a77c38aa35811dce4a
+ce4f9fc2ec53e0d87262fac254827144e92eca37c09e73445060ff736a334f2c
+c1d6789ddc6f426024e6765fd9815f3f2636fef179784f7b47ea92a3f6b66382
+5fe65c4e219a2c43af91e40ac28c2b7a02e7afc1751b2b24eb838ca55bd7f66a
+9500ff4ad31cb1a627839334ffee506f87b0c44b50c4214318aa8c41551a606f
+e3addcc30fe261c4859fe204feb3471d9d5356c6508e2c37616d529aecafef05
+25b67c8f7cd1c26cac2d990ea57f3f48b221d288a034768646ed29db82f0b471
+fbfe3a70debbaf9736df89e7b054bfb1bb6c6ccb6a1a71f9e11937f156a75291
+5b717c9a40c8902740e1e5eb8eebe94183d9ec18ec857bda2635e0eeb26d7ff6
+3edd21c1cb4be925f049878ef687007a67636effe6deceecc73e8871441c842a
+117b9dd817ed80d0920ce1743ed6b8d9cb15c93725a4140995411d75a0f1bd2a
+a10bb96893a7d439d3110bba9ee156d8b18627c7c2b8217969e3f6328b53b4ac
+62dcfcfd498581b59b6d018733a3a5ed55eb759b83fa3b1c0793a247bbc6362b
+2a8837413d0edad8ae649f3e06214a316fd23c5d0306f0ed9f8f5b896026da63
+d2a18c58352a04c540a3f90de5d56a4843e3d1fb90f5e712da7897680a7a1d25
+4d32308f7e1b8de9e8cf4535d9c525325a1ad6f543eb0b1fb5552dfe957e59d1
+e66da60051d6687fbd7231324380c9eb9fc8b6cf4510b043fa48019fef1c094b
+84b7f5e3816df7c138f2e6ab1303b368687d1e3c7dbce4754337a3de11f57252
+4d2a143826e406e082c3d7a69ba88e2871a1cae22d6a7bf1ad1de45fcaaab235
+038cbbb623719dc5533d36af35f712e9f8ac826ffb49b4fedcc96c4f30913c69
+ad0533b02a4684bfddb065c32b54652402869d8d6141f90608201397f3f0bea7
+f41670b138c6339230df305a07d31b5aad40ec48277df06092358bcdb3961bea
+d551c94cd039fb97f46115d234965aed70aced9be3305de77c7f1a33f3292bfc
+f965c53292a7f31a8926e038147a827589579842df86b16e840b836c23fe23cd
+059ab92be7d7037843661fe65ef0dd48d31b07782b542f0b0852071baf3b2809
+8b95618ede124c9545b31323d1e454ada5a03e1a33ee34f6e1901d54fb90ab12
+ac146fa7bf5aaf50f0de423e8e47d45cc01867674ffd404060eedb137115f352
+c07f7251835a8ae2bdfb70d022c2700b79fcb83c3c312e7dec4001ac20919443
+acc723f7269d60f3d626dde9d961805ae77acec4d40419a51baaccda682de591
+9df8ac6875b9fdf1f1281988bd94cf1f5f06ccba48cdb6039787d63295fff9b8
+c2b84b30383dadf7ed216b830a38caef32a3279e86ff7e92865bb6b421166e93
+923b68a473de95dd52c986a5a4f73473560ca69e8ce5f7005e9aed1f2ebf81ac
+397c9d6efd6067cd741739f7ba770b7724336429685d486ced5a122aa4d78647
+81fb6611c6fbfa68e7aceb2a757992b249cfbeba51bed32b7cba777fa78f6db3
+95641dcefd1a61263e2ecfa95938e2c3380a8617d4a775dacdd824cd2c2cfc67
+8a5727ada2b1da97f157e543f252f8d3d2bfba555cbfe089e8bf708ab253a4c6
+3f6ad9bf11b96988aec8a66984ea4952ffa81aeee213ab59184f8be355db5010
+17bf130f7d492b9bcc4b67f2cdee249f9b00bb405e3c580bc56dd1639ff81771
+8d57d1ca96b5e8df212bc86b709355d1551b4167b4e35b14a32a708d7df1847d
+f80904addbffa67dc2098848c24b6154410df3c6ca0559a1855803ff6426aa69
+ccc262dc8a2636c17ab65c23004d5a33c7b6c801596f0089a033afd69006ad4a
+f21c0cb08238c0051345e0f1b780e914b80b1d74eb45facb77b1c043a55616c2
+8ba8ad3983fdcfa07a3ed19ba69b97c234f89a296f581e4a380fc58056e72096
+7781f036f7c3691ca713ca9d886ed1b4a742295c29c1ef093f93d6fd507af0fc
+80c5a01ca38c17b8ecf33b38fe224c67cb551e43db191968311c38779aab6c4d
+0efcc2a0781f4e0758a99b13b520b75808cc555736424a4333029c5b95edf387
+7e6d17b114cb2821286dc34dfffc1e89eec9519c44bb5c928fa4ec44bf5b75d9
+e13aab1a73abeca008d75e73d72839653af898db554ce339a867d7cde546c249
+d0ac179997861a121cf2e1a1001154ddd1f337ade69263c021bc78724884f470
+4cc8b2ee48a1e91eae27a905d0e73a98b00c4353c4da0aa4abb75794b5617080
+a4a610ee9270af4393efae916b8c4f5af945d453e9ad0159deffdc96e5c6fcfb
+95d9546275d8d7e4608cf4add77202df1894ba8bd0394d7ab8a066bdca5c649c
+a78544a7b54b7c6745321da400d74a0c67b7c1f412901aa0c8c73d075918b4c5
+a5462d30577d848479987a4a6110b1748884576a374b488ed5d06e017880cd29
+70eddedbc04a39bf3cd2eb3f0a48dcb3b7679bdf0686e77c63b2fd085eeedc2e
+bf04a42bfaae73afe9012890b088f75244b6efbdc2f37774da13dd60c89eb077
+3018a2d9707daaf64a1efe40cfe46a5ca252def56e9ea2abbea02e4c86eceaa3
+85b194025491448e9317efd74f3e323683c036805c158e6c420c54a9717b4c7e
+7343b48e2e9cb16d98efb347dd42f9f2ebeca64bfca0d15c5f8209d35c0e6328
+f19be8be0c967c2f577d7ff09a9d1b4c6dee3d744d6912977e597be47e4023dc
+3979dd6280d66382782466112ae09f2c8048c93df7c38176560a87e679a681df
+708ee6ee2e3270bf6c8b07c15a0839b0b4c4a9beb898d523216f2a9384fd767d
+07256afd80a51a2782907e34d1694b1aabffc98f5dec33af246e5fc759c452c6
+6b34ec94bc9d66fb80898322701ba188fe5ab3dda0cac7230f6deb980006b0c0
+786f1586d58bf75fba6f52697c8cbde27b8525a27c0b8bcbbc43faf42b419156
+eaaf3475a96cbf399605bbed9fe577155c920eb4a4851669ffb1083ef45ee35a
+83eeb96f3d0586402baaeeb1b71c448639a1ee577c42a327cc78484f4dd38fb4
+44162bd3b5e6eee672e6100a818657759b899030a0b1105be1e629a391aa397b
+888f0175e74c210ee7d5a8a817d4725785d2cd565059c8f08a6ad227a2645918
+5de5cb6bbf78143177a4aad766d2fa844dc7399ab1f800b5671777d074b8398f
+dfac8803cf6cb19ebdc486db2f55b8d0249382dfea1732ff0ee0d8fb4638c316
+458c6263e9aa416105806a4eff7ad6abd753009c243c3b1fe505e6200a7fbfb2
+0e5595292589d13e73286122f291dcd71b708414936143008bf4e42da33043c4
+c4fb7fc1cd40fc685c923439419a441200d118c497892ca1c492c52dc1408771
+c428cbfda340bee7f84d0c2ca16c4e35a0962da289e76a728683bc6baf252f8d
+a0bb4e3514f5127c513ed939ad1a585d7d3303e13af4f5c35db672658269feda
+b0d139750a4b4a26253f6402460117d541e55c7b899f544078e7a435d78d474d
+71f7bd24e01a395265cc80e525eb2185f137b26dfaec31f616e7deb0f6018edb
+a959bcf2d04999d1bb21e39e43739c995101557de20e32e0b25674d17c12ce93
+f0dbddaac156767ed03f2e081c63ef94828ab30d4a11ab5091e632b6efc0d740
+30004eccfdb55c3a50ff091afca5acf052cdbacc49f4a20edde87dc6dc2e9d61
+7d0a40cfadde02ac8e7ea1f375267c7322dcc2d3e9633895d1f897969c3091cc
+7a0a7a7c84a4bd15ef83a16690d9dc380f07189403ef0d9113c7ef0da0f1a66b
+61d7f9593f82f849743647d8c2ac15b7e0c87b9f7ec8d7adf890c754cc29c38c
+02982e19d542ce713462c3f5e22feb2cdd4cdb6627d419c5b499c9442c58e4f7
+f0c0ba8ced3cd519473145238abd923930d31f369d3e067b6dabd69c740586b7
+93acd9e69ae61baf1a063f062f22025bc3fa2e0ddfd7d75454dc1b8ad9629167
+656edfee69a41240a08f6fd792e5cf510a3254970429cc76f8c2f95a86d75d2d
+c98d8c7bb4418561d37f478ee00e9ec8f52f8c745fa570d42eebff048d60a6d3
+e16d9a9bfd1722aeffaaff77ec82cf4fa593353a1bc6d96790dfc9c6484d22be
+72ef63932b363c6b3057969624cc63d177f5b103b77b8a560bb0595da7416e29
+a8e43480858201306e31a72b3a7e01b367a8917c19293e57e4535d734fff4e17
+f50fc475ad13a5203501cf2c29a3d135860788507413ae93be0598f21a51f317
+e9da8415f5e00a4dcf49f640ca26c8623ba9c5e80e8fba310c8f06570a629a50
+758318dc48c876b126850118b8134ac65333f17d67ffb7f3c7bce5c07655665c
+4a09e6fed0bcec0364386fba63f4cd34431d2e5fc44e3821abe5033d77c1a901
+183a127f32b003add501dc875c453762446a87bcaa50bac3b75a453caeaaaa30
+12261d6c08c95eff1df3ece254e9f41d7ae85efe476e244fc9d9e0853017eba8
+7ff6241cb9d11b7213d2ce679cb1c071daa5317c7e3624df30854049ac46a995
+97422a2dbe9814d92e829744db3d600fb8509f9537a101862f9dc84d17f84b82
+b819ce71e40c2e397259459f55ab6af355a6c4f359ebb831fecbec1dcc4ee2c2
+503dbe52d26b3a72833d36a67a73c9de2705769d8ea05c92bfabf4d3ddced23e
+a37214587f6b58df7de6318187d2272ef039a8955de18eb7069d08fcd6f9bea5
+87a2a6d3db572662f278146b51f771189e46a044ef16b7def53b9746d888f2d7
+ff871658dcd3487ab266197e7e34c177f877b07ec4dfffe71a0120fea56282de
+97de3d547ea5b97b5f2fe7f14f7adc84f461e5fcf9aa866bfbc84c9797c68749
+03b1a017186b2a386dfa8246c584461bc07194eeffb18f8127cf521e7756b715
+7f6f7c7358d2e5d9255feeb70eb771514d052035d27a86378a22d82378d99911
+f8e667e1d2df9611eb6c369826eba29ed9dde39dbaea38c9fbf05ceb5910d484
+453c9c282e5d418163b4adbdd92c091758e1432e8e75e151872e1dbdd5e813d1
+1a86cd3a230bdbeefd67c02448594bb5e8ea2fb6d07b098131a73a28f9cd9063
+59e8cd66c000894ed7ab70240e06602d7c4e5c2847095c961f88f2b02f2ff063
+ccb5f34f7e0696af4e43023cb3b0474af145dfa09dcf90835b766358e2ede785
+c63e9bdbbc208fed261c5bdf4d10a769112b62b086bbbcc8d25486310f6a919a
+35383ca27e13724504c63667f79103fda47692d2713923a5b982a2633b3f86a3
+46b4d7159a68ccfcadcde10084b91150fd86e1e185753a663fa82eaa428541e1
+40edd7a75007ba37fcd7bab998a401a37348f58bc42d809ac2d0d38c7f49c350
+2bc84208804d6550bb732dddc1f760684f0f2bd1d8fcc61b29b5fc6b357f3832
+54a0f238a00f9dbc38f063827fcf36ab943c9f61ce4add29be32889b32dd1584
+c54d3900de0b0acfc1345b1bec5ad097f75adf92655a12542af7b8c618f07bc5
+cd4d69b206bce599e1e6a8485849a7f2dca770618e877b44150cd34101e4a8ea
+e8d3bbfde9dc4a862af61f8fb4db683a81e614545d38927875cf8c027c3e28cc
+152d7299854b95eb16df2443c7ec9fd40ec579b52f9ea5a6ec56e3b662171b3a
+bf35565869988ab1684d47b801ae6eb23a6bf085c41e3c3f2b040aec9bc6cd82
+58ed64d6ecd8332f966da918d44af30897e54085050a0cac70f459a72f5af683
+3264a26d0cb7fef77574f10d4fa8ecfea0aa397d5bdf3a62d8897723de545ae3
+bbf38ef76b76e3e72d1c3a35b29966acb40e13928de55cdc20e691daf5dede05
+b71e8713e67ffed407f926be5b69aafab337d2f04992abffd60364a8549835e9
+299df33af8212c75c0819000536b89127613c763df066d184f718e1f10fb8e08
+f5fe7b8abe9f72743d0db04afd1d528780a097598a67a9da8172247c6d638318
+9885e4fc9231537ad9bea8c3028c7cf26c3ec6b7adb82b1481ca1b149a9d2316
+2ef5477fe27363a3b2ce1dbed38128d16b869eb8f21807f6d5430aec30cec535
+d0f4458efb8c19834474719b6791b30edb637f54639396a7dd581a4ab5e97fba
+284e1b756f2e2e3b54d6e136b237bbd042c69b21244248674dbb4973ec7ecdd3
+9f1ef47545ff01b39b09d06aea5b412e81fa46ab0d048b6803a5992de0fe2f63
+6d6d29b316a9bd4608131cc7b4c0dd1db4a249647ef8dbc5a2f9b9524284df3f
+1e70a74c8aedcfde0f6c556713ca8b13cfd5094cfe64f1f482c29e72adc2024f
+a2846a10ff5344cfcf8113d0d1da07927c53b9aa76094106061eeff3c7e5bf25
+d875ac8c07c4ef7a0bd5d4af2644e6ff82c8aa6e4506975ac9625fcdd47fc085
+4ff26d3dc3f8843c1d97948374170812c223ca163451e0fe4ad73ac7089e4fc6
+c24836cb8413a3185224724c5b302fa8d9ede4bf88a0109d98be35ad56b45045
+3422785c4f579a9307a860be505f5d880fa5ae66c82b293205e738e910ebefaa
+af82bd9d493ee18eeb12e40a69b9ad40d5aa6839d58a7894b5cee115a2c42465
+860139d35c0f2640041679283c476a3fcee985a53ea863414b206dfaf72c7d10
+851ab12466eaf532d90be235d9beeef7e389e88a9319c536954f081f511dc717
+16f16c21eef839669bfd0d8b505498b0bcc83eb41889e6380d8104fb732e982c
+ddfe4d508c45e8741e21d6e5934e678f38dbf17c98196dfeee7f9e205a52ebb1
+b9e2fe333d6b1c1b1b3386e079fb941c7ce482f2ed5c9426a224309edae06e3e
+9e8f5819ba4248d82c7e9cf44f7d1eb97b2110f9ce9acc313579840154427df7
+b2e57e2c50c38b25f593092f20350e27f67a1000f86fe87e2acc031235de5aee
+f246f75d4f4bf7d8852267941cc50de864e0ea34e02efbbfa72587ce257ef2de
+b249377e0df834e89060680b54c38d036895e4e2f8d55b9e4a5fec6da7b99966
+9b4ad9b695d6cffc349bcd34ed2abab20e289417eab1916574e583258817a100
+5173bdb345810dbbe2c600c25fbcc73727698446a2c4d1f71732208a70cf557a
+30e67fea48eb40f288ce4f576366b0079195507f25bc9852f6fab94827a79d9d
+16fad40c0fb0733ca838a148f1c2050590eda6cdd3a87283911efd861c7183bf
+10462d87eb0c7131c18346611088c5a8deb6e200ae86977736f2d15d818a444f
+5c435bbb043c7bca3d5f65152508a0234c6043d7e67da24f0b4d8b3e7367afe6
+c50870216ce2e4048589188cf361412cd5cf8baa691fb7dc66677822263ef3e2
+338a4064fbacdd0f7460139c508bb21b65f3f433c90fdabd0170268b7ca7003f
+d72ab116cc3207ea8aefe60b715e426cadd96d4dde5cd91068214c92a1307237
+951e92f30e07878b695bb519d60512ec7124d4df28fd5ace12a9cbc8c4ff6c16
+f697ade3613e22880897bdb1a3aa680ccea6085e234ae3d62d270afe5d4254bd
+6c4d0fe6b7c281919e6d422431e1be80d47a51628e3edffbb685a7aacaa27dce
+73938aded090460b036236e6cbaeefdd26c1e5caf99efc45cda9b3fde97bd072
+9efcaa80ef173375e99894d12c609bbb57fbf0bdec7b2150970889d08f992382
+23cdeb12483e3fb57705d03eb900f648618cf5822b57480e2fb420a5022b4e22
+138ec9b68d4088a833d50b2da7a26b4cb07ce56aaee2a1fbe00dace02a1de81d
+143f3b20f87b6a394ebd896b3a6e8ff548ccd70bfe95eeecf9bf9367d543f75f
+575333b7426d644dd94d675e17dd5694b3a1535aeae056900a9bf30d6a7e39f9
+62dff42d57b9c7d469446bea7dc3248e2093d47c3afc995e7be86438cecd902e
+13b1686c5ac4a58ee9a272f0ad18599b8495306d146ac0f6b958b86b72e66121
+3279ed284087ccbd1e8c865df2fc26702cf399b46afb744a3e99af6079fdd596
+5d1b59ef92713a40d56917270a40fc029583989c94caac0ea6aedb0310ceeac0
+96c62a045f3e6b5de1963ced45c566d7b10ce5ac76a81ff38737104595667628
+b51a1ba8172022d9c06f5ed6ee8e429be415fea9c8f648a27f8529090c6bce5b
+69abe90177b1274d5bcc64d29db949132223c7eb9473d5af376a81d94826f141
+9bddd79521481b06adc451ef5ce33ecc43a69be43916509779b4c8a5dcb4a2cb
+c12bb54f3956a97eff63d26de59faee85d6d3ed74e2f897fe852de6831deab85
+10e2790367840dae069eec64a77abff4e09225cbfe9f4fbc99a1cff38e2fe632
+792db6c32e444e85b2e09dff8f66dd638c2b0b5ce375980a894bdd6a1635c793
+33da9068aa329714e0ab8066ccb7eb15d1ff96414de80b5b791b34a62b25a249
+21cfe87d128a4cb6b93d0e51ececc9deb841e3a3d63e78c053f1c580bfae7d6d
+7482bc54705022d1f48bbd33d9a2ac7e0f6ad5efcb172aa4e49f356b993bdd6b
+8667e358e612b24ea9994a30f80a4db180c801b740a3234c0c95a8ad6d823791
+0ffd5806fbb8e86165fe6f343c72e655b57b2102f41a42d0220ab13a53feb105
+4836b876148c29b5d2532869882f7b54c92bdb7794c13c737d8a44bff734def1
+69786d9dc57dc55d385209061f38a411b5d49c66f191af793ed37432d2001a7c
+0fa0f23b32e80ef519fba48264eaa841427b4fb6311995d63ad919ad034f2313
+d6f504d4eb0369678afb331cfe7f4ea1b69175d72ec4df93d4fcc4d91b880009
+6c371d04c12f033541b6e1e7a010689a1614c157d5191c69edc290a907349459
+b6ae2a0eca1e8e871cba19bafa4b861a29172153afe7b9b7764a6c3ff87677d8
+8f8db936d12c33ae05e93ec31944ab240099e39ea3e9de81217996c91a4b5685
+e5d9f7be2727d5f3fa41079bd37760568f2f4b4ca19226949b0723985e98e7c0
+9c1be3b1d19514e8236f8da7655c016cc7a79e7d19c0415c74ba1dc510536799
+5c08f9e243b1d3065b601af52a1fc72a24cc36b3a283adc49dec4d33fbdfaa37
+055f9ec1846911e326cecdcdfd4ab522d2b2871c03219bb991567cceeae2959c
+96f068e117770adff52a3be04d935141c20a9d1c56252003f8bd51aa1d22ccea
+15fb359f308ff2d6979ba1d0da54d9927f723b505b86de8325bf3978230924b7
+97234835b6b946c5239c196be506bccc1e9a4f2c339bbbf7b4291f1e830352b0
+2ba637fba6dccb5930638db302bb61621a534c7993a0096265271ec3ed86fa81
+b6c7888114a33b3346a27931ea6b0b2eff65f94ea692addafde2579482a28609
+bb20c6f343c8fa777cfa9bd9436cb47cd0dadf4d16754e7da03aafab0edfe819
+3d5afd59b5b96b329bb4955a9af589c6881d81ace8c97dd92be95623d94b7825
+4cec015c59bf4ce98de9081328e7cf5d085803212054da028016350005aea631
+bfcc435114a426c5d4367c86311e6437e0a59137e29db512efcf312e1fa13624
+ee6f728904e0ea5def5e842f8f07f2627d077320e90927a81fc6162586f9ba73
+d061839ee5dfb7c4c66a530d1a0647a87ac4ffe48c956fb619c01feb95baf99b
+56b0799c8bff1d670ba5530cf7cceb6b4aa1de7119958d3ecaedd5dcf835e7ea
+f16dfc6c671e6b861297e675ba9bde08d0654c4d9add46a288b15268df4a6572
+62f9b12765b59b338c718651ba92329c9510655da59347336f8be78b9508b267
+3e366a409db85adf04edf07d75111d2fe6fd24a29e5072a876ccfc4290b0f868
+fb9fcff47575a376c594196d8463f4b2defa8434bd1e769553eea3e817fce981
+dec52191e10a7c9e2a7328df0d568c9149bcd8476913e4cd385176184e029343
+3ad94901ce4b5c2cbb88c785553db92464284fbb1cc3c456d8211848dce535ba
+697134df3371ed34bd6b0fe30ad22356c0dba8ccb32055f01c0fd9a931191bfb
+a1af29f383a66ae3a810de7da2b79241e0bb376e4405bc7980cc17ab240b9820
+202c4cc9ffba362c8a547a7c9f3fbd37b55062a294870721db5f063e05b48d9b
+567728f7b844f85701174fc98aef1e583a022b7207a834dfbd9705a16ceb4dc8
+c5dc9305ac98f5f41be6d317e20cf2d7166934586bc63a4cad29b1715bbc8d0c
+0fa882e364ecd976e7406899f12bbcd6145dcb5f314195cd4ab865ae475a0c20
+644747ed8f79ab9f4fb736fd7f7361d4885bb41cbbfd59b0b7620cb17659be6f
+986fccd526e9756bdf412c6000dbb9ae766101ec23f8036d1afafd45f106ab14
+a3ef3553cdc80411e766399bcef62e77e67ad7568812d3b150c29a961dbd4e47
+ccf7ea533d1bc8c16ed25bf5a330731ccd02139b72f63234d49d5c33a995abac
+40cd06c867a08cb3c19b7a0f9df091d51a1d387773ae8dce4147533e41f929ca
+cbe198e61b81380306dc2c99e99abdd0b6f2f84056ea25d549bd1f88be1dbf4a
+6fc994783d4475d4018f48ed18f1bb851a221da3d9624e3a7faaacbc5e9b8424
+797e5646d08404f2feb868d59714e4ff77d6aa968749e1507dbd7b3ff19218bb
+fab82906e56136cdb9e3ff1db470a20298b16f08f48a6937761a593e5d98243a
+c842bd5c3acfd41791ab02f991374cc14e1cd0de834d5a13343d70d739c746ea
+626310b0f7678b8e7b767265f343ec770cb789e8dded6c56889ccb0528ecd747
+0668da632b3f399ef2e28e3d8731708d630be0df2a1becd0e95d031aeddd74cf
+6a2e2bfcc5024033e2828bd043dc7271d1863937c71650e5510418e9b9c35b7c
+8bf9037305bf2c78a63460dbf914e867c16ff5dfcf05c44912c4083cfcf6e498
+e7af6072d7052e882b188c696fe69d1cefc7baa001f095ed80299c9290c31dc8
+3042ef7d9d3be6ea2f97f667a77918eb207e459958b60feaa7ae8d0fa14f00b3
+37a1b40055b720048a3b67c2250f3d94b10133c1e473e5f9bca3b4f72da29c5f
+d4c09b6520ec5c54792dc37f10d75c0d4302844f7d193cba7ca088838ce44a82
+f1d3161489ad1b9a2cd319840c0f347131f94296f856d935661f691d737a7e94
+51872d4c49e71e9fab6ca34a96f682da48c50ea79dd68e199a2a1d49f81a132b
+9a990f99ddacd43888069c37571834ae8dc60a69851f7a80d65f5e1a688930da
+8784aee9a5d6ebe96e62e4cdc8b34740acd63f50e208b43a38c6bd0808d356ab
+5ea11fccd7ab3bcd6aae709995b45e03bddfe1052a1c8417f1d8a794a66a0e72
+9db494db21a36118bf7c031c1e0a47c35682e1f0a183e1289a438c799273543d
+99a3840d7549891458f6a3ba49b9f556920193dd86ef7d457293c17ce9cc76b0
+6eca47da729b0c9d0c3181b59f993e773f0279ac90a5ab526aacd6d8293e67ed
+ca0eacdbf1b9aba40e5979a2f20810e6590decebb53bb32414b81aecfe304407
+c42af75e03a6c1016c381a378afb7b943392c081af0680726c0ce4c984856999
+2b7995735bfd871bcb6228d87d3634b3ae50d766a3237361a9478adf6a32b12a
+b435014eebcc53c44c63c7ae474b4f6b0e4fa1b40731d0a3aa530f9a1626e700
+12b5a51fc6473e3bba2e0eb274b747273ca382902511948174fa78de5c7ab5d8
+7ba99000052d5c0a4c3ede1da7927b214b893d61fb11ebd6dd1af012ad26c065
+fa64581182cc1ca3b86150e63e5e3b892c49fe4f6ae6c34ca1900d5fdbf72c87
+6728d86b87fd0db490dbaf34c1c10b4d123ccbddc9887b3818f4335baa4991cf
+812bbefdf1f3a3c4ac56fb633d75d04c17b5256a8216537c928f9d48b0fee946
+fa5d23ce42a4bcef5075e9b4b144ebcaf4887180c733e8e3ecc1ffda9459588e
+a4c2f6af2ef3a06a8edb613ac2d5dae127e50077c4377ece47b7239b15b2d27b
+d08df1870d8f78fc6e82a08441ff64b83ebf556db056fa7847f572fb4c2b2a71
+e5ce66c223e92040e104257c916587c439e8ef8cf32e65b737395999c7a435a0
+2abacb6129f95513d1d89d7cc1a0c8aeae5b5aac1d78dc42a37c435c641972cc
+b3c92858756559f411b808ba10a55ee5296fcea9f4574550ef07156b66807b45
+2735cbbd8fe3c607b2e683ccc8f7932e4d5ed4d87c672fe56fbe8fb644f40ac6
+9b88d91bbc73fe3b94420e4aa3e493800934a40e519e492806fc34d134989a5d
+1c002d51790b15793c3dca232a38c0ed32ced20ea5bcc8da027a7144434be835
+9689e94ac5e8b38da131015f4d34dd8ccded41cb86fa14946ca03f3ca776821f
+83f875a2660a64c4a3788038d7ca62d041e24ae86c327af49cea43f81f9494db
+935a8b065639c789911a46b3737d9e5db2bd918982f172a76cec867a086cbdee
+a030c8ec695dec82fe0a6ae7dc013df64abbde862456b4d525517185015efb3c
+f997ca8904e985f2fa2ba8f72acf1b6704ae358e7d7c2868010831ece2c87739
+17c92b6b425ed85f3f21a7bc4daa9620eb6a224cfd08fbeccd11652427fc904f
+f589c45547a3a33146b80dc930fc515655593d24d259d925e4fb46996bb35db7
+fea309a4e4162646a85d3776bb44f20621d4193b38a28d1472535ec01d1b442b
+b681c799ced74655fa5b5652a8bb99012035a5f66b2729cbf45a998130d619af
+77301e13e23fde352a367343b8ed274a70ea92670eedf6f61a34b18db9cadfe8
+f45bf4933b81c8d98a370e5d9afef4a7bce1681627e3cdb633708efa623a3751
+7cefcc75635dd85ad3ea10ecb575789247b9d0257c40f97209447341deb604d8
+6abfb08a5120fb0fe71ec2e337928a4e4f6ee3113064e488270af5425c9ae51b
+17e9dd6892f9ea2f98480ca299275c88bccbe584a4a192c966b9dad344753efe
+efdb52013c642581e44d1b1c866439648fe1389963039b0a9352b68d7f3dc41f
+fd3cf32c49c062d964fd6cba0fd1100beaeebe0fdf55112132d5e51fcb0c079e
+f644dfa99d580e0cab548258aa864149d4a4c0e618566fe4ca9ebcb9324bc63c
+5ac232512d086830d18d0f6657e9694bb9b3c4f4915a511a45b3c56460dfd523
+30da25d236b0356aed6ea76117885adcf2bd57222199bb5fb586e97d1c89ab8d
+08ffff75137d2c0446a81c32bb336562088bea8702fea749c21147defdd87024
+d159b2bf1692244ade86b3a9f63beefd1b030a29b6ccb2904cee95b737180520
+59f4426d40c7ca7920d06fe5cdecd29e70983f787607055b277030105fa2d9d5
+adb7029c7a3a799494c6faa9ecc9bdcf91ec35cf0defc2b95d6bd447904851a0
+ab0e39fbecb080046246ff21e2328ce12bf355ed414334be01ec175299c7b82f
+3e85ff80347a20c6d46a596b85e842c185b8e7a9bb8a54fa272edd1d46d7466d
+d668d145ac815c5b051536a2a393724dbf52a3412409f40b92f857337f1e0adb
+23d2f0cd6fc33564a3c1e9010f6e0350c966a7a003cae4da4767ab839f032bed
+9ed1e90d128cd8b1396cef03c25bdc76ab04e6bef073bca02d83684e11731c47
+6937e5b7c02b5214ede19fb749eb7b33a4212701ec325a343a7694dfd6be76a1
+98890826f825f18ad39ebad76e2d9cdd294a79398d431215dd95bf1a663ba9e9
+b130f8e80d2260cddb9344b644ce84974ec8787ab84ab4b9517e44fb09d77a36
+102df99690bdafe89b4edda58c693b7f8619039a3ab676f10d37d0be02b29bd7
+da19c67fa4d07c1d562a65247932762895fa5e9002c45e59350ffb811cc5181f
+e8eb49a988ba3342d129e03e86ab9b16d5a92b4e872e973be41da232878cd14d
+f9d2db75d4d5285232ce5e4480fbd0c035dcc427e35a9773edc39d4b17f1eb09
+e842a7348246f1d69e3a15f40443471fac10aa392adb71e66b61308508ba380d
+64374b66e8d234fc62e392347dfdbd4301cef800aa88f29414f8d5d625ed4971
+f49a4473ec350715c296c71cc7947091b49b62feba902f3d68a29e67522b0db1
+3524416b434fed422da4563d3349d19d187f7f8fce150d746b4a038224e123f4
+8e27c8b26a83d039225b551c489d1309dcdf05eeabc4c1594a0ec8596c2c8a05
+081c9df97b8675259256b8531fbf5b684e7ac076425ec9e4082530763c9142c9
+808c3da66c0cba1f5f704a4d4d25183d243c01d33feef4119606356be453474c
+bec5283151aac2b18f231c6542ecd340f07cd7728db3b345aeb977f14962d72b
+e54f4db3e5596d6da03985689d8e6929a2aa8cacbe9e14b539cef80b2edda603
+34b90ee98455008b4768dca85003895ee04613075287741fd8ca8d579dadfa69
+2a5ccb49a6c5257296f9fb71028a6cbd52f4daaa7f089b8a65f1baed85c35313
+29afc857a7b9bc8ce5905ff58730033c8d49a45f9f098c39a08c2d537ed00b01
+a6605633e2eae0971506f3df8248ec06a343a4aa93dcc57bcb9afa200efbdb0e
+543f964e8b9b524f460ac8a72cacdf807b7dd6efb9f768aefb928876e40820a8
+31686dcc538e5cfd348ac3b6547add583322b3dd982e34ba161ebb0a9737af1d
+580bb24095d2629a6db07413050f653e8700156bf5bc85ba077c244a55316841
+aaa3c6bac859ccb7cb9a79a7c9a3704431c2caccfc35cca5f3851a560f5720d3
+34497b4a425b539cb74d462463a8ac183c924a8e53726325cedc4913b1ffd640
+466ac24da3595c7f67993f9b6c22ed186412831a0724a352c9670f6b5df44513
+2f271fb623984cc1f8d268565f5def71ae23e6b5ee14e33c7b3a247763ca2a4f
+9ca8f339add4056629787ec74e0bf54b8102e4b22c577f9bf3b151dc8aeda087
+bf05c29721f2e7bcd3433ceff31fb65cd6fd530ee077f4f0939ba37cb38411fa
+fd11e1dc3e910c2a7ca28eba1cc381e3e43c3a78cc1087a25631238c894dd752
+46cba9a8df26d9d44a830a3501fd65a324d63a969665477cbc0306aca018eead
+533c7685ecd289573423ea384eb629db976f9230d6a1fa6cff299aa98de3ea79
+f29b4c274eebc64bf619fbf552d6ae9c60e7c9de74036e434a4a6dd6e671fa41
+b8cc4c56b811f6ad0cc459fcfcc2bb3654928fa015fe4c6b1177d7c39c747fbf
+5aaf612f30b889ba576d87dd4208a9e99becc44753aed1480bd1187ec5172632
+25d00b69d034e040971aad2beb20710f726a696ac48efb960d05a0f6f6f47962
+2c5a5690275e47c173ea000d392e8c20789cdaaae0637e01b321cab63858b0fd
+901209b323dbe6c61c10d9bc8ee9acbd2a3cfc357f33ba4d5003a337df07d9cb
+32b7b7360148291c45a4d34d4d850ceec2ff978a5f0c90a0420b2bbdb4b6c778
+fe9b5a41833940a0ef9fc0015e0d3e6c80a9bba970c57e1218e10c0c8b8c8808
+2f444af6ceb012b2d9ce6a96eaad590070424ef286225d972be1fb2ec18e713e
+59497bb9917a173fd07507a422e35431fcf4fbc6ca86086f289c9680be087a55
+873c75e7998ddcde7b71c54b3ed2f6b3571f0fb3d4c103cbd1ba2eb006596829
+cdca02d166fea0f63fa0c044ddf4e3d941413b900f8550740e6115a86818dfac
+9dc935f8842e0b011d2746e198ae3a4fedebd8245b8285b7dbec0ad0a6d1e277
+23ce1da5867caef28cd21cf6378e43858e596f5ac514cbec60d57a6c4c6a2820
+b541f4d6fd50a03eeaddba07e236417341ce99fe674079a48725c6fee9b3293e
+7e2b593a573681155c344b0626ccc477840e49e6d7b76738dde7b340341f4edb
+30155156049a4600f1d8c17c3dc2496776425fd23287127d5a2f0d9fb785db1d
+9be6f1b410830df7f19f4c432c7c7766253c67eac8ea7ed19bb0df2ceb178adb
+5437c8d85b7b27fbd2c23d2148305ad2d44ec69fc26880705d4efc5daa7a1a6b
+3c5790e1d691a9975ca37d585c845cf15fc3c7b152e29137ca4168d42f8a7d98
+876564c9ad163eca51a2cc404ddafdf61f9139021d7dd275da494fa167267841
+b7903394140a7544ce4cf8b582bc8b0de916890a560ff490db22dd7b27b34ef8
+b8ac86149645f63306cd298b803ce40abda69ce13dacabeb0fd3c44248b49232
+2daa161603ddabb2498b9ccc84fec903b6b5cfff8e9ff5dfde25a69457d5a206
+c0eef48227281bb1866f2d3f13d96c4f26c6f6c2c8aca1359674430747c5fede
+93ecc169a5855f12b362da58fa513ecbf15dc22e9ee46665507151590ab60444
+89ee1f1986af4e82c8502880381b246a905c5358e8d23e62c210c455b579ffa3
+d8b3e4d993e6c446f3fa77b1cf68c1ebeb463e9e78bd53b68f918e05091b6b9d
+453ec9511b8bc1fea1025875fc38ccb3d8d4deaacb959b1d08a226b4c830b733
+6bfb8ad627152314212da50aaf2c2b5185e2429d46ad31cc6f9db819934e1af7
+b1f7e75aad6653b03c2b6415c11ff5c6918ee1c03e4cfd08de00c2240194df84
+328d780e49d3d616432272c26711cc0e05d88068bd009e5085d172c31c97a64e
+f8070719ad1dd72d66ab78e8201cf1f67b84456e3766544471fd7aa45e706cb1
+37a9c256a0d9b2607d15392f7060a47409e4d6a5cfc310045ee7ada6d0105fea
+fafed036a5cb444478ae11d920d9541877f8c1c3740afb763c4ccaf77f6d1dbd
+40e40ddc6a430e8e99962ad32820055ee55cedc516b17831062d308916502d40
+255f786238453677e19b51c44d8f0be9ef19cd747d5836b65af6dd5c41ea6901
+b6fc9c5c7dbd04d3fb9f7f08a2beeb9d0c13aeb2bc1d5419ffbe2349dccf91c5
+3cb956df77eb73ab811ca30633e6d61d5534551d45ae24fe967cd29f8e19c8b0
+305283df0fb776e5d84c3edd20bc2c4df715285926e95f2f4c3b963726d2a7d9
+4fdc743bb2b82bf4855cc0ab701876827457aecd2a69bf58ffb363b7fdaa2ca2
+8b7b7824ffb535b9a74b00e90ad3f23cb7daae9aaeaedf7d2b97807fa3329cc7
+63689a645f515c11d4e50dcde110015d5599859ca67f59da7f93ab98b75edcbb
+f382f878b9b045b9a114b2b4bb6404c0391c8ddda8d9d635a9e3c74d7ebc604a
+d07f0d4025e39a369cdbc672ebfee5a287e07d94f161e11d0e18bf764af79a08
+f15543796e4daa5c3497c4a3986084e7a9ba0789a2ed2e1432623b03c210ab9c
+e59dfc017ffc59039df164157fe74dbfb00087d3f4026f4d625c41250fd4c09b
+b71495a7e2889044e87bda9d1c514734c3d14f4123af5dfb6d618765845f9730
+c66751d613770679c554cd03d99f4653db05440e2bd1202006a05e044e501381
+5f51c02148a91edc8af6143aecbad2804038d2381f7436db6d46b0e9364a893f
+5531e49e42a740a40a87614d10f9e22d336711ff79a6b7b9f8248456691f864b
+4ee2261a13ea203f282e36d6001cba9fa218c220e447313420be2a66e76c4c38
+2d0cc85cccb5d4640fb8f923e1c55c9dd5cb80918976b5e898f03263177b0832
+2b1917869cbbcfc7789f3d799cb53183bf85b89d9850c1a0c60fd6a0047b5f97
+592f3dd46718e25395b6f13c20d121bb1b8c4778980d05499ca442b3d4363491
+19a968f8a0ebedff2b95cac72a617172cbcef5c6e706b9bb1d9de6431beffbf3
+715116cd1d9207402ed3453f6d343b92cfa09c4c23f8835919e183d14526322c
+1722e4eb7e8172b1c8c86eaf3a2187bf9674f482e1623163d2178351ac35028a
+89aa2668c0e10315ad5b5f65081e768bf4b02fe2cfa1e636266c4f632d1c57d4
+bbb4470f51d06eb3b26a5e02aed0d6f00d27fc4118b8a0b8b9ccae2c307fa7c1
+83b45122390c52d5de9bba735546c29d40027ca6c00ef6a5bdb99e7d9dcd721e
+cf6f3760d25ebd62174aa9c563a31da6a1225e3b4ed652db5b8fcf013954c077
+ed730241f4c26e0d2cbd1c246c855e8aeed5c8059e70d5bb8a1b7ff37e2d9ffe
+681f6fef2788e4a603be2b272a41946f63da44978d2b03033e5b44d098998d03
+05fcd73ebd820e5f93a9e9f79573a60b805ed0375c32cc65a1ef4569a893baf5
+45befee450304d67cb3460a10d620e929f44e352157e6d12d353fb3a5bff0a90
+4bab7dfbb4fa6c398877c79fdea6bea230d2b6df6b46cae2dcafecd544b56936
+40a00323ed5c9e30cbd14b40f93f37fc56011bf329ab6fb5d96ec229edd0c541
+ed4f661fb4167ef9c705b1d293dd432bf89b33e97a0dfc1ef10fe8d4c863da2e
+b16a3fb06680812c50cd83ae377c94fe26deae946687df5601e56a46496e2e09
+bb38c3414580cc1c327853235c483cf4600d1de1dc59223b4bb641cd4f256092
+9e0f3df061b19e8515fc9163d4f16fb3ee44a7a8cb1df1dda0ab32adb9252005
+34b21ae2d23b5d39399a7dee2866d2962445501d298390bc870d2d9ddb3586aa
+1ea3ea0fd2ad4458cc3b80c65364b893640c1c450505346a4f22d17bd44e7ba0
+09368203f133338077bb806db218d3aa4c187fbf7c440d48cd18ec75fb218210
+ce3081e0a56a7b44536910cfe0340c3f48033c9eca88560d8207c31474b42446
+6be9d5caf07a46a7892c24ca1792b5b3efc4dcdad2fef5da25e1b0cf22f2ece4
+0dd8715df95a808a223e3715a4a534bd276b6fb114f8493f72521f15e2f7c194
+77e0072d1c8f2f5a6038f3a91d5970656d7f3f740eecec42daa6615ebc893a6f
+cd030de96086b39cee1ef7e9207f1bf228c1fba43c53ea2b34732cf63bea3ff7
+60d3abcd75551d0b8e8d5cb80646ede7706674a63358bcce4059341471a7df8d
+f0bf5fb04baf4d41719f505923085f9c48388ce354b4bcdcf4fcdf7846a565cc
+38385d0892a856ddbf7f712c156cc114a67cadab7d472be7890b298ce436206a
+a31e770c38ec997a397f5af152af3df7e350bea9054df0fc53cec2f4a0ced3f1
+5c59a8436e4f14ff49b66bc6f9e1f1d97d4a0bdaef25cbaef33a0f7e951410f4
+ed5aa38b2da8ee932ba0a414ccf256c5d68271c75d51fb4fa4a7b66d8b4307fa
+82d5eb2e0b4681edfef789033b08b70c2e35b66c5f5b868a9825247719d2e14e
+7c1be51b5cb7b69fcf20f8435207e803bae6bd01fa949bd59d6e20c3ccf180e7
+e383fc79038a439dd256a4782906723448bedc672c980196562830632f809645
+872deaf72534ad4d42848ce497ff12d28ef0fbc728a7f60d60810db5884d77e3
+bd259d298dfe0e4de7695fe2ab4a43ce1100a5f766fca8ac44a9c470369a151a
+728d06bda6ac3a64905a9e7cbe1462bfaaa9a4d57a317682a221554fee457aaa
+485729cad67fbb139d4d7d4645457cc28575160493cf84ed6b4cf733052bbc95
+1b80a186e49dea1eb7f4e7aa45fa5c3666ae749676bca70674be4bfe6e196bcc
+9a294d3af5424dc1e994e0f0e8a89fe667ab89bcd11353b441e0b24993b0c1d9
+cd7558d2c89419aa18c2e85ca74c013e53b8d5f0ae4c53f29f7ae09e51c2d057
+95423b75ef20a44ab100c45755764a8d0eec7d8f013f30264a648a75bd5b88d4
+1c92ef78305f6403da9a971625be0b9503ba6a28e440af5dbe1954d785a93f9a
+7dd2904214940630ab80f88382486c437754bb541c946dfbbdcc28ea0bed96ee
+517b2f4de993cced9a5b503a8ef1561b74aed495fd64a44fd89a0adf96442db1
+cd2eb39bc85a1ed8bbcc60063998d49f02d3dc2edbfebdc022b8ce3ead29196b
+9c07622728bb9ce2bd992876c2e783b1dca5f33e8ff322f63209d94eba4ac6bf
+108ee86f250a9a5a6ae5b06ebdd0fd2751199d99513609864b434dafeddd7d47
+713b3da2b4b12ec7b779003e7df7d4f2bc33c9cc41ef41f0d9529dd0d3678957
+4d66283f10091c41bd2387cc771c4499001ef2c86d0eccdaa904e44c3fb818d6
+703fc8e425088b3753472b6c94a946ddb7ae390b2a2a86e67302cfbc5a3ab520
+728bc8c399655998fa6c4eaa3385df60d379173deadcb5e7543f8c6a8ada3c16
+744ce62c12e0f312ecbe114fce1473bf1a9affb8df1a118878066047c1a1ec5f
+ff9b8455ac309d720607eef62d2c0146fb73c256e90a722c5fe42aa19dba818b
+17fa00fb024793c03613650640ad749c039550e418b563f2c522eb7a40543dce
+7cda1b1322834ab1bd1ce555a5c284c9a92f666910af211aa6b258eb2bf7a28c
+ba47b4f8cfefe17985470306a85bda0aee57de81220a5f3c265096ac21da57c6
+60bffea3d98f2358dba450b29e832b09e764b4e41f9952e2935e09e76941a850
+d25fa4f4f916552b7ee31144c78776337c67795e135e26cb5e4e80484fcef1d0
+fb6c8a86911f7358d5077f41b31ebf9886430964bd316f75710d83c7dd696fca
+7b6490801cee0387b0fd42342322121f43163f512ffde8f284ff3aa1f211319f
+5556d08adc1880b1cdd4acf7592d4ea358d2f34e69a73ea9891498cd3d59a74c
+7a7c48629be752b60e795a12c1fb5f6d29ea48b1d32253e7cda453357d769774
+af1728837104aba991ab43309b2f298290dbdb32066b59b360fdd2f0e32b77d1
+797406014fbbe7c9fed681f4efa445ef694b26716a9d7b5ffb1375628d61d800
+70262b3011625594c8eb5dfd7147cd224d15aeeb9d443c88359236da5514d32c
+2308414414c22f47b85d88cb6954eb5a7bf4283754b6129ff9ba6fcd78e558e3
+281d4201679a411ad5613e38f5542549325d6fa0c15225eb1c13917b8d33fdc8
+30b2eec374994f6b6a19701f9b3a7ddcc8b2478a8601750da43565c7acb34114
+cd24f87d601f995fe17f94a33ca9005c53a5b760e6bdd4256f716c8d59d81128
+1e72c01629c2242295791e664f490d2808fa695986534146942c7cada8efcce2
+bc3ededf886ef8f4d0ebe0839c90496481b324dd7de90e2713c985d0dc196f79
+059f964352a2c72d2df0b13a4eeca5282091beab8bce8f1d305464a8cc69515f
+99c720e6e2221be1047c938a112f3e31930ad86bef1b90fa747238bbcdfe5a52
+92fb9cb8b9a4165c7b0156b550b536a7680f217f0e7130785644e1421a57c9b3
+e94d27d62d2835530785126d553640f88f4e5d05dc288743817504d48fedda6c
+637c53296d2703c986abadfb74f6f830a57c0c4915ea7758f2dc0881ce5a1426
+3f298c8ddf55dbab0a8f22e8fea76f63a565059c72e693d7e29a104f7f550d0c
+3d871d6c7e3c2dded288500f8925fcd72cc838545f2c7c05086cb8c19a3c88bc
+dc738a47505ed1e76616fdeb9421861d5f88b0904deb9ec637c997495ba85d93
+7a491a2b125e3a7a97046bb2cfc7187071067e6382a8da1ae760f513803404dc
+47a7f93b8f3a0b2ed5f033d65db9a5d5fd11db4f10152b19f4f5b2f48b8a95b5
+50145156dbd721997233961621f5a64f1e6513472e083c2a5357b08537c53b9f
+07b90663adf19c5028d53d26c4dc1c540c86e8f744c8e1d02dc76f137bfa6a06
+1792d82752b522e8911953e0f58906d47bf089ebc14dd0d9948bfd6ef2e0c892
+c8ceb39d382ebb830b9e6ae7cb522d189b34827f45c962b0da89ce3ff3e9f6b3
+967f59a7076733d65ccd8526a3b3db8ff45ed6c16392152b5593c94a1842741c
+2bb710e4b331fbd7bfffbfd77f81ef4d9c83b10eb58a2f51c4655f6bf062783d
+18c3c06ea4e922e60cef329de28fd55232aa8dd4224937a79723519b3b60504e
+5994fa207bf4e2908fa81ac69a2841d21cadabbb92498416a04630520b391c68
+30687dde665acc525e86fb783a3870ff43e0f0b55e50798dcb788ae93666564f
+ba7a6fc3742c86ef7e500d2ad2b77ee29348145b0738579189cc36d8fe15c5df
+dc4b66450947f168347afd5238e153b9f2b1d7f64373c0a90da71eeb18f72b9c
+f3e48ffff7c202ff5a7c2cd53a1c967f7d71e7cbb4e4159e5cb5f475ba0fef4c
+0713a2923adc04968030dff07fe9489eaafb0095e542aa9497544d47dee12c4f
+160ab99511673a43cc89c8629bba5f3863636b9ef246078815b283d9b7e91399
+e74cee17e147ed7caca02f203ebc977618ab18590e217ebd57e41ca020290d84
+f02a4fdb4f2b97df16b6cf7e3519eb810b654d0c50c4df1e68cd54bf05e52e94
+7fb47f105e02d1a4b7b78c0ec9f3bfd54b5cafd746322614ea56afa4d613d5ee
+6baa19c573bfd4640f9428f23988fd9f0ff4a49457e7bf1f25392d0d68eb89ac
+68f43c2c2e02bc83bb45d9f541bb2a6ad28b8c70516ca2476a52edb1ad4b467d
+63b970e2e40af4c59d46070352162eed10bf2662217b32ddcaa42b5c9ca7c486
+f3810c51a5c9f25af078ba635ed08620bb7b91818797cfbf47e7d9e22ddc1d47
+de4a7765c4566b479a1c66ae9362bd4bb7dc3db16daa5d27e79918bcc11e995e
+3055d826b489f527c5061f4d46606c7a4375ba317b35e43ddcc5811448489273
+c8e114b48d9e4e32fef51ae8e4440ba35f4c7ed307fc81cedaab0264ad7187f5
+0bdda954f5eff597f65759e538916efe1ceccdcf33c363a5879e78f1f47dd1d8
+2fa4a4cd61fa4d32de859714ccee93b1b64a3c7d9d6bec30aea2b10c896bb60e
+c8336dbcb047e66998ddb368e1f83b94bf3df73639560f568a5aafdc810cfa37
+f2c53a0f3a5d54fa0cc59a769f862b22d654472d9846099f5b5841d5f30982c6
+ac2feefef527613aaa3005607cd82cd56073dbf37d446f53c9509d9540d4b10f
+ba4198cee56d6c2448112ce7431a382fea84c92577de8ec194e3227b378ecf02
+a8443b9f395ba5bf18899d37b2cdca0df725fc0d3f2d2d010ef35d1d11009c9e
+23e611de999294c5b3854ac2cd44c6a3b5d93a2e3c0979f2aad87ad368478739
+94f0d9d78334a8cb0a9ae03cea4a9a211fabdb4cc1c50b325754e9c615facb09
+6e5bb94dc9b4ea3fa0470831cd8eb273753710a9d0e1122e0390c763c07b7296
+9b1ee534c46a82e62dd6d85eb1242f577a444cecd5caace05ead443675715ae4
+b2e89c8a3f861aaedfb882b2217c8a59f074ff7666d9dc0e77760e8ac0131580
+b4674ee1483cf7952d5f2614af279fe375d9e80947af930dbce773f89e2d1942
+55cffa5a25fec611208a5347d8da41d06b265537590ed2a18dd61244561f6a28
+6aa7b7d003fbfc182bf399ca86fe4f3b0f9916b4be9494dff4dde43d543b4475
+2dd8d8921b631588a792ea159aadc9a05b07bcb5ccbd39776eb733a2340300ca
+d08bec731a9d17bdfa35ba445f38db9efaa3f8bbb550cea8b742c00ed6237599
+9b9292275df9aae57f782a7ab34a92782a0b1be183913061201faa4340b54d8a
+0ae2acfb004ea2366aef056ce8a0a0e17cde94723223eec759e7abf285a133d3
+ce981716d305690e627509df3701119306b8e8adbc9cb7891bb5faf9a6b81e6f
+8b25275bee86edb442518ff110aadf7cb120bcfbd380af3c91e62f1cd51333b5
+6b25de8112c6d47e77bdd08e3bdf3bca8f20e6b96b687450b23fee7ded8099af
+31a25c939402b197b2356cf9d4d882a02b01a82bc7091775941e0c883f9ac2a1
+30ccf1d51440f8aaa64a2d0eae3c5ee5378b3ec57a27a6be73e3aa6676cdf3aa
+c6ad5603f20a30f032386d1293ffd63b98e751c6d937509bb27a0dbdd677ed62
+dd628e490b5a3852d2841774d6a3c16912b76314cbfd630bb48b958824aca788
+36dabb0ecdab2a2da7722c9e3b7f511a56a2498b329f11eb454b34b185704e3d
+8c244f54c36945370aad2050fe034726f739edea05b164662094962904f8474d
+263b43008f4ef5de0cc69c9dc7faa91c6beeb28d2bb977fdf96bdf27c4a49fa6
+bc7b802373517aa1e4d43342d90acb99f8db854b41bb95fc333e3fe0ccbef3d3
+de3abb46991ea91baa44fc52b96d5c5d683675fc6498d85daecc9f467dc76b4a
+f039a69902c5c677e998367aac1d3a765f52d55cc48ecefb30d709056d22c8cb
+b21a422419e6b9b9b50b3b5ea417e6b079d6fce2447322a960b74c33e4f7420f
+0ebefc2f36471c6f9997afdad5632ed7c0913a76b7314948696846b793aac81a
+491c8640a04a0867eb16d497ce0f26bbde677f840b87dc743122a144ba858a80
+1ce58bf6b3e5fc0fadec743ecbfb6f8fc19f778a3062cb14cf9556289e7484e8
+73e950c71c46b940d60a6a718fa72927e770e7a917987ac5f0afbf0c5b3c5ef0
+591455ae1aee69f4768d690148d8e2c831febd5b60203914c960015edd0a8e0d
+e3a47cb4e0093193dbd2b925bc3921f88b58d856b384b1f0158e44bee3e17306
+6c86c5a9673521f0c6dffd8413201a17e59a8235ec8bd63e60176ee65fd81832
+7782aed7eb7442d55164a7b35bbbb6413a36de24dc127cde8eeb9bcb1cdaee56
+7463bcccf86e738d7b5436d1079fc6aef850369c04139e93933ce920465fb403
+a1354553eaf1f8171fe79e61fe157bb8c9cdc80467859599354b73d983190ce1
+60171ad887b1d46bf64dcfe3c092a49e3b9447e1d2cecbc440a03a9ecea40105
+a7bd0e0a4dbbd18030887df3dc8271fad0a92b57da8202e425cb672cac0c36a8
+095330aba0cbf4635969d6f35d2626fe382ca7890b5743df92963de76e7eb4bd
+bb8a9a950ca59a553aaa6a94ee66b9bb154b86dae32ea20ce79de441228c47a4
+aa40949db9fe13d761781807d8e7adf991a26081427cf719ae656d40f3358000
+37330a4464860a41a0653fe5fd69adb6a733f84c2617420527ed720b944f022d
+890b2cdc2d7dcd26419127ad47a747c9d3e0f973ed50e9a83329294a7ef63b38
+bc297930be33e68046c466b7f44c3d374138e8ccfaa477db9ab5d83a77df8f31
+d330555acc08f04cc5e2126d4a163313183e0aaaa8645e545aa59c37efaa3663
+3c92a17a53afb715a6c8500dc1e2c7d454611ff5d7a60aa8859b8c3fec060f02
+c9576bda4ab3b101424b99e07096bb5cb7625bec43ffe2180635994158aa8b03
+2c82a993c6c7233d971d6c8306a2cfd45c787cbb5a1dd9fc01c9803689b4b281
+c82a7469992dbd60e611e37f0ed8133feb5ccfa57d9f091758622772fbc94e6c
+54e3b3d94983d914b3fdee77954be3252497392db6b3bd290c85e0a295f98c44
+5f87998274dbd62d5c724c3cfdc2385c6b54c8f073f9104086d618ff37bb4e1d
+5d571a0d41df55629c5c226317b77ec2c2441b5af0166517aacca31193143e96
+51ea351b6b17eb764be26591cf205855ff03022af47782095a3d03c805dccc44
+20fcc40f5a3aa7639853ccde5badc2a85248161a9266a60f17869ee89191524c
+f286cb9cef6a48d9fe8256fdc6f53d608f99b8cfbc5190402cbfaa58e16a0e87
+9f4cac054676b5f591f831c07a32533665bfc07dec0c8439bb4b51d54e35dadf
+5d81dcafc0bed1a21f0ef2fd67547f6f74815d8951b7cea076f26f5d19468e78
+4433f450bcd1f3b29bcdc72ec68385d908e773b6f9b1c137ca2b69b115d3bbc3
+05ce0e8217a1f42305c77b2bf244d298b53937579f5d54c94ee6f8607eee44ac
+06a657673402aa59402107aba64d49f1cf28aa48ef73d5d0ea01218c7b06100a
+9501fc2c15e5b67ad8f65eed9e42cf8a53cab1545dbf8c82803ec71a1bcda4a6
+0fa271fb315cbed111384051ddd396b8902ec7976fb48e216e3505a16a30e96a
+8d2da699b6160c8b3b5af59a00e705479d78dda5e08870cbd81da9868000bff2
+5a3311cdd21326a47a665c81bc450ebb14884ca84b2a7a1996a558330a7f17e0
+99eb457dcccd90a9d303afa279b45af41693612953c0f086d9ad81804d09759f
+c91df65a83c83edd31e652ae98f3759ccb963f40e83f532a98528911bde3d7cf
+041c6f8da633368d1bb63494e8ceeade4b2a50e6f3f4203d2ab275b751cdec18
+2509d76661094660cf22e58264dbea4738f5b2f05a4b6fe97509626f79561386
+3e78b156fbcd6ba9df4a2edb9d56251593feba7c510bce2768252c66ee7a096a
+0f350a5ae6fbb6c59f5369b3a94c7b4026f7f0670d7d7c01c9f4b58209a16b0c
+210167490ae40b4eda10dfcbb455c1068bb91d28634da73dc05830a33e0f2542
+848afe96acc2bcd8a138eae0baa5d1b31436751c649998f3aea75e95f5248abd
+d62f6425fd91506fd25f925097d6d67c6ca523f72e6a5b70164e0bc5c5781f5c
+04bedd5a784b3ebaa00c5ec187b9f30b36a0e3f6e4b249fc4fd085d7fdd36446
+70c740d4dde28e44a1210323dc4b1d6319328970acd5102cf9a049bff4e99cfd
+28ec810b2575aac8efdd65e7a9e6d929734ee4927efb0e25f843f9d4649d847e
+5917b6e18e440f23166d04e721696f18bbdfab79cf291684b3f0e8847007df8d
+114f4b3e7b7933859b0e27d019c0841f7ad680e54b25e7b52f8e729f9a62fd6f
+68757a9a650f6fc3cfb39f7ae9f03566b7d5fc87d765bd97e08e87e021a0369a
+34306fee74a2fdfb11f3b5f75499159e5c97a4f1558e78cae37ce871af94c108
+6b1cef84418ae4408897f5920443585f5029c8d70ed575c19eb1714e2aa53748
+f03c05bb82a355df1e181c1f3aec05cd63370e10136a3d912da64a717f66d511
+ff5edc9e42e15070b54455b95a52ceadfd2fcab3b3c338e6edd087123d2ed361
+ddcf924f61fcae961c6b8cda5089b4492f47db89088d80a994ed9551b977fe94
+8f2d92dc83f93067b38c91e873babd2ec1c32864f521770b3709c4ba93eacfd3
+74143d8159260afb59f774f70fc8a892f765e474b5e870d7a210ce552d1aa077
+10cb44f43b9c3e1bb6b0767f3de1d18a485316e80cff3a163b8e44970bfccb2b
+ea9f75157b99184cd1313d47dbbb21fca18ad708dc914eda5ad4122f7476fb73
+2c3a405c091a211756647e53a010822ebb8cfd4d331a97a1484d239986732179
+4ddaf15ec99812ed7f55cee6f8f015ef62ddc931378470c5c1ab335f5958439e
+f3f21f81e2993afb8f512783959134886b73df730f351e2135be658b38e005d9
+2be5950daae49a5db747e46f8376c1aa09c178b2d4d08674daacf05880852147
+6aec9a46230df3f4bdcd14081f0fd21801f7d26a0b0c5090a3e144f5f486d5c2
+85170c17145fa317903e7ad4a97315a8c4d0a9f845cb2d5fa818894f8647e94b
+feac033768c71dbcfc7e4b2ee4afe82fa0f63a2e88d191e579df6be30dabfb4c
+39116e045c791739845b789d2e5a4f4e138394c57ea1bdf03277fe1df2372e57
+824b4cac8751bf0d96c27c691b71ee19eaef51842d9a621a180af064aa774e59
+6d17c8f39b5095b8412fa0996136b523aa7e2d34a15ef1aa3860d1bc693fb986
+df92179b5c2c283ec1739a31c39df37e02570b2068fed8a7865d530b6b83e6d8
+c90755bebf25f806731eb5afe12c69b7b200595c5b9488511ce0b6d3e50eb78b
+b87384aff6319f53fe82a57e39a9758b4c2baa7dd9d237fcff940c7dd4e2dae9
+fd6f9814b52ae3952ae507d890e8ef4e46f47644d15663e50bef06e4c6e8f4c3
+c9bcdf6ce9c12e59442aab2209222e8e9c38e8d836e47401d8912b5944783d04
+2185e0b5d202456311fc41e3c9aba816d79444213f17d96b673bc819a5afde1b
+9fd118916aa3f976b67d40444085ce1295b2cf635a58d881b58e9d6da3cd47fd
+c385915a260cf460cd51d103aba3b9b7b718a6cfdf6e31ff90aa8abd8149720e
+7dec2fdc1f9ba1970dc589375737d50861ae4ea98b54f134d7870b435943e4fb
+50896149e3f419de19027f01feaaaccf1578410450cfb575957959a3e7f2b3a5
+295a1e03e47d2cc044af13c7f8d2e28f7bc6d498aca27d9503e19c7993795444
+50a6820f38c24b1415aa1322f2d3dc5d7e7802067fb426beb22fd9da5d3d7f77
+f7df61f59f5228d99e930652925a12436362de55a25f190fa33c3300997dc628
+ac5524bf2954d119407635b2f866e52bd1a44d764df26b66590696abcac99637
+6dc90dce6b68da6d630587aa9cd14fd4d9c2f27d8355179cd1bef7eb8f7b3ccb
+adaf1a938478ac5f858e712f0e908b394702a6e1129d6262b299a00e8767827f
+dd0f7d3bfb425b667717be47f8792fc7f852e2f3119a179c7d156e5e020926f0
+1a92a05ef6346a64fbc0a1b09ccd2a7e09d6e848570aceff71cd34ed28ac95c4
+03a468a2439ee50928e555086a6d40caab8d40dd847cd13e67f5acc91a12ef37
+85967f08fee498e5d9b562fa2cd3473995a0f76b860fd08393d4e59c38c86634
+f9d044b6d6184ff952b377691f3970e155f07412a640d49b696e3ea58cf60630
+ed965503ce7a6c0c145b6431fe0a5dc244173a089a49e0907fd2f8fa080f38ac
+ff70eee1ce6089611df1f488858c74b81518bd028d55b437878dd4d14e8d5362
+10fddd8c4cc9a8ee14e961481d0c0b00606084ca496a88edb25d984c34f6c1d5
+a85683fc244cce71b54eda970b9111a6ed2ab33c63fda50b49d343ad5eb6562c
+01748041fa0f964183d14239a0292d06ac831129fe7d7d34d0c82f1eb011f207
+c63fa085625feb4b87349abc9a065027ec25db3534c91ec2843c2ec4ff4d1b27
+1b1488dc1907ceca2d4eacf2d0c4d4c7ce6c42ac81ec78e853baf03d3941ccfb
+03a5dfdf040fbe9e61613d9147ce6f9c10e4f96797d15362467058bbe68804d7
+eb7113b166df726b040f2cf4aba8bbd3ed943c0715e09bd676cfd457a3c1113f
+eec29889c0e8286c314b74e4b39e2497c3c5dfda95278958c0995faa6dd4d9b6
+8dc6c934b1463734ad0c71e641298ae0aca519168bc667ecc7239cbefe78f34e
+465b10de38f54923be640a55ffb991a0164a6f8ccc09c5b041809e6ace280343
+0f447b22a97a8a7a340078fe1b765bb6f55d340f757ef8162162883ed66c029c
+f7ad3264829ac8c8c26f9d76d121167a912e1bc1e2869308499a1f8dc9eea626
+fa3f9d1ca80b45c3ade3621a3d4ba9ad3482a0e13bc7382af7157633adc45822
+d9a5c8a481775c8a69765c8956968affba3c77c115532c7680859c41500c13f6
+6f5b445374a79bc199d11930b2fa1cc1f8c76848b7a34c65f24a86acee4f02be
+4eda4c7da149723748b748c0adb67c01eda2a9c0db4e527f289281a70c32d574
+5486d18a49144a2d6f2d4488f61f0803805105b307e0ab0f4d795a0139acf396
+9c3cd6092cf0fe955653943dc38f9220981efe8d162caadd1f3587a5f434dd9d
+0a5efddb38477d669b1f2ddb90781c790ccf341d0a348112b559746dbcafc4d2
+e9c81839e66de708f12e907552c99140c428b13920f459a455832917abc1dc21
+aed809121dd4a9df4133b84378e413e62a0fbda75ff4e86fb8fd405dd3f252c7
+bed26aa06b485eb423c2aa83e0a478235240b19ef7f7ff1875c21831c7d50eaf
+ab4e0fcb929725dc92823eaf498c806a1b0102be38e754e3dc87754d1f480c64
+30d95da626a1c08434ad5edfd4e6be96a5c593b96f062d7c60e56a4a07152c23
+7fe4e29b99a23cb4a93ddec151cdc68fdb8428791987935574e53b8ff6c2a4e6
+4c6b85c47607618740797ff21b34f6a4a534523c649fb18798b55ed04d9080b3
+67bac8232a2be46e4d973f3cb860f1058ff46f7af441049855085e9ab8de8e1d
+cf035c13d86c62a1e7e39bf4cda92898a21e9d1a878f8cfc0c485d40c35d2443
+87a3a20eaa6cdb4920f6779fe9fc3832a61ceefda3d6b45b5b8c27845c2e9e2f
+c572e80423fe40d6d695d11853d03ead0e46974105333111101dd791c7b03f6e
+11a7f39a2d2232c9452df2e7831261a365e3e79599b69fa0b787844d05c538ef
+3274761f16f644fc94a7fb6ca0919fe5ee78539b59fd0232fd6bdf8e9e4b1c11
+485de6c6c1dc27f59fbdcad2790d1f9b9dfb1f88ff3330ca215e36636dcef81d
+167456983820580af7ba55c1f1c6b217f8a11e487fee442235768eb7b95fdf29
+d44ab8c385236c3947925137e26fd1278d4d3fe710527d9b017692b357aef874
+ffa8c09d59b78f3175f8fff85cb4d3e07c21dfe08db6c2036e98dccb11461fa9
+ef986be98232c893e25d76cca348df852963d1fadbc217658e33c49bacaf43d7
+1ba692b8e65feec21749e489c90ea26fae3540cb3a2af56b391569fbe2e6e1f0
+4e5a83c374455e1fcb6dd1adc2ed96007258416817bc4d1585625bba98ca3ed7
+f49f6439bfb0fe67ee1752ce1a678cdef7d9b02422858cc2fda1b58d0a62f598
+4f78daddc56c29c9c5d8d1fa7567cd69f58b3f6407f925fcadf6a1111978e51b
+1730a24ad9f5bd83e7a367c8e258c2d45f2dd5f7c3034690e968ec4eb4746a74
+d7d3316a6dac948d3db0b8d069bd2e833120668dd794d89f99166b04fed9cf0d
+b224d6985605512acb08fa6e27a8772e5e968fb66495cc618aa42862174f174b
+b400f59621a17bbb22087385ba839562281503632921c176c9e6c27bc2aaabec
+ef388fe9cb262e9305e78ec22a52f0bc54e0c4f167930de0558d3a3f228ac651
+932828895747c28573d3fb5e12bd7dac2ea2e00606f1e34ec36443822cfc8258
+fdb3b8f3a8d80fe17c6ffd932d63da28b50183071b30b198b078430f8c25109f
+710ccb6687fd2c3bcee778a5c80efb9edaf2609d275741575601b52f9b7fd6fd
+f99c10d28f4576c29530ba7d40ae384be27d88770b0ec8d870dd3e4a20a64476
+a30282b0e816c58080b09eb651c046ee91f52ac08f6c264a36099659d1e50e75
+ea75dd82238a36e7ca1c40cfd44ffc12051b06f24c2c4a4bf4bcd4aac42814cb
+ff434dc7c0a4356f4f9395913fa1df17e1ef2caf2f4afdc87189276b09988c55
+6b6bf8f4698d33e6acfc89e1bc25f0614cfcd94e575f0b881c1a8ea294996482
+ec2b1b0a6e4645d68aae01131692336fb74bacc9d91194054c76b21c2b01a8e1
+973e402e8915cab5c0b11da03ae8dc4bd570cf65746f0636a30c8cfb92752bde
+277aff02df8402201779f4b675c09817faac3b384f6b334524b08ae52b7995fa
+4e3c0a61f58fda7416db15558e1a6772a2349d2e1b1c669e4ba39a01b7b18c98
+aac82b5cddfde1daf47aad0dcb6ae96593904555ed04ec06a4595238a3508d4b
+4374bd37d3e8380f49c01f39c0071655e8b0808e9be5dcb715faa15c7875871b
+b9c75c2e0fccac1c5a597ed1d84a7f570b9fc582c6e54455551fbdeaa8796f01
+5800bd5e2530399b6be18f4e406e42ea671406ea691c732ab92182cfd599bba2
+5abbc1f25965c5696dcf2f2e9c64e138dc10bff55caa9a58a8c34519f8f50d52
+894e1d616938225abc73a28cb2f9216e8b7f1928a82194463a6092356aad8fc8
+35af7da897e58ceb6897ff6930e2712ba97e6c53c470d177c91300dbd04566be
+233833750c2e79b320c33fb7413c856a37eecf0b89c9079cc7d70f8c62e16437
+3b8f43e28aeb470b8865aa04be19307d3ed6ce12940a24d8d43ebc16ecaa905f
+2d7183d425035db5d77b518c34b2f002f199d27788664aa94551a7a5fd574368
+6d7a10851ab124640d58e0f67f0ad64bbe8c7a2654a29391485e571d5542f87d
+4d1b016cfd97584f18f57f6bf9e2fc514cdedbcf3ebb1518e9b53e8b64752eff
+909c7cd0a34a2cd3a945ab3c7049e255ebe0e40a84e2dd81d67e543ecc5a6443
+34450a5cccd34edd52dfc43fc420ef298103431ed1e49e8c2b4df26fd0727bff
+7f3ba05b16232f4c795f93a5912f6002c43aa243cf3dc7e4fa5c8d9e40e96985
+da2e3ead98770fb7c07cf8e71ecff35d2c255d6a3ab730ae6c2ceb3510752f0e
+2d8aeafad5a4ecb4c4d81dab5336d764e8b7df68b5088d6dffb9aea0db0f7384
+7593dce3f68c793ec780cce00e92e28a342d05f2d0b0d48fc23336c7e0dcd610
+a37eee3cd6863fd4b74eee6afd6f2235f92a1d32d32fefdfba511c8837d6eade
+7a27e375ff1235557486ef07d80a2cbcb0645ce7d1d2fd06247e2b52d47a25e9
+cad734659b9bead551871b85a2aad1340a9649467a791d89c9e40c6ccbed4f1d
+317b63eb10fc5b913c72e9457f0ba3aef5c50bc83248782c220ba4e1540f7192
+002c183e861eb1dc7f4f74a44088fee28b03979eb8e94e9392dbc24aee6ce563
+f4953106b2d7f71e2d38639965fa09d69d7c5569b416068612b32fe5faf650ab
+8ff820bb496ed9a4b025874f7477feb37157df5a35dda9a19a7bc3fd604e4050
+5a5c5ec5e9799cbaf4a8d525d2db9084f07395d03ed7a95e2adb4865cb36f3ee
+7a8cbfd35faaf669c4fde98ba282e5d2fdf8ca495ca7f1a054149d15a6138f69
+9a320b1a30f1faba3ab29ce4c5e4490aab404893afa88a1b7ae6731251e15db9
+b00e5f82f5f1e03145ae703849120f65fa475e1810a0bc636cf540ad441631a4
+52ab9767b4bc16efbfdb5c197501b0a8344fe008afae144c126eae037fdf9364
+f743c060bc4d17116e3a59ed0dc0e3218949c3d9259a6a4e0be391e8c8455600
+7871c3e0db8e7939346fe37f14d7a980cbd945bd85a78f84eb1809826c6d15d2
+628f170976117ed59290231459cdd6dc863cdad13504bf2da4c38ae32259ffdd
+f9325ce161a472c192dff26a10bbb74f2209dcea75a92fddaa50bfbfd12f6683
+3054ac58aa385b4e00bda8c962261fa4edafa0e85ef7fe908662b9f1c26cc471
+f28853b5c50652538f1b984db2197805deaadc12fb9cadbb68399bec0f707bac
+dd165f865a0e9a455e0a8e317b3b4c75182a5f4001c5c4dd68bdaab9896090e4
+f7e92f51bc147280b33249fc8785acbf402441e769f70b4d61991c51f6ae12c7
+6a26eee6986509400ffdf62268092c7e1ff78ae963673b60d874d2a57c2a1822
+d24822a1d8fefb88ce18b20d446f560f86e9238ef3e78d54ac04697c4ffcbc40
+09b9c1c2acbba6e17ee5fd9da57fa7e0b6aa720103862c9e5ff1567506b5e09c
+47fdef0cf04e4c10374eaaa0c47957ffb4fec3a9ff0cb465a10a5b6a09fdd474
+204ae694ed6e2b31cbe9333a6be0dcd9cc1a17672fc2be032386351c4ffa4684
+42810dd1c372e10a5343b97d6f623968691417bd32fbda32b1db60deaefa4df0
+c804d1c1926f6abd1e8d8fd4087a28ad05cd7b13080490b1bd03121270adada5
+e94a72be1e1c7c975d95690d4c2147026e373d2f464dfee782b5d074cf3ba1ea
+f669ccdd1ff040728bb9bbd3f27c2c63f0d381042a5e3d5ed43c397513a5aaf7
+62b4e17f1687eb9bcee0430b766ea8e1ecd137035a7c90b29e0e26b76ad542f7
+26fc0017903351fa32c9e9242aa77ced9f71623ca744ada6bf0ad855875ae6cb
+90d72dcff52084c7969ea06a49db1c0a2f11a82b5f524d1efbc7a48640944d28
+2c92da4d78aa8d13dc57a2aeb3f39e788e3563b5e6a36d78ac1df07dfc527938
+a12a129064b6e581d90308e2982fbc3d5eb92d7ab8b2e34cd0b2b9d7979def02
+e9a9559cfb15221889619ce00ba62c09dd6fb51e6acee8bada9573614a0ad0f4
+411d35ddb1c1d801a8970071bc5b7b5d1c41e14e96ee54208f17ba69ce95977e
+de58beab72e4c6bf484a8325a96153ed4672010717157034e02e78ab861f118c
+5ed3409b1db8f05f6ebe0ad2ced8008a73b3cd355da36c721aa40bd1df3f5af3
+41389a9b965dc43002ca70a828a849e41425c85cd827fe6e5416d5bf18347726
+241d22d665332ea27392009e81b3a24442fcc1b62832e7b81b02480dc6df345a
+ebd859cbe6a4d439b8400f4813cb9001f4c2fc67d86350d2004f7075a8264ec1
+e29eb0b255c6bb530206e96f39611d5446ec2c468acd603423137643e26fa702
+942d436bba71856e248c89000a6021e8bd2106861ed20c5b02ca4da733102b97
+7ac7e43e8099febda83003b6a4610a9fd0dc723d506dde420cb36e188c56bde1
+0a433a8a85589d9ca5fad1533da73075afbedbeb5358edd0e57492414a09dfc9
+418b0910b3e32efe87c0fa8702480aef1b281a5acf6d577e49f801626b9d5532
+d85ce8bab30b27c9053f740d9b1ab84812071dc7294fe5a79dccfb8ea3d33e6d
+514e303c806cc8d27852acb180e2cfe39c72181ff35c8799371fb5c0c0c002a8
+b1b63207ea72646785a35c4b1d6b7db906f1a1a814c102587a4640eb8db15ad0
+4d99460c843109555b33859b1aacb2e527d5aa120dedd7e7ff078de5782ff5b3
+3aa960e29b51b867c111a439bbae20cdb9cf3312288ad9eb549a989d863225bd
+a7991839644cee9cb7b2544b41e4777dd3f0dccf0337977e32c6e9791781b091
+2e568744cbb4a2c3b431f62385def0ac69ee221d4e339b407fc5641b1d67026e
+76e7c4425c5c6b8f56a1640c0b78c3c514138300fa971c220fee8ea1924802c2
+f58176075ad39d4c3f336a758956c1502539a23d67ca167eb119af5a95cbe134
+5989a25786ecb9b34abd0b5814468cc339bf0df3f63fd5032f0708bf0cfe1876
+91430a5ea81e649ff57f6a2a89e97532d7b58ab4d9be95e234885b39a73a7fa3
+d0ad9eba42dd20ebe1c4805641341b7a06ba786fa8c95d055de5b1b35ad51ac7
+d3a98d7e9ead882c5a0911fa45692e6dbe34f7fd318c17ed7094b38bf7113f02
+053f3b8a8c74eff956bb5c15f6cbf212059a2edb25528f60f67d6204b08ed8de
+b3f591ab5fe471ea4f602ffd6903afd034eea6b4fc7ed858c20d1e4a1c343ea7
+bf6283d3f3d8764f3b89282188941876679b48448645aabe8a04b8ec12e8d76c
+75a5500659e3cc3109962fe5c945979c8f56a997fd806f3838337de82cefb25d
+986a4e39416a170cd2c2bc223838d24b15330cb2352ba753bfc0d084886e7221
+2d275a4cc0faec6af2cb8591db187da7503e479c83d2cd78745c939088650573
+e9e60b3aa954044b347a63eef25daecc3aeff608cee0c3c3a7864081f7b237e5
+6806e57f68012877e0d4210e85d8c0f917c3172ca19c6fb9198ac8456dd9607c
+aeeca44bb0984130da6830522697fb5d8408430217ff9496275f0ccc323a9bb0
+52ffc86a010d14478ac6ed38eb6d4f5095bfb738ef0d88efbb5d26558f3691f4
+59f62b6f3d8f3c2bf2a87634d6b65b5c7c0dd9fea60fa51822b8e185999b4c60
+73730e89c0b8e48bce1abc500c1929571afce0ad11147bb0fb682c976e67947e
+6e02b7cd6aa88a3d578bbe3ea88a458629dc8799d34df525fb56b5618fb025eb
+c50f0659d9e9922f0dfe78d0d9c8ade1beae1cad423b5d63d43b0e50b8a9707c
+6322600d467750cfd7a4603bbdbe9e7c01899a3447ee96c66a464859cb0a886c
+baa46fce0373d84f6ff705e177497315d48a1b569ccfb7ff6802c2ffda806e11
+8cc119e9401e0ac7745971d33f21622cd806ef4d761d23388d632470f4c04ff6
+ae7a008f343d80bf70a7d02a9aec04ec3953501594ab91fdad11d6119e6e5ff7
+5055af6868e9ee262c36763b29813f6a6660b18635ca76c9ca7da158f9cbc823
+c234598ef5e858eb25cb422a0a30a7bbddae046b63b2e18832d73b7d2c2c8562
+31f88e8d3ec0f6a3a319b06cd5ca75a8b78b060de77d6108f14182836f2ba937
+914b433c8718dc06dbf52c11f6db1026d2e03418bbfbd297158e18583101bbfa
+7d932e2ed1a3d4bcb4671e9c35ad24732a296640cfe62adf680f66175fa8bfb1
+078b4f8a36b6a04c0534fd0037e9be040eab494fe8181ca7e99911f339d49a24
+8f084ff5bcfa9073e541c2b6cd2ea98e9818ab8594a1952a9a4a46ff5ad29692
+5a2043cb4ee3d9ffcf04ab6847b73b870350c32648193193b2de0a087262d213
+b270353988ee6dad64e54fa69ce113ba122c659ddab50525a5c5fff3855dd0f4
+5f8d1e6f4c8790ab73c2637a89af0adc86521390ca628b87a0b28b73d527dc77
+366d2bd2bbd51d881a0cf439aa85e19315923793aba81cb43ab8af1081a43f03
+8a8b6c6cf72b5f5d5761c279d23bab4cfe0db2c08b557201c583f401ffd20e7e
+a459c408130a1cf7edd311410d6fc05c7cddc6b57cd75ad08fb7bce952e0e378
+f6265ce9669177c624184dfd2a8bb7318acb4709e52224e44322a68e23728410
+e7ee378db5286996320a84ee9b00bb98cc9e6a1939ecbc6983827be07a8d2f4a
+7f16bfb7cca00c158e584965d7899a0a627163298030b8ffbefe9678289f4bea
+f835f749d878ad6cf3791e86f18021c795038f7dd00f180b9990006b9c8cfdd3
+630a37c8ea6ca98e5fad3d4a7cc68ed9aaf043b6a2e2974e1e0b77aa9e6edc4f
+491a7186ac562875a59abcdcf5b92abb49bb976a0dcdaf652ad02d70a93dddf5
+d2b2dae72861afc83bcaba60e08f5e149e5ad3e133b2edba17c77ec4bbdabaed
+57b9993fe76f41b0b5677892ac3520a04cd900070e589cdcabd105294c201186
+81f1d8b6d424c8f3d4a3311d1ba1fdbde82b1181fe27559e989364d34ce45f59
+54b49210cc735bde2d530d84de0825bdbbd3a43ad45e0b2c2369d7201797a873
+d13a15e97dc4011328682a38ba18dfb2720e1ab6060d666166ac3fff441df908
+0ebb1e3a8b039e80fc5c19638501988467a55a5a72aaf62e6f79ccce8a3095c3
+37a8454de4d221a3eb4c27c77bfdc4c1eb13c82987963ca769bace0f1306f3de
+5feb716b12542517ac79f5b21008654a9db7f46e2ae284c466f0474c92e4b13c
+286801a27516f2e33593188700950da279f55166c260b647033d6788518fb8ab
+8365fac94ecf28bae7951c0646c841c7374288cda7130b22189a0a9f54620c12
+3611842e62e411419974775609633d7b77bc5be483e13d4b34851f67f3395580
+b47781aad518df810601e7d7d297abfc761a2b86624db2efe2f11402a203ae52
+d8626d2d9830ca9e19cc6991cc818461a5a4b8bbc478de1699ebdf8a29f57436
+8503b18b699c98f0002f04018ed1f9f0b3ac9ce0f87e212b23774f8ace72cc63
+1e99c6ff814ab41433ea2ece6021ca93e5fa451e3772ad243090e0937b7484a0
+5dc02321d6c055a60436ebd4d778754f3e7e4605f4250e22b9cd1a12ccd814f1
+eddeb081c03244951cd43ef802e3aa5d1176417eef2d1c33643787f5528a61df
+90aabc2fc28a06d051cb52080a55783a91d9daf657518e5cbe6a7f6b91a82f86
+0dcacc75436c1e97e2273391802ac27b13af9bf2ef23277f2d45005ffceb0318
+45baa5a0f219ef6bb7ab7e4b393eb7ab602a802cc711acd271cfb6e886b582a5
+645924862d791d9305f4c3e72969bec72708b08ddd1e784bfd93e75b2eb90754
+0787c096a117759fb3375751750589bafb889d7c3e0d72fe8177d7c29f16b0ce
+96d65201519884c6a6255b50aadbfade3dece3fd1d37610bee5a31a614d65bd6
+980b7b2b12ebf02feb7482ce7fdeefc401fde075957b527bb07de743d7f8fc11
+4ad7e0d01bfeef9d19d4fb1d36151bc866b85489af274d4d58996b33d107e9ed
+b62b0517d4b1bdeab330f0281ee051ac74811995d148e0b0059986ecb5d17c28
+5fbc4d7ced7bbefe9f877fc303a0b0da0988e564a28e06a09127c34477cd37e7
+3b6a367e155fb2883cfd9f05f2df64d9feb9b379dccad9d1f3a123c3fd1d4ca5
+f8993ee3f62b19015fd51860bb3294625a6f936135d0b4c76acdb41b543d3de7
+c501192ae23f20f5f03cb3a2d463e3392ad6c5ffd4d33ed382bc3068be221667
+4f2f73a3e82c12b65e6a6339dadf3494a32e7f438629b7619a807d78ca6e802f
+52b450a4a60ab82ffb8345a3a83b1061320f9d4a67467f4bc46e9e86b88103e7
+f1c218b0881f7525eef46cd61719c018874681e6564294d37874fba063ffdabc
+24d57e553799da32f7fd498fbf053e626834e07390aecf277af8ded94146cc0d
+a01dc0e8ee4a1558a38571ae3a23ae16f6ba5069bef357692dcc6090bd2a5a03
+72acac2f7fdf52898bd539cde242d5ce0985339060e30a7b8ab2816eae920141
+47e70223801fcb31d23aaa237f9a46c386f2000681f17c9c2dbdc41e60e66b99
+ef318f557f62f9f375ffdfb97a439dea9143f0849b579fa4949be1066e28463f
+f2eed4f309c8aadc0ddf04be3f08edb096bfd656d8f567b48f157b0e24084899
+03b64fcec581ddb9d5548fd0f52331cc9746a7dc0a506bb37772f1c1c98d9ee4
+1dec9b9e3bf96fc73d40f5b4220ac1f3d2db769eb6267d985d3ba2fcd451a87f
+74321e8b1967d344f666a64fc939514b985ab808512861527253e0203387183d
+26e3f001bffc2fc25670a0edccb7e0bb1ae77acb8099be4e65d3df6f490ec116
+fa8b1ce80884b53b22547111d314680c72ea849d66430ca595053997e9669894
+12bf8a94d3efb24cdcc547f4993ca291653f31b16d64a0b15561bae47489681e
+e56df9f2ea964d6bc27ec9c33fed273e2c91ddafc0e994c61621adbfcef7e6bc
+29da8d114c35c48d87633072fff31627a095119ecf2014443b9b3d180a3c1848
+1fd0a079f11c60c046487904c73e20cb0c8558e63f1a1f03810430df48044b46
+2d7dc135e3dc7df8f8f86dab887e9f3e59e07348311276bc4451745bb0038f6a
+a03101638329ea3719c573a74f638540e0c6a9e26b638fc9e21aec2bbc9c12ef
+dca71884caae97a648e19c2d0d1d89364c47e7f8cdb68db910bf75cf31989929
+9f73d0416b472698c88b49ea6501ef95d72fd70702709f19e01457a70f9e9590
+e546dfea29d2ae0f97ff65c6b7fae6874e230465e5dfc37e929199cff89611af
+ddf0ccace45de017828aa0f60c12b4816634820fb31278ab8afcc4d231a8652b
+ed7ca3f05794958caf5ce60afa102a17df3ff4022531009c4fffb57a87b8a64d
+afb003137508e574a1674bb6a0a6e56c65916eaf7a280235673d4afcba05ec33
+b4924aa9a54d9dd4773a51b5f00e60baf0c950982db184ad0c96ac402a12259f
+22d1337b3c5321b7c8692943fc5655e0746a3ddce98ff33b9d13f884e9029347
+2aabe2275bced7ce59373a650d11cafd1a2f74394567c6491b2c0c1546f3f284
+6e783fcd8757d2b8570f8616d60e97b3830606d04f130ec22bb950efcef6652a
+01f8e358c822d788557c41d1066695db66f60440aeb80351610f7efdc2aea014
+4a682d7dd13851f6d187e9d30c44f3377c9cf7356361cc64e4ee2adff163121a
+9ac78e13aa4fb1112b31153c19b0d28f007848c1bed88a10ade265a8b606b9a3
+662683a775f94bae38e065681f7e00b0afa9364e56cae809771e53b826deef22
+4f6cd881c6b7ca7dcbc33806606c987f0071925edde39d68392a137aa17561d0
+8f14c811e8b51bdfe34c0aabb9f31013879b3f8a348e5e03f7c661822834e6c9
+2f6f64c36177c579706ae06e73c3756efd98b26a9cea78362bca4cd8437dfd98
+ded00bf0129da7508680158a213888fc8165aeeddc216f77f05e635d4a6c8515
+3f953a8039f9cd162e2778f30644ef6c13889080cd8a05b6fede9770834edc5e
+04fdf83bdb9422d18ed88b6f614569d63864c399942b1c9aef68272309e6bc7e
+52ebb157dec5104c1f9e0c1e3d9886403ca2a2515e0bdcf60e66edba0f340d56
+c1ad2b8d5518cc178bc4a8135121c45b8afb23de5d84f4a123172f9a71f721c6
+e4847c2f5c6d30cc2a966cd5526b6f98d85d3a8255c6a9776335bf2fa1e9d5df
+a154702bf15025b8cecf5bf1c66f0abc9ba99e54da9390dd5c04bb984e1c406e
+1e1c964e99a2f164ce3a6aced4af3ae77954e900d5508cb7ec7b83e5ea9ca73e
+e832ba8544107820e053627f8624e89e14301e18d80706ceabf0d1860d8a088e
+89e491b38c6428555684e9572c82f292d59bc8d23ec39cae1ca2e152805df3a1
+9b4d96ae8debbd4faba3dc79960ebf56fb18caff0c0111543d66f3d530c502dc
+cba972803afa6ea4f8149ba1708ff8748b115c523367244e9e2e9fa31c830d09
+f422f8cc49e5300de95eb6d6c07e7c7a29eb14c0ac30c5eef24219586b3ae56d
+3160839a2252f464860c32b3e74b23bd6d2deb50e23f547c6d8d60415f123f24
+e3bb62ce14d851c7d103e667373d6cd61c66513c79b0ebc72adfd40b7acb6c1a
+7086061551d74085fa458d212c8873e49658fae2c8c6c28d89a7f7c9deb4e1cd
+270082ce880954b8aa36eef316f8409e4835d4677ea5e35e1c093fe1d544388a
+e0b559b1245fbeba4eec94cf4a14be7c83bc8806151a071070cde9f13a8b8c36
+3d02b83d6f0c24c5e85a36b0fc2f907200d4e45fc4f5de13855ec20f5f9d65b9
+11b1d6f9544da2d5a5e2cd173db447995b351a722ba9122f4ba214465328eb59
+998296c9bf8d3ce6a95c458b9e0acc925cf33c35d99df1677240962cfa6e14e8
+2a0b7442b75223821213383e3785a3e3998e96d6305c61beff921606cf1cde1b
+d45be689ef1edcb04cbe2c7c317ea93fbce61db1e76f8ba6e5dd3fb265f52762
+59142336e4d375337a5545f944f6f8c8e50b4f524c3421b0316a401358a2d5aa
+8be973fe695518d61393ed4c7903a816535b7cc28ee379782dceb1ec955c2184
+8b9fb4aaeb7e19447f47f46ace999c7fc458129f215e4533a45e49bec7c5eb7b
+9474691c5dbfde3f56a63930188596e8264c3f5157fc896d1afc5f3a2e190f92
+33e8ccad3e8aa7f94b1068370f19075fb16efe9ce48ad789e905d0218bdcb325
+c7632a6d5220ff2b05d5401b06b5b9f3e2c2fe09af3f18e8a17eb6d0c51959db
+cbc76651bf2953b9590b7ec08b952ecbb1f8f8c86d08d217f04520cffef1318c
+56ed7eb2abbd6040a04032f62f59603bbbfcb48b578cc8a8c332e2d8e2322415
+a443a92afb8bb38026160f679bebe4638a81b259488f73b4301e36f052ea618c
+52dc0216c924e2b418fe3805eff335e6f2dc4517cd2ecf8fce49baa53c44b80c
+4809bbdced1f8cc72e35f362d567b5bec58f6e9bb8bb9e134fef4a8850a11c6d
+743ea1d516aa3f00f559e7432e3521c094f9312ea7613ee8a6b900fffa99b26e
+896fce4ef775717c982a136978884f8aef17d96b253e80064577dbecd1747c93
+75c16902367a19d0b5a8c6f14ef55214aeab3e4983d5d00b4114a07f74ae3250
+58c54d6903f26e3283eab708d672725549105992fd14eabe5ffa167f850de4be
+e473c356eb540e8bff1acba6ccae793f162ba95e8589505138460fecf8bb9c47
+0ef6f107ffff8f8a3c6e5f856c8be2f2c57c5487c9829f72a74b897258eca965
+58dc303c1c0a28503e9863564a07ea6ff620eda460a224dd5af73c806e72fa2f
+ab3f702a99e763b4ec585da2783d049a58b4aeaad5f4c799e3d2d3b1bf9f101e
+5b041db82f366084f692e914adbdd1240ed5d2afa22e7fc432f1bc194bbe2150
+b4521875c441a20b3d71ae58a63decd8cf47672fa04ae0e816902926c6481641
+2f139c8b605c1d065591bbda536ff18f93449ab8106994581811da593661da49
+6f964eee801f05bdcb631ed1d79e373ca07722e424a20e3dc2be63e6a0dfb028
+4234312463799b57c90aa43cb725ff51509ebd9852a37f9d643a81b0a4c9e304
+203512e475f467171805484bd5f6e38016aad5090e5d1e5f6cd4dbe6907c532b
+c5ad198ddd056dff2f7f32b75dbbbabb1dc24e971cc6768e388a612408a8577d
+dd6b5b8a03bd7cd432e59d34aabba7bee276bbba245000d5cd9be7f5d6a332cb
+6d73fa04674da67b8582b036d93ba3014eb336ca4c03119169ca8aa5c5ccdd6e
+297d651a6cbc07b8b8fffc95f56eda32bc6e748f33d07feba741a9255a8813e5
+6a788869ffeb0accb15e982debb0e81cda9733ccc8f79a48063d216691b72111
+1a871ff5754e21a7788e
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/cursor.pfa b/lib/fonts/cursor.pfa
new file mode 100644
index 0000000..ef1724c
--- /dev/null
+++ b/lib/fonts/cursor.pfa
@@ -0,0 +1,954 @@
+%!PS-AdobeFont-1.0: Cursor 001.001
+% $XFree86: xc/fonts/scaled/Type1/cursor.pfa,v 1.1 2000/02/08 17:18:22 dawes Exp $
+11 dict begin
+/FontInfo 10 dict dup begin
+/version (001.001) readonly def
+/Notice (Copyright (c) 2000 XFree86, Inc.) readonly def
+/FullName (Cursor) readonly def
+/FamilyName (Cursor) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /Cursor def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /X_cursor put
+dup 1 /X_cursor_mask put
+dup 2 /arrow put
+dup 3 /arrow_mask put
+dup 4 /based_arrow_down put
+dup 5 /based_arrow_down_mask put
+dup 6 /based_arrow_up put
+dup 7 /based_arrow_up_mask put
+dup 8 /boat put
+dup 9 /boat_mask put
+dup 10 /bogosity put
+dup 11 /bogosity_mask put
+dup 12 /bottom_left_corner put
+dup 13 /bottom_left_corner_mask put
+dup 14 /bottom_right_corner put
+dup 15 /bottom_right_corner_mask put
+dup 16 /bottom_side put
+dup 17 /bottom_side_mask put
+dup 18 /bottom_tee put
+dup 19 /bottom_tee_mask put
+dup 20 /box_spiral put
+dup 21 /box_spiral_mask put
+dup 22 /center_ptr put
+dup 23 /center_ptr_mask put
+dup 24 /circle put
+dup 25 /circle_mask put
+dup 26 /clock put
+dup 27 /clock_mask put
+dup 28 /coffee_mug put
+dup 29 /coffee_mug_mask put
+dup 30 /cross put
+dup 31 /cross_mask put
+dup 32 /cross_reverse put
+dup 33 /cross_reverse_mask put
+dup 34 /crosshair put
+dup 35 /crosshair_mask put
+dup 36 /diamond_cross put
+dup 37 /diamond_cross_mask put
+dup 38 /dot put
+dup 39 /dot_mask put
+dup 40 /dotbox put
+dup 41 /dotbox_mask put
+dup 42 /double_arrow put
+dup 43 /double_arrow_mask put
+dup 44 /draft_large put
+dup 45 /draft_large_mask put
+dup 46 /draft_small put
+dup 47 /draft_small_mask put
+dup 48 /draped_box put
+dup 49 /draped_box_mask put
+dup 50 /exchange put
+dup 51 /exchange_mask put
+dup 52 /fleur put
+dup 53 /fleur_mask put
+dup 54 /gobbler put
+dup 55 /gobbler_mask put
+dup 56 /gumby put
+dup 57 /gumby_mask put
+dup 58 /hand1 put
+dup 59 /hand1_mask put
+dup 60 /hand2 put
+dup 61 /hand2_mask put
+dup 62 /heart put
+dup 63 /heart_mask put
+dup 64 /icon put
+dup 65 /icon_mask put
+dup 66 /iron_cross put
+dup 67 /iron_cross_mask put
+dup 68 /left_ptr put
+dup 69 /left_ptr_mask put
+dup 70 /left_side put
+dup 71 /left_side_mask put
+dup 72 /left_tee put
+dup 73 /left_tee_mask put
+dup 74 /leftbutton put
+dup 75 /leftbutton_mask put
+dup 76 /ll_angle put
+dup 77 /ll_angle_mask put
+dup 78 /lr_angle put
+dup 79 /lr_angle_mask put
+dup 80 /man put
+dup 81 /man_mask put
+dup 82 /middlebutton put
+dup 83 /middlebutton_mask put
+dup 84 /mouse put
+dup 85 /mouse_mask put
+dup 86 /pencil put
+dup 87 /pencil_mask put
+dup 88 /pirate put
+dup 89 /pirate_mask put
+dup 90 /plus put
+dup 91 /plus_mask put
+dup 92 /question_arrow put
+dup 93 /question_arrow_mask put
+dup 94 /right_ptr put
+dup 95 /right_ptr_mask put
+dup 96 /right_side put
+dup 97 /right_side_mask put
+dup 98 /right_tee put
+dup 99 /right_tee_mask put
+dup 100 /rightbutton put
+dup 101 /rightbutton_mask put
+dup 102 /rtl_logo put
+dup 103 /rtl_logo_mask put
+dup 104 /sailboat put
+dup 105 /sailboat_mask put
+dup 106 /sb_down_arrow put
+dup 107 /sb_down_arrow_mask put
+dup 108 /sb_h_double_arrow put
+dup 109 /sb_h_double_arrow_mask put
+dup 110 /sb_left_arrow put
+dup 111 /sb_left_arrow_mask put
+dup 112 /sb_right_arrow put
+dup 113 /sb_right_arrow_mask put
+dup 114 /sb_up_arrow put
+dup 115 /sb_up_arrow_mask put
+dup 116 /sb_v_double_arrow put
+dup 117 /sb_v_double_arrow_mask put
+dup 118 /shuttle put
+dup 119 /shuttle_mask put
+dup 120 /sizing put
+dup 121 /sizing_mask put
+dup 122 /spider put
+dup 123 /spider_mask put
+dup 124 /spraycan put
+dup 125 /spraycan_mask put
+dup 126 /star put
+dup 127 /star_mask put
+dup 128 /target put
+dup 129 /target_mask put
+dup 130 /tcross put
+dup 131 /tcross_mask put
+dup 132 /top_left_arrow put
+dup 133 /top_left_arrow_mask put
+dup 134 /top_left_corner put
+dup 135 /top_left_corner_mask put
+dup 136 /top_right_corner put
+dup 137 /top_right_corner_mask put
+dup 138 /top_side put
+dup 139 /top_side_mask put
+dup 140 /top_tee put
+dup 141 /top_tee_mask put
+dup 142 /trek put
+dup 143 /trek_mask put
+dup 144 /ul_angle put
+dup 145 /ul_angle_mask put
+dup 146 /umbrella put
+dup 147 /umbrella_mask put
+dup 148 /ur_angle put
+dup 149 /ur_angle_mask put
+dup 150 /watch put
+dup 151 /watch_mask put
+dup 152 /xterm put
+dup 153 /xterm_mask put
+readonly def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/FontBBox {-484 -517 517 484} readonly def
+currentdict end
+currentfile eexec
+d9d66f633b846a989b9974b0179fc6cc445bc7c8a959a39a32e9dce7faef17ee
+3bec9f509ea0bb8adf2cfac3626f0443046fbcbb211c518d48ebccdd3cf3d833
+4877f4ef1dab34759b6d38f757cf015a5ccf12d00a3239084905ecae5ec9d399
+ff3b917ce3cd4e85a1c49a750549d42f00f90f5110c822aa441ea813981685af
+17a0e41240e5c924b9c12d51f92ed0f3ef4fbc72c8b3eaef402c3befd6a52631
+47ff2e91ace4fcc6f381161f004dcd1db73271726d2ad25185a9b1ad0097955e
+b319d5f6d40a9f7163a0e106a361ebf256f5d931e06b8d9fe4e84e785bd29b7d
+fb70d68d41d66196ab5099bc38e613d11db08b2e9194806b651615dbdad9c797
+4bf4ad35bd0ce5d087baaee81b670d70d72475c0236751e9f2ba029abcb75682
+ffd70e77bbc2fa605cd824d77659de79f11275b5d6185386f0f39988ae683aff
+876ab78964fff6118dcb35b502ed5c7a38c6e7f898a352c307c6ddd0558702cb
+f9c763be246b45355d103ca1bf99d92e0f7743000d0019d4e66bac2292422b81
+7dd20274357d55680301b21eeded828c8836a5c47b12daaf00bdecf88289692a
+da641e1893c2eb202c614afd6b70524c9e2d6385de26e6f48a5959f587f80a69
+5401aeaae3c78d5928dc524e12cf874a89961e67d9d71db9aafbbfd960e6c395
+1f0ba3a4af64ec2379e956b2715829f009faa9fedfc79e06559cff13a4c8b860
+4a07ec9c6565dd8530acee97e2d2f0b92eab28e5299648f00bfedf9c87bd0223
+02495fde3f194d735815acc2e09bf4abc693de6e975f0c2b6b0051c90d727988
+c6a90a3dd10bc83e264984752520880d26f1138dddd805001ec71b935a8461cc
+0d6aa7cb0cb6c7c7cbbc99af3a513ac06848f7e6a222363f8696cf4ba2409054
+9b616ffe2d893a8f5066e6e7cdb21656530c2a720578af66d456de1723b3dc3d
+1406bbf7dfeda3aa3f649077ea7ec19f8bb18b28b876ce1f8e61dfc50d7b4db3
+968efa987e8479766356441906d6298fb426a428a1109ee9058d4a71235ff03e
+205a60f64b77d3e0920790200fe13d6676c77f78e4ced35f23912234da3b568d
+e729baa323bb7ebb41d72994261eac9f2c02709de342ae5c070d9e7b394a3ca1
+aad2e95d98c05cd4696759cdf12d16c3e000f3b2a7b5ea03d3fbb204c6d59b48
+e4dd5094a54aacd3f8f62d63b93e3524bdfa95fcbf75fd8be02544bbe661c485
+9f4a12191be62ca8b60cfcfba14097f4f7daaea4af8675fdec8f6ac22dd822e6
+bd4cbb2380c0ce2f6e7e4db197ba213942cefeca436f33249a881c60c77e58e0
+93100c28caaa5f861d8557cd2779911d42563f5fb8f7c890c8e24bebf300c3f7
+15d0854bb460462de7364c007c0be17a57c23959bda2282f9fa8bfc1571d7e2e
+5cd033129735be336dfe0efe4bbe19669e7c1a3f3d21e11c8ca081ec442fcaf9
+e4d5a1eac515db6b686f9da7757475c7b47cd2dafc56aa63208f5e0bdc127a3c
+51b9bd6796842d3089641604bf32ecd04874ecbcaa8c4be805cbb6bbd3988040
+8505740a2023924894097f466e1736c0bd795cddb95d80937d662592c70763b8
+97a8dad80e3467ee8192d4d8667cae0ec40a5bc9192d59eece9a405dd140f988
+ecb324c75704e502d088b5184cac0ee0857289ec1bfe9a2bee359911b9bb30ea
+8daade18b1ad9ea1c28b2d9aacd6e93833d9d8acb46349225b4d6b0e32cd7848
+fe8ec185522eee670d0cbeaaeaab94fe7904232249027292be36d2aa06ce4b53
+adb71f29d4746fe19cec148ada960820ec7eca5ebce18f19de5a7974b0d15b14
+2c0f1d0af773b4bc5ab79c7f16747b468ff0a9ce39970cf439720bab853ae9da
+c6cd1e282d0860f012ca867969474e3d396370a876dd9f603a6b64afcccecab7
+dc0186a089a815288a68564f62db84d3a295f31efe6c1b40d1602e40c8fc8ab7
+713c11ec7f175b31389f70bd3255ba32c10b2db0215aa5fddb1c02f74bf8c33b
+d4059f1f3640a4dbcbe0fd59bbc830881326e28b7c8d5b9704f95827e5e21d8a
+f720e3ce0c1bd124963ea970e1c4eaa6d340eae793aff5f8257f471937147c59
+fdddaeed8b547b3b98adf6b5bc81a86dbf9436d010d14b3b5ecc4ed9aecf3ffa
+9a4ae3b08b9cfd79370f4c6ade8406e7808ab8fe30694ae7bd9008c3507786da
+543465aa40f8ddcbcd1d561a5871be7f39c95ecb0e3fd7754469b1103c71d18d
+446ab34f5ea212f0b5c4d3fa8c50658466d770adc17f53706ff5449729b9c23d
+72cb4ec02402c38924dccbc49c976312dfc8f086050dd5a38132eb139b43422c
+756a95879b56babe8f77771f221f4f1f25d1a308064ec10eecfbb306eb55ee78
+2692db518eb3d477c4b52a182fe897e45c0c3d302aaa0fdc69ab3c26e55728e5
+5e12e7a51d28af01f104e5dbc61bd210daaa526c4dd9a93abf8867178cfb178a
+70dabac26de06f5abb43392964a7acb193fbf31070de491ab477a4c5492f4fc6
+4c3bc40d760d41ab31d8a3ec657814086a133801701ba8fc4dc5ba92b03b463a
+0f8bbd73b9bfcd6eba567e0c84b5ad5b32dce09e5edf39bd276d75c3cec89124
+a4a8bdf208fdc212469bc9ac96ab17e9df27ddd8b085dce1ba68ab50ea445bcd
+0f002681a8dd517660794d96bba265fbfeef267d26fa2a1bda94235f763209c1
+1f817081f930f20d2d0cefb9261e22eea39cd0a390626fe71d312fc0fcf11db4
+6b0b70010dfadb9c7725f419c1c89f34fcbcf3b268c7a4f838d94cefd82685ec
+b619d3f6df7571031a82e2d2a8bb98b8471d8c9febeb853ce0d38d7747c0bd63
+fe04e36dd00d2ef30b0c842d2a59457b3b41e2b8cda904a5d281290219814b59
+c4a75469375e9e0b3a358434a910bf1774657bbdc64cd408c680e2a09ca26507
+06f95e8c16735cdcca195f20c9a03a2a0ed60184c03f4e3478859c6639ca8ac7
+241b33432661741333406add1d9439690f07564d09f4b67152f32943cf93e247
+3f2a17a476bfd897ff69d4fefed1f4a994fdf535e3e45b1a3d46d560d5ac55dc
+2e4c20408c8ceb82d7bc21016bfcdddb8d5daa9e902c327261549ba62090dc4b
+27ad160070880cbdff5d022dc9c7d6f3f51a49af6dfb713308dc590c7dae5236
+74d7946c1db33177e4caa604ecf655b792be55e14272e0daa0cceb2afad8f3b1
+6558426e102f72ee42a5d9dff66d65d672451316fe551fc2923e4b24d9788091
+66457f55f9c83350a62bc5bf590f7135929b365c0dd003a95e98760472ce988e
+0e5affd7c654bb99eb4255bcf030fa008bde51daa55ed736086953c599bdc3be
+16efb2368acc883bd670d753fc7bbc65ec5bd797d0cecc14ac15f6423f0f22d1
+6b630dfe8736c2db51b45774f99280ea1274ae1c207ef3574e55478f68bac3b4
+8e24180f8891a2f3e8c0c9f74c22744830f1617b99a78feba5fbd752134775f2
+5ab542c17ce32465058ffb9e3dea8030dfe1ec82a1818c9bd1e3db30e25d8128
+9ecfaffe85bdcad5126fd461b6d5137d2b15cee2d97486f3266e4c49964d46b0
+db16d96593bbf257efaf0dc10f18e2f4f14a347cdcc220e8ba87eb215a66030f
+8f30d405308dc15ee9f7d7c92c607140a6bd1cd8c8274a507c5f12293327b9a9
+e5c3a13eec859919a805f12aad2f1c665d054a17fd4dbff471890585a35f4e0b
+5e64c4df9b687526be10da6eca391eb351ae661e16b930ad77ad33ad2a2777a4
+ef8881b5be91a83cbffd8b95a8f7c91fd86c71061e7717e4cb2f44f4ba2cf5ba
+a64c4f7290690036427ec227446192efc7c14479525994dd0e86e7bca081a9bb
+00d55ec51e1bdbb504c4d43463902c05ff0c1d67f3125b8ec48f5d1d394c7f13
+54e70eee5ec074d6a7e0dd6f3d2f006fe8a527b56a560685cfdbdbc9f5c905bb
+1dd508ec7829a13a2d49cad2db823dfae5b85f3d7c04c0d8ba1fe9878964534d
+c23e890fe460c0b25700c5f6432f420f3698c6a655296104eef778a5b125c74d
+79ca60a8f987e278421b0d4a311bc4ccd59fc3f85972091516c8a4662275060c
+8851c2532e2a1f72dca5c350a03fe829db297d0accf6458b10836d22cc461b68
+452cd2f3764a3abbf2314105e414fefa39686715463afcb6fb6782eddd94781b
+5130a77d16bbf0689bf64fcb46c14682df23e70f7a571aaef0aecfda9c889562
+080d3bf39422821ae0093fcab7bc29f9c4281eac9ca14454adf3ec397855c008
+fe7a9d64ad134fe9122f7650e37c17bce7bfca7661a0a11b45b42bdffff2decc
+47df5d33671daa487d7bd6a5aadb32e7257dc8d0feb9b7f0a4a7825fdb8a5cba
+a31a988477486d0f09858c772b8c468b794ab2db0defa88c3b4927b615bb34a5
+8ac9d9af50a150e991e6f4330786f8a4f98654558a4fec8144eb2e46a6190b4b
+5043ae396e7fca1eaea3e9a96c0b200826cc065f49c47c2797ddfeecc6e9b95a
+f2deca74b594224dbf75041f00fb37f3aa70b0b0eceb4343a9331e3047e86548
+c3a7b1a42e7af0792e02a5bbd2ab548f7cb8cd112babb89213f66913dc109d8f
+c1fd5307e7c20d7340372935cc459a795ebc9c4ada9136b71fdb3f68aac98729
+16052f949b6657114a04472fe931a761c4fc5f9b8ed340c16035889172f7669c
+c6dfcd50bdf910c615e5f3c64101e2e6546f252cc4e0ecec03c5e19249b37269
+a0bd2e68296f9627e4ff72e37bf3c2be74e3b34d259aaecab472a595af08b2fe
+db51394d6b59c390046ad76dcb8285a32c247c7cd181d2e386c6d5abdcbb3789
+3e8d9859a02c13a72743047d8880606488a521185ca446499f7adfc9a25c8ba5
+1b1c84ba24c0612ea3d957e76bc398457821e25844bbd906defed4d3ae434c39
+9e52e60fedecc1acf4ddecfe92452e9841eca92acf99c4ca9c2cb32afab1dc46
+d0ad255a851a78cbebac54fd314846c35d35cb7ea10596734ab79be35e11dbb4
+9d30fc29b140d5823f429eb8eb3d1fabd90b9c1509faf33f609b3ae40a48f873
+763b3a5d5c9236aa0a2be1661be917921b58ba7fba139796d4c125127885779b
+6c71427cdc5812dbb6725153a83809446d26f9bc64bfc2a2a4bdca0c57a20918
+4415951c5d56cff5a3824ba8f8c0652e91a5d9c04d1ed0d928b33801b98d36bb
+04af8348436aef4abd549a063eaed12f7a4655f5183515b067eccf550f7bf906
+abf1dc63139fdb1e8a1d2472133fe920777df1acb2d12f5b655e568bd42e381d
+861daebf84ed9c6db8d307de2bed017dece82881ed7677b5f26dfa34ac25e19d
+5837f76dcaf237de6391c1d6679dc1a981737ea3e07e729060a0472090d5c76a
+dca9262a3823f24b1ecb646aaedd7de4a319f091a948935480d53376703049bc
+a45851f924ead472f1b100ee7b4b388c6d37e6e9cb850ce7da81896c1ab68677
+c3298a9e5aa71ae6379990327ec585aa1e291354e44ad972d3193424a9805226
+f43b07992c5f1c5e01cb5d049ce2922dd2921ddb5c4dbce968dc7a340ba0449d
+11ed4160c846a508b5227bb5ae574c8c7dc5d43a0db7a0bebcc638814f8933b9
+03404c4e720929833b4a5d5b3e54b806adb35724c2ceb47d77d39e43465e7a12
+51da0d53106f41313f92fbf9cd992bcfa4d13054bb7154965dcf530b2e0cd18c
+92690f54a6c6d7bb38ff4c59d8e35359eb3ee07061356ec6506b2081878986de
+80a2ba253a34519189e706fee9906a723bba749cef1c15abe3653eb31c59e486
+a6191335292bdbba1c442b229b56e7180be446a319e811327ed75f939936cb0f
+56e123a274c843f27b94b35babf938717b4d02c2a673df0a88d35c35833c4d84
+1bc1d5cfb8a00a181cc1bb68f9dba8fb10ce8ff9a520d938ed21fefb140b5634
+8f2c237d2d1701e50d3132ff93ba3c0543694c83dd500000b829b705e3268ec6
+f94887386593f0e629f6e74d3cd192a48c20d0b1a00ec7b18aef659a62777caa
+3692512ea0efe4b8a4f2a138631b10b59f0df0fe27be23f2d3e1b195c2375be9
+6e307b3b8404d2cc6f798fc995c1547354c24e04cbe50d273b50967dfce4ec7c
+ba9bd4cdefee3ff4310358014dc02ef0be941c4a8273cce80ca9b8f75eef61be
+854b698a2ca1100f40987aa622fe8fd1932984e77e8c9781c691734caf0c4e86
+566def79a60cd4d3a3cd79f59332ac99315844424a627e2d6d38b5d6e81838fa
+357f0d137804d5a29abdd374afb2e3c4f5901cbaa94b8d15a5a8988a62fb92a2
+e06cf8788f37a1aee7adc0e67626d0de2881d822f940dd658b5f310a1c4f1bff
+cb7fc9fdb347ad0372127ab143e4d80657e5f0c364f4721d5d68ff624705da2c
+27090a53f2d481492c3b15bd70fc050f909edbc2bbfcea26ae850abf2c2bbcbf
+fc4ab4d34d006a1a41469e2c8a8f5b4ca5f9820d105ca12f1d1240dd32d955ce
+ef9de1e096ba539a3fb11415bdc0851356a40e0571a1033aaa55cc3f618f372d
+8c71ec445768cfc42b2c10c04e45e98a649e770a324defb330b84952d46e5287
+65c417a6a82deec37727a517c12bb296eeb5e6c285dfd16a479369bb85289a0b
+e24254e6ab5de4e3a0343e7f901c6e39d79902e7bf437087fc894556dca62fc7
+114b344d4052b3d7f84b07ef17199a938f69b2586ce6a9bb840c7dc1336e185f
+6264b644cb411a2eecdc43e1dd26ec51a837401cf78dfad608a3b9038f9a3a40
+9fc464ff2214599f8ed573112ac944b593ae83348f92c54ae5d6db5956de20d7
+4d48f8f6c685a70265766a97367ec2d7c6e1ac00c30fd3b0fa4d2891d013d840
+693f61956cd4dd4ad134886868a55d9244f58c27f101b321ddb99b4e2eb23137
+a2e596ee6d131304df4265d6e72f9425127729028cf2c3375a4bba7ca9363e30
+9278afe6c282536537034c787be5e9ef1a0053c64b461ff496050cfc8da1182b
+c1abe0eb88089e2d4a994108b1d24a2205f33f3293954b8e8102be94aee1e8f8
+d725d52e87e57a2de1f79c68ca6b5b36d05ac31c2d2f73cf5b955b602a1f2eb1
+6091edaca5e90cf43a1fc23a19e2fa06eeba82b15704ccb5b1b93587b2762517
+abd0e6375409f518e74d727b145daac480a52602ef35aa037647d7c0d403408c
+095daa192800fcbb56e5af904fb72d069f6a15d4f95897f530bff36828630bc6
+e4f83f82a6f0814a943a49fe2288eda1452db8c48cad67b1b6398e481ca1835d
+b0f9f9257fd3c6aa11a7242786b47fe196cb4860964cba7d224acc20d22fffad
+c9e11d0c6a4487b53654719506c04b2e1ec53b3ca316d5232b821e5256fcbc7e
+7ee284e54eca74acb23fc3efeee59e1dabdd4e9c46c7a4234f7e3e5784b3e65d
+32ebba3709c63dc9ebc2dd6891e39c87bf846c3fe524e434d98e2ad199230432
+c84c95422e8950c4323caff03a9de5daa32a5ad3d07b5ee831bd589c0e331888
+33ac8dd264a563457fe1213d23d0d14536ab8c1e75e5af941e2068d1ba9a74d3
+ada91585fde5c2797229599749c420c694108595966b815c96adf3328894e76a
+a0cd504efacc06434c27cbcf96009947a0f80315879d2108bd1611d6f4a5455b
+178b5a85b5ea739546dcf226c6889dc02dc08b5dbad34b702fb77b82069777fc
+3892034144ce7995712e3295cb7e31095f430622eec4117d98fcfd6075a4f0f3
+01794fb45f3a05e725588fccca124eeaebce479b9a835bac7b113dddab302dee
+6c50e47c8e87718b3867c99025be81d05a905b2a9335068b59de14733d656b89
+97d21bb34893b9548830c45071921d0f13add9d9b75a6f38ebffe39f1d2cc4a2
+2482a80bf04e13b0e3614d1326e97e86b3dd77757764a9cbf6a0eaa530450928
+0c5926cf98b98bda505da3a35684fd0fe656e71aa67ae6e7693d3ae11425e6c3
+7fe01890b287f354f747e4de8d5bd48451ce4f28ed4bbaca7fac03eae6525174
+6e75b117e4c7fddb6979ed288f81053783f49f4ecf3af9cda24a7dd6647368ac
+4f2b8108451496612276dd42d7281d6365810a5ef3cdb304fa2630432c5fed60
+ace8924e807b54a77d63185e7c7ec65c887ff17a3633322c0d4c8367affe2ab1
+0845fa3f85262ed12a0ca9c74cf1c0f87ff1233868b83238831f911e41845abd
+73a346e7ac01c2b07dac7153de91318619f576a5ff1c0f9ba90315c5e89b8f37
+cb2d8d413daf121e0c1b3aa7bf1a62a2ce28e39d7c43da5275e8f0972aa73986
+98dac6dca24adbaecc997ad0488bd9cd356dc86c15756ecb6fe2fac61d4553b3
+0b996e98157e29e174bab3af12176094b414bdd13f4145144f087c349b8a7042
+b1e5b9e705c93ade44defd86ffe43bb513b3254e8310ec64409e79743c2f897e
+40270fd5154140e0e65566556892c49762a351845f767621f5f5e5cbe0b67109
+84e30ad39832cc5f8857c23aa7b19981ffdec5e4497cb52da24fd1ebb53855f7
+8f87823ff65f6650f362d6741f496c21f8db8a609af33f6e60f858e7bd5ab91d
+9ac64226eae4994670acf610130e10e7e3a6b1e6f3a07b87d4e6b712d243a493
+d5280549b827378ace2f866acaf117f9094c2b15c2430624d2f1c9a8ed3c92aa
+7c3ceee15ef6eba0e90686949aee9f375acb97a49bc96942d20abeae79fd8e04
+fdabe92b3c8b493f3d7efb13ca6bb9b8d98c41fc4c4f8e171dfb2ac038aba4e6
+60724b873c96a9e7b7b4edb24f09e22c937c8068589afba95bfab3c0618aec42
+fc7b68f1fcecea13a54f421c23e2df1b04785dd471f82587616fbd140758e21d
+17a1ff6dc30b301925fb1d2956cfe57f8b1baa1ccf4d171fe03c9336bdd0678f
+4640dffdc2ea1834e5eebfe68d4c26c9d009cc04d0cb8ee8f4f0bc477df068c9
+95eb41e087a9a4c390ac5ecc87667aa713ada2cc1991262a20fcda33625eb9c9
+1f419c6723f2875f40de2258fbaeb821e2a398dc0ec62119c4efc1e7da92fbb6
+c0175c56d32e975115a12697fead8852b8fb75b23cef1bc53b8deaf493c7cf1e
+9e9a9ce177bd9a78ec55f3dbfd247f9367974984f31ba071365fd79bfaacb882
+fab5934f730081165771963587130b5a1826b618ee51001ea81ee3372507ed03
+545d33d977d4bbdd73e0d1f235e7a2e020a28759dc53d383a980958ea0e49865
+b3658294acf2a04e0d93bc0806150eb192c8fd02c5dda1fb457bbaf0f71fd063
+29b87327fb05fe02ff88f7850d17b65ef608e7857d2876fb37fb0665e634cb39
+2ef9a4e3751103c087fa26998f68fe730c0ae114e34a3d412e715c7a12df3b56
+862f24f1fa06f6cc83769ba4d310467b07a91ef2dd6bb873deee11f1f326c40d
+89aeeb8f7ab1ba650444b2d3f077dfcf18803f38942f3d30f22d93cbad14fe1c
+1d968b62b018525144a5d2ed4bc636a0c9064940ef84d9ed682004774d8b09da
+998824b6cd1e7efb724fe553a8566b51bf2c6ec6f949501ce0bbc54a9309eaa4
+378e143ce3e035d57beb62873b294d07b920fece0f58d5ad1c5c4c67d3180a3b
+33eae3ce510ab906c841ecd9366ff615f07a905df9810a163ddf8d681920bd96
+d7b2212c74a05cea57e1e474be64eea47b8433755d72e5c1f79b8fccbcf7106c
+b70022721bd1bc779bc3f59301fb393d4429bc19084e228034291413f21fbd79
+83661ca0f6d331c1657fa69e2117464b8fe708520655c58b3f346f9213630fe0
+a31a55ecfc61f5466ccda3138f52cbbd575a56d4abe425266cce9e490d03bdb1
+0f9f959cbd9e34505dc46b9a439167931828d18f8e2b8a0b5d33b4bfb64df5dd
+b3825d34568453b740127811f4ef2995d0e7a09f29d432e0e0097343d5726719
+b04a72b4a5e0aa2804d6f7e155e1f89a168dfac8d593a8af33c075e213c0ab66
+366fe474ddb9ca17e6e7bce12b473ede15fc938239f21583bac0d6951648cc94
+cedaef748a18fd237b8b50f36fa97dad4b0a2b9e4bca1eb243a60b0eea59df8b
+74c76ea6067e77c0fa5b0aa43330690462851f923f6503ca2076f6b3d10483d5
+a1e8871c08434f6f2707f7cdf3a68d7dbeb4f2c7332d01435e37787877a7a29e
+a59c1493f2a959981026d58da06923d04c47502c7b5bb7f151ad5f0ebaf72c93
+db1db631865b261af7835ab3b596e4efa81cbaa8e6ec72f784e0b268f71d268d
+517cfd39804d0759486f8968ec149b1952be695da8553900c7e7c6878b63c664
+078dde438b8c75888e32c0d3285f6bed05132ff8e81e393b8be800662356b8d7
+b0fbff19c35c9ba9326b36586a179ae3e8869af85ca655406e1bd5a36c94ada6
+f280d1352577263444122341f71b118c95ed413a1237a72a78b59d12eda3da5a
+3d9fa119572142e43ae69551a024fbce71d153a1a1c211288f878bdb3f8a9502
+4a6420b3ff69f0ffa246d5ae44370a24576118dcd8c5f28f6988fd922ffa8cc3
+af68ab7dc10d2c3bd5900b05060b984a063bfe7b03932a1a4427de62b8e4bc21
+4ef0c83fe86919a766478406f57d148ddc4ae0500e6e15246e31dcf0a7149ff9
+1800ade772d44268a63d11ee0f3f8ad11b01cb96d04a52d57d827fd931e7aa12
+f31373e2de4027c293a1329311510a63a268af6d73bb839ce767b3bbd4da9680
+4e36dad7495374b17f506f899ff61fe23f71310b8ee2f530bdb6d8c951fdb34e
+8fcfe71b12a555f174cd72428acc96eefa57652a2f5dc1a446d9f363c7994c53
+0159b89ec2694fc59cc9e083f506698db58d841d03f3961897168b96a3965a92
+500e29b74743e35681fcf93debff5785569e3b0e42b2b586dacacb72ceb0dfa9
+6c2aa8902fb26f1c3293177dcc7f70b54d85cf1ea4ca1a980e0e053bedde3eca
+0aca76c214fbed2982cd51892bdc35baa7e3ddd34da26a5b9302ded1de8099ee
+0e87410403d8f782f46987be974b25ad7766608525de89cd18bb00f831c8b3f0
+54db8cb4ab0ee2a9b1e63c8840ece040c3d7d763c7f65bf4ffcb33e7ba98679e
+2f2f77ea277314b42e94e936751b1c649afe60fbc8cbba2655c4bba13e622e92
+4f72a5612bd507388c7cfc8077209c68c4252a81f8efbe8b8f9799a947594894
+8a1d1087bd458d2436f837ddce87ebea385e3c44f433f2b775f6257b1f80dd96
+2bbb0fdcc8c78d32dc1e09521bcd9810fe25117326f2ba159a60c26d5aebae75
+8d8a422e14feebf2cc3d30e6c70e320d3448eb3edc08ab72e44824e5175790fb
+4a6401326b5ffe81fac99839bdc39a9af68eea930ffcb80223bf21e301c531a6
+2a523ac9985cbac3bd9e426dd9cf6ef112817313ec460f8b90a4a2349f819d74
+3444ed4872acee556af837375eff1b44dcc310f4ef67758731f7be7c1cfec351
+ada83a533c06701f63d2d8b7b2084afc5e7949ff250340351eb4b2886d16ebc9
+7cca76190f3a4a58995fb281a0dae019ed92b64190656f7bc5bda4b2532c52c0
+aa2d5ec6168e24b120ad5ccfc0bd31d631345c2e2cf3c7fe1ef9ca9cd4322b9b
+9d587204a24e18ae280b2ece030626bbed9f66f2979131ba38043a92d19429b8
+53e3475c7b933e054616aafdf0d3fb6345ef888e3fcda12985c2b2afeb2e59ad
+ed76cd456c6ac11d453deceb45655fe71a3ad5f5f770a7124a2976639a0a5847
+b79379244738b5a7b176207080dcbbda96f43a68370b434b348ab5631dbb1d04
+1f1082c04c564b44191a51afdfb3950c2b65f9c4ed4afb5f4bde68fb7a09d710
+4bbaeaab1612c1a0b1060fafeb385da056099a2765d69388d9a276601bc13a54
+fd114f2ce447e68ef452a6703d6fad6acc3bb591c3da0581c45de6f2edd02422
+aaed358aa940272865f7f93acc28460c8f0f5222454c05fdd3eb100219113eef
+5b0c02314cd29c2ff20f4e86b7866ddc9b8eca4c7256e9434091319ed99f9446
+f606dd0fe2e5b86e3237b2af55df6bf9624b286a1a9970759fe83b3bde380b8b
+df7132016d4be25517449ad88c5e6da4e292da5632eb662a898bf2c76714b963
+ebf7e7cfd268198ba84cbbfecb7c3fd01612f7c6a9f118aef4cd59307cdde680
+25d9f98dcc9542ecfe6a8bd8b2d09caf77f29e4644bb7b6ae295277eb8f5b733
+617f4ed5a2111a5d9eff858db8ebec3e59e8fe318c2e7a474f07c9f4234c9add
+fabaf11cac0a958be217bdce993dc99865333aff57576ea0e43fc70016c23077
+8ba456546e8ffba24581ab50e72fc463e2f524a07cc6bc11a347584d4c9f40aa
+8fe8a6873b680b5e7871b47e1103a77f0fdf2110b9801e8f24ca8218e4a9724d
+021144c9449ded25b0532a33d410bfef2382e1ef629e04ba1b5fc09d86b85481
+bd8b1f1d719cb01352c49e1cc54c34d115a6c1d0f07a83afa2acea650ce304bd
+919eda435e6f5a044ce65aeba0884f5099d860fbbc90dabbf0ae5cb1dd59555d
+2ada2f748f3a74010519af69b8ffcbdde7e88de7ed1b0f53c255cbfb8e41fcb4
+8c80603c8be3f3965b3af9f94b027dac3754764f75509ca2f554ac1de60bea69
+a53d7a9c4973b51a41aa7c0386117b6353555b31670c803db4e475c330be39da
+4d10f247ecf2992f3e3b35cc56bc19ec40a3914da09c914005419448a633518e
+3d4a0ff8c39f6ea57917fc87f890ef834dd2c6531b3fab0eba79e0f580c19291
+9974c58cc1320d8e66765886ac966a55e594abf6fa69fd1ef3ad7dbe2d964495
+08dac3b161a45e836755af3ce6b0c3e3247fa56d71723e41838bed42de4404b3
+967c900ae419a7006f0832bc24559a56f417921ff6c83120e70fb9bacc6ed431
+8563d3a82877b5c1422cf56cda1305e7154ad1f63873237de5ac6f382217c4c1
+17559be71ea1491edfc3afeb9809fe0b4e9b6e830a48af9798e70c9411acd054
+9d835fb1466aacfb17b7a863c7a1cdc81811c220007ca99454e8c423ac95b8bf
+13ea2b29bd1af8ba4e56662df2eca3ac252b683df1e9ef0cd47326252131649f
+e64086725efa8a6886b8c6dbf56490143d5d91ccd1c1f3db4c78ec614c3f6ee0
+3a5cb384ad5b7f3c7e1fa13ac9cdbed4eec6c5012de7f3f48b41531a79708f53
+d5f16ac0b89c06267e11a5fb32aae3ab16a1782489945c14492824724206dddf
+98cbf03cd9d969a543ea1d516df6664b4a839281b179d1096a434bdf08b3b6a8
+b0231c8857f9d4b4436f9c02211b6af4bd22d073d008bb8789545b7f93635082
+641c6e475c12ce89c0a4361e91dadca8ec20583003b1c9306122accc59fd089d
+28757e3e3324c4bde7ec7a161b49bc994084a42880693ffb8676366879ed7554
+43661ba1326baaf4dc099884f753648a05a37c71be30b4a3425d768b049a00e3
+2a3f3c3b12ca5c99bbf419fd25714cbd00a850c7d84a0b4c3e5346cdb1964a0e
+9cd1ac316f017f6dff9679091a6e93a70fb6d26072a2dd886baf9b4bde98cfc8
+372927bc92f28bb3eaf14252c7661be1c656129af8b3e468456ce20f872bf151
+22ea95d1c79560268976be3ee9bacb2a468e1e84c8c387ac41d3531742ff094b
+c3e14b27444d2d0dd8f4dc738e0af4133cfdf7b0808498646e6d28b738e80117
+870bb74f8d4947a15100bd891188a1609560000bb7bfdcc210508903dbdff736
+07dcc542b58699beef7545cf0456b8ecda464126c86ae3db47c7ef6a6477808e
+a8c1dc20768895055bacbe2562921d078fe91794be3ef5ac268f410e4ea47f0b
+68bbe84e54fe139dc9f18808574ae9316e15d0f3db78ccb4c0a8ac63ede19a31
+09749a0829ae1302fc18d38d27e43cc24dd43b091a58ec394f998c5fd4145781
+d6ef576e99c850fd41d46450fbe5d5cd4063d0a24c8bad4a45753335937176df
+36d2d60a677fbcf63d8342232b3d9c0fe3062ce4f1ba853b40bed54da124d913
+4ccd113e18fe2d0c4bd55b58fd5c5fe6321996316eebcdaead6751004dc26676
+1f47c198fd7c0b686705a63a8d2d7e79fe826edbba1d166822aa804858c48f3f
+2a126fb0e7b2d0b4f2f082b78b98c2702f5ff3e4307e1b55fd99ddd861bbaadc
+90075adb2581c3d4e5ecbfa5bf8fc2a4cf6df7bdc0e3382bf12e612cdf016479
+3e237ab37bb1049ba63bbbc0da17d1ba3f98d88ba38f98d7133f53c2b9e87889
+5304664b4d5b6a43fb2577c5ae332fef6d7b7982e0ffb57b265d0f51cb569936
+8fac060e6ac472317597615711d6c13058b2f192982a9e858c093f854a60ae49
+8687141101d45bcb53dc69d432e0632265d8704cfb3766836caa3b09b2a44a1e
+bee69f88f9b8e62d36dc16fad6fbbad7f15c91f1d2431ec61b659e9072fa34d6
+8306c715e2d111f834f7d9fc93a902976ae995bada6bdcfe09d5d3a67b247c74
+1e45d070c6e02c7a9e4aa540a8fe3a41df7fb4b60dc943bea339219bae869762
+223c7492de1434dd6a75c0366624f936179c494f7166085416d126a6bedd962e
+1321f9a2e1b359ba90023ac18942f3d19f8dc7ea36468d055d68c9e758c0bd3c
+7bd2b10e7567282b6fe689a2c713c3272a664df39acf1eff9e3a64a353195290
+4e100ec249c9de6196020e30791284f028f8d98e4447330cafe620642db22f16
+e4dc191d9c2d4ac9b54c1de35a59b2d3138fd686741e836d55d4b12ecdf1cc85
+5bcce70a55d9dccbd33005e654150899527801be8ca74b238a7be4fa846ed624
+9e4d5a6a0fa190963db0d0b8c5f982aa477bd202ce0fa2fd54c3cd4d788d3eb0
+1317a307682c2a2813b48ffd7603a4b40d79209d49eb456064e66cdf7551161e
+9204ccd7d84c0deb458cad1a4556a1cc1e7df0c815da189fd9499e58c9d22610
+f387782f059929860518d3ad42cb245278dd67b01c9e3ad391e0a57b19fee753
+824cb856bd538a05898ded31e347c26ad123ff3669ac5b39e137d655b1c05899
+a9f73546d556290347af154004be5e9ade507c27292e9c60d8a2bdef92d57a90
+89ddeba1dfb5bd781c8ee4d036bb8b67ede9cdd533269c40a7f862a4ded71e16
+cd04e4f144cd4e2070379f4aee9c47781a15b46878ca5d640e0f434010cc15fd
+220aec4821174563c17e19cd934cef3290b3462ef9cb001b84991f29e8de05ff
+686787bd434149a2dadd81e4bc4079c31b7f19ba28eb7240a06b9cd5b5e11490
+66573636e87e5c0a10d0ba380117618f8bcdf3152826b110a7218c329e49fedd
+c3d494bda6c0fed8ff7da20da6a9e0b54ec79af50c7fd1577bc4c5fe1bcf35d6
+891091bdbc81d468935fdc75756067516080fa9f6cdffc557537b959d150d86d
+9e0e1794de22b011073e79eec4ea6f14d6ffe0a75677d20fc0dd0391603569bc
+8e7ffee11b6b4f75f081fe4e7a9eb847a49d11d8531bdad6a73f1b9146625294
+85db9550e9ce21213904a4f9997a83c1bb9d53f5c2099ba94f56bb7985fb1cfd
+be30d619af77363e943b7e94b12f88fe3f3a1900d722107350b0376291296f94
+8515d1b41e6bbb5addaf252985596f30df0aaa37b0e16936dd786cdc624c68d3
+2d796eb0faa89df09f0b41980b8b86009b682dca85eea7c16638d99ea711c631
+35a79c1d426ca9e8782007c61e424c8ede1d72dbf919267d25c73727882557eb
+f78da42d7e816cc83d80b95f3bb86356314e65083022a08f82148044d071cdaf
+db03c7e44017af773f0e7d03c2124e3bb8ef458736c1051f70fa18536395e521
+cbbe933c514747710cb9edfc30f774f75bba103b091e24e4811b4a8b9ea2b492
+de7c5ce1ed103b70c913261fd04caf13727c6df5d246a419c52f175e580b9f73
+fa96742e4f119405174784450411374263d2fa6d277cc0a9dd60c97e9bd91498
+a7942547c6888fb80f8f9a4a3640aff4c00b2181e9a89f367a680cd1932b7ccf
+6e1604774602cf412130503d43f8bc54bee8514a24da005c733295f022f6755b
+e5387da8e24854cdb5a73c39b1c34c4d1884a4d234adfa8d104c004efacdd2eb
+43f20ee50840d297bff0095bd290ed796f726b506e316224907130eac9d99a69
+3a62927d3ef4bafe96258b2b391b373b255a84d6e9d03797f0b1db056052a5d7
+4d4754284dac23a05ad8f2a0c823a8a9add8669678c9acc3d1d086ef67e116aa
+2542986d3a021f8bfcc00f66e812c83e1235990d4adeb39dec07e62c10089c93
+f1801ab8f6210bd328aaf6d44e0a4df0d5b2ee8ad1c8f2a21f43e4f9b897ada3
+88653a83ff3cceabaee4fe26de33ad5fb3337e48e35d14423718642c4071a56d
+f39725f27ad0f2a71b67a14708e70007bac926be651398bb19746f14d1271873
+b7d77ac822aed13b6689b311ca57b895287e16acaf3a03cb9424dc840ba5fd17
+543bf2b93b4a11cc9cb7f9cdf118feaab5d22244096b4ace849d8e51c9b86d4e
+4c14d5874bb374b75e8e468a10db921c066c5c095c5886f4f21b4cf32801a1ce
+ba7968215ea52e217b2f892722f3749460b65838227b45b4c697c2f7d9ddc59e
+e76a83887354180d4eb39a789f0c4ce770f54802b55c238b5189e8809bc29775
+e02104bddfab6edfb13614960b68a49f8e903e6c53d38faeb9472c8bafed7516
+0fad6c4b186735d5de8f6a655ca46f880fac0981383b4720fbb3cb90c757de45
+8f0036a7281b877143b5ae8d0bcfcfbf15f7fe641e216d09aa391ade483d0b4a
+f304f07036ba5b7f32d9f2d0c8969c4f392fa855dbb57940e80e56b3209853cc
+f140c62c9af0a44b180280b95c9af522e77b0f32de23eb5f7625251bfda99170
+e9dcab1f6ddfc1fc7d9ce75c8b9d9350a73823790b789a41b33bdd12e5f527c3
+6785611b74f8232deae963e873156e473f2282f7598d6b05275e8c5ebeac183d
+5239da1e92b56d987cd9e8d817b2be1730651955754e028b4041189921f28683
+8f80a3097ce2e58784a85a18477617d1565160895c588601d71584c097711d07
+fceb3809a57de8185ef6f4492f0ed8691693cb3c83a889f4116684657f1aca5c
+d954d0c87ab67b71e6f13358a83c1a651805a7d3571c0c9791cb761014129388
+de2dea7ba4d0e10c3e3055155fe5f713e51e35d927ad9bbb85b033b9c6d94737
+22cda751a32c178a3e9a526ec9f50d3ea4dc1c4e979597a1f85e3d4342e25e4d
+2bc78e24765ab3cfabd4db25c870488c2d5962756d737bb1c27ec5ea049e6ae1
+91ea186f69bfa8c8969c6c0453a47b73d9f6550131e73f00140249cd8dfe74c6
+c585467610842babae638f2c67ddddde42cf80d561cb19fa06a3b9ef7dbeec22
+e0083cd8916482c5badbcbf03e88f28aa322480baed5cf147f7077da4368da03
+9ba3ed7a96798b9bf4af20946fca2d5cce88915df1e03bccc0a8e8c8c65bd6dd
+6b2195c57bb04dd20928222a230f22f564f51b3e9fe79564525eaef5d017872f
+3020c9326b49682962c78064c067c2b46fa3b94567647e04e9e059287bf2895d
+9d9d169816cd864157c41b432c86626680157cd9e3bf1554965ccf68d033123c
+3667deb2680ca27d3241d6ad950b50ad22aa3166f566c91128cf9448777a33e5
+15a5bf3acd90e0148c7798a5a3875c7aeef66ac2d30c16e9ce00c71c82484f9d
+39ad43a5a30dc01aa0e0bf5e18d0f91f0fdfcf8c30fb6bbea79a848af26d02c8
+431733f1f7e82fa4b37afae125d374fc172d1c9197ead90f986afc0da1243ff9
+97d02fc4b4b5c340a748429841b3a8b56cf3f72aedd6a4d90575fe7c781667ec
+155153ca416dc9eaf8df3830eb21e077653f595ddad569d8bef8802ba2d2e2b2
+7123b7f55745380a83080ea954ba9f2c9039867777b33d1d3dd812d4f8166baf
+9e1124da1b7abdd6c69596cdeefb999777943235314d3098beb54f8f9ed68ec6
+b6acb5aa9d3347b138636a0718f19a06285f194e7a7a81fc94e4d54110561e5f
+61b8fee49f71566c8109162f879f16b80e3ef0342c1000e0cb32bb3b81dff1a4
+dbff77e91e6a561630848aebd0d1c40c5f3129e409da578238889870a7bce285
+b744707adac54c8091b1b1f50390f2886144294e036008c3e4f20267974310da
+229b68182c2bb1af96139268da254217c47e5e2bc279200d858ff72a885fb791
+43ae0be2efd2ba6233620c039a1d47d8b111cd330609cb1d810279a7882aab28
+0a20204aa812c580712c7179488815e2366103d96cb0d564afb0f5a020493076
+46cdb743dd9df4f304a60871e597bda480624939ff921d7d36957afc64d5a507
+a48f8a087585bd0548b1f2c5a4c72533cef1db0694faae62c035bab307b765ca
+422f221a5536c51eb201ff03b81834aa581f36c62916dfb1dac0a680f1f4ad6b
+2353c8603e960f4a70b2aecf44c0d134374c35c88a77e0a62b542efe834e48cd
+4de9d5a989923c8a6da285b3f6ba2e8ba4df07e63a16fe98bdd392df72759073
+f7af0cc58e8f279a232763a8a9d18dcb205350cefa25012c0183713203ec50d0
+f2d6bf83edbe9a6d933ccda8b1745b183adf413617af83605120075f49db2a24
+df5dab6f8085d71c4eec8944dde3ec0c1e51b4800a90116b25204a3e51def988
+eaa3ddb44d44a052477e2ecdde55d0282a5a9c5f4fe31f1d0bc7f40d1f76866f
+c31db401b2865de254b1699ef0660727bc944470949955feb0a8077be04a333d
+72de1f17e061040ebb66504544fcca2ae6b1b58dec1478967b7b17659a4e8c9c
+fb5cce0a95f52d3b5b9fae59451608518b907aef2e1e94144b72fc846b1990a4
+69674c263d050b38ee61ca447b0b25043c980d68fadf6114bfe9319f27ece2cb
+2437c5e78984c9599761d264bf15379d554540b13a2adebe9d5dde18b5663650
+025f9db1e17d5ebdd776125112f32c157d87978c564afc1ab4bb9d734689edf2
+e165cd4ed1eb93b699350d5253f3f869953eeabb6add680ba6a2d840bb7d90b4
+c4e478460059c38a99be0b7c07173b2fac2c68e242e9d3a2eae427c6fb733698
+e429a14c8b04fa08bf6b9980895b4706da12e7f8cf42fe3eb14aaadc87638a45
+704b14972f1df00b8e7a9354c15462ae600a6a8c4b95f33acd11a7da207e49a1
+192cf225d16b58ded179c8ae20fa7d6ef7fd384e7941a588fb7f8c5c29d98172
+4a848cd2a7109333f2a5963f2f42c6835170a57f92c54f03fb2bd434364d6a55
+d5adc8f90b553cf66848ead1de1197b267061f83442021bcd668fa332f3f2034
+143168d02812313f6abea888a321affb1a540a20df468fa35562ea4e45640c54
+e03f932f5581de862bf2bd2c05d2c995bf6ee2039a22ca68c9a71990cb499081
+60b1ee8c5dc10c9174e88f2aa5791908fdc7f7d37e7bada45f04043ee35d1dc9
+ec3704d315bb4e372ea62da6580a5cb5192ec21865ed4ded15de27bbb1672531
+bc5b4c3b2ac266dea3812192324b38c50e264f2bfd995e3a33119e6b47f23fd5
+51271d0a7603da01412889b76031948f722f9fdc54012b4ff53cc77e9a787946
+b79a81d8a32577317f3c7f715f8d3f0daf03877d06d4161503cc441c723166f7
+40e4727f23a4c75bec756e4c40b0cde10315afed35bf03d523d6ae00bad2dbd0
+358e691bf92867237ab36951657aa0c4d79726dc75d8c1c272da1b3d0b47f95d
+2436d59ca941577a232e540928bbf58673d51715188aecfbee7aaa56fa672850
+b047bb56b9c8ef5104b10f8117402b229e483c863d4831b9a1efaf164e99cb35
+39c0299e73158510e5e1f861a6715b979a9982dfd800b0e38a394f169f0f3d9b
+f4f931de232db24c616bf79f59719e6bad4e451df62e9769ef3b2e74033bb0d1
+437baee3efb900853193f6ce69c7d28a871449e9f84909a96e594db7fd08efc1
+217482e67b2e02065e60f4dd931136556c80f39641860d84b7354e86feef096f
+06e84d35dc3645f05626b80e24f01df1031a4e1ee3df4fbf139d27f95926ad14
+fec86931515bb225c1334c86a2a59dbbfb13d6558d389a7202e0fedce9df3d06
+3c4559b11255d23e5a45709756d857060f186c9dd2cdea53f0c3031a4f0392d1
+4beeea8c705f18ae48fd22c8412b71aa4c62231bb9f34d2220e361cbe109818d
+1b6b0be26b2ff128546d68029dc837e42204d73a35ca2a18e13c46d488fbf3bf
+7f6a6f623085e42743ad29b3b9c042efbd195dadc87928ca26487e711463969f
+e972c925d517c754fbf308c3a4ec5c604359a4c8fa57e8db4ab77341dc6364cc
+c6d0640113d541476389195295d68984a2f25b33441d7d7bdf581229503759d5
+e955ff29ec234f2a7ddef7fa898dc3ef0e82da664087a42b6dc28d665622cd30
+92868e09703aee3764518038ca3969947a1b4e63cea5d6a7ec7aad6e7577b88d
+2c9fbe177a04401747ef15b436b75d660c7cbbeb77bb44e430e9835ab409c2a9
+108f94117951832a5a0af0a5acd4e8233fe636a348f252d22fbfea95a5eae39d
+d145abddd1467561b7fb12660b7cbfd5cf9cd84ee2988ddb6d56429e4b87fc44
+6cf4b70f45e8fc082d7020bd6e8ee33c6b94fefc99336031d219145fd293f4ac
+bce0f52f8ea974d74f2b858a3daddfbfcfd50c3a778ddadd1d1090abf318fb58
+2129ab1f2acd880911be86a256af0d0f74657d53a339a4f527e0e9809e47914f
+d7719db5db1ab21f486d85dc8852e9e2cdce6d35f5ae66b361980bc0516d1d12
+51f9444d3830473e30c9060a76edc532e8d74c4fd22b5bec03021bdb293a3a60
+9d8fc3aa0ff599c7a4593e555e1b82f0186671be699c73a26a281aed93af14d8
+5f9961d44c7f4954d3c878f8bfa0c5632b31d9a0c978442e917fc9ee88666818
+9e13fb731cdecca15c658320272ac9e968ae89bcb8fae5765998c8b4d98aa59a
+26e36ec1543032f391f712dafaeaff23be8821b3a23ca765270cb0bfc601f57d
+da601e2e28bac03b7b171101ac26c195863ec701a6ad7b9db8177aad94be5ede
+eee3b11860892cec50ec4059b6adb16c63482233de6c780a26109f8639a029f4
+5c2d3e6a2d95ba25de8097aba992609cdd0a76683f8fc50acca1533e04f0eec3
+96859b3a92dfdc7d8d34f2add87cd55ff8cbdfc446e7154adea4dda504f6a835
+8e2b3433070f23fb153bf3838e13a23672dc8a1f88ad096693212d994c523955
+75b925b8ee182522d63a882f6d6a3ba45fe37eb499f44ec274666b1256595d2e
+537684f807838d60f07ab06603e23f360d6ab50c94cc48d3ac9b31926cb8342e
+b5a881221c1e34888336699c7cee8199dcf5318cdb661f9188be6dab543d2bd6
+9016f5094d7b04677de039ec3fc22732fa1ace506320899074a31d1e9e580063
+39613072d3eae526b88b5933a0c5c1a438558372ae20cb80e0d4682571f75a1b
+47d69c6868ee47dec033c4ac744d0f958e2915b2c5115a73b5268aa94ede8f3d
+182e89777695d9bc36217ecc7ac1bd1e460a6503d1f1a33919e1bf91349ad296
+45cfef1aa1dffa8a68d4cce0d3f6f5dfad069c8363c68924647562f23fb98a00
+62212b4b82a5ca2d9c98353b7863909d6c1de93a2bea9327757528701415eb45
+43472b40f1a044cd32ba7ca9737ebc5e98d7a0bb808b66d616526ec48e60f788
+d5051dfb52801b9d3ba318da1354dfcc13edb89536e9eb6216bf35a77a1f4b7e
+5eca0840226eac5a9ca586ad811aad53a1938860af4fbf5fdf1af521c07ba519
+e2c2fa0dd7dbfc1153a5a77bda9d78b0ec5f28e832943ec8268a9fe453bbb53c
+6a45a9e2f679126e323cf885ba754bcef56ff40bd992f0372bd85c303930be6f
+14087eb0f5b26e5900f236d2a8895aa299e3b769767af33f88da11e5374eb32c
+6f5cbc9cdd8b067abc22e26504fa960e4464803f95af1ad57b249f0826e3b092
+4a5508b46c8ac2eb5d113da479890a7be56a7a5a4896fb097e2374f2ac7d2e05
+ef4d4a31d8e9fae9a0df448f198cfb26ee8462dc01c448af7389076577d4814b
+65fa2e4cd81d22d81db6ac028c2c0419cf6c6b0c8678e1c8bbeab1b89637fb5d
+f04d600e7ea27f4768bb2200fea08e1872d2643cf36b7dc9a1d45425c2c330d2
+44dd92eb0631c87d8e6a275ce000dc7891a91f71a326d191c50c6426c7a5f677
+17a628260eabd753444083e6ff60c1a4257d97c6026a15efb19af06c73de3845
+878b618e10ecf189126b9c1f440b5114bf0d736226f86753da676fa34ea9958b
+863e2f5e085ffcce7ba461ed3191701eafcace0c98abdd6ec4e5e37cdd1375a0
+cde67542bede694bea4bd5a92bcb296e6ff79e40f730490fb4ffa1c0b88e5d7d
+cf6819b545612c1978c34ddd242ce9f05bd2de8c6bff8e79fb747035c89f0c1c
+8bd4f55f14b6c510060105605dac0e571cfc02a8a580390292473b7b1705175d
+33efe45867e7fbc9029106d0e66341ed9fa6ecdd6c8b4c50ce213a022a4d16f6
+adc0ef53f46870add3d7d1038523d8fff0b2443a58f087f910fe374b3181c982
+732b86c0e23bc8f9b657d5c49f4925868ece6e5257b6aa08f08b2df97380cc7f
+d9c8e09d7b6886fe8adb6184751bb1a776b0f0b365dbca4d2e470a9f33c0e424
+318ce60407abf86c71cf2373e4226cc556491a91f4234f75d8a974a5b4c9748b
+25e143d76d91150a4796b1f668e9d709b8d92c47173ca4323a5b1594c97409c1
+82a52797bf1f74a8cdebbe221e9d1868cfa963b57a28f27ced76ec79dad9eafa
+c9dbc14b8a0542e93eb35bee947ea0c0fc373170406275d6f94483b5adbc3c48
+1d877a83805751d169c08a772f3dbab227d3ff467c9804ca7ccbf700a75ca77b
+14f32e0fd063e6462ef94bec9bdb4e8a392db2d4e392a270e982b05cfd2dbe37
+02eaa1954bb92e0c74873c3e7b780e7ac3341635c5a48ab40a855052f1f769b5
+48b78ce8549bdc2d972b41b2ff8d4c188a6c6a3009b3cfbf20c9320c78b823cd
+dd1b836a827ab16d2479c289f766029f35fe1fa278ee20c0c8bc21b02837a586
+2112128d04df3d2677260b123ff58fb1b7e6075f1aa0f6c7d56b9cb593ca07f1
+7e5ee7ca93720a395140b558549933bda0106ed4fb29284ea2b76eeddf0e1ca6
+89aa2a31f3a655c6886efc94ab37c6f2bd2cd81e351554ac3f569683ff1876da
+ca0e0f2183c0613ff4266f9c4399f11dc9db5257a48f44ae2994dbce930db588
+46ba3d42b1e318a207645ee9b90ab34aa0ef3e113744471e5b827a90fb5f7717
+27f72758ca2e49aa0fbb427df80dbc2dca243e2d6c332d205fd8e8ccf4efb9dc
+be143004845e09908024e4e59e8828f3108da8b9a590decc82e5f821cf3154c5
+319038719c08714b54082e645fe0baa6667f6ef885a19de9033e25f6f2274f77
+8e8fe9b9bf35e5b8186e9cc7ab124d0e49a8df2343922ce64f0f65a00a5ffd47
+9dcf079a301f59192a3b9f6115845ed1909643e3171ab6f105cedf73ef9652ac
+c7f9c68b0b0fd090ea8bd3d3838af25fa3cefa1580faf0c50bffe0e964a12859
+e27e017bd84f8d89dd445f0afbf8da3a73904ca77d2b1ebfed76c96ec2f8a1ca
+d38cd76b2343f3b3ffae2ce64de4a0e3dbd9f0e265807f731f6f01e1d61bedfc
+f214ee2ab782eb6d3cf4746fbc372acea6153853b94f37f3f8771c5c01d46e1e
+1d307cd73f2963313f46b0ece915298005a2e37a20e8b0da1eba7f0c06a7e2c8
+5bb8385b2034401837bf414b33e4cfe4c40f46efaeb4eb66d8c73c82798b4dd8
+ad3e231d2fd7ab77e3bbab8f4e7b15bb6c93f92139beae8b92fe3903aa35db17
+35cc096486740c95add2ee1c3acab366b335d361f39b441d0e22794696cb2a89
+279f434cf1ca1cc2263218f4084261de8635c0f87e38240a07f5a0b8706201d5
+e84cde169961dfa50d0aeb38a6606b76289c8234a918a37c766877fd4b254b55
+44b31946a76521b83b6175e892670905956aebb55876d19cbb009346b8f6f10f
+a6a7a4c86da23716364edff21cfe7427d6bceae58e5fffe9e3ae92f3f88d9ef0
+786ec2ce0f1440cf0ab52ee2249d0eb924f20687e6716af698f8ab76f919d5c7
+4b4a860d28647c916c23421c50754d52749551e7349f72a5afdde899ae41a0a7
+074f2099a53d4403e3bebc0270bab5d191672b4fd9b24a3a32bd62c863ab113d
+0c98bd274aeb746e8c592c72010af8b3806c86d1434113fd3a915e11bdfd4e3e
+b975ee34dce95ef509c14f5cbc0ad0dc6b2eaccbfcea974baf685a369aaf802c
+0df511bd0d2250813063525c128eef1a2ce9e0015937a9ab1d590a71587a9a7c
+b75c6a13ab9072c934953e93ee05c36b99d54a765cb1b1062e5a312de7a5cb2c
+092a5b06a9ac8914f57212df83432441a1eead79584163d3aaf35be581bacb6d
+b70a2e42bc886f8bd7224c1e98dbd4fded0f293650901d03b9015b6a6f761978
+770bcb647758f87eac41a98633abeb13226e46171db24a7f0cb2f94e43cb7775
+e389dc2cc772f99b17f04dc1baecab2cbb77fd8810e1d818be0a22fc3e313d2d
+462d439e45ba764422692d68b01e7e18fac49e91501607974c9c1cc61f2c9a67
+1cabd1ea8ce615786bfee65314b414fc14528e59befb56f4863056b4fc18bc21
+d61bb8c0984bc7c16b491267a7f80255249179c6f3378c9485514ac7c2c84f61
+00e5d81d362e49f278fafc1b6bf0aa9d76c98476a3e3635165d53a904dd6b699
+d6ca2e9cbcd609d11cc9373f4c1179891d2c370681c8010ec75ccf893b040b7a
+a413663f8e262d4c054bca74f0c5fe40e24d57ef4994db6543bbd561f2b33504
+0356430cd25451126ec91f82bfc73ba6d843c07f304472aeecb7cdd660a34a2e
+05c1e3c06be790aedb514288ec1e029bdcbcfc13689377be037674051972e96c
+df6753b2e31da945b56c0a7316ed42adaf78a531d7412b3a26e33c3fb926446a
+4a8abcd35799ef47481ac60948245280236668ae7df01f3cba2384dc88945c36
+7c9d70039f6adecabc5be2bfeaa8dfc69bc1d40b593140c974587905557c4a68
+71ff97652466fd44e8f18d31e9855bcb25640f15a398c257292c61ca77b752bd
+aee91ff16e070da93ba5a9cb1d2e137fac8d78499b015ec2c3f8e38422c058b6
+8ced660fe0af345c9d4513983a7662a0c679236b9deca23879c983788e49b143
+67ce3f436353b3a86148ec21402c05a5e815ae1e375de539628557a8caa5af62
+7bc56019eb0c11f753193b3475c6512f1af8cd4032b4e13ceae3fa51c167a692
+01d054707f40b3cf7d7fbd23a6cd3b680d5c20e0181208d4b102e0f96841b6e7
+ec818a881bca226699ccf9587bac922a6b51b545d8222e9fec0fc90bb7b88496
+01a7c60dc2adcbcd798c8d3b67a6c4b6978388d83ee7f052e58d117c15067d4c
+7e0c8bcc3064287cf2cf511ab902872592280b67295c0cfc7b1e51b3f8b71fda
+b9e285f6f0de7030ce9b57e50df59fb2ad6ed36d423f7f2e148246e66d343396
+82ea928d4a3153a382a9638e9bac663b48e2d1f565ecf22d2a2eed624f3eb980
+444697474a2b983697ea5614c7a867d48363a1ddadf4efaedbdcf6306543d62a
+4e2c4b153ea731c1e44b1f362870621b3f7b992c85fce0d4889b78b25d1a1a1e
+c017613de16f6da6ccea3e6c0958d27aad413ef02097a1e379a965ccc3a75b04
+73dd0b82caf8ec8788d4bdd46665810855f8bac3daffb60ad8707c728fae783b
+e9c8a8d34d949caa5122f37fea44063211379c4b88c5fdc06f451d1c06b1fb81
+3a25044a5f8d348b4eaabdbe4f9c1ca8943d2af204c41dddc2c1a2bbf979128b
+665b9f84cdd35c82fe3fc9f7457513bf4a908c3bc2a0d917d8af2417ad776767
+9b8c7be588b373753077761f99fe50c8df8a8f85eff5e4fd53d36644b49e7cae
+3f65634f6feb5838017ed45a4ca1dba9adc2d4c525d1f952090d31a49b8e2aee
+6b45e0423385f52628d8e43e0cfe89d07640971455c629da5d938f551f8e60fd
+03eb7fc642bcded570f8f592eab13c71ea7c9e833ca2d2d08c453f84b13fbdaf
+7cdcd6383ff2c103fced1d16cc4d8a21d57a9e65d89f913f1a028250cc3226b7
+0fd0d223f4d715e233caa1aee5e9fe4ffaaea243b0e13c198bb8dc8af12fee06
+09be128117b9c7bc338f21434dbc92bba4f7034b062a3232f73132558ede0fb4
+5ef02c7bb6c146e4290f0d897ca4d72eb8d5312a9a5fbd0b1fb878aa3ac69c5c
+3330a735239e9181ae7f29267cfb5249fbe39470d119ca8dc6e0ddc18d5c277d
+b2f4a12cc489660685fd824e4db3a9053cd6fca133c94c75f8ac1485ca36045f
+8ff8c6640b95d2eb5a7b0d4c5931ea75418c151157bd25f93e05cba374c43c38
+f04e4e89cd5cda0b60e1e5d4713396e2b553727a20bb76a33273bfa660ecfcee
+2d3df3bce3c339a423fa84d97a637e3a3d99aa19ed8d6e5a68246ddb6d3d609d
+7515cb0f19df665d9f5cefbdbb745a89d3d69887e5a0bb1b4e59f4c5bc0c1a03
+67568e924f8c50654474b48003c443652a2e7a32d5c1775e9b930cb0c99f1a3f
+e6ed3e505ef02e231e9ba5a08c77571fb397b28df3f6334a59d62e87b9b73bb4
+8b3f911be84cbf41565870434642285ab575d94cf326ac39d601db42c83371ff
+55b1f9d5471f81754a3ec6233b47f444e28c0f537d91d8d13f57be0b8cce06ad
+f946dfcd3b272ddc13c3360225b79919f97bd2218313b06a80e4d76d899e17e8
+90a00622db00345e86a42f406a6f4185fda063e80b2f8b98b80bac88b400eb82
+12676ec8390a716d56e244320febf16f4ecb70e06caba17d7459801da82232ef
+71c80a924edaacb29af50d26be34bde0c1554671f4b0153a40a8693790d3ad6a
+5422eb65661cdca9379e47e813ddf9e1240cb259990bd8b92d96ae9576df599c
+743168ff8f0c64c37e870e3ef25146a9231c46578ef77cc3464adf25ce35131d
+640e067c5843d0d628a36b9f5fba003cf19d15ec0d693a8862685d46a30a18eb
+7d66a20b365b258edc2e9d9a6b414ed0f1ac1894ecdd4bc2d707d88833a1e34e
+a72389fc95d26ec2c10e8474bb00dc4200aae15adce11e1d8c4014d7e13c5c0b
+6caef835ae542019f4ea14c7283fff973eaa8a310f40de4de0ff56807bd4c46d
+c45523fc703fd8c6d08b32ee6e31943dcb52a47b30dad4d3d2a5cb4d647febff
+ca269375f1cd0455dc0a81e1886a1dd4b78a9d30138e03517011550a22997fbc
+4c6a833d32631d4a6cb9bfce3d8a98fc0393aca086a6bedc8ff833bb9c455e2d
+1cfd953d3f4e60f06e8226c561ec5dc4994ed8745d934e231d95765a0809b952
+48e85d325ebf37d8084619d4de9cc4aec1204c9122b918279b1ab7e63d9eb477
+74654bfa2cc04b8ca5984e2ed6cf7358df124b5bd67b523c4785046780708e2d
+982f3a7f3e6e266a5b3b72c1d9d13cd7d055a957d96015b11ac1e05dcd9fd6db
+aa69fec04dfd90eda81bf71aa205d1587eb8d1ce5b97cf43f32bb9bb2a41ba55
+2fe72fbcf8573a998a4be2e870380d4f6cb4d086ce926c86db0e248b4e594d4a
+e233bc13dbc6a55c5e7fc9c9ec994876cdc9795e0d3d0535f702f13c8cf64659
+b0248033530ea3b00295bc96240e3a41fd97a7e175b544242eaf7146a6d413fe
+fd9d4c4bc1362f20a1678b8d6ab03d7a72d9cf8d79a9fedcf826274efea6ae0b
+837eed3e717c09f713dd29b6ed9f5a6bd7ed0676b6dfea8c9c02a32fe56d704e
+bf1271604acfc1ea301d86e270427c417baa917c5d6e8e24af0b352d4f6b419e
+b63ac268e581a5aa86c7eeef14a718e33f4dfe5bf05a94675368e780b8f81ef5
+ade6d7647f4282ec319bf5991a09714594dd1854ba9c20d6b00ffab76e54f388
+a60780ec12af64779f2adc061dd71135447bca3daafcccfa6183fcc78522b533
+1f39f30e8750c0a3337a44766cc3f7f210c1a8e10f4ed1cc54d0729b26f1fefa
+7367aee66b33e8dd0e78cbec4bee5a70ca809ac39f84b72f1d119e4353c2e4d6
+20c7f6383ab7129b62270e6f7e75a1648d1da0536e79d60787aa3149b96a284f
+2ed1e0d2c9c4de7be5db53b35d360c1c6210362d4a35f91c6633daba2c2272ce
+d87c53f85ca1b55002d4e8680cbef6bf500632752827c0a5f19a062bbad900c1
+11442036e66d360743faeb0636e1f31b554b6567e4540d07abd6e1ce39313277
+5029e890b63ab4708ad351725bccd79d75e49cdb612da57efe3b44a2e7870e67
+a5d9686eef4b57c2a17f2d83cecdeb54914610e5a3401a97050fa517f1662297
+e06d29442d0fd89ba10f21584e71eb8bd5b03fbd56f5a538f72c9cc8ba5da11d
+9e4a7f8d9dc2fe56f2976d3e6bfc901de356a3d0690a0aa715ec6d339d72061a
+530bfb5323a8d038b8ad3adae140668e505bd100bdb20b98371228b841d0873e
+832309912ac7e9d4c7ee9ce81285c7f8e9afa8e2077e635bb36167c9e9c6153b
+c73fe799800c39fe343d70e38f30a721cf2796839096add3c82b675f0b659f6c
+99441f9352a332065c9df5b419a020d9b2fff06efd3295250d5335f7a256ef97
+992005ea2fd03f408a7a923ad8afbc8224daa112e8e4faf2ca974af2cafa92d3
+d5e9fc80b0bb00d933f50ab9010d671751b3a12196919e073678c2b047435a8b
+b826809e33bea0f12379ab1a0392d37f27766ccf15b3648e574e7dd1aff8295d
+df3db858bc078153072770fbe45196c3107a12df7f48d7bb6e4b99cd3553e01d
+59bc130f7877b18b65b15ea50db1146c8ffb2da5180b603d920c099d15aa9533
+b594791c144a3822f337abcba4d33d36299bbcd94190f85e0c28f4fd51f9cbb8
+9d301eb3f41179389b4e3323bc407c1ab223ba1608a5f8cea8d08a13dc4fc307
+2f93d59a3c8b32cf0721dd80c369e4f590d6fca9930d4ff110611d755b5fafd9
+9645e29003540c72f70f1ba5b1a884d1938f77ad689e6e70afa7216f31988919
+86df34a1089f9a009926b8983b05663bebbc603d90ed348ec33afc5a549af5db
+86b90fd34f534b24234f229409f960e2e921575cf45520f2d651c62bce7ab637
+6c2fcc99345aa8880a8cb7a67c54ca398cd61ad14162c9561ed8e4e9737aa9e6
+b513003edb220ac92894ab112e100509608504afe0fcf85b7bef8000adb3afa0
+3f85f52b856c23a68f58bc28a601e5430ae318ffafc24975eec7836b147a5a50
+d0369b90f111aeac20b4db1abe66c32bf4231006d79ef4c303e7aefeca4cd5b3
+00b6900a26b2b9d98da2809a9135dc6e16644dc932f106b016fa02730f1d6dc2
+b1c9e10b610f2bd769fc071e06ee636ef566bfc05899c740bf3ba380cd7164da
+7fa355324aab667f33fe518cdb19060cf3fae8a0363e4460a6c2c9b70bf39054
+b2d3eb81093b0610cb03e2e7180523561cb05761b5ca8cbaaf5a35f7179b1d4c
+18d0b7eedde1634f120fc0f6134e55a6de259aee6d440444e0ef0fb7db8a9c63
+95f3200e5d40b854ea844860529d1b694585b8826d988f432be1f620629691ae
+f282e79b2874754f96c4a4a1155c2ea07450c2a256b9d8e33eee33c232c99860
+1e34dbb63812ca08aff99255ae6def9dc3ee2789e9bc1d956de9fb255bd51d5b
+09da88ffc9d8744f61e002da68f41aab3afd0314ef876318c8785f87b04dfbcc
+bcf681dc8a0d615e24ce8f6322705a59a0824b5d1f0d35c7b04062d13f5cce04
+7885cf30dada61ba4cda74df52c4d4afa32206ca799ff9e9ba2bf939deaad2fb
+5b14cff0283dcb41869cfbab91eed9065d69a6ddc91cb241634df75a81fcb4f1
+490bf1195ff98db50e9fc3c82f10d91968259bb1b07645881c274d7751e5c2d9
+40e9e8a23de33344c3e15b8c0a3801cf73eb1dc8e9df066e7ec61667ed349f0f
+45ba6b0832143d4e6e7901d4ab7b461ea6489f419b59ef6fa892663b01a222e2
+7bc2f4cbc81b1982f595dd2cc94d6388312cbb61ff2bfecd27b1220dec43e9ac
+143a83b5a63c057e2ae6393054710b5d616316ed94db2e6698c4c1ddeab6d9ee
+2444408d659c7b68d4cf5c294dfd4299507c41190068c3905bce2425f652c49b
+de244eb94d28d3d5297e9a11adaa7c9a9138f00659f2f4a42fa34db8b8e29246
+15ebbafefcdc538911625e0e0e9ac8eca76662bf295c8fc2f871fd9aab87ef3a
+3a7b293875328e89d018f40c760006fba666b8c1aec0c64231793e22825df5da
+923979c72db39f5541e7f489fb5d9510674e8be697a1aa7a0249dac954fbad79
+06d11031ce4605ea491e9920524f4a60ae55c85371fcc9f046c1b83bf3e5812e
+2a2f06cd724c777d2238fc465bb016e8a78ce7c86808698a852d474b63c811f5
+43591f5d8391fe4a4d2dc3abc5005757a17922b6eb0be4b9c238fd162f9224e7
+475456f639c59a26c8c6107ec20330c8724d6f6842edf3875cd0f87dc434ee65
+421155bbf5226c31de48374d426bf3f3d07b9bd718ec54f8eb9a6f88a9de594f
+ec2c9d4b2b32827fedec8078a6851bbd269993b246b0c902242f0c7ea422d799
+65338a2ed8a27e49a0be708911bff10f485b753574d8ac8313caeab496e0ccd9
+5b67f10cc0c074ca7613d05a67bd45df6b72f6e30eaba836812c91a2a0a4bd42
+2141d7443ab359be588901f46a22d52fcddf6bc04e1fb006a32d37dda270565a
+575354b40af0869c9b1f8a85696326f546e9a25417b38b9b5d972bd0d933226b
+f8b34f70b324255750f5a64c85318907900c3320f070b1f789620e4f5db6f37d
+461f4a2f15e884b948327d53420dadcc4b073b37ee4fe935c8f520d9828ee209
+976fd2c26c71e3bad6583784ffd61a2f419981d51592a6f8f47b4718b6736a2a
+1ed7f729a521155a39394d038c34d8a76e9c6f91ca369da29fed83edfc05a219
+853e5ebaf1f3d5c6ec932e69b7a0dc19d248f81cf541348c85853acbb8334b12
+26ce33140f3965db1a6f79ae0abb24b93b6916496b1698057d4c2d4a6a72305c
+11b731a8a07ff1eecb84fb6e3f3c3706b09a0cef4b1c2012bb9278b76f5189a9
+38d5b9fdd4cb9028f43d16dd39fbbd10a684582951236a05e0692bd1c139742d
+7e75a21cf14fe99d51dcf0a0b71b267a0ad42b8c1d7f46ba46972c8ba7bdf849
+15fa6c5a922dc93fbaa9fc50c7696494e6c372f3467695da5a6d7eb87c0437da
+d7b68ee36874203d741e373e931425d4ce521b2728633a25dbb435f963399f37
+8d0adde8345439cc5295ba3d255a72039ddb1592dce1ea47a92d7b641182d0c6
+85d0616a85361c3b78bede0190834c1de0d4d132f459d8f29586dc73f974dcd0
+5def570984a9c2bc5a720999111c7de6a28dc0c6e9c51f82d8c55a26ff5ed760
+4337606960f847382671bb144d5ae5032c74e0581b19b21eea8ce4529eb792c1
+044418fb0e3da356a5b33cd97a0dce15ee9279b076405e23683f68c63b6b09fe
+c3ce3e1b30a4cb3a1e72455a372b6eccc7e4c97336df45d0bdf94aea01a108fa
+f28d98d7bacd750c7c25874e0fe3fe20d8e1d51043eca67c546278dc13716d9e
+f81a8fe2945a6a49c82b653804d54f626238396d8e4a9bdec4946c365d1164e2
+fed12929b769cb13712ad61c764d31798a87a3e12e1502cab14ca07efb524ca3
+dc31cf17f73feace77494de837790d812dabd36cf4c78123cf76b504886d0cae
+13fc6757bb6878f792a86d52d0e90913d089d7c81faefc56dfdbc3acc2195981
+0728dffd98a2254e39eebfb51742657ac9088cf8adc21208f3a333a1f45beafd
+69ae647754161c6bf0a76800edcfb6a2339f03e4b5ba4308b924ca56344770ea
+1c7322f692c297794b03f3c2a180b645ebf850afb290465ba050ebb9c8298f2e
+50b75571a15a599650a7fb1fde8263e49a68773b5184c30da3fe59a7c75943ae
+c5d26594361b53c26162410d3a1bced7c1cd0053390c1e2f8848e6aeaf75319b
+7ac5654a16cb93832bf981b9d54aebb8daecf97894b560ea75f51bb39a2bdc9f
+f59d01321b51b23a10827e1845e2db316d86d7dce368313f99ce7cab2a8e7c50
+8f91f0faf03626ff87247ba86dc7f3d837020e6aa83921385df0f401e4084237
+95251c27e8944749aa33b0b697456453ad8a5be8324fd22b192adcb22e03c74e
+6a3c9e6f7e452ca491db52e6b18016592cb09955f05365ec73300dc3e179c32a
+d08a443de2753d56f0c968db00d9cd58f1af7e3811202398bd58a337e7ddfd84
+1c8c8efd21aac90582130416d261f3a1b9f36ca431c8d4efceb9eee03d680165
+70ac1f37a1698c0b4da94cfd4c57ff54edc1b25fb713177fbf209928a1272cbc
+25655632d43e6d14c052763452d51cfaa32c8df47c57112ed37ed239f8c00268
+c78d7f3a0a965fd9e3f3c1aef2dcdf74f663a72b15fa09d7309f2d15b232efcd
+baed8a66f17b0dd190081a95a5619684a184603491a32114a5ef2c5076caddef
+0b4eb2197fd59ecacc6416398da20414cdb6a9a3e9ead646c34ae4ace4cd57e4
+430cf5bf55ae076419c0b79095d903753ad7f46dcc1b93f782127d33a309f245
+33484156f9ffcbf9e841d0c71ab0b12594cb2c327112508593573cbd95d75739
+f4ed866beaa48bcfe3599f62b0a848d6f63fbf79937966f3a0ee4c6163ed16f0
+4b8bd51ba483da59fd1d719499ea3aa49fe4917e10e2da13301b0a8b50f3841b
+6e80904dec24e5428b97ec17e66889170d12a27c028cfac9adb2eef49815f433
+b6089c9d6ef39f058f0cc655b27f4241ac74993af39e1fc17d5f9e27c569ade9
+ffdf46027fdd633bec61d8c5fe318810180f4437f356001633e14e098c992da7
+52f392cdb417d2bd30698612dd7b2ac00d0e5b4b3d7a20b99d0858d5e744d4af
+bc9acac37005c3841103a6ffdf3192ff85ed425dd221e4bd71ca3db6a739c7fb
+9602c130a1cbfb5b9bb9342099c2f60497642ed1029e5f9308a5097d6f33c815
+0f9a31a988ab5c162e5aa56357c8186ec5914533aede037fa99820ec322c8fcf
+1ae1a6aa6e048c99d2af1b96ee8b313ca0453923f5fa095aff28e7cf79c4be83
+70058ec3619ae4eb31fae28947355290e967453cf351ecd976ad1c5da7573f0a
+ddadb5b6661c47a0dc3dd22d7c175f9391bb9e359bfec4eb2b687a5a6f2fc8e2
+3ab232c34a95f54cf924fdf8011148145466799cd44a8440a0ac99b7f119e470
+a7fdcf6ff7a57a588f407de565b6a45e7fd5a1925efa770209110c54af8815ea
+ac1af9a0b5a790f6df301f7f9a105e776ba30e2b56d1dc2c0811990c8d2a0d59
+d733ee5bb53fe30323632057131ba4ad1d49cadad65d386ccd7a2c70bccc068e
+e881a538aa3471ea3b66ae24127dcaadbcb01a9abc8df00353c568aab8a971f8
+fe42a15ae22fcba141317584119f38d44e479a0d230273fb235a7895972f3f12
+c9964d1fff7ae88b9d39bd0c948a5ecbb2d858a26c01d57f3ae91ecca2475bad
+2d9c5d8053119644ee9ac5c3448c412b9fa18b8c5cd666b58714124c3c1f7d24
+62b31fe9605544652c1b62a4c16c03876977228b7808919fd49da8c14e12971f
+bf157f70c41e54927f569a8ded69e9ac4af29fc679a278a7c6b0b1a605bc8f3d
+d28c0da975292d88fb0b27a12c56ebb71bd93802ed8634e6615f92622e598726
+f1964331f9f3353638adfc0b3ae281842a8ab707b753f94cdc80a4133dc2fa76
+0e723c34a5962c79901e1c3be3644d926abf5a71cd581c2753042a0264fc5a5e
+f6196bbfbfc152730227798be62643e38c512d889e61b5123e58c173ae6cb8ea
+1f3c5358d9ee649afaa3c0fa0efc9d018be248b664f9b16ff484989e0ed8a199
+85abe77acc50b0da312164a738dd0b0f8156eb2b18b9c18ad7c08ad8b61de543
+84d1f5ea363354272e3d937a2f770a74d30910f195d337780b3b65791a0546ab
+18a8ad95353637c276b4fba66000886be4c478fdf68bdeab674527bbb86d75f5
+f05702581626ac0e693f73f08005b929bc154a5cb26f1c1447a34cf441aec12c
+e061d5c75dabf9b6055131b7e27edfa1197492525b8ecb98a74753f10324b4be
+61c87eed22b31f59c4fc0a434df9d34e3ef204268df01fe50866c937fdd83de8
+be67591219361b44441676d4e24fbffdf0fe6ffc1246c94de5de84d0e2ce54f6
+4001a4d5056dddaf20dab145f59405e14629138ce2aef7f7df4c3ac3c34c8270
+0195c65a7e6770d2e8211b5d6ee9ee826c316acd3063c634114d96b68f9e7be6
+d6f09e1004eb05a1b8d5b8602e7dcc4e9942a1a07cbce0515a5f651df70bd369
+31149d9d07e155b69fb7aa2ee350c52fec11cd82b0bd41dbe5af51b22a0d1aa2
+42bb655f8bc0cf68708f4891d0152ea90a8ace90fabedb75807baefc45b6fdbc
+ce98089dbe4004fb84cf3ca808b355a401bfb7cb0bdf3d34c56920ea7c9fd810
+1022917883c46cea4f9c53a1b735206870f51b55f688da9c8569dea21b033a7d
+26739a6dc374059371d7f0e4f1369f24abac48e2bd6c37033106921804790ef9
+8cd1e8b8e954dda81ce530dfd6b96e68e9e65f68893704d4e1d462e7fcb38be8
+9687baab78161f5e6957db5340f62b08b6a15b34574f8e66a0e3ef88db94a571
+2d01ac0f7b3971c994b8c4867c26294e63e18b06748cdf7067f521acdd28f928
+efd5ba043ff030c24f8dd60f472c254442493e4d5ba92cf85023881b5a222ec6
+5a37ebd19b3cf67310f5fb521ac4f8434ee8e998339f7fed4cb830c5f84198e9
+c5ca9e7347186fd6dc622118c624b6c5ec9554641de66beff929d05364b9ff44
+dd342e36818f8af5a81208e7d92eb91647f1b68e4bfbe708c0ea70e90a1bc7fb
+7fe7d3d81f207dcf44c20fe86ea34cebd111b7c5cf7e0c4ace99eef31ebf1160
+ac50564b361d8d039b8f622e3c4d6e85474d232bceeab726bf66b307ce147c32
+b1351681a3b6be40d13fd8da37cb71bd787b78a922f3e9f70969a716a76c2c1e
+fb6c315bb455ecc8d2475b1e61aea14f788f235f8b5a7cf987b78910b2da28d5
+288a7fdc879b66f78d5aaaed5293a17a1d96d0715e2d0006feb9a9d7e4837fb3
+91f3ff93e02ccee1ddb2b47716abca344666c1573ee338bcf35d7956b9cc82ce
+5083ef6d3155e28f8755aa7f8dc6dde81dce8c37736e78b97c4459be3b471336
+5b93671811cc5a397a4a943b1a82f712a7526d9010fd07514856505621d5d667
+68820a69f5ea83b0d810ab8ed4e5c9acdd54d4c19f958add35d3d21f7089ddae
+f69e4fddb831a94cc51f7be19410c5c6f3b0ae57026c4a2ff33bc8f91afa9844
+abf3f6ce
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
diff --git a/lib/fonts/fixed_120_50.qpf b/lib/fonts/fixed_120_50.qpf
new file mode 100644
index 0000000..95b6080
--- /dev/null
+++ b/lib/fonts/fixed_120_50.qpf
Binary files differ
diff --git a/lib/fonts/fixed_70_50.qpf b/lib/fonts/fixed_70_50.qpf
new file mode 100644
index 0000000..76e5919
--- /dev/null
+++ b/lib/fonts/fixed_70_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_100_50.qpf b/lib/fonts/helvetica_100_50.qpf
new file mode 100644
index 0000000..5b407e6
--- /dev/null
+++ b/lib/fonts/helvetica_100_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_100_50i.qpf b/lib/fonts/helvetica_100_50i.qpf
new file mode 100644
index 0000000..ac7c696
--- /dev/null
+++ b/lib/fonts/helvetica_100_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_100_75.qpf b/lib/fonts/helvetica_100_75.qpf
new file mode 100644
index 0000000..a1ddae0
--- /dev/null
+++ b/lib/fonts/helvetica_100_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_100_75i.qpf b/lib/fonts/helvetica_100_75i.qpf
new file mode 100644
index 0000000..8bd9d1a
--- /dev/null
+++ b/lib/fonts/helvetica_100_75i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_120_50.qpf b/lib/fonts/helvetica_120_50.qpf
new file mode 100644
index 0000000..f7b8484
--- /dev/null
+++ b/lib/fonts/helvetica_120_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_120_50i.qpf b/lib/fonts/helvetica_120_50i.qpf
new file mode 100644
index 0000000..c796828
--- /dev/null
+++ b/lib/fonts/helvetica_120_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_120_75.qpf b/lib/fonts/helvetica_120_75.qpf
new file mode 100644
index 0000000..14c1904
--- /dev/null
+++ b/lib/fonts/helvetica_120_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_120_75i.qpf b/lib/fonts/helvetica_120_75i.qpf
new file mode 100644
index 0000000..2078f49
--- /dev/null
+++ b/lib/fonts/helvetica_120_75i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_140_50.qpf b/lib/fonts/helvetica_140_50.qpf
new file mode 100644
index 0000000..daf1e0f
--- /dev/null
+++ b/lib/fonts/helvetica_140_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_140_50i.qpf b/lib/fonts/helvetica_140_50i.qpf
new file mode 100644
index 0000000..002ac3f
--- /dev/null
+++ b/lib/fonts/helvetica_140_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_140_75.qpf b/lib/fonts/helvetica_140_75.qpf
new file mode 100644
index 0000000..c75d848
--- /dev/null
+++ b/lib/fonts/helvetica_140_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_140_75i.qpf b/lib/fonts/helvetica_140_75i.qpf
new file mode 100644
index 0000000..81ef8ec
--- /dev/null
+++ b/lib/fonts/helvetica_140_75i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_180_50.qpf b/lib/fonts/helvetica_180_50.qpf
new file mode 100644
index 0000000..2390022
--- /dev/null
+++ b/lib/fonts/helvetica_180_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_180_50i.qpf b/lib/fonts/helvetica_180_50i.qpf
new file mode 100644
index 0000000..b2d32da
--- /dev/null
+++ b/lib/fonts/helvetica_180_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_180_75.qpf b/lib/fonts/helvetica_180_75.qpf
new file mode 100644
index 0000000..b3a5f20
--- /dev/null
+++ b/lib/fonts/helvetica_180_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_180_75i.qpf b/lib/fonts/helvetica_180_75i.qpf
new file mode 100644
index 0000000..4beaf00
--- /dev/null
+++ b/lib/fonts/helvetica_180_75i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_240_50.qpf b/lib/fonts/helvetica_240_50.qpf
new file mode 100644
index 0000000..a703e96
--- /dev/null
+++ b/lib/fonts/helvetica_240_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_240_50i.qpf b/lib/fonts/helvetica_240_50i.qpf
new file mode 100644
index 0000000..75ec4ec
--- /dev/null
+++ b/lib/fonts/helvetica_240_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_240_75.qpf b/lib/fonts/helvetica_240_75.qpf
new file mode 100644
index 0000000..ca90014
--- /dev/null
+++ b/lib/fonts/helvetica_240_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_240_75i.qpf b/lib/fonts/helvetica_240_75i.qpf
new file mode 100644
index 0000000..9584de8
--- /dev/null
+++ b/lib/fonts/helvetica_240_75i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_80_50.qpf b/lib/fonts/helvetica_80_50.qpf
new file mode 100644
index 0000000..149db40
--- /dev/null
+++ b/lib/fonts/helvetica_80_50.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_80_50i.qpf b/lib/fonts/helvetica_80_50i.qpf
new file mode 100644
index 0000000..007d1d8
--- /dev/null
+++ b/lib/fonts/helvetica_80_50i.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_80_75.qpf b/lib/fonts/helvetica_80_75.qpf
new file mode 100644
index 0000000..4293066
--- /dev/null
+++ b/lib/fonts/helvetica_80_75.qpf
Binary files differ
diff --git a/lib/fonts/helvetica_80_75i.qpf b/lib/fonts/helvetica_80_75i.qpf
new file mode 100644
index 0000000..e192925
--- /dev/null
+++ b/lib/fonts/helvetica_80_75i.qpf
Binary files differ
diff --git a/lib/fonts/japanese_230_50.qpf b/lib/fonts/japanese_230_50.qpf
new file mode 100644
index 0000000..5bf076f
--- /dev/null
+++ b/lib/fonts/japanese_230_50.qpf
Binary files differ
diff --git a/lib/fonts/l047013t.pfa b/lib/fonts/l047013t.pfa
new file mode 100644
index 0000000..475bdeb
--- /dev/null
+++ b/lib/fonts/l047013t.pfa
@@ -0,0 +1,1346 @@
+%!PS-AdobeFont-1.0: LuxiMono 1.2
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.2) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Mono Regular) readonly def
+/FamilyName (Luxi Mono) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch true def
+/UnderlinePosition -88 def
+/UnderlineThickness 83 def
+end readonly def
+/FontName /LuxiMono def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {0 -211 600 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078983 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D83BF47CFE01E54AE843C1
+FF919109F85F08DC15086C2613CD4932FFC3BBCF951312D7AC8EB70626A8256D
+9CB48AE151BA7EBA556B7FC8966221E8114D04E16C2D41159D816F0736665744
+C5AA840A8C9E4A697E288564BABF9F22155139A91877825F56BC44047FC0057C
+78C5CD71D7859D99CAD461A73C7871F7161E71EF00E7DF6D787AD0209C092AC4
+FEB4AE0EDF2141C62D4C5120EC43941E32433D8D3EDB02539B98433D8D9CA45F
+6AA67D383551729AEF5E277B8CFC1BF612583912EFA2A3EB1C1490696E3B5B64
+987F7129C7F195446A898B0405208E0943FEBF10E74DC40EA182198E60E9BE5A
+785D6DF540CF0AE65F2EF925FD27DE63269160F358AFA6CEC1C121F1EE2BE18C
+DC1237C59283BE1B774EFB9863BEDEAD8229E459BC6E2DAE03EAA3083214E847
+AA01F76B67C91AC84CF459139DC819E0575C04BEEF896208B91E6A6CE8AE784C
+E77246F7BC68A2A4B4F642AC3AB4748E352DE8555F5907B36C1668ACA42182D0
+E9FC1C228F7BB63F6B041C2DD08180D1AED8C25B136D007C6DB9E11C2367F0B9
+CAC27A34AE8EB2981315AA94AE8377875C50BD43DDB93A2DF261456B4B945340
+C81C790B5EDE5C3828C55E244DA6257D05D0D2C3274A35FCF96C19BF666B8C45
+1982729FD8C9E61FD1F81A4A346902E511732F09CFEDB4D88AA555E15C05F19E
+2CA7BB2294D9079A9182D8970ED7153C9D262F6203290D693744F86EE55CF4BA
+2F11579C681D25B9FA91255884C9A5050A15728E11348EE5EB4F370749C3D27A
+D6A686868DCF0E327FBFFB45EFA735CE9AE0367E6A239B85FD751BE92E2C7D8A
+618A08110FDFB48272337AEBA86F992A033663B0DEF168DA75BADB4071110941
+7320C0990BCA84EF516AD34E5AE14FADF3E3E44EAD46613423069D24BFE0E28D
+DB6D32D0001738AE534BC2BE240BB5BFAD1489CC2B2F6621449936C68786A51C
+02E8C179B643E401D01BE6849BFC89E896B1C3356DD9E8FCB69691AAF6BEBA04
+24D62B9F266D560B4089E20A9F35AD4A7F65A7183761ABBEE0F7EF26ED3565A2
+5516A3A5A57143979A1EEED8CD52A69E4E1AE4795F3EE0CA21B9F4D166783A9A
+F54B08B6C56703932A310197E328C6E6A6BADAA11D66A952964F31FD690082FA
+02D1E2A4512A9F274233B203FB770A3A1C7490ED630D0FAEB3066429D00302A9
+5B07D8F628F1EF4E3F45B5AFC9638A46BF1286E21A7463ADF8D870CF36728FC8
+3FED84B967CE31C5F19D9E36E707907AB3946AA1DDE97A87CF71BFAF25A904BF
+9D15DA7739FAB55835A8B8AED166F2445E020BABCBC2A84B0A20C8CD2778BC3E
+074CF498E454F752CE7412BAC70A04CCB4C093854AC72F28F0ED22066816568D
+2B61F311C2EE3444CCE402A461CA0118CB6328C7A8FB765C4A008B5DA5AB9916
+AF83CC04157B769C659A794A7C3EF8149211C0EC2E81A2FDACC6E6C2C0271987
+E8C47DDCD84E8AA3BB0889764042EFC8249E0FD10586BBA5E3C7D5394C3C2FF1
+D482A67514026A4D65B094DB94C4A8872BE1FF437E983F6F2E8B336EEA6FCEC7
+5ED6683A41C9CE6E70671A63F4BDBE846CE41857FDACE3327FF35AAADE4C338D
+528224A55C4504C2CE5A774EE32DE11CA3FBFAD628A915FE452B0B40F774AD1F
+099860E44D875F4DA0C71B9E586A7D4B8AAA9B7D8225CBADC7C069C46B465BB0
+3F558588B9A6F0330D353A8025B39BFE5ECD63F6A6DAD23A1034B09F44BE2CFB
+F7D974BFFABD8E22DB54CFC0CF46203ED59D7E257E07531D818752BE3E059D0C
+453666701360B64A0E687F8B6B06234CEC96F09671999B301174E74945BE4726
+3CF6B35E73461E18DB1598541CD4903EE143F0FF8411858E57956DB86364104D
+369FA26A999BE77F55F821932BE8C1F6995ECE359BEC8CA7232E70C3E17F0DAF
+4983A7A210F2585266B9AF3C044D70B536630411908DE81B688DFCAF9322E09F
+F0977B628FA31D986C1A66D0F4A6E8A2D7376C6C60099E31F0AEA56CC42E30FD
+DF24FEA95C859905D140824AEB9FFE0A7791C50B22E8E158989FAE39A43D14E1
+BD1617E8F13FDE3BDD86015BEC64003E1D634F3DB00520FF465705B55C18F64A
+695739ADE2508BB69D539CAB9101F955D15BA475043848600BBCB00FE0A2A53C
+C5B5C98B2B0996D3DCAE394BDB1284A6B716D23AD0714E05AD6F4C749DFE7351
+A9DA7F1EE6A630FEAA7ED2BADBD4779E7715B866EF5CD6D17A79674F3F185A19
+EC9BC0480AE6FBD2DD06F3DB4D234F938A4FB5F61FCD5E23B151E89B610556CD
+C649D036DA38897E2603E9E2A5E16116D8484A0D810FABD973AB649646769A11
+534B6C8AD5CA5BC5A38D4236DE32F33F47132143AF460828E7AA912911E899A0
+1F3C85D501D3C8136AF692B3832412113F57F5B498D06E8BC475D6FFD7DBD416
+5033544CC77111B564F7B21465B2BC0429162BA4FD49C7A7A7A36F646BCDECB5
+01E63158A6DB744B925977154927F97628D61221A64F6DF5FD63771F4A76A4ED
+D0CBF03C2AEBE2B364298D7D8A4089EAAA7DF9CD4D0632E38525D0E59F037188
+BA436DEBB3D050B7D214B21AD842DE28E6D46D273F6413FB2B9A508639FC3EAE
+21B2F659568474C617900CEFBB5243D7496F73E0EE7F4A3A0343746E7B189A7A
+B1B3974DEE82543797BBB3D093DABCEF39C27CE8AB728CC971CEEFB76A24EDCA
+564A31C80052563EA4E9F5308F070FC807CA062E26F2D72AF06069F50B1EF911
+97C8873EBACD1D974C8BD85D586DDE8E621F41648BB24DFC3BACD74FAB79EE9E
+1DBE30BA8C1671125E5940927893B2790F7760631A34DBE6CD348E5605B5CEB9
+ACF9EF7A627CBA5DB5E899BD414506329E46F0B9848F730E36553F2A35AE992D
+42D7AE4DA66E75CDD23CAD56D4C51176924D5BE94C2A974BB46E1058454FDF5C
+7EBDA1632EDD353FFFF7525193286A9AF6145E102979CFEE99D9FB3CB1FC2EB2
+570476B11EA9A19A434801D58F4318D8414439922D89E568D6E83A57FD76802D
+C0D30431821B145BBFD0126F2AB0161F103DC8F2A874238870740AD3B8954262
+55475C3BC6B1EC0E77BA8B1CBB176A8959AAF99A2969C4E0A3214D0627D7CE92
+A0D7EFE8E39CD42CC31263968ABDD978F3108C8D2F70B6E386198088209826E9
+6C31F1325BBFF8FD0E4A59327049FDA978C9CDE7D79E565E1BBEC909F8EBB12C
+6BF8505890855BBBFCEE7265519875954B9F44FB1A024C28A734BA1A03AF3A3A
+64CD95D8884B321A43F1041E38FCE81A6B2563C2CBADB04F4036B0208B863FA6
+9E88D301B364AF0F99CA28E1D023539158B7CCC48D092CBE1167817B113436B0
+7AC9BD5B0382F02EB8C8BF99E2F463994CC60A09BEA9A64E8D2CBD966140F4AB
+F361D62845F72FAB9A107059C96E70DC1E2469EEDA1FAE3982A64BC300C9E81E
+A98B34D8DAEF36B9E1F55E3F5697EF6F029E650D480D210014C8F18647EC2356
+8EDE0B22E54524F04BE37DF85FA61E3377A08E57E03B14554FDB1B40F07F2E86
+259E818A7732150B01A71181EA18AF4032E1BEE9A4532B26B9C8C063396DB817
+1A1E25A731C10F8B31A84393E9ECB4F279C884C29A5E596E08D144D081C4B7D8
+CF46E43E35EF09F56892E322D345FB7BCBDC665FFC924AD4EC638AF0959D931D
+33A54E0062C68EC1852047D73E8715D5A6E11F62837DFCE1617608CDE2C753BC
+B1CE0C4C1B151CF1FF1A4830F7484B8B1134617F6B1B60CD54B3623E518CBCF2
+95C49DD546E783F884D38B86022865E8B57139637516EFAB9DC8043A4A8EE1BE
+623EDD5DAF585F5F3A9EB96E6A51C18E0B3793AA94B6301C3473C58B11B9322E
+F90BFE890466EB6EC6A1138CD2AE2398EB1AB8749FADD587C711E18AB171A149
+D262A8EA2A462C4B0AD1A00C53F7C3D3D1C9CE8FBB95A7653113D387ED03573C
+6AE045A7190E794571972FD93DBB5BB1475EB2F946795C131C1572F187F1E6DD
+438DC64EC74AFB6B730830D835642F1456E76C3327850B745C38ABADF4E742EC
+17B3293D8C64E041EDC5750FF5552C333DF29FF5AAEF6214463FCC682254BAAE
+84C0C71D4ECBF232AC4A4DC563C819BF966C37993F2754077385DDEFCE85C532
+95B2F6FAC17A557DA24669B61997BE8D589CF50BA27FEDD9E76A19A96D1D48EE
+4A4D2905E97F89E6C08F25172E511F66E04233648C85F00F219DB234C3FF33C1
+3A75ACEDA696AD9D778666C706246428F6B0BB75F812A4C16A689C9733B0D105
+71F948225DE8A512B7B94298D38555F9486E4496389426C896BDA10B71A25D12
+E984AF2EC3F78613269F85BBC185013872B1572A799506137E9A6A271683B7C5
+4590BC0FAC02DE3E0C9AED49C5CA0E26507DF36C2574C1FF73BFCEBCD4597632
+810D07BA9A666A07A099C06E0639283F42E7EFB3FF8DC79F7B2962967107F5CE
+41CF3EAA45B092F2BC433BADAF57E390D5995B69F1E7806BCE13834433C891F3
+80694297260788AA2EBC3A0910CAD32B7E0B3E5101B5164BA8B0259B7DADFE9F
+84A7C5DC8DB864471CB666F4148991C3530535DD7C086CCC09A768B22937D0DD
+E18B1EE12E1DE6AE83F6FB9E1FB217B1D9BC2B4F8A01907A80DBB16A496B2B7B
+3A00BF5CBD2BABFE145E5E49AF9C3398605DF0589EC2438A167DD38B46D52340
+2EF47C0644CE0258457F0D24FA19676191AE2540D4C98C6764B00D6917F62C01
+276D9E04BDC21E83A59CBFC7C6C252233BFD5C0C96A004B217B1E78436EB81F4
+FC2F82B70B19EAC733BB0E5B3352E4293717DFE2DE360EF780567D255AAFACC8
+432774772791DDC2BA4C250CF314D53DB0D8DB88F2B624AF4337C19F36D5557E
+8CDE1B8703A5F1103BEF1E83A8327F7DEF9431953A9C814D067EA660252BD0C3
+BD0423DA5EDA7EE5AAEACD32ADB758D3697110DC41B6F67CC19F7435BB9EDE00
+51B5D7D941F01872ED0EDBD0E012DB3715BA84F06AD9A7CB13221290ECC5D98C
+167209DB56A38C8961533D3CE2897063DC915F84BDA4095703477FEAF6720F09
+A70F352C574CBB342C3E69EE05242DBFF4BC8B673216206B6BFBC5FDC3F79216
+F44F8E2AADC0172794192CB17A696979CD4F7264268D1CABF9F8464AE0DF3FE9
+A8729F8B6AA0B493CE015BF1BD950E9D89FD9473215AD7513157CB46BD410FB4
+E130B2CAC097335F9C546FC6F678A0C8351A9424E981F316D7452846DDA58384
+5ED585947C87D1E1271E7ADB72085C960D9BBD3BDE3321BEE52132A62A57466A
+F6BF8B639C9E5B3E57461ED4671283236D09F7C26F35EFB6D363417E24684C83
+C758B9AC5FBF012EEA6E69F5CAB55BFDA10B062E6D439FFCA550E7BAA1019636
+C5113FE61ABFF64F29118024063A4359D114E21D80190E293B80AB32BDBA340B
+065DACA9553BC4C0F1FEB1F16E073937B11413C5599C058579543DD1A350F69C
+0C66EF2D800F790222CFA1AC0745652238BC471FD4DED46ADA6226BD83089FE1
+91C7909A2FE12F5F4FB0D41341FF86465D4539A227E782E1FFB9652E853F65D3
+04D9203D4C9A93ACF81DD54FE0A4ADF2E839C997FC49927B92A99616BD77CEF9
+C77266204AF4219EA4D4EF5D974D4993EBD3FFDFF0B5D7AB0CF13279577C58DE
+726476A0C291CB406A8D5DB1A631D404FA202AFD525B54041EE4FCF4DD94B326
+40511F36C2958FDB83DFBC22D6CFECF5415FEAC44C6529AAFE85212E9F030844
+DE707696B057D6AC50EF053F5BD88DDDB9552CD9F42AE29CFEA52065F06AE1BC
+3F1D7B12B2346AB2EBB9024294ECD82B148D17D1CACED60D2BD5EC91447CFA12
+9479FBFB279ABDBF2FAA8760A54708E65EE4B3CBE671447A8DDFE9C51881A47A
+83D5DF96FEE8EABCE230209E6A5208D1FB109D1B49BD2E9278C6603FA82DC102
+CAA038525870995634541931A77177BBF80BCFE9C12EC321FBCEFB916653F349
+244B6DA93CE590D48C6DC0D673299A47621E8397E0BCB164ED6D4CD605570CD0
+AF46D0FDD920181A58A1F2236D7AE126F07723445AA36179531633F8647F88D6
+3494299041A1B7818A7B62B8B8783B97E7C8F5FA7E65987EEE8C87DF23C0B09D
+8E84BEA5B8613F0C144EE32E58C837B0A2037F51B467083EC9FDA57FD8FE5E72
+89455DD56A17275637E21AF50EBE5EB9D573F2D834B0BFC0CFD414D569D4AFC3
+C71219F52DA9A1A73CDAADA94EEABD9B14D42421A562065DF9EFF2784F1F40D2
+AF44CC68901213F1E6FD68CAE79898785FA3FC317F5D402A6697F6E52FEF977D
+1C962966D0E44C714B15BC9B613A680B054D6B64B974AD0CD6C4BA7D255E49FD
+D881755B15859CBF57EAE82406FFE8453AEC2F07C9D17A8C4D3A52B6D4259CEC
+604DBE8177A6C3A96BE29FB309773A1B1472529C21FAAFB3AF407978B250353D
+490CC9BA66416E522E200F5BAF87A3AEA2A556021354D7B74A9AB3CC0955A5AE
+2B462ABC670F327CCB53C939E0586DA606EB7C2DF1C9692FA4CAC3078A250F10
+1A73EAC268EF45F1C3369758E1448600234477C85FB11770D17C36A66CCC5413
+544AADFE34E62102F2528407ABCF5775AC6308C7E3395F9F31976A7C0CA9A95E
+30A5CBB8DE888F8C81B8F9B1A2BCC36A89E0E75B2F0B19EB4145C9CF0917518C
+0EEC1D6B3CCF7DB0EC6354B75B9C54951796C825D9D8110F17BAEE6F4713ED36
+07BFEF64033F1B1E684C6F7D41AC91E8404D46577FF16E2851D3436770FDCB17
+B53D05F1F49C5B6DE9CCAA2B11F5470537C5C80353C62346058110C084C804DF
+7A0B9134752E93B76F54A7A573FA95D6175319FF47496E608241D2E33E51030E
+B79B9E4838DDB48A81DC4DE9492662F91C5308925214E2C226B28D8264F96E16
+4A49B248594E8053F86234651DE05A0188E26BC3D2CB7116DADBBC4DF98312B6
+8950C20F99AA330B1F011370CB0E50111CA1CE3773ECE6446742DF74432A38B4
+800DB338C4ED84E75506CB8E601B345BF60BA8B49710AC9765B33470A85FBD2D
+BB0D2000FF9C0EB524F44AB6A0ACE74EDA1D46317CB2BD488B621FC237CBDB03
+B23A450B64BAB89B60FE976160E5BB90642C647A0FD609B2A6DE281A9978ABEE
+0CD7D99F087274C3AC641CBACBB0E128CC29E141F022E4A404BB25F7FD57B58D
+582D176EAADDAE7E3385A93375C8B37D11924AAF00565EF7E53C117F10EEA3A8
+24D6DAEF6766D9BD9429C84448D9F1890BEC8FE63513E5690426F85655741096
+D2DF9DEE68530E79B08CFF9C53B280581C6FE3C5C5C8D54C54705F12B1CC6C14
+7606153AD79BB94473AEE5056ED3974B71FF5D3AFD68AB651A94ADA4F84C58DC
+42F3E29D3B7423C72DDE240542F038B338D888910E27B4F55F40F11B654B4BE8
+A196AC89067CD52DEBC77E0C4CB4B387D4D7DA79FDEC55AD017E62AECF4A69AE
+F04A2CD3F7F897A50FB1ED048B117A1BED63E07A0B9645EF7CD6B91FECEB75B2
+3E4C48C9F82300F8C100972F29F0C132F3F802128B3C28DB8C0C557E0C18B0F8
+F6F3085E1300FA06B9C360681B8B5083079B79BBFD9E8E82D160E8208A3940A5
+553ECD27B328EA8425A53EC26CA31D86D486D9EC8BDDDCCBA4421B050CBFF54A
+7CA93679FDD917E46A288060E42FDB60BCB784FF90045821410FDD246DE7F240
+8E4E5F9EE7A97945D959936D692C5345AAABEE0E739C8BEBA85316649DB457C4
+308CFA1AA2D107AFF0EDB39DB5208C4F6FDF48B053A1D7F89C473A158A031213
+80B96B47905A4FF806CCA81002C3976A4ED1849382ACA1BC62940D2F2B5423D8
+FC67B48D387B440A04C2051BB75B24B4C15F6B0665988427F23A3CBD576436CA
+4656A035E9CE18B233FFC11FFC35A88367DC48D61512CD052824B2272A92304B
+5D04D414022E16FE3A86B047194B7A0A29DA9E2111A575ED97405E78DE606058
+24E00909DA25E9F50E335128969455E6D3610F129C46501917A352E5F34C5C30
+8B5E67B07E4E6886E909FE8DBDFB2DDC0D3DB1F4978326A50ADE74998840F3B1
+5E82C51F00454B57DE06854A58A38D34B5B7197F46CB9AFAF975198C7821029E
+4CE991BFBCA3115EB5131414640292341979F90CE55FE7D737BAADBBEFE37D14
+F17C8D795A06F04883E3207A1E72AD520B22DCD826B676463DF341E365C3E95F
+58CC0C17FF5E13DA0CAE7601D5C09D0F5E5A06BB0452D26D3399AA084D88D2C2
+AC9DB9261BDAA3699EC899459996E26EF30C36B636B18E5532DEFE9EE1157949
+D719550715D577C1C541EADAB9564D2A5A8EB242014C65764002DE9D1368A3A6
+F7C2B52411EC39477E94FBD8E022F9B3392097953BE4F90F6098CF819CF2272E
+5D4A4C202550F1DB1D98A097FB8C1B1636C2E90C8E903CBC9461066D6D4F9694
+C8D0452C4AF2EE38513434633ADB80E1CEE43F90DB31DD3402A9A8F79F9E4C6D
+4CD4F5F4B8256B973923766DDDB1241E963F456273A768608B41B160472512FC
+5F708B6862C97AC5722799EE650D6B94A9CC66483FD6BBF17282C1EF506A3034
+7751B8CBE2494884659CB9B9E71126D50F2F771358C7ED0038C67721E4DE280A
+91174C08D3D1CD9CB02D52EF619EA3BCA6304A8C64D277BB7679A0E13E12BC26
+5E251DA7E103F7E82436FA55F5CEAA984B0920B415D919AE9698458E336FB257
+2E4A4341A2B26C69FBCBEEC84E608777CFEC5C099C912B638037C7F47828F5E1
+D47957FBBFE87A5A7B5454435510D5A79B769EEF11199C6A81E64D7C84AF6E42
+80C3185BDB0353584EDBB0B8691505CA9B69321DB43B9DF3F19E0A509EDB55BC
+0D1BC93EEDA436AC29C087835CB7DA098813889261C2591DE2C20672A9260E6C
+F7AD215E722505889A98A0FA33D9C3939B5FABEB8598F413A47632A029D99E6D
+1E40079A737A6EEE0D5DCE9776746448B4DDBC1DB82075FF8370512BC31F992D
+0C1865E1EB7B4A3234EBFA45B5DFD2803770063E06F54D07DCC059022A2F5793
+2A87A7E516B7B69099328F1274B491261FA9118F4305814AEC9154C48C2E6E63
+96C5E315056B50F5FAEF68B76EAF217AF680340A8FC7F91B83D79103E1B168C7
+6D90577D2E151338A287A5D8F6D45D21EB07D98D1445157EF9A970858E80ADA6
+30F63B956FD01971FA9FE829E99D8F460616C4462215CA40B7BDDAAA74EF9CD2
+20E86A2234C836201A7A53E511DB8C7DC430CBE22BD1F93E9010C27957A20FC4
+714981CFE0EB619D9A84E1B8A1985D5B638FC686FC8738CF790D91D97741A74A
+FB39448D99ECB58E7A7A5C061DEB0EA250BD616FB538CE3F332E455860536EA9
+7F59962BEC3D23EC294302604305C544616D3245EF904D6A62517BF85BA33090
+E68D5AD9D974C7A97CC63470138DAD63DA0FFCF87FF4476EAF26DD7C1D89B330
+9D11B5E451B73F5F6D254939EECBBBC90596EF0EBAC7D2F6A423F44026DEC23F
+70356D47F2911351B9FFA5D17B8A5D3100BD020FF83FEBF040FDB8E179C74105
+376613C15F5BDA64F18E162CF868DA0862F89883CC6822B266C1EDC84A2A5A76
+EDE519E849C2794B5975E968CE9001D823F33FD56E14E857D1DD6C5490EB678D
+80B66AC404AF5C25C00DE8FD8B811F68019A325BD008FF2758CDD0CCBC65979E
+2B8F2CEDA715EEC6EF000AB97CF24F5021F0529C8E52DA2B05278E9391D0E164
+DAC055D267FD3403237FF9BE4D30660E192DC8AA46EDEC4230AACA029C99651F
+DA02296C4A7F48D3FA14A66A46D3B2C4EFC585B4638DCA012505A09F6DA59875
+3C418609DCCF6EF10336093B10BAAFEC6447D8820F7F1D2BF8A1692D3876C8CD
+2152617F95BE5E507C9FD85B65CCC9716157E15E9A9A163C95A615981F67FB83
+B9A30F47E660766CDAB3D2FB5D4B32CC38B1EB62F4B0E3977EA0CEEC21391C6B
+602EDD051F432F219FC7EA421597F67D09B713DB13061DAB18219213F340E5A3
+CFDDA5A71F5FC87E6AE0DF373C0F4B38CCC8A69844740E63E17E526B32718E4B
+E1678F5B1EB02F35ACD314962D7D0111369142F1F318CC5CB72D21A1749F3C80
+744A126E6FC8875FF8AAC49573E9D28CBF5EEE5EF984507F01F5B56C6B2B9012
+F5C2D8C85BD09F8548D24095B691888C39ECDF6C1961DFFD56FB055ED7C620CE
+3E680603440A9368C457C95E340130B86737C1BAB1DFB2DCBD14A87FD61359AD
+F633434879EFD38A7DFDC11F935AA0271875377A39346F4809792D75D3D1A036
+DBE9C6E0F4BA355EC58E46A7C85241D72D3CA87B2E5BDEAB24BE6E087CBDA69C
+F5507560D13D13510640742CB19FDB451C2A313D3FBC571CA74E48D20FF8C998
+C30E56C2142EEF490F5F88F694708AE7251AB61FC5A55FB1BF6D975F750124AC
+21CECC1B8A9175BB8FF8EFC8DA34C873E5C3ADCFB3AFA3EDEB4A4BAD75CF63D8
+4FF86FEFCDB51FF7B8887E5C2E4DE36201AADAB8BA2671F2F7154A157D1C9700
+7528B1B9509C36428E277BF37A097A281F2D9ABE1AF16328505A265A4F2B8F9A
+E0D8F6F391785358835D5D382FBB2BCF5839D78EBD49A104ACCA215C17877E59
+B438ADC652A2130F5E79D4441BFBC63CA8AE9D6730FCAEF12C92FCF1061D0E24
+83FC035789A10DA0FA865CDDCDDFF7749D0723115D869E6DF100057E2EFEC85E
+1BE6C671205128371FA4D39465FE54343BC195498F3EEDBCE65B913E9A45F96B
+5591241EA325970EB5F2CC9791B632F057482F8E1309D3A20A52C2398BC96673
+8D6F30BB78E4F55FF4339CDCAFA8C47A4DBE00CC0A3548B1CACE66925427B900
+1E6ADAAB861EE413B225C26DDC765B1EC7DDD718CA0AA0E7E0B92A4F11435E7A
+BF6F106538B016EC5C713774BC3D71663029E0AD2D02674AAA26A91A6D048D2C
+8380645767CBFA882FFB0F62B5452AB47953C35DA3CD6F178B5006DE79D5CFDB
+7CB628E29C3BA71674D35F346488892F0C1FD53B47B8613BCD6FD8EA73BACBFA
+15C85653D4DAC9924A324423C92638D93E2C9DB9289271F7DEFFC67C5CF3DBD4
+DB5997D9356A4086B5D2041EA33C78EB7A4B8271840614E5D9021448C93CCA50
+85EFFCECB75F30B1466869558851A9190EF43F6C25EA419F02D0B4A571C62454
+2B5AF2D07841904716A18AED7F49DC7649704FB5D3154D1BEFE2E47073D9D2CF
+40D1D6EA1D0806ABEEE7803DEDBB65F30E69E0EA7838BAD0E878A86359529A8D
+716C6123D5BE99ED71A47CF92D27EF42F8BE0828261054C62565CF6DE988943D
+0E653E4A4E2EB84AC004FFCFDA56E5444E36B1BDF8021DAD38D68975F68B96C6
+AC7DF86DFA8B06E85669487FF3066DF334BC3F7C7A0A7B728653D333C901367C
+9434E3517D782B7DCC366E5D1217790F14C87839E0F820A7073E8E7ED430B6D6
+50FF6E60F50E6B4931ADF0B9C796D47CB44C9B8497D7AEFE83DF411DEDEE59F3
+3D9D24C893DC7C9727691818D856A9974422AF79A32AEEE7F84EDE5FDB53F405
+0C4CF8D19DE038DCBAA6B67621BE99979BC8D08801682CE7A6BAF9AA0920641E
+19F99686191AAD34B84C6497D7035DBD189A5D868721EB92EC73D62DFB0E272D
+6C9F5048E0AD5AA1E8DEE499ABA2F8D891E5EB8BA3BFFA54DABF3B16E439FC34
+2AF610DA9801FD977A102A136DCD03342ECC66E68B983E344ECABDF95387D7A2
+C0F749E5C9F5D71AB50B9AE441D7053332CDAFEC4E57FC1AFC794EB367307AB5
+750CB771BA33C8591D4CE3D0E8C4C841E3FCA230602B4609F13433CDD4D0815F
+7059BE698C1F4DE0D0297AB43C3C0B6417CD6DA5629BB857F4475DC30267D831
+01417146B0C1C7DCF877E445FA50C2CC5A433EAA684798E2EDD76EF9BCCC978B
+1A6473F2306C17A6B92A53835E2F6C64AC1D129644EA310A920E420266CE2648
+E3DC281BD364B5C3EA9933EC57E55FC1AC534FB4932C1764D84458F8B14A9D18
+3E99ED71B7D67CC839E9FB4747D7E15EFF60EE9026598D7FFD39CDFC634F6543
+4D538D4A33A5C563FAE46EDC8A7D4F7B62BF7538694CF5BD427E01E60CCE30B0
+50F2890260F7B8B82EE310C5E20E1D02310B36B76864983A187BC6FDDE8B1617
+F64C971F69761AF5C6CC550DBF3C80E69BE8B2AC311B727AD651665EE53F9350
+D472E4CFA202E95CD72AEBFED28F411F9B7DC4C2F7F9FD501B214E9950EC3F7C
+684BC28D0A8272A769209EFD48ECF6A633511388F5738FF97B84B7230C78E9C1
+C76804160BF038CFAC465E3F5ACA33E2CE853F0191415EA84072F9E44AB09715
+950013A33EF8E0EC7A9A7B7C10BE0DFC17082ECDD1C3D6E108F098623008F3D1
+6E926ECFFD1A0743FD695D52008925B0B031C14AB64FF996FF6128DC781FDBD6
+ED3C9B0E80E49B36B3C4812E9EE63A70C689172C65687BB83BA8E7916772A06A
+D972087B74718FECD5E32CC04FA76B57915DC0827C9D387344E72CB20E373325
+66037392EF2D1E9B7AB58609145AF02EF435A2EAE82C06F29B8E736F081D4FF1
+992BB239C627BD9CEAD20D82B9675B70AB6603E4F932B3AC9281DF73F2F40F52
+C2FC6951D6EAFEDF7F02BB70E1B5684665DC0AA3627AF05FAF58031D6643D0CE
+A54F11E2D07CDFC9DEF212ECB685522C9D6F6D6290D59677AA606313D0F44812
+7A4A7E1E2C992286184CE893B4A89FC32BAB2320BC3961EE4B49E9351C2B28E7
+0B28A837FFCF09E2F6054902C0BBACE191453FF48D6D0B0190BC3BDBE365846E
+D2A8039ACB5D9673C50C0AA82BC0FDC339FAF8CB61DD5E0BF5F18B9F979E3442
+4CB364E6D9AE720DAEFFE1A862C0A68EDABB17C4E43278B4A4C98C08D975F62C
+31836B3EF8912D40F1D211ECD3FF967EB36F332E3D8D7F7C98D7B4A57B373418
+C5732B949E391CC6B7C456E72E6ADEC949E603814467DA7D2AEBFA32EEB1A039
+ED79359CBB060DFC9782B28B7481B356CE2B39605EC6658971360EED1C72A524
+A95FCF684A44781D103CCA8B11D4390524D1201B68527E60EE2CEBBB3CD45E74
+9468E5A73EFF365C05EF520230A52BA4FD53405D08752D01613029D77EF2A7A2
+05F79644E955660CCAA3F2CA5E58ED822F24E73970C92562F3AE99FBFB7270AD
+D588318B44A214CC4DA5CA6CFAAA3F70FCBBA7F0B40767495A2F19599F8C4DA5
+A055EE9BD280F09E693A3B196A37628AC7115190CBFA9CE5FE51B5BCCCF86DD7
+3B2BCD92FE8F51246D0CB193661F197F9D731A3B719D87853D1BD267A16C391A
+9D4F1E8C16818DCE0D24F7213E3A140C07F66E465BD7C1DDF762F48633464D42
+7B8529FE6968B378DD6140FD636185E1C58C4AD8FC5FDA1F5D1ECD76E81B2515
+F29BD82DE369208FC9EA8ECA3704CAE5944CBC74FE076852658F237F3AF02D43
+9E11DC17C900E66910009893C751E74E3BA60B95605DA55CB9ED4EE060A34859
+7D0DBB5021C15E596361346E07833987845FD9AAB8FE403C9455C21B4947B978
+00840CD11857A4979208E2DFF63E5EC4D9435E297CB1EFB5E022EB30FD1C9508
+C26D1135B157259FC7E6B53094F4EB7E50BD21979F428CA996B438D88E02BAFC
+D1C2DD524879A76FB96C515F18DD3BD49A9BCB9B6D5BED899757BE7E748D842A
+61B916DF86CC3CA1431A9D3B6F048BBF4F348A70E03EECCE83961F7675CD8821
+9241C0DA67E5BEC09EBC3A4A16DBF7F42FF35D7BD3EC21B52FAA4D1F6A446721
+6F9D2C770CFD004E830CF11BEAA35FECEBE878B85A3A0D13C5EF7FA6999DE090
+3CA1A7C149AA66CEE6AB31E3F376AA4D3CBAC14BC612D5DEC98121D32BBCA0B0
+97BD77384E215A3011EFCDA2E24B2866C0CBE8A3FA646CC1D40F519D62A7B6A1
+10A442599852F9352221219EEC7873DE48F0105F95AA4BBECEAAFF33F94BAEA4
+B90C5A44943E4B9502598D260476DA762FD3F69CF92CB3FFEEBDCC3A333CFD31
+F5893F591CDF7A14412C7B6B24FC6451BDAFA0B88AFE3BC385D30C9459BACD7A
+4A50AEED28243A668562956006624E4F557E942212DCB86B114C5F88A1064CAA
+FCF7FDBFBF62609E114E9E1AD40AB62F6D638D866F278860E3F89A4987CDB130
+2704A70DB8C42D1CD9BD22A1494B52ED3B71761E459C30492601ED712A9A1751
+CE57443CCCD28E6116BCBCD227C50437AC7812E7AA9166AE6C0078B7695B4853
+4880007783A978B75D2DA6CC7FD83B1E7B07D55078CFFA0312FBA9062B6DEE2F
+B1093B47682FB325F3EDCFC428D3D56DE67101CEAF945ABB8BEC9A9B223C092B
+A322E0F0319495EF5A6B8F5538CF76C538D5D57E8D05945412B55720ABAB2CD0
+14FAF4DEF7793100A21715F4AFD7B9A2EF18A633F5767DE967E03954A7052057
+E0928F7A8115C2971DE3B14FD72DD75665525EC2DBFEDBB3153B7CD0B7BE1E5E
+A74148D557436C3F3780C8DAE74A715A41FCF50B069E45D3451BEDDE480F3689
+0E48EE9A64D35252B51672021805C0D7D76772470D28616B7E760DBD09C52A82
+D83AA682F189222CA3A01889E016BA4854B1ACF2121ACE59DAECEA323F9CCC34
+5644FCA6B0537595851B12A3C1E159D5CC40E9B632A941EE0AFA50CFF3E26575
+A3B799D850DE384D1BCF84AD581E30B0EFAC66EB8F4FE9DCACA0403F2F42BABB
+C6E30BD7ED53FCDD893606CA9F41EBD95509EA1448F8BF76BA545B3AADBA02F8
+9591452EB3310AC78FD5F86BFF400475F9680452976D717374C62B2AEF3B6115
+53885C26E4E2B35C58847F36B825CEB631C11109E5E9EBC52918DE2A9DA5F3F4
+D2350E2A69897FF8E4D148B2F554F22B95EED13BB4CFF88DAF7CB8EFC08C4D0B
+1A4DE99652B29BDA1AD6C58FE3626A1D31D0FB3234695835C33EDFA37584CA48
+5813347EFC28237649F5A29775D2681CF949130F93BDCD16B759B44EC210F457
+E09F25FB0368E4D98209EAC333EE2159612984F18B8F06DC1F7E89F2239CD7B4
+43FAC95CB2EC0881218DD3AB689168AB4EE907E09490DF361A1BC1C978C7C79D
+6FED7176C2B72C3F7D64B01E635C404C6CEEA25FBAE5B5669B5D089B562B1408
+D5FFAFE3C1C653A55D6F1F6EB4EBA1A56F8E255C15B41C6992E070B1DBE872E8
+202F7163E36C72AC78DD56CE8239BF3198293006BBAA89707D90E4C729D774EE
+165DB7FF5988125094175A7196939017EFE1A2DF1ED89EEC5309790AA50ED3AA
+1B310BD333BF2970CFA038C3DB87BE39CB6BDA17706D5508C26C9F8B4FFECDD4
+43E098165E0D0635FA8A54C2776C655113E27FE1641E1738B13873BCDAB2D922
+85698D571A6EB65A8F33B3AE27DD12C05F08B57E307A7B55561805C0EC855E44
+99B73DD02A6F95156A9AE5C64B677DE5339D97F19F4BD75D4A1251DF34EA169F
+5E5EF8C7B7D1043BF75E80212D05B3C3A9161F68FCA385C1D8553E299F9E2DC4
+EC56F08ABA3B8F692A477595AFC231A319410B97C5A34ACA08133BB3B5E7D449
+63DBCE7A0404711C7CDB14BEBF3405F1AADBD8FE13D8423D5521E11766EDA4FB
+8D751F78D4E012237C0F90B6F8FA1E42EA550FE5BD856DB4CE9F84908DD27B0D
+452373A9CC8CC6267A6C8B8D5B253A7F930DE0A861540CD3D6C5B68B817DCDC0
+11074810779B2E243C444DD60FA0E165B662FFB16418DFC1E476BD40549C09DD
+EFAA9752533B315BBC5072A3671C294126A8D4DE746CB0C61499577D3AA047F1
+28ABACCF06BC80D32B76D83C4E4EA743D61BB4D8F6309C5BB8320CAE0D0E84F0
+F5E407311074CA8260A32D676B3015DFFD9442D9F3F5E55C06982B3E359D2608
+8F918A354373C5F8209CD51BB8AEC4786D2591108D6EA01C0CD335FF3D007184
+F056535B30DA59FD9916531C9AE0EE69F9851784E3D79DDF5502D878FC92B08D
+D94F0538670EE8273F0AFCC92CA9B34BC71F06080DFD08DD0BEA5FBB4918DA94
+1AF17468F57970A007EDC44E7D095C66E6325A9C55BDCB1E4F0D003BE568DFCB
+D49D0C91EE3DC0514CBA3707408B35428689AFFFE60EC051CDCD04F8DDE96BF3
+37DB8DA3AF0587D4E1F7AB4DB221EFA93094BF7C8BA71C66D41A850C873EFC6E
+2B0FFDCE7524BBFE592D7C5FC27856125209A19CABD8390E436188984B982E84
+EB38C95514C5DD830ED54908C08B5076E174DB8B3A739780B96C085245AB077E
+83734DBAD19AB141ADB004B4B2A83A579B60EF3DB586F18DE7636692956290F7
+2DF3027C7E083EE457D4AE6CC35E11C90405304D9B74E0455E0DC2ED84D3223A
+476C7442336595FDE7F1D9CBD3B108EFA3F5BAA7C3B03FA2AD9D0BC7AA2C0160
+4DD87E2DB156E11F0410C59556A50A989ED90F37A167349B9971DCEE6F840117
+7A985EA44452A62A69F2406F0E0D781B7D52575171190D42F2156C67BF68F828
+1947A1E79ABE287D6A19C2A2003891AE956BBF4F18012385B249354093DC1692
+8D7B068CF6B371CDCDC742A20AAA4CA6DC052CDD2A1A3292352AF976270951AA
+7BDA8D6A408A761E73271A77E4A6C299161FF3E2292F77E8D319F5A39041741C
+FAE69BD1855A2DBA7CF238F0E0F3E1AC707A420D40ACF1AF5D79D268A01106D2
+27AEB0E25D265EF85B6C4715F8B2169B191FA5666C369C3DE090D352DF99FCB2
+A359992F5379F796992C77C4648B74D2BCFB70D2CB88644E6773B17385767C53
+63A897E259DD25D1DEC1B917270E9C2B90432343A02F62A3E864019EA3E48350
+482ADE56458C646DC3213CED67C35798718467536C417EE7ECDE3D968E5E6E80
+00BC3317067F615FDD4224B8A4A6F2D063799818681FBEDCEE6BF532FFC9A4C6
+22E99C5A3B6B3B8B0906E19934E7B4768E4229C9993DF93D279CC08E624D76E4
+97F5C8A68B9B0A3E20DB1F97AD62A9EFD0D94C86D5F5A50804D93680F7875E8D
+CCC5D9720BDB031E76C4DE35D408282506715C928C4C7DFC1CE7B569830E8158
+C64FA2D3791CA5C5EF2FEC2D0E7CAD0F72C15FBFE175C3BF768A011AFC3FAE97
+77F15B35F618B040B5DC4A6D952C947C93BFA3A49CD7660548F0CB67E1B7EBFD
+B02F89B429212C589DCC26E8D0A862F978743FE67E6E3CD80E9EE36023A90F9C
+6EF66BDF100B09613E6903BD7BB4893757F772842C8E71E01529740A453A5FF3
+EEA0FC407143610F244547C5EC06F18182014EBC167667B1C3469C5E36674DBB
+CD9822914244A3FEE18C6B145EE60C806DDAE13A827B1BFF9DA3C5D7219689C8
+4F425601F01CB9E15D67395A0D571B3B189818822E6CD0537C661DFAA8852E56
+1DC02616F2CF080976E48997C2115D1BDF863473D7B76953CA6B52F23F7464BE
+50CE2C9875882D265A9DD514E41F3CF44009F5B71E1F52D09261D95C025F1D51
+924891EBC45A09E1360D062CBD2E65DBBDC8BC92A7C3BF8FE1CC570AB7CC1691
+129650C975F1EF024D54FC934371E605C47E06803D85915B582E86A3940618F0
+6FFFF72D7369C2CBE7A2A5A1E2DF9373BD3C2D76AB12EDD4F11291781DAE2F6C
+E0601144B6E3AF22F5723403303887F1A4EB9EC17A3A0AD2D020EF2FCEEFFA9D
+EDE73E93B6714CB34307B11763A1B833E0783F918F72C508C529D76CBC4F0AD3
+EB9D86EB288648F2857D546E8FF022B5B0B039E490BE97025DACEC16D8EFC44D
+3D2D45FF8395F75EBA7BA973ADB7EC73C539160DBEA3E380F875ABDA51710054
+EA6D478B39E06839C5A163BAAECD19EE086474D9EB302B818061E1E4E6FD1D12
+FF82DB6077D6D6C99309A225074E6E8E92256042E3E88FCD9409FA1E19E90047
+9697E4AE194F086908F91B8D34A649C060027CDDE154E9DEDC39D9F6AA90C217
+2DED68743609DE718C75FFDC92FCA076BE4D0865A249BC72000F94E4F1D03FF2
+7F13CB176E0DBEA521BFB4A536E8FE36639ED3EB0CEAD041DE6455138576BE7E
+41AB953FC3720AC4F3512BE290A5E2D5C63132E1B0D56ADD8728CD616117EE12
+066D4E68B82BFFAF18B9DD91CB69558534CC419E600EE3E670250D0E19F2FA17
+A381077973542A10F6182FC3D0D250C24A2BC5C2E3AEDB7ED3FA858D558EE47D
+FF81A4768A9A233AB11C844035ED5718497E3395F0238686BE00D975CF7ABE92
+E0C58038AA7B09DF68EF4C559ED91AF5A6E607781C7D540BA0C77D4691A475B7
+B39363B6D7CB872032C4C8E382127B0756E0B91BC6F87FBB050C630453C08493
+AC24F4BC8379CA871515C8F503BB0ED5CF55A6C7BFBC7A09E4208776603447BC
+068A016CB63AF338355B44545B4D9FF234403E858D2CC43584DB031F8EE38B3C
+2732293233312769A0A984ACD721FFFA24A03AA9A00CD1620FD332EA6421C40E
+F4E917FCB00638E8B8FCA62228DE95CC02CDCAF8B2A43BA5950881BD7136286F
+BDCE88C3BC964E268D8BC6EBA1D367EE179CFB277778F20CC21DF0DA363F73FC
+A0CABEE965599A00FB9DD52C9E5EC85F598CEBFBC43C6B1A85CD6A382829FDBC
+D65E57C80AF9BB8D33177C856F488A91F6C97D89105702D9E36D3CEE11657DE5
+848D08C6F777ED161CF596C2C21DF22D5CAA13E9FC2B0DA8847C63B78E9D8239
+B48EEA44A4C1D17EEF695C8ABDF5F688B0C71537BF80146CA2DBC3030CA9D942
+1BBA232834D3220B5DE5452109AE248D0F5C87F26813BFAC6A953C49C456A74F
+D0840CB8E08AED6E07BFDB69AE6A4E9F8CDF872DC0D05D3CBB3EEABADD5428F3
+2A6E7C217E8BA597B225A08BAAED70C35EC9FFA8941D719B6E228C3E1BC94879
+FEFA33CA8B6941981A8E1DAF8CA642C7A6932686EB7E77BB54F4477290DE593F
+2AF063542CF48F8C0D92548903DF4144CEDAC9B9A4E83824839188D0755AE284
+07DC1C008BD7102572EACA79DF2F069BD6C53818C64D855F2B8B3658BA55E78F
+391BCD00E3E517B5FA7E738B10F304E917522BF4AF52AB6C799E1839C8CF45DA
+28A598DE94B0F4101C5DC4FDFA8D22B53A0A9D557B8B84F8ED6B0ADAC375B837
+346130A77F0B97CC46ED60A454CA958EE065584A0E3BAFF867CB29889F60BA44
+AB61DEA85910F12CD0F297EFDEB244ACC85537514159BF2277996C674D9B22A8
+94D2A552AF8556F487B6357F59B3EFF328F675CEA434F5780C1C59E540942274
+D6852E2461EC38DF58D6173EFB3A520EA6E08A6904895097746177A1F2676225
+A229432E5A44B77909A74D1300BFBFF446AA4394524F93F4621A10AD5DC44722
+0A0F1B79AA194C275EDAC3E6016E7FD5CCE9A47A493CC0DC6922B639EBC98EDD
+C906452E37193235127A6FF5F873691F98D714AF9E834004268D85CEE5D87D4B
+C9CA8345487900A16AD97243BFB135AFE42A138C2FC26E7F7C2F3655797608F6
+A722BD7A87880E7F7B18E61BB5C780A62E81578C2E6EAE90468CC53C16D34888
+A41F542ABCFF5946A475CE31D631010238C03288ED5EFE6AD0A08F5698A55CE8
+6202516ABBA71A3837168DC0F3605D7B5FBB88FEEF8F62CF8014F0759912E0E2
+883134B6D916A436864BE76727743F4AF4630ADE41507AEBFCDC4BDF1B09866B
+AD6C12C854E15194E756B96D2C9F986154E767F4DD73ABD97D31C0C5619B5CAC
+6B8F9F709BEA5A9FE2A94B70C0B6E0DBF63F849BB253EB68F06E43513EDD6F6C
+F80E10D98D348DF6F6FCDE5F0C20030A05AF703A5F4EF72F09313E7EB7450AA2
+BCC6386463FD43B51DCBBD2F585DE6AE64C8C0A58A06C26377E917EFD2477F9B
+0C084ED099199C387A3176A2DCC142C8103B74275F997C4E38BEA75F25CF3594
+079939BFD5DB439C24F25E5D900353EFC3A71F9E826D8019148495B692137587
+354E52E822609639ADDA15D9C466FDD5E41A6A3BCFCE8DEBA38F3605B4E262DD
+3D905D67B680F04E08208A21B7FD8ABF2D41D46BEA9F5697E32EC9701DC0F395
+B41101EC847CC82259A5F603ED6D8B311CC68D48BCCF3F88D19C2414CE01FFD4
+DAE254116363C032E274B538712310F46C2CB3E54F85D14D8FEB6751068A5785
+788CE873183B60997E0D5A0E54848383B56020F7105B5FFE278B66D7A4D075B5
+B7F02D7BA1EBDAA9EA32EA5953591DAA2A39FC9A72C364D0FC44D199BC1D035D
+F5131AA54AE791A2223AA3FAF28FC36ED32F102935B728BFAAD51EDF8A379C22
+193172FD86F26ED77EED31405D2C5A964F20FE631123DD3EA41CA5EE1A6A0113
+5B6BA096FBBEB694E813C3B99672EC808A0909A9AE96A68C0B960BCDE731A49F
+DF5F8AEF17D96B253E80064577DBEF7CCC237877477FD25650E26939CAFF93ED
+A7354A9FB698D629CF1CEEADD41EB09048CBA593A6D2698EED63F5281ED9CEAC
+4F6D8447BDAB9573AF6A69326F82A1D28C1D71B5FBC6BD0160D5D058B3368F16
+DBE9BF339018ABFE4B1462FC12B5AF34D94C47F8FD72320A2CFBB2B5C6D871D6
+630887B9022B75D603DE136AB08A3DFE989519EB471C308BF4CDCE9895092439
+190441AEE9B95D976F4017EDC3E2FAF831767543507A36A011000F889C75695B
+73B38DD95EDDCFE98862142096DBD55100715BE46366D0B4C07B41BB86D33CD6
+6D069C60B2479D512CA1BDAE44760D26D1E1AFDCAA882EF6DBCCDF5C8C9C0351
+55C58985B1E558EF7BE135405B3C6F436C4B601976951BC2FC021C95530D4962
+4B1AACB5CECC35355CD348565F2FFD9726CFB074F1AC582B433D330560B72DB7
+7E1DA2E2F92E695978074DE5ACBDE9B3BA497249A6E31629FF041E8F9D1AB785
+9954E01AF3E318B983E57668D6F9A2C71CE7744BEC3FA216ECE3740D70445691
+FB86F4181B0F8DD0250A0A5FF42E07018D0F42D2C052751D942AB2ABD417A219
+15B3F393CF8567EEA0991F9C749AB79DC9CDB9972EE564AC97281018BF54C116
+F5678650A7C0408E4CABDF28B7BB84383B4DA3F3B32B54F1B01972EBBF2C540F
+AB2C85B4E34106D01593D680CEE680B83E335DFC30951100DB3B2F1DDB92169F
+86D88093DEF5FEF12BEDB7334DE681043A76E887121AF90AB152F6B473222355
+C088DBAC06100F32F9601C5D76C7E2EFD238C3B1F06E91471E2E31685E7296B2
+DBD18DC081E23C608BFA875F632C9C2943C10EC6BAFE59F116B1FE4474FE9B34
+F1F831767543507A36A0110017E3AF059AE3AB77A75F4AC116131CF4CDD06D1D
+57A80FB17CF0608A0D00E77F7769C2278833EC936584C62BC403E92716EEAAA2
+E4264AAF7C0340E1C3BDF93090E2E9DC77541690BA2CDF850F9E1A967B3B867D
+1961709D9D3D5E3D0D9013BAC0D2A581E09E7F2F4ABF073BDFDB2BD0FE1C8162
+B1A98B5AF8382481B511AE0143F87BF420EA3E4B82D4672D449371F4E1AB6165
+36583BC5A90CCE79572D8E6A3C6CA0FD46FA494765FF4351F6A773D4EEFD42B4
+A2A1A24DE128D63457808B5CAF5DF465C1E966923DCDD7E3099A8D43C3676BF1
+9E3D6B1E7D996664E063E0D51EE85CD6AA56240BBA9DCB5485888E3F7436E467
+8CA74F68060D052110401E694AF6E016184348EF4C6FFEFAA073498205527B2F
+51EB6276E8B1A483ED40E46D10D775E5E9FC3A58DF4E4BF7E7692E61BE18F517
+BDD664E28E4EC5C6F53AFAFD18CB2FB7F9F4B2A47CF529F9536637875AA9FFAF
+544A50B142F015EA16B9A1055B5A15F184E4F6BEEDC245455943A3DF312D7F24
+9EDE312CEC2160BC7A169D3E9E6917FE7E795BB1D3D2733F0E77B5D265BB1DE9
+4641C27B08879B89E76E0AA7DB55C373637EA09C358324C9A0522F6E26B263D7
+2022A0E788DEA549DE6A1C991A3BD85C4EA3E71C2B461BE7A9121FC09139992A
+B474CF3732B8EDA9C38F903167E4DD3B35BF99893747ED95A0494141D3234970
+B9D8DAA1109F6DB5122A23C155A988FBC188C5A0E7540392C039A6E7C8553473
+7889355073080E32DD4E529DC97F6E7040C5DC37214DB4BDEE26CBF1E2E2E7F6
+A06B7D9E86C7561842B61A3E5C4B94DCCE011BCF92092A00D42B1A3B3F799F58
+11A4C8115DB64711BBA4AD932297F91739565F38A7FE08025B5CA3C479E39588
+5657AD3849A134F035FD142A263A1A68902ACFBADBC4CF3E64A10064C5EF7B5F
+A8C5B11EC9199E75B83A1BF891B2DB8B180F75E942471E7090E9E78A97507941
+9798D4CA52DEB18C09E4C4B24D4FB511681732E021342BF769437EB266EABAC3
+9332C3008375CD804DBE03AB0C9B5A29475E6D8C79E61ED661819BE50AB9F1AC
+81DD036968F39844EC50555A5DE8345382150B2693B607A67E0AEAF3DDD09858
+7AC8D0A3FAAF552F1B224F0BC57B967E9988845C61AA68AF74A3DD5BA00AD7EA
+7BB4D503982779D7397B566EEDDA93D4E3FE0558EB8351B7F15B4BFA39351FBA
+0EA54BB0FFD1D31E22E8C00BB3E642A64628C51A5CD3A4B9AA240B1E3EC4F597
+9A1090ECCA2120EBAB4132F0D81B60A1CEBDEEF87161DE49A707240A70F667CA
+5E78346070629D8C4480F9FA4B5026FCB7C48A149AAF3C909A298FB39CD6778C
+E1B0B400B1E2EE7576DD50E082E84BEA93FE08F884171F5A3B402C29D373CF5E
+339D8988EB92A5345CD6E10B6B61FCBF51E881A1B64C40BEFAD5C72C5DA4D219
+C4F3D0B68FAD2EF1626D1659DDE8EE66FC9D7E65F8DBDA58151412B6D9524777
+F9F1657AE4CAF358AEABDF7267A724AD62B4D006C463B44221BEDA0C08CA934C
+5DFB1C77B4A6A1F8A56D91B1D9192722B265E883AC45C1CEC5E176F331183B63
+F3E7D61929861372E46631FF63916BAD3D10C1111E5253878F9820DB501B0FA3
+1FD1A89C3DAD269A818B175E6E2EC61B7F7A562C0D58205A9D4471B083F9DBD2
+33D7DBDC0CDB8C464F5A1A798401A3EB50004CF735F8E8C16E6F83CE65B720BF
+B15410AB8AD4A9407BBB3E7A68EAC77AEE9698E5E50DDEE6EEA0A984480417F4
+9097AE400B8999F08A7572C37F89207CD83C1BB1FADBD562096362A13E173B2F
+D82D67804247D0910BF81334F2F843EBBCC0458DBE9F21D458D7F7900235F6A5
+C0B81D6E3B9C9FA25F53C714CE8BD134928E88EEA0CA70F49B8942CD33FB9BD5
+55F6F9F9B40879FF7BF41BEC25C6E676244AE10DD13676A09FAECC3FC2B62BCB
+89AB7305887932C37827F4044C555E89FFDD6DFDDFE507DE5785C16EDBB13D2A
+C76A294796ED347F6A6B3FD434FDE1329B37A4EEFAB85A489FB253AB54F627D4
+51401BC7B78F2FB41F43C47B33F33980C43939686392D3B1BA80063E35F07A55
+38C66B7B2CF11058CAB2EDAA16250D57C889EBB4147E963085ECDADD5CBF741C
+FA9D1CA3D307758530ABBB5C2A50BDCA276808972135BE28DDF01016E7EECAA3
+E90E76DDA13906E7ABF92301C72CDB2334AEC951934AF92A594F9FEBEBAA74D5
+25DDA66DB5045BC505FD43450B489B480C9868B17D0305373271039F50D0A381
+FAF7E94DFBFCB40E3DA958514066303BBA8D0B585721C861149EDD288428DC05
+CC5252DF29CA07BDA189B9AA0E56463FBEB46F098E5F1FFEECCC14C8AB0731AE
+B7AC09C515B3167691D90457F87A16D1AD02E53E3CE8CE7A199DD93C809825BC
+F1D8C736EBABFD526601EF314527A827D08C987749EFDFB8D57F95D0B0A4D32B
+7BBE1828EB2DF4C64C4DF2C6703BD8346F14C59A9AEB7615B3C6BB81ED09F494
+0B02C88D60F7C344CA0DD720220820CC857208B0704530AAEF522B46945461DA
+1FC1A105B514ED4A35594D391DAC2A7A7DDBA6C62802EF75E7A4E21454896F5A
+F42FAF1909A5EC61831E6288215D8C8BDD866C18FAE3668D39BA217567BED9F4
+5415FF5916B851FE3ADCEF9B9E2A113019436B3184884E6466FBC3F24C5ABB32
+621C0C4C793AA0BB51C4A68429A611563162457DFA45F651699F2F21994680D2
+E18AABA6115B1183D6A4F6CADE349423A4D3D83423EB59023E66023872E80D96
+D3E2658E3062E5EF5B9A90A3C4BD07442F57BFB0F4868EC9D373B5B8C72F8A4E
+290A12D1B2EA158FA7EC4818E27BCB2C0DF316A9F5A9606899D73DC39E3295BC
+3B342D20375451E653AC76A096F731878C0B250C5E3D1045A01ECE86C5643193
+0E309F64893EC5E5818676980BCFFB3372ADCD656B42ADA232BD1EAB9481CB85
+B738B31F0504C78A89298EB16DC08E3422516E51B871241C3D348A09576AF5A9
+A7AECB8C4D04B679187879EEE76FC1FE0810FBE6FCF7E9A51E25D02F4E30672B
+9D1DE282DD2D29265F2B8339533EFD9575E2FF57B1122DB4B16D35A54F3C4908
+6CAFC314068E5C37A89E2E6BCAF8D9B1BCCA87C14F41BEDB9214B3230274F922
+3E269AE3396283032830E8870DBFAB3B01EFF41A49D360218850CBCF2772F780
+0E30166FD6992C18FF429CDDA136BD81F7CEA7AEDEE140EF20D9F6E827FDF918
+0C1FE773A147A4AD0C2C0D8E789F4387DD69CF4DDB7A5084A37C3CF6BAEDBDC3
+7DC82ABFBE44E6D45960858C46A5B061A7FF169E95C4CDC59574B36F7B410B43
+C8643EA56010192D8CAC939D95009F3DB69E782C71A0DA0F78DC73FA5F3D6BB0
+D0E05C11D401DFAC1F127860814DC9A14780577C5ED809412BFF82CA82C47E49
+0DE1E08AAACA436EB618C2094F3519DB1685D572B046A4FEA93D19EDE10CF0FE
+DF2BF0C402D7BC3A9B9582EC955CC57A9377D0F7562F7991F7FEB542806DFAB9
+05F9304B0546C9D04C343418AE1204B6AC2BF6EF3DCAB00B2EFD50884B8BE2DC
+7CF985258C5489A37BDD9AB727E4430A2361D6CF0CB45C80A60DF0EFC677F1BE
+66CB904C11D868F88BF36D9AED9D4217A42F0D138B6943E8B42FECAD07B248CB
+89B415A0D36289E1F566A4CD2DEE7C8EB9F62E8A2EB3F6016780C60C460750B7
+D599D04F3868956371D587E68063D86A673CBC9E1FD630A85F27883E2CDEE493
+D0ABFD045055F162A009CB3B29D3219CB8AA3F6E0441E189C29E0E7033240F93
+907A7FE8AA4E9CCC93B0E6E6E8EA3DAF7212659378E95DC6AFE72DE348BB9892
+DB4CE11916BF8B4ED640A9CF0E9ED09E4A133AD659AF36196A8E2BB82785C51A
+A4931E36CFEBA394BDA9306F93BE42E9775B72743413D41A5656C6716013D30E
+21845140AD93C540B7EB94493BC25C27BEC5F3BA459F9B57EBB9379AB42AF326
+F3004C8EB6E90661E23231B96E054D7D903E77E3C01B8BE2A05DD624B84D7876
+E09A58E75E3A14D40BE9710C87B87839DA33A74E38C40171098286EFED3A931C
+A2F3921A688BB57252DE0FF714E4E6C57F50476BA3FEB5ED6EE6434F1CB9EF2D
+6CC52EC6A483956E812A30C4B565A02D85EE90C1899F5CDD9210926BC142F7B1
+A19C4487B4417F94AF9783815EC2825EC7B16FC827A75C293800C70C525C1C6E
+DD8A31FB7149ACE92F580CBEAADE4D8025BA127B528C88B6D511FB38AD626732
+ABCCE4176971678EA3492A168B16055065351D18576312B863B1FA566D380FB7
+A2DBF1AD881751DDBC8328B9B2E3B00EAA12136B14BAD25D2173ECCFAD1C0CCB
+3954B60B4A0A93F027050A2323C8A24175BFEB0DC33F9475401A84625F30CA4A
+2990ECAA3127A97CF50F995C001D5F190AAF7E1AAD3FD511E5DB04BDF3A21D97
+6763083BF896FEC43A4407571857790AFF5AFF1262814B9741F3A72C872FF129
+6953B892CE7159640FEBEBFBF790BB4017B4BDE4BE66F255D4115FB0261BD500
+90BBC4117BE9CC9FEB9F58C02F5ECFD16C402A55E16F31AF0028CB62A8825419
+8F04B7B83C6BDBD31FFFE546617B785D1CB84918226C8D15E29CB8E20EE2F706
+58E899DF355A4CDF41C7C3DCD52356B97ED4D9632A11C1F10C728D8CAFCB6A9B
+F9780D00B6B3088C8542AFA3BD27BFE59FE97B1A959295AD9F3998637EC138F1
+686C00676484DD3CF97AC801F31A764C799F2F207398267508558163DB6F9401
+041BD8E9D12A194E2B9816EA4585414005264F0F475E10A452799732C04A629C
+B2A6B696CB661584A092BCE0622AAEB5C8DE8753925752E8D7EC353E7D819192
+37A48D0ACC93BF59192BD92239E17A144C8FE2FDAC9F45A0FF0A784C0F33C0A1
+DFF65E2F1BBD6FCD94C4C41D49D82097191871674F926937EB84351E66D618E7
+DD0AF1E5D1F4BF5F5FB6E071F16389EABCD20AF855322775F6EF175DA0CB3525
+A0355FB8A75B2DDC429D6A3D3D14DF49E594F6132F40EE84607B21DEF33CB651
+986876CFFF7B9BFBE0A48A13A616583D41167A1AE4985DA3E295769E6833C073
+421B7A1BB12A1FB7F68E2B689C62CAC27E49ABC85400AFB47B65C347165E8287
+E051C825736965833C97C548A4DA4A5CDB970A26E5594D058A664ABD5E5FFDD8
+D4B2E46CB14A1146BD4318DCA6B934C0C0CB359A2F864314C060298DC7DB3C2E
+EE7A53DEEDE3488283848C612E01A3541C006D51EAFBCDEAED5C8BF5A53F8765
+8882C233355671ACA971546F073AF5D523D6CB158BD2E52ECDE1C86A320C1D56
+5C7CA1E2C7DA1518A64D7A9946BC3CCBD4DC99ED4C06C49FCF7ACCEB3825C20B
+A7FB66E20CDC7CD5B6DF85A6F9651B5A0A6AF8A7007D247E588CE3D10A659DB2
+2409C592617E844B788F8F31439A864A83F150B9180ECCCC77FCE80FD76762F9
+FE36D8622E27287C1BE29C6ACC87BAC41E303229045ADAB41339583A7E2E182A
+25AEB962E2DEF3938BA4A36C1FC61694231232E0556C48E4CA6F2D8B778AA221
+C7C2C602E5BDEFA829B8042FF26F6DE8AB24C3D6AC15F08F18AC87FD5DBD10F5
+6FDA435B1844B5B5C001F812465593DE42ACCAA50107438F94B9540883D5006A
+989426C0AC036D9F32221DF58D516CD07E8A62217595902DDB61C0122DA5CC53
+033484B751B448E828B3F2F5B780384E879A4AC2A0B0463CFACB6E71E64910D1
+C29D15AC53900540AF00AC76ABB9F58BCDEC17A66943978DB0FFBF26E7182F9C
+51237DDF5171BC1272D2A92795FA94FBCFC990A30BB4089729DD36B34EA74298
+4CEE7B47FE85AE188CB7F01E9D976191C6A179C793CB5854ACE7105651EFFEF2
+EF8A2692CCA84735965666AAB61B7E66FAF98B03C2C91AD6BB2CAC04A25697DC
+378F43BB2026ED0CBF3A95E8D43F3DEE43E2121623BD3F211D15AD7542666E4C
+D1139BED9A63B41A12CCDE934DEAF7417779748B6507ACD789049D0A9A13F020
+52616D42561F9D099CA6C9C2FE5F75841BAA73F9B66B499547924103D120A9A8
+D487525A93B270DDD29CB89F48CA3794FEA61AF992B6D063EE294EA6506EAC90
+50E497D4029A2EC47970F69C3CD93871128B24DB7B64F9E1DB03D6C26848C888
+DB489E5494A272A2671FDEAAEB5467D9BE36DCAC57C1EA64B5981105D6C0CDE7
+16047600B109EC9FB61CBDED2B3A9C048F5DBCC6894A4C2788B66265AE2919D5
+FECA073894E52BD30069C895471E01C2FB1AEBA27E651ADBEE11798B8641AA4C
+6ABD9FDA2FF963A342E695155472AFF17729FB6CCC8392DBDFD0704DA078F819
+39A12840DB11394E8C52B7D525F1CF6A9EC558175489B490C6CB529CC6C9AD9E
+858F6C6574E5765EF040A0BC741339CC899363C897FB17552B54170C094AC439
+C633D71A0A6B07FA0E5F052CEC01B7D39972ECCF810DD236071E6F33886F1967
+5BEC9E659784790AD81F18478217BC614A09B450F9F367CA8C1319EC321304C0
+F167005B9442397C767749A0E80172A3E798778842E72C9995090ED9EE7E77A8
+B4E0B5182CBD20305D29FA42232D25CE8CF595AFDE8AD238796CAABA7A05732E
+DEDC3D9611E73FB21BF48A838AE013D1DB05ABD0A8E104C793ED29C821B74B60
+7BBF7AF551643427F79E4A5D5430AD237629DC722B95DF7997D56C0AA35261F9
+059895E4915405E39187287F253D0BFC35C9221BC7BC7D1D6347AD79EB57D16F
+7CD8A0F05688C5BC3DCE2833435A9617B0724C9D0AEC113719FF60498D379DF1
+EDDEDA305BB21A276068B03655C718ABCC9463672BEF5351A07A70CA909BCE6B
+EC8D4FA901DACBE229ADDD6196678AB4931A4453D433BE83FF4B10781976554A
+E32181301F75F423949AC99BCCAA0D5E45E2C6443EEC033DBCCA5EBC98FCC960
+4D0FE0B2AD4D63F8243ADF0C07C669433639C898B6032BEF98D61A1C712624B9
+D703992E39D06ED9903819E6E06DD069AB2E49B39C7556A9A74FB9CD4005BD93
+9571973AF75229D7427643828DA54783719E0BB7093AAF9CB43E93C70C17CE00
+4F2F2518524992ADF04A85077EA168970C035F7BAE96F1982136D215BD19ED26
+B13FE585D88B9CFD80BE1CC3C475BA976D327E06A2C9453439C498A77074A537
+9CB48921B22AF51CE96FAA8194FC00E1A3BC5EE90758A28089DE5B78A9DA79F7
+9A292B613509BE684CEBB5029E7D06B115C6357A5FF14977EEEF7C54EA07F6FD
+B144024D10CD770D563B3BEADE262952B6D59260D9F9C5E4D0C0A01D3FAC32E2
+667FB0297A92CC731A30F2B6380E4BD1B5296001C5AE4AF98196CDC282F8EA91
+D79C2F7A25E3D28549EF0AAFCF9F9D25AB744EE76B62FCCCF9A2DC9EC00F4411
+AD6B2A3F7DB78DE22ADD31DA29ED3EB6105C86554605FBE0A9ADF6AF06360856
+8FEB129D9EED78D6CBCFBC65EC32D619405C62C5BB36FA30FA0AC7E38AA3A920
+A681E6368244CE4E3A850D08D5D779DB84AB1E2D2CC9AE7EB7179D01E910803E
+8D156650E3A0E2BC7DD6A123E640E6C7C950F5B11DEFC114FFD19B69E0028D81
+5D71285E888DC780692E120C9FF86951A13403321B6B32189608287EBE42C9D4
+5D87D9930A80732DE39715374715AA9B5D9CF24E753110E6480C0895F87A6055
+F9BF8CDC63AA7A304F91B9919E658E3E3506CFADCDACF85AA32C2FA99BA6A40E
+DAC21971342C2969C79DA65A09543D982FB7AB63EE9E016BC89C3782AF98FAE4
+F3DB22427AA0C4081BE2A3FBBE6E6B8873BC448E79C38E4ECE119CBAF49303BE
+83CEBFD5ECDD39B618D87AF87D2B23D0A39E529E6FA487799979C9CA7A8E057D
+00270FD2B06F5EFA066E071C7B6A2A9BAF7FF07383B73E115E6FB2BF4961B35C
+C1A4CC19E872465C98C0E7EF7566232A6E519E5DAD75EDBD011EBEC366C78FD7
+C38473EA43EED26FD251482E3BE6985FF6012BC6C29DAECFEA389E34B13AF04E
+EF40BE464C56A9BE7BF590DC2400B357FBE1010F848C62C3BF13A095D5CC597C
+49FE5119698063A4126D2B1EB8CFCF9A60521EEE14D203C4538EC94AAA4C42F3
+CFE1266BDFAB7807874978F69764670312AB322D502BA3C577E532D388864321
+F47D4750A55010B09B39F55F76BDC353860BBEAD1DBB0DA88986D8FC0B7E6B56
+4AE8ACC638BBF965BE16F967CC3647B7BE00D06C28EB360FF58801B5C4AE5DCD
+79A68AE48A36385CD539B0682551D1D7C9B35DA190991341443F3846F6A4E957
+9CB8B3CB47A432906010CA28F18DBA32A8C6425DAB7723843421C0524AA1542D
+7B23D36CC397AEF3C65D5A18B423B42E834ACA21BA92B5CC7E3B64BDB23C87F7
+2FD8B0D0BBB84A14DAE53C0582C35863FF8F372FE09DD1C1433F20DC53B0C42F
+15015FBAADBECBD8BB5AB0CD91B740CEBE9D7BE2B4AECB9E5D572C52BD3C8DA2
+1C52B42DC5B1861540EB21EDCA20DCA5901578FB63A768B5B25BE7E79E6A34DA
+C77D7BB4C18B90968FD2AEE3FA992359E5DBAE6CCD81CF3EE72A80C2D834BAA0
+B3E1676DABDE1FC4BA707DA236C3131DC4E91EF9716ABB2C71A57A076C7B366E
+1015F0E3D69A002190FD689C11E3D137D5130EB46E27AADE6203B1726B852FDA
+9A9BD004FBBA6F449309C517575DA18E7A9255152F8AE78B3B9C970C163DE775
+B9F4EBF840DDA1F70B2E20E5946A84C3997436A0F52D5EB8C923E9723EF105EC
+93BC86F27DC41BD26CC28912126EC88B376AC07409FFAE4CDB01A72E5B781BBA
+4316A3FA4F46A88B9B264F8DCBB9A8A043FFFBA529A134F62A05319825C7949A
+A07CFF3C255C68BDB81DD007AC7D759CE74DB20EDAAE9153A9EF4E48929CDCA6
+8F85965CF5F8DE1C8E7526FB5F8C79351BD2027287C8A587461FDD4F4801E953
+8910F3D1B2B3487FA56B2A5A19E16C0DF0555B4003B3B377A3E2F877872944EA
+FC334A14C024C1BEA0C8E8E18DA5B3E3CCEED380D50B278FAE9675BAE1A6A7F2
+8FEEA5B7220C84496216141E83ED512F281EB0CC8A34F29A04E02D29D4A2385C
+98E61C5D507DCBDBFCDD6DA3CCDE8BFCBE2BB31875C62F5A3ADA36A5BE0B2F1E
+372A88C8432526C8FDBFC2A8CD635F9D3055FB335AA1318425D44C7C290926DB
+52258A4467AE67FA2A373C6ED1FE3FD47FEAAA70439A06A3BC4F764754F48B89
+A47594FD6C71901DD76C969477F61D4D0760F0D961AF9A24620C3BED85DAC965
+0D2EB1883381DAA2E88792693D52516CA19AEC59085AF2DB01903E2310812CA7
+F43D7BD3B08B3B930EAAF44539AAEECC6F35507CDDB5E92D928DB87A72CC9CA2
+C6C454D3E8B1ACCCCA5FB80D518748898D771D7B6428DD6CCA288DB550D7488B
+296EED5C50F2FD74255C7B2A1177DB4D86F540764E9C51EE17F8FC39653B2AE0
+5171EE26A21F8242502DA857EBD9718319168669D9ECF8B072CB8DD0A5BE623C
+C26B4862EB22EB5911AEF655ED4F52BD5441B04F917EC023851BD94BF70E84F6
+84DD916927014771943A72E8BA16E44F782B7AB40839E20847A2765FF9EE44AF
+66834EE6E122B159FA7247AF41E616E5F6427F1D29480CF9D6B8BE66F42D5122
+34D7275F749AC63A93AD14E5E9C5C3A32CB1EBA1AA184EA8400FF39E0CFBDFD8
+C46078110DFCAD0CFC32606FFA7BF2183FDB0F9BF8FC68D5FE2C6B267562B777
+F3E11B16A37876A39F1824586548F5FAEAAFA57420D0CC28A57AEC1839C07AF7
+80C9D53D08C9030271E4B79739F2FB995A9E5EEF6957BA37DA2A5AE3B49D66ED
+A57B58063CF1A9F7A19EC131178E8F7CB63BCC3AB7B0AB7B2B705E1885766A14
+615520B8B4752ADFADDB24092EFDD737761709D8C2B64C68DD84C8A6ADB68FA7
+2DBAAACE58047C6E051EBB8646342AEAC94BCFC9D4111977763847DABB4A4061
+292B80A451D5B0ED2908242C842B907206BD8A9292F88F37106900F8B6826488
+81DBB4C9005F5618C7E807C45B04B914B5B96BD39C432BD8B29D3EF605898309
+C7C30A2B24A64706862075A7CE7A6C58331B1E6A22868D9032C34BE24C468B20
+CDBEAF15A1027E4768EC6D30A39F68868911CEF80C074328B8210FCC725F835D
+32B560BC1BD4BAE1BFCFC9CC645F24CD71CDB55D8F1FEB1CC3B579C2A6B2A50B
+0C79A09838569602937841E0D6CCBED038A7635CCFE7DA841CDDA91C0C14BF3A
+30F979E31B5060A102C24AB5CB6656DBEA74C04ECA37B8C9404426C60E0CF670
+B14150C7F519967FFF101AAE9B1912D0965119A31A57DDC772759F107B915F74
+956D7C9B33DFC59221EC7CA179952D0F05D0A21BFEA10AD65DFE985951304701
+1B0DA869C6444DC6746EBED908FE37E046A9C3A05263F0ADB027A201E3FDFCE0
+002339107609E666B29BAD895D1EC51C8CEAAF77C9B7900D4E48A8E0FDD7EFA6
+85890A414BF53D0811BD4424F73EFC028E1E24F827EE690A2C455BA56826BDD1
+76AE96CECB5CE924AAA05223080EA723FA1AFACAF18C879B1675E1334D14DFE0
+BB8F4390F3736EA40A1385E830E015E09034E3EC1EDDEB2ABB6B6923540555F7
+50D0AE29B82828DB755C16D3E28B9B4C003476EF672D9FEDB65C59FAD148693B
+2F9A6AE55865581D54A0EADF9DEF317DB623AA0178C423C72A5FA7CF6583B565
+D68F4AECD003B6777AFB5E54B7724838FA27BBCAECC7FEFA482CE122D67C1F5A
+7A89524A95B431C56180E67A728EB87E3831EE81AB8ADC8D5CD1BA34CCD3F7C6
+B57130F173E1E74167505C95E062AF8D17DA1AE20F5487D37ECB72D48EA157BE
+8853F32050DAE379469C56F529867CB1DB8102485946F4642D12EA28AFB23338
+309516C967102F60499CCFA5BA738861ADF3881E4C77381AE42DA48CDB8B93D6
+8C944D9C00CD08FAF9F3EA6EAFC4BB81A046D60B9615E9E32CC1DAD8BE65CCA2
+4D9E275EBA74300318C0808FEB2F97EB11179CEDA173FD5DCD01C7A9B55F01A0
+72CFD68091BF0936F2CB6B4762B4129DB790A130341B1281239317BC4413C5E3
+33BDC68F9FC125793F1E71E49A160E70A0CFB2935384036D489ACB19385070F6
+77F1FCD18ADE1BA6128B6472D9BBC41916B50D349294BD9A8E55C53C32146906
+C33F4E0DB30DC2B1DCD95C14FF736DEC32100887BC3AD61F47D518B984DBF15F
+9DCFD8D52DFE416E9330E8A7CB387993E92C40CF345CE5B4AA6237E5C165E444
+87B999C9C9BADE827E99338A935960B43E5D489216AC3A1B12553983E7387DA6
+0B30128CDB47234410C2CD262F4F513406129DDD4A5683D9A90213B15D82CC9A
+CB95BF820B80792BE989F8CAA2C6A2BD03A17BD5BDD2CE037430D3C9D50B04D2
+57C04A27111800E45EB0A23BC142F8E94FC5EA851476BE4B6F28040CBE35CB92
+D58E7F283EA78F7803C9B531A641F969CBC91F76F9971D839486841F7C73CFC7
+12014116686BFC632620EA3758BE9A1BADF107C3CF1D56BFBDF38A243BDF7348
+1EAB5035A7D20A19A9244D922A16A66B9A015AE480DFF90EC74E1ACD6579A7DA
+C0B60F1ABEEE7340156B4DE7DF797A6EC6931AF2FABCC7CBE12408C17EC209E3
+FA0AF21963EDE23E789F16FE7D5E504A082E0B1ABD3F32802541CA86D3DCFFAB
+FB6BCD78D318EE56D9BA4D9C79727ED3CEFD9C95FB08BD05CD91E460F249B955
+AC1EE6D90C09D2C58621940E58E8BC2C7CCCBF44D8677D17D00AD53978C46064
+7F3A231901E4C0520D07A04D308BACB848FEA20D5D3AE8D2BBD6AA1637E0510B
+42CFB4D7DC696414DFDB26622E3F9A763EB25B77136BB41ABAD6201D4A26597A
+D5A21CB25E54EE60B6FD238905A26192BE539C1C06301AC836402BA71952528D
+29E35B987EC4107D74F018410E5224C666847C416735AA1894A23651DEA153FA
+9AFB47EBB67B66181EDD00FC8D0ADFB9405159BA37AEBD20AC6DE2361C787BC8
+60E969638371CB4003657300F22EB205695F5780A9EF6946C41ABBB314860407
+5E8FA325CF7A73966ACC1A9FD07183067705EF961E44784033A2B5E439679D03
+649D027F64149B1C223846C72D485BCEC6C627A24E5606919500289EDD483582
+86B9F89FFBFA9949AD5119486222D9B90A836E9F3A30DF87C8B6605FDA841D75
+3CADEDA0CD4F5E462A769D807CD93E817597583C273469E451DC0A0EEE2D44DC
+390C8569903E0E1A8F3E4BADDF2810625A94C64B478F3B23329DA39C7D667A86
+A8C7980840A5BCCB26E9E00A03AF919AE303DB02E9CD24843A5C31D5C581F344
+CC05E9B78C99DF60271303F5636583D4AA19261A27324AC35FC60609C95D8A89
+1E1BD2D5D3BF85E9995ED8F5016E3ACD768C628F6EA4D629C225DB7665CA678B
+CEE9262A08F77313EC07D428CCC490FC953ACBEA8B82662843EF29194BECA18A
+9B9F7DA6EE5E69E1F6063891B6640E66A45DBC1BEE2ACE06966231460AFACBF6
+5F8CC0E6DC0E990ADFFD6958E9CDC3E2406ABF261D1E566D66C53FEBE676A6E6
+7CC2B0490A452F36FDDBDF720A73B499B2A24559447E6B64D3D1B9DD757EB587
+DCA3B09BBDD6270F3341F3C050D58A19DFE8DE6C967DD21191AF8D007546CB2A
+29B6A9286C4E247DC8499D53F166F96E7B48F6CA9A1615156BF26569F38162C8
+379229886C9A14B7CC27079581E9E1AD044B911A204B5B5099A0A6CD4B93B5D4
+9E19292024C8B177377C650F14D7156E7F80CB1543B7D1AEC4BC22FD0CACDE1B
+873D788E7679BA8CD24809A0E54734FB1DB1CAB70F0E305DA6FCE5158478FE21
+33D27702357D89436ECC6261F07609B047450F38F1FB447F44AC661B88D599C1
+46625D0796CB6907DE4EF2E96FE6619DDDE75FA874FB4C1885F533C7C3441FAB
+FEEF1179C13A7C15C3742B832629F1C934D9870FCC0FC49877DEE9E31BDAE0A2
+B7D7A893BEFB1D1E8D661AA06A615166EE1A809739526EAF5748B402787680F5
+15B0E2C09D10BB1CDBC540B321DB8EF320F8762787A3550C6F0EE4A1F4C448B8
+989C8ED0646C084F39F72A0DA2F033A27A309F002779633D69E4900E716DEEE9
+4957732BA6B0DB00F3AB9EC6838E8D95C2CCB4F3C2DE12683AD34FF8D98CE70D
+C2CD04BC2308FFE468EBF3E28C0451D2126E12FF74807E4EA74B6D318D358392
+50A057D3518C663E5C22D431097FFA3CE2D3BE94315C3C263E3192E2A0AE7468
+E8734C3907565B917A802637B8E17C0C3099E09CE5FE1F4C49E8F986EDC3F62B
+925AF8AAE0DEE73B4554E19407D4A8AE540954CADC8E8E04C0DB4F4CBDD597DE
+A042F8C1FD867A5981117894CB11DCAC13CB5B1609277AB8F52D5F14B0EF5CBA
+6FFEB15BB5EE985C5BB5B6FAD69DB3DA85EA0F607ED70A07F4186A976157CFD5
+1FD77590B37B053366B2D59076E7C4BB5B17E37C0905B5A4178801DA04393335
+C2F5EC5170D36510D8EC5A3F74241D943D32D5936312F4E1929201CCD8AFF4A4
+8ACA3EEAEA2F80811E1AB97C722F5683CBD3BDDAABE2BFD365ADD468CCF773F3
+0D4CD51FBF78276CCB2261335439820D3335E049625BD62D64C10FA5482CA484
+91353DFF4D23AD3A1BB45F544DEDD955B76BE2179A3C115BA21486FEF6B9FE06
+C09DD1FE4CAFCA1638BC6C9C063D6CEB9ECF127EA34B258D56D9F466F3DE8E98
+44588EE4E2BE29AB2BA7CDBD0833E48070E2CA66569D1A31D74B3BB93C88B192
+9F41690EE73BADAAC366A5583EDC00C3A09A3B36206485D0EB6F952BC475A992
+7A08E52A909D47F93064AEF90826DF8DBEB1B8295843C34526CF1A753D2969F9
+41D4BBFEAD6445152C7566597E27074A6D65751802C955762833EFCBB59CC9AD
+143BE9E315FF6962B510AD73E357C23B1E95E95D0E66F1870342066E083EC5EC
+106599332D0B1C04080710368D15505BD555E08552C6BCBE59F8E7F52099DD8E
+1262CD45DF1424FD99F35CEB8888EE76950AB97C325D1FC8FDA6B59C1DA5E642
+BECDF0BBC1D8FDAB995F0B42AC4B210841683DCBE8B0E57D9836EA9C5076D4E1
+FB7D278C068BBECD60136C1FEC4694E4C7258C4B907CD50D03481AB429B0DFA8
+5CEE01A1A789EAE744D80392D32F2D0D4D985DD521EE87FBEF8880B755BD8C88
+125FD6AB5BDE712D6EBE6C87E3CF95763C7F97C390E28B46DCE4BCD942C38A0F
+B259F6EF84B53657102B0F531757AE6F3D5ABC4AF25682F4AA841599623AB99F
+13613C3A8AD151528B371AC9AB71D884EF7605F242B0733BD8D053338AFEECDB
+C04F5CE3F9B87882C241BD22612D8BC8CADD3A0C5DE9F951B4A9BD4C31C96EEC
+7CD77871CB7FA20002606DAEB05C950B80428F48527800E26E462003975BE918
+6686583FA859951BD6B66661A0285D78F322604D2CF6CF12A3F92FE9B9121F05
+FA07B5FE84861D713956C1A4DF6A7899918FA425B97261BE40FAE4AF0F524D0B
+1D3C7708CAC08B05D68296333F7CECEAD9DE485E3F290E8C8011B7A0AF2ABAD4
+C8C91729CF4CD7176F99ADEDE5B888EF92FE06D05E597738BDBD4579103CF437
+75A0F31B10B54642583CCA5C7C2030E21068A52CC5419406BCE7334F4861970B
+1974F921D71FB38A0DDD0276EC5C2EA35C500C0806D9E06316B43F1B00B954BD
+ED1DEB6F6840D36EF1E6F0DA25C565D06862BED9473D6F1F41F7B8B5B91E7398
+EECC397C96AD82ECC8411C61E0AC028E557B5AC3155EA12547C4E7BF9583F0C4
+AAD5FDA2DF0A8590B0A142287F7CD739734FA5CC5C9F4F3BE2007B055BDFED37
+D5A1414599E5BD8308B7C0CC59F59A2E5296EC476E578983C818F1307BE7EF50
+5BF52A9F05BEAED92F19301C5D754B4DC22607DF4F17C843EB25A57963128882
+1636862F5791840C87DB94004094D7472E1742AC5A8223803BD20BC0FF3B4803
+C64DFEE01FD9603B9ACAC6BCA107E276D5AA4F120C007B0720493A37EFBE8110
+0873203D4CC3F03BB8986608787346ABAFA70C97ED093AD9F8DE3898454D286B
+FC6BDFBDDF3A907B1B9756431A73857B9C4605735776E00B63168AA6A7DB76F3
+3F57D42D4A742641C43C16DC4E9F9361100855DC833F154EABD36432338160B6
+7DCF1DF9CC167BE044C95A0C78ED4122DE12E8651941A9A00E9C110C7C8DF6C4
+3FEC21390330A78136783A85A410289C94B6EC85B28DD48F2D7299F10380CA40
+0689234695AF310ABCA57D37421A09245CCF60213C250BDD57D3FFC4B9DADA63
+4AE1788F0C90490780650C1BBA52139B4DD961A3650F6144C89E82012484AF76
+49C3371F84EFA5EFDAC65F27E899655F78E40DFD797CFBDF2888C10F720B55E0
+36B8670C5D0F2F1F7309F109583C440338082265523750F1872CB7C97E93E319
+D9D2CD62FD24A67DBBA77B305EE62FCFC13A60831F86F066AE738EDE223AD809
+74A5E78B2973B979B27652B12B2F65A8BE423E5F09E511623472496F1F886A93
+593CD8037AEA269C1D652B8261BE9F2C7DF6E2D923F7BAEB1089BCDA3F9F6C21
+EB0A8DD0F0CF8F28F5B2498018D995B14AA7DCC6A8C5F620F387009B7F4C9533
+C42D6C3EB234EA2AC527C551D098B55FE095645BD6EA74873635FECE40689D95
+B644F180B4515FBDAAAFFC469EDEB3D2257D3DF9F0CD87341F7D9894B709AB5D
+2D2FDA926F4E66019A5B2C66A22CF7875DE999248E1C5FF77207B1F4989A1155
+BC301C4B0C7DACBD9B1A233295DBD7ED1E750366EAD9C138FCA8F38B12E067B0
+24FA74A712404A8EEC4B37BF2CA76783D8B7D4D1EE29CD494FCA463F2D95CEC4
+C602D52B102556E20DE647CB9EDB1A4C0D0D61CD40FF4EFF35C7F7D7E39D7A65
+B932358B6A749D90089F0BD9B0754C0034E1D599A0F627B6B1BAABA838567120
+D4EC81A2C61A44CAEE0721DC58FB6CB4A294B2C27FB1848499073A4282F8914D
+29B158333483A2C30F1EB0CC5C35C9B44FE629F6A5A4B4227010E3065A39431E
+4387E8FA2BB656DD3CAFCE39CD2EC1B8C694FF8A9D0A83412B59E064CE126325
+7D47C1E6D0A14C2E00FF23CC3B46491290CEB5CB0D77C076B682822AEEF33AC3
+72E5C3C7F130D4ECA6573DCFAE80E2AFBFCD8F75B97767336622B7186D1E4D2D
+DBA4D4E7848A2528CA0B2932CCFF7C44CC84391A790844B68B7B6AC4E5247E11
+12E8B511AA79B10523C08F87C4FFD13DF16A32C14C14DDC3DFD5C7707AF0ADFD
+206C5F08B6FDFBE6A25BDAEFDAC6C62D46FAD67CEBB962253F422E03E350FB2E
+5D85310C754A56CCC4D415FA3EE330F65778D9FF6EDF4561971AB36976A7AA13
+65873392DB9FEA65D6CBD192D77CB3D712BA57CFEDE28FDE700E023D722C2107
+FAD33C3EC6DB0A1B8ACD2F5BDEC6664AE084E37C08DB2A394D6A03A4B5AAB584
+C56986A6A70CED92535BB8CDEB6E061803769D9AF11CC4F4B6681F7C309ABE6C
+A45067EF13BD9BB6128B82B884A82A93805C7F9979E5EC4259829EB3A609578C
+8B746C21E78AFFC105BCEFA657BA7E6A5232F6442C8F797CC460EBE086E4B5BE
+CD71C218A4B381E95FA0193E29D9925E4892369B4F872D4D05041E04A94884AC
+DDEF4B84BBF7CAB2E86CD9794931FF10CDFD59E4532F064BA6A043B7C878A1A9
+5E549CEFE02905047F5FCD191CB9421DE1DD7BC56EBD37D25CAD0B443663813C
+AACA226CC461223ED82E6BC4ED9C9E463508CFAAD72D7B294F6A1C3F2DC462DB
+D1D7A36FDD4F7F33C5CE8C9401117E58C88A1504E23A59E8B9028E6A17BE97B3
+A24057954B34E02B2013BCAA8E53A2A3BD80AF59375E58574796C76EB4F80A75
+65D18766C38957BAE977FCAB12B0905A798BDC7DF764A74A832F01A7EA583D2C
+80F177A56353EB1436DE7BAB8FB36A72D0C99DE947F801522895B37169329106
+9231484FBF6DE63F4B2E97EDE44B80308CB50770D49F00E61E0B7544CF8B1069
+7014F9E674B59D24685755BF266F6F9A77ED1035A8101CB2B78BEB3008E75CA5
+5FD5304ECF13459607A337F5784ED89063F6844277DDA39787738D355C680929
+DDFC4CC7BF266D18523F2A710260820E8EE84E3B4EC13886E43A399B06B5A6FB
+1CBE44275EC77FAD42B0D5F7F44FB119F848EFF4F93B7B4381EB3A6C70213BE8
+E90B52EE30700BD51306F314589A1154878DDC33967229B0A367AE70418739D2
+56B24EBBC2D687681684FD867163128BE945622F74AE2F6C57A63484CB126820
+17F30AD1C5329523D679696C4A7B8CEF97FDC8BA5C0C31B7F19EC8C39A61E5D0
+60A11A4CB9D899B363AD88F9297900E6BF51B5315CB42DDD6CEC555AC54E0320
+B97E989638A37897AA76614326D90977B6D5EF13DD830F004093E5A685C8CB50
+D976EF544D8C0471D3E037E19E42CA87028BC27D1477406ADBC4CE196A1EEE89
+BE9A06ACD6C17922A61705CA894C0D7F1783EAAB8031CB1C18DC3CB81186A1F9
+867B07FC73AEF3526C0ABC2F77FB35A52F82168B7A5C0455DEEA2522A5B74487
+82FDB49035062FA89995B9123F6EC3F84592158DC2D4B6D3E61EA90BE082E44D
+275A6C4512FD61A3012861111496E6DBCB2CDE57F5963AF6FB129A3DDFBDA2ED
+0EF9B3208FDFA7EC3B1F02381002D82BA5229E9F8D23D7802E8FE955E0DFBF6E
+624C20E9707AD4C924E080F65243C1B0D53492B1D4E874BCF92862F85A47A010
+C32FC9FF385860AE6C95481FD8B83B37A86435AEFC6230706452993982ADEF24
+8236F5D4105A4F5C20C8796778B8C3ACD4D0691B984459608915C7587D382C20
+69A1DA37B0E75C90DC7060A5971B9551A593932FC8A137CA32952BD67B6EF041
+53E8AB1D2DF33C50D1F8B46D057333F58009BA460057573463E0895AFAA843FD
+99F54D106E0BD9C7A87F8930DA17C78FA0A7057314E1E450CEBA5E65CF2596D4
+13684ECCB6BB7BA6C778127C4D69CA2E5F39FFD757BBDABDE26CD4059A85BED7
+C0FBB4C9428796356EA5F3094E76472A79E9E395F5CAB8B49F991F4D20CFE349
+D07B6412320C52F18EB4E87659D7E48AFF69D7A415F38BCD5BE489256C1144BD
+281F85F7A037E4E7C8D141FE449D16F8D36D9039B298BB1F61BFCCF6737178B9
+ADF9A3A184489C6D5EA2B6C81CCBC3D89072F5093025BA69B6A29F2976898824
+406D932F7F3A6EAC0A65A7F016FFB80D0738FBC2D503E2531433E4F074D29DF8
+507C48857E39E25A1EEB835D5300ECFECDFF08215141C7B6100DFA0BB932334A
+A4250162E36AC575FAECB1174F20F11EC6FAFA4CD886C023BB60DFA8595BDDFE
+BCE6792B85B17D046054A266412F96583F76A66DD1D25599F31FBF598E8E9641
+7415366257EDACEC2D4672F9165BBE172F11BA76E5783CAB60F86655F87BFFEB
+08E31DF6CC6863D05AD0ACCE9AD421437D17090354412872287B6D9575F45562
+C35597EA596E716B67971F5667713D8F2A971285C4D1B67EA77811AE7799CB13
+E357B1A03D5B71F3A7B836F74E65DC19DC8822277DE8B0073EEC17ABBA940B34
+F664745A79EF90AD4FB007C3F7558B84C98EAD1C20064082A2714539CC7F0155
+87508D192DB05FCECA78630C4133CD827932A84D21CC953B999C8C851A224B83
+F3EC014FA0D80C0BED17A359872160683A658B65309BB92A871B736E1B5E77A5
+8C43A658A9373F92459653C47707297BF2B08A8087B0D0E9BDAD307F118782D7
+D7003D9A160051C772E5291F33508921E1E16E48C03FDAB0F1C33BD9401CDF51
+9C7771022D3B69FE47296770914BE6ABCD4595116E2CDDA1139E6C0236C217A8
+DDAC4962DE70098E71FE6811A2E5441A54C5C91C2673482AFDDA9F1D25D39BA4
+667AC88E269E0A5973EAD0F112FB692A8DE56CD0840F2D3ADA9E35C8DC532669
+AC8EFC8A473C52E68A47C2EB6D1D60FBD80039C1722CD8D33121C295EC3B0949
+9DC8E10A76323B17EF0989B8C811A46099B179716BE70163106B15C58FEE49A6
+2BC6787698965C531312264F7AC5013A7F48C25D3B484D88213E093F81666D22
+D11A0FB4FAAF8D579125D58063D11ADE621799BB9CDF9394828BBA7C73BCF863
+B8B83B42C94AF06F076B73212756A3B6FACFF9F4AEEF704A5E8F6E66204C3EAE
+3042E58635DB16E2B20D6FBFFF4FE81D34DD3E3CA24D9870E81519AE8701328F
+B7AE637F2E009C8CAFC9C8CC9FD212A8D04236540FFFCE06A53F5E0DAD66692D
+CF04864C36BB8B932D869AB4675FB0576610A39E426E16FDF718940E11FBA5CB
+5D80356B2E191F3A6EC7062A60A91ABA2BF455C38A88681213E358016AECDF6B
+F29412284CDD0EECC405ADD56FDD02D4C98324D60EA23BC8FC61849D2C8CDB45
+EE7996210A041FE7DD55EC3CB98A89BABBCB11EF1DFB332DD2A053E2F4DBDB18
+D147A80A364AA417B4EDEE6F799D012BB094FDCD5E2FDFB3CAC7D592C7B04C92
+29B6C5E2DE5B1C88FADFFC69B356394978FA36BB8DD4B8AFCD61EEC7818029E2
+86B5135FDAD4C4024472565F1154BC76FE9450FE41BBD47CBDE835D888AF9CA8
+2AEAF152D0EC8F366DBE7283298711F4E19A262AA773A4B5E2F83E514AFAC904
+ED893CE36C8CF3A4032D79B3DD677E49E40A40ED8B818D1C49A49E9135FD3A95
+CB47CA7EDEA07E1A5583B92D7DCBBA85AA62C70C7C79706F69C374EC8C9C8DF6
+85FFAC786ABEAB4C650755BF6B5D8B0D7C73E8FE45DBAA508665EDAF8FC4C49C
+3A053156D255A9857272D167DE1999D51869F4329F336546D8CAA564C40E11F0
+9BFB24D7A92E602B520D2FAF80AE1F2306A6E4FF24EBEB2BE5F43AE99546F739
+2C1EB46C7E678416F973FD64C8F9A8FBAC24DDAC97FC3BAE905285ADA80EE265
+EDF710944473FFE82E0326579BAAE82A11EC1796F66BFBFD9D42B1F1844F146F
+468436F1E3B101350A15961BE3ED3B060EA6EEA54B4640F9135DA9678B776415
+0EE9B4E2023FD929505AC4ABC41870A287913B41A29D4482439081B22E4C9EF0
+606DB52CB4E42B258E26E398918AFF672DDB8137A3D9E56AAAAFF283CD204F60
+1A7020497BF3AAAFD5D19BC5027129759552BCEB666025A958E3C89D87F2628B
+B1CA120F99A5011E364F45524A30398A89324531FF1974064D8E442FB7F217BF
+0DB02F38BDE00115A217DE0B6450DD5B06C1B4335B55DA1B1738927CD6C0FF64
+82CA6B57AC50923C38343853D1FB4F04B8A5A08ADE3960339D85271E59CD2AFB
+2EB22CF048AAD9F50E5D79C8F640FCA9357AC2201E2F111B19E9E6D97837356B
+4BD21586B4FE993EAE89C196D08C445A0936D9AA5ABE103030F5054173E33ADD
+A3EBFA2DADC766577FC0EE7AAE0BE5FCCE4E28732905A49107201BF8DF75C2C4
+8EC78180A36420836D6909671E85B0FAAF3771EC118B6420116DC43983CF83C0
+98513F8F231E9C94DDA2BE07461E9738659913D3C7157269FD28A8B32CF11E0E
+9548AA110FCC71B3F98284962854310454D28D8E38B37AE93433824FF61AA808
+5628F23DE58D64EC1A52AF495DB65FE16087D1F3FA0A36319B517B51679755EC
+9E19706ABE12B8E0641336FB8F05FCE1E6672820E3E9C5EC624186805E4399C1
+F55F16230018FEFF64C51D5B89E6AD23D260551504393A9DE155AD8B545B4D09
+EA2EA8275E104F7BCFFBDFA9F8D4526F1DB9ED1687D1B74370F747B0B0E4B720
+CACD3A22A78819EC6CBA08AD1E7A729E5E42ED9B8D5166ADA2A94EEDE2627751
+336CF3F9033FF20CD52BE3F56EEC67E5B732998F4B1F136736987F4A2605A64B
+1E95A07F5CB058FDFBAC5758E9F0252A31F72ECC06DF1053E090762D17AE84F0
+0424DD6FED7193F99520FAE01556CA67914867016AA86C1C72F87F5D843DDE28
+FDC16CDDD89050A337E455DCBFAF605FBDA91BBE7E3BF1E88005CE32291C52C7
+DC2B3640454D0C36C05648DBEDB2EEBB00F585D371E7B2A9F3B1B153E5635002
+25F859F46BA3CDEFE809C80B1DBC37438479DED51ED2647F405CFBAC7A429360
+4AD394586ABB312F3751FB1328B15C7B15FFD6B7E92B3C8D61C99C8054A33C94
+F6A9412EDFD6894C45AC431D1B29E2AE959D6B610A91725265C4EA7A865A64BC
+CC1BD93DF0828E529C0CD5744644F08FC05B88A5D0AF329972E3B2CC2768CA75
+05DCFB2F758327BD961D7DB6C8401F3337D0A72CA5CDC00CAFF86A5A40BBDC38
+904BBF359700AE4DAFD9AF7B8731095AFF6F0572E857E9E8AC1C2DD5D74F5FF2
+DF3C0B3EABAE300C043FBD2E64AF0CF21ECB09A78FB62778C86E8E5A356B6007
+12ED08D19AFE705CE8E73A58136657E7357E074BC661681B4CF919B0B01B7D87
+9FEB2F4955DC17B86633EE72F9BC1277EF7D688E7FF5DA5B8E5646FB7A5B0457
+F37037F76100FAF3DBF4504F203F569550161D1B578E0E03EA93857ACF26C58A
+B75CAF8E1BF6BE7DE26C974E540FA8049EBA2D17B4C7506EFD6E99B776A78613
+3A953BCA37768BB990D56A650C70D0805D21856301BA9ED1CE9CA46DFDA188C4
+F5C73416AD75903FBCD6D9661C4599BC07E28C6664C72606BECB75783FEDCE87
+29EE7DDA74C74E62BD1F1699531892540E34B795189BF088923E21E65976588B
+A3E06B30DC4C62A4E10064F6D638CCEC9189A7BB33E8B599CC2AB618476D45AB
+55CA9D497C2642B6F3326FC846AD02EB109AF7D9866B5988ADABEE994672085B
+52C906A7F28343FE913EA90B9ADCA82FF8EE7A1B2F3E43687F4B420B5D551846
+3CDC11E099D8B0ECCB24B40C74DD93C5E40E9F3BB4814840A14A291191E95446
+2CF04B18F0E7DBA93BF4AD458F584FB02AFEF085AFC248263B12D76133776A77
+1343CD1E0BE802CF9D9A6FCD7F70277B10FF89AD4A78405C4D3C7C6767ED85F1
+20859187EDC5F026CFE93BF7DF4DC0B32D1F4660B5995A2A79A8FEFF93389CCB
+93D00A3CEECD3B631015A56D9E6C5E30D36DD98E6CD2A3F6148940AA180D7E02
+4442FCA1EC0950FC292E35D3A1CB8AB4AA1EF85B6197BA950AF5D1CB94712C7A
+57500E5E8B1B0A05D865672B098BEE02BE07A01B0A9CA67BF7766EE0EA5941D6
+823ABCC777162C9E35C8451EDA76E0F06E758EDCD0B65BA8AAB143C339D9E843
+24E12148C2CD94E6025FAB0093011ADBF3199D7EF02FD52A7DFDC782E9BB9DDD
+D76955BF841D7A75D806533DEDAC7A906D6CCDF5990FA64F38CC5C22A5270396
+0A8C7963FF5830231D6BC7D0A18A9939B159B50E026AD34D7A8BECB7EDDBC6EB
+00546AE102AA3D88CB76D9B816E069F1821BB2804654802E8EDD9A9ED2458D99
+C5C2D04D87174093282AC0879457510CC1A8EC14B3CE72B4207D7D35F0F74B8B
+0F121DE6EE1A189BF7E076302AFA5C0A09BB8095D32F469E08575E6AAC4AB9A6
+BF82FFA86CC60A3A34D1EA753DDE232119D9A4891B77B9527FE9D9DAE34D6944
+CB9EAE528886AE53C91EA315E708213196A01CDD9A181EDBA37AE4C63A23FC75
+77C3AAB05987D3BC0A654BD9CFD5E6F48D8F4AEDC967A8C51DEE87DE9629BDDD
+680515991E6D71FD417CB784E3EDE648DF8912EF71BF93E20FAE714E422792D7
+2B5F02A314191CB65DDB648898594B44A33F1252676DFDE978BD0188390120D0
+C0E5550B77CD3A08CABCF2FF5B62C59B2B6F95B8A2D8F3DE2BEF93E9CBC20CBE
+64C51CE0E03300459F11451F42C33DCC1D361206A1FBFC4FE27A48F667892C7C
+0817245326322B600B6C323587E7A07A6132BEF029835FE7CE5DDD5DA26FC5C6
+786FED8425EA1D113230D161A78BE519538614F61ED1E92DBA5A0D8B5B5BBC4A
+D875B43B1986449AB67508BDB269D2549D2F794881556DD132E18B657D33C2B9
+83DF615A05ACFB843453E291CAAD9E2CCFC7490F9F6E57C934C5A92037E866E8
+3B2785EE6F10F6D4DFBC8BE8DC383ED4750E67ABA0A74669E2C53FEF09B69CD0
+9D14DCD5A8050AE52F0BEA66BF37B315DC6461CD782957A3A14088A7E4016815
+AC603ABBBB4E179862A20129AE3E4BA0ED6CE562F7BE1C8498A17CBD58E954F3
+AE82734476C567DA005C28510423C7914655D53B0CB094586A0509C190F64770
+C55D2EB3329FFB1D67E35D50533629DBD88986444EA470207BC789EEC011E302
+4B5CD55C640C3D1174E1EEC5F5A1E68FE677BE2D0D8694394C0563734E6F08F4
+FC35024975ABFC560C487AF7AC9961D912E620305A58907A0F7A9CEDCFC7453A
+290C28E1AF0441419571546FCB5442A20674459E9E4E56D02D6D636DEB263A85
+38C63FF6F4F07EBAE0E3E204E94C4A56AA818FDFB54BBA54DA4C25A55C2025C6
+CB6483BC3B55AF578CB4BDC8DB58FF5463D1FCCC63400481A4C3CF4AF3D2C61C
+A7ED38B6333A755EA1190CF54F7881D3F9AFF6408FE2DB0FB36321DD833CA4C6
+25816321DD6E830343CC5325331E765DEA567A8A1ECB8A7E54AE74C7DA049606
+EA4BE6A9E13BB0084093BA80DC98BD5E214F34ADC9452D4A9512E550FD4E97D2
+A64FFFC366896E8325A6A816D04BCD8BBA114F6469D3BEA397E35C7F91AC75B2
+2DDC5B9BD0BFD8C259E0467F5E874BFC42EC6ED7FDF043469FB69C9BEA747915
+778A99648F8F00738962958D1D87424F2667E3788E945895CFCA9EDBE7274A4A
+BC44F16EE2A78599CD73B41E189025BA088573273DAA7D6A2AA19474AA29C1C6
+BD656548816750A76FCCD5634B7599362FDC9B4A252BD5667C4260F1116FA856
+AA4F363FC6032974DD19B5989D7D27BD59B8A0ED42FD9D1DD2858125583F28FE
+A266081D50EEEADF0DD5096885D7DC706DEA8460D04D3900E9E081F92A6A1F95
+3EED1486DFEB20B3DBDFF252D0B2DC7EBBBD755FA3929015205986AAD7404ED9
+67AF080AC63ADE35132A4AD0E9C63C600326048179B6AFD1907C0912113199B8
+427C6196084922B5A0F5E1FA25052DFA4902BB43D349527468A9A8F3732DDB4A
+AD1E9E3028B8ED4623D8D1320CF8A1E0B29C16DAB4A559EFEAB0D234A1A7D8BC
+71B25D5CDE127BCAB2AE7E71A328F2CE9D3EC9D23E370A5E95848A00F2D1AD8E
+ADCFEE7E929F666EF63CC9C90CA02C2ADDD3216C3BA79F469738D1B2B6349F72
+CEF3CAC9F4B4596771D6EC39E61B9817439F0380A57A97AA04091D75B7DA14AB
+0B864A58E00B4B28F054910709B93B37AFE76A7EA777BBEBD9A45889FB52C6FC
+FF985679C9607AE167EAD42791BD42DBCEB89D356416A38007220CEBF4A3203C
+70DE5BF488A91278272E337A47CF8A5F12F95641AEACA5AB485FC5A316BFBDD9
+3052340DD5739FF1C1F850DDEEED70968EDB150D50D7A1F1C894FCB95F9B4CE1
+79721CB1DDC387073BAB999EF40FAEAF721B6BFE427276E3AB02143D3CA60AC5
+055757203EA5071D7730811D723237ED10B83B457BE6CB673B5BA4BC097C6293
+EBE8393443B750766B87534949057B7FC8265048A748D61C4B80F9109CC7E1EC
+36217DCA2709BFDC1682F85E75E0FCF3235ECF266A78E859AC400D5D02ED385E
+7E30492DF22D7D5B3035D2162DFF1795E7E9096BF30957B3F75481F31FA87916
+D25DFE1711390CEE845A3B7842787985B516D60A7F3636AE0D036A911771BA34
+866336E447DD88B6892A00BA6C017156F7D4F4E613BF163EA2F325998F046CB7
+5EFD1077B1EF7D9A40705FE2AB8C9D3200EB1E5903C5BE740B88B3A46C6154E3
+F702924AEFE30BA19D64C20876D8CF14877BE2F1FBA6D2A52D35C395BA35016E
+8A9ABD8720C1A79360150242FB188AEEA1D02D7BD70D15CD0A4261B185ECC8F6
+DA0D3C23250D6B4C188D10D99F5B0B8EE0809BB20D0189D2E8B6FA6E0EF6E415
+890DC4E9F8252F6EE25830D5BF07365B58E0D682B4FB236DFBE36F32CC574B75
+9C997F3E74832510AC57C496D8F131F610A607246C31F548C859DC34CAEB66F8
+AD4A6355C7D04AE6876746489A94C750471DD1A33FDFDAB58BE702D1EA89471B
+1E73286289ADAD1935BEB2F17B2EE77AFD9FB1E278C99F85C6EFC112C997DFA5
+66FC3238FF89BB840CB6B9610C983C24424EA95A2229CCD0D0B62DEA1CE377EA
+B18709581246A060B6181D0A99144212DD9D4430E8B213FD5F37CF5EC4E11DB1
+E3E48223B990724D7C8561A9FA5CDEBBD4BD866647653F4DE6D794FDC4005D88
+C2773247A5D6397CE425E51B96C741FA01EFAB5DA86E5435365671E2BD29A628
+BAA80C56AF17B725BA84E5ACC005C658105162FFE81B5CACAEAE8F3A22209735
+E470CC97B04B0CA0A969E41E94EBADFE40684E0D018007D1267C2E27F4176BAA
+B484A032B0CFD0B3977322AA298EB5A11ADCB2F154294FDCBE9117DD3FA00587
+83430596B2D432A471615ECA7789A6B01BB496309C8424C818357844F34ACEA3
+1B71F88E89AAAE14BB7EF728D75425CEECB1408334D2836A9F62D1B34A1BC9FC
+25A43F2C69F01F3217BE0487563E11A9DEBF88C7655947F0BD725280348F9AF2
+864C611638D3B78B26785DCD3E05C47D297A4C6BAC0840C5E3C646521C7DE8AF
+CE9CC7AF715F62AA0537E7965EF4158276AA8C7A1EB9D7D61C423F39CBD918FE
+EDFE99AD29C73D106F7F1C3DCD4BDBD56F6E608846E32CF26DE47B08C53D3521
+9F8841AF5554757D0CCB44FA7ECD5BDD0C20263D097D9975E1C41DCEF4D8C9B1
+97EC5977EA0EFD9E405B429D451140105161EEA54D4632D6EC6220E28C7153C0
+307E1A3953DE1CEAE5D51CA6C58A15B69BC2528B1500BB281C7E90F40453A685
+A329867D17142A7D2FE906E15FFAEFE641EA5109E92FEE41FF134E8BFD57875D
+D4F8270C12808FCDCEA5812812501F64EC79342DC192B20FB93A1A6E0475DB34
+B7A662C95EBEDAF862726ACF65393A719980839A9C05C705F251E6B46E276CB0
+127CBB7EA4C251B0672C01FD185C7FD287791019D8FBCCB391E9B9F818BD32FC
+E61D57334FCB2266384D8FDDB094DB86E87EC7789A3287C1194827A38926AE50
+F6DAF70C2D3EB91238D87148642EB0693F7583F0D8D8E2B6FAB7DC139B06CB0D
+AEA8C08415C14B835BB928FB81B7DE129A08502D89207B8673BEDCF22024BD99
+5777574A3495BB18121903550084E8FDDE6F940511F23FB95104E76E3846515C
+F954431752CA60C08E345CE8E6199F1041855242A7315FF1ADECA2A23B7218BA
+F7D895AAA7D5C49AD7EF03CF8A2EFFCC1DADFBC101895D17B0C3E102C7DA16CE
+7BC977E49BC120C4673E14F55D00FB30DDFCBF592AFA42A887322F25C15A100F
+82F5D3336804E68FBD0A470FD66D0566F0FEADAE76BE6A436D715BE62A653700
+BE088E4E594D99611E0ABE626A9AFCE2E7066B65295DC87B6A508FA3EA6C0C43
+2580AD8D9266FD81E825C4B0F908DE635B650613435DC700B7920A3B08BCD409
+69D7E559B5AF1E98D02169D4F2BC0CC08CF94FDC62D1877C823D886569EB5DA5
+B93EC5F0283B8ADC719A4831C107394919DF585AB3BABDCD98A63B153DF2BC7F
+55EDD18E2195CCAC549C9B4CF3B91156ABBFB56970EB689EAB871D6FB5919B3F
+21418C07BBEC9FFB2E1C7268290776B993363429B20A5D4C7C66D1B3DE0256FF
+A3A1157C96BC1CEF6F6CD55207FE4DE2CB26E799C768E1DF47654968F6A708A9
+7F42E3A32DAB67EF6D16146793C36FE6876F1CAC18B409D5A5A6408F13CFB9A7
+141D3D25FC0027F6B7FF6D186587BB146DE91530B32B0F1677C48C28D54F3967
+C0E9C3619F09878D2C2A6112DF8FCA1133BFEA4AA87D358A35591BA6F402E7C7
+404A078F95D33AB26E0595B5BFC85D6D8BFDDE1297DCAADF67E1A30DE26D504A
+7FBBAD316A050CB9FC56A10F0A6721E61E87A462711604C33044D6197C0A52D7
+236C147B09DA467579C62A09BBB25DFD9DA11773EBB8032D1946A35928ACA3E4
+CC94CC723D4FC49976F39EE66225584DC3537EA4138AF062951CFCD0BB9D5D41
+F119E670ED47DCC59E67DF658942835353783F571801BF33922D8EB886AF461A
+EF66824F731E5E9A50B153195536AE96FF7F34F21598C83712DAA54B780FB815
+36880FBFD56675EFF13E12A8EDA31C76F6367B818089DCB9C25464C47EC3968B
+AA0939DFCCFDAA0D60672A349E2E4768B386160EB8B41FC8F959D45FA8831BBD
+4EA49CB9F152FC8D730216129FDA998DB38810CF886864927AE9F047855AE4CD
+DD6BC5C4733B48C6614E9E9F7EBE404BA26E352CBFE1A533E9E74C78EE17A9FB
+148B178F503B2154264C21A39B323D8B4FF8129A8E101949DE2C081E28D05DFD
+CA2E08F44BE9B5663F331D34D47C8876AD9540ED7DAFCFF0216D6A50F7D9C00F
+1591AD6FB27CEDEE703D6C3D9D024675A117EBDDC79DF5D4DFC7F201DADCA2A1
+72EB9A21EB33F5C8325CF8D8230DA66B6C7BC504386ADAC40C00E20BDE3B5F2F
+111AF81049379BBC4712A78B6B0A33BF40512A1C42E3095323D07B0B85927AC8
+29EEF89786724EC48D30B8F2F26831BC7238AE0786936CE46FE7B2426A09D370
+460B950E850FA2D6710C50E78497C27E5FE43B7A830E67C5F28219D8B0BC1158
+0A2B02EB3E7A96CC1B6FC8B3DA8708070CE1C26AF0B7D80D83021FC27F0322F5
+2C3B92C29F738CBEACB1065948289EB43E334B5BF6FD7CCE82FE9DED9E3551D8
+1C4F66C9F9C1A3BAC534D79CDED98FB5A28F5E7A4650B4F3DC52058B619FB0CA
+3DC70998B508CAC359C469E488B925685590AE5084C4EF8572EA48DFAACE35AE
+B9CEFC91F38A26A2105DF9C3B859674F6B20F9B3A9B7E2DD2FEB80A899FD2731
+54AA5EC8D6107A55C59A9C20F2990B9DB221908F629E0E45E371FAA3ADE91879
+84479D6F3E3F8F2E972606BCD37276E9425B893233852201D8ED2D753B33450B
+1CDD8AD735BEE3AC8C4E4DA651748B2333B972B6A9DC1A133E3D695D6C975067
+228ED6A4728729D0AB55040AE154F668A2DE8CE6CD5BFBB28A9DE3F90E358BF6
+1BE66D7BD0409D59A6E3430C2C32DAF12D55A8356E25B9B805A69B828B399F96
+824B96589D5CED4A9FAD83D70D12E2CF7C9B9CF34E3F55423F478A2B8FE24C6C
+FCFD80E8898C26FE65DF206C2BE1C6439BAFBF809046472A059F53CBA38090D8
+E03AE270F456B2F63987F18AED9823DBDD39F8A175770C6164D839BDCD7AA732
+E63379F4A5C45E217A5F37AF8DE3F5F463BB67F57192F71AFAB06CD96B2ADCC4
+D9FFAAA11B176A5CCCCD8FEE8453579EE23F97143E6B176418184C0F3C004908
+38D73E689018BC811251901EC141705FC39D61A3FEAD3D869A1CBFA833AE9FB5
+659AF715D30854D9312919DEDD227A4ADFDBBC76851DBD3427A28B9C957396BF
+6E530F570893A2056E53515D0B5A9FB44E16F26039161683C3F4D34A87E1A631
+7C262B4A9D1175C07239B87FF6756B5AEB02E315659D938B7E55CF59C35DC48E
+006F444D7D17178FB459506521227674339CC9D1CC80C3BC472B026DF0A45F61
+A8940F2D6E9379B95F28AC3BA13987E685E4C30BB8F6BA6562EFC9D1BFF66E1E
+AD72AFE048DA95093D064B0E692CADC6DA786221CD5655FF768B51FECA289395
+7062E952A0347FAAFD0C28F1ADBC0BB121F0AD038DA635D0AFFD2F1D65A769DB
+2F69BA310ABAF715AAF91EC3C5DCFADA1235716A9F53A510EA3A3A21D1034163
+48A7963C8B12C1DA71A02EB87C2863176EFCEAAEBB5289568D37689921FCE677
+7D874CCFF1A72391F25CD922DA5A7B35A0E40CE40AF2521B567596DF422DE776
+A9DDF64744F8164F24985B081F0E73F43E43217BF0DEF9CE522CE604AB739192
+BDB8FAD799C43F17AA436B7CC97268A73D583BC579B95E56B2FAEE303A565CAF
+5BE8FD7F04C03417A3121966B549FB7E7BE070C0B05A6961733D4F189B78FD41
+412EC99F5B7E841DBC5A7503E5FDFC10E85E2DCF4D4BFE9CE967C09139082FA6
+F40337731B9B6ABC831DEE16BB3DF818EC2B701210BFFC32CFA306AF069522E1
+C05F3A0A0F93E7251FD4D57FEF2211F79422C5172AECB8B51D1FB521924E43FF
+54BA9A4FE04BCECDACDF64D00D736272937F9257492E90A83E064051ABAE4FB1
+8FDB08EC54106FB4B3289FB095E83299B57CB6276B78F465800651B8F7C8479B
+1C97E0E31CA741CE73234440C0C62FC373006DA598E550AC386DC6E0932F46A3
+8A0588C3AD1B862FC14D9A8910574C17984B1127B6985C969729898A9197529C
+2897CF8A077FF821BCF055C2EFC1948AF0569AAB1ACD59F15D648671E726F3F4
+2312EBC0E6BCA0F7B977B04020976AE645A5738401DF2D81720C4BC90D1132FD
+7334F2C852838583465DB27C834F3F10B1237A7DAC5E0136BFC785759F29F5B7
+CB0DA5C01C2AFD7460F14E03A73C818B313824B23B1B5B7443E3581E3BC11200
+D55AE9E7900AC167A7D2F20935FD72F33B695F25B6F08DF95677
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l047016t.pfa b/lib/fonts/l047016t.pfa
new file mode 100644
index 0000000..4809408
--- /dev/null
+++ b/lib/fonts/l047016t.pfa
@@ -0,0 +1,1356 @@
+%!PS-AdobeFont-1.0: LuxiMono-Bold 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Mono Bold) readonly def
+/FamilyName (Luxi Mono) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch true def
+/UnderlinePosition -88 def
+/UnderlineThickness 83 def
+end readonly def
+/FontName /LuxiMono-Bold def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {0 -211 714 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078984 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D83C82A2DC38F66F08FF34
+E7B34FBD496A97F0AE69763627499CD43525BDD2FA2EA9DDE51C821C26AC69EA
+AF027BC54141332FA165BFDE024DBE6CD20A8E4EF56F52F260AEC28695FE9141
+7E7F100CCF64993650A81C0856688B1D101418D3B0926F70BBDCCAF43FF4B16A
+B8328A5C459C7D6DD6FEEA1AD5049C4EF32D91C30962146E922D498E4D38D172
+CCFFA8F084C6BD440ED2C77C1B574CF8CE25AC39D2B18C91E596994081B36688
+EF1C949FBA04376ECBE32C3E29ACF83A8C36569C315CACB3DAAFC2FC8FF68839
+D9BF2A301E3E8F5B27EB82D8DF5D70444998F05B99D26AD632FC21A81D887E9C
+80BDDB95A1C0FB1F43386515E0F2903E3623B19F363F35885143893761E54BD7
+C9EDB5940386C62FA7A8919B57E4A4F0D9F3B4A4EA82C071BAB90B57C7A0F553
+BEC3A57EEB877476FACBBB61DB74A76D95DCE4D5C46F9686AA5176D6B65F0FFA
+37E1850A881EF057A62E3092D923107C691D32F3D619B05DB75B337EB54D5505
+2B7669A69A162DE45E9F900FB8BCC2BFB7AC5CCC64DF94DA97386D4E4AECAA28
+A9CFF3C9CE3031CC890E563F7A110D4690CDC5BBD49F7ED21C6E635952FE3ACB
+02373DD80C2C653E01525504AC37C849D6C5F25DF0C5C762C45A83233517EF9B
+D7F67A77881F6B46BE10E458FBDD73D225A6047095AB3B7AFE9FE2113751B732
+950B7865DE7DE98DDEC75D3D0311E902C2D7FD4A7F08F481ACB695078B930EC3
+6F3669F4E50345CE0A4CF1C739BD8A92BA29CF5FF0C3A85B687C0BC0BBBDB8D5
+DB96AF1962948038D1EC4ADD39D3DF966ABB57CA3017A28EB9B2148D1AB72F08
+899F5686A2013D69F6D3F5ACFB0503DCDF2D93CC7722D3F7D7486466F32741C0
+17F3D8F2D64063A9CBEBB462D4CF8569EFE4DEBE6DF3CD2F3C2AC955D8A20B1E
+A0199D05C93CE0F92ED01330A7C9E65E7ACE079CBF7616F24ED2AF540FA4A1FD
+5CCC7A1057ECFB91B02A84499F9209CE5989021F4D27B2B20D4793F6C81591CF
+ECBCC22005F89BCD1A089C36E659BF3BB92558ACE98DBDF10F0F6C7514356F54
+5A8BD7EA0E326494BDE14D91C6C74224FCBB42FC22FF8F819AC8CEFF7F28A56E
+A86FA3DADB388D04A015B0E703553CA2C2E5B688DD49DA92FD89107B744BDE7F
+85986FC9C688B97C67C0C4C555EC943D5C6CBB8BDA89ECEBA41037A92BDC075C
+3C2CC573B084B19EC7FF10FBE814B0226E216452BAF96DC3503218F49ED279D3
+CDC0369901B7764918E8071258114002152AD47B0ACA19066B5DDFC7AC37A6D9
+E49FC3A5C16F51A5B86663E15139A063C5D408C562951934700371469A49A940
+FA7074CAB31DF454BD990124F5E70B4B6D62DAFF949FD73DC758598B34376867
+3F7BCCB83086D6AED4460D71BFB2395A94A27CF34DACF70BEB4906BC6DC19203
+5512F6948158915E228603A5D4B906997D51EEA9BAD01BE45C36BC39D9C70778
+D6F8619B3814F7A3E9E0524C8DD61EC63E8B4E15C42FBBBDF8257442E5D2CEC0
+890F6B2476340387E8A4E21A09805F82A17392D2AB3CF3429DB5FFEFB093165C
+63525A9BE659AA22C7FA5DCB894DCA8D1560668636FAF723B4F618936EE634D5
+EF823BEEC25B274EB5E8912BF186A537D3EDDE38F09801E74D5885919850F48E
+A7A8AABBF6625CF2B0A9843E5D9A499C1047C490EDF9774F02A5CFE926BDBAE4
+18843FD4575E8634B27E536FAE9E09084D3F73FB29B9E4AC002E709986A90995
+B4EE10012F74A0BCFF2A6C0A69D945C19DF4F7070D60E3EF03508AF8793BD70D
+5D4BFC8BF5A29B4339C799EA8AA64ACA925A37EEE489C7FC8A31F5131F386A23
+C63F7D3C6BB60E204B169AA01EA12B590B9F0FAAD50D030381CD0C6177D28538
+377F92029F2A448F7586C7B14BA5BA08543D8216E6875AD18E974B39A53B5D3F
+157CACE3442B1948D2C44DCD88D1604D3AAF4487B4919349B7F0E01302261204
+50380294937386246EC4444C08955919A30118566A9B9D409F58255604A90782
+0583591C68296746D4DA1BFD0184029B73EC4C955C7F0BDCA08D8B85FBFA4CBA
+336BA29DF59226DB39C3B02AC5A906857EFB7A227A09FFE63BA35DE73434BDAB
+C11BE30C59E650592C518C0F533FA0CABAF3E2CAD23E69776879CC7A9225A086
+281FDF2C1F72FCA1723A5C2492BA061FB6D73F6240AE5708521AAB52F736863B
+B05E53ECB5C64A26B277F106FF2E0C9699719335BD32842806F0F866CE4818FA
+F61D141532738ADC2C8BCC1145BACFDF3BE1CFD92914C3945126847769D6DD0D
+6F44FC9D966F224AA72C22D0EF953B2A43C93E581DD907B611F3005D62C25162
+FD2149DEF7894A112449FF5F43D8F30CD7DA81D408E85F89DA78C4998BB8A24A
+38B9F346E5FBC6D09EDF332B8B7F8EAC363D0D01708C24655412AEB148E28D99
+D9F41076F0E7BBF10AB96BBD72FD05BA982F673D3D79270107C040707C6316E6
+11E4FB04A320621B6C3E10575FF97A28B60B30B840A877A5BEB0EFCCE0EF03BC
+F247ADE0F509EAFD6CD7F70B523E6E145EEF8AC9C17614BE65934DDC17545C4B
+50770418C185606C0A01B2622CADD9CBBB97E14A92D5230FB7ABE7D0D8CE9047
+F64225C6D488695FB9801EF4C76E20340721F7734AC114B3E6041D4C76C11F19
+3326FB3DE6CBF4B4C1F18B3388D6DDC000F04E195827F68CDCA2E0C411788B05
+4AAD40E3E09EDECA7817AE2B29316063C8579A90CF67D93AC158E940B14FCDBA
+3B82EBE2D4BBC8A8B22AB531DDDCEF6E4104314DDC2DF028E2F09436CFCFD32D
+0238D1C9C0404FD97DC627773CD8022632E4914D40283AAA5FFDF86914140D42
+0C4350BA37D3CD49E1D79081462E3701DC0A9E9AC67D712BF7CEC27C1200138C
+9729AAADB724BB9FFD5B831ABABEE5BE8C270A1ADF85A246ABB9612F181730A2
+30B9886D897C2EAD9AF7E6A47DA049373049E5E4C29F5B7DCF2258A1AF341CB8
+C5F464EA85663A9B8132775E4B8620420750161C419F88594908C64A2BE265B9
+84A950C8B63C065B1FD4F78121F582EC875F396E0EC8F6851AB87C36C56EBE7E
+036ABC0D89D9FE8E626646AC65DC5445EF3FB60CC5C50A5118F9F248FA15B3B8
+C8A88E168BCC5488D10CED157A8EEF8EEEADDA64372B76B944685B686DE8AFC0
+F4A376200790E0D0DB2172C80E6BF90052DE847633912F72840A5C745DA4E774
+014841DBB53EDB729DA7AAC1D3FA428DBFF252F91BDCFE3AC31C2CAEEAE29045
+DE7F0795D6D924180292E18B3955FA93DCC555683FCB5FDECA34EF0D0885ABA3
+C7BF9CC897C6E5737AF9448C952269D18AAA18FD1D3C2F5DB49D652F43E6CB21
+D22F7ACA596DE470A1264FA065C0B2CE3C58DDD168BD28D6A2FE2A41045F3219
+AE87AF49E363AEA5164C7107CDFEB8BACAF39C795D98F9855E35BEA4482F78B3
+8A62DEA5A26336671AE7D96AD413A2A5E98111D319AFF427420906C75D4E16E7
+AB85A37972380840CE59C78273A510C819EF376534266081CDCF3313C83D7089
+71BF31000698E853973A6D275A8F215677CE9EEC26B5FC21E481AB9C189C37FA
+2F7E2A63B4286E1AAB933C0CCE1AEA78E1F7B9F7A16DDCFCF350514F1E671D3F
+DDBB3CB3324AA85E9373060D2FEC1F218A06E4A1E6F5DA7E3B72511C5F0F348D
+A221902C405AD22CF96C4A14F09BE984C710AE0472E90ED804C33BC2797D5F30
+F31B250C791B0CDCFBA202DBEDEF03C144D31D7431B7667F88C1AFD9E218A08C
+46811F871812FA17AB468062FB0E478B8AB84B9C06208C8ACAC16E34B42E8B9F
+747F8BBDAAE6736A5A4BC9C494EE15356CF6F02FCD2F52D4A3F9CD5B472AA89D
+BF371F08DDF4FAD324B46BEA792CFD4E148E33CD0CD5C74A76CD5CB4EC885420
+AB9DF5D757C33BE1CE9AD32E6B0179C4C511CC984A5365E50E12CEBB8CC71CAB
+572054A7DAEB7EFF1025B60BBF1ACA5C3A701396DA00C6F77E7B86F1BD246393
+1030F1B6A8D13F6A0D3FC3825DDBD7CE36CE55612D3516EC214AADC5ADAC59AC
+054743534AC8068A67C09695C7D04341D22F5AAAC4086CF370583B93F417579D
+7392D7B57928230688C7C5B1931E26E843B8FC5D2D5D09A3005C1803BEACFD54
+F5A8BF2A6CF7852616F93E05913D188AC4E2F9AC3F2C1C455B0F0D1E32D9752E
+331E7ED9F777FDEEE5ECA4FA4A27354C1D5E7E388008D7C45456CB361F3E4D0C
+AB08D54AEC00286398730911A5F145D7DDA76D696F1DC17C0965A4B0899E8B4A
+7AD364ADCA31D1A0714ACCEBD2BB7FD77A4025EB94D4436925DC5E460EEB013B
+359983AEF8637A929A04D9D5A963AE764FF82C42C62FB220530FE59018A89D0F
+CC8C3E2E4B918FB14279F5D0ABEE4756C3E79C1CA70359FDA92487D42B7A2943
+3ADF2FDED43EEEF0108E7EC8778E14C4C0BD06B6687C08C1AEC415477176C892
+496E84FD5E9A7E4DB11287A9605F5F0CE1B71D3C198900C67B9B333D10F5F331
+CFC638F80E03CD59C5DC5862BF8A18B6ABA8435936A3E2406AE848EA94716472
+A726D75C94BBA07926745B20EFAC14EAC276B477B94FACFD9D664365B1CAAC7A
+DB2BA6B75F4F83339CD645428F0A5F498677108DC473CA984370A7D6A9E295AD
+AA68CE2D5B435915EB0F6B72A9F4D49E356050223F524A270A9DEDD0B8B66822
+C8E94A311C4A055EA18BF0292CD25EAE689C8F932226643B5085E72F5FE0A232
+6064C6850F189B2C46F9EB94966600A8B7205C654F33737ECAF9B4F3FB3CA0FA
+44A85FE7A9AAB211C6B4062052C4C01685F58F0D2786585CE0FFDD1B348F2FDC
+A19E31CEC44C59BFA74997E570EE0FD56629135F3BD7CB2B6466E2F031DA6E8F
+11813E7118A232D38AA3EDC86ACA1328FB9F870174F4D1BF511531FFF0E23278
+9D29E817441F255261318894BB2CEDD0E6F8B3339D888A2C401D7009E7879D5A
+7C6DF9C8D97C5221DC65181A96992EDF4C983DA8C0669F3D0BAA4DCA2FB17848
+F34F69182E6A129A983A1FC394EBFC31551185A750114B383E01E61CED8637FC
+B4765F1791D121B8B1D08035B6D8ECB2856FDB43B25101444D160E02588E80A6
+10D55BA3B76B5B9C6B97B4C07A0AEB124459603BFCF1C50DD19776543EE9891D
+9FAA53093A933077B5D3C0280679818348E77835C679C603F46714478BAFD156
+803B736D4CCB3F1C1FC2192B2EC1CF78C36FED5E0496B5A8F0CB1B72407BE183
+0BAB9171EF79069EC940B9B13F69F952EE781A811EA4A0A7FC8A5E5BE4FC60DF
+45874393CD027EB52EA2DC1EC163152F3B74B7E7D62E042093CF3119F4F50179
+302EEBB352C362A6C2DAE8A251156664B492FB60A1DBB7801DB26476BCE9E78C
+444040DBB110FDA2783A62FBAD6A95AB513B292920960E7F630CF7F5C2A5785D
+5BE65897155D32CC657E231FFEE30CCEBFC00C375E105A5B613FD2C27A6FF7D3
+92C00B7E0BDCC70A6E80F5BA164F116A2732526B669E50F5F6BA575E37FDC9C3
+38A49BA0522EA697F517D74D533BA28F928565985AF5E32B84BAF188F2B9B952
+0C291440B04DBA34354177783CDD82AFB65DE0E179E638FE1BD2EB3EB20D5344
+C4B6E5D639DFAA78A77433D36FED5462B6B090E3434034B8BF00BF7EF35407EA
+9F122694EBC6B6B4214EB779C94E6BBB04998AA57249B8D84353E0BDC605CA98
+492862A8239E8875A9BB5ADFEB966F0D7FCC355E3F0428E227D8B41945257F63
+9F6A6A69B7A902DDBE08D9FEC8233E11BCF15C1458C19F9E487314C26517D162
+9AFD021C75353FE5A161EF3EC7E06B616AF1447602483A3486788298AF766714
+939A160EAABF06B61D86CB02F6A958690D38C86BE7998B444B7A2B74C6BF72E1
+B9A59AB78D20C121D1AACD208531FBB2BE37BE529FBCE24D229CC242A1FA721E
+AC762979A4B92565B6BC94EFFA2CD84985F8FFCFA1BB44503BF1265D52370C53
+4B445AEC55B12E40F05DF383B356CED44B5345007B9F3454950F12C8E87E41FB
+72715838A27013F689D6B55925C49D92E0E14CBE59D9585BACC8CE5D62F86F27
+B51E89884EF529F27CF4C61A28BAAE981524CE3714368D664AC4773FF8B71728
+88C3E8878032EE246359A97DA80F1DED34DF09EE5F249B364BBA41BF81D16AAA
+9ACFE092E3E491ABE1C40A53B1A50B88788AE14870079175C14AEAF7EE777437
+8F4A7A03178AAC032EB320DBD8E0C19C0071B262C76913B787E1B3FBEF926A49
+CF96ADF8E3BBCC3F679294B5DBB5005DA2294848229A557865E0116AADB4E6AE
+94AAC10394B4FA2872BBEBDDC869163E50CE3BB2925B554235B6BDE9A29CEDB3
+07DFCC3D8AD0CFEBA9C7AE10314771DA1E6C3B927FB950ADE62D1FB8AE7A3CC9
+C9E0F4484D61A6C9F353B9AA91A186DB859385059544FC85C15E1A3357BEC89D
+92AF74938D1B56B7120B934297A71F1D92E93658C69E7FD4B338F59FA6F6C337
+427532AB1A4EADAA5FF1A8C7A84F444F81D60557808ECF3DB67C052EAF4A9FF1
+0538A114857BBE83BE784E9865B00EE8B407AD9E2B65E402EE6CF733C9B31603
+25F2C97BE78D94A51CA51F28ED9E840F13057B1F21C30F77ED6FF458C8EE4DFC
+493B64190AA9C8B22C5977FE16F31C3ACD5CEE976839E2456916EC66FCB30B44
+8FEF1B63D552E1B0F049C48445DE8C80F8563E9870134038DA5546C7E7E3A1BA
+1879235D0F328957290810F18037833D7A83558C94EE9856D3D82A3AD00659C9
+3E9587751B5BF2535FA1D1A508FBF86DBF7FC7009E1A542150F8F0EA356689A9
+DAA05EACE716C3496D4D23F326D4634B24A419F483154FFA9B81DFBFCEB31624
+1C87449BC00AADF4DA13A25955485D0C7C5CB9AAF29E1940B0DDA19594A8F7F0
+033C60CA8C9057879F10A6116BE5991F332AC272834D99344B0E476F9B2034BD
+EEBEAD5D1437C0B9E10DD38A002BCB01218A40844A91FAF28940BA11A40F2BAC
+EAFD82E977AA41B4971C69E82232A5018A31F71C1E60F2635D59DC40B233FE47
+C29D0A2A906955CC69BCB72BCA6D80E9B84F06F618BA1C7EFE99A75FE35AE359
+730863494339E0F2239191B6E7C5E8FED2F43EF6B5789872128DC528CCC2D023
+AE7A0BC6F9C194E642F09B78D898D63EE3EAFA611DC428C24CF363F78A174C45
+8C3C91CA391D7F1AE652C2D81DBB7F1A5AAB745AB08EB93BB316CCFD7D353023
+4B7CF322F928CDD5A413D60669D062E5C59A0F2C1D6BAD36CA9C5F5D50BF48A8
+AB77EBE65D054FECE72D08CE3A0C1916AAB4202D5BF4F07998534C1CFC49350C
+095D98A12E1E1E6A5BB2D3F3B6E6DFFD926A647DA7DA8EE687AF44DDC9FE4A00
+18D679F66287FA26D6AE4075E430BE22684B42EF75CD59AD72C2E97383D5AD52
+1867C37AF8855A4A5428D125DD22AE0B2757781A80EE7D425B7271AD95B96B81
+2092E92DA4D04D9E711AF88292C56E35E7FD15C0D12BFB7F244BF4CE5B589CAF
+89807DEA042EB5CD7615FA6551DEC1CAB933A6218E08C02443AB912C915A5E95
+DE3E2B66C64846F9FF403DA1642BFE9F5FDF0DA4BEB832D07FE6552394558903
+82ECF4DFB28B7E5FED973A99C0AE3CC792EBD9E7F53C84783AECAC10F9AC8661
+F023093A9F37141E27811C6B33FF8614AFA7DFFEC2E01F0B3D60442F6C62ACF4
+7274D7F52AA594A3A096EAEAA2C161FCB10E0AF00ECBF9D7EA6A4533B7F8EC31
+FABA55E1AACA89E5D02114E7FFEBA84528FEFE356A48090A59AC39F358FD8800
+0AB1486BBE16BED95607ED284CE271D6D9239F3F23FD403304C19E3132E2F3F2
+B7E1323468C66444B2E296E42365A9276FCB51DE065D6196CD4ED0E45A096DA3
+C45D8DC05C009C1C335ADE0D874F714C8EC74121B386483D2E67B8E7466A8ECB
+DFE911178ACC242FCF9DB814498ED313CC6199DE67133ED4EE9253C6EFE87DFE
+CC9E4C6F2950F1F9A93834BC359215BB37EFFDE944344F922B2AFD7723A45F44
+DEFA4E344C6E8772EB6F9D89E850E853E8119860A6871668C8A062869E15EE11
+64EDC397E138D823F520B8475FB6703098E3F779FD6446B2E2B27289B5D569E2
+C2B5FD00FC05A609572F57D14801C5EC159423E4B0AE61ECDA938424F47E99AE
+BEC534EAEF22396119C3E79AAB1194F71044A8973FF94FEDC317CACE3FC26E25
+8514B5C039CAD5B2E83C049D31C135EA4BC2167C44EA92AF8F45BB777BC56EAF
+BE7CB54F02AF2263EC1AF29C7E8D548ECF88BC262AA04D6F7DF26E5EC5E2919C
+52B5A8CE42AA960EC9CDFB35F2DC8FA31E0DD5FE5BC18A7A5FBAB0A509CB7451
+DD4230D95D6ABB2B914A93F42D0B17AC931E4814AA939F90E389EA9DF311F834
+8A0A1A86602B07EB1CAECA4178A885C11CAA3710B6DF83DA05AC6169364E6EF2
+BB75559A056929BFDCAD8C30CE83AFB66266D24D308A8A510FF245BE51B49A0C
+C608B08EFB13973C7BE9CBBC46838DE5BEBA093863CC9B896C1761E6DABC0CC8
+889BA134FFDA108C9B101AEB88E18B52FB151DD631ACB1CACC164306CF909452
+C967430620DE41E0BA22C811F5D6D728781DAA43B2279C9E301096D58DBED1B3
+EBE39E8444AE50AF6AD2929AC1C2FBA27497A0AED80A72D515403B46DDBEC309
+7A8F8A7E1D840E4D7F7FF390A0176E85D09A5AECE75D167594FA3F7C670068FC
+31B055894450460F91CF36780916C17E8644C05EFE80D525B2CCFA1FD1B5FBA9
+2CA3A87AEF0867E8F135086BF78C43BED284339040754E8091EE2FB26E58DCFC
+9025C55C286E99D5CD2B1C0767F1FE0D89BE87146C8D9C21118267CA2D9E15E5
+4DF80A9E709C6E4D284AC29AB032FCE2AC173A4381E47FC8876716DB39C63380
+E0D5417D1D1ECA49D5414E93DA59754653498A27B796C04CA3B3DA37D326EB09
+5646C20F0CF2D34D45758CF49BD7CFF0D71294BEF0584E87D06D4C069A7D9256
+B5AC4005F524A46A97574FC42EF2F0FD8382C26A385A3437FF85525F80711A14
+B928853A5DB29B64475D06B1CF33ED36396BC1FDA09B35E0857B2424584D5E9F
+A1CD56B852D910C67EC88AB907BDD4F94A6CDC9FCD1CA1ADF7D2D3D3F4C8EB88
+EDDB632D8430B157546038CC69FEDD9FBD7E58BEA5507520C9D55910A656511F
+273BBBD804DB9AC2CAF9D0D02F6F9420C7E3974B2A7C57D74B562155FE7D1679
+904503BF008E32DE50A007251D27461F62277E50DE498C0432B48F3F8AE9B589
+919EE62872BFF2DE14850773B86331895AB20BD96412A52E9B87D06DFAD62EC4
+ED02516D2FD8866B41140D53B4AB65DFABD08B96E7FF634DFAFFF3403BB6ADAE
+947387754DE0337BEBB7CBCC8CD4D0BE5A2FECC73DBEB5A3684979939F352E06
+CB07BBDE49096A91872C1B77BFEA8B6686354E53009577C2AB75BA32D9E6A6D9
+1D2324B105428EE06BB04B862127F0DE5A849AF6647AD7722B86E1E42C58A940
+F3A7CE22C828D84B84D80BB7A3AD87E1A16C2BEDC68E9E3ECA734840614E1480
+F70C26D8D185830FE5C1B2E6FD3AA633E5F856A4496574405310C3FD709BF92F
+23353CE76FF2C5D22B5345C3AB129F107D478063807E9EC522EB4905F59F72C9
+31012EE90C7A4412D01832AAB0F8B0A84C532ABA1F6EA8EB84C91F16C5EFC2D1
+3A9C2F5DAEFCB1B00936DEA1988049FB1655BD5C1912399621DD755D506845FE
+A59C625AB92649383BDDF1CD48B33CBD8E207CC63D7B4EB314354F5609A68713
+5EE512AAFE98A7329AB516F89FBA8BFC6AF3AAF189CDB905ED3F63F479CDAA3B
+27A384522D571226623E887756EAF7539BD2FEA33ED6A30656A3EFE0264C2E0C
+44E065EFD20E0961F86B2067FC7B60A3201F789E8712D79528CC5449D8A4BDFF
+A16F13C8E077A259CC71DEA56691BE117BBF356B78074CED1F54C9E16DD2CE48
+501444BA0AF54B1C84F5415CE7863DBBE37CA30688D5B6542E9E743F8EFA5A46
+4F46FFD30F801D02ED63B52C6C0AA0750FD82ED149C8D35DB524C424B2DE7D17
+A886FCAD0D9A0EDF04EA5C4072ABB8D07A6589E9AEC0C9E1933B94DDF9350751
+A6954226F040D8D13F7F34ABEA21CCA64D59076F61885116C307A95E74F52324
+8B1E8A05358FADE97BE4703CE7AA80047BD200F59F4CAB6EADB05A892469C4BB
+3816C606D39BF8B7CD0B69A5CBCBAF35E7C9670FBD4CF8A5E11ED3794308568B
+174D42AA69F3FFE58333619BF448FB0951D9E627DE153FEA9A4F2312EC701C2A
+9915D9434205857AE251095E8E856D01C4F1CAEEAEF2A7F2B974F1C27EAD3976
+7479273E36A7AFF9D4EA352ECF7642CD0CC31982D945EC00720286E2ABE0F9E1
+199033AAA3F9F0142F285B88B091E01249472F339FD8A9BE3ABB16DA3DF606E4
+2467780732D6CD6C20101FDE86391D4CF8BDCBDC0A112E9339FC5E928792B62E
+4FBE7770C4EC526C4F5CEAFD25B3E4D1A0B4F06B516971A099299D8005C9231E
+D06688D4AAA4550604F7D1C9294B74B159B6B0B15CA2A5395EF6EE355E59BB68
+DD8B01A0CC19ABEFD5337B00E8079FBD5E5CB3188C414E015DB57FAAF330FD45
+E62887ED507092202F32CC49757032D13444DF1F619FB561379FAF4931BFDF62
+3FABFE5B949829267190F61A4318678A07403A5FD9FC8C2F10EBD819D6EE9C73
+EE3D852B1DB42EDA74C3C63EE61762EE0C8D5582332AFAAD3A3BA0B5FDB17836
+9BF11422BCD69EBF2F11C67780BF0533353DD045AA551757111F11F4FBC067C7
+84486CB7A486B602F9D7C56EF84A804AA08A740E3BD2D647D1DCE018B4D225BD
+DC9607D21377E450CBF76AECAEFE4C4FEF2F72A4A44E90B28D2F46FC8E549C1F
+312CBB690F9D96FBBBD77827158FB5C2DE80DE51D17BB86A4E634EB917ADAF1B
+00038B6028D3FCFE6805A72DD10B17C7A434C68744F19A260BFCE7C040D1930E
+B4B35E0A3A8330A6E197F359CCAF0EF03502846C784ACB3068280CB7D3095977
+9BB914063E289DB7BDD5F8D50B9D8B64A6259AA947FA3AAAF20FBEB3B020B169
+8A2A68D6C899F8CE32BCA97D75E9921883663DDE2735439F8BB5B62BF61463AE
+947A0E4862D480D9197054727BA1C1D3E34A0310DC8D30F24AF051A384D5CFDF
+4DEA1DC83277553715A026F0B676FA651D6036886319455F265C4AD78FE72B41
+9C8A0B613A4FAED194DFE836C15F10E4EBDF0D2779B0337D54628F4CE0EB0AB9
+2D67DF7D287D233815462CBA378BB4D05AEA230DD884BBFEA756954EB0A6F304
+5169129B2D3A55D3ADAE8017B3D9CFC5687F2CE00BE59D084AB6ADDC8D8DF76D
+B9449917623FFB4F924EE1BD40A536E1380F22BD07260D3BE827E62220E0FCAE
+E21094047696EC4378722E62F696C4FFA6CC92D1D5F719E472CFF99995CE95BC
+7D3BD9A6172195243343868EC7FC4C51DDF43BE6649F096C4DDDBF6498BF6208
+A7FD124B9D7CE06E89C45EE3162C8505255DA806684280C4A7487692862096C9
+ECCA26F72DA251733B700261FCEEEB7DDE3542FA852B39707044F5E34AA80AEA
+C4F54814C72C5480AC15478E28D7898557F7FAC89720BE0C02B726F674ACD9FD
+635A87EEB2BE08765AEADD636E261625FA9E93E77D954E5DBA6A2A75D431879E
+5936B3E396B3E681F393669F20884B1D75CFA3714D967A7C6DA12D31E26FC12C
+96CAADA06D701DC45E00C1903A8D9BCE04B19DF613B54AF7B6DE33678078C03D
+F1B0C31A9B87FA42FB434F105633C646E2A45617D8352BA18F5F9EFA6DFE5A0A
+2FBF4F79A0CC5ED15F8B9EFE6BFBD2F7F7ACC99A7162F1D0491ED4208F2A7E23
+1165C3D65FAE7B3513818BC46A9A2277100867AAE0DE763FB6C7319C933F92D1
+4A8F8B5B5460200FA193805D3972F18B4B3DE7398F8C0A4462EB53C54A4CA42F
+93E671584DFAF63AB8B91FE0EB29A8E525C1F137E7673F632B0E1E3864E1AA54
+D22252FC1EEFA76092E85680AB35DF214E761395744BC84E03D6F2E50D15D1FD
+6B0C0914E661159BA887B856C49C04993C4F3FF4530F45CE0323752EA175F97A
+F4C5CF8E8F103FBB38295D016E639C931E1421762C075133DA533E5F5ADB6CF6
+AB5BB6C69A761BB71398C0E1C15E112489367193FF3464271F439E4ACA94F47B
+8855971F042AD99F97B049F6D57FDDDF401551B4793C4217851444D674E2E61D
+98D1D55CE1B7B00A82E16C25766195167C01E3BA58CAE1A5675B4E9DE80EDCD0
+96DB71DC7C2E8B147A22E683B900DD3EBE402F2DBAA6DDB847E5AE7D0D95D4A3
+0E5EE6E1514391A69ABCA5078C96E0895047D2242316792BC99D59EE40293A25
+AEE147A96C9B8CE778C4ED454D1E1BBB351966B1684FEFD4A8E707FDD5EC675D
+96181FD81641BB578C486A0529FA2EEF184B0402BB93BC400B1A29DF5ABBBB03
+774499655178A19FF518E5241C86719B1AD5C04A0775C0620F23BF19A1DF3864
+9219F74D06410CC1C85DE0E172DA953238F83BB44ED46C37FA1841D2282D16F2
+5C3C9D3A3897F880D49BB65E9A12432F517175C2F3F12C5F44DBFF1094EA2CF9
+0AF10CFEC825F1DDBE0331DC70EB7AB9736DFBE1D6C3448B5245AD469DB40B64
+D1B89F7E083156D3B44E7C27ACBC411413D69D515FE03C7EBAED6DBC7CB3FB7D
+DDE6239F8A21E6329C07E0C601D4B114BC3964D921D3C15BACAB7AF7EE202B20
+3FEAAC53D13F088A932409337991D5CE4D4D55FDE4D515EAFFB5E47ACA6207B2
+F059EE7A93965F859AAD0EEF2A6FDBB45408834E885747349244741526882DBA
+7AA940C038AF5D0909C1B6F163CCC5A9601E6F7BC13AD1DE6A699100F9E2BC5F
+EDDCD46C3147E747C6D6006C05988AA402A7C123F015A271C9199E3338B7FD85
+B73B31611FC6ECC10F203C91605279EB6894304A0FF6B67A7CE10BD48E44C0BF
+04395105279961D56E6D3CBB3F5ABEE1F069FF512D70BD9C81BEEB62710FA967
+2AC750075845E2EC4B7826F170023D7BEC4719EA2028AAA3EE91D3E212DBE02D
+53CDA397F61A4CFA58543FF5A5AE88D410EABEF0AA0CA8170AD71922181CD387
+96ECBC28C88C3199618DDBDADAB8FD6B87621B731D91FD6DCA973F2CB347C2AC
+110544A352FBC02B408AF4475AC4A5792455416A6E9184C861B4EB02F6D565DC
+EBA2A752C0C9EEF51CC5C0EB286ECEBC7FE5303AA411F14DF5B569A271BE0650
+BA2061861610C64BA81442A8C98B5334CC41603B00FC7D49CBAA7E6257EA6F13
+72A7FB4FEE1F7EE3B6226D7564B105D7902B3DF2BB43286B6C71A5F70A67E926
+706F301CA4CDF22411A6C91BA7EF405FA5EECA8865E2A12290BC2485714D891E
+CB9EA86E36EF1C7CC6BE96AFBEF493420FAB5195DBE4DC80BC075C17A1DC6565
+AE1949B72A9E26D9E832C08CDCFB37B73BB0C80C452EAD2145E1C217A53C1E43
+6D7EB4F6D035DD6A6852F33E561043F8C9ABF09AC746E936B522522D1B5A4A70
+7A0566D6F3BF82A29918D3C01EB69EF77776236EB876853CD9C599D81E0ADBE1
+F909101A47927116919FD881015CC23E7280DF2AACB0D0D442B337952A691393
+7A7D996477A04A0A7893B22E6DF75C912518C0E80CC57D2F3011F7CA639FCD2B
+5B69DAADF0882629EB56CA6823680B247C5131EA52B097977AE71829EB7D60E0
+9190E3B34BA4022932F24166659795E75AE0E286268D84F7D57F1ECA608EB49D
+04B7BD31A76337C487DD156A131BCD19154ACBB7C36FD5E11FD3DD7D57684E4A
+45861AEEB590967ED45ACC06D360188912A89BF7F01CF4430DC196B32F29414C
+8BD6A961882B3999A3EC9CED31B063AEA557667AF65595B67ECBA01F488FD07F
+4684052C4BAA9D038B4CC8FE1C1381083CB1A2F7DF95A213C46A272C45F7AE94
+47A605265A776BB5B81CA6A87875B3BF33A2E055F54E73FBB3FBC63CA47C64C8
+21D776FB9AD5FBAF9482E4A24A556B1C1F92B3984105C1C466B340DCEAAB9A41
+7869FA344F7AC673AF6D49752B7391260762B8525F43221A86D87FC74EC3F92E
+BF23C1F2B04CC63F9751471E3B399B683318762DA5742988FD122D1263064645
+079F1DC46F7F66039AE0B9D42CC2B387C7C47758426CC1E35A249DB3875A8466
+198155C887D5502FAF403650E6E336CD5366FDA28662B818BF5C5E2BF484E207
+498C3CF05C037BCDC3B68D0FC718D9EDBEE4B27CABFBA52DA116A60EB766AEAF
+3D16F3DBCFA065720704DB80A7045FBBCB219A4F679179B5B7E5851A4CBAF2E5
+20B4FA5B5382EED902E6CCA8EC283E2B39726C5B79AA72B45CFDF9E30EC4D5CE
+7FFF76A90F2A3EBE77E017CF6418C4CA1E6DA141D974360FA597273013ABDDBC
+A340524C822A2DBFC5E9551D79745595105EE1FF49A6A1E33516390A2C59FB71
+E394B13481C5179DFBC6A7E698C0364D93A8830F2BDC3C7B4B603D64BB53BC7C
+67270C93AC504557DFA97050029D6D7B85EDD9719CFF04581004BC908B358FDB
+6DFBEE6183A0F7AFB84040299B04C560ADA8AED59E43C2036F6DA09F3044A781
+DA12A23145719FA0B2C6AB6E10CFE84D8466BBD176EB17B5FEB793A917B3B604
+271F299780A5F33E212CE334756D9768339FE866DA429858CC7A6551B192C80C
+659A3627BB903D74E8ABC3910A662793BF0BA13CCBB5361ED6D1B4AB6AD299D9
+DB7CD8E592D2D3D9615AEE2BAA6E67A46327E29298B0E91DB801832D66788D18
+47CFC4A5C9B8CD41AEA2366E8D7D19E605D0474D6A2D9C1AB44CF5CEDFF9A678
+9B74A83724CB185EAE4A58BDD2ADB9941B41640EEBA42C3E105393639D84152F
+8E26E93EF7D35E028244785683C8A4D59566AB8D2FF2906C0BF7C4856AA9C3B9
+E000677FDEBAABE33B23F13077EA25E1699519624C03916E3CC0136CF3A3A468
+F328D43F7BD1C6DF305206F302936B12F3529421A81D0D5026FEA5B811029790
+42ACE0E4AA1D401D15B283E2959F3E130ADBC3262F73DD1CBC94EF659860A2DC
+1D9ADB113C701867A4E62886C63FC43BEC3461205A37F1307061C62EBE4509A0
+24A95211B890842C00ADACE0B75EEAD4031AEE5EC113B7303AE4C42D0A263021
+8882592E518CB3274E367B937274A5F7FCC9F6E9D36B83784C4E17888FCDA3B1
+CC0F9E41246CB830D282370137AC001D9E4ED0351BBB39DDD7F19A78FEC3CBE3
+B875543006CEA3BF1724314ECC6AF4932DD9B5CD64A91D5A72CC2487A2F4298A
+34A1DF796D1E32DE2A7F12685B33992F92886647B4CACD145FDC35C5C8317DEE
+C9F58DC50E135F65B1A0A1862EAE22F1056EF92A2ABACDAF4A701543F274700F
+4FD59D4033BAC20817F1C97B41466ABDAB3AF22DC3F60A5A5C1096A2ED73E84D
+F5ED5392ACB5FE5027D0C3B1D47249D809D5D7C7FFCB0AD72C6E54438CEB4AFF
+E7F1C42D158C78144B7073B8A1AA4AF5707CAD9E9EE68C45C32B1F2B2C876624
+163DB24823427080D1F81F52BAA3C0BDBA113AA6F24AC2F01E7E70D6F7754BC4
+BD2DE4C46D398DA4C94DA7F8A38AA2EE20A9D124291FB3649DEBB4A5476FC536
+56E85EBACF09E3B129BD41748FD8972F124DBB5821EA6BD7F26EE1DCF086D847
+82D0C7D60583B1424EC98A3B436A9939ACD437CB3B0F5DF18B4BAC9FB1F4AF87
+0854FE355E5C8790F5A5BDD2DDC835BF8FAACC22FBAA6589E843E04C2E8FE52E
+AD35EA2608BBE0D77184EB4B4D211FF2CC58D37E3D7638A57551D4961F9E2264
+A7DDC677F263450D357D482B61D91D2B1EC15F6DE08864A5693707AD46266ED3
+46C1E5C8D14962B82FB881FCDD2C2C20A1AAE200E39FE74E8CAF7E396F1FCBC0
+5A0CA7EC0D2FED67B17DDE349A72923D2692B565D5B752336F4F49370878AD9C
+772386F42C7E2FD66F4B8C9558F9E2C078B7D140A5E6B0D8C48E5F0196CC5D66
+553EE79C3596349568293464FC361AF011F8148B47BEB397A4F8A0552E416F02
+03FD3967E0AD6A928DC1DA73488D2A093E7D587A404F909D24A57CE63F2EE6EE
+C945CFB2297EA4E331F41A6B8F67843B61C9226FC429EA62FDA4F91C98C4D7EA
+D2EC09399998F08AC9C2A3602018CD28B3411218D90A7BD6A310427EE54B19D0
+2FF1A39B7363D31D6BCEE6394174BCF0CAA755B2EFEC05B962B7E28A73BE0BED
+9D33189E82D125D4EB6E5CB370705430B78324A079769FBF7B4DABCF305924AD
+1A8559ECEEAC4D0967AC739420C712B213B9A84C5D930A7265728931CB35C4DB
+1889EE886BBA68383E8926821C7EBD13CA2AAF9BE7C5090F9D301AAFB1001C75
+C52BFFE1B81E7F415C38F560E902653714B853FEB28125DAA168ABF2EE66B6B7
+E4C0AA21E4B936F9F757188899EB4BB6AB3D708429954F706B12D928E264AD64
+1C4AB1A5C4D209D757DA7857B383FE9AC3319A9380603348A700BBEE4849D9A4
+2D7C6D49145FDAA73074B8F568BCE751C0A9023124C71F8ED7D8CEC4FB01E841
+EDEE9C56BAC00DD17E83CDF905D1B8667BF13C3B8DF717D23C6676840A152215
+ED17A14B0DB3602DF9170F979D8098412345BA610888F3FE450387CC46D47FCE
+2241F9180024331FF12D713DFCE680F167E8AEAE710C765FE0F791C065DCE040
+676C53C797AE7F26C52CBACB82AA12DA9A14846EAA73A6F0F98A628CAAE12718
+A9C30F2B1D13A4FF3BAB73CE32593FD459A9ACC4FE7EAC78E893C9A37BCC8363
+D8DAA0049F383F1848F037F0250F5D9A07E0D6271F771AEFEA2FDD6E298DA77D
+41CAC0CBF6871D2D8891B297AF8927D33D6E7A16974B97B7BEE5FE92ACFB9442
+3DBFC1A323C2DECA0AABE3C44C4E5FC67E31AFA32A2E384F9A158C5F5A7DC04C
+C6342B7D88308F4BD0C813A8A8FF6D44E8B6FF5073F11EE1FA41FBBF07CE8E72
+CAAE5FD345A00CD4E0DF5B80A44DA6A11B271CBE994935937BC477AE4862E0E4
+0F55BD2214CA9F7186885EC69811F821109428BB851C01D1FB2F38341408D262
+F5DDC76451A7C107A725B609DC363270EAE8E75CF6BC1877F2B2BA1455EDE408
+159506B7727F9ED61D807CB758C0BC165EBA7C734EE4BA55AC6F42B6BB930FFE
+DD0AA0A34F994AB151BA1815BEDB828AA1BF85DCFF99404FE4898548F2FD6DCA
+E1A338E6446093AEA135A75832AB0D268A3B56C8C20F29341CE6A48D5F5CA445
+91CEBBC1E344CED028FB823437CBADEEDA3B322077A05573D60D7BD016240153
+6C28F065CB849F8CECD24377C69B42B00D01D388363B99330AF05226758AAA2C
+B34BACF2F63EF54FB718B001C5AC90C9BD85DE8CC38398621AAACDA2FCFE3784
+B3257A9DCB63773B8B99076F2D969C0D7AA09478DCA4A6B3F7D8D95CEC5208CE
+ECAD3A540AC0C067733557B5134B7DE5C75D2B5673CC9E3F08DE0B9AE76C829E
+97E3BCE64918E5F1687046D0318EAC32659629DCB7CCA135A2A7B450E14A9A1F
+D89F5C9793A4FE2AD7719037418ACDB24643ECD71D70FEC1D529A87B89847945
+F4BB9E9919386DA70484036A926DC3DE7FED1612C4B89B701EF4409979CA914E
+5FB3ACD50E15AC6B4B22BE79954F45DB6BEC4CF3670414540C7F394BE2CE8F34
+1E8D02282357B6BB6DCC14B6E1CDFCE52FE38BF7FD091F44E3309D88C2CC2014
+3AAFFF868E201F1729C0303F62F5E21EF7581674C46DB63F615A57C4310B5F07
+A591A293340497C59D73365152F4F1ADD62DF144C0B2F4BBA9C04819D74CF5D6
+E5DED166D9065438C89ACFB14744EEFF77FF21A5DC2E60F8FAD10DF69556219D
+3D5039A505D5DA8A35EE75094EA3930417E7F92BBB14C0948D347FAB53BD7077
+3FC6CC7EF5541D2082507130932FA415218BDD959004B5D1D9C6AC7A6D62AFCD
+CEEC5F43688EF251A1D7FD4A9DA3018ED9A63520C0A0E4910C2D5B2F9FF03712
+EF45FC4AC93DDEBE9E1F434EC1D86938253F736F7991FA0E20500961EA080DCD
+D2A9164A8CF2FB7546EBB59DACE8B6BA5F9438A8FE29223341EB1B1592607BE7
+E6E7FB761FB4B198F8D346ADE3B6C7F31192541D688518969AAF7C2A1EB51563
+0A233BFB89F1C2F8736E89A46DF07D64E68CD0F58CE1D698675E4A3F504F5D63
+E58854608EE83814127A760695FF30281D2C4648D5808C8C8548854474CF2F0B
+94E15450CDE2CA5D5CA333BA71163E202F54DB4E6B3AFF1948FF2A5758A9BDB6
+9F004B02C13211A86F6B382A809BB726A22AE41C4E6210B61FDE76D99A5E6890
+BB1C522D0DCEB8916506622083567680F405E687C7FEE05577A8E7C02B30161B
+A775FE0DB6168AD93C19B83AF6E95761BF57EF046642FD3C47CA1EDDFB426533
+5022A78E85A91D86F3B78E463B01CC30807204AEBC0E622B383DD5E2A093188B
+62CBFB1CDC759D4FD7A66CDE922671D6F6F2122F39DB3C4CF73F3E16C1003688
+21838863DFFFB77EED7093A1B22CAFF89443AAA734B788F7F64BEB8B7C6E9579
+0389ACE038CF73D46AE11F9D653820FB3EEA99144CFDD4C6A28B3A86621F664F
+9441664E4B2EAAA897F0FC577344FBEF2AE0AE4DB43C0CF12CE089AA00D6925D
+BC8537F52868FC9EA59DF56FBD7AFD6A4DB12BD17E4B47556DA97DC1931AC87A
+38A1EAD3D3AD8B462C1A76F830D7EB0621CC8B4FE740AC409EACC48BB7324B92
+1F5B2093F0F6575E4A903E2EE134E77874F70DA87C073FEE5191C118EF6E75CE
+42E143037A40F8D5B5C92C55B497C134B61BFCE61D8E7AA93E66F74F0BC2F725
+A8BFD5795BC47B0B46F526E772917BE1FD164181B5731E27CB13D8DFAD0E8D9E
+BE4436C6921E7AC96953F20CCEA3C2E6450E51FB088E16DA8DF471ED8AE84F48
+71433349B7EB58332DE9CB7126906B6FCC08CF2047D39986D4DE9BC1B2F2FDBE
+163C73C9DF62D1335EFC64F38D42E2E4EE9A422718174189082A4E83B5C5D04D
+E34ED308A2D7F8907571A40A0BF77B4990D7C1BF1CC0474C0A41876F2CA0633B
+42D5A037E87BB056483D0E88298260265AB723B24DDF8E4220C8E7F3E681B883
+E94EEC6B2E77BF249CA69E12AEE9E03569D6E99D63FEAD2ADA9135B62793AFD2
+B7CCB2CF2D1144BA7FB613F00C6DB9736720CE1BBBC49AF359FD56F9E98253FC
+57E2CD93BBDAFDA1FFBF9A33E427B37B333BC48844B9F7A757398D146133B416
+58DA341B54FF74D097DFB950D0C850E11D85522BF8D10BBA53A99117CC4A4B72
+A1636FEBD444F0D61397039ABDB39CC4D969910F46AD2EFB671C05C66B0C6FE5
+5FE8FACDACF7AD619A44B49800B287170D086BCAD5597BF592521B51603CF4BA
+A286F141942C67471B47D67FCC581CE2F96D3C8152D4A86F9BA90EE6D5F06730
+CBCAFFB91FD653675DF525C3948EEA1F09CB6CD084D7D34F00826975368373A0
+A05CBF4F7425C9F57F0EB5F1BBEBFEC259BCA347D47BC00F90EC77A06C0787F5
+6FE2264D2E37615E28C74B5B1B96B950243C32CCFCA6925F42E921819C57D387
+819BEAF8250E117B9475D4A8FAC24ACC0EC44CD4C9597F0F852781C9C1817C14
+F38F8280AC2415268B3BFFABE7AF59B50DC33F7ADB38308F67F50EA4A74B81D2
+5FC9C14894963F82D10525E0926DFCBFBE775B85DAB7A4BF4D13E422643109AA
+A93E559CBAD1DCFB01C24037672B2AA2E06433528915C03F222C8523E06A7BB5
+90049A82D9E930E77DD4BCA67A765B24E7274C45331E07D9AB8544C7112327F1
+538C7E19BB37C05C42A2AF30EE19D10E4137B75594EE6D6CDB9431B3AAA6950B
+99CE785EDE29C89F94F3C0A395DC4CE31D058732DE45B6FC3D15E12E474AAF6D
+D43D56FD939A8719B432D4ABC752E1201A8C1A66866465AD9DFD2D9B3AA029F7
+9B95EF7B4459F360F4F515D11149942717CE8137F0DCB4ED01F74E474FB91718
+4AFE6342F4D4597ACBADCB5E40EA16B86D4DADFDB970149C0177A943038CAA99
+D07C82504696F1A87046160F9C0AC7DC0F3C8496CD63B31E56F51BEF07C6E7E4
+C73FD39EE686C0B833315629060DFA6DEA06DC6BE6958C3F9BD1F007F64525BF
+7F1F1B1D17C682BCAF0B581F0B986BD12A8C843DA6CFB65E901BA8BCBFA7CE64
+9F1E86EC50417744825150D56F2FF41E8B34D07B7EA3B19CDF906BF67DFAF212
+73EAAAE9015C8DFFC0C6EB7934DF360ADAB6BF70FF5B18F2A571B9E42A113F11
+38EA6A07CE358D0B2F4EC4FA45D3C441CF21D465CE936FAA1033E7AA407DBBDC
+4A44306ACB55017E136D70DA322A115FAAE9FF0A07A3D588E48B1A571D2585BC
+C7AA26DF65D9416A3C5DE75324CBFE52A76F3B74507DE787C9E9DF41FEA9A02D
+7DD35547E56BD3FF30B12668BD2804F93CA6199B4AFBEC7EA51EFC9EE14AFDE1
+91C69B76727373D40C5D66129896314959DC47D672ED6B3F977E671E020BF01F
+1A838631CA10118F13F91CF616BA7EBAE0C06EA8AEE25C73D4CCB7203FCFB0C8
+6884A1E23FE5ADFBFB0FFF19C532C2571062CBA81D3570761E3E00BE5556CA1B
+25F2292F689E5B950288B794BAE1E15FB3284AA76731772CCD6C6085C394C5B0
+3ACF82A852A32989A638054C2E75B0E6893A880241498D3627B55F3E58761B83
+34208FA0A34738A75A67E5DEAA16597E0264A75BF6E05CE3C3B8B1B5A9BAC508
+B282B2B77CA0F5EDC38EF2D3DA6DF7646AF3C9ACB62DD0F59F50D0EDC193D847
+F8A5D40956C169468F5FC14E3D527AB047E8E5A223A8BA05270700AE1A07C3A4
+ACA5ABA29958F3CB2D1CAA9B5A0643012681D0A32048458BFBF2E3BE88C326FE
+5F6AD9C996F3C82F186B5D77B4E31498CAC8EA4F6B3AA6BF524B38FBC53A2B04
+3F27EEB7854861B3EFD8C5DF19D2DE5D9C44540AD64AC3EFE729F4BE0CD144A2
+8A1DA61C8CC27BB6B861DDBB25782E44A33EC1D507D7127B51B17C7BB260937B
+C4267B4CCEDF56B1FF949DAE7C5E5C3F061B6CE47BC4BEDAD0A78A952A33F339
+ED8654918143FE913EA90B9ADCB9B5C9C140DDE7E2E692B19A49AC15E7ABE60D
+29453E54AEA9381B981EFD66CD957936D6C7F54CBD6306B82D13B8A716DABB77
+465EC55DFBF33839D5F37B47B634CA94489BF050000ACDEE4019C668C6EDE0EB
+42985CA668123F764789075C18934790B1D1D9191E72D748F2E30E0AAAE07451
+E4D294C0106CFFBED91600DA5FFFFA3F6DA6F7C5CF3502FBB2DC37ABF30F04FD
+6283BEC78FC7865D1B428F0698672E431D2A20E9FE24B1833C0EB0E82A34A1D9
+23C4791E6F8C17911A579DE17A289D904ED8AA16C8A365481D8235613B9C71A4
+26679333F179886DF86BEA8F3FB599294CA1A9859BA59E42B061255C93ECD97C
+AC0E4A89EEB16A25A5FF625713F8A5792A2E6A0F537D3436F603D7F464B61470
+DA712B94735254FC69C4F4E0A66A36170EB151353CBCC3E55D392D78DFA3FFCA
+EFF08200F1B222D9D9C4BF8329DEBB42D651E826BEB449BF8DEDEF0F9CDA4105
+8406F1E26BB06F60B7B00E92CAD3BF4EF06B9553688B099106932B18F7239DAA
+27B747808CF11D151C28C9DA11678CC1E140DA40049190B194851F753CB82993
+349CE659FA85B8AB585EB7FF322499C5940C026FE8DEA5EBC9DE866B03C98F79
+D36AF4901182DA9E9995FE8400AF094906D52D3CFE28088B14675F2A6F846CE6
+5D5869A70EBA2AAD1D0C538E0EF7779C801F866EB96C7B5E19C67354BD364263
+B67D82983106C682E0D9A3BB0D5E60EDD6452393FF2724739D426295CD40AEED
+882153073D356E2AB1F543E20F2AC2BEDDBACA73BDB5E8610E58BE6D704E5274
+D5C252A0669C56261555D0642C0937EE08329B8BBA2F807284B8777E1C2D73F2
+31E897BAD03DF7587757BE939038E75B25137471552DE0B7B3842760F441FCAB
+0557EE93F87FC7079457AC62402B55E51ECE8D50F94566B1671675F0215C37DD
+31FFFAE9B27B48798FFBF14D18A2C6F1306522CD8E8C0D8CFC228B3F1C17A827
+1E5273E3B5B20C2792275DDD7C17053AE8DB61B679ED2780740E947D5DC47B27
+D35F9B5DE0166539FAE75DA2179F3F9EEB39ED0452E49A35A1E1083683BFAFFD
+9A066C4CEA4DE699EDF570C9208892E0ABA87784EFB455238BE1A6A376F64252
+82EA5B523A8B2E7812E3253C2B6E1CC4681656561179A4C95B48E97CA5F9A39C
+D255209D9F7D80DF55AA3FB99908B46B101D509F3BD513568A4949920DBDCC6C
+70ECD3BA39C44423D02B4E5B13E9F434545979F7ECABE6A6FBD131E169C914A4
+8063C6C9748D32E71D0A25FB40C764ED26450EF49735E12DE893F302FA491B29
+D5154B441D5C61AA4AED88F06C63D52409DE17D7D97C572F7579296D297B9942
+880FFF44810390ACD46FD1E090A6412F7BF21DA7CD3B166A845890CD887F607A
+1F04BCC7F4BC3107BCAECD61825A959B61E62795CF4E458EC63F1F2235C64D60
+C62FE46E4A913685CEB2DD7B25494832542059ED9DD0849029BC1272582D630E
+4310F978FE6569A4B9B97A7BB4BD602D5D32E79727ACF46429CFF0F7BB8EB39C
+DE55DB6246DD9DAB7863DBA6DD21EF340E19727D5AFE9026C284326BA0D4D9CA
+E015056824B392BE8B930D04BA60B58CF4A683FA14850B6B24787958D1A7A42C
+7C33C1362DF20AF31CB88F0F11BEA022C609D9575F71EE270440480E0AEF6207
+733236DBE9454F088CD4A01F63B6B2C6270DD08A13108ADA783F2E7067B7DE4C
+C34AE192B05F68B0022F5F30583D9D68754782186E5B8FF76ABC451DC9EEA08C
+52C12642165408AEB813C00DDF6C27F4053435F2CCD8CAEE50704DBA37A4AE42
+9B7960169B0C865E92D270A714449FDF13D8835FC1D4C03D7FB376ABF7201BE8
+A593576476D8AB905076237BCE2630179D158F04568CE4C85734FD0A1C8E3D90
+272F3A65B556C7C803FAE8A0C82756B99C35C06673210766A8042682C873F811
+CCDBC015005336EC438C3476B4AE13715DDF6F7034D032D29F2383E005F6FB4E
+19AFD4A02BB7A79917D54519D37BE66ABBC156464898583522A4D63FA6DEF194
+BD4B90C83470330F8B5233C24E80CB64C13C0CFFEE81E3087A4BEB84FC8B152F
+44A9FE7D4393C652799B12A2C0FC0842861B1F1B656E802CF0C40DBE95350BA6
+32341D0503CC7CC3348953723981ACFAD95E18348CBAE09B630DE4247F3F7A7D
+E4A0095D461854E4CB12840D355912AAC33A5A04C833E20005C2A71509AF51EF
+697773C2D5C8F958893B26BC64215E4EBB7350166482F29539AF54D860C68F3D
+1C60ADEA814E869E974E1B78114B091134589C089A2CBF12ECF1E31C4122155E
+A90587849A11C46DAB620284D66BBEE187B61413740176EA8F914D6923AA0A0D
+3C3383D95EC1FE1587DDFEF289B4BBA9EE208408BACBF5FA0A53BFFD88BC0529
+10631201650A258809DCBD5D136E038110AE4B818783716501CC5DDCF42ADC23
+86382A06F7FD13F6E99935F9CFA67D49BD51A2D28E1C605DEDBEFD24BA337407
+00029CDD5E8808F6EC2FE5BAF3BD3995414E9D390092ABDC355B9CD4E80A8DE0
+F104658871D0CC6A7F06CD149A0FB36F4C1F484D5A43AB44394934F65C216EB6
+C33002BF7D0283E798813065C84BB8EBF6E19A0855F0E146A7ED9B4B11C9B89E
+48465EBDA7CAB38EA818991CA0B07182AEA5438ACC95823656CE47CF932851EA
+3B0A9A2DBCD3FBD926D904749F62E27C4725410E297D9CB2CE16ED4B32AA41B6
+888B1480C538548FB6EA68D3E8221626AE219EE5E998B310D8820AC61CB9D9AE
+D5C1AEC7C3CDC305A5E88E028AD21C6DEAF272ACB93916AFB42081E9C46F0C2D
+98081D7D0CCFDF2A3062F218582CF432DD75BE9622B1DADB99B5801F709E2267
+BD5E0E1511912DA7D888FDC49C2137F65D5C1A0AE5E10961CC392307890FFA8C
+3CC9CE5B898812BB6F0AA59557E352735A2B11D6CA98017C7C118D1D460585E9
+C6A2C132A522F0632B5B66CCDD2572EE7378ABD5EEC211CF82EF19D151D290E5
+0A0B3328C699746960A0A7BBF540E6F6CD9544581D879186CA576E3CC0164930
+264C26785042123F5784D2CAE377233A1387A3B4F8D868B40171EAFE7BEA628E
+7ACC740937076C878F76BB8EDF36ABE98111D319AFF427713EF3CB8F16464228
+C083113FCEACDFAB97AA3E193E8FA750FA5024B674F63CFC58073BA959137339
+4B6958AD894CD17C4DAB82CCCCF154343270CEE203E13322D3808321FC02051F
+90CB293FC80FE9BCB853738AAD70563E124CB39F9935AF590ACF3F5FA8560169
+2572D275F36192A5ECE86B988D6133B0A1745D6D386937989850DAE1E62D09CE
+7D24EE2066814DB161F6103247EC2E8E065940F82E1E984942184E68E556A120
+23F52C75017514BD176AD60F29DB768E9F1B3DBD72C89E895432C39D2EDEB089
+3692507DCD57FCEAB7031D391E5CEC454D5266D140D7EE0CD151F9CB042E044F
+FC95CA7AC869B4B04DCE1AE9D5202C36E343B1A2AD786F5B7D0F1AD1E42C4C1B
+6E6BDBF86F022D90840FAFD81604C02689B3550AC41AE36435B29CB823D255E2
+EE9BC538502D18ECA40E1F340D0E9BF70C58E9C775D86DBB6BAE3D3EA1BCF920
+6ACACBD4D2E960723EA3376AB2B077010C1E685F759A56E9B0A84BBDBBD9A0D0
+FB4B0806861C272DE667F219D8645EE294FC321D8E373021BA63C1003CE2D689
+D5855861A575696ED7FD601D114E602735DEF72049400119E933DE8A1198DD94
+8457A24FBD19FF5D21D169FD99B6F6F6A2824F8D1653A13D5BBCB9B11E36B8F4
+2F9DAB2CAA39AA9453279F8D222EC4AC8114CAF0F7F58736D457BC01DD915ACF
+7D9B4AD3D90F93256C4C9E41CC15A43B71E26A8DAB324639FCCD3E082B580CC7
+B7F2A695D029161D2F3A2A8963EC8BDC0E6D256BA06F08B6D48682CC9ED169B3
+58B063D8D7265C15B59C3DC91EB307F33FFF73C3101AF250F3CCA40A161FB3A9
+B698F261E9F7299F2418D1DCAA1400F7BD3C74AB55316F22593595649F3E9C26
+6F903C6C0B74D96CB7F92CD33D610F0AFDE14516105B49F1A43BFA558BBEF71C
+2FE095E954125172B6CFE4C6390F701738232605A38671424723A68F13F2B94E
+2FF970C51633660D9F5B00FE64046C85722B40515F34E44F32D18ADA4C85315C
+2461D81D8F34BA7B13227E865B7C24236A16D9C6E1F428998C22A43D3D0332BC
+55AF05204EA352710B199C0F1F710C96C72370CA7203A2882310A629995B5D78
+D57D695B654A718C5268E9751C7F848CBCF87776ED10DEEEAA32F50769CF5BF6
+58455F8CB9C793290D7F8A38320743F0E87CF2BAE8A07BC2DADAA9F61ED6EF01
+6E24883E78AFD03E23D3A9E77C62147447BB772B4C80C1022727A9C863CB8A7D
+5C54C057BE3E148FDF79659CAA77229C438A163D366F5CA9F857ADF98F9377DB
+8CA7CE8F361E5A553B4541763D9A6102467A059DFE0004C350EBA6C8FAAD15A9
+3C68C30AD52BC1496C4C214B5ED4E537C3B25DF46166E1B22B0185FBA3F9507E
+7ED64C77517B077164E6661D73E441ABBE1BA0F68D8B53BC8337879EB8C08F47
+A579D32D0EDCCD91CF143F05CDE56B87E1F2868D001648513BE0FF3700732AB6
+CEC0CA78BE25810FE125B5542E407A984E758EBF4A3FCECEA2434815F64425D8
+C8D0862CD06D88B613434DA7CADDD3D6D4F1739E744B4DBB99C08CAD6112F0E5
+4FDFAC2B8D0D75A7A7AA5CFBE2C3966284E9D33CA71043357CB951808B3453B3
+B140807FBABE8F6B89A99B329D84E21F14F5D0022C0AD05D24B00CC2DD560C03
+AFC9AE7BF337FCEA66C41BC6A6D3768172C30F45DE176C1B4EA57828702857ED
+DDC1953FD25CC900941214ACC73A8878EFE63AE700ABEB0AAF8113675B12D8EF
+E370EBC067F82917498DD9A5C6B080AC066FB0B209C52448CD68713AB98D78A4
+7ED37127959969CE4C18D686B8FC5312BCC6B5F4B375DE186E927F42AEB377F4
+E96381BF6906E4A24328DA33A3C33F00C7034C53B10CEC70058D312D3EBDF1B7
+C81E0972E77259376669C71141162CDE55F5EF7E4A8A95A16AEBF41D00740055
+FA8CADB6CCAF1BF0850C4A11F905AD3287BB90D66E2878C58F00A71DFE1334B3
+3FEF4A33513070FB9AF215BD26E039563DF3BFD597B8723545C52570E863DA43
+8303766D7B0CC6EC75676C77516470F9D83908C0F91AB5DDF2041BCC68B1D3F1
+652153EE95DB246F151F63D85410B6B5FA265937B373A085AE2C42542287C17E
+7FEEC7246F98BF641ABA0006F8658956222A9E5CF6605A3A93E5C0C97F43E679
+321F598CB94963C49AE48BA497D99B304D53F40D605D17DC12D966837825B070
+6AF66368D569B2BA9FD4066A155970E0A9BFD8F9E4645A41EE98391C5A2819A4
+CA09ACF8A056B5F65A4EC08DB490EC4BCCABF6D5ED8DDADD250A704D8D0B70F5
+D54C83A4E971792EB7A807172475F195836A9184EAB13020A8924232C95C8C54
+5852CACDC34481E182F98C3A3102EB6979B8D81A2FDA248D74E76B3C8900D6EE
+9EB9AB23DCE457ABB1829C514F5AFBB43435FB2B4E83E6FB0CF79F24E93591FF
+59AFC759E491A9B569A1B1EE3D61CA858357BE7215484F4504C6098EB705BA7B
+A38C7B683FBF36EBD39987C5447C4F5074893D934C59A056D72AE4F0A363BA09
+EAC3C4AB6EECF15BAD98A0201CDB4F836206F64FE1B84E590D6D4119D2F7B548
+36A2B3EDED5A8BBCD95509EAD11F6F43FEC653F131CB4AD546A6B7096353B016
+FAE4C3C0C8AFE9E541291104425A1DBBF7091AACF5F539F29CF261F27DB2F2E9
+96B170EBD139D7D9BD009D6DC3EED26EFD5F0FD4F46F590B3D218F0F54F324A5
+C4FA31B4DA7340302287C8A3F2417F02C6324F2EF4A7BA2612F343EF11A4B4D8
+C3D6CF3DBCD272010AC01B525420CADFFBF2341F22B018515D954AA24E026A00
+AB3B5045E73440ACD6A2957BC5835009A310C7C85DA385C498D5D847469563D4
+146E97EC0FE9F8B5244B6F9C83B6E1DAFD109EB7FB1AA5AAA3A3ABCBF4B4FD5C
+07B5524EA0501EAEC5D280688D6FBF1441317C2EB2DF818120427B4FB62A6AB2
+68FB208350BE986F805CC893E6C3F0B2936152B1E7E19001913C0A9F821C345D
+6873A92FDF009CF16B72FAB99632B783DD3EE5317C30D3363C10569FED1519C6
+78F6A2343B3152C4303321F6E2158C040C7877C7514F30A15F052D3C0EB1794D
+17A5BA81039F0B0F3CB0093CF6FA0D7389DB279018806C1957154952901F41D5
+C9786A7C0EE76E57189A58925CC11B9F79C17687198674B2CDBD77AF4E0C528F
+21E588FBDAE805AB5ADE20E37242C55D6ECB9574C82A6044BBF8C649A39C5512
+D500006733919C4FDDCB5BF3F586E6C0DADDE28524039187CD1551FC7E193DD8
+B912AC9D6DAE8B1FC859C46D871FC08408E2ADAEF7A361A47DA2DC64DAE45B96
+AB720474BFE8ECB8A524FCEBA21ED5A28A01F90F6D28A7D40A4F1A9C2A7A9820
+12FE8B0E532D637F1FD9E939F124A8322AB92792AC25B2C6D5964F54FBC0E882
+9B4BBDEBB7895CCC4DE40159121E2BBEECBEFC1E83E2C386654997A9E9947B7D
+38EE4C03C5145167E554DA0A7EB0FC8F4B80D822C321D7574D05A1289494271A
+501FDE3325B7C87E1D24C34E08B799A073AC8361C9D49A02B564126065A7D550
+07E36365337A08E65AC7130BA92D6C9B97B12300F2C8886F55EE9C434F7768BE
+5B9BD13D87F2063E39747F10C2CDF8A60B9196FCAAE79FEFCA552919AE988A2B
+B16705FD84EFB22DC538ADECFCCBBE8E1F58BED0588678CE1A0005FB3F5BCB82
+E5519E9D23ED670D2D6BDE06E36D0EEEE7D78F99BFE25E1A89145B138612C8A4
+90D0B41453AFA81C62DDF3B21CAFE3C9807275BA3C5A25E74FFBD61A092958FB
+CB84C171EBA5F91D31123B578780AED7E074BCAE8DEB9C10900F2261F198ACAD
+72621D416CA2768A0851FC0F5483895FC84FD629F1C32212528C966DA662FE7B
+8DE8D4B261723F8853A5BAF63276EA472698079F7C8E09908C614A0B8BC680F5
+9EBD5DEB3866EE4DE76926BC31DCD160224A056BB6EB98843D2AA129A3B35999
+3A31A60727B74218771BC7594DD1494E8B385F037F1CEEF0E1F413507E89F426
+A88D4D599B8B7D40E7C90A2CE00EC61E35AE94FD68E165AA4B30F3163DA0B493
+18FCC396151A860D96AF51C1BCEBBCD15C711BFB5A33692D7FB570F044386748
+6BF849598D52C58F4E963263CE9A9F64E8EFABAD9FE77B69C1F62A418E7DC918
+87470BE747148D5D3B5C718F9F49E2F398E7A2CDC59216AAB2F16FDFBA741F9A
+9E0FDD43CF376DDEDC8FE833FE4CB1D5E27B7CF160F2F22A05A117F348B632CE
+B9C299669607C6A08C86187B78A6AC4A70C5D6A204153B346D2AF6E4DF9175F2
+31607B29E99B5641BF3A818AE6173008066844469A0837A35C227DA9863D9ADE
+DD2314224B8C3296B93D698D0B5F980EF4E1B62C30EC9760CBDBFC0277A242B7
+CE7989E0BA910E13734EDA04992F06A0A77E8B20C87EF6AC80A2AB7C7FEA5768
+46D2BAD6C8CF1D70B9CAD91EE7FB2F88562D6280C12A1B4D32FDA0A422E248CF
+220ADA5A2AB5597B312386A58F8A21C3ADCE6D5FEE3F9D2A4363835B07527BE5
+BABF7FD63B05217FFC7ADCF2EC311F6B91AB091C6C963255B4B8453897C5D8E4
+B67CEA88C09C23A3FEFCA3AECE9B7ECF02DF65A99750A337D1FC2F13D198247A
+D892F0D9A6A06265820AEFABB3F0729AC4AF8062B916DD3ADB87121EB799965E
+A07438A72CED4E5320E6706DC2CE33BA6085DF0F9C788A176571DA3501A15929
+C2214FFA20A0470B9CE8952CA671C1B717A57B48CC839F5DB4A6D66248D182FE
+C6D0C89A8CBE513E0AA41595376F70DC4EEA7ECA38B8E44EF6BAD64F6C15103F
+A7692126DF2BB08AA38C4B90DD6C39B0B462A4B37729CC59B85105D5C6309749
+F1C93F8B2EF214F2CBB58922F050A80C2EF0F7A0D332B5F5D0209D7EB3779828
+F94760FC65E0F1547CCEC5159B7F751637F8A73FFF9860547CDC94040F432FF3
+0BA714B6665EE9F20A8A56C3D3E6225C3CF95D24079E41797913B7BC1869D27E
+32212E244C9E9184CF56CD15A8F1EA694C92FC45997426F19201EE37CBC2B24A
+A8015D92E29308FFDF9901CFD5061DE67D85AB5E9E5752356F4C98AB864AF589
+389E6B85C439670B28609810859B5EADD6173159903FC65125EE9F444ADD967A
+CCB73B5C4E153C81110C5578C552D914E05DD3A18395087CB147B1985AABB2A5
+A2D97BD3D050EC2729E4B2E05F5204C06E266F552ECBC4472B0710D7A431C3E1
+0B7F89FBB561D42487527024D0F9AAAB4CC4233DA4900FABA883A595CD445101
+45B5F4088B21B546BCD6C0D6B757BD8114A7AFBDDEDCF923016671015D3DE3D3
+3759EE001C9828684374E20D6EECA756DE290F6A020E09D8C411353231FBD7AC
+E02EC25A5B7AB5C681FB95A03D79AA01CD91B0F58CD3E3C723BD40ABD4B9459C
+4AADA21BC33C4F5161874616818BE67923E3FD3D65BD18D4F90691F491B4EF3C
+34DBBD11D03D396A086FE67F18928C5409FC0298D21AAB0779CFA7440FD3A083
+7C3414740EF7654EEAEF51253FEAEBCD7C0D5958E1EE340A298902E4B23E5BA0
+AB47D6B8A41DCE006A4E3671840A4C077E9E948AC9C1FF7AE26D09575727C2FC
+8A2EC23A7736665DC4AE2BB65B475640BE71AC6D66BA0971128E7840654E715B
+EA8C8277C1BC221590A283EE764584DA9AEF65CBB1E52CC41736378F1E294C44
+0701F1977AD8F5F8F2D060DEB4FA32D9D9FC53408522F74640D3444BABB39209
+68C1873D6E0C0E3E10483D67CF70570F55FF4A111F0F4EB54557AAA79115E31D
+8D682671241914FC07D431201AD76319A849D53640C5E517AF616A157A056CF0
+ECBBA141AED25FF648829604626D52BE98AA9B29EF2E2382ADCF9704D0B2216E
+D7408C359B159E84389B5454AD8E10E4C62C592E052590DFEBE546B02E2C100B
+599FFA2942872097FB093540BF7786E7D45A8B5EEAD6D1C1118FEED2635012CA
+178A40DF6F626F6596CC773954472F5D4CBC310CCC041E384304ABD270BA8ECB
+D04051004C71FEB557C434CF3773FA9750F5C2757B7F1CD17DEE48B1437B59BC
+30E690522C3045943D45EA6E51A4EBF8FCC557261689C562BF8705780986D2FA
+C866A3FC22F941DAD2820912C97510B1CBB1BA36839EEF82DCF7368E382A4EFA
+0ADD7FE767994941E9A5D7CC44570DAE3CE7A785D65AE2784B079BAA5DF1D7ED
+C870EB560B792467C72C874601061E0FB3BF003101EAF8BCF7BF01F6DC3A71BE
+32D391649160BE738A739FC07BE94A0241BB41CBE04A5F794C37E2F5C258CA81
+9126D73B4471411D4251283EC936EBE3F8C28EC36BA0E38FD4136F779635E95D
+8D5E5C4E14C680D855DDBB8C1F90FF30BDC971919C7E6A93074A36D88561114E
+6C999B1CBED051B7675B6264E27EC4A015CDE54B0A986250A21271BFF242B675
+9AD36175B01E120D43F8A60FEB9DAED5A70BB4FA975450097B966F1C95F2BA44
+3071E1057B6996F53199879DF834EC867B161334FD281CCF75CA1480F04DDC4F
+511E6EA992114990629034D590C97A6409B520A5E78BF118E11B2BB74F1374FD
+F3415AF23290A4FC3DF6683F1D5663B17260850FB1E307D670CD527E53BB2CB4
+40A4452BEE0F4BE7C62B0A7074A5303B534F3BBAEF96C818A3BCCC30B082B502
+55B5A82FC5E0C6EE660EF38167D9AFD853D48500839B16E1FEE13BB232D55040
+0805F63323C6D228E192B6DDBFC0A54C19C3059E16EA511F33278AE666C403B3
+BBEC3B9F435A9752984B43DC4DC6C5AED25A3D2E73B10B01BA097BCFD167D4EC
+937DEAF6D992D924FC03B53A70EDE75494FC0EC27A34EF8B637357BFE6081EC4
+9731750F93B4AC3D1B3B6FAE7AE7D71DE3F2C0CF4D734CD43DA41A24DA7E7C46
+A1E76C9C1005C0313797A2C620DB3EA13E924BC71B2916C308533834030CEBE2
+E2CAF5AFBC7FC6D6F0D12FFB290A461F7D262A1F620AAFF509F05705D48FCC67
+B143ECD4F2B0D61AA00A69B700209F2DE4988323112836FC1A75409516F86D16
+3D36C7B1E7C4995E19F0370586B4C6242C64E9604D541B1DBC252F782D4F5BEE
+A81FBFF9D7A49307E2265AAC20501FDE30BA6E9C949D5095DAF00ADAF7BD67A3
+77BEE10C62F19F9CC3B0763A9B1A62EBF43FAB15425E7D7AD7E29D9B40FCA346
+096549B43EF7BAAD35FA663928050E3E82551D502403105F7881257039A8D67F
+1B5934CB7FF76D879DC26D6D9F8DB1412E04A18CCC4E30600EEEF35557E73FF0
+B9583317CE899891CC608D3E5332E0CF05C754FDB2256BC946EE256607A1550C
+75907D32C995B1B54A243617AE98E2BA9C042B7ACFB4919970505E7482653F4F
+F780ACE9308C9BEA60C891C5FF175E108C45301C588D4636C09AF8D6AF016450
+F66E262673314125FD1459282BA9A0EC01A7305A8ACFB6FCC254BE58DF6CD19B
+98483D77048A3DE933F94DB60CB3D89A7404939FCCF918464032EC47402AB1C0
+DB66E1F48AADE6A3DA6D77D6124D75B84C5CF556AAAB07FCC2DB87262E5454C6
+4814F1933591DD4C29841719D334BB11281B94E5D44D234212C3A7A42C2FF04A
+9766AD45A1B0498D0DE841D0DCD7C02428806F6F158B7C69B92743892FC693AE
+4A147EE4E79D6F47017DB95262BBC9787D330D3A4A8A85EAFB909E197177EC4E
+F2DF74F543EB7D97B5EB6534D7BF16D16560908D8408777D96D88741604B2697
+67E91C3041645C0843815BB87E0C6CF3BE2F8244A24017E6C2114EF0F51BFA97
+15353712C0F388552A853B285DFDE41F352F5ACF474B8D86491C2F2977FDDB43
+1F00F9C05C87ACF8D9F9B56C3617FEA2E7D8D9195C2C553A6863C734145D156E
+FCC1D17572AAAEB4B0BE5CE51D10BD4273020DFF43E0F1FD270BFEEC8B2BDC3A
+F16B43FBDFADB690685A6891B497412EDC358CED9589836AB173BD20E984CCF3
+59759CBCAE3825BE4A428BEF168DD88717837503804BDECF675BDB8174DA3EAF
+EF5ABC8BAE00FDCA6F1AFEA1C03C14902D0FD9BD67EEB2F344A374688117858C
+DFD1AB9A50E7F4BE806C5C5BAE3F07B8A7F3D4F54A29187BC6C38520895A823C
+4B5B184FBA09CAA547CD661F6B4BF98E68A630D403D214374C554737AD7D5994
+81149DB2480176D618EF15E0517D56BA02FC995E85F2DBBCBD046F723D52903F
+14B617472E7305E9F6C223D78A2F477C9D065181AA86FE051F70F7B52A3D82F7
+ECF18D48DA8C17870E8B7E543470AC7BE549759A1B27F31AB30C68ACE22BC9AC
+E147F8C182255E7262EAC0D1DD1B8FA888D0D5CE9E2780C0280C519AD761AEB9
+C5C3FE40DBC65147F680F9D2F6B9AF3BFB5D075E91CF3A092249EA71774FBDFA
+FC479A7148B477BE528C3667F0C3CD9C1CB9ADDF4F4AC8F93E1FDAAF3FE1793A
+24F95BD0EFFDCD59298BA7BD8DD48A718C660E195C765E450380F771183B302F
+F5F27514863F9FC48CBC94306556B6DAF16D54F9CEA9C45A8D28AC6CE2CF954B
+771BD117CB67E8F93D933BD0693AC61D82BA1381D51AC427425F8791B779AEC6
+20AA9905734C7688F1B1EAB3F1F713B14883C48EBA0E91A64C7EDC850C1A6D7D
+186F405C48125A77377DE45AE05B6BB2FC42849EACF6F6F9C003EA93D00B89DA
+79E540A2B9BD52113D41618D7483068F923B847718FD6C516000B5B51769787C
+8DF0B33977F61AB477861AB8D493ACCFF30D4F39511B0D9BFDE188FBDAE805AB
+5ADE2C628E6E047CCE9EC352CB63964DC90905AF18DC3C7874C337AD2184267B
+DF974A6237B97451A0C77410EFBB3A8A3D55643CA08A8EA2E0AC5F0A9375C461
+E4B343F80CEC40568C521447BDCE1A2E5D45408B47E5058D328C8BC323DAAE9B
+274E797685343E37583F2F631BB07A8B954A5124FB9B90EAA7E22DEE4EA616F0
+C65C57864A3AE70F4E7C09328B845F53AAB943138E005B560EAA306EF67AACDB
+122F74773D084FC0FE926AD1FC0C3EBC9BA82904EC2D6596EA65F4B3E4B5BEEF
+74C3CE3CD45EAC63D7202E2FB9EE03AE4DF5B30E0C78AA18F38EAC73045DF537
+03D558AFD6CF63271F3AE844614482BAC4A34CECBB873F13888C35B29652E763
+30087613B8C3CF47008FF0C2B4DCE7B4FB86D0B968AC4E98882EAB48F41F7197
+9AD42A9C46648EE7F0F270C203E125C92CD0FAF9ADCFA05AEB08A69DCCB712CE
+75D6B6BE60839492D18BA28DA2251A5E5D3D9504100501B32AB001F5D4AA2991
+ED06C8F063F93B888D504C5596CD273307730460EB46BC5FAC040123AE2837CF
+59E9BA4C2B1E83412CE3F9CB5E2FC7DB0D15607276D93B3738C549619B17C0D8
+357FD5094A703B74DB8D61525C3FC1DCCAD810F5E5278897DEFAD47FE30350D0
+C9D3D830D5447A8E52AD2DAEFFD2279EE01FC95F4C38EF18A6EE079727FF62F8
+7F4D2BE5B80CB0B14DF3281A312EEEF077584D7FD2F0C06B6047934D745F3396
+AA7ED80DD3B1E3D1FA27D68C68F1317D30FB14C6D9D5F31EEC05578C08949A0A
+866D434E4C62087DC082C036BEC3F9DAD2A26BF89687D537B58A9001CF3324A7
+75022AD2F66C9F4200A5EDE0314190F6638E8F7703B25C0912681695CEF8AE5C
+E0A8D860526C6AAD0B0C3CA9CEABA721C69D93D5240F186B849BF50843DC098D
+9F57A70E3B2F0961B304D771FFBDBE2B5B737FFCE21DB8EAC51594138F63A104
+9994DB21D186FC4C317A14FE9FE9FDA16B9B9B2F94E1E8A9DB232DF8B23C3704
+53164F61CCC22789D30C7145B6FAEC3D0501AF29B4FFE749A091BA859EE5CAE9
+9A404B19E949311CE275101FC885408CDC12C46AD88F530DEB6FC3DBC7929613
+C5FDB899B93807527A6CD8842B09E701E3C2BDCB75945C4B2E473BC4DE2C9B07
+5DBF4243D35E70B03A26DCD0EF55282E7993032441E8B6EBC5EA8923931B48AF
+3A9618E3E6759C2CF32332BE904D74B41A46B53EC579A8CD490E2D94BBE4131A
+89BDA47D0809830EAAA4C6BD50D146AC79909979E5716F768D1D95919C6AC4C1
+A63AF5CFE0C31F4E8CA5BE704EB74876DD3E8BCA2CC14DFF2C6D3F15A5A66564
+2416789B275E6FDC2E93EBAB3FE9448FB38AF02F3D37D1C9105B03A49DB0A86D
+275CD3CFF32C1250335100991700B0973F3D5E54C39D07D260C2FF3E054D2D5A
+728CA8DF72801940AF4F129FB2E5C4F32DAB16258C3DDF41B41334304C99D25C
+D164D565E687B6FBAA406E001BD778939720B725B29B0444EBB2E22AF08A50FF
+0C00EA68F9D4EC2C0DAE1D0CEDDB9C7417A413F5173326DC5CB8275021CE6F04
+5A9B58A4D50832A861CDF9C9D31525D35A943AAF66A34877DF57FB6B156AAB19
+3EF93C8C4B8394FC0A51732AF46FEC3497D2D84B19F64AFC3BC52B054231D5B9
+A34D45FDBC25501D52C6ECC63492962B685FEE3BBB6C2DD70A84D704CA35D745
+467E73C8E5B6A2DD66C370D412525628174D5E10201C84C9C4DC77D0FC4EFF73
+293ECBD31C01A74379DD9C4F90EAAE5FF84ACE13643356755405F66C7361A2AD
+8600BE9E98A52536FFA517A2D4AF896663E6B930A66E2DFFF2C57D4D7A5C9F69
+F3154F6F8375E9803060CE0D4C45AF6475E53920957BF365961DDC2DF476F74B
+5149BD0687AFE0786B18D2BACC769E28A6E2E8BB1E3F284992AD1F1DC058AF02
+CC94EE0845124DAE980E6D9ECEAAEE1849027B0684DF492F168C5DE0DEADF4D8
+9800BAEAEAC9168846D852C49387968E86D65ECE24D6AA3B60A64CF86484DE06
+F540D5FBFA86BF810EF5DA04473E8E25345AC9A12424150EB621CEED8B1EB090
+C76FA51610E7CBE23C6CDF040AD880B73F3331F85824319DDE430C00AD7F809D
+D408879B1FFFFDA10384BCC19C8F3499B63C19DCAF99A5D0C2A948A7CB69E094
+5D3A79A06DCD7FE2122D3B3E646ED2032B8F82DBAD82A8563C5667A5F015D31F
+8FA8AF22D4728672AEED085F88DD7DE8BD13B0E7D0306969AF29AD850E149889
+2B4F81D1592CC36DA27A29097B8F720F477E6F9E26DE7C265A54BE07E036B7F4
+ED5E303876C82496C2C5396679DF6A91802452F079AA8E653D13438B214AB47A
+282D714843AFF0B74BF1F72C4F7EE4A012EAEE04A82AD8B2EFAAA33A87977644
+AC4F6E5CD474A6C8B08EADCC1665E3FFD09C78FF30CB4929CA140E04795686BB
+C985F7CEB0363FA650137E7DA8226A45810CA44175E66ADA50A0743211D3FC9B
+11B4EF4B5DED09A3CA69E48E0ADCFA5EAF749DF18AEDE11F9046A8629880C9D6
+38BA9498CC17F4DECF25ABC9AD80335ACCFDC534C82A9A479EC9074A1D9A01DD
+96D464E1D630688755587DCCB5E8C1AD4032B4EFF0E645E2E2329D08128E3D11
+C8D22F4CD4E4783DAC3D6BE9AAEBC2F4AF3DDB05020796C972677AB90AD7E8EB
+9FE96669A4615BFE4BB77CC787C941B7A0FD430AD5B9D7B63A26E954A28F60CB
+E380AD0BB4724D99F3F46E73160555A2BDD7FF5BE83A2312F7B04055EBE5B2A0
+08FD96C4C90DD9A06DB0B3D5F570E8CF4E9FD7FAEF7B5042A5513C1988E63ABF
+B3C8E1D8704041E279CBBF208AC23385E97A6EAC8BC634E3F9BEDCB3EAC4C57A
+EDA544E06719AF5BEF69257CCA51FA7840BE8E21F66707EF31300DDC70717F44
+EB2DF6070007E7B93D1357ECF8ABF097B757524E92D31524638E69E63B2DB200
+4BA1E338B284936557D6DF04AB23741BCA5CE6B34099FCBA07CAA9595DAF1E8D
+F10FCA58FEBBE12F8E2FE6A0680EA5E6CE0CDBF9A1C872621CA4C10AC91E3F55
+14C3918E1D32A2078CCF4D109ACB79C3FC55E3D222B9BC8E1D0CCBA5DFF91B1D
+76367940D4CB4CDEC260F3152E03A86FEF74DA6A1DB82522B496C177A77EE9C8
+652B0B6DF023E60401AD8614ED9D77224D822F4B961EEAB6D9911922311131B4
+49167FEAD3E3EC5E251618F7D1986069847C7F1E7503E04B48DFE249135CA5D2
+8903F8C25A141CBD2E7117332EE320DE0DBF03946FBA0DA27F8DF4AF8771699F
+696C489E8AA7EEE92B7824B5A03D8B297F9C606E64BC376B10C5C606106CA8C8
+B764BFAB04512AA9510A361CE189858A9A565276CF007EC6BC1C7ADCD6C4CCE5
+CDF512143002C6C2376D3CB2624095DB10CE42032BAFBFF7FFB6BC8AC5EBE973
+02520AE31D24A36AF5C897965EE3922C280FB056A36B802E1FD49A7C590F9A3A
+2D699F0DA5D50F8EF5C01779953A5BB88EEAFD3DB8C428C6514146B1B55348E1
+E2CE1D3D4A13A84A240C40084EA97B971EFA414370BFBFAB6F6342425A324388
+7DB7E4A7BF1FB654BC7DCB56C7E1FAB0848828B86F5CC8B069055B76986391C9
+76CCF12F945173646F85C1676235855107EBAD75BDA3CB3E655BC81AFDF3F629
+F79687F72BDA04FBF6ADD00F9A1F21C0007599A177F46140D6004D06F6CDA03F
+F087938716D4D6B2806985ADCC344B17B976547AE0F745FBF4B8663EE4F39196
+4B21F9AA8442DF78B1BEF23166510DBCE4405A20DAF5AEB09C4ADBE05169A52D
+839BA7B8CC777A0E4F685686F344716E2AC2940282FBC795966BEB564B018DD8
+FC56F588AD42CC2630ACDB1957CD2F3A461AAC09E95A549144809DD7533812A5
+7A8BF8BE337EB618E11D24B0B2C34CB39BA93DBF0A588DF611669ED72B92144F
+FAC3BE40B7B1E56B38068008B17DAC0C6648E5868A965166A798B9C918B5FC67
+E60AF10D6191FCB156411ADCCC75010D56E7A87C95F7C1CB33EAAC7231BAA719
+B927473D40BB980F3E9D304567305A653290423E74BE544D39BFE92E0CE23BE9
+0ECCBDD14E74EDC3C19B121128E807299C64E68391F13A96CB1A418A450AA9C0
+982B3B3CAC83E11C8A6CABC01F5F358F2BB79578D8298FDB47151007756597FF
+0574F3357B719AC0E368A14CC91F6E65108FE1AF6797DA6AE4CA52E1B15890B0
+888D8082B70CA6B7BC5FB7AD9262CEA6FD18611AA1D7378735E923A6A45D1869
+81801E21906A4D73AF8D397B6DFA28F52355FBF16BCBACA72DAF170FE4CED247
+F8A80C1CB66BD33BBE1AD30182305ADB2A88BD5F9B435B472AD6564845EA9CD8
+84738801D498CF826C540664BC8E87B868C982E49D77916CB87E10AC669FBD19
+2CAEFD9113127041479C98CF1B2987A45A22ED99B048EB76AB183714E069D51E
+6DA757A9A4E17E07AB37FFEA7618ED5E583F4910C7EC87042E8180DDBA7CF58A
+B8417BBCCF198AFB196124807215030A9204771B3CAFA90876A5193F954D73ED
+F0BAB43D936D0617D804B6B2CACCE9FACD2035141808E583A6E4AD03FC1719B8
+7BC89A97156B32033B9A3538E348C8D7A59183132E9BADA34F1E77B2FC8CF783
+3ECF3E24FEAC7C7BE1E236A94C9C44CEC78DA17D4D33BEEAE1A76CB5D4F0DD8D
+93E332D493C6D6ECE0FC03CBBD275441D61AF9A42443355A369A0C495CDB74E5
+AE071679D9DFA6715543D3FC1B6E4F66E5557428C616047C498DA9F50EFA1683
+AADCF6B403F0EF9A78F1F8F1ACC478D0B5B66FD60322C5AFC4C79557998FC714
+41AAF6009A53424935C0EEEAED8CB4513D8CF9AD3B52CF941989591FAF2696CC
+40F1887F8EA77AEEDF67CD3BAB4BF1DB2E57087D50A1F5944942CA5CB7085240
+1929A28CF489F26F59B850FC78A647287740EF2755A91C7196E4A53063C42BC3
+575061B2CC994D41EFA131FCB266A9AD1E18DBD854F2B99846EC903AFBBEAA98
+B32671B08856D84FBB7BCF5B82D245F7DD6459CB437B4183ACA555B4B274A63E
+158F68D8873925660D260B4C7884014E735B72EF322D646C4CF5EA4917CAAA18
+3FF6ABC26D16ED118DC4F1B85B3405A6EBD15C1A186D7C7A9A8D22F6F03B5DED
+F11167C738C758092C6BEE44D03532AD27708884E6F3EBD040A906D59E81FDEB
+BF0C0AD4030D661DDC3048CF4883A59C362229EAB078978F7E62B9AFD9E329B4
+822CCFC1DCBC7D0714E5EF2B7BAA7126894612E5D1F4CE7421DB0580E8C3CCCA
+BEC8DFD6392E9575607C895CD9FA1D78E92B634D62F3FB5DA75BA65958F720A8
+C0006A580F39D8B63D7351BE480B24B3E10318BE8780D486D3AE2E510217A5A0
+3936E396AD22D01D611DDE5F0F5140BB003D24599E9238397939ABC3833B8B79
+5C2B8CF9DEA9F3DB71377EA34DFF4A7062E91BA9E090A815AAB4EE3CE94A4619
+488EB722ACB22B32C391633A9B6BFFE656C75BC7A9DEF0E02CDC56DAEA9597E9
+360562717D81560E24972ED5E8C9CDF7F54B30792829A9136D2CC9B1348504C7
+A2F500383EC033F4756FE20A8EC0B1B0643F8644C1D871AFE21412EF88BB7497
+C79E3905528B6B2F744B9C9F10988BE7D061F5A5F56C72EBFB94A5FFE994A2C5
+D0BBD6F79F2BBFC9B811D6B4AAF40FE1D3FA6DE3EC49E0F24EA9490D6E3F81E0
+B56FC8B4D6EA1A0E899A9C1ADE24693A6D7E4C214D0847E8C0D5B31FB133F4B0
+F77BC331474486F8E4A69E970054D0802BFBEFA856550D95FC2CA900F5D6D3D1
+38A892C66D541937D24D9FAF5F54F169E5E78BF181F2C2E2B2E2B5D6E0F21727
+1E420D2E69203BD76417DE9A70685382A0F3329FC26C671537CB07764D1165A7
+6E4403882716938A18DEDF1292F688F657E27FA8E5D86821978DB65B0166FC49
+E7CD5C8D1C6AE1B78EF02E8A81B51B20EF5BFA1EC1F2B80017292FBB6168CC82
+871CA253ACEF6AC823372F41CC766617377ADB19FD677C46D7CCABF870DC5DC5
+0366E0A5750ED38A2A86811F9852E9878A95D3BA0F6CE7FA2670480B6523BAA2
+ABAD6A9C2D43E2BD21F2EE7222D21DBC394EF4CA9FE693A5A77CEC2EA60645ED
+BA3BF1ACC360B253C970F7BB86281CA813563CDEE08817DBBA24059FF290B550
+4F803469E990F5ABC2F66726E7D04E00D8E634CEC60EFF5FB69ECCAC20C2986D
+65F5ECD610BAF2EA2AB937056DC724FEAE337F5777258FB5462F3C94AA7E94D0
+FCA0B0684F884D7EC6ED8BFD0AB95BD5830CB4ACBFE139AB0A0C1C288A318B59
+A9A3E79A5D1D8A13ED7F632C7E52216E16A331101EF404489B2B095C0F787063
+9370950775CA15495982D882396417FAC4FF86355E203F53B33F35D4A5175EAC
+A78FC91C980A6AA5BD49D87043C4686B224D0535C816ADD1D48BB45EE7529E64
+0EDB35B4A27C167DFE994EDFB41D9D166802E37318CB6D4CDDBC73F7CB30816D
+E9C645E32C1B7513199F8D099CF39BB8DD762B6A947AC26242B3D51B11971F72
+DA4F942EB19C883CC0749E1596CB89A1E6EACCB35594FD8E272F1DB7529B059F
+FB204FC404789EE182D117AB303A886EAACAC08999B19367801BA5622F5443E5
+1EB2903D603F215C9355DEEE42A5DD29C5CBAF1BA1FD52B9F8E1FC5DED7DE91F
+34A4461661549339B595FEF063BA44CC0DE7428E131CA38106279246F5B9FFAF
+B127B9B46B1F5E050133071924005746AD3D6AA91E4A0E75E5056AC983A6141D
+D3DE44D5B37461A76EF6A8906210456F13FCD15203A80AC071FE10B2F064145D
+0C7FCF12AC9EDAD42EDF4E327FA57D6BA92607F41B7E34A7DD27945B4AB2F0EA
+532AA886EC057F98964EC0CC1E4BE095ADCF030B1952293B7B6465919A833D52
+F24EF2D9BEE963F7A33320CE29D54471526D4592CB09B0DED834AEDCAE0B629C
+5BE4E13337BA87E9D64D744CA5CE709E528F7BBB7C35A3444D643B1ACDED2F6C
+F4CE7ABD757F477BB4F64459886814743C8872DD2312EB952D5DAD81B0A6E52E
+AF1915A81D5DE395BE25B24412ACFA3C65B7E447BC4B801B5531218BCA18B0B8
+D72809B5B3DC921B2BB0B76B91618064F45F614C3B3E0506CB24DF52FF8F2555
+6B231AD0088DBDDE51908430A8102E0246EE56870D08C960E00B9D49CFD7D751
+697625B30027C82D4B3AD0AD5CB90CEE2A2FF301608967581CC45FE77D67EFFB
+2508905DFB42A0C335D1FFF2FDA1DEBE81C39628F53601D9ABAA6211D044F930
+70378306273D11DA99BE820BFF208CE0A7A81447056FA422428A6A21389CCFDC
+5FC34E06B4EA5D9C5DA9AA401F1733E2CF6669B438134AF47130FB9838208A83
+668067B89C9025CC059E73C6B4C332E1D70BA59A83EB7E4407D000167DFDEC42
+8B86B4B1D5772DBC673CE5F8128858E46EAD3A675BB5BACF61E0D1114D5AC0A7
+D4BA9FD5C37FE37D6823A517F39B1FB14B01E38597E51BC93CB836825ED1A3B5
+B841CAF361302234A2C3560FDC71BCF6D8832A1D74AE60806863BC1F3271640D
+73A10720CD078DAF15652B50716C0BE61EBDBA0AAA8A6DAFAAA327C69C29321B
+251BF50D418596E84DC3BE92542887BC0785F6128085F019C1FE9EF33E02A968
+DB0504FAF26E033A05C4C37E5946EC500C5941F83318E765DCBCD06D4A09B208
+56F226B0C8A9C55B6EB087C936F7237FB2A3D2A262E9C6F95D454AB92801BF57
+B5788CD2C0FBAAF274BF5A8BA908CA18EC8FB5C52368DDBEC42F9C3E6FA16AD9
+6D4CB47C2359309BA3B458BD05FD4FB40EDF6B495DCE6A091E780B328BFA995F
+869B5ED92BF513511C6DD88690114C5F3626CC6824ADD9E2BBF528158995DB9C
+08888D928E420016C254485603C49FEA0D26E34850843A066F5628509183FB4F
+78C3E0FFDF61E91C984D23DBC5677442559540A798E820E3F1BCC192456E9B53
+72F2EE0EFE321115375F0E43AB35256C770F5DC063DC7DD4CC59CECE9E7F3BAE
+BD474CC7AA33FAEB2920A44D78A51D3B75964A4310F30CC0E33018D3E365F947
+A69434C67400EA09F40706320D603F292862AC24A488AAFAB0392C470C84C912
+11BD82A3A5A3B70D3DE85F3095A6AB122A930F8014AF527B71B424D29E91123B
+0934BAA13F0765A883CED744E967B810EF265AAB4F7097A817E94C580068AF35
+C141EEBC26D24754BEC2FF730ADA142BEAD3DE4292E93A359E701D90EC594E6C
+D1FC795EE82FEC8FEAB7D21C656D079645F36FC9FC9D7C8B35B0BF424FFCD466
+65CAD025F6C31398018304AF29117430B8745D8372FAE966404129C8BDD5F31B
+BD827695C491C7E6D7B15867AB4C5DF488CB9628C6C8C114293337043B1616D5
+6F6B6C5F75238B27ABBB0773565A686BFAD3593BF53BA7C8272E1C597DBA0D6F
+D16517424581069689EEBF47641F9A0E3E7367423FDD88FDFCE78426A0D3F0D9
+942F66169B84E5418C80585989E407B5415EEDD8961BABB8AE61BDD51AE60BCF
+033F5360E7294430CDEB05DFB40C382D28C9834782B68F73FE9C129B7AAEDC38
+E3B6DD8DC041408FA064E0AC4EE68A7C07D96A51A1B7C65CA28951E38B58B774
+0312CE987BBEC2B3C6F20556F7E8066353CC46D8AF15DA8D7CEC2DBA8A3038B0
+BC09C733C76D095F8BBA0EF44D6C1E397B19A866364DF8EAD8E2E0E7531C7525
+8A6451008591A02C59FC1DAA7C83A3689A79037EB90522FEE181763D496A716E
+C01C78642DFFE2589D3980574220F09B144072E6135DEF2919CC852056C82B8B
+7F8EAC363D0D89CBDFA1B40505F3D356EE16E5170FBEA46B426E3D88FEBD8E23
+59C2FEDC109DC7A300FAC3EBA750BF6071DAF7327884D3C7467A15189AF18DAE
+17F6605DDE4E2B2F3AFC641503E4DFE27F462705B356F7C17E1AA0E3D26C56EB
+DADA9BF8B1E7149459B958001093DE38391374A78BEF8951DB54A69964525693
+63C5017ADE86C0E2CA89BB581FF57D0370F8AED9C95E326F88533E690B1C591F
+ED30E893431F6F615ABB187130634BDAF94568E2E17613658D02B29A25F35F06
+7FFA714B60A56D2E9D586D4A4DBCFF440A2B47B179CD456EF099A34A56AF169E
+5CFBC9C59516407286B2E11184F91EF25925C9274A6EBCA6BF38EEEA96E27616
+5AF1E9F5E84D9888F8EE35119C43CD7F02DA23C130A2D1A753A2D1E25E0F7478
+1ED3F6BFE62714F53DB12D15138189D0DA31E79F18CDE3FC84CD6D6B5EAF9E23
+F90A1703C6C9B435623FD375F926C8D013620432174B8C765299F6F08897EF92
+F129CDBDC3006D3755D3EB5D2953E182015BED56819D5A7A1773CE22214CC7D6
+0ACECC81DB66E1C6AE9AB70B77F6DABCC09111F559DF0911A87726B44AB063FC
+1CD60C964334A97E2A6604CDA700C112450389FADEC5DCFC12980381CF6BD92D
+772BC45964247E3E39D087B52FB67077AA8197EDDA4F613DD43D1A3EB7D6F686
+8528F7024C7A22B61A33E43502CD37E91605E0EF16D28A9A2806518B839433F8
+1802738E0B1BF0C7E95C4C1500887FB099834FE6DF4CD9A9D7547341A6D8CF21
+F49B9F8E7A9D602644B31396A7270C989F1A5BA9E3E225BE1F592D02D8AECA8D
+79C304CB010A2645158654387C77AB0083D08A3C0A41B29453908AC57C181431
+101C6EF00A8A55B6CB8513DC8ADC5E2D6FDF41990E6B3DADBB607CF37411345E
+42D0DC8AE568B2DAC69CF347B18C175C0E91CD34ECBBBF3DB1B5E6CBC17AC9F2
+8F77337D91885D14FDA32EE7A7367A3A382E8A894A9AD550DE350398FFF2BEFB
+C05BB7A915B8DC4AA5AAFECCBF716F518CC608E1E76588CC77359CA228596279
+F95055FB260502B1377E1AD575D3C1FA65DC158057E071A56D2BA3BD77998B43
+938DC18257C526FF2F9625CCD7DF0AA3D50730B35720E75777DEA2175017A503
+A49509775646DC8D8926A75D64548B9E9C01AC33502A7BE04BA31441D5F39CCA
+F889AA4D6B0CBDB9023F05B39DD7CCCA53608173E9DC5D45E772A3F7B4F7C4E8
+C3F7E7DE51770B2C887F14C473EB4F1A2FA420F64F4DBA1A6B651625F2AEAEA7
+8A030BC2B65BC4237AEE381DCD24B6E9940F39EF1D4BF81DA1A25140BBA7E1ED
+FA371277B13A016B264B14833BCBD14E6B3F71FA822CD0E1B174B569ABDB6C6D
+CAFF1A208C8E409623A051033AC99A06FE1FDA685CAEFEAB404804A701A702DE
+79EFA5F9DBE3587A2B8434BAFF152B9F18C574FDA77AB286FBE21AE741813B4A
+CEA10B071946CD4EC410BEDE7C68CD0B5142C2A99C836861A5B6A07FFE60E7E4
+1201B9966CABE2B10E71888FB8FC43FDCCB882DC2792994AE178B6129F23FC45
+32BFF56904E68A53B85FB8DC55D917C7DDA412625BB28CCD6A74273F5204CC07
+962DF7D462C57DF81738A8AE709F63BAE35532607CDDBA7CAC46F6789CE52010
+D84412E3CA30A0B8DDDE45A1E9956B4A7A8199D3177B5CF715A120FBA413CFDD
+ECB451EDF3DE65A8FC8069D4D1F65890EA6D6969D8663C5909ABAC85D4941312
+CCDE68C63BAE2DC990B6D119FB0A8ECBD5A11C503A668FD66168BD051E55CCF8
+D0022F58FCD3B6020A70838B97BA5A54436F41D26F4FB60EFA36F9E632BA44A8
+A21F57BD665EEAF35BA65A4F2090F3D831E14B9164183C0565DE2352C00C1649
+0796E84BDB6B679DA065AAFFFBFA67CA8AE9D024A3700959262EB552C67FC216
+E61CEE4ADF9BADF3A38B4A618BFEF4CE0F96C5C382641C99B706A9BE793B24F8
+78CD09F4CCF19795F93B8B35AF5598470124204927C7EE6D3A87E05F40626F07
+B9521BFD489B136B01F406BCAC98D60130A298C5C455B0B2CF05465D268C55AE
+26CAB1A2D4D740EF3D90914D334910DB05B5BB62B6863A4CFAE3834014D94C38
+F8E20C677C6A8B6BFA4B1EAC29EC87CE9E3E08C458219FB6B719089AB6982F75
+ACF33109F84FC1C7F0F542FB61F78587B7010265B411CCF63F00EE397C6C9D39
+2E33E50B1182385C79773956ACCB5970A8758638FE8069401540EA209B2D5AFB
+3B20D9B33A51EECF3D65F0DA2C2063BA2A2AE9164761FFB5D1D36F2E21F29F31
+D2852443F8C6316545C9D413F64466CD7CB3D0DC23B5C282FF5E2F91B63B7486
+83800E8CF3D07434DF16557AD530DDFEACF3CEDE34C7C4ABA3278E815297C7E1
+DBCBA8FA4291D43F1D1AF0E35B0E09A2AC97F10A93AB9F2510BB690E3C635D2C
+986179ACA326D19BB958BC60382A9E8C765A978A148CF02403C2C9866D78F05C
+3DCD029540EDDFE623C9F016734B8BC19BDFB039BFF4FFF409DFF33F62508298
+B152FE332127EEF6B236AD5C1EF9B145849788311477ACC365D9E5848626DB26
+773F93F0C44AEA8B014A5A7125D09E28761A8720DA53966B251BE1C1534599F9
+B246763A28D4F9E3C52C33670EE390FCCD476419FA1C4429B31C055EB8072D74
+0C1FF3311293F931EA7F73A35E870F6D81D0FEA3CC445C841BED7089A64EA42D
+947359421B7EBDB671E2E30306912EB99A754AE5BEC90783DBB14BB0FB3FBF95
+25BF143F7C9D9D6DE690C88CFF219075D9F9698D23A5C428F7418DE625217393
+0B79113E1D56E74ECE402015E0AA9FC320E447AE0345FF429359C48D617CC9B4
+6FBF2F72C9DBC94794BD9584E23F757C49425E7665A1A97CCB278AF1016E4969
+C813A40590E738E70C5B732537F477E9B80B3860B6FFD35A631DA0B6BC84E4A3
+8C1576C9EE90FE2E5FFF30F1ADB9581C6296D442FE1D3B3526780C5F70F73E07
+0233A3C769F74334BA6560ED81163307DC4AE74060B736C49BD83A837CCD7EF7
+44EC891EA5828026982D9E56834A3663150A462939E6557A5AA30C47C4EAB037
+589BC1710A9F042AC39006A5170B0DB0A952257D231498633D99B3D405C2A4CA
+D064E43E50ADABA18A80301460C2F17965C5EA3DA09A7C96274AA1915FA9E98F
+059358763626AC7EDFAE84B026CC16BF40296FA76396148C57F5C0E219B759A9
+33A46A922233E0AD0FC248DFEAD35B8B6EA330B97BFB4A6AA6DC27DF5082AFC1
+C17A6DED72F61D0C7F4DE52A3AB13734E55A875946F6D36703BDF1B917A758B1
+C1B4D00A52E890C43A7B8C0BF725F82FD416DC8EF9BB6E0487D7682F79DAAC6A
+C9595E33481A87C6CFED013243C5BF92AAF6D700006F608E30CF70FE9E9E0835
+255F9ADC616A0218C7D4892B9188C61C801889291E17344448ED2D8C56095302
+E71CBCA27D70DC38B8BDEBCD7109D47FC1B6E6399F07AC085BE592FF9B5E4960
+02FDEF5F965785540CF412743E0C71126A68272CB23128133090E757249854BB
+3F271F2DD8D7FA66985F9C380C104FC3A1A69A0CC03E2AE81E1EB3C7A2C3C297
+BF91DD1A6E2B0D3798C3535717F8046E92EACDBBA1ABA7D68D08AD31AE673BD7
+D10BCAF3324CC5A668199904ED903BC88746F2995ED2F5B1B49C73C34607C632
+37FA574A1F09D9C42789077425B8153E8F7F36589B1EB8917C87FC29A5E97E14
+3FAB4DA5EC20C38DE0CD0863683B58DA5C412A72C1BB8280A9236A1600BAC9E4
+BB930318B55E3006E5371157B1E2567C9AC8FD1FE196AB8AA86EC2A27B5207F9
+81AF2F85115BBF22287BD8A041DCEB89B3F5DAE811F1740D010C345F53FCC8C7
+BA7C7D685ADB01AFDB0D30CE7CB0E3BA122B9C8FA4F2CF4C5BB5793439E57137
+9D2E63B6132100B459F31D822AA742DBA61B8CDACE93DA530A66C034125344F2
+DCAE69E08FE774A5E09B29466898ED616EAE3458478888DEAEE12B6C1E2B1228
+A8A7C9AD6658D0BDA20DDFB0B4D831AC61CD216A60DE294C7408F7E34487487B
+B462888649DA65F548C6EDE671FF2967FE50331006EB5E3636EA8998384CFFFE
+0CE6AE5DF4E49ACC5574C73223CA5904DABBF73437D55E2353AF9F7B17E33771
+775F67FF5C53C5D45C40E60252F70ACBDDC054CB3867AF0BA7B01EFACB67933A
+404D56C53520278826DC106956E120A34A7E2B9AFF2B46C2AB3E64FB38776E2C
+456B5901398E5BEFC7CEFC35AA61E497CCEADE62360A0EE94D0273636A6CA4F8
+F144CBA6697FE4707361E09ABBA371A5FB8D8FDD319ABEAB87A5C3AF9889AA70
+B53E3C5A9565AC1A2F275EA303D579A0221004365CE864634BBBDBF5036CBE63
+3B5358E8DDDF56C65BB54A9FDBA710A10F9E6C505A2D8D11A6A17551616EEAD5
+679126F3C7D52B17EDF2AFE286454580A34F1BD963699F1AB742DF7CD9EE4D34
+17DD8BA2497BEE1933B02EBED1161165924F04915D1A9D227B719AD876995D88
+7C67DF53C14C7FABDC5B4D773CCF361BC58413765E7DD21A439E86B74795203E
+24ED7491AE6C9FD9CF3310D3FD1E91FD3F714013722CA2B13DA3EAFC49A2506B
+58B3B2984A1933CADDFDD10C628BEA54C798AA4E0A84FB4639494814FA18D79C
+147BE5E688F182B901F9730DA6C8CF362F915F69CC74ED4B436E5DE3924D7DB1
+6B4728BC39E8F9E0841865BFB0AEDCD7404D48ADE9EAE74F6C1E9FADE513539D
+9056DF8B2F6168A86405EA4635C19E128DB67D6F7323BC14A983FF1CE808B4C1
+F9226F3C6521310DED43A16EA768C8395E6584E90C5F24857BD989C1C6C2C248
+06D4BCD3C2E271C7AF22210EC2A3EB1A73509082819760E2AE9950D761828F9C
+0D1DE7B23A9DE64AC61F48D45956B5894815F0DE950FF02FD0A4E0355900C665
+D1FE0B411D4E34B093E17AA8087B606AFE7B2E909AED96B799922953C8416148
+7C3CF96E27365C3A4CCCD78849CD9D9D498D7747EB8AE8137B16178BB67B7B36
+E41780DE90DC23072DB8916BC8C778B79215212719A88744DFF9AF40980996AF
+379552BC08C8FFDF6605FEBF9B3CFB6D3D27D07C49554DE4844981DBF08A43A5
+DDBC572CAAF60EF7F8C4137C38B057E1AD5D953FA64E6844EF770A9B19B7E643
+F376273E028EDAA0729CD722C57F05023957F93B281F91510ACBD72F476572F8
+B66681AFF60DE653F4C8BFFB5A9076447AA5676C08828D7C6AB803AE9063423E
+3FC8F0E7DF5F8238EE36A7B8DBFBB88DFDD587D5C9133B69C6E4B86D4FE42886
+F0BAA809350CC835274614E4DCFAB77A8AA83916E5B65351273A69E6F9B5DB39
+205E3A62C2C4F483B3D8BB2C4C7C72E2ECB6E024A275DBD82F5A1A9ACEDEFF4B
+9C5175BDE3DC023253026E5E321A0F5867654B8F11076CBD6D49F2A7A1F45420
+9CDD551806DF00372B4D0426EF46BEA85816AB39246F38427431D513FEF9E143
+64F3A06ED9F59F1F0C250C9C6D45FD2B6C69375E9E0B89A4478A5EC458E132FC
+433E8A93D3497DAE9E1AA0AA7CA895B8AF67913CF0D13310DB883D388AE9A35F
+F5780A0AB6D55CD9B976014689C185E9455AB5B9697DBA8B9132C517133CEA4F
+CE40FC2BD4D9DE31A6A5F60E00C781F6763DC03DE8D159CA70048B8CF6D1EBB2
+2BA6966CF523579CF5FE324AC1C7C12A50A8EE71A55B3A6078AC0EE02E877A02
+18F886CAF9FB51F29D01E3F4AB961E5515454D05490F4C57AFFC4E63C0D1FFE6
+C4BCEF8F67066A4284ADB88E569F0E7D36269A6A0DA678CAA5C1B1A4BDD3800D
+FA3E3624A3698300BE00884235A996F611644E19AF114AF29E045FF2E4BE248B
+7BE9FB19B64B2DED77D5CFF8D85A332A33EF073BC94E30BD78AACE2B40C9E04E
+1E88D9EF0F0116E27E9432D461B64FD5F4055EB420963FDA20CB8D746B6AFD30
+4C70C4DD1AE440D04C6DE4F876BA09591D1A7F7F5755DB5DBDF1AF0FBB9744A7
+051885F2F13400F77297D66BED2FB53CCE01B56A7B0F7A74DF38BBAC0BB556BC
+9EF9F4FE429DFA89650BF6453FD1B6F472427FF2F91DFC218BA4690C55CD23FA
+C7E2B86EEEA984E0DF8ABE65813C6E9068B878F22467E7D981601238F82A43AE
+4F61CD56ED2C3828D7DD53AF88655ED8E00FB33795EB13F5A166626D35A94AFA
+3EA4331C79B44C8AD4E85E8A58248B83FF91BFB89C64CAE2AA2EEB95677B075E
+3772681DF3F512E315C7266B9B6DD3C38619E8F0813451BF48660E137FC76714
+F799E17380CDE5813B4B6217B0D0A7763A754065E2CE172EE6DA76FF5038C614
+0050F3BC4DD98CFD8C0BF526ACA742F4B79B53708DD52EBE58B00CBAB52BE921
+C131A671AD85BBCDE61B97CB147D9786EB2C01DB4425E827C3297F9886BA6354
+C526D89B6B4629CF7DBC38AEF5D3EB58E92A7BBC14F796778BB3ACFC654E3CD6
+9B0C5EB8B24C3279D46CCC0A3EEBAC870EFECBAB222233E62E76022E9C80C109
+70517E245561033028135DE10E1BD8FA0BB9E5FC89AA5197CEE50A98EB778B63
+BF0E7A97BF243FC8D6952C78192F19753BE77B576486D491344D4DC5172F9655
+EC6D86C591840E8B90AB507C63A7942A88C5301C8E7C9AA2EB41BFDEBBF19DB8
+A905B90FEBB86086E2E01600FB897AA3EB954761045B00DF247C796EBD4E8E18
+41894D9F62E4C8551944FEF97BED212B29FF795A02979ABF453C0E83C00AA39B
+E95AFEFCEE23B58571795F0358912C7396AD8E05373E5DAC0F76AF1B7A5406CD
+2D82ED5E0F014AD1512DC75D71DCD22443E7A071E27A52329A04A18E12E4191C
+57DED26A8573ED0BBCF6417D993269E56241E45E05A61CE72C63252D908DBBB7
+ADCABD21921CD36B6C2B1C4A5D8E6ED8F29B8F6AC9B8097F477AD77CE01C51BA
+00BE8E44D5B3D3389E4ED09A7327763E7F50426CECA5424D243AA8BC7E7B5529
+9D14434148B294C2441DD0A926B678211EFC6A48EFE84130BD4D15BBD2CF1388
+B5EF11940CEF3CDD4AEE073AC131947B960D716973E63BB928977EEAD41B80E9
+BF08B06F0F107B4DE2828FECF7370578FC116F03ED602FFCE688FA6D25E274D5
+519B1EF07165FDB10CB32D3748C33CFB601C98D17F274887B554A596FA9B3C3E
+63A7C426779220BF013EFA2B30448FD9B20790F87A069E0704A1EB4188A4298D
+6A7ECAABF7F0454E3E7EB98650C2BB14D2B08F2265B439FB20C74BD93007DA70
+EC6C445351BD0607997666DA0A56A186859237F9BCCE4F4E594BC8A81E6E22EE
+5A58C7B349DDCF0F753B3DEF9484B841DD1428881B625A4E28CE54CF896711C9
+4D380F508081C26CC9090E09C9C6BA12FAECD7074E2549779CB6FB88EB1368A6
+F709F6A2CECFFC5CCF48CA2985BFB1CE3E0FA2CF5C3B0F612869171F3649ABE0
+20837D908FF436B01AB54EE132A8F0D0ABB4C1015FE6ED45575B1573AA3F9D64
+66B521470DCD5C73ADBDA46E86D6EC5667D2AEEB5F7938F42018E1541822E475
+B11180512375AE63EC7BB000883043513928140A23CBB26658A6B0521F8B8DBE
+2007353A924E762BD8DD3AD901D81DBADAA3DF3C2ED5AA2163167AEBD049390A
+F4459FAD558F3FBB3B805EB1EF332FB14F0C677FF9CFF7831F203383DE4CE7BB
+8CBA629180AFF36228D3997BFC97E051F2390791B6F5AC0B5AF929107EF3CEF3
+00894DE1693653C33B012583EC5FAED006BF9410510A709594D34E558DF5290C
+4A36633EA935D67A351630E6F75FCCFEC361A8298DD7C9DA2326C8EF247481EF
+20B8C91013AD02613FB321DC00C7B9EF87ED8AF212D769C0EC1D8F116950A60F
+3FB2273E4EB993A8CFD3787C86AAF54CE86DD44A9A652307B7EF8BDFF73942DF
+F52AE037D5D9FAD5E2D673F4346921B642EADD945164F8B8116C24D7A5EF8845
+0D1199AA2D6C6346075E1FEA51B351F6688DB0F9D3DA6489C34C9E1493038281
+D5929568721CF3A309C21FACDB7B4AC9BE329935446212E060629507D78CE8C4
+C5BA819D284C6AEEFD81CFF819A14C445BA6DFC9549CAAD4CF56FFB4FFD46716
+C60DA7F437EC08CEA0FD4711D745892ECC7AC2FD5422CB464D42977F991BC3DF
+52E26CCF63B0A0D73AF537712F551DF4C8A9EB5837C6CD11119603EE13228E6E
+3326A8A9484B9FBEF42D121304FD19581085459FE250BB3CFF7B689EE65EFAF9
+9CB50E6DF0DE0F2785EDA4C7B9E7AA036CAD799C8451C72C8387EE5BB933851F
+ABE54FD373AAA654DF7B5646427BB0165303DA86B8A778F4FAB052928B6ED9F6
+083D9DFFC0FBADB4BA284BF9E3D0F45337EE4E52138044E8D2D9B09D1B3BF028
+C9EAFE1E2D352CF101B1CB1546A455C3264E951519FEE78C35BACB2A4103D5F4
+78A555C6E7B706E40B55115364E3690C7A7632B74CAC15C54D97662DAB2E7549
+777A7D0F70F1D20C5DB19E77FF69AEEE8DDCC120783D327817D3BA0E2BB98D02
+123CFF3299A4475153DD03AC6ECCD53B7395EF1BBD235E4E635BD925B46E5E9E
+DD4E3818F1092525B84F504450523420B40140F7AB6FBC8441779B724B371939
+CBBC534E8AD2EAD3561DFAE319F1455D8F4D6F9A20A73A79FCAA449F067A1AAC
+90D25E25BE199A9AB789D2B130605CB19CD2F3D97130B38B6B493DF57325B885
+467EAF56A17FB05542CD9567B0E04E291EE8E9E19ED3EAEC6FB270FA3F477B65
+4B60FD0A5A0ECE6D822290233D2FD6D0ED1BBBD82E5F0222A18417773597F999
+D3619B41BDEDC612072E87FBEF1ACECF313C297F4D6B27837C60FD840353C902
+31CE101BFB0B80450E991D466C0D33093450F373EF24A82EDCED7B9D0BD658FB
+8C7422C078FFE08CACA51E7C14795759B2F8A100D042FA3BDA944E6412659973
+4037B9A540A20DABC38FB0F6A346E50E04D530115AC770669BF34FD88238EF5F
+A80C403CDA940AE1CA5213E8A06E387EEF3C7D4941D634C3B3BBEB133BABEFD4
+28D3FDB15075E1A6626F90303D4E3DD558B910308D9CF699AD02DB06629C894E
+B09D7EDDB076FBC42ECBC07B8C248F653BA031FBAE56D61762B48ECC3DE15CF8
+7FD07380AA03FA30DB29CED313D5EC2F8C21F74A337E76C097AF48463869D0A7
+20F46A5FE98359236E7DEBF231916B70AFC44E201F13215D4C0A017EA43ACA63
+F86A6458D0AA360E451DC4E3F864F33ACC0D5187DA632DCBEACF296C6C85A42B
+A31E58EFD9F8B19893B59525B1DAEC780A71CA6FD27CA22C23733382E6D46689
+9AB673C87D7C6302C34FABC19B4BD25CAF910BA2A2957DC98917CA2BFB27636C
+80F2A056CFDC2CB868CDA68F342AAC19538BA177B228B3736D6050298F868F8A
+E9F0
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l047033t.pfa b/lib/fonts/l047033t.pfa
new file mode 100644
index 0000000..11e8dcd
--- /dev/null
+++ b/lib/fonts/l047033t.pfa
@@ -0,0 +1,1353 @@
+%!PS-AdobeFont-1.0: LuxiMono-Oblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Mono Oblique) readonly def
+/FamilyName (Luxi Mono) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch true def
+/UnderlinePosition -36 def
+/UnderlineThickness 72 def
+end readonly def
+/FontName /LuxiMono-Oblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-15 -211 758 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078985 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D83D51B996CA62E18F5E16
+E975A60A300FD933D7A757982DDDB53E6F052956F0A57B2EEAD78CF7E7056859
+D267B6E270C1FF751B2B0803C0B282576AA3575CC0743877BC5F871D3E0260CA
+F07EA74B7C3BD6E1C9B3441A87CBE0C24C39D5CED05780E7A051605C83647B3B
+4E86D8C9CDCBC1029AA84E30E1903B322805D506160BED37770D3317D2FE2469
+3B12CC7ACC1E3BF68E1F4F3AA7AACEAAB78CC0288FC854175DEF8280BA4981A7
+E88AEA83A0960C26504940E1104086BA90E50BD53FF14FD9EB047A0FBE45457B
+B4327143B7AA30A23A05D29D397FE113A6AEF33F0AED8CAE911EA27A56560D87
+1317E25F10F1FE017D115ABB4800E8CE8926A3146BAEB4E48DDFC4834F93F488
+42CF2A19F662EA9A223B7F12DE1F71E9197DB954D2E57806F6CC5741E5AD0EEF
+0A47F7D6CBF12D269A2ACCFE3976CA6829DC8BCE2165E18952C86A417777B867
+93F78E7A83BCB3FFE7891DAC14FD7FF0D327E664BF01093046303A3D43CF4E2D
+1D22D2CC2900FA2D274C9A5E857C780DFBB1E935E529EA1903FB85C982282A15
+A36BA8725067022561F47DFDAE8B913B525718B98BEC9AA28A50EB40A96D1A92
+EC82A03A1D24CBCF043F743547B8DF642E7B872793C2D61ABAD6B655233F09E0
+509B371B60CA55FCACF6FDAC2D1FF5710D1E9613F5837963BEA103D99E02F9D7
+B75C9D78DF42286BDF35A50997D6BBCBF08309D0247C1E9410FD6F1A5BCFE056
+02A6C4C5C6E54F32B1AA03A7B377D0F8C5378DE4A6BD519FD954BE94EECC40B1
+1B2B14FAEE89675C2D6DD97623A9EBAC87A08DBF8A71417904116B989D30D794
+A9ACFF1EB9FD4EB6627F541FC552E3602EAAC4798761225FA682C5646A21FCDC
+FE9934A59F90722F6A4D1A4BA63C4D44412F38CF175A8FEFDF9130DA4FA2F614
+E6842BF6F2D1DB5D8CEA85ACDA992C3ED51F60422EE7BD353AC911432419B925
+629BA2CF0CE7D2B93AE1783756F78FC322FB4BD50986AA0AB7B789DAAEE7416B
+8023B87A09EFF918BDC4147B761217310B1467D92B15E49C3E15AF62D47AACD4
+AD77F5AE7EEFF90937C6FB7A0C27AB7EBDF1D97E1512925D772B114BB44747C2
+9170057AE71C3A36D11E1B8AD9C1CCB207915DC181A0FC47E0F66B1018EB091B
+54602D0D0F74463EEE996ADAD5F99148CCFB27D402A59BC27D610BC0177BC0E8
+CB287101F44CC082E657BDAD45DE4C4E231522E56FE328FCE34D38B020D3E34A
+99A9CC2BFE1DEF5E1129CA82364C6D62A346F94599B9ADCB5459507A92F19D72
+9D461A4DEB9AB96E86C21085F9587191E01BF047B383C1DA20F1F56866D370D8
+F3DCCA23F36C776866BCEC11F8451FD632233B2973A1A4A64B94558A92A287F5
+074A8C0148F2AE882FA202212C575F5B32C44C767CE47A8101B25530F8BE1C8F
+B45642B3C7C2EF7FEBA3A38EE6BA20636A525A7A4305D8CA22BDFE84D0F95F11
+AE5AEEE2D2F22391F7CB647E1131C0853DDDE1C65EF3C618B286794875DD6690
+7ADFA1F1812F1F078C851C24E2B2C31D593589E9F27228CA21AF66F4E649B6D2
+3F67B91206DBE74E704276634E6032C91B71CEFADC7BFE832A8955F139F56981
+3422C47B3E8809B23C259975D466440820DD4E9E5F20A24787504667FAD72202
+83FE9B391A7CF5F297CDEE3DA8E9B9620F1DB2D387351409D38A9C120367E388
+4D9724EE90C5BA737B847A5E330A23ED12DB609837BA866780582E486C89CDEA
+39D101941B7608A5633B6EF6FA9848C2F8FD8DC9AD48201C98A7E72C38861822
+8DE5C6800E152D2CD869137DCDE16DCACE6019FFD26751A5689967512AC8BE34
+882245228E4774EDFF6C8E4A805F854AC5CE495EB91F84876A1FBCCB65F5E896
+BF07B3AE7B4B6F388D6EE0072BD9DBCA176D225D0F45E55F492457FFD2CB27C6
+DDBA44578E2AB640190F11C953C3C80CFF99D2FB39BDEF423AA9AA4DB4D4010F
+BAC17523B4B386B4E81B98F0AAA487A38641A966C829607521C7CCDFD1ACC6E4
+088F0295842C8F86DB2D05311EF38924840BC8FA3E02D9B554475C09786CC4E9
+F4B942030E1765F1CCCA561FDCECD1579DFE1F6B4A30D35576599941A2CAD8A7
+783135720E6AC6454BD4F1A7C1A1CCC9AB629445A4423AFA2B99296B2A478735
+62DEEDBD02BE125A4F7FAAA55410683B4950F60131BC8969A7E52BB8E11F986B
+5193BF75D36BACD8D2B732FFB29A5A7E76E6BD785EB1F605D035B653276EE252
+344EE302BFD7DCEF9C1DFA24532D6E0AF7F221ACBFF7EF479F8031B8C836ABAC
+FE89FEBF57CCF8089F9387AF1E919B815FDB85C69DACC562FCCF6BF843E088DD
+E64FAD2F51D22189D6D2402FB12C9CF390791BF3F628C04978EF15CC9C2EA909
+B55DB3141788765F610587CF76FD63C73FA8FFE8F7697529D85F42E9FC0DABE9
+4DEFBDE3BC659FB168A8C4BF06A57A8661EC248E1579101F4B7CF022E7186675
+EBF6E5F8C3DA362612D97EE664BD10A0A81DFCA85F2C3250BA95B0903B45FC2E
+34AA1C9900C092C3C1EE4A514EFDDE0F7BBB3FAE4A7019B547126FD62FE6ADB2
+17B9F504BED3487D1CA9DC6B5DD9DE01C2CCAEC45A0E115C251B0E9275FD216A
+9A7445B40BEEA1E99997E81D10C6331797DD98C94288A64DD4DEAFB68E64806D
+4B758A177694A38BB736D5C799F8B64FAEE01E8DBCA99597F0DC4DADCFACCDA1
+FC3010B68BA528E49BFC3A72AEC35B084DA9BEEF372C53AFF900824CE31269AF
+9FE252457BF229DA29CAAFC67A6B91E2B59922379302D243B2BAA44A6D24DE8E
+9D7470F7987C54DC3407221E1E90FA763B03536C9FE5DF99064B716412EBB665
+762686EB4249D83C7D80B27817DDBB152DB064796102467E4A604EF3328EABB5
+3366D50B9E2330CCFF98A8B98DD6E2C39AD991C8921DAFC4CDFF75DDE5E2F2E2
+DC1D8091B7E4B03A9772298DE764FE81410506B7FD8102EC4186D6AF7219DBBD
+E11BC975E26F8057F5EFFC1FBA8E80C4653E80F24347D8D5697505B9D3FBF980
+847430935126B257A8E0B1326AE1C06A5EFC97F01C45471C7A528C550D2FBA8D
+9CF4235FBFD4340B9CFFFF0802EF934183F93E0CC81CB125ACD01FD01B669595
+00A7B8675E1E61515594C1612ABC6C08B93732760B843FC93880E9A1700FB89B
+5DDD227A3BB43D2C30A953182EC1717EEB6AB016EFF3FF18108BAAFC62AFE6C4
+819B12052B09742A16F9C86FE887BCE63B23A422FCB2531235CE49CD4E7D3B85
+EF05671D86BBD1494CFA9F2E8A9AE5C0BF831B6E537EC57F69626AC89B685D39
+AB226C5339D90F0CD595169E3D3F70DE1B05CCD3A7B54AADB9C0D0BBF1E35D47
+F55ACA00064767FA1A02318CC3F90635CEE5944C984148BF437352CBC2122F42
+26675385DD0131BC7F41CF4BB9D914D29972DCF531A1074055477B3AC44FF0F1
+D895759AF4B365FE9112BC4958191171EBF1EEEC3DFFBCF23DF9679CA9350A6D
+66E54A3EACEF4390B7CD1A9C88C53490119121DA5DB6E77D9E065E9EC2B0DD1D
+2A276275A9CCF63D4462A2DAC9B3F62F20BF5C8B3FFAEFBA2971A0DA0F78DC73
+FA301543A932076CC943C65D5147E2A018209F0D2C18926355994F3F17AC6310
+909B998AFA45EB9B9E5225630821DD05D6035F9677F839A7970499234D93C0F5
+5167BD2FCD1A8D3FC1850E21978C3E09188688E383677E091DCE521F65A8ED62
+1020255B64B2889C787963D0466EC3BBB6BD2A02907B6D8355A3149EB88E5EFB
+D95B59470D51616B93B5DC90C84564AF3126689E63DC98D432B6FAE3CAF328CF
+04373D09BFA77F54368D24D546C7B7FCCC1F66B7949AE19136EBA43BB5B0FE54
+E0E7EC4DE599DEDF4B2A437985235F08142555F62282CE0D0187987F7663812F
+DF9458012EC5EE9624024DD39C3C6F3862E12ACD7D7D993F7A36A0E08E777C04
+DC55DBB78C02639ADB7D7156624E00CCDE7B3637C8DCFA60BD96E03786E27237
+180F51C3613F2C1B5C38F173A5E6CFE20F074C3BCE04556B6A6F2677C83DB5D1
+0F3DA48AA22E8B10D61132A58534C477D8A6146F60F1201801046500D37541B8
+F0576F790E918F92ED070B31DE94AD7F46EAF05F3677BB5041F1899BE14950F9
+7CBCA06BF444839A18126D23D57D567E65F9D4394F4846D88F6D3EA9D76BF4CE
+9D168701DEC9254F2F0676F27917D25EBF495AD97144886A468F8CFE1475C3BB
+DA73DF9EE532AC7EE2D706824B81467A9A2EE84C5D6205C4E1916C8250C778E9
+830718DDB534E6BA14F4A1D723CAF5A43F7668D6235580CEF1D296A9828F7397
+1D97D57748460EBA113342449E28B8EF96B9D0B8AD79CFF9FCCB979C86F14149
+4970698ED1FB72870122807321E0E2C3B1FD9B6B88FC3144A594646335BEB914
+B8882474AF2A0315BB55C1924EA4BD6E305B7B92E2BA498F5EDF6E0C13AA9A10
+218899781EA3EB98E9C9C52361BB9338766F055198970A06812DAB8EFE4893B9
+AFFEB1D540EB70D18CF3C8D2CACAB15A0D158E21958F020427F936E15F969467
+D2D998C50541009AAB95BB2844A0F1FE9E3394BB64A6B1E5AB8F98E9311A0CA4
+38CE611ED06E80C9DFA8B380A89AF7D18D1692DA62D816FA3E20DD647958F52B
+9C7219C4AE3A6CB987E1C0442D1F92BE6121DFD75A4E7F68A4D3E6F2BFBF000F
+509F8CFFFCABED431E5CF48B6BEAD630ED02D893D8F3A16E97E91C802B23153D
+A2E93A3A9BD228AA835C9394085111344805E53B23459251A1FF26802D7A736C
+9ED13E9B53D9BEC50A3D35624431F2E27E05FF01E56BC64801D06434C7179E81
+9390FDD19E322010950F09F9A36878E41D9D3C2E4FE37C2AFDFAE9519FE4939D
+DAAD914E331196BC856E68BDDCCAEAD7551B0C9808E10A92D02275AF1A5590B0
+CB71F116BFC878EEB358E741F35F8C69BC659B844E2946E1FF649001A6A2B1F9
+F973DE46F57A27A567EECCE8A1EEE48760C663F9D9E5665F2038767CACCA4A9C
+C9D0C11D846A5C649B52FEC6B42EA6717434807A999FB70784E620E9E4F05638
+7CCA3D6BD952B69AB9845FCF2E197455DB59A118B8C43C26E5693170463E1DAE
+A8CAF498A7036EFC436AACDF9221A35AC4175917FAB053818A318F7CE4C218DF
+EBE15A7E773CD4E988643B09D6F5482B9929D12A1C3A8B6611F14FD47C21BFAE
+674C10B6B5FA34108CE615812F9D0E95E34F84BF024D6EC5AAABF6011684A03D
+E83B69273A74D75073A380781D38C7D2A317086D80BB9BC3F99EDCBF8C3E4077
+39FCB1D7F88391FD4445DD94E2F193839B3A5C2CE65329FBAF0CE58CC24D01D3
+539D2C0F94F65DA1E5BBBBA772997227B2A702EFF5EFEC87195F6905E9A9ADBC
+B8FF45681D61D02D28B119241FF8C8B377195451FD30AE615EC2913FD53B8DF8
+5E2E4A63663FD231758FCB97DFC18F1B522A9C1AD976C4FDF257E1D529E1D325
+34E6C1A6D8339B6A61577A17947148481A62C5E41238FA86968A3ED0DED467B3
+4AB877EFC912839525FF9A52C0E86FC7A9D7499FC0A75C604299099106256F5E
+EC8168FB9343C144A726004BE642D55027DF9B18B80F9EC609A91C8E8E1E4AED
+FBBED28CE193CD71F0F24CB64F08F936B7B0932CB6466E1BA4D8EA73E66A146F
+12CB155775FDBAE83E6AFDC46E9A0680387B6663919884E88BD13FC117963368
+0C637980CCE4B7F393A7A7D4BAFFBAF563CE3358CB959BADF631B42E21E164AF
+81AC41C462EB987D4A90EEEFEC128D1545C27A8A34FD0781F85C1FB588B2B12B
+3DD933BD3C85BC4DB4D6EF64D7A1E71A68E56894E93775823EF35513DA281866
+9AECEE4647B99680344398D121C290923103E463B7CBF17514F32D1201FA86C6
+75C00997EDC3C17DF62E0A4EDC539167A79AB515B0712CD5702B3C8ED1662A5D
+AA8994BFBB26CE64A54A1AF3B2373E8215CE0F64A6BA038654E1A098DE4E67EC
+EF8244DCAF470EB351B684722E9FF7EFA6FCD589A1DF28B713A585F013DCD268
+4808FA1693FED0A859BEDEFF143673340F75A50F4904E3FA2351D874ED7DD95F
+149C82171CF7992CE2C64C64CDF1E9E0C9CCEF0DBFA5CEB4B20B4466E1079B0E
+8BE6CABDB2C771776DB783EC1E4AA66FBD34EA8CD04D253B005D206916B19EAB
+2F89BDEA64268DBA665FAA0D68D2371EE1327D0C0CF18FEF2CA99B93A322FDDE
+68D8F289A92C39C2B6B722DC1DF742BA4B1BE35259F0CC9DF36FFDD4E037B512
+364BF1D2D450843A1E9651A7431424BF1425AA1C2CC5C8E0DDBC959966BC3099
+D792ABB111B5AF5D48027A853AA22167A6704708AE7AC5E94B0F233512A7140E
+125D86625BB6DDD4B919AA9F322F34A570B772307596216631906BB5B8D856F1
+665D2168ED20C9C7B5D9B4B49584B4687ADD1D4F888229E6A2DA6D7CECC34442
+3D48FF83F6AA41BBEC5A5627FC8A3F6D9A4AB9130C6FD0DDA44B48434200E0A4
+B939668D041BDBB88B5EDF1916598B4E6A28B893C4C1817C14D1E2335533F236
+B7B62C425C7155B85EDE07CFAC64B907C115859965A617D383440944DB680D80
+B959CD223F917446FF9354D6C833AF334E8E1C8EAABDEE4FBC864B5D4AF6D0D0
+3B26D04BF93BF3DED0DC029E69DA8D7D0404DFF15E050B233180930BD8B87813
+1661177C7E5B5348BF0EC3B12682EB539168A4304F754F244C8F2FC92D24AF2A
+27B4CC7B9FC94447E28DE63B3FE9754FE4C6BB25B2F5DC5869A1A2D088406CFF
+893AF7968C6D4DCE14E9133AAC1F03664E1E65A15C440BE2E9D7F48FD6F63A1E
+9C06C311A7990D17134F424C41FBA0351FE639313CAA5D5E13FBD636E512A543
+1AA47D50876064744E03B82CFFBA550FE76D4A3DF6481F178F27D5B2557C0690
+D702153C470986414604018F15C89DB61F10BB7CC0ADBEC3F7CB3359F9F85473
+94377EC80668B4947F508CAFD4E7566F388801E5CFF6DD19EAD712D1E2EB9AE2
+F15A76E0F5844A7D7609D654B6E32991568CDB99ABC3078D960C0D1125A75A1B
+90B73079E29654C0DBA19565303A9106602DAEBD547C31F82C29DB4A98F6142F
+B67DB4D934D42853462A2EAF9CB05D6E0901E8774491BD44219EEB9CF4FE4AF2
+493FA01140E2ED9FCB1372E6484D2ABE6B1EB5A63E272F44F7DB36080342F7BC
+A63321982294C76A9E63823C63722EACCA6C6A90010D3343A89E49FA2103ABFC
+C60D3DFBBEC711F50B739031C43D984D8D59A2A4BA4937B5A08E55E6319B49C5
+D36B1A39170EEBB4D892228788F90DCD25878A31660AFE06CDBA1E656C60BF5D
+0A07A2104EA457D1B3C6E54D068C7094AB8D0B9FBEA7E66C72547B7F63B8093D
+1B29DF5F16D4BE002A4C5093AD3567AB0E085C87DD97FA849C1811CA8014B54A
+C1B1518E962E8C96D1295955C53DBA39ED5821FB1900F24DFBB7C8F1942298AD
+E97C85BE7A0D46873EDDD6D5EE79531DB92F3A8DD319D89E5D59BC4761562709
+EFA2526749A5FA9632CCC71BDF953A4F0A26C5B4F383A7CB429322736F449F43
+570942D8393FA50AF619BBF760016BB43DD12DCF93A150D7CF1B41EBB4AE221E
+3C2F91C3D9DA821D2297B0C13A4555E289BE8B900A7B7FCFE2A1AB4405ED44BD
+76F459235B3A5CFACA4323E85FAC84BFCE532BA323A92554D9799B20298FB086
+EC7A1CEB5D36BF34E7D6BE96D8FB7CABB562A59ECBBDE044E0CCDC42B77766D0
+54F2B99E0A7454C4FD03E30CCCF3887CA6C048C12F9D1D8E6155D490E78833C7
+EE6085889F8C8DA07E233FDD3BE1164C715B07A160EEE303CAF453079DED6F94
+91311B6CC2C79343448E6C94DE4CB1159E00CCAC3DAB69443B4A52270FAF2DF9
+285B6FF81E7F2413E7A79BEF760C253E9AD40B28D86F4924CC02274A6E37102C
+0716859EFA924E50581B092D2EEBD55409A211010729337DD11B376D70B2E816
+39E3F67B0CA5051F2FE1D6D732878A8665B255A5C490F6376021D7C3E614BCF3
+CC3EF1045CDAF7A6DB17E3C496FF792605D5388C93E2316264D9CBBD3FB64258
+F462A7F4EC677BADA2948E272D2EA4F7D45344CFE0764886CFA3FFC4A2177574
+168F3236BA418838B7C0F68B9AF7FE806F1057E97575A79D4815C707C5EEEF46
+3A37A0E5B3DF712246A50C8A1D08940CC73A75FB7E80F73FC044D56001AE3474
+BD7AB6A05DD79585B4084489C2FB228A7BC1E39DF7C01F9FB6A8E8F9D6675C28
+351C433CBBDAB5B7F9EDF1F299B9F3831D60F6F7FC0839F3E33239F1F75E02BE
+2F0D9F0842A3DF1586DB930CEECFCACD4CD74AB61EB66B20C3240507EDC9B178
+B0DA13F58AF8CF48526D84D39D7E0EC4E8D2E83CF8510E052D2687C6FD00AA79
+FC426348F421771E9F728AE1DA40FC3A6400E2F00164C7640EE12F8B9D6D485E
+C0AB79540F30441E97941E5D9920DA22439730C84E1404E2E3142966D2FAE1C2
+937BD857F6A44B76776FDB46E849DA71032EFE2A5B50349990B90EC233E75ADF
+E940E4EFC436D15DAD29C10BA71FF988ABB796B659FC250BA6BD83561D00DD2B
+EE1B4187754F0DD7FC325EF420CF64149EB7C010F4A0230F5C00E8EF0287A430
+FD501437E36B3CA17C50A47800E8ECCCAC731F5217DC39CAC15EC1326FE67412
+4C8B6C795C60587B4A9200328FD08CC435723ABD617A9C1EB6D6137F845F1EF8
+12B2E76659E88A00B35C3D7DAF9126E35794B2BFA733206435AAD584A464DA46
+11C6F47250EF166301246CA57B7A4A360A43A577560FA90310B9A41DE8A7A569
+11DB0902F1F8F4580D2C9990E19E6DE153D42AE72F9CD6654A09EC69086100BB
+7C7F940DD92A8404A09B6CBA2577AFF4FBD1731392B404F2C73477C5643AFD49
+CDFF85D630DE9014437AFD41DDB2A235B606AD3D19A3F32DDA92502C833B27B9
+FE7EA1B93C4EF69D6C25FEF0919D5270F1FA526EDE7CACFAD9282558BE6669C1
+AD9987C7261825EC00DD51D806B2ACC0F1325743093B6B1BE15CB05582D942EE
+7F32F08C3FF5D4BE9BDA66523F19C565035E56A2BC2610CBBD446735F81BB02C
+4A1D232F34BD287241B57B5DBCCA8529FCDA70CAB0464A91CD99A0B68A5BA7DD
+1643513B5EC3F79264DAB7936CD59A7953F563E5E34EF016CCF46F1C1CCFAFD5
+118CFF688015AA2B3B3F287295665D51C4DCD6E96D18BA3C5E25AE7886DA085A
+C1A0FB9471BE802C6D69B23BB1E9AD88FE3258FDE833182295330067910857B0
+A3A72BE8834CB2A1DEDC38CDAE04D2B0CC5492D490173A4757421323238C8438
+A660C7AFFA3C261E5EE4CD655B19B6FDE54760C2FB0955941097301142206565
+D048CFE4A7148DFDFB2012490C551A9309FCFC651892242EA852DA00FD19829D
+1838904AE7061E21A7F1566E70469F52BC8B9E02EFF3D944B162D3C563D91E8B
+28382FDCEE78EB8A527C9B6FFECB466AD43E0C0DA5C16831467F53EDB0CB8626
+BA92737DA27C98AB10C97A8A76353D3F975EC666FA00DB003015608CA6BAEEED
+AB8BAC7D02A6607CED006DC1B4AF02110EBCCB50854DE1633C8085ECF57271E2
+49B479B3BA13B3D491313B266C9085ADDB3EF486237AF30306704B36D99B99D9
+B4DDDA188FD08BFBA1D7691651338BD1F9E3D2325CCB349327D09AD5A9F82548
+0CB6FC48BB965A24E3D2438BC00A80BDBF322E5B81DD7D51599A8EED5E1C0CBD
+3D353DF1BFBC3050243CA4CDF48EDB660DAD7CD4326E7D8ECFEDDC3B79A28A58
+89FE0A38791F9778B809664E1DF7B0DD829288C3C7F00CAC6182629E86B1931D
+D5145A5DA2FC1EBCF001ABA058AA48027688AE1725719BE01163C03F26FB3C6A
+DE78AC5156763D1955A713CA60E9B98A0C8A84D66628217093FEE40C45E1B873
+BE5E5629F437E9C821EF110B3F89692B89F15F7FBF46FA1B31B66F0BB6956A0A
+B1233B3D0475B839B2F3A57C1EA98842DB201E2F78D654837C11035F52C165A4
+91206BBDFB2098B435A0BC91622094B9F460956D1152AAEBE80BF2AD888DC412
+F8741BD4B4F5E4577F5F1931C1D9D6D8F16D63376507465B216E42586E28903A
+8FC9A8799742081204B5BAE38A59047E0668598102BF487733BE3F830A1F524E
+55CA5F45EFF823069DF8D162A2B4BE2542D6AAE3D7506710E46E50F80E4E95B6
+A5CFCD4063974BE71542FE87820C530BDF026DF178AF3F99BAE56F50DEB17645
+ED9FCB0F52A576EAAEDD00E5110E7406C3757DC5120D4E8263ED0F04FC7AEF04
+BF4ED0D0FD4EC2CF08044677B8CD49517FC934AC97789EBA59A68CF5593D45C5
+7257A4408935543255CB46F8BFDF523E1695065265FBF1948B95DEC97C7419E3
+D15BD2640E3965DD0FF38015994858FC8FD1EE7CCD08CA522F88584177240D93
+5E51036BD64402950E6E655BCF7AF79D94D5881A04E439DB1CA3D1CAB39CCA82
+19D1CBE17DBC2DB0AD5596B0BDEE6561229BA42A69763722DE13CF80BFC544D0
+49E9EDA64605BE71FD6BF076573B8F7ECFBCFF911AF62B6C45056C3D62779A55
+5AB3824802C2B317B985A9FFB380EEAE5E816EDE9A381334A323E1A3EA9892FF
+6B480084B6FC82E42413CC9DA035A5B587DE706804232F4C269FF4E13D8A03AC
+480124BF0C5C5536F9B491A40F9E5B74C154E6A7A05D91E0A01D1B07BD9CA08A
+DEB2B51FD97C30D828A530BF26D35EAF941340FE61AF9D30D96E7293676D55B2
+0F20991553AC5910B75E6C8F5728F5060B3B35A223DB1A69C4D2E752335B2C9A
+4D380197F9413221E12876EBD61467024A304EDF24E6FFB17622DAACB5AD710A
+439CD1626F3A6836EB48315B2011491FF4F2FD7D9046315C8998FE7C758D3568
+D6BA5C6E158ED2FCDAA81B56B603DBBD917D82C124A61F629F9F69F834D08B59
+B53F10029802F0426C83E923D658D7F8D04D96AF9912389EB467F7271278601B
+DCF84562F771B4BAE0A5A367015F91512A72171E37CAEA1B9930C0EE51275FE5
+0F49B05CAC5E9EFCDCD57CAA3EB5D101CEED7545F2BA17BC45648D22119B23B1
+0F9B7DC950350929A310C3853C4333C230A78479127953E85A56C335B264FCC2
+FCB6737637F864A503BD2E4FE44F14AFD8E8B51EBCA87910F6AC4671F9A9591D
+972D0AB26E2AF36519CAA939C07D6D75F56BB331E7F37B6173383EA3B967981C
+903177D5E441B6069D6310476781779F68B4A60EDB732DF6A9BF1606B5BA8616
+AD10D97F711902CFE0B79A228F3CE5D31D7E35FDE180E3A52609BF2A3E3E6DBA
+E83650227EED7657D43594200EE4B71BE9A70ACF49A79173A985E1FCDFCFB705
+EF6D655E220FFA05B96AD4A5EA28FE833272A2034E0DE412818E89160B1AB71D
+CC2293238DA9EEC3A0E6BFDAD89BE4742A4F893CFDC4847E769A8AE4E3607D2C
+8FCAB808540C553DFF751FFB4996580010C53EDFF3354EECD54DD2AFE4BBAA66
+3587D0488A2E96BD38B16D5265FE05D92608F41CF56FEF44E977CD965DD29390
+7393AA40AABEB5006D6F0CC0740DB96B2685737C89E445DC07718B5986D13284
+0589CE723475C6E750F398CF7B138D4017120F774054EFB7CFF3182167A24035
+0A31A73C79CC763DDBC12C371D8A77F7B9802F9200EF1715F163EAAD1BD26139
+289405D97CAA32BF9D5C2979382B78635E39E4B4DDC0AE2A0B2B411C08A8D0D9
+ECF61C48C33693F24EF1B49293B2F637732C932C35998E9F7C2CC23B5031CAD9
+B2A816310F484FA71FAEA04B09237762C23BA7D864095B3234E32814AAB28142
+F65EEEED4BED3A1B7AE05BE68D6FDD81AD73CA46CC51FE29CBB6AD9A7FB0C521
+6B776EA1A7418CF0D4168AC00CF74DC39BF649B27F32F9791D51DC32FEF7E1B2
+F79502F3AF78BA3D549E5FB21AE5D265326D93CB4D32F6DFEF33029432A74D1E
+B23363450A94833F158F86B7885E877AF5F413BF0EB3DB99B508CE4CAE50BAF5
+C522A038210828B44EE62FF7D64E0E33D959D6F45FDED3FDD6FA828A5858AF82
+4A63D360801D8DDC9ED0E131E3339E86C0A6E1C20F7B7F85BEEAA6067F18D9F8
+E5971282585D3930011661A5F4333868CEF20CF01770BA2C60DEFF2B368AD21D
+D4167DD179EECBE8EC29225FBF1FCCC1D1D5A311703D80C942388BCE852CAD69
+E6034691247123B45A5613C7A307A3118DF37F009001A8A87D093BD0F48B1E93
+57A0360E523CAD04BF1BE259C75F52043A7BA57EE718852D350F7ACCA3664722
+20026A57015ED6C0208F36AB7247D91F81868424C5871A376924FCAE64382287
+D232C928831EB8C80D0A107DBB9CB53568E51B85912733B9559B6DC8287EE61D
+BDB6159977F76D58C6D925CDEC01F728D7D6BDD27A8E61473EDAA7BD7D80D20F
+B47E20C691794186AAA4F6AB76FCA59058E190DDFA2179EA4A3297BCBFD6F546
+EC6A1F7B013264BD04DE97E325A7F440ABA206CE1F0AD45AD09932F33DA483FD
+A8C54582ECDB96F9E612C8F2A7DA397E1CDFC11D8C1168F18B5DE813CF7EA37E
+1C7B2DF3B38AA6B3D96C6DE5637FBA31152034EDBC6511A965C78CB526DF27E7
+967AB9939D93DB8379DD1AE267FB7FC543256686B68434D3C5A4F5D823B50F69
+0F1D4DF1F4C575B9DE19C46363CFFD6CED771E0A74EFCBAA609A564631C59C0E
+0AEF13343DF77FFD4E0EA2AE1C1405D5A9C010FA32317445B8B172E6382D6F19
+A128393ED2C4ACDB9391D3E96BF3289BC12D1B8C0D6E3AC30074E55F641FCA5B
+B237CC2084537A34284BC94F3239C4E56A23722E89B8D604813CB8F776D17842
+AD927359B8147FC6E05503A0D0209FA52653481E38E7530D39E42DD57EDB19C1
+C4D8ED8222495543FBA560AA5774BED94A5A24D933F633BEC4DCEB70166176A3
+49643A62599243EA05741910083A0652E39DA7A759A554F48A4D550A933E4ECE
+D6D12C6D6BBEC0A3408A9BE220B328060015B3E3B663DF829D93B9A982F4BB23
+F5C8F24DC9CB77C7DD80809D353E336659C5E7C2528D95E521208ECE1AAF8DA1
+D84A8A68E2289650D800AD369399594309A144AF3CCB62BE30669C1FE773F072
+D9BCA31AF45DEE792D623ED6E99DDE9545638A721111DAE7E74B3A5B07881662
+628D47F08A3749F6AEBD13FA11312CCCD8E06297A5A698C59E139D52EE5793EA
+A03B23583052F10AE38CB951E533623133568377A7F2FAAB301C16F957A12E82
+7D2A9451DD123A725EFA3C3D93838581CFD60E69C772647D384BEE1A312F879F
+940EE9E91E6F7883B91DB9D4F1C5D1A941DA8F320EDC0FF8E577DB3850F2B5BD
+3535917873627308450D8CE2BAA054BCDCFF9CA964FBFC8161787697FC10195C
+6C32FB43D6891AA1538B728C34ADFC9DA526E87145693815F6C17CD9C361BF37
+E788FBECC2905D57DE7C2AD8D03AE51C33210490395C00ADFC0CC1FB5F5CB3F5
+994FBBD3DDE7DF9A1ECBC87480EA78770C35E7DF78AF2240F7E1412F8ACEB501
+FEB03A131CCB795EA51A6FF5B188B5927481C63B82EDD1542512F069800249F5
+A8F963EF9383342C0BB584BBE323069CE631D985DB8C4F2109A8E1804AAF0603
+BE3A5C8863A4B815D5200B65AE7DF41D79BACC2510E700F390B2EA3F4BE01D89
+BA75972F5354406DB6157645B80A9B43B8E0346A7E20D090B0A37C533A7946C6
+EE2953D8B2B216AA2237E9407DC6F90008C2C0E449112DC5C3C2C8019CC9135E
+C136FD411E23F26398F422EDF01AF433D66F60E5B961B6963F5D14CF48F77A50
+8F6C584459FE6887764353E2BE8DAB3C4CCF79A1CC5E1B28C427F520E9139230
+83E2B8C409F6C1A8E954F81F8F8C1091C4960C5132B7B5AD865AE564AF68CEE8
+7924B401ED8FC90F9A222C6861BDBCCBF54D06D1F2B27EA2176E4BD643295A4E
+49CBB9CA351F339DF41D3A0ACC6A4C7A33196FA53E49E409413E8D6D69F21B09
+3D7CBF3A96347F3DDDA92C435E1BA4980457D3D9957B800B144F590C136547A7
+660F182BF7162F5292A4AAD4A1E841867EA48FD686C90D563BE6E2879BF05614
+EBC88A6DB350DBF2996AF28B2EBE9415AABA07FF509B9DC0F5F066F6AF30BFE9
+D9800B5708503CD57BC055F5434655E68E322D699EA77974F1A0B4BF47AE76AA
+29F0BF7A35312686997FACFE24E9F8C23FF882E36D99CD4426742B6120B67E92
+BB855092A15A7BC5E9A6AABAC61CC20EFF52246334525628BF6F4D7DF5542399
+91D6E985BD244B8A4FEF73A2366783307FDD8960D81648472C9FE19445AD3AC0
+7B0C8C2DF9CDA23301BBAC2D7D32574DBEE3A176FE9C27B78903D1F3B1E6B7AC
+AA2768578872F3FC652388DCE24FB5F4D83426756915476C62A386B95FCC7133
+D21B17F9548DBB193D8C57A42E6B76306487EB53A5AA8765BBF8B64188A44E79
+2087928358CD1F1CB7286D6C7BCCEF10AD5BE805817BB9BFEDFF5EDAE0F691F2
+742DF076DBC7FD8C5D3F6B2ACC84BE4E16B1D68C3008055340B1952919387BD9
+D3C45456CB361F3E4D00CEC4F4D289074AE591074BE3C7AF4DB010B6C1A577FC
+DB61CC1DAE946C39B1573AE788B86FF95457513681CECC79B5CB533AEEBC98DE
+D04DE9C0CD9FEB79ED7143BF3B1DD911BD1999A2F223D4C41F51F9AFD17C9E84
+AAE9B30BD00F460A88C74A27268559754A4E416485F0F9E71C2CDF13F62F10F7
+25808965E37EC3FECD537D32CF915B6F47D6AAC1E7FDC9A90A49DF2C1CAF5721
+66501C306734B40278AD1129CF85E474264E65525F14DBD3BE2C358364F5A624
+21EBF782925A9A271CB4ABA439475B6D52A65EA1D8A71DEFDC476F73099D7EF4
+C5E68D5D0174860D55486F443E0E9C81A86594D28B2BEFEAB7AB9B14D1EBD02D
+0CC44A01437CADF55E4FDF86B2CC1762175F11725F292819C97168262C3A2D51
+3E3A45B29C5EEB0E57CDB122C8A5C077D99AA50415E39C44C206E980F06F0ACC
+7128ADA7761D7520AECDA4660F2E3382A733C31B5A5BC5DDD782C92E9D1C64CC
+F0CDCEBB4699C08FAF77712EC8D58FFB78253B978CC7219D7D79515F8E54A060
+180FEF767C9D8798CAFDF295303E7F0A6623A8C12B14C1836F11F8EF13E426D0
+6713C847925CAB6A2BDDD84344A9F3FC9ED2DBEBED62986E39B762DB093A70B4
+8330414B6CC6210606074CF505197209BD0154CCA72DE4B58CDCA2164BBF3AE3
+3CB35DAEAEF2247EFE9858FB09FD7386EFBC3726E0D8D0C105CB6F39715A9AA5
+75E088AEB767E520F30FDB5B1CF1301EB4CAD57E870C91C11F2839956FC3B033
+ECC34C4794ABC5062BDFD9EE75BF35C7838DE696D2E89CDF370F6942C224090F
+6866206B027A9385C29E50DEBC25EC087EA404BC87D9B06D6C9A6DD16FFDD199
+53E5B20FF70287A5407C80F4C29BF1E997B9206333CCE010E05B6C8C2ECB7E35
+486F96890C7A4F8E97FD7B42EEA6FB4FB3083BA5B01BADA2164C3E71D2438FE8
+4B4D38EDF4F1B9BF8334A34F42C6D093A56763498F359AA5AF15D5FD17868C80
+854BD80EB0F1ABEE40195B49FF7E9E04FD5DEA0FB07B12E0FDAB3EABA242D3D9
+11CF1F8A0BEFE0F6C4CEBC2DE687F7088E3556B95C0EE7D0BEC654F642212093
+E4ACA7C9F8049BE764BDE283D512BFEB784CE3E83BE5AD94CBE97A3C71DA85E6
+5ED201F11B6BFB09139D8FBE9516F1CDEBA26868D60A5244700875C72BC399FA
+F5D8B663B4BE7484E46F65EAD424D7EE440E1DB7394CF6BCDAF07DB43C86D0EA
+E08F34C56EACCE341389ED82C4485E53C3273F3F7FE285530D13A9A7D7F0A298
+458A3735A2B84D8C2AAAB2DBEFC847AB55CA7B74D9364AF272C76A1E9FE5D64C
+9F61FB670F5521FE8386A332BE4D5083A16C705E61FB58D7D88ED2B540949451
+46A2514F38AF7357F6CECE334C83E274A194A376BB5F053914C7DF83E411BBDD
+271C782539EE5CE86E3DA2682C634912BD8637BE31FED7085282BC8FFFA4A0D0
+2F9F7B62714D3F5B0F594983C9250081011114C0BF6BFE683261BB901A140656
+7FB4D34B2D59D4B2A37952B2150F7F0BFDCE25FD104A664867D9B5F9134787F1
+BD1AE54E3E1F8657DD5094CBE001A79FFF7A6A29C25B50376929504155707993
+5788678C618380A2D114F65D064435D44F56D8C2E969D054F3A5CC369D6772BB
+94805947ACDB934C10CB78FDC3FE572D844AFE0E8CCC0B25C67EB4BE8FA68447
+22DE142AF0D17C8DC4581F65836CC100525220925067A5DB6831DCEFDA4C3409
+58D49AF007E13958E64DFF010B99A9B2C250EE05106D80C7958AF90A2CAB61D3
+6EC40568FC2DE10756E7DF2C9838EC534834CA2E6342768B33CE370AFC934FE6
+57DB8DB7E490EB547D817E717959EF4C3124C9B6DFC6F313430426A7CE5011A2
+B8643B26857188E1923BC0C0D722DB3495C07B393D5CA15E71B1163114B4368B
+1041D31ACB26D732FD54BD27F7E0DBF1FEC7D4CB80130F3F750E0B9574B850DB
+675B928FF95029DC848E8975132E46A07F4E4FB760DFE3E599C8A84ACCBDC7B7
+50E2E7B44B12315486B5E36C10031E4FF14E1B8C2C101B9616B6D3F1F6DA316F
+458D0F76E00AB6239173B13DDFEF9E5B0F0E687957932E351D6DA95504B359B5
+F7E5863B601EBBDE3A8F858F8D226B02DC011914865E009C6F55AA1CC4FBED04
+0C13AB5C954B2FE695699010F5F228428DD79C3D3920F2B75631467487FA8486
+AFCAD8174F32B55897DF2610EB5173CED6E53534406D78000826DDFA40459E0D
+FD81766CD79277D950B1615599634258ABD320D8F1E60750FC5D839BF5AF451D
+DCD394129C099484D808AF2C833BFA65B56B8108ABB795EC97AAA0DFA912F306
+4594C7CB096546AC99646BD06A66B00AAF37163831DF857D9BEC11D0AF565073
+3EFFD23961848DCEDD747B329B1C0470B7C2C88C044DD6153592E6CBA21A015D
+4623C290DE06B357E931155942D894942DE13D7E1FE94D4FB03A90C684FFA97B
+D7257106C3C71B8BBB70D322CCDDE39DDF104CFFFC3C6A4ED68FEA52823AEDD2
+3DBE10A46C930B7874050B7D4A310C14451C9955E7D02EA21B09EA974567A655
+DAB255D067B913C8C8BEEF0F747F9900806D7618867341C49F395D78909B00B6
+CFAFCF12CFB569C7DD3357858905A89C09DF87609A0153471300D032B2CACBA6
+85EE4EDDFCBA9B9393611CB6398160A6178618F53DC8D9A26BD12FC5BE10D99F
+16B3D8A44009CE664056FE03DCB5938255C6450A6EA03F60DC577A1DB34A8358
+C48095F42E3F59308B51C402724DFB4654944445C655F68357E6303A1F480E26
+337818AB5B12CAD66E41DF871C71486ABF5217658A34630968B3ACBB5ED31971
+F6853BB51725FEDADB0107090C1FFEADCB70367D01655BB43FED064F3C59BBF1
+CA9059AACECDDA6A93107A72BFC8C43546219FF4BAD0E2BA19FE9FC6F42772BC
+4EAF6FC8FE96218DE04D77E00F666550F7937F610B037D62FE873001382384D5
+371C5B73D690A5EBE7355AADD29205F7381D3D758D655DD72197445FD743A1F5
+57D7807A98D1E8FE400C6E741AC6537CA76BEF0A74C24BCBD284726DDA89E7CE
+4431F4AA32844896766FFB8569B70D3AAE67462AB13C25520560B97F1670489C
+C703998A80E8010D509A48CBCC48EC52D619F7542E1427470500624F1F50C589
+6F03FBF17BDA013A752F4CE279E87112216AD59910E1B9D0957B6A2A3D839CE6
+81E311273D4C2B9A33CD0C760282F37EBA8CF6356C3D31465AC73DD9ECA31EC4
+5AFB71B52BFCFDD2F8A4410400A2FF3547B80B65C397D4AF6B314BAE4B5FC408
+D697AF9AA4FDA94B6BC540410D270A5317D9AC13F075DC8E3D5A2424ED57EB81
+C9CBC37DB4C6F453BFB5E52A1C30EC66129269B583B04A0A6FE60CC5694A8056
+14F8A81D7171653B491E30B236D39CCC40885C7B8B57DD43DAC6C32C95481871
+3B112939856B2C6A16E27264F4F65F22465B0015782E1553643171C469A08D35
+3F351E5EFAAA5A3440FCD03EFAA716CDD06454DF556F027903045D850AF30425
+231E67D59DCA6095F1A8005A50D8B0F85B6EB4844737C66A590BFAC2CF9AD141
+658B674A174C6FBA8E57BF6B34FCFBEF31CCD3658BFFADF331351B1818494C12
+53FFD05FE9677DCA63E4AD2C5EC1983E045DC861AFD71A696FC606B7C0AE609F
+36C0A90EB386994A007ED9D2349EFD645265013E717BD94A66D6308D1DF01BB5
+F87CE336C3EAC77EDECEB76F173DB9E1BEF481B7B02CFA679ED2DD5EA04EA512
+5D3F45A05E681B9A226B0701941CEFFF253DF8FA7FCA4C793985E6993ECDD9D3
+F3D0B2F267188C93C9824B92E8AAE50BB63E4F0932C92592097425F9533C747E
+9F9338839396E6F5C6AB0834600AC2478FC80D4756428C5E8C953DA74BBA67E3
+CA1E597134FAF54121D96D3EC56B04E942C0CA51B9579669E5B0BA3CD3163505
+F5A18DAF3E10EB1A9CB666B811154FCBA7DC868C9A115812329ABCADAF9C17A6
+467A90E949026BB37B2647A7D051DBDAA490723C43F705D7A53FABF2B91E9417
+39D2070ADA25A7AEC2F5E7612F07CB51A7E8729B059C0FFD0E11D77A1EEF82C2
+84319DE43E3854368DC488DD65D2EC3B8AE92611C1B74CCFE301B9130B31C8BF
+8146355A86673AD5DC32D0D00C7FC33FB2F1FA263797411130E686373AE3838F
+A42AA4F7BBEFF22F7CC829A95B9018C232D880E6441FD6A2E68B0640E0C74709
+C4E1976A6499A9D07D862881D0D063D2CC215D4825573ADB72DE36F8FD7E7C07
+807E88153F4E1261BBED152592FB9E306E43FB4338C7FC7E584B148192B03003
+CC5DC0E2926C59FED544A5D9A8FBFEFFF43967568B595597130BE1D3806FC034
+9E769165B83A05436E610A3E2ACE24F3E6F6FC40F1B9C7DC049404F1282D8A29
+ED19A320E30C2E66D2B133C585AADBD736A4950D77B6278946459ECC98AE9A53
+9BF64A9BF5CF9B24F12BFB5ACF91AA0F13AD869D7F61CEADC50BDB3EB949B706
+99C99B4674DAFFC8D31B96A1222834D8F7A81389A583F8FE7C9BB16023E8798D
+C5C8B3BD2270C8D9F35EF54A8EA8038A50018F2B8CA0CF190BB85C7D135E436C
+3ABBC9C76086B6A9425F84FB3E6EC62AE49CD54A4B673DFB819F37847B0D3E2B
+9FC5DA3C384DF99112160808FD3E15FDF82213859EF0E653897B64415A2BEE47
+7B7BDC1882292CA07F3948B7C26A0D3B2A57AB664F5A0C399E5697A2FB09D1DD
+B2FD96F7691AC2060173B7457287C7B27B9DCF58E609623631CC0984DD4919DC
+24B66FD64ACFE2D15BA049737DD142A254B6F2F4222034E26EA6C9F6832B958A
+CB479806632C44A5FC3BEFFEBAD867D1DBA5C0EA9AC82CBF56D89B4557C7192C
+293A693759CE35359055A2A549040FC43F58E48495CFD33D7CC7DB25480FA8D7
+DF149E8E3ECEF8328991923C4B3FD0A4D0B1C7D5E1EB033C56A5546A711DE5E7
+A2F168EA594A7EE68BF805D039CA96CA9C033E11A20F8A6A3E1E7400E86B3F89
+DB506BB4936A300008CA2E3F5D28C71E2FFB2B5BBAD18B950C90974EBF01A56C
+5AB94077D6071CAC8E45B0EB9DF22A3D896D2A45DD6474CE6504CA41D3562F89
+A034D7A2841D810D8B9E962625D7B9AE806009D39C6568F3B86F87B86F3AED6C
+6A42F9FF86F3CD8F78659FBED4012AD3C903E140981577E9E9AF572E9709DED7
+2633035EA96932A6A9759E5A39A8B59CACDA37DA21F64EF56E6683C166D5751F
+132B5A99E5624B81A364861495CD9208A811C47A594534317D8172D71DEBC579
+B7F602E3656C138331A03C1D66E02A19D68B80B6CEF1A30C36FFB21A8FA8DF16
+5190F44EC79B651CD09A96A9572E27EE3DF890D9FE1666710134288E97C14357
+6DD606516778FE550B81817D4D29EF9C1048AB62C5161347B1239B5F456A917E
+EC333564922DBDFDAC3537BE348EEB932D2700855C1B38E6632AB42688EC96E5
+E70B6E21597DD9AEC0C66CD5BE04886842418E5D7026CCF8F3CDA2560CB15D72
+64FF100148BE72752ADC59C8F19B039954A66B5D17B03ECE70228085BE334806
+FB49BB79CE8082CE9CBFADC30179B303D64C34BBCD9BBD50D0773B7EE72E9246
+5B01B90848A5ADCC95227310A886872DC56466A02A3A9A5F720B7FE4EA511BB3
+518DA5D1EB43E13429BCB41242E8D2908CBA3FD3A2881C911BF95BBB667E8B7D
+612A9035BA2602D6BB6E44C66138FC57776827BB7D6E19056EEF9D1D01CE27A9
+02C6517FFE875770123508F5C5FEC021C2BE78AA71F9D9952EC91820874B0A93
+AD291A3032F4198BB8BFE80EC6EEF6DF748E37316383EC01CEA99A64CAC75EC6
+1BC2997B1F2856FF05FB6772F6BF07764CD4751CA4FE1657A1ECAF6D8C5AE8F0
+8C9247C4F2BABC32CCD25E991A387DB42B2DEDA9FC2ABC3137D87C9D54778164
+7EA9972546C794D69C636D58859035BF8CA3DD17231F354445FA10DEFCDBDD9C
+495A261258876CA0380917962C18EFFCBF89DC4194FE9A1CF72DF12AA04A6084
+E631F9D152775E93A4005A19C1FD6A4EC47EA032C6BE37A2B78785370405E27E
+6CD97AA308A962761D4B7FCA5F042615169A97F738D2E3DB6C4152C6FDC5D5E5
+5161772E44B4D900B9EC705103368DA03F5E062C2936E0A98D310608BB170E0A
+721766F9D9A6764720624C1A735DA3FC426FA08BA9FE9F9375A3CD338F0E8E9E
+AC95AD060D67186CCA0576C1BCD646981D38BA1D3D33819F9548E468D9A8460B
+ABABBDC0A2D50B5C4224C722A681A9BD8D7F5DA2D4A343D1BC9029F1B9BD4B7E
+FA4817CA039BEE3856BE4B367F942B1A9FDCD1B804D69A132A476F5DBD8D7253
+E11FAF4B04BEDB7CD483BA74CE27B2C4557DED04E0A472F4B745DA0CFB86A9F1
+8AD4206B208661CDCA7F7C7ABADDECD59EB566F647A9138A8C5376D034878D66
+B4F4B241411B9489A2D9BBAA5D69A6F075B790E42FC929F4703CB5993D7F2A5A
+233C307CDD20F07756AC73E62E3FA4B599A19B7114033A6CC6810F1166A06F2A
+B13A9F2183C9B05F13D80BFBE21F47BF5948766D82AA817B5DCEA8C3332A308F
+72AE7EA0CDA16227B77AA521C155CEC0AD88CFF8F8EAC7C6CF91457F050007C6
+FACD0E8DE03F5A484920787625CDDD132C551ABBDDEBB1F7614D5B84937A03FD
+51DC15EE0737A98368B12D24F6CC11F6C6DE487B0FB803A2322EC745443F93B1
+C31C452CB55AB657011080D77DE585799101C012ACCFB55B0E0DD7788B6D0BA3
+8C73441FFECBA1924D322BAE3B180D6825A4C3D4E0E72C2446FA448AA84A0FAA
+428D6784FE0DC862229A2A4432B21F3A4A9C6CE0611606F97603609792DE3B44
+FB1F8E62327ED68CB6F372522C05A857E059337AB8963C9B74458AFE461803ED
+0E49E0F9B522BBB7AB20BF8C80937F41971A3FCF31D06F62571373E097558027
+0692E476E281AC8009A400AC26FAC8D7E8FF65A454ACBDD1462A89E8B2E7C7B5
+394DE68607953A7E3555C7471750033EEC5120731EC09FA95C9790777712BAE1
+36730C0EA143778E476557720F32848A0DD352F1A909AAD94A17EFE08EDB3D34
+E2CD67848B90525F263F480C47BF4ECFBB1B74BF2A905127BFF26B3E844A96BD
+470BC54684FE137B21821358D191B3A511B8ED334E1FAA089A43897C1DBEEF45
+D9FC57743DC68822F51FB589DE48E0A2FACDDB47405E56ECB39CDE9E501FF1AC
+0EE82A440A3F32DBE2396C3F78FD4C591836913F2E60805CA398377919C31E47
+030E4561CD6C7FC45F0ACE67D79473624794C8696A79CEB837700F3EDFD7A8B3
+D1942FE8090CA16D616272E8A3ACAA54356EB2052767480F078B395BFD7B0CEE
+182D6D01FEA66C5A6941F74D1BC8DEF650740B2A2E9848262290D704AFAB96E6
+5BA9515184B323E2425356D38E85D137F79C13495330F034FF7BA30B02C5AA36
+8E0EA4A6A10A56E4CBAFB2A0043486426CD20A168118D5427FEA1264777F8543
+4A415049AF307F6E4C982FBB3718E255F947C1F2BBDE78BF7C08FDE37C4CB6FE
+BF88A3AFC4AB9B077516D7898EC3C87A4FB2C2CA4E89F6FCEF185990509F91F2
+1C85F09084E3490DCA8F96FDD0CF777FD4FF021814DBB471891F8DBD584C475C
+912EF1F70CC389A390D36F290A544F1D3303A5C2728DEA320843076351921FE9
+323462B251FE732D2EC98BF1E4ED4C3F96FE04CCAC497AC8330C4D3D8D3AED08
+3B7BA8E51544DEF22CBB7FD126F7E01D6E3E6DF0D2F38E0B059637D90E2E9DA8
+5A1A404BBECEBE1A0D5308D992AF73560603476754C6BF79126C436F8081AA12
+BCE6E8FEF3DD192ED812E7BDB1AAD1F8D14C169889B6C1E155007DFD98140F6F
+37AFB159DC12A9E05A272C8C7655229980B5CDAD4047D89FCCB41E66DED71F63
+F07673212DE5D6FE3262696586A92EF04561C101405E21B341424B361928FA74
+D1F0F4B36B01FA6A07A7E45443AF1CD8ADC0AFED6FA8D8AF2C8CD5272A53C28C
+AE944B9045DE6305CABA0B57CBFCF07145C297A4BFA8B4EA532BF6E6A0D7A452
+1F2CA064ACA886650D27E3F605A27B8FB827BC68BE30EF1707E819BE9F90FB5C
+D305CCA3C1C6DCC1F1A1640D04A037977721F14F49F449D00CE1AAF040CC2FC4
+7614798B64A4BBD1776F9A1F958C0364C5D87555CEDEA1D979AE13F028C1A79F
+5232C1706CD1957E6B772C89DC78F9E1F2D4B4CF9C3081973726FDC294698D7C
+5B133F141499C32F8A466D72047ECE96EB36F6CA3AEFC2DE54D25DED3A3E5A80
+D02DFCB3A5E366C0581AFC853566B5A8FE47871B3E283257FA60C5AF514EE72F
+97E44BF870ECCB515A94ACB1BCB22D37D563286B2F5E484555C5E94E56005A86
+A6B2AFCF2166929C97434E72C35DC831162CC6F484F36A130B8FE1BACE568210
+90ADA920D96AF14E812CED41CE8DA5C50E9E7B9194BFC59E3697790DE569A6CB
+DF2CEF5A4E802CF13C18826C26373F508B6972B82BF855F6908687246CB307E7
+38E9B07F8048063A9BF4B98B8C064D1F156887727D430BCC27D5A0C406DE1AD5
+140F883DC4948F45C5FEA6518EE06CAA2173A4DCE956FC96F1B1A4FDE58FE917
+F92BA13F1A97BE8F67D7F4E31FD190E48BFCE942219AB34B2471E3A1DAEF0391
+EBFD2D7E6B21A8A7E14768A51A5FDA4BD00BC6655F16C8186DB3AFA1BF4B117E
+EF707AFB48006BEA3A03CDEA5ECE604C5EBADCCE8DA638FB8C7BA7C62C458703
+31799FD9C1D86BA345FD20D20819400EA4C5852EBDB2BC24D93349E4A0F83B13
+F00FEB05C4B9EBF60944CF77E73B7B02A4FD77C55E8ED9CF5F90B74AD0F7B31F
+45008D57A1CABC54D17689256648BA772B5C5C4187AA81C5BA8836C4FA9ABA57
+7BEF8291D50AACDBDA73923814A2B3E7B42ABD14F3A14A60F4AF671FC8DE5ECA
+A91A3889B81A2396142D56AFFB120C5879E5A831241C321EF41D4F07F9D042D9
+7B70EC2AD9B5AD42ECE4467605FB8B7A51E9EF319684FDEDD446C5058B5A7C5E
+0CBA92B61A69E6E3C86F927AE51CA81DAB7192F880BCB408DF63BF96E7F0CF96
+EFD11A84EDF771B51B13C68E77F555AF327FC45AD346491162CC3FE0AC38869E
+A4AB1727C8B50EA6025FC0799CE6CC08DBEEC0F159D48C56DCFF08D9DAE3012A
+F9AF6C7ABEEC3DAF9A802F246923709BE64048C9E9F409485A1E176E62DA2859
+315677A95BFE35E67AD99F718D44ABD943E5B92AA0F2C59780C718EF1B26A631
+233F61E53C8A197A0AC2AFC9775EABED3FBB7130081B3D0C9CF4BBB1D9A1B67F
+AC2F993BAD45B51CD67920E4F9637B69F849E89844991ACAA1E8790D19B5DC31
+DFA36E3F855DC73143AEDB781072153CA543A2DA531EF0DC4810FF92D9B94FF4
+DAAC1B0DC33836A54820C7C7F5642F0D20CE07AAAC77AC4FA51AB8B736586F65
+56A828EA7DB2E6AF374D40D11C30BB974D7ACC1C2B27F947178F7AD8B35BF2D8
+EFFD2E20B8C5BFE5D8EEE155017AF9EB37DE7F5544097DD2470F66AB07CA6382
+226C92B9537D287A0A1E57AF6C1A0A18DC3764D19D0A7AA3467FD97AF670A0EC
+BCF0D4D42F1A493467C4535E82A258F95769C7BA6531EABAD7798E22B6A0AA63
+4AF47B8197CFFE4DA3FEC29CA25CF395D601F06B39C89D7A3C2FB110CF59402E
+D3C89808BA8D3F0302F82C7E66E1DB53D7B02FC5DDE9A050C2CB71003807A9E4
+9B73F7B945929F9B1D8C4976CFDEF099B1A8EEF3389797C90CA68DBBC3816567
+24D0C57D55758F460957705F1620DE8306256180F1DD9E98163D499F6BAD893C
+73A29F57A88C79B55D644C37882C7B82D16CB15473BFF847C60373880EFEFCBF
+15271BB52855B75762CDD566E6673DF95BB784B578353C1BC5B56AACE1CB6944
+6C79D6DA087565A0714E5EEE2D0EF9D6E3FF7EA0331DDD7AEC7DCB441C81FC5C
+12A3DBE217C4C6CF893B0D3DA4B73DC2F2BF130E7813E659A7CF758E73180635
+D5C9EB39D6802EBDDCE71040B65B96EFBA434E55F0D62274D2AA44A21AF5B0B2
+839A93A97BD9A732334EF951518FC8A0B10C916994BA16DA6D4CCB190DB6D252
+7A837AB66DE254292258131256E8924AC7A0F1D1AE25DBEE15545D26B0D675B3
+73CACE88AFEE6A1102501F8BAC82A5C49429B802E81BA07D03321DAC1541EC5C
+FDE0C08B796895F2E1B2C82C158FE38F1DB46C6B525C693253045F9A41C99162
+5C59DD1A955D89A9A803AB1B386E563E97CDC59A89F7ECB733951C53B405D0B9
+FFF55AE6A92FC524BF3627690BDD7CF51C91702ADACBF25FCA4472BC9EC24109
+3A7E7F146F626FD04B1B1310489FEE98F62094536EBF413D7A14F4630CF0049F
+3B06B0C0A9CDD4145844ED7B2A359DD3F3E76469A1E1F88D5BA08D98BB152BCB
+E82452EE2678CCAF2DF565205F1EA4B7152DE9267890184D2643C0EAFDE6A10C
+6D4A118B470525AB8333793D68CC118FB4C2594C9634E174E40A287BED466AE3
+EC659A1C817622EE74FDFDEBD0C315026E23F246872822EE91CA5F54DB10D82F
+34CFDFFA8EF5E7DF28599C76C3A5A8A8012845667C3AFC8778CB308A7529DCFF
+946D662F2985478560495F401FCDFE110B652F02486A31205CB3409BC2445E4E
+4EE5DA2608260D1F0FB9F19479CCB6E3FFDFD9C0AD22D05C71F85253A8A09AAD
+5CE32BB44B26A5E0CC4DE00BE9D053F69949A82EC43216A10D33D971CD003E3E
+05E46A797D07FFE2BE809534DE891063D91EF2AEB2CCFF995574A4A661AEADDB
+2901F6390E93E1D40E98C7269B5D0376B1D556138B84C668A3F01FFF41563CA8
+22496A230B1744C5E9BAE0716FD4B20FE26F31F982E8E15F366CE98AA78711C7
+E04BC14426245E073CFF01B310EC370CD7A1D12442A302DF741536CB81CA5AAF
+7E1AEDAFA92693552810E5E9A30070825694B374AE6A71C2BC836CA76CCCAD00
+ABCDF96D1A3743C526FDE299FE0D34D2A02D61C4609A4308E19B7BCFFC4F7468
+141592B2837E7508FEE49BD3CA0E7F00EA0339442D5FCD0D613BA8935D73B22E
+1D04364D7CF5B2884B657BC4654DACBAE1A96F281123179892C21127466243D7
+1EA15DDB2B6EC1BD2FBA790EE2F3A78CFFEC079558DE093D4D5D673E0376BE27
+D97737149CCB05FC15A018303C8197C6E9341850886B9BF902B1009372565BA2
+156D4594856A834EE39E1F4F4E97AD97CE3142E0315D0DA4FFDB85EB20C1849C
+A202430CF6AAFEF97F628D7A605E4E321B6F7338E5AA37FE94344F98CC48F5D1
+480C452EB80C17591C6DE1D3BD4128F0A87EDB0B4E6BB00C0DB0DA7552C98FEA
+1ADB74A24041B574EBBD78AB937751A3C5E67F47E90FBFA0D88CA6CC7A8F06CE
+9FE37899631D1C4175EAEF9B0D206F218D72495F0BEEEDED6B736898DC7F5BE8
+886C6F1F971BE694023581596CD92FB856770236CE273D67E589DE38FF09AC56
+54FF28A6229C014184100E63A58313053CA2AA7178AD9E83799216DA2A533532
+71491192A6BAA0AB61045CE0BBF1DC3F97EBD47939442D56D60BE3C8769542FD
+82BDD0C82C59E12EBD65FAFFFF9FDD1DAB4C2DCA793073DA6003D43AB34D49DE
+6BE4984F46469246C696D0DAC8CE1540946D3E1E3DCC62DE19C0831A2459B282
+0B3856AC04F1C8FDCFFF85FEAC4F39EB3978DC78A39A491F5345E76737F6D744
+949BD6C007C1355644E5CE8F5525830A9F6A41D5C4CE124BFA22D934D6CA17E7
+A605411CAF6FBB973412C0D77FCE528C4D8964C7FE38AA2E5DC90266B29B43D3
+5C5A25157C68155609D313E7F15B055FC0D94F2C5EDCB633623168D4A430FCFE
+AFA26C0FCB586A81567FD0F442B373F2C2244648E0560E0A8E2B250F6549BA36
+57E2B248920DA2995F735FE19502BE2E8E917EEB78DCBC7DA169D8A9CDE8B839
+8E49BE238E46CEEE2FFDCD4022924196A92BA33BBD2631A7299FB77168898816
+12189825E564FFFAC9BA9294B7355FEBCE3A2656F803951F3DE3703987BA1C65
+B70755A7A84702C1650E6BFDAF02630057C81DE4739FE219742C9B7B38799431
+77010C455E31DB824AC206466FEB06DA7EFC0FFCA5388F5542F93C56F9311088
+EFC400535CA13B64406CFED124CE07658514B0CD9997EE7BA1ECBF9F208A5842
+48A6559A124253BF0B7FAE1A572FF4ABACD0EEAA5CDF41731983F2AF1C3480C3
+6A702AAA1ECA89433F5C432AE2BCB78B762077F5885154A59B1BD750D08F8FAD
+1B239532A4963508222BE34ADF98816F358DCFD5F81ADD3C017A808F9E8CEA8F
+FB112E2956EEB689E0F7BB4BE12317FA352C08E74EA43CD49C200BD19DB6EEEE
+36DE5CE0E2C648212F1991F8CE69D093A792C8C16A31E40C436744E47B12D24F
+69F1EF34986004A83720144B5DD8C92695818BA4D9F95CBD1607BF768FF81F9A
+457B40E7C7C8218FEB865A23C41BB84557B5975F386D48F20BEB92E9B164988C
+426BA43F1F30EAAC3AE65765155B94555E2A5171DA4BB3E243DD6D50DF5E365A
+A54C5C47F62E3472D363189FB9BF00C15850225A95B2A5F85AC26758CDF14058
+7BA3F07245800F0E1A195477BA46830353A6707A63EBB486F1A2E628764849ED
+6A082DE08DA495EB5A1CF5565A0DCA7826EE7B800D4000619E90211C19E705E3
+D667188571622A904C468B19E515697B7D9DC650C1FE08D18E0452BC32175CF3
+D0AC419627C323C02CD6E23BA6C0B2E95EFAD56AE1C8E750CF210BE153986563
+5D15CA3700598BFFF0CE909C921ABAB1001F846D82C5BA038D314181B534D17E
+36EB7B608D2AD01818D2151408FB57D70EF005857BA884F800AE2103A18A1BD8
+F507E08944D6E0FA6CDE0CD3CF6D07898B8887B2A21776A198FEE71B7A0FA1FA
+5B6624E72FE4A672EC528F7160F23F837DFF75F7DC11A78B505A31E90499E92F
+A29D9E9D5E385BEBED4E543D0B0D92C271B9D517C82ED234AEA1DBEE24DE3A17
+C341549EC96164986809E4648092F6ABABB5EA4F9031F89D706F3445E2E52250
+4BDB1C62D2FD8A71BFE834C787C603609B62915F436D56A385237B84C024C2BA
+450E64CFE43893B573415FFBF0C18D97908CC3DB39DBFE5322DA82D4AF6DE21B
+CAF619898FFCAE76174518C33E6EDAB7A2EFFAD5EAF8FA4F7A3D021C55A4C002
+DDD96D014338A5FB2C214B43B4C6B733BEB957BDBDDDA16B762C82C4DB7CAC2C
+5C66C8C248C6B48A5AF78D7B718C988182F6C56635B24FEE045E6B5428A21833
+611058A27DFBD824ABDE08615491A1439AECD10ADFF051658375263C4C2DAE8E
+5FD3309FD5565082C64060ACF770FC723BD76995154D35D182DDED00B80AB6C6
+379C42D40BEA5A574E489B263FF2A27E12DAF300D2E08F439728CA0C1370E6F5
+C32E0A1D5B7C8C199C53AF6BF8905FEDCC883E3BBA883FCCCA6366384DD69818
+D9C4C2FE0D13A8F82431C2A4964D949850B936C89DC34853D7070AE0824199B2
+EA0787F3ACA846E37E9DC39DC89E106204F6234480E07E2DC94319BE1C488F67
+9E984848253BD7DB8332AC0425376B6B3F07019B87120B0F25807D6770754143
+5054374D89E7D617213FC9F782D34730F58E916F2DDBD5319F0A9BBFE78E253F
+BA463950D5737B84CC250DDA5CA4A9AE3EC7034C78AE09F6A05BA63E8FFC3175
+821DCD0275020A68EC05DBCFEB123D114D3967C7D68D5A71BE5090C72472EBC5
+472FA95F07C1B85B91B03BBB90B5BA9263138807B5139CF5C35481666A7ED675
+986A6305DBFB1E8681D61D17B903F247CCD7E94569F598958685F487F413BC05
+90B76EB550A20CFA7576E3F9901C1ECDB60142F578FD684382B0BDE1C8B8C40E
+70E200C825E4C853D1DE36CAD6DBFECEDFEF4FF8D9610535722E7E92FB46AF92
+30C9CF8547B36B788F6B464D0403FF830E75FE5C488671F49EFB070860EEB9EF
+59A0663919E552FFCB7DC70A9B37039FEA11F955E0047D4C51223B29AA0AC2EA
+49E41094B59A554D3F6B89B01ADA663A7239254BE38061D0FC1896AFE32DD6CC
+9B7F45FE6CBBB251604917CCDE3217439C4043638B9914151283B1DC4FCEE80D
+2851B13BC5FFB868FF564683292BF51F2FDA82587BA89618CF171347CAA34671
+020A84C1235E7CD9232CA37438638C26AF281B1437D126B5848EA474E61B2DFA
+887AC50CC739C34F9759ABD50D4814D9DDCC3023A307ABDC42DA6A5B11D13E8F
+7DB330FF224E96FB36C6FD432CE957A0552893EF638DF8FF77225DDE7F2FBB6B
+961280AE30FF7A6A2DBC7A06CA57F0F53FCAD4B5716839AD1B1C959535AE4888
+125A1995517B77A52783D0155B2779DD346E873DE3C6D648D1A7C9754C29C343
+D9F8C81EBBE8F59906E1A610AAE958373D315BA032EA026F22A846D421D29B5F
+49BC07D6C056B61B34293BD9FAD4F26F5F4F75C1AA67B8EF5B316ABF8277F39D
+C3E23830EAC84627EE1F023A670D25128907885ADF64828B9066A56AEF4D1EAD
+98A2ADFA5EBDF80B3569D93B60032B619F7A79A19406C04CE33112628AB098B2
+609CBF3D2E63F64AEB9A68526B4C9696D602A0DD4747AA230DEBFDE27B1514B3
+66BE6C0B6F33BA3A990F14D0148B7AF706B95F4677A8F0E84164F5AA9888FA91
+BBB46D23B89C6D9B3276AE7AF2DAEBB0658232ADF4BAB4C4D75BAFF7BE9EB97C
+486F625F571F41D950E521C162E4FD8CE1643E13156A74D63BE736BAC443CB59
+069BC06608C6D958A0CB4AD2F5CDBFAE0922ADA57600D753A9E48E82AE08B34C
+F5582BF8B654370663ABFCC008BC20A004F5DF0FF001B225AE06F0805733CC40
+DADCFB49CC90404F387E9D126330BC4221E4BA6A0E8A8C496115DDCC95D5388E
+E10C2FA48BCC7AE21CFE7CFF979F91EDD80B80C18D877BD93D0AF3E02F79DF4F
+981FDE508492B20F7F37E9D35B69DEB6D1F8AF3F05ED411D61FA89F8913A690A
+A3CDD0D72D529483734B05872038744F17760690EB6E6B8167CF2581B13521AC
+0BAD559B9C1024083AC6AAA885DFDE9AD7DFEC0B0139754215569281843A5073
+CA3AFEC3E265C457B628968C44A6AE9A53FA423251A03AA270F51F13BA5F9FFA
+80DA548D56DC6D0417F3DA517058DC9ED756FB2E8867B74FDF70817C15879C27
+0D8456CD4B4E39B41B635A8E10DA744889CDDEF45B406BC6D9831F0DD0AD77CF
+13914D7FE112EFEECEE1F881F9C375A9BCBBC00F0F3D0D5F9DC58CB26B2C63A2
+20DD5A5A1DCB3F49F29073957251FE88D9DE640BCA0978DB287357AD5BA5069F
+B7ABC4F5B10C9FC272A56490B24E0FD2F5BC3FF60CBDA5EAD0AA4CBA59E6F951
+F5FCA03546F7D242A0BD67804B580345DCC9C68445C213ECC69E1E730BF6EF06
+05AC8128F5A4D3140A8844846D174A77F0D4ED59F170238F0876EB4D3444A080
+44262048710F00D7E218346004BAC79802CE708BDA11BA209FC9002AE1B694FD
+3F616199C5AA6590761585C12B49F795C9A8D00808697A437F00921C66CE6D86
+C68FEE49A62BC6787680A27A0DB318F4CFE0891AF2EB26365BE68F2438E0EDC5
+75DEEA0C73886A0471F6053776C786453B1C092A553B7953AC92B2B10EB1F8E8
+EA68D048E35E3EA92BD0BD47632FD6E13BB4DA00F55F9199675B8636AB23D634
+06EA2A5C58737A8E30EA12F22EFB2B0AAF180C3130122D385583FF417202CA9D
+588754F5501E5368BD33D79BE01D9A2495E7F409C9DF4288FD55B9076478B41B
+B4085CA5B8D8B6701D50788124E5656B3E9D7500654730006F3A39B4C76ADC94
+9FE02603844AFBD18144BDAC7DD09D154D6A047A230D44CE62F1317B2A3B783F
+C13722F7AEEAB2F9150A95FC8FBDBB6CB0415D5409A57795F5083F72D1FD79CC
+FC1FF965FDC61297B4F76D059C493656CA6F0965F54229BF23A13F794B0F5BBC
+D4C4D0351A346DA55D4221010DC9A458902F20ACD56F01F409518C4EBE896B5A
+05CA57DFA78DCC9DB61D0C477D131CCF4DF3C2DDED4E7573E6AD6D5A54536E5A
+007FB21C25639DB2AC2C5B618325EFCA183E89A7FA85A0C1D6812F0CE129C5A1
+F3DD02C6181728CCF87D6F8CD5606D113EC79899621ECFCB29F8B4C4F08E89D3
+E7988071DFB3232C7C21D04C5A2F5AEAC737A1392DC2F60D88BEE9ED6E882CE1
+C7B42E43709F34F68CBA4F352B387DE2DC06E471F98B310D0BD3E994FA0FCFCE
+B4D97C49E494F814FB09835AF83EA1E18642F4A4C32D04BFAABEA46BCBFEA0CB
+F8230E404ACE57162F9F96CE7ECC10F782140E11F23F4C2BFA61AB6E1ACC9496
+012837CA40EDBA0C62E1230A30D5C8D2C6F478813CC3D0E8BC6ADBA1E5238837
+DD5C6E4F1675C92E41CAF10749907EE81DACDFD8A65A9FDC4ACE2AB457925E68
+8DF970BB7927FFF2E957E53B966C2A5D8EB11D43A8F10DC21E3F8D2490997229
+3AFA58573E7297834E153A23A61E1380BC0C8B157E3D52B9FE1587282DBE52B4
+7D021A4F83CBE165E8F7E25F91C78F8177DD0C5FFD35B497E519444446F0E24E
+FE29CEB06666E1F5760C2D2B5C8153659DB7AA36F284FEE3951772FAA4E9BD41
+D9CF7968CA215273E88FD37F1A64B7B4AFA2E239BA6F9C463A8C5D0CDA152D44
+E61D6524E88D940FDA1B4306B1388863F80ACF9FCEA03C88ADADB7C4FDE56D14
+2192097015E0C4F622C4118EAA3823248E6B9CD5C9DF3517F731E17C1DEE88E9
+8C10DD9482135FE1581B9F9D274AD2A4F4C4AB82687C897373786FF3A19B5DB1
+28D5A3B59455D17D2442BF44AE3D3E37E5635B3981346782D169E3860E6E33DB
+C5777DE21CB2446D3D53E25C1C3E4A5319068D3A4EFD2D1616859959B5573B97
+446B9CFEFBF8DA22FCFBDAF672748900A1986D6FF0C7DDBB737AD8CCADB39D93
+B8C0B42AA5811564134EEE9E1745DDB5D87D6336E21EB806BFBA21F296F3620C
+77C57F9F2F1535C1847D7DFE870D292F1889B17F2A1DD8122D646D4B5ED89A89
+A27B55E5E3DB0A21BAE974EDD145ACA2D3DBFCC41E1442E4C71572F6332A2BBE
+1F26951DD76F7E9F1D21AFDF2B2F176D5FA873A0E87927C98432469A5719E87E
+61F0AD048A2C6CEB22E0A274A2E24739CDAEF7E741785098969714FF22FD766A
+AA91BAA4F2E148AA2A4849E44018CA3A56CB24F661BED204A3228BCB34A71328
+DEA7E832753F683136EF071596E0E1553FA9B7C0FEF063099155D11E2B4CF246
+01F0BCCCC30D72FF73C88DC2AFC3E2BFFEE8455BBCEB9E130D528E13BCFD9FD2
+A0862E4516CCD3407C7C7EFECA329194A48BE68A099F9CC80CF4724252DF4D2E
+BEC248133C357C7601B3B7D76D040A3EA0F3727C4479F1F781F9EC9EE799A795
+EBEBFCD07D218B1C37351AEEC49D2FC2133127ACA717FB1E3DF5C553D7B867F2
+984659D466BD116A607E68A3D7776B10E62DEEE8AC4E3D019C65567E66CE17C0
+5D77CA70FF0BC2B669673169C842F724BFC7DBFA4E056DF12AA73D85669610F2
+98F468FA0BA593C51040940E87E2E7D3DC8C2E843DA2756D6D139F410F146B05
+D18180CC1FC0ABF1EF9EE86901E87582641E7F09BFCEB2CD5089A3D6B510C792
+C60E635E453519CDC183DE287C8B2340D731E4A792CED7174B9AF9037DF5B279
+8375003A95965124AF855AF2CF04812782E1CE0B1B9BF7C188A53C4B86321301
+F023734419DD8F8236B11F4C7015080B3990EE63A22D721EAAFE702856A5ACBC
+ED1FB74F68245C1DBF46C33B755777B983DDE8D41590E7248AE8DB259CA35197
+FE3ED93CB51EDCF280E094B2CFC61F53FB5A52CE74702030A3C90CE2AB3B7FA6
+59B305765206591B0143B4DA04D625B22C7264C261917A02A2750BA492C0F0F8
+114DF714AA6B003B9540001644DEF7462C01F7B90E2FDC0981E79E9763A10251
+FE38FCC2FD0AE00EA22722F96BBC059C371CE5936C634F2D07BEA7D46CD3CBEC
+0C7862B368988A95BBF0CF65967E54EAA99F39A23FAA08FB2858D70CF94E865E
+F7D4A937C06917E8D9163A2CB42CFB57478EDF9E6CAF70DB5477AB1550E97F12
+E55CE92A01EA26E55A8BC51A38EF2079B0D7BF46376B8FF0AF901B8227C936EE
+19B7AEABF17F242544350A1D0C28CD2E526A44E60A708221302E3B16544E9E84
+23CB9A8057A7068320F1D53DA24B308389962B9AA889DEA3A71C10E4DB41B967
+2C2B9121844BA1C256EDDF8EB34ABC0B1961FB40B44656693EF0C864971A3627
+C9C8D89E73445E684A49BFA4D3670AF017A9B5425085FF8CA94484C8D06F0C5E
+46302D06D1EB646019513472C9FA7C2296085E208C6891EF2A7E3DA75E2A5140
+F5BEA92C2A5AA6F44E6B2C1FA1FFE434E58BF6CEBE3F90E0D299ED043EA27EC6
+3CDED517A698152C766B56AE25BCB8FD12C27F0AA3F50FFAED672BDE0E14F674
+5EC2F24FC0C84D684DAC7F10B2CC4808C0A9F91818DD2F05E364D0D8658449BD
+BF598370B5FC48ECD85DD9166869DEFC21707C30F7B7CF99A34ACF26C62872FC
+A15EDE09F554E21317DFCFE0D45CF7E38A72DD2E8F6AB44541D85E0F95617224
+CAC6E099E08CDD956DBDC49F1AB81DE6C6DD6C48241C0985FD00952B453DE19B
+2EBB3424E658507F403FD0BD1C0C5E09F15CEE4A24DB327DDA8D88D18A41DBE9
+26761688A6666DC33A6B0CF337FAE51CF9337627941B818FA53001F639D488DC
+C10873E21F3BD0DEBA50BBFCDBB76CE071151AD2C3B54E7DD18865BE6233F95B
+69DDE72B7679DCDCD24DD7DB3732A1E8B4C8024AA5251A4FBAB4FDCE468774B3
+8904877FFCC902C3DF9404F3A1C7A1D0F49A3E65C7133B4C1049A6845A57638B
+A9B10CE7475AAFDCC84276DFD61369A1640C76C2372EE95A0EC399DCFDA9133C
+C593E499E24B5B2D03A6AB3E43B4B73E233F7F41FC38A0FE60575245327A47A5
+41E2EBB51562EDA317BCB5E207ABDC58B74F28B904DD69D58D534662E95CDA5B
+DEA467DA01B240A3A71B2624B49B71DB8A81A3BAF67E15F4F2B57ACD1F1900A5
+252B680D17F0887F613BA5B9081CCABC851CCB4C37A8E147D3466526B407A4E6
+19EA389E1D5ACB3B494BC5BB2104807977E5D773354C9AAEDC1B84A92CBB706C
+C4247888B0E2EA8CF8AB5F7B89834C08AD34CC099A59CC51264D833332D19422
+36AD35E35F1518AFC233A4FC35CF30F94A8518E299B6233AFC100FA3B3657225
+88A43DCCF90B6CA4DFF9685DAAB56CC40B6150C27CD76F4AF209B2385D41BA2D
+02B552C436304431B4B42C4C94EB36BAAF23740E36F555989CA4BA8B4C17400E
+044C7B7482F0683EDE11DBBFC36642676F02FE0BFB74FA890DB2125B1EC34561
+77E3D7CBC9BDBE1A50662C9118B78EBD96BED8BC7F2661AC6E39696CEA072E9E
+485DD6FE282F02DFC87F3588DE87F1E5B4ED84E5D98883DE09CD37B421ECF443
+F3FF7E57D32D528E5AAF87436CFCA1A0D915E1FFB734D14F81F4629400931E49
+E5908D1D3BB86B3E02D69BEFB614E5F058F715935AAA8A9B03FE6BF82ADAB9C8
+4C382F364D128BE5558747DFA3342979954B0C484B698B663508923650ECD360
+E75A9FEF372951FFFEDE0561CEA80EE29F015EAED4708616478E4405D09ED7C2
+6221BFB22BA42401FEA2966161A65C08275E9EBC7966E560E69AC39CAE196BCA
+DADE8D7FD55E69EBC1F74E8E0CD632687DEF2E32D02CECE979BAC2694410623C
+E89C01C905EE4BE92DB386768475C054AD40FAF3B044ECFEE1167C08592B4F6A
+038B20DDD4F8C70654A00C0D28107E45BF775B1219DA6B884F7728E0FB23DEDE
+A79D8B6F80E1FDF72EB717620544E58D042BFFB2A89F01B7E2573F6B5DA82DC3
+5F9ED7B644452FFACCE761382BE894061AAF0ADC92B218D3F30AC8B7C2B4474D
+740A9661FA4F44EE53F2BEB101E16102AF3AED740A0486BE28543BC49DA90282
+88E9977720ACC7720217108EFBDE37D013FF19B60744D735AFBA27C49281CFE0
+84E22E30D2B418CAE223455679F7AD9A8BE049562B8F8069B2DEC65E6C07752F
+3AB1D19C6EB11903187DE9A2B5ABE817EF14C5F3CAB32B382A4A1AE10E9FAC76
+57275CB4A19D5E4AA90485C91DE7D83846A309F908C26E3C98110BA217ED7A54
+F0FA10F8CC083189C8ECFD6D24ACBB7D14BFDF7E8EA573F01938E750BFCE841A
+0877F25A4EC9AF0D17DD358329C5779E3C4DC2097CCF7B2F23A3670B3B67AD31
+5428E0A587AC2806A9634B15CD1AB20A0245B4066311CF8271F005F66A22B102
+04DF7C6E1BA88413155201BB2CEC6FED892C8F812CA35EA384FCEC3DD8D5BCBF
+C1E676896DFC2D34507BF1E934552DB0C1BF2DE3881D42BEE94FD8B1835463A5
+51868CFFB3BEC123D3AACBA8589DFA7845CB99C5881FB07E97834E805686EF4C
+50B71DD309E704EC56C5B4C431CBC6A9C9F7454ECB5AC64113EE5D90DF8C1ECA
+86386B38D6A985E03B45448F55D39E07FD4696FC4A2DBB2B911583DFBD10264B
+9EF54217156384F8C0D5C99D0B6EB62B88991C5158542D202DC1B1365456BE94
+7233B0B31D541D15143EB4D48AFA929E22ED2E3AACF090B9E50E320256D95223
+2E4B473AD58805DC0020DA6FE8CEDEFF339569BEE59BBAB8A9C789A4D1B1AD24
+07C995B974AC8C26728E25C49CCF2F54341BE82892B3D3C1243075E500679F93
+7F120BDA233CE416FCDA2267AF799EA4345FC4B932CBFA61B588BD7152996EA7
+D441EB0172E418E22A0120D148A4C1F73D95595670BA3F983C7D36EBF68B0916
+407D8083877311B5F8C9A72023827ACDD925B9FA7FF7C1F629FAF23BB224EB30
+1322809CAF5DC40F883929D1039829938E19FDE2559D2CBD001A8AFDC7E2B716
+8118701CDFECA74D2F7A82149B3EC4101C77A0DFEF11F3692FF2B3DFFFBC164E
+BD71DA2C7005F942C76C3454A7904EB717C16848A7EE8B67A7575F5CF156438F
+0D54C88F91412C0A6D87AB253B6065B997B84AF1FD24B03CFDEABB2EAE85118A
+E0A35424667E71F732924097AF22C28DA648A2E8A5BB764E5DF9072E6C503A9D
+C05CE851FD964ABF5A2573851F7216E613F4535FEC10068E88C26E799EAABE88
+1BB6E4BA270C2744508F8B68EF9F551E7BD3247969CD3D53569723EA41B32538
+56AE9E4EF636C1299256E1D1E4ED108C14A69082900F5585906AF8A899A22450
+0DDF61DAA3B3F626DF290EA31B1F37F6007F207A78C798F40853C40F62DE362A
+08C0B06386E1A12270C528135D3C2602B14801C37323B53887FE309227353E7C
+A02D6EFD99748B9CB2493612A80A936249BB17F4540F93A750C56918D65FB485
+693F169B514B077E49CE664C619653FB7BFEBE77A63D1B2FF857326654F7A32A
+87970F775C3C57AAAE98365D69D3CD9AAD6CF26ECE04A9DE4E3DAC9C9ADAE5D8
+0C7C60C62F69414150C31AB9E0567F53C3A8F575DD994CE0F520262497BF8DE8
+4D52C3D9DD349A062154CEFB784AD62F625163CEF7F01690C711D4BC6FC53DB3
+A84187FAFEAF5D93D0F06A25B4EC48341EE39A8D1F8F7387E5A1DADC00F2D83C
+4E094BF1FEB09A0A7E6F0BE30284F743040264442F3188C84D388FC01332DF39
+2FA2AA98FB6A75E926749781717D2AD92ED2E14EC42866EB5046F7C8CF86D298
+0BF6C520EDACF09EBAAA43A477EF416E8F1088D31554E1CFA4552E1914B908F5
+92513A2C5416B76FD56C12535E2656344D0877105F841A259EF69927AEE6B1D7
+BED8DD0F6CA7F6D5CDB621E4FB44899CDEE60B8E99F3BC198912E3687636221C
+4CC00D2A8A80F196237A54BCDB1C1ECDE659D183A900F544205AEDF192CD8AD9
+0FE31CE9513D298B7DF9E2ECEE56C10DD81E4175DC2966504DA5B1EAB0D88400
+3A43F4330C53D2A7506E240934CFCF65ABE9C39DF8F79442D3B8872519D89ECB
+766F57344FC42D5611B0B86EE4CCF4BE6A550A7E32FA83A8DEDD10279A1A5CE0
+63F3DFDBF95D2A60323399469F72C76FB26B92D95F1ECA6F6D4CC8ADD207D69C
+FD0BB3E2B00F3944C4606941E723D904E5D7F55D72921DDB383430CD0C4EC291
+B6BA49B1B2FE99FF849FA2B5A8A898C8179D0C2E796DE8E3C4A0F998CF4B5433
+8099424A7C76C3A498AA6109E46EC9E6AAFF45E10B364FA41B7577457D6CB5A3
+FAAA3EED89269FC270B1014A22C4D2788FB425396B97FA3FB7A959823D5FCDFA
+2911B02A6A856224F202B50020F85FF91C1397366AA94734EEFCFF1D66AECD97
+B4A443F37733498F4B8175703FEC53547BA08CB2FC84DA76076B1D49905A36EC
+E8AB606AE53986B8C0F26CB2FF58A58538511FCDADBC5F51ABD0901ECFE06707
+B41CA6329128DF5CDD6F3526D41174DFADC2577E4AEE525D5B01B0E1E3327A95
+B0E4050946D347C0EAA483C2B8F9DA33EB687347B6A0CF28BFFB11BA7246DFD2
+84E721312CF19CD124AF18F3F8C7DAE99BA5AED0D951A84F4955A218215DC5E8
+EA5B2CE36C5E06196966B65F4D3AC37F54FF8B2E5568C234970369E5732F324D
+6EFA761A777DED5C806D6EC15F45ED14D58FDBD331C9F4597199205FD2AF2A30
+2C41EB17F71AC38A085AB87F6BBB37BBB8A40EED15BB05FC48A99859BFBAFCB7
+2F84944CE2FFE95B4CEB21DD43BB323362BE4C8F2D6E016F3D69FDAB2BF5DFCD
+287DF42B7672E4FA8AF34BD9E257A34E388C7B47B819AB081EDBDB20DFE86F72
+90EB77835924F2FEB9D7F1516DAC09467D720506C419E94E44B79225C6FD001D
+461B64AB5AE56440D7E84D5C551010865BE4CABCB6EA62DA4503C7A73C22E05C
+31EB5B7D480EA9F8BA4877D7BF8618D88C7B56E208215B9B50EDC8D378C2D835
+DB7F3AD35489F6F3D6A03C9F0490956ACE2D3878BC31CE5445A7C63B13086C28
+9C9AB643D12CA41C54A6A98FF8C550B00D8035FF7E485CE380084C80282609ED
+18BA58CF164A21C80A65B235A5C10730BD6AACF33BE7BFCE7371F647D5D73708
+2791C584D5D19BD75D9A9882B70B8AB253495CCCCAEAA74455C61DC23E257279
+EBF501B3BA3A249C6F0215C1810D02B021E90ED3946D96066880E8E594B0B125
+28B7F3FE3832E3BA37DA65ED789F3EBAA00FB6F43382BF83CEBB70F056D06896
+DDD48B5278A27EAD5547BA2F583CD0961A5A040692FA8158B0C83275529AA118
+1DE0670915C269650CF843CEFDE6F896E0E897E12899E591F6EE44AE743E3A04
+AA7F2B41CA6472AD33C6114561B3A15EC8FDD3595786C52F5889D3BF0B20AFCB
+803E6D199DAF887509A9A7D663840B15FD7DC05EFFB27B3A30DEB80D7BFC1406
+481BCE51C2D6033758F2649EC81044097F039C448B8B91FBA5AED1F15CF17347
+96C3F938EF0B212A707F4BA27D6DDB9016B07CE699C2AB314DAC8A99A004F43C
+92C0EABE8A0E13848850ED528D5269C353243B20EB4C1DA88AB6301137032E54
+0BBCAAB039E216DC09694D2406D82C1803D26BDE251899012A7EE6298D2C2F52
+E5D87FB42ECBA66A40437B754C0E57120FDAE35481382DDC2A498DEDAEA9915D
+4B85EB7A313C73E804D425B79A2EE9FBDE556F745F5DE31947B1331D7D965179
+3F6F66D3F4700807BEA5232CE668137CBF2FD67BA025D7CF37ACB925C5651337
+2EAC6D5513DB99F6BFA61B717B33796D46B47B68B3E5B937C170E37F4EDB7B66
+E3A8417123B7824569AD515E47CD823FA8F0A2944DECA5A257BA2A71CDE90A26
+985A9D46F4B4EFE36BD46C8CD48FBEA4B3B98FD33A050A16FDE2518E09B7FDCA
+346F6F01C7B441563D64341D29CAD327F62AFFC3A59675EAE1ECD2D0670AE179
+D98511AA514EF8111BD2812041D875BB9A198133D3FA17319BCF8F9BD838DBE4
+D0BD072D92DA296A9333250EA05A9796BC1347BAD789B803B317914EEF08AA47
+A05EA5C5C5B903B7F33CA520502CF3E8E5923C6AF86488CE2F05A1A503117762
+F49765A64E4CF9343E937CDF79097A9E8ABFD5CA9D31C8979B8F72D80259C4A3
+F599F0E251D2820A48B01ED48AB4BA7E474CAACCA2F9773285A049B66A0E75FB
+77F1FFEF68D6FC457C6C0AD6630266FF749C58A021FC1382BEB1F400FF4BBC2B
+EED145F907CCAF9C8532EE3F447C64D28334ACC54B9D4F487A1BA4CB26C0274E
+73245199C085FF391245126B990D8CE428C59F872F86EBEBC88D0242486BB201
+0076F1C5ED159CE403D08BD278DD21C917808E20CE8B23730A38E172F537383B
+410795C3915BDB06D922C3604E68656995A3452CAF4BEEAA176B487A39E24149
+05D0E6E6FA2EFFE71D96617E5CF773E55165EDBB37C63E700F1593221F866189
+CA8DC2EF18FD9DD83D312B1B3B159656679DAA25BFE2B54ECBF532ADDF3F7C4E
+BA23628D7FBF19E6D4271F16A91F751357AA46776D1F874FF4497EF50F6465F2
+48F547A8D00FD9022814F58A69A8643AEA9886EFEA87E5AEEDD35652FF584AAC
+31901B459D2BD707FD79F629C68F94B471FD95E4A4BA996AFCAEE15557C1B167
+4649CF28A5C8BF857C3A63754E8CBA570E4235F179CA3691E948ACB1FE92ED28
+F82D2D96E3CEBE59FC117570F19F364BD092070E06C69A40B6F53F5912841BE9
+AA6238E14A774BDD8E13060B20BC8498014F3A5511AED7544BA9CA3BAFC4529D
+27F430F14C6016B7A5487FE6BA6EE10545A0342C8DAF5EF6D6FFD4D55F74F406
+49C557FA75E61BBBFECCF67C0A512C23559CD71CC67A5788ED0282B2F0B8D6F0
+3FA276675CA5F2411929D6ED8E1F3C3B6E3011B46CFA2CE18AB291C7B3A7208C
+DF161C0B2C23A0000819848C490EDAC1C320B5A7E60DDBBD93003387298D04F3
+1EBCFCA1B17E3C136A9D60080DE114697682E4AEA88E2C61698E2EE9E38A491A
+5E10BA3E6AC61203642C2EBA3BDD759E15F36C75B4FC4D58F33BD9F4E1E2CC64
+E1E88E22F80F0F160F4BA00ECF5866717EB3899617C21D1ED5F98BF2AE74DE49
+F3BF8CBD0F8C68759C3D4CF56EE723B12ADC58ACE93CA4274A89C216AAB3419F
+78B60B263A44B1EB69C07BCB1F77E2CE24EDFFA75A88D5738C75424150EFB5B8
+9D128D3C20E4A1517E4C085C67F1EB943603F4DBD591A617EC740373B5AE2DDB
+FBBC875171152C79AD3BD887291433489521D7F6B4D762FBA6067EB6AB5996C8
+32B1D3179BB3CBDDA8A23B7238791E2DF97C654B8A8EA305EF4951283689898C
+0FB114A5EF5F29F9045C7817EA7D8E578DD48D8806DE88B68DDCB879A0AAF44F
+415B911131E45C4CD5664A1F35179A3355B4430520D5C5D08F7B63ECF99BD920
+7EBAD74476FA147B94447E84AC4FD7CB8F850CB19F41D18210DB569D5687FC95
+0CB2E776FCC5BE3AB89C611F488FC07C2F8A77DE6C008208DE782D24395BC158
+5EB7FF2D4AF74BB0F10D8EF2F1ABD2435CF699EFFC1E7CD37B4382BDAFD2A83A
+23419D5A7DE1F19EB03D7FEDB30D322BCFEF3234580A91DA108FA4EC4F2091BA
+D169DECE3AEDE61C07E2092A80F6A8D5A8E4F8C24106E0D76B71E9B63F9FD9F5
+3F7A735CD61228364E76D65077B2EFA802E15578F4785708DE8A509CA8A329A6
+9194B07F1FDF2FF3EBA62BD318F0ABB3ABCD32B4F77870D8C4F964AE4FB32723
+3BB395D30BCCA1A06966788E2F8FF5166985D83D0BBF0C0DE778E246B3B724F0
+2EE098B24EF06F6600BD6EC4F109FD2CD765F85E04D9C95DDFC7B9EA8D14A892
+AEC2C060A7356B297A3864FDB434EC80D577FA82EE91C8C43A1D5C6DB5120316
+048075EBF3A7D88AAF3CF572A1061617A075B0861474D4ABA6749D14C0272156
+4B8709C55F7FA89E47C8348E8181BCB4683A8F3AD1D9EBAA9EA7CAADA9D8E939
+0422BDD77C9C023E7E1DB7AE1F94FA53E8C9F98C6CF9A9F11D99F35F2310389D
+B468F37C3F0C856B9CA592915F91BD94DA48DD620E1B07DFFE09E0EE181EBE44
+75228558C1309B0ACF02BB225C7640F1453E89F9EF8A81752F66538498B835F4
+06DFA17EB45FA5BECF212C55F27E038FD55C6BAC12CF6589A150AF8E61F1932B
+AE29234E26183D4C05ACB111BB0CB06397264606C3B9043979785D77B17B181E
+B6749BD23196CB92A90CD96418B7DCB67C6E361726573735EF5406CE233A3E7D
+045BC9FFF1796FB53AEFCA6A13E8E00EC0583E5CF1546572770BBAC0F8E15F29
+DCFDD2EF48CEEDBA6E8DDF847396BD03631A20CFFA2D980AB6A8449F07A5CF5B
+8B21931B2019B4E8EA928C26940EA741038A1B7522B62A06B78FEBD9C88CEB72
+17FED8435A7EFA0ED35B36742CE23C508B0940A362C7AAB5C3A0CFF8129D7085
+12AAD5A82E3759AB1A700007A16A911E25B895175D3286FDC3E60B038D6D1E65
+4E0AE7CA2A93B482ADF9BFA97B46B314607D2D4227391DA382D4C2E0A853D2CB
+A9DE0559A60ED27AAFA24AC31726E19A213654E8DE43098F329C107E71698815
+86B7C2DF663DFD34504AA2F5AA848D3FBA32A8C21D3726A14626F8E253F4503C
+2AE03FDC57D866882DA26B319C3DB35DB4797D4FE14C8EDBB9E26B130B9D25F6
+42B006483B8541F195EFD48890729843BD683E76C3318701C0423997AA40E8FD
+214D5C28D6C37FAB59AFD4E9B17C142302800B02651FFA7E10B9EB88C993F559
+BDCA7958B2629DCB21C5AC2F139B5341D0795B594C2CAF50CA3112E030FC9E60
+EFDBE4D5CA899E0ADA27410CF1220E3C100148124120E104FBA6494CC9D8BF39
+6485AB8A75E588FDA7BD2E8F0ED89E87796F52AF8800C9BA3246C0CF0AAD955C
+15B545540748C11F32B970D7CF9C16F4BDB2908485E27807EAA51A3CF11BCC86
+DDBEF33E2B13994C109C7607C4635CAD863FC7D1E49051EB501E47D8AF8A96A8
+8DFC6A2A908FE78A7846016C2071F930FD2A3E5050E19FE26CA09246A350839C
+C7A06F69EE29B4826409249B8687744B1C28B1E4EFC4423EE93403C4C1DD054C
+28C48DCE81C21EAB792BB74E7C173EB784771199CB163783D232A735F74D8430
+5E488CCF55B1550C2E63447F0622B407D3B680EFB8EFD504E88F1F7BE09A97E0
+217565473AF1E7EF0594256AF56A4ED17781F897AF7251ED8B1680043AA64B60
+1D7A2BD9DC3F4A9D07B0BB2B3DACBB2A9AA3F3DE8D747016983BAA7C21BADD68
+583BC8A37D27DCD643CAA653C50AE9D4B40719CABECEAEC5AEF9419A8A370DB3
+3172E5DF5EC198F7E96F26C4EC7107432C2D8C7D280039031096196E57A0C3D7
+4B91EA0194685B4D933FB898F90BC9B31552486F1918653B50B28FF81369AD88
+39F875864F938051CBB1D872B193338E68135091DCEA243655FB323278B92E09
+D87D8CD4FCA034AD7A218B864A54FB13F39491938E0094E46CE16990BB47DF69
+D236799B02699BE88B54FB17C80092DFD628860824F789000BE4F2C3BB2ABCC2
+4447F49BD36B1BEEDED6FA3B5CDD935126835080FD2AC78D04A4DE3A153F5C9E
+23D4598C9CC923FD9AF0B6E47D50403A6566E68ED8655AECBBB4D4D0C0D70287
+D02AFC5FF37C660EC894A4ABB0614FC165C256AB968DEAD57414F06746D41E0D
+36AA18F73629BEE12532B32F93E5EFA54000F251BE4ACD610F5168D32E0ACF1A
+98CF89170C4D2D9E4F057E38E7E5DFD61774709A823581B0723063F88E217723
+54627C11E53B904958CBAAABE93292A55067B04FCAED977C016EEACAFAE4B8CD
+09F39F4854CCA7E6E7E7C1B9702060C781ED45C8354D3AB3923BD200BB2ECAAA
+5D767EF34D525398BA831973D9BB67903D9580FFFEE1AB2358EEC23EF38C426D
+C433391AB6229752CFE6EF4595299E02383FAB46AF8B3E3015B6CA441839DE46
+4841FA63E8A7CAAFD0DB875B0750AC00A4C4615EF8784E0B70AE0C00BA83532B
+98351D012A8994CCA18D3AA36C2E7AF12A051A8E166B2C57EA8A23AD2D66881A
+EDA79F565573C76F1249AA10C1DE4B60B51220D6B946498D9800B8B59BE65271
+A8EEDDB2DDDD19B273C48FA601CCDD84C5495F77FDFE22F609D4C8FE2DFC7BD0
+F108AA16AB5B34224C579A7E1BC8AEA267C44100BDBED6897528A799C2E9478C
+DA8F6ED505AE1410F0E4071CF80FF8D3CB5C1CE1B44AA7B2F38990E65D9814DE
+D5F2CAF8DF24154B0E54B58AAA2473F4A27F712A0C6690391138EA6A07CE358D
+213C6D1B0CB9DE945762F18BEC50C5E11DC0A0DCF0DC8A02CC2BFEE7C4DB0BBD
+9FFFF7F3C79F3A991ACE3BCC36785FCD072FD159E2CE9AD429A27CEA146BF182
+10EF72E4B329EAAC8B70ED717F0C8B4B2AD31A0FB0434652C01D42FE29A2E0FA
+3B529643E6FA98A66189E00CEED4A4A0D9A583FD9D83E8485C7569875F9BBD5C
+270B0859EF041BF4006DB8E2D32FE80C1C54C49B1906E58576EAFCE3DDA41AE7
+EA6660CA549BE72E06666D69F82B26222BFF5DB21C15B8CCA4D8193500FB0520
+F7FD4AE3196853618190C578F485DAD0D52D7EE45E47890327EE8A2387E26413
+3209DF5C93760B565625378FC1DAD322EB0373525447170919D40D12394CB0B3
+72859C51197352AD62F3417D147D88DC59C5CDF32543AAEFFCE63542C6E69B96
+1BAFB6AE012EB227A066AF9799C58A02FAC1227327FB5C0A4C3A83D105275287
+8CAA7E21AF180FA6181643E10B72E0139BA78A03A4FA97D3B64D079A3BA8564E
+14400D92A3794251E68CF55FA7530B64BBA2CC4AF800769D6F1CD59FE767D129
+D84B4CC327B4E27566B60B8505119C2A5967342B055274C793A624EDD6156478
+0859496478997011C584BD20CC9B6E950A129799A71BB917EF6399D60B62E6F2
+1BC2C88A955A6054DC6CC0CFA8EA2384CB34D381670B034ACC7B74954C6D3871
+60534C777E1E2193CAA62F14937CC9CB4ECE9B5F23346EC280F06B7A8FC53D6F
+EC0A91A2B5458D46763D6207BB6D7FBD8CEBAA2D028CB9C256EA1A9A04AC75F2
+0DA3B4021CB3F872AAF7828BB33DD137058B6CA96E9A371662CEBDB0CF2228D8
+BD567C88D9B813BF74D5B014E34344BDFC46FFDB501770BFFC22E3411EA26866
+8D21DF54406DB95377DB2DD3045653B25823DB046672CE0095BEC20B8F0A6136
+374EB7584F372B665C07441903E19E61F84A1103069F7DA211DE645F48A3F550
+1C42CC2330F1BFD8913A9EFD1155F2C87DC62608D532F4F5933A226322B91B5E
+CAF2A1061908FA76A09DC057B582119E526B5205CB52E77881A9FC75059719D1
+A0FEC51FAE6971FA9F981E7CE7A2050F426A8C1D9EC418825EE8EFA9D54A6C5F
+628205A912ECAD23572E3610DDA047EEF4457EC7F68CA82D2E0299D92ECDD09A
+BE7C3E9E81A9A72572E3AECF8AAFC39DD7FBB3DD56A1C8997207BA956809913D
+881A0B818F235611FB3CD8C3735AEAF53C5B6959A9CD7608FE2BA5C2A1027762
+83EF74740E37ABE827E61519FB78994F28C59F5BFD328171B825A4BF80C91E9E
+10ED9D71094DCE44B556B331B4DF9CCBFC21DE15440F2814F58A69A8643AD72B
+DD53A2CFA63CF29CA3DCA60EE2C558F3F4D0D7F6D1AF921D581FE434244AB4FD
+01C32682508A964114388582C645F32458FEF0673FCEF009CBC27FFFF120C57C
+0C5A9294023870A510CC6B5FB5C54F98FCD27CE5575ABCB1CC6F3930E3CC9895
+BFC7FF80C86E2608C3FEBC861C71F34C1F392B7BD86146590CEFF7CE332D8797
+BAE8FAE23DE40905CAAAB4FFD115849754D2B5B3A3B9B726BD45E0935E22ABB6
+CA298C9D8C313D83AFDAD44792AA29B814D2FDE9D8209FF3FA4DD21AF52990CB
+E0AE5B9B7024D8D8E147589B496771EDDCB46A8034B6B2E7D304B5299D44616D
+114328D7327730EA360AB2213EBA21A32930F323992973EAAC24BBF4097EE98D
+2C4BC8E7278923E8B726FC916C64E6E746F1E2DCE24EE57FEC432436DC2E0028
+375006996DFA4CBB077034D588E27C2DF082E4A4115A849E8B77FB3CE4B9241F
+E747E4A719CBF2DC16DFF86BD74F536478261827A4C9CFC96806731396036CAB
+DC301B8979F7D1B467323E0FA501905F0DD3075D6F2F859A905350285F8BEBD3
+C86186D8B644D7C07274A7AF96761464201EAA4E0694ED8C091326F7D2D0F464
+9CFAB448A108F376CB6BC533A3CEED71E6E995E33F8197F23ED966AB0595EC82
+4BB3BCA4DB7BB42E6593EB0933CBC7E404AD72061CAADAE15A94602A7554E6B0
+294F6DC2D5FB7929426DFB4B4DC90FCA08331AEA9D226D8EB21CB8CB2A4012D2
+027EAEDCCD4F4C17CF03484A94B824388EFF176962C3426A09979F84608628A8
+B8504D72E5040573BA7AECC13EEEC54051A31807E77FC5F480C8F30373B67E7C
+F9A45DAA5B97030E16604EA3A24337537D60638577913280A130C6D25C8FEF7F
+439EE76E361B3E3A46EEE9F6C61254918C666EE7A94969063E7C8E5023D8F354
+0CB1179A4BF4C009C67B8B10464C38B2B631DDF0801177681B7E7CFB941FC926
+D4362E86944ABF77E2C805815CD93DDFF46D574947A100854AF5BE55F0AE51CE
+AE58EFEE5D00DAD282DBB600935FD6D3676D4B35872E7DBF2E5D164495CD93A9
+E3EDC2A8D06F9CD7E6BB76D655CB563F2B709B1FFA45E486C1E2A46A5C2EB5F4
+3DAD30D0A21F3FA4170382DA80D2729EEAED59FA99800458B6E8C2BE642F01E5
+7181BE0C35DA1B3D85E49E78C65E7ACA7CBD3EDBB07C59D6AA49F89BA36F9C10
+E141D9B7EED632E1FB544716309F24651BE47D4BF099441B763567EB6156FCF7
+E90554411216854A74824113F4C7FB626A91F32CB824F6BFE607455317DEE718
+A0C49504B2817459B0BF87319085BFF82F8C2D4E1C7DFB0EF4A9B8D53C78FD0F
+5646B00130AB9F22300B69F3FA222971386CE71B4EE23006914F73B6AEA13422
+39126FE987F592176DCF482BA5B61AF13809512957A15EE3A1298A8BB5A11AB6
+314434BF61067ADEA42FAD97CC02F0A89A62D96E9E6C7B06088C3E02044E78BD
+F479A423A44754865C36F54E154D663CAD44F635AB03D62447E25F5FAB14CD4B
+86DCAB14B68003A6715FC145A62A8CD1FE60230802E56A5D906465E17E8E1384
+EF93A2248C92AA69B30EF1958459F2B4E073EEEB207CAA1C2C81ED7EC203D328
+080A7E22E41386A49F7C50C7C3484E118CFD08F4085553D08F95E9641F2F016E
+CC589906448A0710F3D46F2FBDF6E11014B71D5B000FC8563300F3DB14F20C88
+1777732B61850770B1292132357DAB822EA0E82CF09069DA6067E8810DCBA80B
+E038AEDC46DCDE18811BAF4CC2BDC823FA0E525E4920AC49A13FE1F0BCE09595
+6B0A80B68659521ACA8DFE71EE72EAB21DA362841DAD6F1F50D20DE4D53AE3D0
+3F5C96727CCEB1272DECDA82BA27E018170F55EA2D94660037E05207633556DC
+4C8F0108367FAE02F1409DAECD5D0CA9BA47558B8FD450EF3C332E655D3222B5
+AD96C39A5F74DAC7DE60E5352113B3A778D97A49569411FF7B8502E1B27BA4B8
+741DF55BF75E51AB977C3F0DC4ABF7A654AB21C603A7CB63CAFCC87B5E60052E
+E091065CD32CD1E15237FBBE40B5E8D4C6C34AB13D1EF5C1CAE1093824FBD5FB
+562B809BE191A1C4E6CBB8D8C619536385C76FE5313F186AEF625C4D7E159151
+77F732524F5300DCBA3FB5EC9091CCC533F9D8D617D02E93A80DD924A9F8FC00
+08F1B1D0A1F78B36785C529C35301BED56EEC11F4940F12EEBDEE487C8AD94B0
+6E14FCBC1BA8AC32960AD9FC1CEDB320D53204AF69A56E4EF6B28EEF0C703DB8
+0604DDC0DFD2296BF919658C28D9027434980456A57577ABA0024E3CECEBCCEE
+BAFE230A285771F1E6D56DA431AC0E06253F141CD97988D7002598D4B14849E7
+EA30A6ED6681C43E5169F2CD31BEDEB51F29542D470C3D90E87A7DB4F11A9D07
+B740EE90E4A39F4CF3586C2C723C3139F33186EAE49A3FD6F11A79626E422CDD
+7D7825DB95BAB0C42AF78CB0E03FCE914A5489E6AB2143AB4D2B516AFEB3D4AB
+92D533AE294568FC498E5AFCE3C131A7762C43C94BE1940FBDBDC0A44087FAC1
+5F7EC321EC0E7DDB3925C94BFD150FDB1D3556FA8456FCE3FC3B12263DF3EDC9
+C184528E75355BFE6D88935A666F53A53C1606A019E5C6E328F787078B15AE32
+9F49454CD025F0D601098FD599642340A59A5D2E9226E4E468E77B240030479C
+14BA84F04B0A4063CE396D89EF3091467D212C5FAE02730A17879A1520D3BF00
+BD5E80610A75E4C3581C53674B4D18E3433B24841C20B7CD7A63C99511366927
+0A117CCC8CCB519DBA75940D75897C664627C88B98B4EF7A34CE5A9FB212777A
+FC65DA6A4E1BB920494407828F19501A649850F6996171528F5A9E0740DC5D50
+DD72C991663F1605D53F7D64EB94AC101380718313DB47D43F2F465616F7949B
+E46CA304A89594023EBC34B252867541C336D2B534DAD7AF58653956985F0AD2
+D24E9C4B75755A5CADAB35E11047510AB4517AB2AE659E42B7C4E27262376BC0
+43B6FC44E67B3A85A9442EBAB410EC5A4079D690C3DC2284A080A520327DD98D
+8B9327C6F3B24B0B445D09030E07297E568DFFA76EE5B8349161CE403AECED8E
+1B539A2B8414C0C45C5D99AEBC72E97308F6BA250DBBE6D924591A4CDC18D6AD
+E9988BF0EE0FDD981A674D98BB066BDA43F2E38CCA7BC274F8B3DFC9F2AC5235
+01FEB0CB145AAFF3EFF9DD7884A228F417C8B1F62152915FF43D09E3BD3FF648
+30B06B57033983D6976E635939D746F194F3BAA218B2A37C6E27FCDC8BF8A0AE
+5B077E8F11A5A9C23C24E4E0F28902FFCC81DC60B243E20C6789BFA50A86C25B
+EA4B440A7FCDCD171331DDCD591C83A512B2B962B1FEFEB9D334987893211AF2
+C2A6F2F6BF83CFCA266AAB342A7604EF55D4A94A0B9BA8247A328697E3D633EB
+4DB8EF437A559CE366B7F84E3707C6957C09759CBD4C3432EDB02835B16E6F76
+5DD95A0DD812B06613EA5B80EB037010E9E4BC4A73D79B6EFF0F40E84BBE57D5
+0399F85547D3BBD324B30C931C8D48A3575124BAA6AFF4C0A857E99F0892EDD3
+563B4B441817EF65B4430591DCF7778EDCC73080CF9BEA32ADD6325D5DFF6292
+DA21601B493AC7A1619406B9A62F7D1A31AEF62B95B3ECED8E12AE21F66CF90A
+4C82CE92C5EDF3A29006D9960B110F2F732A0407D2291F4F4DAAB8E8F2C7FFD0
+EF48EE5901316D4A1556E16700248C0CCC984B728FC9A89858C4830B5CEAE115
+9631A1023078363A0A217FC53BB20791AED526194E1F286666325CAADF009D9A
+D7DC8E3CD65D635134B149F806BF27B10E642868B5E26E1A8A59F6B0369B8114
+E1BDD480038007155224BC3B593E60F4BE8E59363974CFBADC8A322F13DC7FAD
+F5A63B0699F8FF5181F2CAA5B20CF8545E63E7C034337C748B3BF5B61EB34EF8
+2CB3639EA164F6F8A981138701EDB82ADB3172C77F3D01BAC1B1F6740BCE0FC9
+2B09BFD6BEDFA3CE8EBA804BBEE1258CFABDF48C296CD1B57D4A938E2EE41B35
+CDC177E6EA0BFB5BD493637C4174476CDDEBE2C1B6F4F90FB9680907158FA53B
+EBB6B96EE573081C420A0C1FA35F7E2A5EC39E7A915E466FB7F4A750148E3CED
+EB6375853DE4180252E790FE09D57373DC8CA5BFE68DF4D9FACE3A95C2FF8BE2
+E342BCF84C98F2E07C6449732D7885050D9326172596CAF8D6C1D5FBB1A35DD6
+927367908C3DF2155AD9B651E02E56341EBE697F5856CC2811E58DA6BBFF14E4
+46094DA3EA6ADDAEBC29C3FC83A549D883622B1E02CF5C0C780BAA5B3C84D895
+39204F12F590C1F84947657EE2AD21473F766CEC0802E662797DC0322D13FE9F
+309982171134E7102DB9FA3245F906CDF1C2FFF5208852C7C4E9F7BC95803D15
+F7C2717D78D75843C3D5D4AEA4507956954DAFA23DB15D43B26121D03FE5417F
+2609A9DF71782DC41990592A6E81D9390838F1F753D9A3C003B0F2516E8D0689
+7BD5269E48D8BCDB266041F51E8BD54AB37120725945F25769DF62B8F3C24000
+C38ED31E14974A6F4FB99C87B2DB02A4563742A0FFA768213E834E4029208966
+BB4E4AC13F8591A02C59FC1DAAF725341EA72CF61C8F1EB6343FE99A924581B2
+CA0F034285758D49CE07427C96528834AC2C99F8BB4A9223AE4D8D2B113E769A
+5DCB1ABCF2695477B7BB30755346E970FA500A6575189E453C66DFC966F4C088
+B9DAC012965BB890CCC132F4E6160CC2B113F5C908C621AFA34F1D95F3DB2332
+AEC26440CFFC0564B57B4E40B484D93CEFED8768DABF83A3788F5B68239C40D9
+0AF793F5FEFCCDA7383120660A4451A9ACC99D10B232D25075EAA46D39A3D8F8
+80FC17734B9363D3FA70E30F3CBE102BAAFEAF854C1BB4944CDFA73A74BAD32D
+5D0760A5971B86735B2F349970B0311D9B36A74412F5F7235A497AC3EA69FDCF
+9F8AFA9812353B45ADD205B5F31B2B9BFA46D08FBBBD4CEAAA527B45679B55EF
+87DF44F0539987ABF6CE2E7088DF7AA13A515ACCD17BFEC5626F01D97EA9CBF3
+3DE7E57ECC531119B97695463806D889853FC8AB6EA6BAA44BFFF796C29DB97A
+FD6675ED1859C61CCCA85D672104B9F20384D2973797BD8E77FA198BE97E7B88
+D7EC196CC296EBFA08A048C60005DBB696033E87F4FA8D50423E5C58CAF32EA9
+F0669FCA67692291D86BEFF717D6C5A1E0AD6A75C0F7E3EFD2F7A5F5AD7D92B5
+9BB4BD9E7B6E7E337ADC6ABECC3C1B41073FA3A25A2FC1640DE3AFD97BE7BA03
+95DB5026086C842BCEC3A6A1C3DAB1D50DB50261A8B19A7CDD7B7891475E53DE
+754050D783D64029006A5BD200B6C64D18EE7576C68E30E1D6F762E9A90C9566
+D90FE497B27A9B52223A5DEA20D7A67FBFCA5907BB0496E10D87FEE2FF90C895
+CD69414B219900CCF5D5E73461D0948FD57B8681E8E598A25FADF80BC88667F9
+C871B4F87AF7DB9797A98B40BC29CA48F614F754442AC9F5D71D55D14B93BA67
+180B01E51B781345F1AEC0E68CBEE1270ECA7B3593BF4E3E4046CDD4FD9703F0
+59822E8D30209D01BB0E404EE693ED74480B179F8431E0BF3FFF6F404AB6803E
+782F592E87FCF7B811683DEC0F6DDEA4D5BCCF19F1842D5E08C16E4D61952D46
+2620AFCD1DCBB1D3D2E38539537B40E291FCC6D69667C47DC77742A8C01149C4
+DD0C08470FCF10C1D5C02985AD632A55C8C86BC7604D8438DF27DDDE6F773051
+38E268C9D7E72C12EF3C02287D229AB27C864DC7A90F6208DFA2B2EA0027420B
+13637FE2AAB2CD0E90C1BB3D58C1A1E92112353C994E4A3B1FD71781CDDC7237
+A97299CBC0E704ED11FEBA7B3ECA2A1CBE15F38BCD5999525D24200B0B742553
+3FB0065C5DD170C57EC79E9E04D46BAFD0FC8C9FAC2BDF17B5B756F9B0BFC0B7
+B505E533CBBB6762A076FD1D6140C3BBCAD87AF61D1FC65613C84FC7DB3E2260
+45C8A31C5F4E98DAFA54C7730454F66C867143D2A81D841400ADE0DA5BD9F992
+58C51B112AF3674B454C138B3B087FFCD596D5F8C23A5371D955CDD247F87229
+515388BC8CA93925412DBF27DC507D29436A64E236465C3BE9C5EDAE31EC5CB7
+FE4A32CB0DD86F5F5FCDB616F45FDA945A26565818F62FB21B7DE86F61160A6E
+BF7A74682E9EAC5BC99BA5709D96E52733F71385693E6B75BFC0BFE73B8F7F56
+690CD5BAE46F2E7655DC840ED4B1A8E1BEB7F956F586580CB3C73F144872D838
+72B7A58281EDB4576C06815F79EEF626A1269FA5A899B6C2B67CAAE87E737DE3
+A60AD91CDECE2F5FFBDE4D84179AA3A5A84CF55132C7160744A0BC0B30A59B8F
+31BB9CA6D079CB016EA257EF19FE7787EB73158D1589DD2CFD1E6F5CB343A57A
+616111909DCC5EDEE2194B0648D58FEB782562D469BFB04A55B027A567E6931A
+4ADF8ED23D57A6C2F7CFC24186BAB1D1637520B2ABCF18D78F69F5BDBF4D1859
+27340FCDD8E09A247752C05ED51A08B063FB3A21150ECB022AE818E49AC126FB
+B0BE9023C87E2F15A49B751D03EB78B55FA135A735926F6C08627D980DDEA027
+17ECD8798B9259D1073AEA2364F08F75DF3F3039C2A5268210941212638A9198
+2B9E83C5325C1A87EBCC577FE081557F252EDB8DCCADE7D92B6F90607D635CBF
+B1CE7AA040121AC48BDD09EB9A78AD2C004C2852CC208844EDC6C63C0ACEAA1B
+02006551B614463B87156ADE0E336773C7B364175ECB202EE9823D2C11DB4311
+A872159D70B91783BA0D47375222A677166DE6B2D727E8FD119769BDA354947D
+B4AA82966AFFD527D160DEB0E5589C3FAE2EC11A09A41F9B04A947453CE96A48
+203827A9CFF9B84AE9B0DA3F
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l047036t.pfa b/lib/fonts/l047036t.pfa
new file mode 100644
index 0000000..fb500c6
--- /dev/null
+++ b/lib/fonts/l047036t.pfa
@@ -0,0 +1,1361 @@
+%!PS-AdobeFont-1.0: LuxiMono-BoldOblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Mono Bold Oblique) readonly def
+/FamilyName (Luxi Mono) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch true def
+/UnderlinePosition -48 def
+/UnderlineThickness 96 def
+end readonly def
+/FontName /LuxiMono-BoldOblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-29 -211 755 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078986 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D83E1F4276DACACA37DF93
+6E81F12A36C75497181154EAB28226DE282D3F090A9E260BE05FB75D62F0E576
+938A5E3E63A16FD101E72F7A3306261230B60339CA66A60A810D6560F2BD77A7
+B4702D2F9D75A595C875E823EBD7C94797B3BC36F98FA25220790470D2A38DB9
+0E90AB4F3609A1A013CF93D016E544F4E385663414AB2B2927BC000A9B3E0544
+00B18DE5B168D06372C55EB16D6D952F716752775B0B8BC63CD5A2DF27C0E0C8
+578EB365ADA6493181D9AB5D7B8AE30E2B499F952D65877C8E38EDD7DB29F957
+9D09EAE5B1EFB3F29CB94FC40874DD2248AEAEDC411B39AF2D35822F0F742AD4
+DAD1049609EA9CD325557E8E160E64239BC87CA11A7E215BD050A87E55EEF494
+6198CD3AC7FFEBC6D44FE051179BB739FC89B74B5183CE255C10320DD7407CDA
+65E13878AB431E7B99F49D2E6E1B39D152BAB31A5BFD73BF6D298C2E71EA710D
+E094C139EC016D48233AC2C25E8E60F168DFF50892EE10F66894C471861B784A
+BE82A8A08C9BC8FAD0FA2E2D84406C5522CF6B9E46ECA79BFF1678DE26FA6E29
+2C3E13C38726369542682E88F4F3C0596C877E0040063BB3962ADFA6CF3FE9AC
+B15B289FEDDDAD64E40AC82B3D26B1593C4C8A90B99493E33C453933B127095E
+835FF7B340EE9EF89A0C792D4D0DB38784BAD3F484CD951F98B89F93824B729F
+8C93C7B931D025983DB5BB21D2560E444528DF8EE5A07CFC5B5B82275CD64CF9
+926EFA32B59335B1B6E709A62D8C17D278781FC619AF66FED15922229ED441D4
+008B81578C0F30866E20841D389875795F9FA5D573A911A573281A1051293A6A
+5C21938DB0F7E4508CED69E67D1F4C2BA55448BAA255E0A28DFA983C55260E54
+2E01F5372F15F74B785BFFC7502DCD104D2270B0B738BED86DB0F1F680F67408
+A9A806F586C0995A7586822B656B620E9B392D3BAE3AA5EBCBC86358CEBA1256
+EBEB0D9B5DAB1CF8F45D1FF5229ECEA379729F326E85A8CC963AF8EBFC9D84A0
+F5D7D4B3DD19142D521D2D7F96372E53EB54527D6E2EDCE42912D0B382FBD266
+4BB5E5E8FEAA8D4EA4B63A6497C0B276424F50A5E23BB17ADC8592E0A88247EB
+420D12CDF7417972702B41738B7E6819476362466410CB3BF8452135B16E6F76
+5DD95AA1C99CFB3F988F1C895AA4C434076FBC66297C8BEEB146CADC7BFE4038
+CC6860C0ADAE8C851BDFF35EB980B8B4CE3BC9C2F2994C4B76C25A3811336B48
+7BEACBB256D0C91BDF5B94EE65A4032D238B59DC55D442C02553C48B1D4B8ACA
+2FD1418A19576FF0CB0A58B41BE33D1810D691836F064809AED5E819D30AE1E9
+0CDF269DCD6CD605AD27E3262D25A2245933A08689A8FA2C7910938615C19CCE
+8529DAB09A8CCB71847F5A79F8546B054E6E2568A39A316267E1B0C145DDFD6E
+199C481BA1233D069EA926B81F1AD863C9784E281515F7CECC2B4845634D77B3
+70AC75FC74269301F562AA2B647AFF0572FAC99DE472A9B8154812ED7D0880C2
+E5A57DA12F51B724056475519E205047F52655AEB77EE422FA3E10AFF782CB25
+E02AC8572678232A611777FC31914196BF83CC82D2102A5BDFD5317063918EFE
+10B43E3BB2368B7868C178B1F940512B463F0D41B85D6275EAA75856AE4A5CE2
+5E3B7079EA624D03443222496D6E5F28752F3955638A06CA42AE43EFDE812EB3
+51B65581525C8EFDD17B0514F3096D12ECF2FB417DC4F3FD866D7F3A15B7E98B
+078A37367794D00DA2C72512A788A68AC0324935A25642C30320885272CDFBC6
+89F87070581BB8E902B500B878936A270441FDF0731517F86C512E02699911CF
+2DAED27087013873CE750708EFB2DE9DDA19AB4387E4A5E09DF05F620C7E4519
+43A4E391BA3069202557823519C6D07B4AB3D19CD9D081CF8AB9C8E3B2AACA28
+A6A1977A7C8609019A0A716631E692AECC540BCAFDE9073E2AA7C6BC1F9AF124
+CBCBED06053F8B176F6EE71C6D804F5CE9187A2CDCE9A5B5CA28A07C8C94E328
+6D29D9051524A60EFFD07CEFFC39592E14D6F1460EF90059129AF3D989144A5E
+0DAEEDF5EA6D1E7F7212291541F0E1A1DDE0CFBBAD2DFCD5B367227EF9F13F57
+0EDCC40844358B9C95764FE0981D99A793DD6260BFCF25A3F660DEB9EC5397E5
+D33D526857E454BF2694C50E7558A060C292050D534F7212AEBCDBBB622ABDEF
+F31E6B6BC528B7AB99169BD1DC4070D883BBCFB69EA73E05AFD18DF56F31B251
+A1E8C9748915856FE50D441C0F968B7240688CA6CD661EC9964D030BDB6BEF8D
+3FB25596A888D7530E767B60FC3C85932525DED921A63D7CB8D84169522B336D
+368901BE9754CC72DFCA2A1FD4F21C2BCB512D6B97D07F9902EEB1338680121C
+B2A6DD32F54632E44943081F80998C0674D640CC003BEB0307B51593BFA99CC5
+380390D36BF36A83618064BF63EDB81D5347C596D9E43291AE0D6083E6E10ED4
+7C78856F1F36C5B5C9A7570A654A86002EFD2D757CE3D59E04E2FDC681C3D297
+C8B8EB8FD5821FE4AA3C35B2B4EB97B45CB0AB7F8AFF57C861DDA0F78FC053CA
+B0F01FCDA6EDFC00174F62B4ECE8914AB495804E9793DA4587B0A295A8626A69
+64A1B3C9B2D828B60BC6D18F19B604AB72D007FF0B571BB42FD6BF692C887C66
+D21540E2790ED44D117E1C942FA69694067FBF198FD8DCB22FFB10D47F75F445
+59FE728C24B0968BB9EBFC74C1BA3D42858DF3EBBFF8C27E4ED19C4F2ECDC009
+EDF6F19E1EBB4A653C5E0FC6F01B30E89BB1D5D4D232034E8D1059334DB204CF
+6C75B87ECA4995A322BDE7A2B9B3F355A191E86A3B23AF11B52ED596A91B46B3
+8C03B34F328992BE927DDC4B153B615F2C55224167A957E4CC442C041BE4B961
+9EA06EF6F76F093FA3E672EF104FABE172545E51C4666C0BA73A6F08948D05E4
+E54C4496EDCEC0B33DA14FFA172A3E2116F1E10A04BEA1269E38F396C857DC74
+3DF40255BCA91906CD2710ED5806C6C6A4688BA557B78F5F81FC9764E06D391F
+EAE0DF580AB7F045DC04A3BB886BB27AF53DDEE38D38AAF35CA96CD3F5C869BA
+2DA4D9927809677025B7007278E0916FD8B5FB793BA74DD627CF29E7A3621EE2
+0951BE2D39031BCFA002E6FEF53EC0283247145B2947BBE8BBD3E7D5C49D9A1E
+E8B6C05774B1A339A469C677BFF0B30CCF7325F9077349C96608B60F44C18101
+25E03F6EB91B25562A4F3738977FB3A463C0B8DB6B771B3145D44CA360E54E7C
+697750053AA18EF9E9A3689B6248F124A75C6DBFBAF5181D8AF35A6152641092
+320A21B984DF101293A365918C113542819414E0462B6697C0993D8462A7F853
+D22DEE0AF329705BC81F362C13CD8FFD411D53BC4FDD03A3F5B95AD75FB29B08
+D5DE5830C69B2DC4E6B8423118B1069A1275CB6414D09FC27CA353B8B239AB41
+FB8E8E68E175B3793818C22C394932CDCE1E17FDA48E8AA619583D5E27A8D06C
+9176AEED7FCDE33883A4509A5C8D7F81BA4F517888265E57D756314626BF3674
+F0F327380828E9D129D8BC8B352658BEFAE98218BEDE1C0E9E2FD95D595506B0
+70169BC18FDFB2EB5B4F216D07D878FC92B08DD94F5D1E06C3B20A15B5772A29
+79B770D5C82EB260F821CC53E97B5FFB84FC936D1452A11912C9D865B1C4966A
+C9192A0E1CBC421619AFC16EAD4C75ABFFD0F801447D9E197A3D8049B859855B
+E61345674D6D4BD99C94B049CDB1253D45C14DFEE7B17B8F7A8DCC9B26296657
+E7F033CF55ABC7A703BC755504EFECE597F0436B98491E0A8B6B128C8A4E9B22
+924D33B6BE65CD0470871835C856E25B491A527B1FFBDB8263A64E7DA5914C24
+1C4B7798424AD3AB0E7D97C0EB3FA94215F98A2172FB9AEA3AE44B04F4F14505
+C229FA8974641636010907CA68786D1C84BA5510A26EBF0D9C23E7A0EF4C4E7E
+837392A223C16C7092BB2677A0E6C3BDD718F8C16DFC2232440EDD967B305F1C
+85346F4F5C109A902DFF10E990732992CE920D95F999C97948BD254AE64AFC2F
+771306DFB8454F8BA062AF715F50C0CC1C0B40C039D8A36CE350CA5C858607F4
+0E86B74DA44262C3F0D2F8E19D6E3D93683D204F9D506481C3022A281D465DA0
+2C33F3CAC0C9E357A1B96C24EEA1E4D6B3CE3B61E84ED48342BA80DCB95515A1
+964537E23E8368316790E6F5810FB266DAD3DD8F72FC219C7E7162596B4441A4
+1ADF396127473EB8FE164B52C251F3C997B726FE3F437564A1E5F455B595D20C
+F38A1BDE3D7A61691DA09F7D8698950883B397A9AC908D69CCF461892FD9AD5D
+F17B55B60B5378F9846B7570803990AF00BE3D92E40A62C9EAC215ED8ED4F12E
+10BAAF1BF1313B88FBC92C37292E2C431D9C5E7D7A6E8B1E300E0B8C7E6B0137
+3DF9B8CA1CBA01F68FF29F608572859251008B3CA544521593A19BB470E35DA1
+9749CF4B5BE790810DD78DC9C28C310F15AEA54D23D58B2449E93C5044D70229
+5EA791A06AC3DD5F512401400561419EEAE9D72900EE6336B6A8DE9EB91846FE
+14BDBB2A318E8FD269AE8862FD5121E402D85CFD707F844F02818F003B4A7C71
+8C03A18E097FC460ED1651C34B2C83A08DB246AB16389CD1B73654F222A16A96
+132EE0772CEFC1001FDAE643F0077E393AC5E328654F06FBB16490AB1C4B1016
+5DE8437C5E1C2FEAC4DA3E73F84266CC47928502B1FB5DE4A160A9CDA7E876F5
+FB512D043832F0B3C3AAE969C5DDE3515C19725D7573E0890C2A0D64676DCA80
+1EC2E72C1D93A08755E8E6AE34788A7EE87B0198FD576B798841A289C3E4B18B
+89438BA3EE74BB0ED495FF8F2DBBFBAF532A14B0D75B90D6533DC439F65980BB
+F081B537F94B4C48FABE0873D12EAFAE4CBF3779D34306071814D2DBEB3CC5FF
+0623456154368D68D16E478358590539195654C70C9C8C814F0AD6BDA45AA546
+3F309D22787B7DAA56F60D65B953A257254FA3054727A57EBD5055FC96BE3C9B
+9D5B11BD8A5D980BF5C1E1611D0EF6EB000D594491579ECC8F45962ED6228A9C
+AB2311B7E09D3F846ED366963BD57A5F41F54130103A97401FDBBACB880A8E96
+70F230922715A6CA9D88B33CF4C9CBA196C3BFF1521925AC49E514689B094159
+FF60C59D3D6963F72690DFCCD6740A1C0D274CD047A83F7630BBEC073AAF67DE
+E484787A78C170FB8D900ED4C8351FC64C75BC7F09089EC8D56C11C575E22087
+98B3FD21D1FE47D7899B908DBBB80C0CCB0304D491798F5090173264AF3F5622
+E97C4BAC6E22D336732CAD404D51CDF3B2C1F1F098244A8FB998E77BF689062F
+8EBD6631461CE66217694515BB0BE2F5A97ADDE9295001E5BBDFCF1CA8DF1312
+2D9D444EC1438AFB1E1A146D14A8D4D1FB554D8A8B7DDED6D01B3D3FD2D408B5
+6CE034520871339B6070567003255A7C685CF7579C5A9612D5707DE094D3DEB9
+1253809352F9170EB020BC26CF69A274B31F99AB44386C01A02D0F3E4EE49BEF
+7D85C07C685AEC301E0323C9554AAE970C5874927909BF8A2F48B553DEA37057
+D39ED353AC8F7EC2279FDCD395AA162354F237BCB993AB3311433B6373B555F1
+BEC82D844D2D51CD938EAB2CCE3603A46DA3C9868C3CD586559C403F21925AAA
+51C60451296C01AEC7604C7CED9363536F2CDAE99A774E2ED95A60787872E132
+311E1E8412AF134BDC094597C80BE0535D81ADD7464D4DDE57DD2BB020D0B57B
+C5527E84D4A7FEF6CBA439FEB165E0629D08E7BD41C138CB1232A2B992540D3E
+9626A62FAA6F64961B56E454CE4C918B57560C08868F0F262E79F43D7EADADDC
+6B42DD8DA70AF5AEC0966C0000A93949CD8B402017EE23B806ADED418B470DA4
+B7732B8CEA6A2464B35D3850F7B57596E5F6AB71CA9DAEE51B21C8D093D159A2
+10F4752F4410489CC6734735A4CCA0CB0E6124F38C5B879715509A99A5FB7F8C
+3353A4DD03B43F41117B9673E1B8470579AF8706965AB50CF5F402848A603E9F
+60FE3B123838A090E1CC6938DA3DB19908BEC6D92BB5A0E2774206CDD7EC2969
+186EBF848BE9EDE2A30DAFE89349062A111B53346E44CCBDFDEA993DF7E4D06D
+0C395C514E3C9BCEB7F2C3B7BB6BCA214F7DDCC1A0BE92BBFB04601563686CC8
+13901FB618CC2EB8B07E7568451B63F8D294881CF4E03C492871DD81C435D92E
+8247C5D3D3501CAE89D690ECBA5B0FCE995DA9A1A56B4A0EE568281C44589A46
+0C927D6FA7873DFB85137FC1A712C97771495C98F86B46968C3E9C62AB80A93B
+C5DCACF6ECAC4E0827809FC0A0C6B588170BACB25B3CB1E99A38CE73DBB6D0A2
+43E5A0626FA8019557FFF1B27B4EC673A3775641C4AAB7F84454191383E77E96
+3D309D17B3E74998CA515D9B80C329EA920A7BA8E0097AE066B5A2F83D7A9456
+78738E0CEA73B15A4DA0259507501DF35F8AED1E9CB8DAACD2AE0118428B06E6
+4CF0F812B618E7070F36C4A9832FC7348F2055BF55E5E25853F669BF1415B67C
+FA30F3C3BB89A96985E6B82461AA8016A93B8DD61F2AC7E607A86D84291BE847
+11A0AF6F40AA08BCC6464468CFA7C9B0AB741C3CC01C14BB26F6F7CCD561DC7A
+BC38619F3D445BD4BA31607DB4AEF620CCFF5DA527261E7C7DDFD6E22E7B1AE1
+AED11E8DC5132A1C58B15B82E65DEE25FDB5E4F53403C99E2F67FC074412DEED
+E83E53B23C4A571828C79AC3FF17D5701354A14B83969FDF984BB065FC0A6627
+1772E33637A3D303B652305DF8DB459E43637411B04312DD2F7BFD268B209A10
+2B2B3482C84E4A1F27430B729CF6C3A25116CB81155832670CD8EDC17C9FD068
+C07475A76F7F37D84C905CE96B5ACFBCA703A19E35DD2EA7060A8A6C6BED4209
+5620764469BE1ACAC422E039D35057F5FB68E446BA6134FA05EAF51D70809586
+44B539790748F9B7C0FF2698FBBEEF37D318DCA12FEC1B32F88BEE11A91E9054
+BEAABD1723857DCF87B13D57AEF68E6CF2CC31AD340270607EB6709E113392B8
+0459C10C6D06A3BB7C7F6252621C5BA73BBD8ACBDFE20D7146B0C1CB96E393B1
+25002DB37DCCF2633EDCAEB9A86F618AD4B3A985A83CEBF0D62B31D0D09082D1
+6CC0E355D4557C8391A5F2716F8BBF01F009235DC8070600F473ECA33DA726D8
+EF411D558D5A8B80CABDE111AFF83C0F9C058AC2B9D053CCCD1DA44C97AF4C7F
+702B162E4CB347CAEEA9E650C076DF694ACB8F2E4364C675263D3A677A754B96
+20B67808EA3D015355F0888C406D1B0DF6448F2E08D9A164F955940D517A38DF
+F9677BE00C66FF5BC8D722BD91D66D22AC2AE70BC551406C69F9CF4B2FE69870
+634CA58D8FA15DE46ADA6403D52037684CEA2F5BF8E589B23B402C596BA54825
+9A6B0365E1958886E26E5AB8BAF31DF7FC9BC809E8D776A42E7E8DE876BD72D4
+C226133F690A08F11E249AC083F3A984B1D3C27AE4486A4620E14D9D6A361F3F
+38CEC60A5178D8F91893B91AA2D5D8FCD1326079F29E439C5D2C7ED3F5F10B4C
+A29C4E97C111E18476731E0013A0ECCE409EA27077F35E7F0505B9D49F2F36B6
+4DBCBBDCC801645163D605A517866E71288130609254E5D4BC3743D7A81729AD
+501A63E0C74EED7E1AB6D1328C67236F9780E50146A5DBA0BD8A402FEFD5A6B0
+956C11C68D14796CABBA701AA133C3432ED4679526DCBB089DF0F4C6780D16F0
+E90029530125B39047E4DD8CE1EFC7ADD58BA85DD905807468446504DFCDC65F
+4BC08B27AA069C5383128B36FFAF4A06EA758C511F6048D9E5389A2F6066D7DD
+D1FB36F91CF9D555934DD2342322B725EED853A189C698331D26AF00B9D600A4
+EACA6CCB05E063BB7B9DE8AB01CA4C071F31279524C18B52A9F92B7F2BE7A2FE
+FA88112F9D534284418689A7E5A8DC2F7E03B43544BCFEB4B98CDD23C4D7A48E
+457FF99CF93866B0BE306783205E3C525D1BC42370ED0C0643C57CCE4ED2930E
+6BDA7B6539D9A4BFEAC4FE186CBFE3C728D1DAB5D59D8E542CFA2154FD2AD3A7
+64DC84114D21E4549D8F6E4E2BA469C4D86987BA339C9906EA3408481198E71E
+7FDD1C135105790A81918A00920B17A56B11A78605571933BF450B408ACC11E1
+6D18B2D95188A2E878BEA4BC99CE430F3336D11B4EE22B72D7AC4A095E34DBD0
+14B96FD5A7CE5851AEECA990F98FE61214104B1CED07FF1648BBDD5C9E9F9BA0
+EFDD2F3F5A9CDEF9D514AC81EF0194BB22796AA1A86A04F77EAC27414E94D4F5
+FDB66069026628694DB03635737D4F51ED68BCECD50AAF6A24DB6E8B02D83A6E
+6C06A2126773A1898855138F8B98E5368486FEEBE7548A968DB773D3E2B31056
+F217B22DE4E359BD03B38653F959790F3CDAB6CD89DB03B025438070C1C4C3DD
+33F82E6793C7B922548AC44BE5683E28948218D1DE771768B4E01079113772AD
+6A9C99F07AB2A10656CF381D58214C821846C049DB3C4D8327C1C6ECED879CB8
+54286708A843CF50D9BC0F665CA7FC81774C8E4FF3DD40DF528EBB1EA735B3FA
+FAE0AE213414C3D527012BEE1302C7301A8E20CE45CE52430CEF71DDBEEA9CDB
+83F0CB20D791183B6BA77076BF912A48F200EF883CB1A28944F6AD9E19B139A0
+39477AF27ECEE71A9CAB3A8CE15F721E65AEE8D97D281BC2D1E8700679C46D37
+FA193E8C3B307E013AA5473E32E1307F296AE7A69B467B502752133624A5D608
+011F4AE60E1BF61463E862D182A6C782C4B0FB86D6028578F317E5AB05D2DE98
+ECBFD98975BAF5C7A30679179E047A1E382B8515EC3F41793BC3A9F8C86B2B86
+84AE948763AABEF2AFC145EB1E978EF2152F8927334486F9A9C9082BB4348795
+478E42B197ACF9AD0D51A26F0692E9C9F7C802ED28E9700C3F5AF42AB9AE5983
+CA8A47B5E286F8E47B05F344DA33CB13C65AE17884A929F5681CDC218C128AB3
+601EA443AD09E8907EEF59F83D52223EA7812EECD8E5A49A8DE58AB7300838EB
+2BFC53A28EAF747D4D375EDC1B904C705F4A100476F6E06855452E1E7A89430B
+643B6ED36DCA4E4EF4C9B637F7865303A5B32701CEFB270B2301D97A4DA4DCBB
+6695E94D42952F1D135403DF65D025E6D86299C4E56BACD22BF8D8418436F380
+C34C7C40E583B8FE3D4176B905828D6FCE052D0363F2C525542E5F0A0B25ECE6
+DB7C70809D53562B48A65AE5D98E299881F30FF096E53E8876B2C18C88706363
+B7EC370D953C44BF78A10C9B76904191465F72B1839940FC5568EA58D62CF1FF
+A986F9B187FD03F8AE785B16AB08A5E4C37022B79E96250B31D55BBFDA0D8B20
+067CD1E1C8608EC14B2A1B46B3B7F6A1A694FB5001091D797321EBFBF1708097
+D4AE6AB1C315FE5BAFDC7BF2FBDF894973BBF91EBB14B0B850551CB23A4BCC39
+0F5F6CB3FE36DD2FF66DBAF8DEC16F99910B7D856D0ECFE608E3D8A5B018FDC8
+BF9B929F25DEB245704A546A9A1AEA30062141DA6CE80BAC951C432726C5C91E
+A5A23F31596799F6E675A932A0338F0CAC2F52331442FFCA5B1570A498ECA353
+C18AB67E8164B828A21E9E4FEABE3B94882B2E819543F4E723C59C964A267DBC
+A2E8EA1D48018A4D4DE7608A7CBFF01C29C4AFE44B2662C0180F0C686BE89B81
+30A280D61C321C67B2A6ABF1209D03F16C05539AFD90DEA6ACE3AC539214BB0D
+10E39EC438C3C952399C07A96521C42FBD1EFF57971D7B06902D9BB9C9E32629
+FE2439769D67DE7103138B5C161E8D58C6B01884C93C2D4FC8DCF87DF00128DC
+74F6A34F7CF4719524FC8D28502115EBB86938CDAFF00C61D70EE4E1CB98D1AF
+436197CE8670D99F6CD73828CB3860D34C9B8B49089129C71DC3B4BCA918CD9C
+C8B978011AE713105AD89529EBBCBABFD85D629F058BBE9C14169B7430C835F3
+6365DB92E8514721DDA91B2EA0BDF9C9297BE12E2897F59F5C6886BF8EF6CD90
+62F5364E2D4363A7A20CCF26B24016C260F4660DD823E7995F575ABC3048E8CD
+EB0E3D0EDC1CEA4F86EDB1EB6F46EF5CE226AEDCDE6D7A9BD142F87053581082
+168FB0FA1632F6304772F83781D5B797631E3D8305323C28F8096AE577001EF7
+CF4B69C7A31DC24D9A22EC0B9352A35DA0284E78D342059B2B87E186BCC06D0A
+C2B459EE7B3506C9E79C72E4B3FCA87AAE77183C14FA5BDE7BE126AF47E16A69
+2C1F50361E8ED35D6C77B0BDAA18C12F219741838E78E2E721275100BBE764AA
+9CFD95728F9CD3BB344B40ED7F23B0E89A8AEF47ABF898ED6BA710623652EEF3
+9E9FD89221B624C7B4277A4AA45FFF8147AF3F68D5A7AB0C8C06F122DF0F9733
+38B1A96D51633848FFAD7DC260BD09936BD1FC0ED1BBBF67ECF2D2CBFFA77D88
+82E4DA43E68A11690B477A7D3B2B2E404790C1EF1A58E898318A360B72BB87FC
+F5ACF9CB294A091162A5F0F9A391C8EE2BEE9A15C36AA99CAF216C1506B1171D
+E20E627B22FF9C685ED7D9CD8924258C4CD490F72AD5A488402919E2C6ED3864
+2B9C54EFF3C03DECB50DC1D48E1479AD4C6B5471103E1903365BCC84DA4D04B3
+80AD01F15F2BCDB2E341064184474466245E44DA617B24AE17C49D57F2CE26D3
+2F7175D78255F7195EE48400BFFD86B99F7AE62D0CB70E72026AFC38F1D2FB8D
+CE7DF49602D24BC8199199EF5D9706FC24E0A57F7270B70CC5976B9A6EFE8F00
+B0CD1CD7131651D0230C17C02A844CD9F4BC13FDA70F5CAD18CFDB6C62FBCF34
+E56579BB8D47053A5C3836C87A047C99D36EB2B66F89D8887F3CEF292EC6ADA7
+3299ED6C5F12ACD7D952E6E7824293CB993E8A68EA874501D84BA68A264C82CC
+C9A99FFCCCAE6702C9D37B9C9BD9DBC1471215DAFFF6FF1D0890733E3838AAB1
+31D94D1719B35DF54F41F3C1DCC65C138714C350825746ECF14A4C5C80144E7A
+4A91C57217C2BD91D6869B38E6FE2D2078EDE5266A3CBBDC8CC625FD5F1575EC
+FE57CB298FB7490111DC9D89F6450D8DFE17B478B0BB2C49EC8DA7B66B2CD6D9
+6BA9365A3CD1E90D2DC12FEEB38500CF56543D1AD5B9E8E1CC0C9A2E12CC988F
+47B5A75A6FF8C047C678A2AA4E8947F1C96F9C0BB8C2B9589404594731C5B18B
+EC8E87925BAEE0D39BBE9D1435305488DAE9BFB681558654044C27573311E2D9
+B0F5E4F16BAE74ACF4C5F76C53E2212EF9F24B36BE2EB027015860DBCA06F0A7
+569F7C5AEB098039038B90D2D5BBDB69BC563ADBEBBB65F09EA75E093D92FD85
+B94E5E495C985B406F7D41AC91E8404D5CCEC7F0A907C2600F5EFB567C7F2BF7
+95A755C8C121A23F7C91A211D454C004CEF93AEDFC906E155AB5E547F0C48010
+B410F1221EEBF25F4088F72163296E956AA9E7CC5E691D4B1C40A62F21DE31E7
+E3D78D51EA7704D0A2820FDE922964D51ADEA8D0B1D855F8B6C35848938E5E19
+AEDA302E955B25BD58B2582EA770090567EBC1607049EFB639A4CBD3212CB220
+C0E2E11B5694599C82A40C1EA9FD1C5BF91C782A9912715B2FB534013822E28D
+04F7C089CA656D77960368217E0B9D485AC80226495D72F4E29706E714227C4D
+38203D69653566A26033946E71AC51BD78A513FFC383FC3128296FF68026B46F
+6406FB931C699C0EE832519471EAFA2DDBFFE30EC2A34F0B7D0C2D87B34A6ACF
+57716BF296006D7ED48935215E98AF8B79568027DCD643E0E67E504AC34F5F0C
+93795382DFB9E1FD1B1BF12FB5342166D48188B84E30E3BDF3BBA314DA4A62BF
+1E8971BAF7DCD7A1B515B265FC0105E2E647175CDFC932F83DDE00AF9BA09C01
+FB1AFF7CE0CD22A5F5FD4DE0CCD0449735C1E2D4292D4F9B781E94C611126CF4
+772743225EC58DA1100917D45C41819D718CA930786377B236BC0B1EA6020EE8
+ACB3D3BBDF25BD5013A7A61AC75BF1668FD77FBA4F03F62119CF0737ED0B0419
+76308D50194F06B47999F6C354D08B0627D7319885FBFC69328416368815F09D
+DB26EEF2563129A4C8AFDF106AEA2FCC0E6754CE0F71F7DB6F559A70C683A5B0
+03FFD10A4284C9738039ADFB937A91D0C1DE16684B6D1EAE980EAAC05D93D5D9
+B262567864671E796743B9D06C00803B6390D48644914BBCA63F28C4562FF8B6
+20B8B5F28AD2F1D3E28AC217ED0A37FB310892BCBFEA9BD5B78DC8E507E14233
+B4B08935B47E39D976A0DFF3C78F35055797F80D7518184642446941857CA803
+86FFD7E3379ECBFC607EC5B03CC2EB13CCC4A1C2AC7FF94032D005662B432151
+27D3CF031A878AB01EBF4B1F99D8C9D682857399A88481B7B4ACE2F168FA9525
+F3CE2C2C1293386921DCAD7A0888D8E9934D4451BDA74F91774D2FC1699B6AC4
+22BB0E85C1503FF692B48E43F445959F599862D5445EC97F6B9543BB8DF87A5E
+D0F0BEAC996E1355CC2C2812D617842B1C13440B9710EB705419B7E9C7364219
+BC005310FCCBA5C410639DFFF7676D44166848ABEE84C5A14614650BBEEF7996
+91BA6AB25B3D3FC0BD80FF9FFB8CCD4D27160C14F4808AF0BCC62B288CBA9B0B
+91F266295E5148DC34C3D89961C76DB1BE8213BFC9C2259CE3E10C52DEF4331B
+4847AAC71094B1883BF342ACC37463B7E16E4769F3591B426F2B4E3DCDE31B08
+BA838A9DD1C9968204C777034A745374C96B13C5774D7F46C7DFDEA2D8EDD79A
+E678BEE2CC407FECEB38CF5A76F9EB8D67155E5212F77FE0FD17AFD4D7ED1D2D
+CA92E8538FD5152608268CB0A5A6F068F7C0D589F6CEE36634C81F69712726A7
+3393557C824783D5915BA5952131BAF40B28D78A7260A24E399BE1467125B7EB
+3C9E7988E993DCB90B1173D94007A31A87F35AABD3D6986B230EDADD193503DB
+0843329EDFE2AD82DF632E3CA916ECC6AF1E9517087660173939D20AFB2FC8F5
+30E028382687AB6CA543EE1BB120B29A9148ECC9EB08E580ABEC61BBF833876F
+965B1FB64C7A11616D8D7CB6A0A83F08ECDE0499120853371F936F49B4C03C29
+C0CFE89B22DF2705ED6518A0076C045DF47D08C708D13559F50620B00743115E
+301528F33A7865A028D6356DE6B73147FC05DD30EB35521DA418A1DF70E06326
+FA40451E91D8737117D9CE45F039635061F2F33253F865D60E7EFF52C1C6D2B2
+CD3646A717134228CD910A22C256710C8E61F8D0676AA54A94269CB103F83854
+FB64074E1A5D4335EB72B37BB1CACD438EBFBA04D9171CBFDE77AD0C9E12E4C9
+FFA191FAA899BB448B1321D2D8D99D54DD126C4EBD5E70BC9FEAAE644E79DB91
+167A89F2C736DE4E4A760B84109F746F56CD32CBF8846692DC46590479B4102B
+FB1F8A64B613277CADFC500BBAB0EE49BB24B134A5B4919163D15DEBB8E914FF
+A446A5F9E10538DF344392B75CDD5FC72C2CDF999A285C11C431B4F71612779A
+ED983EEE2C397420FD7F92199B2086A5DE50C6152F4EEA3E27C1B8CF908F2F3D
+11C654DFDF2636CACDD571BB10C94F2434D39D6D9AA97B12F8A1C2F5295C4112
+3145DA333E3A5E21253920B698A87521E4DC22E8353FDC4DCEB771D22781C30E
+9508B8D30431483F12637B271AB8BF27FF28658F62CC017071B58634F19B6FF1
+26703703E29FAB5F64B5AC46539BE8F3B8E11385543B3A5E997B6DB4EEF4BC3F
+08251E1FAA50528EE2F35A22D36444CA11CD8F0D4AD0BA9158D300E89E6C56C7
+2E84628C68CC84AA6607D9852351B43CFD29C6DCBD7E7A98CD838A80349031E9
+C8C30D7178E9DA6FA7709901D17AB300C946327F2A59F038FCBAEB5FE6477115
+411AED37A43BA69A99663FD1D6A1BC52F1A5FA757B9DC89AA452493786809D25
+9CCC6A177DFB1FE396A9EC6F1513303D16D806ECCB12AB4D160B857AFF1F36E7
+E2C72C5A4B29B5CF1FBB55B7FCC0ADD70438ECB5CE4961091D096AAD12166590
+A8090AC848F0442E952509F2059ACA93E6C93A62646B06A9CA2F27295DD72025
+61C8190EA2D782A12D98AD1F59A7087AF2F7E6AD183A2A8B131174BA12DE822C
+7ACCD50426A96AF76BADDF9C7E958625324FFA804319305B7C5E5B745AE14215
+517B1B1FB791E9E18E5D9DAC6DECC6397237DD6920D00B308E205493964BB46B
+09A2B35579AFF38D6394BAE736686D89495888079326F42CD18454AF18000942
+AABCA5694EA2B965206CF24A0971C254CA889E5A50CAAB373809D9AEDD7E2F49
+7ECCFFB3E20258D83B93082316E149A9BC3F1952A541F644A91D830410474264
+CB8219D66A87111B48DA301286472E62F68D9ED53A80461ED91A90CA5B74D7E8
+C715F2CAC2B8779E478DFE036BD8228DB056DFCB5E59D0DF7218034573352C36
+C2100F4D8754C41CB15AD0FFC7C5CE5D091C41B7D4E9FF4DAB4908EB2D5E289C
+FE228B98B3C647B12889739F99E9EAAE81C406C71D9BCCBE030FC5630134FE73
+6F462E6725FC49A9461015367EDBA48FED070CBA581C0E75D20ADDF2EEB46A79
+ECF3B1BD89786130D6CEB0514F294FAF1E253A5F6C359068E8A233E0069C371D
+EFA85D0C87012D04CB4A53BFEA47A148CA2B4530A5C40D37BCC73C6FA2BB7C9A
+AA3B6C5DB69F2BD36B1BDE5B739C3645C60ED7D37825F691D3BD58B8ED63A257
+4EB7BA091C66BD98DC9772179B0AD2FA4EEB2EA8D61C332D88B7E60D4D2A7C22
+80ABEBB582F7E1813E1448000CDEECCB85D9E135D7AA2E28D867F2A87F902F28
+36155B7D0DA50E56464765D7CAE2232CEC8BB7278F69F8631B33A40B2EC09384
+4DBA8F6999DDB77F55AF8E1C7F7646C66ECB86D4DD869491B457E9CB35CED2D7
+F4173E894210E65EA08AFD1EB2810EA4972658C21CEC80330D7DB5F2A07CFF6F
+343C3AB0930F392612FCFFF26CED13A711E63C591E0A592B00E2453F982219CA
+5C5ADF76C4F697E9A73C992D1EF01162D36DAD14DD0F6D8741C2E08FDD51A915
+B964D967EA8752012546F5D2056761F7B694C3DF915432944491EDE756D01997
+FE85794680849A613C1CE80F8BB514864A0340CA0AFC2BC750CF8DC0954B6DBD
+A97B1EE3D8C2A7DD7285F2CE0F995F96BCBA3365F2247AF9F6B924D80192A70F
+7EB242BE6441482A83D441856B528AB7606DB5E14C5790140BE1918EA5FFB306
+10E08F80C9E9524F73FAF68D5BE79419343B3DE032706EA272603056DF6A821D
+C78B5F703CB38652482F5D7DAD5D5EA7AD1F832596423EEE9CFF1DDD2998511A
+C43F3A71CBA3A5C14B3B2297A77DFDB49B940BCB3F33A9C4B99F26CFEAF818E1
+5D37C5D029C9DB979D89DFAF55D253E0E6629D9E2E4C5764DE4BEA3CFA6AB185
+F62E1BCDBB2CEF688433229D07BC458C4DCDFC3CDB17C8E288E7586BD7A4DE29
+E8A092A0DB26FE23060477AAF5359A558B9E79BB6436F2B181E8B53C4174AC79
+5796F204189DDB3C0156E5675151D09BB73DF17134F7575269B3C22BBDC58104
+12ACA2F40BB9918FFC1D77160991242FCC4AB7044F7C01282F166B3E9B6C6B50
+B805C828695555413CDE6DDA31E83000B76C5FDB3D30085E6F02A8F2CD1A8213
+2ED5E5188C18852BFB629CA6237F7B6C634931D90F5C183FB880D96B8B975DEF
+A29D427ED88A34F09267525169EE575AE043FD180E1A793372A551E0F4DB7EE1
+4B18B770EC4EB043067D12C17D147207190D0C6BF8723DF89AC1668B1953608A
+F1C5EF65B80A76E34DF9A77BEB0C70699B75F519C80468313CC2FCA9E3CF42BA
+1302BA6B3970C3A72655648C240CCE5D75EF67F49A2EDDF8624A2B7521B888B7
+AC27EF9CDAE54040E6E7E797E18A3FD149F680E6BC5192E0F067CF1DF6969D02
+CFBE9CDC500ED58B2A140BCA75AB5822B2F1F34D8AC3B3ACF2132A0944D5D912
+33923BD27BC6CD13DC87361F5D03186727F4FCBB03E24BC1872CFAA635014882
+0F3A790BCCD88F22F49F4EAF8C56955D3073132CA2F1FF89F12FF67A2AB9A80F
+02C257BAC189E1907300DED6A5D946A217AB4372DC64CF596DEACA9A85833E9B
+1827EA876EFB89C94BF9FBF31563169C31F5420F6D10D89DD88CC87BA46FCC87
+761E9A50E32FAC58648CA233FEA7EA1C3EE485214E0AB723CB192F3C46004010
+3F9CD7382CC394CB4A85034B2D0D7C0CE9DABC0C73FE7BBB8BE5C4EA27C2BAE0
+977C4C730F2A37981137D23657218BC8BCDEF4B2806AE29B135525C17FD4E8B2
+D5673C58F6DEF3D1F11A7E8416268A3133882BCE91A97C3F4F07B8560C918677
+C9ACCE4AD07653638F9F03BEDACA787535C2DFCAB3DC3A4303F7553989AF6FCB
+8D4A958EB5A3A6FA666E7A1A7AA41427AF986DB990336247DDE616914C4F41CF
+5549DCAD6C3F8A80A01108069974FAABCD6A372E7A4DB8A62CD1E052218308D1
+3335F3337E097B266D683A5305D0343F6813B0D1F26B118ABBA30983DDBED252
+36479186AE5CC91E4FC060EFB1FE70F9E8F1B450893D30B36E6C5CED71B45DF4
+E586FAFA0D9AF57647728ECC16025916769E84F870FB9CAB10ED3AB674F765AA
+E720DD18D2FEE1DCA40BCAF1D3F8D0D54B20B12E1DF52D625277B49355FEA41A
+8366EB9C6336F2030F0D9E7E467BDD8FA7A1D4BE6025E33DE99825D9CB401164
+C2EDDEBCCBAF38E74B4E41985087BAB13883F205EECCFD674203504292518548
+401E83A377D3E7E419C2D4F86456C059A1CE971B02FFA0952F361FB758F413B4
+5D9E783B6B9D5CFB6878EAC6A75CBF4ABD3BECD01F162ADFA2987DCD1CA12F0A
+10B7B4E153743E3B92D13E6378F770CE2937CB185BDB4B53963D54E1421DF5BB
+AD6AEF0F6702EE22FB980F24B15CD5F961D74D20D66340D37F6A8EEF4F1F19FB
+2529AFD84E67BBB1BFF305820F567697F675F0E002F4972A48B8A52AF5A98B5E
+71811A929035A76A036627A64F5BDF97178B83B1B9156C7E52D278DEBA318038
+8E59DDAFD2FDAF44F80FC1CE7E65F328EAE820974C7FE1BC0AA8DC328FE1C692
+5884ED1E5C19B119DB94952EC58139BD111086D0C134A9B6C0E1A291D5B091E5
+59D406F60AC58B82B6D0A523E7E94C53F6813F79B0FF1267B751FCCF9122ABAC
+72AA9F993FA42971B30382637C2A8EA8BD1567BE6F24C87350F581A0F0E3854B
+2893C37A5B7195AC467155C57F7A0C94F87102F98EB370D6C16D4CCAFEC2B258
+62A53DABF7A892D8ED0ECC1BCA5D78933BB69B9355DE8D7A3E297FA4AD7F1CFA
+C6A0C8E3819BA20EAF56487DF5A9FF545B958F3C9F8B1DE57C570D64D97C6396
+AE325AC12A5102A49D683B78A1FF49D16AE237886440B31B80A5BB3A15ABE827
+6524120CC5E432226F2B74BD6B24B2D285D95A840CE3BBEEF7FED24C2FD07D57
+6BB486645F60BC180DBE5EABDEF926E923F405270CFD781C2205D7B68E5A7BF3
+AA20A4961C3178420CE6F76ED017C5B23CEF6C66125F5642EA872103911A2951
+01DADEF025A53FA3C798183ACFC3CD6C115EB9717D36D1F293248B94A5A1B1F1
+DA51EDA82C30FAD863E0AF8DAF85AF76B7C49BC10ED28BF794D8122A54A5BAA2
+D9AB4615290010FE370158A640137212E93BE4FCAF685FA6C257E350E3CD021E
+F8E51CC1D4E89A72E63E6B798ED0A4C88F07B994EF8EC79FD3559DB99DC9E501
+235474E224DF5E3EF7B72C7EB5FF2533DF5265E2047323F9E073C4C098F55CC4
+F291C9B403FA7C04B0ED802F2868ED917EF69F45E4D95600BF425B8A62968D03
+32F5E19219432CC55891F4FA758943F337B8685DF269425F97ADC08EE9A35C45
+788BA07F0914FF05591B82EAE3DCF106975565EA089D1A7BACED9FF13E29DC06
+4F3CE6A1E3CAE3258426214A3D98F7FD59B78BC228B5D26EE0DF1848C2C135B8
+365736967E5F2DD98C468B5ACD2E1C5C51A961C98F7B043C47B0586D54EF8582
+7420BB57D4C6C7C670D16492A757D7B49ED54A3D1A95EF635F35E99F21C250CF
+DFE05FBD85576E9D7CF3942B870610526C130FB83736C0766A3F75D7EF20AD46
+DE70D0BB071A6156C4A4CD1EF853A7DBE6F0EF405D97515816F305001A0B9067
+D9A4025585E6CD0CE6D215C3CC7C10B0FCDA876810A20C87534FE9818037F824
+8D3F10FBAED0D281F6B455FC91B7253EA61758E318E724ED441468A793DE0020
+478004FAE5A78FF9B6F35AA3EAC21527A7C1E754DF332CE26EF004111CA4D791
+0787B7C7539A2AE35E48D7D6C28702B09187557EF3097E06B53AEF62048023A5
+19DE2FD4FECCCE4B945F7A90E38DE5C7C0E1A98F8294271A0234D735EEC3BCA7
+9544B1A2F7C0A934B04D6F2E1F19CDDC2B060F309CD5CD3A6EF9874A45DBD0E2
+51E52E2E2BA358F7D7D7D1415FBC788F230C17BC8E233396F121BDBEC3D2DF25
+FB9BA0FF917AC8E885481BB8F92A964FD89FA52CCB97BF4090896E1B3681065B
+FFD9B517D06A0B9FFF6C4E16984AA1631C4521488EB01F645B3BD1ECA92952D7
+229117E36331EE347A81A93A61628656D50A2C6C149DCE418D4B8F5FD8E68042
+B3A25C5B2A310F793D479E39F31BB5AB901B7513BA3C61F891DC1CBC2613C777
+E47A60B1EBB29D3D1C695950C365E0C3F13994ACA6F79C812D3DF88576EBB0EA
+C49A0C4C94A4B28CC6445A4E2ED8D7880D1FD473E2A62AF441633CD7B880DDB8
+22A0F54F963F56A38CC334337ADB163F5810DB8B478D432B99864DBFFFCD9CF8
+4764661D1EC2090EAE1A05590C2C48C7851829738234FB4C8E36415369E85719
+EEE6347675672DE97992B294BF1E501046FC1BF0EF48B746EA2BD8C277C21773
+406D0821424F52F967755A2CD99883EDD26F4A2F83138CDE1A9DFC3D85580E60
+350CDB143E479976D252AF123C9D03A7B3068641C950B90AFB26A9625F1909F2
+700C5113CB19AD7556BD54EB9BE6DFBBF4F4926C193802B6F61847271661D56F
+A4DD2537BFB0E5274CF71C0B159BC2A624BA9EF265FB55BC2806B5A91DD33F1C
+A6D98BB3B5390051B750383B707B2AA6D6DF26FBC1959A3438E3687E75E29376
+31FA652F12748C3B49B43C1FEBBD00687ADDBEBECDCEBC0DC1A940ABB1FB3F32
+2D46DB5455F3204FD1AE17273DDB24E6DB85417184C9935937332BDB8F115E08
+E8F54891CD1D64C94951541C296AC30DF00CAB27FFBB3CCE8402DF81F9CEA1FD
+6E04991D688114D018023694668911E06B29E020FEA094577DAC47F10ADCE816
+899B93115B1AE91BF47129A7AA5CB9C11654386EF9819B666CFDA0773A19BD32
+E2EA8E225747899DDBF6A10411AE29447CE9426971CCE0A5BFF7B0F3B1885B41
+4887CD11240ABF1F9F390AE922C049040C5C7CAFEB76BB0C1833C68D5AA59193
+D484643C90248AF23C0CC645045BD0CFE07A8FCF4F6CF643E5EAF566AFA702C3
+8FD22DE496E04AB1C4234AE5B7B7088B92D2AD2AACBB8D1F21D896AC099E3A80
+CFD75DE424F8AADF45D1FD52D240384A469209A5AFBD4EB47F6F391C5DBFB7E9
+36D6C9B923B43458474D510E4FC8F206353ED27101F9C5AD395FC7184782E80C
+0EF532C0AFC326D49A5A363E4A271AD388529B1B3A0DA25E27E116F282D87ABF
+320BC51CBEABF7B580F41EBE8F35B6C6D04D0A8ED6384B8217175DEDA617FF41
+E7EFC2C4DD7EE978E45495656C39614F9C129A75B0A8DC6A801BCFE9AF5809D7
+607DFB1563B49A2EC7FBAE0CADDEBD561E1E6C5143A22DF0DE9DAB834B095D70
+532852C47336F8DB56747ADE28315C5877E7B25CE4B3F9EB3B6659EEB0875A8A
+D78C8240BAEABE84B14ECB5C927B3EED837A9A6C105EA0C3ADF011474DB3ACB9
+2C5106FCC4CECD37AE11669188B553B8D19BF69896DE8F8974A73798B900C2F9
+BB6A1529ADBAD84A77EC86D7E1EE235586F54B6B6E12DA0432E4E6B15F9EAA58
+54ACEA0F332CB4BB133218B9A1EA0982FB1E8C2060EBAD881D8E0E89CDD8F1EF
+9A2B346D99DDA2347402F60638211263BE2EC6EBBFF8286E9DE03C7044CA2664
+C843692695475D60D325C46D8E6263125B70572D5B6CE75A6D55E7F02E746581
+5210E04537B45EC6B3D356AE83E64DA24942633EC35EEFB29AD01520956A34A8
+5F188CC020C5B5D8809403F3AC9AC67D1FA1919843CFD83A8990E89E45A07658
+F06D8B34392C44DDA5109A0BDFF6038A421223B0DE8604A188B40CC0236FF76F
+213BC77372514FA46B833231057BBFE73A2C60DF37E592FB8387B62150E089FB
+83BE288AECD13F6B9E4AFAB9860BCFC54F567DB1A3A992296FA72F9F7CF1236E
+CD4A8350FA3718C056786536C9585F8EDF06BC8B228C684452513CBF13FA5AB0
+6555D628BC5DC83C5EFB9D4E3843618EC8A1C2C80EDED76CF2162779BCD9E9B6
+AAF63DB3797294EAC1D1CFA70034CF6504EE792D4AEB0D268B31A09B12D39BBD
+B0411CEFC45CEFEE106C10865CB7AE7B1786F39C0BB93AF3FDA169E556CE3010
+E46EB2F6EA196A0C91EEE784D372D9EEFAA4A4E29ED940E97D1FD4796315FE4E
+5DBA57EC20895C32F37DA3327128C242FD357F68AE8C17C599BEAC615EC07268
+78D4E2179600E0672EE605787520E8B370567658078A379CF6437A7D2D6684B7
+9B9B155D30897740E4696E90C5C4734115153849F10D21B5D031CA61F1BA5B30
+C22DFC777CC5D5056B5FDDCCEB66EF1D37916398FB231079281D8BC778640A0D
+417BF9DD81E8D1DD6FFBD06AC6F7196D12F71D3E34BB9251EF2A4AFE4FA321D6
+F6227A4EB3660AA19D3F96DCFF1C0FEA659FB7DE881C15F7C65B76CAB9194B56
+BD1AA0A2AEABE2B5CCF260D74926831663A9165F95C178DE64153FE87C323C44
+692970FC8EB7ADB1FF6D3D4932C7D17D000B42BB579D1EB057C63894567C9896
+38A37897AA765949AED2BAD425F4F68C51E3E1AF0CB1CB0CC3F0CBDD72EDE2ED
+E50226E68EC8FB46BBC06BFF263813FA7B6E564DDE31DC482031B19180ED957C
+B68B6CD679326C478D5D9A9DB92B19CB2C662679D6B692643D81760589B7C211
+A71F69228B4A6EF80AA4D3C816525E1B589A15F825653201A8230C66DE7EF8A2
+33B3DEA5465FACEF0757469521C59FA932955A321AFB159DC42DF603BB449F19
+BE418B859D45F9FEC1B218465D6850E8F95F1DCE44708225CE2893DABA8F651B
+FAED8FCB4142D9BABF7FB71CA8B8C42B51F8BC79F5DF0BD56868C44624A6243C
+532EC4412C580ADE86D74377466C7CA13E6EF1BE45805791DC8C25D7B6FC32B9
+2021C842497995F60B67309CC132DE74EC422D7CBA71A1D0DFDC772353F08E73
+D333B1148D2ABEB2881D8FBE18A49476566F61593DE423E11AF90909B949D3B1
+0DFA96D77CBC1CC3330920AAC7CE2DA6456DFD8D0510981AA923C399FC3DEC55
+2CCC5CB34C81D21B8C6E78E529B6979AD17547B164C1D1D756DE7C9170A44396
+B5183E2F47B265EC4F5CBDC9C3EA2D68198772053DE5FD985B4B9912399F6A81
+C4C37724FA73FFAEDBAE3F31BCD6269FCB4E3CBEE214E9D46BF1ED0FD38BB385
+72225D7CA6476A2EA62B9E5780FC5AC3DF591F56261EFEBF59B567D0A9C81B76
+D88869088CA4C1AAD0DE77ECD53461B5B370F93558290AE7FD5563D16402ACFB
+A635A73EC6AFECB0F10F0F67AF7039B3F8E2DC7A03B7F3C50FF6C3CA4DDA95BC
+7416FFCC10A615B1FD4252DB7DA19833DAB0C79F4992DB442F2A1E20A16B412A
+211CE3661D04FA5E6C9BAE3437B7E0DA579B176E1CD6B5888BB4ED30B66C651A
+91EC753E6E672847FDB5F3273E55371B247F38C3F863B8391C7E6731C25A10BA
+E939C248D83D5466BBB7B868EC3B49DFE4904A796D26C0D0EDBF49BF0627BE51
+DCAB5D752D318EA1484DED9C7E50FE4C5F89F3A39DED4C781A17501FB5159314
+D26E72AC51F03DCE4A1534233A0FBE2F18E9E812D57323A7D463BC4394A721EB
+F4A7AFBF4127A3EDCB31BCCABF8B6E38553116FC15FDF323A7899AFCC3C61A31
+38E292BCFCA7833723239CDED4C31F8AD1E91B1A46D51D7480834CB6BA824EAF
+F468B832C6F59254C144FE56978D68A00C4D9D4FB1BE356543EDB9F71EFF7297
+D689EDC87A558463A913D176881552360C5322BB70698F8825D40790811DFC07
+CBC54AECCE432A0F97A63E71414964B10F330AAF531DA36B0E70364066EDC970
+A52637EBD8FCA59AFF1744F5B46AE79FCC86E31BA883012AF7033ECB43C8CF2F
+474887951DE88E3288936F9CB63ECCD381F906644CD4036D3EE056A6E26D52BE
+C23C2102AFFB461943D393967EAF80E1422E51478448C211A0D62AA97A686DE9
+6B21CC05DA1CE1392FC7C22FFC4CAB08C60CAD17F8DAF5B360F2CBC2F1611A62
+E704671388B7B5B8DC1405B3239085C2DA2944401276904B000D46A5808087FE
+3B7EB5AB33B934AC0E871117F8F9AD77F9D4C3C9ADC104BF7E6B53EFC37BCAD5
+7B73A3BC2102FFA686E1EB8C784654EB18C7AA971E30CFD598B54BF11E1574A4
+5A6E3C7EDC4B000EB802A90F9F2B8A9E3CB1476382542E8BE4745EEDED3CC1F9
+2E757983F8837517D46350DB7B463E0AF5EC62D99F161E2E6E2D5D31C9A67474
+0C33287741672DA6D25E4D12569BB09A57D05D77C4507A36BA534833046D5A58
+88DE60F1E3B475BF6645565FEA080C918E67AFBAF673B83A89C866954B2709C0
+98D93B44FF3379952A5C3E4F063D3E2EA07F67B2B5BF9F7202F4AB2DA5543DEF
+0429F61E4939CB9C41B86099F8EF62F5E80FE38139E9A75F9EF4B946F775CBAA
+D31654675CD0EA94A63803B27B72911E164560D5939111A1D1B579F80509F8F3
+A3A591E530F12741FA5C4673BF894005FB893C2D725CCDA3EC41429383A4D6E3
+0E69E7DD7EE8481E237F5C3B3C2EBB29165A7B672C8D9740E07F10FD04479236
+E6E61691A73374537DFC2DE078BA3F4692D06FB08EF2493633510914649EEF10
+B6DF07297D1C28BABFFBDAC287F83D9CDD071831E1688FE2A62D654463C3BF1C
+574EBCB7CDBAAFBFF43932F944D130FFFD11C37488E452D616E745D1F4AFC58C
+5417AF552DBAC64147F87AA28A04F8C1A3762DE1E9ABE6CA61AD64547C637D68
+0A954DA58CD646586933FD73C59B124CE7DC09A32289E13ECDF617084B05BBCF
+8ABCA791092C9D2AAA654B40C9F3D3101A47B7EA53FD3D3ABA444ACDAD67F9D7
+2F6CEFF3F06C5436E0D541A145DCD80E0DB56D966C563A2CAC59D7B64AD40E0E
+8BDB2952F66A77C6C2B2F59F59E5546B67F9753EB7ECF59099412A91A5E02DE7
+B42D80C851690AAEAF4ADA1785BCDC63DF7A857C1DF503315BCB9A48FBED6624
+C04373553329C2E2D7EDA7FDD877EEC15EB9CB4C32BFB2AAB37187E6F7D91554
+2BB4036E3510176A4CFEC4A6ED7AC037618D0B02F7E4E61862A5D8C89CF7B69B
+3CAC808DB6F582887113DE7E70B0A833831A6250348F19493BA4619D4E9AD23B
+356FA36E0576441BBA4ECE8E15F5C4AFCA524FF9F884CA6F22D0E8457EC0D7B2
+89B16700323B125633B5E78762293B5FBF0A3783069568099377CE17A2671292
+FE5C91CCAC9308C94266820944001038809ED5CA1B80C1C5E5FC35014F7CE5B3
+94E5C4C513DB75BCC1D616A3C952DE3370FEC7EA89AF705A1E035370E3695233
+F2AC4D0117290BCC7C63D930187290BF470C9D33C980F62A79862F5B722A8DD8
+5744A2271E7D2D5547E0685E046AE1B99FBFD83FAC7EEBB576FEA7A823FD665E
+FC5FE7C997AD1C6149B8494C9F508A1F29E64E8C636A0B570650425D4CC6F803
+5E8060B89ED4171442ABB578BC9F7DB9F768F110BF55B63AE8B1561650B6F11F
+974D2E2E2CA973C2599835523278ACE31B11CB208AB1BBFC342C653266768B1F
+F11C9D18A3125F364237560ECAF6918C66AAB987B0028C4AE5FE72225755269D
+A2A5C843B134E7602AAC47A5BC6881C111F4895CB6314F12AE0051B426FE1F4B
+2F6916CC6645CE8E4A636BCDED8F542679842582DAA3C10E7FE83018C84BF6CE
+7728F9FF32D39397C4B73BBD6EE5D9D13BAD2BE727A5FB89654767010A8E6380
+959601231774B9371798797E1AE5AEEB8EABC2BC9033BFA440A6895E090321BB
+2B02349DE3178B6A6EF649644C6DD4B5942881F6A35FA2D71081028F1D504AAB
+123ADBA4F0A59E8CAE2565A62E21C13464FCBB0DE37957F3EC66332DFB2BF4BF
+943BD3280E406863C8BE266023959B99C969C2C2423C9F7D814B82D56635761D
+3E026A163E3BB32C0A97505B9A87CDF5D08EE112C00BE377E170618E59897378
+A2026BC33EEEAF1F902194F17837E6D14273C1B23A97D080C26419F5E68F8378
+BA223CC1B29A0E488F21C47462EE2ECCEDDC58D4D6229CBFD7999F8552B21B07
+26592F5D4BCE67F427F54DF72C87DADEB1EAD4684319EA39BDECB65EFD9C67C5
+EFFC1C9171B05354BC769B4E0609E10884735700D01D3421295D75D4DE190D83
+90BC3F9EE03E97BF8FD273B50D3185BEF5B0EB32506F51335D8D555872182830
+1213403560F935CBF17B30B53A5B3F422F770CF3E0AA964B900635519F486A2D
+41EC65C342EC235F9DAAB07AB10D7B0A15A231538FD107651A4964B913E77C8D
+BF49CFDCF4CAAE0B2E3EE0EB06792C600811EE8890DFD01598B272FC8E6686C4
+FC425EE1519C372D02B0BBD58647D5E39E243AAF08D90F8092A424E2167F7BDD
+45A95EA8E04E1B966429027E6467416C98C89F16F23EE1CD6D5DD6856927E845
+20FEA2128528DBF01966CC8DB433C9FE3E0E9EB13F23896F84E369A9AF0E80FE
+D193C40C072D71D85045E7FEF3913094D71B84C8304154199B7FC2C7F278CCAD
+899A3107F56687C26A9F60557ECB4791CA4CE7CB6D7F6422AA1EA6C67C2D57AD
+2F09B3BEF09D36187650743D8A6A0FF16E88CE09728EC77EA0507EC8817AF105
+6399158B4C7AB6DDF3505A20880483579CCC027218CAC36E5AB7C4EF83743A03
+EC38E97E4C4FDF1B35D8548274DF1713E509BAD45BE78A49DC41D9341AE68D3F
+D9C5720ADB1D7077223F85E73B7EA8A18EE0A44856906C89842A0E734EE7D3F7
+5C7E6FF3524DAD3EAB6060F37CA8DFDDAA9D7B248F3ED84D4AC20D3D7D23496C
+61C7A315752E2906B0CFFD0E70D1328DFFC890CB6D77A9D8EF8C205E3E52613F
+08845C54EB98AE98FA5B7099211542FA54CC5D6F75FE3DED541B7565C656126A
+68CAD216C1A3FA9E8F72DEE7FA7C5AD5136044BB161023C701B55F483BC8155E
+7DAD9D13C9ECB613CB6D2EE48C0FDAB9FD2610B7B32D13B27E023A5975C776DC
+265DD695BED2DB7F63390B6E17810C6C84CC11748E49ECE00AB18896726E9C1C
+2BE9ADFD635FFED6FD9E3A319DD43560DA9614F896D762062C1E29A8408B1642
+C5FF316F6F919335C06369D9C4A83EA7AF7C30BBF5126760647DD964516E1BA8
+E24EF01EB04F20764837F7F5A7FCCED77389848E276F71F05DF88C655AF17437
+774B95174BD8D8B77064B87B9FAAFC461331EF0558F3B48E2004C5541ADA5A99
+A8C27FD3A67B18E8EA02CB2C28ED4CA3ACE3F456B509590BFE9F74F73C5CF180
+4323C1255EC01A6D90C5F25804E066B4497843CE0954133D363BC2B224549568
+1660734AAF2F36F4310DF330BDFBBC7D8A49773481CB4C9E220D86F33A07253A
+114D59D15851E63826920182939AC067D72A3AC13A279460F7C45AC519C8D413
+C8FEEF16ED896E8DAFC0AAFA8531324315A736793F0C6BEE37E9F856EA90375B
+00BEEFD6FD020C5C867950B8EE72FB0313B52D405817C4DABA49C44687FE6C7F
+8CB2D791B8268E8E6E84F7444A2D5611D96FE06C8D26A200EA644D7112BAAB4B
+2113F0B88EAC26D30E928CE19F1C0540F0A0D1B86B610A34494231FF64939F1D
+774BB1331A19BD8362EFDA7871B334F20E3421D7A36B38DE952F20E98D74028D
+5D076873146910CE272F9C22072AC3FDD68B4FADD7EF802375FFD8493AA5C52B
+54BD781D1B8252655F51942526D1415340CD45F9BF03ECB5F04B645879D617CA
+62E9B669DF2B2D6601AEA8F4207C0A5C0037EE3803F809BB12AD45D4889CA54A
+D60C06FA1577B206CADE0FF82A43D64F4640A98153E8518EDF8835116D21A87C
+F2406FD91D70F27315FF9479BC139C41ECB02408417E82A50A7A369D739EE1E7
+92524E23CA98C9706FC6007C2602B526AD5D4999C58A45BFEBA601FDE6746BA9
+BD6911DFCDACA9CB5A7E98EC1CC3B5BEEA50D99C33A514BA7AE8760AC054EE49
+5AF381DF0DDE1407A875F507E0A251BBB4929F987DE13245A0694FE20A77FC44
+18854A70B761B234ED078EF1E01C4AF65B426D4B8B5D0B677BD02C178FD0D9D7
+3D637D18ED510C81DF887CFE1B5179168ADF2A9FC4BC2CA5704543DED74765DF
+6980462F7ED8A555C59242F229689CE69CF6C02BEC7CAFD901DE76BAD3567349
+A91478177B804F1D1269E60D86154B7FDF152EF501961ABFF65752E91292B0D2
+1C16AD00A93162653338A34A851F64A843E265EBE373858298931361B79B6DA2
+DBD8BC513A6B2BB1EB207261B54047F34412C059DE05C6A2EA8971424BB0AA06
+84AD5E495A41CF9F11A844D22A805385B27FCD507DB9B5B9834EC15C047F462B
+63B44D99D7CF3A744E6528D738A3D42AE696191B6B6EEC3389748058ABB8A3B0
+B161E749539CA01169A39B16101EE2EBAD18F62D7D936D2979BF49B92ED08268
+A774B4121EA592263B367F3FCB7B89B35F72DFC85F85193B8EF32EB07DF86FD3
+6E3E8DF750C199322010950F09F9A3626121DF00EEEFE761C19E05416AB28916
+49570B7B77705906630E72BD5C12C99B68C09C00C43837F4CFA8715EDB4128C5
+7267F3FF652C858E3D2A8349B332E3BC2BC3B2F82D4B05EC0E5520B2D7235105
+51EFA9BC01C096A492130ECBCF21389E5BF1D2DD2F51245E47CE04E684A0ECB5
+3C517EF74789773889DCF605DC459E9DB154C3E171E2CB28B171C8A251595F8C
+89EDDE44A82C9F6349D51418DA47347DE4C2D8D58FE770574B409A4389293E60
+6E5AD82E2AF14DFF39A7332F5089FB957CAAAB4EE0DEC0C49E1F60CBAC617445
+F22E290834D513B248653D348E0F735BA046895452B2E091259E615C45FB18BE
+B00B5B8DE4AA1AF2025EF1FFB46AF12DA219772D7FA2D2D9DA29860B5C0B5C0B
+F87D104C167DCE484E1834CCAB2068722B51AA1C287DA9BB041C3FB12329422F
+B3B4D3413946FC5686F9A3C028F23305DAAE24901649B535D3A1D24A140CC6F1
+A098963ECC6D302BA9501B4D9CD0AC35D30B33051B190691253C7C82C43ACDD1
+9CC5A439590BBB934FB917A135EAD27EE431A2CCD999062AA58D70289E60C04C
+99083B7F7CEE37370AE49C85342882348661B1344790E6B15A26DE133342AE03
+140C5A9D17C96AFEA55747425D19AF523A42AF250FA448CD3E1ABC318A95269F
+07F72C14C466E0D2A1EA73262FCDDC95BF64E1904CB1DBCF751C748AE8BF7332
+F99ED128E60D4562A163FEA253F955CF0E61020B03AABCADF923972C8696B9E5
+5965A516773909AE218CE76507E734E5DCCD2CDE4478D956319FD66AEC8C15BC
+E421B166D663A1D143DCC8FAFD843D60DFF89D32D9D4AB29061C3E8E7E1FD89E
+065EC49781D209B5619ECC2C0A9B0F155E56DB3DBA50B847B0CA06587B4AEA20
+DF3F6E220EA5843DFC65600398989EAD4F6632B923C583D0FD4D57E9723D42D6
+420D9189DF6064E2F7CD8FF0AA59375DC4E1395787AF03FCFFD59FDFCEF452FF
+43E28A9490EF824BF80D471F2C5093885AA41DC863EF777730D074559739BB43
+EB84C8CED352384410B018842B453599909EE6CEAE259C96685BB1E5C08B7968
+82A00BCB0C6BFD57170F1DA7EF8FD41097C8BFE09AC3EEF9FBDD8DCC52E71157
+7B3996B93612F4B65FE0B7CEDB5F9EE91E77D7AAA3A3C8E6DFE4AEE3BAD2BA65
+A3786CF3EC4A3DBEA0BFDE3ABA62DE428E032B3B7471BD6CADFA8189FC2D52F9
+21628DE7E96AD5AB9F57ACC77F9B73A9F762E8D1E492BF92D42CFD210F7B3F04
+691F02C13AEDF69B0DDBDC417B3A12B292A8B41CB22D53AC02189DCD5D7142DE
+CB7568FD3584F6E1F134FE9251056E4B8FFCF06856B9E30DA50EAE765348F39E
+4F6EE206B73B4F399244AD997F7AE0867C78126F070E000859364B690E72D492
+CE00035F9F8341C61F220F27A29F73776F542C939445405CC670AD753248343E
+12AE1A2016E87A8861F05B7ED2FF65AB2E823C8D8FCBB3B65E0E24864D97B79F
+A94B489CB32EA91176D5C3D170F7DEAC36317AF5800B5BB0DE38D38FBDD75D71
+B2C45D2AEF29EE2F1F55E2C7BCBBEF114F801A4A8F340E3159EF67CF966520C2
+6FCDD2316112BA45E96544A86D3BA064E674ECF9FC71CEBEC0678A85B1229CEA
+6A174D115B6E834F74DC0E21BB0FE151482CED2A5E037ACD1262AA3979FA4604
+CF5C2E68C657967B3CDCA1AD9F7AF8E839639320D24FE4C8FF25F4F8CD459967
+E154862952058FE33E16357E2C204297AC81488E33B76DF2D4F93B1FB8CAB223
+B998577B7FC6C8B4AD8B5321AECCA360E98D2E163C3E4DBB01B7F8E02B413A50
+2EC8D14480849B85FC391009C961E2CBB0820A2DDEE153A29B727A4547EF7A4D
+40310A9CF65D49D68860D5161A5F4F32A746F8A4FAC234EC6C515608012D6AD8
+812279D4364864582CB04D0DB04D7B80F2B43ED41B46DDAD763AFCAD08B10DA7
+4A1BB1280D22A2E538FC8C764AF934494FE22AEBE6845D20A626BC4F9B0F93A1
+BF02AAC68090AEF9462D1E1517B0898B7607FA866104A60B652A7A2CFB9D4626
+1108C550D6BDA61800E63BA5EC8E7035F1D1CD66402686B231AA87C0B54399F4
+A67BE1C656004E34D74031C046CB57B35F3C32AAC4CB9F7757CB35C6C7204960
+975430B63BA2DD5B951EFED5A1DD645BA4BDBA778FD5231807A42E505D73277A
+7C0877821D82F14E064A16474B1D21914EFCF4CBB9A1F4B34E58E98334A0B732
+430CEAA87636705F6CB0AC748AC6EF54CB42C31BC2E9D8458D467E13A6BE6F6B
+F37777185D70689D4AA63590FE4CDD91031F647CED0B09FAA741FD90D7C82A8D
+5CC25897C73BFFA5D1BF67D768563A3627389FE841D286681FD2B507AF80B948
+1FA3F25EFF61C42E1E59FDA3C6A0F5BAD5C23F2470695660BF2D218F3EAB741A
+C0E0326D88691A2BE6715A739DAA2F410F51C9FFF10FA140F18DF3BBEEBAF0DB
+0BDFF699A8FB134DCD17E9E9B60AB3A7B58FD570957DEFD4854C2463A823B795
+2BEBDD075982332BE20C7755907C977C9B5C1E50D824748643748BB8B03EE518
+1DE1AF9DD73D9D40B855C8FF3501092E810A47FC25110B1B8B2DA25D6CDF034D
+1EF0628227C433E48BD5FC7066D091238228AA83342B306C3691BFD16F2A89AD
+9195347B3E5F51F07665D634933A348656C5C563E7843EA3EB7B6897A722BFD1
+14EA5CCFF297471F14486BEB20C5B086FBBC3839EA6929F640A249CB4A1AB38C
+45E76617102B4AC6C0A60701EA17B23C5452C03BC49B03592D9C389B41489B10
+A0956B893D7402EEC055A93CD60B0A91B369022281D996ABB7F9530F520A8439
+C76F2A1BE71639DEC7545C8E37C75D43B35E7BA53D52736A5D5B6231D795D8B0
+66A9A7E2F296CDE2E11A95C7BCA510FE3F3DA0B8F4F312C5D50549DCA50CDD19
+B6ED0F3D9B9266706A430EE505535217D0F4C19736A235BD242B044706B17831
+A4E8A51490796F045104BAFAC97ED33961535B48FE7642FC3A05DBD1196112B5
+00EBA4C56C3E0311E4104E50BDFAF7C98B8FE0BB6EBFAB065CBDF71CB3507ED7
+44AB743713804C00A5CD6B1DF6F3AC3E971937087C9E1B82EFDFCB905ED833E2
+A2ECC8E08775EB081C5D16C3B5CC5B25312AA0680FDB74F95B5B98A56D34DCF2
+7B04A3DACB5DAA21E17F8C13F2B358901AB91C13EA4EFC19EE44A06C38AE7091
+7C1EDB90B538E092A4B41F1308E6DE5769FCE25E6B9FFCE0426119D868C3B814
+3484F31941231BD94FEF454F62A56D08F5D319303B2A612AD68032FE7596CFB6
+916B5BCA3EEF33966B845F3F2D5F0BF6832DB5073FE3808BA5F1D9812091E226
+FC2F3F7F56DBD04BA14D06B1E3C77B7A1F9D9B3E81FE843AA08C650A5A7EA77C
+D9DDFFDFD4D0992A32915E8F162D52127248889882AAB06495D56780BA3CB143
+0A7D0D416A8B8B408E9C93EBEB2AD23FA486CAA8AF348755111532CBBA15DB40
+02E102A3D1E979190F4506447BB063CCD7862C3E842E42C3FAC628A8D283B193
+DCF1B4B5E5F9A8FE229970123CD899ECE471C1AE20CAE796D638F38180493347
+C06E62879492306E400F6643D5E4C05846342436B01287D915CFEC221881B6AB
+135B07C2066C33BB01AA8F6FA3E08747D5705F44C1367BA01BF0882B4128F5D5
+B3D3DEB47BB78E6FA654E56E66BB882EA194DC224F5F156A9AF7B30EA87FB116
+D6806A6A302012E9927D05D4F72E49DF7FCD76D26565DE03B0A2353467BD1E11
+0749F05760AF2FFBC3471E37DC0777E349A5D843B6B2979DC8F9C069A48D7506
+16502F58D9152C391ACBADF638ADB08809F71C647A6C3A2C8326E014215F0288
+D98C51D5875E0EC2C7784FC48B3D5BB5FEAFBF4D6099B903C034300AE4D78E64
+A2ED79053D3E95F08F5FB761C494ECD5E2EC943D8F38086F2D16DD9736D3DB93
+E4EF811A1506AE38F13A9BF5FCEE9F240C9FB139638305C0CDA53F3C42D98A89
+A0EC3B17FDA0FCD8AA28E1555736755EC5B9667E69B1F493CB5130C82B70E70E
+DE8B948F17B04E6B860D2C2744B29F6053F0E938E23CD2CB3049CE97430D6F77
+2C918E7CC58237CDC43B5B4BB714CCEA475DF58E87520EF3072AC90FC2A4E310
+C7D5F6AA831D3804E44237E08C318286A4947E603765E7D1E32F584F943BE06E
+64726A02131E416B04F0D33E0825F0FBC6D7B1A5BD6D2916D098A0F977D29ECD
+B2A6296FA4C182C24FA4356488E81E4144A5A1D40ED97BDE6235BAB6F3CC1318
+36B9B94DFD0C47C3341CD622F4F4DBF5EE98EB43BF107D59C005745FBAC7CF34
+8442F5A76B632CBBBC1CBCEF59B5B99C0F3981378DEC3289211094A4F4D3FA0D
+EEE94BDD5707EF4A94776766C76C85E9D984422D4282002D9CCC760339219864
+BCC23DD9E624B3360CA714A9B7270AC4A6F7CDA7BAC441C684D29D29DCB8A761
+634AC269C6809F99B73534AD2BA27210107E49F65DBBCF22E31F828FB0194BCD
+5D4FECE626925475B43DE7B346AF10893DCDCD9C13DC9111506FB5E8B41A69EE
+3BE7815105A6FEB8DA8C6D7BE2ECD49B7F315C66D212C4400AD81426EEE1C5F0
+193CE191E871D4F9F578518E372033B8121869EE7F874F3513BF81D28B7D660B
+B1C59B638E677ACB4CAF561EEE077ADB0CF64E8CEA0930FB294E031C0BA973C6
+903DDF3F33D4E18D0C55CD89FC109E72AE5CBC86C37EF512966DAD266676F8F2
+6198752E232C6F3241BAC082DA14A68FC89CCA1C3C0422D19BD2054D3B91E60F
+51AB90BF2317562A4ABCE1C96165F1DDAAFE73BDFF939C327550BBBB5B0FF5A7
+3EED7D777E48E7D337FEC7836A7757343A3C3781E99179C654345940CD55BCC3
+681906BD573C7A47ABC7E334899CFA8090CFF0104B88F74107027CD6412C6183
+2AF6851F048280DDF8BE1A2DA8DBC1F7634ED64C3EF0F1A94E27BB3A3E137BC6
+F4211E62F774070DDD96156815653BDE961D5303A16F67AC4AA7E66477973A84
+C6AED52AB10A57E95DAD8F212E5E25BBF0B45CF4721450894F67A01FBCB498FF
+BA5AD16FB1521E3FFEB53E8FE8B2174C76B780DF8D0B1B8B9B3EC6FA9B6AABA4
+8530493A92A904030845A5158D6B3A8247773BF93CE1D59D793575EB912FF49C
+13E0FB588DD61D093D3E50EE934563FF44E26728406864C4C955E58756D217A4
+B9506576819E76B74493C7D5EF4448673504D81E0CB23F039BA9F048073C5FA0
+3A47C5B314F1AECE21F8EB9D77BD9DBE49A2B505DDA54C1B787FCC1B302DC9AD
+3DC9A2822107BB6023F259B3D44F1269EA5A57C457DBAB824EA2F93B046B797E
+4C82F7EBBF47A4E69072D735955576F17F7D3B5AEC2A420C347CED162D7C734F
+3B0FA59774B5266387C5CECC7B5D856059C195869ED7C0CCB66DD20E8F70E875
+BF607899DFE6E1A2858380317E49BFCC0F331A75B12D646CFEDAA09CC28EA30E
+1BB70F720539A60C9348366D9EA597EC52DC4169A8505565FFFAD2D372FA6F3D
+CCFFB10831010C190EF3248898750D45BEFB7B444727F6B45B61F1D10BCCF6AE
+6190105A1B427D3754DD9A4B42BA65F82A85D0A0739693F52B01B7D1FDDF38CC
+5FD09CC00C42529D96579810BF9E5B6ADBB96B8C907E29D662530E2D67BA8924
+C68204FEAF80B1252084E657C7E7C836C65CDDB909B91B9E52E33FD14670C6C2
+B6316D2BF298DA1BF4E6BA9BC2D50ECBAEC0B15FEA65ADA070DA8FCFF3F7C329
+8CBC3B100307FBCE9EBD2105B663A86AC14CA64DD7DF46240F597C693E0E79AD
+C2C6B46AB8966B0500F46167C881A88B9F8943CED18762CE708D053EFF9A1837
+8A542C548ECA7FD8266AF696DBE4823DE65A7381EDB5CEB5338027881A29A340
+2C655936D1FACFBDE4792101E1A2F758CC2DA582DB3E8520AB299EAB77CC0E5B
+5A3F84F0FFFBE93A35D8D903C14D0CDFD9D592AD188FCA5ED5CC7C9F5A94929B
+50CA7CA7EA2B3ADE408FD05AEB7BF322A694DA53831DDAF8299196822D2FC0A6
+91B95D4A3D9C46C36DF6E80B80D6C2982B73DA7D790477083E312EAD31D59AB7
+D172BD52AC99925EE781493D6DF86F174BB6BCB1A79559AB6BBF6B6ED1A3A85D
+53BFCB6E7BC7BCE12042DF6071575DFB96CA21FE03C3A9C7BF9B6D48FFBF59BB
+83286F95D40151BAB0A20EDFE224BE0915ECBC400A0F11E9B7C1BC22C71EAAAE
+962B4E1BB8AF0E7365683A89BFE403880621422684A8A5CC63F6243DC4A1BE18
+E59F1184C6B8BC943282FC3EB1B099A47B3A8F5862F1B159DDFA05A046DD4311
+276D76A13E9E308C28C19A9BF5D6F4DF18DA369A8E9B18A32CF3838B641D8A73
+2421B397BBBF80BF80A197353D0CDFDF324FC2E34143D2C1D5EB6F91DE906A26
+0D11990A96F29B7F3C7735D5F8B9433AF21E8D84C5D7593FDDCABFC6D024640E
+8CC8A1B3F9B05E68797064D6F9D163246E6BA5A5198170406640001BE0C441F6
+656F6A2FC0EBF17E7324FE428EA430B6885A8F100D6C1EA6EA3BBC865DC7DAA4
+FD9FB6B6EFBDC86FCDA11FA62C2E76826BBF896846B90F99F58B3AF125F9DC42
+A7036347DECF0693A058EF45535278B7FB440A07E32DA0C52A0C8F2E8EDDDB88
+E6E97458F2FAC03A7D01873E37B3DE6E6A1125AC5BEF387EC2E9BE91246C530D
+E52F13CBF94C67FCFE5DE8E0CDF959ED6CF65F327C08A915572FCBB9AB6A732B
+289E2CC770A642021106AE8103B28A45FA062E84F1395D51EEFED2D0C2143DC9
+939EB6D57233AA4AE24B347373FF4C285749DC66FC225FBDB3AAF247AD1AED2A
+02CCA1391191DA629B0CCAC3EE434B12ED69DCB05A96ABF32A44BE6C9CEA1FBA
+CEF2FBCD765BAD4C53929015D381B8562E91AAB72EEEBC4E741353964D003DAC
+FDA6F739D211209B40776889B8F208336F24FC402F27A8AAD6C45A5182B1FECC
+EE2BADFDF613DB925307006771088CCEBAF0805924FB298BFA9A5AF06D28D347
+8181EF23DE09F8D8E1C8023988F957A740E5A7586C7DF06995D9820F82A8B44A
+B8D484561A558B896AF8B5D8C3FADE04B2D6D8D11467CCD869B9C6E8EEF793C2
+0529818E6742AD8B226374B4FE146219BEFD5A13E0C7F1A461A8123CFFE79166
+2EE95CBD7F0B29918DAE04E030A1BFFE6BAC8F5F0C3B9407C4B611CDEFFC9E01
+3BF0B6F50922900C431A0AFB51B32F6A2B814E03A17EDE45B3E33A0E1C2FAD2E
+68AE579E8F303E755C62DDC7E417094DA352935AEADD188273BD46E6A9A94CBD
+9C522A4197A0B9C40C79CA656396231D9C609C864A21B1697CE532436B6BCA1A
+B9370F172FAD0E997286D2806B3521E09E19D9F76311D65FEF941B0DCA969D26
+FF2F6F4E83D52D765D218DEF920D27BB21E270E2E7F31EC1849F641AF0B9FB60
+EBD6794F1023A7676A53E67295D46A75DDF7C240AA05730B045E1587CFBEB501
+BB9C9BBCB8C94A1061013CBAD5ED3F02D180C7886D926181B2E1DC9F3C8E8B6E
+FE48EF896AFBEE109300C692D2F94C8A140DB6378D6F294025AACC2E95E9907F
+F0AB63D937C1DD9EF1B4CA496E3FE4F329F246A93628923F122C2C7AD0DF86B8
+53653F52D36AA1F67091296FA55B978990565F63B92E7BF7B4B3D043D7F79789
+71CA93A7146A4C5CA9653C92B172FC275F332B07260A573F843B0BB83CC5E5CE
+EBA290AE6C7B43F3E5CB10BD84D558D2A5B6ACF1A0974EF20FCC824F5B92746B
+D2A517006E707EB44899D4407FDB912BE5F4AF3C4796438331EEA2B09ADDCC96
+F798BCB7749E54F578CF703EB0AD086A6A98E4EDE1118EC76338E3B76A28306E
+B1C400DB863A2282988DAD49F337A5BFAE7BBF6E06553DB67F34B3BC115C63BD
+5ADE29D5E6770BF0A1CDCDD0637B9F877BD2BB6363062B2D6A01BAED65D5859E
+16CE1A4EB86B9998D5D28213EC0E5CB2A297F24250433D61937B607C289DC54D
+E9F7FF54BA94E40865A70273C4915BC17D6D934D275BEBDA3BE285E12CEB17B0
+75F6C87759B2E2E47DB0F4A5BA9CDC8673EABBDEFDD2EB781D9121276371656F
+795F9BE5528E2F56D7BED80C679F996957AD3606C0B1E1050FF62F6CC35BAFEE
+3CDE09668AB4C5F58DD7B68352CACCA2D7CBC3DBBA2B1EC9ABD1AD16A21AD93E
+50DA4ABBA9EB945A93CF1C5BAB83C1BC0A1FD2084A42D892B2FD7A9D390CB09E
+96610AFC7181DB4D25EDC34FAE3B0A8B54D32AFDCCEA649800DCD263730C2C7B
+79EB5117277BA48A4A00806D704C58BE4679C71ED74DD4896A95248B99AC3192
+D01920DA9D284B03D8535DEC11F1A7EEBAB5A209458F0752746E1E80F1096EA9
+B72054460C14CD2DF069CFA77E7A70A366BD3A72CD81F4FC844A386631F2A661
+6C72BD35E2F5568453C1D67287EB4D1F088CE9167B2A9698507CFB51319EB6C5
+2D597A548460FBF527F53D1E43BE94B343F5EE15365D7435EFFBD0FF54D5E9DD
+04915AAB6426DE0C749A0221FB8E8BD679B93519B817938F6C92392F89446228
+57F2C33C867E0AD824B78A81EDF0FBA93F89DFF8A8A832603E6CCC5570EF6150
+B4AC37603D0126D485BEF2C6AB59CED890BDE0B6FEEE1E3DF069B7E62139AD5E
+85AF3BAE0A35F6F428E02FB819EAB7E07DCEEF52A2DC7AFF5BE9C5440EF61C49
+DCE3422CEFCF26721D73F0BB1D07C4F8D74494B399769273C8F3F8E8CFB811BF
+5C52C3B3006963ACF2CF0A240F93D54A62DCC8BBCCB2D9FCD29A2CC515A5C668
+9CC2BF03AE1BDCED18E564CE28BC424D8905F2A495BC2264B19B36CFB9606837
+D5648832EB6D7A3806FEFEBCB37232619AA722D47DD4C182E3496F5FDA769E77
+21F50C61BB6D7EA38412C02767010CB9DDC6DF5403EC5883C345BF6B0E49505D
+C74B68373429C894CC8051B9041EA12026C99F162CB5E817DE3DBF79FAA17FE7
+60E803A56FB1B25E425D589F421857C40AC0DB303AF7EA5948986EA9886DDF3A
+2EF39DE46E24A789CDAE1292D8DCB35FF1457AF0F8EDD204EE66681FD2E0C120
+566AB747A050363BD7F16A94438FA75B4EEC2B4B7BB6E5F37339398F57767DAB
+E217F5FB234595BA5858295B3C17B29EC35C5A9B944C9BBBFD3A1754C95166EE
+1CE61F4125D776618CF5F28929D708A1193944992FE9BD0084CB83D7CEC379F2
+35774CFBA88FA0460668292E55B932B806127E9953A21234F3DC2ED273715546
+478B16A332DBA4E9FD4F995BACFE211FFB648572B4628E6683BB1FCA63227184
+6C1E7B0EEC7DBC12D2EC7D3FDE590A0B1925C581AC460F873C2A698E4F95DAE5
+D52A2872D795687D3588DBA4CFB7D9CFF2CDAC190BB7B14C25A05852B03700CC
+03BBD5D3EB8108760D942FCF0816C642D0C11471864228D073DC6499E9B6EB9D
+8BED6D54FA3EEE8F83D47440F6004A62491027338203F8B8FDE5250BAECF0F88
+CBD9903DD0FCAE0C2FA3848E1FE0BED94BBC52D740C530570142D6849BC55957
+DDFEA6A33695FC5EE51D31582F8D65FB1A5006F87E3C92850815411F9A5BF768
+E78B7CDC680787CA9A418C56B5B51442F3084C1EEFB6F4C1F9584C9ED5FAD5C7
+8C7748480224A4B2F2EAD2D64F6AC26EFACAF1C50D2A052328A56DF2D3522960
+4EDF824D7F9E86318959459EE2501B4D395198562E5C9D53C6FA0F8FE9FF0363
+82197B9B30D56A80A999AA522C1502D2FE6D5DF512704B7FDCB041FEF68C8D9C
+B9CEB47B15F8D7B74CF7D2CF328B4F02AFEF1A2EF6BC1A3FCF1677944562C497
+46A10E744D45E0DA7A434CE2611EEC8056D331BA0C1E76ABDFBA1AF15CEE01EC
+5D43BE452C090D8BCE86A02B03C9D28F7053523608FB56C7F3C865843B0F301B
+2962F17E44EA805DD18DFF5D7B323E733D2F0D47476E0C701CC6CEB3D68E6D73
+4FED816BD6BC3CDFABAD659F39098034A97388B778FD29ECEBAE6E46F944DD3F
+F4A5EE2737FF5EF2FC6BFC7AC13FCA18F0534A61F2BCB07FE1F3FF2C0A708F1D
+5B478E0BD6E28B98EE9AED665B84AEA01E611D2A9C5CF678130C24E86A8ED000
+BD2B002F06420429DCFB092921512AF879FA9D9EEDC6FB1E83464A48D894AF35
+69968A886433EB620A3B2FE1A2EB577B19384D8503DE590B9389F70A0DDDCCC1
+8AB02CA3B5D0822BB6410F69A35C9159CA848B0F2AC5A3F34531E69AC0CB2EC8
+ABC182E05BBF7E1E3EF0AD8C91BA89FD8D8033071B7FEEB1EE932466A7A03547
+31D03B38DABCFD83F4E6FB7C7698FB11892E86B14542F8CFCBDBBE8231BD83A8
+5D9148E6B2C41D20CBF50ECE4290F33CD551E92A28F7BBC7E2D1B4EB303A4AEA
+41D682037B8A1EE6A8146C81FDC857AC9993DAB7E438328EA8CC01B6818CFA4B
+24AB35E0A6C4BB1A4AB166064B195F7F92A8461F982F6EC9595B7A1E36E72465
+04D6DA6A97A9168EF5A252A1C1E5CD9E9810299A105F59789304AADE75A4115C
+EB2201197CD87FC59E5A601C9B66B816FCDC2B23A062A8EA5693289B5256E9B4
+CDC042F366E3DE8511176D560764E0F92BC5E9A1BA1151A64649FBE4C3CCE03C
+0A427E27ABA7AAAC6EE305FB1C1DD6983F026C64CDEE06F57A000682F880283B
+AC0F18194953E96429BF6A59999DA5DF128503AAD963F49F61BD14CC82266A77
+A20B25BE10094D9D91B3E149B523B1A503BAB5B4AE619552895B8C632411F496
+865455FA98AD63A7F5CE08D08C212CAC5185AAEAB87823282A500A1B0530D618
+BEE058F8D4ED61BAB4CF56CBE19E66CC0D2F0C5E96DF2B23E1E750F050162EDD
+5FF3EA8B4A853C5E74BFC67C3B37E44E5CA5188745E5D18D23245450EED4DE2E
+2166A9C74A595E6C7AFED61479929F9860597BC486BAD3557C8A59AD38B1FC17
+59A70D61226D0E83F416F982CA5F8E7AC98D35D4401DD35A288095C220AA2EED
+4662643FAA021E474FC11C0A9601C8CB1B597AB9BDBFBDA9AD2FAD662A8CE14A
+89481D11C0814475C6972EBD78031F2BBB3A96A3C8436FC7E11A3C35654A914D
+E7C83F8B0521B3BFC4A98C87640FC8050A95CC740E01D8769541956D2C91FB4E
+3E4F5A45F76183A847F202D7B63478358CBAF452CF47F0CC26F82893300D0F87
+A8C0FF3E1505943ABE4C725516F1E52B47EA3232D3EFD5EC0D5FD06DBCEA8585
+5179CE8810B64978B9353C1AC8739B86CAC020DB9326BF917E63E1B4C9BB41C1
+5C165DBF5BB76E2F2E192874159CC287678C20B8BFAFEB61F621CB8185DEA0DD
+C45593CD896AB1E3BBE85A0D0957DF2E49E5BB066C6358FE7DD15D861E031777
+D5AB5336D9026AC2C8C3D041B6025E93E60921508C435699ED0AA29C5443FCB3
+63431F6A0341F4157B1DB8A2199C692E6ED6D3964F552BFAF7A4AF424F1A0F11
+5280159EAD178138A1076F51F7EC5C35E318F9B5789EC2EDB7C788D0A6DC9D2F
+4AD61CBC193222A76928509CB73986E377123B4ECC99CA12B6B627F3BBA93276
+C553B701C5F879E4B38568A77012B44AD4514EC0D7603E742C842D329B629B79
+BF38C72A3F14BD08CADFC25D7908E0B1D83715A44AD81368629E51CC75586357
+9B702B7761839FE17D47C63ACC701B266AC345F1AC15F3C30F0F5322E9310054
+EEE5C861E0071CF161E47CE6155A1BDB6D938996F3EB83BA923950FC90FBA41C
+9248A881226BA32174F85B488F3E710BB7D2376E371D23BE051EB54E15E22796
+675FF7A2BD540B119C78790E0B8C61FFE7E74E2B18FA0D5A7BAA2BBBE9B969F5
+C0D465E11D8F6CFCD8A4ECD536A7F477C86CE7D6561F3C17C4F70D1F7FF4A66C
+E315BB44D8832F9AA0B35974C9B0B741E96B8404DD9C835A476239135463C9D6
+09ACADC65D032E88A9C0FBA78C6FE4F625DF242383FF689322796F9003B66D13
+B9545377F48AC0EEBB187564E66F2A56C04F8B3093B5DED8AD536499A921A231
+765CB71B84DE828F905EB87E3A2B86DA1508A18788825CA0FFC5E1473015686E
+A24B2CE92F10A199A71FBFD56110E7FE7B4AC102AE7A03E65E8CDA68489ECD60
+E8251072A2B61EF9523BDA385E64EF7DC05DD37730B7BD4685755C58391EBB3C
+91D2E04C0840C80FB77B71B8E28F43BE6C7F54CD3A87EE5F07820F927EAA1BC8
+0BC5C897B56B83906F35857C0528044D4CDFE72EF613BD27EC286CA90883F5EA
+B50FEBCC77961B3B7B2A3C95127A697A1BBDE0AD2E485967DA824E46E982E143
+A514888D5FB0DDD91E7D216F6B3D8A92ECBA09B2F1493F520D32B16561603F59
+2A3D4F272BD7E802A871A190944C9329D2FA05F16C278D071B00CB25F3F5005F
+053683F8213CAC1AFA299BEE16F2BEA5F9EB512D60295D216F39AC080B2523B5
+2CABB71A1384F1A5915C255464AA7CFD008CDC47DC9A6DA83B65B6A5D121763D
+61EDEB73F5D1C7556C66D26DF92F853A665AAC14D074EE1F889A0C21348151E9
+231CC55FAAC46E267C623FB80A647FB7C8EA853B1380C623FCCE40225793D949
+49C0434E4604E86F46686EB9B95C5AB739547AB0238B4AE798AADF5D07B37126
+5858C1EAF561017BD4ADFDCF3BB5ED00381BF1638ED5241D6CCC706667E6A00B
+B656856EAF809EFFD856BD53A3FC2710DFB05A0E174AE941A8D60AE698C7DE72
+DC63147A6E9968E8F58357C12FDFE37E3294D210019B402A4C37F21CFEB68ABC
+E68D16E0E69BBB3BD3385969AEB2E4E16651659D31BB700A4D19CCB5CFE85E84
+64422D11C64113BD309CF149252FD5C0128AD0E70102B3CEAF21792699B4CEFD
+14B8219983F1E03F2139256FE52D837E8CA3A010B683D72D041D8055BCEB3942
+8E26C359BAE9B98B98CE6661F9F03EAC9930F8F26CBD4D35DBF12A828EECD77F
+66A2AF677147351D8EE322C049040C5C7CAFCC4374FBE8A8DF601C79830FE6CE
+2BCE4A1988C1DC1C063CA77CBCF6DEB93F01516AADB40629040B2BB9762239C9
+BDC49BB22D7DF3E3764CFB26F6AB4E32F60367C229B6ED37B3B69D7DC77CB752
+58B17DACA68EFBF15219F8644A06E87806CA9F98C44707F6CB21E91E1342E3BD
+7B2659D95B6273AC59078BE16CBE957D9D6B9C24CA9FE2C3BCFEB0A27034624C
+02BA674381EA0C652B6128DCCADCE4EB7069C9E67E96EA3A803F2D0392FD6914
+EA87C90AB51314E25C0CA722D9EEB6063AF0484DD6789D8A6FB1FB6021FFE6D1
+A4F5E64D3D944B44CDEE76F449E3A19ED9DD908F4FF6C1FDEE709526E492876E
+68ED03B7D07186AD57D5A39F79D56443236DCA1204B7FCB3C57D0D20070F359C
+F4CE4EC541CDBC9C3B3467CE5412371FEF041C5E2F3B0B5C2D020815ABFC26A0
+C2E9389C2B8B44D4C628E69C07712659B261BBE1CC681884F88ADFB3D44AD4B5
+F4CF7CEB5584EE640ABCFC226BAC4DBB478927FA2AC5C2968E4838C380D8B7FD
+054DF20862804848359518F189C62752C284867B8CF9A04E332FE1E3FC91864C
+76CA71B1FDC80B13654C7D19B68AC039590937B75EDD0863B62D7D8D123277CD
+4C97B1366422359DAD7155A816F0E9001DF0D1970A345E4AFAF3DEF28F81C7CE
+868ABB2CE5B2C145266A71E05DFC1FF79005D9116AFCF4F4C0ADCBE7B9600E2C
+295EAE977AF481DD81D185FE4A9533DEAFB4A95A91F32A00DDD4807D31B834FD
+B1CFE04F46368E939AC6F1CEF3472F2207135CC700F053F52407BA73E7987406
+E615265C624084368AC04A3666B290599F630C25FEAACFB0F42585F644631448
+79A839A9E8FDAAADD135345A7A69EBF2BBE571DCBF16D6E47BCF65059F71742C
+75D10900D875F2EFD9CB7A1905B63FA05DA0A0413009976A176B83B4A62D2E21
+0D86ADD86C4E2EC9ACCEAF1C5A0A19A1330CAAF6C223359A96DECB2F7CE50870
+647BACD3241D90E8850AB5E8EEB3DF8F9AA8DDD65CE046B7E8B29C3931350463
+A715A39482E550A7FC99F4F24560FA1B99B62FE4DB22DA4D3AC30955E2CC042A
+8F6E3447357622CAC0C961FC4C5EE16CB6BA958EDF66974AA94FE167DE4AEF55
+A59BC805AF7C6F00B8E6A81CC4820762C25577BEDBC24BFC65317D3F95871963
+B1AF96D90E6731FECEAC86368488B4F08FC7A9B4C23D2D9E96FE4DF19825DEA3
+6D9FA6F70A097E55AAC73D3778671B1442F9F81BD8DF5B80344D2F92CEA557D8
+28C5BCEFE5857B9B3A73351B4CA89C172C881B9BA568E9EF1E008A407D9960BC
+8056D9BD08BB53DAF2A577EA903F7E07B8E66FA81D37BA9D9967D43D7D411072
+462370676C259CD1C6C99D42170157A5D739CA097F1BAB77D25B11F63BB897C9
+EDD1A897380917EB694B9A9EDDC1BF72DEAD17BBC01475D090685BBE646F5F9F
+048EF97BE579CBDDED5ED2343563B24D73998833113FB4BF2780E6219B029041
+B7E508AACF2CF9F3B2D1C85290E5344B5C086678E5C8D33C99D2E13B40EAB5C6
+83C8213FF27BE85494CE767BADDD084CBD56E8CFE8EDC9DD3E22A625B14B1CFE
+0F23E0A45165D0B1ECCDB980281D0C39759E46892734067CF3C136CB2985E870
+D3E696D2F3432C4AEDCF7F2C724CB25913949CC417135CE988774B7B21661B02
+BFB37039C04F20403C057EAC33C7AEDA89F66ED53ECEEDCAE68554BE213F01B2
+0FC9D1AC95EA7720921B514EF49F58BC4C8833E7B862DEF57C1F2C7B10FF89AD
+4A78404133D02EC9B4C5D772149B516557A94C342BA907C3AE257B98A44A05EB
+48496A46C8E86874E1A4B84EB034F4E23403D733E5481F0F235508CD13BF99D8
+BF26939A4CA00F13449A143109A2C0A24EC521CC6C8C79BEEE2D566B487B78D7
+F8B30CAC371067C70D71A0A93AFD0D6EE568C98AB4559E3976271E492C15C678
+F9AD0109EAF8778855213DFBBE42CA18A25AB94E1F4FB86AFECD6F1DBFC023E6
+F525D79A8CAE50A6507512690D2DADCDA47E5317899284C2D0B2E6FF8A211CA4
+7AB9CDE6DBE438C0F0C076CF9FAA7D28B2D46B24358762E9F6B850D6FE2B3878
+FB03C70BB29D852EFC0F928582A49094AE48CA7D0FA0B1D20DA43A9EAEBB4F9B
+5043AD9355589F26202AC6C31EACF8C8C8F22F1C73B94C8F5DB698E081FD3BBB
+717DA3E5B0CCA33FF975725075C1682F7A6822A9C68241AE8CC93E97C3170476
+B17BCDA45C98B306FEAB6BB8E97833E70C0B5B314518A0433DB6CDDEFFABB2B9
+A221CEE0AD8E101B9FC42700EE65922C82D1831E1747234EFAB63982D92235F6
+0C4DBA8901A60E1BE04516F3A682438E051743524DBFF410B6B784F740B8E0B3
+9CA6C7029DBAA0E681572624406F2331C30251990B7BFE9ADA2061E4BAD72678
+637F632290DC1D987F2D6301399BBF70ADD40456D212A0BCBEBF947FD0D26107
+01D1037BB5AF3A3119D6967592023D483D463EC7E4474E1925905C17E7F7CE62
+7693A52CC38DD1FCCE98B63554379C03E033768C861C4705416C5E583CF3554B
+6BA4A6006C37BAA69FAE8E6858DB6E361DE2DAFADFF82EB8FF4C476C316B3500
+1E0BB925D21C33985F00223797F1B109253E41BBC99D9DE28B98301A77F2FED6
+1C09AB94F1A922492271878EE90437FBFD202AB6C3C8B6E66A80B862DDF9D1DF
+CBF60DAA668F88A1A624B91FAA8BD574961A4EB0BEDD209376C4174C55681BE7
+D71C0AD813B995508530F30839DCCC26001243A76F96AEAB5E1B45A182D7D3FF
+00124EA41F312422029232F71275F1D60FCFB1B6D26A5E09CE796D72791F3E71
+1B075D016C6A2C119FFBA95BE034EEF1EA78B5F520BCF583B284421CC65992B6
+F319DD039753EF833F450332B056A04A8B3356560C55438755D2842A27281C42
+EDED9E7F7FE3373F71E69DEAECC43A5F585D30F4C7DAF77FFFDDB558D6DA9233
+F8A7504E4B80DF76850BBC3B0174D1F45C3F70869957F82B0DC22D42426EDD7B
+9943ED5A17BBFD3EAA7AC9349E6FF6DE3B7E88CE522A399556B1DDC660E89BB0
+07458D0D55A51EA83D00ECBEBF007D509D0F9DA7328821D981F854D9733BBFC7
+79DABAEB9B3CC3AC69AB9D187DBCD03AE29F2C43FA4A0C5A4924C6C0A8A1E7A2
+25682D001C1A3BDDDC1FC4385B9F217EBAFBA7746AF6CD52A5DD24980B8591E1
+827F57943538CF2ED56FD9D52C5766B5A3C25B36DE530F532A795A8E464FD9FD
+BDB86793EB23221790692E8F6E4C4D5F88FA8C96C9AB9FCE3BAD899CAAFC0D2D
+7305885730B68040CABC1DCC1528C2DDDB37B9C9681B7E021E3190F0AF480ED7
+84E624376C43AD688D8E0FE302A310D1CA0CA912941A52336F85F7429FFE4560
+E082A1A12B75FCE9F1AF0B4642F96BCE0E61EA6798E7F8D0F0F4D7CA90F757CC
+3009A5D0897B22FCF894E3B0F1163BD490E8AFBD523F10696534A77BF17FB139
+909C1C7A69A48BCA3E8F2274F2C3063F1FDF0905BE8C162C7D790293DF5DBC9F
+9CCF48F98817AA69E9E9BDE280283A137162ABC9B27B0163E67EF310B51B51AA
+DF31943B3557785D5FFEAB1B34FC368409334D7DFA24CF85833783C7BA801BC8
+A95DFA28402DFADD12EB9D4B1F6C3041DA1C87563585D1BAD8AB65F0FCD4015E
+D21569A0AB4FFDF3265E1BF3F7F1A43FB96CBF13B905CD46C3571EEB02A3190A
+613B6FA912368F0099F30E8E64FE899411E4C072CB63E2C662AFB6A0EDC2F082
+1009F5681A23D7460BDA4ED4F9389A2FD7EF64DC2FA9B2807F2B307D44062371
+3AD4C8D327120BB9061BEC9A5834899896A9638D2F846ACA0462C9C8279E0AEC
+9FF78C7D6BACBC7D6A15A0F3E48A7E1B43265201F1484ED27410A484B38D6465
+9B2A29BA97294CB5DDF0099DA4727B8527F454F37004BF9C4901A378E1A623D5
+33D9B460D8E182691B4D8334E836942B0D34AF6C992540B4E092E6A883337DEE
+A359B9492BE06E8306ABCAB5686C26AA3C1FAD4B5A1313CD3C1B4D0EA2CE897A
+E1DEF890B729BDA6DB9EB328D1E52B4F999A0FC3ADFB787EC38BF65A3FF04FF4
+5521A909DC11E204408FAB630386252D62CD3F09ACF2FDF1B29B40695F1836F4
+2ACCE65A6266A52353665E65CA65A9585701D3389D23299D61A687A6016C6DA4
+B7E24F5E9F570B480814923A33193261B00BE584F9A35B92BC799B0FA940F4D1
+5A61BAE6E7F6ECFFCEA868A6FCB4B40C0D7F0D43A42DB66A287D2BA92A6C9ABF
+891528E30DEE34C8880AEAF2EAB4826A28E9F7097CC376579CDB7000111D2E9B
+66AC6207D5DDD92096455E86DE62ECD4C6219401865F11B8A8EF73000B5D3B61
+0F89405A82ACD6A8D675C44920E281514D16C177882518FC4532B2AAD2865270
+B26D955148B48478631B7493D5D68B590DB12BC72EDCC64BA4FD2186787BC161
+CE587F9F3E96607541C180114B16D058ACC89B425DC8C20165B881368F0E5292
+F6DB2F8350080072E258EA2C5E85D6419A72BA782DC01791A4959F08B2D40057
+10711744CF043A4D5E3ED3FDFDB4A5ABE1D842097380AB8693DB90A0BE28DDDA
+9C24F9446632F1CDAB75FC2A6234B15FC294D41ADD6C6E95B13FEDFD3BCEBD3E
+7BDFBCAE303B6A8BA181EE4B4CFC4C20432C75CE5323525C671AD4042519537C
+C934C699D9E00D605AA1F8A3635116C02BA07760B62DFD50D059CA88C69569E7
+194FC05579C53E8D8D9D3E9C0D43364C99401CA56A0E6DB8BE22D595E2D2D4E8
+6A251F9E9812DF3F355DBBFCA7519C53DD3C4B7501E11455E87D9BD6BD9B91A7
+50AB44142B0D01E7AE2548D0F544976E0172A97114927B0C4FBE9043575A730A
+3F3FB0A81906945BBC36CFD6573044326EC43B5D42922956EFE60888332A3513
+0B690D4E024A9A12175E39D5E5955790B9E5AEF3451FD1992079290DE16E36E5
+E6C6347F3716CDBBE22D39605A27024E5D441C9EFD849B02A4E43E4DE5425CA9
+6B6BA2C8EF676016432D4AC709BB0452F072D6039F7E33C33B3E8E1ECE0FCEEE
+2F6D083786DBF65E62D3A4D31C937351523E4851DAE2B60C7DC91194DDFBC13B
+353710E9A471F2830667C837FF0C8119C143144FF8B392C2BEAD2EC5F7AF5EBD
+DBEB4C36781BA28CA854128182F8D21760044B97439FFEF7C16A06778455687C
+9DB73A44DEB241F1FD9A5F57CA2D810B0DC8D3E0B87C242B916F68DF74B6A46E
+BA6622BDE90B6660AB6AEAFAD5D1EF04BE006193194A295B0CBE5C45750C5711
+A338631906FAF7A915B1FDB38BBDD3B4797B96EB4C816B7F13CB803E2B1DC5BC
+ED66B603C68CC23E3125FFF102CA544EF9ACB8289C19DF24A9589147392767CE
+F2D9B47CBEC2765B6D2E9C40B67534C01B94E07A6991813BA31018E86803440A
+C9DB6FC5AC8B0A4C6DF96C7906DC4D3F51F99AB314959EB94E82A1A5B84DFEE4
+D10E438ACFDDAC92486835C46E120824D0B8ABB3224B94091845A22D15600F0E
+5AB1B4C440529CF7957FD36BB2C7362251FE12FE59EE41F2FFA52236BB97DF53
+C29F81F4805992518E02D747E802D38B8E689BB503DE7928634D64352ABB3C68
+A073988A52DC63E1D606C18D68A95BB4F3D1D26799EA02101782CE1154478B36
+F4C0F4C72C032526C0F28B0D49ECA060A031D84EA9F5C58E38DD0E5C36F11BEC
+C5D9DC341C9161F092C1602E2BA67C1BC76938569701CEB25780E1D346582C2E
+716674ADD519D650E158B257D8212B9734BC1777032AA477429750BCA4776719
+82C313594CCA6F1EE1424082A43699F59ABED9D6416920DA4B69DB319E7CB0FE
+73E46699B31917C1453FC158262344098378AC2534954D78EF9B6B73B659E07D
+94B187D72A93EEADFEBDF1C7236BB2DD4CD70D79A97A92E0327177FE0A36AC5F
+5F396F771608D2BB8D90A349833FF2DD24CC8A46E8EB6F36B31D3E51A060FFB8
+FF66AEA579648800CD0C8A9615C8E2D0550523343657D6D509BF7094065EB390
+5643EA96270B1EC6D338602D8C8C72FD323E97319E7E4CE802CCF245DF7B11D6
+917D32B6B7735C3EB089A1071FE012C72D4336EB2B68E2BA85677F919401E5CE
+442F3CE48909B6AA122D9E16236284A571A5A3FA0923FAB58EC8DD172B2B29AF
+5A5251BCD86FEB0EF87F77281F686C1A14C734F4E49C278CA38ED3A5C0342CAA
+19CF6315677DCFF0FC76759A2E08DA2DCE2783D4B1B9284DB4F399A78715243A
+2610A4B1D34E3A6D5B0C42D96F19C4392A63186D941FBEFE74A2F20FA4B5D998
+5ADC9CECB760FDF57BE53F057F726F164C9072BF499BDDA065979014B83E7A2D
+DB24B70426BD9CA52768218CC89B3CBF387D550669FAE2FBEC1BA690D2D1D104
+F4363412050787C325B900B54483B7EE0B951626422963A54006802FFEC1649D
+476A8C4521CA07C68EA0D74150B1840DE5B9A801E7DF3A8EBB194B11A72E8409
+2772084D0C37AA9A158AB21B49EDC3EF581CCE7AD4880F17897CD61511AFDBCC
+8ECAE00DE43CF21A4C69194BBACFAD417C93A71A350CF087B77A96BD7EB9A198
+6B01A0929D968BFEA348475803690EC74ED1CA9032F4E201081FD85BBC6789FC
+4466A642A99E8F2EF742E5DB88CB2C8E6B1F15A29A2D25FC3B579F6DF6713BD2
+B25CAB08F81350C31E7E0FCD7DB5B9CBF9EE07778AE32322F684834F2F223D56
+62491EC149964AD940491C1FB4A5BDE45B8A81FE990EC816F9C3BB17F1D5EEF1
+FBD54785D787F6544A2429D7468878F210495BEB13F3429B8603CB03D1AC41CC
+82A29B3A3E23ACAFE098BE5E60CBAF6651CC765DB907A81A0C9AE730EE3C1170
+3C1CD8B5E4BE68B705502D97329D231AE9C629A3349F3E88270692E476E281AC
+92C364493BFA024B5BBF34C6EFA6995735AE972CB8652AE61331704DCB10C42E
+3B944C013734CCE07A91A4016AC624B5EDDC2B49E633F6C7F11A8F3503277ED2
+AFF98C4A3868C67A4960C760456420F4EA8C28606690178CF6335FCC01251EA2
+93A337B0CB1A51A1234DA080DC0209519A1D92CCC2100BEF87597BDAD3EA2B74
+27FD9E35ED1CA16FEFC86C087251BE83D80234B6EECC77D19FEC8944D5C344F4
+CD89FF27CE457C066F5104C627D4830CD57DFA3D4B416444F4129DCC2EB064BD
+D94E6888F7664817C3332FF17759435AD4E95C1710D0D72D6A7D7CB179D3EE53
+5E86BD4993A87996B4E793AEE530D6382AA59AE08898DCFAB4151CCD6F99AC59
+DBCA039FD79C24234CB479CF85BB7F99B9FD82E8BDF9776F7FD5D5C03EFC90C4
+4E3A016C7E653A1870DEEC325B2A08B0E636F4DB6949DE052FA593F7125B0D4E
+177162EB4E6AC264034C82E33A04F9850D6E1DD28E26476D46CDBA5D46F4320B
+01D2EC7EF1E108C82D64169243BFA6AA10A6CE9CC9225FFE15F71E1059D7033E
+C49B110FDEA14578DC663480A9B753495FDCE6881940D94C0891A907E0E02F48
+F8B2F61DF35D27493CDA6563FCFF9FAD1A2E41CB27E7A1B541C16E5489525A67
+50314E35DA4C6F2F82EE6C482B72537647F88A7A658DA89FB03373735EB1A943
+58765BD68F9C6644A01FE7DC70CFF3D2FDF5C3A009D37EA018D70BC3BFA1433D
+064E82206EABCCE150D784C9DB26FB54D3FDE40B8D7002ED0006FBB3A8D6AC76
+90B4362A900AA027782E6E31F0C53CF90516BBF375EFE5D0A40E27DF4A1441BC
+878DB3D53886E0746DFCD8B5111FE0AC0C96BCBA37077381E72194163E92C7B9
+7AB1731086258DB9A87F54CD7E58F1156020C7F72BA15A68F0EAADDD80B75523
+5367EE05111189354281E390B4E86198269B954FCD9EF07F9D957AB2EE67FE9B
+8C6DB530207753D889DF381D2E4AF823716BF9781DAC4C7548C385A62CAA026C
+CA5FCFFEA7FBF09A5A90AD09DE2E96D03C0D17ACB5940F94450B6C6663EDEF8E
+1613B93AB0D980F5AD0EBF2158D816E5AEA6262C4CB6EA4A01D1D81713B879A8
+BEEAD737A0A8684C927CAB5AB269EBD1A65109A4DC373149482B82ECCCFA24AA
+54D04084C229C625FBC19BAD1CA67EB23A0F9F9F16EF1566F5A29F8BC28366F0
+3C0164C58BDFA577C564BB2AA923DC5EEBC1A48F8C67B6EB6A5787003C691C42
+FA13C71EA7F6ACEAA29E1A6F0E7233FF9DE42D5E79433B5823AF41A99C4FE074
+E669EBACB04C9E7992A3739EBA956EB6F385D20958FFC2FBCA7E91C36DFCFE15
+5B78030D92EB4822E16EA2D5CFAF548F6DF59BD118987A35D67D67429FDCDC16
+A22EF6745D7033896A09F3DFDB36CD5DB2172FE15D4651EF4E871A9960CAECB3
+70E3FC83CBB5E1B22C52A46F1AE96EA361812384C61EF14EB326026ED0B94CA5
+A94C62E9B9817FA83DA4DCB60CE5746EC37F2C235B6F411BEDA030861D10977A
+A36E36720694009ED6BE27364F02A28BC7BEA691A5F7FC5F0610665B8B98F183
+1FC074B69C33CA23457F5925174A23B267EB85E9A9DF7FA7C1D3C3C9BAE34053
+455486562EF6CD906707A4D771E19DABB1B057F04D758112B2ADAFA1EDF3C3D9
+2CD2D77D61557E1BCAC2D756DB060E9D2834B41E6DDB87ED4827324D63988C24
+9440A816C9CC7B59EEB52F89863B27068111CFEA00EA162C2C44494E93E2051B
+ECB2577F6C3D9F2084C41E12070A8FEA78FE7CFC3B2AE181E1BB177E2F33F061
+9CBB7F4FEF066E63FC6038E43CAE90A4EA7E6122395BA10C730064E67C6CB284
+65567991D64C5BD47025CBA6EA0E5CAA111DD891C383CBD8E688E767CA0EE879
+9D60F259E539595348EFC1BE7D46FC67226F1230B6E16F59A3913ED0634FC1EA
+98962C1641177C618E38FB038CE792B06DBCEF5771D19DB5CD047EE9670F4508
+5E8CE0D6D3986F606A77C7BED728D7F8638087E3D5D7F76E1833F241EE14F6A6
+EC3D76588ABDA5CA79668DDE40F014CF285B5888CAD8489873789493DD3D27D0
+0A9299E68D61EEB26EA367F1927A0F8E49977CA12E4C7F04BB77FE3069130B1C
+4566B996311AC6FEE5F66561F5D2CFAF31A8ED3AF8897BD1929EBA5D09D03735
+E3A0157E61A48A05B5A4F1CE6916AE4C51F8E81EA6117D663E34E5A7222748E3
+8E46D64D8D458AF7610A00861A66D1D1BD47F9A37CBCC7A0DE20F66B818D0FBA
+2C34E6A560216CD2384B5C58D4C2755C8FA2FDB66D0AE9F5AF647B5E0C30430D
+9903489714236607C979F2E12994DA64794D4B4F541B1DBC252F782D007638E6
+14DCA8B2738BA9243D707395DACD052340EE41E0D481282AB40C0D42D0185E7F
+AF03C64FAACB36CEB3BB8053D3A8AA6C1D5626D27E93CB0CF2EED4A9FBA8B910
+0A315118E3BB6B7EA84A817A728E065624ED0AB9867019A358FF6E55FC6872A7
+33E8611EC84ADA92E51C50427AD3C22684A54526B48B2C58CF7570BDAAA73476
+CC26A3D36302F349F37DC5AD02A967626B10CF4AE6DB99C18C6F71C44446BF4C
+A682CBE7658AE83374D43E5CAD63806BEC29DB228AA1FBA0943C135837A515AF
+8B55D087F7A6760120FDF314BBF9F52FBBC9D9F013AE5A85212A5EC501096868
+8DFE1958EB6A783BD5E0935B9A1C42EBFBDC86B7915600303514554DC0B5A4AA
+6494EB18C2786DC7F6AEE22D1892336DDB607E9EEB8C71CFD02D3194AD1A73AA
+C1ABC69F794E128E5FF380BC01F4798FC6992CDFF4F0EA037282DECF99F45C03
+FC8B2B6B55747198A0176E54E532FC832602DC5027B4CD4BC5C5D8ABE25FB019
+789AF90B8A4BD8182F8BEFE13D6F1D5B13B818DC8C2483955914509C54E1743E
+A413E005F5F6856D0C1995AF86829BEDC2CDB3A4BBE45910665D9B520A879AB4
+598781138D35584199E7E7F682A847F6CAC2B3F2E05260BC302602A21CCBFE3D
+FEBD33B49C3C3B4218BC76FAD312D105EB6E1BC15E3BA0FCE6B6A95E6127B734
+B994C4EE09AC2DA6C958058B564A958EA0BFC04CC552CA28E75FC4D098E6C6D6
+943222CCC51155F2E3BBDB9901D52B4803BA384FFDE04FD20F5DBB5E9A3D40E8
+DCF6D76DACD641A96BAE0E281B88A9EA80D27D441B7AE1D7BE2ADAAC238D5B51
+43DA970337CCDA3E978F99B37CD2F1B6FFAF3BEAA267BDE8DD5E98D1A2A869D3
+01BE851623656E091696920D5BB24F9EC248A8CA28017E58DD9C48E53A9EA7FE
+8C70D4CE0A878D3DA52F3C575576C4F0BCC2CB2D35609ED39326320F58DD8E2C
+30BDE298B619B1745D518F2B8716880C813B6B1212D3B6BBA5152F9B792B1011
+84725D9C3F784CCE5932042EF5FDB73ADF28F1AD3912D35FC4B67E23BA84C35A
+4F1E524A95D7FC381F56163C02736A35DC7277AC5081D74B32CB2D6A34E7D866
+B92405C3C2D4A897120CD143B7874E3CC1B6803328A3D52EED3E92DBF27450F5
+F34ACD9DBF87DAD9F130DB9D487A67EA1D9A222539A412984207F4AB62A5592C
+358CC8F8A786E5461354ABFA8B2E746CBA08E266E1E06DF2F4955C1EF281DE39
+6B32FD4A1398E2C59E295A4CEF7A0DD49E135DB7FEB7F7C663970EBE419642F9
+E1FD36D1E5C197E7788235C81C36E6B4C104BFEEDA4F0C1CF0B5CDC6C09CE358
+218A907AA7E47CD1ADC594B4FE2F7FFAA606E0DCFA43CFD3538423E145C6B2DD
+38D3FBA074E97F1FCDF24285BD4291DAE16339AD0934A04ACBBA910DECF83895
+AAAA4EB2924C69396409DC474587C310E3CDBCB8CBFC417DE903CEA643F80F04
+9ED88E90E45562291A684D5344DFF82172B1B6AEEFB26A0964D35E33C0C3FCE2
+D979DD4A1C21FD478E3431BD4D440AF24893979008E0AF174C9AC54E6C7031BE
+E37A79D234544D94392796A8939B685D931559EFE19465564C18CD2972FBD929
+1829A64F790E76F4215E45AE0F8B0C6CF74E9BD1E15F5D76EA2E13D6346239BA
+FC95D4C89459A86BA6226EA3FAE0B1493FF2B1ADEE14926AD908EE0251E0E0CC
+F8D88C3AEDFC24DA6713815385F68E05C60444256819CF07964420F1389319AA
+44624B53B9CB0C6844A3C2C47635665E45A9DEF0F78EC59CEDC12D9E23F7692B
+5F2A04E3E3B0E2295F593BBBA3B811BC4E33878035A0109F9095399854384E27
+448FC4523808CBE1B095B0D21AD1DEB529D7CEAF5B22311B6B1F53B540031889
+3903DF99EFF332330A1E116729E6BB5EB05AD82E6D047C6F53CC7B8C272E1961
+C613DC557A656D87162316A0BEFE30741A69F1DEF72EEE442D6D5141B856C2DF
+5B4AB35B6197545473625FF3CCA81C2DB8A4EA622A5AE80C40E7F2379F35C87D
+5F0F264DB53AD10DD5209C3741CB50B2C51C50B2CDA647A279E591C6249622F0
+29C4EBF1FE98FFE5C1E5737DEDB9A348A6C66DC34DCAFDD983421E44E63D2804
+3B4286005EDF109F2A306CE74488F13653DBBFF9F10F36205801E217C08BC803
+AF2CF71D4C447A5CE08C1F7C77D61A1D43E6BEF030E69C72BE027512C9309B11
+902793FBE1CB3E990E94898A8D9E896718B029692678C29F326D4053C7EAA2F9
+EEC0DCEB5AE860D49C49E1F2B974E9F268935A428A3E66C9B5E66DC10518B2AF
+6B19F339114259019D6B2907559DBE1A8DAD8F6172CAA69C9730
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l048013t.pfa b/lib/fonts/l048013t.pfa
new file mode 100644
index 0000000..4c9d0c1
--- /dev/null
+++ b/lib/fonts/l048013t.pfa
@@ -0,0 +1,1233 @@
+%!PS-AdobeFont-1.0: LuxiSans 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Sans Regular) readonly def
+/FamilyName (Luxi Sans) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch false def
+/UnderlinePosition -36 def
+/UnderlineThickness 72 def
+end readonly def
+/FontName /LuxiSans def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-215 -211 988 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078987 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D83F2EBDEFED79F2D9B89C
+8EC53816C50F0AE382BCE732EEE6D88D5DBD81066D279225908FE82D1016823B
+76A6ECC3AE378CFA8D4858C797172833DBAD7A6E3394F8E694E1492FE4B67412
+7AD6A6ECC7A6ADC95E7AB30E84E5C6EAF70F5ADD2C2325538478BA68B505A016
+4E1EEE2C4BC00D82994B690B0A7F593DECA6BAC94DF9958F8C9D4A1B5E8CB301
+F978E31D098ADAEF1A8B0C49BE16CF963236BC1C98BFABE641EB28E425926D7D
+121C3B5ED3F3B331A592397A0118B79F023A1F3427922D646B40F1535AC406FF
+9A6639600E9DE05CB8CB72DC1C2315FF3C04432895774FAF2E5BC8C409478E7C
+5E14212F16CCB01F40C090BB951FBF5866A7C22C10FC75DB5EF8F207AE4FD07B
+10C82861AF1C7831ACC5759E0B603A9D8292CC48BD8720C06CDFAC12C303437D
+D3B5D1F4AF514EB57314E27DBDF3FF7C4F1B5DD60244CC8C383F433AC4D74E8A
+E0C76F22042BCAF8E576FD489CFE0ABC503C5BCB003992FE159A65392A4AC64F
+4E555112A88333D6CF854A48727EF93AA0BB589426AACDC7C06FA3D61049F58C
+74416E873A6B6A2198A493F73834D5C19BE517A92C5ACF16093E2F797548DD37
+FF9841B166114296FA9D03CAA6877981EC35D279B3795106CA671228224D0B4F
+D4AF3640A59F9E44C59541F7F06DB11535289BE84587C698463286E342038704
+8D9B9A670A0D11A2B5C6C2E2A1E8F4AFDE915A03AE45CE5947909B1FC9A03413
+75AA4857E725120F78BF6CE2ECB35F685371843C3D95512572A7A0E3BD246ADE
+AEAE95E62E9775AC24597907A8B56AEB88F46BD4B39018AB8432D9737C5CBE73
+77A82B56AF95293C7D0D847C7A508470CD6762AC896FE223E17730F05C9D3747
+E340F37E7BAF694BDAC9ABDB97BC12ED7B01173D3C713E0A8E68E10DE647BB03
+E4E67DE1972165C1796F5EBACF057A5AD7FEA38443D91ADBE54028CBA31F75EA
+0DA41FD14F15496382A0D8C9C27BCE1FDD6A5164F70BFA2C5B334A2D2DEF9AEC
+F1C39CC0484EE7F97A39D31A46CE50FC7D2CC52420898E2052896488606A5328
+FB195A9561E9D5A41A4C8117C86EDE60F80B6C70796B90EA9D3BD5BEB05E6656
+A8BD35A2A884BF8677D05A1F8489FAEFED5C645AD23A141ABF3E78C69EBBF48D
+14884B29D1A4D7F03A66EEA0D0EAF7476E80EE45A894E706B5D681AEE8B31E58
+935CBE30E790B7A3995331BA9B0FA2F03F9A4D326F249BCAAC590345596F8369
+028CCB95F0D1CE8A44391C0E9526214EE28927FC98B3BF6676B1EF48DCE63F3F
+48695A3AC668FAD1ED3B50A1FCD29ECE9E01F8BC3012053AF96B0C7D276749B4
+8CF046E7406621979A92FBEB7B5DD5CBB154ED51C4A9A1C13F6223BB54F6F3BA
+326F6EAE74DBD8B370A25A7A1DC320E9A17CA230A868B752FA7FB1065F435BE8
+A3EA5775CCDC33A360DDC25B2891F7D2AC399BCF6F789109CCB37DDD02BF9EB7
+EAED7A9CE82793DF6FA7F68F9D45530A14EC91D71A19A9251BD810FBC9934F19
+FE4FE1BED828FF3BFA6E91244AFBD8B430B53106AD18F41DF767E2DA16F57083
+B8F66A0356F80C30B956C43416BA6E5CB805AC10ABBD18B31F8BEF14757877DF
+152D286CB6B478EFD4C88A3DC1745A32A56D845A7E61034C7907A7EE957A4C7D
+A6525821611CBEF18947E727A49E0F765D648CFF974273D18A03080EEBB6211C
+E96439F86431EFD0BCC4CA2D2D8A4FEFC65C768D28FCE6BBFAB055E0DF961A52
+81ACE5A300787BF4A458016DB1CDB671B4867E5F5103551007BA0F53117D733A
+0D3E8802208CE1C54965A28912A03CA12D9C34D7DE9599E6DAB5124713CD716D
+916701BE3D6318B19A9E2827E94D4FC3F4D7D5794228DC958B3FB82617CF21EF
+D4A5129EF9051745A52DD66EC77E50F35A8793858819131F36413715416D372D
+DBEE44AA952C566114C8E3A21EC8BB0669805F48BCB27C92E609905D39C7FB82
+A62A627280ACF84937B0F10E132EF579B69992A1942133DA541F50CD3A51FF2F
+C56C10C6ABDA32C83F1DBB4127843928A4F6E714E815E387588478BF941F1F74
+E8632BD28851474673265AF4A18905C07A4EE77865CA41D23069615FD2176AB5
+2595D1E86B86DA9D0C416B67497B6B9FCB3E3F709C3A4E552E9EE130BAFF3810
+C30F41795F68105BB700DE11773B6435AFD59D7815C17D2D0C33C824550CEFC3
+1285EE76EB1E72D6D3BFAF60973919F8FBB4E2904079F53927F7F1FEA66FE0AC
+5496A13D446B0FBADA61467346AAB2E5A9F61619E09C929FDE2BB660FF152DAD
+AD834A43A906585B1B48E90D2AB718011880AD2A3431E5C9B2AAD5B9E401973B
+AA944A69F49810FC10FF7B7FFF0BC5A2FE856D757DA569F34FD03953534315FC
+BED3841FCAF428FBF5210F66C961BF468F25A82E0D6868D3E4B93F95F9B04BFB
+D9B99488FC520678A862EC1AB774A0CE59CEB043230B6DFDB2309D0FECEFD69D
+8D49085ACB83B16034AE0835FE67AD57F38D369F4D9604CE276CBCBADA2F8C0F
+3230E3525204E3868B0AA1E8B387DD2567E000CCAB04929BB4F9F5DAA93914E2
+A4C4F6C5E91C51725CC94DB972FD7B8B46C868D6D2FA9B63C84904E9C3EC77ED
+FF4ED0FB21A310ABE4C54FC6D6D18CE039B4407F06B95CE7C262F789258D0585
+BEB98AD999A28751FAAC37BF6ABE82331A9428F873E91254E820DA499C11F4FE
+85F0CC83DB4763D6B4C6B832D3AE8CFF77C0C883A0B41A21DE36A1D32DC13EF7
+D35F3E86C7EF1D8461B171813160E56FDB2A0232D1BAFAE968A4FB67BEEEF61F
+7273B238C3E2371A05B71B15D8E0B460156A5FE5DA20D662247CC36385544C4B
+A52BF88B7C20C78AA08BB0FA4835FAB7642F195D29A5EDAEEFD711169ACAEE55
+1350C30E459A4EF0D5E7F7C068D1EA4882230D157A51D639750E2550F96D752F
+97B0AC14EA6524AD772E10B6E420584990F0D622598832F519FF9CB6F6A20E79
+6E75AF675E3886621421E2B0DE3AB619E6D0C65AC4B7366BDBA74C76C5F6DDA8
+9E8D11F672D02ACF26766D7CB6185BEF931A4ED03E3745DE92BA86660BAC7865
+61F4A64F959A7B4D825E15FD9567A957B9C672ADADB83070795EE44D7022745A
+9E8B7D0C03ADE959A33ADAFD9FC69A0EEE08FEBF24674B0B6F16B31BF3BF0278
+68B511314B4C73FE31D640D6726EA6051A079A7F503C6C886C9DFFB6D03D2E6B
+AAC0BAB66F9C06FC11A4D7C165CF97CCF9737899D41F602E326BF02394F6E438
+A579EBA81C049CA9B773C10BC5BE33353775FFE01E3529DB4FDC9467564372CE
+1D2976040390CD1F1C0DD3DAC8936854A0E9B5074730AF4736C0E4F040759B69
+5AD6A1C46714E61914180D1F80ECBC33689CDFBE788204DEB11FA4E35DD610C2
+B82E28A25991DC4E55331DB54345E3D11EC304B7B25CFB5F1762444C55AD642B
+8095CF31A30BD6C429497BC0904B1F06EE90FD9926125E77FD430AE3852CA235
+92428660C10A19470784FE02E536926779B248650A6315FB8B784DBA9D226B06
+09C6900E5797693983CDDCF08754C3159545042ED401B364A45A9FD7BE0AC6DA
+ACD9120E8114EDF40F21D968935F1BF9DE05228EC140AFB1889AF353996B79C2
+E6795E23B5D0CED1E0FB1E6A572C6746958619FAF88C368EBBD742570DB4CB4E
+DED4D19E89AFDBF6092D5A0A48372685DD9639A32E4F91ACD9CA3A9E34D64E11
+9AF8E6BDF8674D52F1242D8FE11E19820F26BF1F533C34EA6471A4C96D4D5207
+A9AE99536705F6934CB16165657EE6F6E7CAA7720D4AAFDC6C075346672B3E16
+001BC35A331F03524D28301FE77D9C8B5FAB0BB872D568D5B95B2DEA4322ED4D
+0DC15BA4F0C1D1AF924873193FB809B689646A4CF1D97A1660F953C82211E4D2
+A58E370AF2693919EFBD3C1E18BEC7A472B20DECEBC0CF1861AFE3978C993CE2
+3D7E93946083689CD61E6C180B3EFA962E2BFC1D073F7FCFE39EC0F963C51C77
+B2A77F81D20BCAF1F0B5DC1AABD9869D4497CFD90953EEE70993ADE80AB6CE15
+864AC0BA7FA4B666C54EDCA0A0F9F67CFBC21A3BFC4E2303F5849C130B9B7E46
+0A8F60048C57FF89DED4A6D5976635ED1AFB0331370E53EBEF3835107D02FEA6
+5E28A746BA8E0A4AD649E0CC03B6AB56398D922B96133DF7024BF83A46A0EA6B
+E4B05CC77A461AA0FDCC59E90FBC96D16DA364C2DC55E618090800BB3E8A2D90
+CD72A4C067A1C107EC6B0A648FDFF3D05C508C4DA9826E7082CE58C2B027C014
+6C001421F42F21B18221E7AAAA092EC197AF592EA3D432175856F58FE7EAFD05
+B81FEDFADCCF38AE807B2DCD8E4260E348E3B561E72112DCD7BB0032120966E5
+5F131F2399D9C89AE65CB33A354903D37A9A5E480EBAAEAA485305462228C88A
+16F99457F7FCB1538C2BD86DCAF01F6D6404F02FD91C82562EAB72EE21268867
+CE2C0F3A083719E62205D0090F64F694CEE7F0F38D57D01F3732839933DC0F8E
+DF5F9CBB1FED7FB149AEF7A53C644E17A672DF4F8BD4A0ACDBCB32859117ED77
+82ED68468C311C51C8851ADBB6A9212DBBC84EC1B88A4AA31CC6D1F764AD69F5
+CEBBE3F7983C3442FD91D7EBAFA16CA047165BD327BFFDC247F822314F346D2D
+D3E28BB4C05C485438E70E62DF3E165DF4AB31B0CF7FE84F420304D3FB7D11D7
+DA73EDB8834AC45479C13BFC5B845AF24C2F1A4711AE4BACE4D60276491D1BCA
+E3A3667563FEF12FBE7667F1EA621D0C241E49D68B09BD92D5163246425565BC
+FAD5051C5CEDAD508F387E192AD94FFC7184F8BD2530FC7DD585501E34AF3846
+BB1295CF417B218758F11D342792D81C8CEC903D970E51BD263AB1BFD6E9B2C2
+76E1B061522A88930712D2C169877295EE5340A4D1C3F69B9874E5CE3E3C82C3
+E7CC446BB33407B2F2B13722054B9E4286C06EB291D0410964FBF53E079D70C8
+1AEBE7D82ED6C7F95A0F83AE408196F9FA71BCA747448B3D94BDE6B25D9B1B17
+4C55496B3D0480CAF91E053B3FCD02C6140317DD0457EB98BC899CAFA6D274C5
+06FD587285251051CD5DEABD6E5B22A3F42189ED36F3A5DF75F8A1BAA892D296
+13A466A0FD134597DBCB91BBC63400CFFE7B77A8D09367F2252C22EE637A686F
+C076ABFC10D88395D376ACE6CC23DB7F05CD6C457ACC83FEB49C6B50BDFA075C
+ACF9D01E6DFA07227E28C3F651EB02303A658355BA5176FBAF95414C6A704FB3
+C8025111091F5482A01628F05547A9ACB731A291F1CE05EA8D6574272DC2FC4D
+48006EE157BCD0AB293CABF3B6201A4D90350EEE2948A444F59C774847A5F3CE
+76E328F3A1AFCB732F339DED374E8FE3BF9B964C9A26B3E1C3524EB27FDA0B4B
+EC483B16DB62FAAAB326B862529E0B284283AD28E80F362343BCC66DF8EA0E20
+38AFC2F98F623770538A38698293FDEF0B75E3C5D851094CE5928150C7296240
+1FB139409667CDEE7605B4F16339E2C4A9B94E316D7A6B271182A19CE5DDBE61
+458DA5B24620348E77D1EA20B096050013A299D52E51C07EB68C151F6EC394D0
+26D6AEEA446783C64E15E7C7602522500E789A4D38EDC317AB7CF6765DFC3190
+FF1B84DB7A4A0194A4400DF94AEE615411313DDEBD12786D1720430E0DE1278C
+9AB02BF0705A2E75738D65B832DCE7751EFFEFC699B97CF4151AACA2D94623C4
+73748CC15AB6D1A07F5D13178979CE175326C5110B335E47A53F45818FC9E4EB
+5F7CB8332E12CB441FCEEACD64AC84BFEF1E858C5CDF1F0E895CF1AC75BF2105
+D2B6B86C14E9145BE2F22792CF68CCFBD007C728E816783AFCA822730EF16766
+2626857E1E7C525793A38955C4F40CFB8E42F86AA9A0CBF0296F9C54626FF1BA
+E25D62B530221D6421EDF9E5D7BE7A1311BA3AD0F48771252F4FBE4E55605F4A
+0A520DBE08CC94B181952D89633840FBD1F79BFFC71090E918076A9053947120
+70635D5EFCDE3A566101104D54B346DBECEE79FA87EBF54104904756ECF68B32
+2F6F26103CEE3B06A882DFFBB0B08BF9BDAE2C8D9AEF88837235BBC2CCF19C9B
+E262B6F8748CD3B0224E2237CE0413A4AB2724B6BB3C3391CFD6E8C45AC32ACA
+7249A955656967035944D14823D7EBA0D4FD6F3747ED319A6B133AB8762AF94A
+B43B1D03FCD9F63766753EC12609B8CDA51E65875B04A0DEE40F768D91715D29
+A06076D2712CD5BB154CB9E3E77F322008C505F46FAFB3ADAA066285A50F77C5
+8A9695E324B6A24B1D96F4D4197EA627089D71EA7371D0D0348B8893E5261EB3
+F41BCD40EE77A02264BAE486CB345CDEE0C00A98ED7F96A3AC6CE8C534F5CEAB
+889F7E3563092DFA96C44A28279AE30DCE4031150E2A4F03AAEA5E2D854D8AE1
+0E2DE62B83B05DD9C7F0BD5ED122FDFB6D4E5DDE5BA1C27E8961CF61119B482C
+69055C36E2C3A1DF9165FCD5F24CBB5D6143C9E43A0F93EB260CD66CD4BF54AB
+7AD064FD0D7B72E71F51464E7CF407BA9D90368ED4E9A5D11E63EC7F7E2563B6
+1678DB1300C88F3EB77DA3AC104B644C799344A7B93B7925991A065087ABCD6B
+4C72F2C60B3AB3E9B1B008DFC201E2F48E47C38ABE247B622A75ADAF193E5E9B
+301E0F19B8066429FC8F64E1E5D7822CEBBDF08B83A5E732FB45B211090F0A90
+EFDF2FFC7BB6A847EA398CAE9BD0562F73DBBAEEBF83595E5774C5290373F3B1
+161905296921A55C4C8E9C925AA543338254E7D9855E01803A2EA96B4AD8ACF3
+E4682030B7BA428C6C505C9F6A97567E568029A0FDA0652947ADFCB7FB74BFB6
+F72CAB5267EE86F34D878C62DC81BBF22FFE13CB066760353039995E461AB2D2
+040ED87EA2CFC54F2D5BE13CC99FEBA37333228C7302A34A4F508EE6595797F3
+7BD211BF901C4055641869FEA3546B89D36949EE0FA2CE8DCE71842A52F05DAD
+F63829F2B3184CF814FAA64C73B65E4ECE9B0517204981AF9957F1B6FB29BEF6
+8D47E887F8EC987889705FE17BDA506B1C9E521BCA46A10BD728BF9E21551C6F
+E233316FB7F5CF3CA15F1DD7B827126C89D4EE7A4AA82FE71026107963523F09
+096FBD47DFD66CA1A69A4D7C076D9A2ABD9D5A87B70DF1016E29C3698AFDF479
+451C57823F7B5250315EC85A8E7B1367C2E9F064E2B716340EECF712EEA14886
+22F560B22B39BC1CF25CE9966AAF766BC606CA93C04ABBB3DCCC7E0BB8F4CF22
+2D37CAF0BCE43B93B2EE318BD72BA502D596EF36562A056E1413DE0700C776A2
+0B4791C90FC8ACA2EDA723CBED95908811C2ACFDB5258CA181AF38EA66E305A8
+046EC71857E31894C750CF59C4FFD7DDF405378FFA7C854A0E0E3C7BCA0AD237
+2023844F8E8D69C15608CBE17D84FE9C0C9404913D68B98A6BC8FB01479E0B60
+E2E624A5B4E64213B4BF4734BD3C8B30B0E691B190B30CF2B49978BEA937BFD3
+A18AB4FE7D77EB75837ECA25ADE86438AB48F6E2A6C7DF2CBA1A3006F4A89AC8
+E9596510EC3FB24B33E24F8819A9129429376CDF5E84D61F79084346EFD83BE4
+55348D8E9BCDA1ED8096A3215600A1EAC278B99AC3FE8AC3BA9AD3B861A492CF
+B38BEF7502F608907CD5418B768C795E3A31E7B6971E482FDF8265032FB63F2C
+4B9385860945B83E244B19B7769160D3E90CA5E81E39001085FB8AB7D7A855B2
+7F58B5AF4D7A04C214015A5112FF363981AF0C9F3A6E98C391630F839C8529D8
+79B2AD12D38181E9A57642AF6915E8EC894A2592A606753C7C6E67538B22B1A8
+18D836B53E4E775A9D745F4F0C2BDC493A1122F1DCEEC4F7E18445546FBB332F
+45A62F4A7D2BDA18491577A7EF07D19F1F48420944A2A8DF92D953AB628D2095
+F02358B542AD8CFDA1E2C739EF10ABDAE3C7C17AFB2F0884175BD4BF29164836
+49A5AE6C7D7438D477D15F74939183B61119367149B32B38C4277EB60EEF82E6
+AF4E94FF0D5DCFD77052C2FADBD0554964066239180611E193CAFED231F7CE82
+381A14BB9D908D842151883AEFA0C5C155184D2A6E82FB943792DF1D1B9ACE7D
+3695B87CDA9E22839448241DFE11886518AFA164707842599A964E65A2EABB2B
+1118F729EAADCFF6CB3DA1BD784DBC6BC6D41E895EFE4BD8355B65AAE7FCF6FA
+0B2E115F67B7F29210611955759DC3C52E6C67FF1AF9B69D0DC3B53867FE8DB5
+E3E9F35BF158340E2E888D3A9DF0160F8150EBCB76D053689128B4DCE663EE5A
+DC8526F46AF7DC1629A28BD8200EC03F6A11D2573C68580CC18B0DF7E138A6E2
+9C9022DD9093D3198ED133895B6EB49A5475EB0BB06016E646F3244D76218EB8
+F26F00F8F507ABFD902788EDD8755DDAF9973C40D1B7CFF83E696C2B60AE9E33
+DB98E520A33242F3B367287A519255AE92F2512E3BAA70DFA3D4FAA48B6E16D7
+167CECC79D41D27F714EB1029BF021EFCA5D4D9203062585F1C2EBCE61BDBCB8
+A834CE84A1716F3A4FF8C8F596E5B4C607DF81D25995A76734AEC487BBB1D440
+F1F11D2FC345317BC2928AB4F59091B4B3EED478E821E6A84ECE01C760698BF9
+19163E32D29ABF92C5E2805434C317C05F7B1BE3B47E26AF33FB53A720820B30
+771A2DCE04C0E9914B6E7A2902C4C4A91BC788FCC588C96AC517A2FFAB00889A
+AA125ADDC939A6FAE98D809F8DB1DB49B6D1297EAACD08E94EADF3AFF59F8E0D
+1EF968E765BCA6FCC3D52B7DF57ACBF89E45D13F001325B796E11A5BD51AAA3C
+036C0AFB391EFD7984D3BC6EC248122CE2721DF837E44F58F9CCD0C06C045D2C
+5098854D31234CA2AE9C41B901CEE60220E0DEC181BD39A3EC3E3F355CADAEE7
+2BD3A09FFDA632139242B16207428E0578080CA7CD604A186154665B31877131
+4916A2C04C66E01C1B71821C44E5161DF2646899F1923FF90BC203D592B9C371
+58C88945B5D0EBABFE0924D01CF22B547CE7DFD556CB285F0BE5D9CC7AF56DDE
+5F61D0C66895199CDB61A39C944664CB438422E7FDFD2F3FC632058E5C8EC998
+673E8BA91DE92E64AC3FF9CDAA34DF107836B121B5259807ADE4324D0CE7B7CD
+F2D94F1A5A0D2ADF7A6AFF0DDA5E98F72FC29A34B01ADD8682B57CF97610EA47
+5DAACF94FDB9E61CC14CD2B2CC361C9704EAC1F54E3EFBF743A551FAD5B52174
+486A5448637530218091DE0B4513443C8342CD18B669BFBF241C249BBC8080AB
+012361313B220C3943D4F82EB3A66173635047730A44797CD20753F196A19919
+D1F75BB016E796214058908ED982F3C0D9A524C789D7F634759FDEA8C035E715
+190133B34E87347FC6E8C8671F50616030E5B199758E370F4E2BD838BDA6979C
+3815FF7625F1BD41B9C4B6BF0C7DE3DE69F1C6C1D3F4D387B9317C530A49A3ED
+37989944243F8DF2D60241CC6E4E5285289A7EA597D1DF92640A83360738B5A7
+26EB20D1E52850C829DB87E28B4717B8F2CC3C8942F38694A5DC5A5321DB5725
+89F49CA6D1A2AC555878CD43A023114FDE61FE8B8A08A840ECC2FBBF1041BC54
+FF4681D0B755262384A664C98ED1D1A1A2AF0F1AE96971EE2E4A1EF9E7C0B2D4
+A60B7A6108947C8BCCCEC3946984332F8AFE04AC9345FB60FEC9FD3534DF4E98
+585F371ACA9E10941CB122BB65D9AE82D16F0DDF13ED41D3A14448A83F120F7B
+AEE9C6729E8D82DE68CA746554169CE6214842C399AF76CC78415B52508CD330
+0A776680685FEC3BA39A5C4AADFDE2EE53CF53C5569C54A59CB346033EA7FEA2
+3A5BCAF2442B4E18C9609220A1A334E71D0C4F7748F8068C3E42F3BA0D906155
+3EA8CBD989C0C7BEBA367E63C8484A2DF3E8EB27E50E60D09B1D71B8521336E2
+04EE168BD3077E6444266E1506F7D8F1A73254E5422A0FA4E5728712C3217829
+071803C4E65A4FDF9DDA27A2C4220EAA6F7520292FC1374DB4252886600780AB
+BB1EB3C5F479E96AA17644BE204357F8073127B57B5058CE06C53475CF82B946
+E7632666847BE56D1E37EF9B4CE247B80E2287B80E7C3DB45C4F90D49E0AD5C0
+BF2B51C79F1D929FC84EC2B8EF66EA213E862A2F06759059D72931822D35695C
+82A834F08B21DB8F40C9BDE784C97BA483E15DEAC3552146AD67AE417836A024
+2F388EBB7E877AEB04C226031941BC5E00B62DF4C833303E8D09360345DD3DF2
+7C05793D4B8954D01DDC88C7852B722546691B0DE58D03671CA23B1F8015FE7B
+9E50DAD5AA41382C4E9CCB98FCEEF7785BF174171C4D386777DE16A4329C831D
+FC04CD5AE48E6F13DEB41337FC48AD7C7B208CEC6587585768C24852122B70F5
+DD3A54A92F38A4201C6D75C8DEB955471638A9EF4B81BC38DF39C4E4E6CEB929
+0B06974A9D40CD5622FF02A7D3CA2F25249A40E4F0B684E8FEE2A839FB365DE4
+50FB988F97B992C9E8AC58B74F840221865C6E48B044E0A1A4201490F74D82D7
+5383AB46CE69ACAD4B4B09F5FCF3C66A637DC529695C9442F19A15C927569161
+6BFEFC8CD1B7A7F3F9C67A445F8B6DCD2EE53FA25F68817012105E420A61D35D
+3741FBE996F921C24A4EA47CC5D2099A314183F55F4B098F3CC567E9DA4EB74F
+9865A8019106AFFE5C8BD34EC67228540A4F49747678FA79DAF3ECF142A4F3EE
+07E5B66F004EAF6FA3CBDE4782480D9541CA6E4BFDB69DAB7C72C607F56630ED
+2F3B78B7FCAE17BF13D3FDA9A092B0DCA9D75AD9D6EBB9DD649C3B032AF5A1E0
+E18B31810E6CF3D26702B480D1D2F16D8A6BE47354FE17AA318AC16390AB1C4B
+10165DE80EA293822BB63DB8B72D78E94FADA203B0CE078A929C5B9BC681D560
+B20A2DD69CFAC03D8F2EB16FAA431AB0E7EDC77DFC40AE2C8ECFC0CFD4A9E236
+15BF356CB6EAA90F6630801CCC05B577EC4A33463182DB9F40AD504669655370
+11CF974D7536EA8D8BDD56C268F2362E544CBC1D31E25F9E5D6F490D33026575
+E45B367739D77DFB4D079BE7C379235C8095D6D4F52C8FF0FD4C6DFF2D6C7C0B
+13DBBAB39AF732C38348A4B170978410668CC1A2189A058A3EDAC1B08C09CD6B
+ED16950A2DF3893B96CB35F551D7A8103380F1264FEEDE157C641B4783C6581C
+790DD7349D6703D0B61AC8196A0B787A9A1F0BD9C906CB00439FAA0A9C9CF7A2
+0F26A9CA013B8A737C921722C76B167269A8443FB1C894F35F7BD37EE31DA899
+75B4EDE61F409D8539472CE9805623105FD5E67E6FAC734A6E83151BBF93BD01
+EE89EB5D4021777C423461554F2C2406D35FA6F94824EB29F88E20BFD6383C6B
+2499DF337517DFE6F01B0CF4E35C4E05EADCF5684E34B7A646F3FCCBF3811790
+EE1B34FCA03BD9E6F65916C15C68D8E7B7D2306FBC705B90341415DB1262D49F
+A6BB3BFCDA817AD7668A2528A76CA62AA8CDC02C9671D254B8427AA2F0CC354C
+C9F2B673814A0637DEC6A052F3F279C23391148B4C9E761C5B811F89E737969C
+79E7666282A91CF9D865F25A1EA923C85660404A914C90C9CA6ED4EA1E552BF2
+F03A64AD507EF630E917ACDAAF2CF94A6DFE99BAFB2309BF05F9B6CC991664E0
+C477E1BE53A422CA0C85ED03933D3B210D6716E50022E0BC0DB4E5D5030A9FDC
+4DAE2DF78BF602F524F138F682A21CE9E1B929CAFF0F1006F289A94F5F0C9A68
+A2DBED5009FB809985FB0E9DE0A0CD342366A329B0FB96601624415392B0CA13
+F62538B0B96F27B6E24E8DF136800885C9A3CDD5615B8FA19529073873BC725D
+DFB03865A17573CCDEE9572D13FD100ACA9EF2AAA0FDE0A60A3A219778146581
+92B520565791410F4E515A7B088C43D514B8B16BAE2A658E0AEC9E9A6E7849B4
+4051FFBD37916E095F56B93D56DF69B39B3AA423CF3021862F9BF963405DC9BF
+2A13467ED56E1EB1A8A874BA6FEB5E9B72ABF43BD10C709CC687482CF96806CF
+8BEFA8F7E7AD89186534A4795FA08224116ABF435509E9A6773F88589EF40C87
+7EDE77FE457008692EC223B98E0EF858DB4C8DFB275F6E631FBE611CF31D319E
+C3E946180CD64A4D519BF3F311892C1A5462838271D03D5CE7C4960D675EC73B
+18D41303945FBA3504E55798D86E174BA38DD8B7B1D4F23109857567256AD067
+AE8BBE62696CE29C95D4326E1BF4A5DCF73BC0C79E972518C558654D7CD8BDDF
+67A3E799A95B05426A1072ECAA116CA332E1D611CBA90BBF9D15DA7739FAB50F
+E31BB619F7513BC6BC72617923EE35A2999EF78AB74EF7B3DCF32A6286EB096A
+920DA01F6DCF0693585165EA80543E74646D2DA147F9615D4914EB9690ABDE16
+92FD179A66FE9A0290AEF99733F5995943C88EAF7FB5F8B7E5CFAC2FA77EF9CC
+4F678820742A36D2D0AE01F11652063457DBF0A4C535708D4AF777D37E5A33C1
+C3FBEE96010EB3112FADDE319A17ACC1AB36157CC1A5BA41B291CAFE448380FF
+B11C7CE02791D702D70819E83C2ACD8939372B7DDD08E98D0F17940D94F825EF
+F759BBF2BD70387DC2467AB0B21A536F5F50F2EE5368542AA42BF43008D17D4C
+E9543A490AEA3FCB360B09198D649966BA730A06F8A2441F5408D5A7095B1A0B
+545FF0CFC72E831EAE74B4E3656F413CCB92A778D154F74E05BC0C1623EC926A
+E86BBDFEBFACAA94B9A6127CB16336EE4A412B32FAF19B7C79942A8A399D9C15
+A621EDED310FC33108673F0D6290FC882CE490FBF3FC65B26BF47A9FD3AF6BBD
+13539E842F08928531CDCF19DBE2CEF56C1FE7F6F617099F18CED9AD3B3B7C0B
+89DDD37A3CC1AEEB69C54C162ECCB17D73FA18405BD7F58B0E78021BEA22CB81
+1357F69CCACA5E090E658D1B6A826E621482991101CE50C62B343132BCA7E586
+ED3DB34DFD1562D7AC57A088375B145F7ECD54BEFEED6791C53B4C0F475C0B69
+F14A2196A701674C8845397E4BE0F13C66A2E28A98DC42EB96569E06F3D923C2
+18ABED5B8FF7B43DC738B9E2258D1C0F5A242350AFEAC5E95BD80C16F094246F
+182C53E12CE7B880D1A252999C8EBC6014AEEF1EC179C1F5175A7AD8163ED9A4
+07BE5B2D3EEDEB61826EFE3D65A9441701A76BFB637E5D5053988903DEF41C28
+EAE257229172CE100FE8D5591BCF99F000C5459559B517D3818A9D65A94922E2
+CD5517C8A5927378B580C048FF5D5E60317B469F4EE7889E4461050F2AA1B20D
+D8A2F241D25635F195218A37F29112C2DEAAC7D8A3B1ECD4A68FCE0C24CEC87D
+CDE22DBE1A0A73614C3DB14066448681DFAEF8D35598C6AAA8F70AF07A7DF0B6
+100113490C2131D5613ADC8ABC12FAA531B3EF0A45D19C72D77ED225F361BC0F
+86B70C9B531F4900C6CBB9500E532C5C50BCD2A1295434F1E763AC95E68D7C75
+2444EDA3C23FB50D2867CDA09A758D32E4E30B01EDBD02F917FED439D2F097FE
+0BD6B387FF89CA48E624295F91D96D6370FD42AA6A0BE14666D791E088BECB57
+2A391A8E87F2C6E50D188475B74CFC4F5BD1ED8D1EC22791BD31AAB92EAD4DDD
+C7E610667BB1ABF783137436279D93A71E565923296866F9704D97AEF3876367
+5A063F8CD68C9223B621797F7070D5BF6F743EF717E754F94D6EBD201AB0164D
+C240049723150C45374BBA15E0BD104091781F7CB67852002D31644B12E590DB
+82846375410D004AA8129575F45562C33862250858C46F72044D58FFED513301
+F7881208CAB4E4C4459CE16CFDFC75F768CA513523C6C2AAAAE41C0A219B06C6
+7B4AA98F92C074356298A588B571A0A03B566128C0F62ADC9663E0EA2BB9F686
+609BDF8D6EB178B00E121632620CB7331995A63551F8373A22801915C7BFAAAE
+652D11CE7CAD9C7AB1CB646C605C6C4F2E42BCC872D94160024D4C0B2DBECB02
+25650FF58D1ACAE991CBB26FFB229D8355814F5CA8620C9E637F4A77AE88553E
+E159519E232749E5D037EB2BD3DE28EFC4615515DE0F44BAABE6916F0FA7D61E
+2C56F5B0DD6B387A7C160EE009302BD3D1925D6372BBC8D72344100641B9A87A
+647386FC7F4A4F16CDCA462B9215D94E8C9068B760AC18660FA125B352FBF456
+C145C0DDFF3E4F6D2C84937AC82BB53D0DF720BB8E0EF59CA0F1DF1AD8A139C0
+92DAD7B59892303822ABFD24EA1A922B09F5B4344290B3647CAF6E7622583798
+3DAA4155916D90B1142F2745304C46BA7E3F98F1319A3F6500C402133D8CEA89
+A10360935E26ECDE1578D362C34DB7037FE312A5EEDC4054DB2CC52A88D2820D
+C2ABA013AFD88CE47E09BAE8B40F7CA321DD86BAE6C82B919884C8B855D7F5E6
+72B791936EE754670A53E92AD0C74843D15445AF39B6C7C2B065ED1B3A29B81F
+DFCA2F5D4191212ACB7FD331692C0ECEC8DC4F442A753F60024969BDA7E5A010
+3DB640453B353FCF772678C52781FD6DB32BAB10D6BC7DA3233D0DEF0EFB8B5D
+7009EB3F58D77C0B02B2341FB3D485EC340E80C842B6E1EC4DF85052FB2AF512
+A48412CDA18DBBBDB5726EC1DC3D5838FABE8ACC5C3D19414DFCEAC70B857638
+5924531C3803BA645F902CA88F74367B09C70A1E8504F8A850100A5EB21ADE63
+3FB038C571150C9EBD3A75A2F670122E92855F6354919189E36374E91C59886B
+22899897F868B8720508F9BD5A161797F61EE40942EFB26C155359D4A6B2314F
+CCE8C7059E214534FCC40EC602DDD283B2A931B5CA1E873773637BC9863CF916
+1B7B36B008EC1BB562C4FD883A631598831B1559C5D77136AD03E94DCD9C495F
+315470097E005FD022E53DCB7581DAB60FC791B4ED9C636E2DE5F5B22482374F
+088736F9E02EDAE88C55C5CEAF21EFD64EE282AB84452A1319AA8DA3695B7806
+0ABECD77CDC40FBF7D9FD09E1ACEF73DE682447FA18F45C93C03E7D8A70135EF
+2B18D6F397DD2885206DF5A8C52C89BD54B11B4F61376CA6D6342F44A57FBDFF
+171548EB957EB47C62C9B78FD5916FFC8B2D9F9D4B744E3D7B784BE985DC57A6
+92352900DF235A531109372BBD46A8B862298EB6967829DC163E55CE85F0D8B4
+D952851ACA00BDCC981DAF1B15E5D53D29F55FFB46E81327ACC6C147B5627FCE
+9989428A788A98DC4DBC9DF0904DBFF8DB4C6F0BA3CDE8FE3248F29EF8003878
+132430F063596E34424CECC9C9FF6985D4DB0786EA1CF7D0DB7099A3C4D5E26A
+307080C45892678EA66C0A539C32E688222CA098EA3472814A995A5701E5307E
+DAEB7C853A4B7B46F9910158BFC4B206F7E7CD0D9B5A1820773CBC23E6E43CD0
+6A4E88EF6F45285E85651FA56DA663DB16D356FEE528772A506397D9D86B3D18
+645D3FBC57199F8FE75913911FD64E03E24C6D0279718F7BBB0C8C502BBBA59F
+9B2CC3C21FACD744CED42569A8841D3867CBEBF2ED3486F5C187583E0E6B5D5E
+9441B9F0F659E5BE48A17B05F9D3D96F28D95D757BEF3CB83CDAE0E667F3F8B2
+42F4E6D5AA1511D320A2E1B96C3C7CC96A8737A70B974760159CE08941C3E06C
+EF4B1F07AB12EAD4BA26C5C3627A231EDAB2197F8B0EB12584C9817D5BB6B39A
+B415D59E2112DFC61B10A06EF9ED5252F9C0FF98FA4A2B49193F09F796BFC431
+38B88C7EC80A1E192DF7B6A0E5BA7EEFED908BB108AC20B5816DC41D57DEB1C3
+37E3BFD817772D44F7C1FC4F82F41685FE711220C8175D68F4C73727A6982190
+2894CBDA32FF2B70656B269657AEE710E75D8BB54659D46025405583BD30A344
+EB026D2DED75300342807E34D661FECA07A39F567E0AC9053B3DE8330E6FA84C
+10A47732062EAD6DCFE4982DA630008C33823AAB374797946A17678938259C44
+EE9BD6B2DBB700BD2CE90B2407DD6F7B48A62D3A9DAB971477E50CFD4F4BC72F
+5405120220EBCDFBF0034338D21BE2FEC949C90466E14DFDE981A70F2F6F26C6
+5F0A35C1ACDF277E7034066DE11C25984CB5511FBA51CA0EF84C1143F8CCB991
+116A2F8BDB68B1EC45CA2D0B3247F93B2905C146FB10A63104AD5F9C4B82C7A9
+5373F8783913A2F925B09245825E167EB08308B1691DF759C1E90FB2611AD646
+0F73248F56E90C86F99093486FD1B5736D4E0A6F880670C37F1AFBBF142C7865
+C846921E34887D57187F0828675AE07826351005BC73158A2BBA59F5E9614BB5
+B9E72334E760BEBF7E49E74F68525F9A017A34A18A1EF40ADC811DCA5D5835F1
+26132E606874DDC48E181F79D791DAF9B2668DDC6A833969FB573201E745DA5C
+8176B641258ADC5990C82F9A9C8E6EDDD446843278A83BFD4300F749EA148A28
+1CEB260198F38A5090427A0052FC91364EE8A2DE0317ECC66F676E2F9CAAF3D3
+BC6E4FDDC0F31F9259EDA5AC75B969257E635391539330BF9AE0AF73738452D2
+6388C2975CD9727BF11E0C4E887511B0975F6813E77A08DD27826D609F0A2F12
+3FD49AAE57298D7D814409C4EF9C66F81A02BDF349FA0F4F8D46683A56165B06
+CACC0EA3D648B47D501AD15F83EA655D5261DBD832A6C7131A73F3A25BFF3193
+B9B37D19D2334F29808FE28BDF612DC38172E9F35CB9616CF9F2248B7159465F
+FB90BB57BA61B00B4FC957644729F270FF485252643F9F16244BCF1178C7CA2B
+CA532F178D44B8A7A47550BF1D1BD89C0A15AF41BA0735C486F61D5CDC421DAD
+17ECEEE048CB89F0CC319D0C3809893E441F85E2635CA10A869BFEE0B753FD0B
+C9849370A0CF1631DE406FAA5C4A9C97EA07608ED72BBE10D82C17CEB10BC478
+1EA17F6336A773CCF515287E9646695A6A27E84A3ABE2EDCFC49656008B951E7
+B3C0453409A7003D5E33F3CE248C108AA0553D8EA29F52ED17443716EC967F48
+D3C2E15470F048D317210A67916ABE50E11F6199D769EB5C78E447D9164BFCB9
+FA6565C7B3AEFA07018695F7D3D40868AFE8EE320D6BC24D55F972CA66BA98E5
+1E2149F7D205FBFF2E1C5EB06CB71F2F10A61DB1571726D0FC78F584294508A5
+844449982ABF95005A4DDFBE364DB40D81E573C937402ABC251B64F130BFFD0B
+5EEC2B739A109B89895F8EF47F6F180A4423ADCA8738735D1287AE5EE35B0CAD
+09086479AC06B5D0861D8EAFF2CB0EA7EFBFF7CA03CF6460DF5DC7FCD5795497
+57CC8EFEAF7AC8CF44670B8519825FA30825057A23DF1469CA1C14E4737FE199
+38064FF83880E04C863D4B16292084505129670B11BC5796C4F551770C2807BC
+D5054771387B8FA34AB300BCA9447B952BCEEC98C72B7BA65504BF02BDAFE588
+0DCC68FB6AFAADECA915F572740233D78E6D3E652D6F8817B771B1E1B32BD1A3
+6DC2B632C92E6A2BAFD2ECC15F7316FEAB6229434E0FD979685202408F71CB8B
+1201512A065271EAC2BBF1B479798CF2E3A05F05F21E123C5644F701E3113EAE
+27B93EEA49A478484B91A844F9325CF0742AC676D55C9187EDEB708B4C8D1B1B
+37EF1B96CD3B554458B840A8C384B89A91D53E0C8EB72483BBB08CBD9FDA0BA1
+4E124713C547E137E60B37E88AD35B0FB9DCF2A29B8E191A2D8CA785576AF525
+938D5D856049CAFD10E949CAD5F42A390045D90F2CC97C981D1FC272435374DC
+3ED1E0E42C04E0984CA1E12960C2EC6BF263F4D74389F1761A6E87857967A6EA
+16BB17A46D36F1AD4D8BCCDB8988795D00C76677DAFC702EE863AE02392A840C
+03215E0CC08DC8385354022E7DD2923F419501297A3AB017FDA031D6616CEA5E
+888ACFBD83145CB8205DB631E632822AEEA28585015695A4B206D98EBD27BAB2
+DADBEB6FC00C72CCA83AC401B367414306D36291AD777747A3C29E52992A8F25
+D3DE12A79EDBF370AD7E9C4612C665C72E57B612FCC81CA23661FDEB7159CD5C
+1F159EB60B49085424F078081DC690399A5123240B698B7625AF0D34BFE324B6
+A24B1D95C4BE19428DCE545E7626705A7CAED84460B44256125B829098D97FF8
+FC319CD72C806D7BD7343ACAFD866D00AD8F5EA111E9089EF7902A56B7FFBE67
+F9BBE8853D1734D146AEC85E28D0903A94163C1BA0F0E5220558F85966B0B787
+3EBE0329D0E243970B7FA61DF295E8493C92B30B2F5019D4E4F2C0C775C25AFF
+4F502727BAC48067217E5587EA0C6A24918AB20D6A7C7938380D1A342B76E99E
+0F12B4C6F5BB424E447A26CDBE25766DB8A1E7E374BAFB4EA2DD58ECBF0942FB
+6A54885EDA3D8CA43D8EB86A1DDC6572F468AFA03E20F0E882958AB7EA7E3ACC
+8DE675B4C35F6F9052E7850E7205849E8505FBDB8168C26FD29AB6E849CF6001
+DD4FEA81FC83718F4C2F2BFA6E4C0C4FE66768B54A913D4A29499AE406B343BB
+450B3D7029E6C578F523974353DE37D522E8FB091EF6106819675179FD6BDBDA
+B6A42B339DCC43717C6C12C56EB5C80EE2A7AA2FFC8097EC905DF5EF9656877C
+4CEA6360082D500D23BBB0AF4B4EFDF15A33360DEA36DD2591FB9DB7A1501A18
+6A31927BF5BFBA8FFFA22F9EBE0384939063BB305E307DDC3E595E525780CCC2
+D4CFFFD19EA9BA61E2BD6CBABD1CE52C9B93DBED0F486833E7A252D818EA8040
+94213BFF2DB659ADD126AD0455EE85936D6C02E67A07B163DDC10C11B5A42327
+50348D881F4005572D61CC0DC9510C958A153D6434363A52DB4CB9B9E56FA46A
+0ABC1939A1FBD632E18C3D250798B27418403610477C6736004B1FBF6BE7561C
+950861BB6013CBAEF7ACC21C7096DCB7B99E8F4E17815C5D40BCF2218248AE02
+086353CD1E8B0856AB31A3C2474326F14D0CA9F6A0C52236D9FB89EC842DC8D4
+4857B0DB7F37131137AB222A517CB80C671CFF8A9A5889C8BB2ADDFCBDCADC06
+CC2BC3540F12169D3C46E579E6185B218228603A4B3FA8AD8E840C3761C61217
+8861458EC8BF163C492B748FFD349E00996B78705D9DD932D6CCB6FE7D7B25C5
+A92DEC2C6B950FECB4ADF57C5A95BF7ED12E431787DD29C6D4414FCF3C4E360A
+31E19B37E2722A94BCE47087C5E1845929FEB43E73D3EDA981A0FF9C0F757042
+48F6912DD892E2CF8880A9D1B19FF0A197921A2DC12881E913A4C7858A3B3B96
+E9A4DA7FF3598E74D74B04B5F2545DB3B1D84E86E26AA8396D696E667C2970A0
+DD9978187C583D415AE00359BBDDD7109C15547B9A56F978475531BE02542924
+65D23928DEAC21CC7D0C1E1B1BFF850ACF80E629EA46D71FCA2809061C61F65A
+B881D56F270E8C776983E3CE0271E3F502818DB1E3EAF30D0C98BEA340673FBB
+23CD34CA17648735CD2A532A8B3A530C3E523CD013151B75FF664463DCB0B388
+BF60CD928E28139A13575635F349BF70C798D0EFD52011E75A7B3A2841FC3D72
+65EF0CBC6286367F1F4B3A7EF9F1F4808954E6D973ADF0CB1893D49B47DBB0BA
+AD66EA4E84BBC2F1604FDFC7C9FA0E131718053BA1BF946A6859DE3E452E05A0
+0E179B5F1D03659522BF22518338B6C98397F040F0E93F8E6A463D7D504D3690
+142E26C28172E8DB43E5DC2D45655F7D05D999F32B6BC9A9D0C89041C2031C32
+C54C4ECD75FF3A95B871DA7155A73C3B2FFEDB148FD851AD87437BED46C10E99
+0BAED69E6900AA9F66D77F30873A508C6369C4F898788F8204FB5B5EEEC4068B
+2C58510223C6B23B668204B2423FE7146B7C5314969349CF72F100FEE07D4B8E
+9AF97E9B7B6EC0894C6E81DE8EFBBDD37641EDDE1D241E4C4440CC91F8E3E3BD
+E70703769D9AF7227E7A16BE76336B46DB6573D0A195837471D18666342990BA
+4465913A45DCAB6420462C5FFB8BF1E546D0C5B009ED19C8B11F5E5D7A41A3DD
+4AA97192A047F29E8C8A195634E4778EA5F16472542D9A0B24C8741F547784B0
+3CB68F42169804AD537C0884BEFC4B5C0953A11F050117C86BAD3F5E151FA668
+D83B462FC0BD10664F0962D62E31E163FBD8FEDFA0C300994421E54A9BDD620C
+42ADE78FED182C26595F8CD93190C4CAC7F46D7432B635725038A4FF6DCE92C3
+9385912E24C214AE42D5C72EC74EFE2017D4428F4961D416454F41738A6C3D2B
+4B59F8F915D7A5E03B6A6A9B982CD07BEEAE7760872646776324BA25AEDC88A0
+38A730B1FA17BE4BBAC909375FAFF664BC811439F269CE71B92CE5D30FA255EF
+5F5CD5ED0393DDFBBCA2C4008A6D58A1E470EED8CA803E56CFFFCD581793CE83
+1D49557CB4F47FAE9CEEDCFDE140E70F70D8AAB8B4A851D01F219538D8185042
+46E442E90954118BC348EB5896BB31B185D659503B9214885CC2600719EF8F58
+F006E2EC11EF22C286B7F058E8F4535D7EF5F3B674FF0F5B476E8D75001ED67F
+48029504CD633DDEA56FC7750A9F9D707C9D3416430C210089F60B231526F4F5
+3962D40FD4C549EB4E494EC03DB95DEB23A6CBF25DF58F1327470CE13B9001FD
+04467E3C1FA4082DECD79B4CFF71E9284168794F2151C1BAFA164AD43CED97BC
+A410DC015AD503B270D81AEBA9A963CDA9031FDAE6B51F0C1F3606A00215719D
+477402DA2B221AA885F6351EE8C4B17876409ACB320444E69B0DBDE6C90E4D10
+2F72593F2C36ECEEE2F293DDEEA74CE325E806D825F94B4280E94B8F5803A7A2
+3A47DECA7E1175BF08421112A67C59C1187570DA6B60528565F0AE1F9810AE20
+E9A0990380605E0C186092B7F65E9C0F1602609DD44A8BC80376EFA0D406DE98
+DA5E4D2BC78E67543927C6DB57C5C480CAA6D5D81041432F3EF05420341F369E
+499C5245507A621789317DC4C294265DB72AF96C7FE3825DBA6AB5C96773F1EB
+203AA5092F63C0DC5C8D47C28F86C5E41B280C77A8501F529B1AFAA5B1C64031
+DE2E70D75D8A471E16EB1660D64F8F1000173206D82C807A7BCBE7C318934315
+EED4B9B8403A58E18C1D4D7250FBD8DC638A3D13D1ACA9CB71D805D4809BDED7
+8F8732ED4C08DA5D6F705DC510892EBC39EB623095D6D7CDAE7FD01A9E4F3A63
+64BC83D0DA24AA2333F473ED023CF9189EAD1BFFF702E0B8E5BC6F6484B6C77F
+E79842C4F56244E6A5816F0C76A4210F2B9A81E367A7B02CB683C6A19DF10F98
+DEB661CF23424272183272EDFAF0871EC214A6261A93A7C8F9CD1C08CBACD9A8
+048961430AAEBB34A5EF5C0E321CD6C2B0AF1E3D81A8153CCE16C87CC7A24585
+62BBDB75E14CCC4EC692749432A52FF9827F1CA8ED6F47059CEEBBB945B701F8
+7ADE1DAA3C6FB9F3E95954CBDF0883BEC86A6F63C4A794634F503750B169A642
+3D73762550A657BF8A5B6388E41E7C8136062EE343EAF09C07FDB04A9972A91B
+6E9B192EF143F9E8D111CACA0540CFB62346A23938314B9EAADB27D5879E9376
+DF4465948BBD6B1E845C90518802D5389900E1B98B68DF86066A90C7EFBAB98B
+58335EB75CF3E0572DE2BBA77E7F6AF3E199842DBBB7060ECAD3045E834E1BD8
+64BDED3FBF9306C2912811E237FF9D6CEEE5278F6613E371AAEC15620C4A2A15
+22150F8B1B0C81F9A18D49B2684640E7ED5CFBC31357A236FB1942982EE96B6C
+E3C54F03A25C06968A53CB9D7FC3AE8C5B917BF33C2D4181280A0242E823E2FD
+DDE615424F9A3FDCCBAF420542AC90A4D9856BD2C6371F75767A6BEA4F861909
+1444B6A5BB066C63E46B32B55F2D26B97D074661CC54BA96497B226A353CE86B
+62D435CC24BAC65985A947BC16218E15579F16FC8DB371582A15D3E510558BC7
+EE6169F2D9D239F40C010AD8EC8EA128CE416E21637174D34F651E4DE30A024E
+0FBE8B5FEFB5C89772D5230B3AA652D6778299B048C4CB5D68455E18B66DF0AF
+851DF300836E15EAE115DBD03DE42716281E531D5B6994DEBB0897B97D21ADE1
+49F76FB3DF0FD481B322E2F3CBDE64B16BB7FFF8DAE55923757F1A65FCF48F36
+E51BE3D300E0D251BBD18AC914B242D71E491F9CB99AE0909D326AE17D9D94F6
+6F8CBEC8421AE9941069126986D9C26DAAA474928B2BB477D14D7CC7A4B3301C
+A9B795626F9FD0BFBDC870275229C5E67451D37BF4BF92090A5571158169BB81
+D3F45B9C6D65E3DB921ACBFF42885AEF73285D3BDB6FB4B9B8C8864BE52156B5
+B2F20F8627BBDC08D8AD002440E47A2C96D79240147936CEA7CFD7B09027FAE2
+60AB5109DBF7059DFF4FA0D8B8EB06DCC73A1D1405FC19CE7D23C18CF6B353F4
+FBAF8AEC7E36B738F6B1CCD05A0B9C9A4C13D060273DCF6D39DF922B3797DCAC
+876E0635F4D60C3D5A5DB9715D09CA2C6D0D16B62B747BB8BFA0580D0BFC0469
+3D78A9331EE1C9E7D5FEB03C241B47C60E70AF08FCC5A37CD973B4C6DC83C6B7
+0D4BBA368135DB44092579F9FC257EFBC1CF7D915FFACB222D06C52E4E927178
+80EEA6947B47345342D24FC41FC24A90178BD358759247F8102EACAFB14F4BEB
+256AC2EA0E6D3446B1F1DB46922790290C38F16317FEB372898EA0854C333A01
+6A43B3DEE51F5A114B90B421C4CF9F874C8AE2CEA867C7C7A95DB46C30C1AA49
+6FA9F53DA9825F54B6653E509A079F2FF1C3615F0F34D04EC75EB02BF0ABF364
+12FB55935F20A858F30F7C86974A3485927694695DD500607183FCB73F1C3428
+C9C24FDDFB844232A43D2C596605C70C9F0F14DE98F222CD610262EF9CB6AD1A
+41FE3C37051B2E591A879AA425118BFDC89B41D42E97EF93FD6E50A82B7F82B3
+267FD63506A2208D35FA855BED185FF6ABD8C5B5BC833D5CACF9C71AA6AB3DB4
+992C5BE71BB6DC0596ABBAA03F89A4FB0D77FEB283CE666DABC4AC06741D8B76
+05E80D80C8D95A5E340B8A23733960DC9283ADCBA0C75B0E78773B198C5A37E1
+27B7470CB6E15CE19E890BA07CA1A419F1F5FCC5C1CB6AFD5B530BA03585568E
+11063A0050CA5E8F3DCC804E440845869689478CE1D7388C4EBEF6FDFD245810
+AB2C5860CD320AAB722534AEEB9E3483329BC97B693DCF7D3AF4D29E08E83F0F
+A487B723EA2ACBA403B03F3D17F8380B2CCD6C269B6D201E465973BD821ED5AB
+BC7AAEB05418DEA87619D40F4B1CD70E951CF7AD151A9B8B1A127871BFEB6997
+8A90798D6D075F8C74E1D3375A932A3B57136131826C83F2B4B4159456BF5DE6
+ADBB4EE690FFD3F2D760310841CB6C21509871DF6CC08409617AB94A32FCC617
+632E3E8C98B5A2B3E7B4169E53C3FE3966CDDB526EA5A18DC4894660EC1C4FBA
+25BDA925174892535C368720C92C0EDEB4A245065266674C033D90D52009F5DC
+742F7289F36CE321838680EB9F8E667234E802E6EBF61B60E526E154F2BF3A43
+4925FD043EB471476117D86127AF7894C44DA04EDF2BACA67120DA53B1A116B2
+B9BA47A8193D791E951735E33498D8C705E67E2986520D880110D35C0566FD8C
+EF860427BF833331A7DF3F7EABEE61E25B667BB6A4584AECF704B45F24587AEB
+B6DB1D7B6972FB4B4328B2160A91199CEA30020FD62EF0337A4D4F10AF923EC2
+247660A5AEC4D22E976972C71EBE9FD9CC9988D2E272D8FC20E15C68E9CF2621
+4778CD8C3CD42235F7FB33D3DA71F5D2C5CFA17421AB95587919AC1BA75C85E5
+E459C9AA3DA52A0A8714594BE4F2AC32599DD6C3FA3340DBCCD87B8E7D567595
+14E3D254F660EF2C5EAB9373F33395BD7327777E3DCD4A11B7BFE54CE272439E
+E2BCC6F8EF22672F81F20318CA95FBD8ADF3E18ED04A4E73C9B32EA493317B99
+E7680A397A72692D0AB3877CEEB916F8D7D7E7B40D97E449F76BF4B1FDDD08E5
+DE37609896DEBDE25CEE302A509968144061ECBB277142D3512485D11003E3DA
+D57C8992A310C2968CDBCB65F3D975EC5E3685F0FB2D24B8E03774CAFA785BCA
+F6AB8F5B958FB630B7DB2EFE66EC1C446E5EBF86C0F02EB9A96E582471E48BB8
+68AAB996C02DB531A45FD3AF2696E0A459629041E80D4B25CC6C9F60B5218C9D
+2BD697F050E194E664AC1F229082656351C8CBB04F8DE1584411800C19261918
+FE7BA5FB2E4C02AB650D73B4A62E41C15D4A92EE8221C51A7C6998CE99BC505C
+DA3F3F384215CE8EBD281393E8EFDB9EF91F03EC00DFFA1B2229D70143981563
+4B52A88FC1378607096431F6B8E1DF869CE2FBF2548B6C1A9D5A4E40821E3FAC
+9B15907958C13AB21017A3432D57A0190FCBD86287B5E2AF6DAE27E5F34D9EA3
+1B8DC48F1574D9484951F76BF3411788428D05874F0AF0048192CC05CA43EF70
+E0E1358BF692F8B420358C131E06E33394317AD867CD47F5B91A075F5B72C49B
+DF756D282F3702CE9F03BF86CFE4F51FA00D186145C002F25D4F897ECE7986A0
+5308DBB80B40B71FF4B776BB4B3F82782A76EEEBBBFC3278DA716868DCBC097C
+D3D3A37B935809D7FEC58B537799E1527E7F0094B11490F9999D23D73C129A0A
+7048D4CBF9226064A31B3ADA9C19254A20DD1BFACABAF15B3DDB06C4D7E65591
+3624A68A5559C9BA94E47BC2C08AB8C6FA3E0A2494EC8B40F90E0CBF14E5076A
+CB91AABADA49BBA79CE47E70955200256475BE67352A65C75292AA82FC3998D9
+DB4D7E5366138B7C516819F0EDDF92351FE34CF73011FD339B0F8380B52D7C9F
+B7EEFBEC433B3CC2EAF0BA105559172088AC7BEBED21F2243E7FA81C59554911
+08E9304C1C252908CA315F95A1A896C0C1F782724D3716D3236DDCB129AC356E
+06E4043FC93CA6BE977339C6527B4EA54EB74E89CC4E8D42F3AA2F7AA5BD9D3F
+B7FEBDC1F174F5F594BC6AF14C89ACF1760ED6F173759AFA80476759CA2E7E80
+6BD05284C63764047A0AB8A545C67868236411D96751FDFFDD4990324951E071
+7A8E17659FCAAE93DBB7E387569959C4A4AE5F069207A13E1D1C7F40802A2D0B
+8B3DA376E109A1AA9A428F23B0F9B99650FDEF28AA801C1F9B7291D47880444E
+7EE09C0920ECD434CFF5B851A343BB70E2CFF06854E78A1F92CE831BCD253713
+4A92308D405B22D204FB7139CDBD1B14946F2CCAB6242DE87C5C7565EB1C9D99
+85CCA6865CFCD57DAA7291591A202492CD863A98E17F9AC2CD9867EB827E70D6
+B8B81A6996ACE08112BF38BB07BB78C6C879FCF709F8D94729D06D3BAD9CBCEC
+E85E1A08576B1B4192FF26B6F923D08EAAA58EB670D84361F9688229A9F103CB
+1D43978B1B067FC31CA0AEA33B5B244D7069C29B6BEF12907A78ED5128D678E1
+67C39DEE6E9BC38E134FC55DD7692F5219ED04924CE8163CC566BF6D6B331456
+4047FA2F3B2C10D95F1BA5E7E527C539144B135D3DA214B88DDD2B024E6F8F7C
+D943E64B6097E559B860E235E2CD13395DD7177D7F93070B8C8EBADCB127162C
+CFEC2895632A15CF1E55A525D342F96B023648E8C5479C6AA0A9BF9729DF2E70
+DC54A2A26B1DFE7BC7669FE938FFEB7582386FDB2104E6A19042FE6DDA8F9850
+D5AAD74050D5318F0F8D4D750A4492B50C2AA395795CD635C8A914B707B14E35
+844DDE1DF2912ED6B078D2685AFFB987D8C4D86A9DCEADDEAE4DA772B947299F
+E5A438058A936C0AF23106FAA82C9D8BB8D414EC5371A2AE978F99513B7DD837
+A6BDFF5551C9467EA26AA91C3900055EE65185DACE0D675A8BD6C9D4BE4B006A
+FE0F89713E038B7372A86D4A40532D6AD87D2FE7B62B3D2EC605DD00377A55C4
+E8392D8D3ACCC84664AC3E30C18D8C486E8C502196F4A36226C1538C4AFE302B
+846F2A87AF880514CE1CEFC5973FEB9E9A48C4E356EC79D3AC1B714E23B7562F
+AE7199C0FA5345D37ECB4F371BA123B67CA068CF67BBDA93268F4E08A5427FD9
+0ECF6B33837F8A4F42B37530FA5AFFF10D8D558C9B55A930CAE49172A6D36079
+3F952690DC1D987F2D63015B3DD6E2642B97D7175E345E299FE57C3AF1E83E02
+B34BD8A4244D95F7CB1AE5D501F358051477C15E534FCFE4C637E316E5701EDA
+1009743C789B2FD633798171F4E88DBDC447ABFC9C32701527F34BEE07FFDC36
+003856BFA9325A4F7D1611CC5B36A4D7604484471B74EA3D8D5A28E9DE243332
+D3C6146772D773971E5BB3CA34D8EBD37C8F435B0BB57AC9352DFB3D09BC2C92
+E9081DBA9D8BCBEBE3C2C42066DA13188A5DA5939BFA435FE5D2CD8466EB0EAC
+4F735302C75CBF6ECC96969E3AB91593FA24BA117BD0BED4E3F9A51384A5FBB0
+BDCC7A14B31D8833C1B796B8667FAE8348A7589218988BD4C2094B1456099BCE
+0E925A5673C13BEF4F1D91A72B00B75524E9F2B6EEE39EDCD8436A239FD6194E
+02AF04CE213AF8A4DE0BEBE6103A1CA891C90F1F79E34E8D7217B59F1F8A146D
+94017DD36B2610883692D55453BD9300545764CA404E3699548992C65226F772
+19066C8DC53B6CD2E378C0773B10F16FDEE74FFD370EEC6963762A9EE64FCAD0
+D793878A07386CDDC0B00A6E3500D50536E7CEF106105AEB4F7FD391C7825C96
+3D1492F6B4431AA74736462D14F63CBCDA4CA2808E3C55BDFBE668F6B1AE5F01
+4A4B8A8EA303C345CA242F0D9CC02F1BEDE134C6B4FFC0231CB3F16D0F5ED86B
+56A2D04CF64925215CC4DF3B51F59F69E99DA91BCE06D02872A60E8756EC89EC
+15FDA8D54067FEAC2E07483F66B00E8FBD5BAD31BB3DA45A549B205B2525BB6C
+74B4762CC4AD3BAF05C4A1A23B50BB22EB8D88603B7CA3052F83FBFF2D7E49D0
+438F3810F8076865973D1A4D2B06F3FC38498935E6CF0DF4DEEF6335403E4748
+611D63BFA4273A823E027AE5868907BA7124FBDF11C4E30446DBC2346B4595BF
+2CE8784006D1AD74432F5A3A1E5A7E6E69498995114830D4C7C9057B0AA4476C
+A9F5F44B45861ED13CF485B3CAE0E0DA24D805B5FD78D96064EEECAD82FD881D
+6046574FB32545B5B9D65C46C7605925054241013115C1B0D112DABDF00B45EB
+11CB82077372FED9B125B9091129BEB6F8F71F093CDCC5F3ECE4A9D33B55803B
+33758CB9F82DF01DE13A7E8C800BEDEC6840E37AF32B40A412F6DFE46E9B0469
+F96589AD547D14F75F9B694071F1F6F7A459EB8DB009B26B9DC8744E250A99BA
+EA1421504C17BC772862BCE3F07EE747D57487DC8A611FEB526095B872A10902
+6839B37E552D2C798F761EC0F1698AE49FD98B8CCE873259B911D61724EA6C5F
+5AFB0E44655BF454D1D35936638684A5FA041CC0E1884E362ACBB04BBE704282
+86E87C674245143F5E35B598F431EA3DCCA443318EFB85242AEFABD64B8F1A21
+CA7B1E372748A25ECCA6DED3A7E81737AEC77561723ED57A7006F96D17B8385D
+91BBEA3A651B5644FEF22A577543169056230A6FD1651EFC5140F2FDFDD1B417
+4B458D312D9B58176403D160628EAA9E99CB5CB7658DBB9A2217CFF17A3F5761
+39C720A5924739EABEB75FA12277C5389166FE5891B484C4F3317B2513FF0EEB
+18DE6D8CCF1306FD85C5C19D47C1C36BE1BC73957F8291A641E39877F3ECA3F8
+25A539CD09D32741C725A7F7520B288670AE6DB55BD2879005599744CB54B1BF
+8759C7EFFDAF992F557C13CC77A95FB0778628713ACA9A1A4F0F9B5304A2E828
+43F6DE633DC423B4AE3AFACE6D08A2CB7BA7CF2A0AE3D52100A3090637B446B5
+3D69CD48477185434B35884FF9A965BC434A6AED30C26537E14D7F5E27438F5C
+CE5A8F4B01B0375092137154A9937719C3D6874C9D1136DC203C1F5811BE4C8C
+9E10437D27586D4FD8B4A8146B0C96A4F13FF403188A9EFA26D0974C731CBD7C
+143B1AF2EDBD2A87304C5FA205D285D324BD21C1B8CACB4F5AABDCF81186B08C
+19A8FCE8F94CED88BFEACF2A6E237BACEDECE38B60D581CCB5B5B5D86DB88486
+0123DB51D12D11E49379765CC5994D16666C886D18A8D44DD3EF0235E14156EB
+EB767237EC9A93606E034375048396DAACA3D20F55666D0C1357222572E72404
+163C6F5F398A73ED1395AADF530282D61879A6DEA51473A286EA7F6243CADAE4
+BA9342FBF4A5248C1915590189A4616A3C774304B6E88FDF20930552BCC493F5
+0FA5DF80C3C72608D532F4F5933A225DE0F261A1D33D866417E49DD3C5CAA669
+853AFB20D792FC6BA87A46049621030AC1B7176156B1D2F49A8DB24861C14445
+4E528E2653D4E4F41681655CAF55E57A8C1D27B60ACE5AFCFC0EC8839CD99387
+880E8CBAFA86B397E8E4B6B286A8BB53EB55CDEB3F8A238B15A3C1E5BD457450
+E3DA8794F224C8EEE4A09CA8567A4E71FEADD076E0CE221A4834B817A5F5517B
+5FAEFA742EB1CA422822BB178B19225EC5B90387929145F7690A2ABF9043E595
+E67E23C9482385C17038DC83B9AD1EA4B0D5E0E0A9BAF8355EA256808B55366E
+FA65F8089A406983191238BDCA8F61C732D99E204CEFCB3F344BF39E240B8457
+5A6204C0257753542985E7AABE35B01B991AE9B4B10E87B3FC44BC3A14479902
+CFA8572E0D255269B7ED30FCFA1023B8A614586C5A2722EBAEB9DB53E87BC93B
+BDC9CABB3EA3BD4938893D2C8F2A198042744213F419C5571540E96741435FBF
+6AA57E260D84DCBE3A214954028AC1ED4DB2C6DE2DBF14A749647E1641A7863D
+B91A9801261731B65BDA550A199941158AD9827527B9D37464B8614438AF6008
+2B285CD83AF213BC6AE6198208BE43540B76165A5D5617C01CA772BBC98F9C30
+52E67F6E25F7192D36A130AC18B71E38D20A724E28C109FEBA4A3F1D677C8B67
+42F22120C99FA00FC0122F18ABCC0D24CC32B09CA42D428508AC63E421F9C0C0
+87D277AD58DADEFDC187ABC7D79F8504DC1113D70D7CEA1B4783AFDA128EA7CD
+C7860C3ABEA3BB53D7AD6EA3C116756E282C509058D599FC34B98F7022CEE941
+7108B44C0A6AFD98A6E79109F8685FDA6C2AFAE11BE2478FCD4E14BE04A19DE4
+822906ED944EDB5B532DBEA395A09C7156E45505D43215863F63B635C5A30F6F
+C7E316DA9650D9B5EB90F6A45E36F2D2B2CC89E18A246FA7D391A7728D51B18A
+D4C92D0E97BC88A78D5F3F5107938BAEAFADBE744EA9B9921177C86435A6475D
+5CB3F71FFAE0132E0F288BD509993DBF5C35A5C3B87EAEE7D3ED71B73091562E
+45B022CC7FF481142E18A8D98EFE703B4AC8904D275B08E51FA0DBA6C6FF4E11
+0D0334639A04311F6AC5ED7E2FD7E81D573B14DC0A7F5A6720D2F2F235554B8E
+7697BA92F17ACDD426E107A266D8DE4F774EE90C8FFE38193882015FB1FB1F77
+DF9779C16BEBDCC6696915D5E977BB40BE17CEFDBF4BB2340B35610F2BD333A7
+E0BBB08338C5BF12BB103756EA1BC94566FBC0F1549DE72DB4404D703DE8D566
+693DC9A8BD6D0679D54FE8FB5AC0934D2336600A1B528E0BED9F18B93F6CD0A1
+9363ED941A02704BE7C8EDB90C7CEEAF5FE0DE83DE1AD9398E42411BDBA8C9FF
+266FE82D375FF6B6B6B42E3C72F9D310A3CE90D112F7F0BABAA8FCD3DCBA9870
+91AA07E001EDB3C1B8452EAC75169E0A23C108FF9020C4CA9CF2A0E2A20E53E8
+42146154259263EE4BE01DFD078472363B0481B730FFF03E6B2322009818DF2F
+5B7BC17D57A70A9D02A1ECFB9CFAC92B4C43DA454E97EE9AB42FB800F397C403
+785B59D0961536165B7D5CE598913155A75310B331E633AF46A818FA0431F7B5
+E408BBAB437A7B9B47BBC875F8B7B14B7B46A421CAA505B3C6FCE2D6B98FEEFA
+BFC8DB0B5182FFE040461498573AFE9ACC85EC4AEDA3FA37086CFD35155115E4
+0F5EC7170E19913DC7EE88132663A1B1C04521A0216C73BBE09605D3D76CDEA0
+53C53126DF96298813CBF9FC2074167A41E9FAF05868D80CB78C1C114473667F
+52E8DA719E7427A6F688C5736E59FACD7B86856AF7AEAD82AEB9A3F3B76220E0
+1DB2ED0049230607E78DCA5CE38DA174A9CE4FEFA0EC187DE2020D472889E553
+C988AC4A918C3CEF06EF3BB4EF02C2725D1A9EBA406967F8A4969694E929C1F8
+7D85E82A434C5C5E1C5D9F03AAB7FDD6DA21D3E95B0F6709BA6CCA5F37D6A7EC
+58CE5BD8C82FC1A5A1F0B90A6E49F14B04D8BDF6243CEE499B4303B9FC35E853
+1FA4804F9514F966FC5263567396E28A9F605235C797ABAEADA1C71646A2FF24
+2753C6D3A5348441F196294860D44C47DAF1E50B004CF0677CEDBB7FB842B7A4
+90E4E31E85314E9031A665CC3EC0B3F0368567E154A4A6CC206CD8AE3CD45061
+AD67FA9594C4B3FD7BB01C6409D9C5E232323C60566E0C254DFEF45282E75676
+5BA6FBFAE1FEB9477BA7931C2C47F3EC2FA506E7DF6E1D4D7C60530F33F4FEF8
+DBDB65507F002E7DA817695508896578D84E2124748EFACDD527F4190E7C8931
+D7D30D8A7FAB5FFB4F55B8DEDFE2CB84230DDE12C54106FA697E84B320E0D508
+ABD664C7FE500549229636138BF213EB55CB325210895024F8F748E9B8A85AD2
+D5B1E888A503C4BCB2C5BEAFD980C202A0C580848AD9B7088A53AAF4AFE7EA35
+D1F3E05C7D1348ED6EDEF9D477987420E79590D1EB76F33043A6D18644FD3F7E
+E65597D5C699447573F37B082DF8D4527780A5B77A7A1C337759614B6B926183
+83B7585A16886CEB3A8EE1622BEAFF917B2397FD7FA803AFAF8F0DC99A0E202D
+795B4FE27345F3D275D29AE0A13C258C2EBEE48E5332C0064B1E08F82E2D7094
+705BE9F0BA6CE2ED4E7C34FD707F4DC9B586718D2FFA05108ED8F7623B9A11FA
+01D3A755250131A5BC85DE837F8F6E4C56721747A00830395E2274B7116C3845
+EEA1DDF51FF498DF2F143DDDF413870FF42CC4F667802695233C8BCBFFB5BB9F
+C416A5AD416CA61832DB67A517345F041A85AD1455D7B8580A04CED89CBC40B9
+6BFD0598668F99616579A960061DDBC5E4EE436730C932D645839848A1A0F5B0
+B8DB725B2D83F436E23B81B04B3154F98DC99032AB08C897DA86C933ED50BCE1
+4A728A52FE09F910F7E47BC3F2DAF8C22DC78DF9EC66C2664782FA94B3B9B56E
+49481B999BC60526881A7AEE7DA30EAD63A32F65D3FEED5D8D6CF94BCB618A83
+82EBD5CB11DD9DF1527112E4AB18BA84D3006F0A0E2C2696C6730BE9C8056FA5
+22D5215932558B28D2CA5CCF2EF5075E928DB301202FFAFB2578BB25DFA6B1C3
+20077C418C1840245F73F8E9EA4C473E182A46A33C3CAFDBC0BDB2B67442BD6C
+77F2EDE389AA66AEA8E1047FD90830FFC5A53C05A9A5F02361953A9A6365F866
+68D2AFB36867724E5F1E4E15DB55CB82332AD2B50D1F4FF598743A5BD27770D2
+E80178E01635596CC17D1625C55E7BE5C9B23FD330B1CD1AFC3B250A359F47F7
+25E6A837C96953EEDC5A4F3249F50435432A4268710DD9375AF252C2B1A90E67
+92545928DDD1FBC28971A075EF7F17AB44C51D4F5628AFC8F53B1EA0E92BB299
+E50CC983132C0AB98BE00FD6E9E432876859B25B9835185DDF9F88BD9D1045B3
+3498F720E9A146FEE51225A5C72758350B48938E63D92D16EA5E700C48EA5C75
+B493C810D5490EA12FEBB381ABBB5AFC1DBBBE50AEDCF797DDA608D4A4412F20
+4C697DECFA4990F5AF13CB7223442714F907D5C3E41A01CAD4744B346327D7CB
+2BC0B1CEBD3E711B8E63A7A28A21905488B6AE388BDEDBA2C4D81DB3E8AB4BEC
+105FB9C0A25BC6FF47973AAC6AA236B16D6EFE49EF27BFABBB061535970534E0
+04C6851F5129A7453CB74A1E4285B560ADA3D87305E0EA0BC89F0A6EEB2AC5F9
+14520E6F791AB083DE23866A4A84342D751D8494873F1064DD3CE7B7FEAABCAA
+EA808E944DC0311ACFB1DF0DE76EA38DE7E33AC71EB7CC7135D94FCE33FCCCEF
+AB068A62E2B9D20DFD65B57E7F436DBACB5E308A8E4502C37BA0E4DF7AB021B5
+33C6C93C8AB613AF3D96D7719E56809453BD1E0900E4AA9F01CABB634D972346
+081AF11A1E665F59E4BD86491205F43A6B21EFF8056478293CE34AE045DD7A57
+6C5C33AC194764C0DF930EDBCB162E093452D15A72934141F683498684C951D0
+733DB2FAAA862A3D7A4CB337366F8793A9B865D70EC280CD084E71484805D5C9
+7823ABCAF00585281C5F0934329F3265E38045E64752B28CFBB668C8077C39E7
+53704F2EBF5A95A8F6879E2135374CCF7A50EBB6DE63372975EC7A83770BDB60
+EE4F9DA3CA3DF1E31E5B489AA62E29B92E90C3D95E2C5D9F285CF3800265D8B6
+ED1822CD6F328059DF29C154ADEE3FB10D56D8600055A823E10D9EBFA3778A5C
+BBCA59FE3F40EA37F67515E5F947025F64785F172213045E882BDD672F434B3B
+2B4BB66EBF9E85934F3F3794B9B320D1ED0AB3C3B68477A595DAC9536B2E4C47
+E6B7057A96359B57E02F7282F35E9BB1A8F7DB62C9809BB21898B6402903487C
+2029C7300384B376346424D99E2CBA82126666335FA8DD0B5225823A733457EC
+DBEBC89FA3FD249BCCF746F8434B8E60EDE335D0F515A063260D6C6F0B6F5691
+96CF588D856421AD4561C864E0ACF9FCCD4CFDB4EBC60656D66DA3C1DA212A55
+6B4617DEDA813739C6D3D07669EC10F669711A17B460C00AD47359276CB293D4
+79B41F1CA8CD1129A6313A2253A29DA8C2CF46997F71AF365954F5F612141198
+8DB049ED9F3263D3AACA68FACCED6F24BE3E5A9E602F775A79EF90AD4FB00789
+D60896451A39A34648C7CFF8AF04BA351EFD772CD253BD902AE55EADB42E536A
+C1E711854932A03A36D7C3863CAEC28E4FDC836265504FF8406675A625644168
+3FC2038FD2F050F8C23233E0481832BEA328A7FC5C45446EA919DA3ED28F8CD2
+D8D93AF013B006C46E1508AAF9D159C348E04AA3E78119E361A34D67958DD040
+DE1781D010C6F15D890C0EA00496E8ACA9E3440860FFF5AC4FD0507983749142
+F92E2DC5B8082A5DFBC0CE442946ACD947E8127AAB82E5A60176735ABADE226E
+8A11D6D40F267030B3415603F18A59BF6F546F5C72DCB84B9810DBA500ACB230
+2105356AF679B3AF478E0B0FCF991FE2F2D046280CEB35647F7C63A7D6ADD948
+D22E8714B263952E07716678B4A94B5A5764C69A6F268CD58285A82AA61BDD7F
+3CCD2DF266C35605FF93A95A46C44E93514094592EF43425FE5E1F49206F0551
+DD35636F54BCE90746586FFEF34774E43D2DB09BD6A06733DB1D8648487BCCD3
+F1DF35D24638B081A4F04A41DB88609F63CC2B720F96171360D74DE840EACFDD
+36E8D3172BDFD986A3F7EE97DF58B1BE6867C306C5DFBC9F625FF2F9F743A884
+16889BC87FC49247FFA31F3234815B6BBC0599A9463E3AEA983346F55DDF8F8C
+A19517241D59B502D099BA9A1A254620F087DD37A20AE13AD23123873798DF22
+F94E28ECD0B0BAA8DFD8896ADED992182F78D35FBB5CA8F95A69984FDB9480E1
+3D524CEA820DADCAF0184A565A18AD4B756A287880ED3125581E4F094C6D4AE5
+3B7C7820C12458DA98A99A97DD7F9587E9352F8AF642133C2F9E2A646B97920D
+C9033A1E95F5F8A1EDADC9B6E7ABFD29F9CB8DB9365FC60B50BD8C0506A62EBC
+EB8A8050C1ED1A9E0A7F975DEB2BB91EE0340BDF44538E03C102627691BEF28C
+4243BB73111382D1F4F2C9D328EDF7674C7CA2BFF1570E52C3034B13E805E75A
+DC945433E1222B4A711B6508C26A4C3D0EAE6B81A664CC9024907319AA5E3423
+F9BC4A45A2E2A1330D2D6E6D087ABB22BD7F1006C1E8763BE1338E1C993432E1
+654098913C062B102A53F26F4A730E0756BB4A47FE961EED2A60C6638C1EE93F
+75FB104D556413B2314375DB036F4225CF86CDCA28662730E5022B980EBCD6E4
+ED29E615CDE69EE00F5DF937096A53CC303CD9A283950CBCE8BA1DC7592035AD
+FB215A6E4D2D343FADBA32EF8B9CF34402B89CDC729DC57F526FE3CD4AD46D1F
+295BE9B0D53FF0CB06EFF1919E9BA9019446CB33ABE3DF3ACB7EE9F5E02F9795
+BEF2E808CCC7FF21C9EA41C93E9672C035E37B75AEDEFC6384ADFA52A0762E41
+4557321D665719B7F4E43513C997DD56D526C10641CA654C19C2D35AC8CFC0FD
+6946C733A51BE65AE583F186BFAA4C8C112F94A24D33B435C8820F99E1D10F4F
+BFDB89537ED95354FA009A4ED9F4E3CFBC93D8FCB674F0E1C2C4716A203389E5
+A38E42C10A4C41EF6E63BC0B7D584A97FA508D4677F037CB1005C90816B90E96
+3B8AD64FC8D63E9DB21B4A8DA53C75F4BAC0137BFE9FD710D1B8E5EE3EF21E46
+4C6AF9F5E4676810CC19F9470FEAAB3D30F409AF9BE1BA0D03229F6F5BE5226B
+9471585C007D680F356F1F564D723049644039D1D3CB6124ACBE7C6BEFC36597
+6181E15716F691FCE490CB0F05F4E550AD35CC4D345B2BF4E85982D523BD919C
+73A974B806A1C8F78507798B5296D48F8A4B5BBB4D7B736C6ADBFD00D2590D3D
+924406CD1BB3C89636C55B1C90B69F51861A654D6683A0966FC413C1CED7CAAD
+243262B42908A3A16031EABCBCE4FFD02DFEBA01A0831BD1C8171D93635A1F4A
+BAB522D93E4E00BB91F7C18B38EE47C5739C6D215E330BA68DDF5A16BB025E6D
+EA4094D60332A289053C0380D456924C548588B9A6F0330D351B95E511E00C1E
+8D82BA7509A653A4EAFB2002048632D63B9883AF38567E3AC185A82B7DAF3237
+42DA7EE5A95115E5CE652D507D66073850363DF068282134BBB3928551DB1A18
+8FE10A825C388A73C1F3DB270504626154C4D6A61A750578A107F0BA4780246C
+6BE6C4B69611B7F01EDB605B19ECBB7A229300893504F5C32E0A3BD998194390
+5FA3CB3FFAEBAAA2175B85DB4B8EB762BDA274FB322FB39CCC73689232CC0A83
+8E1EFA281735FA00FAA4E955348A595240821D120D0C9ACB6CA8CD9ECA4980C5
+4B547873A58BC840A28592C3E66000CB4D7A28CAB1978083EE2847F2B681EEB5
+2D2D892D32904294C8E139B0FA4581782A244742226CA8911F83C1D7C98A2A92
+6025CBF85E82824CECDD6A9E18445BB815FE21E80DB10E2120D14DE94B453274
+E5F65F6BBDB3146690B0B7FE4BDC1C4CC55754304AB6B61420164A88A76E8541
+4722CFFE8AA2664311FB7565B3F4FD6493CA2A30DDEDF03F5749515DF9214E7E
+0B219296F094F92637A427C30F9FB712C3E8F11533CF5C1F077E808AF37E3E39
+94D4B0417212312BEBF1F4F03F95A1799E3AA24352B93B2BA891DD6183DD124B
+B9833C82F4BA2B41403233DA8ECCD88842625A8DBF00B5E3E83989273A3F7F01
+DC31FADA68CD56C8B95479B21EBC2A295D76B68437B80DFCE037B3BF87CD2170
+8BAFC158730D3B2F695DD6C701C65011720B3376581D6BC79166EAECFEA6F9E0
+40E62651FC8C72F47B47CB2E36A4E7667B95E82C88E20921A52C76EBBCE06CFB
+29AB75D051007EF5BA5EAA35FACBF549A85B3B6F37E3D206F7C8D39C2085E3FA
+74D3211EF5E61592ADDA9092C0483B9ADEAD2C64B6778AAA14FB6CC8A4FC6EE1
+82999FE543B0F2DEDD7E442E0BCAD4212F38852D6F2183EF8C3DAC77666AF856
+C410454D9F1CDD07DBBEB1547E6718FB9B79D00A9E3F744071CC75C3F48F8BBC
+3F09406F816A86BA4CB0D169E473AA3A62D68785283B8C5862E631A9BA78200E
+8718AF68C6215B68675C94B43EA901592FB2B8BBD53BFD835356FF45A200AD55
+3075927ECD06924B6DC3F7FD0C4FA9AE61AE9B1C332E2B996612E8D9F49257B7
+10D8C404213210CC338206109F6A0B5C7A1B9AD18E0979A790498C5BB0BBFE1A
+3F3249489FAC00A369470B697344E989099D9377DAF483C93EB7E7420DA436BD
+0ABA11777ADBB2716927806D95526AA226E1293E84EF76807953C52B515DB505
+7942B890DFB216807468A84788EC815677FBD55C02CACCDB2654585E42DA9A47
+16C0D5DC9D321C43C5E17EAD6E80DC8F3D11D50976FB342E1D16D2BF5C8CD121
+1DFC079858141F3631526ACF733A23E71C187A6E7933715841AADC7CAF7060A9
+CBAC2B04E33B047684487D4BA94B16A4431374A8867504A4EA338E192532476C
+D8EAD70E0CC6BD674A8AC75DC18C4E4C2E785FA52F89EFA5F0EFC6F624F30595
+1436CAF9F1682D2FCECD7AD11429EED4F64D82B51F8E8451802D4885418FC253
+41EC5ED0821E7BCAA89BD70A62D281E90938332744896875AA79038971E778D1
+2E350AD149AF542C44DC36C236272FB12BB8690F689C74736C6888E2884BC0C0
+4E105537BCF3C8F0CE8292BC5C044E2C99665F3247AC9330A516A76420D070D9
+0082116A6A43051DA9AC00B71879F1C9C1D43EE163635E87852088A6D3B77A4B
+574265A679334DE35F02698EC7884C8140207187933A36E2C577753E168F61C4
+21E2A3AB436CCA9C0BD7E996BACCB156867A89ED2B8F8DCB6DB9CE8FB870DE91
+4D1CDFA268E5BC6A4AFD1B0890998345F2754045257BF43591473F351B62AA97
+D7307BB7AD7C8DB43A73D5EECC987F34CAB192480F570574227E2224A5CD0A07
+3E2BD0287A3C313EDF5781A4D9E1BF2B2B8DF35CAD3DB80E0C5B3972260BF124
+BD3FC3EA966B57D552DE87822AFC04A46291CA66623FE48F0FADB5DD7CB571F6
+F39F0CDD7F541C9503AF6008B389F3B1FA3743AB1774F0C9FD4EF228D1C0F9DE
+E10F5839D69560391FC0AA8EFF9D4B83A970FE1351CF6478E4D91ADA69E3240A
+B1B09C1F24ABE2B23CF8D74DE43E3301E60F21A12FFF51D03AC00C2B44F552F4
+0503BD7F3EDAE51A89BDE38ED6A4B16481E457517A7E363CCD3FACB112996A75
+771474432AB0F08DB7F5EA12C3036697CE979D321B7AE1E4A0C1323E05C0C4A0
+13C8F18B2F59A4D396182763B94A855CD4CE21E4923B6B9AB3F7A9127F5F5BCD
+3C4550F697B4BE1ED870525BC0EA67F994558375C9E6D28D618E9CD9675CBFE0
+BF24A75A1B90B73079E2C7222B866C89D4D0BD9A041EF0FD603AAA9551A64C2F
+EB53C41DF2CAC894B78F8C84510C79F11CDF8518D585A2A5018A55CB8EF9E30F
+77DE2200F679F9C3642ED792137130083C0F516C98B6EF34758207B799FADD76
+E0939B3C1AB3AA12543AACC2B9BD2642B0FBF48E0427B64ACA02F1BFDC501413
+83E32E59F705BE89284AD702CB6F9BBB88F223ABE70B4256B8511EEE6E21E048
+148E8B4A7945A5A67D9819B632D86D6FA1CA5E0D040994D8165A5DC175245D68
+42FF80A82575AAB2B91C0472F97FDC8B537201F2E551D18CA39669DFCF0A1586
+370AA32695557CDE598771E158B023404861CC76464E098DC4EE83D9EE9B5250
+FAE90B4E0B2D46BC459D99B706E8740DD701F4C5F5D1DFCF365B261405541665
+B1E532AA3F9F03ECFF018E9FC36BFBBE50589308137B120975F70A3965582260
+1D975C394A11304AB7EB5A1448FC02CA062D2DF50D3611C2C00179501089BAF3
+E57DB91CBD6812C695B0CFD658D3AA7C2C32713B18D420AF945D00850EA7A0BE
+B98096A00D9AD0ACD656D4319377700D0BCB6FAE93A54BF27B3976B8353A6261
+E25402861065694F507D81D099BC6E4EA8D851277A8273E6318739D74BBD7344
+5EEECC73CFAA72DC0B7EC2A8794A5DB64BA9D4668E3E9F330DFD7F27CB83ED92
+C0A8480A15DCC3A16B7EABC23C594309845A4595164711333B2FBB9F877D8A9B
+426130F95F3D645A3336EF17DA63109B5BCCCD0EA1FD390E6F0DA649F81AFD8A
+1973EB6C74F7663D0BAEBBDD9B0738DBFAA9B7657E7B291E803D14F1EF7EB1C6
+B9306C771E3A5AA3AADFE2060D2323A9758412BB6E44B95F82DCAFADDFFD1A6A
+7F194B3E4F67279EA49410DDCC1F7DED6C0B34515D5E203BCE36F8755EB1C2B4
+8184AE1B1B570817B73D46D498358C4ABBC349C283DAC96B3FB23D2981E47337
+DCAA2F7C1010AF1C4FE80B7C22C534BE4FDCBBFB4731BF99A369E1E3D6231132
+F5AE9D2A1D701CA8B9F7AD88A5E17BB90C305D6604986C41058C6CDB78CDD043
+CBF6FE9D482363293156C6069C0ADBCDCF3710FC904361FA0CCAA012D3879556
+066E179E09FF5B001B52E838735AAAAFA899E71F2928562DA997133756576127
+CD0FEAB3447B5EA57BE6C32701D248813EA8B93E869F2137F65D5C1A0AE5D5E4
+21393E16DA6FA116864D07D17B1C8F08560DA2532990E2FED66D0E0FFEFAEE49
+55418C41DF71AAE21318D1CFFF5B38C90F7763B278DC825CD31CE53CCE9CC805
+C5A11B3CCE9EFCB43928C1E8482302CD6B66A2CF7CBEA7E98294F7F25C490478
+3080E7121F2ECAEC5F3563BA632F2E2019398B584284DF9EB96666FDF10AB2CD
+2D348D416D29200EA47B9F3CB5DA356DB357E0682943F0E5FA543987EEA76020
+F633FC4553F3D4E2FA6B8666374200BA14F12E9384A8099712A2E17916C61934
+317D443E56D8C3B5B11B5ACF389C6DF35125D399D19EDAAA53049E119EB110D4
+201901CF7D967B9BFDE6A5ADACE2222CCD624B6889D3574CE6E94F956198ED5A
+0245956F031084B7539141D01C5B66F6DEBC3C4F2E90E7756FCA65708F755E61
+71533842008AF59B1A9AA5372FDDB7D0CA18BE1EC8E399B4787CDFAA931DCBBC
+2AE9687D973DA7EB4F2F764B8EC359017E1877F4EF5B81A4A7684F87C4F91BA4
+54644E4C2D45F320A4A58592AFEA5731D47A118C814136EA91A00BADC6946669
+5EC507D7854C1C3AFAD477A1D844A520159FCBA8AD708B522B2FF6FBF55D8A0F
+6FD97F7BB4C4F61DEA1237DA3B8E42409936DEDD8EACF155766889931C4A1740
+4C3C646904268114676AF5B0E5E614930B0836BCD5292128779645E2D8743D5B
+75D8442A911425C3932B61F14C97EAE0D895B97C957B9C0489D47254A4ED52DA
+99F6C27F314E03812E6B45B690890743EDA6CB6410952E4AACF4EDB38CC22C89
+2E569D597B91ED013F696F06BBA6E6549C4B74B0D6DA6C7251E744CAF092EA4B
+D3ED88A4E5F8873528792A2549133E25C27A77F074142E38D2CAEFA2D83E7409
+83488D979E5EDBA0AF0EC16BD4D5E27E624765A93DCAFC7911604CD2530F754B
+C64F3F70591B8E91B2C28DFB8A4DC3534C6C74206D562DE3567DD3C2AF1DC5CA
+52C91FDCC57B08E23D47A3F9E55E1CCE984991AA4701210857FD85A8C2171FAE
+6B08136B3A5A1D1B738D0627F2FBF722F64ACD86A083CEF02179FECC90E2E6F5
+3567678D46B877850E30000E2061F68102B8B8E92AF0B9183F250AAE6C1B7992
+6AB521E20196EE31A08892167103257B1A9671CA14DE2079CF8770EDB83BAF9F
+53DA650828761D27C50DE9FAD629BCAD28805CE37222CEAB505D9508558FB660
+04D5550F42CA25880E37B395583EB95891942B443DF0B3B8187D5715EA366766
+E59E29DD4BB93A7D0876E35CC891EAA996CEE283EDAB491FCE06AE7B04D5A0DF
+31CEDEAC4FA7E7FA52A9DA00067A7D3BE15C0AD2166D5588B879E6019504F633
+95E783463A8C8418659F3ACA7DA1EC997D7A04D09F8D83784702EA9ECB3AE69D
+C56A063B59A8FCA9762D3DA187DBDF3DF719778F9D2578163CA01DD9B5B78DA0
+B5D9CF241A4B8ECFA244EE22D3B59BF9ABCE7320DEFADA12D442EAC7AECA3B40
+8EE795F3909C603B80DA8F2C1DD9441F84F9A41273ACF33D03F111FD78259500
+9BBBA8C3F021C09AD376B170C1C5FDCE2F8882593219D3955D73C0F9827A0A00
+262B4D50A92969469C1A3399F8580B67BA618D99947CC2D6001749FF6E90B2CC
+07617E54B52DC6C952B5CBB975CEFEA8E4FAEA7BC4B019BCEEF05729FA72E585
+001AF774F0F62C33C0D9C085AB8952CD7C05F0C4B63DC1C1C2EB91DCEB7A503F
+F0627C145467F95C8E9DD49FF2E8513A3691B4EA94A96F90774B839E6A7150E6
+842331ED976434BDFFA7526B4D3B4204BFC3C550B68F8EC23C735D3C23F97796
+4F07C86CD3E76AB44A4883B21A75A70E7C10404E6EF46719B9D00772E515BB65
+7B28F43986A8BA067C6686E4BD54EFF94038750976D74D74833CF394D6ACCB7B
+40173D0B70757EBEF5FB4D30C487AD7839EEF48E78C4550FAE0F1DE33D6A472D
+CD3031B2A3DFB0D743BA0FF56F6BE3E0EFF3A7471A74A1F55F4F4C1998BAC995
+3B5B456934344CE6D634E1F2D7D12523D1EA8720A55D5034D99543A80AFFB0C5
+D352E32A35DDD0320956D21442B3A6E82E83D81CAA47043944FD10CE1B505B97
+D6466083F1F5C6DC2B2929783F12658766898848C1442487D0091BF263CCD603
+52F2B00878D567075D442BD8731ABCF5D2C83F36A0F9A1E6513774501213BDB3
+CD17CAA600F19DF66E0CE30233080DC6DC9D554D95FDD1AA2BD681D1C992AC48
+329206615E6CE9EB6DE557FAD1B93BCE7E629962E42E542996231E4F5DBB96F3
+C98983D0F5AA6A21279618F524DB66C8863937BF8ACF9EE54C403A7E4F939388
+76F64E7201FE28C37D3745B817F282D9F85FC68693EC7532EC329DB55D4E69DE
+30F7515684E7F0D0EC089DE4784617BAFA338B369BE06ADD099DD7EAA13AE100
+6A36A3E098E41ED121FE71C1958477B1B592B32F9A772BB15A8CBE00C2CEF494
+4984A9C5C590BC158EE52960D641FBE2FC2F8D5D47E753F67C9581811A51E4F9
+9A4EA2F413DF149256CCC0F0F3A31207E8E3129A0E3B26A0775DF6FBD0DEE987
+3D30C1F5186B4E26F574B0CFEB2DCBF60DF97E82AFF543A366F9DD6696851741
+AD6AB8351D633BE824CBEBBA9C5A98AE6F1E23B9587F171AAFB43611DC5BDF76
+2BD293B37EF19137CE825A6B8F6413A22ED5E46BB4C922AD40E2650A6B4D2277
+47281F7265F3ADB31C432B7A6B88489D10331A923B403310BC0BA06B85F48785
+72D3259E3737071BE8A118D9549F3479A928FEC0116DA2B41D12BC958D0918D4
+4A8C9CF30FEA2149B200FDFD03B4D0CB0F148E89C344B90C59936A4E7E290654
+81B2444128E79E3D5C8B8A4A4BEB8921C504050F4177959B25F33FD25744080B
+4F05595644171EA0FCBBE047F31BE2976FFC586B38B9982CBF76E2A67C8C50CD
+3C594701C91398605EF946D3FBD80B96ECB679CF5894525BFDB39690431FE060
+60689DF26CA49C37041EA77CA90E89EF6E78C4BAD0F4ABF33626ACD029FE4809
+C409AE68C321A594E19A081D4835A538B63FE0B7AF8EE3B68F34E2F7976D4EAB
+B865510896B0133C287A3B8FAB4FE04E9A9BAC9865A705EBEAE689D0736D39BC
+5181AF6B84701CDCB7176BB0F9107FF547299AA8B8C8E8058D6B7805F084CA22
+CE4FB9F8A520835695A71D733CD28991F6158DCD0C43A09314BF520BC86BBF2D
+179F0AAD7E934A586F31A196F2A0718B30983D13F8DEF42C59B7F2FB0F8EB3A1
+F8B519E9B9CD59E18B3D5240F9EFC306BBEC014FC566445BD8B76E5AF0252FEA
+372DDD3DAB04E6D574FB30653EF31F7D2CF6B6F3DFE397D84DFAB299B7983BCB
+8210FD423D64A0BDB250DADE971A61D08B78EDC48C167C579B8926C60081EA8D
+9BE64490D5A6CE67CDABBF06041AB535A21380D43ADACD1B5C62664BA44FAF70
+1CD47EAD956DECAC0115273386EA8F78B268DA881EC845EEE5F3FA5B39B0A258
+E475B58AA506B250DBAA66059F7F420E3686FFD482CC9AEA884CB9DB881B4210
+A41BA3023BE3F62F42744379A82B140130FD6037773E62E4ED9AA6DB831B23D6
+672115DF51AD99C61696594E9750E3F9D73B215345A1EC45FE47F8984C4ED919
+B09A00582B00E72E38D602F5285C7F266D95AD1FC045E63BF653C8E781AE40BE
+84271632E81777B0FFE8AC6C53CEA0C785E4440D84216D2EE98D8A589278E06D
+FC7B5AD41D3DAD85FB465F63D773899CE58DB1991E71F15FEDE9183743F20933
+3CFC0EAF71B9711022D5AF0030016F28D7D5651975C5ED9EFCC7CEF436464F29
+39332330A92D8F8225475BA5CB2A6FBABBA28930BF747396C2F2DC0542BCBC3B
+98ACAE77991DCA7C81A3EE50E03555E9578D516C511FCF7682C5203CA9E83F83
+ABB3D68231F4F3445F8AAA41642C47E1400C48322E4276400D9CAE1A62213F4D
+55B854C7C255D24FFE8B20F3C67E796C7E8146330E43167FBC56434E40167A5F
+9B8A9273FF702A4F2A48B85874D309DB3B4824692E756981D7E53AFF26A1558F
+5D7BE49021311B18D34636D3C2572F3B0859014DEE1519D5FC47642A08FD5B7A
+CCB41475ACFA477D496C491739D4F32B6239E220A742EF9479A6C09FDABD580E
+E172FE89856018DA055DBE38097073833FDC90D9416B81B3B397C38ECB092D1F
+98831F1463319D89E2F978CD9F7554E6074FE7B1712560C5BEF1C7E1EA5816D0
+B10C7309A4D7C13F2F5D88A0786D283975F98A4CB847B51EAA2E65A2E822AE1D
+1FF5C49B42711E1BF49ED933E1485717EDB08612C7B86B05DEF387C2B2951610
+626DB79C36F8CB5181768B4C297A5FE8D73EB470594CEE2D0B12659D9249D1C3
+70E9B0E02C5B74D16021F039173A98507B189ECF34E4C17F982738B9B48CF9D2
+2CA18E2405D929A1F0E75094956689D7B9407CE9A8B392E1E4212FDA5810FB81
+E66BD56AC62D271947D981A459D0DA12E0FC520A54C7369AFFC40F698BBAC99D
+2128405FAC517E8E273869809965D208642C73531F4C670BCDF69847ADC008FF
+087487565C3353749DF7368566850EBB3E06B9C79D27E7792E48ABA5DAD5967C
+D3F5FD33DE4A39DBCFB1AFB37DFEC440165A03CD0F9A0B0D72ED78A56A6A6C78
+CF1E06EF1F4416F01576045A26722A346795FD4D4D76AB3A19660018B26C86B0
+F45D403864D6EDBE6231764590EFA528FB31BA9ACE331D3EEBE9871F209336A3
+935E8842954CADAF5386325C4BF2A87969FAB335E9FF3704929E0D0D5BBA1D59
+795A5328AA2CC4FB411C0B5898C092B1911334948BA2109432AA5045264EA67F
+5126164BC3FD96EDC09A44809091872EFF39CA0EA66EAAAC6314C61B505141FE
+A631F8B5862B04B1A4DE1DCF607286B2A3987922E0CFAC1D88FEEA2D2C027C7A
+121F76F9433E5314BC554360874933FD7AED268986B789FFBD6D6535772134A4
+52B2930E0207B273C98BF26A0F6515A4B42F39A4935E10F1BFED78D292DAB6B5
+105A43E5AB00181A6E3F035B28C5C3BAC2B6E9E6B495C08910101E47AF030DE4
+70208324CCE7E0421173166BB245B544B9BD102374B67D02E99FBA474E9C96FA
+963CF1B714340AA83F9AD5AF75B468A6DAD13E1F7420ACB51B0096EAB900C4B5
+2AC1D2866B273BF011E2C7C07F6FCBF0AC334A8A389D0F351D3C74D403EF66D9
+39DCB12D7DACA0F5EDC39F2FD220CEEFFF2E1B9617F305CDE3E740C066A0166D
+EA8B7E08FD185D048CBAEC8EF574F59FB4F80DC8382AB91F56388F586D7C4B4C
+3823847086B9EC3CD99DB118DC89066090B20756EF990678BAEF4498694C0884
+FB309CF7A22CFB79BBE1D4064021A647A957B773052A0CD872AFABF04478516C
+97F76772B6F511FC2EB58980103DA0FEB32E61D0C83FED84B967CE31C5F19D85
+A566ED750CEB9C8BC798CDD9F0138BD650943137394BCCFCD97EF2DFC435B337
+4F45AF417F9388037B4C5FB681F5E11F3BAD9450632E1C2DCFB263EA3ECAE66F
+AB78AEA057C18ACFC12098E0DD71D16EE1794904252BC427298F69D9FEA435A2
+F00A5BD09DF5C57254EA62FB77B0248873AB68DB7A60413A96F53850EC693B1F
+C5D2BBDFB6B197500C2CC5F35597D452A501E812C102F8C235542FB2E78278D0
+E1C1D0C96CAF2628B54C98E3F32DB8D62CBA3441A63945A250EC21C4BB97CBA5
+4A80F71E30CBD8D974EB3FDD3ED45EB008ED54D76BD01766FCAA8F6753402C07
+EF04B9B2308F66D56CEB917E0848C72ED4B1E290BF4A6FE7728CF68A23F6EA17
+3FF37E5F9574645DBED15C540C0DBA3C61E9C02697329BA57C29F3D28B5D76E9
+9EBA8F527DFEC6C96CF090804EFFB25E1458FC5897CB9E269BF2FF6880222F28
+1988909D794620E260521B65CBC1C495DB903F916F50D15F36034506E0838CF1
+D741CA25C5C2B68679A056F03F65C842BD628A2AE8D73203876665372DE0B048
+C2FFC030F600E500B5699A7CF7E9DEA818A5653700143FBEB970F2D51DF32730
+FAA372EFAEA1A4E15E6C2096AAAA5AE7DA3D9C05FB11F83E853763DE89AB47FB
+89411C369F036A03D881664AF026D76B52742B74F6DA12469E8D560D3C2E2BDA
+3357A562201416BAD3F046BBBF27A5ED52C606C96CF2FBE7236F0D76E10097E3
+03ED4F6A70BACB2E52F00C260C61B66040946AC7A5B4866C61501A883897512E
+FAFAA687ED471B7CCFF704B4674CBC082B07179B30F0A78459B6D23A16C49C07
+BEDA6A23F17F25F1166EDEE0B17F43AF8D897DDBD715B9D9FB540949EB3FB4B9
+8B749FB156374E73FD7EBD72EC9C4FBE54E24F17AAEF29B1E846A42C84D3A1CF
+27E2E59BE76B3A8828A1EE70887CEA3DF74A7C7DE9A239CCC9E9770740E16E87
+84EDFDEA5B34168384C0F429178B7AACAE1D37A731AE1629F8971811F032A2F7
+A88C26E73311F6BCEC83FFC99B01DE9BC5FF9F34999DBB568199CF8EF8836704
+192CD77B452622002C3DDF0D5BB06FE822B0583E00A425D85A4B29633B1DF56D
+9F5F7CCC9AF8C4333AAB65841CC7A4FEFBD07ABF367D0E691E22384362F43AC1
+4EF4FE416F8FB32F29EDB2A20BAC9D285D78F8DC79F7677DCD002E4A30C98DEE
+4AD9EA0B00AD161BDA8B6C19922E9840B3C2E96CAC90369FF71A3E5311A4334B
+10F53F90109B6C218EE7B8D23A95A766DE4D4541ADFCB4A488D8F913F9D07D35
+2B303F2518E0BE70549BA0F0D8D33EBA0CF23C610FAFE29C1302D7FD008972B0
+D8E9DFD0DA84C8CEAB1B160056C2B69F7EDDDB93B069C8E4378C7777696A7ADE
+9DFD45125F9609D8403F72905B73B813F320B6AF2C9D62532328C65FA25FA75B
+9B57A65347488BCB948FCE4E3843E9A195F5D6CC1FC91CC9D474AFA91BDB9F0D
+457D08F869F21A78800D1744957848AB12982157748ACDB74814C05F40C5C630
+171553B9A547AB9650509B4C8A02740182C0E902120721DDEC1EAB1AF4F9EB81
+2EB8B93EBF9875D368D11696BC7AC7631C0C357E4E90F121B58009626C101972
+BC86C45D2444AECDF6C734A9D14CBF243777B970247A6587AA078EB820DD9131
+2D729B6B7BC569A444460BA522284509F8F5A70BF465F20EA91733A07648AC0E
+D7630DB0AF9FCF9FEBD09D8847C8CC6CF63424A784937F00594D311AEC11B55E
+8AC43A2FDC85DB70DE025FFE25F1D314CF06847BF2DF90EC2F78116EC8583A3E
+52D8B8F0C8EEB01DE18B3F288710FB14DD0E10A8A4E7704662CEB3CE6E856FE8
+21AA289801B84CEDC7FCBF815D2852247C8D06922F8FA940B93421F256CE37F0
+441F8095E1A3481AD60771C65113C61D844E489725EA5B34501709463897CB5F
+B01CAAA3BE5109B4A49E
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l048016t.pfa b/lib/fonts/l048016t.pfa
new file mode 100644
index 0000000..a14e724
--- /dev/null
+++ b/lib/fonts/l048016t.pfa
@@ -0,0 +1,1269 @@
+%!PS-AdobeFont-1.0: LuxiSans-Bold 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Sans Bold) readonly def
+/FamilyName (Luxi Sans) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch false def
+/UnderlinePosition -39 def
+/UnderlineThickness 78 def
+end readonly def
+/FontName /LuxiSans-Bold def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-224 -211 989 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078988 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D830D512B6FF3BE2CC450E
+1D74C05D938346D8713E75C290B6906D919052118C8C44FE8218A20F8704A3AA
+2AFD1790F3C31C39A443F7CB470E4FF7E05E8069552396C1CFACCDDC1C77FED8
+D4E7A947701898A3E50351EFEB35877FA44F29F04D5E5DCD51D55B1166E650E9
+6DD6DDEB0B5A4C018BCCE2D2FB26C42058026C5EDBB9FB634954094EB160B402
+CEF86BE7ABA16B63A88F1FA3A87A267C8AFD876E1910185D01FF64026182F83B
+5D30CB5CEE202C27B727DF2E31EEB447AEB941B2FCAA382353FEDF664D72D31C
+0C3D1FFEFEC97E0F0DE0352DE4DCD8F4878D9F677F89747B330FC1582796AE19
+B79B28EA2B74ACA2C127E3B4A3ED23A57F4A48260D2A401F4668E48BADD96502
+E7F1239E705F21FBC7C4FEEFA3F9F938850077D029227236D0D4F3E1FA17958F
+36E21AF35E8C937E6D0F988233C8438BAB6019020698D80B9C37EF035238364C
+E57BC9ADFA77D4084795CFA6A236CF1E0DB7095F4361AC525DAD39DBBD9D3D32
+08AF35AA38CEC79C2BCEC3B3AD52C93D4F14D25535A391290532BCBA80A9EF67
+0387B566C065825FA04BF4998AEA0942AB50727D74038FB6B602BF5B78C4CAF3
+75F946BBBAE55C32E858AAAB72F9BA53CE6725835E5654791953D26F7DC5EFB5
+5064F3DA56BE3C0A7E6BDB57D59843B0AEC11922A53B1243479DB95B43422F05
+95A1515EF0165589E6D74398C0D2C9BEB6E516304A4AFC8F76161A074969107C
+48FBDF8EF6BF7EACB8CCBC18D39ADC605A56A048CBAA3828854D358D473A66AA
+DAEBB2FA045514C5AA1B99A174B2E8148ACFAA807038B0A8751EC028E89CEC7F
+6D30099DDBB811888C900488E09DCA1D60BB398DAC1BB2A39FAD166B6444C182
+8E8993777B38A3EF591FFDAB9BDD2966BAE15327808E560AFEB82941B65E7B3C
+49B3C59330E2BA07204301F845E32EB608E12204EB511C09D06AFCC2BACD0654
+8B70A1A15916CD5CF40B633F3626B85366E1DD3545D14D71B21184CED78AAD6D
+A7B16AE3BD38FADDDABB38EA2BDA49EDC3926B1526C57D9631A664E872610478
+84D1DD1A3E6CA785B5630C31ED8EF22BBFA07286E8E446F1DBC37FF4A4925A99
+DDAABEB0BAAA3DF5E60C3ABDE27C49F5483FF1C9C3358D3F1A37C2DA1A4A53A9
+F4DE466B3375BCBCAB491663DC09CF549A191B4E53B533D4DCC3D65F0AEC3E95
+15CE5CFED746E12CCA4663FF4B93B36914A7688F13BED3A7A4B62F272199B8D1
+01CC86E75715BEE99940BD3B54DD82F8F3C3BD993723E0F032A89A46E40D4187
+EDCC579654DB07E4ACEAB6C1031B35466250647F37A36B1FD73CDBCD9ED005AE
+855D6AC8C5560B7F498FA3DA42D510AB98D922C364410F36D3AC8F27F0CB185D
+004AD2B98D3AC972C91E47BBE1C2766F2A3480176645B2F405589F151719DFD3
+7E40DF255EB133FE40C48966D61B175C9C1C422D654DF914AA78E6139E2EB05B
+D3F4DB9CCE46D7FB174B210C45D7E60B2DB14145DCAF2B5013C53BC002762DD6
+DC0791C4FB9031CFD24C2236AA61AAAD8AD8BCD9045EADAC9CB6E6DBA94BF817
+C78C0C686A7EBBF7B37BCBD484393F5D53EFC93485C0FBF6331F3A5D0A0AEEBA
+23BFE63E49B48245557B7C88B478FCCC333CC083D9D5F0CC2335D5D908413AA4
+8F690E81E40BBB674F7E2E37F37DCF5EF9DC6D7CEA3F7CBA27FE86AB62F65F36
+B2F0996F7F1A33BA903243ECFDCAC2756E95C19E4718AE188CC7384BACBB2200
+ACA8A513F352B241EDB68CCD6A74273F5204CC22D722A00F9930E874515872FF
+2244342917B787EAB3341439041E3C83667441D2CC74FB58195E474A55442280
+75BA96B201E789EF394C54AA51D2E55EE43257442880FCE2676A7EF904B01921
+74C50502863BD66DAAE2381309F33A3DC0F055EDCF96B2B6C9ECE80F151708AA
+750A0F2BCEBB3ED6E586340D9DB7E78BFA775366070A9E7EDA869815A4AC7B17
+3F139533B2F721832B5E846AEADC4E952C709B3F6DC3185A913D0820EE1933BB
+0B4AE2A6AEFD68C99B7AAF6B11D8F012EB816781A8A0A99C2EC174B0B6869F2E
+3D373E1CBB2EB3FFCA74B5A3B1667ED301AD1380A02DE73F258D2B99B81D7AD6
+00AA0E604200A17BE9AB1403086BB55B80E6B693B64C48A7AE2217ACB82FBE70
+3EC1F87AC9FB2B637D7D943EF4C4F6A49AF445A76A1BDF21F67493075AB227B1
+F36A743201A64A3797EA6539AA99A864A57DF2B651C3A77915A6BAB4B17E191B
+576C80E4023A77559305C25CC0D75E6BDF287298EA30D2E916F97ABF092CCEE4
+FDAAED0926B95AC5090C01ECE24D507ECAAE990D7808F294BDC0DAF5E74341B8
+3B9406A60C3CD4054DE11CBA95BC1C4F57531636628524311AF3018649CEA3D2
+1174EA1EF50985964346A8AAFBB7A38EBC9F01192D741665FB01CAD36BC34457
+B0E2AE912666E96B6E4F61160966AA3E2B051CD61584D9DA998FF702FE01410A
+62DAAB390155A045DF241FC47FE824E49A5E96D3BB3D354DEFF8F21498FC4F8B
+8906C6A7E3CC692EA39013DEBE53EA53780AB6FF1CEEF8A2D2C2930DDCD31398
+6CE78CBC84EDFF1B9C0C1B6DD756AA5B53B83BBB765E88A8A0ACA6938021139F
+881FC91A4FF6F1AE7B2BC81AD0068835D69B465196625EC7F1A5D19141240C95
+F95245DACCB2E0D527B37B8477CA62E9933CDA5FD82BF6BFBFCDEE5D82F07797
+3F2ED2D86C8950A8D4F2769579F25961EB3499A002E40B3385C9628BA50C7556
+693AE13A9FE9921E3C712BAAF060CCB0AA4CE5F70A9C473CA0A5F53CA25E6761
+D269D13235377380380290BF10467C2A726C096D4FC98BF402E498D91F4C2ADA
+A0DC3B235BB50BFB85FFD5252A9727C174AC924DD4B086AD6BA76B37FE0C9C0B
+C44CF99D67C9DA1F97158C69D689BD6B0D313ABB5F8BC62AED5787B33749C569
+A0FF5A740C6B51371CAE44B9F9A516C06341FD0A530ECCA6BA769D016E3E51BA
+016AB1C7E5B4A4C0AECBD0B743C97025C20D021A92E079B6F051138E5945EC72
+AB5CC8435892A5DCD78EBBDE078033E866859BF0F2368FDDBBAB67AF17B943AF
+A1D72B7E72AF6D5AF10ABA4350B627464441DDE21D458E1789635D18E3A51A9F
+6A97B5F73F7FAB11B0684C33FBE0227A67720F748C99C9FBF849508C9670CD04
+61BEF83CB62342C4215BA40968213B2BC35E4775218EF4843C39EDD64D2DD648
+462A625DEE03561D0688198DFCB24300DAA7348E9A2A3B7C3FF2119F3801BC1C
+450B23D9DE355A31FE26641EAC1C24DC1D452FD17A0DF9DE3016EED76ECDA07A
+96BBE3DFDB475675473851E0B6FC5784C065C1A49C88B9EABED14DE2329C139D
+8E62A5B152AFDD0E5925969881DBD1E11AA9AAA8FFB179789B6086B89FE4BB84
+736F63C2D2544A636A804D2FD6773B6B760E1493D342E1CB9693AEDE902D3ACF
+9765253D70A82D40BF2A300C7FC3C90C5A164F5BE083FB587B9910DDB220EE92
+D962E3B41F1D1D4517CDE42A1B31E1EC802220E487556F5DAFB74F7435C6798F
+D300019AA3460321482DD5FE5A0E513AB83021809BE7D502FC1CF70A03315BB7
+DFC2D92D57D026180E03E2F93223A2572FACCAC6E115E84341D155B11B15CC8C
+91A58C0F13FBB809BCF649BFA631D8F39C3E4930315D11E95241EB5C6D7179F0
+89254794EEC311CE2003EAE64E7AF47565AD3670753FDBA67806B8AEB8342092
+6C4455FE7FCB11CC99DE5747F1AB6C5E53B805BE44AD49B58B71FCE5E406FFA5
+CBDD6049906397B512151A5ADCBF89DCCEECD0BCF2E42EAF31D07147F459F299
+DF8CAE98460EBEBB371D8C04A7EE3D30EB34E73EAD6CEC8E569C344A4DCBADD2
+9BF49F036E25A722A0D94DA58DA12813A4900BC32E5BF7847FBBCFBB7C78E034
+6D5B6D4C951A74639BF257B122C698114A842431D3B7630C585BF5B4B943A83C
+09101C02EF689C8D2CD6DFBF459F0DA464320B7D2993EA5F9CDDA1915966D490
+1871C1537EBB120D16F8BEF6ABA64C72FB1DACC1299174432D59368220EB2EC5
+79B2F9F355F77959D5919815A90AA9C4A0BC87D40A06D860BA9B4BCD89708A65
+EFA0063378FC3EFBFD13003BD1E656A697F3C05FC6CE231015DFDAF48378546F
+CB5442A206740766A972CA9B08151D29C70702EFDE0EB1187C1B15AAF948E994
+006F532E9227C04AD44EE22FCA8450D745DB2DD5CCA57AADFBDF081D21EEAE5F
+6FA39642F58E8E669262630123488394D37C47FB8110D90521CB3F100873E7F3
+BF89A26B6A51122215E1647ED6BC3604A5B8FE349CBCED5D0C98E7E50DD9975D
+8214D3D164A3079DC1E702E8B88704ECBB8E015293E7D5AD7EE5F30BE8C79FE8
+C1E98BAC278DC577CDD159DF88DF799B7B5A48FA9672AEBCA7B54935B204873B
+3AE4272A4F4A578C85F3B62B45D19F2475D76A7581FCDF7C6046442ADC2E2602
+B456F96C1526CF436E2470D0D8C83FAC1DAED4536304C5975AD70861C56DFFB4
+39D09D5302B0AC6F33FFAB5F43D465A85D4403EF8FDE2ABB552472FC810D8660
+4C88A1A7C7EF6CF3E6B2D843F72873D43716FC3C52CEB6718F0E714B66B83DDB
+B8824156A1EB779ABEB6DE745D2AE5615F565F5A1155EA0A8D2FEE3D9D0EF1A1
+07D5FE36091FFBC8B5CC09733D25C1E872925EACB084C30ED44470FA44C3B89C
+7255A46BA16DA37F4E1362A200BE49BA9386B8DBB0C54F3DC801351C083C986A
+B15AF96A717DFAE03A391DFDD7F812BB6566B6F3A4F663581B76C138E9372D34
+B3A1925EC8B59A3563124CA92456B79DC0B52613EEEDF3A719B8FBD44D873F9A
+9A4053F77E37143B2E5822C7971C9D6CE4129C64504D5D857F907ECFE27729FC
+3D3D7CCCE919E50E11BB62E3596A247F5377C8BD41BEF51197374ECCAFD3182C
+D07F7A931D0D0B17C956D8BAFF218BFEC60997D00207642C52461F48E9B66B41
+2DEDC7D90051CE288CAC0A8382CB3FDCD11C1EC3B74515A7E6CB157F7B2E2CEC
+E5A664011AD2D240BACA4496ADBB2351673E0DC78B3F9618AB412D04AA75CC24
+462D5A925799EB85598559B6E4194273BFB2F461FA5FE3165B5D49620E4AE070
+7F45CC85AF3BBC554E9281C99A601789010A990962BD8727D38164A16794E19B
+C62AAFB909CBAA7CA55A17080ADA886EDF6E38D09AA4E6418E8111B33CFA14BD
+0D71127D8F95D03FF4C8E247FB19BC9D0F33E50B7C1C8F0CAC0AF3A8A62E9521
+E2292ECA00E69D6C6F94FF7564C62382B1A8497560131D9C8377024A8D629BCF
+B04005423D59F2494362AC97BE736AFF562A591454207B1AD52B060987E5018D
+7A2A17F790C0854F19BA9FB95F04FAA769B954FDB5A1A5783456B42845357E11
+81DE026B170DD8EAB0B9A782A6FF7926DC23910800D83B169D498A8F3F2B9BB6
+5C30054793B82EEE43F9055CB214C8377E94A020B9098842B94BCADC8C921055
+B1B60536E6BD12554FC5A56B1AE7F96F7547837F6F46AD232D7E0BE2A62EBA1A
+87C74C44047149CB00ABDEC136FE5CC1A90DE011C80C87C9AA7431C656EAF1C2
+A9CA320D197746BBFE55603A34CD3AD42776139CD1E155EBF3B3BB64AC91EC73
+FC0E23A13DB317753789E3BF98561A21676DD91B6BF3715E88D9ED98A8E5EA32
+E54A7D84390087ADAEEC3BE995D19B43C9635EB8BD6D13A46019762699E5648D
+DCD8331CDDA187AE4D917308B7DFD30E6162CF927F3C2AE9666C8DCD8FAFC272
+ED1E75FB3EEF0527935B9C1DFB055F057C998E560B6598F1972A8829E57AE99C
+9D3389EDF9A7A8A3A43EE4713357396C62A27401EBBF540AB2A29D50C1DFC3E4
+4012F882A6089D57D97BC2C5DE19A81B1DB98EC4E8D58C547A5D131B84341CD8
+9CEBAEDF1165E8FAF604F0290892B813242B6584BFCCD68BF3F01995BD89BAAB
+7C7B8AC166F5F78AA84659A45D1EF4FF658136CAB8627405EB36907CCE200B0E
+3A36E0593B40FC3CCE029881B0329ABB1A948F5191750478F46A03C3CACC480F
+070ACAE4B6C06A911E88D649D297907DD631916E60603CA49F35A2B3C8D478C6
+9F1C187C315A859AC464ED353F09C964BC171580257A31EFFF445950E2EB6106
+7EC224409386B3CC2BA0819B6CF9C895586B23E740C7EF1A1814A26117C868C9
+FE8A5FE3A8DB9F53165E0C62CCEF9F3735EC18C31E0C7C743B0DBEE893DB723F
+D1514A59713B273D4C9395235A126BB9155B14C9F47E20B8FA8880C717D756CF
+CEB12CC6C82FA5D3F4CC91A39BA398B920B5CBBA3B55E02359FCD284DCC3DBB1
+63DA4BA07C38E3E9E64BF24E74B62A6DE5F1521D4A1DC6657EA507E56207726E
+08C5AF790CC07D908750D852A0916861B8E67D78CF8ADDF16CF9BC6322274AD3
+8101E46FA56CFFC505B3D6C20920F13D8B40CDE364D8FA91E7357E5FB218A3CE
+40F84B5E537D90290154C68256015C5B8BBDDB702DCAC1FFB105AE9CCE0A65FB
+EF43BE91E7737533349E0F6D227B30E52D41D2E73EA55F52D1A065B1669F97C2
+0B4B1C2184C4161820220A52E85D3A0EDCCB2A5BFA3B406A2F675D0E272E41C4
+E6293BE2CF58E8536B0AD6087E5A89DEDC6C93F981B61AD9E91ABD1E4B2DD4F7
+5F909701A0EBEC140EB7840D69F2428045CD604A590F47821CA8D51DE41E07E6
+C69D97C54D21A64CCF2E914D4AD2C444C129D767B285EDFD21F8A1256CD18D3C
+3E5DCD834B3EB61B39FAD0579921459A1D6D52632A7CE0DE74D2FEC0A91E7FB2
+AB4C61CD334B66B27263BF8FA80456825DEC46D7144CE5888A73F545905F5B51
+0AB1C1D8FC967B23741C9139C2497899A500A0F568BB22272D360267AE36BFDC
+37022427D27F6A5AB5CA408E2E925339DCF18DD3663A2C088943A59B703F6BCD
+B4DFF736DB3EE64B31F93BF8E8E04C51231E453A4264DD5CB3EDE03EFDE84C6E
+EA04803556B2323197F4F0EFF3B4CADB6F645DBD3A80E094DF41DA69E7DE2230
+FA155A5731DFB74212F26391BCEF10568C12F3B63ED608555E29356A31DA7E03
+6630A630BA93CA08FA4B2CD93425B6B1B166E64759051117A5CA57375A175B58
+88CAFFF8058A6620717E3FE9B0B3199E201B99E29F709C9A1BF56E775F295EDD
+FC347391E56FAF1A620F41FA2954AE8516A8E7FDA373B6B3318FCA7B050474FF
+5043E3C1F6C2ED6B6393CCDD3EA31307CE63487EC58B0EBEE57B7FE38A797E32
+FC1D5CEEA4194031848930C172D98526455C6F7C97350B893EF62AA17684E675
+48FE4AF909D9D42CC82B801B19777D99ADD0CD6CF454A42AC60B6D973441E4B2
+EACBFFFA2980779B87FB9DD3FDE5DF16BE1B67AA40A382EE0A5EFB6BEEC313C7
+313CFE4522CA12401C2236D6BEE454693A7AE8275633D580CB578E4EC4B5909F
+E549B79860EB0381B8B2C60A8B729F231FF0BE0595747A6934D70274FFD50E31
+ED10F8B9B998956B9B7145313D667336D28C65DE14B92B5DEEB935200390211B
+A871FD3910636BFF0F9F3D932C77C412343DBB318F1C1863A71B0321D8C3BAF9
+8C8A851E1B210C3AAB8E4E92A7CB4743FDEBED828B8B40C18588BFA45C4972D7
+E25707F2C8F0F295D08E9D56C6C565467C088FDBEEB4185AC9503A87A3D0203E
+6913E3196A1061E4D788BB04A481D513ACBA92D5C024B51F5C974B14198E9C95
+564CB28A446A2D5E9EB79BD08DFF005D23E80C68B59D97B4B8B9D407885FF333
+B19B30DF7582E296838D7D68823896EE44C2E82D136840E72FC34CE6F718A07E
+E880A2957A3B516FA90BEEC49AB0BF5626609752BADBBF836E38E066339A2D0E
+8392B31B7A0F2B8256311727BDEC7102D7227584CD8F96FB0F218E7AC4B3B407
+61F6D338D99C1F315D53FA5176BE6563437533439020C2D967F0BFA4013DB08D
+678445D75A980B2456241EA5E20151D12B5E9E573FFEA0432EE3C55AD16E8C2B
+251F17F3AA1916A5F4FB99ECF340AC0770A763927BA3D5A03D777C84596FC8F4
+FEB2C582705B8A4A50E6348522DD166437DDB2BA6B029637DC0A189208FC51DD
+1CFFD1409F17A5B6978D776439D702691A79412B6114A9EAD17B2776A791AA89
+9CB426B20F18F45093EE66A86CFE232A2A9B979074D2D77FA0EAD9BE8A7C731A
+E38675C5E1D1FBF36AD4440D616817BD48C294E387F171FAE366474924E09855
+9839690F0D2BC32A0FEFF7E0A5D77C22BD692C9EA0557ADA09044AE6069475B8
+9D58EB7041A9C9A4CE8482ADCB3CCE1CDDCF21D842C619813D830ECF67B0CA67
+80E5B5CEAA3219E7D3055663F34D9BC549FBB66B199F36D4C033B74EC374CDBE
+6EDB97CF2ECC5FACF8A68D9A8514D49014716D5920A30E85908E232A8D8ADC5E
+4306F54550CD95ACD81AD9A997F0D518A14FCAD5997C892B54354CCB94BD7256
+7AA5FCC78175EEA5E30FC5AFB22CC1EDC499303058D767BF038273E6E3FBE028
+D514C87AA9A57EB739DF5C60D943FD5F13BFB6EC3179ACD638F3968CC3DA84B6
+E4F72FCE3DDB95ECB75C272BD790F670B9DE0D38F506CB2554FC55290CD34DC3
+EB2FAAB05A3429EE46DF199219A975BF5A55B7E802445AA7F3722104E7608F84
+D66A70ACACA0B4AE6CF96B4565577031EA3884766458C090D5E088B00D391D1C
+DD5F456F17E32A00F259AEA00A6419BC21DF016E538C74CFA23B1739B485A150
+C57FB3C7C4DFF0C2BBC03CB1FCB80AA0A8ECBC1F76A371259ED8AE2B92BECFF4
+573CC1B5B502ED6CDE7A17E20E8CB77C49F47DB74A64F66B43F8DBC1D4E75089
+440C1FFC5CF38A3F498CA3A1D226287CD54C1F5CEA7FBA8DF6D1448D322774EC
+3C0218D5DF970A012E1F5D5499F2B9D7C427741B518A7E40C05DE156DDDDE625
+1A0DDBC011601E7ADB83A38B9B988FD3DEB78B0E9189A6CB35DB3E12169BF0D0
+04AD6AA70E2E26DEBFECB88A224DA21AAE268BE352F7B591274F7B85695F5FF4
+5DBFACCE337F2220DA9246138706A0401C7709580F0DB5642F24FA4EEA4982EF
+4F221DD7686A0902E70E64DE739819B4A34C34A8F5C68A591B2F169D3F9E57E4
+409EE3FE9A19EE8CC17D6B23F836DFD6D053E43178F72C8CCAC64E90D59C6E7B
+F8F2C0F92CCA49109409E471F7D59743BA1F9756C105E2B3A88431E74525029A
+5D791598E6757242D6A2BEDCB07568DD3EE55AF3C2FE01BF49BBA42F2D669637
+8FA4AD2CBFC8335BFA14C486A3A80F5682F51719C8C5050E78AE3632B88113AD
+AA13AD85403489DDF471079F73F641A4DBDB5F829B69F9591C13E947C8649F20
+F4035BFB5B872781E8DBD33112FE780667F03EF8BCC1130691EC49A4F952BA27
+01CCEAC81C98E1E782F3005DCD160C5F10390470158B11CECE9DA5A140E33000
+801CCE2D780F5624CF5367ECD0F037F7DD4E65C282110204A16E258129615E41
+A8EF65A70DDF685028858C523806517B94B7936B87A6A63E5302981E322C3940
+CC320304D5C861FE2A10675005C9B824F2B23C1F792D79F6C21A79E0AE6EC01B
+13196E92DE931E84C4B731427523572F1FEC80B1213F8DD279FA35E6553472C0
+E5DD18DD2179BD5C5C386F8F10180AF0037E0C5DFFC6C542F3F54A1C8012AEE7
+3C5B07953BE7867171FF6CC743D5E470C8D1CEDB8B417EFD8388C510D7036255
+2BCAB7A81F4BCE4457FEBE1B643D11FFF23F57832BAB05A6B5595D1BF1AF736A
+7E0BCB97E4CC17771AC4C287F7D9931F87389E6D54864BF991187B4450B8B1D2
+72F78B4BEABCD93F81E5FDDE93594E34A26DD7FBEE4D8EADF932EC3B46684AAB
+D88CBEDF312A4079B5FB0D28629C0709C9838D31942BFE7CA23C619038946E3B
+59BF1DAD24910B65BA4B93A66BA05C795756D8C6B899381B352A1515F06EEAA0
+668103569EFC81EAF2770EF1F0C275E176683A19BAED35F8C4EB4FC415CEEEEC
+EABB976733FB60D260292631B8317D90AD16F149181CFA0F39381233F331F9B5
+5544F44E3B2F2C544EE067A7259C19F49ACDD963E79046E45337C98035097F18
+5E7ED0E33FEF28163473E8F682A2DF99FC6B44E307ABB5C459A0FD18040CFBD1
+8BA0F6583A609C5CAED532EB0CDD21714971E0EAD8248237755CE81C919824CA
+D88FB1D0F29A00ECBC76CF62C63857BCBBAB9FB36EDA51C5C69F3B766A8BF388
+8FDFC8BC575DB2FEAF388B75CE1FCD42E192965A2E21326B537DE3EA765022F5
+7CFA5CCB84859396439EC1D6DDDD38AC4E9F06F138663B9D1A4909293CBE7861
+93228D6A7527BEB9D7A06B90A109BECC91EAA1BB23069024AC95C58FD2F0D92F
+0C9A23F9F98A8D26B7A1E70E081D564AE0A7A80BB84535D7583983161F4C3801
+DED0939FFFA6B101A9EE4004A6800354267881F0DE62EA5C32B4A107609A863E
+E16299310CCFFD62A7EC33A75F7E366B9CCB16A9905C5B965E66AB0A82161CAF
+BF3DAEA49CB8689752BB02B67C12095F38A837A702B1A7008B808241CB3E8952
+77367FCC9D8D8020A70FB767B1EA866C8F0A6F1C5CE1BF0BD0369F0BD94883C3
+69243523E0EF6B8BB94FD81FB9FBCDB3F536F6EBDCD64BE81E24BF77A90AB41E
+1E682D022993F534F5F084E5AEE10D831D1561C3F05024CC81FA5807ED64420D
+479D0B05266B6E93CFB2B2298073C5DDE4DBB1A084D47516D8A59C7D8A3B6FDD
+4CC0BB36179162C61AE84F3DED09B5880954A324C3E8FAE9A1A33D38109D8D6B
+F9A471E8F90FCD48604E265BC789574CFE5CEC36994951F97CE0BC88CE51FD5D
+B44907874A1B286BA978537156E589EF0A1D087F435EC06F1691E51D05B51926
+E78A55C1E9A4039185DF20C68E2E4701C4F7C5E18F045BEE53B3991A3710BF3C
+9280A1A369CE41FAEBF3664B056FA83F8DFE4C4000F7136073C49CBE894C1B55
+4BE63B386FA539476FCFAB0E10BE9F82575D59ACAB276C35F800FA1B33646310
+F635AE6153D935E901E0EADBDA92DDAFC6B1471053D6A3ADE4E74045AD693A7A
+F3609376CDF493EEB0B2A69449CE541BE697FBAD39D86B27A785BEC81CAEC54F
+6BDB34984E435C3DB92D10DB49DC6C135D9D65AA195B9078D6E8944F2031D521
+7264C22CABD2634EB5683DA871696E91670265BEAF792CF81E80383A82459741
+29B9F13C24ECE80432CB09DCCF5C28DC545ED5E356A5416CF586B97ECA91BB27
+B07DE92C1178A0AAA216D4AC235B19AB5A62BFFFD114C4F49F7279C94DA0E6A0
+6C71BABB00469C502207B97A7CF0CB79D68C2F5ECFCBC94EF07D0C37F222FB9F
+FCA9B78A445E28D686F36A6A517B88FEDEC5F00D7E83C8571AC06FD325808921
+CC7CBD648E7CE9C1A4ACAB26DF540BCED76950EE004B457F4BDEDA23CA8B7C1E
+B4F47CCC42AA81045ECEA93F8170706A15EA93F5FA78B1A47722681A6073AC3C
+A2459CAB0D5DC8AD079ADE47271875F6F3FA540CE8F0A5097F12782589577F54
+58EFBA5D8590CAD95A6FC2BC78227994B43DDC151F5D2B7B9AA85CBFB11BF6F6
+A9FF8784909B880F6B06806CC8F830F92E551F363882847E215E147CC4B38EA2
+B29D70A9D6A9558226DC92E57F0B0E78C95CA0A2BEDACA4CD0EE68F753912E6D
+D252610CC37FE89078ACBBC215BADCF61A29263E81C2F429E8948B926A877C5E
+17E51B64E0D3B325C1E4F29B92B8770C90D1D6A2C809081C612065A3285DD573
+C33DDE2196577F6D463E8D19ECD438F12C339BD3CE6482B33CE6CEDFF0109521
+12D3D79FECC373EDCF9E3E82EB3FCC26178202F42AEEB61DDCAF57CC4F995B32
+56E41B2FC6D6C675FA363D1CA2C2601F311C568C224352EA2B89881C8671CA9B
+BC0C5C7548A74D372B009F5997ED4BC5C0A2137DE941588A6AB1000EE9745108
+A64F2F780043F4CE9656E3FC2E8777CA1E3F88A99DA1A69A0E79A40EA2C6FC6E
+E0C95F573BAE78791B02449F75E9607887C0EC9B3654233707C6954E07D9F742
+F637D965954D2CE0CE474B3ACD1226E4E9CEEF1B8F73F7CFAF10D83FE9C4723A
+37BCE2F2C78054F4EC5DD881815EA4B884C7A88AF6B0A78B100FF7ED33D8842D
+6728D98CA0A0E3D211A0638BD2EBC392DAA12E01F76B4B5123A337B5B3885FFB
+14DA87DE71AD3A7CFC662C020CA6803F5F1DE8D70283B61CB8A049254EB8627C
+C2BFDB41658742FE18D0DE9772B9D592CAFBB761A5A9768B4B02DC6627432260
+5DEC39919A487C019BD77225970F1386B156F85AF55B7B23AEA03957B898B1BA
+16515BEA6294D26F5A4722685E7FE08298EC331ECDD7DC824CA60F19B7F03D1E
+683899368E18FA8499A2336FA880F6B7983F368886C6DD31F7535691974E47A8
+299D8F4BF4223DEEF07150CF2453C714A0CB5FE7ABD5AF5FE47FCA3792A13977
+C531F2A8F81672564A75DD3BD50622F94DFE38EC8E8540CAEC171D690AB803B3
+01C80A9F4371C59CC0E0011743DD480995D5160986DAC3DF605FD473CE527CDA
+CF9C10E819F769132FB73C17399C6AF0692EC445CF768BAB03DC70C1DDD793D2
+CBD3FCAA117F019EDC56D479EC56914CDF19FAB530D0E2118B20E735E4D3898A
+A95329E98BDCE9DD94573B27564F8A1B7D075AA0AA6AA6008438A63BBDD174B1
+34BDD06FC334D97670568AEA4E7F762723064BD4B56CF0718C55DC8F435946F8
+9951D65A1333CF4C8DC70792546C46E3AD6353A2CD596FF2173B1CD5EA8903E9
+D1593C8B5DC53A42F76A233237C4E34DD339F1D789E5E8C56E3C8C37F5990732
+47799BBCB3E2C0A246EB34192F226668BBFA48CBA95CCAA6A9BA5C543A10532E
+A6CBDBDEE5E662BC1F8DA0D66AAF39CDF436966FA58CB3207070631E8ED917E0
+26489A16182B29AA0313E0ECF6479DB4675FB0576610A3A9D5617DC8807B61DF
+5610D4ABA159BC25C3C3F678D52DAEEED03C31F5DBC876952F459609915BB5AF
+1C35AF1C7CFD30D8F39E3F0B9072042CA8A2FC564EE23D45181544ECE19C2056
+E6DCED4653F6B1E02B203942CCDB6175463DACF0A1D56568A248F39C3B6BA054
+476489539269FF2E88D0A463FB60D52E0A29086D2F86C650842674E0D4DE274D
+941076913905096454C72DFDEEA33F2C7F142364018154475587DF2B766AF169
+D424EFB12A1E04CA32B1ED4F9A844F95EE708F7961D01080E2EF3C2125406FB9
+5F000937A6E5504917A4C2EEB0EDF0EE2C19CE2142E875AD64CFA4219072042F
+BFDDA76F6A8933616E2D9C14622C17940B2DFC4CB124E33D1C7FBA5D4DF91230
+95F75B3B2944BD45292226DEA4128D14B094477B804163830CE7A310A7433382
+53D9F5E37DBB6D1EFF6D699585993424ADE9BE7709FF882F7F66CAAB3DCD9D2B
+0A1BA066F3A43BAD8D0CF5D608F855E14B252FDBED8C6B944ABB3EA837B2CDF6
+DCF730C7CE1C2A0A63C652DB8D822E74767B95F5D7F20DFF654644F93ADF8FE0
+8B4C393F9815D4980DBA50AF43FB5198246C91D9D1558E1951B790443F4DA185
+B9D71EE244833194B6E9C12238A613015B33668D7300F4EABA5D7749D485B9B1
+1E2D27B5CF779EF39EFB94851A0A7FAB1BB928D05C4E38123934CCA47B88C007
+BA2437937EE3D46D8B469082905C43849D54E873FECE86A7068C32F4698A1EB9
+3097D47D8A14BD46DF02FB5A8D811A3ADC43FB362381634A4A95CEAB4F43A0C1
+DBFA3EE3721629FEBC8565BC17C850FFE3F757D0CBD3FBAC0F4F48AFE89E1941
+60F5B4CB76B8BECA2A734DE84DBDA0F33BCAE440CC5E7124076363E37FA7486B
+B3A90F827052429DBE0BF5B94997FDCB3B8E896C0B8786DAC25D2368FDDB7E8D
+311D6E2F50DD30639113DA11A915B3E36F450AE6738FE3E93C5726AE8C9CC8E1
+7AE55F17082C00ED68C7A189783E5D955077A2CE3C2854834AF677EAF4749882
+C90B37F66C7578C534C773D7AE8A1F27864541006B747D3B7580E3D808FAC8D7
+47F29252F83B4C4D2855ED5E9C129FB90FD85AB248BDAA33BBF956274EEB9AFB
+46A0E155FA1C006A66D408F32BDDDD511EB4F5E9F92231D7F3DB5AAAE0287A16
+688A9BB19C728267E13FCF20C9E635F1721B555C2E08A340503A75D6EFFDC772
+269BBCDC68CFD48AC1772CB37F9AA24DF90494F782DD63EB3EBDA77EAEB2183A
+2F2E9C4750CDE2E047A842288A7F430C77C010C0B7E3CC1E02CF51DABBDC9C6B
+DDA38147668F56416D782075F98A337F4314518A23F01C37E47244408BAEA44D
+BC156F429A9DE240414B25081B956638D2E0AF490E92CF18E44E666D650641A9
+A1E5746E8155519298DEE328297AD4EEC55FCDA7ECAB8C6241F8DD5B0959F9BF
+4E1F5B4E7E0CDBA1204D78ED01B95AA34AB90C8B3553693F7B18413E51843D46
+ECE2BFAB532BAF3EE2DD93B2620F96F907EF51215C17297F5A77E058AAE1A5B2
+A564C5C11ACB92D4C58D29EB2543F454700EBF7F350647406B306C2B9CC29B76
+AC75AE82065FEBB75CDF9D216F376215633A4A062191891371C8C165D47371FC
+148CCD1BCA39461E5E915C7C5B13F04D5BA7CB3B6BEC4489E527188B13E2C06A
+E393DFA9B1BC17A141CBFD2138C7CED07D86C0EBE50A8A6E48A0FFD11F791B3C
+E3455ADC6DC8A02EB3CBAC56D879820AFB2557E361A0A208213C0C2461E6CCF3
+576AEA9A46514266E2850B2AAA75A10FE3CE609A591C2DBA9545098FA577D89E
+35F48FD4CD0EDB72B9A7FB7873D01D683DB3DD2DB9342C23C8CA0BB681619B52
+0A9C6B27C726D11B382146FA8D54D556FA6EBB117BCE2E4D53089C9292C769A4
+37C573E7C7A00DD95FB351F20BD800A3CA17169BFE80AB0E6E2FF27A78BFC3C6
+9E416A86BD22470F4293C77B0017118639866BBE9D08A44A23C7508271FFBD1A
+AB76E5E655BF66E87DC916E0AE1447DD01B8D11F82362BA55B50A4FE5FD7D534
+318EA499A1A4924170C3FD81EF41BBC66090F7F393AC0CFC4ABCBBC4255BCA1F
+FFC45010EEEBE12B78C513C1883950E8D3E5429CC5BDBF05B96D1B6C53C7793C
+D79A82CA916C9EB160DEFCFE32691B44AAE98BBB3C3E35D3C871BC80C7A4677F
+76DD0CB632534F18BBD47F961EB620BB805BA2E5AE46B196E3B907C42F157B68
+6A3FD76F75AB344F438CA0661FA6243064303A7DF12EEE75669151F9E297E812
+78CFFA5ED9DEAECCB330015782093908846B044BD8C7740AF44A0DCC1F9C8197
+B15A30DFE0826454E68C9D80C50F2B1D98848A143134B3D19749F7E1BD5A125F
+990811AE2923F0BF502285C55B49BFCA0DC5E1CD13CF5A42E09C764E3CE54AA7
+12957D7B267213BBED74B278B21EE4B16D0C58152EF52C293CE44D5F4332877A
+AC8032AA8CAED48B5A2B2CBA52AE827F9260383D84A5C5A565BE1D1C7634FBDC
+5F083180351593A272342F08EB1BA76A321BF45DC01F0DC73F81E27B6E4FFAFE
+696B3D57CC50D1C05AE1FE053B0A513985B5A0113F1CC0922E3407376E339204
+27F8E293D1E7A4371E60CA2BF0E61ED2B81B12DABF5371D03C19257614E99858
+5B93773F057BE3212BCB115345D43339CE2CCA48ACB413B206BEAEAD638CEAE6
+5ABDFCA4D1E5907C1CC8BDC7ACE59C1A3E27DE3B006EE0DE0E76E72909F3595A
+4202696072875B42D51FA59473C75AF17BA7EEF32BD822A5AF4556CA5D88BC53
+2782DC0AEAF8F66B1024D73E07E0A26B90FBB0D583BAD7326C80BDC77E5330C5
+5C854E5A81BC3BC45BF9DF2677B9C89100251AC18CDE331FA79A1536E1019D49
+FACCAB95EEB940BFF44E4ABD1C0BA262C750E8193A38B8774CBB92B873035460
+D75CB085C3FDCCDDA3D04C963690D2F5EAFB3270946F69A65346A6A9EDF973FD
+CCAEACDFEAADFE6B2A99D14AF7A210DD834494A4C4D22102042A6213E556CCB7
+F645930874E32F95010393ED42DBF286CE565D56D5C80C96D5C88547C09070E5
+F17A395A3E030362B943B61DDADD60F7D5C4192777D6714F141BFF9F035B205A
+DEA3AB2A307B1F9D16E62969C1FEEAE6C5283DF2DC414E904217945AE629C91A
+0FCDC9BE4459F5F0448E6B2B8A907E6A000B860BDBB3BFD0F8567D6777415601
+267D05C6C0BCB3FC969A22D34EBD2B3C90EF8FB95E7684004F8805A80EED2F88
+CA8C552887A6972BCEDC0ED9DE66E7A2C8CB7E8A884D1693CBB83B5275429BCD
+5D3D846AE8233D5F492D02CB5D63118E647C17F89B3187459A0E4E64738632BD
+35C37B9CCD46499B7163FB436BE8D42CAA9CC1F21D12D7F62EDE4A0D88A4E09E
+F0CB44634407025ADD949A68633115C3C5569DEE891367A6624833ABFA6961AE
+6B34E438E76FB2ED7B65DC1A8515D9C7104587897815128A3A6210E08B55B083
+3EA57ED782299D70FBD8D12534E74F1B7658D61B999E0C6B67FA4DADD78B2769
+430C12161171250BECE14E7CCE85ADB0070ABC240A237AD1C2C3D7E75C23015C
+E145454CBE80DADD25B3FAB08B2A2FE0A3A728FA57261FEF8073952090A5892F
+B9A64E855D36F775154FFA79FE7ABB4A89D7D581F5762ADE506C2D0270E7D64D
+3E8E6F0BB595956B468833842214B25BFFBA2BC8818FADD58EF206D88E32379E
+2C8FA4A3A25D51EE8D8ABCB9C3772CF32DFB6E85789F5DFFEBC252CE9CB768A6
+28E09AA133598A0A664A401DB0D19674EA7423E1BCA26BE4BBAF9DDA21454FCB
+4C2B509EFE29AFE2A9B01CDFC872A32D175EC93C5EE5BE3469184DA910D449BF
+1038F75546A1E37F93169DABD6CB7EAFF6D30DD12975FBC71D755F29DC3C7795
+D150C63563DA4A6282BA626DCFE3D360EE153CC0F7928AA60405AB247E9FD612
+C77688F9B4D84115E797E5924E6B40F23825164AB8B23A0B179CFF6D5A02C500
+8C8AEAE9C9724A17A97B164D0B3CA0899FAD42CCB7FD52ABC3BAF5E91F64ABE5
+70B05D60756664262B7BF4C8AF85F17B4C8F13BBD6420CACA0A324690A307E8F
+DF1586DBB5BB4DFC46FB18C9C4DEFCBB8937EE5BED3DFC1C1243A4E6D743B26F
+CA9ED9F7402BFBE17B7CC477D4E79883162B4ECB3598FA99C53536EDED81F607
+B677815418063F64CDC05309EC4F50C3B49ECC75D47DD5159D24178277543814
+1E9AB69F495A3D0E03C028E81E74722766E868A74675747BE974D9465D48DDF0
+3F1AF3FAB683559DAB50A977CF47F7C4C1BF43F446ECA5374E2B8E77C23A3F57
+33858E972578A0FCB261E1C889BB8C972AD5081FE67D82BD8B929409DF9ABFFB
+BE835C6DE98E32112BBE1883EA92C023A73EBE61FAAB85FDE475DA8531D17184
+82C7914966D4331774027BB2AA9022A0843321C85146A087E617B126A6A17FAC
+75174D5854B40C08EBBF562A4C7B04A63C55A2CE2FF89E8E1D715B49A52C0EF5
+88C0ED63610A7268FB0C9F9DF4527E6CDE90D8AD645C54E26B7E7225CBFAD29F
+80059EB920AE850C60D68D5C8012B1ED8E7AE12482DAA3B5F674D4E569824126
+ED93DEF05AE9031440E88062F475598B4AFD463C144385359AE4B680B2828CAC
+014692B1C29BE6D84F5434A3BE10A6774D1493B466F7623C9371420936B397EA
+CCA8221353E6B079468F08130FF0D3619C4CAD9B8F2821986F91511EFECC3B95
+15EFC8A7E9EBC936D3860809CB265367DCE2850A34D673727FFD65D31E2EA8A9
+45E747716B12EB8E7B7859AAACD23E04E9AD85AD1E5E9A8C2EE7D535150A6AB2
+48ECFD5AAF2C9DB97A5E104BCA486DFD432AB386B4B31622161BE0F92983BC15
+50E454658FC2A987E2812B8CA402A618227ADF685169C12A4F0BC371485C6D82
+AFF5509CBA35D2316C6DD808E70FDE08712A1DD141399F925E8447F3EF8FE3DB
+11F0333E5CA2FB92CB762E46A1C27CD7EA355F8F17798AFB0BBDB5417E6D3FC0
+4BA77E9914A8D37EC26D6009FBBE4B080CD7D0B4F35DB32D4B7AD26C0C79B130
+D82A5481D024538265AE6F9F6066C3E4D4A4C45BF168F8D8CAC1C703150524EA
+62CF558AA34B80090CD22FCFCCA620F671F98E61909014DAAB8C93D36463B6A9
+C07B33058454664347DA527C7756EF50FD865F3D64C8AA8BEEF1354099FDCFAF
+3408FE61855CB91FF1C9DC778ED2784B3423B9779308EB908ECEC25D190D5233
+F88C60DA18AFF88C880777D581F369A750C6782001767220A84B0FB874E4FE35
+90063FE863173018BDC7B0E97A1715D74477DF5EE7490202370A838A5F15581E
+C98893DE26F75A2832A97920333F97214284F3291D83D41F2BDA3A74EB4724B7
+E5AE936863AE5758D5B6D4E0CCC9703D045931FED54F2D98B039099510BAB2E8
+804FD603E664663862E0AC4E957C7E65CE9A63E72F635570A068C7B696D800B5
+C245BD650BF0627C063678A88085F961B770E8C201418DCFE03ECB74776406D5
+557C37493855E1774F4C87B9C9ECD38BE306FB64016D1A54A848783821512718
+CA1A0BFD0188997081649F6D21A00F341BB0A843B0B598EEC9B18C7002F76150
+7272B91A10148713B64985FF6A00C75C22C708F2265EB223C200190DAC8457BA
+89C4FB61D095F6C2FAFD3F13780F75822F0E26080BD7CD13B31B8C82A4A007AE
+29D450326D79CC899BF3BA9399AF4012AEB18EFEFCB829B40EB8F2FC97225212
+A7C49B4D9C5E362D2E64A011E9891BB02075321E1315C1FE219E49C2F4D2C8EC
+587BBF73C35D13E91F4BDD3C17AA023E0B862BEE477BBE257910369DAA330AE3
+64B05486B6A13D5C3927EC6A591BA7DBF5CD81840841B453AE1832D0ACB35935
+9DDB4E8E88D45175D4D9A88D0F77065B98FE59244DA1B24A0D2F04FB3D11FE59
+C69BD19C9535A0507DA6FD68BBFD9023144D99A71EDB1D00105CB59BAA1EC8E6
+8E3F4D99723D87831482DBB370FF8E4099D6EF49A562C5151B948E529FA84147
+5B80BBE6F9C4F877BEC307667C6868B0384B98763A849B47C889A62E69E833B6
+04A60319B227A40368B11D3B0E92FFCD15009B654B096D4E09AA0896B70F1677
+EE32339A931B387D6476843D91DA00229282D60F04932A644B22795C7E86AE6D
+EA7DD4AF07E3D8AB4D585C51E8CCAD2DC043AAD95517E97BD18D688A1DB92A8F
+B70CAD704FE4D1CDA3310BC7F3C8245E18094E65C82C9A7277BE922334E410FA
+93D5D6087892FE352F03D536AC06EB9C9637859093538BF0BA676208CADBEACE
+AF9EFD10C49850701AA500F1600C42D1E635479BBDA49C2812357728BB540683
+90DDD54F4193883F2F8DC8849E90F329A9234F79A731263BEDBFB01F996024DD
+A95D5FBDF7A6B4ACA2BC93E3EF299B6010E203B59D24EA8E05DE48906B3E91FD
+7629A1045E32639610ED53D78236842B3B44DDD2F36AC347F0238E27182486AF
+A6618501CE34112F848598A2D28CE97A18407F9C82F2FE39EC4DA96801E1A23C
+F3BFBC09EC9C81086E2A48F388EF5692E9E5D6B5B7440A60D4FAC21316BFB71E
+01DE8CA6AA0496097FEC7809922553E6C7DC24136301CF15AE3A07CEB934CEF3
+61ED9A944BCEEA2205773CA1B5134CAB75E5DFAE05B79DF8DE0A30012B50046E
+ABFD0F4458746F14AF71EF79283E570B4FACD9A6FF5A309CF795520A812233F3
+3F97621D1603BB7878354C04AE66319A6F00F4ACF41FB459E90ECBDBF375DBBE
+B205EC6A89494E4390560C121040E8F4DBF68240E1C77B673269CBF10DBA8E16
+88F18C662CEA332147C7E17F88B126F209D2FC0262D7F1B9C8E42A6D56FBE9F3
+9AC64901CD5DCBC9E120C7FE424C5865768C9CB901EFE55B0EF8C363F0516A05
+EDC6F3195BFAE2338DC6BBFD8AB31FF7D2B63A7EDF197ED12D51B0342AC43791
+AE851C12B9FFCED87A9A0A66490A126293CEBDBB12DF32BB27DE30FD02A961BB
+9DA36A32B0E9E51DCA92EA7C9E09C48707728774542CB0B1DD72601E30DD5A6D
+22F1081F30A8F5F6ADCBAB5071834CAA362B0A586F93A1E2C08B4961094A6060
+0E767F90D241CAA689FCB364048D09C6E61277E23AE3D3907B5DD935DF1CF941
+ADDAE2D173EABC5C1DD7E13DFE00C4DF73E2CE2EF0E1ED9254513D20C87420AA
+690769FCF932DC6075577708714C19769E39B8171A7A771A5619F5CF9CDC8388
+082E54DEA0658E8218B2CEE1F8E39FDBCB057E7A728204F5DFFFA9E7EB0D6F46
+3A6328C32F4DF1BC54BCA3800F83AA77D23F9EA4DC3D78F052EF49C11DC8C3EB
+530C3AC4F2AD8C861C09FA96BF6313C7195F634917D2F4DE84F7193A837F9936
+25DED0C42D12DCFD281AC0DD5879CBCD46D17EB87693B269D8ADBD935F66AF0E
+8C2FC7412D541218A57F6D9D9763B51315EFD5B1BDAB6685D8F3759A98AC801C
+21B89D3575593A0865A4CBB176C9592EFC8FF47BD2DBF34B160EC8FF8842CE94
+F44F9A5DC66152B2980DADFBADFFC915A95F98F9406311732E077E8C0BEEB6DB
+6709009FCF541F514CCA4D0427D633DA65800559760771873DEE72E395128FB2
+53C856D3C48F8D8960F3E6281B2B4172734FECC78F09EC23F34CB920EE884D28
+41963A47BF3544912E0AA19A48799D894CDBEA789C44BC355763C5758F0AD638
+38C6D5492238EA2FBDCB43B1214B4E740296E3AF9789773A918A26E09A6167FF
+8CA0150EDC52D4BF795C8F294A0E2061C6372716FA0311F8A3017570BE24DE6B
+3F59AA1C888C121C4E2DFC2E504B014DCE8D922C7CD1C4DD31A53421883A63C2
+859D73F217F3C2B0EB6881A2B0BA479C5F826BCA1F6FBCFB672FF7CE4557E2E1
+BE07CB81D0D4F772A635905156711F3836A3C5919A833E59502FE32A06650B34
+44042BF4151827589B6093DCFBDBC97626490687FAFC9EE3411B49AE64F650DB
+4E9ABB16A6E3A029BA745BBD0E305EE5F3C7F9D83AAB3EB3F549EC62730EA472
+F7C0CFC92C72FCAA1319C6F43B3E523AA831E4419DA26019B5CDE3D14C264BB3
+55DA4D1C9CB74B073EB2C80843D55378C1AC7ADB2BA6B75F4FA7891B605EEF03
+A3D9DEEBA8F029CFBD4343E57D2FB2EFCFD5B8499275B74E39122F00A0283138
+758A19661381D508C36B49D7E1976BAD40690EE2AD29F49C499B66FED017AC75
+9EF5E0DF28EFC831E454F8D0EE9810EB0991A7083A878EEA81B494437D1680F6
+3344196F46A958340C9771BBFD7E9DBFD8DB8B19E15294311BB67CA78ACB89BE
+112053F96F97685DB0D0DE8D3772D2699CE60E5CEAC18083300AADF886126D0A
+9DD38E90B5A99F2A24EBF47FE8BCEB5E258A4105E7123C4174AABA79C0304B94
+506F89D3C11CE7EA02A7C3D2B32EFC7FC7AD1590B544D8F1F846ED5BC371515D
+82E17D0E200D026E05653C983BAA7C4B2E4D0850E3BC5F5BB62BD07D55510C62
+2CA31539137DFEA988AA24AA2B203F0D2256A8DAB677BC1AE4BBD0432491CF43
+346668E6A6D8258747B27898897B3B1D404B2F2473951AFE38A563754ECF4F27
+D9CDB65D357C5678952420C9EDE68EDDACFD9136E06F3CC2505B3E192F20CFB5
+C6AE456E1E8FA86B9E85A21FDA36B349BB98503DCFAC96873471B2AFC43F4574
+02BDDAEBF5ED48B959860BA93570D6389382A085A2924AFACC2D582A5C1C23F4
+4174EB5265F09C78CEE6858ECD88F35687046A178565A249F85F2F12EDE73467
+38CC89DC5A980864C877B4988C862CF44722E5B9C79C79B2D71548D28D50215C
+4AC9E316968EB5238484DAF7E28B79F72816DE3233BA1F2F01702AD28564EBDB
+FD974DE6E4D29B25E5D6C285257386905BAE46872615256546399CF06B80D0A2
+282D9E10F14F01D977FCE93214725242BD69CB5A7275785410885710D956F242
+A71389EC59A8FA694CC681EDDD984123C10EC191AFBAFD911524352B1E012DEB
+EE56767497213386FE17C0F5CADFCAF35AC917F5423C092EA86214C01CF52DB3
+70DD3EA2ABCA0D2C5160BFD7AD66A24B9725BB07F08DF833B26912731540F34F
+E7B772A43541E28959397CB23136A205FB14B5D98CDC692A17914E322114098D
+B91397B4CB2713BC28A75B846E1CA0FE21F3E936298F63D057BF943E5F6666EC
+B62A6E76C2478C480392BD50CD0CFC312250D8DB942A16DF1AAF6360FFF78687
+3B412DE5CAF16348601775E2A6EABED350E16D810C11C56D1365DA81125AA1E3
+6F0F53162D9D1453F2A9D3869FE5CF687E11B14E7B043F8477DE75406360D233
+A105B72CD6B28B49D84E62F148D59B935D4F80F93006D1D43CA1887146266DD1
+CF8CCAAA1460F59D854762BA4DCD2C72EA3B883355010834C167789742D0C886
+0E40FC7E18490AE6501D75479690D7A67ECC65D749B69021F8E6D86E98D0032C
+FCA0341852E051A31B948411F8E27AB7E23E0D9F6B376273A97554248424C0BC
+4CCEA57AEBB28E61F46FFC12365281A763229B00D86034999AD5ED76E9B7B5F9
+D8EDC6BC419A43C86C2013985EC8CEF1B6F251F6EE1F37E6752B326D01A2F486
+55F4469A4C81594D1133BCE884B1438128BA4592AEC98981ED6DB57046D20AAC
+D9F9FB14FF8E3549FE9A43F3F9B0C5ECDF97626EEE5B7A5053BB1E55E7665B40
+85C2AB287067E09BF68B2A97310D6F018D5EAE8FF29514194380729719001045
+BDC12CF32D5B575F04540A4C428D2567CD66F7DA4FE41993EBF6FB032AFEDFF3
+0CADBC79AC90241C71DBACCC99742BB516849F1C8B3A6C60EDB04D290F4C9F47
+4E3C8B45B18BBA98FCE737D05079940E7681C587175E13D94B676C0F29434DF7
+53D0D9757ED0DA610E69AA32B5977ABEE045EF8ECC9D5F9EE464683ADF39F314
+7837ABD6353BE90831A843AAC6D08DBCBCBFE5615F88774F47632799FCEBE8EE
+91D0CFA0783234042F66CE7A198017A867BBD6EF6B3077106B98A1CDCAAAAF91
+B5431654A8196FE452818DC97E9B64A48A20968E12A8CA92E434EA61838AAA3C
+F0501F1AF7DB5DFBD6A0CF7E1BADA364DFAB8B59E076A66AD0CDB95C13ACE06A
+D7CA855048E2BBAA48228BBB6C437CEB366EA93676F8790FBB883BECB832DFB8
+618120164630AE23C2515B6201CC0A637AB5397D3FD8F575230559F633654BF7
+31E0774D2CDE9457262341BDF81E24F69A72351992807EFD05F5331F648571BE
+824520CE7537ACA3E919694EE5FD274207130E28D716B144060FCADF613B8379
+693F7BCE8433B319406BAA89D577841E55F73F8DDCD9762875C18C2509D826DB
+4ABEB7AECEBA26BF2D06884BDBCD98DCBCCD11047BE8F33A766C5B5C465CA713
+BDC2FEA07B34070354687C2F5F0DA72C50904F37FA17496BA812ED7C556709BA
+FAEE9127BAC4E7425EA5584D317F6D4D6287CBE769C21099D2E3075171158BAA
+348477A37E790BBFCF9D214CB2EAB7167B7B9672D84C984FAE71FB830B914825
+7E789F50FAF9CB889C12B2D7237B8FA90123695F0111C4965802A7FD73809EE0
+E48BD07721C48D81FFA6FC5FD14994772D3A39E6F91EB962B0BB15471395461A
+577684BD8DEC293465B85682221EEEA16A02EB1AC65D43BEA067591E90D49660
+1704167CDB94B046ED3FA8225C15595EE9E3EE4ADF486DA47F269E9415B92403
+49E9CD8929544444B5AFAD300B274FAE8F3F722722BB5EF87E2166F084D0D18F
+E29E46A3635D2A9778382490F636E236D70F32841D846518AC83775AFF5913A5
+164E41DDD413728A2A7F67131167822E255A5BA9905B41D33718D506D4ACD872
+9C96A9EA31D639CA5B627839105D27A3FA0487B0453765C5475F2069CB73998F
+CE3B287C77637CBBBE181F003418488179A198D7DD76FDA0803CB5189ECC87C1
+373266E75972089432DE229A9837C0DB0C4F4A1C0FC242551112811A94227644
+EC271AC874D9AEF2F0A19C3E52507B601BB51CC4B063D7DB56272D4E064FF026
+77DF024B3EC16BCB3C2C573DC4B55D152A0847080520EC9794590776F8D1159F
+CA7D525704CE0773003528B2DA05CE92C37814295742DE3C5B85E72D398FC549
+8C627D97F4B77B17D0A0FA2AEE9B35B4BE1303515C2737EA58EFE3E8C02D9A5E
+B4BE134695380B10F9D29995FE9BA0F1B8D725FF40FB65A1B5E4497F6F7EF1F7
+C215E98F2B230FF2C1E77DEB317F405D76399A87858A4431FED2A7E40B444870
+000A2019680A7B179FC7E336ACB8B8050ADFD9256E501D716A64D40D045AD891
+B9BB7A293C0010A3FA8172743F2D84FD3A7BB02EE6BA019FE522761F5D48B06B
+82AB108F46B361E1215F4146B9499BA9B67F4CB7BE248C0F452366401C4B1EF7
+6A1FCA84C3806D14E98CFBB5B19A9E9C130D20CBAD9EA9D55A8BAD6BD22DC210
+CE6EE0C806A3707CDE7AFB920F87636526309CCD2F7C71E9F41691618503DDAD
+A1AE1FF5800EC16ED9BE08D0CD304939975E8FCD8EB99F8F408C2F9CC6AA0F68
+AECF45C5AF7D99B18BA291EDF4B99E01A7F3FC3271B8B14A6550AA3893C3BD99
+9CB74268CA2076FB23A1C93FF528D2A3E28FBF2B9696622858BB4D6621AD5C74
+83E08BE6C12D20D08105553DC668F32AB7699783EE9C5482F1EAB146CBBF5A4C
+7D5DCB7523479EB24CF2FED6A503570C210FE2BBA4370ED880810D952F4D603C
+7AF879D265332AED31F96792AE469D8B42B83931DBF557150CE66853B6B999A1
+11CD84C513E2A4F94F67FA8F95DFE5746C704E80920BA0521A48DBFDAA615D27
+8DC65DEABF16F1681C2DFEF912222B76D449F9EFE165428267881523733F8DA5
+C34922EAB8ADBB0ABBDAAC668FCCE4157FC5A41E6897EE4D7C8AB47B0D1F8947
+604FF9BB1034E652A091830B21E3955B49F43EB6BCBC35EDF5CD081CC4786F1B
+4FC68F3F95D209CB2B74944CD9FA3F78583063DAEC648AD231BCA52699AB888E
+2EC4B31D79F9016BFADDC53CBDD785E931FECFA07CAE66786F15E95A5E68E0DA
+CB1F7D2B788C9276446AF1353574A1C31BD1B009A9A4FFBCAAC540D5A728D555
+C19D50D543709AE3063F122F39AA2C1217975E12C08DBD572D242B6668089F50
+9303ACD75A32FB183BABEA1B4982B65C3F7AA3880FE5BD719295393EE246209C
+0929F1DC19844EF3556DF49CD11848BE88D84811C6686F56856DB0CCE63FD473
+BB08A721AC03A2275057214675BEDD7DCC0FB1BA4A02E5BCE939392C350DABB4
+4D81DE6629C7713119648A025183CFE5E8BC3FDD518ECE2A3F2BE0314FF8D073
+FED63CB458626ECA9525B2BC255AAB91B9569FCEFADAE921575CF439D4829611
+7E3B020B9223A6C4A622176F1E7C906390D4B436ACCE1B2E8D9C03E31EA0CDF2
+49D6F2B1296716CCECE5CFFEE825B1DBCE083EC16384935A7C1E654B6ED2BC5D
+A8A077DC850551C90C75A044BF66713F21EF2E6B963BDA8581797A833B1EEAC7
+BE663EEBBF0AA5779A508DC2CA40830ED8ABF4A05536B56CFE94FC10B3C0056F
+607C2F3625130E87C03E7201F293E62C69B5FA6E8AD2E870D20DD70CB689DA1F
+A955797C9F6EB85CC96505F409556992CA2A19E9F3835C0C3A77C134C6B716D5
+952AC896207CE3723AF534897740E4696E90C58025E8629895A4ADC0DB1AD6E7
+6A89AF91C2A6E39134434F80D4B50D0FB4BBAF31BCE787D3F42CD0B3C328B6CF
+3EB7D5DE10CE8CAC478E3340C549A20843857B65649F842B0402CB0CF0426600
+6C0C7C280B7B23461F4E555A40FBB0750E077EF744EA3A8814EC08C9FFFC4FD1
+2A840A1C6988BF0652F623732EBAA16537D2D88077B5BA6591844B42374A7506
+73B04434912167E8B2FA443BDD2919521E7CBB51EF56851735AE880DFE196687
+BA36E944F2A33C00168D15D83C51C4E500A1938A427CC97B35BC08A0AFFC0252
+A66E0F11C26F03ED84ACA2AD9EB4F4913D7BF8A548B8D395DBC847CFC3ACF59C
+A856D945FEFFC9E89BA7C441C85B718B58BB70886BD6AB9430D3DB53C985C8D2
+A59CAA7EC7B63976D36DD9719B373AE58F09030DF86791E4B8FCC2807D30307F
+6C83981D93095832EF7B6D7AB9717CD19C1F3929C31356B6CBD7B147464ECBA8
+ECA45DA761FCD20F61E49E496AE4CA1BDB5AC7A5591D0FA9439F19B136D6F9F6
+DA7FA38A69AD6251E5722C47DD6856BF23749DC3F0C339E854B4F84C4301417E
+5D7D4A42BBCA6DB6820B70F0432823B5E3A95AA69365DD34330BA317B27B4E9D
+9303691BDCA22CC1BA832224188F575678D5E7F95B3A090BA8CF1F57DF504C3F
+AE0C8961BF0FAC6CD00E2566DB1D502C8E953FF06049D00AD5C22F695DCEA09E
+37EE1B6F55BC691789350E0EC61F699A6E411AE0096B71AEA9A51137C0B1A0F6
+39D8C4B3C85C034057D56D235D68130FC3AE064B6F54723582F06EF00D110B03
+077E6FA25BB5525D5220DE4F8978D3C5BA050BE03B4A715910352EA58E625E4C
+E435204F0671AA1F2B58A5CE2BF58EEC8CF7297E8288823C64E9918185B87283
+93F8E3DADD1EA48FB267094948CA0448854729152FE6F9B81F9C734960BC02E3
+F4CD9659A1D7F9F4F2BA9CD7809E1233DB4368752122D756C3DA26E391DC4BFE
+4F83FCC871AF08E7CD5ADA72021562B233BF268F6D4B745371D8424019B72A90
+C124F65C29B2C15EE8C0EBA2E70A3DDCD6D9DBE25B3E3B80D3E9FB1D19A182B4
+902AFB63B7D989756462AC1BA9BC6371B5C6E1481E57F797693D19DF869414A9
+D314B0D0842EC99E5D156EFCFD20D07C11B7B5996A4DB5EC85E5830B3655F84A
+FD7DF060593758A6E7FCBBE97AA3AC1BA6C358F26F018E292E50E1DBE44FA436
+617AC91F2341E1E4B92F9F8AA179E6791BEC0C5782E283C73C4E9EFEEE734F24
+0BBB7B5CF26F8C6A61D4CA18F8FE8C39D33527879FE08C5BBE9D87C3A3E84FA4
+F61B6EE1CE3AA0B364656AB14533E527A55D89EA59BABEFE2114204CCDA3D247
+A11562DFDEF7E36B939A9341121F4CB1C61D2586AB147C17DCECF23FA58962E1
+11EFED42C6C90A0FC71F87939659CB868BC64C513BBF688C4802DA63D3AF113E
+6551D91D8A91461888073F8D4213CCAAC483B43B3AD158C537657F1D4D22E9DA
+804369D6308B4AECFC5262B047280C9B40BA4B53FEE769DE9140C5F262521744
+54DEA4B4F639CC891A1576364BE160434B02049C90225454CDFE46FC89CD6F84
+3F7B1E81D38743F469768FD6F17B3BB79764E72BB2BCBD8D9BD966E7ABF7D5A1
+B5816A8DF156E4E9EF48B33C87C03A0F00EE23DEE5D76707C6F123775265ABD3
+D93A901B7407524CC2A850771F4B609B835A62374DDAB77C8EF7B9BEB6867029
+537B4B34FD2354655BF0B16F473130084959670A0311CE512A487EB399253FF9
+03E9024BFDE1099B16943C88627DDC20C7CAD23F5BCB669FD448DC6DB3A6C4EF
+D2AD525FC42261D6B25C5DF42FAC5A9A7C034CA3B44F7A67E3AD200F9A8A4154
+A0D85D385D8F07763AB004C0C71E5394B0B509AA237175F5036C1AE4BDCF35D9
+56F7F958D0A600B28B7DBCF127E09FA3A4278AAF163FD9C8E576ACC5E3282A3F
+2F9167C68744E6D9ED2E5E76A8EDE76E6324A03DDF92E3E329CFC4E2B3C13D56
+77352C9CD47FC2FA1829C03A97ADB39F86ADC3FA6F8F4D171CD2E69D016ADC20
+7F088462E2A724E833B215EC6DCCA694DB9490F00449A11B83BA6DDBF64F6B9E
+4BB753980470E28ECC677DED274DCC0DE847ABED5968EE7E855976820BB417C0
+1072D132D7FB33592CED1661A8D1A476FC179C1636915BE6FCBFAB688EB06742
+424BAE841C7F675E524F376E16FF60489DB9EF1C7D95C50C4BAA18408BE32CB1
+80E85C1BB0F7CCBA1AF6D62EE471EC44EC434C85BCCE76F90C2A9264F9B03983
+CE2BC42A2A22D543398021E7905CE5EFA5E0429B19273C134E0E6629A8616DCE
+24C857E518F95FB64383F4D1339EE65AEF89F9798BE6B5807404B44AF398EAC7
+523815316CCEC391026B9759EF0B1696934C55DBE1992D458927AB4119C939D2
+2C186AD0B2B90951D14EB9333224FF343B0F8DC170562B3EF981442CFB4C71B6
+3041B81491BAA4D0C4BE442586D6BE61C78F64AF199737EE5AEA8CBC6F36919B
+9103A2FA390B8D1955EB6FAC1B7D4FF549AE12562EF99DFE37AC5021250FBD02
+6F2572F2B26D2F29C2660C5F311BA809E8B3094E8EB21476A72BA4FC2A02765C
+98EE0A8AAB56D511B5501F53BAE9EA91EBCE96390CF8C8EE43ACC8704B05540E
+DA577F37810B240AF659A9DCEFDDDA2AED43E7F7059F2767CC9F095DF20E9288
+1BB6488991DB85793C046F4BEAB2AAA7DBA69526E83A1628E09760CFC9068321
+087129C318D6B5A7A10A6D5B465FDF366D8E9C7E418DFF90534393FE1D48ECD3
+8460C02B9A7C98B52B2E9010B06DD9C73ABFB7EB8E74EBA05DF5B4CBF72232A0
+5C8349817CDE593F1856A84B2B7692CE5E831D890C325F96234218B9150C3638
+B5342980C1928BB5635C949B9902475E6CE9C7320EDD66442CEEAFE824146C44
+40F95771F064230C2567C747BAFD5934D9871CCAE206C13F8A5722FF06CF0591
+DA9576A35763476C59F4CFA638A5DBBC21B4C01190A58718FCCA959A501A6C83
+3FECDAA23E59D234C372D07DD420DEF9A0B23B4D0D908B907970D32763864973
+1EBD9CC5A7C53C2098D9A380F1CD63E9AAE74948B209B91F77D1C19DDD26CF4C
+EC61267D2126AEF60A9496E3AA26A1F2A383F2C854D709A60454B193B3149072
+67938C33E570D5149158FFD40D8D0592C934FF2AC5B6E0FD93BCA7BF26DA95E7
+5A381E94CF9C880D4EC4C8915C60B4430469EA3D6706D2D410C10D9E29A3CC0C
+1622FEB7C9F59E949CF40ED21B322985BF448C24D54A7B48A5E10C8CA48F6B18
+A1AD2F09F6788F95D29816A251C19A18953A4EE9ABD49DC93425D90DD80869F6
+858286097FA0CD44AB0B5BDF2A371B02BC8FA4B0A4AC48F111DCE4A32A856EF4
+D10F1B777AE2B9ECF77AA66E3EEB5DC82BA69AB0DB3E536B08E6DD8D32302171
+4F30B69609C9FB9B0F25D26E4E9A8F94785D5D816634697C604E1BAF6C4C67DF
+FF0D2C9847A27440D92328561541169C3AD45ED863C8A094ED14D1BCD713790A
+5E48CB225DC501AD7AFF378CF8E94B3F5A61F52487B5FF4510C1E7525031D39F
+63D9A9F8C81F1A4ECFDB4E3F1942DEBBC6DB124E2B695F6390A2FACEEAEC809B
+80D04EC03B4D3110E93F2A2CE88BE76298F3B2E6CA79FA4240154A41EAF28211
+B79DF626D8A4C541199BB9AC1039802917451967BC159176BB6F1E17A02B9E1E
+9D8D7AF8310F2F7ECBC22DE47F1B9BEEBE383C8B9730CD61D2392496B7239B6E
+3CCE01BAEA37663DDD4EFE1A6FC6D2F053F74FC1FC28D3E8DF2C3929F64DD2F0
+6570C474B0B4BD74CF4AF6B72E5D5B7A079E6B592BEDB76BD3C0584C2ABC4E2B
+0ACEFE33940EF69AA41C721F401460581EC1E4A61F665786B6674D2F0044BDD1
+2E2B115EC28A997E0B4DA476C09617B1CEE6A2283FB5064248D096EA5B0FBACA
+FB41C2781E2CADA452F82097ED5D12AE2A9DD94CC49E90B12731085364EB162A
+E404983B1028EE4FDC7EFEE7A430C715192E6A9FCD67BA58D77B3EC7179418E2
+9F44BD60D81ECD7805566919AC8A1F7EBE5CB882771808F32EDDED24DDF21A93
+EA0A872F229895B9912E65FCCCB6137BCE3E0980FA96AAE4F8040A233C5CF826
+97ED79A163839CE10B23AF1C6C48C37A7BD711DBF61F6CC713E37757D3B63955
+515B692289C3D22EB2D5048BAFF9E63865CC3C4EA26F356A448E4A6D93F153B4
+40DE89E06B98191899E1F9BDC0FFE92AC098637AA564E954937CA4758E3D13E7
+A790C92FC5064818CF1B96F9C6680708E10853F50E012F75A2136874340164F2
+800A9A0F7F7377FCA81760F626DB49D6A9285747A9867F423BF079DCCD22B46B
+D730DAE458E3DAEBED7A85EE3899B9D55965464F45FC4D2D99F766C95B9F6980
+307CF7E29C6465DBC4E2ED023334831BBAA961E4493D917DDEB50D0B69B1A615
+AC19FE6143F7294CBCD9B2280B3DD739D9EC30822183F644FB1F53CAFDF3BDC3
+56135C7C5A5365B3B767E6F77FE7BB353BB137B41B3F3258CF9869FBB302377A
+B2890B01E41C9197EFCE051C394F2206238886D69714E96FF6308772F7668176
+33A22E84871EF6B37F45ACDB7B19201C2BF5E3C83F74A58D319A9EB523F86F89
+C4ABF2C955D99B3C2F14A84E1A9D170FDC1F324C8B2F3DDB868D47612FE0CF75
+0279425A46062CFE4AA23FAE2A4EAA427191F42176DE3FA5A60A1C3E50723519
+FEAC2098A2955F13DC65B855B65D0879258D9BE45661FC2D1388D6670D5BAD5D
+48B8BBE379B90FB24A664A29C66A20BB26C4FA710956765D637B7CAB2F57D4C8
+D1CCBB2C48AC19E1C36E8B5DF12F94766805D0D8886515DA29354B5F4394384D
+6D59948D2B028619D130AB81BB38EC2FC7713D4D4F6B29C4B138467F8ED7DE28
+DF41B3746C00266C4DE9AAC4E71CDF8272152DF2310F80BC959107CF21814A73
+6EBB99F07B92CFD4E167F53562B04065401155ADC4BE985FB3F2595E835260CA
+797059CBAE17FC381AB62786EA902B5D0AAD92602AF851635A6C61B1D9EA8140
+A93E8BF8E24A688A23B4C1EADFF3CE00109D86DFA84005DB0B4E6B9EC75DFC89
+10E92A9AAFEF65F2ADFE1F47E8AF72E97CDB1AE17C4EBF861A7706A3754A6303
+308192CD292B1B1BCD12D1F69CD6F609480CAEF16A569CC2354D7B725C81F7AC
+427AAF42F2CCD1DC6031C0699C60AA4B0CFF2E6257E0FD316A90B9C034B9969E
+D1D25EB23C33FC9A083A84E3AF380B6EFA30D5B825A6FE68556F6C517BF5706E
+4E3B070D5D8F5DC452608180B6A3A7AD6A009CFC3AA5F2A6DC9BD12785B655F1
+DD5D1D6A3F0544D6EC661B9C1BF7B2D2585C0E74BABAE07E453796044F1B2768
+B08111D0FB75F0CF90C8E3B52665D07D79F99EF0435F805A95EE4ED0D9E88DCC
+8D256D7A67A96EF18CB707AB91902DAD348CD514772E0A649B66287D1BF8DDD7
+E1CC998D0B26311CF5F23BE0DE0A7CA089E0259EB4399FFDC4379157BDFD7655
+FC5C2FF95DC94F2FF04C1E465BCBBFB8E3BFE024862D85124974BC6FA083C3FA
+6DF2F92D3978A998904B0A16EE9FDF840195F817D6D40A630463D73F544CA551
+15F8784F4E52B0CC03528CA24467E1C3D6E1CA868AD2EC482C85CA111F814D75
+FC2E92124E29406E92DE5205CF02BE28F64902BDBB7AC3D3763FE78159B4F143
+7AEE808329D91B034CD438823E7736AF4135C5B6A38769FD9DA821E328018655
+DF6412118D8832ABBCBA583A55A66C758A908C2F195092D87B6887E9A5E036C9
+CB4BAEB7EBC74466E5410DD289DFF8DDD5C4ED6D478FC4715E8823264E9F861D
+9A9C9B99514565CA025360188AEAFD7A42FD1F319C46502AB8D81DEA78A95D05
+457E477EAA201F67BC40979F9B86E086C7807DFBFA7E4A2CC0F90D87B2A3EC2B
+753BF0346EF5C28AD1F96E4F5125BE9512886E70A232B8AB45B7D2B8FA190D72
+86A5A4ED1E542D23344CDEE87EB7FDE9B3957929AE3B4ED9E7A407530ED99A1C
+F948E2689B7FF456E82D8CBEEA5FA4D4EDF577D37188FE7B22523F5E7DE71480
+46506645ECF7C46862F4ADDAC3D3F0D8B6D6C962236F83DE4F930FB8B23A0B02
+978C3B9DF395C0DDAAC6417E96A3488833CB7E6FF68F0B67C1702EA81BC3D6AC
+E883CA0953D4FF48CFC6966AEFD6821E5FC91874CC51BD4B98233BD2164AC5E7
+802DCFC0CCA34E4511C4E68D89E711C0CCAF195E9A0E93217C5AAB30BAA40543
+BAE734612E4B74CD1D6D6DC9C794604C3CC678E04F8252678E18E61B292C3C7D
+D02AE8A6E2F0C7939FDBE188151F8F41E58435168E28CB4A3F33CB49F294244B
+69C4B5347D7443959F7267F45894165E735D00CDDB1C34980A9922E097795AC3
+1A3F5E45C609F32308310931BA9C18ACD083F8A63723F7E54D018DFB08BAF692
+4F258DFD971BACE3A13A863A9C951826499A814D984AA870A8FC75162E4C860F
+7B4E459069DB0E5F331EEF074B3481FC2EEBAB1103B075CAD3200E94D080F3CA
+66C9703764BBD33D05558BA4693AD855F67451118798CF236BA060F7539F4FFC
+F3B1E8396EC34AE1D06D51FB678E2FFE110223FF341DA23CE45E58097E4E7F6A
+99616B1A3AB563B342C5FD9DD9B1DB3B9544D0ABD8771AE0A858B8F827B5E27F
+3ADC25B822A6190EDD69346EC9D6460C0BA25D52B906F6E37CF8AE26958653D9
+96E6F4918FEB6DAFC3940E40F692836B8C46169D978D3B6361F720AA33723C22
+B7A4C1BCE4292F85BD581F443813DF12A02C5B460522DB1E7D2D61C79A4064DA
+10BF9B9DF9B347381DA932CBD3B152FEC7F3A0F7AB80593232F091CEE23A98B3
+7AE07929FB8D6015A6CD4B61EC26384966FFCD23034CD6820D426ACE6BDC79AC
+9C17E5E482D61D203126D5E628027130684D2F26C4986904482D6C1589E1C704
+E42947DA81A5B507C31ABAE6AAB31F5AF65E736BF281EAC3D9E6194342B0AFA6
+186D427BEA12D9AAE1FF0D34D52353030C5E670115A719FE28F830562887FD41
+0A5A3336A51F0D752382B07125BBAB85CF54822B0BE9D926A0DA846DD11CA7D7
+94589C19A6B07D977FCCC211BD35DFC09A4BDF028143FD057C3DCD6F6BC34B28
+99A1B03C506CBDDB4D8345B3FA949B8566F9DAA7F958A7B05744C2D8EB7E980B
+6A6A7E92C536995B673E2385F654CDD0A80F1317573730364ABC9463B77E3224
+68E4AAA461806CCE47861E9232A95B6A326B32C429D817AD5A3FDC7B2F5D472C
+E8DE7DD2DDE194FBE7859302BC76030576919474A610E545B2E89BFC30416298
+014EBE7808197B3021E6C000A12647EA7E90A7D835C1D1F815E175B944302A3E
+014B001CB71EAFD0363E6142082DC0A00B0DC19E740F33EA62BE1F8450AE3C9C
+1B184D3C3CE5839A0AF3229D81DADB6D93AC7E7BA27CC3B768A430185172BB97
+EDC7C3EB4B7611858F7658F604C6E411CF05662702124E6DC1A333771B319FAC
+9553FCAEED75C50A05E7BAD92538EBFE401FAC35F5CF8982CDED508DAB81CBB5
+2558C3BF59FCAF06D266BCE6B647BAAD2B0A2A2266FB6A97782BD461EAD173CF
+884F1370C9AE823C85F5C392EE21A7217E603FF66A87BE77004C67E600AF8BFD
+E68BA369C571B42C86C51D15350B9B6ABA774E10FAC7DB98893B62DBD832063C
+93CAD111B5177CE7520F95179DB50F512AAB94E321684F9EA35DCE472E607451
+A8DA404B573B4C11CE658C9E7D1A3AC07F0BF8087A36859762904A1803277B45
+20840FB55C7F523246599E4930DECDDDF53961999A25D2A78F3C26E328A8F446
+C415A92A14A46397CC5E1099EBBDE57A5556887137305EE31399E8E928C7FF3F
+D24B02233C82EA0F0B52F1B1EA91543BD00C69498E2288CB6CD5E8F4ECC2E314
+D463C085482F6C8F8E601A06F069FBE4FE891E29B73A333A4E48F0A384A59C2D
+A01D470DE89DDE5620D6D20F94437CF558D96123D8D451F609CB7023C246A63A
+145C16F1812AB2F82F7395A8F966CF3706B9ABF9D5FF13897930E4D7D697CBC5
+77D3D89709B89D5D83814E26619972C241A654B145A9B63E20A7D7394EEDC424
+3A0625F0515C60D54CE2A5B4D0506B130218A9C83C1824576C537A64A9922DF7
+934A40DB1783C98D9FD20E673CAFF7B532647689F1F2A5AA1C28E2005C1B9A82
+1B4A56D2F77C8B71D9945FF9898B85A0AD49C8079EC601FAB664DAACDD78E63B
+BAA581FCC59C0B23D601216EE8AA69B63738FB5D3A461DBBD635FB18A4CF5167
+45F612C2498B80CE2F8E3BE11BB0F57CB712C4C0570B54FDCAC81640E6ADA1F7
+0835A1B7E8EB31E9DE3C11E0B1AE5CBDEA7645E764A767421B6682839BA8484D
+5130B2F6EE7B997926B1B2600781EE5FEC641DE4F3FD213843FDF14A781D3643
+A267B7ABB5527AC813C367D58DA95380FC828D517AC437603F87EBFA64EA5E08
+3DDCC06BED850CC08EB8C61363F03414F9A23E99BC005124B5C348F422A67BCB
+DC6A5D865B2225D085B249B7A483153FAB21F5043FE55024BB5027BADFD52A69
+46BA5647A04940348317990FDC91DB0C1E493E83972F1CD01150E8A2705604C3
+B85B501748327D9FD8D8EB4A878FFD72A0E8ACD033E03C1DFB35B8B1098BD2A6
+E297AA8E65E765A9D92F7F0E46E567B2F0179EEDA2F674EEF2ED7EEDFFD9B922
+29F72D9DA808D81C312E823E83D506F50650F7BA2F94B94C40D58A00BC11FD44
+880CF8918F7C4C3D6949A7CFC770ED162941980EFB918215F6CC80A7941FC467
+FA3D65538B1DF061BB3B5238126E01F319D3937A3241F02D0985326FD56D783B
+24123E58FFFF3CDCC50E096A71A944C9E471BAC8F2DE41F430B319DD1F7F3ACA
+400DC2C0CF75CD1258E3EB945E42D9870E774D65DC1CB182E9B7D0FAAEAF8668
+84C1077A71E5C95228915EE533BA686504329DE2480D36A0B13501944F900D98
+230D0D0EB3591C23204D9C108C56EE2920D21F4871E5A8824615E3001300C447
+44AF734326CB7C742222FD862729938451DB670697B79CD8AF1B00D9ED7D0002
+3877A35CF39C89B4EDB3BD0BE7D12C0759E8D6A35A241473CA9C9D9F74EDE95C
+8D633B7DB65772E00D194276307C10ABF809750D2A8DD375675645E17A36AD91
+1F85F811EF4D5970C2A11397434642D495F67ACDB0B6CCEFDC74ACDD0A59AFDA
+9BF9194542EA54C24C9F622525E6D2B8EEBCB8F946EC7906E6163517B957F4E0
+C0C50C8E2989764DF98287DDDF2F211F546387494A2A44C68505D7CEC67E5390
+CCE4D3D6CF672FFA80B2DF81766D1F94747824D7AABAB17667485D17F7EC5A61
+77F04289FDE1CFD903083F5CBBF0869F6E5414C4E20D63B967165C9D7248BC27
+82084BA13896A667728B5C71FCAEA6416951EC753717891D9F90674733A05D50
+D5CEFFAE43BB11B72B8F16C855BA5F0D26BBCFCB694C667E507FF94133927748
+5681BB4DACD9BA08AE6630E7A742D3AF1D1DB04A6C13DEA51063F3437A6E36C6
+00D592F06EFCC6C485758AB22A957C6C2EF0BE8FB16621F54EF9BE7150D45397
+9ACEE4DFDA63D14B71B1ACD42D67B9D862F4464F204A25F337736547C0F3E697
+EEA0459991E492FC28B75B25CD8F0A188BDFDA900480BDFE67F172F61A015292
+405A576326E63C87BD7140E76601956826516AE66730E6D57F5FD43C964055B8
+6BB09EB0DFC93F5B78A15BE0B7C4533518847AFFF483F428F7675E7234A0F66E
+D9DC5426BD143982599EC2EC9AD374822E428078E8580837BCED097844C979C5
+9F07E4D5F902944EE1F0A8D339EE814745B4A520794D7F4DD9311AD372559AF2
+D1196F10BF336731499FD3DBA03EF6E49AA0AFE6C99F5DC9C99C8E85B1A972B6
+390176C6B6EDA3DCF0A3334B1971214483D1082789BACA1892A3BD971AC9ADD6
+8817F031AC322E16029C689971D06FF45284C0A6900FF5769B5991F290B2D32D
+1C7156FC9401A11290EF37C41B82B902221724AE447DFBB10F85EBDEE66110BD
+CEA3DF2351DCA1E65C972C81F2B89D6CAD1FB987C29F02970E41F6F2F317DF6E
+CAFD9E7F02D48B5AF58307320C0F95B28A8295C2BC29B689EEFDA81F1FBD52EE
+38057FDEF58BE337072D0462A4AE03F0780EC62F6D8AB4A242EC1534FD9C51CD
+70C3F94B538B4D9AEF1BD8F7427E647B2B8C5E19ECA1D565761531B52935B095
+A31B00B40D07D4E6963399EB3291F47F63C45C5E5E29518D9759E31FCD861518
+DF0A34C519A18B9475309AE617C8A456A4D6CF01D8D4E6482FF509A5CDDE8BF4
+C2FDC963AFF50E8F81E1F644D11F53051AD7303D15E633A5180114F5704539CF
+B8B50E017763CE474CDC35834E5AAD07A931A099948A6C848030ACE5837926D9
+7FD9FAFB25A099832D91047E0BC5C37BDEAE93BA64ABEFC831CB67AD8EC8A1C2
+DCFF7E1C18FC9A6EDF35F7B9642223D82A657245D3204DC8733176E4CD8B28EA
+BADB93906825BEF461B8A29EE8F32CB65D18CBAF517BF1E766BAE940F81197D2
+95A97CDEF6439C18716A8DF5DB91EACE95F2CEC2800D9EE93AAA4F12C642D0F5
+78618A3EAABD4A9DBF0295F5F61D1E0A5DC4FCB513BE81DBE23B733994AE4358
+91668A7683C8AA5E74253CB614CB72A002551865155C3B22CC20BBC234977D3B
+2264187531CB2AB2AE77044D7669139CC1F1E0258A355F8D7E45DB084F43E5BC
+BE11D376F1B040A9F2140904D15AEEA4C65E463AC396DC2F8CF642803FD2CA08
+6106863AD763A5762B413C6098EE985699526C2F10B73D5CF5A5C8FCFB00A75D
+8EE04EAAE2B1A1376AC4659C75DB630BC9D8A89EAC3A41DC65486EE0CBEBA09E
+E5127EBA7F22FB56E11DE85EA3FCC5EF86C61D035D55F8A211294B66ABDA4735
+370C8909D3AD3FB83EEDA6DDAC31C7211F55DDECCE2A76D518EA3EF7C18F1D74
+E551CC3B9718C023C4399B694CE556071D4EEB4332499744308695D7FCF4007C
+6C001EAD49D7726AE17109A8016038E923132F80C75F2B3C850658C69309E653
+F5E803F0F524AF61E8F70E875E79F32A22EF77670993C12431FF2740DA947B41
+6AE7C9D90C7712BE19666080CF3DEC4079B0C05435B1871ECF35ACFE8007113A
+BF7C8518CE4A114BC62126EA623E5138FDE2B573B58F30757BCF3B010BAF8A67
+4DACBD96367DEEDFC21731BBE6A28E4EEA2A625AA682979B88D37528DD8D6E64
+56A2530BBA7700DEB84AB34C29A8402F9FB72E4A2F0AF1FDBDAD266E799455D2
+B5D4D3AA9B95BF26D6B2393B876ECEC41011C4636D4F1FD195E95764D627690B
+A5236BA4154CADD7F34393FC514B1D46CC5EC334E0CCD0CE153F370CCAD25DC9
+F432BBB12D3101EF5B8131F8BBDEF9306FB49444CE206C0D487576DAA936A65A
+4AC472BFD5AE7D4F0DB1DC8BC7AEA924A8ECA1361C26DED2339B427FC6C52A7E
+6FB778423F3494CB50E41BF7DB32C1A0DE1621C04A609CE77F62FFB50180E3E6
+ECD85E92CB4D1CE6F5ED9AA0D0A0C3585968559547606EF6966CCBF98E3AF59E
+FC505D0FCBA8A575AB0BEBDCDB3053FDBDD987DEB7F5D6D3AF920FC6B27CE0EC
+3EFBEF16A5D809F604767C0C07D17F14636ABE98EA17DAE9C9835B780C78583B
+FAC4E38B6BB37E203EB776BBADCB416A56D7762B88F78D5DC9BD94044234C492
+10534455972606A286EF42BBD52005BAB1F5985E653A4C1EA3A22E72CD2B2B39
+D42689D41F5F56304423C3E346D82F39EB4AF398A003FFC0EE4CE90D801C5CF2
+85D7F4A894B2D42A2DEABE0A19749EBFDB6D2548AFB150735F33FF200335B427
+ECDAE0800F8549EBD4B6ADA45A4969A58617617F595E10FFEB0FBEF422767A93
+E95CC12E99261389A80BC08965F9315B286EAEC4E543DB7143353332A8124B11
+B0E1A81939228883986EB56A641FCEED024A10C67BB874A379D3AA3988F8926B
+A351FFCD2E957A06E74C79E17378CE552CD09483FC8945BBB64D67F8CF39E986
+2D1A5B12F15CA11F9DA9DCEB4966C178AB5B1943E9161DD105E62D41D14F1AEA
+EB4999D98815FD9D21013B2689919AD238A66B0B12B4C6F5BB424E44A771484D
+E67B57326A207217D6D141E267607D4C66604192A2B0ED182413F04C37F380DD
+7550442AE3E0F86563AC34FC580CBAF52D4DE3530FE96B2E2869A2784526CBA2
+279C138C1EC9F3016955D5E0FC2DA6ED47D61F837FC2F50A9EE782541C836539
+1DB89268F6A80455724585AFF4C8617B20EBF9B9664712F5F7235A497AC3AB3C
+6917218B2D18E57472F48CCB599C3B4F2892B8157FD93A4B9BD5A719888ABEA4
+914DF3E56D33582504876DB0062FAB1CCA694B9D64A49AFE1EA99A149B6E6932
+5AC364E9095FAE0244E648FAA9A9E1CAA5E94B085671A1C012E267B490B5D2B7
+52379A959E35337FA0C20F589C89C859D37F5502BFA3AE84BB9D81C56E8B6F0E
+76908CD8958E3A1CBBA061DD0CCC833BE7C851A09B341ABE106C619714EF14B6
+DEA21DA0F2822D37E783A765F5BDBFCE8FB5BC8F75C56E3FC04AE8FE03F600CE
+10DA2C120C1AA9C79DC8D987A87D1B1F7124AD44A44EDB67E785DC2A4FD7B5AB
+E6BE85122340D062568D207A8729DA26B92DC7029117D29FF071D8F689F65D62
+7469AD8DD1F5E3CF1EFD2E0157EBA8F41ADC76644E48AC74E202D10DFCA98479
+49BBF66CB748C56FE70202C02B5ECBB1080D6834B8CFC8A8488BE8A502F0C0A3
+DC346A1EC38B172277B244DF4EEC610E50E1FD9C6A45F5099BE894D060160A5E
+7481F3AF11BE4A71C49C4E089A12FBBEE7297360CAE36E35E6CDF16D9CAF3A24
+E680AC8CE756D3C945BBDB2139063062C9C4215EFCF77F2E7B2565F0A0ADEDD1
+F8FD0C4D7A4C64704B568B3BB66721D105D3D8A8D814CFFB5844DF2B3DEFEB44
+D3CDDAE7642EE75B59D780D7490EDA093D13833FF102AF7A186EF8F2A8770FD5
+69F98F812B29024DD4BB8F5FD49E0927E8202BACD9F773A1D4EC9E4A2085624D
+A7566081270F322B2642CC758E2B5CAF0432E78E331FA5BF0E025B953CC08833
+7E80E535DC3EA12F6D8B0E73E354E3B358633139D5BC3B37102271A2AEF65D8C
+DD0100DE27C285D228A4391EBE70428C4974E3BF16237C503BF9F17CAE80B5DE
+66630F26D6082728D84EB505452ACE002D3D96A3CE36F0B7DB93B6AE1CDF773F
+8EF4EAAAD384E7D28A0C499CC38903F7EE1889AEDFDDB6FF180C2776BA7DBC33
+975B0BEDEE2B02A6E34EF65AF208212A1BC47794823FBCEAB57E1DE0D5B4D132
+D31404C7E4E7B7E8AE1B8A90B078C6565143EDF7C86EA974EB2D84154C293EB1
+7338C5BD8F021D40D29F646CF31DD9AA14BD090680AAC8AE481099F316EC4749
+BCF5BC65E7F9A4F856CAF3E5D3CD9B06CB7B64DFB5C439CD92E4E1D63D829701
+2CED8107B4FB6A80E8DEBED078B3540BB5E055250FA529530B0B035D749AAB59
+B2205E1E405363DA6C0B16BE5D41F5FE3B16289D983B44BC6D3F589C4477F592
+3CD817EBCEAEBBFE6CC9CF1C0C94CA39E7EE2029007893C40CBF694AA88BDCBF
+A0499F2A22760B4FF01EA292F9F2BF0060FB72421B5C4F92D132BF2FEFCD5323
+435ADF9299EB3606BBC7F1DCA88068E9A8296C020278C65CCDB5FB0D41433326
+D85B0590D0B4594B3B6897F8F51E56F8882FB8F37DF7BCBD41509233297A11CE
+368FD4911BE32552CC2FECC9A98AFAB72B9CF21062B5B56F37E35457E6E27EE6
+9EA25C8B8933E38293FE178BD91D18DE69966E068DFB263CC22392F61D765538
+DA54523707A62EF8DBC323983FE398F8DAF8FD95F26F4032AB1A6E3EC76AFB2E
+1279A60B8AEFEF52DFDC605DA9CE091F24491B7BE41177E2872A851B4DD614D9
+5EFD53076DFC5756509CACA9E69EB0380634E586E9F06B786609B625022AB77D
+97922B1F2DAB9DD033BE2E11443F24F0FB85EE66A1985DCFF9D8AA93A11D0AF3
+9BF24E33FBCAF72BC85E6B3355F130672F0630B8A1D258718EFE45A51A522F66
+DF6D779B654150041D8F557A9565C39FAF1EB01153A8ABC4D05524A4FD160551
+2E09A4B4E1B446F5C944FFD0B770F7DC166C85886D301AC3483BC21496B09642
+A11915728923B01957241F7FBAB8238E79BA49B49AE2154F71165EC8EEB62298
+578BCD5050EB474A56839BE37A67174549EBC4DA422B4360D50797BEDB115C85
+3C3526FD46B7D1105428B68AC52680A53320AF24AA12D793D1F14E2560635501
+85248DB2F251DD3423D6C6722A1F354FFFDEB5006B599D47C7CFA26CF96FB4B6
+8057F2B1FB82E5119BFEF70384997A19DC261F62CEA0364D93BEF6DBDF85C5C7
+8C515EB0850D909744DE8720060FAFEC8F4035C3CF065BEE291599C5B82410C4
+ECDCA99D957871B1485E028BD5D837EDAE9EE2615F29047407DEAE94C05B3B4B
+37EB9B774415CF8E6D759908FC40CED03761329355416C055C21A529F0E89700
+ED9136B16D9971CF1A0299D3703BDE044A8FAB6FA4CA7D6B26F379211AD70C47
+A8280E919091DDE0F9F2C9D4303CCAA9DEC9E6A41799951C6AF62F0DAC1123CA
+2E3FD3046438002673938F576A96B2BED3E5B2FD39A969B638C1FC2BED379380
+6B86F68A2B2405A010F02B796F60D10AA97A835C6733C6E969CACDE2194680B8
+D76B78275EA088E01E67DFF1BD081E5F9E7C3DE17AAE4CDFB4E4FF98A22299B8
+BC3DA60C4C02DDE93EE6821A8DB3DD1B17022589A333B7323509CC2AF888BF6D
+EF902CCE0D33FEE46BD8A476D27C3DEA65F6FC9799B40391544B8A42AD5591F1
+3E8D87E933AFDFBCC0DB880385A86AFA73365F6DCA9A1A8836579FCAFA0ED18B
+7F2A42FFEDFD233767B7247455E6D0CFFE193B5B6FD6EE0273A32DA45DAE7189
+96A2FBBF5049380345BE379B84997C0C7B72E34791FD65E38A44CE1CCFC98ED6
+D1DF926C4455FE7FCB544D687B70CF416A547D94A84C9DF64A61034E43106093
+23A4FB1754E274581CB7D01871A8E00AF352FAA6C1B24FD27343157B5B2709EC
+625D8F85192393C682B739EBF65FA47BC8FA5DAB1828F4B0F7699C1EAEC74E55
+2645C3E7FF03710D24901FFAAD7BB14A12003ED61FBE2EF0EABDE9B02FB9FE16
+E0638DF3ED8DB8A0DF8EE978368913D3011BBFCB8DF718FBB78BE8C0443EE4D9
+774F5269CFEF93D57667F09BC73FC37DAB996CAB3CEB19BE1966BF7735F5D8AB
+6404B66C3760BB3AD191DCB23AC2ABD884D833DAAC88DAE232218AEB006B40F9
+9C0BE61B420B0EF3111AD76CD972EF61CA05F32C450D30AF955EDC63A3D70EBC
+D76C66F83B7E61A149FAC77884C78494D576043E0C44D5161E29D8F482484494
+395202D50B9776B54A9944F80AAAA81E6E3FC8D6FF478923E4975C8B591C9A0E
+094F422FF675A1C04E736A827A6B42C8C91AE861B46F490A77118ACD7496C339
+1A2E16CA94E34E2C61245E5D54DDB5A8AFA3B0A0C04F462057BD72FBF9CC85BF
+98808D73A036C2EA1DC6DFB3C98239921F322C3C3BB4B05952D9F055466EC977
+648752A0E9F8C126BDCFE2DDCE5A85A5B57685F3F534A6460F8273F385BA690B
+FB3EC6F19B4DAE1DDF8E3CED5788350CBBD3832EE84588184C88426D82687614
+42B99AC324BB7D51D716B0771281A3D209AAE3AEB76DCE73093375D4E9740244
+87C7117DF8EA6CC7B99898363B1B407C0B5CC18C597832F1557E154C7D4931BA
+79BBBAA593F473218AB0D1798964605C02A2A60682289BA88115781A36E05AFB
+213DBA60AD771F9D9C332EE58CE4104B4E3213D6C5571D09F4EBA3D85926989D
+A8E96D143CA0364C780556E59E39914E4AFC988A7BC7B1EB352D02F753829F5A
+C6EFF13BAAA37AB5A8B62510D0DD373F5C0DA7DCCFEEE724F0D7862BB73092D4
+55C7E0FA43FBA607E4EDE16CE1F875571DB09956D6FD53FDD0AE47A91BDDDF60
+4CA2129A9EA729D41264A039D4B841E207BA5A2E8B81F5E866F7944E2E432C93
+BEF83BEA1276266B1D37C2345FA232203536A880BBDAF573B7CE9855AB7A2574
+0D58567235EDC86C82D073B8AB94BDDF7B8FFA4821791D5E68CC0AF581773F02
+4D27367C2F3CE426E28C2FE6C238BEF5F4277111F624F1FB2C0332D464293AF5
+81765D8A0DC5B50915DB1155A0453F1FEC0D432FC5868F5851B888E4F1B7FB08
+9D12B61C3EB0C8FD63D92725F2D16604E12E3ABBCEEADEEAFE7368EC205B4861
+3896CB2A9CC7CD3F8D345BBE5A0B2A96ADC7D66A8A241A652A247F555BAB37C9
+98CC5C16F7E6C59373C15C4197A03A43609D1DC9E210629140F440FBC85C4E6D
+F120EB3E2397A760A08C8825E53A5D5031C3E200CDDE60A29992A76E3D70115B
+809445837F16E1F30BBEF48DDAB6900107E371318BC7A96AF47621872ADFE5B6
+01D78A37DD12EEA29FCFD3E9E1DDF86379280062D1D3A542A3210A79618702D0
+5D8A2707395A5D78C698C7FAFB0D1345D977278210E75FA8A9D611242A07CE8C
+7F68E96AF1EB5A0A9EA7A73E044638639BD0B1E0F4F2FB669DBF6F0CE59747F4
+CF7DB5F4BF5423900AC729782077F36373EA1815BFAC07B281B4D4460F583887
+5FC0F99FE28826783D5A1080F5C8269A54A9C15D787ADDD9BFA8CA0EE94E292F
+4F4DC1320F29C6EE65A2D222C56F468D80F96153D2B57D83FDFA444D34076F2D
+6EE3FC065A7428452AF36B19A56DE3ADC2936E1B6F6DAEE66D6B577F1A4B32F7
+4BBA61620953F8457F7AF03011B76AE28940FF69B61DD4BEEA2A98999D335595
+193A8189E521588AD09C7866E86B52AAA822F1C58CCD30A67F2CBECEA8126582
+066967E4DEFED674CF19BCB9C1D72DE685D8618368A1BCB59FF49721A55275F9
+F1F8A6D5C58C232708E56C8040AAD633347378E7F60E30AEEB95D9925EF69524
+AC0348583C29402388491A01138274792A1C728F6ED2ED23491180AD718A2B43
+7F7691C09E7008ED1E8A49229F41AA10719339CA4EFA44FA24C6D1393ECF41EA
+7A1CB96A8F4EF84305C9999BDFE0684EEBBB3B3A4A9498D89F3CD588D31FC00C
+6AEFB7EB9650C2BE752B819D2B68CE36D79F538FF203748B6C491C51610F04F7
+43BDD86DB26A2B905FB8E0601EEA9F7CA1E2B26B005AA8FF0D451D4F45C3E6C8
+22B79AA3FDE7E7D95B91834C3D01E94356BAA6164229AE7A3F82455D457F2EB1
+DBA0D7FB8F79EC435B59F25EF6F9337C635655EA13A8A04F5073C3B6353A0004
+D9D85D824BE17A94612A3559685A42224CA59A9F55058BBEFDBBDA5CA519451E
+DA0077345ADA9205320586AD3B5568DAB951D8C2F998B0BD8C1C01D3270AD982
+2D391EA3C8618293FBC09582F21658C8EE2FDCB9EC7FF8504ABB9D5803483DA8
+A31D985490FC989E75288C5E8EB1A3CFEE35777B2C64918AD3EE6D2FE5F13B50
+9FACA93C0645CD9BE90BD7E48CFE25AD2C6DA42234D7D2E9DA83A0A0271D2110
+00B0A9E149392AE7072ED5D31B088F7C1E4447D3E5423C29B5546A26B0D4C1BA
+7B8CBB26BEEB492F6EDA6B03429598B28FCF3F27AFCE1DAF8E7CBAA229CD836B
+DF8BB45825DA2858BF9DBC9BCB30CF660C7FD418EB3D7ACA2BF3A38D304A38F2
+127937A9296041925BD54796FB2BB1B01F0E3C7C4E7304C87C0CBAAE4CB713D3
+69A10398CDF5C40E43B301BE17F0094EFF2BB3527F44C1F0ADE74549FE2B290B
+E84B679A4B2D5FA09ADBA16C14EAFAFFECDBBF13E9C395AD367EAC66697AA240
+DBCA20F6F84CECFE2742FA6BA9E9597B65ADBE892B4747F4C0C59890DE22391D
+469AB1F8DB6B962DCB4F3AE6A8F7BE07DC903D0D6C1C00B1A06B51B12A418720
+8B03C294EB1336319BD0960040AC293459EB6EE4562BA6ADEFE9838BA89305A0
+20E11073F479853A856B3F994F717457416EADE555F569D7F9024CA0D2486BFD
+BAF47F3F006B149DFB328E836C3AB71210E42A1269A7588CA3BA2FC80FA64B42
+91B01A1D58CFB9A2125B161988E7DAA519907C73843EC08FFC502022034ED1D1
+3A27F57F94FC6E57F7B24348D66D198C48114E4E936EE6D2456C5D61FD509182
+A18BADCF9F6014823E6915885273D91C173CB58C1962F640668A86EE2454E318
+F5CCA728BA2035EA749CC674E832B90EE789BC9BD0D93959B901C006D4A57642
+36ED92B5AE29D8BF29BC8ED3011D4E2E1A180CDAACD9679D95F3685CC3FB907E
+53B1FB857EAEAEAE33E5B87F1B53D7432258055FE02EF80351F8651E169DD121
+14654E913B701564C9DFF335B44EF9E7C34C891E8D5B4DC8AF49F1E8AEF69C2D
+181972F3558AC3A9EF3649C5A8F62DDAFF9E15B8540AEB5D665FE8C58A7819D2
+E945305CF8414E4C82475C6C7EC10365322E0D1251AB032D2B53986AFD68F5B0
+C2E9BB2BFEB6A1E1BDFA8DBC4183DD875B6E09D9D7653C97569AF9160FFD0177
+3D23E21C59B0330B6034F8BDB5854B6CC73463DB04BE06AEFC170A9A0E356537
+99877948CA4CF92F1B24267A1BAE1B5EBCC70D92CF76D63CEBB004B77151AE63
+BF957222499C82FB04A976118FED7C15810F7CAA98C17E06CA6712F318405E8F
+E40CAF5568AFB6464B10B409178F6C2FC5F2E1659D5370004D8319B76AD4E24A
+EFEDA214690C5CD3E0281612E90822632770CBCA36CD5581410F0BA737CE5581
+AE466B3A4DC73EB951818BAEF2718749B834A3A4C7A7EC08C123069FBDA203DB
+DFA7B49135B6C7872B51E25F4210F282BC6D6F429C14B26BAB2090EABCEBE2C3
+C2F58AC82C68C557C63CB2B4EE2167F7B52B444F917DD54AC87D21730761ED32
+561165CB25CDFBD83C1A718BAE119AA7331E7C99534DC68AB0996A39AFA5237D
+FC1007CFBD84917E667F53A49B1BA38998F29056A0E8972D5E6CF04456F63732
+6B0656B515C865A55E7508BBABD5F5AD3F3FAAE9C2081E2D32E5DDB16C3B4ED9
+AB0F7B3A0929E7775B0FDFE576E15043A3A9D61434FF0A5379C2266BC4A898A2
+A77B5C032629C85724CC1B91608539A0DC2CCF7DFC55021C75350C0EDDC79D50
+0A577F2F2960175A90515EF6F58771CBD2D7DDE0C78AC263AA2FC00F57EF85C1
+50ED7C5513B0E7960D2AF0B83BAE0D9B696DE437ABDE36D128B618B872AF1F6F
+959D1871BEC575BBCBE847622031307858B24B041DC8D4221F1C6DAAFF7AFE5E
+C7064515A0FC41A267943125A71F300BEA8175B85668632CE8D65D99C75C3C6A
+3CE8CF0165461DAE6E57B5C92A2EF499B3B657B887D05F8E8B56759E23F6807B
+8B3143BB22299DA9DC600CF907D983E4EFCE3DCB42275C706E1A7A2D47B5A9B0
+F3DC3D3B279ED66EB955E2ED9E64F660050A9C1629646252924412F639616A27
+1A6C4FFF63BE6B0B616751A5A80154B18BF152F53D153FB21A6C269298D54774
+38331BE0DEB93A3D42831ADA931C653006BFAB39162AE1D97574CC0ED7BF5C44
+610F6C618178CD9BDE88E101BAB5F278828B3622EC01DF8D4717BA72F5DDB4A3
+BA3EBB687C866EA3405D8C11BEACC5DCE3076FC8508996D51DD1B2AE89D37B12
+83E11FC3E41AFB8B497F676C5E1D161BAFBF18900D50C03CB6CFEFCFFEB649E4
+198F1453DE0BBD03ABBDCB5A075CF618978072C47C3B4A24043B687BAC3AD657
+3657A9A9B3813C2456D2DBA2D910D7DFC0B55EE4EAAEAEF8BB07204F0F537CED
+B8F67C2738B5456BD9F0F22C6E54EAC7CB905375C915D0D662060360ECB10C10
+F30039B9A5606F671E0EE132C5788655E4671F2E79D3AF39118AFB95EE5FC061
+BDB869E0CFE549BD106EEAE8EBB6A6DF727FDCE35F0375E95B27DE211FE1ADC3
+90BB092E442046A7E5DC902CCC3553CBA4912D989ED8261539DE69A871F82C99
+06282FB2E8105107F9B443245FA74FDCD2A47673DE6E2F631D3918374AB6236E
+792D5DAE1C76F3FE6A7C73346D1E8CB2944E382E7C31F99F6BD5029DED9C3E54
+984492F4B99F10FE5739F6D5F6F05426991B8495BA4B8B21002CACFA1FF45A51
+6B76D1469AE3874D97517A32B9BD998D2E4590862803544E33330BB869C5E3B3
+60BB9FE9B9756D3FB048C5A01A25B39B8729506D0F392350136C3DF46C9BAC76
+CE450B346A274AE22058339C6DE92E6CDFD584F421756E17ABD5F5DE2BAE2D7F
+547DD3CACC6AA10AAA3BEAA1BE9651527E3B7CC5F11737FFFCBC52771819DBFB
+4E6D3E71EE6C4A0B24AAE5988F828CB5392821FF2195D3452DBE0408D0B87669
+C6A630B6C1E00D0F1CE10F1000310B9E177F6253BE09247DE827B97FE02F2413
+AC5E94569BAF3635B4C5936BF1434FD7D5971F6286BBBF3102B3CFD68AD25993
+B69BFA3C89F4F4C777BBF3190D1295957F9ABC24BC147E8C95202A6CCE6BCB05
+91B821B1A27A398AEFA3A22ABFBA4227C5D0E0E138FEF04391E39C66870A77DD
+5D2CAEBFBAB1C5511BD62849EE9963D536461C0693074DA942864438278C2778
+2A49489EAD7B43340ABCF99A71B9836A696995C6A459740D58DABB5AFCE96C08
+B03B0D403121744ACC6F475E194E79A30AC2B165BF302CEF914D34777FF1CA88
+46EF2376889244CE73C9123542D3759DF83B3AB2F8E5D4865FC242058AC4C337
+96E923EFC4FA1F23800DA6B51D6187EF9F1764D15FC343C5989760998C65C642
+C4201ED35171BADFECDF52AC6CDC58A0CA988E44FEE389A599BC59395969C211
+DDF7969C5922950B0CA4B0D9C960AB1E16A60BDC44B9F90D309EF1BFDEE1949B
+87B66449FF949F1B935DCB7B492D4E1E805167B9B5FF1454AC7D5409E2C8BDB6
+13B3DC21A3A3A834A64BB9C9FF803E2754EEDCCC140AB0D8A38A4B04F78B83EA
+7BDE25812DBBF98994D414F49D560B38FAA060E1B8B5BF985C04D425CE9914B9
+6EFB14ED4DD7C5F5CCDCA97EC2AA2CD6994A140004D12F7EBE5DCE90183592A2
+7F431A2AB72AF8E4F462C020B3166583C05F3A1363CBBE68DBD024ABB7F99523
+E89696A976C173D373E4EB4B20671F010F1F7A186BFFAE0152A8A38F0E41BAD0
+8543042253DB5F848324A27D0E681FA810AFE80151BB2A7A97594377ADA7CA6F
+58EA91BBFDE300C547F762D6D0696A4C1A145191F410B6B784F740B8E0B3B855
+56613610441A509EAE3F7585272FAAA54329831524A5079F6D78093B3EA3FBA3
+12B7691ACDAAC0611499FC658DFB64A1A7B0D048C82050D8912491FA1F5AEE1F
+E02E423A89119C25AA0F89EE27882697E60DCC0156A721528E4D449AA5B9AC21
+9F1D343CA479DA22D4DD4DB7EBDD46D7985428D4E799D9240AD52ABF2AA64773
+D4319BAA29ABEC21172CAA7C0761F78756D3C72A0C921EB3AD83A850FBE9A583
+EA1F219428A23FA044BBBC6755F512F7A8996DD7C793CF8BF7FB2277DB8E28DC
+BA3CAA878C7BB8D04343B7B9E4079EDD1ABD862B8D65FE1E305BE631D3D03700
+EA13375B58FE76453947CCE3A01890CFD4F91F5ABC705BBB15
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l048033t.pfa b/lib/fonts/l048033t.pfa
new file mode 100644
index 0000000..a56b589
--- /dev/null
+++ b/lib/fonts/l048033t.pfa
@@ -0,0 +1,1267 @@
+%!PS-AdobeFont-1.0: LuxiSans-Oblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Sans Oblique) readonly def
+/FamilyName (Luxi Sans) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch false def
+/UnderlinePosition -36 def
+/UnderlineThickness 72 def
+end readonly def
+/FontName /LuxiSans-Oblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-219 -211 1101 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078989 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D831E44DCA3B6490FF0789
+636294029DFFA55E327982DD4A2A67A6FFF480E29F5A881EF13E768B43D431AC
+37F159650C27EC72157C59E1AA122FF145C863CC787E9A7DC23FA008BE85711A
+EFF0F8EAC9648157D8211D40578588623322CC38EA02A3880326DF2645BD3F64
+08412786DCE5E604A2A62FBB694CCA1E173447AABFDD315C766BA891E3D75393
+437A58C7BE654E8B56EB2FCFF72BEEB66DA88A528F948A1278CD8C27422AEC7B
+96BE8694A1B33CA185601D99A08AC4905EBBBA42E7751122791E5150EBEC7423
+ECD39B2D6D6A8D2A7B920E68E80ED6BEE52083684530B8484E6475D0646EF488
+BB1BAF858685DDA12D8D63B4D35DB9F9E5C0459001B27DC28E98E154771B08BE
+055DE6C18C9DBBF7892717EFE2F18DAE3B714528DF55A9BB6DCE3604435E4E82
+3567F359CACC0DFB39D23489E75D582DE8FCFDFEB6DAE957065CFBC65CD52E90
+ACA6024498AD723DDA921826B6303C7AF6121273B3C87372CFA8D6D7A2F23D4A
+3B217CE35D2546E0B4F34A2B53F780AFF950AF527184D475FFA61133B9E1F3B2
+8612DBFEB7D7ADE93A68187E35865E23165C9BA77C899A309DC736CE27DEA6D4
+897D93B9E5FAB92EB8DAFEEA2E1C8A0D4EA9820860F103331EEC52FD564F17B3
+A6998015B9ECBFDCD47C10FE6B1D915FEC61720051C587E36D4D4C4BD30DB959
+8F0D1F67850B7342E41125F0175B287DC0984BBA8870B2EBD237852E12869412
+D864BF76ABAC386ABCF0D8CA91CA842D6D4F8450DEE0D405DD7B5965F69B0B96
+309E02CE3CABFD2038926DB8DFF48618F83DADFE43C6759F21487EE741AE2E56
+ACE575512F6AB199BC9C0098A082D4D4E21BE5F66A54DDEBB6CE8C00DAA5D92D
+51C6C0CD9D52E07A2476A92BFAA6DDAB6581E5C5F83BA2385B852FE2367420BE
+66C7455A817DA5D1484BD3EE124847B89F1451912F4A759D0AA87D1EB408C340
+D047831847B5DB5C943BD2D5EBBA1D959BF559D2BDFDBB69BA0DAB927E1D428A
+C401BF5F2DEBFA016CF35B31F5BD00883043513928144C4A98A745D08D81478B
+A5733CF67EC9FCE378C4940303BBBA71CE104B525874E93DDAD5ED06EC4F5E8A
+917C2E46A4DABA795E3F72FBBDD96C88817A501BD3E639B0FA4581782A249F1A
+C62D58ED43C26BAE32FD2E592631D9336CB4D957105DBFCE2D22586255E4D643
+A0C3BFD1EDDB43B97E8615FCCE2ABFF8EAA14702DD7E5D2795AC181014138B5E
+314121F572A72E0EFDE33814F6219DEB0B31AF67F655FA5B1C28DBD78E322B96
+A1DFDD81E3F75EA43A7C1BC923344774F9A06E8323CD1C5A3764C98A95F78290
+C66703AEEA967DD717B6C11E2BFC4CC966D38D7CC05BB9FE5B98A59D0321BA6B
+908524F664695D6C4AC6D36DC0650E792993B3C8BF3A5F9BDCF1DEE23469CF3C
+9D174083F0666A94DCE183EEF39AED664EA96F369CA87C365BEFB386FA3D1C57
+855BBEF5FB778FA0D16EDF3BB714C5A0085FF924036170096886992647B0506C
+19AD3E8183E108F85F22474EEF2FF1C792F900A7DED01E37DD0A0E5659BF98CD
+FA278D5DBF3C8BEFC72FA3BC09B646D5C229439C3E3E835CF60BE09EB8DABBC0
+76DDBB693716754E3869C0FFBB425A3B33CC88681849B22F31CD98FC1B7EBE30
+76657F699667B51B1EF8E3B550CABBCA69BBD090C92898AD9834772DF8465C42
+4856D3AAC91A29A3B67206EA3F99A19DDC78433464D8A6315679916C4CC1F66E
+F6B43EF15FA032F4BC45336D4119131936FAEF8A440BFDADF0B6F076DF1ABCDD
+C3579F02E2C40EB55CF31782D8BB8B070C3BD4F48D0BBFCF331703851266D535
+61FD82D986F1D33C5CF6A9EACAB25D736AF2A1BEEE35A765BED58A75849F0068
+5210A5E110BEF1741A96C2FFC63C3F9D8FB305820203C1B406F3DDB54D869961
+E034946FBFC4D184CB3481693C579145761951F7EFADE27ABB4A0003847AD885
+FE585EA13987B334332EFD1A958CBBE3CB21A4F1C61AA81465BD4F524CD99E79
+35297F71EB9CA7C9701760857CE95295B397976516378EC7A570126DAF1CA3A1
+5095186DEF18373FD55DA596EE7688D86A367E02FCC0A36D564BF7DB6B263546
+79F4E1276EA549927A38DC8383E8FBA16BBB17CFC6B2833C90959FDC6B3F7266
+32F177624A9E26835C7C0E2FBEB1656E246C8BF4EB7803FE4AB0F9DDB77221DB
+E4F134C8304EB13D8AD0FB57C4766133AF879DBB7FB52F25A555FA74F145DD3F
+65990835245E26480C90E25CE74A249D9B8388A27A4BD2F63D72E383BCFF0E08
+B9EF146B512522DC267836520267ECFD46C68115FEF3ECC655A1FE092B9DBCC5
+412220BD4EF12017FAB9C51F198725E8F225DBBED24F56239C558D545D353632
+415F5688D0A85519E8AC25F27E20A4F7B903F62D9D2EAEEF33ECA60EAC68E55E
+2A50DABEBCF97404687089D2B569EF016DE39DD953D7C458F77FCEED17ADD98C
+C6AAA67F4F09E24BF7C24968B44D1B489726DC2E2BB3C481C676B3BBF0E623C6
+E649C80370023502121070725DF295DAA8565F5771AD8E8E2C82F96700D896C0
+CEF869F7EEBA4D2DAB7C4E455C10EB229AD97B669781182BDA58DF962823F597
+BC8CD6BDEA739C255CDA232E4B2256815DE91D09CFAC6FDBD8657BD9DCF730C9
+86315332754F25B6B3A913D786A2AED4EF78083F82FA1EA8EA16C0A6CCC6533A
+0135BAC54D05B4553EFD04D1B5BEC10B60E1A621050CED2CAF978B057225CF30
+2322C543CE420CCBB0A24988653589B431FB84646945114A37A6780BF1DE812D
+31E82FA08B4C0716E17F6831F4DBCF7EEB127855B88494315A98C578B5C5C03E
+151EE2E561D90DD354E6697425A49E5B5ED079FA28FB845E4ACF4D447FD0A560
+5BB8D71BCDD40F657184F0005B40C2A51F9C0B3782B8B984D0F5552537C37BC3
+5864EF3457143C4F36B42E59B27AFDB623EE36C82EA73A1DC27B52E544702659
+AA4073FF40AC396F1B2D19E30A4A69A1723A5C2492BA056DC1B7D04BD4331E99
+B921369A7E502808FFF67C468440ABBD4E9379C0FF2893D2B9E96F32F9E2A304
+BBA87F43DB45BFA9B221EEBA8F65E0D97385485A49FE8C259000C6E2D66120E7
+492347BFA4021115140252CDB140EC68E2E404C35FD2BADB2A27D36BA2E11F15
+D300A92DB828646F12CC677EEBC545630FA2A8046E6AB14CAC5A6ED967644D32
+D0D915351D39913CC43E4C2E379C59762DE62C190657A6AB262F4D2CD54EEAAE
+6305BDCD3D240FD8CC45CEE4291D905C01C05975FF24F77EF6DC03471E9BB834
+AE38A38225342FBAD3F20E3AEE82799CF60EF345BD46DBB56BA7217C1C887F89
+581B6A9BF199E4EF6B9DB643C2D0089E0AC0DD291D4C2A0752B7944EAE45E0C0
+A3CDCD4D5266C7C8FDA7D5D1F84E6C93348CA767108DC279D961CAEF68F8A496
+492D446DC08D83A60796EC823C1BD78872704B08D9FA16094D274398B4B3CEE5
+15504209BE801FC20D7CA94EF3571938E17168A44B36FB9674ABD86A83306CAE
+D9EAB6D8325852DC6B10D798B95E56EB8FA973A2BBA555000D71F7D997142E36
+A93CBC654CF5966B93D599405BB73E5473EEF6B961452F14E0865F44FFBF0797
+C5693895A9E33620B85DFA530C480ECEC3D773DE6AD42EAAAE6ED9DDC951533B
+635E40FC95A015974764B7626C71A9FAE2D672B158BB1557EB24EF575ECF5FD5
+3BDAA7AC6D8A5FBC83AA00F45F1007D1BC258AF9A672D9E103A74087C041F4CB
+911F8DA6BE3CEBA90F205384E9C509E13D7B2B47286F459789FD24A838DE07FD
+ADACC111B894CE32BBDB391242AB4FED699F01D3CD324F1627B6C6734795D322
+D9CF128F25DFD154B79304FCF80893C922859143320D0D9EFA15F2E03465E5C3
+070D93B1B8A13271D90437185C6772A7B3B87B196AA179FA45E7C0806AC25D21
+E5A085A0510B197C7A5207F5D56ABD5601CEB6D079BC26849DB73EBD4E3C802D
+8BEAFEAD9DE346E7AB231F70318B1F0238C766D61943F81F94EE771042743947
+77E4A94D282D61965A8C2ED87E8439C080B889BF255B92FF7B61975A1AF63EA7
+DEAA26B4F0E843E7F4A3EA99AB6FCC3D9EAF6160E3BD2F4354605EB04DBE558A
+A52FB6D8DCA009DCB6C601B876B742AFC3A23E15974F95967200EACF37191675
+2612AED74EEFF9AED8C10CDAE9EAC4838360EF1CA65674752F40B025A003AEB5
+A5919B705EC58109C2CAAB41D8776E02892099B9092A6D457ADBFDA01E85A140
+703575A7733CB865589CE31B02D11A0C00A947CC9D9AEA8BCB465AED57BC4ADF
+061E66BC22D032CFE50538610836FC4AA481441FCC43007AC96BEF93EE9A3A34
+4EF8100E7DEF7C6A000FCDF5AE879D1A8DD4DA585C9A71303E43D48B16FB83F2
+FA5C94590FBC5EAACE4B55291AB239B5DFFD8ED7C872A8A35B0C82EFC57F42E2
+93E4A0A517FB12D9317B6CC10A2627CFCC61D350D5D0DA9E5359D97B7EA1321F
+F63B3991C42F2CF06910322C780E5F47AB64AB236225724FE7552B9D20B80758
+0380188728CC0D3CDDDB0EB24112C19122DDB20F74117A55EBF797C1FB3BDF24
+F2008D619DB7C4625A4B057AB3BBFAD0DB7CA7BD269E30E23AF79F55128EB072
+F1230F61B2F2335E4552933EAA4E2FDBA83B68C4B728BE38FF1DE4D3BF0E9E60
+B3B1B5DBB32C20988804C2F8AEC791170AFC72CB1314B80CE56F3F73A4E660CF
+A37AC1164AACC6E4FB408F222758ACA11306768B9563D26ABCE6712B5A8D9C52
+DD6B23BC73ABC37DD6FE71959ECC1068CEC2F7932C3097B97660938717DA89FB
+7D5D36DBFE675083324354982253BD5397F872299E6E1CE7324A65ED0E36D9D2
+F4D8782C0F73F85442E0363D3E3059AC33E8BC80164D5DA72D5C5A45A02552B2
+EAD050CAE6B0568943DE1A68599EB004B2915CAF6A1CF0C847178CDAA1A1082D
+A67CFAC77E43F21E5DE0B4E0C67F59113E98AA0908F7D84B4AB5E52BCBF44D2E
+7742591D365B208AE0ACCA84DFF546069D8D3A8A7007B09AEAE51C00248BEDFA
+48A4D06B188A51E9FB585694A79377E1F03F685C1E901D1DAB35E37A3E4BC240
+CC1203D603EBE53891ED663DEECA562214DDE8A6FD4145CD70D5C11FFFA2C160
+3E855E6F51F5702C127348920EF8128B32C7F355C491392075143FE94B8B9B9F
+9D692E4937B217E4023F20CD7E215EC36AD550FE802D12014374F2B71C66491F
+B36A3A167BD8DD66B5AB2209A161E45B377CFB13842198736A301B6032E48B45
+89C83613A7D8EBA90E721C747C3FF4DAE1B0FBDC1832FA1ABA7AB8ACA5AA0AD5
+3EE07D977E8423EF0EE73FD074BBF9BB333107C8CB8EE34C6453A92E8F00D97C
+AA32BF9D5C29794B97F94B299F2B256225F83749D1804BE657C1AAF393A517B5
+A299757B0DC2927975118FCA733BA8D1AC62ADF30D850F2F0D15FD7CC86DFC9D
+FE51B94E5404FEBA90C39EF938AED93E3D871780657B4B3B2089CA226A6C5BFE
+D558B6DFD466A8AB3FB9B1EBF7DE20A58D73F7169F9C3D74162097245072EA76
+57C1E0CD95A52F20A9696CFB3A0C9B5E291AE98EAE099046459FC79DFC035FFA
+2226C3484390AD5453CA6AF02EE6EF557D7091197D9D6B4A350268EB383A0E21
+432C9947F0406246D8F092D7B4E66C4F26022F23764C5FD368199A55043ED876
+DB5153DE7AB4517BBAFE8C7E2E5F9A8009953CC190CE2FE17D8A4A9F935B53FD
+B0A7E99E95890FED19FD4DBF3037CD343F0DD60D976DC45FFD226BAAA771F8A8
+825BE0896EA5FB4F1630E3E094F4CE48BBB77DF3B3E02A4C87DD3DBCCEFEFDFA
+49366A42922C9D6BA8B158D5CA984E39747767D90406F265EB3969458A0EF64D
+3068C11E9AD68E9A7CC8D16B9A7D039C771FDFA7A53B57DADDC28A192E855F08
+53C1181C71FB478D99689750BA59720B93D59A6A59BC01E31043E0746B31F184
+4484ED2190B3164E5DC9611F4866ADFD85A70590F1E10D3342210182D774DE19
+69E8B4CF605F9DF4C801305406F5D6FCBB9980D63521C12AF90CDCD2C0A728D1
+FCB6FF4E863DA97B067C95A66DB6CD3793B140F62DD957769B62E5CABCA270F6
+0398DEBF12A0920735A29CA5CCC9E713A772E5F49715EB6940E4A9F06CE317BF
+7591CE708F06D58EDC3780472793D31B359ABD417FC8FAA880B39E7957B90312
+0964AA59434BE4D1A758B0AF818B2FDECE8A66A7E8D5330576145B60FB56297B
+70365939DA78E35B2B557012568991AFC0C30042E0EF061ECEC5718B473C9D00
+47C519445B354A2A80A161A49E893D787BCD72AF0717C2F77F8AD5883433EE6F
+EF9792F7DCE4CDAB9C63E13CF9B5BB241C5EEEA9DE55737F194C2F614E80D0B8
+B52B1972D6FA1B08B00DE7D85FCA62277DA0BEDBBA20788C1C6F30A81392BB8A
+1AF5EBBFBE30161C99A168DFAFC67F3A32DC0E31E5E08B89B0E377BD4FE7016D
+8F65AA31FEA39019E03A5532DFBE38754B6170E0A1104AF8A31B47254FA38987
+90E53D9688161537F1C6CFBF189C792B2B3E7817CDB7072E1391457DAF548270
+2F91AE044394B948B167AFA7DFE2EE15CEDB3409095D19844E623CFAF4907DDE
+965ADA237507174C60EE9869D7E5E8ADDCF44279B0CEB596DABFBE6D2ACE78E2
+46211F05BD34346E31D885FCF6BE36A2A643205944FF48190F448087D93CB30C
+3E7FCE736771910C808CF27BC1E5C0960987EE453BF73AABBFA80108154E66F3
+159104B535BE89859557D664DCBDBE24E6A9B9AAE1EC3FE611BECFD8A0BAC2C0
+861A22799746A3F8C75DDCAB438BFC31431CC7113AB6360D19A91A275CD45503
+795765EE75349C2BB62ED8F062810D3795D653D4C3E4FC7AEE0D09A156F4D683
+BC9DAC716398B877BC4F4FE997255B26BD15132E963BFF80D6F74B102160B97C
+27EF76D963C6F54668D47D8D28CD4CD8BF8A15E34776D3342BBD5B6331DCF1CF
+8C960C7EF6DA0F04E136CE2DE3B338ED4E45C625BC8EE55E30FACE1700323489
+C7DFEBA8382EF6CB5E6A61833D9E92E68C8C3EA2DDAD87A3F2CE295D4A629F88
+70010FAAD335D042BC9D465C0CF51CE964853A3CB5CF28A1959E3C865A074CB0
+37508C4581F632DC9DA0241D0558EA26CA4F1FC705E5D041843E1066695BB5B5
+8255BAA392B820EFA34754C408516E11AAB38CFC02FAE7FD63DD7074A6E184E2
+CC740327F503868E5E520FCD90B8A35C82AA7CC73CB7131DB9884A3A5807A640
+AA44A3DBCEEF922811D110103202903499614AEEE640F3FC59E388063977C9AA
+A9F8EFD1011B373B255A97FD7B78ACD5DA909CC4C93A1CB43FE7AC05602460CC
+D1C216CB1CAF35CC28EFA959702BD3428F7D632425234F0F576620EE6B1AEF82
+20BE109D25F84EEB9B63E0B73D821DD4E61E6818399CEC44CB0EF3FE1344994D
+B1DBC9DB8295A167EF8E5BDC1EDA72F083892ED899985AB0A3E18498A45E2B59
+08866DF7F498C3B2F7E23DF363253F9E98305DEB607409E5D0AEDC7871C40D58
+F23B5BA04228862950727602BD83F688C922D3A68DEB7D232FE494DC1FED59B0
+0D466C25DCCDBE438E03D313E569FBE1B6876622BA9EECC2FD175489A79BD995
+351E2C9CD01347462221D7515DBA4AD2C9C20C266973409876EEB6CF6D6EC08E
+2E7A63E48B4A67E5855FECEA3C54F06F726DC0F2ACA724B448F9C4E2BA7C6938
+B6B3C6059DC998EBBFC735C9663F1A247697647E5D26FC8389E4F6FB5F69A18E
+38EF7FB2B36238EDA100BB2B2C455247CC08127C60B9A28D024C4DB20C80EE0C
+CEB3C166B6008D6A907F24AE05B63C9B85B430E35CE927A6D13715B65F5C67AB
+E2CCDE71EEF21AC3FB69357D5916DDAB420EBFE320A253887CE8299F546BDA97
+17F45CFE9FB9B44D66993F40044DA0580276D975D803A05A027FE197C3E69D59
+B0C603D5BE4BE783BF55EB89256353DA6F7DCFAD6C82EB09720475388F813717
+7E2483F98490A0BB7646648F9412A4C4FBC5DE09314824BF6A43D101BCFD9C49
+365EE33D1B763EE47AEDDCACF09E3E6D9641FDC4F9E284FBFF5F294B5D0D7982
+A9E545973B54B2D8C9D6BDE55FD08AB8E694981977C77FCDE79028F32C83957F
+26BD8CE3831EFC042B0451DC555F7E9EE0F2D40D2CED487607F48893E8696F8F
+82CB5367D9FC51A77ECF7E5DE6B8BB8C626EA7FC74B0244A0BD2EC1FAD94A851
+2539C6AADEF9353DDCF498D9733631464FBFA298E9D23BBD041773D482749836
+38408C5D99794F76C6446C22FAC277F8DDA658D73EFDC46B2554CA6086FE7EBC
+34509F5B1207C16727B2BA222684395FA168CB5AFC620533B2F96B75C1775BD0
+441201D19F2A70D8ED17863A5475DF5D6A5AB72770F1A3DD16B39E8144782FF5
+90E791130097DA74E731272EEC9BC60BA75957A5CEEBE835A0D77A4780346A93
+CC984FE0C9C46C069BB51434FF0A79DBCBDD5499F48CBD944693E0B9D18A143E
+5441A3A57F34B00B5B8AF59D97B19425795D85109708F66F3A37E88E291BA6AC
+5C37B29DACCF16C44FA4D77AA0DD573AB26DCF46D8DD8C33C881776A4FD6B343
+4719258FD5B4718BA8DBC94882C530D8F47B26EAD4E54B19848AF2D897AA7B47
+CFA178A45E213BD3CADA498F7BB93E3C74A3598C62C28C5ACAF0EC172F883BC0
+79376D48F6E7BAF85A6823D839AE7AE15458BB33C33E6FFF63B3BE3D76E02B32
+2A207D6F113E85E66112E81177C3E72A5B7F902B6D1B8B7542D7985D69DDB0E5
+97F03187C939369D10A417C300DA1FD0833F338232A00C85085354794AE9A087
+B8459A999A576151D01F30F45CE06180A55C236C5C3588AFC541DF83F444CDEA
+779B7C825B740D7B21897818A5BB90E728A5F1E915D789FD3E8CF619283C1599
+ADB01CFDD7B20F4B9FDE8CA2413C6F1325D5E39A641E638A5F212F32651FC540
+CEF349609A36CD64B144BB229B28B167355EE604084E480453478F271D93EE51
+41D289565FDD80C24047C5DA6F6E63CAEEEB361039CF136F6BB6771CB997F039
+D8011DC0882CB6E07E419E90AD2E1BC3ED4EC481A2437C1E960B86E413C54264
+4B0D655C8BB8C1EF0B2A584AFEFEC63AB229B037AF7FEC78D0C0762B250909F8
+84A3937FE5ED394B22B1A4F7172070CE1BA5EBE02E93389A6451711D2A33172D
+8FE716E279CBD94F81AEDBCBE43829536DCB6D816B5348FFAA49A335FFC47016
+40D65A9C2CF70ED6F14D294D7F00F94DD5E918704CE7BCA42214E9607686FF1A
+61397C31A3E9D28589472CBED26C2B8E3AB2CC5DDFFC5936D1CF3DA9649A489D
+32B719EE6DA53A1FC5A2BCE8CE665D5AE01EE561782FE7B3200A132493AB290E
+E77BE8561EEC178552D26E0BAD490BAE7B2B2D1CC2AE29BCC85C3034F43B3BBA
+513BC8375DF221D42B25F5558D19E12D70402A1BDA81C56BBFEE60F99D9F152C
+6437B8D268FCD49673024BCFD4755E1A0A3436D12D2F6E71CA0BF0C3CCD00D38
+34EC290C7CFFAF3485C8FE848A543DAC0172E025CEBCE2287E958BC91207DDDB
+3734DBCF73E7EB9E6ADBDFC35FE75F759EAD1D341C576F047106AA89CE30039B
+A9C4155E3EB571E700F8C0F04E24D4841EEB8D99A1BA05E3291925820C28DDCE
+34CCCF4CFC655D49295F159733DE276D962A8C5CB859886FB0CF642903F78E07
+FB0995EA336A63EC9CDB5D2EEF6B32C81B13D1848849F07B653887067115F113
+57855931115AE76D7147110B2F3C2ED20D7466B19CF8DED751C15F12C730CC54
+C86124A03673725D1331E75DD9E4A84858EBF5F2DF6AD2B0FD5842DC6372F5DE
+F334D21F312501E790CBCFBA0EC9823BDB1BBB32BE5CEF2AC5906A368D6C39E9
+D913191C0DE05C20C24B10048368362E7702CF6E993E6904A85693B520CCE666
+7F7DDF2FDC2195CAC5CA89D230EF1C383403DF6E22B64EDAAF6A1ADE3086DC01
+1849B6865F7ABA165F2895DC703FC7536F3CB306CA6C3375F36CB5C7BAB8C78E
+DE37462B465EFAE538C52267E0FD152467BA4EF681512BE295D3FB2D5ED98B37
+9544A30798D1571B8E794A4D3B6D0D0F2F630E2948B45B187EAC18272506E2B0
+8029D9ED7C5C82CFB5713B0FD929DB6B718B8C3A1211C9A9D587DBD58E54E0B0
+E05B89A429FBDD4BF4CF309E9C189A21BD42065D007DEFFF38387A02B90EEEED
+CC4C5CF3B8788549D626CC25AA246CC022C8C1CA9703EF945139B8E10936251C
+80C21FE36821D75D0BAA1443C3E119BC08FD153CCC20A52074C095D2680AB050
+D203DC0CDE27771081ED74A2C5E0718B93364680F6512BBA43F1357A70839CE9
+C7D010B2B90DA733C74E634BD0FA1D281D40779E4FC55139CD11170ED58E71E4
+A4616EBF68B805122D4AC069B9C30F7F9B8A204D740C17DE428781CABDABAEBB
+02F0B018E812F00EB92D5D80D91A5E9755176BFD7625B80223C2E69EA237D8C4
+08E1A8B51CD142F48A760EA85D01BDB66284D61120A61EA87086227DD004CDAE
+FEAFD1206700187B602FBB2E3CED6F333E6DB5425EC0E604A7478C017CF376B7
+D7B7548FC9AD882014F7598408E31000BD53B0A7D17A8ED5EB220D9D7C9B0022
+24DB358061C415A4A3DA467579F663357CB97509ACB840EF5C7609B7B8A5E1A1
+14E23BB75597312A45241847AAB21DEB166BB0452821C26063A14EF05B628230
+D63292B46CB3F53B7FEF2070D4C4D613479CCF39888224995D02369F5E3F1DB7
+27390BF482072E7DE300F0425DD301869878946C67DE03E713B69DDC2BED58EB
+1E8FA154A787BBD1FA64D76CD35FC1502CF01CD9476B5C1B7A623F221317965C
+AD3838AB18F185A9B20DB62391599043F31D1B0AA90C38C23174C7B018EB576C
+B1C7D583F723420FEF9AC11898802AA768B4AB70748AFBFACDED99C1789700BC
+A662B71CAA1855B83A55CFD1174DCF8DB001BADA69E45340FFDF0202D311006D
+996FA17BF67209A51CF06B84BEFC6BEB2C60B8669704BC51BA6AFD0130F37076
+6787C7E5119A7F1B4D1CCAB950A4621C794A128D3971759E71922D9FB2112998
+4C50EEE88291107A0C519F68E411E47AE4EDBC9A269DB4830FA3B2914B53AE1F
+A58B33B223C20BB614BF2E63405764A993CC250A728E4D420BB85F5829A862C9
+DD58D417A74FE8A828F62DA4D1D31955E57520CE2F7DB2E4F06B6179E55EBF7A
+289335B17E77CAAAC62C6A8FF7CA4CAAC6BFA1326B5FA32FEFB991B0DD0B38D7
+71EE06380478EC47549B91881C3D6E1B0C66258423B3C69C0FAC17A802832D06
+0B9AB3088DEC73B497204E5CC44E434647E320C5D83F8EA2A7E25B5868957E9B
+0E5347626A484C986FA5105920F079A5F520F5DE92AE530DA801E329C8592FE5
+5210709E8CF735F74F9CFFD32746E3BFD54A40E4C08AA4EADAA303C66E4417F0
+8D5B75ACEA41CB1A41A6788BB557420A9609400F6062AF8C3BCE7F603B73BACA
+35BBB418E0802B22725723E12B92A231E0C35B37A05CA9380CBE911C8895F380
+780EA4E04A8714D90EA911376541A2CAE1A013362634AA04504D98DBCEEEBD8C
+6DF498805612B3931FF721E63C8EAC4C74C0AC8128468348A2DB56702FFCFB23
+A6F78B6F7DD08E48D44E4DA7880836CB949BA8E915393E6B62F58F9D34568A49
+2FDF255FB29FFD0DA9878C19F2961BCBBA487A9A578C36476E6A49CB72BF980D
+D64D3EFD82077CC0663290BE95C13BAA1C5C07F50B74FD00A1B50788BE98EEC7
+F0CECD0D9612B59E385BC644B0728EB209FB5A0BF334A8F1772A88AA0E4138A2
+518FBCFBA956ACC6F566FA6BCC66AA2CF374F0D457DC7D7A715CF066B08FF1BB
+561BC5F6CC3C48E857595F9986829E38C6FC8AA8573EFE7FD6A95CBCDD859778
+AC517A3CAC168CBD3B9BBCE9D00111B3241418BE0B2E690CF4A737C816441862
+E25529374DE12E7361ED23E542BCFEE4D30EB8B746C2D133DFA2A68A8D2FBCC4
+6934E2ADAE482AE22DFD714F77E228F95E934E4C286E428AF5766B5AA22189CF
+DFECD70F4D98ECBDA9FE483FC30EB5FC4800D0A5205F23F863C21CE0E4BF6C84
+1EF9E77C68C99AFD3EFB879EB1EBEA8ED7E8C4C7CF7DEC6C2182901EF483B76B
+F83AFA9C1827AF5C3F6A29C36723E3A657C0E5DB55C198934FF5A59119DB5536
+F69CDB34DADFB6F596ABD7C5885103CC95068D113C3C17E9CA8C34C0B74E7463
+1D5C83DDB5B45D8EA510C279FAF577840958A13CF2B13741D74BEE4941A1C207
+BDC5EBFADB4CC01FA3F12D22E431BA17527C4BFC940A6A08BDE150C6E47D752A
+5FD943C4B7CAE482FFB7AA27371A6C45E2CE4C31EBDC8337A1B853A74B2A17D6
+BC607BA9D38B71D86F586A33D440B616443F58A103521AE1D6A1755E74BE6BA3
+05E45006058BA47601191958463583E8D2F0985D6356D9868E84C538654AE972
+D59C6F48D9D3B929BA4704DE684A35438FDA0CF60B3D2E1610642D87F690A3E0
+7CCE4A5AF8180114A8EE9D360C8F0C6A033F2331C546D34FD1B1E95B9E7C914E
+0074C40A105428550886A264C74306F7CC221D78352DD53E39BA99C1AC851E9D
+14A3B0B9CCE04806615D7D90F377FA3BA50182DAB42EC6E32475AD56B8B1CBD1
+D265458CEFA79C68853CB11DCE026C339CD3ADBB44259AC7318B39EDDE33FE33
+E542E4BC5C64B36B159D68F59A9B2BC55C0343EDA853A4D9E6E3E53176F46EA7
+3EC1D108D76588C7A80BDB8DE432DE32CA3AC3C74ADFEC515372B0594EF82832
+CD7075AF87CCDFAD82D2A570ACF179B6B6A318AC8EAEEB99B34DCB1A14A52ED2
+E35A0EA8C1A5449D63695FA7E52847B7446C4489751099B0D2103FA57ABBBC30
+A77E6C9682D560D4BD9AF78B0798FD89623126945A09BCDBD5789F6551B679F1
+52EEF0A6603ACEA8F7B9E5B58C25D760BC078943C5502E3230A31539DCA5A7B3
+14562F1283E8FF98361D23CAA48BC78267F46B0255C526AA8E5800D0B570D3FF
+C6C79CC39C2CCF320006298AE4085BB7E3C57ED37DB620A2D8B34F1E970E7020
+4C5D676BDF124E2524EB93948ECEB3B53BB3DDDE062293EF03670EAD36FCD0B9
+001D87FC35F0EB90B6CE065AD2040770E4CBB96F020F665E563DF248C12C95FF
+C07EB290B8ED0AA843FCD2D04BAFAA0863143FAAEB275FA8321DF73D589DE07C
+797027BFA79A5B29C03B560F41C999739CD272B01FAE34C0735820A9A78D75A8
+F89FF3D929D1CBD7B76707BB236ABFAB615FD25F4033EF8A2A9382C58A8C3617
+78CDF0F6B662C3785833F58F71115ABF92195968F87D49762536661699EA32F4
+E8B82036F147A0C8726FA2181EA36EE6D627F2422115A66EFA13A5AEB1DC6743
+0961EBBFE03965204975852DD634AC09B0C3C167F53C34EF7ADA1D0C1A09FE1B
+EA96BBE639FDFFE69A5DFB097BE71FBFE695DECA330DC168AA85065345124FEF
+E37DE2DB9E927F58DA629D912B31688B51B4BA61D9B8AAD2C552CCFB36274DC6
+9E6CBD67698CD4D16E75D1119A90A32373982E631E5B8DA9D648A5CFE65CA188
+F27778BFF26E6A55DF01A286E8F6376AB5A472FB3B2E779E79D55A41AEE83A00
+5D00E9CAD77F5E6018FB4C59A2F114A65FCC20EAF2C8E026BB97D1B94F9E7686
+B42A7D9A1A1DBD41DB89C4DC7FEBA4BA24613D0FC3931A05E39C4C6BF4D8E92A
+11FD40EE366783E9BB2EE55F57B5E2C4B9C62D3217C83E28DA32D9C122149036
+CBA8F707B7D3333517F283612691DB9A335A035A77B5C4EB4B4FD5511346341E
+99C55CEAE7FFEA94BB8F326BE2DE4C8D280FDD633CCB813B56F4E85FFFADC926
+EBE5C08265413E93C86D6F3CE187B09B0747EFAA8E25A153167A140E2D49614E
+AF270C8B6FCC854DBF52B62DC238E83659B138CFAC77F86DF19FB7D5C3FD4DED
+C688799A95A559368A4CECB79B7CC1FF10CCFE9111A74487CBC153A2248A9E66
+C6EE896EC885B43B73C18215CDD7CD8355BF63F81E4C8796502D4CEA494AD600
+49C684E376F5844FB4D02707A1F96A5E942EFBEE3359C77ED930EE904361B0CD
+01C86D8DC2C913E7644821E9A30714D18BC6357A5FE23CD8C9866C8E8F5729BA
+A16537D2D88077C7143116322F0ABC5C980DAF9FA8F13BCCA75B02E5CACFC475
+801A43107FE42A0CC87AE1A78B0F839197C02F2680F9094779C3A197574B5C76
+8D48F3BD89EAA1A1D98D6B63BCC31CEC0996BAA5F7E0057C2447E72CA708F14B
+C458F47D91F356E24D91049EDE3BBDB7D1BBE32C4ED5AC7771CD321C3296D92F
+68B6CA333B0060E2A6F5FA71D4A0CFF0453A788C1BA661DAEB4CF87557BBFADC
+7BA7D7D2939FD8D63F29D5FACE40BDF71AD0353293E80988D111FEBF46719056
+954162563E759F0314EE7A0BD5367CA6D2DB23B8E33EF0A094B77C89E1DCB645
+8E1B168561D7925778E38208CD5970A2E43CE2A5EBF52E87273D21E7D35A3869
+CE1F1A0E07AFAF4C2CC21B80A443BD9851D8D527C1343E975EEC4512950413B8
+EA9F99D32A13F42A432EE52489EB370AA99FEDD2330B75C47DC86A9106D67FE7
+80192E2109FEC77E00F60F1127501F4BFFFF05167EF94EA7B9CD14049AB7AE80
+2AF55490FD8DA3C80DBF9ED6FEBD0FC03CC5D82194F950F902966279C4E84D83
+A7CF067E1D1F07EA1A31C93B8FEF995E65BD7DC1B3B81181F8B5954C7BC4B62E
+19DC9B35C23652C15ADF50C84B968A12CF882D426486C46D3FFD964F5D6CADD5
+BF4500AB9B4CEC2A1AAED512CCB64071CF9FCE7E5357915497ECC259DA2949CD
+9CBE29B3F9ADE03E939B636146E8A4E8AA19DCC0F8C7A0DC9BA422BBE4988A37
+6513EB6774F0043EECA9F241E6A827095FE05AA6BAB09E66D08AADD69EA5BB8B
+F813CB9DB27C48F68508550BD494EC3F16589333B7E4A1803A5BE00C40F1BBF3
+835682C6242C479843DE30D6EB9088A48F115BBA988EAD5DFA2FBC018400D176
+840CFE498BFE4F06367B74B339B2317362897D6B4134DE01BBF9E9D9F980911C
+441EA5D6F6548F4E87835A7B566C8471A03C53136CC7D6A58E77A702EECF4327
+89D008FF5E51A274BDB5A00D3048039287C11B51E458A4DB2A9481679A2C7FD9
+A30D9E8FFA4A7220F36A187D02BC85D76EDB1FF407F33E5E1832AFF2ADB9EC73
+32281F6DDC48EEBA894FCD14741BFB4CE477EA93640F8F7C7E8BD21E257477CA
+F7688681DF0D3954A6C6794AD9AED1DA0C570E04CDFC4D3933D7DF89AB3CCDBE
+E268AABAE4FE28CC63B84894DEBF941D3F886B0464C111B698856873F05910CA
+A413A719611582A91DE699BC47E9C13B7A0F0B3E6FB816D5A03AEEB88A82ABE0
+106DD301196A40FB17E79BA85A6D5D4867E7D057B246BB24DB079BF42D1663F1
+B20A7E4017EA26B390DC39A57CF356C81851FA5775DB347A0DF1F174202CEA7C
+E13CA1F2713381D9D9FB3A64AACD69C0B48C18EAFD68C6B6B3C088189E805ADC
+D1F58F03E0B1BCFF4229CDE123B1EA5E026AF1B958B9C08ABE3B5D3E2F821ECC
+3B92CF0F3AE909D1EE1E5158D1D70E0891D888E385FCDD4AF71CA1EEA06C7BFA
+71D584E9A0000D508DBF6C18D30303666B2DFF6EBE81B9EA48D8D794763471FE
+5FF36DB90E8C6D2FF2B7897FF64070F8D1982DF106E402426AD09A64B7AC5BCA
+1C6DCDE633BC4DE9E8AEABC46E7559E349A0E905322F4B7E395EADFA8F8D959D
+F0E28E01DBA51F7BD55163D95412B7E499C9B480B6638F1CFA2278CFB3B99555
+0CFC8821F3E79EE3362947A6406B58C5077A75E2ADC6B61DBDBE9AF3205257DF
+8A7D6069D7B2C9721E50488BC754E94D1D8A4FD3747239724BB3C8F5CA2F88D4
+F69CA5F395B8A36141E40954392B5D2E3F3E49936F48E8B51CD931E53AADD3CA
+32B241648A3CEAA5E2D53B8B0A8DEE138E3F4BF88D1BAD2988AE342E825889B0
+38B5F9606A6DC3BD767EBDF6DA984E28F9A203F015DC1B17E26CC038DBA71CC4
+6A3D5ECF75802A02182AA4DC7FD34438E59960BA78B9E11755B4314886681B17
+AE05C263496170AB1B642C34226043809F8F8CB80D30A3C3C97F07E9EF849CF5
+FCF99D9797AE8DFE2644F1D597A37BF88FD02891506EB46E3DCF1C4DC905B39A
+568ED960C0CCEE30C5A075244E2DDFA8B568133780DCB656A537936924B7BE2D
+30D00FCB4A82F0C6CA1E7391B4ECEAC37EF8A32DD4FF229E31D8982D1B876C47
+924D26DED97B91661E126FDB72057412C5DA49D95A2FA3676CAD58E01ED9DE79
+162BB27E9F2005680D82967F953A96A11501ED68DC6157894C3461E1AEBC38C4
+DDF4962D9E09C66323FB6323DC88AC476ED6FD17025A5FEAB7B6C6A1BD4EB30F
+97C6527D6D836BA80E4F2A1C046368AE6BFBE132742EE6538DC48C918A1EA445
+A5651759AC5E5ECA97F21EE2DD6EE9B77B406DBAF1EA9BAA64AA075C57DF68B4
+119C681608ABD57E5A6E99251B000CD846F2C72519170A7750E01C1BF79C84E8
+0C24B2F74C73E3939BD161C67D2DDFB5451488B8EF6EB0EBB8C8012D237C9ADE
+B04820C893FA30A071C8431E028D33D656ACC12A83675C598C4E5F1F4162F113
+75D9D193D32EB3B3266DCA5B2FC27AE87403191FC06DE4BE6B40950D60CC2483
+E9EDCE3525E6AF91CEDA7A7BFED86C6D2F5ADB3DD0CE502EE2440D6529604ED9
+0CAAF7A0B94495B5E3472B9B4E4E72EAB9C899661AA695F0E1DD191597C35CEC
+11286CFD8CCCEDE2D696E60DFEE518FE2332532354EC36D4027B9E54B5C1AC41
+5D9087477E50D0074E93CFC74A8B2B4040C46D926982699A02547C6E5A95515E
+C906EADFE24EDC658549171DE19D95CFAC7A3E49590A741E0A872F96766F7171
+619DE1436EFB3E29091DF36087E573ED4C72A81B41ADC7FB681D08CA20ABC35A
+51BE69C85474E53D53F684AB7FBA6870930D72B2AC917858348C081334478640
+BFD6781387E5F9884F5B9A2F3F1377AF5FA2CA52EA68406AFAB6C91A888F47A1
+E002AA927D2CC11E2DDBA648960495CF1DBC184F6B4D5A44F1CBD67D8EB6FAC9
+76E386AC7DDC99C1D872500FB355A3A0AC805C1E00947F8B82B918A84B1AD2E0
+3E881C0E82BB047E0275CDB9E09E1580DB2EBF20FECDD095910DF6EE017D79CE
+6E4590FE4F14BFE554C625122FCDF115A6C8D9F6FE0E9AE6A29BA1F7B2311716
+E37CCFCD0E972F8CF909939007CD86D2AA045ED816AC1F330DC706C3ADD1D239
+D3FAC4AB5CD5344994EA1978131472A279EB0A8F9B9380333CA610DB402B679A
+0773807938FF12E8244ED2F0D75D6C5BF2C9AADEAD23F8D5BE373662C8485AF0
+66A33CF74C47C41995581B77AC05E0165E15173A956E59C6DF4873092C27986D
+ECA1916C2E34439E1952CA26E948E90840495B9698C2FD3A729B83DC30A0EBD2
+DF4270B5209BF65B841617AD963AAF85FA87CBED7158A4268F2F9C8A15E9F4F0
+C665FD784CDFD2FB1DC812AAFC7239315E7165A6B09E85D55C23E7A0482A6EE6
+E3F7EF9C479F66538A7F8FC39336E6CB09A3198E701F8D9C1CD3FDA395962097
+DC645A28F27CACABC767CA49D2DC82D41FE90279348184E415ECE21B1A3756B9
+F7E10BE0C2002D2DD040983D479C5E1F8A95DD7EF37E795B7C0DBACEFA209C14
+A295E95EADEE1CDC8A35E72C77ABA8DC344D00E2186091CD6420651F6D67900E
+67C6D42D0AECF3906191DE5996D7A9E7B78FBC03D5D7E9974DF81F1B203B6D1B
+BA18F089F2A40B72E69C7317D753DE2495E9EEC907D099F22EBB8AEEA6D65B3A
+D7EC581B0A8004F4BCA4067A66578D68CB9C0408C0010DCBD5A40D51494A19D1
+E586028EE13A0AE09BF2B52E4CDB383BACCB87914AE039A38A24282DBFAA40AD
+76D344F1F86950333AC92AAC28EB2B07DD65C15877AC6268091863E89DCCBF46
+F7796E2668AE126B9A74244BCD97445947031D6AB1C300F271EEFBFCBAD1BF92
+779DAA45BAC4E773C9222E73F14F1EC37AD10E663F836BC3E9C6DD70330233AB
+D8771658AAC8C8805D661334ED1DDF293DAF461212E88D95E53D5C23F3086DB6
+BC1BF93B1F0A90C0AD5C3321225F173D0E407D006BE11A963DA4FD5A1F189E1D
+04E40C2BF9162ADF3F8B672CE9991EB8C422B504F03C1B253290A000AB95DEFA
+6EF50D0F27CCDC324A7D8BAFEB8C5491377809252CFE69536FA3641090BAB758
+8DDF49F33CD14A87245F29349A09DFF54B8F9A743A5C20DA6A8178CB4FCB06CC
+EFCBF812158F6169015C38D0003E9D06223D3BC56E4585CD6A74273F5204CC13
+14CA969003A6D705CC923E268760A0A97E36A2A21EBCCA8ADB66C3798C08DC92
+7797F5CD56CB80CC88D00E789A677106F9D612725E5E982DD14E5EE696DC8C11
+12FD5AC302CBD81E03089865560659CFD4B4B770BD3CAD2D8B7A8861E7A625A0
+078977713FF4E8502B21B15AD68CAD7284AE50D0FB611980B82F99CD8882AD82
+6736661B89294B0DB38F4C65603F9EC45A0897400657BB67CDA50A67C94EE235
+33AF76525858D303CDA26C14E355132C92E132EB84B0D6297FA50620E36895DC
+B02B2C8562486AAF6D073E80CA875068774037CA16C01C332E799AF99DEB62F1
+2606727A6E4AE8715B98841FA84228DFFA642AE1789F45C86C8245807835C584
+BFE5F7EA749402E94A40AC9C72FFD3AF52510728ED95030C85816A117A6E4A7F
+B223430CC9A9AA7CE31278DD472D71E47A2D0265EB47773D14961888020A0259
+64E9E24B35AC6F44EA51D1F55CF7C7F3D7E4BD97877EF6562B49A842F6ED087F
+1B51BA1F1EBDF4C6443F4E778ADB0E990E5658A97FC203C6D210C16294C74B54
+104C616A58D1B0551CF94C6A9A0D2AED37A417E7C105D4EB2F45B4F547B814C7
+730342AC615286E4ACEADA9948C237F2F3F268D5DB47AC4663D485C60586245F
+E25C0424C4E6F56FF33EFFC35BA38B0EF5A4B2131CA9B516F6586D63D73A13FB
+867FF248CF66FBB2074098C05B3B1CBB401496A0D6B0F2487D1FEC7799AF3402
+00402CC895168C4194DCA7DDD0AA150CD2743DDBAA19A0EE9CBBFE6D6FB15C9C
+C6EC08DB9DEC8B5D3F1883CE2143843EBFAAD522447809E38C1FFC492B8A7400
+6C8DE288479664226DBBACFA3D29E6A63221BCC6939604DA895617A7FC99E15D
+72F4FEBB96EFD77D31B13D7B0494AEB0D286058FBBF013DC8399056C7F222332
+CC93202FF57BA3E51E10A873F20FCC95A776CC7EEFFB46A920E00A5B34FF82D6
+2D85C3A882E187199812BD1AF4C08FA09622A66C1BFF2AC1B7A8E36CC2C0C720
+4BF8DC761F23D8630C51AD13E55035A7AFC0BA10D87123FEE5E51EBABDD9CFEF
+4ECFB3530DFF83347533286C93C4C728054785E7A60516EF699351CA4392626F
+4697A64B3CE9995C57FE35878AD42BAFF0A4E511E18C94F740689D0C37850727
+4C48333BE8C6DF3E45204A752D791DBB8C972DC6F2293C46F8D4B06DC7B6116F
+3AD7A9F944B99A92A603C57BDDA29E77F9419E4E9885280AC3270352A38A84BC
+B10821D43020B2FFCA14452F8DB602EEC9201BCA8E538469605F5CEA321C8D43
+59660CC2623E613071B31A51FB9A48DF6238BD2A0625D74F3ADB1B67D51754AC
+E5DCAD203DE36E54F93728D88DD3A9684078D04CF9417A79894597921E636C32
+4B18C4C3A15712B9E765D8E53612FD66CC91C6B6EA4D2B93214F57C7BE19428D
+CE545E76188AF078C1CEF02D078645039382229BAE21580C5A309B61E2A7CAFE
+8A9A5E378FFEC21F36D2DC50674A7DF0F542C1D81198EA7861DB611F93E50E41
+B1844C0E761CDCC7D9A3AA3F11DD2B6524CDEEC67936C578A47918AC9A12221F
+6941DCB91587A1BA4D407E4CC7DBF883A4225EC0407B03303841994D254F04BA
+A725F0D9061B52D72669FA70D694E843A80BE0D8543DA6DE39C3EEC5FBB145A7
+8A41EE0C62F2F67999F4BFD255D279501AD97B94037E9FABD4997DC02C2ADACF
+82BD90C64883F4BEA139B8DA0931CA0C618454A19B639747CFF20B6741FAA7AD
+619B8DA6EE7569E6FBD4BC8C48E5E604A1F06C84C492150EB01BACA796F111B1
+4A10F4B95B2148AA66104BF95D064960984BC2A1FA25C6BF7A8B6C9A5A062122
+B0D1D705F4BED1AB70D5609CF5930D48E0292C1F8E07C50411F8B2980E36BC43
+10AC3CE58127BDAA32B0F771119C98F8FEE653B93BA2080CDD5CC2F5A2D96316
+2E40D79486B2C9DC53A6A92F523263C0D789EAF5A2EDBA95F5BCBE2AC4E53B97
+9870800E256D67DF46524B6D09714C3802318C52B7C24C2A37832E2238487362
+BA7DE4301CF1459801F03C5D4D3E83D502BBC21A4B0BE461FF5DD5E3570C8DB6
+6373ECF760002A8D36EA3AFA7B513AA886F44070E6BEA83A65F1103BB33505C4
+A17B2EC8639359548F49F5005107BD2CE0A5FFCEC5C2ED08C9905C5D31C36247
+961A0A1638F3E8553D5BD8CB1E8273A552B2BFA3E0B20024D0D3E2C710BAE20F
+58E952611A8937E30E1A3E57DE281897A638B4620E485A3D792D650F07806B12
+EB8803D2C0AC01B3DD975B461BDE462A5063BA108DE6DAE031439764C95C9A28
+84BBDD4AD3A67671883623EC2580ACAA99051C344D3CD418C583044813554C5E
+0B27B7F42EECD3D54BB7B57A788CE239F0B076029EAEC2257A5C8EF9B1506B71
+289FEA35762F47EC6D30254499D4C2AE0BC6723E560B0F6C8C137719F68DF348
+73DE963A4F912227AF342F82ED46FA1FE7EDA82B59CEF25EDAF5764C66A899E7
+08B0715CB21C10B318EF66E5454FF1A7B324EF19E226EB1587F8AC0326F55D03
+9290EC6B01A9EE33A1ECE1C3E2FCF4E3B7563D3A77FB4D40BBB8FFED1C858042
+8D4A83EE2DEA47CA2E9A9A59570B0C8448AE0F8C05A4C205BB4C20E37ABB860C
+82DE3869F24BB6882E08F045DB9147D6E83D82D0EE5EE7596FC89B23553039F4
+449C6E2629BE1E78BE116A98E435CEE7CEB3D70D98AB93F766468E307E11FD41
+C26FB0E90F6D00455E229C987A128FB36D50BEE7953192FF409E5D72980BD49D
+32AB7A064CCA9431BB605E68F5EB862218762F7C3094CCD0206C0383108222AB
+EA8129A384294BB9179F412E182ECE777D34269CBF7607555AABAF56159B724B
+67EBF49667E47B7988E5C81422540766D26462046894A61EB9F764746062F06A
+34C3EE2767798433263E6D3653FCD6E4C43E6A5F0BC762E77D4174F95E7173CE
+A03CFF3A204C72773A7F6C301AD3C418A93042A5C479200D13EFC4229BD31602
+9D4ED8CCE127A1A900B5CC3F9B292301DA6CD4AD0D5E1465BCD50C11FF9F4727
+E4BC06013CA5F0FB6B4E26C5636217774935F63584F69D7797E6A871FB51B3A4
+7E3108E160D01C4DA87DF33FF40B452E8A23144649A72A04366B1B3B026C749B
+A897D52C40808BA52ED82FAD0A6DAEBF41F24D5B9C705C7F3AFBF38C923DD3CD
+1DA764DB623D1E0AFFBAB095E9C6FD5788E91CF697FBF57B1525A0164E536F82
+20F532DDE94CC1C2DEA0AC7A41D75C50E875D605DFAE0FFB07009EB4B627662F
+C1A17A5F8AE3DBC794023639D4E4328C55067A8AC921EF54D272E6F6C60EDB41
+AE35943D366D41F12C2BADD1A2BF17429EB871204A309DD6A3375992111D9AC7
+902E0E7A62B85A1BC6FD35E11CC132F37EFA0B96A733FF668EBB8778FBC2B799
+33AEC8E08E1576545B5BF0E1BA5D5766F22E29E51D404C25F3E54B77D6882DA4
+B491536CEF9DFDFE15362DE2FE5221D30D2D6F15158E57CE561C88F277FC975B
+616887F1ACBCA8789AE0B854DFD86FB544192E0382BA380B79076A825EEC0315
+35C892FC89E778A71EAD7B9E578F849E10047154FDA362DC45E5FD1865ED2D5B
+F701D7AC0A35626A34BE036EC912E4C4C2AF61B55E75B1AE8D8FD27767696AE3
+AFB440007C6F73DAA0AA62C89081D7EF6B02751CDEAB00488A591E8F2E79EF94
+53BD8FEE595A98A986BBD053A3CB86DB5B039B0F732438643EAA64E5DAF3B6F1
+9E6B4EB430B9E7D648E729EE569871AD7DCEEDEE1851238DE9E23BD10E75B7D1
+B7E02CE3F22D27D7E262BA786D74EC0123DD208030553C0C5E1D538604F7F438
+858D3234D566EE22C36C2D09009322AD41D99A5D0F4404A8939E217CA32C5092
+0E72E2FF0991FF7B882C70F56C7B40003C599A8AE5D95B74F523248B1E8A0566
+872871D3003EA4885DA511FF01181DEE541F6795BB2D1F9EF7C3DC229F153A9A
+86BAF08D4BEBCC0D2B32833DDB4639226DAE13E120A99C5795083E80643C153B
+12744DB8D138E17B3540E971192EEFF244BDD5E799862023C858B885467E9E0C
+8D2405D1DCB579AC44CCDEC5AE5254A017C6ABC65E4B072DE80E9683A9A9815A
+23A0B829E805F069A98FAD27F3383F45A111AE854D512777FEA721804B019A6E
+E16F12CFDF017093A2CF52A4A92683E3B225EB0C99EE5AE97BDFDCCB18C5A674
+F48DB9AB89038911E912DC1190AE495C6BEC4907D0EBCFC1CA4E153480285B87
+E5C03D8742A43382AD893B58CF1CEAB04AE2424164AEA7B3479205A0B2778AF1
+44663E61F1E8B22F2670D11ECB8C8A901557F382A909B274B20725B1562CAB3B
+C57C8F857E9B99E033A41979E4EF543FBE70074F85072866D837954AEA7D9317
+3744DA0394C9412457E1C2188728371638DA19CFFA2A642CB0D2DB3A0D56F1DB
+CEE646B9407645BAC2A3CC8F14581E7175B1EC76B0BC82EBB69F9A325A6FD630
+BF9FA4967F7A42322E2A568B9B6D9878FD68F2254908EDC36060F474346BF78F
+7AF59EDEAF883489CBCEB0671CE77FA180FF7998FDCA6C4635785D8505A45824
+7EEE6F60384BA5AC06D4A19C0B127E15454A1ECC70245CCB99E271E83E42EDA7
+CAB83D34ADE335F91DABF3F0CE8A5DC8D4C0EF7F250391E51CBFD1C52B92C43F
+CCA1A3B71AB20E995E5304A031060FB78B663E939470E0F0A9602A56E0352280
+AFE8F87758508DE73CBEE78EC452185854B11B280AA5EF1D2D3BA7553CF54FC8
+1B73EAD7E3FA7FCA7E8558FF72DDF68B6F7E50CBDB1B51D3D50866F1AE4AF193
+BCB3D30C14172FB5F9E8A572F83311F1C8DA3C8FC589D01F32B7F96A794812B3
+E581012FC496FCA018C5E9C35C0C2CB6CC2E03F7BCF993B8B58AE58F3EFF9F18
+C49B86B75F8B33144A1D4DB7CD1C5F7B1A2C362D1C7E2686ED7DEBE396116230
+FEA4B66E13A90CE9C61656BEB535691E3F3536EEF300AF2B7431770DBA738220
+CEA26E86305F960C867A56F6C071F41CD6F5A0B768FEF7B5B29E75FCA8F336F5
+FF0135B4A715CE926A7B78D6441053AA2515C96551A08CB94B77920C8DAB9C72
+08C6A760677CFAF137665CCD19366603811CB5CD52D512FBD763BD62931BD5F7
+DB0BE87955C0AF863D4A7B7150F33222E24FAD730E0D29FF7A88F5BBE2272A3B
+69BA5BEB0AD926E9FEE21E8BE08DB110657546284DC9E724BD0C79EC3361C07F
+7EE42824DC1CB72ABF5FB3E3DE9CD4EBC1482DC3FB57D84EAFEB307378EF4B16
+7EB0832E5AD1D1AE04CD5590CD3E0042F528EC79E292A67E38EE3EBDA2335B1A
+1FE95723571C040F7AF835DC7493AA5B49904EF6F1947D26FEE59628A5331DBB
+4EC4A21D07231E85941A435A74F7DF7DE42035FC3146FD7921D02F20767A9797
+881B24164556762476E17D0EF873F17CC4BDE322E3A5241FFECE04EE7170E0B1
+835607C7716AA603FCAD9EA5FD2AB1F718733B58F31233E37A3C22DF2C3F52D3
+4947E041AC29A07EBA98F0261E5C9B5E280B7038568E470DB4D6DDE3ADA5B12A
+69F715BD02F4898F9222A0DD58647A31EB890F2592A4AD7DBBFB7485BDE7066C
+1EBC43C9873052644138AE98A18D4902960F2B709D194003346B0B6F810A8AD4
+21D63E3142B7589916B3B4B56C62C1C0FCE1713379EFB8E760EE7295AFE5E4AC
+2C38425CD1E4056715ED2F9B4E31E0F05AD10E6A52F4CBE25F37377A4E9E08E1
+16131D26CF7432D5F289930BAAED1E3A444E011653ECA7B9076094B5B72571A2
+D29E7BE5B062B0A69F7AF0D20CDB6F156B63DA9CA564F483395A88206EFD6569
+48C59535FB7AA8942518F0E85A8BF56E0E8E30A35F47C948DF5AC6EDF01AF41F
+A14D10ABD45895C907DE950927DBE09F79D53EFFC6F5681D715649BC42E8BDB9
+86894BE664314DEDC69FEDF7EDF2347DFCB070CF591CC8F8F14C04D7E665C0D0
+A413590A72D242D6B619A83DBC75754DA87F980106A17B06F299898BBE8C51DF
+70A6DBED6264DED8D4977BA25AB7DBA3BCE39AF7ADF8744170E7D4AED20EB63A
+EE248A5D3009C47700D73056995596A2DE0C316785F2CD4C12B442A6DECDE45B
+9C0F023599FE9F3FC5658CB23EABE96D597812EEAFFE50F9C82CAD33625AE0D5
+FC43ED0B732954F0058942C1BA515120E7D77A61028770A3CA029DB5FA12B06B
+DBD4ED00AB9D53A705215898CFB295D53B38E5AAE8589BC0CB1A942D86DE0FB3
+DFA195D7075BC0F01B4EE3A069B115D237DF36E372B650903CBB4EBAD1D6379B
+0429886D3ED160743BC13EB1C5F3AEAB78D1C01A27FDEA6F1D977B5F53117326
+2DA2DB70686F72280200176D138796F7730C9B883D56B8CA95A59AF0D7E943E0
+230D25BA4B738DD45E7923E09DA7D53B9E20CECB40247922492A5875D4EE9F33
+01251DC67C2D69895271F9747D0DBAD71C6E1BB31E734AE795042A285AF9574D
+63913566B3EB07994867850236FAF20FA42EAB0535D5FA5EC4CF80BB2B13932E
+7AB189A5B680852DE51A2417A70AC10DA02549E09CC96FDFBC49E39D1874A93C
+2A28AD92F036B9CB36B5563EE2992268B1B02D11E4E51D8F3D6128DE0133BC48
+909E0C6156E527C9D87EF5C577B5E6789D4307F2BDA049B17A489A32DB9BF19A
+A181375F10E7AEB96561662DA0F6748D37B99D116357AF029C6A25D761953BC8
+A91C2E06A070AD94688BF7954EB3D084EB4E3EB03E1DBB91AC3F3A14C8718981
+0EBCAD4DB31BFE5ED25382BAED473B29F07E225AC3B45AE131478E544BABF7AB
+C5C59D01188347A370F0D0E937D8F4562F2450B77D871C775116DC8B041C0AF8
+FC8C9B67C4474A8723ABA7D4CB318D941BA18DC07373EB74822D41D1C859DAC5
+F14A7B1956C000E545D6F617AAD2BB0D545ED9FF3851C123A32AA012EBEED2CA
+D81FF7FFD29174655C42DD6545611BD3B00F47CA4EA2D9D0CE4A01523CDF352D
+6A8A2F201EDCE2E6CC5D6DFA6DCDC12775D5261EB120056D88E080E5F5CC03F9
+F17427E7F8A02FE5C8F3B125EB22DDC9E79640EEFC4B643C915734D7684B873D
+51940066B31876F5A58A3B7224BC067C7476B81210CBE89E0714449CC7ADC971
+42EA708B18C60A9895B6CF391C57E815D05D8FD40A12B6564C812B371CCE1B9E
+B7876C9274B6716C8632F07302483B124CDEFB9E388AED5E330E8DD89BA229DE
+33331F6345FA3505FED271BC6DCD0087CDF347DBFFA4F35666BFA5C1FA6DE923
+97A056410CE3055CA869D9C583D801930E1BBA5BF6E6F2863F59ED54DB785010
+9F2AE393AB3C939BF8AAEF7AAFA0BE486855B4CA5E3430F242636DCA37FD0F38
+0315BD038B071C53193CC56934A5D428BFF9AD882BB5C3C639A3FD9693721E3A
+7E29412AC40F83C609ECCD2C6B52D93C8F5FDA19E1BBFC88CE8D0867D3A611B5
+A4C86E617E6ECB65C4AC34F7C40444E5891308703A88379BD35EBE3FA6A65EC2
+2A20EF94D793591F1F6EBD5B5AB92BEA002E9FC9C665AA1DC0AA52F4E5FE4E84
+F425217C32B82D8EE65A9D74B74EC359A9F117FF6E8D4E0635512FE4F387C6C7
+9B001E708417A717CD007D758CE443C0992A12FD65D06AFFE668E7A8CC2FEECC
+7C06025509E5C8E89D1D889480EEF3ED695FF92E7907860065C632DA306F6F29
+C434C5B6CA2A230F5FA0E33AF207EA5224B8603A554D5B57F1D353AC785FD431
+71A1473AA77E5EDD11FBCA16BAFB0057B12A30E3272164369F36542D813C360E
+9E1A3E8523A1723F786F34AA8ED9C5E0E79BC8489E65CC14D444D43EF65E52B3
+9937BB572F745603D59070B19A99B575DB41E09603F7A1F97BD603656E7B8F93
+B5168E3329AF11BFF6DC7163E2FD545BD213668D9BD3503D61961CB6F0CD1280
+CD3C349AEF61C49DE74EAA38502A51A4D5D0397C0F04979399A24C1332BF9236
+DA1A31D9481C13B1263F48A8D06351E2E860E7E7115B1F4FA8AE0E970EFE5CD4
+96DD7332EF2371FA5A2CEBED96A0BC563018CC42F51CE45E06CE5BA442FD31FE
+9BBF37A952BD37B78F06858BAD0B5B6625D943690E22A1C3F9DCDFFDD1630992
+A684A77DAFA50EA4D581074765779C4B2A41E3694FB0CD14030B885324120837
+1601DE07811737E429CFC59B8F4B859B2630FBBC2F46A2693DA6D1AC17034F2D
+68966A6798BF0B806F6A9A7FE369B501DE71DC9378E2005B5300E7E03693ADE1
+ACFF88AF74F27AB46304727A54EDAFC01D1E80A7E27598DE8D634D80508AD1CB
+0A06BBAB366C11D4FE2A15015FE4E85358EFFB71C9ADF211914A23083F71838A
+85FB2421C14D308CCD77A13E767AE60383F6967C877B299EE7A8C7413ED80D64
+530FC64CE65979D77348049D3A6F38ADB64E811976069F4CA20C8E39210921A5
+703B878F6C147316E8DD47066AF2D551161196B0C9FAE339104EE8E972932592
+CB04F23576AE3A61727E4E516FF3044724346D639EBA08111F1D18A47EC2B48C
+8E71F694412F029C85E990F099CD44D3BA1C5D3F2D8CDE64A3753BDE633EC0DA
+8D84255DBB77A07CBD3DD87A3993A5C3FA8C646F36FA02FF808329922028FE03
+1CA83777099D4FE72DDB0A14509865CBB53B44191937440509F542F3EE5DFB1C
+C124A4D58C22D8C9CAEE5214E05AFC330B1BD639651644F3C5E45B2BCCDC9AB1
+EAA1F69A5DFFAA62BD117724B278907AE755E2F9D30E4FCA48219D7840B2E799
+7EBBFE7CD2D02132EC89DE5340858DE4A670E931969B808E5FC8E1108EB3EF2E
+01C8E758532E78E6AB5E5B1F4C59F974AF1F0AB5F2FE1BE61E70F71920960B09
+1B5668527F343DB865947B284456BBF00A696353047B812834C59A166DBB8BE8
+92CE57146E59E8DD2E1CF1E356614AD29BF34D6474CEECEE1F90D3E776B0DF8F
+CEEC8D6F49714CFB6AE2CD7F77168E8977CDA9191C25CFE7A726CF78BC41A535
+09E66A3A97139535AB94B385E5B614EC835DAD2756F4585FF40483C65086AAAF
+DBC5F9A5AA28174CF307A4223D27E10720EADA0B5620C3C85D211D00017BC843
+B3F5A207A41199DD72831ECE3CE0F674F5F942AFF93D541651CD027D82E16179
+8ED292C0E2E5D4489471F860C0300E428217BA5121CC668486B35EEC259EBB28
+B0CF1AA02B7ACAF293D22B618C537A873247E4911B2ABA5B784728B4167EB1FD
+066712437790A213DA5A370F1896735DF6FEEEE02E2FB0C7D907434932DF650E
+65566124FA36D25812192E6B2349FCAB5AB2F78B5DF4CA8706230B78D6E70F9A
+3CA5D6CAA0CD72D2269D74A4473D239AE7E68E1DAE8217F890A4889396F86299
+1E1A3AB1C1298DF1C22A1BE1E665C6D4079B94EF89E816F4FC07843FCE5199A7
+20CE6B6D064051B9A98304E3C97EEF2F900C010E06EDD686CAD64F853A1E22CC
+CD9E47056A63A4E6CDE247A8903A2309B61EFF86E302858F1D236C5403F6DCA5
+9ACE76A2F51337BAD4A4221FD721387526DE8FE12FA25DC7802A111D96E6D974
+48944AA7A92186241F681392B54CFD91466EC39ADE17F24470C44DEEFAB641EF
+C9F4D45E9DD2911E9E50C150186F4D3395C2684C6045DB59FE947DC169D2149C
+A591690091C7ADDBC50DCB395A16334F68E73F3E222661838B1F74C4FC2DDC25
+7F06CF877B94E1D859FDC8CA40229A43D03EF76649A6AC920F73D8B3928F161E
+168520554BCBBF957883B7112B6DF94E62408E24C89FBEC3ED02561EB664DC8C
+3A72E91B03479C2D3CA8311B7F42F13F6E95D772ADCEA91A6A2C710E2CB3E833
+E94D5E817E2A8E440CC6A3D75C78487391F1FD8B85FE14C22C619C1AB4792BA7
+0B96FA5555FA29A0A847202FE1B32287D172430112C0787034AC9733A09391D6
+B5AD1A920951804361C8E8A4E4364C3E7FA0D108D4BEAA2E5370826A919D6C9E
+AD7A77D61C8ACB19DD62AE544CE5871FEC9E99A90E7DE5463FB6CE253AE40C78
+3523A3CB5EBB7EA51219537716643CB1B24B73EA26F34A49B52DC14F8441E496
+430DDD5EA1A7762AAF938C3DFFEA1934A6D486F9A9057B0B087FC35B7D97DAC1
+E846E39856B07D81DFF0374175FD94ADFFA6907BAD05820C519120FB80D7F5A8
+C08673F2D168394FDE83063EF080B9D1C52E9CE5DB537ACFC3009B39005F3988
+ED1CB1DC24F9278D1FF0F91D2FD9BBB5C746019B00C77C9C90EB833D42610736
+07AA36C7737ACB0DEB210D9C6DC10CE47005E9519C69D6264CA1160818CF0FE6
+63E9CB5FBC59542DDFA431D192C2C6ABF694013024190FC8422235CE88C200DD
+18020DBC11C9E41B12A45D23EB8B56FA7A4BC772B14257D8CFF8806DB05D3F7A
+AD6C71709841942300BB018CE63B35400F979AE4F37A787C10B8BF36A41B8FC2
+1E2940FAA7EFE3BA8BF96F5B9650795132B00D9C8DBB52BF0D182A853350467E
+EB02FC268F4DFD4FCDAA1BB02C9722E88AAEA3536C837E34B53BE9C2837BF188
+CA19639F2974A3AE40A8421DD5BA1DD903DF9B63E716FAD3E9E03DC6234C3988
+5AC8782612EB6F008DC80D0C758AA75D4A3909765831B2068A170AED234BBBCE
+DAA91AA0ECA9AD4C14330A168762D119A3C2AB0D552EBA73196333042B2A2F95
+0DC37909D3E3C38FE9E2BDB8B2CB77A6DEE2D146D777628B35894A538D561983
+55E8F2E37E00E1A182090595C7514EEB78E9D8AD37859077F102AC1496BFA3EA
+E1790FEC4B708738C8AD9C3542482D75E5960B92444D69AC6EC2CCCA945D23C5
+25CDFC2DDC08D599746B686A1485F474D151C326CF5C0C62FFFA4ABBF5353E09
+FAC520B165577FCF2AE0B7E623ECD3B44A0E7DBA7B0BA5B4172C502727283D3E
+0F4B4EAC070DA76E72B911AE6567411B7D59EF3622B213FD28AFE3645B061065
+ED44E30EC1D81A1BD801EFAB50C2AB27443AE9D256D4CDDC907E852BD0B5C8CF
+DF95B90D45EA2262EBD8BC29FAD72D6B1DB7669B2F33A6368FA260A407686AEE
+5C622E7BD7E620BD735A5AD6CDFC71EC5CEF80324CF59D53B945F9CE2EA42806
+E4EAEF0D882FF37FAD4D28E4A68D221A735061A5A25AAD9B73B4EAC3455983B5
+B717059B778E47E00698EFCDEEEDA99C754F6C61D56E617DD78352FC39F927F0
+0BAE0683DFFCF55AEA0E7CBEDF278706D147B6BB099950E1D6410A1F70CD056A
+C79CF45A2F03B522D95CD9056E31A51B4C71A10591BC5AB0CE178C529CD741BC
+0F4C7854BDF9E1930D2D597B444CAF59838AC30533FFC1D39B74D99E82E2DA11
+BF169929A097A4883B7CAB01C37D073E230301F4D58396D428F541354FE82CE0
+B360D5DDD4EAE075395DE968192606584ACB94493670C5DDA0DB8D8500A27786
+FDD7D908CAF14F86971771C604EDEB9337DA9A7C08135CC60D7D5CBA7DC822D8
+81011117F3B156360691A4353C84AEDE652572DEE12790CBD357FDCCB36DBD5E
+0052471DA8B89500EE6BD0BB9994FCF9F949E8FC9B92660B8FB66FA182447EB7
+7728AE2A9BF139C9AE75C9327257026A9CBF8AF1F80D0D6E4BE273148B2111DB
+5E76643CCE284E79FBE70347AD0D5D8F81E6944BD01AA02C3ABF66C27BD39E78
+5B8A035A17D7A8DCD0D241FB65DDA12357357DC0320C0A1ADBA0E17112A87682
+24A37F48F45D0870441DEF18F885FB7DE5726D545D91ED71DC5744D9B81B4EB5
+6CA17C065FFA80815D513A50C5E6762641EB969C1EFEBFF6F022D95F35AC3A5B
+9DE915A45BE37832AF5BCB8FE8ECED6566802185492E24C348D88D7B2AE14D33
+BF71D8E692B0857D1E744E75ED367B1E792F258F7D29F69A2277EF81CEF1C8D3
+D84C989219743476CBD75F8654CB76B137B8249B3A86513AB2374FD12027520E
+EF2707F9DB82CC78E312E4C5E1B52D50E6B21C37F796B40E9CF27E98080D3FD0
+F73FCB06B74A82D5C4CCFD484E8BAD2AFBE25A5B8F1CBF25412B160AFFD6E425
+86339EED833E1485508E6ECB2471393636E58ACCF1DA80B0950A3AC134B324CF
+F7D80AEF4ADBAB4E02DFFFF5D4EA2F87F667142A6FB5EA8414ECA68B302DF431
+AAB49CA5D8120C95F6C4E82BBB70DAEDC7DE821AD4B5DF4796E23316E5D20606
+DC9567DBE6F5A06182C3B9848DFF54E02EE26B6385A6F7CB9C5EE0DD0CCDE6FC
+E6F98D726F64F190DE1C523B1D4472378FFFC6F7281495DE8C36300F2B696308
+B6A69407FF6247830D3E1A6AFEA8C8DFFD63A737CFDE9B9E1780B93EC4244420
+9DE722676A7F64EED5F13BBFB0980BECEF18E55D12A34B13A4FAF0A10F74B88C
+59A45F668BA03B900D9F2D1D8220E647132604DBE8B06E0EAD7670A7D7485DF6
+30E8C003AAFCCF7DA4C3672EB8B76E56A9F7F0F5EB631008234A046205C7AE83
+36BEC5CE37BB25861DDBBC4539C38E2D99E6B17A0497C919D5F3309C30E43281
+C714450D9F883CACF058F8DA7B93192F76FEB29EF1BF10E262EEDBC797D85936
+96CD3B3922F727DA98F359DCC2347FA95A7905B5DEF2F0B3ADC90301405974D9
+792BAEBA9EA0070FBA6C842D40497DF039F975F6D85D705D3F8DE8386C8DF996
+39EDA645F3D1F7DA2B87EAB5450F40BDE12B26D8D4A3433668E430988C1F7D34
+0748FB4D4F886762140314F3F2D1D16CC6439A033F8068F048179605C5FE9023
+9BCC22B5D7B4E8E9A1F66A5A9D3A888257394C353C835BADDD00B2BCD94D46B8
+DC3619E4CDD01FE753166022055ACD7ABBA49BE217260A47843D3E7666A90ADB
+E3ACA94CF7AB1D73D6230446F4848E5111E03A5C7DCB1CEE340ED84F40660D75
+6FE5D691F5327A3314DE7622BCF2DBB738ED7C7B3BAB9A975CB2E739161DF51A
+51B1902F65E6E68D77F2ED65FA45B7338AACBC2D6536BCC67B965C8A2F32B576
+EA583CEBAB347A5BD4CCE61EE80200D886FBE41913390091C747D12372DF4A03
+A2B68A79007FB7A8A87CA0E7247F0B36717C95944C34932B0B5E758ACFCAA071
+4DE4E88E5B97EE25E3503045B366EDB477D362C34978CC1C66D4720DDBED2983
+A2F6B75572F935D08E16FCFCE23A32B9C4E8BD895759B96F64D4B1509E0F50B7
+1F2190A352478EE247BB65E5DC605436F58E7369C2A5ECA8744FA45B251FADED
+388F1974505305A520E2B39B9B390DF9170097D17F36BC0A52C59D25BB5D0AD8
+52A9430750B489AD524F7D3AD811617E37F3628FC6BF331B6A8A3C1A874094ED
+5C5085554A5B16D60679E9825FE8BD11C4E5552D5AC595745396E0AB8FF21EF9
+6BDF132EFF5804B02FBF46225B2DC521FAB66293B1BCBFEAEC26DE6BC7BB58F8
+746A67BEB786E5BE2642B24D93A46C31EFA288D7D0F3D54FE578F0339123323C
+75F1EFFB112F0A4D711CA88946E0CC691EDFC3BEC310AF1354817736D6F2D5AE
+D361466EBD8F52F0D4935608FB2F520A49F771A3A19BBE9AADADC4ABB9006844
+7503D94FCEC7DCBA66D258A76E8BADD54DED70AC66F0EBC6F052937A94C13A35
+734578911A9B39487E51B0F5BA48DC09591FD5A1D45ACC368D91C3CD3B4A9BDC
+98FF62111F1EA93313568A1162523379CF2BA6A240AC489B3A8963E42D08A8FE
+EC22C16D4CACA1B43606A76A9BD512A9DB20A40C3CBC9C35C2784E4BD072C04A
+74B267B18ECCA5F59DF84B74A361F5406C582BF99B99F69AC1A4F57839E37DE3
+B8AD9D537AE12C66BBFEEF8E7580273201FD665EDC1B594055B8D312C303AACB
+E07365CC0C78B98A9A62032438D806340D1BCF852924854C4E50CE53BCF8562E
+F632AC26B18AEF9346E29B019A19A2ABFACDD303AB7630CD91CF68E229F5EC79
+508ECCE0E44B8282523ADA80350D28B3646B62005184736B434FF29472B67D27
+27BF7DF359BF0B7A8CE5BD7B6F49126E8C5B429E57910ABD55CAD54BE35A0F15
+6E50601498CB9F0AF7C88BDF21E6D600638ECDF5F17AA25E25F4ABF98D91E1F2
+2AE15BFC7D8A57924F019506D82083D87A24291B1DD99CCA652ADBA3F08F69C7
+5DE09432CDC283A3F139FD16B3CA7B15106795D5309D918C2D3302548CECD9D1
+2CA6690DB242949D647D835D86C94709BE43333D81F800527DF0EE89CF11EA53
+C5FB7B0E2A5C97477DE8AD164228AD96A646FD9BAA1D497EF07760BCB2CC2C23
+2502F8BE7F8AB201AA730FDF14038E60F137A5BEB60D9A43EF3DE2D9417A4DFD
+136EC1709DB3871BA2287FAF13674BCACF09CBD5CC9050A06989740A1F9E76DD
+12D8CE4739CA3E15C41EA616D69B1FE079B4A26C45279A105FB53E75E0C49D8F
+B84EF948AFA24A920699BB185FBAA8A85282F97710E82AE77AC3F32174B754AE
+306DEC0094D9E4A48C9F91C2D6662E68B29C56C9367E7980B1359D3DF33A2D1C
+DFE766DB2FF85CDE7E591B991D135BDCFD8CB5EADB07E3519C921C6614D5DFCB
+1990A6943CBDD41ACBBD5BBC0B897DB3E0A89DBF059FCD9AA77B2E418A118721
+AADE7767FED3BE2929C192165DEAE40640040910AD1E205A86CA27D586C4A9E5
+001E56960B9D4905F60E8A7298D615FE09DE4218CB463A89908B6DDFB6BE54D3
+745F090F39333A06017CA640FF1CA7F09B563EA8FF89627E679294CD5C727D25
+86A4AB9AB2ABC2F6AE5D0C65EF16CB93C42866DBF5CA86332526483E49651277
+11A5D0F1E6A64BC17A6E76C8767A125FDE537D12FF13B8D274E35A3CBC2A89E3
+9E8C55C2AD70B607A624B0A67E0BB449C56559D23BEFF4C2BD99F67FEF973C1F
+90F938CD1981C7DF56AFAB82C7CEA98AC7216E2B4F80A26D68C491116A6BEEE4
+ECC054F7DA563F07C4A18EFCBD45A5FBD566EF722F5E71D5C95E0FA2A33ABDA0
+07EA5CCD03D569DD830BFBEB88C7D5DFB6B301555B2A14F15E565CCB4F12B60D
+E6860C297F90F9B8A0D39942888CA8A3B8200D5368DEE25B0C0432377598866A
+88201A65C0716A3DA92B2C3D05F20A0143C841E54279AC22DEAA33A6C75ACFBC
+E0C803F82F6E79D871FEF0F56D7B018172FD281CAF06D1FA247201FB1CE5081D
+3CCAC6629676C1FF1B0E64912311CF8196860048DF27FA097CEFA4C257C426CE
+9C61967EA4AD40E78793F4992E30D865257AFBE6E3411547CE3117868C7A0D96
+887582614E2D8A2543F9408B69BFFA44494A9D469722486FA1A8E84881443843
+4CE118ABB689CFFDB6233835669C2640A60C376866A9CC1A4846817CB26A2862
+CA8F4F5DC66174C7C62F853F8704BAF1B8BA8934451B73C9D23F7857F53A845C
+E937BFC1DC27451FFFE0C75008FCB9A372D1E4EBD771878BCD05D9B3C598854E
+33D19ADB2A50CFE4D82723DD4F94BC6880EE00BA9541069BD5E6A658F0BAB38D
+769C47CDD3FD7D664A35F9C0758DC060415B5514A31C6BC5E0038E2B4D5B6B9B
+C246FD9A961E7AEB4DE3C4DF0CC1F3D4CB0852EE3AE72CAF18AF005AD96224B6
+7D9462A0C747679B00D81AC906B64C5B8D3A500A8A1577553E25E1A7D91AEEF9
+FF84203A025933E56A0ECE5735436323D6FDED9B4FA26274D650AC3DBE4B0AF0
+4ED960E495203FD67C300619125257836C9DB76F650AE523401EED4E5824898F
+A1B77C521C1A070A5D20BB324C90207B01A0B86A6F42DA7ABB1B2BB2F8F99782
+4331894668170332E3894E80A5C43DE08AB3AC4074B1DCAA5B43BB354C54B749
+82D17D9B53CC5B4018CE4467D250B4F98036B0CABC0B149FC7B2172D60FA5188
+512E7801FF83AFD47B0E87ECBB64281E3ECA9728A30A3B98681FFDFC8FB161B7
+D57F511AC4BF30C2D548B9D38371EF4E3845C5726C8A33B20F2013833BB68268
+A326BD1C199E3FE776EAABE066CCB4C80BED3B558BEF58B6EDE92A692A8F90A8
+45D322A2CDE3EA8DAFB316B510CB1835AF292C30F58861B61CC3816DD5953673
+2AC0CEA62E52CAF6F60FEF21B726A41CB42CB7202E3C605DD481BB7072079903
+8F5A0DCF8142A83B2D746ED1E11521356E57C07402843B6F34D5EB212143B5EE
+7D49A9CD2ADAEBF0F3203AED4FFC99B05A05D74F8BC7E9A7E0F3CC73CA87CB1D
+F734DD7E6DE90680D3DC54739DA1783ECF3DED371BCDE79B86BE61FD0C25C656
+89BC9B059AF6359719A55F1E095558673B2B6BACA8087C729F7CCFB5570631BD
+B87A8BCD4B6E1BBE918A44CE8FA4694670DBD43D2D87A8F04722310F2893256F
+6C9F2BC39723FC1504FE00753D76554776E370385DD79F72322A8FA32F1052FC
+A6D8AC2807EB52000FA90FE1275C8876ACFB3EE0D81589920F00E00588EDAA3D
+A6F2C43E8400C13690D6120286A3689F217C6312F8ABCECA44B8E11DF75AD509
+0420FB5AF0E18F7BFC7A69C20C9E3FEFA7D951AD9724F425F38502EC29D32E28
+9407B9E3601773287512DF1D279F0B18B856367996317FE0BF47A30DC0AA3A72
+F1596681512189F0D954A454A16C89F0F109CD95E845CD1C06BB122E8D58D71A
+EF61CF589BEDAD6ACF19B30ED3431E93F73C9391D3A31CF94DEB212B4ACF956F
+B2A859BC2F96A5B52C6F5DDB104FFD2EE135484C53E4CBF8F4C9208B53E64C88
+68CBD15D46897DF78E2A0915CB550EA70103C6738124A0639FE3498C95A8A1C1
+3BA81BA5D5DDE68DAC731A5F84044D94B22462F47DFD7BB38B6AAF0DBA52DAAC
+086434027B5058AF07D1307D6350524029E226525E8FED9835D9D60F301F1D61
+8E458D0E2C7F243508B6ADA892224766897B70B55EB9E6AD6BB39B1B639E6B8B
+66B73B761C81CAFEA2EA01E1C3C64BAC284DF366B24415DCA1498377599D9248
+A5335694C94E134BBA10FA0B4B53D2ED32664C8951308966F5BEB37E110E2D99
+EB8752F75839EF2B602BCCBBC7BA8460332BE43327EC7DCC8F0F57CDFE262AFA
+EBB720D79DFD9319BB889BB0DE1E2E0D064641764390258215CDF0606855934B
+7C8C0BC1AF945AE45B40B970FF4713086769EB30BF30F272585F6EFE48525474
+0C236B1F4710977AFEC9346C8A920D4A8832015D401CC2A44584643DEC473950
+811A3B476B3D42EF845657E45D390B873D3ED65C8D9C3F6B0C189BCEB6B46A11
+E103B9B0A0DF61A899BA5CB68CEFA1297F156CD242BE975326849D2C21DE504E
+D4FD3CFFF53A29F671A5B3ECECCD598010C52CCD451620AB99A917C3DA3EE592
+98D726DC6BF96E9D73EEB778961242DFF2442D8791E09E80853A7F16FCD9FDF7
+DDC4186E54C200403DA07294767C219D161ED55B8752793C8FE1810496C3B855
+CD797C653DAB010CA1909584D6F42460ABEB8E04B8A472D177995DED8ECBD456
+99C7A2D42C6A64F8CC8B14FA0B06C98E1573AE19A086556CA062268AD02A3C2B
+BFFF7947BF44979A39149E124C564CBF1E782E55B219D13E87B790D90F0AA463
+E2107C5A76CCEEF736A73ECD38C30BCF527AA53CE75B6B9DFD35288143610D4C
+4954585EC5AA5F9DA22A5A9F0AF66BB8296283053685AF292FB8C891F0386ABD
+2DE33BB1F86D984DE21DB7129D28B06DD6752877F78F04423447A8D65255FAEA
+8A6AADA92D06BA150D7F4031639F3DFE149916186BC2FB0B6B616AAFEB7455F8
+78BD9E857EBC914457F1C2927BFED78CBB77401B776C698AE100116920383BBB
+598E41582E679E99DEF5E5E50EC75F20089C70209AE12D9A7A1F01DD7B815CEA
+11766F2B5B82D13AD78BE0CBD7AC82DAB46575CD90CE59B2FF705F328AAD4BFB
+B60839735DA8648F312AAE70AFC24CA58339630E430E417D4469C39328FCA6A1
+9BB91791521E7D43ECC2FD92399E250443C9C0D14AB1DBCE22076F81C286D61B
+136A956E57AA9BD12B548474134736DC80138C678A437BDF746F9140D39203B0
+C79F51F3E31F679CD80B1D98159874260DE5A298FF11B5ACC461A567E1F7EC81
+F4232A80CCBBA20F071F0BBD6749CBE8DB8724D14D4DA2DF0676E182B0C165D5
+397252C6DF93F7C2C52FBC3DCC24910929A0272672F1A94C03172994E4FAFB47
+76FDDF661F13DBC3E0D3882B5D576BE48F2C16F5CC10EBEA40CF90BDF4DF4997
+E79D92C92B4D570AA930F0C841144E440AF24893979008E0A8D2DB3FD81AAB59
+426A49E8FD770654C520289B2D48C14B35A069445324E37F66AE20BB0EB1C27D
+4C23AA633834A3193129BD9C9FFD8F8C152D9819F852A0522DAAA38BCF1687DB
+E22E3EF59EB2D3831261A88106E41C86490C32785858538FB9FFDBCBBE186DFF
+3964C03DF7FEB945B1049EEDC856C5F4D51A8C57ABE0F980FFA7E9BDAD21E476
+67976A0DC9AB4D84EDA8E9926FFBB302CAF28CC3FE6C58680C26ADDC361FA10E
+42FE75145AB186214E03558CFF881EFF28DFE535D612243C8ECD8C3C2DE54C1D
+14DBE7DF5200AB36C47064E7BFB0C554A5F6A03B6406C13FE6D724AABC071504
+F0C55CDC2F963DAAA255BA3F91208DCD272D395273D98D7A0083301D0186A37A
+F2D0385CC5B0698C21A197E57145B1D32AA873D851664DBB3B672A84A1EDF6CA
+C3EF5EB58023FE876BD25AB9B8AB1D4DC1966CFED8EB3CDE280D81FFF60836F8
+68D3D51813E9BDEB6F54FD448F6C6123615E12514DFD986532530DD65E84986A
+5BC1C1E3B0E760D88730E708270924E98890115E3927EFF1D8DC891314EA205C
+DB1F328C8000CF7BF21AE594840F6CD56B6CE4DDE05D2FEA79A1C037BE44BA87
+D9B4EEAC6D044464A719D6674B0249E512F4C3BA6E6CD5AA138BC1C1B0C2614E
+5CA4E7CE5773FDEF44A0248A47031B2F8D06EAB92BCB2157D4D15C93139A800E
+6BC273669BCAA825AC886E8F0B308F3E5E7B6F528D99A1B6858BAE807B162ADC
+C02397B3E017260C723ABB24582A414CB1793BB5F4ADD3762366F880936D2906
+5D8D0A3C2EC31C3B23FD7C5A92246E0FB2DB50236084CE103F56B00511CFF8C6
+5C695FB66A1003DEDC5BC43ED31DEF5D2320DF77D2B712C5DC53F32978E14177
+0E95FFD8FD13E8BBBBF030CDA5E4F05BCC50F4A7AFBF5510398A373FC34032F8
+5CD80440C7138DCB9A85A656F0474D070AF48198CE2382E92C855ACC69EABAD5
+CAF94D8A4D76EFB4E49953B8EEFADB557237F495B0DFA5C3F7BADA594348A88B
+973E5CFCA5783B20CD3DD05310B24F9539E4C30689F636DDE164861E8702FE25
+2DBED89160E815A617A4E7B1928FD84851B40EC28C8DCF9BD9D95C5DAA4DE46C
+EB78E0902B36B389DCD3DDB8C8410D684D003A989A15906A38F2E11F4CF42324
+DF9A1341ED9970A25C4ACBD73F8E68AEC9266C539A920EDD17245EDA202F68DD
+42CD0F2E1CF99E2537E4432546DB208EFC3CE2805BD937220A62E692D0B8293F
+7831E4E5C580504840B4B5C01B2E73C6BECBA5BF37CC2657A2CBD51A828A1D82
+12E7CEE63847B2A80DDDEB8376EE7E364FE47FE1B6DBF0C2B052D7978FD529D5
+FC880C219D892B1ECC5617D30051860C482B2D6EA24DD5B8959372DFA8D2AEB5
+C06860466A2D22891EC71BB7640449CBA679E67E6C71F44A68AE7739744AA4F6
+D4FB1F74C20B301CC545737F131E0DA3183F976ABF85B68BC4AA63FDC006DD65
+44A1C122539EE0A1C07F29EADB687C7AEBCC92FE2E245C330C10A9B2FBA8C9C1
+0DABBEBEDAC3B91FD3F6D51D653189152897963E8FF5EDBAA5D92381EAC86ED1
+C896B4379433DF5212C843754A3AD3F217863353C76153D102359D803776096F
+BA9D4D6DAF5E3F2CD47762468AABE5AAE4387C54C2C142E5A63ECB22AF0914CC
+32FAD5435E23F7395871AD8CD2C02873E7EC7900CFCD021446487A9E6820BD63
+EE0EA22F8C82A90D59246E110F696F2FD6314F65E209028CE4B211B7B58A22C7
+C6B82C5D0E0325A92123947FD8305924E2BBFA530C6E2C335268D2442D3EE9A0
+5453B3D87E5BA383071CFC4CFA7131D24004ADBEAA6A80040EE12619B7010973
+627EAA9C69322997E06B8F3E10105B9FB004089344F9604D50E9CB75FF6C1B9E
+208347262D01ACFE1A26E6B6A1724FC811A0B602F9C5221BD2359AC1A27D641D
+B1824E3EF3C6ED001DEC8328AD41FDF8F8643D5AF1EBA51CDABADC151A16839A
+9852BB2A8FEFB5FD0F236A17293DF1391530A9BFDAC288B4BBABA3E8DEBF68EB
+61B820678A2C5A844B41DDFC96773AB21207C7403182BDE878BFBDB02AF22416
+7FAD6A039256F0321CC568049E80522250E3BFE9D841E18796C108EFC61049E9
+91890A11488944BC18D63D911B205B8DE16D062052A7C97108CDF5BBA0BDE087
+E0B31781C257679FC8A18C945761528FBC7D8E61ECB9417D0AC43857C0B3055D
+F1C3DEFEAB3D9ED3B357926BFCAFD7796994E28799E0CAAC3464A6F8A2203D9D
+F006C837C8929EBB2483D13AAA62008D790B81D0CC90CA55DCF1DF78E855849D
+170D5F0E11B5ADBD7682CE233E26F95CCCE957E16C55EC3397DEF52AD7301BF7
+B8E6117415E7EBA61B9D64ADB3091AFAD3F969E8D28630538AAB1240EFB4EB66
+84766B4DF14C48DF117072E62AABA7FDD41169E098249DA39E884724F89C427D
+F60D85125F31DADA544BE2426690690B8EC4E3F97DA0F2EDC2E1E76F6D28BF17
+A3E1DF62C0AB685A0F22143A5F1BBC26EAC1426CFD4D9DF7F0FFE872E0C9A06A
+2816EF89B5D6CFD470F7D6E0897A27CF607EB99099F8883D9E63D7354E8987A1
+B1F995D0C38EB5CD06D62B26E1B4C14C59DB4C3BB22A796C161CCBEEC0BC74B3
+01F218784FAC50F1D8D735F623D8E568F17362F26AC3511DA3177D5E5C18713B
+FF1170C0FE3E1D71BF5CB13E09582A51112F5E73C30BFD6D7D40CA7973C4E98E
+3B503F6B9B74F48AFD91BE0018F855B449F93BD9D28CF4640191D4F8A2150345
+77C29EB8D6660DED45A25FD769AC5DCEAF43A62DE7FC6144F1AF107997F2BEE9
+0ECFD51B4EA120BD74D0514CF9F704FF7699574144B06A3C9F2485472A79DF7F
+9FA68A82D377F7870F2ECE5E0DFD5D0A182F8C5D9BB8280AF6DD3A66DF28988F
+C4E7BE36C95DBA103ECE133E869954D87FB2D955B3BCAB1F3D25DF55B1DE1D32
+145D39D8F1AC1B5EFC1F77E4779699E8C8B93A78B78BBB181A279631E163FF0B
+EFF6F7B04D4CF8873708AFAB622B2B3613DB434698DA87B8132E1F3E46ACA7E0
+B4C03EC12A51D0E8EDB1FB1F3633042E15E61ED677D4B46C287CFDBB572C8FB0
+64974618F5AB0945CFFFBE67C5EDE351258C528C9633F2C9743C3386ADD552C3
+DEAB08DB72C254EDAEA678C405DA089849720B68AD9FEF4DDB7AED3D21CEAC9D
+73553FE788D35A46F322838050C9846F4145C4A2B89072C4B00514779BEB8FAD
+CFBBBBC2448F0E9EC25FA43AD956274CB6CCD5A4FF228A61478DD68F50BEC3C1
+B580F32BFA52159F33B554510F29386289EBD7CCB63169C859CEA82A88A3472A
+C87FC773C20AA63DCC7C64BD6048A1343439A9B230C05ED126866A54C84FECE3
+87332796F8DA7A91ABDCE5F9FDED03B1E8DC5C61BC139F33D430F0990EC5D092
+B49D10AFE3F993569784F2EEDDAD5FA6E10762D901FBFDCB1997C40EAA885CB0
+52F4CD610296E8C297CE215C7CF23B873E67F6A12B495C415CFC27A0013ACC3C
+FCB54D840677F056886F7A0AA5DCAA07DCDCDE4252B9977D3CB3DAB09FEEFF5D
+B03FBCA4DD809B161685384599625301CC35166785BA66B1A18A4A9564139D16
+D33BC7C0731F6E0DAA9BE2EE103BB8C39E958C3F89E26C2644128BFE9A3CDD18
+1115429D6317BF9A35E980044E9A2D59DCC544D0B25E4FCA28046B71593423B3
+F9E27BF3239404626C495EDAD4053EDD0A601BA04837549232AF2C54B02D3C95
+2CF348F4FE12AAEE0DC4D545C935C8E0A8294B4CE56E026C5CF2B36EA1F2F904
+AD8D130D6105BEA237207209A1795F3D3A03FF1B16A7C3163B99F40F079D3970
+86E64A758BB2A068FBA3915E75FAD7D7455EE272C6D48DC07138172457213537
+3BCC124302C549A43F501A5E4230F8B0AA54E7FC3A644FCB42E12DA142862EF5
+1315E92F31A29E92B3FC3ED944EDE66685B1782238104FE41A7A039D9793B810
+639256B4E1229C87094C0CA19A16A5C5B6C648E57A4CADB955E162B82889DC72
+FB8B11A00C6885B23C0ADBE5C8FCE24DEF5AD7814BE49D547EC42E312D795D0A
+49C06F90CE9F29AFAA258E9BBA47FC2317F45CB73F246A277C0F6F85CD926CEA
+8B119C613F7427969A4D7241AA375205EFA30482C5ADF407AD692D5993200D6A
+A8A7DABF6F9AC7482F70557CDC7E09C3CAC4EB3FEE98605212D9474193CC151F
+43F630ABC8335B4C91E8E64283EDE6A46F92D66F1F25312B41B1254EB6A44BCA
+5EA1F881A8CE2756358AC4084C6311A41827D70F224272C5F0B78C8172E05E1B
+128DE2205D27D2EDA3CC930783879123520ED5F52D3174477B64ADF595C398EC
+6EE39AF98E5EC04CAB0BCC122E5DAB540EB9EA7387F6B3BB208A3281E657A2C0
+F4A215B2B1F5C5F08048A0A357F0B3F4ADE8D0DC91915B78BD6B1666A05C4985
+B3D45367A6B7BCC24D0093AF53D9FE8C91D7CC542C7AAA883A26757FF373EF88
+A79174BFF975687F693BD51DBA40E73FCEB8A18FEBD10E8200A29F475ED47F44
+ABC9F2A6F66D768508FD3FE078AB46ABD69B79A6ADC471AB866D326C4A20D9BE
+8A15DE54C80945554AED93AA561465178B6F38D94769D5447D1C267519059101
+F9501BD996B8DDEE625A74673D13A647148A9F11CE99E7C6BDE7D1D507017648
+8173E81909387A04A133CE42C4643F9E5D69BE24E48116B3590E6ADFCF02A21B
+88ADFB0F070F666E38F260F7A0F9A99D22433F8F0B436BC169868685E7A144F8
+DD4C3FC1D1A554BE8356A18ADD5626450A29E80101A8164D0A5A106B7313FBB5
+BAAFCE2240A66E18BF06EFC32A055120F7DB77B269C285C27384EB0187A135E5
+8F7E926D9C48A9DD8C2747A5B367CFA686FC1294C0DF48037492C1AC42241469
+CDC137863CFDF8CAF8B9C8FB9A25F4CA4D517AE0707F94E8184386E0138C9098
+CEB7FB05EBA48A2F10D38F62B950EE4DBB2973D23D8F2C36FD315ABA5DDFD03F
+BE64C12D18F9EFE17A0FC0CC57599826D09A45D3F5839CEE0FC0BF726CDD0195
+924583C8C4E5BC06FBE89DB34EC1E2A21D09A8D40EE8FD72F352161A25F7DDBC
+F4055FBE67201414BC725815A68740C1D73CAF7EDE42D5863AF0EC9F2F29A2D8
+26822706CA8119EC6D0D9468BB812F48F61E0B528F48730F65D755A78330BFCA
+B38406E441453361EA517BBF57051C499BFE502049F5B869CBD63A45B26DED44
+F4148C9F523681B5316B33F261D9F854D58F301B04F46631629903B5C6CA7C1F
+32165F3BF96494B89614E773E21FF582D2AC54DCC559604378E9C6E87655B3A1
+66D2DF34D531F89942BE2002903071947F9600DDB63772D73C3625C969E86859
+3BB872F0FF0F3102A043302117900DC43A5B295EBFF6E0F098694CEEAAEA8F0E
+336A33F31E7FC4836DFF317A8E5C5185B931B49F55288790B903C5F709AAD9EE
+7CA77BA4B905F1094126C8C2DB2BEF9D47D9764BA02291B61D6F1111571C48A1
+18D7A3F4C4AD999643E77DCF067D59442553B1933FA1C7ED31486BBA13E38BB1
+A5DB843011ADE62477C8D700039407E4BA7140FA57F0CBF1F592B0FE9B77EF26
+1993A02BC2A06C9E19BD0AB9BC6785DF07AA10C9D23F1F39CAACBAE7A06A9D2A
+CDAB181BD867EE80FAF7DF151B46469D39E3B146C90D0EA389635FAB3CEB30C0
+40CB74D4C6F4BA399FB084D3648AF356B956F9CAB3C3F122530AE112CC872B7A
+7010A34B1A2ECCF920144672F8315633CC6B50B3D3288A922C8E8C1482FC969E
+59060D86217EB3919DD8BDB95241A7B089DC1456965AA6807141F2448C50F8C4
+88BD54017534F9236C4EC812E2F48F13943C8B81273285BCE02FF68033B70CA7
+0F38511329DB041A8D38CB609B93A39CF98470975E9AC50C5910A936722EA880
+E840E82DBFC809DD5EDE3D9D896FF879AA47E89403E5E9078BA9FE3B3A2FC4E2
+C2FE85313B5D53A05DBAE54CFB25BDCE29B4F5D6168549750C2457EEB109CFAA
+A14D71A996B2CC1414A8F89DE240EFB5C3B13F216396ED83F09388DEDFBF2CBE
+604C08D8ADEC0E3116E33443CF68AFFA4513B1EB0A19D7EBE845D1A0516A9EA9
+03B7CC5D17CBF0E1965CF2A879146049318579081323FA8A13755D51C939FE1E
+7774653F6610F5A542E30966220E69A4650B00BC6BBF8A09C13EA3CAFEFCE3D4
+B2C4E1CBBADEAA6DE7BDCEE8795FD31E1297113230F8670CB316B5F39F067043
+E261567E08179748C47D32869A686B20F4BC5B78FDC9BA35D1D4F35987F357D6
+3BD1325EB529B80F88EDD4E0EAAA54F11ADD2CA20640A77D96F627179B39EBA2
+8C3A895D4806568A36CE0B589B2C29A962A8F6B6AAE4FAC50E424B2EEF4E7B47
+ECE15B865381E87FFBF29AD1D3BAB2F6EED94B874ED3A975A0A5FB54E2729CBC
+FC079469C3BB4AB361A7257653289BB9E353BFEFF7F8982162CB641F1571D0C8
+9530B1D6252C5FB1DDD8C29EF848D105126703AF7CE5DF4B87488F382426F583
+34021005B87B8938DA00725BB75F548F15E382CA1A57F8A27A81B5A97EE26244
+E739D10A43BB170D5C64BEA9580C3017CA5F53E8C30F129E0A63A5E9C391AF5D
+A1C4B5EA0EB4722F6C9D187CCD4BC71A063D85305B14CDDE969D9835906B0486
+5D47D6857E82A3FDF068B81C0A747AA0F3D5C4BC089373FB9E9C54802AA63B82
+DD8C82CF7B941BF0714E80EF038C1B25E0E5D47AB1BF04755F4C29B712D8B668
+0554E90DFDF8D489833CE9317C0EA6F23ED270C8128FC8C95CB187B283A730E6
+32D0A11357ED48C36D5B681777CCA3D56A827C5AD83F35469869A4F774B9F2FA
+4C437C95DF2DC13C8F3B69DB53F4DC0A1980762A9B736C4F1E435D92B92E7840
+B382109C02A5DF71DE910533E4925CA4FAC2B146E67817CEE6618F2C3BC9B828
+74DAAE72B6BAA987EC03CE66EDF04462B72104FC3941351EDA8C1D7E5273C8FC
+C3E4F2EEB29C2C8FFFE88579C1EC41543A55C6E9D5128FAF3414195A8C7A9352
+0667E7ABA457A75D720A090069B396D062200E5A2311535AA241CD8647D0242A
+0EA4B1F527C48F40D79FFCEA636D77DD07ABA26FD3F878DE004B03A2F95FF25A
+1BCDC1D87FA05B201A4874325D3FAA4DC787D8C595E3E8D11FDF381B92FF830C
+0AA70E4E4F65C7587BC5D6ED535A8E130B46D339CDDA5458BCBEA5D2243E4C18
+0DB006C0DEE0468A24D1DAC167A4D8174C296BCFB00439400D0939C7EFAC5BC5
+F62346A2DAE415684F1FABADCEB476B46D821F5E4A28A1F6F51B67320374379C
+5B73458575162583150D0B8BF816CB57E08682A3219B0446AA940D0CF43CC1E3
+7566EFC3BEF49273128E9238B31A9244C2001E38308ADEA60BD86A89E1E3C0ED
+D4EEEA31131AFE60827FBCFC1BAA348FD183A5CEEBFB472CEA0800FF18CC2616
+F43B04620E74D3AD95EA13E15B13BE3345409D3321397C77D2E612FF5011B90C
+3A51DD8C7CD3A3A46EC0CBC605D1484A9C36FBE3A18AC54DEAA2282F7C037856
+B6511E5C990E421C34FF668EBB8778FBC2FAC1DB3F88282478A52C9ACE31128B
+2491C873A3B765A204907B5EC4FC6A94AB9461AC8619AFE24C2F0A4BDEEB9D8F
+D8405A05F9EB13EEBD79B32763DF402E0FDDCFFAC142DB65DEA80B5EC6400B9A
+00A78E80FD3B9F909E953814958F2A1AAFE51FA01EE54970FBA5E41384903E04
+1440C92E2EFAB3E685D730455846D97C2DC7D25586052401264A31F98382BEFC
+CF9049E23208EBD952DF7D4A5F0AD7CB2688D77C2F3496AE263430000D226918
+E3CDC6C5EB23B8611A14747122DCB9E016898F69D4314787EED886123293FA5F
+01C3FDE4F205CAC20FD19471E9C8FA721A3AFDE78156DA287E8FF14DBF80315A
+B56E9E875CAF0DCD3A622134291B4C42E7921F6AD0FD4940066229B892E57554
+4CACC05DDE1F374CFFD453817EFA9DD7A6ED9079B32EFB148C235EF50F26E479
+6371A267FB33DB00F0766B00F0D43992386062F80B62291F623BD1245357B2AA
+FB3B27E7BA6CACF749C32AFCAD322510C8A13449277BDBF7C221D63B96D99311
+93F461C677AB372FE263C5C19D87DF70134CC0AB6B1FBAE2BEF9F847E30932EC
+89D7521A16AE1351999AD4D4735149AA2892CEA8519F619DC0653D01992AE7F8
+D0C5635C4BCD35708D454C174CB9863B83FE504314A9FFAE0D7535946F0C146B
+9D507E1BFDB6095A5AC18DC2635E1DCBEC393DE1D8D3CCFF7B0258CDD6C00469
+D3B94BB1E9E4397ED49FAE2C83103484C1C24151046952E3B9816101FAEADDF8
+8DD6296AE76BEC4B00B89D319115F5F95C568DC54FDE1E0A07AD3D3620B86C6B
+96166C4B9AEC2DA6D2B2D2EDAD08D4F58D193278A99FE28ECC676EDD4FE3A624
+3FE82562852B0EAD2A6FF707789799A1546326EEEA08A5AF24FC99F1A6B15E91
+CB13F53C90FB93669B1D7CD4882F55258CACB374088B0B01886155E2AFB7F3FE
+F4DC284C5F2D0C56135ED79D8348CE3C1F8BDD50627589E806E6402A32E69D1C
+D7EED5F9DDEB91496AB5DBF0D3698FB728A782073D64B0C4E28967DAB8087ED8
+491C3778FC5916953C235A59BC191B8445B118AFB64C3E7840B3756E02ACBA77
+D1269ECCAD63C3FA7C162F3AE317372686B1FEEAC57C8CC0637236CA01DA6B0B
+83C40F977F766962E15349F020BC048136E35C678123B4BDFF5B154E234CD0A1
+70AC976211A99B8CB8E131D85532AD7A72072F577B51010F21C6334006371A3D
+AAFBD45E1E76550DCC6060678F94E0C7D54D88D066BAB5BD21C254D9628F9502
+5043E9205ED0FC7025C033558FBB3784D2CED521EC7C9F7D6BB8D62899D0E52A
+A0E385ED658B1DC84DB76635FDCF0CECA2BE5919D0E63BA75850596A3CB916D9
+55F856AD3075D5C57686E65AA912F0A6E9E4A778522A630D9D9AD3732629ED47
+BE694C35221FDAC7E8CF5C381CEE23E29AA749B52E68D1CC2554EBF31BDB5CE1
+FBE58C5935D06F09B46B96B94CEBC92981474F77036F0EC33C2149E6D945F147
+44CE2B86399056014CED967E976EE7DCDB4AFA12F1EE4D486549C14FE1052324
+ED70C3A6955BF8CDCDC7EB01499126F0C303E64B4370E83D5687E957DBD1B374
+7600EE0E0DE2C57B37CAE46734FEEC0A2F3863CDEEC17265F1EE104BB143442F
+35329A81ABA8D5F1B7F8CAC158E4DBEFAE91C2BFD05389F048B3BCCF5B0F66D2
+4A40EAAA1E7D913DEC4A44A9A382F53EB1EE3966EA18BEB5EBD24C203B95476A
+0E0C8568E08C357FF880600C27BCDA5623C8034CA1EA2AE24701DC7F1ADD2302
+100F16EFA05F39A2DB15D091F103259FC3C4CCAE4A858B7F72309ABE6CA45067
+EF46BB3C4738E048C884293EA5882A2E6E3B3B3C100B5FA02EC334DE2B68F4DC
+2CD866AB8F83BB0DCAE954BCFF8EE7C3D1CF90CC51B295D02F1130F09B62CD05
+AB930D97F9875B9E65106C4A8719DA2C75A332C038E46F7E82BE4F69DAA8715A
+1046DCBAD2DB3086A1CE04C8904988F7A2C9891B3C2BAC759B20CFD5BC8FCDD1
+03FBD0AEA3CF53E7B1896BF003AAD60870BC9AD50F6D257AEE013DC166B0B448
+D56900DA44885BE5FB7F3273C15DFEEDA5D6E895773F4435C3F2A684987FF31C
+4DD09CB3B2CB9369704CE85FA266676C25FC30B98D74451CFA0A3C0E99ED6CA9
+D31D34A3566A5BA3EFCA62168217429089E61A231506779BC845BBBF085085D8
+BEBAC6370E595188B74C1CC2D9D15CCFF9220BFA63A2D002E7D7F2F711837671
+64E44FFC9B07E092C2C3BA99354F163FB87655EC865C3B2DF852031A3930A148
+9A1D29BF24604E2E635C9ADB770A13288A488F4FB237FB1CAB2524F7D33DE2C3
+F2C5BCF05F7C438B28296F842E86F8BB4881A3B4F89B4352AD50133E79A70154
+7DE8C607A98C696EE1D254EF8E5BE67ECBB7C1220C5FE367EE2DE9D8AC7B01ED
+47AEE18CAD10A639B038972587B10BEF449E7DB2C97F4D97FF55099893616BEF
+4DD08E57DD9262ADA201C5034CC56D9D34B34E2E1B6DCB02F3971302060EEF2A
+D942D62C270090BE5E74572C751A0A6FA081A6DA4430A4A069499A2ECD39FEF0
+AE78E58ED3A64527A70D5F8801EEC47BAE1ACF720369443A0B3D7AB4543C6830
+098F2E44D895F737B26D090F9706D9ECE37CE444F652A5CA5522B0F836201376
+89A28AB47A1291A96EA418DED49A829E62ECE80A311BDF5D1DCF070D38D9C9C6
+AF40F5D93824E089A7B95E4E4DAA830860F2F9A1E3BBA08E539CA4B54EF6E2D3
+DF247E11690FB99A7784D7105F0B4EE1509D657497BD054FCD0EBF0A9D3B5C39
+6E087FC344F636C26158F742D14A363E2130C0EA0DF4E0DB891ED797B63A42D9
+1FBAEF469B0C79081D2C0031E09A3776F862AB8BCBE8E80FC837AF15661324A2
+7C4CDEAC92310EF54B9A24E44B04B5D265808B3B5639018397EBE66F21829F06
+7D0E6BE0DE08E5961848E93669D607F60C25725B7EE8FA83011A5543EA5CE260
+A4
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l048036t.pfa b/lib/fonts/l048036t.pfa
new file mode 100644
index 0000000..4ec846a
--- /dev/null
+++ b/lib/fonts/l048036t.pfa
@@ -0,0 +1,1260 @@
+%!PS-AdobeFont-1.0: LuxiSans-BoldOblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Sans Bold Oblique) readonly def
+/FamilyName (Luxi Sans) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch false def
+/UnderlinePosition -39 def
+/UnderlineThickness 78 def
+end readonly def
+/FontName /LuxiSans-BoldOblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-228 -211 1098 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078990 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D9E671B3988AF5066E3F90
+863D5BB633FB30AE28A6ECF53B5A2F518BA91BAF2EE70FE3F56243BB3F4C04A2
+FC016CC374C654204EC90A7BF559178EE8015AF532372CE4B4B82E2469BD5401
+63B4CC74D7623862E31F62F9CAD70643A7C39877265EAC7B5D71744C4F83BC05
+E893365C941FD0FE135013335FA2213B42226D6B522A41C5A6C11780D38E624A
+F8BB54EE866274FBE41FF83840EFDAEB7227809D506507E8322CC5B16FCD97E9
+C441FCD253585347C705C556A3897EE543648265232A49B9D545B6F618870554
+03227116B9F656C288F9C0E3CADE4544BD1E749D80072FC0D0163DB84A4245D0
+41460C3566BDE66E29E0AB39F280C2F229583228198C7BDFD5C07F110E0D5CC1
+BAC768138F8DC9F0974EC7C2BB9F5DC97B5950A1A4E33F2B20061B22196C7FE8
+C82856D93A079270700B11CB7A6396A4E3FE6FC04D6AD49FF13D1A2E1FF8B07D
+FC49258896C83AAECC29610440D2BA2C0D19A4E8AE287DC0B8DA956F2B4F5607
+A04F0E366F0A57561CE1E06CF7F3A70E300CBB077F9C918B099FD178493939CA
+0D25A808F335DBF82A11AF2D6B2EC8E4456B60DA9F5B713568A34E66F4640C81
+69F5023C211D301FE810A6B6AEC197CEE2B0FFB4CE02B119CAFC5449D8F12416
+989A5A22633105A9750581969100BB65CFB052B5A3FA20A0B4F61A4B497487D5
+BE89F7D45E1A93BB28C6778B39FF708CD041FFFB50B640C93DBF1EFB2FBEF63E
+9292124E702138A914432C50435D796B22106A34C1BC3EE1EDF873F60367C580
+7A5D98032EEDED53BAEFEB69414B714E9EFEFF2B1FBA659081577F87DB8BF212
+4C0E77A8605C1C1FE19483320AE88A041EC9B95D10E89CE673E4BDA638184422
+742F4CEF3086B62F5873A1A3F8263EFBA4CEFFDA958521274263467B9C485EE5
+7D8AA17A8C364F517203A2D9A66CB18201897A6223F5EE5F7ACFC3009B39005F
+61095364ECA6DDE4113D8C39DA710A4716E179812E79E9B01C3D7B00ED2DC574
+63AE485A2AEA55611672E1AC489C6D09EA559B9E8DAE17DCDA80FD287DB8D742
+D4DCFA54ED2EF42A988D72A491A4FCB9BCD2AD4F225E23932C2779C3B008AFC3
+4D2B158EB9697B6598672BD99C91405B5CF668F3A4F21347549C1150B0FD3EE9
+6EBFFA6F54F44DDD229818D109E7FFFA337D80C83852B12597686E29A0B855D7
+D548EEB2FD8AC5585F458D60F8A18F33CF5CDB9B45FB4A8F61732FC5A2EE6F4C
+25C2B903EAFB4A0056764C4FAE4278535DEBF80DB8A9B5C8C471A62755CEB38A
+A05D0FC10C4136AAB774FEE2C6CD57CFFB88D9266696C390919F94BE439677E2
+E8AEED7B8B4BC2E422F6C9CD1711B496E57D31637BC0CD4D6001D0E38F54402D
+1D6B7ECAF0F454219AD6CBFB857D7165D1217B7F5315DE5EF333AADAC59C0CD8
+290FE129D720FE11B2A16ADF49FD140902FB8D8D33FAD0EF0A79AB30319A9048
+F7C2A38D5E9333A5F0F20D12A73EBAABDCE13D9B38CFBBE20408959E1F506784
+761CB0A7C72A220EEEA74FEDF0158F7F36EFBF9DC5D83AB22C8756F42627A51A
+03C6590FEC9DB77B790A5672158CB32C9ED1980C4CB369839DE47BD57CB4183C
+EF55A34C70996A7E00740D236550AAC8CC6471BD00D8E3F5BE3727A9029F60AC
+8B0C06076ECA4D854E4A1372610EF8FA0FF97D3E637CC8580098961C24735991
+349C2958B4E7C4F67625859390B9567ADCBFB334DC7FF5AB1C0462DBE72CA093
+0D7F43CC5230E57824ABF7857EB2F856841013C9E06D0DF4BC9171A75AFDA802
+4491D89CD7D2D65515CABC474AA8B9BB1177A502E4B94302E1E40D6C8FA974DF
+C6496A7C1DC202A79E79FF0D9983E48F8F66415610F0174C5C555DAD5EEEB9E3
+FB5EAE5F9B5307ED89700DB98C7031DAC8F371CEF716BBAB2DE3DA113E69EB18
+EAC7A1756A0340248142E95538BFC1AE4814585AE16E397C3D34736738CA5A26
+6E761DC0F59CC2C3DDC7AE6E801DED28695E7DE6FE9CD1E29FE636391ED78E0F
+C450839D27A01CAAF1A56073473A4347098007601698AA2872EBA4F2F32CE6E6
+3A9EACBDC28AF4E8DCBFD8A0ED978058FC9E7FC2A676500E19337917EB0FB8FC
+3C37E3903185C96C4225436A42C5495DDD49A9D072D1FFBCB9C2CF51739AA6EE
+CC537EC85C9F316B9721F9806F214EA9D10C35645C0A05CC242E668C9B60C2AB
+DBF148A8A1E8BB212A272FDD180480BED9988C9AA3C99342EEB70D7EF76C5282
+3D10C8C811418DDF1516660CBEF817DCE1BA41EA0AC8356B1573B9F0272472DB
+2112A2D6AD1371128E62FD35068068713F82E2FDDB721C253A378E284175FE68
+8F77FD876230F131878D76D91B43001821A4DAEC5A6C30742864B2F0A1E6B434
+80FB5A969A3C3D6471529E0E1972EBF27FAFA811808D374C5157D8A90F04A4EF
+34DF27414E217FF7DEAC000537131429842625464D0FF55BBE51B7048B964D57
+DA20A4F579C86D81B3186CF6C503037C83CDF97349E575F24BDAF5C2B16290D5
+805E88F22B22C59249E9F8CCA25DDC665C2BD937CC6C957442626EF81BFD7640
+78990E9071638880C0AECFEFE1DBC5D86EEBE3E8C181C3DAB690EFECD7C291B3
+882F31F29C281C21DC1C5EBF2975364992B3996E5393CB54C4E4A07EBC183617
+DE1739F62531F36C19404E395389B85C893F5F8BF72AA7CEB5BFF1603C144D69
+25D14B3D1C4565E72E0E64282C5398BB07F45EE86FD19A2C20792F06CB6106A6
+C4EBE8289ACA36D30B57F62A11F90CA64F25A15ED9A187D255E532490F74A885
+9DC77B2D12EF1CB9D5CA120B45A7C05A7945F83F764F5620CB01BFB6C1B68AA3
+FF860DB0A9A811A6D2D6862355A95DC11CA108037E03BFCD8D527A3985546876
+F38487881D7575298C274CFDACF1D190103A9906B08D6415E14857594CC90BDE
+9643A556543EABD0412C8BF1974F4A19BC80F638158D5CAB73657BD7395840EA
+458E7345E25BF1EEEEBD4CE7687934B5BA62D34E5102E033A9EFE75CCE2EC089
+E62093489C4D0F18F6ED577700D5D2C9A74561848322BDB46828E39618A39D32
+F13F6CB6E9E5CF8F004D6D37C02FCCFE227D75ECD3E4BB1C50440858A3CDA4D3
+66BADC120B31CA9CA8A42FA9853309A1AB649E61F45351E2946D9808BDC97875
+6F08E8C2931B4740800142CD15A25DFFDE8B2EDDB21FEA1F251ED643F08D744F
+F7DC5E26064B6A16FB4F5872BE9544E8CEAD0DEF9C52B1E16C7FCFA64CAD2B9E
+5AFCE93DD0F8B460BEEAEF3BDCF5660D99A6C9DF1138BC0DF400084540991574
+6F59E90316FF7A74B5979828FB02465D96354BA5757347FA0F92D41C5659196A
+FF6E24F615039D949E6FD374243708910E145CE8E2A2461F5A30A5BAE30D5445
+7C10BAC56E08289FB57C1D4C9C7A87CA8D24FE421D4189540B6CE0190281BA4C
+9F3CCC4C095B86F076BDF504F24E9B422DB680624D2E452734D17F0416586D80
+B3BAA3C782475811191B857C19D1C4C5192B33997E1368786F9A8D3A3500F7AD
+988FAC17371E2A74B1FEC5CC55F9E64649D01230A83D28FE63D1175297818C48
+29697A12F925F189D1A162AD1A71FA29D1706F047540BB4730AFABCB6D3BCED3
+4EC3B8C028AF3E09A9D30AE9BC82D8031D8E00FBC591B1101253809C7A733B37
+4C39CD97E0EB92C5DE19499051EF9FEEDEEA7621C0CE69DE520587D990024BBE
+87D6E8E5D59E66502FB01BB368CD92FEF24A618C1A987A898AA3D23CC543D7AF
+49C8D30AAE8B9434E491D98E8D4D68DC8D6B741FF66B9AE193AA685864D542BF
+3BD2C156D7050190A4D4535D5B840587EAA6AA058317CCB77D0471D83D1D2724
+3FC905BD7F771D0F6D8C3A1D8CDBBA2461A709C004F2953668FC3D0F4B13FE33
+A9AEEC634A3F9A0850D03BA733F6DB834DCE4228883308EC70CD5EE550E51EAC
+3D35A3AAF9340E2624683083F75EE493318188E58286F1A4B879C92569DC7960
+538921AD7C6B3C89F4D6C28F650C7C86688FAFA81FF4635EA3EDD855C3CF4DE1
+FE6C8D145BF56105E416F5F9064C4129A0277251A46A054E38E6ECEB327ED45E
+1BD5D272182A1CD8A8D0EF92EB46C55AC149D29A4B7000A7ABCEC1EDADFBE735
+213E93C0C251917221DD8926F3BFC5CC9493941B41787936FA077F706E8C48C7
+2430D26CECF90F6086361E3B09D2131963EC4A29FEBEDCDDFE69D56AD538D258
+C3CA85AB0E7CF62E5147038FBED9F0F834940D5DBA99D2E2DC2158BC1898BB3C
+57912686C5BC36A015228460F7F1A0BC47BAEBE092D69CA9848E389398997613
+5B5F1F5492A02E35585864CE24860C1647113B53203BE4702C4B09EA377C64C0
+2645A1C416E4551FC9FFD6BAF2427DA4D4853E4B2F9B59E4163FA3D5CF4B1831
+6C51A54BF8040D96BF17EF31A6C832D55AA3E61DCAE57F91DB30BC95A30F8251
+4919068E31C8A678D8FA6423911FF90F48F3225EB2E7CB6A58DDB1DD58AD1272
+6C69DDB5F50DE8718E58126289F883494343DBD4A215FDE54548464E8A6051F5
+6C3DA917300AE09ABA0EF4A4F079A63E1F15030EA41B1EE8EFE18D98D4A88912
+7A790989F9B20E68A81A49CAAC1CD91CFB9401F60C9DFF87F2ED944006432CBC
+2CFC078CB5809573CF15721E20D85EA27541FAA4949BC8FA6708810DC205FA64
+28B84176BA868FE351B87361F8832D742A5FC3BE6B0557AA3EA5788239D1FDDB
+0EFC4CEBD4D736054C77CAFD5B1453B65FEEDF7FD01311C2C582B6B97EA70687
+8E287CC3A451A190DAE2CDE4708400A48D6F7BE00704CB3F9AE8BD7B4B04A2CE
+3C3B8E6D34E3C3C9263122E10F32656166B2BBCB1EDAECD6500C4CA655ED6B8F
+037DFD3485443D4B789F3B591B350B9F411FCA0617CA75EA728D0BA4313FBCC6
+B845ECC9E23E497F1F955A15795F01E4A6BB8AE113B2F64DCBD2C7A0F87EFFC8
+994F130004DCC8F2503B56BD9A773C920D3D5A5CD0FAC00763E4E17683455C90
+FA36D8B76DF144C8BA7D2EBBA2E4D5751E7B4E2C675E37714A3ADBB0F17CBEBF
+518E3B60DFEFF14230B2FC48080803B9D05B13023B2BEF22311E91C8181355B8
+CA3C3680786B74FD8CE374CFA68A19E7AF2CB998E329A7219859AD23390668A7
+3C833BFA931829782F61C50E2F91A0B9D8EFBD8A6B2C024D5E8E10A4485F922F
+06CAF23E970215328465A347A9E283511B92A442D9CBC7B221990D4F679B04AF
+112B05FCC1C323CC94A73BB4267655DC61D2E57A0A013DF17D61D3E565AC7732
+23BC046BF8B812CF67AF115A80C8BEEB632B9E87BA2BB8FEE8251B9A4B4971AD
+B4982DA27005E24C78E5470F5664BC1F2F48E7D46F660E543BC2C985D2F2B5D1
+8D9C43B976478634A91027F47A5E6F5F89AECBB1C455225528E6A76D4E5E0333
+56C7DBE3A520C8194C27AA32C34AB0AC3F5326EFDC65CAB8F7A63100D0AB11E5
+F3ECFEEC5D9E39760F0B5B3F227B5675F6B782DC03AECDC1C94C16B4CDC1A1A8
+F4341DBC38524D47306D254B37B7CC7CF4E8A2006B7CF3E97B38012CBD63706D
+2BA7F279218EF039D9F2F1B1E1A59FEA6DB6EC02DF73061D2CB3C179B3BBFD4E
+2CC03CC26F4A4136EEE04F991CEB916FF87E1636740D020721257121F938E0CA
+33C265E3C1250D7E62ABF64DE8B4E38D871CB891AB19013334E5D91A744C9EAF
+AF9510DFBCC3D2FFE910C4717549E818056DF04A965140B505BDC08AF8A15F4A
+4DF3EFF98A4F1FA538B1F121166A5C250029861ACB23F8C619481982F6A6A5B3
+F789B519D504B8D94965217BFFD62719F7E8B8A8A51C6637DE5CBE7A2FF5554B
+3D08019194EA5C2BC5CEBDC53ADDEEDA4CE45BFFB9F16A92EFD9C8B224549AF0
+E77131EEAF05BC082EAED8CB6D9DA2A3746510F00F396E66A90C7DD34770F4A3
+A570BB3805F4CECE06731A46151DDD1971731049F57ABF174C5766CFABB72356
+50F03E186424F00A0DD7158429158487223DEB5BFEE53B4990E9DB0E26BEB6E7
+EEEC6CA0A6EE8A8AB949768B21410467A8ADC90E30DA2D8D0E8834B30CD25CD5
+210825E6AFFF42827C99A7E89FD9ED7D11F1795392BBD337320E4075855C5B37
+BEA02800C4F9D24B95E43CDFA3B4B25EF8BF41850C0A0FA8967F94F75627B6EB
+FE9751B0A9F14A4454104ACE3ECBC77F62397C7DD731C0D0D754F5D8975A2FAC
+2CC33806A516E9FD1DAE386456AD8C5D6D84FAFB2DC08710E285D8BC25FD0BC0
+CE84C436045C9DD14C34768D04D17D62A1CD97BA0DE0622AA0F01979B2FB83D5
+0814DA03FC088A4849EF6F85452629634B0BE5B306BA56DA0D95E8C120DAF5F9
+C880729E8971E16729996CEFC60E980B4BC0F734C1DB840ADE2C735E97CAD49E
+CCD3FB38A9764688A52FA164C08C0B9B614771B51AA4E6C95622562ECA3FDCD1
+1C1EC3B74515E9B5303433551B82CD1DAE2FD07DFCB96884BA912A1CA6253747
+28E81A26E46B3169B461943AE9273307E1234636DECE2E32F18CDDB4579C90F3
+48E64E999FC86B7361B8DBC95EB4D1B4B127EB81AEF5B86361FA83085F8F2618
+6AEDEB2345E69557E992535F7B26842B02FEFBC4994E6BE410137AD8CCFCC8AD
+76599D96338CC250F9AAE458B6A274EABCBA497DF7ABA3FD0C21DCF14EDC1613
+A0471FA5A3436E83323CD33074ED47C21EFA96B2035DED6D0D012B6306E4DE0B
+3CDA126ADCF1F6BA4C2B814A658668B44BFE5C0CA3355D738459FB7ABFDBB0F8
+786B00E61CF93ACF31B60707D674A1A0285AED6E4D640FF94A0B0B02AAF27F13
+5CFB88D3C5E5499A13AA520F4A7889331CA9B35A5D2958683E872AF2E51C1BE1
+7A7DE58700B791FB8FFA6E0F249681FBD10BB62BBF56B6A8B788171F0C72BDD8
+E55CADFA6E7C913BF5644CC759B59609756DBE4BADE6115B6E42A4E15A5D764C
+AF80ECFC52EB05FA03D4A87B9E6961F54491FBC6E4573C7A4B960BA6DB2EEDC5
+22742279DBE770E15ED5703D20EEC6E56A61C05D508A64C2DEA63289A8DB4225
+05E16B7D9B915FA7D94CB28426EF0EA683C543D173B22CA22E174A4B3EB88C1F
+AE3E3056F4A3173AED92601CE514C957C7E5277070A72169E9A58911678F9EC1
+3F39BB3E1EAD8390126F8587CDB7F8A2FE06B06732EB9FDF9625ADAACEA23A04
+36DC51D828A5FCB1F910DBFC74E1D2B56FD88EDD58B9F2EB0504A2F800FF3CB7
+502C05AEF78B333E4EC076541335C1E3EC95AC70943127B5632954FE3E0F9694
+9147B51E0D75976878FCC4AEEC2661CA4B19BE4F93B07BB7CF0E835FF18FF48F
+137AB9AF59CFE1C925CB0D548CEB2FEE5F5B7F25C730E9FF2D757391D1310E4F
+EBF025DEFF64DD04D9A06D4B5B84F915CA4810499D3B8F2E3065E5079126C181
+BAAA287430C555E330B53D21FC9C08C1D1822522076A247EC3C322D163FF492C
+39D0BBA3DD100EE943FB6E94E4C9686DD0025A04535538D816ED742D70BECF10
+0D6105BEA237207209BD25F7DE0A713B770CD0DCC988952F847BD8816E91CA83
+0BCBA7A48E9925ACC4AD0B1D1C03247DC912BE14909BC7961267BF4DA4DAF6D8
+01A1AAC313F6977BCF8232199DDF4243829130679FEF1431BD6C7BFCF2BCBAA6
+08F6F0D9A4AD5D04C9109CB5AE6013648394C6EB83ECE2E39D46759AFF128924
+004DA587F7A3D6C7EF7A7BDCDD0E1777A0265B1B4954A1F691BC61E2C008CE39
+F4AC7EF840CBE9FFF366A71A1940BC4D7A9AF68000485C49DB2DB1FC400FA036
+71C490F52C175C1315297D147784383759FC1A0029200E7C6BE31462D6D6BBC8
+3F5F67ABF810D460D157E94DB0C1D7965DA58683759800211657E3ED552C586D
+4405243E51052A55135B4DE1F10248ED310193E316E18713372DB893ED164232
+85193FF7C88FC96E091B565BEC36CD6A757B6FBA76B54AE14C2EF6B65ECD8420
+3D5BEFDBE6A4F71E52506FC18BA2C02F8AF58DDB285F1677DED6F10A93836A2D
+0BD821A5AB069A85D4338FC007AEC8B21FA8CE6792BCB01727990280A57183F3
+6E74CA7520341E95BA611F600D5056CFBBA755B302DA747B08208D21DAF7B7B3
+F2BDC1FA0EB5A05A917FD9E0834F0DA72A9D3AA2AB0A074752737C7A5A6A5312
+CB40DA86B9BC2258EA09B5F6DCF4CB791963D4570D4E89F4CDF0BCE26ECC79A9
+444447D97B32C2C06F48A963135AC0EB1B1D0888BBD1625C11CD4A9F40C1D27C
+E6993E6992E1B21CD0FEFC40BFC47AF469563AC79BD433E6FC0419E3564CD4C2
+E3715ED41E6166696E4CC4FF0C89F60E88691AEF06E800DA26151216C0FDDEF9
+F04F5919E3FCD1972F6383A60AE0A56ACDFA018988E01AF9D8AE9A8EE4B401C0
+1867B3CBA3D9E7EA775BBAEFB8FCC0C22F904421B20B640D165747E180C15437
+92F54D2EE73C22A689BD11E70B5A964C1C7DE8BD98C063C9D1348871F5801694
+06844033834CB512388D1CF765AC08824629B541F84E20AD3C5161A3C232CFD6
+07AAA25A6B71B17D0209EBAE3662041FEA4F315A8F8294A4036FE161CED4707B
+32D2B2BA3848FB1BD93C6C420F53DD1BA44DF7BEC87659CEF2FEC38BEBBFAE92
+392D2B0671FA00AAA30F06602415C8D67E5252E04E91DF5F62B615E71A46A514
+FD2C5B43DE43DF612C36248B8D27E2D7D390FEA0C56A396F591307CC5BF972D5
+E9D7AA5D65332F178F311A8E08E4911813E3D201B3FF4132C83EF21B5EE08864
+3711EEB51C401B8AF91220AC05FD576D8A1EE80C3891A8AA792699FF784C0953
+94C4E33B8D02D81E2F5E85AA049A89141CCE1140A9CFA4C78153531B1C004549
+8D9DFFD86A271DAF08B85F942D93037BF741258CA94DF4296AED020B131AD485
+DEF39C8DF7451F81ABD667E103E9FAE7F4AAC9D567192AAE7E8EBAE2E46087F0
+A83E7F096FD436AC87978A596AFE55CC09A0C329FAB21A53492A1C23B6ADBED1
+D369010199BFFB00FC6554DF5568F04460311FFDC67DCAECE1E8CA5710B0E8BA
+315DFB8C6276B8FB9CB9C14D42A2CF94CD54909E8873FE58D18C274EFFC29D09
+F744357EEE5E12C5A32AD69098A1BE95C6C3713C62A7F86C1874CD274589AC11
+40545D2DA1BF3450680DB402512098A4FD147D47D11D3E9157570586733D24F6
+CDCB0762FB61B16EE2C85564DA2B9A089CE4F12DBCABCF8DF177AF3B1A6F1EED
+D9DF8509AA1DE596EAC9AAA062AF4E52BF05E243C9536086565B71E3D9E78CC6
+430105D74B754836513CC837E26AF3423701EA7D6E816FC7E796B56522622D68
+D750972A781FC96854CB962B069377D094C861736699ECD6ACC998C1572775B6
+00E3EF63719E34D4950D1D674548248B7693866A4738F837EE8EBA89B085AD8A
+78E2F223F7872AAAB987008CEEFE8A8DC2A6F6C379569696D4B2FE9B174F3BF0
+27D331E30B15762F52F343F1CF85B237838A5AF84AF9BDB7611EE38675D76AB4
+AAE4FA7FBD5CE49A47F5F52F42702905B1B5E3C754EC74DF3F7757E7DBC56742
+318745C387EEF697D14E8013C25763DA1A160A63482F8462F806614957E0A5BB
+B32FCCDB28FF2C7C93EECEF415CBEB80B1C0A8DCFF21F6702ACA217E81294879
+AC7E90D9460A39F58D255AEFBC5EC674277B7971B7D272C1F8C1C10AD7B27F55
+90EEDD1F14087D002719742D7CA335853E8641B8AE1FAC60415B83E3160E3A68
+C5B2F117B4503AFEC26D8BCC0EE50750781175FD616AD7A4DDBFE60666F8FDC4
+44BD2FC4C5EC34D1259B578EC11EF75944D0E1A531BFEAF7898965F28306C015
+6D572FD61B31F35904CC6FCD85A598DE1BD812DBCE737DC93FD91079341FF963
+4432EBE341D447F08FBCAFB5C7389833FBA0F47E716E6790DFA1F486CCEABC78
+FAF007EB9686B0C16990AD09DC205662F51BE300E51273C543FB072EF77357F4
+F5AECD3FDB8ED5F316099B380B0335CADD78193F60C7FE5CA9C6695D887E4E89
+123426A47988C2B5F3460CB005C9E139C59E2D377F6F1760911A8FC2E1325B63
+C023F62AE8D2D3AC3474CD637403D341C50A3E380EDFA78FA0C0679DD04F69F1
+3D5F0C33F19D1E670D377652EF5D35F1568D2F3769214B3053005ADAB1C73FFD
+EE789CD271A8D8BB800DC4A2460F4F681F3F1735F456D8B9C4B62780D2A9F372
+665352E8D7EC353E7D81A6E29ECAC96F50700D8F1E618918ADEB06337154845C
+C1B7EAF769D54A3858D8E4F81C7B201F4E8BB74751B8EE4304BEBD849511368A
+D405ED3942A7CAC3E61B49EC8D32E9364BFC20A8072564D427E3892165F7B0C5
+9785EDAC494D590658F226E84B638154DA935AD664B9DDAE7C8344A157C36A57
+5752AD98198DFD97D942C38CC5716A1864270085533519FDE9C7088C7FF9E0B4
+E1511BB6291BA896F40E69E2AB7EEB740778442D57E4DF5D17E7C0F6BEB99666
+4695C52D1A884284177EA3EA6AE6F061542B21C2D3C87714EF5FCD5402E22220
+709E610804FDDFC7C9231D7E85F70CB274F42A6B0D2038613D7649C74BFCB997
+10D96D7E1C26F7E0D58CA6B79C7F709E8893FDF9765F4C53B8A13F28EEC8929C
+55164D25AE26C7B978103A593E17E49557CA642F72F529A5504C6381060C3EE2
+181E1ABEBB12B5148649F461C7643E1243A44C8D02711888A8726AC744140B59
+7CE5BE248EA280D802F0F6B7955CB1D4D0FB36CF8960BF0A718B91FD2D357DDB
+484739DD257C26E01C539C5BACBD92A8D6C97B56EA6DF85B1E4E384295BC5A82
+4178CC59DCE00C6C75139FF17EF33E4654F806D81698E2C35870EDC52AC05827
+7476C4ECE666C134CF2231EB498555248B1DAB1C4654E4EE3B5455D2C472B36C
+958BE6B0D1CC3C87EF568D4D2060C0FBC17DB3B8495660A47423ABA7179EB6C8
+7C746071C267A20E51E231A127874CA2517826A6A980CB51068BC30B7B3937BB
+61940B7F361C06644C1B2472EE1C836F9F9B8A4E33ED8CE8ECEE0F5E09AE4CDA
+088A34153CC840BC895D6D947A57B76A9A6C8F81339CC12682D4CDD18989F936
+3D00BB0BE992C50DBF82BCF62926ECC17FC680808C5E802258FB9EEDAF8287B8
+6788B4D3C3CA5F3CA6ED288A30902F3304A28F40B92A5A6F987BF98F777FEF94
+CC8AD2F86D76A7475348AD3D07CA6CE80FDB458DD8235B852B90950DE333A444
+0B00C47921B1E201D7033832ABE2ACA0495D0FFD3B22488552F43C8A423428A4
+021471B6109144E03B6FF5148B699DE67FDDE6FA25225C6806650754F82BD446
+40CC9FD2D90E8812A6E08CC935126C8612C71F4CAE97ADC75FD58115E212CD59
+6614F53AAA30D9C8A7DE2A6EA32395EDD26713BF8B6086225970D8B4EEAF71B1
+D3B6150B945878F806BFAC36C33B2344C5233F7C35B8D1264EA12DC081914E60
+78CD9F6AB21585D3297452BA7EA1CA2BCF3F39AB49ECCF8BBAA1A22883C161E2
+699D3A46B51E75E3D80A22ADCF6984B6B67BD11FF7E05C46E0516B434792FBDC
+A88DE35EE688D35ABEC1B8945A9A3806C1C214D80D0B60DC31496898B73E46B4
+8EEB7B9D2C3A8829E041663AA48E7378DB18079F4D76863FB08405EE7B8F3D9C
+328314A3DDB55BA7C28D4ECC2A4E23A701B88A80D82AA2BD4824FD90F47AA702
+014753CB1E8B020F9A3CFE47F6BFF747D257F48F3507494ADED3BF179FAC674E
+2A372DEC39D0DD73AE3F932BC5513947A51671365CB6032F86BF3D3D0F1E8CBC
+145782A2D8B27FFE77AC5E07493BF2C423A56A37FEAD71559A149637F8054AB1
+5F76AB661DD116FC5C55ACEC633447343E30C555E0042739B9629D712CBC22ED
+1B725451BC0217964F3482250C473C77286326EFF965406FBFDA478FF4E3F4E7
+A53CBEE24C1BB2AB8A79D88BD7BA1A7B86C3650D2D5C7F23119719586BC11C6A
+04C0B90489CC46FFBB2C6F6E8993DBBAFF62F63F79EA27C6D2B1FA55AFEAEEC9
+705C0A22B7E0E94CF9306452A854EEB6FB0032E442B5B3A16364BB3ECAE00E77
+2B845CAAB5966A5E78BE8C5440063CA3BC84A4B0A07BE880012DDA7FACE5482C
+0DE438ED79516FF924EB0713A68124524D74730A6318E359B27CFAD218DDD03E
+5EC4EE23FB7F94D4C88367F6299372BE29B5A4059D1F00C0C2433F79DE287A3E
+60A5F5B1C812F1E12809A07F9623ACC0C0DEE78F0981FF701AB187FAC2004BFB
+73B0926EC097237B301C311B478FFA455B8B1C1129FD2E4A62D43D2F79BB693F
+1E88E5DBD5705480519B874F502197C2CC30D8E716A5DAB4EC24298E7DEBEA5F
+095EB5BB78B4D7847B9C25F2D462C86A5033B7EAA136BE3B3993F479B76393FF
+757CDC548E9093D916A40045AAB54413B0563FD905451E2D0BD7815FD377E00C
+7DBDBCC6476AA2C82C52DFD027134D8154734342BEFE176CE8AC20CB16C173BE
+776D5089A4C080D07196A06AE34496F04C5B3945BA8403B2B408EE150BC0269F
+CE8A1C1CBDCD996D75705F6CFE6D487025D924208E6304791CBEAA62DF66C80A
+9557DF93ADABE4ACDDA1C18DAC4476491A84F8C8D8932E6C02FC22B7ABDC397E
+AC155EBDC6F8DBFC3A2064E99252D3122685753C3BB839EC743D7CDF9428CE6D
+0DC0CB52F218CF1D9C8412DA2CCF13677FB55F9963BA89A47357DA9957306F70
+59685DAE5D0A70D180949B206D8502489F82D89AD159B969ABFCD08A746B8ACA
+538FE5E148F151034B6A69F604AB09431787DD29C6D4414FCF3C4D04090F17C5
+0BB65452A3EBC75DE088201997025F808360A7DCE5C74F04617E9BFE06072F7C
+D3EAA6FAF4F5CABF9D87B851CA785CE5A675AE5DAE55C996D5CEB5F760051237
+F47CEDF612D326DF900C771FEF1AB9CF00C5B29558FE329E88C62FDAA94EA598
+FDFB4A27216007C73B14FB5FCD9AF42F39C0879080463A9EFD11614105469C73
+F38A92C4AB2290459238BD513895FD11B0234A17B303A1F55617EADCB41B7501
+0FABA82CE8A8C5E98308B5B655DBD6A63CDB44B3034A2E20BD44947FA1F52217
+01B16A2E6CFD35527363C5981CDECB886331092AE9DBB2403126BA0EA79C7356
+7AD019A16D9957B2617B5F4F9B7F82E75A718BFAE6EA4BE7D8561361DB470A9F
+82E7828B10C718536D6DA7155FCC1FDCCC2692BF147027F9DB207E981EBE36C5
+EDFC37B83290541EAF2514891728F4D3D17730396614874BEEA92FC26D1DD076
+0142E42962897F27700D4F34A946571D2AA7F5E9BBED708A9E1D0BB2F9FE0823
+A6D026E3C9D4D92320570B87D428F98BD20A395BD06B600B34E274A9FB42B0BA
+4430B56E5DED6D014DD78EE54522C25429E5F6FBEABD61CDADC297ED24758E2D
+85021DD2E900864CCA07616BEE37C74B379C279F554C4A20C195176787EAAE66
+1466F8126083FBAACF3E774843202587C09AAA172DFB89E26761A7398E9A9997
+256301DDB5ACF882349D99539BA40C38CD3E69464B76B5839EDA48508A3D7246
+FFA59703562647B680288D2944AA440599D0B9BCBF2E1261F3AD23100219B1CF
+3A1FBB617606892DFA5DE1D7C221C4A6C8608566B92C67C3044CCE7FFCBAE2F4
+100445E92F506306C2553EF320325562284B579353168624EDE9FB921A759BFF
+29F65445AEA413844E4C9E7448E47E7AC8E934D993EF1DCBD153537282E28104
+DFE7BF8601A2F1544FA971B9FDA521F228BFC95495CF5BB48E4DB9828F64769D
+1C7AA777D2F1B79E054C1E6A03D3D27CDAE3594D6F37F8F03572778058A6FE9C
+E8E9AE758B7D204A02B5CD228029C1909656F1A784A3120555C2705370C80B6D
+6F0F9A0DA15870FC79D8C451FFC98D8BCA3AD6865ECD906B2D8B9AA6F62FD013
+9B7D59E9F9C84976AF2F142B953A76748C078A1B32566CB71C808B4EF5B0360B
+60000145951DBA021F16E090FCC1137C613A5C488646FE8DB564D5686D49E0EA
+152390D5AED15FA44C71C4A829E250CC5B3E2B708EAFECA4B324FAD72A5FA2D7
+CB9BCF155F04EB6EFEF4CD2E38A6D435E09178D26B9879DE75B7E366DC829DC1
+A7E25E4DBDCC29DF8AB10C7FC617481FFCEF59B60ECD35DBCA03CAE19A9804F1
+758EA342DA058363A1AB7210A73045411EB5EA0C97C64C7D89162861C549778A
+F748232138F5BE892143DB15AFECBCC6E16646DDB26C7122D7FDC60D530EEFBF
+32F9050BEAE6A683CC7702866FE1E6D543FA8866CBC92D25772C79E823F6BE83
+F1F4F52F8C851F7F92C1E81A3FFAD932BB8A35C263B535B3615DBE8ED8770B4D
+84915C479D24345EBEE99B722DC5C169D04A908BCC3D0585BCB6C96DB29A469F
+32689E30797076DC2B096E1C92C8012E3134BFB2CDC67E6C389B93018B42D727
+88FAB5CD6F4A4262F4F45D72346645B64A393EB960F6BF1A26CA2FEC965DD763
+1276D5168664E29A51BD7B8A10CB6F8EAADF55C9727DB220749073D3E1FA31EF
+9F468511A80615D35F26A05FF01C183480D2AE7E729B9B04A39789730E5529D1
+180942E68402D7407419F2622574E55777A4DAEDB7CC9F6CB605AA428F28CA6F
+C859BB79A649578095243268D594212EE8A80BBE4DB720EF6B3695F8A16516D5
+6B6DB2F9D93EB1598E06879AB08ADCAF0DD75C0BD31C9B8F44041415E6EE47BE
+4421A95E6B80589BD4CBA6066C1092D76F97EBFB971E38B986762255DAFBF5DC
+7F3A28A028DBAF10AE5D8210285FCAF35E22E68A42B3DD8281D41A657DA2DC3A
+7107994D7E9FF61934E1F63186B9E28962AF5D783458A85A84A5EA3676AFD039
+F899DFF2319013F517A0D3F36EEE1C42DFA5B1C3B8E41A5BEFDEE21136F64A74
+0B2F3D8F2E64E4F106DB68C3FD4ABE346FD45B90DEC25D1B705EB119B08409FF
+3769266F3A94B030B57BE670BE932ABD17800AD8115BC513329CF65557EB4E66
+788C2481A74AAE555DF0B8C1746FCE0349BCCFC76120274B4414F3E860295696
+7A94B5BBCA7F31D3DD01A59E2E2E188A323F1FA8E1B9EC45589B444FC7438731
+F4FDE301422B653FEE01C38E0B68DD30B1B7E2079EAA2332BEEC840AA36BC3E0
+8DF770114A53A01DA1F4F2BC6EECC92160E3EAEB18041E2FE43891778A89A23E
+2FFE2A64DE61CC651CF2B1C44EE9677DEB492438756A31C9A3E89678959EAFE1
+B93A0A25B64712253BBE7259844D4988A574FB1219C96915A7BFAF654DAD6BE6
+B1A88AD6CF09027359A681FA82AE364D430AB261668897C5414511B9B31DC31F
+FFBF69F5C1EDBC0187EC0C658770EA19697D92D1A35E1A98BF60F6CCFC3BCD51
+EE602EC8A919306705D61579F04CCCF587C6A5ED9B056FFA9FA84FF41AB30EA5
+28D5498ED5207B7244EE46C84FB5BABD2AA6B136559500CB5BA0FD4BAFE45AFE
+9E0AD540712C7759078A5C257C1B542BE3DB37BF0CEFD0F18C336D5B4C5BA34C
+9E09B8DA0E388BABD69F7D1573A86E1C52AC315719A5179E7D986430BD34CFC3
+6110822B15779B121E917FAAB2510F9F280AE0D24F25D7D6CE64DBE1241C3CC5
+D9E14F5A5B8E3B16957E642784246850E3644C6ECB7954B469C1CD954D0557A6
+6F04BCFBA452A34A6733543D8321405EA12C1658EFE72CD0D2BDB735053D38CB
+C72446A5C57FBBA56345C1B00B4E0DC9BF4BD5403B1E1BD0A890A95316BBF90A
+C683E7C352E2D61B24E84C477AE559D5BB86BAA35F235AD4F32D7A9C9FADD578
+E3FCCF6BED0F7DF1E412B8A923F7197DB936E27230DF61C370318052ACFF31AF
+4709AA521D561A6F1B4C8C425F6638A138EEA6A8CC069559AA3E35C7448A1ADF
+7445039449B49621781D2D5E969BBC78A0CE5FDC02A7E0A76828FAD14330416F
+B79CD927968771EDC913E875C5D11C2F29CD9DE992F652DEE96685DBA857D0B6
+0A2F410B2B46D779B25BA538E0B0145ECA0B14BAD0927FC63ADBCF8EC10506F8
+282DB2D07172C19617F95235C7AF6E1253C8405F53839B54C55DFF7C46A16202
+BE0F0587471E8D83E8E91A3C9F3BBB82BFDA98811803945EC85607FFE3E94E6F
+7E26CEE7A306E4C4409DCDD8DCEA89DD1F08EEA1F0EADDAC133DCB1931255F63
+5A22E592DBB0C8949ABAC62402CE17DC7A18AAF815C6C86BB341E7444F878817
+1590AC436E3CEAB3FB79BCDF5A12F2413A82579DE9E5E36E92B47E465CB3CED4
+554D1E308769F56B2C55CD8029696786C0652D7F042DD0DB7F24AED531753E9D
+82F63CC50A1240F87EA74381D61D912C8711F6F6E9C0CD3A302D0F3687EBF024
+C97CC23D4E08514D6BE8394632BBA157A6606DBFFE884CB958E2F876525ABFC0
+F0370C5C9FAE209F10F91614475E9EE4972E95D8880F5714F0D414272F3AEEDB
+EA181B2BB43631C15A68C0CAA12A8B9202722EAE1D0897657A1A8C57CCD0DD9B
+F97C68EEAE1E098DB56203C994904A400D4750C150ACE554E7B45D4D22563D0D
+8879046FD0D8DC9EA5893D5A58C85E81C6B2E13A89C55ED399EC11B5C1F80EA4
+53EC27FAE17E582B3EECF86CF73119A8972F00D946ED58931A10586B6B51D39F
+72D17CC529105D5F8D74534C2CCFAE412A516CFD4CE923EE8072950A606224EB
+229147A8FECFD224E4158BEA0DACDF53654232A1B946711DC8D20146B4CB7D23
+CE3F199B1E2698D626A28CBB039B073DFB33F29DD00B58875C28C700A985B0C2
+92656881336BF5DFBEBF01FDBBAF1D86EFD6F6ABED59FFF6F6790E94ECC70B88
+B0CFD30EB7D4677AD2E280A65CD9D95A35F7EB0263EF3231AF61A1E81F2D46E3
+D84C94044861630FD92006B7C0AE4667F0D23FAEE1285CC1B9D6541349015E38
+8D57858099E69487015AAA314120CF1D2C23BA28CFB15F11C12ED21EC42D3E73
+80AF786BF3958C30AFC42553C77EDEDF143B6F05BFADB6089FB93B9BAD0EBB87
+8ABEA058ED232D3F24C48359BEB73EFEAFC4DC43C6A1C4ABD12FFEEF73CF2649
+84E08AA367F464A5E009D2BAC23CA90A1B3F8B463B7EB947A25C9294E188BCE5
+512207D22E67150459C694156A6AB56EFC0637C661E3ECCB5D5331BBC268284A
+8695461785F63473F18C9BE89D9447CE7EC2CB9AA325BB56A5C7FA6D03D9CBD7
+6520F3D07108DF20136AAE5C1D3B0BE03715C7660F767846D85548C3F6B5FB61
+19E0E43AA7FF6CC70789D3B646F0DE24AD23FF3ED668C6E7E25FF7130859A5F2
+3392D7F16549D755038CABCC821BEFA442C8079A33FBF042FCAE80AF0FBF8C96
+6E759BAF5913D55AFC923B065A752A6E47CDBC6DF8C5E3685D289220CF593255
+E509311E5D26BF43CC8B7BB2A519C274423089C5FAB6033E17625C953E9BE3B7
+FBFD85C879B64DAD56EFB9F0134E5714E8411249B0DED90B9AFAD6E40ACC3C32
+2FD398BD0AF07732302617909BA907AB22062EF8C849CED6C30A392BECF6383D
+E6A3FE99D6E928CDC000C08511327BA7A0AC713A78A3D515E07396AAB5147135
+86695C077F211101014466A2E7BD0151B3E752DE0D255EBE1D2D56C5D11F778D
+5FB60C8FD628814DA7F9A3B7F95CC77CDAD55477364A8306D2B28CD374926E57
+04887E6BBAAB59107A7B89C36BDB46E5704EA401C4DA6394D3AFC428F45465E8
+9D01140F4D783E3739AED22E0D871D5A4017D9684D2E55A47EE953FE22B75522
+6817F37D12A1EC0976441C94FF787EDFAB1E409FF9AD3201D73D24BE56C7CAE0
+43A73CCED4313542F4C1112C35141808CADC4DE6EC7E832A4AB4A580C4F26B90
+5B37051CD708D6B2D770364C04B7546244474FB9574E5ECE5427FBB29603F543
+3D41C97C021348F027DE6EB0A658750AAFA60737495FA80D6E1F61F1737FBD7B
+0007EE164DE9F5877DF68DD8CB10A8F06CDEC0EB86280B3EC29F9DBEB1B91357
+0A51B254E35A72593862247E85053B922581A1840399BB254403D721AF75E774
+70BA7AB160BD5C9CC6EC08DB9DEC937712328EE8811FC9C917B293575A6439C4
+8147D7586ADD5DC23C61D1511DE64AD1F5A93A4BE587A99DB617CC4472B1F984
+24D991FAEB3F6CC28A21ECE4DF9175CC0CF56EBE2D262D431D3E8E7A1D220FA7
+CB18F1493A97CE32DCE1D95149C5FF848ACD3B3B32C433064AC995006AA2B775
+5C4BCE15748227CB3673B7A09B5DCD00631F91CB0A157FF1710A9D56505CF964
+DC1901FBC364BB98385F009C20BB41F96CDCA2021E36C3EE59863D5298497915
+3BA4DA380C705B1D81E07187A3D4B4191E5F22116FCDD21A3EA286C53961ECE6
+BD7D029AC344E7A5A03823B6A13A763C946C41229697DB8EF67007A934F27F7E
+07BB63C5C5FD24CD241EE957F854450097D5E6E291812CFB9EAEE923711BB88E
+B74E472FB4112EDE27A893B34725C9DA28F91F4A91EBB54168E327C1F9AB7A80
+96FCDCD85BDAB9ED36DF209620395F539FC7184D88BA680389BA9CA51B9A5397
+BD0120BF40DE8B99D6205FECE2E509EDB0C39BD75F29D6D97E514C2E3683CFB8
+FCA479BD47C8E02DCA2AE350529A568F66A7733528CA14CFAF4E792F10A11C3E
+CEAA08A97CBD6D43CBB43CBFDC7FAF22E87EE9E008301D60083FB7002697B3BD
+EF38EB52049C00F157558B3A8BBE5361C82F049D4566A1466869FF2584F6DA99
+23AB74F19AFDC1B6CE4C4AF0299F6AB4E57AFD2EBE1AF260EAD4B46A79ECF3B1
+BEBA4B9154DC2390AE0061E48D002EEFBF44ED6BD59317E017C6E42B2D8283BD
+58B8DB392C511C12C72518A2B1C4D185E1D0E5068ED5F4C73E771A75F0BBEA45
+428E0D31C9083ACD4842EA136FB12094F786DE99956EC2EDE1BC9D3352E68CE3
+4CB3994988DD766F6DE69C5FA907DE7B338F22FB9377E20B7978E2B0BF39561A
+F526141AF262AB9C6853BC1A947D79F8A6930232F955C6C88484791460E7AF48
+B235E17AD4507948DCE6A29CEA6778893BA825CD9DB22F9BC36822EF4E98EFA0
+628F8190C1B4985DD9A11F2879AE248E2D4115CB01446379D9FA1820B39A4B39
+9B1FB8E33D9C22EED5CF125B37DF0B7A471A58E7CF6E516DBD5F54C609517F00
+D40B22BA5BD7D3EAD411D4373FE4BA22A93E2DCE3F7666B178BB881AB2138076
+87DC7077CB5EB50F0CCEDB1786E5AE3753C4023E9C6526A57EF2C833CFC36CF1
+C818DA36058631F2E7D76A8573ED0BBCF641034A35E3B7728BBDB3B8CC9B81BA
+71CA28E2FABB0714271E3CE86F5762B3975834692C390A3DDD31C7A609F3B850
+FC284EE819E6E6A4A8085A92155D502F95B9A5C7E5D02059D9D0B7D06F9D5ADF
+85091858CFE4C7131562507C64F8AC607AC9936C79C87DFDB9E6A4E2284A5BB7
+4F7BAB56A319EC9D70D184F789C5BBFCCF7B7C2B91C2581E8A5CA55C8EAC26F7
+CCB524EABCCDED72C187EBB1F6943A992E63C0D46206251BDC363362A7A37081
+9D58205CB308A33E290AED466DDF02B1FE375669B08B19376CE9DD152E0064DA
+EF925DA958D560D86FE710D798941601D996C655C553DF0AE6C0F3A18E54817F
+7B30DE1D156861C9529A281DFC897A4B4746FA7AB6A95461BCEE458DB6D05332
+677619D0BD96AAAFAB4EE63912B703029AB349AEB275AD79512DAA4D7212C101
+AE39F00CA8DE02F438686211D567EECE1E42FE13386314A94281F014440D59F2
+6E258D72363746144577C85BE389F65676AE3C3D19CD2CB8BCAA75969712B8F4
+7629698C52DC6001E32736214349690EF8E57A8BF50C9F56A4A0493FD66A919E
+9875835511AC63AEBEA6BD1753044BFFC98432A7EEC9E3AC68880974382B1EDA
+7E01A7FC78EBA3A38EE6BA20636CEAA56E3FE22FD60542433EE5CD688FF4018D
+307D893C2021D03C7F59C9F1387960FB843E1AFBE04A2F6F406C31CD5DB4B24C
+20739D6D74C7BC11B20382DDE8EBC1098E0B5521CBC13D346DED4E5C41701B96
+A8F8A382207C21582BEF7D04129B3AFBB97455EC964455C85B3C177C41675699
+77FA7D7C2E62EAD5C151965CF3B4184C3BFDAC859E1F096CB050BEEC459D7317
+A088DDD378A476D46F26C048BC4377CC1BC095F688B7B7CBD3971AC1F050714A
+35C81786288D82C54D86F5B00ACB50B0450A2EBB9DF94F0A7AB1B0DE394BDB53
+5C7BF36E6CFD410056591B94C351C1544BCCC77C06EF80A9D02026BE1D6B7889
+212859D0998B0B3E5DB66E75656D69D30104DC613DF83C7CB2C8F9D64646A7DE
+372AC87CE3394DDF99D86BD15EAF56B06593F04E47862141D81D66D83AA8806B
+47D3B43FBB79E806F9DF2288D9E6A2CDEA497B854C743DD4373017884177AEF0
+B44D4661C0989492EB7F9A5894AB8DDC93D21DA24338E7E12EF3314DF207911D
+B84D6CE001EDE032D12416286899FEA12724AB45497E4A0CB868E15FBC144CB5
+ACE3ABC1B5CB2BC13A220F93D9990DD9B4CA9726CA00DEAFBEFC2BA9EEC3D94D
+595582174CC45D726E8B961860CAB4C611DE70769926372F11492FE2D4693C05
+9AFECAD80BCCA589D7964DAB00C5E123933F6BF2331091E81E67F0DC0ECF1707
+0BB1C5E2DE5B1C88FADFAE9A6594B5EE9E9706466F750195D2D1539F7C80594B
+531DFD2DFC0BA2482D86F2C8C3EE068C3B8596742ED27AB960DDE361827398F1
+CECEE6F2C74F944383CF07C88BC80448AFB946C782FB232CC3FC17A93E7EF7BD
+3CE53C6EC2D3D25CF63A3CD27140B8D17CB74BDAA4BF2E76CB2AED491E9E1F70
+800B380CEE1A505E612E1BB47B07CA030F9E22C8E5B559AA42CBBA8C36E4A7B0
+6F1879675332B6EBAEE398CC34ED9E02770A3CE0560818B77EFC03B0DCD583FA
+CFA3251AA96C0193B195DE6B37E89F2279603E17036B3152A111C54D0BB8EA57
+32CC5E5EA68254075A7133AF0EEAA153ABDE61032E6B4DF6C057DBFCD5981449
+68F39B3B1FA9EADBD8CED34E625A23BE959347D92158FB083FD351BC4AB0961A
+2FDB383CC4AF0F4D841BE9EE98C60AFEDE729630E558D54477D47B41A63ADE7F
+BDEDED305CE9A874EB2CAA040DECA194FABDE66EB73F69DDC4B4542F035D26A5
+26ED690F92548CE93CBF174EF853217C93E25A68B7C6E47FDDE19627AEA88A5B
+5075A2EB5EBC4F291D8D47BF8B699B4B3617731ECD998002F003AC8F48B22EE6
+2326AB694E4D985154F4AB6F53E2023DF6A2705CB3C6E2122422A866AC481A30
+9B9DDCA04F7F5D3328AD58454FBFC63790F87C1947A987F740B02B8D19C62A7E
+AEA6F7F7C7D0B1EF9A4A04094891F1613D3485DF031D4016E52729F0AA3BCFF4
+A5AA7C714B957C6F20EA9DA162785C4F25C37C0EC00CECA092B74C9BB69B3CF4
+272D015F54E607FD3BEBEFF03973BC28EE73685E037CFAB19FB5000E16E05B41
+23DCE6A1B6C3C6426F675912DB1886B8FD8EF3FC186A4E8581267B5289BE404F
+1757296E1E0D67DCD01A0BA71E46824F962A5220BFEC6FADC5F3911B1F13829E
+41C92272767398BB235DBCC3C192136AFAF90729EE25933F761582FEECD8A2CE
+4EEEDD25A50F91DA79309E039FF2D1D8268ECEBAE56DC01E66CFA97039B96FCB
+7BC9B91B6349BC9866EAEBD1C3982F5AEA86D38C3690FEDC113DD71B5BAAC063
+72C28280BD462003F9B8BCF16B3221550552720741E85066694CA465044FA504
+2BF11776595CC01926639215CD1258F59C16514BAC7A0E0DFA9BC3E6465F7495
+882A0C8B8E37DF36F890A2C4760D38490C031B61231C3E2D8FF421C3E70F7F95
+82383BA66DA2890FB3B6001C69713E84587537C409674570DC75F041B3232416
+B0C3483A2A724ABDC5AFEC995C1F32722FB685388A162BEABD1EB092D1105EA8
+D7C03E271937FB18A65E259DCE716A5C0878A01ED4A275FEE7DBF6634F3F3BC1
+1364443A9AF6697EE9DEDFA9DD67FC0AC679498D8DB38816D3D51EFB75E9ADFF
+6715121DCF5B071661A9BE993CD9BB6E5549E528701702F13B5540AC1A01396D
+84BDACC73DA1B07CCA3D213AB57C4D8F1DA01AAAE6C92BF2A197CA39C992F855
+F2938A0C8B6B112FCA85829FC4EA35943B6CE0FDFB766308ECE21566A2E59A23
+449FB9BAD4CF2B6460FAF544FFD5A0304763B6D61D91CBC7BFB91D6FD3559F6B
+89C91F3AF46F9B14203D2813472065DE22D07D828FA2677C876652AC40AAF58E
+C1838D8A74D192964BC8127255EB00951148CD288E84F960867BC49FA2702E2F
+7C8023C3E86F10C63ABFEA6A328F1B9FE422488834E4295AF83BA1604D132A05
+6A68331BE2809C17345746B9341C97B014614B266090D5FC73CF8D2DC45E0F19
+EF046962391AD19DC55334C72E3C131B502A63A8025443F5DF795D0F2E99D749
+DB028C621902C64E72635E9A4CA28C86D59006A24A65A6BBDE8C54B8C433DF38
+9C93E3A0A3F21C223D300167C199FE2293BD5ABDD9F0B4CC092A6151BB6AD061
+D79F12F437EE38F6214A9C009BE720377AF0021AAF5783EA1511004B1238ECCE
+C75F2CF0032133C84981A7FE1241C65DB91D449618EDA8FFED39D3066B6BD0FB
+7DE0542C491202D694922F4FA4C4BF2AF72E4F74564F2AC3F54A9F72BF693675
+400F251F863683A1ACFD71981FADEEF3650B387ACA8846D7C57A84B5BF5AB913
+38A4BB4FBE788E9A856E366895E36329189BD5802F95DFE821C79B3B8841FBE1
+29DFEB3A465E36E1CED694425C1D700239DAA5723C916FAA77E91E781696C8C3
+E5A4571CEF70DBEC17C494ED46BC095486079ED8443BF0894B26C39D492C4802
+6CE5E89BA641066EE9993E5919207B12BECE4773591EF3B48EE224CF18843DCF
+3F346BBDF9DA3B8A85A86C0B8F498AC5D92146BF9C187AAF18E6CFF2420A1816
+57EE974186F63E5A161375A822C588E417746972BB1A31B0FD68B95EB128B7FB
+0CC33F2778C6236FF6B588B1A9D24BFE552BF848BFDC9C275F4E6FB1AF090EEF
+9483A7AF6A6D7D8C285F535669786F02F0AD230DD9594A351D72950E7633A28B
+ACF784F1E2CBD036EFDDC24E9DADD0C67F33D8F5C87E97404F718437D3F768D5
+DD9B9E81D81C0EA3445BACE76BF67DE5801FD0AF3AB7B0C40CA1412631DF8DB9
+34C640F23C28B0F44DBB92FD79C254F768ADFB59567D4341B339F9C9DE47D299
+3444A3E8A1392122F8FCF9B78FF2C2918A3FCD1D4D642BF89D2B12995735096D
+A4B65388D6D8E9500674ED399DB7A0E35F7A80DDE50841FFFC19BD7434320230
+4E3EB457EB7724138BD8A53FD10F5DA01176551136B004F4CB535BECC7C79B52
+1DFB022DC76DD3FC3DD114A6A42C89543196FB5B85B6F8B9C9D9EB55752F69CE
+2EA3C2230A67A15AE41C93D6904580A26CECAE69E12E7744CA7C1EB558A7F4AC
+4243014B5694363770DADDE68740C483F4740C97C861293B2C06D7577E63F5EA
+1B3373EA993C1C9BB452988A474D56D40D4B1181DCF2802B4822CF34B0FCB29D
+56255A7DF6BD8BA1477F786502F55A31467EA9011A71216B93BCA4032CBCF8D6
+73BFD93A21D8102E4CD8FE5B9039D7AEB01708BC4976A5CCE0C757138E433568
+1DF2E3A2CD93DC5D4A83C60011E7807F206E0C13AABCC4A2351BFCAF4AE66971
+75FAAC7162E84CC0515A448997A20878CD4092777668D3806FA0D28488478110
+CD37E011C61FA9F98F495DDBC5C43B6CCB794771A954FC694EE1CCDB92560F29
+C4EB9F2CB61543667B95173E1A36D50F448187D52AD351FE8635A95AD9461966
+AB6D6FAB28DAB949B79724912E910DD9B78703590C55144DA82BEB8775855C0F
+3C8985283167B473B3B2D495BB913B12EDFFA92889E5109C50244F3005DDBF89
+2583BE928EDE0102B0F7A40E4B0EBAC9DC01DE981BFAF286E04ABE3DAFC812F2
+D066DEEBCA2CEC8913338335D6297114655C844254175128C13B0831693ED51D
+C834E442ACBA7ED6A2B3887A19C58B113A7BBEC794A909A1B9053BDBCEFA2098
+218CFAD30A617246BDDE096F066A00BF81F8FA0551AF34D98F50A16FFB09533A
+E35D98AA6BBA9F845494FF985D83EA8B7888D9B058BA84F801BC9F78800F2CE0
+8FAE86FFC77A085603AE7002E4F6BE5D66DAFDCE2B355086B0FEF5A7E2A87316
+DA9D535BFD88B835C7CBC60220B6C546AF6F8DF890C9A582E47EA590307BB5E7
+A37299C66DA33CCFDCCE4E289E19A4DCD0ECE5CB3445EA37FE23053433FD502D
+6CB673425C5D9DB2B0AC5C56D6420AA9E7598381A4BC05733F6479F24A9DF669
+FA4C9CF602ADC5C4BEE77BB61D8A3260ED88823D20A9D779BE6DF977441BBA4E
+CE8E15F5AFA9ED9AD93737EB6BABB8B32379AD3BC714A6D1152AF18B4684ED18
+E46BFF0725B90A4886CF93FBD29246F9A79D7B41432F598B54602304E77DF101
+C414CADAD6D520FC84406FF20622E60B45B7BB3E353BDB5D4AA824CE42128847
+C11BB4DCE8A8A0EF76035908D50386546E45A1548124FC24607C397EF14C6ABF
+9994ADBE0C74129E63E76BC5BAA44BB4F42B875AE8D756BB8FE5153ADE5244FC
+784CB936E7C2FA1FD6E6300E423A4238DB8D658E8F1B17C39F5A1A33C7F44330
+7FFEAC4C1F9B8CED5308BC43E4C128FD8457B89BDC493B9C68DAF7E76B3DB809
+F6D3152B676DC1A1E103C465F33F087BCCB64583733E3773F7D6D4C994BFDB59
+0F7BC03897EB3CCF914C1FA400CA14CD5294B779B7BAED650CB2C8D486718876
+07B60CC3D111FB8E5DA6DADB3951595CF9EFE458EE412082A35EB390C9AEE0E5
+237811A13BCC85F07A245EA22650BDC4A9E8DA0575AB3269A4E40034013BD348
+44424AC74B1F6628A16533D8DB6D14DFF72E1845416611D45CE2BCCE3F34B1FF
+86BC076132556E6C65F2248E073825D2B2D0E3DB91EEEF5D33B12B0ADAA304A6
+6291DC109F87E7A92335767B3C711F92F105B0B6AD525A6F8F72FE2644F1E180
+4578CC1C66D4720DDBED3CF91F1A46A96F5619A6D762E012053D14A26A88D6AE
+87E37882423056FFB32531C99F2CA89175FBD95EC4A9E678B440D82DD77F9C5D
+4B6D97D1BF7B2E24038BF1BF4B8327091EE59491D91DA01D8756B6F83C28F203
+572983E6CDC9C1D5C865B753D9B8820A39858C389CBFA4DAB82E2D35B6C5B332
+66A239F5BA78A4EED07507D2FC075C65DDC391B1A93A051F559C832CF36324B8
+B7909C130D20CBAD9EA9FD1ACD079D7B95401F72A950D81760DBF8895876FBF8
+018587D37FA6ACEF2593364C21F8BDC34A27392145EB2F63ABA3771402316E6A
+2A30C48B7EA2096BF6E53DAD2C47CBBBA646816DD1E6EAF631F42B108BB2FC5D
+BB808F1BC7A8D3501B2464F8BA83303AF8C43028368E6C814541E17717B397F8
+72034E115CE0AC6EB5983237CE8F604A9549373BDD938187A39F6418A8461705
+A6ED43F775595C7A756D9BC1501A440E6E4ED43B01DE23A206A654E2FEB4A2A6
+4A2DEA86708FA9CF218CF933DBD13044E82A7CE60182F6BA33519BFFF275C2F1
+6B6692E841CE26752200DF632FEA9C93BFE0267D4D5A99566C1AA78DFE8FC63B
+2917E6DB430CEC52D19DF490FA7015D9796282C3FC78F9CB2F2D1CA2A1302CA0
+C6A066ABEA6C871D69B5E5EDC514260193C6C29C8D308AC4A6D38C962FB7FC67
+EA268A9395414F7E8DCEEF611D1AD784E9D56A4F71E13FC7B697408C1924AB70
+A62BBC66F38ECEFD60BDDDDF85F849BA956C3F3BAE422F9DA0946100221556D8
+404BA4327E9ADF31B4AA708541C46717385C3F57C3D7220C59AB272AA94C4F1B
+62136AFF190C4AE70F287D2336991886EB3F14D2F2CF9451CB55C162F494A261
+1A88690D9308B80A3BFC92EB48FACC0C7975FA1F262D81359C88BFA3B5F91461
+EDF3E9A7764304AD3EA1B51DF695C915530389C7DB27FDF73D37CFA666E6CA37
+389BB54CEEA60324D68423B33B2A03BC00E7C890FE1A276A3741C4E133802C69
+8BC3692FDD7B0F837AA060A0C08F8A77976E0C5695D16CBB07AA95E8E4355831
+5B43B8C5F9D351826A537FBE9B5F89DF32DE754A3763A75CF5DDFC60258C044E
+B4AFDA88104390CC2894EEF40DBD766A481C5428592FE68A6530F1E063F013C4
+950A3A30D2F352B6E547EFD81AF86ED43E0BDEB8A0B5B7F61DABC796A21F3990
+94EC45D1E229776B9357F339F6148EDC74A2DB064745749A936E1028C8BED9E5
+5EEC197EC2F23457A690F377A544648A9F151917046F34B672C00C2CA89CB8E3
+26AE54ABE1ABE6C6C697E08B90DDC90F54E32C0982299BAE9A7753C07755A6FC
+CD5F7FAF5BBFB9B93032E1C176E568CBF93303F38BE9D78846AA1384A047E530
+E7497DAA12D294DCCB1747411A94EED2F231C5ECB8E8A43851F4840066C25E51
+EAD18EA9A3199BE80429EF8298BF6D473F1407777D857075A3CD41AC7E62060C
+54F97F65A8EF5CE6FEBCAAA7223E2FA0C6A2C86AE5D82B0C80A20F16BB8768DD
+E778337122FB7DF527B0E9AA47BD792C2484784C8731895528A30F7D1B7429E7
+3AD1E59232438BEBA5D065C8C4FF2E6B0A84233EC5BCB2E2FBD7031F1B74AFE9
+E4301B662DE9B6E27F62BDEEEC1A7C73ED4CC8E4191A473728CC5A0A35D2F3C1
+0F743792A11663F871FDA8582F7EE0B7C4C2CEA0AE1AC74A73314469903488BB
+DCF92439A3AEFCF1621488D7BD8BB25318D7196D459EA3ABA44546B649BA0CC1
+9E29B9586D948282EB1D8DB89E4CFD6DFC16A005922A7BFE071819D8CBE15F41
+06217264D10450784FED734EC809C68AC760007A333E4132DA48201C02590D40
+BFC91E614F145502C9B27DD7950C46E6B25D4470CE79CB2DA192336726253512
+CAE6D87ADB60EF451A507CFEA57914F241A8C81DFC8AF788963F2E2EC722F81F
+B2E1D28C07CA64D5E9EBE8722707CD91021DD64EF2700953D590A62AD8AFCC85
+30420DEBCD42A684B5C527BC149DDC14C4FFE9B350DB04B850245A1650E749B1
+B0C094644AD43AD83087930CCA240ADDC2975E05397807DBAB4AF30E6CB15F7D
+014771BEADB55CA911E29A38D7D2DB1614DCC0FF899BBE9FAAD2513C27BB74BC
+A225AEFD85DEF96AFA64F89405572FC5C3A40BB24160D7F274ADC4DBB260EB87
+BCE6390588627BAD6B640100D58212467736FCA465A4EF71821C6D765F3FFE41
+A030BAED3FD7DE667BA4479D5316588484F6317B88B6E91018F3202E8625B837
+49A64AAA69B7B00FE37413D1E632B6404167A439F9F2140975891FECDAE0652A
+1FD5FFF18973750883207300E4CFAB59DD7C7394F173D0DF78DA3516B44B4D03
+C6761A6CC49608F0CBDFBD46FBE6FC6E7BC9558F281A8FE32C5AF888F3241AA4
+BDA43506A22A091D67934D138642141EA39CF627A6A2A5520634A9DD05F09165
+C03C0A3CBEE624E4F59BBD2201BD2CE1981F46C53B6F2D91AD7839579FE7E7B9
+A29DF2BD08EB5A218066E77877915B6E1AE372100DA1BB9B8D0B229DE48ECC9A
+5404AC224521D9F648DA7E1C1102CD514F4A4F8F8AF5E90BF78A9E2D90C93248
+D39A5560AA0BA4035EC7B45EF7015A9A97E6A0104194E6748C11C5DEE3FA7431
+267CB641D551529E89571B9D701D1FEAA4F1ED1BF17FB532EE6B6EEAEFBB6764
+4CC55E7C8CCC63C7E4B93C9D0BADDE09B1EC8F31477D636F4C2CCA1A817ED12D
+7E2A904EA8888C20333019E235870FFC51A17504DC9AF8ED6B6A462B7D3AA186
+CE76A233003D7A5AE162B64BF90AD0B784E1581E5AC17CF6EA2746B4240D05B6
+FC2D4E068ED743E4CFF9ABFCF73D66F2671978C6E8B440B08F0C18514039EFEA
+02A14A8839A203C3A921015B5DA8EB9688632EF87CF933F558E466FCA150DB2A
+494F6697334380AEAADE71CF8C532CBCBF70172341A0AF65CAA5D39907AB6DB6
+061948AC7487B667FD546F155E09D50252E2B24C7EBE334527851C8D5164D66A
+56C0502EFA0884BDE703668BB25449D1AC862C15D434087CC14AB94788C34ED0
+2390D067D9D13D4D6E7B551B1B3D494C77F4B9576213835A221ED022FA6E3D0A
+F44A85CBFD09D8E6D68B43BAE4CC2325DD56CB01A93B84FA68336ED8B2CE9473
+4EA7715DF92EA71C434759638A29738C84C814E13D858D0E23645C8FEB660603
+93EB19647F84B481CC71018766552BA16BDA1A94943EA464E99A0230B67E92B9
+4BB6DA4AF80D8C812DFA55CBFF4AE00E2EC16BA3114FE8D39EF537B4A982D893
+7B25BF1366C271B509E1C16E9632A9A64A2BBE64474D9500E94C21D2C0CF9258
+FAE9F7BA3259EB2E279995C2C7802CCB2C3E946B011043A4D7D2067EE56B77B4
+213289CF677C8F7572C95F2A03A6B7EBC64D99BFCC0615963F33B07FDBA894EC
+D1F17EDF503D5BF1E5646E2C7995FB3F15168A518AAA7FD3FD05B21EA5292E95
+BF48F0BF9F41820FEDF9F5DF7BA4C396E4C71DAAD3F209CE8EBBCF5F053504ED
+407FAD8BE9CD2EC265524575069CD2820E516D133AFA55CF42B3332BF53DC45A
+ECBFC8F42F9A34E5663A6694E48B4EE0C5FCECAA33E19A125FA8831BAB9952F3
+51020BF0C27F175DE97ACC64C74929701567E6CD99A0A9F4EEC88509E2B2E93E
+16BE159A8AFA0121AFAD45675FDDE7F795CC8EF9D41202CD38B148090FFB520E
+530C701D3CC82A19E587BBB5CCA1EEAE2687486E1AF28A20E1C4C959F14868F0
+B411134AD1EBBD9CCAE1B708772CEF727D92FD864712B96F6B295849968F484B
+3DB20337EB5386325B127115487425A5D474766075BA04259A6CC75B34D43529
+F41E37D69BCB9A80F8F9B8C4EB2E65CBDF1EFB70844639F347DC5BE018657FBC
+F34908D7D2A25766F1EB5209DF5CB00709321B02E05C48E0363F0E778E0864EE
+E65A17394FD73435E9F4523FB580DE5333B4EC4E5CB09F53504CEC5289B18B94
+76B8166EB1AA30A0512A56B675C4E9EAEE695D82B2D770DF175CAE19AB19E0E6
+E195CBDAC59C6559CA9C3620632C0CE3A380B6545D58486080AA54FBC5C4A8FF
+AE0D6BE9F96C8E489C0E06224FF96E35F16B94EEAD8368D470E5100A0A731B69
+DBD7735712DD3D882420941F5EBEEBFABC28C3086CB238DCB99C0DA005FA85BF
+4E5BD9578C0CF27395D29A94FD27584FD96F0ED37169D85D8B85F5BCB5ED8E9F
+329D4D1A337BF1EE62628A3D3B81C759AFF5F6DDA0D8742044AA18B93E32665D
+80E3DE0D2332FFC076A76F5535592D2ED1AFD60805D10798E03E8E65C17DB19C
+425904FF83587A0200B406D3BD3965844289270ABE86A5D7A9BAAD43CB1AA363
+ED87682CBF19B2ABCF8E4C9AA701017F06A4346DCF7A000E40A00BA37AE5601C
+AFE7D8E529259D1F57D7B00FCF5F246C902E920AED62751D94FA41FB9EFD25DB
+A86F9B85B634562E96B8EF8CA5F5B77FC1CD168EACE9B19CE7D56CD99CE70197
+D80A2508F3F31A5BA5A8AA8F7B833C2481BB9A6CD8826475814F0B74740CD443
+83C3F266BAE4BA683636FA0BFFC57D71F8D13F91F33D368810BFFF77D9710902
+BFD32D9DD2E94C1C06026B3BFBA5F8A71518CFA31220FD245868729B88390774
+EE063923474CE8D18C2D34AA77F9EA37A92F7530DA0F67A05B2C11C3D9942AF4
+386DE7FA1BC11F0028D5EFE8A3474A5ACA8C1744BBD24EEBAC3BF7EFC12DABD1
+C4DB771E7617D4F5C4B759E84F40426E8AEE3BE6E334A378A3C56319FE296114
+047945896F2B8F8F925F86CD4755CAEDB75017A9729187C1941AC6A9725DD547
+197F636F0025E63FDC74ADCFAF0ABCD64DA1F7512442EA2D2E88726BFBBCA2FC
+AEF3D4B56DB882F20ADE74063FD0AEEBF62AFA179E5AFCAA443663B3E8594DA5
+F4C4454B08C461F85142AEAE2BD3FF04F9A89C9E2C9519A856C2C32558EE6A1E
+63D565CB3746C9FB6C9BF7494099ED1BABAFAA9069BEE833D13F3ADA35B1605D
+2368303ABA5179DE23EDD6E2610BA46BE4B3CFBED8D80A0B8FCB27F93287D3A2
+33B9C13577AAB8B77BE80C0466255A693FEA8F2D0FC2DC6951F6431DE0F8FEB6
+659C8E985D3E02378DAFC9DAFDEEF0012FCB5ECAF17AAB951E0C6D213724B6C4
+E5AC05B554F814499271F37A4A0924D4AFC9960045C7E4D7546FA355016D5C2A
+74B78E6F4B92BD1A45D430EEF88DC034CB01905E0C26460D401F44772C260759
+8A716908FEBDF9EC4DDA187960DFD111B73587D5B8E84014560A14FE1B46C152
+DBB6B7EE966712F3E8F27DAA9C758355ABBE19F067F140B522DF95ECB66264CE
+B2F6B7A1DC8B3CE934F8E8B005DAB5D9CE71ACBEBE51FAE0E689429B3C0048B4
+9DCD4C933F249085B0EC1281A3754456CF4224329151DD2CD391D35ACECCF6EE
+B03741D088A36B09AC5100A068F58D71E71050DB62D8029AAE834DBEDDC3C012
+C70D090A3A4F1A77797E73B93779928B824A882974004C16981AEF1FCF6DC7AD
+34E68B09E69063B253447D6F461D0FD38C91EDDB5496040787C62161643B0B8A
+B40873BD924BD5C3EFDE93964392B2503F5229F91C5B6BEBF6B977FD1DCB5EFC
+EE8AF1CAAFA81EA2DC1B77D565C69001DD20295D5C4576F6EF44CBFB13601118
+F55B5763EDDF93C0994720CC32BD01AB5D50CEEC5C3E762F8E60311D2487D143
+940802637DAAE0CC3B892E566BAD6DEAE8A9006D71233C4A1C9E96ACD5EB7056
+DBE34D18C2EEEDFD73C771301B9C2EBF0DDCF269E05464790E36A6C124634374
+CE6B8F5D046497C80FB2F4390AEC41026B593693A6FF9E7196192FAACB98CA5F
+BF6F7A10F8C78C07030D3BCBF0DB0CAC4981CF3550077183EA1F6C6C093F3A3D
+49215A00FD60254AAE82C26AC7E2B74405CEC4EFC19E5C84595E88817AFD9E5A
+B3D21F906F757F037252337BB6552DE24B4ED3665E588CC9C3E916CA1E2DD333
+85DBF273ADB790E1087E8D4994CC038D4F5C203539D1F5B72FD4B2396E175102
+82E544BE1AAF2045777071CB4D0CB8B7999FC2DABC172CB5200D01EE76D90C85
+F5BD6801F07E825D94FE5689C2CBB18727B84C0793F168D0EF39EFA0CE317D63
+AAD99D61D9A953A60FCD905AAC01232ACAC04D0F164E59FB59445F4E9C9206C4
+22BCA0F75FB6EEBB3AC6DD055D4751D6F93424E030CEF9ABC9E9C4792AF2A3DA
+1F1D98FE0971C2B6B828004A58FBB2B4808C8BE492F636B13660839C5B6F9B94
+6457A0DB83D0FC4F05A993F6F70FC1ED418F6279DD339790006EC4CA34B34011
+8F4F922033AD1A70D2A3CDE0BDD6A0C0F48ED3BB61727EA6FE093E393C8E1A7E
+D4B58BAEDB50B5395BA7D95D8921A98FE44F6D2DA73259560D815C82E435325B
+D633FB6161FC6F82B0EBDFEF76337EF416952A7AB4FA74090DB78F02DAE15CBF
+A40AF9D8BC81C164C581302E70040581314E8FAD7E0EFCAD384D8A7D21A18C6B
+ACEB44932A14F6E5D05CEEF88068FBB44D81F2149ED7C294C583B3A32AB289B1
+C660E734972BB390708A87829D527A1C9608A16F6FEC6BDE309CD440A0197C79
+7682FDDECAD867C49BA02A0CA7652FED17F411F5DBCC61A910C094DD249FBB90
+8D477DC7F10C7D03157D0C2822CD3F3F7353A7FF200F0C20C04A395D66111E6E
+A6EF63B509624BBE57A17B0AF22E67F33E32FDC20D24906A5D1A698A675041ED
+76EA377C33CE7530C501F1161DE10A006ABADD053F635408C51E91E089A83242
+B55AE77E0C10F6F11B53AFA57A14B7F23BE611EAF1C8C3981AD7261A7AE81F0E
+D62976181C4512FDD4A397E375D37E2A127AA5B2856C82AB99D770623F36EF3E
+DFA5B73D2F8C134DDA82FAD11F791B3CE3455AF3E4CADA2977F240740D1CEE12
+5E60A4A290A8185645D0F49D05E5A59909EEF7C87D87209468CA51C352845C08
+77B816FEA743C2BF5296DECEDB5569EB87CBBED1E2BDB382C35ED191D451CAAC
+7F93A34A219E6752E5ECD3F2CE819CE9D46E5509AE8B5F18D85CE2AB87273C7E
+E067165BF75291EF6E744D6F5C7D199AC1758F2FBE9556CF9ED6245A2A9EE591
+E78257E36BDFF553B6E7CE515732C152A436EE59E219FFFD4D0CF148A5919AA8
+9986C04CCBC5D91B180529575BCADB7E34F94E2E1528C7A6B602D4418FDF1265
+9CABAF85FDC831CFCBD1449C8CD48E98DEFAF3BF8DDEBA899CEAC532E30F6D36
+B891F0AC6D74393034D49BA5F96EDB94ED8E1F10EDF985EF757BDEB967959038
+C18C05EBD2F27D6E47F4FB9602679AFA54E5F2810D69DAACF96DB0F277B8CAD9
+6C0E19D9396F94B1025C4DBF871C99D579C9DDD4DEEBC28A01661013CAF907A3
+4FBD2F019EA42FC201957DE80C7240B799FE4B199ADDD3C8078BF40E5F052CEC
+01B7D3993E2E61B89DA8E539A09508576574CE014B530D13EF43FC8FFF1EDF3D
+BDD344511B2486FA2D4DBEA3D6E57796A6788F396939748A957E51F01BCBCFD2
+DF91CA7FE81A054BB15C1D3E3A1062ACEC7EA6E4089913BEE42E1491DDAB0BEB
+1E77A608F72A5D43C10F6B022695448C76BDCA33076A02E5AD60C7C247D2C3DE
+85C878805D882F452B782B3D21BFBE54CE2961759F8D71C17F0C952F8D38AD4E
+6B6AD1F498A64FA52524E62F37ABAD12E6D5F7649DD796E031BBD951973DA19D
+C6DF66F38F0B06783B4DC6DBC15CC689D80C3822D5C3DAE96FABF9C0DAC880A3
+6F38992EF13D0C3AC162C9AB38EF2B8A4F176D8AD645E982CACEEFD28947BC07
+BB233FD9ABC9F4AF612F691F4A52BA5BD67659B8DF5D68894CD3DAE4C724B238
+8314DE16D901F3B63D8D11FC1BED822294527CEC6F31DCA780031F485A906311
+9D81A365928EA38CAEBE7C450BBA19FDD76AE8CD81A1CC6E38312957776A2ED8
+CF258CCAFE221200A03F07627ACF8B979F361C0A160E1E5635D0E30BE18EAC55
+DEE7A21FD8F9B6A53333C8F94DC6C1A1F4DF0518116402255CD84CC302991A20
+789689C51E8FFF3D868C73E1FB042C30C1EF54FDA77E03F04B12781C572DC4C7
+8D60E506C6FFB6422AC0DA6CFB438D0B5687A1FB63C9A96267630CADA9338EAF
+B0F4433F014A7D37840496D8F9AA0188F558D87CDCAEF0A7F89F7400AB143F3A
+7268A871FBD6010CBCADB1ADEE40104D9BB6DABACC4A7F45F155A352F10C8057
+B025F9435A77DD3BCC4C131B3DFAB32706A46A9ABFAC3E5C30CAD28F3F9D1ADE
+4060EBC1F26BB60CFFCB06AB4F752EBE4D00898E99ABC6A77BD31E0C74E34F2D
+268555785724E80B9CCC165673D2F4306045720CA41C606E9C33611C8DC681DD
+0E8AF0E4BF73D39374BD5D36E1E2A95929647FC82583BD962DD149258510DC76
+6F03DBCC2E142EC8344964C303AC4EDCF7C1821623A24A1DC88AC09B60E1970A
+312EEA27B9850401C1FDFCAF3A9BABE622C52268ED778475173E1BA15CC5FD07
+C1CFE4084A5C1374FBB7ADED6B89AC09E9FD125FE728CBBE52BEA25B2B0E0E76
+A4BFC50EE334241924F6A9750731736139FCCC3BBFD99875E2091AA8F9F33109
+7640F7A0CDB5B1783FA24E5C5434D732318A5114BF0080649C1B5CB4A06122E8
+F592101C09864AC1FA6F9DC9DE816B1D6D7785A6422AD5A5CF997E2A5B683CF2
+BFD6B12AECCA317236D4DE5B8E11AB4E0C0A40ED4D7F2F29D9D5D6F97C79A6C4
+3B626C4B917E2E2144D7A9F043B8180E45B433838BF44F86ABF22E29E50C1551
+36D56E3D89ACEC791CB407A7959F66A0272FEF1FF4ED642EBD735CD954FE2C01
+F0DBA979E80EED581BB0E1E643FDB205C86E89C19A149F4F978460C716F38749
+0027EBC1437B8B37FD4F9D7BE0720437E61747D2F16742076773041403D85212
+294402ACDCD82923E24860E0F807FB0D32298F5FE9076E6F07BA9BB380F53F3B
+39288A33519FEFCD75F540B597324FA43FE1A8DEE64A756587419F319B8C6F1B
+A2F29F17750953CC9DB864DE2CF3B5164C093769F6FDCABAE1F6D9616D8EDA82
+DE6BA7F8D24B227FC4AC0169F80D0B2B1B7BCEE7ECCEE7475E7201164C8B45F5
+31FBD954BB31D060E6E32BDDD035DBDDB5ED89FA955911D8B747AEAEA01327AE
+3C2D04BE4DE78B313C4414BDE5F06FC0AE5ECA638911F691A1FC86FD8BAC3956
+C1553875B45A80098F377AB2DDC3549514ED658A557BDB939AB6FB2479F98BF1
+8157AF4D86883A19E9512F87AEE0411C1B08BAF29549F663AD5476C50C96FB5A
+356C85B2C52995EBAEAAB8096D21EB470713A567B58D680A37E4DDC3C1A52BED
+E01ED7897410EF6334A75217FCA97ED5E299C5FCCAB0F92584FA37A1EF03C7B3
+A2E5A3A278F3ECD40695E55F6072058BE81ADA6E096276E250AC662BCD562763
+863C4E7A7B357FF231E5467E76394FC47B591BBAF322FF9A94B2C3F2975C08C4
+881CDC4D7035E2385615B35556035791A00758F33582153874B3E6B05BAB6D2D
+659351CAB34569B8025C7C51F915E30AF7EF8D48F3D42411AC8261AC04216FE6
+B543790196A571B4D28EF60339BB05BDF3208B8F9D1BE9E50F9EBAD04DFCE8C3
+8A39ACD81C40EB4059A9FAAE9B422536D090A4E2F757D3BBD8AD6536F000AADA
+EBDC6AF9115E067ABB4269791C40A0C8EA696E851867186DEECDE350E0121003
+60563C43AFAC8315BC7D87DC949D09CC36FB081715E959FC914E931D80D846EC
+44C3178C212B132BA2E64043963AD0C20D56175D57D4FD4BCCD30D7944E613A7
+BB863764A6AF5EBCE17C1179D60EB17B9C4E61ED6DE2C7CCCDB6C4493C8CF326
+A53E07C83A01726A19EEFF88D46EAE48FD5FEA1024D229BBE7B48332DA245FCE
+F2C1CF78F1D92218BC6967ED2DF365E6F47FBB2BC8E9AA0014155348BDF54A91
+471FD23B5F75C270BD3F654F3815C43C4860AB4B8984829B238C614D7CD7EB6E
+6ABAEB392C23196AA2ACEC2331FCF813AC4D6B5A076E6D6F5C98454C78135384
+2DE08F8E66A983B76B526C42C243CF15852CBAB77BB11A7EB644590254C939F5
+CD4FA3151B7E12483C75DCEE22A88D9A1F1E0F53E2579116D3FD82F6A55BFB92
+17E173A2D9A3FA4CD85ECBF1C088D45473630EDDFC84E94C36041E06D68D0184
+DCC03474698ED646CF7C636B2181CF5BD89C8E939AFD0B11A233A1CF2A7320F0
+D8937D68D03579E5C8CACDE90D37123944D7247E4C4440E4D29A1872928D87D7
+6A10AE04ED4053FD0A11DD5F588C4147E3809D071305A3CA695E181948CDA1F5
+A30F95AAD47D95138683452EA8A9867EA220E9597CA78B2F8CA09ECB43E9AF65
+2590E87F1A24AC721A9CA3AA88F0FE23A2263E279DAD980D7E752BFBDD172BBD
+162741DF269EBBCABBF7575BB7C9E7B42777DF8F464D85245A5EAFE6E3D10C27
+0FF95542793833E95C8089F4025A8BA1E5E884541F0B33065F93BF1D30FEF287
+D7C73908A027CE521B7D6ED4DC2E77619854E10451D4ECADE3BC7AECB72AE698
+4E4CA0ACEA0836F87CA309901C67ABBC6115110F2B8C7433C4A248052317B283
+DDC1238D40E3D00E4D236112319F872BA3288AAC2BFE2B4C723C0C3239B7F95E
+626EDBD4EC068FFDABC261E02A8A0D216D5686B005E243C95360865605316BCC
+1A2EE56693C7B54DF2E68E6288C0DEE652E76F3D16791EFE6B7FCD744384311D
+31527E20E4E736996C67331CF78A08ECAB6B5A720FA6B8C8FD80314C4793502C
+9EDA72FFE0F66F303E84495B00DFD9F8F1748311571A52A1D965EED5B0DD1CB6
+003B902E1FACD61472980C40DAAD23C7D35D0CB00BB80025467A421E36E3FB35
+DA936476C87ED2BDA7F9681BF7050BD883DE8D9798D3F680CF983941FDFA3129
+18D0054964095C068B7A2E520ABC3B88F079A90AEFF5441256CC06D169A6AD8D
+84D8D55E99DF4D756771B9EED972ED8A5B858B429216ECF433D4C9901B0AA14B
+A55DDF1592764567D919988F21BCAC5F6E2823C374BD6150410F5AE77C3CED4D
+5AE61BF4BABC795EAA2816FF42966CB2FFB2BD2CEEC59930FBEC3731C5BDA5AD
+32B4A19586248AD9D3422D987321135DD57FB8939EE3D3AA7309FAA01F2474B3
+52722950F1216BE421C280C1CE4F5B6F2931E0D723E8908FE53A955EF5D6A6E9
+4188AE3DB1FC8E98E1946B882F27A4D6D46442DF31221659824FD9A68340452E
+2AE390724AF5B78868FD734D7812FAE570EC1254C509153DA4A58AF3B6918F0D
+CD439CE41A00234EBDC94B9438C2D541657DC3F840F485B2687BBECAF841C0B6
+C8418D6B0A342FF41CE90BAD8F8BADA85BB5EA094DFCA987AE5269C651A1C4FB
+853F5514439C159CF16CAA9FE135AD70E5CB37D76EAFFA880E8B0B860DCF2DC5
+AE4A04FF5C9F3A4188E992DD1C25BC8ED3011D4E2E1A185147DD98127B37330E
+DD0091373135082BE8B0AEF51C75BFEF9261D6FEF8B61179CE5DC17D12F1D202
+437E5B60EE9B2189464BA21E4A1F44D82A97242B74B6BDDC0144B44736C20B14
+238F49E81C75FF6585ED339D47FA62D94B6AD30E803BA4BEE3E75B255B2C0FCA
+CB72A26D596C70A43C5DC401761FA38BAF249F2B9862A26045C122E4D27C08B9
+1E476E46428080D75CDA97A6FD21CC573F9B20FCDF26D6EF973000928FB4EF6A
+2899B87F867C5E588BEEE781E24B670351192E4C479A66DAD5176AA8287CD1B2
+C5E81EF0C515AFCCDDB657FE0B2132C0910954045BA122A58025E616C1B90BEE
+3C46C5D48DDD251B4E545271E4BC8133BAE3F601038D5C794EF7710CF561B19F
+64426B0789FE6F8A3ACDACF5628E10A1114B447C03E201958404F76ED151258A
+1A2FF8B5702C702C01F89DC17F7BF02BBBA8F78DFF03078C892285CA880A0EC4
+D27AA9331C674E04D085508D69B448D1B54298133A680CD67BCB80C334BDDB56
+1904CD441027BEF374ADA8D824F54473B7A090BA6318728E077A84989A4A4C91
+E8E648B51A68A39E16E4A2C5FA61AFD63556158F9DE92107B5ED054E240048A9
+FED04273519548C6773755222059259601C960A8D06AD11AE943D678BBE344B4
+C05CE0EACF18130D7470BEC987BEEF661DB3B5360B822D898EF70E5320E2D8FC
+7D1E8B8C4496F2166F30D5D8C607F52FD5F12349593788B09CD9A0F3ECD80683
+956EB208E3B8E1FF7530EF6FFC96701E7FEA61D8765C7D3F1212416166DDBEDD
+78DA095B29636A9AE2F854BDEBACBEC7AE41CBDFA15DB3704C46122EDA7F4170
+C26A5F3F26ED74E21A50679B40CC077E2EFBC78F3ECE60727283EEAE9F0C7396
+F318863C392AAAB0A24473B0801AC7ED69DDE14DB1462E4F988CD6143E9BA70F
+C2BA50189A83AB577373E2DED9DFAAEBB2494C738B006C40FD81209C09C5D25F
+65B94F71E4B12630C2651431F32C7B3D9681FE19089221A15ABD6701A2B9D345
+11915E70E6C18E0AA0C1587F4DFCB904A75CA357C34155CA5C712CF5BAEFC795
+0F95D60D91714ACF79756DF293D5E0557BD076DB63954B714D498E8244195173
+0F59833143EC98BAA06579E7E3015EEC4E40BD440211563971328DDCDC3537A2
+EF85F45EBC83E00B7EAA3272C16341E58E82BB3560E9318B512A5CE362FA098E
+30FE2696E03B63B47B9D06A1FE63E336DC7B7FBA04422CE1EE9BCE3EF55FBB09
+4476FAF98151B50828F2E894D83F0A28EB417622AD150C5800671E32326CFBF9
+C7718D18D9E787C0670CFA112671D93A6B1F7BC1DF303A6E40C0A2F409917E91
+4212953AA6E5C67F3C4EB25E1B71A096414CE4C3455EE9A596A52473964E02FF
+280A5037244294582F7700C06C5CB5E36CB4C4197DCAE062ABF1FB454E9FB4B7
+8205B1E7EAA27F177FBA6D621B8B75DC81594DA014B3864F4B1DC3E1C3FC1FF7
+F1528F63975D949E5A64479F408B24DD7A46DE3946A51EDFC4AAB046CD2E17C2
+130502B2636A631844D6E659BDF0CF6B180035F01F710F91F1573FEEBF8BB630
+506EFCA96CC5DD19AAE89054E3F29F964E7C6CC48CA3D98590C3C637B4F98FEE
+BD75D9141D40DBDDFE318BD5D6BF6EC9A95305A959C34ADF2D9DDAC6FC6A515E
+0B23416C1A7FEBFF8BADA0F36FB7E61342A8658E15CC052A94494F60844BB93E
+6173C2CD93CEAAD8CAA61F53E70554AAA173868FBDBB7EF226F862C9EC437A48
+853C4F4D9C95F1A5FC1F6B25CED0DC33F616A04AE68BB9C0E869DE7B5A70F781
+E2991EFCE385076FF7ED839E55958D9A687E50ED4D4868B3BF5D92BE8F225F8B
+E0DB1AAA3ACB072A1040A66BC457187648E7B668577DAFF15B3C2A71A5FC8786
+5DD8F0B26C0B51B3861B394E31C831107E9DAF2A5B4E54DE859E9D75FCAA59BC
+F9DE63491362749EE6048766F2D4E1CA725A1194DD4E53BD0D42E0358930C81A
+AD02BCDFACB892D098A345D9FFA8EF971AF3FB0F41FDFA41D9BD847A6303E83B
+14B340D14E711CDAE7D42FC7A66A7FFB6DCE8554F607429010E81AFB8A970F34
+D5E1BB28DF0D6B23EDA7370BDE6A30B91E9F87E47663F89D83DB820895552B4F
+2B9552C8069D460ABC93DFC88A6BA2495308089BD374207A3DC3A620099FFF24
+9B6A819B6C9063C17C4B37E875A144415E8457E422D1DEDEC11527132A8039BE
+C5331ED90CB75732186BC48E8A393DC0AB95A14E84909B8FFF82AC15026D9AE1
+F4D644425E1A4919996E28567CC083AB66E7A1BD2775601C475D4791082AF0D6
+BFF7C28332439B20C50D9227459FFFF3F8A4739175E0D069B6EDB24E45A86D16
+13FBA0DA2C89AB468C17D2AFCE9BB04C4784C1BF76E61F7E934DA7CF4AF3BA24
+8E5CA0D0E393A59AA84FFD072123220D0523D68B3D177AA7B9055B9D08F2DE06
+5B466DA58A134276FD0EADDEBD6D594D62DF588EA65A2330413F7B143C3488E3
+73FF170DFDFB4878E0E8AB55CDEFD1A70873C56B28742A10FB55EB6ADED70A30
+12396A6BB42062A4713E72C4742B2A879A9ED91BEDBFE68DC1A934B2A1DEDC15
+1175DE769C11DE05E6E97F7678988274CE2AE0C2793393D6ECB1E6D64B72EAC4
+F8B487A1CEA2C817BE6E7E5F6979B5CCC836BC0A9D74D67C5E18F35CA43F1903
+F0A5B7C1C9F2FE48269FB582B57DD89768AB8C7B55E96CAC3CC3D090607152DD
+89AF7A767AD4CD3266BA6FC0037A5CF9B08DD8747FE3D33F8D99C89123BFFC63
+A514AF6B08F6192F3EC45F62C2FA5D4F3B80E99EABA309BD21DDFB3C46ED8874
+F227278F654ABF4F935473898A36F306DFEFE8876AA51FAA93D43267FFFC9499
+1E1C9385FED5901799078E2FB3563655FABE1933F1BB5B4A876BE25A924777DC
+D1D9C96C8D4C7CF260F5375AAB5262DC78E6DDD6CEF9337A3E7985C0C1875C6F
+C06F4BE4E96C8ED6D805D235A1177778FFC894400464219584CFFAE7AEA5A184
+BA6ACBCF04C43320D2C7176D3666E28FEDADC2E73B9782597E947127DFFA9ABF
+F8C8A42CC74290E30897D999818BEE47E68A4F672A4AA1225879138375EA0804
+C02DF75B8CAAF2971FE31F69155E56746074519505DB3879BCC50F9216CED99C
+9430B4983C1039466E8D5A721BEDAF43368611F3E90C3BDB8B954A3F5A825EAF
+D393D5E3DFDD0CB757B014B3FA1EA45892775DD3CA8D176697FD9478CD55A436
+8E62A63F84DD5A26271B502E96A74BB52468FF918A5F54249FA552DF3BC1172A
+EAF29CAF5FA5E58CE9242BC04A70CB0527F554BB8F3E9D8A189E6D8BFDAF0383
+20B7390C5263D6AC6781A500A9D97DC8BDA3E156F63D3DD8D1344C121EE6FB16
+FB54B5CA0B7F74B32A32D55415AB5FEFC2E43FB4EE8B3D019C3FE29CE0BB3294
+96C9B4AEB0F8B1478AB7C9E4D784C25187A958A6EC1EE1359C3F7D3CE4577904
+CE2B8B18448ED83EABEA54CC0B5B092F234BA2A2908A15BA4A60851C5B1A336D
+7387499E62F1AAB27AA9B071B849F35B99E26547B07A943D5F0020D37AF09624
+9552A0BAA86C49FE065A5E7056E100E84555604C9796002BEA168CD516C0A8FA
+46A7329C7ABF1BE99191ABA619329AABECD308088D74C8C47F2E0772C1DFA1B2
+391B53A260A1E28BA2BBAE063BB88B2E7F90E6BC03482B23F3DBFE9D1B3A0097
+7CE9FFBFE770740A19A732CE7BF3314A8745D71E9F46002E1D38947D4BDC3A55
+A59D0149B0EF50411166E00111AA63F4A595F24B52DE94BC85F0535192095A0A
+A244B0A292D30EBCE2629765155713E19521FC7FC3E10090BFD1385AFE183BC2
+E635EBABEB69C737C1562670D9F815F28B5FF2ADCA13BBCE2E8B719EB85D52A4
+FE27A62B7D8032BCB6E0C43E184C8B864793C272EEC5752A2533404AE5B4A2F3
+A4178CE4C2404C71BADB724657A956B6AA8C7DDCC3411BE0E49362570A2D39E8
+53AB4CEB466C10CAF6C38B3F3C4084F4C9F9197A8625751037EA5C2920B002CD
+413F5F9CDA6FE303AFF476E88A14B90538CE1BCAC35BDCC953EADA6C5C36825B
+853797CA70C519BF8A3D1A538FE6E16CC84D2AD7B1F6E5E725EB772326C04E48
+5E687A44390A99A50EBFD4A3D81B7442AB1C8D5B311B051C3B973AA2F2A7A28D
+8BB32E72117770CA92293C9551E7A210655243F3813206C84C8569EDD9002047
+84AF2A18917F46115EC82BB96FC868A3E7058D7EB655FFFD15899C00346B970B
+0BE63FFDA54A50A5A6B0054F2B9D1C9FB94C6878B04DB10A7478E56816725F76
+CB08B9DE852E377DDF83EB4F822026060D5C517F0E62A6EEB9CF13EC90002B9F
+C2212C697D91FA63D619E863981E9F27BF5C092004D54E367A8BD3BF15DB2DC5
+927DB805F25E05C0394B7A6A1F6DA3EF3A480A6BFB6CC63A856776C630746D08
+2BA98EDF1C1FD7F7FD05E38D23BBD6F4493AB0C6D69749737620F4EBB458C2B6
+D8DD2E634532AC2F7BA37CB284767DAFF3330B7E69971AC6A3C77D5C515CBF0B
+A228FAF9AA6A095011124379C61FAC642AB282E4F190C9E08F0ADB8DEBD3EB71
+3B12241BB3D2684F59DF02CA0F711B83A888080849ACDEF5682EBFBC62A4501A
+EB2A59D9EE46F33362C13C15811B46AF95E460E93B3F50BBA029E233BF1809D8
+B845BBFC6AEA5AE7C83755281FD47F0C3B152FD8AE4B27DF7372860C9A09BF4E
+6925ED9D6B1AC0533DD715B68C1B27D8B4DDCE201C111E681859B1BDE65CE007
+B3734F7B14FE748B840F53453252149F463F12DA0C87FD03E900DCB2567B453B
+BEC6A42CD0C3BE0AC8999DC889576351750B944B49515AD9B3394EAC6B066996
+1FECA134E160D99B36D3ED88FEFA777ED7D0BA66259CC99C60495B6B8A5F19C2
+C957848A8E2C05698748E50A77B32C223C96C7A28AFC92EBEABEAB453AFFAC63
+DDEB754ABFA689697597A4C4FB90286A715CB31C2E59E37E23FB873E2488F413
+38EB42D55521239BCBEB233068CF020DAF179896E55B5609473211E7E9DE50E1
+65F684134614C82F5F7C163D43460A3B19A88FC1A14282E9DD649573B02EDE52
+23B3073A3FFCDE1395C8302146FE37C3B9971C428ED2B48AF8E120D1CBF06F6A
+F4143BD5F8E0CFDB333050E13BB931C9F579FB333B177473717627FAAA0D5892
+CA4A59F46CBD2CEFD5A0C7A823139D3C60A2687B1E0EFF201F6114C047D23F17
+DDF63EC251069EB083C9417F07D0C344DDDC8DF928DEB6DEC372102FEC938184
+DAA203C172BC62111AD329BB1BB1A0F44CDDEE22B1A998939333B1A841AB4608
+51DE28FB8FEA0015CC89BD43F3E37C2CB48F1C0BBF3C5B638E6EB2162A10D6CA
+1DDA501B6DA15A33D2D141A32F08D43AE66E23AA41BCE9111707B72E3D39DC83
+6BA1B18178F3942E269C12214DD8557EA6499DE01F74BDAEF75E658FA7D38A0D
+168DBCBFCBE04FECCDE6147DCF5D8A577B7AC4E812260B86EF88F13C1B2F9D38
+331667BC7598F4B138CA6F295F565302BF393D67220B57881015F28169E12BD2
+43B4752ED6904574F6C80E5E1679748C4697358904D960DBEE2BFA35CBCD8594
+34346B184F1030D6500C5FD4773525A91D4AC22783B61434D417C9F57B848CEF
+E90B0B243AC9B9FB37245F4178E6E305FE7A45859DA1EB02C024BA4784F39E08
+C4FE1473828248409CBDF74E42AC80B446B5455E74B75F5FEAFA8055A3F1E01D
+FB21C1D9E8BD1BA09C3519AD87B54F27BD9DCDD18E9F7B2BE7B1F7DA396117B2
+821383AD37D76ACC89AB90D24B43AF386308508F14E36702D86A07AB2F0B7E63
+AA0C1A7FCEAF0199FC99CA393FD44CA8AAF7B9A1E820720EC4658EC8C6D68C5F
+101FD9B8C0A45AE5C2B4B8682DAAEBEB686674F828AED86A8580E9D4982105A2
+3E91D62A2E9FAFFA2B3AFBCDEC4DEC3491526066E2A75745775567CB84F83127
+76E426BDD8C1EF9B64CB5F3EB256007935A75E63D5A90F5946D9266E07CB4354
+F6D2A89E2D1C332F3B1D9DE24195547DA0A5A674A50D9ECB92BE482630D37061
+A094DF9C31054884D4F2F89651FB8E1BCE6125AD240C7AA38DAAB1EA0C57A681
+E1352460873893488DA2FAF208E4D511FB2E2E44C8E9D7713A805F9AEDD79074
+632756250E9BB42FDF32C989F81373B75758C5A00167C49B5D881ED5B2DAA746
+EAA8DBEBB0AA0883DC30D79D0B99ACA9C47CD0CFC039EAA053EF194F5699397C
+0F69920D974EAED369D532F3BF706D35FA463FCCB5C59BD3867A70CB295ECD3A
+DED42339E6918F0226FEF5810EE2CE5FE9994CE4957FA626F5A10732AAB59651
+3776FEBE368E3F24BC27DFC528098ECA5DFD3367CECC60F5DBC2993B1740FB4D
+A0E7FA89553161167B1617F698DB3DBB6672EF5FB052332FAD4FA5822C96D0EC
+03111DFF00E76129690FC5A7C6A5DBF6E1BEA4371BADE2304923EA3C6113DE18
+7353D433DA5A81959828550A30D5894AB3FD05811D2BD0345DDA38DEF30DEE17
+F63DADEEE286E488472BE0E167DB4475E3C3C248E425D6E32B18397247530C48
+FA60846D3E477C0433ADAD9AA0B0A9AB1C258537415E05CF354C6217993F5AF0
+F89996ABE0EE4D948A42EC554FCE412EDCA1C88C4A171AB881DB725483A62B2D
+D042621DC2948648D07D8C9AA493CDF26257E0E38CD820417E61F0C955E648E4
+7B884CB722E677D5DD4100EA6F948A10346B904510ABBB6EC7C5D3E194308A2D
+E44821460563B65270700BA3ACB5D712CFC2DA9FE3094487502518C1634ACFD4
+700DC4BFCA3155484BA579C2D2F20C147B60F4C7F55C80A8378A241E83D67E2A
+037C59D5E7EECC35BE2BAC0121C44B40AF04881A35F6AB7AB17259B027C56182
+61927A1C8F6CDBF4075F725286C4F1BC8401CF8596511352F310A14C790915DC
+E503D88685CF1BB91AC27245F9E5D91EC23A8729BA05ABE5D9EE7AC81BD289FE
+72A6BF35B6C2AC895F17EBD812D550227C06991271CFC565E149E6487D1499BB
+6F4C93FD408FC31C2065CA1D85A2EEC8858B4ABE7836BF784C0040C1BF3E8175
+75FD8812D699F9BA551C6FAE3226DFB5B2F372312F0081B9531DF453A54E3ACD
+2FB15B2CF43F2D83E004B2BA9229FD048B63C6A4311E3DF32CF57572DA953BBF
+A38593F4B293A0C315888DCBE6F93DAD0980BF5B0F2CE3878A65AF744AEBE350
+22FBED4A11039F57CB7A927382A9C6F625B5C4B96C17D9741A76B422DF68FDFA
+13C670B6A53BBAC82EC45BF1157DF3DAF8B766DB30528877BB8DC77D82E16C16
+3DE6523F9E660D2C5A8A9D5ACFB135968C729B68BF04879820B8D69308458421
+6199052857E16C51E8C1FE965C93CCB85A876F1CED2B4D6428EB830E3E63BAE4
+ABF42C9D77855A0A9ACD246033302AB74CB82359BE91FC947F69CC8738209580
+ADE0948982C8D30AEE3034546E087EE180D56AF4FAEF124D5934FF3F2BA88B40
+AF3819D1D9D2EAE8574049BE8F8776A3F7AF6BCD4F999506B072589062154CD6
+AA7CB677A73F201668C5B355BA59499A0F93BB904231FF29486E60473E87E00B
+094B51A4790694507237253F121BE0897A1EDB09E37F08C399597A47FD47C0ED
+7A4235821F72F021BAF9EDDEF1E15D285802AB6EBF721DDF8E6A85264A5CCF87
+1B5DE9EB24AA3B0A50E0FE2B195CEC0D9F2B9D12D9B68B5E4E5A8732E74D30B7
+3FC9FB783569829545B6984F5B06DC5E2CDB95F409C328A608276D79B7BE5735
+AD90FF4325DE84DE077D4BD77AFF7345B8FC52A8E1BFCE9CB5DB7186717333FC
+6BE58A7CE61E4D13266320102AA06589BF00D01E884D9FF87CABDF4E12F62127
+DAA725186B7796A1AE7CB37BB6B164932404F3017E132202B42599798C1FFF82
+236711D98287A426C44F9DBDA9FCCC662690649A6F4D6DD932AAB5759EF6E481
+FF6F40A980DAADC5850E948B8EC0A60101CCC339F93EB829704A843C79686F6F
+F23AFC0D04AB902B602B7E1C4A927D6C752B2BAFBEB8D80273CA0395EB9D4312
+A052AFDB82613CB29D8B9A5DCF2BEBE5606F6E32A577DAD1FB9A9903B92C0B84
+13C05ACFE23AEC511CE6FAAC235CCB47B598C11183AD8713091D65D3F9FE4918
+CB4CC13F25A2A6991C9D930DEC24730637487EDBE1634DAF1DF9B9024F38DF1B
+2B44FEFBCB4A64756FEF1E2791BAEAC248DB8946DB44A5674171789701FC2393
+E4C2192981845C5E95834E60EB49BA90C3869A8497E99B3E676075C4EDBBA164
+DC9E9B3414443FADEB59F32E39C46439766E1E3ECFC5C197E031E645CCA4F970
+38266A4F21B6B98A581B838DF1077D8C3858FBDEB2A3A16D8F5847BFEAC138DD
+D73ECA92B7F1F5A0177A4C2E899ADB7F2218979D6BA217D8E117DFB2BC7E7658
+A81BDBB92AE722C326065EDDB99E2378FE2EB426CE3402F254BAF1C3115E4ED3
+18A05A9F129B61818A54D0EB53536359FEDEA8D409F36E08CFD272EE7E376F13
+16AEBF9AF354D20FCABE9819643878797FDC9B784FE700F35C60BC70CE72F3B7
+D3E1ADCD69123BEA6C6E17174847F62A5867CD674F60D8EBAA41A019429DF304
+57BA5BF34142F11E328DCD3BCE5253074988DB4AA42FEF1C3B5430E44F08E0A0
+DBBBDF4776E2CF9DD65A42188ED02C62520B62A22D0DF2B6C0D819D5ABFD72B5
+C716BA390B682875CF80AD1CDECDE4E9E57204445D71D55EE6DA675FF56B06D5
+8650EAC74044170B3C822D049E295138E0F327C93A829E70BF3F0B5325D8B65D
+12B3108C53E594D93339C1CCD5028EAE72C2B755CF3F069BEE7E9A803AA5940A
+5D277F7AEEF43E1A175AFE4D95F5DD641724B3BBA43C131145E3AB2A8E324E0B
+39CCCF9E30929F711436A1B315BA636F38FFE73D25848A97099450F1DAB3CA99
+783B23590EDEC75A7BFDFA4C1D70D6C48C57BBD08D6E174270C09933473A4682
+8A4F59B3F501D92C730B7C883826F8E24E201475C4F17566E8CF364219BECE93
+268E339B4408ECBC5B415703FF37EB4896007FB7C21F79DDA664E32A0204AADD
+DD50769D15DCF9D35A749C7D8672B8B06E2C699D6A378F43675E92E13EE42F5B
+AE783261BDB17CE63BB928977EEAD46770570DE46B302487322B089D5AC4FE65
+E826CF4ACB665CF3847596ABC4D1F36958C0C00FB3D4C6B0F130760238DD2649
+0C5A735B0B4DF8E609698700A080A9330CC8BCED0AF170D4E791C64EA44DE301
+9ED5D59F24CA9987034EBFD3FC3F829232D690DEB685BD5C91B4C6A3D1C5DE80
+DB6CD484B4114EDBCCD69CFD20461F6C12CF347E45D9579C9AE4375C1F00877E
+D3A2F2B6051D09AB480156C6A9E86A559469AB63C218F51BA72397E7C8BF37AC
+A413B505A11123BA8107A2B40E883572A5A41F2FD07D7E8A17656677A6FAEFE2
+A790C3D413670B569716A1248BB0C507C853225308B6AD39DC014EB034CCC13B
+315D7544F5B8FEEF1DC4028E89AEBF12137F9FA617BDAA2298D326A4673C4132
+719F7FFA1C065D5EED1AF32FE1399E48E370038504DCE43CD8F45977032322DA
+5B7297726BD995D24BDC2E3B0848E688C157877AE0EA411B0EE5284AC6D223ED
+82E6AF4E94FF0D5D41BADE24E636384C8F8261B8E9917154067200EAAA09C6E8
+CD4D9103FD27BD24794A012A15B9C5F0EBCC16ABB05E2EF63DC3A126EBEE67B0
+460F384EE0E07514DD75A6B7B17DC6DDA8A2BE32A9D4864EEFE67EF383EB5FCC
+8D756A08DA6601C4C4F6D85252A199B29D61690CE7EE89BCD84ADC9B4F067361
+1B837DB712E904CA57A1A3C9A0F18FC457769137434CFA34F64A976D49FB46C2
+A533EF92E525D2C880B17A935D4C34EE30F41D3D78D1BF013421462B2CC74DDA
+F16A48920E6D22A59A6B71E65A8E86999635E9C24145EE1C4BCC54B5D0B529CB
+084E14058F56337822EC46C77D4A7875E60E1862598C8EA5068206134E978A84
+7891E62D0545B381CF984A445426D0CF7953C32F36C32BEAAC1D9DA343D5716E
+308270DBC4F48DA9E32727482434F81452291D8353F974F5F370A5672B2CAEF7
+DAAEE9BC8ACF114D13A44877B44F87D9107FDBAE64AE9241353203C72E41A472
+53347A67B4D7D4D65B384058792AF2C2ABC08B856628F8E732D208E548C4C4BA
+2074697982852DEADF2EDB80DA4A396BFE1F1CE044CBF92ED2482799AF9D81B4
+9050957E97437DB07ADDE068E6815DE3684D6BDCEBDB112B450BD160A63A2B8C
+4843D232468361F9B15C829B0628E3DB765FFC1EF181991A7A96E0432E09CC96
+6CFC5CA74BC71089
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l049013t.pfa b/lib/fonts/l049013t.pfa
new file mode 100644
index 0000000..947a31c
--- /dev/null
+++ b/lib/fonts/l049013t.pfa
@@ -0,0 +1,1598 @@
+%!PS-AdobeFont-1.0: LuxiSerif 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Serif Regular) readonly def
+/FamilyName (Luxi Serif) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch false def
+/UnderlinePosition -30 def
+/UnderlineThickness 60 def
+end readonly def
+/FontName /LuxiSerif def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-203 -211 984 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078991 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D9E73F44EADD0D9361D465
+3748937F491E18670189FD0D6858CBDFA6C4D794959EF9FD6996B4BFE7447FA1
+0B99FBD717D8407349457E126F430570E461A06CD1D4022BFD31D3140B4F9D44
+873A31C28EA941EC9D76CEDC1A71BF7589E11A6026F35F47E4216D7168D7E0FF
+7C75BD48730F67FC517E7539B16B14D61185D9EF8D13F9398E4F3881BDECB05B
+CB62672DC2C80ED0A24278927395F6C5D99D9FB3F3A1DAA087C609DDA0583474
+E0C5C9EBB773EA16786FD1FF2BE887147ECAA6B69B261A6A61E8E0DB8AFE70D2
+4069C33DA1AD0763306A2860A870AACF636654291C3BC44893FD9358616A1D47
+B3C79598FD22290D57AF04F3C192DC67611A2C2EEF144F80E0BA04888A5BAE0A
+AFF6C484103BE288EF75F74A81B453A4D3B3BA25B37C547091D840C1356E48F1
+80E2FCC0C091515CFFFC446F99945BA70A6F868F4EB9F4ACE8AB07B64CF9B7E1
+4A8D5C16097D4ABD16D3573FDA57A646D3DB6414E5F3EABFFE30F22996D0E4BA
+07685D5EFC2E97D9BA4DF8A1262EC2AB3C74A57AFE467C7E8130036360EF8D62
+4A2B6D8C290AA2365EA095EEA4EAA7042F747358A9F6151AA6F82F17F9A48ABE
+646A9A3F1DF12E7729658ADF3111E52D08E50998672E884C2AE82B893364675B
+9D3CF06B6DADFB13C53452730FD0A61A05A44B1FF1C3B0CA05756677C3D262EC
+6A9344B80929A6D456F8708C03D4E0B4AA29320F7E3E9FE420397D103641CACA
+87E1F114F525B6AE34F61327595648DF8FFB4FB09DC41C0641CB8EB349595ACE
+3A65D4E04735BA31E1D613CDD02337D460780E22CF8B8D7BF1BFA8896C343E85
+5791AF4BB99293E9B4E239A2A1C680099BDDEDC3D68BF9F2986D3E0E51834478
+D808353967F7D861A900DF206C52BE7267F70928102B914F39E001632154BDE8
+6626FA0F69D81F13BA8F561680D2C0645BD17BF5828EB43B6C1C443E8E3CF346
+50C103FA53A029A665987560D17F6959D9FDD46005A1EC53E443D89C7DD4A618
+3A114F733C87251276B35BB3A03FE864E0FFC9AB3C8A1686FC5605F5EF9DDB2E
+B9F6D75B1E1BA5710BAF346CA720318F32CFCD405C006E4DDB6FFDC97067C0CA
+394C5EEEEF2D27AB9810AD25A421FA7A4095D692F802C83CA5F8B2D6AB83AB6B
+45469FB7C8613F9E7DD094F9360435D624C67E7306D19FF80424B75968A3D68E
+39215E86F1ED20ACC5FBA87E107785B48411A9F5A8250D0E561FCB1DA12B590B
+9F0FAAD50D548FD78020FC3C5EC3B7ECD9CA58E88C81FCB7B2A3C3D114E7F327
+220D436632DA6EFDF722D4C99AB2880E3CA577DAD1FB9A9903C5FCEE69C65D36
+DD56EEF77CEABC3BF495DF819FA518194C03BD88E1DAC75E51F23765797A999F
+4405E08AC251FBC7F8C462EDA4768D668C93BCA47E035EF0BD905766ADB2EF24
+EA82B9C97A41552F70B0A1EA5172028A917EABC78B1E8293BCCCC03EA281DA0F
+9346FD6688D58DE2B14AEF2954A70B3755CA545F4E0C460AA89E4A9C3D3475E3
+26F5133DC36517157853FA680642587B62E71EBB8422B6C9E1335ADB17040561
+50D94FA4FBDDB86C9FD3812B90EC8A44596F9C683A5119DBC735777DD9D33AA6
+2A33CF98754D16B34D439FD8995E625C8250129701501346727F51096C407615
+F7B96061C2E733045C1C3A427F9B1AD26ECDA119C7B38E682C5BFA7B871AC397
+BC063B129FE54E9CF58C6F329390F8F14172ED0EC22A11B49787751A5E47340C
+37814F52C05DED2F8F17A4F53250634B4B54D675F2776A867C1AD96BEDA842C9
+B8077DB381AE4AC283554FEE875B64A37FC3005810B42BD9C1C1422B7B104DE7
+D912C5BF74B5D0B4671983F41ADCFB287E40AF8BF69686E407E2E97D4CC14B6B
+172972FA86ED76F43ABD480EDCD3437005670A2E785942CCD45023D1B3B70E9E
+C8AD2ECA580EEE06993FC79C3B44CA5841ADBC4378DD68B5A21E570C88EF4016
+CD5A7463F1829F1F761D719F770AED1CA8EAA1FA7D166C86EC3C858D8E76606A
+EA4AA03F3D3EA07CFF90CBFAA0E60B26FF57AA395AB4225CC19217920E0CE8E4
+119FDE73501174065D1C0DEF1AE3D6A9F0C9E2558030E8199E99662E767D37B3
+3761220EFC66C81205F64B6ED8EB09865046A89FDAA0275D248179208557E218
+40EF4FFD2B18CD1B46E7DF16B675C3C3093141BCF45BA70F31EDB235DE3DCB24
+2C93BD4C3B6414DC7C57383F35D1033E400DD0FBF57ED73514E1E186F08F8E7B
+6F836CC6702047AAE17175CAEB08E20D06ABB02FF72BB9839F34F27CEE5BA199
+D9DA8AD3C6262E0B467F9A85E1D84AFC792C55E00156DF5A50460D259353F33D
+505FE3ED16817DB13AE355DE90589F85AB977D09547996E06A8F123F655D4BA5
+E188E9E86CC31AE6B817DE4D90D7055BE09601F7CF4306BA04295148D4D42EB2
+E03F73C682CEEDA8C2862FB309BE14C96C256084D6DA1A0254EF1769877EC2E7
+90D0E6A37EBE7680FC0C6325F6772D2516FBD2F71EA193B0D96BD9303B746FFC
+0D9456B7B66E849477F4ABB1565BF0F95D6941C6B8500F9AFB561F08F71CA6EA
+0FAF63400979CF3F29EDEDA7041C380A0D3A086CDE2A1212FD6017E8E5A280D5
+73BF391BFCAE1F0CD3E895ABB45C025940C489F30D38B43E5506D57043EB6C90
+9798823F6AD59BF33E75467BDD309210803F24EB57E2BA92BB25200527C66A7A
+1D20D092637AEA5FE90C8BAA0A75172470D5C872206450164E702861D50FF618
+748CE14BACFCE06A869720517549082B5FF664D27CCCD7920A5A70724C847F33
+E893F9316FF2CE0C07E55FE095061940D12AA04853F444A664E383DE510AC21F
+2EA065FA840618B89166BC69C6BA042714A6DA420C38002841A2BD31C35DCD5D
+95D01CF0F4233065B48CA98A9F078EFF2148CC0B6B4601912B93F26F1B2BB509
+A89B6AE424FC9FBC1506D8DF65D85490124FA0B2C19D4AD0FB0BCEFCA1818474
+806028D9362C308A707C001AC9AA9E3D604CF91242901AF68176C70122646FE0
+3489B2D0AB026B5F14FD4E8B6DD4983435F8C1EA647C6EC3A30209332F5D9E81
+6F5F1D827D05995B996C589C6365E5D2EB4922807C996EE7D653AB8E6FDFBF2E
+450740A9EAC9D97EC4B05955B35992B8FF98065B126220D2FA9FD5361F00E7D4
+FCCAC7D0131097F55420F2E723779B33AFFD9A439B80D2B5A70CF35D9BD62E5F
+EA17E2B6911BC219A7D1D62BCAAACE9FE03A28780D32964E25E5ADDB423B67AF
+A377AB0E9E401DDD8CB82BCAC58B26DBCC1174FEA59A311B133F897ABE574040
+4CEDF6110B709AE16E63BAC2ADB18B30918A83160B2D3BB8EA25930548C69864
+DA2A4C23339B35188599EB5668AD8F1D5E43D49471ECED568D45BD02A38006E7
+ED0CFBFF4C9E8A9CD0ED5086E663D880FB388D04E665F154E5E3AA7E658376B2
+C37E52A54EA086300039929FAE313573DE586DC6864B07914088A75241A9B955
+B60FDEF10E7C4CA62F04A0DEE650DFEC8CB0C31832D6ECD00EB8FDD4752F4376
+965F0C7318C152697C688EC0A9DF0709F4D98FE9E8ACED5B47FE2E640C9043BA
+535550F55C945805685313E95F02D503DA1F68322938A76262287266376C9430
+34A8A7E9A1E090FC84F0942465BB09AB0E885772BD34D23C38655530F3266C6D
+A8B703AA8584D766F3140B468CE856EB0D46A9B7660E9D41FD90DADD603D43BF
+3E573959254916573DCEB05BA14B58785817B26AA1FFD03527F11068079EBDFA
+2C97B82A7C711113561EEE00C10424F43D5E3A7E6A71BEF9B8173A6C4E26B827
+664ABB5F5882369863CC11AD9F67CB687F1A5D9D554962839BF4DF589A5B0627
+72E49732552AA9886455050A00EFD580BD616A0164000E54A898BC9FB14A296C
+17ED96A27D3416956AE0A7B8EB477143FDE8D33BA0C2BE89249DBF625CBE983F
+AA6763CD284D0B59099390BFD0193881995A522B5B3E689CD7EAE3E718DA40D1
+C1B6B67463B2B885DE1E9D0ABE0ACCEFBA3D29F7F482D393F988A831FF3A9688
+085108CD2BD75DB01CE94BB7B4CE3674937895D6AF2F6659C4A612EB65F8E81E
+B9693701AAB54789B2BC251103528FC0A7E7700CF70B81230B65C0261A8584FC
+F19B82615DE07D894AC4CE2CBBEDA4E79CA2438B119A8F0F596D0C605B3BE598
+AA3B1B1F58B6184F0904A73640E466164CFD0D0C1948BA56753520F144F1AE1A
+015F1402E25F26B0B462F6C4FF977C7561217862A5E91E1BE2BA5E5B5E045B07
+163CD0DB3279C6D182DDDB43C1E15C6A96F0BDCF32C4FC497837321A05ECDC03
+30943D2E7A81A319C58BD5C78EBF72ABB8931921DF1474A67CA2E635FDD45C19
+1B525141980842058B8F07DDBA38D0FF3F17D95F833AFAC787AF090ECB75DCE6
+155969189C4A05055899D6AB35C9B8F1EA2548B596E799876C8A1A1CF5A2A26D
+50AC0F7F93A4816A983F82675AD33D409776ED878420262521C373CA48D01CB5
+BAAD873A8006CD8E74A9CEC86FBE4964497D72D92A2837AE2DD223AB101F8C37
+8E2565A1B6FE12208A05B60BB09082028FC3E1924DFF5A60525064A7B004B75C
+40FE50FCBF3CAF6B4E2F487C4778C5E6B105DF2962391EC856785F6ABFB35896
+8C5C7B4D3AF8AFE4E6114D241B943E0ED2129D6BFCFE863AFA58F207A654F9F8
+689E53F795F5A199E91F8F76D4C2495BD307CE3B7669EEA5C46E3BB4CA096420
+D4EDBF4044F0E2C79FF6DB09592C8D29587B536B189DF331336C72EEE5C96FD5
+55E4039799465EF1678063F2AE4CA788C89CBD6EEC9DB3B22BC19680CD130FCF
+963F30007CDF0BFB436F34B87D59A807189B1FD4015844DE56B7B5398794412B
+1B406C318D5AFA5EA90ED303E3FB726A7F83634341123E5CA48FF30AC16D2B1C
+6378EBA79DF54B6989FAAC13F076D88C92B1E485060D5B5703D3FE55255ACF02
+6A94FB7EF322798E945E24BBCBA0052FB611E9451F86BBD9E1BD6A143A98CC89
+A9C82B0993432956E2AD3A243CF7E81E23B770F5B576593EE0089845046259EA
+797B171AFFBA8B4A2712175CA836D750B25289872538ACF8C3A51E62F18C5E91
+B6CD6249CA9448C071CF2B9114696EB0A0DFF0019DAEA8399D679D8484823000
+DEFF6B14034B064969CC05E0B5E34FE6F414F876E2809AE3B09F03492B5193B6
+0D358C68DD6A3C48FE6318CBA17BB3FA9265235AE417DCEBB0380C30D04D6E93
+B414575828679719D85B9B4E5B56248E52B4C7841AFE7B7C9D6E844480C7AB80
+5C9412645FBD123919936859F61D815D105249DF52687F31B2701321F8DE91F7
+A88A4E8D5C3926CD47F8CDBF8DED8C5F24C5FACB2138736EF67C5742B33A12D1
+2721A47ADAC6AFE384C2066AFFAD2F79C9FE60FC11A7B71C972B897B12588196
+93C06D7A79AC25F2D9D2BEE654AD27D454D4F28E533A6CAE0C9863692E406A53
+C76344151CA587709CE1BBC845340FCC7B3CBED5C421944652E12506193A5212
+A3E384D7A63F0FC0927B2EF40AB4BA66909D323E6079D9DD5A9F09FD1078E804
+4D6633D71CBBFC5CB1E9B3BD13F9600B1157E28DD3226CDDD358B0878503D954
+0B43CBAC43A14D5034F44722B05D12F6EC8ACC66972E3B9D5DB270988E8D8E88
+4A2F92750ED6979ED5EFFBCE0731FC34213ED99F37BC31D0BFD0DA1D55120C58
+1167AE0D33E8F190A163EC437B1E67DBC254331CA1C77EB1AD6B98CDBE95CDC3
+1C7D04211BF48C8F86E34AF2CBFE411A12BDF382AFBD63ABC1A42BEF2825D07D
+1343175C428704AEC8C925ED517CE7CAC954BC556690E61278079241FCF33CA5
+AA04CC20D34B12BF04BE34848FEA0015CCA8192D7B6E166025DE3F12B4FD08A8
+5833375528FEB9A4CC7739AC1C6988B21F3CBAED01DC535A0999B5200FBCD961
+890288CFBF06B0E8B55CFC0D28A3D660B9A79A4A65C2E0F23B54355E41E5133E
+42990B4B1F4925AD1DC6176919F37122D5B783BB1A18E8699F8E3F48EA0B9415
+DE9376500F1C31AA51B98E9D5012476EA6F89D93EEAB943DEA72DC6B2734CAB1
+12FF2C8391949455BC5749722D280CF49B8FA5F6FBA1D55B332E0BC935E9B33F
+F47FD34619FB0E217E0B5D1026D29A3C8C33CAAC9AA86015B009B153B86215A9
+BD54F753B708FEE773C9A040F23D99C941707CD0200BEA970319E669907017B9
+973BC93F89E7229F4185F95A70537935ACEAD61E7D458C33307560B6D0DA4089
+B40AF5C8E3F428116D5D616E4B0DD6CC7FE203885B32931005D517CD021B75DC
+A4EC6FB5F0F8E8C43067DC7CC99B4055E45F38F8D411CCC80514814CBCC8747E
+DFE0FDF457428445D64F5E1D0811BCD103E6EB290E363BF1A2964C5FBD63A405
+D0394E066E54774E7B05CF3E250FE7E5E2782B06BECE8D97C5CFA0BEFCBCED02
+08879C6B8F93460D1ADBEDB3CF5EF9469933832A83088D6563EF6982E5F1E704
+B0387D5E746D708B7787B7D7F91BB5D99BB4BB2C6646D5AAF8B1D70E0EBD2054
+492EDE6D5B226E2EEB6B868DFE0DFDAF858D7239520824943413105CEA5AE042
+D9F12A6EC811415A257FF2AFA0FC15F64D7C7F21762238B86EDB5AE4E4CB4FEE
+9501350A8EB10809B265D5B52F1C10A89B5F5564C8C077C4109DEBDE36F5456B
+F6B4F3889DA1AA3855374A39B9AAEB76E26FEF4683821185A8157B392921ADC3
+5782BF866461D525CFEABD17ED262785013A628A017E50EB70444CB1A9E8DB22
+775040FDC83D38CB5C91064997A88C4DCAAF340D66608C4A28A473EEC0A08785
+C765166D9B6C234AA35ACB7A3E676E756C13A67D80C148A2BAF56432F0AC012E
+612851ED8B16B2C0673B11BF65904F7B9718E12179D36023CE784FEC7B79D0AE
+8EC3F1244A5D293CD4E67C7B58076A6DC8E4168398D4E3653AA7C0B44649F372
+58A5B2AFCD59AC43796B6971C27EEAD8A4E645B78559FFB90A0D2C4367F25F7D
+84EF76B89D09855FA0CAB5BC5088C220E2979FF17AE67491C77E229B4668001F
+DEFA0E5B581E24AA93CFD0A21E453FAEFFD82A27D236FD5913132FF54C925EB9
+F59D48E16FC904AA8C498AEE94635D187C7FF354F48771A3B730A994E4085077
+53EB73692AE569A52EC4F1FDE59E793357647277C96A080FBCC9B95044FA71A9
+359225214796A4C58C90C47682EF714B21F8C289E3870EA06BB9DA82227F7ABF
+DED110C7307B86772F538A937885873BD0D427966DF81A871F1D5F5A2105F25B
+C2BA884C9C3D8342064B7C6979EB116A6077BCAAC52EF21BAABC0AC1BFE8DFE7
+3BF35A96077B78E47551BD07A89A2353366F0E3560D495BC906B40102AC68381
+642ADDE76FAA8AB2466D26B4A322288ABFF4AEA43A5DA09F32F3B6ADF22B0409
+3F16A8CFC70421613B04078A94148E47DD1608F1E262884D8C47D856C1DE30BC
+C60933D7BF141A433AB68B81BA42326E2935E37217932DFFB28C9D8580886C3B
+DA86AA0795BB69DC249050FB9434C900DD3E97D8C7556834DD3F66EF47347B13
+77E60D03674E47CCA9F3D19B2AFF6660420940EB68A843E93BA89131606835E0
+4EC6CFDD92827C56A07DCB9B7C6FF016D3500D1C6F62ADF954551C2C072B0F7C
+86CC8295CC7BBB42CDB70DA78807C2C0CBB3C5369AB2BEA7DF33281A1770A562
+A19C5FB30E616743248AE7D93F8ECDC1B081F96F2F52ACF195A86DAAC8E53D80
+CB8883F37D3BB12CC0908422CE4392CA1014A45C7EB35899A8B7694C2EAFC62E
+F69D5179D4B6E893C2CFD762CC388C6356D941E89F1B0A8249E8A701678A86A3
+AFDD4B74C16633087CC14AB94788C32FD74B1F01FBF8C7726DBEE0013E576CE8
+F2D2B7E3CC723BCDE5ADE760D387EAAB664A6F4043A0AB6260755868BE302157
+551883035BC8D73366FE63F7BBCEEDF072224B01DEF7651E0CD9EB85BC58C7BC
+01DC0E874147E9A1F9A9116BB60A1FBB7FECE53F802BF95E3A52C4202C89C99E
+BCCBC7DDEA17AD7672CF9AEF169B20FB20D7F76B2EFF1696674623E01642598E
+A86C5365E4BA709777AAFD328E40D3935660CD986FA959451A5D1AD43161CB67
+5A75934F7EC456F55822EEFE030DB1AB048A2E69AC59A50370763A5AA4E11C4A
+DCF9B23C9DD7290E73E1B72B179138E514E99167EF94FBF4A97866EEA33828A4
+275804BD9DA8101E6F7C78541D05C2B9513C7B03A4AEB0F5D5646626E8C81486
+610F1EDD9748BC95F93E9D0C859F270AFB655E2154494FDD83AFAA383389BEAF
+70A4458D0D7CCADB3E4310B29A262C084F4D3CE3B0BB63A271B90AFC60EF2EB9
+EE6D7F7AB4ADD46F243D94F83154333ACA2358E4F6D53E633C37993587320978
+F407155D27463A47282D27D50C22B7F38BF34974D60A361BC6F26565D5CE5DD1
+A48B580F5A1379231A8B6E90D0F0F770EED72C9D9D4B397455C59A0687CBDE0D
+AF1CD3AE0B83ED3DF977C0DDE3E7537C8D03AFA3114D7AAC6AC5870D0F4F03E0
+06579E9A7308BDEF66E5DD3FADC07D612E6859AA57D08E6A4D118BA7DDD45DCA
+2E003472B89169CBFDDF8516C43851451DC5B37C32A111D9D7AD1323C708EEE8
+C500D1E8F5D94BE9E6F3FEA2BD8C5A3EFBE1EF84F5C95BD6CED21C8E2218E513
+46BB8456BFBBB143CC7F0D11F74D53BC996C5D5A0A157B2355768DD153DB21D6
+C2382318562DD4D1745DC04A3941FE0176189D8B041FDB0525A24BF5922A5E78
+420ABD3B2AA5E5410025C9F65FB43D0A68262981DD8952002F7B12FAA9D62011
+3AB3A84C5F720AC7D53671F33477E750EF4F700B2DC3AB8B44587E9BBFA1D67D
+276FFE23F32EE806D3DE9C138035E0B4893329A3CFAEE28E6992A3834B016328
+D3B1785119741A71FBD79193EA6EB20EE914A644ED41BB29017A20E534256894
+4D9A5DB399CA943AE5351D842154542016528ABDFF55068BFEC1F2B4A6689CD1
+1E416FE8D5B150FC6A8E68EFA4478BF8931F01E405BE2531B64B4863AD649294
+C0391ACAD1BBCC2627F52FA1E07D77F0A35ADAD416E837963A0E88F67C827C15
+EF55E915BAF4E5F3E4C0CAC6E16654331B3ED0991A7D01C93C60F6961A73E72C
+A77434491DD87F8EE1401583D48FC38F63C1E2A35492F93B871ADED0348EF0A8
+437B033AAF2C3C6234A1A451C143CF926992ECDA1F1F3FAEF13C6B1040A202B4
+27C545405D90F77C939C3199FA47F647B482B7DEA16DFB1B36DF0F70446B8CF6
+02B33A96F2E81416ACE4D1B53B6EC5D96C1D9D43E501B989580DB90E83A39CBB
+E699A7D49F993EC3ABD780632810CB3CEF816CB7501F38D73106C838BB1C8208
+84382C1DB306315AC4662285984F9D431DCD1F2C854C4AA95CE08C33A99B8B7E
+6AA0562D554DA18FEF39DEE068E60469FD2DB23428ED0EFF075A9DF7EF3F92F6
+C73E9CF760FF0523522747F7FA0B9C21B9E4826A900B5D943BDBE82330DFB8C9
+C1F7CAFE80F7F1157EFCD3E6398F77CEE305E39C876D42BAE82F5078E894B112
+3292590F08D820E61B6F0454B47A23C78A5B8F3F34D7DA46735BD26A19EE0327
+E9D27D29AED59C044068387BC305A558A13403C9F713F6C5C2D9C6765F8B824D
+5C3DC4222ED8079BF0610C8CCDDD041FCD67684E66682F8434A319E48BBF7F01
+F8BB5FA9FC41902E7285DAD8DDE62B484FA5DB359668E6AE0805B48D864B7C82
+DBC81F4CEBAC5A5108391DA129E11C12138D94EC1A407371F70C6B84023DF9C8
+EA177A087632E3EB4ACBB13815B604140285AD93D1E72D17AA685EAA7886B5B2
+E6C3BF45F83594C841954B58FA051B7A9A94881598929A8C8310671932CEDA2F
+6DB1F7F015F8503EF84B19E059E8124E4843D09890DE094EA6EDF792630EB0BA
+1486947D0A0B484F4E223DCD215EE78D24C090A3C76C550B065225B957C47C01
+9C7AAF1498157177EF2A68BFBAF50A3D221B4320D71EA261C59A5600B55037A1
+8BF30F7479E036D463341CCCA9E987C3B87CCC44E383BB5FF98BDB2730C840AD
+C388CA6480B85A9AB7D42A63F9F4B049B45AF49637E9464A2C9B709A7DE3FE85
+10A6842FBC7B4C56D14F998D6D382D31892F7C066C77A6114185E4A573F9C378
+489CC8551D1102C2052555F93CA134FED3383AA3F28A0E11F5D471819582BA7D
+852CCB06FCC3CFF6F99338AA046BE9F96186F288D3951F75449C1DBF650965B3
+3D1030CCDC4817BEBD6216943F2DF5EE8B9FEFE6CE4D38DC52F3CB8A7D29722C
+990AFC8CCAA016181A26C3EE67AC35FD6119E23D689EE78E05E2FB7EC3864120
+860E8BD2EA388508327C46EC8F895E24998AD2EC0D8CDE2A333719DC03F57C3A
+229EC6CBEE7FD13F538570C2DC2F1031801BE075A473A2A2A7C1E01F74B8500F
+DACC782033DEB55C23B08368EA6C6AD8E47AEA7119D76D4B9F80252D66F70D2E
+6A498A684FD131AE7B22322009A4870CA2C684C5FA7027E1D98750B6BE292FF3
+0EBAF205FF0EBEF7E1C322DC79971EDA361E0597BDC717668F6B1E66EB93EF2D
+62CCCA7BD345104EFDC72D1FCEF328857B84439A811819558DA11DF635606EDE
+FA44B2AEA013F1FFA384905F5E32057EEED1FDDC33E3672F42425E8520999004
+51EF287E37D33E8F2A6D33EF933A9A1B1B6472889499D5F24BBD442EC57A6218
+2DE6452AFC09388CE79C10C09562307B117171AADBC4583AC258F3525534C141
+6A85CB591C56BB9310BDBEBBAAFA8270A5A179A368EE401D36A07075F21DEA6D
+B1A64E018F87AE259E98401E87FE8A808848DEECCE5B9BC45F44A621301E0D38
+AF6B9042CCD89445F09FC971F94007E7CC558F81080A51B3163B7E6629AC2162
+A410F477E9709541D6B4EEFCEA8D2208427D82F6D46A6DF1E180F621C5B44EBF
+D262084531D95974D7BB0F098F279BB04725C16955BCD5CB341F14903C5EA661
+7752778CB6A73908D89835CE1D302733EE233EE7099357A243E77833FE9E9178
+5A025A89882C9677467821A7414D970B9F7C0BEE6E0D3F5EBFA3438640E6630F
+916E9523D92112C2FFDAD975FC3D3DB51273AE8A250288AC30F0C63DF9C98DC0
+87EF8A135936A2F060405A4B8E2B597137E9C0B115B91F67A7015CB6D895E688
+45D23AFEFB6434789178094B15F666DB49AB7DC74454933692B36DD82019CBD1
+4EB94D1C042285E9D76F95B80FA4901D85BD16056ECDC82F068E794CB4410D65
+4CAE5E1B495D1D14647B4F3CA8EE5ECE7081693A7AA06646594744FC1AE4723B
+49EC675530C977FF95B41B1AF51A84E777F1124602DF8F5684F3225AED18B990
+EF1150946A5D0888BCD0C79975A631B147C627514406FCC022DC0875CCF8B036
+653B15187BA94DD8C5B6127AB5069CFB9892C6CB64848D4637C523AC2A5D4B5B
+611CEFBD818A1E06BFBBFDC00EF8B2602BEC466D996811B2B424406A29718C8C
+F57418415DD2422065C2CFFD83949467243264B16DA0C1508E597EBC4B18EBE4
+4A4354E8837173AE628FD5DDB5610D35F96CD42386C234A9EB05C71322847C46
+ED113F60A988110CCA6DAAEBDA7155A28BC035B803B81F0FB6A05DB7EDC4A880
+80DED199A41F62EF60D904F55160EBB83F40D7125B66750C881F809F30E5F72B
+26748422CA9BD09A8FF4D86F1561C3B8AF623DCE26C85BF643700759324A372A
+B2510533A3B8D885472BA12963E9C400B81898E6E116F4977CA724E782834A56
+D45F67C46CE5F9C0C267D39ABCCCCD1BBB002B4F7F2890B868ED1071BF8A5B0B
+825DB9EFAE17C7BD9B887D75EFABD94EE0B52FC811A8EF3C94EE93838F4FC793
+D38929D6E0AF3F6D624F4BA160BE513F683E7751FAF422AEEF111463F6B889BA
+B264156139AAFF7A1B64790F78A9168AC655FD94FB82FAA0828F1B284CC2D027
+CCA9153FD60BF80891AD0B45F0A356A3F7B90B0D190F1CE69398C1F2C5B8E99C
+10A2C2E97C530A8614E9203F424A431220A4F5333DD281FC1CAE2F2C0E6EF57E
+CB9074A7C7C0B355A1A567CC2D6CFDFEC64401510F29EDFB0DBDFF88D4FAF643
+8E721BAFBEFB4E1E5B2AAF576027CBB3A2BCB8B26E252CCEDFDAF8740104724D
+020CE168B39A12E0AB7F4E3BCD05C30C5419A9DAD1C3510CAC11EE4BA2B74818
+88A1320E5FA1D6BCD4B58877927878D9D3A65C38CF9314FEA0E37EDA580CF121
+FCA5FAD167856A8588BAC41CF25B3F9C0C158A253D40B53AEA357806A3D0D706
+BE64FD7072267DE22936D8CD0E33DEAD240C795750299728D41532FD445692A9
+08D8EF48054B22F12407C5846ED8F14F24CA348FF9760008D2F85FFFC514789B
+63E5569E73BF23A6413C4C077A7471E7275107F2C7BABF43696B746ACB2F4D17
+A4194B4660E7C797D3DD3785B92EEC1C7C9702F5ECA5BECC027FAD6731B49E0F
+08F0486C25CCE8907B68C18DDAE8B42655B46B19B652670790CE1C9F3C8ECD3B
+C88890676121A2C89D464D9F27B3CCCB5C5C014D198B5AF358699B998BB61488
+59DF9D0D706B84D457DE5430E8B5B6BFB5124B16C626E9B3774AEB27B3461E73
+0BD7F788F60264CBE30D39CFAC48FFD28ED12D55C7D0F2CAC21AF25FD25359AB
+817F0320B766B414547B565B52DF5702B5957A0FB9D7058DD7F803715D122859
+87517638A22E700783EF621F407FF829E19C6B379AA448407D79FD4F76BEE1DA
+71F6295803F0E7F2EEDF22038E3EBD6D56A1F0B72D203AD1A89AA7344ECDC16B
+83AECBCF61F07C75B07DC7D0D5824281C08F0372762047B3E745C58CFFDB701D
+2D35513F4EE938EA93D7A1FF911C07EBD7AAF2151869CA572A225D305E4D2883
+FD885BDEB7876A89AE4858FD2354FD4E347680E3DE3CBC048751600EE94C8DC4
+A64C4ECC6BCBB494A8B5DA6556724CB090FC00BE670E7D023F843CF23D363BF9
+36960292D6FBA48B69330631A12A871E56D9BC8772897F6492EDD55AD6DA5117
+3937DDF370CC6B366555DA1A22700A876F6E535E07F76C28B864064D5474A8D4
+CB2455AAEE25F2CBD6CD19E9B91D1380B73E79C7F852596B97B3D1CF32064594
+42B96C2FFFB054647CE2318D4EBC68EAD9DFA5029ED858DCAA0D5A972B0F8DA2
+2E080D507304905ACF3943644BE25757DADD2589D77553BFDAE17CD50D3431D5
+1CFAB002AA9A493F305BCA941D8CC78B61AAED56E4771FCA6D29CB0B9DB7F542
+AA16E37E647A3D71D0DEB3F18D9E19DEB7DD26DA826068554445E54144B6FDEA
+949D5D03EA3238916260DE4AC2152200977C51E5693616977C581508ABEFA156
+B0767661AED9D47675F71455CD143EA30464077398E8835FE9057C6FCFFD6576
+8EE913496CB05D8E3AAA6478685A5E03093A7F62BA5FCED32040D00680141C48
+01DB98BEC6F83FD2B395A97C0EC0617223F19486003374A38147AD0AD996F6D4
+9E6B70187368A368C84FF0C5C2E143CEFF967C279265FBB2F1C5B94DFCE706CD
+702C0792DEB7FF682848529C6B7A40BCEE5F7F2A868452665E00B8140C1369A8
+133B5114A62C9983FC3A13537C4D614DD9E513FC9ECCC001BA6A3287D82E9E17
+FF5D88A373023E0A34CFDE64113A6BE7C365D68A64D44F74205BFC5914D669E9
+06D94DC90890DFA84A169AC8D206ADEFD4A281C59B49F12DCFF9D9A2A4B42049
+1509C1F929D2820803279DE83D0A2B20887FD3026604DB42716F32378F996CC0
+792CE403EB698C865C21D26600E8706BFDFF5267F7D9DE38449AA71FA2C3EF9F
+5CC34499FE2CC522142C8C1D55D7E6DF5188F9263F37F51AD78E9279A823433F
+5755D9F95094B7FCE2F2224236585967CF767461380E28A674E831DC73F979F8
+935D6816947EF70D41D5F64DB5BCA12C184BFE59EE26334C7C9EFA0DD1C6CE22
+D8315677AA321A9B470F63ECE4DDE11AA3604E8B0E9DCDEF721138EDAF421D7A
+09D9D6A74ABD55112FEF6593C062EEC5AF3EEAFC4B9C831C7E8D56B332E9844A
+FB85AA1EB94C1708592E5E7F3266A037CA3AF551F3679A0B67029B61E9D20190
+2209D680032D5DB92CCA9BDA51820F2185C5678E879176F4DD7A9D64328F1305
+FADCC214B9BB8D9AD595EFFC79D6CD443C2F0B7DA981FBF696A43D4B74EAC3B7
+0441144EEAC59F52FC83D7CE750E0F9FDAED943D9B67BE023367F920DF5A220D
+C18432A6AF622F53D0B240D762AC25137DEEEC12AF276246943C4C804254BB04
+9C2510885398BAC62E2F67961B2D24F00C86053BB14200DBE1AF4B9DE0BE615E
+127F1FDAAD1AD4E939C1D3DC71FFAD3B9264AE547CB5F11B4E3D93038A95B4C5
+5B0D4F249B20FF04922A1158DA5A7C9B99971AE16FE252C76C21475165CA356F
+1F9612552BBEFD2A020635B7E0159E37847CBF22B9EFE07FF1CB9E9129D1AD19
+E979E52F78207EE4DD64287C0A929FB5BA5AD68D395B61CD12C545C6E88DBDA2
+2224BB1751E82014F2995936B6144509AABB965D9947B5B5D1346C1FD14DEB6D
+36A559DBE82A31F2DB8830E260C9069613B8DCDEF6E6A88C7B0421A4B99D4EDE
+F22CAEA7D7B519A2D12CED44B4F4DD63E3011779EA4B44DCC803E062DBFB6BA5
+098CA9E78832C1E6C6B7C0AD47350BE81377EF66A93134CDE2CBDF0EA9DCC5ED
+E38F663F72B1810DA8C23F287ABE369C496902E3D18B718B650324FF7D7434C8
+6B8FB37E30DC7C5B59DB7B8C982194F148B26914447FA86CD95E9781B3918DF6
+5FF76FEB4C8F0084BABF786C5771ECC6F9033C1528C4F0C5008F19D8608557B3
+9B32BC80BB28CD3C9636A8CBFDC7C3ADEED9BFBA9A59904091E31E7AEAFBCCE5
+2DF80869EFEEC3E3B3A5C20B49720BFE300F8D0C807FE3DC3615DA21501AD3B2
+9F602644E6CFF34AE0E34C8DB132643D7EBB7E485F9EE658D6E5F2474A0929BD
+768056CF7A4CF2D42B3ABF73B5F9CDF68BCA4753CE33DCD014F646F02229F9D5
+A207A0CDFC782280B8FA180A8B0D26BA629672E6DA6AC08F523C030747C7DCD1
+2721543837EFD203912078F1C21B4C12E1D3D99CC3D41A1EB4BC7A9C7FF233DC
+56251E5951A62BBA5164C4455FB7C420B1544FFEEDBCE126AC7BD5259C877732
+5F434F717210DDD55C655AD55C94A81238FCB7B105DD2B13BD30CDF70CF5190A
+6B2C723EDBE8E171EE85CE4BA5010E254C217D8A110710DDA85C1C16858D84AA
+6CCE64E98F873104628594126EF0B15489D651D8E9FF1EDE0F7147C3E1EE5852
+629A2851B69CBE14F784805C22AE7C9B2CDC7EBA0661DCF803DDF353E2A1F5F6
+8AA7CAE75B44C6187180B7FF519208887DA1C895BC7B8B1783E7EB487D02D234
+4EF2E529CC10CD2538BE4879ACDB5259E694675BA50DB78A91347A4C0E58573A
+055A91E73E3A6AF81E890DACDB9589EB34E061E8936D1DF638B35F22FB3EC97E
+DC0FD73913009B9895E4C95CF9D7719D9D63C25678C45372667AB85BFCE4C77B
+A37FF8E0E6215A718E1A4CE6DD6756BC93A8C1722288FFB56A4082C530D8F47B
+26EABA70B663BB51AE64FC03543E7C3F285A38FA416B20F4A73F1442648EEEC2
+3611E13EE34250A248798A2F0B9D6E3658EB1B97389A66C96C96DF1E41A392DD
+F667EC2A88C557F4DA7F708A33692B98A8A75212231B395D6785CDA4297737E5
+13C16F5FC9CCB761CC3618C75B259F46C45926F3BD3E4994E6DBB890997E3FF5
+D0C9185B9D91A54E6B0BAD88018DB6466492608DE79791EC93516E67C7C52977
+F9E27B153910EF29F9F24B0C9DEBA4C3AF8C59098BCA325824016E26EAC228A8
+1126E6D8821B379F140D2ACFA1DEB12D434BD0383E5BD448FF624D8A9FCE8CF7
+D843B625CE6ADF6F89794CE54C5B6049BB95EBFA62A296515688317FD1E7AED9
+97A2E7FAA32A4849114921C752AEC2C52B98C69C57818EE73CBF916A235F34C3
+3E05CDED2956DB5B0CB7D51AE40E56085E5EAFB0BF29DF9B04BD66B030BBFA1E
+CE3C041E8A175033AA4B4C592575F28775102F8A45E15E3E2D550ADC06CE6514
+B652105633B5E7876059C81527B9512C40DD586CA25AAD144BEF5E587C97E6A4
+45B9772B8D54C2B75D4A716B83617CE59A1E52889613FBBDF5680E676F430ABA
+8D80ED90B8410AD5BEDD7599306A8EBDF90107594F191F927C6D44BC816652BF
+95C03DC365DE827A1AE756FE769550AFBC535CD3F92FBA42098B2613302020D2
+15F884D51ACD348FF9A0441F3E4BFC2C02EA7CFFE8B388BC0640ACB468F3AF2A
+CC50955F7CE335B7E7C8E16F03A9DF18A31B257B6106C3578A343F16ED459E76
+43FCB7DE1E9F7EB80E5D21B7D4BAD5D628F55E1DE0ED07EA926E73FAA6FD190F
+796E75D43954E67F8ABD25A6414F08AEE76CE48B180CB1D3458F563A3EDB63F6
+C9C3D9078D20914B83E7A9DBED2A2CE6F0775D3EE4405148F15A5AB53A4B0626
+E24322A78F87041E956C655601CAFAFDC6F3C75B919B4E5A584E9570B6F06302
+99CFD1B95C575E45AC1EE59C798E726F129643964A47283088298D9ED6788B30
+D48341D03C2C1BEB4F31BD92ED5494A6B4039A88DC8C726E053006F9798E9C5F
+BB96B002056FD39A7EF2195335D04E67EEF12E0A16E0FE37FDEB37B925144A7D
+DE388DB0B4782BA6D48A2084C5A821427F97D22C1938BADC908C772F1A578179
+4FCDC28D435B6BB443C31C4C9BF6CAED51370E133F64A53D0B56334FF57AC964
+B6CBF0D85791D12C68A7A8BAF82CDA61335057A1B8FF0746F94C93D360F4B0B1
+8FDACF3610C902BD03E23FE6FEA2E5935067D10AE5E83ED6214B0BB2D4A4BB49
+F05E89CF47483357C676989DE740832C4E004FF1F2F3BCA3E34DF760ABCD85C6
+95D97A55885031DE77C16B89F18648AB25F9774E495D4751ABAABE7A25CED555
+60CE44A39581BDA539D4733919B9948E2257DDBC67C14E6CA051AB6A2494A818
+93C567A1DC8030900555C28AE6D1A0CC6513C7B31A3F4EA137EF925CDFF3F5E5
+CC9C88776B12851525A920456464431B9385B6D1508FA472B3DB12979DA517B4
+1568600717B7515DBF20E33240405655B3039B7B8C37BC146967C42C4548CCC2
+50EE136F210442A8754946C8DF57016D0109AC569AE4675E111A7D14CA742BEA
+47F0629A7EA56D657BDC06D84E4B248A2628123D100F5ED185DBE2BC67BA6F1E
+CB72947E8C47E53D91F3A28C0125374D2D78FF3EC984B3EB47A5B1B0421F2EE5
+4827EA2D74EFEF8427FF88BDF27344A82B622327EA307D805E93ABC2DCE0D457
+46C2463F1F5FAFC898D6C7F64561E385646C8C71CD624F6486D9EBAECF04A0A5
+ABEE1E6495CC0B1554C0702ACDA0CCBB7275703F51EB6F10D955DE95727B279E
+9F61F19D9D54A638E0BDD27FD15B7DE67A06C31BECB0C800DBB1AFB099CCC2FB
+0BDA829E02EA8EA8CB86E97F9D074A99CA8F0E464762BD1B0F41B444BD6BB73B
+916DC811EDAD9F9775890D9FEB5337AA6EAD524C1E293A78ACB15BADA0BB59FF
+714C43A89459636515E61E73C2F4C648D2916424B688896567E6B53799A79697
+E9DACC8C43A3DDD425AFA8B542ED9614B482F73DCCFC20C4485A67545E241B9C
+CAF58CF1811D639E6C79D013C9CA124565D5D9FDFB2044198A41CBD6ADABE1BC
+F1B43683A55E7D67E1E00CC18986F446B1AC2FCC22B2A2F0EB7B78E567C3987F
+6619BB27788517FDF9B5603BD8BAAA894CBF354FB6F066144931F91D1D8EFF57
+F75B1ED60F4204CF0EDCEBD9252EA04F29712B3907A7AA75964C8ACF7D216759
+931C517183D319B5218AFEFE28F64471C79447A8C96A02D2974A67778DFD3409
+BC4415F8D17B12773192F7485B93E6CF9C99C281514C1E1BDF3628A5F093520A
+9CADA2D9BBAB43139F4D067BA7B1D799BD3ADD62EAD68A70C6CD5249CAD7BD87
+C72EF01DE59557A3C3479E36CC872062034B67BB60D8EE0B703443CE7B982E4C
+A6714F3333D6780AA342A9FD1D290225A79536F222F2393C5FD6EDBC1325C4BF
+61D3D3E5B0C7FD0643DDAC4181FC223C1CDF89A44E542F2AC67FC46D06881683
+4E611D1993F6353E65086553C9D8C415FC809A289795DC5CBD74FC1199E0EC66
+C984180B57F710E59FC74EBE76A8C2CA96AF6A7774DB9879F9A73958A8DAC26F
+BD6C2CBA67E3AE7AAC3AE51CEFD4CAB980AC13FC24683151C15E83B23565214D
+39600CA55C611ACB9941F78B5349B51B1C489119A4381912AF6D74508A1194F7
+D825C41B88F8BBA571414C69A085CF400D4F7B88D16DA3D7BF554FB6A96BF754
+238680BFE0D23146EEFA3CAF7ACF4475DC40A446758F5FF8FDC0BCEFFE4C5D23
+6DCFCFB0663B70BE4BA681C5689952A7A26223CFEF28D76DF18E6170399EC32C
+14B40821724CDB09EFCEDCCC932EE90CA228D888B76A18AE6D94FD69B7BEF356
+13EB8599508321F0DE786EC7A5CB4D6A218E8A62AC044EED391C8F6D4F657C8F
+D9E5E8ED382685556E5FC2A8214F93D1AEE16A49CB6A4FFF2EE61741EB41D56D
+282C083DBB24FA25D4C765E336899B10EC68C62358CAF2CE6B21A74F9E554C82
+221E8A0414E5397DBF86F54FB355640CB742DC10CF865E0C2E16EECF709B2A0B
+908BABBEE0175F8CAA010031CB98818494E670DAC8DA0ACD46959E51669420D4
+128E38F2251F7E9F20F107A450E23A658F3B6058F63D699B4C5135E348CFACFC
+58BA180FB43251958D72F2446C6DB69A17BB2416B5B0975C5F01D4B1C29455BE
+538BA23611CD5FF3F06278641AF5458FFBC44181D9DC7D4D6188D8A506D61035
+338C78D5B248F2812B3493F890F397C1EEB051D1AB29050F1E1020DF89E192D0
+930A1EB5E35E0844ED2B7B39C5982CA708A33E5164CF14B10EB890EFD606D80C
+D08206B43A60C21ADAFC0A57A392B40CCFC7FE02AFB2111F3A20B18AF2F8D64D
+C511FD613492F116AD08D2F6E8193F9685568B83A08395331CF44DA500C405A1
+58D1E63E6F36CF298C02D2271A27C9A454329882EDB15736CFFE070FAC32ADD0
+9CA8FEC258CAB9B80C0E4688322B87D4AE222B574C5C599DBBD24505FC00876F
+7ABCD94C089010E6DBFCD033DA2476EC01E7D0EEF82D6C761126C42531CB6880
+7D7D887817FE9B688447A04B38709197A87F4C0DE7D26877E08E53F68354C2C2
+492B3F3C82DE586A5BE477D2EDD5A8FFD23B55D05BBAE7F6D6ED28BAB27092EB
+C859930DE9BBB54EB2DB5452302F46AEFEAD89721FADA13D5340C7F8CBE0270C
+A8861D53170E8050F5C60D72D85E2767D42E7A9407D6864A2118CC70A16C80AD
+18A214550E33B636BDFA811DD05C871E9BD39F80682BE56F0E9D0132D5B92958
+E4DC5F4A27BBE2D2508B6B66322C4D2248F09B1112E63032DE8D750092197808
+262715C12ECAC600AB628B03732E6214AB1E2CC952B4BCAFF89D31D186079AAC
+8D18BE05414AC7D3433B95FBAEC5186269E8C4F5D01536331A78A3D405DD8311
+8D46FCF30F6A339CA1E0C12BB42BF4C46612F3BEBA9D5822E3978C7E7F24B019
+3F883DE1D353C6BD609698251802B3BB06AE88AE85CF069C70AE3029A66DC96A
+2620389074E61FC3FF708B5B9AEEDF245BAD27A66025636ED25A38A1BBF095FD
+74D0A25EDD692B863A29E3F224AFCD67CF5FB9EE9E45C06702CDF81EDD74E000
+653C3CA9A8674A8895FCF6922C77EC3B63115CBDD52E8859A7A2F736C9CAFB22
+5A62C420FF7E6410386290B35DE4384DB00AE1077CD28CB6A27392F0353260B2
+8964096063D8E225240E0B357FFA444FD04EFB5B9555A7AB653C9F81D879E718
+E408609E458BAA7F912B8E8587A14B27D38792CF0B66EA0BF6FF28AB27D2F132
+0C4EA7DD61F4619A5131828FF73B622C8136E2DD8516194FA86B91A1FC11DD19
+315B3BEEF7BE8856F36C5A41ED2B8FAA5A35C46332174ADF029456721D204003
+17CC6CF3DE50601F8DA6A943A1A5FB4EF6263738B2801F5816E171020163C3A7
+4A1EFB474171B8B54A62E29A84B8025C0A486BB5871AD62159C8C2C2739BCB3F
+1C22F406E26F311AF6D6E5DCF9394BD6E0F2271E9347150B6DDC8E6EBE12BF4B
+4FA1C6D03A1ADFE14053F1DFD4086EA3FF849AA0CBACC03AFB2567F9A4A5E3E2
+4CC1DD4DFA6281350643C771672B4E8141593AB7CC1D684307274E42547239BC
+1A66D2F9B88FF19774F77A29DDF1441094DD13FE8B60BE3D172E2F03F5642995
+D3B4EA77D4B8C2A5B95E17FA3F4FF3BDAF29D8FA2A1B269839A961E6D5F05079
+7914FFA78F79641CEFA7C1E7029B45CD3DE6289FEF5AF3294DD287F8243F4816
+6963C42441B459C2E47C48D465B3F73117A58E45F4849F7B84A3F7AABBB67BBE
+C04E794FA35C3DCB2EF8689864AB5EF05CAD5839A181E6E558355A212B7858A4
+B91DE81B88ABBA4DD07243F9B7E7616F28A294A7A6BB6A91467ECC40DEC2DD68
+C46482EF44B79EC6726318CDE1748366ED8A46995C1CAC6AC2D95DF400C565D7
+8995FD0D12B5059FA90DC42F97176A89A6B77C06E89DE6AB4647D89733F5CB76
+8CD689C40B2BDB5400914EF8F081423A9865060FAF419E3CA66BA378985F9DD4
+FE2A90B6B7C189BF2B9530D43BD54AE78A4E6F6CF1436B5B09165E501F5D03DC
+4921066327922289B1642CC41DCF873219055271129C7A1B573AAE9EA60E0072
+DBB3FF4A4F088408012F3F6AA8C85FD786C1561431014FCFDC04D9EC154B14A5
+3FBD7C31E281C866EC9336B78531071144CDB99FE5D9411EB5A49DD0DE0270A4
+03394B3129890428232C45D40685C9741CB09EE1F1382216B1DCD028FC1E0F5E
+AE9E6A1339E911DDAF47D74ED9E46908672F505D44D5B96674EF2943F17710AD
+C05FEB120520F8E5AD6293FAF919A49051D2B7B0B87C9926512401D2B45B1F7B
+818BDCB0F26A70F48DC1B0DACD6A2E5CD23483F545BC78941F5FE1008B487193
+B59180C93EBA03BC0DE031C43C172F4B2FCD30B2845ADE4C96C662157B1001F2
+69CFC12DE72A3901E825E11F5F7B1B1DC9F8A783B840CA9BD21D082F6A9CD8C5
+3CD6EA5E2E4ABBC4AC276CBD9AA1E73FD66FEB9262B35C637F8392A92B598861
+FDCAEABF130A5C21E646B711566EDB6803F1012CE88E0771F7001B683094629D
+04FF9CC28D2268C22F8EE75AAED16D4A2F95851E46B9809CC519DB0E39618DCE
+C22BDDD8BC151BF4BCB0F7CA35786F6B68F68E8AEE4032B1BD963A83CB00A249
+1878844DB4DB27B7FA585622248E4FCE609E4521602CC6AAB4713FFC6A39A396
+7C2A1A82EF4D6E814B6914F24C5A5AE2952875EBD6CE5B7429582CAD0D07DEA1
+72E65642AACC1DB37E1C51B920BED00C4C6D597B5920A5861DBBAE3B43BC09A4
+4BA3B4C52B3930423C6D2D39C5249F6C2C0EE21B27534EDEEDCFF791A302E5D6
+2D18005FF18C046714B9938AC93B5B8099CB7DD3C142F3BDAD20CF23D7CEC7AB
+C64D591809E95EA1788036BAB68B8E4CDB12A0CEF717BEF6340C9CA1092BF8FC
+C30EDBE372B3D640700717F98E9912B814D1668A1169259B529F3E12DF309B92
+E0BBC7B6A9C2D4903BD44C4B0969E9E5DDF3B8CA44B8BD065C77CD2ECD3A946C
+AEDA6FF655D5F8C94509F27934B9207534C98CB3361D8767D22360F5C4419E52
+6A3A861A6C56AED8F6871DC5671011DF104E31B3D5DE68F2DE00F49673BDA295
+F03EE38F4F2BF2CBE7274A6A6694DB0AC0A90FEA1714F798096B0B47453B9F9A
+6E7A4652CEFDF5755A0C9F17C5574FC5E5623874D5360ADCCACE26CA2393188F
+A81CAB8D3F35A3FC81D43D450A073474A391A31D7FC994416AD2DAB64AA6D4D5
+9AD3DE4132A10074BD4A27ECAD779F66C3711BBDD7AC92203583AAF0E70483D6
+FE5C76A25FD50101D6DD76C9898E8A996F6DC34F1F22085EA743F966D1FC36C3
+08A4CD8D337DCC8E1DB190750FBCFF37726FD48D1E3D036F1556B755B3C11974
+9F81BB7C7B6430235FED173EDFD5FE81A1815F1A424E372485321BFD6D92ABE1
+C647E7A18A0CDDF2CBDFBD5BC0A1A57855D4AE646D27063179B2FD6E2A01367D
+95D63DEB069446A7AD2346ECD9290472E4D057BB82F5B2F86C8C81FA765FFAF5
+937C8EE96E839472E591378995354261EA890AA0CBA33CE29A7CA6BF1DE2E312
+AEF2DF4F66B742C91BCFF17635416598A0CDA87D2B94E0AF915BE7EADAFCB9B4
+5BA814C81CE08C377E448EDBB082987970203A20B2BFE8B58EC3E6AEBC7F0CE9
+DC5733F5A05CBC25152EDEAB6507B8BAB2736593383FC9FC744EDA54C67726B8
+199A3D9CE9DEA371CF1B47FFB18951D8F350DE7FC5D45BDCBFFF8005B92DC257
+DC098528B4AC8BE791F5FC75068506C2ED97CC77204E2F37248A2BCEC9ED4FED
+510A7B9603779B68C57D57A94DB76839004E736177752A2A63BCE0900E00B493
+519AC8820D96F9304034D948C8309E4D199A5BF01052C9F807D27FC0C1C20C55
+1AFDC48CE6A0529E32AD7C316A4D313FA9E28D5D68E4692C48A9A030BB275DFA
+004B19FD59F6ABBF58F5D2DF093F0ADE1EE44FABEDA97C775643F4616A0F5262
+076FC11E2C4607EC5AA475B89BBA1117182A9CA235FD5BB9FE9B15798658B285
+6C35315A41D5DD6BB6021219DDF2A30C7A695330AACB6D180F53A2C5AD703A8B
+41256DBA79173524A8020675CAB62E557CAE00B396084BA76A734E1E01D46BFC
+25AABBA5FB4D48A1654E1BCB76BB5E792B2E73F6E7006B6BBB435979C8218585
+C41DEB66A2B9152FEC7CD454B4EDA06A73F35AEAEE33016A2142CF0623E93969
+F86E81D72CBDB19B4BBAFD70DBF0F8EB16443A9987769C532B2A5053A7B55910
+50E459A1098F5467E8175AFEED1354F1C50326CDE9E761427F585DEC3C9A4D36
+A76A9CF4C0EA0B8712E890F81AA6C2A9A81C8D9B061931F75A257B93723BB6C6
+19CACD8CF81536DF0D2A466463EF195AF59B5207CB52D0902AEEDB39D79EB566
+F647A9138A81F7B3300E8D1CA514B6C481904879AF3C99EDD1D94CAF56C61166
+CF8D8663E452270BEC6324A17F6893F1447BB9A3F086E54FC1C2AA2D7F58F66F
+7EDE9BE293ECD25F74AA7B10E3DE10513B13333A4224EDE43414EE9F86978C1F
+0ED1C404CD511F243A1632663BA338317DC7B684A84C1D4E022D567821331064
+D16F76253F14F91DF2A50E2DDBCB6750D6A75DCD3356AEF7CB5A9B699DCDC80F
+0F530B66BBF4A60F102C402DB836D29BA43941AF05680AD51D4F3EC668E6AFFC
+CF0D36B5CDD912A6CAF2082B702EF90E16906596E4BC20CC979080CB78FFF0F5
+C928F5EFA8914DF3E56D33582504840071B2FC38CE433A6DEB63E6CF6E808E87
+9866B05DF8116F0972DD25F2FE5232522057A095E311C247336F669BF10020F9
+45B9B454DAE2423E0E9B432B1A2E3470EBA9CE177EF28091EF444045CAD0EAEA
+23A3B620D0903FE4185340014920AACE478E93919FF0C722B77A448424D0DEEB
+819B8B686125A6D8CC719711E108C6A3F9EC056C4400CE3B5D209696A45F5CBD
+913F3A9AB9A6BFEDACD7C207DC01DE4554EA63400489918123741D1AA8843EAE
+14BDDCE827785FC2324CE7689B0B7C2075A87520B253AC1C61AE34F5AE34866F
+9B68061D1C1D4E4C5763DD68801ABEAD6967F056B8D934CF84081A6A82DC2B91
+2A0F350A5FEED1C1116E3E94A18427CB4A4D1A6935532FC4CECF43E10497C190
+AD3AC6C300A57715E3FB715AFFACC30D4D4EA325AA52DD9BC29FFFCC3646A7E3
+F97A12FFF8E0E355DCD3CC5E68CBC9FBD67DEF5B5157161BBFF5B61C401AB639
+DCACBA6C3F09E9683F872288ABFA4176CB69B8D5E61AAF135B7019CC8F6AE07F
+573B897F7AFC0A5FDE3A922DFA3529B65E62372F2CD8F57B6ACA0FC382C148FF
+A6CB30FE9E9891275705FFC71211EBB0E7307B00E629E2CD9F4BE16C072F3247
+51ED89B8B087D69DAE1D6EBC237AB8D3483A8F9D48C2F6B465430E12756CCEBC
+1C5E3566359B47A0AC0B5D4A5A1B1712457FA33FA5BADF1E302CDFDF655D5ED0
+FA9C6666022302D1DA091F8A19CEF58923AF8996B4A5AEE228D166812A6BC684
+9C89B9E6F07B71454B91F5EAC87333AA9B29B1E83A3FADFCCE5AA5044FAD8167
+F6511E27E444AF65D09B8A7A0312BF78EB35CC34545F9BB06C88A074EBD5BE87
+763B3EB1EC2A4CADBB704F7A2DDA34B013390F0B63B0A618C6CBC2A7156608CC
+332AF4C93466EF7D18E85DE5C5B3D2AE50A44DAD39738274E4B1E8D350FA4ABB
+0189273E99A3D9659AFB5C29C68FF969D3681D28B9322EB08214CFF9289B52F0
+74E74ED0F1DDCF8011A5D3BC4AAF6D8EAA4643C347B912544026D328BA2BFB5C
+ABF3D683F2A0AA01EAE0DC9760DAC0EDDB432415B1221D35391FC5BC5A30AF20
+79469870D85F59B9BA86B928A0BCE261D4A2296BA7AFFBBE7F1AEAE1108CBE81
+C2E5C9D7F0B64E634268C2510EA92E10C1CF3AA7FD146106513F7C1F63823DB7
+F7CECB5A80ECEDCB41D3E91CB4F3FA9C8FBF3F62A0C488933D55DD2DEDAF0947
+0D067211819598DB2CFCA285E3A8F74E7887265847DFE8353C428B253EFCE70A
+766A823759D68B665CFF11BF62071F2F8879D076429DCE282C36ABF335E2DE77
+BB53D459A024B61A5CCE35ED62239410C0E6D2194CE14EC54DEDE8F86BA83FC5
+3EFF391C331C78C5C9C754F81D1FE358D76E84F470BF6DDF6EDD643E62680098
+03840FDDAE498DA27306296B282E76A03EF8D593EF0764AEFD4167C98059FCFF
+CBB638E477D6FE42537F6F7BE5957B0EDC591363D434D1C60F46ED853E8E343B
+68CC70D92BD90958345DE0CF9F345AB7641CBBDF225AED9BF559F6D2CCEB3D7E
+91A0211CB5628CDAD748F37A8E49369425CEAB98C9C4F4F0554F263371D2C9A4
+16466A96356A3EEB31C362478D5D6B849E02F6F1F7095F9A7CDDEBEB00524F2A
+3191A5B347CD1C75511FB605579D6D718723D3C1E26862F78B5803AD3E6958FE
+6777D6E374B40F799F13514A7DAC43DCC6B68B7A5A0F25A57F540FD87AFFBEFF
+3BF2D62098BC62B9F111E663E753347E7B40B2430E89C4056C71FB142DA00204
+6D59F1053CD6A1A030B6EA70302114E4480993E3447C926E208226375ED723D5
+B18698957750DB23498A960066FE6FFDF50B97B7C46960DEA0170CC19568A0E0
+371359569055135B47AC83242238F42B29A460798E246A70185B30A026762C21
+B0F1F1EE8F3F309AE8CD042DADE3E36151B3B7929BA6A14D90D924CBA141D1B9
+8DDE94E46286CB6BC7604D84389890C0AA8B97D329CCA87E5889F695920588B4
+582B88B39CE78B8C35836AE8BC5C66A86DA1267E46BE9F20186DC3BF636FCC29
+141302F57026469542DEC1E8EF2B54814EE534C87A1B4699D58D1CD95EC4B957
+802383A21B8CFBF29FBF643E452898553CD5FF01F7D73E461CBB43186A96C66B
+BE5910A0F78C730FB54611E4EAA909096A77574AF9F481E0CB8D15AC003F336F
+F8FC934023F37DAB1F5E0FD58575440E3FABEC39851905D14FBE4745D11246AC
+2EC21E7E547F4E0620EC4900C327E20248F7F6D60BFD8564FBBEC1D36AA9C27A
+5796EC4DAB33961A2493EEC2035BA4C49FE459BE440562DC1AEAAA6330732146
+CD7E01AD940744DBD87AFEB4671A0A0ED5CF115E3F4AC466A741F086DB742965
+3204FEE04DE803F0A0F53D1EFC1A916EE0EACE7476E1C173EBBE0B560E95242C
+5CD33B424B8BA6C9A26CAD4B4A3B37C6FCF2EECAD1E8227203686172B25B376B
+8B03F6B7C6D6184CFEF80170C1E8B97B77B3E7DAE20A8DD97B04FA0D2B955F92
+8994806F6B43944B520F4DDB8B0B6DEF2A4AA7E427F6524B915FE5145C055915
+D2753FCCBDA11C598DE694011B929475D5A1855934B03118D52ED86419047DAE
+CAB3FC969D072D0036319B517B51679755B7E5647543BE8C60387800139D5F8F
+1002D480015EA8251624DC1442E7FC84B46356200BACD8C99F1A581DD42F5798
+5B5FBF460CF1F10E3125211B0128586D65B73107E32FDDC354541917310B1467
+D92B15C317576BDADFAA7334C14E32C2D811B22E6ECA84BE80532D5FE222576E
+94D6950015F2EACCA793406DC18C427864AB6F4E97EAB9BC634DD0B3179B9EFE
+2C496C1AA898C2E821E23B5B16E7C3081360CCA50D42A459FB603475EFCBE5C8
+8610E9D856933CE6328DD3EED0C2EB4497C9D7622259AB0CCC303901051C4136
+4A235BF3CE520FC4A6D4E99937DCDCFB359D15FB1830A434CC01FB8A840D893F
+79F38DA3641419DCB90165FAF459070A2C4205E1772ADE564DB3E5AE47045EC8
+83FBCC23CC6D41C71E83A01339C2BB9A4E8FFDF67D3DD149C13B8615EEBE0963
+21F59731B52B83DE23808F86523F88464599EFA1E726D3C080D13752E18AE05B
+60CA2052E559B00E9F055C692F1EE98A0C0B734035A21D59FDBAED45C5541A8B
+839F9757C6D3041144879185F75952B2E1A19B01CA1665B50B7FFC911C4D9D1D
+05B0107D9FE3961A5B4A447C1CB3E8E88836D9096B656FA15CB9EE3D19A5833F
+A5899996A26BC047D0F69BB9D243328FDA3E9D9975DA456946070A48E641D10E
+676B14F21A2610055B5D7711620A201B465EDC837E661D4633AF96F60CF1808B
+D32318CA59537415287AA572AA8CE82E522ACA934B9AB564E1648E3378648C26
+01C8EEFE576BA9A308E2C0EAE7A100F57C0DEB11623C6FBD57AE045048D4D1EE
+81622AE08EC95179E21AE1C6D5BC9A0463BADC098E282B18255A0414270E41EC
+B98ABF908114CA425B3E4609F5601151B3AC79055A14E1A2CD87ADE46CDC2047
+C4AB59252E633EBAE216F9EAFFA55811772ED0B7A75CF4AFE8A7E59EDD252CC9
+43FC4E60B3E47606760D06E3C22C599856D0C5FDFF00627484E77DA4D6F51460
+5412849807945C28B25A0B684E33D02EC26401708C1DCA683C85FAAF9F3D74BF
+66C485F3D5F73B785F0A2CE231538BCC1E9DFB145152768C84E32F33CD0BA1BC
+36D0B9383AB4333598627553202A39EF3E696C8BC58B0446D514822245D888CC
+F013C52BEB7067214029B943D7E93FD42BDD589FE1FC0AF049E20F60A8B03B41
+5E7D4CE78FC1229D48F7D751407CB8ED28258B6ACE47F74E0EC4BAFBB4D3327A
+6EE3977D9643A67CCCED9D34A563CCFE8BE6C57CFA39B90E5BF8AF85BFC30B7D
+D6E697AE61FA9633EC1C7806636A916B30073E4C215280F73B6BC10DEDB15202
+827659B00933C6486E67F96D81FB80CABCDB9F159937989AB3E55878D53394C0
+C7D5E16C8EB90551B1F0DA4F06B911CE34423CC2328EE5E43292D03C9A41D13E
+871EF89008148EAC9C5CAF24729019609D114CA82FBAB5EA34311D5710EBD6C0
+37F9D4A31AE64CA73B1499B39512ED67B605EBFBA6682D0DD96E23063CE3830E
+AAA4CE2F1C6BA52DC2523DF4B3EF1F97298F2523123FEDB43F295D84E9F5AA3D
+E6F1D4F813CB884E940A216A0C6658D1E69D28F2CFA4DEDE60059F4E919D2246
+9984DAF8A569DB04FD56E11116BA2296BF63ECD1B65B3391E6D8B8A8A8B95318
+8F9C9B88B7171D73E0921E5C9959186A20D01982D38CFCC5A4F91D31E0FA8503
+E05950007B611CD36D3D714BFD49F6DBF09255535579D0E0E01B540E51FA68EE
+EA6362213A0B8572AB83BC8E533B63C6FDC4FF52507C34739F64C528A815B8BB
+628BCBFFB3CA3C2F501182B46DD1A72580E91BF85FEF40029BA737438729C51A
+BF25EBE3882B8351D0F356A6648ED0F11174EA948F3F140FD7DE1821BED2FDDF
+8FBA1DFF2786C0015EC2A8437DF5F02AF89CA383E622570EFCF2895E3CDF60DD
+A64B152E2F5B1DA795F50C59D80FD35AA7A2CA4B55C3A1E046C3C84882EB8D86
+AAC4750A3A786948FEC26CCF63395208DB2DC2DDB6310B59817ABDE61C856183
+500C350E58D4847F1FE95FE6068508A834B4882D863691F3DE33A9953000D8E9
+A8AC105E3486CC974E06351B1365D157A6948D49C904B075C195277F943C80F3
+786F1CB9D118766439621C23095FA5749C945E94648E70940DEA20F7BC66AF49
+0D6BC622CE00143F979085824A2A1E850D68204BF44161EACE7F8AB0E8097B9D
+C4ACFC76E36776BDBFA4F03424C4E286A6B925B98EDE522B21641C95C0D2910C
+6425C3465AED57BC4ADF0633D0AB3716F5C0EA050C493D84AA1E0903A20F0E3E
+04F2BE6265DA7D2E5D308337E1B50D361D0BAFB054FF5292C58E12ED0A095870
+D39C50CAC7B0B010DB79001816F7C5EE04AA562E11F87CC6006B9396DBBCD9DE
+4D25B032C5419D85D28306FB3543971B4384AAD68824D78C4E30C945B610E315
+013151687496006EB9D8E867B82AD13770535C982DF8F84EECA2E8382D1971FE
+8C4D0F28D8CD60B2EBD10550F51B3DA50C7CDAC3553F8530D596558B238FC24E
+26EFA58FC455D2308625E4ACB5A954732750A03D25A88207AF626534D73D7086
+F21936FEFC92FB0E1942DF5E43A52DBF41595BEE66DF4C66A769D9C3B316E332
+F1B94E86370C14DCB944486E47A0EC71D4169ECCC072BEEFAF645A4CF3B8AC01
+1543972D34F94639C7CE00CB64F522BE3053BBB55E8E7470680BF1F01BDFDFEC
+06C3B76ECF3D8BDF4A150ABA5455ACA30AFB5F63998B277BE7EDF9268C07A751
+9DCC7CAF54B1F615F1D03CF3E58A447C377929CFCE75A6681A7BAE4FCE70281B
+7E4B69B0288633D39EDF2F69BA310ABAF715E9B1533EF655986811EBF695DFAE
+902D7C4F1FCE16EADC43529513B9DADE8F0F4DA4053549A930D311977C6AAE0B
+D5A74E1F269D484A3A209B8F87C9D5A1E4EC5FCB83A2292DA43389FCC2756007
+EE9FC95E4072CCD35BA378DB6CB79CF7B27F017F1C78CDA81D887EAD7A9F3BE6
+53A80FE9B5F6B159E32BB7C927B069B0C94524F061C8D05810481A44A6F12846
+31FDEE232C38AFAAA1C81BC3D6DE2A4563A2656B0978DF8D53936C728C3F78B2
+671E7F22CDB339E25111E66AF44DF414EE12268DBF4409B84130157D861727CC
+259A9E95B9BEA0D98F6620001C3912E22C2267D7EDB65E2C20680728C4043D5C
+0DD01B294BAB0A5AB7936FEA9879682F48B1C39CD600BB8CFEA75F04D937E654
+80225375EF6F2EF5B77857FD79D050A2B20BDDCD94A9B455A09BBC746CF8D5B7
+93D5CEDE3997B1CC75634E2DA7B19788083B68F6B8ADBE69276F0E1BDD33408F
+27497492E0624F96998FCC221F8587D30D45E56E5531A730CB08345B9E792AF6
+4AE3EDD27A5C6D8E0F523AE7C97E8481C775922B48E3C91F09DF62E1D41F26AA
+F5C72265B567BE0B283D6981EF0AD941619574C4584CF84D9693E0CECE14F76A
+594D849968EEE1F0984C7B2A37544FB2EA102B1ECBC8E48113579EAFB12226A6
+CBF0C0152DADAD834A437A3A59D6672E74DEE4806A820477FD177A8967023B27
+1291B58E507B0F68FBBAF99A963E9F90F4A846F627FAB4A2E11507689C4B5EA2
+D0A79B352E8722EBC3A662C84F6A163B64E3CF96C59AB5FE04201C0DBE426AD8
+9C7775FD046E1F2F4FFD1CF5820338C5353506C34D99D474054EF9BC265A260A
+630CDCB706D2BB45C343E8918FCC8F65FFDB3655F565554D1D451B416EA838D6
+59A66763C9515B66E20932B41650E01A27E3A250CDD40ABDE0B7DBF60FD08700
+6885C8A7DE9F14F7E8DD6CD85E4370C2E3BC26AD2AA416A36877507DDDBA6832
+58E0A4BEEE2495BE6DDF7C71066FFEDAB5FAD4ED9B4D6D97B70468AC407A9FAC
+EA45B5F501611EBAE7CE46F9FDEF54AF912E238315325F664BD295E53A05F73C
+5318EAE8D4A34E472776F142C57F34087277308336A511A3A65B4C4CD419C288
+F6E5206D62CF4364C478E9F4C6B64E51D2457CA950B9125D22ADDA4AE08AC275
+8C2399EBECB69E7A5D0E31726E520DC5CF7492C59076B3AA425383A04C653C50
+34E222AE91DCE83E758C1C6DC3005CA2757CA73102F584CD2E799DA49C77FF12
+4911D74BEE8DB74B1F0298CA0A9EA5BA2459056D6D6CAB0A90A68986D492F5B6
+DB37630B7058B6161926BAA0D62C8511000BB7D2FCB92C5922F0519A1C1B3977
+81329801A5702540D4F84385876DA07CBF5D648BEC2030473C5FFDCC29ECEDAE
+C3901C5FA181AC12187415086F68D913CE9993D40411810C505DAA8613C80EC0
+91336623D5686BE49074CF8A39E1EB7BEB212F635ED15C0CD1653E692623437F
+91314D34CA09C3F66C6C1F11BBDF5F720CA4787F2441B7B9AA47C7FF9EB113F5
+E4E57EA7040314E093B6729CD3ED11D18FEA94D60E1D976C786EB52475293FD3
+C0DFB12695BED5E1562D3EDF6C9A54120CC23CD025D0D3DC32A37C5BD00D6263
+5D2808D9B2E2666CF4CF92002B9F1BD2D3E12DFDB18D40DD52CB427662ACA883
+1190B5A2F9860B20D521E55129E7333DAFAC54ED4783F40A8A7A69F04D7C286C
+A52B8F3F608BCED599DBE28AA6F69A0EA54CED3B0A21D199363622352E8898CC
+9B5B0355CBB533E6B179220872212360EB718BA0D9EF404E4FA7439891D2370F
+BAF1CAAA2802FBA445687E743200FA6B9E85266EFA88D05E3B2720979A43E724
+64F79B714FBCF388EF35E9CDBA1B8DFCEAB836395907A0EBF22D285883B1B3D1
+772E00B255032ABDA52DFCC0BA366CFBCD081156072DCFC3CCB903C305FEB7A6
+D16B59AADA73E1A06073D20392DD17D1FF43C4E01FA6D5801BF3C61887658A72
+32E319AF638CA3D03BE51F832F9BB24920B4E47D0E3C96FB079D771CA5C310F2
+B8B4183CB714383A50E3948F6977B16F4A368C086B2A0AA57C66B30A895B159D
+CB63B0FD7990279EAC00F0146D58282A8EA7367BA2885660ECFF69C64F4EEAA2
+F357FBF8A514D1002CEFD82AF39D461E2BE59543321C7A991B9576778C5A7EE6
+34703E9842983E2580DF60DF6EBC642EDEA4A1F1CC34E754327A02DF2E9415DA
+08CE3AA32E1A615A484E69E6BBE4A64C2784E27626E017DC0DE42DD71EAF55C3
+E3D15BF87E9727FFEF3A66512C9458E557517BCCA1A2E92191259D1EF91D6E12
+6454380986B17C55A4E631C6DD20E5F87208D2045BACFB6AAF14129108A5B35F
+41B29AA518D795C955EB247BAD1D1F03FEC701BA6CF3261EA985A932834834D7
+DC8C65409644E7315D66109D8F92DF5F42070B97A2DE3B69EA97CFFC71511DC4
+24A903C704479F445BE051E96AEE9E220EDFD0934CE793AC43843D88EA12757D
+52C10F73BD34C812C1B306CAE0F18D7D1B095B9F5EE76256605E312AAF795609
+94D3FA76A6984C63809F0EB8741AB3AFF516C3D6F8FCD8B1A43F5912A2D98019
+EEC4DD105E77EE0EFF0D69A6A55370771E21851B58AD57332DE44B5B2B2AC29E
+B58FA30709128A9862C3579CFD08D85E8188D26EDBA5901D510B258531395FA1
+7CD5E059CAD028AF5AF313AAC4B8BF60966CA2B53DB31F0659898D105FCF4FD5
+DD2B78C838EFC626CB81B32359CB11C5A3E9F8ADB8B1201240E34009BBD2E23F
+C624C1AC532746372CD00EC50C92B576AB3D5F086B64119510DB8294D48DDCE4
+49FFFC05594275C796DCBA291312159CA9EE7BDCF3613EB3D962B6967BFE2BB2
+5A9A441DB81FC861B10F910BCF5E80B77F506EC8A64E6ED10839333BFD7E25B0
+CF6FA7AAEC17251811C44031C7871669C3343CCB0D0921BA8A9546E2C052CAD4
+BF765EA279DC4446F1D31ABCB9E6358A11DC2C1AB1CC71C244E57B4852A9CC36
+8309D3B5C0FD91CC6086DF741237ED81F847897FE5CB939AF97C1B9022CCA3CB
+227B7C49BDB2FF6AE381E282B42D22BE5C6326A8602BF364BF81FB7367BCC437
+DC971EDB49E8C1AABB29DB90839A1A70CD20DC53DB0CA61133BA0571D00FB797
+13629C59658360CC0472882E8E6F085057ACA3FADEE34BE0832241EF68242F90
+AB650BD7FA6E8EF0DB539346515580E57D3B08BF7F9846911C6779A481D1B348
+D1D0A1265498F0ABCD04D50581ECCDB89117E4889C4BA30DE7155F6177E3F40E
+1E9DE1367427C3A1F17C27AADEA655D59CA7B6C2FF4B833442BE50A87B2D4D1D
+DB57A8B5C3201433E00728A9D9511A46C3442C3E29F6D9554402A516796E60D6
+23E6D61F0ACE1B60D45CABED468523416532810C10DF9E7C711F5356970D5FEA
+FE5D366722FA3F10E097FD16DAA5B68614E7D29636019C4ADC916AA6F45E592B
+C429AB5A668E1795DA4F755D74126B6E230587AA57E3F9630715DD6F224CC236
+A5F67B3668261FB2D2550F16A9700B1D997D2801EBBD0F113C47B8A13960775C
+6FB40EDF6D6276916BE3198448E020A46BF782B4F02F3B1C85FCBFB2B2F09578
+F90BE57A53B596E9499F9B3E23DE0BB1E159BCD9828A47B3B1256D305D879517
+E172C1E3725C4771B3C03C9AF0B62EA0C5AF7C0D692F94FD1E554E3E52A0E7F6
+835B95866B7F72514098BA1CCE2C3613FCA568C3594534167648E2AE52BE3F9F
+E8207FFDABC084BC74DE49FA0E8C61739C28C78CC994AB707C2C04860F0C3F03
+5929D056CC4CB6FB4BC1DE83D2FDF9B2128667B6A2FCD13626D3889D83683715
+131AADCE22BDFCEC3C9B03E50200BCB5321B42D108DEB519A5C9992B2D3A87AB
+4725F5DBD2094F8D9ED8835777C2793FAE8FE40F3EC0DBF4F1362A148F890CA6
+FDE1970FF1CDAB096D9355B755AA0D93E6E11E9D3B1F5EAF537E48C401A75C85
+58AB20685E5C29DAAA6A9F90B066E991968475ADEC1F946C522449C0CA2A38D6
+A8789A6871F96165AA3EFB39089D22EE69BD05B4E0853D3C33CC84FA7ADDD576
+639456DDAB65EA50A3C711F78E8CACD7E112035D5D1633819EC419BF5AF0CE9D
+40EB6603A55A7A2BDE2D6E9FE476B1ABBEA673B397F2510066D0D5AA650E3D1D
+BCC93BF8585AA04228DEC13A6082A5DB015A70FCD1D3EF72A1CDC6D8A9705E02
+662BF3F0F8B318108CA4C9621C01D02EECE3817F9EEE14D30C34EC262CB9197A
+377828142C04BA679630C281AE4A02E65604DC7FF73859163F0F0640316D079B
+D42F807A41D0D128E010C3961B8A742908ED989BAA0CE2BC9E9C26DD73DCE3E4
+7E31D958F4DE4E3A1B161B2C5DDDE9D1C693745D146C83F807E5BA7E00057959
+F00E3FB89781B4F084F5B24A42113E4B74933CC32A11877B4499A19272B60985
+9C936AED3AF65C3156C8A705AB51749F99263FB2D2DC4F21F8AAC6C9168F8D28
+414A602824BA3EBC3FBCA1A8D29825680FAAAACB6D9B357B437774E6C6A1BE61
+7D146A9BB073E1903B9BE2CC9CB5DF888C51B73C8C5674B172E4BD5286F80E8C
+9718FFF592B56E1BCAF33BAA26F5FD402710D27A0CCB1BCEA92D9BCA09983B1F
+56701305AD3830A74CFF0091BEEA6C706C3433977E6F3BEE52E77BD7B09C1D68
+37C3A5ECCF06F8CE25F105CF88FF3239DB905472E10CFBFC4A0FBC8F587B1017
+26A6080B364D6C3D7D8988AB1B4CABF6EA6C5531F8A82F99E5B111C81F9C9412
+0C54828BBC82865316FF0D9E8920BF00E1BAA976FEF21D0A10E8FD9837799623
+E4CD5E216ADBD1D76518815FB49EE4AE73AEF9447255A99CCE4EC068959C8D9F
+6FE965ABFC53DD09C063BFC80BC1E6463DAFBFD673262840CD9BB67AB5CBFF2A
+383079643499FD42FDE13BE2FFE2615152FD8457A547FCBE2C1CE0691023CE42
+3409A9B2B8FA9C4280856899D1590B36596B93282128E6AA6552B8BA7072E603
+FE13711746B110FCDE142E497CB2B623682A60F888B1514F7CCBBD86150B9DAF
+24C9B763172C14BB79AC1F8AE60F9847D9223DB0ED5F3B74362F4AAE3D466311
+79D35B1C81A2C48205028BFDE7BADFE708F104A2C41CD32BF8348E206E251EBE
+FA68EEC9738CF3D3462CBE7DBE7F725054F08D6B9F1235C525F8E84287381A20
+10D4AC542CB292EF20A215A3BAD7CB43686DD5675663BF23D89E860D392B6FB4
+6D9021EFA0FAB6E04999DBC8CD3E84D1C751B8D24B4DE92C8A80E23488882F09
+D62FD350C636F73DFF5894861281974195F6BCE45EF55DEFFB318001CA8EF32F
+864DD1459613772E6B23AB6B68769846BEABADF07BCF11D78E26CD09E76AA9AA
+F5F88F95AD6EA652C8E08D1A7BDB31E60B90F31308E223B6B8262A39DE23BA43
+EDCEC76D6C8D82622F980DF095EAFCC83B79C206A314D4D83624B2617BAACB58
+304274ACC6BDF5D2F0529FCB76E9B5BC43EEDFEB149D61CE36DD4672F80A8659
+331AC6DDC433FAFD85BD5A0E404B878B2A34BDF8EDCC7E9E9147219C37C4CF50
+1D48B7F84E95074412BCBE0C060BB8FF5AFA81D3D8F0509EB8D1B2950F5CEADE
+51BF7B714B9784C9A6A91AC635C09CAC5BA326D1F5C52A636F2C6B61BF079DE1
+47815674304950E4D724D68B4CAD2B8E641DF1C7B6F7587D258EFE9CA777E2C5
+CF2DE3D47D6EC50B3094CB30EDDD1B31A58E8915A4D92E89D0550D1630E7D47A
+5930E1A7F582DB33E1EAF7B15E665BB214F62D336F4D90C6B8F467460BFD411C
+0296ECF5019A05553316BA7286B4B9B4D892AF6906FCE7241AA12A18C50B6168
+F299DB45B7DFD3AE5DE34753A0E497B0D94B0178E66D38B494F850BD820D668E
+9F3ABC7142C364D5E26345C6BF93B08B0CE0AAF87838DB65834DC4117B3CBD59
+5D315844A0CC89757EEC0204E2CE0F2A2248B860FF1DB439294E9E107E2560A0
+B804AC0CD639E314BDFC7A689BFD77A81075EB673A7C818FD97009D0BFD4B121
+46FC748FADD2A1CADA10A04566049FB6E00FB8B5C928989FFF0AC4A102D00693
+0FBC36B9EC7098BFCBE62E49F317267F5C8FB541B73DFC277DF4E8A049D09835
+ED628F1736AC2E6F4BFE40AB17554271671A348C4CFE13F58D0A5B2A7C3D83C9
+EF2ADDD7A6B674AC1B96BA31A10BE2276F45BF27344636A19E09D78E56798DE6
+774D7FE7BDD3C18770CA1DEDC5C035E4623BF5317F724BD8EC0324BC1881C437
+4EA69508C35BFD66D768A0AD744D8978DFB3DD210D5629A19D6A70DC8504C49F
+CDD35E164B973CFCF36DB986C6C618AAE4C58D32E21188F8C5760DDBFF24C3B4
+F0814E471A0B76950A8BFBE86DBEADD5A2662B56A078DE456FCF8FCD25164140
+694844E5ABF924CE7CEDDBCF7F4492AFBDE34610AA5B54E6E5A44AF50F0E5464
+877D6855416CB8980E1B114B6F6597347C432F2D29E4714A6BD4F3FAE8FEBAB5
+551802BF47867563FEA5290BCE8022DF9D293FA792238B7F00F84E0F99163B06
+744A2EE93224CE855C72E1FDD0E52767A30CF3F0D451081EA69D0A80893FA79A
+1D25E6F56DFED691E90393FEB1A97061FC3F2BCD4BEEF1C6F56A0514EDE39BA6
+BA4583B7FCEA404149425F6969123B3119AE25DDFCCA3F2F672B98BFC0C56907
+DA2923A73A30B8FA2377F36620CA0392651CEF036AE31F1E5FA9B2DC87F2E8F3
+B1964898A76BB97DCC8C63101EEED39ADFFAB3BE571AE0210309DCD4E4346868
+DBC33FEE28431EE6FD3D64D570E04C269F6D905DD391D40FF03CBEF98214DBD2
+2BB4638F41793E842B07A9CADCBAC476A6FB9EB23795150785AE1032FB16ECE7
+3DFE9AC0AC961CAF16B492C79B669A9F0FBC7F365BFA02C3981A324E047DF5E1
+41D2E85D6F472A6BA1D1CFC896E3DAD437689296B2DF397E40A6102493D09D29
+06E359254F761F3E1E3E66938270BD46C6DD1EDBDC60CBB35C47D6760B17B782
+76F6F472D584A07146C19846AF187267E7E1635FD04F311B7E70C7A33018C6A1
+943388278E04542E454FF117491AE7B56F3FD5B01A31A89F85ED680173087E8F
+CE5365E1CE48CD62DB5AA71F4C2369A09BE3B0C134E550E72AA7C299FD3B26D3
+8D3D744758A87ED77EC946914B8EC92136FE4884E30B545A2CDB474FAD36B557
+509C986F87D992FA39BA7E8D85D5EF322ED08B1EA8D90B9E391D47D3FB2A3B9B
+CAF230B61E0F987282BAF6B10CD07A23E3468BBF814EA995AD6224FD4C919D96
+A228947D0F2BCBF4B189F1BB9D2E1D1EF59F20CD6A045251905C39431C548318
+9023A4297D0D21E380F93C9FFADDCE951D0ECC25D8A4967447438DA572CEA724
+6B7743FB7D68783CEF142E50212C166D2983DB08B1EDCC59E426B4D73716B920
+A14805FF0FB04DB3F7AB70A1068CFD39DFE12443ED4E8BB832DF520B0A750139
+57D9A8F4CC6AB8935A3C01858A8ECBD75F740652DFDD752F4FFCCD4278ADBF75
+C27537AE1D759AD75B7BAEB3401925949E4EFEB1C20D441996D671C51D327FD7
+FE05253BAB53DA22FD071BDDF4DC3A9D7BEAABF49958249B5AF68B88D96FC333
+FE7D8781FE9EE147E162B0F0B487272D44522D8FA39842C472F9D527149CACE8
+AB0AB0E6E2D88C03E62AD7F6BAEB6E67C8EBBC94F330EC8DF632A5AD89FA1E9B
+D953CE17AC117024A9E4671E5FC05FA194D38BCA2737E73D079881BBA8BB78D6
+0F72C39FF3F87C4161458CD8F6E07FF06312B5FF9F157014B545F6F1F58488F0
+E64494C390A6CEAAA53576A32D53CB5B51563344002931AB82AEDD0BDAA963AD
+902B6AF937798843B5DF895CD487402ACD82BCC95D10FFF93F71FC4C93B737B5
+FBDD6DA8BA8AC357620F0395252BF8D626AE942B759F18D26C4667C67BC43ACA
+FB4240AD7DCAB1A702E3AD59138A1B958D23DEEDC8F24D46CC0FC6B58037F447
+45A537C7B8CFA4D8494E737358151FF023B729C6BD069F980F33D5DAC4E278F0
+FFD91D253C9AB617CB9546F992615C1647123D25E8DC34B257FAC60B9B04B7AD
+AE705AB62C31BB5A17E8CDB319B7A6601E8D3A5D144479AD66ACDF016B351226
+80ED7942FB3E3CE3EA9C19ECD870DB4B1E616B0B8C5DF42551FAF463FEF88527
+0367D3C5C0B8D9CC318324D3722F36E62EA52C1C7340A4756C8F79CF1EAE7A54
+66FB610907CCFA40C9DF6C64D2AF33427AC1E44A843D417C2CE47E768132454C
+42BE3CCB830D5BA1D535E0E0A58D1AE992C552D3C0C1A468C79438247FE04119
+7D8217AA8E7BD66DB305893269F99E48A3248DD33444CD317B6B13BC7329F9D8
+50AFC5BBCD7F7E8A625C70ADFF0FCCC913945B53DF83468D72931877B664595D
+1189CF5E16CC19A1C4B0C8A1B9861593F722E654DA0D166DC93C7DDFC391F223
+A9AF93757B01526FC9737C7DFE7258614F23E9C3FB8DAFBD8BDAEBB411E6B106
+280A4CFD7371C884D1CE8710704751B639ED78043DFD06B0CE0EE061E7CEAFDC
+C442688CA7341531833129B28B6A3F012A60EB39FF5CAEF433C13C60A6F1DE5C
+C2E8384E7708B86EAB25E29B10E46350E3A0A01F09F3A1B09E79627A2B66F6C2
+7E5F1C526FCF92AEF1399BC65C6D6C9E53EE1676A7BC66F41F6C97A8507615FF
+4DCF870DE5CF27265693C26AEDE7684882F920B5A37C98F5B3963013AC586135
+B5A5FC99B222CF400D777EAED21F3B0B5EB3EA34FA5333EB5478D17AC7AEEFDA
+368AB0CADBDA738B602D1186D3CAC6D79ADA72D2E1F2EC7107D607B663A9EABB
+ECD6DB66E5EF29F60C54928B28A0BE531AEC484EB6B43237652F9756C8C14B64
+FC229E9CF2CE82018A7F05694FE9234D5886366E342384ADEDB53AFE5CE37222
+F00C4B60A4837F6D2B04798360D2E84ED5EA7A8EAD38DDC0C1A30595FEA4F2A8
+E1EAA5B4AD4C4931B17A971F32A07B9D48DB35C083345DE2F74DC9ACFA988B3B
+C909264AD0E95EF95E475AAF7D3681B4298F24854CF9E93915530BBBFBBF715A
+0D6E9C83FD5E0189D714E5BC01BEA29FBACF253A0A2C07D5774AA8ED1E837452
+1DCEFCCB4D39FF3B748F1EA2A3A02E3E9562814340CB4D01643745A795FF68B8
+7A49AEAB3F795D2887E1339AB5E58E97CBA70D62BC844EBAE6CB0D9ACCC55D0F
+22CAF8510023FC9ED3307A31747B1616A87026AF5E8B7A3882041AA8F98C7FA7
+BD28891EFAB5748F93C9983ECB6EE46C525699FAEEFB24BE1226BE84BFF7C967
+0C2826527B4152ACFBC75CA8AA608C83E650D1915292D51555311AC9AE837E36
+1731A90FC77FDF52CBC5E3941188080B792B57F98317B1FF61E92E6B023F531D
+7BE4F036DC3DF11711ED1FD118CEDACA9A550CB846E10C93BA7037676CAA105B
+33F600DE469E5CD1768470D8A136B0FF623931A8E0861D3A35EE733B529FBFDD
+924A21B496489112F6D210E0E4C98EF989FB07DB5B5FBC228A164358B3F2411E
+3C2F24585AF5EFDA32325B466010F0273C2FD0907F87B16BE8039196B28751EB
+F6DD29A4F455CA05496521A74E3138987C1C2615E049E3E5AB14B54D6E2359EF
+DDC13608EC4B7F0713796C312C08775747D2275EB26FABFA3371F05DD11BFD74
+3512C5FB8E8000D09E05F6871B0860FA88E24A7C5CB61CEA9E3A112C53D117CD
+6B89CFE96BD9EF0A6B9A24261A8BED518CAF65F0797D6CA6018BD6D5598ED7E2
+148431FA40639E8725FEB6E10B48DD8B035D57CC0E554877363DA6205FCCFB5C
+718323B7CA09015029F7C3253FEE03D11022673319FE9FBF54A2F5261C4DC16D
+9ABE661AD52A63710EF6C546A3EE8E0493B7B5808169F2D86CCDD826CD7769C2
+65C9253EBDA76C1DC6A431750B69BD3626CEAD87323BDB20189D09E1740A63D6
+C9F027088E51A5EAA2DFD8733AF1870214AF25EAC63C9F90A55E379BEFC17EEE
+61F31ABF17512798EBC9B4F1C96A58B15238D3B5BE2BA97B48D27160110C60DA
+40FE2FFD4DDFDD4161A89158BEF42CF9E726D5797C91F9FC76CC90D24AF59CBE
+60A97A6494F32B95ACAB0D59F24703A2D1350530678B40D66238B4BC48110DD3
+A880FD437C78AAA94997ED8A49083B9CD843937F4FCA9739F940778EED9413A5
+80BE8A47258282C2337E630F6473CF9022011F683B87A8EA0B02A343AF7C896F
+F4B8CDDCD917248E37C0764BB1E1DD0FD406A0D80D9960C6C32A81E209E6478C
+ACADC1404FB84BADA418A5F950EFF6FB47B6FE500752E1E5923598A97B96E48E
+9417BCBEE2F698FDDB9F5CA45568234525CADE3F3EBCA7D1D36DADCE085F2E12
+B6C6B26E3D70892486676191C73A7035A6E4F8124548332A0354457E2B931A67
+7E15A1DB1C802DF3D27208B0B1C8553ECFCD9B0CE1C2F950E26708CC128CC965
+4420238882E48BE71CC52707EDC8DBFAE2563E66503E74F3B71C0BAF3872592C
+AC12D490F998E2198C8859342B3E769281EDA05289F8A3A4C4399E6F427ECD18
+A8C6281497751515282506477A9E0553B6ED1AA8C89F2EC6D244267BD358C8A7
+27725E0D288A0344D21ADBA5E498898A284B3A5F2494E4AD056DBE7461FAC6EE
+0332E721A7F7E2058C864E02EA3DB74E476A1094F00BD5CE8D85E0B11E150C9F
+95D584C11CF6B285E4EF068C533FD49017A51291CE497F6E336577EEA1C39E67
+A19C2AE6E8EAE3A8658E8174D98289DB1AC6DBA0EF27F2598F35E47D6B94C8DB
+059AA1D803A9EF242F88A7993872A141F97D76B3572CBB811F34E066412C948E
+7B7B22AF31C9030E333A104DCD5F29E649901D9168E330C8BD4DF7E50141408D
+267AE9599099CEBBEB392A28F74CB75802B4AC5DC979A0FCA75EC11F25DAB3FC
+67DF1AF2291A93D469B3278A2DA9397B018024125A974FD7D79D149475726085
+02F30E996960097F6CB908C90E5EF127E5D2543871139A7CB94CBB2A5FCDAC6D
+755A60F53344570C9846812E6766F1E2C952AFBD260D252129CB7C19821AD057
+2DC1737D49FB047C564C4809EE21B6899F02916D50CF72DC0174BB5A75A3DDA5
+74F578245AE90CEB882AB4EEBD1A4533D922197C400A2F651C1A6C5F4FFC17AC
+7AD689F45B1722BECE5F648584C778C96FB1C606DE7E7C6799964BACDFF5B239
+A7D25397BDBCA2DC06B27246728A6A6DF1F5EF6D8677E6DC2459472211A35500
+C8315B238FA5796C2DD19716204C9D6FDC7AF0419A8C3A927250192E85FE3D95
+924C818C60F4234946EB58C7CABDCC0ACF82601468F963C968209AAD57296D8E
+92797D765E68C6B64DB292C1AC7A779FE7B671D505343A2D32D0898A1D90E000
+EFAAAAC89A3BBC3A92B7224E831F2132824875BDB04C318B018B49009FB4D0F8
+A41C484ADE005751538675AF75314008C6F45FBB3B6B73E80D223935B9D7107B
+3D2B8F2D967D7DFCD9F2F9EC3338844F5D1F36E2507B2AF6F33A495CD6701B1B
+76630A10878911FBDA1E8590BB83D5A59A5017A0566974818686187205D6C1E9
+4B8BC41BD5CAAD046F99F989F3FFC38FB507ABE17C03B466E423BE3D38B5B659
+4115B2527B2D3FBDCA1A2944F5C107DFAFA5B3FB0BC6536806F5D9BE46166CF0
+F84D3EA7F0E5A904295F84E63A3A08BC02B75C33507C5F09412242B348EBEDC4
+7DC51DB5D49526AE4344C51EB3CA8CDE0F11F9059E85CA54122ECB587BDC5A3B
+7EB1B5E4886F976037B0D1131D9CCFE5656DD9F88D7E5B099D4862F78B30A7C2
+02B3ACA955C31742B0C732D84629D705F3C40ED57FA05C368EF688D075E57718
+6DEE8CFA86CDA31277ACDCC66A23D0656B20BE6445021E16DC406BB68D548F3E
+1D2CCDC247B2A9171FA02878C108EC0FA6AAC271A82B8444E714360681676A9E
+2E30C41E9A40FFC67C7C9C7FBD10AFA5DA7C228A1697A090F6781F2E75C528DC
+56BE079C98DBA4D248DDF9AA7B6C52BABC2B66218AC0DE509F08A4FCA26C646C
+9972C2CEF664ECFD1D924B5D5D7566A6B859499F6758CE7B762CF986C0736D80
+0B4A4298E5EE920AC718C5B64D5433FF3F9F631E8715ED604D708556781B1539
+882DD8627E2FDEC4B216C62D4CABBB2F115CAC56A5D93EF98E30D058EE634DD9
+95D5D1AB4C42680B3635639EDF9A52E29B37FD0BB0478E6ACCB4C7DBB5F9C428
+755744092BD250A8DDE731265A110615C300DED7F143D52417377E90B91FF8A5
+BAF6324B3EFE85B2AE0423DE309A36A64E4369353E6C2603E802ED31B56E318A
+8F6D19FFCAF6627099C0E3C190CCEC20C4A7DD4B47816D529138E2694EDF54F1
+867F0143A444024E0528325ECC148D779F4C98C06FE9E752C366416044EE3FAC
+72D8AD35D89400B4F00286191C16E16979D5EDCBF4FF9EC868D6E3BA7D98A83A
+0710CD1AAD878778C0A4F0C9829723572B4DF407490D64B5C49FBC047DB49F33
+E824A4343825D756D894B41EB70093103C35FBC09FF55931B81340666A0B50A2
+7633105B04DFB6386ED196F7D540ECAA058C0B44E89141B68CC41FC21BB2C4B4
+4B13E070FF953B88A70B3880561FDBBF309C68F5C159D90CAB88B04CFEA0F33D
+A48D289473545DB928964A1FF97B90FB16C449A27E333B56A1E49386AC738A91
+105C3F6DF518A43C97FDC345F5553842D8BB735C33271A8FC7E3BCB3C662A375
+53B8450229EDEC6156E41584971A159960569DE8AA7A959D328CC8C8ECBC0B11
+DA239FB55CBE641B71150154F8A9A8A128F8B58409791B88AC57AECDCCEC9893
+7B3363B091289345EF59DD66D83982931E090B8F2A8CFE8F46F3978A67E28047
+48A7C711553E9846164FFBBCBCF505F953132F546583ADBB7F0A9EF02A6C3163
+0057C83CE31709A61F2B9B09CDFE58F02211CA00C0672CE30572CA53BF75538A
+57C1DFC3E44012F882BD50D4A3ADFF64D8E09ACDC5FB80CABCC56102C59C5B3A
+8E7D70F350CEBD556CF6055160C1DBCA6411579F959C873E4149A3FDE8836252
+FEEE3A2F3E8BAABDE53FBD71B074FF5F26AEF5A6663E2117BE561B21DDB5BEF3
+73C1365F9CD57FD44C29C00395B7CB0F5A4BD22AFD390421EB238707C3D18BA6
+C7A1B0B95ED985D208850AD1BB88103E7A7837F707F0B824BD1BA350896BC3A9
+88CE5607050B136104344B3C9E999D4299546B7A107E5254AEA34E3DB09AA599
+CBD028178511FF44D04C530ED6AD10EC5C41178CFDC71DFD30B1F856DC2A4FB0
+CABC0906E7682033B43765B5F59F7604BBB01A7D660C3E5BFA8651CFF42936B6
+22059C2BD479060AB78AE53CA8B618F1DD65DB73F507951738DDB94B1B2898B5
+9724D93F9872A79725B86FD72BD7CC1D53061F8B55D3ED5701D99CB24F3F7469
+5D456C51BE9D32D8F101E50CE4BEBF5A8E97EA0580046639EBAB22BA25A69EF5
+D80A9854ADF2C2F754C35F380F72528D1142EE6CE628942F3F98C26EBF5A75BE
+C8F6DDCE438A2BCB35A51DECB444570E36FB2C4AE1AF422C91AC39A18DB9AFAF
+BA33B7C945743E2EECDBB82C10510C7D8EE5CBB80AB3036F259FF0053E1CD954
+650C4359157167A10C67372C068DB33982CB1101757966FCEC872B24CCD65E0B
+E1CA44F1CDB5B42616DEA1E07FE6038A0FBF4B1C314FCCCF8E2C8B96389BB33F
+978440D27041708AFD22E3E2E3D944D152F9A5F2E50A08BBEBADC84A7E0039BB
+4651884B79D1AE90EF67AAC2A94BC1EBBF38F7E4B3FFC5A421EE7EEAD34CF658
+C89D114027B859850874A5FA5620D70BE94D480EF1D2069F64C9E70C669496F5
+918606F17D2B02178746BBD22FB088A7354A811836B7AC7CF69964B01F7B6C38
+D97DDCFF7F2A5BAA1D509D5EFDFB82E5EEC29F2F12879510790882D7A6554A0D
+35394CD4CAB3E352139B4DCB9EB2AD2CD31E9717FE5EC1A5D0CCD89D2A6D9A55
+B0DE096EAD34A9170CDD32D058DB6DA9DDC7A20FEAC9A351B2144C9CE7CCA732
+7F13742A7F0D9A1736A857D465EF44F316F8B165E30106CC22C5255EFAF1C02E
+0AE0B448B88CD712E94BE503D0424B6D2E42CE266D35B246D9C92DB1032E372C
+FEF9CEE8853617CCE04505671F6A2F421B8D86C775BA10ED922C06950EC3F162
+888C5E240F3A4E2B8A1F5584EB8A5C86EB099396D209DDDDF6239D612330484A
+7D1578FD98F395EF6FACD488B64C4BC127C129260C4577A5FEFE60FC476AD32A
+FD26A711ADE1F32F869172C4B770C0CC0456730C5090A39B81CDDF7F43189A41
+A830E3D0875FD39EDE7BE3A37C5DE8BD0D53B2AEC076E977835BCD177D55B487
+ED28D26B3CEB6D86BE909C92C4EE1D7BC27BB10439A27F35C405B76B79C0CF98
+21A58E3E4015E50CE027AB45E1B1892AD44477D37E09AA6CC12065749339D505
+D96A72AFBA6A6E1390A6F01849D607E6DF07B928A490A424017C9E7199573F6A
+8CD3D62355CF57FE164D79903F81679B4998AC7A65DBED69184906D6A6AD7618
+A93DC4288D72AD42116CF3A527E6F6958AE02E2AB2820C4C8235DA5F8C161D62
+7796C9FF711917AC9023CFD7BC831AA847281DA84FC40DFB8532AA9A6E24118A
+F6F0E95313894F71754ACF52FF8AB3C9E48C811D5D19A0B686B8E1DDB9E3DE55
+7669F0BC5BD721081891536D9FB45D5FC6058F768007EF51315A619EB93AF0D7
+74DA6F7C1F0C419A0B623A2DF8AC5F81AA66CB8EE50B69CF20B7CE88282AC1B9
+6A758573DA78757BE583FC05245BC6457EA6D1073FBD3F3F506139D493E56B05
+EE5897161C99CAB23AF97135F18C72D6B0F9802A339E3576271AFC00F077075A
+3724F96F7D1904838BD92DD6787D86763B553822D81E63ACB53EFAD31981B71B
+BECEDF7DE2AA12ADBE30A544CFF6883A0869631F70F36D931E1077F8788627D8
+AD4868D51502C35C0C3697C811AF509C526689FB4F8139772964F414C0F5B120
+37C04E77902A09414406E447EF46510D80B5BDD17B712A5137869B813F673C63
+988A772C0B49D04118B5D5E5F8D07FEC3E8000FA1FCF06AAB49BB73791E019AC
+148BAC5E4269A39347ED188848E503E0C04E548D4C5E0D1FD132A3EB91A9C92B
+9218A29580F6A99352F46C747C29F87EEFFC7912B6A60426BEFEAE7EAED1AF22
+C757AE1D228A336D999E620934AE9D1C124E4190BFD280B24A40E8519854D386
+8A6140A79F2C1621D94FA49B4B869DE236E51FCCBA2600BC7BA951EC067E6759
+C4C616BA9F1AA22C72DB3759A24F77B63DAFF16785F0AD51B92DE05BA3634D4B
+941AD4E19379CD165BC655EB7519B58608935196F2DA9F17CC2BC1238781D29B
+EAF0FFF3CF529CF48890C17CB1D97CE95AA2BF2827B43B39C8C61FD91E7BFCC3
+85A92AC0528C12123EDBD7E9B1FE798EE0CC8967CE01D19276E8BE4014A06868
+6CE0F5FCDE2256B8D2FD077945BFB2BC23342E4EC323FA864567F8867AAB0196
+3946CFA77BD98C46666D80D4C67808DBD53B407E80CEF7DE3E9120E2AF3B27CC
+4F3201027C39A296C1406FB76BCF9E46537DF1D3409812DDA774C146E135BCBD
+62E1EBEF09C3472DC0DBB9CE13B31D15516B50280B3C09E9F6EDE5B05B8D0B4E
+C7AB274068D129951FFE53FA5F0E85B5F1DC12382F11B5225FEB793A1EEEA45C
+458B1EE64C7E2A787674140AAED80C0521469C3469EEC92430A9E3ADBA3A094B
+73A71FEF38E2098E4B882D171524BE3B4BAE4A568846BA996347E728580F6AC6
+EB4CB545123E55D0EE933CF9CB63EB60EDBFBD3E972B544477AB4D68826331F0
+4F8AEFC29ABA9E1D6EFE807CE2D7E8BF254F153B3C9BCB6507E89B97158EAD5F
+4224068DA7A1686B8DFBAEE60EB405CE71F71B4872D396FCDF472EA4CF3E6E61
+7F35278F1E7B3ABB2714E1723F5472821674C130E7301D598A6D1CB33FD3A94D
+35F73E34AE11BFD6070CDA2EA1C994C0AE4304785A70A38622C09D47EA08238F
+7E497A635032592C8E28814D114AC8D1B9FA512FE66C692F75E42B67E51E18FB
+3F642D14C8DC0DF74FD81A594376BB9B7DBA9B4930AE048E4344476943D31F24
+35FE5CEF1A0BFD45EA5C43BD6700A38796626A1EBB23A3BA4B7C64E1B145FF89
+E1E3CD5F27844E66E9868F13526D31B87FC9DF2676E7ABBF3176CB2CC698BBC6
+23D39533FAEF149531AFB05826F48BD2CF8CEFF48FDA67C72EE1F32E41745A79
+C96B8264CE368E6FD3DAD0CBB224F8A9525C6FD720DEE0FD278EF36886ED076F
+EB24D1D8B69C456A9543F4543160B6BC57D0F396BCB5F416EAD863C35BB5DA81
+B218D99B5CE34FA719E6C67CEA1B25DDCE2B019208C1DA5D9C105F47A382797C
+A73AAA78B4F33F509E60BA34B4D5D55756639BDF4761C9F221B09866291760F0
+4ED5CC9406061F7FAFB0B6F93796F64BDC05277FDD466DB850B5ADF5C6E293E3
+A6AF3C0CE77608F2027BDEAE4076B776AFD67A7BB7123A1F2F1F95609779BFE2
+9C1E085B68A4C444EAD8ED8E3E7F08CD5F90D12C96005EB144157FD1A85F7176
+3090740FDF72AE20B73733DB0A0A9ABAD612F6133F77DB8FC48DA198D73C1CD8
+797C02A00B9A6343D43D1C0B392047C71EC1D62B5308B76936F64EAEC52FB0AB
+A53516E6BF2189E657E6DEDF0C680A81282F877B0DB2EE045919FAD21BD4153F
+1E3B07E23F7C13B55B47B85E99E93C6C64D7132245FD325E9FD9C6760C01C8DD
+61930D6F4BD6C59F880CF11C3F1588E72E98F80140F43DE93ECA43931919237A
+2450397829719ED4E34241D30FB4F5C8A85B1A85FAE2305C47550BBB555EE76B
+DCEBA951B61B0D3A7240B105695337170A9A56468EFEAF599FEA0CCF01A2DB84
+25319E635B3EEEB2B1A6ECFE58E2E387FA5996D311B87ADD09AD373BE347B291
+140162A7BAA5CD747ECD0DD86807449609C1B86BC5CE2A087AFBA83091CE4B0C
+49E6C7AE1306511A1BD1D4FFE475FD7501461D782745128DEE7C1BE525A3B04E
+5208CFC6600196DE9ED2E7A7E20E20E29CAF5019130609E1D3AFF1DB46E12579
+1BCCDCDA2A43E93CF68534225DD7CBEF77AE71AA22565258FA39AB4D9448D462
+326182601922932B23CE0E2567E30BD47772A11D59E2CB15B0BD340C0657B465
+733E5D4BE23D731F0AF280EB827526F9050776DD06C6CFC96318E91F821952E5
+0CE9F613F0C595C55F7351D7D4114D9611AEAE733A45A7F6645166307E210930
+0F1E4F7A64B77EA34F19A5F52445EEC38EE28EA988EF3478F03929AEB7ACFA8B
+12AF9CD3778F13FD2ED625B825053F2E8532562AD65B4BF0C2631586E30FC27D
+D2B5830E9EB43090370C658E1FC9606BEF5FD9CACF8FF8C051EF770B95C419EB
+1E21C8D10456ADA6BDAE7069829B6760DAAB8F4772B7FBCF8A96F691BFE6802E
+F9EA5F469758411B191623A09A49B22E042310EB212894282C023852E11D1001
+225FBF626AE3FEB4F127D055FAA2F1D6533FE15F30ACDB50FDFEE0BAFB1D4CD3
+FFC9A8CDDBB834E06F0A2009E96E82EAB4364D42897631C46797394A1745A3A4
+45B2551DC83AEFFAEE4B19C824C88804C8789EDC04A72079561B851853585AE0
+E4DC3FE1515E0751FFCCB8747E05B3BF7DEF41CA3B9D17D8A3452D965E7F1F0D
+1770F771EF9B8CEFC746F42EF799828CDF99643D61F02064D472E5CBD1F01AE3
+027615C852F4F2455711D642C5AAFDBDEBB87BF4389897DD96F463964E84BA09
+75778F0201C395B006083E068C1CE5EA1725AF409C9A0C9AB1DE481F85511594
+79A3610A5D62625D9177B7DA0E2345FB16178DB9AA58588732C48BE70A5DA581
+EF630C04C61499312B2C456A5AD7D3EF4B6BA25A17E8990B9351A5232F783D89
+CBACBF1100EB449EA090943C73CBFB94AAC0D8C675D84284B83B4871F7F1F37C
+549C0F4194C12B2FC3E52D8F89FF2A8D18EBE7F270B786500B3238D7D8100CC2
+613EA077722458508F6DCFE09A5479D450B795A1100FE3ACD3BE0EF191BC1625
+729369ECF1EE49693310F8A241EA75CAF7E4B2FE14A91E9F0C13955496FB03ED
+E8FAC0DDC571FCB38B006A186E9642B6EAB0A7CE39B67112D9F83651A6E9DF2B
+9F6B6046744A77788DD927DE5C22FCC918C93C7B42C834391F8D9AC89A2D20A2
+1D979C7D6238D4D8E28946FE336A43402F67BE9FEE64B7AA3F4624358C09EFA6
+99FD5B78AC68D5E3F1854767BBD97701ECFE92107F6E51F00D0245484732150C
+C33E963DB666494C895F05BECA73B88B7043828D0637B3986372F28F1DB8D68C
+0CB56793D0FB42444AF9F77A634923A09102AA77F2A5A36330E8B946806E57FD
+47BC5B0CD1605E564AC173D7F3E1E19870DB668D87CC1A2BAF539925C1BEDC28
+ED5870BF8BB79B0D31DED055AAD85A6D8EB98D1DBE04F10FCD01932867FE787F
+1CF53587378BCEBB146135335100E2251577F42387DF4517DECE711E8A65454D
+FAF19EFC6EA9CF50A4FE3DA6E4902F895702F860AF0A82D47FC7E7C4F3FDE9B5
+091A7AFE227BA45E85679CD34B38B14BB824C7B499590C9DF82C7C11B36354EA
+F2A862100807308908B088EC066B2B20410914056F121CCFF70EAAF9F8C37D31
+9C09832C462EB0315DB838D2E2816528FB8391213B9CB687ACE34E6055512C6A
+543284441527EA2AB308D7FBB8BF137D201042117527E548909E3951A68925A8
+1F741254040BC520FE89B7F675EAFBCC1C2EBCC6F55BAA59D211572056ADFDEB
+3CEB28BA5B9987C4E5CF15A23D558815AEBA5D4EFF8B04D2B9A07F9EC3195A8C
+BC8E5E8422BB1150444C5683471207E26BA7B42F43583DCDB2868337362887F2
+8947C359480DAD443D473C61C4AF2E6BE2F7BAD06C79C102586C325EE523F000
+334B1AD5F85E52486C07D5F2B88CB36D7C5E61B421A67F76F1705CE79FBCF403
+FD73DD06D579EE0891AFA8CCA2002D031A2791B5747BE3FA9B7053DA6CB943A8
+8FB3D8DF855C16A641AF1B9E0FDABD84A5074B583202A8C120405C781F2A591F
+F44D17300936BF3C77591752E3F3FDC5C448910A7DD21F2C84F1D44BAD9C7EA0
+2C29193B42734103C2EE5A6A0A6B3F9A668D0E58B7450450290C4DF4AF6BA8A4
+EBCFCBC4363ED8209DE73972FF2DE7872AD38ECF92393023354BF50C918F84FC
+8EFAC13B94DF583EB1F6E02ED73D73560DCCA4E2F1CE8A7EFE29988616867139
+FD6636485328F32F2A9C2D1A26306936ABA671225CE1685FC633E98F198AC865
+C0ECDAE559DC639FA8D0D9BD2191C97317C07DDF2BEB1B8E6B0A2F4DB30B11CC
+FC7CF4D9EB529CEF39C017E332079C03FDCF16EF57F51CED595ABA70EA35E643
+88C4313F914D6888DBE345B1E5B97DAA93CCA097E330D3CEE75B91B36DB308BC
+EB676516AC72507CEE7469A7DCAD6E98000B1E3C77D8A4A4A1AA3C31AA384F2D
+2BD50F44E9CBB4B5FFD65C4E7931BA8930920680537920623C80A06AA95EA0A2
+DFC56A91E877CDC9E57A201BB933B4B15710CB4C1BCBB88AD119C273D9238020
+24DA817F6E77BF55F12E9F61A1E0D2A9DBC432E0827AD7F023F1DC6C82984F68
+F6F778AB1DA064EEE453A2C148AC1FEFE43E20392D59BB8898459A11D71F9713
+610A22F0DD1797E87854B0922FF58FADA2AB26FE02E9D6838D4470B8E16DC017
+874787097C64EC851AC4BA343EA6D9D1E0442F0A8AA1D6AC71C79443563B1BAE
+B4B159333392763A0D17962080B8243A4A6F11FEA2C8D5F4BBD4482638854019
+DC1BC660974B96EFF9C01DD2797B1E1C8E0CA2905F783B042959701A74AA8023
+CF44AD6A3C0B7414D41BF9E330C0EA9230853322C41F8A40E782AD8F4587E647
+EC3943D77A2ADE03D8FD096408B4085690CCDA8AC71C6C11AF690D8C32036AFA
+4ECAB5C1F31B05FDF26CADEE15383EA1BBA59FFFE6819D3155FFF76BDBFDEC24
+5BE59C61F3F0D704DD0862546F77DCDBCBC313B354481A9D529C4228E0E43EBD
+1BD15B94876AE370FF835434A588E4E8757025F2B1F82CEBF20AF28ADB8ED79D
+2412535DECFFE25B2109229C9BD3AC9A06BD241F9284EE8FC77096DE5EE21BB7
+7A7162D9AB3D2CF6C100D66BB240E43992444151A9ACC99D10B232B4E400DCAC
+BD38E0FABA6F475E6FAE28448FF34EC8C1656A1CBD27CD6561F9BFE0FABB1444
+2C25908CB3D14B664B3E9BDA6F0EDC8D933FFFEC2CF1A4074FE4CD3C8E72EFCA
+925FB57C53202E5F89D8CF63DCB5EEDC1AA68D11F263359B84A3D7F9AEEBE5F1
+4FF089AC97F1222221437833F33C06166B8CA011A5D2F9DABEF2750CFC00DE12
+9D26BF74021ACAE3AF901CAFEF6BBFBFDF7A496A73BC1F495D0F8AA6979EB23A
+0E4936B95B1636788C8937078CEF6AD30F0794115E019D187C11D6DCAA187303
+706FD91D652D41AFB4E012DFC5A0F78F435FCBE98D433CE9C7DC248106C5C763
+AAAC5FD1DF5367B41E004489C01C5FD3AD98B8EA7FCC66E1B552A4B6FF2AB13F
+93AFDA81E74C7304650C1CC7E0162AEA22A754E413C55D571349758D8AF0D508
+9324F516E8D4FE7CE7D0C2A574E959AD1DD3CD001E95B429E4FD1A6CB65A6133
+EC9893F1A7F476481D209843208146D10F9A4F0AACF2A6DCD4462CB4FC9D926D
+D5AC6B561BC9B0CEBC0CA2707AA010C66299C1DB237B020DED71DD7D80C47732
+9FF3A32D0EF7042C4021585BBC826038D69CB48982BD348946F44D80C39C26F7
+C15EEABA258F8095767AA5447F6A9CE1D43D6BB3A6B205B8B9E8CA81089CF71F
+5EDE578C4C244D0E35599CD00FAE11024952E3ADEC2ABDEC90D2FC76F9ECD6AA
+A6B40D16DF171738262230DDA062E9154DAB0A506DC761E79DB40C7F389C6E8D
+71B5BFBF82B224C4113A8E4580355E0B80D408B1D34F55E3586E9E680C689413
+5D584DBAD8258397EB0EC2EDA157621F90CF742E8F98974C36E2B1DA6DB71C53
+02A1E09A7E162F6E9B23F0CC5CF025CC9D13F55F787B2B565746C2AF129F0F4D
+3E304C56F314EE80A250BCBA45112194B4A3D8EDE0985F9067493F095520ED4B
+7F1CC08F330EE6F17DB5EE43DDC75AF55B1EDD1B41833FCCE5E842516E49BE84
+611BB71A150B44FF998B5866DA29D7DDE99D9D63F862EEB7C935216E5E60B772
+43800ED5868AFFC2CAE01F16B50902B292C2BEAD2EC5F7AF059BB8EB0CB73C0E
+EA8F144F716F3565B3CE4B9597B7C0257BDED508A600D3F1968CDE4E3F773F72
+C1AF5E675E3AFEE289515A32C4A4038E0B01410B58AD63AB537FC501F3470514
+A0AE66FC127777C616379F2DA2307DDEB634C5968C1EF03BF7981D9D90C14E37
+AAA1A0C76CB40A95B77D6ADCD43281E3F680AC687F859ECF4AEB35639E1B04F5
+3C88A52BC559DDF82BDDF076E58368AE6C8072EEBE110683B069FDE3BB0F5E38
+A3EB4E820CC8B98E2716D27925F5351C3B3ADF3D60398813106BFB474617EB33
+12C56B1BB2D743E2950677BB680C01DF42517D0E7C7F035D968938CFABD07E38
+A86BF53ADB0CC8715B052FCF6ABB0ACF56456F4F88C8D0E17220D88C82DC5087
+CD762D2538E309B6BF33C1F9B449BC0EFA035DDB9D4ACDF95B12FCA8BC429A78
+FB6CF03BEA0D047832E23A3A3215225CF76F2C213C92D706AA96182368F64173
+AA1D106CD441938A5BF7218EF0E1B73F2AD3AFF7C87C580B7643BF5994FABEC3
+CB362FBEFE73BD731ECE265093411559A49A5CAA01C4B55BF0E4CD7EAED28FDA
+8C264B62682DD64D12C7D9BB5119269DB43239AF2C80AE362D7716B5E49197A7
+F25B759B90DE0A436703CBCE72C472C53D842364D3BF567DD3F7615B29F2D02F
+C4A8E4603F76DA39138CF8596733947EA65F1B8A55DC91FCD08425B2DCECD526
+5DEB615E7DEF0155ADA336A523D0974D4D441FA925CD876CBE1A85D644831ACF
+705ED79DFEE14D519EC7930E4243D38E86CF01F355E675E9BD24529575FD4A6E
+2187DB6C8AAD53613FA7FCCCC6146E9F99DCE7B10815B49659D24880A949E036
+C849783186B13EA91A595FDD1FEB4DBBBE58C512F89537B27A2BDC4B568D1E38
+02916E8B4AF4A537C19453F94710478DCB89743D7EE30E15C165C0CE881CA43A
+E18E3E98BCF0423223E37C9407A872A996901E03392F8CE81A928727FBC9BF85
+6DC374D2AA3B2D2A82CA328E4F1A261B3EBEB470E5001274F564115691D01E8C
+A7480387E7EC74C5CEE5BDEBC0250108FF13D87C71EFB1BCC9C5B8028D70A79D
+0D2161380357E0E96D15597F673722E535F7C459F2650AA6403778C64F74F10B
+049AAAC72E6A409ABDAFE7C2778154D6E920D5E2AD710CB4F7CF7B52682EFB68
+FBD7DE55B4B5048A5738A329842AF53128E3A9E89ECEDA65B2B1A634EECEB846
+6D7C0E11933A5278BC377C5A1F50BAD2DF04CA0AEC47908DC12CBBFC367448EB
+7FE9D1ED7F2E13E35CA8E6FFC9734CFDD15E5322ED7D476A537FC691DF5B1CB7
+9C8396431356B92F4DFE47212F403D0A60253C0F0E7BD7768B157FA239753729
+CF0C82DC68EF1B83B56573BCD38C5D97A3D3889C650AC889046FABAC4B55856A
+858896E794BA81BF7D3917884F4989C120FABD9D82698DBF7ACA6FA03B7DE0B8
+DE93ADC29B8FA9DFC15D5B6578AD6CD89DFA21B2E0AF7F0FFE862D1839882472
+809FC43C5255790B323AB759EAFE0928391A8E87F2C6E50D7A7B87E6464EA553
+A1AD7FD38833956A136AAB9BF20ED42A2972FB4BE9186D48C3759D0FA38DAFB5
+7C4446C3E4D0743817A361984EB4CE36EA8837008484F27750EA45BB0481B07B
+CBFCAF075117CEC9C612DCF1F281C265177362A12F586DB66B890BFE45F0A5BF
+D0F433D8C3AF860D3423F6D7515192AD9FF0B5DCE2F50074BC2FFF95AB9ED49E
+73EF0AE628B503E7EA97A3B3FBAD0FAC2857BB8219ECBB90CCCC74B111A74F84
+2960056DBCB65504628C56B8E5F887912C80D8CFAA2226E23588AA243C14AD88
+BB92D576D161A3C23D065EA003369BB7E2DC0423609C2591D4AF74C86D998620
+B7F6BC6162BB2D98CA81222349BAC8C5E6A3F3170713B188FF08B8C40FFE0B2B
+DF51D256BB2A08D1FD0890BF51EE599578E189A99787022E19B8F44E8F0CAF54
+BE711062BBD9A270D1FF131D69F1ECDEFB84CEB2CB1AA8A6B474683911C895B9
+8CB36086B59B54B4CAF966749A2D395FBE6F4DF81F71E37E6A0C5AB70C65DFED
+CA21D87FE11CB967AC0E11B70CDD98CE389DAE41F21C429D57482B736EF9CC09
+16AB1D0E877AA92557D24375804161A6C1AB7C8912512BA2E0D0B1288A6C6784
+9EE2F3573B32873DDB0AF81C83B9097C0E4E5A62B6E324A02E19393A2A344DD9
+C6FF7B8D8405A6985F1C82FEB248BAA43FA630661F9708A1EB25A9C8EB93555C
+5878D5CBA73FCAE33DCBFB998B289E2204D62B8463AEEEA2DBDB450D6DB0AAA3
+A4EB5562F40D56A252C5D76E71CAC523C34F2A3CF56745A909C79A1A202D64B9
+EF5F98AE02CBC7B9B4D6CA1192930C93E9516C7B8491A38254EE14AFAE4C5E3E
+CD9560356BF0E1BC7CA29753C978394A4B06BC0807323267A97E6AEF0EF163B4
+2C92A7610BFD6257188892B55B5BFBC1802B0C648C1968AEC2BE35CE5788F7FC
+9FA1A42826378BA3F5142F8C9DD8FE321DB0553838FCC28B2191A5A26154CE54
+AF61C72B0867FBDF822FCCCE8E08E9BD728A7D063E3E9AF29BAAC110B817B34C
+A5D9B8A61CBBB74DF4FC0A490BAD78938C4694B26F84DA7A8A241FE91471D2F2
+0F1228907E852BC113205EC367D43A6BC47DC77742A8C0117704A0BFE29C1EB1
+8E35DE45C4FB9B4E48AB4E9EC0FA0F0A33C7197C19B41D2526E74040E6E7E797
+E18A45E86F480DFA98164CE339EAD8533F95274C13F26F1433D7FCAC9E28CA00
+5CDE03DCC7AEECF7FBF442840845EE1E17B58D71E9D58456CEDEE36A57C37EF1
+7159E3841F282ABC7E1C66594051DD8C7A9E7BE73C987E1640F345DF66E42360
+65E4D30006179A3355B7F0C54CED3F577A82D30E99617E52C0CE533016DD5B10
+211A47C3FDA4F9F7B54E61BCD46F7812A26D127EB37C047B67D547E644CDCCC9
+97CB89F6FCD4B80C83F15D5D280999772613A4F08F3620894C7C594C115A5FC4
+A0699C5A13F5D846F2220FBF86F2AB4C209F8703659389AF32991377A3E7A38F
+5EF88E603CB754D88E536CA1D071BCB9E9ACE9D737B8430ED73A1642DD094D87
+CB2E636ED90ABB1FA9612DD39C767B3C0169FBA67B3946E1E852E33588B8AFE5
+D593AC0BA2A92D76758BC611F252B7B0C00E0274BE5FBD392EFA86EE49473788
+BB5C80A82FFAF17372F480A08459D6E042361ED54CECF42C88523EEBFCA805E1
+E59A1743234BB6775AFD46BF07C533588E38634FAD480E63002927F24680B547
+6C63D3A937F4830D31E7689E6D422662651CFFCE6EA129C04F632D88FE43EC27
+CBB4BF4D4232D3DDD19599026EBCBBF47DA6C805E38AA6C11F1E1857A5E8F1BD
+4CD21F360419A0F3E555DE7EF68DE7E081573FE845402365C846F1F6B58477D3
+1259A60869E4B93EDB66C10D6B0E46D55D0842CC47DA05D21C8FEC6CB299409D
+7A1BB8B99EEDEB3C4F10A2699458F19C320F3FAE9CC6350CA383DDE889047279
+0FA91175252A42834BF9BF5D19AB0032B8383AB056BBDA41480F476835457F53
+D1083B641023078AFE58B2CA0FAE3832ABF70567D5E5A0EFC39C3FFEC8A3B2CB
+3624002DA2706BE3AD3DB339BD43BDDD9BF9D336F25E572289F105F319A4FEF4
+60E799202F759DA96C6489A228EEB3E975BA1EDFE6BB1A13612BE4A5B690C615
+97445B00FCC75097620CA90F06CA1C58AE637D12186D892295FD5FA126CE1D76
+011AAC13442F1DAE04AEC3E7A5AA6DD27F26ABC69EDCF606C10D34B0F32CB8AE
+2B0D21CD02DD3456FA3BD023E4E92233AD9F24146B7EB0C2A68C49FF71A01FC2
+2CEA9C5FA57F09147C6DCD8D3A4A33C1A70000B334527716C12052092B10E905
+9F22B1E3048E68EF2525762163421C33A1CE61D0923C75E738EA9A37DD3271C9
+AF4D55786F5BEAD707EC8AA26DD53D88476BECA54403293E8CDB02A083294545
+D4BD7DCBC7A73C480D4F3A903AC85AE133384CCCFDB357FE6B6B341FE71E4A75
+D283D1511423A2596D7543A293B4A6C26FE21040F0A3E8BBFEACD0152EC3F190
+ECD74D3CEFFE9C3E86402D8B5923CA46C8046AA3C6DA39983B645808F97F4332
+D66EC475C8B93982A7EDA2BDD0792B332A9EF932DCC11191E399900EBC05C3E3
+8AEB4B4CB9539D6D209EC0BD5C49AD675409BFF8EB2DAA5E425D4E65E06A2458
+F0C4149361EBBD54708F4B4EFCEA571DF325AF6835652E7C493DCCD8C8C2F01D
+382B800240082986A52D925D6F804BE8F048CBAB7C60DD389F7F3501121E1752
+AC0606E26537356594F6DB786ACC6152D194496812C20C5310970505EB0C3EE9
+73C5AB36FEA992F2ADF54BE9CF51B77D4B1E3E63B9A40E2D701F904C5E0259A3
+14C12EDB20B2F5D534ACC7C3AAB655F58C73659C9A177FBBC40963B6ACCEC0C0
+8BEE4D7EB45D68FD74C3E8AEB3D432CCBED396C3EA5F7EF4E40A8BE9353256A5
+25F88514221445F3373BA7FA3B3D360E533A17FA74D1F63EB847F313EF4FF04E
+62E3057E60FDC0DCE1E8DDAB7B45678F68D90680E750DAAA3BB7DB64E938D89C
+6246C43EEF4F68B65B0A8704B41882495F83742E12B2EE017B1A74DC8E1F4761
+576DD2027EC0F9C65F94E887C1E82D403879FB4DA7CE46B6B64B03541DDF3788
+6B417F4557B029C1A5CA503ED1379FA986DD2ADFE5D1CEB12F1B9FA0B4404132
+FDCBEDBA2693C41F999E5FED058098745312F520189CFCD89AA7EE42F2BD782A
+FB595F059CED0AB8D0BB55F65EBF29D89E023070E8A35964F7D8A8D5511941EC
+65C5BB39B27168C392FA68D211056BA38830B5289B399927BF79BE6733395940
+DA32538EC63BC1435F6500BBFE3641B96B52D46D4051E393D302672AA30AD51B
+E3E6E133CE80E6E9A7D979C63F324C99B5A6FA7B8555F35891AD9F60942D4085
+68A4D12E945BAE908F2C71993851A616D4E69E27F30441466DA68E16C74BE058
+C8920C64CE03667344F9DD28EDB24C5062BA27BC75B924029E5D86636A0E347E
+1B41D41B6556EE350C0BC921F11232DA04D5387176DC11C4CC64E408C164F8D2
+2EA268E517813474172B3787747D4C12DB61804D93F3ECB81A52329B87294C9C
+DF2AF75BC8AB538565E066992E8F6C2BA4B89D5DDE0CBBC202396D31227C777D
+60D7D5905ACF8E02AA26DA2E49BAF4464701D01081E206291FFAAA45C5087028
+AF59353DA8569D6000ABC1B744CCC4C0A8A391FE1FFC415EB4901F950D0B4E7A
+89C6F634E5410DED1B428A87EC74BDE51BB5EB54AEF68C385BDD5ABB283D390C
+02BE931669CB603C063191745F913756B28E81DF6B3760804300B01C4AE126BE
+C558B85BE08C2787A930A944E9A6F7DFC85E7C243E4BE99B57E2B120190708A7
+60138412969D73387995B15583B8C2B3BF6E14DBE22599859EF551E741B04DFE
+36E53F1D04E091C840C1A9D43835A12F4244D4D694D46B6D3376E824FD3C50F0
+D889F2D544096385C982B5004268D199D46E56051B2C46BBE23F0D1A3DDDEA28
+1E1B0A24C80A82C2FAA2732A5B9CE81B6D22EB77ED0EE9E3E1F89E2C07167A86
+839255DEF07653976250EE4839BF800EF371ADB3B19F92C34193399E6C2B005F
+5CACCAC594DE4B92EFE30C6E891C622BE799804F691EB54BD12E95F8CB57C618
+8FDEA75A9FB8B65F3AEE065B9B4C545AE70F9A1925A0D7BA9187E559E85C317B
+F1FB71EAC15E75E1E93AE8D29A56F4DB65684D6CD4AE9BAA74E1C57914BAE369
+17C403097FC47954DEB81B049B99B80B9B2CB80B709FBAC869077B9E5279888D
+987639D5CBC79C8102FB496E5387450808238930AEDC3F2A13558E56C9587723
+4F9FD604CFB9831A34A560E2F24187FD519A3F2DFA87541E4DBF75642A4044BD
+B62A47799D79B6A6341B2741018FE8640CB8129AB492355B0CFA3B4C7D0B8794
+E0BC808057F439C71057A5E15C1008793A9733A0007D7C95C408443F851CB1AF
+B2D2DE86AE8BDD6234002311C81AA07E10B58AB87784DC665E498DBD1F19C7F1
+7B3278AB45C358DD71821ED3428296EB77771E230F82933E71A99662199DFA5B
+2A7988C4060180B916EE8EA9F4896C0975AB0B33928BABAC1D7B08C4C80984F1
+3E1EF19F0B8B61ED8AE5B5325EDB72234C4966B0953C463CA79935C22EE21855
+62C316E3C26BD4CB68482CBFEB2BB05C353F1671EEDE4D30162472879F82BC96
+F9C32CAF2AB2ADE3E14D704A1871E193BFE97F3CF8BF9C5E1806446FA2207B68
+A1ED6B9EC3C914689F2AEF2436792D25A7829C2E7D53ED15ACECAF1E79B589F5
+90D80E0A25DB1F40F6C1302B33DFB91A933B888EBA3F58D267884F0A4A0C675E
+5CB0FCE0AD0F58B692344E2A3A20D657035046173A346C1ECA438BF92F75A047
+89AAAFD72B7FCA447146245D10B1508DBAC840FA1D52DC174DF2E64D6792E4B5
+874DD42DA10CF5C2F83EDD54DF2045F1E40F50F529CB7F9375BA7F5A57D0A5FD
+D958183A252FD7AB88F9E2C099F587E716C6ADAC29A90619CFEC1E9E6E63046B
+F688F7DD7843A1216917A0146C248FC12126E8DD38E27D05E8014C7D5614C661
+F102BB47A24CC223EB05E7F5A7F33C554EE4B5E6D16087884FA939D3E56A0B7D
+1E3C9E7F6C3CE95369FA6796F24B5A11CF30FC93160366F5C2EF4FE1D6D1EE9C
+E21AF6B09F1FE1D076353801D4799A38DEA9D323E8091F591884D471336F0BAA
+8B353ECD3B7E2FC36F5F4C49B6ECA8C08078F857F919BBC14A2B51B239807698
+37764DC6C7BFE510F180C63CD0E1A9B001DE2C50CD99D934B71D9CD633F40341
+4C0E56063100447522DC53346428F562E9F6A2B4CE6644EFF13BC5A1B0C1E75E
+659F64B4C5D31E51AA2DEA57882BA22D149145FD316F928DB46E680A269CABDD
+196FB35A49DDE6F4CEB9D61654CADB3B9314EC1C0DCF0DF00DCA92A944BB40AC
+31F94EA1FEC6993DC4E8203E6C850980DAC682B04D2161AE3F9E22F34A874A5C
+3E24B6B0C44CEDC23380752B6EF7601670B58C4C9B25728709C322DD98DFA48B
+C965B6A283D7ADABEE1789A8BD54E14E6B2D6FBDBA6E19A7DAF45646E036FAC6
+B761AC1BF621780B92CD97E068E50308D5BD6CA17F8BA70AE30B9C5F07C2E8CD
+9D4DCEB6844CE6F2241B1D19BD6A1FC5F28848DB10FEFA1F55BED0283AD14588
+7051A33C3854718059920BA88259032FBF481F0F0A2D1749A867BAE63B0F6E92
+8A4CE00F73742D6D07DC31932D8526B78A806B1F242153AB3F358ED69BCB9A9B
+EC008CB67844D943E1BD3512F47A81959D74397B05AA8F412A5DAE4F657B4738
+A8B77333A3FB07ED1BF72DC0BA5CA9BFA3E74AEE58754BBDB7D8A898C9B111E5
+194BCEA1DB2035C3B1F6E012D22785F9BA38FF027B3B622FC8F0F256787FF91D
+FC4C9F64020219428302102566BB6A8D572450A2647521DBC714D7C886125239
+1001F1C8D9E928873665E89A043BFC9F4DBC8DEBC04E849B1D52B3A9A108FE6D
+09DBF96DEB165F0521B90C4DCB60A8187288C400B85E6013ACA8227AE83A8DFD
+351D6C8F863197A4D44798FA3A292FC2B21750B077E9B9670D25E023B2A6C14C
+A6DECB08D3C3C61FCECEF890F02B6442D0D7C0D419DA2889E7FDC3AD977C5643
+3E61C6793A2729CD435B3D4CF67A92DDC450CA6F4328F028A962D0783EE0DAB2
+4E9D496FA28ACFB0693355360E997D3177640A354CD8DCB8263F18D621218201
+D1E7F6C31E8F08ABFDA261B7A3512C784931514773B16F92D04FC11B637B8BA9
+BAA804CF55C126CD35839A50A81B00ED35C3D32AA64BE73E2D4587025FF23A5D
+ECD93B1298492A4FF326E74042EB1DC3E98B4F041F17F341F4277AE117D6E4AA
+BD76023649042985D18C3C28C0FD330D6F0A74778787221B325C4D810D6D87FD
+8EC7254D1AF3AF46C2BADE5D292225744945CE0248AD303DF4906E0402159D5D
+BFC58DB629CDE8E81B6EA2E0D5B50E1C455E7AF6B3368627BB3FA73C2A72AB31
+627AD18658C8BFABF0D7B2E40A9E1490D03296AB1792E160FCCAF4FEF84B71DF
+E284C03E87F17D3A440990652A9503B2C45D48D9C8DADD9776238E22BEA1C4A3
+AB05918672D6EC5426E06F688C42F4755635CB0F5C41694DD9B07C5945F6F7C1
+EBA7277B32C92E6754970F6821B217944E09E89A81F325D78AC5AB6E1F9A1FA3
+358FB78159C333EEF87541D46247902155B6DF41F1241C58197825D3E2F8C1E3
+9029904D5203F7120AACB8C012DEE6460257727E259831BF7CD658197343C8CC
+9832FA2C62D730D0867DA1A688C38436D26837794BBF6AD78E3A8820867CF045
+C9182C904A87B9F542F4CD87E315C0ED1DC3A545D043C2F337312B0C70144BC1
+29581023FB0C7E114BF72C0D010B3CADFC79E87F303F0AC7FA0CAEAF0A927D5C
+A9672235B9E3F4DD72112C1273C8AADEC3A8ACEEEE81927E3F314DAD0FA7F412
+D32ACF1287D1A500730D8BF20E290B2DBA7DA8A778BB9F206BD31E2989DDE5B5
+D5CD2DB85EF2834448364B7EA6DAF3BA0088D9D9260B6A44B0E4C2D3411E3F64
+A748ABC0A8E9BAAEF164732816DE572EA825D945F4E894D7D2E3CB36961EF8C2
+853D2905F11FA8AF17763C31B7216A8E6EEE28F8F3E8A7E9345D27B52EB6AFC9
+33462FD5A6DC850EED8C4F403626B1381AB6AF3D6E8BA6BC7682095B180043A5
+6DFC2F7D7304C905771279E71D05ED597285452E06928E3183F91589774DFFA0
+7344946AB4081EADDB102E205A17F49FEBC1702E33942F5260D87DDF65473622
+8218C9F68106399E2AF3EBCD07B6B58284CC3F4661CE7FBB21073D7A313CDCAF
+A15A05658CB96154F2232CD57F183153BCF0DF1E96F1323D1C45F23D68536C23
+D2B141AF03A36182DCB872B6BE7EBD4423A5C048FEC8A6C6E92434A9E1B79921
+333A249BEC6ECA29FA4FCD627DAE3BA8F6E123D95297A9E2D1FCC426BF7E50CE
+4842D85C3E8ABA8CA9241DF6AC71240BF1B73F0DCB13E1E9D2D1F9AA6A081476
+6CCAEB851EF19ADBE584A7A50109007AE42D3C3E29971D04A0F5FF1890ABD460
+C0F9C909685D097583ED09EFC536285F752B16A55E31E6B34402B6160DD97563
+1AD5F56A8F1F76A3EEE62A6108C2FA0CFDC25591D00F8896A8DCEED9864EEF32
+23FA25110F6E78C8F18A55A3EFCCE0922A3C733FB9D4C8E0F5952904DD5410B4
+5857953647FF97355F9CDB187FDEB54E8A6E4EC0ACF4F3C13251BA034F5DBD7D
+C0F04E856E49FBE5BE24D220048B7D9AEA6689484EBB50AF1F7A1AC4AB251404
+8F62BD7993ED8AA929A029FA4A33CAB57BD9A54749A796DA9A9370E1355463D5
+4E158E05FB99E2094C3B273787D851D433AEE9AEF73FCA873329ABE21E5CC531
+81E7E9B76F347F43D36E16C10C709FF9E16695EAADE5566476B70906B2F93838
+CFEA62C80D0A5FBA21711D45DFFE3AE3F2CAE050648FB91C87EA39757D7D6885
+B7018BFC81564DE44580290F53FB601701342AA22C825C566961EEB9F886D550
+00079A5FDBEEC5B00293B784C5651C747D93149B22DB752958992E64AE87C919
+D97B0DD0851E105E8D4C9FD1792B94E7EE1566A482A55BEEE5F4782065667E99
+FC0B355020548E10A5D7786D6FE53589D9B711D0DBFDE94205667092766B8351
+0CDB4B715EB701B1BE4862B18FC4A26D3A8A680EEF001C0EF439972FAB7F79D7
+18AC641B6D1DD5A613868D67121C0B67012EB27B920AAB6FEC1B5D067B7DE813
+FF1F3CAD1C279036E0F2B02C91A32339E1AA011CBADBBEC510AC628D85273FC4
+956EFE7F85BFD2BC6D57E9673AA1402B0E145A2ADBF33C3567BC47B9BCE16A5F
+A049899A532B554245FB468A6024E7F1D6BFFD3F0C63AACBF8AE866C0504DC23
+266A566F4EA034458C160DCA0D860995C246DCE9B8BC76B742AFC3A23E15853B
+242CA55B38B3F1AC192CDA70C873363D4F6912A4B6A9D691A53BD33F9AEDB1A3
+0825DF6D9C57254666105DB69A8CD29522FA2F4016533BAE1B75031836AFD5FC
+5ABA92E8588B152AAA2252EB8BCB5F5C5936E6072167405112A10DE09EE454BC
+48DAF59774DFB93094631DB0F2C97480EEF0006C18766AE1EB1A16DC6C0B52D9
+9ECCF897B2DB4D0F690749F8068F82ED159207E06CAAC19EAF2FE95CD333DD6A
+1DFD3F3C2EDF3C0734B14814BDAE8331BD430C963492FF6E7B0BB14D56613FD2
+C27A6FF7D390C13286DE72F5241AE846120CE1DDCC827D00678A3CF0E49CB7A8
+6B09DB2A8072898C89815C8B01240F8E7AE7E20589959FEEC6470089F8415C7D
+1BE0D344166835AF7717016826D627AE4204D914A318AE84C6439E4A9E8F12C1
+9D98A1D5E85D00C536811CDCD56640D44C7EFA03E6FEAB29636210534E406252
+A99D75C077CF99D8AAD43644EA16DCC28C6F885A041E0B43981F09959A603ECB
+19F9ADD4D4997A07B6317C731DD429A6F0D1D99CDCBC475FAA8BC888EC263433
+0BEE727E2E0B6FF98F982C1B128D097314AC7C696F84F19DAB10DB5160A59B26
+CA44DDCC9284B843425A302C5B21A829BD261FA33A44F339D51B2F95C949D37B
+D75FAD32FFF3E76FFB7713FAA9F15FED09094E476382531DC9639FECFFB3940B
+E7DAC4BCFA633EAD07643CB27D9CDE05AF6ED670D74760CECBF7160F46742AA8
+FF962C22E1EB0E492C75929625F6839E6190E81E477914979837A9F165B13B28
+C09125D9659BB596B0E8B165DB17965AEE56EEB46022390513F395C2987742F7
+F141E45BE948632B3272BFF43934C84950649B0AF418E42DBF71B4098FA8079A
+5F26F81922D97866F8183783DE8289703D0886A704CA6C2FC9DEF3DD9B116F18
+23A11A448F7D8180E1BFB2369B2DA3E6A09AC65A3B7AE63EBF4E388855F85A7A
+23E90FFC6965D9643E9FF8DEF8DF0DFD552126E19B92394D93A492B27E4D49E4
+36CCA1D51783E6A2A2ABC9657D5B8841A2F99E6E89F29C2B1ADD7C4D4340C3F8
+AC3877D3D11C28D6E1252E690B3F94704C9FD6B64BF03A46E1F399830162F5C6
+CA081A12E1592D9AAA6103A2C10BB2CA96A7BB2A141385C5D550EAC392EFF1C7
+FB1708AF908BBA2F807284B87764DB4BED8B26394BC24F07D731790A1775C909
+68B17ADB0F4A37B58F55E514E85BE8FFDE0D1FCB02EB75990A9BF953A88FD966
+801A2428593E86E240CFFD0F5A9481BF3E64AB2B3CF8D8A7C6DA10E5D4F96A05
+7E207E4C6F0CE1FE061BD6235AB57F568A664604D913F35AB9B9F693A4B93EB8
+19A583E1057E77BBB0FE596DA83AD659FCDF9F793417643DF22C12CF0152A76D
+E8A1B9C890235D22B81AC5255BC024FF69A8CBD1565CF30778A80B56D31CB253
+0C3A1AFA5B912ABBE79D1E84B68407359F72486A6EB1D5095F8323609F0BFFED
+303E9A448C3385521D9C6743DE00ED69C1FA67DDE59FAB55738EA5E48FE3165A
+6A64B88D8B1F6E033C6209D2BD3FB040C0523A6D0C266758DB2B43B556A6E3D6
+2384F9ECC1BBF49F0A922FAB1E1934B279C7E8754E1C0ECCC831B3A7BDA34090
+31B9B02B8D514E21AF2EF6A66B248EF1F50CA646FA603F9591D4951C22472018
+B5D4C5822247FC61E4201B55CE9B76C0A79FA05A15B85736B7CB5C8421147314
+499706F303606B3A0F75012CEC4A1AB0F30802CF0B5769172FCCD3E057798E91
+CAB106C3B1A022E93DBB6721A3B1386C8878EB7C342D8ACD5C86A30DECEC22C5
+55C18C1DDFFB5B15D1A81CC9A9C67649B555D5BF07FD1BB5DCC7ACCBCB7E8066
+5635FF4F1DDF308FB2A2FDDACA60FD88387821B10753D7DF0AE56BAC14FAB05C
+0A38D450C22F13F00EF31F73701F38BF229EDAFDE8C3F6D41DBD51616114FB8E
+631C8D64DB1F5C0C359C1C46AD245ACF45734ED7D22A397333262D7268453D68
+B8AD396C05800C05819BC0794148DD20E6D8727CAA6F167F5888249C44BFD95D
+A85B651D7C2732BD1FF349E7DFF7778E28C88516C04AB1C67CCD5CF9144961F5
+93A342144450258D359232F11FB19A4AF79A0C046E845B01FB7B5B5D62622D67
+DE1D52D712E1D1B4ADB8D5DD51309F2DABA84D38C1ADB4B31EFE80FB690605C2
+B63BDF89D1FDBECB2AE4FDFE47EE5C122744875C107954341113B31BA1AC4D07
+2166F69F1386BC784D82F69AD51AAB6C22FC8641F1AB8989307F7643782B3FB6
+FC72CE90B42A92156044413464F8634A5B4FBC48C347E8D2CD8A1A407C44ED27
+677CAB77EC2ECF29BD752544A69F46
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l049016t.pfa b/lib/fonts/l049016t.pfa
new file mode 100644
index 0000000..e47d5bb
--- /dev/null
+++ b/lib/fonts/l049016t.pfa
@@ -0,0 +1,1582 @@
+%!PS-AdobeFont-1.0: LuxiSerif-Bold 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Serif Bold) readonly def
+/FamilyName (Luxi Serif) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0.0 def
+/isFixedPitch false def
+/UnderlinePosition -36 def
+/UnderlineThickness 72 def
+end readonly def
+/FontName /LuxiSerif-Bold def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-217 -211 994 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078992 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D9E494BF284EBDC8877C4E
+5D28D2A79EA7D5EC25EB01F73826320B565BFED33D55B5D2B4128ACF57097B2E
+BA8BD7BC7EDE9E6C636AE6FF86DFEB5E9BCD723BED1C30F8B20C4086BCF5FC74
+44FD8939C7580185BA7BF311E1E56D7C53EE70ED83BC1615501895EED5042083
+A5A0D8CC28978C5DAF869CEC1F15FBEF2A58A11A3417D1527AB511AA9B6746E5
+5798FDBD24006F12521FEFF4284ACEDA2A6FE84D9DD417103B4B1FE7FC2BC351
+2564D903599E253F6F4BD11D7B3BFCD01EA9DA51FAADA5F18B9F5E5DF25FA0D2
+A1BD84D42BAD716CA9303DFECA5DF05B26EC60612FBE0E931112268B223FFC37
+FA3ABE4C7E429354DD82D7F24B6A342F53EACEF4188937778E2F037B002B29F4
+9A4BAA19E878E7B0A6F326E3DC7949DA57D84E1098506B0B4C1BBB57196B597E
+310BF7408315F69854ACD0F8E8640A70F20D4EF409AC0F891554643BD8040BAA
+6C11008AEE7BE22282A1328C271E30817386EACF45542EF2DC63856FDD867C3A
+4408FFC606DD5937B74882832FE9D3C806AB1C6594AD2F95B763919345E37202
+5C3474453ED74E5344ABA7A92101A287E932E8900F7CAD3083D38FE1EF3ED4A7
+E6C2A0A8A19A2DCAA58F823D354994C9BAFF5FAF8BCE6A50B275F8958E9254DB
+32D7BFB3A1F3739B650B9704B7AE03378D90E8432A1BEF6EF20F8F49EFD919A6
+C9C90F60822299B0B50C0EAE5243AB66D9573E257E99ED424D4F7B284B779EBA
+1B47D49FFB539EF6D3CAA911911E7CDD9E7CCE13F60F2C698A7E4AA8AB3A2B2C
+6F3C86B9EC9EB8A8B8687FCB279B9B2B4B5F838FE25EDE772B77407CAE3C5840
+1EC417A4D627AF14F5E8D5D45EBBF564279361B871A0A142962BDB83EB1673F3
+CF7A34044DAA42321ACB120827402D43CB17607D9C8CB2BC726B8D06AEF513E2
+72CAE380EC17A1A2B0F235FC70D479A606B3360E291426B0C651CED104A39B26
+C4B14949E12B160B048969242BDCB760C123FC89DC73D8A628448CF678C9F679
+99EFF5E798EE5E46F41D1B84A38631876EC8CEDCEDEDC21038F7707A1F4CD355
+81003CF5E163C1DF8E76B1C4BADFC4C887A084E94CA74AA5314BDB69CB0C5F79
+B80DBCF17D95CE7B1B0E3C68652158131D8B776C368203356AEBE5DA210EC561
+8B56C1D5BA9001CCFF14D7AF2CE1175AE66FEC8CFA4F1F2D2C2FCD5C00FC62C9
+98F5FF6209542EEB45BA0DD8ED9CD08DBD58FF8A70C7F1578AB22E25136E31E6
+DFC05DC28A66C6C852092E56590199B2394D5B99D466EDE33EEA357806A3D0D7
+06B658A6528AACEC3682044D37A42E960E1B92E7E064AB891AA0006AFDE4D8B4
+0E61B0480EE2879F3C8455785EEFE3E8C02D9A5EB4EAC0AE01C79C44F84195CC
+4724AB8ACC2E93B1551E750DB22D707F1BF8FE2E9A751E542F347A7E54C91D69
+25E99CD65F7A348E6234D1933177E5EAD802D3907161E7A19A3AF41378FDC8CF
+464A5A87EE4D83218A9CAD27B1F349E55379DA9640739A502427F52C6A16CA7C
+FB8E3F19E256918FEB39D16B6C4734B058373BA35A222B58A6421F7FAE124E40
+B11A646757F60DB2ACBB0E8EAC910698C137FE9149DAA39EEB195ED3823F0308
+A8BA9E889E618458ADC62C8F372B4BE51B66FF0E9F9837494E1E04077959E166
+C3654872114BD6A703746FB31E330BE538EC7C440F0473D5983C86714E002205
+7469E7C388E390068A302F16F7CAAAACE00BCBEA71E1C58E3B59C411965F07FF
+04C2FDAE9FE2D314E85C035F58440DC004366307A9173BA9342B0CDF58AD1980
+5C38795CD0967F83E13EBBABC37CDD0155A49FCCEB5233B0031BAEB6EDACA49F
+E842B25DD5E791DE4908C94E372B2075F9615CEF9275316080AB9F5E678AE30E
+CCCA7B2C9E71571B42A5315849B08DADAD9ED58120D77BC16019006704D436C2
+B36A8B3860A5B63B5864383034B6FF0252E29B409D01BFF9752D9A845493EF2D
+2F1DA1B6DA9933D24729E8002E4507A15D90E0CBC40FB562E4C0CD70A95B5D7C
+E70186CD14657AE2D308DB650768E9B135E24A82212A99EA217EDB93D1EC03CA
+2FE7B4ADE5FE28A21225F39722E0C2144536DA5083965642FFF7438AABD30710
+94D3F4B1118179748A71133050E51C94D9928885FADDA8383EF01BA234BDDAB3
+273FAC0D86260001AD472BFD440009C19EBA1C212C581888FCCE590516767F4F
+A17C7F5BE71A2262A34673DE3CA11EBFFC1A971EBE827C4A232E4C6CBF65DA34
+A1D231C875BDCD842BF21E1C00E28AD90C73571F040BF095E28B4F4AA5E3833D
+D050545E8B5A04A2F67B7C0EE5B49ED30B189F0130D544912E0CBD25D09EAC0C
+334B30759FF0ECD7FC05D11830F0ADDFC9F84028706324B903AA963FA4FEB4E5
+12756E76F8A55E130A14866983058A7FA9BF206924C0C7281E7EFDB384F9F1EA
+EC120F349CED13B2F2FBDB930D1A66B1AD1C10B9E66E7AE2830B9BB5A51D0DD8
+0A5A0A0729571B9DB76123040AAC7E791137695FDAB0639FD2F994107145E1BD
+A539BA84A3DCAFFCED2FA9A1642FD8123D65E24FEA77CBD299D22AB1DED3AB40
+F0DC657EAEC450B1170CECD360093EC0CC14E2F50E141B8F52A3F5B9D7CFCA92
+30D819A34BC303DB080E7919E573B46489BF79691880EEDD6B992CD63374DAD9
+2DDE4B0DA61C03CB953ACAEC3176B7C474A1A5A351B259098FB2425D2522018D
+98C0CAF94E047EE130438CC2AEA2AC11AF18F652C53157DFD31F44261103DE0C
+4D582D29B23BCC137849306504F3CFE49EAB54D05FC62754A3166AF5CA301F89
+A1016CD076761A415C900AA958F922C6881BE652F32ECD8DCA3059CC335D3D95
+AE5C4F0DD70CE9DE75407AEE7801B9839A56C3E372F126A22A779D949E4111A1
+7F2E1B2D884ECAC744D2E78C1D16A8D3D67A6E818BC347F6E6DFE71ED0A7F45D
+F37653BEF6DFC90D98629BD09DDC53EE1E2227CD0553375AAB4A3F10ABFC38D9
+A55A4D376D18148CE67C7D0062AC884CBC6500E646C84DEAB420FBF64E4B4360
+B2F5EB123D42F0BACF232E9F3392FC1704EA390941491BD97D191F198976EA7A
+8FE3D14141E1BDBA8010266CF791D0E700C1F1C1FE69709712EBFB2136026E84
+A246F78B6B713D7DDF9E01745AE071B8CB052B54D5545AB56091E3134306A532
+8729EC3FD25AC305D3D39571C2AA50D4FFAEDECF998BA46AE033AC1D5DC3967B
+C846E475352E0468C0826A8E040332D9AF6975859E069F70F624E8A646A65DC6
+1852339A3857C96593FDF7F4787E5A7D691C89396F4B5D4DF91A092863709AA8
+F7D8BC7C7739EB060C3BEECA0631CF9F47BE4854248EF5E88B79FCCAD7C19BB0
+1B745E6DCA8034363F4C5CC4B305FF2EE1B2B9A234F394EBE15B82B5F317EA7C
+39183B8D590DA62B3277FF00283C5F5DBFE10F29AE99581F6A9227009300BE2C
+2B0E509BD87D96AE7C5B198C8FB02DF8E1E5A648EEA044A5AAE0293BBE43D2E9
+33D55B70F8BB33CACEB5DB36CB9A731B3804D859E020E2FF49BF121A7950B984
+7B0913BC2139A8F70FF6DD3C6DC638477E4092F1179D540CD31C349CFB0AE55A
+B0E772894CF02BE0637692FD6574D4EB2A76E93070556665128B99C20296C550
+8BF29B1EFECAFF31925ECBFD147490E3898A98D374904CB7BE2E7C752734A359
+FA107535533B4A97691A242FBB82D66C006A19374AE8698647CE8FE951EE2B84
+0E5836F8A3CCFB6F95FC009F8B5D200C0ECFB0BD6692A8644BA7DA5CC2E80DA1
+10ADA3FF7F79A40AEFCA4B98CDC4EA9C29BC1E901CCE1FB466DF65233B889C24
+DFA2E161FB6366CFF3AECE89C404283546D7814B254798EE928D74FB9B72B709
+E965F4369ADAFE799B4510CFDEFC772ED5516D9EDD5F1AF0410F5D82CA9DF5F9
+5134D9B9BA4984B5A8A3D8320AFC0DCD6305CDF582B08E28C28F0D137F73EAE0
+800469768BA91CA121A42D04A606D1722104CAED2731D73C3304F7C4371A1319
+F9ADFA53A1F7A7F8EE4D7B74E3473EE3C11AB66BB43756CE0D57AB36B5278E43
+B860B5A9C51AF0BE85CFEA6C3D114AC0AD68919A9027DA7C80D5C3456FEF5824
+1447D68ACC05CF272C0D0E62548DC9544908B9F50F5804B83C229F5E9B65C3C3
+CBE220648DC64EFC53C40473A421301F19E768D3BAFEA7FEE49FD3B4EC279861
+D9D751F4D49A64C463EF174D0F7672042E22BD2F55AAF7F531809A541D5146CB
+FA4D776AD1AB10289B6EE3E01C19B8A8F7A282AD668D5F8B76C45A68D51BF56C
+56DDA612D9E4FDA940D2C4B75593834F882AD142E6E39FFC70744CD9F3B7B19A
+1FE25627DCC832F20296F2B4608AAC873F5F7D859D5BCC5C0B83DC569264102E
+50BE5724F8F64CB35C8FACB12F460A311D57F4E52B7A08A5930BD56951C0C88D
+6FFF6A6A18553FA7A2731F001C28093813676C4ECF8FCCAD89D94EFE35996AB1
+776298BF7E1EC9AB0FC95D6475A635B89F7E0EF16EBC188B1FBE3D105942CB47
+0A4BFB9FA132E1AC19D544423081ABFA1AAAFD91165B378D3CDD2734430EAA36
+B070A780F90863631E2C7CA2079B1EEE7666B975FB9BC62C37DB28EBBFF3FC57
+5356BBAC08A908976DDFCFC1664927E69DD7713A47B1A4150EA0762E9D30455B
+F840841688DCD60847AECA495F411656D669AD3168F261BF9C31821EE3E8685F
+761276952DCA7E4F21C16D9EF197AE2FCE0D1E85263C738E1CD88D4147ECB87F
+7C232716CF20C51575BBB0C771FFFCE3C08CE867F426FC4D1DFEFBFA1618ACB8
+ED40168DCA837A254EDA92887905BAC603606E427256D2922D6FD43AC3A18781
+63EAF11A9102411AA6CEB7119688C106E71364A973EB54F1869B419AA6770383
+9D2F9E5C0DFCD9334CAC426FBA2AFD070A0374D65FF2C203516D9E052462993E
+DD2C77E9F84B8299B2399045A09E37744EDD3F3DC1599A2B8901C84DD5640936
+8938E43B662ACBEF2279B10F44600CA2C61647B67C8909097119232BB82262D8
+8C55D939A457E84CC03F2DD9215C78CA82EF556DEFE179DDC0D248A933E9F906
+70850D991D72913C554BA1E71E71CB773020D452247B7B482370C8B190A105F2
+6074F9E154E9BB43CDCFF610B2634061614BE281B1809E7FE0B60D308507465E
+13F424FA991810117D147A9D68D76170C75502E60E95D19B30081969BDE3747A
+1CD185820B4080697411DE70ABBA838BC6AFF19E11AE35B5284B2AC7A96CEE55
+1D9415C7FB88CDDA4958F9C9892C1119B69B5E2B47B2896F31DE83F6476510AA
+CCB73E9E3ED534D7269C8FF23B4AD964AC6A920C20F0CA0C469EA85F6D675436
+CF22A3B92B7A4BF502AD1A94D0A575A82E90ED3CDE6E422B73B6B76C23B1CAD7
+7E246CD8C3FD6A40CFE5E955613118FC584DF75CC434F8DFD05181056CCF0CFD
+53BDD45E4F8A9424C3092C42FFF19D59AE1C003D3FD837882D6B0B2A00489F23
+518B48040D40CBF9CE77733823CA610735CEE4FA8C907575F0F0CFCBBA4D2E50
+04ADA5DEFC707A82324D7F288302C99D2ED5009D20FB875AA0F861479497643A
+0E041E76CB10B898E1EC007BF8F70444474A75D3C005ECB947B8F8DE8356771B
+EF4052F1D5CB3B19853804BCA33E0EB27B418E75AC398E79B1A621F85E4F5C26
+1603C789437477357A69A585BDEF24F8F0C9246FBB04F40AB6498FF72BABC3F9
+2C5D9476A87DB82859C374969A1016D0068FEC4AD30EAF10E871DAB9564EB600
+8EA14C41EBA75DC1D4B4EE36AD57CBCEA9E862542627551B530AD763BE607808
+5441ACFAA3AEA5C6DE659B15F522C10F7719A4F868473883B8D1BC1E40F7E525
+3C1196E9850B6D58F7673D6403BEB6FEEDE3105BC4F7CECB15A3BAC37E77D83A
+D802F77B9A4B4014C1FEFAB1DED101A0FE0ABD220965367F99DD6E4C34C6F47F
+040B8A1924E7889DC4A131408D8BD1AC15B3DD07315C4A30BD30BCB9C03D6C90
+ED4295840906E3AD448FF83F74257F0549BAA5F0D96FEBF943F07941121908E5
+AD6A27A33BC555B602F72F067273270498410D2089C3D1EE95D2C423223CA83D
+EDDB1552B6E121D9FD1D0F5BBC1E9E8269C0CD6515B1428D61704FE230AB513C
+AFC088CF436E7121630478E115DE2F5157D244B6E081FD74E5539385F6FD056C
+5824847358D38BEF8896B93424F40ED6F485CDA0D9AFD896F921750E331ED55C
+B58A93CBF1F74F1B11DFE0E35EAA56580E949130C6D670271921C65BF946FA75
+1B9472F92BDFDA5D71DDC5C3D03260B67E2D94773961664EB4FD4D23D49D368D
+F2D8ADB7F2D6D41A019E20654EF4B78D35F26A159E48093EDDA1FDABAC484D23
+88EFF39E0A4C2A64953D53B6039BBA748751F4B6C077C9B66AEE9127E646723D
+26F7E288365818F30A38071AA011E67F0E9AB64F4A943BEFF67BBDEAB4915B31
+FB6326BA1EC27EC9F525CD183D97015750C17D2944F793407DB6ABBB72AC2F85
+98C449326CEC03227FC767470A3F102A12C2A8122396D00025D84A3778A50869
+FBA49AB1AA1506839DDD675A8AE2DE1E44E83D300CCC1561210A23D1A97CD590
+FC257FB5367BEF1BD15AB855D07CE21771EC8B815094721A1CF7306AFB4EA421
+DED331B92C7481C683785A92B9E213B04A2E07F420ED9B9C025DC23D4FA9DBF0
+B11D6948AC62ED02298B8F1C6B519364B6140AB89B4B53CF1D05FB954FE7C185
+4C63616799FCF3492ECFE06D0D1E00712756862C3F0C1BF21FF08564BE0A3AAF
+9364F4E7DAE16D828E7E5A2780BF6A9EF1CFCF680B4A96CBC4EC5DFE7E64E140
+31968BC00CCE67789EF5BB4B1E7A57D5FB53819CCDEBF38A555EC145FE2F607D
+C199E3E514EE3012CDEFEE1FD70176F39B5071EFB08DBF3FDC2DB6E89E2CB41E
+5F6B9528C7EDCBC41B3C4860CA7EB9C469BE1D5D1A9E590F6E721A956CC53870
+9EDE2D930ED28AFF92DC834913C4284847CA619D27B68CCDDA91E7BEB15F44E6
+DF8B38AFA1C63C6F484F0001247F6C60043DA83C802E0116A1EFF49EB943EAFA
+01412A0D518E2E860F61B649D2AC312AC6D84BD5D7DE93A13DAF1C4336105813
+869D47538CD56009E8BCE20243001E87020BB2DA91D83EBC9E9C98171F1BC02D
+56CF45AC7DD7358ACBF26590A7894CA6F99AD01351A384540B9615C233ACB22E
+519CDEAF5A0A975B8B6E7C711DD98603F684259B9210E8642D955A4F4D977291
+4C9CA4F59C76E598F7E48DCB42A331BDC8D4427A13468B735FF5D2F58296FF65
+180B22485EF5DB6838A5C049B1371571D7257701929CECD5E1A315AEF62E2E98
+2AAA70C380E40C3CDDCA85A71558E3AD0AA1064F840FF75334059B84A026AAC9
+DEDB589213D45C520F8BF067BFF0170BE3120A8F6E3BC29E4D1114DEBCC4626A
+96926AA20AC4396734C91808EC5DC632CFD69ED1D517D9ABC261E00815E1F3CF
+A4ECC31B5B0348F96BD4AF2EAAA634EC24FD310F86E5C760A122ED44D2962EDF
+06104A5DF36138284743DDDABC2EE689499333EB31347F488311A93DF9AC358A
+BA157B8898903AFD6CE2FBCC2A558360D174E2A68015A676EF8A3F0A26021B55
+AA27B65B2755F48A46920C0BAFAAE72E051085538F6C60D0A77295754C755BCE
+D30F94627DF2AD3311767D183A22D64480ED1E06BE21162BE345CED43DA52047
+3975C8647A025E2411F15A78368A2689E100D692F23E0FC660D321D55ED4AF88
+01532431864B03835099474C36F1C39C71173A04965719A7ED95995AD5AB40F6
+E8A33CC915D25C2E9EAB91107E89DF746FBC96DFD6FB7A9F020B0E3AC7C81150
+C21D9E5D9EFEEAB4BDBEBBDD705BFC0F3F52A77044831A6A0397DDBE135208BF
+1E86FE2830A8311768634E62B589921D1B5B1347ADB167FF9B410FE902ABE465
+2E0C320C3B5F7CDE7859749978D7C2C80E5FE38901EB75FC166287F5BBFA6848
+C839C5FF11FB245ACC7B6C8A74720BAA44625D84C721AFFFA310E52EFA782EC6
+96014134479A15A5C6DC7D11D8256DEA0CC645D9F0B0524D7885A8A59A2638AE
+9DB5273E3F3302D1C94C96CFC9CA768F3A1F8E41543A272FBB3D40D65D82EDD2
+EA11E127CF93E345E87E41401E2699FF0BE4E92814DD959EBF4FB412D768361A
+7CA5399AA68C6153C77FC080273FF4A987EB649C9F5C4FC18BF106E13BEBAE7B
+8DD477865BA85C53A797BEF5F177C053ADAA1EA2804CF04692817BDD0DAC9936
+C63088AA328EFB1B4CAC4079C2EFA244605E362EF8058FBBCE41C2774AF399F6
+E9949214D2EF9B899B5CC5F628BAD3FF2054AFDBCEF21A29783732F56C52D19B
+12C2301D5C525099662DA96E0E07CECDA9A2137655A3BE6F6F828C85408913DD
+8F31D8521A84FF78CF44DE8619B8E922CC7313090F45860C5847A50792518480
+6CD5C1B6471F14D10372AD4C7CE4FF0E6A9B4D2F627A74B52660794691F1789C
+BAFA5D38F92E492EDD7A0DB2D7E860250C0812522FC5B912CF0A39620FCFD304
+D67F4F79FBD079FC05E403651A30489B717FD71C42DD2CFE0B970460F7D12C2A
+04492DF55C523C5E9C62318FDD451FA5CD0B7325172B5A07287DC2653BC5EE83
+0B78FF312012FB0AE605575EDB52F2A1F16509C12EFBCFBC070A4F9A90E58F27
+30D5CEBDD6DA1D2D740E0EAB4AB226F245C743D2808C3D843722050ABB626744
+652B3D3CCCCB276343C1BAD5C4D307753FE781FA7F47B3D9FAD9088586FECEFC
+E0977B68BBEF19034F53FB1BB7868EFCE3F3FBF89A26FBCB3F8FBF55C12017A6
+4743BD2279542A3B824ED697B866609546A4C27D97DB532BDE215CF8AC0C5E97
+059A761A197606B6285D936096EBD2AD7DE53C8CE2B0D0B4F7E50D5E11FCDD0A
+2BF4736B7B9848FD1D4ABBD8A6F3903F1EFE48F0034F9C888923EC768D4DC7B5
+EBE32CE269396D9C198BAEC1076F842C503E546705FD1678E7C6B8C3F5F431BA
+1C63CC1198893BA77CC79E5829E39B541962F6B110E9CF545B064E46F3539A1A
+CD080E98DE474EBAD440ECA7E820C145955BA0B6CC80E7C4109185A3877DAB6D
+4886FBA0D66D6C3F619ED6A81B346F5A196D1CCB4D796E02C35E5301E9C34A58
+3BAA4CC1BFCD6B0906FF15F200FA5859E6CA7F2A21872A51B7E75FFBD92C3048
+9297C015A3BEFFC5B5D13A988AAC23AAA4F0DD4F86FB5E6FC8279C43A10D5C2F
+624E8CDD2C03794CE1B2246F7BED4DD4564395FEA490A41E5345C6F86D847D0A
+7AD58C606ADBD3BAE5E649998FAE5D0257FE2878CADFC7581C22B31CF420A0BA
+A3A76624A582909E209E53B462BCA38014162605977B87FDB8ED67757CC363F1
+A50E5DC6A8441B9406D874A756D91B978415651D91E8BAFF5879235B830E8702
+700D5A797B9E1ED4E04123513DD23604951C26C892004DF6B8DCE876430ED7E0
+56BF36ADA204464C0789A18B2C8F9B212BBD5E8C9E2925D40AFA394F8677336A
+C406534E239292FED55B20E5A8F986EA761D33B46BEA1A37DB3E76FEC6A5EB04
+BD38F5B8DEDB095993F81BF12936932E610D72CDA00A2D3CC2522793B7887B23
+0FAA526C9D42B6C087A936EB98B776EBC2BE5E2A3301AE9A91044DD21403B2F2
+976BE40E7374CB47148F8CAF85C16D7DE4CF8FFF13470B2E6925099C3C97219F
+5F967068A9E82488FD591A964FC3169C38AFD8AA352CFCF35D3E0D6045484475
+4EF4EEE6AA387768FE9767CCD9F81818BBC7046AE0C2B7B42BEA5FF70C65CD66
+2ABB14F1E1FDE651C260129E2235FF02A7F27F1C948CC500657A536FACA3BA8D
+8C3FB591601310A2315920555BE054BCBF4668DD8032C562EE12D2C7ACB9C50A
+11CC8E3B3EDCCA00A5067ED11C24E5F0037FB82955F242BDBE1524583D2B676E
+12BBD3C0FBE80DB47A23D4EECDD1F6545860A415AC6BD2E852A39DDB12EFC723
+D0EA87E1A454B661249959DF54DA9DA50970BFBE0113821F1CE71670827B443E
+6544081B2BE1260270A23E9417E4B0155A1302BD9845A5D62FE9EDF7D1172353
+85BDC4F2DB55CF4FCCA18ADE873B53FA4FE0B58EFC867599891A165631064771
+5CA76573ED070A85B135EFC0B619213E0518F0D4A95490C32535F66695C84124
+A1413AD30D918BE68A3335E65C2BEBEBE4E29DA17A0FED672F3B714F809C157F
+006AA925F96003CBE7DB7C7FD7BDC5A890B9EFE60E9915EE7AC3B3FB9EDB2CEB
+581E71527907A1E43FA1A06A12CABE01979FF0E28EFC4965BD7ED592142D9F82
+47BB2417B528590A116C791E19A006F274035B74C8401A35952844F22DAC9D07
+EB2F28E3C9BC5B8E1373F1538F67686055D1273C565F536E9F35225A67D53E86
+510F371B7E6BEB04027216BC50AC67B2C0E9F528CD55613195C351098FF6F9A8
+D713269EE95CDA3CFC786F8F28DC3BFA23C6E3253E4E5CFDACF097B862636CD3
+B7C78FF990ED9B7BC27AA51DDCCF408F0EBECC40E555250C8077DDA1646D8BA5
+00697705ADBC54DB525A131A1AE59FE8E7C3FA81A913FA5C6BEAF2FC393412D2
+685F1AFB5C1B6208AB5E4900E29036832E8942550F206D721A759E994814974A
+11EA5E5A027C3870A06622FED8632C3D125ABE15C71146A7FA4179DCEA8BA117
+E6CE9AB0DA1373933319CD27BDD4C69CE672491B1F15BC249B7126F141FD1AA5
+30121588773D42E0070723427DF6AFE7FAE3DC6B940EE28A8195489F1DEC2811
+A4773B6594A8BBE4F439EF76D5D4025BA7FE822A72C5D7DAEF0F1C88342EB016
+26203272584C62E26D16F6E1A5B37A65C51553F93ED4EB12E95D6F39DA5204EE
+62B52BBCE5F29A47D942F247A10446672FF26C6F710244A237C89A7BF6D86F7E
+1889103269B8932632BC0F0F89FE477C24133D8F06C1C74325FFBFE82B59923B
+06045FFF59B25B50897E71B8D94395A939C9319190F0D891C24BA6186900F8C7
+9824B378C8570583C5303AFECF6D32A4AA96700D915D0DA70DFF8765D44740B8
+518FE4A6A8049E3CAC9589A3C0752F4E0DA6AAB319E1C21D0A760867602A9CF4
+CB372F3F4B7B28712FDEDABA55A6B24B533FB96701728762B2F7FE2DD070CC3E
+7FAA0F6214500B495F5D986D13C012310BE12BF864B7928BE4FDD9DB68EE7C9E
+21D645094A676809C455F8AEB85E5B5B33F9AA13ECF24E5258D49D2B233E22C6
+F9926353011DA6B75D17AEB6BA6EC8E4A405181F04A656E0CAA13BD463BDA234
+5F4692AE9FFE0C4240B7F260AD199668D27C07ED34E69BA9C3E09AF0F18E5731
+71C576C4431B9DB7E83D645E7FD6D3DDB5AAEE00A9A3C806FBFFE1D8ED8D8A47
+4F69A5BD9747B6BFA7EA057DF540203AA6030B5932896D1E586A8AE9730B32A2
+8F6B27400E4F0773262505F37CAD309D48B02FDBBDE883E0DA5CEE4AC6B28AE1
+7C7663C7B4AF5EACD32EFC8A8910A3BD514B8E19820CB2741BED0C03DF65DDF7
+ADA651E232059D9AD05257A8B271BA34007E8E2D6BE190CCA9992011EC455E7F
+1443C4DC5BDF1098C399877B64E02DF566B5CAF6B8BE73CEC6A2651305E32C91
+2670B1D570CB8F2CAC29D30588D7C6D3D810F660F7BF30C18609D72D60FF745D
+D879957E4542F5877A05D0A281BE84656D3D9879FFCE5F667854CF00DC01B8B2
+38D2473544E81D8ADFE49FFC6DBA711AF38BE51897A42FAD78DAC2D1D08A3780
+50C9B002A9EA58E0DF5F4FCE96F3405C9BA1F32C91405CD058E9EB51C43457B5
+62755B6FA91CD94C22297FEB48DC03CB78C0EFA09C74D2E7A8FB253ED4F6769A
+E54731333C9EDF078829A58AEB8C1D28D1D7C852EC574B0E2ADB99F2A0CDE7B8
+4FCFEC125944835A8E3F1FB0C15FB669E670D2D8DBE24886AED75A9190BC52DB
+BBEDC221D68B88FF825E69DD69E61FC2E37459DEBABF7BCEBC179D4082DB17F6
+12408DA590D1F768F630951D7C72A74E5172F71C97624F2F4DFB37E4913BC382
+990F61400A362D5AC3A29D64F1F1BB24E572832C8A1A8983903D086ED747442B
+EC2DF2DDE41AD05045AC4BFA77F83342BC1CE856BA2359A66612962A5A2E0635
+806D70FF2F6FA279F639E5C38B0360C33A170362F5EA48E096CFD7BCBC43B49B
+CD4801CCD9E9C421F24B6CB3F793D4ECDF9B1713E7C141934D53EB8FF655273D
+810ABB04AEAB956AC369DCC11C17D10F08BA7F1BC47A45B3889068A169A22761
+52149F3BBBE409F8C28FB89460B55FCC0A357A14FBC50A396512CA588A4B2324
+E557EC51138CEA0ECC37980259DCD9E01FAC43FB9D7AD36B1D17656A932FE69B
+3D224B98F0E562368682150C9D9D4BA2907E4439BDB7A6B8F0D18F8CA351B446
+96CBAE1B9EC0C1BADD2EE20443E01570A39BE38FFF7A2329CEEE5EDF6B2DAA05
+C51F9F75B21E7ADAF05591569AE0DC92F469675588F12A28E84D178699FB76AC
+D75E66C0F26F4CFEC9BD0597DF10342033D0A2CDE6DD2576A651DD1855DC61DE
+FDD8BF33FE487AB7CB0FBBD811F413BBE9E23F2C832A654B37BA922AB7F6DD9F
+689AEFB8B49DE285E7CCA8EA94A0C45B5431732E81F5DD0FE804CCA7C82D5234
+672B3670A16EB11024C31FF89A5B4C03B28B2B582315307C8CE8686557A644F2
+65C8C2A9CF1C9A2862BAFAEE0E94AABD856A183394331992EC764A3B82EE4306
+2B40848D8D95D0CF561911797C9A2C6D9E334D3F6E595D59F54017218A8E6376
+39235EC929904AFA8EA42EFE54D294768DE0B68B4C1907F61662FA6710682673
+AC64FE11B84BFB0BAC6D1F5F90FC91AA5954BE48868AEEC05E19117B682186D9
+A0CFE621311708B56EC668EB0BCCD9E9837CD7E957D72AF5B562E51378E8A9A9
+34947A8BED94C55FC7A429E28DFF9BEDFB3F28E5D1A2536B84DBD1677320B132
+27F8A8DCBD4AA2B971F2F02817DD7753431BBB210216F822CBAED265C55B79BA
+D7D5FE873E093D62250A27022D63D7C0823E9FC09209550DD4BA413E50FE2DAA
+8D60AD9AB7E6FCE79E1B6CD6FA41F5C723DBBEE00FFDC8F614DE64DF40B45BF2
+84D3B6F96A1375CFE96E446E6757F31F8FD2E34DD88106015037F4F5B5D381C5
+AFA0D5724AFC260CE676DE70C666B34520FE2E2515D2C5194049F89EFB0D1A4D
+10D40A12986228BF3CADEE7E8C9564F9F2D61E094C44310FD5295C5AED950A23
+491431F3EE071FC38FA803DFC580A7F0FCCFF19F3D8CBE0D503057E95A2A7D00
+A490CDD1BDE01EC8370310A869793E4DB867496094D4B54B3B9AC440F304906F
+AFF32EB87AAE8075149299798E681B83D47935D93FD3A26302E5EAB671BC2C7C
+7E87A4C1789A772A9643C5737084462AF596F23DF9F36A8C00488FB78C6ECB64
+60A22C5D2DEBFA17E2A78968EFD029A29CC04B6E231B58ECE47CC6C93074F701
+65B19F77969B4DE3A7272E769CA00D5C481F5791E559F61A68CA64D4FF88D513
+642E82C48019C5BDDCBA0246448BCB765626462BA0CF6DE0E55F5C4090DAE3C5
+15076B25A8673D89A4DB9B5EC5B133EEE44BDB76AAED2A91FA68632997927EF4
+EB93C9581DA7663A24CCB982D1BCE9315F8F719E20C9E388907555FD27ADD8CA
+81B8A4C5F4F7614F15F5A6D3A542E3F22215F0DACD6D78E22209AAC0036AF039
+12045C916E9858E2C07B20B13B4715DBD513DB1003D256811D019BF84EA41069
+53731364B773A23EC103ED81FEADFF565BADC9B698819BE95D6386980B13D678
+A33460A92BDCC24FB6EC68FB73A8ABB4D240DA5146F04B1529EA28B8C47B661D
+3A27F5E03DFB5C7BEB8B1E6AC63E1CF7236198487663AC00BEB5F59EEFC366AA
+C9FBE97F8EF03A80F37DB7F1D98D5994203FC3DAD6EDA29CE5079E09D504E360
+902FAD0E67257EADD77A989756B3F1B866BE530583CA81610AF81D516A78E37B
+4AD1D27A2ECBF67AFFA6914F06CA73AFEC79921474F3BFA2D2C169A7666BD668
+821FEE767FB326ECA936FFF52FC87963027983B23751956C9780F1791595C91F
+3A5B497D8107667B12CB2D31A64F16F51485CE00F376DC07CEFD4DCFB7A91C27
+CD8F3584B14CEEAEFB824C59FB4852C2F285159BD37CF3E3880F47658D3799CA
+E8DCCD4C79144D1503EB5492670440976954FCF0487F54EB23A1CE0A139AE7E6
+3F34594B7F85379745113C0EE8D05E10A6E740A76CF900F5EF056DF772B07258
+A3206320647253786225D4CC14548B1750CD034CBE4FFFDE56CD84B07896D08E
+2EBBB9006DEEFE45EAE3688F06806CABACCB255915C695608A6C99DB3AF5A6E2
+DEF0B77D903B0BDBA16C66541905C737FA79CFEC143CC89C4CA56857096E7A07
+B8A0E2E16C778C5C929066AA567449553D2824B68EFBF7D7184E56470080D7C7
+C847A46A9C6556560B86FC1F82B7231742325E718990E81FF7323084267F46E8
+9F4B6BDFBF811CA84296216FEBE788EF20101B48EED478454F1B238C03A1E0F3
+DA386922D1A038EFD0555799B29712FFA294AFF0312793F2349B1DD00E16240A
+6AFBDAD7B8AFFD1AC1AC380F35CB7DBE92D517408EE81517C04D9A82E1A6DB84
+EE4A6EB49650B0F94A64500A771CC0788F0CF8EAC76EA80437DA23D05651F9B2
+65C5112FAF87B2AAF4A8E07DB8762229DD3C2D74C364ED6F41E853DB2B6DE3F3
+9AEF626535EF31913165796AFC6989371B04BAE091F9980448315E43B29AD252
+5676CF2B2DEFBB0702007DCF4F8E2BA032714676CA56CC18BB378D138075DE54
+316D7F4D9C73B08A83FBE43DB11606B0520EB9C929BC4BA925680FF37726F65C
+2DE1D25B9500C2C2DA7592A5212290DEE61552175001675E3258903873E9F3F3
+C2D5F7F57B1ED253596425E95743F67145FE18B80AD5194096E10EAF1329BAFF
+C5666BBEFE818C9F88ED0A728F5A791C297C97B4B398621E921419358666B69A
+63D129C875A930087A889420CA64CCBF0152CFF788360BF88A42464C40D03B1A
+1A342A89C26CCEB7014C0A5A1669331D918604AA43AC4A0FBEE0A39DB47028C5
+44074EF228719E1C3CB91FE9F053148F3FF3BAD16CB57DDE5E3E863D40632D10
+68E72FA28B258913E38816D9E0A25616A8DADECAF0DD52625FC5BABDA943017A
+3B36959C495A114346E805A9793D2F30C5F7AEC8CD082DBE1386640593ED1E97
+63A98310C1EA703BE2AAB203095ECABD48D761E92D614233788E4FF98C154A95
+15B460EF33121AC9EF0BBAC00683346CB2586ED0D18A62CB0D6DCDA7B0500843
+B07D9C149678BE81FEF9AF9BB18D18B5CDD59188DA9FD6A79822A69CBB9F0A9F
+731FA4955946D4363710FE1AF278EBC8792158D431B74327017814D69E5ACDE0
+2877824093AD46C7FE256D4615B6A2EC4997310AABAE4F3CBAB629F1522D5B2E
+5B43E931917589434F5731D5418AE96EBB0C07573EB153A6E5442202BEDB507B
+4D09872458F184159873E21F91F999DAEBD2E29BE8E82C6B796345B715693703
+CD412195D1F170A2B2C9045A4D3451752FC1945F82E92B07F37828F44EF2EA61
+77F614FABF81162CC1ECB0676E8C121CEE5B20F325993CBD2AEC8B7BB1D8B1FF
+85D6D33B75BEF89146FFB0BD73DF334DD1A9396861EC67E447477A00A4276652
+F67B8FBB2AFCAFAB9C3A14B0F7BD3F0C54CBD763EBDEC129DCD7A7DD2D6760B0
+460EB2E5EB3414C87365BBD0500C5FD4773525A9455BE7954C616C3BC0D892A9
+AEBA406B14B5D5340785E7EE4C2DFEEED396DB448F20E58725E213DDD11DA1F7
+000EDE41596161C72151B05D902FE2E3203C3C6458F3B462E07FB0C40FB83FF8
+375942B9C7440A0EFCCA65322797DD2401EDB69D308DFC579403609DF855E29C
+3E35687C40EEEF2D02A2239181836DD51D99A366D88C31AE289787211A3D5FB3
+0BF10D01299C451C4DD869B8BF132018BCC45077647F72889EF81A5BB63669E1
+66F5EE6FA504C44096F7AEE1031A39EB8CF7902D881F6AEB66CAECA514618719
+2F4F459BF2E7E6E2462318279F15B1B20005AD6137F3A4F2A810A7F08D3E0BCC
+4710DB79054C4FBEBE5AE07CB156BECB6316065D24C92272E276EDAD21FDDD29
+E1F4500E0358D8933DEA0609C49DC211A7A592EF2CA1AC5108898F9532311CCA
+37C83333689A12AD0B185747D23E12EB86B0753311DEB69F6F471E0F0C99AB14
+CD4FA8E882FD8D6A17FCE3B2301D85F0FC49ADA6A508FB36ABDDD7A8835CE644
+264A62708CE1742A26ABD8CC7DCD1FA60C856B96F84EDE061B534431E012AB5D
+93FAC0808CA1629D45817ECEF15B78EE77BA22CFDF620AC795E4FD1965976657
+DC97A3C35B513C8A31723C902D38F27714D3CFE6AC6F107CBD8B2E99FE08AD85
+811F052B6424524B1C049EDD48BA6F8D98B7C71302ADF601C3E5BA4BEDA0C7C8
+C1BF6E4B8079B303D30D0434B7F2E47FDBB7C46906AF947E7B5DE1E6ECE052C2
+9935D2985B98DF860982B3D044D325306A769065576686DA5F2E552C6150F5C9
+25D0AE2009A796D322521BA3329467B6DA1F629CF9AD82F9F9BBB30AFC68CC30
+97440AE12F41C7E4192D740ACEFACDBEEE4EBDC3045AF2E1E188FD6E1DE499C1
+E1B3EE148659DBD3B4EA6215791813BFC674D4CC8C066771F82DFAF4C5328AF0
+6292773E07A15B213126F96A3634CE70FBFA7DF4067D540E0C951F919DE5E0BF
+DC2E1B37EDD3B45AC9F009412A6A237E7695AEF028A8D9EF4905EE593FAB2BAD
+EAFDC2DC8455D087E72E9AB830108A138EC1D55D38A040C1A81A1E1E8B95F381
+9B44E42D55EE9057010BD0F7E32AA87D636CB9130F4793DB86131B9B2E9068FE
+E8CD989A94FC0FCC144CC99B52AFD4976D651C0F855068753303593FEAD53AA1
+2CAD243638618F68068005C923E681D214597570B8C418C5F1B606D33C0D0C54
+3FDA50E8CD52D8ACDBA45C88FA875BAB5E4690F866E154C525BF02DD103A7567
+70A307E5AB1EDB318E5E32B6B40A6995666657136B18F9D45E0BBACAEC4332B8
+606F8473AA0971E2B4654209B2353A94C5E698519567EA54377A533DBE6B0ED8
+FF2D5BC21D0EBD7E1FFA597B59826271C18D582692614A48A433A3ECFDE25400
+C4243D260370C6D23EA8EAEC41B3561AA399C67F1E558A192B13F258945C318C
+8B5ACAFF5793CE0FDCF1AF2A05152489398AC405F24C24C4B377F5D44EA10C71
+2D9BFECBC713A9E8CC834E52A5A9D58E9964EDF7BC4F1C0040DECA723C0F5C4F
+1287CDBA5314110299A1CCDFC00E55759606AF2C52B2C47BFD3FF62D892723B4
+110D26139780B49E35D77D3C5FCDC51A3B3E2C64AC161ADD295004B271A75823
+D79AAC2D931232623409DBC3224E61CB529DEDCFCD86EA583C4097FCA9DBF18E
+19700118D65A186F94C261762E54AC0A6FC47F4877236EBF23B0E497F6138D75
+0E20474E2D11E68F7CCDEFD46C5D62E81E559496AA830960F6DD379BA16BA099
+D13AA5FF5DA079A7ECA28B701CB49297C5F2E75A1F851008A0CB290DD0EF6E27
+5A8E785398374156FCAD3D45E704C6DB247CD56BCF919E836DE2E52C9FC0A8CF
+052BAE14101DAE8C43EB766806E26BD91F48FA455C9269721BE8492FC68D8AB3
+01D638D04856E5D203D28CCD8B702B90F32870D104787F8EB6D61648417840B0
+924C38AFC4B7CAED1F08E34E1A3D46A545E86A4A4542ABD6606672C07684CE1E
+D5F2CC4049DAFA3304817E05C5945F70A251873D93DB4D5912CC4A3BA082A05E
+1BEEE45050212C93EE272E8C33AAC196B201E6345FCEDBF5143940B5D9263C31
+B8DB7ACB464E0C3989A8AB68EB7DFF28AD666AD3BD003C2978DCBF5602107943
+E5060D5CE3E42F27B65F058839099C2CF9B7F045D1927C7168202D39C6DF70D5
+00CBC98EDFF8837D6CED471DFE0E7F84AD5BEEBB25F619D672D9EB812C3B0FAA
+9547AD117E6E27D7979151B2512884799AE8B4503308345680D61CE8FA394EE3
+4679989798DEC5B494EAD4C0ABFA713281DA98522810589A2CE473C8C3E448E2
+57BD26EC6DE17D8A9E1847795597413B1D80675B79D0AF56E8D4031300081FDF
+1406B9A2952EFC0F2D086443FAA4D96EE5AF3AA562F67F9AF495B0F9FB438043
+4F955599A04824F8BE5CBC825EABF544158D99FEDC664150D66CE9C85C08B720
+7B33BEFAC455833F57C43CF481DCEF552AD267BB90D0EB2662BF6CF1945822A4
+4EB709E8DE26B4858A75CEF9689EDF05F91BC2BFDF73CEE6B9090A001D97ECBC
+7CE94ECD059F992B608A19FEFADCE3B5270A8641DE821FDD3EC1FC766F0975BB
+8DC349EB7D3179749B16832C7615DD310F815B71717495308C3902CA46C044AE
+78FDE58FADFB233DE8DD6CC412CA9091C02B44FAB96133F0F617584DC2D5C51D
+CFE828040673A5114DDE42228F73B42E1E7C9296C51BB657773D8F15B0797AFE
+E846B26599E20C73E1C9620FBF224446A7FF87ECFE64DDB0D45875B5CDEF1C8D
+36D20EA6F90E09F2A3EB423611423370EED5DA83D5E845051C65755A24F7E11C
+DEC48C78F1FBAB97F6306FF2982E3B61C3AF46F2CA65BC15EF35803370FB787A
+0831506C9FCAEC8299005C68DD453D2107EACFDBFAD9F861BC46FBB3802901BE
+1C6D99EE609C7D9712D9756749D7E8E1FAB8231A9897CB4D7C95A19B734D1631
+71532C43E1E247CDBD404F33B080A3202E23B6F7549C7E8A8F0B050E3DB2A89E
+1E30428EB2D2476F5F275DDA324CBA55D3772B0C460D711FED6D6ADC43CE821F
+683181028981AE66EC16BE2D7FCC2BA13BFF93F3F1BB1BA32DBCCBEDCD9F793C
+30C078A839C27CDA29CB694C74A70C86008F4F2B2B8BACA49ACBBAD11B0DF198
+184A6F107BD42D6F129A7DDFF949288AA27C916694D62C9AEFA24BF172F43B68
+930F7E369000656155A593BD360E0DDF160C273A4B3F538955B11F25846146E9
+4CE0A3DB78E8BE770A7B83E0043B3BBBD60C0333AC55BFB8E1503D03A37803BD
+841A19848AC9AAAF32AC249E880BBC04CD4396DA8F4CFEB6BE6E9D261A3FE54E
+C3BC8A01257D032E916CB34C9BC20263DF0828B5F94FB9006B09A00AF195AD03
+8665CC1E7A772D9968D35B5721163394D221147232ED6682CF081607D82E933C
+DEDABB994359350A95AFF6153F29CD96E4C3FA1FF186BAC26D6B41E275D2AACC
+68FBD05ADA7BB1C68EF37508607C9A81151D88FB40E78890E76795009CD1410E
+FAB3DEDE1A0F2E63B8835743AB5582F45EA40C86469A140B33BF721B936FD1C8
+56D1D571B04E8CF1D856DED27BF608FD3286E827984FABB52D7579BECD5CEC42
+A0880A44C230C6AA718EA897ACFD482E0B79C46E54F6338EA5C58BCA595D735B
+4C1D3C851A2CF846E86D685E6667B8A975F38DC802269CF7B1B0626E5E435448
+406913DE4D10772741BD203252280BB13624C2C56E861FDD9F1E2F9522FFFE42
+AC2E18083D916B54CBA60179AE3ED01FF1792A17DEEF47731BDDAD86ACE50673
+1D8330252BB4D8D4CA0D617B0064FC1F13317F799C1A9F368A3E0AEA888E2BFF
+07C78C6048718CA2D0D5D1A20686A7C44EE73F6D749A9F0A6B978A4A522D3E18
+C4BCD89CBB1151324182605BFDC24C6C450E79EB69E79A420B2E271CC1F903D2
+8C1BD054304250E41624F1FCFE70F0509EB8C6D0530E1D6BF45604FCA1FB7D44
+FCB548EE92CC85AE335A8DFB27647879D0BA25409E4066B4F708D3B0C1FEF15A
+80892005B4CDF4DCCB2B62AFDB72B1E1B1A172C313D7CBF31BC56C897E8D266C
+AC8D30CD36BDBC6FDB790FF6FE1658FBD3244B447404E98BE65368F48B349003
+3E50B4F6F048042CDA62AAE7C6722BF80D56F1EDB47B87028D85081289617129
+15B21BB051833AEAA4BD415D04208A562D73F149543DECCC768AB03B0EEB3CC9
+59C09134821939FD322DA9A66B4EBFF6C0D10C0A973DEEF572AD5C92A12AB745
+84B1624E7200D285783930F51ECBF19AD8E48E709893EE0F1AB7CDA6CC7C1864
+F16EC1D3FFB6B4FE4DB7C9FB1620C3C0861F900FDE317599B4F050D465A662F2
+DA6E93495CFF5DD8EDA52514F3F8E6AE745AB86CD729721E7A3CCF64B0F6360B
+A4F8158F4B952FA4CD3DAC4F5F81C4C93710BA738F96DD57595D424F45CED71F
+6F35820FDCD31533FBCDFB56F354935CA0899CD8581ED5EEE2F85C135F50B43F
+3725DC1EDE43BDC851AEA1AAE8520CF9DD760A42C5D0B3754C7B5C44CDC502E4
+E74830EC45840E287ED7DA2E98260742740D9B904E975F3F8E80D7AB57085C76
+5EB2AC9DEAF38B2E1BB7D50CA137D582B954FDC797845B3CF623E1F243E9B65C
+87077E67C43FB6258770D604E0DF9FD9710B6FD6AD8985A07820C47F85DEA767
+F55210F70BD45DE7E0F3D335BC978E738F274593DFE14D6489366974AE4B9286
+EEB9A4C1A712D6C2DFEFDFF7921BC6E31631390B8132B6E62D6EBABD4FE38AFD
+DE7E0A7B6F783786976EA8402DED90B067E1D85CDBF13C991B4CA2A626A3C8EC
+21B13B0902AD8389C71F14B810E40394EA7D41CCFD4D13FFAD46BF4EFCE250CF
+B6CD0B203E3CB540390BA8DEEB217755C284C824DC9626F917D119934061656E
+6836B119CC894064B51B9FF73B07C559C366CC952531FE858C3B77706BE21A40
+BF0AF668CC376F042E965BD12B020A06D44815327D9F24C8BFE5D4949EA85FFC
+21FDA7C58126B3F5CFDAE27A926E2E45DE062650B615568736B10F7CD8EC20E5
+19773FD4B559D45A18B152315D45FBFB4B57A969F81F42FCCDC15AC1C6890F75
+A87877B75A14D38E37CEED9B5AC39D4CB8E0A5ED6BB09A94E32BD33AE9B894B2
+9757CB08A99818058EEE75EC2DBDDA97A2425754D9D31AB87A1D64700D28DE3E
+3748BFC11DC5D134090B50864981DD72F2999191AA0111F9A23E62B37C67FB9F
+704C3BA150E4227774487A3397141BFDF8F6DDB22AFF40F61E05BBEA998A2A7A
+553071533382226D9ACD4748325C9A90663913F9BD84C40C83798985BFF131E7
+8B3F8DD7214DABC6F29D83E336C337F936CC5092B8064031C5C67AF2563C19A1
+99E220085C7675F59AB67800B82C287908180C25229B856AC5B8A63BD0F0342E
+E72FEA35B9EE85DF933DD7FF42E7FEA8580ECFF435B8AE058DBDA697D1FDAB45
+50F396FAA4AD315A892691D39ECCE620EFBDAC6FDC6FD387F3F20038680DF50D
+9C1B28E5CCAE7CA4F11797B03A39192197F1F89E080270EA3FA549ACC696102E
+3D1B1E762A061D6C772E72EF6BF67293A80A290575990CD2A04A2277E23A29B6
+B0936111C343C67998A3D25E726444CC87E187C602074699801FC24ECBDBFD1B
+E9DD025C51EB2B93387A27659569A2E0C4DA2A7C3BB16EF63FCE6BC8DE27D058
+A323AC3A394005F31D8900CDECE02D3DADB7C5514A6AB69AA7041D75927C0FA5
+A9D40AF9433D103DE31E080F65D1D3D2AAA482EE9432F3CA84903CC621E1DD58
+72CEC6ECF9C4C4B3F854777B65215D7909A15260D3A39CAE9DCFF36B6B341FE7
+1E4A75C5F8702378CD5926103A2192FED1F469C2794C0B6C0918F2A85F512C69
+4B2388B7F553BBC5606C4CD3A23C34F60C4BA40904CEA9D7A82DED088E2127B7
+5151C37145DFBE0FBAF3EDE7828EB3553DCC7CAC41B4B4FB522E3EF6153B9275
+F71917D930792C63680E93C025775367346E04C4B34FF74022A327AF9349B223
+DEBD0AA515BC86E247AA4D797EC20564D1CF0FFA853C60B0AFF544BBF6E82EF1
+6AEF5CE96D05F66D650B4722569C2E05DD039F91CAAE1473E811005434D8D95D
+C6A2071D47EB515DDCC5D9AC58F36ACCF2BAE3D0907CA43FA58DB14AF6D5BA40
+020E8CFF4AF7C80851FC81EF583ABD9B9ECB4D7E8981EB6D4FF6272C7AF2940D
+53C6B3FCF4953344C70616BBBE917A295B491CBCBA2CC73992BBB1C037ED48D6
+CF3B80F5E08EC3447D297A8214872A48FE10A4FAB74EC700B71F2F6EFED27FBE
+243544882B39F3808092361C9F7050943AA4F6D569B67E3436C004987FEF870D
+1CDD98CB5F2ABF72B6E78719A6A6D95E6C918D5BECAA0C23FC99B526C7C8D0C5
+B9E17494C0995785EFAF555907AF23ECB761F47AE1B27ED80E988640D8854294
+5296708C4E9D46B90231DDBA9A15D5F8F2CD7D0E1DAEBB91CD3A6AB60D16024E
+A61A84032B1259BB68A3E8CDB78B5C67ABA884FC908F0E0D0B46F297402737F4
+B8B40A13C9E2B987BFA3C1AFDEE7B962BBF7118E8063F83CFD19107A5B28E0E5
+FB38E0E26BE4E46A68BF0CB2515435A3C9D3A9FD61ED73B3CCD70BDEA56768FC
+7E90410470B0087F9B123D986006E729CDC571DB1EA3D713AB3CAC52C42472F8
+A7325408C9416DA581B49C709E1E35C3980E9F9D86E292D29C24C169A4035836
+749A9D5475AAB3DEE92D6A0666D176D9D0C2D28183459001348453241F632A9F
+E4F5886355B548B13CA7E9766263E70514F495EFAC23DB6F5970325D079F63F9
+852EFB7B135172F5943B51294BC44CF215D7DE2BDAA35FA62F2358A8307D9C1C
+7ECEFC0B93842A762AD1F8E6488140331A7DCF8F85A1364390E213FCDECDF652
+803860AF5FF323B7D0314EC85BA7CA22D6E83AFF66C961C21793601F3D030BB8
+16EB9A3E7C97041C6BF0D15CEBFDEE1C2B48AFB25F7F588681F9B3EE2D5C010A
+52020C0899CC36A1C032840171BB439D30A9D6B0F739910D8A90E43EA370CC16
+AA8814F65A26CF0F7492D076115E91DAF6A118133AC18779FF3595A42A12BD3E
+B61611A23E8631E780B420EA0944BFE9E4E97F5649BD953E8E2981F3D043889D
+F06A4C62B5B90F544BD3E98BA2639AE0AA2190693F4247A91FF8B227FE3FA527
+F11EAC34057C446210043E19E2BFA0C695F33B2F6BBF4CDBC07917E433B4F5F9
+CE078FF709CB1A57851D117954315C893AB0A2FBAFE2290E8AA09ECE87887717
+549876185C50621598452F23CF40207BF4B4171B13E7413379748716BC624AFA
+BC6C195173052D303AF74F95499180AD2D76360521F090C99C675AD863E46B4E
+E7F7E6F0B09B4DDD286C3F9A742C8B909A8545957D3EC324D04E66AF9F8281E7
+6FDE2A7A9E1710B452FF4537C19778A9BB296F4AB176C617A6F1B1F9076E5648
+9AA802B68AF5A81208EC0F7B829039C5C6773EC3B80479FC482F9050079173FD
+9AC1F6A89862DD56EDA4A054E7146975EF106222B6267415CDA5EA2E8DCBD1E0
+ABE3A94DA67BB6F11C66FC5AA8EB61E55792C18CCC945D16BE530ABFCB14DE75
+8DE8D5154E6AF9763FCC5ADFFA0D25DBA667BB614A05E3BBF945B294D64D1266
+9579A4BFADAD351F343B529943CE554FD40D52A44A7180CF894B0781E63B8E44
+62117D0F6EE4D4700D903A72676F0E876939DD77B217279327D372BD4E69B367
+68E654E9F1A2D11EEE90AA49B462D517F76AF2660BF7282F4C78E1536AC5C130
+0C7A4C6E0D698D372574EAEAD8F979312D648177DD0C724CA7400B8729B0003B
+CA47E02E1CE0B32F3A80AC9399517175C47F26E5FBF6AC5E73D178E7DF67EE79
+5EA60CE56EDBB227694AC21A0E8771B516768CBE2836A00A14D608D9D32A27EE
+E2ACC8CBB9D5DE7BE40B680A7FC804F7B9A39AF6E829D112BBF57DCA2D408240
+9D2B89107BDEBE8F4EC1EE8CC6B1F89E78677B8FF2FD7384EBDE659875462F99
+2D4E62D18C0A8ABD3B87D806FC514B0E5700E83D16CAD6EFD00C79D624FE841C
+7F98DB4ACC86ACE1776DF5439E425CBC1C85D489E4D542F504D384B09209BFE4
+D3A008E069B0FA3A71CF68D097FDE55712C7E6A5BEF6CE8BE02A4E92EF5231E7
+0D8905EF4FE0D5198E32511F945E1172182CF690D7A769F8C4F76754E5654BD2
+A9F9F23B6C230B10E3AF6CDC745538D174A75B97A3CD3697814180BB1373B296
+203E523EE5B64F1EFA979AEB8ADB60CAC313F117EF8CC53FCACB4883E26B0927
+7897790E4AABF9667F9A91AD32AB1C5CD27C26C5BBA5DB8AAA7E7514A239227C
+D798DD6AF110481A99753FB9B3D570366DE14F6C0AB4C31FE068B1876934398C
+EC2298CA0A9EA5BA245907DA786D901579C497C3739BCB6A4DCB2E34E21A53F7
+6F673C1131F114C05FD1D3B37BB435B726AC2389DF866200A75A151725788CF5
+69C1BE79FD6FC36625BF73CE46A4FE5F12E5692B47F7C26376DFDEAF5EA847F9
+367997E05255C7EC67832533922B997028AB8018F404ADDBDA81BB0698AD69A2
+B4C217C392BB250B58BC4FB901F2912EE8EB6703DB24AD7C2CBFAC12F8D081D0
+A700C39130316DCECC18E64F3994E2C6F5E0E1ECF2EA4B18FCB424D9B8DDE8E7
+ACE87FA17D11158E96FD6EAD04B12B8917F420BB29F4471326F54C896BF1A475
+3EAD86C7968818F95E632A852601C07CE9AA698FBA3043D86168FA27FF43DECC
+C71581DE33FAEF3CEACC93F5D626FE05894F8FC2B8719A92261A215929127FBA
+BD9157BCD9D4C5D62D08E7E690F1DEBBED0A839475B1427A7C91E7F42C3CF6E7
+80E8B55B90566E21214A4AB708383F0A3E0406058E26A1C34786B860EC597A56
+2E33F58DE6C6850B71E88A2BAAAA6CCE519055463B468E49B2FB70CD32D84B8A
+8EA3077E49E848149B2A46AFF247D80A42CEB44278A9341B4ADA55162F67933A
+3BE72A237DEE6B9CB4826D4584623FC93882C543D173B22CA22E6D8D5CCB02D1
+25EDCD56559CDCB126185BF4128C71F228D7CDD7C617EFF12DF100F64925BADF
+39E7DD693362ABDD7E17C3B21A74B31D05C9F4F067BCC1D0AECC6C5DF33D4C77
+04DF0394656DF7F564BD7849A6EC8A2A0007E6D32FDA98F7903CD8DB16D85DBA
+47416DCB4806AF61E901490C8DF6A42D050C5C07502E7AEC9C15DB70BC015E02
+9696950D94CD0A7E8D46557DF9226B1369975F6276182B92056065B2548F9717
+05D488542B6ED9CBE2898A37C41F3093C8441502585D607CF07E8D1473C48D29
+68D4217BF4B16F8BB279A9E7F4F4CA461A9E9FA912C1BA9355A4261438E9CDD9
+20B0F7E2C324A89BBF23E8973783C2367AB9C59693E1C90D3466130C0154AF7C
+008E052A63DD8EE001FDEC48EFEAF1AA7A7FAE4B10D79C74E0586CB3E9809DA8
+E1946A3E2EBF15DCBC950914B860ABE6DCD273FF45D57246F81DEE176B7DDC9D
+C5359E1291B5671AE9FCDB06DDC08FF46607E784084547AA7848AC30A32B08B1
+3FBFCF2829821733FB2CDC11AFEA7DFD97B8D278DA3A8258C69532DD625F204C
+81ED8DED59753060C83C4FD0B9B4D09E1C6483637F7C8EED13DC01C2F477DE4F
+5AB6D45C17BA5B2C6E8219B46960E39695077D2770AE34FC50510067B89736E9
+D172161F0F1E2A7FA79A400F54AE4F20E673A3D91D892C7F88BE4237F1A3CD55
+BE5D1F91FFBA4A88397329E4B62F9170AA553B0E7BF2ADA42C4AAA6920F8AC9B
+0EF3425BA25C2EAB8DE2940857712C68A12B5D56B9EBCFB4F19F63075CFA8E03
+4255EC777F9FE32E47905F950BA371B539D7F9F55C21A04F1AC6D9280E8C5780
+014794256AD7B05A69B84AE84337B5C678E43BEE8445C0F79E621DB4AEBA9188
+2410D0E6720380755B4AC748301CEE5A235FD0C1E2D675C147F3C62037708EC8
+0DDB1C349FC6ED24879F0202ACD4C881DFF4BA4116060E65F17F07BCF2CEE0DB
+9E8FB76D0F8BBDBEA799071F08AA753BB3129FDDE4D12B32F5D566D8C9D6A35B
+4A69C077A6BD909F1BAAC2A2C62A6AC64E722D1985CE4E8771F53170A20D8543
+29D11CB175BBD9B632C89E4A12663C0941091A1532DBD59A65CF6D44AA4B08E9
+7B5BD346182AD70A34A2527E352FAB0C109AD72EF443A5AC713C005564373733
+DAE20E3198295D8DC532ECB3F98551F84AB2BAB805F2EC2669B01F1F5F9538CF
+F6D20E05081178581990783705E24E9C25E2E82D45541E5C16A30A72E2E2A168
+129A688F199DBB9575345ABDA993DBCE8CF4DF1128B0E74B6C01666CFF1A17E3
+DFF06C8D3FB42097BEFB1B33A25F4BCC9024C29B4650B43D1CC0B79665D05D1C
+751F94FA99175C257EA991E6B704B75714FC7FC9D5A34A1A3019AC5D9EA8AD7F
+6A75CE3ED13ACE632532BCC589F8E94B8E08805C56E3D91A6C7CFA23CDDC4767
+BD735DC2A7FEE4AF8FB251174C1015127CB8F7C8BBA872BE416FEA0D359CBE84
+D915D1E8396E1267018CFFE5447CDDEF6726F47E499613589B40A72EEAAE768C
+9FBA53FE832BE227F605E4D9E67FDE078120869E5F71E3F05A31CD37A8E48458
+6BF4BF69736DE755C90D6B88D5FEE096ACF50F5FE5523138DBBC095DB9ADF46D
+BE0384A02C4ACE11DDFC5FEECD1E0C4F2554BD6F1F235C8F980D87059DEFB98E
+411320060518A16DF3DA0DD8313C305E5355FA2131E16FF6A19EBE17619F5773
+8C626D6BD2B7A95CF9FC6996DC514FF0915A585AD3C6746B694CDD7CFAEAD58B
+2F842D764F3D0B6AA582D3CB96632C6A1AB14BF49BB4F3CF59612FC40CF63A5E
+E1CC3E2FDB2122FB8822F3A85A4AC58683CDDEB72C34E6E346DDC00FBEB75FA1
+3E88EC10B348E8D8DF2053EF2921E8BE24A1CC861268AC66CC4647FED7EF6ADC
+287821A9B3AD7191E9733FD34629DE60C47417167ADB5C3B2ED7BAFD2278E698
+6240EE28358460975D3FCEED4C2065CD0FF3AAD547E1C63D37EF2A94BABF9B0C
+9525F03D5385CABC6AB58077F2AF1F9FBB419BE35A8980178C27E4A19F30AF35
+A48B18A129B900CE280C100EE5A40C4E6E393542472014F905C266CBFC75ABC4
+FDAC0228A9E73BF3B268D9736A3F8560E78B48A0D7DD43050A0D7757A4BC7C92
+6C066B399F71CFA5BF090EA459CDBBB674E03757179C43CC5B0FDC950D6C801A
+F3D07AD30F08A6D299D1E784152103B54ED264156A97D64AE4FBDAF8D5EE20DE
+1B80A4E6AFB427A0C18DA8A43ADBDE1BCE9DD46A75C1A1D15995370F792BF843
+02D4672D4493773F5907A814ACB139498953B52390D84EB4474934713976B9F3
+BF26CF310A682FCB955682E4699ED265B520D5D7800F9311C6AAAFCCE8E92435
+E7681D56C537A1C1BBB1C2CFB94AC92D816983C97614E26B062646E2C8808D07
+5E18B87ECCE3A0213EDC73919F7C9D80536F98DE0B9995D8EA4A2633D2E05417
+AF3DB26F9268647AA646C4AD12C3146745A411ADB2502D1ED58E46B7FEEC303D
+87065F9B881907F127E02DCD321CCC580C89FA6B3095F607090B2786E5848D7D
+273B36207D75A008365C5F1DC4F748E78A6F791ED81631D7EE1E6D79049B8F2F
+B7F38FA45B8809B4BC05CE91FA3C2F6F6AC323B3D304E8EFEC54E20045B6AC57
+D08055CB193CAAA5C53454E279BE8F7F38F949EEBF62795AE7B5DD0FCAD1C3D6
+4AE4FBC6186C750F3F2DEA0BF8B65491EACE7DE5635470EF6F42C3395D7BA0F4
+A0DA6BB1A99FEDBD90A551FB217644CEF9973BB90A7FFF3318499582A93468F2
+9E766C2906BC6C4BD7E300E48C997C474C03E2A34D9B969ADA9AEF04843367D9
+AC4A08FD88BB672F2DFAA2CD0B871DF62A43A61AEF77AD88ACFD112850940CB1
+D74CD733FC4DEA77C454A52ABF2BDFEB9EBE3FEEED53CE6D4B1968F0B2BE90C1
+12F96E7AE2CF62F7C2601B589A92D8B024E00D4E8B1F636884803554E9B82005
+8329EDA334D1DF5EC7384418609A8D89909245737689B1D108186F4C53237559
+EF42502050EFD6E7F822F835517FF93411F08B5FDF163CA1A19945FE51C31F9C
+9B1EF8AC79EB037F1E704243CA1F33FA130F8DCC3F56219CF6987AD73627FFF6
+1CBE6C8911831A43827D5505C1289A62C7AF94DC668300057993FCC20F752A75
+5E79244AAC3D790CCBA8222CAB05A953BC9BDDCCC59E1AB9F2CFD3480B836B79
+5C74D384C53723CEDC5E42212CE487EEE190F6B067C322610A6C17E0D84A7DD4
+C3171856FFA19470F84E207DC9BEC7B44C3EF2BB5B043929A5E900750D117A20
+EC2297E4E6AECA011F3D08B06593518515B495DF8D64D3312AFB918985A3C4AF
+173ABE8C26318ADDCE1C262B03000CAC5B5B4505B26B26A028496703493D3AC7
+E24AEB4F741A6E4A68EEFA0D156E58CEF880E0C41CF6291D0AD20D299026B9B9
+D09BC425FD7D7EE59595CE14CDBB36CB4763AD7AA8841DF5C17FF3A4099BEE95
+CDF6DCB8F9ED7E118BE4F2D2F5B4D67A2781F1E2C1DE8CA03022C964B1337830
+1E20572FEA296D9FBA4FA416056378BAA8A86C165A39EB148B255DE0E7EB6351
+EB53F4AEDD8D411703A3F01159BD148796A1FF52666D962126FA863C9811B3B5
+ED20ADAF32EA3BB018EDE34276FF46A7153235B2E9D778402952F2C73CDB0290
+3C24E2BD7C74A77BC339F7B421983E6146F64718605DAAEA2914F3C4AFF5E078
+63B7DE54810BEE9F140B9F4B0B84521AF90C462914CECAFC07EC0617A189158F
+B4EFE2DD47221780D87302E00B139F47239EB174102E7304F6B83B71DB890422
+CFFB05C39ECC0EA883849178EC773C3F0C6413FDFD1E1DEACCAA89FD71FDDA42
+B206A827F434160AF34813CB02BFB13B08ADFD7A0522ECAE1C57F0B35292DD55
+213A2E2D4E7BA5971F46C438332D85976B7D2F15425CF626FADD7F0193C88B8E
+365C3724440FE3A2A3C8CCE159F7508D23AEFC92EE92B0F824BD9A5C44FC96D0
+8126FA6E5F23A6207D079E24E4426D0BE4798B9DA83763734EC13292B5FD113D
+D5F83379F86FEB25C1ACB394747D34F0913B7BD34FCFF65AEA28FD21BEDAE94F
+CA631856987B7413A7F7C5CF8DBE3C900B7ED998A3141702EC5B86BC12FBB132
+24608C6FCCC626F19871A87B5AB45283BBCA5FF6F1A19277D7DEB93EC5EC9977
+4F23995267034A21F92766D7CD17F573E1017AAA96A61DD36C211DD20AF3D34A
+340900F1188A9547FB19761E2AD2E0FD506F17F389CF9EE7D8BFC1106195199F
+59FE361A39CCB0EE0D9E3C5782AAB7B6E5473B50E81EAC6A46047F110B155079
+9EF8C17A6BC2575A28D2447E3F08742F4BA6205B5C198BD5B9FF54FA07000468
+19A6A54448108F6F80CE1A07F2A6890AAFAD3CC15E8505EA2E2B3A3B35663B5B
+FB6F6FB1492DB5DFD395F8703159A8D5EC1E73F859722755453931FFE63B8D1C
+7377F5B64B3BA3B854C245569A731BB6C13A7AC4C6A2EF2374CFFAA99CDD3984
+7BC0A101F49D0837B84BBCC374B5FEADBC644FD8A5E66450AC95E28BC68EBBCF
+0E594CCB0BE38C6B50D4958B0333E568BEE976DB2E19A8E62EDFB683B7331EED
+3D67E0C0015948B07F6529D2620FA14FAA23A898A32360B5BA9E21BC24DF15E8
+669014A32F848EC36E63348B0FCE5C5035DB8C2234E3164DEA3243633046903F
+94EB81AABBAE58A1D2A6EBFCD301BD54F49A47670CEA8E13013DCD9026201231
+CE0687971DEBA09310443ADBDA9E637C2FEA83D73048BFADA322E72F3C577C16
+0C751FBB90641C66042E4487DE1954A2448ABBEB51D1C11B312A3D5A7E1C3D71
+521CA8F0996C2143A0685CFE49C8BCDDC0E5403823122076A1A9EE3CFFDFCA31
+BF6A4BC12E03022A8D423A71FE46E17FC03B333A7F09E879F533D9BF149D1CD8
+B7A8265D47F2D63F6C961C003250AE33321BDF8488CBA52E2AE5924CB1A96482
+C5BADBD45C8E2F6794E265FDC9E5D4BECA1748BBAB6A6E1D37A5902238B5676E
+32409C3053B8C8F6E6FE3C4CB1F3DBFE8A920AB0D4D5903D877ACCD0B367E912
+C9C00CBA8EF9A3D9F7E042CFC3ADDDF9508895A9B4C61D6BF0B76507013EE065
+82241B0AA5B0EF9E30A2120E154FD9E844FA1ABCFA468D7B3D58A4C97E433B3E
+81CBB8C498B11D75A2E818EBC52EFAF545654E2B60207B986EA905F4E16C148B
+CBED6CAE4C7DAF3EA41B1FCD32BEE448325DC5DFED2585676CEE3B057004EE9A
+1028F7D0488443BFF30384C88FF25886DDC80A155DBFE1DD0A9161F5E9AD8DDB
+9C81A53981E6338E822372062488ADE96CF40007E4AFC7F6602BDEFF3B5DB602
+50D1418A90EF6AC7A630EFF91835EF925CAF67C2DA09A1929301938C5DDA0EB5
+4DF4FA31BDB196091A0B171113FB3E293255F76A78195643CF930776D2CFD22A
+8E991888FC446ADBD613AC37999EB3E14B860BD70CF6B77538A8512F1EA8876C
+F68BA5C67BDE3249C2C46B91D1C86E153D774B9BDE31FE310F24C69857D7ECFF
+AAB9BC4A73FD94851CE77417ED982BE376A21AEF2C167D5858534EDA58F06509
+1C21F5D13F23C76B599873E237A9D0F13F4E93342F601331C93FD12EBB6A3A96
+2B6EC380695D00C55DA40F6952F557450E914519BF6441279EF39D7EDBA95112
+F28213BA6CA883E68B59C546484F76BE53CB0B6732DD19DE6065CABC0F9F9627
+75DD538AFDEBCD2363D39D89D0A3778F7FA728CF375CE8029EDFD0A068FB5CFC
+A13E5F2732700EC4060B28B7D7C1252A7B9C421AA6CFD0970C4C29596EEAFE13
+E8A8DCB6749EC08D9B25CA464B7A7F94E518B269AF5E5E532A215DA9640B6E04
+0DD104E93D58236D0A2C481EC119FF16FA1E0F8F3349EB6B0D347AB5A8723D45
+348F41971756CCD0BF3FE5F03EEBBF78B974D1D6CA364C5CE160C8FE154B3176
+3ADA41D6A7D2D1F0003489A7DC354ED43CEE9F121BFF9A85F65225CA38C7DE79
+EB9DBFE2471AFF0F8407E5B8C64565BC219C22AB0F1480908E1B5550EC510FFB
+62433B1B36B30861E183E5C2EA573B54F35F2512CBBA49B7BE5BA2A7F290ACCE
+FC7DF2AA1E5882A8831F9F105776E9DB60DC0DEBBD1D1E8403704E246EAD6286
+454822A957EAECBF31AC200EBAC45E0D340FD8587DB953D3F9086F082487D2DE
+771D52AE8CA7416FEC9E91AA0DA73F969498A9A1610DF691AD908917EA3BDAF3
+78D5A705B156A95002AF6FA3BF3360B5DFC67F1BEB4EFE9933562BD01DE2529B
+E044F351F50D51EA139828EDDAB0CF0194BB070ED70B68008258150F5CCB185D
+92DA71065C20C2807B3CE00CC0FB725440B7BF52D0F9F6FD58AB3B0FD89CEDF0
+1414D83D25F9D2C91A5FB0EAB5DCF3C51902588EACB5ABF77736EF39DBFE403C
+D0B13CFDC488D079A86079978DACD3E4E5CF112623DF2AB161E9A8387A523081
+51A836C2240D7FF33E113BB6F72843B7EDADBEB595D3C0EF5C55C5246139EB79
+28E4FEB7C216B4AC7C8189CFAEFCFA919284893684890F17910242704CABB4CC
+D805F4C67DED52E59830BD569B19890B527BD916847C951BEE9652E602AB3DC2
+69B1E2972ED868219023805692F80D83DCD99B5B454FF9C52C46AED905140F10
+AB71305333855E1E8DED599F4824BCD118E789BEE6C260C99CEF1EB36A10B13D
+7AEF20B6FC8EE0436D3C4344AE5DDC7018237B440867AC459C5A31F9171337AC
+5E8807FD64462C64C63A434B82D3C0BD1EBEA855399DC50E7CCFD487097A1561
+62F5F651E527FB70C0E47FE6680E52015FE2399E25F00FD38AEA37B13EB42435
+C4A6084C618A12651AB94A09793B7B5633C350CA69EA9B1CBEB45FD240FA6D24
+58A6AAB28D6F6C97AB6854A0B04230DEB18303C2D77B3B7492D28E632AB60EA4
+DAE6441B7DD6804C47314951870CC30E662E9FD669CF37E4554474A6CC593801
+E8085F0AF185FE7D8CAB69969DA62A37171FB6EA39487D2BD5F689E6C67D1EC9
+4532C8DDACF164CFC7AF6850F19E199FC0EA6AF11078F873719A5A10DF16CD1B
+F6968D78666E0A12B0E8AEEBFC7E523C37595A47279F1AACD6D7C832DF6CE944
+2896FF8F09714D92031E48652BED4AAFA55A84F5F06CF37095B37C6EE05CCCA2
+08F3D27C885B89F62B68768BE01AEC18326634C4EAA7BBABC3C9C4DB5CAC46D8
+85A79A180EAC7B74B3DE2F1FAC1C8BCE424886FB22F1F45DABAF374C7EFB8573
+A9E9BBC6F6ED8A720E174CB8FDC75B81663F4B85E472568E5D5B19FC25976FEA
+8A26B417EA52D4A79169FD8B9E0DF0AC600642FB694621007248589923F2DCA2
+2265ECF240D063D6A682B7400AEC39B965CF6522EC807897097DEA226DCA64D7
+36C85D0DDB18E290CCE3F7E1301D04E91DD624D2F864CDDCC77CB34ECCF4AB87
+D641AB6901FCA513685515B023100D735733CDB77046B69C08AC0A0F65B65634
+437E9689D09878191F6BD79C0487EA25CB34724EF394FB1053BA4E6201162CF0
+AEAD889FC81C60601F9B53F161DB6C9A8BA9ACAA7BC29E489122667C9A239466
+59CF8981E1CC278C158D7AC2B25B4CAB265EC46477E7E3E69A98B3EAF47E48A8
+DD27803797671AC9F0290BC23AC56649B34EE46C97533DE11E459115149757F7
+C8050300EEB391D6367C048B5B48078265B5F70C57A9B8EDA8D242FD220EB33D
+73FCBEB3E29E36C37D59A536945B1F47FF6B9EFA81F230A29403A2932E1D3CBE
+DF6EDDCCB02F4C5243B3C43A079F32329BF852C894F7FC9B4786A16CA9583D4D
+5ACC28C6441029FEA945FCC358999F6D7CA5418356A4129B98AF5B2066D141F8
+07F7036B51FF49CBF6878E89DF3B9F226A9C019DECE2FC8B7CD2F7491077AA59
+8A30A25BA74134B01F43F282B121498438AFD69D7618C77F6CED9F0A3CE2ED9A
+64FAB7C69498548C51B96FD7F3DF274E399577491300D4AF7956C851A8E058A1
+F49AC57A5869A46BD5B51523361AD82CD3252323899058CCA42EC1DEDEDCB53E
+24E289D0095E37B4067FD051414E4B06215350F9FEAE5FCE1479E77BFA287857
+9A9AF5F7BD93FC5A96908208949EAD6482366F796A88E9AC15B6F24558C58F14
+565C9CA8EC72373BBF2C54C97C8FFF8442ABC8E25DDB4FFB20EB229A4031C14F
+FE32FF67BE4A28EE0BC60A6118EC3A8D0AFAF472323B0065C670CE41FBE92F54
+CFECE8751123AD3D51198E5EF050D8C751345E5AA0E578F4703340A3EC431557
+51FE351A355FAA778F3EAF00223A0BB03A7DAC11F58EC64F89B2A1C249A9F720
+7C373942CE60666CB9A988E8971E31CC706A9516694F1F968FD0D902BD69B6FD
+5E04755A10C8DC057E60C71DCF9D6666FFBA80ECA59CE185AE97F8CD64CC7949
+76FF8D9C9A0FD74835A67F2A34A1229A7D9FB0B9252089BE32C320D28F22C93A
+358073FF58864EB4E9BA5C83BDB879C67DC64F591F1480445AF304F6CF657265
+06E758177CE96259B3B2AC1429D549E249A8FC90444E6CE1E96D7D57A5272278
+076C2055BD26144686880FE76D0161DA226BE79D781DE33EFF4F9955C928BD6C
+55F16E14A5A2B8306164D863C2537CFC05A7F1B9E9221321924D33E29C95321E
+D5603A85A3F3F890204BF7745202DD217CEE21BF45514B8BD3D5018DB01FAB56
+E5B85AA57D26C115F349D826D21785FB2B14B16C3A1C3D764300C6AEBCBE66DE
+4D8AAC6484D20857694BD65065BF4BFFFE35D86D6C4AE1A29E927861D180A339
+7476FB6DF1817BC6A077CA5BFB568F6CB759FAD1DDD86F07CF9F6D6B8B320E01
+D9DBD04D0315ADA0A2F8010DA572EE6AB906E55CE716AF7969A3F64097210C94
+7623AD3E0748DC9614F27C4E5F614F13770A7C5B49464AB0E6527CC6FBCE4794
+BA32DC1099FB73AFF3EF8DDC33132DAAA7546BC6359DE8A49254AE44963830EF
+7A69566BCA08FD8DD4C0982A38625EE58E39BA2762CCF85A27B037D34BE5689B
+880D9446476613BD98CD3DE649117FEABF6156BDBD39AD05F360488C3A80BA3F
+C764F11DA922383787A8E93F945C8E9D1FD4CA16AD0958B21EB36B84B524A9BD
+C8434B908D4CFAB46411E997E75D9F48E140C50ED2B56723BC43069B42554850
+2A73B211D61800ED608891BFF059E8C49C52BA719CBEA6681A9BF720E86FAE4E
+04D5BA274046D9B103FF247068EF9B3F51C22F518AC1BE20B9A00CD21F341BC6
+FC8C1FB5072C69466CFD1F1085A92E517883C037F3A73658CA74686F07BF742B
+98C121BF9888160E0DFEC324C208409D876B887E4447CFC4416C9A4358D7B1CB
+769BE77537BC8E2771F2EA19EE1440468925D41C01ADBF2484D8B5321EE18DD2
+A0B1F570E0BD0F8B0931E1C6DA0E71F1E995487544B22AE91B8C2B9AF65224C4
+BD3E3BB227FA37121E31077601FC205EF5E5B69458333784B42D07CD58AA73DE
+8FDCF30351D58B586C9A6116F0CED2298B7E6E088247EBADF24DD85DC2680BAD
+D217DAB604987181047F426ED848CDF475A9D19D0F00AB7DCE4E3C73C8B666C5
+37C09106A440E2421E94D699BA881B53D98395F47808FAB1D594561D46E82175
+0FAFBAB8F8197119F14D789B7E798DE37D62D2043EFB8DB3F819B62238D62E8E
+ECFCAA92C967CB2FB089A8AAE36AA54C43C8F9AA5A7E8D88B178BB878F4A7073
+1D6BF3309D05856F4AC65191EADBCDB22982431C86745C3E01B0F563B2405AEE
+1E56370F1835559BA096C154626D36C090D3F32EC2EEC0B35FF492A08E61DB6E
+C234642691A4B214E27FED0D420254C5502AB9797B273B8C6DC49DD29CF1C65C
+CA61944460CC2ED03655E713B63DF538209FA69DAE84B4A3BD89F7834BE5AC7B
+F3C6CD20E8762AC2E365548F396D32FDF7349DBCE34D93E68C626EEA8DEA1EA9
+A369A6435B000C4568BEE6FB00BFB2553D7AA6923E3A28B131A135920A43F5E3
+D692FE12C30A2FABFD2047DEBDB4D9037D87B7FCAF0DE6EA92596235FF5B16F5
+80D4B99B2F98B51A350D8609C9A65D0E6BB6CAA01AD47912D72A869122A20E76
+8FFC5353BFB61600DB1851169A8B0CA7461240A1EC10351AE38DD223262F5F1D
+C00DED1F9AD9F805F8C13E34E878E64D2951DC05C2F95AFD57F8C1F0316FDF5F
+61809B7AAAF7CECADFAF70C607B77005EEB7073BA88B7D6FB714C10C313EE3BF
+82D1BD536D7271F012ADE21C41D2D4BD9301305BF3FC46323C0F9F58C3229897
+F691DD00E9C538DEB7532019339406CEB61DCA9509DA08B4E5ECB4966369BA10
+739E73F3A6C527D685900E6A592D25D01EE3803EF8A741232C8B48C2798474FF
+03CB68F61FE1065A45C00E86E339580EEF6A90545B04EFAC45E57F0B5E9BABCB
+E053AA4FA0C593C1704C58858CE462891FDCEA47411714BD9F42CC66714A1947
+5637755E85F7CEB3F85720CDCFC6594FAACE2E49864514B00860123130D91672
+549C4B4A46F3488F41822C30C927430207BCD5BDEDD48366A1336196EE37CB90
+EE3193289796DC165A51E6C01FA7F87E6028A8CA46E90A47154BD95412C803A6
+97F35D80F6FF9FF64053FC3F67E182A3AE7E72F12FE7D85778051CC8BC847FCA
+CE8477994CB78628DE7F366A6337AC42372E54F5809693F631910800B854C832
+090D71B89E09D49256B84F5B0A2BC26AEE76CDFCD9D58F4D739B73530AC7FACD
+B66DDD8F3E601336999AE1D93AB261E1A101DBE76C7C9C988D4FF999BB480853
+9D366BC1F0CDBAB25214BC5D38D3383C85345662A65E98851321D776D34BB6C0
+F7E3367D7329714A5B8524213DB65B36229AA4794ED1B8B9B735B59CFD4136FA
+ED923B234EFC0F1B10E99B4778F1616764E3FF5EA5ED64D7488DBCDBD8D0327D
+79E703E5FBB73192658B48A6E3A50D43ED6F9CB14A0E1767C1624258378BAF01
+B4374C36BCCB1EAFBA373538844F5D1F36E25046722DFEA0398FCBB80B1509AD
+F76C2C452C2A3668231F46B8A953C722FFA795A9B25F34FA0484CB72DF2A9E3E
+AEF724E2A120B9C9D3BDB7BA2F1688C85BC8B4F3AF3137C3B5AD07BDE5E6DBEE
+AB93BA821562CEC2F498A406932E1571A1AC323C894256D19B1256FA855DB4E3
+E2B7B1F286B3A376ACB8EE51BC3036838D9C5C6D275E92D92FB3A04EE15DCEA7
+83E772D8F2EABFE039652049758504CF3BB46846C071E1C834578ADF50ED6BEA
+4BE184F0DC7D792825F61FB26B06E8133A0FE6A5A50D804FE19E3C58CF1FEF52
+3A44C7DDAC8C9FDE076125A5E69C61D7ECE569901764FB72C9FFAA7AC49358ED
+B49A2F27361196F608636480F5F59E7C501D77BBFF424DC90FFB76A98B10676D
+5569395477FACA2071053F0C8E233F6D63B5690F30ABEABCFAA4BB42701332CE
+B2E3AA23501DD5164738E9C7649E1B3FEC004775BA90902219C5418411CF3E6A
+964C79F23EFF5867E97CD07ECE28E017105A493D1DE4A4352FC0E82966F1323A
+06719F6C7982E802385193DC4644C80E0F849A9A9435236C9FD97E7E444A8B86
+531F89DAE02563F58C45B8360F38101B5F27536C91D04277C39CCEE90E7D3889
+80AD6E6377672F8C3D9157BC6883CB6CA46F48E2A2C9332647B8C6BAAA0C64B7
+89D2BD9E096B0AADAE3067BD9789A7340C46B398F4CA1944AF01A383875F6365
+63D143B3944E283A23D54AB91459EF2334FADC4D4B967A8B415841DBA74E7437
+0A7E38218C574189FF14954F1CD8B2CB642F017AE7F226A9B5D6B1887864BE11
+B36AA442F8493AB43CCF30CCF818C93FFB2148EC95F4E53FD2B203C9DE6C1335
+08D0CA053B70CD72CDEAA8C808B71B14BEE9B0646CE22C37B1866715238B2E77
+0ADC53682451FDF6D89ECF1C0626E41AAC7E279AE8335140BDA6FB0F617A8E33
+9D480F774DFB91528FAC553BB0948B94DCDC3EC4082EF3549E669A7A49C83FED
+98C6C7DD43634C8321CA5A3BAD048442CC9FAF839D7647B744E11FC9DC7ED2B7
+1E2BB9E82308703FF7C7C8C123D8CDA3631FEA47EEA9045D6DE5BDFE87E92B58
+E5404906E06B417F088F9F9F5BBC78FF369CA8D78F3AF16C21C8FC2F38E559F9
+11FA7F88FCA559E319D63A6EF43CAB1C7E2C50736627674ED172BDC507D7770E
+706DA40D79895E339D3DE90C2B95AD62E9882D9C306D58F80666A419EDB2A0D6
+0841DC59C6D652343F31BD5FC75CCA2E69C9B8495C9518AB83E95ABCCF6C5475
+94CC30358A8533ABF1D9A550076A6652C0ED47B6B77FCE29B8CBF2A7A9329089
+9F310FFF1F64AD75CD3ECDFE4507AC92C3448EABBF9ED97FE3D9E10B1EF3A0A7
+D692D0698047F685E6401FD72330B7B5736D285A923360C4B6B271B74544F855
+158BC5FA3F971DA2492E6A75F7A2F0C3871FBE4D4B4B326131FA1FFD6360F34B
+9853376D4E9AE399DECDDC2BD6D790B59A0090BB748EE0EC0D459F203604741A
+3FF6D964B3BF1B72881924F6FCA5C778CE8CC8513B99DBCEA1A8BA6E46DAD45E
+9A6EB90AA1B02FE6D857CC50699424F559E976FCC174BD5459884F8A723FBFA9
+9C7DBCE6D0D6E426742F6AFDD4BC603254FC4A4A53E54352A79E74EB198DA28E
+72ACAC529BA702956D1ECC0DDA91F64C822F3B1D564BD0EE11D26642E12DDD66
+9B2FE63051C59415F42D597690C369CB8CB64A8E3EB300C5DAF80E6F9DECBD78
+07AAEA84633498558B623AF42FAEACCD8D4FB005180CC5F55CC4DAC3955E222E
+AA4CD5BAA529080F195AF80FDFFA970CB01B9AA321274A8DA701C9A381B0F21A
+977E59520496E965447F88873026BBDAC1BE01EB7060674A656918AE89D6875A
+83A4A71A8E583F09CB7C7146AC9B1CB5866DDFBA9F6E428A2D315F73F9C4049C
+32B630F243AA9F62FAF057BA3D8C042E93414867D6DD3DFBBE9FCC4AFF865449
+B3A7AE8B3665B519CDB7E2372BA6DBC0EA2DE31B04C2A16353A29A760D409CC9
+F5DD03E2C11D29E0D545053A6AB7EB57D556E25401306FAF915968EDDB542D62
+E2F2D772CB09B4723DC936C0E08189539972622D8A2007A3DE1972083A902D7F
+E50C882272691FA11D0013D6CF4DD34C6D2062C2F7E62FE3467E665D77A40757
+B16C6136E7240CF39704F49E8DDED8A5D60011C24177467763373E93730D04E2
+235768F2FAA0615532EAE537755434F130B1F83CAD5FDF4092FD20A324B3FB30
+80C9F16C617E2F13F315ABC8B2094F8C768277D629E10A6D0A9ECCFA0821ADB3
+D76C8206BD399FB5AC93AF557E2E982777B6C1FB0C4D74993E6084C1D4F50F1D
+F0F50BF8B5658FFD4AE0C6C1275C06100D2DEC016F809CD8D9FD3FE7A7EF988F
+8F0427880335F024598EFB33405D55C44DCB1DD147C398D0335E22AF9A195D53
+4AF6189CAA57CBDC5F08272D7CF1B5BF92BF3AF8036EF848E437B50688F49D49
+46F11D87415FD9ECDE418F452EE6FE7A3DEED95A0996BA0862DE216DA08858B7
+524A78820B2A5BAB4ADBC1BE71D69B02B149DB5CCE6C859A38A810C901CB845A
+F9873F64E986CBFE0B2D2146DAF2366757C8FA62F7DF8959CCFC78EB605EB6CE
+4E5B4BCA9C64258570EA229276FB5D417CF1B1B315148693C5EB6996CFD1508E
+67DC8BE993EF72542255F7E323CC182EC88B844AADBADD4888A8C6DFC1C39843
+0C19767F9883749D6EC9D065C88DBAC9D87AE9BDE61B8950A51FEE9E531CA3EE
+CB14C95B7301CC5A7A1B22FAA9E1E956EFFC9BDC1DA96A8910E733E10CF2EB61
+B7E324653C797D1DA73C2C081D70A14310D0588AA6915B0F05FA2CDEA0FAAC6A
+FDDE41FBB23B5CA3D0CBA1CCA54C6C685F12C1DB1B4E8943AD873691186C7A13
+C29C42C86F1E46E1307CE630DBE4332188CAEBFBD604252EEC001BD89FD79563
+D79B17FC27A5506496576A62D3EC8DA2EF2BC0CDCAEF707B3A18978DC99BA0CB
+3D6E611BC0E27CF54D8478853EAA6F80B3A698D179E8660CFBBA117EC0694457
+44D6DECED3C1DC219D63D1EAA09BF546A16E28EC76B7EEC8B01C4EA1DD332503
+8FB779A7243A90B4A98201B51D27E02083FA278BEDB9FBFAFFF82C4772F2BD17
+53AC2A75D9101249F2B0C52F0C565E6D084C1C6C50C084EFEEB5E3AABD25FCC1
+339773BEBCD4671779FEC8A1DDEAA73D2FFA456076F4D3EDCF0267A48E72D2FC
+F658FEA7563E4B10908358E5FAE253C5A1A1F19631F1821C3C80BD048CE166EE
+F77ACBBBE8F2DD4FB7AB2692E8C25BF18EECD4F0FECF677860CE50B10F3E67C0
+39F23CD146E0ACB5B6D2866594E6AD5A482D864B1A94E0CE45D4322AF6F3EDD4
+015504E7AEE530A5283FD5A934524AAC4AE9A2FA647CB578FA7E85016F97C906
+77436277D984277A329961807060D928D2065449D14FB75B6EE088C7496A0718
+0796B05E1C228EE7E1C7C50106CD49AAB88FF7C5B94658E3D2D8713C061B5105
+44DA4C04D051ADB47161510B9BCB4D18542A0EC5EB66611BC9DB1B4EA90995DE
+19F86A76565445D112DB35479C7E70EFF4C6BB3E45307CE48BE52A9BFB818387
+9A0D04EFBDBF9EE973CB2808D9E75694E9C77BCB72EE07943096FEC011FE7435
+BA43B5AFD8D0811342DF88D3C50B9D001CAA23DB7F88894D58AB56B74E9D6E45
+9220790C088D3C2FB8304C4032FDD3129C0B52283AC284F36DE8F89E9E4505E8
+0AF4B25B6342B8DDCA18497D1C741BDD00ABCA6161682D75CB20B3D4C6CA560F
+BFB97A5268A8912F873AACB40C9D7E6131BD2C2FB99DDC95A104AA4DD69E531E
+1F7BEE6A10F0887F6DF15EE64F3B65061146BCF0F46B5EB53A294960E291A552
+0400BEDF61D30D4E937691414B8C14DADF3D4DEF27EC9CDE862922A8F80A0DD8
+2C4CCFDCFCD568EB78EC96FB946CD704BC73C9C07A239DFD8824F52E22C1184A
+CD4BBDDB3E2301C142A6C21483E57A9BE8D060D01F5EA23C22178F3EFEACB76B
+45C46C034A27953B14D9A2F624C47668B8700B5363F5C86944A8DEC84D382D56
+0C6ABBB75031683E20755612736DF206D313301FC39FAAEAF05D483C1E93E6EE
+E1DAB686D64D959EAA5DB319812177546027092595A5002B151F433289AE5B87
+43767F545F3FDC397C02DEDF76AE6462D4A2AB55867241C8A7EC2293B61AE39B
+92B8A82B3AFD65A6AF2B4C7928B4022B9B944151FF0936AACF2269FBCDDB31DF
+29358B779C7FE59CE4FA452F0987A6026E0710C4DE0DCE081FA2602D01EDE3F1
+6C29CCD38E9D8207504BDA0CFC49517FB02E78BE3C70E4763B58C1CDD2DF9F2F
+BACD21EFA95A59D67ED2DF67366B64369B696D1FB2717089B7E7073A6C778127
+2A2C3250B8FC0B5D8575997D6B8AFAA761E8CDBC9473B29C10BCF3E16CD9B555
+18124E11ABFAF29196579325B3F6C1DFC9AFB4B1CF54A40605D7B1A39A337C6F
+4B3E724C02BF2C1DE1B5B327AA0F65B9581533015A7834293AE558277F7E78BB
+0EB225997B0CF2AC95698AF7CB0F2AE6E297A7176EE56DE77CE18E6DCC988011
+C51C80DCA3A6D6613D517DCDFBDAC2936139030AE78D70A579048E27CC418600
+99CF1DB94EDC280EA97768ED37D5ADDF09F26FA9CD7C71FF71EEF05BB8F7AD59
+EA1600BB67F8D32408617FE38D3F03D23E3A9FC3921EC9C880F0A08E051A337B
+72ED695E9B00DC820E7EF062596B651EFCE085DB5023D14713710BC6E2E98C7F
+3F674351BC3200F448459590558A0F7D1FC99B33E69F920FEAD378ADC6F2FEEC
+542C45A265AA21A7C5408102E0618B0653CF275D78D13DA3866048521F937A45
+8AF2EBEE59DE62B5AA226BFDEDB8C7FA92DA2A277141C1DE3301618DB5DF7EB6
+AC5BD2226122C26E0AF1A02C253D60052BC8768DE3DAF4BF58FDF5E707347558
+9431C7998D3FC3E63482BF8F31AC6E0630B4127E8161FCAA5AFBEA9649390F18
+4C8E16117FB1AD2F5A125A9C24BBC404A2491B8C44062FCF8A6609338052D3FB
+840A905FD9E94E54E6D1EAE195C3C635596D9D284CF7776B2BBD7D786A9E77C7
+F868643441E41CBB50E2294A007668954A0B33F47D470D72654FA58D4622B8DD
+90C3CDE66C691A4584FF2D93A6360B274E0E3739A12773F497A6FD980DEBDB57
+1B88A8792964708072AC880AB3331E8625C6010FBF9EA04F3572C737AA1E47A0
+8C5A40B1A3CDFDDF7314D1F06978B3FCCF751E0DFB25F830FD684539AEB02DE0
+856D6FBBC4372D76D109B1A52C8AAABBE455CC37982BD728EA964AC19D6D6C87
+6875A653799A383ADE551C3C55C08840D1C4479F1B97CCD8E07201B4E66726AB
+B5FC0504C4253CA50C538EE93D952D148C6D7A1F99EFFCE9C9E066BC77F2C85B
+5BA9474A49850FDBAC35F97EF5783D647E2F6B238F7D77B8F494D6D04687B8DA
+9179A7AF10A1BFBC50141AFD6FAD87BB58FD1510FB6167E2955AC7336F2038B9
+7AA2683A32BE3DB233F3DBA776AF699305686785053DC25682B734C93F2725AE
+5C82CD88B68A7C788D774581085BE2E4B467DD5C5C7FA83D3B159CEC68FF0F91
+5ADD33BA8CCDF3D93E96B0F9CFC1F7A2F98585AEF0DD14481CFD1DB73963BBFF
+83BA8D9490FA120F6E4E141EEB1D14F29DB08AE5FB636AA1BC7F46EEEA33E8AF
+334F22650CFC2F3CF73BFDB769BD34C3A80694278440C8C7B6DE03C101701365
+06ABF17546953891D8EA0F75E8756DDC267027145042C2817910064AD0D2868B
+622937ACFE34406BCA089A50BD5D40CAD02F22BBD892189D94D41FFF3AA8F3A7
+DDE098C2A5C23ED877B7D8016709D6D578CAFA069A3A50AA3FC11AAACA58940D
+D88505D217BD6F562C8E435F4247AE9AE65BEA57AFB21F13E546040A1A51BE21
+1D2706F228150F97BDAD799A4823C7FCCD8DFFF66DE7AD2AA661B6C1BDE91D8A
+2625DDA0C9C2DEB214C9C41DCE148A5A805ECE8229A9F33AE5BA7A99DB32F225
+24E4C3D639EFB9EEAEEFC61E8B36C2092F3BA757882F94FF7DEB36127E272527
+AE79F0F55F9323C046708C4428389058F9C67CBABAA779F84A3EB8540179513C
+75BF10AAE036CEFAB476729A8C5BD83B4C212656163F91FBE16384611069E2B1
+AA843715DFB594523904C3135690350EE485893F3A51CF2A72366EB840EF3CD0
+918D839BB55635BF7EF6E9D3CCD2158918CAB7C9FF74AB701C17E07F2F04A19A
+F6BC970D90380809A987150EC0C8AE2FA190759B3D669DE4894CF4EF7F32E3A9
+50BDA5A1B083A21A9B0E1BA8A536302EE71A14E8778CF1ECFE0ACB592563EF92
+D2E727BEC93B5198FFE8C0AB9FA44AA3842B6E070CB4BE0F327196A6CF1F2D47
+A7CBAFD8FFACDECAA76F87C26E561DA20B49D2FDB81C42BC36D52A95BFE3F2C8
+4E4644D6560E0B5815DC0751A92610BEB4512A4614D0406AC8B5E5FE05610143
+DE3A38D11BF9A3E8B0E5A76FA18E99B559DB6C216938AE9DB50591E78FF9FB13
+67E89709CA7AAA17D20D820CD1BBD18B904436581FEEB2D9E5C2BC992AEFBBFC
+7129948DB03119F6DAD5339CB950EC410B1064F2E8D471972D60514B9037DF21
+6F42C03932DA11BCF6B8896755D2115220E265469B3601EC1079843E0D27C207
+0D0624E118EB64924154EF01FA65BD93331754D469E61BB34DA3401A8AEA17FE
+92165E1BCFCD153617DF82582CF27B8E64BBF919E183BD0CB78753813A01CD5E
+D3ED931E4670B05C39B66CB35DD93E934B1239899566EAF7D7524E8105DC2BAB
+6C43CB4BD23DF98F3CA2E88F0E40A3BB65C1D0A7CE7735F95AE5A86495C3EB27
+8AC9F070FED1E50936B0CE6E9D3DD56FF394F45646F02AD19885072FF5DF07E2
+2E7B8709D23473FE3E62E0150DB7233D69E31E4AC822FC58DB253EE9737B9237
+3000784F4883FD2BC7C7646F48BE10DCED395D7BB6DB8B1AE3ADCBE3FCC23EB0
+E7BC01AE7960B6B18B65A2820E788A4B47177012F5AFA3E5FBB8F593EAD2229B
+0CB1474FCC2039FE2DFA57D3DE16C6612658F7B7C27B5F3AD36739DE073DFF2D
+17A9351BF25DD24B4434C5D1B6277EB9BBAD895DCC727756DD588B65875304ED
+983C5F664FB658E0DF6D79DB3AC1806EF4D5F73FAF9651E738564CDCDA5BEF19
+53AF4498634A841D370BA07863C8B579466D5A329C8160B8695BEF1DF28527A9
+6DF41EA5016705F903D0A0D2268A27965CC888A8BAAABB5D4FE7EC8CC7816732
+2AAB7557AA7AF336BFB6B298299BB7B5CC89797B7A71F4D61F0609822CED2EC4
+85EB4E6FBA0199D538054B212F095A49B77F664E749D0AA899A877151669E89C
+EBEAB8A71BBFE65242FD53244194B5763260B87B0857072B0155000E5EBA5DB1
+68C21BED2AA9B60506E6873997A34909F6C8D5F9AC3B241A1496A2CC9B6FBB2A
+1D4084500426B3931F25B42B1422DB5444C4CCE842B6FCB545CD0357DFA6B867
+1CF9C7FDEFD67867D748267BFF9AEFAE4BBFEAF3E0F253570F84D5214B24C335
+947CB1E1C56F58B74F48103F1F690C543791BD85B5DF6344EB45EAAD771A4EB3
+1F0C7765F6BCCBF583371F56120579729F58322314C5C5746C2944099D7D38C8
+A03C7D64532B0FE23060EA277C1D71321D257FE0E07592FCC8B23334A92C4646
+E5900FC9EFDFDA95B9E183C582457B032F0878503E61CF24899569B85B194466
+412E10123D6725395A7BA8EA5CC88C8CF69F5386C0E615B7A33ADDE091348CB0
+966F9EC34A7ED43CAB8E50E6C454A36B96DEBBA1F7AF42A21572BDA70407A985
+6A1F582EA78A05DCB2E80D58B526E6473E3688143E8BCEF811D1D02F7565C564
+E8CF7801E98451A7FC541542F9490B5A3AFCAFE0C0C3989B7899045CDF262D24
+7579ACB8348FD249234092028397C92B3CB69AA206A94D70C2B78ED45534A65C
+07C396847EF4A6D9FE1590515C29B2A8FAD4E831BD2E4AE07F1E315CF8DCE669
+DE3FCAAA0DB0A2A518753D04F8DDB7129027BB94A0A1EA990F64FFA543F90FFB
+63944FDF5F6E29E821EA00A71912C9B1AA9426939A2FD08CCDDC1DE545B5B695
+09DA575BE8A9BA6D51584309687FCDE29128D7BC355CD03A09D1091C156392EC
+85393381BA2C006949DD93CC39B7A58BF101E0117E88B3CB4D954B79A86C632F
+38F5475C8559229155CD210AADB479F7FA83797FE211E342DBB6CF3060986C92
+9F946E65ADC67950903B99EEDE3E2EFACFF68C4BD90907ACA26C96E4E5A28101
+3517DA551C963D6DBA3B2A0B4432A6D364CB2BB2FD1B3DDFC1F514D4E7771D1B
+C4B406372269021E87B66B81D4AFCEA1316B755D65F7DEA5AE2FD2264CAF1B28
+1DD4764FFA33B22D2CCBB7208D7EEFAF36B86C0225535264733E237E055B58C8
+6FE717E4A6613D049D39E64A7F517C14CFDE8CACD53D96908B9DDE9DD88E5BBD
+FEA1DD01A0CB0E8C417EF1473183F39EA6FA2B47BB27D37381433050DF7C5F0F
+3FF6F2DE3C7BF989F617AB16AFEA89058C5E325FADF9B37E0F8565B433E82EB4
+F949AAFA60BD424FF49115CA76543F9757741A3C10440B4E5F0CD73AAE7F22A1
+13C4DCA7D6A55FDB020D14BAE8DB2600AE6CE26144CA0F83C82DF67C4E89914F
+4C4A89DEA5326DACE14766616AFF2E89FD7B25148819141D464E47D178514814
+E14C9A8A796739DC99C1220CA086326231E9136F61962303686CF360E9E5D058
+915AC25E7B8F56CD1C6092252091E4E25406C5F4B60C4AD01482F41B8DD29C91
+015E19D94A0B39836722CC3F19CB46D73930D06BE314583F6DDEA56A2B6A8B5D
+1C59BBBF8EF768F9B49B1BBB38B4F828BE4A73EB9315636DDE3AC610D7E0B65E
+32A8EEA63B1C734CFD0B52D09B418F6B33F03EE08A886FB6E52405C0403177AB
+A63EB20DA2865AA6441957F98CD7D64857ED614D59436450F33DD43EC7AFF4A2
+D3549DD174338FBCB4BE975E8CE41B34BE93C770940575AA1288F87FA400C650
+A4DDD573BF1F45EB97781044691B78BD64C3305FBCA02D9931EE3B8B7667777C
+1C0EFDA7E4E247DBD6C5D92737170BB9A86D862C0534A8436B1295861A7A2BD0
+CEE445EBC7F8251E4DEDD7173A82A39B8C3055FBB90FC42B550CB5CACC2D2972
+886E7AD2AE11626F4389AA07995055AED5AAD317FEBD47B498EB52AE15DB8440
+EAB1D16A826CA1ED54F20A990EB564FE9FBB2784EC4920FA479244CD24C7A635
+574DF33C73FCB1D2B6DF0CE6D214B464761B8B9B2EC88387F6E99A64A0B52271
+2E57D454E5B233F41FCE51D65BDC26C6BC18CE1B901048833533CC08AD60FA32
+FF65C5E06A710C206B78D6B9EBA4A81031BBAA88BD3EBCF1E795170EDD69C61E
+26AA502B47B8BCB9D9CE8A95D81BE25116B0B84A92BED585B4248CEC62676FB1
+2C6CEE3B2BCB5F7D6EA35A5E5725958DC772DB3E108F3AFA1CDD4586014A1296
+F92D49A8F9E0D19C80824733CDCADD36E8D6BF728A7EB38EC991B3E4F70BEF0B
+5F76DEFB25670F3E9F8833C015B2C68AB4C6D5B490C2A295F038E2A8706D243A
+1D4B2228CD1A2545EEDE67A85FEA536C9C32747B45CD81D01767FFE9A8F70958
+409C07CFCFA3D102707D1D6AA5EF7A8B25DDB8A7E416610F2D558BD3C9F1D3FC
+A3CCAB935FD1F57D42E2D32610A3069A15A31CB0F5357C00419F152AE3EB3CFC
+4B3FEA9ACB01F180495297B4A8A60A4D2EFFD3473C1C3AFA2221C67D90DC0DB9
+43EFDC47484D08335438CCE06EE75C7571007AD9E39E31BA5E2CE8DE96405063
+13BF3FEBB2AA0C997F303E056ABAE3F3C14DE8F472D60B6BF7B37A3488717BCB
+C6A20858B52045A7CBF4564806C1D71E6422839222C63598B7EE67A4359869FD
+C56BCA71E147E87F9F9D241F06EFD688A268CF0189BB9054231AF7764317C10C
+B625E4633DCBFA5114EDD89E44AFC560CF0DD1F8ECB356174BFDE7322A3C257F
+F6B9089DB9726AA7313D145A249AFE7EA43C3F1CEB9113C568D2162A515BC112
+7AD80BE6EB2ACD39260B65094039B95E1819FACB18A92E98F84E741409AAE641
+AF35BD026EF7140A7563505567E974A43554883949123C29AD3FDF20602B35AD
+3100F85FE00E091803D9D14037635C964A1A92390886B6CB72A915CAEAF847B9
+1ED0F1499BBF1BB8A906538E7F709F962DF50143B649BFB2C5A3719F95362BD4
+A892BD6984CBD362BB1261C5F0C1262B57C441B9349AAEA2995C87FFA20CA0F8
+E7C98D842026CFF8DB2258D7DA536B3609028340A0AB13D4371BBBEABDA877B6
+1551058522BAF2F47F34509275D422FBD83F51BEDF0D94EF10E95FD1A8B488A0
+0A81C7998BD9AF86C1A8E2175ED1AB40C96243687BBCDB793A08A5336F911834
+247462D693993386ECB467479997E7995AA90AC96AA68B78F21AC59BA618D886
+ABC7F0EE019F4146755A55BC38BF5461B1422E62E320937D056A62D7AF6D3F0D
+B2A2D09BAD44F46E97316A685CA21CC455AA8A061B88E3E64C64DDF93950E236
+B49749CEE474F8C38CA8468E6167C94B3678AA2E5262B69D4C04E5F36CBEC4A5
+029807DF9AB3E4A1B5360406EC39D519504E165D129B978225D2DD7BC4ED5982
+D67B4F1C134DF53B19CA76B00EC04967E7D057B246BB248F4ADCF9D4648E98F4
+4AA48C9112808A0F21F816E481543E5873AE2331E1B5256D027C48602EF09590
+18602EC3843E98554D304B92E5F1A531E61EF00E5809784C16D44E6783230C58
+4487C0B9DAFBEE1362F65E4555987D8810B49CAB8D53DE39DD0D49FC5C3BCE39
+6D4A8461C9F0B0B9B320365C7425D8503690204D0898EC34BFE37FBB5B6C86C7
+60AD9436D9331FE53A444F78DBCE00AF3CE5C80EDCE9A65CA837F948EF672280
+94FFFD6B176B98D66DE818E27E80327866936389AC4845FF059F996B83FBD151
+BADAF79C95CDC5375FFF1211A6C1C490344AD56BF6D9665B2388FD4BABF6EC3F
+3F1459DC589A99A7615D64D34FFF122770812E0E1C5FBAAE90B72F8845A996F3
+3E3276D41462DCF43C02D046EB6AF4A9101EF81D357FB21FC15D075F7BD67DE1
+26DF7DE2E6E21D578051967794B28592F27271AD34C9B81034D62FFC442DEF67
+77D174EC4335CA3552D85B0AF9D4A4011808FF1EB140D12491217C9C6D991395
+6581C91545A69417114B70FC4E021FABF564AB6D1DC37E456AFED772A1441E66
+63AB194A8D94A8FAD64CDA23AC28ABD8630D3B19CA93AE46B6D7F229E36254BB
+822529D754ECDB3989F803451F30793F0A8C4CD03F8A82185F484CE910334DDF
+F3376FC4AB870851E6B7C1C10337DF7865CBBF77B28A1189494313CD8D112C6E
+ADA1ECFDA1441E2F107DDE6BDFE74C50B89D6238492005C7B6AB5B77563F3209
+B6D5978E09ADCE0DACE3990764127584879AC061ED974925252983280A596AC8
+A0E581D4FF1446D3E25DEB2602680C4382605AA1CEF04A5231220F54449620D6
+E6705DB2D554A34B4A51B0243DBF506577753611F28C968AE743A7204ADE14B3
+6028881DC1AC19923B6ADE9DC01706ED6E635AD5049DFE52103F4411829E5F25
+B8DBE813719DC80195FE3707181931D1DA3D58F101E34205A9871C9DCE6D486C
+FD8A3764D1BDAA95C2788192C956F3514D28F001DEBF20A7802AFC168C1D3F83
+B5CB66DA709C80CB62E5BDD5094AFBC09AC43A6993CB587D79C1CD2ACA5D3904
+683F7AAEE380181F625CBAC1000028727EDD6D1C96A180539B4DB46A11D55FD1
+9BD5A991EEEB3125C8B022A4CBD34D6AEC5F4582731651D4A1C593EE4DC547C1
+9FCA888C406D3C6FEA0C398D91C8D6B56AB56737158C47A90D5B8311178D3170
+4C00D98282FB34C636633DED7A3D8566D647F2B3EE3C095CB0239B48C4A1C1F3
+BBE15C21A63A9E779738FFF6AE49081703B5716939C90AB9EB4E1696444CD60A
+4EFB17AD7FCB2610A9E3F903CCF938CEBBAD41DC25590B35F50A2CBEBA8FBEFC
+109DA0559B474A79A5DB4209D63D727EDCA5EA257143F90212E7D57BC1CF6EF1
+D1A1954A4F919209447477DA90F87FC1DFB199C117A434BCEC1BA10653A2C9B5
+9599AC25838540B3BBBEDFB597206DBC2A894D077F095C073733C805E045AAAD
+9442ACC465300DB1BF50C14F31F80769EEEB8EF1AC8FA42E123B7F98BE4D721F
+21AD4A9DAD63D515AF0EE749497EC58E45683BBBA63D7D06B717D9AD0A593B45
+6948F70A99A42B8A6F2B5CC578389A7D971B21C48571BCFFB16061A43215491A
+66BE45983EBE2E37BCDC7DCCC507470FB01711105EBF9578664D855434DBE98E
+0BAD017F64684E21FC3209CA6A02EA74E6FD7B3710CC09AC0C213E3226C0ADA2
+8EC7F6A960D7D75235A3B6CE240AD4101855F00748363F98A6DEC3D785F99377
+827EC9B43B5B7FDADDDED1C469812A5291F00705AC26BE98C5E9EF813C6E1438
+FEECAAD277718900E4F5A4B8CDE0BFBA1E0AF5E324CA9B4D9C06A2900B7E3029
+9A19D23E58BDEE72438CD10AACF155FFD0BA3A91E18B9FB23585B76A6D4D9873
+3CA358901612B5D7670B1B2B8911BE871853588247A647FB91C3E86A6F642EC4
+528A7A3C63D6C9C59B46A22340A887E9EA8754F3771797BED0A2D2ABC7E87886
+FD5D1850FC4C525A5CB4354C5F600F3DA2015A35A77841A8009796C88197D9C6
+7F4BC939FE15D1F91DD6A62720E90B7153C4D77A13061F9F6D732E05CAEE7E7E
+2EAC05082F0756507E7B6CEF9B559A5CC7EF7AD02C54E5DE6418EBED07FEADDE
+F28A240D66F004ADBF2B4C9E158F0FCD9950683ED6210ACFA65F2071E6B72AF8
+92E19D97ABACC701B24E7CDC9D4D8C0D17EB4C64A9DF75B765B1058B485A48B5
+3A92C9B0A1D13800EF704824E61C8D13E64ECEFC2321CC2343A9B59E6C8A0244
+E3C1AB84080AE28A51C7034F3EBF2BF8267E293F61AA10128510CD26C0E54C1E
+6C2C7BC8FF2F52AB1A603BE177A6EE39A5D5F77E9CB3F37B46DF0A134F0D47C8
+0B67F71B5AD0B206D3E78AC8146BA70ABC216F4F5CFAF55FE1803E4947297D7A
+8949E54FDB2A7246349952A2B585AF440FB9BA30C4A85083E5EA80E134A611E9
+E0275460E58C4680CDACD85D38938AD52D1CCD190D2D87241C91C75802ACE899
+2844DF49F6C532D4BE4C5CA2386BFC77A5C3D49A2D691EFD56C5EB2AA830CB8C
+03AF9B30D698BD58C43B20BAC134A895FDC42A0FE5C8CDD1110166A36CDA9874
+4FFA0D573A1414F05CA1EB5551FC456486A72A1B7853496B6F162E6A881368C1
+7C968BDA6B9DAE96801E87FB9D987057E4837E7450ED0C41E1AF1A14109C8F9B
+F20152D9E0924BD9723F73E23EE66FB01E2013CC83A25AAF37FF923C089E0F46
+EBAD3B42FE036F94EE078C9CD251A150E28578B2DF64720E7BA84F643CF8E500
+2AEF59F860E7EAD664E614E489E9E1DFD76CCE33702F25F5E6D7BD2734B0EF97
+4B13A1B666CDEEC6B1058D8951D00FFDD44D910D5308135B088E5E2B0B44F684
+82AFB0E87F64251CB664A130D6685DA57DFBAD8EE271002476AA8E0895E283ED
+970B130C0ACF264D8314E920BF308A44797572AF9B150352EB261DC86A8BEE7C
+92E4C5BE76E66476FBD2BB1B6079D4291F03932E92CE53DC37EC79D946DF12EC
+19D5E914C67F883C42BC5FC28FF200DE5A10A3B7308983880A5E5E37C457D515
+58921D0ABB91307DEBFC1C157D834C5F8FDD85589F17E28F99CC42E8AB3A7D2F
+0965E88C78AFAD9DBC56B76E85B707321D760580252D175DE28F46E2130EED6F
+3101D569B0C2745813D1D8F3C6A30AB77610CD50F5C8574DB097FFBEB2EC53D2
+D4887560B23710BC4BE049749C98CE066079D31AC800091119DE5C45673497AC
+1E7BB1DF4867C5098454A98863F196A20C74B8CD778F24AE06E92C08BE0A6A58
+EB7CD34A06CBFE6268A01E8360725534A8DF5F3F1074FC4BAA6BFF579DFD1E5A
+3C914F718EF07F4A1EDEF0E9B4B0188CDB3BC478C9202632212542C5CA144F71
+E76BC68F3C110742B61D20307AD2A4A0527A3FD8FCD7819B207B9037FCF53E3F
+C81BC00D428CD5A5EEC788BA2C974B550533A30A646FCFAAAAEAAA443B09510E
+A9D5FBF1E5DCF14BB0A116C91B4E760DCAD201020F63718AC3A8BE519232CF57
+1D2A077A95A5568D12FE61C78D6C1198D523AB1D604D92D0530434E4A5059F6D
+DEBB5AB57D473DBBFB3B1D08E4C1795658DE4D6106A746ABC371D90A6D31B36C
+6F950EB16996CA13104C356A77B7652471C811893A359E824BEBF8869EA13989
+3133DBEA5CD1A7447093A4B6500EBD5F434B7736D3BC909E6B51489A79F2D8B4
+6F8863EA0560F02557175460037899DFAF5A93871468F56D341680C0B8D2BD21
+709F35B66B57DE6B1446910F4EF5DDA5DDA3A4EF486354F087449F231326E4CE
+6E1019BA41FEB775ACFAB6CFB841FD1EBC0BFAA6BAAC3B72605CD8ED100643D6
+6FBAE3DA56F5B6CE1F66A572B71958FCCFA3D1A312FD8199CF30BF0383EB0802
+2824A093336EED72111148C8F94113DA68C6A267153171B00335B0D7927715D0
+7F372D2F946AB65E1B19CA318F04686891B6E09F0536CF77C24A8C8EF7A5FC05
+61127667715E4CD2A547CD92BBCC219C40F4E6537036BB416783D54CB182380E
+87F7E8D7DBD023ABF937085F12C81D92D65F97F70C017FD25E7A218D484D6A1C
+B490BE23B603F763C260BF5EE4F9D11879421C14801948F4EB0B613219FFB121
+A477496AA5F5C70025E15B198A54C38E32A3E65B5678944138F4D0FF07970A81
+B23DE2CF7B248E8960EA358A3ECD637F779EC73B614B5AAB0B72ED62B1FD5B7E
+45B9C587F327D28B042B31045D641D5B258702019FE50AC6A08A8FA828829CAE
+573F6084ADCD362C55D539C5ED40AB1468D037F6756E7C004514A07C4A4205F0
+62324119A96F357702B338446F1E338AFFF143B8CCA5ADBF7BE0A2A66C40FEDA
+15DA022E7575D9073E10B9F7A5B1A494FDE2826071EC40BA22AF17275874BE93
+7EEA3FEC5253C04B6060189C710FC7C5E2829F53B1746590B30BEB6C8C81CF15
+688A72C2A05B4D68FFA010A74E23B5B0B28C622B1C8D266100ABD3364AE21CCE
+1B3701120B83EAE149792C87D4A074C7F8B4EC81156FB9ED3D0246E2A8A8D418
+24308FFFADDD9D20DA7CCDF56093644F425D8399E8A3A06B571D7C80753F840E
+BCEA835E4094AFC6DFDE191E9045A115936F50B97DD73580D3B6FE91E48AF6AD
+0F1B8708CFCFC76712BE2079AA6140C830523CE0E58148B36AA7827882AB0ADF
+F5734E2AD66088AFFA6ED6A8582BDA670D979F8C23042E07502EB4A8506307E7
+B62510C729590B73804DBD2129D7EB17E2164FED0389E458BA053F5B24983019
+20D09AE5948A159990D9B47FBA323F2DFB7B782FC963AFB083EEF4C01F614ABB
+5F588236986323FAF367303458401379CD8AC7F7CAF65816FA4B45F98A875F10
+86581706C369911B1AAFC70B1B1E7D30F71C55C030E5FFF4FA5FFCE97E16A269
+7982CF88E407BCFE450DFB0D0D8270C2B5C91B4523899C637CC86D1542F2DC37
+342D6366195297B4A529F853B5F910902BC907BAE83CD5522F5A0F2E4666EB9A
+40083B1AB66C9BFB1DCAB26AF910B174AF933326AB131BC080BAE7B4FA30AB1F
+422B0C17648AB95E8188B76977DCB7B2D041847C82347BF6D2F729C9174F1230
+E8612F98D9EE77EF7898A449A7DF889D137D1691AA315E9F6F08046BBBB5937C
+529EE7FD23AEFB04603287FC991638FFF960D07BB5FB14F5B56ECD782EF84741
+7AED87F9E4D76F6CC4D01FD39D8AD05757C9B5B1C1775410F9A7BBE4D9438994
+BE02A1C81CE0BCAB1B080ADEA7DEC8EB2A9F5F1F2FCE0EDF006A54A6C1FC70A4
+51D3B2EF67FB6AFC68171CA31AFDB5B30C6D86E4B584B885EBE66344D499185C
+7265595A54E3AC090BE89424FC6ED53FA7C30A417AE374E46476169C0EF5A04C
+4D87EEADB08CEB3CF5C26B376461F8891BA72FB028B2088B81BA74CE27B2C455
+7DEC6A56DEF3406DD71AD214B9529BC80CD0AA95DEC7A074B785DC2192713A0D
+85D6A3017133F5820912523878E2CE0614513137B1D6A0E1CA1B31870AE10F48
+3DFA4E6FBE782AE1E7557D157F4AB92226C4DA3F70AD4EF49D3A19FAF0169B7B
+9464EAFFB3270787A6F02E86F8E3B56D00863A00C6C68C2AB375F08DC006FC97
+F060316F3385C66A7389B31DB5D3B7A5C5B73FD1C344ED9F40BEDFD82BAFD0F8
+87F6155F34FDD9BB4E928E5264B8AEF216C7D00EDEEA633E543954BE63A7A3D8
+34468AEF3C79DB66776E4C75A9C61C482B695F6384A7F8E8AC68913BCCA20221
+2A013A388798FD878DB9AB8802504236DC8147443D150D3C85F16E443B860C8C
+1D9260BA341471BD866790B288D08A643C3A915AF31CB885B10EED89BE07731D
+7936A1FF37B92CE6C953A9A6D2070CB9D1F8B4409E25F0D1289F445F2032D470
+A4DF4FDECA4AFE4656AB302CCE0DE4D9B9D665F56DF443DAC8E5A6F011C77811
+8D6075D72FFB6AD2E63FEFE1B8DF761DA09EF42D73EE725003628833E010CA9F
+76D69C341933ABA225A1D448D1B02A24C8EF54917559900C31CF4CF96AA1976C
+B75D49A191D647CB4062CD5D6591CF232B1FC7A1792787E97BE5F9F8BA3D4586
+5BB1D8ADFDEBA915CFE0D4585B4C7296B0E0B307DD245F8BC357D3700E187D75
+17C6440BCF624C8751D160BF9D351F49E1283AC4280DB84C36E593AEE0AEC473
+0DAA130274B8771D318283ED32165F26C31CA4602BD138DFA717957AB25423D8
+9D454DE676CC9A16C264CEF9B4038834762014B65AFA9841234FF8D6FB6CA9F2
+F719812D43D78077C82FE60B75CBA75B7C7E664BD116A68C1B92DDDD5ADF497C
+0E7DB07E3FBF45298FE4B9C994E55803FB965BFAD4C2BD156D34D79B41A950FB
+7DE8B2DEEA4440C93E94C9D3369C7DB4F297555AD10B1A8B003DCCCB94AA5232
+CFD2BBB5C223D8CA488EA15317D8284F97AC5E46144400797544EB86C2F7FB1F
+B806596973F2C8FFFD6C26E14C13DCBE138C48DE544CBCDBD16ADCF2E28D5319
+0DC91310740BCC46E657C806A1E3DED637C488384E05615E78C96FD0DDE0F5F0
+170A04AD520E0B9BEC13A133DD976794FD9A63FB22F495BBA2DCC7BD11FC8D65
+8A1D80B2CF25666D444FD09DD1650B542D894DB7547A03BB60A9F1C673073A0D
+789A66A3B41678579F42B2421878DDE27D4873D4FEC825685E90BBC6E9631A4B
+A5F6149B7C16962139338DF54857B590E9A39926B11D0DCEA8388E7336AF455C
+F5C39AB40504792DA3193B21BC793A63870CB7F6BAB8D0D51FF8125FD2BC72DE
+A210AAD804AFB1D41B2E8ECF2936E74C53532775F21EDA729AA902B3C8B2ACDE
+0578353AF3E9177C7906041C9360740841E64440F5815BD40FB1C41DFDF515CD
+D47837C9654689CD118714FD6D8E4CF21A02B01AC9AEBDC75341741DC5ED3C73
+1DD0EAFF35BABBCE1CF9C207C1DC79F47EFDF0EC07D6E85D7ACE2FA8F5AAE916
+C80B1010086AC1E91B957A6A61D91113C98F95BCFCECB3255DC548A03C37612D
+F9F47139A49B7236758A419D57E42694B0BDFDBB42EAF30E7F49421FB9563F72
+7036DB2C85AC91A83C37CD2EDE94B3EA82C45BFDC7E1696C76D15EF10141BBEB
+363C098591B35024AC9D304B348D028F573ADB949327370A0F6EE2B8C9EA50A9
+9BDD725A81BB626CC124E522E9D164E10671A93BC36DFBE6025C34783106052F
+142845026D6B18BEF2011E0BD47D03417EBD88F1D31FD36C61781735B5A1EAA5
+8C8E13BB206A6DE4584EDC53D0CEF8B91B59698106B9535D62BD88D80ECC85B6
+1F1CAC049843A88150359315F12D9940FC65DB61D8DBF588C707749E8823A53D
+E19F6C060759BEE9A19A7536599754FB587751047B3723001349EE3A23851B68
+C8F5933E766D5CEFC618C0E551069A00BBEF52DFC94A3E5F0E5391FCB97A21AD
+CF73E4EDDCF179730BFD8429DA97711A2A0B3853946026E6E8FD8F61C735946A
+25E44B958697B722B52F4DD3BCA1358E2AC87A81840F05D76AD90DFF2756E7B8
+79DD5D43F0CBB873F11A9B753EA79F44F62BCBDEE84CFE171AFAE64C236CFA05
+521638B4F8CB880491BBC67B7C84268106D74DEB6A1BD035D9E4359C9417C14B
+6EEE4AEBF574172122ECA13C800E178B7045C2D0B1BC92C07A5351C15C50BBDB
+E7703FE1BE7E668BC059F62533786F36820D2EC57668C53B7DABFFF06BFCF199
+268B68430F3FF275EC74EF46F991B3EBF9FEF1B86659F81809DAD9F0C00718E3
+7DF1DA8521316FB2333305D58BF90854C5A9AAADF7BBACAF0CDB9B687CBCDDAF
+30ED6E7778E4922B9766C461CF3D336B629980C3BD2CBCD246C0B21D0AFEAB5C
+B44885D1F82796B6B064715FA3FC41BE38D338ABD15B7C627FC2D067F96151FC
+8AF9EE0CFC15F16F4C8B6427926F17E612C2225274248B7B0809E1B08380FA9B
+DCADCD2D1B26D1BF6FEDCB13C54489ED3558ABBC9ADC7A6610C411AAAFA94367
+7452F9260211EF5CF2DDCADB27DC0BA52C4EE8E6F5D98CD6B495755A4B52FB65
+67366EB69F16A3530371944BBFA0C82AB9459D718D08F50C60DDDF5DCFA64B1D
+71DCCD8AA01FFB9387DD26DEFD30D97D5F9EE03F5DA165DBDB0D2052054DFD60
+DB8AD8A389940BA24F7F44C0307A9A446E3D53FB99A6E51A18B4700DF8F79D96
+1F3996630D3161EE5D119B6C0EBB57A1ED333DC8F18E35E5A715AC887257D37E
+EC3BF6DFE165B62401C3BCF3752386166372061F6CDF94689070432C283C2277
+A5652AAFDC83461E0B5960997AB5B7E8F6CEB6BA0E2D9AAD4506ABE0E7CB5379
+77CBB9113727093B1160DA55CB2E6F2727414E53D8F7F66F45F1B7191AE7113F
+FA7E11A2D144F27D3681258866A2B8F9C0BC12782CCC83AD847D5976FA7D4468
+78E55ED04B32B63B2324BEE7251FBC9C93223EFADB8946A267486F9863CAE636
+C602E5485628158238D5F6ED59D996E41A563B5641CBA250BAFADF44B4959C03
+838775AFB5CA6755A3C7DC78F1CB1154E63BA7370C4E0279CCED6D2E34695243
+6460A4F88C11842FF7B4BBD73711F2FD06888A02C0C5759C581DE1716C80DD56
+5C2B0223A20C56196D67F7A6D7B5F711743AA31B3D8B1CAFC649E1A3E227E32F
+8A7716BB8E919A4F14F2630FBB1662767A1348055E48050DA6547F2B45FCC664
+8771E58CBD281DD1070E045FA81DE783F831C50ADDC4FE239FE4FCB231BE3F4E
+2B6B75C719C88E69F8B3B38D25EA42F2B6A71B03FFB204076DEE53EB22812C36
+62A077A6097FF9687732C4B69F686406283AB883A2FDF4C5FE70A5472359E372
+DF28BB7DB8DA88E2399EB61FFEB037E484264561BB7A905DFDD110C5B110FE4A
+2FD2FF3A1E3E1FF6CDA888F2B27522FC367999D7DAD58A29DF8EB796F15487B5
+11FBF4A8F7F6C9905C1F4E5E18C9729EF6C6028D5AE027CA67C1DCAA4CCDBE44
+A7D74CA0F6ABEE0BAA08C4A5A3C35FB3CE59EAD3480307132D25522518FC2331
+A46F67B236C4F51C9852562BBABE2705AB619C4D4F52675459F184FDD59AFE95
+30B97EEE211D690643BE8126130F3FF6EAD41FD9B760139FAD1BFB429C8BCD66
+0D504B64A7C502E476FD6237A1BD7CBC187AC7A30CB39614573B795F1EC2AB5B
+47953B145DA8FB5990A80B515B4F9BFD32349F8F882E9BFEC8A321E3830A6379
+7595631C3E2E9B6711374532A8708CB0B554648DE5128FDB4D85445661AC950B
+ACE8D7EC9CC3D5C756EF7890041957B2F625075DCD762A04442C0C5EB983B820
+22E64D66C3974D031D6789096E7A7A0D2D2A43FD1ADD8BDC80F9D1B381D67E3B
+28B421336DD8812030E13FE79CEA71A9195BBC10EA5BCF2A446099ADF23C4310
+A7C0E296A311ABABE65AB2AF49BCAEABFA09CFDFC6C7B001B9CCAF252D6F76D8
+08DE4E08DD78DEA1FC92A5039BED5FEC5C276A1130EA569341765CC3EA94A4B0
+442244D7DFAA37B2DAEB640A4F014015CF54EA13CFD931517E3CBE786A6C4559
+182EA384C2113DE85A3EBF2B9B4E8356AEFB12FC9CDC11615CBAC7258A3D21C9
+F26CC170C3A3E774273032848D24267D0E7699445061B05BD5BBA4EBE4FC22F1
+9F0279CF940C39ABB756CEE674528B1E78D514C6D319F88B02152A425D4D2062
+7E798DDEA2149EB6D4F35D435C3777F9C6257D2A82930F540B119C7C3D0807AB
+E383C37AA4E09F708DF1FDFE2CC8A3BCCE624A0E0DFE6F7A8D76CE50CDEBBB1C
+6B61F75DBD9E52B8209495D00B7C01568F13AF0B5D812DEF37FF9896F83D7643
+A6A84920820A22BDCDBD9D5CB31A57C2BB67222ED05E71F061D79BF09A2651D8
+FA6ABE2FBB465F4310F1BF1BC5856984F5857398B636D1144F75202A4F9C4022
+0DFE3F18FD6043C381EA81B70DAFE2B776E88FAC1D482775AA6B452B81F5B396
+21A97D7214B5C1A766B62988330ED4CDFCDCAD8CC165CAD046278163046BF696
+BE49C3AFD83A0D6850CBC9FF1751D90433C03F373B89C31A0137EC9428A9C744
+72CE4653AB8B1CD3EC345C90879BCBB7C89B25AFE08A9FD880B78C9F6FD42186
+6103F6FCCC9E0FEFF506D56B5A98AC79F69DD7D60BDE46D29956E47396C7A15A
+76887359539D654B899B6C0FC8ED736C5DE7199AC10FDD15B4FECE94E4CFB473
+0422A29427D252C11ADD2778C3777254F58EC33BB24C82F559287F92083CF708
+38A9CCED1E5EAACADA0B4CF23D83F1B257DFBA2F83883496BC1D8766A4FEFD11
+A320AD84F04C029DA40E51DB8E0F82EE343EF7383B29786B90680FA8A108A94F
+E1CA201327F0E17C392C706CFB7515873582A090F93C9BA2BE6774B810FECD10
+01CDBFABEA808363A1374672AEDECAE03C783F7E2C85299E40F4B76AB7BF41CD
+B01EC583140F30817B5C9B4D22EA6D4233E7EA1AD32629BBC513F79E85A0EBB2
+1AC59E7BAF8EC2FCA88318C1DD72B1E1D899354DBD8AF5C39EF980CAB38141EC
+56C01860B90DCED2175947096C6D5AD7B56F4A5D0CF8569CCC1E0EAA454D696F
+1652453ADDD38ADC336F2BA06523BF8DE4BC77969135CFC485313118989B90BF
+B00E6A34AB57C871767EB52A9B970CD5D70D26164B6617F4D19C5C3DF977989C
+687CA9F67509CB0E261E9A8D18FD6F0D7C061212B8BD3CD876CFEFC50BC6569D
+5ED1FB4C56B4E0D3B2CC1117A90DB01802D36929E28F84C19ED6C83E65A0782B
+F5EB4A9F9AB020A1FAA6B7BA6CBBE0C071BB1FB61B2F9113042C5A8E2E131FA2
+5677554EC8EA45604BF7464C5137EE17634E8434020D90CB88B94A76A100077A
+21E031DFF68439EAB3381D1436E31452CD4D2E69914FD2E82E6D9AF2FBEF031B
+53AF448C21559598865550488FF2EE2F88E3027F6D1840D52497EBF96AFA6691
+64F0671E2E29C6EFB745ACDBE97709FD452FA6B2BA43E1B21320862B5019F8A9
+52B68BDCD53B35BDA09F1FC4C480CFA3B92719E360BF124D9A9E728BB8D4AD56
+3D1CBF8EA793F509CF59585D2443DD46F15B8C86BA6438272ACA57274895771D
+637365F5FB3361631F68CDE33A8E8B5E7FF3CAFAD3344FE57FB79115E2E67678
+B1ABFF4CCFB3540B6F7AD4189088EE0471DE1207E97945B4B74350A71852C0C8
+2EE1BA9E58C467B3234985794B04C91F6A857D5DE23F7B71CAFC182C7153EF1F
+E353F897E22851A621E1D60FB5BA7FB0FCFFD4032F714F30B69609C9FB9B1032
+CE7F88EA8C488D55F9ABD713B603273830D45026A5A4D6E8E235E6772B43DC75
+59BA22ADC7382A89D5EC83D516B6B067DC0321FE435AD294787DC7A736CAE106
+FE2DB1162B182B1C9AEBA01BDF7A13934F796F7D5962D53C90084E5C5B0F54B1
+C50BEC8A2B11841E08B0B3E4F57ED0227298F2FC5F7553B0F3D522A1FD5DB5AD
+261D7E37FA8AF178BB9F57531D728D266335807E68D6D7BA036804F0CF9D6EF7
+E024A3E3E2CA30911E6F37352A381EBDE15276CC52A168FE21AC6F8078CD9E80
+0E4212AC2AB968B339C7C55BD52AB03A3D0A65A10652149B4B56687105F6B51B
+886A944C181310A86C7B824508A4614DA7EED2E942AFCA91C8685D9EFE369883
+021C308CE882836A5CD0A87C8F255ACC770B815F79EEF626A12618EA3AB0BF52
+AA35B2EF24789BDE3C8EF3E282882F3B7256CC2366A131AA8578FD14B369E5AF
+B6C94E61BCB7FEEE9AFB30FCFCC9BF85B0444056614F18F99E4D456E50B977BE
+E3D9996B9E817010678D3B6F733C4B3C48DB1E6475FA6E0E5C8D6A37517A1F56
+93819C842B090BE09DE6BC7E5D8BD3351DAB8469A27D9F5DFC4227EB534E8750
+695FBBFE39024507D5B7CFF063435E3EBEA0702CFEB563B3130AC0810A3BA1AB
+4597EC9A2487D8EF0FC7827474ED4ACCDE5F680CFD17651A21E3EDC15E9FB31A
+F9DC51FEB169A884F15732C1BF3948E8B96CC55563AADA8B3606B17218D86349
+470CC300E618135C404A8EEB551A10571A922B920945CCCF0F315D1A75F8C4EE
+1A0641A8915BFBCA53162BB40F6AD8E8FFE411E2FBE104EE488385551FB16217
+D7784722697D0891B966CB4019037D0F96A1F57EC50C4B27437BB8763A79A7B8
+F1F01F5F4BCC48F7F642C6EF1CA4AFF92EB674CF99222EA58FE888B737ABF9F9
+2D87CDB282F6A5E8C02DCA4D76A2913CE31272387E21EBDEF0D9E2F24C79A7E3
+EED0A7FBA3A8BBD9B525ADE096B4903D120144B333F0D702E0B166D433E30EE3
+D3B0659FB70A2538DF137545C312665AC28FC49DCE75DF71FA1FCA37C6D0E879
+264C6B9D2B218859507A648A9FE83A8785079FD581CCE122B918DCC74A3A33DD
+24589EE13017DC330385064B09E2C9B6E4A0E9D76A2ED29B68A547ED185D23E6
+730A46A85F80674E1F804216C1EFB747B7E9B8703CEB50C0206E0145969EF2CA
+22F2604DC3FA86B795FDBEC57D4772AE030923BBDFCEFAC1A516E5CB058DB83A
+BF6919BEBBB9B309E5E6263D6837FF36FAADD560BD7F2429CB4A5726923A683C
+DECA1F3583E08C77AA81FB8D8623187596489A8894E0A7D562911DD7AB819260
+CDE2C4EA96901F92B2BE7ED14947B9D2A949C547B8A5CF52D9D15C930DDB4E3C
+5E3B274198C2C80DD92CF75C28C74CEC39EE946A6047F6C056AB6E029A6E9654
+4A3E162AA204BCAD3B221288ED33DE3DA6095E85675A8105F5CC88CCEF4C85D8
+45F829A7EAF58B6B5D3DFA9FD708B82101C19895ADCD390B6C3723E8B3C42196
+F4AA43A125A1FCAFF10621AD0056B096C21C53D5C9B29D359A568F66C1F65A42
+7B76218410C0D4D47F64B3F625519D5443CAF0ACBCF6E45B59E9D7C4C6DF3545
+6D01216FFC11EACCA0FB29DC997CBA1E6B4408AB95CC3340C7BCAB683B7E62A8
+80D5FEC00070DB68043F8B95CFE064F09E62A2BC0C99138A5069E27C70F7FEF0
+DF3B98DE67070E05C0E3680DC1BFA10025DAF449B5E2FEE824B277DEB9489E63
+C27D82358933C1B103EB95AC38EA9F52F3D437C59DB47AA465DAC7EC07F731E0
+7F72C3868CD58DB46FB7839DE77F8B00B5ED53322DD03CFB2303C2CC1B26C78B
+B6F7624596B92939E8D6717F6C75139FCE87D549D311B8EE9A63EEB766D68A26
+689DD5EDBF8A9B8695EA4226437620AF7ABC90A5E19A1BCF9CE1B38F99CC6626
+651ED6388A1CAACD4CF505131B97B27F32F68E2F83882108598140218BE26381
+8C32D7FD29852913C5BFE5C65C0EAD586D801B0E5BBC6310FC50A92E18151EEC
+FDDC28F39FD1A323A3B5EB5DC12D263DD1D7D8B9A69B5CC156B041CA460D4055
+6B2F44057BECED5CF64C9DD3E5AF2B13053841C9FF55E28E21EE767EED5E16E9
+A033C6442737BD02C0BFC4E2137951ECD3C21F6CFFE5394D37DB260D5EA02F0F
+FE200F25E652110134711CB66547C6E3DEA4684233B3369CB975761CB81F91BF
+F6F1E4808276641AEF2F9D0577E8A6D4DE2AA8BD547A0EEF761E2C62DE6EE39D
+76CB24479232B1DCD7219BA499225B533791BF358610ED296656A3F95A44D564
+DAE42762CA32419A67501BCAAEB2360BE431E835A00CB7BF1B6E58CE1F6FE01D
+191A9117CFDD9AC1ABA5B616FA4CFF94EEBE9F84BC4338F66F86FC04EFC73548
+1F6D884F7A8837011A13127F58AB3F47F7C301F872550F558B462205726683AA
+B9AC359D635C6B7733DDB204D23AF4279CE7F5DC8BBB352B4B2F50E9721DC89C
+EE6CE994935C74AB296589C3C47F624972B7D92E0D1FFB7F5A30FD52E1B15126
+86D1595E064FACF2BCD55A5391F9AB38C3913B008491D7003782F95668735AB7
+56EFA837275E42856380E3F5B9F29C1F3C2EA94440A8C5399771065EB26DD940
+12C34F5DFE5AA595249CD08EC2B9C2E387DAECDF0E7878B9888D7630DCED1C9F
+D341C61C57B47C12CC7DFBC5AD8F2FE583A2378B0E111CFAB1891794FE65E2E2
+3CD1F5DC0A2D57F2B6E4F88B9298234756748DEB13AC2163147EDBFB9D44C614
+9606533420CC766AE517630E0B7BCF01F2B5A092CE86F3B0E69614C2E3867B9A
+99E05A128EF55B171C869616A1B4AA03D7EC61BF69D36ECE84BE11D888FEE73E
+C91C03CE9A752EE81E21E73E849931FE57D0AC6180D9884E5BBA81EA20B9C879
+31AC7E8B3B26A27D510E69512B9CCCAB31F41ABFA92CBC9972AA3B8612CD5440
+AD0C1FDAB86391E2358F209D7D6EB419D18BBF8EBBF13C7838B40625FB5461B6
+4AC315A975E6687D68504B1CEB3C507CD015A25689614B379F7EECCCB5EA7978
+DA58CE5562A85E0E5FF07FDA3E08088A8A0C8285E8B30A95FE7ED9C5C80B23C0
+F696683A43ADA8F6D1AE93AD9E95E05AA639EA487E19D2BC1377F611FCF62647
+E21F511B70CB659A0B120F64F98CB091B751A55376A60E34041011E5DE6C8ECE
+D124DCB9FA45029064DE7CA36F8CCE8FB149A220A29083CE2F7F56A665940958
+1B1384039664D4B1E3EC177CFC6DB6A98E162D89FEA3CE1C35803C4CB7593756
+CCAFFC04F2F41743D684EEFD4DB4B9B2E9C8DA8BD3EE4539405F2B1B2BC5AEEC
+F6B303C32892CDAD9E9F7B2B00175F9B45133D3317D87922D268C3CED1CD1C51
+FF4604002D6AEBC8E4784BD4E87979C9C5964962D6AF054DBE2B00FD08419C16
+9F3D7B2C70723BC7B0B5273AAFE83C2D0B1B96D7F0617FEACC78A584DFA8D253
+D71029C6884E70033922D3E2B2DD27231A0B9A9FC83A0D75349FDE08D60B9F6B
+76F0BE5614C22C5A3810DD19A8AF131DF61C98D739220243D6136A56B6ED09E1
+49C0CD780134E118D88C5AE22CD15128E00E5E47C27CFCD1E8201AE916F4881D
+EA3D220AC1798A571B4BE179A5BBB474508A1BF6C7415C6465602FF73FA78214
+D20E6F79BDB768C2F0AADB39088359DE6A5412885C21837E7B97A20BFCA2364A
+1FFCBBFD3FF10936C80448A2E8343247E552A5F082A5B2E44F72DCB3D0074D48
+BAE6C21FF654953B9E0A33AB9B33259044BDE76643833BE8588F50130087356B
+19EACBA029A1ACD80CD0DAB61094A8BDCE989D7B6BE57A58698079245DB6857C
+ABFFDE2F20116A134E2BFBFCD1A4790FA4B723142BB0745C755CFA493C33EF54
+60EACDC2AA25704B648E7A4D03127D49C68F79A3A6E74294CD7BF78C4003209C
+CED18AA524478D46D6286061E69975212175230477A59A6342A684A5955EA108
+98C38DB86533C293B419E2D7E5C4E15DC47BA14478ADF01D466DB7CF41E34196
+4A64
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l049033t.pfa b/lib/fonts/l049033t.pfa
new file mode 100644
index 0000000..1c7e205
--- /dev/null
+++ b/lib/fonts/l049033t.pfa
@@ -0,0 +1,1735 @@
+%!PS-AdobeFont-1.0: LuxiSerif-Oblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Serif Oblique) readonly def
+/FamilyName (Luxi Serif) readonly def
+/Weight (Regular) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch false def
+/UnderlinePosition -30 def
+/UnderlineThickness 60 def
+end readonly def
+/FontName /LuxiSerif-Oblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-207 -211 1088 993} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078993 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D9E5A3EA27312D552EF3BA
+D64EAC97A2E691AD6D6E5E444CB2AB74100E0BBCD168621F404A2C17DAE2055C
+D93986BA853006BC4334F74072DB02FF011FB0F56FA0837770F4DCE07D798EDE
+1F4B52091BA76C81A45FBE15DB5A0D68D7A79A8DEA9E4CDC55A047442208C135
+341BDA8FC13603A79D99D9727F1E4DE02E48C52B5CE6F5562616B4BC9B244567
+46D53ED8EFAFD8C44F4FA1999EFB90044F1C32BC1F17875428F1B9282238D5E5
+F13485FC0BB836C0B07591955B070B64DE596BDBA674A31380AAD2387FDA4077
+F0C99DB67BC7E0D2F4A214F0297085D898A0B1B8F87EA37A22039BAA041A168F
+9A09FBDEF76C808DAB506A14BE209ECEDD52561A881096E9005665CD1F34B5A8
+CAA535FC82F7C2643B07D7A4DDA492AF2B82FF073FC79FCE68FE8BCA2C899AE9
+FD64352D010C7CEC4853C29EE8E9E1CFA01A58A75D91F09D51BE3D56BA37E8EB
+161BB620977C99673D3CD1D0B268F9CE2D8E5B0F95A8091634DE5B63E112F25A
+2D794D375AD81A716DFDDAAC5B40E5E127191A098317223EEE90186101A453B8
+4D60C9C1E5FEA43CBCCFA33DBD3AF962D9E9B6963667C49BD729B73F333BE4BB
+5009B89754383FAFEFBD007839B81AFCAE0661A3237B01B83ED6DF684272E95B
+A01B989947AFEFDD0DCD5E6A67D331EC60BE9B77C6C0586B6C57113D304AF5A5
+07C5766D0B19C4061E59A3EF4041F8E9CA4EFFDE2F48653B5EDBA25DC74FBAC4
+D6736D66890497C37B4DFB51CB2D7B6CDCD1D691548209BF599E149BCA092B1D
+2E8D1203CB0851C714FCD6777BCEBB26318D5C5E2E439C5CB17A93EDC9E48E10
+92166DCA43650ACBA389D3A55D38ED21951504CBD551FC7EAF5D3A8BFD48FFAF
+DB31CA6E7D0E1DDBA18569A6900A20A11A9B4B8B3383900B369A4A1C9859F828
+DC8BBC1BB653F92C1C78D24EB7D3CB97D6F1D5B63E099E68D065A9ABB7228B1D
+B6D17A5C3FC4255972A26B54AF5E9973BAC93A9F5E84220CA34E3C531D23DB43
+50001FC2BF3F62049435BBF3AC2FF0EA43B63EEC52D3AE060018CB3331882A9F
+6B05A69332C5DA24457DF7F2AFBA0FC7E512A28BF6C638FACBFFD54B90CF0768
+E5F2180D31C651B7F58EB26B484955D1156CD7F37BF812224950615DA203E923
+E07250619C784672066E8B36423A83E2BD4970F894AF6F52B2F0A6AA1A85137E
+056051067F2979EDA3EABF13255A3CE018FB7EDC0D3C7458FA67E63AB44F0E7A
+770E2D2A8309285D6B04701A53F44503AE64B9D572560E12B102ABFD762F3988
+AC2B39737A18F9A52A0BD10BE37CF64F5198600DB70B31F6A9DA9FD6B2AE82F0
+C745B5AFD6C2F650D5273516C4130052964AF5349D562BE851E4B604F60789A9
+C673EB95E8873A695BD37549F0C6F1CD390F5DBCD938320A0CBBC22A3CDE08A4
+F8D15B484B34DF6971A54B8F7FB1CF485EE80B16412EEAA55632C6148404D293
+2B574F96BC9405DA846B02C1EF69797A0ACC13E42BAA953827E28F17D57CE611
+683565E3627DC24E3B67D80E2C740E5941431F816F60249DBDE5755BC004157F
+7ADBBA7F7ACF01B405A87382189BF6540E6B53E52F772A05B23462D1E6B11F1D
+8462B8474CE66638DFA39DDC6BB35E06463312D4858418A49C71EDD693348F23
+E3B6C4BAAE2D228D1B45290A316721673C256B03378E998594847503606EE7C1
+5276590ABC466729F36F907A0B37B5F1BC381A115A65DC2B2C5B8439F85901B1
+BBD6EF263820E813F9E4BD65E9A29FFDD9178D22EA74552E22DE6362E465D698
+3795D8FD2487B2A624D5C535063F1B2BB3DEE07E7BA4A5936BB0DFA4377BA2F1
+FE555D347799403EFE551EFF30BE7468A471E902433EFBF02E4784B583B1C255
+BA90095E37CAEA6CBD0BAD59E3B9A14120190846B8AC02B9A6442B78E68BBC0B
+94F8E33387523D672BD366106A4BB62B1CF022364D011CF340BF08021FC70AE1
+D2B4714002FAD60CB843898B731FD401D41C25AC996A864B4848C0DAFFFC7383
+95EA07BCC6A7BD093D1ADB6E3D220AFF5669883F5C01B2820C82E07411488E7F
+66CB3CC2F58D0F867D9370FC82B6D231B37E5E6FF413669ADADF2264586D9E25
+AF180F49B79416618FECFA641018806471B0145DA023FFB1FC61A51D03B86C5E
+4EBEB9F7F5D5182C3075474B9CCE399CA11C9FA17EE469FE0481C253253FC03F
+A4562033ADBC19505B863A444C23F07B048A3DD044E8CD9F0BD77C9459D61FA8
+1AFD906843077AC6F878B099F776C0A4BB5460B3D1F81DC3871F3BD4C8379B08
+8309F47A42D923C153F7581EEC85AB756075CB465CC8F8301AC6D00764992DE9
+E0BF8A4D9C6B4B0EA012216797543DED1CC8AD8D89B277E586B1763F9004583D
+CF1EE2BBA82FF768EFD891834C0CED284F56580A4BBE440839A53F8636B1C99D
+89D65CEA7FCFFB44F9CAC913A52C81728800031F240A502B588F487AAE219D97
+CED1BCD34096FA682B335FF362F87FA6D8A307CB9D796F1700CDFA3D21C5BB66
+FA221D737EAAD02208240E4B882CE67D19AE089380B0FEDAC4F97E7ED7629A20
+C7F8688BE4D5C0AF3326A66C1403E968E8963F4DDE599143D8C57CCF85B7887E
+980D75A2DD2B7AA28202635645D768C7121AC6D6FA7A6DDB06BE3AB1624D36C6
+C0F31E3B9BFED8691709D747DC2550915DE2A2486B7E74DD1665F350D2FFAA8E
+81E8671F67776964ED20C46E2FCD2CF7B3E0B559FD8C9A24C39611E930D0EB7F
+B28FAA043903F3E4A0E3C1856CF7EDFDA670FA030C2A78A99F4FC80207E17A20
+63C316F77D88676C3FB96B680B1A27180087FAA1FB5CBED05EC3BA0CC5566CBF
+496545871367621CC713131BD73F6C37064EF652DB3CF175AE9636ADFFF84259
+25A185AD1F4582845C8D4B095B4F7628F1D44C79FDD16E20638698C2D3AE2797
+04723053FD9ED7D54F2A64C09CA1FC60D3410E42196E42BB914E4C4A04C39599
+51BB33559A9EDDE6FD37E9876659831E92E1FC5FB389E5C89A0D59F792AC9D51
+2A27FD50F713B97D32D83A216241DA10B43928565CFA592C54A4288118B6989C
+8BC97A4A1E3C8EF78B1E17C18B4D36F48067C9746CE3109914324B9FFAB62B27
+603ECA751FE7AABFC5E38DE09BDE9E575EA00E8726C3918DB505D2264A510EFD
+117D3F834DCD09796193CC5D6911FC7BA69DBC8350468534353B20E8EBC077F0
+9CA9090C11E7FB960DF3596125E52411C38A7E5C36F88313F84FEA1916C5FCC9
+BD772A1B9DDD67BD21B117F9F2F00FB7B1EBA1B5DF9CD89CD46E0BFA65199E62
+FB5C7F1557C60A36D87898E8C2BCDEEF99040B45585C0ACAD8E573901AAD634D
+D2F69B4CB22412EDA3C74D5D6098E8BAA1D25A1B78D07FB93A58F84EAB79ADDE
+E84D39DAA5C0E94FE8951AD145AF05E9A2A4432B7BB6E853FE441EAD4DECD57D
+D8E96957622DBF00DF38825C428ADEE495F1CCB5B25F08CCA276DCB042A63CC8
+D610CF464BB435CF4716ABB81A7166EA48CD9855BAD9046C898390441B7435D2
+FFC98669E81324854E750F49F64FD19D69A10A92328F2A4B11DBC02EB1F7CC46
+54FD66F66A32B02C57488F8BB468D73DAB1B3982DF8405BA4F1CEA9C76D10F54
+F5481A0C3DECCF250DF79F6B614B3E7CDC0571E95FC4478A20CDB3E4D4B83ECD
+3C747CE9D175AF8F8E0E435A7D5C498BBD387D9041DBBA0EB62A5035838D7E45
+4B0717C5CC75BEF851558280983D72DEE80A0EC3F685A2467C6D22F4E33C4D6A
+494589594DB320011E40993D0942E3D26B507E61BFA17A3FE55157225468E2BC
+6C63EF000588FF08D4E0F8D244152FC03B35FA6C5F6BAEC28D34F3FDFDBDFB8F
+90DAE0DFD3D284A3E859AA4F79091E373D27C04A82819A2E91AF7736AA070F56
+2429F1077B9F32E7F1700AF99146863A82481D0E78729E9EAEA3C2FFDED364BA
+D88A837491D5A6428294F60C608A3483A2BFA25FE5E0FEA30E984C46E25D98B0
+28B708C01494CF33D00C0174E18E52F9B2EA7F921827505A980BCCDD191E1B8C
+D6BEDFA50F653B88CB0144871B2AE58835B15F7CE53F731CCBDD056672574ED0
+7BEF33FAC905EBCD9D47B82F749B30D14CED4D0907DCF3DFCF0185BA1CBE722C
+49D7186BF7981DFCE6B2679E177569941FCD563FC3B9B75610847279C1A01341
+AD3C35B4752799789DFC7D2A1F5F0DFAF89C498DE1A771DFCBE9816971C5313B
+5AA89B10C8C4094049570C394A837B031BE0A8AED0A74123CCBBCE2DE1671841
+397237C7827A5BC42574E2AD0605F84B77261DD7DEF10EDE93BA9D61FF8174BD
+3BA0A966728BBBAA807DABFC3108209752FCEAD24BEBC8B22603C9E7B158E86E
+8873BB01E6D25A09F5FDFBB6EDD3FAF6C672461644BF76ADFDE82DE718BF11F9
+A75433926E4B37556EF4BE8110D82A385C324DAEC3F37D89434C5EC8CA3286F3
+A0819C04DA7E4E48CEFBA97BCFB6005D3B3DF4A8880D3349FB15EB7A614FCAB6
+806ED53B9BA76C02E89D161E8A880ACE8E4201029C62DF57099634EEFE3FC7C5
+A755374ACCBCA10435F24D5F649EC05D4CBF39150A893984A177ECB0D3956D88
+798954C873DFCE8F57D13D6652CC928E9F80B4B6D47C5CF9B17BF89456C7B91F
+4717C990911E19C595B52D19C4E5DD70AB3183C4165A4217ABCE21EBF6115E53
+8A1774E1A998893F0668FDF637A05178F5F1CC675CFE42E67D56C3365A762FE6
+DB7B670A60C81104B9237F5BE835B38184D56DEFCA72130240A2C543035B4418
+384ECD8189CD5B7966663EC5B42A83406D06210A37C65D02F7C6CDC3C499C574
+4A4E719EB0F14EAF5786A385D9BA4A04D3B7EDCF1BB35D3243264DE8AEA06AA7
+28DEBC7B95023FE76C18E9CE32FBF3AB800F3F8C9FB5211BDCF93469DF59BDD0
+662345D4D57D9A56BAB5A145DCBCE29521E30DE7C6637A812E64253584D66BD3
+83BBDB9B8A1AC464FB53009D543B74F07B234B4E1D523DAB41EEFCD319465AE1
+BEFF3DC939164B65A06C6F60AFC0126E093166A842B40F8C39693AEAE9BCDAC9
+758B1163F4AEB042E8AE1385672B62B161D83CEDD0889080CE8F76900B82F82D
+B84192D470A0C3C80C5E15C1E3ED8FD582825FC18A055C40FAE681E1EC4B16B6
+53A1723815E7D7E8C65553F97D7577859E4E63FD7EA4508825B75FD8FF0F49D8
+03047786DD59110FB7F422C6C625992E86C719F6932ADBA81CBE1C43C63DD43C
+50D79466C8AA5166B8C664D8F6E90F1A807E8EF26A1B69DC6314B72F20A390A2
+98599D640CC42ECD583F6405828CA8408EAEBE5997D15BA79060AD9C8E5FFF57
+8B64D12E6AD37373570EDCD19FFD63951EA8BA780A2D01F1B9670BB636088C3C
+4B1A8706556D8EB05F15B34A549905C330004A66083B88D6D6D3B538B93F7090
+4719658F96F98FA64F2D8773ED8BA488CDA55ED6D75AD2B8E9AF47AC86FC2FB8
+29CF1A792379143993D9E20240DCA56D3E7EFEA9466B0138175CDF149DBB6872
+565A8D48C7233A6AE4780373014CC5CD045CA08EB63631A50B8C05AA893A6128
+FAAFFAE38FC5C81D9320B116864DAEA14ECBF347953510B494993E459483D0E7
+7699A329D0EF527230463543C583EDD4D5C05CE0E81D1A51723300EA987314B2
+3352F4D19439CB60D500EBDDE5B3A293D4771A4AA137E76DF5688C50A65258EC
+DD90D1060DB86A881F858ED21DE81E407FE74E9904E98BF659282B89D9ED0240
+535995B68AEA47B05601AC9BEF4735CF94BD905324CE61374AA17FC0AB3CE14D
+23D28C1DDB70E9EB283ECBF96BC601C7B16810C46D996DEE582A41C995208793
+F88378EA764446F9AF8939AF830CC14D62345B40264362CAC8DA7D59953FC1EA
+6DDCF2142D534C0D3C3EA587503BDF46F76C459772A60C5CC4716235B0EE1576
+690C4F6E9D1C6825253BDB9CE0C710D1F0BAD5193878AF0D3EE7D51D54C7E0FA
+AFC54104158E7D0B6B9F7F83E7371AF8D278D861B91974135818DB29D89F1501
+A00CE9CCCA2662A93B447E9A5EBA74A719C811598CB09AA94CEE7D9EE8880967
+443D806099915D25D63021B4E57F359AC43911D42E07F6E8E3CBEC19B6C0496A
+24C383E14E8CC8B664EDA0248B047951DFAF98D8D8F2FB531FC408FC123606ED
+86788DBD7D42DA61B976B263685297224FEE5BBD981C5A45194046016A8B26E6
+F54EE7FD496AC4DEFA514BDA54EABDF41F1619C4E533363C5CF5914B25890331
+9A7F821F784004AEE9D10D4B47F75D0531F80AE71097B4DDE3B8BBD360EE2727
+3892959E0C7480895DDFE0A8999E18302F60979F5B2FC794F5AAEE205BE8FDB8
+84684F7B35DD6F88CF8C5AD2B982E6EFACCBBB7A4700A67CE00998252AD0B287
+E20D5AFA935A49B1ED106E71FA16355F1A54D64E0F8D2545D98FD99690C40B96
+1A9162AD79EBB7B613A015EF486FC56F2EEA41FA772EDA87137606EEBDB64E04
+E24856C6E819063B2CE246F7223C6330A36D624A597707D2385F43CC17D529AE
+4997634BA6BC9090AB520E2C45EB729612B12F9D3FD91DC4C9EE74CFC552E56C
+4D672D1306407D690974E5B3DE86C7EFE946DC7ACA248718FE3B2F699E01CEF2
+B70DCFB81F24AA2A2C220E14006B8D6E09C5101F6724E9D75BA1F465E211B1D5
+177E9F83AAC3F0DF18EB7454E61F76CB700DD59D8ABB42B1AEE8FD5565F85D70
+240B724E6D3C5935D8F42638DC82D9773CA3B78954ED6533F1D0BBAF1BCACBF8
+E0CDF3032CE880780EE8F56AC2182A46A319798C9C60D398BE16E654490428B5
+A480805FD3E59D75A2E154C1016D210D4DD3E11639E9F2AE510694FE5F7D9733
+F594EBB8A17B5A2A2471C571D481E8C04D072511753927376F97F1E3009D3B31
+ABCD1C6DE64D19D471E39E7FABFD7978ECFA08E611A9932EAB8AFC7A4A1AB516
+6315B8363C62D112A9FCE8489156E6164BE073C1FA98E9D55E975B86ACD9CC87
+03542B3B79EACDDC0F525ADF9922868CF31F3D83D1E392ADF522E46D9E71EDF5
+25C3FF53ACCB292A8604CC32E8B3051AC8BBACD05948612D337DED7C027E4EB8
+F5ED77D4966D1A6B32722613F9BE146E5D7A61ACEEC0B8472E95B4E8266DB146
+8B1991DFEC19482C9E1D4058016E0EE9B2545B07CB4810F564B10D0EA86BD066
+41F027E003DEC79F80D11E9452035B4093FDB920B535C18EF20305534855287F
+DCECDAD9A1CBCD79CCADBAB8F3B55B0E59001E587A81B5D02EE45FC1672C411E
+FBEB21598F9FFCD05C55AAAA281AACA5193DA116B1F46ACB96F728D40476BD89
+542BD47C984849AB998D6DA2AF989EC1BB9A26F4361C610919969F7DA2771B7B
+055F44BF8DED74CDD91CA5609918ED52354ABEFF2DA73C1DE643FA90FE4FF2B3
+830743AB648D2A108FF8CBBEEC1DCB62A71490A6D574AB2C36792CC00CE631D1
+984014A7B9508C3FC71CEEDD417F6E31F5BBC6F1FC0AE55155F9D56A1AA196C3
+A696F91CDEA58317BE9E8B37F112E6076C765B1C25F0CC6F671428C91A57C63A
+1A69F5931B1875664D489A65698A2BCD637965FA5001F2AAE617BD5AE2DF9B9D
+0E230D097AEBEA7551245B5F6B4D98EBB1DD23C6ACBE887FAB49E9F271051F15
+E6EE147FA3B91FCBB5F0D571D69E1C942BAD057F13E4D44B4C3BCDA1A34B4A1B
+FC1B3938C1A20FF5F3C2F479FA651F015C4BB08BC019A692462F15CF9DA72D1B
+04DB4C99E145218840246E4337700D009123F528AB89469B888C9DFA38E032B2
+7E2256BFB68648EB06197B1DA3F73AE3DBF313A8C661499CC0693C8D3557F0EE
+B9479448E1A85B014F1D178C6BE2B625EE25EB51CDC71B9510793AA5D823CF6D
+7328E54584076DF26B858C9836077C4A2381F4A6EE19F4E801772C0DBA42508A
+3D92EA34CD0921CDD2C56A1D9ACEC3CEB200626FE3CAF033E24800DBD51E6C82
+FA0F7E37F3DA97A83227358C5B20549859645E819C193B303A957229F66896EB
+225922A128B1333C3AC8C616D348C1FE225DE03782E6E5719F13DB747D0846E9
+C3C66728C9099069DEF69A4F254188C46177757DEACB597E8CEDE41658FA405D
+921E8F71F91F455C0A11B8B517BEE363690C14FBB31232239F5A095CBFC7941A
+95815705868B3BE129F81BEE586F90983A28C04543E049BE4A6CB0EDC3EF4929
+D2499DD08DF2A3BCC55CAF2AEB42695A8016A4A1A52D4688AE0C4867363AFA12
+3EED7AF3200320C1EA166FBE2A42BE3157AB633610FAF827666C239F5E6310EF
+BBC01419156AB3022DC29B5C64E8F676150AB1A5CB91AE6E9453A60A5A24607D
+AC7F2B5790429364E4E6BC6F3731610769EA645101C3329C77CC30D7E7742FA9
+6E47A1F4A95E5B9A9DF448B03C764390C74B6CE38FD8A43E0FD49B19E5508491
+4A47FDA43F186BDECD6D9FD0F1D592FE384F09D4415EA6FB9AAD57F11465E56B
+CC7CF0F78A498F3B63985EE28F4E18557DB38101282E3FF5827569B33DE8510D
+9ACB69C2D3F13D791A4E095B77A92081D8943E3027F6A8AE7DF75A8946CBCC5D
+D397485BF27B974A5708AB8C06AF9B9C695725B49D670891EB0C87A4B650F117
+381EDC200C8172A35F37542F207FEFE29ED8337427230C2B16536FAC2C89B550
+6F714AC7D8870775AB79A072355DE4A5B4D1B4520FF18D626A8BD3F6BEA2A17A
+8EA40E7A82494F7C063830B6B81779212BE325569F482C0239E11CAD51B49207
+012F36787400AEED36BC61A6DA3B497E86D4BE1E849E577C89A72EF77A6E252E
+153E83DBBBE61BD4AE74D470F8A729E385628C9B60D12A999C345C19348A0F95
+6EE4379A54C267466537316ED4BC409483351B747C91241C1CF777B72491D418
+8BD37616222529F07681FE0F43B3ADA4847A612C7C56B5B32D8011D13A9DC226
+116C53C017F2E54C5D2EAB0047BC9B01A9A414D2EF9F51D9E9861615CFD729B4
+FCADE9B5C9EEC3D84C9F97B2528CDE18C4B461FD56A5327771C977B13E967091
+B8B375C0E7A63D93681104AA2D00161D1A9FC91457DEAB8114A9EA93EF9AC7CD
+B292CA7EB423DF2EA9183A267953D4B431A5C532B26B12A4D2D681804DB2A908
+4E15E30372E42740E3E04E044BB9E97252B95A7BEE944E3840A4E9A327ECD640
+38194D75C20F80497DB572929D7B1DE23C5150A242A5D042988C83F39BB55958
+E3BFAEC4582969F5690715B30A44B6CFBF33DF363400A52191EB2BBCC599F2B2
+F4FABAE2BADBA0731D59F1B2E43C97769BFD3B9CD210018080BB38A06DE7A42B
+D717CFA65D48118E5FFB29C2DC85E1D3068261EA15CD6F851C4DE7FBE2D6B4C7
+A6EB8752F6B4BF9C5DFB7C3282D56FD0E1036F3D74C2A96B4D308D91C1D83F93
+E59BB92411EE3CFA1169E5C92A94A32CBAEC1B570CC34F14B1810C1144283402
+F6021537D75F7B98DA7459921CAF5DE5323C1C1400C79B1E9BAFE971F7F21268
+4AC50D4D0DEF6E15F2DCB9541C04FE993AF7982AE5F9C4C6CBCA302B76EA1A6F
+DFC4D325A8CBF550FFA5D9298B4DC9D016A66FC44D3ACD5F26C980F61AC2A49E
+B738EFA01CFA1ACC7F251E87195F70385CC3B19D3D7701CDF9E4CD52FAB6AC67
+C86FEAA4A793FBA499A7601F95F9F934495FE5AF5EC8CCB8F1C061E9733EC0C4
+845364B1F0A232EAF557C293EE11704617B82DB310FB50B152A711EDAA13182F
+6AB5B07064C07CCEBCB7ED57669150C74A2E72E95CB979EB18E439D8C2C55C23
+3A66A30F43B2C40B939592405EACE804CF149A667DD795016439668BF538913D
+A46FE03F8A45B348EFB1F5A454BD392390225351099E12068DBD8EFC37365FB2
+899734B4D85E0AD8D98F18EDB76389713CE43C0DD27D4E0AD99BD3CED8359325
+CDFFB957B75D05325AF1FE0532260F41AD9C37E5533019AD8ED57A1D7214A0B7
+FE158F9A5DB18CBDB2CEF1829C6DC6CDE3A14D2E7BE72648EE28C088EE03CD66
+EEE9C566F8380473199F069C73C621C8A8FA0A3E606730A2A6E3B0C72C09B0AF
+46803CA2D1134E117D38C827AB65BE4F5F8B1E43F1294E07C38924243796B797
+4F27F3124FFEB4609518D629C0FCCDF235363A523C0F6AC3D37BCEB1DCD10231
+6ED57B4137242BBAD3F625CB0D79AF1A46DFD85232CC90F5EAB36E950CC5D7FC
+345A443B7F1CCF0028A6759F37F7356EBEC1B1271FA22BB0A72DE74EED1F8E5C
+C9A20D9D2115C7FEA8EC01F15FA28A2F4537A3C21EF9A168017327BC03FB37EE
+FA1E0ED6BD673F79CC1DC21B88C26550A14AEEEBDDB1E61CCC504157E461E29C
+7BDB3D919A2986B5EC8EB2D732B0B4BFF561DAA1E9618CD256E219C4DE36B69F
+4B6DFCF81B78F00D14145F21FFE675850CDDB32D499BDFBC1EC0D35787225CD3
+DEDD89FDAEE89501C4E5850F06BD948E95FAA06BFD2556BDB16259D19086598D
+DA982F4D7593DC56130F818CB25DD92F2388520E730C8B3ACA4E03A3CF8CF205
+FFCF113E4278F0B5869E37AF3460C9BD1DE520D277AE1A09F85E276D6F16D7DE
+C04E12DA6EB6FEE8F9285E888ECA6B408A8EE929ED51F5A7CAF5FF5F87579604
+889BFC328A4E43D308DF7B6F89C059DBDD4458D521A4FFD66E8339D883E1B7D5
+951E32532F60D1B75845DAE58332BDDE7A72A8FAD548E31202130EE23E730ABE
+C9007226F3C24AD929158D6A266A045C715B293A3D7E8447CBE6062BFEBD7956
+9088865031AD88B5329D104969A1FAD918F828208B743B650ABA1F345D9D6227
+5E4AF25448CCBB425DAE77E2CB9B73C73E0247C3DBE67F7BC3401433DBE53E08
+561295690C9F93A07D10093DC2AE953174ACA5358B40F3BA9DCF0710C49976A3
+C482B698FA107B25B246789B91473B63B4C9396997BBE4C8A5821E9F6C48598F
+41FBEBA01C031E5B3107A5D20839907D62D51F721ABD116A40692084A06818D6
+19470FE3BF24062BA7E62A27841DDC319496790E027DBCD4EB1B87810F936D5A
+D33212E5CD654BDF7E245D04A555640DBD89A6A998A6A2377CA8AC615734035E
+44ACD5BCBDAF14DD345D8D6B8A34AE91A6AFA2A7FE4B09761A732DB70692691C
+774659E2768D84943091417976A6ABE11095605C8269813BB4811F0F47A8F669
+34E3168FA6A02E4DA5335ECFFC0077F7D3D4573BFDE1D22E5FC066AB27579763
+422F27362794478CA59D87E9B4049F7CCBF47854774BE273A6B6F0638F897E92
+741F3144F7BDAC4010929BD605D3C52234F5EAA239A68FA7C52CE2B184538C06
+E0A90BE79DD5FDAD372D95213E30F9C2A999E21F598BDEAF6315F5C3BCDD6044
+92733C0B012F610C25E146CB6F17AA6CBDCA88116E7B551B3B882179441E0568
+852F3E714BAFDE7ABDB93BBA3F1C04E4FFE87D786B38CDE07FC9797AE301F3BC
+70013745A652EA5A8DB0265E846BE240D4A456E3B1953553D1D36781FBF11C50
+90C2236FC2CAECBC91C0FC04FC9F3B86BA31684BE56309027044EDAC9997EC57
+247D28A677AEE4B0844EEC683A2227969EF18F52D1E9C926569AFB482CC0C475
+E0217037378CFF3B701A798074AE248751A7DDA18EC1138BEB5E57FFED63B920
+D9BE59FE503DD1EE2909A7FDE826B40A419CB0089C91D6A134EAC709CAC514CD
+DA21620C37994A81709C97314C1A09BA6AF7206122BC143310CF7D9CDE96AFFD
+ABF6B7400862212ED910F90C9E9B90BA2F7AE0364472576AE09C193D7F327016
+D9C68AF2F55C13FE4AB71C2B4C7D9A9A58AA097B69447DFCD98219A2998BDA74
+00807ADFFF265B30D1A9A2D967856C911A15D89A147016F70099D7AA84E661A3
+64EE3A3E379ACF29DDE519099453FF94441B19405D7C873F6DDCAB0EA55E8271
+ABF2B29FE36B9D3B2461D01DEDDEA93EE39BA85B6424D70A72AA4B05B19B6D42
+D46298C7D23E94A88FACA6D476DC37E379F537B80454A61678262B39B84E0530
+F21082CD5EA2D11623EBB27340297A0311BC422690758E11E6A2D14668C3FED6
+FF932118DCFBB0E4E8B723A2EB58367A96B16B9E3E466F9ABBD458C866CEB4EB
+D326D8BBAC28163105F537220F240FFCDB3CC8D35F60AEF379B3679ACF3F86A3
+C0E32746EA9F67C084B2A80866DC1564CD4118E13D0E3842B623191E849EBD64
+8E89ED9377F700D60B0FB5A4248156A1D5E8400C21A2EF623730FE9530382652
+705E3C9228D9963BE6AA380A98574C52EB657B6F2E142AF3F0250FE04EA1E913
+BF95A78EC7A6A68FFFE15FE8128F3EAEFD692A17CA5F779C705FD1896B1C9BE2
+09E8D23F3BE13C3761DCAC7D89679EB558BFE8BF9A03B30D8790B7247E0C094A
+A0E14581C633C41987F33D225F9ABE5E1547310A2F2C755CF580485D7328E451
+95D7C240A674262ADFE530034D164B066204358E87699216995BEDF3C437A77A
+6D9DEAA3B088DBE3C510FAF44F92D11A9795B81682F992318675B181532BAD48
+7C30BFF33FFC7B0D756EB2FF171DD0FB853178FDB08A48418A8494C4538D8300
+50A48E926152E47B225932AA491D20754B115C867C40930F85ECF5D82F43FD4A
+E1FB09A16485AA8DE8481E2344C8BD2EC4C3EE82BDBD4EF12B793B74454BEB72
+10DE166D7941C0AE41D9822B8B1A5BFF31A411A95321D4B3F81922E711C2C594
+7C8D17D535A289F32F573F5435EF81F7A6E15D2A27E6020CA9602DCE96520A5E
+91043C649E41950750AC2B991524FE956D3A5AD964D1313C2EA55D4B5355F7D0
+49C8838BBF2C970A150F272805E66AAE44582A5840D7F0E206D82A411E7BFDCD
+8C52A9BE758D312192DDC8FF3C4B3900879307282815E4BF9511AA1810509CF7
+14AA4025436A8E20702E2BBE02E0060C875D1B25FA984A3165B00F5CB82962C6
+6D2C2B594AC551828A416536FB02BCD49090FA6C7AB58AD771D02F6895374768
+4FCFE729D2827DF513E1C60E4716CC859E4D87B049ECC8986B68E7E5C0FD1C04
+AF1DA089D0FB03897D48E7D4F2277B8AEAD3A24147D0936C54D487B434C48B19
+E38A0109C9CB131359FB2FE6DBEBDF180CA8C12C2ABCCB46931C662DB2D3DB5C
+0CCBDB6F00EC033C9F923DBBAAAC0BBBF4A35ABA8F2D4AE7F868213721F10D51
+42BABD11720505345566C5E2594867DE91E81DE20709BAC6888CF96B4728E2DA
+9CB5032F3FA434B95F6E55F484E1570565C0424087D1FE65A7BA94459FDECB20
+02A522FE8ED23D6EBB943F185E966F7F027C183AB1127A0A7EE43A9EFB4A127B
+43FCE7527CA6D3C753626DD9D35137B7BEFB4D0C7A0428D6E12512E63BA0B82A
+D8E22C7D40477131568FD5B9E01F4C23022190578DF4B596FCAE21A6CAC7D573
+BAF887E02FD103350C0C6483732E94B507718B8A9A378DF180A41EC67BDA506E
+4D8FB98046D97A626284261FF30F456D211D5C384A16887706B8C659B2281B9E
+AD07F74DC327C12AD6B828AB0CB757A83BD9D135BD0799B5F8969F5E00DBADE8
+5A8D191228CB014330CF17720C5C2B8564BF78F396B9F518F96A92CE80D9D64A
+4DE45FA6DB005EC8CAFC6C997E9F3B1688BAE40F0FA54A7F5E9B7AB6664F2E94
+1A653398F4B3E45854D3EF1789E8F769BA3816D5EF896A997FB64E0A8D06365A
+ADF839A43899B0FD2411D851E273B4B0BFB5A1174AD6D0CEB05915F1A8229547
+F9220EF578AA6A561D949B48D1B6185F2058F800BBD758317E4D555869BDE73A
+A5B130A31718C787A4302B76297F94C503A442412CD263F5510A39E6F9494664
+724329E58CF259950CD1579297B9956BB9435B6D44801C058E28DA4911C19CB5
+368397D382C4C6BED80E1AC6CB7716E9C83CBACB87173CAF0A7B56A657BBCEE2
+8D252EFC0FF59ADAFC582146D2074BC71A3BC55D2B6694842C0AC9DE6FC0BA58
+C67AA00F8BE31EF69343479C04F1E4718A99EDEF7C54EA07F6FDB1673B515CB7
+90BD510B6915016564A3C69C7DD10D2896C21E1893C441243AC3D3223F878DB3
+D98A58573D71008F7B5A574AE8AFF1D9BE4BDFA755459A0AFA87EB60BA40E9E3
+86ACE3DC9C8C83CB780B705390EF58C22AD86E3AF8AE9EC7B098E3A4CB7A20C2
+364844C91C9B092F3C80E5F0C0875C87CAB85005893837D2A84288F50F595A2A
+C6F7524DA556249A48B1D6E407AAECEC725E46A22EB1B0CB8A03D1C853396D14
+8135A883BF18DF240F8B19CB176B064E685B60B93B16C74B6E988AA18E610FC0
+150AE778A8AC1043B75F43D477BD8B5EFF5BEBE679AE42571C7A8974CF07F55D
+1FDBE94C2B83D8D50C6B1FB66178051BF1C42EB489C0EBC39DE09549DADFC50C
+8140F04C4D065549800E1DCCFE65BF708B09D177C19D3AB5AEC42DD4CB645A7E
+C52A360D67920A2F379DF0796DB1D31B2BB681E759279CB093F545262152EF1A
+EBC19FAB38F4649CE126E4051AC6258C6C301A2285DEE5605FA2B337356E0B36
+2D927CB3361B895447EE897BADC86B875E28679DAA7A23C71590BA5F59BE94B1
+18670F3934CD9A3402A4C8A154EF6A8C9A0238F2F2BA7C4CC5C8CBB774923CC1
+2F12543FECCB1635680275A48309AA322D43CDA5109EE8E6E7E8472EF199785D
+9E84A5D50E433A860494349B55CF38808CB51851F21281959CE4A43781AE9250
+54011F5849FD5B45940616AC942483A87C1165D191B856C9D8479501E9A59E8C
+13B9FBF1083FA716AB4D7FC885186C551085354D17684BB7B0F0E9EB9C4A1205
+3383639CED121ED2BDB7A52356806A46954A06C00894DC228F22E704FA3E30B9
+204B85BADD5411B313F7FD01E02FC927682DF3E8EB3BD0EAF002448154C8DAA9
+8B2691D0AF9A6E6DB9DFEF0FAA136AE9A99EEF6F3A9B55EF49C85A083EC02514
+05C8B5D5FE8A273C8FD656ED257F11D49504F91CBA6933DA45AE47F7AA3013CD
+23825CD92D445B052A383CCE81EFC50927C94D9C1C29D6EF54E5BE20D876A751
+32339988D4D440EB7561E5B90F4EA7586010566272E81FA73289981CB2166E79
+4FB33F7CA98FD016ED602C78529173B3B976F11A9CA86437F942ED0AA26B5EDD
+D089AFCA5E3285B85D390031D1A942BE38B826BA08E36E6A275C87DC5477FC15
+1ACCA330651DD43750D3B0332C55197D91345D491DF96764DE969F55E6612354
+A540402879BE16BB2A08E45EA16DDF58645B86F3884E5A2669DA970E01156162
+D74A3AC0104DCF86C11C4F19236C586FE659844F0200868570BB4BCE1B529C2C
+A216F27DD9EC638F671B049CBA7F96D0DC3402478CC833E3CE19D4B42C1FF119
+39268958A932BCAF36DC99B83061149B18C800E4196291DAA2E5D6983353EC41
+966F9303327A7DDA28D041555320E4B3B5DEBAD49CBC043DF4D92C2E5F82F3E8
+5C79AAA7C3B9CAFD96A39F58914D24E1B815EA03B238FF763763DBE885E8AD8A
+C58A31E220ED192C61D9E1F3C5C13730744A2343B9BE703EDAEB42C9A53B0CA9
+BE6910779D1F94BB4789D3611A1D51F555448B8661249459CA515AFD0640D3CE
+A564907F819B3752DFDD134FC5978398AF0C57B969D5B24A92CF99F2A0DFC447
+751F988B3AC1E5E55382673EDEB9CBCDB9825E7998F332A04EEA0BD207143EFD
+BA2A4EDAFB487EACF8B4753A7343915C0EED8E9831BDD37BE699F32F0D09206B
+FF1CE2BFEC49DEBD085733DAEB2720E03CC19A8B995FD2FFAE293C720A59DE13
+D7181515582AF67F9B51A1F8531A5B0A63BBCE4BB6146DAA1CD4281CD4166F38
+012F72EBD053D5DB3D2AF3D84EF7B38EC4E6845395395DC12F97526437F7B839
+F6633DC3CBAEC03D5391314E6C2B94B8392B1848527544E28F808A50CFE94745
+B6C2E7BEB710279420E2284F37657B59248DDE57C149E34BD2B9BF6F41207188
+22D28A609D2EFEC2F04B22DA370761E1C8FB04A7A132A157F25593FBF6A62F88
+4697C4E6C2E70B57443D08F5FAD9DB2AB398D2C47B039573C85546FCDBCBB5FB
+453B9CC6D93DDA6D58B495099B5D204AC291074CDF0319957383AD958390FD8E
+BF768029B92022E9E7CD009620AB491330B8270FB8B94202C94E41397357167F
+5BD8BBEA013F3278EA0A1EA4A6CB25527C92F5BF9A2F67A38FF2488B09C89B8E
+A5BBAF61E672FECFF5511AA05A3AE001463483D86B60C7E61939FDF6306093C5
+E621F084D993ED0D4ADD7F58F9D0FD05932E2E4DF4C2CEB1B0401F6254DD0899
+B87E41C1CAA87981E7E2E94BEF85F5FF3C260710408B536EDAF78189E816F2FF
+2ABA6F132830117F95DFE7C0CFD740E20826E875DAE1F6E7AE8333B1C20ADF8B
+B882B45CCEC42A6EA5F2A50F100987D50A1F8E5FA9C00AE132D77740F48B6D3B
+E6E12B534A97663A3695491CF4E42E66DA66FB2EC1531AB292E3D8238BDEEBE9
+DBBBABA1498310DCE5B1B7B99464C463637218A766F1B731CCDB17AB17F4FBEF
+47E7FF5962EAAF1320C667A645E25FBFEE4D882DDF31C9785628D32988F00F4D
+87FF88DBCD2370661F85A16B82125D753CD02688FFF8FCC59D318EDEB5E56010
+16BFB2A8E8A151898F548C6C69BD17857F6427DB8102711103BDB2BD1C0A8F63
+31A1167EFF41E0E5B814AEBD022E941109E8BE0987FD33EDBBDDD203A18A3FAB
+2A720481F15233739E1E882A191ACA4B051BF6549A0FE597041B33DFA55BC396
+A3D200D46DEB2071C756FC050132CF58BC768224387C4B53F646EF9972266FDC
+210F24A85881F5EFCA127055FB69324B377802CC1CEF29C1A5D1C894337D0ADF
+7B5EAB50B40D91D3B0A2C3698D1603FE27CAB713502ECC3BE3A543802BB18627
+1F3148A1F9F31C8905205B6348E39498BE0E24B558ED3D061CC47D7544FB10CA
+EE4B5F5FC8161C9A341AC7CDC83F9D506AD6704554A31D20C26DBA17B6F011DD
+71232C8BB6C1EC2993160ED28B5C15A330FC1EB37FDB83C2B7FF9857138A1F75
+3D91CEB5BFC8CE44159EC17B0462D274D75C4EA3C7A519067B8B817A9C6E63C0
+33989FAB825455369FA87EB7BBC8E80A9387E0772B22B2AE50A2EBCBD0E087A8
+18026C8BE1110F88E341751A56DE4D00B3EFC3207488097453DA8FCFA4A551E5
+5CC41FF1571C73BC0FD6ABC360E406713DA218331CA552B23B33F5C689DD2356
+17D4A4AB5E0983DBA0287557E477CBEA196CC9D04D7F101AF7D15EB52A3B8F9B
+0BAB6EAFE12C85DC36A106DBA34997E9C669DBA7F2FADBE2DA80725736E5D681
+9E03E69A866ECDFB07FF17E0BA3F9270C633C1E8FA8C259DAA9407A9C8EA2208
+E0B22230BF8A84CA23386B55C5DD8E5DF685541A0BF372FB76C9F65835B339A3
+74E10EFDDF2E84872899B3C2ED02BBBD466EF25660E416575F8D01B6A191AFFA
+51897804456707B70534647A4C09D849309102336B5D6F66CC544B2A37E1D8A2
+01F71DEDB222D2A42D74C99B14C8E834F831BC6BDD4348A514D35B666CA56ED2
+D93BABAEF353159474732E67F45199411CF000C7D4B1AB7BB569DC5F3F9EB893
+13FF595AD8F1A41B50CDDA27778C68BEFDE28CC79AB8B94377919B318E32F7B4
+7B3850320E1509452AA99F6F65E1C5C79CF67B4753528D07DD8BCAABC5BCCDA4
+76759D0343C3D4566270EC7F2665BB459A9FBB81A85F7343A5E14C7B7D262072
+FC37886F1CCC8F17DC5122F4978DB35E157310E6C355414DF6CC4532BEA621F2
+14426EEF4D7BCA2BD46419AF7E01B659F04F3C663FD10B4F09EF9F9ADB946319
+EF6C61A97667B2898256575DC116363B892DC5509652A1166C3D235A0CFF2135
+60675E209ACC3E057A38BD343EA5C01DAA61AFA53584C3E76C24212FD2DB65E9
+B2D99F97874228101DD2F38D85AB8E394B0C93076AE8310A6370BD12074EED63
+39C6160DFB49AE01E384825CABE01674B9AD61FB7EE61BBEF839C40E0B9E1081
+5F50BF8BDB6244230F2C06C421847031E5378874BC3CEED207DF0DA572FB92A9
+24C312CC4FEBE8AC67117837A6689B9A4C1CF677EE4B74BC60C12C3796FC5D3B
+259907D399538B1E207BA2170472980AD2713092513D67D8A475410884883A96
+176D772793DD06855DEDADE128239C387D36CD8DB2E1D3174102BFD70BF8B2E1
+7F68744226293C8CD39C99D939EB6A4E635C19929FBA4D49B3F576B53FCF7257
+EADBA531A9316496118352BFEEAB3862370148E1A20E07D93C7958EA113DC037
+5A99A7C8658CE77F01C1B769618205E86D966F5D0F3A276732CBA6800576B5C5
+F31E739B709D75526F32B6E796E7F659AB80AB86A3986742441EB99B8EA3614D
+880F9F37671E5BC3F8CE19B38EA6EE0693CECA57A6D7158EDCEBBECC70E1E429
+C1CBCD515EDC5AD996E877CA88B290E342D82F56ACAD5465790A46DDB20C5D81
+9C70A24BFEAA39A9155532380036451E1CB48ED7B7DBCCB686BF9A32041072F3
+3879D310C2E50A6646271800B2422E0C29974D6A02337B2BE484CA0D266F8F0D
+5B5E13C2595509B03FC95C8E37A20BC8FCF0A4B6CB6AD6C1F9FAFA02BA37B969
+2E0E8036EAE531074039D62ADDCB67F7A28B1815C04EB22F8234EAE30E773A54
+5F04842B429034472097D2852282BD77A39101904B505825616B09A9F5BC1377
+678FCBBF4689E4A980A46C83AB17E2AE5C222BE8A967D448AA9492C106D259F4
+17B5AC04797F36B2BBFF569CB8F0E48CE727F7741A1B57A71655E77736CE6D26
+4A6B86E078016BAE886E069F6FD040315C89C3A441EE0A92EBFDB02D81AD44DF
+F4F29AEFE0390448CE106B5A23143E9C34DC75C157C759CBCCF87E47CFEC0C03
+3148060FCDFFCD94B034DCB302FE796F06649C209DE276FC313D6A10189862B7
+D1C21075D80C30BA1F21AF907F0A9F38BD87F485F9DF469C8C9A9ADBB85F3679
+9839E5403BD31457AB9DB726DAC9CFF72EE7C3DFB0DA829DD28F50701FFD3B3D
+7203F36E2E5142A210B695BFAEE814274CBA880DDEFDEE86FC499D203FD205E5
+6A11E5571369718AD1E56508C161A48A059098E7FF3D2BD0898A17F591635391
+B81544B0FF21B57B5D6507F57EFEB2DEC894970513304FADF02D78747E900164
+56C90030E3E8F2D728128C19410E0D2CC1A34257F371A856D0B5DED3C887DCB9
+76C65ACCEC3089352636F977026767AF681F829435E68124FDC3F4F22C1A18EE
+9501478B1627E6E8C9E0F0737107EF242AC54676AB4F632DFB1FD1DE937EC35C
+64A0E35DB72A5B524449F65AE9054EEB9315971A43A48A12B82B81258D355979
+F50E3F34B4BF541FB2FE7B31190705BF86D1B7DDE8B8CF9433A6474A0B82CA9F
+03ECA76DDE98DCC703EC6ECAA8589374B9B58C648D0B644D652EE872CFA2B9F4
+767DBC4D8DDD8E69172D8FC9E12D4A30380EFDBAF3C0210B881F1069D17456F0
+B6F4A005A1E9F8B5C673A91F52FE95FB8BE9DCCF76465BDC26BC7C29FD2D13D9
+EE86AC85C3F1526FD495A120FBD5AAC5238AB1AD736206128ED0D1755A5F7098
+8B91636223E9666726FB36AAA4B02C3FC1E37CDA969175596B571B7D792EE705
+F72DBC6BB24E6D5E592AAF9B9D6CCC2469C389D25549A1E9FFC3B549C12BB96B
+66299ECA3C0E9E2AE6DDD699E07A59593F8DD214897C22214C7300A517F7CD1E
+D2144B07851F5E38E70886C9F06AD8CE90C35BBD91334EDE8A627735A4E8AFB4
+843D624A11113B8EBA95B1C55452D5A1D1E37532DFE8004F021A919AC07C5906
+090BB1AE3AD8B590686265C5E73FA528D9DCD44CABC78A392967031A08E12F7D
+5E70778013B30559D74E4C6BA2B551500CF1071B722234DE8B4F6EBABA2988E9
+B67E527FFA26B606977B273B6555CD0B9DDDB4913B1D233933B1ACBD74EB59AB
+BAD67D6047E712C4C144EC5EDC74F53D94A790806FACBAA02E7E2F3CFA6CDA93
+F337ADE914C9DC9937CE95F823931CCA1DFD7B2BB3B4E057EDEC6373F8B6E3A2
+2F547929D2083E6795A032AC0E892EA1E4DE0F5A97785B067CBF04C86BFB4B1A
+911BD9E498A3C3E11BCF09EA0CB1AEB8B966C7504AC1FA2765D172E0A026F215
+4BB374CF5AF876BB152546EA55BAD5E3ED4504AB544200A703EAC71DCEA9F09F
+B64AD56380576FE8F72C4147AF39BC522C9B13E8DBC11EEE1B216FA638604D49
+5A5417B6B9BB23A006983E01BF51884024AB44C8A0426FE01A1428E70478DD8F
+EEA0EF6474E3F999F3F0BDA5B3C2368A618238706D1B4732E6E24368AEA068E9
+1345142CBD56044541347286877D92CDB2E42426F59D405791E7A17019260769
+0A0BF66417658C49261985D15092EA239DCDBFAB358B37FA22D6C91E34EFAFEF
+824D6FECF0BDAA2C2FFB1ED169266318AFCA0509EDDC9F9F41C5ECB18A2C2BFC
+824F82D4FECA753CD4A07A11BBF92A19525031F8A01AE2D2DA04611C4DB764B9
+39DF94E9FD03F0074840DD609F1058BC2FD065828FB587D38C8447EFF2FD999A
+341E1F3201504B3123E7B19DA117BE5648B03E7964F6652148EBBCBDB3B5F167
+0187A61C00EDBA395538CD1C92D2C0AA9AD68A2BC0881E8F2A025E763B0C0EE2
+3E3E8A9E02DB95BCF2326CF8C9AEB14BDE8288D8992EF921A947970657F605C9
+E0B90DB7C5D16EC535F5830FAE43BE9488203705041635645A2A958A04FBE6AA
+47CA6AE7952B5C944734178C9B86015C9D440C6D1A2D45834CDAAC19120EA2C9
+13C2790137B35075012779BE0249EEE679FFB95FBD04030845803CB299080F51
+BFA09748A6708C48964052C7D8502433AB1777EC4328140F7784DE3614C5024B
+5351C63AE6DC3C064E126335F968067DE981706B3E907EFA1A73537F0B268E33
+521AF616B2B6EDCFA9B0FAB31B7AE7DC3A870D1968D0D4D1466AA7C923A923C4
+F86B6F4692B6B637322297221C69EEA47E9D7B46E726EE2FB8BD9866153BB505
+C1ADFB6545B6EC4E3ECE12EAD2B0CF05A0EC1CA8188991E90E3BD7151C234F11
+0EE146C0B9383B1FEA8C66D140EF9B4CECDD3B92C3E2633A0F6218D42A60CBB1
+01375E99A55510B06E4C307A91986A70AC40F11BAADABFEFF1E2D11AC9F791C4
+4AAB4546C037AC8200216F73E2626060D3817596C588D86D2E1105C0CF2845FD
+8F1E084E431E651B5C90DC97FA78DF49F90AE9F923D889047FC7EFD70399FB5A
+3FC6A2F5AC4C6BA217CAC25F0E01C65ED9A88A58429E396C9C0AF8D001EB1E1F
+5E7E1CF6C5DCE293F84E96C6D004CB0D19827D5AEADBEB37E818B664381EE6D5
+270A60FFFD4857A695C480F6F2EA24E37A69B4A47B9D62A9E2831999C590E50D
+7716AB8BA00DA97889DADDFE6D8AA93668C03CACFB051C8BB9226713D1E9BC75
+86CE9BB8059900D038CD0B31BD8230DEBF34FE8B6C9DEFC531B21D90FE4B6DCA
+257C9410BA9CB32711BD79A11EC587921FE57B095DFD07F051F2892A1B6AA72C
+34596217E819502427387BAA7E7C324C8C36E0E1EA3F3A3D16BD71486206FD5F
+E881F999449812050164148E0776E1E84A1901C49BB4AB89845DC1082EB048C4
+1E8300F8474A3F5BF28C96AADA6A3AE3EDFBCFF9FF44254B41C9AAB0AF34E0B9
+6551C23F6371C135A2F6EC9239D949BFB5C27F3A46C5BF6E214CD9A24FCCE358
+E3DF152004AE936538E4E54B88F1A8D02646DF74CD50E205C68B3587CE090EEA
+CB287AE009B551DF09FB77FCFB36973A68383E92575BF05387DEBA273ABD7579
+C772FA8F32B221EFA1A246EEFAE8B9354FE5C5B0583D37FB53B839BE68E80D91
+DA146A6DC4C8BB34D140EBDC678AC25B79B6BBFD37C9D73E57DB38ABF84C9A1B
+BFD558468EBC5B96912E91FA3F4205F5ABFD7246D749900436B7C4D9D4C6F78B
+7695E53781E9D7976937D21DA26F4A4C4EE02565AD55CC77798F86DC49D6136F
+88182A88FD5CF4FC3D0B4ABD7C268C1B90BB850DC034C5B32B3605A07E9371A2
+B750C4F8B3B862221BB0F4AF1DB6AE3E77652F33FE9D95439F536B4EA4D4D226
+2A8E09AE1C980DB20855283DCA5410A62514842388A4127E93D304C350EBB09A
+DC693B1D90AE851957DA25E06C795CE6C3090F5AA6AF587CB39405FA90316AAC
+F980CE1041C8DCB55786D2A47C499B5CE0947546A588BBCF1149206967B15CDC
+355EF3E9B9BF4ABE679EEE80187FBC57B317C194C9DF20BF344859567B8AA537
+B92E5196AD7B7F2C427EABED44C59FCAAEEAE18C3B518A39A1CAD14FEBDC311C
+02EF80CCBBB3B023B5708920C91B2A835775D0E7AB0A0DF2E249F2AC0D2435EE
+3BAA4A853E37F80C7EFFA56C6DA23BA618C5B259618460923EA12527D779BC05
+D3C20C410AD476F416D04489A2F4C82A4E583B3C5980A33BE766BC84CEEBC1E3
+FF77CBED10B8534A7540522E1D1D92A973700053D51DA6F89B10EB0EFADC289D
+EC8B53E81B095B5599E77EB443CBAD4074FDCF7085D7645980894419447EF8E1
+945A692E3721B90B580518ABE6BEACE7BE71B920A6FB704E25321624A8D1A37C
+9B01D6BFF2689A65B237ABAB3114112B7BEA16B66AFBC9E9D89F36CD4E638F18
+8926101C2B86A60EE12F6F432AAD3F5CCF22981DA0072DBDB1AB687F6E7ABED9
+84308AAA4662C8B9BC4A630E5FA5389EE050A9E4DF53B35D86C50150FAA3C0BA
+465E05FD1CA77AA3E78B19A5DDD60E4CE308C0DD115CA303D7D105D33F9F252B
+1D6C5764BDED6609EEF2400557658BD92C650DF037B7733FF5F5639E1B2973E3
+F673AA2E0319B4F0399D9784A25C08EED747CE2FC5AC3A8DCE5397BB03943E50
+866C1BB1FB0AFB847EE73DC3CC6B93BC7342DAC3D88727CFC0284A8FC2AD8B99
+DC7D6397043E8C5340B31E0568861EFADFC08212AF630E015E24C21AAF77F259
+089CF6C8D1E2D0136BA22707D9959981981CDEDEAC3375C1C9CFF0BF91785B8D
+44EBCF873DDE5F6A4C590156BDC278B6910087262BC808A4409323E465FC7BE7
+847A33796D20B116B205C2B2888E02957520B5034EA2C4644F2E99CAB4330924
+71D1A7A65290E8D13D37C7A778116F16FD8A2B93F78601EE0E28CEE0B83FAFAD
+B52146A221B9F011D167AE9644BE125FFF4F8A2228E21CF447DE42FEC6810352
+6C7DFF028D84DE6BB86C1B62A062A969B5BB1333D3E3BD95DE87E756D7098390
+2AE560996D9557A0C1D19F901A324656E3AFBFA1AB348FC923264E744954CF08
+B799CE46F1487B3188306BAAFB8D16B07B8B4AC37E11A6A5ACA1D5C7CB5FC3C6
+212AA74DF2EFD557BB3664366AF289F88FDBBADA3A6CD43756AB8DF2E30E7704
+DE96DCE521E0F9F23F2C5C299DC1345DBF1E9EB0A50231B02C53230131B67649
+B8422865DC9CE8CD2345FACFD59F8A0A13B4B4752DDA9258232C3BB537F44FFB
+A39DE8755B381C88D94A07B561879B3AC97FD8AB89953516769C44CCB5EA2CC3
+68156538A8F8D46EE1DF6E42B31D283868E5716AE0A9DBC518A2D19826032C05
+34A8563294BF6B4A5657CA7440BFCEA23BA55F4DCE15A036B0B30A4CC283CEF9
+056E9F7DDFCFF1BFF0CEE33DDD1BE8640443D2E9A9193A55D17766E6803E6C00
+57646B20920BDA09F080FD41D11B73CA536CE6835BCEE1D7ADE4DD4FCC849CEB
+3A4F4C808B2A1EDA914D469BA709AE3663CE715776A3C6893023FD59120FECAC
+2BB5E1A0278B4804B8A5A08ADE396027120D4855DF5408B7CFF13FC94981D448
+4EA46332569AA8A6121DFA55FB6310E86C95AE03AF0656317CEE6D8ABE6DED51
+140070B89F8FDA351D7520AEF9331649BC4FD2B96433951290573014594AFF53
+E1D59C2257C38DB5F89C2D84D47F9463F6B79D4FB06F4D994D475EAC02B40590
+A2A6EEE9CE8FF2A05ACC51694AA14E9DE73E688099E5E4297322399284EB456A
+0CC3EB28F470193CA13DCB82B8A72BF0DA06843DC95C17AB25512CF75E410B53
+01D4470B5910503400E1FB0088068CC4A753DFD5F725B0883E667185DC04DFA0
+22721F7C43F301155719E4AC651C0E9DC3106AB600C9F34408E6286E265B837F
+E977906953BA864E3CEB19BE1E7472CD6C0FEBC2F552A1EC207C1DA42B88E271
+3C76D77C01705EF06D90918E9F02A8619AA10100D32636F4DB188EFE516A3CED
+5BA74EC79C63824BC1BC0A8E7914AFD6BD14DE2F5A6FB7F3D0AB1B991D568760
+B056BD18C1967E6042D161C8F4A9E536B8EC49F1AA354437662332203A574906
+2698C5954EA3842D8CA8EA5018C64B49C0CEE3CE8157D1A54037831431073FBB
+23BDB5A15B6936D772C5B9E21963BD6FE868BF7174DA2E24FAD983B3C106864D
+E7E6540574F1FD6CD5C8442635637676D99986DC0A810709C3D3BF40458DDBFA
+456DB2EB44FA75C83AA70566C9F4A95DC1DFD8F820F1161ADBE4FE65CE040E65
+864D5D56F4D93D796493042A5EBDA7BCD6283DAC18DA5A87342C165D69118843
+0E8470A2D7137E4899DF3DAFA8A27D2273BB401A7A5C24A6243D1CE9930B0D3B
+4119F0588F822318FA154E5C882B677D8DA3359E0EF21BDAAC9262504C6D4714
+5426139CA31164F05FEDFE85368A8E087D65343C75EC07CEC25DE4F0F95A127C
+29C930F7ADFE463D8B64DE535E77F36C4A84DC6C0B158C3B0E1CFA30BAF3D834
+525DD3D8F39D755B95FC306923A9771CC3161B72888FCAE7F62137B030F6DECD
+1AE4FDF62A5C586204352359C639C9DF7D1A57482707EB0FDC5C687878329AD9
+1EDBB83D3E373D5812AC6B98DEB87EA382F10CE7E282360236EB97A006967B1F
+1BA105A48DD051FEA8E9E9DFC221549E71216EF16A28469BB9A296E6061277E0
+DDA7500023F51C416ADC9AFDC0A45A94D568556E9E25AE3383BB89F311F316F3
+EF7272EF3BE368B0ABF145AE097FFA7BCBCCA46CCF460916FD0F7B4840D36CAB
+B47BF1CC0D4E406ECA0C3E349C4D7443855BC48D56F5C7B53F69AC2602F02AA3
+A430E9215121108C6287012D3079969000DE04D0085B7BDC7B3EE1F16D659195
+7E695E20D5AC8F2D32CDD9D88E21B23B5E2E0A776E35F8EB759DD20B01D3DDDE
+77B7273192442C270ECE3422DEA9E52EE99542D636AFB83AA225B35DDB5E6384
+8DC6B5FBF7EE518377B4B2A8E01468E568B20DC79F2AE5A178E37FE67719CBF2
+C0C1F12B06F646E97998A5D6A36447BE87C94533E04071DC4C818A46C98482D5
+5F557B92F3B5A592B675F0395CDC05349F49E0B2878A0AD4F2C1473AD30DF752
+1ACA29B9520EC066319191D8B14DAE7685B5DB3C85C10685EA0C5158E049EBDA
+B204C1F73E78699268C9C336B8C0D54AB4B6D20E34F5F3CD6AEBB3CCA179689F
+8DFC5B4973346B98689E6AB25D251EB83CA6DD6DBF8EEA0AE66D7957B15CC773
+4F9C26A5BD0BCF65D7303AD381963B584E7CDDC6DA9B572BE655B7601BF1482D
+CAC527069E33038F77639810D403BAE1ACD1F9CEA544F8CE81F5D78582A24F54
+B1AF188BBE247053D3F09EAB56A65214432AD104E1E588A49DA1D26E5A31E7EF
+68625B55F1B366292993E186142FF99862DE9AE40032AB70A053B003D3C19953
+0BEF3A5F6C16F8FDEEF0F2303F004EFE8E3DD7148D0B9D2C393D4226CD841E69
+4E131E7DCB3FE6D2979ED1DAB5BD7A91F97AC79FC4FB82C125B69AA9BABCA9BF
+A04AAF364A4AD81E33626B682BEE85A84D882B9C0713FF7CFDACC4BFFB6B3BB0
+E9FC25F52747B88D33935FBAE5712461093EE2BD224FD7A85BC9704F960EF2A1
+60BAE279B5EA1076BEAC60905D07B921A8F001B9D287603B04EB7B02DBFC1E7D
+132FA456CD85FE50509DB3549013A8F88949FDA83275150A58C9A6E480D5A8C0
+DC7C88445966C9DE70CE6A910628883102C1A56B386039EEF0549B7A78120649
+5421D166460E4B21BE9415E0AE0BD368BD0B9A90DF4EB85845F26F7A32E2C37F
+570F67173339084B317A22FC9157DE2B384AD6363AE9420166D72E7313B10885
+75BA9EB86C588374434557D10D456E6FCE7F024721C4C2F8E4EF9CAAC22F06E5
+013AA1026802276A8F4E1724740943AECD35F6DE0B9B229541A3B56B08F30998
+D4C5AABC03B40DC85B1F5BA7C6F699B3E4891FF8FFF91B77EFE1241A21EDEB42
+408D18E39A3C39604BFD2C5124A79AE7546B176F22BFEC91542D2F83AD5981CB
+B02B8C521B5E93236CF74B33F1262E1A504AD22EC8F0D2942121AA8C627DE60F
+B8E290A73C446BA83A97BE7ECCAC79CC97F574DE7D15C7424F6D873B367F3C59
+754854D2F0B183A13F28C3EBEC1EF32EFF18930BC635783D011A26D4B3F1764B
+05C97B9B681EEAC6B8F3922C700279E12E630497431706790100EA191C81B146
+0B412CFBADE7A563CF37E48DB5C7758CEDEEB96E25B9C7B28E8507361ECB3D08
+FB007AC448D980295DB91A8817557E4CB0E6B614C079FB93062C95470D0A32F6
+D281F0F9C45F0FDAC9539B375C2B9C9B0B5BF6CCB2D9AB8E80E4549C0F8E5A68
+2A0A246C81C9F147F9F21D98F75EDC6A3A293DBA61A8255B3E42999E281FA099
+12062B882543AA988E743EFE5311A7AEB8C51F5E3A13C935B4FD1A371F8FAED1
+7794722BFC34883350A3FB39BEE9C5FA8C6A59D8652BA6C34DD958A9352E7170
+711CDD510350D910B2BE3A9771C191818C3E81582A8F6DE8A01ED72462EBB883
+718E75731C2CEC9BAC03AF799A664D62DE91ABCBC8BDF2B39177D18B5DC26825
+F73562547130271B8C1AACCE769778738EE03B74276984BF67298021478D71E4
+590B9AA09E0C6D2B59468022F86CE4C6ADA15C3543F48F380FB260676B6E8488
+97E9884A3F3682D3E7086E8CD1484DF32C5D3DFCF0FF06B245F44A03BEDB568D
+86893E393FCDB7DF54D0DC1F5E628DC9B6FDAC156FF3A8C7097D1F49666E4400
+FF3EF4CDB5BBDE55A39F0A67854518CABE1B1EBDAFAE5FC34D1D45FAEA59D992
+716B91F73AE51DFDB14E1032F68CF751AF805A41C99AB161EF7DB88DA4B01611
+4779DD94D5BE1D8F9554D21649F5E18A5664A5F4638F939FFDEC9D65BEEB097F
+F31C13D001DDD0F94C33D2C7BAFF8681874CEF7C44D75A691F15E3D90EE7BF19
+3C9F447B2CE43B95C05D54B0755B676228F094045C56DFD70F70F0B1A04C1807
+3784289A1FDDE55B751AC021A410FB735AF90D1793F98D7EAE87D3330C63A85E
+5DCBB8E087B11BE030023BB83AD994D6C54FDF104508235070E96271E643CA72
+25002205BDF49DE412FC2DCECF3D1364090484DDA5290CADE2BE843CE0C726FE
+C54419F2DD1307E2742B115F4FA7FD8EA222CCB89B6808763D60EAADF8529B15
+C89061F75917B22B603EDB02AC709D6E705D2F3D84C31B09D08A4C188E1C8A92
+1062A38AC7F4CC83F55B974F1F394362B8D3E8777BE3D244C53856BF373727AC
+618C224C5B7CF8D94C9674EAA106C3F30817AEBF0386D3F07D6A9296417867A5
+5B9B9CFEC845A461357685A95AD0630B2C0DC9EE8963128132B4874C861DBA02
+1E1D7BE9259713E343989E16859F5E4275DD3BFAE96F382B8F31247EEF86212F
+0D577D0221B9B8965D0C2FC396FF5F38FF95B56D071E432931CD324FB790FBFC
+C6CE521D85FF14E8815E9D4425909D6C312C7A2FE077E4B1FD5F8ADEFF72173E
+9AEBA065002EEC149758F3016625256F37AD2055AAE3FDCEA074A8DD0311328F
+5CBF4CA5D62CBF21C9A5883685B8F7265F10AF6F5D464CFD13C9B40A620FF21B
+DA5F4801C8D5357C49D5B401F51DE0923D0D96ED6DBC57C6E77569FB69FA198A
+2029DF8A5F3CFABCCE3A5FF87E5A4877D0F8887EF0F4F0FEB51091894A946A18
+84EFAC78A32C7EE6082A51BB01AEAF4FC9066367AE9B5A5B74EB4A4231F1FEAC
+B7B76BEF33551AB4893958462B0CACEBBD48CEA3174BDB86322383CE32D8EF35
+BA9E1B7F4994220250359EE3C5AE78C1492833F71701D0C6B0B4B46B8641373F
+5193B8FCCDE73F2F56333AD23422273ECB807AC49D9A79DBB88FA987F34B278D
+39AE097E8D664414FEF8C2B0EA3F7BD43D38E964AD7709BE0923BA5DE504D56E
+7F8256969F12A9149F1C9D7DB5FF20425C47D68C15F0F1F492F0FDB01C1EC138
+4F3DF82B0C1BC7A8FF3CEE5AEE3992586A2B53B425118546D9314170B3877D74
+BCDEB2790C9EB08C21FE6A3FB8D567F39429F2DD066754C18E026539EA88A94D
+D643E27E8F8E071AB6EC8A30951504B93FC59CF0E801D3F920509AC2E6823635
+9ECB917546C50906C3A2F61D6BEB4E887C6C9272FAD0AED7ABDF73EE841FBE28
+FB5DE55F4ED965252883CC567C96DE4EDB781EC82E4AF9E04ACCC2160598C2BF
+60140942123DAC1D457F947CAE5E0654D38117D261F4EC69ABA52543D215C011
+F72B148E55104DD3A872B9C01B47B02398C0848FB0FF5D4C9F557D51449CD16C
+9D7AB623BC300CF38DEE6CDF4596F5B288C577814C19403220C343B11AC0770A
+920B257185D738BB7CE4B535EA0EA8F9446D8D7A35F10ED1D98F1DB7771268F4
+4ABBC51CBB2CE7F48FEED3446467A9A04A826AB7688F8525671BB3A5DFED3954
+3BEA36C1301291EC0784D413A324237445E85FABE6565A058A89E19C25CC8359
+3623738C4292091CE48959C0ABC289CD0CA5316AF2756B31B5218091D094331D
+CC294D876D57E3D5B36D96C0F444D9270B297149FC8C607DD5AACB8CFEB91704
+3930AE21ABF7C4E3C524BF33F4F4CE4EE4BC1566342BCB5B7C937902D6C4CAF7
+62539819195853646B73E749B06C59109B4EB288FDACC61CC962CD5AAFC24B15
+FEA2E8286298F767ADC5D1CE787B26E7C25B20765DD831363F228099E4125168
+7C3E64BCAB5A40D1D17150A8BC43E66D4D03712C370DA6128784F1E15BB3816C
+F38C845066DAA046C038D54A3FCDF3939D0A39123854C93F1E635E0EF053B84B
+012B3F64398194A21A5AA2A15CA473EF99F8C67DEBE79C747E5CDEEDB6AF41B9
+511ACAF55ABA8FD1495345148A34869A0F52D647C861D22E0F03EC217227E270
+8FBDA95B4F70519FFE4371F2187A70E9323E5671299F358C02D7CAC76B0C253D
+269A43C27FC6F4132E8E8F2C0FCC103143E21A4EE3E5D3E6062FA1E0054E4E49
+3CAC42D8A9B3AF467F9AEB84E0C12AC9E0F529AC18C6EE1D02A29A0D86800884
+AEE0DAAC7890621BB42E531BC53BE80439093EE80A72CEBE746C4D0BEA66A685
+E56FD9378BB056BE0DD465A145A8148C3F5E54E5B9F11F4F9202EA28EF9396C8
+2958636AF404023AD5A9D4A19163A285CBA7D0FCFEE888268D4BF46C9DA49AE6
+DEEBFB4B4B2072CA7B0B8E62A85CE2ECF876610A161B76D43D67A73C67C70124
+6BCE8FFF02272DB067916FF0A5F157BD73BAEC3456CEA84AE21A4936B4983780
+4D7116570CFA46045B4E98E65931DCACE943C83B7BD30A60575C9D34F480A179
+CDAD619F8B084FDE54EBE09D95C0433109202CC0E32BB8AD1EC3CED55DF0E3D3
+4DB701AAFD59F6D4BC29F3A533E34E45E0613A6619BCC9300223380440FBB8B3
+3BD3FFD5C7F76407076E4A791528AFA58926DC581F5C3CB53ADA019813B1FF1C
+01C14DF03B1F77458F1D33A59889DFEE4E1C99BA0CF4B04F7B11BA530B154E64
+F5E4C2BF964C12A5ADF102B4EA55D46AECC430C1162DACA9985BDD7910F446C2
+C41DBAC7C809E2058C2CEADEF4CC7BAD936B660A6E6AB17B5F52F2346171B63A
+5D642852B7046CBCF7B2E9B8CCCDCBDAEAB267A48E3C8218CFC5129BA1404253
+1B01C19EDAE3092F99BF5864427CAEC6A3F7C00AFC4328D3732EC4CD4A051F2A
+FC6E419DAC820B082C7CEDA6F19AB2CE97BDBC45708798DD2E38BC27D4CE044B
+85323D6BD9141DE647AD8EFA76D21B899F28896E73AC9C2616F46DDA50B17387
+F5CC63F90FABD2716E5548BDC01BC6D798F7311169AC071B2326D156A66BC649
+7976BA04BF4743442CB5898BA927BDA218070A5D03E543EEFE4C93D1C9503655
+10591B89D07DE1A0A3B57F1651701C5479ECA1D8C9B7FDB02CD351AB975094F5
+D4544D0712690DEB7DDA59998E13B656B38F57816E8E4EF2CEE0D3506A1D8D3C
+28AB4918BBC3079DC7436C20600EC9ECFE4A7424BB3299ED0E9E39B977023DFB
+4E1FA6007CA8C1D86D7181E078DB2516CE3F18011E15E436940291808FF64806
+8AAEEA70E5FC56A02F87E38C7CF06FE80DF9930F63E633B67EF6093296CEAD28
+0B150EF111A6D20104AF1746CA1CD02BF2DE14546CECB44BF33E239FB7185A9C
+738414D921AAF0CAD72B2425B19A0BE3063FAE017C404DB6CD8A2335B62CA1D8
+9A742A632035DB0132EB2463C9CFD4F806FFA93EC90AFFC4F6AD2852F52F0F6F
+1FAE527B45679B55EF87934A396B331352920491B04F9FC364C0182E4C693885
+DD52CB9E6F7BBBF49066852F9850B1E071372B6B77D4912B8D0299C314E34638
+C079305798A0F654EE711F28A4917BE210CBD0614329FBA0B638E6CFDD0E10E8
+64EEE1C52F077F43ED14AE2E87FE3163C3DC62BBAFD7DCABABD75F0229858FE6
+29F198374EE6E28A4C729688D7D345D95DF513F85319F7ECC40F6477E8B73EC3
+5437C673F57AADBCC35B08A271288E1DA43287140AD1AFDBBD0F7C5A0A761178
+271F0E587F04C5A2F9D026E0B92F942FE7BB27A9605B6924545EE82090FEE9B7
+DBF60FD0870068A2082B5B22BEC698460E3D452A5F92F0CD727F75317A528635
+F883F3EA161BAD1CC81820A36978666899D28126C1BBCB4C08121E248CD1D0D5
+DDD043B58012277B03F1706E8313BBB4142A10F8F775871B340C83378431849B
+E4E8F4A18BD703409EE58DD8618F94D70A57D1D13188A16BE8A5F6383C1EBED1
+6CCDF1B01EC33E4C57ECAAD2E292120F2CB157A3C6BF62EB41B9A8299728BE8A
+E03A17183E7C2B3BAF9864C762A60C414F693450F952B48AD049527468A9A8F3
+731DB86A622A3C2E5BF3468B8A3115BBA8170FDA23A6A0F1C38DC1FE1004F7E8
+443EC7E4474E19259072E47AF8771288D76EDF91F8697595B8A8C08AA5C4BA35
+2E581250F1A3610EC9D5991EAFF6938C0EC16ECC43E4CFDBA8BA42A7BAC738A1
+B29563E2D7283D106F4AB176C617A6F1B1F9076E564F67819159F7D3AA4123D3
+B8A7E922AB52D0C63819D6A95ED6A3A63E82A6947098FEB9A2F1221F962DF9DB
+5DE56A57214E4B84FA855475BAF474EC9A53501BD5542CECCFE81A4136A78ED7
+12B834881BFAFAE2A890E598EE2E11D1CBD44B6B66DD384DB7F21F30842673F4
+50619BA185CA3925AE1D922430FA6B3EFA985E50A3371A6B8C2D7B907C63FB81
+6FE0CA8233E4620050EA197E05A42930856FE8FC0257C1FF4B6706E4F9BC770B
+987BFF7CEA0EADAEA356B750134819B4BD68FA0C36A65681686E5437E8F09282
+E89F8990B705E5A0C215CCED16CA5E663C46D5164AB439F73EE640D6DA70C155
+3F69C1BE1FFA5B6FD443F9336DE031A4C9607C706B7571FFFEEC8D8FCE91FD5A
+C999821E81425432805A253C573F614895CE3570A39753B36A357F21759F1498
+A1236B1D1790B12D471D917699C19A963B866FFFFA37EFD74E0B811AB6832346
+ADCF181D963C812F18E141681EBD36482E7D29853D91683B9ACCC3B8055EFC55
+E4DB09030C38C5520E4562932C9E9AC675CEAAF41D8868F7A4E1D38193669EC8
+62E2B2AA3E597455D3FB186205210BCCD1E9B3A3564AF82997E238669AD833A0
+D53B951CB550EC7FF5FDE4A5E7C7499A889EDD8C453D99349FC4F65130849E4E
+7D76D3C9A153B8522FCBF0E8C80F6C9BEB419E501A891D9E03A807E5D8C9EC9D
+AAAD2A86F0D360DEA694784376800E32EF4DB045B32B78988CF798EA7CBD3351
+CB60C6C775B0E7B4D8C1CBDABF6841618296A94876573E9693A39DF47564C29D
+27C0CCEAC55E0339F134B45B1403D2DD491C81BD3F1127164D6DC4DA058EB7C2
+50F8C910A005CFC6990D6C2911656677D26E557AEB420B8FD91DF224F01458C1
+0E8CD85189635A3E237F605F5C8A751AFB0E8FF920B1094166C152C9AD7F4D5E
+D3074664ADDC3E807FDDDAC2393FCF48CC76AD84ABFEF4DA6465008499EF0F52
+37B408058365334FFDC0AB15C8988D58E62E7CF50A199481832968BE04CE1301
+75BD2CF84588645A9123982C8E20189D264E1FEBEB22605B20082B37502C7F2A
+BFC371277B10FF89AD4A78405E76D1220E38F9F2FA8CBD9115C11B30BB9CA9C7
+4A996AFD108D2A3B860AA8C3E9FF6676597AD9B1F6F9AD92CDAEABBC510E7995
+6BC046674A9EEF946A294F4A1D4F0BF8CF73ECE930DEA3DF887EEEC94B5526B7
+12CF09476D5EE9D7E9F570D29D6D4CE9507F26E7EE794EB9AFEFE7E89EE1E32F
+C48959A2FCCD7AC5C5C15C81198235E3C0A216CEEF1E6EC1267B74DC19498B25
+12C869A068D9E94598923D7E63E336BFF1C40025548AC0EA3DD2BCCE0B483631
+6ED3545427FF3E9E9460789BE0D6A9E39ED20F8BEC133EF4E5F4F577FE93FE35
+0BDEF6C35B34D3A3FD2815798BC64B9508A8B86DA0F0424352E872B943B6A8B7
+C0631B9083F57EE7D0D2BA76FD3AF87CD0C0F106180EB8E1C50840EBD968ABD1
+4728D49F9A4531B890E97F8BCA0589248B8E7F60F7B2CC612EF540244E0DBBEA
+828F57E5E5BBFFE0E2AA7E46FA16A45484BA795D4862AADB29874C4EA6CA5EF6
+A61306112EB3023047F31E1C16DED2D5600A1A30F7370BC707672CA411F3347D
+734D41CC60AB436577659B9C256C56019FBE476CBA18DEFE9DBED04334E9A6CF
+AFE56EEC626AD03ED98E488E02ADB02BB677163255DF5D029636C4D077583725
+B60C7DC3F886913B8BC6738C662BE0A74AE9F94286114AEC6A82E824C468570E
+C3D2514801ABA14EF94B9470FC684774543F95701FF7C6EEC3233DA5DEBBF56D
+9349174E5D0BF48986D549FBD758B3D123E8D694FDFB95BD9B94417BD070CB8F
+71992B2BE2AE0C9A36822E4E8D85DD3B337B0A9E13DE07679346C55145F38012
+AB566C38CAD0C63D0491EFAA2CE1CD8FD4938331CAD9C7E87149B8E90E6EC1F3
+55D5DBAF807BF2482A99B02BDC8BF10EFE5309D54FA108D379393BFF8AE59C70
+0409DB0D558A48892A20FC6418F2F9F56CA50878146F222A656B0E9B1C346577
+5E2B5F79094386CF535C145B5459158D74845BECB76E02D53EF9FEE8B23BD8BA
+59969C7FAF44CB5E5D217DA9E19634DF2E2A653A50F7D4C564AA875454612BD8
+B01356EF6F620D202612E424A1B0FE9B0B740C344E96F6F9EC0199BF3B3FB4F3
+9330124AA725E21021B82B845B25707A56D25FBCC138EBF0FE757DD1DCA7D3F2
+5285256F32C2BF27FD47D283E44D8BFE63CE9E9E9DE2288E9A1BBFFFCE006201
+187335A534958F32C1999C8D75FFDDA244B5A530390897449A4AC5DC6D64F5F4
+9D32AB0A9376F819356705A799EE20D2196993BAB8A58AAEBD0CFB2D9477B162
+0BE6BC4A665B5AE6E1765CF427F0CEE173BD948D2BCEC5E63BA15DD808AC37E8
+27AFE857EE793FC34C1989560E809FD94A462B0E4A5EB5C655BF6D45BB65EA04
+67ABF18D255B6407510F1D65DE2F93F2349B218DAFABD923C937F1BC70B9DF64
+FDA4CED24854859D721D78E8A21BD565F05E8179E3BEAC804931EE7499BE55D6
+0EEE411DFB1705C1D0D7AA13FDD13235C649506E111045CABC12BD36A7409923
+CB2A2CE48FF0DB470A746348F2F8B5AD886298062D76ABC0365195E6926D123B
+414699E9BA9783B6792C284146448D785FC8ABAEF70C59740ABDF18DB7B08203
+8C9684A23C234ED1C7C6315B7F9F517A2241534B1DDFC8B7EBAC878C3FE542A7
+013DA7DE6E70927D5B47F53F90BC5A580E3AC286D1062FD4653F070A070FD397
+7F88828313821C2B1FC062E544E42F0585115A6B19F32C2EADE89E31D279E54F
+8544054CA49F7368C94A1939266C344B012EC9800955A89E832F9E59E50DAE60
+AC0364A43C400B8F62815FF6CA864E59327B89A8BFB5435B0F0F5BE4F9F544AE
+332C19DC75CC3461F388472A5764ED36FE91F8710FAB141022883091894D45ED
+294BEBB897D36694334F3E968FFC4EA6B073493C32827351FC6F323D0FF9380D
+804B12F01BE6B926690A68F1F9ED129C390BC240DA061C341F0D09D9210409C4
+3C5E9696A5BDDFD5393AC9D7AB9F82E919F808317679DB70D674F46877F83C95
+52DC2EADDDA7DF9AD79B9BCB28C2BE897C9E9378657B39046A929D23E7ED0AE3
+7925F1B184573115299AE2E11D43FDA75E4A1DFE14F80F05EC57303DA964AA35
+9462759CA36DDFF3B43F3CEDDE73BCE859484AF34F6B1EF90FCBF49D34722571
+A2CC337ADD4F4EDBA0C20B673D68A3150E378BA0DFA81F6ECB97CD9BFBCC13BA
+F89762B850DD34A51092D9E4D39D6EAF8E5B401F34F07D2CFEAB932A066F220E
+869F2D19EE55663BBA117EE3E13463FFCAB2EE730F840DDDC82C5AC69C64B203
+675F11DBC40186A2E5CD1B346DA37E8D3B3C518D9480201A9C598DEBE0035A14
+355C3D66F06C4A7ED75A72DEC787ABD39FB77D3CC27FA505F8A4865117FEFEB9
+98D774B3268803E7D586FB8F5276B405680841C7EDBD1AB4D055FBA696139B75
+D1839E542902660144559D613D162E217283E112CD4B11C13A3AD04C161B154E
+AD5E2EA101FC279B83B8F313F18FEE59B20876FB99AA1587AD45CF9E294CC653
+C0128353B6644F5D01339143F692EE2DA2C640EE0423E0E0C524407387262CA5
+728D9BF533A5DA8B4B24579476FE77B263A611DCCC6C893CDB7FA087820DE632
+A7E72EE945AE53FFB7FABF66C8D7A9E4FE5FC76FAA7B8474C6DFA527032EBD00
+11742B09CF9364FA679CFC5B7751BBEEE7CE5983C32AB245884170697841CA95
+9B781839232EFFC2C7CE51FAE5C3117B6C5A6EBFEB8CD5C17AE1F50F322325ED
+2C42751E03BF9C602FFE7651F8EAC796F22AEB025024EA9D3C6839C5D78446E9
+8286E802ED412857CA42FB01A78B15B908F7CE8BE1C419254998C35C790368BD
+8B8CC75818C190AA8B52B75F2532630CE54DF5D40C04EA7C764BA3F54657FC55
+390A118C2B74B34CDA77D2B4808F068FF11A3C3DCEBE799FA2CA3D9B7AA54E48
+2306EDDD3809DEE1CB37EBAC8AD6419A27738071492B3E89E32052CD2A3516A1
+E742FAD7E97F019C0A3E6066F6E065ED5152C0C078D314C3BE3F8DE49AEE7D71
+3A53A6D2F528499F10B2D0FEF019FD05C4F57F07C1241AE208DCCA9B74604871
+4C6C13C4CAB543F890259BE362AACDE5B69BDF373E7CFC60FB3DEBD243F2626C
+793933011C0125630471B7AAF3839AED975EA581558B53BB330021054A7784EF
+0EB98D56C807A4327FDB846E51725AF217563D6BFE0726A3FFDFA377A3635891
+F3A8FB69F1522676D6E01984ABB5C655964B00A05A499EAFED034513085755C3
+F54402B658E24D4A57913C4C4D1CA2335FE0A4F658BA773962F393FF5FEF8BF6
+8D6166014FBEDE0287BFCDD725639BFEDAECD06E57488F5BF30BCC2B3AE9E878
+F2AD3575FD043C6397A82F27D6E5A98B9BBAF8C78279D1A78809FBE9D56FE7D8
+306090DC00DA55AB9624FC4E4A279849AB4D5B7E7E125ED292B125C34FCE6C5B
+66ADC813BEBDDC1E91CBA09751DD13ED696B5629234AAA990C467DE668CF1D29
+556A24B3D5EAD78CC38A3282E46C884C802C0C0B010840CA8D454034D3E479FA
+F9B9394A89924F66E106AEBE1156337BA80303F111AACD622F9B0C79E463F1B6
+E7ADFCE41A9E7C962A96016418824569861A8B2A426AA86A3BA4AEB5CA11916D
+2F6AE0C03BFB90E5B6081BCB7348C8B74A20EF87D04A91B5EAED48B7917240F4
+EF91A3A1F77DBDB81D8D95080E4EC1DC67AE3788ADA00E8CF885A13DA34F525F
+9552BFA79FC0967C2AB66E42F9245CB380EB196C927E3279DE96FB8606FA9F13
+1DAC5442B25B461C586203D9ABE024569996131F178B1302624A4E78EF2F82BE
+E9A0B83549FE5275E85C176B7D3F44AA19A0025032BBAE7B2BD928270028C866
+3358A8B2058383FF2FF7A41B4D90F4425F40557BBC907D8C8F835412EF0DC6BC
+CE6FE967D55770C0EAC8EB190D7B8D355EAD9408050795BAEB5149114CF377E2
+9A6E11C422F51705EB921F95B548C79775525D0C4D6CB5F9101B99F4C712ED50
+ECB12BC53FE3C703B505A12C8824804ECC3F66F8BCFE740E36CACC94C7E76B50
+A8C037E81731F40AA1DEFAFE6673BAD83EED23B4D1829A6343C1FA7118CA9C31
+C08EECF55F2E5682A445561D7EF396239C25C013AB9B0E3CAC0CCA451846E611
+8D17C7ECFFAF85013BA136C056381F4CBFF31FA4A30A19FFA8BC4F29A8C4FEDB
+670E4B65C5FC2AFD7B12DB24B6B26E9A2328AE47204D35E8D981B2D90C47F768
+53AF1FE5A271FB05C3258A280676594255E53410299DF24F4574BF72FFDE081B
+A1D2DDB7E42C91C7CF3E7AF0A28630BA772057A39265A74CF07790257403623B
+755C99198D679FFC403886A1216EF0DB21BC39BA11BA1910C4599641007227FB
+07B7BED0F7B334C4409CA8E46414996E89C99A848AAAF1BD80510470BCB2E5F1
+8D2A32099AEB23EACCDB07ED46641500E3577C561F5834F90C353B03A1556DC1
+355AADAF4F16C5BABC1126699459018ABDEE8117A30F1FF0327DDE29E8F679E3
+F44188845CC71A694285A0061030DE452D5EB85B0286D1CB19077EA18FEAA2E2
+493910C0194C37E859CAC47FFCA73FEF03C42FAD09EEEC4E57647B8A1725406E
+1686835E81E7F2D621D6B2FF972904B7BC529DB1912C6B788869E3C3578A0B6B
+7A15160577F1545F50294D006AE862A89CEB65DB36E68013A3B71D99CD45EF05
+942296CCC7338ADFBE0C14E6E800DAE58873FEB18428B59298C6B6331AD79F1D
+6E4B8F925E5497E4760EBC2AA946DEF442FE076F75D96497FEC6E539D7EC13E6
+368AFCCCDC03A73C1AD82B3BF06D294EEC6908FD9C1E2F8935ABE200B3D4EB33
+A76EF754D2359192B75970B235FC6F59CF2E1B99F35FDEC3309C0978F597EED4
+75655F2533DDF000A53E02630DB8CCF0CA83D305F1CA78428B09E181CFAB40DB
+AB63E6796CBCDD7CDBCDFF14A6934BC5C02073F0A317DC0A6FB9C607B9B49FE9
+E102DCD3AEFB7ED4805E028AAB641D0E0EC6AE09D7FFF3A4F594098D03139D61
+AC6DBCCED93EA94E3142299CE717CA0D77597801CF5D01ADF5304D52750C4EE8
+66804AFE77229D54649931E1765BB9AAD54DE84E5E8A49A1CCC80E94D009EC63
+F5CB056A88A3E2D0E0C78CF31754EFA654746F33236478BF53B8A56FE0B51A19
+9D1E51E21B92C158069A59F8AE0F11ABAAF2AC3394DE03389F538958CD709639
+26086A53C600E8D4B2A1E9F65A9982D3FD0AEDEA1272126EB2FF08E06C5A14B8
+263561B5192332798EE1FAC70F4FA20E9257A186277D80E2325A8CC9C650F374
+9EE7200AA82D05D7CA5D4C6D7ED6D38462AF2EA35C1F6679B1767EBBA6F62769
+383C4C5D7A3C0924BF850BD0EC1FA16606A973BD45A0F2AF86018A4B57AB4334
+82FFCF17BFD39CA87D25E36D028E7E35B6FC3DD850184BED63C2E3843A6FB26C
+65EC1A1F562591747AC1656BE602CAAF7D24E678A5834D33B4F25EE8EA40D88A
+C87860F8F6CF38B3AC16E525C7CB7B19183FA62C6941CC8FC771A5C87BD45F2A
+BEC03A4FC754608A6CB3AD74F88327B260914E0B325C246057B013E0E8018FD9
+55FC00A741CFFF655AF36098211D7756F1BA8776EB391E73B8AE402814F8824F
+571C0255B878A0CEA097CC8732FBDF57F56A3C36A4C792D16875E88A03207B22
+49F60658A2519300C1887A8C3A64BA08603860DF48302E54261ADD2F23FDFFDC
+DC8D44DD1D24B7D0C693263AC1CB7793192C5BB7619C3FA526E3D44832676038
+B2AA7E7F80B1F190E83534DDABC07D4A8C312C25080FEE4AA75F17616616E53D
+500D0A9EE43DA70ACCB163A463BCF0255826DEF676C383C5137DA065FC1FDBE5
+AAEC7415E6C5309AD238C4B77A809BA02385B03378AD562D1C3227CD0D376CA1
+57818FA2A81DFA677865A17880B66BE988043AFC0B431B238508266BC074B742
+5C2118FEBC282096246631E897ADB907DFECD2C7569293A5EF0DEDA5B8B287E5
+53017E1CB1FF124EB57676EE5CE07467B8CCED2B63B70E303EE474596F3D8450
+C39893423406A654217C1439A7C4000946378A3504AD3F2C820DC818B48CB651
+6921E0A29A0BA2C332690BA7626451E234E4DDBD744DD801E335D9DB4EED3F87
+7C4347F874D7F15882960CEAC7039E1064E7C9A264A1C6D966260754736FFC04
+B3462E87FCB084E2FD1F53FED1E493C298926B26855280C154A17164C32F6079
+046A2CAC71FFF007E7B84DBD42DA2F4E15209CF8194383B5F0B47F47A6E95EDA
+A161F214BB90B548F2C1458F1034AE071633A9105C09DD9EA1DB23CC13611B3C
+D3B67EF45E4057C865C0A271F974D9615F0AEDE45A4AF7B1623F725A7A60EBF5
+82D0B59987C89D848F6195788ECDA22F9E39400615C8D287E75300A295431ADB
+83D0F4ED026C188E6B57C9A90E5655DA0F56A65385A46DE73E7E1F7482BFDD88
+4F4570C318026366791AAED812B4BE31F3D130C46E45A699C843E09C24945C8F
+806F3DBF476D3DC8D7261570C54EB79905AC4F4524C9B3100BC5470160BB0587
+BB04E4C7090B090B769E654DE50D771EE270825F28CA00D86B6814DE04D02304
+9742A33ACAD2D718843F882D06755E0FC71B5B92A1AAE92E1167F867E895BCCF
+A5BA73AA8CFB9BE0BD2E4A16523198B21B664B1D41E4BC0E18BD709923EEAC97
+501C90138C493F8E1E229481B00A2A1E4940A8002A2401DBDA64C86B61C760EF
+DEA4C7A8EF665E03D0FB63939DB9B6D8FC78B20D882FBEC7A9EEFA6A91E0322E
+387252FF8770C9A2F5E2A3818EF6CCCCDCC5F5F21B855F489898A13080983705
+977416594B8B0428FEF03A554CF07FB3B59E5F3E027AD38799533C5960C826E9
+95C6F25B15B802D96D975D8621AD10E0DE65C3B8F09CCFD12CEC98F71EAD2E69
+2AB13A9F2183C9B035704EDCC8930860B48DBB68B8E3111E26A8FF216E80D082
+F6CF064967B1233D711C076D2F3680D9586A87694ED8FCD0BEE0A8C338A11728
+D658C224D94045D9528BD888275E17B50F9A72005130EE5149B8FE243B2F428E
+81F8F5602D3E3EB89395E590A1253A9C28D4140DB9769A5F986325A29BCFBACC
+9ADFBAC34FFA3DDB5859B9DE3311790882EE64EDD02B79E15406D945E6B454CC
+9E658F0ACFF0D13B58C75E395E0BEBFF5317C0610DDF07D18900919DF6F7AF17
+7FBC6BDD3488C1E140DA40049190E4F718AAEB9B1990F1F8FEB61FF5EDDF3055
+4A747292CBDE3C33372450568D371D342F8371E7F9DA016B5039810D053F7871
+A211EAC5AE13E808F44711906806FF0284FA51F97934B41B4E320DB211E33E32
+64321927CBB5E97A82274EBDA4D88FB255791A70A0A2E651F141D3CD1DAE553C
+94AEC8B6B2F4E337A7074B7E40BAFD0EB0202C9F77EAA4183208D539A15B94E8
+127C767800748416332A9FDFE6DEC86EE0273FEC43152C064B7C6C24A0389ACE
+95DC88E06E1ED02B277A4CB3500B6822E969E36F0F0709ECB4A53949965FE907
+6B9E95142869B12750FE639B9B5AEC8C28F70722049617EF0BAA248D559AD505
+29C89B1B14E68E3E47427A636090A417A74B2FD20C209ECCC88C1F93E75568BF
+D1D32921C4BF2B1B999C86E331DDF26BE549161C272235EF9A62E2F04BDEE6DA
+123C84DAA783A4A9A179C344DE77CEBDE3291006D04DAFBAACE06FC66FED9259
+AC036F7554276923F8CA84952B8524F73786497344A8210D72777A3F0F402461
+DAA6FF1C3918B8690C409A718C3DDC9326D14D27FA35C25CC13FE4955AE7F19E
+FA40A395917DC43A1BA33B7A21DB8971D5258BB07B14E587C3B8C0BF6D186719
+BA375629266754D560240F4C642A20DD6540283828B260F7BB04057D9773887F
+30E3D0DC8F26CAE5BC74CF2599C55C7D53A866C9E56450A0C9E8F295C3956F04
+62944690147B5098D87C3315972ED1972EB3681E2141CA1AE9D54F1E37EC8EAF
+3B7B27D54223C95CBCF3F200694343771860B4C59B2F74BD3EF3C20A3361824B
+C178234D9B87F2831726735E054C48B57705C254DE978FD66B8FED99C179E3A6
+CFD55E11231275614024B0CA241EA4618430F62E93D5702AC09472BF682EB92B
+F83B7B99EBD3736CD543F7C02E7F42AC083B75F5C28B4D0AF596BDC1BC90D7D2
+58DF44752BD362E7896C8A9C0320F226DFE7400946754A5F518596BF0CB2A307
+00C276C5A4A7DEDAC773F40FED1463FD62CC21CFF7CB7A850DDA434473866023
+0146E94958A21EF632671B71FE474F1915DBEBA6F6521A2A18382144E3B4CD87
+AC655DACF75CCC795C24241C851A05FB942FD8FD05E434EDDA3EF804B1363BE9
+504F346D6E23AF4193A93930B1E605FE73A96BF9C6778BDD25980D671C75FEA4
+700186F9F1F54814C73B69D66FB36B4DDCE39F3E5908B9E73E385EB116C21BCB
+2322A225EC338C82C422ADEA0F8605A8F382D115B1243B0A2CA19EFB2ADE474B
+6641F564C6003FE42639E7D862F8F3B691F566D454BB781B45EFC163969493D8
+857468480DA8967235BB2DF1E4B1070DFE9FEEF51F3BFD6B6909E0B19DB09F09
+921E9ADF59D3C3ED0B3383A3CF17A4633738A781B55E43C650A79CA2B2297867
+EC4A4C7012615840E816AFE169DE32DCD6C91159E97C0CD550DEFE597596CCC1
+9DC7CA2907DF60E74B7076ECD61345A90993D198B4442B42103C6A0F7BFF05A7
+D927C4452D15A983CFC306A3FB4D19A5A54D581409183CF749F58F64749AA350
+20BD27B2A702F72A98D584DF32984302EB1804B4EB5CD2BAFBB482E3DF8129E4
+8F4F44C221A1F2C862CAB51EA2DABF24AF42D64DB8829E30076385677719564E
+B5658DB1086E0052BC1FC562F7F9894B46734DA15B142E7165F3519B36D4FBE9
+4220A60BE1E30FBFFB67FD2DE4286276CC9A341E21558A3BD8B729B667784C8D
+97981ED0612FE2DB733F7E46CBADDCC6A3BA7AA53C6CB34B021FC4545C1EB139
+58EDBD8D2E98A9CBFA4B72F52F1C1B72AF8A99BF78CB6E2F19F5458CD4A538DF
+17C18A80F62BBCDCD5B789A7DF3544F9C6DA2C22C580C41EEF179A9E9514BBE7
+4F15B7687C5ACEEBCF6D2229238EAAE66AC13027D20DEE7FB7652731200B1E21
+B2D72B3053C47132594A48501C9BFC7DB924B4810299B3581C1DAFF03B0658D5
+BDBC8E7F6C15B26FC872BBE0595D1A0E764C632B766C33D33F5A423AE987ACF7
+974B18F39F85F7A063D99B451B7DDA3C24B0FE4E7FE6FCED2A231B27EC109962
+EB7439AB63D48FD4813CCAE4D3F53B0C3471ACB52A5DB323FF4E1EE8373FABF2
+6D844FC2DD98598B9647BB4DBE12454CE24FE162C3B4583D593E67EEE093EFA3
+B8EA96E3D20B182F8C836B676B1CF4CDA0B5C283E2E2A7992453B9C09684C5D0
+9FF000F41DE580FD799E7663F918E7BCE5CEC8CE05473B660B343C5564BCB7E5
+9F4DA3B7991EC910F0DDE4002D54D459AB33770ECB111C25B0D327194D3DA61C
+2CA2BDCC78DDA1F3A51F3D7EFF922D3C9A7D5E88D3F718D4224A0A34A4B91A12
+EC7AFA2472E8977F1C299380AF7D02E2423D880CAE31A610E0158C318DFF3802
+9BAEA372D8168F5D631B7CCA290C93314D3B96CA1EAAEB29D308499CB4AFDCDC
+49429DA85225B0429998746B2B2D4A4D45BAA8575416631386AA7B620FB272F4
+69ACE1610BB6F651B154ADEF7F8EA3C51BC62A081F547181A3A18703D01E020A
+5DC4C1C934D2AC4A0B67F545B521D9B40F3255E5E9DE9322FA51652337A405E4
+5F0CF9FFD3FDD10AE339AA2D91BB9D3637E72738620E8CB14CD87363AA04D4FB
+79B0127EC187E8767D3C06404CCDABF583404809EEBE86DD8365E5A61BFEB1AE
+492423B4E5F9CA962357444AFB75AC7AD2F387107AD76171F194606042072B9F
+18B341BA7D01A6EDB28297DACDEA900F301D95D33A89248EF42C3264F8A1B47A
+5CFA54118803E5B57CE7C0068C6732B60A741E20C981BD7C4BB1717F5774AC58
+92CB5C82DE1D1DF4A9E4B945D7ECF90E9086BBC455244C51E7F6A9AB801CDD0E
+7E5BC63515FEAFA4238F4765AC04F3E09F1279FF3943D77A06C0EA2E52EE75FA
+834963A8FD2929735CBA89073CF651DFAF18FA8D91BC1022FF345C3E6705899D
+13A63FFE22DBF6AF2150887E12D9C7C55FE026F763D3D15D6F5DDE550E21ACD7
+91E9F7937D3F2FFC2438EAD533076BC5003E4CF3CC4A98777B0615A2D20CB825
+93C60EB16B5BBB653C91B8DA49BA774C81C3AE8F12D5E84D49C431055B9442FC
+27BAF5F30D341BB3329CFBCCB09CF1A2FBAE92525E9D3CF5E099C0A72E1629F8
+D08CDF8A6B50CBD76FF67250631D13EBE30787D2B912AAC23C6973439C1980A4
+676D23FC0E90644BD0FB6176322D94EC8B2C32DD0A12065019F0E8926A14B7AE
+C9D8905D9B79EF23446388D9005CBF63EE7A197BC4C5FD2E3470DA7D46DC2977
+B4C6FE57865E1C0448F393E0AE7D44FE616F129D7A0EB9ED1B78773EE54032ED
+1DD3672B6923D188014A61F67ECE29D913F6CE37D014AD2FB1CF07CB8AB70530
+FC5D413407B6E01A3DDE44613B8A7AF8FBA104D0E03DDEE4684F73E97118F4CC
+F74A503462C96F866366C2950BE3F19CE061EC7834C0E732FBE592DB5AC2E088
+683CEBB978E109F198E2D39FD2E690C390DF290F7709DEB6EE64F8B88D3993DF
+03452F2C314C04807A63AB766F940667FA3B6BBF887EECB96B3E29424B3DA03E
+80E7045A2578BD70F50E0F20BB6C3341560A2C9D5241936269C36A9C1D71500B
+9C048AB6B9A5E0B50E4D3E0F63B4369B7A0AF6E1DF6C8CF5CA4111DBFFC325C9
+41F28237A7F731F99D5CC15F3AA14E5B4B4E6F7C617AF408275091BE72E98AF6
+456F9A83F05B21CA0429EAA3BA48CC5CD29A087D96B1279B9EF5551794BA809D
+6927420E8DBC16CAB46450F1C0D5C8C8B3041C22390F9F6390067EACFC174AF3
+C9782CBEE35675872C4C68D3FBF78C8ADFC284E82C52C64477D228181C8697C9
+5E98D430816AB96DB01299654FB097DC281F0A60D9F03F84C973A6AB85EA5889
+AF3E8C64327D25D06B766F88973D5C75449D258D8F7A8F1976867644EC49D2B2
+AD765695B57D3EF8B8ACF005EC4A6083E30406C4887134314AF75BC66239B2C6
+44D663071AA7858CEA822B1F1DF09F4099D3B0F7A40809E08C0417BC05AC45BA
+30776357774331D19C0937E7DA9B93E490CD9E58D68B227579A840563DD0B5FC
+A6FF6D2B9DDE5A86AFB467395A2DE7F0F17494907B5658E29B518078C19D6E49
+E9FA0BDBCD3CE2579F20608BB5E9F6FBD30BA9A9A7BBEB411F348F69680DE209
+2D450CAD4AA515EF0744A9AF866BF129E92C57D523DC7FDECB9495F3CB72DA82
+5C3C50BBFA161BF93955972BDE0B44AD8483B519388A72717F6CF2D96F806F5A
+204141542454453EA24A95A4B7BB7EC8530CFA497732F57CBC4F6A778EC05F81
+4D479F48F6CEE8E893DDF75B3C6429D1F593659E55267744E046627EF474337A
+996F2FD56F2109879BD8A98B4C7EAE060F1770DABFA0973030CCCF297AA2B3A7
+5AE3C82E164304E43212390C4BBDE2606B124AEF5BF5DC9405F39F76C7448574
+589A6074EBC89C5FDE3542D723ADE4ACAF83C617D73BDC4CF4670E414A0F7C17
+7C0EDE2CCB0D5A10F0EED3CDF41CB790BB8EA61CF1AD9FF3EB39CEFA61CB13DB
+378DD50F477C9A5FF24448A750699CC73739254AAE0E26886195B1CD7501DE9D
+B60CAD2D5539BEABA6FA7BDFEB572CA0FB6A8FE46C6C219834BC23B3E4DE6BD0
+522028E9B7EBC83FF1E17E28A3C9C1BE0227536B3E917E6C2523121B7A6D32E6
+A007CCAFEEBE1633D1B8ED9C0F2C9D6E23141E75707FBA37897E4C0CAD0E1BEA
+603DBCDD7747690BEFF6314A18186703C62FE2903C7D782C677AAFA105ADD4CE
+C91EB6BCF2D327A3A6406C626A07A18473043F3E1B8038F873048F25B228187D
+7226BBA7763E9DC0B43895C088EDA7A6A1E367D905E477F41ED43EF267B86CDA
+481C8FBB1BAC6E6E0AA4FD2E979BEB703BC7366ABEDC18F71942D87928155C75
+1C8B4EC74C2CD9ECB7B19D9864271F8A4AA5F57D5B684471F273095A07892C91
+C946F615723E17E8025FBBFBAF16687DF65BDE23B92BA8FEDC894427C91AC4E2
+A3605B5D49E1C13AE8CC26902E92378104577A188B45EBF878875FF1B574F34B
+9C2BA7781078F7A9CA7228E781D70A9FEFBAE5AE8319AACDA99A2E368706A2F8
+D068FBEF3A103ED7D71223DDA428F36A07DE9A9B6C26F3728296CFC3272A8E1E
+7B372F5D9CA4FB010ADB189075DDEFB7488F481E6BF8490DA0C23DA26E2F582B
+1E0433F5F019AEB91C663C7B4BA4FBDCD53CE9FEB02D5261CD78A1C17C30FE54
+EA8455AAC1204908C191698FF7E1CD58B6C766A6DD9E68AFCB0D2EEE7FA1338D
+E0D8072E2838DC80FF6A028581CAB8E03A59B1BC7280EF55B97DD4365A28905A
+5D0D198E6930333FA1013A152F5DBCD8A36DA7B52CC1BF296D768CDC7079588F
+407DB466E7B70BFFBF82FC6751B65347A9523823E992354233DB98E838EC8933
+45C0C3181EA91C8CEFF04937B63D0DFE2B46A421820BA8CA5F5499D481868E51
+CDC4596D648F23F5AD603154996304A2C27EA1CA6E415C2F15BDFC6B01D2FDAB
+638DAE9355FDF19780A42ED36A33E9D6A216D455253BC4EA831C1419F5DF7159
+9772F00CF17AC084B10C4F11860E31702C911EE925B93D994F67E2926B73213D
+68AB7A0B7B42E150F3CA1E30BA0ACDF4DC74931E6009334B33035201C698F185
+57B132858F43B7A1DA50415E3D883342665118C3CB952B74BFC7BCE4E613A0C2
+E73A167648E282D8235FD84203EDFEB2A8899B4C9818D91483715F894657C032
+A5CBEEBBFC10B7C5AA59F8883FF4E799E0C4728E568F46CEBB4AB0929DA6D001
+A8FA70332C827535F8F05CBDDCCEE7178C007E60CA1AC783741307D5CD9C3199
+E673C480D0BEAE9DA98ECCEF3BC798AE5286FBCD3B9C0D4BCED845E41BE0AEF1
+763D293C78622EE9818DA386CB77A060B5296E06A44661F1B2289B7857C73425
+C28CA50441AEC8DE567D8504355E34ACBFECAD86A95E82F0D5A09C402EFDB239
+2A499DB371B08634CC07C592CF407738A667DF57D8417C4CFA790619309C5179
+82160A93C4841844CEEB8030B65CE23CFFDBBC0E9A48272A53A9DEB47C991A44
+5600168B35F73748C7EBB2460CB56FD313054E15F564254B074C68489BE6EC8A
+A4C16F287CADFEC52FB61BDAD3E1AC87518DE6CDD7921A166B800C03E8F1243A
+2B094B68EBE2691D726CAA51E554F96B8ADE6D019C24DD75C7A4F038686C45A7
+2268359BC73D4F0154DED87B863937AFC3EDE0C56507256C0230C43213650D07
+93BADABD4A9C066EB2B3D9BD43FA8169D87791C3A9287DAD03CDE950FBB3676F
+D3605535B5D7C9BD0118308F5A94C4EB29E842D1FBE49670FD7AF78DC31610E2
+4EF86FF61693FAF103AA56DA7A920A25B394A461423EEE8231A1DD3FC34F927E
+26A717BE37CAAD64E883E2E22C1718C1E9A4E69C977DB13411D427AA96569E9B
+D7522FF889462400293E2FA2F4100340578D19519CD9ABF77EF8CAC1571FE000
+1080AA77E574DD6BACFEAC54A1FEE5CF9B6F7E1E7429C4E3B20C4F492D8B3B91
+9FFC3B6FAA8AC36FC882AD4BF6171C5147177DA06295A82E24C3AFB404C200E8
+6103733C515894B0FB2AEC498FFEB5A20A8E020D29A807CBB9C3F7FE0CBC7175
+89BBA2230D6013A3C42588DC018714BF4FAADADFA6E31397FBFBA428F91F79C6
+9A757C636CDFD43E3F6214CD4FC2B56F10C542D7C53FE0268D8D30AC95A2AE51
+3A6401231B8D18A9C57571086CD8F58FF109E7AE7BEDAF804A6263A439D4BE3F
+94CFAFB9848B4903970B58DD4DE26F629AD2E2A2183CB3054ECC4B9962A89661
+64F15BD83E84AE8AD4958115B00E557FFB569EB78EFE95042FC0D73CF577C624
+ECE57E45F135BC904D5C6722D791040A426C9766C4607CD5CA7AE54298ED38FE
+60ACA2735BDD35A88F5B394990BF320D533CBFEEEF0FC0077300E6FB3D808EEA
+BE8C4416E964A5D673093480166B503E7C86431DE792F71B0025541659E26667
+BF303598A53CA0400DA9FF896D6114F5293FB6AE8A1481EF79C044AFFD1C3DE4
+8A06216AEE80BD03D1C579767C296C49A9B4434C3317A19268E3FB8162198D56
+3611EC062C551FFC5E17A76DD094B1BF2DC29FB49E08537224389B666D105539
+091F8CAE03B5C33AFCC39F0ED3E0B154005BB452E76C73BFC3C79DD85E11A59C
+95289C023A19DB7F061AB2A39BA47E1A9E81547C73796CB226BB8A55AD2268E4
+5564A217DD47C2E21AB9D1D816E47A9D195022251B0D82989D0F4DC19CD954DF
+B1B5BDEC1D7DFF81988967A834D6236549F4D4F484A7E173B2400CBD6E5839D8
+B5C5EF5DBFA5717F8A8FD61B0319067B908795C08BE68961161D7B898A80D9AE
+9434D738EC57737E9B2DE0A7CD1289629D94F21F872442EF3D0267A4424C1398
+309295B259BCC8F2C37A1894F347478DB2A7D4A4505942CC5F7ECF884C5D885D
+ACE1EA5883050D0FB58AD394F96AA583074ED9BE783D6B7C1B12A02DB2CCCFC4
+EEFA4E50C8FA241CF4BB972C19900F5B0FA8E6CE6F2C2B1495C996D5B8D1C4EC
+26100C8E5A4338685050DD2D2A8E5395BCAD3D9064805E85AEC31A8B90EE0978
+680998678A2D5522316D7D1F5B2EE30353CB249E7DF0646D07E0202DD1B7BD9A
+66B151FA113C809DF13EB798BFF29818C2CE867E32EF3FEB32BE7299DC51157F
+CD9F9059E4CA3A87DADFAB36F4881BD781EC929E9A728C9FD2FE76B839E84F35
+4B4353C08F1A95BEDA491F4379235C4DDBCBD70CBB2BC34B563129F506293EBE
+C5C516EF82B087695FA0F1DC412C3BEC7142E5D19368D904F8D2EAEF62FD0570
+DA36CA4EA8B866F9B017E7012F4A8AF1A13FEE0F9C568A7D6A92AC54679E9451
+D7BBDA3C9EB65A15BE4EF37F7C60569DA22F0BB241D7CBC4BCE3544C6C78AC67
+49226B987356C108626B7F07169F2B2CB49AF675AEA691D04496E36875C1D8E9
+C4E792D5F617835201531BD533CEF81C26D754A63460AD3927989ADB385BDBEC
+347219074B8E68FAF8D5EE8A26635251C6A59D1122C7FFC71C2D459AF4616E82
+23C0FB4FE06DD91ADCB2C8C1CBE7B2E7AA01414F38E93651A889D4379CD4BE45
+F709055A8BC91BEB8345A56ACCA76149A699E21AFA6F6D423A4A715D77DA669C
+51884704E172744920533D18E877EB348010C909946A2507E22A3CA3E3041EA4
+60294E8F205528062DDFC3562733BBF0922A87CD2D5F421FF9FC94AA2D380A8A
+BDF33CB17415CA97A74009E70B0A7DE15BF1C714C8D63B72EDCB0E8AE1C6986B
+208C9AA1D0B6E9453DB51E4054B0E4E4A544F713BCAF55B90FA84E5DDCE1F132
+3FC5DEE7BA419E006677D2ABC0E012385A049C3B9C51841FECEA0ECB262A0CA7
+CEE05A69BD5BBAA0F8EA06D878AC3B81829D3891A456BFE19B0D9B06B5D715FD
+1C0BCC3D304FE9F1C830DE89F6D526BDEE9E886621C13BEE2ED59169270F686D
+01A7440CB9165022FF6AFC8EC4FA7C17741FDB6D2FBDE95873DA69A4F8252B8F
+7978F7314A143F8C0414F532B504F6A6A42ECE5C0F09B9B3FFCCF68EE81CABD8
+0DE789A64AE3F3F7E3293411B15D1BBE264355F096FF90250D0D2D43C3016FFB
+2A59F70FFE9636208054ADC08C8D02F9DC2AE567FF26A95D67923343C169CEAF
+F14E4CC9FAF053DA5155520CFDEE63169924357A5C3158FC3D43A7A42E4C5E2C
+9A641E6E25FB2115C40A03472C5B06AC4D65A1854985F782B387EDC26ABCAF2C
+9837E7D331E57EACD575B3349D17706C398A79BC015A0B01A1977459B86ABC6D
+BE555CC7776C0C7DE01A158608A0AE3A3E9289A5D8F2CBA9D6C63EFBA892695E
+B7534C0453EC26B7743143F2F1002AD757C177F5D7F16436DFF4ED6AD12CECB9
+D9271BDE6ECA276C3B2AC065029563932B5D7E33CB1B71B996C947546900987C
+0E4490EDDD6EE78B6DF8D723C19771D36656F3ECCA752ADBD68951ED0E79D35E
+D38852D8AB1496E0960D14C1C8A687D31913589A491EAEA3D18696AEC361D483
+4FFEBCA1FB33A8C600EBC456137A7687F4DF40EDFB9A3B080466C4A470457538
+3823E06B9E6DFB287FA7BD7042203D0A6ECB0E47EDEBF97016D831E0569BB60B
+F2DFB207C631EA5AB58FEE4D5BDCBBC4B41CF0BB1F4ECA465242E509D145538D
+949C0233F71C27407E75B11891045C9F7801A973EA41AFD742DDEAAEB504ED4F
+64D6E0B7FB9263BC65823D51D593EC42CFCBC682CA4770C0CED5B238063DA5D2
+716A9205CC862023BAB6937D2A18FF5D618116B45623E06172EC30280C21388E
+4D53D077D5EEB77F2B300C57FC3ABAC1E89AD317B46F1883F5F83E7A8AB1891E
+8110ABC7FEEBA203BC9F2EE2982D77BEB0F23904EE340D6D6F72B1BBDC76FB3A
+8E69F3C5C04F29E2AD924C390DEEC073AFDF3784DC26B85B7F0528E3B61339DD
+1E341DF261CE097C3BB1769FA4C6E728D678ED7B928FB44E6BED81890CF233AD
+DF4A72B95F85BD95C5645D8A049E89D0F94AE88ABBC66F5ED01EE9141448C37B
+D47FF55ECF86E13B47EF1AB27C5CA26F7C2DA5841D47B3E602CDB2125DC345E5
+74A8E293DBF4032168983A6B439B189FCDFA5FCBA97E166C65FF0641E0B1A7D0
+9AF28005F1CAE32F1D95A27BCFF98C139911199AB6CAEAB49728AF2B0A0DB6D3
+7419EAD54E2EC55808C6C176EEC97477FD65C11BF88BFC0CC39BA742BF841FEF
+AB317723C3F95445BCCD5A3ECF82C78C262B200894C983AF871912E47342C0F3
+13AE004F1E05CD83125AA4AA5161B1DB9D3F1A960E682EF93123EF53145A9C24
+EBDBD744307F6AE52FF1D6D43C3F667360FF48673C59D04F12C3AD8FD361C4FC
+8F2A902193D4EEA3E9DDFAB0D323E2E49CA4B4FB691F9635AF026CE1DC94506C
+49D68F5899BFCD1B947C77A77B1598CAEDBB7AF0F13221B59604E91140959F92
+8C49E5AEAE03C019BF6D2FC50B5BEE2BACD955319BC969EE0FA1752BFBDB1380
+042B1C0FD79AC43B5452A1BA2281982E73F681FA76AF1C9C4F4FC38EBBEFD865
+4648D27D218C40BD2C1629E1DD79263FB7FC2005BB3D06C9EBFFB22F67F356C3
+D20EAE1DE1D11ED1DB1D0E6F2F20FE98A28EB737B6F5B3307620A0199A076B49
+05F16F4D4A9C39E1B806BA6ED58B24657C2427AA6C987619D213AEB93B3754F2
+E247612FDADA5F5AFEC1512AC93181F8DCF831DD78271F12D28B0250440AF081
+5C141B11585D8929ACE6C79BC97C804325EC5931EE393A7B964B14B376694460
+9C0858E833FD66D0DE9B7D6BA33AB8FEEC15C99E3E5D329676F0EC2FE5E539B6
+4957002C77505CEE1027AF7F1BA529B45942058EBF4EA22F1F7FE3C5DD93AA1D
+9F3A228EC45643CC629AF5EDF9A4A33EBDB7CDC0ACFF4A4326ED51BA05C88118
+ABC356B35D4DFCA057D8BB3D8ED04DA0CA49210F352E589748E63F2B3CDF7281
+6C3E8F46B9C2DF790FEAC41637366274C88DC4C6297F1501436602AC7CF94F17
+17812F8230CBF820885C3BD086289B845ED8F6B8B75015744DAE3981E8A1C691
+93B1D66ED2E41EFD86C74E12276CDE05A3A929E529F7781F1E49550B44A26FBE
+DE59A39FCF8CBA8F05862882D6AC13EB83C20D6115D4BF9509F8A506E5ADDAB1
+ECE74497A17AA12D1CFE36672C2D1A4F2DC52DE56E8AE6CD1E72B8A4F850D3B4
+1551EDEDA4FBA36379A26C3B3928AA8AC63B5FF9D24A893EF019E6FF0735FC60
+7E95D2F29AE0ED922BA57F85CABE2AA44498C160656779860006AFBC4BD6685E
+ADF006A4936E52637ABCBFDA6C8ADEBE083845A20B9978A2592F98A8E92F2541
+A84F2AD2DC12A81C071C0864A1510CC6BA44226B03E4DEFB70112B4EA34ACEF0
+0FAE9A6A783FD2911ABF67B974FBAAD4CAAB514DDC66C696C003E728262EF4C4
+4AF9AB3E23EC019EB66269B65CA53271B20CB71962FBBF8967293C1A81369021
+E89CBCFE25C124BD7A8A1F7C84DB681A545692C17C5A4C3D036B7E61C7C8976D
+A3071BA77FF9F7C9181AC0B09D02DA041981A7FED34879CD2AA43695CF8BF01C
+A92100BDF60720C5633E3047655240DFE1E96A85C1F021FC237F51318A9E82A4
+563725D2267D7ACD7C78B228D5A6114D77F9F055B885A279F7198F0993332786
+A3A6459FD9BFFDEDE996C0BEA951C2BFB14F7753C3599F630B00B6A44C46B2D6
+94E02C6E3CEAF82C3F730DA6486A47C2EC4722963ED34D3E982DB93A891A0789
+5CD8EE15405EC998AC29D6374356F8E4D8125EDD844183FE31A2E00102E276A3
+7F138310B428AD8D3BE683B8525524F14E6ED10AFF68127B617167F1CA432732
+081B87D78B6667E92BB1F5794C6A66DD830154311C59A43BF96100AA8A84BBB5
+7F201F4F25DD15E87F6A9BD20A34402E5757ABA204236C00541C68A52B8C6666
+FC3860679EB3C085B647796B424B598E97F6EDD31E1C1FDB740FD735A614B4F2
+93EC1CA3ABB24E4A2FA853AE8688E535FCC99160F55E28D542B2C48644ABF948
+168DA7AFFA42839CC7EBEC5068A78AD0468A6697D0848A6604CD020BD92F5362
+DFA41E55C003B702655FFA0315EEB6D622DEEA18126267998875C2F2CB9D6A0E
+4AAACF51EA44074ED7D625572DDCCC20982B43B7BF9488A5CE852CEAD090719B
+8C6A97257123E8EAAF13A06DFA4BC20801079D7636DF8B8D5F5B3C75968C441A
+F17903004DE8DBD08022CCA7C0CE9E0D784D7F571D4BC3DCE4AD4B4487CD7ED6
+7E4DD4516FEFEE7FF9D7190CFE093423D9FAB6D03D8C7607B9C8491AFFF1333C
+C4A5CA33C669A889D0C0F174E9AC7B2B81CA532D70F86D820A8E0BE35B21F16D
+C1099AB373DC1EEB63CABB00949B38DECC52B236AC8FF44E0F35858ACD325E14
+4A21CEB8281D10BF798F2B3E460E89E54A8B255A50623743E7C0797644C92832
+60F30A5B104827DDBCF075872DC910E480A48D73118D4541B19AC92B1086E48E
+CBDAA0C4BB3600E546D538145C6C449658ED66B292CB2B10431B5517DADC3269
+0652E4287731B70785C23D0A5A7BF2FCECD6481CA92758B74487C3D50FC8FF29
+FB973E1E518130D2662DDCDD6199422FF55521E0715AFD06C43AF2A99999A5F8
+B6EE78F74BFB8F845CA9FE3A03A50218495724850CC8A66C92A3C4827679B4E0
+02B86A7FCF82248A7ED56D5034A349F920FB25112CA8A84E7EBDE228DB05D009
+76B948FE201D9F56E64CF491A7DCE17ECD0EDFFA25E1EBA6A5B5F8B9D811F559
+9A341D65B51A32B2230FB689F0DB5E70967A2F333194FAC528AF2CBE72C31A47
+0902B69CEDB8BAA7BB1381A4D31EE1198324324E2373263CFBF2D56F7841E493
+90DEDC910506EA457385BD968786C753ACB24820E00D74F35BD07195E2959044
+0BB0B53AB9B29D14D0EC5A35ADB896440506D070D0341A5127241D914BD0F82B
+A8BE9416B728BA2BE4E0214A4CA7D354E229AA83BC5BBC744C811A5FE4994EED
+46C0103C40ACD7C5772F22EE718159A80C6ADE365F84E1327A5E8725D8618176
+7F331D3D3EF56CCE69F36DA9E620197E52CA7B818D4BADF758380F5B10764C7E
+C3B3ED839AB620B9555A2EA838CF5D2E9F014B9A3C96BB0EA054081EB07F604A
+E2B1A9758C336FD7EC9C7C2A1640725485C5C7B353D58FE00259EE1C709E07CF
+FD54165C87CFBACA6E3101C23601BF20C689BDDDB94BD6DEBA876E981CE95C45
+6543A8BCD8BCF2549C97401442E3ADAC213C1885CCDEBE8AAF47A58FEB1B15FF
+F2208DE4F031C8415E83CF7A6611464B491EDE2E9AC7D9AA84441F9A6532F44E
+3D142F77EBB3E8033F23C93923F0CE6848F5AFCA7AF0EEF8B8DE8FCE52CA1C92
+1BEDCD239C712A1E6CECD22EEF42A99B6640D59C848F9C630F52EB49CC6E881A
+0C2104A3ED2DB85AA79874C5072389A73878C01D45AF07B73ECD178FBFDA6EDD
+7380E9FD555E929D92876138934B8434B0774E378C1DFC1AA1E65EE9A4C69ECF
+0BA16C2B96CCC0F22C8CB492965A8F6AF7322E4142D8A40A9A3B291685B0BA10
+0EAC0E2A92B955B7A115FD3F75B0F081ECBBFC40B4E81B76BDD5F7CD3255E4B3
+2EC25E35718527CE70470C47D4D160871C8F7415F80EC718338E41FACFA607E3
+C29F11193EFDC1C96D24D9ECCDBDBC5A0541FF5ED2915623346D61A71BB2DDE4
+A273CE9CD37FBAF6903058C7FBA3CF4507DD723C983BFA5C2CE4651E2B3ADA8C
+28D1525C8A184140BA42C0B1878C5883581826D7F0C02E6753526FC538C0CE33
+CEFA24C86414F785D2F31A5BA161E696782396E117E6B3D21DF1EDCFF6930A8E
+4D8AB720D67F93D6F0FAA25894208574DF575EC31451CE3D196319119BD46767
+9E7B1C7E26CCDDB510E19A057209D1F8DDA77F830752735CA95B8B46EE230338
+F37D528BD533640FC7AA6F4CBCDD5F0154EED7625D9BC57ACAA90481BF18ACA4
+4CC17B1FA53AB188F6D4EBE0E89671BF9926B8B87A6EE17F782E1AA5289E1A12
+F791CF64CFA9BD842771237FCF330478A6AFE0D6BF9A80CE2CE48784D0F1FE7F
+E36517A0AF2778ADB4913DCBA5CCEA8F423CD59CFBEC56BEDDA8B3E03E048CD7
+4D670F5BEA7A44D309CAF775DF677EF3E6B5131E3F28CEE8F506990446D077C7
+8293B4F57F7FB2D175EE6A12A0E050802017311C15CABA6C5CC5D56F77F93CCB
+A25DE6C9DA9C304B98100B26C5BB88542CEC07C1C1AAC21501D933E2B2F74E8B
+5153D70756AFD54C0D1CEB3E70CB40270FB03CEA23CA0AB46BD904919A931769
+FDC333FA2B2D55CDD99148CD555C959BB511732A90DB1B986A3EC1F3251925CC
+985228C6BABCBEF2C59A590F22E1D1DF16D6654B35FAA7A1BD7ACC0EBB529437
+408628F19838384635676825548558554D6CF471178B8C0CAF16CC278F58AD3E
+1524989C16B63834A76133746B1A306E2F89C52A4209999F0E63DD7C85058894
+98C18F65DE1E03297C51BB581EAD46557BDE7155DAEB76F74E3F00A32271F5E2
+E7E909D1826303032047F61130FAF8BAEFC77D524C6D1F8F2DB87D1D36F1FAFF
+5030AF4E0BDFE670712B3F01DAEDFB76C93CE59B766295E1C766C1BB0552751D
+EFA83B7080B6156FCCF1796A68CD83B6BCD4DAF3353361F6A79DE994F0833A15
+638AE470FC6672593006E47301ED6A1C8727388AB31EEA34613CAE8E8AB07FD7
+6A18E36309FDCC4834F8CEBAE4AA648754D679DD4BDD86513C851A8102399740
+7792F8FF58081A0B4E84058E4C1A2D6BF680CFF926DCBDDC05D73627B7980E94
+D5E410848B1B6FC742315A2ED6F25635EB0D734C82480157DFD2F383E6508EAC
+EE70215C509B0B2A4DB87E6ABAF2E1AC115E6E24A55815703E0E054FC445CF86
+C1E0ACEF9AEAE22EB5D627D7E96701F93D080DB33240065D31745331D210830F
+DD0DDB83FCC6E4645D54012254EDA717ECDEB5C114D826D8F2E95FFC67948335
+2B0E77D7541876CB99594FA3C629FF182A7BDA378C823826AB0B24006F80406D
+5DA1BDD296992542E75B74CD79C2B4386016F415DAD1C183C3330252B1CDEA5E
+9129274519705F35769DF987B207CA0C68F3E6247F6119B01802A55CA056AF0D
+E8247CD5EE363A61D10855FF3A495861993440F77301477FB4EB0EFFA5D71568
+D708EC717428323DF6942FC660961D005CABA2388F00575F4649F9FCABA1779F
+88F964A301A6D5D1FC02B327B55730031CCF60ED2A15E6039471FE70B9C83C32
+A25E93184F3A994CCCBD2EF04491851D59DB819DA46DB076C3ED8230F0AF49C0
+A2224E5CA6ADEC27C15D0642EADB6A63628EEC98F6E941394C71DF59846ECBBA
+E7BF50E44E3D78994167B63641F8FB22460867CEB24CA37B08C91E49F0C47D13
+10F05348092FEBA6250C635FBA5C5962AFB24C950DFA5CDEDF063589804173B9
+EC2979D26993378BF16CB04F4EECB360182CCA00094A7E6C9D16630A1089B6C7
+B3E3FC864CFC613F2742065D4A57EF6559FA02C397AC666B8C9C35DBE5ACDC5C
+9624EB9A2219385CB8C83DE36D78ACB2B4A8A84D83C4DD8700534E00B4C4AE0C
+E431200DBC2C1BB217159174CF4EE41B6AC8746598A999F9F1CB98275D6D4CA0
+16C45FF79EF527AF3DB2FA45CE3BCB2E5D46D6A8CA3B7D81DC5679CC7D949CCE
+7D3F61F0FB9313FF41878D6C7058D8B2D3525D65C7FD7770D119E7C4E93898B1
+6844F80F0ADF8E84DD888594153238CA44CD3BB791186B47C66F6DA75F5E8FBC
+A623B5AA758C66F72C6E908E5490E95C1E73E674CC58B1ED4B385130382A2C48
+0D815DD704ACD6A68DDF70D5DD361ADCC1FC831C9680C02E77FF1413A025D992
+27C683ECDA0447F1A027DD1A47CCFDBC30AA59D35F731255609B509406D8C22C
+CB4A0BCF1654060D52EB4EDF21BE9F53CFEBDF408C5EA49B22A7909193FDD3F8
+DBF9F403B961F6412F2D27D7A1CF7E18F46630A0CA925CAE8CCB10CAAF42A5BD
+BF21F7845DDC89B892349BA7B4BAEF3B85593FB06A267075BFEEC3A857CB73F4
+402EDB98A70D15F48C2F61B3CBD7BF277304DE6EE36E9A55D2A1805B37CA9A13
+B37F00DF6FE4F8508305C3FBF257A7884A7C4D95B6A7DA6B2C4BC6465E0B8054
+77160504FC1976456543D6AA5B521E88A74E5B2FE7AE6CE5BEB4BCA8683AF38A
+7C6059764A7CF8E688EEBA0CC520F2AB06A61A07CD0222D2270ED4E17CED6C77
+565A18155B38795CD27D7001E06EFF2C41C80404884E878B64E60F13A901CEBD
+B0AB679183726D2808497859EE701055276F2F0F36763FD9F58FC1190A59B9A2
+65FFD2E0278ACFD8C6C575339D8B459C4DBDCBC4DD985F45AE1C7AD96FBEDD80
+60AF0F7FF0FB1C8960BB4BEA08B115BBB2B3CF7CA09B56622D59CD9403C2B2A4
+4E6A7E47B8CD864C07648D07AB07E8CE9173BB2B9C349A282AB8BA11076E1201
+69CC0C54AE2E893FA5D95E1A9440D9F991E29CAA259220DE5F3B99AC86DF417C
+0F50FC176CE4A0DC9EE549D2FA86D80629225D51F289674963CC78D11F8F7406
+85E67DD88CCC905FD02C0C7125D7F7C2029114E399489DCE1490EEE5DD8BDD16
+BCCF12ABA0D8E5D016874943E64EE48A0CF3B544662F1C107F8E75F32FBCB827
+6B905EC3F579BE9AAE714BCA85FE11E8B6E29DCE0044AB28A9175B0CF183A0F9
+A43D9742DD8E1AF097D3450F83D97855265B9F612D8A1C6165C339F0CE092652
+F3843DF0A898EA13374098110F461C42A17A10F73127ACA85EEBD115225B3FCD
+870CCF74E7103E305AD55C8D77B528000001B2593FEFCBE9014AACC6E83581FE
+E0B3C455B02970E509EC1C54120688DACB24517BAD30395B4261D3E266C55FC8
+5CA30725C79DA01BA71EAB826745A22DD24AAAA048039BEFC549538CCE9A4F3B
+75A50AF2F15BADC785E37D65A772D919482362A3E7A0EF75B61461CFBCD6AE1A
+7941F680FF7A0BD04182C21CAEF966A52DD4CCFCC22420CA5433D148A0D88EF6
+32AD0BF5CA6F3E031670EAD28609AB31E3EF73A4DC62C984CB953274C53F4F9F
+165ADAFCBACDAC894C0523646AC25509E65DDBC032E798EC31CE2608F1D89B9B
+3413911202DF9C0B291BCA78895AC01F4523C7FA4174E2747032E38B32716E23
+00A6F1EC49633898D4EEB694DA03E2E68E607DBEEFA851F685D6EA3F242140B0
+FE1C632CAEE6E741B9AD5D1D51C0D7D6DADEFD3C084E152F8D3341C3ACF52469
+256FE1C5C7ADDA51B355DF0CF42604C9840D6C01EDD1F5022BE5B15E1DB2420F
+44DE5B6E7D1CA024F1DA52AAE5F2B3E080B95D6B65914F1A8D7D6B235ACBE85E
+61493A5EB7C06CE2C3CE32A42D9508AF914D4ECA8EBFBAE318E6692DDB02C811
+DBD168004760E33BE0DACC8A5E77D7850795B7FBFFDD85A7A12DA088E0D04CE8
+5946CCDCD41C221A1E9729DDD097218CB4783DE0AE30E333EF00A8AD42DA7C06
+BD3BD7716C10EE6F801D3928277AA87225AA33E8141A47FD9BDD64FB6D29C60B
+F91DF1B8BBF9154811DE01AA799F5B9B1683A380429550192C09F052F027CCC1
+D42CC5B2E0C4A0FCE424D50AB5B82ACB7A9B1C7838722D3DC7E84A84BCB67061
+B204E8D1715A8EDDAD4EB4EFC2973EB418666C7F57580278514A6C5D0869AF3C
+0CB1D99BD5FE72A665380ED04AC4BD8379A1D5B2894B82B8A5EC319302DDF62B
+ACDEE383614D564D8FB8A7C6E6D1FC5C5B70C893ECCB540540C23EFCB7BFA574
+10D7C828495FFE4D7FEC9FF1F727F9CB0EFE9536989601F746CAD0EC97778E96
+D62380591A4B2F38CF1CD42A62B1DF45C760753E0E4AFEA5FB90309D412BBBC8
+6A1FE55FAF842BCD90BAD6D491061BCA6D8E589675B9418723FC18D3FAB84CEB
+4956C5868435D6DEE4D4F9172BF165C0C22BACE30A0E10B54D49B04AB0FA95C9
+921E11B6F12913966E2488EBD830CCB05F02AEA26A0E87C98ECC85660BA28C1E
+F9C2E577F087D8A844537008C8AED065EEF36CC3A5FBDACC6756EEECA8356873
+47EB1F955743F051D9FA4F51AAB900F7A8F656BD967FA52CDAE022EDB5BA2673
+C775BA4A6FAFAA1243CEEEA4414A1B2ECEF3B40BA6262135301CC62A355331FA
+1EB4009CFFE5CFC9DF8391D9BC92BF3E666A3B22696C567F6680ED5C4B5829B4
+8A6EF11B93D084AAF2DCE69B39BA46F28131C0B45EFA3BE521822CF75A528640
+661CCAF1B95560682208D24203D6DA466A4C4260AB717BB1656BA8846C4DD7C2
+5E8A48DE389DF43DE66BAA55789B20360D143F7D89F5A7906DCED9F51F8F18F5
+F1C5B170B883F7C389FE4F935D9EBB68F3EA8DF84E501C1F280F8849BC476181
+7950935420C6CB6C7FC4A470966C7762FDAB91FBA0D6DCF03CE97660B3F9E054
+A63216C80E878E319CDAC223EAD23BC143A921C6619B7E522362D6F37F5EEC98
+F7CB040FE694AB48051612955CCF098578AD99B26736D99E3792508507625070
+12881AB347B1ED8F489D4FCA2966944CBE0F62174E2B76E613EE541E940E8C49
+92AE79B2FA6FD6F5B16CA72F10CAB2A322A217C316E4B4CB99E888987BA0658C
+358EEDC1D85BA4486B479E2A2E6030786CF13889278949EE21B21D8F023B2CD1
+901FD514EFE94982A0C1AD2BD1C98E19848A4E36F4039EE0F4687FCD9C65EDE0
+5CD331D4BAA14998B24C0ABEB19CCEEB98611BA87F7BC01CCBD1AC749DECD76C
+6D3BAE9B89AE22653BE4482ACD59A35DD0DBE43406E57AC36C5307AF81CB00E0
+3E545F943565D0D925513E85041C16651313564518F604AD60C7F24B14DB7C25
+34D8E4C5A0121FA194AC14E86AAA4E14305F6948C6998B3ACF67CA8BF1B12744
+5E7EE111CA04335F78DCFC440E9A99AB34E60F9EFCBB233A9D20458DA9405D56
+57264169160682DDA15B1B19A2C599C1671D0702D3AEF14B2645C6500C07A7C2
+D4B95437F1EE7D8D0DA247F54D4E68399487CB01F031B63760511FCD2858F1BD
+AA7DDF5F3D0E4CDACAFBCA0610BF6DFCAF0046DA73542D5AF1E8EA8015D76A07
+7382A7B4F7419DBCE79A551D7A7CD12B1A8AB09174E5A3548BB56C0BCF4A87ED
+18B7B5A9B8375AD8535785C2DB59FE934A4BA33E8112C6FAA92CC683CE765D24
+6E6152964086CFD1A6CE9191D1C59521E98CCAAA407F093AF076F250AE02E0A8
+2835EF3FAF19B53EAB419E2677E1A58C742BE93A55D2E6FFB71144BABABA674C
+B972E811BF7857D3BDB809C0F23A51FFFF2E9160FBE2ACE2793EC2A381210CA9
+BFB1BA5F1576584EDFA3E904EF4A208350866A1CA232E6521018F245F33A9FBC
+BD3B09FACEBAB6CCE610CBDA6170F0D16E477CC664BD4FBEFAC52A887A1FEE93
+C0143336EF77A46748F464F1403791CF0EAE32CD4DDB4F298A17E9EAF1885666
+4E467059DEFEF575A9E0C4AFE7A3BE402CF79B2D02B79C42B06684CE5875A9DB
+DB64C03D668BB381B816A6F9813B2F5E2CBC194B93791F3BE0832AAA705D51F8
+1C0AE8829D844D5A1C5B9BE2519C921C6614D5DFF978A762B6D2F974B29AB353
+94166E26F6D86CBA714E47F84FF0A0CDF672271AF9E2AF7E2E8B743D7EE30E15
+C165FA7EE181ABED7981579A2D9999EAA208C7C8B33B9C6F95FD586CBD9354A8
+3B390D280A7D8FF96CE8A5C8F91DF9935F5A684133534C99A5918781F1B26C17
+E2436EE11DB1E3F104F7B3EBACA254B1FCE4B01FDE4183805ACB425FD8B46CC8
+04C1270FB3055101BB95EDF6E1D076A2A7FD3C2F97BC65802962E7EC127FB969
+C07E70F4D2F53AB08970C61BC6795CC95499F1A2C4BF9446FC4B65B123F81A0B
+60C6488F593594E6296844C0959E0AB0C386CC76E769C7D325E1BE46926DDDE5
+1EFFCC709F7998ABCF24DD1865D7C60C6527D0B06A4B50725D1C3384EB164111
+70D637D76C3E3EF63D0057B1A0F970EAE0613F3B94B025C1CB733A4BAE995E99
+3C1D5B00419B2AEC1300C1FC9A9E98F5AD5B92F11A90E07D32E8D6BD040E78F1
+48FFE3D337EE827CF632351057B0C568A3413ED28343E0F3029F76DFAC3C738E
+90B243F7D6039F6115845EE2EF471336C4D50FC48BC09EE001879FEA9B5BCEC0
+72EEC9FFE66C377390A5651677AEED0E1AE6800C495709B66C7F5FFC9974BF9E
+9DABFD11A00F87FC7861180133E09A718D7685953600600A669247AA8F25C483
+0C72735CEEDF3BF9BFA88C178994AF71A16D84630B0FA21369F5AFAF22527409
+3DF33589BC9C61041C8AF4879CEAA373523D99C34801809EF4160416A13F5D38
+14C0B9B4C95B5E7CFE6E70D61A8C847819A9D2AF78C329DC67C123E45E2E81B9
+A0EADF7B66B5D7524E6DC225BFF4364BA9DE24CBDE57667D694D6628D7841AAE
+49008D71ED25B845FD19B440E6AF9B5F140558AEFB89546BBF3B434E8ECCD005
+E8311C43B54F523A04B12D9B68400A6433AF4A8BF56A6E9EB36827DD1A5AC4BB
+724636815C3149AE97E24C03D9B7DF5F88343F26A7335F47265201ACEB998AD2
+AB922BDCA39EC2036EC2721EC4B4180257C931237635B0C395A73C0441C202DB
+9955C439043F04AF3125BB2FD696884E3FED05EDF1F5303D6BD60325CCED537C
+0995E73E9F2B962FE6B8816C5A68FCD4D325A6865FC7D57A992EDBD05FB6E92C
+C9725682A0CDC3214BD57988D001A5F62FD8A7C180C4F699A6EF7A804DC3863E
+DD7A20181CFBE117109A793F1EFBD99392E400F3DDD6C64BE64BA05FF710E605
+7D564C9BB7F666CFAE8076F2E4209DB688CD864BB58965B33CC7AD08A076FDF0
+3CE533959C33732D444D4ABCD35C73B6CDD1CD70CF072BFB175A0B5476B062B5
+3A637FC14D8DFD7C44DCBDC78EA108BCC4C8E094C4EEC35C9A399850BAAEC9C1
+C73E525076AB7EB6F5388ECD2962F7BC6137E78CBABD857C035EC03272BD12EE
+46692B841ABA2A1DCFCE4DD3D5E6883917D06659A523E0D3E3227516FCBE9AEB
+7F28DFF0707E0AD6BB92A9210EAD45F69A1ECA248D2883FEDFE8C52F75A73B7B
+9C7F07C4AA92537A2E9CE45F39FDEEA6C9FF6CA915E3D0AC4FC67BC6F0AFD108
+4810D67B320ADB50D4D37AD0C27A7564F6FAF3E6DB1CFC47CF9DA097AA269A80
+947043CBA10D93FFC7033C60A672C9D3F3999222D57492A97D5A4D10D99E437E
+0C0289A1BAA29D449B2C17C24D780E68354D874CEA9EA4E02FE0583A18C0667D
+4FEAB0CF5286FE487C95C969ED1CAECDD9F9BF5EC8A36C864190C73473C33162
+20296752CEBD6EB43144764E6FA12F60EA605290CCC3C69994BF0780A0BD9257
+A09FB9A9D3A5272C9FE2DAAB7975A5DCBD78A67E4F981E4EF224986C110F472E
+F86E07EEB1B2B8325D4DF7E4751215C7DEB987CC9662B92590889D64EA31A1CA
+55701D52590B3BAB4F0EA40D32CE6F98D6193BB6F843FD6FFEDFCD9C2CEA3A18
+917842BE0C2248B22D5AD817421748C36B4A10B6E65BED5686FCF26F4BA1C933
+1ADDBA36F99AD0F880DE81FA0C14AE93074C0D2F32AE2197ED43E3490C0A8FFA
+0D747D1622CFA8CCBD48E8DC112A1743AF9C7BCA93E5B5696C46A27A8815B167
+BF2896574824B20D9C1CADF443982E8B8ADF1F705AD3FD030478AA79D12DEA5D
+F5E3E9C309D9F3F360525044503A563F06AE33FC380C3DA0E0EACA854B23D030
+11897C208EFB2EFA86EE596420DE71B3ECCFDF3678888606031FDD301429AC82
+92CD38D8DE1C888EEEBAEFF6E5C9AFD6B2F8FB8B283E68EF1E12AEC79FA23D02
+908DDB7755C11E7DD339A1F2AB6AFCC27FBE797D03D01DFBEDB1460274C8BDBB
+57A48FF118324F231274183E0C00064893021BC8F3B52C7E784881A31D913F17
+19675260415F19D5CDBE742FA47668A6C3870553E3FA0CFE56CCF589767DDD20
+D4540E734169D2E1E1E979F74369EEFD66777BC54361CFF22291B76CE36FC987
+D78E9A4D17C75B8DB9740B72859A51B65E0985F1280983F224684E7300191D62
+D8248056727303B6FC6CB175EC5C6E372180995A44680EB012A97AF3B770BADB
+40FB89E4D1A48C46B1F56250382AFE36A674B92D132A56F5929260CDE410A744
+40E8B4262891CD7EB6CAF8DCBD3C58B46A5F0E9494651A2DF23EA1E3C80A2ABA
+0665C9562DE3719F15473F9138C66CC24BE1DD07C961F7F64E638496911F4FAA
+84BD95000B76D644EA13B94A73A1C41E1B08ED9A978AFF4BBF6567ECCB823D2F
+5FF935156F79A00BB188BCD617B6FB2541339E4CB82D196BA067DCFF9DC6D401
+3114E16A003D4722FAAD466AC7F0F932ACCBA5A7BCD038DF0C39DEE32E0CE33E
+16D59F60B06DC9561B40E328F8CFFA55042FE1C52BFD8A3273CBB02044CD01B1
+029A457EB8C8AD1CB1901140CCC5E8389416DCB7639D7D0A608F20ED96CAAC89
+F73DCB332055DBD161936E6A1EFB24CDBEB8AA69BFC7E2C4AA083B55D431235D
+21B65636385C41EFA278C440D24743FD2ADA13B62D53E7235A54760771C50DD3
+608ABA221A0724063C839E96306FF87344532D03EE2BC70A223CB6FA74964687
+82CC44EC76EBC8404A42644852197569B1711946ADF595E8A6C7789C7D8720B8
+371059305ED1ADE8B01C494FC1342154916EAEBE3F7732B595A840C7A0363839
+0977D1EB502C15D6FE8A368B398C4BD7977914B072DF30C4BD7DEF9EAB7AB5B7
+0327D5AE95CD10F79DD6844BA1CADED35FDFCB17B8C28D55EBCDF54FB943B39F
+0F9E98494B1654B1CA280350A03A9ECA8B00B59BF0D7015EF79C48A13662B7B8
+0547E2E3DAEDC268822F6DE7CD6F14AF71F7E546E12B4E11AFAADC34AEE5BDF7
+1E90DA341B6CD373009C6E774B0916787F637F6EA5AACC162582F1D10187FC56
+39349AB0AF7665252B5403E67686DF0973104F5B193D8CC9F673B3D9176A4B8C
+9C31382EBD5C1979493FAE6EF2056A346F656EFA5B31922C434BBFB892EFE8C0
+6230451A3F26B98DD8E62ED4757460B1F0F5C813901F351A93A7E11758798965
+EBDB3A22144A7782238284780A9263B561FF7F1CCAA4D24DD2F37B177FD24EC2
+B372252825D66DBA7941B096D85BAFFA5C2B9F8AA4A31A30AEF5273FCE05F36A
+75AC322BBC88C6B7D11CFD48D6D70408C664145D81130A2445D643E7118C6FB8
+48A01EECC93A45D37FAB6680D32FDF09E25481E18C388241D5ED823EE6FFEAA0
+90BA7638DE302486DD4F682CBCB33871FDCE16B67B158816960B52E75A1C28AA
+F4C27D521AFD7E74A51CFDE38340A368ACC89DE2FAD37E34F3858A5C2DC7BAFF
+F4CE85374EA40E25E959A9B74834DECBBFF9FAE1F39FDD5D0E8863D71D27CF04
+4AF357E77B565F5EA577466FD4138A5516E4624C7214E2BEDF1BB484D3425BD9
+ED34FD792F2F2B9BBB40FEA9D0056FDDBAE1CCC72FC101AC94859A9AAF2E37E2
+39BA606FEB4689E4E04642B70E58DDE5DA6608E318A70E24B6C7B88DD7E5BA52
+8FBE8B99BA85C5444FAFA046574C9160A0A920DB544419993BC4A1E9703A3D85
+A97827D2AF45C8379398A4D2A9DCE175DE7008A138BAE08B4B9A6B52D73D1B24
+6787C31875B04E35112F6A8AF5A2F8AE9155A80C36C6E8EA83642397717383F1
+EA877B01DFBAE379529D16D1E0CCCA4B8C8B94F979251914B958F0713859605E
+6DD76A27705012B089059F9490AB4238107EF9AE1A556CFE69360AE47F66AD68
+CB48D08CB5AEE83A3A9D77121D2A599746E7B7C839B4C5CDB41EA0ADF56A1375
+8BB21918F49B70AC01273EF2C388F118806FAE2743E1DB3164F4D5F7893ABA6C
+B5C122C9290394F2A216261845738E66B7650C8CEEAD7452BF6AFAF54C8EBDBF
+DA5876569BE294EEE5B54F23ABACEE7FD554998C84B6450BDD689A10FC20845D
+89F972F368648CB8CF864FF6648AF21FAB210BF101BFDB3B354C6659E761EEEA
+31892585C32A18FBE8E4883D9D5CC48D84EA2F9FDB73638E10CAE3F75C3D9E57
+6810FD5239352AF7DC7DDB3704CA7EC8FA4FA3EE75FDBBE9AF058FFA17A32A17
+AA578E1A1708E8CB257CA968EEB34140804C224B2FC49643E5B3A3F7CC5E6C75
+6EA9BFD9FF9067675CF025636875588F8C7CA7E41654D7D3BD7A388B8F517686
+4DD89A12B204251AD96E3FBB73B5BEFAE355E5BA81EA1A1F17DC49647224A9CC
+0CA44F3D25CF352E184544A710CF6EEEE3E73DDF1366A99B07F47E452623FF61
+B2D94549A80ED356E864D58BC00DE620D39A41C8CC18B5301CE74AE512F6B8A6
+72CD753E7161956C6BD11D375787797BEC1B061237307B0E1E08BBA7A94F422C
+A77335BEED64C6AA2E850801FBF083E1DB91776FE9F7C6EFA3278AE93AD6A58A
+193AAE6FDF8B15B529E7A5A543609E3CFF4D7CD3A121E0871CFBF0EF1D6E39CD
+552A2C1C3160D13787E0F01B2C405B8D46A802F8026C5CA738AADDA72AC9B78F
+5957ADCC3BC0A3C0A201089663D1FD6B68E1D2020E83BB50327141534336F1B0
+9B264841F663B1BFD914522EE29C20E22AB6141AE15090302ABAFF5CDBAB2B26
+84F3BEC919127A72C6E1E35A7D69B367D76481231A33AF2FEB9470F35872DE5C
+50F82702B55FB3BFE33CB165015BE9F7CB928769DE116F207DFB5F6E1EAE31FD
+000D15ED943A1A30C4B4048AE9E7D91BC1B1CD64EC2C24DAF572BEB3F0785AB0
+0D74341DB2D399B39FD5A6EF44DAFA7933EE532E6D4DF024EE9D4D27C88B25C6
+5CBA87237B30917F6F7D7EEC1BCFE774B4D7E0859EF5E07071B58EC2B074B288
+E0FE19979B84ACA7E6E7FA1889DEA18A119E2509CCFCE53D0AFA66020624CED0
+C55C31392AC12110FCB8C81BD289FE7B6330D7A5F9B07994AB79A494F370A732
+94776A8C2B5E557C2F5CE0CA852092F2181C4EC8ACFB01D197AF975B5DA482AC
+59BD5C70267E811E80525111D17BCA8D53EE95A843F1000BE05E93F507113ED5
+751D6970485082915C28A673008B4F9398EEE609E483D001296F181783423B9B
+7BD78EBBA0CEC7D10F35C23137BF69AF40DEEA478923AC289D554E6837D380F1
+5C3A29F97B3C2EADE26B9926D2B7F83289B723032C1385AA809D0B23B093D4D1
+A0A9087625FB595C017C1B0C1029511225AEBFE7A52AAB58A9BFB740DEC5AA88
+6F02290D37B03E3EB90A821E4BBDCD96A01A7A23FF3BEA2216A41BCFB63AF555
+8A7B9D2211DD290DCDE2A28BC6E1F96048CB9DF02F0471BB1F9E5EBA85E035B6
+3926CE1E1E97DA841FBA83D8C95717A23664FB840AF1DB06D0C47A989BBD5B9C
+3E710BAE7A7C5BFEADE6F96EB056E6E702AE6A84814E0043E61B5A03B7A717E2
+54CE4FABD79B8F2CBFE163F05B717A76BE430F459AB5EC6BE60F6EE1BBDCBA1F
+5DFCADAEFF23E029C48C33D5844673334FC54EB282C76357D93593A34E099E27
+0D29C79DC8B927266DC6E71FA8B2804AD0D00FDEC01917E7499F2706F6FE9EF5
+EEF6E24581BA11ED1E6405394C85E81E3ECA373279306298078DA538EBDBB62A
+62AD89EB75F19A810E7CA9C745A8910129B1DDF7C70B5853B6395871DF37E468
+73C456D0A83C17DF45B7B242A0FD09D2157EBD8B14D4B852766F11962EFD1B0C
+BBCD3C398DBBDDB157F80CDA579478A9689C720C026372B13B363CF23BA8D2F0
+0828BBE088A6DF3EE50886D5D79282B82145D5B1FBA13CCABF9C4E94F66A145D
+F1BCCE4FDB0AA925E131B4270A48D25365090B70EF23F92ED72E770744059753
+1AC58E87A3A8B5F75C39DAB382E14AA485194E650C3F268EF6DBA0B1A604DDAE
+7A151A21CB7D411E77289EF01A99A4332EEADB57372D43230B804C90FB1C08BF
+201C3B7ACECA45D6A1DE107A9E231BA5CEB149F40D71C67F1F7ACE8DE1271368
+FB5B447454BD37B8BC43C65F6E8733323AA43FB5F83C4FAAB164C3C2DB7A678B
+6454FF9EB6C0A4CB8186B895D1DBF0B5382BBAFBE484C5580CB354DD40AEF365
+E1DE1638E582CFB5C1E58EFDF0D3636C95BCB4DD9573F00AE7149371E0CB0969
+B3EC075D3D7ADF61E79E29F83144CFFBDDEB68DAA5E05D30508EECFC43B8B625
+5B533DCC9149E8770F4EFE85207CFA8C1E50D8B589E090DC84EBEF2360B5F3E4
+479E68779E5A24BB722A37A311F3AA39BB04530A2BDEEECB3BC9FBC889E66949
+797E3BFB3D1A1CE6A62CBB5CF5DB3CF99954F5D0CB096CEF2F5431994738CF1F
+97FF3260AD2D89FD819B16E53D59E9E0FDF6B56BAD6E0AAF557EFB6A48D029D8
+F70BA32DFC0779B353A4D476B86CF02A505D40815E2585FD03C07B32B14D2B58
+13BEB639824A1FC04E7336470DE07DADD4D25A641B430DD1336F3A1D0F1DB6D9
+453006DC947ED4F2D528C00BBA98BEBBF855AC8C133B68DD62E292063FCCDC1C
+0E390165DF8B85C94DEC13270D824E029046C892495BE1303C44FBD3BB36745C
+63ECE2B67D2B303DFC22E2FDD140E40775A99B1A8D11DB4ED1C625540E3CC640
+269F338D8B04A713CC3063EAC34AEA0AF725D31642877042C6DB4E7950DC8C0B
+61A322EA288F55B899F0A08F49E22791A2D55BBF89CBF0F1B97317C04216D616
+FCB5D100126A49DD94338D4DC08EAFBE1F08AB6B1792D358C50CFA58B5A66643
+6B801A2267C9843F9C06FD9F137AF780DE55D83F949F1B8CD025475779471377
+B8CF89B2765C0A9C41C186C586629C36C879F3A29D7A9F4E8B8919425F3B0C98
+45CC7A7AAFD70D88E2DE69200ADF0D263951718B2289DFAC4A38311519C07933
+9627F52FBEEE5B9619DE3BAC9B2791BD888B70AFDB75A1999540A1D16E9D4491
+FF5D3E5CE027E7700F1CC85F0BC64ABE5CADF8059C77CDBA5EB1AAD36B1C14DE
+1B30ADFDBEA34650116888C6714B1825E56406C96C06B1D37000AED2840743AF
+BC2F6F95E7917B32C3A5C7D36FB9F34626C0E61231599C2EE02EAB2DE0136081
+48A65E57FEDC0664DD2934ED21FC98BD568B4DD7BD55A251D16D2CB99C53C96C
+0A44BEB44D9714F33CEE323B0ACE7923AD307A8D3B0CE768240F0E8C15C2693A
+70BBBD740B3C410DAEFC933B324A3FFAF31C3D03516A6EEA22D2EAEF4D607FEA
+4E865D7F6A47EC9034D23464715127986B704A08EA781C5DC9096EA7A95F611F
+AEE6BF59FC2F3F67B20C70C7B187E0ADDC966BAB1258DC4B7C64E317BC97F2AE
+B07D61A535F51DB2C0A058174EA194DA4F0E44326A2BE85E31A81A2D1032BD4E
+945838B571BC43768226FD5171F01C24AF9654A8846AB32147D9E6F43F03DE47
+2E515D0A300BDE126FCF69A4C19DC8F13641C89A674E5B299DD875DD0CDADEFC
+54FDED84A2946C4992B9EFF20C93AB2EE98837456C5BE2D691E5BFAD21A297C6
+9FE7FCF5F91AFE1546DA4F96E0F437460B044CD9BB2CAB9422FB85C5E131866A
+B392515816F305001A0BBA51343572CB7B81356A0B45E33BC7BDF0F507F1A316
+BC9F6563A5BE869CEB87DE1051F1BE6AD6F267AC18B6A8289215D968BD467A24
+1F5F5233230CDE952ACF0B776D919520E70DBD5E1D5DF82C89DFAB421F98FB62
+8CCA29D0D223FAB23AA37B3609D1E15ADB7F680CB67097444672C9347E47E230
+B7A8E5D4FBC1C05DACD6CE17006D2150F6D378459E4BEDF9CFF363E564D63353
+C2C609C19DAF27C7DE9A91AF2F0664ECE84CF7A8C288F94EC8033A9176FABB14
+2B41009D02B6DC09CF9DEFE893386E3CD5E7331A35F481E18BE9CBB04951C4FF
+7F08F5A49566BD7142D20E1A42C875A0EF12892F404BBB128174F8979852151B
+E67D2D84151BF68E9C6427BC362CADFE532EDEAB49BCE2E5009030151BE5D2B3
+CEFE4F215E91DCE7D407FB57BD0FA8BED720E20E65FF4CC5BA32C867A1F9DCB3
+EAD136D0F7767485A604CC97D47A2320560D95E9315D04D72BDF9DA3F9E4836D
+1D24ED2D707DF128810F218425FCEA314852DD80D48BD08963976ACFB9C44CD2
+BAC78BEDE35470512463B5C6E877BA3AA4749680D05FA3959A0B2ECE7171F1EA
+9B963122A1A72DFC9E6FEC7E699A4C6BD742E3D4D570877231AF25FC17F598B6
+3777595305CAABA3696ECFCC725EB41E222403D84DA710D690C155978D93F389
+0F49E87EF135D19682BD2A2EA6FDF7CD3A2BEB6C087643ECB69252BB8678B21C
+33F85002D1C82BC7066BFA02EA5E7D671D6450E5297BC91B2121BF46DF58892B
+14D581DBF322E89E6BF24C6532CBA0C3897DC13C907EFA52142A018CA820A079
+52D7541D59D864C597D7ED9B9714A4422BCFE03AEE1EF4B6B565B40FF1EB4BCC
+ADD77668A46FA7CFAC18AFD4B92C8F76806F81A818663A4DA845DF15F6A2DA70
+67F165013514D26B51D958A57EEBA06114DA17B3A930FF23B0DEC464C8D2F915
+68700C34E684DECC3639BFAC26B22E277B1AF59112FC783B887F37A730766AD3
+F50CFBAC08E0B4050C1434241EDB33BDB3F97E1CDA67721899E4A7EF1DBB3E3D
+4AA90E615D06A805EFD26EB78A6F9FFC12E53D5E0FF49909F41E69D10C308EAE
+707F729147F4D375E461690B9DA00A94CCAEF8C039B1F6A911A2AFFDE3C954FF
+DA1FDC3C137433AD11A357F011594CCD9D1EEF0B976378F8CAF292E67662EF17
+AB786E90392DA9618E9D8DCF87C6C51C3B7371207C66D0B692FE7C290C0B51C9
+EE8B2670B63946EEB7FB9A7F66CD72EF1F890301173FFCE6B8FFED59895DAC93
+EDF39170D6D906FD2A462A1D2A85C1F19D77EBBC4CBAADAF49CE9462F23E1329
+8CD5B445800973B978A460921E8825014983943BCAA4D1019AB6627925B03E4D
+DD70D0A1B8694A0D47DE8DF8B89D079C9C14C6B804058B43B39780847D746616
+52ACC4AAFCF918C3D3135F7B82A38162BFBD112D581157A19DA30ACB74502FE4
+40D7EDC6EBCD9BB458F2668D727CBF2E53A9F0121F62678D113EAAB36C24F3FB
+831ED9761D907C5DCED84E6A9B242B041D26BB25A88136470F112DA1459657AC
+AF399CE6FF71A7CD29E40A19C2503D08372C2A770118ADFFD821159C067B98AE
+1170DBDA9AC3B3C31CEE8F6DC8B20C27295F362B52F1E309146EE975F9B41094
+BF28580EEF0DD850CE543A5D369676D7BB9AF94FBECDE2AE3F09848107BB9A89
+97EF34E79201D422622E36F78FA2B80E678FB154FE84D934FA7C8D9AA1A1AAF3
+33D0A40D2DCE86DE6380BF617ADE6C6E5C97A3F056BB062A9097293FDC0BD70B
+987E357AD571971CFF01E913BBC1D05F0A7205F1ABAF516E38C02CF41DBD399C
+E4B4648049569DE6DE43170DDF91A4BA23E398F82EB411194147528312F04F35
+9B8A36719E8CB6094DF7E2A14B1632CBDB2B1966B59CA5A778ABBBD66FD53571
+CD8B761D8BA11C0BFFA71C58FEF39ABA40A4D01974403D5076CB826315A24ED7
+3D207C528FAFB65B4861BF8AD2B53C748B0A4B34E57771278FC24E98AD52F34E
+04AA492C9815EBE676781D40239B3FB7E462DA782BFE82C1C43BD937D6C260B3
+29D6DF902006EA10A63DC2090C9484C6234AB78A45957087E65F0F8979D5A6DB
+C952E8721133F3D88316977789EB8CFCEE5085FA4741AA4090B920CE7849F9CD
+4DB2FCC872CAC7AF5FEF0257B4A0AD781B6B4F634F370F7F61DBF8BB66578E34
+4DF73EFC1C23CA11C7A6C336BAF988B37E55C20F4138A7B5D8FBDBFC70BE5D37
+AF6F7E6958E062C6344C14249958E8566571B9C79ECC
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/l049036t.pfa b/lib/fonts/l049036t.pfa
new file mode 100644
index 0000000..df2250f
--- /dev/null
+++ b/lib/fonts/l049036t.pfa
@@ -0,0 +1,1613 @@
+%!PS-AdobeFont-1.0: LuxiSerif-BoldOblique 1.1000
+%%CreationDate: Mon Nov 12 2001
+% Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+% Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.
+12 dict begin
+/FontInfo 10 dict dup begin
+/version (1.1000) readonly def
+/Notice (Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/Copyright (Copyright Copyright (c) 2001 by Bigelow & Holmes Inc. Instructions copyright (c) 2001 by URW++.) readonly def
+/FullName (Luxi Serif Bold Oblique) readonly def
+/FamilyName (Luxi Serif) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle -11.3 def
+/isFixedPitch false def
+/UnderlinePosition -36 def
+/UnderlineThickness 72 def
+end readonly def
+/FontName /LuxiSerif-BoldOblique def
+/PaintType 0 def
+/WMode 0 def
+/FontBBox {-221 -211 1138 1012} readonly def
+/FontType 1 def
+/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 198 /AE put
+dup 140 /OE put
+dup 216 /Oslash put
+dup 196 /Adieresis put
+dup 193 /Aacute put
+dup 192 /Agrave put
+dup 194 /Acircumflex put
+dup 195 /Atilde put
+dup 197 /Aring put
+dup 199 /Ccedilla put
+dup 208 /Eth put
+dup 203 /Edieresis put
+dup 201 /Eacute put
+dup 200 /Egrave put
+dup 202 /Ecircumflex put
+dup 207 /Idieresis put
+dup 205 /Iacute put
+dup 204 /Igrave put
+dup 206 /Icircumflex put
+dup 209 /Ntilde put
+dup 214 /Odieresis put
+dup 211 /Oacute put
+dup 210 /Ograve put
+dup 212 /Ocircumflex put
+dup 213 /Otilde put
+dup 138 /Scaron put
+dup 220 /Udieresis put
+dup 218 /Uacute put
+dup 217 /Ugrave put
+dup 219 /Ucircumflex put
+dup 221 /Yacute put
+dup 222 /Thorn put
+dup 159 /Ydieresis put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 230 /ae put
+dup 156 /oe put
+dup 248 /oslash put
+dup 223 /germandbls put
+dup 228 /adieresis put
+dup 225 /aacute put
+dup 224 /agrave put
+dup 226 /acircumflex put
+dup 227 /atilde put
+dup 229 /aring put
+dup 231 /ccedilla put
+dup 235 /edieresis put
+dup 233 /eacute put
+dup 232 /egrave put
+dup 234 /ecircumflex put
+dup 239 /idieresis put
+dup 237 /iacute put
+dup 236 /igrave put
+dup 238 /icircumflex put
+dup 241 /ntilde put
+dup 246 /odieresis put
+dup 243 /oacute put
+dup 242 /ograve put
+dup 244 /ocircumflex put
+dup 245 /otilde put
+dup 154 /scaron put
+dup 252 /udieresis put
+dup 250 /uacute put
+dup 249 /ugrave put
+dup 251 /ucircumflex put
+dup 253 /yacute put
+dup 240 /eth put
+dup 254 /thorn put
+dup 255 /ydieresis put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 48 /zero put
+dup 163 /sterling put
+dup 36 /dollar put
+dup 162 /cent put
+dup 131 /florin put
+dup 128 /Euro put
+dup 165 /yen put
+dup 185 /onesuperior put
+dup 178 /twosuperior put
+dup 179 /threesuperior put
+dup 46 /period put
+dup 58 /colon put
+dup 133 /ellipsis put
+dup 44 /comma put
+dup 59 /semicolon put
+dup 145 /quoteleft put
+dup 148 /quotedblright put
+dup 147 /quotedblleft put
+dup 132 /quotedblbase put
+dup 33 /exclam put
+dup 161 /exclamdown put
+dup 63 /question put
+dup 191 /questiondown put
+dup 187 /guillemotright put
+dup 171 /guillemotleft put
+dup 155 /guilsinglright put
+dup 139 /guilsinglleft put
+dup 47 /slash put
+dup 45 /hyphen put
+dup 173 /sfthyphen put
+dup 150 /endash put
+dup 151 /emdash put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 38 /ampersand put
+dup 167 /section put
+dup 134 /dagger put
+dup 135 /daggerdbl put
+dup 42 /asterisk put
+dup 39 /quotesingle put
+dup 34 /quotedbl put
+dup 64 /at put
+dup 35 /numbersign put
+dup 176 /degree put
+dup 43 /plus put
+dup 215 /multiply put
+dup 247 /divide put
+dup 61 /equal put
+dup 153 /trademark put
+dup 182 /paragraph put
+dup 164 /currency put
+dup 130 /quotesinglbase put
+dup 146 /quoteright put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 170 /ordfeminine put
+dup 186 /ordmasculine put
+dup 177 /plusminus put
+dup 189 /onehalf put
+dup 188 /onequarter put
+dup 190 /threequarters put
+dup 37 /percent put
+dup 137 /perthousand put
+dup 92 /backslash put
+dup 168 /dieresis put
+dup 180 /acute put
+dup 96 /grave put
+dup 136 /circumflex put
+dup 152 /tilde put
+dup 184 /cedilla put
+dup 169 /copyright put
+dup 174 /registered put
+dup 32 /space put
+dup 160 /nbspace put
+dup 149 /bullet put
+dup 60 /less put
+dup 62 /greater put
+dup 172 /logicalnot put
+dup 94 /asciicircum put
+dup 124 /bar put
+dup 166 /brokenbar put
+dup 95 /underscore put
+dup 126 /asciitilde put
+dup 181 /mu put
+readonly def
+/UniqueID 5078994 def
+currentdict end
+currentfile eexec E98D09D760A3C22CF119F9DC699A22C35B5B35ED6AA23593C76D54CABB5E942B
+F7D6DD84F1664B89699C74B472DE9F8E6DF925F6C4F204E9F1C639B4DBA988ED
+2AC419FF2B2BDE605B8EE3264EDD66412D4F21C64AC522BDFC7C5502F9C3F3E5
+592B3B2093D33C9BFAEDD2D49E89AABAA832E23F062E91A25032519D1868816E
+44B4E0747795003D7930299D6E1E2A5BFE0D595DC97E140989CE81D8D7F852FF
+9CDC7A1B1B598C69131DEE005B415805A16D8F1232D9E237CD60D35F0FD179FB
+1219B605B80A36CDE0BAAFFA5D97DF370655785FB236544DF1E7A00B7E8AA37F
+C23C6BDAB4E3F9BC5EE40602171D028423D88D16F57168C9631090E451FA196B
+8B446947EE6233FF652CF41C03ACCD60952FE06298CA4E207FAAA38F192D2D8E
+E528AD9B647706997722D73A9203CF7377792AE5780299EB8DBF2C0CBE5E1572
+982D74F81C32E627DF120AE53A1BFC783FAA74AEE3920D208F8AF826AE684F6D
+CA41AED94655B6A9E0D60C34C318C7E76F5A52F373693DF3ABC03A72E8DB5E66
+CF5DAD37C9CB9EE42DA592D9DB876C6E62DAC02F1B126C59D1703D3A685C617B
+F5A8FD9A630D8746ACEA7B41E9DBD4C47B30163DE05B34AAC3337965660BAA0B
+CC2BAFFC0F3446E268C9BB27CE08456549C2DFD8812DAF308024973D7C38E8D1
+30C198D253136F3478334600EBF8C0196ACA6E350182B387FCFEB559F62ADD64
+D9B3C78A9832FA4EB023B07719B4D8A173274C388446C99C63F7C6313DCE4118
+8D2127184AFC17D5651DC1F2B7A763052FDDE142C714658009F5407B20F1D30D
+FC978A2FBD8CCE7523A2A62EAF38D6485FD62C13D444DCEC7DBC79CF9258B502
+67CE30E2032F03718CACA3A28F71B941923F52B6FC4EE1731D9BCDEB5F456423
+52BC72B85C92AA0A7EEB5E7BD6470B7FF3C9A68EB479102C6F790F27266B67A8
+59AD2EB5CF5A20B6A39274BAF31E02E1C487F59EA0AD622DD509438C43E7F935
+C21E6FE887846ADF1D3071DB5C1A7868787F92F46D6AB19D56CCC3742B646AEA
+2D24DDA6E00C6EC895103BBFB6D67B0C902E176F84AED3A0999C2C99A65F1A64
+A362CFD2DB6885F1EF150D828BA5C685A3A0183963102723AAC166BEBF18CF62
+D0C26D613CA8AF740822182523B26060E255124B1F9C70511B9D338A6AE2D837
+2492D7A67A371CD3E757A8130F8FC9D6B13BFF690257B7D41C012CDEFF5BFCAB
+B511D068C9183BC0983E09341008C9717C20DE26E61CF7CA45E59433E58FE1B7
+C6884418C26663988693B995BF1EE3842EFC3E33976C988D6CD724D3B81A942C
+2B0BB08F65A08BF768138C8A750A892DDAEF502823D4D6706CCC05451652D896
+38C09DB8EABA368FCF8AAC4E482942DD3D784D9C57675577F107594C0D2E07EA
+36553A9785E0FE26534DF886F2B5A906018C48F1A0CFAB7E373476BCF98E7CDD
+18A11D8F2FD16699FAEC22754E53EE9C972FF4A3901F94E58E23823A78F40439
+B709D90F48348B8B8E78569C77326B684E4DE7AE9192877076BE05932E8D3FCF
+DA09EAADBDDBA35290E3FBC6AF2FDBD178AC051807027BABD733B54DA6E6ADA8
+350D3FF874041333CF88705C96F55CBE46A4D6DB68FFD447996A124603F3E29D
+4673137D87A8B33A430F18ECA5DE4ACCF88AA16294BD9A3A98C5081C2112E3A9
+FC7C9FBB704BAD222B07D0D7E9F52BFB316992C7ED6AA618163D2268734D7B22
+3991A8C256CC17087E844BB8FB806A66B9EBA4DCD9FE4DDA936CC61229492253
+2922EDB5B12AEF0F77D693C51D616EA252BF6CF515C5CC737495F33CA41D9F8E
+34572232EB422CFDAB03BC194E42DC669948235E0BDA96E50A3B78FD24A8F859
+61B560D847BE4A63E97358DECFA6BE9B86E026176DFDAFB470D57AAD803FBD38
+714DC319655DDAF6BF3E085819C456BCA734BC479A22BB6E8C9FE3E747A5E47E
+0FD73B4AF5A80AC230DCB02818AF68A251998462E6DE10AB7FCA5FED041B32A8
+382B480F30400DB936DE1665D9D7592110AACF516FD0F68026AFC371458BACD7
+BB9F0A7C5B399DF9E7B02249526C555137B5A2B8BD3FC2A5055ACF2A983C54FC
+5D4862F8867C39DF18824D457F222918FACD5EFE01982CEB5E75643EB7C61F77
+5ACFF22D54B58EB7F0BB14210CBB8A8B562B188E04164F46DCD915E428BA6137
+08420B83F3ABEE130C92EBE3A7C55FE7AAA126F2E9D450350F6331D4FCA8554D
+2A0D48865FFB3E0CB9E97847D82F8EA1218B5DF5A9966DF6B7622A0BC06531C2
+54F0589991E10C95A5D1CD2BF64E248D3BFDF25F88A405E95FA254D2E4B70160
+9C8153A5504EE22BFB83C771616044B55E0B9676CB234B0054EB8B3B073AAD22
+B7E7A89C15A80E3344ADCAB949955641E1785EAB2D62B843DDFE4D5974FB03A2
+8E9CD8E6B10A98611126BCACF813843C92AC35DAFB9F14055EEC42E01028431F
+2456598FD76BB66F1309B1DA0F7077D86BDCFBC6B628B895011B8D74935F5419
+8902392C6D35EC29225CDC7D49712D1D9FDD66C24C5340C1E05646631902B92C
+516F67ECD172F882CDCFE2F957E4F6395D79E9F08E0EF64C7FC0B3118E3BFBA4
+FB752619779BC1645969558BA349F8868B3A3CAB48ACA78FC8BBF33198F03AFF
+3862063C0BD73AA486316E28F948E31B89CEA0A0F9F10311483EC0676F597458
+8943317514B3B0D47274A499CBA6F76415D22ABF9AF5AE9A164D3444BD3A3CBA
+17682AED8A11DEE04EF6965C07849C06970829560793B5E422DD801B4AD94CCE
+AB73562530310B79FCD6F2F93182C05C509C0B2163F9F24A7BD06DED8D50C955
+1C9012158313AA8A548B79D495DAEDFC651D4A6110B98A88047A6893FFFCF00F
+03D6848F15412C9200C5AA0525397806CEBF448F92E9EB110EBAF17CB2856DC7
+8C22DA7487B9E55B6DF23F345CB478689FB8522A1FEB34EE58AD8A4805B7CABB
+58EA56D1FCCEF7869901EA0229908C74EDE80E2CD07B0E33D17389A434C54E07
+039EC17E27A56847CFE4FA04D65AF20650F8C58D24745FFD76F443843B7ACF94
+01528C2F046C2F8598C36367E9FD009B2B73F52AD9DCB49DF76DF74597AF9AE7
+B43E4988D7CAA34ED694CF0D3F67B9C21680DFD8E925FD4DC6E4458939C1F5A1
+1F0465493E0B8DD3F63034813F557C9B321E9265F4467E1BE3070101675A40E2
+36AF9F1D37162176B4B950A37EB1EFA3642B9E8AE6D5CC77DDBC6E5C0A172BC8
+4EDAD45A7502ACE290A9AB4D56E32245F7AF75D540485611CC79C813CCC61FCE
+E7C773F74E26BBCF5EAFC476AB031A04C1BEEEFC881843AC2438988CDDE7CF53
+C18FD1A9E1F1EC264DC2484BDF4867933422A75E0EAAD1AD55A408D81ACF6AC5
+D93D12EED180D56666BFF3479B7EFF185E39D4296C7C87F56A6C1B6B0A99DCCD
+F7032FF77585F4A1A22DDF46171A5A0C0601758F64CC10DD4EE4EAB0BCD05753
+76ED93EA50B176B36196DFDF5345E4BC934D9B6CF7ACAAE77A9B0BC66E460402
+87AC5F4CF69ABEC05B6DB517FE1059002B95E4245297272E552E6DFBAE1663E6
+1C37C0C90916037DB040BCE0BC1FCAF881461E0B5960997AB582942DF119F00A
+A58EF89B9CA549913721521F259B135EFA1C7E1A5F87550621E31BC7DB07FD3A
+85F024F2943F95D66503E8498D4B7038FD7F938950FF22310D1B49E61E395426
+B20B952D57983BF33A707C794895B082DBB035705F8DAE75EDD15A2F75C9DC04
+91A59777B2953CB4A1C8575C4FDC2DECE1737E9ABAF62637B0FB6471378E942F
+1141977AFC8032A13866589CDB087995F9F78EFF5713572E6F3F7FE4467E8313
+44D994CA7AE974124CA93BD83C9E8451C956BAF993F279AD7044ABBE7BB826A0
+2757ABB1135A21C9DDD3781A589F9252C51452458CB5C94C4FCD53D3ECCA36EE
+263C1ADECAAA22CCF6CE9DB923000BD7FA6B6B12032ED49A469BDE95C5903420
+CF275F03D3637C7A65A872F462F19C6EB25EE8F4E7A49C528806EF56ABF5468E
+BDFFAA111A3B5E5DC9C46340DB0563DEC9250C603439F656ECC6F8A5E344BCEC
+DAE02EE7F349175C35D8F8CA7715BEEBCD45D2980B707B3B2EE44FFF846C8B8B
+8A7C02A56DAF16192B3823283E9876E8079FA3EE07BC1EB30AD14DA63B80DAC8
+D1311AA303A9D56859A4169C20C7F279B7527741D44DC6AB31A2A048C2CCD362
+BAB152807E3F73A621579EAA2FA7EB2BD45AD89E170D4AFFE6ED94A395965E32
+09C600D9AF322B870B34068FB0706EAB341FEEA668275183D38C641A98EC2BB3
+0E6827F3A764DAF871DBF5D27D254FD78E5F99432C405E92178941EE9B1999AC
+3BC5E2D10BE76BC555C63167A0408A69A3B37A4D263204F6401A3AFF49398862
+C685EEB99C79D42A7859211B6C447462C894150469429C7E5315F575F8AAA66F
+C2DADD013A304894E50EAEE124C86E1AE87AF200C8DEA35027ECD102071F8FD8
+F3EFCE1A14AF5910C6CF5A5A8DC5F09A18285D0384717E4FA0232443D12130C4
+EBAFACCEB4A8AC281F8B4CB5136740A15E7184A2BE166ADD3B307E918D326769
+F99E923C3834EDBFAAA5A2BBA1CE952CC01804000E1BF0A4C80B35E0474FC985
+3F852E8AF570C542ECF37F4CBB940E278FD2AD1249144457ADED44359A90D3BC
+9022B23C46F25C74D22A61BA69F1BBDB4C5AEAC64AE8B6AE975822C08E416810
+310EA856B8FF8D17BC79AEB42808ACDDA673BE0BCE980C6A98CD5A0455A1A234
+BDD559C0B31A798D088BA0AD425DCD904E8C3013C388770DC9D03B6249E8A4ED
+A49B3A2EB11723B0D6FAC3BDE453E1F8DD6531BA42B6359F47A61B5762AFCDC6
+5AF5130792FE98C5FC024B1DA4887095413C6FBA16EE59F1C8CC43A9FCA40344
+2ED9359597B991AFD2D94BADCE1E96B676A5910BE322CA3BED9120062740AF03
+7DCCF5793E87E7C05D95C4F65466C2D1867518BBD4CA2CEF4F6299E122C2EF6F
+9301DE754D842D32BF4FF0C61001FA3929564A3935FF2C291B7E3B4425E9A0B8
+BD326EB5926EA0AC4FAC6D34F2A0715A68D38EAD576CB1FD774C30F0CDF2643B
+2DFDBE58F38F0589ADDB6BCA49E1280F5219F45B0FFCD574ECC51BCC8625B1D0
+8A710B796113F13B8115B3EE0267F25C595CDEC16A6E7A016436A5AC93783EBB
+443AF8DD342F6BD1F58C315973F9FE0B6D85C50D9BAC10A456CC83D8577032BC
+FFEDC71049EBC829D6A419DCC22ED0A3A2E230101CEDC64C67E4F442E36AFEC4
+EFD6AF959D4341CDD27830F364E85DEDEC69E1D375AEEA5805D45B4507275AC3
+95575B9C83CF9529A9050997D5235ACCEB4E79BC37515C7C0205D8C9B827A5F0
+04E21177207379699BDA9805FBC4CF0A9B6AEB09E1E21DCC693E985DDD79C45F
+A33322BF56FF7B91ECAED3E0E9C92729CE6894815DB7FF4C61E9F74AEFEBFCF4
+56FAB1681DD80EBE8D418B6B7BAAADF34E87EB5CD4AA2FFDA2E4F238035FC14F
+6239B152EF3232277E9AC710AAE11C310DFB02BA392A026C661EBA5669F33C22
+B850CC57351F9EF0D6237C36753FE0A63ABE7C6E11798C9CEB6602D8E33724D6
+CF700E1A9D09D6973C99EB520C3034F8B38EFD43FF71313950C1D44565EBB204
+A614DB50EBC153B59A366BC76F01E5C3E5B8BC09D2B68EA6C154F72D54AA4733
+A4FF05C6A82B0ACE40AC70343FC83133797AE8C6DBF3BE1F6E441D6BF809C71B
+D392A0CC32F1625D07869950F857E4E2B3B9979131C4432C44D8F6EFE9D01F80
+86D60FE915A474EAD180B21A24FCE69D511C011A8A6A39DF30F87FB2EFBB376B
+7CFB1EDA2447181948D01C49F3795ABCD52344B58ADC8A8DA554849C97E5ED97
+E42F571E5F2D060FFB9E1B012FDD38B53C3AA5172E280B319BB3AC47E4BAF2A1
+4F891DF034AAA2F2AECCCD8C23182B5535DAC76C151F7718C39D549B6610DCE6
+9E154606D564619BE796F85050CBCF8EAB4EABF17FFF4ED07A3BAD022C523621
+DE7FEE8172910DD5448D8F7456637A17ABE96218AA7B1665D361B7FE4427BA75
+8F9193B7B9A52D4AD3405B7DFB1FC79D235DDF354D321B293E5C269616A10E58
+722A50BB356379CE744B3839E7822455300AACB0AD45EC8761F560B8D1073C9A
+5BD7ED1BEE741282A92AF285BE80C6C65B2448E0A4A359851945AFFC91C9E578
+2C12D27B51BB4500CFB533051D055E7EE47BCC23D8F8DEE569A1FBE3419539F0
+8FA5CE4D8612AD404EB7E83D4E4A547C2C347D217979AC48E5C081CDE3671319
+7DB36C69C2A31B0F633EBC046CFE969448FF2A253CAC2B4FFDC14FC152BF83E5
+E517DE19FE1BDFFB7A3F276293E761C3B39AD3610E442AA58A7C25BE41C05141
+AC500ECB657643CB128E8AE36F4B37E8EF15CFEB1F8E3D334519A3609CDFAC3D
+362933B5A55559CC28DFA89182F89B2FD5013E08A2C583FCFF9CC53A2D5CD13B
+1C9786D1F39A02106517DD191D9E5169363FB01ED68C4CC13CD9CC257A2EE802
+C9E40E5C0BE5E65982AA15FBF0F04118EBE9DF64C279AFDFB1197AF62F6E18C2
+3E95A13D6B6737C4579B24E33A0A14DC922EC4C7202A30A06A4596547A791955
+B3902033D6047AD6E44A90FAE4333D0891684A9B1895585D9E91985026F72BE9
+C216009AF01806AB043E51DA494644D61AD7379C7F93F17AD0F164D794DD82B9
+077118A0426BF267C12997090821C5E01202BE01A1BA5CF130557EAF84E2AEC0
+C83C03CBE7F14C63884CDF25E5248C45799F080D281E3F9FD932063E7EEDE22F
+0B2F478FF72D54E68FDBF6AF5A8BF8EE06EF6C30A5E061D14A512075A873AE5B
+5DF02D81390DD9597AA8E902459BDBE5A6A61BA2E6CEC7C563DEDB2BC950B307
+CF22643E985DE1D7CA84881D19CAE2A205FA5CDE59420353F3EF23FDBF391FB7
+38CE81218276B2960C3923B47EB52A8429A50E28A607D5242312ECA5536916E1
+8624CD1482AF8AD52857F38E4E689F774B55C3946C2012635B911205A760F77C
+8093298C200E220697E6F3D210C88B3E46F2B2E931952D42F51FB5426DEDE03A
+05004DDA3604F38CD65473D13877822CF615C299308395A213B5D666EE06B0F6
+C1ACC344BC1037B5C95D78BD424522F051CA1C03F9FD11EA355206230ADB90B8
+E274770F8DDCDA7C3910FB07CC477B04205A6434DB34E69F3B69EEA2ED6FBD58
+C6CA944822B44062ED2F5B0AE86AA5F40E0B171D158CA1A57E5C3240A1A721C9
+92AEBF5D4075D78D772E1364F9BB631CBE1086D4EEE58E6B4D6BFDD7581D2075
+EC0FF81EC590A69AB9EA6C38D91A3D763A1A85D9588741BB657A7CE31A9D8C55
+9AA83C9DD8321EAB44CA22827230A11FBC9CB12992204FD936401DCF9A71D190
+C9C7EFF35FA97ED1EA2DA3584CDF3D66C545AE37E2403C3945DFDFC3F08A6C76
+C6E3F7C9238492D7022B904C846CAF40F0D571A39FB05B7F359C869081274F4F
+3174CCD65045AFA181235224859AC3B5A708301033D0DD449D0F3315C59EDF26
+94B3AF8F8FCAD728C18B55A9A4283D0A257DE2C36F2066A31EB0E401C34A5861
+1E4DD5C81288469B625BDE1B3734804F726005071BED0BC518D0A1CB8C45CF5E
+01E344C48668D815DF1B3087DA5B063E9C6D1232D3337DF90E71D10A306211F8
+A360053722E799E182D22CE80F4B0A7E118806F6D99B4456C539DF049BAF6694
+A9EFC7B847D0C45BF90DEA76CC68BFF4F733D246715976AC5BC56AEEBF3783F1
+15A79B960289C4BE778BB63F8C46237A84D9881B40B9562E460ED08BC770F6B8
+97A739BC2A060A76F1F1280EB07487F42EDC0C9510388CFC618A311A3987F4F3
+B464489A974B2F8C2375351E70C95BE7A7E25777D78FE245195F9920C14688F2
+05F350B893547D619300D36C58A8FA419F310A38AEE84A714BC8D0ADC2166D13
+80BBCA7400C6AF8687E0F9690EE1B71538EA3534E43F035B24532305E07133AA
+F43680AAC2EBE60674F991234FCA58A01A4BCD9486599B2AB70FC48E0533CA06
+C2DF386E46617AF45A810EB56C610168AC4AED960EC344187934EAFC3E1FA3EF
+F5010ACD71A7A902FF0DD4CC41107189041A71DE11A6BFA37CB035F1C14B8161
+9D70DB95AF381AFB800C99D56A366ABC81B4B463DAB84ADFA5272FFEFB1DC405
+11A92D7CEB4D54CC1C682E3BE2C0C2E671DF073A96B9DBF014588B663BA73768
+A7C3D4D546D8B59BF7447DA941A52D295B8002E5F1C31ACA441F6F55DF69F515
+19212E4BA25B340E9740499986A387E9B379F341B3A2B4C0D0E79379C6A2606F
+744E13D2E415FCE686A2DA21195AC7431C9AD3F4165C7635DFAEFE5ECCAE5372
+BF7B107E6363B7C97CABF67A141A2B7ED27B415D2CD730FA62CA1C8900C673EC
+373485615ECAA7C4C7A187BA60AE6B4E6200EEBC4F421689E5578A29F16719AB
+154C41FAB20E9D262C2BFFC9F6C6394CB841E9AF84A48376BBB637EF6BF45330
+346CAEE1700DCBA3C1E0F2E75340B6FBA1721AB007CA80EBE1E66E785B2C9568
+E570A8101996903075E3E9816741BAD2A30EB96430A5710348109270BA7CE860
+C227023C77730D5CE4D23CE0D48707AA4C314D6E065EF55B5E0A83ED927D68A9
+0421AD3A6BB10F27DCB22DAFA033F15BBD985E2468490DCCBE677EE57061184C
+73F22395323818EFB3D0906537F0881FEA258E8ABA6F89758F21A47AB72A79E6
+59C9F0737C23D76F95B80BEF922C62502C533ECD80C618C1814F112EBD7616F5
+D9D42153E5DF0B4F844B66F5985A345E26E93C259D36FED6C9751BFDCC82A233
+6FA4A91926D768AB042278F2142C51997A27CC08DCE7985FDECC2F99C25F5F04
+C48C0C4F532256581490B27931E1A472C7895E90520ACC252E55709DCEB8D255
+45C0B5526F339CACFD8A94A1D58958B239FAB094424412FB699FB5A036BEFBA0
+572D5738B2167771B29D3ACD92667C57B07D7AFC1AB676E600823FEC83003E43
+49F0D3F7CBCA7D7BD764C70247299783EAE00B03C09ED5A6330F1516600BA52D
+E1832F3268D38396776D36166E26BCA5252A59D3A9DE42A84969092761BBDACF
+6C5E83A69C03B53B10FCF95EF76F91F7A8EDE6E450CE253F373FB9382FC84BC7
+833F464126EFBD42A486308AD1A30680F7C423EBE1597FE234E510FB4F2F0F65
+E6CDCA4D2C5BF86E743A39BBE78D0E4A3D56B04588EB457D96629CE5AE95F268
+87E3B49D66C2BDDDD27E9F1986BBB313E33110F099C9F176D188B7594C965EAF
+AA4FEDAFCC7BC9E7BAD2E1C983D596844DFE6F321EE15F109150CAA6DCDA513B
+78D6D3B8260041367FA44C058C3EF84A37DDDDDEFFD35AB50664F7DD9C856D37
+D5C6569718DB3A6C869C9DE6257E06ADAFE2FED0A544F5023A4452AF73771AF3
+06B737395348ACCBDC9662EA92616D197226E424520F68D38E80537926DE94CF
+13DCCB715204C3DDD69DE77BB00334FD3086F8B961FD7FCE4B565BA524C8EDEA
+84EB69E3400A075561A19AC5D2AC8786A68EBFAC2860ADF804AC53BDA205AF27
+37D47F05DF295430915591AFCA00CFC65B428CB41EBD97F229F171C8995887F9
+8F99C0B45CFA0787C9B23EC73EEE85AF1ABCCA5DCADC9124A41671ADD3C33BC4
+2BF955421C3D563B1741C5BEC1F28D2011FC1FFECA792B31C208A9A02C950397
+74ED4874D55F2EC1655102672BF26012D747D46563CAD7C0BCF5D194B0EFBE73
+71C1D68F3AB20B63D083F45945E1C5B21C0FBA4FD11597548062C967CCCDF68F
+6578505652468F71B803C9A4DE8093A4D0FE29646D7F8737E565EAA3D9F6846F
+5AFAACD20B44F58F143E8CBF9C236938CFEA98EC19AC08DFB881F560A2ABA6C3
+45E6E8499338F1ECC0B7AACA6634485468C0BBED3F99D6A304BB5968EF8345B6
+AC1683C7E9D4EA6BDA3BB7D4EE9E819325D0BD1672B65C0D213DD9B988476936
+7948106DB8A26C2F6A511B771CD57462181CFA3B086CBB508270443C48EF7EEB
+7C7F0CAB757FE1A1E62C26C079AD2DF5C2A1DDC919F59D7AFEF92DA0B1B3A34E
+9B142C92E8EC6A370DB976E3D112458AB0580EB79E6253D01E59A015278698D6
+38684DCCFE13D476679E1CE55D565D5521684B4BE62D0CFD7FB961989C011660
+E79F7A051AA75872D48629E5A1598D29E8AE353757DACDC027C8408E3E027B8C
+2304B2F54CA64306776A2A82017F5C96BAE8DC9D7867857D772DC9F4AB8B45EF
+F3CDF3D58B91557E6D39CAEBAA8F3D81023C344B2471128BBB0632FC6F05E9C4
+95D16C636DB9858D1359FB36B301929881F09E5F29B0C2D5D13D4E598E1C086E
+70141315351EC33C15AEF4FD6519FFD5352CED5E5A878FBA466F1C0252660F79
+29B1428E9D0467FE26A3E1D22B7B47EE8929F87D906923BCB7192DD94E22DE58
+A49D4BAFF8DEF1078DFC049BB16420F6F968B2F6AE8CF8FFC65DB1AB9A6EE972
+C89FC33EDF480124696DE3FC43BCD111108C9FE08482A3BEC819FF71917C5118
+B38040F48D74E224B495B90667A7A678A9F55DEA4F70953B38F97FB2D3EA9B9A
+6E5B19CC035DCCEA31C8FACF62CFFE9DC86DE87815BBF5B7F9D4EC7322C3E658
+BDCE94C84A4D747531AF85676C5405242865E9086E77FD8C51C1A5984C9D8C1C
+7B29952094DC47D9062C89BB7AE2279B1B92DE43BFC54C8D236E546D0A3B9B24
+A143F5B47A70FDC724F45AB788E3FD7228D4991B7AB0DAC1588F290FA1884EDD
+5A895972F0E76446925A73E616C93E0DA74520929A053B730EE97CAE5FC04749
+18F8E2B87C210C799CB0AB651AD24D9749A2D41DAD03E94DC779312BFB90883E
+3628A822946BF8F81023F2C0B3DEF58D73B11493D6482FEB44DB9BAE0FFC52E9
+0BC04A6E50FEEE540E4E8C8BACDEDF32A3F09FADF274150134AB3D62AE0A711B
+0B30F3419615E7F6DC430C13E976246B470440E759117045A4CF8CCFDD9F0E2F
+E1EF1170FA6B80D192C34F01E472F8CA8978EF531C13D5BC6571F7C3196584E9
+06ED32F98FCF35B50BD2C4DEEC9AF9475B79FFB95024D3ECAB0522B19786E083
+5B86E984FF076AA82F707048BAEF3106EDA9317B42AC8D3CBAF0B9E21D0AB84C
+957D20D768C903AC512A947DA6119F151C1247B23CB1B52B7DCB17C5A6A5205C
+265B78795B1D00B361778BC7351787B9ABC1CE5E5A58D0B7EA5EEDC3EC71B1B5
+BEE69671010F9F22067E99B01575464E9F34574E1BB7464644968547382BE1B7
+891A84149F9A5F42CC21478EAEDC5567A0D430A296EAB205368B068AE66A1B0A
+78A65BD2C23B4039CEEEA7903B1CB11E476C1384A332FFB687F661A368001C71
+722E27B624DA1939FADBB5BC7086FDA5094001B50895C70159DA51BA742D540C
+2216A1C5BD55E2FEF4E71561612C02809C69C21A072F46FBEDD83935A9C850D8
+EBDA855336501173E29F765129023E86D29D6CB0F8BFEA01229DE5369B143A5A
+090B7315D36169A8E4704BDF62F93B949662CD574211CC8CEB59C02E1A061A44
+0CF5A59A05BF9D4E71F5FE55772FF327119B585635EA460B3AEE5965DE139421
+BF947637683431ED8EA28BF1FD43F8AAAD8FF22669DE5C867E388A30D0677B2A
+8168BF8243E3E7D7FE9DEEF929735B1708FD0685C575E96A621EBE96EA15C3BB
+888D276E8923D2F7C946B11D5E7AA212219475D90CA4114C879783235D636B29
+02E43A52803BF524F84603DA0D27C8A0EB4B3B84C66A0F270A49A0BF6E5148EC
+EF7C6BB67144ED456ADFF8EE21371FD8DEDDEDFA42B0738DB69E1BE864CBD632
+EBED5E9C457FBF80B2D1DADF31A63C86144A1AAE498162AC4DC9E04329792111
+C631C12CDB2281987C5F9E12625B8331C3355490C0139A306F7C0E8D9B3FD198
+D77A0D2980599D64829F5B509C5E88AC242BF2B0D6EABC04E8A25CE812352A6C
+8A5EA0335322C561559BD1172211A0A5F5B70A8711B2C277E668A47C1E254047
+298EA350947CB275DBC85B531DEB739A78C504FE2D679AD7D3811237D5349D6B
+454A0B44051150C0DDA3728510A321DD25BBFCC7CED07D88298C30225632C5E6
+627DB302E9AC30AE902B82DF0ABC2CDDB55EBE98D1213C397780931F58854D9B
+C355F7EE7BC6F526A5EEA043FAE8BD740D2713BCB352811DB18A253291A8D465
+EBD45B9E21447B5670D47815E7D04C00EA15AB089EE92683E6242C8948A3FC16
+50BB0BADA960157D20E3AD217C5DA1563A86FCFDDE2D274692A0EE47D41227C9
+1188D534C7F42858D0087713B9829DB97B31EDC82BD05AFAD4B4CEEB3554CDF5
+56F79FC410FD577693706CEA58F300F8158EAEC1ACDD7B0F2DEC83EFCF850B45
+40A00794BDAD3C43777EC8C9CCAB480D931093495BD55F39BC6D33DFF3ADA062
+EE643B9B84086693BB70A7AC9B290586403B43F4F930894FC0A3A4C9133E84D2
+7A144EE9A60A6EE3AA5076ED1BDE8B56AAB7AC243E8317343FC83ED2AB33D0BC
+6A130EE2087C0534521954E77121B2F34D00BD2C6D7B29E6B96D15CB1BE9D144
+6771C1CC311CDE1337E2122076006C84659022B235D597551AE45287BE7CA489
+1B0CCADE0B548A0850D29B6C1F38ECC3E534E37848032818CEB1962A7AD21DFC
+F4083B75C000F0A5D0FD565F1737AEFAEA0083F3066B540E93EA4C32BDC0D5C9
+4ACE4E5131877B46D2BAA122680620903552D738E225E3D89D41A391D7F492DE
+617FEBB74C31F3193275F2E456E705C0126654C36C9243135BED4ADBE26B01C9
+7366ACD0DF11A3C4DF0771007B319462E4396B8F644D67A5DAD7F747B9FBE502
+02D24645EF82BCFAB980F80933ED035D6E31549503126EC31B8D205EE4EBBF82
+56CC51748F061A4322593ADBFCDA9A704BE5FBEB0E733D025B4BD81056ED0A03
+4EA60DC8B3853A5AA4B3708F0A9786AABE370627C32A82E588C76F8DC6D99CF5
+ADBE29DA22EE31311031FD37408FBB7C160C2F9895DD2F2E40D498D25BB3FD71
+A28B9524619B60E7696833F73B5A20078A6330A62456C15EA5EF488094536156
+4ED0B6A26E6EADAAFE761BB8494E33B4D87820961BB5E38BC45055C5921BFBBA
+665611136B7400F3271A865138B1BDD4E6FC6871A4E9AA7E447DA991C4A894B6
+B3D2A552639CCC2EAD55A6367B500F7793F9DA332D5AA3B6A7DDC903B1E5C223
+A5843D031413ABDA79FC810E408C352A0FAD6401F612F78FE6601A45497F67A0
+E4047A1953BD656FBF31FF37789EDB624977D7D7EBD79DFB50EEC4EA3F89CBA1
+B88E2BB110C1BF48EFC58539F2E1B36A5B9CE6891B0DA32BF6CEE62DA5B9DAA9
+B9D6AE4D088A536F7C4AD89D079C9E4866073EEFC46C46C77255420F786D6AE3
+A8F397CA9C3DEE47594C109B794AC7E43001E6CFC374C415E62095C7FB05151D
+21675170547234C3B3EE974FE929C1FB4BB2405C28B844C82004F533F4BC6FFE
+F62BB9F778F81A3B28C7D26527ED751763B8FCD7EC02F565533433E11C1869A1
+E427023B1041B70252EF1C68758BC8EDC2046266EE0518264C8CA97D6996924C
+0EDB3446A9A7CB910CD8A2AEB08B1E35F71F9CE07773F3D2FBACB7D9A4FADEE5
+3B51F1468EFE1E9C7B51DE91BCB86733D77B9D11828F6ADD68F72B405C41CACC
+98076A626DB8F7AF19B919834DCE03391B7274D1B1D9838791D8276DF09401F5
+B130C9E744BCDB98D02A68BD1D860A54D8E6564144688C0B43BF0D56917A2AB2
+989EFA8F599520F2B19EF6D8D92138EEB8854546DB669CF14CD5ADC9C8F01DA8
+20F8C5D21D0617FCDC8B1A7D7BF6D880AA2B410A98CCC8F96AB191EE1F64C9E1
+C9AF753B04757489881B2D16459B7EF2F612E658C62C32CE17767209C5FE65DD
+38D736E96F29CF8F8B6AB28FE3D6F6F48FC05FDA95BE564B762B456DC4B86575
+014BA2B041B05FFCE349DA27064514CFCE004DB9E05F6C1E516B00A948EAD74C
+D2F1CEC1E150F5533B662CFCD8AD232C2666401BFB7679DC7530204AAF2FD7CB
+8114E3A2530EAB6F7C75EC5982B8816C7AEE1D69E567C0934EAAEA4B09604564
+B2F5416576945A152EFD7B85B0D1F53D4431524AEF0CCA43EE250C6FB1A6AFE8
+F92C3B67EF9DBD5F8739B064DD4826CDCDA3673FC41C521ABD1DE23EB0700C50
+3D202646191A6B031483AAA52BB73D98F17B361B8DF51B984EAE2FFE0B1F4D5F
+DBCA6362C76813086B3296D1AC387BDFAC50164525AD253A46F52792316FB237
+45EE6E4B3B4C56C2420AD3DE65421E5A90D4DA797599905558B336C01856BF9A
+F77354104FD93CB2E90B0E5D615A2E2CA4F12C3501D0863396290DD285DAB35E
+79A8C8DC6E340A0F32CCBA90FAE28FD3FC95710B0D0C5757D97102EA269A0A10
+652E8B9F9517ACDF09218926563F25B6151D1AA8D79732A403ED88ABFB0E7889
+543FE0D96A0E1245DB8337F8EA21EF2D948C0EE666B4EA53836B33359085AE96
+1709376A742AD8B181DB35FD583EA24A5B43B1294D9A144065767659C9DA490C
+29FF12165AE21AB10B49A5FF797E3F079A645648C687ED6F44EFFE79464D5696
+875EEBA4AFB09F3455EC2E0122A7E91DBF828906BC05E6DA2ED9D9BCEE5412C7
+3B6868267C29BE95D732BF9FF6CAF6084159425D3CC6AEDF7E552BAEE821A9CB
+1F806C46A138A2C5F6765F015C4C27F6521BAD1A582326333BC11D14F7F5C83D
+464109FC2BBA092FD6DB0FFE8C1408856DDA1D6F0A04F831CBBB9BA91D700396
+1F3503C4898EA49E922A556A085B9D50D1493176C9C740FCDDB1A313321B86E1
+E5C5A295BAE5C271D536FBF8B31C95B6F648FAC4DEDA02318904CA443DC63A16
+BFA0CDCA75245A4AE420CD20DD780F2AEA6388F84A8FB42BFF09F9996DCC5844
+FBD0850B5E46824C6C5452E34A39E0A0BFD082E2478E0A0B2AC9253B4326B21A
+DF20260F9E9D36004984C074B1419385A1C52B3606B9BFEC246E26EAF79C9964
+C34DA47CFF84D27DD210251C784578B1BEE835AA614695107A4CB67298C47886
+9FE67FEFBEAD028894151095F8D728CBE7AA066B03518E2EF6A0180D050F04FB
+12E9E7F3859A223303139EFA0CC71138FB807BD816B8D83AD3AF3B3F42B73F61
+F95A647C354C384BA91BDB1F80B1D756FA5C13BC4AF763EECCA28D2627C81EBE
+A34C6BDD97B0F3514F9B1A0E3A30D2B07CABB15EB3EE9E3F530019F5C749D314
+5CA78408F38325F93B97F5856445395F7C3D8B98AB1F11358F2CF97DD723ECB4
+7D9BE2DFC6C0E44AB939F235A1CBC300015BB9DDDF9A0AC9B7EB1EADE2E947DB
+BEEA69328ADA6C95EECB9FE886ADF89287461853571EBB307395E2058B2478F4
+703779C0516D8F56B021437EA62B26E57E6A023AEFBC3C263A0DE6F365BD527C
+531072303C7E6230266C34FD2C0041839B11D2ECB7274E7C30CC584C8C591F5F
+C8950B9A2CC207711B3045796B08C8A43D7E580E8089D0B63E4EFD0F188F26A5
+8EBF298E304C8C104E150950AAC8D6E2EC9F7926921FAD5ECEBC0FBA4E0862DE
+4E1E1754BA60C7C98DEFCEB707F12CC44947007D3D645F586A132A3A7228B5AA
+79081C76C88638543806730012023A16535D0FF1E28E1DED9989E3BED625BB7C
+E4C52162FD31C0540D5D73AA9EC196D29D39192BA969E221FF021DC69F379B3D
+06357B828D205E2C4D37DE3B88FECF77B3D533CB93AC8FFC16E8E5822433D678
+931FB87D23452D49ACB5680A3E7C3543D728413168441D4BFAAB9B7833A46023
+D971EAC42B2339992915C854A53C62B68F867122956DE5272FBE60C742B6E5E7
+C8821F723450B4579DAB198FAE97E500ACC86D78FD7248876ABF21B761B9E2A1
+7380FED4EFD79B47D3E1A31A7FE648301DD9F7F4F58784DF0B54AFF457AB34C2
+A493CCF0F735C1C9F3203E59348D53D65FBDB6E24B552DB3CF8509DF3930F641
+E6FCDB4A9F970C1FA4CF1A0F4717338835895255A1E3737A588A5EFFB8FCE73D
+7EB9C0908DFFA40F8723A9319A39548E8CA5533794F50F3B6AD6BA01D48A9929
+65261FE523320846602F4FBF5B4375D70D8BDB9A559867CAD2D047A8680B83DB
+0DD38FDFBACF3678E77CDAE128A19812625CC1CFA9BACE39E6CAFBE28098C380
+17225012670F963056EBBB2748634B343C0677B09C0ED1D4B33DEA7F07B03E87
+99E229A8364F326D8F80ED4A9095181FCBDE9BC4FA0104B28F9F8CE994F1B6F4
+1316B3B768C81CF7C38BD55AC7820BE48F949730167DE7AB0B62365A9F5A4E0B
+2ECFD6F04D3652B9C1BDA8176AF1146B91789BC2BE3664D906134D7723EA4EA5
+6DEBE02A75EE93E24583B1217A61521946F7BB69C2371151D2D44E3888C50FC9
+E49FA7705BD8800AE067630191AEBB2E78C4E3CFD62DE90683910856B7FA74C9
+312EFBC58534DA5656239BBA9E102D33D2E76DD8D170350C83663EFA6D07C076
+451AC8F5F034F69855DF60EC8A88BE7913502E562FB9B64FEDA4447AE1BF6F04
+1F366A5FD382142BA4CBBC451B5470EF3D51B57EAF791499A140BB10FA70A06A
+E0B18701CCFCCFA2DCBF92BB59376D462F9D59FE114D3538880F32B7F4140E13
+F386343F0C4074277153D61460AC6A392A0EE67F11C411D68E50C9CD2BC171E2
+E4E73A231FA6311B3D0062FA73B5F5563C0357EE52FA4B5CAA9B5EFB20617661
+9EEC6C742BEF43DB2CC2626A76D03FB70C959A24F269E1FE81AEBE54D4BFCB6F
+A56B6B8BDFD3E69788A32BA3072F373DD1AA6787704CB0F7EC710FEB08A82825
+50859DD1DDE613BED2F9F0891F5533816ED8137CBB3D7EE93D723EBBB3EB841D
+A4EB010D20B870CC5C2C95E722E77C639B189CD44285870666494C2C00639F56
+D91A6C2A45F4C45D7D904F1799EBC44720410E1A0E32F100FED8D696A7031FEF
+CF56C7774E4E568050487F1F78A86C968F82579D9EBEF42C500B23BA00A7099E
+275C9BAD491D22755B542FEAC98C1B1C42EABA3A39C1C312767820D264438F67
+1A65E314A633CF3E2FAD7F83DEADCF62117446FF4A4B099A183342916F8BF57F
+A3D0BF61D2DC3726FCDD3A4F7C723DAAAA40CA0D68460DC2D990B12C405FF111
+4F5B07278ABC51A7DFE18ED1596AAE6208F189D8CBBB50AB6577E2A635205E16
+F78C97714783DB67D467EDD804B062FA8463BCA130D5A0727BDA392C22FD94A2
+25C674C3B4435BF4436432249C48347B7382CAFFCEF88BEDAA614435269DF406
+B9D5011315265A9525B4919218D9B932F3043B3B2B4287F04F12DE69080CBB54
+A11A3BF8D59EDA74DD90EAC521976C7882CD8571E764B4FC566E3E08B1E7A1C0
+7F16BD8A1C1E4677415E9547DED46BC202BC1FEC8741D71E285B87F8C982EFD5
+C201155719E4AC66CBDC95012913031421A36455AEEAD59F24134B2A78C93812
+12B1826E250AB1987B31C6A20129A2EB557BC85FFCD1DD36C678B5F39388E7C4
+1D4B7BD640ED5EFEFE063C9D91308850548BEC011A487B9DDD5E4F032CE0F094
+D548572784220981B268A932922A79B9B8C16FBE12E6D7EA801EDAE92079407E
+00312D7BACBEB5C45B62BE9532A4C81D39658A187E1EA1F4C16624A6AD1A56CE
+5077F62EDEF7E3A07084B37731A237C746E6D89167EE41C278D2865055685107
+CF73CE1A574A47AB40792DD4A970204B8498C154CA1CBC5A23F270D44742EB64
+5A7A385B37BE67CC817019EA16BA310A19CC3AA2A5DCA5C010B76D985D4524A6
+3643492A26A249FF85944150DAA4343B30D77D7639F4076350D43D7E33C677CC
+8DDC7FC142D1D376E98C8E2AA0310287D51168F29612C4C421293E23C5F120E5
+268BC1932C4F9DD29CBBCC08734EFE71678BCB5CDE4B5BCD8635F3009B631D3B
+C2F00A38CF023D09AF6A832A32C7E78F1FB9232FB9AA5FAC477BEB54561F25A4
+BE1C23C41A6B1A8F49D4057050D846A50960E64246361DF2B1F829CAE8A81556
+5DF1055F9DA935D01D8071914AC2A89223C7F14AD4C36512B62BDE4FB699BDD3
+FBDC8628B9430467A2B79C4225F060419087B0CF614464F93AF3165A5366250F
+72778A1C0BBEAEA0DB639FD61F5680B6A2903EA8FD9F056F77A68D10B2C7B4B7
+C772FBE5D7E3DA169257F2B6F9E3A1F2ADACBC3A10E1A47E26A58B07101B541C
+E72012DEA2E1603BBC157C589791FD069E7EAD5EC41061B8034D22FF0EA7EA79
+87139328F4D74C18721E4773F841DF72B3BD044A7FF1EAC934BFDAB2ACCD0395
+B8635FF543B94CA4151C672719E68D1540047B466EDDA89D3FB44E2D75602F6A
+639D9F99EF31C5B04299DB9F3B51A574DDB9346BFF5C978F81246026991D38CA
+899CAC9A9E91BE864BAA95C082E6A89C7514FB6518341AAD562C3902A8EA5C9F
+413CB578D6712BF142F643FCADEF165E7ADCA15AFEA3A330CEAAECD393DCC91A
+75989E3B6D937101C344F859D53534B5CE55BBDE02C4DA5FD1B8350AA76A887A
+875ACAF58CFB7B1E755FD2011FEAF1DFE43928AC8E01C09B272503DFBD21F115
+2577A6C990FCFC9A42B020EFDA2E199613B0552B7765928F2EB3C4D7ED2B4D6E
+978CB8E88E1DDF4E61A50F34CCACA8DCBCDBB2CB1C747F70071ECFA1F31C9656
+22D28A21D48AA970CA6DB819810006C3037D4637E26B9760F7BB016EB4FE8125
+0B9D841ECE3D5A3704D93F448663998DE3FC8EBFB76CDCB79454DEF45256CD3A
+2D180C96F89882EAB95A97E5EE721959642B176298959B934141D00B6C7CF1A3
+B1CB3A19E4BE96C990CF77832C665E6F0828867F3859879D83FF45FC5C4489C2
+00A8FDF187E6723B23F760AFDFBA6A4830611C4755DCCCC43F8DECD983275642
+1BF5B6230D3123380AAD3D3A8A9A60F67DDE88254A13CF536A93B326329A4EB7
+BD5CBCFA582DAFF013E2A4F2A909A6DF1465F8C1DD7649C2222E0DE04BA3FF19
+31A0D71EE85F748F964D6D57EE57DD800F105282409FF2E27A08B059AA17A4B4
+E2D848EBF8C8FC23641E2B517710012ED40350615AEBC5C115D4777117440A73
+C4BE0F4F6D73EF7B35140AD9BBFAFB43FCC0764D82E3AA81F25794DB6ECD7A3A
+6B72ADBB483D979591D85D3002AF1B4956F3A7E083BE9D6ACFDF409852500ECD
+886D3C4E51169ECECE6297959B78B813586F2075701F256137C9F92399F3E5B1
+82FF6E10B5C4CE5078FA4A71841D9C3C01AD81A4F9D80969AD249DDF63FD9505
+6B152B2AF6D4CFFAE20C111756204BD7BBDDA81A9E3BF3024D31C90D1CBB4B7B
+BF83B8C033868615017CFDF7B2FB2DA13A7D65834652CF604DBF9412366D4823
+36486DEB84980FD65C2875281D0AFDFA70EE5011118D1CEFC78FC4D4AE20AD45
+AE7E74346B8897BD97630888CDAB0461B781997541F1C74E240623B1A7FB26FB
+C4FE22401B8A4A6239B10D9E897191D185270FC4F2DC7ED13E73F9B0A1F3F0D4
+31C739380EDC495827B4E81D7DCCF8BE6D384ABAEB6447B65FF319284F0DAA6F
+5ED58695628330CE770F62CA16248B1E0FB657214115DC760182CF062D97CA40
+BC683C923DF12BF39E725FAC6411359FD71DFB26E8FBDBECA81E03CDAA5FEC26
+07A5A8F6C925582E6C516FEA20488E24CD42A5DFD29DA96E6C9A12EC451D18DD
+9464DFE4FD5AB577FC667905D9BF08C7083850C3B3EC67DB8CAA3695DF32C256
+D54ED4483A53AD3AD376590BD1BEC8C5AD3E253B3EC721F4A71CAA6C906742D0
+AB1A043660F7679433F7354CF1A36E59B40ADFF929F87B03B951D1393F50387A
+B3E7185DD68CEE7C232EF44B747356D3C81D0A018CA61E48EFCDA4EFC203AEA2
+838B2885F7B626512C631538384A58C478AFCD28F4FEA7FE149D850182A270B8
+D899D8CF3730998BD517CA64AB0A9E40956D4755D455F5A56BE4DE02EBC29B49
+7B800445211A9150A9D09F8C285D67876F5C5925E12BF01A464049BC6BE89F5D
+807E9BE5B8EEC3E1EAC7CB602C673D0E2C64F79BAC2E963EFBEEDC5E1C6710DA
+290407E7C4B81E3B8BA1D40245A1081FD81E2DEFD90944A67EADAF922C269175
+99CFC6962F9409D9BCF1CB785CFC2B59B8E059CD2A184FAEF63A7E4708F82785
+E75B8EADD1C81D68908B09B9FE30E8EDA5AC37E2257D5C689B1AD942FFC30273
+2327B6A7A6F92B6BA207979CE10AEFA56075103807D6BDBE7397A64E9569C36C
+CC6AD742DC9D5E935A8E28101A68DA4AB6224BA4544DB47247A30F98B50D7211
+229703CBF5410F964A91FDA6DD4B0A603361C3EE0B65911A79DD7935BDE86032
+44A74B051ED27B31FBE4B501E20076AD67B32A6908D7614CA95B06DD64B01C93
+14D813CE0EDD0F2FDBCFB731995201F07483A8C5ED79C56CFFA3BA2EB734689B
+D0BA4DFE2F46E9325A9E7B6EE2FCA7825AF486E0A4606D4A1E6B8C8439AE7AE2
+347BD7656CC4F48DF8EE3074C98C3777E037E8E26C6369008778C331A0601077
+14EB598297507B9F2ED2BDC03C3E29EECADF0F5FFA1225DC5F27CD8EB7D7199E
+F496EAC3998FC12515E0E75A7952C6BB951C8E782145F445E917B19413C1F702
+AD9E0180E4941769351F4DED721C0089ADD66BAF9417F5CBD78BB53F12F14CD4
+71BC0BEDD7FDE799A9306D0885FCD40BF15DE837EAB5A40EBB52CB6B4ED299DB
+B12A2D1818F135706AE013BE70F3A60057B5A82D661ABAF018DFBDFE65AA8E47
+AC6C8A798D2F3C772C0BCDEF0A9CFB8BC638AA64F95D41715353D25B2143B4D3
+7BF3852091153F5732DEFAB4D4BE6199E13D1D9258142FAA82F3EA57CDE218C1
+41CBC59F5951625C556F6D38557082F300E341B0EF1AF38FBEC6BBF6EBD87FF5
+921FF53B6C78217355B9C1C17216DD5541FCD35123EA68D57904FB1BD7B9A7E7
+3BDC01113118854E5FD8E88712E1C916ADCB543B264D9573D2E96376A03250D5
+700A0CBDC1143FB85B69CD3455E5CAFD7AAF3D2A2154E2E19E9CC8C233AE6E94
+53A24290D61A03F7CD038D15317FDE765000BCE92199B728DF17AE8D540705FC
+237F527B4EE8EFA5A870BBC588090A087B108FB0ACFB705103D027DD942D8F7E
+CA2293C9C50DC0CDC960139CC4D6384A6BBAAED1D50EC10A261F22EBAFEB2876
+76BFE0D228A14D6DB2524801192D1F0EF49BFAE7667188B4827008D05406539A
+1AFE0979DE52C462D998F769FBF62A45552C6CF1B30059B26F3336DF19093DC8
+2C75A5A9022EA3A6A35C35965A96C673FBFEFEBC0EF188EA9B3B31036CA56634
+F7F89E88C7611B6007BCEE35E423B73A63028078FFA84E73490DF2F564423647
+8ED87859266AE96C56883B6AFA0A46AF1BE64F7A07F9B9A8A69BB47B83E904A3
+A6DB8B582311AA9C2A787CBAC2EB5823F6DA66D4CCF5B5016D179BB50D691517
+130D77A7C3205F27D4A15DDB0D2062C486B59C70D0969CA5F00687A0886CADBB
+CC06B136064F97A43BEC08811EA53CA13F190FC6F8F07FC498BFE128EBE6881F
+1A4913BD395DD85B683FC2A4290C2EA20125ECA194846444811B0F530D16B29A
+6CC24D9A7F3BD5888CEF45FB9BA8598B3F5032ECF39E2A1A3CBE122F100C72C5
+071FC086C9739482C8A19195D2CA3D041EC36C93FEFA520E94E01037567F0A57
+4CF1102DCBF9670740C273E2CCDA3553E267EF8ECBF31F1FAC3B1ED824DA935E
+9E52E9586ABBE45F3B5A6409C5E779B6A0768AD6323E76606F20F40F401AE6CD
+44F2F88CE5DE95B9CA1711A877EE203769B566E263AFD6360F1312A0AB9CB6AF
+2546F112C20A703A01AB255739647E46451EFF522204A0CE985A609083F52A1A
+9ABD0B01910B4FA3E4FE3A060791E1986BEF81F9150C2AEB6391AE1F09F1D94D
+9BEA9ECB59E7E9B116128DE2205D27D2EDDF96FB50F3E1CB742CED4FDAC545E4
+9F5B5BE0A88FE7B227332D171E14DDF89EC0BCECA370EFA73C40EBB1A20FAE8C
+C1B7EAE158B5BE22AA16F12952628B2FE8F086ACBC5F778A18E7B67963975550
+735D4CB5ACA7279379D2381BC97D1F2613F79C32742750006973C036BE035C5A
+BA17EA7BDB9A8F098B733DBC954574927A16961C2B7DF2D0ECBCF742FFD781DA
+3E0A3A1278178426F4592799264BAFDF16CB96EA4D1ABA4D806C9D264095EF6D
+1067FDF90690EFCF0146A1E143798F104534FF17AD762F0355DC69F821234018
+A042CDF7D7379DC718E0865FAA8B0C757D0A19498CEA30513FA12003629455AF
+B115BC2DBAC68D4937314FE10CBBB96AF8B3F4CB26CFDBA604A7865584AC0763
+BDA317AFC9906AD0B8DCC5A6A88A0B1ED4C6CBDF5F2BB5A5037C1999CCCF507D
+AD3F6E4ACDEA803B4104BD05889027E00B027715C1FFD9DE303C2758CC38AA7E
+9CC9AEF43DC69027ACE2AC9CB078FE8290FA53D3F6A2AB73EA241E7A53806998
+8ECC1327E41B13C1F5F79A1C963EB00EBAAC27D716206FE780323CA86495C3CD
+7EDE7B2A5753E0FD0E0B62960AA8CFEB2823BE0371EBAB60C6FE9F279133E88B
+2F2DC40BB446D7C3E955243C55956B7AA576879BE1EC0F2230796408D654A069
+A93FC77990E9C0D437535FCEB32D61DAD9EFAC776FF20A7110E1F3B3C4D89AC9
+759C25536A1604BBC08D52CD8B893A50C0490691960F833E421739B7BF232BE8
+2C53D766D04FF056E6AAFACA416D25696ED97D10175CD63BAAE9510FD1CCD8BD
+06A32D6CA296C24AF84692D043E5515C5C261D8C49306AABF81A6D6977EBE74C
+51A79CA47EC3017088019301ACAAB074AC3870BBCF2F7A24760CBD344753DB5D
+83C3CAB511E2BE890C2EF39DE85FD5778B70C0CCFB18A7717C794488B1D8D1BD
+1B23DA8388227ADCF12A251D7202928644FB9F97A97A48CEC170393E8B261E26
+99635A086A8BDE8DFFF1AB3E25F1A6AC7DFB45723AEC5A0DED5769F9AC15A4FF
+A951E7D42EB97247257479E3DEE9E695C3D544785B5C1E6BD0B5F4D1619BA7A1
+623A55DAFC29AA4502274386B438F23EF0A56561EC3DFA3F85A1011338B2E5AE
+40F075D94A3EF78CE49D514A237A459E4BEAE702222377581FE3A5A6EA51E701
+CDF405444E9CAAB052DEE3E7834DAC8988EC4558E03CD0D9935DAE536CD28ABD
+8BF2392B102D2DA4FC0D219DCC8AFCBEFFD823B324C539E5E8B76E006D596C46
+BD79ED7547ED1DA6E352FE2221170EA158E6717C745BF178252CFE4C75801C86
+95074789408C86526E3E872D606DCB4E37B035482471101D8F75CF415BB55E2B
+AD747464B5FDF829AAEE09A6823BAE96F66B1452FD4C25A88934F12F448177AD
+135818B74EFD6F812A11CD02561938195F7126DDB92455434EB548A5E1B28511
+DC14E3A398F9D8C08F23B2F89370594F0E6544DA432B9FB693F1265AD432CE20
+8123E5AAE03AC7D2C9D6C129B0C3B39CD79F035754854C2ED206791498E26C52
+79BC4C326BA7053582745DA47D6F8231CEADA2547CBDB6BCC2A0858758D65522
+8180BFA16671793B335DC33670B4C7C99BAB013CEB0913B1AA5D0288ED9D527D
+FBF2D7F780292D4EEA768D04580A1BF6D292FC886D00009EA6CEDF31D2D22E89
+4382CA2F0FB37686D30898A9EB923F0A181AC58A4A519DA05A5F8C7151F38709
+0831D20D980FCB1B760C636CA2AF619E226DBC0A68741B659D52635E0D1DCE57
+165B0E2ECE8F37B58AFCB15CEF1E23E0E71CEB8AFB3B5E1A59C886486FAAA210
+71B222001AEE2CE52CA68FC3E8ECD1F4692015206665088B3E52E6C33E31590F
+17A4E0FCD13A761752BF155A22AA0E1ED55B70BC00793756AAD810A10CA9C4AC
+A3804A9C4D27F10EF567F9592731C95E7AAB6F6CFF2E9413036CC9400E00442E
+05EDD9B298BFAD4834737E37910B74063BB1E3D5B0CB4CC774FAFECCAD9ACBEF
+EAC03D8EF0141885A587B64C83660E0AC8D9B2BE4BB8FDDE306A625DAAC314B7
+B9C359AA51715B2B0DFA7D7F671B1C5EC2B1BB5624D72B7AC0483F7F2837FF52
+2899193863B63E78A39D926940FC71F00FAEFF9751C0CF42A834F186D3549393
+7A052E9CE214054A6889AC95AC408032D305B1CD6C89083763722860F875F4FF
+640556DB2E770A449647988FDBA00083BEE2303682B28C8C7BC163777EB51A97
+A20A3F99A01D5B6F2C183048B5DD93A8D445C5DFD41C909B49D23BE41A60F01C
+1D6E704C8C5F9D783C224B70E56009569C54D5F64423D3BFF8DAC962FC050128
+965B9870AC96D51CA8420FA8420FD88F6C7B963822BB292F2B00297C40507A70
+2A32271F34B164F772763415FADDBE6ACF6EF3E791E69EB0557AE5693DB0A20B
+1DD6536F9D74BCF1C0265A4A88C31106E169732563B2EC5AAB3C0768AE2DBFA6
+4B2C5F7DC339B4BDBE3704DC48633BDBEA8AB3195E9C4677088C47F074D28ED9
+4ED5F03A635888050524C82BAF1087764A217B1E9585C6C38E41A7A26B355130
+9CD809919F9976192C46D2581F984E71B6BE7E626202B45B414A97BB4963E609
+DAA06B99E772BA4C6FA7DCFBB5E2AE2E8E02358DDDA48EDD8B46AD558C1E98FA
+D23EFAA66E98B1C49C08BE57FAF9DF8F246DCF7FF9DF21C48DADCE837A503D55
+BA201BDEEB84553DCE5A0C3E2EF0BED804315BB664EC9B8459E09A203AB28903
+9850DB3898EF211CB25C20ADD50EF5439DD13CBFD14000B15424054E0C2147CD
+02098784127BB9411E4C96D30C16706DBA484D3C2AEE11D693ABD7079EAD3AB1
+61EED1BDB6CB6FF66B9FF26D4BD79AFBA78FBC53E7F6AA1E103155B980EEAB9C
+ABFAF83A91206CC20932DC36910AD39DEB52E5C0539DC99C056A287AE661B13B
+1A2DDE0AEEE340A727006033BC6636C743D310130EDF6383747CFEAF9BEF1D60
+8E851A71F212CB203175FC6A58EFF38A833D588A1AE6457E269045C40E432127
+ACA54E03232ADBE5FF45C23E025665F43DF522F20E776163C6B7D069B0EA8D46
+FBE3A12ABCD9F5C249299B57ADEB9B9AB1444F42837B39B1BC6C4026F788CD51
+93E52D681F719ED741C7C9FFE946F665494F17C17501988A509EC377AEB8C87F
+8BB6348134BF9806C11669EC6A43DC9B8FD334416DB537D1AC9311E69417CFBC
+1565476D77E4C3A1C96FDF49E1F6D62302B571A6FC3037DB9C2ADA5CFF15A110
+83FEFFFC074621E9ABB9C62CC3969B6C0864C41B757F23E189788F0A0BE16026
+D1187D48AA190E42BA6ADF00B80E44AB5512DDD195C376CBE0825343DCA082CC
+411E26E3A71EFB7BCFA1B43BCE6F86720E7A0D2A60DA0ECBC4C3A0BF5FE07553
+16EF96247BD1BEDDF29ADEFFFB4B355ACE88CC5D4A37E7D7817B98B2B1E4A524
+C54434CCC39C7A5869BDE8C5D9E3098CA1B65AC57C9D81D1EAF711423A9FB92E
+C20F18C80E22E7731C56F60703C6604EDDEF15F234A46F8659C724595980259D
+35AA0847B7E96F0D3B3F4D9D1A82E8742CDD1FA2058770AAC4DDA727C506C700
+9A9F93144600628C46B6E5904B7CA98D21F4E08E6804D920AAF68293C4F0666B
+1742FA95AA85FBA95037D9FF7E65F6B503D22180437AAEBF65FA8901C1903EC3
+896B213EA46EF7B5541B74F72EFD07C752BFFD26B8746019D131ED8B94E23794
+A5973768AA9FB961394105930FDE07BF0D08218CB985079BA634D8029FE54CE3
+F758E2C8841D7E2D1D8DED3D2D69E437597B28CA971E8161949BF5B71BC1EC15
+910426E7C2855DC776AE87C7482DCDFB994608C0189B7E24E2F16269068812BB
+6F1E98EE8DF82468763810DAD7CE08EB0896F7D5342BDE3609522A4D6670016E
+A837BAFE7CA0E712D9C68580B5A30E544C25A956EBA242C73DCC40209CC0E557
+D16ECE17D18FEAD279B4143B5F3C69F7F5087D5CCCC6387CE3745FE9FA4FBF24
+A239EE87218BD2933BF6FDCEE282EEB8C709303B35D6A8D9279917E28FFE2CB7
+7F7843C0D4BC1A5A85818F3417B85B416A3EB78C00CB196CA920155690D58079
+33290BE8EF54AC6653D30FAA959DAE3D153426163119BBE5F4D6636AF877D304
+4E74FE984B62E07CD1BEEBF56A26B5B2CFD7E622EC2211DB6368086807F8CEF2
+259FE58C1AD88A982DA8CC8E3656769F2BEDC9B1A1A26985BC3F4AF421DCA42B
+2F70334F378D6ED76EDDB59B3B754EBCFB8B35FA47E9DF5CB209BE0518F9E6C7
+22A2A537A3209892448DF436370F0E5DC5E50EC7691C720B26B5027C2FD0DCF6
+BC303E8D72FAC731E2EDC1E2A70C0E51CA0103E7F97727583E65ED760FD724F9
+D318F10A6F16A98574ED667E810224241CE1E674C20EB3DAF738ED6BBD6360F5
+2BE448328D5279BC25C35F2509B2B77BEAADEB4C8F915C73888C953D40417510
+684D630CC51822F84466E3BD89BBE49D4F01D3A8AB9FA1A4A0095A76E95D6D1C
+222FA4123029FC4CF44F1E0BBDC820272D681B7540CB096976F01DB1F8F42B59
+1954DFEF62F91CF5D72849B987118BA52928C213EAC75A50B61A7C1BE41B1AB0
+0EC9DE839CB0657A17D9B40BFB7D1A9E101C359E27168A641AC1821760EDE5B3
+53BC6D9643E68F49F87B75AFF41236A9F59F9929BC6BFBD4344A325F5C6929F4
+B1B977F84ECFAD8F885A3D4CA3C8DA38536BB5B76ACBBDA57F882F372EC4220E
+1DE5276AB135BC50ACFE5080E281D2243CBCAB5465F18682B09942C56456A432
+7E6C3BFB691FAD4BD032FA4CEF24C1B06CB560AD996AD5C9DD766FD65D3A9C10
+534B84AF27525C7BB98302D952A4469A17F850AA95AC91962AED0C8FD8632BBF
+73D29C76285F9733EC29D5B6C7455ABC96BE7F4A3056364A329158F29A1B69DF
+AF0BEF221497937A09FAB0C4870C8EFA15303E8DF5B1451805AA50172FB1A797
+02EA9CAE6D6EF65020201A5A0DF800F80C02FF591D1BC9A4E504BA01F48CDE72
+EC8D0FF70B703E749B60A1589B1D80F9E71E8CDA61E7580C12F7F1410353FC3D
+0B1604AC55094DD12433E043D958B66E72B718697A209BEAC588407D4F89430C
+DF029CC69D52297D801E441FAD734ED519FB78BBF223A60624740CD10AAB1C38
+56534B7525561DD7776393CF031A5B71344809979D150E08BBEBADC84A7E0036
+870490909D120C9614974B2A06D30ACAB28BF9F812889932DEDD470BF2D1874A
+106489BE6CE558BCEAB2B0685EE12F7F8099854ACACC27738BEDC39F1034B1DD
+08B9D6A0EFE43CE60FB97E9B4C0A2DC5B9B61944ECCBEEA72915C03FD7E467CB
+FCB568DD452C729492D0ADB06452F78E8F619A6D4BE8FAC82B3F3BF301830D6D
+2773D4E95DA7FD8C38D69AC9BDE1A779AB5B170120F4B8BCAE745FF4F56266B6
+ED9D14509CBD0CC4DF264613B1B021E8029CC0D22F06074E174B635C4C0DD15B
+1C2BB2B53CDE374E4E6520D38D8664E9EF753B1E4D7244E071912547E0275504
+C0266420D5F18027CABF3061B054AE9127C7D13007B03C0A4FF7D71ACB26D732
+FD54BD1227C94BB259D8AC8B246F666D3452BC92CF4264664A28C6A744C13AA5
+11BC7801E7956F4E5113500AA535BD7B5225EB693E8A0A8FA7038F789035EAA7
+B5E227C1CB68C3A4AFBB516DABB82592D5FEB58529BED646E3A0E8C0BAFD87EB
+CEF8B46FB294B2EBF7720628A3711AF55CDBE85C92A7B0AB3F1820D6568B0FDD
+DDFC91A440CADBC88ED53DA9E7C408BFBF59CC87853203E3FF707C55BB314805
+C0E9695DAE783943C37CCC94C7387974A5C88F1B9FE40CCDC5535A48DA86CBF6
+A6A155F451AA39CDF4C010C66ED11E3F4AC9FF5F78721512E8757B77A301400E
+6FDEF7FF640B85EB573BE8D3CF834E45B944B22A01DF1F657DBB58A071584A08
+D6943D1E1A712EB23E749BD181C8FDE4C27CA25B9EEFC1BEDE9E99062D83C20B
+8CEF0E7E7A7D40983B8C09871B41CA0B3D414E6B503DFEEBEAFB224D1F129914
+67889FBE3BA7C43423D2851045E70369EF98E0FAA1DAD562894C6C93D76B3A20
+B73E4C54E735613973E6E19700ACFF7ECBBDC340EAD2AF295A2F070AC4433E32
+5678B6F710C5545BF2721D3FF8A895F05F7F5D8BA3FA244CCF3EE68544098667
+EF8DCCFA2BE9DE5342D1FEBB4F074A1DAC4CA2DBC82EF2B85E7C1C3E750AFCCA
+1FC22A49350D891C052F46D2C04C50BA7260B0B975C0996820BF66F9DD100B26
+1BF9CAA3DAC323CBE5BD11B75020AD3932499ACE1C5350EFEEACD5334252EAF8
+04B2A70F1027AF7D0CADC3AECD739C9CA5653426CE0104D5A1D5D5893EE0B068
+D5F6AC8F6413214052045D650997D30927FC5283F35F6ABCB5BC05D92A241271
+52E1293BD8720727D530A4B368DF0AC5529CD334BADB1F8677D25593AA974489
+2F9F548874FECC35FC83814651A33BF12C79C53A35108C45AD8B0C1B1EE0333A
+61F52F2FD2367D066F3CCB15595B21031EE2C1AA1A76E103978447A34E977FD9
+664B7470201E0B68B4206CF910FB57A357DC43923B0D7E29E7B4B2245097D593
+DCCD25A270E762567ED47BF94B6301D7A996B13CB258872DF5302FDF7F0E7BEE
+0BFAB7FB65F0DB0503FBD7C66371305DCF168797BE81DECAC68FF3942C9ED677
+427BC47B7AB628A989B8BE079A81B2CA513D69944B03A21C59E99D1B38E65AFF
+392A9E10AE8C6094EFCCA5B4D2CAAACF88B6DD46420FE2858794BAB331A31466
+28D371C206865FE867912F5A7249AB90095B075A2184D676A5C7E257A581F693
+FDD8B34A77CA78F06B674E06E3C4596AE9DBE770A51A2FC5D50DE3744F858F63
+2A810996C917F1DAC470CA7B462684908FA48884514D67ED5BDC043CD53021D5
+9C701A1D62D9791506430BB45CF1362B4E8364A43E7E59EF5F44F78CFF4C2ABC
+00CAD79E6C2A9ED58156E27D74959BBBD262EB44271651D95FADCC6993C4F789
+008648C1282411014B9F1EB5EA7F0880A80B3B24860073C2EBFEF40CD1AA93C4
+154CA5BD37CDCCABE50C7EB3E5933124E2B3B5451226CCC20EB0611F509CA7F5
+5B2783812F6F4C1F9119485933D8E441B9CD7B18C88E193114613F1B55BBD2EA
+3083766C3123D53F2A968F4E0F4D48D31C3B9DAE4FBCB8CA79C5B53EFA185F2A
+12E74835F5DE5CBCF32353991DCAFE8A45336264D7C1DC55EC1249FE846B9998
+2E47E6D855E6C56E18CBBC60B84B0AB44A4028CF9AB16F03740EB584E81491AB
+00845F21486A1F903378CBABB122FB199E33C89DAFA54F3AD43EB6A4A3B9759D
+454E8E3C14FADB4DEC10C64810D3427F1EB144E47A429C8350A99391C82BB82F
+29BA08A51D727FF0FC6E7D0823A4ADB2B40D00A96F00FA7CA1D5C8ABB86B3F25
+5CA86D9C55020908DC2C8371F5BA6D999338C7C9E06B28FC1B1B3E5FEF3AF0AF
+FF412A76E841CCE583CAB8B89C0ABFC585D365B7D071E6E35E40002A0F654689
+BD1D5647A800FC5AD97C20F84E9A608F9BB348EE0D3E9A542B4262BF1F424558
+D3E455268D042F048B4760A6C2E6BB9A783C849787F9F02B98C356C1BAD94634
+2485F033A0CA885570C419818C8203CAB7B9FA6290F8A62EF9033713D1257064
+0E305EE5170A4DE71CAD89EE2C0BA62E9E69A9870DE74CF52D0DEAD65DE2A291
+2282FAFEEBC0B936E91595F7C6E0BBD33E79FEB2ECBE04891F1071D631B3C9EC
+6305879468CBCA461AF927A3561AE15A463B24461B9960474005F98892057048
+6419A27D3A51461C9BB9A0E8E621ED1F536937FD0BFCA77A3C33C35E11F3C367
+554833F4252C036D579F32DDCD7F4081B4BA73AF51A2488EFD7877D917B2D4D9
+C239AB6DF1638C9BD14BFC9964A0C65963F6B79D40CA9E44A301F437B8E03B73
+0A52683FAA4CB2620D7426916F89BF72052DCC7E24509A893B715C4515E740F4
+55EC935779A22EEF3207C657A6833F73F04206D147F5E427B0414D8F6F3DDCCD
+BC895E1FDCD3A7E76D4B21669D5C4C5113959CC62F0B7023F58D771229C2A3A4
+00FA0B6760C8B77E356410A854B23C9BE8F4BAB75482495E621F83045452DD46
+B5F299871544E4E922780FCF0BB6DB666B9EDBCA62703ABD4F3CC69E15728DBB
+6C2DF999717533FF7F98ED6934826FC7569A4020DE4B06147865178D420E8CBF
+FACACBDA128C17B635329AD9995E6E2033E6CC702D5CEF1F0DE1F25322BF58FD
+9041EE0D904200FE87E2D5A672FF0B3C63575D5F7E07F01202FCB8C42EDD0296
+6E657B5D703AF68D26FCA74FBC8076ADBA7F5A4BC58C10D91FCBCB628AA9F313
+71CD61BBAE0B6A6C7B774DE4903676BB3D210F220B413F0B95F43121741523F2
+F65DBBC09B04BE87A030C607A545A9D5791FE4FD8F479BB213662ECA9103027C
+01D85141DC897832816392AA1F49056AAE3EFAB417AEA3C79E49E68EE9CBE8B5
+717FB5C3C5E811F51BA685A178DA6DC3DAD589ABB4F8A0A27A5DDCBBB11A5E76
+94B6320110123C630857538E620AF88BD8ED5B5B8A10F1F28A15BE1ADB196F40
+CB04E8A50ED5322AEC3CBF8881D32160209E8FB6F7ECFA70AC58F94CE3810BE5
+8597D5657E39AB15B3E35DDD508F74069DCFBF0CC70A6399C3AF7B04D4975FA9
+31698D10B8E9CEB89DFDEC2989C37FDD417360F39FC6802EEE5E3CFE7DF63361
+758BF4861385D4931323EF38E7348EB98633C83EF9BF627A29219E9F75A1D341
+5C8091A908ACCCFC01395AD91DDB82EB58BD88D5387994A74F35BA04265BC32C
+4DF225782658BDAF63E8EC8B5B4DB6CEA66F83961D5B41C8FB62CEBA3DBEDC69
+B6DAF5BC4B541FDCA54825918B9C84E7122D9718D28BF9E9066C8B122072225A
+1B79B4A73C235DF52511CCC1E0A3420B35A5598230CBF3C6EBF09AEB6265B481
+304D9325DC8AB8F6853D4111D42724C558761991E953F114019169BD632E6639
+037344F1B767B0DAB524847DCAE3C5CAEB864973F3A3FFC06312A7753F571888
+957ED07CAD5EDC9D04497FCB48446F6C44C6083BE9A31821BFAF1046F89985DA
+009025D4AA91058EA366244ED8E64601B374DE230A90463AE4E57D5D995BDC18
+F621E2B31F79439BF5A4984BB6A02833ADFDF4AC0DD58F53BADEF74BB1D4AB88
+90AC403AEB53313D51303384053A941B0AA32C3868582180868D7B6822533E61
+A4C1E26794A2D9F505EA75EA790BA944FCF61B5314DB14FBBB6252495103C7CB
+8E355F9193D5ABC556F3E4D5B6CD2B8FCE08570B3B69075E241E06CD9AB790B5
+948176080294D56000A0B7ED21D906169D052EFC220767178ABE60759E148036
+388530AFD262244BFDCC980D432DF470C4243BE84EAE322C4D8EED4C2242F490
+93639E49E5548FAE9DBAA2826176756D46BE3449E33E8C1F4CEB4720D0667DC4
+EF9D390416E580ECB81029054635C6DB6D8A1B7B964CCE4B15B632416804C805
+0BBB666A4AA5038D4ADBA00ECF22EB59FE9E6E4F801CDAFE3E35C44EB6C098D8
+093AF18BF4FAFBC3CF7562B90029D395D58383E75039003351E35057489BB5A1
+6AEBC03506289C918E6AFEF280E437299C2ACA7E6D5D52AA3EA2509A1758EA51
+637645F7CE54EE87093AE38B8FBCAAAEAA2452AC65FE2C68235840BE62B91742
+96AFCBCF4AA8300FDAACB55FAB27B2B29C488628347E9262464EEBC8D13855F4
+56D9775DB23F069E9CF9C84813F0CFF1391D72DB08B0C9A3FE409D8D08C00562
+DAEC5022E11EEF099724E648BDD73DEFF8E1FFBB3F80042554CB0C03158793D8
+CEBB320F8E0A86CC95E5860355F00DBB146380CD6BA35F93F5B8FBAA54280262
+31CB7998DA8B43473EE8D1895D5D85ADB6E5C8D2B5109E57DE3697F541C7B27D
+12650F96FC01E3D56F457FFDC3BC2668F8E6FFE82B94D81A648046D7CC71C4F7
+E218F5D5D9F899E5A3A33EEF7EE7C8CBDC9F239BD2C12612519ED9D4E89CA4CF
+348C0EA704B46E56FD9EEE336494CF103C93CDADA00AC0CB74DCCBF4737A481A
+F330C6969D9925BB1CAAFF8A2D857245B8E4C82A7915D97F7466501EE7195D8D
+C35D2B5DFAF50C78686CD5F5717ADC8047B7877FB15E84961F372D03C0679375
+88E4A9A5D2492D28D55FB00ED000E2B8DCF24AB3EB4519CDF68E3FF98B54A1E8
+E4DF661329FC27BDFD47BE63E85A469191E476D0406774727EE99EEE6C2A1C0A
+EDCE20F13FD1838EDF3C1E5FD764723276ED5D853E609B0800197BD8E59C1265
+4092D1D76BF60B1FB675B25344D65C0F79C3064CB634970B5ED680EA710FF884
+8078F9E050655644617690A3EA66AF2D9AB40D187B46E22E72001E2A9D3541C3
+5BECA48A812700501568565A8D37A2159A51A89BC59D4ECA20F3328CF48838F2
+B6BB50D0DFF3039160FE2E278D178B673361A3D412BF3ED1554540F1F0A9A1F5
+67C7C4B257B97C6BD1FAC85ABC9E86B175DBA1FD0E9BB7C0DED0D47956AF2389
+64EB6C4CBB3A03A8DA5AEEEA4422F432EEE66860BECFF5BC5752147BBE75D0D4
+BED50695E88D2E9F01FDE0FFB409CCA801EB16F6471181E62EE70AE4AE06B9CE
+91079CB5ED83BD82A88C835CA82612A4431EB7979FCF8A7D1ECED31CBD1A2C3F
+A586804D66B8A86997A05D349FC01A2796F1892A42979F50B0DB1175B42EFC58
+0B1D3CB8DC992ECF5BA9A6DBD1756C20DBEA6948499F0D245F2CD8D121A8F916
+C0D41F5FD5414C12EA4FFC688344F7EEA2DA6BF2795D4D479851DC004555E3D6
+0AAB1969509FFEE0390AEAA3D631B78EED9370B286B5D2F871EAC4F14FC32B7E
+5571510C3C9BE1467125B7EB3C9E161B0254213733C6992062A63C6904575107
+3395A27167787044056BF09BA5BB742AEC0D7546E9D092D2F66D3BF9564F838E
+FAB5EBFE6FE458D8FB9BE05800AFFF6924270F06FA0DB61E48F36417F2B84ED6
+27076B8B6EC6F7DECD29DED0DEB9D51DE150938B7E94D09D19F28E3608DE37BA
+FEA6BBB3BA06C13F39BFB5268D4BA8D8009E41D5DD8F5C0171FE2859A78C8F16
+8A98E12F32F867DBFB07EB5404B6092C7B04BC47118E3B3FB66F981FF9642C15
+A4A63362DD5D20EC4EBF415D79626385EF9D7ED7B18A41A4C33F3C70553B31A7
+01EC23459FAC1A5B9D320B962D966C43887CF3BEF40D2DC83E843E51C9870C2F
+43CB49080C3C477358867A4FE87FB6E9F79C7C7D573B0D65F155B2656F4D33E7
+0C6049E8C46513CC500CC600D7EE5D30D32B9324C89AA10A9D676EAD04C9728F
+4A4CEF9925A294F26E6AC63730B4520C43BA5AB4EDD6441DBC3F2B4EF8FC4AFB
+1ACA19E714C1CBC4AD114FD0744F84C85F4F3293BBD036EBD4CC29B3B9609F46
+E856F37EC8E33396C89DDEBC43C0A78A3FA67A155E1DCF82148893C418531769
+CB82B1B6357335742E7F712A182C413E8D8192BE6584A907969A48EEBBE5C0F7
+95C7219652F28F3306DE1F83315BFF09D66E3C31CDAB730DABB8ABC1A33C2BCF
+046D3FC7E0084877999B7D2A8AA3880006B9D63BFA9F82F26AF0B93372E55EF1
+DBF53C7494E42794097DF15DDBF43180CD643589E2F3A40AF0A1A0D7EAC3373A
+B94B1C375A45DF21509C3D094F230B8EF207F4D7EE1B6096FA047D0AEB83D12F
+E3AE9ECBDF2C24F3D553DEFFC93ECC63A2479AC22A209FAE85E34D7A6855C386
+C611D60159CBE8A9595DB541849FEDDA99DB09BEEE9499A6CCEE6A0BDB150B11
+6DF9A795156BF845FB89ECD6939D6EBC8615D8FC47911BB34107E71FB3E4507D
+215C1A8476E75BDD1B3D87321852AB6A94D21027D35A2199F25DE7F7BDC4C865
+98DD84C89BA03D5498AA3AD62135F0B1390613421D52E2869B87579EA5AEE7BE
+6804CDF29BC99A9F7355ABC9E42D21E706B97091AB73D3CB9184013C6D8980B4
+CD5C8D5D13973F342E8FB4467260B23340BF1254E3D9195B1D6AA566976C0CB3
+62B492B2C8D4EC481C5756496FC54DD7A6EF6A209F1E15FE2C3F57821E9E19AD
+0A563DD390A89A6722513345EF58F98D65450541A0C5C093E69D749E0759FB1C
+DFCA7A4782EDBC030B9D692B3EB1003487863549585E94245D9ED36D5576245E
+C189F5E31A033C68BD21D5A477B756ABBD830CEA8D7F0FC73F93352CF95D584C
+2593F7389DFFED1A40E6B14BBDEBC5368FE10962FF7A8938227FE9C44AF54602
+3EE2AA0B6D7B4044F906480199E49B3F2AC6ADEAD76C88DC8D22A417C8A4BCEA
+D0812F1F513068E700040A9F3B6678B1F51A48592437C79E2BEA709B92669764
+8A058E234468B01F498B5A51E2021BFDC09784C706024DACCA6EC0DF8F9039B9
+02EDE264D7BF8381A66751F4B9FC4734CF608898828B5CC3483C688132FF61EC
+E7BA899F45C3530ABDAD48A5B5930DA1BE15ACDA0522A33E87127C559F551896
+40348DF2CA4651C51475B1B611957E11D787F05CA436BBF1655999F1DBE03AF2
+3C83746EF137EE71ACA97CFA6969D1CE5ACBF61900A452D630011FC3E85FE0FF
+AB5AFB57483E7ED55221A7735E5F89CB4EC92D5A8C9CD73FFEF46D62F8DE207F
+D4DBAD9EEE001DDF0750125FBC59A5E13A921955C6D7CCB1CF8F89F3E00F7B12
+5D358163ECD0CF38A118064862EA04B50B6AC7B95D531C2065BF2CDBBCE887F1
+70650E0772EE5AE10AD67FF178EB51F8AFA0CB0213BBF9757976621EE0058B0C
+3AF602DBCC7ABFF5F467B7854904BD7F7E89BD19EEF9A2F7B8E557283AC672B2
+92BD96D87365C681463A6FDF56DADFE485E1B81A7766EDFDAE58F92E33CB12AF
+EABC9D80CF4514D8BEBDC6433B990B0AB267D378438D738025AD340FD602C441
+A5A4C63510DED267FEFBF9787BABFDB79804F56C89A602470AFC0E541B46666A
+1C167AB82E06BFA1814E22B65355F40813BCA02BFECC086C7E8FCBD845191C28
+7FA8F4BE3F1B4057D192AF55AAE787B0C654468600ECE8A763BF3B5A7324F7F5
+62F7F596204F0A50A5A7E1911418C00849DF24E00AADFBBEBB6D10180E9B5FC7
+BF839E08691661836B5DE3E5041DA4D3B4A458E270B274C82EC58617A98F0341
+C4D379C508B3DA7F2C20A1E7CA5DC9505795944BD83EBF02022F31E50A3FAE52
+7259693253A45AD3AC1D1E40D694D4B33E8A5A09C405B52BEE5EC132C9B27B8F
+4C45B3EBA9CF34BAFF627AB8D86755D31472CE8ED453F01E96F74851862DDEB6
+0A8B4C6A0D69783E632065B095924AD3D5B98A8100E52F2058E795639BF91C8C
+CF10E8F4DBAC1F9BD167FCB399BCEC1652C81DBAC4B0E37DDAC9998105397E3D
+73FC7E53E70028314EFEED71A935C9792CCEAE794608DC13C6D14A069A02FB43
+8A05187E9EE03AC908DBCC7551F1E933B4FCE961926D5B81CC885D8CF3F4CD3F
+EEB5DEE1769A5C5D8E86C7DB3E96FA500A2EB89735C55AC3252CC280ECD07AE4
+64EC4F4BF687A866CD8A9806BF96FCB8AD9BA0972F3DBC2971F50CCB4E1A2979
+480341DC01E58273F4086B4FB7C98D4271829AC9255598669F26F5B59F3DE2F8
+9BD2FB9BF3AD79C02B8199C952D7135933BFF1A3B3D04EEE52CA1CB9A15413F2
+158BA8D689AE2F93EF3EE2AA055B2CF2CB6D077AC8F72126FCE95F30471F7AF4
+6267671B6EF1D3F5A932D94B700CF3FD7777FE123129E874DA871CC6F54D69AF
+CFB6E499F50025567B58595509CBE1300AB209CD88FC472BBE9C5F8124AEF8D6
+3288921A3932D0374333DF8D0F77881B9012D75EADEBD2F80DA17B5B1CF8DCDC
+C71A7E217FBC07ABE2395653552742AD35C5B3A99045B92B320711B18E9580B7
+071C0C1598A58D0CFBA46370CC8111237545DB6353BDFBBA45128109B9311523
+F493DA4EAFC9D6FF5B73A486A8D4E39C582280BE7569C1B272F2942782C52F6E
+C26A3904E0EF2926B98038E35113D0D1E6B91A310F30B0BB7971E5EF0D4511D4
+888AC76E95D810A7CF7EAD44883DF3CBD91F1452F901F6448EB8914C3FE434A9
+60166AF573EB5D77DA5A16A33E5ACB089C8E0F8FEACE1F9C48C83F18B685A3B0
+027007A99175E59A6C9609A363748E53C44A1602A39E96776738B54690E9E4EE
+A3104B25F24E3F3B77316CED31ED193B4A33C5E8E1CC3B2492319BDE215C1AA1
+DD86D2622627C483F831DC8FF17D9125974521EF53760CEA854F0E8DCEE92856
+7E9364B786F6E7995A3CC87196162C734CED436832DF7F10CBBD7726A1A9FE74
+5AF7E934B5418F210BACAA8C3023598DBEEB4DD2B4C92652B61C76FB1433B9EC
+163099EA47869D3BA7C97B1D27503C4C8CA20E2735B650C7A18B57B8E960F8B8
+42E06826FAD393BAF7DE0D21AD910ECCC2D9D5FF7A260F2E88345617B09EB029
+432AB4ABAF89680F39FFF1722917F6EFDA157A5B5158C8A6261CE4FF77D4E971
+D892554EE4D3E1AED976FF227FA98944D159972872D6DBB6E0805F0D7F267D18
+26ACA6D4BB463E6D288CEE66B08BDDB4FC916718B3A497CA632CE6E8FC9AB174
+8EA17C8E6F053F81AFD6D42382AD9AFE8D64B2A4C7D91181A73AC25F06E5DB71
+4506F66FD51B010AE1AE5E82A3ACB0CC3D5BD1224A28B05D2470209C182FA991
+A9F2DBBF7CB018CE87D3EB1D9FF744099C62169EC03A45DF7994D8F42C326A4D
+5F320EFB7ADB34F2CF4031455F5D42949CB30B925BD9C5D7F8F0D85877FA7A42
+DC6B98FBBCD08BC4A760453B73CDE333CC60A6A8F2BF2785B457CD11878F84F2
+8FE44CB9E828A5AD27EB965ED94BE35BDD3C6D6FC4027CBB93508F3116A0D4C0
+0E75B6E94219DA65169079555947CF73645A516B0B779D4342A4E65B0C8DE843
+4858368B3EAAA38BA9750EFCD7864D6F931240E80E49A8FB2ACCD96C67282060
+B4751BD16AC3232A53AC9B4DD68839A36615642E76607A784ADF74DB11E2C67B
+3966754103EB44767F5DF32FB7BFD4ABD89789E9B5D23E51ACFE4E5ADEE1D4AE
+26385ABF6CC8B432096689A9CAC71E086FF2F5A5111EB0F631703C7851538CD0
+D6EB492CD25F666697B3B6C184BC91B05371345FA185AEE6A5AF301128F4B4CD
+75597F9ED3B7823282CD05655F3BEB5BD4BFFCD0F0199E2FDB6C9F8FB3818747
+6738C4F7610C3A2F46314B90C0DB9A4ADC56D955FF6AA22574B727D8857F2B24
+8B5D884511ED7190EEA9A71E9708D4AA1B06222D5FE5A4E25314388A959FBDDF
+1EA0C85E01169B2AAD698AC73A65400E87B7A9E7EB43E022817C7392CEC3FC67
+D6663DC750D40671F0337A49F2ABDB10AE3EAB8EB746980BDEB2E69D762C19E7
+440F5275C396C3B56C6FE9196ACDE6159F41CB9A554D8320A4D71BE0F7AACC4F
+466397A75E981E1A215EEEED4F3A8482A686FA7C695B6D40AE92B4150BD00DE1
+E4FFFA42AAA059FFFC4AC9491C33C05E4D27808B69E9FAE08A86FBD01A35ACCF
+46E967E862960EC4FC2704B507FBDF00FB02494D7059E429E80761626678AC74
+0BF0108F8B03A95ED783A10FC5938D9E42D64E914E9A4F04EA06BE4C8D79AF99
+25B19DFCE00972D45CA59A8BA41E349840ACA3124E8F3297C26A6D1BB1B02DE6
+C52F047B55DC672DDB9BC73BE4B39410E9CFEAB0A4B1C55DEA46746AB52CA9FA
+761C8C8A2D34944E904879403B0686521C9CFDC8FBC32F4AE659FDA262B41F54
+4D5D69DB0D26B43B68EAFF8C8997A267477ABFCC6FB829632BACD3129BA0127B
+1B9164BB9AB6EBFDE99D84FEEC3F04533B07117AF9ECC0BE6845F0854805296C
+03C11A27AF920E36D28152A50418A9EDA2F14940BFBD9ABF2F31E84D5D0EE3E1
+94F32CEDFA821CC1FEAFA56758D269643383A613B466305C21A87E58C9296CB5
+DB8DC4EEAEEA89A1E84D5DF6041A12563A0EB66C2A0F59581FA47099D429E615
+1FABC2046BFC23C7E848F53D118239D666F058113C865B01A8D4AEDD8AC89F60
+819C1A3A051AA665A43D3552760D9410843CA004B1F2CD998A3FBED3A7CA2277
+E1FEAA9AD910849B10145FC2E0D6346666DE2FF7C2AF38E2F84CE0DF16D0B90D
+03E00EC3C55E5C05AD3A120CB1879E84898995AE5A205721E2AC6F88E5B57FF2
+7CD9D37EAE28F3461181FBBC340BE35601D0CDD0FCAC181EC6E2CCCA00ADEDB3
+6867BA1627D730CA71566C9388C6F0E069BFED8968B67AD465645798D18A49CE
+1C34EA0A2DAE4C7D13FBA180C50EEF9827FE456C27BF25FEC28ADD3AD94486D9
+9A697024609611947D03EB461FC8D17B2EED155A46C0825FF872C1AAD02CE9D9
+A2FC62A38F4784B40CC33C298B4E8F7C3E8A3018ED0F497B054DEF36487213C6
+116F39D64454F11B0EBEA532DC3F72A16454A5EFD2A0A702139F6F6647338E06
+773E301EE8FB984CE226025F597DF0B44A73629E50D39DBE28DE1852B0C79E6A
+1FBB78BCE132753A07F858898522ED3420F671D4EC657B1363D88433F155911E
+991DFCD39AF4523716AB392E40BA705784376CA58F5C5F06C71EAB6734C12F8C
+C6E8D698345483D4DC9194204501A98315E44C43B38D7F30C00E01F0D1024052
+D3E0C5FB320D54FF4ED525133C55CE2021F9B06130DAECE83115C5E4CA7A5E60
+78A5AB40B902EA0315651E07B8FA6367F01701B9F5460AEFCC9F591678A12F90
+A8CD4150876FBA33C30AC006B8D168BCB4B4D63259127268C996A5A59D12872B
+EA4304B8A5A08ADE39604C14416F9B327ABBF977BA56FF620A97FE4F2D4D4181
+ECC349BF0776276405F54C882128121AEA5A07478E2AD6C10742FF6430EC0EAD
+752F3541B1CB283CB24D7E37445D4BF42C8BC632D41C4A168EEBD0B086BDA9FA
+3D17F6ADE5D0D70BEDCF0A50B1E16055999018B459146125D16689CF811CDC42
+E1563D331618A22EE81DB417DB13ABDB475396B02F8FDB041DF6B099074AE073
+202B439C5956EA33C15AA8F1F6BB27F0160337203EB289BF55D613ED95A97685
+5F86C5FC55B627453171F5BF641E5B6DCCAA31E67DFD68F968EC79BFA39B178A
+D3EA21270631FD29031F64621061E60C7E2269645A51A239A207A51DB86CD07E
+3BB35993A95FEAB12FF6BA96EE231F1B2935E979AC69CB0CF2416938F5FAEE48
+E813DFFB95D13BB6A92A7A6E2CC08E3789462092F4E72626279E5C8257EACE5D
+B3CDF6D4704A729D020C278BF8BBD6474912424702ED4DD0368F30CAE5977FDB
+3541ACD80981D99B54976936DA5AA9975B84F7F2A2B2CAC6EAADC5B2BF652891
+FF8BD1DC5BFE7033D9D2A2C79FCFCBE44D84513D542373A9CC8CC6267A6C8BFE
+F2FAAF8AE6C30153EE9F280A063D05A9443DC3B99AF1C9C1F2B0D4BBC6804F99
+5167D5481B434092E61F7F6120C743597D4CC8F7F158622C87E0D7FE7595DEBE
+2EE42174102C99FE6092CD19A8E424B6DF432EAFC0046595DD05EA58D034F4FC
+FD90B00AA18C3CA05F03445DDD30A6F040B51DAD4F04EBCECB1D5482301978D5
+DFED67774A1C1251F2003FBF6C4E2913B259D99C55B25C3173F41AC40933CA99
+2CE8EB0145F68130A4B2960C2BE2CC89AAAF8AE833982768B321DEC8FC8EAA8F
+B64A9868E32D1914C46C8A2EBFA46F7C1CF199D24DE24339661F7272A6E34829
+E62E11A0924988177435DA106D7C524C0C2BC1C2AF99D496859326FA74FABDF3
+83FD82C9144B6F03F082E20EAD92284139E45C994018F889A1FFDA5FA2B19B90
+38B9EF87D2B34A7F46AE27BB95E2195F958798982E96979BF23BC7EAFAD3F1D5
+AE454252A06C5953A6553FD93ED295F86F419D15FC76F05B0C15EECD70D0C784
+21CAD58C34FF8689CA2D0A2C9A204D99C2378421A0F57EE9A3E6C9358F3AEEE4
+E9B6A0CC3AB9DB260D68D35E66376A74B26F925F1578737AE6539575B969F269
+872A97EB9E0181BEA5241F9DB74F212F81249B71B82D547D1C9CB6FCDDCFFA1E
+700FF34E08147F6E29F10F0CBEF09CD254EB5F9F8D8099C56D859AE9EBA5D4D8
+256B90DE65747C78D14B4FB8E39A67FB1039914026E0CEB6FEF629E1C024CC37
+037DA8F073991235541F09CCAD292E4F7574ED126C99628F6B208661C2EA782F
+C74AE7FF1F486B781D89357F70ECDE3F36FF6580E6A0F43F9CEA95BE57AA3AE9
+D82F4D141B9F92F22466637CA739BF9397BB94F60A6F4197C6DF0C4A9F348C46
+29FDEEB9DB680EF7EA71037C2C42D15A966D378AB2192B56D24E2EFFE4421B53
+1930203249DAC898FCBB90EF4FF10B95B01E4CA59B25CBC1517740BF94243B52
+E8B96AD886C9D9EDEE636A4F8722956674D838F57A2B049E0DAAD8731CA7331E
+6D5F3CBE866174B949D87043C4686B226AFAB0BC6878D1693D849CDF52B2D498
+729734641F6F8A63D0FCF3139C55D9ECABB27508613C1997A8D8AFD78C8E789A
+D7C30F6C58E84FB564093D7A589F4181EEE55EEBF39F369396ECD59D90D44965
+1E267F20B980A4359B462F692E86E04E0167B965B6D958A52CD880FB69F6C60F
+F0F76F5DEABE3B0E21592258BC83BD9AD7C087B9028D3F1941A2873FE5D6911C
+7D353B921FEA42816DD49B48450049B8F31D7078D0AE7CD7DB8765A8781D9B75
+0547884A23E8DF7778571C650490A77F1124639AA7554AFE3D8589DDFE5D7141
+43B8AF5E82E9098B95F395C2B9988068260570B288D1882D1EEFEBD9E9B0FFD9
+331503DBF1ACAAE998CF3F3452518B30469A6C72C23D3344C4FC1DF7A8A01148
+73FD5F56F95BC98CB2278B583574471BD2E97E95E8EE1860E74300D302602DCB
+74D548F0D7377C0A1887D5FB27534A5560DE1D1211F52963AC6C7523FDA0104E
+72121BA9D2CF1D84B299F2826B5105F140B890484CD2D5AE03C69BC056786534
+2BAFBEB8D80273CA0395EBE9A3BF3263C1F46093C5B3F17771D7AC85CD72DFA7
+CD767C726E7BF2196380E57453AC511C99DF297E4A7D01ECB22A095355C30E6D
+CAC1B1F0FC955478F0953EF9CF88940D6FBF6D77BE921BEA61F3F1C939EE6351
+C2F6A29D1F1FE4383BFBA53ECC232C6535151EA9E1E81355FA9E72847EBE8B9B
+11B229BE65DFE9774B9B2970C8C08431943ED09CD1A09CD6EFF896F43EE81FF8
+69C777498FC421ADBC40DA7AB46E3C65998092017F8B6BF96FADD768770E8219
+71D03657047E0E6E154CA34E4013D724A8F78B53CE623DDD13A5F7B7FBDCB909
+455CD4AB2062AE859FEC2F78116EC8583A2B002C2D9258FE3DF659855CD98E65
+876383D0F67C2BA1DBDDC0F652875EE767025C2EC6FDDF5CDC440577D5F9ED91
+8F6593731D04B25C2868B3356C87A9ACC98AA052932E01C509DA912B44AC538C
+DB92D01A4AD932CF0D48E6DC067795416BF0A4E5B9500977DA66E4B346394D3E
+D27939A56887239B7FC7F15F564E51116B615A4900CF3A67F33EAED29CF39528
+2BBF2827BDAF3616AA1740B7CF12854CB51175B088CC6A697B5D5462C15B49D5
+D4E58A406B51EFF8CABDBE91FFCB58E9C8101178FFD0833FF612DF7F99891F97
+6E994A80EFC41B863696FE7EB6787E4AEDF21E8BB6D5270927CE9AD669261255
+4D345A92D79F62F15454A661B4470310C0C7F85545806CAA0CC180B957846895
+BA04D4ABDF3D89D321D9B9C7DBAE4C690F4625EEF664CD0BFE548E057E484610
+1839E6F5C8662BA539813EA1011E77B85B859E5C2D30C27E19CE1FD55E2953C0
+6C9D5E733BBF99B3FEF8EA202DCDB64B8588E0F0A5EE6D3F214321FE15C3C9D5
+9DDCFEF830B4A0C458962EDA665A95F4779CB7C6F3A1FE80C8C9EC1542EC2D9E
+B583B37FAF62443FBB3E5A7F6BFE6596DF1E9651216FEBF11803FAE1CDDF8756
+A55D19B3B1898C71ACA59364386B4912DC634E04151A443C6B6C307AA2D3BDE3
+7AC16A5B39744FAE7E9BD225E04A466BEB4F9F51959F3188325DECB6CDE15C2D
+66F4C612224BA6A9FC70787FF17B7E0E31F556E2E088DF214ABF9F27C39EE495
+1EE163A644106E1C1C7CF6BEF07009B38022CB5B9C33CA4C62E69DA01BA25CF0
+BCA87377622FF3C96C68D4FF09BE24612DC788F0ED2910FBB1AE8C023B7CEBF5
+86196213453251BF1231B5BDCE182503C9B0E06724133CAD069E14C36DEBF9A2
+5661BFE61BE51624F42EB5717CAE7F05DF20A27F0CD37D268BD50286E891311C
+D55744A29736BEA554B466A7AEB02C5C0575EF05CCB1F69D37EC144458048245
+01EA846682850F97310FD68190044E4CE798D51699058F03F5B0035A83F96E99
+A5F7112737D436EFE6A7C60627B700D4B539288D2006CCA437D0AD04106AC8BC
+9E411030E00CBCDC3F9357ACA9CE3E6A63203DF968AC474F722B889A4EC10DBB
+39295354F28BD8A3A770BCE14091561583447E29292174A067DDBC4A7C638A50
+7A0F05863F435AA2C763BA5CFCF6DF8E39189E79A9178E80A305E8F03534999D
+532CA867B055AFB2077A0C7B5D1B738DC0494871F707B12D1EF469EE4FFD9C63
+78FE05E1DA7E188E997AD2C03EEB2CCFDAB1019581FA9C57C8F1DA051A60B02B
+C76A5F7419B32AEC483D1EE2E7512BA83AB78C796CF06D6A01AF6C1A517F8643
+141D48E3344B15CC483395CE83BB56762A423322A0AE12786626E541F85C5A2A
+79DFBBE6DAC3A2754AEAE562523A5788C3B548B6DA59D3DA207E5628017BFDD0
+A9DE4072882788AA1177C695DBF0BB784F480F831C4FD4B67365B15CDBA909D5
+F83B44B360609163287D7F315CF95B8090B2BA45518F9BCD3884CA9641704A05
+37D4CEDBCF7F3208C7580AD987F7424C459333F2C7B11937BC3AD70EE12EA881
+FBAFDCCDB80A1C05D129E0C0DAA23909BC56AFEA730F64F93FF369928C40F0E5
+CBDB410CF2EF47D49B0F04841B268F954E225ADA644566B2E2A7B93A6C6EBEDF
+F6CCD83C4BDD1AF12A016D640CA9CF1BCB0FA48213C25E7359294857E16A8326
+400C324F4D6D15FD011EA1D345CC8585B06A5D34A0F2103FEEDECC9D3D5C65D5
+620710092A213AC8E1C8C5AED11E350F0760D1CD7062BC1FA480A15DE733FFEE
+5F428FBF94488CDBCE85D4B65593362AFCD83A782A03F80672257A67EEE33940
+89F04CEE35C0B418BF33F65357EFBA4E3839D5CA447BE8D1E7C14C99A1866A13
+115E858073E68F259F48908E980C8335F9ABEF1109A93C20164161EE5DFFCC18
+3B913D65D9ED29CE5688A0078454080BB624DAF959BF30ABD78B1964C0D38D81
+BBEE68F8C31A647B75194980EADAE5AA18609FCCFFFC73D55212DB091A812A65
+1C62893A54B9E9214A6223EF22E663B0076192EAA8338FEBD91498B875DA25C7
+DB83A8D36542F0818F02717973F1FBF55811A03592A5778CCCC941CB636E6C8C
+0159AD962BBB6951D36FE9966DF8111AD385EAA574BF225F06DC016443CDEF40
+632709C6ADDA1A90DC99DC0C4AF29CD4722CC759C1E811676F12D58148FE7DE0
+6FE2C004CA06AB171D171B21D3F01BC76C5BF9C95B7BDED1E82C0DABA460AD4C
+B434BFB99978D079BB31CE9B6961CDBED6BC7601A99A1F811E5A1384107A9E79
+4CD84EBBA899EEF9F33583490C3767041B9DC600FB7311C8C606F1A3C3A30630
+6C6B2E51637DD48659A31BAAD4CED67A90B9D8FC4B548320CF65C66E5D0B0726
+B2047D77C71A385C3A77DEB598E24CFAEB307185D6CF4DB6985EA47290BB4191
+F5A5700F9070499C56DE417EFCA43AAB5AA92D1620E38D9ED6E01230409EA873
+F16CF19C67466306F8D5A442B9C619D5108E77DCABFB71F3F5222D46DE8B5103
+EA329DC77AB50E9F8C73455354851AB748246C351B313D14292DCF639D80AF65
+2E765CB7C1CD67DCB2B1FFB4C7C16FF06E22229C6CA1B90DF3BC04F43DE4F520
+604F5459B3E77FD1448F38E411CF8890DFA4625A9A70018DB43BE1C83DF0715E
+769DA23B17BFAC15285413BAC8B44E0B8ED023B4CC9F65427E922F7AFFD419CA
+20F0E82EB61C0EE762F546EDF4F6C3BF91F991CEC5751CE393A8A1B5A740E47E
+208BA82AD0AD81FB31FBDF64A44AECE390218F22B94F4912735351875810351D
+7DADE83748BC01453FA6CCB00DB1F253694EFA2F906121935E446568F9C36D74
+22518EDB8490CBFC2A03E3F7C143EC67BE7758D7E018B9D17328E842A71A6DB4
+5653AD77807334DA683403FDF3909AB57EE261D12038D277D445B4AD4B9D0943
+9E1787ADA6156861B188646A3A065A2BBD52DD92CCEC0121BB56AC8961E67A21
+C6C56FAD0A430B0EAFBCEE41F8D7EFA3D1CF92A5A26AB7B1ADFCE7B43BE20CED
+4721BDDD06BAFF6F0D44EAAACF15D4BEE561E4702B525EC62BCF202D52EAD25C
+90F6F53F4F37E45B94C0E707B426F5D598DF95372790BACB881E0C817FB3CE27
+A8E31CBE57FDF91582510DBAF8CED1E042D592C18ED85C646507E39D28C8A6DD
+073FA1DE452C4AC40489B68FD3343DC637070716DA198EC36C2A7283604B99B7
+3389D0F2D1F95455105A3B7C18400F55C617A2EB7EA84CA48F770953AF9FFF9A
+B00A4C6DC1A5BB278129E7B98E1124B396DF750E2C4470DF3AB074602CF55478
+F2DD0FED01D5989EE6E52B3728E9D5EDFACAD462187C310B04914E2F34580E9F
+D2D9939D2E18753A313CEFE1C6C4EC368E199D5569DAC78B62B967E2A01537E9
+6288410DADE218305D5FDC8B96F258964BEA24E3FFC3C092F7FF5A8ED7005939
+CBD7594BFACAECA3A650BB2D2BB41A9146C83BDF84CD8349989B0B7C46264EEE
+B0AB0F2EA1D9911B68E9709D2AA3772094EF0A8774A4ED4B93B45EC22B6D8616
+66D1CB9EA64AE4500209113975CBE220A83B6C74EDDAC5FBC11190A44223611E
+C2829BD6E3443F5938C20761F9B1EDF84D060FE45B20C86C3CCB8C7B83D74235
+598FADECA175DD7AC9C301C875DDB055AA7950C93DE8D7016A3D5D2BE2A0CF82
+94AF5DFFD81BB8E7A8B0664EF4426A765AD48C168965DBBCB4A5292E99E329E4
+3B68419B564858738F4419D2AC492DA601D7D4FB8082F16E104F507B503BF9CB
+7F40A15D1D6B1BCF03D5630E16249ABE6DF0EDDB568CC19FD9F785F3F7417334
+8738B91915C553906EE1B378AFA358CFD6FA3C815F4EF44DD5BA6D26C6E17CEA
+0A29B307C857D5D2CD8C3E506660D7950B82F1DE12E141F4740DE728900709C0
+696AF057305E6670C23DA0BBA5C64A111206219FF2C1CF6FE7B0EF257D5D99AB
+C60AEC3AED73831760CC5D22E74727BFCBFE6810EDF4F48AB39121A82DD5821F
+DE6F8A10AA6CDECFE7D4BD8E2388631D5941C5DA0F61640103E5C68F6CC413A8
+EAA7D2419F2B6A643E8F9A95F66A1ACBCAFCC7443F4E01B62320EE7DE0689EF6
+B8397698925233490BC6C4B90243E9A72770FC68CBD3854821DF66B785087743
+9058E6DE7D1D932ED00A1AB57D21067A5411DD097EB0065B1EABEB209C5B69BE
+87F33EA9E280B71D4B8C8CB8C99123B8282AB57848A99699402FFF93B755ACEA
+DC15E0383422646F3F80BA0698A6A51AB1A28169E38340B303950B69B881030B
+1EF221BD8E44BB2549234CABFC545DE97DCBF12F75655BC523A2371D5E680BBB
+82CC1D799C451E8B3C8AFF0AE63EE353520A2EAF5C4E815352BB98ED6162F08F
+E2EBE7F408BECA380891A40FE3691F984D498935B11F7F295E98A256E77BD0BB
+4492D8CE904D9CFF530B5A26D14A0B49DEDFA9B19DD80FFE4A56CCF3AC87C651
+FBE675846EE0A998B2BA26234849C4F95B0C5DC2D3E84A26961B1175928BCF7A
+730B085C42FEB713C58A2E335CCCA1A5DA7A88F6E2BB015961C14848F61AB3DC
+DA874008FE811F38B13959D227AE5B3E358F1D2BB8E2D7FEC13DF0CC79DB6D25
+5C7BC76C29CF9A0F688A0ADCF3D902FB7E9269837D1C59976F19012919F67E3A
+6094482E0EB91FA4B137FE4F07CBE4557F414E60EF225666F9648AC754A28E43
+629F1F070299834C1309BC28F0659B8FA58C133F403D61BAFE7F40B6E31D6C83
+EB980B5AD4CE3F01D8547DA7FE177C1D230480F771183B302FF5C3683FC2F628
+8A9E6E5DC9C029E7957CFAB8C1C9C4B2B604812854153C683618749FBDD5FB05
+3F743A4FB268B84ACF1D9ED1283A7DB64A31B78636B4574B8A473679C3A881AC
+F7858416D29D3EDB3C2A62604C0A666188BF9287118F092485FF10AC343C31B7
+66C761AE8DF4634B448201A9DB85B0BF06A2E8BE1A762ED37127DF2245084B93
+FB078BC50ABD8980CEE021547ECEC6751B2295819D5F39BC3B210560C383D887
+A4B179D0ECE8C1AC8E0A2F97DF032D1EE28F3C835D7BFA2DB9AEE349E65B73D9
+3C9A367A6C655174DC8180663D37E19C6B5C44031067CCBC577B786828DBB23A
+C076FD672CD32D1AED09BF9F38834E6B16F1BDA5A34F063C64AB8EB8864E7D5F
+C74EE517DC915F0C77A2DD5923A50AD8A4DC39344635AED890A5DF3E461AEE3F
+E362DA67E73CD14B200DF449FBF2D92C27FAF4B895C45F370C93AF5F429A4303
+4CD0D65D1FB3EC103BB5A48C04D675928B6FCE127AB32BF205F2EDAC29B327FF
+A10489744E27D249753E5661634753915059E6E2702C2F58905DE3AFCF2D4272
+9BA4DA3E6781EC67AA39B77B6DDE3968AFCAF99554580AF408293DD5CA032713
+CA5B5D28AA46606E627F53F27628FA563C4759D84697781600DE99D895B402BA
+870E5427BCD0FC02B9090770CD84BC9061B76A051F6CB4921990A0DB13C2E333
+8CA0E378EBF8E9E507E22979D9B694FEC20378CBC11560FADFE040DA63FA4E56
+9D7D12D7005DFFB82D17C87C9EF63CFBA5CA887B88BDAD23B4816CDF4BAEA528
+E269CE1DB32E79840D3569ECF356984326C1E4B7C20B268FE955E9BD3884EE01
+4BD7CD21031F7623DBE183EEF39AED664EE4A94156DD0887D85F19A27C90B834
+4FC4FEC2F39029872023186B6CFCBFE065D9ED6B332D63847E5EA8DC91C8C668
+2026FAD8E24C00B2AED44466AF5BFD3FF9255EB05F7CDD90826D88D6830BE8CF
+2AD621CBC121437726CFCE345418CAE44DE21AA3711E4F9DF7AB331C5B074BF7
+3FD41C21F642266E799450F7D0EBA2DBCCB9D9DF3F331602FE0FC18225BAB14E
+26D1A7E72290E42B39172B949F58258D96DC335CAE79C3B583BEAF9F36AF6DE1
+67213D403790B505E753A10C277A6FAAD5327B738517D57BC130A486BC8B4746
+1D46DED8FDDB9C917B1E8D1D6E4DE551B412DBA2FFC1E35473DF49D9CBB20666
+9ED63C06DD802CA9A81BA3631F1CD8671744267037EEF17A82CF746591C63A7E
+8BA5F822B443BFEEF8BB6C0717AE87D880BAD61A1A478FFF5883C463DD83CA43
+793AE5C407FA4C66A56592862EA0F626822AA8AADC651E6010A652477E63AC80
+0F32336858B94F8D40E9F9FCAC69E8813C76B5491F4CA8B291CE1E7BCD138383
+E02AE5A5C8A8B13569D813A947CC46F321029906C5DEED777724A1B34A684E60
+90F8205B446B5D744D622DE3632F31DA8EA4E412D8E65E45FF964A545CB8CB3E
+654A99A1C4E6CBB8D8C61961403D12CF6BD20E99765BB5E239E8357620DA54B2
+61BC00063389228BCB59EE9565B3BB99F1AAF30D296DF5D34D86B543B41308FC
+B5E55F4B0DCB6D3D5D5A027BA1E23566997C78B477E67F00A57F67414ACF113C
+877AE58946253165E92084BDAA4D40250ECA51BCBD9EBFF9EBFD6369DFF081A2
+2DE96084D718C88C6DF2D167C11805CC839C7CC393C052FD4959399A9B4330EB
+88CC19F2B480CF088E338708B643279D35D68C3679A6EC577997A54FEE8086D4
+94BA562BF63777FCE8EA4E0E59068A8433EF8B64BF8ED59CCE16B7916D9F1E57
+322E144D245577C69E99E84DF2367B1865CA3B5FAA34F4B00D059D09FDAF9EE6
+F57C0D4F73F17D9136F873F1A8A7D2880E7319B3188CDF8451B66E5D08E20BAE
+C106696379B76C44832F51B7BFA28572850DC31EA2512E1BC3888224F96A75A0
+8B7738C1B2981A3B89D8D5ED4B7F6C3F6995C893D6C174F4E3A38268228FEDFA
+A72E14856DA96125C4217DF38DA9DED696C4D62DBF37FA9FC1466A31047A6223
+DDA2F118E90B180B45D0A6D20EB1BEF9FF0C561BA1D870A01349AC1E42A6E9BE
+FDA106D48928D65EC46F2CCE64D61019ECF22E75F743E9E1D0FE98FBF5729A93
+86D9AE0309816B8C5DF3E9698D51BED760CC637FDD3D8516E36B036E7D784D69
+E3512F9AD76F7C3BFC32CE40EAF7C0B7A0B1729E986790DEBD13E2DEADF92C41
+528C9DD1E835CF18CB8489B4CAB7E105CE9D16CE645599199F1D2A58BA2AFF59
+AECDF574F7C2944699ED630718FEF049139CA3F4ED5C0C5702A0DBBFAD074AC1
+78C70DD53C12EC599A5F1B2AEE886DC46426B8A21E059D78AA51E4AB57F8B4CE
+5CEEB784C7FF980C36B2DE62BCFF37CF378A7017D8144AB88CCE45F3A07680B8
+32101BC312A020F621AAFC524C5F86BBC48BCF4F7C81B4B2E82CF585F06F2481
+2F8EA6A1BC2D580617140EFBC6B8F7EB7D7E323A27BE3D5AD599C6BEFBB2CDA4
+3BA86E0E16D7264833827DD01E7B4FFE6EE2454820E939066B988DD2345D97E1
+88ED2DE120992C40A3A5A073C1371662E3DE05CEAB8B438E47057EC5139AE5F9
+7CC2A859CEE5F0EB7F062946327FDC5BA33A7E1358142DC5E7B5476BD1AA7AD0
+1C024E313D070A8D7A3D62FB6B64A5FD562263B79BC832D87C60489FA0A2C4A8
+BAC86DFB78D38A6EDDB47D21A596969093A36BF8185535D3D5C987160188B6D0
+5719D2FB8C8F0F76A5A0A8562E34E7A4543863874E81CDEE68C57068734270B3
+EA9FEC6514B36D5F2484079464CAAC1E8BC82B9708E7355FA8F78C9271ED294E
+146EDCF66FA86CDD1D47D5590B633CDAAC3E559609D270BB7CEB794F48B5DDDB
+EF716CDDD85A9E39CC640E1232BA4E057518B0876B3491AB21CBD1ED1BF51F0E
+5B171D6DEB1A7C292F2FAA36E3AAE7C21548BA6A5D681407613CE614A81AB209
+198C5F7A36F2EE329A3B3BC98B1DC8A8D30EED1D7D0F62D187225BB3224247FD
+67EDFA0A6C417B3411533CA4B6BC54FACFA7D4D8377647AF0C9D562080BA8221
+B1371213B8B1E28C69C6DDB4448B8A5FED0F15656FC6A229715BF71EEDDCCE88
+146243275714C6C27476BB6AF2DDF878F223318B1ECDC0B8FC4D1010C1299A14
+83169C33DB33166F1BBBA3197AEF05A8600891D61947E919A0002297CFABF727
+0204E391480B6C4ECDFB94567478AE392F34CFA124CD2D2637ECD95197F371F4
+92CC9A34BE0FC2EC3E7A05E25D1D76157E0F59734C3969EEE34E164C7BA3829D
+EB3404CA60DEDA0EB05C66D78234729EFDC442BCB0878530CAA0B8EFFF57F74B
+9D3F8361A24E3ACEC3A1AC34766ED8C043B6FB579E873758C501F81939E79C76
+BA612E0F349E8DC891303776A7702C082D91CB23D2F77E08FB2EC60EE73070C6
+4E033D300A5D26F59C51241BDBBEE8DD113EE54CF6DB8642063EB84ED1CFE531
+D9E90C0A972CFA4674937455B30ED726FB98C786CBFE0CEC95EB60D2AA279F64
+C723DBDD83BFFC077DB57F399F2C6731145390B4DAFBAB65A25E0B41E617C71F
+9ADD86B4CC8312E8AEC23ADF1096031DF225F59D890AB7AD5DA0CC8EFE1BC2E1
+A5360CD6799FA342B89290EA741B84A37CA3D64297C8DC6B5ADC401329873763
+E227DD032DBF2164DD14408EB89FE313988FD9335BFF72AE9A5982ADFEE44A08
+D75DD38EB950C579CB6BA4B381FC43354CD9FDCB691C413BA246F07E81764507
+E20F37B02E320E2E086179CC60350B236E249FF196DAFB94242CA7FDA746228E
+1EB82BDB89AE60C453081FC2D1D9E546376F4464E9AEFF63E8CB8D6B47A4D499
+6BB3A0A8744679D7D1C05AE44E98D7325A6402228B87AA3A410367E956D24807
+07581F6AD7932EB450EB16449E1A40E7F250A989FEC92E27AC6AF78826FA6885
+ADC87FD6C0697F41BA2C7C79D777B344037BACB220B1A9A657030A5965E025A1
+F953185214804459E96A586BACC62FBEF3CE5954EF1C61467F5514ACE043D448
+5D038438250F1B85463F8A324962144F9D7E1C328816994DD3A9B31231871091
+5552844DF707EFC3F81FDF4169CEC3A1C38E24FF0F0AFACDFEFE7F745CAAEDE4
+04A092E5809AC0EA02C3F06E384B0FD60AF369F9A9EA85667035DF87C5858BF1
+603E9A419D4D8DB73AEF26F7AD52E9E394557E1B2B257F0DF026A431A192ADAD
+00BD4836B2C8B54D646E8EF9E52B0FB19C4FA322409D09BF167CAC5ED3A82A48
+C8FF640CFE6D091EB6032DDCBC50F9A593B5FEF9976C67CCF409F64207FBA557
+77340CDBCA6F7380B9E2B3243FE805C4B69A3BA2FE1830139F10A403CAAA7ED0
+BF5386C7D3BC998BCA4ACD968401DF751A7EE9492A690BF0D521932FB4E63761
+DB383CDC362D8E5A563BDC4BD8D2A1DB5D900B8FDFB5329CFB85603967C42502
+0947B3FAA5AB0A96FB08A464817136A4F5BF988080CC0085CEB42879D650466E
+1B972B717B18D5CDD21AE47FA495641374CD156A4F726A291D4E7C5CBC042DD6
+3D119BBA7E7163F6AFCDAA9AF22A83569D2FD35969143D992570D905A90F247B
+475E253081579D0B75467A329E5B5F124DDCB602D34D12D72ABEB65E41C5C919
+BB9B1638E41165C33D20797C3755AD71F53FBB70A0FCA76D52B33097C3ADD50C
+7CE5AEECB9C3378538FCA2D0C5928150FCAD751DE3611F9E84ED2A0C6DFE70FC
+4AE33F879129C961929BAB02BE32CF4070F8F4F0BB0158834FB0C605A3CF5490
+4BED0B1E98A2FC5399924C4D554E41E74CB58A21200E6DD2AA0A734679EACF7B
+97D1030EECA997D2371712690F8D8CFC9A4EBCBFFBB9F4E4BFD790A0F961B95B
+700A2877241797ADB1CEF48AE70DE669C8A8E990F7EF38F24C269734C4E230CC
+FA6B080559B635F5D5F78972786469291A062617CC8919F2C8CE94845E955DE1
+F668AAE68051854B3766B7D14962EA3C322845BCD8A00341B20A2A6A90A77DE3
+EB2757A5DF3D6292033C869AFBF5E58F4E4C0819504B93F88E6F116F39200A19
+FBF1236080BF69C9F77C53413323BC8250901D87175E2402926C33726D68FF1F
+AC4C38FB4CF0EC80BF1147AEC15B05F580E4C51B2F5F01EAAF8095B02DECB458
+C2B6D8D951BB2E7DE70C31E4FA5A4FDE49AE7E89DD82B217D6579A00EFCBBA91
+14E991022833D0DF8CF05A1BD852C1879779176564B121F6FC64A795666A8920
+24DB2D57D0AC1341F032403EB030CA99BBB31BF216A87FCDD7282C4497A99AF1
+EF9E7DA614FDE80B811D62C995F5178588FFA0DE8C76E18CA223BE296CED4016
+A8B92C2C727C4E5AEC2F0C56E1D4E004FC3414502FD82A29EB4B87D8FEB92155
+F56C4C27BC1EECDDDF5F224F935CC45D2509E4AF6227C89C20C250F7C823911F
+0E1CF6B31C793BAE12A61A6BF5C8DAA299201D9514267D54A2D201E4257AFD7A
+8BC070BABCBA91F449CB6F546A92F87ACE058EC39AA84EBFD8FAD238EBCE0D63
+0007EB216406BA29C84FD6B9385577D04222C305114F3B59C186604F67C5AC8F
+4546B1B55348E1E2CE449D3A28562FE514F36A77F66A71CA91EED86EADEED4D1
+07F36C67AB83B0BC344FB9DF4960D11FE02EECDBB829B0F2AF39FC9D02E75C5C
+5D3C1BE00FD913F35AB9B9F693E7C9BE6B315B35D035585ACA19CF2C7CCAE105
+349E30AA4F57A63149D9262028C53EB8129E0F15EDCC7CFC2CDB5FC190B1010D
+9F198949F56402888E3C7892E48408B34D9EE3E9418CFF92B8418498297E2449
+E7F92E983348CB30D76BDAA84DD2797D822D6F26A582F8A338B9D4D370581CDD
+34D0D334CA8D7616E448C86374B65CC0131010CEF730785F3DD5ED2E26F27011
+CCC7B554FEDB02B6DEDF48CE76591CC110C65FC5CC72E7272FF63F07516AFE39
+11202DC05097DEDBE384E8DAAA2F2A422565FF426715A849EC159220C8CEBF65
+1E4FDE87CED9414AE86D6D2066F8CE0AFD31FE5A839EAF3092C2974FA170835C
+31E8F1883E82EDF30AA1BD6AE0C5FD22DB9B1A53F27E404E2B8595E241843B95
+A9B16F40CAE8F8712E1BEC901165E4B64AABEAA93A544682298C5703620E42E5
+F8536D0DACD0274B1B13805CDC0ACFD5A242AACF29B8881EAF29780B65CFD8EE
+21524F3F845BE6D7E8D5CF594B0B15C50A9B5A2620907241DF6100DF4AD96AE1
+9BF9254162CA6386079FB93F1F88A94BCFD6E47B1CA020129EA7F34E9A261581
+615C23C8D52AFA37AF575417C814E74D56F08AB575D44B2D0C17274BAA5611BB
+8C61D49D7BA9343D8998110796E4E060523BB6B22F1D5DEA9CF8620D29A5CEF8
+5EDC173ED7142A121F0E472BDFDB29E721A825FEC5013E8794B8D132E994D583
+412370CCA2DCB10E3A5B49778AA5B4489AAC9918D4658F0E43F10558EC41D454
+FF56C8261842EB93FF326EE3856FD0A25AEDC72CF966CF6FF46383C39C44836A
+22485CE993E3A0578466FC77106CCD2195126567E11E54EFFEAF8F40BC0D1B97
+634F8C121D9B62648DD61752005891596F40EFCF13A2276A4C187CB66F0B7949
+BE95486034B3E66445AEB24A084F8E535C754892FFC156AF7EA8315A1997D3D3
+FDAB4CD7C426F839FCC9BF4506C3A9430F6963AA8215E44D86ACEF423291375F
+F6242DDF87980A9A5E55DFB668C74F123656CB625E5E335D2CE989FDBB269F18
+432F91A9E4D62B32E6B9BC8AB5CA32649C98597DDCDE2F343AD7E61F0F54A21B
+449DCD1FECBA7CCFFFB5B2090D90251DF0E92CFF6FCB89B5A4FE39F78E9B817B
+90FC9CCC283011B96319FA61E5C1BB9E2A633CB9BC346D08ECB3AEC5A4E36A75
+CF8843027E2B411B4410B5C06F3B83A37442D06B4BA57316A7C9DA5956B0AEB1
+C7A221C939DFB559CF0FD174C3E9D917DAAEF97391558C48DD1BB7992B14A8AE
+55B1CFB6678C44305C03297D61D45A23A162A71873ACC77FDE7501DEEA302144
+11A8EC2224408B7B4159154C4B1CDE75D5A80FEC50C1E123B6E0ABB523B90F07
+91E363150E451670DF047132CB503719485BA8058750DF7E7961AC02B84FC89E
+B8D57BCC582C6D9754CB90691F65EA57AE3D8A7F61B70AB95FD6C05B0E0D107C
+7560C1C8AC53A0C5588A14412A264BD84DF2A164B1BC8CA599C58A8C581DF0CD
+C9B9719A9CB243B95A41402C29F2F56C71D253FC699BBDC4F2D2FAEAC42AFA75
+DB38A8EE0398BFAB528832A80D3ED42E9E3F3375F7DA493A936EAD1162DB55F8
+79F31A554D8BF98B5E1CD6F1ED1FF319B61F5743E24FD64F42873E0BAAE0754D
+13634CDB4BB284979BA95CA517BCD14F2BC5B7ADF3C105B5FEC0C9A9FC25D662
+0237C84F75CD28D122E5BA85BAC7CD5D8A520DF718AF068A62E2B9D20DFD2E16
+B9DB0234564337ED27C69DE8881A6493AF8FDBB5920CCE09D5C1FB480540C2F1
+980A6D87A4105B168D570BF0CB65E2E03860C838011393C9AF6F6D688FC52770
+EA668A2F714A1F61F77AE35A1F55FF065B799C1028ED8A5E0111581FB14E3CD6
+BE1A98601BDB8B3AB76C58D31A1EC0C72EB5965CA5ACE2E42C73DD7DF21F82D0
+1A3331DFA06E332B68858574FE9CAD3E3D720C17A2D92C53EEE6B58B230316A7
+5AA30C60CC672E473ED311E7D38C4EE2809C29F2E76EA3F5A474E6AEBA84862E
+7BD677B6D9AB0C2B501BD929354DF6A3CBA66FE0FCA49EDDD22D6E660085C421
+533D735684BA3BDA798AB2CF9E8523B16389BD242E0D19953D83FEEEA8ACB5CE
+5EAA4BD530D3F8C8CD72D3EF90DC038E2307A58D51800A5F9C62025039CCA4D3
+07DA0A0A0263FCB71E20C9DDC7F26718A2D1B5882C7BBDD3244701B62D890C48
+5FAF33407E9A5E4EA5D1C6910815BEECBC69FDD837E51154E84FF784896EF91E
+DC45F60F9C2FB8C376B5728C7EA835A807DA811A64C3F8C7043FCECD580B0B02
+F0E23F84CF6335F261F030FB1CEA8C261EB1934C750B34039A5799356B79F65B
+1CA31F02BE58D8AA229FD20CDD1BDFCF6199B6C5B9FF6D63C3585D3475C58E79
+8FCC21AFEDD5D5CB5ACC9B0F6AE689BEA23DD30F02858CA6806DB4248C837B60
+09D96D24C0E2CD5F4CD2ED50E60D03CC760D996B108017B26563E5E8FB203D96
+15FA47459C2CCF99556D0F91E5E6DE0051FB6914EA99F0016627491BA5176383
+AA37E3A49B58E488F1D6D37CE2EDA15AC652164007171D4BB2E1EC06F7ED225D
+71AD96534DC26F8E167179AF8714137383561BD7EC9C5F8ABB64C334F1AF280C
+4E70CA3751C2ABF7FBA2821B286A9F6DDA9E769646D5878F8860F02B8FABA6CC
+A82EADF9A45A30889AD551894A018B81093344C6CB0D59D09D6DFE91112DFC9B
+5F0387D8727D1963415748D482FDD5AFB001FC249FF5B02DCE1D62F011E553B2
+E767E48A1CAB27FA0237E35464C55CBC199F7596FC2F60BD9D853D825498D381
+D52C5FECDED23525AE02234F8AB609EB0339B06A46BE7AD7DC67A08FFF568B3F
+25C071294F839F96C2AE03BC57DCE13855AD7400D7BE881DC5E34720F408DD31
+B6B5A33E2BE89889F0F5868C71602B086EFF8DA6554640A822B59D547C1DA709
+E29964B2E321E2E803684C8E5D64384228714509E618BFFCE97B1298203E144E
+FD4E16F8C2B37AD390CA7A59E3ABDD281B2B41738C96478DEFF7DFDF45BD60B4
+BFF2C7E57027AD51112808DF8E36F0423391C8328E17AE3D71B3EA2958720539
+5182BF85FB826E5119E4D56BD5C0100647B190B3F2F671012AC37165C85962B6
+E1679413DE6F824482AACAE6301C9311BBCE073B1349BE7A287D9B6486A683C4
+4D4C541CF4667B55EC959511E0FB0DD4BFDE5F7F71341598CDD86CFD646C22C1
+A2919208944AA9C75A62F1DEF2AB80DF12023564EEF49D56B0D6D05FE2757BA8
+66F35AB485083ABE685486B81B68082FFE98C89CF09D0171A1FD0CB866E94AAF
+AEEEC73F2AADC9F1B1ACD6545BCDA0CE039891B541FC674F2D6831ABFFF143A6
+8CBB10ACE99ADAC14E99ACDA73CF808B10E87B42DF4AE186BA18FBF828D0BC09
+A4A1C10FE4C47233B57CAB00B6EDD73A38F345609EA860C884E22597A1AF21A2
+4EEA28727C1A92FEF237B84507B38CAA4C66BF72CB2CF1C7F94562029B286AAD
+BF01AB7FFA13A1E0D33494802667C5A3EEF5D51BE02AC508A997B5F09B747089
+2D7C3145EE5A9E7C15DB5AEC8304FB776F15122DF7B939265D4FCC43488EB42B
+699CE8F68E943B035FA1F378E5621BCC00C810163737632CAB6826161D90448F
+3403C32EB1B52D7FB65149EED419A765D56A05FE6A2706D998DBC84125D617A3
+37351C9C547ABB6F1AB4FADEA5A265AF4D9B45BEC4147B6CC5110251A426350E
+60F3172C40805292170B850FB347DD98793AFB38E475AD2BF38F8628987E3F50
+651114D1527F030ADA4D61944E677977BB8EEE0C1EF98679246CB1D43403311F
+5F09BCB30445487F82ED268577F22479EFE87DD0022D42D3328990B88601C3A0
+D5A8389C4578C3DA01F653EEF9EB5D83A98A6939320FCD6F5B6A5A60FADBBCD7
+E5A7DE5A95D1CC7DCF5A051C652B767FCBC59D61AB9FB5141F393F2028879995
+4AB737BD26D81232CA8D64DAFF989F878537C305BB5C09889235BE3727BDEE32
+EC5A4D06A68746CA33CCED3F1D456DFF0118E993C802AF0C3136FDA8B93BC16C
+E22A5C124972517594A82850CDC000F6505A7C5AE9E75800EFEC3815C130EE25
+547A326325271049D9B178E23FC5FDE8880CDA9C903EB4B8A44F85620465FF4A
+D097A6D89A8B644E7D9944E180A3E1EC6D2581715EADFBF3C2BE3B330B1D208F
+B84C4B98E999C5684E9843E6AA2F932D1813DAF4931D12AF17FD2CB2387751D2
+5D14CEA4C66C48C7E6FD61BA6D09E591188E7CFC0F5C306672481FC77B5C6D84
+F589673C4F4EE90E2D3D1345196A10907A22585E7D55A9620FD7D191956DF340
+4C98AB5A8A3D98798F2581D409FBACC2419A031666DC9967DD10A1A565A98672
+BDCDD345FCEC9BC08698949C887E90EAF94B7CB450A9C45FCCF289DEF3380309
+D7644EF509BCFF5628ED51E056FD7848A2A36E30551E13B2A2921AE2028B2C4D
+902F7C901BC54F945AA1AA018EBA00AB9A2FB36159147C74880C06A26092B54C
+D3E6DD432A3507FA11384F0C08C68942C26ADD98DBE948D854199B19B0421687
+7FC55F9284AF035C5C9DB4269FE72FB251030F9A5A31A75FBBB0DBB1151EC785
+08F8CD88D6FD5A700AC0F6E0F37536C2F1228052846C3ADF9DDB7D56A57F19C1
+B8382EB996D8FECE8F8B130B89037F9FD4D58426049F99B840F337BE6A9427DE
+B68BA69B32A301263F8881F35332FF35ED6BC15FBD4A8915C8CC37839BE3944E
+A15701B8FABC6D533FF5D8C96B1D599DF7E2738996520A0702307E3C91A476E5
+C76AA881695D7400238B4EDC669BE334B84A66B9427432A3AB970D55A899DFCC
+81F7C68D637F77121B75C0D6C073CD14A7311799CAD07684A5C0F662CB10CF9B
+FDC4CB98B6E7892BFE731360E35AD6008F8154E419FE86FCAB0264173127B1C7
+92D6DAC832571CB2771F9EBF2486F61FBA0D94DBF0795D5653EDBA2F7441B683
+C3E77B314D02C049282E7B749B80C326DE8DA52D632A1A9C3C84198785161129
+D527239F456F6FA14CC264ACA06DCDF408278CF105A3786073709E365A85BBA4
+74A20C47CF495A0913CE079F33B71BAAE3928C18D59B2DB6A38E54EAD9FB87B4
+EA6D147D264E48E665A4DFB466A948811DE66770B0774C80BC2C54EB7452017A
+52AC312508C6FB6A4DE3570A3DF50EB00540003382B91E06067A3D11E1DDC023
+5EF8787F1F1015152BE7F3D5F88EDE778E946768E4E333288F4DE66D604822A7
+5F2D5069B6CAB613145652E07F608A093645EB6DA6A9B231EB5EB31C097354B4
+AF54E8AF3455011E51ECC74FEB9847FEE3C42DB441DC3E39DC1650E80BB2D530
+823B1246699B391341E7D7BBE42DE15092EE2FACECE3B8290FBFE4567E4E3B09
+973088770EC250F55AB5FB3E7ECC7537909622252E7967AE84368FE204800BC5
+6C51A8DBB2DF121FD04225015DB5A39A1D6241C9874215D115A58D8329E752B4
+D5CE3B1BE30D1703A044BA14B6C71F406733E771E8F9FC662C6DDEE86BAB4F68
+DAFB63D8870938C3149CC07F6660AEC0296885F64905B8BC82B317DE4DD729C9
+5989533686291EE980EA2470794FB3DEBEBE9E41F9BD793CE4DE37D9821D44EF
+803651668599D59FA7D44526F67C73C954BBB28BB25BF8606340755D02B23C42
+094CEF3CD30B04B9AE08FCDAC339FC1A9DD2008B0FF3C1F68C328541FDE6FBA9
+98DE24C4C3B3FC7D3B0D86FE89B6716E57BF46CB201F6A5EF73F05444D024D34
+639BA30B6D6F1A25D7CDB89D79FFD826663A3DCE5E9F4C72F06DD6C32A34CD22
+A7A1B7E3CD27707F4F09EAF284ACB3D960A530D4932D08028CFEB3AFC2D59170
+730ECD5D19B4D23108944CB7649AB0F1F3C286863A6A34A964A879D63CE05F1D
+FC11C5B69374F1993DCCFFC99D0E597C3BC99DE67E5059FF0672F79938F4CC4E
+4C66D6DCB0239444F2E614D09692297C7329411AA1CD5A540F9D61EBE2AF8B58
+DF46F4065672539C326B50BA1CB54DE5603D0799534ED0BE40AD5C72B4EBEF40
+A5EEBD414F1639AB6C955557FF9BAA0B62DBD32895B0DE12FDB66694F3CABABD
+7D54F0B29F8EA32CE746B652CC9E44EA64C3F8847053D8E50CE044C990A7BA13
+7B1B0F4B2FA68D08A82C30E800F8B26CC84495B222ABB5E41824953315CE7F22
+6D8FB5AA10A3EAE16A1B5BA8A283854C5A1735D5F628DB64C8DA6E51C727EA1E
+C3CF188BBE2473E9112529AA6A8DA151DBABCC26973531DD69B4A14D9783FF33
+FCD1672B629CD4DAB4EF573DFE9C3BC550C446A34940BE4437F43CCD16CFA3C0
+537ECBB7DCE1E76D9FCC2EA5E9E5656F7C7A3FE1611BA6A8AFF0667450A4A8CE
+0706CDF854B4DEA79C5FC25A0556F44CA3593E89ED5881ECB5BB3EE6572F8F2D
+4D31466C9AC2350898349C3208636F43D1EBF5BB2F01DCF827AD6C205F3B381F
+800D5F4B827107AC881BD66BF5CEED3205535C8C3704A02614E6233344667C48
+570C4B5A3326D2F58A6111AC9B0CA7F3A48DEC898FD5AA05929492B8FF061E1C
+990E08AADA5E9711658E30F71BA41A7806BEB51BE0949777E1550F54C66B8AFF
+DF4129B42B71DE6101C57DAFA63FAA169145C0D6A0D6279658431E874C32250B
+AB0B09056CF7A096E7E644B5B629F275194CB0CCEFC7A802F123A587156AB136
+513A7362EFC4C0EC330E11C3E25B9A943D2BDFDC1EA5C19DA64B47E690C2726A
+0C0708F7A1DB146B80C6E8B4D30D28F6E8B7A7505EAC296258485AFF374652EF
+ED73EFC04C6CFD28890F035DBB7A0CFCECE8AA68FA622390B782E595D4157106
+802499D76B0351617B5CDFF4F7F758DAD993DB5628B346240DF540E821144C5B
+D7FAC2C00B22D8DD374C6FED26F619FF150AA2292A9D03AC7F5F6A20B3283890
+C80DB07E6923B6C485819A849BA8A3F18F7B4D309802AB3D489587721417A2DD
+0B1A4D9994E3C611E3289465E657939EC06D752330EDD2D475E67F345C3527BF
+0175182934D53176D5877D064F6FE1C1D559DC657E4C2CC83FB022A38E6E406F
+E8F85B556F9A771F4DDA35AAE7C76DE0CCF5C2A9D9F4AC946C1A836553D792C3
+F2F8FEFF9A6D7DAB2FA5F0C9973FF8E3206680D96ACF9CAF54FB6274B99E3F9D
+7E2B64C85EFDE220C15BF9F4AB5CB772197464078AE34FFEA9095DDBE6B0EFE7
+4AFCCEA58D12EB46648093EF927A8E600F0D4E239BCDDE8DD5AB6A651018E932
+746F18584378B3B4899B6E5E7B3C742835BBDE2D9271AA95E1E1C714F51B8D08
+562CFF8AC79F495578993955611AD98303AAD37FEA8CF9AF63543C1B4DC0281E
+1269CECEAE77D660AB8800EAF547ADA30278345A189EB7CE9B03B936F3511496
+84E87A395C9012C66EE994141779E4282AE968FFC1E764C45751CCB23049BEED
+069E6AC75A8CA8D115B4C269C8E6EB3047E0A17251D46D389F43809423BC2A8D
+1730A54F8ED38019DDC4BC752539AA8FE9514EBC42F74FC8B50A850D09829810
+4CF7546878A85B8A9CCCFC866B5C30E1E5295E50D2E05F02B414B04830756970
+09BE8D4898B2CB6D2E95FA6890A620DD863B30C1EC77C08AFA711EF6C0D45878
+2E93BB6E2B4B44A5D24C55C22E6D58E4AE93A566B5545783E1B54B937D68BF21
+45A1CFA44CA87DBCEC8EF7A309015EB883D14BFD9DC89DF814697740C100B0E2
+1A5DD11DEE47681B153C4CFA026451660213253618E16F5C3B2D590363786BF0
+83E23B438E0FE85597F74C40611C5D3BB944108416AE0960432B8E59D8B64197
+81DAC51D615971E976768826B90CE2C563E498B8EE3A2D28546814F3D7E6DA78
+217C56ABD4CD323029CDB3C01B1885A9E12D5F92E773F31B50E2DC680708B37A
+F234AB215B75DE93E7912E20DC4937EBE1208B476DD8BCF68F115B72FA76AF8B
+B14AAC4AC7097D55B469262970369AC25526BDF3EFA81563066A37A4A71C19C2
+27611CF279C483B6C0CDE8B302C531E8F776CD557D91F348494088D6AC9CBD93
+7D0935EB5CE4C558247EFE669A39C56DC5F683337235E405BDB83CCAC1EA995A
+7E437ADB4B9576683D8E6776830D570699D696B0C233BDA475B1909197F57B04
+92A0A6F9D72F4E8A56A71CC7F4729C06A5C4F9915FBA4857276A50D2A4B857D5
+3F20433EB0098D714E526D288CB0F36B88B989FF98EAA2AC2FD44DE6E0159E98
+341459E97C035442EE8974C465ED07924FE76933E6C6B2D0D632EFE2FDCEDF92
+6D1B58D9266F961916E0B21C7EDA8533638DE541728C38225C8EDBA3DF56D9DF
+7CEE29D9EF955215974AB20AC024439A3730BA9227B1DBDABAA2D83443CC2F57
+21F0ADCFB8C2AF6FC327F9AB05C646C7BBFF81F3C3DAD7840CB477A2584695AC
+45BA0AB785FF4C993900136B6139E4D26B5EABF1BF17A80C6370CC2BC3540A0E
+4A4914C8F61A9608DE06BC8DABAB1492482AE665460981F4258B05E8F3A197C5
+30350BEA2DC89BA16224E570290845A6C7096C0C7707DAECFC85F9C853B8D65A
+616E3323082033D542C13FCB10BCBDA0BA71445145A511641BD12B35AB5D8E74
+11D5EFEDE88EF9392103EC087932CF217CB44935FC6F99353CEC68F814950518
+EF919470486379FD02265F766244436BD290C65600D964044989C7F6A9672EF7
+803021A9E4AA6818125000EAE5F90D382AAE0908A26FC6083A90B88FEEC0746A
+9F008C010CA98EEA7AAEA307037D2CA7200CA9BB68916CCAAB05E57FE7164A7D
+C3D820303340D49EB29E6EF22A023F2D42D67A664F38C4FBDFC9A31A28A02145
+E38CC211BC73DF5F661EE9A3CAA076E43EB233583865289F66A7ACBE315AF81B
+AFA2CFDE8A20549941EAE2E73E33BD0EB8D075F492724BC444FE8953F5F77B2B
+4E7378CE552F79C360EEBA56B64CAA47DF10D14402EBEDFFF7069444AE3EBE3A
+E96201E14EF892868F9AA982E738DCFE7E8DBE41C8F43A227EFC9EED795F5D6B
+40D3A08D867F363232B20C71CF2E44B884A8CF28D96A028BE7C67DE00765793A
+B1C867F0DF3E1D578D96428CF1E66632EB746C4B71314D5D009BEC8CA52A7518
+89B9255BDF988262A4BAF717FAB90525C81C223D4936F0AEE0E40908CC9E0DF3
+17AD71C0F5009CA00E1E6F8CD308501356235F63CB112C6760963857B6B20A94
+7FC16C899A7EA6743267F889D070698554DECE912C6052E04DF59FC85E67561B
+3C7345EA3E21DB7206A14EAC4F46F457A83C1E2877B56EC49EF87B9B363F4B77
+BB6F51C3F1454325010AD71E28E935E74924A6ADA4A08C6C723276CBD4DA333E
+C3590B7FB914E25828CEAC502704BB4C8C0C64395EED986F91D8C940D3F0ADEF
+1F2749400B4D9A8BEA50CF4732DCBE21A6BA4DC17762BABC34DFA16EBF988574
+6B6363A6075CD4784CB799E35D29425D55AF001F51E565FCF4D18E98EF3C94C8
+5B88BC96A9157BED2529803EDE8E42BB57FD504764175EAED257D6E62CF9A17F
+3E08727A38A0A43221BD62CBC2818ED5DDABD2E2FA6141D986229528AAEE7C73
+532A8D78FB8FDF433022F0EA43B63EEC52D3829E84AF010A2A19742296D91415
+42F9E632FFB3F0D8457AF426F0CA3B9A1D56DABD0537C9B5A9CA82E42A647CF9
+BA8D38F49445387AC896F16D85708BD8CE4BAA625EA09621EC17FD1A1377807E
+DD68854483E84C181532D3B70680773CFE5D580712FD948F5D34354394D4E502
+6AD35AB042519E82177E06284CCAE4AF2C6D918FB32DFF205E9D9C88E31143FC
+66DC0572961089CD0F2AD2EF82CF204E8AAB1F0122130232ACE276B134A9BB0E
+91FF8020FBF69B32C93F1C10026F6B2E1D40796313D974E066BF799311595012
+59886A161B669C22EFD773802ED9321BE23DFC3240D170BE8499E1735623A130
+054EB5EC958884699867E3C94FFE49CBC9AD6C3C935E56C0712CDEB13BA92E2A
+AA843CD9A30BA3C01ECC284DA4AEE6689A1A9E3D7D0F6A144C658F9441E730FC
+24831893520FB7D2C69104E56D5D49DD6A86152C9BFE88F6166104AEF80B992D
+406205CEA63C31A7B46D6B8C9A1782A0A0A30DD52066642554735406851F863B
+BF981B4C8DC4882A03BCB160A06D18D72E61A49A23163BF92D091C35CEE0CB85
+04E3D95F3E98CBCC53B0015AD136FC481078ECF65B62EDD8EA3EF1B938119D10
+36D6D85412D1104BFAD6A4589C17B40EEEC5C3FC90933D9095B49A6956CF9F61
+E54384137A39A509200B0E51C1625CB599A91B287744677E059E6BA039B6146E
+791EAE2676D2E233F2659C92A10D32A055935A193D4480B4E7069D3DDEEAC166
+1D24FE041BDD02D1A84CD43C43331AFE821B4ACC22F165DC53890D66606FA10C
+B83E2BBA03C826B958FA79C31E081B5396297013A70E1FE82E76C8512402EAE6
+840E5943B19623473FF8F215D6332EC26D1DD0760142E4296287F98A30CB2A82
+8A639137E8BB018AE16F54FFB9100F533587B4812B5A7EBB0C2DD22D20F1B55B
+D241DAA8614240F2B528CD48CD2F71496F181A94F181F7E85D07E4180CEFAB87
+57090401893BD680891ED7E7C9218409DD4995F3DF56E77F79CD06B9207328C1
+1427488F5876672E3806D8B8E0BB95AABA421B6629EA9A5A5FC811D43209610B
+F729AA30565DC4C4A2CA67721FF1F87A4C4B26BBFB2B68766840DD148024FB21
+F2750EFD0F31FE624CAC5D606B6C14C15B1FD7D4DFF182F436399C19F22C9F57
+F243086E319BFFD7412871031E5226D494B41EB70093103C606ACD02F6B2737A
+31C6DC7E3617F617471C37861161C799646C1CF8B60E9A5366C3A9EA785ADFE5
+2AA75D252775300DDF7F463E15FF6EAD513BC042837243F8514AF04586F5E451
+AEAA68E3C96574415497576D010A6D68148DE883083070DAD871E8F151C1C1F2
+2E82F50EEDEE298EE66699BADAA6677586F59AE3DA5038F513FDCFD7978B2829
+794271AD63CA26EA8970DCA4F32B57C09799C9B8D78BFBC50FD36A3F3F254799
+B313915C9640A27AF3530C68FA3053AEF80B2659AD152CAC44BEFDCA211EFD6B
+1DC6A25A08183879CDB74DD95EE2779416C0B3EA306720FABA153F3BD94B0DC2
+A429050A7D6B7B5A54C2AF4F45194667C3CF2EC4014444717DC6C7100035C504
+216661A97B632FA32FC1E021AFB75B395ABF844C558122C416F3CAB82B4ED56F
+15589E9F34CCB7C0C7F7B5FBBF48169105355F6EFF2F41A212C24A81BB9A466C
+598B921E0CF721A525187BC75CB3B2DE6A94205517B2CAA504F351BA0DC5C26A
+28CF5AC9DF3C81B888AA3C930DE00DA50DB0422A0D85A00C7E2AE3061E1E17DA
+55B3E3C998466DB8337E81059214406CC58CC1C204EB3D435C50B52E14B91905
+CC33F6D9C78342EBDD3033EB6A8D41530105CDB05B2E67606A022D366284CEC8
+6BB9FF090261A42EDE521B2BD2D955050F3BD2EDE7976A68F17F889943C369FD
+564CC15CC19D082B2EF4FDCB95E835A0CA799B4F8B68215006ECC332955837F1
+9118D86E07EA5D7815F66D3907EFAC1A2B76845B90B1D385EB08434B5DB96FC0
+59A97A94E4C21015EE22E04BA4A962F5ED4BF157A6
+0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark
diff --git a/lib/fonts/micro_40_50.qpf b/lib/fonts/micro_40_50.qpf
new file mode 100644
index 0000000..eae4a5b
--- /dev/null
+++ b/lib/fonts/micro_40_50.qpf
Binary files differ
diff --git a/lib/fonts/unifont_160_50.qpf b/lib/fonts/unifont_160_50.qpf
new file mode 100644
index 0000000..2288575
--- /dev/null
+++ b/lib/fonts/unifont_160_50.qpf
Binary files differ
diff --git a/mkspecs/aix-g++-64/qmake.conf b/mkspecs/aix-g++-64/qmake.conf
new file mode 100644
index 0000000..995178b
--- /dev/null
+++ b/mkspecs/aix-g++-64/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for aix-g++-64
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -maix64
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -maix64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
+QMAKE_LFLAGS_NOUNDEF =
+QMAKE_AIX_SHLIB = 1
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthreads
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar -X64 cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib -X64
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..8e1059a
--- /dev/null
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+// uncomment if you have problems with <sys/proc.h> because your gcc
+// hasn't been built on exactly the same OS version your are using now.
+// typedef int crid_t;
+// typedef unsigned int class_id_t;
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#ifdef _AIX43
+// AIX 4.3 and better
+#define QT_SOCKLEN_T socklen_t
+#elif _AIX42
+// AIX 4.2
+#define QT_SOCKLEN_T size_t
+#else
+// AIX 4.1
+#define QT_SOCKLEN_T size_t
+// override
+#define QT_SOCKOPTLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+// AIX 4.3 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-g++/qmake.conf b/mkspecs/aix-g++/qmake.conf
new file mode 100644
index 0000000..969aa76
--- /dev/null
+++ b/mkspecs/aix-g++/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for aix-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -mpowerpc
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
+QMAKE_LFLAGS_NOUNDEF =
+QMAKE_AIX_SHLIB = 1
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthreads
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
new file mode 100644
index 0000000..8e1059a
--- /dev/null
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+// uncomment if you have problems with <sys/proc.h> because your gcc
+// hasn't been built on exactly the same OS version your are using now.
+// typedef int crid_t;
+// typedef unsigned int class_id_t;
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#ifdef _AIX43
+// AIX 4.3 and better
+#define QT_SOCKLEN_T socklen_t
+#elif _AIX42
+// AIX 4.2
+#define QT_SOCKLEN_T size_t
+#else
+// AIX 4.1
+#define QT_SOCKLEN_T size_t
+// override
+#define QT_SOCKOPTLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+// AIX 4.3 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf
new file mode 100644
index 0000000..a18aa9f
--- /dev/null
+++ b/mkspecs/aix-xlc-64/qmake.conf
@@ -0,0 +1,85 @@
+#
+# qmake configuration for aix-xlc
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = xlc
+QMAKE_CC_THREAD = xlc_r
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -qstrict -q64
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -qthreaded
+
+QMAKE_CXX = xlC
+QMAKE_CXX_THREAD = xlC_r
+QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_COMPILER_DEFINES += __xlC__
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = xlC
+QMAKE_LINK_THREAD = xlC_r
+QMAKE_LINK_SHLIB = ld
+QMAKE_LFLAGS = -q64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -qmkshrobj
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
+QMAKE_AIX_SHLIB = 1
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthreads
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar -X64 cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib -X64
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h
new file mode 100644
index 0000000..c0501da
--- /dev/null
+++ b/mkspecs/aix-xlc-64/qplatformdefs.h
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+// Only AIX 4.3 and better support 64-bit
+#define QT_SOCKLEN_T socklen_t
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+// Only AIX 4.3 and better support 64-bit
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf
new file mode 100644
index 0000000..42f6f7e
--- /dev/null
+++ b/mkspecs/aix-xlc/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for aix-xlc
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = xlc
+QMAKE_CC_THREAD = xlc_r
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -qstrict
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -qthreaded
+
+QMAKE_CXX = xlC
+QMAKE_CXX_THREAD = xlC_r
+QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_COMPILER_DEFINES += __xlC__
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = xlC
+QMAKE_LINK_THREAD = xlC_r
+QMAKE_LINK_SHLIB = ld
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -qmkshrobj
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
+QMAKE_LFLAGS_NOUNDEF =
+QMAKE_AIX_SHLIB = 1
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthreads
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h
new file mode 100644
index 0000000..f41dad2
--- /dev/null
+++ b/mkspecs/aix-xlc/qplatformdefs.h
@@ -0,0 +1,166 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#ifdef _AIX43
+// AIX 4.3 and better
+#define QT_SOCKLEN_T socklen_t
+#elif _AIX42
+// AIX 4.2
+#define QT_SOCKLEN_T size_t
+#else
+// AIX 4.1
+#define QT_SOCKLEN_T size_t
+// override
+#define QT_SOCKOPTLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+// AIX 4.3 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf
new file mode 100644
index 0000000..25d447c
--- /dev/null
+++ b/mkspecs/common/g++.conf
@@ -0,0 +1,52 @@
+#
+# qmake configuration for common gcc
+#
+
+QMAKE_CC = gcc
+QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_RELEASE += -Wl,-O1
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME += -Wl,-soname,
+QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
new file mode 100644
index 0000000..ff87c74
--- /dev/null
+++ b/mkspecs/common/linux.conf
@@ -0,0 +1,49 @@
+#
+# qmake configuration for common linux
+#
+
+QMAKE_CFLAGS_THREAD += -D_REENTRANT
+QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -r
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+QMAKE_INSTALL_FILE = install -m 644 -p
+QMAKE_INSTALL_PROGRAM = install -m 755 -p
+
+include(unix.conf)
diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf
new file mode 100644
index 0000000..aee3904
--- /dev/null
+++ b/mkspecs/common/llvm.conf
@@ -0,0 +1,49 @@
+#
+# qmake configuration for common gcc
+#
+
+QMAKE_CC = llvm-gcc
+QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+QMAKE_CXX = llvm-g++
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = llvm-g++
+QMAKE_LINK_SHLIB = llvm-g++
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_RELEASE +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME += -Wl,-soname,
+QMAKE_LFLAGS_THREAD +=
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf
new file mode 100644
index 0000000..b764b26
--- /dev/null
+++ b/mkspecs/common/mac-g++.conf
@@ -0,0 +1,76 @@
+#
+# qmake configuration for common gcc on Mac OS X
+#
+
+include(mac.conf)
+
+QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
+QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -Os
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+QMAKE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
+QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
+QMAKE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
+QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
+QMAKE_CFLAGS_PPC += -arch ppc
+QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc
+QMAKE_CFLAGS_X86 += -arch i386
+QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386
+QMAKE_CFLAGS_DWARF2 += -gdwarf-2
+
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
+QMAKE_CXXFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
+QMAKE_CXXFLAGS_PPC += -arch ppc
+QMAKE_CXXFLAGS_X86 += -arch i386
+QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS += -headerpad_max_install_names
+QMAKE_LFLAGS_RELEASE +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
+QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5
+QMAKE_LFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5
+QMAKE_LFLAGS_PPC += -arch ppc
+QMAKE_LFLAGS_X86 += -arch i386
+QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
+QMAKE_RPATH +=
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/mac-llvm.conf b/mkspecs/common/mac-llvm.conf
new file mode 100644
index 0000000..624aec4
--- /dev/null
+++ b/mkspecs/common/mac-llvm.conf
@@ -0,0 +1,76 @@
+#
+# qmake configuration for common gcc on Mac OS X
+#
+
+include(mac.conf)
+
+QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
+QMAKE_CC = llvm-gcc
+QMAKE_CFLAGS += -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+QMAKE_CFLAGS_PPC_64 += -arch ppc64
+QMAKE_OBJECTIVE_CFLAGS_PPC_64 += -arch ppc64
+QMAKE_CFLAGS_X86_64 += -arch x86_64
+QMAKE_OBJECTIVE_CFLAGS_X86_64 += -arch x86_64
+QMAKE_CFLAGS_PPC += -arch ppc
+QMAKE_OBJECTIVE_CFLAGS_PPC += -arch ppc
+QMAKE_CFLAGS_X86 += -arch i386
+QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386
+QMAKE_CFLAGS_DWARF2 += -gdwarf-2
+
+QMAKE_CXX = llvm-g++
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PPC_64 += -arch ppc64
+QMAKE_CXXFLAGS_X86_64 += -arch x86_64
+QMAKE_CXXFLAGS_PPC += -arch ppc
+QMAKE_CXXFLAGS_X86 += -arch i386
+QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = llvm-g++
+QMAKE_LINK_SHLIB = llvm-g++
+QMAKE_LFLAGS += -headerpad_max_install_names
+QMAKE_LFLAGS_RELEASE +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD +=
+QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
+QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_PPC_64 += -arch ppc64
+QMAKE_LFLAGS_X86_64 += -arch x86_64
+QMAKE_LFLAGS_PPC += -arch ppc
+QMAKE_LFLAGS_X86 += -arch i386
+QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
+QMAKE_RPATH +=
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+QMAKE_OBJCFLAGS_PRECOMPILE += -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_OBJCXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
new file mode 100644
index 0000000..818b450
--- /dev/null
+++ b/mkspecs/common/mac.conf
@@ -0,0 +1,45 @@
+#
+# qmake configuration for common Mac OS X
+#
+
+QMAKE_RESOURCE = /Developer/Tools/Rez
+
+QMAKE_EXTENSION_SHLIB = dylib
+
+QMAKE_LIBDIR =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
+ /System/Library/Frameworks/AGL.framework/Headers/
+
+QMAKE_FIX_RPATH = install_name_tool -id
+
+QMAKE_RPATH =
+
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
+QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_RANLIB = ranlib -s
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $$QMAKE_COPY
+QMAKE_COPY_DIR = $$QMAKE_COPY -R
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+# Need to enable the correct deployment target for Cocoa (should be 10.3 for Carbon).
+macx-icc: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
+else: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
+
+include(unix.conf)
diff --git a/mkspecs/common/qws.conf b/mkspecs/common/qws.conf
new file mode 100644
index 0000000..0242db4
--- /dev/null
+++ b/mkspecs/common/qws.conf
@@ -0,0 +1,19 @@
+#
+# qmake configuration common for QWS
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui network
+QMAKE_INCREMENTAL_STYLE = sublib
+
+# modifications to linux.conf
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_X11SM =
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_OPENGL_QT =
diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf
new file mode 100644
index 0000000..4cb171e
--- /dev/null
+++ b/mkspecs/common/unix.conf
@@ -0,0 +1,11 @@
+#
+# qmake configuration for common unix
+#
+
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS +=
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS += -d
+QMAKE_YACCFLAGS_MANGLE += -p $base -b $base
+QMAKE_YACC_HEADER = $base.tab.h
+QMAKE_YACC_SOURCE = $base.tab.c
diff --git a/mkspecs/common/wince.conf b/mkspecs/common/wince.conf
new file mode 100644
index 0000000..d017cae
--- /dev/null
+++ b/mkspecs/common/wince.conf
@@ -0,0 +1,87 @@
+#
+# qmake configuration for common Windows CE
+#
+
+MAKEFILE_GENERATOR = MSVC.NET
+TEMPLATE = app
+QT += core gui
+CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
+
+DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG
+
+QMAKE_COMPILER_DEFINES += _MSC_VER=1400
+
+QMAKE_CC = cl
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = byacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
+QMAKE_CFLAGS_WARN_ON = -W3
+QMAKE_CFLAGS_WARN_OFF = -W0
+QMAKE_CFLAGS_RELEASE = -O2 -GL -MD
+QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd
+QMAKE_CFLAGS_YACC =
+
+# Uncomment the following lines to reduce library sizes
+# with potential cost of performance
+# QMAKE_CFLAGS += -Os
+# QMAKE_CFLAGS_RELEASE += -Os
+
+QMAKE_CXX = $$QMAKE_CC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_STL_ON = -EHsc
+QMAKE_CXXFLAGS_STL_OFF =
+QMAKE_CXXFLAGS_RTTI_ON = -GR
+QMAKE_CXXFLAGS_RTTI_OFF =
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -EHs-c-
+
+QMAKE_INCDIR =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
+QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
+QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
+
+QMAKE_LINK = link
+QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB
+QMAKE_LFLAGS_RELEASE = /LTCG /INCREMENTAL:NO
+QMAKE_LFLAGS_DEBUG = /DEBUG
+QMAKE_LIBS_NETWORK = ws2.lib
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_COMPAT =
+
+QMAKE_LIBS_QT_ENTRY = -lqtmain
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
+QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
+QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
+
+QMAKE_IDL = midl
+QMAKE_LIB = lib
+QMAKE_RC = rc
+
+QMAKE_ZIP = zip -r -9
+
+QMAKE_COPY = copy /y
+QMAKE_COPY_DIR = xcopy /s /q /y /i
+QMAKE_MOVE = move
+QMAKE_DEL_FILE = del
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = if not exist
+QMAKE_MKDIR = mkdir
+
+VCPROJ_EXTENSION = .vcproj
+VCSOLUTION_EXTENSION = .sln
+VCPROJ_KEYWORD = Qt4VSv1.0
+load(qt_config)
diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf
new file mode 100644
index 0000000..9cbc3d7
--- /dev/null
+++ b/mkspecs/cygwin-g++/qmake.conf
@@ -0,0 +1,87 @@
+#
+# qmake configuration for cygwin-g++
+#
+# Written for Qt/X11 on Windows using Cygwin's POSIX API
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = byacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Wl,-rpath,
+QMAKE_CYGWIN_SHLIB = 1
+QMAKE_CYGWIN_EXE = 1
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
new file mode 100644
index 0000000..b0fac04
--- /dev/null
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+// Cygwin does not provide <sys/ipc.h> and <sys/shm.h> because it
+// doesn't support SysV IPC or shared memory. See for example:
+// http://afni.nimh.nih.gov/afni/afniboard/messages/1725.html
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+//#include <windows.h>
+#include <netinet/in.h>
+
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+#define QT_FOPEN ::fopen
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T socklen_t
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf
new file mode 100644
index 0000000..72baa89
--- /dev/null
+++ b/mkspecs/darwin-g++/qmake.conf
@@ -0,0 +1,105 @@
+#
+# qmake configuration for darwin-g++
+#
+# Written for Qt/X11 on Darwin and XFree86
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl native_precompiled_headers
+QT += core gui
+DEFINES += __USE_WS_X11__
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_EXTENSION_SHLIB = dylib
+QMAKE_EXTENSION_PLUGIN = so
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_THREAD =
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+
+QMAKE_CXX = c++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_THREAD =
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = c++
+QMAKE_LINK_SHLIB = c++
+QMAKE_LFLAGS += -headerpad_max_install_names
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_APP = -prebind
+QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module
+QMAKE_LFLAGS_PLUGIN = -prebind -bundle
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
+
+QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
+
+QMAKE_RPATH =
+
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib -s
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $$QMAKE_COPY
+QMAKE_COPY_DIR = $$QMAKE_COPY -r
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+QMAKE_CXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
new file mode 100644
index 0000000..012e524
--- /dev/null
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T socklen_t
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/features/assistant.prf b/mkspecs/features/assistant.prf
new file mode 100644
index 0000000..25e5d4d
--- /dev/null
+++ b/mkspecs/features/assistant.prf
@@ -0,0 +1,9 @@
+
+INCLUDEPATH = $$QMAKE_INCDIR_QT/QtAssistant $$INCLUDEPATH
+
+mac:!static:contains(QT_CONFIG, qt_framework) {
+ qtAddLibrary(QtAssistant)
+} else {
+ qtAddLibrary(QtAssistantClient)
+}
+QT += network
diff --git a/mkspecs/features/build_pass.prf b/mkspecs/features/build_pass.prf
new file mode 100644
index 0000000..6547c97
--- /dev/null
+++ b/mkspecs/features/build_pass.prf
@@ -0,0 +1 @@
+CONFIG += no_autoqmake
diff --git a/mkspecs/features/dbusadaptors.prf b/mkspecs/features/dbusadaptors.prf
new file mode 100644
index 0000000..241ace6
--- /dev/null
+++ b/mkspecs/features/dbusadaptors.prf
@@ -0,0 +1,44 @@
+isEmpty(QMAKE_QDBUSXML2CPP) {
+ win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
+ else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
+}
+
+for(DBUS_ADAPTOR, $$list($$unique(DBUS_ADAPTORS))) {
+
+ !contains(DBUS_ADAPTOR, .*\w\.xml$) {
+ warning("Invalid D-BUS adaptor: '$${DBUS_ADAPTOR}', please use 'com.mydomain.myinterface.xml' instead.")
+ next()
+ }
+
+ DBUS_ADAPTOR_LIST += $${DBUS_ADAPTOR}
+}
+
+dbus_adaptor_header.commands = $$QMAKE_QDBUSXML2CPP -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
+dbus_adaptor_header.output_function = dbus_adaptor_header_output
+dbus_adaptor_header.name = DBUSXML2CPP ADAPTOR HEADER ${QMAKE_FILE_IN}
+dbus_adaptor_header.variable_out = DBUS_ADAPTOR_HEADERS
+dbus_adaptor_header.input = DBUS_ADAPTOR_LIST
+
+defineReplace(dbus_adaptor_header_output) {
+ return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.h")
+}
+
+dbus_adaptor_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -a :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+dbus_adaptor_source.output_function = dbus_adaptor_source_output
+dbus_adaptor_source.name = DBUSXML2CPP ADAPTOR SOURCE ${QMAKE_FILE_IN}
+dbus_adaptor_source.variable_out = SOURCES
+dbus_adaptor_source.input = DBUS_ADAPTOR_LIST
+
+load(moc)
+dbus_adaptor_moc.commands = $$moc_header.commands
+dbus_adaptor_moc.output = $$moc_header.output
+dbus_adaptor_moc.depends = $$dbus_adaptor_header.output
+dbus_adaptor_moc.input = DBUS_ADAPTOR_HEADERS
+dbus_adaptor_moc.variable_out = GENERATED_SOURCES
+dbus_adaptor_moc.name = $$moc_header.name
+
+defineReplace(dbus_adaptor_source_output) {
+ return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.cpp")
+}
+
+QMAKE_EXTRA_COMPILERS += dbus_adaptor_header dbus_adaptor_source dbus_adaptor_moc
diff --git a/mkspecs/features/dbusinterfaces.prf b/mkspecs/features/dbusinterfaces.prf
new file mode 100644
index 0000000..c32597a
--- /dev/null
+++ b/mkspecs/features/dbusinterfaces.prf
@@ -0,0 +1,45 @@
+load(moc)
+
+isEmpty(QMAKE_QDBUSXML2CPP) {
+ win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
+ else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
+}
+
+for(DBUS_INTERFACE, $$list($$unique(DBUS_INTERFACES))) {
+
+ !contains(DBUS_INTERFACE, .*\w\.xml$) {
+ warning("Invalid D-BUS interface : '$${DBUS_INTERFACE}', please use 'com.mydomain.myinterface.xml' instead.")
+ next()
+ }
+
+ DBUS_INTERFACE_LIST += $${DBUS_INTERFACE}
+}
+
+dbus_interface_header.commands = $$QMAKE_QDBUSXML2CPP -p ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
+dbus_interface_header.output_function = dbus_interface_header_output
+dbus_interface_header.name = DBUSXML2CPP INTERFACE HEADER ${QMAKE_FILE_IN}
+dbus_interface_header.variable_out = DBUS_INTERFACE_HEADERS
+dbus_interface_header.input = DBUS_INTERFACE_LIST
+
+defineReplace(dbus_interface_header_output) {
+ return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.h")
+}
+
+dbus_interface_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -p :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+dbus_interface_source.output_function = dbus_interface_source_output
+dbus_interface_source.name = DBUSXML2CPP INTERFACE SOURCE ${QMAKE_FILE_IN}
+dbus_interface_source.variable_out = SOURCES
+dbus_interface_source.input = DBUS_INTERFACE_LIST
+
+dbus_interface_moc.commands = $$moc_header.commands
+dbus_interface_moc.output = $$moc_header.output
+dbus_interface_moc.depends = $$dbus_interface_header.output
+dbus_interface_moc.input = DBUS_INTERFACE_HEADERS
+dbus_interface_moc.variable_out = GENERATED_SOURCES
+dbus_interface_moc.name = $$moc_header.name
+
+defineReplace(dbus_interface_source_output) {
+ return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.cpp")
+}
+
+QMAKE_EXTRA_COMPILERS += dbus_interface_header dbus_interface_source dbus_interface_moc
diff --git a/mkspecs/features/debug.prf b/mkspecs/features/debug.prf
new file mode 100644
index 0000000..c1ba125
--- /dev/null
+++ b/mkspecs/features/debug.prf
@@ -0,0 +1,8 @@
+CONFIG -= release
+contains(QT_CONFIG,dwarf2)|dwarf2:load(dwarf2, true)
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_DEBUG
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG
+QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG
+!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(debug, release)
diff --git a/mkspecs/features/debug_and_release.prf b/mkspecs/features/debug_and_release.prf
new file mode 100644
index 0000000..8b89321
--- /dev/null
+++ b/mkspecs/features/debug_and_release.prf
@@ -0,0 +1 @@
+!macx-xcode:addExclusiveBuilds(debug, Debug, release, Release)
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
new file mode 100644
index 0000000..01074f4
--- /dev/null
+++ b/mkspecs/features/default_post.prf
@@ -0,0 +1,10 @@
+CONFIG(debug, debug|release):load(debug)
+else:load(release)
+debug_and_release:load(debug_and_release)
+incredibuild_xge {
+ CONFIG -= incredibuild_xge
+ CONFIG = incredibuild_xge $$CONFIG
+}
+
+QMAKE_INCDIR += $$QMAKE_INCDIR_POST
+QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
new file mode 100644
index 0000000..6442594
--- /dev/null
+++ b/mkspecs/features/default_pre.prf
@@ -0,0 +1,2 @@
+load(exclusive_builds)
+CONFIG = lex yacc warn_on debug uic resources $$CONFIG
diff --git a/mkspecs/features/designer.prf b/mkspecs/features/designer.prf
new file mode 100644
index 0000000..61a30cf
--- /dev/null
+++ b/mkspecs/features/designer.prf
@@ -0,0 +1,6 @@
+QT += xml script
+qt:load(qt)
+
+plugin:DEFINES += QDESIGNER_EXPORT_WIDGETS
+
+qtAddLibrary(QtDesigner)
diff --git a/mkspecs/features/dll.prf b/mkspecs/features/dll.prf
new file mode 100644
index 0000000..943ab93
--- /dev/null
+++ b/mkspecs/features/dll.prf
@@ -0,0 +1,2 @@
+CONFIG += shared
+
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf
new file mode 100644
index 0000000..8898c96
--- /dev/null
+++ b/mkspecs/features/exclusive_builds.prf
@@ -0,0 +1,100 @@
+# fixExclusiveOutputDirs(1config, 2config)
+# Change all output paths that references 2config to have the string 1config in them
+defineTest(fixExclusiveOutputDirs) {
+ unset(firstBuild)
+ unset(secondBuild)
+ unset(appendFirstBuild)
+ firstBuild = $$1
+ secondBuild = $$2
+ count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false
+ else:appendFirstBuild = true
+
+ isEmpty(QMAKE_DIR_REPLACE):QMAKE_DIR_REPLACE += OBJECTS_DIR MOC_DIR RCC_DIR
+ lessThan(firstBuild, $$secondBuild):eval($${firstBuild}_and_$${secondBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
+ else:eval($${secondBuild}_and_$${firstBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
+ for(fix, QMAKE_DIR_REPLACE) {
+ isEmpty($$fix)|isEqual($$fix, .) {
+ eval($$fix = $${firstBuild})
+ } else:contains($$list($$first($$fix)), .*$${secondBuild}.*) {
+ eval($$fix ~= s/$${secondBuild}/$${firstBuild}/gi)
+ } else:isEqual(appendFirstBuild, true):!contains($$list($$first($$fix)), .*$${firstBuild}.*) {
+ contains($$list($${first($$fix)}), .*/$):eval($$fix = $${first($$fix)}$${firstBuild})
+ else:eval($$fix = $${first($$fix)}-$${firstBuild})
+ }
+ export($$fix)
+ }
+ return(true)
+}
+
+# addExclusiveBuilds(1config, 1name, 2config, 2name)
+# Adds two BUILDS which are exclusive to each other.
+defineTest(addExclusiveBuilds) {
+ unset(firstBuild)
+ unset(firstBuildName)
+ unset(secondBuild)
+ unset(secondBuildName)
+
+ firstBuild = $$1
+ firstBuildName = $$2
+ secondBuild = $$3
+ secondBuildName = $$4
+
+ contains(TEMPLATE, subdirs) {
+ eval(sub_$${firstBuildName}.target = $$firstBuild)
+ export(sub_$${firstBuildName}.target)
+ eval(sub_$${firstBuildName}.CONFIG = recursive)
+ export(sub_$${firstBuildName}.CONFIG)
+ eval(sub_$${secondBuildName}.target = $$secondBuild)
+ export(sub_$${secondBuildName}.target)
+ eval(sub_$${secondBuildName}.CONFIG = recursive)
+ export(sub_$${secondBuildName}.CONFIG)
+ QMAKE_EXTRA_TARGETS += sub_$${firstBuildName} sub_$${secondBuildName}
+ export(QMAKE_EXTRA_TARGETS)
+ } else:!build_pass {
+ first_BUILDS =
+ second_BUILDS =
+ suffix_BUILDS = Build
+
+ isEmpty(BUILDS): BUILDPERMUTATIONS = $$suffix_BUILDS
+ else: BUILDPERMUTATIONS = $$BUILDS
+
+ for(permutation, BUILDPERMUTATIONS) {
+ permutation ~= s/$${suffix_BUILDS}$//
+ isEmpty(permutation): permutationName =
+ else: permutationName = -$$permutation
+ # Makefile target rule
+ eval($${firstBuildName}$${permutation}.target = $${firstBuild}$$lower($${permutationName}))
+ export($${firstBuildName}$${permutation}.target)
+ # IDE name
+ eval($${firstBuildName}$${permutation}.name = $${firstBuildName}$${permutationName})
+ export($${firstBuildName}$${permutation}.name)
+ # prl import CONFIG option
+ eval($${firstBuildName}$${permutation}.PRL_CONFIG = $${firstBuild}$${permutation})
+ export($${firstBuildName}$${permutation}.PRL_CONFIG)
+ # Individual CONFIG option
+ eval($${firstBuildName}$${permutation}.CONFIG = $${firstBuild} $${firstBuildName}Build $$eval($${permutation}.CONFIG))
+ export($${firstBuildName}$${permutation}.CONFIG)
+
+ eval($${secondBuildName}$${permutation}.target = $${secondBuild}$$lower($${permutationName}))
+ export($${secondBuildName}$${permutation}.target)
+ eval($${secondBuildName}$${permutation}.name = $${secondBuildName}$${permutationName})
+ export($${secondBuildName}$${permutation}.name)
+ eval($${secondBuildName}$${permutation}.PRL_CONFIG = $${secondBuild}$${permutation})
+ export($${secondBuildName}$${permutation}.PRL_CONFIG)
+ eval($${secondBuildName}$${permutation}.CONFIG = $${secondBuild} $${secondBuildName}Build $$eval($${permutation}.CONFIG))
+ export($${secondBuildName}$${permutation}.CONFIG)
+
+ first_BUILDS += $${firstBuildName}$${permutation}
+ second_BUILDS += $${secondBuildName}$${permutation}
+ }
+
+ # A mutual exclusive block.
+ CONFIG($${firstBuild}, $${firstBuild}|$${secondBuild}): BUILDS = $$first_BUILDS $$second_BUILDS
+ else: BUILDS = $$second_BUILDS $$first_BUILDS
+ export(BUILDS)
+ } else {
+ eval($${firstBuildName}Build:fixExclusiveOutputDirs($$firstBuild, $$secondBuild, false))
+ eval($${secondBuildName}Build:fixExclusiveOutputDirs($$secondBuild, $$firstBuild, false))
+ }
+ return(true)
+}
diff --git a/mkspecs/features/help.prf b/mkspecs/features/help.prf
new file mode 100644
index 0000000..15685e7
--- /dev/null
+++ b/mkspecs/features/help.prf
@@ -0,0 +1,4 @@
+INCLUDEPATH = $$QMAKE_INCDIR_QT/QtHelp $$INCLUDEPATH
+QT += xml sql
+
+qtAddLibrary(QtHelp)
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
new file mode 100644
index 0000000..2fce443
--- /dev/null
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -0,0 +1,11 @@
+contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") {
+ EOC = \$\$escape_expand(\n\t)
+
+ # The VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
+ # No other generator understands the \h
+ win32-msvc.net|win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\r\h)
+
+ for(xge, INCREDIBUILD_XGE) {
+ eval($${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands))
+ }
+}
diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf
new file mode 100644
index 0000000..df76a68
--- /dev/null
+++ b/mkspecs/features/lex.prf
@@ -0,0 +1,24 @@
+#
+# Lex extra-compiler for handling files specified in the LEXSOURCES variable
+#
+
+{
+ lex.name = Lex ${QMAKE_FILE_IN}
+ lex.input = LEXSOURCES
+ lex_included {
+ lex.CONFIG += no_link
+ } else {
+ lex.variable_out = GENERATED_SOURCES
+ }
+ isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
+ QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
+ !yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
+
+ lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\n\t) \
+ $$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t) \
+ $$QMAKE_MOVE lex.${QMAKE_FILE_BASE}.c $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t)
+ lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_lex$${first(QMAKE_EXT_CPP)}
+
+ silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
+ QMAKE_EXTRA_COMPILERS += lex
+}
diff --git a/mkspecs/features/link_pkgconfig.prf b/mkspecs/features/link_pkgconfig.prf
new file mode 100644
index 0000000..4c528aa
--- /dev/null
+++ b/mkspecs/features/link_pkgconfig.prf
@@ -0,0 +1,6 @@
+# handle pkg-config files
+for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) {
+ QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB)
+ QMAKE_CFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB)
+ LIBS += $$system(pkg-config --libs $$PKGCONFIG_LIB)
+}
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
new file mode 100644
index 0000000..ea9e9bd
--- /dev/null
+++ b/mkspecs/features/mac/default_post.prf
@@ -0,0 +1,2 @@
+load(default_post)
+!no_objective_c:CONFIG += objective_c
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
new file mode 100644
index 0000000..81e1d06
--- /dev/null
+++ b/mkspecs/features/mac/default_pre.prf
@@ -0,0 +1,3 @@
+CONFIG = sdk rez $$CONFIG
+load(default_pre)
+
diff --git a/mkspecs/features/mac/dwarf2.prf b/mkspecs/features/mac/dwarf2.prf
new file mode 100644
index 0000000..fc05562
--- /dev/null
+++ b/mkspecs/features/mac/dwarf2.prf
@@ -0,0 +1,6 @@
+macx-xcode|macx-pbuilder {
+} else {
+ QMAKE_CFLAGS_DEBUG += $$QMAKE_CFLAGS_DWARF2
+ QMAKE_OBJECTIVE_CFLAGS_DEBUG += $$QMAKE_OBJECTIVE_DWARF2
+ QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CXXFLAGS_DWARF2
+}
diff --git a/mkspecs/features/mac/objective_c.prf b/mkspecs/features/mac/objective_c.prf
new file mode 100644
index 0000000..0a73af9
--- /dev/null
+++ b/mkspecs/features/mac/objective_c.prf
@@ -0,0 +1,24 @@
+
+isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC
+isEmpty(QMAKE_OBJECTIVE_CFLAGS) { #bootstrap
+ QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
+ QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+ QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+ QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+ QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+ QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86
+ QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC
+ QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
+}
+OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR
+isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = .
+isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .mm .m
+
+objective_c.dependency_type = TYPE_C
+objective_c.variables = QMAKE_OBJECTIVE_CFLAGS
+objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+objective_c.output = $$OBJECTIVE_C_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+objective_c.input = OBJECTIVE_SOURCES
+objective_c.name = Compile ${QMAKE_FILE_IN}
+silent:objective_c.commands = @echo objective-c ${QMAKE_FILE_IN} && $$objective_c.commands
+QMAKE_EXTRA_COMPILERS += objective_c
diff --git a/mkspecs/features/mac/ppc.prf b/mkspecs/features/mac/ppc.prf
new file mode 100644
index 0000000..e9169d9
--- /dev/null
+++ b/mkspecs/features/mac/ppc.prf
@@ -0,0 +1,7 @@
+macx-xcode|macx-pbuilder {
+} else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC
+}
diff --git a/mkspecs/features/mac/ppc64.prf b/mkspecs/features/mac/ppc64.prf
new file mode 100644
index 0000000..5a04d5b
--- /dev/null
+++ b/mkspecs/features/mac/ppc64.prf
@@ -0,0 +1,7 @@
+macx-xcode|macx-pbuilder {
+} else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC_64
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC_64
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC_64
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC_64
+}
diff --git a/mkspecs/features/mac/rez.prf b/mkspecs/features/mac/rez.prf
new file mode 100644
index 0000000..3defd86
--- /dev/null
+++ b/mkspecs/features/mac/rez.prf
@@ -0,0 +1,16 @@
+
+#global defaults
+isEmpty(QMAKE_REZ) {
+ QMAKE_REZ = /Developer/Tools/Rez
+}
+isEmpty(REZ_DIR):REZ_DIR = .
+isEmpty(QMAKE_EXT_REZ):QMAKE_EXT_REZ = .rsrc
+
+rez_source.CONFIG += no_link
+rez_source.dependency_type = TYPE_C
+rez_source.commands = $$QMAKE_REZ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -useDF
+rez_source.output = $$REZ_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_REZ)}
+rez_source.input = REZ_FILES
+rez_source.name = REZ ${QMAKE_FILE_IN}
+silent:rez_source.commands = @echo rez ${QMAKE_FILE_IN} && $$rez_source.commands
+QMAKE_EXTRA_COMPILERS += rez_source
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
new file mode 100644
index 0000000..5eab948
--- /dev/null
+++ b/mkspecs/features/mac/sdk.prf
@@ -0,0 +1,8 @@
+!isEmpty(QMAKE_MAC_SDK) {
+ !macx-xcode:!macx-pbuilder {
+ QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
+ QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
+ QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK
+ QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK
+ }
+}
diff --git a/mkspecs/features/mac/x86.prf b/mkspecs/features/mac/x86.prf
new file mode 100644
index 0000000..a7a9f84
--- /dev/null
+++ b/mkspecs/features/mac/x86.prf
@@ -0,0 +1,7 @@
+macx-xcode|macx-pbuilder {
+} else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86
+}
diff --git a/mkspecs/features/mac/x86_64.prf b/mkspecs/features/mac/x86_64.prf
new file mode 100644
index 0000000..65b6b79
--- /dev/null
+++ b/mkspecs/features/mac/x86_64.prf
@@ -0,0 +1,7 @@
+macx-xcode|macx-pbuilder {
+} else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86_64
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86_64
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86_64
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86_64
+}
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
new file mode 100644
index 0000000..faa9871
--- /dev/null
+++ b/mkspecs/features/moc.prf
@@ -0,0 +1,86 @@
+
+#global defaults
+isEmpty(QMAKE_MOC) {
+ win32:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
+ else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+}
+isEmpty(MOC_DIR):MOC_DIR = .
+isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_
+isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
+
+# This function on Windows puts the includes into a .inc file which moc will read, if the project
+# has more than 30 includes. We do this to overcome a command-line limit on Win < XP
+# Otherwise the function simply returns the normal command-line for moc
+defineReplace(mocCmd) {
+ win32:count($$list($$INCPATH), 40, >) {
+ EOC = $$escape_expand(\n\t)
+
+ if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) {
+ # the VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
+ # No other generator understands the \h
+ if(win32-msvc.net|win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h)
+ else: EOC = $$escape_expand(\\)$$escape_expand(\n\t)
+ }
+
+ INCLUDETEMP = mocinclude.tmp
+ unset(INCFILELIST)
+ RET =
+ for(incfile, $$list($$INCPATH)) {
+ INCFILELIST = -I$$incfile
+ isEmpty(RET): RET += @echo $$INCFILELIST> $$INCLUDETEMP $$EOC
+ else: RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC
+ }
+ !isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC
+ RET += $$QMAKE_MOC $(DEFINES) @$$INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2
+ return($$RET)
+ }
+ return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
+}
+
+#moc headers
+moc_header.CONFIG = moc_verify
+moc_header.dependency_type = TYPE_C
+moc_header.commands = ${QMAKE_FUNC_mocCmd}
+moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+moc_header.input = HEADERS
+moc_header.variable_out = SOURCES
+moc_header.name = MOC ${QMAKE_FILE_IN}
+silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands
+QMAKE_EXTRA_COMPILERS += moc_header
+INCREDIBUILD_XGE += moc_header
+
+#moc sources
+moc_source.CONFIG = no_link moc_verify
+moc_source.dependency_type = TYPE_C
+moc_source.commands = ${QMAKE_FUNC_mocCmd}
+moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
+moc_source.input = SOURCES OBJECTIVE_SOURCES
+moc_source.name = MOC ${QMAKE_FILE_IN}
+silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
+QMAKE_EXTRA_COMPILERS += moc_source
+INCREDIBUILD_XGE += moc_source
+
+#make sure we can include these files
+INCLUDEPATH += $$MOC_DIR
+
+#auto depend on moc
+unix:!no_mocdepend {
+ moc_source.depends += $$first(QMAKE_MOC)
+ moc_header.depends += $$first(QMAKE_MOC)
+ !contains(TARGET, moc) { #auto build moc
+ isEmpty(QMAKE_MOC_SRC):QMAKE_MOC_SRC = "$(QTDIR)/src/tools/moc"
+ make_moc.target = $$first(QMAKE_MOC)
+ make_moc.commands = (cd $$QMAKE_MOC_SRC && $(MAKE))
+ QMAKE_EXTRA_TARGETS += make_moc
+ }
+}
+
+#generate a mocclean
+build_pass|isEmpty(BUILDS):mocclean.depends = compiler_moc_header_clean compiler_moc_source_clean
+else:mocclean.CONFIG += recursive
+QMAKE_EXTRA_TARGETS += mocclean
+
+#generate a mocables
+build_pass|isEmpty(BUILDS):mocables.depends = compiler_moc_header_make_all compiler_moc_source_make_all
+else:mocables.CONFIG += recursive
+QMAKE_EXTRA_TARGETS += mocables
diff --git a/mkspecs/features/no_debug_info.prf b/mkspecs/features/no_debug_info.prf
new file mode 100644
index 0000000..3acf6c8
--- /dev/null
+++ b/mkspecs/features/no_debug_info.prf
@@ -0,0 +1,5 @@
+
+QMAKE_CFLAGS -= -g -ggdb3
+QMAKE_CXXFLAGS -= -g -ggdb3
+QMAKE_LFLAGS -= -g -ggdb3
+QMAKE_LIBFLAGS -= -g -ggdb3
diff --git a/mkspecs/features/qdbus.prf b/mkspecs/features/qdbus.prf
new file mode 100644
index 0000000..1d8704d
--- /dev/null
+++ b/mkspecs/features/qdbus.prf
@@ -0,0 +1,2 @@
+qtAddLibrary(QtDBus)
+CONFIG += dbusadaptors dbusinterfaces
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
new file mode 100644
index 0000000..0c6e09a
--- /dev/null
+++ b/mkspecs/features/qt.prf
@@ -0,0 +1,183 @@
+CONFIG *= moc thread
+
+#handle defines
+win32 {
+ qt_static:DEFINES += QT_NODLL
+ !contains(DEFINES, QT_NODLL) {
+ QT_ENV_DLL = $$(QT_DLL)
+ QT_ENV_NO_DLL = $$(QT_NODLL)
+ isEmpty(QT_ENV_NO_DLL) {
+ shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL
+ }
+ contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1
+ }
+}
+CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
+no_keywords:DEFINES += QT_NO_KEYWORDS
+plugin { #Qt plugins
+ static:DEFINES += QT_STATICPLUGIN
+ DEFINES += QT_PLUGIN
+
+ # Triggers both on Qt being configured with -arch boundschecker,
+ # and if you qmake CONFIG+=boundchecker on your plugin project
+ boundschecker|contains(QT_CONFIG,boundschecker) {
+ # This option is added for plugins when Qt is configured for Boundschecker,
+ # since we want Boundschecker to not instrument the qt_plugin_query_verification_data
+ # function, as we call that function without the plugin's dependent DLLs, thus
+ # Boundscheckers instrumentation will fail. The function only returns a const char *,
+ # so no instrumentation is really needed on that function anyways.
+ QMAKE_CFLAGS += /nmignore:*:qt_plugin_query_verification_data
+ QMAKE_CXXFLAGS += /nmignore:*:qt_plugin_query_verification_data
+ }
+}
+
+#handle includes
+INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picking up "stale" includes
+win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt
+
+# As order does matter for static libs, we reorder the QT variable here
+TMPLIBS = webkit phonon dbus testlib script scripttools svg qt3support sql xmlpatterns xml opengl gui network core
+for(QTLIB, $$list($$TMPLIBS)) {
+ contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB
+}
+
+QT_UNKNOWN = $$QT
+QT_UNKNOWN -= $$QT_ORDERED
+QT = $$QT_ORDERED
+for(QTLIB, $$list($$QT_UNKNOWN)) {
+ !contains(TMPLIBS, $$QTLIB):message("Warning: unknown QT: $$QTLIB")
+}
+
+QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN
+for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
+ for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
+ qplugin_style =
+ !qt_debug:!qt_release {
+ CONFIG(debug, debug|release):qplugin_style = debug
+ else:qplugin_style = release
+ } else:CONFIG(qt_debug, qt_debug|qt_release) {
+ qplugin_style = debug
+ } else {
+ qplugin_style = release
+ }
+
+ # Check if the plugin is known to Qt. We can use this to determine
+ # the plugin path. Unknown plugins must rely on the default link path.
+ ACCESSIBLEPLUGINS = qtaccessiblewidgets qtaccessiblecompatwidgets
+ CODECPLUGINS = qcncodecs qjpcodecs qkrcodecs qtwcodecs
+ DECORATIONPLUGINS = qdecorationdefault qdecorationwindows
+ GFXDRIVERPLUGINS = qgfxvnc qscreenvfb qgfxsnap qgfxvga16 qgfxmatrox qgfxvoodoo qgfxtransformed qgfxshadowfb
+ IMAGEPLUGINS = qgif qmng qjpeg qsvg
+ INPUTPLUGINS = qimsw-multi
+ MOUSEDRIVERPLUGINS = qtslibmousehandler
+ SQLPLUGINS = qsqldb2 qsqloci qsqltds qsqlodbc qsqlpsql qsqlibase qsqlmysql qsqlite2 qsqlite
+ PHONONPLUGINS = phonon_waveout phonon_ds9
+
+ ALLQTPLUGINS = $$ACCESSIBLEPLUGINS $$CODECPLUGINS $$DECORATIONPLUGINS $$GFXDRIVERPLUGINS $$IMAGEPLUGINS $$INPUTPLUGINS $$MOUSEDRIVERPLUGINS $$SQLPLUGINS $$PHONONPLUGINS
+
+ QT_PLUGINPATH =
+ contains(ALLQTPLUGINS, $$QTPLUG) {
+ # Determine the plugin path
+ contains(ACCESSIBLEPLUGINS, $$QTPLUG): QT_PLUGINPATH = accessible
+ contains(CODECPLUGINS, $$QTPLUG): QT_PLUGINPATH = codecs
+ contains(DECORATIONPLUGINS, $$QTPLUG): QT_PLUGINPATH = decorations
+ contains(GFXDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = gfxdrivers
+ contains(IMAGEPLUGINS, $$QTPLUG): QT_PLUGINPATH = imageformats
+ contains(INPUTPLUGINS, $$QTPLUG): QT_PLUGINPATH = inputmethods
+ contains(MOUSEDRIVERPLUGINS, $$QTPLUG): QT_PLUGINPATH = mousedrivers
+ contains(SQLPLUGINS, $$QTPLUG): QT_PLUGINPATH = sqldrivers
+ contains(PHONONPLUGINS, $$QTPLUG): QT_PLUGINPATH = phonon_backend
+ }
+
+ # Generate the plugin linker line
+ target_qt:isEqual(TARGET, QTPLUG) {
+ warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
+ } else {
+ QT_LINKAGE = -l$${QTPLUG}
+ win32 {
+ CONFIG(debug, debug|release):QT_LINKAGE = -l$${QTPLUG}d
+ } else:mac {
+ isEqual(qplugin_style, debug):QT_LINKAGE = -l$${QTPLUG}_debug
+ }
+ }
+
+ # Only link against plugin in static builds
+ isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
+ !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS]/$$QT_PLUGINPATH
+ LIBS += $$QT_LINKAGE
+ # if the plugin is linked statically there is no need to deploy it
+ DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
+ }
+ isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
+ QT_ITEM =
+ CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
+ else: QT_ITEM = $${QTPLUG}4.dll
+
+ eval(qt_additional_plugin_$${QTPLUG}.sources = $$[QT_INSTALL_PLUGINS]/$${QT_PLUGINPATH}/$${QT_ITEM})
+ eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
+
+ DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
+ }
+ }
+}
+#specific module settings
+!isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs
+QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT
+for(QTLIB, $$list($$lower($$unique(QT)))) {
+ unset(qlib_style)
+ !qt_debug:!qt_release {
+ CONFIG(debug, debug|release):qlib_style = debug
+ else:qlib_style = release
+ } else:CONFIG(qt_debug, qt_debug|qt_release) {
+ qlib_style = debug
+ } else {
+ qlib_style = release
+ }
+
+ unset(qlib)
+ isEqual(QTLIB, gui):qlib = QtGui
+ else:isEqual(QTLIB, network):qlib = QtNetwork
+ else:isEqual(QTLIB, xml):qlib = QtXml
+ else:isEqual(QTLIB, xmlpatterns):qlib = QtXmlPatterns
+ else:isEqual(QTLIB, opengl):qlib = QtOpenGL
+ else:isEqual(QTLIB, sql):qlib = QtSql
+ else:isEqual(QTLIB, core):qlib = QtCore
+ else:isEqual(QTLIB, canvas):qlib = QtCanvas
+ else:isEqual(QTLIB, qt3support):qlib = Qt3Support
+ else:isEqual(QTLIB, svg):qlib = QtSvg
+ else:isEqual(QTLIB, script):qlib = QtScript
+ else:isEqual(QTLIB, scripttools):qlib = QtScriptTools
+ else:isEqual(QTLIB, testlib):qlib = QtTest
+ else:isEqual(QTLIB, dbus):qlib = QtDBus
+ else:isEqual(QTLIB, phonon):qlib = phonon
+ else:isEqual(QTLIB, webkit):qlib = QtWebKit
+ else:message("Unknown QT: $$QTLIB"):qlib =
+ !isEmpty(qlib) {
+ target_qt:isEqual(TARGET, qlib) {
+ warning($$TARGET cannot have a QT of $$QTLIB)
+ } else {
+ DEFINES *= $$upper(QT_$${QTLIB}_LIB)
+ isEqual(QTLIB, opengl):CONFIG += opengl
+ isEqual(QTLIB, qt3support):DEFINES *= QT3_SUPPORT
+ isEqual(QTLIB, testlib):CONFIG += console
+ isEqual(QTLIB, dbus):CONFIG += dbusadaptors dbusinterfaces
+
+ qtAddLibrary($$qlib)
+ }
+ }
+}
+
+qt_compat {
+ !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us
+ INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt
+ DEFINES *= QT_COMPAT
+}
+
+wince*:static:gui {
+ QTLIB += qmenu_wce.res
+}
+
+!isEmpty(QT_NAMESPACE):DEFINES *= QT_NAMESPACE=$$QT_NAMESPACE
+mac {
+ !isEmpty(QT_NAMESPACE_MAC_CRC):DEFINES *= QT_NAMESPACE_MAC_CRC=$$QT_NAMESPACE_MAC_CRC
+}
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
new file mode 100644
index 0000000..779c2e5
--- /dev/null
+++ b/mkspecs/features/qt_config.prf
@@ -0,0 +1,14 @@
+exists($$_QMAKE_CACHE_):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QMAKE_QT_CONFIG)
+isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
+ !isEmpty(QT_BUILD_TREE):QMAKE_QT_CONFIG = $$QT_BUILD_TREE/mkspecs/qconfig.pri
+ else:exists($$_QMAKE_CACHE_):infile($$_QMAKE_CACHE_, QT_BUILD_TREE):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)/mkspecs/qconfig.pri
+ else:exists($$[QT_INSTALL_DATA]/mkspecs/qconfig.pri):QMAKE_QT_CONFIG = $$[QT_INSTALL_DATA]/mkspecs/qconfig.pri
+}
+!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG) {
+ debug(1, "Cannot load qconfig.pri!")
+} else {
+ debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
+}
+
+load(qt_functions)
+
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
new file mode 100644
index 0000000..8956ef7
--- /dev/null
+++ b/mkspecs/features/qt_functions.prf
@@ -0,0 +1,66 @@
+defineReplace(qtLibraryTarget) {
+ unset(LIBRARY_NAME)
+ LIBRARY_NAME = $$1
+ mac:!static:contains(QT_CONFIG, qt_framework) {
+ QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
+ export(QMAKE_FRAMEWORK_BUNDLE_NAME)
+ }
+ contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
+ !debug_and_release|build_pass {
+ mac:RET = $$member(LIBRARY_NAME, 0)_debug
+ else:win32:RET = $$member(LIBRARY_NAME, 0)d
+ }
+ }
+ isEmpty(RET):RET = $$LIBRARY_NAME
+ return($$RET)
+}
+
+defineTest(qtAddLibrary) {
+ INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
+ INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
+
+ LIB_NAME = $$1
+ unset(LINKAGE)
+ mac {
+ CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced
+ QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT}
+ FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers
+ !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
+ INCLUDEPATH -= $$FRAMEWORK_INCLUDE
+ INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
+ }
+ LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
+ } else:!qt_no_framework { #detection
+ for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) {
+ exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
+ QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
+ FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
+ !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
+ INCLUDEPATH -= $$FRAMEWORK_INCLUDE
+ INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
+ }
+ LINKAGE = -framework $${LIB_NAME}
+ break()
+ }
+ }
+ }
+ }
+ isEmpty(LINKAGE) {
+ CONFIG(debug, debug|release) {
+ win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
+ mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
+ }
+ isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
+ }
+ !isEmpty(QMAKE_LSB) {
+ QMAKE_LFLAGS *= --lsb-libpath=$$$$QMAKE_LIBDIR_QT
+ QMAKE_LFLAGS *= -L/opt/lsb/lib
+ QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
+ }
+ LIBS += $$LINKAGE
+ export(LIBS)
+ export(INCLUDEPATH)
+ export(QMAKE_FRAMEWORKPATH)
+ export(QMAKE_LFLAGS)
+ return(true)
+}
diff --git a/mkspecs/features/qtestlib.prf b/mkspecs/features/qtestlib.prf
new file mode 100644
index 0000000..0b1fbee
--- /dev/null
+++ b/mkspecs/features/qtestlib.prf
@@ -0,0 +1,4 @@
+
+CONFIG += console
+
+qtAddLibrary(QtTest)
diff --git a/mkspecs/features/qtopia.prf b/mkspecs/features/qtopia.prf
new file mode 100644
index 0000000..7672a8d
--- /dev/null
+++ b/mkspecs/features/qtopia.prf
@@ -0,0 +1 @@
+CONFIG *= qtopiainc qtopialib
diff --git a/mkspecs/features/qtopiainc.prf b/mkspecs/features/qtopiainc.prf
new file mode 100644
index 0000000..2665da5
--- /dev/null
+++ b/mkspecs/features/qtopiainc.prf
@@ -0,0 +1 @@
+INCLUDEPATH += $$QMAKE_INCDIR_QTOPIA
diff --git a/mkspecs/features/qtopialib.prf b/mkspecs/features/qtopialib.prf
new file mode 100644
index 0000000..0c5ccf1
--- /dev/null
+++ b/mkspecs/features/qtopialib.prf
@@ -0,0 +1,2 @@
+!isEmpty(QMAKE_LIBDIR_QTOPIA):QMAKE_LIBDIR = $$QMAKE_LIBDIR_QTOPIA
+LIBS += $$QMAKE_LIBS_QTOPIA
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
new file mode 100644
index 0000000..e9d79b0
--- /dev/null
+++ b/mkspecs/features/qttest_p4.prf
@@ -0,0 +1,28 @@
+isEmpty(TEMPLATE):TEMPLATE=app
+CONFIG += qt warn_on console depend_includepath
+
+qtAddLibrary(QtTest)
+
+# prefix test binary with tst_
+!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
+
+########################################################################
+# Use install rule to run test application.
+# This lets you do 'make install' on a test to both build and run it,
+# and lets you easily build and run all tests from the parent directory.
+# ----------------------------------------------------------------------
+
+runme.files =
+runme.path = .
+!isEmpty(DESTDIR): runme.commands = cd ./$(DESTDIR) &&
+macx: runme.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
+else:unix: runme.commands += ./$(QMAKE_TARGET)
+else:win32: {
+ CONFIG(debug, debug|release):runme.commands += debug\\$(QMAKE_TARGET)
+ else:runme.commands += release\\$(QMAKE_TARGET)
+}
+embedded: runme.commands += -qws
+INSTALLS += runme
+
+
+########################################################################
diff --git a/mkspecs/features/release.prf b/mkspecs/features/release.prf
new file mode 100644
index 0000000..2d63c24
--- /dev/null
+++ b/mkspecs/features/release.prf
@@ -0,0 +1,7 @@
+CONFIG -= debug
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_RELEASE
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE
+QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
+!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) \ No newline at end of file
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
new file mode 100644
index 0000000..8ccd576
--- /dev/null
+++ b/mkspecs/features/resources.prf
@@ -0,0 +1,31 @@
+isEmpty(QMAKE_RCC) {
+ win32:QMAKE_RCC = $$[QT_INSTALL_BINS]\rcc.exe
+ else:QMAKE_RCC = $$[QT_INSTALL_BINS]/rcc
+}
+
+isEmpty(RCC_DIR):RCC_DIR = .
+isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/
+isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc
+
+resource_combine {
+ rcc.CONFIG += combine
+ rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_combined$${first(QMAKE_EXT_CPP)}
+} else {
+ rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+}
+!contains(QMAKE_RESOURCE_FLAGS, -root):!isEmpty(QMAKE_RESOURCE_ROOT):QMAKE_RESOURCE_FLAGS += -root $$QMAKE_RESOURCE_ROOT
+!contains(QMAKE_RESOURCE_FLAGS, -name) {
+ resource_combine {
+ isEmpty(QMAKE_RESOURCE_NAME):!isEmpty(TARGET):QMAKE_RESOURCE_NAME = $$TARGET
+ !isEmpty(QMAKE_RESOURCE_NAME):QMAKE_RESOURCE_FLAGS += -name $$QMAKE_RESOURCE_NAME
+ } else {
+ QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
+ }
+}
+rcc.commands = "$$QMAKE_RCC" $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}" -o "${QMAKE_FILE_OUT}"
+rcc.depend_command = "$$QMAKE_RCC" -list $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}"
+rcc.input = RESOURCES
+rcc.variable_out = SOURCES
+rcc.name = RCC ${QMAKE_FILE_IN}
+silent:rcc.commands = @echo rcc "${QMAKE_FILE_IN}" && $$rcc.commands
+QMAKE_EXTRA_COMPILERS += rcc
diff --git a/mkspecs/features/shared.prf b/mkspecs/features/shared.prf
new file mode 100644
index 0000000..86efd8e
--- /dev/null
+++ b/mkspecs/features/shared.prf
@@ -0,0 +1,7 @@
+CONFIG -= static
+contains(TEMPLATE, ".*lib"): {
+ CONFIG += dll
+ CONFIG -= staticlib
+ win32:QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
+}
+!static_and_shared:fix_output_dirs:fixExclusiveOutputDirs(shared, static)
diff --git a/mkspecs/features/silent.prf b/mkspecs/features/silent.prf
new file mode 100644
index 0000000..66b4bb7
--- /dev/null
+++ b/mkspecs/features/silent.prf
@@ -0,0 +1,6 @@
+!macx-xcode {
+ QMAKE_CC = @echo compiling $< && $$QMAKE_CC
+ QMAKE_CXX = @echo compiling $< && $$QMAKE_CXX
+ QMAKE_LINK = @echo linking $@ && $$QMAKE_LINK
+ QMAKE_LINK_SHLIB = @echo linking $@ && $$QMAKE_LINK_SHLIB
+}
diff --git a/mkspecs/features/static.prf b/mkspecs/features/static.prf
new file mode 100644
index 0000000..6e2b54f
--- /dev/null
+++ b/mkspecs/features/static.prf
@@ -0,0 +1,9 @@
+CONFIG -= shared dll
+contains(TEMPLATE, ".*lib"):{
+ CONFIG += staticlib
+ unix {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_STATIC_LIB
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB
+ }
+}
+!static_and_shared:fix_output_dirs:fixExclusiveOutputDirs(static, shared)
diff --git a/mkspecs/features/static_and_shared.prf b/mkspecs/features/static_and_shared.prf
new file mode 100644
index 0000000..f586bdd
--- /dev/null
+++ b/mkspecs/features/static_and_shared.prf
@@ -0,0 +1,3 @@
+!contains(TEMPLATE, subdirs):!macx-xcode {
+ addExclusiveBuilds(static, Static, shared, Shared)
+}
diff --git a/mkspecs/features/staticlib.prf b/mkspecs/features/staticlib.prf
new file mode 100644
index 0000000..4884964
--- /dev/null
+++ b/mkspecs/features/staticlib.prf
@@ -0,0 +1 @@
+CONFIG += static
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
new file mode 100644
index 0000000..885fad7
--- /dev/null
+++ b/mkspecs/features/uic.prf
@@ -0,0 +1,111 @@
+
+isEmpty(QMAKE_UIC3) {
+ win32:QMAKE_UIC3 = $$[QT_INSTALL_BINS]\uic3.exe
+ else:QMAKE_UIC3 = $$[QT_INSTALL_BINS]/uic3
+}
+
+isEmpty(QMAKE_UIC) {
+ win32:QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
+ else:QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+}
+
+isEmpty(UI_DIR):UI_DIR = .
+isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR
+isEmpty(UI_HEADERS_DIR):UI_HEADERS_DIR = $$UI_DIR
+isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
+
+# Allow FORMS3 to contain old UIC3 forms, while FORMS contains new
+# UIC files in the same project. However, if CONFIG+=uic3 and no
+# FORMS3 is defined, FORMS may only contain old UIC3 files.
+
+!uic3|!isEmpty(FORMS3) {
+ # If we have CONFIG+=uic3 and no FORMS3, then don't do this step,
+ # as UIC3 files don't need a ui_<formname>.h file
+
+ uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}"
+ uic.output = $$UI_HEADERS_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+ uic.input = FORMS
+ uic.variable_out = GENERATED_FILES
+ uic.CONFIG += no_link target_predeps
+ uic.name = UIC ${QMAKE_FILE_IN}
+ silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
+ QMAKE_EXTRA_COMPILERS += uic
+ INCREDIBUILD_XGE += uic
+}
+
+INCLUDEPATH += $$UI_HEADERS_DIR
+
+uic3 {
+ isEmpty(FORMS3) {
+ UIC3_FORMS = FORMS
+ !build_pass:message("Project contains CONFIG+=uic3, but no files in FORMS3; .ui files in FORMS treated as UIC3 form files.")
+ } else {
+ UIC3_FORMS = FORMS3
+ }
+
+ uic3_decl.commands = $$QMAKE_UIC3 ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ uic3_decl.dependency_type = TYPE_UI
+ uic3_decl.output = $$UI_HEADERS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+ uic3_decl.input = $$UIC3_FORMS
+ uic3_decl.CONFIG += no_link
+ uic3_decl.variable_out = GENERATED_FILES UIC3_HEADERS
+ uic3_decl.name = UIC3 Decl ${QMAKE_FILE_IN}
+ silent:uic3_decl.commands = @echo uic3 ${QMAKE_FILE_IN} && $$uic3_decl.commands
+ QMAKE_EXTRA_COMPILERS += uic3_decl
+
+ uic3_impl.commands = $$QMAKE_UIC3 -impl ${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ uic3_impl.dependency_type = TYPE_UI
+ uic3_impl.output = $$UI_SOURCES_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+ uic3_impl.depends = $$UI_HEADERS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+ uic3_impl.input = $$UIC3_FORMS
+ uic3_impl.variable_out = GENERATED_SOURCES
+ uic3_impl.name = UIC3 Impl ${QMAKE_FILE_IN}
+ silent:uic3_impl.commands = @echo uic3 -impl ${QMAKE_FILE_IN} && $$uic3_impl.commands
+ QMAKE_EXTRA_COMPILERS += uic3_impl
+
+ ### add a moc step
+ load(moc)
+ uic3_moc.commands = $$moc_header.commands
+ uic3_moc.output = $$moc_header.output
+ uic3_moc.depends = $$UI_HEADERS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+ uic3_moc.input = UIC3_HEADERS
+ uic3_moc.variable_out = GENERATED_SOURCES
+ uic3_moc.name = $$moc_header.name
+ QMAKE_EXTRA_COMPILERS += uic3_moc
+}
+
+defineReplace(imageCollectionCmd) {
+ unset(EMBEDDED_IMAGES)
+ RET =
+ for(image, $$list($$split(1))) {
+ EMBEDDED_IMAGES += $$image
+ count(EMBEDDED_IMAGES, 5) {
+ isEmpty(RET): RET += echo $$EMBEDDED_IMAGES > images.tmp $$escape_expand(\n\t)
+ else: RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\n\t)
+ unset(EMBEDDED_IMAGES)
+ }
+ }
+ !isEmpty(EMBEDDED_IMAGES):RET += echo $$EMBEDDED_IMAGES >> images.tmp $$escape_expand(\n\t)
+ !isEmpty(RET) {
+ RET += $$QMAKE_UIC3 -embed $$TARGET -f images.tmp -o $$2 $$escape_expand(\n\t)
+ return($$RET)
+ }
+ return($$QMAKE_UIC3 -embed $$TARGET $$1 -o $$2)
+}
+
+image_collection.output = qmake_image_collection$${first(QMAKE_EXT_CPP)}
+image_collection.variable_out = SOURCES
+image_collection.input = IMAGES
+image_collection.CONFIG += combine
+image_collection.name = UIC3 Image collection in ${QMAKE_FILE_OUT}
+!win32 {
+ image_collection.commands = $$QMAKE_UIC3 -embed $$TARGET ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ silent:image_collection.commands = @echo uic3 -embed ${QMAKE_FILE_IN} && $$image_collection.commands
+} else {
+ image_collection.commands = ${QMAKE_FUNC_imageCollectionCmd}
+ silent:image_collection.commands = @echo uic3 -embed $$TARGET -f images.tmp && $image_collection.commands
+}
+QMAKE_EXTRA_COMPILERS += image_collection
+
+
diff --git a/mkspecs/features/uitools.prf b/mkspecs/features/uitools.prf
new file mode 100644
index 0000000..6eba066
--- /dev/null
+++ b/mkspecs/features/uitools.prf
@@ -0,0 +1,12 @@
+QT += xml
+qt:load(qt)
+
+# Include the correct version of the UiLoader library
+QTUITOOLS_LINKAGE = -lQtUiTools
+CONFIG(debug, debug|release) {
+ mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug
+ win32: QTUITOOLS_LINKAGE = -lQtUiToolsd
+}
+LIBS += $$QTUITOOLS_LINKAGE
+
+INCLUDEPATH = $$QMAKE_INCDIR_QT/QtUiTools $$INCLUDEPATH
diff --git a/mkspecs/features/unix/bsymbolic_functions.prf b/mkspecs/features/unix/bsymbolic_functions.prf
new file mode 100644
index 0000000..5a60463
--- /dev/null
+++ b/mkspecs/features/unix/bsymbolic_functions.prf
@@ -0,0 +1,6 @@
+
+!staticlib:!static:contains(TEMPLATE, lib) {
+ QMAKE_LFLAGS_SHLIB += $$QMAKE_LFLAGS_BSYMBOLIC_FUNC
+
+ !isEmpty(QMAKE_DYNAMIC_LIST_FILE):QMAKE_LFLAGS_SHLIB += $$QMAKE_LFLAGS_DYNAMIC_LIST$$QMAKE_DYNAMIC_LIST_FILE
+}
diff --git a/mkspecs/features/unix/dylib.prf b/mkspecs/features/unix/dylib.prf
new file mode 100644
index 0000000..1268fae
--- /dev/null
+++ b/mkspecs/features/unix/dylib.prf
@@ -0,0 +1 @@
+LIBS += $$QMAKE_LIBS_DYNLOAD
diff --git a/mkspecs/features/unix/hide_symbols.prf b/mkspecs/features/unix/hide_symbols.prf
new file mode 100644
index 0000000..4af99c2
--- /dev/null
+++ b/mkspecs/features/unix/hide_symbols.prf
@@ -0,0 +1,4 @@
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_HIDESYMS
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_HIDESYMS
diff --git a/mkspecs/features/unix/largefile.prf b/mkspecs/features/unix/largefile.prf
new file mode 100644
index 0000000..104d675
--- /dev/null
+++ b/mkspecs/features/unix/largefile.prf
@@ -0,0 +1,2 @@
+DEFINES += _LARGEFILE64_SOURCE _LARGEFILE_SOURCE
+
diff --git a/mkspecs/features/unix/opengl.prf b/mkspecs/features/unix/opengl.prf
new file mode 100644
index 0000000..231d0aa
--- /dev/null
+++ b/mkspecs/features/unix/opengl.prf
@@ -0,0 +1,4 @@
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+!isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL
+target_qt:LIBS += $$QMAKE_LIBS_OPENGL_QT
+else:LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf
new file mode 100644
index 0000000..0c95baf
--- /dev/null
+++ b/mkspecs/features/unix/separate_debug_info.prf
@@ -0,0 +1,17 @@
+
+!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {
+ QMAKE_SEPARATE_DEBUG_INFO = (test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY --only-keep-debug \"\$\$targ\" \"\$\$targ.debug\" && $$QMAKE_OBJCOPY --strip-debug \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.debug\" \"\$\$targ\" && chmod -x \"\$\$targ.debug\" ) ;
+ QMAKE_INSTALL_SEPARATE_DEBUG_INFO = test -z "$(DESTDIR)" || cd \"$(DESTDIR)\" ; $(INSTALL_FILE) `basename $(TARGET)`.debug $(INSTALL_ROOT)/\$\$target_path/
+
+ QMAKE_POST_LINK = $$QMAKE_SEPARATE_DEBUG_INFO $$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
+
+ isEmpty(DESTDIR) {
+ target.targets += "`basename $(TARGET)`.debug"
+ QMAKE_DISTCLEAN += "`basename $(TARGET)`.debug"
+ } else {
+ target.targets += "$(DESTDIR)/`basename $(TARGET)`.debug"
+ QMAKE_DISTCLEAN += "$(DESTDIR)/`basename $(TARGET)`.debug"
+ }
+}
+
diff --git a/mkspecs/features/unix/thread.prf b/mkspecs/features/unix/thread.prf
new file mode 100644
index 0000000..d6df7b6
--- /dev/null
+++ b/mkspecs/features/unix/thread.prf
@@ -0,0 +1,14 @@
+!isEmpty(QMAKE_CFLAGS_THREAD) {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_THREAD
+ QMAKE_EXPORT_CFLAGS += $$QMAKE_CFLAGS_THREAD
+}
+!isEmpty(QMAKE_CXXFLAGS_THREAD) {
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_THREAD
+ QMAKE_EXPORT_CXXFLAGS += $$QMAKE_CXXFLAGS_THREAD
+}
+INCLUDEPATH += $$QMAKE_INCDIR_THREAD
+LIBS += $$QMAKE_LIBS_THREAD
+!isEmpty(QMAKE_LFLAGS_THREAD):QMAKE_LFLAGS += $$QMAKE_LFLAGS_THREAD
+!isEmpty(QMAKE_CC_THREAD):QMAKE_CC = $$QMAKE_CC_THREAD
+!isEmpty(QMAKE_CXX_THREAD):QMAKE_CXX = $$QMAKE_CXX_THREAD
+!isEmpty(QMAKE_LINK_THREAD):QMAKE_LINK = $$QMAKE_LINK_THREAD
diff --git a/mkspecs/features/unix/x11.prf b/mkspecs/features/unix/x11.prf
new file mode 100644
index 0000000..404ce08
--- /dev/null
+++ b/mkspecs/features/unix/x11.prf
@@ -0,0 +1 @@
+CONFIG *= x11lib x11inc
diff --git a/mkspecs/features/unix/x11inc.prf b/mkspecs/features/unix/x11inc.prf
new file mode 100644
index 0000000..7e11b5b
--- /dev/null
+++ b/mkspecs/features/unix/x11inc.prf
@@ -0,0 +1,3 @@
+INCLUDEPATH += $$QMAKE_INCDIR_X11
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_X11
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_X11
diff --git a/mkspecs/features/unix/x11lib.prf b/mkspecs/features/unix/x11lib.prf
new file mode 100644
index 0000000..521518a
--- /dev/null
+++ b/mkspecs/features/unix/x11lib.prf
@@ -0,0 +1,2 @@
+!isEmpty(QMAKE_LIBDIR_X11):QMAKE_LIBDIR += $$QMAKE_LIBDIR_X11
+LIBS += $$QMAKE_LIBS_X11
diff --git a/mkspecs/features/unix/x11sm.prf b/mkspecs/features/unix/x11sm.prf
new file mode 100644
index 0000000..b455b01
--- /dev/null
+++ b/mkspecs/features/unix/x11sm.prf
@@ -0,0 +1,2 @@
+!isEmpty(QMAKE_LIBDIR_X11):QMAKE_LIBDIR += $$QMAKE_LIBDIR_X11
+LIBS += $$QMAKE_LIBS_X11SM
diff --git a/mkspecs/features/use_c_linker.prf b/mkspecs/features/use_c_linker.prf
new file mode 100644
index 0000000..e07ce6a
--- /dev/null
+++ b/mkspecs/features/use_c_linker.prf
@@ -0,0 +1,5 @@
+!isEmpty(QMAKE_LINK_C):QMAKE_LINK = $$QMAKE_LINK_C
+!isEmpty(QMAKE_LINK_C_SHLIB) {
+ !isEmpty(QMAKE_LINK_SHLIB_CMD):QMAKE_LINK_SHLIB_CMD ~= s/^$$re_escape($$QMAKE_LINK_SHLIB)$/$$QMAKE_LINK_C_SHLIB/
+ QMAKE_LINK_SHLIB = $$QMAKE_LINK_C_SHLIB
+}
diff --git a/mkspecs/features/warn_off.prf b/mkspecs/features/warn_off.prf
new file mode 100644
index 0000000..e37979c
--- /dev/null
+++ b/mkspecs/features/warn_off.prf
@@ -0,0 +1,4 @@
+CONFIG -= warn_on
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_OFF
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF \ No newline at end of file
diff --git a/mkspecs/features/warn_on.prf b/mkspecs/features/warn_on.prf
new file mode 100644
index 0000000..7e78a8e
--- /dev/null
+++ b/mkspecs/features/warn_on.prf
@@ -0,0 +1,5 @@
+CONFIG -= warn_off
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_ON
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_ON
+
diff --git a/mkspecs/features/win32/console.prf b/mkspecs/features/win32/console.prf
new file mode 100644
index 0000000..b34e1c6
--- /dev/null
+++ b/mkspecs/features/win32/console.prf
@@ -0,0 +1,2 @@
+CONFIG -= windows
+contains(TEMPLATE, ".*app") : QMAKE_LFLAGS += $$QMAKE_LFLAGS_CONSOLE
diff --git a/mkspecs/features/win32/default_post.prf b/mkspecs/features/win32/default_post.prf
new file mode 100644
index 0000000..a1d8b52
--- /dev/null
+++ b/mkspecs/features/win32/default_post.prf
@@ -0,0 +1,11 @@
+!isEmpty(CE_ARCH) {
+ QMAKESPEC_DIR = $$QMAKESPEC
+ exists($$QMAKESPEC_DIR/default_post.prf) {
+ isEmpty(QMAKESPEC_DIR):QMAKESPEC_DIR = $$QMAKESPEC_ORIGINAL
+ !isEmpty(QMAKESPEC_DIR):load($$QMAKESPEC_DIR/default_post.prf)
+ }
+}
+
+# Now load the global default_post
+load(default_post)
+
diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf
new file mode 100644
index 0000000..6789174
--- /dev/null
+++ b/mkspecs/features/win32/default_pre.prf
@@ -0,0 +1,3 @@
+CONFIG = rtti_off exceptions_off stl_off incremental_off thread_off windows $$CONFIG
+load(default_pre)
+
diff --git a/mkspecs/features/win32/dumpcpp.prf b/mkspecs/features/win32/dumpcpp.prf
new file mode 100644
index 0000000..1963799
--- /dev/null
+++ b/mkspecs/features/win32/dumpcpp.prf
@@ -0,0 +1,11 @@
+isEmpty(QMAKE_DUMPCPP_NAME) {
+ QMAKE_DUMPCPP_NAME = make_dumpcpp
+}
+
+# auto depend on dumpcpp
+!contains(TARGET, dumpcpp) {
+ isEmpty(QMAKE_DUMPCPP_SRC): QMAKE_DUMPCPP_SRC = "$(QTDIR)/tools/activeqt/dumpcpp"
+ make_dumpcpp.commands = (cd $$QMAKE_DUMPCPP_SRC && $(QMAKE) && $(MAKE))
+ QMAKE_EXTRA_TARGETS += $$QMAKE_DUMPCPP_NAME
+}
+
diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf
new file mode 100644
index 0000000..90d9a2b
--- /dev/null
+++ b/mkspecs/features/win32/embed_manifest_dll.prf
@@ -0,0 +1,11 @@
+!if(plugin:no_plugin_manifest):if(win32-msvc2005|win32-msvc2008):!static:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "lib") {
+ NOPATH_TARGET = $$TARGET
+ NOPATH_TARGET ~= s,\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted)
+ NOPATH_TARGET ~= s,\\,/,g # Change to single type separators
+ NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
+ QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${OBJECTS_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
+ QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\" -outputresource:$(DESTDIR_TARGET);2$$escape_expand(\n\t))
+ QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
+ QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
+}
diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
new file mode 100644
index 0000000..e1747f1
--- /dev/null
+++ b/mkspecs/features/win32/embed_manifest_exe.prf
@@ -0,0 +1,11 @@
+if(win32-msvc2005|win32-msvc2008):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") {
+ NOPATH_TARGET = $$TARGET
+ NOPATH_TARGET ~= s,\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted)
+ NOPATH_TARGET ~= s,\\,/,g # Change to single type separators
+ NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
+ QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${OBJECTS_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
+ QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\" -outputresource:$(DESTDIR_TARGET);1$$escape_expand(\n\t))
+ QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
+ QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
+}
diff --git a/mkspecs/features/win32/exceptions.prf b/mkspecs/features/win32/exceptions.prf
new file mode 100644
index 0000000..7866659
--- /dev/null
+++ b/mkspecs/features/win32/exceptions.prf
@@ -0,0 +1,5 @@
+CONFIG -= exceptions_off
+QMAKE_CFLAGS *= $$QMAKE_CFLAGS_EXCEPTIONS_ON
+QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_EXCEPTIONS_ON
+QMAKE_LFLAGS *= $$QMAKE_LFLAGS_EXCEPTIONS_ON
+
diff --git a/mkspecs/features/win32/exceptions_off.prf b/mkspecs/features/win32/exceptions_off.prf
new file mode 100644
index 0000000..9de53d3
--- /dev/null
+++ b/mkspecs/features/win32/exceptions_off.prf
@@ -0,0 +1,5 @@
+CONFIG -= exceptions
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_EXCEPTIONS_OFF
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXCEPTIONS_OFF
+
diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
new file mode 100644
index 0000000..30af2a3
--- /dev/null
+++ b/mkspecs/features/win32/opengl.prf
@@ -0,0 +1,3 @@
+QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
+
diff --git a/mkspecs/features/win32/qaxcontainer.prf b/mkspecs/features/win32/qaxcontainer.prf
new file mode 100644
index 0000000..49edb2a
--- /dev/null
+++ b/mkspecs/features/win32/qaxcontainer.prf
@@ -0,0 +1,34 @@
+!debug_and_release|build_pass {
+ CONFIG(debug, debug|release) {
+ LIBS += -lQAxContainerd
+ } else {
+ LIBS += -lQAxContainer
+ }
+} else {
+ LIBS += -lQAxContainer
+}
+
+isEmpty(QMAKE_DUMPCPP) {
+ win32:QMAKE_DUMPCPP = $$[QT_INSTALL_BINS]\dumpcpp.exe
+}
+
+dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
+qaxcontainer_compat: dumpcpp_decl.commands += -compat
+dumpcpp_decl.output = ${QMAKE_FILE_BASE}.h
+dumpcpp_decl.input = TYPELIBS
+dumpcpp_decl.variable_out = HEADERS
+dumpcpp_decl.name = DUMP
+dumpcpp_decl.CONFIG += no_link
+dumpcpp_decl.depends = $$QMAKE_DUMPCPP
+
+QMAKE_EXTRA_COMPILERS += dumpcpp_decl
+
+
+dumpcpp_impl.commands = $$QMAKE_DUMPCPP -donothing
+dumpcpp_impl.output = ${QMAKE_FILE_BASE}.cpp
+dumpcpp_impl.input = TYPELIBS
+dumpcpp_impl.variable_out = SOURCES
+dumpcpp_impl.name = CPP
+dumpcpp_impl.depends = $$QMAKE_DUMPCPP ${QMAKE_FILE_BASE}.h
+
+QMAKE_EXTRA_COMPILERS += dumpcpp_impl
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
new file mode 100644
index 0000000..a18c421
--- /dev/null
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -0,0 +1,64 @@
+build_pass:console: {
+ warning("QAxServer applications cannot be console applications.")
+ warning("Remove 'console' from your CONFIG.")
+}
+
+ACTIVEQT_VERSION = $$VERSION
+isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0
+
+DEFINES += QAXSERVER
+
+ACTIVEQT_IDE = makefile
+equals(TEMPLATE_PREFIX, "vc"):ACTIVEQT_IDE = VisualStudio
+equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
+equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
+
+equals(ACTIVEQT_IDE, "VisualStudio") {
+ ACTIVEQT_IDC = $${QMAKE_IDC}
+ ACTIVEQT_IDL = $${QMAKE_IDL}
+ ACTIVEQT_TARGET = "$(TargetPath)"
+ win32-msvc {
+ ACTIVEQT_NEWLINE = $$escape_expand(\t)
+ ACTIVEQT_OUTPUT = $(IntDir)/$${TARGET}
+ } else {
+ ACTIVEQT_NEWLINE = $$escape_expand(\n\t)
+ ACTIVEQT_OUTPUT = $(IntDir)$${TARGET}
+ }
+ ACTIVEQT_TLBOUT = "$(TargetDir)/$${TARGET}.tlb"
+ GENERATED += $${OBJECTS_DIR}/$${TARGET}.idl $${ACTIVEQT_TLBOUT}
+}
+equals(ACTIVEQT_IDE, "makefile") {
+ ACTIVEQT_IDC = -$(IDC)
+ ACTIVEQT_IDL = -$(IDL)
+ ACTIVEQT_NEWLINE = $$escape_expand(\n\t)
+ ACTIVEQT_TARGET = $(DESTDIR_TARGET)
+ ACTIVEQT_OUTPUT = $(OBJECTS_DIR)/$${TARGET}
+ isEmpty(DESTDIR) {
+ ACTIVEQT_TLBOUT = $${TARGET}.tlb
+ } else {
+ ACTIVEQT_TLBOUT = $${DESTDIR}/$${TARGET}.tlb
+ }
+}
+
+!qaxserver_no_postlink {
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += $$quote($$ACTIVEQT_NEWLINE)
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /idl $${ACTIVEQT_OUTPUT}.idl -version $${ACTIVEQT_VERSION}$${ACTIVEQT_NEWLINE})
+ !isEmpty(RC_FILE) {
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDL "$${ACTIVEQT_OUTPUT}.idl" /nologo /tlb "$${ACTIVEQT_OUTPUT}.tlb"$$ACTIVEQT_NEWLINE)
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /tlb $${ACTIVEQT_OUTPUT}.tlb$$ACTIVEQT_NEWLINE)
+ } else {
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDL "$${ACTIVEQT_OUTPUT}.idl" /nologo /tlb "$${ACTIVEQT_TLBOUT}"$$ACTIVEQT_NEWLINE)
+ message("No rc-file linked into project; type library will be a separate file.")
+ }
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /regserver)
+ QMAKE_CLEAN += $${ACTIVEQT_OUTPUT}.idl $${ACTIVEQT_OUTPUT}.tlb
+}
+
+qt:!target_qt {
+ CONFIG(debug, debug|release) {
+ QMAKE_LIBS_QT_ENTRY = -lQAxServerd
+ } else {
+ QMAKE_LIBS_QT_ENTRY = -lQAxServer
+ }
+ dll:QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
+}
diff --git a/mkspecs/features/win32/qt_dll.prf b/mkspecs/features/win32/qt_dll.prf
new file mode 100644
index 0000000..f03c0c0
--- /dev/null
+++ b/mkspecs/features/win32/qt_dll.prf
@@ -0,0 +1 @@
+CONFIG *= qt
diff --git a/mkspecs/features/win32/rtti.prf b/mkspecs/features/win32/rtti.prf
new file mode 100644
index 0000000..6d720d2
--- /dev/null
+++ b/mkspecs/features/win32/rtti.prf
@@ -0,0 +1,3 @@
+CONFIG -= rtti_off
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_RTTI_ON
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RTTI_ON
diff --git a/mkspecs/features/win32/rtti_off.prf b/mkspecs/features/win32/rtti_off.prf
new file mode 100644
index 0000000..8f175de
--- /dev/null
+++ b/mkspecs/features/win32/rtti_off.prf
@@ -0,0 +1,3 @@
+CONFIG -= rtti
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_RTTI_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RTTI_OFF
diff --git a/mkspecs/features/win32/stl.prf b/mkspecs/features/win32/stl.prf
new file mode 100644
index 0000000..caf30ef
--- /dev/null
+++ b/mkspecs/features/win32/stl.prf
@@ -0,0 +1,3 @@
+CONFIG -= stl_off
+QMAKE_CFLAGS *= $$QMAKE_CFLAGS_STL_ON
+QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_STL_ON
diff --git a/mkspecs/features/win32/stl_off.prf b/mkspecs/features/win32/stl_off.prf
new file mode 100644
index 0000000..10198c7
--- /dev/null
+++ b/mkspecs/features/win32/stl_off.prf
@@ -0,0 +1,3 @@
+CONFIG -= stl
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_STL_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STL_OFF
diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf
new file mode 100644
index 0000000..aa844d2
--- /dev/null
+++ b/mkspecs/features/win32/thread.prf
@@ -0,0 +1,30 @@
+CONFIG -= thread_off
+qt {
+ target_qt:PRL_EXPORT_DEFINES += QT_THREAD_SUPPORT
+ else:DEFINES += QT_THREAD_SUPPORT
+}
+
+# #### These need to go
+debug {
+ contains(DEFINES, QT_DLL) {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLLDBG
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLLDBG
+ } else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DBG
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DBG
+ }
+} else {
+ contains(DEFINES, QT_DLL) {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLL
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLL
+ } else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT
+ }
+}
+
+win32-msvc|win32-msvc.net {
+ !contains(DEFINES, QT_DLL):!target_qt:!isEqual(TARGET, qtmain):QMAKE_LFLAGS += /NODEFAULTLIB:"libc"
+}
+
+QMAKE_LIBS += $$QMAKE_LIBS_RTMT
diff --git a/mkspecs/features/win32/thread_off.prf b/mkspecs/features/win32/thread_off.prf
new file mode 100644
index 0000000..436a2c8
--- /dev/null
+++ b/mkspecs/features/win32/thread_off.prf
@@ -0,0 +1,2 @@
+CONFIG -= thread
+QMAKE_LIBS += $$QMAKE_LIBS_RT
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
new file mode 100644
index 0000000..f037c1a
--- /dev/null
+++ b/mkspecs/features/win32/windows.prf
@@ -0,0 +1,15 @@
+CONFIG -= console
+contains(TEMPLATE, ".*app"){
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
+ win32-g++:DEFINES += QT_NEEDS_QMAIN
+ win32-borland:DEFINES += QT_NEEDS_QMAIN
+
+ qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
+ isEqual(entryLib, -lqtmain): {
+ CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}d
+ else: QMAKE_LIBS += $${entryLib}
+ } else {
+ QMAKE_LIBS += $${entryLib}
+ }
+ }
+}
diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf
new file mode 100644
index 0000000..c078e09
--- /dev/null
+++ b/mkspecs/features/yacc.prf
@@ -0,0 +1,42 @@
+#
+# Yacc extra-compiler for handling files specified in the YACCSOURCES variable
+#
+
+{
+ yacc_decl.name = Yacc header
+ yacc_decl.input = YACCSOURCES
+ yacc_decl.variable_out = GENERATED_FILES
+
+
+ isEmpty(QMAKE_YACCFLAGS_MANGLE) {
+ QMAKE_YACCFLAGS_MANGLE = -p ${QMAKE_FILE_BASE}
+ QMAKE_YACC_HEADER = y.tab.h
+ QMAKE_YACC_SOURCE = y.tab.c
+ } else {
+ QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/${QMAKE_FILE_BASE}/g #backwards compat
+ QMAKE_YACC_HEADER ~= s/\\$base/${QMAKE_FILE_BASE}/g
+ QMAKE_YACC_SOURCE ~= s/\\$base/${QMAKE_FILE_BASE}/g
+ }
+ QMAKE_YACCDECLFLAGS = $$QMAKE_YACCFLAGS
+ !yacc_no_name_mangle:QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
+
+ yacc_decl.commands = \
+ $$QMAKE_YACC $$QMAKE_YACCDECLFLAGS ${QMAKE_FILE_IN}$$escape_expand(\n\t) \
+ $$QMAKE_DEL_FILE $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t) \
+ $$QMAKE_MOVE $${QMAKE_YACC_HEADER} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)}$$escape_expand(\n\t) \
+ $$QMAKE_MOVE $${QMAKE_YACC_SOURCE} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)}$$escape_expand(\n\t)
+ yacc_decl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)}
+
+ silent:yacc_decl.commands = @echo Yacc ${QMAKE_FILE_IN} && $$yacc_decl.commands
+ QMAKE_EXTRA_COMPILERS += yacc_decl
+}
+
+{
+ yacc_impl.name = source for ${QMAKE_FILE_IN}
+ yacc_impl.input = YACCSOURCES
+ yacc_impl.variable_out = GENERATED_SOURCES
+ yacc_impl.commands = $$escape_expand(\n) # We don't want any commands where, but if command is empty no rules are created
+ yacc_impl.depends = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
+ yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}_yacc$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above
+ QMAKE_EXTRA_COMPILERS += yacc_impl
+}
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
new file mode 100644
index 0000000..acd2a6a
--- /dev/null
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -0,0 +1,52 @@
+#
+# qmake configuration for freebsd-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
+
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+# Addon software goes into /usr/local on the BSDs, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LFLAGS_THREAD = -pthread
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/g++.conf)
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
new file mode 100644
index 0000000..84915af
--- /dev/null
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if !defined(__DragonFly__) && (__FreeBSD_version < 400000)
+// FreeBSD 1.0 - 3.5.1
+# define QT_SOCKLEN_T int
+#else
+// FreeBSD 4.0 and better
+# define QT_SOCKLEN_T socklen_t
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+// Older FreeBSD versions may still use the a.out format instead of ELF.
+// From the FreeBSD man pages:
+// In previous implementations, it was necessary to prepend an
+// underscore to all external symbols in order to gain symbol
+// compatibility with object code compiled from the C language.
+// This is still the case when using the (obsolete) -aout option to
+// the C language compiler.
+#ifndef __ELF__
+#define QT_AOUT_UNDERSCORE
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/freebsd-g++34/qmake.conf b/mkspecs/freebsd-g++34/qmake.conf
new file mode 100644
index 0000000..9627b46
--- /dev/null
+++ b/mkspecs/freebsd-g++34/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for freebsd-g++34 (using g++34 from ports/lang/gcc34)
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc34
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
+
+QMAKE_CXX = g++34
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+# Addon software goes into /usr/local on the BSDs, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++34
+QMAKE_LINK_SHLIB = g++34
+QMAKE_LINK_C = gcc34
+QMAKE_LINK_C_SHLIB = gcc34
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/freebsd-g++34/qplatformdefs.h b/mkspecs/freebsd-g++34/qplatformdefs.h
new file mode 100644
index 0000000..516cc10
--- /dev/null
+++ b/mkspecs/freebsd-g++34/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../freebsd-g++/qplatformdefs.h"
diff --git a/mkspecs/freebsd-g++40/qmake.conf b/mkspecs/freebsd-g++40/qmake.conf
new file mode 100644
index 0000000..e3a3c86
--- /dev/null
+++ b/mkspecs/freebsd-g++40/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for freebsd-g++40 (using g++40 from ports/lang/gcc40)
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc40
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
+
+QMAKE_CXX = g++40
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+# Addon software goes into /usr/local on the BSDs, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++40
+QMAKE_LINK_SHLIB = g++40
+QMAKE_LINK_C = gcc40
+QMAKE_LINK_C_SHLIB = gcc40
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/freebsd-g++40/qplatformdefs.h b/mkspecs/freebsd-g++40/qplatformdefs.h
new file mode 100644
index 0000000..516cc10
--- /dev/null
+++ b/mkspecs/freebsd-g++40/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../freebsd-g++/qplatformdefs.h"
diff --git a/mkspecs/freebsd-icc/qmake.conf b/mkspecs/freebsd-icc/qmake.conf
new file mode 100644
index 0000000..60fa7ee
--- /dev/null
+++ b/mkspecs/freebsd-icc/qmake.conf
@@ -0,0 +1,109 @@
+#
+# qmake configuration for freebsd-icc
+#
+# Written for Intel C++ 7.1 and 8.0 on FreeBSD
+#
+# Note: Some of the remarks from the Intel compiler are disabled (even
+# with 'warn_on' specified):
+#
+# remark #171: invalid type conversion: "int" to "void *"
+# remark #193: zero used for undefined preprocessing identifier
+# remark #279: controlling expression is constant
+# remark #304: access control not specified ("public" by default)
+# remark #310: old-style parameter list (anachronism)
+# remark #383: value copied to temporary, reference to temporary used
+# remark #424: extra ";" ignored
+# remark #444: destructor for base class "Class" is not virtual
+# remark #488: template parameter "T" is not used in declaring the parameter
+# types of function template "function"
+# remark #810: conversion from "type1" to "type2" may loose significant bits
+# remark #858: type qualifier on return type is meaningless
+# remark #967: conversion from "type1" to "type2"; sizes do not match
+# remark #981: operands are evaluated in unspecified order
+# remark #1418: external definition with no prior declaration
+# remark #1419: external declaration in primary source file
+# warning #1476: field uses tail padding of a base class
+# warning #1477: GNU C++ compilers may use bit field padding
+# warning #1572: floating-point equality and inequality comparisons are unreliable
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = icc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -wd858,1572
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -w2 -wd171,193,279,304,310,383,424,444,488,810,967,981,1418,1419,1476,1477
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE =
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fpic
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE
+
+QMAKE_CXX = icpc
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+# Addon software goes into /usr/local on the BSDs, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = icpc
+QMAKE_LINK_SHLIB = icpc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname,
+QMAKE_LFLAGS_THREAD = -mt
+QMAKE_RPATH = -Qoption,ld,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/freebsd-icc/qplatformdefs.h b/mkspecs/freebsd-icc/qplatformdefs.h
new file mode 100644
index 0000000..516cc10
--- /dev/null
+++ b/mkspecs/freebsd-icc/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../freebsd-g++/qplatformdefs.h"
diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf
new file mode 100644
index 0000000..8757459
--- /dev/null
+++ b/mkspecs/hpux-acc-64/qmake.conf
@@ -0,0 +1,130 @@
+#
+# qmake configuration for hpux-n64
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads, therefore
+# we also need to redefine _HPUX_SOURCE.
+# From pthread(3t):
+# Some documentation will recommend the use of -D_REENTRANT for
+# compilation. While this also functions properly, it is considered
+# an obsolescent form.
+# See pthread(3t) for more details.
+#
+# From the "HP aC++ Online Programmer's Guide":
+# When +DA2.0W is specified:
+# * 64-bit SVR4 Executable and Linking Format (ELF) object files
+# are generated for PA-RISC 2.0.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# * The correct path for 64-bit system and language libraries is
+# selected.
+# When +DD32 is specified:
+# * The size of an int, long, or pointer data type is 32-bits.
+# The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is the default, currently equivalent to +DA1.1 architecture.
+# When +DD64 is specified:
+# * The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is currently equivalent to +DA2.OW architecture.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# Using +DS to Specify Instruction Scheduling:
+# * By default, the compiler performs scheduling tuned for the system
+# on which you are compiling, or, if specified, tuned for the setting
+# of the +DA option.
+#
+# From the online "C/HP-UX Reference Manual":
+# -Aa
+# Enables strict ANSI C compliance.
+# -Ae
+# Enables ANSI C compliance, HP value-added features (as described
+# for +e option), and _HPUX_SOURCE name space macro. It is equivalent
+# to -Aa +e -D_HPUX_SOURCE.
+# +e
+# Enables the following HP value added features while compiling in
+# ANSI C mode: sized enum, long long, long pointers, compiler supplied
+# defaults for missing arguments to intrinsic calls, and $ in identifier
+# HP C extensions.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __hpux __HP_aCC
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -Ae +DA2.0W -w
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = +O1
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = +Z
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt
+
+QMAKE_CXX = aCC
+QMAKE_CXXFLAGS = -AA +DA2.0W -w -D__STRICT_ANSI__ -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = +M
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64
+
+QMAKE_LINK = aCC
+QMAKE_LINK_SHLIB = aCC
+QMAKE_LFLAGS = -AA +DA2.0W -Wl,+s
+QMAKE_LFLAGS_RELEASE = -O
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+QMAKE_HPUX_SHLIB = 3
+QMAKE_EXTENSION_SHLIB = sl
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL -lXt
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h
new file mode 100644
index 0000000..81d3b2b
--- /dev/null
+++ b/mkspecs/hpux-acc-64/qplatformdefs.h
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <pthread.h>
+#include <sys/pstat.h>
+#define _REENTRANT
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf
new file mode 100644
index 0000000..d4d2c7d
--- /dev/null
+++ b/mkspecs/hpux-acc-o64/qmake.conf
@@ -0,0 +1,128 @@
+#
+# qmake configuration for hpux-o64
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads, therefore
+# we also need to redefine _HPUX_SOURCE.
+# From pthread(3t):
+# Some documentation will recommend the use of -D_REENTRANT for
+# compilation. While this also functions properly, it is considered
+# an obsolescent form.
+# See pthread(3t) for more details.
+#
+# From the "HP aC++ Online Programmer's Guide":
+# When +DA2.0W is specified:
+# * 64-bit SVR4 Executable and Linking Format (ELF) object files
+# are generated for PA-RISC 2.0.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# * The correct path for 64-bit system and language libraries is
+# selected.
+# When +DD32 is specified:
+# * The size of an int, long, or pointer data type is 32-bits.
+# The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is the default, currently equivalent to +DA1.1 architecture.
+# When +DD64 is specified:
+# * The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is currently equivalent to +DA2.OW architecture.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# Using +DS to Specify Instruction Scheduling:
+# * By default, the compiler performs scheduling tuned for the system
+# on which you are compiling, or, if specified, tuned for the setting
+# of the +DA option.
+#
+# From the online "C/HP-UX Reference Manual":
+# -Aa
+# Enables strict ANSI C compliance.
+# -Ae
+# Enables ANSI C compliance, HP value-added features (as described
+# for +e option), and _HPUX_SOURCE name space macro. It is equivalent
+# to -Aa +e -D_HPUX_SOURCE.
+# +e
+# Enables the following HP value added features while compiling in
+# ANSI C mode: sized enum, long long, long pointers, compiler supplied
+# defaults for missing arguments to intrinsic calls, and $ in identifier
+# HP C extensions.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -Ae +DA2.0 -w
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit
+QMAKE_CFLAGS_DEBUG = -y -g
+QMAKE_CFLAGS_SHLIB = +Z
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
+
+QMAKE_CXX = aCC
+QMAKE_CXXFLAGS = +DA2.0 -w -D__STRICT_ANSI__ -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = -g
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib
+
+QMAKE_LINK = aCC
+QMAKE_LINK_SHLIB = aCC
+QMAKE_LFLAGS = +DA2.0 -Wl,+s
+QMAKE_LFLAGS_RELEASE = -O
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -b
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+QMAKE_HPUX_SHLIB = 2
+QMAKE_EXTENSION_SHLIB = sl
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldld
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h
new file mode 100644
index 0000000..92ec532
--- /dev/null
+++ b/mkspecs/hpux-acc-o64/qplatformdefs.h
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dl.h>
+#define QT_HPUX_LD
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf
new file mode 100644
index 0000000..19ee00f
--- /dev/null
+++ b/mkspecs/hpux-acc/qmake.conf
@@ -0,0 +1,109 @@
+#
+# qmake configuration for hpux-acc
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads, therefore
+# we also need to redefine _HPUX_SOURCE. See pthread(3t) for more details.
+#
+# From the "HP aC++ Online Programmer's Guide":
+# Using +DS to Specify Instruction Scheduling:
+# * By default, the compiler performs scheduling tuned for the system
+# on which you are compiling, or, if specified, tuned for the setting
+# of the +DA option.
+#
+# From the online "C/HP-UX Reference Manual":
+# -Aa
+# Enables strict ANSI C compliance.
+# -Ae
+# Enables ANSI C compliance, HP value-added features (as described
+# for +e option), and _HPUX_SOURCE name space macro. It is equivalent
+# to -Aa +e -D_HPUX_SOURCE.
+# +e
+# Enables the following HP value added features while compiling in
+# ANSI C mode: sized enum, long long, long pointers, compiler supplied
+# defaults for missing arguments to intrinsic calls, and $ in identifier
+# HP C extensions.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __hpux __HP_aCC
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -Ae +DAportable -w
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = +O1
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = +Z
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt
+
+QMAKE_CXX = aCC
+QMAKE_CXXFLAGS = -AA +DAportable -w -D__STRICT_ANSI__ -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = +M
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib
+
+QMAKE_LINK = aCC
+QMAKE_LINK_SHLIB = aCC
+QMAKE_LFLAGS = -AA +DAportable -Wl,+s
+QMAKE_LFLAGS_RELEASE = -O
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+QMAKE_HPUX_SHLIB = 1
+QMAKE_EXTENSION_SHLIB = sl
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldld
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL -lXt
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h
new file mode 100644
index 0000000..7f17a4f
--- /dev/null
+++ b/mkspecs/hpux-acc/qplatformdefs.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <sys/pstat.h>
+#define _REENTRANT
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dl.h>
+#define QT_HPUX_LD
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher
+#if !defined(_XOPEN_UNIX)
+// HP-UX 9's select() didn't accept fd_set, yet.
+#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e))
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-g++-64/qmake.conf b/mkspecs/hpux-g++-64/qmake.conf
new file mode 100644
index 0000000..38595c9
--- /dev/null
+++ b/mkspecs/hpux-g++-64/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for hpux-g++-64
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads,
+# therefore we also need to redefine _HPUX_SOURCE.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = +DA2.0W
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR = /usr/lib/pa20_64
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = +DA2.0W -Wl,+s -lpthread
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -fPIC -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+QMAKE_HPUX_SHLIB = 3
+QMAKE_EXTENSION_SHLIB = sl
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldld
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..f601449
--- /dev/null
+++ b/mkspecs/hpux-g++-64/qplatformdefs.h
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#define _REENTRANT
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf
new file mode 100644
index 0000000..1ed2ee6
--- /dev/null
+++ b/mkspecs/hpux-g++/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for hpux-g++
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads,
+# therefore we also need to redefine _HPUX_SOURCE.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl plugin_no_soname
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -DGLU_VERSION_1_2
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 = /usr/lib/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib /usr/contrib/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -Wl,+s
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -fPIC -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+QMAKE_HPUX_SHLIB = 1
+QMAKE_EXTENSION_SHLIB = sl
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldld
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h
new file mode 100644
index 0000000..9e60682
--- /dev/null
+++ b/mkspecs/hpux-g++/qplatformdefs.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#define _REENTRANT // otherwise we don't get readdir_r, etc.
+#include <sys/pstat.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dl.h>
+#define QT_HPUX_LD
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher
+#if !defined(_XOPEN_UNIX)
+// HP-UX 9's select() didn't accept fd_set, yet.
+#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e))
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-acc-32/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf
new file mode 100644
index 0000000..00b400f
--- /dev/null
+++ b/mkspecs/hpuxi-acc-32/qmake.conf
@@ -0,0 +1,84 @@
+#
+# qmake configuration for hpuxi-acc-32
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release plugin_no_soname
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = lex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = +DSitanium -w
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = +O1
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = +Z
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt
+
+QMAKE_CXX = aCC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = +M
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/hpux32/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux32 /usr/contrib/X11R6/lib/hpux32
+
+QMAKE_LINK = aCC
+QMAKE_LINK_SHLIB = aCC
+QMAKE_LFLAGS = +DSitanium -Wl,+s
+QMAKE_LFLAGS_RELEASE = -O
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH =
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL -lXt
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h
new file mode 100644
index 0000000..f3bad56
--- /dev/null
+++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#define _INCLUDE_LONGLONG
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#define _REENTRANT
+#include <pthread.h>
+#include <sys/pstat.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dl.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf
new file mode 100644
index 0000000..feefd30
--- /dev/null
+++ b/mkspecs/hpuxi-acc-64/qmake.conf
@@ -0,0 +1,127 @@
+#
+# qmake configuration for hpuxi-acc-64
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads, therefore
+# we also need to redefine _HPUX_SOURCE.
+# From pthread(3t):
+# Some documentation will recommend the use of -D_REENTRANT for
+# compilation. While this also functions properly, it is considered
+# an obsolescent form.
+# See pthread(3t) for more details.
+#
+# From the "HP aC++ Online Programmer's Guide":
+# When +DA2.0W is specified:
+# * 64-bit SVR4 Executable and Linking Format (ELF) object files
+# are generated for PA-RISC 2.0.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# * The correct path for 64-bit system and language libraries is
+# selected.
+# When +DD32 is specified:
+# * The size of an int, long, or pointer data type is 32-bits.
+# The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is the default, currently equivalent to +DA1.1 architecture.
+# When +DD64 is specified:
+# * The size of an int data type is 32-bits. The size of a long or
+# pointer data type is 64-bits.
+# * This is currently equivalent to +DA2.OW architecture.
+# * The preprocessor predefined macro, __LP64__ is defined.
+# Using +DS to Specify Instruction Scheduling:
+# * By default, the compiler performs scheduling tuned for the system
+# on which you are compiling, or, if specified, tuned for the setting
+# of the +DA option.
+#
+# From the online "C/HP-UX Reference Manual":
+# -Aa
+# Enables strict ANSI C compliance.
+# -Ae
+# Enables ANSI C compliance, HP value-added features (as described
+# for +e option), and _HPUX_SOURCE name space macro. It is equivalent
+# to -Aa +e -D_HPUX_SOURCE.
+# +e
+# Enables the following HP value added features while compiling in
+# ANSI C mode: sized enum, long long, long pointers, compiler supplied
+# defaults for missing arguments to intrinsic calls, and $ in identifier
+# HP C extensions.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release plugin_no_soname
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = lex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = +DD64 +DSitanium -w
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = +O1
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = +Z
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt
+
+QMAKE_CXX = aCC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = +M
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64
+
+QMAKE_LINK = aCC
+QMAKE_LINK_SHLIB = aCC
+QMAKE_LFLAGS = +DD64 +DSitanium -Wl,+s
+QMAKE_LFLAGS_RELEASE = -O
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH =
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL -lXt
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h
new file mode 100644
index 0000000..f3bad56
--- /dev/null
+++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#define _INCLUDE_LONGLONG
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#define _REENTRANT
+#include <pthread.h>
+#include <sys/pstat.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dl.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-g++-64/qmake.conf b/mkspecs/hpuxi-g++-64/qmake.conf
new file mode 100644
index 0000000..e8fa053
--- /dev/null
+++ b/mkspecs/hpuxi-g++-64/qmake.conf
@@ -0,0 +1,95 @@
+#
+# qmake configuration for hpuxi-g++-64
+#
+# We define _POSIX_C_SOURCE to 199506L when using threads, therefore
+# we also need to redefine _HPUX_SOURCE.
+# From pthread(3t):
+# Some documentation will recommend the use of -D_REENTRANT for
+# compilation. While this also functions properly, it is considered
+# an obsolescent form.
+# See pthread(3t) for more details.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -mlp64
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR = /usr/lib/hpux64
+QMAKE_INCDIR_X11 = /usr/include/X11R6
+QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
+QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -mlp64 -Wl,+s
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -fPIC -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,+h,
+QMAKE_LFLAGS_THREAD = -lpthread
+QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
+QMAKE_RPATH = -Wl,+b,
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+QMAKE_LIBS_YACC = -ly
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..a1d0e86
--- /dev/null
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#define _REENTRANT
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf
new file mode 100644
index 0000000..f213f2d
--- /dev/null
+++ b/mkspecs/hurd-g++/qmake.conf
@@ -0,0 +1,89 @@
+#
+# qmake configuration for hurd-g++
+#
+# Submitted by uch@nop.or.jp as "gnu-g++".
+# Renamed to "hurd-g++" because people were confusing GNU/Hurd with GNU/Linux.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+QT += core gui
+CONFIG += qt warn_on release link_prl
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CXXFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -Wl,-rpath=/lib:/usr/X11R6/lib:$$[QT_INSTALL_LIBS]
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+
+QMAKE_LIBS = -lpthread # This is tricky but needed
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_QT_THREAD = -lqt-mt
+QMAKE_LIBS_THREAD =
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
new file mode 100644
index 0000000..b3720e8
--- /dev/null
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T socklen_t
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf
new file mode 100644
index 0000000..bf5febb
--- /dev/null
+++ b/mkspecs/irix-cc-64/qmake.conf
@@ -0,0 +1,119 @@
+#
+# qmake configuration for irix-cc-64
+#
+# From cc(1):
+# -64
+# Generates a 64-bit object. This defaults to -mips4 if -mips3 has
+# not been specified.
+# -LANG: ...
+# The language feature option group controls the source language
+# interpretation assumed by the compiler. The individual controls
+# in this group are as follows:
+# ansi-for-init-scope [ = ( ON|OFF ) ]
+# Enables or disables the ANSI scoping rules for for-init
+# declarations (the scope of the name declared extends to
+# the end of the for statement). This enables the behavior
+# that is required by the C++ standard. The default value
+# is OFF, which is the ARM behavior (the scope of the name
+# declared extends to the end of the block enclosing the for
+# statement).
+# bool [ = ( ON|OFF ) ]
+# Enables or disables the predefined bool data type, along
+# with the predefined values true and false. Use this option
+# only to suppress this type in old code that defines bool
+# itself. Because this option changes the mangling of function
+# names with bool parameters, all files comprising a program
+# should be compiled with consistent options.
+# Default is ON.
+# The _BOOL feature macro can be used in #ifdefs to do conditional
+# compilation based on whether or not this option is enabled.
+# std
+# Enables use of the standard C++ library and standard-
+# conforming iostream library. Specifying this flag also
+# triggers other standard-conforming behavior, such as the
+# new rules for the scope of for loop initializers.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __sgi __EDG
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -64 -signed -woff 1209,1355,1375,1424,3303
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -fullwarn
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -woff 1110,1174,3262
+QMAKE_CFLAGS_THREAD =
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = -64 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD =
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS = -64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lm
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = CC -ar -o
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
new file mode 100644
index 0000000..9bf7726
--- /dev/null
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+// Irix 6.5 and better
+#if defined(_SGIAPI)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf
new file mode 100644
index 0000000..99e8064
--- /dev/null
+++ b/mkspecs/irix-cc/qmake.conf
@@ -0,0 +1,119 @@
+#
+# qmake configuration for irix-cc
+#
+# From cc(1):
+# -n32
+# Generates a (new) 32-bit object. This defaults to -mips3 if
+# -mips4 has not been specified.
+# -LANG: ...
+# The language feature option group controls the source language
+# interpretation assumed by the compiler. The individual controls
+# in this group are as follows:
+# ansi-for-init-scope [ = ( ON|OFF ) ]
+# Enables or disables the ANSI scoping rules for for-init
+# declarations (the scope of the name declared extends to
+# the end of the for statement). This enables the behavior
+# that is required by the C++ standard. The default value
+# is OFF, which is the ARM behavior (the scope of the name
+# declared extends to the end of the block enclosing the for
+# statement).
+# bool [ = ( ON|OFF ) ]
+# Enables or disables the predefined bool data type, along
+# with the predefined values true and false. Use this option
+# only to suppress this type in old code that defines bool
+# itself. Because this option changes the mangling of function
+# names with bool parameters, all files comprising a program
+# should be compiled with consistent options.
+# Default is ON.
+# The _BOOL feature macro can be used in #ifdefs to do conditional
+# compilation based on whether or not this option is enabled.
+# std
+# Enables use of the standard C++ library and standard-
+# conforming iostream library. Specifying this flag also
+# triggers other standard-conforming behavior, such as the
+# new rules for the scope of for loop initializers.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __sgi __EDG
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -n32 -signed -woff 1209,1355,1375,1424,3303
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -fullwarn
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -woff 1110,1174,3262
+QMAKE_CFLAGS_THREAD =
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = -n32 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD =
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS = -n32
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lm
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = CC -ar -o
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
new file mode 100644
index 0000000..9bf7726
--- /dev/null
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+// Irix 6.5 and better
+#if defined(_SGIAPI)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-g++-64/qmake.conf b/mkspecs/irix-g++-64/qmake.conf
new file mode 100644
index 0000000..d614b9d
--- /dev/null
+++ b/mkspecs/irix-g++-64/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for irix-g++-64
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __sgi __GNUC__
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -mabi=64
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD =
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD =
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -mabi=64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS = -lC
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+# libGLU is using the SGI C++ library internally and this somehow clashes
+# with the GNU C++ library (similar name mangling and symbol names?)
+# so we add -lC so that the SGI C++ library is used first...
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = so_locations
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/irix-g++-64/qplatformdefs.h b/mkspecs/irix-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..9afa988
--- /dev/null
+++ b/mkspecs/irix-g++-64/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../irix-g++/qplatformdefs.h"
diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf
new file mode 100644
index 0000000..1f1df30
--- /dev/null
+++ b/mkspecs/irix-g++/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for irix-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+QMAKE_COMPILER_DEFINES += __sgi __GNUC__
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD =
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD =
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS = -lC
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+# libGLU is using the SGI C++ library internally and this somehow clashes
+# with the GNU C++ library (similar name mangling and symbol names?)
+# so we add -lC so that the SGI C++ library is used first...
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = so_locations
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
new file mode 100644
index 0000000..2b7d6ce
--- /dev/null
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI)
+#define QT_SIGNAL_ARGS int
+#else
+#define QT_SIGNAL_ARGS void
+#endif
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+// Irix 6.5 and better
+#if defined(_SGIAPI)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
+
diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf
new file mode 100644
index 0000000..633b738
--- /dev/null
+++ b/mkspecs/linux-cxx/qmake.conf
@@ -0,0 +1,81 @@
+#
+# qmake configuration for linux-cxx
+#
+# Written for Compaq C++ for GNU/Linux on Alpha
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = ccc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -w
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Olimit 1000
+
+QMAKE_CXX = cxx
+QMAKE_CXXFLAGS = -w
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = cxx
+QMAKE_LINK_SHLIB = cxx
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
new file mode 100644
index 0000000..289f083
--- /dev/null
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-ecc-64/qmake.conf b/mkspecs/linux-ecc-64/qmake.conf
new file mode 100644
index 0000000..359d44b
--- /dev/null
+++ b/mkspecs/linux-ecc-64/qmake.conf
@@ -0,0 +1,88 @@
+#
+# qmake configuration for linux-ecc-64
+#
+# Written for Intel C++ 7.1 and 8.0 for Linux
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = ecc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = ecpc
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = ecpc
+QMAKE_LINK_SHLIB = ecpc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Qoption,ld,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
new file mode 100644
index 0000000..289f083
--- /dev/null
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
new file mode 100644
index 0000000..44866cf
--- /dev/null
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -0,0 +1,16 @@
+#
+# qmake configuration for linux-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CFLAGS = -m32
+QMAKE_LFLAGS = -m32
+
+include(../common/g++.conf)
+include(../common/linux.conf)
+load(qt_config)
diff --git a/mkspecs/linux-g++-32/qplatformdefs.h b/mkspecs/linux-g++-32/qplatformdefs.h
new file mode 100644
index 0000000..16774ee
--- /dev/null
+++ b/mkspecs/linux-g++-32/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
new file mode 100644
index 0000000..4f8794f
--- /dev/null
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -0,0 +1,23 @@
+#
+# qmake configuration for linux-g++
+#
+# Written for GNU/Linux platforms that have both lib and lib64 directories,
+# like the AMD Opteron.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CFLAGS = -m64
+QMAKE_LFLAGS = -m64
+
+include(../common/g++.conf)
+include(../common/linux.conf)
+
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
+
+load(qt_config)
diff --git a/mkspecs/linux-g++-64/qplatformdefs.h b/mkspecs/linux-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..16774ee
--- /dev/null
+++ b/mkspecs/linux-g++-64/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
new file mode 100644
index 0000000..47784e2
--- /dev/null
+++ b/mkspecs/linux-g++/qmake.conf
@@ -0,0 +1,13 @@
+#
+# qmake configuration for linux-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/g++.conf)
+include(../common/linux.conf)
+load(qt_config)
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
new file mode 100644
index 0000000..288f9fd
--- /dev/null
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-icc-32/qmake.conf b/mkspecs/linux-icc-32/qmake.conf
new file mode 100644
index 0000000..35fbeb3
--- /dev/null
+++ b/mkspecs/linux-icc-32/qmake.conf
@@ -0,0 +1,10 @@
+#
+# qmake configuration for linux-icc-32
+#
+# Written for Intel C++ Compiler version 10.x for GNU/Linux
+#
+# This mkspec is intended for building IA-32 binaries on Intel 64 hosts.
+#
+
+# Use the linux-icc as the base for our configuration
+include(../linux-icc/qmake.conf)
diff --git a/mkspecs/linux-icc-32/qplatformdefs.h b/mkspecs/linux-icc-32/qplatformdefs.h
new file mode 100644
index 0000000..16774ee
--- /dev/null
+++ b/mkspecs/linux-icc-32/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-icc-64/qmake.conf b/mkspecs/linux-icc-64/qmake.conf
new file mode 100644
index 0000000..7962026
--- /dev/null
+++ b/mkspecs/linux-icc-64/qmake.conf
@@ -0,0 +1,16 @@
+#
+# qmake configuration for linux-icc-64
+#
+# Written for Intel C++ Compiler version 10.x for GNU/Linux
+#
+# This mkspec is intended for use on 64-bit hosts where libraries live
+# in "lib64" directories (instead of "lib").
+#
+
+# Use the linux-icc as the base for our configuration
+include(../linux-icc/qmake.conf)
+
+# Change the all LIBDIR variables to use lib64 instead of lib
+
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
diff --git a/mkspecs/linux-icc-64/qplatformdefs.h b/mkspecs/linux-icc-64/qplatformdefs.h
new file mode 100644
index 0000000..16774ee
--- /dev/null
+++ b/mkspecs/linux-icc-64/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
new file mode 100644
index 0000000..965de0c
--- /dev/null
+++ b/mkspecs/linux-icc/qmake.conf
@@ -0,0 +1,109 @@
+#
+# qmake configuration for linux-icc
+#
+# Written for Intel C++ Compiler versions 10.x for GNU/Linux
+#
+# Note: Some of the remarks from the Intel compiler are disabled (even
+# with 'warn_on' specified):
+#
+# warning #654: overloaded virtual function "T::f" is only partially overridden in class "U"
+# warning #1572: floating-point equality and inequality comparisons are unreliable
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = icc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -wd654,1572
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = icpc
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = icpc
+QMAKE_LINK_SHLIB = icpc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Qoption,ld,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+
+# pch support
+CONFIG += icc_pch_style
+QMAKE_PCH_OUTPUT_EXT = .pchi
+QMAKE_CXXFLAGS_USE_PRECOMPILE = -pch-use ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT}
+QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_TEMP_OBJECT} ${QMAKE_PCH_TEMP_SOURCE}
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Qoption,ld,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Qoption,ld,--dynamic-list,
+
+# Symbol visibility control
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-icc/qplatformdefs.h b/mkspecs/linux-icc/qplatformdefs.h
new file mode 100644
index 0000000..16774ee
--- /dev/null
+++ b/mkspecs/linux-icc/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf
new file mode 100644
index 0000000..009c486
--- /dev/null
+++ b/mkspecs/linux-kcc/qmake.conf
@@ -0,0 +1,97 @@
+#
+# qmake configuration for linux-kcc
+#
+# Written for KAI C++ 4.0f for GNU/Linux
+#
+# This product has been discontinued, use Intel C++ instead.
+#
+# From the KAI C++ man page for Linux:
+# --[no_]thread_safe
+# [Waive or] Request thread-safe handling of system-allocated objects.
+# To guarantee thread safety, this option must be used when both
+# compiling and linking. Thread-safe C++ is not link-compatible with
+# (the default) non-thread-safe C++.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = KCC
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = --c --display_error_number --backend -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = +K2
+QMAKE_CFLAGS_DEBUG = +K0
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = --diag_suppress 111,177
+QMAKE_CFLAGS_THREAD = --thread_safe
+
+QMAKE_CXX = KCC
+QMAKE_CXXFLAGS = --display_error_number --diag_suppress 611,1142 --backend -pipe
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = KCC
+QMAKE_LINK_SHLIB = KCC
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB =
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = --soname$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD = --thread_safe
+QMAKE_RPATH = -rpath$$LITERAL_WHITESPACE
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)ti_files
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
new file mode 100644
index 0000000..de9dcc9
--- /dev/null
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+// KAI C++ has at the moment problems with unloading the Qt plugins.
+// So don't unload them as a workaround for now.
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf
new file mode 100644
index 0000000..9c34377
--- /dev/null
+++ b/mkspecs/linux-llvm/qmake.conf
@@ -0,0 +1,13 @@
+#
+# qmake configuration for llvm
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/llvm.conf)
+include(../common/linux.conf)
+load(qt_config)
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
new file mode 100644
index 0000000..288f9fd
--- /dev/null
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf
new file mode 100644
index 0000000..b603a16
--- /dev/null
+++ b/mkspecs/linux-lsb-g++/qmake.conf
@@ -0,0 +1,96 @@
+#
+# qmake configuration for linux-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC = lsbcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_YACCFLAGS_MANGLE = -p $base -b $base
+QMAKE_YACC_HEADER = $base.tab.h
+QMAKE_YACC_SOURCE = $base.tab.c
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+
+QMAKE_LSB = 1
+
+QMAKE_CXX = lsbc++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /opt/lsb/include
+QMAKE_LIBDIR_X11 = /opt/lsb/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /opt/lsb/include
+QMAKE_LIBDIR_OPENGL = /opt/lsb/lib
+
+QMAKE_LINK = lsbc++
+QMAKE_LINK_SHLIB = lsbc++
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -r
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
new file mode 100644
index 0000000..742a550
--- /dev/null
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <time.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// LSB 3.1 defines htonl and friends here
+#include <arpa/inet.h>
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#ifndef SIOCGIFBRDADDR
+# define SIOCGIFBRDADDR 0x8919
+#endif
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf
new file mode 100644
index 0000000..756f1af
--- /dev/null
+++ b/mkspecs/linux-pgcc/qmake.conf
@@ -0,0 +1,86 @@
+#
+# qmake configuration for linux-pgcc
+#
+# Written for the Portland Group compiler 6.0-5
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = pgcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -fast
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fpic
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = pgCC
+QMAKE_CXXFLAGS = --display_error_number --diag_suppress815 $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = pgCC
+QMAKE_LINK_SHLIB = pgCC
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared -fpic
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -R
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
new file mode 100644
index 0000000..289f083
--- /dev/null
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/lynxos-g++/qmake.conf b/mkspecs/lynxos-g++/qmake.conf
new file mode 100644
index 0000000..40f2b9f
--- /dev/null
+++ b/mkspecs/lynxos-g++/qmake.conf
@@ -0,0 +1,91 @@
+#
+# qmake configuration for lynxos-g++
+#
+# Written for LynxOS 4.0
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 = /usr/include/X11
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/include/GL
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS = -lnsl
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
new file mode 100644
index 0000000..08a9f0c
--- /dev/null
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS void
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++/Info.plist.app b/mkspecs/macx-g++/Info.plist.app
new file mode 100644
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/macx-g++/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-g++/Info.plist.lib b/mkspecs/macx-g++/Info.plist.lib
new file mode 100644
index 0000000..97609ed
--- /dev/null
+++ b/mkspecs/macx-g++/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
new file mode 100644
index 0000000..64ef801
--- /dev/null
+++ b/mkspecs/macx-g++/qmake.conf
@@ -0,0 +1,20 @@
+#macx-g++ (different from g++.conf)
+
+#
+# qmake configuration for macx-g++
+#
+# Mac OS X + command-line compiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/mac-g++.conf)
+
+QMAKE_CC = gcc
+QMAKE_CXX = g++
+
+load(qt_config)
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
new file mode 100644
index 0000000..f8ea276
--- /dev/null
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++42/Info.plist.app b/mkspecs/macx-g++42/Info.plist.app
new file mode 100644
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/macx-g++42/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-g++42/Info.plist.lib b/mkspecs/macx-g++42/Info.plist.lib
new file mode 100644
index 0000000..97609ed
--- /dev/null
+++ b/mkspecs/macx-g++42/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
new file mode 100644
index 0000000..e6a3120
--- /dev/null
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -0,0 +1,21 @@
+#macx-g++ (different from g++.conf)
+
+#
+# qmake configuration for macx-g++
+#
+# Mac OS X + command-line compiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/mac-g++.conf)
+
+
+QMAKE_CC = gcc-4.2
+QMAKE_CXX = g++-4.2
+
+load(qt_config)
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
new file mode 100644
index 0000000..f8ea276
--- /dev/null
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf
new file mode 100644
index 0000000..b7753d8
--- /dev/null
+++ b/mkspecs/macx-icc/qmake.conf
@@ -0,0 +1,81 @@
+#
+# qmake configuration for macx-icc
+#
+# Written for Intel C++ Compiler versions 8.x and 9.x for Mac OS X
+#
+# Note: Some of the remarks from the Intel compiler are disabled (even
+# with 'warn_on' specified):
+#
+# remark #858: type qualifier on return type is meaningless
+# warning #1572: floating-point equality and inequality comparisons are unreliable
+# warning #279: controlling expression is constant
+# warning #1569: potential redeclared typedef
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl app_bundle
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublibs
+QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
+
+QMAKE_CC = icc
+QMAKE_CFLAGS = -wd858,1572,1569,279
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE =
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fpic
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD =
+#QMAKE_CFLAGS_PPC = -arch ppc
+#QMAKE_CFLAGS_X86 = -arch i386
+
+QMAKE_OBJECTIVE_CC = gcc
+QMAKE_OBJECTIVE_CFLAGS = -pipe
+QMAKE_OBJECTIVE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = -w
+QMAKE_OBJECTIVE_CFLAGS_RELEASE = -Os
+QMAKE_OBJECTIVE_CFLAGS_DEBUG = -g
+QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = -fvisibility=hidden
+QMAKE_OBJECTIVE_CFLAGS_PPC = -arch ppc
+QMAKE_OBJECTIVE_CFLAGS_X86 = -arch i386
+
+QMAKE_CXX = icpc
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_PPC = $$QMAKE_CFLAGS_PPC
+QMAKE_CXXFLAGS_X86 = $$QMAKE_CFLAGS_X86
+
+QMAKE_LINK = icpc
+QMAKE_LINK_SHLIB = icpc
+QMAKE_LFLAGS = -headerpad_max_install_names
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -single_module -dynamiclib
+QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_THREAD =
+#QMAKE_LFLAGS_PPC = -arch ppc
+#QMAKE_LFLAGS_X86 = -arch i386
+QMAKE_RPATH =
+
+QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files
+
+include(../common/mac.conf)
+
+load(qt_config)
diff --git a/mkspecs/macx-icc/qplatformdefs.h b/mkspecs/macx-icc/qplatformdefs.h
new file mode 100644
index 0000000..38a1810
--- /dev/null
+++ b/mkspecs/macx-icc/qplatformdefs.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../macx-g++/qplatformdefs.h"
+
diff --git a/mkspecs/macx-llvm/Info.plist.app b/mkspecs/macx-llvm/Info.plist.app
new file mode 100644
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/macx-llvm/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-llvm/Info.plist.lib b/mkspecs/macx-llvm/Info.plist.lib
new file mode 100644
index 0000000..97609ed
--- /dev/null
+++ b/mkspecs/macx-llvm/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
new file mode 100644
index 0000000..cb8aaa1
--- /dev/null
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -0,0 +1,19 @@
+#macx-g++ (different from g++.conf)
+
+#
+# qmake configuration for macx-g++
+#
+# Mac OS X + command-line compiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/mac-llvm.conf)
+
+QMAKE_OBJECTIVE_CC = gcc
+
+load(qt_config)
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
new file mode 100644
index 0000000..f8ea276
--- /dev/null
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-pbuilder/Info.plist.app b/mkspecs/macx-pbuilder/Info.plist.app
new file mode 100755
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/macx-pbuilder/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-pbuilder/qmake.conf b/mkspecs/macx-pbuilder/qmake.conf
new file mode 100755
index 0000000..2418c7c
--- /dev/null
+++ b/mkspecs/macx-pbuilder/qmake.conf
@@ -0,0 +1,7 @@
+#
+# qmake configuration for macx-pbuilder
+#
+# Mac OS X + Project Builder
+#
+
+error("Use macx-xcode spec")
diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h
new file mode 100644
index 0000000..bcd1327
--- /dev/null
+++ b/mkspecs/macx-pbuilder/qplatformdefs.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xcode/Info.plist.app b/mkspecs/macx-xcode/Info.plist.app
new file mode 100755
index 0000000..393b615
--- /dev/null
+++ b/mkspecs/macx-xcode/Info.plist.app
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-xcode/Info.plist.lib b/mkspecs/macx-xcode/Info.plist.lib
new file mode 100644
index 0000000..97609ed
--- /dev/null
+++ b/mkspecs/macx-xcode/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf
new file mode 100755
index 0000000..3a4a500
--- /dev/null
+++ b/mkspecs/macx-xcode/qmake.conf
@@ -0,0 +1,26 @@
+#
+# qmake configuration for macx-xcode
+#
+# Mac OS X + XCode
+#
+
+MAKEFILE_GENERATOR = XCODE
+TEMPLATE = app
+CONFIG += qt warn_on release lib_version_first incremental plugin_no_soname link_prl app_bundle
+QT += core gui
+
+include(../common/mac-g++.conf)
+
+QMAKE_CC =
+QMAKE_CXX =
+QMAKE_CFLAGS_HIDESYMS =
+QMAKE_CFLAGS_PPC_64 =
+QMAKE_CFLAGS_X86_64 =
+QMAKE_CFLAGS_PPC =
+QMAKE_CFLAGS_X86 =
+QMAKE_LFLAGS_VERSION =
+QMAKE_LFLAGS_COMPAT_VERSION =
+QMAKE_LFLAGS_SONAME =
+QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/CarbonCore.framework/Headers
+
+load(qt_config)
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
new file mode 100644
index 0000000..f8ea276
--- /dev/null
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xlc/qmake.conf b/mkspecs/macx-xlc/qmake.conf
new file mode 100644
index 0000000..6a8c246
--- /dev/null
+++ b/mkspecs/macx-xlc/qmake.conf
@@ -0,0 +1,98 @@
+#
+# qmake configuration for macx-xlc
+#
+# Mac OS X + IBM's XL C/C++ Advanced Edition for Mac OS X
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+
+QMAKE_CC = xlc
+QMAKE_CC_THREAD = xlc_r
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -qstrict
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_EXTENSION_SHLIB = dylib
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -qthreaded
+QMAKE_EXTENSION_SHLIB = dylib
+QMAKE_COMPILER_DEFINES += __APPLE__ __xlc__
+
+QMAKE_CXX = xlc++
+QMAKE_CXX_THREAD = xlc++_r
+QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
+ /System/Library/Frameworks/AGL.framework/Headers/
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = xlc++
+QMAKE_LINK_THREAD = xlc++_r
+QMAKE_LINK_SHLIB = ld
+#QMAKE_LINK_SHLIB_CMD = makeC++SharedLib -p 0 \
+# -o $(TARGETD) \
+# $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS); \
+# $(AR) lib$(QMAKE_TARGET).a $(TARGETD); \
+# $(RANLIB) lib$(QMAKE_TARGET).a; \
+# mv lib$(QMAKE_TARGET).a $(DESTDIR)
+QMAKE_LFLAGS = -headerpad_max_install_names
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -prebind -qmkshrobj
+QMAKE_LFLAGS_PLUGIN = -bundle
+QMAKE_LFLAGS_SONAME =
+#QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
+#QMAKE_AIX_SHLIB = 1
+#QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
+#QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
+QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
+#QMAKE_LIBS_THREAD = -lpthreads
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib -s
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $$QMAKE_COPY
+QMAKE_COPY_DIR = $$QMAKE_COPY -R
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h
new file mode 100644
index 0000000..a9a8ca2
--- /dev/null
+++ b/mkspecs/macx-xlc/qplatformdefs.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#define QT_SOCKLEN_T int
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf
new file mode 100644
index 0000000..622bace
--- /dev/null
+++ b/mkspecs/netbsd-g++/qmake.conf
@@ -0,0 +1,87 @@
+#
+# qmake configuration for netbsd-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -pthread
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
new file mode 100644
index 0000000..b90f0ad
--- /dev/null
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+// NetBSD 1.0 - 1.3.3 int
+// NetBSD 1.4 - 1.5 socklen_t
+#define QT_SOCKLEN_T socklen_t
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+// Older NetBSD versions may still use the a.out format instead of ELF.
+#ifndef __ELF__
+#define QT_AOUT_UNDERSCORE
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
new file mode 100644
index 0000000..4204f65
--- /dev/null
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -0,0 +1,88 @@
+#
+# qmake configuration for openbsd-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -pthread
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_X11 = /usr/X11R6/include
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/X11R6/include
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $(LFLAGS) \
+ $$QMAKE_CFLAGS_SHLIB $$QMAKE_LFLAGS \
+ -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar q
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = ranlib
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
new file mode 100644
index 0000000..b58e88d
--- /dev/null
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+// OpenBSD 2.2 - 2.4 int
+// OpenBSD 2.5 - 2.8 socklen_t
+#define QT_SOCKLEN_T socklen_t
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+// 1003.1c-1995 says on page 38 (2.9.3, paragraph 3) that if _POSIX_THREADS
+// is defined, then _POSIX_THREAD_SAFE_FUNCTIONS must also be defined.
+// However this looks like a well-known typo (reversed dependency).
+//
+// On the other hand _POSIX_THREAD_SAFE_FUNCTIONS should be defined only
+// if the Thread-Safe Functions option is implemented. OpenBSD does not
+// support all of the required _r() interfaces, especially getpwuid_r(),
+// which means it should not define _POSIX_THREAD_SAFE_FUNCTIONS.
+//
+// Since OpenBSD does define _POSIX_THREAD_SAFE_FUNCTIONS, we have to
+// undefine it behind its back.
+#ifdef _POSIX_THREAD_SAFE_FUNCTIONS
+#undef _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+
+// Older OpenBSD versions may still use the a.out format instead of ELF.
+#ifndef __ELF__
+#define QT_AOUT_UNDERSCORE
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qws/freebsd-generic-g++/qmake.conf b/mkspecs/qws/freebsd-generic-g++/qmake.conf
new file mode 100644
index 0000000..19d6709
--- /dev/null
+++ b/mkspecs/qws/freebsd-generic-g++/qmake.conf
@@ -0,0 +1,84 @@
+#
+# qmake configuration for freebsd-g++ with Qtopia Core
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release
+QT += core gui network
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_LINUXFB -DQT_NO_QWS_TRANSFORMED
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+# Addon software goes into /usr/local on the BSDs, by default we will look there
+QMAKE_INCDIR = /usr/local/include
+QMAKE_LIBDIR = /usr/local/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include
+QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_QT = -lqte
+QMAKE_LIBS_QT_THREAD = -lqte-mt
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_QTOPIA = -lqpe -lqtopia
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/qws/freebsd-generic-g++/qplatformdefs.h b/mkspecs/qws/freebsd-generic-g++/qplatformdefs.h
new file mode 100644
index 0000000..744cbbb
--- /dev/null
+++ b/mkspecs/qws/freebsd-generic-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../freebsd-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-arm-g++/qmake.conf b/mkspecs/qws/linux-arm-g++/qmake.conf
new file mode 100644
index 0000000..7e0a3b4
--- /dev/null
+++ b/mkspecs/qws/linux-arm-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc
+QMAKE_CXX = arm-linux-g++
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-arm-g++/qplatformdefs.h b/mkspecs/qws/linux-arm-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-arm-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-armv6-g++/qmake.conf b/mkspecs/qws/linux-armv6-g++/qmake.conf
new file mode 100644
index 0000000..cd7ecca
--- /dev/null
+++ b/mkspecs/qws/linux-armv6-g++/qmake.conf
@@ -0,0 +1,22 @@
+#
+# qmake configuration for building for ARMv6 devices with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc
+QMAKE_CXX = arm-linux-g++
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+QMAKE_CFLAGS += -march=armv6
+QMAKE_CXXFLAGS += -march=armv6
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-armv6-g++/qplatformdefs.h b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h
new file mode 100644
index 0000000..99e9a27
--- /dev/null
+++ b/mkspecs/qws/linux-armv6-g++/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-avr32-g++/qmake.conf b/mkspecs/qws/linux-avr32-g++/qmake.conf
new file mode 100644
index 0000000..057c938
--- /dev/null
+++ b/mkspecs/qws/linux-avr32-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for building with avr32-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = avr32-linux-gcc
+QMAKE_CXX = avr32-linux-g++
+QMAKE_LINK = avr32-linux-g++
+QMAKE_LINK_SHLIB = avr32-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = avr32-linux-ar cqs
+QMAKE_OBJCOPY = avr32-linux-objcopy
+QMAKE_STRIP = avr32-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-avr32-g++/qplatformdefs.h b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h
new file mode 100644
index 0000000..99e9a27
--- /dev/null
+++ b/mkspecs/qws/linux-avr32-g++/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-cellon-g++/qmake.conf b/mkspecs/qws/linux-cellon-g++/qmake.conf
new file mode 100644
index 0000000..363a3ce
--- /dev/null
+++ b/mkspecs/qws/linux-cellon-g++/qmake.conf
@@ -0,0 +1,29 @@
+#
+# qmake configuration for linux-g++ using the arm-linux-g++ crosscompiler
+#
+
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc
+QMAKE_CXX = arm-linux-g++
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+QMAKE_CFLAGS = $$QMAKE_CFLAGS -DQT_QWS_CELLON -DQWS
+QMAKE_CXXFLAGS = $$QMAKE_CXXFLAGS -DQT_QWS_CELLON -DQWS
+QMAKE_CFLAGS_RELEASE ~= s/-O2/-Os/
+QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Os/
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-cellon-g++/qplatformdefs.h b/mkspecs/qws/linux-cellon-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-cellon-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-dm7000-g++/qmake.conf b/mkspecs/qws/linux-dm7000-g++/qmake.conf
new file mode 100644
index 0000000..aea2647
--- /dev/null
+++ b/mkspecs/qws/linux-dm7000-g++/qmake.conf
@@ -0,0 +1,26 @@
+#
+# qmake configuration for linux-dm7000-g++, for Dream Multimedia's DM7000S
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = powerpc-tuxbox-linux-gnu-gcc
+QMAKE_CFLAGS = -pipe -msoft-float -meabi
+QMAKE_CFLAGS_RELEASE = -O2 -mcpu=405 -mmultiple -mstring
+QMAKE_CFLAGS_DEBUG = -ggdb3
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXX = powerpc-tuxbox-linux-gnu-g++
+QMAKE_LINK = powerpc-tuxbox-linux-gnu-g++
+QMAKE_LINK_SHLIB = powerpc-tuxbox-linux-gnu-g++
+
+# modifications to linux.conf
+QMAKE_AR = powerpc-tuxbox-linux-gnu-ar cqs
+QMAKE_OBJCOPY = powerpc-tuxbox-linux-gnu-objcopy
+QMAKE_STRIP = powerpc-tuxbox-linux-gnu-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-dm7000-g++/qplatformdefs.h b/mkspecs/qws/linux-dm7000-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-dm7000-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-dm800-g++/qmake.conf b/mkspecs/qws/linux-dm800-g++/qmake.conf
new file mode 100644
index 0000000..fca93b4
--- /dev/null
+++ b/mkspecs/qws/linux-dm800-g++/qmake.conf
@@ -0,0 +1,24 @@
+#
+# qmake configuration for linux-dm800-g++, for Dream Multimedia's DM800
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = mipsel-linux-gcc
+QMAKE_CXX = mipsel-linux-g++
+QMAKE_LINK = mipsel-linux-g++
+QMAKE_LINK_SHLIB = mipsel-linux-g++
+QMAKE_CFLAGS += -mabi=32 -mips32
+QMAKE_CFLAGS_RELEASE += -fexpensive-optimizations -frename-registers -O2
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+
+# modifications to linux.conf
+QMAKE_AR = mipsel-linux-ar cqs
+QMAKE_OBJCOPY = mipsel-linux-objcopy
+QMAKE_STRIP = mipsel-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-dm800-g++/qplatformdefs.h b/mkspecs/qws/linux-dm800-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-dm800-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-generic-g++-32/qmake.conf b/mkspecs/qws/linux-generic-g++-32/qmake.conf
new file mode 100644
index 0000000..81af4ab
--- /dev/null
+++ b/mkspecs/qws/linux-generic-g++-32/qmake.conf
@@ -0,0 +1,14 @@
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CFLAGS += -m32
+QMAKE_CXXFLAGS += -m32
+QMAKE_LFLAGS += -m32
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-generic-g++-32/qplatformdefs.h b/mkspecs/qws/linux-generic-g++-32/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-generic-g++-32/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-generic-g++/qmake.conf b/mkspecs/qws/linux-generic-g++/qmake.conf
new file mode 100644
index 0000000..a026e88
--- /dev/null
+++ b/mkspecs/qws/linux-generic-g++/qmake.conf
@@ -0,0 +1,9 @@
+#
+# qmake configuration for building with g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-generic-g++/qplatformdefs.h b/mkspecs/qws/linux-generic-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-generic-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-ipaq-g++/qmake.conf b/mkspecs/qws/linux-ipaq-g++/qmake.conf
new file mode 100644
index 0000000..59f4e6e
--- /dev/null
+++ b/mkspecs/qws/linux-ipaq-g++/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc -DQT_QWS_IPAQ
+QMAKE_CXX = arm-linux-g++ -DQT_QWS_IPAQ
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-ipaq-g++/qplatformdefs.h b/mkspecs/qws/linux-ipaq-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-ipaq-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-lsb-g++/qmake.conf b/mkspecs/qws/linux-lsb-g++/qmake.conf
new file mode 100644
index 0000000..8b66228
--- /dev/null
+++ b/mkspecs/qws/linux-lsb-g++/qmake.conf
@@ -0,0 +1,22 @@
+#
+# qmake configuration for linux-g++
+#
+
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+QMAKE_LSB = 1
+
+# modifications to g++.conf
+QMAKE_CC = lsbcc
+QMAKE_CXX = lsbc++
+QMAKE_CFLAGS = -pipe -DQT_LINUXBASE -fno-stack-protector
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_LINK = lsbc++
+QMAKE_LINK_SHLIB = lsbc++
+QMAKE_LFLAGS += -fno-stack-protector
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-lsb-g++/qplatformdefs.h b/mkspecs/qws/linux-lsb-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-lsb-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-mips-g++/qmake.conf b/mkspecs/qws/linux-mips-g++/qmake.conf
new file mode 100644
index 0000000..3c55342
--- /dev/null
+++ b/mkspecs/qws/linux-mips-g++/qmake.conf
@@ -0,0 +1,22 @@
+#
+# qmake configuration for building with mipsel-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = mips-linux-gcc
+QMAKE_CXX = mips-linux-g++
+QMAKE_CFLAGS += -mips32
+QMAKE_CXXFLAGS += -mips32
+QMAKE_LINK = mips-linux-g++
+QMAKE_LINK_SHLIB = mips-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = mips-linux-ar cqs
+QMAKE_OBJCOPY = mips-linux-objcopy
+QMAKE_STRIP = mips-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-mips-g++/qplatformdefs.h b/mkspecs/qws/linux-mips-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-mips-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-ppc-g++/qmake.conf b/mkspecs/qws/linux-ppc-g++/qmake.conf
new file mode 100644
index 0000000..a026e88
--- /dev/null
+++ b/mkspecs/qws/linux-ppc-g++/qmake.conf
@@ -0,0 +1,9 @@
+#
+# qmake configuration for building with g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-ppc-g++/qplatformdefs.h b/mkspecs/qws/linux-ppc-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-ppc-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-sh-g++/qmake.conf b/mkspecs/qws/linux-sh-g++/qmake.conf
new file mode 100644
index 0000000..61b57a3
--- /dev/null
+++ b/mkspecs/qws/linux-sh-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for building for SH devices with sh3-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = sh3-linux-gcc
+QMAKE_CXX = sh3-linux-g++
+QMAKE_LINK = sh3-linux-g++
+QMAKE_LINK_SHLIB = sh3-linux-g++
+
+# modifications to linux.conf
+QMAKE_AR = sh3-linux-ar cqs
+QMAKE_OBJCOPY = sh3-linux-objcopy
+QMAKE_STRIP = sh3-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-sh-g++/qplatformdefs.h b/mkspecs/qws/linux-sh-g++/qplatformdefs.h
new file mode 100644
index 0000000..99e9a27
--- /dev/null
+++ b/mkspecs/qws/linux-sh-g++/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-sh4al-g++/qmake.conf b/mkspecs/qws/linux-sh4al-g++/qmake.conf
new file mode 100644
index 0000000..9caebdf
--- /dev/null
+++ b/mkspecs/qws/linux-sh4al-g++/qmake.conf
@@ -0,0 +1,23 @@
+#
+# qmake configuration for building for SH4AL-DSP devices with sh3-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = sh3-linux-gcc
+QMAKE_CXX = sh3-linux-g++
+QMAKE_LINK = sh3-linux-g++
+QMAKE_LINK_SHLIB = sh3-linux-g++
+QMAKE_CFLAGS += -m4al
+QMAKE_CXXFLAGS += -m4al
+
+
+# modifications to linux.conf
+QMAKE_AR = sh3-linux-ar cqs
+QMAKE_OBJCOPY = sh3-linux-objcopy
+QMAKE_STRIP = sh3-linux-strip
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h b/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h
new file mode 100644
index 0000000..99e9a27
--- /dev/null
+++ b/mkspecs/qws/linux-sh4al-g++/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-sharp-g++/qmake.conf b/mkspecs/qws/linux-sharp-g++/qmake.conf
new file mode 100644
index 0000000..083e4e8
--- /dev/null
+++ b/mkspecs/qws/linux-sharp-g++/qmake.conf
@@ -0,0 +1,23 @@
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc
+QMAKE_CXX = arm-linux-g++
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+QMAKE_CFLAGS += -DQT_QWS_SHARP -DQT_QWS_EBX
+QMAKE_CXXFLAGS += -DQT_QWS_SHARP -DQT_QWS_EBX
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-sharp-g++/qplatformdefs.h b/mkspecs/qws/linux-sharp-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-sharp-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-x86-g++/qmake.conf b/mkspecs/qws/linux-x86-g++/qmake.conf
new file mode 100644
index 0000000..7e28d4e
--- /dev/null
+++ b/mkspecs/qws/linux-x86-g++/qmake.conf
@@ -0,0 +1,9 @@
+#
+# qmake configuration for building with linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-x86-g++/qplatformdefs.h b/mkspecs/qws/linux-x86-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-x86-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-x86_64-g++/qmake.conf b/mkspecs/qws/linux-x86_64-g++/qmake.conf
new file mode 100644
index 0000000..d4e6189
--- /dev/null
+++ b/mkspecs/qws/linux-x86_64-g++/qmake.conf
@@ -0,0 +1,14 @@
+#
+# qmake configuration for building with linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CFLAGS += -m64
+QMAKE_CXXFLAGS += -m64
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-x86_64-g++/qplatformdefs.h b/mkspecs/qws/linux-x86_64-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-x86_64-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/linux-zylonite-g++/qmake.conf b/mkspecs/qws/linux-zylonite-g++/qmake.conf
new file mode 100644
index 0000000..97ae600
--- /dev/null
+++ b/mkspecs/qws/linux-zylonite-g++/qmake.conf
@@ -0,0 +1,25 @@
+#
+# qmake configuration for building with arm-linux-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-linux-gcc
+QMAKE_CXX = arm-linux-g++
+QMAKE_CFLAGS += -DQT_QWS_ZYLONITE -DQWS -fno-rtti
+QMAKE_CXXFLAGS += -DQT_QWS_ZYLONITE -DQWS -fno-rtti
+QMAKE_LINK = arm-linux-g++
+QMAKE_LINK_SHLIB = arm-linux-g++
+QMAKE_CFLAGS_RELEASE ~= s/-O2/-Os/
+QMAKE_CXXFLAGS_RELEASE ~= s/-O2/-Os/
+
+# modifications to linux.conf
+QMAKE_AR = arm-linux-ar cqs
+QMAKE_OBJCOPY = arm-linux-objcopy
+QMAKE_STRIP = arm-linux-strip
+
+load(qt_config)
+
diff --git a/mkspecs/qws/linux-zylonite-g++/qplatformdefs.h b/mkspecs/qws/linux-zylonite-g++/qplatformdefs.h
new file mode 100644
index 0000000..919ac0f
--- /dev/null
+++ b/mkspecs/qws/linux-zylonite-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf
new file mode 100644
index 0000000..b724cbc
--- /dev/null
+++ b/mkspecs/qws/macx-generic-g++/qmake.conf
@@ -0,0 +1,87 @@
+#
+# qmake configuration for macx-g++ with Qtopia Core
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui network
+QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_EXTENSION_SHLIB = dylib
+
+QMAKE_CC = $(TB)cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+
+QMAKE_CXX = $(TB)c++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include
+QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib
+
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -dynamiclib
+QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace
+QMAKE_LFLAGS_PLUGIN = -bundle
+QMAKE_LFLAGS_SONAME =
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH =
+
+QMAKE_LIBS =
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_X11SM =
+QMAKE_LIBS_QT = -lqte
+QMAKE_LIBS_QT_THREAD = -lqte-mt
+QMAKE_LIBS_QT_OPENGL = -lqgl
+QMAKE_LIBS_QTOPIA = -lqpe -lqtopia
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_OPENGL =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/qws/macx-generic-g++/qplatformdefs.h b/mkspecs/qws/macx-generic-g++/qplatformdefs.h
new file mode 100644
index 0000000..4837562
--- /dev/null
+++ b/mkspecs/qws/macx-generic-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../macx-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/solaris-generic-g++/qmake.conf b/mkspecs/qws/solaris-generic-g++/qmake.conf
new file mode 100644
index 0000000..db83a57
--- /dev/null
+++ b/mkspecs/qws/solaris-generic-g++/qmake.conf
@@ -0,0 +1,88 @@
+#
+# qmake configuration for solaris-g++ with Qtopia Core
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui network
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -pipe
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_SOUND -DQT_NO_QWS_LINUXFB -DQT_NO_QWS_TRANSFORMED
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include
+QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS = -lsocket -lnsl -lresolv
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 =
+QMAKE_LIBS_X11SM =
+QMAKE_LIBS_QT = -lqte
+QMAKE_LIBS_QT_THREAD = -lqte-mt
+QMAKE_LIBS_QT_OPENGL = -lqgl
+QMAKE_LIBS_QTOPIA = -lqpe -lqtopia
+QMAKE_LIBS_THREAD = -lthread -lrt
+QMAKE_LIBS_OPENGL =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/qws/solaris-generic-g++/qplatformdefs.h b/mkspecs/qws/solaris-generic-g++/qplatformdefs.h
new file mode 100644
index 0000000..2f0d880
--- /dev/null
+++ b/mkspecs/qws/solaris-generic-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../solaris-g++/qplatformdefs.h"
diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf
new file mode 100644
index 0000000..f682f49
--- /dev/null
+++ b/mkspecs/sco-cc/qmake.conf
@@ -0,0 +1,82 @@
+#
+# qmake configuration for sco-cc
+#
+# Written for SCO OpenServer with UDK
+#
+# -Wf,--diag_suppress,838
+# turns off warning about missing return types in X headers
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+QT += core gui
+CONFIG += qt warn_on release link_prl
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 = /usr/X/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
new file mode 100644
index 0000000..cc4f014
--- /dev/null
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T size_t
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf
new file mode 100644
index 0000000..268bf32
--- /dev/null
+++ b/mkspecs/sco-g++/qmake.conf
@@ -0,0 +1,83 @@
+#
+# qmake configuration for sco-g++
+#
+# Written for SCO OpenServer 5.0.6 with Skunkware's compiler
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_RPATH =
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
new file mode 100644
index 0000000..44bc092
--- /dev/null
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// This is to have PATH_MAX defined in <limits.h>
+#ifndef _IBCS2
+# define _IBCS2
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseeko
+#define QT_FTELL ::ftello
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T int
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-64/qmake.conf b/mkspecs/solaris-cc-64/qmake.conf
new file mode 100644
index 0000000..eb594d9
--- /dev/null
+++ b/mkspecs/solaris-cc-64/qmake.conf
@@ -0,0 +1,107 @@
+#
+# qmake configuration for solaris-cc-64
+#
+# Written for Forte Developer 6 and Sun ONE Studio 7 and 8
+#
+# From the standards(5) manual page:
+# The XNS4 specification is safe for use only in ILP32 (32-bit)
+# environments and should not be used for LP64 (64-bit)
+# application environments. Use XNS5, which has LP64-clean
+# interfaces that are portable across ILP32 and LP64 environments.
+# [...]
+# For platforms supporting the LP64 (64-bit) programming environment
+# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64
+# applications using XNS5 library calls should be built with command
+# lines of the form:
+# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \
+# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \
+# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet
+# So it appears that _XOPEN_SOURCE=500 should be defined when building
+# 64-bit applications (on Solaris 7 and better). But then __EXTENSIONS__
+# should be defined as well to recover all the default system interface.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -xarch=generic64
+QMAKE_CFLAGS_DEPS = -xM
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -mt
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = -O
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/sfw/include
+QMAKE_LIBDIR = /usr/sfw/lib/64
+QMAKE_INCDIR_X11 = /usr/openwin/include
+QMAKE_LIBDIR_X11 = /usr/openwin/lib/64
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/openwin/include
+QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS = -xarch=generic64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD = -mt
+QMAKE_LFLAGS_NOUNDEF = -z defs
+QMAKE_RPATH = -R
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS =
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread -lrt
+QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = CC -xar -o
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
new file mode 100644
index 0000000..f448a25
--- /dev/null
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+#define _XOPEN_SOURCE 500
+#define __EXTENSIONS__
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#include <unistd.h>
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// On 64-bit platforms sockets use socklen_t
+#define QT_SOCKLEN_T socklen_t
+
+// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::connect(s, addr, addrlen); }
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT qt_socket_connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+// Only Solaris 7 and better support 64-bit
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#ifdef connect
+#undef connect
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc/qmake.conf b/mkspecs/solaris-cc/qmake.conf
new file mode 100644
index 0000000..ad430d1
--- /dev/null
+++ b/mkspecs/solaris-cc/qmake.conf
@@ -0,0 +1,90 @@
+#
+# qmake configuration for solaris-cc
+#
+# Written for Forte Developer 6 and Sun ONE Studio 7 and 8
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -xM
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_THREAD = -mt
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = -O2
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/sfw/include
+QMAKE_LIBDIR = /usr/sfw/lib
+QMAKE_INCDIR_X11 = /usr/openwin/include
+QMAKE_LIBDIR_X11 = /usr/openwin/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/openwin/include
+QMAKE_LIBDIR_OPENGL = /usr/openwin/lib
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD = -mt
+QMAKE_LFLAGS_NOUNDEF = -z defs
+QMAKE_RPATH = -R
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS =
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread -lrt
+QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = CC -xar -o
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
new file mode 100644
index 0000000..40b8984
--- /dev/null
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+#define _XOPEN_SOURCE 500
+#define __EXTENSIONS__
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#include <unistd.h>
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500)
+// Solaris 7 and better with specific feature test macros
+#define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED) && (_XOPEN_VERSION-0 >= 4)
+// Solaris 2.6 and better with specific feature test macros
+#define QT_SOCKLEN_T size_t
+#else
+// always this case in practice
+#define QT_SOCKLEN_T int
+#endif
+
+// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::connect(s, addr, addrlen); }
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT qt_socket_connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if !defined(_XOPEN_UNIX)
+// Solaris 2.5.1
+// Function usleep() is defined in C library but not declared in header files
+// on Solaris 2.5.1. Not really a surprise, usleep() is specified by XPG4v2
+// and XPG4v2 is only supported by Solaris 2.6 and better.
+// Function gethostname() is also defined in C library but not declared in
+// header files on Solaris 2.5.1.
+typedef unsigned int useconds_t;
+extern "C" int usleep(useconds_t);
+extern "C" int gethostname(char *, int);
+#endif
+
+#if defined(_XOPEN_UNIX)
+// Solaris 2.6 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#ifdef connect
+#undef connect
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++-64/qmake.conf b/mkspecs/solaris-g++-64/qmake.conf
new file mode 100644
index 0000000..e89aff3
--- /dev/null
+++ b/mkspecs/solaris-g++-64/qmake.conf
@@ -0,0 +1,111 @@
+#
+# qmake configuration for solaris-g++64
+#
+# The X11 header files used to be broken on Solaris until patches were
+# released in early 2001 for Solaris 2.6, 7, and 8. On Solaris 2.5.1
+# or non-patched systems -fpermissive works around the incompatibility
+# between GCC 2.95 or better and Solaris - but we still get warnings
+# because we don't use -isystem.
+#
+# From the standards(5) manual page:
+# The XNS4 specification is safe for use only in ILP32 (32-bit)
+# environments and should not be used for LP64 (64-bit)
+# application environments. Use XNS5, which has LP64-clean
+# interfaces that are portable across ILP32 and LP64 environments.
+# [...]
+# For platforms supporting the LP64 (64-bit) programming environment
+# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64
+# applications using XNS5 library calls should be built with command
+# lines of the form:
+# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \
+# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \
+# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet
+# So it appears that _XOPEN_SOURCE=500 should be defined when building
+# 64-bit applications (on Solaris 7 and better). But then __EXTENSIONS__
+# should be defined as well to recover all the default system interface.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -m64 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/sfw/include
+QMAKE_LIBDIR = /usr/sfw/lib/64
+QMAKE_INCDIR_X11 = /usr/openwin/include
+QMAKE_LIBDIR_X11 = /usr/openwin/lib/64
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/openwin/include
+QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS = -m64
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -z defs
+QMAKE_RPATH = -Wl,-R,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS =
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread -lrt
+QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
new file mode 100644
index 0000000..fe47e36
--- /dev/null
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+#ifndef _POSIX_PTHREAD_SEMANTICS
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// On 64-bit platforms sockets use socklen_t
+#define QT_SOCKLEN_T socklen_t
+
+// Only Solaris 7 and better support 64-bit
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::connect(s, addr, addrlen); }
+#if defined (connect)
+# undef connect
+#endif
+
+// Solaris redefines bind -> __xnet_bind with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::bind(s, addr, addrlen); }
+#if defined(bind)
+# undef bind
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT qt_socket_connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++/qmake.conf b/mkspecs/solaris-g++/qmake.conf
new file mode 100644
index 0000000..bce0889
--- /dev/null
+++ b/mkspecs/solaris-g++/qmake.conf
@@ -0,0 +1,94 @@
+#
+# qmake configuration for solaris-g++
+#
+# The X11 header files used to be broken on Solaris until patches were
+# released in early 2001 for Solaris 2.6, 7, and 8. On Solaris 2.5.1
+# or non-patched systems -fpermissive works around the incompatibility
+# between GCC 2.95 or better and Solaris - but we still get warnings
+# because we don't use -isystem.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = /usr/sfw/include
+QMAKE_LIBDIR = /usr/sfw/lib
+QMAKE_INCDIR_X11 = /usr/openwin/include
+QMAKE_LIBDIR_X11 = /usr/openwin/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL = /usr/openwin/include
+QMAKE_LIBDIR_OPENGL = /usr/openwin/lib
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_NOUNDEF = -z defs
+QMAKE_RPATH = -Wl,-R,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_NIS =
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread -lrt
+QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
new file mode 100644
index 0000000..6c86f02
--- /dev/null
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+#ifndef _POSIX_PTHREAD_SEMANTICS
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500)
+// Solaris 7 and better with specific feature test macros
+#define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED) && defined(_XOPEN_UNIX)
+// Solaris 2.6 and better with specific feature test macros
+#define QT_SOCKLEN_T size_t
+#else
+// always this case in practice
+#define QT_SOCKLEN_T int
+#endif
+
+// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::connect(s, addr, addrlen); }
+#if defined (connect)
+# undef connect
+#endif
+
+// Solaris redefines bind -> __xnet_bind with _XOPEN_SOURCE_EXTENDED
+static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen)
+{ return ::bind(s, addr, addrlen); }
+#if defined(bind)
+# undef bind
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT qt_socket_connect
+#define QT_SOCKET_BIND qt_socket_bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if !defined(_XOPEN_UNIX)
+// Solaris 2.5.1
+// Function usleep() is defined in C library but not declared in header files
+// on Solaris 2.5.1. Not really a surprise, usleep() is specified by XPG4v2
+// and XPG4v2 is only supported by Solaris 2.6 and better.
+// Function gethostname() is also defined in C library but not declared in
+// header files on Solaris 2.5.1.
+typedef unsigned int useconds_t;
+extern "C" int usleep(useconds_t);
+extern "C" int gethostname(char *, int);
+#endif
+
+#if defined(_XOPEN_UNIX)
+// Solaris 2.6 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf
new file mode 100644
index 0000000..8cef84d
--- /dev/null
+++ b/mkspecs/tru64-cxx/qmake.conf
@@ -0,0 +1,83 @@
+#
+# qmake configuration for tru64-cxx
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl plugin_no_soname
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB =
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Olimit 1000
+QMAKE_CFLAGS_THREAD = -pthread
+
+QMAKE_CXX = cxx
+QMAKE_CXXFLAGS = -x cxx -model ansi $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = cxx
+QMAKE_LINK_SHLIB = cxx
+QMAKE_LFLAGS = -model ansi
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD = -pthread
+QMAKE_LFLAGS_SONAME = -soname$$LITERAL_WHITESPACE
+QMAKE_RPATH = -rpath$$LITERAL_WHITESPACE
+
+QMAKE_LIBS = -lm
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lrt
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
new file mode 100644
index 0000000..d03a2b4
--- /dev/null
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#ifndef QT_NO_THREAD
+#include <pthread.h>
+#endif
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE)
+// Not available in the <unistd.h> header file of Tru64 4.0F.
+// Fixed in the <unistd.h> header of Tru64 5.0A so we copy/paste from there...
+extern "C" int usleep(useconds_t);
+#endif
+
+#if defined(_POSIX_PII_SOCKET)
+#define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED)
+#define QT_SOCKLEN_T size_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
+// Tru64 5.0 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf
new file mode 100644
index 0000000..7749013
--- /dev/null
+++ b/mkspecs/tru64-g++/qmake.conf
@@ -0,0 +1,85 @@
+#
+# qmake configuration for tru64-g++
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl plugin_no_soname
+QT += core gui
+
+QMAKE_CC = gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall -W
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = g++
+QMAKE_LINK_SHLIB = g++
+QMAKE_LINK_C = gcc
+QMAKE_LINK_C_SHLIB = gcc
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD =
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_X11 = -lXext -lX11 -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+QMAKE_LIBS_OPENGL = -lGLU -lGL
+QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_THREAD = -lpthread -lexc -lrt
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cqs
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
new file mode 100644
index 0000000..6d447a4
--- /dev/null
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#ifndef QT_NO_THREAD
+#include <pthread.h>
+#endif
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE)
+// Not available in the <unistd.h> header file of Tru64 4.0F.
+// Fixed in the <unistd.h> header of Tru64 5.0A so we copy/paste from there...
+extern "C" int usleep(useconds_t);
+#endif
+
+#if defined(_POSIX_PII_SOCKET)
+# define QT_SOCKLEN_T socklen_t
+#elif defined(_XOPEN_SOURCE_EXTENDED)
+# define QT_SOCKLEN_T size_t
+#else
+# define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
+// Tru64 5.0 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-cc/qmake.conf b/mkspecs/unixware-cc/qmake.conf
new file mode 100644
index 0000000..978aaa1
--- /dev/null
+++ b/mkspecs/unixware-cc/qmake.conf
@@ -0,0 +1,88 @@
+#
+# qmake configuration for unixware-cc
+#
+# Written for UnixWare 7 with UDK or OUDK
+#
+# -Wf,--diag_suppress,838
+# turns off warning about missing return types in X headers
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+
+QMAKE_CC = cc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = yacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS =
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -KPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177
+QMAKE_CFLAGS_THREAD = -Kthread
+
+QMAKE_CXX = CC
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_X11 =
+QMAKE_LIBDIR_X11 = /usr/X/lib
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBDIR_OPENGL =
+
+QMAKE_LINK = CC
+QMAKE_LINK_SHLIB = CC
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -G
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE
+QMAKE_LFLAGS_THREAD = -Kthread
+QMAKE_RPATH = -R
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD = -ldl
+QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm
+QMAKE_LIBS_X11SM = -lSM -lICE
+
+QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
+QMAKE_LIBS_OPENGL_QT = -lGL
+
+QMAKE_LIBS_THREAD =
+
+QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR = ar cq
+QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+include(../common/unix.conf)
+load(qt_config)
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
new file mode 100644
index 0000000..95c5881
--- /dev/null
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/filio.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T off_t
+
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_OPEN ::open
+#define QT_CLOSE ::close
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_LARGEFILE O_LARGEFILE
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#define QT_SOCKLEN_T size_t
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf
new file mode 100644